@peculiar/certificates-viewer 3.10.1 → 4.0.2

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 (589) hide show
  1. package/README.md +40 -64
  2. package/components/actions.js +21 -0
  3. package/components/actions.js.map +1 -0
  4. package/components/arrow_top.js +34 -0
  5. package/components/arrow_top.js.map +1 -0
  6. package/components/attribute-certificate-viewer.js +281 -0
  7. package/components/attribute-certificate-viewer.js.map +1 -0
  8. package/components/button-menu.js +52 -0
  9. package/components/button-menu.js.map +1 -0
  10. package/components/button.js +74 -0
  11. package/components/button.js.map +1 -0
  12. package/components/certificate-viewer.js +300 -0
  13. package/components/certificate-viewer.js.map +1 -0
  14. package/components/circular-progress.js +48 -0
  15. package/components/circular-progress.js.map +1 -0
  16. package/components/crl-viewer.js +263 -0
  17. package/components/crl-viewer.js.map +1 -0
  18. package/components/cross.js +47 -0
  19. package/components/cross.js.map +1 -0
  20. package/components/csr-viewer.js +233 -0
  21. package/components/csr-viewer.js.map +1 -0
  22. package/components/custom-elements.d.ts +2 -0
  23. package/components/download.js +500 -0
  24. package/components/download.js.map +1 -0
  25. package/components/highlight-words.js +60 -0
  26. package/components/highlight-words.js.map +1 -0
  27. package/components/index.d.ts +33 -0
  28. package/components/index.js +11 -0
  29. package/components/index.js.map +1 -0
  30. package/components/index2.js +299 -0
  31. package/components/index2.js.map +1 -0
  32. package/components/issuer_name.js +26 -0
  33. package/components/issuer_name.js.map +1 -0
  34. package/components/miscellaneous.js +13393 -0
  35. package/components/miscellaneous.js.map +1 -0
  36. package/components/package.json +9 -0
  37. package/components/peculiar-attribute-certificate-viewer.d.ts +11 -0
  38. package/components/peculiar-attribute-certificate-viewer.js +11 -0
  39. package/components/peculiar-attribute-certificate-viewer.js.map +1 -0
  40. package/components/peculiar-button-menu.d.ts +11 -0
  41. package/components/peculiar-button-menu.js +11 -0
  42. package/components/peculiar-button-menu.js.map +1 -0
  43. package/components/peculiar-certificate-decoder.d.ts +11 -0
  44. package/components/peculiar-certificate-decoder.js +234 -0
  45. package/components/peculiar-certificate-decoder.js.map +1 -0
  46. package/components/peculiar-certificate-viewer.d.ts +11 -0
  47. package/components/peculiar-certificate-viewer.js +11 -0
  48. package/components/peculiar-certificate-viewer.js.map +1 -0
  49. package/components/peculiar-certificates-viewer.d.ts +11 -0
  50. package/components/peculiar-certificates-viewer.js +344 -0
  51. package/components/peculiar-certificates-viewer.js.map +1 -0
  52. package/components/peculiar-circular-progress.d.ts +11 -0
  53. package/components/peculiar-circular-progress.js +11 -0
  54. package/components/peculiar-circular-progress.js.map +1 -0
  55. package/components/peculiar-crl-viewer.d.ts +11 -0
  56. package/components/peculiar-crl-viewer.js +11 -0
  57. package/components/peculiar-crl-viewer.js.map +1 -0
  58. package/components/peculiar-csr-viewer.d.ts +11 -0
  59. package/components/peculiar-csr-viewer.js +11 -0
  60. package/components/peculiar-csr-viewer.js.map +1 -0
  61. package/components/peculiar-highlight-words.d.ts +11 -0
  62. package/components/peculiar-highlight-words.js +11 -0
  63. package/components/peculiar-highlight-words.js.map +1 -0
  64. package/components/peculiar-text-hider.d.ts +11 -0
  65. package/components/peculiar-text-hider.js +42 -0
  66. package/components/peculiar-text-hider.js.map +1 -0
  67. package/components/subject_name.js +71 -0
  68. package/components/subject_name.js.map +1 -0
  69. package/dist/cjs/actions-19013d4a.js +23 -0
  70. package/dist/cjs/actions-19013d4a.js.map +1 -0
  71. package/dist/cjs/arrow_top-834fb7ec.js +37 -0
  72. package/dist/cjs/arrow_top-834fb7ec.js.map +1 -0
  73. package/dist/cjs/button-14e2b73f.js +77 -0
  74. package/dist/cjs/button-14e2b73f.js.map +1 -0
  75. package/dist/cjs/{certification_request-d5c6e32d.js → certification_request-c0cafa72.js} +236 -71
  76. package/dist/cjs/certification_request-c0cafa72.js.map +1 -0
  77. package/dist/cjs/{crl-5bce64c4.js → crl-b4322166.js} +8 -7
  78. package/dist/cjs/crl-b4322166.js.map +1 -0
  79. package/dist/cjs/cross-9872c473.js +51 -0
  80. package/dist/cjs/cross-9872c473.js.map +1 -0
  81. package/dist/cjs/download-254ddc57.js +23 -0
  82. package/dist/cjs/download-254ddc57.js.map +1 -0
  83. package/dist/cjs/{download-93f7b773.js → download-972dda8a.js} +2 -0
  84. package/dist/cjs/download-972dda8a.js.map +1 -0
  85. package/dist/cjs/index-efd561e9.js +2477 -0
  86. package/dist/cjs/index-efd561e9.js.map +1 -0
  87. package/dist/cjs/index.cjs.js +20 -1
  88. package/dist/cjs/index.cjs.js.map +1 -0
  89. package/dist/cjs/link-6aea0be4.js +25 -0
  90. package/dist/cjs/link-6aea0be4.js.map +1 -0
  91. package/dist/cjs/loader.cjs.js +6 -12
  92. package/dist/cjs/loader.cjs.js.map +1 -0
  93. package/dist/cjs/{miscellaneous-cac1cd8b.js → miscellaneous-e43aaae5.js} +73 -70
  94. package/dist/cjs/miscellaneous-e43aaae5.js.map +1 -0
  95. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +93 -35
  96. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -0
  97. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +98 -0
  98. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -0
  99. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +30 -19
  100. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -0
  101. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +35 -11
  102. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -0
  103. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +145 -85
  104. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -0
  105. package/dist/cjs/peculiar-text-hider.cjs.entry.js +7 -13
  106. package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -0
  107. package/dist/cjs/peculiar.cjs.js +10 -57
  108. package/dist/cjs/peculiar.cjs.js.map +1 -0
  109. package/dist/cjs/{x509_certificate-3760e0a8.js → x509_certificate-989b1435.js} +5 -4
  110. package/dist/cjs/x509_certificate-989b1435.js.map +1 -0
  111. package/dist/collection/collection-manifest.json +12 -16
  112. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +189 -145
  113. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -0
  114. package/dist/collection/components/button/button.js +14 -126
  115. package/dist/collection/components/button/button.js.map +1 -0
  116. package/dist/collection/components/button/index.js +5 -0
  117. package/dist/collection/components/button/index.js.map +1 -0
  118. package/dist/collection/components/button-menu/button-menu.css +46 -0
  119. package/dist/collection/components/button-menu/button-menu.js +78 -0
  120. package/dist/collection/components/button-menu/button-menu.js.map +1 -0
  121. package/dist/collection/components/certificate-decoder/certificate-decoder.css +456 -44
  122. package/dist/collection/components/certificate-decoder/certificate-decoder.js +109 -101
  123. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -0
  124. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +6 -11
  125. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -0
  126. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +5 -5
  127. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -0
  128. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +5 -6
  129. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -0
  130. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +5 -5
  131. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -0
  132. package/dist/collection/components/certificate-details-parts/attributes/index.js +16 -15
  133. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -0
  134. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +5 -5
  135. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -0
  136. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +5 -5
  137. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -0
  138. package/dist/collection/components/certificate-details-parts/attributes/name_part.js +4 -3
  139. package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -0
  140. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +5 -4
  141. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -0
  142. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +5 -5
  143. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -0
  144. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +5 -5
  145. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -0
  146. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +6 -13
  147. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -0
  148. package/dist/collection/components/certificate-details-parts/basic_information.js +4 -3
  149. package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -0
  150. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +5 -5
  151. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -0
  152. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +5 -5
  153. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -0
  154. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +2 -1
  155. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -0
  156. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +10 -15
  157. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -0
  158. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +6 -7
  159. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -0
  160. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +5 -6
  161. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -0
  162. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +8 -12
  163. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -0
  164. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +5 -6
  165. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -0
  166. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +26 -27
  167. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -0
  168. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +5 -7
  169. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -0
  170. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +8 -13
  171. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -0
  172. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +4 -3
  173. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -0
  174. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +6 -6
  175. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -0
  176. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +5 -5
  177. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -0
  178. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +5 -5
  179. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -0
  180. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +5 -6
  181. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -0
  182. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +7 -7
  183. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -0
  184. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +7 -6
  185. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -0
  186. package/dist/collection/components/certificate-details-parts/extensions/index.js +46 -45
  187. package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -0
  188. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +8 -9
  189. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -0
  190. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +7 -11
  191. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -0
  192. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +5 -5
  193. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -0
  194. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +5 -5
  195. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -0
  196. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +5 -5
  197. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -0
  198. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +8 -11
  199. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -0
  200. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +4 -3
  201. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -0
  202. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +5 -5
  203. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -0
  204. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +5 -5
  205. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -0
  206. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +6 -7
  207. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -0
  208. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +5 -4
  209. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -0
  210. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +6 -7
  211. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -0
  212. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +13 -16
  213. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -0
  214. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +4 -3
  215. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -0
  216. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +8 -9
  217. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -0
  218. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +10 -15
  219. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -0
  220. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +7 -9
  221. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -0
  222. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +4 -3
  223. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -0
  224. package/dist/collection/components/certificate-details-parts/holder.js +8 -11
  225. package/dist/collection/components/certificate-details-parts/holder.js.map +1 -0
  226. package/dist/collection/components/certificate-details-parts/index.js +1 -0
  227. package/dist/collection/components/certificate-details-parts/index.js.map +1 -0
  228. package/dist/collection/components/certificate-details-parts/issuer.js +5 -4
  229. package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -0
  230. package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -4
  231. package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -0
  232. package/dist/collection/components/certificate-details-parts/miscellaneous.js +8 -13
  233. package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -0
  234. package/dist/collection/components/certificate-details-parts/public_key.js +8 -7
  235. package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -0
  236. package/dist/collection/components/certificate-details-parts/revoked_certificates.js +9 -11
  237. package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -0
  238. package/dist/collection/components/certificate-details-parts/row.js +13 -18
  239. package/dist/collection/components/certificate-details-parts/row.js.map +1 -0
  240. package/dist/collection/components/certificate-details-parts/signature.js +5 -4
  241. package/dist/collection/components/certificate-details-parts/signature.js.map +1 -0
  242. package/dist/collection/components/certificate-details-parts/subject_name.js +4 -3
  243. package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -0
  244. package/dist/collection/components/certificate-details-parts/thumbprints.js +4 -3
  245. package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -0
  246. package/dist/collection/components/certificate-summary/certificate-summary.js +9 -77
  247. package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -0
  248. package/dist/collection/components/certificate-summary/index.js +5 -0
  249. package/dist/collection/components/certificate-summary/index.js.map +1 -0
  250. package/dist/collection/components/certificate-viewer/certificate-viewer.css +471 -104
  251. package/dist/collection/components/certificate-viewer/certificate-viewer.js +206 -178
  252. package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -0
  253. package/dist/collection/components/certificates-viewer/certificates-viewer.css +540 -267
  254. package/dist/collection/components/certificates-viewer/certificates-viewer.js +261 -266
  255. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -0
  256. package/dist/collection/components/circular-progress/circular-progress.css +2 -11
  257. package/dist/collection/components/circular-progress/circular-progress.js +60 -63
  258. package/dist/collection/components/circular-progress/circular-progress.js.map +1 -0
  259. package/dist/collection/components/crl-viewer/crl-viewer.js +166 -139
  260. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -0
  261. package/dist/collection/components/csr-viewer/csr-viewer.js +149 -124
  262. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -0
  263. package/dist/collection/components/highlight-words/highlight-words.css +1 -9
  264. package/dist/collection/components/highlight-words/highlight-words.js +35 -28
  265. package/dist/collection/components/highlight-words/highlight-words.js.map +1 -0
  266. package/dist/collection/components/icons/actions.js +16 -0
  267. package/dist/collection/components/icons/actions.js.map +1 -0
  268. package/dist/collection/components/icons/arrow_bottom.js +16 -0
  269. package/dist/collection/components/icons/arrow_bottom.js.map +1 -0
  270. package/dist/collection/components/icons/arrow_top.js +16 -0
  271. package/dist/collection/components/icons/arrow_top.js.map +1 -0
  272. package/dist/collection/components/icons/cross.js +16 -0
  273. package/dist/collection/components/icons/cross.js.map +1 -0
  274. package/dist/collection/components/icons/details.js +16 -0
  275. package/dist/collection/components/icons/details.js.map +1 -0
  276. package/dist/collection/components/icons/download.js +16 -0
  277. package/dist/collection/components/icons/download.js.map +1 -0
  278. package/dist/collection/components/icons/index.js +11 -0
  279. package/dist/collection/components/icons/index.js.map +1 -0
  280. package/dist/collection/components/icons/link.js +16 -0
  281. package/dist/collection/components/icons/link.js.map +1 -0
  282. package/dist/collection/components/link/index.js +5 -0
  283. package/dist/collection/components/link/index.js.map +1 -0
  284. package/dist/collection/components/link/link.js +9 -61
  285. package/dist/collection/components/link/link.js.map +1 -0
  286. package/dist/collection/components/text-hider/text-hider.css +9 -36
  287. package/dist/collection/components/text-hider/text-hider.js +21 -68
  288. package/dist/collection/components/text-hider/text-hider.js.map +1 -0
  289. package/dist/collection/components/typography/index.js +5 -0
  290. package/dist/collection/components/typography/index.js.map +1 -0
  291. package/dist/collection/components/typography/typography.js +39 -126
  292. package/dist/collection/components/typography/typography.js.map +1 -0
  293. package/dist/collection/constants/logs.js +1 -0
  294. package/dist/collection/constants/logs.js.map +1 -0
  295. package/dist/collection/constants/oids.js +1 -0
  296. package/dist/collection/constants/oids.js.map +1 -0
  297. package/dist/collection/crypto/asn_data.js +13 -7
  298. package/dist/collection/crypto/asn_data.js.map +1 -0
  299. package/dist/collection/crypto/attribute.js +11 -10
  300. package/dist/collection/crypto/attribute.js.map +1 -0
  301. package/dist/collection/crypto/crl.js +9 -8
  302. package/dist/collection/crypto/crl.js.map +1 -0
  303. package/dist/collection/crypto/csr.js +11 -10
  304. package/dist/collection/crypto/csr.js.map +1 -0
  305. package/dist/collection/crypto/extension.js +16 -15
  306. package/dist/collection/crypto/extension.js.map +1 -0
  307. package/dist/collection/crypto/index.js +1 -0
  308. package/dist/collection/crypto/index.js.map +1 -0
  309. package/dist/collection/crypto/name.js +15 -9
  310. package/dist/collection/crypto/name.js.map +1 -0
  311. package/dist/collection/crypto/provider.js +4 -3
  312. package/dist/collection/crypto/provider.js.map +1 -0
  313. package/dist/collection/crypto/utils.js +4 -3
  314. package/dist/collection/crypto/utils.js.map +1 -0
  315. package/dist/collection/crypto/x509_attribute_certificate.js +9 -8
  316. package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -0
  317. package/dist/collection/crypto/x509_certificate.js +12 -11
  318. package/dist/collection/crypto/x509_certificate.js.map +1 -0
  319. package/dist/collection/index.js +5 -0
  320. package/dist/collection/index.js.map +1 -0
  321. package/dist/collection/locales/en.json +4 -3
  322. package/dist/collection/utils/date_formatter.js +3 -2
  323. package/dist/collection/utils/date_formatter.js.map +1 -0
  324. package/dist/collection/utils/download.js +3 -2
  325. package/dist/collection/utils/download.js.map +1 -0
  326. package/dist/collection/utils/download_from_buffer.js +1 -0
  327. package/dist/collection/utils/download_from_buffer.js.map +1 -0
  328. package/dist/collection/utils/get_string_by_oid.js +2 -1
  329. package/dist/collection/utils/get_string_by_oid.js.map +1 -0
  330. package/dist/collection/utils/index.js +2 -1
  331. package/dist/collection/utils/index.js.map +1 -0
  332. package/dist/collection/utils/is_link.js +1 -0
  333. package/dist/collection/utils/is_link.js.map +1 -0
  334. package/dist/collection/utils/l10n.js +2 -1
  335. package/dist/collection/utils/l10n.js.map +1 -0
  336. package/dist/collection/utils/read_file.js +1 -0
  337. package/dist/collection/utils/read_file.js.map +1 -0
  338. package/dist/collection/utils/third_party_links.js +1 -0
  339. package/dist/collection/utils/third_party_links.js.map +1 -0
  340. package/dist/collection/utils/validator.js +1 -0
  341. package/dist/collection/utils/validator.js.map +1 -0
  342. package/dist/collection/www-copy/index.js +138 -32
  343. package/dist/esm/actions-8d745b2a.js +21 -0
  344. package/dist/esm/actions-8d745b2a.js.map +1 -0
  345. package/dist/esm/arrow_top-fc298828.js +34 -0
  346. package/dist/esm/arrow_top-fc298828.js.map +1 -0
  347. package/dist/esm/button-35146bdd.js +74 -0
  348. package/dist/esm/button-35146bdd.js.map +1 -0
  349. package/dist/esm/{certification_request-23cd5124.js → certification_request-5cadde9f.js} +171 -9
  350. package/dist/esm/certification_request-5cadde9f.js.map +1 -0
  351. package/dist/esm/{crl-7f23c111.js → crl-11670c3e.js} +7 -6
  352. package/dist/esm/crl-11670c3e.js.map +1 -0
  353. package/dist/esm/cross-9ec9a759.js +47 -0
  354. package/dist/esm/cross-9ec9a759.js.map +1 -0
  355. package/dist/esm/download-0cc3077a.js +21 -0
  356. package/dist/esm/download-0cc3077a.js.map +1 -0
  357. package/dist/esm/{download-91511aeb.js → download-57c5bf8f.js} +2 -0
  358. package/dist/esm/download-57c5bf8f.js.map +1 -0
  359. package/dist/esm/index-4079bbb5.js +2448 -0
  360. package/dist/esm/index-4079bbb5.js.map +1 -0
  361. package/dist/esm/index.js +10 -1
  362. package/dist/esm/index.js.map +1 -0
  363. package/dist/esm/link-ad24c3be.js +23 -0
  364. package/dist/esm/link-ad24c3be.js.map +1 -0
  365. package/dist/esm/loader.js +6 -12
  366. package/dist/esm/loader.js.map +1 -0
  367. package/dist/esm/{miscellaneous-c7c0d04a.js → miscellaneous-7793a310.js} +40 -37
  368. package/dist/esm/miscellaneous-7793a310.js.map +1 -0
  369. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +81 -23
  370. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
  371. package/dist/esm/peculiar-button-menu_3.entry.js +92 -0
  372. package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -0
  373. package/dist/esm/peculiar-certificate-decoder.entry.js +30 -19
  374. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -0
  375. package/dist/esm/peculiar-certificate-viewer.entry.js +35 -11
  376. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -0
  377. package/dist/esm/peculiar-certificates-viewer.entry.js +145 -85
  378. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -0
  379. package/dist/esm/peculiar-text-hider.entry.js +7 -13
  380. package/dist/esm/peculiar-text-hider.entry.js.map +1 -0
  381. package/dist/esm/peculiar.js +8 -58
  382. package/dist/esm/peculiar.js.map +1 -0
  383. package/dist/esm/{x509_certificate-d8e0af2d.js → x509_certificate-dfae6999.js} +4 -3
  384. package/dist/esm/x509_certificate-dfae6999.js.map +1 -0
  385. package/dist/esm-es5/actions-8d745b2a.js +12 -0
  386. package/dist/esm-es5/actions-8d745b2a.js.map +1 -0
  387. package/dist/esm-es5/arrow_top-fc298828.js +19 -0
  388. package/dist/esm-es5/arrow_top-fc298828.js.map +1 -0
  389. package/dist/esm-es5/button-35146bdd.js +19 -0
  390. package/dist/esm-es5/button-35146bdd.js.map +1 -0
  391. package/dist/esm-es5/certification_request-5cadde9f.js +97 -0
  392. package/dist/esm-es5/certification_request-5cadde9f.js.map +1 -0
  393. package/dist/esm-es5/crl-11670c3e.js +33 -0
  394. package/dist/esm-es5/crl-11670c3e.js.map +1 -0
  395. package/dist/esm-es5/cross-9ec9a759.js +26 -0
  396. package/dist/esm-es5/cross-9ec9a759.js.map +1 -0
  397. package/dist/esm-es5/download-0cc3077a.js +12 -0
  398. package/dist/esm-es5/download-0cc3077a.js.map +1 -0
  399. package/dist/esm-es5/download-57c5bf8f.js +19 -0
  400. package/dist/esm-es5/download-57c5bf8f.js.map +1 -0
  401. package/dist/esm-es5/index-4079bbb5.js +6 -0
  402. package/dist/esm-es5/index-4079bbb5.js.map +1 -0
  403. package/dist/esm-es5/index.js +5 -0
  404. package/dist/esm-es5/index.js.map +1 -0
  405. package/dist/esm-es5/link-ad24c3be.js +12 -0
  406. package/dist/esm-es5/link-ad24c3be.js.map +1 -0
  407. package/dist/esm-es5/loader.js +5 -0
  408. package/dist/esm-es5/loader.js.map +1 -0
  409. package/dist/esm-es5/miscellaneous-7793a310.js +348 -0
  410. package/dist/esm-es5/miscellaneous-7793a310.js.map +1 -0
  411. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +110 -0
  412. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
  413. package/dist/esm-es5/peculiar-button-menu_3.entry.js +5 -0
  414. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -0
  415. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +12 -0
  416. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -0
  417. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +5 -0
  418. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -0
  419. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +12 -0
  420. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -0
  421. package/dist/esm-es5/peculiar-text-hider.entry.js +5 -0
  422. package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -0
  423. package/dist/esm-es5/peculiar.js +5 -0
  424. package/dist/esm-es5/peculiar.js.map +1 -0
  425. package/dist/esm-es5/x509_certificate-dfae6999.js +12 -0
  426. package/dist/esm-es5/x509_certificate-dfae6999.js.map +1 -0
  427. package/dist/index.js +1 -1
  428. package/dist/peculiar/index.esm.js +2 -1
  429. package/dist/peculiar/index.esm.js.map +1 -0
  430. package/dist/peculiar/locales/en.json +4 -3
  431. package/dist/peculiar/p-0b356bb5.js +6 -0
  432. package/dist/peculiar/p-0b356bb5.js.map +1 -0
  433. package/dist/peculiar/p-0b475f2a.system.entry.js +111 -0
  434. package/dist/peculiar/p-0b475f2a.system.entry.js.map +1 -0
  435. package/dist/peculiar/p-0fc2e2b4.js +19 -0
  436. package/dist/peculiar/p-0fc2e2b4.js.map +1 -0
  437. package/dist/peculiar/p-17e3c47b.js +12 -0
  438. package/dist/peculiar/p-17e3c47b.js.map +1 -0
  439. package/dist/peculiar/p-1844b807.system.entry.js +5 -0
  440. package/dist/peculiar/p-1844b807.system.entry.js.map +1 -0
  441. package/dist/peculiar/p-1ceb0fe3.js +12 -0
  442. package/dist/peculiar/p-1ceb0fe3.js.map +1 -0
  443. package/dist/peculiar/p-1de0381c.system.js +5 -0
  444. package/dist/peculiar/p-1de0381c.system.js.map +1 -0
  445. package/dist/peculiar/p-2fcad8cb.system.js +20 -0
  446. package/dist/peculiar/p-2fcad8cb.system.js.map +1 -0
  447. package/dist/peculiar/p-31586b23.system.js +13 -0
  448. package/dist/peculiar/p-31586b23.system.js.map +1 -0
  449. package/dist/peculiar/p-33196289.entry.js +5 -0
  450. package/dist/peculiar/p-33196289.entry.js.map +1 -0
  451. package/dist/peculiar/p-370cee20.js +26 -0
  452. package/dist/peculiar/p-370cee20.js.map +1 -0
  453. package/dist/peculiar/p-43eb3721.js +33 -0
  454. package/dist/peculiar/p-43eb3721.js.map +1 -0
  455. package/dist/peculiar/p-441109db.system.entry.js +13 -0
  456. package/dist/peculiar/p-441109db.system.entry.js.map +1 -0
  457. package/dist/peculiar/p-5151cb6f.system.entry.js +5 -0
  458. package/dist/peculiar/p-5151cb6f.system.entry.js.map +1 -0
  459. package/dist/peculiar/p-53784f15.system.entry.js +5 -0
  460. package/dist/peculiar/p-53784f15.system.entry.js.map +1 -0
  461. package/dist/peculiar/p-5aabeba7.system.js +6 -0
  462. package/dist/peculiar/p-5aabeba7.system.js.map +1 -0
  463. package/dist/peculiar/p-5ab007e9.entry.js +5 -0
  464. package/dist/peculiar/p-5ab007e9.entry.js.map +1 -0
  465. package/dist/peculiar/p-6667fe6e.system.js +34 -0
  466. package/dist/peculiar/p-6667fe6e.system.js.map +1 -0
  467. package/dist/peculiar/p-673336cf.entry.js +110 -0
  468. package/dist/peculiar/p-673336cf.entry.js.map +1 -0
  469. package/dist/peculiar/p-6cb88fd6.system.js +13 -0
  470. package/dist/peculiar/p-6cb88fd6.system.js.map +1 -0
  471. package/dist/peculiar/p-6e79b9c8.js +12 -0
  472. package/dist/peculiar/p-6e79b9c8.js.map +1 -0
  473. package/dist/peculiar/p-74c241e7.js +97 -0
  474. package/dist/peculiar/p-74c241e7.js.map +1 -0
  475. package/dist/peculiar/p-7f9beaa8.js +19 -0
  476. package/dist/peculiar/p-7f9beaa8.js.map +1 -0
  477. package/dist/peculiar/p-7f9fef87.entry.js +5 -0
  478. package/dist/peculiar/p-7f9fef87.entry.js.map +1 -0
  479. package/dist/peculiar/p-80832207.system.js +5 -0
  480. package/dist/peculiar/p-80832207.system.js.map +1 -0
  481. package/dist/peculiar/p-882e1281.entry.js +12 -0
  482. package/dist/peculiar/p-882e1281.entry.js.map +1 -0
  483. package/dist/peculiar/p-94a453d7.js +12 -0
  484. package/dist/peculiar/p-94a453d7.js.map +1 -0
  485. package/dist/peculiar/p-a053c132.js +19 -0
  486. package/dist/peculiar/p-a053c132.js.map +1 -0
  487. package/dist/peculiar/p-a6e2e335.js +348 -0
  488. package/dist/peculiar/p-a6e2e335.js.map +1 -0
  489. package/dist/peculiar/p-ae9189f6.system.js +19 -0
  490. package/dist/peculiar/p-ae9189f6.system.js.map +1 -0
  491. package/dist/peculiar/p-b313be9e.system.js +13 -0
  492. package/dist/peculiar/p-b313be9e.system.js.map +1 -0
  493. package/dist/peculiar/p-bcc86979.entry.js +12 -0
  494. package/dist/peculiar/p-bcc86979.entry.js.map +1 -0
  495. package/dist/peculiar/p-c0a298fd.system.js +97 -0
  496. package/dist/peculiar/p-c0a298fd.system.js.map +1 -0
  497. package/dist/peculiar/p-c362dc5e.system.js +348 -0
  498. package/dist/peculiar/p-c362dc5e.system.js.map +1 -0
  499. package/dist/peculiar/p-c99507d4.system.js +20 -0
  500. package/dist/peculiar/p-c99507d4.system.js.map +1 -0
  501. package/dist/peculiar/p-ddae2f8e.system.js +27 -0
  502. package/dist/peculiar/p-ddae2f8e.system.js.map +1 -0
  503. package/dist/peculiar/p-e39de121.system.entry.js +13 -0
  504. package/dist/peculiar/p-e39de121.system.entry.js.map +1 -0
  505. package/dist/peculiar/p-e6a3b4d4.system.js +13 -0
  506. package/dist/peculiar/p-e6a3b4d4.system.js.map +1 -0
  507. package/dist/peculiar/peculiar.css +1 -1
  508. package/dist/peculiar/peculiar.esm.js +2 -1
  509. package/dist/peculiar/peculiar.esm.js.map +1 -0
  510. package/dist/peculiar/peculiar.js +127 -0
  511. package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +15 -3
  512. package/dist/types/components/button/button.d.ts +5 -16
  513. package/dist/types/components/button/index.d.ts +2 -0
  514. package/dist/types/components/button-menu/button-menu.d.ts +21 -0
  515. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +9 -6
  516. package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
  517. package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -3
  518. package/dist/types/components/certificate-summary/index.d.ts +1 -0
  519. package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +13 -5
  520. package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +22 -11
  521. package/dist/types/components/crl-viewer/crl-viewer.d.ts +13 -5
  522. package/dist/types/components/csr-viewer/csr-viewer.d.ts +13 -5
  523. package/dist/types/components/icons/actions.d.ts +12 -0
  524. package/dist/types/components/icons/arrow_bottom.d.ts +12 -0
  525. package/dist/types/components/icons/arrow_top.d.ts +12 -0
  526. package/dist/types/components/icons/cross.d.ts +12 -0
  527. package/dist/types/components/icons/details.d.ts +12 -0
  528. package/dist/types/components/icons/download.d.ts +12 -0
  529. package/dist/types/components/icons/index.d.ts +7 -0
  530. package/dist/types/components/icons/link.d.ts +12 -0
  531. package/dist/types/components/link/index.d.ts +1 -0
  532. package/dist/types/components/link/link.d.ts +6 -6
  533. package/dist/types/components/text-hider/text-hider.d.ts +0 -3
  534. package/dist/types/components/typography/index.d.ts +1 -0
  535. package/dist/types/components/typography/typography.d.ts +10 -20
  536. package/dist/types/components.d.ts +74 -175
  537. package/dist/types/crypto/attribute.d.ts +1 -1
  538. package/dist/types/crypto/extension.d.ts +1 -1
  539. package/dist/types/index.d.ts +4 -0
  540. package/dist/types/interface.d.ts +98 -6
  541. package/dist/types/stencil-public-runtime.d.ts +110 -23
  542. package/dist/types/utils/l10n.d.ts +5 -4
  543. package/dist/types/utils/read_file.d.ts +1 -1
  544. package/hydrate/index.d.ts +218 -0
  545. package/hydrate/index.js +22549 -0
  546. package/hydrate/package.json +6 -0
  547. package/loader/index.d.ts +10 -1
  548. package/loader/index.js +1 -1
  549. package/loader/package.json +1 -0
  550. package/package.json +6 -4
  551. package/dist/cjs/dom-f57e260e.js +0 -78
  552. package/dist/cjs/index-064e95c7.js +0 -1486
  553. package/dist/cjs/l10n-ddc7cff9.js +0 -169
  554. package/dist/cjs/peculiar-button-split_4.cjs.entry.js +0 -128
  555. package/dist/cjs/peculiar-button.cjs.entry.js +0 -40
  556. package/dist/cjs/peculiar-link.cjs.entry.js +0 -29
  557. package/dist/cjs/peculiar-typography.cjs.entry.js +0 -38
  558. package/dist/collection/components/button/button.css +0 -81
  559. package/dist/collection/components/button-split/button-split.css +0 -57
  560. package/dist/collection/components/button-split/button-split.js +0 -116
  561. package/dist/collection/components/certificate-summary/certificate-summary.css +0 -49
  562. package/dist/collection/components/link/link.css +0 -59
  563. package/dist/collection/components/typography/typography.css +0 -95
  564. package/dist/esm/dom-f1b08a97.js +0 -76
  565. package/dist/esm/index-bbd484d9.js +0 -1455
  566. package/dist/esm/l10n-d48f35ff.js +0 -165
  567. package/dist/esm/peculiar-button-split_4.entry.js +0 -121
  568. package/dist/esm/peculiar-button.entry.js +0 -36
  569. package/dist/esm/peculiar-link.entry.js +0 -25
  570. package/dist/esm/peculiar-typography.entry.js +0 -34
  571. package/dist/esm/polyfills/css-shim.js +0 -1
  572. package/dist/peculiar/p-01cea5c0.entry.js +0 -11
  573. package/dist/peculiar/p-3bfefa4a.entry.js +0 -18
  574. package/dist/peculiar/p-4e8169cb.entry.js +0 -4
  575. package/dist/peculiar/p-57b89412.entry.js +0 -4
  576. package/dist/peculiar/p-5b4eed12.entry.js +0 -4
  577. package/dist/peculiar/p-610b85e3.entry.js +0 -4
  578. package/dist/peculiar/p-6d37c8b5.entry.js +0 -4
  579. package/dist/peculiar/p-711b4e1e.js +0 -18
  580. package/dist/peculiar/p-81a88a33.js +0 -11
  581. package/dist/peculiar/p-918aeee4.entry.js +0 -4
  582. package/dist/peculiar/p-9f4ee110.js +0 -22
  583. package/dist/peculiar/p-a050e184.js +0 -69
  584. package/dist/peculiar/p-c24c26c2.js +0 -32
  585. package/dist/peculiar/p-df53fbcc.entry.js +0 -4
  586. package/dist/peculiar/p-ec250cc4.js +0 -12
  587. package/dist/peculiar/p-f7683ba5.js +0 -5
  588. package/dist/peculiar/p-fe05f51e.js +0 -79
  589. package/dist/types/components/button-split/button-split.d.ts +0 -21
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BasicAttribute","props","children","attribute","h","RowValue","name","value","getStringByOID","asn","type","colSpan","class","NamePart","map","relativeDistinguishedName","attributeTypeAndValue","OIDs","toString","NameAttribute","ActivityDescriptionAttribute","GeneralNamePart","generalName","codeAuthority","getDNSNameLink","getIPAddressLink","codeId","shortName","shortDescription","WebGdprAttribute","assessmentAuthority","assessmentLocation","assessmentRef","dataStorageTerritory","description","InsuranceValueAttribute","concat","base","degree","location","TypeRelationshipAttribute","Object","keys","keyName","toNumber","l10n","getString","getValueRank","ratio","ValuationRankingAttribute","values","AsStringAttribute","monospace","UnstructuredNameAttribute","utf8String","ChallengePasswordAttribute","Attributes","attributes","length","RowTitle","Name","ActivityDescription","WebGDPR","InsuranceValue","TypeRelationship","ValuationRanking","UnstructuredName","ChallengePassword","error","console","RevokedCertificates","revokedCertificates","certificate","Convert","ToHex","userCertificate","dateShort","revocationDate","getTime","crlEntryExtensions","TableRowTable","extension","CRLReason","extnID","toJSON","reason","InvalidityDate","CertificateIssuer","gn","extnValue","Holder","holder","baseCertificateID","objectDigestInfo","issuer","item","serial","digestAlgorithm","algorithm","objectDigest","digestedObjectType","Issuer","certificateViewerCss","AttributeCertificateViewer","this","getAuthKeyIdParentLink","_a","_this","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","class_1","prototype","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509AttributeCertificate","certificateDecoded","parseExtensions","parseAttributes","getThumbprint","_b","sent","certificateDecodeError","error_1","watchCertificateAndDecode","newValue","oldValue","serialNumber","renderErrorState","Typography","renderEmptyState","render","Host","String","BasicInformation","assign","Signature","signature","Thumbprints","thumbprints","getLEILink","Extensions","extensions","download","Miscellaneous","CrlViewer","class_2","CRL","error_2","getIssuerDnLink","issuerDnLink","commonName","IssuerName","CsrViewer","class_3","CSR","error_3","getExtensionRequestAttribute","undefined","find","extensionRequestAttribute","SubjectName","subject","PublicKey","publicKey","title"],"sources":["src/components/certificate-details-parts/attributes/basic_attribute.tsx","src/components/certificate-details-parts/attributes/name_part.tsx","src/components/certificate-details-parts/attributes/name_attribute.tsx","src/components/certificate-details-parts/attributes/activity_description_attribute.tsx","src/components/certificate-details-parts/attributes/web_gdpr_attribute.tsx","src/components/certificate-details-parts/attributes/insurance_value_attribute.tsx","src/components/certificate-details-parts/attributes/type_relationship_attribute.tsx","src/components/certificate-details-parts/attributes/valuation_ranking_attribute.tsx","src/components/certificate-details-parts/attributes/as_string_attribute.tsx","src/components/certificate-details-parts/attributes/unstructured_name_attribute.tsx","src/components/certificate-details-parts/attributes/challenge_password_attribute.tsx","src/components/certificate-details-parts/attributes/index.tsx","src/components/certificate-details-parts/revoked_certificates.tsx","src/components/certificate-details-parts/holder.tsx","src/components/certificate-details-parts/issuer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-attribute-certificate-viewer&encapsulation=shadow","src/components/attribute-certificate-viewer/attribute-certificate-viewer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-crl-viewer&encapsulation=shadow","src/components/crl-viewer/crl-viewer.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-csr-viewer&encapsulation=shadow","src/components/csr-viewer/csr-viewer.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 { h, FunctionalComponent } from '@stencil/core';\n\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { getStringByOID } from '../../../utils';\nimport { RowValue } from '../row';\n\ninterface IBasicAttributeProps {\n attribute: Attribute<TAttributeValue>;\n}\n\nexport const BasicAttribute: FunctionalComponent<IBasicAttributeProps> = (props, children) => {\n const { attribute } = props;\n\n return ([\n <RowValue\n name=\"Name\"\n value={getStringByOID(attribute.asn.type)}\n />,\n children,\n <tr>\n <td colSpan={2} class=\"divider\">\n <span />\n </td>\n </tr>,\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\n\nimport { OIDs } from '../../../constants/oids';\nimport { RowValue } from '../row';\n\ninterface INamePartProps {\n name: Name;\n}\n\nexport const NamePart: FunctionalComponent<INamePartProps> = (props): any[] => {\n const { name } = props;\n\n if (!name) {\n return null;\n }\n\n return name.map((relativeDistinguishedName) => (\n relativeDistinguishedName.map((attributeTypeAndValue) => (\n <RowValue\n name={OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type}\n value={attributeTypeAndValue.value.toString()}\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface INameAttributeProps {\n attribute: Attribute<Name>;\n}\n\nexport const NameAttribute:\nFunctionalComponent<INameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <NamePart\n name={attribute.value}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ActivityDescription } from '@peculiar/asn1-ntqwac';\n\nimport { Attribute } from '../../../crypto/attribute';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IActivityDescriptionAttributeProps {\n attribute: Attribute<ActivityDescription>;\n}\n\nexport const ActivityDescriptionAttribute:\nFunctionalComponent<IActivityDescriptionAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Code Authority\"\n value=\"\"\n />\n <GeneralNamePart\n generalName={attribute.value.codeAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n\n <RowValue\n name=\"Code Id\"\n value=\"\"\n />\n <GeneralNamePart\n generalName={attribute.value.codeId}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n\n <RowValue\n name=\"Short Name\"\n value={attribute.value.shortName}\n />\n <RowValue\n name=\"Short Description\"\n value={attribute.value.shortDescription}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { WebGDPR } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IWebGdprAttributeProps {\n attribute: Attribute<WebGDPR>;\n}\n\nexport const WebGdprAttribute:\nFunctionalComponent<IWebGdprAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Assessment Authority\"\n value=\"\"\n />\n <GeneralNamePart\n generalName={attribute.value.assessmentAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n\n <RowValue\n name=\"Assessment Location\"\n value=\"\"\n />\n <GeneralNamePart\n generalName={attribute.value.assessmentLocation}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n\n <RowValue\n name=\"Assessment Ref\"\n value=\"\"\n />\n <GeneralNamePart\n generalName={attribute.value.assessmentRef}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n\n <RowValue\n name=\"Data Storage Territory\"\n value={attribute.value.dataStorageTerritory}\n />\n <RowValue\n name=\"Description\"\n value={attribute.value.description}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { InsuranceValue } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IInsuranceValueAttributeProps {\n attribute: Attribute<InsuranceValue>;\n}\n\nexport const InsuranceValueAttribute:\nFunctionalComponent<IInsuranceValueAttributeProps> = (props) => {\n const { attribute } = props;\n const value = `${attribute.value.base} * 10^${attribute.value.degree} ${attribute.value.location}`;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={value}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { TypeRelationship } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { l10n } from '../../../utils';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface ITypeRelationshipAttributeProps {\n attribute: Attribute<TypeRelationship>;\n}\n\nexport const TypeRelationshipAttribute:\nFunctionalComponent<ITypeRelationshipAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n {Object.keys(attribute.value).map((keyName) => (\n <RowValue\n name={keyName}\n value={attribute.value[keyName].toNumber() ? l10n.getString('yes') : l10n.getString('no')}\n />\n ))}\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ValuationRanking } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IValuationRankingAttributeProps {\n attribute: Attribute<ValuationRanking>;\n}\n\nconst getValueRank = (value: number): string => {\n let ratio = 1;\n\n if (value / 100 > 1) {\n ratio = 100;\n } else if (value / 10 > 1) {\n ratio = 10;\n }\n\n return `${value}/${5 * ratio}`;\n};\n\nexport const ValuationRankingAttribute:\nFunctionalComponent<IValuationRankingAttributeProps> = (props) => {\n const { attribute } = props;\n const values = Object.keys(attribute.value).map((keyName) => ([\n getValueRank(attribute.value[keyName]),\n <br />,\n ]));\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={values as any}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IAsStringAttributeProps {\n attribute: Attribute<string>;\n}\n\nexport const AsStringAttribute:\nFunctionalComponent<IAsStringAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value}\n monospace\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { UnstructuredName } from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IUnstructuredNameAttributeProps {\n attribute: Attribute<UnstructuredName>;\n}\n\nexport const UnstructuredNameAttribute:\nFunctionalComponent<IUnstructuredNameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.utf8String}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport type { ChallengePassword } from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IChallengePasswordAttributeProps {\n attribute: Attribute<ChallengePassword>;\n}\n\nexport const ChallengePasswordAttribute:\nFunctionalComponent<IChallengePasswordAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.toString()}\n />\n </BasicAttribute>\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 { h, FunctionalComponent } from '@stencil/core';\nimport { Name } from '@peculiar/asn1-x509';\nimport {\n TypeRelationship,\n ActivityDescription,\n WebGDPR,\n InsuranceValue,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n UnstructuredName,\n ChallengePassword,\n} from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { RowTitle } from '../row';\nimport { NameAttribute } from './name_attribute';\nimport { ActivityDescriptionAttribute } from './activity_description_attribute';\nimport { WebGdprAttribute } from './web_gdpr_attribute';\nimport { InsuranceValueAttribute } from './insurance_value_attribute';\nimport { TypeRelationshipAttribute } from './type_relationship_attribute';\nimport { ValuationRankingAttribute } from './valuation_ranking_attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { AsStringAttribute } from './as_string_attribute';\nimport { UnstructuredNameAttribute } from './unstructured_name_attribute';\nimport { ChallengePasswordAttribute } from './challenge_password_attribute';\n\ninterface IAttributesPtops extends\n IGeneralNameOptions,\n ILeiOptions,\n IAuthorityKeyIdentifierOptions,\n ISubjectKeyIdentifierOptions {\n attributes: Attribute<TAttributeValue>[];\n}\n\nexport const Attributes: FunctionalComponent<IAttributesPtops> = (props) => {\n const { attributes } = props;\n\n if (!attributes || !attributes.length) {\n return null;\n }\n\n return ([\n <RowTitle\n value=\"Attributes\"\n />,\n attributes.map((attribute) => {\n try {\n if (attribute.value instanceof Name) {\n return (\n <NameAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ActivityDescription) {\n return (\n <ActivityDescriptionAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof WebGDPR) {\n return (\n <WebGdprAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof InsuranceValue) {\n return (\n <InsuranceValueAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof TypeRelationship) {\n return (\n <TypeRelationshipAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ValuationRanking) {\n return (\n <ValuationRankingAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof UnstructuredName) {\n return (\n <UnstructuredNameAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ChallengePassword) {\n return (\n <ChallengePasswordAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (typeof attribute.value === 'string') {\n return (\n <AsStringAttribute\n attribute={attribute as any}\n />\n );\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n />\n );\n } catch (error) {\n console.error('Error render attribute:', attribute.asn.type);\n\n return null;\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 { h, FunctionalComponent } from '@stencil/core';\nimport { CRLReason, InvalidityDate, CertificateIssuer } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { dateShort, l10n, getStringByOID } from '../../utils';\nimport { IRevokedCertificate } from '../../crypto';\nimport { GeneralNamePart } from './extensions/general_name_part';\nimport { RowTitle, RowValue, TableRowTable } from './row';\n\ninterface IRevokedCertificatesProps extends IGeneralNameOptions {\n revokedCertificates: IRevokedCertificate[];\n}\n\nexport const RevokedCertificates: FunctionalComponent<IRevokedCertificatesProps> = (props) => {\n const {\n revokedCertificates,\n getDNSNameLink,\n getIPAddressLink,\n } = props;\n\n if (!revokedCertificates || !revokedCertificates.length) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('revokedCertificates')}\n />,\n revokedCertificates.map((certificate) => ([\n <RowValue\n name={l10n.getString('serialNumber')}\n value={Convert.ToHex(certificate.userCertificate)}\n monospace\n />,\n <RowValue\n name={l10n.getString('revocationDate')}\n value={dateShort(certificate.revocationDate.getTime())}\n />,\n (certificate.crlEntryExtensions && certificate.crlEntryExtensions.length && ([\n <RowValue\n name={`${l10n.getString('crlEntryExtensions')}:`}\n value=\"\"\n />,\n <TableRowTable>\n {\n certificate.crlEntryExtensions.map((extension) => {\n if (extension.value instanceof CRLReason) {\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={extension.value.toJSON() || extension.value.reason}\n />\n );\n }\n\n if (extension.value instanceof InvalidityDate) {\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={extension.value.value.getTime()}\n />\n );\n }\n\n if (extension.value instanceof CertificateIssuer && extension.value.length) {\n return ([\n <RowValue\n name={`${getStringByOID(extension.asn.extnID)}:`}\n value=\"\"\n />,\n extension.value.map((gn) => (\n <TableRowTable>\n <GeneralNamePart\n generalName={gn}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n />\n </TableRowTable>\n )),\n ]);\n }\n\n return (\n <RowValue\n name={getStringByOID(extension.asn.extnID)}\n value={Convert.ToHex(extension.asn.extnValue)}\n monospace\n />\n );\n })\n }\n </TableRowTable>,\n ])),\n <tr>\n <td colSpan={2} class=\"divider\">\n <span />\n </td>\n </tr>,\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 { h, FunctionalComponent } from '@stencil/core';\nimport { Convert } from 'pvtsutils';\n\nimport type { X509AttributeCertificate } from '../../crypto';\nimport { l10n, getStringByOID } from '../../utils';\nimport { RowTitle, RowValue } from './row';\nimport { GeneralNamePart } from './extensions/general_name_part';\n\ninterface IHolderProps {\n holder: X509AttributeCertificate['holder'];\n}\n\nexport const Holder: FunctionalComponent<IHolderProps> = (props) => {\n const { holder } = props;\n\n if (!holder) {\n return null;\n }\n\n const { baseCertificateID, objectDigestInfo } = holder;\n\n return [\n <RowTitle\n value={l10n.getString('holder')}\n />,\n baseCertificateID && ([\n baseCertificateID.issuer.map((item) => (\n <GeneralNamePart\n generalName={item}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n )),\n <tr>\n <td />\n <td />\n </tr>,\n <RowValue\n name={l10n.getString('serialNumber')}\n value={Convert.ToHex(baseCertificateID.serial)}\n monospace\n />,\n <tr>\n <td />\n <td />\n </tr>,\n ]),\n objectDigestInfo && ([\n <RowValue\n name={l10n.getString('digestInfo')}\n value=\"\"\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(objectDigestInfo.digestAlgorithm.algorithm)}\n />,\n <RowValue\n name={l10n.getString('value')}\n value={Convert.ToHex(objectDigestInfo.objectDigest)}\n monospace\n />,\n <RowValue\n name={l10n.getString('type')}\n value={objectDigestInfo.digestedObjectType}\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 { h, FunctionalComponent } from '@stencil/core';\n\nimport type { X509AttributeCertificate } from '../../crypto';\nimport { l10n } from '../../utils';\nimport { RowTitle } from './row';\nimport { GeneralNamePart } from './extensions/general_name_part';\n\ninterface IIssuerProps {\n issuer: X509AttributeCertificate['issuer'];\n}\n\nexport const Issuer: FunctionalComponent<IIssuerProps> = (props) => {\n const { issuer } = props;\n\n if (!issuer) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('issuer')}\n />,\n issuer.map((item) => (\n <GeneralNamePart\n generalName={item}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n )),\n ];\n};\n","@import '../../css/base.scss';\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-word;\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 Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\n\nimport { X509AttributeCertificate } from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n Attributes,\n Holder,\n Issuer,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type AttributeCertificateProp = string | X509AttributeCertificate;\n\n@Component({\n tag: 'peculiar-attribute-certificate-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class AttributeCertificateViewer {\n private certificateDecoded: X509AttributeCertificate;\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() certificate: AttributeCertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() 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 * 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: AttributeCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509AttributeCertificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509AttributeCertificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n this.certificateDecoded.parseAttributes();\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(\n newValue: AttributeCertificateProp,\n oldValue: AttributeCertificateProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof X509AttributeCertificate\n && oldValue instanceof X509AttributeCertificate\n ) {\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 // 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 attribute 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 attribute 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 <Issuer\n issuer={this.certificateDecoded.issuer}\n />\n\n <Holder\n holder={this.certificateDecoded.holder}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\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 <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","@import '../../css/base.scss';\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-word;\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 Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\n\nimport { CRL } from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n IssuerName,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n RevokedCertificates,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CrlProp = string | CRL;\n\n@Component({\n tag: 'peculiar-crl-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CrlViewer {\n private certificateDecoded: CRL;\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: CrlProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() 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 * 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: CrlProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof CRL) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new CRL(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 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 getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: CrlProp,\n oldValue: CrlProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof CRL\n && oldValue instanceof CRL\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\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 revocation list.\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 revocation list 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 <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\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 />\n\n <RevokedCertificates\n revokedCertificates={this.certificateDecoded.revokedCertificates}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n","@import '../../css/base.scss';\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-word;\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 Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\n\nimport { CSR } from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n PublicKey,\n Attributes,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CsrProp = string | CSR;\n\n@Component({\n tag: 'peculiar-csr-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CsrViewer {\n private certificateDecoded: CSR;\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: CsrProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\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 * 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: CsrProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof CSR) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new CSR(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseAttributes();\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(\n newValue: CsrProp,\n oldValue: CsrProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof CSR\n && oldValue instanceof CSR\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n private getAuthKeyIdParentLink = (value: string) => value;\n\n // eslint-disable-next-line class-methods-use-this\n private getAuthKeyIdSiblingsLink = (value: string) => 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 // 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 request.\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 request available.\n </Typography>\n </div>\n );\n }\n\n private getExtensionRequestAttribute() {\n if (!this.certificateDecoded) {\n return undefined;\n }\n\n return this.certificateDecoded.attributes\n .find((attribute) => attribute.asn.type === '1.2.840.113549.1.9.14');\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 const extensionRequestAttribute = this.getExtensionRequestAttribute();\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 <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 <Attributes\n attributes={this.certificateDecoded.attributes}\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 <Extensions\n extensions={extensionRequestAttribute?.value as any}\n title=\"Extension Request\"\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":";;;;;;;;;;GAkBO,IAAMA,eAA4D,SAACC,EAAOC,GACvE,IAAAC,EAAcF,EAAKE,UAE3B,OACEC,EAACC,SAAQ,CACPC,KAAK,OACLC,MAAOC,eAAeL,EAAUM,IAAIC,QAEtCR,EACAE,EAAA,UACEA,EAAA,MAAIO,QAAS,EAAGC,MAAM,WACpBR,EAAA,eAIR;;;;;;;GCfO,IAAMS,SAAgD,SAACZ,GACpD,IAAAK,EAASL,EAAKK,KAEtB,IAAKA,EAAM,CACT,OAAO,I,CAGT,OAAOA,EAAKQ,KAAI,SAACC,GAAyB,OACxCA,EAA0BD,KAAI,SAACE,GAAqB,OAClDZ,EAACC,SAAQ,CACPC,KAAMW,KAAKD,EAAsBN,OAASM,EAAsBN,KAChEH,MAAOS,EAAsBT,MAAMW,YAHa,GADZ,GAQ5C;;;;;;;GCdO,IAAMC,cAC8B,SAAClB,GAClC,IAAAE,EAAcF,EAAKE,UAE3B,OACEC,EAACJ,eAAc,CACbG,UAAWA,GAEXC,EAACS,SAAQ,CACPP,KAAMH,EAAUI,QAIxB;;;;;;;GCZO,IAAMa,6BAC6C,SAACnB,GACjD,IAAAE,EAAcF,EAAKE,UAE3B,OACEC,EAACJ,eAAc,CACbG,UAAWA,GAEXC,EAACC,SAAQ,CACPC,KAAK,iBACLC,MAAM,KAERH,EAACiB,gBAAe,CACdC,YAAanB,EAAUI,MAAMgB,cAC7BC,eAAgB,WAAM,UACtBC,iBAAkB,WAAM,YAG1BrB,EAACC,SAAQ,CACPC,KAAK,UACLC,MAAM,KAERH,EAACiB,gBAAe,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culiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-4079bbb5.js";import{T as Typography,B as Button}from"./button-35146bdd.js";import{A as ActionsIcon}from"./actions-8d745b2a.js";var buttonMenuCss='.sc-peculiar-button-menu-h{display:-ms-inline-flexbox;display:inline-flex;position:relative}.is_shown.sc-peculiar-button-menu-h .button_popover.sc-peculiar-button-menu:before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.is_shown.sc-peculiar-button-menu-h .popover.sc-peculiar-button-menu{display:block}.popover.sc-peculiar-button-menu{min-width:200px;position:absolute;top:100%;right:0;border-radius:4px;z-index:1;-webkit-box-shadow:var(--pv-shadow-light-medium);box-shadow:var(--pv-shadow-light-medium);background:var(--pv-color-white);padding:var(--pv-size-base-2) 0;margin:var(--pv-size-base) 0;display:none}.button_option.sc-peculiar-button-menu{width:100%;-ms-flex-pack:start;justify-content:flex-start;border-radius:0}.group.sc-peculiar-button-menu:not(:last-child){border-bottom:1px solid var(--pv-color-gray-5);padding-bottom:var(--pv-size-base-2);margin-bottom:var(--pv-size-base)}.group_title.sc-peculiar-button-menu{line-height:var(--pv-size-base-6);padding:0 var(--pv-size-base-2)}';var ButtonMenu=function(){function t(t){var r=this;registerInstance(this,t);this.handleClick=function(){r.open=!r.open};this.groups=[];this.open=false}t.prototype.render=function(){var t=this;return h(Host,{class:{is_shown:this.open}},h(Button,{class:"button_popover",onClick:this.handleClick,startIcon:h(ActionsIcon,null)}),h("div",{role:"dialog",tabIndex:-1,class:"popover","aria-hidden":String(this.open)},this.groups.map((function(r){return h("div",{class:"group"},h(Typography,{variant:"c2",color:"gray-9",class:"group_title"},r.title),r.options.map((function(r){return h(Button,{class:"button_option",startIcon:r.startIcon,href:r.href,onClick:function(e){e.stopPropagation();t.handleClick();if(r.onClick){r.onClick(e)}}},r.text)})))}))))};return t}();ButtonMenu.style=buttonMenuCss;var circularProgressCss=":host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:var(--pv-color-secondary)}.circle_progress_backdrop{stroke:var(--pv-color-gray-3)}";var CircularProgress=function(){function t(t){registerInstance(this,t);this.box=50;this.size=24;this.width=4}t.prototype.render=function(){return h(Host,null,h("div",{class:"circle_progress",style:{width:"".concat(this.size,"px"),height:"".concat(this.size,"px")}},h("svg",{class:"circle_progress_svg",viewBox:"0 0 ".concat(this.box," ").concat(this.box)},h("circle",{class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:"".concat(this.width,"px")}}),h("circle",{class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:"".concat(this.width,"px")}}))))};return t}();CircularProgress.style=circularProgressCss;var highlightWordsCss=":host{display:inline}::slotted(mark){background-color:var(--pv-color-attention-tint-4)}";var HighlightWords=function(){function t(t){registerInstance(this,t);this.tag="mark";this.search=undefined}t.prototype.componentDidLoad=function(){this.handleHighlightSearch()};t.prototype.componentDidUpdate=function(){this.handleHighlightSearch()};t.prototype.handleHighlightSearch=function(){var t=this.resetHighlightSearch(this.host.innerHTML);var r=t;if(this.search){var e=new RegExp("(".concat(this.search,")"),"gi");r=t.replace(e,"<".concat(this.tag,">$1</").concat(this.tag,">"))}this.host.innerHTML=r};t.prototype.resetHighlightSearch=function(t){var r=new RegExp("</?".concat(this.tag,">"),"g");return t.replace(r,"")};t.prototype.render=function(){return h(Host,null,h("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();HighlightWords.style=highlightWordsCss;export{ButtonMenu as peculiar_button_menu,CircularProgress as peculiar_circular_progress,HighlightWords as peculiar_highlight_words};
5
+ //# sourceMappingURL=peculiar-button-menu_3.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["buttonMenuCss","ButtonMenu","this","handleClick","_this","open","prototype","render","h","Host","class","is_shown","Button","onClick","startIcon","ActionsIcon","role","tabIndex","String","groups","map","group","Typography","variant","color","title","options","option","href","event","stopPropagation","text","circularProgressCss","CircularProgress","box","style","width","concat","size","height","viewBox","cx","cy","r","fill","strokeWidth","highlightWordsCss","HighlightWords","tag","componentDidLoad","handleHighlightSearch","componentDidUpdate","basicString","resetHighlightSearch","host","innerHTML","result","search","substring","RegExp","replace","source"],"sources":["src/components/button-menu/button-menu.scss?tag=peculiar-button-menu&encapsulation=scoped","src/components/button-menu/button-menu.tsx","src/components/circular-progress/circular-progress.scss?tag=peculiar-circular-progress&encapsulation=shadow","src/components/circular-progress/circular-progress.tsx","src/components/highlight-words/highlight-words.scss?tag=peculiar-highlight-words&encapsulation=shadow","src/components/highlight-words/highlight-words.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n position: relative;\n\n &.is_shown {\n .button_popover {\n &:before {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n content: '';\n }\n }\n\n .popover {\n display: block;\n }\n }\n}\n\n.popover {\n min-width: 200px;\n position: absolute;\n top: 100%;\n right: 0;\n border-radius: 4px;\n z-index: 1;\n box-shadow: var(--pv-shadow-light-medium);\n background: var(--pv-color-white);\n padding: var(--pv-size-base-2) 0;\n margin: var(--pv-size-base) 0;\n display: none;\n}\n\n.button_option {\n width: 100%;\n justify-content: flex-start;\n border-radius: 0;\n}\n\n.group {\n &:not(:last-child) {\n border-bottom: 1px solid var(--pv-color-gray-5);\n padding-bottom: var(--pv-size-base-2);\n margin-bottom: var(--pv-size-base);\n }\n}\n\n.group_title {\n line-height: var(--pv-size-base-6);\n padding: 0 var(--pv-size-base-2);\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 State,\n Prop,\n Host,\n} from '@stencil/core';\nimport { Button, ButtonProps } from '../button';\nimport { Typography } from '../typography';\nimport { ActionsIcon } from '../icons';\n\nexport interface ButtonMenuGroupOptions extends ButtonProps {\n text: string | string[];\n}\n\nexport interface ButtonMenuGroup {\n title: string | string[];\n options: ButtonMenuGroupOptions[];\n}\n\n@Component({\n tag: 'peculiar-button-menu',\n styleUrl: 'button-menu.scss',\n scoped: true,\n})\nexport class ButtonMenu {\n @Prop() groups: ButtonMenuGroup[] = [];\n\n @State() open: boolean = false;\n\n handleClick = () => {\n this.open = !this.open;\n };\n\n render() {\n return (\n <Host\n class={{\n is_shown: this.open,\n }}\n >\n <Button\n class=\"button_popover\"\n onClick={this.handleClick}\n startIcon={<ActionsIcon />}\n />\n <div\n role=\"dialog\"\n tabIndex={-1}\n class=\"popover\"\n aria-hidden={String(this.open)}\n >\n {this.groups.map((group) => (\n <div class=\"group\">\n <Typography\n variant=\"c2\"\n color=\"gray-9\"\n class=\"group_title\"\n >\n {group.title}\n </Typography>\n {group.options.map((option) => (\n <Button\n class=\"button_option\"\n startIcon={option.startIcon}\n href={option.href}\n onClick={(event) => {\n event.stopPropagation();\n\n this.handleClick();\n\n if (option.onClick) {\n option.onClick(event);\n }\n }}\n >\n {option.text}\n </Button>\n ))}\n </div>\n ))}\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: block;\n width: 100%;\n}\n\n@keyframes circular-rotate {\n to {\n transform: rotate(1turn);\n }\n}\n\n@keyframes circular-dash {\n 0% {\n stroke-dasharray: 1,200;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100,200;\n stroke-dashoffset: -15;\n }\n\n to {\n stroke-dasharray: 100,200;\n stroke-dashoffset: -120;\n }\n}\n\n.circle_progress {\n margin: 0 auto;\n}\n\n.circle_progress_svg {\n animation: circular-rotate 1.4s linear infinite;\n}\n\n.circle_progress_circle {\n stroke-linecap: round;\n animation: circular-dash 1.4s ease-in-out infinite;\n stroke-dasharray: 80,200;\n stroke-dashoffset: 0;\n stroke: var(--pv-color-secondary);\n}\n\n.circle_progress_backdrop {\n stroke: var(--pv-color-gray-3);\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 Host,\n h,\n Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'peculiar-circular-progress',\n styleUrl: 'circular-progress.scss',\n shadow: true,\n})\nexport class CircularProgress {\n /**\n * Width/height of progress circle.\n */\n @Prop() size: number = 24;\n\n /**\n * Stroke width of progress bar circle.\n */\n @Prop() width: number = 4;\n\n private box: number = 50;\n\n render() {\n return (\n <Host>\n <div\n class=\"circle_progress\"\n style={{\n width: `${this.size}px`,\n height: `${this.size}px`,\n }}\n >\n <svg\n class=\"circle_progress_svg\"\n viewBox={`0 0 ${this.box} ${this.box}`}\n >\n <circle\n class=\"circle_progress_backdrop\"\n cx={this.box / 2}\n cy={this.box / 2}\n r={(this.box / 2) - 5}\n fill=\"none\"\n style={{\n strokeWidth: `${this.width}px`,\n }}\n />\n <circle\n class=\"circle_progress_circle\"\n cx={this.box / 2}\n cy={this.box / 2}\n r={(this.box / 2) - 5}\n fill=\"none\"\n style={{\n strokeWidth: `${this.width}px`,\n }}\n />\n </svg>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline;\n}\n\n::slotted(mark) {\n background-color: var(--pv-color-attention-tint-4);\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, Host, h, Element, Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'peculiar-highlight-words',\n styleUrl: 'highlight-words.scss',\n shadow: true,\n})\nexport class HighlightWords {\n @Element() host: HTMLElement;\n\n @Prop() search: string;\n\n private tag: string = 'mark';\n\n componentDidLoad() {\n this.handleHighlightSearch();\n }\n\n componentDidUpdate() {\n this.handleHighlightSearch();\n }\n\n handleHighlightSearch() {\n const basicString = this.resetHighlightSearch(this.host.innerHTML);\n let result = basicString;\n\n if (this.search) {\n const substring = new RegExp(`(${this.search})`, 'gi');\n\n result = basicString.replace(substring, `<${this.tag}>$1</${this.tag}>`);\n }\n\n this.host.innerHTML = result;\n }\n\n resetHighlightSearch(source: string) {\n // eslint-disable-next-line no-useless-escape\n const substring = new RegExp(`<\\/?${this.tag}>`, 'g');\n\n return source.replace(substring, '');\n }\n\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":";;;qMAAA,IAAMA,cAAgB,s/B,ICiCTC,WAAU,W,kDAKrBC,KAAAC,YAAc,WACZC,EAAKC,MAAQD,EAAKC,I,cALgB,G,UAEX,K,CAMzBJ,EAAAK,UAAAC,OAAA,eAAAH,EAAAF,KACE,OACEM,EAACC,KAAI,CACHC,MAAO,CACLC,SAAUT,KAAKG,OAGjBG,EAACI,OAAM,CACLF,MAAM,iBACNG,QAASX,KAAKC,YACdW,UAAWN,EAACO,YAAW,QAEzBP,EAAA,OACEQ,KAAK,SACLC,UAAW,EACXP,MAAM,UAAS,cACFQ,OAAOhB,KAAKG,OAExBH,KAAKiB,OAAOC,KAAI,SAACC,GAAK,OACrBb,EAAA,OAAKE,MAAM,SACTF,EAACc,WAAU,CACTC,QAAQ,KACRC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PH,EAAAzC,UAAA4C,sBAAA,WACE,IAAME,EAAclD,KAAKmD,qBAAqBnD,KAAKoD,KAAKC,WACxD,IAAIC,EAASJ,EAEb,GAAIlD,KAAKuD,OAAQ,CACf,IAAMC,EAAY,IAAIC,OAAO,IAAAtB,OAAInC,KAAKuD,OAAM,KAAK,MAEjDD,EAASJ,EAAYQ,QAAQF,EAAW,IAAArB,OAAInC,KAAK8C,IAAG,SAAAX,OAAQnC,KAAK8C,IAAG,K,CAGtE9C,KAAKoD,KAAKC,UAAYC,C,EAGxBT,EAAAzC,UAAA+C,qBAAA,SAAqBQ,GAEnB,IAAMH,EAAY,IAAIC,OAAO,MAAAtB,OAAOnC,KAAK8C,IAAG,KAAK,KAEjD,OAAOa,EAAOD,QAAQF,EAAW,G,EAGnCX,EAAAzC,UAAAC,OAAA,WACE,OACEC,EAACC,KAAI,KACHD,EAAA,a,kIAtCmB,G"}
@@ -0,0 +1,12 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,a){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function c(e){try{s(a.next(e))}catch(e){i(e)}}function n(e){try{s(a["throw"](e))}catch(e){i(e)}}function s(e){e.done?r(e.value):o(e.value).then(c,n)}s((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,c;return c={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function n(e){return function(t){return s([e,t])}}function s(n){if(a)throw new TypeError("Generator is already executing.");while(c&&(c=0,n[0]&&(r=0)),r)try{if(a=1,o&&(i=n[0]&2?o["return"]:n[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;if(o=0,i)n=[n[0]&2,i.value];switch(n[0]){case 0:case 1:i=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;o=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!i||n[1]>i[0]&&n[1]<i[3])){r.label=n[1];break}if(n[0]===6&&r.label<i[1]){r.label=i[1];i=n;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(n);break}if(i[2])r.ops.pop();r.trys.pop();continue}n=t.call(e,r)}catch(e){n=[6,e];o=0}finally{a=i=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
2
+ /*!
3
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
+ */import{r as registerInstance,c as createEvent,h,H as Host}from"./index-4079bbb5.js";import{i as isPem,a as isX509Pem,b as isPkcs10Pem,c as isX509AttributePem,d as isX509CRLPem}from"./certification_request-5cadde9f.js";import"./download-57c5bf8f.js";import{X as X509Certificate}from"./x509_certificate-dfae6999.js";import{X as X509AttributeCertificate,C as CSR,a as CRL}from"./crl-11670c3e.js";import{T as Typography,B as Button}from"./button-35146bdd.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
+ */function readAsBinaryString(e){return new Promise((function(t,r){var a=new FileReader;a.onload=function(){return t({value:a.result,fileName:e.name,fileSize:e.size,sourceMime:e.type})};a.onerror=function(){return r(a.error)};a.readAsBinaryString(e)}))}var certificateDecoderCss="*{-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%}.textarea{min-height:300px;width:100%;border-radius:4px;border:1px solid var(--pv-color-gray-5);padding:14px;font-family:monospace;resize:vertical}.viewer{margin-top:var(--pv-size-base-12)}.controls{margin-top:var(--pv-size-base-2);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-2)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";var CertificateDecoder=function(){function e(e){var t=this;registerInstance(this,e);this.successParse=createEvent(this,"successParse",7);this.clearCertificate=createEvent(this,"clearCertificate",7);this.handleClickDecode=function(){var e=t.inputPaste.value;if(e){t.decode(e)}};this.handleClickClear=function(){t.clearValue()};this.handleChangeInputFile=function(e){return __awaiter(t,void 0,void 0,(function(){var t,r;return __generator(this,(function(a){switch(a.label){case 0:t=e.target;if(!t.files)return[3,2];return[4,readAsBinaryString(t.files[0])];case 1:r=a.sent();if(typeof r.value==="string"){this.decode(r.value)}t.value="";a.label=2;case 2:return[2]}}))}))};this.handleChangeExample=function(e){if(e.target.value){t.decode(e.target.value)}else{t.clearValue()}};this.handleDropFile=function(e){return __awaiter(t,void 0,void 0,(function(){var t,r;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();e.preventDefault();t=e.dataTransfer;if(!t.files)return[3,2];return[4,readAsBinaryString(t.files[0])];case 1:r=a.sent();if(typeof r.value==="string"){this.decode(r.value)}a.label=2;case 2:return[2]}}))}))};this.certificateExamples=undefined;this.defaultCertificate=undefined;this.certificateDecoded=undefined}e.prototype.componentDidLoad=function(){var e=this;if(this.defaultCertificate){setTimeout((function(){return e.decode(e.defaultCertificate)}),100)}};e.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()};e.prototype.setValue=function(e){this.certificateDecoded=e;this.inputPaste.value=e.exportAsPemFormatted();this.successParse.emit(e.exportAsBase64())};e.prototype.decode=function(e){var t=isPem(e);var r=isX509Pem(e);var a=isPkcs10Pem(e);var o=isX509AttributePem(e);var i=isX509CRLPem(e);var c;var n;if(t&&!(r||o||a||i)){this.clearValue();alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.");return}try{if(r){c=new X509Certificate(e)}if(o){c=new X509AttributeCertificate(e)}if(a){c=new CSR(e)}if(i){c=new CRL(e)}}catch(e){n=e}if(!c){try{c=new X509Certificate(e)}catch(e){n=e}}if(!c){try{c=new X509AttributeCertificate(e)}catch(e){n=e}}if(!c){try{c=new CSR(e)}catch(e){n=e}}if(!c){try{c=new CRL(e)}catch(e){n=e}}if(!c){this.clearValue();console.log(n);alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.")}else{this.setValue(c)}};e.prototype.render=function(){var e=this;var t;return h(Host,null,h("textarea",{placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:function(t){e.inputPaste=t},onDrop:this.handleDropFile}),h("div",{class:"controls"},h("div",{class:"control_row"},h(Typography,{variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),h("input",{type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl",onChange:this.handleChangeInputFile,value:""})),((t=this.certificateExamples)===null||t===void 0?void 0:t.length)&&h("div",{class:"control_row"},h(Typography,{variant:"b3",color:"secondary-tint-2"},"Load examples:"),h("select",{onChange:this.handleChangeExample},h("option",{value:""},"None"),this.certificateExamples.map((function(e){return h("option",{value:e.value},e.title)})))),h("div",{class:"control_row"},h(Button,{onClick:this.handleClickDecode},"Decode"),h(Button,{onClick:this.handleClickClear},"Clear"))),this.certificateDecoded instanceof X509Certificate&&h("peculiar-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof X509AttributeCertificate&&h("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof CSR&&h("peculiar-csr-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof CRL&&h("peculiar-crl-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}))};return e}();CertificateDecoder.style=certificateDecoderCss;export{CertificateDecoder as peculiar_certificate_decoder};
12
+ //# sourceMappingURL=peculiar-certificate-decoder.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["readAsBinaryString","file","Promise","resolve","reject","reader","FileReader","onload","value","result","fileName","name","fileSize","size","sourceMime","type","onerror","error","certificateDecoderCss","CertificateDecoder","this","handleClickDecode","_this","inputPaste","decode","handleClickClear","clearValue","handleChangeInputFile","event","__awaiter","element","target","files","_b","sent","handleChangeExample","handleDropFile","stopPropagation","preventDefault","dataTransfer","class_1","prototype","componentDidLoad","defaultCertificate","setTimeout","certificateDecoded","clearCertificate","emit","setValue","exportAsPemFormatted","successParse","exportAsBase64","certificate","isPem","validator.isPem","isX509Pem","validator.isX509Pem","isPkcs10Pem","validator.isPkcs10Pem","isX509AttributePem","validator.isX509AttributePem","isX509CRLPem","validator.isX509CRLPem","decoded","decodeError","alert","X509Certificate","X509AttributeCertificate","CSR","CRL","console","log","render","h","Host","placeholder","class","ref","el","onDrop","Typography","variant","color","accept","onChange","_a","certificateExamples","length","map","example","title","Button","onClick","download"],"sources":["src/utils/read_file.ts","src/components/certificate-decoder/certificate-decoder.scss?tag=peculiar-certificate-decoder&encapsulation=shadow","src/components/certificate-decoder/certificate-decoder.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\nexport type FileValue = string | ArrayBuffer | null;\nexport interface IFileDataType extends Blob {\n name?: string;\n mimeType?: string;\n lastModified?: number;\n}\nexport interface IReadFileResult {\n value: FileValue;\n fileName: string | undefined;\n fileSize: number | undefined;\n sourceMime: string | undefined;\n}\n\n/**\n * Read file as Binary string\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsBinaryString(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsBinaryString(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsBinaryString(file);\n });\n}\n\n/**\n * Read file as ArrayBuffer\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsArrayBuffer(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsArrayBuffer(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsArrayBuffer(file);\n });\n}\n\n/**\n * Read file as Data URL\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsDataUrl(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsDataUrl(file: IFileDataType): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsDataURL(file);\n });\n}\n\n/**\n * Read file as Text\n *\n * @example\n * ```js\n * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });\n * readAsText(file)\n * .then(result => console.log('Readed success', result))\n * .catch(err => console.log('An error occured when reading file', err));\n * ```\n */\n\nexport function readAsText(file: IFileDataType, options?: string): Promise<IReadFileResult> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve({\n value: reader.result,\n fileName: file.name,\n fileSize: file.size,\n sourceMime: file.type,\n });\n\n reader.onerror = () => reject(reader.error);\n\n reader.readAsText(file, options);\n });\n}\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n}\n\n.textarea {\n min-height: 300px;\n width: 100%;\n border-radius: 4px;\n border: 1px solid var(--pv-color-gray-5);;\n padding: 14px;\n font-family: monospace;\n resize: vertical;\n}\n\n.viewer {\n margin-top: var(--pv-size-base-12);\n}\n\n.controls {\n margin-top: var(--pv-size-base-2);\n display: flex;\n flex-direction: column;\n gap: var(--pv-size-base-2);\n}\n\n.control_row {\n display: flex;\n align-items: center;\n gap: var(--pv-size-base);\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 Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n} from '@stencil/core';\n\nimport { validator, readAsBinaryString } from '../../utils';\nimport {\n X509Certificate,\n X509AttributeCertificate,\n CSR,\n CRL,\n} from '../../crypto';\nimport { Button } from '../button';\nimport { Typography } from '../typography';\n\n@Component({\n tag: 'peculiar-certificate-decoder',\n styleUrl: 'certificate-decoder.scss',\n shadow: true,\n})\nexport class CertificateDecoder {\n private inputPaste?: HTMLTextAreaElement;\n\n /**\n * The example certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificateExamples?: {\n title: string;\n value: string;\n }[];\n\n /**\n * The default certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() defaultCertificate?: string;\n\n @State() certificateDecoded: X509Certificate | X509AttributeCertificate | CSR | CRL;\n\n /**\n * Emitted when the certificate has been successfully parsed.\n */\n @Event() successParse!: EventEmitter<string>;\n\n /**\n * Emitted when the certificate has been removed.\n */\n @Event() clearCertificate!: EventEmitter<void>;\n\n componentDidLoad() {\n if (this.defaultCertificate) {\n /**\n * Prevent Stencil warning about re-render\n */\n setTimeout(() => this.decode(this.defaultCertificate), 100);\n }\n }\n\n private handleClickDecode = () => {\n const { value } = this.inputPaste;\n\n if (value) {\n this.decode(value);\n }\n };\n\n private handleClickClear = () => {\n this.clearValue();\n };\n\n private handleChangeInputFile = async (event: any) => {\n const element = event.target;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n\n element.value = '';\n }\n };\n\n private handleChangeExample = (event: any) => {\n if (event.target.value) {\n this.decode(event.target.value);\n } else {\n this.clearValue();\n }\n };\n\n private handleDropFile = async (event: any) => {\n event.stopPropagation();\n event.preventDefault();\n\n const element = event.dataTransfer;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n }\n };\n\n clearValue() {\n this.inputPaste.value = '';\n this.certificateDecoded = null;\n this.clearCertificate.emit();\n }\n\n setValue(value: X509Certificate | X509AttributeCertificate | CSR | CRL) {\n this.certificateDecoded = value;\n this.inputPaste.value = value.exportAsPemFormatted();\n this.successParse.emit(value.exportAsBase64());\n }\n\n decode(certificate: string) {\n const isPem = validator.isPem(certificate);\n const isX509Pem = validator.isX509Pem(certificate);\n const isPkcs10Pem = validator.isPkcs10Pem(certificate);\n const isX509AttributePem = validator.isX509AttributePem(certificate);\n const isX509CRLPem = validator.isX509CRLPem(certificate);\n let decoded: X509Certificate | X509AttributeCertificate | CSR | CRL;\n let decodeError: Error;\n\n if (isPem && !(isX509Pem || isX509AttributePem || isPkcs10Pem || isX509CRLPem)) {\n this.clearValue();\n\n alert('Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');\n\n return;\n }\n\n try {\n if (isX509Pem) {\n decoded = new X509Certificate(certificate);\n }\n\n if (isX509AttributePem) {\n decoded = new X509AttributeCertificate(certificate);\n }\n\n if (isPkcs10Pem) {\n decoded = new CSR(certificate);\n }\n\n if (isX509CRLPem) {\n decoded = new CRL(certificate);\n }\n } catch (error) {\n decodeError = error;\n }\n\n if (!decoded) {\n try {\n decoded = new X509Certificate(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new X509AttributeCertificate(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new CSR(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new CRL(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n this.clearValue();\n\n console.log(decodeError);\n alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');\n } else {\n this.setValue(decoded);\n }\n }\n\n render() {\n return (\n <Host>\n <textarea\n placeholder=\"Certificate DER or PEM\"\n class=\"textarea t-b2 c-black\"\n ref={(el) => { this.inputPaste = el; }}\n onDrop={this.handleDropFile}\n />\n <div class=\"controls\">\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Drag or load file:\n </Typography>\n <input\n type=\"file\"\n accept=\"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl\"\n onChange={this.handleChangeInputFile}\n value=\"\"\n />\n </div>\n {this.certificateExamples?.length && (\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Load examples:\n </Typography>\n <select onChange={this.handleChangeExample}>\n <option value=\"\">None</option>\n {this.certificateExamples.map((example) => (\n <option value={example.value}>\n {example.title}\n </option>\n ))}\n </select>\n </div>\n )}\n <div class=\"control_row\">\n <Button\n onClick={this.handleClickDecode}\n >\n Decode\n </Button>\n <Button\n onClick={this.handleClickClear}\n >\n Clear\n </Button>\n </div>\n </div>\n {this.certificateDecoded instanceof X509Certificate && (\n <peculiar-certificate-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof X509AttributeCertificate && (\n <peculiar-attribute-certificate-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof CSR && (\n <peculiar-csr-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof CRL && (\n <peculiar-crl-viewer\n certificate={this.certificateD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KAClCK,EAAA,uBACErB,YAAahC,KAAKyB,mBAClB+B,MAAM,SACNiB,SAAQ,OAGXzE,KAAKyB,8BAA8BwB,KAClCI,EAAA,uBACErB,YAAahC,KAAKyB,mBAClB+B,MAAM,SACNiB,SAAQ,O,WAjQW,G"}
@@ -0,0 +1,5 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,a){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function n(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a["throw"](e))}catch(e){o(e)}}function c(e){e.done?r(e.value):i(e.value).then(n,s)}c((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,i,o,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return c([e,t])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(a=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{a=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
+ /*!
3
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
+ */import{r as registerInstance,h,H as Host}from"./index-4079bbb5.js";import{X as X509Certificate}from"./x509_certificate-dfae6999.js";import"./certification_request-5cadde9f.js";import"./download-57c5bf8f.js";import{B as BasicInformation,f as SubjectName,I as IssuerName,P as PublicKey,S as Signature,b as Thumbprints,E as Extensions,c as getLEILink,d as getDNSNameLink,e as getIPAddressLink,M as Miscellaneous}from"./miscellaneous-7793a310.js";import{T as Typography}from"./button-35146bdd.js";import"./link-ad24c3be.js";import"./download-0cc3077a.js";var certificateViewerCss="*{-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-word}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}";var CertificateViewer=function(){function e(e){var t=this;registerInstance(this,e);this.getAuthKeyIdParentLink=function(e){var r;return(r=t.authKeyIdParentLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",e)};this.getAuthKeyIdSiblingsLink=function(e){var r;return(r=t.authKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",e)};this.getSubjectKeyIdChildrenLink=function(e){var r;return(r=t.subjectKeyIdChildrenLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var r;return(r=t.subjectKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",e)};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}e.prototype.handleMediaQueryChange=function(e){this.mobileScreenView=e.matches};e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};e.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(e instanceof X509Certificate){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new X509Certificate(e)}else{return[2]}this.certificateDecoded.parseExtensions();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:t=r.sent();this.certificateDecodeError=t;console.error("Error certificate parse:",t);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};e.prototype.watchCertificateAndDecode=function(e,t){if(typeof e==="string"&&typeof t==="string"){if(e!==t){this.decodeCertificate(e)}return}if(e instanceof X509Certificate&&t instanceof X509Certificate){if(e.serialNumber!==t.serialNumber){this.decodeCertificate(e)}}};e.prototype.getIssuerDnLink=function(){return this.issuerDnLink};e.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h(Typography,null,"There was an error decoding this certificate."))};e.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h(Typography,null,"There is no certificate available."))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return h(Host,{"data-mobile-screen-view":String(this.mobileScreenView)},h("table",null,h(BasicInformation,Object.assign({},this.certificateDecoded)),h(SubjectName,{name:this.certificateDecoded.subject}),h(IssuerName,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),h(PublicKey,{publicKey:this.certificateDecoded.publicKey}),h(Signature,{signature:this.certificateDecoded.signature}),h(Thumbprints,{thumbprints:this.certificateDecoded.thumbprints}),h(Extensions,{extensions:this.certificateDecoded.extensions,getLEILink:getLEILink,getDNSNameLink:getDNSNameLink,getIPAddressLink:getIPAddressLink,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&h(Miscellaneous,{certificate:this.certificateDecoded})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}();CertificateViewer.style=certificateViewerCss;export{CertificateViewer as peculiar_certificate_viewer};
5
+ //# sourceMappingURL=peculiar-certificate-viewer.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["certificateViewerCss","CertificateViewer","this","getAuthKeyIdParentLink","value","_a","_this","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","class_1","prototype","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","certificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509Certificate","certificateDecoded","parseExtensions","getThumbprint","_b","sent","certificateDecodeError","error_1","console","error","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 '../../css/base.scss';\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-word;\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":";;;0iBAAA,IAAMA,qBAAuB,mhS,ICyChBC,kBAAiB,W,kDAsIpBC,KAAAC,uBAAyB,SAACC,G,MAAkB,OAAAC,EAAAC,EAAKC,uBAAmB,MAAAF,SAAA,SAAAA,EACxEG,QAAQ,gBAAiBJ,E,EAErBF,KAAAO,yBAA2B,SAACL,G,MAAkB,OAAAC,EAAAC,EAAKI,yBAAqB,MAAAL,SAAA,SAAAA,EAC5EG,QAAQ,gBAAiBJ,E,EAErBF,KAAAS,4BAA8B,SAACP,G,MAAkB,OAAAC,EAAAC,EAAKM,4BAAwB,MAAAP,SAAA,SAAAA,EAClFG,QAAQ,mBAAoBJ,E,EAExBF,KAAAW,4BAA8B,SAACT,G,MAAkB,OAAAC,EAAAC,EAAKQ,4BAAwB,MAAAT,SAAA,SAAAA,EAClFG,QAAQ,mBAAoBJ,E,qQA9E4B,qB,sBAEvB,M,uBAEC,I,CAE9BW,EAAAC,UAAAC,uBAAA,SAAuBC,GAC7BhB,KAAKiB,iBAAmBD,EAAME,O,EAGhCL,EAAAC,UAAAK,kBAAA,WACEnB,KAAKoB,kBAAkBpB,KAAKqB,aAEP,CACnBrB,KAAKsB,iBAAmBC,OAAOC,WAAWxB,KAAKyB,wBAC/C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B,OAAOrC,KAAK+C,kB,CAGd,IAAK/C,KAAKgC,mBAAoB,CAC5B,OAAOhC,KAAKmD,kB,CAGd,OACEH,EAACK,KAAI,2BACsBC,OAAOtD,KAAKiB,mBAErC+B,EAAA,aACEA,EAACO,iBAAgBC,OAAAC,OAAA,GACXzD,KAAKgC,qBAGXgB,EAACU,YAAW,CACVC,KAAM3D,KAAKgC,mBAAmB4B,UAGhCZ,EAACa,WAAU,CACTF,KAAM3D,KAAKgC,mBAAmB8B,OAC9BhB,aAAc9C,KAAK6C,oBAGrBG,EAACe,UAAS,CACRC,UAAWhE,KAAKgC,mBAAmBgC,YAGrChB,EAACiB,UAAS,CACRC,UAAWlE,KAAKgC,mBAAmBkC,YAGrClB,EAACmB,YAAW,CACVC,YAAapE,KAAKgC,mBAAmBoC,cAGvCpB,EAACqB,WAAU,CACTC,WAAYtE,KAAKgC,mBAAmBsC,WACpCC,WAAYA,WACZC,eAAgBA,eAChBC,iBAAkBA,iBAClBxE,uBAAwBD,KAAKC,uBAC7BM,yBAA0BP,KAAKO,yBAC/BE,4BAA6BT,KAAKS,4BAClCE,4BAA6BX,KAAKW,8BAGnCX,KAAK0E,UACJ1B,EAAC2B,cAAa,CACZtD,YAAarB,KAAKgC,sB,sJAhOF,G"}
@@ -0,0 +1,12 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,a){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function n(e){try{c(a.next(e))}catch(e){i(e)}}function s(e){try{c(a["throw"](e))}catch(e){i(e)}}function c(e){e.done?r(e.value):o(e.value).then(n,s)}c((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return c([e,t])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(a=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];o=0}finally{a=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var a=0,o=t.length,i;a<o;a++){if(i||!(a in t)){if(!i)i=Array.prototype.slice.call(t,0,a);i[a]=t[a]}}return e.concat(i||Array.prototype.slice.call(t))};
2
+ /*!
3
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
+ */import{h,r as registerInstance,c as createEvent,H as Host}from"./index-4079bbb5.js";import{X as X509Certificate}from"./x509_certificate-dfae6999.js";import{$ as l10n,a0 as dateShort,a1 as OIDs}from"./certification_request-5cadde9f.js";import"./download-57c5bf8f.js";import{T as Typography,B as Button}from"./button-35146bdd.js";import{D as DetailsIcon,L as LinkIcon,C as CrossIcon}from"./cross-9ec9a759.js";import{D as DownloadIcon}from"./download-0cc3077a.js";import{a as ArrowTopIcon,A as ArrowBottomIcon}from"./arrow_top-fc298828.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
+ */var CertificateSummary=function(e){var t=e.certificate,r=e.showIssuer;var a=function(e,t){return h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},e)),h("td",null,h(Typography,{variant:"b2",color:"black"},t)))};return h("table",null,h("tbody",null,a(l10n.getString("subjectName"),t.subjectToString()),r&&a(l10n.getString("issuerName"),t.issuerToString()),a(l10n.getString("serialNumber"),t.serialNumber),a(l10n.getString("version"),t.version),a(l10n.getString("validity"),t.validity),a(l10n.getString("issued"),dateShort(t.notBefore)),a(l10n.getString("expired"),dateShort(t.notAfter))))};var certificatesViewerCss="*{-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%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative}.search_section{padding:var(--pv-size-base-4);border-bottom:1px solid var(--pv-color-gray-4)}.input_search{height:var(--pv-size-base-8);width:100%;outline:none;background-color:var(--pv-color-gray-1);padding:0 var(--pv-size-base-2);border:1px solid var(--pv-color-gray-7);border-radius:4px;-webkit-transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s}.input_search::-webkit-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-moz-placeholder{color:var(--pv-color-gray-9)}.input_search:-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::placeholder{color:var(--pv-color-gray-9)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table td,table th{border-bottom:1px solid var(--pv-color-gray-4);vertical-align:top;text-align:left}table td:first-child,table th:first-child{padding-right:0;width:var(--pv-size-base-10)}table td:last-child,table th:last-child{padding-left:0;width:var(--pv-size-base-10)}table th{padding:var(--pv-size-base-2) var(--pv-size-base-4)}table th.col_action{padding:0}table td{padding:var(--pv-size-base-4)}table tr.m_expanded{background:var(--pv-color-gray-1)}table tr.m_expanded>td{border-bottom:none}table tr.expanded_summary{background:var(--pv-color-gray-1)}table tr.expanded_summary table{table-layout:initial}table tr.expanded_summary table td{border-bottom:none;padding:var(--pv-size-base-2)}table tr.expanded_summary table td:first-child{width:200px}table tr.expanded_summary table td:last-child{width:auto}.button_table_cell{margin-top:-3px}.status_wrapper{text-align:center;height:var(--pv-size-base-16);vertical-align:middle}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.modal_backdrop{background:var(--pv-color-black);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0;opacity:0.5}.modal_container{background:var(--pv-color-white);width:100%;display:-ms-flexbox;display:flex;max-height:calc(100% - 60px);-ms-flex-direction:column;flex-direction:column;margin:var(--pv-size-base-6);position:relative;outline:none;-webkit-box-shadow:var(--pv-shadow-dark-hight);box-shadow:var(--pv-shadow-dark-hight);overflow:hidden;border:0px;padding:0px;max-width:640px;border-radius:4px}.modal_header{padding:var(--pv-size-base-3) var(--pv-size-base-4);display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:var(--pv-size-base-2);border-bottom:1px solid var(--pv-color-gray-5)}.modal_content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tbody,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block;width:100% !important;padding:0;border:none}:host([data-mobile-screen-view=true]) thead{display:none}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table .expanded_summary{padding:0}:host([data-mobile-screen-view=true]) table .certificate_row{border-bottom:1px solid var(--pv-color-gray-5);padding:var(--pv-size-base-2) var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table .certificate_row_actions{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table .certificate_row_actions td{display:-ms-flexbox;display:flex;-ms-flex-pack:right;justify-content:right;gap:var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) .button_table_cell{margin-top:0}";var CertificatesViewer=function(){function e(e){var t=this;registerInstance(this,e);this.detailsOpen=createEvent(this,"detailsOpen",7);this.detailsClose=createEvent(this,"detailsClose",7);this.isHasRoots=false;this.handleClickDetails=function(e){t.certificateSelectedForDetails=e;t.detailsOpen.emit(e)};this.handleModalClose=function(){t.certificateSelectedForDetails=undefined;t.detailsClose.emit()};this.handleSearch=function(e){t.search=e.target.value.trim()};this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.search="";this.certificatesDecoded=[];this.expandedRow=undefined;this.certificateSelectedForDetails=undefined;this.isDecodeInProcess=true}e.prototype.handleMediaQueryChange=function(e){this.mobileScreenView=e.matches};e.prototype.componentWillLoad=function(){this.certificatesDecodeAndSet();{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};e.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};e.prototype.watchCertificates=function(e,t){if(JSON.stringify(e)!==JSON.stringify(t)){this.certificatesDecodeAndSet()}};e.prototype.certificatesDecodeAndSet=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,a,o,i,n;return __generator(this,(function(s){switch(s.label){case 0:e=false;if(!Array.isArray(this.certificates)){return[2]}t=[];r=0,a=this.certificates;s.label=1;case 1:if(!(r<a.length))return[3,6];o=a[r];s.label=2;case 2:s.trys.push([2,4,,5]);i=new X509Certificate(o.value);return[4,i.getThumbprint("SHA-1")];case 3:s.sent();t.push({body:i,tests:o.tests,name:o.name});if(!e&&i.isRoot){e=true}return[3,5];case 4:n=s.sent();console.error("Error certificate parse:",n);return[3,5];case 5:r++;return[3,1];case 6:this.isHasRoots=e;this.isDecodeInProcess=false;this.certificatesDecoded=t;return[2]}}))}))};e.prototype.handleClickDownloadAsPem=function(e){e.body.downloadAsPEM(e.name||e.body.commonName)};e.prototype.handleClickDownloadAsDer=function(e){e.body.downloadAsDER(e.name||e.body.commonName)};e.prototype.handleClickRow=function(e){var t=this.expandedRow===e;this.expandedRow=t?undefined:e};e.prototype.getMaxColSpanValue=function(){var e=5;if(!this.isHasRoots){e+=1}return e};e.prototype.renderCertificateButtonActions=function(e){var t=this;var r,a,o;var i=e.tests&&(e.tests.expired||e.tests.revoked||e.tests.valid);return h("peculiar-button-menu",{class:"button_table_cell",groups:__spreadArray([{title:l10n.getString("previewCertificate"),options:[{text:l10n.getString("viewDetails"),startIcon:h(DetailsIcon,null),onClick:function(){return t.handleClickDetails(e.body)}}]},{title:l10n.getString("downloadOptions"),options:[{text:l10n.getString("download.pem"),startIcon:h(DownloadIcon,null),onClick:function(){return t.handleClickDownloadAsPem(e)}},{text:l10n.getString("download.der"),startIcon:h(DownloadIcon,null),onClick:function(){return t.handleClickDownloadAsDer(e)}}]}],i?[{title:l10n.getString("testURLs"),options:__spreadArray(__spreadArray(__spreadArray([],((r=e.tests)===null||r===void 0?void 0:r.valid)?[{text:l10n.getString("valid"),href:e.tests.valid,startIcon:h(LinkIcon,null)}]:[],true),((a=e.tests)===null||a===void 0?void 0:a.revoked)?[{text:l10n.getString("revoked"),href:e.tests.revoked,startIcon:h(LinkIcon,null)}]:[],true),((o=e.tests)===null||o===void 0?void 0:o.expired)?[{text:l10n.getString("expired"),href:e.tests.expired,startIcon:h(LinkIcon,null)}]:[],true)}]:[],true)})};e.prototype.renderExpandedRow=function(e){var t=this.getMaxColSpanValue()-2;return h("tr",{class:"expanded_summary"},h("td",null),h("td",{colSpan:t},h(CertificateSummary,{certificate:e,showIssuer:!e.isRoot})),h("td",null))};e.prototype.renderCertificatesRows=function(){var e=this;var t=this.highlightWithSearch?this.search:"";var r=[];this.certificatesDecoded.forEach((function(a,o){var i=o===e.expandedRow;var n=OIDs[a.body.signature.algorithm]||a.body.signature.algorithm;if(e.filterWithSearch&&e.search){var s=[n,a.body.issuerCommonName,a.name,a.body.commonName,a.body.thumbprints["SHA-1"]].join(" ").toLowerCase();if(s.indexOf(e.search.toLowerCase())===-1){return}}if(e.mobileScreenView){r.push([h("tr",{class:{certificate_row:true,m_expanded:i},key:a.body.thumbprints["SHA-1"]},h("td",null,h("table",null,h("tbody",null,!e.isHasRoots&&h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("issuer"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.body.issuerCommonName)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("name"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.name||a.body.commonName)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("publicKey"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},n)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("fingerprint"),"  (SHA-1)")),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"])))),i&&e.renderExpandedRow(a.body),h("tr",{class:"certificate_row_actions"},h("td",null,e.renderCertificateButtonActions(a),h(Button,{onClick:e.handleClickRow.bind(e,o),startIcon:i?h(ArrowTopIcon,null):h(ArrowBottomIcon,null)})))))))]);return}r.push([h("tr",{class:{m_expanded:i},key:a.body.thumbprints["SHA-1"]},h("td",null,h(Button,{class:"button_table_cell",onClick:e.handleClickRow.bind(e,o),startIcon:i?h(ArrowTopIcon,null):h(ArrowBottomIcon,null)})),!e.isHasRoots&&h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.body.issuerCommonName))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.name||a.body.commonName))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},n))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"]))),h("td",null,e.renderCertificateButtonActions(a))),i&&e.renderExpandedRow(a.body)])}));return r};e.prototype.renderCertificateDetailsModal=function(){if(!this.certificateSelectedForDetails){return null}return h("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},h("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),h("div",{class:"modal_container",role:"dialog",part:"presentation_container"},h("header",{class:"modal_header"},h(Typography,{variant:"h4"},l10n.getString("certificateDetails")),h(Button,{onClick:this.handleModalClose,startIcon:h(CrossIcon,null)})),h("div",{class:"modal_content"},h("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails,mobileMediaQueryString:this.mobileMediaQueryString}))))};e.prototype.renderSearch=function(){if(!this.filterWithSearch&&!this.highlightWithSearch){return null}return h("div",{class:"search_section"},h("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search t-b3 c-black",disabled:!this.certificatesDecoded.length,placeholder:"Search"}))};e.prototype.renderEmptyState=function(){var e=this.getMaxColSpanValue();return h("tr",null,h("td",{class:"status_wrapper",colSpan:e},h(Typography,{variant:"b1"},"There are no certificates available.")))};e.prototype.renderEmptySearchState=function(){var e=this.getMaxColSpanValue();return h("tr",null,h("td",{class:"status_wrapper",colSpan:e},h(Typography,{variant:"b1"},"No results found for “",this.search,"“")))};e.prototype.renderLoadingState=function(){return h("div",{class:"loading_container"},h("peculiar-circular-progress",null))};e.prototype.renderTableBody=function(){if(this.isDecodeInProcess){return null}if(!this.certificatesDecoded.length){return this.renderEmptyState()}var e=this.renderCertificatesRows();if(this.search&&!e.length){return this.renderEmptySearchState()}return e};e.prototype.render=function(){return h(Host,{"data-mobile-screen-view":String(this.mobileScreenView)},this.renderSearch(),h("table",null,!this.mobileScreenView&&h("thead",null,h("tr",null,h("th",null),!this.isHasRoots&&h("th",{class:"col_issuer"},h(Typography,{variant:"s2"},l10n.getString("issuer"))),h("th",{class:"col_name"},h(Typography,{variant:"s2"},l10n.getString("name"))),h("th",{class:"col_public_key"},h(Typography,{variant:"s2"},l10n.getString("publicKey"))),h("th",{class:"col_fingerprint"},h(Typography,{variant:"s2"},l10n.getString("fingerprint"),"  (SHA-1)")),h("th",null))),h("tbody",null,this.renderTableBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())};Object.defineProperty(e,"watchers",{get:function(){return{certificates:["watchCertificates"]}},enumerable:false,configurable:true});return e}();CertificatesViewer.style=certificatesViewerCss;export{CertificatesViewer as peculiar_certificates_viewer};
12
+ //# sourceMappingURL=peculiar-certificates-viewer.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CertificateSummary","props","certificate","showIssuer","renderRow","name","value","h","Typography","variant","color","l10n","getString","subjectToString","issuerToString","serialNumber","version","validity","dateShort","notBefore","notAfter","certificatesViewerCss","CertificatesViewer","this","isHasRoots","handleClickDetails","_this","certificateSelectedForDetails","detailsOpen","emit","handleModalClose","undefined","detailsClose","handleSearch","event","search","target","trim","class_1","prototype","handleMediaQueryChange","mobileScreenView","matches","componentWillLoad","certificatesDecodeAndSet","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","watchCertificates","newValue","oldValue","JSON","stringify","hasRoots","Array","isArray","certificates","data","_d","_i","length","decoded","X509Certificate","getThumbprint","_e","sent","push","body","tests","isRoot","console","error","error_1","isDecodeInProcess","certificatesDecoded","handleClickDownloadAsPem","downloadAsPEM","commonName","handleClickDownloadAsDer","downloadAsDER","handleClickRow","index","isExpandedRowClicked","expandedRow","getMaxColSpanValue","colSpan","renderCertificateButtonActions","isHasTestURLs","expired","revoked","valid","class","groups","__spreadArray","title","options","text","startIcon","DetailsIcon","onClick","DownloadIcon","_a","href","LinkIcon","_b","_c","renderExpandedRow","renderCertificatesRows","searchHighlight","highlightWithSearch","content","forEach","isExpandedRow","publicKeyValue","OIDs","signature","algorithm","filterWithSearch","certificateStringForSearch","issuerCommonName","thumbprints","join","toLowerCase","indexOf","certificate_row","m_expanded","key","Button","ArrowTopIcon","ArrowBottomIcon","renderCertificateDetailsModal","role","part","CrossIcon","renderSearch","onInput","type","disabled","placeholder","renderEmptyState","renderEmptySearchState","renderLoadingState","renderTableBody","certificatesRows","render","Host","String"],"sources":["src/components/certificate-summary/certificate-summary.tsx","src/components/certificates-viewer/certificates-viewer.scss?tag=peculiar-certificates-viewer&encapsulation=shadow","src/components/certificates-viewer/certificates-viewer.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 { X509Certificate } from '../../crypto';\nimport { dateShort, l10n } from '../../utils';\nimport { Typography } from '../typography';\n\ninterface CertificateSummaryProps {\n certificate: X509Certificate;\n showIssuer?: boolean;\n}\n\nexport const CertificateSummary: FunctionalComponent<CertificateSummaryProps> = (props) => {\n const {\n certificate,\n showIssuer,\n } = props;\n\n const renderRow = (name: string | string[], value: string | number) => (\n <tr>\n <td>\n <Typography\n variant=\"b2\"\n color=\"gray-9\"\n >\n {name}\n </Typography>\n </td>\n <td>\n <Typography\n variant=\"b2\"\n color=\"black\"\n >\n {value}\n </Typography>\n </td>\n </tr>\n );\n\n return (\n <table>\n <tbody>\n {renderRow(\n l10n.getString('subjectName'),\n certificate.subjectToString(),\n )}\n {showIssuer && renderRow(\n l10n.getString('issuerName'),\n certificate.issuerToString(),\n )}\n\n {renderRow(\n l10n.getString('serialNumber'),\n certificate.serialNumber,\n )}\n {renderRow(\n l10n.getString('version'),\n certificate.version,\n )}\n {renderRow(\n l10n.getString('validity'),\n certificate.validity,\n )}\n {renderRow(\n l10n.getString('issued'),\n dateShort(certificate.notBefore),\n )}\n {renderRow(\n l10n.getString('expired'),\n dateShort(certificate.notAfter),\n )}\n </tbody>\n </table>\n );\n};\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n word-wrap: break-word;\n min-width: 280px;\n overflow: auto;\n position: relative;\n}\n\n.search_section {\n padding: var(--pv-size-base-4);\n border-bottom: 1px solid var(--pv-color-gray-4);\n}\n\n.input_search {\n height: var(--pv-size-base-8);\n width: 100%;\n outline: none;\n background-color: var(--pv-color-gray-1);\n padding: 0 var(--pv-size-base-2);\n border: 1px solid var(--pv-color-gray-7);\n border-radius: 4px;\n transition: background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;\n &::placeholder {\n color: var(--pv-color-gray-9);\n }\n}\n\ntable {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n\n td, th {\n border-bottom: 1px solid var(--pv-color-gray-4);\n vertical-align: top;\n text-align: left;\n\n &:first-child {\n padding-right: 0;\n width: var(--pv-size-base-10);\n }\n &:last-child {\n padding-left: 0;\n width: var(--pv-size-base-10);\n }\n }\n\n th {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n\n &.col_action {\n padding: 0;\n }\n }\n\n td {\n padding: var(--pv-size-base-4);\n }\n\n tr {\n &.m_expanded {\n background: var(--pv-color-gray-1);\n\n > td {\n border-bottom: none;\n }\n }\n\n &.expanded_summary {\n background: var(--pv-color-gray-1);\n\n table {\n table-layout: initial;\n\n td {\n border-bottom: none;\n padding: var(--pv-size-base-2);\n\n &:first-child {\n width: 200px;\n }\n\n &:last-child {\n width: auto;\n }\n }\n }\n }\n }\n}\n\n.button_table_cell {\n margin-top: -3px;\n}\n\n.status_wrapper {\n text-align: center;\n height: var(--pv-size-base-16);\n vertical-align: middle;\n}\n\n.modal_wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n animation: fadeIn 200ms;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.modal_backdrop {\n background: var(--pv-color-black);\n z-index: -1;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.5;\n}\n\n.modal_container {\n background: var(--pv-color-white);\n width: 100%;\n display: flex;\n max-height: calc(100% - 60px);\n flex-direction: column;\n margin: var(--pv-size-base-6);\n position: relative;\n outline: none;\n box-shadow: var(--pv-shadow-dark-hight);\n overflow: hidden;\n border: 0px;\n padding: 0px;\n max-width: 640px;\n border-radius: 4px;\n}\n\n.modal_header {\n padding: var(--pv-size-base-3) var(--pv-size-base-4);\n display: flex;\n flex: 0 0 auto;\n -webkit-box-pack: justify;\n justify-content: space-between;\n gap: var(--pv-size-base-2);\n border-bottom: 1px solid var(--pv-color-gray-5);\n}\n\n.modal_content {\n flex: 1 1 auto;\n overflow: auto;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tbody, tr, td {\n display: block;\n width: 100% !important;\n padding: 0;\n border: none;\n }\n\n thead {\n display: none;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n }\n\n .expanded_summary {\n padding: 0;\n }\n\n .certificate_row {\n border-bottom: 1px solid var(--pv-color-gray-5);\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n }\n\n .certificate_row_actions {\n padding-top: var(--pv-size-base-6);\n\n td {\n display: flex;\n justify-content: right;\n gap: var(--pv-size-base-4);\n }\n }\n }\n\n .button_table_cell {\n margin-top: 0;\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 Event,\n EventEmitter,\n Build,\n} from '@stencil/core';\n\nimport { X509Certificate } from '../../crypto';\nimport { OIDs } from '../../constants/oids';\nimport { l10n } from '../../utils';\nimport { Typography } from '../typography';\nimport { CertificateSummary } from '../certificate-summary';\nimport { Button } from '../button';\nimport {\n DownloadIcon,\n LinkIcon,\n DetailsIcon,\n ArrowBottomIcon,\n ArrowTopIcon,\n CrossIcon,\n} from '../icons';\n\nexport interface ICertificate {\n value: string;\n name?: string;\n tests?: {\n valid?: string;\n revoked?: string;\n expired?: string;\n };\n}\n\ninterface ICertificateDecoded {\n body: X509Certificate;\n tests?: ICertificate['tests'];\n name?: string;\n}\n\n@Component({\n tag: 'peculiar-certificates-viewer',\n styleUrl: 'certificates-viewer.scss',\n shadow: true,\n})\nexport class CertificatesViewer {\n private isHasRoots: boolean = false;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * List of certificates values for decode and show in the list.\n * <br />\n * **NOTE**: If you do not provide a `name` value when\n * invocing the component it will take the first Subject CN value.\n * <br />\n * **NOTE**: If you do not provide a `tests` this column will be ommited from the rendered page.\n * <br />\n * **NOTE**: If the supplied certificates are self-signed the issuer column will be ommited.\n */\n @Prop() certificates: ICertificate[] = [];\n\n /**\n * Use filter in the list when search is changed.\n */\n @Prop() filterWithSearch: boolean = true;\n\n /**\n * Use highlight chapters in the list when search is changed.\n */\n @Prop() highlightWithSearch: boolean = true;\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 /**\n * Emitted when the user open certificate details modal.\n */\n @Event() detailsOpen!: EventEmitter<X509Certificate>;\n\n /**\n * Emitted when the user close certificate details modal.\n */\n @Event() detailsClose!: EventEmitter<void>;\n\n @State() mobileScreenView: boolean = false;\n\n @State() search: string = '';\n\n @State() certificatesDecoded: ICertificateDecoded[] = [];\n\n @State() expandedRow?: number;\n\n @State() certificateSelectedForDetails?: X509Certificate;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.certificatesDecodeAndSet();\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 @Watch('certificates')\n watchCertificates(newValue: ICertificate[], oldValue: ICertificate[]) {\n /**\n * Prevent rerender after set the same `certificates` prop.\n */\n if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {\n this.certificatesDecodeAndSet();\n }\n }\n\n async certificatesDecodeAndSet() {\n let hasRoots = false;\n\n if (!Array.isArray(this.certificates)) {\n return;\n }\n\n const data: ICertificateDecoded[] = [];\n\n // eslint-disable-next-line no-restricted-syntax\n for (const certificate of this.certificates) {\n try {\n const decoded = new X509Certificate(certificate.value);\n\n await decoded.getThumbprint('SHA-1');\n\n data.push({\n body: decoded,\n tests: certificate.tests,\n name: certificate.name,\n });\n\n if (!hasRoots && decoded.isRoot) {\n hasRoots = true;\n }\n } catch (error) {\n console.error('Error certificate parse:', error);\n }\n }\n\n this.isHasRoots = hasRoots;\n this.isDecodeInProcess = false;\n this.certificatesDecoded = data;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsPem(certificate: ICertificateDecoded) {\n certificate.body.downloadAsPEM(certificate.name || certificate.body.commonName);\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsDer(certificate: ICertificateDecoded) {\n certificate.body.downloadAsDER(certificate.name || certificate.body.commonName);\n }\n\n private handleClickDetails = (certificate: X509Certificate) => {\n this.certificateSelectedForDetails = certificate;\n this.detailsOpen.emit(certificate);\n };\n\n private handleModalClose = () => {\n this.certificateSelectedForDetails = undefined;\n\n this.detailsClose.emit();\n };\n\n private handleClickRow(index: number) {\n const isExpandedRowClicked = this.expandedRow === index;\n\n this.expandedRow = isExpandedRowClicked\n ? undefined\n : index;\n }\n\n private handleSearch = (event: any) => {\n this.search = event.target.value.trim();\n };\n\n private getMaxColSpanValue() {\n let colSpan = 5;\n\n if (!this.isHasRoots) {\n colSpan += 1;\n }\n\n return colSpan;\n }\n\n private renderCertificateButtonActions(certificate: ICertificateDecoded) {\n const isHasTestURLs = certificate.tests\n && (certificate.tests.expired || certificate.tests.revoked || certificate.tests.valid);\n\n return (\n <peculiar-button-menu\n class=\"button_table_cell\"\n groups={[\n {\n title: l10n.getString('previewCertificate'),\n options: [\n {\n text: l10n.getString('viewDetails'),\n startIcon: <DetailsIcon />,\n onClick: () => this.handleClickDetails(certificate.body),\n },\n ],\n },\n {\n title: l10n.getString('downloadOptions'),\n options: [\n {\n text: l10n.getString('download.pem'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsPem(certificate),\n },\n {\n text: l10n.getString('download.der'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsDer(certificate),\n },\n ],\n },\n ...(isHasTestURLs ? [{\n title: l10n.getString('testURLs'),\n options: [\n ...(certificate.tests?.valid ? [{\n text: l10n.getString('valid'),\n href: certificate.tests.valid,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.revoked ? [{\n text: l10n.getString('revoked'),\n href: certificate.tests.revoked,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.expired ? [{\n text: l10n.getString('expired'),\n href: certificate.tests.expired,\n startIcon: <LinkIcon />,\n }] : []),\n ],\n }] : []),\n ]}\n />\n );\n }\n\n private renderExpandedRow(certificate: X509Certificate) {\n const colSpan = this.getMaxColSpanValue() - 2;\n\n return (\n <tr class=\"expanded_summary\">\n <td />\n <td colSpan={colSpan}>\n <CertificateSummary\n certificate={certificate}\n showIssuer={!certificate.isRoot}\n />\n </td>\n <td />\n </tr>\n );\n }\n\n private renderCertificatesRows() {\n const searchHighlight = this.highlightWithSearch\n ? this.search\n : '';\n const content = [];\n\n this.certificatesDecoded.forEach((certificate, index) => {\n const isExpandedRow = index === this.expandedRow;\n const publicKeyValue = OIDs[certificate.body.signature.algorithm]\n || certificate.body.signature.algorithm;\n\n if (this.filterWithSearch && this.search) {\n const certificateStringForSearch = [\n publicKeyValue,\n certificate.body.issuerCommonName,\n certificate.name,\n certificate.body.commonName,\n certificate.body.thumbprints['SHA-1'],\n ]\n .join(' ')\n .toLowerCase();\n\n if (certificateStringForSearch.indexOf(this.search.toLowerCase()) === -1) {\n return;\n }\n }\n\n if (this.mobileScreenView) {\n content.push([\n <tr\n class={{\n certificate_row: true,\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <table>\n <tbody>\n {!this.isHasRoots && (\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('issuer')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n )}\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('name')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('publicKey')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('fingerprint')}\n &nbsp; (SHA-1)\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n {isExpandedRow && this.renderExpandedRow(certificate.body)}\n <tr class=\"certificate_row_actions\">\n <td>\n {this.renderCertificateButtonActions(certificate)}\n <Button\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>,\n ]);\n\n return;\n }\n\n content.push([\n <tr\n class={{\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <Button\n class=\"button_table_cell\"\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n {!this.isHasRoots && (\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n )}\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n {this.renderCertificateButtonActions(certificate)}\n </td>\n </tr>,\n isExpandedRow && this.renderExpandedRow(certificate.body),\n ]);\n });\n\n return content;\n }\n\n private renderCertificateDetailsModal() {\n if (!this.certificateSelectedForDetails) {\n return null;\n }\n\n return (\n <div\n class=\"modal_wrapper\"\n role=\"presentation\"\n aria-hidden=\"false\"\n part=\"presentation\"\n >\n <div\n class=\"modal_backdrop\"\n onClick={this.handleModalClose}\n aria-hidden=\"true\"\n />\n <div\n class=\"modal_container\"\n role=\"dialog\"\n part=\"presentation_container\"\n >\n <header class=\"modal_header\">\n <Typography\n variant=\"h4\"\n >\n {l10n.getString('certificateDetails')}\n </Typography>\n <Button\n onClick={this.handleModalClose}\n startIcon={<CrossIcon />}\n />\n </header>\n <div class=\"modal_content\">\n <peculiar-certificate-viewer\n certificate={this.certificateSelectedForDetails}\n mobileMediaQueryString={this.mobileMediaQueryString}\n />\n </div>\n </div>\n </div>\n );\n }\n\n private renderSearch() {\n if (!this.filterWithSearch && !this.highlightWithSearch) {\n return null;\n }\n\n return (\n <div class=\"search_section\">\n <input\n onInput={this.handleSearch}\n type=\"search\"\n value=\"\"\n class=\"input_search t-b3 c-black\"\n disabled={!this.certificatesDecoded.length}\n placeholder=\"Search\"\n />\n </div>\n );\n }\n\n private renderEmptyState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n There are no certificates available.\n </Typography>\n </td>\n </tr>\n );\n }\n\n private renderEmptySearchState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n No results found for &ldquo;\n {this.search}\n &ldquo;\n </Typography>\n </td>\n </tr>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderLoadingState() {\n return (\n <div class=\"loading_container\">\n <peculiar-circular-progress />\n </div>\n );\n }\n\n private renderTableBody() {\n if (this.isDecodeInProcess) {\n return null;\n }\n\n if (!this.certificatesDecoded.length) {\n return this.renderEmptyState();\n }\n\n const certificatesRows = this.renderCertificatesRows();\n\n if (this.search && !certificatesRows.length) {\n return this.renderEmptySearchState();\n }\n\n return certificatesRows;\n }\n\n render() {\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n {this.renderSearch()}\n <table>\n {!this.mobileScreenView && (\n <thead>\n <tr>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n {!this.isHasRoots && (\n <th class=\"col_issuer\">\n <Typography variant=\"s2\">\n {l10n.getString('issuer')}\n </Typography>\n </th>\n )}\n <th class=\"col_name\">\n <Typography variant=\"s2\">\n {l10n.getString('name')}\n </Typography>\n </th>\n <th class=\"col_public_key\">\n <Typography variant=\"s2\">\n {l10n.getString('publicKey')}\n </Typography>\n </th>\n <th class=\"col_fingerprint\">\n <Typography variant=\"s2\">\n {l10n.getString('fingerprint')}\n &nbsp; (SHA-1)\n </Typography>\n </th>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n </tr>\n </thead>\n )}\n <tbody>\n {this.renderTableBody()}\n </tbody>\n </table>\n\n {this.renderCertificateDetailsModal()}\n {this.isDecodeInProcess && this.renderLoadingState()}\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;GAkBO,IAAMA,mBAAmE,SAACC,GAE7E,IAAAC,EAEED,EAAKC,YADPC,EACEF,EAAKE,WAET,IAAMC,EAAY,SAACC,EAAyBC,GAAsB,OAChEC,EAAA,UACEA,EAAA,UACEA,EAACC,WAAU,CACTC,QAAQ,KACRC,MAAM,UAELL,IAGLE,EAAA,UACEA,EAACC,WAAU,CACTC,QAAQ,KACRC,MAAM,SAELJ,IAfyD,EAqBlE,OACEC,EAAA,aACEA,EAAA,aACGH,EACCO,KAAKC,UAAU,eACfV,EAAYW,mBAEbV,GAAcC,EACbO,KAAKC,UAAU,cACfV,EAAYY,kBAGbV,EACCO,KAAKC,UAAU,gBACfV,EAAYa,cAEbX,EACCO,KAAKC,UAAU,WACfV,EAAYc,SAEbZ,EACCO,KAAKC,UAAU,YACfV,EAAYe,UAEbb,EACCO,KAAKC,UAAU,UACfM,UAAUhB,EAAYiB,YAEvBf,EACCO,KAAKC,UAAU,WACfM,UAAUhB,EAAYkB,YAKhC,EChFA,IAAMC,sBAAwB,2/W,ICwDjBC,mBAAkB,W,0JACrBC,KAAAC,WAAsB,MAkItBD,KAAAE,mBAAqB,SAACvB,GAC5BwB,EAAKC,8BA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,CAC3C,OAAO1C,KAAK0H,wB,CAGd,OAAOG,C,EAGT9G,EAAAC,UAAA8G,OAAA,WACE,OACE9I,EAAC+I,KAAI,2BACsBC,OAAOhI,KAAKkB,mBAEpClB,KAAKoH,eACNpI,EAAA,cACIgB,KAAKkB,kBACLlC,EAAA,aACEA,EAAA,UAEEA,EAAA,YACEgB,KAAKC,YACLjB,EAAA,MAAIyF,MAAM,cACRzF,EAACC,WAAU,CAACC,QAAQ,MACjBE,KAAKC,UAAU,YAItBL,EAAA,MAAIyF,MAAM,YACRzF,EAACC,WAAU,CAACC,QAAQ,MACjBE,KAAKC,UAAU,UAGpBL,EAAA,MAAIyF,MAAM,kBACRzF,EAACC,WAAU,CAACC,QAAQ,MACjBE,KAAKC,UAAU,eAGpBL,EAAA,MAAIyF,MAAM,mBACRzF,EAACC,WAAU,CAACC,QAAQ,MACjBE,KAAKC,UAAU,eAAc,cAKlCL,EAAA,aAINA,EAAA,aACGgB,KAAK4H,oBAIT5H,KAAKgH,gCACLhH,KAAKuD,mBAAqBvD,KAAK2H,qB,+IA7kBT,G"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{r as registerInstance,h,H as Host}from"./index-4079bbb5.js";import{B as Button}from"./button-35146bdd.js";import{a as ArrowTopIcon,A as ArrowBottomIcon}from"./arrow_top-fc298828.js";var textHiderCss=".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";var TextHider=function(){function e(e){registerInstance(this,e);this.opened=false}e.prototype.render=function(){var e=this;return h(Host,{"aria-expanded":String(this.opened)},h("div",{class:"content"},h("slot",null)),h(Button,{class:"action",onClick:function(){e.opened=!e.opened},startIcon:this.opened?h(ArrowTopIcon,{color:"secondary"}):h(ArrowBottomIcon,{color:"secondary"})}))};return e}();TextHider.style=textHiderCss;export{TextHider as peculiar_text_hider};
5
+ //# sourceMappingURL=peculiar-text-hider.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["textHiderCss","TextHider","prototype","render","_this","this","h","Host","String","opened","class","Button","onClick","startIcon","ArrowTopIcon","color","ArrowBottomIcon"],"sources":["src/components/text-hider/text-hider.scss?tag=peculiar-text-hider&encapsulation=scoped","src/components/text-hider/text-hider.tsx"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n gap: var(--pv-size-base-4);\n\n &[aria-expanded=\"true\"] {\n .content {\n white-space: initial;\n }\n }\n}\n\n.content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n}\n\n.action {\n flex-shrink: 0;\n margin-top: calc(var(--pv-size-base) * -1);\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 Host,\n h,\n State,\n} from '@stencil/core';\nimport { Button } from '../button';\nimport { ArrowBottomIcon, ArrowTopIcon } from '../icons';\n\n@Component({\n tag: 'peculiar-text-hider',\n styleUrl: 'text-hider.scss',\n scoped: true,\n})\nexport class TextHider {\n @State() opened: boolean = false;\n\n render() {\n return (\n <Host\n aria-expanded={String(this.opened)}\n >\n <div class=\"content\">\n <slot />\n </div>\n <Button\n class=\"action\"\n onClick={() => { this.opened = !this.opened; }}\n startIcon={this.opened ? <ArrowTopIcon color=\"secondary\" /> : <ArrowBottomIcon color=\"secondary\" />}\n />\n </Host>\n );\n }\n}\n"],"mappings":";;;6LAAA,IAAMA,aAAe,qZ,ICsBRC,UAAS,W,mDACO,K,CAE3BA,EAAAC,UAAAC,OAAA,eAAAC,EAAAC,KACE,OACEC,EAACC,KAAI,iBACYC,OAAOH,KAAKI,SAE3BH,EAAA,OAAKI,MAAM,WACTJ,EAAA,cAEFA,EAACK,OAAM,CACLD,MAAM,SACNE,QAAS,WAAQR,EAAKK,QAAUL,EAAKK,MAAO,EAC5CI,UAAWR,KAAKI,OAASH,EAACQ,aAAY,CAACC,MAAM,cAAiBT,EAACU,gBAAe,CAACD,MAAM,gB,WAdzE,G"}