@vpdev2/metakyc 1.0.19 → 1.0.21
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/components/CreateApplicantForm.d.ts.map +1 -1
- package/dist/components/KycWorkflow.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +514 -537
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ var Vt = (e, t, a) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var he = (e, t, a) => Vt(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
import Qt from "axios";
|
|
5
5
|
import * as Rt from "react";
|
|
6
|
-
import we, { createContext as Gt, useState as x, useMemo as De, useEffect as fe, useContext as Jt, useRef as
|
|
6
|
+
import we, { createContext as Gt, useState as x, useMemo as De, useEffect as fe, useContext as Jt, useRef as de, useCallback as ae, forwardRef as yt, createElement as St } from "react";
|
|
7
7
|
import { jsxs as o, jsx as r, Fragment as ct } from "react/jsx-runtime";
|
|
8
8
|
import Xt, { createPortal as Ct } from "react-dom";
|
|
9
9
|
import { useForm as Zt, Controller as tt } from "react-hook-form";
|
|
10
10
|
import { z as Ve } from "zod";
|
|
11
|
-
var
|
|
11
|
+
var ce = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(ce || {}), ft = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(ft || {}), Oe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(Oe || {}), er = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(er || {}), tr = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(tr || {}), rt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(rt || {}), at = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(at || {}), rr = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(rr || {}), ar = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(ar || {}), ze = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(ze || {}), nr = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(nr || {}), kt = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(kt || {}), ir = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(ir || {}), or = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(or || {}), sr = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(sr || {}), qe = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Money = 2] = "Money", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(qe || {}), lr = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(lr || {}), cr = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(cr || {}), Ee = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(Ee || {}), dr = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(dr || {});
|
|
12
12
|
const Xe = {
|
|
13
13
|
Nationality: 10,
|
|
14
14
|
Address: 20,
|
|
@@ -1242,7 +1242,7 @@ class Dr {
|
|
|
1242
1242
|
async loadStepData(t, a) {
|
|
1243
1243
|
const n = this.getHandler(t);
|
|
1244
1244
|
if (!n)
|
|
1245
|
-
throw new Error(`No handler registered for step action: ${
|
|
1245
|
+
throw new Error(`No handler registered for step action: ${ce[t]}`);
|
|
1246
1246
|
return n.loadData(a);
|
|
1247
1247
|
}
|
|
1248
1248
|
/**
|
|
@@ -1251,7 +1251,7 @@ class Dr {
|
|
|
1251
1251
|
async submitStepData(t, a) {
|
|
1252
1252
|
const n = this.getHandler(t);
|
|
1253
1253
|
if (!n)
|
|
1254
|
-
throw new Error(`No handler registered for step action: ${
|
|
1254
|
+
throw new Error(`No handler registered for step action: ${ce[t]}`);
|
|
1255
1255
|
return n.submitData(a);
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
@@ -1265,47 +1265,47 @@ class Mr {
|
|
|
1265
1265
|
* Register all step handlers
|
|
1266
1266
|
*/
|
|
1267
1267
|
registerStepHandlers() {
|
|
1268
|
-
this.stepRouter.registerHandler(
|
|
1268
|
+
this.stepRouter.registerHandler(ce.Questionaries, {
|
|
1269
1269
|
loadData: (t) => this.questionnaireService.getQuestionnaire(t),
|
|
1270
1270
|
submitData: async (t) => {
|
|
1271
1271
|
await this.questionnaireService.fillQuestionnaire(t);
|
|
1272
1272
|
}
|
|
1273
|
-
}), this.stepRouter.registerHandler(
|
|
1273
|
+
}), this.stepRouter.registerHandler(ce.UploadDocument, {
|
|
1274
1274
|
loadData: (t) => this.uploadDocumentService.getUploadDocument(t),
|
|
1275
1275
|
submitData: (t) => this.uploadDocumentService.fillUploadDocument(t)
|
|
1276
|
-
}), this.stepRouter.registerHandler(
|
|
1276
|
+
}), this.stepRouter.registerHandler(ce.AppropriatenessTest, {
|
|
1277
1277
|
loadData: (t) => this.appropriatenessTestService.getAppropriatenessTest(t),
|
|
1278
1278
|
submitData: async (t) => {
|
|
1279
1279
|
await this.appropriatenessTestService.fillAppropriatenessTest(t);
|
|
1280
1280
|
}
|
|
1281
|
-
}), this.stepRouter.registerHandler(
|
|
1281
|
+
}), this.stepRouter.registerHandler(ce.Overview, {
|
|
1282
1282
|
loadData: (t) => this.overviewService.getOverviewData(t),
|
|
1283
1283
|
submitData: (t) => this.overviewService.passOverview(t.applicantId)
|
|
1284
|
-
}), this.stepRouter.registerHandler(
|
|
1284
|
+
}), this.stepRouter.registerHandler(ce.RiskScoring, {
|
|
1285
1285
|
loadData: (t) => this.riskScoringService.getRiskCriterias(t),
|
|
1286
1286
|
submitData: async (t) => {
|
|
1287
1287
|
await this.riskScoringService.submitRiskScoring(t);
|
|
1288
1288
|
}
|
|
1289
|
-
}), this.stepRouter.registerHandler(
|
|
1289
|
+
}), this.stepRouter.registerHandler(ce.IdentitySdk, {
|
|
1290
1290
|
loadData: async (t) => ({
|
|
1291
1291
|
applicantId: t,
|
|
1292
1292
|
message: "Identity verification required"
|
|
1293
1293
|
}),
|
|
1294
1294
|
submitData: async () => {
|
|
1295
1295
|
}
|
|
1296
|
-
}), this.stepRouter.registerHandler(
|
|
1296
|
+
}), this.stepRouter.registerHandler(ce.InvestorCategorization, {
|
|
1297
1297
|
loadData: (t) => this.investorCategorizationService.getInvestorCategorization(t),
|
|
1298
1298
|
submitData: async (t) => {
|
|
1299
1299
|
await this.investorCategorizationService.setInvestorCategorization(t);
|
|
1300
1300
|
}
|
|
1301
|
-
}), this.stepRouter.registerHandler(
|
|
1301
|
+
}), this.stepRouter.registerHandler(ce.ManualReview, {
|
|
1302
1302
|
loadData: async (t) => ({
|
|
1303
1303
|
applicantId: t,
|
|
1304
1304
|
message: "Your application is under manual review"
|
|
1305
1305
|
}),
|
|
1306
1306
|
submitData: async () => {
|
|
1307
1307
|
}
|
|
1308
|
-
}), this.stepRouter.registerHandler(
|
|
1308
|
+
}), this.stepRouter.registerHandler(ce.AdditionalData, {
|
|
1309
1309
|
loadData: async (t) => ({
|
|
1310
1310
|
applicantId: t,
|
|
1311
1311
|
message: "Additional data required"
|
|
@@ -1943,7 +1943,7 @@ ${Object.entries(i).filter(([, y]) => !!y).map(([y, p]) => ` --metakyc-${y}: ${
|
|
|
1943
1943
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1944
1944
|
}
|
|
1945
1945
|
}
|
|
1946
|
-
const Bt = Gt(null), Hr = "1.0.19", Wr = '.metakyc-sdk .pointer-events-none{pointer-events:none}.metakyc-sdk .visible{visibility:visible}.metakyc-sdk .static{position:static}.metakyc-sdk .fixed{position:fixed}.metakyc-sdk .absolute{position:absolute}.metakyc-sdk .relative{position:relative}.metakyc-sdk .inset-y-0{top:0;bottom:0}.metakyc-sdk .left-0{left:0}.metakyc-sdk .right-0{right:0}.metakyc-sdk .right-3{right:.75rem}.metakyc-sdk .top-1\\/2{top:50%}.metakyc-sdk .mx-4{margin-left:1rem;margin-right:1rem}.metakyc-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.metakyc-sdk .mx-auto{margin-left:auto;margin-right:auto}.metakyc-sdk .my-8{margin-top:2rem;margin-bottom:2rem}.metakyc-sdk .-ml-1{margin-left:-.25rem}.metakyc-sdk .mb-0\\.5{margin-bottom:.125rem}.metakyc-sdk .mb-1{margin-bottom:.25rem}.metakyc-sdk .mb-2{margin-bottom:.5rem}.metakyc-sdk .mb-3{margin-bottom:.75rem}.metakyc-sdk .mb-4{margin-bottom:1rem}.metakyc-sdk .mb-6{margin-bottom:1.5rem}.metakyc-sdk .ml-0\\.5{margin-left:.125rem}.metakyc-sdk .ml-1{margin-left:.25rem}.metakyc-sdk .ml-3{margin-left:.75rem}.metakyc-sdk .mr-2{margin-right:.5rem}.metakyc-sdk .mr-3{margin-right:.75rem}.metakyc-sdk .mt-0\\.5{margin-top:.125rem}.metakyc-sdk .mt-1{margin-top:.25rem}.metakyc-sdk .mt-2{margin-top:.5rem}.metakyc-sdk .mt-3{margin-top:.75rem}.metakyc-sdk .mt-4{margin-top:1rem}.metakyc-sdk .mt-6{margin-top:1.5rem}.metakyc-sdk .block{display:block}.metakyc-sdk .inline-block{display:inline-block}.metakyc-sdk .inline{display:inline}.metakyc-sdk .flex{display:flex}.metakyc-sdk .inline-flex{display:inline-flex}.metakyc-sdk .grid{display:grid}.metakyc-sdk .hidden{display:none}.metakyc-sdk .h-12{height:3rem}.metakyc-sdk .h-16{height:4rem}.metakyc-sdk .h-24{height:6rem}.metakyc-sdk .h-4{height:1rem}.metakyc-sdk .h-6{height:1.5rem}.metakyc-sdk .h-8{height:2rem}.metakyc-sdk .h-full{height:100%}.metakyc-sdk .max-h-52{max-height:13rem}.metakyc-sdk .min-h-\\[400px\\]{min-height:400px}.metakyc-sdk .w-12{width:3rem}.metakyc-sdk .w-16{width:4rem}.metakyc-sdk .w-20{width:5rem}.metakyc-sdk .w-24{width:6rem}.metakyc-sdk .w-4{width:1rem}.metakyc-sdk .w-6{width:1.5rem}.metakyc-sdk .w-8{width:2rem}.metakyc-sdk .w-full{width:100%}.metakyc-sdk .max-w-md{max-width:28rem}.metakyc-sdk .flex-1{flex:1 1 0%}.metakyc-sdk .flex-shrink-0{flex-shrink:0}.metakyc-sdk .-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.metakyc-sdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.metakyc-sdk .animate-spin{animation:spin 1s linear infinite}.metakyc-sdk .cursor-not-allowed{cursor:not-allowed}.metakyc-sdk .cursor-pointer{cursor:pointer}.metakyc-sdk .resize{resize:both}.metakyc-sdk .list-inside{list-style-position:inside}.metakyc-sdk .list-disc{list-style-type:disc}.metakyc-sdk .list-none{list-style-type:none}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.metakyc-sdk .flex-col{flex-direction:column}.metakyc-sdk .flex-wrap{flex-wrap:wrap}.metakyc-sdk .items-start{align-items:flex-start}.metakyc-sdk .items-center{align-items:center}.metakyc-sdk .justify-center{justify-content:center}.metakyc-sdk .justify-between{justify-content:space-between}.metakyc-sdk .gap-1{gap:.25rem}.metakyc-sdk .gap-1\\.5{gap:.375rem}.metakyc-sdk .gap-2{gap:.5rem}.metakyc-sdk .gap-4{gap:1rem}.metakyc-sdk :is(.space-x-3>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.metakyc-sdk :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-6>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-8>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.metakyc-sdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.metakyc-sdk .rounded{border-radius:.25rem}.metakyc-sdk .rounded-full{border-radius:9999px}.metakyc-sdk .rounded-lg{border-radius:.5rem}.metakyc-sdk .rounded-xl{border-radius:.75rem}.metakyc-sdk .border{border-width:1px}.metakyc-sdk .border-0{border-width:0px}.metakyc-sdk .border-2{border-width:2px}.metakyc-sdk .border-b{border-bottom-width:1px}.metakyc-sdk .border-t{border-top-width:1px}.metakyc-sdk .border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-danger-500{border-color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.metakyc-sdk .bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.metakyc-sdk .p-3{padding:.75rem}.metakyc-sdk .p-4{padding:1rem}.metakyc-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.metakyc-sdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}.metakyc-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.metakyc-sdk .px-4{padding-left:1rem;padding-right:1rem}.metakyc-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.metakyc-sdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.metakyc-sdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.metakyc-sdk .py-12{padding-top:3rem;padding-bottom:3rem}.metakyc-sdk .py-2{padding-top:.5rem;padding-bottom:.5rem}.metakyc-sdk .py-3{padding-top:.75rem;padding-bottom:.75rem}.metakyc-sdk .py-4{padding-top:1rem;padding-bottom:1rem}.metakyc-sdk .py-8{padding-top:2rem;padding-bottom:2rem}.metakyc-sdk .pb-4{padding-bottom:1rem}.metakyc-sdk .pl-10{padding-left:2.5rem}.metakyc-sdk .pl-3{padding-left:.75rem}.metakyc-sdk .pr-10{padding-right:2.5rem}.metakyc-sdk .pr-3{padding-right:.75rem}.metakyc-sdk .pr-6{padding-right:1.5rem}.metakyc-sdk .pt-6{padding-top:1.5rem}.metakyc-sdk .text-left{text-align:left}.metakyc-sdk .text-center{text-align:center}.metakyc-sdk .text-right{text-align:right}.metakyc-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.metakyc-sdk .text-3xl{font-size:1.875rem;line-height:2.25rem}.metakyc-sdk .text-5xl{font-size:3rem;line-height:1}.metakyc-sdk .text-base{font-size:1rem;line-height:1.5rem}.metakyc-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.metakyc-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.metakyc-sdk .text-xl{font-size:1.25rem;line-height:1.75rem}.metakyc-sdk .text-xs{font-size:.75rem;line-height:1rem}.metakyc-sdk .font-bold{font-weight:700}.metakyc-sdk .font-medium{font-weight:500}.metakyc-sdk .font-semibold{font-weight:600}.metakyc-sdk .uppercase{text-transform:uppercase}.metakyc-sdk .lowercase{text-transform:lowercase}.metakyc-sdk .tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.metakyc-sdk .leading-6{line-height:1.5rem}.metakyc-sdk .text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-danger-500{color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-primary,.metakyc-sdk .text-primary-500{color:var(--metakyc-primary, #3B82F6)}.metakyc-sdk .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-secondary{color:var(--metakyc-secondary, #64748b)}.metakyc-sdk .text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.metakyc-sdk .underline{text-decoration-line:underline}.metakyc-sdk .opacity-25{opacity:.25}.metakyc-sdk .opacity-50{opacity:.5}.metakyc-sdk .opacity-60{opacity:.6}.metakyc-sdk .opacity-75{opacity:.75}.metakyc-sdk .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.metakyc-sdk .outline{outline-style:solid}.metakyc-sdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .duration-200{transition-duration:.2s}.metakyc-sdk .grid{display:grid!important}.metakyc-sdk .flex{display:flex!important}.metakyc-sdk .inline-flex{display:inline-flex!important}.metakyc-sdk .hidden{display:none!important}.metakyc-sdk .block{display:block!important}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.metakyc-sdk .col-span-1{grid-column:span 1 / span 1!important}.metakyc-sdk .col-span-2{grid-column:span 2 / span 2!important}.metakyc-sdk .col-span-3{grid-column:span 3 / span 3!important}.metakyc-sdk .col-span-4{grid-column:span 4 / span 4!important}.metakyc-sdk .gap-1{gap:.25rem!important}.metakyc-sdk .gap-2{gap:.5rem!important}.metakyc-sdk .gap-3{gap:.75rem!important}.metakyc-sdk .gap-4{gap:1rem!important}.metakyc-sdk .gap-6{gap:1.5rem!important}.metakyc-sdk .gap-8{gap:2rem!important}.metakyc-sdk .flex-col{flex-direction:column!important}.metakyc-sdk .flex-row{flex-direction:row!important}.metakyc-sdk .flex-wrap{flex-wrap:wrap!important}.metakyc-sdk .flex-1{flex:1 1 0%!important}.metakyc-sdk .flex-shrink-0{flex-shrink:0!important}.metakyc-sdk .items-center{align-items:center!important}.metakyc-sdk .items-start{align-items:flex-start!important}.metakyc-sdk .items-end{align-items:flex-end!important}.metakyc-sdk .justify-between{justify-content:space-between!important}.metakyc-sdk .justify-center{justify-content:center!important}.metakyc-sdk .justify-end{justify-content:flex-end!important}.metakyc-sdk .justify-start{justify-content:flex-start!important}.metakyc-sdk .space-y-1>*+*{margin-top:.25rem!important}.metakyc-sdk .space-y-1\\.5>*+*{margin-top:.375rem!important}.metakyc-sdk .space-y-2>*+*{margin-top:.5rem!important}.metakyc-sdk .space-y-3>*+*{margin-top:.75rem!important}.metakyc-sdk .space-y-4>*+*{margin-top:1rem!important}.metakyc-sdk .space-y-6>*+*{margin-top:1.5rem!important}.metakyc-sdk .w-full{width:100%!important}.metakyc-sdk .relative{position:relative!important}.metakyc-sdk .absolute{position:absolute!important}.metakyc-sdk .overflow-hidden{overflow:hidden!important}.metakyc-sdk .overflow-auto{overflow:auto!important}.metakyc-sdk .overflow-x-auto{overflow-x:auto!important}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}}.metakyc-sdk *,.metakyc-sdk *:before,.metakyc-sdk *:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--metakyc-border, #e5e7eb)}.metakyc-sdk{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.metakyc-sdk img,.metakyc-sdk video{max-width:100%;height:auto}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6,.metakyc-sdk p{margin:0}.metakyc-sdk ol,.metakyc-sdk ul{list-style:none;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk input,.metakyc-sdk optgroup,.metakyc-sdk select,.metakyc-sdk textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk [role=button]{cursor:pointer}.metakyc-sdk a{color:inherit;text-decoration:inherit}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),.metakyc-sdk select,.metakyc-sdk textarea,.metakyc-sdk .metakyc-searchable-select-trigger,.metakyc-sdk .metakyc-multiselect-trigger{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-sdk input::-moz-placeholder,.metakyc-sdk textarea::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input::placeholder,.metakyc-sdk textarea::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):focus,.metakyc-sdk select:focus,.metakyc-sdk textarea:focus{outline:none!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-sdk input[type=checkbox],.metakyc-sdk input[type=radio]{appearance:none!important;-webkit-appearance:none!important;-moz-appearance:none!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex-shrink:0!important;cursor:pointer!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border:1.5px solid var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;position:relative!important;transition:background-color .15s,border-color .15s!important;vertical-align:middle!important;display:inline-block!important;padding:0!important;margin:0!important;color-scheme:light!important}.metakyc-sdk input[type=checkbox]{border-radius:4px!important}.metakyc-sdk input[type=radio]{border-radius:50%!important}.metakyc-sdk input[type=checkbox]:checked,.metakyc-sdk input[type=radio]:checked{background-color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk input[type=checkbox]:checked:after{content:""!important;display:block!important;position:absolute!important;left:4px!important;top:1px!important;width:5px!important;height:9px!important;border:2px solid #ffffff!important;border-top:none!important;border-left:none!important;transform:rotate(45deg)!important}.metakyc-sdk input[type=radio]:checked:after{content:""!important;display:block!important;position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:6px!important;height:6px!important;border-radius:50%!important;background:#fff!important}.metakyc-sdk input[type=checkbox]:focus,.metakyc-sdk input[type=radio]:focus{outline:none!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-primary, #2563eb) 30%,transparent)!important}.metakyc-searchable-select-dropdown,.metakyc-multiselect-dropdown{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important}.metakyc-searchable-select-dropdown input,.metakyc-multiselect-dropdown input{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-searchable-select-dropdown input::-moz-placeholder,.metakyc-multiselect-dropdown input::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input::placeholder,.metakyc-multiselect-dropdown input::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input:focus,.metakyc-multiselect-dropdown input:focus{outline:none!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-searchable-select-dropdown li:hover,.metakyc-multiselect-dropdown li:hover{background-color:var(--metakyc-surface, var(--metakyc-background, #f9fafb))!important}.metakyc-sdk .metakyc-help-btn{color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important;background:transparent!important;position:relative!important;z-index:2!important}.metakyc-sdk .metakyc-overview-step-item,.metakyc-sdk .metakyc-overview-step-item *,.metakyc-sdk .metakyc-step-content,.metakyc-sdk .metakyc-step-content *,.metakyc-sdk .metakyc-step-title,.metakyc-sdk .metakyc-step-title *,.metakyc-sdk .metakyc-step-icon,.metakyc-sdk .metakyc-step-icon *,.metakyc-sdk .metakyc-step-description,.metakyc-sdk .metakyc-step-description *{border-top-width:0!important;border-bottom-width:0!important;border-left-width:0!important;border-right-width:0!important;border-top-style:none!important;border-bottom-style:none!important;border-left-style:none!important;border-right-style:none!important;border-top-color:transparent!important;border-bottom-color:transparent!important;border-left-color:transparent!important;border-right-color:transparent!important;border:0!important;box-shadow:none!important;outline:none!important;outline-width:0!important;outline-style:none!important;text-decoration:none!important;text-decoration-line:none!important}.metakyc-sdk .metakyc-overview-step-item:before,.metakyc-sdk .metakyc-overview-step-item:after,.metakyc-sdk .metakyc-overview-step-item *:before,.metakyc-sdk .metakyc-overview-step-item *:after,.metakyc-sdk .metakyc-step-content:before,.metakyc-sdk .metakyc-step-content:after,.metakyc-sdk .metakyc-step-content *:before,.metakyc-sdk .metakyc-step-content *:after,.metakyc-sdk .metakyc-step-title:before,.metakyc-sdk .metakyc-step-title:after,.metakyc-sdk .metakyc-step-description:before,.metakyc-sdk .metakyc-step-description:after{content:none!important;display:none!important;visibility:hidden!important;border:none!important;box-shadow:none!important;outline:none!important;background:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-overview-step-item{border-width:0!important;border-style:none!important;border:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-content{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-title{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important;text-decoration:none!important}.metakyc-sdk hr,.metakyc-sdk .metakyc-overview-step-item hr,.metakyc-sdk .metakyc-overview-step-item * hr,.metakyc-sdk .metakyc-step-content hr,.metakyc-sdk .metakyc-step-content * hr{display:block!important;height:0!important;border:0!important;border-top:1px solid var(--metakyc-primary, #2563eb)!important;opacity:.25!important;margin:1rem 0!important;overflow:visible!important}.metakyc-sdk{background-color:var(--metakyc-background, #ffffff)!important;color:var(--metakyc-text-primary, #111827)!important;font-family:var(--metakyc-font-family, inherit)!important;padding:1.5rem!important;border-radius:.75rem!important}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6{color:var(--metakyc-text-primary, #111827);letter-spacing:normal}.metakyc-sdk .text-gray-900{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .text-gray-800{color:var(--metakyc-text-primary, #1f2937)!important}.metakyc-sdk .text-gray-700{color:var(--metakyc-text-secondary, #374151)!important}.metakyc-sdk .text-gray-600{color:var(--metakyc-text-secondary, #6b7280)!important}.metakyc-sdk .text-gray-500{color:var(--metakyc-text-muted, #6b7280)!important}.metakyc-sdk .text-gray-400{color:var(--metakyc-text-muted, #9ca3af)!important}.metakyc-sdk .text-gray-300{color:var(--metakyc-text-muted, #d1d5db)!important}.metakyc-sdk .text-white{color:#fff!important}.metakyc-sdk .bg-white{background-color:var(--metakyc-background, #ffffff)!important}.metakyc-sdk .bg-gray-50{background-color:var(--metakyc-surface, #f9fafb)!important}.metakyc-sdk .bg-gray-100{background-color:var(--metakyc-surface, #f3f4f6)!important}.metakyc-sdk .bg-gray-200{background-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-gray-800{background-color:var(--metakyc-surface, #1f2937)!important}.metakyc-sdk .border-gray-100,.metakyc-sdk .border-gray-200,.metakyc-sdk .border-gray-300{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-t{border-top-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-b{border-bottom-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .divide-gray-200>*{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-primary-500,.metakyc-sdk .bg-primary-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-primary-50,.metakyc-sdk .bg-primary-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-primary-500,.metakyc-sdk .text-primary-600,.metakyc-sdk .text-primary-800{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .text-primary-900{color:var(--metakyc-primary-dark, #1e40af)!important}.metakyc-sdk .border-primary-500,.metakyc-sdk .border-primary-600{border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-primary-50:hover{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .hover\\:bg-primary-600:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .bg-blue-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-blue-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-blue-600,.metakyc-sdk .text-blue-400{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-blue-700:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .metakyc-overview-steps h3:before,.metakyc-sdk .metakyc-overview-steps h3:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-overview-steps *:before,.metakyc-sdk .metakyc-overview-steps *:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-stepper-scroll::-webkit-scrollbar{display:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-file-dropzone:hover{border-color:var(--metakyc-primary, #2563eb)!important;background-color:color-mix(in srgb,var(--metakyc-primary, #2563eb) 3%,var(--metakyc-background, #ffffff))!important}.metakyc-sdk .metakyc-file-item:hover{background-color:color-mix(in srgb,var(--metakyc-surface, #f9fafb) 80%,var(--metakyc-border, #e5e7eb))!important}.metakyc-sdk .metakyc-file-upload label{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .metakyc-file-upload p{margin:0!important;line-height:1.4!important}.metakyc-sdk .metakyc-file-item button{background:transparent!important;border:none!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-file-dropzone{box-shadow:none!important;outline:none!important}.metakyc-sdk .hover\\:opacity-90:hover{opacity:.9}.metakyc-sdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.metakyc-sdk .focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.metakyc-sdk .focus\\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.metakyc-sdk .focus\\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.metakyc-sdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.metakyc-sdk .disabled\\:opacity-50:disabled{opacity:.5}.metakyc-sdk .disabled\\:opacity-60:disabled{opacity:.6}.metakyc-sdk .dark\\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(133 77 14 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:bg-blue-900\\/20:is(.dark *){background-color:#1e3a8a33}.metakyc-sdk .dark\\:bg-blue-900\\/30:is(.dark *){background-color:#1e3a8a4d}.metakyc-sdk .dark\\:bg-green-900\\/20:is(.dark *){background-color:#14532d33}.metakyc-sdk .dark\\:bg-green-900\\/30:is(.dark *){background-color:#14532d4d}.metakyc-sdk .dark\\:bg-red-900\\/20:is(.dark *){background-color:#7f1d1d33}.metakyc-sdk .dark\\:bg-red-900\\/30:is(.dark *){background-color:#7f1d1d4d}.metakyc-sdk .dark\\:bg-yellow-900\\/20:is(.dark *){background-color:#713f1233}.metakyc-sdk .dark\\:bg-yellow-900\\/30:is(.dark *){background-color:#713f124d}.metakyc-sdk .dark\\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-100:is(.dark *){--tw-text-opacity: 1;color:rgb(220 252 231 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}', Ft = "metakyc-sdk-styles";
|
|
1946
|
+
const Bt = Gt(null), Hr = "1.0.21", Wr = '.metakyc-sdk .pointer-events-none{pointer-events:none}.metakyc-sdk .visible{visibility:visible}.metakyc-sdk .static{position:static}.metakyc-sdk .fixed{position:fixed}.metakyc-sdk .absolute{position:absolute}.metakyc-sdk .relative{position:relative}.metakyc-sdk .inset-y-0{top:0;bottom:0}.metakyc-sdk .left-0{left:0}.metakyc-sdk .right-0{right:0}.metakyc-sdk .right-3{right:.75rem}.metakyc-sdk .top-1\\/2{top:50%}.metakyc-sdk .mx-4{margin-left:1rem;margin-right:1rem}.metakyc-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.metakyc-sdk .mx-auto{margin-left:auto;margin-right:auto}.metakyc-sdk .my-8{margin-top:2rem;margin-bottom:2rem}.metakyc-sdk .-ml-1{margin-left:-.25rem}.metakyc-sdk .mb-0\\.5{margin-bottom:.125rem}.metakyc-sdk .mb-1{margin-bottom:.25rem}.metakyc-sdk .mb-2{margin-bottom:.5rem}.metakyc-sdk .mb-3{margin-bottom:.75rem}.metakyc-sdk .mb-4{margin-bottom:1rem}.metakyc-sdk .mb-6{margin-bottom:1.5rem}.metakyc-sdk .ml-0\\.5{margin-left:.125rem}.metakyc-sdk .ml-1{margin-left:.25rem}.metakyc-sdk .ml-3{margin-left:.75rem}.metakyc-sdk .mr-2{margin-right:.5rem}.metakyc-sdk .mr-3{margin-right:.75rem}.metakyc-sdk .mt-0\\.5{margin-top:.125rem}.metakyc-sdk .mt-1{margin-top:.25rem}.metakyc-sdk .mt-2{margin-top:.5rem}.metakyc-sdk .mt-3{margin-top:.75rem}.metakyc-sdk .mt-4{margin-top:1rem}.metakyc-sdk .mt-6{margin-top:1.5rem}.metakyc-sdk .block{display:block}.metakyc-sdk .inline-block{display:inline-block}.metakyc-sdk .inline{display:inline}.metakyc-sdk .flex{display:flex}.metakyc-sdk .inline-flex{display:inline-flex}.metakyc-sdk .grid{display:grid}.metakyc-sdk .hidden{display:none}.metakyc-sdk .h-12{height:3rem}.metakyc-sdk .h-16{height:4rem}.metakyc-sdk .h-24{height:6rem}.metakyc-sdk .h-4{height:1rem}.metakyc-sdk .h-6{height:1.5rem}.metakyc-sdk .h-8{height:2rem}.metakyc-sdk .h-full{height:100%}.metakyc-sdk .max-h-52{max-height:13rem}.metakyc-sdk .min-h-\\[400px\\]{min-height:400px}.metakyc-sdk .w-12{width:3rem}.metakyc-sdk .w-16{width:4rem}.metakyc-sdk .w-20{width:5rem}.metakyc-sdk .w-24{width:6rem}.metakyc-sdk .w-4{width:1rem}.metakyc-sdk .w-6{width:1.5rem}.metakyc-sdk .w-8{width:2rem}.metakyc-sdk .w-full{width:100%}.metakyc-sdk .max-w-md{max-width:28rem}.metakyc-sdk .flex-1{flex:1 1 0%}.metakyc-sdk .flex-shrink-0{flex-shrink:0}.metakyc-sdk .-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.metakyc-sdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.metakyc-sdk .animate-spin{animation:spin 1s linear infinite}.metakyc-sdk .cursor-not-allowed{cursor:not-allowed}.metakyc-sdk .cursor-pointer{cursor:pointer}.metakyc-sdk .resize{resize:both}.metakyc-sdk .list-inside{list-style-position:inside}.metakyc-sdk .list-disc{list-style-type:disc}.metakyc-sdk .list-none{list-style-type:none}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.metakyc-sdk .flex-col{flex-direction:column}.metakyc-sdk .flex-wrap{flex-wrap:wrap}.metakyc-sdk .items-start{align-items:flex-start}.metakyc-sdk .items-center{align-items:center}.metakyc-sdk .justify-center{justify-content:center}.metakyc-sdk .justify-between{justify-content:space-between}.metakyc-sdk .gap-1{gap:.25rem}.metakyc-sdk .gap-1\\.5{gap:.375rem}.metakyc-sdk .gap-2{gap:.5rem}.metakyc-sdk .gap-4{gap:1rem}.metakyc-sdk :is(.space-x-3>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.metakyc-sdk :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-6>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-8>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.metakyc-sdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.metakyc-sdk .rounded{border-radius:.25rem}.metakyc-sdk .rounded-full{border-radius:9999px}.metakyc-sdk .rounded-lg{border-radius:.5rem}.metakyc-sdk .rounded-xl{border-radius:.75rem}.metakyc-sdk .border{border-width:1px}.metakyc-sdk .border-0{border-width:0px}.metakyc-sdk .border-2{border-width:2px}.metakyc-sdk .border-b{border-bottom-width:1px}.metakyc-sdk .border-t{border-top-width:1px}.metakyc-sdk .border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-danger-500{border-color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.metakyc-sdk .border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.metakyc-sdk .bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.metakyc-sdk .bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.metakyc-sdk .p-3{padding:.75rem}.metakyc-sdk .p-4{padding:1rem}.metakyc-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.metakyc-sdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}.metakyc-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.metakyc-sdk .px-4{padding-left:1rem;padding-right:1rem}.metakyc-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.metakyc-sdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.metakyc-sdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.metakyc-sdk .py-12{padding-top:3rem;padding-bottom:3rem}.metakyc-sdk .py-2{padding-top:.5rem;padding-bottom:.5rem}.metakyc-sdk .py-3{padding-top:.75rem;padding-bottom:.75rem}.metakyc-sdk .py-4{padding-top:1rem;padding-bottom:1rem}.metakyc-sdk .py-8{padding-top:2rem;padding-bottom:2rem}.metakyc-sdk .pb-4{padding-bottom:1rem}.metakyc-sdk .pl-10{padding-left:2.5rem}.metakyc-sdk .pl-3{padding-left:.75rem}.metakyc-sdk .pr-10{padding-right:2.5rem}.metakyc-sdk .pr-3{padding-right:.75rem}.metakyc-sdk .pr-6{padding-right:1.5rem}.metakyc-sdk .pt-6{padding-top:1.5rem}.metakyc-sdk .text-left{text-align:left}.metakyc-sdk .text-center{text-align:center}.metakyc-sdk .text-right{text-align:right}.metakyc-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.metakyc-sdk .text-3xl{font-size:1.875rem;line-height:2.25rem}.metakyc-sdk .text-5xl{font-size:3rem;line-height:1}.metakyc-sdk .text-base{font-size:1rem;line-height:1.5rem}.metakyc-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.metakyc-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.metakyc-sdk .text-xl{font-size:1.25rem;line-height:1.75rem}.metakyc-sdk .text-xs{font-size:.75rem;line-height:1rem}.metakyc-sdk .font-bold{font-weight:700}.metakyc-sdk .font-medium{font-weight:500}.metakyc-sdk .font-semibold{font-weight:600}.metakyc-sdk .uppercase{text-transform:uppercase}.metakyc-sdk .lowercase{text-transform:lowercase}.metakyc-sdk .tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.metakyc-sdk .leading-6{line-height:1.5rem}.metakyc-sdk .text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-danger-500{color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-primary,.metakyc-sdk .text-primary-500{color:var(--metakyc-primary, #3B82F6)}.metakyc-sdk .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-secondary{color:var(--metakyc-secondary, #64748b)}.metakyc-sdk .text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.metakyc-sdk .underline{text-decoration-line:underline}.metakyc-sdk .opacity-25{opacity:.25}.metakyc-sdk .opacity-50{opacity:.5}.metakyc-sdk .opacity-60{opacity:.6}.metakyc-sdk .opacity-75{opacity:.75}.metakyc-sdk .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.metakyc-sdk .outline{outline-style:solid}.metakyc-sdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .duration-200{transition-duration:.2s}.metakyc-sdk .grid{display:grid!important}.metakyc-sdk .flex{display:flex!important}.metakyc-sdk .inline-flex{display:inline-flex!important}.metakyc-sdk .hidden{display:none!important}.metakyc-sdk .block{display:block!important}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.metakyc-sdk .col-span-1{grid-column:span 1 / span 1!important}.metakyc-sdk .col-span-2{grid-column:span 2 / span 2!important}.metakyc-sdk .col-span-3{grid-column:span 3 / span 3!important}.metakyc-sdk .col-span-4{grid-column:span 4 / span 4!important}.metakyc-sdk .gap-1{gap:.25rem!important}.metakyc-sdk .gap-2{gap:.5rem!important}.metakyc-sdk .gap-3{gap:.75rem!important}.metakyc-sdk .gap-4{gap:1rem!important}.metakyc-sdk .gap-6{gap:1.5rem!important}.metakyc-sdk .gap-8{gap:2rem!important}.metakyc-sdk .flex-col{flex-direction:column!important}.metakyc-sdk .flex-row{flex-direction:row!important}.metakyc-sdk .flex-wrap{flex-wrap:wrap!important}.metakyc-sdk .flex-1{flex:1 1 0%!important}.metakyc-sdk .flex-shrink-0{flex-shrink:0!important}.metakyc-sdk .items-center{align-items:center!important}.metakyc-sdk .items-start{align-items:flex-start!important}.metakyc-sdk .items-end{align-items:flex-end!important}.metakyc-sdk .justify-between{justify-content:space-between!important}.metakyc-sdk .justify-center{justify-content:center!important}.metakyc-sdk .justify-end{justify-content:flex-end!important}.metakyc-sdk .justify-start{justify-content:flex-start!important}.metakyc-sdk .space-y-1>*+*{margin-top:.25rem!important}.metakyc-sdk .space-y-1\\.5>*+*{margin-top:.375rem!important}.metakyc-sdk .space-y-2>*+*{margin-top:.5rem!important}.metakyc-sdk .space-y-3>*+*{margin-top:.75rem!important}.metakyc-sdk .space-y-4>*+*{margin-top:1rem!important}.metakyc-sdk .space-y-6>*+*{margin-top:1.5rem!important}.metakyc-sdk .w-full{width:100%!important}.metakyc-sdk .relative{position:relative!important}.metakyc-sdk .absolute{position:absolute!important}.metakyc-sdk .overflow-hidden{overflow:hidden!important}.metakyc-sdk .overflow-auto{overflow:auto!important}.metakyc-sdk .overflow-x-auto{overflow-x:auto!important}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}}.metakyc-sdk *,.metakyc-sdk *:before,.metakyc-sdk *:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--metakyc-border, #e5e7eb)}.metakyc-sdk{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.metakyc-sdk img,.metakyc-sdk video{max-width:100%;height:auto}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6,.metakyc-sdk p{margin:0}.metakyc-sdk ol,.metakyc-sdk ul{list-style:none;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk input,.metakyc-sdk optgroup,.metakyc-sdk select,.metakyc-sdk textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk [role=button]{cursor:pointer}.metakyc-sdk a{color:inherit;text-decoration:inherit}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),.metakyc-sdk select,.metakyc-sdk textarea,.metakyc-sdk .metakyc-searchable-select-trigger,.metakyc-sdk .metakyc-multiselect-trigger{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-sdk input::-moz-placeholder,.metakyc-sdk textarea::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input::placeholder,.metakyc-sdk textarea::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):focus,.metakyc-sdk select:focus,.metakyc-sdk textarea:focus{outline:none!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-sdk input[type=checkbox],.metakyc-sdk input[type=radio]{appearance:none!important;-webkit-appearance:none!important;-moz-appearance:none!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex-shrink:0!important;cursor:pointer!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border:1.5px solid var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;position:relative!important;transition:background-color .15s,border-color .15s!important;vertical-align:middle!important;display:inline-block!important;padding:0!important;margin:0!important;color-scheme:light!important}.metakyc-sdk input[type=checkbox]{border-radius:4px!important}.metakyc-sdk input[type=radio]{border-radius:50%!important}.metakyc-sdk input[type=checkbox]:checked,.metakyc-sdk input[type=radio]:checked{background-color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk input[type=checkbox]:checked:after{content:""!important;display:block!important;position:absolute!important;left:4px!important;top:1px!important;width:5px!important;height:9px!important;border:2px solid #ffffff!important;border-top:none!important;border-left:none!important;transform:rotate(45deg)!important}.metakyc-sdk input[type=radio]:checked:after{content:""!important;display:block!important;position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:6px!important;height:6px!important;border-radius:50%!important;background:#fff!important}.metakyc-sdk input[type=checkbox]:focus,.metakyc-sdk input[type=radio]:focus{outline:none!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-primary, #2563eb) 30%,transparent)!important}.metakyc-searchable-select-dropdown,.metakyc-multiselect-dropdown{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important}.metakyc-searchable-select-dropdown input,.metakyc-multiselect-dropdown input{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-searchable-select-dropdown input::-moz-placeholder,.metakyc-multiselect-dropdown input::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input::placeholder,.metakyc-multiselect-dropdown input::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input:focus,.metakyc-multiselect-dropdown input:focus{outline:none!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-searchable-select-dropdown li:hover,.metakyc-multiselect-dropdown li:hover{background-color:var(--metakyc-surface, var(--metakyc-background, #f9fafb))!important}.metakyc-sdk .metakyc-help-btn{color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important;background:transparent!important;position:relative!important;z-index:2!important}.metakyc-sdk .metakyc-overview-step-item,.metakyc-sdk .metakyc-overview-step-item *,.metakyc-sdk .metakyc-step-content,.metakyc-sdk .metakyc-step-content *,.metakyc-sdk .metakyc-step-title,.metakyc-sdk .metakyc-step-title *,.metakyc-sdk .metakyc-step-icon,.metakyc-sdk .metakyc-step-icon *,.metakyc-sdk .metakyc-step-description,.metakyc-sdk .metakyc-step-description *{border-top-width:0!important;border-bottom-width:0!important;border-left-width:0!important;border-right-width:0!important;border-top-style:none!important;border-bottom-style:none!important;border-left-style:none!important;border-right-style:none!important;border-top-color:transparent!important;border-bottom-color:transparent!important;border-left-color:transparent!important;border-right-color:transparent!important;border:0!important;box-shadow:none!important;outline:none!important;outline-width:0!important;outline-style:none!important;text-decoration:none!important;text-decoration-line:none!important}.metakyc-sdk .metakyc-overview-step-item:before,.metakyc-sdk .metakyc-overview-step-item:after,.metakyc-sdk .metakyc-overview-step-item *:before,.metakyc-sdk .metakyc-overview-step-item *:after,.metakyc-sdk .metakyc-step-content:before,.metakyc-sdk .metakyc-step-content:after,.metakyc-sdk .metakyc-step-content *:before,.metakyc-sdk .metakyc-step-content *:after,.metakyc-sdk .metakyc-step-title:before,.metakyc-sdk .metakyc-step-title:after,.metakyc-sdk .metakyc-step-description:before,.metakyc-sdk .metakyc-step-description:after{content:none!important;display:none!important;visibility:hidden!important;border:none!important;box-shadow:none!important;outline:none!important;background:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-overview-step-item{border-width:0!important;border-style:none!important;border:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-content{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-title{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important;text-decoration:none!important}.metakyc-sdk hr,.metakyc-sdk .metakyc-overview-step-item hr,.metakyc-sdk .metakyc-overview-step-item * hr,.metakyc-sdk .metakyc-step-content hr,.metakyc-sdk .metakyc-step-content * hr{display:block!important;height:0!important;border:0!important;border-top:1px solid var(--metakyc-primary, #2563eb)!important;opacity:.25!important;margin:1rem 0!important;overflow:visible!important}.metakyc-sdk{background-color:var(--metakyc-background, #ffffff)!important;color:var(--metakyc-text-primary, #111827)!important;font-family:var(--metakyc-font-family, inherit)!important;padding:1.5rem!important;border-radius:.75rem!important}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6{color:var(--metakyc-text-primary, #111827);letter-spacing:normal}.metakyc-sdk .text-gray-900{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .text-gray-800{color:var(--metakyc-text-primary, #1f2937)!important}.metakyc-sdk .text-gray-700{color:var(--metakyc-text-secondary, #374151)!important}.metakyc-sdk .text-gray-600{color:var(--metakyc-text-secondary, #6b7280)!important}.metakyc-sdk .text-gray-500{color:var(--metakyc-text-muted, #6b7280)!important}.metakyc-sdk .text-gray-400{color:var(--metakyc-text-muted, #9ca3af)!important}.metakyc-sdk .text-gray-300{color:var(--metakyc-text-muted, #d1d5db)!important}.metakyc-sdk .text-white{color:#fff!important}.metakyc-sdk .bg-white{background-color:var(--metakyc-background, #ffffff)!important}.metakyc-sdk .bg-gray-50{background-color:var(--metakyc-surface, #f9fafb)!important}.metakyc-sdk .bg-gray-100{background-color:var(--metakyc-surface, #f3f4f6)!important}.metakyc-sdk .bg-gray-200{background-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-gray-800{background-color:var(--metakyc-surface, #1f2937)!important}.metakyc-sdk .border-gray-100,.metakyc-sdk .border-gray-200,.metakyc-sdk .border-gray-300{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-t{border-top-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-b{border-bottom-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .divide-gray-200>*{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-primary-500,.metakyc-sdk .bg-primary-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-primary-50,.metakyc-sdk .bg-primary-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-primary-500,.metakyc-sdk .text-primary-600,.metakyc-sdk .text-primary-800{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .text-primary-900{color:var(--metakyc-primary-dark, #1e40af)!important}.metakyc-sdk .border-primary-500,.metakyc-sdk .border-primary-600{border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-primary-50:hover{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .hover\\:bg-primary-600:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .bg-blue-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-blue-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-blue-600,.metakyc-sdk .text-blue-400{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-blue-700:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .metakyc-overview-steps h3:before,.metakyc-sdk .metakyc-overview-steps h3:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-overview-steps *:before,.metakyc-sdk .metakyc-overview-steps *:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-stepper-scroll::-webkit-scrollbar{display:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-file-dropzone:hover{border-color:var(--metakyc-primary, #2563eb)!important;background-color:color-mix(in srgb,var(--metakyc-primary, #2563eb) 3%,var(--metakyc-background, #ffffff))!important}.metakyc-sdk .metakyc-file-item:hover{background-color:color-mix(in srgb,var(--metakyc-surface, #f9fafb) 80%,var(--metakyc-border, #e5e7eb))!important}.metakyc-sdk .metakyc-file-upload label{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .metakyc-file-upload p{margin:0!important;line-height:1.4!important}.metakyc-sdk .metakyc-file-item button{background:transparent!important;border:none!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-file-dropzone{box-shadow:none!important;outline:none!important}.metakyc-sdk .hover\\:opacity-90:hover{opacity:.9}.metakyc-sdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.metakyc-sdk .focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.metakyc-sdk .focus\\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.metakyc-sdk .focus\\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.metakyc-sdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.metakyc-sdk .disabled\\:opacity-50:disabled{opacity:.5}.metakyc-sdk .disabled\\:opacity-60:disabled{opacity:.6}.metakyc-sdk .dark\\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(133 77 14 / var(--tw-border-opacity, 1))}.metakyc-sdk .dark\\:bg-blue-900\\/20:is(.dark *){background-color:#1e3a8a33}.metakyc-sdk .dark\\:bg-blue-900\\/30:is(.dark *){background-color:#1e3a8a4d}.metakyc-sdk .dark\\:bg-green-900\\/20:is(.dark *){background-color:#14532d33}.metakyc-sdk .dark\\:bg-green-900\\/30:is(.dark *){background-color:#14532d4d}.metakyc-sdk .dark\\:bg-red-900\\/20:is(.dark *){background-color:#7f1d1d33}.metakyc-sdk .dark\\:bg-red-900\\/30:is(.dark *){background-color:#7f1d1d4d}.metakyc-sdk .dark\\:bg-yellow-900\\/20:is(.dark *){background-color:#713f1233}.metakyc-sdk .dark\\:bg-yellow-900\\/30:is(.dark *){background-color:#713f124d}.metakyc-sdk .dark\\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-100:is(.dark *){--tw-text-opacity: 1;color:rgb(220 252 231 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}', Ft = "metakyc-sdk-styles";
|
|
1947
1947
|
let bt = !1;
|
|
1948
1948
|
function Ur() {
|
|
1949
1949
|
if (bt || typeof document > "u") return;
|
|
@@ -1957,7 +1957,7 @@ function Ur() {
|
|
|
1957
1957
|
const At = "metakyc-theme-cache", Ja = ({ config: e, children: t }) => {
|
|
1958
1958
|
Ur();
|
|
1959
1959
|
const [a, n] = x(null), i = we.useRef(!1), l = we.useRef(!1), c = De(() => {
|
|
1960
|
-
const y = new hr(e), p = new gr(y), b = new fr(y), F = new kr(y), S = new br(y),
|
|
1960
|
+
const y = new hr(e), p = new gr(y), b = new fr(y), F = new kr(y), S = new br(y), T = new xr(y), L = new vr(y), v = new wr(y), N = new Sr(y), B = new Cr(y), Y = new Tr(y), P = new jr();
|
|
1961
1961
|
if (typeof document < "u")
|
|
1962
1962
|
if (e.theme)
|
|
1963
1963
|
P.applyTheme(e.theme);
|
|
@@ -1974,10 +1974,10 @@ const At = "metakyc-theme-cache", Ja = ({ config: e, children: t }) => {
|
|
|
1974
1974
|
questionnaireService: b,
|
|
1975
1975
|
uploadDocumentService: F,
|
|
1976
1976
|
appropriatenessTestService: S,
|
|
1977
|
-
overviewService:
|
|
1977
|
+
overviewService: T,
|
|
1978
1978
|
riskScoringService: L,
|
|
1979
1979
|
identityService: v,
|
|
1980
|
-
baseInformationService:
|
|
1980
|
+
baseInformationService: N,
|
|
1981
1981
|
investorCategorizationService: B,
|
|
1982
1982
|
themeService: Y,
|
|
1983
1983
|
themeManager: P
|
|
@@ -2137,7 +2137,7 @@ function rn() {
|
|
|
2137
2137
|
Vr(), Gr();
|
|
2138
2138
|
}
|
|
2139
2139
|
function Jr(e) {
|
|
2140
|
-
const { createOrchestrator: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(null), y =
|
|
2140
|
+
const { createOrchestrator: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(null), y = de(null), p = e || Yr();
|
|
2141
2141
|
fe(() => {
|
|
2142
2142
|
y.current || (y.current = t());
|
|
2143
2143
|
}, [t]), fe(() => {
|
|
@@ -2151,7 +2151,7 @@ function Jr(e) {
|
|
|
2151
2151
|
nextWorkflowKey: a.nextWorkflowKey
|
|
2152
2152
|
}));
|
|
2153
2153
|
}, [a, p]);
|
|
2154
|
-
const b =
|
|
2154
|
+
const b = de(!1), F = de(!1), S = ae(async () => {
|
|
2155
2155
|
if (!(!p || !y.current)) {
|
|
2156
2156
|
if (b.current) {
|
|
2157
2157
|
console.log("[Workflow] Load already in progress, skipping...");
|
|
@@ -2171,7 +2171,7 @@ function Jr(e) {
|
|
|
2171
2171
|
fe(() => {
|
|
2172
2172
|
p && !F.current && S();
|
|
2173
2173
|
}, [p, S]);
|
|
2174
|
-
const
|
|
2174
|
+
const T = ae(async () => {
|
|
2175
2175
|
if (y.current) {
|
|
2176
2176
|
if (b.current) {
|
|
2177
2177
|
console.log("[Workflow] Refresh already in progress, skipping...");
|
|
@@ -2211,7 +2211,7 @@ function Jr(e) {
|
|
|
2211
2211
|
l(!1);
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
|
-
}, []),
|
|
2214
|
+
}, []), N = ae(async (P) => {
|
|
2215
2215
|
if (y.current) {
|
|
2216
2216
|
l(!0), d(null);
|
|
2217
2217
|
try {
|
|
@@ -2239,22 +2239,22 @@ function Jr(e) {
|
|
|
2239
2239
|
error: c,
|
|
2240
2240
|
isComplete: (a == null ? void 0 : a.status) === Oe.Finished,
|
|
2241
2241
|
isOnHold: (a == null ? void 0 : a.status) === Oe.OnHold,
|
|
2242
|
-
refreshProgress:
|
|
2242
|
+
refreshProgress: T,
|
|
2243
2243
|
moveToNext: L,
|
|
2244
2244
|
moveBack: v,
|
|
2245
|
-
submitCurrentStep:
|
|
2245
|
+
submitCurrentStep: N,
|
|
2246
2246
|
orchestrator: y.current
|
|
2247
2247
|
};
|
|
2248
2248
|
}
|
|
2249
2249
|
function Xr(e) {
|
|
2250
|
-
const { questionnaireService: t, applicantService: a } = Le(), [n, i] = x(null), [l, c] = x({}), [d, y] = x(!1), [p, b] = x(!1), [F, S] = x(null),
|
|
2250
|
+
const { questionnaireService: t, applicantService: a } = Le(), [n, i] = x(null), [l, c] = x({}), [d, y] = x(!1), [p, b] = x(!1), [F, S] = x(null), T = de(!1), L = de(null), v = ae(async () => {
|
|
2251
2251
|
var B, Y;
|
|
2252
2252
|
if (e) {
|
|
2253
|
-
if (
|
|
2253
|
+
if (T.current) {
|
|
2254
2254
|
console.log("[Questionnaire] Load already in progress, skipping...");
|
|
2255
2255
|
return;
|
|
2256
2256
|
}
|
|
2257
|
-
|
|
2257
|
+
T.current = !0, y(!0), S(null);
|
|
2258
2258
|
try {
|
|
2259
2259
|
const [P, z] = await Promise.all([
|
|
2260
2260
|
t.getQuestionnaire(e),
|
|
@@ -2262,12 +2262,12 @@ function Xr(e) {
|
|
|
2262
2262
|
]);
|
|
2263
2263
|
if (i(P), (B = z == null ? void 0 : z.questionnaireResults) != null && B.length && P) {
|
|
2264
2264
|
const Z = /* @__PURE__ */ new Map();
|
|
2265
|
-
for (const
|
|
2266
|
-
|
|
2267
|
-
const ne = {}, R = P.questionGroups.flatMap((
|
|
2268
|
-
for (const
|
|
2269
|
-
const $ =
|
|
2270
|
-
Z.has($) && (ne[
|
|
2265
|
+
for (const f of z.questionnaireResults)
|
|
2266
|
+
f.question && ((Y = f.answers) != null && Y.length) && Z.set(f.question.trim().toLowerCase(), f.answers);
|
|
2267
|
+
const ne = {}, R = P.questionGroups.flatMap((f) => f.questions ?? []);
|
|
2268
|
+
for (const f of R) {
|
|
2269
|
+
const $ = f.text.trim().toLowerCase();
|
|
2270
|
+
Z.has($) && (ne[f.id] = Z.get($));
|
|
2271
2271
|
}
|
|
2272
2272
|
c(ne);
|
|
2273
2273
|
}
|
|
@@ -2275,14 +2275,14 @@ function Xr(e) {
|
|
|
2275
2275
|
} catch (P) {
|
|
2276
2276
|
S(P);
|
|
2277
2277
|
} finally {
|
|
2278
|
-
y(!1),
|
|
2278
|
+
y(!1), T.current = !1;
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
2281
|
}, [e, t, a]);
|
|
2282
2282
|
fe(() => {
|
|
2283
2283
|
e && L.current !== e && v();
|
|
2284
2284
|
}, [e]);
|
|
2285
|
-
const
|
|
2285
|
+
const N = ae(
|
|
2286
2286
|
async (B) => {
|
|
2287
2287
|
b(!0), S(null);
|
|
2288
2288
|
try {
|
|
@@ -2302,11 +2302,11 @@ function Xr(e) {
|
|
|
2302
2302
|
isSubmitting: p,
|
|
2303
2303
|
error: F,
|
|
2304
2304
|
load: v,
|
|
2305
|
-
submit:
|
|
2305
|
+
submit: N
|
|
2306
2306
|
};
|
|
2307
2307
|
}
|
|
2308
2308
|
function Zr(e) {
|
|
2309
|
-
const { uploadDocumentService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(0), [b, F] = x(null), S =
|
|
2309
|
+
const { uploadDocumentService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(0), [b, F] = x(null), S = de(!1), T = de(null), L = ae(async () => {
|
|
2310
2310
|
if (e) {
|
|
2311
2311
|
if (S.current) {
|
|
2312
2312
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -2314,23 +2314,23 @@ function Zr(e) {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
S.current = !0, l(!0), F(null);
|
|
2316
2316
|
try {
|
|
2317
|
-
const
|
|
2318
|
-
n(
|
|
2319
|
-
} catch (
|
|
2320
|
-
F(
|
|
2317
|
+
const N = await t.getUploadDocument(e);
|
|
2318
|
+
n(N), T.current = e;
|
|
2319
|
+
} catch (N) {
|
|
2320
|
+
F(N);
|
|
2321
2321
|
} finally {
|
|
2322
2322
|
l(!1), S.current = !1;
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
2325
2325
|
}, [e, t]);
|
|
2326
2326
|
fe(() => {
|
|
2327
|
-
e &&
|
|
2327
|
+
e && T.current !== e && L();
|
|
2328
2328
|
}, [e]);
|
|
2329
2329
|
const v = ae(
|
|
2330
|
-
async (
|
|
2330
|
+
async (N) => {
|
|
2331
2331
|
d(!0), p(0), F(null);
|
|
2332
2332
|
try {
|
|
2333
|
-
await t.fillUploadDocument(
|
|
2333
|
+
await t.fillUploadDocument(N), p(100);
|
|
2334
2334
|
} catch (B) {
|
|
2335
2335
|
throw F(B), B;
|
|
2336
2336
|
} finally {
|
|
@@ -2350,7 +2350,7 @@ function Zr(e) {
|
|
|
2350
2350
|
};
|
|
2351
2351
|
}
|
|
2352
2352
|
function an(e) {
|
|
2353
|
-
const { appropriatenessTestService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(null), [b, F] = x(null), S =
|
|
2353
|
+
const { appropriatenessTestService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(null), [b, F] = x(null), S = de(!1), T = de(null), L = ae(async () => {
|
|
2354
2354
|
if (e) {
|
|
2355
2355
|
if (S.current) {
|
|
2356
2356
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -2358,23 +2358,23 @@ function an(e) {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
S.current = !0, l(!0), p(null);
|
|
2360
2360
|
try {
|
|
2361
|
-
const
|
|
2362
|
-
n(
|
|
2363
|
-
} catch (
|
|
2364
|
-
p(
|
|
2361
|
+
const N = await t.getAppropriatenessTest(e);
|
|
2362
|
+
n(N), T.current = e;
|
|
2363
|
+
} catch (N) {
|
|
2364
|
+
p(N);
|
|
2365
2365
|
} finally {
|
|
2366
2366
|
l(!1), S.current = !1;
|
|
2367
2367
|
}
|
|
2368
2368
|
}
|
|
2369
2369
|
}, [e, t]);
|
|
2370
2370
|
fe(() => {
|
|
2371
|
-
e &&
|
|
2371
|
+
e && T.current !== e && L();
|
|
2372
2372
|
}, [e]);
|
|
2373
2373
|
const v = ae(
|
|
2374
|
-
async (
|
|
2374
|
+
async (N) => {
|
|
2375
2375
|
d(!0), p(null);
|
|
2376
2376
|
try {
|
|
2377
|
-
const B = await t.fillAppropriatenessTest(
|
|
2377
|
+
const B = await t.fillAppropriatenessTest(N);
|
|
2378
2378
|
return F(B), B;
|
|
2379
2379
|
} catch (B) {
|
|
2380
2380
|
throw p(B), B;
|
|
@@ -2395,7 +2395,7 @@ function an(e) {
|
|
|
2395
2395
|
};
|
|
2396
2396
|
}
|
|
2397
2397
|
function ea(e) {
|
|
2398
|
-
const { overviewService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(null), b =
|
|
2398
|
+
const { overviewService: t } = Le(), [a, n] = x(null), [i, l] = x(!1), [c, d] = x(!1), [y, p] = x(null), b = de(!1), F = de(null), S = ae(async () => {
|
|
2399
2399
|
if (e) {
|
|
2400
2400
|
if (b.current) {
|
|
2401
2401
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -2415,7 +2415,7 @@ function ea(e) {
|
|
|
2415
2415
|
fe(() => {
|
|
2416
2416
|
e && F.current !== e && S();
|
|
2417
2417
|
}, [e]);
|
|
2418
|
-
const
|
|
2418
|
+
const T = ae(async () => {
|
|
2419
2419
|
if (e) {
|
|
2420
2420
|
d(!0), p(null);
|
|
2421
2421
|
try {
|
|
@@ -2433,14 +2433,14 @@ function ea(e) {
|
|
|
2433
2433
|
isSubmitting: c,
|
|
2434
2434
|
error: y,
|
|
2435
2435
|
load: S,
|
|
2436
|
-
passOverview:
|
|
2436
|
+
passOverview: T
|
|
2437
2437
|
};
|
|
2438
2438
|
}
|
|
2439
2439
|
function ta(e) {
|
|
2440
2440
|
const { identityService: t } = Le(), [a, n] = x(
|
|
2441
2441
|
null
|
|
2442
|
-
), [i, l] = x(!1), [c, d] = x(null), y =
|
|
2443
|
-
async (S,
|
|
2442
|
+
), [i, l] = x(!1), [c, d] = x(null), y = de(!1), p = ae(
|
|
2443
|
+
async (S, T) => {
|
|
2444
2444
|
if (e) {
|
|
2445
2445
|
if (y.current) {
|
|
2446
2446
|
console.log("[Identity] Request already in progress, skipping...");
|
|
@@ -2452,7 +2452,7 @@ function ta(e) {
|
|
|
2452
2452
|
applicantId: e,
|
|
2453
2453
|
restart: !1,
|
|
2454
2454
|
redirectUrl: S || "",
|
|
2455
|
-
ttl:
|
|
2455
|
+
ttl: T || 604800
|
|
2456
2456
|
// Default: 7 days
|
|
2457
2457
|
};
|
|
2458
2458
|
console.log("Identity request input:", L);
|
|
@@ -2467,7 +2467,7 @@ function ta(e) {
|
|
|
2467
2467
|
},
|
|
2468
2468
|
[e, t]
|
|
2469
2469
|
), b = ae(
|
|
2470
|
-
async (S,
|
|
2470
|
+
async (S, T) => {
|
|
2471
2471
|
if (e) {
|
|
2472
2472
|
l(!0), d(null);
|
|
2473
2473
|
try {
|
|
@@ -2475,7 +2475,7 @@ function ta(e) {
|
|
|
2475
2475
|
applicantId: e,
|
|
2476
2476
|
restart: !1,
|
|
2477
2477
|
redirectUrl: S,
|
|
2478
|
-
ttl:
|
|
2478
|
+
ttl: T
|
|
2479
2479
|
}, v = await t.identityCompanyRequest(L);
|
|
2480
2480
|
return n(v), v;
|
|
2481
2481
|
} catch (L) {
|
|
@@ -2502,8 +2502,8 @@ function ta(e) {
|
|
|
2502
2502
|
// 7 days
|
|
2503
2503
|
};
|
|
2504
2504
|
console.log("Restarting identity with input:", S);
|
|
2505
|
-
const
|
|
2506
|
-
return console.log("Restart identity result:",
|
|
2505
|
+
const T = await t.identityRequest(S);
|
|
2506
|
+
return console.log("Restart identity result:", T), n(T), T;
|
|
2507
2507
|
} catch (S) {
|
|
2508
2508
|
throw d(S), S;
|
|
2509
2509
|
} finally {
|
|
@@ -2523,7 +2523,7 @@ function ta(e) {
|
|
|
2523
2523
|
};
|
|
2524
2524
|
}
|
|
2525
2525
|
function ra(e) {
|
|
2526
|
-
const { riskScoringService: t, applicantService: a } = Le(), [n, i] = x(null), [l, c] = x({}), [d, y] = x(!1), [p, b] = x(!1), [F, S] = x(null), [
|
|
2526
|
+
const { riskScoringService: t, applicantService: a } = Le(), [n, i] = x(null), [l, c] = x({}), [d, y] = x(!1), [p, b] = x(!1), [F, S] = x(null), [T, L] = x(null), v = de(!1), N = de(null), B = ae(async () => {
|
|
2527
2527
|
var P;
|
|
2528
2528
|
if (e) {
|
|
2529
2529
|
if (v.current) {
|
|
@@ -2538,16 +2538,16 @@ function ra(e) {
|
|
|
2538
2538
|
]);
|
|
2539
2539
|
if (i(z), (P = Z == null ? void 0 : Z.riskScoringResults) != null && P.length) {
|
|
2540
2540
|
const ne = Z.riskScoringResults[0], R = {};
|
|
2541
|
-
for (const
|
|
2542
|
-
if (
|
|
2541
|
+
for (const f of ne.riskCriteriaResults ?? [])
|
|
2542
|
+
if (f.riskCriteriaId != null && f.answer != null && f.answer !== "") {
|
|
2543
2543
|
const $ = [...new Set(
|
|
2544
|
-
|
|
2544
|
+
f.answer.split(",").map((G) => G.trim()).filter((G) => G !== "")
|
|
2545
2545
|
)];
|
|
2546
|
-
$.length > 0 && (R[
|
|
2546
|
+
$.length > 0 && (R[f.riskCriteriaId] = $);
|
|
2547
2547
|
}
|
|
2548
2548
|
c(R);
|
|
2549
2549
|
}
|
|
2550
|
-
|
|
2550
|
+
N.current = e;
|
|
2551
2551
|
} catch (z) {
|
|
2552
2552
|
S(z);
|
|
2553
2553
|
} finally {
|
|
@@ -2556,7 +2556,7 @@ function ra(e) {
|
|
|
2556
2556
|
}
|
|
2557
2557
|
}, [e, t, a]);
|
|
2558
2558
|
fe(() => {
|
|
2559
|
-
e &&
|
|
2559
|
+
e && N.current !== e && B();
|
|
2560
2560
|
}, [e]);
|
|
2561
2561
|
const Y = ae(
|
|
2562
2562
|
async (P) => {
|
|
@@ -2575,7 +2575,7 @@ function ra(e) {
|
|
|
2575
2575
|
return {
|
|
2576
2576
|
criteria: n,
|
|
2577
2577
|
initialAnswers: l,
|
|
2578
|
-
result:
|
|
2578
|
+
result: T,
|
|
2579
2579
|
isLoading: d,
|
|
2580
2580
|
isSubmitting: p,
|
|
2581
2581
|
error: F,
|
|
@@ -2584,24 +2584,24 @@ function ra(e) {
|
|
|
2584
2584
|
};
|
|
2585
2585
|
}
|
|
2586
2586
|
function _t() {
|
|
2587
|
-
const { applicantService: e, config: t } = Le(), [a, n] = x(!1), [i, l] = x(null), c =
|
|
2587
|
+
const { applicantService: e, config: t } = Le(), [a, n] = x(!1), [i, l] = x(null), c = de(!1), d = de(!1), y = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(T) {
|
|
2588
2588
|
const L = Math.random() * 16 | 0;
|
|
2589
|
-
return (
|
|
2589
|
+
return (T === "x" ? L : L & 3 | 8).toString(16);
|
|
2590
2590
|
}), p = ae(
|
|
2591
|
-
async (
|
|
2591
|
+
async (T) => {
|
|
2592
2592
|
var L;
|
|
2593
2593
|
if (c.current)
|
|
2594
2594
|
throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
|
|
2595
2595
|
c.current = !0, n(!0), l(null);
|
|
2596
2596
|
try {
|
|
2597
|
-
if (
|
|
2598
|
-
const
|
|
2599
|
-
console.log("[SardinAI] Generated session key:",
|
|
2597
|
+
if (T.applicantAdditionalDatas || (T.applicantAdditionalDatas = []), (L = t.identityProviders) != null && L.sardinai) {
|
|
2598
|
+
const N = y();
|
|
2599
|
+
console.log("[SardinAI] Generated session key:", N), T.applicantAdditionalDatas.push({
|
|
2600
2600
|
paramName: "sessionKey",
|
|
2601
|
-
value:
|
|
2601
|
+
value: N
|
|
2602
2602
|
});
|
|
2603
2603
|
}
|
|
2604
|
-
return await e.createApplicant(
|
|
2604
|
+
return await e.createApplicant(T);
|
|
2605
2605
|
} catch (v) {
|
|
2606
2606
|
throw l(v), v;
|
|
2607
2607
|
} finally {
|
|
@@ -2610,10 +2610,10 @@ function _t() {
|
|
|
2610
2610
|
},
|
|
2611
2611
|
[e, t]
|
|
2612
2612
|
), b = ae(
|
|
2613
|
-
async (
|
|
2613
|
+
async (T) => {
|
|
2614
2614
|
n(!0), l(null);
|
|
2615
2615
|
try {
|
|
2616
|
-
return await e.createCompanyApplicant(
|
|
2616
|
+
return await e.createCompanyApplicant(T);
|
|
2617
2617
|
} catch (L) {
|
|
2618
2618
|
throw l(L), L;
|
|
2619
2619
|
} finally {
|
|
@@ -2622,12 +2622,12 @@ function _t() {
|
|
|
2622
2622
|
},
|
|
2623
2623
|
[e]
|
|
2624
2624
|
), F = ae(
|
|
2625
|
-
async (
|
|
2625
|
+
async (T) => {
|
|
2626
2626
|
if (d.current)
|
|
2627
2627
|
throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
|
|
2628
2628
|
d.current = !0, n(!0), l(null);
|
|
2629
2629
|
try {
|
|
2630
|
-
return await e.getApplicantData(
|
|
2630
|
+
return await e.getApplicantData(T);
|
|
2631
2631
|
} catch (L) {
|
|
2632
2632
|
throw l(L), L;
|
|
2633
2633
|
} finally {
|
|
@@ -2636,10 +2636,10 @@ function _t() {
|
|
|
2636
2636
|
},
|
|
2637
2637
|
[e]
|
|
2638
2638
|
), S = ae(
|
|
2639
|
-
async (
|
|
2639
|
+
async (T) => {
|
|
2640
2640
|
n(!0), l(null);
|
|
2641
2641
|
try {
|
|
2642
|
-
await e.stopProgress(
|
|
2642
|
+
await e.stopProgress(T);
|
|
2643
2643
|
} catch (L) {
|
|
2644
2644
|
throw l(L), L;
|
|
2645
2645
|
} finally {
|
|
@@ -3066,7 +3066,7 @@ const Tt = 280, oa = ({
|
|
|
3066
3066
|
readOnly: c = !1,
|
|
3067
3067
|
required: d = !1
|
|
3068
3068
|
}) => {
|
|
3069
|
-
const y = l || c, [p, b] = x(!1), [F, S] = x(""), [
|
|
3069
|
+
const y = l || c, [p, b] = x(!1), [F, S] = x(""), [T, L] = x(null), [v, N] = x({
|
|
3070
3070
|
bg: "#ffffff",
|
|
3071
3071
|
borderColor: "#d1d5db",
|
|
3072
3072
|
textPrimary: "#111827",
|
|
@@ -3074,13 +3074,13 @@ const Tt = 280, oa = ({
|
|
|
3074
3074
|
primaryColor: "#2563eb",
|
|
3075
3075
|
primaryLight: "#eff6ff",
|
|
3076
3076
|
hoverBg: "#f9fafb"
|
|
3077
|
-
}), B =
|
|
3077
|
+
}), B = de(null), Y = de(null), P = de(null), z = ae(() => {
|
|
3078
3078
|
if (!Y.current) return null;
|
|
3079
|
-
const
|
|
3080
|
-
return { top: _ ?
|
|
3079
|
+
const A = Y.current.getBoundingClientRect(), _ = window.innerHeight - A.bottom < Tt && A.top > Tt;
|
|
3080
|
+
return { top: _ ? A.top : A.bottom + 4, left: A.left, width: A.width, openUp: _ };
|
|
3081
3081
|
}, []), Z = ae(() => {
|
|
3082
|
-
const
|
|
3083
|
-
|
|
3082
|
+
const A = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), U = (H, ge) => A.getPropertyValue(H).trim() || ge, _ = U("--metakyc-input-bg", U("--metakyc-background", "#ffffff"));
|
|
3083
|
+
N({
|
|
3084
3084
|
bg: _,
|
|
3085
3085
|
borderColor: U("--metakyc-input-border", U("--metakyc-border", "#d1d5db")),
|
|
3086
3086
|
textPrimary: U("--metakyc-input-text", U("--metakyc-text-primary", "#111827")),
|
|
@@ -3092,49 +3092,49 @@ const Tt = 280, oa = ({
|
|
|
3092
3092
|
}, []), ne = ae(() => {
|
|
3093
3093
|
if (y) return;
|
|
3094
3094
|
Z();
|
|
3095
|
-
const
|
|
3096
|
-
|
|
3095
|
+
const A = z();
|
|
3096
|
+
A && L(A), b(!0);
|
|
3097
3097
|
}, [y, z, Z]), R = ae(() => {
|
|
3098
3098
|
b(!1), S("");
|
|
3099
3099
|
}, []);
|
|
3100
3100
|
fe(() => {
|
|
3101
3101
|
if (!p) return;
|
|
3102
|
-
const
|
|
3102
|
+
const A = (U) => {
|
|
3103
3103
|
var H, ge;
|
|
3104
3104
|
const _ = U.target;
|
|
3105
3105
|
!((H = B.current) != null && H.contains(_)) && !((ge = P.current) != null && ge.contains(_)) && R();
|
|
3106
3106
|
};
|
|
3107
|
-
return document.addEventListener("mousedown",
|
|
3107
|
+
return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
|
|
3108
3108
|
}, [p, R]), fe(() => {
|
|
3109
3109
|
if (!p) return;
|
|
3110
|
-
const
|
|
3110
|
+
const A = () => {
|
|
3111
3111
|
const U = z();
|
|
3112
3112
|
U && L(U);
|
|
3113
3113
|
};
|
|
3114
|
-
return window.addEventListener("scroll",
|
|
3115
|
-
window.removeEventListener("scroll",
|
|
3114
|
+
return window.addEventListener("scroll", A, !0), window.addEventListener("resize", A), () => {
|
|
3115
|
+
window.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A);
|
|
3116
3116
|
};
|
|
3117
3117
|
}, [p, z]);
|
|
3118
|
-
const
|
|
3119
|
-
(
|
|
3120
|
-
), $ = (
|
|
3121
|
-
y || a(t.includes(
|
|
3122
|
-
}, G = (
|
|
3123
|
-
U.stopPropagation(), y || a(t.filter((_) => _ !==
|
|
3124
|
-
}, V = (
|
|
3118
|
+
const f = n.filter(
|
|
3119
|
+
(A) => A.label.toLowerCase().includes(F.toLowerCase())
|
|
3120
|
+
), $ = (A) => {
|
|
3121
|
+
y || a(t.includes(A) ? t.filter((U) => U !== A) : [...t, A]);
|
|
3122
|
+
}, G = (A, U) => {
|
|
3123
|
+
U.stopPropagation(), y || a(t.filter((_) => _ !== A));
|
|
3124
|
+
}, V = (A) => {
|
|
3125
3125
|
var U;
|
|
3126
|
-
return ((U = n.find((_) => _.value ===
|
|
3127
|
-
}, { bg: j, borderColor: Q, textPrimary: ie, textSecondary: q, primaryColor: ve, primaryLight:
|
|
3126
|
+
return ((U = n.find((_) => _.value === A)) == null ? void 0 : U.label) || A;
|
|
3127
|
+
}, { bg: j, borderColor: Q, textPrimary: ie, textSecondary: q, primaryColor: ve, primaryLight: pe, hoverBg: ue } = v, xe = p && T && /* @__PURE__ */ o(
|
|
3128
3128
|
"div",
|
|
3129
3129
|
{
|
|
3130
3130
|
ref: P,
|
|
3131
3131
|
className: "metakyc-multiselect-dropdown",
|
|
3132
3132
|
style: {
|
|
3133
3133
|
position: "fixed",
|
|
3134
|
-
top:
|
|
3135
|
-
bottom:
|
|
3136
|
-
left:
|
|
3137
|
-
width:
|
|
3134
|
+
top: T.openUp ? void 0 : T.top,
|
|
3135
|
+
bottom: T.openUp ? window.innerHeight - T.top + 4 : void 0,
|
|
3136
|
+
left: T.left,
|
|
3137
|
+
width: T.width,
|
|
3138
3138
|
zIndex: 99999,
|
|
3139
3139
|
borderRadius: "8px",
|
|
3140
3140
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
@@ -3148,10 +3148,10 @@ const Tt = 280, oa = ({
|
|
|
3148
3148
|
{
|
|
3149
3149
|
type: "text",
|
|
3150
3150
|
value: F,
|
|
3151
|
-
onChange: (
|
|
3151
|
+
onChange: (A) => S(A.target.value),
|
|
3152
3152
|
placeholder: "Search...",
|
|
3153
3153
|
autoFocus: !0,
|
|
3154
|
-
onClick: (
|
|
3154
|
+
onClick: (A) => A.stopPropagation(),
|
|
3155
3155
|
className: "metakyc-multiselect-search w-full",
|
|
3156
3156
|
style: {
|
|
3157
3157
|
display: "block",
|
|
@@ -3165,21 +3165,21 @@ const Tt = 280, oa = ({
|
|
|
3165
3165
|
outline: "none",
|
|
3166
3166
|
boxSizing: "border-box"
|
|
3167
3167
|
},
|
|
3168
|
-
onFocus: (
|
|
3168
|
+
onFocus: (A) => {
|
|
3169
3169
|
const U = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), _ = U.getPropertyValue("--metakyc-input-border-focus").trim() || U.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
|
|
3170
|
-
|
|
3170
|
+
A.currentTarget.style.backgroundColor = j, A.currentTarget.style.color = ie, A.currentTarget.style.borderColor = _, A.currentTarget.style.outline = "none", A.currentTarget.style.boxShadow = `0 0 0 2px ${_}33`;
|
|
3171
3171
|
},
|
|
3172
|
-
onBlur: (
|
|
3173
|
-
|
|
3172
|
+
onBlur: (A) => {
|
|
3173
|
+
A.currentTarget.style.backgroundColor = j, A.currentTarget.style.color = ie, A.currentTarget.style.borderColor = Q, A.currentTarget.style.outline = "none", A.currentTarget.style.boxShadow = "none";
|
|
3174
3174
|
}
|
|
3175
3175
|
}
|
|
3176
3176
|
) }),
|
|
3177
|
-
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children:
|
|
3178
|
-
const U = t.includes(
|
|
3177
|
+
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: f.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: q }, children: "No results" }) : f.map((A) => {
|
|
3178
|
+
const U = t.includes(A.value);
|
|
3179
3179
|
return /* @__PURE__ */ o(
|
|
3180
3180
|
"li",
|
|
3181
3181
|
{
|
|
3182
|
-
onClick: () => $(
|
|
3182
|
+
onClick: () => $(A.value),
|
|
3183
3183
|
className: "metakyc-multiselect-option",
|
|
3184
3184
|
style: {
|
|
3185
3185
|
display: "flex",
|
|
@@ -3188,7 +3188,7 @@ const Tt = 280, oa = ({
|
|
|
3188
3188
|
padding: "8px 12px",
|
|
3189
3189
|
fontSize: "13px",
|
|
3190
3190
|
cursor: "pointer",
|
|
3191
|
-
backgroundColor: U ?
|
|
3191
|
+
backgroundColor: U ? pe : "transparent",
|
|
3192
3192
|
color: U ? ve : ie,
|
|
3193
3193
|
userSelect: "none"
|
|
3194
3194
|
},
|
|
@@ -3207,10 +3207,10 @@ const Tt = 280, oa = ({
|
|
|
3207
3207
|
}
|
|
3208
3208
|
}
|
|
3209
3209
|
),
|
|
3210
|
-
/* @__PURE__ */ r("span", { children:
|
|
3210
|
+
/* @__PURE__ */ r("span", { children: A.label })
|
|
3211
3211
|
]
|
|
3212
3212
|
},
|
|
3213
|
-
|
|
3213
|
+
A.value
|
|
3214
3214
|
);
|
|
3215
3215
|
}) }),
|
|
3216
3216
|
t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${Q}` }, children: /* @__PURE__ */ o(
|
|
@@ -3268,7 +3268,7 @@ const Tt = 280, oa = ({
|
|
|
3268
3268
|
style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
|
|
3269
3269
|
children: i
|
|
3270
3270
|
}
|
|
3271
|
-
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((
|
|
3271
|
+
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((A) => /* @__PURE__ */ o(
|
|
3272
3272
|
"span",
|
|
3273
3273
|
{
|
|
3274
3274
|
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
|
|
@@ -3277,12 +3277,12 @@ const Tt = 280, oa = ({
|
|
|
3277
3277
|
color: "var(--metakyc-primary, #2563eb)"
|
|
3278
3278
|
},
|
|
3279
3279
|
children: [
|
|
3280
|
-
V(
|
|
3280
|
+
V(A),
|
|
3281
3281
|
!y && /* @__PURE__ */ r(
|
|
3282
3282
|
"button",
|
|
3283
3283
|
{
|
|
3284
3284
|
type: "button",
|
|
3285
|
-
onClick: (U) => G(
|
|
3285
|
+
onClick: (U) => G(A, U),
|
|
3286
3286
|
className: "metakyc-multiselect-chip-remove",
|
|
3287
3287
|
style: {
|
|
3288
3288
|
background: "transparent",
|
|
@@ -3308,7 +3308,7 @@ const Tt = 280, oa = ({
|
|
|
3308
3308
|
)
|
|
3309
3309
|
]
|
|
3310
3310
|
},
|
|
3311
|
-
|
|
3311
|
+
A
|
|
3312
3312
|
)) }),
|
|
3313
3313
|
/* @__PURE__ */ r(
|
|
3314
3314
|
"span",
|
|
@@ -3337,7 +3337,7 @@ const Tt = 280, oa = ({
|
|
|
3337
3337
|
className: b
|
|
3338
3338
|
}) => {
|
|
3339
3339
|
var ge;
|
|
3340
|
-
const F = d || y, [S,
|
|
3340
|
+
const F = d || y, [S, T] = x(!1), [L, v] = x(""), [N, B] = x(null), [Y, P] = x({
|
|
3341
3341
|
bg: "#ffffff",
|
|
3342
3342
|
border: "#d1d5db",
|
|
3343
3343
|
text: "#111827",
|
|
@@ -3356,7 +3356,7 @@ const Tt = 280, oa = ({
|
|
|
3356
3356
|
primaryLight: ee("--metakyc-primary-light", "#eff6ff"),
|
|
3357
3357
|
hoverBg: ee("--metakyc-surface", ye)
|
|
3358
3358
|
});
|
|
3359
|
-
}, []), Z =
|
|
3359
|
+
}, []), Z = de(null), ne = de(null), R = de(null), f = de(null), $ = ae(() => {
|
|
3360
3360
|
if (!ne.current) return null;
|
|
3361
3361
|
const E = ne.current.getBoundingClientRect(), ye = window.innerHeight - E.bottom < Lt && E.top > Lt;
|
|
3362
3362
|
return {
|
|
@@ -3369,9 +3369,9 @@ const Tt = 280, oa = ({
|
|
|
3369
3369
|
if (F) return;
|
|
3370
3370
|
z();
|
|
3371
3371
|
const E = $();
|
|
3372
|
-
E && B(E),
|
|
3372
|
+
E && B(E), T(!0);
|
|
3373
3373
|
}, [F, $, z]), V = ae(() => {
|
|
3374
|
-
|
|
3374
|
+
T(!1), v("");
|
|
3375
3375
|
}, []), j = () => S ? V() : G();
|
|
3376
3376
|
fe(() => {
|
|
3377
3377
|
if (!S) return;
|
|
@@ -3391,38 +3391,38 @@ const Tt = 280, oa = ({
|
|
|
3391
3391
|
window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
|
|
3392
3392
|
};
|
|
3393
3393
|
}, [S, $]), fe(() => {
|
|
3394
|
-
S &&
|
|
3394
|
+
S && f.current && setTimeout(() => {
|
|
3395
3395
|
var E;
|
|
3396
|
-
return (E =
|
|
3396
|
+
return (E = f.current) == null ? void 0 : E.focus();
|
|
3397
3397
|
}, 0);
|
|
3398
3398
|
}, [S]);
|
|
3399
3399
|
const Q = n.filter(
|
|
3400
3400
|
(E) => E.label.toLowerCase().includes(L.toLowerCase()) || E.value.toLowerCase().includes(L.toLowerCase())
|
|
3401
3401
|
), ie = (ge = n.find((E) => E.value === l)) == null ? void 0 : ge.label, q = (E, ee) => {
|
|
3402
3402
|
F || ee || (c(E), V());
|
|
3403
|
-
}, { bg: ve, border:
|
|
3403
|
+
}, { bg: ve, border: pe, text: ue, textSecondary: xe, primary: A, primaryLight: U, hoverBg: _ } = Y, H = S && N && /* @__PURE__ */ o(
|
|
3404
3404
|
"div",
|
|
3405
3405
|
{
|
|
3406
3406
|
ref: R,
|
|
3407
3407
|
className: "metakyc-searchable-select-dropdown",
|
|
3408
3408
|
style: {
|
|
3409
3409
|
position: "fixed",
|
|
3410
|
-
top:
|
|
3411
|
-
bottom:
|
|
3412
|
-
left:
|
|
3413
|
-
width:
|
|
3410
|
+
top: N.openUp ? void 0 : N.top,
|
|
3411
|
+
bottom: N.openUp ? window.innerHeight - N.top + 4 : void 0,
|
|
3412
|
+
left: N.left,
|
|
3413
|
+
width: N.width,
|
|
3414
3414
|
zIndex: 99999,
|
|
3415
3415
|
borderRadius: "8px",
|
|
3416
3416
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
3417
|
-
border: `1px solid ${
|
|
3417
|
+
border: `1px solid ${pe}`,
|
|
3418
3418
|
backgroundColor: ve,
|
|
3419
3419
|
overflow: "hidden"
|
|
3420
3420
|
},
|
|
3421
3421
|
children: [
|
|
3422
|
-
/* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${
|
|
3422
|
+
/* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${pe}` }, children: /* @__PURE__ */ r(
|
|
3423
3423
|
"input",
|
|
3424
3424
|
{
|
|
3425
|
-
ref:
|
|
3425
|
+
ref: f,
|
|
3426
3426
|
type: "text",
|
|
3427
3427
|
value: L,
|
|
3428
3428
|
onChange: (E) => v(E.target.value),
|
|
@@ -3435,7 +3435,7 @@ const Tt = 280, oa = ({
|
|
|
3435
3435
|
padding: "6px 8px",
|
|
3436
3436
|
fontSize: "13px",
|
|
3437
3437
|
borderRadius: "6px",
|
|
3438
|
-
border: `1px solid ${
|
|
3438
|
+
border: `1px solid ${pe}`,
|
|
3439
3439
|
backgroundColor: ve,
|
|
3440
3440
|
color: ue,
|
|
3441
3441
|
outline: "none",
|
|
@@ -3446,7 +3446,7 @@ const Tt = 280, oa = ({
|
|
|
3446
3446
|
E.currentTarget.style.backgroundColor = ve, E.currentTarget.style.color = ue, E.currentTarget.style.borderColor = ye, E.currentTarget.style.outline = "none", E.currentTarget.style.boxShadow = `0 0 0 2px ${ye}33`;
|
|
3447
3447
|
},
|
|
3448
3448
|
onBlur: (E) => {
|
|
3449
|
-
E.currentTarget.style.backgroundColor = ve, E.currentTarget.style.color = ue, E.currentTarget.style.borderColor =
|
|
3449
|
+
E.currentTarget.style.backgroundColor = ve, E.currentTarget.style.color = ue, E.currentTarget.style.borderColor = pe, E.currentTarget.style.outline = "none", E.currentTarget.style.boxShadow = "none";
|
|
3450
3450
|
}
|
|
3451
3451
|
}
|
|
3452
3452
|
) }),
|
|
@@ -3473,7 +3473,7 @@ const Tt = 280, oa = ({
|
|
|
3473
3473
|
cursor: E.disabled ? "not-allowed" : "pointer",
|
|
3474
3474
|
opacity: E.disabled ? 0.4 : 1,
|
|
3475
3475
|
backgroundColor: ee ? U : "transparent",
|
|
3476
|
-
color: ee ?
|
|
3476
|
+
color: ee ? A : ue,
|
|
3477
3477
|
userSelect: "none"
|
|
3478
3478
|
},
|
|
3479
3479
|
onMouseEnter: (ye) => {
|
|
@@ -3571,16 +3571,16 @@ const la = ({
|
|
|
3571
3571
|
value: y = [],
|
|
3572
3572
|
className: p
|
|
3573
3573
|
}) => {
|
|
3574
|
-
const [b, F] = x(!1), [S,
|
|
3574
|
+
const [b, F] = x(!1), [S, T] = x(null), L = de(null), v = ae((R) => {
|
|
3575
3575
|
if (!R) return;
|
|
3576
|
-
|
|
3577
|
-
const
|
|
3578
|
-
if (l &&
|
|
3579
|
-
|
|
3576
|
+
T(null);
|
|
3577
|
+
const f = Array.from(R);
|
|
3578
|
+
if (l && f.filter((G) => G.size > l).length > 0) {
|
|
3579
|
+
T(`File exceeds the maximum size of ${xt(l)}`);
|
|
3580
3580
|
return;
|
|
3581
3581
|
}
|
|
3582
|
-
d == null || d(i ? [...y, ...
|
|
3583
|
-
}, [l, i, d, y]),
|
|
3582
|
+
d == null || d(i ? [...y, ...f] : [f[0]]);
|
|
3583
|
+
}, [l, i, d, y]), N = ae((R) => {
|
|
3584
3584
|
R.preventDefault(), R.stopPropagation(), F(!0);
|
|
3585
3585
|
}, []), B = ae((R) => {
|
|
3586
3586
|
R.preventDefault(), R.stopPropagation(), F(!1);
|
|
@@ -3590,9 +3590,9 @@ const la = ({
|
|
|
3590
3590
|
var R;
|
|
3591
3591
|
(R = L.current) == null || R.click();
|
|
3592
3592
|
}, z = (R) => {
|
|
3593
|
-
|
|
3594
|
-
const
|
|
3595
|
-
d == null || d(
|
|
3593
|
+
T(null);
|
|
3594
|
+
const f = y.filter(($, G) => G !== R);
|
|
3595
|
+
d == null || d(f);
|
|
3596
3596
|
}, Z = a || S, ne = y.length > 0;
|
|
3597
3597
|
return /* @__PURE__ */ o("div", { className: Te("metakyc-file-upload", p), style: { width: "100%" }, children: [
|
|
3598
3598
|
e && /* @__PURE__ */ o("div", { style: { marginBottom: "8px" }, children: [
|
|
@@ -3618,7 +3618,7 @@ const la = ({
|
|
|
3618
3618
|
{
|
|
3619
3619
|
className: "metakyc-file-dropzone",
|
|
3620
3620
|
onClick: P,
|
|
3621
|
-
onDragOver:
|
|
3621
|
+
onDragOver: N,
|
|
3622
3622
|
onDragLeave: B,
|
|
3623
3623
|
onDrop: Y,
|
|
3624
3624
|
style: {
|
|
@@ -3698,7 +3698,7 @@ const la = ({
|
|
|
3698
3698
|
]
|
|
3699
3699
|
}
|
|
3700
3700
|
),
|
|
3701
|
-
ne && /* @__PURE__ */ r("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: y.map((R,
|
|
3701
|
+
ne && /* @__PURE__ */ r("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: y.map((R, f) => {
|
|
3702
3702
|
const $ = sa(R), G = $ === "image", V = G ? URL.createObjectURL(R) : null;
|
|
3703
3703
|
return /* @__PURE__ */ o(
|
|
3704
3704
|
"div",
|
|
@@ -3765,7 +3765,7 @@ const la = ({
|
|
|
3765
3765
|
{
|
|
3766
3766
|
type: "button",
|
|
3767
3767
|
onClick: (j) => {
|
|
3768
|
-
j.stopPropagation(), z(
|
|
3768
|
+
j.stopPropagation(), z(f);
|
|
3769
3769
|
},
|
|
3770
3770
|
style: {
|
|
3771
3771
|
display: "flex",
|
|
@@ -3796,7 +3796,7 @@ const la = ({
|
|
|
3796
3796
|
)
|
|
3797
3797
|
]
|
|
3798
3798
|
},
|
|
3799
|
-
`${R.name}-${
|
|
3799
|
+
`${R.name}-${f}`
|
|
3800
3800
|
);
|
|
3801
3801
|
}) }),
|
|
3802
3802
|
Z && /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", marginTop: "6px" }, children: Z })
|
|
@@ -4026,29 +4026,29 @@ const ba = ({
|
|
|
4026
4026
|
onComplete: t,
|
|
4027
4027
|
onBack: a
|
|
4028
4028
|
}) => {
|
|
4029
|
-
const { questionnaire: n, initialAnswers: i, isLoading: l, isSubmitting: c, error: d, submit: y } = Xr(e), [p, b] = x({}), [F, S] = x({}), [
|
|
4029
|
+
const { questionnaire: n, initialAnswers: i, isLoading: l, isSubmitting: c, error: d, submit: y } = Xr(e), [p, b] = x({}), [F, S] = x({}), [T, L] = x(0);
|
|
4030
4030
|
we.useEffect(() => {
|
|
4031
4031
|
i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && b(i);
|
|
4032
4032
|
}, [i]);
|
|
4033
4033
|
const v = De(
|
|
4034
4034
|
() => n ? ka(n.questionGroups) : [],
|
|
4035
4035
|
[n]
|
|
4036
|
-
),
|
|
4037
|
-
b(($) => ({ ...$, [R]:
|
|
4036
|
+
), N = T === v.length - 1, B = v[T] ?? [], Y = ae((R, f) => {
|
|
4037
|
+
b(($) => ({ ...$, [R]: f })), S(($) => {
|
|
4038
4038
|
const G = { ...$ };
|
|
4039
4039
|
return delete G[R], G;
|
|
4040
4040
|
});
|
|
4041
4041
|
}, []), P = ae(() => {
|
|
4042
4042
|
const R = {};
|
|
4043
|
-
for (const { question:
|
|
4044
|
-
const $ = fa(
|
|
4045
|
-
$ && (R[
|
|
4043
|
+
for (const { question: f } of B) {
|
|
4044
|
+
const $ = fa(f, p[f.id] ?? []);
|
|
4045
|
+
$ && (R[f.id] = $);
|
|
4046
4046
|
}
|
|
4047
|
-
return S((
|
|
4047
|
+
return S((f) => ({ ...f, ...R })), Object.keys(R).length === 0;
|
|
4048
4048
|
}, [B, p]), z = () => {
|
|
4049
4049
|
P() && L((R) => R + 1);
|
|
4050
4050
|
}, Z = () => {
|
|
4051
|
-
|
|
4051
|
+
T > 0 ? L((R) => R - 1) : a == null || a();
|
|
4052
4052
|
}, ne = async () => {
|
|
4053
4053
|
if (!(!P() || !n))
|
|
4054
4054
|
try {
|
|
@@ -4057,12 +4057,12 @@ const ba = ({
|
|
|
4057
4057
|
questionId: G.id,
|
|
4058
4058
|
values: p[G.id] ?? []
|
|
4059
4059
|
}))
|
|
4060
|
-
),
|
|
4060
|
+
), f = {
|
|
4061
4061
|
applicantId: e,
|
|
4062
4062
|
questionnarieId: n.id,
|
|
4063
4063
|
questionResults: R
|
|
4064
4064
|
};
|
|
4065
|
-
await y(
|
|
4065
|
+
await y(f), t == null || t();
|
|
4066
4066
|
} catch (R) {
|
|
4067
4067
|
console.error("Questionnaire submit error:", R);
|
|
4068
4068
|
}
|
|
@@ -4077,21 +4077,21 @@ const ba = ({
|
|
|
4077
4077
|
v.length > 1 && /* @__PURE__ */ o("div", { className: "flex items-center justify-between mt-3", children: [
|
|
4078
4078
|
/* @__PURE__ */ o("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
4079
4079
|
"Page ",
|
|
4080
|
-
|
|
4080
|
+
T + 1,
|
|
4081
4081
|
" of ",
|
|
4082
4082
|
v.length
|
|
4083
4083
|
] }),
|
|
4084
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: v.map((R,
|
|
4084
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: v.map((R, f) => /* @__PURE__ */ r(
|
|
4085
4085
|
"div",
|
|
4086
4086
|
{
|
|
4087
4087
|
className: "rounded-full transition-all duration-200",
|
|
4088
4088
|
style: {
|
|
4089
4089
|
height: "6px",
|
|
4090
|
-
width:
|
|
4091
|
-
backgroundColor:
|
|
4090
|
+
width: f === T ? "20px" : "6px",
|
|
4091
|
+
backgroundColor: f <= T ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
4092
4092
|
}
|
|
4093
4093
|
},
|
|
4094
|
-
|
|
4094
|
+
f
|
|
4095
4095
|
)) })
|
|
4096
4096
|
] })
|
|
4097
4097
|
] }),
|
|
@@ -4101,7 +4101,7 @@ const ba = ({
|
|
|
4101
4101
|
question: R,
|
|
4102
4102
|
value: p[R.id] ?? [],
|
|
4103
4103
|
error: F[R.id],
|
|
4104
|
-
onChange: (
|
|
4104
|
+
onChange: (f) => Y(R.id, f)
|
|
4105
4105
|
},
|
|
4106
4106
|
R.id
|
|
4107
4107
|
)) }),
|
|
@@ -4115,11 +4115,11 @@ const ba = ({
|
|
|
4115
4115
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
4116
4116
|
children: [
|
|
4117
4117
|
/* @__PURE__ */ r(Ut, { size: 14 }),
|
|
4118
|
-
|
|
4118
|
+
T > 0 ? "Previous" : "Back"
|
|
4119
4119
|
]
|
|
4120
4120
|
}
|
|
4121
4121
|
),
|
|
4122
|
-
|
|
4122
|
+
N ? /* @__PURE__ */ r(
|
|
4123
4123
|
J,
|
|
4124
4124
|
{
|
|
4125
4125
|
type: "button",
|
|
@@ -4248,23 +4248,23 @@ const wa = ({
|
|
|
4248
4248
|
onComplete: t,
|
|
4249
4249
|
onBack: a
|
|
4250
4250
|
}) => {
|
|
4251
|
-
const { uploadDocument: n, isLoading: i, isSubmitting: l, error: c, submit: d } = Zr(e), [y, p] = x({}), [b, F] = x(null), [S,
|
|
4251
|
+
const { uploadDocument: n, isLoading: i, isSubmitting: l, error: c, submit: d } = Zr(e), [y, p] = x({}), [b, F] = x(null), [S, T] = x(0), [L, v] = x({}), N = De(
|
|
4252
4252
|
() => n ? va(n.uploadDocumentFiles) : [],
|
|
4253
4253
|
[n]
|
|
4254
|
-
), B =
|
|
4255
|
-
const
|
|
4254
|
+
), B = N[S] ?? [], Y = S === N.length - 1, P = N.length, z = ae(() => {
|
|
4255
|
+
const f = {};
|
|
4256
4256
|
for (const $ of B)
|
|
4257
|
-
$.isRequired && (y[$.id] || []).length === 0 && (
|
|
4258
|
-
return v(
|
|
4257
|
+
$.isRequired && (y[$.id] || []).length === 0 && (f[$.id] = `${$.displayName} is required`);
|
|
4258
|
+
return v(f), Object.keys(f).length === 0;
|
|
4259
4259
|
}, [B, y]), Z = () => {
|
|
4260
|
-
z() && (
|
|
4260
|
+
z() && (T((f) => f + 1), v({}));
|
|
4261
4261
|
}, ne = () => {
|
|
4262
|
-
S > 0 ? (
|
|
4262
|
+
S > 0 ? (T((f) => f - 1), v({})) : a == null || a();
|
|
4263
4263
|
}, R = async () => {
|
|
4264
4264
|
if (!(!z() || !n)) {
|
|
4265
4265
|
F(null);
|
|
4266
4266
|
try {
|
|
4267
|
-
const
|
|
4267
|
+
const f = await Promise.all(
|
|
4268
4268
|
n.uploadDocumentFiles.map(async (G) => {
|
|
4269
4269
|
const V = y[G.id] || [], j = await Promise.all(
|
|
4270
4270
|
V.map(async (Q) => ({
|
|
@@ -4280,11 +4280,11 @@ const wa = ({
|
|
|
4280
4280
|
), $ = {
|
|
4281
4281
|
applicantId: e,
|
|
4282
4282
|
uploadDocumentId: n.id,
|
|
4283
|
-
uploadDocumentResults:
|
|
4283
|
+
uploadDocumentResults: f
|
|
4284
4284
|
};
|
|
4285
4285
|
await d($), t == null || t();
|
|
4286
|
-
} catch (
|
|
4287
|
-
F((
|
|
4286
|
+
} catch (f) {
|
|
4287
|
+
F((f == null ? void 0 : f.message) || "Failed to submit documents. Please try again.");
|
|
4288
4288
|
}
|
|
4289
4289
|
}
|
|
4290
4290
|
};
|
|
@@ -4339,7 +4339,7 @@ const wa = ({
|
|
|
4339
4339
|
" of ",
|
|
4340
4340
|
P
|
|
4341
4341
|
] }),
|
|
4342
|
-
/* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children:
|
|
4342
|
+
/* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: N.map((f, $) => /* @__PURE__ */ r(
|
|
4343
4343
|
"div",
|
|
4344
4344
|
{
|
|
4345
4345
|
style: {
|
|
@@ -4390,25 +4390,25 @@ const wa = ({
|
|
|
4390
4390
|
lineHeight: 1.5
|
|
4391
4391
|
}, children: n.description })
|
|
4392
4392
|
] }),
|
|
4393
|
-
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: B.map((
|
|
4393
|
+
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: B.map((f) => /* @__PURE__ */ r(
|
|
4394
4394
|
la,
|
|
4395
4395
|
{
|
|
4396
|
-
label:
|
|
4397
|
-
subtitle:
|
|
4398
|
-
accept:
|
|
4399
|
-
multiple:
|
|
4400
|
-
maxSize:
|
|
4401
|
-
required:
|
|
4402
|
-
error: L[
|
|
4403
|
-
value: y[
|
|
4396
|
+
label: f.displayName,
|
|
4397
|
+
subtitle: f.subtitle,
|
|
4398
|
+
accept: f.allowedTypes,
|
|
4399
|
+
multiple: f.multipleFile,
|
|
4400
|
+
maxSize: f.maxEachFileSizeByte,
|
|
4401
|
+
required: f.isRequired,
|
|
4402
|
+
error: L[f.id],
|
|
4403
|
+
value: y[f.id] || [],
|
|
4404
4404
|
onChange: ($) => {
|
|
4405
4405
|
F(null), v((G) => {
|
|
4406
4406
|
const V = { ...G };
|
|
4407
|
-
return delete V[
|
|
4408
|
-
}), p((G) => ({ ...G, [
|
|
4407
|
+
return delete V[f.id], V;
|
|
4408
|
+
}), p((G) => ({ ...G, [f.id]: $ }));
|
|
4409
4409
|
}
|
|
4410
4410
|
},
|
|
4411
|
-
|
|
4411
|
+
f.id
|
|
4412
4412
|
)) }) }),
|
|
4413
4413
|
b && /* @__PURE__ */ o("div", { style: {
|
|
4414
4414
|
margin: "0 24px",
|
|
@@ -4570,7 +4570,7 @@ const Aa = ({
|
|
|
4570
4570
|
onComplete: t,
|
|
4571
4571
|
onBack: a
|
|
4572
4572
|
}) => {
|
|
4573
|
-
const { config: n } = Le(), i = n.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: d, isSubmitting: y, error: p, submit: b } = ra(e), [F, S] = x({}), [
|
|
4573
|
+
const { config: n } = Le(), i = n.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: d, isSubmitting: y, error: p, submit: b } = ra(e), [F, S] = x({}), [T, L] = x({}), [v, N] = x(0), [B, Y] = x(!1);
|
|
4574
4574
|
we.useEffect(() => {
|
|
4575
4575
|
c && Object.keys(c).length > 0 && Object.keys(F).length === 0 && S(c);
|
|
4576
4576
|
}, [c]);
|
|
@@ -4593,10 +4593,10 @@ const Aa = ({
|
|
|
4593
4593
|
Q && (V[j.id] = Q);
|
|
4594
4594
|
}
|
|
4595
4595
|
return L((j) => ({ ...j, ...V })), Object.keys(V).length === 0;
|
|
4596
|
-
}, [Z, F]),
|
|
4597
|
-
R() &&
|
|
4596
|
+
}, [Z, F]), f = () => {
|
|
4597
|
+
R() && N((V) => V + 1);
|
|
4598
4598
|
}, $ = () => {
|
|
4599
|
-
v > 0 ?
|
|
4599
|
+
v > 0 ? N((V) => V - 1) : a == null || a();
|
|
4600
4600
|
}, G = async () => {
|
|
4601
4601
|
if (!(!R() || !l))
|
|
4602
4602
|
try {
|
|
@@ -4648,7 +4648,7 @@ const Aa = ({
|
|
|
4648
4648
|
{
|
|
4649
4649
|
criterion: V,
|
|
4650
4650
|
value: F[V.id] ?? [],
|
|
4651
|
-
error:
|
|
4651
|
+
error: T[V.id],
|
|
4652
4652
|
locale: i,
|
|
4653
4653
|
onChange: (j) => ne(V.id, j)
|
|
4654
4654
|
},
|
|
@@ -4672,7 +4672,7 @@ const Aa = ({
|
|
|
4672
4672
|
J,
|
|
4673
4673
|
{
|
|
4674
4674
|
type: "button",
|
|
4675
|
-
onClick:
|
|
4675
|
+
onClick: f,
|
|
4676
4676
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
4677
4677
|
children: [
|
|
4678
4678
|
"Next",
|
|
@@ -4803,8 +4803,8 @@ const Aa = ({
|
|
|
4803
4803
|
investorType: i
|
|
4804
4804
|
};
|
|
4805
4805
|
console.log("Submitting investor categorization:", S);
|
|
4806
|
-
const
|
|
4807
|
-
console.log("Investor categorization result:",
|
|
4806
|
+
const T = await n.setInvestorCategorization(S);
|
|
4807
|
+
console.log("Investor categorization result:", T), t == null || t();
|
|
4808
4808
|
} catch (S) {
|
|
4809
4809
|
console.error("Error submitting investor categorization:", S), p(S.message || "Failed to submit investor categorization");
|
|
4810
4810
|
} finally {
|
|
@@ -4940,7 +4940,7 @@ const Pa = ({
|
|
|
4940
4940
|
onComplete: t,
|
|
4941
4941
|
onBack: a
|
|
4942
4942
|
}) => {
|
|
4943
|
-
const { appropriatenessTestService: n } = Le(), [i, l] = x(null), [c, d] = x(!0), [y, p] = x(!1), [b, F] = x(null), [S,
|
|
4943
|
+
const { appropriatenessTestService: n } = Le(), [i, l] = x(null), [c, d] = x(!0), [y, p] = x(!1), [b, F] = x(null), [S, T] = x({}), [L, v] = x(0), [N, B] = x(!1), [Y, P] = x(!1), [z, Z] = x(0), [ne, R] = x(0), [f, $] = x(null);
|
|
4944
4944
|
fe(() => {
|
|
4945
4945
|
(async () => {
|
|
4946
4946
|
try {
|
|
@@ -4957,12 +4957,12 @@ const Pa = ({
|
|
|
4957
4957
|
}
|
|
4958
4958
|
})();
|
|
4959
4959
|
}, [e, n]), fe(() => {
|
|
4960
|
-
if (!
|
|
4960
|
+
if (!N || L <= 0) return;
|
|
4961
4961
|
const _ = setInterval(() => {
|
|
4962
4962
|
v((H) => H <= 1 ? (P(!0), 0) : H - 1);
|
|
4963
4963
|
}, 1e3);
|
|
4964
4964
|
return () => clearInterval(_);
|
|
4965
|
-
}, [
|
|
4965
|
+
}, [N, L]), fe(() => {
|
|
4966
4966
|
if (z <= 0) return;
|
|
4967
4967
|
const _ = setInterval(() => {
|
|
4968
4968
|
Z((H) => H <= 1 ? 0 : H - 1);
|
|
@@ -4972,9 +4972,9 @@ const Pa = ({
|
|
|
4972
4972
|
Y && !y && Q();
|
|
4973
4973
|
}, [Y]);
|
|
4974
4974
|
const G = () => {
|
|
4975
|
-
i && (B(!0), v(i.testDurationSec), R(0),
|
|
4975
|
+
i && (B(!0), v(i.testDurationSec), R(0), T({}), F(null));
|
|
4976
4976
|
}, V = (_, H) => {
|
|
4977
|
-
|
|
4977
|
+
T((ge) => ({ ...ge, [_]: H }));
|
|
4978
4978
|
}, j = ae(async () => {
|
|
4979
4979
|
try {
|
|
4980
4980
|
const _ = await n.getAppropriatenessTest(e);
|
|
@@ -5018,7 +5018,7 @@ const Pa = ({
|
|
|
5018
5018
|
}
|
|
5019
5019
|
}
|
|
5020
5020
|
}, ie = () => {
|
|
5021
|
-
B(!1), P(!1),
|
|
5021
|
+
B(!1), P(!1), T({}), R(0);
|
|
5022
5022
|
};
|
|
5023
5023
|
if (c)
|
|
5024
5024
|
return /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
|
|
@@ -5030,7 +5030,7 @@ const Pa = ({
|
|
|
5030
5030
|
/* @__PURE__ */ r("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: "No test data available" }),
|
|
5031
5031
|
b && /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: b })
|
|
5032
5032
|
] }) }) });
|
|
5033
|
-
const q = i.testAllowedMaxTry - i.totalFailedTries, ve = i.appropriatenessQuestions.length,
|
|
5033
|
+
const q = i.testAllowedMaxTry - i.totalFailedTries, ve = i.appropriatenessQuestions.length, pe = Object.keys(S).length;
|
|
5034
5034
|
if (z > 0)
|
|
5035
5035
|
return /* @__PURE__ */ o(te, { children: [
|
|
5036
5036
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: i.displayName }) }),
|
|
@@ -5061,7 +5061,7 @@ const Pa = ({
|
|
|
5061
5061
|
}, children: /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: b }) })
|
|
5062
5062
|
] }) })
|
|
5063
5063
|
] });
|
|
5064
|
-
if (
|
|
5064
|
+
if (f) {
|
|
5065
5065
|
const _ = () => {
|
|
5066
5066
|
$(null), ie(), F(null);
|
|
5067
5067
|
};
|
|
@@ -5081,8 +5081,8 @@ const Pa = ({
|
|
|
5081
5081
|
display: "flex",
|
|
5082
5082
|
alignItems: "center",
|
|
5083
5083
|
justifyContent: "center",
|
|
5084
|
-
backgroundColor:
|
|
5085
|
-
}, children:
|
|
5084
|
+
backgroundColor: f.success ? "color-mix(in srgb, var(--metakyc-success, #10b981) 12%, transparent)" : "color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent)"
|
|
5085
|
+
}, children: f.success ? /* @__PURE__ */ o("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-success, #10b981)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5086
5086
|
/* @__PURE__ */ r("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
5087
5087
|
/* @__PURE__ */ r("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
5088
5088
|
] }) : /* @__PURE__ */ o("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -5093,9 +5093,9 @@ const Pa = ({
|
|
|
5093
5093
|
/* @__PURE__ */ r("h2", { style: {
|
|
5094
5094
|
fontSize: "20px",
|
|
5095
5095
|
fontWeight: 700,
|
|
5096
|
-
color:
|
|
5096
|
+
color: f.success ? "var(--metakyc-success, #10b981)" : "var(--metakyc-danger, #ef4444)",
|
|
5097
5097
|
margin: 0
|
|
5098
|
-
}, children:
|
|
5098
|
+
}, children: f.success ? "Test Passed" : "Test Failed" }),
|
|
5099
5099
|
/* @__PURE__ */ r("p", { style: {
|
|
5100
5100
|
fontSize: "14px",
|
|
5101
5101
|
color: "var(--metakyc-text-secondary, #6b7280)",
|
|
@@ -5103,8 +5103,8 @@ const Pa = ({
|
|
|
5103
5103
|
lineHeight: 1.6,
|
|
5104
5104
|
maxWidth: "400px",
|
|
5105
5105
|
whiteSpace: "pre-line"
|
|
5106
|
-
}, children:
|
|
5107
|
-
!
|
|
5106
|
+
}, children: f.message }),
|
|
5107
|
+
!f.success && q > 0 && /* @__PURE__ */ r("div", { style: {
|
|
5108
5108
|
marginTop: "4px",
|
|
5109
5109
|
padding: "10px 20px",
|
|
5110
5110
|
borderRadius: "10px",
|
|
@@ -5121,7 +5121,7 @@ const Pa = ({
|
|
|
5121
5121
|
q !== 1 ? "s" : "",
|
|
5122
5122
|
" remaining"
|
|
5123
5123
|
] }) }),
|
|
5124
|
-
!
|
|
5124
|
+
!f.success && q <= 0 && /* @__PURE__ */ r("div", { style: {
|
|
5125
5125
|
marginTop: "4px",
|
|
5126
5126
|
padding: "10px 20px",
|
|
5127
5127
|
borderRadius: "10px",
|
|
@@ -5133,14 +5133,14 @@ const Pa = ({
|
|
|
5133
5133
|
margin: 0
|
|
5134
5134
|
}, children: "No attempts remaining. Please contact support for assistance." }) })
|
|
5135
5135
|
] }) }),
|
|
5136
|
-
/* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children:
|
|
5136
|
+
/* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children: f.success ? /* @__PURE__ */ r(J, { type: "button", onClick: () => t == null ? void 0 : t(), children: "Continue" }) : /* @__PURE__ */ o(ct, { children: [
|
|
5137
5137
|
q > 0 && z <= 0 && /* @__PURE__ */ r(J, { type: "button", onClick: _, children: "Retake Test" }),
|
|
5138
5138
|
q > 0 && z > 0 && /* @__PURE__ */ r(J, { type: "button", onClick: _, children: "OK" }),
|
|
5139
5139
|
q <= 0 && a && /* @__PURE__ */ r(J, { type: "button", variant: "outline", onClick: a, children: "Back" })
|
|
5140
5140
|
] }) }) })
|
|
5141
5141
|
] });
|
|
5142
5142
|
}
|
|
5143
|
-
if (!
|
|
5143
|
+
if (!N)
|
|
5144
5144
|
return /* @__PURE__ */ o(te, { children: [
|
|
5145
5145
|
/* @__PURE__ */ o(Se, { children: [
|
|
5146
5146
|
/* @__PURE__ */ r("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: i.displayName }),
|
|
@@ -5209,7 +5209,7 @@ const Pa = ({
|
|
|
5209
5209
|
/* @__PURE__ */ r(J, { type: "button", onClick: G, disabled: q <= 0, children: "Start Test" })
|
|
5210
5210
|
] }) })
|
|
5211
5211
|
] });
|
|
5212
|
-
const ue = i.appropriatenessQuestions[ne], xe = ne === ve - 1,
|
|
5212
|
+
const ue = i.appropriatenessQuestions[ne], xe = ne === ve - 1, A = pe === ve, U = L <= 60;
|
|
5213
5213
|
return /* @__PURE__ */ o(te, { children: [
|
|
5214
5214
|
/* @__PURE__ */ o(Se, { children: [
|
|
5215
5215
|
/* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
@@ -5267,7 +5267,7 @@ const Pa = ({
|
|
|
5267
5267
|
height: "100%",
|
|
5268
5268
|
borderRadius: "999px",
|
|
5269
5269
|
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
5270
|
-
width: `${
|
|
5270
|
+
width: `${pe / ve * 100}%`,
|
|
5271
5271
|
transition: "width 0.3s ease"
|
|
5272
5272
|
} }) }),
|
|
5273
5273
|
/* @__PURE__ */ o("div", { style: {
|
|
@@ -5276,7 +5276,7 @@ const Pa = ({
|
|
|
5276
5276
|
marginTop: "4px"
|
|
5277
5277
|
}, children: [
|
|
5278
5278
|
/* @__PURE__ */ o("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
5279
|
-
|
|
5279
|
+
pe,
|
|
5280
5280
|
" answered"
|
|
5281
5281
|
] }),
|
|
5282
5282
|
/* @__PURE__ */ o("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
@@ -5376,14 +5376,14 @@ const Pa = ({
|
|
|
5376
5376
|
children: "Next"
|
|
5377
5377
|
}
|
|
5378
5378
|
),
|
|
5379
|
-
(xe ||
|
|
5379
|
+
(xe || A) && /* @__PURE__ */ r(
|
|
5380
5380
|
J,
|
|
5381
5381
|
{
|
|
5382
5382
|
type: "button",
|
|
5383
5383
|
isLoading: y,
|
|
5384
5384
|
onClick: () => Q(),
|
|
5385
|
-
disabled: !
|
|
5386
|
-
style: { opacity:
|
|
5385
|
+
disabled: !A && !Y,
|
|
5386
|
+
style: { opacity: A || Y ? 1 : 0.5 },
|
|
5387
5387
|
children: Y ? "Submitting..." : "Submit Test"
|
|
5388
5388
|
}
|
|
5389
5389
|
)
|
|
@@ -5522,7 +5522,7 @@ const Pa = ({
|
|
|
5522
5522
|
onBack: a
|
|
5523
5523
|
}) => {
|
|
5524
5524
|
var Ze, He, ot, Qe;
|
|
5525
|
-
const { applicantService: n, baseInformationService: i, identityService: l, config: c, currentTheme: d } = Le(), { identityData: y, provider: p, token: b, isLoading: F, error: S, requestIdentity:
|
|
5525
|
+
const { applicantService: n, baseInformationService: i, identityService: l, config: c, currentTheme: d } = Le(), { identityData: y, provider: p, token: b, isLoading: F, error: S, requestIdentity: T, restartIdentity: L } = ta(e), [v, N] = x(null), [B, Y] = x(null), [P, z] = x([]), [Z, ne] = x([]), [R, f] = x(!0), [$, G] = x(!1), [V, j] = x(null), [Q, ie] = x(!1), q = we.useRef(!1), [ve, pe] = x({}), [ue, xe] = x({}), A = d != null && d.reviewPageFields && d.reviewPageFields.length > 0 ? d.reviewPageFields[0] : null, U = !!(d != null && d.reviewPageDisabled), _ = de(!1);
|
|
5526
5526
|
_.current = U;
|
|
5527
5527
|
const H = Zt({
|
|
5528
5528
|
defaultValues: {
|
|
@@ -5537,7 +5537,7 @@ const Pa = ({
|
|
|
5537
5537
|
});
|
|
5538
5538
|
fe(() => {
|
|
5539
5539
|
if (U) {
|
|
5540
|
-
q.current || (q.current = !0,
|
|
5540
|
+
q.current || (q.current = !0, T().then(() => G(!0)).catch((O) => console.error("[Identity] Auto-request failed:", O)).finally(() => f(!1)));
|
|
5541
5541
|
return;
|
|
5542
5542
|
}
|
|
5543
5543
|
(async () => {
|
|
@@ -5551,10 +5551,10 @@ const Pa = ({
|
|
|
5551
5551
|
Y(O);
|
|
5552
5552
|
const X = /* @__PURE__ */ new Set(), u = K.map((g) => ({ value: g.abbreviation3 || g.abbreviation, label: g.name })).filter((g) => !g.value || X.has(g.value) ? !1 : (X.add(g.value), !0));
|
|
5553
5553
|
z(u);
|
|
5554
|
-
const
|
|
5554
|
+
const I = /* @__PURE__ */ new Set(), D = W.filter((g) => g.countryCode).map((g) => ({ value: g.countryCode, label: `${g.countryCode} – ${g.name}` })).filter((g) => I.has(g.value) ? !1 : (I.add(g.value), !0));
|
|
5555
5555
|
ne(D);
|
|
5556
5556
|
const m = O.applicantRequestData;
|
|
5557
|
-
if (
|
|
5557
|
+
if (pe({
|
|
5558
5558
|
firstName: (m == null ? void 0 : m.firstName) || "",
|
|
5559
5559
|
lastName: (m == null ? void 0 : m.lastName) || "",
|
|
5560
5560
|
email: (m == null ? void 0 : m.email) || "",
|
|
@@ -5587,7 +5587,7 @@ const Pa = ({
|
|
|
5587
5587
|
}), O.kycRecords && O.kycRecords.length > 0 && O.kycRecords[0].providerTokenObject !== null && !q.current && _.current) {
|
|
5588
5588
|
console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), q.current = !0;
|
|
5589
5589
|
try {
|
|
5590
|
-
await
|
|
5590
|
+
await T(), G(!0);
|
|
5591
5591
|
} catch (g) {
|
|
5592
5592
|
console.error("[Identity] Auto-request failed:", g);
|
|
5593
5593
|
}
|
|
@@ -5595,7 +5595,7 @@ const Pa = ({
|
|
|
5595
5595
|
} catch (O) {
|
|
5596
5596
|
console.error("Error loading applicant data:", O);
|
|
5597
5597
|
} finally {
|
|
5598
|
-
|
|
5598
|
+
f(!1);
|
|
5599
5599
|
}
|
|
5600
5600
|
})();
|
|
5601
5601
|
}, [e]), fe(() => {
|
|
@@ -5639,7 +5639,7 @@ const Pa = ({
|
|
|
5639
5639
|
console.log("[Sumsub] Verification complete:", X), t == null || t();
|
|
5640
5640
|
}), W.onError((X) => {
|
|
5641
5641
|
console.error("[Sumsub] SDK error:", X), (typeof X == "string" ? X : (X == null ? void 0 : X.message) || "Unknown error").toLowerCase().includes("expired") && (ie(!0), j("Session expired. Please restart."));
|
|
5642
|
-
}), await W.initialize("sumsub-websdk-container"), console.log("[Sumsub] Web SDK launched"),
|
|
5642
|
+
}), await W.initialize("sumsub-websdk-container"), console.log("[Sumsub] Web SDK launched"), N(W);
|
|
5643
5643
|
} catch (O) {
|
|
5644
5644
|
console.error("[Sumsub] Initialization error:", O), j(`Failed to initialize: ${O.message || O}`), String(O.message || O).toLowerCase().includes("expired") && ie(!0);
|
|
5645
5645
|
}
|
|
@@ -5658,7 +5658,7 @@ const Pa = ({
|
|
|
5658
5658
|
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", O);
|
|
5659
5659
|
}
|
|
5660
5660
|
}
|
|
5661
|
-
|
|
5661
|
+
N({ type: "url", url: b.url });
|
|
5662
5662
|
} catch (O) {
|
|
5663
5663
|
console.error("[Identity] Invalid URL:", O), j("Invalid verification URL. Please restart."), ie(!0);
|
|
5664
5664
|
}
|
|
@@ -5669,7 +5669,7 @@ const Pa = ({
|
|
|
5669
5669
|
try {
|
|
5670
5670
|
const O = Je.parseProviderConfig(p, b, c), K = Je.createProvider(p, O);
|
|
5671
5671
|
K.initialize().then(() => {
|
|
5672
|
-
console.log("[SardinAI] Risk SDK initialized successfully"),
|
|
5672
|
+
console.log("[SardinAI] Risk SDK initialized successfully"), N(K), setTimeout(() => t == null ? void 0 : t(), 2e3);
|
|
5673
5673
|
}).catch((W) => {
|
|
5674
5674
|
var u;
|
|
5675
5675
|
console.error("[SardinAI] Failed to initialize:", W);
|
|
@@ -5686,7 +5686,7 @@ const Pa = ({
|
|
|
5686
5686
|
const O = Je.parseProviderConfig(p, b, c), K = Je.createProvider(p, O);
|
|
5687
5687
|
h === ze.Onfido && K.initialize("identity-container").catch((W) => {
|
|
5688
5688
|
console.error("[Onfido] Initialization error:", W), j(`Failed to initialize: ${W.message}`);
|
|
5689
|
-
}),
|
|
5689
|
+
}), N(K);
|
|
5690
5690
|
} catch (O) {
|
|
5691
5691
|
console.error("[Identity] Provider setup error:", O), j(`Setup error: ${O.message}`);
|
|
5692
5692
|
}
|
|
@@ -5702,13 +5702,13 @@ const Pa = ({
|
|
|
5702
5702
|
}, [p, b, v, $, t, Q, ge, e, c, l]);
|
|
5703
5703
|
const E = async () => {
|
|
5704
5704
|
try {
|
|
5705
|
-
j(null), ie(!1), await
|
|
5705
|
+
j(null), ie(!1), await T(), G(!0);
|
|
5706
5706
|
} catch (h) {
|
|
5707
5707
|
console.error("Error starting identity verification:", h);
|
|
5708
5708
|
}
|
|
5709
5709
|
}, ee = async () => {
|
|
5710
5710
|
try {
|
|
5711
|
-
j(null), ie(!1),
|
|
5711
|
+
j(null), ie(!1), N(null), console.log("[Identity] Restarting verification..."), await L(), G(!0);
|
|
5712
5712
|
} catch (h) {
|
|
5713
5713
|
console.error("Error restarting identity verification:", h), j(h.message || "Failed to restart verification");
|
|
5714
5714
|
}
|
|
@@ -5864,9 +5864,9 @@ const Pa = ({
|
|
|
5864
5864
|
var K, W, X;
|
|
5865
5865
|
console.log("[Identity] Iframe loaded");
|
|
5866
5866
|
try {
|
|
5867
|
-
const u = O.target,
|
|
5868
|
-
if (
|
|
5869
|
-
const D = ((X = (W =
|
|
5867
|
+
const u = O.target, I = u.contentDocument || ((K = u.contentWindow) == null ? void 0 : K.document);
|
|
5868
|
+
if (I) {
|
|
5869
|
+
const D = ((X = (W = I.body) == null ? void 0 : W.textContent) == null ? void 0 : X.toLowerCase()) || "";
|
|
5870
5870
|
(D.includes("expired") || D.includes("invalid") || D.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), ie(!0), j("Your verification link has expired."));
|
|
5871
5871
|
}
|
|
5872
5872
|
} catch {
|
|
@@ -5907,7 +5907,7 @@ const Pa = ({
|
|
|
5907
5907
|
}
|
|
5908
5908
|
return String(O);
|
|
5909
5909
|
}, $e = ({ helpText: h }) => {
|
|
5910
|
-
const [O, K] = x(!1), W =
|
|
5910
|
+
const [O, K] = x(!1), W = de(null), [, X] = x({ top: 0, left: 0 });
|
|
5911
5911
|
return /* @__PURE__ */ o(ct, { children: [
|
|
5912
5912
|
/* @__PURE__ */ r(
|
|
5913
5913
|
"button",
|
|
@@ -5917,8 +5917,8 @@ const Pa = ({
|
|
|
5917
5917
|
ref: W,
|
|
5918
5918
|
onClick: () => {
|
|
5919
5919
|
if (W.current) {
|
|
5920
|
-
const
|
|
5921
|
-
X({ top:
|
|
5920
|
+
const I = W.current.getBoundingClientRect();
|
|
5921
|
+
X({ top: I.bottom + window.scrollY + 6, left: I.left + window.scrollX });
|
|
5922
5922
|
}
|
|
5923
5923
|
K(!0);
|
|
5924
5924
|
},
|
|
@@ -5962,7 +5962,7 @@ const Pa = ({
|
|
|
5962
5962
|
children: /* @__PURE__ */ o(
|
|
5963
5963
|
"div",
|
|
5964
5964
|
{
|
|
5965
|
-
onClick: (
|
|
5965
|
+
onClick: (I) => I.stopPropagation(),
|
|
5966
5966
|
style: {
|
|
5967
5967
|
background: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
|
|
5968
5968
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
@@ -6048,7 +6048,7 @@ const Pa = ({
|
|
|
6048
6048
|
Be,
|
|
6049
6049
|
{
|
|
6050
6050
|
checked: !!u,
|
|
6051
|
-
onChange: (
|
|
6051
|
+
onChange: (I) => xe((D) => ({ ...D, [W]: String(I) })),
|
|
6052
6052
|
style: { marginTop: 2 }
|
|
6053
6053
|
}
|
|
6054
6054
|
),
|
|
@@ -6061,7 +6061,7 @@ const Pa = ({
|
|
|
6061
6061
|
) }, K);
|
|
6062
6062
|
}
|
|
6063
6063
|
if (h.customType === "group_checkbox") {
|
|
6064
|
-
const u = Array.isArray(X) ? X : X ? [X] : [],
|
|
6064
|
+
const u = Array.isArray(X) ? X : X ? [X] : [], I = (D) => {
|
|
6065
6065
|
h.singleSelect ? xe((m) => ({ ...m, [W]: u[0] === D ? [] : [D] })) : xe((m) => ({
|
|
6066
6066
|
...m,
|
|
6067
6067
|
[W]: u.includes(D) ? u.filter((s) => s !== D) : [...u, D]
|
|
@@ -6075,7 +6075,7 @@ const Pa = ({
|
|
|
6075
6075
|
Be,
|
|
6076
6076
|
{
|
|
6077
6077
|
checked: u.includes(D.value),
|
|
6078
|
-
onChange: () =>
|
|
6078
|
+
onChange: () => I(D.value),
|
|
6079
6079
|
style: { marginTop: 2 }
|
|
6080
6080
|
}
|
|
6081
6081
|
),
|
|
@@ -6096,7 +6096,7 @@ const Pa = ({
|
|
|
6096
6096
|
name: `rg-${W}`,
|
|
6097
6097
|
value: u.value,
|
|
6098
6098
|
checked: X === u.value,
|
|
6099
|
-
onChange: () => xe((
|
|
6099
|
+
onChange: () => xe((I) => ({ ...I, [W]: u.value })),
|
|
6100
6100
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
6101
6101
|
}
|
|
6102
6102
|
),
|
|
@@ -6110,21 +6110,21 @@ const Pa = ({
|
|
|
6110
6110
|
{
|
|
6111
6111
|
label: h.displayText || h.label || W,
|
|
6112
6112
|
value: String(X ?? ""),
|
|
6113
|
-
onChange: (u) => xe((
|
|
6113
|
+
onChange: (u) => xe((I) => ({ ...I, [W]: u.target.value }))
|
|
6114
6114
|
}
|
|
6115
6115
|
),
|
|
6116
6116
|
h.helpText
|
|
6117
6117
|
) }, K);
|
|
6118
6118
|
}, it = (h, O) => {
|
|
6119
6119
|
if (h.isCustom) return je(h, O);
|
|
6120
|
-
const K = h.name ?? "", W = nt[K], X = h.displayText || (W == null ? void 0 : W.label) || K, u = ve[K] ?? "",
|
|
6121
|
-
return h.editable ?
|
|
6120
|
+
const K = h.name ?? "", W = nt[K], X = h.displayText || (W == null ? void 0 : W.label) || K, u = ve[K] ?? "", I = K === "mobileCountryCode", D = !!(W != null && W.countriesType) && !I;
|
|
6121
|
+
return h.editable ? I ? /* @__PURE__ */ r("div", { style: oe(h.colSpan ?? 2), children: Ie(
|
|
6122
6122
|
/* @__PURE__ */ r(
|
|
6123
6123
|
Ye,
|
|
6124
6124
|
{
|
|
6125
6125
|
label: X,
|
|
6126
6126
|
value: String(u),
|
|
6127
|
-
onChange: (m) =>
|
|
6127
|
+
onChange: (m) => pe((s) => ({ ...s, [K]: m })),
|
|
6128
6128
|
options: [{ value: "", label: "Select country code…" }, ...Z]
|
|
6129
6129
|
}
|
|
6130
6130
|
),
|
|
@@ -6135,7 +6135,7 @@ const Pa = ({
|
|
|
6135
6135
|
{
|
|
6136
6136
|
label: X,
|
|
6137
6137
|
value: String(u),
|
|
6138
|
-
onChange: (m) =>
|
|
6138
|
+
onChange: (m) => pe((s) => ({ ...s, [K]: m })),
|
|
6139
6139
|
options: [{ value: "", label: `Select ${X.toLowerCase()}…` }, ...P]
|
|
6140
6140
|
}
|
|
6141
6141
|
),
|
|
@@ -6147,7 +6147,7 @@ const Pa = ({
|
|
|
6147
6147
|
label: X,
|
|
6148
6148
|
type: (W == null ? void 0 : W.type) === "date" ? "date" : (W == null ? void 0 : W.type) === "email" ? "email" : "text",
|
|
6149
6149
|
value: String(u),
|
|
6150
|
-
onChange: (m) =>
|
|
6150
|
+
onChange: (m) => pe((s) => ({ ...s, [K]: m.target.value }))
|
|
6151
6151
|
}
|
|
6152
6152
|
),
|
|
6153
6153
|
h.helpText
|
|
@@ -6159,8 +6159,8 @@ const Pa = ({
|
|
|
6159
6159
|
h.helpText
|
|
6160
6160
|
) }, `ro-${O}`);
|
|
6161
6161
|
};
|
|
6162
|
-
if (
|
|
6163
|
-
const h =
|
|
6162
|
+
if (A) {
|
|
6163
|
+
const h = A.title || "Review Your Information", O = A.subtitle || "Please review and confirm your information before starting identity verification";
|
|
6164
6164
|
return /* @__PURE__ */ r("form", { onSubmit: (K) => {
|
|
6165
6165
|
K.preventDefault(), E();
|
|
6166
6166
|
}, children: /* @__PURE__ */ o(te, { children: [
|
|
@@ -6168,7 +6168,7 @@ const Pa = ({
|
|
|
6168
6168
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: h }),
|
|
6169
6169
|
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: O })
|
|
6170
6170
|
] }),
|
|
6171
|
-
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children:
|
|
6171
|
+
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: A.fields.map((K, W) => it(K, W)) }) }),
|
|
6172
6172
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
6173
6173
|
a && /* @__PURE__ */ r(J, { type: "button", variant: "outline", onClick: a, children: "Back" }),
|
|
6174
6174
|
/* @__PURE__ */ r(J, { type: "submit", isLoading: F, children: "Confirm and Start Verification" })
|
|
@@ -6568,36 +6568,36 @@ const $a = {
|
|
|
6568
6568
|
onSuccess: a,
|
|
6569
6569
|
onCancel: n
|
|
6570
6570
|
}) => {
|
|
6571
|
-
var K, W, X, u,
|
|
6571
|
+
var K, W, X, u, I, D, m;
|
|
6572
6572
|
const { config: i, baseInformationService: l, currentTheme: c } = Le(), { createApplicant: d, isLoading: y } = _t(), p = e || ((K = i.applicantForm) == null ? void 0 : K.workflowKey);
|
|
6573
6573
|
if (!p)
|
|
6574
6574
|
throw new Error(
|
|
6575
6575
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
6576
6576
|
);
|
|
6577
|
-
const b = t || ((W = i.applicantForm) == null ? void 0 : W.externalRefId) || "", F = ((X = i.applicantForm) == null ? void 0 : X.email) || "", S = ((u = i.applicantForm) == null ? void 0 : u.hiddenValues) || {},
|
|
6577
|
+
const b = t || ((W = i.applicantForm) == null ? void 0 : W.externalRefId) || "", F = ((X = i.applicantForm) == null ? void 0 : X.email) || "", S = ((u = i.applicantForm) == null ? void 0 : u.hiddenValues) || {}, T = ((I = i.applicantForm) == null ? void 0 : I.initialValues) || {}, v = (((D = i.applicantForm) == null ? void 0 : D.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", N = De(
|
|
6578
6578
|
() => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
|
|
6579
6579
|
[c == null ? void 0 : c.applicantFormPages]
|
|
6580
6580
|
), B = De(() => {
|
|
6581
6581
|
const s = new Set(gt), g = c == null ? void 0 : c.applicantFormRequiredFields;
|
|
6582
6582
|
if (g) for (const M of g) s.add(M);
|
|
6583
|
-
if (
|
|
6584
|
-
for (const M of
|
|
6585
|
-
for (const
|
|
6586
|
-
!
|
|
6583
|
+
if (N)
|
|
6584
|
+
for (const M of N)
|
|
6585
|
+
for (const k of M.fields)
|
|
6586
|
+
!k.isCustom && k.name && k.required && s.add(k.name);
|
|
6587
6587
|
return Array.from(s);
|
|
6588
|
-
}, [c == null ? void 0 : c.applicantFormRequiredFields,
|
|
6588
|
+
}, [c == null ? void 0 : c.applicantFormRequiredFields, N]), Y = De(() => {
|
|
6589
6589
|
var M;
|
|
6590
|
-
if (
|
|
6591
|
-
const
|
|
6590
|
+
if (N) {
|
|
6591
|
+
const k = N.flatMap((w) => w.fields).filter((w) => !w.isCustom && w.name).map((w) => w.name), C = new Set(k);
|
|
6592
6592
|
for (const w of gt) C.add(w);
|
|
6593
6593
|
return Array.from(C);
|
|
6594
6594
|
}
|
|
6595
6595
|
let s;
|
|
6596
6596
|
(M = i.applicantForm) != null && M.visibleFields ? s = i.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? s = c.applicantFormVisibleFields : s = pr;
|
|
6597
6597
|
const g = new Set(s);
|
|
6598
|
-
for (const
|
|
6598
|
+
for (const k of gt) g.add(k);
|
|
6599
6599
|
return Array.from(g);
|
|
6600
|
-
}, [(m = i.applicantForm) == null ? void 0 : m.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields,
|
|
6600
|
+
}, [(m = i.applicantForm) == null ? void 0 : m.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, N]), P = /* @__PURE__ */ new Set([
|
|
6601
6601
|
"country",
|
|
6602
6602
|
"nationality",
|
|
6603
6603
|
"taxCountry",
|
|
@@ -6607,56 +6607,56 @@ const $a = {
|
|
|
6607
6607
|
]), z = De(() => {
|
|
6608
6608
|
var g, M;
|
|
6609
6609
|
const s = /* @__PURE__ */ new Set();
|
|
6610
|
-
if (
|
|
6611
|
-
for (const
|
|
6612
|
-
for (const C of
|
|
6610
|
+
if (N)
|
|
6611
|
+
for (const k of N)
|
|
6612
|
+
for (const C of k.fields)
|
|
6613
6613
|
!C.isCustom && C.name && P.has(C.name) && s.add(C.countriesType ?? ((g = nt[C.name]) == null ? void 0 : g.countriesType));
|
|
6614
6614
|
else
|
|
6615
|
-
for (const
|
|
6616
|
-
P.has(
|
|
6615
|
+
for (const k of Y)
|
|
6616
|
+
P.has(k) && s.add((M = nt[k]) == null ? void 0 : M.countriesType);
|
|
6617
6617
|
return s.size === 0 && s.add(void 0), Array.from(s);
|
|
6618
|
-
}, [Y,
|
|
6618
|
+
}, [Y, N]), [Z, ne] = x({}), [R, f] = x(!0), $ = de(/* @__PURE__ */ new Set()), G = de(/* @__PURE__ */ new Set());
|
|
6619
6619
|
fe(() => {
|
|
6620
6620
|
if (!c) return;
|
|
6621
|
-
const s = z.filter((
|
|
6622
|
-
const C =
|
|
6621
|
+
const s = z.filter((k) => {
|
|
6622
|
+
const C = k != null ? String(k) : "all";
|
|
6623
6623
|
return !G.current.has(C) && !$.current.has(C);
|
|
6624
6624
|
});
|
|
6625
6625
|
if (s.length === 0) {
|
|
6626
6626
|
z.every((C) => {
|
|
6627
6627
|
const w = C != null ? String(C) : "all";
|
|
6628
6628
|
return G.current.has(w);
|
|
6629
|
-
}) &&
|
|
6629
|
+
}) && f(!1);
|
|
6630
6630
|
return;
|
|
6631
6631
|
}
|
|
6632
|
-
|
|
6633
|
-
const g = s.map((
|
|
6634
|
-
g.forEach((
|
|
6632
|
+
f(!0);
|
|
6633
|
+
const g = s.map((k) => k != null ? String(k) : "all");
|
|
6634
|
+
g.forEach((k) => $.current.add(k)), (async () => {
|
|
6635
6635
|
try {
|
|
6636
|
-
const
|
|
6636
|
+
const k = await Promise.all(
|
|
6637
6637
|
s.map(async (C) => {
|
|
6638
|
-
const w = C != null ? String(C) : "all", me = await l.getCountries("", i.locale || "en", C),
|
|
6639
|
-
value:
|
|
6640
|
-
label: `${
|
|
6641
|
-
} : { value:
|
|
6638
|
+
const w = C != null ? String(C) : "all", me = await l.getCountries("", i.locale || "en", C), se = C === 40, ke = /* @__PURE__ */ new Set(), Pe = me.map((le) => se && le.countryCode ? {
|
|
6639
|
+
value: le.countryCode,
|
|
6640
|
+
label: `${le.countryCode} – ${le.name}`
|
|
6641
|
+
} : { value: le.abbreviation3 || le.abbreviation, label: le.name }).filter((le) => !le.value || ke.has(le.value) ? !1 : (ke.add(le.value), !0));
|
|
6642
6642
|
return G.current.add(w), $.current.delete(w), [w, Pe];
|
|
6643
6643
|
})
|
|
6644
6644
|
);
|
|
6645
|
-
ne((C) => ({ ...C, ...Object.fromEntries(
|
|
6646
|
-
} catch (
|
|
6647
|
-
g.forEach((C) => $.current.delete(C)), console.error("Failed to load countries:",
|
|
6645
|
+
ne((C) => ({ ...C, ...Object.fromEntries(k) }));
|
|
6646
|
+
} catch (k) {
|
|
6647
|
+
g.forEach((C) => $.current.delete(C)), console.error("Failed to load countries:", k);
|
|
6648
6648
|
} finally {
|
|
6649
6649
|
z.every((C) => {
|
|
6650
6650
|
const w = C != null ? String(C) : "all";
|
|
6651
6651
|
return G.current.has(w);
|
|
6652
|
-
}) &&
|
|
6652
|
+
}) && f(!1);
|
|
6653
6653
|
}
|
|
6654
6654
|
})();
|
|
6655
6655
|
}, [z, c]);
|
|
6656
6656
|
const V = (s, g) => {
|
|
6657
6657
|
var C;
|
|
6658
|
-
const M = g ?? ((C = nt[s]) == null ? void 0 : C.countriesType),
|
|
6659
|
-
return Z[
|
|
6658
|
+
const M = g ?? ((C = nt[s]) == null ? void 0 : C.countriesType), k = M != null ? String(M) : "all";
|
|
6659
|
+
return Z[k] || [];
|
|
6660
6660
|
}, j = {
|
|
6661
6661
|
firstName: 1,
|
|
6662
6662
|
lastName: 1,
|
|
@@ -6683,7 +6683,7 @@ const $a = {
|
|
|
6683
6683
|
}, Q = Object.fromEntries(
|
|
6684
6684
|
Object.entries(S).filter(([s]) => s in j)
|
|
6685
6685
|
), ie = Object.fromEntries(
|
|
6686
|
-
Object.entries(
|
|
6686
|
+
Object.entries(T).filter(([s]) => s in j)
|
|
6687
6687
|
), [q, ve] = x({
|
|
6688
6688
|
workflowKey: p,
|
|
6689
6689
|
firstName: "",
|
|
@@ -6711,29 +6711,29 @@ const $a = {
|
|
|
6711
6711
|
taxNumber: "",
|
|
6712
6712
|
...Q,
|
|
6713
6713
|
...ie
|
|
6714
|
-
}),
|
|
6714
|
+
}), pe = Object.fromEntries(
|
|
6715
6715
|
Object.entries(S).filter(([s]) => !(s in Q) && s !== "externalRefId" && s !== "workflowKey")
|
|
6716
|
-
), [ue, xe] = x({ ...
|
|
6716
|
+
), [ue, xe] = x({ ...pe }), [A, U] = x(0), [_, H] = x({}), [ge, E] = x(null), [ee, ye] = x(!1), oe = (s, g) => ve((M) => ({ ...M, [s]: g })), Ne = (s, g) => xe((M) => ({ ...M, [s]: g })), $e = (s) => !s.conditionalOn || ue[s.conditionalOn] === "true", Ie = N && A < N.length - 1 ? A + 1 : -1, je = N && A > 0 ? A - 1 : -1, it = (s) => {
|
|
6717
6717
|
var M;
|
|
6718
6718
|
const g = {};
|
|
6719
|
-
for (const
|
|
6720
|
-
if (
|
|
6721
|
-
if (
|
|
6722
|
-
if (
|
|
6723
|
-
const C = ue[
|
|
6724
|
-
|
|
6719
|
+
for (const k of s.fields)
|
|
6720
|
+
if (k.isCustom) {
|
|
6721
|
+
if (k.customType === "paragraph" || k.customType === "html" || k.customType === "br" || k.customType === "link") continue;
|
|
6722
|
+
if (k.required && k.paramName) {
|
|
6723
|
+
const C = ue[k.paramName], w = k.displayText || k.label || k.paramName;
|
|
6724
|
+
k.customType === "checkbox" || k.customType === "link_checkbox" ? C !== "true" && (g[k.paramName] = `${w} is required.`) : (!C || C.trim() === "") && (g[k.paramName] = `${w} is required.`);
|
|
6725
6725
|
}
|
|
6726
|
-
} else if (
|
|
6727
|
-
const C =
|
|
6726
|
+
} else if (k.name) {
|
|
6727
|
+
const C = k.name;
|
|
6728
6728
|
if (B.includes(C) && lt(q[C])) {
|
|
6729
|
-
const w =
|
|
6729
|
+
const w = k.displayText || ((M = nt[C]) == null ? void 0 : M.label) || C;
|
|
6730
6730
|
g[C] = `${w} is required.`;
|
|
6731
6731
|
}
|
|
6732
6732
|
}
|
|
6733
6733
|
return g;
|
|
6734
6734
|
}, Ze = async () => {
|
|
6735
|
-
if (!
|
|
6736
|
-
const s =
|
|
6735
|
+
if (!N) return;
|
|
6736
|
+
const s = N[A];
|
|
6737
6737
|
if (s.conditionalOn && !$e(s)) {
|
|
6738
6738
|
H({}), Ie >= 0 ? U(Ie) : await He();
|
|
6739
6739
|
return;
|
|
@@ -6745,9 +6745,9 @@ const $a = {
|
|
|
6745
6745
|
}
|
|
6746
6746
|
H({}), Ie >= 0 ? U(Ie) : await He();
|
|
6747
6747
|
}, He = async () => {
|
|
6748
|
-
if (
|
|
6748
|
+
if (N) {
|
|
6749
6749
|
let s = {};
|
|
6750
|
-
for (const g of
|
|
6750
|
+
for (const g of N)
|
|
6751
6751
|
$e(g) && (s = { ...s, ...it(g) });
|
|
6752
6752
|
if (Object.keys(s).length > 0) {
|
|
6753
6753
|
H(s);
|
|
@@ -6764,13 +6764,13 @@ const $a = {
|
|
|
6764
6764
|
workflowKey: q.workflowKey,
|
|
6765
6765
|
externalRefId: q.externalRefId.trim()
|
|
6766
6766
|
};
|
|
6767
|
-
if (
|
|
6768
|
-
for (const C of
|
|
6767
|
+
if (N) {
|
|
6768
|
+
for (const C of N)
|
|
6769
6769
|
if ($e(C)) {
|
|
6770
6770
|
for (const w of C.fields)
|
|
6771
6771
|
if (!w.isCustom && w.name) {
|
|
6772
|
-
const me = w.name,
|
|
6773
|
-
lt(
|
|
6772
|
+
const me = w.name, se = q[me];
|
|
6773
|
+
lt(se) || (s[me] = se);
|
|
6774
6774
|
}
|
|
6775
6775
|
}
|
|
6776
6776
|
for (const C of gt)
|
|
@@ -6785,27 +6785,27 @@ const $a = {
|
|
|
6785
6785
|
lt(w) || (s[C] = w);
|
|
6786
6786
|
});
|
|
6787
6787
|
const g = [];
|
|
6788
|
-
if (
|
|
6789
|
-
for (const C of
|
|
6788
|
+
if (N) {
|
|
6789
|
+
for (const C of N)
|
|
6790
6790
|
if ($e(C))
|
|
6791
6791
|
for (const w of C.fields) {
|
|
6792
6792
|
if (!w.isCustom || !w.paramName || w.customType === "paragraph" || w.customType === "html" || w.customType === "br" || w.customType === "link") continue;
|
|
6793
6793
|
const me = ue[w.paramName] ?? "";
|
|
6794
|
-
let
|
|
6794
|
+
let se;
|
|
6795
6795
|
if (w.customType === "checkbox" || w.customType === "link_checkbox")
|
|
6796
|
-
|
|
6797
|
-
else if (
|
|
6798
|
-
g.push({ paramName: w.paramName, value:
|
|
6796
|
+
se = me === "true" ? "yes" : "no";
|
|
6797
|
+
else if (se = me, !se && !w.required) continue;
|
|
6798
|
+
g.push({ paramName: w.paramName, value: se });
|
|
6799
6799
|
}
|
|
6800
6800
|
}
|
|
6801
6801
|
for (const [C, w] of Object.entries(Q))
|
|
6802
6802
|
s[C] === void 0 && !lt(w) && (s[C] = w);
|
|
6803
6803
|
const M = new Set(g.map((C) => C.paramName));
|
|
6804
|
-
for (const [C, w] of Object.entries(
|
|
6804
|
+
for (const [C, w] of Object.entries(pe))
|
|
6805
6805
|
!M.has(C) && w && g.push({ paramName: C, value: w });
|
|
6806
6806
|
g.length > 0 && (s.applicantAdditionalDatas = g);
|
|
6807
|
-
const
|
|
6808
|
-
a(
|
|
6807
|
+
const k = await d(s);
|
|
6808
|
+
a(k.applicantId);
|
|
6809
6809
|
} catch (s) {
|
|
6810
6810
|
console.error("Error creating applicant:", s), E(s.message || "Failed to create applicant");
|
|
6811
6811
|
} finally {
|
|
@@ -6816,20 +6816,20 @@ const $a = {
|
|
|
6816
6816
|
s.preventDefault();
|
|
6817
6817
|
for (const M of B)
|
|
6818
6818
|
if (lt(q[M])) {
|
|
6819
|
-
const
|
|
6820
|
-
E(`${
|
|
6819
|
+
const k = ((g = nt[M]) == null ? void 0 : g.label) || M;
|
|
6820
|
+
E(`${k} is required.`);
|
|
6821
6821
|
return;
|
|
6822
6822
|
}
|
|
6823
6823
|
await He();
|
|
6824
|
-
}, Qe = (s, g, M,
|
|
6824
|
+
}, Qe = (s, g, M, k, C) => {
|
|
6825
6825
|
var It;
|
|
6826
6826
|
const w = nt[s];
|
|
6827
6827
|
if (!w) return null;
|
|
6828
|
-
const me = B.includes(s),
|
|
6828
|
+
const me = B.includes(s), se = _[s], ke = M || w.label, Pe = s in ie, le = g ?? s, _e = { required: me }, We = C ? C !== "placeholder" : v, Ge = We ? ke : void 0, qt = We ? "..." : ke;
|
|
6829
6829
|
switch (w.type) {
|
|
6830
6830
|
case "select":
|
|
6831
6831
|
if (s === "country" || s === "nationality" || s === "taxCountry" || s === "countryOfBirth" || s === "mobileCountryCode") {
|
|
6832
|
-
const Re = V(s,
|
|
6832
|
+
const Re = V(s, k);
|
|
6833
6833
|
return /* @__PURE__ */ r(
|
|
6834
6834
|
Ye,
|
|
6835
6835
|
{
|
|
@@ -6840,9 +6840,9 @@ const $a = {
|
|
|
6840
6840
|
options: [{ value: "", label: `Select ${qt.toLowerCase()}` }, ...Re],
|
|
6841
6841
|
disabled: R,
|
|
6842
6842
|
readOnly: Pe,
|
|
6843
|
-
error:
|
|
6843
|
+
error: se
|
|
6844
6844
|
},
|
|
6845
|
-
|
|
6845
|
+
le
|
|
6846
6846
|
);
|
|
6847
6847
|
}
|
|
6848
6848
|
if (s === "salutation")
|
|
@@ -6860,9 +6860,9 @@ const $a = {
|
|
|
6860
6860
|
{ value: kt.Other.toString(), label: "Other" }
|
|
6861
6861
|
],
|
|
6862
6862
|
readOnly: Pe,
|
|
6863
|
-
error:
|
|
6863
|
+
error: se
|
|
6864
6864
|
},
|
|
6865
|
-
|
|
6865
|
+
le
|
|
6866
6866
|
);
|
|
6867
6867
|
if (s === "defaultLanguage") {
|
|
6868
6868
|
const Re = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? Et.filter((et) => c.allowedLanguages.includes(et.value)) : Et;
|
|
@@ -6875,15 +6875,15 @@ const $a = {
|
|
|
6875
6875
|
onChange: (et) => oe(s, et),
|
|
6876
6876
|
options: [{ value: "", label: We ? "Select language..." : ke }, ...Re],
|
|
6877
6877
|
readOnly: Pe,
|
|
6878
|
-
error:
|
|
6878
|
+
error: se
|
|
6879
6879
|
},
|
|
6880
|
-
|
|
6880
|
+
le
|
|
6881
6881
|
);
|
|
6882
6882
|
}
|
|
6883
6883
|
return null;
|
|
6884
6884
|
case "multiselect":
|
|
6885
6885
|
if (s === "otherNationality") {
|
|
6886
|
-
const Re = V(s,
|
|
6886
|
+
const Re = V(s, k);
|
|
6887
6887
|
return /* @__PURE__ */ r(
|
|
6888
6888
|
oa,
|
|
6889
6889
|
{
|
|
@@ -6896,7 +6896,7 @@ const $a = {
|
|
|
6896
6896
|
disabled: R,
|
|
6897
6897
|
readOnly: Pe
|
|
6898
6898
|
},
|
|
6899
|
-
|
|
6899
|
+
le
|
|
6900
6900
|
);
|
|
6901
6901
|
}
|
|
6902
6902
|
return null;
|
|
@@ -6911,9 +6911,9 @@ const $a = {
|
|
|
6911
6911
|
value: q[s] || "",
|
|
6912
6912
|
onChange: (Re) => oe(s, Re.target.value),
|
|
6913
6913
|
readOnly: Pe,
|
|
6914
|
-
error:
|
|
6914
|
+
error: se
|
|
6915
6915
|
},
|
|
6916
|
-
|
|
6916
|
+
le
|
|
6917
6917
|
);
|
|
6918
6918
|
case "email":
|
|
6919
6919
|
return /* @__PURE__ */ r(
|
|
@@ -6926,9 +6926,9 @@ const $a = {
|
|
|
6926
6926
|
value: q[s] || "",
|
|
6927
6927
|
onChange: (Re) => oe(s, Re.target.value),
|
|
6928
6928
|
readOnly: Pe,
|
|
6929
|
-
error:
|
|
6929
|
+
error: se
|
|
6930
6930
|
},
|
|
6931
|
-
|
|
6931
|
+
le
|
|
6932
6932
|
);
|
|
6933
6933
|
case "tel":
|
|
6934
6934
|
return /* @__PURE__ */ r(
|
|
@@ -6941,9 +6941,9 @@ const $a = {
|
|
|
6941
6941
|
value: q[s] || "",
|
|
6942
6942
|
onChange: (Re) => oe(s, Re.target.value),
|
|
6943
6943
|
readOnly: Pe,
|
|
6944
|
-
error:
|
|
6944
|
+
error: se
|
|
6945
6945
|
},
|
|
6946
|
-
|
|
6946
|
+
le
|
|
6947
6947
|
);
|
|
6948
6948
|
default:
|
|
6949
6949
|
return /* @__PURE__ */ r(
|
|
@@ -6956,9 +6956,9 @@ const $a = {
|
|
|
6956
6956
|
value: q[s] || "",
|
|
6957
6957
|
onChange: (Re) => oe(s, Re.target.value),
|
|
6958
6958
|
readOnly: Pe,
|
|
6959
|
-
error:
|
|
6959
|
+
error: se
|
|
6960
6960
|
},
|
|
6961
|
-
|
|
6961
|
+
le
|
|
6962
6962
|
);
|
|
6963
6963
|
}
|
|
6964
6964
|
}, h = (s, g) => {
|
|
@@ -7015,7 +7015,7 @@ const $a = {
|
|
|
7015
7015
|
) }, `custom-${g}`);
|
|
7016
7016
|
}
|
|
7017
7017
|
if (!s.paramName) return null;
|
|
7018
|
-
const
|
|
7018
|
+
const k = _[s.paramName], C = s.displayText || s.label || s.paramName;
|
|
7019
7019
|
if (s.customType === "checkbox")
|
|
7020
7020
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
7021
7021
|
/* @__PURE__ */ o(
|
|
@@ -7045,7 +7045,7 @@ const $a = {
|
|
|
7045
7045
|
]
|
|
7046
7046
|
}
|
|
7047
7047
|
),
|
|
7048
|
-
|
|
7048
|
+
k && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: k })
|
|
7049
7049
|
] }, `custom-${g}`);
|
|
7050
7050
|
if (s.customType === "link_checkbox")
|
|
7051
7051
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -7089,7 +7089,7 @@ const $a = {
|
|
|
7089
7089
|
]
|
|
7090
7090
|
}
|
|
7091
7091
|
),
|
|
7092
|
-
|
|
7092
|
+
k && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: k })
|
|
7093
7093
|
] }, `custom-${g}`);
|
|
7094
7094
|
if (s.customType === "group_checkbox") {
|
|
7095
7095
|
const w = (ue[s.paramName] || "").split(",").filter(Boolean);
|
|
@@ -7106,7 +7106,7 @@ const $a = {
|
|
|
7106
7106
|
}
|
|
7107
7107
|
),
|
|
7108
7108
|
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (s.options || []).map((me) => {
|
|
7109
|
-
const
|
|
7109
|
+
const se = s.singleSelect ? ue[s.paramName] === me.value : w.includes(me.value);
|
|
7110
7110
|
return /* @__PURE__ */ o(
|
|
7111
7111
|
"label",
|
|
7112
7112
|
{
|
|
@@ -7116,12 +7116,12 @@ const $a = {
|
|
|
7116
7116
|
/* @__PURE__ */ r(
|
|
7117
7117
|
Be,
|
|
7118
7118
|
{
|
|
7119
|
-
checked:
|
|
7119
|
+
checked: se,
|
|
7120
7120
|
onChange: (ke) => {
|
|
7121
7121
|
if (s.singleSelect)
|
|
7122
7122
|
Ne(s.paramName, ke ? me.value : "");
|
|
7123
7123
|
else {
|
|
7124
|
-
const Pe = ke ? [...w, me.value] : w.filter((
|
|
7124
|
+
const Pe = ke ? [...w, me.value] : w.filter((le) => le !== me.value);
|
|
7125
7125
|
Ne(s.paramName, Pe.join(","));
|
|
7126
7126
|
}
|
|
7127
7127
|
}
|
|
@@ -7140,7 +7140,7 @@ const $a = {
|
|
|
7140
7140
|
me.value
|
|
7141
7141
|
);
|
|
7142
7142
|
}) }),
|
|
7143
|
-
|
|
7143
|
+
k && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: k })
|
|
7144
7144
|
] }, `custom-${g}`);
|
|
7145
7145
|
}
|
|
7146
7146
|
return s.customType === "radio_group" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
@@ -7184,7 +7184,7 @@ const $a = {
|
|
|
7184
7184
|
},
|
|
7185
7185
|
w.value
|
|
7186
7186
|
)) }),
|
|
7187
|
-
|
|
7187
|
+
k && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: k })
|
|
7188
7188
|
] }, `custom-${g}`) : /* @__PURE__ */ r(
|
|
7189
7189
|
be,
|
|
7190
7190
|
{
|
|
@@ -7194,7 +7194,7 @@ const $a = {
|
|
|
7194
7194
|
value: ue[s.paramName] || "",
|
|
7195
7195
|
onChange: (w) => Ne(s.paramName, w.target.value),
|
|
7196
7196
|
required: s.required,
|
|
7197
|
-
error:
|
|
7197
|
+
error: k
|
|
7198
7198
|
},
|
|
7199
7199
|
`custom-${g}`
|
|
7200
7200
|
);
|
|
@@ -7211,7 +7211,7 @@ const $a = {
|
|
|
7211
7211
|
Be,
|
|
7212
7212
|
{
|
|
7213
7213
|
checked: M,
|
|
7214
|
-
onChange: (
|
|
7214
|
+
onChange: (k) => Ne(s.conditionalOn, k ? "true" : "false")
|
|
7215
7215
|
}
|
|
7216
7216
|
),
|
|
7217
7217
|
/* @__PURE__ */ r(
|
|
@@ -7225,9 +7225,9 @@ const $a = {
|
|
|
7225
7225
|
]
|
|
7226
7226
|
}
|
|
7227
7227
|
) }),
|
|
7228
|
-
M && /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: s.fields.map((
|
|
7229
|
-
const w = Math.min(4, Math.max(1, Number(
|
|
7230
|
-
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${w} / span ${w}` }, children: /* @__PURE__ */ r(zt, { helpText:
|
|
7228
|
+
M && /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: s.fields.map((k, C) => {
|
|
7229
|
+
const w = Math.min(4, Math.max(1, Number(k.colSpan) || 4)), me = k.isCustom ? `custom-${C}-${k.paramName}` : `builtin-${k.name}-${C}`;
|
|
7230
|
+
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${w} / span ${w}` }, children: /* @__PURE__ */ r(zt, { helpText: k.helpText, children: k.isCustom ? h(k, C) : Qe(k.name, me, k.displayText, k.countriesType, k.labelMode) }) }, me);
|
|
7231
7231
|
}) })
|
|
7232
7232
|
] });
|
|
7233
7233
|
};
|
|
@@ -7236,46 +7236,10 @@ const $a = {
|
|
|
7236
7236
|
/* @__PURE__ */ r(Me, { className: "my-8" }),
|
|
7237
7237
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
7238
7238
|
] }) }) });
|
|
7239
|
-
if (
|
|
7240
|
-
const s =
|
|
7239
|
+
if (N) {
|
|
7240
|
+
const s = N[A] ?? N[0], g = je === -1, M = Ie === -1, k = N.length, C = $e(s), w = Object.values(_);
|
|
7241
7241
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(te, { children: [
|
|
7242
|
-
|
|
7243
|
-
/* @__PURE__ */ r("div", { style: {
|
|
7244
|
-
position: "absolute",
|
|
7245
|
-
inset: 0,
|
|
7246
|
-
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
7247
|
-
opacity: 0.3
|
|
7248
|
-
} }),
|
|
7249
|
-
/* @__PURE__ */ r("div", { style: {
|
|
7250
|
-
position: "absolute",
|
|
7251
|
-
top: 0,
|
|
7252
|
-
left: 0,
|
|
7253
|
-
bottom: 0,
|
|
7254
|
-
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
7255
|
-
width: `${me}%`,
|
|
7256
|
-
transition: "width 0.4s ease"
|
|
7257
|
-
} })
|
|
7258
|
-
] }),
|
|
7259
|
-
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: [
|
|
7260
|
-
/* @__PURE__ */ r(ut, { title: (c == null ? void 0 : c.title) || "Create Applicant" }),
|
|
7261
|
-
f > 1 && /* @__PURE__ */ o("span", { style: {
|
|
7262
|
-
display: "inline-flex",
|
|
7263
|
-
alignItems: "center",
|
|
7264
|
-
padding: "2px 10px",
|
|
7265
|
-
borderRadius: "9999px",
|
|
7266
|
-
fontSize: "0.75rem",
|
|
7267
|
-
fontWeight: 500,
|
|
7268
|
-
whiteSpace: "nowrap",
|
|
7269
|
-
backgroundColor: "var(--metakyc-input-bg, var(--metakyc-surface, #f9fafb))",
|
|
7270
|
-
color: "var(--metakyc-input-text, var(--metakyc-text-secondary, #6b7280))",
|
|
7271
|
-
border: "1px solid var(--metakyc-input-border, var(--metakyc-border, #e5e7eb))"
|
|
7272
|
-
}, children: [
|
|
7273
|
-
"Page ",
|
|
7274
|
-
T + 1,
|
|
7275
|
-
" of ",
|
|
7276
|
-
f
|
|
7277
|
-
] })
|
|
7278
|
-
] }) }),
|
|
7242
|
+
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r(ut, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
7279
7243
|
/* @__PURE__ */ o(re, { children: [
|
|
7280
7244
|
(s.title || s.subtitle || s.description) && /* @__PURE__ */ o("div", { className: "mb-4", children: [
|
|
7281
7245
|
s.title && /* @__PURE__ */ r(
|
|
@@ -7303,13 +7267,32 @@ const $a = {
|
|
|
7303
7267
|
}
|
|
7304
7268
|
)
|
|
7305
7269
|
] }),
|
|
7270
|
+
k > 1 && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
|
|
7271
|
+
N.map((me, se) => /* @__PURE__ */ r(
|
|
7272
|
+
"div",
|
|
7273
|
+
{
|
|
7274
|
+
style: {
|
|
7275
|
+
height: "0.375rem",
|
|
7276
|
+
borderRadius: "9999px",
|
|
7277
|
+
transition: "all 150ms",
|
|
7278
|
+
...se === A ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)" } : se < A ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "var(--metakyc-border, #e5e7eb)", opacity: 0.3 }
|
|
7279
|
+
}
|
|
7280
|
+
},
|
|
7281
|
+
se
|
|
7282
|
+
)),
|
|
7283
|
+
/* @__PURE__ */ o("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
|
|
7284
|
+
A + 1,
|
|
7285
|
+
" / ",
|
|
7286
|
+
k
|
|
7287
|
+
] })
|
|
7288
|
+
] }),
|
|
7306
7289
|
(ge || w.length > 0) && /* @__PURE__ */ o("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
|
|
7307
7290
|
ge && /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
7308
7291
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
7309
7292
|
" ",
|
|
7310
7293
|
ge
|
|
7311
7294
|
] }),
|
|
7312
|
-
w.map((
|
|
7295
|
+
w.map((me, se) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: me }, se))
|
|
7313
7296
|
] }),
|
|
7314
7297
|
O(s)
|
|
7315
7298
|
] }),
|
|
@@ -7375,9 +7358,9 @@ const on = ({
|
|
|
7375
7358
|
const b = t || ((h = i.applicantForm) == null ? void 0 : h.externalRefId) || "", F = ((O = i.applicantForm) == null ? void 0 : O.email) || "", S = ((K = i.applicantForm) == null ? void 0 : K.initialValues) || {}, L = (((W = i.applicantForm) == null ? void 0 : W.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", v = De(
|
|
7376
7359
|
() => c != null && c.companyFormPages && c.companyFormPages.length > 0 ? c.companyFormPages : null,
|
|
7377
7360
|
[c == null ? void 0 : c.companyFormPages]
|
|
7378
|
-
),
|
|
7379
|
-
const u = new Set(Ot),
|
|
7380
|
-
if (
|
|
7361
|
+
), N = De(() => {
|
|
7362
|
+
const u = new Set(Ot), I = c == null ? void 0 : c.companyFormRequiredFields;
|
|
7363
|
+
if (I) for (const D of I) u.add(D);
|
|
7381
7364
|
if (v)
|
|
7382
7365
|
for (const D of v)
|
|
7383
7366
|
for (const m of D.fields)
|
|
@@ -7386,54 +7369,54 @@ const on = ({
|
|
|
7386
7369
|
}, [c == null ? void 0 : c.companyFormRequiredFields, v]), B = De(() => {
|
|
7387
7370
|
var u;
|
|
7388
7371
|
if (v) {
|
|
7389
|
-
const
|
|
7372
|
+
const I = v.flatMap((m) => m.fields).filter((m) => !m.isCustom && m.name).map((m) => m.name), D = new Set(I);
|
|
7390
7373
|
for (const m of Ot) D.add(m);
|
|
7391
7374
|
return Array.from(D);
|
|
7392
7375
|
}
|
|
7393
7376
|
return (u = i.applicantForm) != null && u.visibleFields ? i.applicantForm.visibleFields : c != null && c.companyFormVisibleFields && c.companyFormVisibleFields.length > 0 ? c.companyFormVisibleFields : mr;
|
|
7394
7377
|
}, [(X = i.applicantForm) == null ? void 0 : X.visibleFields, c == null ? void 0 : c.companyFormVisibleFields, v]), Y = /* @__PURE__ */ new Set(["countryResidence", "addressCountry"]), P = De(() => {
|
|
7395
|
-
var
|
|
7378
|
+
var I, D;
|
|
7396
7379
|
const u = /* @__PURE__ */ new Set();
|
|
7397
7380
|
if (v)
|
|
7398
7381
|
for (const m of v)
|
|
7399
7382
|
for (const s of m.fields)
|
|
7400
|
-
!s.isCustom && s.name && Y.has(s.name) && u.add(s.countriesType ?? ((
|
|
7383
|
+
!s.isCustom && s.name && Y.has(s.name) && u.add(s.countriesType ?? ((I = st[s.name]) == null ? void 0 : I.countriesType));
|
|
7401
7384
|
else
|
|
7402
7385
|
for (const m of B)
|
|
7403
7386
|
Y.has(m) && u.add((D = st[m]) == null ? void 0 : D.countriesType);
|
|
7404
7387
|
return u.size === 0 && u.add(void 0), Array.from(u);
|
|
7405
|
-
}, [B, v]), [z, Z] = x({}), [ne, R] = x(!0),
|
|
7388
|
+
}, [B, v]), [z, Z] = x({}), [ne, R] = x(!0), f = de(/* @__PURE__ */ new Set()), $ = de(/* @__PURE__ */ new Set());
|
|
7406
7389
|
fe(() => {
|
|
7407
7390
|
if (!c) return;
|
|
7408
7391
|
const u = P.filter((m) => {
|
|
7409
7392
|
const s = m != null ? String(m) : "all";
|
|
7410
|
-
return !$.current.has(s) && !
|
|
7393
|
+
return !$.current.has(s) && !f.current.has(s);
|
|
7411
7394
|
});
|
|
7412
7395
|
if (u.length === 0) {
|
|
7413
7396
|
P.every((s) => $.current.has(s != null ? String(s) : "all")) && R(!1);
|
|
7414
7397
|
return;
|
|
7415
7398
|
}
|
|
7416
7399
|
R(!0);
|
|
7417
|
-
const
|
|
7418
|
-
|
|
7400
|
+
const I = u.map((m) => m != null ? String(m) : "all");
|
|
7401
|
+
I.forEach((m) => f.current.add(m)), (async () => {
|
|
7419
7402
|
try {
|
|
7420
7403
|
const m = await Promise.all(
|
|
7421
7404
|
u.map(async (s) => {
|
|
7422
|
-
const g = s != null ? String(s) : "all", M = await l.getCountries("", i.locale || "en", s),
|
|
7423
|
-
return $.current.add(g),
|
|
7405
|
+
const g = s != null ? String(s) : "all", M = await l.getCountries("", i.locale || "en", s), k = /* @__PURE__ */ new Set(), C = M.map((w) => ({ value: w.abbreviation3 || w.abbreviation, label: w.name })).filter((w) => !w.value || k.has(w.value) ? !1 : (k.add(w.value), !0));
|
|
7406
|
+
return $.current.add(g), f.current.delete(g), [g, C];
|
|
7424
7407
|
})
|
|
7425
7408
|
);
|
|
7426
7409
|
Z((s) => ({ ...s, ...Object.fromEntries(m) }));
|
|
7427
7410
|
} catch (m) {
|
|
7428
|
-
|
|
7411
|
+
I.forEach((s) => f.current.delete(s)), console.error("Failed to load countries:", m);
|
|
7429
7412
|
} finally {
|
|
7430
7413
|
P.every((s) => $.current.has(s != null ? String(s) : "all")) && R(!1);
|
|
7431
7414
|
}
|
|
7432
7415
|
})();
|
|
7433
7416
|
}, [P, c]);
|
|
7434
|
-
const G = (u,
|
|
7417
|
+
const G = (u, I) => {
|
|
7435
7418
|
var s;
|
|
7436
|
-
const D =
|
|
7419
|
+
const D = I ?? ((s = st[u]) == null ? void 0 : s.countriesType), m = D != null ? String(D) : "all";
|
|
7437
7420
|
return z[m] || [];
|
|
7438
7421
|
}, V = {
|
|
7439
7422
|
companyName: 1,
|
|
@@ -7480,51 +7463,51 @@ const on = ({
|
|
|
7480
7463
|
lei: "",
|
|
7481
7464
|
externalRefId: b,
|
|
7482
7465
|
...j
|
|
7483
|
-
}), [q, ve] = x({}), [
|
|
7466
|
+
}), [q, ve] = x({}), [pe, ue] = x(0), [xe, A] = x({}), [U, _] = x(null), [H, ge] = x(!1), E = (u, I) => ie((D) => ({ ...D, [u]: I })), ee = (u, I) => ve((D) => ({ ...D, [u]: I })), ye = (u) => !u.conditionalOn || q[u.conditionalOn] === "true", oe = v && pe < v.length - 1 ? pe + 1 : -1, Ne = v && pe > 0 ? pe - 1 : -1, $e = (u) => {
|
|
7484
7467
|
var D;
|
|
7485
|
-
const
|
|
7468
|
+
const I = {};
|
|
7486
7469
|
for (const m of u.fields)
|
|
7487
7470
|
if (m.isCustom) {
|
|
7488
7471
|
if (m.customType === "paragraph" || m.customType === "html" || m.customType === "br" || m.customType === "link") continue;
|
|
7489
7472
|
if (m.required && m.paramName) {
|
|
7490
7473
|
const s = q[m.paramName], g = m.displayText || m.label || m.paramName;
|
|
7491
|
-
m.customType === "checkbox" || m.customType === "link_checkbox" ? s !== "true" && (
|
|
7474
|
+
m.customType === "checkbox" || m.customType === "link_checkbox" ? s !== "true" && (I[m.paramName] = `${g} is required.`) : (!s || s.trim() === "") && (I[m.paramName] = `${g} is required.`);
|
|
7492
7475
|
}
|
|
7493
7476
|
} else if (m.name) {
|
|
7494
7477
|
const s = m.name;
|
|
7495
|
-
if (
|
|
7478
|
+
if (N.includes(s) && wt(Q[s])) {
|
|
7496
7479
|
const g = m.displayText || ((D = st[s]) == null ? void 0 : D.label) || s;
|
|
7497
|
-
|
|
7480
|
+
I[s] = `${g} is required.`;
|
|
7498
7481
|
}
|
|
7499
7482
|
}
|
|
7500
|
-
return
|
|
7483
|
+
return I;
|
|
7501
7484
|
}, Ie = async () => {
|
|
7502
7485
|
if (!v) return;
|
|
7503
|
-
const u = v[
|
|
7486
|
+
const u = v[pe];
|
|
7504
7487
|
if (u.conditionalOn && !ye(u)) {
|
|
7505
|
-
|
|
7488
|
+
A({}), oe >= 0 ? ue(oe) : await je();
|
|
7506
7489
|
return;
|
|
7507
7490
|
}
|
|
7508
|
-
const
|
|
7509
|
-
if (Object.keys(
|
|
7510
|
-
|
|
7491
|
+
const I = $e(u);
|
|
7492
|
+
if (Object.keys(I).length > 0) {
|
|
7493
|
+
A(I);
|
|
7511
7494
|
return;
|
|
7512
7495
|
}
|
|
7513
|
-
|
|
7496
|
+
A({}), oe >= 0 ? ue(oe) : await je();
|
|
7514
7497
|
}, je = async () => {
|
|
7515
7498
|
var u;
|
|
7516
7499
|
if (v) {
|
|
7517
|
-
let
|
|
7500
|
+
let I = {};
|
|
7518
7501
|
for (const D of v)
|
|
7519
|
-
ye(D) && (
|
|
7520
|
-
if (Object.keys(
|
|
7521
|
-
|
|
7502
|
+
ye(D) && (I = { ...I, ...$e(D) });
|
|
7503
|
+
if (Object.keys(I).length > 0) {
|
|
7504
|
+
A(I);
|
|
7522
7505
|
return;
|
|
7523
7506
|
}
|
|
7524
7507
|
}
|
|
7525
7508
|
ge(!0), _(null);
|
|
7526
7509
|
try {
|
|
7527
|
-
const
|
|
7510
|
+
const I = {
|
|
7528
7511
|
workflowKey: Q.workflowKey,
|
|
7529
7512
|
externalRefId: ((u = Q.externalRefId) == null ? void 0 : u.trim()) || void 0
|
|
7530
7513
|
}, D = v ? v.filter((g) => ye(g)).flatMap((g) => g.fields).filter((g) => !g.isCustom && g.name).map((g) => g.name) : B;
|
|
@@ -7533,31 +7516,31 @@ const on = ({
|
|
|
7533
7516
|
if (!wt(M))
|
|
7534
7517
|
switch (g) {
|
|
7535
7518
|
case "companyName":
|
|
7536
|
-
|
|
7519
|
+
I.companyName = M;
|
|
7537
7520
|
break;
|
|
7538
7521
|
case "email":
|
|
7539
|
-
|
|
7522
|
+
I.companyEmail = M;
|
|
7540
7523
|
break;
|
|
7541
7524
|
case "phone":
|
|
7542
|
-
|
|
7525
|
+
I.companyPhone = M;
|
|
7543
7526
|
break;
|
|
7544
7527
|
case "registrationNumber":
|
|
7545
|
-
|
|
7528
|
+
I.companyRegistrationNumber = M;
|
|
7546
7529
|
break;
|
|
7547
7530
|
case "countryResidence":
|
|
7548
|
-
|
|
7531
|
+
I.companyCountry = M;
|
|
7549
7532
|
break;
|
|
7550
7533
|
case "city":
|
|
7551
|
-
|
|
7534
|
+
I.companyCity = M;
|
|
7552
7535
|
break;
|
|
7553
7536
|
case "street":
|
|
7554
|
-
|
|
7537
|
+
I.companyStreet = M;
|
|
7555
7538
|
break;
|
|
7556
7539
|
case "postalCode":
|
|
7557
|
-
|
|
7540
|
+
I.companyZip = M;
|
|
7558
7541
|
break;
|
|
7559
7542
|
default:
|
|
7560
|
-
|
|
7543
|
+
I[g] = M;
|
|
7561
7544
|
break;
|
|
7562
7545
|
}
|
|
7563
7546
|
}
|
|
@@ -7567,40 +7550,40 @@ const on = ({
|
|
|
7567
7550
|
if (ye(g))
|
|
7568
7551
|
for (const M of g.fields) {
|
|
7569
7552
|
if (!M.isCustom || !M.paramName || M.customType === "paragraph" || M.customType === "html" || M.customType === "br" || M.customType === "link") continue;
|
|
7570
|
-
const
|
|
7553
|
+
const k = q[M.paramName] ?? "";
|
|
7571
7554
|
let C;
|
|
7572
7555
|
if (M.customType === "checkbox" || M.customType === "link_checkbox")
|
|
7573
|
-
C =
|
|
7574
|
-
else if (C =
|
|
7556
|
+
C = k === "true" ? "yes" : "no";
|
|
7557
|
+
else if (C = k, !C && !M.required) continue;
|
|
7575
7558
|
m.push({ paramName: M.paramName, value: C });
|
|
7576
7559
|
}
|
|
7577
7560
|
}
|
|
7578
|
-
m.length > 0 && (
|
|
7579
|
-
const s = await d(
|
|
7561
|
+
m.length > 0 && (I.applicantAdditionalDatas = m);
|
|
7562
|
+
const s = await d(I);
|
|
7580
7563
|
a(s.applicantId);
|
|
7581
|
-
} catch (
|
|
7582
|
-
console.error("Error creating company applicant:",
|
|
7564
|
+
} catch (I) {
|
|
7565
|
+
console.error("Error creating company applicant:", I), _(I.message || "Failed to create company applicant");
|
|
7583
7566
|
} finally {
|
|
7584
7567
|
ge(!1);
|
|
7585
7568
|
}
|
|
7586
7569
|
}, it = async (u) => {
|
|
7587
|
-
var
|
|
7570
|
+
var I;
|
|
7588
7571
|
u.preventDefault();
|
|
7589
|
-
for (const D of
|
|
7572
|
+
for (const D of N)
|
|
7590
7573
|
if (wt(Q[D])) {
|
|
7591
|
-
const m = ((
|
|
7574
|
+
const m = ((I = st[D]) == null ? void 0 : I.label) || D;
|
|
7592
7575
|
_(`${m} is required.`);
|
|
7593
7576
|
return;
|
|
7594
7577
|
}
|
|
7595
7578
|
await je();
|
|
7596
|
-
}, Ze = (u,
|
|
7579
|
+
}, Ze = (u, I, D, m, s) => {
|
|
7597
7580
|
const g = st[u];
|
|
7598
7581
|
if (!g) return null;
|
|
7599
|
-
const M =
|
|
7582
|
+
const M = N.includes(u), k = xe[u], C = D || g.label, w = u in j, me = I ?? u, se = s ? s !== "placeholder" : L, ke = se ? C : void 0, Pe = se ? "..." : C;
|
|
7600
7583
|
switch (g.type) {
|
|
7601
7584
|
case "select":
|
|
7602
7585
|
if (u === "countryResidence" || u === "addressCountry") {
|
|
7603
|
-
const
|
|
7586
|
+
const le = G(u, m);
|
|
7604
7587
|
return /* @__PURE__ */ r(
|
|
7605
7588
|
Ye,
|
|
7606
7589
|
{
|
|
@@ -7608,10 +7591,10 @@ const on = ({
|
|
|
7608
7591
|
label: ke,
|
|
7609
7592
|
value: Q[u] || "",
|
|
7610
7593
|
onChange: (_e) => E(u, _e),
|
|
7611
|
-
options: [{ value: "", label: `Select ${Pe.toLowerCase()}` }, ...
|
|
7594
|
+
options: [{ value: "", label: `Select ${Pe.toLowerCase()}` }, ...le],
|
|
7612
7595
|
disabled: ne,
|
|
7613
7596
|
readOnly: w,
|
|
7614
|
-
error:
|
|
7597
|
+
error: k
|
|
7615
7598
|
},
|
|
7616
7599
|
me
|
|
7617
7600
|
);
|
|
@@ -7624,11 +7607,11 @@ const on = ({
|
|
|
7624
7607
|
required: M,
|
|
7625
7608
|
type: "date",
|
|
7626
7609
|
label: ke,
|
|
7627
|
-
placeholder:
|
|
7610
|
+
placeholder: se ? void 0 : C,
|
|
7628
7611
|
value: Q[u] || "",
|
|
7629
|
-
onChange: (
|
|
7612
|
+
onChange: (le) => E(u, le.target.value),
|
|
7630
7613
|
readOnly: w,
|
|
7631
|
-
error:
|
|
7614
|
+
error: k
|
|
7632
7615
|
},
|
|
7633
7616
|
me
|
|
7634
7617
|
);
|
|
@@ -7639,11 +7622,11 @@ const on = ({
|
|
|
7639
7622
|
required: M,
|
|
7640
7623
|
type: "email",
|
|
7641
7624
|
label: ke,
|
|
7642
|
-
placeholder:
|
|
7625
|
+
placeholder: se ? void 0 : C,
|
|
7643
7626
|
value: Q[u] || "",
|
|
7644
|
-
onChange: (
|
|
7627
|
+
onChange: (le) => E(u, le.target.value),
|
|
7645
7628
|
readOnly: w,
|
|
7646
|
-
error:
|
|
7629
|
+
error: k
|
|
7647
7630
|
},
|
|
7648
7631
|
me
|
|
7649
7632
|
);
|
|
@@ -7654,11 +7637,11 @@ const on = ({
|
|
|
7654
7637
|
required: M,
|
|
7655
7638
|
type: "tel",
|
|
7656
7639
|
label: ke,
|
|
7657
|
-
placeholder:
|
|
7640
|
+
placeholder: se ? void 0 : C,
|
|
7658
7641
|
value: Q[u] || "",
|
|
7659
|
-
onChange: (
|
|
7642
|
+
onChange: (le) => E(u, le.target.value),
|
|
7660
7643
|
readOnly: w,
|
|
7661
|
-
error:
|
|
7644
|
+
error: k
|
|
7662
7645
|
},
|
|
7663
7646
|
me
|
|
7664
7647
|
);
|
|
@@ -7669,16 +7652,16 @@ const on = ({
|
|
|
7669
7652
|
required: M,
|
|
7670
7653
|
type: "text",
|
|
7671
7654
|
label: ke,
|
|
7672
|
-
placeholder:
|
|
7655
|
+
placeholder: se ? void 0 : C,
|
|
7673
7656
|
value: Q[u] || "",
|
|
7674
|
-
onChange: (
|
|
7657
|
+
onChange: (le) => E(u, le.target.value),
|
|
7675
7658
|
readOnly: w,
|
|
7676
|
-
error:
|
|
7659
|
+
error: k
|
|
7677
7660
|
},
|
|
7678
7661
|
me
|
|
7679
7662
|
);
|
|
7680
7663
|
}
|
|
7681
|
-
}, He = (u,
|
|
7664
|
+
}, He = (u, I) => {
|
|
7682
7665
|
if (u.customType === "paragraph")
|
|
7683
7666
|
return /* @__PURE__ */ r(
|
|
7684
7667
|
"p",
|
|
@@ -7686,12 +7669,12 @@ const on = ({
|
|
|
7686
7669
|
style: { fontSize: "14px", lineHeight: "1.7", margin: 0, color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
7687
7670
|
dangerouslySetInnerHTML: { __html: u.displayText || u.label || "" }
|
|
7688
7671
|
},
|
|
7689
|
-
`custom-${
|
|
7672
|
+
`custom-${I}`
|
|
7690
7673
|
);
|
|
7691
7674
|
if (u.customType === "html")
|
|
7692
|
-
return /* @__PURE__ */ r("div", { dangerouslySetInnerHTML: { __html: u.label || "" } }, `custom-${
|
|
7675
|
+
return /* @__PURE__ */ r("div", { dangerouslySetInnerHTML: { __html: u.label || "" } }, `custom-${I}`);
|
|
7693
7676
|
if (u.customType === "br")
|
|
7694
|
-
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${
|
|
7677
|
+
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${I}`);
|
|
7695
7678
|
if (u.customType === "link")
|
|
7696
7679
|
return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
7697
7680
|
"a",
|
|
@@ -7702,7 +7685,7 @@ const on = ({
|
|
|
7702
7685
|
style: { color: "var(--metakyc-primary, #2563eb)", fontSize: "14px", textDecoration: "underline" },
|
|
7703
7686
|
children: u.displayText || u.label || u.linkText || u.linkUrl || ""
|
|
7704
7687
|
}
|
|
7705
|
-
) }, `custom-${
|
|
7688
|
+
) }, `custom-${I}`);
|
|
7706
7689
|
if (!u.paramName) return null;
|
|
7707
7690
|
const D = xe[u.paramName], m = u.displayText || u.label || u.paramName, s = u.labelMode ? u.labelMode !== "placeholder" : L;
|
|
7708
7691
|
return u.customType === "checkbox" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -7720,7 +7703,7 @@ const on = ({
|
|
|
7720
7703
|
] })
|
|
7721
7704
|
] }),
|
|
7722
7705
|
D && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: D })
|
|
7723
|
-
] }, `custom-${
|
|
7706
|
+
] }, `custom-${I}`) : /* @__PURE__ */ r(
|
|
7724
7707
|
be,
|
|
7725
7708
|
{
|
|
7726
7709
|
type: "text",
|
|
@@ -7731,22 +7714,22 @@ const on = ({
|
|
|
7731
7714
|
required: u.required,
|
|
7732
7715
|
error: D
|
|
7733
7716
|
},
|
|
7734
|
-
`custom-${
|
|
7717
|
+
`custom-${I}`
|
|
7735
7718
|
);
|
|
7736
7719
|
}, ot = (u) => {
|
|
7737
|
-
const
|
|
7720
|
+
const I = ye(u);
|
|
7738
7721
|
return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
7739
7722
|
u.conditionalOn && /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer" }, children: [
|
|
7740
7723
|
/* @__PURE__ */ r(
|
|
7741
7724
|
Be,
|
|
7742
7725
|
{
|
|
7743
|
-
checked:
|
|
7726
|
+
checked: I,
|
|
7744
7727
|
onChange: (D) => ee(u.conditionalOn, D ? "true" : "false")
|
|
7745
7728
|
}
|
|
7746
7729
|
),
|
|
7747
7730
|
/* @__PURE__ */ r("span", { style: { fontSize: "14px", fontWeight: 500 }, children: u.conditionalOn })
|
|
7748
7731
|
] }),
|
|
7749
|
-
|
|
7732
|
+
I && /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: u.fields.map((D, m) => {
|
|
7750
7733
|
const s = Math.min(4, Math.max(1, Number(D.colSpan) || 4)), g = D.isCustom ? `custom-${m}-${D.paramName}` : `builtin-${D.name}-${m}`;
|
|
7751
7734
|
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${s} / span ${s}` }, children: D.isCustom ? He(D, m) : Ze(D.name, g, D.displayText, D.countriesType, D.labelMode) }, g);
|
|
7752
7735
|
}) })
|
|
@@ -7758,7 +7741,7 @@ const on = ({
|
|
|
7758
7741
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
7759
7742
|
] }) }) });
|
|
7760
7743
|
if (v) {
|
|
7761
|
-
const u = v[
|
|
7744
|
+
const u = v[pe] ?? v[0], I = Ne === -1, D = oe === -1, m = v.length, s = ye(u), g = Object.values(xe);
|
|
7762
7745
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(te, { children: [
|
|
7763
7746
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r(ut, { title: (c == null ? void 0 : c.title) || "Company Registration" }) }),
|
|
7764
7747
|
/* @__PURE__ */ o(re, { children: [
|
|
@@ -7772,23 +7755,23 @@ const on = ({
|
|
|
7772
7755
|
" ",
|
|
7773
7756
|
U
|
|
7774
7757
|
] }),
|
|
7775
|
-
g.map((M,
|
|
7758
|
+
g.map((M, k) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: M }, k))
|
|
7776
7759
|
] }),
|
|
7777
7760
|
m > 1 && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
|
|
7778
|
-
v.map((M,
|
|
7761
|
+
v.map((M, k) => /* @__PURE__ */ r(
|
|
7779
7762
|
"div",
|
|
7780
7763
|
{
|
|
7781
7764
|
style: {
|
|
7782
7765
|
height: "0.375rem",
|
|
7783
7766
|
borderRadius: "9999px",
|
|
7784
7767
|
transition: "all 150ms",
|
|
7785
|
-
...
|
|
7768
|
+
...k === pe ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)" } : k < pe ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb" }
|
|
7786
7769
|
}
|
|
7787
7770
|
},
|
|
7788
|
-
|
|
7771
|
+
k
|
|
7789
7772
|
)),
|
|
7790
7773
|
/* @__PURE__ */ o("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
|
|
7791
|
-
|
|
7774
|
+
pe + 1,
|
|
7792
7775
|
" / ",
|
|
7793
7776
|
m
|
|
7794
7777
|
] })
|
|
@@ -7797,19 +7780,19 @@ const on = ({
|
|
|
7797
7780
|
] }),
|
|
7798
7781
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
7799
7782
|
/* @__PURE__ */ o("div", { children: [
|
|
7800
|
-
!
|
|
7783
|
+
!I && /* @__PURE__ */ r(
|
|
7801
7784
|
J,
|
|
7802
7785
|
{
|
|
7803
7786
|
type: "button",
|
|
7804
7787
|
variant: "outline",
|
|
7805
7788
|
onClick: () => {
|
|
7806
|
-
ue(Ne),
|
|
7789
|
+
ue(Ne), A({});
|
|
7807
7790
|
},
|
|
7808
7791
|
disabled: H || y,
|
|
7809
7792
|
children: "Previous"
|
|
7810
7793
|
}
|
|
7811
7794
|
),
|
|
7812
|
-
|
|
7795
|
+
I && n && /* @__PURE__ */ r(J, { type: "button", variant: "outline", onClick: n, disabled: H || y, children: "Cancel" })
|
|
7813
7796
|
] }),
|
|
7814
7797
|
/* @__PURE__ */ r(J, { type: "button", isLoading: H || y, onClick: D ? je : Ie, children: D ? u.conditionalOn && !s ? "Skip & Submit" : "Submit" : u.conditionalOn && !s ? "Skip" : "Next" })
|
|
7815
7798
|
] })
|
|
@@ -7846,8 +7829,8 @@ const on = ({
|
|
|
7846
7829
|
isLoading: b,
|
|
7847
7830
|
error: F,
|
|
7848
7831
|
moveBack: S,
|
|
7849
|
-
refreshProgress:
|
|
7850
|
-
} = Jr(e), [L, v] = we.useState(!1),
|
|
7832
|
+
refreshProgress: T
|
|
7833
|
+
} = Jr(e), [L, v] = we.useState(!1), N = we.useRef(null);
|
|
7851
7834
|
if (we.useEffect(() => {
|
|
7852
7835
|
F && a && a(F);
|
|
7853
7836
|
}, [F, a]), we.useEffect(() => {
|
|
@@ -7914,99 +7897,93 @@ const on = ({
|
|
|
7914
7897
|
] }) }) });
|
|
7915
7898
|
const B = (z) => {
|
|
7916
7899
|
switch (z) {
|
|
7917
|
-
case
|
|
7900
|
+
case ce.Overview:
|
|
7918
7901
|
return "Overview";
|
|
7919
|
-
case
|
|
7902
|
+
case ce.Questionaries:
|
|
7920
7903
|
return "Questionnaire";
|
|
7921
|
-
case
|
|
7904
|
+
case ce.UploadDocument:
|
|
7922
7905
|
return "Documents";
|
|
7923
|
-
case
|
|
7906
|
+
case ce.IdentitySdk:
|
|
7924
7907
|
return "Identity";
|
|
7925
|
-
case
|
|
7908
|
+
case ce.RiskScoring:
|
|
7926
7909
|
return "Risk Assessment";
|
|
7927
|
-
case
|
|
7910
|
+
case ce.InvestorCategorization:
|
|
7928
7911
|
return "Investor Categorization";
|
|
7929
|
-
case
|
|
7912
|
+
case ce.AppropriatenessTest:
|
|
7930
7913
|
return "Appropriateness Test";
|
|
7931
|
-
case
|
|
7914
|
+
case ce.AdditionalData:
|
|
7932
7915
|
return "Additional Data";
|
|
7933
|
-
case
|
|
7916
|
+
case ce.ManualReview:
|
|
7934
7917
|
return "Review";
|
|
7935
7918
|
default:
|
|
7936
7919
|
return "";
|
|
7937
7920
|
}
|
|
7938
7921
|
}, Y = () => {
|
|
7939
|
-
const z = c.filter(($) => $.visibility !== !1), Z = z.findIndex(($) => $.order === l.order), ne = Z >= 0 ? Z + 1 : 1, R = z.length,
|
|
7922
|
+
const z = c.filter(($) => $.visibility !== !1), Z = z.findIndex(($) => $.order === l.order), ne = Z >= 0 ? Z + 1 : 1, R = z.length, f = R > 1 ? (Z + 1) / R * 100 : 100;
|
|
7940
7923
|
return /* @__PURE__ */ o("div", { style: {
|
|
7941
7924
|
marginBottom: "24px",
|
|
7942
7925
|
backgroundColor: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
|
|
7943
7926
|
borderRadius: "0.75rem",
|
|
7944
7927
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
7928
|
+
padding: "1rem 1.5rem",
|
|
7945
7929
|
overflow: "hidden"
|
|
7946
7930
|
}, children: [
|
|
7947
|
-
/* @__PURE__ */ o("div", { style: {
|
|
7948
|
-
/* @__PURE__ */ r(
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7931
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "16px" }, children: [
|
|
7932
|
+
/* @__PURE__ */ r(ut, {}),
|
|
7933
|
+
/* @__PURE__ */ o(jt, { variant: i.status === 1 ? "info" : "success", children: [
|
|
7934
|
+
"Step ",
|
|
7935
|
+
ne,
|
|
7936
|
+
" of ",
|
|
7937
|
+
R
|
|
7938
|
+
] })
|
|
7939
|
+
] }),
|
|
7940
|
+
/* @__PURE__ */ o("div", { style: { position: "relative", height: "4px", borderRadius: "999px", overflow: "hidden", marginBottom: "16px" }, children: [
|
|
7941
|
+
/* @__PURE__ */ r("div", { style: { position: "absolute", inset: 0, backgroundColor: "var(--metakyc-border, #e5e7eb)", opacity: 0.3 } }),
|
|
7954
7942
|
/* @__PURE__ */ r("div", { style: {
|
|
7955
7943
|
position: "absolute",
|
|
7956
7944
|
top: 0,
|
|
7957
7945
|
left: 0,
|
|
7958
7946
|
bottom: 0,
|
|
7959
7947
|
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
7960
|
-
width: `${
|
|
7948
|
+
width: `${f}%`,
|
|
7961
7949
|
transition: "width 0.4s ease"
|
|
7962
7950
|
} })
|
|
7963
7951
|
] }),
|
|
7964
|
-
/* @__PURE__ */
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
] }),
|
|
7974
|
-
/* @__PURE__ */ r(
|
|
7975
|
-
Ba,
|
|
7976
|
-
{
|
|
7977
|
-
ref: I,
|
|
7978
|
-
visibleSteps: z,
|
|
7979
|
-
currentVisibleStepIndex: Z,
|
|
7980
|
-
getStepFallbackName: B
|
|
7981
|
-
}
|
|
7982
|
-
)
|
|
7983
|
-
] })
|
|
7952
|
+
/* @__PURE__ */ r(
|
|
7953
|
+
Ba,
|
|
7954
|
+
{
|
|
7955
|
+
ref: N,
|
|
7956
|
+
visibleSteps: z,
|
|
7957
|
+
currentVisibleStepIndex: Z,
|
|
7958
|
+
getStepFallbackName: B
|
|
7959
|
+
}
|
|
7960
|
+
)
|
|
7984
7961
|
] });
|
|
7985
7962
|
}, P = () => {
|
|
7986
7963
|
const z = {
|
|
7987
7964
|
applicantId: e,
|
|
7988
7965
|
onComplete: async () => {
|
|
7989
|
-
await
|
|
7966
|
+
await T();
|
|
7990
7967
|
},
|
|
7991
7968
|
onBack: l.order > 0 ? S : void 0
|
|
7992
7969
|
};
|
|
7993
7970
|
switch (l.action) {
|
|
7994
|
-
case
|
|
7971
|
+
case ce.Questionaries:
|
|
7995
7972
|
return /* @__PURE__ */ r(ba, { ...z });
|
|
7996
|
-
case
|
|
7973
|
+
case ce.UploadDocument:
|
|
7997
7974
|
return /* @__PURE__ */ r(wa, { ...z });
|
|
7998
|
-
case
|
|
7975
|
+
case ce.Overview:
|
|
7999
7976
|
return /* @__PURE__ */ r(Sa, { ...z });
|
|
8000
|
-
case
|
|
7977
|
+
case ce.IdentitySdk:
|
|
8001
7978
|
return /* @__PURE__ */ r(za, { ...z });
|
|
8002
|
-
case
|
|
7979
|
+
case ce.RiskScoring:
|
|
8003
7980
|
return /* @__PURE__ */ r(Aa, { ...z });
|
|
8004
|
-
case
|
|
8005
|
-
case
|
|
7981
|
+
case ce.AdditionalData:
|
|
7982
|
+
case ce.InvestorCategorization:
|
|
8006
7983
|
return /* @__PURE__ */ r(La, { ...z });
|
|
8007
|
-
case
|
|
7984
|
+
case ce.AppropriatenessTest:
|
|
8008
7985
|
return /* @__PURE__ */ r(Pa, { ...z });
|
|
8009
|
-
case
|
|
7986
|
+
case ce.ManualReview:
|
|
8010
7987
|
return /* @__PURE__ */ r(
|
|
8011
7988
|
Mt,
|
|
8012
7989
|
{
|
|
@@ -8025,7 +8002,7 @@ const on = ({
|
|
|
8025
8002
|
] }),
|
|
8026
8003
|
/* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
8027
8004
|
"Action type: ",
|
|
8028
|
-
|
|
8005
|
+
ce[l.action]
|
|
8029
8006
|
] })
|
|
8030
8007
|
] }) });
|
|
8031
8008
|
}
|
|
@@ -8248,7 +8225,7 @@ export {
|
|
|
8248
8225
|
Mr as WorkflowOrchestrator,
|
|
8249
8226
|
ft as WorkflowResultType,
|
|
8250
8227
|
Pr as WorkflowState,
|
|
8251
|
-
|
|
8228
|
+
ce as WorkflowStepAction,
|
|
8252
8229
|
pn as appropriatenessTestSchema,
|
|
8253
8230
|
rn as clearAllStorage,
|
|
8254
8231
|
Vr as clearApplicantId,
|