@peculiar/certificates-viewer 3.10.0 → 3.10.1-alpha.14

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 (553) hide show
  1. package/components/arrow_top.js +34 -0
  2. package/components/arrow_top.js.map +1 -0
  3. package/components/attribute-certificate-viewer.js +281 -0
  4. package/components/attribute-certificate-viewer.js.map +1 -0
  5. package/components/button-menu.js +64 -0
  6. package/components/button-menu.js.map +1 -0
  7. package/components/button.js +74 -0
  8. package/components/button.js.map +1 -0
  9. package/components/certificate-viewer.js +300 -0
  10. package/components/certificate-viewer.js.map +1 -0
  11. package/components/circular-progress.js +48 -0
  12. package/components/circular-progress.js.map +1 -0
  13. package/components/crl-viewer.js +263 -0
  14. package/components/crl-viewer.js.map +1 -0
  15. package/components/csr-viewer.js +233 -0
  16. package/components/csr-viewer.js.map +1 -0
  17. package/components/custom-elements.d.ts +2 -0
  18. package/{dist/esm/download-91511aeb.js → components/download.js} +2 -0
  19. package/components/download.js.map +1 -0
  20. package/components/highlight-words.js +60 -0
  21. package/components/highlight-words.js.map +1 -0
  22. package/components/index.d.ts +33 -0
  23. package/components/index.js +7 -0
  24. package/components/index.js.map +1 -0
  25. package/components/index2.js +299 -0
  26. package/components/index2.js.map +1 -0
  27. package/components/issuer_name.js +26 -0
  28. package/components/issuer_name.js.map +1 -0
  29. package/components/miscellaneous.js +13420 -0
  30. package/components/miscellaneous.js.map +1 -0
  31. package/components/package.json +9 -0
  32. package/components/peculiar-attribute-certificate-viewer.d.ts +11 -0
  33. package/components/peculiar-attribute-certificate-viewer.js +11 -0
  34. package/components/peculiar-attribute-certificate-viewer.js.map +1 -0
  35. package/components/peculiar-button-menu.d.ts +11 -0
  36. package/components/peculiar-button-menu.js +11 -0
  37. package/components/peculiar-button-menu.js.map +1 -0
  38. package/components/peculiar-certificate-decoder.d.ts +11 -0
  39. package/components/peculiar-certificate-decoder.js +234 -0
  40. package/components/peculiar-certificate-decoder.js.map +1 -0
  41. package/components/peculiar-certificate-viewer.d.ts +11 -0
  42. package/components/peculiar-certificate-viewer.js +11 -0
  43. package/components/peculiar-certificate-viewer.js.map +1 -0
  44. package/components/peculiar-certificates-viewer.d.ts +11 -0
  45. package/components/peculiar-certificates-viewer.js +382 -0
  46. package/components/peculiar-certificates-viewer.js.map +1 -0
  47. package/components/peculiar-circular-progress.d.ts +11 -0
  48. package/components/peculiar-circular-progress.js +11 -0
  49. package/components/peculiar-circular-progress.js.map +1 -0
  50. package/components/peculiar-crl-viewer.d.ts +11 -0
  51. package/components/peculiar-crl-viewer.js +11 -0
  52. package/components/peculiar-crl-viewer.js.map +1 -0
  53. package/components/peculiar-csr-viewer.d.ts +11 -0
  54. package/components/peculiar-csr-viewer.js +11 -0
  55. package/components/peculiar-csr-viewer.js.map +1 -0
  56. package/components/peculiar-highlight-words.d.ts +11 -0
  57. package/components/peculiar-highlight-words.js +11 -0
  58. package/components/peculiar-highlight-words.js.map +1 -0
  59. package/components/peculiar-text-hider.d.ts +11 -0
  60. package/components/peculiar-text-hider.js +42 -0
  61. package/components/peculiar-text-hider.js.map +1 -0
  62. package/components/subject_name.js +71 -0
  63. package/components/subject_name.js.map +1 -0
  64. package/dist/cjs/arrow_top-834fb7ec.js +37 -0
  65. package/dist/cjs/arrow_top-834fb7ec.js.map +1 -0
  66. package/dist/cjs/button-14e2b73f.js +77 -0
  67. package/dist/cjs/button-14e2b73f.js.map +1 -0
  68. package/dist/cjs/{certification_request-d5c6e32d.js → certification_request-c0cafa72.js} +236 -71
  69. package/dist/cjs/certification_request-c0cafa72.js.map +1 -0
  70. package/dist/cjs/{crl-5bce64c4.js → crl-b4322166.js} +8 -7
  71. package/dist/cjs/crl-b4322166.js.map +1 -0
  72. package/dist/cjs/download-254ddc57.js +23 -0
  73. package/dist/cjs/download-254ddc57.js.map +1 -0
  74. package/dist/cjs/{download-93f7b773.js → download-972dda8a.js} +2 -0
  75. package/dist/cjs/download-972dda8a.js.map +1 -0
  76. package/dist/cjs/index-efd561e9.js +2477 -0
  77. package/dist/cjs/index-efd561e9.js.map +1 -0
  78. package/dist/cjs/index.cjs.js +3 -1
  79. package/dist/cjs/index.cjs.js.map +1 -0
  80. package/dist/cjs/loader.cjs.js +6 -12
  81. package/dist/cjs/loader.cjs.js.map +1 -0
  82. package/dist/cjs/{miscellaneous-cac1cd8b.js → miscellaneous-806a04a5.js} +86 -70
  83. package/dist/cjs/miscellaneous-806a04a5.js.map +1 -0
  84. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +92 -35
  85. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -0
  86. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +110 -0
  87. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -0
  88. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +30 -19
  89. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -0
  90. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +34 -11
  91. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -0
  92. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +183 -85
  93. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -0
  94. package/dist/cjs/peculiar-text-hider.cjs.entry.js +7 -13
  95. package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -0
  96. package/dist/cjs/peculiar.cjs.js +10 -57
  97. package/dist/cjs/peculiar.cjs.js.map +1 -0
  98. package/dist/cjs/{x509_certificate-3760e0a8.js → x509_certificate-989b1435.js} +5 -4
  99. package/dist/cjs/x509_certificate-989b1435.js.map +1 -0
  100. package/dist/collection/collection-manifest.json +12 -16
  101. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +189 -145
  102. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -0
  103. package/dist/collection/components/button/button.js +14 -126
  104. package/dist/collection/components/button/button.js.map +1 -0
  105. package/dist/collection/components/button/index.js +5 -0
  106. package/dist/collection/components/button/index.js.map +1 -0
  107. package/dist/collection/components/button-menu/button-menu.css +46 -0
  108. package/dist/collection/components/button-menu/button-menu.js +78 -0
  109. package/dist/collection/components/button-menu/button-menu.js.map +1 -0
  110. package/dist/collection/components/certificate-decoder/certificate-decoder.css +456 -44
  111. package/dist/collection/components/certificate-decoder/certificate-decoder.js +109 -101
  112. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -0
  113. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +6 -11
  114. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -0
  115. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +5 -5
  116. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -0
  117. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +5 -6
  118. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -0
  119. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +5 -5
  120. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -0
  121. package/dist/collection/components/certificate-details-parts/attributes/index.js +16 -15
  122. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -0
  123. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +5 -5
  124. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -0
  125. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +5 -5
  126. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -0
  127. package/dist/collection/components/certificate-details-parts/attributes/name_part.js +4 -3
  128. package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -0
  129. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +5 -4
  130. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -0
  131. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +5 -5
  132. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -0
  133. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +5 -5
  134. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -0
  135. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +6 -13
  136. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -0
  137. package/dist/collection/components/certificate-details-parts/basic_information.js +4 -3
  138. package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -0
  139. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +5 -5
  140. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -0
  141. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +5 -5
  142. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -0
  143. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +2 -1
  144. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -0
  145. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +10 -15
  146. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -0
  147. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +6 -7
  148. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -0
  149. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +5 -6
  150. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -0
  151. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +8 -12
  152. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -0
  153. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +5 -6
  154. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -0
  155. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +26 -27
  156. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -0
  157. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +5 -7
  158. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -0
  159. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +8 -13
  160. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -0
  161. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +4 -3
  162. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -0
  163. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +6 -6
  164. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -0
  165. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +5 -5
  166. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -0
  167. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +5 -5
  168. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -0
  169. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +5 -6
  170. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -0
  171. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +7 -7
  172. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -0
  173. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +7 -6
  174. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -0
  175. package/dist/collection/components/certificate-details-parts/extensions/index.js +46 -45
  176. package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -0
  177. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +8 -9
  178. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -0
  179. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +7 -11
  180. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -0
  181. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +5 -5
  182. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -0
  183. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +5 -5
  184. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -0
  185. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +5 -5
  186. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -0
  187. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +8 -11
  188. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -0
  189. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +4 -3
  190. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -0
  191. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +5 -5
  192. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -0
  193. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +5 -5
  194. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -0
  195. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +6 -7
  196. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -0
  197. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +5 -4
  198. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -0
  199. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +6 -7
  200. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -0
  201. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +13 -16
  202. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -0
  203. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +4 -3
  204. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -0
  205. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +8 -9
  206. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -0
  207. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +10 -15
  208. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -0
  209. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +7 -9
  210. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -0
  211. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +4 -3
  212. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -0
  213. package/dist/collection/components/certificate-details-parts/holder.js +8 -11
  214. package/dist/collection/components/certificate-details-parts/holder.js.map +1 -0
  215. package/dist/collection/components/certificate-details-parts/index.js +1 -0
  216. package/dist/collection/components/certificate-details-parts/index.js.map +1 -0
  217. package/dist/collection/components/certificate-details-parts/issuer.js +5 -4
  218. package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -0
  219. package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -4
  220. package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -0
  221. package/dist/collection/components/certificate-details-parts/miscellaneous.js +8 -13
  222. package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -0
  223. package/dist/collection/components/certificate-details-parts/public_key.js +8 -7
  224. package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -0
  225. package/dist/collection/components/certificate-details-parts/revoked_certificates.js +9 -11
  226. package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -0
  227. package/dist/collection/components/certificate-details-parts/row.js +13 -18
  228. package/dist/collection/components/certificate-details-parts/row.js.map +1 -0
  229. package/dist/collection/components/certificate-details-parts/signature.js +5 -4
  230. package/dist/collection/components/certificate-details-parts/signature.js.map +1 -0
  231. package/dist/collection/components/certificate-details-parts/subject_name.js +4 -3
  232. package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -0
  233. package/dist/collection/components/certificate-details-parts/thumbprints.js +4 -3
  234. package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -0
  235. package/dist/collection/components/certificate-summary/certificate-summary.js +9 -77
  236. package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -0
  237. package/dist/collection/components/certificate-summary/index.js +5 -0
  238. package/dist/collection/components/certificate-summary/index.js.map +1 -0
  239. package/dist/collection/components/certificate-viewer/certificate-viewer.css +471 -104
  240. package/dist/collection/components/certificate-viewer/certificate-viewer.js +206 -178
  241. package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -0
  242. package/dist/collection/components/certificates-viewer/certificates-viewer.css +540 -267
  243. package/dist/collection/components/certificates-viewer/certificates-viewer.js +261 -266
  244. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -0
  245. package/dist/collection/components/circular-progress/circular-progress.css +2 -11
  246. package/dist/collection/components/circular-progress/circular-progress.js +60 -63
  247. package/dist/collection/components/circular-progress/circular-progress.js.map +1 -0
  248. package/dist/collection/components/crl-viewer/crl-viewer.js +166 -139
  249. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -0
  250. package/dist/collection/components/csr-viewer/csr-viewer.js +149 -124
  251. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -0
  252. package/dist/collection/components/highlight-words/highlight-words.css +1 -9
  253. package/dist/collection/components/highlight-words/highlight-words.js +35 -28
  254. package/dist/collection/components/highlight-words/highlight-words.js.map +1 -0
  255. package/dist/collection/components/icons/actions.js +16 -0
  256. package/dist/collection/components/icons/actions.js.map +1 -0
  257. package/dist/collection/components/icons/arrow_bottom.js +16 -0
  258. package/dist/collection/components/icons/arrow_bottom.js.map +1 -0
  259. package/dist/collection/components/icons/arrow_top.js +16 -0
  260. package/dist/collection/components/icons/arrow_top.js.map +1 -0
  261. package/dist/collection/components/icons/cross.js +16 -0
  262. package/dist/collection/components/icons/cross.js.map +1 -0
  263. package/dist/collection/components/icons/details.js +16 -0
  264. package/dist/collection/components/icons/details.js.map +1 -0
  265. package/dist/collection/components/icons/download.js +16 -0
  266. package/dist/collection/components/icons/download.js.map +1 -0
  267. package/dist/collection/components/icons/index.js +11 -0
  268. package/dist/collection/components/icons/index.js.map +1 -0
  269. package/dist/collection/components/icons/link.js +16 -0
  270. package/dist/collection/components/icons/link.js.map +1 -0
  271. package/dist/collection/components/link/index.js +5 -0
  272. package/dist/collection/components/link/index.js.map +1 -0
  273. package/dist/collection/components/link/link.js +9 -61
  274. package/dist/collection/components/link/link.js.map +1 -0
  275. package/dist/collection/components/text-hider/text-hider.css +9 -36
  276. package/dist/collection/components/text-hider/text-hider.js +21 -68
  277. package/dist/collection/components/text-hider/text-hider.js.map +1 -0
  278. package/dist/collection/components/typography/index.js +5 -0
  279. package/dist/collection/components/typography/index.js.map +1 -0
  280. package/dist/collection/components/typography/typography.js +39 -126
  281. package/dist/collection/components/typography/typography.js.map +1 -0
  282. package/dist/collection/constants/logs.js +1 -0
  283. package/dist/collection/constants/logs.js.map +1 -0
  284. package/dist/collection/constants/oids.js +1 -0
  285. package/dist/collection/constants/oids.js.map +1 -0
  286. package/dist/collection/crypto/asn_data.js +13 -7
  287. package/dist/collection/crypto/asn_data.js.map +1 -0
  288. package/dist/collection/crypto/attribute.js +11 -10
  289. package/dist/collection/crypto/attribute.js.map +1 -0
  290. package/dist/collection/crypto/crl.js +9 -8
  291. package/dist/collection/crypto/crl.js.map +1 -0
  292. package/dist/collection/crypto/csr.js +11 -10
  293. package/dist/collection/crypto/csr.js.map +1 -0
  294. package/dist/collection/crypto/extension.js +16 -15
  295. package/dist/collection/crypto/extension.js.map +1 -0
  296. package/dist/collection/crypto/index.js +1 -0
  297. package/dist/collection/crypto/index.js.map +1 -0
  298. package/dist/collection/crypto/name.js +15 -9
  299. package/dist/collection/crypto/name.js.map +1 -0
  300. package/dist/collection/crypto/provider.js +4 -3
  301. package/dist/collection/crypto/provider.js.map +1 -0
  302. package/dist/collection/crypto/utils.js +4 -3
  303. package/dist/collection/crypto/utils.js.map +1 -0
  304. package/dist/collection/crypto/x509_attribute_certificate.js +9 -8
  305. package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -0
  306. package/dist/collection/crypto/x509_certificate.js +12 -11
  307. package/dist/collection/crypto/x509_certificate.js.map +1 -0
  308. package/dist/collection/index.js +1 -0
  309. package/dist/collection/index.js.map +1 -0
  310. package/dist/collection/locales/en.json +4 -3
  311. package/dist/collection/utils/date_formatter.js +3 -2
  312. package/dist/collection/utils/date_formatter.js.map +1 -0
  313. package/dist/collection/utils/download.js +3 -2
  314. package/dist/collection/utils/download.js.map +1 -0
  315. package/dist/collection/utils/download_from_buffer.js +1 -0
  316. package/dist/collection/utils/download_from_buffer.js.map +1 -0
  317. package/dist/collection/utils/get_string_by_oid.js +2 -1
  318. package/dist/collection/utils/get_string_by_oid.js.map +1 -0
  319. package/dist/collection/utils/index.js +2 -1
  320. package/dist/collection/utils/index.js.map +1 -0
  321. package/dist/collection/utils/is_link.js +1 -0
  322. package/dist/collection/utils/is_link.js.map +1 -0
  323. package/dist/collection/utils/l10n.js +2 -1
  324. package/dist/collection/utils/l10n.js.map +1 -0
  325. package/dist/collection/utils/read_file.js +1 -0
  326. package/dist/collection/utils/read_file.js.map +1 -0
  327. package/dist/collection/utils/third_party_links.js +1 -0
  328. package/dist/collection/utils/third_party_links.js.map +1 -0
  329. package/dist/collection/utils/validator.js +1 -0
  330. package/dist/collection/utils/validator.js.map +1 -0
  331. package/dist/collection/www-copy/index.js +138 -32
  332. package/dist/esm/arrow_top-efd3a56d.js +34 -0
  333. package/dist/esm/arrow_top-efd3a56d.js.map +1 -0
  334. package/dist/esm/button-35146bdd.js +74 -0
  335. package/dist/esm/button-35146bdd.js.map +1 -0
  336. package/dist/esm/{certification_request-23cd5124.js → certification_request-5cadde9f.js} +171 -9
  337. package/dist/esm/certification_request-5cadde9f.js.map +1 -0
  338. package/dist/esm/{crl-7f23c111.js → crl-11670c3e.js} +7 -6
  339. package/dist/esm/crl-11670c3e.js.map +1 -0
  340. package/dist/esm/download-0cc3077a.js +21 -0
  341. package/dist/esm/download-0cc3077a.js.map +1 -0
  342. package/dist/esm/download-57c5bf8f.js +470 -0
  343. package/dist/esm/download-57c5bf8f.js.map +1 -0
  344. package/dist/esm/index-4079bbb5.js +2448 -0
  345. package/dist/esm/index-4079bbb5.js.map +1 -0
  346. package/dist/esm/index.js +3 -1
  347. package/dist/esm/index.js.map +1 -0
  348. package/dist/esm/loader.js +6 -12
  349. package/dist/esm/loader.js.map +1 -0
  350. package/dist/esm/{miscellaneous-c7c0d04a.js → miscellaneous-1d4e8b41.js} +53 -37
  351. package/dist/esm/miscellaneous-1d4e8b41.js.map +1 -0
  352. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +80 -23
  353. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
  354. package/dist/esm/peculiar-button-menu_3.entry.js +104 -0
  355. package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -0
  356. package/dist/esm/peculiar-certificate-decoder.entry.js +30 -19
  357. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -0
  358. package/dist/esm/peculiar-certificate-viewer.entry.js +34 -11
  359. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -0
  360. package/dist/esm/peculiar-certificates-viewer.entry.js +183 -85
  361. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -0
  362. package/dist/esm/peculiar-text-hider.entry.js +7 -13
  363. package/dist/esm/peculiar-text-hider.entry.js.map +1 -0
  364. package/dist/esm/peculiar.js +8 -58
  365. package/dist/esm/peculiar.js.map +1 -0
  366. package/dist/esm/{x509_certificate-d8e0af2d.js → x509_certificate-dfae6999.js} +4 -3
  367. package/dist/esm/x509_certificate-dfae6999.js.map +1 -0
  368. package/dist/esm-es5/arrow_top-efd3a56d.js +19 -0
  369. package/dist/esm-es5/arrow_top-efd3a56d.js.map +1 -0
  370. package/dist/esm-es5/button-35146bdd.js +19 -0
  371. package/dist/esm-es5/button-35146bdd.js.map +1 -0
  372. package/dist/esm-es5/certification_request-5cadde9f.js +97 -0
  373. package/dist/esm-es5/certification_request-5cadde9f.js.map +1 -0
  374. package/dist/esm-es5/crl-11670c3e.js +33 -0
  375. package/dist/esm-es5/crl-11670c3e.js.map +1 -0
  376. package/dist/esm-es5/download-0cc3077a.js +12 -0
  377. package/dist/esm-es5/download-0cc3077a.js.map +1 -0
  378. package/dist/esm-es5/download-57c5bf8f.js +19 -0
  379. package/dist/esm-es5/download-57c5bf8f.js.map +1 -0
  380. package/dist/esm-es5/index-4079bbb5.js +6 -0
  381. package/dist/esm-es5/index-4079bbb5.js.map +1 -0
  382. package/dist/esm-es5/index.js +5 -0
  383. package/dist/esm-es5/index.js.map +1 -0
  384. package/dist/esm-es5/loader.js +5 -0
  385. package/dist/esm-es5/loader.js.map +1 -0
  386. package/dist/esm-es5/miscellaneous-1d4e8b41.js +355 -0
  387. package/dist/esm-es5/miscellaneous-1d4e8b41.js.map +1 -0
  388. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +110 -0
  389. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
  390. package/dist/esm-es5/peculiar-button-menu_3.entry.js +12 -0
  391. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -0
  392. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +12 -0
  393. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -0
  394. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +5 -0
  395. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -0
  396. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +33 -0
  397. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -0
  398. package/dist/esm-es5/peculiar-text-hider.entry.js +5 -0
  399. package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -0
  400. package/dist/esm-es5/peculiar.js +5 -0
  401. package/dist/esm-es5/peculiar.js.map +1 -0
  402. package/dist/esm-es5/x509_certificate-dfae6999.js +12 -0
  403. package/dist/esm-es5/x509_certificate-dfae6999.js.map +1 -0
  404. package/dist/index.js +1 -1
  405. package/dist/peculiar/index.esm.js +2 -1
  406. package/dist/peculiar/index.esm.js.map +1 -0
  407. package/dist/peculiar/locales/en.json +4 -3
  408. package/dist/peculiar/p-0b356bb5.js +6 -0
  409. package/dist/peculiar/p-0b356bb5.js.map +1 -0
  410. package/dist/peculiar/p-0bdcdbf7.system.js +355 -0
  411. package/dist/peculiar/p-0bdcdbf7.system.js.map +1 -0
  412. package/dist/peculiar/p-17e3c47b.js +12 -0
  413. package/dist/peculiar/p-17e3c47b.js.map +1 -0
  414. package/dist/peculiar/p-23555789.system.entry.js +34 -0
  415. package/dist/peculiar/p-23555789.system.entry.js.map +1 -0
  416. package/dist/peculiar/p-2fcad8cb.system.js +20 -0
  417. package/dist/peculiar/p-2fcad8cb.system.js.map +1 -0
  418. package/dist/peculiar/p-31586b23.system.js +13 -0
  419. package/dist/peculiar/p-31586b23.system.js.map +1 -0
  420. package/dist/peculiar/p-3788176f.system.entry.js +111 -0
  421. package/dist/peculiar/p-3788176f.system.entry.js.map +1 -0
  422. package/dist/peculiar/p-43eb3721.js +33 -0
  423. package/dist/peculiar/p-43eb3721.js.map +1 -0
  424. package/dist/peculiar/p-4562ae8b.system.entry.js +5 -0
  425. package/dist/peculiar/p-4562ae8b.system.entry.js.map +1 -0
  426. package/dist/peculiar/p-5823e6e8.entry.js +12 -0
  427. package/dist/peculiar/p-5823e6e8.entry.js.map +1 -0
  428. package/dist/peculiar/p-596836a7.entry.js +33 -0
  429. package/dist/peculiar/p-596836a7.entry.js.map +1 -0
  430. package/dist/peculiar/p-5aabeba7.system.js +6 -0
  431. package/dist/peculiar/p-5aabeba7.system.js.map +1 -0
  432. package/dist/peculiar/p-6667fe6e.system.js +34 -0
  433. package/dist/peculiar/p-6667fe6e.system.js.map +1 -0
  434. package/dist/peculiar/p-6e79b9c8.js +12 -0
  435. package/dist/peculiar/p-6e79b9c8.js.map +1 -0
  436. package/dist/peculiar/p-709994c1.js +19 -0
  437. package/dist/peculiar/p-709994c1.js.map +1 -0
  438. package/dist/peculiar/p-7215de9c.entry.js +5 -0
  439. package/dist/peculiar/p-7215de9c.entry.js.map +1 -0
  440. package/dist/peculiar/p-74c241e7.js +97 -0
  441. package/dist/peculiar/p-74c241e7.js.map +1 -0
  442. package/dist/peculiar/p-79d470a8.entry.js +110 -0
  443. package/dist/peculiar/p-79d470a8.entry.js.map +1 -0
  444. package/dist/peculiar/p-7f9beaa8.js +19 -0
  445. package/dist/peculiar/p-7f9beaa8.js.map +1 -0
  446. package/dist/peculiar/p-80832207.system.js +5 -0
  447. package/dist/peculiar/p-80832207.system.js.map +1 -0
  448. package/dist/peculiar/p-8748391f.system.entry.js +5 -0
  449. package/dist/peculiar/p-8748391f.system.entry.js.map +1 -0
  450. package/dist/peculiar/p-882e1281.entry.js +12 -0
  451. package/dist/peculiar/p-882e1281.entry.js.map +1 -0
  452. package/dist/peculiar/p-90459cec.entry.js +5 -0
  453. package/dist/peculiar/p-90459cec.entry.js.map +1 -0
  454. package/dist/peculiar/p-97688065.js +355 -0
  455. package/dist/peculiar/p-97688065.js.map +1 -0
  456. package/dist/peculiar/p-a053c132.js +19 -0
  457. package/dist/peculiar/p-a053c132.js.map +1 -0
  458. package/dist/peculiar/p-ae9189f6.system.js +19 -0
  459. package/dist/peculiar/p-ae9189f6.system.js.map +1 -0
  460. package/dist/peculiar/p-bd485115.system.entry.js +13 -0
  461. package/dist/peculiar/p-bd485115.system.entry.js.map +1 -0
  462. package/dist/peculiar/p-c0a298fd.system.js +97 -0
  463. package/dist/peculiar/p-c0a298fd.system.js.map +1 -0
  464. package/dist/peculiar/p-daf23673.system.js +20 -0
  465. package/dist/peculiar/p-daf23673.system.js.map +1 -0
  466. package/dist/peculiar/p-e1960173.system.js +5 -0
  467. package/dist/peculiar/p-e1960173.system.js.map +1 -0
  468. package/dist/peculiar/p-e39de121.system.entry.js +13 -0
  469. package/dist/peculiar/p-e39de121.system.entry.js.map +1 -0
  470. package/dist/peculiar/p-e6a3b4d4.system.js +13 -0
  471. package/dist/peculiar/p-e6a3b4d4.system.js.map +1 -0
  472. package/dist/peculiar/peculiar.css +1 -1
  473. package/dist/peculiar/peculiar.esm.js +2 -1
  474. package/dist/peculiar/peculiar.esm.js.map +1 -0
  475. package/dist/peculiar/peculiar.js +127 -0
  476. package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +15 -3
  477. package/dist/types/components/button/button.d.ts +5 -16
  478. package/dist/types/components/button/index.d.ts +2 -0
  479. package/dist/types/components/button-menu/button-menu.d.ts +21 -0
  480. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +9 -6
  481. package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
  482. package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -3
  483. package/dist/types/components/certificate-summary/index.d.ts +1 -0
  484. package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +13 -5
  485. package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +22 -11
  486. package/dist/types/components/crl-viewer/crl-viewer.d.ts +13 -5
  487. package/dist/types/components/csr-viewer/csr-viewer.d.ts +13 -5
  488. package/dist/types/components/icons/actions.d.ts +12 -0
  489. package/dist/types/components/icons/arrow_bottom.d.ts +12 -0
  490. package/dist/types/components/icons/arrow_top.d.ts +12 -0
  491. package/dist/types/components/icons/cross.d.ts +12 -0
  492. package/dist/types/components/icons/details.d.ts +12 -0
  493. package/dist/types/components/icons/download.d.ts +12 -0
  494. package/dist/types/components/icons/index.d.ts +7 -0
  495. package/dist/types/components/icons/link.d.ts +12 -0
  496. package/dist/types/components/link/index.d.ts +1 -0
  497. package/dist/types/components/link/link.d.ts +6 -6
  498. package/dist/types/components/text-hider/text-hider.d.ts +0 -3
  499. package/dist/types/components/typography/index.d.ts +1 -0
  500. package/dist/types/components/typography/typography.d.ts +10 -20
  501. package/dist/types/components.d.ts +74 -175
  502. package/dist/types/crypto/attribute.d.ts +1 -1
  503. package/dist/types/crypto/extension.d.ts +1 -1
  504. package/dist/types/interface.d.ts +98 -6
  505. package/dist/types/stencil-public-runtime.d.ts +110 -23
  506. package/dist/types/utils/l10n.d.ts +5 -4
  507. package/dist/types/utils/read_file.d.ts +1 -1
  508. package/hydrate/index.d.ts +218 -0
  509. package/hydrate/index.js +22549 -0
  510. package/hydrate/package.json +6 -0
  511. package/loader/index.d.ts +10 -1
  512. package/loader/index.js +1 -1
  513. package/loader/package.json +1 -0
  514. package/package.json +6 -4
  515. package/dist/cjs/dom-f57e260e.js +0 -78
  516. package/dist/cjs/index-064e95c7.js +0 -1441
  517. package/dist/cjs/l10n-ddc7cff9.js +0 -169
  518. package/dist/cjs/peculiar-button-split_4.cjs.entry.js +0 -128
  519. package/dist/cjs/peculiar-button.cjs.entry.js +0 -40
  520. package/dist/cjs/peculiar-link.cjs.entry.js +0 -29
  521. package/dist/cjs/peculiar-typography.cjs.entry.js +0 -38
  522. package/dist/collection/components/button/button.css +0 -81
  523. package/dist/collection/components/button-split/button-split.css +0 -57
  524. package/dist/collection/components/button-split/button-split.js +0 -116
  525. package/dist/collection/components/certificate-summary/certificate-summary.css +0 -49
  526. package/dist/collection/components/link/link.css +0 -59
  527. package/dist/collection/components/typography/typography.css +0 -95
  528. package/dist/esm/dom-f1b08a97.js +0 -76
  529. package/dist/esm/index-bbd484d9.js +0 -1410
  530. package/dist/esm/l10n-d48f35ff.js +0 -165
  531. package/dist/esm/peculiar-button-split_4.entry.js +0 -121
  532. package/dist/esm/peculiar-button.entry.js +0 -36
  533. package/dist/esm/peculiar-link.entry.js +0 -25
  534. package/dist/esm/peculiar-typography.entry.js +0 -34
  535. package/dist/esm/polyfills/css-shim.js +0 -1
  536. package/dist/peculiar/p-01cea5c0.entry.js +0 -11
  537. package/dist/peculiar/p-3bfefa4a.entry.js +0 -18
  538. package/dist/peculiar/p-4e8169cb.entry.js +0 -4
  539. package/dist/peculiar/p-57b89412.entry.js +0 -4
  540. package/dist/peculiar/p-5b4eed12.entry.js +0 -4
  541. package/dist/peculiar/p-610b85e3.entry.js +0 -4
  542. package/dist/peculiar/p-6d37c8b5.entry.js +0 -4
  543. package/dist/peculiar/p-711b4e1e.js +0 -18
  544. package/dist/peculiar/p-81a88a33.js +0 -11
  545. package/dist/peculiar/p-918aeee4.entry.js +0 -4
  546. package/dist/peculiar/p-9f4ee110.js +0 -22
  547. package/dist/peculiar/p-a050e184.js +0 -69
  548. package/dist/peculiar/p-c24c26c2.js +0 -32
  549. package/dist/peculiar/p-df53fbcc.entry.js +0 -4
  550. package/dist/peculiar/p-ec250cc4.js +0 -12
  551. package/dist/peculiar/p-f7683ba5.js +0 -5
  552. package/dist/peculiar/p-fe05f51e.js +0 -79
  553. package/dist/types/components/button-split/button-split.d.ts +0 -21
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__extends","Attribute","_super","raw","_this","call","this","AsnAttribute","asnExtnValue","getAsnExtnValue","asn","type","id_DomainNameBeneficiary","value","AsnParser","parse","DomainNameBeneficiary","id_DomainNameLegalRepresentative","DomainNameLegalRepresentative","id_DomainNameOwner","DomainNameOwner","id_DomainNameTechnicalOperator","DomainNameTechnicalOperator","id_TypeRelationship","TypeRelationship","id_ActivityDescription","ActivityDescription","id_WebGDPR","WebGDPR","id_InsuranceValue","InsuranceValue","id_ValuationRanking","ValuationRanking","id_pkcs9_at_challengePassword","ChallengePassword","id_pkcs9_at_unstructuredName","UnstructuredName","id_pkcs9_at_extensionRequest","extensionRequest","ExtensionRequest","map","e","Extension","AsnConvert","serialize","Convert","ToHex","prototype","values","AsnData","X509AttributeCertificate","certificateRawToBuffer","AttributeCertificate","thumbprints","acinfo","serialNumber","version","notBefore","attrCertValidityPeriod","notBeforeTime","Error","notAfter","notAfterTime","validity","dateDiff","issuer","v1Form","_a","v2Form","issuerName","holder","Object","defineProperty","_b","signatureValue","signatureAlgorithm","algorithm","parseExtensions","extensions","parseAttributes","attributes","getThumbprint","getCertificateThumbprint","thumbprint","sent","console","error","error_1","exportAsBase64","ToBase64","exportAsHexFormatted","hexFormat","exportAsPemFormatted","concat","base64Format","downloadAsPEM","name","Download","attrCert","asPEM","commonName","downloadAsDER","asDER","CSR","CertificationRequest","certificationRequestInfo","subject","Name","toJSON","subjectPKInfo","subjectPublicKey","params","id_ecPublicKey","parameters","ECParameters","id_rsaEncryption","RSAPublicKey","spki","signature","i","length","shortName","error_2","csr","CRL","CertificateList","tbsCertList","lastUpdate","thisUpdate","getTime","nextUpdate","revokedCertificates","revokedCertificate","revocationDate","userCertificate","crlEntryExtensions","error_3","crlExtensions","crl"],"sources":["src/crypto/attribute.ts","src/crypto/x509_attribute_certificate.ts","src/crypto/csr.ts","src/crypto/crl.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser, AsnConvert } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\n\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\n\nexport type TAttributeValue = DomainNameBeneficiary\n| DomainNameLegalRepresentative\n| DomainNameOwner\n| DomainNameTechnicalOperator\n| TypeRelationship\n| ActivityDescription\n| WebGDPR\n| InsuranceValue\n| ValuationRanking\n| Extension<TExtensionValue>[]\n| ChallengePassword\n| UnstructuredName\n| string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n switch (this.asn.type) {\n case id_DomainNameBeneficiary:\n this.value = AsnParser.parse(asnExtnValue, DomainNameBeneficiary) as T;\n break;\n case id_DomainNameLegalRepresentative:\n this.value = AsnParser.parse(asnExtnValue, DomainNameLegalRepresentative) as T;\n break;\n case id_DomainNameOwner:\n this.value = AsnParser.parse(asnExtnValue, DomainNameOwner) as T;\n break;\n case id_DomainNameTechnicalOperator:\n this.value = AsnParser.parse(asnExtnValue, DomainNameTechnicalOperator) as T;\n break;\n case id_TypeRelationship:\n this.value = AsnParser.parse(asnExtnValue, TypeRelationship) as T;\n break;\n case id_ActivityDescription:\n this.value = AsnParser.parse(asnExtnValue, ActivityDescription) as T;\n break;\n case id_WebGDPR:\n this.value = AsnParser.parse(asnExtnValue, WebGDPR) as T;\n break;\n case id_InsuranceValue:\n this.value = AsnParser.parse(asnExtnValue, InsuranceValue) as T;\n break;\n case id_ValuationRanking:\n this.value = AsnParser.parse(asnExtnValue, ValuationRanking) as T;\n break;\n case id_pkcs9_at_challengePassword:\n this.value = AsnParser.parse(asnExtnValue, ChallengePassword) as T;\n break;\n case id_pkcs9_at_unstructuredName:\n this.value = AsnParser.parse(asnExtnValue, UnstructuredName) as T;\n break;\n case id_pkcs9_at_extensionRequest: {\n const extensionRequest = AsnParser.parse(asnExtnValue, ExtensionRequest);\n\n this.value = extensionRequest\n .map((e) => new Extension(AsnConvert.serialize(e))) as T;\n break;\n }\n default:\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport type { GeneralName } from '@peculiar/asn1-x509';\nimport { AttributeCertificate, Holder } from '@peculiar/asn1-x509-attr';\nimport { Convert } from 'pvtsutils';\n\nimport { dateDiff, Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Extension, TExtensionValue } from './extension';\nimport { Attribute, TAttributeValue } from './attribute';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport class X509AttributeCertificate extends AsnData<AttributeCertificate> {\n public readonly serialNumber: string;\n\n public readonly version: number;\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly issuer: GeneralName[];\n\n public holder: Holder;\n\n public type: string = 'X.509 Attribute Certificate';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), AttributeCertificate);\n\n const { acinfo } = this.asn;\n\n this.serialNumber = Convert.ToHex(acinfo.serialNumber);\n this.version = acinfo.version;\n\n const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;\n\n if (!notBefore) {\n throw new Error(\"Cannot get 'notBefore' value\");\n }\n\n this.notBefore = notBefore;\n\n const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;\n\n if (!notAfter) {\n throw new Error(\"Cannot get 'notAfter' value\");\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n this.issuer = acinfo.issuer.v1Form || acinfo.issuer.v2Form?.issuerName;\n this.holder = acinfo.holder;\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n\n return {\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public parseExtensions() {\n const { acinfo } = this.asn;\n\n if (acinfo.extensions) {\n this.extensions = acinfo.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public parseAttributes() {\n const { acinfo } = this.asn;\n\n if (acinfo.attributes) {\n this.attributes = acinfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN ATTRIBUTE CERTIFICATE-----\\n${base64Format(this.exportAsBase64())}\\n-----END ATTRIBUTE CERTIFICATE-----`;\n }\n\n public get commonName(): string {\n return `attribute-certificate-${this.thumbprints['SHA-1']}`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.attrCert.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.attrCert.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class CSR extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'PKCS#10 Certificate Request';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN CERTIFICATE REQUEST-----\\n${base64Format(this.exportAsBase64())}\\n-----END CERTIFICATE REQUEST-----`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { CertificateList, Time } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport interface IRevokedCertificate {\n userCertificate: ArrayBuffer;\n revocationDate: Time;\n crlEntryExtensions?: Extension<TExtensionValue>[];\n}\n\nexport class CRL extends AsnData<CertificateList> {\n public readonly issuer: INameJSON[];\n\n public readonly version: number;\n\n public readonly lastUpdate: Date;\n\n public readonly nextUpdate: Date;\n\n public extensions: Extension<TExtensionValue>[];\n\n public revokedCertificates: IRevokedCertificate[];\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'X.509 Certificate Revocation List';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificateList);\n\n const { tbsCertList } = this.asn;\n\n this.issuer = new Name(tbsCertList.issuer).toJSON();\n this.version = tbsCertList.version + 1;\n this.lastUpdate = tbsCertList.thisUpdate.getTime();\n this.nextUpdate = tbsCertList.nextUpdate.getTime();\n\n this.revokedCertificates = (tbsCertList.revokedCertificates || [])\n .map((revokedCertificate) => ({\n revocationDate: revokedCertificate.revocationDate,\n userCertificate: revokedCertificate.userCertificate,\n crlEntryExtensions: revokedCertificate.crlEntryExtensions\n ?.map((e) => new Extension(AsnConvert.serialize(e))),\n }));\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public parseExtensions() {\n const { tbsCertList } = this.asn;\n\n if (tbsCertList.crlExtensions) {\n this.extensions = tbsCertList.crlExtensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN X509 CRL-----\\n${base64Format(this.exportAsBase64())}\\n-----END X509 CRL-----`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.crl.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.crl.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;kBAmE0DA,UAAAC,EAAAC,GAOxD,SAAAD,EAAYE,GAAZ,IAAAC,EACEF,EAAAG,KAAAC,KAAMH,EAAKI,IAAaD,KAExB,IAAME,EAAeJ,EAAKK,kBAE1B,OAAQL,EAAKM,IAAIC,MACf,KAAKC,EACHR,EAAKS,MAAQC,EAAUC,MAAMP,EAAcQ,GAC3C,MACF,KAAKC,EACHb,EAAKS,MAAQC,EAAUC,MAAMP,EAAcU,GAC3C,MACF,KAAKC,EACHf,EAAKS,MAAQC,EAAUC,MAAMP,EAAcY,GAC3C,MACF,KAAKC,EACHjB,EAAKS,MAAQC,EAAUC,MAAMP,EAAcc,GAC3C,MACF,KAAKC,EACHnB,EAAKS,MAAQC,EAAUC,MAAMP,EAAcgB,GAC3C,MACF,KAAKC,EACHrB,EAAKS,MAAQC,EAAUC,MAAMP,EAAckB,GAC3C,MACF,KAAKC,EACHvB,EAAKS,MAAQC,EAAUC,MAAMP,EAAcoB,GAC3C,MACF,KAAKC,EACHzB,EAAKS,MAAQC,EAAUC,MAAMP,EAAcsB,GAC3C,MACF,KAAKC,EACH3B,EAAKS,MAAQC,EAAUC,MAAMP,EAAcwB,GAC3C,MACF,KAAKC,EACH7B,EAAKS,MAAQC,EAAUC,MAAMP,EAAc0B,GAC3C,MACF,KAAKC,EACH/B,EAAKS,MAAQC,EAAUC,MAAMP,EAAc4B,GAC3C,MACF,KAAKC,EAA8B,CACjC,IAAMC,EAAmBxB,EAAUC,MAAMP,EAAc+B,GAEvDnC,EAAKS,MAAQyB,EACVE,KAAI,SAACC,GAAM,WAAIC,EAAU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,eAAA,WACL,OAAO3C,UAAQ4C,SAASnF,KAAKH,I,EAGxByH,EAAA7E,UAAA2C,qBAAA,WACL,OAAOC,EAAU9C,UAAQC,MAAMxC,KAAKH,K,EAG/ByH,EAAA7E,UAAA6C,qBAAA,WACL,MAAO,6BAAAC,OAA6BC,EAAaxF,KAAKkF,kBAAiB,2B,EAGlEoC,EAAA7E,UAAAgD,cAAA,SAAcC,GACnBC,EAASyC,IAAIvC,MACX7F,KAAKsF,uBACLI,GAAQ1F,KAAK8F,W,EAIVwB,EAAA7E,UAAAsD,cAAA,SAAcL,GACnBC,EAASyC,IAAIpC,MACXhG,KAAKoF,uBACLM,GAAQ1F,KAAK8F,W,YA1GMnD,G"}
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{A as t,e as s,C as r,N as e,f as i,E as n,g as a,h as o,j as h,k as u,R as c,l as f,m as l,n as m,o as g,p,q as E,r as C,s as b}from"./p-74c241e7.js";import{b as A,D as w}from"./p-a053c132.js";
5
+ /**
6
+ * @license
7
+ * Copyright (c) Peculiar Ventures, LLC.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */class N extends t{constructor(t){super(s(t),r);this.thumbprints={};this.type="X.509 Certificate";const{tbsCertificate:n}=this.asn;this.serialNumber=A.Convert.ToHex(n.serialNumber);this.subject=new e(n.subject).toJSON();this.issuer=new e(n.issuer).toJSON();this.version=n.version+1;const a=n.validity.notBefore.utcTime||n.validity.notBefore.generalTime;if(!a){throw new Error("Cannot get 'notBefore' value")}this.notBefore=a;const o=n.validity.notAfter.utcTime||n.validity.notAfter.generalTime;if(!o){throw new Error("Cannot get 'notAfter' value")}this.notAfter=o;this.validity=i(this.notBefore,this.notAfter)}parseExtensions(){const{tbsCertificate:t}=this.asn;if(t.extensions){this.extensions=t.extensions.map((t=>new n(a.serialize(t))))}}getPublicKeyInfo(t){const{subjectPublicKey:s,algorithm:r}=t;let e;if(r.algorithm===o&&r.parameters){e=a.parse(r.parameters,h)}if(r.algorithm===u){e=a.parse(s,c)}if(r.algorithm===f){e=a.parse(s,l);e=e.map((t=>this.getPublicKeyInfo(t)))}const i=a.serialize(t);return{params:e,value:i,algorithm:r.algorithm}}get publicKey(){return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo)}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;let r;if(s.algorithm===m){const e=a.parse(t,g);const i=a.parse(s.parameters,p);r=i.map(((t,s)=>Object.assign(Object.assign({},t),{value:e[s]})))}return{params:r,value:t,algorithm:s.algorithm}}exportAsBase64(){return A.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return E(A.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE-----\n${C(this.exportAsBase64())}\n-----END CERTIFICATE-----`}async getThumbprint(t="SHA-1"){try{const s=await b(t,this.raw);if(s){this.thumbprints[t]=A.Convert.ToHex(s)}}catch(t){console.error("Error thumbprint get:",t)}}get commonName(){if(!this.subject){return""}for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if(s.shortName==="CN"||s.shortName==="E"||s.shortName==="O"){return s.value}}return""}get issuerCommonName(){if(!this.issuer){return""}for(let t=0;t<this.issuer.length;t+=1){const s=this.issuer[t];if(s.shortName==="CN"){return s.value}if(s.shortName==="E"){return s.value}}return""}get isRoot(){return JSON.stringify(this.issuer)===JSON.stringify(this.subject)}subjectToString(){if(!this.subject){return""}return this.subject.map((t=>`${t.shortName}=${t.value}`)).join(", ")}issuerToString(){if(!this.issuer){return""}return this.issuer.map((t=>`${t.shortName}=${t.value}`)).join(", ")}downloadAsPEM(t){w.cert.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){w.cert.asDER(this.exportAsHexFormatted(),t||this.commonName)}}export{N as X};
12
+ //# sourceMappingURL=p-6e79b9c8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["X509Certificate","AsnData","constructor","raw","super","certificateRawToBuffer","Certificate","this","thumbprints","type","tbsCertificate","asn","serialNumber","Convert","ToHex","subject","Name","toJSON","issuer","version","notBefore","validity","utcTime","generalTime","Error","notAfter","dateDiff","parseExtensions","extensions","map","e","Extension","AsnConvert","serialize","getPublicKeyInfo","publicKeyInfo","subjectPublicKey","algorithm","params","id_ecPublicKey","parameters","parse","ECParameters","id_rsaEncryption","RSAPublicKey","id_composite_key","CompositePublicKey","param","spki","value","publicKey","subjectPublicKeyInfo","signature","signatureValue","signatureAlgorithm","id_alg_composite","compositeSignatureValues","CompositeSignatureValue","compositeParams","CompositeParams","index","Object","assign","exportAsBase64","ToBase64","exportAsHexFormatted","hexFormat","exportAsPemFormatted","base64Format","getThumbprint","thumbprint","getCertificateThumbprint","error","console","commonName","i","length","name","shortName","issuerCommonName","isRoot","JSON","stringify","subjectToString","join","issuerToString","downloadAsPEM","Download","cert","asPEM","downloadAsDER","asDER"],"sources":["src/crypto/x509_certificate.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport {\n id_composite_key,\n id_alg_composite,\n CompositePublicKey,\n CompositeSignatureValue,\n CompositeParams,\n} from '@peculiar/asn1-x509-post-quantum';\nimport { Certificate, SubjectPublicKeyInfo } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { dateDiff, Download } from '../utils';\n\nimport { Name, INameJSON } from './name';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\nexport interface ISignature {\n algorithm: string;\n value: BufferSource;\n params?: {\n algorithm: string;\n value: BufferSource;\n }[];\n}\n\nexport interface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey | IPublicKey[];\n}\n\nexport class X509Certificate extends AsnData<Certificate> {\n public readonly serialNumber: string;\n\n public readonly subject: INameJSON[];\n\n public readonly issuer: INameJSON[];\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public readonly version: number;\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'X.509 Certificate';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), Certificate);\n\n const { tbsCertificate } = this.asn;\n\n this.serialNumber = Convert.ToHex(tbsCertificate.serialNumber);\n this.subject = new Name(tbsCertificate.subject).toJSON();\n this.issuer = new Name(tbsCertificate.issuer).toJSON();\n this.version = tbsCertificate.version + 1;\n\n const notBefore = tbsCertificate.validity.notBefore.utcTime\n || tbsCertificate.validity.notBefore.generalTime;\n\n if (!notBefore) {\n throw new Error(\"Cannot get 'notBefore' value\");\n }\n\n this.notBefore = notBefore;\n\n const notAfter = tbsCertificate.validity.notAfter.utcTime\n || tbsCertificate.validity.notAfter.generalTime;\n\n if (!notAfter) {\n throw new Error(\"Cannot get 'notAfter' value\");\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n }\n\n public parseExtensions() {\n const { tbsCertificate } = this.asn;\n\n if (tbsCertificate.extensions) {\n this.extensions = tbsCertificate.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n private getPublicKeyInfo(publicKeyInfo: SubjectPublicKeyInfo) {\n const { subjectPublicKey, algorithm } = publicKeyInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n if (algorithm.algorithm === id_composite_key) {\n params = AsnConvert.parse(subjectPublicKey, CompositePublicKey);\n\n params = params.map((param) => this.getPublicKeyInfo(param));\n }\n\n const spki = AsnConvert.serialize(publicKeyInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get publicKey(): IPublicKey {\n return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo);\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n let params;\n\n if (signatureAlgorithm.algorithm === id_alg_composite) {\n const compositeSignatureValues = AsnConvert.parse(signatureValue, CompositeSignatureValue);\n const compositeParams = AsnConvert.parse(signatureAlgorithm.parameters, CompositeParams);\n\n params = compositeParams.map((param, index) => ({\n ...param,\n value: compositeSignatureValues[index],\n }));\n }\n\n return {\n params,\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN CERTIFICATE-----\\n${base64Format(this.exportAsBase64())}\\n-----END CERTIFICATE-----`;\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get issuerCommonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN') {\n return name.value;\n }\n\n if (name.shortName === 'E') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get isRoot(): boolean {\n return JSON.stringify(this.issuer) === JSON.stringify(this.subject);\n }\n\n public subjectToString() {\n if (!this.subject) {\n return '';\n }\n\n return this.subject\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public issuerToString() {\n if (!this.issuer) {\n return '';\n }\n\n return this.issuer\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public downloadAsPEM(name?: string) {\n Download.cert.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.cert.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n"],"mappings":";;;;;;;;;;SAgDaA,UAAwBC,EAqBnC,WAAAC,CAAYC,GACVC,MAAMC,EAAuBF,GAAMG,GAL9BC,KAAAC,YAAsC,GAEtCD,KAAAE,KAAe,oBAKpB,MAAMC,eAAEA,GAAmBH,KAAKI,IAEhCJ,KAAKK,aAAeC,UAAQC,MAAMJ,EAAeE,cACjDL,KAAKQ,QAAU,IAAIC,EAAKN,EAAeK,SAASE,SAChDV,KAAKW,OAAS,IAAIF,EAAKN,EAAeQ,QAAQD,SAC9CV,KAAKY,QAAUT,EAAeS,QAAU,EAExC,MAAMC,EAAYV,EAAeW,SAASD,UAAUE,SAC/CZ,EAAeW,SAASD,UAAUG,YAEvC,IAAKH,EAAW,CACd,MAAM,IAAII,MAAM,+B,CAGlBjB,KAAKa,UAAYA,EAEjB,MAAMK,EAAWf,EAAeW,SAASI,SAASH,SAC7CZ,EAAeW,SAASI,SAASF,YAEtC,IAAKE,EAAU,CACb,MAAM,IAAID,MAAM,8B,CAGlBjB,KAAKkB,SAAWA,EAChBlB,KAAKc,SAAWK,EAASnB,KAAKa,UAAWb,KAAKkB,S,CAGzC,eAAAE,GACL,MAAMjB,eAAEA,GAAmBH,KAAKI,IAEhC,GAAID,EAAekB,WAAY,CAC7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aAAAgB,CAAcb,GACnBU,EAASC,KAAKG,MACZpF,KAAK0D,uBACLY,GAAQtE,KAAKmE,W"}
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{h as o}from"./p-0b356bb5.js";
5
+ /**
6
+ * @license
7
+ * Copyright (c) Peculiar Ventures, LLC.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */const t=t=>{const{color:r="gray-10"}=t;return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none"},o("path",{stroke:`var(--pv-color-${r})`,"stroke-linecap":"round","stroke-width":"1.5",d:"m19.222 12.778-3.851 4.279a.2.2 0 0 1-.297 0l-3.852-4.28"}))};
12
+ /**
13
+ * @license
14
+ * Copyright (c) Peculiar Ventures, LLC.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */const r=t=>{const{color:r="gray-10"}=t;return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none"},o("path",{stroke:`var(--pv-color-${r})`,"stroke-linecap":"round","stroke-width":"1.5",d:"m11.222 17.722 3.852-4.28a.2.2 0 0 1 .297 0l3.851 4.28"}))};export{r as A,t as a};
19
+ //# sourceMappingURL=p-709994c1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ArrowBottomIcon","props","color","h","xmlns","width","height","fill","stroke","d","ArrowTopIcon"],"sources":["src/components/icons/arrow_bottom.tsx","src/components/icons/arrow_top.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const ArrowBottomIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-10' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n fill=\"none\"\n >\n <path\n stroke={`var(--pv-color-${color})`}\n // eslint-disable-next-line react/no-unknown-property\n stroke-linecap=\"round\"\n stroke-width=\"1.5\"\n d=\"m19.222 12.778-3.851 4.279a.2.2 0 0 1-.297 0l-3.852-4.28\"\n />\n </svg>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const ArrowTopIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-10' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n fill=\"none\"\n >\n <path\n stroke={`var(--pv-color-${color})`}\n // eslint-disable-next-line react/no-unknown-property\n stroke-linecap=\"round\"\n stroke-width=\"1.5\"\n d=\"m11.222 17.722 3.852-4.28a.2.2 0 0 1 .297 0l3.851 4.28\"\n />\n </svg>\n );\n};\n"],"mappings":";;;;;;;;;;SAWaA,EAA+DC,IAC1E,MAAMC,MAAEA,EAAQ,WAAcD,EAE9B,OACEE,EAAA,OACEC,MAAM,6BACNC,MAAM,KACNC,OAAO,KACPC,KAAK,QAELJ,EAAA,QACEK,OAAQ,kBAAkBN,KAAQ,iBAEnB,QAAO,eACT,MACbO,EAAE,6DAEA;;;;;;;SCjBGC,EAA4DT,IACvE,MAAMC,MAAEA,EAAQ,WAAcD,EAE9B,OACEE,EAAA,OACEC,MAAM,6BACNC,MAAM,KACNC,OAAO,KACPC,KAAK,QAELJ,EAAA,QACEK,OAAQ,kBAAkBN,KAAQ,iBAEnB,QAAO,eACT,MACbO,EAAE,2DAEA,S"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{r as t,h as e,H as r}from"./p-0b356bb5.js";import{X as a}from"./p-6e79b9c8.js";import"./p-74c241e7.js";import"./p-a053c132.js";import{B as o,f as s,I as i,P as c,S as n,b as v,E as p,c as l,d as h,e as d,M as b}from"./p-97688065.js";import{T as g}from"./p-7f9beaa8.js";import"./p-17e3c47b.js";const u="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-all}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";const y=class{constructor(e){t(this,e);this.getAuthKeyIdParentLink=t=>{var e;return(e=this.authKeyIdParentLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=t=>{var e;return(e=this.authKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=t=>{var e;return(e=this.subjectKeyIdChildrenLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=t=>{var e;return(e=this.subjectKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.certificate=undefined;this.download=undefined;this.authKeyIdParentLink=undefined;this.authKeyIdSiblingsLink=undefined;this.subjectKeyIdChildrenLink=undefined;this.subjectKeyIdSiblingsLink=undefined;this.issuerDnLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}handleMediaQueryChange(t){this.mobileScreenView=t.matches}componentWillLoad(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}}disconnectedCallback(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))}async decodeCertificate(t){this.isDecodeInProcess=true;try{if(t instanceof a){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new a(t)}else{return}this.certificateDecoded.parseExtensions();await this.certificateDecoded.getThumbprint("SHA-1");await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t;console.error("Error certificate parse:",t)}this.isDecodeInProcess=false}watchCertificateAndDecode(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof a&&e instanceof a){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return e("div",{class:"status_wrapper"},e(g,null,"There was an error decoding this certificate."))}renderEmptyState(){return e("div",{class:"status_wrapper"},e(g,null,"There is no certificate available."))}render(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return e(r,{"data-mobile-screen-view":String(this.mobileScreenView)},e("table",null,e(o,Object.assign({},this.certificateDecoded)),e(s,{name:this.certificateDecoded.subject}),e(i,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),e(c,{publicKey:this.certificateDecoded.publicKey}),e(n,{signature:this.certificateDecoded.signature}),e(v,{thumbprints:this.certificateDecoded.thumbprints}),e(p,{extensions:this.certificateDecoded.extensions,getLEILink:l,getDNSNameLink:h,getIPAddressLink:d,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&e(b,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};y.style=u;export{y as peculiar_certificate_viewer};
5
+ //# sourceMappingURL=p-7215de9c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["certificateViewerCss","CertificateViewer","this","getAuthKeyIdParentLink","value","_a","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","certificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509Certificate","certificateDecoded","parseExtensions","getThumbprint","error","certificateDecodeError","console","watchCertificateAndDecode","newValue","oldValue","serialNumber","getIssuerDnLink","issuerDnLink","renderErrorState","h","class","Typography","renderEmptyState","render","Host","String","BasicInformation","Object","assign","SubjectName","name","subject","IssuerName","issuer","PublicKey","publicKey","Signature","signature","Thumbprints","thumbprints","Extensions","extensions","getLEILink","getDNSNameLink","getIPAddressLink","download","Miscellaneous"],"sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import 'base';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-all;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\n\nimport {\n X509Certificate,\n} from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: CertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView: boolean = false;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: CertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: CertificateProp, oldValue: CertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;4SAAA,MAAMA,EAAuB,khS,MCyChBC,EAAiB,M,yBAsIpBC,KAAAC,uBAA0BC,I,MAAkB,OAAAC,EAAAH,KAAKI,uBAAmB,MAAAD,SAAA,SAAAA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