@incodetech/web 0.0.0-dev-20260403-eccc51c → 0.0.0-dev-20260407-4580f1c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AsYouType-DPWqJvFu.js +2482 -0
- package/dist/addressAutocomplete-B3f6PGTT.js +108 -0
- package/dist/aligndevicelottie-C9xl1spu.js +12757 -0
- package/dist/antifraud/antifraud.es.js +17 -18
- package/dist/antifraud/styles.css +1 -1
- package/dist/authentication/authentication.es.js +28 -50
- package/dist/back-horizontal-hint-Be3dUGk6.js +137 -0
- package/dist/back-tutorial-BNTyW-1N.js +14584 -0
- package/dist/back-vertical-hint-Bz_rnhd-.js +128 -0
- package/dist/backdevicelottie-DBB1YCtW.js +16678 -0
- package/dist/base.css +327 -67
- package/dist/blurdevicelottie-9WvZCZ6C.js +15939 -0
- package/dist/browser-ponyfill-B4Qc6yfW.js +299 -0
- package/dist/button-DhL5eRT3.js +123 -0
- package/dist/checkbox-l8NxPf4o.js +85 -0
- package/dist/consent/consent.es.js +82 -89
- package/dist/consent/styles.css +1 -1
- package/dist/countries-y2ydYDhN.js +8323 -0
- package/dist/curp-validation/curp-validation.es.js +271 -313
- package/dist/curp-validation/styles.css +1 -1
- package/dist/dateInputComposed-B9WqdYx9.js +2 -0
- package/dist/dateInputComposed-ndsGHX1M.js +94 -0
- package/dist/defineProperty-brqHEHA_.js +39 -0
- package/dist/document-capture/styles.css +1 -1
- package/dist/documentCapture-wDgRLdon.js +784 -0
- package/dist/dropdownComposed-_Ey7wJNG.js +258 -0
- package/dist/ekyb/ekyb.es.js +2 -0
- package/dist/ekyb/styles.css +1 -1
- package/dist/ekybModule-BBOm1y49.js +2 -0
- package/dist/ekybModule-fz6i9ZRt.js +286 -0
- package/dist/ekyc/ekyc.es.js +2 -0
- package/dist/ekyc/styles.css +1 -1
- package/dist/ekycModule-SeTFG3AJ.js +233 -0
- package/dist/ekycModule-hxIcNX8n.js +2 -0
- package/dist/email/email.es.js +110 -154
- package/dist/email/styles.css +1 -1
- package/dist/extensibility-DJihqIzM.js +2248 -0
- package/dist/extensibility.es.js +22 -150
- package/dist/face-match/styles.css +147 -73
- package/dist/faceMatch-DH8sLx34.js +191 -0
- package/dist/flip-animation-DOJzdXB-.js +6983 -0
- package/dist/flow/flow.es.js +2273 -2613
- package/dist/flow/styles.css +432 -73
- package/dist/formField-BRTbY8w9.js +100 -0
- package/dist/front-horizontal-hint-aGAhadA2.js +380 -0
- package/dist/front-vertical-hint-DZz1VeNp.js +420 -0
- package/dist/frontdevicelottie-DadDp6be.js +17302 -0
- package/dist/geolocation/geolocation.es.js +852 -832
- package/dist/geolocation/styles.css +1 -1
- package/dist/glaredevicelottie-BfI84cPw.js +14466 -0
- package/dist/governmentValidation/governmentValidation.es.js +100 -106
- package/dist/governmentValidation/styles.css +1 -1
- package/dist/i18n-DZOHbK9q.js +1916 -0
- package/dist/icons-BHbofCgJ.js +245 -0
- package/dist/id/id.es.js +53 -59
- package/dist/id/styles.css +1 -1
- package/dist/id-laser-h-BWyU3VgL.js +467 -0
- package/dist/id-laser-v-JiWXUlv0.js +467 -0
- package/dist/id-tutorial-Cc9xg5_J.js +13152 -0
- package/dist/incodeModule-Bf6yJ8RB.js +18 -0
- package/dist/index.es.js +4 -25
- package/dist/inputComposed-BhbfD8Ru.js +77 -0
- package/dist/loadingIcon-CeQt7Zgb.js +146 -0
- package/dist/mandatoryConsent-LBS8E0rj.js +101 -0
- package/dist/numberedStep-CQVRixRP.js +11 -0
- package/dist/otpInput-CDIG9el7.js +143 -0
- package/dist/page-SvlJWUfz.js +61 -0
- package/dist/passport-horizontal-hint-CFsGs7Dp.js +293 -0
- package/dist/passport-tutorial-z0LN7Hsp.js +11688 -0
- package/dist/passport-vertical-hint-BnCpKWeN.js +267 -0
- package/dist/phone/phone.es.js +87 -121
- package/dist/phone/styles.css +1 -1
- package/dist/phoneInput-C9T_8FJt.js +138 -0
- package/dist/phoneInputComposed-B-0zieIW.js +407 -0
- package/dist/processing-B5zhNH6I.js +15 -0
- package/dist/redirect-to-mobile/styles.css +1 -1
- package/dist/richText-Db0PfpkE.js +1973 -0
- package/dist/rolldown-runtime-CjdbFOpI.js +13 -0
- package/dist/selfie/selfie.es.js +29 -50
- package/dist/selfie/styles.css +170 -66
- package/dist/selfieTutorial-B0MIyPrk.js +2676 -0
- package/dist/setup-Dq2bzNKH.js +15 -0
- package/dist/signature/signature.es.js +557 -707
- package/dist/signature/styles.css +1 -1
- package/dist/spacer-DCljE53A.js +59 -0
- package/dist/spinner-Bk0YuoLu.js +1 -0
- package/dist/spinner-snIGzmm8.js +41 -0
- package/dist/successIcon-AHrfmJvv.js +17 -0
- package/dist/tutorial-DNOd11tg.js +2780 -0
- package/dist/types/ekyb.d.ts +29 -0
- package/dist/types/ekyc.d.ts +29 -0
- package/dist/types/index.d.ts +0 -8
- package/dist/typography-BNbFNFek.js +1 -0
- package/dist/typography-DvHeVWfY.js +29 -0
- package/dist/uiConfig-CwpQ-IM6.js +20 -0
- package/dist/vendor-preact-D6SntenC.js +958 -0
- package/dist/warningIcon-Cvj-ayg1.js +17 -0
- package/package.json +8 -11
- package/dist/AsYouType-D1H_js4X.js +0 -2607
- package/dist/Trans-aTzdT_SA.js +0 -55
- package/dist/addressAutocomplete-C8-wL1j_.js +0 -153
- package/dist/aligndevicelottie-DlQCRPfM.js +0 -29
- package/dist/back-horizontal-hint-CSlf9KI1.js +0 -5
- package/dist/back-tutorial-An9AcMSe.js +0 -29
- package/dist/back-vertical-hint-CNieqiCr.js +0 -5
- package/dist/backdevicelottie-B4NgyWmX.js +0 -29
- package/dist/blurdevicelottie-_BZRug1c.js +0 -29
- package/dist/browser-ponyfill-B6W6hHVY.js +0 -344
- package/dist/button-CE9kRlem.js +0 -184
- package/dist/cameraView-C2X7klNb.js +0 -55
- package/dist/captureOverlay-tCb4R4WE.js +0 -592
- package/dist/checkbox-B5X-mfqq.js +0 -137
- package/dist/chevronDown-DSHaPKbi.js +0 -23
- package/dist/closeIcon-9Hc97omv.js +0 -28
- package/dist/countries-DfLkrF0x.js +0 -616
- package/dist/dateInputComposed-C7PCzh-U.js +0 -173
- package/dist/documentCapture-C0mO-RGE.js +0 -692
- package/dist/dropdownComposed-BpinYlrx.js +0 -367
- package/dist/ekybModule-Dr6LJUg-.js +0 -357
- package/dist/ekycModule-C3mswduI.js +0 -291
- package/dist/errorContent-Cb8nmQAE.js +0 -44
- package/dist/errorIcon-DEARBrGx.js +0 -26
- package/dist/faceMatch-DbDp7D3d.js +0 -237
- package/dist/fileIcon-CCSvS10T.js +0 -52
- package/dist/flip-animation-COR596wy.js +0 -29
- package/dist/flipAnimation-BqV462TA.js +0 -2059
- package/dist/formField-CP6wDdfA.js +0 -106
- package/dist/front-horizontal-hint-lRLKd7vY.js +0 -7
- package/dist/front-vertical-hint-qQoJXRE3.js +0 -7
- package/dist/frontdevicelottie-KhKxT5n9.js +0 -29
- package/dist/glaredevicelottie-DLuIStvb.js +0 -29
- package/dist/id-laser-h-BBV3r3rz.js +0 -29
- package/dist/id-laser-v-BTHJaSfx.js +0 -29
- package/dist/id-tutorial-B-F5Q28m.js +0 -29
- package/dist/incodeModule-C4XIllao.js +0 -96
- package/dist/inputComposed-fUbAGrDy.js +0 -103
- package/dist/instance-BWYzq8dk.js +0 -2163
- package/dist/loadingIcon-DmuPXh70.js +0 -195
- package/dist/mandatoryConsent-5xPI0cor.js +0 -94
- package/dist/manualCaptureButton-BvFmTyJe.js +0 -372
- package/dist/numberedStep-DwUB__mh.js +0 -5
- package/dist/otpInput-BFXhqFRT.js +0 -156
- package/dist/page-SrUl0qtN.js +0 -69
- package/dist/passport-horizontal-hint-BCtpMp1Y.js +0 -5
- package/dist/passport-tutorial-CaYBFTqt.js +0 -29
- package/dist/passport-vertical-hint-GaLnzqHP.js +0 -5
- package/dist/permissions-DT4Fz9MR.js +0 -709
- package/dist/phoneInput-CGr8TxOO.js +0 -158
- package/dist/phoneInputComposed-Cm9O2Jba.js +0 -206
- package/dist/processing-szVOCQwZ.js +0 -19
- package/dist/richText-cspvNz2a.js +0 -1807
- package/dist/selfieTutorial-Dm_p0ke9.js +0 -29
- package/dist/spinner-DygONskw.js +0 -60
- package/dist/successIcon-Bjsdc4lF.js +0 -26
- package/dist/tutorial-Cdz1025D.js +0 -473
- package/dist/types/ekyb/styles.d.ts +0 -1
- package/dist/types/ekyc/styles.d.ts +0 -1
- package/dist/typography-BDACYR5i.js +0 -14
- package/dist/uiConfig-Dnt-2YWB.js +0 -23
- package/dist/useMediaQuery-lJdQBmC2.js +0 -18
- package/dist/vendor-preact-BoMmvSgn.js +0 -694
- package/dist/warningIcon-DQq_MrOB.js +0 -26
package/dist/flow/flow.es.js
CHANGED
|
@@ -1,2638 +1,2298 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "../
|
|
6
|
-
import { r as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
function
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
1
|
+
import { t as e } from "../rolldown-runtime-CjdbFOpI.js";
|
|
2
|
+
import { n as t, t as n } from "../i18n-DZOHbK9q.js";
|
|
3
|
+
import { S as r, _ as i, c as a, g as o, h as s, l as c, o as l, p as u, v as d, x as f } from "../vendor-preact-D6SntenC.js";
|
|
4
|
+
import { t as p } from "../uiConfig-CwpQ-IM6.js";
|
|
5
|
+
import { t as m } from "../setup-Dq2bzNKH.js";
|
|
6
|
+
import { c as h, n as g, r as _ } from "../loadingIcon-CeQt7Zgb.js";
|
|
7
|
+
import { t as v } from "../spacer-DCljE53A.js";
|
|
8
|
+
import { i as y, n as b, r as x, t as S } from "../button-DhL5eRT3.js";
|
|
9
|
+
import { t as C } from "../spinner-snIGzmm8.js";
|
|
10
|
+
import "../spinner-Bk0YuoLu.js";
|
|
11
|
+
import "../icons-BHbofCgJ.js";
|
|
12
|
+
import { t as w } from "../successIcon-AHrfmJvv.js";
|
|
13
|
+
import { n as ee } from "../countries-y2ydYDhN.js";
|
|
14
|
+
import { t as T } from "../incodeModule-Bf6yJ8RB.js";
|
|
15
|
+
import { api as E, resolveWasmConfig as te, warmupWasm as ne } from "@incodetech/core";
|
|
16
|
+
import { antifraudMachine as re } from "@incodetech/core/antifraud";
|
|
17
|
+
import { authenticationMachine as ie } from "@incodetech/core/authentication";
|
|
18
|
+
import { consentMachine as ae } from "@incodetech/core/consent";
|
|
19
|
+
import { curpValidationMachine as oe } from "@incodetech/core/curp-validation";
|
|
20
|
+
import { ekybMachine as se } from "@incodetech/core/ekyb";
|
|
21
|
+
import { ekycMachine as ce } from "@incodetech/core/ekyc";
|
|
22
|
+
import { emailMachine as le } from "@incodetech/core/email";
|
|
23
|
+
import { createOrchestratedFlowManager as ue, getRequiredWasmPipelines as D } from "@incodetech/core/flow";
|
|
24
|
+
import { createRedirectToMobileManager as de } from "@incodetech/core/redirect-to-mobile";
|
|
25
|
+
import { faceMatchMachine as fe } from "@incodetech/core/face-match";
|
|
26
|
+
import { geolocationMachine as pe } from "@incodetech/core/geolocation";
|
|
27
|
+
import { documentCaptureMachine as O } from "@incodetech/core/document-capture";
|
|
28
|
+
import { idCaptureMachine as k } from "@incodetech/core/id";
|
|
29
|
+
import { phoneMachine as me } from "@incodetech/core/phone";
|
|
30
|
+
import { selfieMachine as he } from "@incodetech/core/selfie";
|
|
31
|
+
import { governmentValidationMachine as ge } from "@incodetech/core/government-validation";
|
|
32
|
+
import { mandatoryConsentMachine as _e } from "@incodetech/core/mandatory-consent";
|
|
33
|
+
import { signatureMachine as ve } from "@incodetech/core/signature";
|
|
34
|
+
//#region src/shared/tabs/tabs.tsx
|
|
35
|
+
var A = f(null), j = () => {
|
|
36
|
+
let e = o(A);
|
|
37
|
+
if (!e) throw Error("Tabs compound components must be used within <Tabs>");
|
|
38
|
+
return e;
|
|
39
|
+
}, M = Object.assign(({ defaultValue: e, listClassName: t, triggerClassName: n, activeTriggerClassName: r, children: i }) => {
|
|
40
|
+
let [a, o] = u(e);
|
|
41
|
+
return /* @__PURE__ */ d(A.Provider, {
|
|
42
|
+
value: {
|
|
43
|
+
activeValue: a,
|
|
44
|
+
setActiveValue: o,
|
|
45
|
+
listClassName: t,
|
|
46
|
+
triggerClassName: n,
|
|
47
|
+
activeTriggerClassName: r
|
|
48
|
+
},
|
|
49
|
+
children: i
|
|
50
|
+
});
|
|
51
|
+
}, {
|
|
52
|
+
List: ({ children: e }) => {
|
|
53
|
+
let { listClassName: t } = j();
|
|
54
|
+
return /* @__PURE__ */ d("div", {
|
|
55
|
+
class: t,
|
|
56
|
+
children: e
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
Trigger: ({ value: e, children: t }) => {
|
|
60
|
+
let { activeValue: n, setActiveValue: r, triggerClassName: i, activeTriggerClassName: a } = j();
|
|
61
|
+
return /* @__PURE__ */ d("button", {
|
|
62
|
+
type: "button",
|
|
63
|
+
class: g(i, n === e && a),
|
|
64
|
+
onClick: () => r(e),
|
|
65
|
+
children: t
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
Content: ({ value: e, children: t }) => {
|
|
69
|
+
let { activeValue: n } = j();
|
|
70
|
+
return n === e ? /* @__PURE__ */ d(r, { children: t }) : null;
|
|
71
|
+
}
|
|
72
|
+
}), ye = ({ logoSrc: e }) => {
|
|
73
|
+
let { t: n } = t();
|
|
74
|
+
return /* @__PURE__ */ d("header", {
|
|
75
|
+
class: "IncodeRedirectHeader",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ d("div", {
|
|
78
|
+
class: "IncodeRedirectLogoWrapper",
|
|
79
|
+
children: /* @__PURE__ */ d("img", {
|
|
80
|
+
src: e,
|
|
81
|
+
alt: "Logo",
|
|
82
|
+
class: "IncodeRedirectLogo"
|
|
83
|
+
})
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ d(v, { size: 24 }),
|
|
86
|
+
/* @__PURE__ */ d("h1", {
|
|
87
|
+
class: "IncodeRedirectTitle",
|
|
88
|
+
children: n("v2.redirectToMobile.title")
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ d(v, { size: 12 }),
|
|
91
|
+
/* @__PURE__ */ d("p", {
|
|
92
|
+
class: "IncodeRedirectSubtitle",
|
|
93
|
+
children: n("v2.redirectToMobile.subtitle")
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
}, be = ({ addContinueToDesktop: e, onContinueOnDesktop: n }) => {
|
|
98
|
+
let { t: r } = t();
|
|
99
|
+
return /* @__PURE__ */ d("footer", {
|
|
100
|
+
class: "IncodeRedirectBottomNav",
|
|
101
|
+
children: [e ? /* @__PURE__ */ d(S, {
|
|
102
|
+
variant: "link",
|
|
103
|
+
onClick: n,
|
|
104
|
+
children: r("redirect.continueOnDesktop")
|
|
105
|
+
}) : null, /* @__PURE__ */ d(b, {})]
|
|
106
|
+
});
|
|
107
|
+
}, xe = ({ visible: e }) => {
|
|
108
|
+
let { t: n } = t();
|
|
109
|
+
return e ? /* @__PURE__ */ d("div", {
|
|
110
|
+
class: "IncodeRedirectToast",
|
|
111
|
+
children: [/* @__PURE__ */ d(w, { size: 24 }), /* @__PURE__ */ d("span", {
|
|
112
|
+
class: "IncodeRedirectToastText",
|
|
113
|
+
children: n("redirect.linkResent")
|
|
114
|
+
})]
|
|
115
|
+
}) : null;
|
|
116
|
+
}, Se = /* @__PURE__ */ e(((e, t) => {
|
|
117
|
+
t.exports = function() {
|
|
118
|
+
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
119
|
+
};
|
|
120
|
+
})), N = /* @__PURE__ */ e(((e) => {
|
|
121
|
+
var t, n = [
|
|
122
|
+
0,
|
|
123
|
+
26,
|
|
124
|
+
44,
|
|
125
|
+
70,
|
|
126
|
+
100,
|
|
127
|
+
134,
|
|
128
|
+
172,
|
|
129
|
+
196,
|
|
130
|
+
242,
|
|
131
|
+
292,
|
|
132
|
+
346,
|
|
133
|
+
404,
|
|
134
|
+
466,
|
|
135
|
+
532,
|
|
136
|
+
581,
|
|
137
|
+
655,
|
|
138
|
+
733,
|
|
139
|
+
815,
|
|
140
|
+
901,
|
|
141
|
+
991,
|
|
142
|
+
1085,
|
|
143
|
+
1156,
|
|
144
|
+
1258,
|
|
145
|
+
1364,
|
|
146
|
+
1474,
|
|
147
|
+
1588,
|
|
148
|
+
1706,
|
|
149
|
+
1828,
|
|
150
|
+
1921,
|
|
151
|
+
2051,
|
|
152
|
+
2185,
|
|
153
|
+
2323,
|
|
154
|
+
2465,
|
|
155
|
+
2611,
|
|
156
|
+
2761,
|
|
157
|
+
2876,
|
|
158
|
+
3034,
|
|
159
|
+
3196,
|
|
160
|
+
3362,
|
|
161
|
+
3532,
|
|
162
|
+
3706
|
|
163
|
+
];
|
|
164
|
+
e.getSymbolSize = function(e) {
|
|
165
|
+
if (!e) throw Error("\"version\" cannot be null or undefined");
|
|
166
|
+
if (e < 1 || e > 40) throw Error("\"version\" should be in range from 1 to 40");
|
|
167
|
+
return e * 4 + 17;
|
|
168
|
+
}, e.getSymbolTotalCodewords = function(e) {
|
|
169
|
+
return n[e];
|
|
170
|
+
}, e.getBCHDigit = function(e) {
|
|
171
|
+
let t = 0;
|
|
172
|
+
for (; e !== 0;) t++, e >>>= 1;
|
|
173
|
+
return t;
|
|
174
|
+
}, e.setToSJISFunction = function(e) {
|
|
175
|
+
if (typeof e != "function") throw Error("\"toSJISFunc\" is not a valid function.");
|
|
176
|
+
t = e;
|
|
177
|
+
}, e.isKanjiModeEnabled = function() {
|
|
178
|
+
return t !== void 0;
|
|
179
|
+
}, e.toSJIS = function(e) {
|
|
180
|
+
return t(e);
|
|
181
|
+
};
|
|
182
|
+
})), P = /* @__PURE__ */ e(((e) => {
|
|
183
|
+
e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
|
|
184
|
+
function t(t) {
|
|
185
|
+
if (typeof t != "string") throw Error("Param is not a string");
|
|
186
|
+
switch (t.toLowerCase()) {
|
|
187
|
+
case "l":
|
|
188
|
+
case "low": return e.L;
|
|
189
|
+
case "m":
|
|
190
|
+
case "medium": return e.M;
|
|
191
|
+
case "q":
|
|
192
|
+
case "quartile": return e.Q;
|
|
193
|
+
case "h":
|
|
194
|
+
case "high": return e.H;
|
|
195
|
+
default: throw Error("Unknown EC Level: " + t);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
e.isValid = function(e) {
|
|
199
|
+
return e && e.bit !== void 0 && e.bit >= 0 && e.bit < 4;
|
|
200
|
+
}, e.from = function(n, r) {
|
|
201
|
+
if (e.isValid(n)) return n;
|
|
202
|
+
try {
|
|
203
|
+
return t(n);
|
|
204
|
+
} catch {
|
|
205
|
+
return r;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
})), Ce = /* @__PURE__ */ e(((e, t) => {
|
|
209
|
+
function n() {
|
|
210
|
+
this.buffer = [], this.length = 0;
|
|
211
|
+
}
|
|
212
|
+
n.prototype = {
|
|
213
|
+
get: function(e) {
|
|
214
|
+
let t = Math.floor(e / 8);
|
|
215
|
+
return (this.buffer[t] >>> 7 - e % 8 & 1) == 1;
|
|
216
|
+
},
|
|
217
|
+
put: function(e, t) {
|
|
218
|
+
for (let n = 0; n < t; n++) this.putBit((e >>> t - n - 1 & 1) == 1);
|
|
219
|
+
},
|
|
220
|
+
getLengthInBits: function() {
|
|
221
|
+
return this.length;
|
|
222
|
+
},
|
|
223
|
+
putBit: function(e) {
|
|
224
|
+
let t = Math.floor(this.length / 8);
|
|
225
|
+
this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
|
|
226
|
+
}
|
|
227
|
+
}, t.exports = n;
|
|
228
|
+
})), we = /* @__PURE__ */ e(((e, t) => {
|
|
229
|
+
function n(e) {
|
|
230
|
+
if (!e || e < 1) throw Error("BitMatrix size must be defined and greater than 0");
|
|
231
|
+
this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
|
|
232
|
+
}
|
|
233
|
+
n.prototype.set = function(e, t, n, r) {
|
|
234
|
+
let i = e * this.size + t;
|
|
235
|
+
this.data[i] = n, r && (this.reservedBit[i] = !0);
|
|
236
|
+
}, n.prototype.get = function(e, t) {
|
|
237
|
+
return this.data[e * this.size + t];
|
|
238
|
+
}, n.prototype.xor = function(e, t, n) {
|
|
239
|
+
this.data[e * this.size + t] ^= n;
|
|
240
|
+
}, n.prototype.isReserved = function(e, t) {
|
|
241
|
+
return this.reservedBit[e * this.size + t];
|
|
242
|
+
}, t.exports = n;
|
|
243
|
+
})), Te = /* @__PURE__ */ e(((e) => {
|
|
244
|
+
var t = N().getSymbolSize;
|
|
245
|
+
e.getRowColCoords = function(e) {
|
|
246
|
+
if (e === 1) return [];
|
|
247
|
+
let n = Math.floor(e / 7) + 2, r = t(e), i = r === 145 ? 26 : Math.ceil((r - 13) / (2 * n - 2)) * 2, a = [r - 7];
|
|
248
|
+
for (let e = 1; e < n - 1; e++) a[e] = a[e - 1] - i;
|
|
249
|
+
return a.push(6), a.reverse();
|
|
250
|
+
}, e.getPositions = function(t) {
|
|
251
|
+
let n = [], r = e.getRowColCoords(t), i = r.length;
|
|
252
|
+
for (let e = 0; e < i; e++) for (let t = 0; t < i; t++) e === 0 && t === 0 || e === 0 && t === i - 1 || e === i - 1 && t === 0 || n.push([r[e], r[t]]);
|
|
253
|
+
return n;
|
|
254
|
+
};
|
|
255
|
+
})), Ee = /* @__PURE__ */ e(((e) => {
|
|
256
|
+
var t = N().getSymbolSize, n = 7;
|
|
257
|
+
e.getPositions = function(e) {
|
|
258
|
+
let r = t(e);
|
|
259
|
+
return [
|
|
260
|
+
[0, 0],
|
|
261
|
+
[r - n, 0],
|
|
262
|
+
[0, r - n]
|
|
263
|
+
];
|
|
264
|
+
};
|
|
265
|
+
})), De = /* @__PURE__ */ e(((e) => {
|
|
266
|
+
e.Patterns = {
|
|
267
|
+
PATTERN000: 0,
|
|
268
|
+
PATTERN001: 1,
|
|
269
|
+
PATTERN010: 2,
|
|
270
|
+
PATTERN011: 3,
|
|
271
|
+
PATTERN100: 4,
|
|
272
|
+
PATTERN101: 5,
|
|
273
|
+
PATTERN110: 6,
|
|
274
|
+
PATTERN111: 7
|
|
275
|
+
};
|
|
276
|
+
var t = {
|
|
277
|
+
N1: 3,
|
|
278
|
+
N2: 3,
|
|
279
|
+
N3: 40,
|
|
280
|
+
N4: 10
|
|
281
|
+
};
|
|
282
|
+
e.isValid = function(e) {
|
|
283
|
+
return e != null && e !== "" && !isNaN(e) && e >= 0 && e <= 7;
|
|
284
|
+
}, e.from = function(t) {
|
|
285
|
+
return e.isValid(t) ? parseInt(t, 10) : void 0;
|
|
286
|
+
}, e.getPenaltyN1 = function(e) {
|
|
287
|
+
let n = e.size, r = 0, i = 0, a = 0, o = null, s = null;
|
|
288
|
+
for (let c = 0; c < n; c++) {
|
|
289
|
+
i = a = 0, o = s = null;
|
|
290
|
+
for (let l = 0; l < n; l++) {
|
|
291
|
+
let n = e.get(c, l);
|
|
292
|
+
n === o ? i++ : (i >= 5 && (r += t.N1 + (i - 5)), o = n, i = 1), n = e.get(l, c), n === s ? a++ : (a >= 5 && (r += t.N1 + (a - 5)), s = n, a = 1);
|
|
293
|
+
}
|
|
294
|
+
i >= 5 && (r += t.N1 + (i - 5)), a >= 5 && (r += t.N1 + (a - 5));
|
|
295
|
+
}
|
|
296
|
+
return r;
|
|
297
|
+
}, e.getPenaltyN2 = function(e) {
|
|
298
|
+
let n = e.size, r = 0;
|
|
299
|
+
for (let t = 0; t < n - 1; t++) for (let i = 0; i < n - 1; i++) {
|
|
300
|
+
let n = e.get(t, i) + e.get(t, i + 1) + e.get(t + 1, i) + e.get(t + 1, i + 1);
|
|
301
|
+
(n === 4 || n === 0) && r++;
|
|
302
|
+
}
|
|
303
|
+
return r * t.N2;
|
|
304
|
+
}, e.getPenaltyN3 = function(e) {
|
|
305
|
+
let n = e.size, r = 0, i = 0, a = 0;
|
|
306
|
+
for (let t = 0; t < n; t++) {
|
|
307
|
+
i = a = 0;
|
|
308
|
+
for (let o = 0; o < n; o++) i = i << 1 & 2047 | e.get(t, o), o >= 10 && (i === 1488 || i === 93) && r++, a = a << 1 & 2047 | e.get(o, t), o >= 10 && (a === 1488 || a === 93) && r++;
|
|
309
|
+
}
|
|
310
|
+
return r * t.N3;
|
|
311
|
+
}, e.getPenaltyN4 = function(e) {
|
|
312
|
+
let n = 0, r = e.data.length;
|
|
313
|
+
for (let t = 0; t < r; t++) n += e.data[t];
|
|
314
|
+
return Math.abs(Math.ceil(n * 100 / r / 5) - 10) * t.N4;
|
|
315
|
+
};
|
|
316
|
+
function n(t, n, r) {
|
|
317
|
+
switch (t) {
|
|
318
|
+
case e.Patterns.PATTERN000: return (n + r) % 2 == 0;
|
|
319
|
+
case e.Patterns.PATTERN001: return n % 2 == 0;
|
|
320
|
+
case e.Patterns.PATTERN010: return r % 3 == 0;
|
|
321
|
+
case e.Patterns.PATTERN011: return (n + r) % 3 == 0;
|
|
322
|
+
case e.Patterns.PATTERN100: return (Math.floor(n / 2) + Math.floor(r / 3)) % 2 == 0;
|
|
323
|
+
case e.Patterns.PATTERN101: return n * r % 2 + n * r % 3 == 0;
|
|
324
|
+
case e.Patterns.PATTERN110: return (n * r % 2 + n * r % 3) % 2 == 0;
|
|
325
|
+
case e.Patterns.PATTERN111: return (n * r % 3 + (n + r) % 2) % 2 == 0;
|
|
326
|
+
default: throw Error("bad maskPattern:" + t);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
e.applyMask = function(e, t) {
|
|
330
|
+
let r = t.size;
|
|
331
|
+
for (let i = 0; i < r; i++) for (let a = 0; a < r; a++) t.isReserved(a, i) || t.xor(a, i, n(e, a, i));
|
|
332
|
+
}, e.getBestMask = function(t, n) {
|
|
333
|
+
let r = Object.keys(e.Patterns).length, i = 0, a = Infinity;
|
|
334
|
+
for (let o = 0; o < r; o++) {
|
|
335
|
+
n(o), e.applyMask(o, t);
|
|
336
|
+
let r = e.getPenaltyN1(t) + e.getPenaltyN2(t) + e.getPenaltyN3(t) + e.getPenaltyN4(t);
|
|
337
|
+
e.applyMask(o, t), r < a && (a = r, i = o);
|
|
338
|
+
}
|
|
339
|
+
return i;
|
|
340
|
+
};
|
|
341
|
+
})), F = /* @__PURE__ */ e(((e) => {
|
|
342
|
+
var t = P(), n = [
|
|
343
|
+
1,
|
|
344
|
+
1,
|
|
345
|
+
1,
|
|
346
|
+
1,
|
|
347
|
+
1,
|
|
348
|
+
1,
|
|
349
|
+
1,
|
|
350
|
+
1,
|
|
351
|
+
1,
|
|
352
|
+
1,
|
|
353
|
+
2,
|
|
354
|
+
2,
|
|
355
|
+
1,
|
|
356
|
+
2,
|
|
357
|
+
2,
|
|
358
|
+
4,
|
|
359
|
+
1,
|
|
360
|
+
2,
|
|
361
|
+
4,
|
|
362
|
+
4,
|
|
363
|
+
2,
|
|
364
|
+
4,
|
|
365
|
+
4,
|
|
366
|
+
4,
|
|
367
|
+
2,
|
|
368
|
+
4,
|
|
369
|
+
6,
|
|
370
|
+
5,
|
|
371
|
+
2,
|
|
372
|
+
4,
|
|
373
|
+
6,
|
|
374
|
+
6,
|
|
375
|
+
2,
|
|
376
|
+
5,
|
|
377
|
+
8,
|
|
378
|
+
8,
|
|
379
|
+
4,
|
|
380
|
+
5,
|
|
381
|
+
8,
|
|
382
|
+
8,
|
|
383
|
+
4,
|
|
384
|
+
5,
|
|
385
|
+
8,
|
|
386
|
+
11,
|
|
387
|
+
4,
|
|
388
|
+
8,
|
|
389
|
+
10,
|
|
390
|
+
11,
|
|
391
|
+
4,
|
|
392
|
+
9,
|
|
393
|
+
12,
|
|
394
|
+
16,
|
|
395
|
+
4,
|
|
396
|
+
9,
|
|
397
|
+
16,
|
|
398
|
+
16,
|
|
399
|
+
6,
|
|
400
|
+
10,
|
|
401
|
+
12,
|
|
402
|
+
18,
|
|
403
|
+
6,
|
|
404
|
+
10,
|
|
405
|
+
17,
|
|
406
|
+
16,
|
|
407
|
+
6,
|
|
408
|
+
11,
|
|
409
|
+
16,
|
|
410
|
+
19,
|
|
411
|
+
6,
|
|
412
|
+
13,
|
|
413
|
+
18,
|
|
414
|
+
21,
|
|
415
|
+
7,
|
|
416
|
+
14,
|
|
417
|
+
21,
|
|
418
|
+
25,
|
|
419
|
+
8,
|
|
420
|
+
16,
|
|
421
|
+
20,
|
|
422
|
+
25,
|
|
423
|
+
8,
|
|
424
|
+
17,
|
|
425
|
+
23,
|
|
426
|
+
25,
|
|
427
|
+
9,
|
|
428
|
+
17,
|
|
429
|
+
23,
|
|
430
|
+
34,
|
|
431
|
+
9,
|
|
432
|
+
18,
|
|
433
|
+
25,
|
|
434
|
+
30,
|
|
435
|
+
10,
|
|
436
|
+
20,
|
|
437
|
+
27,
|
|
438
|
+
32,
|
|
439
|
+
12,
|
|
440
|
+
21,
|
|
441
|
+
29,
|
|
442
|
+
35,
|
|
443
|
+
12,
|
|
444
|
+
23,
|
|
445
|
+
34,
|
|
446
|
+
37,
|
|
447
|
+
12,
|
|
448
|
+
25,
|
|
449
|
+
34,
|
|
450
|
+
40,
|
|
451
|
+
13,
|
|
452
|
+
26,
|
|
453
|
+
35,
|
|
454
|
+
42,
|
|
455
|
+
14,
|
|
456
|
+
28,
|
|
457
|
+
38,
|
|
458
|
+
45,
|
|
459
|
+
15,
|
|
460
|
+
29,
|
|
461
|
+
40,
|
|
462
|
+
48,
|
|
463
|
+
16,
|
|
464
|
+
31,
|
|
465
|
+
43,
|
|
466
|
+
51,
|
|
467
|
+
17,
|
|
468
|
+
33,
|
|
469
|
+
45,
|
|
470
|
+
54,
|
|
471
|
+
18,
|
|
472
|
+
35,
|
|
473
|
+
48,
|
|
474
|
+
57,
|
|
475
|
+
19,
|
|
476
|
+
37,
|
|
477
|
+
51,
|
|
478
|
+
60,
|
|
479
|
+
19,
|
|
480
|
+
38,
|
|
481
|
+
53,
|
|
482
|
+
63,
|
|
483
|
+
20,
|
|
484
|
+
40,
|
|
485
|
+
56,
|
|
486
|
+
66,
|
|
487
|
+
21,
|
|
488
|
+
43,
|
|
489
|
+
59,
|
|
490
|
+
70,
|
|
491
|
+
22,
|
|
492
|
+
45,
|
|
493
|
+
62,
|
|
494
|
+
74,
|
|
495
|
+
24,
|
|
496
|
+
47,
|
|
497
|
+
65,
|
|
498
|
+
77,
|
|
499
|
+
25,
|
|
500
|
+
49,
|
|
501
|
+
68,
|
|
502
|
+
81
|
|
503
|
+
], r = [
|
|
504
|
+
7,
|
|
505
|
+
10,
|
|
506
|
+
13,
|
|
507
|
+
17,
|
|
508
|
+
10,
|
|
509
|
+
16,
|
|
510
|
+
22,
|
|
511
|
+
28,
|
|
512
|
+
15,
|
|
513
|
+
26,
|
|
514
|
+
36,
|
|
515
|
+
44,
|
|
516
|
+
20,
|
|
517
|
+
36,
|
|
518
|
+
52,
|
|
519
|
+
64,
|
|
520
|
+
26,
|
|
521
|
+
48,
|
|
522
|
+
72,
|
|
523
|
+
88,
|
|
524
|
+
36,
|
|
525
|
+
64,
|
|
526
|
+
96,
|
|
527
|
+
112,
|
|
528
|
+
40,
|
|
529
|
+
72,
|
|
530
|
+
108,
|
|
531
|
+
130,
|
|
532
|
+
48,
|
|
533
|
+
88,
|
|
534
|
+
132,
|
|
535
|
+
156,
|
|
536
|
+
60,
|
|
537
|
+
110,
|
|
538
|
+
160,
|
|
539
|
+
192,
|
|
540
|
+
72,
|
|
541
|
+
130,
|
|
542
|
+
192,
|
|
543
|
+
224,
|
|
544
|
+
80,
|
|
545
|
+
150,
|
|
546
|
+
224,
|
|
547
|
+
264,
|
|
548
|
+
96,
|
|
549
|
+
176,
|
|
550
|
+
260,
|
|
551
|
+
308,
|
|
552
|
+
104,
|
|
553
|
+
198,
|
|
554
|
+
288,
|
|
555
|
+
352,
|
|
556
|
+
120,
|
|
557
|
+
216,
|
|
558
|
+
320,
|
|
559
|
+
384,
|
|
560
|
+
132,
|
|
561
|
+
240,
|
|
562
|
+
360,
|
|
563
|
+
432,
|
|
564
|
+
144,
|
|
565
|
+
280,
|
|
566
|
+
408,
|
|
567
|
+
480,
|
|
568
|
+
168,
|
|
569
|
+
308,
|
|
570
|
+
448,
|
|
571
|
+
532,
|
|
572
|
+
180,
|
|
573
|
+
338,
|
|
574
|
+
504,
|
|
575
|
+
588,
|
|
576
|
+
196,
|
|
577
|
+
364,
|
|
578
|
+
546,
|
|
579
|
+
650,
|
|
580
|
+
224,
|
|
581
|
+
416,
|
|
582
|
+
600,
|
|
583
|
+
700,
|
|
584
|
+
224,
|
|
585
|
+
442,
|
|
586
|
+
644,
|
|
587
|
+
750,
|
|
588
|
+
252,
|
|
589
|
+
476,
|
|
590
|
+
690,
|
|
591
|
+
816,
|
|
592
|
+
270,
|
|
593
|
+
504,
|
|
594
|
+
750,
|
|
595
|
+
900,
|
|
596
|
+
300,
|
|
597
|
+
560,
|
|
598
|
+
810,
|
|
599
|
+
960,
|
|
600
|
+
312,
|
|
601
|
+
588,
|
|
602
|
+
870,
|
|
603
|
+
1050,
|
|
604
|
+
336,
|
|
605
|
+
644,
|
|
606
|
+
952,
|
|
607
|
+
1110,
|
|
608
|
+
360,
|
|
609
|
+
700,
|
|
610
|
+
1020,
|
|
611
|
+
1200,
|
|
612
|
+
390,
|
|
613
|
+
728,
|
|
614
|
+
1050,
|
|
615
|
+
1260,
|
|
616
|
+
420,
|
|
617
|
+
784,
|
|
618
|
+
1140,
|
|
619
|
+
1350,
|
|
620
|
+
450,
|
|
621
|
+
812,
|
|
622
|
+
1200,
|
|
623
|
+
1440,
|
|
624
|
+
480,
|
|
625
|
+
868,
|
|
626
|
+
1290,
|
|
627
|
+
1530,
|
|
628
|
+
510,
|
|
629
|
+
924,
|
|
630
|
+
1350,
|
|
631
|
+
1620,
|
|
632
|
+
540,
|
|
633
|
+
980,
|
|
634
|
+
1440,
|
|
635
|
+
1710,
|
|
636
|
+
570,
|
|
637
|
+
1036,
|
|
638
|
+
1530,
|
|
639
|
+
1800,
|
|
640
|
+
570,
|
|
641
|
+
1064,
|
|
642
|
+
1590,
|
|
643
|
+
1890,
|
|
644
|
+
600,
|
|
645
|
+
1120,
|
|
646
|
+
1680,
|
|
647
|
+
1980,
|
|
648
|
+
630,
|
|
649
|
+
1204,
|
|
650
|
+
1770,
|
|
651
|
+
2100,
|
|
652
|
+
660,
|
|
653
|
+
1260,
|
|
654
|
+
1860,
|
|
655
|
+
2220,
|
|
656
|
+
720,
|
|
657
|
+
1316,
|
|
658
|
+
1950,
|
|
659
|
+
2310,
|
|
660
|
+
750,
|
|
661
|
+
1372,
|
|
662
|
+
2040,
|
|
663
|
+
2430
|
|
664
|
+
];
|
|
665
|
+
e.getBlocksCount = function(e, r) {
|
|
666
|
+
switch (r) {
|
|
667
|
+
case t.L: return n[(e - 1) * 4 + 0];
|
|
668
|
+
case t.M: return n[(e - 1) * 4 + 1];
|
|
669
|
+
case t.Q: return n[(e - 1) * 4 + 2];
|
|
670
|
+
case t.H: return n[(e - 1) * 4 + 3];
|
|
671
|
+
default: return;
|
|
672
|
+
}
|
|
673
|
+
}, e.getTotalCodewordsCount = function(e, n) {
|
|
674
|
+
switch (n) {
|
|
675
|
+
case t.L: return r[(e - 1) * 4 + 0];
|
|
676
|
+
case t.M: return r[(e - 1) * 4 + 1];
|
|
677
|
+
case t.Q: return r[(e - 1) * 4 + 2];
|
|
678
|
+
case t.H: return r[(e - 1) * 4 + 3];
|
|
679
|
+
default: return;
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
})), Oe = /* @__PURE__ */ e(((e) => {
|
|
683
|
+
var t = new Uint8Array(512), n = new Uint8Array(256);
|
|
684
|
+
(function() {
|
|
685
|
+
let e = 1;
|
|
686
|
+
for (let r = 0; r < 255; r++) t[r] = e, n[e] = r, e <<= 1, e & 256 && (e ^= 285);
|
|
687
|
+
for (let e = 255; e < 512; e++) t[e] = t[e - 255];
|
|
688
|
+
})(), e.log = function(e) {
|
|
689
|
+
if (e < 1) throw Error("log(" + e + ")");
|
|
690
|
+
return n[e];
|
|
691
|
+
}, e.exp = function(e) {
|
|
692
|
+
return t[e];
|
|
693
|
+
}, e.mul = function(e, r) {
|
|
694
|
+
return e === 0 || r === 0 ? 0 : t[n[e] + n[r]];
|
|
695
|
+
};
|
|
696
|
+
})), ke = /* @__PURE__ */ e(((e) => {
|
|
697
|
+
var t = Oe();
|
|
698
|
+
e.mul = function(e, n) {
|
|
699
|
+
let r = new Uint8Array(e.length + n.length - 1);
|
|
700
|
+
for (let i = 0; i < e.length; i++) for (let a = 0; a < n.length; a++) r[i + a] ^= t.mul(e[i], n[a]);
|
|
701
|
+
return r;
|
|
702
|
+
}, e.mod = function(e, n) {
|
|
703
|
+
let r = new Uint8Array(e);
|
|
704
|
+
for (; r.length - n.length >= 0;) {
|
|
705
|
+
let e = r[0];
|
|
706
|
+
for (let i = 0; i < n.length; i++) r[i] ^= t.mul(n[i], e);
|
|
707
|
+
let i = 0;
|
|
708
|
+
for (; i < r.length && r[i] === 0;) i++;
|
|
709
|
+
r = r.slice(i);
|
|
710
|
+
}
|
|
711
|
+
return r;
|
|
712
|
+
}, e.generateECPolynomial = function(n) {
|
|
713
|
+
let r = new Uint8Array([1]);
|
|
714
|
+
for (let i = 0; i < n; i++) r = e.mul(r, new Uint8Array([1, t.exp(i)]));
|
|
715
|
+
return r;
|
|
716
|
+
};
|
|
717
|
+
})), Ae = /* @__PURE__ */ e(((e, t) => {
|
|
718
|
+
var n = ke();
|
|
719
|
+
function r(e) {
|
|
720
|
+
this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
|
|
721
|
+
}
|
|
722
|
+
r.prototype.initialize = function(e) {
|
|
723
|
+
this.degree = e, this.genPoly = n.generateECPolynomial(this.degree);
|
|
724
|
+
}, r.prototype.encode = function(e) {
|
|
725
|
+
if (!this.genPoly) throw Error("Encoder not initialized");
|
|
726
|
+
let t = new Uint8Array(e.length + this.degree);
|
|
727
|
+
t.set(e);
|
|
728
|
+
let r = n.mod(t, this.genPoly), i = this.degree - r.length;
|
|
729
|
+
if (i > 0) {
|
|
730
|
+
let e = new Uint8Array(this.degree);
|
|
731
|
+
return e.set(r, i), e;
|
|
732
|
+
}
|
|
733
|
+
return r;
|
|
734
|
+
}, t.exports = r;
|
|
735
|
+
})), I = /* @__PURE__ */ e(((e) => {
|
|
736
|
+
e.isValid = function(e) {
|
|
737
|
+
return !isNaN(e) && e >= 1 && e <= 40;
|
|
738
|
+
};
|
|
739
|
+
})), L = /* @__PURE__ */ e(((e) => {
|
|
740
|
+
var t = "[0-9]+", n = "[A-Z $%*+\\-./:]+", r = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
741
|
+
r = r.replace(/u/g, "\\u");
|
|
742
|
+
var i = "(?:(?![A-Z0-9 $%*+\\-./:]|" + r + ")(?:.|[\r\n]))+";
|
|
743
|
+
e.KANJI = new RegExp(r, "g"), e.BYTE_KANJI = /* @__PURE__ */ RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), e.BYTE = new RegExp(i, "g"), e.NUMERIC = new RegExp(t, "g"), e.ALPHANUMERIC = new RegExp(n, "g");
|
|
744
|
+
var a = RegExp("^" + r + "$"), o = RegExp("^" + t + "$"), s = /* @__PURE__ */ RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
745
|
+
e.testKanji = function(e) {
|
|
746
|
+
return a.test(e);
|
|
747
|
+
}, e.testNumeric = function(e) {
|
|
748
|
+
return o.test(e);
|
|
749
|
+
}, e.testAlphanumeric = function(e) {
|
|
750
|
+
return s.test(e);
|
|
751
|
+
};
|
|
752
|
+
})), R = /* @__PURE__ */ e(((e) => {
|
|
753
|
+
var t = I(), n = L();
|
|
754
|
+
e.NUMERIC = {
|
|
755
|
+
id: "Numeric",
|
|
756
|
+
bit: 1,
|
|
757
|
+
ccBits: [
|
|
758
|
+
10,
|
|
759
|
+
12,
|
|
760
|
+
14
|
|
761
|
+
]
|
|
762
|
+
}, e.ALPHANUMERIC = {
|
|
763
|
+
id: "Alphanumeric",
|
|
764
|
+
bit: 2,
|
|
765
|
+
ccBits: [
|
|
766
|
+
9,
|
|
767
|
+
11,
|
|
768
|
+
13
|
|
769
|
+
]
|
|
770
|
+
}, e.BYTE = {
|
|
771
|
+
id: "Byte",
|
|
772
|
+
bit: 4,
|
|
773
|
+
ccBits: [
|
|
774
|
+
8,
|
|
775
|
+
16,
|
|
776
|
+
16
|
|
777
|
+
]
|
|
778
|
+
}, e.KANJI = {
|
|
779
|
+
id: "Kanji",
|
|
780
|
+
bit: 8,
|
|
781
|
+
ccBits: [
|
|
782
|
+
8,
|
|
783
|
+
10,
|
|
784
|
+
12
|
|
785
|
+
]
|
|
786
|
+
}, e.MIXED = { bit: -1 }, e.getCharCountIndicator = function(e, n) {
|
|
787
|
+
if (!e.ccBits) throw Error("Invalid mode: " + e);
|
|
788
|
+
if (!t.isValid(n)) throw Error("Invalid version: " + n);
|
|
789
|
+
return n >= 1 && n < 10 ? e.ccBits[0] : n < 27 ? e.ccBits[1] : e.ccBits[2];
|
|
790
|
+
}, e.getBestModeForData = function(t) {
|
|
791
|
+
return n.testNumeric(t) ? e.NUMERIC : n.testAlphanumeric(t) ? e.ALPHANUMERIC : n.testKanji(t) ? e.KANJI : e.BYTE;
|
|
792
|
+
}, e.toString = function(e) {
|
|
793
|
+
if (e && e.id) return e.id;
|
|
794
|
+
throw Error("Invalid mode");
|
|
795
|
+
}, e.isValid = function(e) {
|
|
796
|
+
return e && e.bit && e.ccBits;
|
|
797
|
+
};
|
|
798
|
+
function r(t) {
|
|
799
|
+
if (typeof t != "string") throw Error("Param is not a string");
|
|
800
|
+
switch (t.toLowerCase()) {
|
|
801
|
+
case "numeric": return e.NUMERIC;
|
|
802
|
+
case "alphanumeric": return e.ALPHANUMERIC;
|
|
803
|
+
case "kanji": return e.KANJI;
|
|
804
|
+
case "byte": return e.BYTE;
|
|
805
|
+
default: throw Error("Unknown mode: " + t);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
e.from = function(t, n) {
|
|
809
|
+
if (e.isValid(t)) return t;
|
|
810
|
+
try {
|
|
811
|
+
return r(t);
|
|
812
|
+
} catch {
|
|
813
|
+
return n;
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
})), je = /* @__PURE__ */ e(((e) => {
|
|
817
|
+
var t = N(), n = F(), r = P(), i = R(), a = I(), o = 7973, s = t.getBCHDigit(o);
|
|
818
|
+
function c(t, n, r) {
|
|
819
|
+
for (let i = 1; i <= 40; i++) if (n <= e.getCapacity(i, r, t)) return i;
|
|
820
|
+
}
|
|
821
|
+
function l(e, t) {
|
|
822
|
+
return i.getCharCountIndicator(e, t) + 4;
|
|
823
|
+
}
|
|
824
|
+
function u(e, t) {
|
|
825
|
+
let n = 0;
|
|
826
|
+
return e.forEach(function(e) {
|
|
827
|
+
let r = l(e.mode, t);
|
|
828
|
+
n += r + e.getBitsLength();
|
|
829
|
+
}), n;
|
|
830
|
+
}
|
|
831
|
+
function d(t, n) {
|
|
832
|
+
for (let r = 1; r <= 40; r++) if (u(t, r) <= e.getCapacity(r, n, i.MIXED)) return r;
|
|
833
|
+
}
|
|
834
|
+
e.from = function(e, t) {
|
|
835
|
+
return a.isValid(e) ? parseInt(e, 10) : t;
|
|
836
|
+
}, e.getCapacity = function(e, r, o) {
|
|
837
|
+
if (!a.isValid(e)) throw Error("Invalid QR Code version");
|
|
838
|
+
o === void 0 && (o = i.BYTE);
|
|
839
|
+
let s = (t.getSymbolTotalCodewords(e) - n.getTotalCodewordsCount(e, r)) * 8;
|
|
840
|
+
if (o === i.MIXED) return s;
|
|
841
|
+
let c = s - l(o, e);
|
|
842
|
+
switch (o) {
|
|
843
|
+
case i.NUMERIC: return Math.floor(c / 10 * 3);
|
|
844
|
+
case i.ALPHANUMERIC: return Math.floor(c / 11 * 2);
|
|
845
|
+
case i.KANJI: return Math.floor(c / 13);
|
|
846
|
+
case i.BYTE:
|
|
847
|
+
default: return Math.floor(c / 8);
|
|
848
|
+
}
|
|
849
|
+
}, e.getBestVersionForData = function(e, t) {
|
|
850
|
+
let n, i = r.from(t, r.M);
|
|
851
|
+
if (Array.isArray(e)) {
|
|
852
|
+
if (e.length > 1) return d(e, i);
|
|
853
|
+
if (e.length === 0) return 1;
|
|
854
|
+
n = e[0];
|
|
855
|
+
} else n = e;
|
|
856
|
+
return c(n.mode, n.getLength(), i);
|
|
857
|
+
}, e.getEncodedBits = function(e) {
|
|
858
|
+
if (!a.isValid(e) || e < 7) throw Error("Invalid QR Code version");
|
|
859
|
+
let n = e << 12;
|
|
860
|
+
for (; t.getBCHDigit(n) - s >= 0;) n ^= o << t.getBCHDigit(n) - s;
|
|
861
|
+
return e << 12 | n;
|
|
862
|
+
};
|
|
863
|
+
})), Me = /* @__PURE__ */ e(((e) => {
|
|
864
|
+
var t = N(), n = 1335, r = 21522, i = t.getBCHDigit(n);
|
|
865
|
+
e.getEncodedBits = function(e, a) {
|
|
866
|
+
let o = e.bit << 3 | a, s = o << 10;
|
|
867
|
+
for (; t.getBCHDigit(s) - i >= 0;) s ^= n << t.getBCHDigit(s) - i;
|
|
868
|
+
return (o << 10 | s) ^ r;
|
|
869
|
+
};
|
|
870
|
+
})), Ne = /* @__PURE__ */ e(((e, t) => {
|
|
871
|
+
var n = R();
|
|
872
|
+
function r(e) {
|
|
873
|
+
this.mode = n.NUMERIC, this.data = e.toString();
|
|
874
|
+
}
|
|
875
|
+
r.getBitsLength = function(e) {
|
|
876
|
+
return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
|
|
877
|
+
}, r.prototype.getLength = function() {
|
|
878
|
+
return this.data.length;
|
|
879
|
+
}, r.prototype.getBitsLength = function() {
|
|
880
|
+
return r.getBitsLength(this.data.length);
|
|
881
|
+
}, r.prototype.write = function(e) {
|
|
882
|
+
let t, n, r;
|
|
883
|
+
for (t = 0; t + 3 <= this.data.length; t += 3) n = this.data.substr(t, 3), r = parseInt(n, 10), e.put(r, 10);
|
|
884
|
+
let i = this.data.length - t;
|
|
885
|
+
i > 0 && (n = this.data.substr(t), r = parseInt(n, 10), e.put(r, i * 3 + 1));
|
|
886
|
+
}, t.exports = r;
|
|
887
|
+
})), Pe = /* @__PURE__ */ e(((e, t) => {
|
|
888
|
+
var n = R(), r = /* @__PURE__ */ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
|
|
889
|
+
function i(e) {
|
|
890
|
+
this.mode = n.ALPHANUMERIC, this.data = e;
|
|
891
|
+
}
|
|
892
|
+
i.getBitsLength = function(e) {
|
|
893
|
+
return 11 * Math.floor(e / 2) + e % 2 * 6;
|
|
894
|
+
}, i.prototype.getLength = function() {
|
|
895
|
+
return this.data.length;
|
|
896
|
+
}, i.prototype.getBitsLength = function() {
|
|
897
|
+
return i.getBitsLength(this.data.length);
|
|
898
|
+
}, i.prototype.write = function(e) {
|
|
899
|
+
let t;
|
|
900
|
+
for (t = 0; t + 2 <= this.data.length; t += 2) {
|
|
901
|
+
let n = r.indexOf(this.data[t]) * 45;
|
|
902
|
+
n += r.indexOf(this.data[t + 1]), e.put(n, 11);
|
|
903
|
+
}
|
|
904
|
+
this.data.length % 2 && e.put(r.indexOf(this.data[t]), 6);
|
|
905
|
+
}, t.exports = i;
|
|
906
|
+
})), Fe = /* @__PURE__ */ e(((e, t) => {
|
|
907
|
+
var n = R();
|
|
908
|
+
function r(e) {
|
|
909
|
+
this.mode = n.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
|
|
910
|
+
}
|
|
911
|
+
r.getBitsLength = function(e) {
|
|
912
|
+
return e * 8;
|
|
913
|
+
}, r.prototype.getLength = function() {
|
|
914
|
+
return this.data.length;
|
|
915
|
+
}, r.prototype.getBitsLength = function() {
|
|
916
|
+
return r.getBitsLength(this.data.length);
|
|
917
|
+
}, r.prototype.write = function(e) {
|
|
918
|
+
for (let t = 0, n = this.data.length; t < n; t++) e.put(this.data[t], 8);
|
|
919
|
+
}, t.exports = r;
|
|
920
|
+
})), Ie = /* @__PURE__ */ e(((e, t) => {
|
|
921
|
+
var n = R(), r = N();
|
|
922
|
+
function i(e) {
|
|
923
|
+
this.mode = n.KANJI, this.data = e;
|
|
924
|
+
}
|
|
925
|
+
i.getBitsLength = function(e) {
|
|
926
|
+
return e * 13;
|
|
927
|
+
}, i.prototype.getLength = function() {
|
|
928
|
+
return this.data.length;
|
|
929
|
+
}, i.prototype.getBitsLength = function() {
|
|
930
|
+
return i.getBitsLength(this.data.length);
|
|
931
|
+
}, i.prototype.write = function(e) {
|
|
932
|
+
let t;
|
|
933
|
+
for (t = 0; t < this.data.length; t++) {
|
|
934
|
+
let n = r.toSJIS(this.data[t]);
|
|
935
|
+
if (n >= 33088 && n <= 40956) n -= 33088;
|
|
936
|
+
else if (n >= 57408 && n <= 60351) n -= 49472;
|
|
937
|
+
else throw Error("Invalid SJIS character: " + this.data[t] + "\nMake sure your charset is UTF-8");
|
|
938
|
+
n = (n >>> 8 & 255) * 192 + (n & 255), e.put(n, 13);
|
|
939
|
+
}
|
|
940
|
+
}, t.exports = i;
|
|
941
|
+
})), Le = /* @__PURE__ */ e(((e, t) => {
|
|
942
|
+
var n = {
|
|
943
|
+
single_source_shortest_paths: function(e, t, r) {
|
|
944
|
+
var i = {}, a = {};
|
|
945
|
+
a[t] = 0;
|
|
946
|
+
var o = n.PriorityQueue.make();
|
|
947
|
+
o.push(t, 0);
|
|
948
|
+
for (var s, c, l, u, d, f, p, m, h; !o.empty();) for (l in s = o.pop(), c = s.value, u = s.cost, d = e[c] || {}, d) d.hasOwnProperty(l) && (f = d[l], p = u + f, m = a[l], h = a[l] === void 0, (h || m > p) && (a[l] = p, o.push(l, p), i[l] = c));
|
|
949
|
+
if (r !== void 0 && a[r] === void 0) {
|
|
950
|
+
var g = [
|
|
951
|
+
"Could not find a path from ",
|
|
952
|
+
t,
|
|
953
|
+
" to ",
|
|
954
|
+
r,
|
|
955
|
+
"."
|
|
956
|
+
].join("");
|
|
957
|
+
throw Error(g);
|
|
958
|
+
}
|
|
959
|
+
return i;
|
|
960
|
+
},
|
|
961
|
+
extract_shortest_path_from_predecessor_list: function(e, t) {
|
|
962
|
+
for (var n = [], r = t; r;) n.push(r), e[r], r = e[r];
|
|
963
|
+
return n.reverse(), n;
|
|
964
|
+
},
|
|
965
|
+
find_path: function(e, t, r) {
|
|
966
|
+
var i = n.single_source_shortest_paths(e, t, r);
|
|
967
|
+
return n.extract_shortest_path_from_predecessor_list(i, r);
|
|
968
|
+
},
|
|
969
|
+
PriorityQueue: {
|
|
970
|
+
make: function(e) {
|
|
971
|
+
var t = n.PriorityQueue, r = {}, i;
|
|
972
|
+
for (i in e ||= {}, t) t.hasOwnProperty(i) && (r[i] = t[i]);
|
|
973
|
+
return r.queue = [], r.sorter = e.sorter || t.default_sorter, r;
|
|
974
|
+
},
|
|
975
|
+
default_sorter: function(e, t) {
|
|
976
|
+
return e.cost - t.cost;
|
|
977
|
+
},
|
|
978
|
+
push: function(e, t) {
|
|
979
|
+
var n = {
|
|
980
|
+
value: e,
|
|
981
|
+
cost: t
|
|
982
|
+
};
|
|
983
|
+
this.queue.push(n), this.queue.sort(this.sorter);
|
|
984
|
+
},
|
|
985
|
+
pop: function() {
|
|
986
|
+
return this.queue.shift();
|
|
987
|
+
},
|
|
988
|
+
empty: function() {
|
|
989
|
+
return this.queue.length === 0;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
t !== void 0 && (t.exports = n);
|
|
994
|
+
})), Re = /* @__PURE__ */ e(((e) => {
|
|
995
|
+
var t = R(), n = Ne(), r = Pe(), i = Fe(), a = Ie(), o = L(), s = N(), c = Le();
|
|
996
|
+
function l(e) {
|
|
997
|
+
return unescape(encodeURIComponent(e)).length;
|
|
998
|
+
}
|
|
999
|
+
function u(e, t, n) {
|
|
1000
|
+
let r = [], i;
|
|
1001
|
+
for (; (i = e.exec(n)) !== null;) r.push({
|
|
1002
|
+
data: i[0],
|
|
1003
|
+
index: i.index,
|
|
1004
|
+
mode: t,
|
|
1005
|
+
length: i[0].length
|
|
1006
|
+
});
|
|
1007
|
+
return r;
|
|
1008
|
+
}
|
|
1009
|
+
function d(e) {
|
|
1010
|
+
let n = u(o.NUMERIC, t.NUMERIC, e), r = u(o.ALPHANUMERIC, t.ALPHANUMERIC, e), i, a;
|
|
1011
|
+
return s.isKanjiModeEnabled() ? (i = u(o.BYTE, t.BYTE, e), a = u(o.KANJI, t.KANJI, e)) : (i = u(o.BYTE_KANJI, t.BYTE, e), a = []), n.concat(r, i, a).sort(function(e, t) {
|
|
1012
|
+
return e.index - t.index;
|
|
1013
|
+
}).map(function(e) {
|
|
1014
|
+
return {
|
|
1015
|
+
data: e.data,
|
|
1016
|
+
mode: e.mode,
|
|
1017
|
+
length: e.length
|
|
1018
|
+
};
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
function f(e, o) {
|
|
1022
|
+
switch (o) {
|
|
1023
|
+
case t.NUMERIC: return n.getBitsLength(e);
|
|
1024
|
+
case t.ALPHANUMERIC: return r.getBitsLength(e);
|
|
1025
|
+
case t.KANJI: return a.getBitsLength(e);
|
|
1026
|
+
case t.BYTE: return i.getBitsLength(e);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
function p(e) {
|
|
1030
|
+
return e.reduce(function(e, t) {
|
|
1031
|
+
let n = e.length - 1 >= 0 ? e[e.length - 1] : null;
|
|
1032
|
+
return n && n.mode === t.mode ? (e[e.length - 1].data += t.data, e) : (e.push(t), e);
|
|
1033
|
+
}, []);
|
|
1034
|
+
}
|
|
1035
|
+
function m(e) {
|
|
1036
|
+
let n = [];
|
|
1037
|
+
for (let r = 0; r < e.length; r++) {
|
|
1038
|
+
let i = e[r];
|
|
1039
|
+
switch (i.mode) {
|
|
1040
|
+
case t.NUMERIC:
|
|
1041
|
+
n.push([
|
|
1042
|
+
i,
|
|
1043
|
+
{
|
|
1044
|
+
data: i.data,
|
|
1045
|
+
mode: t.ALPHANUMERIC,
|
|
1046
|
+
length: i.length
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
data: i.data,
|
|
1050
|
+
mode: t.BYTE,
|
|
1051
|
+
length: i.length
|
|
1052
|
+
}
|
|
1053
|
+
]);
|
|
1054
|
+
break;
|
|
1055
|
+
case t.ALPHANUMERIC:
|
|
1056
|
+
n.push([i, {
|
|
1057
|
+
data: i.data,
|
|
1058
|
+
mode: t.BYTE,
|
|
1059
|
+
length: i.length
|
|
1060
|
+
}]);
|
|
1061
|
+
break;
|
|
1062
|
+
case t.KANJI:
|
|
1063
|
+
n.push([i, {
|
|
1064
|
+
data: i.data,
|
|
1065
|
+
mode: t.BYTE,
|
|
1066
|
+
length: l(i.data)
|
|
1067
|
+
}]);
|
|
1068
|
+
break;
|
|
1069
|
+
case t.BYTE: n.push([{
|
|
1070
|
+
data: i.data,
|
|
1071
|
+
mode: t.BYTE,
|
|
1072
|
+
length: l(i.data)
|
|
1073
|
+
}]);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
return n;
|
|
1077
|
+
}
|
|
1078
|
+
function h(e, n) {
|
|
1079
|
+
let r = {}, i = { start: {} }, a = ["start"];
|
|
1080
|
+
for (let o = 0; o < e.length; o++) {
|
|
1081
|
+
let s = e[o], c = [];
|
|
1082
|
+
for (let e = 0; e < s.length; e++) {
|
|
1083
|
+
let l = s[e], u = "" + o + e;
|
|
1084
|
+
c.push(u), r[u] = {
|
|
1085
|
+
node: l,
|
|
1086
|
+
lastCount: 0
|
|
1087
|
+
}, i[u] = {};
|
|
1088
|
+
for (let e = 0; e < a.length; e++) {
|
|
1089
|
+
let o = a[e];
|
|
1090
|
+
r[o] && r[o].node.mode === l.mode ? (i[o][u] = f(r[o].lastCount + l.length, l.mode) - f(r[o].lastCount, l.mode), r[o].lastCount += l.length) : (r[o] && (r[o].lastCount = l.length), i[o][u] = f(l.length, l.mode) + 4 + t.getCharCountIndicator(l.mode, n));
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
a = c;
|
|
1094
|
+
}
|
|
1095
|
+
for (let e = 0; e < a.length; e++) i[a[e]].end = 0;
|
|
1096
|
+
return {
|
|
1097
|
+
map: i,
|
|
1098
|
+
table: r
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
function g(e, o) {
|
|
1102
|
+
let c, l = t.getBestModeForData(e);
|
|
1103
|
+
if (c = t.from(o, l), c !== t.BYTE && c.bit < l.bit) throw Error("\"" + e + "\" cannot be encoded with mode " + t.toString(c) + ".\n Suggested mode is: " + t.toString(l));
|
|
1104
|
+
switch (c === t.KANJI && !s.isKanjiModeEnabled() && (c = t.BYTE), c) {
|
|
1105
|
+
case t.NUMERIC: return new n(e);
|
|
1106
|
+
case t.ALPHANUMERIC: return new r(e);
|
|
1107
|
+
case t.KANJI: return new a(e);
|
|
1108
|
+
case t.BYTE: return new i(e);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
e.fromArray = function(e) {
|
|
1112
|
+
return e.reduce(function(e, t) {
|
|
1113
|
+
return typeof t == "string" ? e.push(g(t, null)) : t.data && e.push(g(t.data, t.mode)), e;
|
|
1114
|
+
}, []);
|
|
1115
|
+
}, e.fromString = function(t, n) {
|
|
1116
|
+
let r = h(m(d(t, s.isKanjiModeEnabled())), n), i = c.find_path(r.map, "start", "end"), a = [];
|
|
1117
|
+
for (let e = 1; e < i.length - 1; e++) a.push(r.table[i[e]].node);
|
|
1118
|
+
return e.fromArray(p(a));
|
|
1119
|
+
}, e.rawSplit = function(t) {
|
|
1120
|
+
return e.fromArray(d(t, s.isKanjiModeEnabled()));
|
|
1121
|
+
};
|
|
1122
|
+
})), ze = /* @__PURE__ */ e(((e) => {
|
|
1123
|
+
var t = N(), n = P(), r = Ce(), i = we(), a = Te(), o = Ee(), s = De(), c = F(), l = Ae(), u = je(), d = Me(), f = R(), p = Re();
|
|
1124
|
+
function m(e, t) {
|
|
1125
|
+
let n = e.size, r = o.getPositions(t);
|
|
1126
|
+
for (let t = 0; t < r.length; t++) {
|
|
1127
|
+
let i = r[t][0], a = r[t][1];
|
|
1128
|
+
for (let t = -1; t <= 7; t++) if (!(i + t <= -1 || n <= i + t)) for (let r = -1; r <= 7; r++) a + r <= -1 || n <= a + r || (t >= 0 && t <= 6 && (r === 0 || r === 6) || r >= 0 && r <= 6 && (t === 0 || t === 6) || t >= 2 && t <= 4 && r >= 2 && r <= 4 ? e.set(i + t, a + r, !0, !0) : e.set(i + t, a + r, !1, !0));
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
function h(e) {
|
|
1132
|
+
let t = e.size;
|
|
1133
|
+
for (let n = 8; n < t - 8; n++) {
|
|
1134
|
+
let t = n % 2 == 0;
|
|
1135
|
+
e.set(n, 6, t, !0), e.set(6, n, t, !0);
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
function g(e, t) {
|
|
1139
|
+
let n = a.getPositions(t);
|
|
1140
|
+
for (let t = 0; t < n.length; t++) {
|
|
1141
|
+
let r = n[t][0], i = n[t][1];
|
|
1142
|
+
for (let t = -2; t <= 2; t++) for (let n = -2; n <= 2; n++) t === -2 || t === 2 || n === -2 || n === 2 || t === 0 && n === 0 ? e.set(r + t, i + n, !0, !0) : e.set(r + t, i + n, !1, !0);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
function _(e, t) {
|
|
1146
|
+
let n = e.size, r = u.getEncodedBits(t), i, a, o;
|
|
1147
|
+
for (let t = 0; t < 18; t++) i = Math.floor(t / 3), a = t % 3 + n - 8 - 3, o = (r >> t & 1) == 1, e.set(i, a, o, !0), e.set(a, i, o, !0);
|
|
1148
|
+
}
|
|
1149
|
+
function v(e, t, n) {
|
|
1150
|
+
let r = e.size, i = d.getEncodedBits(t, n), a, o;
|
|
1151
|
+
for (a = 0; a < 15; a++) o = (i >> a & 1) == 1, a < 6 ? e.set(a, 8, o, !0) : a < 8 ? e.set(a + 1, 8, o, !0) : e.set(r - 15 + a, 8, o, !0), a < 8 ? e.set(8, r - a - 1, o, !0) : a < 9 ? e.set(8, 15 - a - 1 + 1, o, !0) : e.set(8, 15 - a - 1, o, !0);
|
|
1152
|
+
e.set(r - 8, 8, 1, !0);
|
|
1153
|
+
}
|
|
1154
|
+
function y(e, t) {
|
|
1155
|
+
let n = e.size, r = -1, i = n - 1, a = 7, o = 0;
|
|
1156
|
+
for (let s = n - 1; s > 0; s -= 2) for (s === 6 && s--;;) {
|
|
1157
|
+
for (let n = 0; n < 2; n++) if (!e.isReserved(i, s - n)) {
|
|
1158
|
+
let r = !1;
|
|
1159
|
+
o < t.length && (r = (t[o] >>> a & 1) == 1), e.set(i, s - n, r), a--, a === -1 && (o++, a = 7);
|
|
1160
|
+
}
|
|
1161
|
+
if (i += r, i < 0 || n <= i) {
|
|
1162
|
+
i -= r, r = -r;
|
|
1163
|
+
break;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
function b(e, n, i) {
|
|
1168
|
+
let a = new r();
|
|
1169
|
+
i.forEach(function(t) {
|
|
1170
|
+
a.put(t.mode.bit, 4), a.put(t.getLength(), f.getCharCountIndicator(t.mode, e)), t.write(a);
|
|
1171
|
+
});
|
|
1172
|
+
let o = (t.getSymbolTotalCodewords(e) - c.getTotalCodewordsCount(e, n)) * 8;
|
|
1173
|
+
for (a.getLengthInBits() + 4 <= o && a.put(0, 4); a.getLengthInBits() % 8 != 0;) a.putBit(0);
|
|
1174
|
+
let s = (o - a.getLengthInBits()) / 8;
|
|
1175
|
+
for (let e = 0; e < s; e++) a.put(e % 2 ? 17 : 236, 8);
|
|
1176
|
+
return x(a, e, n);
|
|
1177
|
+
}
|
|
1178
|
+
function x(e, n, r) {
|
|
1179
|
+
let i = t.getSymbolTotalCodewords(n), a = i - c.getTotalCodewordsCount(n, r), o = c.getBlocksCount(n, r), s = o - i % o, u = Math.floor(i / o), d = Math.floor(a / o), f = d + 1, p = u - d, m = new l(p), h = 0, g = Array(o), _ = Array(o), v = 0, y = new Uint8Array(e.buffer);
|
|
1180
|
+
for (let e = 0; e < o; e++) {
|
|
1181
|
+
let t = e < s ? d : f;
|
|
1182
|
+
g[e] = y.slice(h, h + t), _[e] = m.encode(g[e]), h += t, v = Math.max(v, t);
|
|
1183
|
+
}
|
|
1184
|
+
let b = new Uint8Array(i), x = 0, S, C;
|
|
1185
|
+
for (S = 0; S < v; S++) for (C = 0; C < o; C++) S < g[C].length && (b[x++] = g[C][S]);
|
|
1186
|
+
for (S = 0; S < p; S++) for (C = 0; C < o; C++) b[x++] = _[C][S];
|
|
1187
|
+
return b;
|
|
1188
|
+
}
|
|
1189
|
+
function S(e, n, r, a) {
|
|
1190
|
+
let o;
|
|
1191
|
+
if (Array.isArray(e)) o = p.fromArray(e);
|
|
1192
|
+
else if (typeof e == "string") {
|
|
1193
|
+
let t = n;
|
|
1194
|
+
if (!t) {
|
|
1195
|
+
let n = p.rawSplit(e);
|
|
1196
|
+
t = u.getBestVersionForData(n, r);
|
|
1197
|
+
}
|
|
1198
|
+
o = p.fromString(e, t || 40);
|
|
1199
|
+
} else throw Error("Invalid data");
|
|
1200
|
+
let c = u.getBestVersionForData(o, r);
|
|
1201
|
+
if (!c) throw Error("The amount of data is too big to be stored in a QR Code");
|
|
1202
|
+
if (!n) n = c;
|
|
1203
|
+
else if (n < c) throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: " + c + ".\n");
|
|
1204
|
+
let l = b(n, r, o), d = new i(t.getSymbolSize(n));
|
|
1205
|
+
return m(d, n), h(d), g(d, n), v(d, r, 0), n >= 7 && _(d, n), y(d, l), isNaN(a) && (a = s.getBestMask(d, v.bind(null, d, r))), s.applyMask(a, d), v(d, r, a), {
|
|
1206
|
+
modules: d,
|
|
1207
|
+
version: n,
|
|
1208
|
+
errorCorrectionLevel: r,
|
|
1209
|
+
maskPattern: a,
|
|
1210
|
+
segments: o
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
e.create = function(e, r) {
|
|
1214
|
+
if (e === void 0 || e === "") throw Error("No input text");
|
|
1215
|
+
let i = n.M, a, o;
|
|
1216
|
+
return r !== void 0 && (i = n.from(r.errorCorrectionLevel, n.M), a = u.from(r.version), o = s.from(r.maskPattern), r.toSJISFunc && t.setToSJISFunction(r.toSJISFunc)), S(e, a, i, o);
|
|
1217
|
+
};
|
|
1218
|
+
})), z = /* @__PURE__ */ e(((e) => {
|
|
1219
|
+
function t(e) {
|
|
1220
|
+
if (typeof e == "number" && (e = e.toString()), typeof e != "string") throw Error("Color should be defined as hex string");
|
|
1221
|
+
let t = e.slice().replace("#", "").split("");
|
|
1222
|
+
if (t.length < 3 || t.length === 5 || t.length > 8) throw Error("Invalid hex color: " + e);
|
|
1223
|
+
(t.length === 3 || t.length === 4) && (t = Array.prototype.concat.apply([], t.map(function(e) {
|
|
1224
|
+
return [e, e];
|
|
1225
|
+
}))), t.length === 6 && t.push("F", "F");
|
|
1226
|
+
let n = parseInt(t.join(""), 16);
|
|
1227
|
+
return {
|
|
1228
|
+
r: n >> 24 & 255,
|
|
1229
|
+
g: n >> 16 & 255,
|
|
1230
|
+
b: n >> 8 & 255,
|
|
1231
|
+
a: n & 255,
|
|
1232
|
+
hex: "#" + t.slice(0, 6).join("")
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
e.getOptions = function(e) {
|
|
1236
|
+
e ||= {}, e.color ||= {};
|
|
1237
|
+
let n = e.margin === void 0 || e.margin === null || e.margin < 0 ? 4 : e.margin, r = e.width && e.width >= 21 ? e.width : void 0, i = e.scale || 4;
|
|
1238
|
+
return {
|
|
1239
|
+
width: r,
|
|
1240
|
+
scale: r ? 4 : i,
|
|
1241
|
+
margin: n,
|
|
1242
|
+
color: {
|
|
1243
|
+
dark: t(e.color.dark || "#000000ff"),
|
|
1244
|
+
light: t(e.color.light || "#ffffffff")
|
|
1245
|
+
},
|
|
1246
|
+
type: e.type,
|
|
1247
|
+
rendererOpts: e.rendererOpts || {}
|
|
1248
|
+
};
|
|
1249
|
+
}, e.getScale = function(e, t) {
|
|
1250
|
+
return t.width && t.width >= e + t.margin * 2 ? t.width / (e + t.margin * 2) : t.scale;
|
|
1251
|
+
}, e.getImageWidth = function(t, n) {
|
|
1252
|
+
let r = e.getScale(t, n);
|
|
1253
|
+
return Math.floor((t + n.margin * 2) * r);
|
|
1254
|
+
}, e.qrToImageData = function(t, n, r) {
|
|
1255
|
+
let i = n.modules.size, a = n.modules.data, o = e.getScale(i, r), s = Math.floor((i + r.margin * 2) * o), c = r.margin * o, l = [r.color.light, r.color.dark];
|
|
1256
|
+
for (let e = 0; e < s; e++) for (let n = 0; n < s; n++) {
|
|
1257
|
+
let u = (e * s + n) * 4, d = r.color.light;
|
|
1258
|
+
if (e >= c && n >= c && e < s - c && n < s - c) {
|
|
1259
|
+
let t = Math.floor((e - c) / o), r = Math.floor((n - c) / o);
|
|
1260
|
+
d = l[a[t * i + r] ? 1 : 0];
|
|
1261
|
+
}
|
|
1262
|
+
t[u++] = d.r, t[u++] = d.g, t[u++] = d.b, t[u] = d.a;
|
|
1263
|
+
}
|
|
1264
|
+
};
|
|
1265
|
+
})), Be = /* @__PURE__ */ e(((e) => {
|
|
1266
|
+
var t = z();
|
|
1267
|
+
function n(e, t, n) {
|
|
1268
|
+
e.clearRect(0, 0, t.width, t.height), t.style ||= {}, t.height = n, t.width = n, t.style.height = n + "px", t.style.width = n + "px";
|
|
1269
|
+
}
|
|
1270
|
+
function r() {
|
|
1271
|
+
try {
|
|
1272
|
+
return document.createElement("canvas");
|
|
1273
|
+
} catch {
|
|
1274
|
+
throw Error("You need to specify a canvas element");
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
e.render = function(e, i, a) {
|
|
1278
|
+
let o = a, s = i;
|
|
1279
|
+
o === void 0 && (!i || !i.getContext) && (o = i, i = void 0), i || (s = r()), o = t.getOptions(o);
|
|
1280
|
+
let c = t.getImageWidth(e.modules.size, o), l = s.getContext("2d"), u = l.createImageData(c, c);
|
|
1281
|
+
return t.qrToImageData(u.data, e, o), n(l, s, c), l.putImageData(u, 0, 0), s;
|
|
1282
|
+
}, e.renderToDataURL = function(t, n, r) {
|
|
1283
|
+
let i = r;
|
|
1284
|
+
i === void 0 && (!n || !n.getContext) && (i = n, n = void 0), i ||= {};
|
|
1285
|
+
let a = e.render(t, n, i), o = i.type || "image/png", s = i.rendererOpts || {};
|
|
1286
|
+
return a.toDataURL(o, s.quality);
|
|
1287
|
+
};
|
|
1288
|
+
})), Ve = /* @__PURE__ */ e(((e) => {
|
|
1289
|
+
var t = z();
|
|
1290
|
+
function n(e, t) {
|
|
1291
|
+
let n = e.a / 255, r = t + "=\"" + e.hex + "\"";
|
|
1292
|
+
return n < 1 ? r + " " + t + "-opacity=\"" + n.toFixed(2).slice(1) + "\"" : r;
|
|
1293
|
+
}
|
|
1294
|
+
function r(e, t, n) {
|
|
1295
|
+
let r = e + t;
|
|
1296
|
+
return n !== void 0 && (r += " " + n), r;
|
|
1297
|
+
}
|
|
1298
|
+
function i(e, t, n) {
|
|
1299
|
+
let i = "", a = 0, o = !1, s = 0;
|
|
1300
|
+
for (let c = 0; c < e.length; c++) {
|
|
1301
|
+
let l = Math.floor(c % t), u = Math.floor(c / t);
|
|
1302
|
+
!l && !o && (o = !0), e[c] ? (s++, c > 0 && l > 0 && e[c - 1] || (i += o ? r("M", l + n, .5 + u + n) : r("m", a, 0), a = 0, o = !1), l + 1 < t && e[c + 1] || (i += r("h", s), s = 0)) : a++;
|
|
1303
|
+
}
|
|
1304
|
+
return i;
|
|
1305
|
+
}
|
|
1306
|
+
e.render = function(e, r, a) {
|
|
1307
|
+
let o = t.getOptions(r), s = e.modules.size, c = e.modules.data, l = s + o.margin * 2, u = o.color.light.a ? "<path " + n(o.color.light, "fill") + " d=\"M0 0h" + l + "v" + l + "H0z\"/>" : "", d = "<path " + n(o.color.dark, "stroke") + " d=\"" + i(c, s, o.margin) + "\"/>", f = "viewBox=\"0 0 " + l + " " + l + "\"", p = "<svg xmlns=\"http://www.w3.org/2000/svg\" " + (o.width ? "width=\"" + o.width + "\" height=\"" + o.width + "\" " : "") + f + " shape-rendering=\"crispEdges\">" + u + d + "</svg>\n";
|
|
1308
|
+
return typeof a == "function" && a(null, p), p;
|
|
1309
|
+
};
|
|
1310
|
+
})), He = (/* @__PURE__ */ e(((e) => {
|
|
1311
|
+
var t = Se(), n = ze(), r = Be(), i = Ve();
|
|
1312
|
+
function a(e, r, i, a, o) {
|
|
1313
|
+
let s = [].slice.call(arguments, 1), c = s.length, l = typeof s[c - 1] == "function";
|
|
1314
|
+
if (!l && !t()) throw Error("Callback required as last argument");
|
|
1315
|
+
if (l) {
|
|
1316
|
+
if (c < 2) throw Error("Too few arguments provided");
|
|
1317
|
+
c === 2 ? (o = i, i = r, r = a = void 0) : c === 3 && (r.getContext && o === void 0 ? (o = a, a = void 0) : (o = a, a = i, i = r, r = void 0));
|
|
1318
|
+
} else {
|
|
1319
|
+
if (c < 1) throw Error("Too few arguments provided");
|
|
1320
|
+
return c === 1 ? (i = r, r = a = void 0) : c === 2 && !r.getContext && (a = i, i = r, r = void 0), new Promise(function(t, o) {
|
|
1321
|
+
try {
|
|
1322
|
+
t(e(n.create(i, a), r, a));
|
|
1323
|
+
} catch (e) {
|
|
1324
|
+
o(e);
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
try {
|
|
1329
|
+
let t = n.create(i, a);
|
|
1330
|
+
o(null, e(t, r, a));
|
|
1331
|
+
} catch (e) {
|
|
1332
|
+
o(e);
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
e.create = n.create, e.toCanvas = a.bind(null, r.render), e.toDataURL = a.bind(null, r.renderToDataURL), e.toString = a.bind(null, function(e, t, n) {
|
|
1336
|
+
return i.render(e, n);
|
|
1337
|
+
});
|
|
1338
|
+
})))(), Ue = ({ value: e, size: t = 150, bgColor: n = "#ffffff", fgColor: r = "#000000" }) => {
|
|
1339
|
+
let [a, o] = u("");
|
|
1340
|
+
return i(() => {
|
|
1341
|
+
e && (0, He.toString)(e, {
|
|
1342
|
+
type: "svg",
|
|
1343
|
+
width: t,
|
|
1344
|
+
margin: 0,
|
|
1345
|
+
color: {
|
|
1346
|
+
dark: r,
|
|
1347
|
+
light: n
|
|
1348
|
+
}
|
|
1349
|
+
}).then(o).catch(() => o(""));
|
|
1350
|
+
}, [
|
|
1351
|
+
e,
|
|
1352
|
+
t,
|
|
1353
|
+
n,
|
|
1354
|
+
r
|
|
1355
|
+
]), a ? /* @__PURE__ */ d("div", {
|
|
1356
|
+
class: "IncodeRedirectQrCode",
|
|
1357
|
+
dangerouslySetInnerHTML: { __html: a }
|
|
1358
|
+
}) : null;
|
|
1359
|
+
}, We = ({ redirectUrl: e }) => {
|
|
1360
|
+
let { t: n } = t();
|
|
1361
|
+
return /* @__PURE__ */ d(r, { children: [/* @__PURE__ */ d("p", {
|
|
1362
|
+
class: "IncodeRedirectTabDescription",
|
|
1363
|
+
children: n("v2.redirectToMobile.qr.description")
|
|
1364
|
+
}), /* @__PURE__ */ d("div", {
|
|
1365
|
+
class: "IncodeRedirectQrWrapper",
|
|
1366
|
+
children: /* @__PURE__ */ d(Ue, {
|
|
1367
|
+
value: e,
|
|
1368
|
+
size: 186
|
|
1369
|
+
})
|
|
1370
|
+
})] });
|
|
1371
|
+
}, Ge = ({ formattedPhone: e, onResend: r, onChangePhone: i }) => {
|
|
1372
|
+
let { t: a } = t();
|
|
1373
|
+
return /* @__PURE__ */ d("div", {
|
|
1374
|
+
class: "IncodeRedirectLinkSent",
|
|
1375
|
+
children: [
|
|
1376
|
+
/* @__PURE__ */ d(w, { size: 32 }),
|
|
1377
|
+
/* @__PURE__ */ d(v, { size: 16 }),
|
|
1378
|
+
/* @__PURE__ */ d("h2", {
|
|
1379
|
+
class: "IncodeRedirectLinkSentTitle",
|
|
1380
|
+
children: a("redirect.linkSent")
|
|
1381
|
+
}),
|
|
1382
|
+
/* @__PURE__ */ d(v, { size: 12 }),
|
|
1383
|
+
/* @__PURE__ */ d("p", {
|
|
1384
|
+
class: "IncodeRedirectLinkSentPhone",
|
|
1385
|
+
children: a("redirect.linkSentTo", { phone: e })
|
|
1386
|
+
}),
|
|
1387
|
+
/* @__PURE__ */ d(v, { size: 32 }),
|
|
1388
|
+
/* @__PURE__ */ d("div", {
|
|
1389
|
+
class: "IncodeRedirectLinkSentActions",
|
|
1390
|
+
children: /* @__PURE__ */ d(n, {
|
|
1391
|
+
i18nKey: "redirect.didntReceiveLinkActions",
|
|
1392
|
+
defaultValue: "Didn't receive the link? <resend>Resend</resend> or <changePhone>Change phone number</changePhone>",
|
|
1393
|
+
components: {
|
|
1394
|
+
resend: /* @__PURE__ */ d(S, {
|
|
1395
|
+
variant: "link",
|
|
1396
|
+
onClick: r
|
|
1397
|
+
}),
|
|
1398
|
+
changePhone: /* @__PURE__ */ d(S, {
|
|
1399
|
+
variant: "link",
|
|
1400
|
+
onClick: i
|
|
1401
|
+
})
|
|
1402
|
+
}
|
|
1403
|
+
})
|
|
1404
|
+
})
|
|
1405
|
+
]
|
|
1406
|
+
});
|
|
1407
|
+
}, Ke = a(() => import("../phoneInput-C9T_8FJt.js").then((e) => ({ default: e.PhoneInput }))), qe = ({ countryCode: e, phonePrefix: n, error: i, isSending: a, isPhoneValid: o, onPhoneChange: s, onSendSms: c }) => {
|
|
1408
|
+
let { t: u } = t();
|
|
1409
|
+
return /* @__PURE__ */ d(r, { children: [/* @__PURE__ */ d(l, {
|
|
1410
|
+
fallback: /* @__PURE__ */ d(C, {}),
|
|
1411
|
+
children: /* @__PURE__ */ d(Ke, {
|
|
1412
|
+
countryCode: e,
|
|
1413
|
+
phonePrefix: n,
|
|
1414
|
+
phoneError: i,
|
|
1415
|
+
disabled: a,
|
|
1416
|
+
autoFocus: !0,
|
|
1417
|
+
onPhoneChange: s
|
|
1418
|
+
})
|
|
1419
|
+
}), /* @__PURE__ */ d(S, {
|
|
1420
|
+
onClick: c,
|
|
1421
|
+
disabled: !o || a,
|
|
1422
|
+
isLoading: a,
|
|
1423
|
+
class: "IncodeRedirectSmsSendButton",
|
|
1424
|
+
children: u("redirect.sendLinkViaSms")
|
|
1425
|
+
})] });
|
|
1426
|
+
}, Je = (e, t) => e.startsWith(t) ? `${t} ${e.slice(t.length).replace(/(\d{3})(?=\d)/g, "$1 ")}` : e, Ye = ({ phonePrefix: e, smsSent: n, error: i, manager: a, onResend: o }) => {
|
|
1427
|
+
let { t: c } = t(), [l, f] = u(e), [p, m] = u(!1), [h, g] = u(!1), _ = ee(e)?.code ?? "", v = Je(l, e), y = s((e, t) => {
|
|
1428
|
+
f(e), m(t);
|
|
1429
|
+
}, []), b = s(() => {
|
|
1430
|
+
g(!0), a.sendSms(l), g(!1);
|
|
1431
|
+
}, [a, l]), x = s(() => {
|
|
1432
|
+
b(), o();
|
|
1433
|
+
}, [b, o]), S = s(() => {
|
|
1434
|
+
f(e), m(!1), a.resetSms();
|
|
1435
|
+
}, [a, e]);
|
|
1436
|
+
return /* @__PURE__ */ d(r, { children: [/* @__PURE__ */ d("p", {
|
|
1437
|
+
class: "IncodeRedirectTabDescription",
|
|
1438
|
+
children: c("v2.redirectToMobile.sms.description")
|
|
1439
|
+
}), n ? /* @__PURE__ */ d(Ge, {
|
|
1440
|
+
formattedPhone: v,
|
|
1441
|
+
onResend: x,
|
|
1442
|
+
onChangePhone: S
|
|
1443
|
+
}) : /* @__PURE__ */ d(qe, {
|
|
1444
|
+
countryCode: _,
|
|
1445
|
+
phonePrefix: e,
|
|
1446
|
+
error: i,
|
|
1447
|
+
isSending: h,
|
|
1448
|
+
isPhoneValid: p,
|
|
1449
|
+
onPhoneChange: y,
|
|
1450
|
+
onSendSms: b
|
|
1451
|
+
})] });
|
|
1452
|
+
}, Xe = ({ redirectUrl: e, phonePrefix: n, smsSent: r, disableSmsOption: i, addContinueToDesktop: a, error: o, manager: c, logoSrc: l }) => {
|
|
1453
|
+
let { t: f } = t(), [p, m] = u(!1), h = s(() => {
|
|
1454
|
+
m(!0), setTimeout(() => m(!1), 3e3);
|
|
1455
|
+
}, []), g = s(() => {
|
|
1456
|
+
c.continueOnDesktop();
|
|
1457
|
+
}, [c]);
|
|
1458
|
+
return /* @__PURE__ */ d("div", {
|
|
1459
|
+
class: "IncodeRedirectContainer",
|
|
1460
|
+
children: [/* @__PURE__ */ d(xe, { visible: p }), /* @__PURE__ */ d("div", {
|
|
1461
|
+
class: "IncodeRedirectCard",
|
|
1462
|
+
children: [
|
|
1463
|
+
/* @__PURE__ */ d(ye, { logoSrc: l }),
|
|
1464
|
+
/* @__PURE__ */ d("div", {
|
|
1465
|
+
class: "IncodeRedirectOptions",
|
|
1466
|
+
children: /* @__PURE__ */ d(M, {
|
|
1467
|
+
defaultValue: "qr",
|
|
1468
|
+
listClassName: "IncodeRedirectTabs",
|
|
1469
|
+
triggerClassName: "IncodeRedirectTab",
|
|
1470
|
+
activeTriggerClassName: "IncodeRedirectTabActive",
|
|
1471
|
+
children: [
|
|
1472
|
+
/* @__PURE__ */ d(M.List, { children: [/* @__PURE__ */ d(M.Trigger, {
|
|
1473
|
+
value: "qr",
|
|
1474
|
+
children: f("v2.redirectToMobile.tabs.0")
|
|
1475
|
+
}), i ? null : /* @__PURE__ */ d(M.Trigger, {
|
|
1476
|
+
value: "sms",
|
|
1477
|
+
children: f("v2.redirectToMobile.tabs.1")
|
|
1478
|
+
})] }),
|
|
1479
|
+
/* @__PURE__ */ d(M.Content, {
|
|
1480
|
+
value: "qr",
|
|
1481
|
+
children: /* @__PURE__ */ d(We, { redirectUrl: e })
|
|
1482
|
+
}),
|
|
1483
|
+
i ? null : /* @__PURE__ */ d(M.Content, {
|
|
1484
|
+
value: "sms",
|
|
1485
|
+
children: /* @__PURE__ */ d(Ye, {
|
|
1486
|
+
phonePrefix: n,
|
|
1487
|
+
smsSent: r,
|
|
1488
|
+
error: o,
|
|
1489
|
+
manager: c,
|
|
1490
|
+
onResend: h
|
|
1491
|
+
})
|
|
1492
|
+
})
|
|
1493
|
+
]
|
|
1494
|
+
})
|
|
1495
|
+
}),
|
|
1496
|
+
/* @__PURE__ */ d(be, {
|
|
1497
|
+
addContinueToDesktop: a,
|
|
1498
|
+
onContinueOnDesktop: g
|
|
1499
|
+
})
|
|
1500
|
+
]
|
|
1501
|
+
})]
|
|
1502
|
+
});
|
|
1503
|
+
}, Ze = ({ title: e, subtitle: n, logoSrc: r }) => {
|
|
1504
|
+
let { t: i } = t(), a = e ?? i("verificationComplete.title"), o = n ?? i("verificationComplete.message");
|
|
1505
|
+
return /* @__PURE__ */ d("div", {
|
|
1506
|
+
class: "IncodeRedirectFinishedContainer",
|
|
1507
|
+
children: [
|
|
1508
|
+
/* @__PURE__ */ d("img", {
|
|
1509
|
+
src: r,
|
|
1510
|
+
alt: "Logo",
|
|
1511
|
+
class: "IncodeRedirectLogo"
|
|
1512
|
+
}),
|
|
1513
|
+
a ? /* @__PURE__ */ d("h1", {
|
|
1514
|
+
class: "IncodeRedirectFinishedTitle",
|
|
1515
|
+
children: a
|
|
1516
|
+
}) : null,
|
|
1517
|
+
o ? /* @__PURE__ */ d("p", {
|
|
1518
|
+
class: "IncodeRedirectFinishedSubtitle",
|
|
1519
|
+
children: o
|
|
1520
|
+
}) : null
|
|
1521
|
+
]
|
|
1522
|
+
});
|
|
1523
|
+
}, Qe = ({ config: e, onFinish: t, onContinue: n, onError: r }) => {
|
|
1524
|
+
let [a, o] = h(() => de({ config: e })), { logoSrc: s, logoHeightPx: c } = x({
|
|
1525
|
+
hideHeader: void 0,
|
|
1526
|
+
hideFooterBranding: void 0,
|
|
1527
|
+
logo: void 0,
|
|
1528
|
+
defaultLogoSrc: y
|
|
1529
|
+
});
|
|
1530
|
+
i(() => {
|
|
1531
|
+
a.status === "finished" && t?.();
|
|
1532
|
+
}, [a.status, t]), i(() => {
|
|
1533
|
+
a.status === "closed" && n?.();
|
|
1534
|
+
}, [a.status, n]), i(() => {
|
|
1535
|
+
a.status === "error" && r?.(a.error);
|
|
1536
|
+
}, [
|
|
1537
|
+
a.status,
|
|
1538
|
+
r,
|
|
1539
|
+
a
|
|
1540
|
+
]);
|
|
1541
|
+
let l = a.status === "idle" || a.status === "loading" ? /* @__PURE__ */ d(C, { fullScreen: !0 }) : a.status === "redirecting" ? /* @__PURE__ */ d(Xe, {
|
|
1542
|
+
redirectUrl: a.redirectUrl,
|
|
1543
|
+
phonePrefix: a.phonePrefix,
|
|
1544
|
+
smsSent: a.smsSent,
|
|
1545
|
+
disableSmsOption: e.disableSmsOption ?? !1,
|
|
1546
|
+
addContinueToDesktop: e.addContinueToDesktop ?? !1,
|
|
1547
|
+
error: a.error,
|
|
1548
|
+
manager: o,
|
|
1549
|
+
logoSrc: s
|
|
1550
|
+
}) : a.status === "finished" ? /* @__PURE__ */ d(Ze, { logoSrc: s }) : null;
|
|
1551
|
+
return /* @__PURE__ */ d("div", {
|
|
1552
|
+
class: "IncodeRedirectRoot",
|
|
1553
|
+
style: { "--logo-height": `${c}px` },
|
|
1554
|
+
children: l
|
|
1555
|
+
});
|
|
1556
|
+
}, B = ({ config: e, onFinish: t, onContinue: n, onError: r }) => /* @__PURE__ */ d(_, { children: e ? /* @__PURE__ */ d(Qe, {
|
|
1557
|
+
config: e,
|
|
1558
|
+
onFinish: t,
|
|
1559
|
+
onContinue: n,
|
|
1560
|
+
onError: r
|
|
1561
|
+
}) : null });
|
|
1562
|
+
T(B, "incode-redirect-to-mobile");
|
|
1563
|
+
//#endregion
|
|
1564
|
+
//#region src/styles/generatePalette.ts
|
|
1565
|
+
function $e(e) {
|
|
1566
|
+
let t = e.replace("#", "");
|
|
1567
|
+
t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
|
|
1568
|
+
let n = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
1569
|
+
if (!n) return null;
|
|
1570
|
+
let r = Number.parseInt(n[1], 16) / 255, i = Number.parseInt(n[2], 16) / 255, a = Number.parseInt(n[3], 16) / 255, o = Math.max(r, i, a), s = Math.min(r, i, a), c = 0, l = 0, u = (o + s) / 2;
|
|
1571
|
+
if (o !== s) {
|
|
1572
|
+
let e = o - s;
|
|
1573
|
+
switch (l = u > .5 ? e / (2 - o - s) : e / (o + s), o) {
|
|
1574
|
+
case r:
|
|
1575
|
+
c = ((i - a) / e + (i < a ? 6 : 0)) / 6;
|
|
1576
|
+
break;
|
|
1577
|
+
case i:
|
|
1578
|
+
c = ((a - r) / e + 2) / 6;
|
|
1579
|
+
break;
|
|
1580
|
+
case a:
|
|
1581
|
+
c = ((r - i) / e + 4) / 6;
|
|
1582
|
+
break;
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
return {
|
|
1586
|
+
h: c * 360,
|
|
1587
|
+
s: l * 100,
|
|
1588
|
+
l: u * 100
|
|
1589
|
+
};
|
|
839
1590
|
}
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
return n.test(s);
|
|
853
|
-
}, D.testNumeric = function(s) {
|
|
854
|
-
return o.test(s);
|
|
855
|
-
}, D.testAlphanumeric = function(s) {
|
|
856
|
-
return a.test(s);
|
|
857
|
-
}, D;
|
|
1591
|
+
function V(e, t, n) {
|
|
1592
|
+
let r = e / 360, i = t / 100, a = n / 100, o, s, c;
|
|
1593
|
+
if (i === 0) o = s = c = a;
|
|
1594
|
+
else {
|
|
1595
|
+
let e = (e, t, n) => (n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e), t = a < .5 ? a * (1 + i) : a + i - a * i, n = 2 * a - t;
|
|
1596
|
+
o = e(n, t, r + 1 / 3), s = e(n, t, r), c = e(n, t, r - 1 / 3);
|
|
1597
|
+
}
|
|
1598
|
+
let l = (e) => {
|
|
1599
|
+
let t = Math.round(e * 255).toString(16);
|
|
1600
|
+
return t.length === 1 ? `0${t}` : t;
|
|
1601
|
+
};
|
|
1602
|
+
return `#${l(o)}${l(s)}${l(c)}`;
|
|
858
1603
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
}, e.BYTE = {
|
|
872
|
-
id: "Byte",
|
|
873
|
-
bit: 4,
|
|
874
|
-
ccBits: [8, 16, 16]
|
|
875
|
-
}, e.KANJI = {
|
|
876
|
-
id: "Kanji",
|
|
877
|
-
bit: 8,
|
|
878
|
-
ccBits: [8, 10, 12]
|
|
879
|
-
}, e.MIXED = {
|
|
880
|
-
bit: -1
|
|
881
|
-
}, e.getCharCountIndicator = function(o, a) {
|
|
882
|
-
if (!o.ccBits) throw new Error("Invalid mode: " + o);
|
|
883
|
-
if (!t.isValid(a))
|
|
884
|
-
throw new Error("Invalid version: " + a);
|
|
885
|
-
return a >= 1 && a < 10 ? o.ccBits[0] : a < 27 ? o.ccBits[1] : o.ccBits[2];
|
|
886
|
-
}, e.getBestModeForData = function(o) {
|
|
887
|
-
return i.testNumeric(o) ? e.NUMERIC : i.testAlphanumeric(o) ? e.ALPHANUMERIC : i.testKanji(o) ? e.KANJI : e.BYTE;
|
|
888
|
-
}, e.toString = function(o) {
|
|
889
|
-
if (o && o.id) return o.id;
|
|
890
|
-
throw new Error("Invalid mode");
|
|
891
|
-
}, e.isValid = function(o) {
|
|
892
|
-
return o && o.bit && o.ccBits;
|
|
893
|
-
};
|
|
894
|
-
function r(n) {
|
|
895
|
-
if (typeof n != "string")
|
|
896
|
-
throw new Error("Param is not a string");
|
|
897
|
-
switch (n.toLowerCase()) {
|
|
898
|
-
case "numeric":
|
|
899
|
-
return e.NUMERIC;
|
|
900
|
-
case "alphanumeric":
|
|
901
|
-
return e.ALPHANUMERIC;
|
|
902
|
-
case "kanji":
|
|
903
|
-
return e.KANJI;
|
|
904
|
-
case "byte":
|
|
905
|
-
return e.BYTE;
|
|
906
|
-
default:
|
|
907
|
-
throw new Error("Unknown mode: " + n);
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
e.from = function(o, a) {
|
|
911
|
-
if (e.isValid(o))
|
|
912
|
-
return o;
|
|
913
|
-
try {
|
|
914
|
-
return r(o);
|
|
915
|
-
} catch {
|
|
916
|
-
return a;
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
|
-
})(Ie)), Ie;
|
|
920
|
-
}
|
|
921
|
-
var nt;
|
|
922
|
-
function vn() {
|
|
923
|
-
return nt || (nt = 1, (function(e) {
|
|
924
|
-
const t = z(), i = St(), r = Ue(), n = H(), o = bt(), a = 7973, c = t.getBCHDigit(a);
|
|
925
|
-
function s(d, f, M) {
|
|
926
|
-
for (let E = 1; E <= 40; E++)
|
|
927
|
-
if (f <= e.getCapacity(E, M, d))
|
|
928
|
-
return E;
|
|
929
|
-
}
|
|
930
|
-
function u(d, f) {
|
|
931
|
-
return n.getCharCountIndicator(d, f) + 4;
|
|
932
|
-
}
|
|
933
|
-
function h(d, f) {
|
|
934
|
-
let M = 0;
|
|
935
|
-
return d.forEach(function(E) {
|
|
936
|
-
const P = u(E.mode, f);
|
|
937
|
-
M += P + E.getBitsLength();
|
|
938
|
-
}), M;
|
|
939
|
-
}
|
|
940
|
-
function g(d, f) {
|
|
941
|
-
for (let M = 1; M <= 40; M++)
|
|
942
|
-
if (h(d, M) <= e.getCapacity(M, f, n.MIXED))
|
|
943
|
-
return M;
|
|
944
|
-
}
|
|
945
|
-
e.from = function(f, M) {
|
|
946
|
-
return o.isValid(f) ? parseInt(f, 10) : M;
|
|
947
|
-
}, e.getCapacity = function(f, M, E) {
|
|
948
|
-
if (!o.isValid(f))
|
|
949
|
-
throw new Error("Invalid QR Code version");
|
|
950
|
-
typeof E > "u" && (E = n.BYTE);
|
|
951
|
-
const P = t.getSymbolTotalCodewords(f), A = i.getTotalCodewordsCount(f, M), I = (P - A) * 8;
|
|
952
|
-
if (E === n.MIXED) return I;
|
|
953
|
-
const m = I - u(E, f);
|
|
954
|
-
switch (E) {
|
|
955
|
-
case n.NUMERIC:
|
|
956
|
-
return Math.floor(m / 10 * 3);
|
|
957
|
-
case n.ALPHANUMERIC:
|
|
958
|
-
return Math.floor(m / 11 * 2);
|
|
959
|
-
case n.KANJI:
|
|
960
|
-
return Math.floor(m / 13);
|
|
961
|
-
case n.BYTE:
|
|
962
|
-
default:
|
|
963
|
-
return Math.floor(m / 8);
|
|
964
|
-
}
|
|
965
|
-
}, e.getBestVersionForData = function(f, M) {
|
|
966
|
-
let E;
|
|
967
|
-
const P = r.from(M, r.M);
|
|
968
|
-
if (Array.isArray(f)) {
|
|
969
|
-
if (f.length > 1)
|
|
970
|
-
return g(f, P);
|
|
971
|
-
if (f.length === 0)
|
|
972
|
-
return 1;
|
|
973
|
-
E = f[0];
|
|
974
|
-
} else
|
|
975
|
-
E = f;
|
|
976
|
-
return s(E.mode, E.getLength(), P);
|
|
977
|
-
}, e.getEncodedBits = function(f) {
|
|
978
|
-
if (!o.isValid(f) || f < 7)
|
|
979
|
-
throw new Error("Invalid QR Code version");
|
|
980
|
-
let M = f << 12;
|
|
981
|
-
for (; t.getBCHDigit(M) - c >= 0; )
|
|
982
|
-
M ^= a << t.getBCHDigit(M) - c;
|
|
983
|
-
return f << 12 | M;
|
|
984
|
-
};
|
|
985
|
-
})(we)), we;
|
|
986
|
-
}
|
|
987
|
-
var ye = {}, rt;
|
|
988
|
-
function Bn() {
|
|
989
|
-
if (rt) return ye;
|
|
990
|
-
rt = 1;
|
|
991
|
-
const e = z(), t = 1335, i = 21522, r = e.getBCHDigit(t);
|
|
992
|
-
return ye.getEncodedBits = function(o, a) {
|
|
993
|
-
const c = o.bit << 3 | a;
|
|
994
|
-
let s = c << 10;
|
|
995
|
-
for (; e.getBCHDigit(s) - r >= 0; )
|
|
996
|
-
s ^= t << e.getBCHDigit(s) - r;
|
|
997
|
-
return (c << 10 | s) ^ i;
|
|
998
|
-
}, ye;
|
|
999
|
-
}
|
|
1000
|
-
var Te = {}, Me, ot;
|
|
1001
|
-
function Pn() {
|
|
1002
|
-
if (ot) return Me;
|
|
1003
|
-
ot = 1;
|
|
1004
|
-
const e = H();
|
|
1005
|
-
function t(i) {
|
|
1006
|
-
this.mode = e.NUMERIC, this.data = i.toString();
|
|
1007
|
-
}
|
|
1008
|
-
return t.getBitsLength = function(r) {
|
|
1009
|
-
return 10 * Math.floor(r / 3) + (r % 3 ? r % 3 * 3 + 1 : 0);
|
|
1010
|
-
}, t.prototype.getLength = function() {
|
|
1011
|
-
return this.data.length;
|
|
1012
|
-
}, t.prototype.getBitsLength = function() {
|
|
1013
|
-
return t.getBitsLength(this.data.length);
|
|
1014
|
-
}, t.prototype.write = function(r) {
|
|
1015
|
-
let n, o, a;
|
|
1016
|
-
for (n = 0; n + 3 <= this.data.length; n += 3)
|
|
1017
|
-
o = this.data.substr(n, 3), a = parseInt(o, 10), r.put(a, 10);
|
|
1018
|
-
const c = this.data.length - n;
|
|
1019
|
-
c > 0 && (o = this.data.substr(n), a = parseInt(o, 10), r.put(a, c * 3 + 1));
|
|
1020
|
-
}, Me = t, Me;
|
|
1021
|
-
}
|
|
1022
|
-
var Re, it;
|
|
1023
|
-
function Ln() {
|
|
1024
|
-
if (it) return Re;
|
|
1025
|
-
it = 1;
|
|
1026
|
-
const e = H(), t = [
|
|
1027
|
-
"0",
|
|
1028
|
-
"1",
|
|
1029
|
-
"2",
|
|
1030
|
-
"3",
|
|
1031
|
-
"4",
|
|
1032
|
-
"5",
|
|
1033
|
-
"6",
|
|
1034
|
-
"7",
|
|
1035
|
-
"8",
|
|
1036
|
-
"9",
|
|
1037
|
-
"A",
|
|
1038
|
-
"B",
|
|
1039
|
-
"C",
|
|
1040
|
-
"D",
|
|
1041
|
-
"E",
|
|
1042
|
-
"F",
|
|
1043
|
-
"G",
|
|
1044
|
-
"H",
|
|
1045
|
-
"I",
|
|
1046
|
-
"J",
|
|
1047
|
-
"K",
|
|
1048
|
-
"L",
|
|
1049
|
-
"M",
|
|
1050
|
-
"N",
|
|
1051
|
-
"O",
|
|
1052
|
-
"P",
|
|
1053
|
-
"Q",
|
|
1054
|
-
"R",
|
|
1055
|
-
"S",
|
|
1056
|
-
"T",
|
|
1057
|
-
"U",
|
|
1058
|
-
"V",
|
|
1059
|
-
"W",
|
|
1060
|
-
"X",
|
|
1061
|
-
"Y",
|
|
1062
|
-
"Z",
|
|
1063
|
-
" ",
|
|
1064
|
-
"$",
|
|
1065
|
-
"%",
|
|
1066
|
-
"*",
|
|
1067
|
-
"+",
|
|
1068
|
-
"-",
|
|
1069
|
-
".",
|
|
1070
|
-
"/",
|
|
1071
|
-
":"
|
|
1072
|
-
];
|
|
1073
|
-
function i(r) {
|
|
1074
|
-
this.mode = e.ALPHANUMERIC, this.data = r;
|
|
1075
|
-
}
|
|
1076
|
-
return i.getBitsLength = function(n) {
|
|
1077
|
-
return 11 * Math.floor(n / 2) + 6 * (n % 2);
|
|
1078
|
-
}, i.prototype.getLength = function() {
|
|
1079
|
-
return this.data.length;
|
|
1080
|
-
}, i.prototype.getBitsLength = function() {
|
|
1081
|
-
return i.getBitsLength(this.data.length);
|
|
1082
|
-
}, i.prototype.write = function(n) {
|
|
1083
|
-
let o;
|
|
1084
|
-
for (o = 0; o + 2 <= this.data.length; o += 2) {
|
|
1085
|
-
let a = t.indexOf(this.data[o]) * 45;
|
|
1086
|
-
a += t.indexOf(this.data[o + 1]), n.put(a, 11);
|
|
1087
|
-
}
|
|
1088
|
-
this.data.length % 2 && n.put(t.indexOf(this.data[o]), 6);
|
|
1089
|
-
}, Re = i, Re;
|
|
1090
|
-
}
|
|
1091
|
-
var Se, st;
|
|
1092
|
-
function Dn() {
|
|
1093
|
-
if (st) return Se;
|
|
1094
|
-
st = 1;
|
|
1095
|
-
const e = H();
|
|
1096
|
-
function t(i) {
|
|
1097
|
-
this.mode = e.BYTE, typeof i == "string" ? this.data = new TextEncoder().encode(i) : this.data = new Uint8Array(i);
|
|
1098
|
-
}
|
|
1099
|
-
return t.getBitsLength = function(r) {
|
|
1100
|
-
return r * 8;
|
|
1101
|
-
}, t.prototype.getLength = function() {
|
|
1102
|
-
return this.data.length;
|
|
1103
|
-
}, t.prototype.getBitsLength = function() {
|
|
1104
|
-
return t.getBitsLength(this.data.length);
|
|
1105
|
-
}, t.prototype.write = function(i) {
|
|
1106
|
-
for (let r = 0, n = this.data.length; r < n; r++)
|
|
1107
|
-
i.put(this.data[r], 8);
|
|
1108
|
-
}, Se = t, Se;
|
|
1604
|
+
function et(e) {
|
|
1605
|
+
let t = $e(e);
|
|
1606
|
+
if (!t) throw Error(`Invalid color format: ${e}`);
|
|
1607
|
+
return {
|
|
1608
|
+
50: V(t.h, t.s, 95),
|
|
1609
|
+
200: V(t.h, t.s, 80),
|
|
1610
|
+
300: V(t.h, t.s, 65),
|
|
1611
|
+
400: V(t.h, t.s, Math.min(100, t.l + 10)),
|
|
1612
|
+
500: e,
|
|
1613
|
+
600: V(t.h, t.s, Math.max(0, t.l - 10)),
|
|
1614
|
+
900: V(t.h, t.s, 20)
|
|
1615
|
+
};
|
|
1109
1616
|
}
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
}
|
|
1118
|
-
return i.getBitsLength = function(n) {
|
|
1119
|
-
return n * 13;
|
|
1120
|
-
}, i.prototype.getLength = function() {
|
|
1121
|
-
return this.data.length;
|
|
1122
|
-
}, i.prototype.getBitsLength = function() {
|
|
1123
|
-
return i.getBitsLength(this.data.length);
|
|
1124
|
-
}, i.prototype.write = function(r) {
|
|
1125
|
-
let n;
|
|
1126
|
-
for (n = 0; n < this.data.length; n++) {
|
|
1127
|
-
let o = t.toSJIS(this.data[n]);
|
|
1128
|
-
if (o >= 33088 && o <= 40956)
|
|
1129
|
-
o -= 33088;
|
|
1130
|
-
else if (o >= 57408 && o <= 60351)
|
|
1131
|
-
o -= 49472;
|
|
1132
|
-
else
|
|
1133
|
-
throw new Error(
|
|
1134
|
-
"Invalid SJIS character: " + this.data[n] + `
|
|
1135
|
-
Make sure your charset is UTF-8`
|
|
1136
|
-
);
|
|
1137
|
-
o = (o >>> 8 & 255) * 192 + (o & 255), r.put(o, 13);
|
|
1138
|
-
}
|
|
1139
|
-
}, be = i, be;
|
|
1140
|
-
}
|
|
1141
|
-
var Ae = { exports: {} }, ct;
|
|
1142
|
-
function Un() {
|
|
1143
|
-
return ct || (ct = 1, (function(e) {
|
|
1144
|
-
var t = {
|
|
1145
|
-
single_source_shortest_paths: function(i, r, n) {
|
|
1146
|
-
var o = {}, a = {};
|
|
1147
|
-
a[r] = 0;
|
|
1148
|
-
var c = t.PriorityQueue.make();
|
|
1149
|
-
c.push(r, 0);
|
|
1150
|
-
for (var s, u, h, g, d, f, M, E, P; !c.empty(); ) {
|
|
1151
|
-
s = c.pop(), u = s.value, g = s.cost, d = i[u] || {};
|
|
1152
|
-
for (h in d)
|
|
1153
|
-
d.hasOwnProperty(h) && (f = d[h], M = g + f, E = a[h], P = typeof a[h] > "u", (P || E > M) && (a[h] = M, c.push(h, M), o[h] = u));
|
|
1154
|
-
}
|
|
1155
|
-
if (typeof n < "u" && typeof a[n] > "u") {
|
|
1156
|
-
var A = ["Could not find a path from ", r, " to ", n, "."].join("");
|
|
1157
|
-
throw new Error(A);
|
|
1158
|
-
}
|
|
1159
|
-
return o;
|
|
1160
|
-
},
|
|
1161
|
-
extract_shortest_path_from_predecessor_list: function(i, r) {
|
|
1162
|
-
for (var n = [], o = r; o; )
|
|
1163
|
-
n.push(o), i[o], o = i[o];
|
|
1164
|
-
return n.reverse(), n;
|
|
1165
|
-
},
|
|
1166
|
-
find_path: function(i, r, n) {
|
|
1167
|
-
var o = t.single_source_shortest_paths(i, r, n);
|
|
1168
|
-
return t.extract_shortest_path_from_predecessor_list(
|
|
1169
|
-
o,
|
|
1170
|
-
n
|
|
1171
|
-
);
|
|
1172
|
-
},
|
|
1173
|
-
/**
|
|
1174
|
-
* A very naive priority queue implementation.
|
|
1175
|
-
*/
|
|
1176
|
-
PriorityQueue: {
|
|
1177
|
-
make: function(i) {
|
|
1178
|
-
var r = t.PriorityQueue, n = {}, o;
|
|
1179
|
-
i = i || {};
|
|
1180
|
-
for (o in r)
|
|
1181
|
-
r.hasOwnProperty(o) && (n[o] = r[o]);
|
|
1182
|
-
return n.queue = [], n.sorter = i.sorter || r.default_sorter, n;
|
|
1183
|
-
},
|
|
1184
|
-
default_sorter: function(i, r) {
|
|
1185
|
-
return i.cost - r.cost;
|
|
1186
|
-
},
|
|
1187
|
-
/**
|
|
1188
|
-
* Add a new item to the queue and ensure the highest priority element
|
|
1189
|
-
* is at the front of the queue.
|
|
1190
|
-
*/
|
|
1191
|
-
push: function(i, r) {
|
|
1192
|
-
var n = { value: i, cost: r };
|
|
1193
|
-
this.queue.push(n), this.queue.sort(this.sorter);
|
|
1194
|
-
},
|
|
1195
|
-
/**
|
|
1196
|
-
* Return the highest priority element in the queue.
|
|
1197
|
-
*/
|
|
1198
|
-
pop: function() {
|
|
1199
|
-
return this.queue.shift();
|
|
1200
|
-
},
|
|
1201
|
-
empty: function() {
|
|
1202
|
-
return this.queue.length === 0;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
};
|
|
1206
|
-
e.exports = t;
|
|
1207
|
-
})(Ae)), Ae.exports;
|
|
1208
|
-
}
|
|
1209
|
-
var lt;
|
|
1210
|
-
function kn() {
|
|
1211
|
-
return lt || (lt = 1, (function(e) {
|
|
1212
|
-
const t = H(), i = Pn(), r = Ln(), n = Dn(), o = Fn(), a = At(), c = z(), s = Un();
|
|
1213
|
-
function u(A) {
|
|
1214
|
-
return unescape(encodeURIComponent(A)).length;
|
|
1215
|
-
}
|
|
1216
|
-
function h(A, I, m) {
|
|
1217
|
-
const p = [];
|
|
1218
|
-
let B;
|
|
1219
|
-
for (; (B = A.exec(m)) !== null; )
|
|
1220
|
-
p.push({
|
|
1221
|
-
data: B[0],
|
|
1222
|
-
index: B.index,
|
|
1223
|
-
mode: I,
|
|
1224
|
-
length: B[0].length
|
|
1225
|
-
});
|
|
1226
|
-
return p;
|
|
1227
|
-
}
|
|
1228
|
-
function g(A) {
|
|
1229
|
-
const I = h(a.NUMERIC, t.NUMERIC, A), m = h(a.ALPHANUMERIC, t.ALPHANUMERIC, A);
|
|
1230
|
-
let p, B;
|
|
1231
|
-
return c.isKanjiModeEnabled() ? (p = h(a.BYTE, t.BYTE, A), B = h(a.KANJI, t.KANJI, A)) : (p = h(a.BYTE_KANJI, t.BYTE, A), B = []), I.concat(m, p, B).sort(function(S, R) {
|
|
1232
|
-
return S.index - R.index;
|
|
1233
|
-
}).map(function(S) {
|
|
1234
|
-
return {
|
|
1235
|
-
data: S.data,
|
|
1236
|
-
mode: S.mode,
|
|
1237
|
-
length: S.length
|
|
1238
|
-
};
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
function d(A, I) {
|
|
1242
|
-
switch (I) {
|
|
1243
|
-
case t.NUMERIC:
|
|
1244
|
-
return i.getBitsLength(A);
|
|
1245
|
-
case t.ALPHANUMERIC:
|
|
1246
|
-
return r.getBitsLength(A);
|
|
1247
|
-
case t.KANJI:
|
|
1248
|
-
return o.getBitsLength(A);
|
|
1249
|
-
case t.BYTE:
|
|
1250
|
-
return n.getBitsLength(A);
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
function f(A) {
|
|
1254
|
-
return A.reduce(function(I, m) {
|
|
1255
|
-
const p = I.length - 1 >= 0 ? I[I.length - 1] : null;
|
|
1256
|
-
return p && p.mode === m.mode ? (I[I.length - 1].data += m.data, I) : (I.push(m), I);
|
|
1257
|
-
}, []);
|
|
1258
|
-
}
|
|
1259
|
-
function M(A) {
|
|
1260
|
-
const I = [];
|
|
1261
|
-
for (let m = 0; m < A.length; m++) {
|
|
1262
|
-
const p = A[m];
|
|
1263
|
-
switch (p.mode) {
|
|
1264
|
-
case t.NUMERIC:
|
|
1265
|
-
I.push([
|
|
1266
|
-
p,
|
|
1267
|
-
{ data: p.data, mode: t.ALPHANUMERIC, length: p.length },
|
|
1268
|
-
{ data: p.data, mode: t.BYTE, length: p.length }
|
|
1269
|
-
]);
|
|
1270
|
-
break;
|
|
1271
|
-
case t.ALPHANUMERIC:
|
|
1272
|
-
I.push([
|
|
1273
|
-
p,
|
|
1274
|
-
{ data: p.data, mode: t.BYTE, length: p.length }
|
|
1275
|
-
]);
|
|
1276
|
-
break;
|
|
1277
|
-
case t.KANJI:
|
|
1278
|
-
I.push([
|
|
1279
|
-
p,
|
|
1280
|
-
{ data: p.data, mode: t.BYTE, length: u(p.data) }
|
|
1281
|
-
]);
|
|
1282
|
-
break;
|
|
1283
|
-
case t.BYTE:
|
|
1284
|
-
I.push([
|
|
1285
|
-
{ data: p.data, mode: t.BYTE, length: u(p.data) }
|
|
1286
|
-
]);
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
return I;
|
|
1290
|
-
}
|
|
1291
|
-
function E(A, I) {
|
|
1292
|
-
const m = {}, p = { start: {} };
|
|
1293
|
-
let B = ["start"];
|
|
1294
|
-
for (let C = 0; C < A.length; C++) {
|
|
1295
|
-
const S = A[C], R = [];
|
|
1296
|
-
for (let w = 0; w < S.length; w++) {
|
|
1297
|
-
const N = S[w], y = "" + C + w;
|
|
1298
|
-
R.push(y), m[y] = { node: N, lastCount: 0 }, p[y] = {};
|
|
1299
|
-
for (let b = 0; b < B.length; b++) {
|
|
1300
|
-
const T = B[b];
|
|
1301
|
-
m[T] && m[T].node.mode === N.mode ? (p[T][y] = d(m[T].lastCount + N.length, N.mode) - d(m[T].lastCount, N.mode), m[T].lastCount += N.length) : (m[T] && (m[T].lastCount = N.length), p[T][y] = d(N.length, N.mode) + 4 + t.getCharCountIndicator(N.mode, I));
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
B = R;
|
|
1305
|
-
}
|
|
1306
|
-
for (let C = 0; C < B.length; C++)
|
|
1307
|
-
p[B[C]].end = 0;
|
|
1308
|
-
return { map: p, table: m };
|
|
1309
|
-
}
|
|
1310
|
-
function P(A, I) {
|
|
1311
|
-
let m;
|
|
1312
|
-
const p = t.getBestModeForData(A);
|
|
1313
|
-
if (m = t.from(I, p), m !== t.BYTE && m.bit < p.bit)
|
|
1314
|
-
throw new Error('"' + A + '" cannot be encoded with mode ' + t.toString(m) + `.
|
|
1315
|
-
Suggested mode is: ` + t.toString(p));
|
|
1316
|
-
switch (m === t.KANJI && !c.isKanjiModeEnabled() && (m = t.BYTE), m) {
|
|
1317
|
-
case t.NUMERIC:
|
|
1318
|
-
return new i(A);
|
|
1319
|
-
case t.ALPHANUMERIC:
|
|
1320
|
-
return new r(A);
|
|
1321
|
-
case t.KANJI:
|
|
1322
|
-
return new o(A);
|
|
1323
|
-
case t.BYTE:
|
|
1324
|
-
return new n(A);
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
e.fromArray = function(I) {
|
|
1328
|
-
return I.reduce(function(m, p) {
|
|
1329
|
-
return typeof p == "string" ? m.push(P(p, null)) : p.data && m.push(P(p.data, p.mode)), m;
|
|
1330
|
-
}, []);
|
|
1331
|
-
}, e.fromString = function(I, m) {
|
|
1332
|
-
const p = g(I, c.isKanjiModeEnabled()), B = M(p), C = E(B, m), S = s.find_path(C.map, "start", "end"), R = [];
|
|
1333
|
-
for (let w = 1; w < S.length - 1; w++)
|
|
1334
|
-
R.push(C.table[S[w]].node);
|
|
1335
|
-
return e.fromArray(f(R));
|
|
1336
|
-
}, e.rawSplit = function(I) {
|
|
1337
|
-
return e.fromArray(
|
|
1338
|
-
g(I, c.isKanjiModeEnabled())
|
|
1339
|
-
);
|
|
1340
|
-
};
|
|
1341
|
-
})(Te)), Te;
|
|
1342
|
-
}
|
|
1343
|
-
var ut;
|
|
1344
|
-
function _n() {
|
|
1345
|
-
if (ut) return le;
|
|
1346
|
-
ut = 1;
|
|
1347
|
-
const e = z(), t = Ue(), i = yn(), r = Tn(), n = Mn(), o = Rn(), a = Sn(), c = St(), s = Nn(), u = vn(), h = Bn(), g = H(), d = kn();
|
|
1348
|
-
function f(C, S) {
|
|
1349
|
-
const R = C.size, w = o.getPositions(S);
|
|
1350
|
-
for (let N = 0; N < w.length; N++) {
|
|
1351
|
-
const y = w[N][0], b = w[N][1];
|
|
1352
|
-
for (let T = -1; T <= 7; T++)
|
|
1353
|
-
if (!(y + T <= -1 || R <= y + T))
|
|
1354
|
-
for (let v = -1; v <= 7; v++)
|
|
1355
|
-
b + v <= -1 || R <= b + v || (T >= 0 && T <= 6 && (v === 0 || v === 6) || v >= 0 && v <= 6 && (T === 0 || T === 6) || T >= 2 && T <= 4 && v >= 2 && v <= 4 ? C.set(y + T, b + v, !0, !0) : C.set(y + T, b + v, !1, !0));
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
function M(C) {
|
|
1359
|
-
const S = C.size;
|
|
1360
|
-
for (let R = 8; R < S - 8; R++) {
|
|
1361
|
-
const w = R % 2 === 0;
|
|
1362
|
-
C.set(R, 6, w, !0), C.set(6, R, w, !0);
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
function E(C, S) {
|
|
1366
|
-
const R = n.getPositions(S);
|
|
1367
|
-
for (let w = 0; w < R.length; w++) {
|
|
1368
|
-
const N = R[w][0], y = R[w][1];
|
|
1369
|
-
for (let b = -2; b <= 2; b++)
|
|
1370
|
-
for (let T = -2; T <= 2; T++)
|
|
1371
|
-
b === -2 || b === 2 || T === -2 || T === 2 || b === 0 && T === 0 ? C.set(N + b, y + T, !0, !0) : C.set(N + b, y + T, !1, !0);
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
function P(C, S) {
|
|
1375
|
-
const R = C.size, w = u.getEncodedBits(S);
|
|
1376
|
-
let N, y, b;
|
|
1377
|
-
for (let T = 0; T < 18; T++)
|
|
1378
|
-
N = Math.floor(T / 3), y = T % 3 + R - 8 - 3, b = (w >> T & 1) === 1, C.set(N, y, b, !0), C.set(y, N, b, !0);
|
|
1379
|
-
}
|
|
1380
|
-
function A(C, S, R) {
|
|
1381
|
-
const w = C.size, N = h.getEncodedBits(S, R);
|
|
1382
|
-
let y, b;
|
|
1383
|
-
for (y = 0; y < 15; y++)
|
|
1384
|
-
b = (N >> y & 1) === 1, y < 6 ? C.set(y, 8, b, !0) : y < 8 ? C.set(y + 1, 8, b, !0) : C.set(w - 15 + y, 8, b, !0), y < 8 ? C.set(8, w - y - 1, b, !0) : y < 9 ? C.set(8, 15 - y - 1 + 1, b, !0) : C.set(8, 15 - y - 1, b, !0);
|
|
1385
|
-
C.set(w - 8, 8, 1, !0);
|
|
1386
|
-
}
|
|
1387
|
-
function I(C, S) {
|
|
1388
|
-
const R = C.size;
|
|
1389
|
-
let w = -1, N = R - 1, y = 7, b = 0;
|
|
1390
|
-
for (let T = R - 1; T > 0; T -= 2)
|
|
1391
|
-
for (T === 6 && T--; ; ) {
|
|
1392
|
-
for (let v = 0; v < 2; v++)
|
|
1393
|
-
if (!C.isReserved(N, T - v)) {
|
|
1394
|
-
let O = !1;
|
|
1395
|
-
b < S.length && (O = (S[b] >>> y & 1) === 1), C.set(N, T - v, O), y--, y === -1 && (b++, y = 7);
|
|
1396
|
-
}
|
|
1397
|
-
if (N += w, N < 0 || R <= N) {
|
|
1398
|
-
N -= w, w = -w;
|
|
1399
|
-
break;
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
function m(C, S, R) {
|
|
1404
|
-
const w = new i();
|
|
1405
|
-
R.forEach(function(v) {
|
|
1406
|
-
w.put(v.mode.bit, 4), w.put(v.getLength(), g.getCharCountIndicator(v.mode, C)), v.write(w);
|
|
1407
|
-
});
|
|
1408
|
-
const N = e.getSymbolTotalCodewords(C), y = c.getTotalCodewordsCount(C, S), b = (N - y) * 8;
|
|
1409
|
-
for (w.getLengthInBits() + 4 <= b && w.put(0, 4); w.getLengthInBits() % 8 !== 0; )
|
|
1410
|
-
w.putBit(0);
|
|
1411
|
-
const T = (b - w.getLengthInBits()) / 8;
|
|
1412
|
-
for (let v = 0; v < T; v++)
|
|
1413
|
-
w.put(v % 2 ? 17 : 236, 8);
|
|
1414
|
-
return p(w, C, S);
|
|
1415
|
-
}
|
|
1416
|
-
function p(C, S, R) {
|
|
1417
|
-
const w = e.getSymbolTotalCodewords(S), N = c.getTotalCodewordsCount(S, R), y = w - N, b = c.getBlocksCount(S, R), T = w % b, v = b - T, O = Math.floor(w / b), Q = Math.floor(y / b), Ft = Q + 1, _e = O - Q, Ut = new s(_e);
|
|
1418
|
-
let re = 0;
|
|
1419
|
-
const $ = new Array(b), Oe = new Array(b);
|
|
1420
|
-
let oe = 0;
|
|
1421
|
-
const kt = new Uint8Array(C.buffer);
|
|
1422
|
-
for (let K = 0; K < b; K++) {
|
|
1423
|
-
const se = K < v ? Q : Ft;
|
|
1424
|
-
$[K] = kt.slice(re, re + se), Oe[K] = Ut.encode($[K]), re += se, oe = Math.max(oe, se);
|
|
1425
|
-
}
|
|
1426
|
-
const ie = new Uint8Array(w);
|
|
1427
|
-
let qe = 0, U, k;
|
|
1428
|
-
for (U = 0; U < oe; U++)
|
|
1429
|
-
for (k = 0; k < b; k++)
|
|
1430
|
-
U < $[k].length && (ie[qe++] = $[k][U]);
|
|
1431
|
-
for (U = 0; U < _e; U++)
|
|
1432
|
-
for (k = 0; k < b; k++)
|
|
1433
|
-
ie[qe++] = Oe[k][U];
|
|
1434
|
-
return ie;
|
|
1435
|
-
}
|
|
1436
|
-
function B(C, S, R, w) {
|
|
1437
|
-
let N;
|
|
1438
|
-
if (Array.isArray(C))
|
|
1439
|
-
N = d.fromArray(C);
|
|
1440
|
-
else if (typeof C == "string") {
|
|
1441
|
-
let O = S;
|
|
1442
|
-
if (!O) {
|
|
1443
|
-
const Q = d.rawSplit(C);
|
|
1444
|
-
O = u.getBestVersionForData(Q, R);
|
|
1445
|
-
}
|
|
1446
|
-
N = d.fromString(C, O || 40);
|
|
1447
|
-
} else
|
|
1448
|
-
throw new Error("Invalid data");
|
|
1449
|
-
const y = u.getBestVersionForData(N, R);
|
|
1450
|
-
if (!y)
|
|
1451
|
-
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1452
|
-
if (!S)
|
|
1453
|
-
S = y;
|
|
1454
|
-
else if (S < y)
|
|
1455
|
-
throw new Error(
|
|
1456
|
-
`
|
|
1457
|
-
The chosen QR Code version cannot contain this amount of data.
|
|
1458
|
-
Minimum version required to store current data is: ` + y + `.
|
|
1459
|
-
`
|
|
1460
|
-
);
|
|
1461
|
-
const b = m(S, R, N), T = e.getSymbolSize(S), v = new r(T);
|
|
1462
|
-
return f(v, S), M(v), E(v, S), A(v, R, 0), S >= 7 && P(v, S), I(v, b), isNaN(w) && (w = a.getBestMask(
|
|
1463
|
-
v,
|
|
1464
|
-
A.bind(null, v, R)
|
|
1465
|
-
)), a.applyMask(w, v), A(v, R, w), {
|
|
1466
|
-
modules: v,
|
|
1467
|
-
version: S,
|
|
1468
|
-
errorCorrectionLevel: R,
|
|
1469
|
-
maskPattern: w,
|
|
1470
|
-
segments: N
|
|
1471
|
-
};
|
|
1472
|
-
}
|
|
1473
|
-
return le.create = function(S, R) {
|
|
1474
|
-
if (typeof S > "u" || S === "")
|
|
1475
|
-
throw new Error("No input text");
|
|
1476
|
-
let w = t.M, N, y;
|
|
1477
|
-
return typeof R < "u" && (w = t.from(R.errorCorrectionLevel, t.M), N = u.from(R.version), y = a.from(R.maskPattern), R.toSJISFunc && e.setToSJISFunction(R.toSJISFunc)), B(S, N, w, y);
|
|
1478
|
-
}, le;
|
|
1479
|
-
}
|
|
1480
|
-
var Ne = {}, ve = {}, dt;
|
|
1481
|
-
function Nt() {
|
|
1482
|
-
return dt || (dt = 1, (function(e) {
|
|
1483
|
-
function t(i) {
|
|
1484
|
-
if (typeof i == "number" && (i = i.toString()), typeof i != "string")
|
|
1485
|
-
throw new Error("Color should be defined as hex string");
|
|
1486
|
-
let r = i.slice().replace("#", "").split("");
|
|
1487
|
-
if (r.length < 3 || r.length === 5 || r.length > 8)
|
|
1488
|
-
throw new Error("Invalid hex color: " + i);
|
|
1489
|
-
(r.length === 3 || r.length === 4) && (r = Array.prototype.concat.apply([], r.map(function(o) {
|
|
1490
|
-
return [o, o];
|
|
1491
|
-
}))), r.length === 6 && r.push("F", "F");
|
|
1492
|
-
const n = parseInt(r.join(""), 16);
|
|
1493
|
-
return {
|
|
1494
|
-
r: n >> 24 & 255,
|
|
1495
|
-
g: n >> 16 & 255,
|
|
1496
|
-
b: n >> 8 & 255,
|
|
1497
|
-
a: n & 255,
|
|
1498
|
-
hex: "#" + r.slice(0, 6).join("")
|
|
1499
|
-
};
|
|
1500
|
-
}
|
|
1501
|
-
e.getOptions = function(r) {
|
|
1502
|
-
r || (r = {}), r.color || (r.color = {});
|
|
1503
|
-
const n = typeof r.margin > "u" || r.margin === null || r.margin < 0 ? 4 : r.margin, o = r.width && r.width >= 21 ? r.width : void 0, a = r.scale || 4;
|
|
1504
|
-
return {
|
|
1505
|
-
width: o,
|
|
1506
|
-
scale: o ? 4 : a,
|
|
1507
|
-
margin: n,
|
|
1508
|
-
color: {
|
|
1509
|
-
dark: t(r.color.dark || "#000000ff"),
|
|
1510
|
-
light: t(r.color.light || "#ffffffff")
|
|
1511
|
-
},
|
|
1512
|
-
type: r.type,
|
|
1513
|
-
rendererOpts: r.rendererOpts || {}
|
|
1514
|
-
};
|
|
1515
|
-
}, e.getScale = function(r, n) {
|
|
1516
|
-
return n.width && n.width >= r + n.margin * 2 ? n.width / (r + n.margin * 2) : n.scale;
|
|
1517
|
-
}, e.getImageWidth = function(r, n) {
|
|
1518
|
-
const o = e.getScale(r, n);
|
|
1519
|
-
return Math.floor((r + n.margin * 2) * o);
|
|
1520
|
-
}, e.qrToImageData = function(r, n, o) {
|
|
1521
|
-
const a = n.modules.size, c = n.modules.data, s = e.getScale(a, o), u = Math.floor((a + o.margin * 2) * s), h = o.margin * s, g = [o.color.light, o.color.dark];
|
|
1522
|
-
for (let d = 0; d < u; d++)
|
|
1523
|
-
for (let f = 0; f < u; f++) {
|
|
1524
|
-
let M = (d * u + f) * 4, E = o.color.light;
|
|
1525
|
-
if (d >= h && f >= h && d < u - h && f < u - h) {
|
|
1526
|
-
const P = Math.floor((d - h) / s), A = Math.floor((f - h) / s);
|
|
1527
|
-
E = g[c[P * a + A] ? 1 : 0];
|
|
1528
|
-
}
|
|
1529
|
-
r[M++] = E.r, r[M++] = E.g, r[M++] = E.b, r[M] = E.a;
|
|
1530
|
-
}
|
|
1531
|
-
};
|
|
1532
|
-
})(ve)), ve;
|
|
1533
|
-
}
|
|
1534
|
-
var ft;
|
|
1535
|
-
function On() {
|
|
1536
|
-
return ft || (ft = 1, (function(e) {
|
|
1537
|
-
const t = Nt();
|
|
1538
|
-
function i(n, o, a) {
|
|
1539
|
-
n.clearRect(0, 0, o.width, o.height), o.style || (o.style = {}), o.height = a, o.width = a, o.style.height = a + "px", o.style.width = a + "px";
|
|
1540
|
-
}
|
|
1541
|
-
function r() {
|
|
1542
|
-
try {
|
|
1543
|
-
return document.createElement("canvas");
|
|
1544
|
-
} catch {
|
|
1545
|
-
throw new Error("You need to specify a canvas element");
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
e.render = function(o, a, c) {
|
|
1549
|
-
let s = c, u = a;
|
|
1550
|
-
typeof s > "u" && (!a || !a.getContext) && (s = a, a = void 0), a || (u = r()), s = t.getOptions(s);
|
|
1551
|
-
const h = t.getImageWidth(o.modules.size, s), g = u.getContext("2d"), d = g.createImageData(h, h);
|
|
1552
|
-
return t.qrToImageData(d.data, o, s), i(g, u, h), g.putImageData(d, 0, 0), u;
|
|
1553
|
-
}, e.renderToDataURL = function(o, a, c) {
|
|
1554
|
-
let s = c;
|
|
1555
|
-
typeof s > "u" && (!a || !a.getContext) && (s = a, a = void 0), s || (s = {});
|
|
1556
|
-
const u = e.render(o, a, s), h = s.type || "image/png", g = s.rendererOpts || {};
|
|
1557
|
-
return u.toDataURL(h, g.quality);
|
|
1558
|
-
};
|
|
1559
|
-
})(Ne)), Ne;
|
|
1560
|
-
}
|
|
1561
|
-
var Be = {}, ht;
|
|
1562
|
-
function qn() {
|
|
1563
|
-
if (ht) return Be;
|
|
1564
|
-
ht = 1;
|
|
1565
|
-
const e = Nt();
|
|
1566
|
-
function t(n, o) {
|
|
1567
|
-
const a = n.a / 255, c = o + '="' + n.hex + '"';
|
|
1568
|
-
return a < 1 ? c + " " + o + '-opacity="' + a.toFixed(2).slice(1) + '"' : c;
|
|
1569
|
-
}
|
|
1570
|
-
function i(n, o, a) {
|
|
1571
|
-
let c = n + o;
|
|
1572
|
-
return typeof a < "u" && (c += " " + a), c;
|
|
1573
|
-
}
|
|
1574
|
-
function r(n, o, a) {
|
|
1575
|
-
let c = "", s = 0, u = !1, h = 0;
|
|
1576
|
-
for (let g = 0; g < n.length; g++) {
|
|
1577
|
-
const d = Math.floor(g % o), f = Math.floor(g / o);
|
|
1578
|
-
!d && !u && (u = !0), n[g] ? (h++, g > 0 && d > 0 && n[g - 1] || (c += u ? i("M", d + a, 0.5 + f + a) : i("m", s, 0), s = 0, u = !1), d + 1 < o && n[g + 1] || (c += i("h", h), h = 0)) : s++;
|
|
1579
|
-
}
|
|
1580
|
-
return c;
|
|
1581
|
-
}
|
|
1582
|
-
return Be.render = function(o, a, c) {
|
|
1583
|
-
const s = e.getOptions(a), u = o.modules.size, h = o.modules.data, g = u + s.margin * 2, d = s.color.light.a ? "<path " + t(s.color.light, "fill") + ' d="M0 0h' + g + "v" + g + 'H0z"/>' : "", f = "<path " + t(s.color.dark, "stroke") + ' d="' + r(h, u, s.margin) + '"/>', M = 'viewBox="0 0 ' + g + " " + g + '"', P = '<svg xmlns="http://www.w3.org/2000/svg" ' + (s.width ? 'width="' + s.width + '" height="' + s.width + '" ' : "") + M + ' shape-rendering="crispEdges">' + d + f + `</svg>
|
|
1584
|
-
`;
|
|
1585
|
-
return typeof c == "function" && c(null, P), P;
|
|
1586
|
-
}, Be;
|
|
1587
|
-
}
|
|
1588
|
-
var gt;
|
|
1589
|
-
function Vn() {
|
|
1590
|
-
if (gt) return Y;
|
|
1591
|
-
gt = 1;
|
|
1592
|
-
const e = En(), t = _n(), i = On(), r = qn();
|
|
1593
|
-
function n(o, a, c, s, u) {
|
|
1594
|
-
const h = [].slice.call(arguments, 1), g = h.length, d = typeof h[g - 1] == "function";
|
|
1595
|
-
if (!d && !e())
|
|
1596
|
-
throw new Error("Callback required as last argument");
|
|
1597
|
-
if (d) {
|
|
1598
|
-
if (g < 2)
|
|
1599
|
-
throw new Error("Too few arguments provided");
|
|
1600
|
-
g === 2 ? (u = c, c = a, a = s = void 0) : g === 3 && (a.getContext && typeof u > "u" ? (u = s, s = void 0) : (u = s, s = c, c = a, a = void 0));
|
|
1601
|
-
} else {
|
|
1602
|
-
if (g < 1)
|
|
1603
|
-
throw new Error("Too few arguments provided");
|
|
1604
|
-
return g === 1 ? (c = a, a = s = void 0) : g === 2 && !a.getContext && (s = c, c = a, a = void 0), new Promise(function(f, M) {
|
|
1605
|
-
try {
|
|
1606
|
-
const E = t.create(c, s);
|
|
1607
|
-
f(o(E, a, s));
|
|
1608
|
-
} catch (E) {
|
|
1609
|
-
M(E);
|
|
1610
|
-
}
|
|
1611
|
-
});
|
|
1612
|
-
}
|
|
1613
|
-
try {
|
|
1614
|
-
const f = t.create(c, s);
|
|
1615
|
-
u(null, o(f, a, s));
|
|
1616
|
-
} catch (f) {
|
|
1617
|
-
u(f);
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
return Y.create = t.create, Y.toCanvas = n.bind(null, i.render), Y.toDataURL = n.bind(null, i.renderToDataURL), Y.toString = n.bind(null, function(o, a, c) {
|
|
1621
|
-
return r.render(o, c);
|
|
1622
|
-
}), Y;
|
|
1623
|
-
}
|
|
1624
|
-
var zn = Vn();
|
|
1625
|
-
const Hn = ({
|
|
1626
|
-
value: e,
|
|
1627
|
-
size: t = 150,
|
|
1628
|
-
bgColor: i = "#ffffff",
|
|
1629
|
-
fgColor: r = "#000000"
|
|
1630
|
-
}) => {
|
|
1631
|
-
const [n, o] = _("");
|
|
1632
|
-
return L(() => {
|
|
1633
|
-
e && zn.toString(e, {
|
|
1634
|
-
type: "svg",
|
|
1635
|
-
width: t,
|
|
1636
|
-
margin: 0,
|
|
1637
|
-
color: {
|
|
1638
|
-
dark: r,
|
|
1639
|
-
light: i
|
|
1640
|
-
}
|
|
1641
|
-
}).then(o).catch(() => o(""));
|
|
1642
|
-
}, [e, t, i, r]), n ? /* @__PURE__ */ l(
|
|
1643
|
-
"div",
|
|
1644
|
-
{
|
|
1645
|
-
class: "IncodeRedirectQrCode",
|
|
1646
|
-
dangerouslySetInnerHTML: { __html: n }
|
|
1647
|
-
}
|
|
1648
|
-
) : null;
|
|
1649
|
-
}, Kn = ({ redirectUrl: e }) => {
|
|
1650
|
-
const { t } = F();
|
|
1651
|
-
return /* @__PURE__ */ l(ne, { children: [
|
|
1652
|
-
/* @__PURE__ */ l("p", { class: "IncodeRedirectTabDescription", children: t("v2.redirectToMobile.qr.description") }),
|
|
1653
|
-
/* @__PURE__ */ l("div", { class: "IncodeRedirectQrWrapper", children: /* @__PURE__ */ l(Hn, { value: e, size: 186 }) })
|
|
1654
|
-
] });
|
|
1655
|
-
}, Gn = ({
|
|
1656
|
-
formattedPhone: e,
|
|
1657
|
-
onResend: t,
|
|
1658
|
-
onChangePhone: i
|
|
1659
|
-
}) => {
|
|
1660
|
-
const { t: r } = F();
|
|
1661
|
-
return /* @__PURE__ */ l("div", { class: "IncodeRedirectLinkSent", children: [
|
|
1662
|
-
/* @__PURE__ */ l(Mt, { size: 32 }),
|
|
1663
|
-
/* @__PURE__ */ l(X, { size: 16 }),
|
|
1664
|
-
/* @__PURE__ */ l("h2", { class: "IncodeRedirectLinkSentTitle", children: r("redirect.linkSent") }),
|
|
1665
|
-
/* @__PURE__ */ l(X, { size: 12 }),
|
|
1666
|
-
/* @__PURE__ */ l("p", { class: "IncodeRedirectLinkSentPhone", children: r("redirect.linkSentTo", { phone: e }) }),
|
|
1667
|
-
/* @__PURE__ */ l(X, { size: 32 }),
|
|
1668
|
-
/* @__PURE__ */ l("div", { class: "IncodeRedirectLinkSentActions", children: /* @__PURE__ */ l(
|
|
1669
|
-
Wt,
|
|
1670
|
-
{
|
|
1671
|
-
i18nKey: "redirect.didntReceiveLinkActions",
|
|
1672
|
-
defaultValue: "Didn't receive the link? <resend>Resend</resend> or <changePhone>Change phone number</changePhone>",
|
|
1673
|
-
components: {
|
|
1674
|
-
resend: /* @__PURE__ */ l(Z, { variant: "link", onClick: t }),
|
|
1675
|
-
changePhone: /* @__PURE__ */ l(Z, { variant: "link", onClick: i })
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
) })
|
|
1679
|
-
] });
|
|
1680
|
-
}, Yn = zt(
|
|
1681
|
-
() => import("../phoneInput-CGr8TxOO.js").then((e) => ({ default: e.PhoneInput }))
|
|
1682
|
-
), jn = ({
|
|
1683
|
-
countryCode: e,
|
|
1684
|
-
phonePrefix: t,
|
|
1685
|
-
error: i,
|
|
1686
|
-
isSending: r,
|
|
1687
|
-
isPhoneValid: n,
|
|
1688
|
-
onPhoneChange: o,
|
|
1689
|
-
onSendSms: a
|
|
1690
|
-
}) => {
|
|
1691
|
-
const { t: c } = F();
|
|
1692
|
-
return /* @__PURE__ */ l(ne, { children: [
|
|
1693
|
-
/* @__PURE__ */ l(Ht, { fallback: /* @__PURE__ */ l(J, {}), children: /* @__PURE__ */ l(
|
|
1694
|
-
Yn,
|
|
1695
|
-
{
|
|
1696
|
-
countryCode: e,
|
|
1697
|
-
phonePrefix: t,
|
|
1698
|
-
phoneError: i,
|
|
1699
|
-
disabled: r,
|
|
1700
|
-
autoFocus: !0,
|
|
1701
|
-
onPhoneChange: o
|
|
1702
|
-
}
|
|
1703
|
-
) }),
|
|
1704
|
-
/* @__PURE__ */ l(
|
|
1705
|
-
Z,
|
|
1706
|
-
{
|
|
1707
|
-
onClick: a,
|
|
1708
|
-
disabled: !n || r,
|
|
1709
|
-
isLoading: r,
|
|
1710
|
-
class: "IncodeRedirectSmsSendButton",
|
|
1711
|
-
children: c("redirect.sendLinkViaSms")
|
|
1712
|
-
}
|
|
1713
|
-
)
|
|
1714
|
-
] });
|
|
1715
|
-
}, xn = (e, t) => {
|
|
1716
|
-
if (!e.startsWith(t)) return e;
|
|
1717
|
-
const i = e.slice(t.length);
|
|
1718
|
-
return `${t} ${i.replace(/(\d{3})(?=\d)/g, "$1 ")}`;
|
|
1719
|
-
}, Jn = ({
|
|
1720
|
-
phonePrefix: e,
|
|
1721
|
-
smsSent: t,
|
|
1722
|
-
error: i,
|
|
1723
|
-
manager: r,
|
|
1724
|
-
onResend: n
|
|
1725
|
-
}) => {
|
|
1726
|
-
const { t: o } = F(), [a, c] = _(e), [s, u] = _(!1), [h, g] = _(!1), d = Qt(e)?.code ?? "", f = xn(a, e), M = x((I, m) => {
|
|
1727
|
-
c(I), u(m);
|
|
1728
|
-
}, []), E = x(() => {
|
|
1729
|
-
g(!0), r.sendSms(a), g(!1);
|
|
1730
|
-
}, [r, a]), P = x(() => {
|
|
1731
|
-
E(), n();
|
|
1732
|
-
}, [E, n]), A = x(() => {
|
|
1733
|
-
c(e), u(!1), r.resetSms();
|
|
1734
|
-
}, [r, e]);
|
|
1735
|
-
return /* @__PURE__ */ l(ne, { children: [
|
|
1736
|
-
/* @__PURE__ */ l("p", { class: "IncodeRedirectTabDescription", children: o("v2.redirectToMobile.sms.description") }),
|
|
1737
|
-
t ? /* @__PURE__ */ l(
|
|
1738
|
-
Gn,
|
|
1739
|
-
{
|
|
1740
|
-
formattedPhone: f,
|
|
1741
|
-
onResend: P,
|
|
1742
|
-
onChangePhone: A
|
|
1743
|
-
}
|
|
1744
|
-
) : /* @__PURE__ */ l(
|
|
1745
|
-
jn,
|
|
1746
|
-
{
|
|
1747
|
-
countryCode: d,
|
|
1748
|
-
phonePrefix: e,
|
|
1749
|
-
error: i,
|
|
1750
|
-
isSending: h,
|
|
1751
|
-
isPhoneValid: s,
|
|
1752
|
-
onPhoneChange: M,
|
|
1753
|
-
onSendSms: E
|
|
1754
|
-
}
|
|
1755
|
-
)
|
|
1756
|
-
] });
|
|
1757
|
-
}, Qn = ({
|
|
1758
|
-
redirectUrl: e,
|
|
1759
|
-
phonePrefix: t,
|
|
1760
|
-
smsSent: i,
|
|
1761
|
-
disableSmsOption: r,
|
|
1762
|
-
addContinueToDesktop: n,
|
|
1763
|
-
error: o,
|
|
1764
|
-
manager: a,
|
|
1765
|
-
logoSrc: c
|
|
1766
|
-
}) => {
|
|
1767
|
-
const { t: s } = F(), [u, h] = _(!1), g = x(() => {
|
|
1768
|
-
h(!0), setTimeout(() => h(!1), 3e3);
|
|
1769
|
-
}, []), d = x(() => {
|
|
1770
|
-
a.continueOnDesktop();
|
|
1771
|
-
}, [a]);
|
|
1772
|
-
return /* @__PURE__ */ l("div", { class: "IncodeRedirectContainer", children: [
|
|
1773
|
-
/* @__PURE__ */ l(In, { visible: u }),
|
|
1774
|
-
/* @__PURE__ */ l("div", { class: "IncodeRedirectCard", children: [
|
|
1775
|
-
/* @__PURE__ */ l(Cn, { logoSrc: c }),
|
|
1776
|
-
/* @__PURE__ */ l("div", { class: "IncodeRedirectOptions", children: /* @__PURE__ */ l(
|
|
1777
|
-
G,
|
|
1778
|
-
{
|
|
1779
|
-
defaultValue: "qr",
|
|
1780
|
-
listClassName: "IncodeRedirectTabs",
|
|
1781
|
-
triggerClassName: "IncodeRedirectTab",
|
|
1782
|
-
activeTriggerClassName: "IncodeRedirectTabActive",
|
|
1783
|
-
children: [
|
|
1784
|
-
/* @__PURE__ */ l(G.List, { children: [
|
|
1785
|
-
/* @__PURE__ */ l(G.Trigger, { value: "qr", children: s("v2.redirectToMobile.tabs.0") }),
|
|
1786
|
-
r ? null : /* @__PURE__ */ l(G.Trigger, { value: "sms", children: s("v2.redirectToMobile.tabs.1") })
|
|
1787
|
-
] }),
|
|
1788
|
-
/* @__PURE__ */ l(G.Content, { value: "qr", children: /* @__PURE__ */ l(Kn, { redirectUrl: e }) }),
|
|
1789
|
-
r ? null : /* @__PURE__ */ l(G.Content, { value: "sms", children: /* @__PURE__ */ l(
|
|
1790
|
-
Jn,
|
|
1791
|
-
{
|
|
1792
|
-
phonePrefix: t,
|
|
1793
|
-
smsSent: i,
|
|
1794
|
-
error: o,
|
|
1795
|
-
manager: a,
|
|
1796
|
-
onResend: g
|
|
1797
|
-
}
|
|
1798
|
-
) })
|
|
1799
|
-
]
|
|
1800
|
-
}
|
|
1801
|
-
) }),
|
|
1802
|
-
/* @__PURE__ */ l(
|
|
1803
|
-
wn,
|
|
1804
|
-
{
|
|
1805
|
-
addContinueToDesktop: n,
|
|
1806
|
-
onContinueOnDesktop: d
|
|
1807
|
-
}
|
|
1808
|
-
)
|
|
1809
|
-
] })
|
|
1810
|
-
] });
|
|
1811
|
-
}, Wn = ({
|
|
1812
|
-
title: e,
|
|
1813
|
-
subtitle: t,
|
|
1814
|
-
logoSrc: i
|
|
1815
|
-
}) => {
|
|
1816
|
-
const { t: r } = F(), n = e ?? r("verificationComplete.title"), o = t ?? r("verificationComplete.message");
|
|
1817
|
-
return /* @__PURE__ */ l("div", { class: "IncodeRedirectFinishedContainer", children: [
|
|
1818
|
-
/* @__PURE__ */ l("img", { src: i, alt: "Logo", class: "IncodeRedirectLogo" }),
|
|
1819
|
-
n ? /* @__PURE__ */ l("h1", { class: "IncodeRedirectFinishedTitle", children: n }) : null,
|
|
1820
|
-
o ? /* @__PURE__ */ l("p", { class: "IncodeRedirectFinishedSubtitle", children: o }) : null
|
|
1821
|
-
] });
|
|
1822
|
-
}, Xn = ({
|
|
1823
|
-
config: e,
|
|
1824
|
-
onFinish: t,
|
|
1825
|
-
onContinue: i,
|
|
1826
|
-
onError: r
|
|
1827
|
-
}) => {
|
|
1828
|
-
const [n, o] = It(
|
|
1829
|
-
() => Yt({ config: e })
|
|
1830
|
-
), { logoSrc: a, logoHeightPx: c } = xt({
|
|
1831
|
-
hideHeader: void 0,
|
|
1832
|
-
hideFooterBranding: void 0,
|
|
1833
|
-
logo: void 0,
|
|
1834
|
-
defaultLogoSrc: Jt
|
|
1835
|
-
});
|
|
1836
|
-
L(() => {
|
|
1837
|
-
n.status === "finished" && t?.();
|
|
1838
|
-
}, [n.status, t]), L(() => {
|
|
1839
|
-
n.status === "closed" && i?.();
|
|
1840
|
-
}, [n.status, i]), L(() => {
|
|
1841
|
-
n.status === "error" && r?.(n.error);
|
|
1842
|
-
}, [n.status, r, n]);
|
|
1843
|
-
const s = n.status === "idle" || n.status === "loading" ? /* @__PURE__ */ l(J, { fullScreen: !0 }) : n.status === "redirecting" ? /* @__PURE__ */ l(
|
|
1844
|
-
Qn,
|
|
1845
|
-
{
|
|
1846
|
-
redirectUrl: n.redirectUrl,
|
|
1847
|
-
phonePrefix: n.phonePrefix,
|
|
1848
|
-
smsSent: n.smsSent,
|
|
1849
|
-
disableSmsOption: e.disableSmsOption ?? !1,
|
|
1850
|
-
addContinueToDesktop: e.addContinueToDesktop ?? !1,
|
|
1851
|
-
error: n.error,
|
|
1852
|
-
manager: o,
|
|
1853
|
-
logoSrc: a
|
|
1854
|
-
}
|
|
1855
|
-
) : n.status === "finished" ? /* @__PURE__ */ l(Wn, { logoSrc: a }) : null;
|
|
1856
|
-
return /* @__PURE__ */ l(
|
|
1857
|
-
"div",
|
|
1858
|
-
{
|
|
1859
|
-
class: "IncodeRedirectRoot",
|
|
1860
|
-
style: { "--logo-height": `${c}px` },
|
|
1861
|
-
children: s
|
|
1862
|
-
}
|
|
1863
|
-
);
|
|
1864
|
-
}, vt = ({
|
|
1865
|
-
config: e,
|
|
1866
|
-
onFinish: t,
|
|
1867
|
-
onContinue: i,
|
|
1868
|
-
onError: r
|
|
1869
|
-
}) => /* @__PURE__ */ l(wt, { children: e ? /* @__PURE__ */ l(
|
|
1870
|
-
Xn,
|
|
1871
|
-
{
|
|
1872
|
-
config: e,
|
|
1873
|
-
onFinish: t,
|
|
1874
|
-
onContinue: i,
|
|
1875
|
-
onError: r
|
|
1876
|
-
}
|
|
1877
|
-
) : null });
|
|
1878
|
-
Tt(vt, "incode-redirect-to-mobile");
|
|
1879
|
-
function Zn(e) {
|
|
1880
|
-
let t = e.replace("#", "");
|
|
1881
|
-
t.length === 3 && (t = t.split("").map((g) => g + g).join(""));
|
|
1882
|
-
const i = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
1883
|
-
if (!i) return null;
|
|
1884
|
-
const r = Number.parseInt(i[1], 16) / 255, n = Number.parseInt(i[2], 16) / 255, o = Number.parseInt(i[3], 16) / 255, a = Math.max(r, n, o), c = Math.min(r, n, o);
|
|
1885
|
-
let s = 0, u = 0;
|
|
1886
|
-
const h = (a + c) / 2;
|
|
1887
|
-
if (a !== c) {
|
|
1888
|
-
const g = a - c;
|
|
1889
|
-
switch (u = h > 0.5 ? g / (2 - a - c) : g / (a + c), a) {
|
|
1890
|
-
case r:
|
|
1891
|
-
s = ((n - o) / g + (n < o ? 6 : 0)) / 6;
|
|
1892
|
-
break;
|
|
1893
|
-
case n:
|
|
1894
|
-
s = ((o - r) / g + 2) / 6;
|
|
1895
|
-
break;
|
|
1896
|
-
case o:
|
|
1897
|
-
s = ((r - n) / g + 4) / 6;
|
|
1898
|
-
break;
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
return { h: s * 360, s: u * 100, l: h * 100 };
|
|
1902
|
-
}
|
|
1903
|
-
function j(e, t, i) {
|
|
1904
|
-
const r = e / 360, n = t / 100, o = i / 100;
|
|
1905
|
-
let a, c, s;
|
|
1906
|
-
if (n === 0)
|
|
1907
|
-
a = c = s = o;
|
|
1908
|
-
else {
|
|
1909
|
-
const h = (f, M, E) => (E < 0 && (E += 1), E > 1 && (E -= 1), E < 0.16666666666666666 ? f + (M - f) * 6 * E : E < 0.5 ? M : E < 0.6666666666666666 ? f + (M - f) * (0.6666666666666666 - E) * 6 : f), g = o < 0.5 ? o * (1 + n) : o + n - o * n, d = 2 * o - g;
|
|
1910
|
-
a = h(d, g, r + 1 / 3), c = h(d, g, r), s = h(d, g, r - 1 / 3);
|
|
1911
|
-
}
|
|
1912
|
-
const u = (h) => {
|
|
1913
|
-
const g = Math.round(h * 255).toString(16);
|
|
1914
|
-
return g.length === 1 ? `0${g}` : g;
|
|
1915
|
-
};
|
|
1916
|
-
return `#${u(a)}${u(c)}${u(s)}`;
|
|
1917
|
-
}
|
|
1918
|
-
function $n(e) {
|
|
1919
|
-
const t = Zn(e);
|
|
1920
|
-
if (!t)
|
|
1921
|
-
throw new Error(`Invalid color format: ${e}`);
|
|
1922
|
-
return {
|
|
1923
|
-
50: j(t.h, t.s, 95),
|
|
1924
|
-
200: j(t.h, t.s, 80),
|
|
1925
|
-
300: j(t.h, t.s, 65),
|
|
1926
|
-
400: j(t.h, t.s, Math.min(100, t.l + 10)),
|
|
1927
|
-
500: e,
|
|
1928
|
-
600: j(t.h, t.s, Math.max(0, t.l - 10)),
|
|
1929
|
-
900: j(t.h, t.s, 20)
|
|
1930
|
-
};
|
|
1931
|
-
}
|
|
1932
|
-
function er(e, t) {
|
|
1933
|
-
if (typeof document > "u")
|
|
1934
|
-
return;
|
|
1935
|
-
const i = $n(e);
|
|
1936
|
-
let r = document.getElementById(
|
|
1937
|
-
"incode-theme"
|
|
1938
|
-
);
|
|
1939
|
-
r || (r = document.createElement("style"), r.id = "incode-theme", document.head.appendChild(r));
|
|
1940
|
-
const n = t || "#ffffff", o = `
|
|
1617
|
+
//#endregion
|
|
1618
|
+
//#region src/styles/applyTheme.ts
|
|
1619
|
+
function tt(e, t) {
|
|
1620
|
+
if (typeof document > "u") return;
|
|
1621
|
+
let n = et(e), r = document.getElementById("incode-theme");
|
|
1622
|
+
r || (r = document.createElement("style"), r.id = "incode-theme", document.head.appendChild(r));
|
|
1623
|
+
let i = t || "#ffffff", a = `
|
|
1941
1624
|
:root,
|
|
1942
1625
|
:host {
|
|
1943
|
-
--primitive-color-brand-50: ${
|
|
1944
|
-
--primitive-color-brand-200: ${
|
|
1945
|
-
--primitive-color-brand-300: ${
|
|
1946
|
-
--primitive-color-brand-400: ${
|
|
1947
|
-
--primitive-color-brand-500: ${
|
|
1948
|
-
--primitive-color-brand-600: ${
|
|
1949
|
-
--primitive-color-brand-900: ${
|
|
1950
|
-
--button-primary-text-default: ${
|
|
1626
|
+
--primitive-color-brand-50: ${n[50]};
|
|
1627
|
+
--primitive-color-brand-200: ${n[200]};
|
|
1628
|
+
--primitive-color-brand-300: ${n[300]};
|
|
1629
|
+
--primitive-color-brand-400: ${n[400]};
|
|
1630
|
+
--primitive-color-brand-500: ${n[500]};
|
|
1631
|
+
--primitive-color-brand-600: ${n[600]};
|
|
1632
|
+
--primitive-color-brand-900: ${n[900]};
|
|
1633
|
+
--button-primary-text-default: ${i};
|
|
1951
1634
|
}
|
|
1952
1635
|
`;
|
|
1953
|
-
|
|
1636
|
+
r.textContent = a;
|
|
1954
1637
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
1638
|
+
//#endregion
|
|
1639
|
+
//#region src/styles/fetchTheme.ts
|
|
1640
|
+
async function nt() {
|
|
1641
|
+
return (await E.get("/omni/asset/fetch-all")).data;
|
|
1957
1642
|
}
|
|
1958
|
-
|
|
1959
|
-
async function
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
});
|
|
1969
|
-
return mt.set(e, n), n;
|
|
1643
|
+
var H = /* @__PURE__ */ new Map();
|
|
1644
|
+
async function rt(e) {
|
|
1645
|
+
if (e.startsWith("data:")) return e;
|
|
1646
|
+
let t = H.get(e);
|
|
1647
|
+
if (t) return t;
|
|
1648
|
+
let n = await (await fetch(e)).blob(), r = await new Promise((e, t) => {
|
|
1649
|
+
let r = new FileReader();
|
|
1650
|
+
r.onloadend = () => e(r.result), r.onerror = t, r.readAsDataURL(n);
|
|
1651
|
+
});
|
|
1652
|
+
return H.set(e, r), r;
|
|
1970
1653
|
}
|
|
1971
|
-
async function
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
let o = n;
|
|
1986
|
-
return n && (o = await nr(n)), {
|
|
1987
|
-
...r,
|
|
1988
|
-
logo: o
|
|
1989
|
-
};
|
|
1654
|
+
async function it() {
|
|
1655
|
+
let e = await nt();
|
|
1656
|
+
if (!e.theme) throw Error("Theme URL not found in assets response");
|
|
1657
|
+
let t = e.theme, n = t.startsWith("http://") || t.startsWith("https://"), r;
|
|
1658
|
+
if (n) {
|
|
1659
|
+
let e = await fetch(t);
|
|
1660
|
+
if (!e.ok) throw Error(`Failed to fetch theme: ${e.statusText}`);
|
|
1661
|
+
r = await e.json();
|
|
1662
|
+
} else r = (await E.get(t)).data;
|
|
1663
|
+
let i = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || r.logo, a = i;
|
|
1664
|
+
return i && (a = await rt(i)), {
|
|
1665
|
+
...r,
|
|
1666
|
+
logo: a
|
|
1667
|
+
};
|
|
1990
1668
|
}
|
|
1991
|
-
async function
|
|
1992
|
-
|
|
1993
|
-
|
|
1669
|
+
async function at() {
|
|
1670
|
+
let e = await it();
|
|
1671
|
+
return e.main && tt(e.main, e.buttonColor), e;
|
|
1994
1672
|
}
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
COMBINED_CONSENT: () => import("../consent/consent.es.js").then((e) => e.Consent),
|
|
2018
|
-
MANDATORY_CONSENT: () => import("../mandatoryConsent-5xPI0cor.js").then(
|
|
2019
|
-
(e) => e.MandatoryConsent
|
|
2020
|
-
),
|
|
2021
|
-
SIGNATURE: () => import("../signature/signature.es.js").then((e) => e.Signature),
|
|
2022
|
-
ANTIFRAUD: () => import("../antifraud/antifraud.es.js").then((e) => e.Antifraud)
|
|
1673
|
+
//#endregion
|
|
1674
|
+
//#region src/modules/flow/flowInit.ts
|
|
1675
|
+
var U = () => import("../id/id.es.js").then((e) => e.Id), W = {
|
|
1676
|
+
PHONE: () => import("../phone/phone.es.js").then((e) => e.Phone),
|
|
1677
|
+
EMAIL: () => import("../email/email.es.js").then((e) => e.Email),
|
|
1678
|
+
SELFIE: () => import("../selfie/selfie.es.js").then((e) => e.Selfie),
|
|
1679
|
+
AUTHENTICATION: () => import("../authentication/authentication.es.js").then((e) => e.Authentication),
|
|
1680
|
+
ID: U,
|
|
1681
|
+
TUTORIAL_ID: U,
|
|
1682
|
+
SECOND_ID: U,
|
|
1683
|
+
FACE_MATCH: () => import("../faceMatch-DH8sLx34.js").then((e) => e.FaceMatch),
|
|
1684
|
+
CURP_VALIDATION: () => import("../curp-validation/curp-validation.es.js").then((e) => e.CurpValidation),
|
|
1685
|
+
GOVT_VALIDATION_PROVISIONING: () => import("../governmentValidation/governmentValidation.es.js").then((e) => e.GovernmentValidation),
|
|
1686
|
+
GEOLOCATION: () => import("../geolocation/geolocation.es.js").then((e) => e.Geolocation),
|
|
1687
|
+
EXTERNAL_VERIFICATION: () => import("../ekycModule-hxIcNX8n.js").then((e) => e.EkycModule),
|
|
1688
|
+
EKYB: () => import("../ekybModule-BBOm1y49.js").then((e) => e.EkybModule),
|
|
1689
|
+
DOCUMENT_CAPTURE: () => import("../documentCapture-wDgRLdon.js").then((e) => e.DocumentCapture),
|
|
1690
|
+
ADDRESS: () => import("../documentCapture-wDgRLdon.js").then((e) => e.DocumentCapture),
|
|
1691
|
+
COMBINED_CONSENT: () => import("../consent/consent.es.js").then((e) => e.Consent),
|
|
1692
|
+
MANDATORY_CONSENT: () => import("../mandatoryConsent-LBS8E0rj.js").then((e) => e.MandatoryConsent),
|
|
1693
|
+
SIGNATURE: () => import("../signature/signature.es.js").then((e) => e.Signature),
|
|
1694
|
+
ANTIFRAUD: () => import("../antifraud/antifraud.es.js").then((e) => e.Antifraud)
|
|
2023
1695
|
};
|
|
2024
|
-
function
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
}
|
|
2047
|
-
});
|
|
1696
|
+
function G() {
|
|
1697
|
+
return ue({ modules: {
|
|
1698
|
+
PHONE: me,
|
|
1699
|
+
EMAIL: le,
|
|
1700
|
+
SELFIE: he,
|
|
1701
|
+
AUTHENTICATION: ie,
|
|
1702
|
+
ID: k,
|
|
1703
|
+
TUTORIAL_ID: k,
|
|
1704
|
+
SECOND_ID: k,
|
|
1705
|
+
FACE_MATCH: fe,
|
|
1706
|
+
CURP_VALIDATION: oe,
|
|
1707
|
+
GOVT_VALIDATION_PROVISIONING: ge,
|
|
1708
|
+
GEOLOCATION: pe,
|
|
1709
|
+
EXTERNAL_VERIFICATION: ce,
|
|
1710
|
+
EKYB: se,
|
|
1711
|
+
DOCUMENT_CAPTURE: O,
|
|
1712
|
+
ADDRESS: O,
|
|
1713
|
+
COMBINED_CONSENT: ae,
|
|
1714
|
+
MANDATORY_CONSENT: _e,
|
|
1715
|
+
SIGNATURE: ve,
|
|
1716
|
+
ANTIFRAUD: re
|
|
1717
|
+
} });
|
|
2048
1718
|
}
|
|
2049
|
-
async function
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
1719
|
+
async function K(e) {
|
|
1720
|
+
await m({
|
|
1721
|
+
apiURL: e.apiURL,
|
|
1722
|
+
token: e.token,
|
|
1723
|
+
wasm: !1,
|
|
1724
|
+
i18n: { lang: e.lang ?? "en" }
|
|
1725
|
+
});
|
|
2056
1726
|
}
|
|
2057
|
-
async function
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
1727
|
+
async function q() {
|
|
1728
|
+
try {
|
|
1729
|
+
let e = await at(), t = {
|
|
1730
|
+
logoSrc: e.logo,
|
|
1731
|
+
hideFooterBranding: e.hideFooterBranding
|
|
1732
|
+
};
|
|
1733
|
+
return p(t), {
|
|
1734
|
+
theme: e,
|
|
1735
|
+
uiConfig: t
|
|
1736
|
+
};
|
|
1737
|
+
} catch {
|
|
1738
|
+
return {};
|
|
1739
|
+
}
|
|
2067
1740
|
}
|
|
2068
|
-
function
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
console.error("WASM warmup failed:", n);
|
|
2077
|
-
});
|
|
2078
|
-
}
|
|
1741
|
+
function J(e, t) {
|
|
1742
|
+
let n = D(e.flow);
|
|
1743
|
+
n.length > 0 && ne(te({
|
|
1744
|
+
...t,
|
|
1745
|
+
pipelines: n
|
|
1746
|
+
})).catch((e) => {
|
|
1747
|
+
console.error("WASM warmup failed:", e);
|
|
1748
|
+
});
|
|
2079
1749
|
}
|
|
2080
|
-
function
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
}
|
|
1750
|
+
function ot(e) {
|
|
1751
|
+
let t = e.currentStep;
|
|
1752
|
+
if (t) {
|
|
1753
|
+
let e = W[t];
|
|
1754
|
+
e && e().catch(() => {});
|
|
1755
|
+
}
|
|
2087
1756
|
}
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
1757
|
+
//#endregion
|
|
1758
|
+
//#region src/modules/flow/unsupportedModule.tsx
|
|
1759
|
+
var st = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ d("section", {
|
|
1760
|
+
class: "IncodeUnsupportedModule",
|
|
1761
|
+
"aria-live": "polite",
|
|
1762
|
+
children: /* @__PURE__ */ d("div", {
|
|
1763
|
+
class: "IncodeUnsupportedModuleContent",
|
|
1764
|
+
children: [
|
|
1765
|
+
/* @__PURE__ */ d("h2", {
|
|
1766
|
+
class: "IncodeUnsupportedModuleTitle",
|
|
1767
|
+
children: "Module not available"
|
|
1768
|
+
}),
|
|
1769
|
+
/* @__PURE__ */ d("p", {
|
|
1770
|
+
class: "IncodeUnsupportedModuleMessage",
|
|
1771
|
+
children: [
|
|
1772
|
+
"The \"",
|
|
1773
|
+
e,
|
|
1774
|
+
"\" module is not yet supported in this version."
|
|
1775
|
+
]
|
|
1776
|
+
}),
|
|
1777
|
+
/* @__PURE__ */ d(S, {
|
|
1778
|
+
onClick: t,
|
|
1779
|
+
class: "IncodeUnsupportedModuleButton",
|
|
1780
|
+
"data-testid": "unsupported-module-next-button",
|
|
1781
|
+
children: "Next"
|
|
1782
|
+
})
|
|
1783
|
+
]
|
|
1784
|
+
})
|
|
1785
|
+
}), Y = /* @__PURE__ */ new Map();
|
|
1786
|
+
function X(e) {
|
|
1787
|
+
let t = Y.get(e);
|
|
1788
|
+
if (!t) throw Error("Preload state not found");
|
|
1789
|
+
return {
|
|
1790
|
+
get isReady() {
|
|
1791
|
+
return t.status === "ready";
|
|
1792
|
+
},
|
|
1793
|
+
get error() {
|
|
1794
|
+
return t.status === "error" ? t.error ?? null : null;
|
|
1795
|
+
},
|
|
1796
|
+
async waitUntilReady() {
|
|
1797
|
+
if (t.status !== "ready") {
|
|
1798
|
+
if (t.status === "error") throw Error(t.error ?? "Preload failed");
|
|
1799
|
+
return t.readyPromise;
|
|
1800
|
+
}
|
|
1801
|
+
},
|
|
1802
|
+
cancel() {
|
|
1803
|
+
t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), Y.delete(e));
|
|
1804
|
+
}
|
|
1805
|
+
};
|
|
2130
1806
|
}
|
|
2131
|
-
function
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
s instanceof Error ? s : new Error("Failed to preload")
|
|
2165
|
-
), V.delete(t);
|
|
2166
|
-
}
|
|
2167
|
-
})(), pt(t);
|
|
1807
|
+
function ct(e) {
|
|
1808
|
+
let { token: t } = e;
|
|
1809
|
+
if (Y.has(t)) return X(t);
|
|
1810
|
+
let n, r, i = new Promise((e, t) => {
|
|
1811
|
+
n = e, r = t;
|
|
1812
|
+
}), a = G(), o = {
|
|
1813
|
+
status: "loading",
|
|
1814
|
+
flowManager: a,
|
|
1815
|
+
config: e,
|
|
1816
|
+
readyPromise: i,
|
|
1817
|
+
readyResolve: n,
|
|
1818
|
+
readyReject: r
|
|
1819
|
+
};
|
|
1820
|
+
return Y.set(t, o), (async () => {
|
|
1821
|
+
try {
|
|
1822
|
+
await K({
|
|
1823
|
+
apiURL: e.apiURL,
|
|
1824
|
+
token: e.token,
|
|
1825
|
+
lang: e.lang
|
|
1826
|
+
});
|
|
1827
|
+
let t = e.disableDashboardTheme ? Promise.resolve({}) : q().then((e) => {
|
|
1828
|
+
o.theme = e.theme, o.uiConfig = e.uiConfig;
|
|
1829
|
+
});
|
|
1830
|
+
o.unsubscribe = a.subscribe((t) => {
|
|
1831
|
+
if (t.status === "ready") {
|
|
1832
|
+
let n = t;
|
|
1833
|
+
e.wasmConfig && J(n, e.wasmConfig), ot(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
|
|
1834
|
+
} else t.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = t.error, o.readyReject(Error(t.error)));
|
|
1835
|
+
}), a.load(), await t;
|
|
1836
|
+
} catch (e) {
|
|
1837
|
+
o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), Y.delete(t);
|
|
1838
|
+
}
|
|
1839
|
+
})(), X(t);
|
|
2168
1840
|
}
|
|
2169
|
-
function
|
|
2170
|
-
|
|
1841
|
+
function Z(e) {
|
|
1842
|
+
return Y.get(e) ?? null;
|
|
2171
1843
|
}
|
|
2172
|
-
function
|
|
2173
|
-
|
|
2174
|
-
|
|
1844
|
+
function Q(e) {
|
|
1845
|
+
let t = Z(e);
|
|
1846
|
+
return t && Y.delete(e), t;
|
|
2175
1847
|
}
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
1848
|
+
//#endregion
|
|
1849
|
+
//#region src/modules/flow/useFlowInitialization.ts
|
|
1850
|
+
function lt(e) {
|
|
1851
|
+
let { apiURL: t, token: n, lang: r, disableDashboardTheme: a, onError: o } = e, s = c(null), [l, d] = u(() => {
|
|
1852
|
+
let e = Z(n);
|
|
1853
|
+
if (e?.status === "ready") {
|
|
1854
|
+
let e = Q(n);
|
|
1855
|
+
if (e) return s.current = e.flowManager, e.uiConfig && p(e.uiConfig), {
|
|
1856
|
+
status: "ready",
|
|
1857
|
+
flowManager: e.flowManager
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
let t = G();
|
|
1861
|
+
return s.current = t, e?.status === "error" ? {
|
|
1862
|
+
status: "error",
|
|
1863
|
+
error: e.error ?? "Preload failed",
|
|
1864
|
+
flowManager: t
|
|
1865
|
+
} : {
|
|
1866
|
+
status: "initializing",
|
|
1867
|
+
flowManager: t
|
|
1868
|
+
};
|
|
1869
|
+
}), f = c(!1);
|
|
1870
|
+
return i(() => {
|
|
1871
|
+
if (l.status !== "initializing") return;
|
|
1872
|
+
let e = Z(n);
|
|
1873
|
+
if (e?.status === "loading") {
|
|
1874
|
+
e.readyPromise.then(() => {
|
|
1875
|
+
let e = Q(n);
|
|
1876
|
+
e && (s.current = e.flowManager, e.uiConfig && p(e.uiConfig), d({
|
|
1877
|
+
status: "ready",
|
|
1878
|
+
flowManager: e.flowManager
|
|
1879
|
+
}));
|
|
1880
|
+
}).catch((e) => {
|
|
1881
|
+
let t = e instanceof Error ? e.message : "Preload failed";
|
|
1882
|
+
d({
|
|
1883
|
+
status: "error",
|
|
1884
|
+
error: t,
|
|
1885
|
+
flowManager: l.flowManager
|
|
1886
|
+
}), o?.(t);
|
|
1887
|
+
});
|
|
1888
|
+
return;
|
|
1889
|
+
}
|
|
1890
|
+
f.current || (f.current = !0, (async () => {
|
|
1891
|
+
try {
|
|
1892
|
+
await K({
|
|
1893
|
+
apiURL: t,
|
|
1894
|
+
token: n,
|
|
1895
|
+
lang: r
|
|
1896
|
+
});
|
|
1897
|
+
let e = a ? Promise.resolve() : q().then((e) => {
|
|
1898
|
+
e.uiConfig && p(e.uiConfig);
|
|
1899
|
+
});
|
|
1900
|
+
l.flowManager.load(), await e, d({
|
|
1901
|
+
status: "ready",
|
|
1902
|
+
flowManager: l.flowManager
|
|
1903
|
+
});
|
|
1904
|
+
} catch (e) {
|
|
1905
|
+
let t = e instanceof Error ? e.message : "Failed to initialize SDK";
|
|
1906
|
+
d({
|
|
1907
|
+
status: "error",
|
|
1908
|
+
error: t,
|
|
1909
|
+
flowManager: l.flowManager
|
|
1910
|
+
}), o?.(t);
|
|
1911
|
+
}
|
|
1912
|
+
})());
|
|
1913
|
+
}, [
|
|
1914
|
+
t,
|
|
1915
|
+
n,
|
|
1916
|
+
r,
|
|
1917
|
+
a,
|
|
1918
|
+
o,
|
|
1919
|
+
l
|
|
1920
|
+
]), l;
|
|
2228
1921
|
}
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
1922
|
+
//#endregion
|
|
1923
|
+
//#region src/modules/flow/useModuleLoader.ts
|
|
1924
|
+
function ut(e) {
|
|
1925
|
+
let { moduleKey: t, onModuleLoading: n, onModuleLoaded: r, onError: a } = e, [o, s] = u({ status: "idle" });
|
|
1926
|
+
return i(() => {
|
|
1927
|
+
if (!t) {
|
|
1928
|
+
s({ status: "idle" });
|
|
1929
|
+
return;
|
|
1930
|
+
}
|
|
1931
|
+
let e = W[t];
|
|
1932
|
+
if (!e) {
|
|
1933
|
+
s({
|
|
1934
|
+
status: "unsupported",
|
|
1935
|
+
moduleKey: t
|
|
1936
|
+
});
|
|
1937
|
+
return;
|
|
1938
|
+
}
|
|
1939
|
+
s({
|
|
1940
|
+
status: "loading",
|
|
1941
|
+
moduleKey: t
|
|
1942
|
+
}), n?.(t);
|
|
1943
|
+
let i = !1;
|
|
1944
|
+
return e().then((e) => {
|
|
1945
|
+
i || (s({
|
|
1946
|
+
status: "loaded",
|
|
1947
|
+
moduleKey: t,
|
|
1948
|
+
Component: e
|
|
1949
|
+
}), r?.(t));
|
|
1950
|
+
}).catch((e) => {
|
|
1951
|
+
if (!i) {
|
|
1952
|
+
let n = e instanceof Error ? e.message : "Failed to load module";
|
|
1953
|
+
s({
|
|
1954
|
+
status: "error",
|
|
1955
|
+
moduleKey: t,
|
|
1956
|
+
error: n
|
|
1957
|
+
}), a?.(`Failed to load ${t}: ${n}`);
|
|
1958
|
+
}
|
|
1959
|
+
}), () => {
|
|
1960
|
+
i = !0;
|
|
1961
|
+
};
|
|
1962
|
+
}, [
|
|
1963
|
+
t,
|
|
1964
|
+
n,
|
|
1965
|
+
r,
|
|
1966
|
+
a
|
|
1967
|
+
]), o;
|
|
2254
1968
|
}
|
|
2255
|
-
function
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
1969
|
+
function dt(e, t) {
|
|
1970
|
+
let n = c(/* @__PURE__ */ new Set());
|
|
1971
|
+
i(() => {
|
|
1972
|
+
if (t < e.length - 1) {
|
|
1973
|
+
let r = e[t + 1];
|
|
1974
|
+
if (r && !n.current.has(r)) {
|
|
1975
|
+
n.current.add(r);
|
|
1976
|
+
let e = W[r];
|
|
1977
|
+
e && e().catch(() => {
|
|
1978
|
+
n.current.delete(r);
|
|
1979
|
+
});
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
}, [e, t]);
|
|
2269
1983
|
}
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
{
|
|
2586
|
-
config: p,
|
|
2587
|
-
onFinish: () => u.completeModule(),
|
|
2588
|
-
onError: (B) => {
|
|
2589
|
-
i?.(B ?? "eKYB verification error");
|
|
2590
|
-
}
|
|
2591
|
-
},
|
|
2592
|
-
`ekyb-${s.currentStepIndex}`
|
|
2593
|
-
) });
|
|
2594
|
-
}
|
|
2595
|
-
if (d === "COMBINED_CONSENT")
|
|
2596
|
-
return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
|
|
2597
|
-
I,
|
|
2598
|
-
{
|
|
2599
|
-
config: f,
|
|
2600
|
-
onFinish: () => u.completeModule(),
|
|
2601
|
-
onError: (p) => {
|
|
2602
|
-
i?.(p ?? "Combined consent error");
|
|
2603
|
-
}
|
|
2604
|
-
},
|
|
2605
|
-
`combined-consent-${s.currentStepIndex}`
|
|
2606
|
-
) });
|
|
2607
|
-
if (d === "MANDATORY_CONSENT")
|
|
2608
|
-
return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
|
|
2609
|
-
I,
|
|
2610
|
-
{
|
|
2611
|
-
config: f,
|
|
2612
|
-
onFinish: () => u.completeModule(),
|
|
2613
|
-
onError: (p) => {
|
|
2614
|
-
i?.(p ?? "Mandatory consent error");
|
|
2615
|
-
}
|
|
2616
|
-
},
|
|
2617
|
-
`mandatory-consent-${s.currentStepIndex}`
|
|
2618
|
-
) });
|
|
2619
|
-
}
|
|
2620
|
-
return null;
|
|
2621
|
-
}, dr = ({
|
|
2622
|
-
config: e,
|
|
2623
|
-
onFinish: t = () => {
|
|
2624
|
-
},
|
|
2625
|
-
onError: i
|
|
2626
|
-
}) => /* @__PURE__ */ l(wt, { children: e ? /* @__PURE__ */ l(
|
|
2627
|
-
ur,
|
|
2628
|
-
{
|
|
2629
|
-
config: e,
|
|
2630
|
-
onFinish: t,
|
|
2631
|
-
onError: i
|
|
2632
|
-
}
|
|
2633
|
-
) : null });
|
|
2634
|
-
Tt(dr, "incode-flow");
|
|
2635
|
-
export {
|
|
2636
|
-
dr as IncodeFlow,
|
|
2637
|
-
Hr as preloadIncodeFlow
|
|
2638
|
-
};
|
|
1984
|
+
//#endregion
|
|
1985
|
+
//#region src/modules/flow/flow.tsx
|
|
1986
|
+
var ft = ({ config: e, onFinish: n, onError: r }) => {
|
|
1987
|
+
let { t: a, i18n: o } = t(), [s, c] = u(!1), l = lt({
|
|
1988
|
+
apiURL: e.apiURL,
|
|
1989
|
+
token: e.token,
|
|
1990
|
+
lang: e.lang,
|
|
1991
|
+
disableDashboardTheme: e.disableDashboardTheme,
|
|
1992
|
+
onError: r
|
|
1993
|
+
}), [f, p] = h(() => l.flowManager, { autoLoad: !1 }), m = f?.status === "ready" && f.flow.redirectDesktopToMobile && !s, g = ut({
|
|
1994
|
+
moduleKey: f?.status === "ready" && !m ? f.currentStep : void 0,
|
|
1995
|
+
onModuleLoading: e.onModuleLoading,
|
|
1996
|
+
onModuleLoaded: e.onModuleLoaded,
|
|
1997
|
+
onError: r
|
|
1998
|
+
});
|
|
1999
|
+
if (dt(f?.status === "ready" ? f.steps : [], f?.status === "ready" ? f.currentStepIndex : -1), i(() => {
|
|
2000
|
+
e.lang && o.language !== e.lang && o.changeLanguage(e.lang);
|
|
2001
|
+
}, [e.lang, o]), i(() => {
|
|
2002
|
+
if (f?.status === "ready" && e.wasmConfig) {
|
|
2003
|
+
let t = f, n = D(t.flow);
|
|
2004
|
+
n.length > 0 && (e.onWasmWarmup?.(n), J(t, e.wasmConfig));
|
|
2005
|
+
}
|
|
2006
|
+
}, [f, e]), i(() => {
|
|
2007
|
+
f?.status === "finished" && n(f.finishStatus);
|
|
2008
|
+
}, [
|
|
2009
|
+
f?.status,
|
|
2010
|
+
n,
|
|
2011
|
+
f
|
|
2012
|
+
]), i(() => {
|
|
2013
|
+
f?.status === "error" && r && r(f.error);
|
|
2014
|
+
}, [
|
|
2015
|
+
f?.status,
|
|
2016
|
+
r,
|
|
2017
|
+
f
|
|
2018
|
+
]), i(() => {
|
|
2019
|
+
f?.status === "ready" && f.currentStep === "ID" && f.steps.includes("TUTORIAL_ID") && p.completeModule();
|
|
2020
|
+
}, [f, p]), l.status === "error") return /* @__PURE__ */ d("div", {
|
|
2021
|
+
class: "IncodeFlow",
|
|
2022
|
+
children: /* @__PURE__ */ d("div", { children: ["Error: ", l.error] })
|
|
2023
|
+
});
|
|
2024
|
+
if (l.status === "initializing" || !f || f.status === "idle" || f.status === "loading") return /* @__PURE__ */ d("div", {
|
|
2025
|
+
class: "IncodeFlow",
|
|
2026
|
+
children: /* @__PURE__ */ d(C, {
|
|
2027
|
+
title: e.spinnerConfig?.title,
|
|
2028
|
+
subtitle: e.spinnerConfig?.subtitle,
|
|
2029
|
+
size: e.spinnerConfig?.size,
|
|
2030
|
+
fullScreen: !0
|
|
2031
|
+
})
|
|
2032
|
+
});
|
|
2033
|
+
if (f.status === "error") return /* @__PURE__ */ d("div", {
|
|
2034
|
+
class: "IncodeFlow",
|
|
2035
|
+
children: /* @__PURE__ */ d("div", { children: ["Error: ", f.error] })
|
|
2036
|
+
});
|
|
2037
|
+
if (f.status === "finished") return null;
|
|
2038
|
+
if (f.status === "ready") {
|
|
2039
|
+
let { currentStep: t, config: n, flow: { flowId: i, disableSmsOption: o, addContinueToDesktop: s, qrPhishingResistance: l } } = f;
|
|
2040
|
+
if (m) return /* @__PURE__ */ d("div", {
|
|
2041
|
+
class: "IncodeFlow",
|
|
2042
|
+
children: /* @__PURE__ */ d(B, {
|
|
2043
|
+
config: {
|
|
2044
|
+
flowId: i,
|
|
2045
|
+
disableSmsOption: o,
|
|
2046
|
+
addContinueToDesktop: s,
|
|
2047
|
+
qrPhishingResistance: l,
|
|
2048
|
+
authHint: e.authHint,
|
|
2049
|
+
lang: e.lang
|
|
2050
|
+
},
|
|
2051
|
+
onFinish: () => p.completeFlow(),
|
|
2052
|
+
onContinue: () => c(!0),
|
|
2053
|
+
onError: r
|
|
2054
|
+
})
|
|
2055
|
+
});
|
|
2056
|
+
if (!t || !n) return /* @__PURE__ */ d("div", {
|
|
2057
|
+
class: "IncodeFlow",
|
|
2058
|
+
children: /* @__PURE__ */ d(C, {
|
|
2059
|
+
title: e.spinnerConfig?.title ?? a("loadingCircle.hangOn"),
|
|
2060
|
+
subtitle: e.spinnerConfig?.subtitle ?? a("loadingCircle.validating"),
|
|
2061
|
+
size: e.spinnerConfig?.size,
|
|
2062
|
+
fullScreen: !0
|
|
2063
|
+
})
|
|
2064
|
+
});
|
|
2065
|
+
if (g.status === "unsupported") return /* @__PURE__ */ d("div", {
|
|
2066
|
+
class: "IncodeFlow",
|
|
2067
|
+
children: /* @__PURE__ */ d(st, {
|
|
2068
|
+
moduleKey: t,
|
|
2069
|
+
onNext: () => p.completeModule()
|
|
2070
|
+
})
|
|
2071
|
+
});
|
|
2072
|
+
if (g.status === "idle" || g.status === "loading" || g.status === "error") return /* @__PURE__ */ d("div", {
|
|
2073
|
+
class: "IncodeFlow",
|
|
2074
|
+
children: /* @__PURE__ */ d(C, {
|
|
2075
|
+
title: e.spinnerConfig?.title ?? a("loadingCircle.hangOn"),
|
|
2076
|
+
subtitle: e.spinnerConfig?.subtitle ?? a("loadingCircle.validating"),
|
|
2077
|
+
size: e.spinnerConfig?.size,
|
|
2078
|
+
fullScreen: !0
|
|
2079
|
+
})
|
|
2080
|
+
});
|
|
2081
|
+
let { Component: u } = g;
|
|
2082
|
+
if (t === "SELFIE") return /* @__PURE__ */ d("div", {
|
|
2083
|
+
class: "IncodeFlow",
|
|
2084
|
+
children: /* @__PURE__ */ d(u, {
|
|
2085
|
+
config: n,
|
|
2086
|
+
onFinish: () => p.completeModule(),
|
|
2087
|
+
onError: (e) => {
|
|
2088
|
+
r?.(e ?? "Selfie verification error");
|
|
2089
|
+
}
|
|
2090
|
+
}, `selfie-${f.currentStepIndex}`)
|
|
2091
|
+
});
|
|
2092
|
+
if (t === "AUTHENTICATION") return /* @__PURE__ */ d("div", {
|
|
2093
|
+
class: "IncodeFlow",
|
|
2094
|
+
children: /* @__PURE__ */ d(u, {
|
|
2095
|
+
config: {
|
|
2096
|
+
...n,
|
|
2097
|
+
authHint: e.authHint
|
|
2098
|
+
},
|
|
2099
|
+
onFinish: () => p.completeModule(),
|
|
2100
|
+
onError: (e) => {
|
|
2101
|
+
r?.(e ?? "Authentication error");
|
|
2102
|
+
}
|
|
2103
|
+
}, `authentication-${f.currentStepIndex}`)
|
|
2104
|
+
});
|
|
2105
|
+
if (t === "PHONE") return /* @__PURE__ */ d("div", {
|
|
2106
|
+
class: "IncodeFlow",
|
|
2107
|
+
children: /* @__PURE__ */ d(u, {
|
|
2108
|
+
config: n,
|
|
2109
|
+
onFinish: () => p.completeModule(),
|
|
2110
|
+
onError: (e) => {
|
|
2111
|
+
r?.(e ?? "Phone verification error");
|
|
2112
|
+
}
|
|
2113
|
+
}, `phone-${f.currentStepIndex}`)
|
|
2114
|
+
});
|
|
2115
|
+
if (t === "EMAIL") {
|
|
2116
|
+
let e = n;
|
|
2117
|
+
return !e || typeof e.otpVerification != "boolean" || typeof e.otpExpirationInMinutes != "number" ? /* @__PURE__ */ d("div", {
|
|
2118
|
+
class: "IncodeFlow",
|
|
2119
|
+
children: /* @__PURE__ */ d("div", { children: "Error: Invalid email configuration" })
|
|
2120
|
+
}) : /* @__PURE__ */ d("div", {
|
|
2121
|
+
class: "IncodeFlow",
|
|
2122
|
+
children: /* @__PURE__ */ d(u, {
|
|
2123
|
+
config: {
|
|
2124
|
+
...e,
|
|
2125
|
+
prefill: e.prefill ?? !1
|
|
2126
|
+
},
|
|
2127
|
+
onFinish: () => p.completeModule(),
|
|
2128
|
+
onError: (e) => {
|
|
2129
|
+
r?.(e ?? "Email verification error");
|
|
2130
|
+
}
|
|
2131
|
+
}, `email-${f.currentStepIndex}`)
|
|
2132
|
+
});
|
|
2133
|
+
}
|
|
2134
|
+
if (t === "TUTORIAL_ID" || t === "SECOND_ID" || t === "ID" && !f.steps.includes("TUTORIAL_ID")) {
|
|
2135
|
+
let e = n;
|
|
2136
|
+
return /* @__PURE__ */ d("div", {
|
|
2137
|
+
class: "IncodeFlow",
|
|
2138
|
+
children: /* @__PURE__ */ d(u, {
|
|
2139
|
+
config: t === "SECOND_ID" ? {
|
|
2140
|
+
...e,
|
|
2141
|
+
isSecondId: !0
|
|
2142
|
+
} : e,
|
|
2143
|
+
onFinish: () => p.completeModule(),
|
|
2144
|
+
onError: (e) => {
|
|
2145
|
+
r?.(e ?? "ID capture error");
|
|
2146
|
+
}
|
|
2147
|
+
}, `id-${f.currentStepIndex}`)
|
|
2148
|
+
});
|
|
2149
|
+
}
|
|
2150
|
+
if (t === "FACE_MATCH") {
|
|
2151
|
+
let e = n;
|
|
2152
|
+
return /* @__PURE__ */ d("div", {
|
|
2153
|
+
class: "IncodeFlow",
|
|
2154
|
+
children: /* @__PURE__ */ d(u, {
|
|
2155
|
+
config: {
|
|
2156
|
+
variant: e.matchingType,
|
|
2157
|
+
disableFaceMatchAnimation: e.disableFaceMatchAnimation ?? !1
|
|
2158
|
+
},
|
|
2159
|
+
onFinish: () => p.completeModule(),
|
|
2160
|
+
onError: (e) => {
|
|
2161
|
+
r?.(e ?? "Face match error");
|
|
2162
|
+
}
|
|
2163
|
+
}, `face-match-${f.currentStepIndex}`)
|
|
2164
|
+
});
|
|
2165
|
+
}
|
|
2166
|
+
if (t === "CURP_VALIDATION") return /* @__PURE__ */ d("div", {
|
|
2167
|
+
class: "IncodeFlow",
|
|
2168
|
+
children: /* @__PURE__ */ d(u, {
|
|
2169
|
+
config: n,
|
|
2170
|
+
onFinish: () => p.completeModule(),
|
|
2171
|
+
onError: (e) => {
|
|
2172
|
+
r?.(e ?? "CURP validation error");
|
|
2173
|
+
}
|
|
2174
|
+
}, `curp-validation-${f.currentStepIndex}`)
|
|
2175
|
+
});
|
|
2176
|
+
if (t === "GOVT_VALIDATION_PROVISIONING") return /* @__PURE__ */ d("div", {
|
|
2177
|
+
class: "IncodeFlow",
|
|
2178
|
+
children: /* @__PURE__ */ d(u, {
|
|
2179
|
+
config: n,
|
|
2180
|
+
onFinish: () => p.completeModule(),
|
|
2181
|
+
onError: (e) => {
|
|
2182
|
+
r?.(e ?? "Government validation error");
|
|
2183
|
+
}
|
|
2184
|
+
}, `govt-validation-${f.currentStepIndex}`)
|
|
2185
|
+
});
|
|
2186
|
+
if (t === "GEOLOCATION") return /* @__PURE__ */ d("div", {
|
|
2187
|
+
class: "IncodeFlow",
|
|
2188
|
+
children: /* @__PURE__ */ d(u, {
|
|
2189
|
+
config: { allowSkip: n.allowUserToSkipGeolocation },
|
|
2190
|
+
onFinish: () => p.completeModule(),
|
|
2191
|
+
onError: (e) => {
|
|
2192
|
+
r?.(e ?? "Geolocation error");
|
|
2193
|
+
}
|
|
2194
|
+
}, `geolocation-${f.currentStepIndex}`)
|
|
2195
|
+
});
|
|
2196
|
+
if (t === "EXTERNAL_VERIFICATION") return /* @__PURE__ */ d("div", {
|
|
2197
|
+
class: "IncodeFlow",
|
|
2198
|
+
children: /* @__PURE__ */ d(u, {
|
|
2199
|
+
config: { flowId: f.flow.flowId },
|
|
2200
|
+
onFinish: () => p.completeModule(),
|
|
2201
|
+
onError: (e) => {
|
|
2202
|
+
r?.(e ?? "External verification error");
|
|
2203
|
+
}
|
|
2204
|
+
}, `ekyc-${f.currentStepIndex}`)
|
|
2205
|
+
});
|
|
2206
|
+
if (t === "DOCUMENT_CAPTURE") return /* @__PURE__ */ d("div", {
|
|
2207
|
+
class: "IncodeFlow",
|
|
2208
|
+
children: /* @__PURE__ */ d(u, {
|
|
2209
|
+
config: n,
|
|
2210
|
+
onFinish: () => p.completeModule(),
|
|
2211
|
+
onError: (e) => {
|
|
2212
|
+
r?.(e ?? "Document capture error");
|
|
2213
|
+
}
|
|
2214
|
+
}, `document-capture-${f.currentStepIndex}`)
|
|
2215
|
+
});
|
|
2216
|
+
if (t === "ADDRESS") {
|
|
2217
|
+
let e = n;
|
|
2218
|
+
return /* @__PURE__ */ d("div", {
|
|
2219
|
+
class: "IncodeFlow",
|
|
2220
|
+
children: /* @__PURE__ */ d(u, {
|
|
2221
|
+
config: {
|
|
2222
|
+
processingType: "addressStatement",
|
|
2223
|
+
allowSkipDocumentCapture: !e.disableSkipPoa,
|
|
2224
|
+
title: e.title,
|
|
2225
|
+
text: e.text
|
|
2226
|
+
},
|
|
2227
|
+
onFinish: () => p.completeModule(),
|
|
2228
|
+
onError: (e) => {
|
|
2229
|
+
r?.(e ?? "Address capture error");
|
|
2230
|
+
}
|
|
2231
|
+
}, `address-${f.currentStepIndex}`)
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
if (t === "SIGNATURE") {
|
|
2235
|
+
let e = n;
|
|
2236
|
+
return /* @__PURE__ */ d("div", {
|
|
2237
|
+
class: "IncodeFlow",
|
|
2238
|
+
children: /* @__PURE__ */ d(u, {
|
|
2239
|
+
config: {
|
|
2240
|
+
title: e.title || void 0,
|
|
2241
|
+
subtitle: e.subTitle || void 0
|
|
2242
|
+
},
|
|
2243
|
+
onFinish: () => p.completeModule(),
|
|
2244
|
+
onError: (e) => {
|
|
2245
|
+
r?.(e ?? "Signature capture error");
|
|
2246
|
+
}
|
|
2247
|
+
}, `signature-${f.currentStepIndex}`)
|
|
2248
|
+
});
|
|
2249
|
+
}
|
|
2250
|
+
if (t === "EKYB") {
|
|
2251
|
+
let e = n;
|
|
2252
|
+
return /* @__PURE__ */ d("div", {
|
|
2253
|
+
class: "IncodeFlow",
|
|
2254
|
+
children: /* @__PURE__ */ d(u, {
|
|
2255
|
+
config: {
|
|
2256
|
+
flowId: i,
|
|
2257
|
+
checkBusinessName: e.checkBusinessName,
|
|
2258
|
+
checkAddress: e.checkAddress,
|
|
2259
|
+
checkTaxId: e.checkTaxId,
|
|
2260
|
+
checkUniqueBeneficialOwner: e.checkUniqueBeneficialOwner
|
|
2261
|
+
},
|
|
2262
|
+
onFinish: () => p.completeModule(),
|
|
2263
|
+
onError: (e) => {
|
|
2264
|
+
r?.(e ?? "eKYB verification error");
|
|
2265
|
+
}
|
|
2266
|
+
}, `ekyb-${f.currentStepIndex}`)
|
|
2267
|
+
});
|
|
2268
|
+
}
|
|
2269
|
+
if (t === "COMBINED_CONSENT") return /* @__PURE__ */ d("div", {
|
|
2270
|
+
class: "IncodeFlow",
|
|
2271
|
+
children: /* @__PURE__ */ d(u, {
|
|
2272
|
+
config: n,
|
|
2273
|
+
onFinish: () => p.completeModule(),
|
|
2274
|
+
onError: (e) => {
|
|
2275
|
+
r?.(e ?? "Combined consent error");
|
|
2276
|
+
}
|
|
2277
|
+
}, `combined-consent-${f.currentStepIndex}`)
|
|
2278
|
+
});
|
|
2279
|
+
if (t === "MANDATORY_CONSENT") return /* @__PURE__ */ d("div", {
|
|
2280
|
+
class: "IncodeFlow",
|
|
2281
|
+
children: /* @__PURE__ */ d(u, {
|
|
2282
|
+
config: n,
|
|
2283
|
+
onFinish: () => p.completeModule(),
|
|
2284
|
+
onError: (e) => {
|
|
2285
|
+
r?.(e ?? "Mandatory consent error");
|
|
2286
|
+
}
|
|
2287
|
+
}, `mandatory-consent-${f.currentStepIndex}`)
|
|
2288
|
+
});
|
|
2289
|
+
}
|
|
2290
|
+
return null;
|
|
2291
|
+
}, $ = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ d(_, { children: e ? /* @__PURE__ */ d(ft, {
|
|
2292
|
+
config: e,
|
|
2293
|
+
onFinish: t,
|
|
2294
|
+
onError: n
|
|
2295
|
+
}) : null });
|
|
2296
|
+
T($, "incode-flow");
|
|
2297
|
+
//#endregion
|
|
2298
|
+
export { $ as IncodeFlow, ct as preloadIncodeFlow };
|