@learncard/react 2.6.55 → 2.6.57

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 (351) hide show
  1. package/dist/cjs/{AchievementCard-9048086b.js → AchievementCard-6e875eff.js} +6 -6
  2. package/dist/cjs/{AchievementCard-9048086b.js.map → AchievementCard-6e875eff.js.map} +1 -1
  3. package/dist/cjs/{BoostGenericCard-3d172644.js → BoostGenericCard-78173946.js} +4 -4
  4. package/dist/cjs/{BoostGenericCard-3d172644.js.map → BoostGenericCard-78173946.js.map} +1 -1
  5. package/dist/cjs/{BoostSmallCard-15245e9d.js → BoostSmallCard-a18bc6b0.js} +41 -7
  6. package/dist/cjs/BoostSmallCard-a18bc6b0.js.map +1 -0
  7. package/dist/cjs/CertificateDisplayCard-405573a7.js +1192 -0
  8. package/dist/cjs/CertificateDisplayCard-405573a7.js.map +1 -0
  9. package/dist/cjs/{CircleCheckButton-92547a76.js → CircleCheckButton-533f6909.js} +2 -2
  10. package/dist/cjs/{CircleCheckButton-92547a76.js.map → CircleCheckButton-533f6909.js.map} +1 -1
  11. package/dist/cjs/CircleIcon-4b16b093.js +98 -0
  12. package/dist/cjs/CircleIcon-4b16b093.js.map +1 -0
  13. package/dist/cjs/{CourseVerticalCard-e3b624a0.js → CourseVerticalCard-192f2b04.js} +4 -4
  14. package/dist/cjs/{CourseVerticalCard-e3b624a0.js.map → CourseVerticalCard-192f2b04.js.map} +1 -1
  15. package/dist/cjs/{GenericCard-9b824111.js → GenericCard-3805a866.js} +4 -4
  16. package/dist/cjs/{GenericCard-9b824111.js.map → GenericCard-3805a866.js.map} +1 -1
  17. package/dist/cjs/{JobListCard-e0bf5c30.js → JobListCard-ccc86b2e.js} +3 -3
  18. package/dist/cjs/{JobListCard-e0bf5c30.js.map → JobListCard-ccc86b2e.js.map} +1 -1
  19. package/dist/cjs/{LearnPill-b688ea8e.js → LearnPill-0ca6cc11.js} +3 -3
  20. package/dist/cjs/{LearnPill-b688ea8e.js.map → LearnPill-0ca6cc11.js.map} +1 -1
  21. package/dist/cjs/{Notification-9d230f1b.js → Notification-0bc2680c.js} +2 -2
  22. package/dist/cjs/{Notification-9d230f1b.js.map → Notification-0bc2680c.js.map} +1 -1
  23. package/dist/cjs/{NotificationBoostCard-3b3bd47d.js → NotificationBoostCard-194ae55a.js} +2 -2
  24. package/dist/cjs/{NotificationBoostCard-3b3bd47d.js.map → NotificationBoostCard-194ae55a.js.map} +1 -1
  25. package/dist/cjs/{RoundedPill-7810990b.js → RoundedPill-e30b61f8.js} +2 -2
  26. package/dist/cjs/{RoundedPill-7810990b.js.map → RoundedPill-e30b61f8.js.map} +1 -1
  27. package/dist/cjs/RoundedSquare-71308a4a.js +58 -0
  28. package/dist/cjs/RoundedSquare-71308a4a.js.map +1 -0
  29. package/dist/cjs/SchoolIDCard-44ef96bd.js +68 -0
  30. package/dist/cjs/SchoolIDCard-44ef96bd.js.map +1 -0
  31. package/dist/cjs/{SkillTabCard-47e4dd2d.js → SkillTabCard-16609965.js} +4 -4
  32. package/dist/cjs/{SkillTabCard-47e4dd2d.js.map → SkillTabCard-16609965.js.map} +1 -1
  33. package/dist/cjs/{SmallAchievementCard-c76701ce.js → SmallAchievementCard-a1fa862b.js} +2 -2
  34. package/dist/cjs/{SmallAchievementCard-c76701ce.js.map → SmallAchievementCard-a1fa862b.js.map} +1 -1
  35. package/dist/cjs/{Trophy-9ede7f2b.js → Trophy-3d323be3.js} +5 -2
  36. package/dist/cjs/Trophy-3d323be3.js.map +1 -0
  37. package/dist/cjs/{User-92f9cf40.js → User-dde46685.js} +19 -4
  38. package/dist/cjs/User-dde46685.js.map +1 -0
  39. package/dist/cjs/{VCCard-34b194a2.js → VCCard-397ba465.js} +40 -4
  40. package/dist/cjs/VCCard-397ba465.js.map +1 -0
  41. package/dist/cjs/{VCDisplayBackFace-919117cc.js → VCDisplayBackFace-3cc78d41.js} +3 -3
  42. package/dist/cjs/{VCDisplayBackFace-919117cc.js.map → VCDisplayBackFace-3cc78d41.js.map} +1 -1
  43. package/dist/cjs/{VCDisplayCard-d1158c4a.js → VCDisplayCard-0f7226d7.js} +3 -3
  44. package/dist/cjs/{VCDisplayCard-d1158c4a.js.map → VCDisplayCard-0f7226d7.js.map} +1 -1
  45. package/dist/cjs/VCDisplayCard2-594288c0.js +2691 -0
  46. package/dist/cjs/VCDisplayCard2-594288c0.js.map +1 -0
  47. package/dist/cjs/{types.esm-d5381f5d.js → VCVerificationPill-d0edd7ae.js} +72 -1
  48. package/dist/cjs/VCVerificationPill-d0edd7ae.js.map +1 -0
  49. package/dist/cjs/athletics.svg +9 -0
  50. package/dist/cjs/business.svg +9 -0
  51. package/dist/cjs/{constants-ea765e7c.js → constants-bf970829.js} +2 -51
  52. package/dist/cjs/constants-bf970829.js.map +1 -0
  53. package/dist/cjs/creative.svg +9 -0
  54. package/dist/cjs/{credential.helpers-b8363e2e.js → credential.helpers-f1087746.js} +292 -9
  55. package/dist/cjs/credential.helpers-f1087746.js.map +1 -0
  56. package/dist/cjs/digital.svg +9 -0
  57. package/dist/cjs/durable.svg +9 -0
  58. package/dist/cjs/{icons-2c6b7ed0.js → icons-9d37a8b8.js} +2 -2
  59. package/dist/cjs/{icons-2c6b7ed0.js.map → icons-9d37a8b8.js.map} +1 -1
  60. package/dist/cjs/{index-bee9764e.js → index-7d94d5ac.js} +3 -1
  61. package/dist/cjs/index-7d94d5ac.js.map +1 -0
  62. package/dist/cjs/{index-c3097979.js → index-c570c8fb.js} +4 -4
  63. package/dist/cjs/index-c570c8fb.js.map +1 -0
  64. package/dist/cjs/index.es-f433af46.js +194 -0
  65. package/dist/cjs/index.es-f433af46.js.map +1 -0
  66. package/dist/cjs/index.js +63 -46
  67. package/dist/cjs/index.js.map +1 -1
  68. package/dist/cjs/index10.js +30 -2
  69. package/dist/cjs/index10.js.map +1 -1
  70. package/dist/cjs/index11.js +2 -45
  71. package/dist/cjs/index11.js.map +1 -1
  72. package/dist/cjs/index12.js +8 -137
  73. package/dist/cjs/index12.js.map +1 -1
  74. package/dist/cjs/index13.js +190 -2
  75. package/dist/cjs/index13.js.map +1 -1
  76. package/dist/cjs/index14.js +3 -21
  77. package/dist/cjs/index14.js.map +1 -1
  78. package/dist/cjs/index15.js +21 -3
  79. package/dist/cjs/index15.js.map +1 -1
  80. package/dist/cjs/index16.js +3 -5
  81. package/dist/cjs/index16.js.map +1 -1
  82. package/dist/cjs/index17.js +5 -20
  83. package/dist/cjs/index17.js.map +1 -1
  84. package/dist/cjs/index18.js +20 -3
  85. package/dist/cjs/index18.js.map +1 -1
  86. package/dist/cjs/index19.js +3 -2
  87. package/dist/cjs/index19.js.map +1 -1
  88. package/dist/cjs/index2.js +9 -9
  89. package/dist/cjs/index20.js +2 -3
  90. package/dist/cjs/index20.js.map +1 -1
  91. package/dist/cjs/index21.js +3 -8
  92. package/dist/cjs/index21.js.map +1 -1
  93. package/dist/cjs/index22.js +6 -8
  94. package/dist/cjs/index22.js.map +1 -1
  95. package/dist/cjs/index23.js +7 -3
  96. package/dist/cjs/index23.js.map +1 -1
  97. package/dist/cjs/index24.js +3 -5
  98. package/dist/cjs/index24.js.map +1 -1
  99. package/dist/cjs/index25.js +8 -3
  100. package/dist/cjs/index25.js.map +1 -1
  101. package/dist/cjs/index26.js +3 -27
  102. package/dist/cjs/index26.js.map +1 -1
  103. package/dist/cjs/index27.js +5 -28
  104. package/dist/cjs/index27.js.map +1 -1
  105. package/dist/cjs/index28.js +54 -3
  106. package/dist/cjs/index28.js.map +1 -1
  107. package/dist/cjs/index29.js +3 -3
  108. package/dist/cjs/index3.js +8 -8
  109. package/dist/cjs/index30.js +3 -3
  110. package/dist/cjs/index31.js +3 -28
  111. package/dist/cjs/index31.js.map +1 -1
  112. package/dist/cjs/index32.js +28 -3
  113. package/dist/cjs/index32.js.map +1 -1
  114. package/dist/cjs/index33.js +3 -3
  115. package/dist/cjs/index34.js +3 -15
  116. package/dist/cjs/index34.js.map +1 -1
  117. package/dist/cjs/index35.js +15 -24
  118. package/dist/cjs/index35.js.map +1 -1
  119. package/dist/cjs/index36.js +92 -5
  120. package/dist/cjs/index36.js.map +1 -1
  121. package/dist/cjs/index37.js +85 -9
  122. package/dist/cjs/index37.js.map +1 -1
  123. package/dist/cjs/index38.js +90 -9
  124. package/dist/cjs/index38.js.map +1 -1
  125. package/dist/cjs/index39.js +99 -2
  126. package/dist/cjs/index39.js.map +1 -1
  127. package/dist/cjs/index4.js +26 -26
  128. package/dist/cjs/index40.js +85 -6
  129. package/dist/cjs/index40.js.map +1 -1
  130. package/dist/cjs/index41.js +4 -6
  131. package/dist/cjs/index41.js.map +1 -1
  132. package/dist/cjs/index42.js +6 -6
  133. package/dist/cjs/index43.js +14 -0
  134. package/dist/cjs/index43.js.map +1 -0
  135. package/dist/cjs/index6.js +71 -7
  136. package/dist/cjs/index6.js.map +1 -1
  137. package/dist/cjs/index7.js +5 -6
  138. package/dist/cjs/index7.js.map +1 -1
  139. package/dist/cjs/index8.js +28 -5
  140. package/dist/cjs/index8.js.map +1 -1
  141. package/dist/cjs/index9.js +4 -28
  142. package/dist/cjs/index9.js.map +1 -1
  143. package/dist/cjs/medical.svg +9 -0
  144. package/dist/{esm/CircleIcon-0fa4ca78.js → cjs/numeral-d057158c.js} +3 -68
  145. package/dist/cjs/numeral-d057158c.js.map +1 -0
  146. package/dist/cjs/{SchoolIDCard-c7b4153a.js → react-barcode-1a2c5694.js} +1185 -61
  147. package/dist/cjs/react-barcode-1a2c5694.js.map +1 -0
  148. package/dist/cjs/social.svg +9 -0
  149. package/dist/cjs/stem.svg +9 -0
  150. package/dist/cjs/trade.svg +9 -0
  151. package/dist/cjs/{types-c83b33ec.js → types-7f6324ea.js} +12 -5
  152. package/dist/cjs/types-7f6324ea.js.map +1 -0
  153. package/dist/cjs/user.svg +3 -3
  154. package/dist/cjs/walletTrophy.svg +9 -0
  155. package/dist/cjs/walletlearninghistory.svg +9 -0
  156. package/dist/esm/{AchievementCard-98cfb362.js → AchievementCard-33b363b2.js} +6 -6
  157. package/dist/esm/{AchievementCard-98cfb362.js.map → AchievementCard-33b363b2.js.map} +1 -1
  158. package/dist/esm/{BoostGenericCard-da3f166f.js → BoostGenericCard-e60fdb61.js} +4 -4
  159. package/dist/esm/{BoostGenericCard-da3f166f.js.map → BoostGenericCard-e60fdb61.js.map} +1 -1
  160. package/dist/esm/{BoostSmallCard-9d657e00.js → BoostSmallCard-5c843cd0.js} +41 -7
  161. package/dist/esm/BoostSmallCard-5c843cd0.js.map +1 -0
  162. package/dist/esm/CertificateDisplayCard-e0fb8f15.js +1172 -0
  163. package/dist/esm/CertificateDisplayCard-e0fb8f15.js.map +1 -0
  164. package/dist/esm/{CircleCheckButton-9cba5884.js → CircleCheckButton-fca4676f.js} +2 -2
  165. package/dist/esm/{CircleCheckButton-9cba5884.js.map → CircleCheckButton-fca4676f.js.map} +1 -1
  166. package/dist/esm/CircleIcon-69ee6f6e.js +91 -0
  167. package/dist/esm/CircleIcon-69ee6f6e.js.map +1 -0
  168. package/dist/esm/{CourseVerticalCard-ed1898ca.js → CourseVerticalCard-78de56d0.js} +4 -4
  169. package/dist/esm/{CourseVerticalCard-ed1898ca.js.map → CourseVerticalCard-78de56d0.js.map} +1 -1
  170. package/dist/esm/{GenericCard-936fc9f1.js → GenericCard-dfa82091.js} +4 -4
  171. package/dist/esm/{GenericCard-936fc9f1.js.map → GenericCard-dfa82091.js.map} +1 -1
  172. package/dist/esm/{JobListCard-7381ced9.js → JobListCard-c0e65ce0.js} +3 -3
  173. package/dist/esm/{JobListCard-7381ced9.js.map → JobListCard-c0e65ce0.js.map} +1 -1
  174. package/dist/esm/{LearnPill-9b2e727d.js → LearnPill-c3773645.js} +3 -3
  175. package/dist/esm/{LearnPill-9b2e727d.js.map → LearnPill-c3773645.js.map} +1 -1
  176. package/dist/esm/{Notification-0f58ef6a.js → Notification-78a215ff.js} +2 -2
  177. package/dist/esm/{Notification-0f58ef6a.js.map → Notification-78a215ff.js.map} +1 -1
  178. package/dist/esm/{NotificationBoostCard-134edf94.js → NotificationBoostCard-9e7197eb.js} +2 -2
  179. package/dist/esm/{NotificationBoostCard-134edf94.js.map → NotificationBoostCard-9e7197eb.js.map} +1 -1
  180. package/dist/esm/{RoundedPill-020341ca.js → RoundedPill-fb5c7ccb.js} +2 -2
  181. package/dist/esm/{RoundedPill-020341ca.js.map → RoundedPill-fb5c7ccb.js.map} +1 -1
  182. package/dist/esm/RoundedSquare-0b89fe31.js +52 -0
  183. package/dist/esm/RoundedSquare-0b89fe31.js.map +1 -0
  184. package/dist/esm/SchoolIDCard-91bade9a.js +62 -0
  185. package/dist/esm/SchoolIDCard-91bade9a.js.map +1 -0
  186. package/dist/esm/{SkillTabCard-c1d48eca.js → SkillTabCard-ddf067a7.js} +4 -4
  187. package/dist/esm/{SkillTabCard-c1d48eca.js.map → SkillTabCard-ddf067a7.js.map} +1 -1
  188. package/dist/esm/{SmallAchievementCard-2d87ac82.js → SmallAchievementCard-d0220751.js} +2 -2
  189. package/dist/esm/{SmallAchievementCard-2d87ac82.js.map → SmallAchievementCard-d0220751.js.map} +1 -1
  190. package/dist/esm/{Trophy-702610b8.js → Trophy-ad67f46a.js} +5 -2
  191. package/dist/esm/Trophy-ad67f46a.js.map +1 -0
  192. package/dist/esm/{User-fd276ad5.js → User-9f253521.js} +19 -4
  193. package/dist/esm/User-9f253521.js.map +1 -0
  194. package/dist/esm/{VCCard-ce237f01.js → VCCard-138e9793.js} +40 -4
  195. package/dist/esm/VCCard-138e9793.js.map +1 -0
  196. package/dist/esm/{VCDisplayBackFace-c8f0cb3a.js → VCDisplayBackFace-07fcf920.js} +3 -3
  197. package/dist/esm/{VCDisplayBackFace-c8f0cb3a.js.map → VCDisplayBackFace-07fcf920.js.map} +1 -1
  198. package/dist/esm/{VCDisplayCard-a35f3a6a.js → VCDisplayCard-c7aee3a6.js} +3 -3
  199. package/dist/esm/{VCDisplayCard-a35f3a6a.js.map → VCDisplayCard-c7aee3a6.js.map} +1 -1
  200. package/dist/esm/VCDisplayCard2-c6f9f62e.js +2674 -0
  201. package/dist/esm/VCDisplayCard2-c6f9f62e.js.map +1 -0
  202. package/dist/esm/{types.esm-b07820bb.js → VCVerificationPill-1a8e55d1.js} +64 -2
  203. package/dist/esm/VCVerificationPill-1a8e55d1.js.map +1 -0
  204. package/dist/esm/athletics.svg +9 -0
  205. package/dist/esm/business.svg +9 -0
  206. package/dist/esm/{constants-16a52524.js → constants-acd78b79.js} +3 -50
  207. package/dist/esm/constants-acd78b79.js.map +1 -0
  208. package/dist/esm/creative.svg +9 -0
  209. package/dist/esm/{credential.helpers-89728941.js → credential.helpers-56ed8ed6.js} +281 -7
  210. package/dist/esm/credential.helpers-56ed8ed6.js.map +1 -0
  211. package/dist/esm/digital.svg +9 -0
  212. package/dist/esm/durable.svg +9 -0
  213. package/dist/esm/{icons-ce5b360c.js → icons-25993244.js} +2 -2
  214. package/dist/esm/{icons-ce5b360c.js.map → icons-25993244.js.map} +1 -1
  215. package/dist/esm/{index-536987b4.js → index-1a9a2345.js} +4 -4
  216. package/dist/esm/index-1a9a2345.js.map +1 -0
  217. package/dist/esm/{index-146dd88a.js → index-43f63ea7.js} +3 -1
  218. package/dist/esm/index-43f63ea7.js.map +1 -0
  219. package/dist/esm/index.es-76d64136.js +187 -0
  220. package/dist/esm/index.es-76d64136.js.map +1 -0
  221. package/dist/esm/index.js +56 -42
  222. package/dist/esm/index.js.map +1 -1
  223. package/dist/esm/index10.js +29 -1
  224. package/dist/esm/index10.js.map +1 -1
  225. package/dist/esm/index11.js +1 -44
  226. package/dist/esm/index11.js.map +1 -1
  227. package/dist/esm/index12.js +8 -79
  228. package/dist/esm/index12.js.map +1 -1
  229. package/dist/esm/index13.js +129 -2
  230. package/dist/esm/index13.js.map +1 -1
  231. package/dist/esm/index14.js +2 -19
  232. package/dist/esm/index14.js.map +1 -1
  233. package/dist/esm/index15.js +19 -2
  234. package/dist/esm/index15.js.map +1 -1
  235. package/dist/esm/index16.js +2 -4
  236. package/dist/esm/index16.js.map +1 -1
  237. package/dist/esm/index17.js +4 -19
  238. package/dist/esm/index17.js.map +1 -1
  239. package/dist/esm/index18.js +19 -2
  240. package/dist/esm/index18.js.map +1 -1
  241. package/dist/esm/index19.js +2 -1
  242. package/dist/esm/index19.js.map +1 -1
  243. package/dist/esm/index2.js +9 -9
  244. package/dist/esm/index20.js +1 -2
  245. package/dist/esm/index20.js.map +1 -1
  246. package/dist/esm/index21.js +2 -6
  247. package/dist/esm/index21.js.map +1 -1
  248. package/dist/esm/index22.js +4 -7
  249. package/dist/esm/index22.js.map +1 -1
  250. package/dist/esm/index23.js +6 -2
  251. package/dist/esm/index23.js.map +1 -1
  252. package/dist/esm/index24.js +2 -3
  253. package/dist/esm/index24.js.map +1 -1
  254. package/dist/esm/index25.js +6 -2
  255. package/dist/esm/index25.js.map +1 -1
  256. package/dist/esm/index26.js +2 -25
  257. package/dist/esm/index26.js.map +1 -1
  258. package/dist/esm/index27.js +3 -23
  259. package/dist/esm/index27.js.map +1 -1
  260. package/dist/esm/index28.js +49 -2
  261. package/dist/esm/index28.js.map +1 -1
  262. package/dist/esm/index29.js +2 -1
  263. package/dist/esm/index29.js.map +1 -1
  264. package/dist/esm/index3.js +8 -8
  265. package/dist/esm/index30.js +1 -2
  266. package/dist/esm/index30.js.map +1 -1
  267. package/dist/esm/index31.js +2 -27
  268. package/dist/esm/index31.js.map +1 -1
  269. package/dist/esm/index32.js +27 -2
  270. package/dist/esm/index32.js.map +1 -1
  271. package/dist/esm/index33.js +2 -2
  272. package/dist/esm/index34.js +2 -6
  273. package/dist/esm/index34.js.map +1 -1
  274. package/dist/esm/index35.js +6 -23
  275. package/dist/esm/index35.js.map +1 -1
  276. package/dist/esm/index36.js +91 -4
  277. package/dist/esm/index36.js.map +1 -1
  278. package/dist/esm/index37.js +84 -8
  279. package/dist/esm/index37.js.map +1 -1
  280. package/dist/esm/index38.js +89 -8
  281. package/dist/esm/index38.js.map +1 -1
  282. package/dist/esm/index39.js +92 -2
  283. package/dist/esm/index39.js.map +1 -1
  284. package/dist/esm/index4.js +26 -26
  285. package/dist/esm/index40.js +85 -1
  286. package/dist/esm/index40.js.map +1 -1
  287. package/dist/esm/index41.js +3 -3
  288. package/dist/esm/index42.js +3 -5
  289. package/dist/esm/index42.js.map +1 -1
  290. package/dist/esm/index43.js +6 -0
  291. package/dist/esm/index43.js.map +1 -0
  292. package/dist/esm/index6.js +70 -6
  293. package/dist/esm/index6.js.map +1 -1
  294. package/dist/esm/index7.js +4 -4
  295. package/dist/esm/index8.js +26 -4
  296. package/dist/esm/index8.js.map +1 -1
  297. package/dist/esm/index9.js +3 -27
  298. package/dist/esm/index9.js.map +1 -1
  299. package/dist/esm/medical.svg +9 -0
  300. package/dist/{cjs/CircleIcon-a606678d.js → esm/numeral-804ed0c4.js} +2 -76
  301. package/dist/esm/numeral-804ed0c4.js.map +1 -0
  302. package/dist/esm/{SchoolIDCard-01422d53.js → react-barcode-150610c2.js} +1184 -60
  303. package/dist/esm/react-barcode-150610c2.js.map +1 -0
  304. package/dist/esm/social.svg +9 -0
  305. package/dist/esm/stem.svg +9 -0
  306. package/dist/esm/trade.svg +9 -0
  307. package/dist/esm/{types-7081a9e5.js → types-c31e4bae.js} +12 -6
  308. package/dist/esm/types-c31e4bae.js.map +1 -0
  309. package/dist/esm/user.svg +3 -3
  310. package/dist/esm/walletTrophy.svg +9 -0
  311. package/dist/esm/walletlearninghistory.svg +9 -0
  312. package/dist/index.d.ts +352 -12
  313. package/dist/main.css +1 -1
  314. package/dist/main.js +1 -1
  315. package/package.json +5 -4
  316. package/dist/cjs/BoostSmallCard-15245e9d.js.map +0 -1
  317. package/dist/cjs/CircleIcon-a606678d.js.map +0 -1
  318. package/dist/cjs/SchoolIDCard-c7b4153a.js.map +0 -1
  319. package/dist/cjs/Trophy-9ede7f2b.js.map +0 -1
  320. package/dist/cjs/User-92f9cf40.js.map +0 -1
  321. package/dist/cjs/VCCard-34b194a2.js.map +0 -1
  322. package/dist/cjs/VCDisplayCard2-c112b1d9.js +0 -1254
  323. package/dist/cjs/VCDisplayCard2-c112b1d9.js.map +0 -1
  324. package/dist/cjs/VCVerificationPill-0e60ff1b.js +0 -75
  325. package/dist/cjs/VCVerificationPill-0e60ff1b.js.map +0 -1
  326. package/dist/cjs/constants-ea765e7c.js.map +0 -1
  327. package/dist/cjs/credential.helpers-b8363e2e.js.map +0 -1
  328. package/dist/cjs/index-838fa72c.js +0 -1186
  329. package/dist/cjs/index-838fa72c.js.map +0 -1
  330. package/dist/cjs/index-bee9764e.js.map +0 -1
  331. package/dist/cjs/index-c3097979.js.map +0 -1
  332. package/dist/cjs/types-c83b33ec.js.map +0 -1
  333. package/dist/cjs/types.esm-d5381f5d.js.map +0 -1
  334. package/dist/esm/BoostSmallCard-9d657e00.js.map +0 -1
  335. package/dist/esm/CircleIcon-0fa4ca78.js.map +0 -1
  336. package/dist/esm/SchoolIDCard-01422d53.js.map +0 -1
  337. package/dist/esm/Trophy-702610b8.js.map +0 -1
  338. package/dist/esm/User-fd276ad5.js.map +0 -1
  339. package/dist/esm/VCCard-ce237f01.js.map +0 -1
  340. package/dist/esm/VCDisplayCard2-531202a8.js +0 -1247
  341. package/dist/esm/VCDisplayCard2-531202a8.js.map +0 -1
  342. package/dist/esm/VCVerificationPill-aa305f20.js +0 -65
  343. package/dist/esm/VCVerificationPill-aa305f20.js.map +0 -1
  344. package/dist/esm/constants-16a52524.js.map +0 -1
  345. package/dist/esm/credential.helpers-89728941.js.map +0 -1
  346. package/dist/esm/index-146dd88a.js.map +0 -1
  347. package/dist/esm/index-4fa491c1.js +0 -1184
  348. package/dist/esm/index-4fa491c1.js.map +0 -1
  349. package/dist/esm/index-536987b4.js.map +0 -1
  350. package/dist/esm/types-7081a9e5.js.map +0 -1
  351. package/dist/esm/types.esm-b07820bb.js.map +0 -1
@@ -1,1247 +0,0 @@
1
- import React, { useRef, useEffect, useState, createContext, Component, Children, cloneElement, useLayoutEffect } from 'react';
2
- import './index-4fa491c1.js';
3
- import { a as VCVerificationCheckWithSpinner } from './VCVerificationCheck-80249524.js';
4
- import DefaultFace from './default-face.jpeg';
5
- import { c as getColorForVerificationStatus, f as format$1, g as getNameFromProfile, a as getImageFromProfile, b as getInfoFromCredential } from './credential.helpers-89728941.js';
6
- import { L as Lightbox } from './Lightbox-a1aab9ea.js';
7
- import { V as VerificationStatusEnum } from './types.esm-b07820bb.js';
8
- import { A as AwardRibbon } from './AwardRibbon-3e682281.js';
9
- import { a as LCCategoryEnum } from './index-146dd88a.js';
10
-
11
- const AcuteCheckmark = ({ className = "" }) => {
12
- return /* @__PURE__ */ React.createElement("svg", {
13
- width: "16",
14
- height: "11",
15
- viewBox: "0 0 16 11",
16
- fill: "none",
17
- xmlns: "http://www.w3.org/2000/svg",
18
- className
19
- }, /* @__PURE__ */ React.createElement("path", {
20
- d: "M0.5 4.26859L5.96103 10.5L15.3 0.5H10.6348L5.96103 6.3205L4.49338 4.06677L0.5 4.26859Z",
21
- fill: "#00BA88"
22
- }));
23
- };
24
-
25
- const Camera = ({ className = "" }) => {
26
- return /* @__PURE__ */ React.createElement("svg", {
27
- width: "25",
28
- height: "24",
29
- viewBox: "0 0 25 24",
30
- fill: "none",
31
- xmlns: "http://www.w3.org/2000/svg",
32
- className
33
- }, /* @__PURE__ */ React.createElement("path", {
34
- d: "M20.7415 5.81958H18.6871C18.0439 5.81958 17.4439 5.49798 17.0887 4.96518L16.2295 3.67398C15.8743 3.14118 15.2743 2.81958 14.6311 2.81958L10.6855 2.81958C10.0423 2.81958 9.44231 3.14118 9.08711 3.67398L8.22791 4.96518C7.87271 5.49798 7.27271 5.81958 6.62951 5.81958H4.57991C3.51911 5.81958 2.65991 6.67878 2.65991 7.73958L2.65991 18.8996C2.65991 19.9604 3.51911 20.8196 4.57991 20.8196L20.7415 20.8196C21.8023 20.8196 22.6615 19.9604 22.6615 18.8996L22.6615 7.73958C22.6615 6.67878 21.8023 5.81958 20.7415 5.81958ZM12.7399 17.738C10.0903 17.738 7.93991 15.5876 7.93991 12.938C7.93991 10.2884 10.0903 8.13798 12.7399 8.13798C15.3895 8.13798 17.5399 10.2884 17.5399 12.938C17.5399 15.5876 15.3895 17.738 12.7399 17.738Z",
35
- fill: "white"
36
- }));
37
- };
38
-
39
- const ExclamationPoint = ({ className = "" }) => {
40
- return /* @__PURE__ */ React.createElement("svg", {
41
- width: "5",
42
- height: "11",
43
- viewBox: "0 0 5 11",
44
- fill: "none",
45
- xmlns: "http://www.w3.org/2000/svg",
46
- className
47
- }, /* @__PURE__ */ React.createElement("path", {
48
- d: "M1.1338 6.58451L0.5 0.5H4.30282L3.66901 6.58451H1.1338ZM2.40141 10.5C1.85681 10.5 1.4108 10.3357 1.06338 10.007C0.715963 9.66901 0.542253 9.26995 0.542253 8.80986C0.542253 8.34037 0.715963 7.94601 1.06338 7.62676C1.4108 7.30751 1.85681 7.14789 2.40141 7.14789C2.9554 7.14789 3.40141 7.30751 3.73944 7.62676C4.08685 7.94601 4.26056 8.34037 4.26056 8.80986C4.26056 9.26995 4.08685 9.66901 3.73944 10.007C3.40141 10.3357 2.9554 10.5 2.40141 10.5Z",
49
- fill: "#FACC15"
50
- }));
51
- };
52
-
53
- const GenericDocumentIcon = ({ className = "" }) => {
54
- return /* @__PURE__ */ React.createElement("svg", {
55
- width: "41",
56
- height: "40",
57
- viewBox: "0 0 41 40",
58
- fill: "none",
59
- xmlns: "http://www.w3.org/2000/svg",
60
- className
61
- }, /* @__PURE__ */ React.createElement("path", {
62
- d: "M5.5 4.66675C5.5 3.0099 6.84315 1.66675 8.5 1.66675H18.6813C21.3361 1.66675 23.8555 2.83885 25.5655 4.86953L33.3842 14.1542C34.7507 15.7769 35.5 17.8301 35.5 19.9515V35.3334C35.5 36.9903 34.1569 38.3334 32.5 38.3334H8.5C6.84315 38.3334 5.5 36.9903 5.5 35.3334V4.66675Z",
63
- fill: "#FF3636"
64
- }), /* @__PURE__ */ React.createElement("path", {
65
- d: "M22 13V2.5C26 3.5 34.5 14 35.5 18H27C23 18 22 16 22 13Z",
66
- fill: "#FF7A7A"
67
- }));
68
- };
69
-
70
- const InfoIcon = ({ className = "", color = "#A8ACBD" }) => {
71
- return /* @__PURE__ */ React.createElement("svg", {
72
- width: "22",
73
- height: "21",
74
- viewBox: "0 0 22 21",
75
- fill: "none",
76
- xmlns: "http://www.w3.org/2000/svg",
77
- className
78
- }, /* @__PURE__ */ React.createElement("path", {
79
- d: "M11.0003 0.34375C8.99153 0.34375 7.02793 0.939404 5.35774 2.05539C3.68755 3.17137 2.3858 4.75756 1.6171 6.61337C0.848395 8.46918 0.647267 10.5113 1.03915 12.4814C1.43103 14.4515 2.39832 16.2612 3.8187 17.6816C5.23907 19.1019 7.04874 20.0692 9.01886 20.4611C10.989 20.853 13.0311 20.6519 14.8869 19.8832C16.7427 19.1144 18.3289 17.8127 19.4449 16.1425C20.5608 14.4723 21.1565 12.5087 21.1565 10.5C21.1534 7.80735 20.0824 5.22588 18.1784 3.32188C16.2744 1.41789 13.6929 0.346862 11.0003 0.34375V0.34375ZM11.0002 5.03125C11.2319 5.03125 11.4585 5.09998 11.6512 5.22875C11.8439 5.35751 11.9941 5.54054 12.0828 5.75467C12.1715 5.9688 12.1947 6.20443 12.1495 6.43175C12.1043 6.65907 11.9927 6.86788 11.8288 7.03177C11.6649 7.19566 11.4561 7.30727 11.2288 7.35248C11.0015 7.3977 10.7658 7.37449 10.5517 7.2858C10.3376 7.1971 10.1545 7.0469 10.0258 6.85418C9.89701 6.66147 9.82828 6.4349 9.82828 6.20313C9.82828 6.04923 9.85859 5.89685 9.91748 5.75467C9.97637 5.61249 10.0627 5.4833 10.1715 5.37448C10.2803 5.26566 10.4095 5.17934 10.5517 5.12045C10.6939 5.06156 10.8463 5.03125 11.0002 5.03125H11.0002ZM11.7815 15.9688H11.0003C10.8976 15.9688 10.796 15.9486 10.7012 15.9094C10.6064 15.8702 10.5202 15.8126 10.4477 15.7401C10.3751 15.6675 10.3176 15.5814 10.2783 15.4865C10.2391 15.3917 10.2189 15.2901 10.219 15.1875V10.5C10.0118 10.5 9.81309 10.4177 9.66657 10.2712C9.52006 10.1247 9.43775 9.92595 9.43775 9.71875C9.43775 9.51155 9.52006 9.31284 9.66657 9.16632C9.81309 9.01981 10.0118 8.9375 10.219 8.9375H11.0003C11.1029 8.93744 11.2045 8.95761 11.2993 8.99685C11.3941 9.03609 11.4803 9.09363 11.5528 9.16619C11.6254 9.23875 11.6829 9.3249 11.7222 9.41971C11.7614 9.51452 11.7816 9.61614 11.7815 9.71875V14.4063C11.9887 14.4063 12.1874 14.4886 12.3339 14.6351C12.4804 14.7816 12.5628 14.9803 12.5628 15.1875C12.5628 15.3947 12.4804 15.5934 12.3339 15.7399C12.1874 15.8864 11.9887 15.9688 11.7815 15.9688Z",
80
- fill: color
81
- }));
82
- };
83
-
84
- const LeftArrow = ({ className = "", size = "20" }) => {
85
- return /* @__PURE__ */ React.createElement("svg", {
86
- width: size,
87
- height: size,
88
- viewBox: "0 0 20 20",
89
- fill: "none",
90
- xmlns: "http://www.w3.org/2000/svg",
91
- className
92
- }, /* @__PURE__ */ React.createElement("path", {
93
- d: "M8.93299 17.942L1.43299 10.442C1.31582 10.3247 1.25 10.1657 1.25 9.99999C1.25 9.83423 1.31582 9.67526 1.43299 9.55802L8.93299 2.05802C9.02041 1.97062 9.13178 1.91111 9.25301 1.887C9.37425 1.8629 9.49991 1.87528 9.61412 1.92258C9.72832 1.96989 9.82593 2.04999 9.89461 2.15277C9.96329 2.25554 9.99995 2.37638 9.99996 2.49999V5.62499H16.25C16.5814 5.62537 16.8991 5.75718 17.1334 5.99152C17.3678 6.22586 17.4996 6.54358 17.5 6.87499V13.125C17.4996 13.4564 17.3678 13.7741 17.1334 14.0085C16.8991 14.2428 16.5814 14.3746 16.25 14.375H9.99996V17.5C9.99995 17.6236 9.96329 17.7444 9.89461 17.8472C9.82593 17.95 9.72832 18.0301 9.61412 18.0774C9.49991 18.1247 9.37425 18.1371 9.25301 18.113C9.13178 18.0889 9.02041 18.0294 8.93299 17.942Z",
94
- fill: "currentColor"
95
- }));
96
- };
97
-
98
- const LinkIcon = ({ className = "" }) => {
99
- return /* @__PURE__ */ React.createElement("svg", {
100
- width: "33",
101
- height: "32",
102
- viewBox: "0 0 33 32",
103
- fill: "none",
104
- xmlns: "http://www.w3.org/2000/svg",
105
- className
106
- }, /* @__PURE__ */ React.createElement("path", {
107
- d: "M16.8117 7.91003L18.2677 6.45403C18.7784 5.94292 19.3847 5.53742 20.0521 5.26071C20.7195 4.98399 21.4348 4.84148 22.1573 4.84131C22.8798 4.84114 23.5953 4.98332 24.2628 5.25973C24.9303 5.53613 25.5368 5.94135 26.0477 6.45222C26.5586 6.9631 26.9638 7.56962 27.2402 8.23714C27.5166 8.90466 27.6588 9.6201 27.6586 10.3426C27.6584 11.0651 27.5159 11.7804 27.2392 12.4478C26.9625 13.1152 26.557 13.7216 26.0459 14.2322L22.5104 17.7677C21.9996 18.2785 21.3933 18.6836 20.726 18.96C20.0587 19.2364 19.3435 19.3787 18.6213 19.3787C17.899 19.3787 17.1838 19.2364 16.5165 18.96C15.8492 18.6836 15.2429 18.2785 14.7322 17.7677",
108
- stroke: "#6366F1",
109
- strokeWidth: "3",
110
- strokeLinecap: "round",
111
- strokeLinejoin: "round"
112
- }), /* @__PURE__ */ React.createElement("path", {
113
- d: "M16.188 24.0902L14.7322 25.546C14.2216 26.0571 13.6152 26.4626 12.9478 26.7393C12.2804 27.016 11.5651 27.1585 10.8426 27.1587C10.1201 27.1589 9.40466 27.0167 8.73714 26.7403C8.06962 26.4639 7.4631 26.0586 6.95222 25.5478C6.44135 25.0369 6.03613 24.4304 5.75973 23.7629C5.48332 23.0953 5.34114 22.3799 5.34131 21.6574C5.34148 20.9349 5.48399 20.2195 5.76071 19.5521C6.03742 18.8848 6.44292 18.2784 6.95403 17.7678L10.4896 14.2323C11.0003 13.7215 11.6066 13.3164 12.2739 13.04C12.9412 12.7636 13.6564 12.6213 14.3787 12.6213C15.1009 12.6213 15.8161 12.7636 16.4834 13.04C17.1507 13.3164 17.757 13.7215 18.2677 14.2323",
114
- stroke: "#6366F1",
115
- strokeWidth: "3",
116
- strokeLinecap: "round",
117
- strokeLinejoin: "round"
118
- }));
119
- };
120
-
121
- const RoundedX = ({ className = "" }) => {
122
- return /* @__PURE__ */ React.createElement("svg", {
123
- width: "24",
124
- height: "24",
125
- viewBox: "0 0 24 24",
126
- fill: "none",
127
- xmlns: "http://www.w3.org/2000/svg",
128
- className
129
- }, /* @__PURE__ */ React.createElement("path", {
130
- d: "M18.75 5.25L5.25 18.75",
131
- stroke: "#18224E",
132
- strokeWidth: "4",
133
- strokeLinecap: "round",
134
- strokeLinejoin: "round"
135
- }), /* @__PURE__ */ React.createElement("path", {
136
- d: "M18.75 18.75L5.25 5.25",
137
- stroke: "#18224E",
138
- strokeWidth: "4",
139
- strokeLinecap: "round",
140
- strokeLinejoin: "round"
141
- }));
142
- };
143
-
144
- const VideoIcon = ({ className = "", size = "25" }) => {
145
- return /* @__PURE__ */ React.createElement("svg", {
146
- width: size,
147
- height: size,
148
- viewBox: "0 0 25 24",
149
- fill: "none",
150
- xmlns: "http://www.w3.org/2000/svg",
151
- className
152
- }, /* @__PURE__ */ React.createElement("path", {
153
- fillRule: "evenodd",
154
- clipRule: "evenodd",
155
- d: "M6.61304 4.5H12.4051C14.8271 4.5 16.5181 6.16904 16.5181 8.56091V15.4391C16.5181 17.831 14.8271 19.5 12.4051 19.5H6.61304C4.19102 19.5 2.5 17.831 2.5 15.4391V8.56091C2.5 6.16904 4.19102 4.5 6.61304 4.5ZM20.458 6.87898C20.897 6.65563 21.412 6.67898 21.831 6.94294C22.25 7.20589 22.5 7.66274 22.5 8.16223V15.8384C22.5 16.3389 22.25 16.7947 21.831 17.0577C21.602 17.2008 21.346 17.2739 21.088 17.2739C20.873 17.2739 20.658 17.2231 20.457 17.1206L18.976 16.3734C18.428 16.0952 18.088 15.5369 18.088 14.9165V9.08305C18.088 8.46173 18.428 7.90335 18.976 7.62721L20.458 6.87898Z",
156
- fill: "white"
157
- }));
158
- };
159
-
160
- const X = ({ className = "" }) => {
161
- return /* @__PURE__ */ React.createElement("svg", {
162
- width: "11",
163
- height: "11",
164
- viewBox: "0 0 11 11",
165
- fill: "none",
166
- xmlns: "http://www.w3.org/2000/svg",
167
- className
168
- }, /* @__PURE__ */ React.createElement("path", {
169
- d: "M7.47753 10.25C7.20582 9.8045 6.92868 9.37104 6.6461 8.94962C6.37439 8.52218 6.08637 8.09173 5.78206 7.65827C5.49948 8.07969 5.22233 8.50412 4.95062 8.93156C4.67891 9.35298 4.41807 9.78042 4.1681 10.2139L0.5 10.1055C1.15211 9.33492 1.78247 8.57335 2.39111 7.82082C3.01061 7.06828 3.60294 6.3007 4.1681 5.51806C3.5812 4.74747 2.98344 3.98891 2.3748 3.2424C1.77704 2.48986 1.17384 1.73131 0.565211 0.96673L4.38003 0.75C4.77129 1.57478 5.23864 2.3815 5.78206 3.17015C6.01029 2.77883 6.24397 2.38451 6.48307 1.98717C6.73305 1.58983 6.96672 1.17744 7.18409 0.75L10.95 0.912548C10.2979 1.67712 9.67839 2.43267 9.0915 3.17918C8.5046 3.9257 7.92314 4.68124 7.34711 5.44582C7.9014 6.21039 8.46113 6.95691 9.02629 7.68536C9.60231 8.41382 10.1783 9.1513 10.7544 9.89781L7.47753 10.25Z",
170
- fill: "#FF2C3C"
171
- }));
172
- };
173
-
174
- const FitText = ({
175
- text,
176
- width,
177
- className = "",
178
- minFontSize = 10,
179
- maxFontSize = 100
180
- }) => {
181
- const textRef = useRef(null);
182
- let animationFrameId = null;
183
- const adjustFontSize = () => {
184
- var _a;
185
- if (textRef.current) {
186
- const currentFontSize = parseFloat(window.getComputedStyle(textRef.current).getPropertyValue("font-size"));
187
- textRef.current.style.whiteSpace = "nowrap";
188
- const parentWidth = (_a = textRef.current.parentNode) == null ? void 0 : _a.clientWidth;
189
- const scrollWidth = textRef.current.scrollWidth || textRef.current.offsetWidth;
190
- if (scrollWidth === 0) {
191
- if (animationFrameId !== null) {
192
- cancelAnimationFrame(animationFrameId);
193
- }
194
- animationFrameId = requestAnimationFrame(adjustFontSize);
195
- return;
196
- }
197
- const newFontSize = Math.min(Math.max(parentWidth / scrollWidth * currentFontSize, minFontSize), maxFontSize);
198
- textRef.current.style.fontSize = `${newFontSize}px`;
199
- textRef.current.style.whiteSpace = newFontSize === minFontSize ? "normal" : "nowrap";
200
- }
201
- };
202
- const handleResize = () => {
203
- if (animationFrameId !== null) {
204
- cancelAnimationFrame(animationFrameId);
205
- }
206
- animationFrameId = requestAnimationFrame(adjustFontSize);
207
- };
208
- useEffect(() => {
209
- window.addEventListener("resize", handleResize);
210
- adjustFontSize();
211
- return () => {
212
- window.removeEventListener("resize", handleResize);
213
- if (animationFrameId !== null) {
214
- cancelAnimationFrame(animationFrameId);
215
- }
216
- };
217
- }, [text]);
218
- return /* @__PURE__ */ React.createElement("div", {
219
- style: { width },
220
- className: `text-center ${className}`
221
- }, /* @__PURE__ */ React.createElement("span", {
222
- className: `text-[${minFontSize}px] transition-[font-size] whitespace-nowrap`,
223
- ref: textRef
224
- }, text));
225
- };
226
-
227
- const InfoBox = ({ text, handleClose, backgroundColor = "#6366F1" }) => {
228
- const bgColorWithOpacity = `${backgroundColor}1F`;
229
- return /* @__PURE__ */ React.createElement("div", {
230
- className: "info-box p-[10px] rounded-[10px] w-full font-poppins text-[12px] leading[18px]",
231
- style: { backgroundColor: bgColorWithOpacity }
232
- }, text, " ", /* @__PURE__ */ React.createElement("button", {
233
- onClick: handleClose,
234
- className: "text-indigo-500 font-[700] select-none"
235
- }, "Close"));
236
- };
237
-
238
- const IssueHistoryBox = ({
239
- issueHistory,
240
- customIssueHistoryComponent
241
- }) => {
242
- let renderIssueHistory = issueHistory == null ? void 0 : issueHistory.map((issueItem) => {
243
- return /* @__PURE__ */ React.createElement("div", {
244
- className: "flex items-center issue-log-item border-b-[1px] py-[5px] border-grayscale-200 border-solid w-full",
245
- key: issueItem == null ? void 0 : issueItem.id
246
- }, /* @__PURE__ */ React.createElement("div", {
247
- className: "profile-thumb-img vc-issuee-image h-[35px] w-[35px] rounded-full overflow-hidden"
248
- }, /* @__PURE__ */ React.createElement("img", {
249
- className: "h-full w-full object-cover select-none",
250
- src: (issueItem == null ? void 0 : issueItem.thumb) || DefaultFace,
251
- alt: "profile"
252
- })), /* @__PURE__ */ React.createElement("div", {
253
- className: "ml-[9px] flex flex-col justify-center"
254
- }, /* @__PURE__ */ React.createElement("p", {
255
- className: "issue-item-name font-montserrat font-semibold text-grayscale-900 text-[14px] "
256
- }, issueItem == null ? void 0 : issueItem.name), /* @__PURE__ */ React.createElement("p", {
257
- className: "issue-item-date font-montserrat text-[12px] text-grayscale-600 "
258
- }, issueItem == null ? void 0 : issueItem.date)));
259
- });
260
- return /* @__PURE__ */ React.createElement("div", {
261
- className: "bg-white flex flex-col items-start gap-[10px] rounded-[20px] shadow-bottom px-[15px] py-[20px] w-full relative"
262
- }, /* @__PURE__ */ React.createElement("h3", {
263
- className: "text-[20px] leading-[20px] text-grayscale-900"
264
- }, "Issue Log"), !customIssueHistoryComponent ? renderIssueHistory : customIssueHistoryComponent);
265
- };
266
-
267
- const BYTE_UNITS = [
268
- 'B',
269
- 'kB',
270
- 'MB',
271
- 'GB',
272
- 'TB',
273
- 'PB',
274
- 'EB',
275
- 'ZB',
276
- 'YB',
277
- ];
278
-
279
- const BIBYTE_UNITS = [
280
- 'B',
281
- 'kiB',
282
- 'MiB',
283
- 'GiB',
284
- 'TiB',
285
- 'PiB',
286
- 'EiB',
287
- 'ZiB',
288
- 'YiB',
289
- ];
290
-
291
- const BIT_UNITS = [
292
- 'b',
293
- 'kbit',
294
- 'Mbit',
295
- 'Gbit',
296
- 'Tbit',
297
- 'Pbit',
298
- 'Ebit',
299
- 'Zbit',
300
- 'Ybit',
301
- ];
302
-
303
- const BIBIT_UNITS = [
304
- 'b',
305
- 'kibit',
306
- 'Mibit',
307
- 'Gibit',
308
- 'Tibit',
309
- 'Pibit',
310
- 'Eibit',
311
- 'Zibit',
312
- 'Yibit',
313
- ];
314
-
315
- /*
316
- Formats the given number using `Number#toLocaleString`.
317
- - If locale is a string, the value is expected to be a locale-key (for example: `de`).
318
- - If locale is true, the system default locale is used for translation.
319
- - If no value for locale is specified, the number is returned unmodified.
320
- */
321
- const toLocaleString = (number, locale, options) => {
322
- let result = number;
323
- if (typeof locale === 'string' || Array.isArray(locale)) {
324
- result = number.toLocaleString(locale, options);
325
- } else if (locale === true || options !== undefined) {
326
- result = number.toLocaleString(undefined, options);
327
- }
328
-
329
- return result;
330
- };
331
-
332
- function prettyBytes(number, options) {
333
- if (!Number.isFinite(number)) {
334
- throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
335
- }
336
-
337
- options = {
338
- bits: false,
339
- binary: false,
340
- ...options,
341
- };
342
-
343
- const UNITS = options.bits
344
- ? (options.binary ? BIBIT_UNITS : BIT_UNITS)
345
- : (options.binary ? BIBYTE_UNITS : BYTE_UNITS);
346
-
347
- if (options.signed && number === 0) {
348
- return ` 0 ${UNITS[0]}`;
349
- }
350
-
351
- const isNegative = number < 0;
352
- const prefix = isNegative ? '-' : (options.signed ? '+' : '');
353
-
354
- if (isNegative) {
355
- number = -number;
356
- }
357
-
358
- let localeOptions;
359
-
360
- if (options.minimumFractionDigits !== undefined) {
361
- localeOptions = {minimumFractionDigits: options.minimumFractionDigits};
362
- }
363
-
364
- if (options.maximumFractionDigits !== undefined) {
365
- localeOptions = {maximumFractionDigits: options.maximumFractionDigits, ...localeOptions};
366
- }
367
-
368
- if (number < 1) {
369
- const numberString = toLocaleString(number, options.locale, localeOptions);
370
- return prefix + numberString + ' ' + UNITS[0];
371
- }
372
-
373
- const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);
374
- number /= (options.binary ? 1024 : 1000) ** exponent;
375
-
376
- if (!localeOptions) {
377
- number = number.toPrecision(3);
378
- }
379
-
380
- const numberString = toLocaleString(Number(number), options.locale, localeOptions);
381
-
382
- const unit = UNITS[exponent];
383
-
384
- return prefix + numberString + ' ' + unit;
385
- }
386
-
387
- const getBaseUrl = (url) => {
388
- return url.replace(/(https?:\/\/(www\.)?)/, "").split("/")[0];
389
- };
390
-
391
- var __async = (__this, __arguments, generator) => {
392
- return new Promise((resolve, reject) => {
393
- var fulfilled = (value) => {
394
- try {
395
- step(generator.next(value));
396
- } catch (e) {
397
- reject(e);
398
- }
399
- };
400
- var rejected = (value) => {
401
- try {
402
- step(generator.throw(value));
403
- } catch (e) {
404
- reject(e);
405
- }
406
- };
407
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
408
- step((generator = generator.apply(__this, __arguments)).next());
409
- });
410
- };
411
- const defaultGetFileMetadata = (url) => __async(undefined, null, function* () {
412
- var _a;
413
- const isFilestack = url.includes("filestack");
414
- if (!isFilestack)
415
- return;
416
- const urlParams = (_a = url.split(".com/")[1]) == null ? void 0 : _a.split("/");
417
- if (!urlParams)
418
- return;
419
- const handle = urlParams[urlParams.length - 1];
420
- let fetchFailed = false;
421
- const data = yield fetch(`https://cdn.filestackcontent.com/${handle}/metadata`).then((res) => res.json()).catch(() => fetchFailed = true);
422
- if (fetchFailed)
423
- return;
424
- const fileExtension = data.filename.split(".")[1];
425
- return {
426
- fileExtension,
427
- sizeInBytes: data.size,
428
- numberOfPages: void 0
429
- };
430
- });
431
- const defaultGetVideoMetadata = (url) => __async(undefined, null, function* () {
432
- const isYoutube = url.includes("youtube");
433
- if (!isYoutube)
434
- return;
435
- const metadataUrl = `http://youtube.com/oembed?url=${url}&format=json`;
436
- let fetchFailed = false;
437
- const metadata = yield fetch(metadataUrl).then((res) => res.json()).catch(() => fetchFailed = true);
438
- if (fetchFailed)
439
- return;
440
- return {
441
- title: metadata.title,
442
- imageUrl: metadata.thumbnail_url,
443
- videoLength: ""
444
- };
445
- });
446
- const MediaAttachmentsBox = ({
447
- attachments,
448
- getFileMetadata = defaultGetFileMetadata,
449
- getVideoMetadata = defaultGetVideoMetadata,
450
- onMediaAttachmentClick,
451
- enableLightbox = false
452
- }) => {
453
- const [documentMetadata, setDocumentMetadata] = useState({});
454
- const [videoMetadata, setVideoMetadata] = useState({});
455
- const mediaAttachments = [];
456
- const documentsAndLinks = [];
457
- attachments.forEach((a) => {
458
- switch (a.type) {
459
- case "document":
460
- case "link":
461
- documentsAndLinks.push(a);
462
- break;
463
- case "photo":
464
- case "video":
465
- mediaAttachments.push(a);
466
- break;
467
- }
468
- });
469
- useEffect(() => {
470
- const getMetadata = (attachments2) => __async(undefined, null, function* () {
471
- const docMetadata = {};
472
- const videoMetadata2 = {};
473
- yield Promise.all(attachments2.map((attachment) => __async(this, null, function* () {
474
- if (attachment.type === "document") {
475
- docMetadata[attachment.url] = yield getFileMetadata(attachment.url);
476
- } else if (attachment.type === "video") {
477
- videoMetadata2[attachment.url] = yield getVideoMetadata(attachment.url);
478
- }
479
- })));
480
- setVideoMetadata(videoMetadata2);
481
- setDocumentMetadata(docMetadata);
482
- });
483
- const videos = attachments.filter((a) => a.type === "video");
484
- getMetadata([...documentsAndLinks, ...videos]);
485
- }, []);
486
- const [currentLightboxUrl, setCurrentLightboxUrl] = useState(void 0);
487
- const lightboxItems = mediaAttachments.filter((a) => a.type === "photo" || a.type === "video");
488
- const handleMediaAttachmentClick = (url, type) => {
489
- if (type === "photo" || type === "video") {
490
- setCurrentLightboxUrl(url);
491
- }
492
- onMediaAttachmentClick == null ? void 0 : onMediaAttachmentClick(url, type);
493
- };
494
- return /* @__PURE__ */ React.createElement("div", {
495
- className: "media-attachments-box bg-white flex flex-col items-start gap-[10px] rounded-[20px] shadow-bottom px-[15px] py-[20px] w-full"
496
- }, /* @__PURE__ */ React.createElement("h3", {
497
- className: "text-[20px] leading-[20px] text-grayscale-900"
498
- }, "Media Attachments"), mediaAttachments.length > 0 && /* @__PURE__ */ React.createElement("div", {
499
- className: "flex gap-[5px] justify-between flex-wrap w-full"
500
- }, enableLightbox && /* @__PURE__ */ React.createElement(Lightbox, {
501
- items: lightboxItems,
502
- currentUrl: currentLightboxUrl,
503
- setCurrentUrl: setCurrentLightboxUrl
504
- }), mediaAttachments.map((media, index) => {
505
- var _a, _b;
506
- let innerContent;
507
- let title = media.title;
508
- if (media.type === "video") {
509
- const metadata = videoMetadata[media.url];
510
- title = (_a = title || (metadata == null ? void 0 : metadata.title)) != null ? _a : "";
511
- const baseUrl = getBaseUrl(media.url);
512
- const iconTop = title || baseUrl;
513
- innerContent = /* @__PURE__ */ React.createElement("div", {
514
- className: "absolute top-0 left-0 right-0 bottom-0 bg-cover bg-no-repeat font-poppins text-white text-[12px] font-[400] leading-[17px] flex flex-col justify-end items-start p-[10px] text-left bg-rose-600 rounded-[15px]",
515
- style: {
516
- backgroundImage: (metadata == null ? void 0 : metadata.imageUrl) ? `linear-gradient(180deg, rgba(0, 0, 0, 0) 44.20%, rgba(0, 0, 0, 0.6) 69%), url(${(_b = metadata == null ? void 0 : metadata.imageUrl) != null ? _b : ""})` : void 0
517
- }
518
- }, !(metadata == null ? void 0 : metadata.imageUrl) && /* @__PURE__ */ React.createElement(VideoIcon, {
519
- size: "60",
520
- className: "m-auto"
521
- }), /* @__PURE__ */ React.createElement("div", {
522
- className: `absolute ${iconTop ? "top-[10px]" : "bottom-[10px]"} left-[10px] z-10 flex items-center gap-[5px]`
523
- }, (metadata == null ? void 0 : metadata.imageUrl) && /* @__PURE__ */ React.createElement(VideoIcon, null), (metadata == null ? void 0 : metadata.videoLength) && /* @__PURE__ */ React.createElement("span", {
524
- className: "leading-[23px]"
525
- }, metadata.videoLength)), baseUrl && /* @__PURE__ */ React.createElement("span", {
526
- className: "font-[600]"
527
- }, baseUrl), title && /* @__PURE__ */ React.createElement("span", {
528
- className: "line-clamp-2"
529
- }, title));
530
- } else {
531
- innerContent = /* @__PURE__ */ React.createElement("div", {
532
- className: "absolute top-0 left-0 right-0 bottom-0 h-min"
533
- }, /* @__PURE__ */ React.createElement("img", {
534
- className: "rounded-[15px]",
535
- src: media.url
536
- }), /* @__PURE__ */ React.createElement(Camera, {
537
- className: "relative bottom-[30px] left-[10px] z-10"
538
- }));
539
- }
540
- const className = `media-attachment ${media.type} w-[49%] pt-[49%] overflow-hidden relative`;
541
- if (onMediaAttachmentClick || enableLightbox) {
542
- return /* @__PURE__ */ React.createElement("button", {
543
- key: index,
544
- className,
545
- onClick: () => handleMediaAttachmentClick(media.url, media.type)
546
- }, innerContent);
547
- }
548
- return /* @__PURE__ */ React.createElement("div", {
549
- key: index,
550
- className
551
- }, innerContent);
552
- })), documentsAndLinks.length > 0 && /* @__PURE__ */ React.createElement("div", {
553
- className: "w-full flex flex-col gap-[5px]"
554
- }, documentsAndLinks.map((docOrLink, index) => {
555
- var _a;
556
- const metadata = docOrLink.type === "document" ? documentMetadata[docOrLink.url] : void 0;
557
- const { fileExtension, sizeInBytes, numberOfPages } = metadata != null ? metadata : {};
558
- let baseUrl = "";
559
- if (docOrLink.type === "link") {
560
- baseUrl = getBaseUrl(docOrLink.url);
561
- }
562
- const innerContent = /* @__PURE__ */ React.createElement("div", {
563
- className: "flex flex-col gap-[5px]"
564
- }, /* @__PURE__ */ React.createElement("div", {
565
- className: "flex gap-[5px] items-center"
566
- }, docOrLink.type === "document" && /* @__PURE__ */ React.createElement(GenericDocumentIcon, {
567
- className: "shrink-0"
568
- }), docOrLink.type === "link" && /* @__PURE__ */ React.createElement(LinkIcon, {
569
- className: "shrink-0"
570
- }), /* @__PURE__ */ React.createElement("span", {
571
- className: "text-grayscale-900 font-[400]"
572
- }, (_a = docOrLink.title) != null ? _a : "No title")), docOrLink.type === "document" && metadata && /* @__PURE__ */ React.createElement("a", {
573
- href: docOrLink.url,
574
- target: "_blank",
575
- rel: "noreferrer",
576
- className: "text-grayscale-600 font-[600] px-[5px] hover:underline"
577
- }, fileExtension && /* @__PURE__ */ React.createElement("span", {
578
- className: "uppercase"
579
- }, fileExtension), fileExtension && (numberOfPages || sizeInBytes) && " \u2022 ", numberOfPages && /* @__PURE__ */ React.createElement("span", null, numberOfPages, " page", numberOfPages === 1 ? "" : "s"), numberOfPages && sizeInBytes && " \u2022 ", sizeInBytes && /* @__PURE__ */ React.createElement("span", null, prettyBytes(sizeInBytes))), docOrLink.type === "link" && /* @__PURE__ */ React.createElement("a", {
580
- href: docOrLink.url,
581
- target: "_blank",
582
- rel: "noreferrer",
583
- className: "text-indigo-500 font-[600] px-[5px] hover:underline"
584
- }, baseUrl));
585
- const className = `row-attachment ${docOrLink.type} bg-grayscale-100 rounded-[15px] p-[10px] w-full font-poppins text-[12px] leading-[18px] tracking-[-0.33px] text-left`;
586
- if (onMediaAttachmentClick) {
587
- return /* @__PURE__ */ React.createElement("button", {
588
- key: index,
589
- className,
590
- onClick: () => handleMediaAttachmentClick(docOrLink.url, docOrLink.type)
591
- }, innerContent);
592
- }
593
- return /* @__PURE__ */ React.createElement("div", {
594
- key: index,
595
- className
596
- }, innerContent);
597
- })));
598
- };
599
-
600
- const RibbonEnd = ({
601
- side,
602
- className = "",
603
- height = "64"
604
- }) => {
605
- const halfHeight = parseInt(height) / 2;
606
- return /* @__PURE__ */ React.createElement("svg", {
607
- className,
608
- width: "30",
609
- height,
610
- viewBox: `0 0 30 ${height}`,
611
- fill: "none",
612
- xmlns: "http://www.w3.org/2000/svg",
613
- style: { transform: `scaleX(${side === "left" ? "1" : "-1"})` }
614
- }, /* @__PURE__ */ React.createElement("g", {
615
- filter: "url(#filter0_d_4620_22659)"
616
- }, /* @__PURE__ */ React.createElement("path", {
617
- d: `M0 0H30V${height}H0L6.36364 ${halfHeight}L0 0Z`,
618
- fill: "white"
619
- }), /* @__PURE__ */ React.createElement("path", {
620
- d: `M3.08593 2.5H27.5V${height}H3.08593L8.80922 ${halfHeight}L8.91926 30L8.80922 29.4812L3.08593 2.5Z`,
621
- stroke: "#EEF2FF",
622
- strokeWidth: "5"
623
- })), /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("filter", {
624
- id: "filter0_d_4620_22659",
625
- x: "0",
626
- y: "0",
627
- width: "30",
628
- height,
629
- filterUnits: "userSpaceOnUse",
630
- colorInterpolationFilters: "sRGB"
631
- }, /* @__PURE__ */ React.createElement("feFlood", {
632
- floodOpacity: "0",
633
- result: "BackgroundImageFix"
634
- }), /* @__PURE__ */ React.createElement("feColorMatrix", {
635
- in: "SourceAlpha",
636
- type: "matrix",
637
- values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
638
- result: "hardAlpha"
639
- }), /* @__PURE__ */ React.createElement("feOffset", {
640
- dy: "4"
641
- }), /* @__PURE__ */ React.createElement("feComposite", {
642
- in2: "hardAlpha",
643
- operator: "out"
644
- }), /* @__PURE__ */ React.createElement("feColorMatrix", {
645
- type: "matrix",
646
- values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
647
- }), /* @__PURE__ */ React.createElement("feBlend", {
648
- mode: "normal",
649
- in2: "BackgroundImageFix",
650
- result: "effect1_dropShadow_4620_22659"
651
- }), /* @__PURE__ */ React.createElement("feBlend", {
652
- mode: "normal",
653
- in: "SourceGraphic",
654
- in2: "effect1_dropShadow_4620_22659",
655
- result: "shape"
656
- }))));
657
- };
658
-
659
- const TruncateTextBox = ({
660
- headerText,
661
- headerClassName = "",
662
- text,
663
- truncateThreshold = 132,
664
- children,
665
- className = "truncate-text-box"
666
- }) => {
667
- const needsTruncate = (text == null ? void 0 : text.length) > truncateThreshold;
668
- const [showFullText, setShowFullText] = useState(false);
669
- const truncated = needsTruncate && !showFullText;
670
- const displayText = truncated ? text.substring(0, truncateThreshold) : text;
671
- return /* @__PURE__ */ React.createElement("div", {
672
- className: `${className} bg-white flex flex-col items-start gap-[10px] rounded-[20px] shadow-bottom px-[15px] py-[20px] w-full"`
673
- }, /* @__PURE__ */ React.createElement("h3", {
674
- className: `${headerClassName} text-[20px] leading-[20px] text-grayscale-900`
675
- }, headerText), /* @__PURE__ */ React.createElement("p", {
676
- className: "text-[12px] text-grayscale-700 leading-[18px] font-poppins font-[400] mb-0"
677
- }, displayText, truncated && /* @__PURE__ */ React.createElement(React.Fragment, null, "...", " ", /* @__PURE__ */ React.createElement("button", {
678
- className: "text-indigo-500 font-[700]",
679
- onClick: () => setShowFullText(true)
680
- }, "More")), needsTruncate && showFullText && /* @__PURE__ */ React.createElement(React.Fragment, null, " ", /* @__PURE__ */ React.createElement("button", {
681
- className: "text-indigo-500 font-[700]",
682
- onClick: () => setShowFullText(false)
683
- }, "Close"))), children);
684
- };
685
-
686
- const truncateWithEllipsis = (str, maxLength) => {
687
- return str.length > maxLength ? `${str.substring(0, maxLength)}...` : str;
688
- };
689
- const capitalize = (string) => {
690
- return string ? string[0].toUpperCase() + string.slice(1) : "";
691
- };
692
-
693
- const VerificationRow = ({ verification }) => {
694
- var _a, _b;
695
- const [showInfo, setShowInfo] = useState(false);
696
- const statusColor = getColorForVerificationStatus(verification.status);
697
- const getIcon = () => {
698
- switch (verification.status) {
699
- case VerificationStatusEnum.Success:
700
- return /* @__PURE__ */ React.createElement(AcuteCheckmark, null);
701
- case VerificationStatusEnum.Error:
702
- return /* @__PURE__ */ React.createElement(ExclamationPoint, null);
703
- case VerificationStatusEnum.Failed:
704
- return /* @__PURE__ */ React.createElement(X, null);
705
- }
706
- };
707
- let primaryText = verification.check ? `${verification.check}: ${verification.message}` : verification.message;
708
- if (verification.status === VerificationStatusEnum.Failed) {
709
- primaryText = (_b = (_a = verification.message) != null ? _a : verification.details) != null ? _b : "";
710
- }
711
- primaryText = capitalize(primaryText);
712
- const infoText = "";
713
- return /* @__PURE__ */ React.createElement("div", {
714
- className: "verification-row flex flex-col gap-[5px] font-poppins border-b-[1px] border-grayscale-200 border-solid w-full py-[10px] last:border-0 last:pb-0"
715
- }, /* @__PURE__ */ React.createElement("span", {
716
- className: "font-[700] text-[11px] leading-[16px] uppercase flex items-center gap-[3px] select-none",
717
- style: { color: statusColor }
718
- }, getIcon(), verification.status, infoText ), showInfo && infoText && /* @__PURE__ */ React.createElement(InfoBox, {
719
- text: infoText,
720
- handleClose: () => setShowInfo(false),
721
- backgroundColor: statusColor
722
- }), /* @__PURE__ */ React.createElement("span", {
723
- className: "font-[400] text-[14px] leading-[21px] text-grayscale-900"
724
- }, primaryText));
725
- };
726
-
727
- const VerificationsBox = ({ verificationItems }) => {
728
- const [showInfo, setShowInfo] = useState(false);
729
- return /* @__PURE__ */ React.createElement("div", {
730
- className: "verifications-box bg-white flex flex-col items-start gap-[10px] rounded-[20px] shadow-bottom px-[15px] py-[20px] w-full relative"
731
- }, /* @__PURE__ */ React.createElement("h3", {
732
- className: "text-[20px] leading-[20px] text-grayscale-900"
733
- }, "Credential Verifications"), /* @__PURE__ */ React.createElement("button", {
734
- className: "absolute top-[17px] right-[17px]",
735
- onClick: () => setShowInfo(!showInfo)
736
- }, /* @__PURE__ */ React.createElement(InfoIcon, {
737
- color: showInfo ? "#6366F1" : void 0
738
- })), showInfo && /* @__PURE__ */ React.createElement(InfoBox, {
739
- text: "Credential verifications check the cryptographic proof of digital credentials to ensure their authenticity and accuracy.",
740
- handleClose: () => setShowInfo(false)
741
- }), verificationItems.map((verification, index) => /* @__PURE__ */ React.createElement(VerificationRow, {
742
- key: index,
743
- verification
744
- })));
745
- };
746
-
747
- const VC2BackFace = ({
748
- credential,
749
- verificationItems,
750
- getFileMetadata,
751
- getVideoMetadata,
752
- onMediaAttachmentClick,
753
- issueHistory,
754
- showBackButton,
755
- showFrontFace,
756
- customDescription,
757
- customCriteria,
758
- customIssueHistoryComponent,
759
- enableLightbox
760
- }) => {
761
- var _a;
762
- const expiration = credential.expirationDate ? format$1(new Date(credential.expirationDate), "MMM dd, yyyy") : void 0;
763
- const isExpired = credential.expirationDate && Number(new Date(credential.expirationDate)) < Number(new Date());
764
- const achievement = "achievement" in credential.credentialSubject ? credential.credentialSubject.achievement : void 0;
765
- const criteria = (_a = achievement == null ? void 0 : achievement.criteria) == null ? void 0 : _a.narrative;
766
- const description = achievement == null ? void 0 : achievement.description;
767
- return /* @__PURE__ */ React.createElement("section", {
768
- className: "vc-back-face flex flex-col gap-[20px] w-full px-[15px]"
769
- }, showBackButton && /* @__PURE__ */ React.createElement("div", {
770
- className: "w-full"
771
- }, /* @__PURE__ */ React.createElement("button", {
772
- className: "vc-card-back-button rounded-full h-[50px] px-[15px] flex items-center justify-center gap-[5px] z-50 text-[30px] text-white select-none",
773
- onClick: showFrontFace
774
- }, /* @__PURE__ */ React.createElement(LeftArrow, {
775
- className: "text-white",
776
- size: "25"
777
- }), "Details")), customDescription && /* @__PURE__ */ React.createElement(TruncateTextBox, {
778
- headerText: "About",
779
- text: description,
780
- className: "description-box"
781
- }, customDescription), !customDescription && (description || expiration) && /* @__PURE__ */ React.createElement(TruncateTextBox, {
782
- headerText: "About",
783
- text: description,
784
- className: "description-box"
785
- }, expiration && /* @__PURE__ */ React.createElement("p", {
786
- className: "text-grayscale-800 font-poppins font-[600] text-[12px] leading-[18px] mb-0"
787
- }, "Expire", isExpired ? "d" : "s", " on ", expiration)), customCriteria && /* @__PURE__ */ React.createElement(TruncateTextBox, {
788
- headerText: "Criteria",
789
- text: description,
790
- className: "description-box"
791
- }, customCriteria), !customCriteria && criteria && /* @__PURE__ */ React.createElement(TruncateTextBox, {
792
- headerText: "Criteria",
793
- text: criteria,
794
- className: "criteria-box"
795
- }), issueHistory && (issueHistory == null ? void 0 : issueHistory.length) > 0 && /* @__PURE__ */ React.createElement(IssueHistoryBox, {
796
- issueHistory,
797
- customIssueHistoryComponent
798
- }), credential.attachments && credential.attachments.length > 0 && /* @__PURE__ */ React.createElement(MediaAttachmentsBox, {
799
- attachments: credential.attachments,
800
- getFileMetadata,
801
- getVideoMetadata,
802
- onMediaAttachmentClick,
803
- enableLightbox
804
- }), verificationItems && verificationItems.length > 0 && /* @__PURE__ */ React.createElement(VerificationsBox, {
805
- verificationItems
806
- }));
807
- };
808
-
809
- const VC2FrontFaceInfo = ({
810
- issuee,
811
- issuer,
812
- subjectDID,
813
- subjectImageComponent,
814
- issuerImageComponent,
815
- customBodyCardComponent,
816
- createdAt,
817
- imageUrl,
818
- customThumbComponent
819
- }) => {
820
- const issuerName = truncateWithEllipsis(getNameFromProfile(issuer != null ? issuer : ""), 25);
821
- const issueeName = truncateWithEllipsis(getNameFromProfile(issuee != null ? issuee : ""), 25);
822
- const issuerImage = getImageFromProfile(issuer != null ? issuer : "");
823
- const issueeImage = getImageFromProfile(issuee != null ? issuee : "");
824
- const getImageElement = (imageUrl2, alt, overrideComponent) => {
825
- if (overrideComponent)
826
- return overrideComponent;
827
- return /* @__PURE__ */ React.createElement("img", {
828
- className: "h-full w-full object-cover select-none",
829
- src: imageUrl2 || DefaultFace,
830
- alt
831
- });
832
- };
833
- const issueeImageEl = getImageElement(issueeImage, "Issuee image", subjectImageComponent);
834
- const issuerImageEl = getImageElement(issuerImage, "Issuer image", issuerImageComponent);
835
- return /* @__PURE__ */ React.createElement("section", {
836
- className: "vc-front-face w-full px-[15px] flex flex-col items-center gap-[15px]"
837
- }, imageUrl && !customThumbComponent && /* @__PURE__ */ React.createElement("img", {
838
- className: "vc-front-image h-[130px] w-[130px] rounded-[10px]",
839
- src: imageUrl
840
- }), customThumbComponent && customThumbComponent, /* @__PURE__ */ React.createElement("div", {
841
- className: "vc-issue-info-box bg-white flex flex-col items-center gap-[5px] rounded-[20px] shadow-bottom px-[15px] py-[20px] w-full"
842
- }, customBodyCardComponent && customBodyCardComponent, !customBodyCardComponent && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h3", {
843
- className: "text-[27px] flex flex-col text-center leading-[130%] text-grayscale-900 capitalize"
844
- }, issueeName, subjectDID && /* @__PURE__ */ React.createElement("span", {
845
- className: "text-[12px] text-grayscale-700 leading-[18px] font-poppins font-[400] m-0 p-0 normal-case"
846
- }, subjectDID)), /* @__PURE__ */ React.createElement("div", {
847
- className: "relative"
848
- }, /* @__PURE__ */ React.createElement("div", {
849
- className: "vc-issuee-image h-[60px] w-[60px] rounded-full overflow-hidden"
850
- }, issueeImageEl), /* @__PURE__ */ React.createElement("div", {
851
- className: "vc-issuer-image h-[30px] w-[30px] rounded-full overflow-hidden absolute bottom-[-12px] right-[-12px]"
852
- }, issuerImageEl)), /* @__PURE__ */ React.createElement("div", {
853
- className: "vc-issue-details mt-[10px] flex flex-col items-center font-montserrat text-[14px] leading-[20px]"
854
- }, /* @__PURE__ */ React.createElement("span", {
855
- className: "created-at text-grayscale-700"
856
- }, createdAt), /* @__PURE__ */ React.createElement("span", {
857
- className: "issued-by text-grayscale-900 font-[500]"
858
- }, "by ", /* @__PURE__ */ React.createElement("strong", {
859
- className: "font-[700]"
860
- }, issuerName))))));
861
- };
862
-
863
- /*! @license Rematrix v0.2.2
864
-
865
- Copyright 2018 Fisssion LLC.
866
-
867
- Permission is hereby granted, free of charge, to any person obtaining a copy
868
- of this software and associated documentation files (the "Software"), to deal
869
- in the Software without restriction, including without limitation the rights
870
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
871
- copies of the Software, and to permit persons to whom the Software is
872
- furnished to do so, subject to the following conditions:
873
-
874
- The above copyright notice and this permission notice shall be included in
875
- all copies or substantial portions of the Software.
876
-
877
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
878
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
879
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
880
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
881
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
882
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
883
- THE SOFTWARE.
884
- */
885
- /**
886
- * @module Rematrix
887
- */
888
-
889
- /**
890
- * Transformation matrices in the browser come in two flavors:
891
- *
892
- * - `matrix` using 6 values (short)
893
- * - `matrix3d` using 16 values (long)
894
- *
895
- * This utility follows this [conversion guide](https://goo.gl/EJlUQ1)
896
- * to expand short form matrices to their equivalent long form.
897
- *
898
- * @param {array} source - Accepts both short and long form matrices.
899
- * @return {array}
900
- */
901
- function format(source) {
902
- if (source.constructor !== Array) {
903
- throw new TypeError('Expected array.')
904
- }
905
- if (source.length === 16) {
906
- return source
907
- }
908
- if (source.length === 6) {
909
- var matrix = identity();
910
- matrix[0] = source[0];
911
- matrix[1] = source[1];
912
- matrix[4] = source[2];
913
- matrix[5] = source[3];
914
- matrix[12] = source[4];
915
- matrix[13] = source[5];
916
- return matrix
917
- }
918
- throw new RangeError('Expected array with either 6 or 16 values.')
919
- }
920
-
921
- /**
922
- * Returns a matrix representing no transformation. The product of any matrix
923
- * multiplied by the identity matrix will be the original matrix.
924
- *
925
- * > **Tip:** Similar to how `5 * 1 === 5`, where `1` is the identity.
926
- *
927
- * @return {array}
928
- */
929
- function identity() {
930
- var matrix = [];
931
- for (var i = 0; i < 16; i++) {
932
- i % 5 == 0 ? matrix.push(1) : matrix.push(0);
933
- }
934
- return matrix
935
- }
936
-
937
- /**
938
- * Returns a 4x4 matrix describing the combined transformations
939
- * of both arguments.
940
- *
941
- * > **Note:** Order is very important. For example, rotating 45°
942
- * along the Z-axis, followed by translating 500 pixels along the
943
- * Y-axis... is not the same as translating 500 pixels along the
944
- * Y-axis, followed by rotating 45° along on the Z-axis.
945
- *
946
- * @param {array} m - Accepts both short and long form matrices.
947
- * @param {array} x - Accepts both short and long form matrices.
948
- * @return {array}
949
- */
950
- function multiply(m, x) {
951
- var fm = format(m);
952
- var fx = format(x);
953
- var product = [];
954
-
955
- for (var i = 0; i < 4; i++) {
956
- var row = [fm[i], fm[i + 4], fm[i + 8], fm[i + 12]];
957
- for (var j = 0; j < 4; j++) {
958
- var k = j * 4;
959
- var col = [fx[k], fx[k + 1], fx[k + 2], fx[k + 3]];
960
- var result =
961
- row[0] * col[0] + row[1] * col[1] + row[2] * col[2] + row[3] * col[3];
962
-
963
- product[i + k] = result;
964
- }
965
- }
966
-
967
- return product
968
- }
969
-
970
- /**
971
- * Attempts to return a 4x4 matrix describing the CSS transform
972
- * matrix passed in, but will return the identity matrix as a
973
- * fallback.
974
- *
975
- * **Tip:** In virtually all cases, this method is used to convert
976
- * a CSS matrix (retrieved as a `string` from computed styles) to
977
- * its equivalent array format.
978
- *
979
- * @param {string} source - String containing a valid CSS `matrix` or `matrix3d` property.
980
- * @return {array}
981
- */
982
- function parse(source) {
983
- if (typeof source === 'string') {
984
- var match = source.match(/matrix(3d)?\(([^)]+)\)/);
985
- if (match) {
986
- var raw = match[2].split(', ').map(parseFloat);
987
- return format(raw)
988
- }
989
- }
990
- return identity()
991
- }
992
-
993
- /**
994
- * Returns a 4x4 matrix describing X-axis scaling.
995
- *
996
- * @param {number} scalar - Decimal multiplier.
997
- * @return {array}
998
- */
999
- function scaleX(scalar) {
1000
- var matrix = identity();
1001
- matrix[0] = scalar;
1002
- return matrix
1003
- }
1004
-
1005
- /**
1006
- * Returns a 4x4 matrix describing Y-axis scaling.
1007
- *
1008
- * @param {number} scalar - Decimal multiplier.
1009
- * @return {array}
1010
- */
1011
- function scaleY(scalar) {
1012
- var matrix = identity();
1013
- matrix[5] = scalar;
1014
- return matrix
1015
- }
1016
-
1017
- /**
1018
- * Returns a 4x4 matrix describing X-axis translation.
1019
- *
1020
- * @param {number} distance - Measured in pixels.
1021
- * @return {array}
1022
- */
1023
- function translateX(distance) {
1024
- var matrix = identity();
1025
- matrix[12] = distance;
1026
- return matrix
1027
- }
1028
-
1029
- /**
1030
- * Returns a 4x4 matrix describing Y-axis translation.
1031
- *
1032
- * @param {number} distance - Measured in pixels.
1033
- * @return {array}
1034
- */
1035
- function translateY(distance) {
1036
- var matrix = identity();
1037
- matrix[13] = distance;
1038
- return matrix
1039
- }
1040
-
1041
- var e=function(t){return "number"==typeof t},i=function(t){return "function"==typeof t},n=function(t){return "[object Object]"===Object.prototype.toString.call(t)},r=function(t){return Array.prototype.slice.apply(t)},s=function(t){var e=t.reduce(function(t,e){return t[e]=(t[e]||0)+1,t},{});return Object.keys(e).filter(function(t){return e[t]>1})};function a(t){return [].slice.call(arguments,1).forEach(function(e){if(e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);}),t}var o,l=function(t,e,i){return t+(e-t)*i},p={__proto__:null,isNumber:e,isFunction:i,isObject:n,toArray:r,getDuplicateValsAsStrings:s,assign:a,tweenProp:l},c$1="data-flip-id",u$1="data-inverse-flip-id",d$1="data-portal-key",f$1="data-exit-container",h$1={__proto__:null,DATA_FLIP_ID:c$1,DATA_INVERSE_FLIP_ID:u$1,DATA_FLIP_COMPONENT_ID:"data-flip-component-id",DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:d$1,DATA_EXIT_CONTAINER:f$1},g={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},m$1=function(t){return n(t)?t:Object.keys(g).indexOf(t)>-1?g[t]:{}};"undefined"!=typeof window&&(o=window.requestAnimationFrame);var v=o=o||function(t){window.setTimeout(t,1e3/60);},y$1=Date.now(),_="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()-y$1};function S(t,e){var i=t.indexOf(e);-1!==i&&t.splice(i,1);}var E=/*#__PURE__*/function(){function t(){}return t.prototype.run=function(){var t=this;v(function(){t.springSystem.loop(_());});},t}(),A=function(){this.position=0,this.velocity=0;},C=0,b=.001,I=/*#__PURE__*/function(){function t(t){this._id="s"+C++,this._springSystem=t,this.listeners=[],this._startValue=0,this._currentState=new A,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new A,this._restSpeedThreshold=.001,this._tempState=new A,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={};}var e=t.prototype;return e.getId=function(){return this._id},e.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this);},e.setSpringConfig=function(t){return this._springConfig=t,this},e.getCurrentValue=function(){return this._currentState.position},e.getDisplacementDistanceForState=function(t){return Math.abs(this._endValue-t.position)},e.setEndValue=function(t){if(t===this._endValue)return this;if(this.prevEndValue=t,this._endValue===t&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=t,this._springSystem.activateSpring(this.getId());for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e].onSpringEndStateChange;n&&n(this);}return this},e.setVelocity=function(t){return t===this._currentState.velocity||(this._currentState.velocity=t,this._springSystem.activateSpring(this.getId())),this},e.setCurrentValue=function(t){this._startValue=t,this._currentState.position=t;for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e];n.onSpringUpdate&&n.onSpringUpdate(this);}return this},e.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},e.setOvershootClampingEnabled=function(t){return this._overshootClampingEnabled=t,this},e.isOvershooting=function(){var t=this._startValue,e=this._endValue;return this._springConfig.tension>0&&(t<e&&this.getCurrentValue()>e||t>e&&this.getCurrentValue()<e)},e.advance=function(t,e){var i=this.isAtRest();if(!i||!this._wasAtRest){var n=e;e>.064&&(n=.064),this._timeAccumulator+=n;for(var r,s,a,o,l,p,c=this._springConfig.tension,u=this._springConfig.friction,d=this._currentState.position,f=this._currentState.velocity,h=this._tempState.position,g=this._tempState.velocity;this._timeAccumulator>=b;)this._timeAccumulator-=b,this._timeAccumulator<b&&(this._previousState.position=d,this._previousState.velocity=f),s=c*(this._endValue-h)-u*f,o=c*(this._endValue-(h=d+(r=f)*b*.5))-u*(g=f+s*b*.5),p=c*(this._endValue-(h=d+(a=g)*b*.5))-u*(g=f+o*b*.5),h=d+(l=g)*b,d+=1/6*(r+2*(a+l)+(g=f+p*b))*b,f+=1/6*(s+2*(o+p)+(c*(this._endValue-h)-u*g))*b;this._tempState.position=h,this._tempState.velocity=g,this._currentState.position=d,this._currentState.velocity=f,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/b),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),i=!0);var m=!1;this._wasAtRest&&(this._wasAtRest=!1,m=!0);var v=!1;i&&(this._wasAtRest=!0,v=!0),this.notifyPositionUpdated(m,v);}},e.notifyPositionUpdated=function(t,e){var i=this;this.listeners.filter(Boolean).forEach(function(n){t&&n.onSpringActivate&&!i._onActivateCalled&&(n.onSpringActivate(i),i._onActivateCalled=!0),n.onSpringUpdate&&n.onSpringUpdate(i),e&&n.onSpringAtRest&&n.onSpringAtRest(i);});},e.systemShouldAdvance=function(){return !this.isAtRest()||!this.wasAtRest()},e.wasAtRest=function(){return this._wasAtRest},e.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||0===this._springConfig.tension)},e._interpolate=function(t){this._currentState.position=this._currentState.position*t+this._previousState.position*(1-t),this._currentState.velocity=this._currentState.velocity*t+this._previousState.velocity*(1-t);},e.addListener=function(t){return this.listeners.push(t),this},e.addOneTimeListener=function(t){var e=this;return Object.keys(t).forEach(function(i){var n;t[i]=(n=t[i],function(){n.apply(void 0,[].slice.call(arguments)),e.removeListener(t);});}),this.listeners.push(t),this},e.removeListener=function(t){return S(this.listeners,t),this},t}(),w=/*#__PURE__*/function(){function t(t){this.looper=t||new E,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={};}var e=t.prototype;return e.createSpring=function(t,e){return this.createSpringWithConfig({tension:t,friction:e})},e.createSpringWithConfig=function(t){var e=new I(this);return this.registerSpring(e),e.setSpringConfig(t),e},e.getIsIdle=function(){return this._isIdle},e.registerSpring=function(t){this._springRegistry[t.getId()]=t;},e.deregisterSpring=function(t){S(this._activeSprings,t),delete this._springRegistry[t.getId()];},e.advance=function(t,e){for(var i=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach(function(n){n.systemShouldAdvance()?n.advance(t/1e3,e/1e3):i._idleSpringIndices.push(i._activeSprings.indexOf(n));});this._idleSpringIndices.length>0;){var n=this._idleSpringIndices.pop();n>=0&&this._activeSprings.splice(n,1);}},e.loop=function(t){var e;-1===this._lastTimeMillis&&(this._lastTimeMillis=t-1);var i=t-this._lastTimeMillis;this._lastTimeMillis=t;var n=0,r=this.listeners.length;for(n=0;n<r;n++)(e=this.listeners[n]).onBeforeIntegrate&&e.onBeforeIntegrate(this);for(this.advance(t,i),0===this._activeSprings.length&&(this._isIdle=!0,this._lastTimeMillis=-1),n=0;n<r;n++)(e=this.listeners[n]).onAfterIntegrate&&e.onAfterIntegrate(this);this._isIdle||this.looper.run();},e.activateSpring=function(t){var e=this._springRegistry[t];-1===this._activeSprings.indexOf(e)&&this._activeSprings.push(e),this.getIsIdle()&&(this._isIdle=!1,this.looper.run());},t}(),O=new w,x=function(t){var e=t.springConfig,i=e.overshootClamping,n=t.getOnUpdateFunc,r=t.onAnimationEnd,s=t.onSpringActivate,a=O.createSpring(e.stiffness,e.damping);a.setOvershootClampingEnabled(!!i);var o={onSpringActivate:s,onSpringAtRest:function(){a.destroy(),r();},onSpringUpdate:n({spring:a,onAnimationEnd:r})};return a.addListener(o),a},U=function(t){var e=x(t);return e.setEndValue(1),e},V=function(t,e){if(void 0===e&&(e={}),t&&t.length){e.reverse&&t.reverse();var i,n="number"!=typeof(i=e.speed)?1.1:1+Math.min(Math.max(5*i,0),5),r=1/Math.max(Math.min(t.length,100),10),s=t.map(function(t,e){var i=t.getOnUpdateFunc;return t.getOnUpdateFunc=function(t){var a=i(t);return function(t){var i=t.getCurrentValue();(i=i<.01?0:i>.99?1:i)>=r&&s[e+1]&&s[e+1](Math.max(Math.min(i*n,1),0)),a(t);}},t}).map(function(t){var e=x(t);if(e)return e.setEndValue.bind(e)}).filter(Boolean);s[0]&&s[0](1);}},F=function(t){return [0,1,4,5,12,13].map(function(e){return t[e]})},P=function(t){return t.top<window.innerHeight&&t.bottom>0&&t.left<window.innerWidth&&t.right>0};function D(t){return JSON.parse(t.dataset.flipConfig||"{}")}var R=function(t,e){var i;return a(t,((i={})[e[0]]=e[1],i))},T=function(t,e){return r(e?document.querySelectorAll("["+d$1+'="'+e+'"]'):t.querySelectorAll("["+c$1+"]"))},M=function(t){return t.map(function(t){return [t,t.getBoundingClientRect()]})},k=function(n){var o=n.cachedOrderedFlipIds,p=void 0===o?[]:o,f=n.inProgressAnimations,h=void 0===f?{}:f,v=n.flippedElementPositionsBeforeUpdate,y=void 0===v?{}:v,_=n.flipCallbacks,S=void 0===_?{}:_,E=n.containerEl,A=n.applyTransformOrigin,C=n.spring,b=n.debug,I=n.portalKey,w=n.staggerConfig,O=void 0===w?{}:w,x=n.decisionData,k=void 0===x?{}:x,j=n.handleEnterUpdateDelete,B=n.onComplete,N=n.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var L,q=M(T((L={element:E,portalKey:I}).element,L.portalKey)).map(function(t){var e=t[0],i=t[1],n=window.getComputedStyle(e);return [e.dataset.flipId,{element:e,rect:i,opacity:parseFloat(n.opacity),transform:n.transform}]}).reduce(R,{}),X=function(t){var e=t.containerEl,i=t.portalKey;return i?function(t){return function(e){return r(document.querySelectorAll("["+d$1+'="'+t+'"]'+e))}}(i):e?function(t){var e=Math.random().toFixed(5);return t.dataset.flipperId=e,function(i){return r(t.querySelectorAll('[data-flipper-id="'+e+'"] '+i))}}(e):function(){return []}}({containerEl:E,portalKey:I}),Y=function(t){return function(e){return t("["+c$1+'="'+e+'"]')[0]}}(X),W=function(t){return y[t]&&q[t]},K=Object.keys(y).concat(Object.keys(q)).filter(function(t){return !W(t)}),H={flipCallbacks:S,getElement:Y,flippedElementPositionsBeforeUpdate:y,flippedElementPositionsAfterUpdate:q,inProgressAnimations:h,decisionData:k},J=function(t){var e,i=t.unflippedIds,n=t.flipCallbacks,r=t.getElement,s=t.flippedElementPositionsBeforeUpdate,a=t.flippedElementPositionsAfterUpdate,o=t.inProgressAnimations,l=t.decisionData,p=i.filter(function(t){return a[t]}).filter(function(t){return n[t]&&n[t].onAppear}),c=i.filter(function(t){return s[t]&&n[t]&&n[t].onExit}),u=new Promise(function(t){e=t;}),d=[],f=0,h=c.map(function(t,i){var r=s[t].domDataForExitAnimations,a=r.element,p=r.parent,c=r.childPosition,u=c.top,h=c.left,g=c.width,m=c.height;"static"===getComputedStyle(p).position&&(p.style.position="relative"),a.style.transform="matrix(1, 0, 0, 1, 0, 0)",a.style.position="absolute",a.style.top=u+"px",a.style.left=h+"px",a.style.height=m+"px",a.style.width=g+"px";var v=d.filter(function(t){return t[0]===p})[0];v||(v=[p,document.createDocumentFragment()],d.push(v)),v[1].appendChild(a),f+=1;var y=function(){try{p.removeChild(a);}catch(t){}finally{0==(f-=1)&&e();}};return o[t]={stop:y},function(){return n[t].onExit(a,i,y,l)}});return d.forEach(function(t){t[0].appendChild(t[1]);}),h.length||e(),{hideEnteringElements:function(){p.forEach(function(t){var e=r(t);e&&(e.style.opacity="0");});},animateEnteringElements:function(){p.forEach(function(t,e){var i=r(t);i&&n[t].onAppear(i,e,l);});},animateExitingElements:function(){return h.forEach(function(t){return t()}),u}}}(a({},H,{unflippedIds:K})),z=J.hideEnteringElements,G=J.animateEnteringElements,Q=J.animateExitingElements,Z=a({},H,{containerEl:E,flippedIds:p.filter(W),applyTransformOrigin:A,spring:C,debug:b,staggerConfig:O,scopedSelector:X,onComplete:B});N&&N(E,k);var $=function(n){var o,p=n.flippedIds,c=n.flipCallbacks,d=n.inProgressAnimations,f=n.flippedElementPositionsBeforeUpdate,h=n.flippedElementPositionsAfterUpdate,v=n.applyTransformOrigin,y=n.spring,_=n.getElement,S=n.debug,E=n.staggerConfig,A=void 0===E?{}:E,C=n.decisionData,b=void 0===C?{}:C,I=n.onComplete,w=n.containerEl,O=new Promise(function(t){o=t;});if(I&&O.then(function(){return I(w,b)}),!p.length)return function(){return o([]),O};var x=[],R=_(p[0]),T=R?R.ownerDocument.querySelector("body"):document.querySelector("body");s(p);var M=p.map(function(n){var s=f[n].rect,p=h[n].rect,_=f[n].opacity,S=h[n].opacity,E=p.width<1||p.height<1,A=h[n].element;if(!P(s)&&!P(p))return !1;if(!A)return !1;var C,I,w,O=D(A),U=(w=(I=void 0===(C={flipperSpring:y,flippedSpring:O.spring})?{}:C).flippedSpring,a({},g.noWobble,m$1(I.flipperSpring),m$1(w))),V=!0===O.stagger?"default":O.stagger,R={element:A,id:n,stagger:V,springConfig:U};if(c[n]&&c[n].shouldFlip&&!c[n].shouldFlip(b.previous,b.current))return !1;var k=Math.abs(s.left-p.left)+Math.abs(s.top-p.top),j=Math.abs(s.width-p.width)+Math.abs(s.height-p.height),B=Math.abs(S-_);if(0===s.height&&0===p.height||0===s.width&&0===p.width||k<.5&&j<.5&&B<.01)return !1;var N=parse(h[n].transform),L={matrix:N},q={matrix:[]},X=[N];O.translate&&(X.push(translateX(s.left-p.left)),X.push(translateY(s.top-p.top))),O.scale&&(X.push(scaleX(Math.max(s.width,1)/Math.max(p.width,1))),X.push(scaleY(Math.max(s.height,1)/Math.max(p.height,1)))),O.opacity&&(q.opacity=_,L.opacity=S);var Y=[];if(!c[n]||!c[n].shouldInvert||c[n].shouldInvert(b.previous,b.current)){var W=function(t,e){return r(t.querySelectorAll("["+u$1+'="'+e+'"]'))}(A,n);Y=W.map(function(t){return [t,D(t)]});}q.matrix=F(X.reduce(multiply)),L.matrix=F(L.matrix);var K,H=function(t){var i=t.element,n=t.invertedChildren,r=t.body;return function(t){var s=t.matrix,a=t.opacity,o=t.forceMinVals;if(e(a)&&(i.style.opacity=a+""),o&&(i.style.minHeight="1px",i.style.minWidth="1px"),s){var l=function(t){return "matrix("+t.join(", ")+")"}(s);i.style.transform=l,n&&function(t){var e=t.matrix,i=t.body;t.invertedChildren.forEach(function(t){var n=t[0],r=t[1];if(i.contains(n)){var s=e[0],a=e[3],o=e[5],l={translateX:0,translateY:0,scaleX:1,scaleY:1},p="";r.translate&&(l.translateX=-e[4]/s,l.translateY=-o/a,p+="translate("+l.translateX+"px, "+l.translateY+"px)"),r.scale&&(l.scaleX=1/s,l.scaleY=1/a,p+=" scale("+l.scaleX+", "+l.scaleY+")"),n.style.transform=p;}});}({invertedChildren:n,matrix:s,body:r});}}}({element:A,invertedChildren:Y,body:T});if(c[n]&&c[n].onComplete){var J=c[n].onComplete;K=function(){return J(A,b)};}var z=e(q.opacity)&&e(L.opacity)&&q.opacity!==L.opacity,G=!1;return a({},R,{stagger:V,springConfig:U,getOnUpdateFunc:function(t){var e=t.spring,i=t.onAnimationEnd;return d[n]={destroy:e.destroy.bind(e),onAnimationEnd:i},function(t){c[n]&&c[n].onSpringUpdate&&c[n].onSpringUpdate(t.getCurrentValue()),G||(G=!0,c[n]&&c[n].onStart&&c[n].onStart(A,b));var e=t.getCurrentValue();if(T.contains(A)){var i={matrix:[]};i.matrix=q.matrix.map(function(t,i){return l(t,L.matrix[i],e)}),z&&(i.opacity=l(q.opacity,L.opacity,e)),H(i);}else t.destroy();}},initializeFlip:function(){H({matrix:q.matrix,opacity:z?q.opacity:void 0,forceMinVals:E}),c[n]&&c[n].onStartImmediate&&c[n].onStartImmediate(A,b),O.transformOrigin?A.style.transformOrigin=O.transformOrigin:v&&(A.style.transformOrigin="0 0"),Y.forEach(function(t){var e=t[0],i=t[1];i.transformOrigin?e.style.transformOrigin=i.transformOrigin:v&&(e.style.transformOrigin="0 0");});},onAnimationEnd:function(t){delete d[n],i(K)&&K(),A.style.transform="",Y.forEach(function(t){t[0].style.transform="";}),E&&A&&(A.style.minHeight="",A.style.minWidth=""),t||(x.push(n),x.length>=M.length&&o(x));},delayUntil:O.delayUntil})}).filter(Boolean);if(M.forEach(function(t){return (0, t.initializeFlip)()}),S)return function(){};var k=M.filter(function(t){return t.delayUntil&&(e=t.delayUntil,M.filter(function(t){return t.id===e}).length);var e;}),j={},B={},N={};k.forEach(function(t){t.stagger?(N[t.stagger]=!0,B[t.delayUntil]?B[t.delayUntil].push(t.stagger):B[t.delayUntil]=[t.stagger]):j[t.delayUntil]?j[t.delayUntil].push(t):j[t.delayUntil]=[t];});var L=M.filter(function(t){return t.stagger}).reduce(function(t,e){return t[e.stagger]?t[e.stagger].push(e):t[e.stagger]=[e],t},{}),q=M.filter(function(t){return -1===k.indexOf(t)});return q.forEach(function(t){t.onSpringActivate=function(){j[t.id]&&j[t.id].forEach(U),B[t.id]&&Object.keys(B[t.id].reduce(function(t,e){var i;return a(t,((i={})[e]=!0,i))},{})).forEach(function(t){V(L[t],A[t]);});};}),function(){return M.length||o([]),q.filter(function(t){return !t.stagger}).forEach(U),Object.keys(L).forEach(function(t){N[t]||V(L[t],A[t]);}),O}}(Z);j?j({hideEnteringElements:z,animateEnteringElements:G,animateExitingElements:Q,animateFlippedElements:$}):(z(),Q().then(G),$());}},j=function(t){var e=t.element,i=t.flipCallbacks,n=void 0===i?{}:i,s=t.inProgressAnimations,o=void 0===s?{}:s,l=T(e,t.portalKey),p=r(e.querySelectorAll("["+u$1+"]")),c={},d=[],h={};l.filter(function(t){return n&&n[t.dataset.flipId]&&n[t.dataset.flipId].onExit}).forEach(function(t){var e=t.parentNode;if(t.closest){var i=t.closest("["+f$1+"]");i&&(e=i);}var n=d.findIndex(function(t){return t[0]===e});-1===n&&(d.push([e,e.getBoundingClientRect()]),n=d.length-1),c[t.dataset.flipId]=d[n][1],h[t.dataset.flipId]=e;});var g=M(l),m=g.map(function(t){var e=t[0],i=t[1],r={};if(n&&n[e.dataset.flipId]&&n[e.dataset.flipId].onExit){var s=c[e.dataset.flipId];a(r,{element:e,parent:h[e.dataset.flipId],childPosition:{top:i.top-s.top,left:i.left-s.left,width:i.width,height:i.height}});}return [e.dataset.flipId,{rect:i,opacity:parseFloat(window.getComputedStyle(e).opacity||"1"),domDataForExitAnimations:r}]}).reduce(R,{});return function(t,e){Object.keys(t).forEach(function(e){t[e].destroy&&t[e].destroy(),t[e].onAnimationEnd&&t[e].onAnimationEnd(!0),delete t[e];}),e.forEach(function(t){t.style.transform="",t.style.opacity="";});}(o,l.concat(p)),{flippedElementPositions:m,cachedOrderedFlipIds:g.map(function(t){return t[0].dataset.flipId})}};new w;
1042
-
1043
- function c(e,t){return (c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if(null==e)return {};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}var f=createContext({}),u=createContext("portal"),h=function(t){var r,n;function i(){var e;return (e=t.apply(this,arguments)||this).inProgressAnimations={},e.flipCallbacks={},e.el=void 0,e}n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,c(r,n);var l=i.prototype;return l.getSnapshotBeforeUpdate=function(e){return e.flipKey!==this.props.flipKey&&this.el?j({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},l.componentDidUpdate=function(e,t,r){this.props.flipKey!==e.flipKey&&this.el&&k({flippedElementPositionsBeforeUpdate:r.flippedElementPositions,cachedOrderedFlipIds:r.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:e.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart});},l.render=function(){var t=this,r=this.props,n=r.portalKey,i=React.createElement(f.Provider,{value:this.flipCallbacks},React.createElement(r.element,{className:r.className,ref:function(e){return t.el=e}},this.props.children));return n&&(i=React.createElement(u.Provider,{value:n},i)),i},i}(Component);h.defaultProps={applyTransformOrigin:!0,element:"div"};var m=function(e){var t,r=e.children,o=e.flipId,p$1=e.inverseFlipId,a=e.portalKey,c=d(e,["children","flipId","inverseFlipId","portalKey"]),f=r,u=function(e){return "function"==typeof e}(f);if(!u)try{f=Children.only(r);}catch(e){throw new Error("Each Flipped component must wrap a single child")}c.scale||c.translate||c.opacity||p.assign(c,{translate:!0,scale:!0,opacity:!0});var h=((t={})[h$1.DATA_FLIP_CONFIG]=JSON.stringify(c),t);return void 0!==o?h[h$1.DATA_FLIP_ID]=String(o):p$1&&(h[h$1.DATA_INVERSE_FLIP_ID]=String(p$1)),void 0!==a&&(h[h$1.DATA_PORTAL_KEY]=a),u?f(h):cloneElement(f,h)},y=function(t){var r=t.children,n=t.flipId,i=t.shouldFlip,o=t.shouldInvert,p$1=t.onAppear,s=t.onStart,a=t.onStartImmediate,c=t.onComplete,h=t.onExit,y=t.onSpringUpdate,g=d(t,["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"]);return r?g.inverseFlipId?React.createElement(m,Object.assign({},g),r):React.createElement(u.Consumer,null,function(t){return React.createElement(f.Consumer,null,function(d){return p.isObject(d)&&n&&(d[n]={shouldFlip:i,shouldInvert:o,onAppear:p$1,onStart:s,onStartImmediate:a,onComplete:c,onExit:h,onSpringUpdate:y}),React.createElement(m,Object.assign({flipId:n},g,{portalKey:t}),r)})}):null};y.displayName="Flipped";
1044
-
1045
- const getCategoryTextColor = (category = LCCategoryEnum.achievement) => {
1046
- if (category === LCCategoryEnum.socialBadge)
1047
- return "text-cyan-700";
1048
- if (category === LCCategoryEnum.skill)
1049
- return "text-indigo-600";
1050
- if (category === LCCategoryEnum.achievement)
1051
- return "text-spice-600";
1052
- if (category === LCCategoryEnum.learningHistory)
1053
- return "text-emerald-700";
1054
- if (category === LCCategoryEnum.id)
1055
- return "text-yellow-400";
1056
- if (category === LCCategoryEnum.workHistory)
1057
- return "text-rose-600";
1058
- if (category === LCCategoryEnum.course)
1059
- return "text-emerald-700";
1060
- if (category === LCCategoryEnum.job)
1061
- return "text-rose-600";
1062
- if (category === LCCategoryEnum.currency)
1063
- return "text-cyan-700";
1064
- if (category === LCCategoryEnum.membership)
1065
- return "text-teal-500";
1066
- return "text-spice-600";
1067
- };
1068
- const VCDisplayCardCategoryType = ({
1069
- categoryType = LCCategoryEnum.achievement
1070
- }) => {
1071
- const categoryColor = getCategoryTextColor(categoryType);
1072
- return /* @__PURE__ */ React.createElement("span", {
1073
- className: `uppercase font-poppins text-[12px] font-[600] leading-[12px] select-none ${categoryColor}`
1074
- }, categoryType);
1075
- };
1076
-
1077
- const VCDisplayCard2 = ({
1078
- categoryType,
1079
- credential,
1080
- verificationItems,
1081
- issueeOverride,
1082
- issuerOverride,
1083
- subjectDID,
1084
- subjectImageComponent,
1085
- issuerImageComponent,
1086
- verificationInProgress = false,
1087
- handleXClick,
1088
- getFileMetadata,
1089
- getVideoMetadata,
1090
- onMediaAttachmentClick,
1091
- bottomRightIcon,
1092
- customFooterComponent,
1093
- customBodyCardComponent,
1094
- customThumbComponent,
1095
- customCriteria,
1096
- customDescription,
1097
- customIssueHistoryComponent,
1098
- issueHistory,
1099
- titleOverride,
1100
- showBackButton = true,
1101
- enableLightbox,
1102
- customRibbonCategoryComponent,
1103
- customFrontButton
1104
- }) => {
1105
- var _a, _b, _c, _d, _e;
1106
- const {
1107
- title = "",
1108
- createdAt,
1109
- issuer: _issuer = "",
1110
- issuee: _issuee = "",
1111
- imageUrl
1112
- } = getInfoFromCredential(credential, "MMM dd, yyyy");
1113
- const issuee = issueeOverride || _issuee;
1114
- const issuer = issuerOverride || _issuer;
1115
- const [isFront, setIsFront] = useState(true);
1116
- const [headerHeight, setHeaderHeight] = useState(100);
1117
- const [headerWidth, setHeaderWidth] = useState(0);
1118
- const headerRef = useRef(null);
1119
- useLayoutEffect(() => {
1120
- setTimeout(() => {
1121
- var _a2, _b2, _c2, _d2;
1122
- setHeaderHeight((_b2 = (_a2 = headerRef.current) == null ? void 0 : _a2.clientHeight) != null ? _b2 : 100);
1123
- setHeaderWidth((_d2 = (_c2 = headerRef.current) == null ? void 0 : _c2.clientWidth) != null ? _d2 : 0);
1124
- }, 10);
1125
- });
1126
- let worstVerificationStatus = verificationItems.reduce((currentWorst, verification) => {
1127
- switch (currentWorst) {
1128
- case VerificationStatusEnum.Success:
1129
- return verification.status;
1130
- case VerificationStatusEnum.Error:
1131
- return verification.status === VerificationStatusEnum.Failed ? verification.status : currentWorst;
1132
- case VerificationStatusEnum.Failed:
1133
- return currentWorst;
1134
- }
1135
- }, VerificationStatusEnum.Success);
1136
- const statusColor = getColorForVerificationStatus(worstVerificationStatus);
1137
- const backgroundStyle = {
1138
- backgroundColor: (_a = credential.display) == null ? void 0 : _a.backgroundColor,
1139
- backgroundImage: ((_b = credential.display) == null ? void 0 : _b.backgroundImage) ? `linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25)), url(${(_c = credential.display) == null ? void 0 : _c.backgroundImage})` : void 0,
1140
- backgroundSize: "cover",
1141
- backgroundPosition: "center",
1142
- backgroundAttachment: "fixed"
1143
- };
1144
- const _title = titleOverride || title;
1145
- return /* @__PURE__ */ React.createElement(h, {
1146
- className: "w-full",
1147
- flipKey: isFront
1148
- }, /* @__PURE__ */ React.createElement(y, {
1149
- flipId: "card"
1150
- }, /* @__PURE__ */ React.createElement("section", {
1151
- className: "vc-display-card font-mouse flex flex-col items-center border-solid border-[5px] border-white rounded-[30px] overflow-visible z-10 min-h-[800px] max-w-[400px] relative bg-white shadow-3xl"
1152
- }, /* @__PURE__ */ React.createElement(RibbonEnd, {
1153
- side: "left",
1154
- className: "absolute left-[-30px] top-[50px] z-0",
1155
- height: "100"
1156
- }), /* @__PURE__ */ React.createElement(RibbonEnd, {
1157
- side: "right",
1158
- className: "absolute right-[-30px] top-[50px] z-0",
1159
- height: "100"
1160
- }), /* @__PURE__ */ React.createElement("h1", {
1161
- ref: headerRef,
1162
- className: "vc-card-header px-[20px] pb-[10px] pt-[3px] overflow-visible mt-[40px] absolute text-center bg-white border-y-[5px] border-[#EEF2FF] shadow-bottom w-[calc(100%_+_16px)] rounded-t-[8px] z-50",
1163
- style: { wordBreak: "break-word" }
1164
- }, customRibbonCategoryComponent && customRibbonCategoryComponent, !customRibbonCategoryComponent && /* @__PURE__ */ React.createElement(VCDisplayCardCategoryType, {
1165
- categoryType
1166
- }), /* @__PURE__ */ React.createElement(FitText, {
1167
- text: _title != null ? _title : "",
1168
- maxFontSize: 32,
1169
- minFontSize: 20,
1170
- width: ((headerWidth != null ? headerWidth : 290) - 40).toString(),
1171
- className: "vc-card-header-main-title text-[#18224E] leading-[100%] text-shadow text-[32px]"
1172
- })), isFront && handleXClick && /* @__PURE__ */ React.createElement("button", {
1173
- className: "vc-card-x-button absolute top-[-25px] bg-white rounded-full h-[50px] w-[50px] flex items-center justify-center z-50",
1174
- onClick: handleXClick
1175
- }, /* @__PURE__ */ React.createElement(RoundedX, null)), /* @__PURE__ */ React.createElement("div", {
1176
- className: "relative pt-[114px] vc-card-content-container flex flex-col items-center grow basis-0 min-h-0 h-full w-full rounded-t-[30px] bg-[#353E64] rounded-b-[200px]",
1177
- style: backgroundStyle
1178
- }, /* @__PURE__ */ React.createElement(y, {
1179
- flipId: "scroll-container"
1180
- }, /* @__PURE__ */ React.createElement("div", {
1181
- className: "vc-card-content-scroll-container w-full pt-[20px] min-h-full flex flex-col justify-start items-center rounded-t-[30px] rounded-b-[200px] overflow-y-auto scrollbar-hide pb-[50px]"
1182
- }, isFront && /* @__PURE__ */ React.createElement(y, {
1183
- flipId: "face"
1184
- }, /* @__PURE__ */ React.createElement(VC2FrontFaceInfo, {
1185
- issuee,
1186
- subjectDID,
1187
- issuer,
1188
- title,
1189
- subjectImageComponent,
1190
- issuerImageComponent,
1191
- customBodyCardComponent,
1192
- customThumbComponent,
1193
- createdAt: createdAt != null ? createdAt : "",
1194
- imageUrl
1195
- })), !isFront && /* @__PURE__ */ React.createElement(y, {
1196
- flipId: "face"
1197
- }, /* @__PURE__ */ React.createElement(VC2BackFace, {
1198
- credential,
1199
- verificationItems,
1200
- issueHistory,
1201
- getFileMetadata,
1202
- getVideoMetadata,
1203
- onMediaAttachmentClick,
1204
- showBackButton,
1205
- showFrontFace: () => setIsFront(true),
1206
- customDescription,
1207
- customCriteria,
1208
- customIssueHistoryComponent,
1209
- enableLightbox
1210
- })), isFront && customFrontButton, isFront && !customFrontButton && /* @__PURE__ */ React.createElement(y, {
1211
- flipId: "details-back-button"
1212
- }, /* @__PURE__ */ React.createElement("button", {
1213
- type: "button",
1214
- className: "vc-toggle-side-button text-white shadow-bottom bg-[#00000099] px-[30px] py-[8px] rounded-[40px] text-[28px] tracking-[0.75px] uppercase leading-[28px] mt-[40px] w-fit select-none",
1215
- onClick: () => setIsFront(!isFront)
1216
- }, "Details")), !isFront && /* @__PURE__ */ React.createElement(y, {
1217
- flipId: "details-back-button"
1218
- }, /* @__PURE__ */ React.createElement("button", {
1219
- type: "button",
1220
- className: "vc-toggle-side-button text-white shadow-bottom bg-[#00000099] px-[30px] py-[8px] rounded-[40px] text-[28px] tracking-[0.75px] uppercase leading-[28px] mt-[40px] w-fit select-none",
1221
- onClick: () => setIsFront(!isFront)
1222
- }, /* @__PURE__ */ React.createElement("span", {
1223
- className: "flex gap-[10px] items-center"
1224
- }, /* @__PURE__ */ React.createElement(LeftArrow, null), "Back")))))), /* @__PURE__ */ React.createElement("footer", {
1225
- className: "vc-card-footer w-full flex justify-between p-[5px] mt-[5px]"
1226
- }, customFooterComponent && customFooterComponent, !customFooterComponent && /* @__PURE__ */ React.createElement(React.Fragment, null, worstVerificationStatus === VerificationStatusEnum.Failed ? /* @__PURE__ */ React.createElement("div", {
1227
- className: "w-[40px]",
1228
- role: "presentation"
1229
- }) : /* @__PURE__ */ React.createElement(VCVerificationCheckWithSpinner, {
1230
- spinnerSize: "40px",
1231
- size: "32px",
1232
- loading: verificationInProgress
1233
- }), /* @__PURE__ */ React.createElement("div", {
1234
- className: "vc-footer-text font-montserrat flex flex-col items-center justify-center text-[12px] font-[700] leading-[15px] select-none"
1235
- }, /* @__PURE__ */ React.createElement("span", {
1236
- className: "text-[#4F4F4F]"
1237
- }, "Verified Credential"), /* @__PURE__ */ React.createElement("span", {
1238
- className: "vc-footer-status uppercase",
1239
- style: { color: statusColor }
1240
- }, worstVerificationStatus)), /* @__PURE__ */ React.createElement("div", {
1241
- className: "vc-footer-icon rounded-[20px] h-[40px] w-[40px] flex items-center justify-center overflow-hidden",
1242
- style: { backgroundColor: (_d = bottomRightIcon == null ? void 0 : bottomRightIcon.color) != null ? _d : "#6366F1" }
1243
- }, (_e = bottomRightIcon == null ? void 0 : bottomRightIcon.image) != null ? _e : /* @__PURE__ */ React.createElement(AwardRibbon, null)))))));
1244
- };
1245
-
1246
- export { VCDisplayCard2 as V };
1247
- //# sourceMappingURL=VCDisplayCard2-531202a8.js.map