@paykka/card-checkout-ui 0.13.1 → 0.13.5

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.
Files changed (158) hide show
  1. package/dist/card-checkout-ui.js +21 -21
  2. package/dist/card-checkout-ui.umd.cjs +21 -21
  3. package/dist/es/_commonjsHelpers.js +82 -1
  4. package/dist/es/api/modules/get-browser-params.js +4 -1
  5. package/dist/es/api/modules/opay-wallet/index.js +16 -0
  6. package/dist/es/api/modules/paga-wallet/index.js +16 -0
  7. package/dist/es/api/modules/pic-pay/index.js +16 -0
  8. package/dist/es/api/modules/pix/index.js +16 -0
  9. package/dist/es/api/modules/vietqr/index.js +4 -0
  10. package/dist/es/components/AliPay/index.js +29 -35
  11. package/dist/es/components/Boost/index.js +34 -40
  12. package/dist/es/components/Card/index.js +35 -39
  13. package/dist/es/components/DropIn/index.js +42 -2
  14. package/dist/es/components/EncryptedCard/index.js +5 -1
  15. package/dist/es/components/GooglePay/index.js +1 -0
  16. package/dist/es/components/GrabPay/index.js +34 -40
  17. package/dist/es/components/GuideCard/index.js +6 -1
  18. package/dist/es/components/LinePay/index.js +34 -40
  19. package/dist/es/components/MayBankQRPay/index.js +35 -41
  20. package/dist/es/components/NinePay/index.js +34 -40
  21. package/dist/es/components/SecuredFieldsProvider/index.js +23 -7
  22. package/dist/es/components/SecuredIframe/index.js +36 -59
  23. package/dist/es/components/Sepa/index.js +17 -21
  24. package/dist/es/components/ShopeePay/index.js +34 -40
  25. package/dist/es/components/TNGWallet/index.js +34 -40
  26. package/dist/es/components/ThreeDS/index.js +32 -7
  27. package/dist/es/components/WechatPay/index.js +19 -24
  28. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +6 -6
  29. package/dist/es/components/index.js +5 -0
  30. package/dist/es/components/internal/Form/FormItem.js +1 -1
  31. package/dist/es/components/internal/Form/util.js +1 -1
  32. package/dist/es/components/internal/Select/SelectMenu.js +2 -2
  33. package/dist/es/components/internal/icons/IconError.js +7 -4
  34. package/dist/es/components/internal/icons/IconOpayWallet.js +71 -0
  35. package/dist/es/components/internal/icons/IconPagaWallet.js +141 -0
  36. package/dist/es/components/internal/icons/IconPaymaya.js +42 -86
  37. package/dist/es/components/internal/icons/IconPicPay.js +49 -0
  38. package/dist/es/components/internal/icons/IconPix.js +75 -0
  39. package/dist/es/components/internal/icons/IconVietqr.js +45 -0
  40. package/dist/es/components/internal/icons/IconVietqrComplete.js +49 -0
  41. package/dist/es/components/wallets/GCash/GCash.js +20 -25
  42. package/dist/es/components/wallets/OpayWallet/OpayWallet.js +346 -0
  43. package/dist/es/components/wallets/OpayWallet/index.js +1 -0
  44. package/dist/es/components/wallets/OpayWallet/opay-wallet.js +1 -0
  45. package/dist/es/components/wallets/OpayWallet/type.js +1 -0
  46. package/dist/es/components/wallets/PagaWallet/PagaWallet.js +346 -0
  47. package/dist/es/components/wallets/PagaWallet/index.js +1 -0
  48. package/dist/es/components/wallets/PagaWallet/paga-wallet.js +1 -0
  49. package/dist/es/components/wallets/PagaWallet/type.js +1 -0
  50. package/dist/es/components/wallets/Paymaya/Paymaya.js +34 -40
  51. package/dist/es/components/wallets/PicPay/PicPay.js +346 -0
  52. package/dist/es/components/wallets/PicPay/index.js +1 -0
  53. package/dist/es/components/wallets/PicPay/pic-pay.js +1 -0
  54. package/dist/es/components/wallets/PicPay/type.js +1 -0
  55. package/dist/es/components/wallets/Pix/Pix.js +346 -0
  56. package/dist/es/components/wallets/Pix/index.js +1 -0
  57. package/dist/es/components/wallets/Pix/pix2.js +1 -0
  58. package/dist/es/components/wallets/Pix/type.js +1 -0
  59. package/dist/es/components/wallets/Vietqr/Vietqr.js +380 -0
  60. package/dist/es/components/wallets/Vietqr/index.js +1 -0
  61. package/dist/es/components/wallets/Vietqr/type.js +1 -0
  62. package/dist/es/components/wallets/Vietqr/vietqr2.js +1 -0
  63. package/dist/es/components/wallets/Zalopay/Zalopay.js +17 -21
  64. package/dist/es/components/wallets/index.js +8 -0
  65. package/dist/es/constant.js +32 -2
  66. package/dist/es/core/checkout.js +24 -1
  67. package/dist/es/core/create.js +1 -1
  68. package/dist/es/core/session.js +2 -23
  69. package/dist/es/core/theme.js +65 -0
  70. package/dist/es/core.js +34 -34
  71. package/dist/es/i18n/locales/de-DE.js +8 -2
  72. package/dist/es/i18n/locales/en-GB.js +8 -2
  73. package/dist/es/i18n/locales/es-ES.js +8 -2
  74. package/dist/es/i18n/locales/fr-FR.js +8 -2
  75. package/dist/es/i18n/locales/ja-JP.js +8 -2
  76. package/dist/es/i18n/locales/ko-KR.js +8 -2
  77. package/dist/es/i18n/locales/nl-NL.js +8 -2
  78. package/dist/es/i18n/locales/pt-PT.js +8 -2
  79. package/dist/es/i18n/locales/ru-RU.js +8 -2
  80. package/dist/es/i18n/locales/zh-CN.js +10 -4
  81. package/dist/es/i18n/locales/zh-HK.js +10 -4
  82. package/dist/es/i18n/locales/zh-TW.js +10 -4
  83. package/dist/es/index.js +17 -5
  84. package/dist/es/style.css +1 -1
  85. package/dist/es/utils/format.js +0 -5
  86. package/dist/es/utils/object.js +31 -1
  87. package/dist/es/utils/string.js +10 -0
  88. package/dist/es/utils/system-info/is-ua-webview.js +14 -12
  89. package/dist/es/utils/theme.js +7 -0
  90. package/dist/style.css +1 -1
  91. package/dist/types/api/modules/get-browser-params.d.ts +1 -0
  92. package/dist/types/api/modules/index.d.ts +5 -0
  93. package/dist/types/api/modules/opay-wallet/index.d.ts +4 -0
  94. package/dist/types/api/modules/paga-wallet/index.d.ts +4 -0
  95. package/dist/types/api/modules/pic-pay/index.d.ts +4 -0
  96. package/dist/types/api/modules/pix/index.d.ts +4 -0
  97. package/dist/types/api/modules/vietqr/index.d.ts +4 -0
  98. package/dist/types/components/DropIn/type.d.ts +3 -2
  99. package/dist/types/components/SecuredFieldsProvider/type.d.ts +5 -0
  100. package/dist/types/components/SecuredIframe/HiddenIframe.d.ts +3 -1
  101. package/dist/types/components/ThreeDS/components/ThreeDSAuth/type.d.ts +2 -0
  102. package/dist/types/components/business/QRCodeModal/type.d.ts +2 -0
  103. package/dist/types/components/index.d.ts +1 -3
  104. package/dist/types/components/internal/Loading/Loading.d.ts +1 -0
  105. package/dist/types/components/internal/Select/SelectMenu.d.ts +1 -1
  106. package/dist/types/components/internal/icons/IconOpayWallet.d.ts +2 -0
  107. package/dist/types/components/internal/icons/IconPagaWallet.d.ts +2 -0
  108. package/dist/types/components/internal/icons/IconPicPay.d.ts +2 -0
  109. package/dist/types/components/internal/icons/IconPix.d.ts +2 -0
  110. package/dist/types/components/internal/icons/IconVietqr.d.ts +2 -0
  111. package/dist/types/components/internal/icons/IconVietqrComplete.d.ts +2 -0
  112. package/dist/types/components/internal/icons/index.d.ts +6 -0
  113. package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +10 -0
  114. package/dist/types/components/wallets/OpayWallet/index.d.ts +2 -0
  115. package/dist/types/components/wallets/OpayWallet/type.d.ts +40 -0
  116. package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +10 -0
  117. package/dist/types/components/wallets/PagaWallet/index.d.ts +2 -0
  118. package/dist/types/components/wallets/PagaWallet/type.d.ts +40 -0
  119. package/dist/types/components/wallets/PicPay/PicPay.d.ts +10 -0
  120. package/dist/types/components/wallets/PicPay/index.d.ts +2 -0
  121. package/dist/types/components/wallets/PicPay/type.d.ts +40 -0
  122. package/dist/types/components/wallets/Pix/Pix.d.ts +10 -0
  123. package/dist/types/components/wallets/Pix/index.d.ts +2 -0
  124. package/dist/types/components/wallets/Pix/type.d.ts +40 -0
  125. package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +10 -0
  126. package/dist/types/components/wallets/Vietqr/index.d.ts +2 -0
  127. package/dist/types/components/wallets/Vietqr/type.d.ts +39 -0
  128. package/dist/types/components/wallets/index.d.ts +8 -0
  129. package/dist/types/components/wallets/type.d.ts +9 -0
  130. package/dist/types/constant.d.ts +11 -1
  131. package/dist/types/core/checkout.d.ts +4 -0
  132. package/dist/types/core/index.d.ts +1 -0
  133. package/dist/types/core/session.d.ts +1 -11
  134. package/dist/types/core/theme.d.ts +7 -0
  135. package/dist/types/i18n/locales/de-DE.d.ts +6 -0
  136. package/dist/types/i18n/locales/en-GB.d.ts +6 -0
  137. package/dist/types/i18n/locales/es-ES.d.ts +6 -0
  138. package/dist/types/i18n/locales/fr-FR.d.ts +6 -0
  139. package/dist/types/i18n/locales/ja-JP.d.ts +6 -0
  140. package/dist/types/i18n/locales/ko-KR.d.ts +6 -0
  141. package/dist/types/i18n/locales/nl-NL.d.ts +6 -0
  142. package/dist/types/i18n/locales/pt-PT.d.ts +6 -0
  143. package/dist/types/i18n/locales/ru-RU.d.ts +6 -0
  144. package/dist/types/i18n/locales/zh-CN.d.ts +6 -0
  145. package/dist/types/i18n/locales/zh-HK.d.ts +6 -0
  146. package/dist/types/i18n/locales/zh-TW.d.ts +6 -0
  147. package/dist/types/types/message.d.ts +29 -25
  148. package/dist/types/utils/index.d.ts +3 -2
  149. package/dist/types/utils/object.d.ts +7 -0
  150. package/dist/types/utils/string.d.ts +1 -0
  151. package/dist/types/utils/style.d.ts +1 -1
  152. package/dist/types/utils/system-info/is-ua-webview.d.ts +1 -1
  153. package/dist/types/utils/theme.d.ts +4 -0
  154. package/package.json +67 -67
  155. package/dist/es/utils/deep-freeze.js +0 -13
  156. package/dist/es/utils/obj.js +0 -22
  157. package/dist/types/utils/deep-freeze.d.ts +0 -1
  158. package/dist/types/utils/obj.d.ts +0 -6
@@ -35,12 +35,12 @@ import { CombinedCardInfo } from "../CombinedCardInfo/index.js";
35
35
  import { cardBrandCodes } from "../../utils/card-brand/brands.js";
36
36
  import { findCardBrand } from "../../utils/card-brand/index.js";
37
37
  import { separateInputStyle } from "../../utils/style.js";
38
- import { cssVarPrefix, normalizedClass, trimAll, formatAmount } from "../../utils/format.js";
39
38
  import { formatPaymentResult } from "../../utils/payment.js";
39
+ import { normalizedClass, trimAll, formatAmount } from "../../utils/format.js";
40
40
  const { bem } = useBEM("card");
41
41
  const fieldClassNames = bem("field");
42
42
  const Card = w((props, ref) => {
43
- var _a, _b, _c, _d, _e, _f, _g, _h;
43
+ var _a, _b;
44
44
  const {
45
45
  showCardBrands = true,
46
46
  session,
@@ -244,7 +244,7 @@ const Card = w((props, ref) => {
244
244
  });
245
245
  }
246
246
  const getPaymentParams = async () => {
247
- var _a2, _b2, _c2;
247
+ var _a2, _b2, _c;
248
248
  const cardNo = trimAll(form.number);
249
249
  const cardBrand = findCardBrand(cardNo);
250
250
  const [expMonth, expYear] = form.expireDate.split("/");
@@ -262,7 +262,7 @@ const Card = w((props, ref) => {
262
262
  }
263
263
  let cardBin;
264
264
  if (security) {
265
- cardBin = splitCardInfo ? (_b2 = cardNumberFieldRef.current) == null ? void 0 : _b2.binValue() : (_c2 = combinedCardInfoRef.current) == null ? void 0 : _c2.binValue();
265
+ cardBin = splitCardInfo ? (_b2 = cardNumberFieldRef.current) == null ? void 0 : _b2.binValue() : (_c = combinedCardInfoRef.current) == null ? void 0 : _c.binValue();
266
266
  }
267
267
  return {
268
268
  sessionId: session.sessionId,
@@ -300,7 +300,7 @@ const Card = w((props, ref) => {
300
300
  };
301
301
  };
302
302
  async function pay(search = false, timeout) {
303
- var _a2, _b2, _c2, _d2, _e2, _f2;
303
+ var _a2, _b2, _c, _d, _e, _f;
304
304
  try {
305
305
  const requestOptions = { locale: i18n.locale, timeout };
306
306
  let res = null;
@@ -316,9 +316,9 @@ const Card = w((props, ref) => {
316
316
  );
317
317
  } else {
318
318
  const paymentParams = await getPaymentParams();
319
- const extraParams = (_d2 = (_c2 = core.config)._getExtraParams) == null ? void 0 : _d2.call(_c2, "payment", PaymentMethod.BANKCARD);
319
+ const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.BANKCARD);
320
320
  if (security) {
321
- (_e2 = SFPRef.current) == null ? void 0 : _e2.payment(paymentParams, extraParams);
321
+ (_e = SFPRef.current) == null ? void 0 : _e.payment(paymentParams, extraParams);
322
322
  return { end: true };
323
323
  } else {
324
324
  res = await cardPay(paymentParams, extraParams, requestOptions);
@@ -336,7 +336,7 @@ const Card = w((props, ref) => {
336
336
  } else {
337
337
  const message = error.i18nKey ? i18n.get(error.i18nKey) : error.message;
338
338
  setErrorMsg(message);
339
- (_f2 = props.onError) == null ? void 0 : _f2.call(props, new PayKKaError("API_ERROR", message, { code: error.code, cause: error }));
339
+ (_f = props.onError) == null ? void 0 : _f.call(props, new PayKKaError("API_ERROR", message, { code: error.code, cause: error }));
340
340
  setSubmitButtonStatus("unSubmit");
341
341
  stopReFetchCardPay3DSInfo();
342
342
  return { end: true };
@@ -436,13 +436,6 @@ const Card = w((props, ref) => {
436
436
  }
437
437
  );
438
438
  };
439
- const formStyle = {
440
- [cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
441
- [cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
442
- [cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
443
- [cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
444
- [cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
445
- };
446
439
  const { start: startReFetchCardPay3DSInfo, stop: stopReFetchCardPay3DSInfo } = useRetry(
447
440
  (timeout) => checkThreeDS(true, timeout),
448
441
  {
@@ -451,7 +444,7 @@ const Card = w((props, ref) => {
451
444
  }
452
445
  );
453
446
  async function checkThreeDS(search = false, timeout = 2e4) {
454
- var _a2, _b2, _c2, _d2, _e2;
447
+ var _a2, _b2, _c, _d, _e;
455
448
  if (!session)
456
449
  return { end: true };
457
450
  try {
@@ -477,7 +470,7 @@ const Card = w((props, ref) => {
477
470
  processOnError(new PayKKaError("API_ERROR", errorMessage, { code: errorCode }));
478
471
  } else if (orderStatus === "AUTHORIZED") {
479
472
  setSubmitButtonStatus("unSubmit");
480
- (_c2 = props.onAuthorized) == null ? void 0 : _c2.call(props);
473
+ (_c = props.onAuthorized) == null ? void 0 : _c.call(props);
481
474
  } else if (orderStatus === "IN_THREED") {
482
475
  setSubmitButtonStatus("loading");
483
476
  !search && startReFetchCardPay3DSInfo();
@@ -496,7 +489,7 @@ const Card = w((props, ref) => {
496
489
  return { end: true };
497
490
  } else if (status === "EXPIRED") {
498
491
  setSubmitButtonStatus("unSubmit");
499
- (_d2 = props.onExpired) == null ? void 0 : _d2.call(props);
492
+ (_d = props.onExpired) == null ? void 0 : _d.call(props);
500
493
  stopReFetchCardPay3DSInfo();
501
494
  return { end: true };
502
495
  }
@@ -514,7 +507,7 @@ const Card = w((props, ref) => {
514
507
  } else {
515
508
  const message = error.i18nKey ? i18n.get(error.i18nKey) : error.message;
516
509
  setErrorMsg(message);
517
- (_e2 = props.onError) == null ? void 0 : _e2.call(props, new PayKKaError("API_ERROR", message, { code: error.code, cause: error }));
510
+ (_e = props.onError) == null ? void 0 : _e.call(props, new PayKKaError("API_ERROR", message, { code: error.code, cause: error }));
518
511
  setSubmitButtonStatus("unSubmit");
519
512
  stopReFetchCardPay3DSInfo();
520
513
  return { end: true };
@@ -536,7 +529,7 @@ const Card = w((props, ref) => {
536
529
  }
537
530
  return (session == null ? void 0 : session.checkout.paymentType) === PaymentType.PURCHASE && (session == null ? void 0 : session.checkout.storePaymentMethod);
538
531
  }, [session == null ? void 0 : session.checkout]);
539
- const storeCheckBox = () => {
532
+ const StoreCheckBox = () => {
540
533
  const onCheck = (checked) => {
541
534
  setStorePaymentMethod(checked);
542
535
  };
@@ -550,9 +543,9 @@ const Card = w((props, ref) => {
550
543
  ) });
551
544
  };
552
545
  const changeBox = () => {
553
- var _a2, _b2, _c2;
546
+ var _a2, _b2, _c;
554
547
  const isPurchase = ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.paymentType) === PaymentType.PURCHASE;
555
- const hasCardTokens = !!((_c2 = (_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.tokens) == null ? void 0 : _c2.length);
548
+ const hasCardTokens = !!((_c = (_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.tokens) == null ? void 0 : _c.length);
556
549
  const onClick = () => {
557
550
  var _a3;
558
551
  (_a3 = formRef.current) == null ? void 0 : _a3.resetValidation();
@@ -616,7 +609,7 @@ const Card = w((props, ref) => {
616
609
  [EFieldType.CVV]: null
617
610
  });
618
611
  const onFieldValidStatusChanged = (data) => {
619
- var _a2, _b2, _c2, _d2;
612
+ var _a2, _b2, _c, _d;
620
613
  const fieldRef = splitCardInfo ? fieldRefMap[data.fieldType] : combinedCardInfoRef;
621
614
  const error = data.errorTip && i18n.get(data.errorTip);
622
615
  if (!splitCardInfo) {
@@ -637,10 +630,10 @@ const Card = w((props, ref) => {
637
630
  if (isSuccess) {
638
631
  (_b2 = fieldRef.current) == null ? void 0 : _b2.resetValidation("success");
639
632
  } else {
640
- (_c2 = fieldRef.current) == null ? void 0 : _c2.resetValidation("unValidate");
633
+ (_c = fieldRef.current) == null ? void 0 : _c.resetValidation("unValidate");
641
634
  }
642
635
  } else {
643
- (_d2 = fieldRef.current) == null ? void 0 : _d2.resetValidation(data.status, error);
636
+ (_d = fieldRef.current) == null ? void 0 : _d.resetValidation(data.status, error);
644
637
  }
645
638
  setTimeout(() => {
646
639
  validateForm();
@@ -695,7 +688,7 @@ const Card = w((props, ref) => {
695
688
  return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg }) });
696
689
  };
697
690
  const CardInfo = q(() => {
698
- var _a2, _b2, _c2, _d2;
691
+ var _a2, _b2, _c, _d;
699
692
  return splitCardInfo ? /* @__PURE__ */ u(b, { children: [
700
693
  /* @__PURE__ */ u("div", { className: fieldClassNames, children: [
701
694
  /* @__PURE__ */ u("div", { className: bem("card-number-wrapper"), children: [
@@ -714,7 +707,7 @@ const Card = w((props, ref) => {
714
707
  CardBrands,
715
708
  {
716
709
  className: bem("card-brands"),
717
- supportedCardBrands: (_d2 = (_c2 = session == null ? void 0 : session.checkout) == null ? void 0 : _c2.supportMethods) == null ? void 0 : _d2.filter(Boolean)
710
+ supportedCardBrands: (_d = (_c = session == null ? void 0 : session.checkout) == null ? void 0 : _c.supportMethods) == null ? void 0 : _d.filter(Boolean)
718
711
  }
719
712
  )
720
713
  ] }),
@@ -748,40 +741,41 @@ const Card = w((props, ref) => {
748
741
  }, [splitCardInfo, security]);
749
742
  const cardForm = () => {
750
743
  var _a2;
751
- return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), style: formStyle, children: [
744
+ return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
752
745
  Email(),
753
746
  CardInfo(),
754
747
  (fieldStatus == null ? void 0 : fieldStatus.holderName.show) && /* @__PURE__ */ u("div", { className: bem("holder-name"), children: /* @__PURE__ */ u(CardHolderNameField, { disabled: fieldStatus == null ? void 0 : fieldStatus.holderName.disabled }) }),
755
748
  Address(),
756
749
  ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.paymentType) === PaymentType.RECURRING && RecurringTip(),
757
750
  /* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
758
- isShowStoreCheckBox && storeCheckBox(),
751
+ isShowStoreCheckBox && StoreCheckBox(),
759
752
  ErrorMessage(),
760
753
  !hidePaymentButton && Button()
761
754
  ] })
762
755
  ] }) });
763
756
  };
764
757
  const fastPaymentCardForm = () => {
765
- var _a2, _b2, _c2, _d2;
766
- return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), style: formStyle, children: [
758
+ var _a2, _b2, _c, _d;
759
+ return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
767
760
  Email(),
768
761
  /* @__PURE__ */ u("div", { className: bem("card-selector-wrapper"), children: [
769
762
  /* @__PURE__ */ u(
770
763
  CardSelector,
771
764
  {
772
- value: (_c2 = (_b2 = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.tokens) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.token,
773
- cardList: (_d2 = session == null ? void 0 : session.checkout) == null ? void 0 : _d2.tokens,
765
+ value: (_c = (_b2 = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.tokens) == null ? void 0 : _b2[0]) == null ? void 0 : _c.token,
766
+ cardList: (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.tokens,
774
767
  onClickEdit: onEditOtherCard,
775
768
  onClickChange: onClickChangeCard,
776
769
  onCardChange,
777
- style: { flex: 2, marginRight: "12px" }
770
+ className: bem("card-selector", fieldClassNames),
771
+ style: { flex: 2 }
778
772
  }
779
773
  ),
780
774
  /* @__PURE__ */ u(
781
775
  CardSecurityCodeField,
782
776
  {
783
- className: fieldClassNames,
784
- style: { flex: 1, marginLeft: "12px" },
777
+ className: bem("card-security-code", fieldClassNames),
778
+ style: { flex: 1 },
785
779
  security,
786
780
  ref: cardSecurityCodeFieldRef
787
781
  }
@@ -794,13 +788,14 @@ const Card = w((props, ref) => {
794
788
  ] })
795
789
  ] }) });
796
790
  };
797
- return /* @__PURE__ */ u(CoreContext.Provider, { value: { i18n, core }, children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u(b, { children: [
791
+ return /* @__PURE__ */ u(CoreContext.Provider, { value: { i18n, core }, children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: [
798
792
  /* @__PURE__ */ u(
799
793
  SecuredFieldsProvider,
800
794
  {
801
795
  ref: SFPRef,
802
796
  i18n,
803
- sessionMode: (_g = session.checkout) == null ? void 0 : _g.sessionMode,
797
+ checkoutId: core.id,
798
+ sessionMode: (_a = session.checkout) == null ? void 0 : _a.sessionMode,
804
799
  supportedCardBrands,
805
800
  style: inputStyle || defaultInputStyleConfig,
806
801
  onFocus: onFieldsFocus,
@@ -818,8 +813,9 @@ const Card = w((props, ref) => {
818
813
  ThreeDSAuth,
819
814
  {
820
815
  show: showThreeDSModal,
821
- theme: (_h = session == null ? void 0 : session.checkout) == null ? void 0 : _h.theme,
816
+ theme: (_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.theme,
822
817
  onClose: handleCloseThreeDSModal,
818
+ checkoutId: core.id,
823
819
  ...threeDSInfo
824
820
  }
825
821
  )
@@ -17,6 +17,11 @@ import { GrabPay } from "../GrabPay/index.js";
17
17
  import { GCash } from "../wallets/GCash/GCash.js";
18
18
  import { Paymaya } from "../wallets/Paymaya/Paymaya.js";
19
19
  import { Zalopay } from "../wallets/Zalopay/Zalopay.js";
20
+ import { Vietqr } from "../wallets/Vietqr/Vietqr.js";
21
+ import { Pix } from "../wallets/Pix/Pix.js";
22
+ import { PicPay } from "../wallets/PicPay/PicPay.js";
23
+ import { OpayWallet } from "../wallets/OpayWallet/OpayWallet.js";
24
+ import { PagaWallet } from "../wallets/PagaWallet/PagaWallet.js";
20
25
  import { useBEM } from "../../hooks/useBEM.js";
21
26
  import { intersection } from "../../utils/index.js";
22
27
  import { PayKKaError } from "../../core/error.js";
@@ -34,6 +39,11 @@ import { IconCard2 } from "../internal/icons/IconCard2.js";
34
39
  import { IconGCash } from "../internal/icons/IconGCash.js";
35
40
  import { IconPaymaya } from "../internal/icons/IconPaymaya.js";
36
41
  import { IconZalopay } from "../internal/icons/IconZalopay.js";
42
+ import { IconVietqr } from "../internal/icons/IconVietqr.js";
43
+ import { IconPix } from "../internal/icons/IconPix.js";
44
+ import { IconPicPay } from "../internal/icons/IconPicPay.js";
45
+ import { IconOpayWallet } from "../internal/icons/IconOpayWallet.js";
46
+ import { IconPagaWallet } from "../internal/icons/IconPagaWallet.js";
37
47
  import { removeElementFromArray } from "../../utils/array.js";
38
48
  const dropInSupportedPaymentMethods = [
39
49
  ...CardPaymentMethods,
@@ -48,7 +58,12 @@ const dropInSupportedPaymentMethods = [
48
58
  PaymentMethod.MAY_BANK_QR_PAY,
49
59
  PaymentMethod.GCASH,
50
60
  PaymentMethod.PAYMAYA,
51
- PaymentMethod.ZALOPAY
61
+ PaymentMethod.VIETQR,
62
+ PaymentMethod.ZALOPAY,
63
+ PaymentMethod.PIX,
64
+ PaymentMethod.PIC_PAY,
65
+ PaymentMethod.OPAY_WALLET,
66
+ PaymentMethod.PAGA_WALLET
52
67
  ];
53
68
  const PaymentComponentMap = {
54
69
  [PaymentCategory.CARD]: Card,
@@ -63,7 +78,12 @@ const PaymentComponentMap = {
63
78
  [PaymentCategory.GRAB_PAY]: GrabPay,
64
79
  [PaymentCategory.GCASH]: GCash,
65
80
  [PaymentCategory.PAYMAYA]: Paymaya,
66
- [PaymentCategory.ZALOPAY]: Zalopay
81
+ [PaymentCategory.ZALOPAY]: Zalopay,
82
+ [PaymentCategory.VIETQR]: Vietqr,
83
+ [PaymentCategory.PIX]: Pix,
84
+ [PaymentCategory.PIC_PAY]: PicPay,
85
+ [PaymentCategory.OPAY_WALLET]: OpayWallet,
86
+ [PaymentCategory.PAGA_WALLET]: PagaWallet
67
87
  // [PaymentCategory.WECHAT_PAY]: WechatPay,
68
88
  // [PaymentCategory.ALI_PAY]: AliPay,
69
89
  // [PaymentCategory.SEPA_DEBIT]: Sepa
@@ -142,6 +162,26 @@ const paymentCategoryOptionMap = {
142
162
  [PaymentCategory.ZALOPAY]: {
143
163
  icon: IconZalopay,
144
164
  nameKey: "dropIn.zalopay.label"
165
+ },
166
+ [PaymentCategory.VIETQR]: {
167
+ icon: IconVietqr,
168
+ nameKey: "dropIn.vietqr.label"
169
+ },
170
+ [PaymentCategory.PIX]: {
171
+ icon: IconPix,
172
+ nameKey: "dropIn.pix.label"
173
+ },
174
+ [PaymentCategory.PIC_PAY]: {
175
+ icon: IconPicPay,
176
+ nameKey: "dropIn.picPay.label"
177
+ },
178
+ [PaymentCategory.OPAY_WALLET]: {
179
+ icon: IconOpayWallet,
180
+ nameKey: "dropIn.opayWallet.label"
181
+ },
182
+ [PaymentCategory.PAGA_WALLET]: {
183
+ icon: IconPagaWallet,
184
+ nameKey: "dropIn.pagaWallet.label"
145
185
  }
146
186
  };
147
187
  const { bem } = useBEM("drop-in");
@@ -1,10 +1,10 @@
1
1
  import { setApiUrl, setCDNUrl } from "../../config.js";
2
2
  import { CoreContext } from "../../core/context.js";
3
3
  import { create } from "../../core/create.js";
4
+ import { w, F, h, A, y, u } from "../../core.js";
4
5
  import "../../api/http.js";
5
6
  import "../../utils/card-brand/brands.js";
6
7
  import { getBrowserInfo } from "../../utils/system-info/get-browser-info.js";
7
- import { w, F, h, A, y, u } from "../../core.js";
8
8
  import { useBEM } from "../../hooks/useBEM.js";
9
9
  import { useI18n } from "../../hooks/useI18n.js";
10
10
  import { defaultInputStyleConfig } from "../../types/index.js";
@@ -23,6 +23,7 @@ import { CombinedCardInfo } from "../CombinedCardInfo/index.js";
23
23
  import "../internal/Input/Input.js";
24
24
  import { inputWrapperClassName } from "../internal/Input/type.js";
25
25
  import { separateInputStyle, genComponentStyle, loadStyle } from "../../utils/style.js";
26
+ import { genShortId } from "../../utils/string.js";
26
27
  const ENCRYPTED_CARD_WRAPPER_ID = "encryptedCardWrapper";
27
28
  const ENCRYPTED_CARD_ITEM_ATTR = "data-eci";
28
29
  var EEncryptedCardType = /* @__PURE__ */ ((EEncryptedCardType2) => {
@@ -52,6 +53,7 @@ const EncryptedCard = w((props, ref) => {
52
53
  var _a2;
53
54
  console.log("校验通过");
54
55
  (_a2 = SFPRef.current) == null ? void 0 : _a2.encryptCard({
56
+ checkoutId,
55
57
  merchantId,
56
58
  clientKey
57
59
  });
@@ -60,6 +62,7 @@ const EncryptedCard = w((props, ref) => {
60
62
  });
61
63
  }
62
64
  }));
65
+ const [checkoutId] = h(genShortId(6));
63
66
  const { i18n } = useI18n(locale || getBrowserInfo().language);
64
67
  const [single, setSingle] = h(false);
65
68
  const [showEncryptedCard, setShowEncryptedCard] = h(false);
@@ -371,6 +374,7 @@ const EncryptedCard = w((props, ref) => {
371
374
  {
372
375
  ref: SFPRef,
373
376
  targetElement,
377
+ checkoutId,
374
378
  i18n,
375
379
  style: inputStyle || defaultInputStyleConfig,
376
380
  supportedCardBrands: supportedBrands,
@@ -526,6 +526,7 @@ const GooglePay = w((props, ref) => {
526
526
  {
527
527
  show: showThreeDSModal,
528
528
  theme: (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.theme,
529
+ checkoutId: core.id,
529
530
  ...threeDSInfo,
530
531
  onClose: handleCloseThreeDSModal
531
532
  }
@@ -3,7 +3,7 @@ import { useBEM } from "../../hooks/useBEM.js";
3
3
  import { CoreContext } from "../../core/context.js";
4
4
  import "../../utils/card-brand/brands.js";
5
5
  import "../../utils/system-info/get-browser-info.js";
6
- import { cssVarPrefix, normalizedClass, formatAmount } from "../../utils/format.js";
6
+ import { normalizedClass, formatAmount } from "../../utils/format.js";
7
7
  import { redirectToPayment } from "../../utils/redirect.js";
8
8
  import { formatPaymentResult } from "../../utils/payment.js";
9
9
  import { isTimeoutError } from "../../api/http.js";
@@ -25,7 +25,6 @@ import { GuideCard } from "../GuideCard/index.js";
25
25
  const { bem } = useBEM("grab-pay");
26
26
  const fieldClassNames = bem("field");
27
27
  const GrabPay = w((props, ref) => {
28
- var _a, _b, _c, _d, _e, _f;
29
28
  const {
30
29
  session,
31
30
  showEmail = false,
@@ -46,21 +45,21 @@ const GrabPay = w((props, ref) => {
46
45
  startReFetchPayInfo({ timeout });
47
46
  },
48
47
  updateAddress: () => {
49
- var _a2;
48
+ var _a;
50
49
  if (!(fieldStatus == null ? void 0 : fieldStatus.address.show))
51
50
  return;
52
51
  const newForm = Object.assign(form, { address: addressCore.getAddressState() });
53
52
  setForm(newForm);
54
- (_a2 = addressFieldRef.current) == null ? void 0 : _a2.update(addressCore.getAddressState());
53
+ (_a = addressFieldRef.current) == null ? void 0 : _a.update(addressCore.getAddressState());
55
54
  validateForm();
56
55
  },
57
56
  updateEmail: () => {
58
- var _a2;
57
+ var _a;
59
58
  if (!(fieldStatus == null ? void 0 : fieldStatus.email.show))
60
59
  return;
61
60
  const newForm = Object.assign(form, { email: emailState.email });
62
61
  setForm(newForm);
63
- (_a2 = emailFieldRef.current) == null ? void 0 : _a2.update(emailState.email);
62
+ (_a = emailFieldRef.current) == null ? void 0 : _a.update(emailState.email);
64
63
  validateForm();
65
64
  },
66
65
  payment: () => {
@@ -103,11 +102,11 @@ const GrabPay = w((props, ref) => {
103
102
  setFieldStatus({ ...field });
104
103
  };
105
104
  const processOnSuccess = (res) => {
106
- var _a2, _b2;
105
+ var _a, _b;
107
106
  setSubmitButtonStatus("success");
108
- (_b2 = props.onSuccess) == null ? void 0 : _b2.call(props, formatPaymentResult({
107
+ (_b = props.onSuccess) == null ? void 0 : _b.call(props, formatPaymentResult({
109
108
  ...res,
110
- returnUrl: (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.returnUrl
109
+ returnUrl: (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.returnUrl
111
110
  }));
112
111
  };
113
112
  y(() => {
@@ -129,16 +128,16 @@ const GrabPay = w((props, ref) => {
129
128
  }
130
129
  }, [sessionReady]);
131
130
  const processOnError = (error) => {
132
- var _a2;
133
- (_a2 = props.onError) == null ? void 0 : _a2.call(props, error);
131
+ var _a;
132
+ (_a = props.onError) == null ? void 0 : _a.call(props, error);
134
133
  core.resetEnablePaymentMethod();
135
134
  };
136
135
  const onTimeout = q(
137
136
  (message) => {
138
- var _a2;
137
+ var _a;
139
138
  setErrorMsg(message || i18n.get("common.payTimeout"));
140
139
  setSubmitButtonStatus("unSubmit");
141
- (_a2 = props.onTimeout) == null ? void 0 : _a2.call(props);
140
+ (_a = props.onTimeout) == null ? void 0 : _a.call(props);
142
141
  core.resetEnablePaymentMethod();
143
142
  },
144
143
  [i18n, props.onTimeout]
@@ -168,12 +167,12 @@ const GrabPay = w((props, ref) => {
168
167
  };
169
168
  };
170
169
  const pay = async (search = false, timeout) => {
171
- var _a2, _b2, _c2, _d2, _e2, _f2, _g;
170
+ var _a, _b, _c, _d, _e, _f, _g;
172
171
  try {
173
172
  const requestOptions = { locale: i18n.locale, timeout };
174
173
  let res = null;
175
174
  if (search) {
176
- const extraParams = (_b2 = (_a2 = core.config)._getExtraParams) == null ? void 0 : _b2.call(_a2, "query", PaymentMethod.GRAB_PAY);
175
+ const extraParams = (_b = (_a = core.config)._getExtraParams) == null ? void 0 : _b.call(_a, "query", PaymentMethod.GRAB_PAY);
177
176
  res = await getGrabPayInfo(
178
177
  {
179
178
  sessionId: session.sessionId,
@@ -184,10 +183,10 @@ const GrabPay = w((props, ref) => {
184
183
  requestOptions
185
184
  );
186
185
  } else {
187
- const extraParams = (_d2 = (_c2 = core.config)._getExtraParams) == null ? void 0 : _d2.call(_c2, "payment", PaymentMethod.GRAB_PAY);
186
+ const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.GRAB_PAY);
188
187
  res = await grabPay(await getPaymentParams(), extraParams, requestOptions);
189
188
  }
190
- !search && ((_e2 = props.onSubmitResponse) == null ? void 0 : _e2.call(props, res));
189
+ !search && ((_e = props.onSubmitResponse) == null ? void 0 : _e.call(props, res));
191
190
  const { status, orderStatus, errorMessage, errorCode, payInfo, sessionId } = res;
192
191
  sessionId && (session.sessionId = sessionId);
193
192
  if (status === "PROCESSING") {
@@ -214,7 +213,7 @@ const GrabPay = w((props, ref) => {
214
213
  return { end: false };
215
214
  } else if (orderStatus === "CANCELED") {
216
215
  setSubmitButtonStatus("unSubmit");
217
- (_f2 = props.onTimeout) == null ? void 0 : _f2.call(props);
216
+ (_f = props.onTimeout) == null ? void 0 : _f.call(props);
218
217
  core.resetEnablePaymentMethod();
219
218
  return { end: true };
220
219
  }
@@ -246,8 +245,8 @@ const GrabPay = w((props, ref) => {
246
245
  }
247
246
  };
248
247
  const validateForm = () => {
249
- var _a2;
250
- (_a2 = formRef.current) == null ? void 0 : _a2.validate(void 0, false).then(() => {
248
+ var _a;
249
+ (_a = formRef.current) == null ? void 0 : _a.validate(void 0, false).then(() => {
251
250
  setValidated(true);
252
251
  }).catch(() => {
253
252
  setValidated(false);
@@ -257,12 +256,12 @@ const GrabPay = w((props, ref) => {
257
256
  validateForm();
258
257
  }, [form]);
259
258
  const onSubmit = async () => {
260
- var _a2;
259
+ var _a;
261
260
  setErrorMsg("");
262
- (_a2 = formRef.current) == null ? void 0 : _a2.validate(async (errors) => {
263
- var _a3;
261
+ (_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
262
+ var _a2;
264
263
  (fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
265
- (_a3 = props.onSubmit) == null ? void 0 : _a3.call(props, errors);
264
+ (_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors);
266
265
  if (errors) {
267
266
  setSubmitButtonStatus("unSubmit");
268
267
  return;
@@ -277,8 +276,8 @@ const GrabPay = w((props, ref) => {
277
276
  dom && validateForm();
278
277
  };
279
278
  const Button = () => {
280
- var _a2;
281
- const transAmount = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.transAmount;
279
+ var _a;
280
+ const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
282
281
  const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
283
282
  const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
284
283
  return /* @__PURE__ */ u(
@@ -304,24 +303,17 @@ const GrabPay = w((props, ref) => {
304
303
  }
305
304
  ) }) });
306
305
  };
307
- const formStyle = {
308
- [cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
309
- [cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
310
- [cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
311
- [cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
312
- [cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
313
- };
314
306
  const ErrorMessage = () => {
315
- return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg, style: { marginTop: "12px" } }) });
307
+ return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg }) });
316
308
  };
317
309
  const Address = () => {
318
- var _a2, _b2;
310
+ var _a, _b;
319
311
  return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
320
312
  AddressField,
321
313
  {
322
314
  ref: addressFieldRef,
323
315
  value: form.address,
324
- country: ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.country) || ((_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.bill.country),
316
+ country: ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.country) || ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.bill.country),
325
317
  onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
326
318
  }
327
319
  ) }) });
@@ -334,13 +326,15 @@ const GrabPay = w((props, ref) => {
334
326
  session,
335
327
  core
336
328
  },
337
- children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u(b, { children: [
329
+ children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: [
338
330
  showGuideCard && /* @__PURE__ */ u(GuideCard, { type: PaymentCategory.GRAB_PAY }),
339
- /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), style: formStyle, children: [
331
+ /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
340
332
  Email(),
341
333
  Address(),
342
- ErrorMessage(),
343
- !hidePaymentButton && Button()
334
+ /* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
335
+ ErrorMessage(),
336
+ !hidePaymentButton && Button()
337
+ ] })
344
338
  ] }) })
345
339
  ] })
346
340
  }
@@ -35,7 +35,12 @@ const GuideCard = (props) => {
35
35
  [PaymentCategory.MAY_BANK_QR_PAY]: redirectGuideCard,
36
36
  [PaymentCategory.GCASH]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.gcash.label")),
37
37
  [PaymentCategory.PAYMAYA]: redirectGuideCard,
38
- [PaymentCategory.ZALOPAY]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.zalopay.label"))
38
+ [PaymentCategory.ZALOPAY]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.zalopay.label")),
39
+ [PaymentCategory.VIETQR]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.vietqr.label")),
40
+ [PaymentCategory.PIX]: redirectGuideCard,
41
+ [PaymentCategory.PIC_PAY]: redirectGuideCard,
42
+ [PaymentCategory.OPAY_WALLET]: redirectGuideCard,
43
+ [PaymentCategory.PAGA_WALLET]: redirectGuideCard
39
44
  };
40
45
  return /* @__PURE__ */ u(b, { children: guideCardInfoMap[type] && /* @__PURE__ */ u("div", { className: bem(), children: /* @__PURE__ */ u("div", { className: bem("content"), children: [
41
46
  /* @__PURE__ */ u("div", { className: bem("icon"), children: (_a = guideCardInfoMap[type]) == null ? void 0 : _a.icon }),