@incodetech/web 0.0.0-dev-20260403-eccc51c → 0.0.0-dev-20260407-4677d7f
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-t809rK3N.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-DrtZRYJX.js +123 -0
- package/dist/checkbox-kZerHUek.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-9zbxhNlX.js +94 -0
- package/dist/dateInputComposed-B36DI9FJ.js +2 -0
- package/dist/defineProperty-brqHEHA_.js +39 -0
- package/dist/document-capture/styles.css +1 -1
- package/dist/documentCapture-CY-g1OUT.js +784 -0
- package/dist/dropdownComposed-CWxUwv7E.js +258 -0
- package/dist/ekyb/ekyb.es.js +2 -0
- package/dist/ekyb/styles.css +1 -1
- package/dist/ekybModule-DGOhCY0S.js +286 -0
- package/dist/ekybModule-mBTq_Apn.js +2 -0
- package/dist/ekyc/ekyc.es.js +2 -0
- package/dist/ekyc/styles.css +1 -1
- package/dist/ekycModule-DZlqb6Bc.js +2 -0
- package/dist/ekycModule-rJxf46TS.js +233 -0
- package/dist/email/email.es.js +110 -154
- package/dist/email/styles.css +1 -1
- package/dist/extensibility-CcUfegWj.js +2248 -0
- package/dist/extensibility.es.js +22 -150
- package/dist/face-match/styles.css +147 -73
- package/dist/faceMatch-K9k9f1HF.js +191 -0
- package/dist/flip-animation-DOJzdXB-.js +6983 -0
- package/dist/flow/flow.es.js +2274 -2613
- package/dist/flow/styles.css +432 -73
- package/dist/formField-BBfAFfVZ.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-rPAh6ptN.js +77 -0
- package/dist/loadingIcon-BDMR5L6z.js +147 -0
- package/dist/mandatoryConsent-ohmxTqe7.js +101 -0
- package/dist/numberedStep-CQVRixRP.js +11 -0
- package/dist/otpInput-DRZiayDi.js +143 -0
- package/dist/page-M9yWRw73.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-CXTXBQ0B.js +407 -0
- package/dist/processing-yJ5QEgaC.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-BK2pIUzB.js +41 -0
- package/dist/spinner-DjG-sUzI.js +1 -0
- package/dist/successIcon-AHrfmJvv.js +17 -0
- package/dist/tutorial-C2kSUHWe.js +2781 -0
- package/dist/types/ekyb.d.ts +29 -0
- package/dist/types/ekyc.d.ts +29 -0
- package/dist/types/extensibility.d.ts +3 -5
- package/dist/types/flow.d.ts +1 -1
- package/dist/types/index.d.ts +2 -10
- package/dist/typography-BQrJwR60.js +1 -0
- package/dist/typography-BtyuWjzC.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
|
@@ -1,709 +1,559 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "
|
|
7
|
-
import "../
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
this._et = new EventTarget();
|
|
86
|
-
} catch {
|
|
87
|
-
this._et = document;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
addEventListener(o, n, t) {
|
|
91
|
-
this._et.addEventListener(o, n, t);
|
|
92
|
-
}
|
|
93
|
-
dispatchEvent(o) {
|
|
94
|
-
return this._et.dispatchEvent(o);
|
|
95
|
-
}
|
|
96
|
-
removeEventListener(o, n, t) {
|
|
97
|
-
this._et.removeEventListener(o, n, t);
|
|
98
|
-
}
|
|
1
|
+
import { n as e } from "../i18n-DZOHbK9q.js";
|
|
2
|
+
import { _ as t, a as n, d as r, h as i, l as a, p as o, u as s, v as c } from "../vendor-preact-D6SntenC.js";
|
|
3
|
+
import { c as l, r as u } from "../loadingIcon-BDMR5L6z.js";
|
|
4
|
+
import { t as d } from "../spacer-DCljE53A.js";
|
|
5
|
+
import { t as f } from "../button-DrtZRYJX.js";
|
|
6
|
+
import { t as p } from "../page-M9yWRw73.js";
|
|
7
|
+
import { r as m } from "../typography-BtyuWjzC.js";
|
|
8
|
+
import "../typography-BQrJwR60.js";
|
|
9
|
+
import { t as h } from "../successIcon-AHrfmJvv.js";
|
|
10
|
+
import { t as g } from "../incodeModule-Bf6yJ8RB.js";
|
|
11
|
+
import { t as _ } from "../defineProperty-brqHEHA_.js";
|
|
12
|
+
import { createSignatureManager as v } from "@incodetech/core/signature";
|
|
13
|
+
//#region ../../node_modules/.pnpm/signature_pad@5.1.3/node_modules/signature_pad/dist/signature_pad.js
|
|
14
|
+
var y = class {
|
|
15
|
+
constructor(e, t, n, r) {
|
|
16
|
+
if (_(this, "x", void 0), _(this, "y", void 0), _(this, "pressure", void 0), _(this, "time", void 0), isNaN(e) || isNaN(t)) throw Error(`Point is invalid: (${e}, ${t})`);
|
|
17
|
+
this.x = +e, this.y = +t, this.pressure = n || 0, this.time = r || Date.now();
|
|
18
|
+
}
|
|
19
|
+
distanceTo(e) {
|
|
20
|
+
return Math.sqrt((this.x - e.x) ** 2 + (this.y - e.y) ** 2);
|
|
21
|
+
}
|
|
22
|
+
equals(e) {
|
|
23
|
+
return this.x === e.x && this.y === e.y && this.pressure === e.pressure && this.time === e.time;
|
|
24
|
+
}
|
|
25
|
+
velocityFrom(e) {
|
|
26
|
+
return this.time === e.time ? 0 : this.distanceTo(e) / (this.time - e.time);
|
|
27
|
+
}
|
|
28
|
+
}, b = class e {
|
|
29
|
+
constructor(e, t, n, r, i, a) {
|
|
30
|
+
this.startPoint = e, this.control2 = t, this.control1 = n, this.endPoint = r, this.startWidth = i, this.endWidth = a;
|
|
31
|
+
}
|
|
32
|
+
static fromPoints(t, n) {
|
|
33
|
+
let r = this.calculateControlPoints(t[0], t[1], t[2]).c2, i = this.calculateControlPoints(t[1], t[2], t[3]).c1;
|
|
34
|
+
return new e(t[1], r, i, t[2], n.start, n.end);
|
|
35
|
+
}
|
|
36
|
+
static calculateControlPoints(e, t, n) {
|
|
37
|
+
let r = e.x - t.x, i = e.y - t.y, a = t.x - n.x, o = t.y - n.y, s = {
|
|
38
|
+
x: (e.x + t.x) / 2,
|
|
39
|
+
y: (e.y + t.y) / 2
|
|
40
|
+
}, c = {
|
|
41
|
+
x: (t.x + n.x) / 2,
|
|
42
|
+
y: (t.y + n.y) / 2
|
|
43
|
+
}, l = Math.sqrt(r * r + i * i), u = Math.sqrt(a * a + o * o), d = s.x - c.x, f = s.y - c.y, p = l + u == 0 ? 0 : u / (l + u), m = {
|
|
44
|
+
x: c.x + d * p,
|
|
45
|
+
y: c.y + f * p
|
|
46
|
+
}, h = t.x - m.x, g = t.y - m.y;
|
|
47
|
+
return {
|
|
48
|
+
c1: new y(s.x + h, s.y + g),
|
|
49
|
+
c2: new y(c.x + h, c.y + g)
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
length() {
|
|
53
|
+
let e = 0, t, n;
|
|
54
|
+
for (let r = 0; r <= 10; r += 1) {
|
|
55
|
+
let i = r / 10, a = this.point(i, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), o = this.point(i, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
|
|
56
|
+
if (r > 0) {
|
|
57
|
+
let r = a - t, i = o - n;
|
|
58
|
+
e += Math.sqrt(r * r + i * i);
|
|
59
|
+
}
|
|
60
|
+
t = a, n = o;
|
|
61
|
+
}
|
|
62
|
+
return e;
|
|
63
|
+
}
|
|
64
|
+
point(e, t, n, r, i) {
|
|
65
|
+
return t * (1 - e) * (1 - e) * (1 - e) + 3 * n * (1 - e) * (1 - e) * e + 3 * r * (1 - e) * e * e + i * e * e * e;
|
|
66
|
+
}
|
|
67
|
+
}, x = class {
|
|
68
|
+
constructor() {
|
|
69
|
+
_(this, "_et", void 0);
|
|
70
|
+
try {
|
|
71
|
+
this._et = new EventTarget();
|
|
72
|
+
} catch {
|
|
73
|
+
this._et = document;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
addEventListener(e, t, n) {
|
|
77
|
+
this._et.addEventListener(e, t, n);
|
|
78
|
+
}
|
|
79
|
+
dispatchEvent(e) {
|
|
80
|
+
return this._et.dispatchEvent(e);
|
|
81
|
+
}
|
|
82
|
+
removeEventListener(e, t, n) {
|
|
83
|
+
this._et.removeEventListener(e, t, n);
|
|
84
|
+
}
|
|
99
85
|
};
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
};
|
|
86
|
+
function S(e, t = 250) {
|
|
87
|
+
let n = 0, r = null, i, a, o, s = () => {
|
|
88
|
+
n = Date.now(), r = null, i = e.apply(a, o), r || (a = null, o = []);
|
|
89
|
+
};
|
|
90
|
+
return function(...c) {
|
|
91
|
+
let l = Date.now(), u = t - (l - n);
|
|
92
|
+
return a = this, o = c, u <= 0 || u > t ? (r &&= (clearTimeout(r), null), n = l, i = e.apply(a, o), r || (a = null, o = [])) : r ||= window.setTimeout(s, u), i;
|
|
93
|
+
};
|
|
109
94
|
}
|
|
110
|
-
var
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
|
|
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
|
-
ref: l,
|
|
576
|
-
children: [
|
|
577
|
-
/* @__PURE__ */ w(
|
|
578
|
-
"canvas",
|
|
579
|
-
{
|
|
580
|
-
class: "SignatureCanvas",
|
|
581
|
-
ref: h,
|
|
582
|
-
"aria-label": t
|
|
583
|
-
}
|
|
584
|
-
),
|
|
585
|
-
!n && /* @__PURE__ */ w("p", { class: "SignatureCanvasPlaceholder", children: t })
|
|
586
|
-
]
|
|
587
|
-
}
|
|
588
|
-
);
|
|
589
|
-
}
|
|
590
|
-
);
|
|
591
|
-
U.displayName = "SignatureCanvas";
|
|
592
|
-
const et = ({
|
|
593
|
-
config: o,
|
|
594
|
-
onFinish: n,
|
|
595
|
-
onError: t
|
|
596
|
-
}) => {
|
|
597
|
-
const { t: e } = B(), [i, s] = A(
|
|
598
|
-
() => G({ config: o }),
|
|
599
|
-
{ autoLoad: !0 }
|
|
600
|
-
), [a, l] = N(!1), h = P(null), c = P(void 0), d = z(() => {
|
|
601
|
-
if (i.status === "capture" || i.status === "submitting")
|
|
602
|
-
return i.phase;
|
|
603
|
-
}, [i]), r = i.status === "error" ? i.error : void 0, u = i.status === "submitting", f = i.status === "capture" && i.canContinue && !u, _ = W(() => {
|
|
604
|
-
h.current && (h.current.on(), h.current.clear(), l(!1), s.setSignatureValid(!1));
|
|
605
|
-
}, [s]);
|
|
606
|
-
E(() => {
|
|
607
|
-
i.status === "finished" && n?.();
|
|
608
|
-
}, [i.status, n]), E(() => {
|
|
609
|
-
r && (t?.(r), h.current?.on());
|
|
610
|
-
}, [r, t]), E(() => {
|
|
611
|
-
const p = c.current;
|
|
612
|
-
d && p && p !== d && (l(!1), s.setSignatureValid(!1), _()), c.current = d;
|
|
613
|
-
}, [d, s, _]);
|
|
614
|
-
const v = (p) => {
|
|
615
|
-
const x = o.title?.trim();
|
|
616
|
-
return x || e(p === "initials" ? "signature.initialsTitle" : "signature.fullSignatureTitle");
|
|
617
|
-
}, m = () => {
|
|
618
|
-
const p = o.subtitle?.trim();
|
|
619
|
-
return p || e("signature.subtitle");
|
|
620
|
-
}, y = async () => {
|
|
621
|
-
const p = h.current;
|
|
622
|
-
if (!p) return;
|
|
623
|
-
const x = p.getSignatureWithWhiteBackground();
|
|
624
|
-
return x ? o.sendBase64 ?? !1 ? x.toDataURL("image/png").replace(/^data:image\/png;base64,/, "") : p.getBlob(x) : void 0;
|
|
625
|
-
}, S = async () => {
|
|
626
|
-
const p = h.current;
|
|
627
|
-
if (!(!p || i.status !== "capture" || p.isEmpty())) {
|
|
628
|
-
p.off();
|
|
629
|
-
try {
|
|
630
|
-
const x = await y();
|
|
631
|
-
if (!x) {
|
|
632
|
-
p.on();
|
|
633
|
-
return;
|
|
634
|
-
}
|
|
635
|
-
s.submit(x);
|
|
636
|
-
} catch {
|
|
637
|
-
p.on();
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
return i.status === "idle" || i.status === "finished" || i.status === "error" ? null : i.status === "success" ? /* @__PURE__ */ w(T, { className: "IncodeSignature IncodeSignatureFadeIn", children: /* @__PURE__ */ w(
|
|
642
|
-
"div",
|
|
643
|
-
{
|
|
644
|
-
class: "IncodeSignatureContent IncodeSignatureSuccess",
|
|
645
|
-
role: "status",
|
|
646
|
-
children: [
|
|
647
|
-
/* @__PURE__ */ w(V, { size: 48 }),
|
|
648
|
-
/* @__PURE__ */ w(k, { size: 16 }),
|
|
649
|
-
/* @__PURE__ */ w(q, { children: e("signature.successTitle") })
|
|
650
|
-
]
|
|
651
|
-
}
|
|
652
|
-
) }) : /* @__PURE__ */ w(
|
|
653
|
-
T,
|
|
654
|
-
{
|
|
655
|
-
className: "IncodeSignature IncodeSignatureFadeIn",
|
|
656
|
-
title: v(d),
|
|
657
|
-
subtitle: m(),
|
|
658
|
-
children: [
|
|
659
|
-
/* @__PURE__ */ w("div", { class: "IncodeSignatureContent", children: [
|
|
660
|
-
/* @__PURE__ */ w(
|
|
661
|
-
U,
|
|
662
|
-
{
|
|
663
|
-
ref: h,
|
|
664
|
-
hasDrawing: a,
|
|
665
|
-
onBeginStroke: () => {
|
|
666
|
-
l(!0), s.setSignatureValid(!0);
|
|
667
|
-
},
|
|
668
|
-
placeholder: e(
|
|
669
|
-
d === "initials" ? "signature.initialsPlaceholder" : "signature.fullSignaturePlaceholder"
|
|
670
|
-
),
|
|
671
|
-
customBackgroundColor: o.canvasBackgroundColor,
|
|
672
|
-
customPenColor: o.penColor,
|
|
673
|
-
customPenStrokeWidth: o.penStrokeWidth
|
|
674
|
-
}
|
|
675
|
-
),
|
|
676
|
-
/* @__PURE__ */ w(k, { size: 8 }),
|
|
677
|
-
/* @__PURE__ */ w(
|
|
678
|
-
M,
|
|
679
|
-
{
|
|
680
|
-
variant: "link",
|
|
681
|
-
disabled: !a || u,
|
|
682
|
-
onClick: _,
|
|
683
|
-
children: e("signature.clear")
|
|
684
|
-
}
|
|
685
|
-
)
|
|
686
|
-
] }),
|
|
687
|
-
/* @__PURE__ */ w("div", { class: "IncodeSignatureButtonContainer", children: /* @__PURE__ */ w(
|
|
688
|
-
M,
|
|
689
|
-
{
|
|
690
|
-
disabled: !f,
|
|
691
|
-
isLoading: u,
|
|
692
|
-
onClick: S,
|
|
693
|
-
children: e(
|
|
694
|
-
d === "initials" ? "common.continue" : "signature.done"
|
|
695
|
-
)
|
|
696
|
-
}
|
|
697
|
-
) })
|
|
698
|
-
]
|
|
699
|
-
}
|
|
700
|
-
);
|
|
701
|
-
}, it = ({
|
|
702
|
-
config: o,
|
|
703
|
-
onFinish: n,
|
|
704
|
-
onError: t
|
|
705
|
-
}) => /* @__PURE__ */ w(I, { children: o ? /* @__PURE__ */ w(et, { config: o, onFinish: n, onError: t }) : null });
|
|
706
|
-
$(it, "incode-signature");
|
|
707
|
-
export {
|
|
708
|
-
it as Signature
|
|
709
|
-
};
|
|
95
|
+
var C = class e extends x {
|
|
96
|
+
constructor(t, n = {}) {
|
|
97
|
+
super(), _(this, "dotSize", void 0), _(this, "minWidth", void 0), _(this, "maxWidth", void 0), _(this, "penColor", void 0), _(this, "minDistance", void 0), _(this, "velocityFilterWeight", void 0), _(this, "compositeOperation", void 0), _(this, "backgroundColor", void 0), _(this, "throttle", void 0), _(this, "canvasContextOptions", void 0), _(this, "_ctx", void 0), _(this, "_drawingStroke", !1), _(this, "_isEmpty", !0), _(this, "_dataUrl", void 0), _(this, "_dataUrlOptions", void 0), _(this, "_lastPoints", []), _(this, "_data", []), _(this, "_lastVelocity", 0), _(this, "_lastWidth", 0), _(this, "_strokeMoveUpdate", void 0), _(this, "_strokePointerId", void 0), this.canvas = t, this.velocityFilterWeight = n.velocityFilterWeight || .7, this.minWidth = n.minWidth || .5, this.maxWidth = n.maxWidth || 2.5, this.throttle = n.throttle ?? 16, this.minDistance = n.minDistance ?? 5, this.dotSize = n.dotSize || 0, this.penColor = n.penColor || "black", this.backgroundColor = n.backgroundColor || "rgba(0,0,0,0)", this.compositeOperation = n.compositeOperation || "source-over", this.canvasContextOptions = n.canvasContextOptions ?? {}, this._strokeMoveUpdate = this.throttle ? S(e.prototype._strokeUpdate, this.throttle) : e.prototype._strokeUpdate, this._handleMouseDown = this._handleMouseDown.bind(this), this._handleMouseMove = this._handleMouseMove.bind(this), this._handleMouseUp = this._handleMouseUp.bind(this), this._handleTouchStart = this._handleTouchStart.bind(this), this._handleTouchMove = this._handleTouchMove.bind(this), this._handleTouchEnd = this._handleTouchEnd.bind(this), this._handlePointerDown = this._handlePointerDown.bind(this), this._handlePointerMove = this._handlePointerMove.bind(this), this._handlePointerUp = this._handlePointerUp.bind(this), this._handlePointerCancel = this._handlePointerCancel.bind(this), this._handleTouchCancel = this._handleTouchCancel.bind(this), this._ctx = t.getContext("2d", this.canvasContextOptions), this.clear(), this.on();
|
|
98
|
+
}
|
|
99
|
+
clear() {
|
|
100
|
+
let { _ctx: e, canvas: t } = this;
|
|
101
|
+
e.fillStyle = this.backgroundColor, e.clearRect(0, 0, t.width, t.height), e.fillRect(0, 0, t.width, t.height), this._data = [], this._reset(this._getPointGroupOptions()), this._isEmpty = !0, this._dataUrl = void 0, this._dataUrlOptions = void 0, this._strokePointerId = void 0;
|
|
102
|
+
}
|
|
103
|
+
redraw() {
|
|
104
|
+
let e = this._data, t = this._dataUrl, n = this._dataUrlOptions;
|
|
105
|
+
this.clear(), t && this.fromDataURL(t, n), this.fromData(e, { clear: !1 });
|
|
106
|
+
}
|
|
107
|
+
fromDataURL(e, t = {}) {
|
|
108
|
+
return new Promise((n, r) => {
|
|
109
|
+
let i = new Image(), a = t.ratio || window.devicePixelRatio || 1, o = t.width || this.canvas.width / a, s = t.height || this.canvas.height / a, c = t.xOffset || 0, l = t.yOffset || 0;
|
|
110
|
+
this._reset(this._getPointGroupOptions()), i.onload = () => {
|
|
111
|
+
this._ctx.drawImage(i, c, l, o, s), n();
|
|
112
|
+
}, i.onerror = (e) => {
|
|
113
|
+
r(e);
|
|
114
|
+
}, i.crossOrigin = "anonymous", i.src = e, this._isEmpty = !1, this._dataUrl = e, this._dataUrlOptions = { ...t };
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
toDataURL(e = "image/png", t) {
|
|
118
|
+
switch (e) {
|
|
119
|
+
case "image/svg+xml": return typeof t != "object" && (t = void 0), `data:image/svg+xml;base64,${btoa(this.toSVG(t))}`;
|
|
120
|
+
default: return typeof t != "number" && (t = void 0), this.canvas.toDataURL(e, t);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
on() {
|
|
124
|
+
this.canvas.style.touchAction = "none", this.canvas.style.msTouchAction = "none", this.canvas.style.userSelect = "none", this.canvas.style.webkitUserSelect = "none";
|
|
125
|
+
let e = /Macintosh/.test(navigator.userAgent) && "ontouchstart" in document;
|
|
126
|
+
window.PointerEvent && !e ? this._handlePointerEvents() : (this._handleMouseEvents(), "ontouchstart" in window && this._handleTouchEvents());
|
|
127
|
+
}
|
|
128
|
+
off() {
|
|
129
|
+
this.canvas.style.touchAction = "auto", this.canvas.style.msTouchAction = "auto", this.canvas.style.userSelect = "auto", this.canvas.style.webkitUserSelect = "auto", this.canvas.removeEventListener("pointerdown", this._handlePointerDown), this.canvas.removeEventListener("mousedown", this._handleMouseDown), this.canvas.removeEventListener("touchstart", this._handleTouchStart), this._removeMoveUpEventListeners();
|
|
130
|
+
}
|
|
131
|
+
_getListenerFunctions() {
|
|
132
|
+
let e = window.document === this.canvas.ownerDocument ? window : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;
|
|
133
|
+
return {
|
|
134
|
+
addEventListener: e.addEventListener.bind(e),
|
|
135
|
+
removeEventListener: e.removeEventListener.bind(e)
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
_removeMoveUpEventListeners() {
|
|
139
|
+
let { removeEventListener: e } = this._getListenerFunctions();
|
|
140
|
+
e("pointermove", this._handlePointerMove), e("pointerup", this._handlePointerUp), e("pointercancel", this._handlePointerCancel), e("mousemove", this._handleMouseMove), e("mouseup", this._handleMouseUp), e("touchmove", this._handleTouchMove), e("touchend", this._handleTouchEnd), e("touchcancel", this._handleTouchCancel);
|
|
141
|
+
}
|
|
142
|
+
isEmpty() {
|
|
143
|
+
return this._isEmpty;
|
|
144
|
+
}
|
|
145
|
+
fromData(e, { clear: t = !0 } = {}) {
|
|
146
|
+
t && this.clear(), this._fromData(e, this._drawCurve.bind(this), this._drawDot.bind(this)), this._data = this._data.concat(e);
|
|
147
|
+
}
|
|
148
|
+
toData() {
|
|
149
|
+
return this._data;
|
|
150
|
+
}
|
|
151
|
+
_isLeftButtonPressed(e, t) {
|
|
152
|
+
return t ? e.buttons === 1 : (e.buttons & 1) == 1;
|
|
153
|
+
}
|
|
154
|
+
_pointerEventToSignatureEvent(e) {
|
|
155
|
+
return {
|
|
156
|
+
event: e,
|
|
157
|
+
type: e.type,
|
|
158
|
+
x: e.clientX,
|
|
159
|
+
y: e.clientY,
|
|
160
|
+
pressure: "pressure" in e ? e.pressure : 0
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
_touchEventToSignatureEvent(e) {
|
|
164
|
+
let t = e.changedTouches[0];
|
|
165
|
+
return {
|
|
166
|
+
event: e,
|
|
167
|
+
type: e.type,
|
|
168
|
+
x: t.clientX,
|
|
169
|
+
y: t.clientY,
|
|
170
|
+
pressure: t.force
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
_handleMouseDown(e) {
|
|
174
|
+
!this._isLeftButtonPressed(e, !0) || this._drawingStroke || this._strokeBegin(this._pointerEventToSignatureEvent(e));
|
|
175
|
+
}
|
|
176
|
+
_handleMouseMove(e) {
|
|
177
|
+
if (!this._isLeftButtonPressed(e, !0) || !this._drawingStroke) {
|
|
178
|
+
this._strokeEnd(this._pointerEventToSignatureEvent(e), !1);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
this._strokeMoveUpdate(this._pointerEventToSignatureEvent(e));
|
|
182
|
+
}
|
|
183
|
+
_handleMouseUp(e) {
|
|
184
|
+
this._isLeftButtonPressed(e) || this._strokeEnd(this._pointerEventToSignatureEvent(e));
|
|
185
|
+
}
|
|
186
|
+
_handleTouchStart(e) {
|
|
187
|
+
e.targetTouches.length !== 1 || this._drawingStroke || (e.cancelable && e.preventDefault(), this._strokeBegin(this._touchEventToSignatureEvent(e)));
|
|
188
|
+
}
|
|
189
|
+
_handleTouchMove(e) {
|
|
190
|
+
if (e.targetTouches.length === 1) {
|
|
191
|
+
if (e.cancelable && e.preventDefault(), !this._drawingStroke) {
|
|
192
|
+
this._strokeEnd(this._touchEventToSignatureEvent(e), !1);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
this._strokeMoveUpdate(this._touchEventToSignatureEvent(e));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
_handleTouchEnd(e) {
|
|
199
|
+
e.targetTouches.length === 0 && (e.cancelable && e.preventDefault(), this._strokeEnd(this._touchEventToSignatureEvent(e)));
|
|
200
|
+
}
|
|
201
|
+
_handlePointerCancel(e) {
|
|
202
|
+
this._allowPointerId(e) && (e.preventDefault(), this._strokeEnd(this._pointerEventToSignatureEvent(e), !1));
|
|
203
|
+
}
|
|
204
|
+
_handleTouchCancel(e) {
|
|
205
|
+
e.cancelable && e.preventDefault(), this._strokeEnd(this._touchEventToSignatureEvent(e), !1);
|
|
206
|
+
}
|
|
207
|
+
_getPointerId(e) {
|
|
208
|
+
return e.persistentDeviceId || e.pointerId;
|
|
209
|
+
}
|
|
210
|
+
_allowPointerId(e, t = !1) {
|
|
211
|
+
return this._strokePointerId === void 0 ? t : this._getPointerId(e) === this._strokePointerId;
|
|
212
|
+
}
|
|
213
|
+
_handlePointerDown(e) {
|
|
214
|
+
this._drawingStroke || !this._isLeftButtonPressed(e) || !this._allowPointerId(e, !0) || (this._strokePointerId = this._getPointerId(e), e.preventDefault(), this._strokeBegin(this._pointerEventToSignatureEvent(e)));
|
|
215
|
+
}
|
|
216
|
+
_handlePointerMove(e) {
|
|
217
|
+
if (this._allowPointerId(e)) {
|
|
218
|
+
if (!this._isLeftButtonPressed(e, !0) || !this._drawingStroke) {
|
|
219
|
+
this._strokeEnd(this._pointerEventToSignatureEvent(e), !1);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
e.preventDefault(), this._strokeMoveUpdate(this._pointerEventToSignatureEvent(e));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
_handlePointerUp(e) {
|
|
226
|
+
this._isLeftButtonPressed(e) || !this._allowPointerId(e) || (e.preventDefault(), this._strokeEnd(this._pointerEventToSignatureEvent(e)));
|
|
227
|
+
}
|
|
228
|
+
_getPointGroupOptions(e) {
|
|
229
|
+
return {
|
|
230
|
+
penColor: e && "penColor" in e ? e.penColor : this.penColor,
|
|
231
|
+
dotSize: e && "dotSize" in e ? e.dotSize : this.dotSize,
|
|
232
|
+
minWidth: e && "minWidth" in e ? e.minWidth : this.minWidth,
|
|
233
|
+
maxWidth: e && "maxWidth" in e ? e.maxWidth : this.maxWidth,
|
|
234
|
+
velocityFilterWeight: e && "velocityFilterWeight" in e ? e.velocityFilterWeight : this.velocityFilterWeight,
|
|
235
|
+
compositeOperation: e && "compositeOperation" in e ? e.compositeOperation : this.compositeOperation
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
_strokeBegin(e) {
|
|
239
|
+
if (!this.dispatchEvent(new CustomEvent("beginStroke", {
|
|
240
|
+
detail: e,
|
|
241
|
+
cancelable: !0
|
|
242
|
+
}))) return;
|
|
243
|
+
let { addEventListener: t } = this._getListenerFunctions();
|
|
244
|
+
switch (e.event.type) {
|
|
245
|
+
case "mousedown":
|
|
246
|
+
t("mousemove", this._handleMouseMove, { passive: !1 }), t("mouseup", this._handleMouseUp, { passive: !1 });
|
|
247
|
+
break;
|
|
248
|
+
case "touchstart":
|
|
249
|
+
t("touchmove", this._handleTouchMove, { passive: !1 }), t("touchend", this._handleTouchEnd, { passive: !1 }), t("touchcancel", this._handleTouchCancel, { passive: !1 });
|
|
250
|
+
break;
|
|
251
|
+
case "pointerdown":
|
|
252
|
+
t("pointermove", this._handlePointerMove, { passive: !1 }), t("pointerup", this._handlePointerUp, { passive: !1 }), t("pointercancel", this._handlePointerCancel, { passive: !1 });
|
|
253
|
+
break;
|
|
254
|
+
default:
|
|
255
|
+
}
|
|
256
|
+
this._drawingStroke = !0;
|
|
257
|
+
let n = this._getPointGroupOptions(), r = {
|
|
258
|
+
...n,
|
|
259
|
+
points: []
|
|
260
|
+
};
|
|
261
|
+
this._data.push(r), this._reset(n), this._strokeUpdate(e);
|
|
262
|
+
}
|
|
263
|
+
_strokeUpdate(e) {
|
|
264
|
+
if (!this._drawingStroke) return;
|
|
265
|
+
if (this._data.length === 0) {
|
|
266
|
+
this._strokeBegin(e);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
this.dispatchEvent(new CustomEvent("beforeUpdateStroke", { detail: e }));
|
|
270
|
+
let t = this._createPoint(e.x, e.y, e.pressure), n = this._data[this._data.length - 1], r = n.points, i = r.length > 0 && r[r.length - 1], a = i ? t.distanceTo(i) <= this.minDistance : !1, o = this._getPointGroupOptions(n);
|
|
271
|
+
if (!i || !(i && a)) {
|
|
272
|
+
let e = this._addPoint(t, o);
|
|
273
|
+
i ? e && this._drawCurve(e, o) : this._drawDot(t, o), r.push({
|
|
274
|
+
time: t.time,
|
|
275
|
+
x: t.x,
|
|
276
|
+
y: t.y,
|
|
277
|
+
pressure: t.pressure
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
this.dispatchEvent(new CustomEvent("afterUpdateStroke", { detail: e }));
|
|
281
|
+
}
|
|
282
|
+
_strokeEnd(e, t = !0) {
|
|
283
|
+
this._removeMoveUpEventListeners(), this._drawingStroke && (t && this._strokeUpdate(e), this._drawingStroke = !1, this._strokePointerId = void 0, this.dispatchEvent(new CustomEvent("endStroke", { detail: e })));
|
|
284
|
+
}
|
|
285
|
+
_handlePointerEvents() {
|
|
286
|
+
this._drawingStroke = !1, this.canvas.addEventListener("pointerdown", this._handlePointerDown, { passive: !1 });
|
|
287
|
+
}
|
|
288
|
+
_handleMouseEvents() {
|
|
289
|
+
this._drawingStroke = !1, this.canvas.addEventListener("mousedown", this._handleMouseDown, { passive: !1 });
|
|
290
|
+
}
|
|
291
|
+
_handleTouchEvents() {
|
|
292
|
+
this.canvas.addEventListener("touchstart", this._handleTouchStart, { passive: !1 });
|
|
293
|
+
}
|
|
294
|
+
_reset(e) {
|
|
295
|
+
this._lastPoints = [], this._lastVelocity = 0, this._lastWidth = (e.minWidth + e.maxWidth) / 2, this._ctx.fillStyle = e.penColor, this._ctx.globalCompositeOperation = e.compositeOperation;
|
|
296
|
+
}
|
|
297
|
+
_createPoint(e, t, n) {
|
|
298
|
+
let r = this.canvas.getBoundingClientRect();
|
|
299
|
+
return new y(e - r.left, t - r.top, n, (/* @__PURE__ */ new Date()).getTime());
|
|
300
|
+
}
|
|
301
|
+
_addPoint(e, t) {
|
|
302
|
+
let { _lastPoints: n } = this;
|
|
303
|
+
if (n.push(e), n.length > 2) {
|
|
304
|
+
n.length === 3 && n.unshift(n[0]);
|
|
305
|
+
let e = this._calculateCurveWidths(n[1], n[2], t), r = b.fromPoints(n, e);
|
|
306
|
+
return n.shift(), r;
|
|
307
|
+
}
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
_calculateCurveWidths(e, t, n) {
|
|
311
|
+
let r = n.velocityFilterWeight * t.velocityFrom(e) + (1 - n.velocityFilterWeight) * this._lastVelocity, i = this._strokeWidth(r, n), a = {
|
|
312
|
+
end: i,
|
|
313
|
+
start: this._lastWidth
|
|
314
|
+
};
|
|
315
|
+
return this._lastVelocity = r, this._lastWidth = i, a;
|
|
316
|
+
}
|
|
317
|
+
_strokeWidth(e, t) {
|
|
318
|
+
return Math.max(t.maxWidth / (e + 1), t.minWidth);
|
|
319
|
+
}
|
|
320
|
+
_drawCurveSegment(e, t, n) {
|
|
321
|
+
let r = this._ctx;
|
|
322
|
+
r.moveTo(e, t), r.arc(e, t, n, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
323
|
+
}
|
|
324
|
+
_drawCurve(e, t) {
|
|
325
|
+
let n = this._ctx, r = e.endWidth - e.startWidth, i = Math.ceil(e.length()) * 2;
|
|
326
|
+
n.beginPath(), n.fillStyle = t.penColor;
|
|
327
|
+
for (let n = 0; n < i; n += 1) {
|
|
328
|
+
let a = n / i, o = a * a, s = o * a, c = 1 - a, l = c * c, u = l * c, d = u * e.startPoint.x;
|
|
329
|
+
d += 3 * l * a * e.control1.x, d += 3 * c * o * e.control2.x, d += s * e.endPoint.x;
|
|
330
|
+
let f = u * e.startPoint.y;
|
|
331
|
+
f += 3 * l * a * e.control1.y, f += 3 * c * o * e.control2.y, f += s * e.endPoint.y;
|
|
332
|
+
let p = Math.min(e.startWidth + s * r, t.maxWidth);
|
|
333
|
+
this._drawCurveSegment(d, f, p);
|
|
334
|
+
}
|
|
335
|
+
n.closePath(), n.fill();
|
|
336
|
+
}
|
|
337
|
+
_drawDot(e, t) {
|
|
338
|
+
let n = this._ctx, r = t.dotSize > 0 ? t.dotSize : (t.minWidth + t.maxWidth) / 2;
|
|
339
|
+
n.beginPath(), this._drawCurveSegment(e.x, e.y, r), n.closePath(), n.fillStyle = t.penColor, n.fill();
|
|
340
|
+
}
|
|
341
|
+
_fromData(e, t, n) {
|
|
342
|
+
for (let r of e) {
|
|
343
|
+
let { points: e } = r, i = this._getPointGroupOptions(r);
|
|
344
|
+
if (e.length > 1) for (let n = 0; n < e.length; n += 1) {
|
|
345
|
+
let r = e[n], a = new y(r.x, r.y, r.pressure, r.time);
|
|
346
|
+
n === 0 && this._reset(i);
|
|
347
|
+
let o = this._addPoint(a, i);
|
|
348
|
+
o && t(o, i);
|
|
349
|
+
}
|
|
350
|
+
else this._reset(i), n(e[0], i);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
toSVG({ includeBackgroundColor: e = !1, includeDataUrl: t = !1 } = {}) {
|
|
354
|
+
let n = this._data, r = Math.max(window.devicePixelRatio || 1, 1), i = this.canvas.width / r, a = this.canvas.height / r, o = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
355
|
+
if (o.setAttribute("xmlns", "http://www.w3.org/2000/svg"), o.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), o.setAttribute("viewBox", `0 0 ${i} ${a}`), o.setAttribute("width", i.toString()), o.setAttribute("height", a.toString()), e && this.backgroundColor) {
|
|
356
|
+
let e = document.createElement("rect");
|
|
357
|
+
e.setAttribute("width", "100%"), e.setAttribute("height", "100%"), e.setAttribute("fill", this.backgroundColor), o.appendChild(e);
|
|
358
|
+
}
|
|
359
|
+
if (t && this._dataUrl) {
|
|
360
|
+
let e = this._dataUrlOptions?.ratio || window.devicePixelRatio || 1, t = this._dataUrlOptions?.width || this.canvas.width / e, n = this._dataUrlOptions?.height || this.canvas.height / e, r = this._dataUrlOptions?.xOffset || 0, i = this._dataUrlOptions?.yOffset || 0, a = document.createElement("image");
|
|
361
|
+
a.setAttribute("x", r.toString()), a.setAttribute("y", i.toString()), a.setAttribute("width", t.toString()), a.setAttribute("height", n.toString()), a.setAttribute("preserveAspectRatio", "none"), a.setAttribute("href", this._dataUrl), o.appendChild(a);
|
|
362
|
+
}
|
|
363
|
+
return this._fromData(n, (e, { penColor: t }) => {
|
|
364
|
+
let n = document.createElement("path");
|
|
365
|
+
if (!isNaN(e.control1.x) && !isNaN(e.control1.y) && !isNaN(e.control2.x) && !isNaN(e.control2.y)) {
|
|
366
|
+
let r = `M ${e.startPoint.x.toFixed(3)},${e.startPoint.y.toFixed(3)} C ${e.control1.x.toFixed(3)},${e.control1.y.toFixed(3)} ${e.control2.x.toFixed(3)},${e.control2.y.toFixed(3)} ${e.endPoint.x.toFixed(3)},${e.endPoint.y.toFixed(3)}`;
|
|
367
|
+
n.setAttribute("d", r), n.setAttribute("stroke-width", (e.endWidth * 2.25).toFixed(3)), n.setAttribute("stroke", t), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "round"), o.appendChild(n);
|
|
368
|
+
}
|
|
369
|
+
}, (e, { penColor: t, dotSize: n, minWidth: r, maxWidth: i }) => {
|
|
370
|
+
let a = document.createElement("circle"), s = n > 0 ? n : (r + i) / 2;
|
|
371
|
+
a.setAttribute("r", s.toString()), a.setAttribute("cx", e.x.toString()), a.setAttribute("cy", e.y.toString()), a.setAttribute("fill", t), o.appendChild(a);
|
|
372
|
+
}), o.outerHTML;
|
|
373
|
+
}
|
|
374
|
+
}, w = (e) => {
|
|
375
|
+
if (typeof document > "u") return null;
|
|
376
|
+
let t = document.createElement("div");
|
|
377
|
+
t.style.color = e, t.style.position = "absolute", t.style.visibility = "hidden", document.body.appendChild(t);
|
|
378
|
+
let n = getComputedStyle(t).color;
|
|
379
|
+
if (document.body.removeChild(t), !n || n === "transparent") return null;
|
|
380
|
+
let r = n.match(/\d+/g);
|
|
381
|
+
if (r && r.length >= 3) {
|
|
382
|
+
let e = Number.parseInt(r[0], 10), t = Number.parseInt(r[1], 10), n = Number.parseInt(r[2], 10), i = (e) => {
|
|
383
|
+
let t = e.toString(16);
|
|
384
|
+
return t.length === 1 ? `0${t}` : t;
|
|
385
|
+
};
|
|
386
|
+
return `#${i(e)}${i(t)}${i(n)}`;
|
|
387
|
+
}
|
|
388
|
+
return null;
|
|
389
|
+
}, T = "var(--icon-neutral-800)", E = "#ffffff", D = (e) => {
|
|
390
|
+
let t = document.createElement("canvas");
|
|
391
|
+
t.width = e.width, t.height = e.height;
|
|
392
|
+
let n = t.getContext("2d");
|
|
393
|
+
if (!n) throw Error("Canvas 2D context is not available");
|
|
394
|
+
return n.fillStyle = E, n.fillRect(0, 0, t.width, t.height), n.drawImage(e, 0, 0), t;
|
|
395
|
+
}, O = (e, t, n) => new Promise((r, i) => {
|
|
396
|
+
e.toBlob((e) => {
|
|
397
|
+
e ? r(e) : i(/* @__PURE__ */ Error("Canvas toBlob() returned null"));
|
|
398
|
+
}, t, t === "image/jpeg" || t === "image/webp" ? n : void 0);
|
|
399
|
+
}), k = n(({ onBeginStroke: e, hasDrawing: n, placeholder: r, customPenColor: o, customPenStrokeWidth: l, customBackgroundColor: u }, d) => {
|
|
400
|
+
let f = a(null), p = a(null), m = a(null), h = a(e);
|
|
401
|
+
h.current = e;
|
|
402
|
+
let g = i(() => {
|
|
403
|
+
let e = f.current, t = p.current, n = m.current;
|
|
404
|
+
if (!e || !t || !n) return;
|
|
405
|
+
let r = Math.max(window.devicePixelRatio || 1, 1), i = t.getContext("2d"), { width: a, height: o } = e.getBoundingClientRect();
|
|
406
|
+
if (a === 0 || o === 0 || !i) return;
|
|
407
|
+
let s = n.isEmpty() ? null : n.toData();
|
|
408
|
+
t.width = Math.floor(a * r), t.height = Math.floor(o * r), i.setTransform(r, 0, 0, r, 0, 0), s ? n.fromData(s, { clear: !0 }) : n.clear();
|
|
409
|
+
}, []);
|
|
410
|
+
return s(d, () => ({
|
|
411
|
+
clear: () => {
|
|
412
|
+
m.current?.clear();
|
|
413
|
+
},
|
|
414
|
+
isEmpty: () => m.current?.isEmpty() ?? !0,
|
|
415
|
+
toDataURL: (e = "image/png", t) => m.current?.toDataURL(e, t) ?? "",
|
|
416
|
+
getCanvas: () => p.current,
|
|
417
|
+
getSignaturePad: () => m.current,
|
|
418
|
+
on: () => m.current?.on(),
|
|
419
|
+
off: () => m.current?.off(),
|
|
420
|
+
getSignatureWithWhiteBackground: () => {
|
|
421
|
+
let e = p.current;
|
|
422
|
+
return e ? D(e) : null;
|
|
423
|
+
},
|
|
424
|
+
getBlob: (e = p.current ?? void 0, t = "image/jpeg", n = .92) => e ? O(e, t, n) : Promise.reject(/* @__PURE__ */ Error("No canvas available for getBlob"))
|
|
425
|
+
}), []), t(() => {
|
|
426
|
+
let e = f.current, t = p.current;
|
|
427
|
+
if (!e || !t) return;
|
|
428
|
+
let n = null, r = () => {
|
|
429
|
+
n === null && (n = requestAnimationFrame(() => {
|
|
430
|
+
n = null, g();
|
|
431
|
+
}));
|
|
432
|
+
}, i = o ?? w(T), a = new C(t, {
|
|
433
|
+
...i ? { penColor: i } : {},
|
|
434
|
+
...l ? { maxWidth: l } : {}
|
|
435
|
+
});
|
|
436
|
+
m.current = a;
|
|
437
|
+
let s = () => h.current?.();
|
|
438
|
+
a.addEventListener("beginStroke", s), g();
|
|
439
|
+
let c = new ResizeObserver(() => {
|
|
440
|
+
r();
|
|
441
|
+
});
|
|
442
|
+
return c.observe(e), () => {
|
|
443
|
+
n !== null && cancelAnimationFrame(n), c.disconnect(), a.removeEventListener("beginStroke", s), a.off(), m.current = null;
|
|
444
|
+
};
|
|
445
|
+
}, [
|
|
446
|
+
g,
|
|
447
|
+
o,
|
|
448
|
+
l
|
|
449
|
+
]), /* @__PURE__ */ c("div", {
|
|
450
|
+
class: "SignatureCanvasContainer",
|
|
451
|
+
style: u ? { backgroundColor: u } : void 0,
|
|
452
|
+
ref: f,
|
|
453
|
+
children: [/* @__PURE__ */ c("canvas", {
|
|
454
|
+
class: "SignatureCanvas",
|
|
455
|
+
ref: p,
|
|
456
|
+
"aria-label": r
|
|
457
|
+
}), !n && /* @__PURE__ */ c("p", {
|
|
458
|
+
class: "SignatureCanvasPlaceholder",
|
|
459
|
+
children: r
|
|
460
|
+
})]
|
|
461
|
+
});
|
|
462
|
+
});
|
|
463
|
+
k.displayName = "SignatureCanvas";
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region src/modules/signature/signature.tsx
|
|
466
|
+
var A = ({ config: n, onFinish: s, onError: u }) => {
|
|
467
|
+
let { t: g } = e(), [_, y] = l(() => v({ config: n }), { autoLoad: !0 }), [b, x] = o(!1), S = a(null), C = a(void 0), w = r(() => {
|
|
468
|
+
if (_.status === "capture" || _.status === "submitting") return _.phase;
|
|
469
|
+
}, [_]), T = _.status === "error" ? _.error : void 0, E = _.status === "submitting", D = _.status === "capture" && _.canContinue && !E, O = i(() => {
|
|
470
|
+
S.current && (S.current.on(), S.current.clear(), x(!1), y.setSignatureValid(!1));
|
|
471
|
+
}, [y]);
|
|
472
|
+
t(() => {
|
|
473
|
+
_.status === "finished" && s?.();
|
|
474
|
+
}, [_.status, s]), t(() => {
|
|
475
|
+
T && (u?.(T), S.current?.on());
|
|
476
|
+
}, [T, u]), t(() => {
|
|
477
|
+
let e = C.current;
|
|
478
|
+
w && e && e !== w && (x(!1), y.setSignatureValid(!1), O()), C.current = w;
|
|
479
|
+
}, [
|
|
480
|
+
w,
|
|
481
|
+
y,
|
|
482
|
+
O
|
|
483
|
+
]);
|
|
484
|
+
let A = (e) => n.title?.trim() || g(e === "initials" ? "signature.initialsTitle" : "signature.fullSignatureTitle"), j = () => n.subtitle?.trim() || g("signature.subtitle"), M = async () => {
|
|
485
|
+
let e = S.current;
|
|
486
|
+
if (!e) return;
|
|
487
|
+
let t = e.getSignatureWithWhiteBackground();
|
|
488
|
+
if (t) return n.sendBase64 ?? !1 ? t.toDataURL("image/png").replace(/^data:image\/png;base64,/, "") : e.getBlob(t);
|
|
489
|
+
};
|
|
490
|
+
return _.status === "idle" || _.status === "finished" || _.status === "error" ? null : _.status === "success" ? /* @__PURE__ */ c(p, {
|
|
491
|
+
className: "IncodeSignature IncodeSignatureFadeIn",
|
|
492
|
+
children: /* @__PURE__ */ c("div", {
|
|
493
|
+
class: "IncodeSignatureContent IncodeSignatureSuccess",
|
|
494
|
+
role: "status",
|
|
495
|
+
children: [
|
|
496
|
+
/* @__PURE__ */ c(h, { size: 48 }),
|
|
497
|
+
/* @__PURE__ */ c(d, { size: 16 }),
|
|
498
|
+
/* @__PURE__ */ c(m, { children: g("signature.successTitle") })
|
|
499
|
+
]
|
|
500
|
+
})
|
|
501
|
+
}) : /* @__PURE__ */ c(p, {
|
|
502
|
+
className: "IncodeSignature IncodeSignatureFadeIn",
|
|
503
|
+
title: A(w),
|
|
504
|
+
subtitle: j(),
|
|
505
|
+
children: [/* @__PURE__ */ c("div", {
|
|
506
|
+
class: "IncodeSignatureContent",
|
|
507
|
+
children: [
|
|
508
|
+
/* @__PURE__ */ c(k, {
|
|
509
|
+
ref: S,
|
|
510
|
+
hasDrawing: b,
|
|
511
|
+
onBeginStroke: () => {
|
|
512
|
+
x(!0), y.setSignatureValid(!0);
|
|
513
|
+
},
|
|
514
|
+
placeholder: g(w === "initials" ? "signature.initialsPlaceholder" : "signature.fullSignaturePlaceholder"),
|
|
515
|
+
customBackgroundColor: n.canvasBackgroundColor,
|
|
516
|
+
customPenColor: n.penColor,
|
|
517
|
+
customPenStrokeWidth: n.penStrokeWidth
|
|
518
|
+
}),
|
|
519
|
+
/* @__PURE__ */ c(d, { size: 8 }),
|
|
520
|
+
/* @__PURE__ */ c(f, {
|
|
521
|
+
variant: "link",
|
|
522
|
+
disabled: !b || E,
|
|
523
|
+
onClick: O,
|
|
524
|
+
children: g("signature.clear")
|
|
525
|
+
})
|
|
526
|
+
]
|
|
527
|
+
}), /* @__PURE__ */ c("div", {
|
|
528
|
+
class: "IncodeSignatureButtonContainer",
|
|
529
|
+
children: /* @__PURE__ */ c(f, {
|
|
530
|
+
disabled: !D,
|
|
531
|
+
isLoading: E,
|
|
532
|
+
onClick: async () => {
|
|
533
|
+
let e = S.current;
|
|
534
|
+
if (!(!e || _.status !== "capture" || e.isEmpty())) {
|
|
535
|
+
e.off();
|
|
536
|
+
try {
|
|
537
|
+
let t = await M();
|
|
538
|
+
if (!t) {
|
|
539
|
+
e.on();
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
y.submit(t);
|
|
543
|
+
} catch {
|
|
544
|
+
e.on();
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
children: g(w === "initials" ? "common.continue" : "signature.done")
|
|
549
|
+
})
|
|
550
|
+
})]
|
|
551
|
+
});
|
|
552
|
+
}, j = ({ config: e, onFinish: t, onError: n }) => /* @__PURE__ */ c(u, { children: e ? /* @__PURE__ */ c(A, {
|
|
553
|
+
config: e,
|
|
554
|
+
onFinish: t,
|
|
555
|
+
onError: n
|
|
556
|
+
}) : null });
|
|
557
|
+
g(j, "incode-signature");
|
|
558
|
+
//#endregion
|
|
559
|
+
export { j as Signature };
|