@vpdev2/metakyc 1.0.57 → 1.0.58
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/client/session.d.ts +5 -2
- package/dist/client/session.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +558 -555
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -297,28 +297,31 @@ class Mi {
|
|
|
297
297
|
}
|
|
298
298
|
class Oa {
|
|
299
299
|
static async createToken(t) {
|
|
300
|
-
const { baseUrl: a, apiKey: r, secretKey: n, tenantId: o, clientId: l, externalRefId: d, workflowKey: u,
|
|
300
|
+
const { baseUrl: a, apiKey: r, secretKey: n, tenantId: o, clientId: l, externalRefId: d, workflowKey: u, email: m, isCompany: f, applicant: g } = t;
|
|
301
301
|
if (!o && !l)
|
|
302
302
|
throw new Error("Either tenantId or clientId must be provided.");
|
|
303
303
|
if (!d)
|
|
304
304
|
throw new Error("externalRefId is required. Pass your user's unique ID.");
|
|
305
305
|
if (!u)
|
|
306
306
|
throw new Error("workflowKey is required. Pass the workflow key for this KYC session.");
|
|
307
|
-
|
|
307
|
+
if (!m)
|
|
308
|
+
throw new Error("email is required. Pass the applicant's email address.");
|
|
309
|
+
const S = {
|
|
308
310
|
apiKey: r,
|
|
309
311
|
secretKey: n,
|
|
310
312
|
externalRefId: d,
|
|
311
|
-
workflowKey: u
|
|
313
|
+
workflowKey: u,
|
|
314
|
+
email: m
|
|
312
315
|
};
|
|
313
|
-
o != null && (
|
|
314
|
-
const
|
|
316
|
+
o != null && (S.tenantId = o), l && (S.clientId = l), f != null && (S.isCompany = f), g && (S.applicant = g);
|
|
317
|
+
const b = (await ti.post(
|
|
315
318
|
`${a.replace(/\/+$/, "")}/api/SdkSession/CreateToken`,
|
|
316
|
-
|
|
319
|
+
S,
|
|
317
320
|
{ headers: { "Content-Type": "application/json" } }
|
|
318
321
|
)).data;
|
|
319
|
-
if (!
|
|
320
|
-
throw new Error(
|
|
321
|
-
return
|
|
322
|
+
if (!b.success)
|
|
323
|
+
throw new Error(b.error || "Failed to create session token.");
|
|
324
|
+
return b.result;
|
|
322
325
|
}
|
|
323
326
|
}
|
|
324
327
|
class ji {
|
|
@@ -6832,7 +6835,7 @@ function Q(e, t) {
|
|
|
6832
6835
|
const r = Rr.exec(a);
|
|
6833
6836
|
return r ? t(r[1]) : e;
|
|
6834
6837
|
}
|
|
6835
|
-
const si = "1.0.
|
|
6838
|
+
const si = "1.0.58", li = ii(null), Yt = `metakyc-translations-${si}-`, Ir = ({
|
|
6836
6839
|
locale: e,
|
|
6837
6840
|
fetchTranslations: t,
|
|
6838
6841
|
children: a
|
|
@@ -6857,8 +6860,8 @@ const si = "1.0.57", li = ii(null), Yt = `metakyc-translations-${si}-`, Ir = ({
|
|
|
6857
6860
|
return;
|
|
6858
6861
|
}
|
|
6859
6862
|
console.debug("[MetaKYC i18n] Remote overrides loaded for locale:", r, m);
|
|
6860
|
-
const f = Dt(r),
|
|
6861
|
-
l(
|
|
6863
|
+
const f = Dt(r), g = Kt(f, m);
|
|
6864
|
+
l(g);
|
|
6862
6865
|
try {
|
|
6863
6866
|
localStorage.setItem(Yt + r, JSON.stringify(m));
|
|
6864
6867
|
} catch {
|
|
@@ -6898,7 +6901,7 @@ function Ar() {
|
|
|
6898
6901
|
const $t = "metakyc-theme-cache", qa = ({ config: e, children: t }) => {
|
|
6899
6902
|
Ar();
|
|
6900
6903
|
const [a, r] = w(null), n = Re.useRef(!1), o = Re.useRef(!1), l = Ue(() => {
|
|
6901
|
-
const m = new Mi(e), f = new ji(m),
|
|
6904
|
+
const m = new Mi(e), f = new ji(m), g = new Fi(m), S = new Oi(m), R = new Vi(m), b = new Bi(m), O = new qi(m), N = new Ki(m), H = new Ui(m), B = new Wi(m), F = new Xi(m), L = new Zi(m), q = new lr();
|
|
6902
6905
|
if (typeof document < "u")
|
|
6903
6906
|
if (e.theme)
|
|
6904
6907
|
q.applyTheme(e.theme);
|
|
@@ -6912,12 +6915,12 @@ const $t = "metakyc-theme-cache", qa = ({ config: e, children: t }) => {
|
|
|
6912
6915
|
return {
|
|
6913
6916
|
httpClient: m,
|
|
6914
6917
|
applicantService: f,
|
|
6915
|
-
questionnaireService:
|
|
6916
|
-
uploadDocumentService:
|
|
6917
|
-
appropriatenessTestService:
|
|
6918
|
+
questionnaireService: g,
|
|
6919
|
+
uploadDocumentService: S,
|
|
6920
|
+
appropriatenessTestService: R,
|
|
6918
6921
|
overviewService: b,
|
|
6919
6922
|
riskScoringService: O,
|
|
6920
|
-
identityService:
|
|
6923
|
+
identityService: N,
|
|
6921
6924
|
baseInformationService: H,
|
|
6922
6925
|
investorCategorizationService: B,
|
|
6923
6926
|
themeService: F,
|
|
@@ -7094,40 +7097,40 @@ function Mr(e) {
|
|
|
7094
7097
|
nextWorkflowKey: r.nextWorkflowKey
|
|
7095
7098
|
});
|
|
7096
7099
|
}, [r, f]);
|
|
7097
|
-
const
|
|
7100
|
+
const g = ge(!1), S = ge(!1), R = oe(async () => {
|
|
7098
7101
|
if (!(!f || !m.current)) {
|
|
7099
|
-
if (
|
|
7102
|
+
if (g.current) {
|
|
7100
7103
|
console.log("[Workflow] Load already in progress, skipping...");
|
|
7101
7104
|
return;
|
|
7102
7105
|
}
|
|
7103
|
-
|
|
7106
|
+
g.current = !0, l(!0), u(null);
|
|
7104
7107
|
try {
|
|
7105
7108
|
const L = await m.current.initialize(f);
|
|
7106
|
-
n(L),
|
|
7109
|
+
n(L), S.current = !0;
|
|
7107
7110
|
} catch (L) {
|
|
7108
7111
|
u(L);
|
|
7109
7112
|
} finally {
|
|
7110
|
-
l(!1),
|
|
7113
|
+
l(!1), g.current = !1;
|
|
7111
7114
|
}
|
|
7112
7115
|
}
|
|
7113
7116
|
}, [f]);
|
|
7114
7117
|
he(() => {
|
|
7115
|
-
f && !
|
|
7116
|
-
}, [f,
|
|
7118
|
+
f && !S.current && R();
|
|
7119
|
+
}, [f, R]);
|
|
7117
7120
|
const b = oe(async () => {
|
|
7118
7121
|
if (m.current) {
|
|
7119
|
-
if (
|
|
7122
|
+
if (g.current) {
|
|
7120
7123
|
console.log("[Workflow] Refresh already in progress, skipping...");
|
|
7121
7124
|
return;
|
|
7122
7125
|
}
|
|
7123
|
-
|
|
7126
|
+
g.current = !0, l(!0), u(null);
|
|
7124
7127
|
try {
|
|
7125
7128
|
const L = await m.current.refreshProgress();
|
|
7126
7129
|
n(L);
|
|
7127
7130
|
} catch (L) {
|
|
7128
7131
|
u(L);
|
|
7129
7132
|
} finally {
|
|
7130
|
-
l(!1),
|
|
7133
|
+
l(!1), g.current = !1;
|
|
7131
7134
|
}
|
|
7132
7135
|
}
|
|
7133
7136
|
}, []), O = oe(async () => {
|
|
@@ -7142,7 +7145,7 @@ function Mr(e) {
|
|
|
7142
7145
|
l(!1);
|
|
7143
7146
|
}
|
|
7144
7147
|
}
|
|
7145
|
-
}, []),
|
|
7148
|
+
}, []), N = oe(async () => {
|
|
7146
7149
|
if (m.current) {
|
|
7147
7150
|
l(!0), u(null);
|
|
7148
7151
|
try {
|
|
@@ -7184,18 +7187,18 @@ function Mr(e) {
|
|
|
7184
7187
|
isOnHold: (r == null ? void 0 : r.status) === $e.OnHold,
|
|
7185
7188
|
refreshProgress: b,
|
|
7186
7189
|
moveToNext: O,
|
|
7187
|
-
moveBack:
|
|
7190
|
+
moveBack: N,
|
|
7188
7191
|
submitCurrentStep: H,
|
|
7189
7192
|
orchestrator: m.current
|
|
7190
7193
|
};
|
|
7191
7194
|
}
|
|
7192
7195
|
function jr(e) {
|
|
7193
7196
|
var L;
|
|
7194
|
-
const { applicantService: t, config: a } = Me(), [r, n] = w(null), [o, l] = w(!0), [d, u] = w(null), [m, f] = w(), [
|
|
7197
|
+
const { applicantService: t, config: a } = Me(), [r, n] = w(null), [o, l] = w(!0), [d, u] = w(null), [m, f] = w(), [g, S] = w(), R = ge(!1), b = oe(async () => {
|
|
7195
7198
|
try {
|
|
7196
7199
|
l(!0), u(null);
|
|
7197
7200
|
const q = await t.getSdkState();
|
|
7198
|
-
n(q),
|
|
7201
|
+
n(q), R.current = !0;
|
|
7199
7202
|
} catch (q) {
|
|
7200
7203
|
u(q instanceof Error ? q : new Error(String(q)));
|
|
7201
7204
|
} finally {
|
|
@@ -7203,13 +7206,13 @@ function jr(e) {
|
|
|
7203
7206
|
}
|
|
7204
7207
|
}, [t]);
|
|
7205
7208
|
he(() => {
|
|
7206
|
-
|
|
7209
|
+
R.current || b();
|
|
7207
7210
|
}, [b]);
|
|
7208
7211
|
const O = oe((q) => {
|
|
7209
|
-
f(q),
|
|
7210
|
-
}, []),
|
|
7212
|
+
f(q), S("workflow");
|
|
7213
|
+
}, []), N = g || (r == null ? void 0 : r.phase) || "loading", H = m || (r == null ? void 0 : r.applicantId), B = e ?? (r == null ? void 0 : r.isCompany) ?? !1, F = (r == null ? void 0 : r.workflowKey) || ((L = a.applicantForm) == null ? void 0 : L.workflowKey);
|
|
7211
7214
|
return {
|
|
7212
|
-
phase: d ? "error" : o ? "loading" :
|
|
7215
|
+
phase: d ? "error" : o ? "loading" : N,
|
|
7213
7216
|
applicantId: H,
|
|
7214
7217
|
isCompany: B,
|
|
7215
7218
|
workflowKey: F,
|
|
@@ -7220,14 +7223,14 @@ function jr(e) {
|
|
|
7220
7223
|
};
|
|
7221
7224
|
}
|
|
7222
7225
|
function Fr(e) {
|
|
7223
|
-
const { questionnaireService: t, applicantService: a } = Me(), [r, n] = w(null), [o, l] = w({}), [d, u] = w(!1), [m, f] = w(!1), [
|
|
7226
|
+
const { questionnaireService: t, applicantService: a } = Me(), [r, n] = w(null), [o, l] = w({}), [d, u] = w(!1), [m, f] = w(!1), [g, S] = w(null), R = ge(!1), b = ge(null), O = oe(async () => {
|
|
7224
7227
|
var H, B;
|
|
7225
7228
|
if (e) {
|
|
7226
|
-
if (
|
|
7229
|
+
if (R.current) {
|
|
7227
7230
|
console.log("[Questionnaire] Load already in progress, skipping...");
|
|
7228
7231
|
return;
|
|
7229
7232
|
}
|
|
7230
|
-
|
|
7233
|
+
R.current = !0, u(!0), S(null);
|
|
7231
7234
|
try {
|
|
7232
7235
|
const [F, L] = await Promise.all([
|
|
7233
7236
|
t.getQuestionnaire(e),
|
|
@@ -7235,33 +7238,33 @@ function Fr(e) {
|
|
|
7235
7238
|
]);
|
|
7236
7239
|
if (n(F), (H = L == null ? void 0 : L.questionnaireResults) != null && H.length && F) {
|
|
7237
7240
|
const q = /* @__PURE__ */ new Map();
|
|
7238
|
-
for (const
|
|
7239
|
-
|
|
7240
|
-
const J = {}, ie = F.questionGroups.flatMap((
|
|
7241
|
-
for (const
|
|
7242
|
-
const z =
|
|
7243
|
-
q.has(z) && (J[
|
|
7241
|
+
for (const C of L.questionnaireResults)
|
|
7242
|
+
C.question && ((B = C.answers) != null && B.length) && q.set(C.question.trim().toLowerCase(), C.answers);
|
|
7243
|
+
const J = {}, ie = F.questionGroups.flatMap((C) => C.questions ?? []);
|
|
7244
|
+
for (const C of ie) {
|
|
7245
|
+
const z = C.text.trim().toLowerCase();
|
|
7246
|
+
q.has(z) && (J[C.id] = q.get(z));
|
|
7244
7247
|
}
|
|
7245
7248
|
l(J);
|
|
7246
7249
|
}
|
|
7247
7250
|
b.current = e;
|
|
7248
7251
|
} catch (F) {
|
|
7249
|
-
|
|
7252
|
+
S(F);
|
|
7250
7253
|
} finally {
|
|
7251
|
-
u(!1),
|
|
7254
|
+
u(!1), R.current = !1;
|
|
7252
7255
|
}
|
|
7253
7256
|
}
|
|
7254
7257
|
}, [e, t, a]);
|
|
7255
7258
|
he(() => {
|
|
7256
7259
|
e && b.current !== e && O();
|
|
7257
7260
|
}, [e]);
|
|
7258
|
-
const
|
|
7261
|
+
const N = oe(
|
|
7259
7262
|
async (H) => {
|
|
7260
|
-
f(!0),
|
|
7263
|
+
f(!0), S(null);
|
|
7261
7264
|
try {
|
|
7262
7265
|
return await t.fillQuestionnaire(H);
|
|
7263
7266
|
} catch (B) {
|
|
7264
|
-
throw
|
|
7267
|
+
throw S(B), B;
|
|
7265
7268
|
} finally {
|
|
7266
7269
|
f(!1);
|
|
7267
7270
|
}
|
|
@@ -7273,39 +7276,39 @@ function Fr(e) {
|
|
|
7273
7276
|
initialAnswers: o,
|
|
7274
7277
|
isLoading: d,
|
|
7275
7278
|
isSubmitting: m,
|
|
7276
|
-
error:
|
|
7279
|
+
error: g,
|
|
7277
7280
|
load: O,
|
|
7278
|
-
submit:
|
|
7281
|
+
submit: N
|
|
7279
7282
|
};
|
|
7280
7283
|
}
|
|
7281
7284
|
function Or(e) {
|
|
7282
|
-
const { uploadDocumentService: t } = Me(), [a, r] = w(null), [n, o] = w(!1), [l, d] = w(!1), [u, m] = w(0), [f,
|
|
7285
|
+
const { uploadDocumentService: t } = Me(), [a, r] = w(null), [n, o] = w(!1), [l, d] = w(!1), [u, m] = w(0), [f, g] = w(null), S = ge(!1), R = ge(null), b = oe(async () => {
|
|
7283
7286
|
if (e) {
|
|
7284
|
-
if (
|
|
7287
|
+
if (S.current) {
|
|
7285
7288
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
7286
7289
|
return;
|
|
7287
7290
|
}
|
|
7288
|
-
|
|
7291
|
+
S.current = !0, o(!0), g(null);
|
|
7289
7292
|
try {
|
|
7290
|
-
const
|
|
7291
|
-
r(
|
|
7292
|
-
} catch (
|
|
7293
|
-
|
|
7293
|
+
const N = await t.getUploadDocument(e);
|
|
7294
|
+
r(N), R.current = e;
|
|
7295
|
+
} catch (N) {
|
|
7296
|
+
g(N);
|
|
7294
7297
|
} finally {
|
|
7295
|
-
o(!1),
|
|
7298
|
+
o(!1), S.current = !1;
|
|
7296
7299
|
}
|
|
7297
7300
|
}
|
|
7298
7301
|
}, [e, t]);
|
|
7299
7302
|
he(() => {
|
|
7300
|
-
e &&
|
|
7303
|
+
e && R.current !== e && b();
|
|
7301
7304
|
}, [e]);
|
|
7302
7305
|
const O = oe(
|
|
7303
|
-
async (
|
|
7304
|
-
d(!0), m(0),
|
|
7306
|
+
async (N) => {
|
|
7307
|
+
d(!0), m(0), g(null);
|
|
7305
7308
|
try {
|
|
7306
|
-
await t.fillUploadDocument(
|
|
7309
|
+
await t.fillUploadDocument(N), m(100);
|
|
7307
7310
|
} catch (H) {
|
|
7308
|
-
throw
|
|
7311
|
+
throw g(H), H;
|
|
7309
7312
|
} finally {
|
|
7310
7313
|
d(!1);
|
|
7311
7314
|
}
|
|
@@ -7323,32 +7326,32 @@ function Or(e) {
|
|
|
7323
7326
|
};
|
|
7324
7327
|
}
|
|
7325
7328
|
function Ga(e) {
|
|
7326
|
-
const { appropriatenessTestService: t } = Me(), [a, r] = w(null), [n, o] = w(!1), [l, d] = w(!1), [u, m] = w(null), [f,
|
|
7329
|
+
const { appropriatenessTestService: t } = Me(), [a, r] = w(null), [n, o] = w(!1), [l, d] = w(!1), [u, m] = w(null), [f, g] = w(null), S = ge(!1), R = ge(null), b = oe(async () => {
|
|
7327
7330
|
if (e) {
|
|
7328
|
-
if (
|
|
7331
|
+
if (S.current) {
|
|
7329
7332
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
7330
7333
|
return;
|
|
7331
7334
|
}
|
|
7332
|
-
|
|
7335
|
+
S.current = !0, o(!0), m(null);
|
|
7333
7336
|
try {
|
|
7334
|
-
const
|
|
7335
|
-
r(
|
|
7336
|
-
} catch (
|
|
7337
|
-
m(
|
|
7337
|
+
const N = await t.getAppropriatenessTest(e);
|
|
7338
|
+
r(N), R.current = e;
|
|
7339
|
+
} catch (N) {
|
|
7340
|
+
m(N);
|
|
7338
7341
|
} finally {
|
|
7339
|
-
o(!1),
|
|
7342
|
+
o(!1), S.current = !1;
|
|
7340
7343
|
}
|
|
7341
7344
|
}
|
|
7342
7345
|
}, [e, t]);
|
|
7343
7346
|
he(() => {
|
|
7344
|
-
e &&
|
|
7347
|
+
e && R.current !== e && b();
|
|
7345
7348
|
}, [e]);
|
|
7346
7349
|
const O = oe(
|
|
7347
|
-
async (
|
|
7350
|
+
async (N) => {
|
|
7348
7351
|
d(!0), m(null);
|
|
7349
7352
|
try {
|
|
7350
|
-
const H = await t.fillAppropriatenessTest(
|
|
7351
|
-
return
|
|
7353
|
+
const H = await t.fillAppropriatenessTest(N);
|
|
7354
|
+
return g(H), H;
|
|
7352
7355
|
} catch (H) {
|
|
7353
7356
|
throw m(H), H;
|
|
7354
7357
|
} finally {
|
|
@@ -7368,7 +7371,7 @@ function Ga(e) {
|
|
|
7368
7371
|
};
|
|
7369
7372
|
}
|
|
7370
7373
|
function Vr(e) {
|
|
7371
|
-
const { overviewService: t } = Me(), [a, r] = w(null), [n, o] = w(!1), [l, d] = w(!1), [u, m] = w(null), f = ge(!1),
|
|
7374
|
+
const { overviewService: t } = Me(), [a, r] = w(null), [n, o] = w(!1), [l, d] = w(!1), [u, m] = w(null), f = ge(!1), g = ge(null), S = oe(async () => {
|
|
7372
7375
|
if (e) {
|
|
7373
7376
|
if (f.current) {
|
|
7374
7377
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -7377,7 +7380,7 @@ function Vr(e) {
|
|
|
7377
7380
|
f.current = !0, o(!0), m(null);
|
|
7378
7381
|
try {
|
|
7379
7382
|
const b = await t.getOverviewData(e);
|
|
7380
|
-
r(b),
|
|
7383
|
+
r(b), g.current = e;
|
|
7381
7384
|
} catch (b) {
|
|
7382
7385
|
m(b);
|
|
7383
7386
|
} finally {
|
|
@@ -7386,9 +7389,9 @@ function Vr(e) {
|
|
|
7386
7389
|
}
|
|
7387
7390
|
}, [e, t]);
|
|
7388
7391
|
he(() => {
|
|
7389
|
-
e &&
|
|
7392
|
+
e && g.current !== e && S();
|
|
7390
7393
|
}, [e]);
|
|
7391
|
-
const
|
|
7394
|
+
const R = oe(async () => {
|
|
7392
7395
|
if (e) {
|
|
7393
7396
|
d(!0), m(null);
|
|
7394
7397
|
try {
|
|
@@ -7405,15 +7408,15 @@ function Vr(e) {
|
|
|
7405
7408
|
isLoading: n,
|
|
7406
7409
|
isSubmitting: l,
|
|
7407
7410
|
error: u,
|
|
7408
|
-
load:
|
|
7409
|
-
passOverview:
|
|
7411
|
+
load: S,
|
|
7412
|
+
passOverview: R
|
|
7410
7413
|
};
|
|
7411
7414
|
}
|
|
7412
7415
|
function Br(e) {
|
|
7413
7416
|
const { identityService: t } = Me(), [a, r] = w(
|
|
7414
7417
|
null
|
|
7415
7418
|
), [n, o] = w(!1), [l, d] = w(null), u = ge(!1), m = oe(
|
|
7416
|
-
async (
|
|
7419
|
+
async (S, R) => {
|
|
7417
7420
|
if (e) {
|
|
7418
7421
|
if (u.current) {
|
|
7419
7422
|
console.log("[Identity] Request already in progress, skipping...");
|
|
@@ -7424,8 +7427,8 @@ function Br(e) {
|
|
|
7424
7427
|
const b = {
|
|
7425
7428
|
applicantId: e,
|
|
7426
7429
|
restart: !1,
|
|
7427
|
-
redirectUrl:
|
|
7428
|
-
ttl:
|
|
7430
|
+
redirectUrl: S || "",
|
|
7431
|
+
ttl: R || 604800
|
|
7429
7432
|
// Default: 7 days
|
|
7430
7433
|
};
|
|
7431
7434
|
console.log("Identity request input:", b);
|
|
@@ -7440,15 +7443,15 @@ function Br(e) {
|
|
|
7440
7443
|
},
|
|
7441
7444
|
[e, t]
|
|
7442
7445
|
), f = oe(
|
|
7443
|
-
async (
|
|
7446
|
+
async (S, R) => {
|
|
7444
7447
|
if (e) {
|
|
7445
7448
|
o(!0), d(null);
|
|
7446
7449
|
try {
|
|
7447
7450
|
const b = {
|
|
7448
7451
|
applicantId: e,
|
|
7449
7452
|
restart: !1,
|
|
7450
|
-
redirectUrl:
|
|
7451
|
-
ttl:
|
|
7453
|
+
redirectUrl: S,
|
|
7454
|
+
ttl: R
|
|
7452
7455
|
}, O = await t.identityCompanyRequest(b);
|
|
7453
7456
|
return r(O), O;
|
|
7454
7457
|
} catch (b) {
|
|
@@ -7459,7 +7462,7 @@ function Br(e) {
|
|
|
7459
7462
|
}
|
|
7460
7463
|
},
|
|
7461
7464
|
[e, t]
|
|
7462
|
-
),
|
|
7465
|
+
), g = oe(async () => {
|
|
7463
7466
|
if (e) {
|
|
7464
7467
|
if (u.current) {
|
|
7465
7468
|
console.log("[Identity] Restart already in progress, skipping...");
|
|
@@ -7467,18 +7470,18 @@ function Br(e) {
|
|
|
7467
7470
|
}
|
|
7468
7471
|
u.current = !0, o(!0), d(null);
|
|
7469
7472
|
try {
|
|
7470
|
-
const
|
|
7473
|
+
const S = {
|
|
7471
7474
|
applicantId: e,
|
|
7472
7475
|
restart: !0,
|
|
7473
7476
|
redirectUrl: "",
|
|
7474
7477
|
ttl: 604800
|
|
7475
7478
|
// 7 days
|
|
7476
7479
|
};
|
|
7477
|
-
console.log("Restarting identity with input:",
|
|
7478
|
-
const
|
|
7479
|
-
return console.log("Restart identity result:",
|
|
7480
|
-
} catch (
|
|
7481
|
-
throw d(
|
|
7480
|
+
console.log("Restarting identity with input:", S);
|
|
7481
|
+
const R = await t.identityRequest(S);
|
|
7482
|
+
return console.log("Restart identity result:", R), r(R), R;
|
|
7483
|
+
} catch (S) {
|
|
7484
|
+
throw d(S), S;
|
|
7482
7485
|
} finally {
|
|
7483
7486
|
o(!1), u.current = !1;
|
|
7484
7487
|
}
|
|
@@ -7492,18 +7495,18 @@ function Br(e) {
|
|
|
7492
7495
|
error: l,
|
|
7493
7496
|
requestIdentity: m,
|
|
7494
7497
|
requestCompanyIdentity: f,
|
|
7495
|
-
restartIdentity:
|
|
7498
|
+
restartIdentity: g
|
|
7496
7499
|
};
|
|
7497
7500
|
}
|
|
7498
7501
|
function qr(e) {
|
|
7499
|
-
const { riskScoringService: t, applicantService: a } = Me(), [r, n] = w(null), [o, l] = w({}), [d, u] = w(!1), [m, f] = w(!1), [
|
|
7502
|
+
const { riskScoringService: t, applicantService: a } = Me(), [r, n] = w(null), [o, l] = w({}), [d, u] = w(!1), [m, f] = w(!1), [g, S] = w(null), [R, b] = w(null), O = ge(!1), N = ge(null), H = oe(async () => {
|
|
7500
7503
|
var F;
|
|
7501
7504
|
if (e) {
|
|
7502
7505
|
if (O.current) {
|
|
7503
7506
|
console.log("[RiskScoring] Load already in progress, skipping...");
|
|
7504
7507
|
return;
|
|
7505
7508
|
}
|
|
7506
|
-
O.current = !0, u(!0),
|
|
7509
|
+
O.current = !0, u(!0), S(null);
|
|
7507
7510
|
try {
|
|
7508
7511
|
const [L, q] = await Promise.all([
|
|
7509
7512
|
t.getRiskCriterias(e),
|
|
@@ -7511,34 +7514,34 @@ function qr(e) {
|
|
|
7511
7514
|
]);
|
|
7512
7515
|
if (n(L), (F = q == null ? void 0 : q.riskScoringResults) != null && F.length) {
|
|
7513
7516
|
const J = q.riskScoringResults[0], ie = {};
|
|
7514
|
-
for (const
|
|
7515
|
-
if (
|
|
7517
|
+
for (const C of J.riskCriteriaResults ?? [])
|
|
7518
|
+
if (C.riskCriteriaId != null && C.answer != null && C.answer !== "") {
|
|
7516
7519
|
const z = [...new Set(
|
|
7517
|
-
|
|
7520
|
+
C.answer.split(",").map((K) => K.trim()).filter((K) => K !== "")
|
|
7518
7521
|
)];
|
|
7519
|
-
z.length > 0 && (ie[
|
|
7522
|
+
z.length > 0 && (ie[C.riskCriteriaId] = z);
|
|
7520
7523
|
}
|
|
7521
7524
|
l(ie);
|
|
7522
7525
|
}
|
|
7523
|
-
|
|
7526
|
+
N.current = e;
|
|
7524
7527
|
} catch (L) {
|
|
7525
|
-
|
|
7528
|
+
S(L);
|
|
7526
7529
|
} finally {
|
|
7527
7530
|
u(!1), O.current = !1;
|
|
7528
7531
|
}
|
|
7529
7532
|
}
|
|
7530
7533
|
}, [e, t, a]);
|
|
7531
7534
|
he(() => {
|
|
7532
|
-
e &&
|
|
7535
|
+
e && N.current !== e && H();
|
|
7533
7536
|
}, [e]);
|
|
7534
7537
|
const B = oe(
|
|
7535
7538
|
async (F) => {
|
|
7536
|
-
f(!0),
|
|
7539
|
+
f(!0), S(null);
|
|
7537
7540
|
try {
|
|
7538
7541
|
const L = await t.submitRiskScoring(F);
|
|
7539
7542
|
return b(L), L;
|
|
7540
7543
|
} catch (L) {
|
|
7541
|
-
throw
|
|
7544
|
+
throw S(L), L;
|
|
7542
7545
|
} finally {
|
|
7543
7546
|
f(!1);
|
|
7544
7547
|
}
|
|
@@ -7548,33 +7551,33 @@ function qr(e) {
|
|
|
7548
7551
|
return {
|
|
7549
7552
|
criteria: r,
|
|
7550
7553
|
initialAnswers: o,
|
|
7551
|
-
result:
|
|
7554
|
+
result: R,
|
|
7552
7555
|
isLoading: d,
|
|
7553
7556
|
isSubmitting: m,
|
|
7554
|
-
error:
|
|
7557
|
+
error: g,
|
|
7555
7558
|
load: H,
|
|
7556
7559
|
submit: B
|
|
7557
7560
|
};
|
|
7558
7561
|
}
|
|
7559
7562
|
function di() {
|
|
7560
|
-
const { applicantService: e, config: t } = Me(), [a, r] = w(!1), [n, o] = w(null), l = ge(!1), d = ge(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(
|
|
7563
|
+
const { applicantService: e, config: t } = Me(), [a, r] = w(!1), [n, o] = w(null), l = ge(!1), d = ge(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(R) {
|
|
7561
7564
|
const b = Math.random() * 16 | 0;
|
|
7562
|
-
return (
|
|
7565
|
+
return (R === "x" ? b : b & 3 | 8).toString(16);
|
|
7563
7566
|
}), m = oe(
|
|
7564
|
-
async (
|
|
7567
|
+
async (R) => {
|
|
7565
7568
|
var b;
|
|
7566
7569
|
if (l.current)
|
|
7567
7570
|
throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
|
|
7568
7571
|
l.current = !0, r(!0), o(null);
|
|
7569
7572
|
try {
|
|
7570
|
-
if (
|
|
7571
|
-
const
|
|
7572
|
-
console.log("[SardinAI] Generated session key:",
|
|
7573
|
+
if (R.applicantAdditionalDatas || (R.applicantAdditionalDatas = []), (b = t.identityProviders) != null && b.sardinai) {
|
|
7574
|
+
const N = u();
|
|
7575
|
+
console.log("[SardinAI] Generated session key:", N), R.applicantAdditionalDatas.push({
|
|
7573
7576
|
paramName: "sessionKey",
|
|
7574
|
-
value:
|
|
7577
|
+
value: N
|
|
7575
7578
|
});
|
|
7576
7579
|
}
|
|
7577
|
-
return await e.createApplicant(
|
|
7580
|
+
return await e.createApplicant(R);
|
|
7578
7581
|
} catch (O) {
|
|
7579
7582
|
throw o(O), O;
|
|
7580
7583
|
} finally {
|
|
@@ -7583,10 +7586,10 @@ function di() {
|
|
|
7583
7586
|
},
|
|
7584
7587
|
[e, t]
|
|
7585
7588
|
), f = oe(
|
|
7586
|
-
async (
|
|
7589
|
+
async (R) => {
|
|
7587
7590
|
r(!0), o(null);
|
|
7588
7591
|
try {
|
|
7589
|
-
return await e.createCompanyApplicant(
|
|
7592
|
+
return await e.createCompanyApplicant(R);
|
|
7590
7593
|
} catch (b) {
|
|
7591
7594
|
throw o(b), b;
|
|
7592
7595
|
} finally {
|
|
@@ -7594,11 +7597,11 @@ function di() {
|
|
|
7594
7597
|
}
|
|
7595
7598
|
},
|
|
7596
7599
|
[e]
|
|
7597
|
-
),
|
|
7598
|
-
async (
|
|
7600
|
+
), g = oe(
|
|
7601
|
+
async (R) => {
|
|
7599
7602
|
d.current = !0, r(!0), o(null);
|
|
7600
7603
|
try {
|
|
7601
|
-
return await e.getApplicantData(
|
|
7604
|
+
return await e.getApplicantData(R);
|
|
7602
7605
|
} catch (b) {
|
|
7603
7606
|
throw o(b), b;
|
|
7604
7607
|
} finally {
|
|
@@ -7606,11 +7609,11 @@ function di() {
|
|
|
7606
7609
|
}
|
|
7607
7610
|
},
|
|
7608
7611
|
[e]
|
|
7609
|
-
),
|
|
7610
|
-
async (
|
|
7612
|
+
), S = oe(
|
|
7613
|
+
async (R) => {
|
|
7611
7614
|
r(!0), o(null);
|
|
7612
7615
|
try {
|
|
7613
|
-
await e.stopProgress(
|
|
7616
|
+
await e.stopProgress(R);
|
|
7614
7617
|
} catch (b) {
|
|
7615
7618
|
throw o(b), b;
|
|
7616
7619
|
} finally {
|
|
@@ -7624,8 +7627,8 @@ function di() {
|
|
|
7624
7627
|
error: n,
|
|
7625
7628
|
createApplicant: m,
|
|
7626
7629
|
createCompanyApplicant: f,
|
|
7627
|
-
getApplicantData:
|
|
7628
|
-
stopProgress:
|
|
7630
|
+
getApplicantData: g,
|
|
7631
|
+
stopProgress: S
|
|
7629
7632
|
};
|
|
7630
7633
|
}
|
|
7631
7634
|
const Kr = {
|
|
@@ -8039,7 +8042,7 @@ const _t = 280, Yr = ({
|
|
|
8039
8042
|
readOnly: l = !1,
|
|
8040
8043
|
required: d = !1
|
|
8041
8044
|
}) => {
|
|
8042
|
-
const { t: u } = Ie(), m = n ?? u("common.select"), f = o || l, [
|
|
8045
|
+
const { t: u } = Ie(), m = n ?? u("common.select"), f = o || l, [g, S] = w(!1), [R, b] = w(""), [O, N] = w(null), [H, B] = w({
|
|
8043
8046
|
bg: "#ffffff",
|
|
8044
8047
|
borderColor: "#d1d5db",
|
|
8045
8048
|
textPrimary: "#111827",
|
|
@@ -8062,34 +8065,34 @@ const _t = 280, Yr = ({
|
|
|
8062
8065
|
primaryLight: E("--metakyc-primary-light", "#eff6ff"),
|
|
8063
8066
|
hoverBg: E("--metakyc-surface", V)
|
|
8064
8067
|
});
|
|
8065
|
-
}, []),
|
|
8068
|
+
}, []), C = oe(() => {
|
|
8066
8069
|
if (f) return;
|
|
8067
8070
|
ie();
|
|
8068
8071
|
const M = J();
|
|
8069
|
-
M &&
|
|
8072
|
+
M && N(M), S(!0);
|
|
8070
8073
|
}, [f, J, ie]), z = oe(() => {
|
|
8071
|
-
|
|
8074
|
+
S(!1), b("");
|
|
8072
8075
|
}, []);
|
|
8073
8076
|
he(() => {
|
|
8074
|
-
if (!
|
|
8077
|
+
if (!g) return;
|
|
8075
8078
|
const M = (E) => {
|
|
8076
8079
|
var fe, ue;
|
|
8077
8080
|
const V = E.target;
|
|
8078
8081
|
!((fe = F.current) != null && fe.contains(V)) && !((ue = q.current) != null && ue.contains(V)) && z();
|
|
8079
8082
|
};
|
|
8080
8083
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
8081
|
-
}, [
|
|
8082
|
-
if (!
|
|
8084
|
+
}, [g, z]), he(() => {
|
|
8085
|
+
if (!g) return;
|
|
8083
8086
|
const M = () => {
|
|
8084
8087
|
const E = J();
|
|
8085
|
-
E &&
|
|
8088
|
+
E && N(E);
|
|
8086
8089
|
};
|
|
8087
8090
|
return window.addEventListener("scroll", M, !0), window.addEventListener("resize", M), () => {
|
|
8088
8091
|
window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M);
|
|
8089
8092
|
};
|
|
8090
|
-
}, [
|
|
8093
|
+
}, [g, J]);
|
|
8091
8094
|
const K = r.filter(
|
|
8092
|
-
(M) => M.label.toLowerCase().includes(
|
|
8095
|
+
(M) => M.label.toLowerCase().includes(R.toLowerCase())
|
|
8093
8096
|
), ee = (M) => {
|
|
8094
8097
|
f || a(t.includes(M) ? t.filter((E) => E !== M) : [...t, M]);
|
|
8095
8098
|
}, X = (M, E) => {
|
|
@@ -8097,7 +8100,7 @@ const _t = 280, Yr = ({
|
|
|
8097
8100
|
}, W = (M) => {
|
|
8098
8101
|
var E;
|
|
8099
8102
|
return ((E = r.find((V) => V.value === M)) == null ? void 0 : E.label) || M;
|
|
8100
|
-
}, { bg: te, borderColor: de, textPrimary: le, textSecondary: je, primaryColor: re, primaryLight: Ce, hoverBg: Se } = H, ye =
|
|
8103
|
+
}, { bg: te, borderColor: de, textPrimary: le, textSecondary: je, primaryColor: re, primaryLight: Ce, hoverBg: Se } = H, ye = g && O && /* @__PURE__ */ s(
|
|
8101
8104
|
"div",
|
|
8102
8105
|
{
|
|
8103
8106
|
ref: q,
|
|
@@ -8120,7 +8123,7 @@ const _t = 280, Yr = ({
|
|
|
8120
8123
|
"input",
|
|
8121
8124
|
{
|
|
8122
8125
|
type: "text",
|
|
8123
|
-
value:
|
|
8126
|
+
value: R,
|
|
8124
8127
|
onChange: (M) => b(M.target.value),
|
|
8125
8128
|
placeholder: u("common.search"),
|
|
8126
8129
|
autoFocus: !0,
|
|
@@ -8221,7 +8224,7 @@ const _t = 280, Yr = ({
|
|
|
8221
8224
|
"div",
|
|
8222
8225
|
{
|
|
8223
8226
|
ref: L,
|
|
8224
|
-
onClick: () =>
|
|
8227
|
+
onClick: () => g ? z() : C(),
|
|
8225
8228
|
className: Ke(
|
|
8226
8229
|
"metakyc-multiselect-trigger",
|
|
8227
8230
|
"w-full px-3 py-2 rounded-lg border text-sm transition-colors relative",
|
|
@@ -8230,8 +8233,8 @@ const _t = 280, Yr = ({
|
|
|
8230
8233
|
style: {
|
|
8231
8234
|
minHeight: "38px",
|
|
8232
8235
|
backgroundColor: "var(--metakyc-input-bg, #ffffff)",
|
|
8233
|
-
borderColor:
|
|
8234
|
-
outline:
|
|
8236
|
+
borderColor: g ? "var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
|
|
8237
|
+
outline: g ? "2px solid var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "none",
|
|
8235
8238
|
outlineOffset: "-1px"
|
|
8236
8239
|
},
|
|
8237
8240
|
children: [
|
|
@@ -8289,7 +8292,7 @@ const _t = 280, Yr = ({
|
|
|
8289
8292
|
{
|
|
8290
8293
|
className: "metakyc-multiselect-arrow absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-xs",
|
|
8291
8294
|
style: { color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
8292
|
-
children:
|
|
8295
|
+
children: g ? "▲" : "▼"
|
|
8293
8296
|
}
|
|
8294
8297
|
)
|
|
8295
8298
|
]
|
|
@@ -8311,7 +8314,7 @@ const _t = 280, Yr = ({
|
|
|
8311
8314
|
className: f
|
|
8312
8315
|
}) => {
|
|
8313
8316
|
var ue;
|
|
8314
|
-
const { t:
|
|
8317
|
+
const { t: g } = Ie(), S = n ?? g("common.select"), R = d || u, [b, O] = w(!1), [N, H] = w(""), [B, F] = w(null), [L, q] = w({
|
|
8315
8318
|
bg: "#ffffff",
|
|
8316
8319
|
border: "#d1d5db",
|
|
8317
8320
|
text: "#111827",
|
|
@@ -8330,9 +8333,9 @@ const _t = 280, Yr = ({
|
|
|
8330
8333
|
primaryLight: _("--metakyc-primary-light", "#eff6ff"),
|
|
8331
8334
|
hoverBg: _("--metakyc-surface", ve)
|
|
8332
8335
|
});
|
|
8333
|
-
}, []), ie = ge(null),
|
|
8334
|
-
if (!
|
|
8335
|
-
const j =
|
|
8336
|
+
}, []), ie = ge(null), C = ge(null), z = ge(null), K = ge(null), ee = oe(() => {
|
|
8337
|
+
if (!C.current) return null;
|
|
8338
|
+
const j = C.current.getBoundingClientRect(), ve = window.innerHeight - j.bottom < Gt && j.top > Gt;
|
|
8336
8339
|
return {
|
|
8337
8340
|
top: ve ? j.top : j.bottom + 4,
|
|
8338
8341
|
left: j.left,
|
|
@@ -8340,11 +8343,11 @@ const _t = 280, Yr = ({
|
|
|
8340
8343
|
openUp: ve
|
|
8341
8344
|
};
|
|
8342
8345
|
}, []), X = oe(() => {
|
|
8343
|
-
if (
|
|
8346
|
+
if (R) return;
|
|
8344
8347
|
J();
|
|
8345
8348
|
const j = ee();
|
|
8346
8349
|
j && F(j), O(!0);
|
|
8347
|
-
}, [
|
|
8350
|
+
}, [R, ee, J]), W = oe(() => {
|
|
8348
8351
|
O(!1), H("");
|
|
8349
8352
|
}, []), te = () => b ? W() : X();
|
|
8350
8353
|
he(() => {
|
|
@@ -8371,9 +8374,9 @@ const _t = 280, Yr = ({
|
|
|
8371
8374
|
}, 0);
|
|
8372
8375
|
}, [b]);
|
|
8373
8376
|
const de = r.filter(
|
|
8374
|
-
(j) => j.label.toLowerCase().includes(
|
|
8377
|
+
(j) => j.label.toLowerCase().includes(N.toLowerCase()) || j.value.toLowerCase().includes(N.toLowerCase())
|
|
8375
8378
|
), le = (ue = r.find((j) => j.value === o)) == null ? void 0 : ue.label, je = (j, _) => {
|
|
8376
|
-
|
|
8379
|
+
R || _ || (l(j), W());
|
|
8377
8380
|
}, { bg: re, border: Ce, text: Se, textSecondary: ye, primary: M, primaryLight: E, hoverBg: V } = L, fe = b && B && /* @__PURE__ */ s(
|
|
8378
8381
|
"div",
|
|
8379
8382
|
{
|
|
@@ -8398,9 +8401,9 @@ const _t = 280, Yr = ({
|
|
|
8398
8401
|
{
|
|
8399
8402
|
ref: K,
|
|
8400
8403
|
type: "text",
|
|
8401
|
-
value:
|
|
8404
|
+
value: N,
|
|
8402
8405
|
onChange: (j) => H(j.target.value),
|
|
8403
|
-
placeholder:
|
|
8406
|
+
placeholder: g("common.search"),
|
|
8404
8407
|
onClick: (j) => j.stopPropagation(),
|
|
8405
8408
|
className: "metakyc-searchable-select-search w-full",
|
|
8406
8409
|
style: {
|
|
@@ -8434,7 +8437,7 @@ const _t = 280, Yr = ({
|
|
|
8434
8437
|
maxHeight: "208px",
|
|
8435
8438
|
overflowY: "auto"
|
|
8436
8439
|
},
|
|
8437
|
-
children: de.length === 0 ? /* @__PURE__ */ i("li", { style: { padding: "8px 12px", fontSize: "13px", color: ye }, children:
|
|
8440
|
+
children: de.length === 0 ? /* @__PURE__ */ i("li", { style: { padding: "8px 12px", fontSize: "13px", color: ye }, children: g("common.noResults") }) : de.map((j) => {
|
|
8438
8441
|
const _ = j.value === o;
|
|
8439
8442
|
return /* @__PURE__ */ i(
|
|
8440
8443
|
"li",
|
|
@@ -8486,9 +8489,9 @@ const _t = 280, Yr = ({
|
|
|
8486
8489
|
/* @__PURE__ */ s(
|
|
8487
8490
|
"div",
|
|
8488
8491
|
{
|
|
8489
|
-
ref:
|
|
8492
|
+
ref: C,
|
|
8490
8493
|
role: "button",
|
|
8491
|
-
tabIndex:
|
|
8494
|
+
tabIndex: R ? -1 : 0,
|
|
8492
8495
|
onClick: te,
|
|
8493
8496
|
onKeyDown: (j) => {
|
|
8494
8497
|
(j.key === "Enter" || j.key === " ") && (j.preventDefault(), te()), j.key === "Escape" && W();
|
|
@@ -8498,7 +8501,7 @@ const _t = 280, Yr = ({
|
|
|
8498
8501
|
"w-full px-3 py-2 rounded-lg border text-sm transition-colors text-left",
|
|
8499
8502
|
"flex items-center justify-between gap-2",
|
|
8500
8503
|
"focus:outline-none",
|
|
8501
|
-
|
|
8504
|
+
R ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
|
|
8502
8505
|
),
|
|
8503
8506
|
style: {
|
|
8504
8507
|
backgroundColor: "var(--metakyc-input-bg, #ffffff)",
|
|
@@ -8509,7 +8512,7 @@ const _t = 280, Yr = ({
|
|
|
8509
8512
|
outlineOffset: "-1px"
|
|
8510
8513
|
},
|
|
8511
8514
|
children: [
|
|
8512
|
-
/* @__PURE__ */ i("span", { className: "truncate flex-1", children: le ||
|
|
8515
|
+
/* @__PURE__ */ i("span", { className: "truncate flex-1", children: le || S }),
|
|
8513
8516
|
/* @__PURE__ */ i(
|
|
8514
8517
|
"span",
|
|
8515
8518
|
{
|
|
@@ -8545,29 +8548,29 @@ const $r = ({
|
|
|
8545
8548
|
value: u = [],
|
|
8546
8549
|
className: m
|
|
8547
8550
|
}) => {
|
|
8548
|
-
const { t: f } = Ie(), [
|
|
8549
|
-
if (!
|
|
8551
|
+
const { t: f } = Ie(), [g, S] = w(!1), [R, b] = w(null), O = ge(null), N = oe((C) => {
|
|
8552
|
+
if (!C) return;
|
|
8550
8553
|
b(null);
|
|
8551
|
-
const z = Array.from(
|
|
8554
|
+
const z = Array.from(C);
|
|
8552
8555
|
if (o && z.filter((ee) => ee.size > o).length > 0) {
|
|
8553
8556
|
b(`File exceeds the maximum size of ${It(o)}`);
|
|
8554
8557
|
return;
|
|
8555
8558
|
}
|
|
8556
8559
|
d == null || d(n ? [...u, ...z] : [z[0]]);
|
|
8557
|
-
}, [o, n, d, u]), H = oe((
|
|
8558
|
-
|
|
8559
|
-
}, []), B = oe((
|
|
8560
|
-
|
|
8561
|
-
}, []), F = oe((
|
|
8562
|
-
|
|
8563
|
-
}, [
|
|
8564
|
-
var
|
|
8565
|
-
(
|
|
8566
|
-
}, q = (
|
|
8560
|
+
}, [o, n, d, u]), H = oe((C) => {
|
|
8561
|
+
C.preventDefault(), C.stopPropagation(), S(!0);
|
|
8562
|
+
}, []), B = oe((C) => {
|
|
8563
|
+
C.preventDefault(), C.stopPropagation(), S(!1);
|
|
8564
|
+
}, []), F = oe((C) => {
|
|
8565
|
+
C.preventDefault(), C.stopPropagation(), S(!1), N(C.dataTransfer.files);
|
|
8566
|
+
}, [N]), L = () => {
|
|
8567
|
+
var C;
|
|
8568
|
+
(C = O.current) == null || C.click();
|
|
8569
|
+
}, q = (C) => {
|
|
8567
8570
|
b(null);
|
|
8568
|
-
const z = u.filter((K, ee) => ee !==
|
|
8571
|
+
const z = u.filter((K, ee) => ee !== C);
|
|
8569
8572
|
d == null || d(z);
|
|
8570
|
-
}, J = a ||
|
|
8573
|
+
}, J = a || R, ie = u.length > 0;
|
|
8571
8574
|
return /* @__PURE__ */ s("div", { className: Ke("metakyc-file-upload", m), style: { width: "100%" }, children: [
|
|
8572
8575
|
e && /* @__PURE__ */ s("div", { style: { marginBottom: "8px" }, children: [
|
|
8573
8576
|
/* @__PURE__ */ s(
|
|
@@ -8596,13 +8599,13 @@ const $r = ({
|
|
|
8596
8599
|
onDragLeave: B,
|
|
8597
8600
|
onDrop: F,
|
|
8598
8601
|
style: {
|
|
8599
|
-
border: `2px dashed ${J ? "var(--metakyc-danger, #ef4444)" :
|
|
8602
|
+
border: `2px dashed ${J ? "var(--metakyc-danger, #ef4444)" : g ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #d1d5db)"}`,
|
|
8600
8603
|
borderRadius: "12px",
|
|
8601
8604
|
padding: ie ? "20px" : "32px 20px",
|
|
8602
8605
|
textAlign: "center",
|
|
8603
8606
|
cursor: "pointer",
|
|
8604
8607
|
transition: "all 0.2s ease",
|
|
8605
|
-
backgroundColor:
|
|
8608
|
+
backgroundColor: g ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 5%, var(--metakyc-background, #ffffff))" : "var(--metakyc-background, #ffffff)"
|
|
8606
8609
|
},
|
|
8607
8610
|
children: [
|
|
8608
8611
|
/* @__PURE__ */ i(
|
|
@@ -8613,8 +8616,8 @@ const $r = ({
|
|
|
8613
8616
|
style: { display: "none" },
|
|
8614
8617
|
accept: r,
|
|
8615
8618
|
multiple: n,
|
|
8616
|
-
onChange: (
|
|
8617
|
-
|
|
8619
|
+
onChange: (C) => {
|
|
8620
|
+
N(C.target.files), C.target.value = "";
|
|
8618
8621
|
}
|
|
8619
8622
|
}
|
|
8620
8623
|
),
|
|
@@ -8629,7 +8632,7 @@ const $r = ({
|
|
|
8629
8632
|
display: "flex",
|
|
8630
8633
|
alignItems: "center",
|
|
8631
8634
|
justifyContent: "center",
|
|
8632
|
-
backgroundColor:
|
|
8635
|
+
backgroundColor: g ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "var(--metakyc-surface, #f9fafb)",
|
|
8633
8636
|
transition: "background-color 0.2s ease"
|
|
8634
8637
|
},
|
|
8635
8638
|
children: /* @__PURE__ */ s(
|
|
@@ -8639,7 +8642,7 @@ const $r = ({
|
|
|
8639
8642
|
height: "24",
|
|
8640
8643
|
viewBox: "0 0 24 24",
|
|
8641
8644
|
fill: "none",
|
|
8642
|
-
stroke:
|
|
8645
|
+
stroke: g ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
|
|
8643
8646
|
strokeWidth: "2",
|
|
8644
8647
|
strokeLinecap: "round",
|
|
8645
8648
|
strokeLinejoin: "round",
|
|
@@ -8669,8 +8672,8 @@ const $r = ({
|
|
|
8669
8672
|
]
|
|
8670
8673
|
}
|
|
8671
8674
|
),
|
|
8672
|
-
ie && /* @__PURE__ */ i("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: u.map((
|
|
8673
|
-
const K = Hr(
|
|
8675
|
+
ie && /* @__PURE__ */ i("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: u.map((C, z) => {
|
|
8676
|
+
const K = Hr(C), ee = K === "image", X = ee ? URL.createObjectURL(C) : null;
|
|
8674
8677
|
return /* @__PURE__ */ s(
|
|
8675
8678
|
"div",
|
|
8676
8679
|
{
|
|
@@ -8704,7 +8707,7 @@ const $r = ({
|
|
|
8704
8707
|
"img",
|
|
8705
8708
|
{
|
|
8706
8709
|
src: X,
|
|
8707
|
-
alt:
|
|
8710
|
+
alt: C.name,
|
|
8708
8711
|
style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }
|
|
8709
8712
|
}
|
|
8710
8713
|
) : K === "pdf" ? /* @__PURE__ */ s("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -8728,8 +8731,8 @@ const $r = ({
|
|
|
8728
8731
|
overflow: "hidden",
|
|
8729
8732
|
textOverflow: "ellipsis",
|
|
8730
8733
|
whiteSpace: "nowrap"
|
|
8731
|
-
}, children:
|
|
8732
|
-
/* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0, marginTop: "2px" }, children: It(
|
|
8734
|
+
}, children: C.name }),
|
|
8735
|
+
/* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0, marginTop: "2px" }, children: It(C.size) })
|
|
8733
8736
|
] }),
|
|
8734
8737
|
/* @__PURE__ */ i(
|
|
8735
8738
|
"button",
|
|
@@ -8767,7 +8770,7 @@ const $r = ({
|
|
|
8767
8770
|
)
|
|
8768
8771
|
]
|
|
8769
8772
|
},
|
|
8770
|
-
`${
|
|
8773
|
+
`${C.name}-${z}`
|
|
8771
8774
|
);
|
|
8772
8775
|
}) }),
|
|
8773
8776
|
J && /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", marginTop: "6px" }, children: J })
|
|
@@ -8997,33 +9000,33 @@ const aa = ({
|
|
|
8997
9000
|
onComplete: t,
|
|
8998
9001
|
onBack: a
|
|
8999
9002
|
}) => {
|
|
9000
|
-
const { t: r } = Ie(), { questionnaire: n, initialAnswers: o, isLoading: l, isSubmitting: d, error: u, submit: m } = Fr(e), [f,
|
|
9003
|
+
const { t: r } = Ie(), { questionnaire: n, initialAnswers: o, isLoading: l, isSubmitting: d, error: u, submit: m } = Fr(e), [f, g] = w({}), [S, R] = w({}), [b, O] = w(0);
|
|
9001
9004
|
Re.useEffect(() => {
|
|
9002
|
-
o && Object.keys(o).length > 0 && Object.keys(f).length === 0 &&
|
|
9005
|
+
o && Object.keys(o).length > 0 && Object.keys(f).length === 0 && g(o);
|
|
9003
9006
|
}, [o]);
|
|
9004
|
-
const
|
|
9007
|
+
const N = Ue(
|
|
9005
9008
|
() => n ? ra(n.questionGroups) : [],
|
|
9006
9009
|
[n]
|
|
9007
|
-
), H = b ===
|
|
9008
|
-
|
|
9010
|
+
), H = b === N.length - 1, B = N[b] ?? [], F = oe((C, z) => {
|
|
9011
|
+
g((K) => ({ ...K, [C]: z })), R((K) => {
|
|
9009
9012
|
const ee = { ...K };
|
|
9010
|
-
return delete ee[
|
|
9013
|
+
return delete ee[C], ee;
|
|
9011
9014
|
});
|
|
9012
9015
|
}, []), L = oe(() => {
|
|
9013
|
-
const
|
|
9016
|
+
const C = {};
|
|
9014
9017
|
for (const { question: z } of B) {
|
|
9015
9018
|
const K = ia(z, f[z.id] ?? []);
|
|
9016
|
-
K && (
|
|
9019
|
+
K && (C[z.id] = K);
|
|
9017
9020
|
}
|
|
9018
|
-
return
|
|
9021
|
+
return R((z) => ({ ...z, ...C })), Object.keys(C).length === 0;
|
|
9019
9022
|
}, [B, f]), q = () => {
|
|
9020
|
-
L() && O((
|
|
9023
|
+
L() && O((C) => C + 1);
|
|
9021
9024
|
}, J = () => {
|
|
9022
|
-
b > 0 ? O((
|
|
9025
|
+
b > 0 ? O((C) => C - 1) : a == null || a();
|
|
9023
9026
|
}, ie = async () => {
|
|
9024
9027
|
if (!(!L() || !n))
|
|
9025
9028
|
try {
|
|
9026
|
-
const
|
|
9029
|
+
const C = n.questionGroups.flatMap(
|
|
9027
9030
|
(K) => (K.questions ?? []).map((ee) => ({
|
|
9028
9031
|
questionId: ee.id,
|
|
9029
9032
|
values: f[ee.id] ?? []
|
|
@@ -9031,11 +9034,11 @@ const aa = ({
|
|
|
9031
9034
|
), z = {
|
|
9032
9035
|
applicantId: e,
|
|
9033
9036
|
questionnarieId: n.id,
|
|
9034
|
-
questionResults:
|
|
9037
|
+
questionResults: C
|
|
9035
9038
|
};
|
|
9036
9039
|
await m(z), t == null || t();
|
|
9037
|
-
} catch (
|
|
9038
|
-
console.error("Questionnaire submit error:",
|
|
9040
|
+
} catch (C) {
|
|
9041
|
+
console.error("Questionnaire submit error:", C);
|
|
9039
9042
|
}
|
|
9040
9043
|
};
|
|
9041
9044
|
return l ? /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(Ye, { className: "my-8" }) }) }) : u ? /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
|
|
@@ -9046,9 +9049,9 @@ const aa = ({
|
|
|
9046
9049
|
/* @__PURE__ */ s(Ae, { children: [
|
|
9047
9050
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: n.displayName }),
|
|
9048
9051
|
n.subtitle && /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n.subtitle }),
|
|
9049
|
-
|
|
9050
|
-
/* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current: b + 1, total:
|
|
9051
|
-
/* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children:
|
|
9052
|
+
N.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
|
|
9053
|
+
/* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current: b + 1, total: N.length }) }),
|
|
9054
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: N.map((C, z) => /* @__PURE__ */ i(
|
|
9052
9055
|
"div",
|
|
9053
9056
|
{
|
|
9054
9057
|
className: "rounded-full transition-all duration-200",
|
|
@@ -9062,15 +9065,15 @@ const aa = ({
|
|
|
9062
9065
|
)) })
|
|
9063
9066
|
] })
|
|
9064
9067
|
] }),
|
|
9065
|
-
/* @__PURE__ */ i(ne, { className: "space-y-6", children: B.map(({ question:
|
|
9068
|
+
/* @__PURE__ */ i(ne, { className: "space-y-6", children: B.map(({ question: C }) => /* @__PURE__ */ i(
|
|
9066
9069
|
na,
|
|
9067
9070
|
{
|
|
9068
|
-
question:
|
|
9069
|
-
value: f[
|
|
9070
|
-
error:
|
|
9071
|
-
onChange: (z) => F(
|
|
9071
|
+
question: C,
|
|
9072
|
+
value: f[C.id] ?? [],
|
|
9073
|
+
error: S[C.id],
|
|
9074
|
+
onChange: (z) => F(C.id, z)
|
|
9072
9075
|
},
|
|
9073
|
-
|
|
9076
|
+
C.id
|
|
9074
9077
|
)) }),
|
|
9075
9078
|
/* @__PURE__ */ s(Le, { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
9076
9079
|
/* @__PURE__ */ s(
|
|
@@ -9184,7 +9187,7 @@ const aa = ({
|
|
|
9184
9187
|
(l === "checkbox" || l === "multi-select") && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
9185
9188
|
(e.defaultAnswers ?? []).map((u) => {
|
|
9186
9189
|
const m = t.includes(u), f = () => {
|
|
9187
|
-
r(m ? t.filter((
|
|
9190
|
+
r(m ? t.filter((g) => g !== u) : [...t, u]);
|
|
9188
9191
|
};
|
|
9189
9192
|
return /* @__PURE__ */ s(
|
|
9190
9193
|
"div",
|
|
@@ -9218,21 +9221,21 @@ const sa = ({
|
|
|
9218
9221
|
onComplete: t,
|
|
9219
9222
|
onBack: a
|
|
9220
9223
|
}) => {
|
|
9221
|
-
const { t: r } = Ie(), { uploadDocument: n, isLoading: o, isSubmitting: l, error: d, submit: u } = Or(e), [m, f] = w({}), [
|
|
9224
|
+
const { t: r } = Ie(), { uploadDocument: n, isLoading: o, isSubmitting: l, error: d, submit: u } = Or(e), [m, f] = w({}), [g, S] = w(null), [R, b] = w(0), [O, N] = w({}), H = Ue(
|
|
9222
9225
|
() => n ? oa(n.uploadDocumentFiles) : [],
|
|
9223
9226
|
[n]
|
|
9224
|
-
), B = H[
|
|
9227
|
+
), B = H[R] ?? [], F = R === H.length - 1, L = H.length, q = oe(() => {
|
|
9225
9228
|
const z = {};
|
|
9226
9229
|
for (const K of B)
|
|
9227
9230
|
K.isRequired && (m[K.id] || []).length === 0 && (z[K.id] = `${K.displayName} is required`);
|
|
9228
|
-
return
|
|
9231
|
+
return N(z), Object.keys(z).length === 0;
|
|
9229
9232
|
}, [B, m]), J = () => {
|
|
9230
|
-
q() && (b((z) => z + 1),
|
|
9233
|
+
q() && (b((z) => z + 1), N({}));
|
|
9231
9234
|
}, ie = () => {
|
|
9232
|
-
|
|
9233
|
-
},
|
|
9235
|
+
R > 0 ? (b((z) => z - 1), N({})) : a == null || a();
|
|
9236
|
+
}, C = async () => {
|
|
9234
9237
|
if (!(!q() || !n)) {
|
|
9235
|
-
|
|
9238
|
+
S(null);
|
|
9236
9239
|
try {
|
|
9237
9240
|
const z = await Promise.all(
|
|
9238
9241
|
n.uploadDocumentFiles.map(async (ee) => {
|
|
@@ -9254,7 +9257,7 @@ const sa = ({
|
|
|
9254
9257
|
};
|
|
9255
9258
|
await u(K), t == null || t();
|
|
9256
9259
|
} catch (z) {
|
|
9257
|
-
|
|
9260
|
+
S((z == null ? void 0 : z.message) || r("uploadDocument.failedToSubmit"));
|
|
9258
9261
|
}
|
|
9259
9262
|
}
|
|
9260
9263
|
};
|
|
@@ -9303,23 +9306,23 @@ const sa = ({
|
|
|
9303
9306
|
justifyContent: "space-between",
|
|
9304
9307
|
marginTop: "12px"
|
|
9305
9308
|
}, children: [
|
|
9306
|
-
/* @__PURE__ */ i("span", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current:
|
|
9309
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current: R + 1, total: L }) }),
|
|
9307
9310
|
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: H.map((z, K) => /* @__PURE__ */ i(
|
|
9308
9311
|
"div",
|
|
9309
9312
|
{
|
|
9310
9313
|
style: {
|
|
9311
9314
|
height: "6px",
|
|
9312
|
-
width: K ===
|
|
9315
|
+
width: K === R ? "20px" : "6px",
|
|
9313
9316
|
borderRadius: "999px",
|
|
9314
9317
|
transition: "all 0.2s ease",
|
|
9315
|
-
backgroundColor: K <=
|
|
9318
|
+
backgroundColor: K <= R ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
9316
9319
|
}
|
|
9317
9320
|
},
|
|
9318
9321
|
K
|
|
9319
9322
|
)) })
|
|
9320
9323
|
] })
|
|
9321
9324
|
] }),
|
|
9322
|
-
n.description &&
|
|
9325
|
+
n.description && R === 0 && /* @__PURE__ */ s("div", { style: {
|
|
9323
9326
|
margin: "0 24px",
|
|
9324
9327
|
marginTop: "4px",
|
|
9325
9328
|
display: "flex",
|
|
@@ -9367,7 +9370,7 @@ const sa = ({
|
|
|
9367
9370
|
error: O[z.id],
|
|
9368
9371
|
value: m[z.id] || [],
|
|
9369
9372
|
onChange: (K) => {
|
|
9370
|
-
|
|
9373
|
+
S(null), N((ee) => {
|
|
9371
9374
|
const X = { ...ee };
|
|
9372
9375
|
return delete X[z.id], X;
|
|
9373
9376
|
}), f((ee) => ({ ...ee, [z.id]: K }));
|
|
@@ -9375,7 +9378,7 @@ const sa = ({
|
|
|
9375
9378
|
},
|
|
9376
9379
|
z.id
|
|
9377
9380
|
)) }) }),
|
|
9378
|
-
|
|
9381
|
+
g && /* @__PURE__ */ s("div", { style: {
|
|
9379
9382
|
margin: "0 24px",
|
|
9380
9383
|
padding: "10px 14px",
|
|
9381
9384
|
borderRadius: "8px",
|
|
@@ -9390,7 +9393,7 @@ const sa = ({
|
|
|
9390
9393
|
/* @__PURE__ */ i("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
9391
9394
|
/* @__PURE__ */ i("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
9392
9395
|
] }),
|
|
9393
|
-
/* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children:
|
|
9396
|
+
/* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: g })
|
|
9394
9397
|
] }),
|
|
9395
9398
|
/* @__PURE__ */ i(Le, { children: /* @__PURE__ */ s("div", { style: {
|
|
9396
9399
|
display: "flex",
|
|
@@ -9404,7 +9407,7 @@ const sa = ({
|
|
|
9404
9407
|
type: "button",
|
|
9405
9408
|
variant: "outline",
|
|
9406
9409
|
onClick: ie,
|
|
9407
|
-
children:
|
|
9410
|
+
children: R > 0 ? r("common.previous") : r("common.back")
|
|
9408
9411
|
}
|
|
9409
9412
|
),
|
|
9410
9413
|
F ? /* @__PURE__ */ i(
|
|
@@ -9412,7 +9415,7 @@ const sa = ({
|
|
|
9412
9415
|
{
|
|
9413
9416
|
type: "button",
|
|
9414
9417
|
isLoading: l,
|
|
9415
|
-
onClick:
|
|
9418
|
+
onClick: C,
|
|
9416
9419
|
children: r(l ? "uploadDocument.uploading" : "common.continue")
|
|
9417
9420
|
}
|
|
9418
9421
|
) : /* @__PURE__ */ i(
|
|
@@ -9438,7 +9441,7 @@ const sa = ({
|
|
|
9438
9441
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: n.title || r("overview.title") }),
|
|
9439
9442
|
n.description && /* @__PURE__ */ i("p", { className: "mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n.description })
|
|
9440
9443
|
] }),
|
|
9441
|
-
/* @__PURE__ */ i(ne, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((f,
|
|
9444
|
+
/* @__PURE__ */ i(ne, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((f, g) => f.order - g.order).map((f) => /* @__PURE__ */ s("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
|
|
9442
9445
|
/* @__PURE__ */ i("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ i(
|
|
9443
9446
|
"div",
|
|
9444
9447
|
{
|
|
@@ -9536,41 +9539,41 @@ const ya = ({
|
|
|
9536
9539
|
onComplete: t,
|
|
9537
9540
|
onBack: a
|
|
9538
9541
|
}) => {
|
|
9539
|
-
const { t: r } = Ie(), { config: n } = Me(), o = n.locale ?? "en", { criteria: l, initialAnswers: d, isLoading: u, isSubmitting: m, error: f, submit:
|
|
9542
|
+
const { t: r } = Ie(), { config: n } = Me(), o = n.locale ?? "en", { criteria: l, initialAnswers: d, isLoading: u, isSubmitting: m, error: f, submit: g } = qr(e), [S, R] = w({}), [b, O] = w({}), [N, H] = w(0), [B, F] = w(!1);
|
|
9540
9543
|
Re.useEffect(() => {
|
|
9541
|
-
d && Object.keys(d).length > 0 && Object.keys(
|
|
9544
|
+
d && Object.keys(d).length > 0 && Object.keys(S).length === 0 && R(d);
|
|
9542
9545
|
}, [d]);
|
|
9543
9546
|
const L = Ue(
|
|
9544
9547
|
() => l && l.length > 0 ? pa(l) : [],
|
|
9545
9548
|
[l]
|
|
9546
|
-
), q =
|
|
9549
|
+
), q = N === L.length - 1, J = L[N] ?? [];
|
|
9547
9550
|
Re.useEffect(() => {
|
|
9548
|
-
!u && l && l.length === 0 && !B && !m && (F(!0),
|
|
9549
|
-
}, [u, l, B, m,
|
|
9551
|
+
!u && l && l.length === 0 && !B && !m && (F(!0), g({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
9552
|
+
}, [u, l, B, m, g, e, t]);
|
|
9550
9553
|
const ie = oe((X, W) => {
|
|
9551
|
-
|
|
9554
|
+
R((te) => ({ ...te, [X]: W })), O((te) => {
|
|
9552
9555
|
const de = { ...te };
|
|
9553
9556
|
return delete de[X], de;
|
|
9554
9557
|
});
|
|
9555
|
-
}, []),
|
|
9558
|
+
}, []), C = oe(() => {
|
|
9556
9559
|
const X = {};
|
|
9557
9560
|
for (const { criterion: W } of J) {
|
|
9558
|
-
const te = ua(W,
|
|
9561
|
+
const te = ua(W, S[W.id] ?? []);
|
|
9559
9562
|
te && (X[W.id] = te);
|
|
9560
9563
|
}
|
|
9561
9564
|
return O((W) => ({ ...W, ...X })), Object.keys(X).length === 0;
|
|
9562
|
-
}, [J,
|
|
9563
|
-
|
|
9565
|
+
}, [J, S]), z = () => {
|
|
9566
|
+
C() && H((X) => X + 1);
|
|
9564
9567
|
}, K = () => {
|
|
9565
|
-
|
|
9568
|
+
N > 0 ? H((X) => X - 1) : a == null || a();
|
|
9566
9569
|
}, ee = async () => {
|
|
9567
|
-
if (!(!
|
|
9570
|
+
if (!(!C() || !l))
|
|
9568
9571
|
try {
|
|
9569
9572
|
const X = l.map((te) => {
|
|
9570
|
-
const de = (
|
|
9573
|
+
const de = (S[te.id] ?? []).filter((le) => le && le.trim());
|
|
9571
9574
|
return de.length > 0 ? { riskCriteriaId: te.id, values: de } : null;
|
|
9572
9575
|
}).filter((te) => te !== null);
|
|
9573
|
-
await
|
|
9576
|
+
await g({ applicantId: e, criteriaValueInputs: X }), t == null || t();
|
|
9574
9577
|
} catch (X) {
|
|
9575
9578
|
console.error("Risk scoring submit error:", X);
|
|
9576
9579
|
}
|
|
@@ -9590,15 +9593,15 @@ const ya = ({
|
|
|
9590
9593
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: r("riskScoring.title") }),
|
|
9591
9594
|
/* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("riskScoring.subtitle") }),
|
|
9592
9595
|
L.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
|
|
9593
|
-
/* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current:
|
|
9596
|
+
/* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current: N + 1, total: L.length }) }),
|
|
9594
9597
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: L.map((X, W) => /* @__PURE__ */ i(
|
|
9595
9598
|
"div",
|
|
9596
9599
|
{
|
|
9597
9600
|
className: "rounded-full transition-all duration-200",
|
|
9598
9601
|
style: {
|
|
9599
9602
|
height: "6px",
|
|
9600
|
-
width: W ===
|
|
9601
|
-
backgroundColor: W <=
|
|
9603
|
+
width: W === N ? "20px" : "6px",
|
|
9604
|
+
backgroundColor: W <= N ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
9602
9605
|
}
|
|
9603
9606
|
},
|
|
9604
9607
|
W
|
|
@@ -9609,7 +9612,7 @@ const ya = ({
|
|
|
9609
9612
|
fa,
|
|
9610
9613
|
{
|
|
9611
9614
|
criterion: X,
|
|
9612
|
-
value:
|
|
9615
|
+
value: S[X.id] ?? [],
|
|
9613
9616
|
error: b[X.id],
|
|
9614
9617
|
locale: o,
|
|
9615
9618
|
onChange: (W) => ie(X.id, W)
|
|
@@ -9626,7 +9629,7 @@ const ya = ({
|
|
|
9626
9629
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
9627
9630
|
children: [
|
|
9628
9631
|
/* @__PURE__ */ i(gi, { size: 14 }),
|
|
9629
|
-
|
|
9632
|
+
N > 0 ? r("common.previous") : r("common.back")
|
|
9630
9633
|
]
|
|
9631
9634
|
}
|
|
9632
9635
|
),
|
|
@@ -9687,7 +9690,7 @@ const ya = ({
|
|
|
9687
9690
|
type: "radio",
|
|
9688
9691
|
checked: t[0] === f,
|
|
9689
9692
|
onChange: () => n([f]),
|
|
9690
|
-
onClick: (
|
|
9693
|
+
onClick: (g) => g.stopPropagation(),
|
|
9691
9694
|
className: "metakyc-option-input",
|
|
9692
9695
|
style: {
|
|
9693
9696
|
width: "16px",
|
|
@@ -9713,17 +9716,17 @@ const ya = ({
|
|
|
9713
9716
|
] }),
|
|
9714
9717
|
l === "checkbox" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
9715
9718
|
(e.defaultValues ?? []).map((f) => {
|
|
9716
|
-
const
|
|
9717
|
-
n(
|
|
9719
|
+
const g = t.includes(f), S = () => {
|
|
9720
|
+
n(g ? t.filter((R) => R !== f) : [...t, f]);
|
|
9718
9721
|
};
|
|
9719
9722
|
return /* @__PURE__ */ s(
|
|
9720
9723
|
"div",
|
|
9721
9724
|
{
|
|
9722
9725
|
className: "metakyc-option-label",
|
|
9723
|
-
onClick:
|
|
9726
|
+
onClick: S,
|
|
9724
9727
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
|
|
9725
9728
|
children: [
|
|
9726
|
-
/* @__PURE__ */ i(Ge, { checked:
|
|
9729
|
+
/* @__PURE__ */ i(Ge, { checked: g, onChange: () => S() }),
|
|
9727
9730
|
/* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: m(f) })
|
|
9728
9731
|
]
|
|
9729
9732
|
},
|
|
@@ -9756,22 +9759,22 @@ const ya = ({
|
|
|
9756
9759
|
onBack: a
|
|
9757
9760
|
}) => {
|
|
9758
9761
|
const { t: r } = Ie(), { investorCategorizationService: n } = Me(), [o, l] = w(null), [d, u] = w(!1), [m, f] = w(null);
|
|
9759
|
-
return /* @__PURE__ */ i("form", { onSubmit: async (
|
|
9760
|
-
if (
|
|
9762
|
+
return /* @__PURE__ */ i("form", { onSubmit: async (S) => {
|
|
9763
|
+
if (S.preventDefault(), o === null) {
|
|
9761
9764
|
f(r("investorCategorization.pleaseSelect"));
|
|
9762
9765
|
return;
|
|
9763
9766
|
}
|
|
9764
9767
|
u(!0), f(null);
|
|
9765
9768
|
try {
|
|
9766
|
-
const
|
|
9769
|
+
const R = {
|
|
9767
9770
|
applicantId: e,
|
|
9768
9771
|
investorType: o
|
|
9769
9772
|
};
|
|
9770
|
-
console.log("Submitting investor categorization:",
|
|
9771
|
-
const b = await n.setInvestorCategorization(
|
|
9773
|
+
console.log("Submitting investor categorization:", R);
|
|
9774
|
+
const b = await n.setInvestorCategorization(R);
|
|
9772
9775
|
console.log("Investor categorization result:", b), t == null || t();
|
|
9773
|
-
} catch (
|
|
9774
|
-
console.error("Error submitting investor categorization:",
|
|
9776
|
+
} catch (R) {
|
|
9777
|
+
console.error("Error submitting investor categorization:", R), f(R.message || r("investorCategorization.failedToSubmit"));
|
|
9775
9778
|
} finally {
|
|
9776
9779
|
u(!1);
|
|
9777
9780
|
}
|
|
@@ -9896,18 +9899,18 @@ const ha = ({
|
|
|
9896
9899
|
onComplete: t,
|
|
9897
9900
|
onBack: a
|
|
9898
9901
|
}) => {
|
|
9899
|
-
const { t: r } = Ie(), { appropriatenessTestService: n } = Me(), [o, l] = w(null), [d, u] = w(!0), [m, f] = w(!1), [
|
|
9902
|
+
const { t: r } = Ie(), { appropriatenessTestService: n } = Me(), [o, l] = w(null), [d, u] = w(!0), [m, f] = w(!1), [g, S] = w(null), [R, b] = w({}), [O, N] = w(0), [H, B] = w(!1), [F, L] = w(!1), [q, J] = w(0), [ie, C] = w(0), [z, K] = w(null);
|
|
9900
9903
|
he(() => {
|
|
9901
9904
|
(async () => {
|
|
9902
9905
|
try {
|
|
9903
|
-
u(!0),
|
|
9906
|
+
u(!0), S(null);
|
|
9904
9907
|
const E = await n.getAppropriatenessTest(e);
|
|
9905
9908
|
if (l(E), E.waitTimeSpanForNextTry && E.waitTimeSpanForNextTry !== "00:00:00") {
|
|
9906
9909
|
const V = Xt(E.waitTimeSpanForNextTry);
|
|
9907
9910
|
V > 0 && J(V);
|
|
9908
9911
|
}
|
|
9909
9912
|
} catch (E) {
|
|
9910
|
-
|
|
9913
|
+
S(E.message || r("appropriatenessTest.failedToLoad"));
|
|
9911
9914
|
} finally {
|
|
9912
9915
|
u(!1);
|
|
9913
9916
|
}
|
|
@@ -9915,7 +9918,7 @@ const ha = ({
|
|
|
9915
9918
|
}, [e, n]), he(() => {
|
|
9916
9919
|
if (!H || O <= 0) return;
|
|
9917
9920
|
const E = setInterval(() => {
|
|
9918
|
-
|
|
9921
|
+
N((V) => V <= 1 ? (L(!0), 0) : V - 1);
|
|
9919
9922
|
}, 1e3);
|
|
9920
9923
|
return () => clearInterval(E);
|
|
9921
9924
|
}, [H, O]), he(() => {
|
|
@@ -9928,7 +9931,7 @@ const ha = ({
|
|
|
9928
9931
|
F && !m && te();
|
|
9929
9932
|
}, [F]);
|
|
9930
9933
|
const ee = () => {
|
|
9931
|
-
o && (B(!0),
|
|
9934
|
+
o && (B(!0), N(o.testDurationSec), C(0), b({}), S(null));
|
|
9932
9935
|
}, X = (E, V) => {
|
|
9933
9936
|
b((fe) => ({ ...fe, [E]: V }));
|
|
9934
9937
|
}, W = oe(async () => {
|
|
@@ -9943,16 +9946,16 @@ const ha = ({
|
|
|
9943
9946
|
}, [e, n]), te = async (E) => {
|
|
9944
9947
|
if (o) {
|
|
9945
9948
|
if (!F) {
|
|
9946
|
-
const V = o.appropriatenessQuestions.length - Object.keys(
|
|
9949
|
+
const V = o.appropriatenessQuestions.length - Object.keys(R).length;
|
|
9947
9950
|
if (V > 0) {
|
|
9948
|
-
|
|
9951
|
+
S(r("appropriatenessTest.answerAllQuestions", { remaining: V }));
|
|
9949
9952
|
return;
|
|
9950
9953
|
}
|
|
9951
9954
|
}
|
|
9952
|
-
f(!0),
|
|
9955
|
+
f(!0), S(null);
|
|
9953
9956
|
try {
|
|
9954
9957
|
const V = o.appropriatenessQuestions.map(
|
|
9955
|
-
(ue) => ({ appropriatenessQuestionId: ue.id, value:
|
|
9958
|
+
(ue) => ({ appropriatenessQuestionId: ue.id, value: R[ue.id] || "" })
|
|
9956
9959
|
), fe = {
|
|
9957
9960
|
applicantId: e,
|
|
9958
9961
|
appropriatenessTestId: o.id,
|
|
@@ -9968,13 +9971,13 @@ const ha = ({
|
|
|
9968
9971
|
throw ue;
|
|
9969
9972
|
}
|
|
9970
9973
|
} catch (V) {
|
|
9971
|
-
|
|
9974
|
+
S(V.message || r("appropriatenessTest.failedToSubmit")), de();
|
|
9972
9975
|
} finally {
|
|
9973
9976
|
f(!1);
|
|
9974
9977
|
}
|
|
9975
9978
|
}
|
|
9976
9979
|
}, de = () => {
|
|
9977
|
-
B(!1), L(!1), b({}),
|
|
9980
|
+
B(!1), L(!1), b({}), C(0);
|
|
9978
9981
|
};
|
|
9979
9982
|
if (d)
|
|
9980
9983
|
return /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
|
|
@@ -9984,9 +9987,9 @@ const ha = ({
|
|
|
9984
9987
|
if (!o)
|
|
9985
9988
|
return /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s("div", { style: { textAlign: "center", padding: "48px 0" }, children: [
|
|
9986
9989
|
/* @__PURE__ */ i("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: r("appropriatenessTest.noTestData") }),
|
|
9987
|
-
|
|
9990
|
+
g && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: g })
|
|
9988
9991
|
] }) }) });
|
|
9989
|
-
const le = o.testAllowedMaxTry - o.totalFailedTries, je = o.appropriatenessQuestions.length, re = Object.keys(
|
|
9992
|
+
const le = o.testAllowedMaxTry - o.totalFailedTries, je = o.appropriatenessQuestions.length, re = Object.keys(R).length;
|
|
9990
9993
|
if (q > 0)
|
|
9991
9994
|
return /* @__PURE__ */ s(ae, { children: [
|
|
9992
9995
|
/* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: o.displayName }) }),
|
|
@@ -10008,18 +10011,18 @@ const ha = ({
|
|
|
10008
10011
|
}, children: zt(q) }) }),
|
|
10009
10012
|
/* @__PURE__ */ i("p", { style: { fontSize: "15px", fontWeight: 500, color: "var(--metakyc-text-primary, #111827)" }, children: r("appropriatenessTest.waitBeforeRetrying") }),
|
|
10010
10013
|
/* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: r("appropriatenessTest.waitTimerMessage") }),
|
|
10011
|
-
|
|
10014
|
+
g && /* @__PURE__ */ i("div", { style: {
|
|
10012
10015
|
marginTop: "20px",
|
|
10013
10016
|
padding: "12px 16px",
|
|
10014
10017
|
borderRadius: "10px",
|
|
10015
10018
|
backgroundColor: "color-mix(in srgb, var(--metakyc-danger, #ef4444) 8%, transparent)",
|
|
10016
10019
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
|
|
10017
|
-
}, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children:
|
|
10020
|
+
}, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: g }) })
|
|
10018
10021
|
] }) })
|
|
10019
10022
|
] });
|
|
10020
10023
|
if (z) {
|
|
10021
10024
|
const E = () => {
|
|
10022
|
-
K(null), de(),
|
|
10025
|
+
K(null), de(), S(null);
|
|
10023
10026
|
};
|
|
10024
10027
|
return /* @__PURE__ */ s(ae, { children: [
|
|
10025
10028
|
/* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s("div", { style: {
|
|
@@ -10127,7 +10130,7 @@ const ha = ({
|
|
|
10127
10130
|
}
|
|
10128
10131
|
)
|
|
10129
10132
|
] }),
|
|
10130
|
-
|
|
10133
|
+
g && /* @__PURE__ */ s("div", { style: {
|
|
10131
10134
|
marginBottom: "16px",
|
|
10132
10135
|
padding: "12px 14px",
|
|
10133
10136
|
borderRadius: "10px",
|
|
@@ -10144,7 +10147,7 @@ const ha = ({
|
|
|
10144
10147
|
/* @__PURE__ */ s("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0, lineHeight: 1.5 }, children: [
|
|
10145
10148
|
/* @__PURE__ */ i("strong", { children: r("appropriatenessTest.previousAttempt") }),
|
|
10146
10149
|
" ",
|
|
10147
|
-
|
|
10150
|
+
g
|
|
10148
10151
|
] })
|
|
10149
10152
|
] }),
|
|
10150
10153
|
le <= 0 && /* @__PURE__ */ i("div", { style: {
|
|
@@ -10239,7 +10242,7 @@ const ha = ({
|
|
|
10239
10242
|
{
|
|
10240
10243
|
question: Ce,
|
|
10241
10244
|
index: ie,
|
|
10242
|
-
selectedAnswer:
|
|
10245
|
+
selectedAnswer: R[Ce.id],
|
|
10243
10246
|
onSelect: (E) => X(Ce.id, E),
|
|
10244
10247
|
disabled: m
|
|
10245
10248
|
}
|
|
@@ -10254,14 +10257,14 @@ const ha = ({
|
|
|
10254
10257
|
"button",
|
|
10255
10258
|
{
|
|
10256
10259
|
type: "button",
|
|
10257
|
-
onClick: () =>
|
|
10260
|
+
onClick: () => C(V),
|
|
10258
10261
|
style: {
|
|
10259
10262
|
width: "28px",
|
|
10260
10263
|
height: "28px",
|
|
10261
10264
|
borderRadius: "8px",
|
|
10262
10265
|
border: V === ie ? "2px solid var(--metakyc-primary, #2563eb)" : "1px solid var(--metakyc-border, #e5e7eb)",
|
|
10263
|
-
backgroundColor:
|
|
10264
|
-
color:
|
|
10266
|
+
backgroundColor: R[E.id] ? V === ie ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "color-mix(in srgb, var(--metakyc-primary, #2563eb) 8%, transparent)" : V === ie ? "var(--metakyc-surface, #f9fafb)" : "var(--metakyc-background, #ffffff)",
|
|
10267
|
+
color: R[E.id] ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
|
|
10265
10268
|
fontSize: "12px",
|
|
10266
10269
|
fontWeight: 600,
|
|
10267
10270
|
cursor: "pointer",
|
|
@@ -10291,13 +10294,13 @@ const ha = ({
|
|
|
10291
10294
|
] }),
|
|
10292
10295
|
/* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "#b45309", margin: 0, fontWeight: 500 }, children: r("appropriatenessTest.timesUp") })
|
|
10293
10296
|
] }),
|
|
10294
|
-
|
|
10297
|
+
g && !F && /* @__PURE__ */ i("div", { style: {
|
|
10295
10298
|
marginTop: "16px",
|
|
10296
10299
|
padding: "12px 14px",
|
|
10297
10300
|
borderRadius: "10px",
|
|
10298
10301
|
backgroundColor: "color-mix(in srgb, var(--metakyc-danger, #ef4444) 8%, transparent)",
|
|
10299
10302
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
|
|
10300
|
-
}, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children:
|
|
10303
|
+
}, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: g }) })
|
|
10301
10304
|
] }),
|
|
10302
10305
|
/* @__PURE__ */ i(Le, { children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" }, children: [
|
|
10303
10306
|
/* @__PURE__ */ i(
|
|
@@ -10306,7 +10309,7 @@ const ha = ({
|
|
|
10306
10309
|
type: "button",
|
|
10307
10310
|
variant: "outline",
|
|
10308
10311
|
onClick: () => {
|
|
10309
|
-
ie > 0 ?
|
|
10312
|
+
ie > 0 ? C((E) => E - 1) : a == null || a();
|
|
10310
10313
|
},
|
|
10311
10314
|
disabled: m,
|
|
10312
10315
|
children: ie > 0 ? r("common.previous") : r("common.cancel")
|
|
@@ -10317,7 +10320,7 @@ const ha = ({
|
|
|
10317
10320
|
Z,
|
|
10318
10321
|
{
|
|
10319
10322
|
type: "button",
|
|
10320
|
-
onClick: () =>
|
|
10323
|
+
onClick: () => C((E) => E + 1),
|
|
10321
10324
|
children: r("common.next")
|
|
10322
10325
|
}
|
|
10323
10326
|
),
|
|
@@ -10467,7 +10470,7 @@ const ha = ({
|
|
|
10467
10470
|
onBack: a
|
|
10468
10471
|
}) => {
|
|
10469
10472
|
var at, Qe, dt, nt;
|
|
10470
|
-
const { t: r } = Ie(), { applicantService: n, baseInformationService: o, identityService: l, config: d, currentTheme: u } = Me(), { identityData: m, provider: f, token:
|
|
10473
|
+
const { t: r } = Ie(), { applicantService: n, baseInformationService: o, identityService: l, config: d, currentTheme: u } = Me(), { identityData: m, provider: f, token: g, isLoading: S, error: R, requestIdentity: b, restartIdentity: O } = Br(e), [N, H] = w(null), [B, F] = w(null), [L, q] = w([]), [J, ie] = w([]), [C, z] = w(!0), [K, ee] = w(!1), [X, W] = w(null), [te, de] = w(!1), le = Re.useRef(!1), [je, re] = w({}), [Ce, Se] = w({}), ye = u != null && u.reviewPageFields && u.reviewPageFields.length > 0 ? u.reviewPageFields[0] : null, M = !!(u != null && u.reviewPageDisabled), E = ge(!1);
|
|
10471
10474
|
E.current = M;
|
|
10472
10475
|
const V = vi({
|
|
10473
10476
|
defaultValues: {
|
|
@@ -10498,37 +10501,37 @@ const ha = ({
|
|
|
10498
10501
|
q(y);
|
|
10499
10502
|
const I = /* @__PURE__ */ new Set(), x = $.filter((Y) => Y.countryCode).map((Y) => ({ value: Y.countryCode, label: `${Y.countryCode} – ${Y.name}` })).filter((Y) => I.has(Y.value) ? !1 : (I.add(Y.value), !0));
|
|
10500
10503
|
ie(x);
|
|
10501
|
-
const
|
|
10504
|
+
const p = D.applicantRequestData;
|
|
10502
10505
|
if (re({
|
|
10503
|
-
firstName: (
|
|
10504
|
-
lastName: (
|
|
10505
|
-
email: (
|
|
10506
|
-
dateOfBirth: (
|
|
10507
|
-
title: (
|
|
10508
|
-
salutation: (
|
|
10509
|
-
phonenumber: (
|
|
10510
|
-
mobileCountryCode: (
|
|
10511
|
-
street: (
|
|
10512
|
-
streetNumber: (
|
|
10513
|
-
city: (
|
|
10514
|
-
zip: (
|
|
10515
|
-
country: (
|
|
10516
|
-
nationality: (
|
|
10517
|
-
taxCountry: (
|
|
10518
|
-
countryOfBirth: (
|
|
10519
|
-
placeOfBirth: (
|
|
10520
|
-
educationLevel: (
|
|
10521
|
-
occupation: (
|
|
10522
|
-
taxNumber: (
|
|
10523
|
-
defaultLanguage: (
|
|
10506
|
+
firstName: (p == null ? void 0 : p.firstName) || "",
|
|
10507
|
+
lastName: (p == null ? void 0 : p.lastName) || "",
|
|
10508
|
+
email: (p == null ? void 0 : p.email) || "",
|
|
10509
|
+
dateOfBirth: (p == null ? void 0 : p.dateOfBirth) || "",
|
|
10510
|
+
title: (p == null ? void 0 : p.title) || "",
|
|
10511
|
+
salutation: (p == null ? void 0 : p.salutation) || "",
|
|
10512
|
+
phonenumber: (p == null ? void 0 : p.phonenumber) || "",
|
|
10513
|
+
mobileCountryCode: (p == null ? void 0 : p.mobileCountryCode) || "",
|
|
10514
|
+
street: (p == null ? void 0 : p.street) || "",
|
|
10515
|
+
streetNumber: (p == null ? void 0 : p.streetNumber) || "",
|
|
10516
|
+
city: (p == null ? void 0 : p.city) || "",
|
|
10517
|
+
zip: (p == null ? void 0 : p.zip) || "",
|
|
10518
|
+
country: (p == null ? void 0 : p.country) || "",
|
|
10519
|
+
nationality: (p == null ? void 0 : p.nationality) || "",
|
|
10520
|
+
taxCountry: (p == null ? void 0 : p.taxCountry) || "",
|
|
10521
|
+
countryOfBirth: (p == null ? void 0 : p.countryOfBirth) || "",
|
|
10522
|
+
placeOfBirth: (p == null ? void 0 : p.placeOfBirth) || "",
|
|
10523
|
+
educationLevel: (p == null ? void 0 : p.educationLevel) || "",
|
|
10524
|
+
occupation: (p == null ? void 0 : p.occupation) || "",
|
|
10525
|
+
taxNumber: (p == null ? void 0 : p.taxNumber) || "",
|
|
10526
|
+
defaultLanguage: (p == null ? void 0 : p.defaultLanguage) || ""
|
|
10524
10527
|
}), V.reset({
|
|
10525
|
-
street: (
|
|
10526
|
-
streetNumber: (
|
|
10527
|
-
city: (
|
|
10528
|
-
zip: (
|
|
10529
|
-
country: (
|
|
10530
|
-
nationality: (
|
|
10531
|
-
phonenumber: (
|
|
10528
|
+
street: (p == null ? void 0 : p.street) || "",
|
|
10529
|
+
streetNumber: (p == null ? void 0 : p.streetNumber) || "",
|
|
10530
|
+
city: (p == null ? void 0 : p.city) || "",
|
|
10531
|
+
zip: (p == null ? void 0 : p.zip) || "",
|
|
10532
|
+
country: (p == null ? void 0 : p.country) || "",
|
|
10533
|
+
nationality: (p == null ? void 0 : p.nationality) || "",
|
|
10534
|
+
phonenumber: (p == null ? void 0 : p.phonenumber) || ""
|
|
10532
10535
|
}), D.kycRecords && D.kycRecords.length > 0 && D.kycRecords[0].providerTokenObject !== null && !le.current && E.current) {
|
|
10533
10536
|
console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), le.current = !0;
|
|
10534
10537
|
try {
|
|
@@ -10546,17 +10549,17 @@ const ha = ({
|
|
|
10546
10549
|
}, [e]), he(() => {
|
|
10547
10550
|
m && !K && E.current && (console.log("[Identity] Review page disabled — showing cached provider"), ee(!0));
|
|
10548
10551
|
}, [m, K]), he(() => {
|
|
10549
|
-
if (
|
|
10550
|
-
if (
|
|
10551
|
-
const k = new Date(
|
|
10552
|
+
if (g) {
|
|
10553
|
+
if (g.expiresAt) {
|
|
10554
|
+
const k = new Date(g.expiresAt).getTime();
|
|
10552
10555
|
if (Date.now() >= k) {
|
|
10553
10556
|
console.warn("[Identity] Token has expired (expiresAt)"), de(!0), W(r("identity.sessionExpired"));
|
|
10554
10557
|
return;
|
|
10555
10558
|
}
|
|
10556
10559
|
}
|
|
10557
|
-
if (
|
|
10560
|
+
if (g.url)
|
|
10558
10561
|
try {
|
|
10559
|
-
const D = new URL(
|
|
10562
|
+
const D = new URL(g.url).toString().toLowerCase();
|
|
10560
10563
|
if (D.includes("expired") || D.includes("invalid") || D.includes("error")) {
|
|
10561
10564
|
console.warn("[Identity] Token URL indicates expiration"), de(!0), W(r("identity.linkExpired"));
|
|
10562
10565
|
return;
|
|
@@ -10564,20 +10567,20 @@ const ha = ({
|
|
|
10564
10567
|
} catch {
|
|
10565
10568
|
console.error("[Identity] Invalid token URL");
|
|
10566
10569
|
}
|
|
10567
|
-
if (
|
|
10570
|
+
if (g.status === "expired" || g.error === "expired" || g.expired === !0) {
|
|
10568
10571
|
console.warn("[Identity] Token object indicates expiration"), de(!0), W(r("identity.sessionExpired"));
|
|
10569
10572
|
return;
|
|
10570
10573
|
}
|
|
10571
10574
|
}
|
|
10572
|
-
}, [
|
|
10575
|
+
}, [g]);
|
|
10573
10576
|
const fe = f !== null && f === He.Sumsub;
|
|
10574
10577
|
he(() => {
|
|
10575
|
-
if (f !== null &&
|
|
10578
|
+
if (f !== null && g && !N && K && !te) {
|
|
10576
10579
|
const k = f;
|
|
10577
10580
|
if (fe) {
|
|
10578
10581
|
console.log("[Sumsub] Fetching access token for Web SDK…"), W(null), (async () => {
|
|
10579
10582
|
try {
|
|
10580
|
-
const D = await l.refreshSumsubToken(e), G = st.parseProviderConfig(f,
|
|
10583
|
+
const D = await l.refreshSumsubToken(e), G = st.parseProviderConfig(f, g, d);
|
|
10581
10584
|
G.accessToken = D, G.onTokenRefresh = () => l.refreshSumsubToken(e);
|
|
10582
10585
|
const $ = st.createProvider(f, G);
|
|
10583
10586
|
$.onComplete((se) => {
|
|
@@ -10591,19 +10594,19 @@ const ha = ({
|
|
|
10591
10594
|
})();
|
|
10592
10595
|
return;
|
|
10593
10596
|
}
|
|
10594
|
-
if (
|
|
10595
|
-
console.log("[Identity] Loading provider URL for user verification:",
|
|
10597
|
+
if (g.url) {
|
|
10598
|
+
console.log("[Identity] Loading provider URL for user verification:", g.url), W(null);
|
|
10596
10599
|
try {
|
|
10597
|
-
if (new URL(
|
|
10600
|
+
if (new URL(g.url), k === He.SardinAI) {
|
|
10598
10601
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
10599
10602
|
try {
|
|
10600
|
-
const D = st.parseProviderConfig(f,
|
|
10603
|
+
const D = st.parseProviderConfig(f, g, d);
|
|
10601
10604
|
st.createProvider(f, D).initialize().then(() => console.log("[SardinAI] Risk SDK initialized in background")).catch(($) => console.warn("[SardinAI] Risk SDK init failed (non-blocking):", $));
|
|
10602
10605
|
} catch (D) {
|
|
10603
10606
|
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", D);
|
|
10604
10607
|
}
|
|
10605
10608
|
}
|
|
10606
|
-
H({ type: "url", url:
|
|
10609
|
+
H({ type: "url", url: g.url });
|
|
10607
10610
|
} catch (D) {
|
|
10608
10611
|
console.error("[Identity] Invalid URL:", D), W(r("identity.invalidUrl")), de(!0);
|
|
10609
10612
|
}
|
|
@@ -10612,7 +10615,7 @@ const ha = ({
|
|
|
10612
10615
|
if (k === He.SardinAI) {
|
|
10613
10616
|
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), W(null);
|
|
10614
10617
|
try {
|
|
10615
|
-
const D = st.parseProviderConfig(f,
|
|
10618
|
+
const D = st.parseProviderConfig(f, g, d), G = st.createProvider(f, D);
|
|
10616
10619
|
G.initialize().then(() => {
|
|
10617
10620
|
console.log("[SardinAI] Risk SDK initialized successfully"), H(G), setTimeout(() => t == null ? void 0 : t(), 2e3);
|
|
10618
10621
|
}).catch(($) => {
|
|
@@ -10628,7 +10631,7 @@ const ha = ({
|
|
|
10628
10631
|
}
|
|
10629
10632
|
try {
|
|
10630
10633
|
W(null);
|
|
10631
|
-
const D = st.parseProviderConfig(f,
|
|
10634
|
+
const D = st.parseProviderConfig(f, g, d), G = st.createProvider(f, D);
|
|
10632
10635
|
k === He.Onfido && G.initialize("identity-container").catch(($) => {
|
|
10633
10636
|
console.error("[Onfido] Initialization error:", $), W(r("identity.failedToInitialize", { message: $.message }));
|
|
10634
10637
|
}), H(G);
|
|
@@ -10637,14 +10640,14 @@ const ha = ({
|
|
|
10637
10640
|
}
|
|
10638
10641
|
}
|
|
10639
10642
|
return () => {
|
|
10640
|
-
if (
|
|
10643
|
+
if (N && N.destroy)
|
|
10641
10644
|
try {
|
|
10642
|
-
|
|
10645
|
+
N.destroy();
|
|
10643
10646
|
} catch (k) {
|
|
10644
10647
|
console.error("[Identity] Error destroying provider:", k);
|
|
10645
10648
|
}
|
|
10646
10649
|
};
|
|
10647
|
-
}, [f,
|
|
10650
|
+
}, [f, g, N, K, t, te, fe, e, d, l]);
|
|
10648
10651
|
const ue = async () => {
|
|
10649
10652
|
try {
|
|
10650
10653
|
W(null), de(!1), await b(), ee(!0);
|
|
@@ -10658,15 +10661,15 @@ const ha = ({
|
|
|
10658
10661
|
console.error("Error restarting identity verification:", k), W(k.message || r("identity.failedToRestart"));
|
|
10659
10662
|
}
|
|
10660
10663
|
};
|
|
10661
|
-
if (
|
|
10664
|
+
if (C || S)
|
|
10662
10665
|
return /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ s(ne, { children: [
|
|
10663
10666
|
/* @__PURE__ */ i(Ye, { className: "my-8" }),
|
|
10664
10667
|
/* @__PURE__ */ i("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: r("identity.loadingIdentity") })
|
|
10665
10668
|
] }) });
|
|
10666
|
-
if (
|
|
10669
|
+
if (R)
|
|
10667
10670
|
return /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
|
|
10668
10671
|
"Error: ",
|
|
10669
|
-
|
|
10672
|
+
R.message
|
|
10670
10673
|
] }) }) });
|
|
10671
10674
|
const _ = M ? a : () => ee(!1);
|
|
10672
10675
|
if (K && (X || te))
|
|
@@ -10715,7 +10718,7 @@ const ha = ({
|
|
|
10715
10718
|
] }),
|
|
10716
10719
|
/* @__PURE__ */ s(Le, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
10717
10720
|
_ && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: _, children: r("common.back") }),
|
|
10718
|
-
/* @__PURE__ */ i(Z, { type: "button", onClick: j, disabled:
|
|
10721
|
+
/* @__PURE__ */ i(Z, { type: "button", onClick: j, disabled: S, children: r(S ? "identity.restarting" : "identity.restartVerification") })
|
|
10719
10722
|
] })
|
|
10720
10723
|
] });
|
|
10721
10724
|
if (K && m) {
|
|
@@ -10751,7 +10754,7 @@ const ha = ({
|
|
|
10751
10754
|
{
|
|
10752
10755
|
type: "button",
|
|
10753
10756
|
onClick: j,
|
|
10754
|
-
disabled:
|
|
10757
|
+
disabled: S,
|
|
10755
10758
|
style: {
|
|
10756
10759
|
padding: "6px 14px",
|
|
10757
10760
|
fontSize: "13px",
|
|
@@ -10760,10 +10763,10 @@ const ha = ({
|
|
|
10760
10763
|
border: "1px solid var(--metakyc-border, #d1d5db)",
|
|
10761
10764
|
background: "var(--metakyc-background, #ffffff)",
|
|
10762
10765
|
color: "var(--metakyc-text-primary, #111827)",
|
|
10763
|
-
cursor:
|
|
10764
|
-
opacity:
|
|
10766
|
+
cursor: S ? "not-allowed" : "pointer",
|
|
10767
|
+
opacity: S ? 0.5 : 1
|
|
10765
10768
|
},
|
|
10766
|
-
children: r(
|
|
10769
|
+
children: r(S ? "identity.restarting" : "identity.restart")
|
|
10767
10770
|
}
|
|
10768
10771
|
)
|
|
10769
10772
|
] }),
|
|
@@ -10783,7 +10786,7 @@ const ha = ({
|
|
|
10783
10786
|
padding: "16px 24px",
|
|
10784
10787
|
borderTop: "1px solid var(--metakyc-border, #e5e7eb)"
|
|
10785
10788
|
}, children: /* @__PURE__ */ i(Z, { variant: "outline", onClick: _, children: r("common.back") }) })
|
|
10786
|
-
] }) :
|
|
10789
|
+
] }) : g != null && g.url ? /* @__PURE__ */ s(ae, { children: [
|
|
10787
10790
|
/* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
10788
10791
|
/* @__PURE__ */ s("div", { children: [
|
|
10789
10792
|
/* @__PURE__ */ i("h2", { className: "text-2xl font-bold", children: r("identity.title") }),
|
|
@@ -10796,7 +10799,7 @@ const ha = ({
|
|
|
10796
10799
|
variant: "outline",
|
|
10797
10800
|
size: "sm",
|
|
10798
10801
|
onClick: j,
|
|
10799
|
-
disabled:
|
|
10802
|
+
disabled: S,
|
|
10800
10803
|
children: r("identity.restart")
|
|
10801
10804
|
}
|
|
10802
10805
|
)
|
|
@@ -10809,7 +10812,7 @@ const ha = ({
|
|
|
10809
10812
|
/* @__PURE__ */ i("div", { className: "w-full", style: { height: "600px", maxHeight: "70vh" }, children: /* @__PURE__ */ i(
|
|
10810
10813
|
"iframe",
|
|
10811
10814
|
{
|
|
10812
|
-
src:
|
|
10815
|
+
src: g.url,
|
|
10813
10816
|
className: "w-full h-full border-0 rounded-lg",
|
|
10814
10817
|
allow: "camera; microphone; geolocation",
|
|
10815
10818
|
title: "Identity Verification",
|
|
@@ -11015,8 +11018,8 @@ const ha = ({
|
|
|
11015
11018
|
}
|
|
11016
11019
|
if (k.customType === "group_checkbox") {
|
|
11017
11020
|
const y = Array.isArray(se) ? se : se ? [se] : [], I = (x) => {
|
|
11018
|
-
k.singleSelect ? Se((
|
|
11019
|
-
...
|
|
11021
|
+
k.singleSelect ? Se((p) => ({ ...p, [$]: y[0] === x ? [] : [x] })) : Se((p) => ({
|
|
11022
|
+
...p,
|
|
11020
11023
|
[$]: y.includes(x) ? y.filter((U) => U !== x) : [...y, x]
|
|
11021
11024
|
}));
|
|
11022
11025
|
};
|
|
@@ -11077,7 +11080,7 @@ const ha = ({
|
|
|
11077
11080
|
{
|
|
11078
11081
|
label: se,
|
|
11079
11082
|
value: String(y),
|
|
11080
|
-
onChange: (
|
|
11083
|
+
onChange: (p) => re((U) => ({ ...U, [G]: p })),
|
|
11081
11084
|
options: [{ value: "", label: r("placeholders.selectCountryCode") }, ...J]
|
|
11082
11085
|
}
|
|
11083
11086
|
),
|
|
@@ -11088,7 +11091,7 @@ const ha = ({
|
|
|
11088
11091
|
{
|
|
11089
11092
|
label: se,
|
|
11090
11093
|
value: String(y),
|
|
11091
|
-
onChange: (
|
|
11094
|
+
onChange: (p) => re((U) => ({ ...U, [G]: p })),
|
|
11092
11095
|
options: [{ value: "", label: r("common.select") }, ...L]
|
|
11093
11096
|
}
|
|
11094
11097
|
),
|
|
@@ -11100,7 +11103,7 @@ const ha = ({
|
|
|
11100
11103
|
label: se,
|
|
11101
11104
|
type: ($ == null ? void 0 : $.type) === "date" ? "date" : ($ == null ? void 0 : $.type) === "email" ? "email" : "text",
|
|
11102
11105
|
value: String(y),
|
|
11103
|
-
onChange: (
|
|
11106
|
+
onChange: (p) => re((U) => ({ ...U, [G]: p.target.value }))
|
|
11104
11107
|
}
|
|
11105
11108
|
),
|
|
11106
11109
|
k.helpText
|
|
@@ -11124,7 +11127,7 @@ const ha = ({
|
|
|
11124
11127
|
/* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: ye.fields.map((G, $) => _e(G, $)) }) }),
|
|
11125
11128
|
/* @__PURE__ */ s(Le, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
11126
11129
|
a && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
|
|
11127
|
-
/* @__PURE__ */ i(Z, { type: "submit", isLoading:
|
|
11130
|
+
/* @__PURE__ */ i(Z, { type: "submit", isLoading: S, children: r("identity.confirmAndStart") })
|
|
11128
11131
|
] })
|
|
11129
11132
|
] }) });
|
|
11130
11133
|
}
|
|
@@ -11191,7 +11194,7 @@ const ha = ({
|
|
|
11191
11194
|
] }),
|
|
11192
11195
|
/* @__PURE__ */ s(Le, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
11193
11196
|
a && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
|
|
11194
|
-
/* @__PURE__ */ i(Z, { type: "submit", isLoading:
|
|
11197
|
+
/* @__PURE__ */ i(Z, { type: "submit", isLoading: S, children: r("identity.confirmAndStart") })
|
|
11195
11198
|
] })
|
|
11196
11199
|
] }) });
|
|
11197
11200
|
}, Ft = {
|
|
@@ -11504,13 +11507,13 @@ const Ca = {
|
|
|
11504
11507
|
onSuccess: r,
|
|
11505
11508
|
onCancel: n
|
|
11506
11509
|
}) => {
|
|
11507
|
-
var I, x,
|
|
11508
|
-
const { config: o, baseInformationService: l, currentTheme: d } = Me(), { createApplicant: u, getApplicantData: m, isLoading: f } = di(), { t:
|
|
11509
|
-
if (!
|
|
11510
|
+
var I, x, p, U, Y, ce, Ee;
|
|
11511
|
+
const { config: o, baseInformationService: l, currentTheme: d } = Me(), { createApplicant: u, getApplicantData: m, isLoading: f } = di(), { t: g } = Ie(), S = e || ((I = o.applicantForm) == null ? void 0 : I.workflowKey);
|
|
11512
|
+
if (!S)
|
|
11510
11513
|
throw new Error(
|
|
11511
11514
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
11512
11515
|
);
|
|
11513
|
-
const
|
|
11516
|
+
const R = t || ((x = o.applicantForm) == null ? void 0 : x.externalRefId) || "", b = ((p = o.applicantForm) == null ? void 0 : p.email) || "", O = ((U = o.applicantForm) == null ? void 0 : U.hiddenValues) || {}, N = ((Y = o.applicantForm) == null ? void 0 : Y.initialValues) || {}, B = (((ce = o.applicantForm) == null ? void 0 : ce.fieldLabelMode) || (d == null ? void 0 : d.fieldLabelMode) || "label") !== "placeholder", F = Ue(
|
|
11514
11517
|
() => d != null && d.applicantFormPages && d.applicantFormPages.length > 0 ? d.applicantFormPages : null,
|
|
11515
11518
|
[d == null ? void 0 : d.applicantFormPages]
|
|
11516
11519
|
), L = Ue(() => {
|
|
@@ -11524,8 +11527,8 @@ const Ca = {
|
|
|
11524
11527
|
}, [d == null ? void 0 : d.applicantFormRequiredFields, F]), q = Ue(() => {
|
|
11525
11528
|
var A;
|
|
11526
11529
|
if (F) {
|
|
11527
|
-
const h = F.flatMap((
|
|
11528
|
-
for (const
|
|
11530
|
+
const h = F.flatMap((T) => T.fields).filter((T) => !T.isCustom && T.name).map((T) => T.name), v = new Set(h);
|
|
11531
|
+
for (const T of St) v.add(T);
|
|
11529
11532
|
return Array.from(v);
|
|
11530
11533
|
}
|
|
11531
11534
|
let c;
|
|
@@ -11551,7 +11554,7 @@ const Ca = {
|
|
|
11551
11554
|
for (const h of q)
|
|
11552
11555
|
J.has(h) && c.add((A = gt[h]) == null ? void 0 : A.countriesType);
|
|
11553
11556
|
return c.size === 0 && c.add(void 0), Array.from(c);
|
|
11554
|
-
}, [q, F]), [
|
|
11557
|
+
}, [q, F]), [C, z] = w({}), [K, ee] = w(!0), X = ge(/* @__PURE__ */ new Set()), W = ge(/* @__PURE__ */ new Set());
|
|
11555
11558
|
he(() => {
|
|
11556
11559
|
if (!d) return;
|
|
11557
11560
|
const c = ie.filter((h) => {
|
|
@@ -11560,8 +11563,8 @@ const Ca = {
|
|
|
11560
11563
|
});
|
|
11561
11564
|
if (c.length === 0) {
|
|
11562
11565
|
ie.every((v) => {
|
|
11563
|
-
const
|
|
11564
|
-
return W.current.has(
|
|
11566
|
+
const T = v != null ? String(v) : "all";
|
|
11567
|
+
return W.current.has(T);
|
|
11565
11568
|
}) && ee(!1);
|
|
11566
11569
|
return;
|
|
11567
11570
|
}
|
|
@@ -11571,11 +11574,11 @@ const Ca = {
|
|
|
11571
11574
|
try {
|
|
11572
11575
|
const h = await Promise.all(
|
|
11573
11576
|
c.map(async (v) => {
|
|
11574
|
-
const
|
|
11577
|
+
const T = v != null ? String(v) : "all", me = await l.getCountries("", o.locale || "en", v), we = v === 40, Pe = /* @__PURE__ */ new Set(), De = me.map((be) => we && be.countryCode ? {
|
|
11575
11578
|
value: be.countryCode,
|
|
11576
11579
|
label: `${be.countryCode} – ${be.name}`
|
|
11577
11580
|
} : { value: be.abbreviation3 || be.abbreviation, label: be.name }).filter((be) => !be.value || Pe.has(be.value) ? !1 : (Pe.add(be.value), !0));
|
|
11578
|
-
return W.current.add(
|
|
11581
|
+
return W.current.add(T), X.current.delete(T), [T, De];
|
|
11579
11582
|
})
|
|
11580
11583
|
);
|
|
11581
11584
|
z((v) => ({ ...v, ...Object.fromEntries(h) }));
|
|
@@ -11583,8 +11586,8 @@ const Ca = {
|
|
|
11583
11586
|
P.forEach((v) => X.current.delete(v)), console.error("Failed to load countries:", h);
|
|
11584
11587
|
} finally {
|
|
11585
11588
|
ie.every((v) => {
|
|
11586
|
-
const
|
|
11587
|
-
return W.current.has(
|
|
11589
|
+
const T = v != null ? String(v) : "all";
|
|
11590
|
+
return W.current.has(T);
|
|
11588
11591
|
}) && ee(!1);
|
|
11589
11592
|
}
|
|
11590
11593
|
})();
|
|
@@ -11592,7 +11595,7 @@ const Ca = {
|
|
|
11592
11595
|
const te = (c, P) => {
|
|
11593
11596
|
var v;
|
|
11594
11597
|
const A = P ?? ((v = gt[c]) == null ? void 0 : v.countriesType), h = A != null ? String(A) : "all";
|
|
11595
|
-
return
|
|
11598
|
+
return C[h] || [];
|
|
11596
11599
|
}, de = {
|
|
11597
11600
|
firstName: 1,
|
|
11598
11601
|
lastName: 1,
|
|
@@ -11619,16 +11622,16 @@ const Ca = {
|
|
|
11619
11622
|
}, le = Object.fromEntries(
|
|
11620
11623
|
Object.entries(O).filter(([c]) => c in de)
|
|
11621
11624
|
), je = Object.fromEntries(
|
|
11622
|
-
Object.entries(
|
|
11625
|
+
Object.entries(N).filter(([c]) => c in de)
|
|
11623
11626
|
), [re, Ce] = w({
|
|
11624
|
-
workflowKey:
|
|
11627
|
+
workflowKey: S,
|
|
11625
11628
|
firstName: "",
|
|
11626
11629
|
lastName: "",
|
|
11627
11630
|
title: "",
|
|
11628
11631
|
email: b,
|
|
11629
11632
|
dateOfBirth: "",
|
|
11630
11633
|
phonenumber: "",
|
|
11631
|
-
externalRefId:
|
|
11634
|
+
externalRefId: R,
|
|
11632
11635
|
mobileCountryCode: "",
|
|
11633
11636
|
street: "",
|
|
11634
11637
|
streetNumber: "",
|
|
@@ -11659,7 +11662,7 @@ const Ca = {
|
|
|
11659
11662
|
if (c) return;
|
|
11660
11663
|
const h = A.applicantRequestData;
|
|
11661
11664
|
h && Ce((v) => {
|
|
11662
|
-
var
|
|
11665
|
+
var T;
|
|
11663
11666
|
return {
|
|
11664
11667
|
...v,
|
|
11665
11668
|
firstName: h.firstName || v.firstName,
|
|
@@ -11683,7 +11686,7 @@ const Ca = {
|
|
|
11683
11686
|
occupation: h.occupation || v.occupation,
|
|
11684
11687
|
title: h.title || v.title,
|
|
11685
11688
|
salutation: h.salutation != null ? Number(h.salutation) : v.salutation,
|
|
11686
|
-
otherNationality: (
|
|
11689
|
+
otherNationality: (T = h.otherNationalities) != null && T.length ? h.otherNationalities : v.otherNationality
|
|
11687
11690
|
};
|
|
11688
11691
|
}), A.externalRefId && Ce((v) => ({ ...v, externalRefId: A.externalRefId }));
|
|
11689
11692
|
} catch (A) {
|
|
@@ -11701,7 +11704,7 @@ const Ca = {
|
|
|
11701
11704
|
if (!A.isCustom || !A.paramName || !((P = A.blockingValues) != null && P.length)) continue;
|
|
11702
11705
|
const h = ye[A.paramName] ?? "";
|
|
11703
11706
|
if (A.customType === "group_checkbox") {
|
|
11704
|
-
if (h.split(",").filter(Boolean).some((
|
|
11707
|
+
if (h.split(",").filter(Boolean).some((T) => A.blockingValues.includes(T))) return !0;
|
|
11705
11708
|
} else if (A.customType === "radio_group" && A.blockingValues.includes(h))
|
|
11706
11709
|
return !0;
|
|
11707
11710
|
}
|
|
@@ -11712,14 +11715,14 @@ const Ca = {
|
|
|
11712
11715
|
if (A.isCustom) {
|
|
11713
11716
|
if (A.customType === "paragraph" || A.customType === "html" || A.customType === "br" || A.customType === "link") continue;
|
|
11714
11717
|
if (A.required && A.paramName) {
|
|
11715
|
-
const h = ye[A.paramName], v = Q(A.displayText,
|
|
11716
|
-
A.customType === "checkbox" || A.customType === "link_checkbox" ? h !== "true" && (P[A.paramName] =
|
|
11718
|
+
const h = ye[A.paramName], v = Q(A.displayText, g) || Q(A.label, g) || A.paramName;
|
|
11719
|
+
A.customType === "checkbox" || A.customType === "link_checkbox" ? h !== "true" && (P[A.paramName] = g("validation.fieldRequired", { field: v })) : (!h || h.trim() === "") && (P[A.paramName] = g("validation.fieldRequired", { field: v }));
|
|
11717
11720
|
}
|
|
11718
11721
|
} else if (A.name) {
|
|
11719
11722
|
const h = A.name;
|
|
11720
11723
|
if (L.includes(h) && ft(re[h])) {
|
|
11721
|
-
const v = gt[h],
|
|
11722
|
-
P[h] =
|
|
11724
|
+
const v = gt[h], T = Q(A.displayText, g) || (v != null && v.translationKey ? g(`fields.${v.translationKey}`) : void 0) || (v == null ? void 0 : v.label) || h;
|
|
11725
|
+
P[h] = g("validation.fieldRequired", { field: T });
|
|
11723
11726
|
}
|
|
11724
11727
|
}
|
|
11725
11728
|
return P;
|
|
@@ -11750,7 +11753,7 @@ const Ca = {
|
|
|
11750
11753
|
ct(!0), ke(null);
|
|
11751
11754
|
try {
|
|
11752
11755
|
if (!re.externalRefId || re.externalRefId.trim() === "") {
|
|
11753
|
-
ke(
|
|
11756
|
+
ke(g("createApplicant.externalRefIdRequired"));
|
|
11754
11757
|
return;
|
|
11755
11758
|
}
|
|
11756
11759
|
const c = {
|
|
@@ -11761,47 +11764,47 @@ const Ca = {
|
|
|
11761
11764
|
if (F) {
|
|
11762
11765
|
for (const v of F)
|
|
11763
11766
|
if (_e(v)) {
|
|
11764
|
-
for (const
|
|
11765
|
-
if (!
|
|
11766
|
-
const me =
|
|
11767
|
+
for (const T of v.fields)
|
|
11768
|
+
if (!T.isCustom && T.name) {
|
|
11769
|
+
const me = T.name, we = re[me];
|
|
11767
11770
|
ft(we) || (c[me] = we);
|
|
11768
11771
|
}
|
|
11769
11772
|
}
|
|
11770
11773
|
for (const v of St)
|
|
11771
11774
|
if (c[v] === void 0) {
|
|
11772
|
-
const
|
|
11773
|
-
ft(
|
|
11775
|
+
const T = re[v];
|
|
11776
|
+
ft(T) || (c[v] = T);
|
|
11774
11777
|
}
|
|
11775
11778
|
} else
|
|
11776
11779
|
q.forEach((v) => {
|
|
11777
11780
|
if (v === "externalRefId") return;
|
|
11778
|
-
const
|
|
11779
|
-
ft(
|
|
11781
|
+
const T = re[v];
|
|
11782
|
+
ft(T) || (c[v] = T);
|
|
11780
11783
|
});
|
|
11781
11784
|
const P = [];
|
|
11782
11785
|
if (F) {
|
|
11783
11786
|
for (const v of F)
|
|
11784
11787
|
if (_e(v))
|
|
11785
|
-
for (const
|
|
11786
|
-
if (!
|
|
11787
|
-
const me = ye[
|
|
11788
|
+
for (const T of v.fields) {
|
|
11789
|
+
if (!T.isCustom || !T.paramName || T.customType === "paragraph" || T.customType === "html" || T.customType === "br" || T.customType === "link") continue;
|
|
11790
|
+
const me = ye[T.paramName] ?? "";
|
|
11788
11791
|
let we;
|
|
11789
|
-
if (
|
|
11792
|
+
if (T.customType === "checkbox" || T.customType === "link_checkbox")
|
|
11790
11793
|
we = me === "true" ? "yes" : "no";
|
|
11791
|
-
else if (we = me, !we && !
|
|
11792
|
-
P.push({ paramName:
|
|
11794
|
+
else if (we = me, !we && !T.required) continue;
|
|
11795
|
+
P.push({ paramName: T.paramName, value: we });
|
|
11793
11796
|
}
|
|
11794
11797
|
}
|
|
11795
|
-
for (const [v,
|
|
11796
|
-
c[v] === void 0 && !ft(
|
|
11798
|
+
for (const [v, T] of Object.entries(le))
|
|
11799
|
+
c[v] === void 0 && !ft(T) && (c[v] = T);
|
|
11797
11800
|
const A = new Set(P.map((v) => v.paramName));
|
|
11798
|
-
for (const [v,
|
|
11799
|
-
!A.has(v) &&
|
|
11801
|
+
for (const [v, T] of Object.entries(Se))
|
|
11802
|
+
!A.has(v) && T && P.push({ paramName: v, value: T });
|
|
11800
11803
|
P.length > 0 && (c.applicantAdditionalDatas = P);
|
|
11801
11804
|
const h = await u(c);
|
|
11802
11805
|
r(h.applicantId);
|
|
11803
11806
|
} catch (c) {
|
|
11804
|
-
console.error("Error creating applicant:", c), ke(c.message ||
|
|
11807
|
+
console.error("Error creating applicant:", c), ke(c.message || g("createApplicant.failedToCreate"));
|
|
11805
11808
|
} finally {
|
|
11806
11809
|
ct(!1);
|
|
11807
11810
|
}
|
|
@@ -11809,17 +11812,17 @@ const Ca = {
|
|
|
11809
11812
|
c.preventDefault();
|
|
11810
11813
|
for (const P of L)
|
|
11811
11814
|
if (ft(re[P])) {
|
|
11812
|
-
const A = gt[P], h = (A != null && A.translationKey ?
|
|
11813
|
-
ke(
|
|
11815
|
+
const A = gt[P], h = (A != null && A.translationKey ? g(`fields.${A.translationKey}`) : void 0) || (A == null ? void 0 : A.label) || P;
|
|
11816
|
+
ke(g("validation.fieldRequired", { field: h }));
|
|
11814
11817
|
return;
|
|
11815
11818
|
}
|
|
11816
11819
|
await D();
|
|
11817
11820
|
}, $ = (c, P, A, h, v) => {
|
|
11818
11821
|
var Ot;
|
|
11819
|
-
const
|
|
11820
|
-
if (!
|
|
11821
|
-
const me = L.includes(c), we = j[c], Pe = Q(A,
|
|
11822
|
-
switch (
|
|
11822
|
+
const T = gt[c];
|
|
11823
|
+
if (!T) return null;
|
|
11824
|
+
const me = L.includes(c), we = j[c], Pe = Q(A, g) || (T.translationKey ? g(`fields.${T.translationKey}`) : void 0) || T.label, De = c in je, be = P ?? c, We = { required: me }, Ze = v ? v !== "placeholder" : B, ot = Ze ? Pe : void 0;
|
|
11825
|
+
switch (T.type) {
|
|
11823
11826
|
case "select":
|
|
11824
11827
|
if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
|
|
11825
11828
|
const Oe = te(c, h);
|
|
@@ -11830,7 +11833,7 @@ const Ca = {
|
|
|
11830
11833
|
label: ot,
|
|
11831
11834
|
value: re[c] || "",
|
|
11832
11835
|
onChange: (mt) => Te(c, mt),
|
|
11833
|
-
options: [{ value: "", label: Ze ?
|
|
11836
|
+
options: [{ value: "", label: Ze ? g("placeholders.selectCountry") : Pe }, ...Oe],
|
|
11834
11837
|
disabled: K,
|
|
11835
11838
|
readOnly: De,
|
|
11836
11839
|
error: we
|
|
@@ -11847,10 +11850,10 @@ const Ca = {
|
|
|
11847
11850
|
value: ((Ot = re[c]) == null ? void 0 : Ot.toString()) || "",
|
|
11848
11851
|
onChange: (Oe) => Te(c, Oe ? Number(Oe) : null),
|
|
11849
11852
|
options: [
|
|
11850
|
-
{ value: "", label: Ze ?
|
|
11851
|
-
{ value: Nt.Male.toString(), label:
|
|
11852
|
-
{ value: Nt.Female.toString(), label:
|
|
11853
|
-
{ value: Nt.Other.toString(), label:
|
|
11853
|
+
{ value: "", label: Ze ? g("placeholders.selectSalutation") : Pe },
|
|
11854
|
+
{ value: Nt.Male.toString(), label: g("gender.male") },
|
|
11855
|
+
{ value: Nt.Female.toString(), label: g("gender.female") },
|
|
11856
|
+
{ value: Nt.Other.toString(), label: g("gender.other") }
|
|
11854
11857
|
],
|
|
11855
11858
|
readOnly: De,
|
|
11856
11859
|
error: we
|
|
@@ -11866,7 +11869,7 @@ const Ca = {
|
|
|
11866
11869
|
label: ot,
|
|
11867
11870
|
value: re[c] || "",
|
|
11868
11871
|
onChange: (mt) => Te(c, mt),
|
|
11869
|
-
options: [{ value: "", label: Ze ?
|
|
11872
|
+
options: [{ value: "", label: Ze ? g("placeholders.selectLanguage") : Pe }, ...Oe],
|
|
11870
11873
|
readOnly: De,
|
|
11871
11874
|
error: we
|
|
11872
11875
|
},
|
|
@@ -11885,7 +11888,7 @@ const Ca = {
|
|
|
11885
11888
|
value: re[c] || [],
|
|
11886
11889
|
onChange: (mt) => Te(c, mt),
|
|
11887
11890
|
options: Oe,
|
|
11888
|
-
placeholder: Ze ?
|
|
11891
|
+
placeholder: Ze ? g("placeholders.selectOtherNationalities") : Pe,
|
|
11889
11892
|
disabled: K,
|
|
11890
11893
|
readOnly: De
|
|
11891
11894
|
},
|
|
@@ -11957,7 +11960,7 @@ const Ca = {
|
|
|
11957
11960
|
}, se = (c, P) => {
|
|
11958
11961
|
const A = c.labelMode ? c.labelMode !== "placeholder" : B;
|
|
11959
11962
|
if (c.customType === "paragraph") {
|
|
11960
|
-
const
|
|
11963
|
+
const T = Q(c.displayText, g) || Q(c.label, g) || "";
|
|
11961
11964
|
return /* @__PURE__ */ i(
|
|
11962
11965
|
"p",
|
|
11963
11966
|
{
|
|
@@ -11968,7 +11971,7 @@ const Ca = {
|
|
|
11968
11971
|
margin: 0,
|
|
11969
11972
|
color: "var(--metakyc-text-secondary, #6b7280)"
|
|
11970
11973
|
},
|
|
11971
|
-
dangerouslySetInnerHTML: { __html:
|
|
11974
|
+
dangerouslySetInnerHTML: { __html: T }
|
|
11972
11975
|
},
|
|
11973
11976
|
`custom-${P}`
|
|
11974
11977
|
);
|
|
@@ -11977,14 +11980,14 @@ const Ca = {
|
|
|
11977
11980
|
return /* @__PURE__ */ i(
|
|
11978
11981
|
"div",
|
|
11979
11982
|
{
|
|
11980
|
-
dangerouslySetInnerHTML: { __html: Q(c.label,
|
|
11983
|
+
dangerouslySetInnerHTML: { __html: Q(c.label, g) || "" }
|
|
11981
11984
|
},
|
|
11982
11985
|
`custom-${P}`
|
|
11983
11986
|
);
|
|
11984
11987
|
if (c.customType === "br")
|
|
11985
11988
|
return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${P}`);
|
|
11986
11989
|
if (c.customType === "link") {
|
|
11987
|
-
const
|
|
11990
|
+
const T = Q(c.displayText, g) || Q(c.label, g) || c.linkText || c.linkUrl || "";
|
|
11988
11991
|
return /* @__PURE__ */ i("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
|
|
11989
11992
|
"a",
|
|
11990
11993
|
{
|
|
@@ -12001,30 +12004,30 @@ const Ca = {
|
|
|
12001
12004
|
cursor: "pointer"
|
|
12002
12005
|
},
|
|
12003
12006
|
children: [
|
|
12004
|
-
|
|
12007
|
+
T,
|
|
12005
12008
|
/* @__PURE__ */ i("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
|
|
12006
12009
|
]
|
|
12007
12010
|
}
|
|
12008
12011
|
) }, `custom-${P}`);
|
|
12009
12012
|
}
|
|
12010
12013
|
if (!c.paramName) return null;
|
|
12011
|
-
const h = j[c.paramName], v = Q(c.displayText,
|
|
12014
|
+
const h = j[c.paramName], v = Q(c.displayText, g) || Q(c.label, g) || c.paramName;
|
|
12012
12015
|
if (c.customType === "checkbox") {
|
|
12013
|
-
const
|
|
12016
|
+
const T = ye[c.paramName] === "true";
|
|
12014
12017
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
12015
12018
|
/* @__PURE__ */ s(
|
|
12016
12019
|
"div",
|
|
12017
12020
|
{
|
|
12018
12021
|
className: "metakyc-option-label",
|
|
12019
12022
|
role: "checkbox",
|
|
12020
|
-
"aria-checked":
|
|
12021
|
-
onClick: () => ze(c.paramName,
|
|
12023
|
+
"aria-checked": T,
|
|
12024
|
+
onClick: () => ze(c.paramName, T ? "false" : "true"),
|
|
12022
12025
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
|
|
12023
12026
|
children: [
|
|
12024
12027
|
/* @__PURE__ */ i(
|
|
12025
12028
|
Ge,
|
|
12026
12029
|
{
|
|
12027
|
-
checked:
|
|
12030
|
+
checked: T,
|
|
12028
12031
|
onChange: (me) => ze(c.paramName, me ? "true" : "false")
|
|
12029
12032
|
}
|
|
12030
12033
|
),
|
|
@@ -12046,21 +12049,21 @@ const Ca = {
|
|
|
12046
12049
|
] }, `custom-${P}`);
|
|
12047
12050
|
}
|
|
12048
12051
|
if (c.customType === "link_checkbox") {
|
|
12049
|
-
const
|
|
12052
|
+
const T = ye[c.paramName] === "true";
|
|
12050
12053
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
12051
12054
|
/* @__PURE__ */ s(
|
|
12052
12055
|
"div",
|
|
12053
12056
|
{
|
|
12054
12057
|
className: "metakyc-option-label",
|
|
12055
12058
|
role: "checkbox",
|
|
12056
|
-
"aria-checked":
|
|
12057
|
-
onClick: () => ze(c.paramName,
|
|
12059
|
+
"aria-checked": T,
|
|
12060
|
+
onClick: () => ze(c.paramName, T ? "false" : "true"),
|
|
12058
12061
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
|
|
12059
12062
|
children: [
|
|
12060
12063
|
/* @__PURE__ */ i(
|
|
12061
12064
|
Ge,
|
|
12062
12065
|
{
|
|
12063
|
-
checked:
|
|
12066
|
+
checked: T,
|
|
12064
12067
|
onChange: (me) => ze(c.paramName, me ? "true" : "false")
|
|
12065
12068
|
}
|
|
12066
12069
|
),
|
|
@@ -12095,7 +12098,7 @@ const Ca = {
|
|
|
12095
12098
|
] }, `custom-${P}`);
|
|
12096
12099
|
}
|
|
12097
12100
|
if (c.customType === "group_checkbox") {
|
|
12098
|
-
const
|
|
12101
|
+
const T = (ye[c.paramName] || "").split(",").filter(Boolean);
|
|
12099
12102
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
12100
12103
|
A && /* @__PURE__ */ s(
|
|
12101
12104
|
"div",
|
|
@@ -12109,11 +12112,11 @@ const Ca = {
|
|
|
12109
12112
|
}
|
|
12110
12113
|
),
|
|
12111
12114
|
/* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((me) => {
|
|
12112
|
-
const we = c.singleSelect ? ye[c.paramName] === me.value :
|
|
12115
|
+
const we = c.singleSelect ? ye[c.paramName] === me.value : T.includes(me.value), Pe = () => {
|
|
12113
12116
|
if (c.singleSelect)
|
|
12114
12117
|
ze(c.paramName, we ? "" : me.value);
|
|
12115
12118
|
else {
|
|
12116
|
-
const De = we ?
|
|
12119
|
+
const De = we ? T.filter((be) => be !== me.value) : [...T, me.value];
|
|
12117
12120
|
ze(c.paramName, De.join(","));
|
|
12118
12121
|
}
|
|
12119
12122
|
};
|
|
@@ -12153,19 +12156,19 @@ const Ca = {
|
|
|
12153
12156
|
]
|
|
12154
12157
|
}
|
|
12155
12158
|
),
|
|
12156
|
-
/* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((
|
|
12159
|
+
/* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((T) => /* @__PURE__ */ s(
|
|
12157
12160
|
"div",
|
|
12158
12161
|
{
|
|
12159
12162
|
className: "metakyc-option-label",
|
|
12160
|
-
onClick: () => ze(c.paramName,
|
|
12163
|
+
onClick: () => ze(c.paramName, T.value),
|
|
12161
12164
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
|
|
12162
12165
|
children: [
|
|
12163
12166
|
/* @__PURE__ */ i(
|
|
12164
12167
|
"input",
|
|
12165
12168
|
{
|
|
12166
12169
|
type: "radio",
|
|
12167
|
-
checked: ye[c.paramName] ===
|
|
12168
|
-
onChange: () => ze(c.paramName,
|
|
12170
|
+
checked: ye[c.paramName] === T.value,
|
|
12171
|
+
onChange: () => ze(c.paramName, T.value),
|
|
12169
12172
|
name: `radio-group-${c.paramName}-${P}`,
|
|
12170
12173
|
className: "metakyc-option-input",
|
|
12171
12174
|
onClick: (me) => me.stopPropagation(),
|
|
@@ -12177,12 +12180,12 @@ const Ca = {
|
|
|
12177
12180
|
{
|
|
12178
12181
|
className: "metakyc-option-text",
|
|
12179
12182
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
12180
|
-
children:
|
|
12183
|
+
children: T.label
|
|
12181
12184
|
}
|
|
12182
12185
|
)
|
|
12183
12186
|
]
|
|
12184
12187
|
},
|
|
12185
|
-
|
|
12188
|
+
T.value
|
|
12186
12189
|
)) }),
|
|
12187
12190
|
h && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-danger, #ef4444)" }, children: h })
|
|
12188
12191
|
] }, `custom-${P}`) : /* @__PURE__ */ i(
|
|
@@ -12192,7 +12195,7 @@ const Ca = {
|
|
|
12192
12195
|
label: A ? `${v}${c.required ? " *" : ""}` : void 0,
|
|
12193
12196
|
placeholder: A ? void 0 : v,
|
|
12194
12197
|
value: ye[c.paramName] || "",
|
|
12195
|
-
onChange: (
|
|
12198
|
+
onChange: (T) => ze(c.paramName, T.target.value),
|
|
12196
12199
|
required: c.required,
|
|
12197
12200
|
error: h
|
|
12198
12201
|
},
|
|
@@ -12222,28 +12225,28 @@ const Ca = {
|
|
|
12222
12225
|
{
|
|
12223
12226
|
className: "metakyc-option-text",
|
|
12224
12227
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", fontWeight: 500 },
|
|
12225
|
-
children: Q(c.conditionalLabel,
|
|
12228
|
+
children: Q(c.conditionalLabel, g) || c.conditionalOn
|
|
12226
12229
|
}
|
|
12227
12230
|
)
|
|
12228
12231
|
]
|
|
12229
12232
|
}
|
|
12230
12233
|
) }),
|
|
12231
12234
|
A && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: c.fields.map((h, v) => {
|
|
12232
|
-
const
|
|
12233
|
-
return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${
|
|
12235
|
+
const T = Math.min(4, Math.max(1, Number(h.colSpan) || 4)), me = h.isCustom ? `custom-${v}-${h.paramName}` : `builtin-${h.name}-${v}`;
|
|
12236
|
+
return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${T} / span ${T}` }, children: /* @__PURE__ */ i(Jt, { helpText: h.helpText, children: h.isCustom ? se(h, v) : $(h.name, me, h.displayText, h.countriesType, h.labelMode) }) }, me);
|
|
12234
12237
|
}) })
|
|
12235
12238
|
] });
|
|
12236
12239
|
};
|
|
12237
12240
|
if (!d || K || E)
|
|
12238
12241
|
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ s(ne, { children: [
|
|
12239
12242
|
/* @__PURE__ */ i(Ye, { className: "my-8" }),
|
|
12240
|
-
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children:
|
|
12243
|
+
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: g("common.loadingForm") })
|
|
12241
12244
|
] }) }) });
|
|
12242
12245
|
if (F) {
|
|
12243
|
-
const c = F[fe] ?? F[0], P = dt === -1, A = Qe === -1, h = F.length, v = _e(c),
|
|
12246
|
+
const c = F[fe] ?? F[0], P = dt === -1, A = Qe === -1, h = F.length, v = _e(c), T = at(c), me = Object.values(j), we = !v && !!c.conditionalOn && c.conditionalMode === "block", Pe = Fe || f || we || T;
|
|
12244
12247
|
let De;
|
|
12245
|
-
return we ||
|
|
12246
|
-
/* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(bt, { title: (d == null ? void 0 : d.title) ||
|
|
12248
|
+
return we || T ? De = g("common.blocked") : A ? De = c.conditionalOn && !v ? g("common.skipAndSubmit") : g("common.submit") : De = c.conditionalOn && !v ? g("common.skip") : g("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ae, { children: [
|
|
12249
|
+
/* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(bt, { title: (d == null ? void 0 : d.title) || g("createApplicant.title") }) }),
|
|
12247
12250
|
/* @__PURE__ */ s(ne, { children: [
|
|
12248
12251
|
(c.title || c.subtitle || c.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
|
|
12249
12252
|
c.title && /* @__PURE__ */ i(
|
|
@@ -12251,7 +12254,7 @@ const Ca = {
|
|
|
12251
12254
|
{
|
|
12252
12255
|
className: "font-semibold text-base",
|
|
12253
12256
|
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
12254
|
-
children: Q(c.title,
|
|
12257
|
+
children: Q(c.title, g)
|
|
12255
12258
|
}
|
|
12256
12259
|
),
|
|
12257
12260
|
c.subtitle && /* @__PURE__ */ i(
|
|
@@ -12259,7 +12262,7 @@ const Ca = {
|
|
|
12259
12262
|
{
|
|
12260
12263
|
className: "text-sm mt-0.5",
|
|
12261
12264
|
style: { color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
12262
|
-
children: Q(c.subtitle,
|
|
12265
|
+
children: Q(c.subtitle, g)
|
|
12263
12266
|
}
|
|
12264
12267
|
),
|
|
12265
12268
|
c.description && c.description !== c.subtitle && /* @__PURE__ */ i(
|
|
@@ -12267,7 +12270,7 @@ const Ca = {
|
|
|
12267
12270
|
{
|
|
12268
12271
|
className: "text-xs mt-1",
|
|
12269
12272
|
style: { color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
12270
|
-
children: Q(c.description,
|
|
12273
|
+
children: Q(c.description, g)
|
|
12271
12274
|
}
|
|
12272
12275
|
)
|
|
12273
12276
|
] }),
|
|
@@ -12295,7 +12298,7 @@ const Ca = {
|
|
|
12295
12298
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
|
|
12296
12299
|
}, children: [
|
|
12297
12300
|
ve && /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
|
|
12298
|
-
/* @__PURE__ */ i("strong", { children:
|
|
12301
|
+
/* @__PURE__ */ i("strong", { children: g("common.errorPrefix") }),
|
|
12299
12302
|
" ",
|
|
12300
12303
|
ve
|
|
12301
12304
|
] }),
|
|
@@ -12314,7 +12317,7 @@ const Ca = {
|
|
|
12314
12317
|
ue(dt), _({});
|
|
12315
12318
|
},
|
|
12316
12319
|
disabled: Fe || f,
|
|
12317
|
-
children:
|
|
12320
|
+
children: g("common.previous")
|
|
12318
12321
|
}
|
|
12319
12322
|
),
|
|
12320
12323
|
P && n && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: n, disabled: Fe || f, children: "Cancel" })
|
|
@@ -12333,13 +12336,13 @@ const Ca = {
|
|
|
12333
12336
|
] }) });
|
|
12334
12337
|
}
|
|
12335
12338
|
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i("form", { onSubmit: G, children: /* @__PURE__ */ s(ae, { children: [
|
|
12336
|
-
/* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(bt, { title: (d == null ? void 0 : d.title) ||
|
|
12339
|
+
/* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(bt, { title: (d == null ? void 0 : d.title) || g("createApplicant.title") }) }),
|
|
12337
12340
|
/* @__PURE__ */ s(ne, { children: [
|
|
12338
12341
|
ve && /* @__PURE__ */ i("div", { className: "mb-6 p-4 rounded-lg", style: {
|
|
12339
12342
|
backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
|
|
12340
12343
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
|
|
12341
12344
|
}, children: /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
|
|
12342
|
-
/* @__PURE__ */ i("strong", { children:
|
|
12345
|
+
/* @__PURE__ */ i("strong", { children: g("common.errorPrefix") }),
|
|
12343
12346
|
" ",
|
|
12344
12347
|
ve
|
|
12345
12348
|
] }) }),
|
|
@@ -12347,7 +12350,7 @@ const Ca = {
|
|
|
12347
12350
|
] }),
|
|
12348
12351
|
/* @__PURE__ */ s(Le, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
12349
12352
|
n && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: n, disabled: Fe || f, children: "Cancel" }),
|
|
12350
|
-
/* @__PURE__ */ i(Z, { type: "submit", isLoading: Fe || f, children:
|
|
12353
|
+
/* @__PURE__ */ i(Z, { type: "submit", isLoading: Fe || f, children: g("createApplicant.createApplicant") })
|
|
12351
12354
|
] })
|
|
12352
12355
|
] }) }) });
|
|
12353
12356
|
}, ei = ["companyName", "email"];
|
|
@@ -12366,69 +12369,69 @@ const Ta = ({
|
|
|
12366
12369
|
throw new Error(
|
|
12367
12370
|
"workflowKey is required. Provide it either as a prop to CreateCompanyApplicantForm or set it in config.applicantForm.workflowKey"
|
|
12368
12371
|
);
|
|
12369
|
-
const
|
|
12372
|
+
const g = t || ((k = n.applicantForm) == null ? void 0 : k.externalRefId) || "", S = ((D = n.applicantForm) == null ? void 0 : D.email) || "", R = ((G = n.applicantForm) == null ? void 0 : G.initialValues) || {}, O = ((($ = n.applicantForm) == null ? void 0 : $.fieldLabelMode) || (l == null ? void 0 : l.fieldLabelMode) || "label") !== "placeholder", N = Ue(
|
|
12370
12373
|
() => l != null && l.companyFormPages && l.companyFormPages.length > 0 ? l.companyFormPages : null,
|
|
12371
12374
|
[l == null ? void 0 : l.companyFormPages]
|
|
12372
12375
|
), H = Ue(() => {
|
|
12373
12376
|
const y = new Set(ei), I = l == null ? void 0 : l.companyFormRequiredFields;
|
|
12374
12377
|
if (I) for (const x of I) y.add(x);
|
|
12375
|
-
if (
|
|
12376
|
-
for (const x of
|
|
12377
|
-
for (const
|
|
12378
|
-
!
|
|
12378
|
+
if (N)
|
|
12379
|
+
for (const x of N)
|
|
12380
|
+
for (const p of x.fields)
|
|
12381
|
+
!p.isCustom && p.name && p.required && y.add(p.name);
|
|
12379
12382
|
return Array.from(y);
|
|
12380
|
-
}, [l == null ? void 0 : l.companyFormRequiredFields,
|
|
12383
|
+
}, [l == null ? void 0 : l.companyFormRequiredFields, N]), B = Ue(() => {
|
|
12381
12384
|
var y;
|
|
12382
|
-
if (
|
|
12383
|
-
const I =
|
|
12384
|
-
for (const
|
|
12385
|
+
if (N) {
|
|
12386
|
+
const I = N.flatMap((p) => p.fields).filter((p) => !p.isCustom && p.name).map((p) => p.name), x = new Set(I);
|
|
12387
|
+
for (const p of ei) x.add(p);
|
|
12385
12388
|
return Array.from(x);
|
|
12386
12389
|
}
|
|
12387
12390
|
return (y = n.applicantForm) != null && y.visibleFields ? n.applicantForm.visibleFields : l != null && l.companyFormVisibleFields && l.companyFormVisibleFields.length > 0 ? l.companyFormVisibleFields : Li;
|
|
12388
|
-
}, [(se = n.applicantForm) == null ? void 0 : se.visibleFields, l == null ? void 0 : l.companyFormVisibleFields,
|
|
12391
|
+
}, [(se = n.applicantForm) == null ? void 0 : se.visibleFields, l == null ? void 0 : l.companyFormVisibleFields, N]), F = /* @__PURE__ */ new Set(["countryResidence", "addressCountry"]), L = Ue(() => {
|
|
12389
12392
|
var I, x;
|
|
12390
12393
|
const y = /* @__PURE__ */ new Set();
|
|
12391
|
-
if (
|
|
12392
|
-
for (const
|
|
12393
|
-
for (const U of
|
|
12394
|
+
if (N)
|
|
12395
|
+
for (const p of N)
|
|
12396
|
+
for (const U of p.fields)
|
|
12394
12397
|
!U.isCustom && U.name && F.has(U.name) && y.add(U.countriesType ?? ((I = yt[U.name]) == null ? void 0 : I.countriesType));
|
|
12395
12398
|
else
|
|
12396
|
-
for (const
|
|
12397
|
-
F.has(
|
|
12399
|
+
for (const p of B)
|
|
12400
|
+
F.has(p) && y.add((x = yt[p]) == null ? void 0 : x.countriesType);
|
|
12398
12401
|
return y.size === 0 && y.add(void 0), Array.from(y);
|
|
12399
|
-
}, [B,
|
|
12402
|
+
}, [B, N]), [q, J] = w({}), [ie, C] = w(!0), z = ge(/* @__PURE__ */ new Set()), K = ge(/* @__PURE__ */ new Set());
|
|
12400
12403
|
he(() => {
|
|
12401
12404
|
if (!l) return;
|
|
12402
|
-
const y = L.filter((
|
|
12403
|
-
const U =
|
|
12405
|
+
const y = L.filter((p) => {
|
|
12406
|
+
const U = p != null ? String(p) : "all";
|
|
12404
12407
|
return !K.current.has(U) && !z.current.has(U);
|
|
12405
12408
|
});
|
|
12406
12409
|
if (y.length === 0) {
|
|
12407
|
-
L.every((U) => K.current.has(U != null ? String(U) : "all")) &&
|
|
12410
|
+
L.every((U) => K.current.has(U != null ? String(U) : "all")) && C(!1);
|
|
12408
12411
|
return;
|
|
12409
12412
|
}
|
|
12410
|
-
|
|
12411
|
-
const I = y.map((
|
|
12412
|
-
I.forEach((
|
|
12413
|
+
C(!0);
|
|
12414
|
+
const I = y.map((p) => p != null ? String(p) : "all");
|
|
12415
|
+
I.forEach((p) => z.current.add(p)), (async () => {
|
|
12413
12416
|
try {
|
|
12414
|
-
const
|
|
12417
|
+
const p = await Promise.all(
|
|
12415
12418
|
y.map(async (U) => {
|
|
12416
12419
|
const Y = U != null ? String(U) : "all", ce = await o.getCountries("", n.locale || "en", U), Ee = /* @__PURE__ */ new Set(), c = ce.map((P) => ({ value: P.abbreviation3 || P.abbreviation, label: P.name })).filter((P) => !P.value || Ee.has(P.value) ? !1 : (Ee.add(P.value), !0));
|
|
12417
12420
|
return K.current.add(Y), z.current.delete(Y), [Y, c];
|
|
12418
12421
|
})
|
|
12419
12422
|
);
|
|
12420
|
-
J((U) => ({ ...U, ...Object.fromEntries(
|
|
12421
|
-
} catch (
|
|
12422
|
-
I.forEach((U) => z.current.delete(U)), console.error("Failed to load countries:",
|
|
12423
|
+
J((U) => ({ ...U, ...Object.fromEntries(p) }));
|
|
12424
|
+
} catch (p) {
|
|
12425
|
+
I.forEach((U) => z.current.delete(U)), console.error("Failed to load countries:", p);
|
|
12423
12426
|
} finally {
|
|
12424
|
-
L.every((U) => K.current.has(U != null ? String(U) : "all")) &&
|
|
12427
|
+
L.every((U) => K.current.has(U != null ? String(U) : "all")) && C(!1);
|
|
12425
12428
|
}
|
|
12426
12429
|
})();
|
|
12427
12430
|
}, [L, l]);
|
|
12428
12431
|
const ee = (y, I) => {
|
|
12429
12432
|
var U;
|
|
12430
|
-
const x = I ?? ((U = yt[y]) == null ? void 0 : U.countriesType),
|
|
12431
|
-
return q[
|
|
12433
|
+
const x = I ?? ((U = yt[y]) == null ? void 0 : U.countriesType), p = x != null ? String(x) : "all";
|
|
12434
|
+
return q[p] || [];
|
|
12432
12435
|
}, X = {
|
|
12433
12436
|
companyName: 1,
|
|
12434
12437
|
registrationNumber: 1,
|
|
@@ -12450,11 +12453,11 @@ const Ta = ({
|
|
|
12450
12453
|
addressCountry: 1,
|
|
12451
12454
|
lei: 1
|
|
12452
12455
|
}, W = Object.fromEntries(
|
|
12453
|
-
Object.entries(
|
|
12456
|
+
Object.entries(R).filter(([y]) => y in X)
|
|
12454
12457
|
), [te, de] = w({
|
|
12455
12458
|
workflowKey: f,
|
|
12456
12459
|
companyName: "",
|
|
12457
|
-
email:
|
|
12460
|
+
email: S,
|
|
12458
12461
|
phone: "",
|
|
12459
12462
|
registrationNumber: "",
|
|
12460
12463
|
countryResidence: "",
|
|
@@ -12472,39 +12475,39 @@ const Ta = ({
|
|
|
12472
12475
|
postalCode: "",
|
|
12473
12476
|
addressCountry: "",
|
|
12474
12477
|
lei: "",
|
|
12475
|
-
externalRefId:
|
|
12478
|
+
externalRefId: g,
|
|
12476
12479
|
...W
|
|
12477
12480
|
}), [le, je] = w({}), [re, Ce] = w(0), [Se, ye] = w({}), [M, E] = w(null), [V, fe] = w(!1), ue = (y, I) => de((x) => ({ ...x, [y]: I })), j = (y, I) => je((x) => ({ ...x, [y]: I })), _ = (y) => !y.conditionalOn || le[y.conditionalOn] === "true", ve = (y) => {
|
|
12478
12481
|
var I;
|
|
12479
12482
|
for (const x of y.fields) {
|
|
12480
12483
|
if (!x.isCustom || !x.paramName || !((I = x.blockingValues) != null && I.length)) continue;
|
|
12481
|
-
const
|
|
12484
|
+
const p = le[x.paramName] ?? "";
|
|
12482
12485
|
if (x.customType === "group_checkbox") {
|
|
12483
|
-
if (
|
|
12484
|
-
} else if (x.customType === "radio_group" && x.blockingValues.includes(
|
|
12486
|
+
if (p.split(",").filter(Boolean).some((Y) => x.blockingValues.includes(Y))) return !0;
|
|
12487
|
+
} else if (x.customType === "radio_group" && x.blockingValues.includes(p))
|
|
12485
12488
|
return !0;
|
|
12486
12489
|
}
|
|
12487
12490
|
return !1;
|
|
12488
|
-
}, ke =
|
|
12491
|
+
}, ke = N && re < N.length - 1 ? re + 1 : -1, Fe = N && re > 0 ? re - 1 : -1, ct = (y) => {
|
|
12489
12492
|
const I = {};
|
|
12490
12493
|
for (const x of y.fields)
|
|
12491
12494
|
if (x.isCustom) {
|
|
12492
12495
|
if (x.customType === "paragraph" || x.customType === "html" || x.customType === "br" || x.customType === "link") continue;
|
|
12493
12496
|
if (x.required && x.paramName) {
|
|
12494
|
-
const
|
|
12495
|
-
x.customType === "checkbox" || x.customType === "link_checkbox" ?
|
|
12497
|
+
const p = le[x.paramName], U = Q(x.displayText, m) || Q(x.label, m) || x.paramName;
|
|
12498
|
+
x.customType === "checkbox" || x.customType === "link_checkbox" ? p !== "true" && (I[x.paramName] = m("validation.fieldRequired", { field: U })) : (!p || p.trim() === "") && (I[x.paramName] = m("validation.fieldRequired", { field: U }));
|
|
12496
12499
|
}
|
|
12497
12500
|
} else if (x.name) {
|
|
12498
|
-
const
|
|
12499
|
-
if (H.includes(
|
|
12500
|
-
const U = yt[
|
|
12501
|
-
I[
|
|
12501
|
+
const p = x.name;
|
|
12502
|
+
if (H.includes(p) && Lt(te[p])) {
|
|
12503
|
+
const U = yt[p], Y = Q(x.displayText, m) || (U != null && U.translationKey ? m(`fields.${U.translationKey}`) : void 0) || (U == null ? void 0 : U.label) || p;
|
|
12504
|
+
I[p] = m("validation.fieldRequired", { field: Y });
|
|
12502
12505
|
}
|
|
12503
12506
|
}
|
|
12504
12507
|
return I;
|
|
12505
12508
|
}, Te = async () => {
|
|
12506
|
-
if (!
|
|
12507
|
-
const y =
|
|
12509
|
+
if (!N) return;
|
|
12510
|
+
const y = N[re];
|
|
12508
12511
|
if (ve(y) || y.conditionalOn && y.conditionalMode === "block" && !_(y)) return;
|
|
12509
12512
|
if (y.conditionalOn && !_(y)) {
|
|
12510
12513
|
ye({}), ke >= 0 ? Ce(ke) : await ze();
|
|
@@ -12518,9 +12521,9 @@ const Ta = ({
|
|
|
12518
12521
|
ye({}), ke >= 0 ? Ce(ke) : await ze();
|
|
12519
12522
|
}, ze = async () => {
|
|
12520
12523
|
var y;
|
|
12521
|
-
if (
|
|
12524
|
+
if (N) {
|
|
12522
12525
|
let I = {};
|
|
12523
|
-
for (const x of
|
|
12526
|
+
for (const x of N)
|
|
12524
12527
|
_(x) && (I = { ...I, ...ct(x) });
|
|
12525
12528
|
if (Object.keys(I).length > 0) {
|
|
12526
12529
|
ye(I);
|
|
@@ -12532,7 +12535,7 @@ const Ta = ({
|
|
|
12532
12535
|
const I = {
|
|
12533
12536
|
workflowKey: te.workflowKey,
|
|
12534
12537
|
externalRefId: ((y = te.externalRefId) == null ? void 0 : y.trim()) || void 0
|
|
12535
|
-
}, x =
|
|
12538
|
+
}, x = N ? N.filter((Y) => _(Y)).flatMap((Y) => Y.fields).filter((Y) => !Y.isCustom && Y.name).map((Y) => Y.name) : B;
|
|
12536
12539
|
for (const Y of x) {
|
|
12537
12540
|
const ce = te[Y];
|
|
12538
12541
|
if (!Lt(ce))
|
|
@@ -12566,9 +12569,9 @@ const Ta = ({
|
|
|
12566
12569
|
break;
|
|
12567
12570
|
}
|
|
12568
12571
|
}
|
|
12569
|
-
const
|
|
12570
|
-
if (
|
|
12571
|
-
for (const Y of
|
|
12572
|
+
const p = [];
|
|
12573
|
+
if (N) {
|
|
12574
|
+
for (const Y of N)
|
|
12572
12575
|
if (_(Y))
|
|
12573
12576
|
for (const ce of Y.fields) {
|
|
12574
12577
|
if (!ce.isCustom || !ce.paramName || ce.customType === "paragraph" || ce.customType === "html" || ce.customType === "br" || ce.customType === "link") continue;
|
|
@@ -12577,10 +12580,10 @@ const Ta = ({
|
|
|
12577
12580
|
if (ce.customType === "checkbox" || ce.customType === "link_checkbox")
|
|
12578
12581
|
c = Ee === "true" ? "yes" : "no";
|
|
12579
12582
|
else if (c = Ee, !c && !ce.required) continue;
|
|
12580
|
-
|
|
12583
|
+
p.push({ paramName: ce.paramName, value: c });
|
|
12581
12584
|
}
|
|
12582
12585
|
}
|
|
12583
|
-
|
|
12586
|
+
p.length > 0 && (I.applicantAdditionalDatas = p);
|
|
12584
12587
|
const U = await d(I);
|
|
12585
12588
|
a(U.applicantId);
|
|
12586
12589
|
} catch (I) {
|
|
@@ -12592,19 +12595,19 @@ const Ta = ({
|
|
|
12592
12595
|
y.preventDefault();
|
|
12593
12596
|
for (const I of H)
|
|
12594
12597
|
if (Lt(te[I])) {
|
|
12595
|
-
const x = yt[I],
|
|
12596
|
-
E(m("validation.fieldRequired", { field:
|
|
12598
|
+
const x = yt[I], p = (x != null && x.translationKey ? m(`fields.${x.translationKey}`) : void 0) || (x == null ? void 0 : x.label) || I;
|
|
12599
|
+
E(m("validation.fieldRequired", { field: p }));
|
|
12597
12600
|
return;
|
|
12598
12601
|
}
|
|
12599
12602
|
await ze();
|
|
12600
|
-
}, at = (y, I, x,
|
|
12603
|
+
}, at = (y, I, x, p, U) => {
|
|
12601
12604
|
const Y = yt[y];
|
|
12602
12605
|
if (!Y) return null;
|
|
12603
12606
|
const ce = H.includes(y), Ee = Se[y], c = Q(x, m) || (Y.translationKey ? m(`fields.${Y.translationKey}`) : void 0) || Y.label, P = y in W, A = I ?? y, h = U ? U !== "placeholder" : O, v = h ? c : void 0;
|
|
12604
12607
|
switch (Y.type) {
|
|
12605
12608
|
case "select":
|
|
12606
12609
|
if (y === "countryResidence" || y === "addressCountry") {
|
|
12607
|
-
const
|
|
12610
|
+
const T = ee(y, p);
|
|
12608
12611
|
return /* @__PURE__ */ i(
|
|
12609
12612
|
it,
|
|
12610
12613
|
{
|
|
@@ -12612,7 +12615,7 @@ const Ta = ({
|
|
|
12612
12615
|
label: v,
|
|
12613
12616
|
value: te[y] || "",
|
|
12614
12617
|
onChange: (me) => ue(y, me),
|
|
12615
|
-
options: [{ value: "", label: h ? m("placeholders.selectCountry") : c }, ...
|
|
12618
|
+
options: [{ value: "", label: h ? m("placeholders.selectCountry") : c }, ...T],
|
|
12616
12619
|
disabled: ie,
|
|
12617
12620
|
readOnly: P,
|
|
12618
12621
|
error: Ee
|
|
@@ -12630,7 +12633,7 @@ const Ta = ({
|
|
|
12630
12633
|
label: v,
|
|
12631
12634
|
placeholder: h ? void 0 : c,
|
|
12632
12635
|
value: te[y] || "",
|
|
12633
|
-
onChange: (
|
|
12636
|
+
onChange: (T) => ue(y, T.target.value),
|
|
12634
12637
|
readOnly: P,
|
|
12635
12638
|
error: Ee
|
|
12636
12639
|
},
|
|
@@ -12645,7 +12648,7 @@ const Ta = ({
|
|
|
12645
12648
|
label: v,
|
|
12646
12649
|
placeholder: h ? void 0 : c,
|
|
12647
12650
|
value: te[y] || "",
|
|
12648
|
-
onChange: (
|
|
12651
|
+
onChange: (T) => ue(y, T.target.value),
|
|
12649
12652
|
readOnly: P,
|
|
12650
12653
|
error: Ee
|
|
12651
12654
|
},
|
|
@@ -12660,7 +12663,7 @@ const Ta = ({
|
|
|
12660
12663
|
label: v,
|
|
12661
12664
|
placeholder: h ? void 0 : c,
|
|
12662
12665
|
value: te[y] || "",
|
|
12663
|
-
onChange: (
|
|
12666
|
+
onChange: (T) => ue(y, T.target.value),
|
|
12664
12667
|
readOnly: P,
|
|
12665
12668
|
error: Ee
|
|
12666
12669
|
},
|
|
@@ -12675,7 +12678,7 @@ const Ta = ({
|
|
|
12675
12678
|
label: v,
|
|
12676
12679
|
placeholder: h ? void 0 : c,
|
|
12677
12680
|
value: te[y] || "",
|
|
12678
|
-
onChange: (
|
|
12681
|
+
onChange: (T) => ue(y, T.target.value),
|
|
12679
12682
|
readOnly: P,
|
|
12680
12683
|
error: Ee
|
|
12681
12684
|
},
|
|
@@ -12708,7 +12711,7 @@ const Ta = ({
|
|
|
12708
12711
|
}
|
|
12709
12712
|
) }, `custom-${I}`);
|
|
12710
12713
|
if (!y.paramName) return null;
|
|
12711
|
-
const x = Se[y.paramName],
|
|
12714
|
+
const x = Se[y.paramName], p = Q(y.displayText, m) || Q(y.label, m) || y.paramName, U = y.labelMode ? y.labelMode !== "placeholder" : O;
|
|
12712
12715
|
if (y.customType === "checkbox") {
|
|
12713
12716
|
const Y = le[y.paramName] === "true";
|
|
12714
12717
|
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -12728,7 +12731,7 @@ const Ta = ({
|
|
|
12728
12731
|
}
|
|
12729
12732
|
),
|
|
12730
12733
|
/* @__PURE__ */ s("span", { style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
12731
|
-
|
|
12734
|
+
p,
|
|
12732
12735
|
y.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
|
|
12733
12736
|
] })
|
|
12734
12737
|
]
|
|
@@ -12741,8 +12744,8 @@ const Ta = ({
|
|
|
12741
12744
|
Ne,
|
|
12742
12745
|
{
|
|
12743
12746
|
type: "text",
|
|
12744
|
-
label: U ? `${
|
|
12745
|
-
placeholder: U ? void 0 :
|
|
12747
|
+
label: U ? `${p}${y.required ? " *" : ""}` : void 0,
|
|
12748
|
+
placeholder: U ? void 0 : p,
|
|
12746
12749
|
value: le[y.paramName] || "",
|
|
12747
12750
|
onChange: (Y) => j(y.paramName, Y.target.value),
|
|
12748
12751
|
required: y.required,
|
|
@@ -12772,9 +12775,9 @@ const Ta = ({
|
|
|
12772
12775
|
]
|
|
12773
12776
|
}
|
|
12774
12777
|
),
|
|
12775
|
-
I && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: y.fields.map((x,
|
|
12776
|
-
const U = Math.min(4, Math.max(1, Number(x.colSpan) || 4)), Y = x.isCustom ? `custom-${
|
|
12777
|
-
return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${U} / span ${U}` }, children: x.isCustom ? Qe(x,
|
|
12778
|
+
I && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: y.fields.map((x, p) => {
|
|
12779
|
+
const U = Math.min(4, Math.max(1, Number(x.colSpan) || 4)), Y = x.isCustom ? `custom-${p}-${x.paramName}` : `builtin-${x.name}-${p}`;
|
|
12780
|
+
return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${U} / span ${U}` }, children: x.isCustom ? Qe(x, p) : at(x.name, Y, x.displayText, x.countriesType, x.labelMode) }, Y);
|
|
12778
12781
|
}) })
|
|
12779
12782
|
] });
|
|
12780
12783
|
};
|
|
@@ -12783,8 +12786,8 @@ const Ta = ({
|
|
|
12783
12786
|
/* @__PURE__ */ i(Ye, { className: "my-8" }),
|
|
12784
12787
|
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: m("common.loadingForm") })
|
|
12785
12788
|
] }) }) });
|
|
12786
|
-
if (
|
|
12787
|
-
const y =
|
|
12789
|
+
if (N) {
|
|
12790
|
+
const y = N[re] ?? N[0], I = Fe === -1, x = ke === -1, p = N.length, U = _(y), Y = ve(y), ce = Object.values(Se), Ee = !U && !!y.conditionalOn && y.conditionalMode === "block", c = V || u || Ee || Y;
|
|
12788
12791
|
let P;
|
|
12789
12792
|
return Ee || Y ? P = m("common.blocked") : x ? P = y.conditionalOn && !U ? m("common.skipAndSubmit") : m("common.submit") : P = y.conditionalOn && !U ? m("common.skip") : m("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ae, { children: [
|
|
12790
12793
|
/* @__PURE__ */ i(Ae, { children: /* @__PURE__ */ i(bt, { title: (l == null ? void 0 : l.title) || m("createCompany.title") }) }),
|
|
@@ -12804,8 +12807,8 @@ const Ta = ({
|
|
|
12804
12807
|
] }),
|
|
12805
12808
|
ce.map((A, h) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: A }, h))
|
|
12806
12809
|
] }),
|
|
12807
|
-
|
|
12808
|
-
|
|
12810
|
+
p > 1 && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
|
|
12811
|
+
N.map((A, h) => /* @__PURE__ */ i(
|
|
12809
12812
|
"div",
|
|
12810
12813
|
{
|
|
12811
12814
|
style: {
|
|
@@ -12820,7 +12823,7 @@ const Ta = ({
|
|
|
12820
12823
|
/* @__PURE__ */ s("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
|
|
12821
12824
|
re + 1,
|
|
12822
12825
|
" / ",
|
|
12823
|
-
|
|
12826
|
+
p
|
|
12824
12827
|
] })
|
|
12825
12828
|
] }),
|
|
12826
12829
|
dt(y)
|
|
@@ -12876,26 +12879,26 @@ const Ta = ({
|
|
|
12876
12879
|
workflowKey: u,
|
|
12877
12880
|
nextWorkflowKey: m,
|
|
12878
12881
|
hasWorkflowChanged: f,
|
|
12879
|
-
isLoading:
|
|
12880
|
-
error:
|
|
12881
|
-
moveBack:
|
|
12882
|
+
isLoading: g,
|
|
12883
|
+
error: S,
|
|
12884
|
+
moveBack: R,
|
|
12882
12885
|
refreshProgress: b
|
|
12883
|
-
} = Mr(e), [O,
|
|
12886
|
+
} = Mr(e), [O, N] = Re.useState(!1), H = Re.useRef(null);
|
|
12884
12887
|
if (Re.useEffect(() => {
|
|
12885
|
-
|
|
12886
|
-
}, [
|
|
12888
|
+
S && a && a(S);
|
|
12889
|
+
}, [S, a]), Re.useEffect(() => {
|
|
12887
12890
|
o != null && o.workflowResult && t && t(o.workflowResult);
|
|
12888
12891
|
}, [o == null ? void 0 : o.workflowResult, t]), Re.useEffect(() => {
|
|
12889
|
-
f &&
|
|
12890
|
-
}, [f]),
|
|
12892
|
+
f && N(!1);
|
|
12893
|
+
}, [f]), g || !o)
|
|
12891
12894
|
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ s(ne, { children: [
|
|
12892
12895
|
/* @__PURE__ */ i(Ye, { className: "my-8" }),
|
|
12893
12896
|
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n("workflow.loadingWorkflow") })
|
|
12894
12897
|
] }) }) });
|
|
12895
|
-
if (
|
|
12898
|
+
if (S)
|
|
12896
12899
|
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s("div", { className: "text-center py-8", children: [
|
|
12897
12900
|
/* @__PURE__ */ i("p", { className: "text-lg mb-4", style: { color: "var(--metakyc-danger, #ef4444)" }, children: n("workflow.errorOccurred") }),
|
|
12898
|
-
/* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children:
|
|
12901
|
+
/* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: S.message })
|
|
12899
12902
|
] }) }) }) });
|
|
12900
12903
|
if (f && !O)
|
|
12901
12904
|
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s("div", { className: "text-center py-8", children: [
|
|
@@ -12919,7 +12922,7 @@ const Ta = ({
|
|
|
12919
12922
|
/* @__PURE__ */ i(
|
|
12920
12923
|
"button",
|
|
12921
12924
|
{
|
|
12922
|
-
onClick: () =>
|
|
12925
|
+
onClick: () => N(!0),
|
|
12923
12926
|
className: "px-6 py-3 font-medium rounded-lg transition-opacity hover:opacity-90",
|
|
12924
12927
|
style: { backgroundColor: "var(--metakyc-primary, #2563eb)", color: "#ffffff" },
|
|
12925
12928
|
children: n("workflow.continueNewWorkflow")
|
|
@@ -12969,7 +12972,7 @@ const Ta = ({
|
|
|
12969
12972
|
return "";
|
|
12970
12973
|
}
|
|
12971
12974
|
}, F = () => {
|
|
12972
|
-
const q = d.filter((K) => K.visibility !== !1), J = q.findIndex((K) => K.order === l.order), ie = J >= 0 ? J + 1 : 1,
|
|
12975
|
+
const q = d.filter((K) => K.visibility !== !1), J = q.findIndex((K) => K.order === l.order), ie = J >= 0 ? J + 1 : 1, C = q.length, z = C > 1 ? (J + 1) / C * 100 : 100;
|
|
12973
12976
|
return /* @__PURE__ */ s("div", { className: "metakyc-progress-wrapper", style: {
|
|
12974
12977
|
marginBottom: "24px",
|
|
12975
12978
|
backgroundColor: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
|
|
@@ -12980,7 +12983,7 @@ const Ta = ({
|
|
|
12980
12983
|
}, children: [
|
|
12981
12984
|
/* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "16px", gap: "8px", flexWrap: "wrap" }, children: [
|
|
12982
12985
|
/* @__PURE__ */ i(bt, {}),
|
|
12983
|
-
/* @__PURE__ */ i(mi, { variant: o.status === 1 ? "info" : "success", children: n("common.stepXofY", { current: ie, total:
|
|
12986
|
+
/* @__PURE__ */ i(mi, { variant: o.status === 1 ? "info" : "success", children: n("common.stepXofY", { current: ie, total: C }) })
|
|
12984
12987
|
] }),
|
|
12985
12988
|
/* @__PURE__ */ s("div", { style: { position: "relative", height: "4px", borderRadius: "999px", overflow: "hidden", marginBottom: "16px" }, children: [
|
|
12986
12989
|
/* @__PURE__ */ i("div", { style: { position: "absolute", inset: 0, backgroundColor: "var(--metakyc-border, #e5e7eb)", opacity: 0.3 } }),
|
|
@@ -13006,29 +13009,29 @@ const Ta = ({
|
|
|
13006
13009
|
)
|
|
13007
13010
|
] });
|
|
13008
13011
|
}, L = () => {
|
|
13009
|
-
const ie = d.filter((z) => z.visibility !== !1).findIndex((z) => z.order === l.order) <= 0,
|
|
13012
|
+
const ie = d.filter((z) => z.visibility !== !1).findIndex((z) => z.order === l.order) <= 0, C = {
|
|
13010
13013
|
applicantId: e,
|
|
13011
13014
|
onComplete: async () => {
|
|
13012
13015
|
await b();
|
|
13013
13016
|
},
|
|
13014
|
-
onBack: ie ? void 0 :
|
|
13017
|
+
onBack: ie ? void 0 : R
|
|
13015
13018
|
};
|
|
13016
13019
|
switch (l.action) {
|
|
13017
13020
|
case pe.Questionaries:
|
|
13018
|
-
return /* @__PURE__ */ i(aa, { ...
|
|
13021
|
+
return /* @__PURE__ */ i(aa, { ...C });
|
|
13019
13022
|
case pe.UploadDocument:
|
|
13020
|
-
return /* @__PURE__ */ i(sa, { ...
|
|
13023
|
+
return /* @__PURE__ */ i(sa, { ...C });
|
|
13021
13024
|
case pe.Overview:
|
|
13022
|
-
return /* @__PURE__ */ i(la, { ...
|
|
13025
|
+
return /* @__PURE__ */ i(la, { ...C });
|
|
13023
13026
|
case pe.IdentitySdk:
|
|
13024
|
-
return /* @__PURE__ */ i(xa, { ...
|
|
13027
|
+
return /* @__PURE__ */ i(xa, { ...C });
|
|
13025
13028
|
case pe.RiskScoring:
|
|
13026
|
-
return /* @__PURE__ */ i(ya, { ...
|
|
13029
|
+
return /* @__PURE__ */ i(ya, { ...C });
|
|
13027
13030
|
case pe.AdditionalData:
|
|
13028
13031
|
case pe.InvestorCategorization:
|
|
13029
|
-
return /* @__PURE__ */ i(ka, { ...
|
|
13032
|
+
return /* @__PURE__ */ i(ka, { ...C });
|
|
13030
13033
|
case pe.AppropriatenessTest:
|
|
13031
|
-
return /* @__PURE__ */ i(ha, { ...
|
|
13034
|
+
return /* @__PURE__ */ i(ha, { ...C });
|
|
13032
13035
|
case pe.ManualReview:
|
|
13033
13036
|
return /* @__PURE__ */ i(
|
|
13034
13037
|
Zt,
|
|
@@ -13085,7 +13088,7 @@ const Ta = ({
|
|
|
13085
13088
|
gap: "0"
|
|
13086
13089
|
},
|
|
13087
13090
|
children: e.map((l, d) => {
|
|
13088
|
-
const u = d < t, m = d === t, f = u || m,
|
|
13091
|
+
const u = d < t, m = d === t, f = u || m, g = l.displayName || l.name || a(l.action) || `Step ${d + 1}`;
|
|
13089
13092
|
return /* @__PURE__ */ s(Re.Fragment, { children: [
|
|
13090
13093
|
/* @__PURE__ */ s(
|
|
13091
13094
|
"div",
|
|
@@ -13125,7 +13128,7 @@ const Ta = ({
|
|
|
13125
13128
|
fontWeight: m ? 600 : 400,
|
|
13126
13129
|
color: m ? "var(--metakyc-text-primary, #111827)" : u ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
|
|
13127
13130
|
transition: "color 0.2s ease"
|
|
13128
|
-
}, children:
|
|
13131
|
+
}, children: g })
|
|
13129
13132
|
]
|
|
13130
13133
|
}
|
|
13131
13134
|
),
|
|
@@ -13151,23 +13154,23 @@ const Ta = ({
|
|
|
13151
13154
|
onApplicantCreated: r,
|
|
13152
13155
|
className: n
|
|
13153
13156
|
}) => {
|
|
13154
|
-
var O,
|
|
13157
|
+
var O, N;
|
|
13155
13158
|
const { t: o } = Ie(), { config: l } = Me(), {
|
|
13156
13159
|
phase: d,
|
|
13157
13160
|
applicantId: u,
|
|
13158
13161
|
isCompany: m,
|
|
13159
13162
|
workflowKey: f,
|
|
13160
|
-
error:
|
|
13161
|
-
isLoading:
|
|
13162
|
-
transitionToWorkflow:
|
|
13163
|
+
error: g,
|
|
13164
|
+
isLoading: S,
|
|
13165
|
+
transitionToWorkflow: R
|
|
13163
13166
|
} = jr(e);
|
|
13164
13167
|
Re.useEffect(() => {
|
|
13165
|
-
|
|
13166
|
-
}, [
|
|
13168
|
+
g && a && a(g);
|
|
13169
|
+
}, [g, a]);
|
|
13167
13170
|
const b = Re.useCallback((H) => {
|
|
13168
|
-
r == null || r(H),
|
|
13169
|
-
}, [r,
|
|
13170
|
-
if (d === "loading" ||
|
|
13171
|
+
r == null || r(H), R(H);
|
|
13172
|
+
}, [r, R]);
|
|
13173
|
+
if (d === "loading" || S)
|
|
13171
13174
|
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${n || ""}`, children: /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ s(ne, { children: [
|
|
13172
13175
|
/* @__PURE__ */ i(Ye, { className: "my-8" }),
|
|
13173
13176
|
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: o("workflow.loadingWorkflow") })
|
|
@@ -13175,10 +13178,10 @@ const Ta = ({
|
|
|
13175
13178
|
if (d === "error")
|
|
13176
13179
|
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${n || ""}`, children: /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s("div", { className: "text-center py-8", children: [
|
|
13177
13180
|
/* @__PURE__ */ i("p", { className: "text-lg mb-4", style: { color: "var(--metakyc-danger, #ef4444)" }, children: o("workflow.errorOccurred") }),
|
|
13178
|
-
/* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: (
|
|
13181
|
+
/* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: (g == null ? void 0 : g.message) || "An unexpected error occurred." })
|
|
13179
13182
|
] }) }) }) });
|
|
13180
13183
|
if (d === "create_applicant") {
|
|
13181
|
-
const H = f || ((O = l.applicantForm) == null ? void 0 : O.workflowKey), B = (
|
|
13184
|
+
const H = f || ((O = l.applicantForm) == null ? void 0 : O.workflowKey), B = (N = l.applicantForm) == null ? void 0 : N.externalRefId;
|
|
13182
13185
|
return m ? /* @__PURE__ */ i("div", { className: `metakyc-sdk ${n || ""}`, children: /* @__PURE__ */ i(
|
|
13183
13186
|
Ta,
|
|
13184
13187
|
{
|