@peculiar/certificates-viewer 4.6.0 → 4.7.0

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 (363) hide show
  1. package/components/attribute-certificate-viewer.js +4 -4
  2. package/components/attribute-certificate-viewer.js.map +1 -1
  3. package/components/attribute.js +2 -1
  4. package/components/attribute.js.map +1 -1
  5. package/components/button-menu.js +1 -1
  6. package/components/button.js +3 -1
  7. package/components/button.js.map +1 -1
  8. package/components/certificate-chain-viewer.js +2 -2
  9. package/components/certificate-chain-viewer.js.map +1 -1
  10. package/components/certificate-viewer.js +4 -4
  11. package/components/certificate-viewer.js.map +1 -1
  12. package/components/circular-progress.js +1 -1
  13. package/components/crl-viewer.js +4 -4
  14. package/components/crl-viewer.js.map +1 -1
  15. package/components/csr-viewer.js +4 -4
  16. package/components/csr-viewer.js.map +1 -1
  17. package/components/download.js +3305 -3178
  18. package/components/download.js.map +1 -1
  19. package/components/highlight-words.js +1 -1
  20. package/components/index.js +1 -1
  21. package/components/index2.js +50 -2
  22. package/components/index2.js.map +1 -1
  23. package/components/miscellaneous.js +100 -2
  24. package/components/miscellaneous.js.map +1 -1
  25. package/components/peculiar-certificate-decoder.js +3 -3
  26. package/components/peculiar-certificate-decoder.js.map +1 -1
  27. package/components/peculiar-certificates-viewer.js +2 -2
  28. package/components/peculiar-text-hider.js +1 -1
  29. package/components/pkcs10_certificate_request.js +1 -6
  30. package/components/pkcs10_certificate_request.js.map +1 -1
  31. package/dist/cjs/{actions-Dl4HXXlI.js → actions-ByC9jQU-.js} +3 -3
  32. package/dist/cjs/{actions-Dl4HXXlI.js.map → actions-ByC9jQU-.js.map} +1 -1
  33. package/dist/cjs/{arrow_top-DBMPHVlB.js → arrow_top-Cw9KN115.js} +3 -3
  34. package/dist/cjs/{arrow_top-DBMPHVlB.js.map → arrow_top-Cw9KN115.js.map} +1 -1
  35. package/dist/cjs/{button-B0CduHSE.js → button-C8EWG_-r.js} +6 -4
  36. package/dist/cjs/button-C8EWG_-r.js.map +1 -0
  37. package/dist/cjs/{certification_request-DaJSDP3R.js → certification_request-DISQwgjn.js} +3358 -3191
  38. package/dist/cjs/certification_request-DISQwgjn.js.map +1 -0
  39. package/dist/cjs/{cross-pi7K0cHC.js → cross-3DqhA0G_.js} +3 -3
  40. package/dist/cjs/{cross-pi7K0cHC.js.map → cross-3DqhA0G_.js.map} +1 -1
  41. package/dist/cjs/{download-D9skkVoT.js → download-DQP0KR4o.js} +3 -3
  42. package/dist/cjs/{download-D9skkVoT.js.map → download-DQP0KR4o.js.map} +1 -1
  43. package/dist/cjs/extension-CGZpfI3W.js +110 -0
  44. package/dist/cjs/extension-CGZpfI3W.js.map +1 -0
  45. package/dist/cjs/{index-BO3rFndV.js → index-uHmGhObe.js} +430 -157
  46. package/dist/cjs/index-uHmGhObe.js.map +1 -0
  47. package/dist/cjs/index.cjs.js +9 -9
  48. package/dist/cjs/{link-kgbgxxVh.js → link-Cgh8wnbs.js} +4 -4
  49. package/dist/cjs/{link-kgbgxxVh.js.map → link-Cgh8wnbs.js.map} +1 -1
  50. package/dist/cjs/loader.cjs.js +3 -4
  51. package/dist/cjs/loader.cjs.js.map +1 -1
  52. package/dist/cjs/{miscellaneous-Ce9aGjKB.js → miscellaneous-D_RAtkZz.js} +82 -81
  53. package/dist/cjs/miscellaneous-D_RAtkZz.js.map +1 -0
  54. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +1 -1
  55. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js +62 -13
  56. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +1 -1
  57. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +3 -3
  58. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +7 -6
  59. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  60. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
  61. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +9 -8
  62. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  63. package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -1
  64. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +8 -7
  65. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  66. package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
  67. package/dist/cjs/peculiar-text-hider.cjs.entry.js +3 -3
  68. package/dist/cjs/peculiar.cjs.js +4 -5
  69. package/dist/cjs/peculiar.cjs.js.map +1 -1
  70. package/dist/cjs/{pkcs10_certificate_request-D13Ssi7Z.js → pkcs10_certificate_request-BQkkkT42.js} +4 -8
  71. package/dist/cjs/pkcs10_certificate_request-BQkkkT42.js.map +1 -0
  72. package/dist/cjs/{x509_certificate-h5GZArG6.js → x509_certificate-DGRpZGA2.js} +5 -4
  73. package/dist/cjs/{x509_certificate-h5GZArG6.js.map → x509_certificate-DGRpZGA2.js.map} +1 -1
  74. package/dist/cjs/{x509_crl-CDPt6P1z.js → x509_crl-DMvJk_81.js} +8 -7
  75. package/dist/cjs/{x509_crl-CDPt6P1z.js.map → x509_crl-DMvJk_81.js.map} +1 -1
  76. package/dist/collection/collection-manifest.json +1 -1
  77. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +7 -7
  78. package/dist/collection/components/button-menu/button-menu.js +1 -0
  79. package/dist/collection/components/button-menu/button-menu.js.map +1 -1
  80. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.css +3 -0
  81. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js +2 -1
  82. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js.map +1 -1
  83. package/dist/collection/components/certificate-decoder/certificate-decoder.js +2 -1
  84. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  85. package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js +25 -0
  86. package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js.map +1 -0
  87. package/dist/collection/components/certificate-details-parts/attributes/index.js +10 -1
  88. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
  89. package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js +27 -0
  90. package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js.map +1 -0
  91. package/dist/collection/components/certificate-viewer/certificate-viewer.css +3 -0
  92. package/dist/collection/components/certificate-viewer/certificate-viewer.js +8 -8
  93. package/dist/collection/components/certificates-viewer/certificates-viewer.js +4 -3
  94. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
  95. package/dist/collection/components/circular-progress/circular-progress.js +2 -2
  96. package/dist/collection/components/crl-viewer/crl-viewer.js +6 -6
  97. package/dist/collection/components/csr-viewer/csr-viewer.js +7 -7
  98. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  99. package/dist/collection/components/highlight-words/highlight-words.js +1 -1
  100. package/dist/collection/components/typography/typography.js +1 -1
  101. package/dist/collection/components/typography/typography.js.map +1 -1
  102. package/dist/collection/constants/oids.js +2 -0
  103. package/dist/collection/constants/oids.js.map +1 -1
  104. package/dist/collection/crypto/attribute.js +2 -0
  105. package/dist/collection/crypto/attribute.js.map +1 -1
  106. package/dist/collection/crypto/pkcs10_certificate_request.js +0 -7
  107. package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
  108. package/dist/esm/{actions-DzoPRObK.js → actions-BOY2Tl0T.js} +3 -3
  109. package/dist/esm/{actions-DzoPRObK.js.map → actions-BOY2Tl0T.js.map} +1 -1
  110. package/dist/esm/{arrow_top-CF9pv-tQ.js → arrow_top-DL0RWe4n.js} +3 -3
  111. package/dist/{esm-es5/arrow_top-CF9pv-tQ.js.map → esm/arrow_top-DL0RWe4n.js.map} +1 -1
  112. package/dist/esm/{button-Do0R_8PZ.js → button-Bbh7MwG6.js} +6 -4
  113. package/dist/esm/button-Bbh7MwG6.js.map +1 -0
  114. package/dist/esm/{certification_request-DazysL_f.js → certification_request-CSS3OhZq.js} +3307 -3180
  115. package/dist/esm/certification_request-CSS3OhZq.js.map +1 -0
  116. package/dist/esm/{cross-DdCuR1F2.js → cross-G84H_-QL.js} +3 -3
  117. package/dist/{esm-es5/cross-DdCuR1F2.js.map → esm/cross-G84H_-QL.js.map} +1 -1
  118. package/dist/esm/{download-Cqfc-Sxf.js → download-ykcxSgxU.js} +3 -3
  119. package/dist/esm/{download-Cqfc-Sxf.js.map → download-ykcxSgxU.js.map} +1 -1
  120. package/dist/esm/extension-CUOKUt7o.js +107 -0
  121. package/dist/esm/extension-CUOKUt7o.js.map +1 -0
  122. package/dist/esm/{index-DDDrq3In.js → index-CwgZaF40.js} +430 -158
  123. package/dist/esm/index-CwgZaF40.js.map +1 -0
  124. package/dist/esm/index.js +9 -9
  125. package/dist/esm/{link-qg3yKAoS.js → link-CGURvKy1.js} +4 -4
  126. package/dist/esm/{link-qg3yKAoS.js.map → link-CGURvKy1.js.map} +1 -1
  127. package/dist/esm/loader.js +3 -4
  128. package/dist/esm/loader.js.map +1 -1
  129. package/dist/esm/{miscellaneous-BJPX0Hs_.js → miscellaneous-DVlekgVM.js} +8 -7
  130. package/dist/esm/miscellaneous-DVlekgVM.js.map +1 -0
  131. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -1
  132. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js +62 -13
  133. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
  134. package/dist/esm/peculiar-button-menu_3.entry.js +3 -3
  135. package/dist/esm/peculiar-certificate-decoder.entry.js +7 -6
  136. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  137. package/dist/esm/peculiar-certificate-viewer.entry.js +9 -8
  138. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  139. package/dist/esm/peculiar-certificates-viewer.entry.js +8 -7
  140. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  141. package/dist/esm/peculiar-text-hider.entry.js +3 -3
  142. package/dist/esm/peculiar.js +4 -5
  143. package/dist/esm/peculiar.js.map +1 -1
  144. package/dist/esm/{pkcs10_certificate_request-SQcYKma2.js → pkcs10_certificate_request-B9Q42jiE.js} +4 -8
  145. package/dist/esm/pkcs10_certificate_request-B9Q42jiE.js.map +1 -0
  146. package/dist/esm/{x509_certificate-Dmgw53TR.js → x509_certificate-fWXLCtc8.js} +4 -3
  147. package/dist/{esm-es5/x509_certificate-Dmgw53TR.js.map → esm/x509_certificate-fWXLCtc8.js.map} +1 -1
  148. package/dist/esm/{x509_crl-B5TRu79b.js → x509_crl-Dq33Vv-q.js} +5 -4
  149. package/dist/{esm-es5/x509_crl-B5TRu79b.js.map → esm/x509_crl-Dq33Vv-q.js.map} +1 -1
  150. package/dist/esm-es5/{actions-DzoPRObK.js → actions-BOY2Tl0T.js} +2 -2
  151. package/dist/esm-es5/{actions-DzoPRObK.js.map → actions-BOY2Tl0T.js.map} +1 -1
  152. package/dist/esm-es5/{arrow_top-CF9pv-tQ.js → arrow_top-DL0RWe4n.js} +2 -2
  153. package/dist/{esm/arrow_top-CF9pv-tQ.js.map → esm-es5/arrow_top-DL0RWe4n.js.map} +1 -1
  154. package/dist/esm-es5/button-Bbh7MwG6.js +19 -0
  155. package/dist/esm-es5/button-Bbh7MwG6.js.map +1 -0
  156. package/dist/esm-es5/certification_request-CSS3OhZq.js +135 -0
  157. package/dist/esm-es5/certification_request-CSS3OhZq.js.map +1 -0
  158. package/dist/esm-es5/{cross-DdCuR1F2.js → cross-G84H_-QL.js} +2 -2
  159. package/dist/{esm/cross-DdCuR1F2.js.map → esm-es5/cross-G84H_-QL.js.map} +1 -1
  160. package/dist/esm-es5/{download-Cqfc-Sxf.js → download-ykcxSgxU.js} +2 -2
  161. package/dist/esm-es5/{download-Cqfc-Sxf.js.map → download-ykcxSgxU.js.map} +1 -1
  162. package/dist/esm-es5/extension-CUOKUt7o.js +12 -0
  163. package/dist/esm-es5/extension-CUOKUt7o.js.map +1 -0
  164. package/dist/esm-es5/index-CwgZaF40.js +6 -0
  165. package/dist/esm-es5/index-CwgZaF40.js.map +1 -0
  166. package/dist/esm-es5/index.js +1 -1
  167. package/dist/esm-es5/{link-qg3yKAoS.js → link-CGURvKy1.js} +3 -3
  168. package/dist/esm-es5/{link-qg3yKAoS.js.map → link-CGURvKy1.js.map} +1 -1
  169. package/dist/esm-es5/loader.js +2 -2
  170. package/dist/esm-es5/loader.js.map +1 -1
  171. package/dist/esm-es5/{miscellaneous-BJPX0Hs_.js → miscellaneous-DVlekgVM.js} +2 -2
  172. package/dist/esm-es5/miscellaneous-DVlekgVM.js.map +1 -0
  173. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -1
  174. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js +17 -3
  175. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
  176. package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
  177. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  178. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  179. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  180. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  181. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  182. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  183. package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
  184. package/dist/esm-es5/peculiar.js +2 -2
  185. package/dist/esm-es5/peculiar.js.map +1 -1
  186. package/dist/esm-es5/pkcs10_certificate_request-B9Q42jiE.js +19 -0
  187. package/dist/esm-es5/pkcs10_certificate_request-B9Q42jiE.js.map +1 -0
  188. package/dist/esm-es5/{x509_certificate-Dmgw53TR.js → x509_certificate-fWXLCtc8.js} +4 -4
  189. package/dist/{esm/x509_certificate-Dmgw53TR.js.map → esm-es5/x509_certificate-fWXLCtc8.js.map} +1 -1
  190. package/dist/esm-es5/{x509_crl-B5TRu79b.js → x509_crl-Dq33Vv-q.js} +4 -4
  191. package/dist/{esm/x509_crl-B5TRu79b.js.map → esm-es5/x509_crl-Dq33Vv-q.js.map} +1 -1
  192. package/dist/peculiar/index.esm.js +1 -1
  193. package/dist/peculiar/loader.esm.js.map +1 -1
  194. package/dist/peculiar/p-17ebc78c.system.entry.js +5 -0
  195. package/dist/peculiar/p-17ebc78c.system.entry.js.map +1 -0
  196. package/dist/peculiar/{p-7b0e7f43.entry.js → p-27ae6a3a.entry.js} +2 -2
  197. package/dist/peculiar/{p-5b843427.entry.js → p-4cc72a56.entry.js} +2 -2
  198. package/dist/peculiar/{p-a3c0f753.system.entry.js → p-607d08e8.system.entry.js} +2 -2
  199. package/dist/peculiar/p-7fTYvx_V.system.js +19 -0
  200. package/dist/peculiar/p-7fTYvx_V.system.js.map +1 -0
  201. package/dist/peculiar/{p-15c2b820.entry.js → p-9d9f24bd.entry.js} +2 -2
  202. package/dist/peculiar/{p-Cm-ylIxb.system.js → p-B4PdAFCr.system.js} +4 -4
  203. package/dist/peculiar/p-B4PdAFCr.system.js.map +1 -0
  204. package/dist/peculiar/p-BGASC3UX.system.js +5 -0
  205. package/dist/peculiar/p-BGASC3UX.system.js.map +1 -0
  206. package/dist/peculiar/{p-0HZUc9Ix.js → p-BG_D4qzJ.js} +3 -3
  207. package/dist/peculiar/{p-0HZUc9Ix.js.map → p-BG_D4qzJ.js.map} +1 -1
  208. package/dist/peculiar/{p-YHrZ3f_s.system.js → p-BTn-wukS.system.js} +2 -2
  209. package/dist/peculiar/p-BTn-wukS.system.js.map +1 -0
  210. package/dist/peculiar/{p-B2YrZuK2.system.js → p-Bi5mjeeg.system.js} +2 -2
  211. package/dist/peculiar/{p-B2YrZuK2.system.js.map → p-Bi5mjeeg.system.js.map} +1 -1
  212. package/dist/peculiar/{p-wYK0iVYg.system.js → p-Bknpl7EO.system.js} +3 -3
  213. package/dist/peculiar/{p-wYK0iVYg.system.js.map → p-Bknpl7EO.system.js.map} +1 -1
  214. package/dist/peculiar/{p-BcFnjn1R.system.js.map → p-Bsy7Sqzl.system.js.map} +1 -1
  215. package/dist/peculiar/{p-BKKflyKt.system.js → p-CEzxVCEh.system.js} +4 -4
  216. package/dist/peculiar/{p-BKKflyKt.system.js.map → p-CEzxVCEh.system.js.map} +1 -1
  217. package/dist/peculiar/{p-DhdG07f8.js → p-CHnDlTqM.js} +2 -2
  218. package/dist/peculiar/{p-DhdG07f8.js.map → p-CHnDlTqM.js.map} +1 -1
  219. package/dist/peculiar/p-CSS3OhZq.js +135 -0
  220. package/dist/peculiar/p-CSS3OhZq.js.map +1 -0
  221. package/dist/peculiar/p-CZuaTO2G.js +12 -0
  222. package/dist/peculiar/p-CZuaTO2G.js.map +1 -0
  223. package/dist/peculiar/{p-BA8os2l6.system.js.map → p-CbJQZ9Hh.system.js.map} +1 -1
  224. package/dist/peculiar/{p-BBgwMHRZ.system.js → p-CdS84qJs.system.js} +5 -5
  225. package/dist/peculiar/{p-BBgwMHRZ.system.js.map → p-CdS84qJs.system.js.map} +1 -1
  226. package/dist/peculiar/p-CgCUixvk.system.js +12 -0
  227. package/dist/peculiar/p-CgCUixvk.system.js.map +1 -0
  228. package/dist/peculiar/p-CoPYW15U.js +19 -0
  229. package/dist/peculiar/p-CoPYW15U.js.map +1 -0
  230. package/dist/peculiar/{p-CkwiD_ia.js → p-CutTi-2B.js} +4 -4
  231. package/dist/peculiar/p-CutTi-2B.js.map +1 -0
  232. package/dist/peculiar/p-CwgZaF40.js +6 -0
  233. package/dist/peculiar/p-CwgZaF40.js.map +1 -0
  234. package/dist/peculiar/p-D8TC0Na9.system.js.map +1 -0
  235. package/dist/peculiar/{p-BP2bmYR2.system.js → p-D8xU284r.system.js} +3 -3
  236. package/dist/peculiar/{p-BP2bmYR2.system.js.map → p-D8xU284r.system.js.map} +1 -1
  237. package/dist/peculiar/p-DKl0YViA.system.js +6 -0
  238. package/dist/peculiar/p-DKl0YViA.system.js.map +1 -0
  239. package/dist/peculiar/p-DKooqn40.js +369 -0
  240. package/dist/peculiar/p-DKooqn40.js.map +1 -0
  241. package/dist/peculiar/p-DLsQGkmT.system.js.map +1 -0
  242. package/dist/peculiar/{p-CEHpBNWe.js → p-DMZr5ztF.js} +3 -3
  243. package/dist/peculiar/{p-CEHpBNWe.js.map → p-DMZr5ztF.js.map} +1 -1
  244. package/dist/peculiar/{p-DRoyzOgk.system.js → p-DTz3NA_M.system.js} +3 -3
  245. package/dist/peculiar/{p-DRoyzOgk.system.js.map → p-DTz3NA_M.system.js.map} +1 -1
  246. package/dist/peculiar/p-D_WeukQa.system.js +135 -0
  247. package/dist/peculiar/p-D_WeukQa.system.js.map +1 -0
  248. package/dist/peculiar/{p-DkAhB3Vy.js → p-DanjeXNk.js} +2 -2
  249. package/dist/peculiar/{p-DkAhB3Vy.js.map → p-DanjeXNk.js.map} +1 -1
  250. package/dist/peculiar/{p-BmIps4bV.system.js → p-DcTXA-2R.system.js} +43 -43
  251. package/dist/peculiar/p-DcTXA-2R.system.js.map +1 -0
  252. package/dist/peculiar/{p-BHBizfwo.js → p-JyD6URnB.js} +3 -3
  253. package/dist/peculiar/{p-BHBizfwo.js.map → p-JyD6URnB.js.map} +1 -1
  254. package/dist/peculiar/{p-D13P_msn.system.js.map → p-N3w4Sc5c.system.js.map} +1 -1
  255. package/dist/peculiar/{p-BOSH9vjy.system.js → p-NnCM1ETy.system.js} +3 -3
  256. package/dist/peculiar/{p-BOSH9vjy.system.js.map → p-NnCM1ETy.system.js.map} +1 -1
  257. package/dist/peculiar/{p-CeKqQ13Z.js → p-ZT6tVIen.js} +4 -4
  258. package/dist/peculiar/{p-CeKqQ13Z.js.map → p-ZT6tVIen.js.map} +1 -1
  259. package/dist/peculiar/{p-44648a8e.system.entry.js → p-a193f8fd.system.entry.js} +2 -2
  260. package/dist/peculiar/p-a4e74904.entry.js +124 -0
  261. package/dist/peculiar/p-a4e74904.entry.js.map +1 -0
  262. package/dist/peculiar/p-ce006f1c.system.entry.js +5 -0
  263. package/dist/peculiar/p-ce006f1c.system.entry.js.map +1 -0
  264. package/dist/peculiar/{p-d16ddef8.system.entry.js → p-de857304.system.entry.js} +2 -2
  265. package/dist/peculiar/p-e3967e76.entry.js +5 -0
  266. package/dist/peculiar/p-e3967e76.entry.js.map +1 -0
  267. package/dist/peculiar/p-e7c60082.system.entry.js +125 -0
  268. package/dist/peculiar/p-e7c60082.system.entry.js.map +1 -0
  269. package/dist/peculiar/{p--Pej0I-A.system.js.map → p-eziSY5IJ.system.js.map} +1 -1
  270. package/dist/peculiar/p-f465afe6.entry.js +5 -0
  271. package/dist/peculiar/p-f465afe6.entry.js.map +1 -0
  272. package/dist/peculiar/p-tBL0ekYY.system.js.map +1 -0
  273. package/dist/peculiar/{p-3zhoLQno.js → p-tl0v45Y7.js} +4 -4
  274. package/dist/peculiar/{p-3zhoLQno.js.map → p-tl0v45Y7.js.map} +1 -1
  275. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +1 -1
  276. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
  277. package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -1
  278. package/dist/peculiar/peculiar-certificates-viewer.entry.esm.js.map +1 -1
  279. package/dist/peculiar/peculiar.esm.js +1 -1
  280. package/dist/peculiar/peculiar.esm.js.map +1 -1
  281. package/dist/peculiar/peculiar.js +1 -1
  282. package/dist/types/components/certificate-details-parts/attributes/extension_request_attribute.d.ts +15 -0
  283. package/dist/types/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.d.ts +15 -0
  284. package/dist/types/components/typography/typography.d.ts +2 -1
  285. package/dist/types/components.d.ts +26 -0
  286. package/dist/types/constants/oids.d.ts +2 -0
  287. package/dist/types/crypto/attribute.d.ts +2 -0
  288. package/dist/types/crypto/pkcs10_certificate_request.d.ts +0 -2
  289. package/dist/types/stencil-public-runtime.d.ts +34 -6
  290. package/hydrate/index.d.ts +38 -24
  291. package/hydrate/index.js +4331 -3299
  292. package/hydrate/index.mjs +4330 -3300
  293. package/package.json +33 -33
  294. package/dist/cjs/app-globals-BOZYdIuK.js +0 -11
  295. package/dist/cjs/app-globals-BOZYdIuK.js.map +0 -1
  296. package/dist/cjs/button-B0CduHSE.js.map +0 -1
  297. package/dist/cjs/certification_request-DaJSDP3R.js.map +0 -1
  298. package/dist/cjs/index-BO3rFndV.js.map +0 -1
  299. package/dist/cjs/miscellaneous-Ce9aGjKB.js.map +0 -1
  300. package/dist/cjs/pkcs10_certificate_request-D13Ssi7Z.js.map +0 -1
  301. package/dist/esm/app-globals-zVR349KA.js +0 -9
  302. package/dist/esm/app-globals-zVR349KA.js.map +0 -1
  303. package/dist/esm/button-Do0R_8PZ.js.map +0 -1
  304. package/dist/esm/certification_request-DazysL_f.js.map +0 -1
  305. package/dist/esm/index-DDDrq3In.js.map +0 -1
  306. package/dist/esm/miscellaneous-BJPX0Hs_.js.map +0 -1
  307. package/dist/esm/pkcs10_certificate_request-SQcYKma2.js.map +0 -1
  308. package/dist/esm-es5/app-globals-zVR349KA.js +0 -5
  309. package/dist/esm-es5/app-globals-zVR349KA.js.map +0 -1
  310. package/dist/esm-es5/button-Do0R_8PZ.js +0 -19
  311. package/dist/esm-es5/button-Do0R_8PZ.js.map +0 -1
  312. package/dist/esm-es5/certification_request-DazysL_f.js +0 -142
  313. package/dist/esm-es5/certification_request-DazysL_f.js.map +0 -1
  314. package/dist/esm-es5/index-DDDrq3In.js +0 -6
  315. package/dist/esm-es5/index-DDDrq3In.js.map +0 -1
  316. package/dist/esm-es5/miscellaneous-BJPX0Hs_.js.map +0 -1
  317. package/dist/esm-es5/pkcs10_certificate_request-SQcYKma2.js +0 -19
  318. package/dist/esm-es5/pkcs10_certificate_request-SQcYKma2.js.map +0 -1
  319. package/dist/peculiar/p-16aa5600.system.entry.js +0 -5
  320. package/dist/peculiar/p-16aa5600.system.entry.js.map +0 -1
  321. package/dist/peculiar/p-1cbb0d6b.entry.js +0 -110
  322. package/dist/peculiar/p-1cbb0d6b.entry.js.map +0 -1
  323. package/dist/peculiar/p-218364f2.entry.js +0 -5
  324. package/dist/peculiar/p-218364f2.entry.js.map +0 -1
  325. package/dist/peculiar/p-52444a44.system.entry.js +0 -5
  326. package/dist/peculiar/p-52444a44.system.entry.js.map +0 -1
  327. package/dist/peculiar/p-BAB4EyrL.system.js.map +0 -1
  328. package/dist/peculiar/p-BBZwtkNN.system.js +0 -19
  329. package/dist/peculiar/p-BBZwtkNN.system.js.map +0 -1
  330. package/dist/peculiar/p-BFenL1ap.system.js +0 -6
  331. package/dist/peculiar/p-BFenL1ap.system.js.map +0 -1
  332. package/dist/peculiar/p-BmIps4bV.system.js.map +0 -1
  333. package/dist/peculiar/p-CDh6shXP.system.js +0 -142
  334. package/dist/peculiar/p-CDh6shXP.system.js.map +0 -1
  335. package/dist/peculiar/p-CJro0Exb.js +0 -369
  336. package/dist/peculiar/p-CJro0Exb.js.map +0 -1
  337. package/dist/peculiar/p-CWs-Ocvt.system.js.map +0 -1
  338. package/dist/peculiar/p-CkwiD_ia.js.map +0 -1
  339. package/dist/peculiar/p-Cm-ylIxb.system.js.map +0 -1
  340. package/dist/peculiar/p-CwlxH4oM.system.js +0 -5
  341. package/dist/peculiar/p-CwlxH4oM.system.js.map +0 -1
  342. package/dist/peculiar/p-D5BWI7FK.system.js +0 -5
  343. package/dist/peculiar/p-D5BWI7FK.system.js.map +0 -1
  344. package/dist/peculiar/p-DDDrq3In.js +0 -6
  345. package/dist/peculiar/p-DDDrq3In.js.map +0 -1
  346. package/dist/peculiar/p-DJRm54BZ.system.js.map +0 -1
  347. package/dist/peculiar/p-DazysL_f.js +0 -142
  348. package/dist/peculiar/p-DazysL_f.js.map +0 -1
  349. package/dist/peculiar/p-DzItK48Y.js +0 -19
  350. package/dist/peculiar/p-DzItK48Y.js.map +0 -1
  351. package/dist/peculiar/p-YHrZ3f_s.system.js.map +0 -1
  352. package/dist/peculiar/p-ab6a8a44.entry.js +0 -5
  353. package/dist/peculiar/p-ab6a8a44.entry.js.map +0 -1
  354. package/dist/peculiar/p-d9013293.system.entry.js +0 -111
  355. package/dist/peculiar/p-d9013293.system.entry.js.map +0 -1
  356. package/dist/peculiar/p-zVR349KA.js +0 -5
  357. package/dist/peculiar/p-zVR349KA.js.map +0 -1
  358. /package/dist/peculiar/{p-7b0e7f43.entry.js.map → p-27ae6a3a.entry.js.map} +0 -0
  359. /package/dist/peculiar/{p-5b843427.entry.js.map → p-4cc72a56.entry.js.map} +0 -0
  360. /package/dist/peculiar/{p-a3c0f753.system.entry.js.map → p-607d08e8.system.entry.js.map} +0 -0
  361. /package/dist/peculiar/{p-15c2b820.entry.js.map → p-9d9f24bd.entry.js.map} +0 -0
  362. /package/dist/peculiar/{p-44648a8e.system.entry.js.map → p-a193f8fd.system.entry.js.map} +0 -0
  363. /package/dist/peculiar/{p-d16ddef8.system.entry.js.map → p-de857304.system.entry.js.map} +0 -0
@@ -1,12 +1,12 @@
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 n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function o(t){try{s(n.next(t))}catch(t){a(t)}}function u(t){try{s(n["throw"](t))}catch(t){a(t)}}function s(t){t.done?r(t.value):i(t.value).then(o,u)}s((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(e){return s([t,e])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(n=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=e.call(t,r)}catch(t){u=[6,t];i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
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 n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{s(n.next(t))}catch(t){o(t)}}function u(t){try{s(n["throw"](t))}catch(t){o(t)}}function s(t){t.done?r(t.value):i(t.value).then(a,u)}s((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(e){return s([t,e])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(r=0)),r)try{if(n=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1];o=u;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(u);break}if(o[2])r.ops.pop();r.trys.pop();continue}u=e.call(t,r)}catch(t){u=[6,t];i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{A as AsnData,c as certificateRawToBuffer,C as Certificate,P as PemConverter,b as buildExports,N as Name,a as dateDiff,E as Extension,e as AsnConvert,i as id_ecPublicKey,f as ECParameters,g as id_rsaEncryption,R as RSAPublicKey,h as id_composite_key,j as CompositePublicKey,k as id_alg_composite,l as CompositeSignatureValue,m as CompositeParams,n as getCertificateThumbprint,D as Download}from"./certification_request-DazysL_f.js";
4
+ */import{A as AsnData,c as certificateRawToBuffer,C as Certificate,P as PemConverter,b as buildExports,N as Name,a as dateDiff,e as AsnConvert,i as id_ecPublicKey,E as ECParameters,f as id_rsaEncryption,R as RSAPublicKey,g as id_composite_key,h as CompositePublicKey,j as id_alg_composite,k as CompositeSignatureValue,l as CompositeParams,m as getCertificateThumbprint,D as Download}from"./certification_request-CSS3OhZq.js";import{E as Extension}from"./extension-CUOKUt7o.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */var X509Certificate=function(t){__extends(e,t);function e(e){var r=t.call(this,certificateRawToBuffer(e),Certificate)||this;r.thumbprints={};r.type="X.509 Certificate";r.tag=PemConverter.CertificateTag;var n=r.asn.tbsCertificate;r.serialNumber=buildExports.Convert.ToHex(n.serialNumber);r.subject=new Name(n.subject).toJSON();r.issuer=new Name(n.issuer).toJSON();r.version=n.version+1;var i=n.validity.notBefore.utcTime||n.validity.notBefore.generalTime;if(!i){throw new Error("Cannot get 'notBefore' value")}r.notBefore=i;var a=n.validity.notAfter.utcTime||n.validity.notAfter.generalTime;if(!a){throw new Error("Cannot get 'notAfter' value")}r.notAfter=a;r.validity=dateDiff(r.notBefore,r.notAfter);return r}e.prototype.parseExtensions=function(){var t=this.asn.tbsCertificate;if(t.extensions){this.extensions=t.extensions.map((function(t){return new Extension(AsnConvert.serialize(t))}))}};e.prototype.getPublicKeyInfo=function(t){var e=this;var r=t.subjectPublicKey,n=t.algorithm;var i;if(n.algorithm===id_ecPublicKey&&n.parameters){i=AsnConvert.parse(n.parameters,ECParameters)}if(n.algorithm===id_rsaEncryption){i=AsnConvert.parse(r,RSAPublicKey)}if(n.algorithm===id_composite_key){i=AsnConvert.parse(r,CompositePublicKey);i=i.map((function(t){return e.getPublicKeyInfo(t)}))}var a=AsnConvert.serialize(t);return{params:i,value:a,algorithm:n.algorithm}};Object.defineProperty(e.prototype,"publicKey",{get:function(){return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"signature",{get:function(){var t=this.asn,e=t.signatureValue,r=t.signatureAlgorithm;var n;if(r.algorithm===id_alg_composite){var i=AsnConvert.parse(e,CompositeSignatureValue);var a=AsnConvert.parse(r.parameters,CompositeParams);n=a.map((function(t,e){return Object.assign(Object.assign({},t),{value:i[e]})}))}return{params:n,value:e,algorithm:r.algorithm}},enumerable:false,configurable:true});e.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,getCertificateThumbprint(t,this.raw)];case 1:e=n.sent();if(e){this.thumbprints[t]=buildExports.Convert.ToHex(e)}return[3,3];case 2:r=n.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};Object.defineProperty(e.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var t=0;t<this.subject.length;t+=1){var e=this.subject[t];if(e.shortName==="CN"||e.shortName==="E"||e.shortName==="O"){return e.value}}return""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"issuerCommonName",{get:function(){if(!this.issuer){return""}for(var t=0;t<this.issuer.length;t+=1){var e=this.issuer[t];if(e.shortName==="CN"||e.shortName==="E"||e.shortName==="O"){return e.value}}return""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isRoot",{get:function(){return JSON.stringify(this.issuer)===JSON.stringify(this.subject)},enumerable:false,configurable:true});e.prototype.subjectToString=function(){if(!this.subject){return""}return this.subject.map((function(t){return"".concat(t.shortName,"=").concat(t.value)})).join(", ")};e.prototype.issuerToString=function(){if(!this.issuer){return""}return this.issuer.map((function(t){return"".concat(t.shortName,"=").concat(t.value)})).join(", ")};e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return PemConverter.encode(this.raw,this.tag);case"base64url":return buildExports.Convert.ToBase64Url(this.raw);default:return buildExports.Convert.ToBase64(this.raw)}};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}(AsnData);export{X509Certificate as X};
12
- //# sourceMappingURL=x509_certificate-Dmgw53TR.js.map
11
+ */var X509Certificate=function(t){__extends(e,t);function e(e){var r=t.call(this,certificateRawToBuffer(e),Certificate)||this;r.thumbprints={};r.type="X.509 Certificate";r.tag=PemConverter.CertificateTag;var n=r.asn.tbsCertificate;r.serialNumber=buildExports.Convert.ToHex(n.serialNumber);r.subject=new Name(n.subject).toJSON();r.issuer=new Name(n.issuer).toJSON();r.version=n.version+1;var i=n.validity.notBefore.utcTime||n.validity.notBefore.generalTime;if(!i){throw new Error("Cannot get 'notBefore' value")}r.notBefore=i;var o=n.validity.notAfter.utcTime||n.validity.notAfter.generalTime;if(!o){throw new Error("Cannot get 'notAfter' value")}r.notAfter=o;r.validity=dateDiff(r.notBefore,r.notAfter);return r}e.prototype.parseExtensions=function(){var t=this.asn.tbsCertificate;if(t.extensions){this.extensions=t.extensions.map((function(t){return new Extension(AsnConvert.serialize(t))}))}};e.prototype.getPublicKeyInfo=function(t){var e=this;var r=t.subjectPublicKey,n=t.algorithm;var i;if(n.algorithm===id_ecPublicKey&&n.parameters){i=AsnConvert.parse(n.parameters,ECParameters)}if(n.algorithm===id_rsaEncryption){i=AsnConvert.parse(r,RSAPublicKey)}if(n.algorithm===id_composite_key){i=AsnConvert.parse(r,CompositePublicKey);i=i.map((function(t){return e.getPublicKeyInfo(t)}))}var o=AsnConvert.serialize(t);return{params:i,value:o,algorithm:n.algorithm}};Object.defineProperty(e.prototype,"publicKey",{get:function(){return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"signature",{get:function(){var t=this.asn,e=t.signatureValue,r=t.signatureAlgorithm;var n;if(r.algorithm===id_alg_composite){var i=AsnConvert.parse(e,CompositeSignatureValue);var o=AsnConvert.parse(r.parameters,CompositeParams);n=o.map((function(t,e){return Object.assign(Object.assign({},t),{value:i[e]})}))}return{params:n,value:e,algorithm:r.algorithm}},enumerable:false,configurable:true});e.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,getCertificateThumbprint(t,this.raw)];case 1:e=n.sent();if(e){this.thumbprints[t]=buildExports.Convert.ToHex(e)}return[3,3];case 2:r=n.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};Object.defineProperty(e.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var t=0;t<this.subject.length;t+=1){var e=this.subject[t];if(e.shortName==="CN"||e.shortName==="E"||e.shortName==="O"){return e.value}}return""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"issuerCommonName",{get:function(){if(!this.issuer){return""}for(var t=0;t<this.issuer.length;t+=1){var e=this.issuer[t];if(e.shortName==="CN"||e.shortName==="E"||e.shortName==="O"){return e.value}}return""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isRoot",{get:function(){return JSON.stringify(this.issuer)===JSON.stringify(this.subject)},enumerable:false,configurable:true});e.prototype.subjectToString=function(){if(!this.subject){return""}return this.subject.map((function(t){return"".concat(t.shortName,"=").concat(t.value)})).join(", ")};e.prototype.issuerToString=function(){if(!this.issuer){return""}return this.issuer.map((function(t){return"".concat(t.shortName,"=").concat(t.value)})).join(", ")};e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return PemConverter.encode(this.raw,this.tag);case"base64url":return buildExports.Convert.ToBase64Url(this.raw);default:return buildExports.Convert.ToBase64(this.raw)}};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}(AsnData);export{X509Certificate as X};
12
+ //# sourceMappingURL=x509_certificate-fWXLCtc8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x509_certificate-Dmgw53TR.js","sources":["src/crypto/x509_certificate.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport {\n id_composite_key,\n id_alg_composite,\n CompositePublicKey,\n CompositeSignatureValue,\n CompositeParams,\n} from '@peculiar/asn1-x509-post-quantum';\nimport { Certificate, SubjectPublicKeyInfo } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\nimport { dateDiff, Download } from '../utils';\nimport { Name, INameJSON } from './name';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\nexport interface ISignature {\n algorithm: string;\n value: BufferSource;\n params?: {\n algorithm: string;\n value: BufferSource;\n }[];\n}\n\nexport interface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey | IPublicKey[];\n}\n\nexport class X509Certificate extends AsnData<Certificate> {\n public readonly serialNumber: string;\n\n public readonly subject: INameJSON[];\n\n public readonly issuer: INameJSON[];\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public readonly version: number;\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'X.509 Certificate';\n\n public readonly tag = PemConverter.CertificateTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), Certificate);\n\n const { tbsCertificate } = this.asn;\n\n this.serialNumber = Convert.ToHex(tbsCertificate.serialNumber);\n this.subject = new Name(tbsCertificate.subject).toJSON();\n this.issuer = new Name(tbsCertificate.issuer).toJSON();\n this.version = tbsCertificate.version + 1;\n\n const notBefore = tbsCertificate.validity.notBefore.utcTime\n || tbsCertificate.validity.notBefore.generalTime;\n\n if (!notBefore) {\n throw new Error('Cannot get \\'notBefore\\' value');\n }\n\n this.notBefore = notBefore;\n\n const notAfter = tbsCertificate.validity.notAfter.utcTime\n || tbsCertificate.validity.notAfter.generalTime;\n\n if (!notAfter) {\n throw new Error('Cannot get \\'notAfter\\' value');\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n }\n\n public parseExtensions() {\n const { tbsCertificate } = this.asn;\n\n if (tbsCertificate.extensions) {\n this.extensions = tbsCertificate.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n private getPublicKeyInfo(publicKeyInfo: SubjectPublicKeyInfo) {\n const { subjectPublicKey, algorithm } = publicKeyInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n if (algorithm.algorithm === id_composite_key) {\n params = AsnConvert.parse(subjectPublicKey, CompositePublicKey);\n\n params = params.map((param) => this.getPublicKeyInfo(param));\n }\n\n const spki = AsnConvert.serialize(publicKeyInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get publicKey(): IPublicKey {\n return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo);\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n let params;\n\n if (signatureAlgorithm.algorithm === id_alg_composite) {\n const compositeSignatureValues = AsnConvert.parse(signatureValue, CompositeSignatureValue);\n const compositeParams = AsnConvert.parse(signatureAlgorithm.parameters, CompositeParams);\n\n params = compositeParams.map((param, index) => ({\n ...param,\n value: compositeSignatureValues[index],\n }));\n }\n\n return {\n params,\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get issuerCommonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get isRoot(): boolean {\n return JSON.stringify(this.issuer) === JSON.stringify(this.subject);\n }\n\n public subjectToString() {\n if (!this.subject) {\n return '';\n }\n\n return this.subject\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public issuerToString() {\n if (!this.issuer) {\n return '';\n }\n\n return this.issuer\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\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 );\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AAC,IAAI,CAAC;;IAGR,cAAc,GAAA;AACnB,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAChB,YAAA,OAAO,EAAE;;QAGX,OAAO,IAAI,CAAC;AACT,aAAA,GAAG,CAAC,CAAC,IAAI,MACR,CAAA,EAAG,IAAI,CAAC,SAAS,CAAI,CAAA,EAAA,IAAI,CAAC,KAAK,CAAA,CAAE,CAClC;aACA,IAAI,CAAC,IAAI,CAAC;;IAGR,QAAQ,CAAC,SAAyC,KAAK,EAAA;QAC5D,QAAQ,MAAM;AACZ,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;AAChD,YAAA,KAAK,WAAW;gBACd,OAAOA,oBAAO,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;AACtC,YAAA;gBACE,OAAOA,oBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;;AAIhC,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,CACjB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpB,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAGI,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,CACjB,IAAI,CAAC,GAAG,EACR,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAEJ;;;;"}
1
+ {"version":3,"file":"x509_certificate-fWXLCtc8.js","sources":["src/crypto/x509_certificate.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport {\n id_composite_key,\n id_alg_composite,\n CompositePublicKey,\n CompositeSignatureValue,\n CompositeParams,\n} from '@peculiar/asn1-x509-post-quantum';\nimport { Certificate, SubjectPublicKeyInfo } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\nimport { dateDiff, Download } from '../utils';\nimport { Name, INameJSON } from './name';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\nexport interface ISignature {\n algorithm: string;\n value: BufferSource;\n params?: {\n algorithm: string;\n value: BufferSource;\n }[];\n}\n\nexport interface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey | IPublicKey[];\n}\n\nexport class X509Certificate extends AsnData<Certificate> {\n public readonly serialNumber: string;\n\n public readonly subject: INameJSON[];\n\n public readonly issuer: INameJSON[];\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public readonly version: number;\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'X.509 Certificate';\n\n public readonly tag = PemConverter.CertificateTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), Certificate);\n\n const { tbsCertificate } = this.asn;\n\n this.serialNumber = Convert.ToHex(tbsCertificate.serialNumber);\n this.subject = new Name(tbsCertificate.subject).toJSON();\n this.issuer = new Name(tbsCertificate.issuer).toJSON();\n this.version = tbsCertificate.version + 1;\n\n const notBefore = tbsCertificate.validity.notBefore.utcTime\n || tbsCertificate.validity.notBefore.generalTime;\n\n if (!notBefore) {\n throw new Error('Cannot get \\'notBefore\\' value');\n }\n\n this.notBefore = notBefore;\n\n const notAfter = tbsCertificate.validity.notAfter.utcTime\n || tbsCertificate.validity.notAfter.generalTime;\n\n if (!notAfter) {\n throw new Error('Cannot get \\'notAfter\\' value');\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n }\n\n public parseExtensions() {\n const { tbsCertificate } = this.asn;\n\n if (tbsCertificate.extensions) {\n this.extensions = tbsCertificate.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n private getPublicKeyInfo(publicKeyInfo: SubjectPublicKeyInfo) {\n const { subjectPublicKey, algorithm } = publicKeyInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n if (algorithm.algorithm === id_composite_key) {\n params = AsnConvert.parse(subjectPublicKey, CompositePublicKey);\n\n params = params.map((param) => this.getPublicKeyInfo(param));\n }\n\n const spki = AsnConvert.serialize(publicKeyInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get publicKey(): IPublicKey {\n return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo);\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n let params;\n\n if (signatureAlgorithm.algorithm === id_alg_composite) {\n const compositeSignatureValues = AsnConvert.parse(signatureValue, CompositeSignatureValue);\n const compositeParams = AsnConvert.parse(signatureAlgorithm.parameters, CompositeParams);\n\n params = compositeParams.map((param, index) => ({\n ...param,\n value: compositeSignatureValues[index],\n }));\n }\n\n return {\n params,\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get issuerCommonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get isRoot(): boolean {\n return JSON.stringify(this.issuer) === JSON.stringify(this.subject);\n }\n\n public subjectToString() {\n if (!this.subject) {\n return '';\n }\n\n return this.subject\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public issuerToString() {\n if (!this.issuer) {\n return '';\n }\n\n return this.issuer\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\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"],"names":["Convert"],"mappings":";;;;;;AAAA;;;;;;AAMG;AAuCG,MAAO,eAAgB,SAAQ,OAAoB,CAAA;AAuBvD,IAAA,WAAA,CAAY,GAAW,EAAA;QACrB,KAAK,CAAC,sBAAsB,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;QAP1C,IAAW,CAAA,WAAA,GAA2B,EAAE;QAE/B,IAAI,CAAA,IAAA,GAAG,mBAAmB;AAE1B,QAAA,IAAA,CAAA,GAAG,GAAG,YAAY,CAAC,cAAc;AAK/C,QAAA,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,GAAG;QAEnC,IAAI,CAAC,YAAY,GAAG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CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;AAChD,YAAA,KAAK,WAAW;gBACd,OAAOA,oBAAO,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;AACtC,YAAA;gBACE,OAAOA,oBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;;AAIhC,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,CACjB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpB,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAGI,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,CACjB,IAAI,CAAC,GAAG,EACR,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAEJ;;;;"}
@@ -1,14 +1,14 @@
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 n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{s(n.next(t))}catch(t){o(t)}}function u(t){try{s(n["throw"](t))}catch(t){o(t)}}function s(t){t.done?r(t.value):i(t.value).then(a,u)}s((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(e){return s([t,e])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(r=0)),r)try{if(n=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1];o=u;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(u);break}if(o[2])r.ops.pop();r.trys.pop();continue}u=e.call(t,r)}catch(t){u=[6,t];i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
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 n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function u(t){try{s(n.next(t))}catch(t){o(t)}}function a(t){try{s(n["throw"](t))}catch(t){o(t)}}function s(t){t.done?r(t.value):i(t.value).then(u,a)}s((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(t){return function(e){return s([t,e])}}function s(a){if(n)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(r=0)),r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=e.call(t,r)}catch(t){a=[6,t];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{A as AsnData,c as certificateRawToBuffer,o as AttributeCertificate,P as PemConverter,b as buildExports,a as dateDiff,E as Extension,e as AsnConvert,n as getCertificateThumbprint,D as Download,p as CertificateList,N as Name}from"./certification_request-DazysL_f.js";import{A as Attribute}from"./pkcs10_certificate_request-SQcYKma2.js";
4
+ */import{A as AsnData,c as certificateRawToBuffer,n as AttributeCertificate,P as PemConverter,b as buildExports,a as dateDiff,e as AsnConvert,m as getCertificateThumbprint,D as Download,o as CertificateList,N as Name}from"./certification_request-CSS3OhZq.js";import{E as Extension}from"./extension-CUOKUt7o.js";import{A as Attribute}from"./pkcs10_certificate_request-B9Q42jiE.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */var X509AttributeCertificate=function(t){__extends(e,t);function e(e){var r;var n=t.call(this,certificateRawToBuffer(e),AttributeCertificate)||this;n.thumbprints={};n.type="X.509 Attribute Certificate";n.tag=PemConverter.AttributeCertificateTag;var i=n.asn.acinfo;n.serialNumber=buildExports.Convert.ToHex(i.serialNumber);n.version=i.version;var o=i.attrCertValidityPeriod.notBeforeTime;if(!o){throw new Error("Cannot get 'notBefore' value")}n.notBefore=o;var a=i.attrCertValidityPeriod.notAfterTime;if(!a){throw new Error("Cannot get 'notAfter' value")}n.notAfter=a;n.validity=dateDiff(n.notBefore,n.notAfter);n.issuer=i.issuer.v1Form||((r=i.issuer.v2Form)===null||r===void 0?void 0:r.issuerName);n.holder=i.holder;return n}Object.defineProperty(e.prototype,"signature",{get:function(){var t=this.asn,e=t.signatureValue,r=t.signatureAlgorithm;return{value:e,algorithm:r.algorithm}},enumerable:false,configurable:true});e.prototype.parseExtensions=function(){var t=this.asn.acinfo;if(t.extensions){this.extensions=t.extensions.map((function(t){return new Extension(AsnConvert.serialize(t))}))}};e.prototype.parseAttributes=function(){var t=this.asn.acinfo;if(t.attributes){this.attributes=t.attributes.map((function(t){return new Attribute(AsnConvert.serialize(t))}))}};e.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,getCertificateThumbprint(t,this.raw)];case 1:e=n.sent();if(e){this.thumbprints[t]=buildExports.Convert.ToHex(e)}return[3,3];case 2:r=n.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};Object.defineProperty(e.prototype,"commonName",{get:function(){return"attribute-certificate-".concat(this.thumbprints["SHA-1"])},enumerable:false,configurable:true});e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return PemConverter.encode(this.raw,this.tag);case"base64url":return buildExports.Convert.ToBase64Url(this.raw);default:return buildExports.Convert.ToBase64(this.raw)}};e.prototype.downloadAsPEM=function(t){Download.attrCert.asPEM(this.toString("pem"),t||this.commonName)};e.prototype.downloadAsDER=function(t){Download.attrCert.asDER(this.raw,t||this.commonName)};return e}(AsnData);
11
+ */var X509AttributeCertificate=function(t){__extends(e,t);function e(e){var r;var n=t.call(this,certificateRawToBuffer(e),AttributeCertificate)||this;n.thumbprints={};n.type="X.509 Attribute Certificate";n.tag=PemConverter.AttributeCertificateTag;var i=n.asn.acinfo;n.serialNumber=buildExports.Convert.ToHex(i.serialNumber);n.version=i.version;var o=i.attrCertValidityPeriod.notBeforeTime;if(!o){throw new Error("Cannot get 'notBefore' value")}n.notBefore=o;var u=i.attrCertValidityPeriod.notAfterTime;if(!u){throw new Error("Cannot get 'notAfter' value")}n.notAfter=u;n.validity=dateDiff(n.notBefore,n.notAfter);n.issuer=i.issuer.v1Form||((r=i.issuer.v2Form)===null||r===void 0?void 0:r.issuerName);n.holder=i.holder;return n}Object.defineProperty(e.prototype,"signature",{get:function(){var t=this.asn,e=t.signatureValue,r=t.signatureAlgorithm;return{value:e,algorithm:r.algorithm}},enumerable:false,configurable:true});e.prototype.parseExtensions=function(){var t=this.asn.acinfo;if(t.extensions){this.extensions=t.extensions.map((function(t){return new Extension(AsnConvert.serialize(t))}))}};e.prototype.parseAttributes=function(){var t=this.asn.acinfo;if(t.attributes){this.attributes=t.attributes.map((function(t){return new Attribute(AsnConvert.serialize(t))}))}};e.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,getCertificateThumbprint(t,this.raw)];case 1:e=n.sent();if(e){this.thumbprints[t]=buildExports.Convert.ToHex(e)}return[3,3];case 2:r=n.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};Object.defineProperty(e.prototype,"commonName",{get:function(){return"attribute-certificate-".concat(this.thumbprints["SHA-1"])},enumerable:false,configurable:true});e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return PemConverter.encode(this.raw,this.tag);case"base64url":return buildExports.Convert.ToBase64Url(this.raw);default:return buildExports.Convert.ToBase64(this.raw)}};e.prototype.downloadAsPEM=function(t){Download.attrCert.asPEM(this.toString("pem"),t||this.commonName)};e.prototype.downloadAsDER=function(t){Download.attrCert.asDER(this.raw,t||this.commonName)};return e}(AsnData);
12
12
  /**
13
13
  * @license
14
14
  * Copyright (c) Peculiar Ventures, LLC.
@@ -16,4 +16,4 @@ var __extends=this&&this.__extends||function(){var t=function(e,r){t=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 X509Crl=function(t){__extends(e,t);function e(e){var r=t.call(this,certificateRawToBuffer(e),CertificateList)||this;r.thumbprints={};r.type="X.509 Certificate Revocation List";r.tag=PemConverter.CrlTag;var n=r.asn.tbsCertList;r.issuer=new Name(n.issuer).toJSON();r.version=n.version+1;r.lastUpdate=n.thisUpdate.getTime();r.nextUpdate=n.nextUpdate.getTime();r.revokedCertificates=(n.revokedCertificates||[]).map((function(t){var e;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:(e=t.crlEntryExtensions)===null||e===void 0?void 0:e.map((function(t){return new Extension(AsnConvert.serialize(t))}))}}));return r}e.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var e,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,getCertificateThumbprint(t,this.raw)];case 1:e=n.sent();if(e){this.thumbprints[t]=buildExports.Convert.ToHex(e)}return[3,3];case 2:r=n.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};Object.defineProperty(e.prototype,"signature",{get:function(){var t=this.asn,e=t.signature,r=t.signatureAlgorithm;return{value:e,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"commonName",{get:function(){if(!this.issuer){return""}for(var t=0;t<this.issuer.length;t+=1){var e=this.issuer[t];if(e.shortName==="CN"||e.shortName==="E"||e.shortName==="O"){return e.value}}return""},enumerable:false,configurable:true});e.prototype.parseExtensions=function(){var t=this.asn.tbsCertList;if(t.crlExtensions){this.extensions=t.crlExtensions.map((function(t){return new Extension(AsnConvert.serialize(t))}))}};e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return PemConverter.encode(this.raw,this.tag);case"base64url":return buildExports.Convert.ToBase64Url(this.raw);default:return buildExports.Convert.ToBase64(this.raw)}};e.prototype.downloadAsPEM=function(t){Download.crl.asPEM(this.toString("pem"),t||this.commonName)};e.prototype.downloadAsDER=function(t){Download.crl.asDER(this.raw,t||this.commonName)};return e}(AsnData);export{X509AttributeCertificate as X,X509Crl as a};
19
- //# sourceMappingURL=x509_crl-B5TRu79b.js.map
19
+ //# sourceMappingURL=x509_crl-Dq33Vv-q.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x509_crl-B5TRu79b.js","sources":["src/crypto/x509_attribute_certificate.ts","src/crypto/x509_crl.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport type { GeneralName } from '@peculiar/asn1-x509';\nimport { AttributeCertificate, Holder } from '@peculiar/asn1-x509-attr';\nimport { Convert } from 'pvtsutils';\nimport { dateDiff, Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Extension, TExtensionValue } from './extension';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport class X509AttributeCertificate extends AsnData<AttributeCertificate> {\n public readonly serialNumber: string;\n\n public readonly version: number;\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly issuer: GeneralName[];\n\n public holder: Holder;\n\n public readonly type = 'X.509 Attribute Certificate';\n\n public readonly tag = PemConverter.AttributeCertificateTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), AttributeCertificate);\n\n const { acinfo } = this.asn;\n\n this.serialNumber = Convert.ToHex(acinfo.serialNumber);\n this.version = acinfo.version;\n\n const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;\n\n if (!notBefore) {\n throw new Error('Cannot get \\'notBefore\\' value');\n }\n\n this.notBefore = notBefore;\n\n const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;\n\n if (!notAfter) {\n throw new Error('Cannot get \\'notAfter\\' value');\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n this.issuer = acinfo.issuer.v1Form || acinfo.issuer.v2Form?.issuerName;\n this.holder = acinfo.holder;\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n\n return {\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public parseExtensions() {\n const { acinfo } = this.asn;\n\n if (acinfo.extensions) {\n this.extensions = acinfo.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public parseAttributes() {\n const { acinfo } = this.asn;\n\n if (acinfo.attributes) {\n this.attributes = acinfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n return `attribute-certificate-${this.thumbprints['SHA-1']}`;\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.attrCert.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.attrCert.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { CertificateList, Time } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport interface IRevokedCertificate {\n userCertificate: ArrayBuffer;\n revocationDate: Time;\n crlEntryExtensions?: Extension<TExtensionValue>[];\n}\n\nexport class X509Crl extends AsnData<CertificateList> {\n public readonly issuer: INameJSON[];\n\n public readonly version: number;\n\n public readonly lastUpdate: Date;\n\n public readonly nextUpdate: Date;\n\n public extensions: Extension<TExtensionValue>[];\n\n public revokedCertificates: IRevokedCertificate[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'X.509 Certificate Revocation List';\n\n public readonly tag = PemConverter.CrlTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificateList);\n\n const { tbsCertList } = this.asn;\n\n this.issuer = new Name(tbsCertList.issuer).toJSON();\n this.version = tbsCertList.version + 1;\n this.lastUpdate = tbsCertList.thisUpdate.getTime();\n this.nextUpdate = tbsCertList.nextUpdate.getTime();\n\n this.revokedCertificates = (tbsCertList.revokedCertificates || [])\n .map((revokedCertificate) => ({\n revocationDate: revokedCertificate.revocationDate,\n userCertificate: revokedCertificate.userCertificate,\n crlEntryExtensions: revokedCertificate.crlEntryExtensions\n ?.map((e) => new Extension(AsnConvert.serialize(e))),\n }));\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public parseExtensions() {\n const { tbsCertList } = this.asn;\n\n if (tbsCertList.crlExtensions) {\n this.extensions = tbsCertList.crlExtensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.crl.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.crl.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["Convert"],"mappings":";;;;;;AAAA;;;;;;AAMG;AAqBG,MAAO,wBAAyB,SAAQ,OAA6B,CAAA;AAyBzE,IAAA,WAAA,CAAY,GAAW,EAAA;;QACrB,KAAK,CAAC,sBAAsB,CAAC,GAAG,C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**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport type { GeneralName } from '@peculiar/asn1-x509';\nimport { AttributeCertificate, Holder } from '@peculiar/asn1-x509-attr';\nimport { Convert } from 'pvtsutils';\nimport { dateDiff, Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Extension, TExtensionValue } from './extension';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport class X509AttributeCertificate extends AsnData<AttributeCertificate> {\n public readonly serialNumber: string;\n\n public readonly version: number;\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly issuer: GeneralName[];\n\n public holder: Holder;\n\n public readonly type = 'X.509 Attribute Certificate';\n\n public readonly tag = PemConverter.AttributeCertificateTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), AttributeCertificate);\n\n const { acinfo } = this.asn;\n\n this.serialNumber = Convert.ToHex(acinfo.serialNumber);\n this.version = acinfo.version;\n\n const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;\n\n if (!notBefore) {\n throw new Error('Cannot get \\'notBefore\\' value');\n }\n\n this.notBefore = notBefore;\n\n const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;\n\n if (!notAfter) {\n throw new Error('Cannot get \\'notAfter\\' value');\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n this.issuer = acinfo.issuer.v1Form || acinfo.issuer.v2Form?.issuerName;\n this.holder = acinfo.holder;\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n\n return {\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public parseExtensions() {\n const { acinfo } = this.asn;\n\n if (acinfo.extensions) {\n this.extensions = acinfo.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public parseAttributes() {\n const { acinfo } = this.asn;\n\n if (acinfo.attributes) {\n this.attributes = acinfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n return `attribute-certificate-${this.thumbprints['SHA-1']}`;\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.attrCert.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.attrCert.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { CertificateList, Time } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport interface IRevokedCertificate {\n userCertificate: ArrayBuffer;\n revocationDate: Time;\n crlEntryExtensions?: Extension<TExtensionValue>[];\n}\n\nexport class X509Crl extends AsnData<CertificateList> {\n public readonly issuer: INameJSON[];\n\n public readonly version: number;\n\n public readonly lastUpdate: Date;\n\n public readonly nextUpdate: Date;\n\n public extensions: Extension<TExtensionValue>[];\n\n public revokedCertificates: IRevokedCertificate[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'X.509 Certificate Revocation List';\n\n public readonly tag = PemConverter.CrlTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificateList);\n\n const { tbsCertList } = this.asn;\n\n this.issuer = new Name(tbsCertList.issuer).toJSON();\n this.version = tbsCertList.version + 1;\n this.lastUpdate = tbsCertList.thisUpdate.getTime();\n this.nextUpdate = tbsCertList.nextUpdate.getTime();\n\n this.revokedCertificates = (tbsCertList.revokedCertificates || [])\n .map((revokedCertificate) => ({\n revocationDate: revokedCertificate.revocationDate,\n userCertificate: revokedCertificate.userCertificate,\n crlEntryExtensions: revokedCertificate.crlEntryExtensions\n ?.map((e) => new Extension(AsnConvert.serialize(e))),\n }));\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public parseExtensions() {\n const { tbsCertList } = this.asn;\n\n if (tbsCertList.crlExtensions) {\n this.extensions = tbsCertList.crlExtensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.crl.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.crl.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["Convert"],"mappings":";;;;;;;AAAA;;;;;;AAMG;AAqBG,MAAO,wBAAyB,SAAQ,OAA6B,CAAA;AAyBzE,IAAA,WAAA,CAAY,GAAW,EAAA;;QACrB,KAAK,CAAC,sBAAsB,CAAC,GAAG,CAAC,EAAE,oBAAoB,CAAC;QAXnD,IAAW,CAAA,WAAA,GAA2B,EAAE;QAM/B,IAAI,CAAA,IAAA,GAAG,6BAA6B;AAEpC,QAAA,IAAA,CAAA,GAAG,GAAG,YAAY,CAAC,uBAAuB;AAKxD,QAAA,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG;QAE3B,IAAI,CAAC,YAAY,GAAGA,oBAAO,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;AACtD,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO;AAE7B,QAAA,MAAM,SAAS,GAAG,MAAM,CAAC,sBAAsB,CAAC,aAAa;QAE7D,IAAI,CAAC,SAAS,EAAE;AACd,YAAA,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC;;AAGnD,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAE1B,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,sBAAsB,CAAC,YAAY;QAE3D,IAAI,CAAC,QAAQ,EAAE;AACb,YAAA,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC;;AAGlD,QAAA,IAAI,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,GAAG,CAAC;AACtC,YAAA;gBACE,OAAOA,oBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;;AAIhC,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpB,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAGI,IAAA,aAAa,CAAC,IAAa,EAAA;AAChC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,GAAG,EACR,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;AAEJ;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- export{D as Download,d as downloadFromBuffer}from"./p-DazysL_f.js";export{r as readAsArrayBuffer,a as readAsBinaryString,b as readAsDataUrl,c as readAsText}from"./p-F2F0McJX.js";export{P as Pkcs10CertificateRequest}from"./p-DzItK48Y.js";export{B as Button,T as Typography}from"./p-CkwiD_ia.js";export{L as Link}from"./p-CEHpBNWe.js";export{C as CrossIcon,D as DetailsIcon,L as LinkIcon}from"./p-DkAhB3Vy.js";export{D as DownloadIcon}from"./p-BHBizfwo.js";export{A as ActionsIcon}from"./p-DhdG07f8.js";export{A as ArrowBottomIcon,a as ArrowTopIcon}from"./p-CeKqQ13Z.js";import"./p-DDDrq3In.js";
4
+ export{D as Download,d as downloadFromBuffer}from"./p-CSS3OhZq.js";export{r as readAsArrayBuffer,a as readAsBinaryString,b as readAsDataUrl,c as readAsText}from"./p-F2F0McJX.js";export{P as Pkcs10CertificateRequest}from"./p-CoPYW15U.js";export{B as Button,T as Typography}from"./p-CutTi-2B.js";export{L as Link}from"./p-DMZr5ztF.js";export{C as CrossIcon,D as DetailsIcon,L as LinkIcon}from"./p-DanjeXNk.js";export{D as DownloadIcon}from"./p-JyD6URnB.js";export{A as ActionsIcon}from"./p-CHnDlTqM.js";export{A as ArrowBottomIcon,a as ArrowTopIcon}from"./p-ZT6tVIen.js";import"./p-CwgZaF40.js";
5
5
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.esm.js","sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = async (win, options) => {\n if (typeof window === 'undefined') return undefined;\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,oBAAoB,GAAG,OAAO,GAAG,EAAE,OAAO,KAAK;AAC5D,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,SAAS;AACrD,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D;;;;"}
1
+ {"version":3,"file":"loader.esm.js","sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = async (win, options) => {\n if (typeof window === 'undefined') return undefined;\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,oBAAoB,GAAG,OAAO,GAAG,EAAE,OAAO,KAAK;AAC5D,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,SAAS;AACrD,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D;;;;"}
@@ -0,0 +1,5 @@
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
+ /*!
3
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
+ */System.register(["./p-DKl0YViA.system.js","./p-DTz3NA_M.system.js","./p-D_WeukQa.system.js","./p-DcTXA-2R.system.js","./p-B4PdAFCr.system.js","./p-CgCUixvk.system.js","./p-Bknpl7EO.system.js","./p-D8xU284r.system.js"],(function(t){"use strict";var e,r,a,o,i,s,n,c,v,p,l,h,d,b,g,u;return{setters:[function(t){e=t.r;r=t.h;a=t.H},function(t){o=t.X},null,function(t){i=t.B;s=t.S;n=t.I;c=t.P;v=t.a;p=t.T;l=t.E;h=t.g;d=t.b;b=t.c;g=t.M},function(t){u=t.T},null,null,null],execute:function(){var f="*{-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 y=t("peculiar_certificate_viewer",function(){function t(t){var r=this;e(this,t);this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(t){var e;return(e=r.authKeyIdParentLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=function(t){var e;return(e=r.authKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=function(t){var e;return(e=r.subjectKeyIdChildrenLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=function(t){var e;return(e=r.subjectKeyIdSiblingsLink)===null||e===void 0?void 0:e.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 o){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new o(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 o&&e instanceof o){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}};t.prototype.getIssuerDnLink=function(){return this.issuerDnLink};t.prototype.renderErrorState=function(){return r("div",{class:"status_wrapper"},r(u,null,"There was an error decoding this certificate."))};t.prototype.renderEmptyState=function(){return r("div",{class:"status_wrapper"},r(u,null,"There is no certificate available."))};t.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return r(a,{"data-mobile-screen-view":String(this.mobileScreenView)},r("table",null,r(i,Object.assign({},this.certificateDecoded)),r(s,{name:this.certificateDecoded.subject}),r(n,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),r(c,{publicKey:this.certificateDecoded.publicKey}),r(v,{signature:this.certificateDecoded.signature}),r(p,{thumbprints:this.certificateDecoded.thumbprints}),r(l,{extensions:this.certificateDecoded.extensions,getLEILink:b,getDNSNameLink:d,getIPAddressLink:h,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&r(g,{certificate:this.certificateDecoded})))};Object.defineProperty(t,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return t}());y.style=f}}}));
5
+ //# sourceMappingURL=p-17ebc78c.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["certificateViewerCss","CertificateViewer","exports","class_1","hostRef","_this","this","mobileMediaQueryString","mobileScreenView","isDecodeInProcess","getAuthKeyIdParentLink","value","_a","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","prototype","handleMediaQueryChange","event","matches","componentWillLoad","decodeCertificate","certificate","mobileMediaQuery","window","matchMedia","addEventListener","bind","disconnectedCallback","removeEventListener","X509Certificate","certificateDecoded","parseExtensions","getThumbprint","_b","sent","certificateDecodeError","error_1","console","error","watchCertificateAndDecode","newValue","oldValue","serialNumber","getIssuerDnLink","issuerDnLink","renderErrorState","h","class","Typography","renderEmptyState","render","Host","String","BasicInformation","Object","assign","SubjectName","name","subject","IssuerName","issuer","PublicKey","publicKey","Signature","signature","Thumbprints","thumbprints","Extensions","extensions","getLEILink","getDNSNameLink","getIPAddressLink","download","Miscellaneous"],"sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n 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 { X509Certificate } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TCertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = 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: TCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: TCertificateProp, oldValue: TCertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n 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 <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;ueAAA,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BgC,YAGrChB,EAACiB,EAAS,CACRC,UAAWhE,KAAK8B,mBAAmBkC,YAGrClB,EAACmB,EAAW,CACVC,YAAalE,KAAK8B,mBAAmBoC,cAGvCpB,EAACqB,EAAU,CACTC,WAAYpE,KAAK8B,mBAAmBsC,WACpCC,WAAYA,EACZC,eAAgBA,EAChBC,iBAAkBA,EAClBnE,uBAAwBJ,KAAKI,uBAC7BK,yBAA0BT,KAAKS,yBAC/BE,4BAA6BX,KAAKW,4BAClCE,4BAA6Bb,KAAKa,8BAGnCb,KAAKwE,UACJ1B,EAAC2B,EACC,CAAApD,YAAarB,KAAK8B,sB,sJA9NF,I","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{r as t,h as s,H as e,g as r}from"./p-DDDrq3In.js";import{T as a,B as i}from"./p-CkwiD_ia.js";import{A as o}from"./p-DhdG07f8.js";const c='.sc-peculiar-button-menu-h{display:-ms-inline-flexbox;display:inline-flex;position:relative}.is_shown.sc-peculiar-button-menu-h .button_popover.sc-peculiar-button-menu:before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.is_shown.sc-peculiar-button-menu-h .popover.sc-peculiar-button-menu{display:block}.popover.sc-peculiar-button-menu{min-width:200px;position:absolute;top:100%;right:0;border-radius:4px;z-index:1;-webkit-box-shadow:var(--pv-shadow-light-medium);box-shadow:var(--pv-shadow-light-medium);background:var(--pv-color-white);padding:var(--pv-size-base-2) 0;margin:var(--pv-size-base) 0;display:none}.button_option.sc-peculiar-button-menu{width:100%;-ms-flex-pack:start;justify-content:flex-start;border-radius:0}.group.sc-peculiar-button-menu:not(:last-child){border-bottom:1px solid var(--pv-color-gray-5);padding-bottom:var(--pv-size-base-2);margin-bottom:var(--pv-size-base)}.group_title.sc-peculiar-button-menu{line-height:var(--pv-size-base-6);padding:0 var(--pv-size-base-2)}';const n=class{constructor(s){t(this,s);this.groups=[];this.open=false;this.handleClick=()=>{this.open=!this.open}}render(){return s(e,{key:"66dd03eaa8d6e1f6dee3d9782390e094c5804b4a",class:{is_shown:this.open}},s(i,{key:"ba4e5601321b4e778937f6386a8a5220e28f5809",class:"button_popover",startIcon:s(o,null),onClick:this.handleClick}),s("div",{key:"ed4d374f4a4982a24665e1cb60eaa57428ba0e4e",role:"dialog",tabIndex:-1,class:"popover","aria-hidden":String(this.open)},this.groups.map((t=>s("div",{class:"group"},s(a,{variant:"c2",color:"gray-9",class:"group_title"},t.title),t.options.map((t=>s(i,{class:"button_option",startIcon:t.startIcon,href:t.href,onClick:s=>{s.stopPropagation();this.handleClick();if(t.onClick){t.onClick(s)}}},t.text))))))))}};n.style=c;const l=":host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:var(--pv-color-secondary)}.circle_progress_backdrop{stroke:var(--pv-color-gray-3)}";const d=class{constructor(s){t(this,s);this.size=24;this.width=4;this.box=50}render(){return s(e,{key:"0a7d6a83e20839fb324b3f24c7e8b1074775c6a3"},s("div",{key:"88111c52129ca2806ab67f7862ccdbec0e55e68f",class:"circle_progress",style:{width:`${this.size}px`,height:`${this.size}px`}},s("svg",{key:"73b6d9ef7d0b5d09049f8b0c3477e633fa6ee8a3",class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},s("circle",{key:"764d4d27927cd961c84631ac2d9bf2d0ca3e542f",class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}),s("circle",{key:"b24985974a66d754514f5a82b06fa6e7cae77133",class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}))))}};d.style=l;const h=":host{display:inline}::slotted(mark){background-color:var(--pv-color-attention-tint-4)}";const p=class{constructor(s){t(this,s);this.tag="mark"}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let s=t;if(this.search){const e=new RegExp(`(${this.search})`,"gi");s=t.replace(e,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=s}resetHighlightSearch(t){const s=new RegExp(`</?${this.tag}>`,"g");return t.replace(s,"")}render(){return s(e,{key:"95b1cef18522eabfb495710d6756d8eee86dfa73"},s("slot",{key:"360e1c4d7121833dbfccdd6e1021d2030017373b"}))}get host(){return r(this)}};p.style=h;export{n as peculiar_button_menu,d as peculiar_circular_progress,p as peculiar_highlight_words};
5
- //# sourceMappingURL=p-7b0e7f43.entry.js.map
4
+ import{r as t,h as s,H as e,a as r}from"./p-CwgZaF40.js";import{T as a,B as i}from"./p-CutTi-2B.js";import{A as o}from"./p-CHnDlTqM.js";const c='.sc-peculiar-button-menu-h{display:-ms-inline-flexbox;display:inline-flex;position:relative}.is_shown.sc-peculiar-button-menu-h .button_popover.sc-peculiar-button-menu:before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.is_shown.sc-peculiar-button-menu-h .popover.sc-peculiar-button-menu{display:block}.popover.sc-peculiar-button-menu{min-width:200px;position:absolute;top:100%;right:0;border-radius:4px;z-index:1;-webkit-box-shadow:var(--pv-shadow-light-medium);box-shadow:var(--pv-shadow-light-medium);background:var(--pv-color-white);padding:var(--pv-size-base-2) 0;margin:var(--pv-size-base) 0;display:none}.button_option.sc-peculiar-button-menu{width:100%;-ms-flex-pack:start;justify-content:flex-start;border-radius:0}.group.sc-peculiar-button-menu:not(:last-child){border-bottom:1px solid var(--pv-color-gray-5);padding-bottom:var(--pv-size-base-2);margin-bottom:var(--pv-size-base)}.group_title.sc-peculiar-button-menu{line-height:var(--pv-size-base-6);padding:0 var(--pv-size-base-2)}';const n=class{constructor(s){t(this,s);this.groups=[];this.open=false;this.handleClick=()=>{this.open=!this.open}}render(){return s(e,{key:"66dd03eaa8d6e1f6dee3d9782390e094c5804b4a",class:{is_shown:this.open}},s(i,{key:"ba4e5601321b4e778937f6386a8a5220e28f5809",class:"button_popover",startIcon:s(o,null),onClick:this.handleClick}),s("div",{key:"ed4d374f4a4982a24665e1cb60eaa57428ba0e4e",role:"dialog",tabIndex:-1,class:"popover","aria-hidden":String(this.open)},this.groups.map((t=>s("div",{class:"group"},s(a,{variant:"c2",color:"gray-9",class:"group_title"},t.title),t.options.map((t=>s(i,{class:"button_option",startIcon:t.startIcon,href:t.href,onClick:s=>{s.stopPropagation();this.handleClick();if(t.onClick){t.onClick(s)}}},t.text))))))))}};n.style=c;const l=":host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:var(--pv-color-secondary)}.circle_progress_backdrop{stroke:var(--pv-color-gray-3)}";const d=class{constructor(s){t(this,s);this.size=24;this.width=4;this.box=50}render(){return s(e,{key:"0a7d6a83e20839fb324b3f24c7e8b1074775c6a3"},s("div",{key:"88111c52129ca2806ab67f7862ccdbec0e55e68f",class:"circle_progress",style:{width:`${this.size}px`,height:`${this.size}px`}},s("svg",{key:"73b6d9ef7d0b5d09049f8b0c3477e633fa6ee8a3",class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},s("circle",{key:"764d4d27927cd961c84631ac2d9bf2d0ca3e542f",class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}),s("circle",{key:"b24985974a66d754514f5a82b06fa6e7cae77133",class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}))))}};d.style=l;const h=":host{display:inline}::slotted(mark){background-color:var(--pv-color-attention-tint-4)}";const p=class{constructor(s){t(this,s);this.tag="mark"}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let s=t;if(this.search){const e=new RegExp(`(${this.search})`,"gi");s=t.replace(e,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=s}resetHighlightSearch(t){const s=new RegExp(`</?${this.tag}>`,"g");return t.replace(s,"")}render(){return s(e,{key:"95b1cef18522eabfb495710d6756d8eee86dfa73"},s("slot",{key:"360e1c4d7121833dbfccdd6e1021d2030017373b"}))}get host(){return r(this)}};p.style=h;export{n as peculiar_button_menu,d as peculiar_circular_progress,p as peculiar_highlight_words};
5
+ //# sourceMappingURL=p-27ae6a3a.entry.js.map
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{h as t,r as e,c as a,H as r}from"./p-DDDrq3In.js";import{X as o}from"./p-0HZUc9Ix.js";import{Y as s,Z as i,_ as c}from"./p-DazysL_f.js";import{T as n,B as l}from"./p-CkwiD_ia.js";import{D as p,L as v,C as d}from"./p-DkAhB3Vy.js";import{D as h}from"./p-BHBizfwo.js";import{a as b,A as g}from"./p-CeKqQ13Z.js";
4
+ import{h as t,r as e,c as a,H as r}from"./p-CwgZaF40.js";import{X as o}from"./p-BG_D4qzJ.js";import{Z as s,_ as i,$ as c}from"./p-CSS3OhZq.js";import{T as n,B as l}from"./p-CutTi-2B.js";import{D as p,L as v,C as d}from"./p-DanjeXNk.js";import{D as h}from"./p-JyD6URnB.js";import{a as b,A as g}from"./p-ZT6tVIen.js";import"./p-CZuaTO2G.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -9,4 +9,4 @@ import{h as t,r as e,c as a,H as r}from"./p-DDDrq3In.js";import{X as o}from"./p-
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */const u=e=>{const{certificate:a,showIssuer:r}=e;const o=(e,a)=>t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},e)),t("td",null,t(n,{variant:"b2",color:"black"},a)));return t("table",null,t("tbody",null,o(s.getString("subjectName"),a.subjectToString()),r&&o(s.getString("issuerName"),a.issuerToString()),o(s.getString("serialNumber"),a.serialNumber),o(s.getString("version"),a.version),o(s.getString("validity"),a.validity),o(s.getString("issued"),i(a.notBefore)),o(s.getString("expired"),i(a.notAfter))))};const f="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative}.search_section{padding:var(--pv-size-base-4);border-bottom:1px solid var(--pv-color-gray-4)}.input_search{height:var(--pv-size-base-8);width:100%;outline:none;background-color:var(--pv-color-gray-1);padding:0 var(--pv-size-base-2);border:1px solid var(--pv-color-gray-7);border-radius:4px;-webkit-transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s}.input_search::-webkit-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-moz-placeholder{color:var(--pv-color-gray-9)}.input_search:-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::placeholder{color:var(--pv-color-gray-9)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table td,table th{border-bottom:1px solid var(--pv-color-gray-4);vertical-align:top;text-align:left}table td:first-child,table th:first-child{padding-right:0;width:var(--pv-size-base-10)}table td:last-child,table th:last-child{padding-left:0;width:var(--pv-size-base-10)}table th{padding:var(--pv-size-base-2) var(--pv-size-base-4)}table th.col_action{padding:0}table td{padding:var(--pv-size-base-4)}table tr.m_expanded{background:var(--pv-color-gray-1)}table tr.m_expanded>td{border-bottom:none}table tr.expanded_summary{background:var(--pv-color-gray-1)}table tr.expanded_summary table{table-layout:initial}table tr.expanded_summary table td{border-bottom:none;padding:var(--pv-size-base-2)}table tr.expanded_summary table td:first-child{width:200px}table tr.expanded_summary table td:last-child{width:auto}.button_table_cell{margin-top:-3px}.status_wrapper{text-align:center;height:var(--pv-size-base-16);vertical-align:middle}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.modal_backdrop{background:var(--pv-color-black);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0;opacity:0.5}.modal_container{background:var(--pv-color-white);width:100%;display:-ms-flexbox;display:flex;max-height:calc(100% - 60px);-ms-flex-direction:column;flex-direction:column;margin:var(--pv-size-base-6);position:relative;outline:none;-webkit-box-shadow:var(--pv-shadow-dark-hight);box-shadow:var(--pv-shadow-dark-hight);overflow:hidden;border:0px;padding:0px;max-width:640px;border-radius:4px}.modal_header{padding:var(--pv-size-base-3) var(--pv-size-base-4);display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:var(--pv-size-base-2);border-bottom:1px solid var(--pv-color-gray-5)}.modal_content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tbody,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block;width:100% !important;padding:0;border:none}:host([data-mobile-screen-view=true]) thead{display:none}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table .expanded_summary{padding:0}:host([data-mobile-screen-view=true]) table .certificate_row{border-bottom:1px solid var(--pv-color-gray-5);padding:var(--pv-size-base-2) var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table .certificate_row_actions{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table .certificate_row_actions td{display:-ms-flexbox;display:flex;-ms-flex-pack:right;justify-content:right;gap:var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) .button_table_cell{margin-top:0}";const y=class{constructor(t){e(this,t);this.detailsOpen=a(this,"detailsOpen");this.detailsClose=a(this,"detailsClose");this.isHasRoots=false;this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.search="";this.certificatesDecoded=[];this.isDecodeInProcess=true;this.handleClickDetails=t=>{this.certificateSelectedForDetails=t;this.detailsOpen.emit(t)};this.handleModalClose=()=>{this.certificateSelectedForDetails=undefined;this.detailsClose.emit()};this.handleSearch=t=>{const e=t.target;this.search=e.value.trim()}}handleMediaQueryChange(t){this.mobileScreenView=t.matches}componentWillLoad(){this.certificatesDecodeAndSet();{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}}disconnectedCallback(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))}watchCertificates(t,e){if(JSON.stringify(t)!==JSON.stringify(e)){this.certificatesDecodeAndSet()}}async certificatesDecodeAndSet(){let t=false;if(!Array.isArray(this.certificates)){return}const e=[];for(const a of this.certificates){try{const r=new o(a.value);await r.getThumbprint("SHA-1");e.push({body:r,tests:a.tests,name:a.name});if(!t&&r.isRoot){t=true}}catch(t){console.error("Error certificate parse:",t)}}this.isHasRoots=t;this.isDecodeInProcess=false;this.certificatesDecoded=e}getCertificateName(t){if(typeof t.name==="function"){return t.name(t.body)}return t.name||t.body.commonName}handleClickDownloadAsPem(t){t.body.downloadAsPEM(this.getCertificateName(t))}handleClickDownloadAsDer(t){t.body.downloadAsDER(this.getCertificateName(t))}handleClickRow(t){const e=this.expandedRow===t;this.expandedRow=e?undefined:t}getMaxColSpanValue(){let t=5;if(!this.isHasRoots){t+=1}return t}renderCertificateButtonActions(e){var a,r,o;const i=e.tests&&(e.tests.expired||e.tests.revoked||e.tests.valid);return t("peculiar-button-menu",{class:"button_table_cell",groups:[{title:s.getString("previewCertificate"),options:[{text:s.getString("viewDetails"),startIcon:t(p,null),onClick:()=>this.handleClickDetails(e.body)}]},{title:s.getString("downloadOptions"),options:[{text:s.getString("download.pem"),startIcon:t(h,null),onClick:()=>this.handleClickDownloadAsPem(e)},{text:s.getString("download.der"),startIcon:t(h,null),onClick:()=>this.handleClickDownloadAsDer(e)}]},...i?[{title:s.getString("testURLs"),options:[...((a=e.tests)===null||a===void 0?void 0:a.valid)?[{text:s.getString("valid"),href:e.tests.valid,startIcon:t(v,null)}]:[],...((r=e.tests)===null||r===void 0?void 0:r.revoked)?[{text:s.getString("revoked"),href:e.tests.revoked,startIcon:t(v,null)}]:[],...((o=e.tests)===null||o===void 0?void 0:o.expired)?[{text:s.getString("expired"),href:e.tests.expired,startIcon:t(v,null)}]:[]]}]:[]]})}renderExpandedRow(e){const a=this.getMaxColSpanValue()-2;return t("tr",{class:"expanded_summary"},t("td",null),t("td",{colSpan:a},t(u,{certificate:e,showIssuer:!e.isRoot})),t("td",null))}renderCertificatesRows(){const e=this.highlightWithSearch?this.search:"";const a=[];this.certificatesDecoded.forEach(((r,o)=>{const i=o===this.expandedRow;const p=c[r.body.signature.algorithm]||r.body.signature.algorithm;if(this.filterWithSearch&&this.search){const t=[p,r.body.issuerCommonName,this.getCertificateName(r),r.body.thumbprints["SHA-1"]].join(" ").toLowerCase();if(t.indexOf(this.search.toLowerCase())===-1){return}}if(this.mobileScreenView){a.push([t("tr",{class:{certificate_row:true,m_expanded:i},key:r.body.thumbprints["SHA-1"]},t("td",null,t("table",null,t("tbody",null,!this.isHasRoots&&t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},s.getString("issuer"))),t("td",null,t(n,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},r.body.issuerCommonName)))),t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},s.getString("name"))),t("td",null,t(n,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},this.getCertificateName(r))))),t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},s.getString("publicKey"))),t("td",null,t(n,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},p)))),t("tr",null,t("td",null,t(n,{variant:"b2",color:"gray-9"},s.getString("fingerprint"),"  (SHA-1)")),t("td",null,t(n,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},r.body.thumbprints["SHA-1"])))),i&&this.renderExpandedRow(r.body),t("tr",{class:"certificate_row_actions"},t("td",null,this.renderCertificateButtonActions(r),t(l,{startIcon:i?t(b,null):t(g,null),onClick:this.handleClickRow.bind(this,o)})))))))]);return}a.push([t("tr",{class:{m_expanded:i},key:r.body.thumbprints["SHA-1"]},t("td",null,t(l,{startIcon:i?t(b,null):t(g,null),class:"button_table_cell",onClick:this.handleClickRow.bind(this,o)})),!this.isHasRoots&&t("td",null,t(n,null,t("peculiar-highlight-words",{search:e},r.body.issuerCommonName))),t("td",null,t(n,null,t("peculiar-highlight-words",{search:e},this.getCertificateName(r)))),t("td",null,t(n,null,t("peculiar-highlight-words",{search:e},p))),t("td",null,t(n,null,t("peculiar-highlight-words",{search:e},r.body.thumbprints["SHA-1"]))),t("td",null,this.renderCertificateButtonActions(r))),i&&this.renderExpandedRow(r.body)])}));return a}renderCertificateDetailsModal(){if(!this.certificateSelectedForDetails){return null}return t("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},t("div",{class:"modal_backdrop","aria-hidden":"true",onClick:this.handleModalClose}),t("div",{class:"modal_container",role:"dialog",part:"presentation_container"},t("header",{class:"modal_header"},t(n,{variant:"h4"},s.getString("certificateDetails")),t(l,{startIcon:t(d,null),onClick:this.handleModalClose})),t("div",{class:"modal_content"},t("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails,mobileMediaQueryString:this.mobileMediaQueryString}))))}renderSearch(){if(!this.filterWithSearch&&!this.highlightWithSearch){return null}return t("div",{class:"search_section"},t("input",{type:"search",value:"",class:"input_search t-b3 c-black",disabled:!this.certificatesDecoded.length,placeholder:"Search",onInput:this.handleSearch}))}renderEmptyState(){const e=this.getMaxColSpanValue();return t("tr",null,t("td",{class:"status_wrapper",colSpan:e},t(n,{variant:"b1"},"There are no certificates available.")))}renderEmptySearchState(){const e=this.getMaxColSpanValue();return t("tr",null,t("td",{class:"status_wrapper",colSpan:e},t(n,{variant:"b1"},"No results found for “",this.search,"“")))}renderLoadingState(){return t("div",{class:"loading_container"},t("peculiar-circular-progress",null))}renderTableBody(){if(this.isDecodeInProcess){return null}if(!this.certificatesDecoded.length){return this.renderEmptyState()}const t=this.renderCertificatesRows();if(this.search&&!t.length){return this.renderEmptySearchState()}return t}render(){return t(r,{key:"894edb33a53c1128d812c2fd7a5b230a4b13493c","data-mobile-screen-view":String(this.mobileScreenView)},this.renderSearch(),t("table",{key:"998d37ab98be6743f1564fafb4ce9fc70b79e358"},!this.mobileScreenView&&t("thead",{key:"4728e09450b6285cbc2f69cf0a0e06135910558f"},t("tr",{key:"70bf5be60e50b9d7109e27128b661044778e0ded"},t("th",{key:"cf0fef5df1b42d0bce49d3bf0af2d91b82de6d05"}),!this.isHasRoots&&t("th",{key:"59f00d345883dfb3c81a97278583821543ce6808",class:"col_issuer"},t(n,{key:"54ce8fba1ab5355ac1f82ccc3aa62945351a3632",variant:"s2"},s.getString("issuer"))),t("th",{key:"9aea7911edafca1482f31e2ca3316d2cde40fd78",class:"col_name"},t(n,{key:"2a0145b0cc56543ed4b5170a8773c3c43e5e64f9",variant:"s2"},s.getString("name"))),t("th",{key:"9eab414d9b1558d6a5b9938f55165aeca5baa54e",class:"col_public_key"},t(n,{key:"cbdcb1013bbf12ac88e63ca2d268c55854803297",variant:"s2"},s.getString("publicKey"))),t("th",{key:"06adb89146693583a0dad86644b2c8b399e25c0e",class:"col_fingerprint"},t(n,{key:"eca0440721f16953219f014edb8d3742f312f704",variant:"s2"},s.getString("fingerprint"),"  (SHA-1)")),t("th",{key:"56b7fdf83f5c45cf524a8cce81dbca584b9b5fa8"}))),t("tbody",{key:"01ccda1abfa846a8b0cdc00588b106398358ed88"},this.renderTableBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};y.style=f;export{y as peculiar_certificates_viewer};
12
- //# sourceMappingURL=p-5b843427.entry.js.map
12
+ //# sourceMappingURL=p-4cc72a56.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- System.register(["./p-BFenL1ap.system.js","./p-Cm-ylIxb.system.js","./p-B2YrZuK2.system.js"],(function(e){"use strict";var t,i,a,c,s,n;return{setters:[function(e){t=e.r;i=e.h;a=e.H},function(e){c=e.B},function(e){s=e.a;n=e.A}],execute:function(){var r=".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";var d=e("peculiar_text_hider",function(){function e(e){t(this,e);this.opened=false}e.prototype.render=function(){var e=this;return i(a,{key:"e62e0ae5bad2145d9d0f8e47493d89f1c9bdd559","aria-expanded":String(this.opened)},i("div",{key:"ee6a5b678e4ff568d017fde3168a37c818c241da",class:"content"},i("slot",{key:"b9d073a716fec21e5e9c1dadc66da3fef292d00b"})),i(c,{key:"398b81d7ec84ccac8803f46dd4d78104a86b9be7",class:"action",startIcon:this.opened?i(s,{color:"secondary"}):i(n,{color:"secondary"}),onClick:function(){e.opened=!e.opened}}))};return e}());d.style=r}}}));
5
- //# sourceMappingURL=p-a3c0f753.system.entry.js.map
4
+ System.register(["./p-DKl0YViA.system.js","./p-B4PdAFCr.system.js","./p-Bi5mjeeg.system.js"],(function(e){"use strict";var t,i,c,a,s,n;return{setters:[function(e){t=e.r;i=e.h;c=e.H},function(e){a=e.B},function(e){s=e.a;n=e.A}],execute:function(){var r=".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";var d=e("peculiar_text_hider",function(){function e(e){t(this,e);this.opened=false}e.prototype.render=function(){var e=this;return i(c,{key:"e62e0ae5bad2145d9d0f8e47493d89f1c9bdd559","aria-expanded":String(this.opened)},i("div",{key:"ee6a5b678e4ff568d017fde3168a37c818c241da",class:"content"},i("slot",{key:"b9d073a716fec21e5e9c1dadc66da3fef292d00b"})),i(a,{key:"398b81d7ec84ccac8803f46dd4d78104a86b9be7",class:"action",startIcon:this.opened?i(s,{color:"secondary"}):i(n,{color:"secondary"}),onClick:function(){e.opened=!e.opened}}))};return e}());d.style=r}}}));
5
+ //# sourceMappingURL=p-607d08e8.system.entry.js.map
@@ -0,0 +1,19 @@
1
+ var __extends=this&&this.__extends||function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))t[r]=n[r]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}();var __awaiter=this&&this.__awaiter||function(t,n,r,e){function i(t){return t instanceof r?t:new r((function(n){n(t)}))}return new(r||(r=Promise))((function(r,u){function o(t){try{c(e.next(t))}catch(t){u(t)}}function a(t){try{c(e["throw"](t))}catch(t){u(t)}}function c(t){t.done?r(t.value):i(t.value).then(o,a)}c((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},e,i,u,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(n){return c([t,n])}}function c(a){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(r=0)),r)try{if(e=1,i&&(u=a[0]&2?i["return"]:a[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,a[1])).done)return u;if(i=0,u)a=[a[0]&2,u.value];switch(a[0]){case 0:case 1:u=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(u=r.trys,u=u.length>0&&u[u.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!u||a[1]>u[0]&&a[1]<u[3])){r.label=a[1];break}if(a[0]===6&&r.label<u[1]){r.label=u[1];u=a;break}if(u&&r.label<u[2]){r.label=u[2];r.ops.push(a);break}if(u[2])r.ops.pop();r.trys.pop();continue}a=n.call(t,r)}catch(t){a=[6,t];i=0}finally{e=u=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};
2
+ /*!
3
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
+ */System.register(["./p-D_WeukQa.system.js"],(function(t){"use strict";var n,r,e,i,u,o,a,c,s,f,h,l,v,b,_,m,w,y,d,p,g,j,x,O,S,k,E,C,A,P,D,K,N,T,q,G,H,Q,R,W,z;return{setters:[function(t){n=t.A;r=t.p;e=t.q;i=t.r;u=t.s;o=t.U;a=t.t;c=t.V;s=t.I;f=t.W;h=t.u;l=t.T;v=t.v;b=t.w;_=t.x;m=t.y;w=t.b;y=t.z;d=t.B;p=t.F;g=t.G;j=t.H;x=t.J;O=t.K;S=t.L;k=t.M;E=t.O;C=t.Q;A=t.S;P=t.X;D=t.c;K=t.Y;N=t.P;T=t.N;q=t.i;G=t.e;H=t.E;Q=t.f;R=t.R;W=t.m;z=t.D}],execute:function(){var B;
5
+ /**
6
+ * @license
7
+ * Copyright (c) Peculiar Ventures, LLC.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */var F=(B={},B[P]=m,B[A]=_,B[C]=b,B[E]=v,B[k]=l,B[S]=h,B[O]=f,B[x]=s,B[j]=c,B[g]=a,B[p]=o,B[d]=u,B[y]=i,B);var I=function(t){__extends(n,t);function n(n){var i=t.call(this,n,r)||this;var u=i.getAsnExtnValue();try{var o=F[i.asn.type];if(o){i.value=e.parse(u,o)}else{console.warn("Didn't detect parser for \"".concat(i.asn.type,'" attribute.'));i.value=w.Convert.ToHex(u)}}catch(t){console.error('Error parse "'.concat(i.asn.type,'" attribute:'),t.message);i.value=w.Convert.ToHex(u)}return i}n.prototype.getAsnExtnValue=function(){return this.asn.values[0]};return n}(n);t("A",I);
12
+ /**
13
+ * @license
14
+ * Copyright (c) Peculiar Ventures, LLC.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var J=function(t){__extends(n,t);function n(n){var r=t.call(this,D(n),K)||this;r.thumbprints={};r.type="PKCS#10 Certificate Request";r.tag=N.CertificateRequestTag;var e=r.asn.certificationRequestInfo;r.subject=new T(e.subject).toJSON();r.version=e.version;return r}Object.defineProperty(n.prototype,"publicKey",{get:function(){var t=this.asn.certificationRequestInfo.subjectPKInfo,n=t.subjectPublicKey,r=t.algorithm;var e;if(r.algorithm===q&&r.parameters){e=G.parse(r.parameters,H)}if(r.algorithm===Q){e=G.parse(n,R)}var i=G.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:e,value:i,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"signature",{get:function(){var t=this.asn,n=t.signature,r=t.signatureAlgorithm;return{value:n,algorithm:r.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var t=0;t<this.subject.length;t+=1){var n=this.subject[t];if(n.shortName==="CN"||n.shortName==="E"||n.shortName==="O"){return n.value}}return""},enumerable:false,configurable:true});n.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var n,r;if(t===void 0){t="SHA-1"}return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);return[4,W(t,this.raw)];case 1:n=e.sent();if(n){this.thumbprints[t]=w.Convert.ToHex(n)}return[3,3];case 2:r=e.sent();console.error("Error thumbprint get:",r);return[3,3];case 3:return[2]}}))}))};n.prototype.parseAttributes=function(){var t=this.asn.certificationRequestInfo;if(t.attributes){this.attributes=t.attributes.map((function(t){return new I(G.serialize(t))}))}};n.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return N.encode(this.raw,this.tag);case"base64url":return w.Convert.ToBase64Url(this.raw);default:return w.Convert.ToBase64(this.raw)}};n.prototype.downloadAsPEM=function(t){z.csr.asPEM(this.toString("pem"),t||this.commonName)};n.prototype.downloadAsDER=function(t){z.csr.asDER(this.raw,t||this.commonName)};return n}(n);t("P",J)}}}));
19
+ //# sourceMappingURL=p-7fTYvx_V.system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-7fTYvx_V.system.js","sources":["src/crypto/attribute.ts","src/crypto/pkcs10_certificate_request.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\nimport {\n id_at_statementOfPossession,\n PrivateKeyPossessionStatement,\n} from '@peculiar/asn1-private-key-stmt';\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n [id_at_statementOfPossession]: PrivateKeyPossessionStatement,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\n\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class Pkcs10CertificateRequest extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'PKCS#10 Certificate Request';\n\n public readonly tag = PemConverter.CertificateRequestTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["AsnAttribute","Convert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAA;;;;;;YAMG;YAiDH,MAAM,iBAAiB,GAAG;gBACxB,CAAC,wBAAwB,GAAG,qBAAqB;gBACjD,CAAC,gCAAgC,GAAG,6BAA6B;gBACjE,CAAC,kBAAkB,GAAG,eAAe;gBACrC,CAAC,8BAA8B,GAAG,2BAA2B;gBAC7D,CAAC,mBAAmB,GAAG,gBAAgB;gBACvC,CAAC,sBAAsB,GAAG,mBAAmB;gBAC7C,CAAC,UAAU,GAAG,OAAO;gBACrB,CAAC,iBAAiB,GAAG,cAAc;gBACnC,CAAC,mBAAmB,GAAG,gBAAgB;gBACvC,CAAC,6BAA6B,GAAG,iBAAiB;gBAClD,CAAC,4BAA4B,GAAG,gBAAgB;gBAChD,CAAC,4BAA4B,GAAG,gB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;4BACE,OAAOA,oBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;;YAIhC,IAAA,aAAa,CAAC,IAAa,EAAA;YAChC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpB,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;YAGI,IAAA,aAAa,CAAC,IAAa,EAAA;YAChC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAChB,IAAI,CAAC,GAAG,EACR,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB;;YAEJ;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{r as e,h as a,H as t}from"./p-DDDrq3In.js";import{B as i}from"./p-CkwiD_ia.js";import{a as s,A as c}from"./p-CeKqQ13Z.js";const r=".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";const d=class{constructor(a){e(this,a);this.opened=false}render(){return a(t,{key:"e62e0ae5bad2145d9d0f8e47493d89f1c9bdd559","aria-expanded":String(this.opened)},a("div",{key:"ee6a5b678e4ff568d017fde3168a37c818c241da",class:"content"},a("slot",{key:"b9d073a716fec21e5e9c1dadc66da3fef292d00b"})),a(i,{key:"398b81d7ec84ccac8803f46dd4d78104a86b9be7",class:"action",startIcon:this.opened?a(s,{color:"secondary"}):a(c,{color:"secondary"}),onClick:()=>{this.opened=!this.opened}}))}};d.style=r;export{d as peculiar_text_hider};
5
- //# sourceMappingURL=p-15c2b820.entry.js.map
4
+ import{r as e,h as a,H as t}from"./p-CwgZaF40.js";import{B as s}from"./p-CutTi-2B.js";import{a as i,A as c}from"./p-ZT6tVIen.js";const r=".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";const d=class{constructor(a){e(this,a);this.opened=false}render(){return a(t,{key:"e62e0ae5bad2145d9d0f8e47493d89f1c9bdd559","aria-expanded":String(this.opened)},a("div",{key:"ee6a5b678e4ff568d017fde3168a37c818c241da",class:"content"},a("slot",{key:"b9d073a716fec21e5e9c1dadc66da3fef292d00b"})),a(s,{key:"398b81d7ec84ccac8803f46dd4d78104a86b9be7",class:"action",startIcon:this.opened?a(i,{color:"secondary"}):a(c,{color:"secondary"}),onClick:()=>{this.opened=!this.opened}}))}};d.style=r;export{d as peculiar_text_hider};
5
+ //# sourceMappingURL=p-9d9f24bd.entry.js.map
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- System.register(["./p-BFenL1ap.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.h}],execute:function(){
4
+ System.register(["./p-DKl0YViA.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.h}],execute:function(){
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -9,12 +9,12 @@ System.register(["./p-BFenL1ap.system.js"],(function(n){"use strict";var t;retur
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var r=undefined&&undefined.__rest||function(n,t){var r={};for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t.indexOf(e)<0)r[e]=n[e];if(n!=null&&typeof Object.getOwnPropertySymbols==="function")for(var a=0,e=Object.getOwnPropertySymbols(n);a<e.length;a++){if(t.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(n,e[a]))r[e[a]]=n[e[a]]}return r};var e={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",s1:"h6",s2:"h6",b1:"p",b2:"p",b3:"p",btn1:"span",btn2:"span",c1:"p",c2:"p"};var a=n("T",(function(n,a){var o;var c=n.component,u=n.variant,i=u===void 0?"b2":u,p=n.color,s=p===void 0?"black":p,v=n.class,b=r(n,["component","variant","color","class"]);var f=c||e[i]||"p";return t(f,Object.assign({},b,{class:(o={typography:true},o["t-".concat(i)]=true,o["c-".concat(s)]=true,o[v]=Boolean(v),o)}),a)}));
12
+ var r=undefined&&undefined.__rest||function(n,t){var r={};for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t.indexOf(e)<0)r[e]=n[e];if(n!=null&&typeof Object.getOwnPropertySymbols==="function")for(var a=0,e=Object.getOwnPropertySymbols(n);a<e.length;a++){if(t.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(n,e[a]))r[e[a]]=n[e[a]]}return r};var e={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",s1:"h6",s2:"h6",b1:"p",b2:"p",b3:"p",btn1:"span",btn2:"span",c1:"p",c2:"p"};var a=n("T",(function(n,a){var o;var c=n.component,u=n.variant,i=u===void 0?"b2":u,s=n.color,p=s===void 0?"black":s,v=n.class,b=r(n,["component","variant","color","class"]);var f=c||e[i]||"p";return t(f,Object.assign({},b,{class:(o={typography:true},o["t-".concat(i)]=true,o["c-".concat(p)]=true,o[v]=Boolean(v),o)}),t("span",null),a)}));
13
13
  /**
14
14
  * @license
15
15
  * Copyright (c) Peculiar Ventures, LLC.
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var o=n("B",(function(n,r){var e;var o=n.href,c=n.class,u=n.startIcon,i=n.onClick;var p=!!o;var s=p?"a":"button";return t(s,{type:!p&&"button",href:p&&o,target:p&&"_blank",rel:p&&"noreferrer noopener",class:(e={button:true,m_no_padding:r.length===0},e[c]=Boolean(c),e),onClick:i},u,r.length>0&&t(a,{variant:"b3",color:"black",component:"span"},r))}))}}}));
20
- //# sourceMappingURL=p-Cm-ylIxb.system.js.map
19
+ */var o=n("B",(function(n,r){var e;var o=n.href,c=n.class,u=n.startIcon,i=n.onClick;var s=!!o;var p=s?"a":"button";return t(p,{type:!s&&"button",href:s&&o,target:s&&"_blank",rel:s&&"noreferrer noopener",class:(e={button:true,m_no_padding:r.length===0},e[c]=Boolean(c),e),onClick:i},u,r.length>0&&t(a,{variant:"b3",color:"black",component:"span"},r))}))}}}));
20
+ //# sourceMappingURL=p-B4PdAFCr.system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-B4PdAFCr.system.js","sources":["src/components/typography/typography.tsx","src/components/button/button.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport type { TTypography, TColor } from '../../interface';\n\ninterface ITypographyProps {\n component?: keyof JSXBase.IntrinsicElements;\n variant?: TTypography;\n color?: TColor;\n class?: string;\n}\n\nconst variantMapping: Record<TTypography, 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n s1: 'h6',\n s2: 'h6',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n btn1: 'span',\n btn2: 'span',\n c1: 'p',\n c2: 'p',\n};\n\nexport const Typography: FunctionalComponent<ITypographyProps> = (props, children) => {\n const {\n component: componentProp,\n variant = 'b2',\n color = 'black',\n class: classProp,\n ...other\n } = props;\n\n const Component = componentProp || variantMapping[variant] || 'p';\n\n return (\n <Component\n {...other}\n class={{\n typography: true,\n [`t-${variant}`]: true,\n [`c-${color}`]: true,\n [classProp]: Boolean(classProp),\n }}\n >\n <span></span>\n {children}\n </Component>\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 FunctionalComponent, h, VNode,\n} from '@stencil/core';\nimport { Typography } from '../typography';\n\nexport interface IButtonProps {\n href?: string;\n class?: string;\n startIcon?: VNode;\n onClick?: (event: MouseEvent) => void;\n}\n\nexport const Button: FunctionalComponent<IButtonProps> = (props, children) => {\n const {\n href,\n class: classProp,\n startIcon,\n onClick,\n } = props;\n\n const isLink = !!href;\n const TagType = isLink ? 'a' : 'button';\n\n return (\n <TagType\n type={!isLink && 'button'}\n href={isLink && href}\n target={isLink && '_blank'}\n rel={isLink && 'noreferrer noopener'}\n class={{\n button: true,\n // eslint-disable-next-line react/destructuring-assignment\n m_no_padding: children.length === 0,\n [classProp]: Boolean(classProp),\n }}\n onClick={onClick}\n >\n {startIcon}\n {/* eslint-disable-next-line react/destructuring-assignment */}\n {children.length > 0 && (\n <Typography\n variant=\"b3\"\n color=\"black\"\n component=\"span\"\n >\n {children}\n </Typography>\n )}\n </TagType>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;YAAA;;;;;;YAMG;;;;;;;;;;;;YAaH,MAAM,cAAc,GAAgF;YAClG,IAAA,EAAE,EAAE,IAAI;YACR,IAAA,EAAE,EAAE,IAAI;YACR,IAAA,EAAE,EAAE,IAAI;YACR,IAAA,EAAE,EAAE,IAAI;YACR,IAAA,EAAE,EAAE,IAAI;YACR,IAAA,EAAE,EAAE,IAAI;YACR,IAAA,EAAE,EAAE,IAAI;YACR,IAAA,EAAE,EAAE,GAAG;YACP,IAAA,EAAE,EAAE,GAAG;YACP,IAAA,EAAE,EAAE,GAAG;YACP,IAAA,IAAI,EAAE,MAAM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AE,MAAM,IAAI,QAAQ,EAC1B,GAAG,EAAE,MAAM,IAAI,qBAAqB,EACpC,KAAK,EAAE;YACL,YAAA,MAAM,EAAE,IAAI;;YAEZ,YAAA,YAAY,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC;YACnC,YAAA,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;qBAChC,EACD,OAAO,EAAE,OAAO,EAAA;oBAEf,SAAS;oBAET,QAAQ,CAAC,MAAM,GAAG,CAAC,KAClB,CAAA,CAAC,UAAU,EAAA,EACT,OAAO,EAAC,IAAI,EACZ,KAAK,EAAC,OAAO,EACb,SAAS,EAAC,MAAM,EAEf,EAAA,QAAQ,CACE,CACd,CACO;YAEd;;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,i,t,r){function n(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,c){function a(e){try{u(r.next(e))}catch(e){c(e)}}function s(e){try{u(r["throw"](e))}catch(e){c(e)}}function u(e){e.done?t(e.value):n(e.value).then(a,s)}u((r=r.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},r,n,c,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 u([e,i])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(r=1,n&&(c=s[0]&2?n["return"]:s[0]?n["throw"]||((c=n["return"])&&c.call(n),0):n.next)&&!(c=c.call(n,s[1])).done)return c;if(n=0,c)s=[s[0]&2,c.value];switch(s[0]){case 0:case 1:c=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;n=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(c=t.trys,c=c.length>0&&c[c.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!c||s[1]>c[0]&&s[1]<c[3])){t.label=s[1];break}if(s[0]===6&&t.label<c[1]){t.label=c[1];c=s;break}if(c&&t.label<c[2]){t.label=c[2];t.ops.push(s);break}if(c[2])t.ops.pop();t.trys.pop();continue}s=i.call(e,t)}catch(e){s=[6,e];n=0}finally{r=c=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
+ /*!
3
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
+ */System.register(["./p-DKl0YViA.system.js"],(function(e,i){"use strict";var t,r,n;return{setters:[function(i){t=i.p;r=i.g;n=i.b;e("setNonce",i.s)}],execute:function(){var e=this;var c=function(){var e=i.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return t(r)};c().then((function(i){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,r()];case 1:e.sent();return[2,n([["p-607d08e8.system",[[262,"peculiar-text-hider",{opened:[32]}]]],["p-17ebc78c.system",[[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"]}]]],["p-e7c60082.system",[[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"]}]]],["p-ce006f1c.system",[[257,"peculiar-certificate-decoder",{certificateExamples:[16,"certificate-examples"],certificateToDecode:[1,"certificate-to-decode"],certificateDecoded:[32]}]]],["p-de857304.system",[[258,"peculiar-button-menu",{groups:[16],open:[32]}],[257,"peculiar-circular-progress",{size:[2],width:[2]}],[257,"peculiar-highlight-words",{search:[1]}]]],["p-a193f8fd.system",[[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"]}]]]],i)]}}))}))}))}}}));
5
+ //# sourceMappingURL=p-BGASC3UX.system.js.map