@peculiar/certificates-viewer 4.7.0 → 4.7.1-alpha.4

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 (215) hide show
  1. package/components/attribute-certificate-viewer.js +4 -2
  2. package/components/attribute-certificate-viewer.js.map +1 -1
  3. package/components/attribute.js +1 -1
  4. package/components/certificate-viewer.js +3 -2
  5. package/components/certificate-viewer.js.map +1 -1
  6. package/components/crl-viewer.js +4 -2
  7. package/components/crl-viewer.js.map +1 -1
  8. package/components/csr-viewer.js +1 -1
  9. package/components/download.js +1674 -45
  10. package/components/download.js.map +1 -1
  11. package/components/index2.js +3 -2
  12. package/components/index2.js.map +1 -1
  13. package/components/issuer_name.js +1 -1
  14. package/components/miscellaneous.js +4 -79
  15. package/components/miscellaneous.js.map +1 -1
  16. package/components/peculiar-certificate-decoder.js +32 -16
  17. package/components/peculiar-certificate-decoder.js.map +1 -1
  18. package/components/peculiar-certificates-viewer.js +1 -1
  19. package/components/peculiar-ssh-certificate-viewer.d.ts +11 -0
  20. package/components/peculiar-ssh-certificate-viewer.js +12 -0
  21. package/components/peculiar-ssh-certificate-viewer.js.map +1 -0
  22. package/components/peculiar-text-hider.js +1 -32
  23. package/components/peculiar-text-hider.js.map +1 -1
  24. package/components/pkcs10_certificate_request.js +2 -1
  25. package/components/pkcs10_certificate_request.js.map +1 -1
  26. package/components/row.js +87 -0
  27. package/components/row.js.map +1 -0
  28. package/components/ssh-certificate-viewer.js +210 -0
  29. package/components/ssh-certificate-viewer.js.map +1 -0
  30. package/components/subject_name.js +2 -2
  31. package/components/text-hider.js +40 -0
  32. package/components/text-hider.js.map +1 -0
  33. package/components/utils.js +39 -0
  34. package/components/utils.js.map +1 -0
  35. package/dist/cjs/extension-DTtJlxk8.js +110 -0
  36. package/dist/cjs/{extension-CGZpfI3W.js.map → extension-DTtJlxk8.js.map} +1 -1
  37. package/dist/cjs/index.cjs.js +4 -4
  38. package/dist/cjs/loader.cjs.js +1 -1
  39. package/dist/cjs/{miscellaneous-D_RAtkZz.js → miscellaneous-DCeacaAw.js} +147 -147
  40. package/dist/cjs/{miscellaneous-D_RAtkZz.js.map → miscellaneous-DCeacaAw.js.map} +1 -1
  41. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.cjs.js.map +1 -0
  42. package/dist/cjs/{peculiar-attribute-certificate-viewer_4.cjs.entry.js → peculiar-attribute-certificate-viewer_5.cjs.entry.js} +215 -45
  43. package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -0
  44. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -21
  45. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  46. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
  47. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
  48. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +23 -23
  49. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  50. package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
  51. package/dist/cjs/peculiar.cjs.js +1 -1
  52. package/dist/cjs/pkcs10_certificate_request-DE-0eDXE.js +146 -0
  53. package/dist/cjs/{pkcs10_certificate_request-BQkkkT42.js.map → pkcs10_certificate_request-DE-0eDXE.js.map} +1 -1
  54. package/dist/cjs/{certification_request-DISQwgjn.js → ssh_certificate-D2q_p49O.js} +1676 -16
  55. package/dist/cjs/ssh_certificate-D2q_p49O.js.map +1 -0
  56. package/dist/cjs/{x509_certificate-DGRpZGA2.js → x509_certificate-Cto1q-eu.js} +29 -29
  57. package/dist/cjs/{x509_certificate-DGRpZGA2.js.map → x509_certificate-Cto1q-eu.js.map} +1 -1
  58. package/dist/cjs/{x509_crl-DMvJk_81.js → x509_crl-CgixMZrh.js} +32 -32
  59. package/dist/cjs/{x509_crl-DMvJk_81.js.map → x509_crl-CgixMZrh.js.map} +1 -1
  60. package/dist/collection/collection-manifest.json +1 -0
  61. package/dist/collection/components/certificate-decoder/certificate-decoder.js +10 -6
  62. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  63. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js +29 -0
  64. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js.map +1 -0
  65. package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js +23 -0
  66. package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js.map +1 -0
  67. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js +26 -0
  68. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js.map +1 -0
  69. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js +26 -0
  70. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js.map +1 -0
  71. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +194 -0
  72. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js.map +1 -0
  73. package/dist/collection/crypto/index.js +1 -0
  74. package/dist/collection/crypto/index.js.map +1 -1
  75. package/dist/collection/crypto/ssh_certificate.js +74 -0
  76. package/dist/collection/crypto/ssh_certificate.js.map +1 -0
  77. package/dist/collection/locales/en.json +6 -1
  78. package/dist/collection/utils/download.js +5 -0
  79. package/dist/collection/utils/download.js.map +1 -1
  80. package/dist/esm/{extension-CUOKUt7o.js → extension-DmlhftES.js} +3 -3
  81. package/dist/{esm-es5/extension-CUOKUt7o.js.map → esm/extension-DmlhftES.js.map} +1 -1
  82. package/dist/esm/index.js +2 -2
  83. package/dist/esm/loader.js +1 -1
  84. package/dist/esm/{miscellaneous-DVlekgVM.js → miscellaneous-BTlqwN5_.js} +4 -4
  85. package/dist/esm/{miscellaneous-DVlekgVM.js.map → miscellaneous-BTlqwN5_.js.map} +1 -1
  86. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
  87. package/dist/esm/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +185 -16
  88. package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  89. package/dist/esm/peculiar-certificate-decoder.entry.js +14 -10
  90. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  91. package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
  92. package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
  93. package/dist/esm/peculiar.js +1 -1
  94. package/dist/esm/{pkcs10_certificate_request-B9Q42jiE.js → pkcs10_certificate_request-B5C1NYFc.js} +3 -3
  95. package/dist/esm/{pkcs10_certificate_request-B9Q42jiE.js.map → pkcs10_certificate_request-B5C1NYFc.js.map} +1 -1
  96. package/dist/esm/{certification_request-CSS3OhZq.js → ssh_certificate-PCn0WXhQ.js} +1676 -17
  97. package/dist/esm/ssh_certificate-PCn0WXhQ.js.map +1 -0
  98. package/dist/esm/{x509_certificate-fWXLCtc8.js → x509_certificate-BiAmXJ4S.js} +4 -4
  99. package/dist/esm/{x509_certificate-fWXLCtc8.js.map → x509_certificate-BiAmXJ4S.js.map} +1 -1
  100. package/dist/esm/{x509_crl-Dq33Vv-q.js → x509_crl-CCeoLLUZ.js} +5 -5
  101. package/dist/esm/{x509_crl-Dq33Vv-q.js.map → x509_crl-CCeoLLUZ.js.map} +1 -1
  102. package/dist/esm-es5/{extension-CUOKUt7o.js → extension-DmlhftES.js} +2 -2
  103. package/dist/{esm/extension-CUOKUt7o.js.map → esm-es5/extension-DmlhftES.js.map} +1 -1
  104. package/dist/esm-es5/index.js +1 -1
  105. package/dist/esm-es5/loader.js +2 -2
  106. package/dist/esm-es5/{miscellaneous-DVlekgVM.js → miscellaneous-BTlqwN5_.js} +2 -2
  107. package/dist/esm-es5/{miscellaneous-DVlekgVM.js.map → miscellaneous-BTlqwN5_.js.map} +1 -1
  108. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
  109. package/dist/esm-es5/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +31 -3
  110. package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  111. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  112. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  113. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  114. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  115. package/dist/esm-es5/peculiar.js +1 -1
  116. package/dist/esm-es5/{pkcs10_certificate_request-B9Q42jiE.js → pkcs10_certificate_request-B5C1NYFc.js} +2 -2
  117. package/dist/esm-es5/{pkcs10_certificate_request-B9Q42jiE.js.map → pkcs10_certificate_request-B5C1NYFc.js.map} +1 -1
  118. package/dist/esm-es5/{certification_request-CSS3OhZq.js → ssh_certificate-PCn0WXhQ.js} +8 -8
  119. package/dist/esm-es5/ssh_certificate-PCn0WXhQ.js.map +1 -0
  120. package/dist/esm-es5/{x509_certificate-fWXLCtc8.js → x509_certificate-BiAmXJ4S.js} +4 -4
  121. package/dist/esm-es5/{x509_certificate-fWXLCtc8.js.map → x509_certificate-BiAmXJ4S.js.map} +1 -1
  122. package/dist/esm-es5/{x509_crl-Dq33Vv-q.js → x509_crl-CCeoLLUZ.js} +2 -2
  123. package/dist/esm-es5/{x509_crl-Dq33Vv-q.js.map → x509_crl-CCeoLLUZ.js.map} +1 -1
  124. package/dist/peculiar/index.esm.js +1 -1
  125. package/dist/peculiar/locales/en.json +6 -1
  126. package/dist/peculiar/{p-17ebc78c.system.entry.js → p-24861cf6.system.entry.js} +2 -2
  127. package/dist/peculiar/{p-a193f8fd.system.entry.js → p-46c17c8d.system.entry.js} +2 -2
  128. package/dist/peculiar/{p-a4e74904.entry.js → p-71cb31c6.entry.js} +47 -19
  129. package/dist/peculiar/p-71cb31c6.entry.js.map +1 -0
  130. package/dist/peculiar/{p-4cc72a56.entry.js → p-71eab586.entry.js} +2 -2
  131. package/dist/peculiar/p-7273601a.entry.js +5 -0
  132. package/dist/peculiar/p-7273601a.entry.js.map +1 -0
  133. package/dist/peculiar/p-83bfd8e5.system.entry.js +5 -0
  134. package/dist/peculiar/p-83bfd8e5.system.entry.js.map +1 -0
  135. package/dist/peculiar/{p-e3967e76.entry.js → p-98219569.entry.js} +2 -2
  136. package/dist/peculiar/p-9MJeDspO.system.js.map +1 -0
  137. package/dist/peculiar/p-AjXipXSl.system.js +12 -0
  138. package/dist/peculiar/{p-CgCUixvk.system.js.map → p-AjXipXSl.system.js.map} +1 -1
  139. package/dist/peculiar/{p-CEzxVCEh.system.js → p-B2FH4Pv2.system.js} +2 -2
  140. package/dist/peculiar/{p-CEzxVCEh.system.js.map → p-B2FH4Pv2.system.js.map} +1 -1
  141. package/dist/peculiar/{p-DcTXA-2R.system.js → p-B5GO6_Ut.system.js} +18 -18
  142. package/dist/peculiar/{p-DcTXA-2R.system.js.map → p-B5GO6_Ut.system.js.map} +1 -1
  143. package/dist/peculiar/{p-Bsy7Sqzl.system.js.map → p-B82-c-xr.system.js.map} +1 -1
  144. package/dist/peculiar/p-BGASC3UX.system.js +1 -1
  145. package/dist/peculiar/p-BHpSDBz_.system.js.map +1 -0
  146. package/dist/peculiar/p-BwlcJAh0.js +12 -0
  147. package/dist/peculiar/{p-CZuaTO2G.js.map → p-BwlcJAh0.js.map} +1 -1
  148. package/dist/peculiar/{p-D8TC0Na9.system.js.map → p-CSz5liuX.system.js.map} +1 -1
  149. package/dist/peculiar/{p-tl0v45Y7.js → p-CstRxc9v.js} +2 -2
  150. package/dist/peculiar/{p-tl0v45Y7.js.map → p-CstRxc9v.js.map} +1 -1
  151. package/dist/peculiar/p-DMDALRLP.system.js +135 -0
  152. package/dist/peculiar/p-DMDALRLP.system.js.map +1 -0
  153. package/dist/peculiar/{p-DTz3NA_M.system.js → p-DPbpwYQ8.system.js} +3 -3
  154. package/dist/peculiar/{p-DTz3NA_M.system.js.map → p-DPbpwYQ8.system.js.map} +1 -1
  155. package/dist/peculiar/{p-CoPYW15U.js → p-Db41gPxb.js} +4 -4
  156. package/dist/peculiar/{p-CoPYW15U.js.map → p-Db41gPxb.js.map} +1 -1
  157. package/dist/peculiar/{p-DKooqn40.js → p-DnOLjFJP.js} +39 -39
  158. package/dist/peculiar/{p-DKooqn40.js.map → p-DnOLjFJP.js.map} +1 -1
  159. package/dist/peculiar/{p-CSS3OhZq.js → p-PCn0WXhQ.js} +13 -13
  160. package/dist/peculiar/p-PCn0WXhQ.js.map +1 -0
  161. package/dist/peculiar/{p-7fTYvx_V.system.js → p-SjVQtfgD.system.js} +5 -5
  162. package/dist/peculiar/{p-7fTYvx_V.system.js.map → p-SjVQtfgD.system.js.map} +1 -1
  163. package/dist/peculiar/{p-e7c60082.system.entry.js → p-cc01a2da.system.entry.js} +47 -19
  164. package/dist/peculiar/p-cc01a2da.system.entry.js.map +1 -0
  165. package/dist/peculiar/{p-BTn-wukS.system.js → p-dOkqMp-O.system.js} +2 -2
  166. package/dist/peculiar/p-dOkqMp-O.system.js.map +1 -0
  167. package/dist/peculiar/{p-BG_D4qzJ.js → p-h7XP7otl.js} +3 -3
  168. package/dist/peculiar/{p-BG_D4qzJ.js.map → p-h7XP7otl.js.map} +1 -1
  169. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.esm.js.map +1 -0
  170. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
  171. package/dist/peculiar/peculiar.esm.js +1 -1
  172. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +4 -4
  173. package/dist/types/components/ssh-certificate-viewer/-components/basic_information.d.ts +21 -0
  174. package/dist/types/components/ssh-certificate-viewer/-components/miscellaneous.d.ts +14 -0
  175. package/dist/types/components/ssh-certificate-viewer/-components/public_key.d.ts +14 -0
  176. package/dist/types/components/ssh-certificate-viewer/-components/signature_key.d.ts +14 -0
  177. package/dist/types/components/ssh-certificate-viewer/ssh-certificate-viewer.d.ts +43 -0
  178. package/dist/types/components.d.ts +43 -0
  179. package/dist/types/crypto/index.d.ts +1 -0
  180. package/dist/types/crypto/ssh_certificate.d.ts +30 -0
  181. package/dist/types/utils/download.d.ts +3 -0
  182. package/dist/types/utils/l10n.d.ts +5 -0
  183. package/hydrate/index.js +1869 -27
  184. package/hydrate/index.mjs +1869 -27
  185. package/package.json +3 -2
  186. package/dist/cjs/certification_request-DISQwgjn.js.map +0 -1
  187. package/dist/cjs/extension-CGZpfI3W.js +0 -110
  188. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +0 -1
  189. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +0 -1
  190. package/dist/cjs/pkcs10_certificate_request-BQkkkT42.js +0 -146
  191. package/dist/esm/certification_request-CSS3OhZq.js.map +0 -1
  192. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  193. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  194. package/dist/esm-es5/certification_request-CSS3OhZq.js.map +0 -1
  195. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  196. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  197. package/dist/peculiar/p-BTn-wukS.system.js.map +0 -1
  198. package/dist/peculiar/p-CSS3OhZq.js.map +0 -1
  199. package/dist/peculiar/p-CZuaTO2G.js +0 -12
  200. package/dist/peculiar/p-CgCUixvk.system.js +0 -12
  201. package/dist/peculiar/p-DLsQGkmT.system.js.map +0 -1
  202. package/dist/peculiar/p-D_WeukQa.system.js +0 -135
  203. package/dist/peculiar/p-D_WeukQa.system.js.map +0 -1
  204. package/dist/peculiar/p-a4e74904.entry.js.map +0 -1
  205. package/dist/peculiar/p-ce006f1c.system.entry.js +0 -5
  206. package/dist/peculiar/p-ce006f1c.system.entry.js.map +0 -1
  207. package/dist/peculiar/p-e7c60082.system.entry.js.map +0 -1
  208. package/dist/peculiar/p-f465afe6.entry.js +0 -5
  209. package/dist/peculiar/p-f465afe6.entry.js.map +0 -1
  210. package/dist/peculiar/p-tBL0ekYY.system.js.map +0 -1
  211. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +0 -1
  212. /package/dist/peculiar/{p-17ebc78c.system.entry.js.map → p-24861cf6.system.entry.js.map} +0 -0
  213. /package/dist/peculiar/{p-a193f8fd.system.entry.js.map → p-46c17c8d.system.entry.js.map} +0 -0
  214. /package/dist/peculiar/{p-4cc72a56.entry.js.map → p-71eab586.entry.js.map} +0 -0
  215. /package/dist/peculiar/{p-e3967e76.entry.js.map → p-98219569.entry.js.map} +0 -0
@@ -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","camelCaseToWords","TableRowTable","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","ExtensionRequestAttribute","extensions","e","Extension","AsnConvert","serialize","Extensions","getLEILink","PrivateKeyPossessionStatementAttribute","certificateRaw","cert","Convert","ToHex","signer","serialNumber","issuer","certificate","ToBase64","Attributes","attributes","length","RowTitle","Name","ExtensionRequest","ActivityDescription","WebGDPR","InsuranceValue","TypeRelationship","ValuationRanking","UnstructuredName","ChallengePassword","PrivateKeyPossessionStatement","_a","console","error","RevokedCertificates","revokedCertificates","userCertificate","dateShort","revocationDate","getTime","crlEntryExtensions","extension","CRLReason","extnID","toJSON","reason","InvalidityDate","CertificateIssuer","gn","extnValue","Holder","holder","baseCertificateID","objectDigestInfo","item","serial","digestAlgorithm","algorithm","objectDigest","digestedObjectType","Issuer","certificateViewerCss","AttributeCertificateViewer","class_1","hostRef","_this","this","mobileMediaQueryString","mobileScreenView","isDecodeInProcess","getAuthKeyIdParentLink","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","prototype","handleMediaQueryChange","event","matches","componentWillLoad","decodeCertificate","mobileMediaQuery","window","matchMedia","addEventListener","bind","disconnectedCallback","removeEventListener","X509AttributeCertificate","certificateDecoded","parseExtensions","parseAttributes","getThumbprint","_b","sent","certificateDecodeError","error_1","watchCertificateAndDecode","newValue","oldValue","renderErrorState","Typography","renderEmptyState","render","Host","String","BasicInformation","assign","Signature","signature","Thumbprints","thumbprints","download","Miscellaneous","certificateChainViewerCss","CertificateChainViewer","selectedCertificateIndex","certificates","role","Array","from","index","onClick","commonName","CrlViewer","class_2","X509Crl","error_2","getIssuerDnLink","issuerDnLink","IssuerName","CsrViewer","class_3","Pkcs10CertificateRequest","error_3","SubjectName","subject","PublicKey","publicKey","SshBasicInformation","validity","notBefore","notAfter","keyId","principals","criticalOptions","undefined","join","SshPublicKey","key","thumbprint","collapse","SshSignatureKey","SshMiscellaneous","Button","startIcon","DownloadIcon","downloadAsSSH","SshCertificateViewer","class_4","SshCertificate","parsePublicKey","parseSignatureKey","error_4","signatureKey"],"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/extension_request_attribute.tsx","src/components/certificate-details-parts/attributes/private_key_possession_statement_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-chain-viewer/certificate-chain-viewer.scss?tag=peculiar-certificate-chain-viewer&encapsulation=shadow","src/components/certificate-chain-viewer/certificate-chain-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","src/components/ssh-certificate-viewer/-components/basic_information.tsx","src/components/ssh-certificate-viewer/-components/public_key.tsx","src/components/ssh-certificate-viewer/-components/signature_key.tsx","src/components/ssh-certificate-viewer/-components/miscellaneous.tsx","src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-ssh-certificate-viewer&encapsulation=shadow","src/components/ssh-certificate-viewer/ssh-certificate-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';\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';\nimport { OIDs } from '../../../constants/oids';\nimport { RowValue } from '../row';\n\ninterface INamePartProps {\n name: Name;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\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';\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';\nimport { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } 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={camelCaseToWords('codeAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('codeId')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeId}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('shortName')}\n value={attribute.value.shortName}\n />\n <RowValue\n name={camelCaseToWords('shortDescription')}\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';\nimport type { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } 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={camelCaseToWords('assessmentAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentLocation')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentLocation}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentRef')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentRef}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('dataStorageTerritory')}\n value={attribute.value.dataStorageTerritory}\n />\n <RowValue\n name={camelCaseToWords('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';\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';\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';\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 unknown as string[]}\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 { 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';\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';\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 { ExtensionRequest } from '@peculiar/asn1-pkcs9';\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { Extension, TExtensionValue } from '../../../crypto/extension';\nimport { Attribute } from '../../../crypto/attribute';\nimport { Extensions } from '../../certificate-details-parts';\nimport { TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IExtensionRequestAttributeProps {\n attribute: Attribute<ExtensionRequest>;\n}\n\nexport const ExtensionRequestAttribute:\nFunctionalComponent<IExtensionRequestAttributeProps> = (props) => {\n const { attribute } = props;\n let extensions: Extension<TExtensionValue>[];\n\n if (attribute.value) {\n extensions = attribute.value.map((e) => new Extension(AsnConvert.serialize(e)));\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <TableRowTable>\n <Extensions\n extensions={extensions}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n getLEILink={() => ''}\n />\n </TableRowTable>\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 { AsnConvert } from '@peculiar/asn1-schema';\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { PrivateKeyPossessionStatement } from '@peculiar/asn1-private-key-stmt';\nimport { Convert } from 'pvtsutils';\nimport { Attribute } from '../../../crypto/attribute';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface IPrivateKeyPossessionStatementAttributeProps {\n attribute: Attribute<PrivateKeyPossessionStatement>;\n}\n\nexport const PrivateKeyPossessionStatementAttribute:\nFunctionalComponent<IPrivateKeyPossessionStatementAttributeProps> = (props) => {\n const { attribute } = props;\n const certificateRaw = attribute.value.cert\n ? AsnConvert.serialize(attribute.value.cert)\n : null;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Serial Number\"\n value={Convert.ToHex(attribute.value.signer.serialNumber)}\n monospace\n />\n <RowValue\n name=\"Issuer\"\n value=\"\"\n />\n <TableRowTable>\n <NamePart\n name={attribute.value.signer.issuer}\n />\n </TableRowTable>\n {certificateRaw && [\n <RowValue\n name=\"Certificate\"\n value=\"\"\n />,\n <TableRowTable>\n <peculiar-certificate-viewer\n certificate={Convert.ToBase64(certificateRaw)}\n />\n </TableRowTable>,\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 ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { PrivateKeyPossessionStatement } from '@peculiar/asn1-private-key-stmt';\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';\nimport { ExtensionRequestAttribute } from './extension_request_attribute';\nimport { PrivateKeyPossessionStatementAttribute } from './private_key_possession_statement_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 unknown as Attribute<Name>}\n />\n );\n }\n\n if (attribute.value instanceof ExtensionRequest) {\n return (\n <ExtensionRequestAttribute\n attribute={attribute as unknown as Attribute<ExtensionRequest>}\n />\n );\n }\n\n if (attribute.value instanceof ActivityDescription) {\n return (\n <ActivityDescriptionAttribute\n attribute={attribute as unknown as Attribute<ActivityDescription>}\n />\n );\n }\n\n if (attribute.value instanceof WebGDPR) {\n return (\n <WebGdprAttribute\n attribute={attribute as unknown as Attribute<WebGDPR>}\n />\n );\n }\n\n if (attribute.value instanceof InsuranceValue) {\n return (\n <InsuranceValueAttribute\n attribute={attribute as unknown as Attribute<InsuranceValue>}\n />\n );\n }\n\n if (attribute.value instanceof TypeRelationship) {\n return (\n <TypeRelationshipAttribute\n attribute={attribute as unknown as Attribute<TypeRelationship>}\n />\n );\n }\n\n if (attribute.value instanceof ValuationRanking) {\n return (\n <ValuationRankingAttribute\n attribute={attribute as unknown as Attribute<ValuationRanking>}\n />\n );\n }\n\n if (attribute.value instanceof UnstructuredName) {\n return (\n <UnstructuredNameAttribute\n attribute={attribute as unknown as Attribute<UnstructuredName>}\n />\n );\n }\n\n if (attribute.value instanceof ChallengePassword) {\n return (\n <ChallengePasswordAttribute\n attribute={attribute as unknown as Attribute<ChallengePassword>}\n />\n );\n }\n\n if (attribute.value instanceof PrivateKeyPossessionStatement) {\n return (\n <PrivateKeyPossessionStatementAttribute\n attribute={attribute as unknown as Attribute<PrivateKeyPossessionStatement>}\n />\n );\n }\n\n if (typeof attribute.value === 'string') {\n return (\n <AsStringAttribute\n attribute={attribute as unknown as Attribute<string>}\n />\n );\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n />\n );\n } catch {\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 {\n CRLReason, InvalidityDate, CertificateIssuer,\n} from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\nimport {\n dateShort, l10n, getStringByOID,\n} from '../../utils';\nimport { IRevokedCertificate } from '../../crypto';\nimport { GeneralNamePart } from './extensions/general_name_part';\nimport {\n RowTitle, RowValue, TableRowTable,\n} 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';\nimport type { X509AttributeCertificate } from '../../crypto';\nimport { l10n, getStringByOID } from '../../utils';\nimport {\n RowTitle, RowValue, TableRowTable,\n} 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 <TableRowTable>\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 </TableRowTable>,\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 { 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 tr:last-child {\n .divider {\n display: none;\n }\n }\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';\nimport { X509AttributeCertificate } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} 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 TAttributeCertificateProp = 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: TAttributeCertificateProp;\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 = false;\n\n @State() isDecodeInProcess = 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: TAttributeCertificateProp) {\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: TAttributeCertificateProp,\n oldValue: TAttributeCertificateProp,\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 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 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@import '../certificate-viewer/certificate-viewer.scss';\n\n:host {\n display: block;\n width: 100%;\n}\n\n.tabs {\n white-space: nowrap;\n overflow-x: auto;\n border-bottom: 1px solid var(--pv-color-gray-4);\n padding: 0 var(--pv-size-base-4);\n margin-bottom: var(--pv-size-base-6);\n}\n\n.tab {\n font-family: inherit;\n outline: none;\n cursor: pointer;\n box-sizing: border-box;\n border: none;\n border-bottom: 3px solid transparent;\n min-height: var(--pv-size-base-12);\n height: 100%;\n padding: 0 var(--pv-size-base-3);\n background-color: transparent;\n transition: background-color 200ms, color 200ms, border-color 200ms;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n font-weight: var(--pv-text-s2-weight);\n font-size: var(--pv-text-s2-size);\n line-height: var(--pv-text-s2-height);\n letter-spacing: var(--pv-text-s2-spacing);\n color: var(--pv-color-gray-10);\n\n &:hover {\n background-color: var(--pv-color-secondary-tint-5);\n }\n\n &[aria-selected=\"true\"] {\n color: var(--pv-color-black);\n border-color: var(--pv-color-secondary);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\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 Host,\n} from '@stencil/core';\nimport { X509Certificates } from '../../crypto';\nimport { Typography } from '../typography';\nimport { Miscellaneous } from '../certificate-details-parts';\n\n@Component({\n tag: 'peculiar-certificate-chain-viewer',\n styleUrl: 'certificate-chain-viewer.scss',\n shadow: true,\n})\nexport class CertificateChainViewer {\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificates: X509Certificates;\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 @State() selectedCertificateIndex = 0;\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificates available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (!this.certificates) {\n return this.renderEmptyState();\n }\n\n return (\n <Host>\n <div\n role=\"tablist\"\n class=\"tabs\"\n >\n {Array.from(this.certificates).map((certificate, index) => (\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab\"\n aria-selected={index === this.selectedCertificateIndex ? 'true' : 'false'}\n onClick={() => {\n this.selectedCertificateIndex = index;\n }}\n >\n {certificate.commonName}\n </button>\n ))}\n </div>\n {Array.from(this.certificates).map((certificate, index) => {\n if (index === this.selectedCertificateIndex) {\n return (\n <peculiar-certificate-viewer\n certificate={certificate}\n download={false}\n />\n );\n }\n\n return null;\n })}\n\n <table>\n {this.download && (\n <Miscellaneous\n certificate={this.certificates}\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 tr:last-child {\n .divider {\n display: none;\n }\n }\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';\nimport { X509Crl } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} 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 TCrlProp = string | X509Crl;\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: X509Crl;\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: TCrlProp;\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 = false;\n\n @State() isDecodeInProcess = 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: TCrlProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Crl) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Crl(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: TCrlProp,\n oldValue: TCrlProp,\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 X509Crl\n && oldValue instanceof X509Crl\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\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 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 tr:last-child {\n .divider {\n display: none;\n }\n }\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';\nimport { Pkcs10CertificateRequest } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n Signature,\n Thumbprints,\n Miscellaneous,\n PublicKey,\n Attributes,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCsrProp = string | Pkcs10CertificateRequest;\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: Pkcs10CertificateRequest;\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: TCsrProp;\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 = false;\n\n @State() isDecodeInProcess = 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: TCsrProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof Pkcs10CertificateRequest) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new Pkcs10CertificateRequest(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: TCsrProp,\n oldValue: TCsrProp,\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 Pkcs10CertificateRequest\n && oldValue instanceof Pkcs10CertificateRequest\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => value;\n\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 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 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 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 <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 {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\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 { RowTitle, RowValue } from '../../certificate-details-parts/row';\nimport { dateShort, l10n } from '../../../utils';\n\ninterface ISshBasicInformationProps {\n serialNumber: string;\n validity: string;\n notBefore: Date;\n notAfter: Date;\n type: string;\n keyId: string;\n principals: string[];\n extensions: Record<string, string>;\n criticalOptions: Record<string, string>;\n}\n\nexport const SshBasicInformation: FunctionalComponent<ISshBasicInformationProps> = (props) => {\n const {\n serialNumber,\n validity,\n notBefore,\n notAfter,\n type,\n keyId,\n principals,\n extensions,\n criticalOptions,\n } = props;\n\n return [\n <RowTitle\n value={l10n.getString('basicInformation')}\n />,\n <RowValue\n name={l10n.getString('type')}\n value={type}\n />,\n <RowValue\n name={l10n.getString('serialNumber')}\n value={serialNumber}\n monospace\n />,\n <RowValue\n name={l10n.getString('validity')}\n value={validity}\n />,\n <RowValue\n name={l10n.getString('issued')}\n value={notBefore ? dateShort(notBefore) : undefined}\n />,\n <RowValue\n name={l10n.getString('expired')}\n value={notAfter ? dateShort(notAfter) : undefined}\n />,\n <RowValue\n name={l10n.getString('keyId')}\n value={keyId}\n />,\n <RowValue\n name={l10n.getString('principals')}\n value={principals.join(', ') || '(none)'}\n />,\n <RowValue\n name={l10n.getString('criticalOptions')}\n value={Object.keys(criticalOptions).join(', ') || '(none)'}\n />,\n <RowValue\n name={l10n.getString('extensions')}\n value={Object.keys(extensions).join(', ') || '(none)'}\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 { SshCertificate } from '../../../crypto';\nimport { l10n, getStringByOID } from '../../../utils';\nimport {\n RowTitle,\n RowValue,\n} from '../../certificate-details-parts/row';\n\ninterface ISshPublicKeyProps {\n key: SshCertificate['publicKey'];\n}\n\nexport const SshPublicKey: FunctionalComponent<ISshPublicKeyProps> = (props) => {\n const { key } = props;\n\n if (!key) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('publicKeyInfo')}\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name=\"Thumbprint (SHA-256)\"\n value={key.thumbprint}\n monospace\n />,\n <RowValue\n name={l10n.getString('value')}\n value={key.value}\n monospace\n collapse\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 { SshCertificate } from '../../../crypto';\nimport { l10n, getStringByOID } from '../../../utils';\nimport {\n RowTitle,\n RowValue,\n} from '../../certificate-details-parts/row';\n\ninterface ISshSignatureKeyProps {\n key: SshCertificate['signatureKey'];\n}\n\nexport const SshSignatureKey: FunctionalComponent<ISshSignatureKeyProps> = (props) => {\n const { key } = props;\n\n if (!key) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('signingCA')}\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name=\"Thumbprint (SHA-256)\"\n value={key.thumbprint}\n monospace\n />,\n <RowValue\n name={l10n.getString('value')}\n value={key.value}\n monospace\n collapse\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 { SshCertificate } from '../../../crypto';\nimport { l10n } from '../../../utils';\nimport { Button } from '../../button';\nimport { DownloadIcon } from '../../icons';\nimport { RowTitle } from '../../certificate-details-parts/row';\n\ninterface ISshMiscellaneousProps {\n certificate: SshCertificate;\n}\n\nexport const SshMiscellaneous: FunctionalComponent<ISshMiscellaneousProps> = (props) => {\n const { certificate } = props;\n\n return [\n <RowTitle\n value={l10n.getString('miscellaneous')}\n />,\n <tr>\n <td>\n <Button\n startIcon={<DownloadIcon />}\n onClick={() => certificate.downloadAsSSH()}\n >\n {l10n.getString('download.ssh')}\n </Button>\n </td>\n </tr>,\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 tr:last-child {\n .divider {\n display: none;\n }\n }\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';\nimport { SshCertificate } from '../../crypto';\nimport { Typography } from '../typography';\nimport { SshBasicInformation } from './-components/basic_information';\nimport { SshPublicKey } from './-components/public_key';\nimport { SshSignatureKey } from './-components/signature_key';\nimport { SshMiscellaneous } from './-components/miscellaneous';\n\nexport type TSshCertificateProp = string | SshCertificate;\n\n@Component({\n tag: 'peculiar-ssh-certificate-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class SshCertificateViewer {\n private certificateDecoded: SshCertificate;\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: TSshCertificateProp;\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 * 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 = false;\n\n @State() isDecodeInProcess = 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: TSshCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof SshCertificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new SshCertificate(certificate);\n } else {\n return;\n }\n\n // this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.parsePublicKey();\n await this.certificateDecoded.parseSignatureKey();\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: TSshCertificateProp, oldValue: TSshCertificateProp) {\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 SshCertificate && oldValue instanceof SshCertificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\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 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 <SshBasicInformation\n {...this.certificateDecoded}\n />\n\n <SshPublicKey\n key={this.certificateDecoded.publicKey}\n />\n\n <SshSignatureKey\n key={this.certificateDecoded.signatureKey}\n />\n\n {this.download && (\n <SshMiscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;GAiBO,IAAMA,eAA4D,SAACC,EAAOC,GACvE,IAAAC,EAAcF,EAAKE,UAE3B,OACEC,EAACC,SACC,CAAAC,KAAK,OACLC,MAAOC,eAAeL,EAAUM,IAAIC,QAEtCR,EACAE,EAAA,UACEA,EAAA,MAAIO,QAAS,EAAGC,MAAM,WACpBR,EAAA,eAIR;;;;;;;GCdO,IAAMS,SAAgD,SAACZ,GACpD,IAAAK,EAASL,EAAKK,KAEtB,IAAKA,EAAM,CAC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AA,WACN,OACEjK,EAAA,OAAKQ,MAAM,kBACTR,EAACgK,WAAU,2C,EAOjB0D,EAAApF,UAAA4B,OAAA,WACE,GAAIzC,KAAKiC,uBAAwB,CAC/B,OAAOjC,KAAKsC,kB,CAGd,IAAKtC,KAAK2B,mBAAoB,CAC5B,OAAO3B,KAAKwC,kB,CAGd,OACEjK,EAACmK,KAAI,2BACsBC,OAAO3C,KAAKE,mBAErC3H,EAAA,aACEA,EAACsM,oBAAmB/J,OAAA+H,OAAA,GACd7C,KAAK2B,qBAGXpJ,EAAC+M,aAAY,CACXC,IAAKvF,KAAK2B,mBAAmBiD,YAG/BrM,EAACmN,gBAAe,CACdH,IAAKvF,KAAK2B,mBAAmB2E,eAG9BtG,KAAKkD,UACJ3K,EAACoN,iBACC,CAAA9I,YAAamD,KAAK2B,sB,sJA5IC,G","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  var __extends=this&&this.__extends||function(){var t=function(e,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return t(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function a(){this.constructor=e}e.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}();var __awaiter=this&&this.__awaiter||function(t,e,r,a){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function n(t){try{s(a.next(t))}catch(t){i(t)}}function c(t){try{s(a["throw"](t))}catch(t){i(t)}}function s(t){t.done?r(t.value):o(t.value).then(n,c)}s((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function c(t){return function(e){return s([t,e])}}function s(c){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,c[0]&&(r=0)),r)try{if(a=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;o=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1];i=c;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(c);break}if(i[2])r.ops.pop();r.trys.pop();continue}c=e.call(t,r)}catch(t){c=[6,t];o=0}finally{a=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{r as registerInstance,c as createEvent,h,H as Host}from"./index-CwgZaF40.js";import{a as readAsBinaryString}from"./read_file-F2F0McJX.js";import{P as PemConverter,b as buildExports,bh as SignedData,bi as EncapsulatedContent,a0 as OctetString,bj as CertificateSet,bk as CertificateChoices,e as AsnConvert,C as Certificate,bl as ContentInfo,D as Download}from"./certification_request-CSS3OhZq.js";import{X as X509Certificate}from"./x509_certificate-fWXLCtc8.js";import{X as X509AttributeCertificate,a as X509Crl}from"./x509_crl-Dq33Vv-q.js";import{P as Pkcs10CertificateRequest}from"./pkcs10_certificate_request-B9Q42jiE.js";import{T as Typography,B as Button}from"./button-Bbh7MwG6.js";import"./extension-CUOKUt7o.js";var id_data="1.2.840.113549.1.7.1";var id_signedData="1.2.840.113549.1.7.2";var X509Certificates=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;var a=PemConverter.isPem(e)?PemConverter.decode(e).map((function(t){return buildExports.Convert.ToBase64Url(t)})):e.split(",");if(a.length<2){throw new Error("Unable to parse string. The array of elements is less than 2")}for(var o=0,i=a;o<i.length;o++){var n=i[o];r.push(new X509Certificate(n))}return r}Object.defineProperty(e.prototype,"commonName",{get:function(){return Array.from(this).map((function(t){return t.commonName})).join("_")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"raw",{get:function(){var t=new SignedData;t.version=1;t.encapContentInfo.eContentType=id_data;t.encapContentInfo.eContent=new EncapsulatedContent({single:new OctetString});t.certificates=new CertificateSet(Array.from(this).map((function(t){return new CertificateChoices({certificate:AsnConvert.parse(t.raw,Certificate)})})));var e=new ContentInfo({contentType:id_signedData,content:AsnConvert.serialize(t)});return AsnConvert.serialize(e)},enumerable:false,configurable:true});e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return Array.from(this).map((function(t){return t.toString("pem")})).join("\n");case"base64url":return Array.from(this).map((function(t){return t.toString("base64url")})).join(",");default:return Array.from(this).map((function(t){return t.toString("base64")})).join(",")}};e.prototype.downloadAsPEM=function(t){Download.cert.asPEM(this.toString("pem"),t||this.commonName)};e.prototype.downloadAsDER=function(t){Download.cert.asDER(this.raw,t||this.commonName)};return e}(Array);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}.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);margin-bottom:var(--pv-size-base-12)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";var CertificateDecoder=function(){function t(t){var e=this;registerInstance(this,t);this.successParse=createEvent(this,"successParse");this.clearCertificate=createEvent(this,"clearCertificate");this.handleClickDecode=function(){var t=e.inputPaste.value;if(t){e.decode(t)}};this.handleClickClear=function(){e.clearValue()};this.handleChangeInputFile=function(t){return __awaiter(e,void 0,void 0,(function(){var e,r;return __generator(this,(function(a){switch(a.label){case 0:e=t.target;if(!e.files)return[3,2];return[4,readAsBinaryString(e.files[0])];case 1:r=a.sent();if(typeof r.value==="string"){this.decode(r.value)}e.value="";a.label=2;case 2:return[2]}}))}))};this.handleChangeExample=function(t){if(t.target.value){e.decode(t.target.value)}else{e.clearValue()}};this.handleDropFile=function(t){return __awaiter(e,void 0,void 0,(function(){var e,r;return __generator(this,(function(a){switch(a.label){case 0:t.stopPropagation();t.preventDefault();e=t.dataTransfer;if(!e.files)return[3,2];return[4,readAsBinaryString(e.files[0])];case 1:r=a.sent();if(typeof r.value==="string"){this.decode(r.value)}a.label=2;case 2:return[2]}}))}))}}t.prototype.componentDidLoad=function(){var t=this;if(this.certificateToDecode){setTimeout((function(){return t.decode(t.certificateToDecode)}),100)}};t.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()};t.prototype.setValue=function(t){this.certificateDecoded=t;this.inputPaste.value=t.toString("pem");this.successParse.emit(t.toString("base64url"))};t.prototype.decode=function(t){var e=this;new Promise((function(e){e(new X509Certificates(t))})).catch((function(){return new X509Certificate(t)})).catch((function(){return new X509AttributeCertificate(t)})).catch((function(){return new Pkcs10CertificateRequest(t)})).catch((function(){return new X509Crl(t)})).then((function(t){return e.setValue(t)})).catch((function(e){console.log(e);alert('Error decoding certificate:\n"'.concat(t,'"\n\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.'))}))};t.prototype.renderCertificate=function(){if(this.certificateDecoded instanceof X509Certificates){return h("peculiar-certificate-chain-viewer",{certificates:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof X509Certificate){return h("peculiar-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof X509AttributeCertificate){return h("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof Pkcs10CertificateRequest){return h("peculiar-csr-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof X509Crl){return h("peculiar-crl-viewer",{certificate:this.certificateDecoded,download:true})}return null};t.prototype.render=function(){var t=this;var e;return h(Host,{key:"2c4ec8c59145c494dee26f7e6eae99b10481f091"},h("textarea",{key:"88129c0b5c56b2458c4af2df6d746c25d4252fd2",placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:function(e){t.inputPaste=e},onDrop:this.handleDropFile}),h("div",{key:"3730b1bade8d27bb9bc1617018dc5bf01f9277ef",class:"controls"},h("div",{key:"b803986ab6d5bfaf5e61cd9df57428e6bff6bb55",class:"control_row"},h(Typography,{key:"e6ed2ea27f11d0957da4109e19483cd040febb01",variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),h("input",{key:"898d0fdd1de5f204337ab8bf77ad1dafd25da882",type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl",value:"",onChange:this.handleChangeInputFile})),((e=this.certificateExamples)===null||e===void 0?void 0:e.length)&&h("div",{key:"d6cf99bfc145f44fdfef32e52eb6afa8ec3836cf",class:"control_row"},h(Typography,{key:"4f7ff1b34fe34837909e328afdf401a5826d89f5",variant:"b3",color:"secondary-tint-2"},"Load examples:"),h("select",{key:"47c7433eefc2e82fb5dd9a30f062cc71104f7f5b",onChange:this.handleChangeExample},h("option",{key:"667a68723f7a22b954c1c89e1e86b85ddc6b4fd5",value:""},"None"),this.certificateExamples.map((function(t){return h("option",{value:t.value},t.title)})))),h("div",{key:"e1fc1f00e7bb998d26a818fee955df9561f8e6c0",class:"control_row"},h(Button,{key:"254fdd5ff25e644ba5d233d9cec2508a28e023c9",onClick:this.handleClickDecode},"Decode"),h(Button,{key:"594d6e51c56a1b51440f6495eb85af0eda75bcef",onClick:this.handleClickClear},"Clear"))),this.renderCertificate())};return t}();CertificateDecoder.style=certificateDecoderCss;export{CertificateDecoder as peculiar_certificate_decoder};
4
+ */import{r as registerInstance,c as createEvent,h,H as Host}from"./index-CwgZaF40.js";import{a as readAsBinaryString}from"./read_file-F2F0McJX.js";import{P as PemConverter,b as buildExports,bh as SignedData,bi as EncapsulatedContent,a0 as OctetString,bj as CertificateSet,bk as CertificateChoices,e as AsnConvert,C as Certificate,bl as ContentInfo,D as Download,bm as SshCertificate}from"./ssh_certificate-PCn0WXhQ.js";import{X as X509Certificate}from"./x509_certificate-BiAmXJ4S.js";import{X as X509AttributeCertificate,a as X509Crl}from"./x509_crl-CCeoLLUZ.js";import{P as Pkcs10CertificateRequest}from"./pkcs10_certificate_request-B5C1NYFc.js";import{T as Typography,B as Button}from"./button-Bbh7MwG6.js";import"./extension-DmlhftES.js";var id_data="1.2.840.113549.1.7.1";var id_signedData="1.2.840.113549.1.7.2";var X509Certificates=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;var a=PemConverter.isPem(e)?PemConverter.decode(e).map((function(t){return buildExports.Convert.ToBase64Url(t)})):e.split(",");if(a.length<2){throw new Error("Unable to parse string. The array of elements is less than 2")}for(var o=0,i=a;o<i.length;o++){var n=i[o];r.push(new X509Certificate(n))}return r}Object.defineProperty(e.prototype,"commonName",{get:function(){return Array.from(this).map((function(t){return t.commonName})).join("_")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"raw",{get:function(){var t=new SignedData;t.version=1;t.encapContentInfo.eContentType=id_data;t.encapContentInfo.eContent=new EncapsulatedContent({single:new OctetString});t.certificates=new CertificateSet(Array.from(this).map((function(t){return new CertificateChoices({certificate:AsnConvert.parse(t.raw,Certificate)})})));var e=new ContentInfo({contentType:id_signedData,content:AsnConvert.serialize(t)});return AsnConvert.serialize(e)},enumerable:false,configurable:true});e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return Array.from(this).map((function(t){return t.toString("pem")})).join("\n");case"base64url":return Array.from(this).map((function(t){return t.toString("base64url")})).join(",");default:return Array.from(this).map((function(t){return t.toString("base64")})).join(",")}};e.prototype.downloadAsPEM=function(t){Download.cert.asPEM(this.toString("pem"),t||this.commonName)};e.prototype.downloadAsDER=function(t){Download.cert.asDER(this.raw,t||this.commonName)};return e}(Array);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}.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);margin-bottom:var(--pv-size-base-12)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";var CertificateDecoder=function(){function t(t){var e=this;registerInstance(this,t);this.successParse=createEvent(this,"successParse");this.clearCertificate=createEvent(this,"clearCertificate");this.handleClickDecode=function(){var t=e.inputPaste.value;if(t){e.decode(t)}};this.handleClickClear=function(){e.clearValue()};this.handleChangeInputFile=function(t){return __awaiter(e,void 0,void 0,(function(){var e,r;return __generator(this,(function(a){switch(a.label){case 0:e=t.target;if(!e.files)return[3,2];return[4,readAsBinaryString(e.files[0])];case 1:r=a.sent();if(typeof r.value==="string"){this.decode(r.value)}e.value="";a.label=2;case 2:return[2]}}))}))};this.handleChangeExample=function(t){if(t.target.value){e.decode(t.target.value)}else{e.clearValue()}};this.handleDropFile=function(t){return __awaiter(e,void 0,void 0,(function(){var e,r;return __generator(this,(function(a){switch(a.label){case 0:t.stopPropagation();t.preventDefault();e=t.dataTransfer;if(!e.files)return[3,2];return[4,readAsBinaryString(e.files[0])];case 1:r=a.sent();if(typeof r.value==="string"){this.decode(r.value)}a.label=2;case 2:return[2]}}))}))}}t.prototype.componentDidLoad=function(){var t=this;if(this.certificateToDecode){setTimeout((function(){return t.decode(t.certificateToDecode)}),100)}};t.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()};t.prototype.setValue=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,a;return __generator(this,(function(o){switch(o.label){case 0:this.certificateDecoded=t;e=this.inputPaste;return[4,t.toString("pem")];case 1:e.value=o.sent();a=(r=this.successParse).emit;return[4,t.toString("base64url")];case 2:a.apply(r,[o.sent()]);return[2]}}))}))};t.prototype.decode=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(r){new Promise((function(e){e(new X509Certificates(t))})).catch((function(){return new X509Certificate(t)})).catch((function(){return new X509AttributeCertificate(t)})).catch((function(){return new Pkcs10CertificateRequest(t)})).catch((function(){return new X509Crl(t)})).catch((function(){return new SshCertificate(t)})).then((function(t){return e.setValue(t)})).catch((function(e){console.log(e);alert('Error decoding certificate:\n"'.concat(t,'"\n\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.'))}));return[2]}))}))};t.prototype.renderCertificate=function(){if(this.certificateDecoded instanceof X509Certificates){return h("peculiar-certificate-chain-viewer",{certificates:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof X509Certificate){return h("peculiar-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof X509AttributeCertificate){return h("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof Pkcs10CertificateRequest){return h("peculiar-csr-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof X509Crl){return h("peculiar-crl-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof SshCertificate){return h("peculiar-ssh-certificate-viewer",{certificate:this.certificateDecoded,download:true})}return null};t.prototype.render=function(){var t=this;var e;return h(Host,{key:"9067f2d7f33a40b3ad0ba03c7338a6f800100dab"},h("textarea",{key:"9e8962631c259fd5e144a1397d8591dde46d032f",placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:function(e){t.inputPaste=e},onDrop:this.handleDropFile}),h("div",{key:"9be2b1e6c9b3de94c9d5e1e6cf31d9fb487960d8",class:"controls"},h("div",{key:"3959b89ab5c5654a3c10a1166743c056c0340e2e",class:"control_row"},h(Typography,{key:"3c03f42d14ff5a485264523bab40765bb4f89a8f",variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),h("input",{key:"3c8682f5de0b0e2f84e37a8a05882ebcf331daef",type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl,.cert",value:"",onChange:this.handleChangeInputFile})),((e=this.certificateExamples)===null||e===void 0?void 0:e.length)&&h("div",{key:"7c38788ccf4b038126ddf6909ec1d3de76325660",class:"control_row"},h(Typography,{key:"c1c13aaad3d1df51465c6c51ee24f45313de8f1c",variant:"b3",color:"secondary-tint-2"},"Load examples:"),h("select",{key:"811c4440269bb0a0a55f488e10dfa12093b18d7b",onChange:this.handleChangeExample},h("option",{key:"d2e30396fe3a59d5c46c83c6cd1e5b5a58f15f73",value:""},"None"),this.certificateExamples.map((function(t){return h("option",{value:t.value},t.title)})))),h("div",{key:"58daae2b9d8e2dd4c698ec9ad6e7f0d8b2500883",class:"control_row"},h(Button,{key:"d7f813370ace60deaad975622cc26b9a497ce9d2",onClick:this.handleClickDecode},"Decode"),h(Button,{key:"ec2fbeb6283ffd17c7328ee78c9464926b0bbb6b",onClick:this.handleClickClear},"Clear"))),this.renderCertificate())};return t}();CertificateDecoder.style=certificateDecoderCss;export{CertificateDecoder as peculiar_certificate_decoder};
5
5
  //# sourceMappingURL=peculiar-certificate-decoder.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"peculiar-certificate-decoder.entry.js","sources":["../../node_modules/.pnpm/@peculiar+asn1-cms@2.4.0/node_modules/@peculiar/asn1-cms/build/es2015/object_identifiers.js","src/crypto/x509_certificates.ts","src/components/certificate-decoder/certificate-decoder.scss?tag=peculiar-certificate-decoder&encapsulation=shadow","src/components/certificate-decoder/certificate-decoder.tsx"],"sourcesContent":["export const id_ct_contentInfo = \"1.2.840.113549.1.9.16.1.6\";\nexport const id_data = \"1.2.840.113549.1.7.1\";\nexport const id_signedData = \"1.2.840.113549.1.7.2\";\nexport const id_envelopedData = \"1.2.840.113549.1.7.3\";\nexport const id_digestedData = \"1.2.840.113549.1.7.5\";\nexport const id_encryptedData = \"1.2.840.113549.1.7.6\";\nexport const id_authData = \"1.2.840.113549.1.9.16.1.2\";\n","import { Convert } from 'pvtsutils';\nimport {\n SignedData,\n id_data,\n EncapsulatedContent,\n CertificateSet,\n CertificateChoices,\n ContentInfo,\n id_signedData,\n} from '@peculiar/asn1-cms';\nimport { Certificate } from '@peculiar/asn1-x509';\nimport { AsnConvert, OctetString } from '@peculiar/asn1-schema';\nimport { Download } from '../utils';\nimport { PemConverter } from './pem_converter';\nimport { X509Certificate } from './x509_certificate';\n\nexport class X509Certificates extends Array<X509Certificate> {\n constructor(raw: string) {\n super();\n\n const rawItems = PemConverter.isPem(raw)\n ? PemConverter.decode(raw).map((value) => Convert.ToBase64Url(value))\n : raw.split(',');\n\n if (rawItems.length < 2) {\n throw new Error('Unable to parse string. The array of elements is less than 2');\n }\n\n for (const item of rawItems) {\n this.push(new X509Certificate(item));\n }\n }\n\n public get commonName(): string {\n return Array.from(this)\n .map((o) => o.commonName)\n .join('_');\n }\n\n public get raw(): ArrayBuffer {\n const signedData = new SignedData();\n\n signedData.version = 1;\n signedData.encapContentInfo.eContentType = id_data;\n signedData.encapContentInfo.eContent = new EncapsulatedContent({ single: new OctetString() });\n signedData.certificates = new CertificateSet(\n Array.from(this)\n .map((o) => new CertificateChoices({ certificate: AsnConvert.parse(o.raw, Certificate) })),\n );\n\n const cms = new ContentInfo({\n contentType: id_signedData,\n content: AsnConvert.serialize(signedData),\n });\n\n return AsnConvert.serialize(cms);\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return Array.from(this)\n .map((o) => o.toString('pem'))\n .join('\\n');\n case 'base64url':\n return Array.from(this)\n .map((o) => o.toString('base64url'))\n .join(',');\n default:\n return Array.from(this)\n .map((o) => o.toString('base64'))\n .join(',');\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.cert.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.cert.asDER(\n this.raw,\n name || this.commonName,\n );\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.controls {\n margin-top: var(--pv-size-base-2);\n display: flex;\n flex-direction: column;\n gap: var(--pv-size-base-2);\n margin-bottom: var(--pv-size-base-12);\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';\nimport { readAsBinaryString } from '../../utils';\nimport {\n X509Certificate,\n X509AttributeCertificate,\n Pkcs10CertificateRequest,\n X509Crl,\n X509Certificates,\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() certificateToDecode?: string;\n\n @State() certificateDecoded: X509Certificates\n | X509Certificate\n | X509AttributeCertificate\n | Pkcs10CertificateRequest\n | X509Crl;\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.certificateToDecode) {\n /**\n * Prevent Stencil warning about re-render\n */\n setTimeout(() => this.decode(this.certificateToDecode), 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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: typeof this.certificateDecoded) {\n this.certificateDecoded = value;\n this.inputPaste.value = value.toString('pem');\n this.successParse.emit(value.toString('base64url'));\n }\n\n decode(value: string) {\n new Promise<X509Certificates>((resolve) => {\n resolve(new X509Certificates(value));\n })\n .catch(() => new X509Certificate(value))\n .catch(() => new X509AttributeCertificate(value))\n .catch(() => new Pkcs10CertificateRequest(value))\n .catch(() => new X509Crl(value))\n .then((res: typeof this.certificateDecoded) => this.setValue(res))\n .catch((error) => {\n console.log(error);\n\n alert(`Error decoding certificate:\\n\"${value}\"\\n\\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.`);\n });\n }\n\n renderCertificate() {\n if (this.certificateDecoded instanceof X509Certificates) {\n return (\n <peculiar-certificate-chain-viewer\n certificates={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509Certificate) {\n return (\n <peculiar-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509AttributeCertificate) {\n return (\n <peculiar-attribute-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof Pkcs10CertificateRequest) {\n return (\n <peculiar-csr-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509Crl) {\n return (\n <peculiar-crl-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n return null;\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 value=\"\"\n onChange={this.handleChangeInputFile}\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.renderCertificate()}\n </Host>\n );\n }\n}\n"],"names":["Convert"],"mappings":";;;;;;;;;;;;AACO,MAA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AK,EAAC,EAAE,EAAc,EAAA,MAAA,CAAA,EAC7B,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,OAAO,MACpC,CAAQ,CAAA,QAAA,EAAA,EAAA,KAAK,EAAE,OAAO,CAAC,KAAK,EAAA,EACzB,OAAO,CAAC,KAAK,CACP,CACV,CAAC,CACK,CACL,CACP,EACD,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAA,EACtB,CAAA,CAAC,MAAM,EACL,EAAA,GAAA,EAAA,0CAAA,EAAA,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAGxB,EAAA,QAAA,CAAA,EACT,CAAC,CAAA,MAAM,qDACL,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAGvB,EAAA,OAAA,CAAA,CACL,CACF,EACL,IAAI,CAAC,iBAAiB,EAAE,CACpB;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"peculiar-certificate-decoder.entry.js","sources":["../../node_modules/.pnpm/@peculiar+asn1-cms@2.4.0/node_modules/@peculiar/asn1-cms/build/es2015/object_identifiers.js","src/crypto/x509_certificates.ts","src/components/certificate-decoder/certificate-decoder.scss?tag=peculiar-certificate-decoder&encapsulation=shadow","src/components/certificate-decoder/certificate-decoder.tsx"],"sourcesContent":["export const id_ct_contentInfo = \"1.2.840.113549.1.9.16.1.6\";\nexport const id_data = \"1.2.840.113549.1.7.1\";\nexport const id_signedData = \"1.2.840.113549.1.7.2\";\nexport const id_envelopedData = \"1.2.840.113549.1.7.3\";\nexport const id_digestedData = \"1.2.840.113549.1.7.5\";\nexport const id_encryptedData = \"1.2.840.113549.1.7.6\";\nexport const id_authData = \"1.2.840.113549.1.9.16.1.2\";\n","import { Convert } from 'pvtsutils';\nimport {\n SignedData,\n id_data,\n EncapsulatedContent,\n CertificateSet,\n CertificateChoices,\n ContentInfo,\n id_signedData,\n} from '@peculiar/asn1-cms';\nimport { Certificate } from '@peculiar/asn1-x509';\nimport { AsnConvert, OctetString } from '@peculiar/asn1-schema';\nimport { Download } from '../utils';\nimport { PemConverter } from './pem_converter';\nimport { X509Certificate } from './x509_certificate';\n\nexport class X509Certificates extends Array<X509Certificate> {\n constructor(raw: string) {\n super();\n\n const rawItems = PemConverter.isPem(raw)\n ? PemConverter.decode(raw).map((value) => Convert.ToBase64Url(value))\n : raw.split(',');\n\n if (rawItems.length < 2) {\n throw new Error('Unable to parse string. The array of elements is less than 2');\n }\n\n for (const item of rawItems) {\n this.push(new X509Certificate(item));\n }\n }\n\n public get commonName(): string {\n return Array.from(this)\n .map((o) => o.commonName)\n .join('_');\n }\n\n public get raw(): ArrayBuffer {\n const signedData = new SignedData();\n\n signedData.version = 1;\n signedData.encapContentInfo.eContentType = id_data;\n signedData.encapContentInfo.eContent = new EncapsulatedContent({ single: new OctetString() });\n signedData.certificates = new CertificateSet(\n Array.from(this)\n .map((o) => new CertificateChoices({ certificate: AsnConvert.parse(o.raw, Certificate) })),\n );\n\n const cms = new ContentInfo({\n contentType: id_signedData,\n content: AsnConvert.serialize(signedData),\n });\n\n return AsnConvert.serialize(cms);\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return Array.from(this)\n .map((o) => o.toString('pem'))\n .join('\\n');\n case 'base64url':\n return Array.from(this)\n .map((o) => o.toString('base64url'))\n .join(',');\n default:\n return Array.from(this)\n .map((o) => o.toString('base64'))\n .join(',');\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.cert.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.cert.asDER(\n this.raw,\n name || this.commonName,\n );\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.controls {\n margin-top: var(--pv-size-base-2);\n display: flex;\n flex-direction: column;\n gap: var(--pv-size-base-2);\n margin-bottom: var(--pv-size-base-12);\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';\nimport { readAsBinaryString } from '../../utils';\nimport {\n X509Certificate,\n X509AttributeCertificate,\n Pkcs10CertificateRequest,\n X509Crl,\n X509Certificates,\n SshCertificate,\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() certificateToDecode?: string;\n\n @State() certificateDecoded: X509Certificates\n | X509Certificate\n | X509AttributeCertificate\n | Pkcs10CertificateRequest\n | X509Crl\n | SshCertificate;\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.certificateToDecode) {\n /**\n * Prevent Stencil warning about re-render\n */\n setTimeout(() => this.decode(this.certificateToDecode), 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 async setValue(value: typeof this.certificateDecoded) {\n this.certificateDecoded = value;\n\n this.inputPaste.value = await value.toString('pem');\n this.successParse.emit(await value.toString('base64url'));\n }\n\n async decode(value: string) {\n new Promise<X509Certificates>((resolve) => {\n resolve(new X509Certificates(value));\n })\n .catch(() => new X509Certificate(value))\n .catch(() => new X509AttributeCertificate(value))\n .catch(() => new Pkcs10CertificateRequest(value))\n .catch(() => new X509Crl(value))\n .catch(() => new SshCertificate(value))\n .then((res: typeof this.certificateDecoded) => this.setValue(res))\n .catch((error) => {\n console.log(error);\n\n alert(`Error decoding certificate:\\n\"${value}\"\\n\\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.`);\n });\n }\n\n renderCertificate() {\n if (this.certificateDecoded instanceof X509Certificates) {\n return (\n <peculiar-certificate-chain-viewer\n certificates={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509Certificate) {\n return (\n <peculiar-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509AttributeCertificate) {\n return (\n <peculiar-attribute-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof Pkcs10CertificateRequest) {\n return (\n <peculiar-csr-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof X509Crl) {\n return (\n <peculiar-crl-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n if (this.certificateDecoded instanceof SshCertificate) {\n return (\n <peculiar-ssh-certificate-viewer\n certificate={this.certificateDecoded}\n download\n />\n );\n }\n\n return null;\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,.cert\"\n value=\"\"\n onChange={this.handleChangeInputFile}\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.renderCertificate()}\n </Host>\n );\n }\n}\n"],"names":["Convert"],"mappings":";;;;;;;;;;;;AACO,MAAM,OAAO,GAAG,sBAAsB;AACtC,MAAM,aAAa,GAAG,sBAAsB;;ACc7C,MAAO,gBAAiB,SAAQ,KAAsB,CAAA;AAC1D,IAAA,WAAA,CAAY,GAAW,EAAA;AACrB,QAAA,KAAK,EAAE;AAEP,QAAA,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;cACnC,YAAY,CAAC,MAAM,CAAC,G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,EAAE,EAAc,EAAA,MAAA,CAAA,EAC7B,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,OAAO,MACpC,CAAQ,CAAA,QAAA,EAAA,EAAA,KAAK,EAAE,OAAO,CAAC,KAAK,EAAA,EACzB,OAAO,CAAC,KAAK,CACP,CACV,CAAC,CACK,CACL,CACP,EACD,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAA,EACtB,CAAA,CAAC,MAAM,EACL,EAAA,GAAA,EAAA,0CAAA,EAAA,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAGxB,EAAA,QAAA,CAAA,EACT,CAAC,CAAA,MAAM,qDACL,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAGvB,EAAA,OAAA,CAAA,CACL,CACF,EACL,IAAI,CAAC,iBAAiB,EAAE,CACpB;;;;;;;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,r,a){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function s(t){try{c(a.next(t))}catch(t){i(t)}}function n(t){try{c(a["throw"](t))}catch(t){i(t)}}function c(t){t.done?r(t.value):o(t.value).then(s,n)}c((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(t){return function(e){return c([t,e])}}function c(n){if(a)throw new TypeError("Generator is already executing.");while(s&&(s=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=e.call(t,r)}catch(t){n=[6,t];o=0}finally{a=i=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{r as registerInstance,h,H as Host}from"./index-CwgZaF40.js";import{X as X509Certificate}from"./x509_certificate-fWXLCtc8.js";import"./certification_request-CSS3OhZq.js";import{B as BasicInformation,S as SubjectName,I as IssuerName,P as PublicKey,a as Signature,T as Thumbprints,E as Extensions,g as getIPAddressLink,b as getDNSNameLink,c as getLEILink,M as Miscellaneous}from"./miscellaneous-DVlekgVM.js";import{T as Typography}from"./button-Bbh7MwG6.js";import"./extension-CUOKUt7o.js";import"./link-CGURvKy1.js";import"./download-ykcxSgxU.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 tr:last-child .divider{display:none}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 t(t){var e=this;registerInstance(this,t);this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(t){var r;return(r=e.authKeyIdParentLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=function(t){var r;return(r=e.authKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=function(t){var r;return(r=e.subjectKeyIdChildrenLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=function(t){var r;return(r=e.subjectKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",t)}}t.prototype.handleMediaQueryChange=function(t){this.mobileScreenView=t.matches};t.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}};t.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};t.prototype.decodeCertificate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;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(t instanceof X509Certificate){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new X509Certificate(t)}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:e=r.sent();this.certificateDecodeError=e;console.error("Error certificate parse:",e);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};t.prototype.watchCertificateAndDecode=function(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof X509Certificate&&e instanceof X509Certificate){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}};t.prototype.getIssuerDnLink=function(){return this.issuerDnLink};t.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h(Typography,null,"There was an error decoding this certificate."))};t.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h(Typography,null,"There is no certificate available."))};t.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(t,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return t}();CertificateViewer.style=certificateViewerCss;export{CertificateViewer as peculiar_certificate_viewer};
4
+ */import{r as registerInstance,h,H as Host}from"./index-CwgZaF40.js";import{X as X509Certificate}from"./x509_certificate-BiAmXJ4S.js";import"./ssh_certificate-PCn0WXhQ.js";import{B as BasicInformation,S as SubjectName,I as IssuerName,P as PublicKey,a as Signature,T as Thumbprints,E as Extensions,g as getIPAddressLink,b as getDNSNameLink,c as getLEILink,M as Miscellaneous}from"./miscellaneous-BTlqwN5_.js";import{T as Typography}from"./button-Bbh7MwG6.js";import"./extension-DmlhftES.js";import"./link-CGURvKy1.js";import"./download-ykcxSgxU.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 tr:last-child .divider{display:none}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 t(t){var e=this;registerInstance(this,t);this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(t){var r;return(r=e.authKeyIdParentLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=function(t){var r;return(r=e.authKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=function(t){var r;return(r=e.subjectKeyIdChildrenLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=function(t){var r;return(r=e.subjectKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",t)}}t.prototype.handleMediaQueryChange=function(t){this.mobileScreenView=t.matches};t.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}};t.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};t.prototype.decodeCertificate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;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(t instanceof X509Certificate){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new X509Certificate(t)}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:e=r.sent();this.certificateDecodeError=e;console.error("Error certificate parse:",e);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};t.prototype.watchCertificateAndDecode=function(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof X509Certificate&&e instanceof X509Certificate){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}};t.prototype.getIssuerDnLink=function(){return this.issuerDnLink};t.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h(Typography,null,"There was an error decoding this certificate."))};t.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h(Typography,null,"There is no certificate available."))};t.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(t,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return t}();CertificateViewer.style=certificateViewerCss;export{CertificateViewer as peculiar_certificate_viewer};
5
5
  //# sourceMappingURL=peculiar-certificate-viewer.entry.js.map
@@ -1,7 +1,7 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,r,a){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function n(t){try{c(a.next(t))}catch(t){i(t)}}function s(t){try{c(a["throw"](t))}catch(t){i(t)}}function c(t){t.done?r(t.value):o(t.value).then(n,s)}c((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){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(t){return function(e){return c([t,e])}}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=e.call(t,r)}catch(t){s=[6,t];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(t,e,r){if(r||arguments.length===2)for(var a=0,o=e.length,i;a<o;a++){if(i||!(a in e)){if(!i)i=Array.prototype.slice.call(e,0,a);i[a]=e[a]}}return t.concat(i||Array.prototype.slice.call(e))};
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{h,r as registerInstance,c as createEvent,H as Host}from"./index-CwgZaF40.js";import{X as X509Certificate}from"./x509_certificate-fWXLCtc8.js";import{Z as l10n,_ as dateShort,$ as OIDs}from"./certification_request-CSS3OhZq.js";import{T as Typography,B as Button}from"./button-Bbh7MwG6.js";import{D as DetailsIcon,L as LinkIcon,C as CrossIcon}from"./cross-G84H_-QL.js";import{D as DownloadIcon}from"./download-ykcxSgxU.js";import{a as ArrowTopIcon,A as ArrowBottomIcon}from"./arrow_top-DL0RWe4n.js";import"./extension-CUOKUt7o.js";
4
+ */import{h,r as registerInstance,c as createEvent,H as Host}from"./index-CwgZaF40.js";import{X as X509Certificate}from"./x509_certificate-BiAmXJ4S.js";import{Z as l10n,_ as dateShort,$ as OIDs}from"./ssh_certificate-PCn0WXhQ.js";import{T as Typography,B as Button}from"./button-Bbh7MwG6.js";import{D as DetailsIcon,L as LinkIcon,C as CrossIcon}from"./cross-G84H_-QL.js";import{D as DownloadIcon}from"./download-ykcxSgxU.js";import{a as ArrowTopIcon,A as ArrowBottomIcon}from"./arrow_top-DL0RWe4n.js";import"./extension-DmlhftES.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,i,t,r){function c(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,n){function a(e){try{o(r.next(e))}catch(e){n(e)}}function s(e){try{o(r["throw"](e))}catch(e){n(e)}}function o(e){e.done?t(e.value):c(e.value).then(a,s)}o((r=r.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,c,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(i){return o([e,i])}}function o(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(r=1,c&&(n=s[0]&2?c["return"]:s[0]?c["throw"]||((n=c["return"])&&n.call(c),0):c.next)&&!(n=n.call(c,s[1])).done)return n;if(c=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;c=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){t.label=s[1];break}if(s[0]===6&&t.label<n[1]){t.label=n[1];n=s;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(s);break}if(n[2])t.ops.pop();t.trys.pop();continue}s=i.call(e,t)}catch(e){s=[6,e];c=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{p as promiseResolve,g as globalScripts,b as bootstrapLazy}from"./index-CwgZaF40.js";export{s as setNonce}from"./index-CwgZaF40.js";var patchBrowser=function(){var e=import.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return promiseResolve(i)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,globalScripts()];case 1:i.sent();return[2,bootstrapLazy([["peculiar-text-hider",[[262,"peculiar-text-hider",{opened:[32]}]]],["peculiar-certificate-viewer",[[257,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}]]],["peculiar-attribute-certificate-viewer_4",[[257,"peculiar-certificate-chain-viewer",{certificates:[16],download:[516],selectedCertificateIndex:[32]}],[257,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[257,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[257,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}]]],["peculiar-certificate-decoder",[[257,"peculiar-certificate-decoder",{certificateExamples:[16,"certificate-examples"],certificateToDecode:[1,"certificate-to-decode"],certificateDecoded:[32]}]]],["peculiar-button-menu_3",[[258,"peculiar-button-menu",{groups:[16],open:[32]}],[257,"peculiar-circular-progress",{size:[2],width:[2]}],[257,"peculiar-highlight-words",{search:[1]}]]],["peculiar-certificates-viewer",[[257,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]},null,{certificates:["watchCertificates"]}]]]],e)]}}))}))}));
4
+ */import{p as promiseResolve,g as globalScripts,b as bootstrapLazy}from"./index-CwgZaF40.js";export{s as setNonce}from"./index-CwgZaF40.js";var patchBrowser=function(){var e=import.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return promiseResolve(i)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return[4,globalScripts()];case 1:i.sent();return[2,bootstrapLazy([["peculiar-text-hider",[[262,"peculiar-text-hider",{opened:[32]}]]],["peculiar-certificate-viewer",[[257,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}]]],["peculiar-attribute-certificate-viewer_5",[[257,"peculiar-certificate-chain-viewer",{certificates:[16],download:[516],selectedCertificateIndex:[32]}],[257,"peculiar-ssh-certificate-viewer",{certificate:[513],download:[516],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[257,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[257,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}],[257,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],isDecodeInProcess:[32]},null,{certificate:["watchCertificateAndDecode"]}]]],["peculiar-certificate-decoder",[[257,"peculiar-certificate-decoder",{certificateExamples:[16,"certificate-examples"],certificateToDecode:[1,"certificate-to-decode"],certificateDecoded:[32]}]]],["peculiar-button-menu_3",[[258,"peculiar-button-menu",{groups:[16],open:[32]}],[257,"peculiar-circular-progress",{size:[2],width:[2]}],[257,"peculiar-highlight-words",{search:[1]}]]],["peculiar-certificates-viewer",[[257,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],mobileMediaQueryString:[1,"mobile-media-query-string"],mobileScreenView:[32],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]},null,{certificates:["watchCertificates"]}]]]],e)]}}))}))}));
5
5
  //# sourceMappingURL=peculiar.js.map
@@ -1,7 +1,7 @@
1
1
  var __extends=this&&this.__extends||function(){var e=function(t,a){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]};return e(t,a)};return function(t,a){if(typeof a!=="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function i(){this.constructor=t}t.prototype=a===null?Object.create(a):(i.prototype=a.prototype,new i)}}();var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function o(e){try{u(i["throw"](e))}catch(e){r(e)}}function u(e){e.done?a(e.value):n(e.value).then(s,o)}u((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return u([e,t])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(a=0)),a)try{if(i=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(r=a.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(o[0]===6&&a.label<r[1]){a.label=r[1];r=o;break}if(r&&a.label<r[2]){a.label=r[2];a.ops.push(o);break}if(r[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e];n=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var _a;
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{A as AsnData,p as Attribute$1,q as AsnParser,r as PrivateKeyPossessionStatement,s as ExtensionRequest,U as UnstructuredName,t as ChallengePassword,V as ValuationRanking,I as InsuranceValue,W as WebGDPR,u as ActivityDescription,T as TypeRelationship,v as DomainNameTechnicalOperator,w as DomainNameOwner,x as DomainNameLegalRepresentative,y as DomainNameBeneficiary,b as buildExports,z as id_at_statementOfPossession,B as id_pkcs9_at_extensionRequest,F as id_pkcs9_at_unstructuredName,G as id_pkcs9_at_challengePassword,H as id_ValuationRanking,J as id_InsuranceValue,K as id_WebGDPR,L as id_ActivityDescription,M as id_TypeRelationship,O as id_DomainNameTechnicalOperator,Q as id_DomainNameOwner,S as id_DomainNameLegalRepresentative,X as id_DomainNameBeneficiary,c as certificateRawToBuffer,Y as CertificationRequest,P as PemConverter,N as Name,i as id_ecPublicKey,e as AsnConvert,E as ECParameters,f as id_rsaEncryption,R as RSAPublicKey,m as getCertificateThumbprint,D as Download}from"./certification_request-CSS3OhZq.js";
4
+ */import{A as AsnData,p as Attribute$1,q as AsnParser,r as PrivateKeyPossessionStatement,s as ExtensionRequest,U as UnstructuredName,t as ChallengePassword,V as ValuationRanking,I as InsuranceValue,W as WebGDPR,u as ActivityDescription,T as TypeRelationship,v as DomainNameTechnicalOperator,w as DomainNameOwner,x as DomainNameLegalRepresentative,y as DomainNameBeneficiary,b as buildExports,z as id_at_statementOfPossession,B as id_pkcs9_at_extensionRequest,F as id_pkcs9_at_unstructuredName,G as id_pkcs9_at_challengePassword,H as id_ValuationRanking,J as id_InsuranceValue,K as id_WebGDPR,L as id_ActivityDescription,M as id_TypeRelationship,O as id_DomainNameTechnicalOperator,Q as id_DomainNameOwner,S as id_DomainNameLegalRepresentative,X as id_DomainNameBeneficiary,c as certificateRawToBuffer,Y as CertificationRequest,P as PemConverter,N as Name,i as id_ecPublicKey,e as AsnConvert,E as ECParameters,f as id_rsaEncryption,R as RSAPublicKey,m as getCertificateThumbprint,D as Download}from"./ssh_certificate-PCn0WXhQ.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -16,4 +16,4 @@ var __extends=this&&this.__extends||function(){var e=function(t,a){e=Object.setP
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
18
  */var Pkcs10CertificateRequest=function(e){__extends(t,e);function t(t){var a=e.call(this,certificateRawToBuffer(t),CertificationRequest)||this;a.thumbprints={};a.type="PKCS#10 Certificate Request";a.tag=PemConverter.CertificateRequestTag;var i=a.asn.certificationRequestInfo;a.subject=new Name(i.subject).toJSON();a.version=i.version;return a}Object.defineProperty(t.prototype,"publicKey",{get:function(){var e=this.asn.certificationRequestInfo.subjectPKInfo,t=e.subjectPublicKey,a=e.algorithm;var i;if(a.algorithm===id_ecPublicKey&&a.parameters){i=AsnConvert.parse(a.parameters,ECParameters)}if(a.algorithm===id_rsaEncryption){i=AsnConvert.parse(t,RSAPublicKey)}var n=AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:i,value:n,algorithm:a.algorithm}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"signature",{get:function(){var e=this.asn,t=e.signature,a=e.signatureAlgorithm;return{value:t,algorithm:a.algorithm}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var e=0;e<this.subject.length;e+=1){var t=this.subject[e];if(t.shortName==="CN"||t.shortName==="E"||t.shortName==="O"){return t.value}}return""},enumerable:false,configurable:true});t.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(e){var t,a;if(e===void 0){e="SHA-1"}return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);return[4,getCertificateThumbprint(e,this.raw)];case 1:t=i.sent();if(t){this.thumbprints[e]=buildExports.Convert.ToHex(t)}return[3,3];case 2:a=i.sent();console.error("Error thumbprint get:",a);return[3,3];case 3:return[2]}}))}))};t.prototype.parseAttributes=function(){var e=this.asn.certificationRequestInfo;if(e.attributes){this.attributes=e.attributes.map((function(e){return new Attribute(AsnConvert.serialize(e))}))}};t.prototype.toString=function(e){if(e===void 0){e="pem"}switch(e){case"pem":return PemConverter.encode(this.raw,this.tag);case"base64url":return buildExports.Convert.ToBase64Url(this.raw);default:return buildExports.Convert.ToBase64(this.raw)}};t.prototype.downloadAsPEM=function(e){Download.csr.asPEM(this.toString("pem"),e||this.commonName)};t.prototype.downloadAsDER=function(e){Download.csr.asDER(this.raw,e||this.commonName)};return t}(AsnData);export{Attribute as A,Pkcs10CertificateRequest as P};
19
- //# sourceMappingURL=pkcs10_certificate_request-B9Q42jiE.js.map
19
+ //# sourceMappingURL=pkcs10_certificate_request-B5C1NYFc.js.map