@vpdev2/metakyc-sdk 1.0.108 → 1.0.110

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/index.js CHANGED
@@ -206,7 +206,13 @@ class pr {
206
206
  "Content-Type": "application/json"
207
207
  }
208
208
  }), this.axiosInstance.interceptors.request.use(
209
- (n) => (n.headers["Abp-TenantId"] = this.config.tenantId.toString(), n.headers.ApiKey = this.config.apiKey, n.headers["X-API-KEY"] = this.config.apiKey, this.config.locale && (n.headers["Accept-Language"] = this.config.locale), n),
209
+ (n) => {
210
+ if (n.headers["Abp-TenantId"] = this.config.tenantId.toString(), this.config.getAccessToken) {
211
+ const a = this.config.getAccessToken();
212
+ a && (n.headers.Authorization = `Bearer ${a}`);
213
+ } else this.config.apiKey && (n.headers.ApiKey = this.config.apiKey, n.headers["X-API-KEY"] = this.config.apiKey);
214
+ return this.config.locale && (n.headers["Accept-Language"] = this.config.locale), n;
215
+ },
210
216
  (n) => Promise.reject(n)
211
217
  ), this.axiosInstance.interceptors.response.use(
212
218
  (n) => n,
@@ -1208,7 +1214,7 @@ class Ar {
1208
1214
  this.events.clear();
1209
1215
  }
1210
1216
  }
1211
- class Pr {
1217
+ class Tr {
1212
1218
  constructor() {
1213
1219
  he(this, "handlers", /* @__PURE__ */ new Map());
1214
1220
  }
@@ -1249,11 +1255,11 @@ class Pr {
1249
1255
  return a.submitData(n);
1250
1256
  }
1251
1257
  }
1252
- class Tr {
1258
+ class Pr {
1253
1259
  constructor(t, n, a, i, o, c, d, y) {
1254
1260
  he(this, "state");
1255
1261
  he(this, "stepRouter");
1256
- this.applicantService = t, this.questionnaireService = n, this.uploadDocumentService = a, this.appropriatenessTestService = i, this.overviewService = o, this.riskScoringService = c, this.investorCategorizationService = y, this.state = new Ar(), this.stepRouter = new Pr(), this.registerStepHandlers();
1262
+ this.applicantService = t, this.questionnaireService = n, this.uploadDocumentService = a, this.appropriatenessTestService = i, this.overviewService = o, this.riskScoringService = c, this.investorCategorizationService = y, this.state = new Ar(), this.stepRouter = new Tr(), this.registerStepHandlers();
1257
1263
  }
1258
1264
  /**
1259
1265
  * Register all step handlers
@@ -1951,15 +1957,15 @@ class Br {
1951
1957
  }
1952
1958
  const Ot = Vt(null), Kn = ({ config: e, children: t }) => {
1953
1959
  const [n, a] = k(null), i = we.useRef(!1), o = we.useRef(!1), c = De(() => {
1954
- const y = new pr(e), p = new mr(y), x = new yr(y), T = new hr(y), v = new fr(y), A = new gr(y), P = new br(y), w = new xr(y), N = new vr(y), z = new kr(y), Q = new Er(y), M = new Br();
1960
+ const y = new pr(e), p = new mr(y), x = new yr(y), P = new hr(y), v = new fr(y), A = new gr(y), T = new br(y), w = new xr(y), N = new vr(y), z = new kr(y), Q = new Er(y), M = new Br();
1955
1961
  return {
1956
1962
  httpClient: y,
1957
1963
  applicantService: p,
1958
1964
  questionnaireService: x,
1959
- uploadDocumentService: T,
1965
+ uploadDocumentService: P,
1960
1966
  appropriatenessTestService: v,
1961
1967
  overviewService: A,
1962
- riskScoringService: P,
1968
+ riskScoringService: T,
1963
1969
  identityService: w,
1964
1970
  baseInformationService: N,
1965
1971
  investorCategorizationService: z,
@@ -1970,7 +1976,7 @@ const Ot = Vt(null), Kn = ({ config: e, children: t }) => {
1970
1976
  config: e,
1971
1977
  ...c,
1972
1978
  currentTheme: n,
1973
- createOrchestrator: () => new Tr(
1979
+ createOrchestrator: () => new Pr(
1974
1980
  c.applicantService,
1975
1981
  c.questionnaireService,
1976
1982
  c.uploadDocumentService,
@@ -2004,7 +2010,7 @@ const Ot = Vt(null), Kn = ({ config: e, children: t }) => {
2004
2010
  c.themeManager.cleanup();
2005
2011
  }), []), /* @__PURE__ */ r(Ot.Provider, { value: d, children: t });
2006
2012
  };
2007
- function Pe() {
2013
+ function Te() {
2008
2014
  const e = Yt(Ot);
2009
2015
  if (!e)
2010
2016
  throw new Error("useMetaKYC must be used within a MetaKYCProvider");
@@ -2094,7 +2100,7 @@ function Gn() {
2094
2100
  Wr(), Kr();
2095
2101
  }
2096
2102
  function qr(e) {
2097
- const { createOrchestrator: t } = Pe(), [n, a] = k(null), [i, o] = k(!1), [c, d] = k(null), y = de(null), p = e || Hr();
2103
+ const { createOrchestrator: t } = Te(), [n, a] = k(null), [i, o] = k(!1), [c, d] = k(null), y = de(null), p = e || Hr();
2098
2104
  ge(() => {
2099
2105
  y.current || (y.current = t());
2100
2106
  }, [t]), ge(() => {
@@ -2108,7 +2114,7 @@ function qr(e) {
2108
2114
  nextWorkflowKey: n.nextWorkflowKey
2109
2115
  }));
2110
2116
  }, [n, p]);
2111
- const x = de(!1), T = de(!1), v = ae(async () => {
2117
+ const x = de(!1), P = de(!1), v = ae(async () => {
2112
2118
  if (!(!p || !y.current)) {
2113
2119
  if (x.current) {
2114
2120
  console.log("[Workflow] Load already in progress, skipping...");
@@ -2117,7 +2123,7 @@ function qr(e) {
2117
2123
  x.current = !0, o(!0), d(null);
2118
2124
  try {
2119
2125
  const M = await y.current.initialize(p);
2120
- a(M), T.current = !0;
2126
+ a(M), P.current = !0;
2121
2127
  } catch (M) {
2122
2128
  d(M);
2123
2129
  } finally {
@@ -2126,7 +2132,7 @@ function qr(e) {
2126
2132
  }
2127
2133
  }, [p]);
2128
2134
  ge(() => {
2129
- p && !T.current && v();
2135
+ p && !P.current && v();
2130
2136
  }, [p, v]);
2131
2137
  const A = ae(async () => {
2132
2138
  if (y.current) {
@@ -2144,7 +2150,7 @@ function qr(e) {
2144
2150
  o(!1), x.current = !1;
2145
2151
  }
2146
2152
  }
2147
- }, []), P = ae(async () => {
2153
+ }, []), T = ae(async () => {
2148
2154
  if (y.current) {
2149
2155
  o(!0), d(null);
2150
2156
  try {
@@ -2197,14 +2203,14 @@ function qr(e) {
2197
2203
  isComplete: (n == null ? void 0 : n.status) === ze.Finished,
2198
2204
  isOnHold: (n == null ? void 0 : n.status) === ze.OnHold,
2199
2205
  refreshProgress: A,
2200
- moveToNext: P,
2206
+ moveToNext: T,
2201
2207
  moveBack: w,
2202
2208
  submitCurrentStep: N,
2203
2209
  orchestrator: y.current
2204
2210
  };
2205
2211
  }
2206
2212
  function Vr(e) {
2207
- const { questionnaireService: t, applicantService: n } = Pe(), [a, i] = k(null), [o, c] = k({}), [d, y] = k(!1), [p, x] = k(!1), [T, v] = k(null), A = de(!1), P = de(null), w = ae(async () => {
2213
+ const { questionnaireService: t, applicantService: n } = Te(), [a, i] = k(null), [o, c] = k({}), [d, y] = k(!1), [p, x] = k(!1), [P, v] = k(null), A = de(!1), T = de(null), w = ae(async () => {
2208
2214
  var z, Q;
2209
2215
  if (e) {
2210
2216
  if (A.current) {
@@ -2228,7 +2234,7 @@ function Vr(e) {
2228
2234
  }
2229
2235
  c(ee);
2230
2236
  }
2231
- P.current = e;
2237
+ T.current = e;
2232
2238
  } catch (M) {
2233
2239
  v(M);
2234
2240
  } finally {
@@ -2237,7 +2243,7 @@ function Vr(e) {
2237
2243
  }
2238
2244
  }, [e, t, n]);
2239
2245
  ge(() => {
2240
- e && P.current !== e && w();
2246
+ e && T.current !== e && w();
2241
2247
  }, [e]);
2242
2248
  const N = ae(
2243
2249
  async (z) => {
@@ -2257,39 +2263,39 @@ function Vr(e) {
2257
2263
  initialAnswers: o,
2258
2264
  isLoading: d,
2259
2265
  isSubmitting: p,
2260
- error: T,
2266
+ error: P,
2261
2267
  load: w,
2262
2268
  submit: N
2263
2269
  };
2264
2270
  }
2265
2271
  function Yr(e) {
2266
- const { uploadDocumentService: t } = Pe(), [n, a] = k(null), [i, o] = k(!1), [c, d] = k(!1), [y, p] = k(0), [x, T] = k(null), v = de(!1), A = de(null), P = ae(async () => {
2272
+ const { uploadDocumentService: t } = Te(), [n, a] = k(null), [i, o] = k(!1), [c, d] = k(!1), [y, p] = k(0), [x, P] = k(null), v = de(!1), A = de(null), T = ae(async () => {
2267
2273
  if (e) {
2268
2274
  if (v.current) {
2269
2275
  console.log("[UploadDocument] Load already in progress, skipping...");
2270
2276
  return;
2271
2277
  }
2272
- v.current = !0, o(!0), T(null);
2278
+ v.current = !0, o(!0), P(null);
2273
2279
  try {
2274
2280
  const N = await t.getUploadDocument(e);
2275
2281
  a(N), A.current = e;
2276
2282
  } catch (N) {
2277
- T(N);
2283
+ P(N);
2278
2284
  } finally {
2279
2285
  o(!1), v.current = !1;
2280
2286
  }
2281
2287
  }
2282
2288
  }, [e, t]);
2283
2289
  ge(() => {
2284
- e && A.current !== e && P();
2290
+ e && A.current !== e && T();
2285
2291
  }, [e]);
2286
2292
  const w = ae(
2287
2293
  async (N) => {
2288
- d(!0), p(0), T(null);
2294
+ d(!0), p(0), P(null);
2289
2295
  try {
2290
2296
  await t.fillUploadDocument(N), p(100);
2291
2297
  } catch (z) {
2292
- throw T(z), z;
2298
+ throw P(z), z;
2293
2299
  } finally {
2294
2300
  d(!1);
2295
2301
  }
@@ -2302,12 +2308,12 @@ function Yr(e) {
2302
2308
  isSubmitting: c,
2303
2309
  uploadProgress: y,
2304
2310
  error: x,
2305
- load: P,
2311
+ load: T,
2306
2312
  submit: w
2307
2313
  };
2308
2314
  }
2309
2315
  function Jn(e) {
2310
- const { appropriatenessTestService: t } = Pe(), [n, a] = k(null), [i, o] = k(!1), [c, d] = k(!1), [y, p] = k(null), [x, T] = k(null), v = de(!1), A = de(null), P = ae(async () => {
2316
+ const { appropriatenessTestService: t } = Te(), [n, a] = k(null), [i, o] = k(!1), [c, d] = k(!1), [y, p] = k(null), [x, P] = k(null), v = de(!1), A = de(null), T = ae(async () => {
2311
2317
  if (e) {
2312
2318
  if (v.current) {
2313
2319
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
@@ -2325,14 +2331,14 @@ function Jn(e) {
2325
2331
  }
2326
2332
  }, [e, t]);
2327
2333
  ge(() => {
2328
- e && A.current !== e && P();
2334
+ e && A.current !== e && T();
2329
2335
  }, [e]);
2330
2336
  const w = ae(
2331
2337
  async (N) => {
2332
2338
  d(!0), p(null);
2333
2339
  try {
2334
2340
  const z = await t.fillAppropriatenessTest(N);
2335
- return T(z), z;
2341
+ return P(z), z;
2336
2342
  } catch (z) {
2337
2343
  throw p(z), z;
2338
2344
  } finally {
@@ -2347,12 +2353,12 @@ function Jn(e) {
2347
2353
  isLoading: i,
2348
2354
  isSubmitting: c,
2349
2355
  error: y,
2350
- load: P,
2356
+ load: T,
2351
2357
  submit: w
2352
2358
  };
2353
2359
  }
2354
2360
  function Qr(e) {
2355
- const { overviewService: t } = Pe(), [n, a] = k(null), [i, o] = k(!1), [c, d] = k(!1), [y, p] = k(null), x = de(!1), T = de(null), v = ae(async () => {
2361
+ const { overviewService: t } = Te(), [n, a] = k(null), [i, o] = k(!1), [c, d] = k(!1), [y, p] = k(null), x = de(!1), P = de(null), v = ae(async () => {
2356
2362
  if (e) {
2357
2363
  if (x.current) {
2358
2364
  console.log("[Overview] Load already in progress, skipping...");
@@ -2360,25 +2366,25 @@ function Qr(e) {
2360
2366
  }
2361
2367
  x.current = !0, o(!0), p(null);
2362
2368
  try {
2363
- const P = await t.getOverviewData(e);
2364
- a(P), T.current = e;
2365
- } catch (P) {
2366
- p(P);
2369
+ const T = await t.getOverviewData(e);
2370
+ a(T), P.current = e;
2371
+ } catch (T) {
2372
+ p(T);
2367
2373
  } finally {
2368
2374
  o(!1), x.current = !1;
2369
2375
  }
2370
2376
  }
2371
2377
  }, [e, t]);
2372
2378
  ge(() => {
2373
- e && T.current !== e && v();
2379
+ e && P.current !== e && v();
2374
2380
  }, [e]);
2375
2381
  const A = ae(async () => {
2376
2382
  if (e) {
2377
2383
  d(!0), p(null);
2378
2384
  try {
2379
2385
  await t.passOverview(e);
2380
- } catch (P) {
2381
- throw p(P), P;
2386
+ } catch (T) {
2387
+ throw p(T), T;
2382
2388
  } finally {
2383
2389
  d(!1);
2384
2390
  }
@@ -2394,7 +2400,7 @@ function Qr(e) {
2394
2400
  };
2395
2401
  }
2396
2402
  function Gr(e) {
2397
- const { identityService: t } = Pe(), [n, a] = k(
2403
+ const { identityService: t } = Te(), [n, a] = k(
2398
2404
  null
2399
2405
  ), [i, o] = k(!1), [c, d] = k(null), y = de(!1), p = ae(
2400
2406
  async (v, A) => {
@@ -2405,18 +2411,18 @@ function Gr(e) {
2405
2411
  }
2406
2412
  y.current = !0, o(!0), d(null);
2407
2413
  try {
2408
- const P = {
2414
+ const T = {
2409
2415
  applicantId: e,
2410
2416
  restart: !1,
2411
2417
  redirectUrl: v || "",
2412
2418
  ttl: A || 604800
2413
2419
  // Default: 7 days
2414
2420
  };
2415
- console.log("Identity request input:", P);
2416
- const w = await t.identityRequest(P);
2421
+ console.log("Identity request input:", T);
2422
+ const w = await t.identityRequest(T);
2417
2423
  return console.log("Identity request result:", w), a(w), w;
2418
- } catch (P) {
2419
- throw d(P), P;
2424
+ } catch (T) {
2425
+ throw d(T), T;
2420
2426
  } finally {
2421
2427
  o(!1), y.current = !1;
2422
2428
  }
@@ -2428,22 +2434,22 @@ function Gr(e) {
2428
2434
  if (e) {
2429
2435
  o(!0), d(null);
2430
2436
  try {
2431
- const P = {
2437
+ const T = {
2432
2438
  applicantId: e,
2433
2439
  restart: !1,
2434
2440
  redirectUrl: v,
2435
2441
  ttl: A
2436
- }, w = await t.identityCompanyRequest(P);
2442
+ }, w = await t.identityCompanyRequest(T);
2437
2443
  return a(w), w;
2438
- } catch (P) {
2439
- throw d(P), P;
2444
+ } catch (T) {
2445
+ throw d(T), T;
2440
2446
  } finally {
2441
2447
  o(!1);
2442
2448
  }
2443
2449
  }
2444
2450
  },
2445
2451
  [e, t]
2446
- ), T = ae(async () => {
2452
+ ), P = ae(async () => {
2447
2453
  if (e) {
2448
2454
  if (y.current) {
2449
2455
  console.log("[Identity] Restart already in progress, skipping...");
@@ -2476,11 +2482,11 @@ function Gr(e) {
2476
2482
  error: c,
2477
2483
  requestIdentity: p,
2478
2484
  requestCompanyIdentity: x,
2479
- restartIdentity: T
2485
+ restartIdentity: P
2480
2486
  };
2481
2487
  }
2482
2488
  function Jr(e) {
2483
- const { riskScoringService: t, applicantService: n } = Pe(), [a, i] = k(null), [o, c] = k({}), [d, y] = k(!1), [p, x] = k(!1), [T, v] = k(null), [A, P] = k(null), w = de(!1), N = de(null), z = ae(async () => {
2489
+ const { riskScoringService: t, applicantService: n } = Te(), [a, i] = k(null), [o, c] = k({}), [d, y] = k(!1), [p, x] = k(!1), [P, v] = k(null), [A, T] = k(null), w = de(!1), N = de(null), z = ae(async () => {
2484
2490
  var M;
2485
2491
  if (e) {
2486
2492
  if (w.current) {
@@ -2520,7 +2526,7 @@ function Jr(e) {
2520
2526
  x(!0), v(null);
2521
2527
  try {
2522
2528
  const j = await t.submitRiskScoring(M);
2523
- return P(j), j;
2529
+ return T(j), j;
2524
2530
  } catch (j) {
2525
2531
  throw v(j), j;
2526
2532
  } finally {
@@ -2535,23 +2541,23 @@ function Jr(e) {
2535
2541
  result: A,
2536
2542
  isLoading: d,
2537
2543
  isSubmitting: p,
2538
- error: T,
2544
+ error: P,
2539
2545
  load: z,
2540
2546
  submit: Q
2541
2547
  };
2542
2548
  }
2543
2549
  function zt() {
2544
- const { applicantService: e, config: t } = Pe(), [n, a] = k(!1), [i, o] = k(null), c = de(!1), d = de(!1), y = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(A) {
2545
- const P = Math.random() * 16 | 0;
2546
- return (A === "x" ? P : P & 3 | 8).toString(16);
2550
+ const { applicantService: e, config: t } = Te(), [n, a] = k(!1), [i, o] = k(null), c = de(!1), d = de(!1), y = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(A) {
2551
+ const T = Math.random() * 16 | 0;
2552
+ return (A === "x" ? T : T & 3 | 8).toString(16);
2547
2553
  }), p = ae(
2548
2554
  async (A) => {
2549
- var P;
2555
+ var T;
2550
2556
  if (c.current)
2551
2557
  throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
2552
2558
  c.current = !0, a(!0), o(null);
2553
2559
  try {
2554
- if (A.applicantAdditionalDatas || (A.applicantAdditionalDatas = []), (P = t.identityProviders) != null && P.sardinai) {
2560
+ if (A.applicantAdditionalDatas || (A.applicantAdditionalDatas = []), (T = t.identityProviders) != null && T.sardinai) {
2555
2561
  const N = y();
2556
2562
  console.log("[SardinAI] Generated session key:", N), A.applicantAdditionalDatas.push({
2557
2563
  paramName: "sessionKey",
@@ -2571,22 +2577,22 @@ function zt() {
2571
2577
  a(!0), o(null);
2572
2578
  try {
2573
2579
  return await e.createCompanyApplicant(A);
2574
- } catch (P) {
2575
- throw o(P), P;
2580
+ } catch (T) {
2581
+ throw o(T), T;
2576
2582
  } finally {
2577
2583
  a(!1);
2578
2584
  }
2579
2585
  },
2580
2586
  [e]
2581
- ), T = ae(
2587
+ ), P = ae(
2582
2588
  async (A) => {
2583
2589
  if (d.current)
2584
2590
  throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
2585
2591
  d.current = !0, a(!0), o(null);
2586
2592
  try {
2587
2593
  return await e.getApplicantData(A);
2588
- } catch (P) {
2589
- throw o(P), P;
2594
+ } catch (T) {
2595
+ throw o(T), T;
2590
2596
  } finally {
2591
2597
  a(!1), d.current = !1;
2592
2598
  }
@@ -2597,8 +2603,8 @@ function zt() {
2597
2603
  a(!0), o(null);
2598
2604
  try {
2599
2605
  await e.stopProgress(A);
2600
- } catch (P) {
2601
- throw o(P), P;
2606
+ } catch (T) {
2607
+ throw o(T), T;
2602
2608
  } finally {
2603
2609
  a(!1);
2604
2610
  }
@@ -2610,7 +2616,7 @@ function zt() {
2610
2616
  error: i,
2611
2617
  createApplicant: p,
2612
2618
  createCompanyApplicant: x,
2613
- getApplicantData: T,
2619
+ getApplicantData: P,
2614
2620
  stopProgress: v
2615
2621
  };
2616
2622
  }
@@ -2918,7 +2924,7 @@ const Et = 280, en = ({
2918
2924
  readOnly: c = !1,
2919
2925
  required: d = !1
2920
2926
  }) => {
2921
- const y = o || c, [p, x] = k(!1), [T, v] = k(""), [A, P] = k(null), [w, N] = k({
2927
+ const y = o || c, [p, x] = k(!1), [P, v] = k(""), [A, T] = k(null), [w, N] = k({
2922
2928
  bg: "#ffffff",
2923
2929
  borderColor: "#d1d5db",
2924
2930
  textPrimary: "#111827",
@@ -2945,7 +2951,7 @@ const Et = 280, en = ({
2945
2951
  if (y) return;
2946
2952
  K();
2947
2953
  const F = j();
2948
- F && P(F), x(!0);
2954
+ F && T(F), x(!0);
2949
2955
  }, [y, j, K]), E = ae(() => {
2950
2956
  x(!1), v("");
2951
2957
  }, []);
@@ -2961,14 +2967,14 @@ const Et = 280, en = ({
2961
2967
  if (!p) return;
2962
2968
  const F = () => {
2963
2969
  const U = j();
2964
- U && P(U);
2970
+ U && T(U);
2965
2971
  };
2966
2972
  return window.addEventListener("scroll", F, !0), window.addEventListener("resize", F), () => {
2967
2973
  window.removeEventListener("scroll", F, !0), window.removeEventListener("resize", F);
2968
2974
  };
2969
2975
  }, [p, j]);
2970
2976
  const b = a.filter(
2971
- (F) => F.label.toLowerCase().includes(T.toLowerCase())
2977
+ (F) => F.label.toLowerCase().includes(P.toLowerCase())
2972
2978
  ), $ = (F) => {
2973
2979
  y || n(t.includes(F) ? t.filter((U) => U !== F) : [...t, F]);
2974
2980
  }, V = (F, U) => {
@@ -2999,7 +3005,7 @@ const Et = 280, en = ({
2999
3005
  "input",
3000
3006
  {
3001
3007
  type: "text",
3002
- value: T,
3008
+ value: P,
3003
3009
  onChange: (F) => v(F.target.value),
3004
3010
  placeholder: "Search...",
3005
3011
  autoFocus: !0,
@@ -3189,7 +3195,7 @@ const Et = 280, en = ({
3189
3195
  className: x
3190
3196
  }) => {
3191
3197
  var fe;
3192
- const T = d || y, [v, A] = k(!1), [P, w] = k(""), [N, z] = k(null), [Q, M] = k({
3198
+ const P = d || y, [v, A] = k(!1), [T, w] = k(""), [N, z] = k(null), [Q, M] = k({
3193
3199
  bg: "#ffffff",
3194
3200
  border: "#d1d5db",
3195
3201
  text: "#111827",
@@ -3218,11 +3224,11 @@ const Et = 280, en = ({
3218
3224
  openUp: ye
3219
3225
  };
3220
3226
  }, []), V = ae(() => {
3221
- if (T) return;
3227
+ if (P) return;
3222
3228
  j();
3223
3229
  const I = $();
3224
3230
  I && z(I), A(!0);
3225
- }, [T, $, j]), G = ae(() => {
3231
+ }, [P, $, j]), G = ae(() => {
3226
3232
  A(!1), w("");
3227
3233
  }, []), _ = () => v ? G() : V();
3228
3234
  ge(() => {
@@ -3249,9 +3255,9 @@ const Et = 280, en = ({
3249
3255
  }, 0);
3250
3256
  }, [v]);
3251
3257
  const J = a.filter(
3252
- (I) => I.label.toLowerCase().includes(P.toLowerCase()) || I.value.toLowerCase().includes(P.toLowerCase())
3258
+ (I) => I.label.toLowerCase().includes(T.toLowerCase()) || I.value.toLowerCase().includes(T.toLowerCase())
3253
3259
  ), se = (fe = a.find((I) => I.value === o)) == null ? void 0 : fe.label, Y = (I, te) => {
3254
- T || te || (c(I), G());
3260
+ P || te || (c(I), G());
3255
3261
  }, { bg: ve, border: ue, text: me, textSecondary: ke, primary: F, primaryLight: U, hoverBg: B } = Q, H = v && N && /* @__PURE__ */ s(
3256
3262
  "div",
3257
3263
  {
@@ -3276,7 +3282,7 @@ const Et = 280, en = ({
3276
3282
  {
3277
3283
  ref: b,
3278
3284
  type: "text",
3279
- value: P,
3285
+ value: T,
3280
3286
  onChange: (I) => w(I.target.value),
3281
3287
  placeholder: "Search...",
3282
3288
  onClick: (I) => I.stopPropagation(),
@@ -3366,7 +3372,7 @@ const Et = 280, en = ({
3366
3372
  {
3367
3373
  ref: ee,
3368
3374
  role: "button",
3369
- tabIndex: T ? -1 : 0,
3375
+ tabIndex: P ? -1 : 0,
3370
3376
  onClick: _,
3371
3377
  onKeyDown: (I) => {
3372
3378
  (I.key === "Enter" || I.key === " ") && (I.preventDefault(), _()), I.key === "Escape" && G();
@@ -3376,7 +3382,7 @@ const Et = 280, en = ({
3376
3382
  "w-full px-3 py-2 rounded-lg border text-sm transition-colors text-left",
3377
3383
  "flex items-center justify-between gap-2",
3378
3384
  "focus:outline-none",
3379
- T ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
3385
+ P ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
3380
3386
  ),
3381
3387
  style: {
3382
3388
  backgroundColor: "var(--metakyc-input-bg, #ffffff)",
@@ -3423,7 +3429,7 @@ const rn = ({
3423
3429
  value: y = [],
3424
3430
  className: p
3425
3431
  }) => {
3426
- const [x, T] = k(!1), [v, A] = k(null), P = de(null), w = ae((E) => {
3432
+ const [x, P] = k(!1), [v, A] = k(null), T = de(null), w = ae((E) => {
3427
3433
  if (!E) return;
3428
3434
  A(null);
3429
3435
  const b = Array.from(E);
@@ -3433,14 +3439,14 @@ const rn = ({
3433
3439
  }
3434
3440
  d == null || d(i ? [...y, ...b] : [b[0]]);
3435
3441
  }, [o, i, d, y]), N = ae((E) => {
3436
- E.preventDefault(), E.stopPropagation(), T(!0);
3442
+ E.preventDefault(), E.stopPropagation(), P(!0);
3437
3443
  }, []), z = ae((E) => {
3438
- E.preventDefault(), E.stopPropagation(), T(!1);
3444
+ E.preventDefault(), E.stopPropagation(), P(!1);
3439
3445
  }, []), Q = ae((E) => {
3440
- E.preventDefault(), E.stopPropagation(), T(!1), w(E.dataTransfer.files);
3446
+ E.preventDefault(), E.stopPropagation(), P(!1), w(E.dataTransfer.files);
3441
3447
  }, [w]), M = () => {
3442
3448
  var E;
3443
- (E = P.current) == null || E.click();
3449
+ (E = T.current) == null || E.click();
3444
3450
  }, j = (E) => {
3445
3451
  A(null);
3446
3452
  const b = y.filter(($, V) => V !== E);
@@ -3486,7 +3492,7 @@ const rn = ({
3486
3492
  /* @__PURE__ */ r(
3487
3493
  "input",
3488
3494
  {
3489
- ref: P,
3495
+ ref: T,
3490
3496
  type: "file",
3491
3497
  style: { display: "none" },
3492
3498
  accept: a,
@@ -3877,7 +3883,7 @@ const yn = ({
3877
3883
  onComplete: t,
3878
3884
  onBack: n
3879
3885
  }) => {
3880
- const { questionnaire: a, initialAnswers: i, isLoading: o, isSubmitting: c, error: d, submit: y } = Vr(e), [p, x] = k({}), [T, v] = k({}), [A, P] = k(0);
3886
+ const { questionnaire: a, initialAnswers: i, isLoading: o, isSubmitting: c, error: d, submit: y } = Vr(e), [p, x] = k({}), [P, v] = k({}), [A, T] = k(0);
3881
3887
  we.useEffect(() => {
3882
3888
  i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && x(i);
3883
3889
  }, [i]);
@@ -3897,9 +3903,9 @@ const yn = ({
3897
3903
  }
3898
3904
  return v((b) => ({ ...b, ...E })), Object.keys(E).length === 0;
3899
3905
  }, [z, p]), j = () => {
3900
- M() && P((E) => E + 1);
3906
+ M() && T((E) => E + 1);
3901
3907
  }, K = () => {
3902
- A > 0 ? P((E) => E - 1) : n == null || n();
3908
+ A > 0 ? T((E) => E - 1) : n == null || n();
3903
3909
  }, ee = async () => {
3904
3910
  if (!(!M() || !a))
3905
3911
  try {
@@ -3951,7 +3957,7 @@ const yn = ({
3951
3957
  {
3952
3958
  question: E,
3953
3959
  value: p[E.id] ?? [],
3954
- error: T[E.id],
3960
+ error: P[E.id],
3955
3961
  onChange: (b) => Q(E.id, b)
3956
3962
  },
3957
3963
  E.id
@@ -4114,7 +4120,7 @@ const gn = ({
4114
4120
  onComplete: t,
4115
4121
  onBack: n
4116
4122
  }) => {
4117
- const { uploadDocument: a, isLoading: i, isSubmitting: o, error: c, submit: d } = Yr(e), [y, p] = k({}), [x, T] = k(null), [v, A] = k(0), [P, w] = k({}), N = De(
4123
+ const { uploadDocument: a, isLoading: i, isSubmitting: o, error: c, submit: d } = Yr(e), [y, p] = k({}), [x, P] = k(null), [v, A] = k(0), [T, w] = k({}), N = De(
4118
4124
  () => a ? fn(a.uploadDocumentFiles) : [],
4119
4125
  [a]
4120
4126
  ), z = N[v] ?? [], Q = v === N.length - 1, M = N.length, j = ae(() => {
@@ -4128,7 +4134,7 @@ const gn = ({
4128
4134
  v > 0 ? (A((b) => b - 1), w({})) : n == null || n();
4129
4135
  }, E = async () => {
4130
4136
  if (!(!j() || !a)) {
4131
- T(null);
4137
+ P(null);
4132
4138
  try {
4133
4139
  const b = await Promise.all(
4134
4140
  a.uploadDocumentFiles.map(async (V) => {
@@ -4150,7 +4156,7 @@ const gn = ({
4150
4156
  };
4151
4157
  await d($), t == null || t();
4152
4158
  } catch (b) {
4153
- T((b == null ? void 0 : b.message) || "Failed to submit documents. Please try again.");
4159
+ P((b == null ? void 0 : b.message) || "Failed to submit documents. Please try again.");
4154
4160
  }
4155
4161
  }
4156
4162
  };
@@ -4265,10 +4271,10 @@ const gn = ({
4265
4271
  multiple: b.multipleFile,
4266
4272
  maxSize: b.maxEachFileSizeByte,
4267
4273
  required: b.isRequired,
4268
- error: P[b.id],
4274
+ error: T[b.id],
4269
4275
  value: y[b.id] || [],
4270
4276
  onChange: ($) => {
4271
- T(null), w((V) => {
4277
+ P(null), w((V) => {
4272
4278
  const G = { ...V };
4273
4279
  return delete G[b.id], G;
4274
4280
  }), p((V) => ({ ...V, [b.id]: $ }));
@@ -4436,9 +4442,9 @@ const Nn = ({
4436
4442
  onComplete: t,
4437
4443
  onBack: n
4438
4444
  }) => {
4439
- const { config: a } = Pe(), i = a.locale ?? "en", { criteria: o, initialAnswers: c, isLoading: d, isSubmitting: y, error: p, submit: x } = Jr(e), [T, v] = k({}), [A, P] = k({}), [w, N] = k(0), [z, Q] = k(!1);
4445
+ const { config: a } = Te(), i = a.locale ?? "en", { criteria: o, initialAnswers: c, isLoading: d, isSubmitting: y, error: p, submit: x } = Jr(e), [P, v] = k({}), [A, T] = k({}), [w, N] = k(0), [z, Q] = k(!1);
4440
4446
  we.useEffect(() => {
4441
- c && Object.keys(c).length > 0 && Object.keys(T).length === 0 && v(c);
4447
+ c && Object.keys(c).length > 0 && Object.keys(P).length === 0 && v(c);
4442
4448
  }, [c]);
4443
4449
  const M = De(
4444
4450
  () => o && o.length > 0 ? Sn(o) : [],
@@ -4448,18 +4454,18 @@ const Nn = ({
4448
4454
  !d && o && o.length === 0 && !z && !y && (Q(!0), x({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
4449
4455
  }, [d, o, z, y, x, e, t]);
4450
4456
  const ee = ae((G, _) => {
4451
- v((J) => ({ ...J, [G]: _ })), P((J) => {
4457
+ v((J) => ({ ...J, [G]: _ })), T((J) => {
4452
4458
  const se = { ...J };
4453
4459
  return delete se[G], se;
4454
4460
  });
4455
4461
  }, []), E = ae(() => {
4456
4462
  const G = {};
4457
4463
  for (const { criterion: _ } of K) {
4458
- const J = wn(_, T[_.id] ?? []);
4464
+ const J = wn(_, P[_.id] ?? []);
4459
4465
  J && (G[_.id] = J);
4460
4466
  }
4461
- return P((_) => ({ ..._, ...G })), Object.keys(G).length === 0;
4462
- }, [K, T]), b = () => {
4467
+ return T((_) => ({ ..._, ...G })), Object.keys(G).length === 0;
4468
+ }, [K, P]), b = () => {
4463
4469
  E() && N((G) => G + 1);
4464
4470
  }, $ = () => {
4465
4471
  w > 0 ? N((G) => G - 1) : n == null || n();
@@ -4467,7 +4473,7 @@ const Nn = ({
4467
4473
  if (!(!E() || !o))
4468
4474
  try {
4469
4475
  const G = o.map((J) => {
4470
- const se = (T[J.id] ?? []).filter((Y) => Y && Y.trim());
4476
+ const se = (P[J.id] ?? []).filter((Y) => Y && Y.trim());
4471
4477
  return se.length > 0 ? { riskCriteriaId: J.id, values: se } : null;
4472
4478
  }).filter((J) => J !== null);
4473
4479
  await x({ applicantId: e, criteriaValueInputs: G }), t == null || t();
@@ -4513,7 +4519,7 @@ const Nn = ({
4513
4519
  Rn,
4514
4520
  {
4515
4521
  criterion: G,
4516
- value: T[G.id] ?? [],
4522
+ value: P[G.id] ?? [],
4517
4523
  error: A[G.id],
4518
4524
  locale: i,
4519
4525
  onChange: (_) => ee(G.id, _)
@@ -4623,7 +4629,7 @@ const Nn = ({
4623
4629
  type: "checkbox",
4624
4630
  checked: t.includes(p),
4625
4631
  onChange: (x) => {
4626
- x.target.checked ? i([...t, p]) : i(t.filter((T) => T !== p));
4632
+ x.target.checked ? i([...t, p]) : i(t.filter((P) => P !== p));
4627
4633
  },
4628
4634
  className: "metakyc-option-input",
4629
4635
  style: {
@@ -4671,9 +4677,9 @@ const Nn = ({
4671
4677
  onComplete: t,
4672
4678
  onBack: n
4673
4679
  }) => {
4674
- const { investorCategorizationService: a } = Pe(), [i, o] = k(null), [c, d] = k(!1), [y, p] = k(null);
4675
- return /* @__PURE__ */ r("form", { onSubmit: async (T) => {
4676
- if (T.preventDefault(), i === null) {
4680
+ const { investorCategorizationService: a } = Te(), [i, o] = k(null), [c, d] = k(!1), [y, p] = k(null);
4681
+ return /* @__PURE__ */ r("form", { onSubmit: async (P) => {
4682
+ if (P.preventDefault(), i === null) {
4677
4683
  p("Please select an investor type");
4678
4684
  return;
4679
4685
  }
@@ -4808,7 +4814,7 @@ const Nn = ({
4808
4814
  ] })
4809
4815
  ] }) });
4810
4816
  };
4811
- function Pt(e) {
4817
+ function Tt(e) {
4812
4818
  const t = e.split(":").map(Number);
4813
4819
  return t.length === 3 ? t[0] * 3600 + t[1] * 60 + t[2] : 0;
4814
4820
  }
@@ -4821,29 +4827,29 @@ const En = ({
4821
4827
  onComplete: t,
4822
4828
  onBack: n
4823
4829
  }) => {
4824
- const { appropriatenessTestService: a } = Pe(), [i, o] = k(null), [c, d] = k(!0), [y, p] = k(!1), [x, T] = k(null), [v, A] = k({}), [P, w] = k(0), [N, z] = k(!1), [Q, M] = k(!1), [j, K] = k(0), [ee, E] = k(0), [b, $] = k(null);
4830
+ const { appropriatenessTestService: a } = Te(), [i, o] = k(null), [c, d] = k(!0), [y, p] = k(!1), [x, P] = k(null), [v, A] = k({}), [T, w] = k(0), [N, z] = k(!1), [Q, M] = k(!1), [j, K] = k(0), [ee, E] = k(0), [b, $] = k(null);
4825
4831
  ge(() => {
4826
4832
  (async () => {
4827
4833
  try {
4828
- d(!0), T(null);
4834
+ d(!0), P(null);
4829
4835
  const B = await a.getAppropriatenessTest(e);
4830
4836
  if (o(B), B.waitTimeSpanForNextTry && B.waitTimeSpanForNextTry !== "00:00:00") {
4831
- const H = Pt(B.waitTimeSpanForNextTry);
4837
+ const H = Tt(B.waitTimeSpanForNextTry);
4832
4838
  H > 0 && K(H);
4833
4839
  }
4834
4840
  } catch (B) {
4835
- T(B.message || "Failed to load appropriateness test");
4841
+ P(B.message || "Failed to load appropriateness test");
4836
4842
  } finally {
4837
4843
  d(!1);
4838
4844
  }
4839
4845
  })();
4840
4846
  }, [e, a]), ge(() => {
4841
- if (!N || P <= 0) return;
4847
+ if (!N || T <= 0) return;
4842
4848
  const B = setInterval(() => {
4843
4849
  w((H) => H <= 1 ? (M(!0), 0) : H - 1);
4844
4850
  }, 1e3);
4845
4851
  return () => clearInterval(B);
4846
- }, [N, P]), ge(() => {
4852
+ }, [N, T]), ge(() => {
4847
4853
  if (j <= 0) return;
4848
4854
  const B = setInterval(() => {
4849
4855
  K((H) => H <= 1 ? 0 : H - 1);
@@ -4853,14 +4859,14 @@ const En = ({
4853
4859
  Q && !y && J();
4854
4860
  }, [Q]);
4855
4861
  const V = () => {
4856
- i && (z(!0), w(i.testDurationSec), E(0), A({}), T(null));
4862
+ i && (z(!0), w(i.testDurationSec), E(0), A({}), P(null));
4857
4863
  }, G = (B, H) => {
4858
4864
  A((fe) => ({ ...fe, [B]: H }));
4859
4865
  }, _ = ae(async () => {
4860
4866
  try {
4861
4867
  const B = await a.getAppropriatenessTest(e);
4862
4868
  if (o(B), B.waitTimeSpanForNextTry && B.waitTimeSpanForNextTry !== "00:00:00") {
4863
- const H = Pt(B.waitTimeSpanForNextTry);
4869
+ const H = Tt(B.waitTimeSpanForNextTry);
4864
4870
  H > 0 && K(H);
4865
4871
  }
4866
4872
  } catch {
@@ -4870,11 +4876,11 @@ const En = ({
4870
4876
  if (!Q) {
4871
4877
  const H = i.appropriatenessQuestions.length - Object.keys(v).length;
4872
4878
  if (H > 0) {
4873
- T(`Please answer all questions. ${H} remaining.`);
4879
+ P(`Please answer all questions. ${H} remaining.`);
4874
4880
  return;
4875
4881
  }
4876
4882
  }
4877
- p(!0), T(null);
4883
+ p(!0), P(null);
4878
4884
  try {
4879
4885
  const H = i.appropriatenessQuestions.map(
4880
4886
  (I) => ({ appropriatenessQuestionId: I.id, value: v[I.id] || "" })
@@ -4893,7 +4899,7 @@ const En = ({
4893
4899
  throw I;
4894
4900
  }
4895
4901
  } catch (H) {
4896
- T(H.message || "Failed to submit test. Please try again."), se();
4902
+ P(H.message || "Failed to submit test. Please try again."), se();
4897
4903
  } finally {
4898
4904
  p(!1);
4899
4905
  }
@@ -4944,7 +4950,7 @@ const En = ({
4944
4950
  ] });
4945
4951
  if (b) {
4946
4952
  const B = () => {
4947
- $(null), se(), T(null);
4953
+ $(null), se(), P(null);
4948
4954
  };
4949
4955
  return /* @__PURE__ */ s(re, { children: [
4950
4956
  /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ s("div", { style: {
@@ -5090,7 +5096,7 @@ const En = ({
5090
5096
  /* @__PURE__ */ r(Z, { type: "button", onClick: V, disabled: Y <= 0, children: "Start Test" })
5091
5097
  ] }) })
5092
5098
  ] });
5093
- const me = i.appropriatenessQuestions[ee], ke = ee === ve - 1, F = ue === ve, U = P <= 60;
5099
+ const me = i.appropriatenessQuestions[ee], ke = ee === ve - 1, F = ue === ve, U = T <= 60;
5094
5100
  return /* @__PURE__ */ s(re, { children: [
5095
5101
  /* @__PURE__ */ s(Se, { children: [
5096
5102
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
@@ -5135,7 +5141,7 @@ const En = ({
5135
5141
  fontVariantNumeric: "tabular-nums",
5136
5142
  color: U ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-text-primary, #111827)",
5137
5143
  transition: "color 0.3s ease"
5138
- }, children: vt(P) })
5144
+ }, children: vt(T) })
5139
5145
  ] })
5140
5146
  ] }),
5141
5147
  /* @__PURE__ */ s("div", { style: { marginTop: "12px" }, children: [
@@ -5397,13 +5403,13 @@ const En = ({
5397
5403
  o
5398
5404
  );
5399
5405
  }) })
5400
- ] }), Pn = ({
5406
+ ] }), Tn = ({
5401
5407
  applicantId: e,
5402
5408
  onComplete: t,
5403
5409
  onBack: n
5404
5410
  }) => {
5405
5411
  var Ze, je, it, Ye;
5406
- const { applicantService: a, baseInformationService: i, identityService: o, config: c, currentTheme: d } = Pe(), { identityData: y, provider: p, token: x, isLoading: T, error: v, requestIdentity: A, restartIdentity: P } = Gr(e), [w, N] = k(null), [z, Q] = k(null), [M, j] = k([]), [K, ee] = k([]), [E, b] = k(!0), [$, V] = k(!1), [G, _] = k(null), [J, se] = k(!1), Y = we.useRef(!1), [ve, ue] = k({}), [me, ke] = k({}), F = d != null && d.reviewPageFields && d.reviewPageFields.length > 0 ? d.reviewPageFields[0] : null, U = !!(d != null && d.reviewPageDisabled), B = de(!1);
5412
+ const { applicantService: a, baseInformationService: i, identityService: o, config: c, currentTheme: d } = Te(), { identityData: y, provider: p, token: x, isLoading: P, error: v, requestIdentity: A, restartIdentity: T } = Gr(e), [w, N] = k(null), [z, Q] = k(null), [M, j] = k([]), [K, ee] = k([]), [E, b] = k(!0), [$, V] = k(!1), [G, _] = k(null), [J, se] = k(!1), Y = we.useRef(!1), [ve, ue] = k({}), [me, ke] = k({}), F = d != null && d.reviewPageFields && d.reviewPageFields.length > 0 ? d.reviewPageFields[0] : null, U = !!(d != null && d.reviewPageDisabled), B = de(!1);
5407
5413
  B.current = U;
5408
5414
  const H = Gt({
5409
5415
  defaultValues: {
@@ -5589,12 +5595,12 @@ const En = ({
5589
5595
  }
5590
5596
  }, te = async () => {
5591
5597
  try {
5592
- _(null), se(!1), N(null), console.log("[Identity] Restarting verification..."), await P(), V(!0);
5598
+ _(null), se(!1), N(null), console.log("[Identity] Restarting verification..."), await T(), V(!0);
5593
5599
  } catch (h) {
5594
5600
  console.error("Error restarting identity verification:", h), _(h.message || "Failed to restart verification");
5595
5601
  }
5596
5602
  };
5597
- if (E || T)
5603
+ if (E || P)
5598
5604
  return /* @__PURE__ */ r(re, { children: /* @__PURE__ */ s(ne, { children: [
5599
5605
  /* @__PURE__ */ r(Me, { className: "my-8" }),
5600
5606
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
@@ -5643,7 +5649,7 @@ const En = ({
5643
5649
  ] }),
5644
5650
  /* @__PURE__ */ s(Ce, { className: "flex justify-between", children: [
5645
5651
  n && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: n, children: "Back" }),
5646
- /* @__PURE__ */ r(Z, { type: "button", onClick: te, disabled: T, children: T ? "Restarting..." : "Restart Verification" })
5652
+ /* @__PURE__ */ r(Z, { type: "button", onClick: te, disabled: P, children: P ? "Restarting..." : "Restart Verification" })
5647
5653
  ] })
5648
5654
  ] });
5649
5655
  if ($ && y) {
@@ -5679,7 +5685,7 @@ const En = ({
5679
5685
  {
5680
5686
  type: "button",
5681
5687
  onClick: te,
5682
- disabled: T,
5688
+ disabled: P,
5683
5689
  style: {
5684
5690
  padding: "6px 14px",
5685
5691
  fontSize: "13px",
@@ -5688,10 +5694,10 @@ const En = ({
5688
5694
  border: "1px solid var(--metakyc-border, #d1d5db)",
5689
5695
  background: "var(--metakyc-background, #ffffff)",
5690
5696
  color: "var(--metakyc-text-primary, #111827)",
5691
- cursor: T ? "not-allowed" : "pointer",
5692
- opacity: T ? 0.5 : 1
5697
+ cursor: P ? "not-allowed" : "pointer",
5698
+ opacity: P ? 0.5 : 1
5693
5699
  },
5694
- children: T ? "Restarting…" : "Restart"
5700
+ children: P ? "Restarting…" : "Restart"
5695
5701
  }
5696
5702
  )
5697
5703
  ] }),
@@ -5724,7 +5730,7 @@ const En = ({
5724
5730
  variant: "outline",
5725
5731
  size: "sm",
5726
5732
  onClick: te,
5727
- disabled: T,
5733
+ disabled: P,
5728
5734
  children: "Restart"
5729
5735
  }
5730
5736
  )
@@ -6057,7 +6063,7 @@ const En = ({
6057
6063
  /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: F.fields.map((q, W) => at(q, W)) }) }),
6058
6064
  /* @__PURE__ */ s(Ce, { className: "flex justify-between", children: [
6059
6065
  n && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: n, children: "Back" }),
6060
- /* @__PURE__ */ r(Z, { type: "submit", isLoading: T, children: "Confirm and Start Verification" })
6066
+ /* @__PURE__ */ r(Z, { type: "submit", isLoading: P, children: "Confirm and Start Verification" })
6061
6067
  ] })
6062
6068
  ] }) });
6063
6069
  }
@@ -6124,10 +6130,10 @@ const En = ({
6124
6130
  ] }),
6125
6131
  /* @__PURE__ */ s(Ce, { className: "flex justify-between", children: [
6126
6132
  n && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: n, children: "Back" }),
6127
- /* @__PURE__ */ r(Z, { type: "submit", isLoading: T, children: "Confirm and Start Verification" })
6133
+ /* @__PURE__ */ r(Z, { type: "submit", isLoading: P, children: "Confirm and Start Verification" })
6128
6134
  ] })
6129
6135
  ] }) });
6130
- }, Tt = ({
6136
+ }, Pt = ({
6131
6137
  kycStatus: e,
6132
6138
  reviewStatus: t,
6133
6139
  workflowResult: n,
@@ -6269,7 +6275,7 @@ const En = ({
6269
6275
  d.type === "pending" && /* @__PURE__ */ r("div", { className: "text-center", children: /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
6270
6276
  ] })
6271
6277
  ] });
6272
- }, Tn = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
6278
+ }, Pn = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
6273
6279
  "img",
6274
6280
  {
6275
6281
  src: e.url,
@@ -6289,7 +6295,7 @@ const En = ({
6289
6295
  subtitle: t,
6290
6296
  className: n = ""
6291
6297
  }) => {
6292
- const { currentTheme: a } = Pe(), i = e || (a == null ? void 0 : a.title) || "", o = !!(a != null && a.logo && a.logo.visible && a.logo.url), c = !!i;
6298
+ const { currentTheme: a } = Te(), i = e || (a == null ? void 0 : a.title) || "", o = !!(a != null && a.logo && a.logo.visible && a.logo.url), c = !!i;
6293
6299
  return !o && !c ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${n}`, children: [
6294
6300
  /* @__PURE__ */ s(
6295
6301
  "div",
@@ -6297,7 +6303,7 @@ const En = ({
6297
6303
  className: "metakyc-header-title flex items-center text-xl font-bold",
6298
6304
  style: { color: "var(--metakyc-text-primary, #111827)" },
6299
6305
  children: [
6300
- o && /* @__PURE__ */ r(Tn, { config: a.logo }),
6306
+ o && /* @__PURE__ */ r(Pn, { config: a.logo }),
6301
6307
  o && c && /* @__PURE__ */ r(
6302
6308
  "span",
6303
6309
  {
@@ -6455,12 +6461,12 @@ const pt = {
6455
6461
  onCancel: a
6456
6462
  }) => {
6457
6463
  var q, W, X, m, R, L, u;
6458
- const { config: i, baseInformationService: o, currentTheme: c } = Pe(), { createApplicant: d, isLoading: y } = zt(), p = e || ((q = i.applicantForm) == null ? void 0 : q.workflowKey);
6464
+ const { config: i, baseInformationService: o, currentTheme: c } = Te(), { createApplicant: d, isLoading: y } = zt(), p = e || ((q = i.applicantForm) == null ? void 0 : q.workflowKey);
6459
6465
  if (!p)
6460
6466
  throw new Error(
6461
6467
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
6462
6468
  );
6463
- const x = t || ((W = i.applicantForm) == null ? void 0 : W.externalRefId) || "", T = ((X = i.applicantForm) == null ? void 0 : X.email) || "", v = ((m = i.applicantForm) == null ? void 0 : m.hiddenValues) || {}, A = ((R = i.applicantForm) == null ? void 0 : R.initialValues) || {}, w = (((L = i.applicantForm) == null ? void 0 : L.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", N = De(
6469
+ const x = t || ((W = i.applicantForm) == null ? void 0 : W.externalRefId) || "", P = ((X = i.applicantForm) == null ? void 0 : X.email) || "", v = ((m = i.applicantForm) == null ? void 0 : m.hiddenValues) || {}, A = ((R = i.applicantForm) == null ? void 0 : R.initialValues) || {}, w = (((L = i.applicantForm) == null ? void 0 : L.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", N = De(
6464
6470
  () => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
6465
6471
  [c == null ? void 0 : c.applicantFormPages]
6466
6472
  ), z = De(() => {
@@ -6521,11 +6527,11 @@ const pt = {
6521
6527
  try {
6522
6528
  const g = await Promise.all(
6523
6529
  l.map(async (C) => {
6524
- const S = C != null ? String(C) : "all", pe = await o.getCountries("", i.locale || "en", C), ie = C === 40, be = /* @__PURE__ */ new Set(), Te = pe.map((le) => ie && le.countryCode ? {
6530
+ const S = C != null ? String(C) : "all", pe = await o.getCountries("", i.locale || "en", C), ie = C === 40, be = /* @__PURE__ */ new Set(), Pe = pe.map((le) => ie && le.countryCode ? {
6525
6531
  value: le.countryCode,
6526
6532
  label: `${le.countryCode} – ${le.name}`
6527
6533
  } : { value: le.abbreviation3 || le.abbreviation, label: le.name }).filter((le) => !le.value || be.has(le.value) ? !1 : (be.add(le.value), !0));
6528
- return V.current.add(S), $.current.delete(S), [S, Te];
6534
+ return V.current.add(S), $.current.delete(S), [S, Pe];
6529
6535
  })
6530
6536
  );
6531
6537
  ee((C) => ({ ...C, ...Object.fromEntries(g) }));
@@ -6575,7 +6581,7 @@ const pt = {
6575
6581
  firstName: "",
6576
6582
  lastName: "",
6577
6583
  title: "",
6578
- email: T,
6584
+ email: P,
6579
6585
  dateOfBirth: "",
6580
6586
  phonenumber: "",
6581
6587
  externalRefId: x,
@@ -6711,7 +6717,7 @@ const pt = {
6711
6717
  var Nt;
6712
6718
  const S = nt[l];
6713
6719
  if (!S) return null;
6714
- const pe = z.includes(l), ie = B[l], be = D || S.label, Te = l in se, le = f ?? l, Be = { required: pe }, He = C ? C !== "placeholder" : w, Qe = He ? be : void 0, Wt = He ? "..." : be;
6720
+ const pe = z.includes(l), ie = B[l], be = D || S.label, Pe = l in se, le = f ?? l, Be = { required: pe }, He = C ? C !== "placeholder" : w, Qe = He ? be : void 0, Wt = He ? "..." : be;
6715
6721
  switch (S.type) {
6716
6722
  case "select":
6717
6723
  if (l === "country" || l === "nationality" || l === "taxCountry" || l === "countryOfBirth" || l === "mobileCountryCode") {
@@ -6725,7 +6731,7 @@ const pt = {
6725
6731
  onChange: (Xe) => oe(l, Xe),
6726
6732
  options: [{ value: "", label: `Select ${Wt.toLowerCase()}` }, ...Ie],
6727
6733
  disabled: E,
6728
- readOnly: Te,
6734
+ readOnly: Pe,
6729
6735
  error: ie
6730
6736
  },
6731
6737
  le
@@ -6745,7 +6751,7 @@ const pt = {
6745
6751
  { value: bt.Female.toString(), label: "Female" },
6746
6752
  { value: bt.Other.toString(), label: "Other" }
6747
6753
  ],
6748
- readOnly: Te,
6754
+ readOnly: Pe,
6749
6755
  error: ie
6750
6756
  },
6751
6757
  le
@@ -6760,7 +6766,7 @@ const pt = {
6760
6766
  value: Y[l] || "",
6761
6767
  onChange: (Xe) => oe(l, Xe),
6762
6768
  options: [{ value: "", label: He ? "Select language..." : be }, ...Ie],
6763
- readOnly: Te,
6769
+ readOnly: Pe,
6764
6770
  error: ie
6765
6771
  },
6766
6772
  le
@@ -6780,7 +6786,7 @@ const pt = {
6780
6786
  options: Ie,
6781
6787
  placeholder: He ? "Select other nationalities..." : be,
6782
6788
  disabled: E,
6783
- readOnly: Te
6789
+ readOnly: Pe
6784
6790
  },
6785
6791
  le
6786
6792
  );
@@ -6796,7 +6802,7 @@ const pt = {
6796
6802
  placeholder: He ? void 0 : be,
6797
6803
  value: Y[l] || "",
6798
6804
  onChange: (Ie) => oe(l, Ie.target.value),
6799
- readOnly: Te,
6805
+ readOnly: Pe,
6800
6806
  error: ie
6801
6807
  },
6802
6808
  le
@@ -6811,7 +6817,7 @@ const pt = {
6811
6817
  placeholder: He ? void 0 : be,
6812
6818
  value: Y[l] || "",
6813
6819
  onChange: (Ie) => oe(l, Ie.target.value),
6814
- readOnly: Te,
6820
+ readOnly: Pe,
6815
6821
  error: ie
6816
6822
  },
6817
6823
  le
@@ -6826,7 +6832,7 @@ const pt = {
6826
6832
  placeholder: He ? void 0 : be,
6827
6833
  value: Y[l] || "",
6828
6834
  onChange: (Ie) => oe(l, Ie.target.value),
6829
- readOnly: Te,
6835
+ readOnly: Pe,
6830
6836
  error: ie
6831
6837
  },
6832
6838
  le
@@ -6841,7 +6847,7 @@ const pt = {
6841
6847
  placeholder: He ? void 0 : be,
6842
6848
  value: Y[l] || "",
6843
6849
  onChange: (Ie) => oe(l, Ie.target.value),
6844
- readOnly: Te,
6850
+ readOnly: Pe,
6845
6851
  error: ie
6846
6852
  },
6847
6853
  le
@@ -7014,8 +7020,8 @@ const pt = {
7014
7020
  if (l.singleSelect)
7015
7021
  Ne(l.paramName, be.target.checked ? pe.value : "");
7016
7022
  else {
7017
- const Te = be.target.checked ? [...S, pe.value] : S.filter((le) => le !== pe.value);
7018
- Ne(l.paramName, Te.join(","));
7023
+ const Pe = be.target.checked ? [...S, pe.value] : S.filter((le) => le !== pe.value);
7024
+ Ne(l.paramName, Pe.join(","));
7019
7025
  }
7020
7026
  },
7021
7027
  className: "metakyc-option-input",
@@ -7244,12 +7250,12 @@ const Xn = ({
7244
7250
  onCancel: a
7245
7251
  }) => {
7246
7252
  var Ye, h, O, q, W, X;
7247
- const { config: i, baseInformationService: o, currentTheme: c } = Pe(), { createCompanyApplicant: d, isLoading: y } = zt(), p = e || ((Ye = i.applicantForm) == null ? void 0 : Ye.workflowKey);
7253
+ const { config: i, baseInformationService: o, currentTheme: c } = Te(), { createCompanyApplicant: d, isLoading: y } = zt(), p = e || ((Ye = i.applicantForm) == null ? void 0 : Ye.workflowKey);
7248
7254
  if (!p)
7249
7255
  throw new Error(
7250
7256
  "workflowKey is required. Provide it either as a prop to CreateCompanyApplicantForm or set it in config.applicantForm.workflowKey"
7251
7257
  );
7252
- const x = t || ((h = i.applicantForm) == null ? void 0 : h.externalRefId) || "", T = ((O = i.applicantForm) == null ? void 0 : O.email) || "", v = ((q = i.applicantForm) == null ? void 0 : q.initialValues) || {}, P = (((W = i.applicantForm) == null ? void 0 : W.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", w = De(
7258
+ const x = t || ((h = i.applicantForm) == null ? void 0 : h.externalRefId) || "", P = ((O = i.applicantForm) == null ? void 0 : O.email) || "", v = ((q = i.applicantForm) == null ? void 0 : q.initialValues) || {}, T = (((W = i.applicantForm) == null ? void 0 : W.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", w = De(
7253
7259
  () => c != null && c.companyFormPages && c.companyFormPages.length > 0 ? c.companyFormPages : null,
7254
7260
  [c == null ? void 0 : c.companyFormPages]
7255
7261
  ), N = De(() => {
@@ -7337,7 +7343,7 @@ const Xn = ({
7337
7343
  ), [J, se] = k({
7338
7344
  workflowKey: p,
7339
7345
  companyName: "",
7340
- email: T,
7346
+ email: P,
7341
7347
  phone: "",
7342
7348
  registrationNumber: "",
7343
7349
  countryResidence: "",
@@ -7473,7 +7479,7 @@ const Xn = ({
7473
7479
  }, Ze = (m, R, L, u, l) => {
7474
7480
  const f = st[m];
7475
7481
  if (!f) return null;
7476
- const D = N.includes(m), g = ke[m], C = L || f.label, S = m in _, pe = R ?? m, ie = l ? l !== "placeholder" : P, be = ie ? C : void 0, Te = ie ? "..." : C;
7482
+ const D = N.includes(m), g = ke[m], C = L || f.label, S = m in _, pe = R ?? m, ie = l ? l !== "placeholder" : T, be = ie ? C : void 0, Pe = ie ? "..." : C;
7477
7483
  switch (f.type) {
7478
7484
  case "select":
7479
7485
  if (m === "countryResidence" || m === "addressCountry") {
@@ -7485,7 +7491,7 @@ const Xn = ({
7485
7491
  label: be,
7486
7492
  value: J[m] || "",
7487
7493
  onChange: (Be) => I(m, Be),
7488
- options: [{ value: "", label: `Select ${Te.toLowerCase()}` }, ...le],
7494
+ options: [{ value: "", label: `Select ${Pe.toLowerCase()}` }, ...le],
7489
7495
  disabled: ee,
7490
7496
  readOnly: S,
7491
7497
  error: g
@@ -7581,7 +7587,7 @@ const Xn = ({
7581
7587
  }
7582
7588
  ) }, `custom-${R}`);
7583
7589
  if (!m.paramName) return null;
7584
- const L = ke[m.paramName], u = m.displayText || m.label || m.paramName, l = m.labelMode ? m.labelMode !== "placeholder" : P;
7590
+ const L = ke[m.paramName], u = m.displayText || m.label || m.paramName, l = m.labelMode ? m.labelMode !== "placeholder" : T;
7585
7591
  return m.customType === "checkbox" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
7586
7592
  /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer" }, children: [
7587
7593
  /* @__PURE__ */ r(
@@ -7721,10 +7727,10 @@ const Xn = ({
7721
7727
  workflowKey: y,
7722
7728
  nextWorkflowKey: p,
7723
7729
  hasWorkflowChanged: x,
7724
- isLoading: T,
7730
+ isLoading: P,
7725
7731
  error: v,
7726
7732
  moveBack: A,
7727
- refreshProgress: P
7733
+ refreshProgress: T
7728
7734
  } = qr(e), [w, N] = we.useState(!1), z = we.useRef(null);
7729
7735
  if (we.useEffect(() => {
7730
7736
  v && n && n(v);
@@ -7734,7 +7740,7 @@ const Xn = ({
7734
7740
  a === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
7735
7741
  }, [a]), we.useEffect(() => {
7736
7742
  x && N(!1);
7737
- }, [x]), T || !o)
7743
+ }, [x]), P || !o)
7738
7744
  return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${i || ""}`, children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ s(ne, { children: [
7739
7745
  /* @__PURE__ */ r(Me, { className: "my-8" }),
7740
7746
  /* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading workflow..." })
@@ -7775,7 +7781,7 @@ const Xn = ({
7775
7781
  ] }) }) }) });
7776
7782
  if (o.status === ze.Finished || o.status === ze.OnHold)
7777
7783
  return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${i || ""}`, children: /* @__PURE__ */ r(
7778
- Tt,
7784
+ Pt,
7779
7785
  {
7780
7786
  kycStatus: o.kycStatus,
7781
7787
  reviewStatus: o.reviewStatus,
@@ -7853,7 +7859,7 @@ const Xn = ({
7853
7859
  const K = {
7854
7860
  applicantId: e,
7855
7861
  onComplete: async () => {
7856
- await P();
7862
+ await T();
7857
7863
  },
7858
7864
  onBack: c.order > 0 ? A : void 0
7859
7865
  };
@@ -7865,7 +7871,7 @@ const Xn = ({
7865
7871
  case ce.Overview:
7866
7872
  return /* @__PURE__ */ r(bn, { ...K });
7867
7873
  case ce.IdentitySdk:
7868
- return /* @__PURE__ */ r(Pn, { ...K });
7874
+ return /* @__PURE__ */ r(Tn, { ...K });
7869
7875
  case ce.RiskScoring:
7870
7876
  return /* @__PURE__ */ r(Nn, { ...K });
7871
7877
  case ce.AdditionalData:
@@ -7875,7 +7881,7 @@ const Xn = ({
7875
7881
  return /* @__PURE__ */ r(En, { ...K });
7876
7882
  case ce.ManualReview:
7877
7883
  return /* @__PURE__ */ r(
7878
- Tt,
7884
+ Pt,
7879
7885
  {
7880
7886
  kycStatus: o.kycStatus,
7881
7887
  reviewStatus: o.reviewStatus,
@@ -7926,7 +7932,7 @@ const Xn = ({
7926
7932
  gap: "0"
7927
7933
  },
7928
7934
  children: e.map((c, d) => {
7929
- const y = d < t, p = d === t, x = y || p, T = c.displayName || c.name || n(c.action) || `Step ${d + 1}`;
7935
+ const y = d < t, p = d === t, x = y || p, P = c.displayName || c.name || n(c.action) || `Step ${d + 1}`;
7930
7936
  return /* @__PURE__ */ s(we.Fragment, { children: [
7931
7937
  /* @__PURE__ */ s(
7932
7938
  "div",
@@ -7966,7 +7972,7 @@ const Xn = ({
7966
7972
  fontWeight: p ? 600 : 400,
7967
7973
  color: p ? "var(--metakyc-text-primary, #111827)" : y ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
7968
7974
  transition: "color 0.2s ease"
7969
- }, children: T })
7975
+ }, children: P })
7970
7976
  ]
7971
7977
  }
7972
7978
  ),
@@ -8070,7 +8076,7 @@ export {
8070
8076
  Ge as IdentityProviderManager,
8071
8077
  xr as IdentityService,
8072
8078
  Oe as IdentityVerificationProvider,
8073
- Pn as IdentityVerificationStep,
8079
+ Tn as IdentityVerificationStep,
8074
8080
  xe as Input,
8075
8081
  kr as InvestorCategorizationService,
8076
8082
  In as InvestorCategorizationStep,
@@ -8078,9 +8084,9 @@ export {
8078
8084
  or as InvestorCategoryType,
8079
8085
  er as KycProcessStatus,
8080
8086
  tt as KycStatus,
8081
- Tt as KycStatusDisplay,
8087
+ Pt as KycStatusDisplay,
8082
8088
  ea as KycWorkflow,
8083
- Tn as Logo,
8089
+ Pn as Logo,
8084
8090
  Ot as MetaKYCContext,
8085
8091
  Ue as MetaKYCError,
8086
8092
  Kn as MetaKYCProvider,
@@ -8100,7 +8106,7 @@ export {
8100
8106
  qe as SearchableSelect,
8101
8107
  Ct as Select,
8102
8108
  Me as Spinner,
8103
- Pr as StepRouter,
8109
+ Tr as StepRouter,
8104
8110
  Mr as SumsubProvider,
8105
8111
  Br as ThemeManager,
8106
8112
  Fe as ThemePreset,
@@ -8109,7 +8115,7 @@ export {
8109
8115
  gn as UploadDocumentStep,
8110
8116
  tr as UserType,
8111
8117
  Ke as ValueDataType,
8112
- Tr as WorkflowOrchestrator,
8118
+ Pr as WorkflowOrchestrator,
8113
8119
  gt as WorkflowResultType,
8114
8120
  Ar as WorkflowState,
8115
8121
  ce as WorkflowStepAction,
@@ -8145,7 +8151,7 @@ export {
8145
8151
  Jn as useAppropriatenessTest,
8146
8152
  Gr as useIdentityVerification,
8147
8153
  qr as useKycWorkflow,
8148
- Pe as useMetaKYC,
8154
+ Te as useMetaKYC,
8149
8155
  Qr as useOverview,
8150
8156
  Vr as useQuestionnaire,
8151
8157
  Jr as useRiskScoring,