@peculiar/certificates-viewer 3.10.1 → 4.0.1
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.
- package/README.md +40 -64
- package/components/arrow_top.js +34 -0
- package/components/arrow_top.js.map +1 -0
- package/components/attribute-certificate-viewer.js +281 -0
- package/components/attribute-certificate-viewer.js.map +1 -0
- package/components/button-menu.js +64 -0
- package/components/button-menu.js.map +1 -0
- package/components/button.js +74 -0
- package/components/button.js.map +1 -0
- package/components/certificate-viewer.js +300 -0
- package/components/certificate-viewer.js.map +1 -0
- package/components/circular-progress.js +48 -0
- package/components/circular-progress.js.map +1 -0
- package/components/crl-viewer.js +263 -0
- package/components/crl-viewer.js.map +1 -0
- package/components/csr-viewer.js +233 -0
- package/components/csr-viewer.js.map +1 -0
- package/components/custom-elements.d.ts +2 -0
- package/{dist/esm/download-91511aeb.js → components/download.js} +2 -0
- package/components/download.js.map +1 -0
- package/components/highlight-words.js +60 -0
- package/components/highlight-words.js.map +1 -0
- package/components/index.d.ts +33 -0
- package/components/index.js +7 -0
- package/components/index.js.map +1 -0
- package/components/index2.js +299 -0
- package/components/index2.js.map +1 -0
- package/components/issuer_name.js +26 -0
- package/components/issuer_name.js.map +1 -0
- package/components/miscellaneous.js +13420 -0
- package/components/miscellaneous.js.map +1 -0
- package/components/package.json +9 -0
- package/components/peculiar-attribute-certificate-viewer.d.ts +11 -0
- package/components/peculiar-attribute-certificate-viewer.js +11 -0
- package/components/peculiar-attribute-certificate-viewer.js.map +1 -0
- package/components/peculiar-button-menu.d.ts +11 -0
- package/components/peculiar-button-menu.js +11 -0
- package/components/peculiar-button-menu.js.map +1 -0
- package/components/peculiar-certificate-decoder.d.ts +11 -0
- package/components/peculiar-certificate-decoder.js +234 -0
- package/components/peculiar-certificate-decoder.js.map +1 -0
- package/components/peculiar-certificate-viewer.d.ts +11 -0
- package/components/peculiar-certificate-viewer.js +11 -0
- package/components/peculiar-certificate-viewer.js.map +1 -0
- package/components/peculiar-certificates-viewer.d.ts +11 -0
- package/components/peculiar-certificates-viewer.js +382 -0
- package/components/peculiar-certificates-viewer.js.map +1 -0
- package/components/peculiar-circular-progress.d.ts +11 -0
- package/components/peculiar-circular-progress.js +11 -0
- package/components/peculiar-circular-progress.js.map +1 -0
- package/components/peculiar-crl-viewer.d.ts +11 -0
- package/components/peculiar-crl-viewer.js +11 -0
- package/components/peculiar-crl-viewer.js.map +1 -0
- package/components/peculiar-csr-viewer.d.ts +11 -0
- package/components/peculiar-csr-viewer.js +11 -0
- package/components/peculiar-csr-viewer.js.map +1 -0
- package/components/peculiar-highlight-words.d.ts +11 -0
- package/components/peculiar-highlight-words.js +11 -0
- package/components/peculiar-highlight-words.js.map +1 -0
- package/components/peculiar-text-hider.d.ts +11 -0
- package/components/peculiar-text-hider.js +42 -0
- package/components/peculiar-text-hider.js.map +1 -0
- package/components/subject_name.js +71 -0
- package/components/subject_name.js.map +1 -0
- package/dist/cjs/arrow_top-834fb7ec.js +37 -0
- package/dist/cjs/arrow_top-834fb7ec.js.map +1 -0
- package/dist/cjs/button-14e2b73f.js +77 -0
- package/dist/cjs/button-14e2b73f.js.map +1 -0
- package/dist/cjs/{certification_request-d5c6e32d.js → certification_request-c0cafa72.js} +236 -71
- package/dist/cjs/certification_request-c0cafa72.js.map +1 -0
- package/dist/cjs/{crl-5bce64c4.js → crl-b4322166.js} +8 -7
- package/dist/cjs/crl-b4322166.js.map +1 -0
- package/dist/cjs/download-254ddc57.js +23 -0
- package/dist/cjs/download-254ddc57.js.map +1 -0
- package/dist/cjs/{download-93f7b773.js → download-972dda8a.js} +2 -0
- package/dist/cjs/download-972dda8a.js.map +1 -0
- package/dist/cjs/index-efd561e9.js +2477 -0
- package/dist/cjs/index-efd561e9.js.map +1 -0
- package/dist/cjs/index.cjs.js +3 -1
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/{miscellaneous-cac1cd8b.js → miscellaneous-806a04a5.js} +86 -70
- package/dist/cjs/miscellaneous-806a04a5.js.map +1 -0
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +92 -35
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +110 -0
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +30 -19
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +34 -11
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +183 -85
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-text-hider.cjs.entry.js +7 -13
- package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar.cjs.js +10 -57
- package/dist/cjs/peculiar.cjs.js.map +1 -0
- package/dist/cjs/{x509_certificate-3760e0a8.js → x509_certificate-989b1435.js} +5 -4
- package/dist/cjs/x509_certificate-989b1435.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -16
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +189 -145
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -0
- package/dist/collection/components/button/button.js +14 -126
- package/dist/collection/components/button/button.js.map +1 -0
- package/dist/collection/components/button/index.js +5 -0
- package/dist/collection/components/button/index.js.map +1 -0
- package/dist/collection/components/button-menu/button-menu.css +46 -0
- package/dist/collection/components/button-menu/button-menu.js +78 -0
- package/dist/collection/components/button-menu/button-menu.js.map +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.css +456 -44
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +109 -101
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +6 -11
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +5 -6
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/index.js +16 -15
- package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js +4 -3
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +5 -4
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +6 -13
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/basic_information.js +4 -3
- package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +2 -1
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +10 -15
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +8 -12
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +26 -27
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +5 -7
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +8 -13
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +6 -6
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +7 -7
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +7 -6
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/index.js +46 -45
- package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +8 -9
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +7 -11
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +8 -11
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +5 -4
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +13 -16
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +8 -9
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +10 -15
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +7 -9
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/holder.js +8 -11
- package/dist/collection/components/certificate-details-parts/holder.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/index.js +1 -0
- package/dist/collection/components/certificate-details-parts/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/issuer.js +5 -4
- package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -4
- package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/miscellaneous.js +8 -13
- package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/public_key.js +8 -7
- package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js +9 -11
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/row.js +13 -18
- package/dist/collection/components/certificate-details-parts/row.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/signature.js +5 -4
- package/dist/collection/components/certificate-details-parts/signature.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/subject_name.js +4 -3
- package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/thumbprints.js +4 -3
- package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -0
- package/dist/collection/components/certificate-summary/certificate-summary.js +9 -77
- package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -0
- package/dist/collection/components/certificate-summary/index.js +5 -0
- package/dist/collection/components/certificate-summary/index.js.map +1 -0
- package/dist/collection/components/certificate-viewer/certificate-viewer.css +471 -104
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +206 -178
- package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -0
- package/dist/collection/components/certificates-viewer/certificates-viewer.css +540 -267
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +261 -266
- package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -0
- package/dist/collection/components/circular-progress/circular-progress.css +2 -11
- package/dist/collection/components/circular-progress/circular-progress.js +60 -63
- package/dist/collection/components/circular-progress/circular-progress.js.map +1 -0
- package/dist/collection/components/crl-viewer/crl-viewer.js +166 -139
- package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -0
- package/dist/collection/components/csr-viewer/csr-viewer.js +149 -124
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -0
- package/dist/collection/components/highlight-words/highlight-words.css +1 -9
- package/dist/collection/components/highlight-words/highlight-words.js +35 -28
- package/dist/collection/components/highlight-words/highlight-words.js.map +1 -0
- package/dist/collection/components/icons/actions.js +16 -0
- package/dist/collection/components/icons/actions.js.map +1 -0
- package/dist/collection/components/icons/arrow_bottom.js +16 -0
- package/dist/collection/components/icons/arrow_bottom.js.map +1 -0
- package/dist/collection/components/icons/arrow_top.js +16 -0
- package/dist/collection/components/icons/arrow_top.js.map +1 -0
- package/dist/collection/components/icons/cross.js +16 -0
- package/dist/collection/components/icons/cross.js.map +1 -0
- package/dist/collection/components/icons/details.js +16 -0
- package/dist/collection/components/icons/details.js.map +1 -0
- package/dist/collection/components/icons/download.js +16 -0
- package/dist/collection/components/icons/download.js.map +1 -0
- package/dist/collection/components/icons/index.js +11 -0
- package/dist/collection/components/icons/index.js.map +1 -0
- package/dist/collection/components/icons/link.js +16 -0
- package/dist/collection/components/icons/link.js.map +1 -0
- package/dist/collection/components/link/index.js +5 -0
- package/dist/collection/components/link/index.js.map +1 -0
- package/dist/collection/components/link/link.js +9 -61
- package/dist/collection/components/link/link.js.map +1 -0
- package/dist/collection/components/text-hider/text-hider.css +9 -36
- package/dist/collection/components/text-hider/text-hider.js +21 -68
- package/dist/collection/components/text-hider/text-hider.js.map +1 -0
- package/dist/collection/components/typography/index.js +5 -0
- package/dist/collection/components/typography/index.js.map +1 -0
- package/dist/collection/components/typography/typography.js +39 -126
- package/dist/collection/components/typography/typography.js.map +1 -0
- package/dist/collection/constants/logs.js +1 -0
- package/dist/collection/constants/logs.js.map +1 -0
- package/dist/collection/constants/oids.js +1 -0
- package/dist/collection/constants/oids.js.map +1 -0
- package/dist/collection/crypto/asn_data.js +13 -7
- package/dist/collection/crypto/asn_data.js.map +1 -0
- package/dist/collection/crypto/attribute.js +11 -10
- package/dist/collection/crypto/attribute.js.map +1 -0
- package/dist/collection/crypto/crl.js +9 -8
- package/dist/collection/crypto/crl.js.map +1 -0
- package/dist/collection/crypto/csr.js +11 -10
- package/dist/collection/crypto/csr.js.map +1 -0
- package/dist/collection/crypto/extension.js +16 -15
- package/dist/collection/crypto/extension.js.map +1 -0
- package/dist/collection/crypto/index.js +1 -0
- package/dist/collection/crypto/index.js.map +1 -0
- package/dist/collection/crypto/name.js +15 -9
- package/dist/collection/crypto/name.js.map +1 -0
- package/dist/collection/crypto/provider.js +4 -3
- package/dist/collection/crypto/provider.js.map +1 -0
- package/dist/collection/crypto/utils.js +4 -3
- package/dist/collection/crypto/utils.js.map +1 -0
- package/dist/collection/crypto/x509_attribute_certificate.js +9 -8
- package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -0
- package/dist/collection/crypto/x509_certificate.js +12 -11
- package/dist/collection/crypto/x509_certificate.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/locales/en.json +4 -3
- package/dist/collection/utils/date_formatter.js +3 -2
- package/dist/collection/utils/date_formatter.js.map +1 -0
- package/dist/collection/utils/download.js +3 -2
- package/dist/collection/utils/download.js.map +1 -0
- package/dist/collection/utils/download_from_buffer.js +1 -0
- package/dist/collection/utils/download_from_buffer.js.map +1 -0
- package/dist/collection/utils/get_string_by_oid.js +2 -1
- package/dist/collection/utils/get_string_by_oid.js.map +1 -0
- package/dist/collection/utils/index.js +2 -1
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/is_link.js +1 -0
- package/dist/collection/utils/is_link.js.map +1 -0
- package/dist/collection/utils/l10n.js +2 -1
- package/dist/collection/utils/l10n.js.map +1 -0
- package/dist/collection/utils/read_file.js +1 -0
- package/dist/collection/utils/read_file.js.map +1 -0
- package/dist/collection/utils/third_party_links.js +1 -0
- package/dist/collection/utils/third_party_links.js.map +1 -0
- package/dist/collection/utils/validator.js +1 -0
- package/dist/collection/utils/validator.js.map +1 -0
- package/dist/collection/www-copy/index.js +138 -32
- package/dist/esm/arrow_top-efd3a56d.js +34 -0
- package/dist/esm/arrow_top-efd3a56d.js.map +1 -0
- package/dist/esm/button-35146bdd.js +74 -0
- package/dist/esm/button-35146bdd.js.map +1 -0
- package/dist/esm/{certification_request-23cd5124.js → certification_request-5cadde9f.js} +171 -9
- package/dist/esm/certification_request-5cadde9f.js.map +1 -0
- package/dist/esm/{crl-7f23c111.js → crl-11670c3e.js} +7 -6
- package/dist/esm/crl-11670c3e.js.map +1 -0
- package/dist/esm/download-0cc3077a.js +21 -0
- package/dist/esm/download-0cc3077a.js.map +1 -0
- package/dist/esm/download-57c5bf8f.js +470 -0
- package/dist/esm/download-57c5bf8f.js.map +1 -0
- package/dist/esm/index-4079bbb5.js +2448 -0
- package/dist/esm/index-4079bbb5.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +6 -12
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/{miscellaneous-c7c0d04a.js → miscellaneous-1d4e8b41.js} +53 -37
- package/dist/esm/miscellaneous-1d4e8b41.js.map +1 -0
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +80 -23
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
- package/dist/esm/peculiar-button-menu_3.entry.js +104 -0
- package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -0
- package/dist/esm/peculiar-certificate-decoder.entry.js +30 -19
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -0
- package/dist/esm/peculiar-certificate-viewer.entry.js +34 -11
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -0
- package/dist/esm/peculiar-certificates-viewer.entry.js +183 -85
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -0
- package/dist/esm/peculiar-text-hider.entry.js +7 -13
- package/dist/esm/peculiar-text-hider.entry.js.map +1 -0
- package/dist/esm/peculiar.js +8 -58
- package/dist/esm/peculiar.js.map +1 -0
- package/dist/esm/{x509_certificate-d8e0af2d.js → x509_certificate-dfae6999.js} +4 -3
- package/dist/esm/x509_certificate-dfae6999.js.map +1 -0
- package/dist/esm-es5/arrow_top-efd3a56d.js +19 -0
- package/dist/esm-es5/arrow_top-efd3a56d.js.map +1 -0
- package/dist/esm-es5/button-35146bdd.js +19 -0
- package/dist/esm-es5/button-35146bdd.js.map +1 -0
- package/dist/esm-es5/certification_request-5cadde9f.js +97 -0
- package/dist/esm-es5/certification_request-5cadde9f.js.map +1 -0
- package/dist/esm-es5/crl-11670c3e.js +33 -0
- package/dist/esm-es5/crl-11670c3e.js.map +1 -0
- package/dist/esm-es5/download-0cc3077a.js +12 -0
- package/dist/esm-es5/download-0cc3077a.js.map +1 -0
- package/dist/esm-es5/download-57c5bf8f.js +19 -0
- package/dist/esm-es5/download-57c5bf8f.js.map +1 -0
- package/dist/esm-es5/index-4079bbb5.js +6 -0
- package/dist/esm-es5/index-4079bbb5.js.map +1 -0
- package/dist/esm-es5/index.js +5 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/loader.js +5 -0
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/miscellaneous-1d4e8b41.js +355 -0
- package/dist/esm-es5/miscellaneous-1d4e8b41.js.map +1 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +110 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-button-menu_3.entry.js +12 -0
- package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +12 -0
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +5 -0
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +33 -0
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-text-hider.entry.js +5 -0
- package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -0
- package/dist/esm-es5/peculiar.js +5 -0
- package/dist/esm-es5/peculiar.js.map +1 -0
- package/dist/esm-es5/x509_certificate-dfae6999.js +12 -0
- package/dist/esm-es5/x509_certificate-dfae6999.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/peculiar/index.esm.js +2 -1
- package/dist/peculiar/index.esm.js.map +1 -0
- package/dist/peculiar/locales/en.json +4 -3
- package/dist/peculiar/p-0b356bb5.js +6 -0
- package/dist/peculiar/p-0b356bb5.js.map +1 -0
- package/dist/peculiar/p-0bdcdbf7.system.js +355 -0
- package/dist/peculiar/p-0bdcdbf7.system.js.map +1 -0
- package/dist/peculiar/p-17e3c47b.js +12 -0
- package/dist/peculiar/p-17e3c47b.js.map +1 -0
- package/dist/peculiar/p-23555789.system.entry.js +34 -0
- package/dist/peculiar/p-23555789.system.entry.js.map +1 -0
- package/dist/peculiar/p-26981468.system.entry.js +5 -0
- package/dist/peculiar/p-26981468.system.entry.js.map +1 -0
- package/dist/peculiar/p-2fcad8cb.system.js +20 -0
- package/dist/peculiar/p-2fcad8cb.system.js.map +1 -0
- package/dist/peculiar/p-31586b23.system.js +13 -0
- package/dist/peculiar/p-31586b23.system.js.map +1 -0
- package/dist/peculiar/p-43eb3721.js +33 -0
- package/dist/peculiar/p-43eb3721.js.map +1 -0
- package/dist/peculiar/p-5823e6e8.entry.js +12 -0
- package/dist/peculiar/p-5823e6e8.entry.js.map +1 -0
- package/dist/peculiar/p-596836a7.entry.js +33 -0
- package/dist/peculiar/p-596836a7.entry.js.map +1 -0
- package/dist/peculiar/p-5aabeba7.system.js +6 -0
- package/dist/peculiar/p-5aabeba7.system.js.map +1 -0
- package/dist/peculiar/p-6667fe6e.system.js +34 -0
- package/dist/peculiar/p-6667fe6e.system.js.map +1 -0
- package/dist/peculiar/p-6e79b9c8.js +12 -0
- package/dist/peculiar/p-6e79b9c8.js.map +1 -0
- package/dist/peculiar/p-709994c1.js +19 -0
- package/dist/peculiar/p-709994c1.js.map +1 -0
- package/dist/peculiar/p-74c241e7.js +97 -0
- package/dist/peculiar/p-74c241e7.js.map +1 -0
- package/dist/peculiar/p-7ed7cd97.system.entry.js +111 -0
- package/dist/peculiar/p-7ed7cd97.system.entry.js.map +1 -0
- package/dist/peculiar/p-7f9beaa8.js +19 -0
- package/dist/peculiar/p-7f9beaa8.js.map +1 -0
- package/dist/peculiar/p-80832207.system.js +5 -0
- package/dist/peculiar/p-80832207.system.js.map +1 -0
- package/dist/peculiar/p-8748391f.system.entry.js +5 -0
- package/dist/peculiar/p-8748391f.system.entry.js.map +1 -0
- package/dist/peculiar/p-882e1281.entry.js +12 -0
- package/dist/peculiar/p-882e1281.entry.js.map +1 -0
- package/dist/peculiar/p-90459cec.entry.js +5 -0
- package/dist/peculiar/p-90459cec.entry.js.map +1 -0
- package/dist/peculiar/p-97688065.js +355 -0
- package/dist/peculiar/p-97688065.js.map +1 -0
- package/dist/peculiar/p-a053c132.js +19 -0
- package/dist/peculiar/p-a053c132.js.map +1 -0
- package/dist/peculiar/p-ae9189f6.system.js +19 -0
- package/dist/peculiar/p-ae9189f6.system.js.map +1 -0
- package/dist/peculiar/p-bd485115.system.entry.js +13 -0
- package/dist/peculiar/p-bd485115.system.entry.js.map +1 -0
- package/dist/peculiar/p-c0a298fd.system.js +97 -0
- package/dist/peculiar/p-c0a298fd.system.js.map +1 -0
- package/dist/peculiar/p-daf23673.system.js +20 -0
- package/dist/peculiar/p-daf23673.system.js.map +1 -0
- package/dist/peculiar/p-e1960173.system.js +5 -0
- package/dist/peculiar/p-e1960173.system.js.map +1 -0
- package/dist/peculiar/p-e39de121.system.entry.js +13 -0
- package/dist/peculiar/p-e39de121.system.entry.js.map +1 -0
- package/dist/peculiar/p-e6a3b4d4.system.js +13 -0
- package/dist/peculiar/p-e6a3b4d4.system.js.map +1 -0
- package/dist/peculiar/p-f3d85a5f.entry.js +110 -0
- package/dist/peculiar/p-f3d85a5f.entry.js.map +1 -0
- package/dist/peculiar/p-fd4b9a50.entry.js +5 -0
- package/dist/peculiar/p-fd4b9a50.entry.js.map +1 -0
- package/dist/peculiar/peculiar.css +1 -1
- package/dist/peculiar/peculiar.esm.js +2 -1
- package/dist/peculiar/peculiar.esm.js.map +1 -0
- package/dist/peculiar/peculiar.js +127 -0
- package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +15 -3
- package/dist/types/components/button/button.d.ts +5 -16
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/button-menu/button-menu.d.ts +21 -0
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +9 -6
- package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
- package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -3
- package/dist/types/components/certificate-summary/index.d.ts +1 -0
- package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +13 -5
- package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +22 -11
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +13 -5
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +13 -5
- package/dist/types/components/icons/actions.d.ts +12 -0
- package/dist/types/components/icons/arrow_bottom.d.ts +12 -0
- package/dist/types/components/icons/arrow_top.d.ts +12 -0
- package/dist/types/components/icons/cross.d.ts +12 -0
- package/dist/types/components/icons/details.d.ts +12 -0
- package/dist/types/components/icons/download.d.ts +12 -0
- package/dist/types/components/icons/index.d.ts +7 -0
- package/dist/types/components/icons/link.d.ts +12 -0
- package/dist/types/components/link/index.d.ts +1 -0
- package/dist/types/components/link/link.d.ts +6 -6
- package/dist/types/components/text-hider/text-hider.d.ts +0 -3
- package/dist/types/components/typography/index.d.ts +1 -0
- package/dist/types/components/typography/typography.d.ts +10 -20
- package/dist/types/components.d.ts +74 -175
- package/dist/types/crypto/attribute.d.ts +1 -1
- package/dist/types/crypto/extension.d.ts +1 -1
- package/dist/types/interface.d.ts +98 -6
- package/dist/types/stencil-public-runtime.d.ts +110 -23
- package/dist/types/utils/l10n.d.ts +5 -4
- package/dist/types/utils/read_file.d.ts +1 -1
- package/hydrate/index.d.ts +218 -0
- package/hydrate/index.js +22549 -0
- package/hydrate/package.json +6 -0
- package/loader/index.d.ts +10 -1
- package/loader/index.js +1 -1
- package/loader/package.json +1 -0
- package/package.json +6 -4
- package/dist/cjs/dom-f57e260e.js +0 -78
- package/dist/cjs/index-064e95c7.js +0 -1486
- package/dist/cjs/l10n-ddc7cff9.js +0 -169
- package/dist/cjs/peculiar-button-split_4.cjs.entry.js +0 -128
- package/dist/cjs/peculiar-button.cjs.entry.js +0 -40
- package/dist/cjs/peculiar-link.cjs.entry.js +0 -29
- package/dist/cjs/peculiar-typography.cjs.entry.js +0 -38
- package/dist/collection/components/button/button.css +0 -81
- package/dist/collection/components/button-split/button-split.css +0 -57
- package/dist/collection/components/button-split/button-split.js +0 -116
- package/dist/collection/components/certificate-summary/certificate-summary.css +0 -49
- package/dist/collection/components/link/link.css +0 -59
- package/dist/collection/components/typography/typography.css +0 -95
- package/dist/esm/dom-f1b08a97.js +0 -76
- package/dist/esm/index-bbd484d9.js +0 -1455
- package/dist/esm/l10n-d48f35ff.js +0 -165
- package/dist/esm/peculiar-button-split_4.entry.js +0 -121
- package/dist/esm/peculiar-button.entry.js +0 -36
- package/dist/esm/peculiar-link.entry.js +0 -25
- package/dist/esm/peculiar-typography.entry.js +0 -34
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/peculiar/p-01cea5c0.entry.js +0 -11
- package/dist/peculiar/p-3bfefa4a.entry.js +0 -18
- package/dist/peculiar/p-4e8169cb.entry.js +0 -4
- package/dist/peculiar/p-57b89412.entry.js +0 -4
- package/dist/peculiar/p-5b4eed12.entry.js +0 -4
- package/dist/peculiar/p-610b85e3.entry.js +0 -4
- package/dist/peculiar/p-6d37c8b5.entry.js +0 -4
- package/dist/peculiar/p-711b4e1e.js +0 -18
- package/dist/peculiar/p-81a88a33.js +0 -11
- package/dist/peculiar/p-918aeee4.entry.js +0 -4
- package/dist/peculiar/p-9f4ee110.js +0 -22
- package/dist/peculiar/p-a050e184.js +0 -69
- package/dist/peculiar/p-c24c26c2.js +0 -32
- package/dist/peculiar/p-df53fbcc.entry.js +0 -4
- package/dist/peculiar/p-ec250cc4.js +0 -12
- package/dist/peculiar/p-f7683ba5.js +0 -5
- package/dist/peculiar/p-fe05f51e.js +0 -79
- package/dist/types/components/button-split/button-split.d.ts +0 -21
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,a){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function n(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a["throw"](e))}catch(e){o(e)}}function c(e){e.done?r(e.value):i(e.value).then(n,s)}c((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,i,o,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return c([e,t])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(a=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{a=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
|
|
2
|
+
/*!
|
|
3
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
+
*/System.register(["./p-5aabeba7.system.js","./p-31586b23.system.js","./p-c0a298fd.system.js","./p-ae9189f6.system.js","./p-0bdcdbf7.system.js","./p-2fcad8cb.system.js","./p-e6a3b4d4.system.js"],(function(e){"use strict";var t,r,a,i,o,n,s,c,v,p,l,h,d,b,g,u;return{setters:[function(e){t=e.r;r=e.h;a=e.H},function(e){i=e.X},function(){},function(){},function(e){o=e.B;n=e.f;s=e.I;c=e.P;v=e.S;p=e.b;l=e.E;h=e.c;d=e.d;b=e.e;g=e.M},function(e){u=e.T},function(){}],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 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=e("peculiar_certificate_viewer",function(){function e(e){var r=this;t(this,e);this.getAuthKeyIdParentLink=function(e){var t;return(t=r.authKeyIdParentLink)===null||t===void 0?void 0:t.replace("{{authKeyId}}",e)};this.getAuthKeyIdSiblingsLink=function(e){var t;return(t=r.authKeyIdSiblingsLink)===null||t===void 0?void 0:t.replace("{{authKeyId}}",e)};this.getSubjectKeyIdChildrenLink=function(e){var t;return(t=r.subjectKeyIdChildrenLink)===null||t===void 0?void 0:t.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var t;return(t=r.subjectKeyIdSiblingsLink)===null||t===void 0?void 0:t.replace("{{subjectKeyId}}",e)};this.certificate=undefined;this.download=undefined;this.authKeyIdParentLink=undefined;this.authKeyIdSiblingsLink=undefined;this.subjectKeyIdChildrenLink=undefined;this.subjectKeyIdSiblingsLink=undefined;this.issuerDnLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}e.prototype.handleMediaQueryChange=function(e){this.mobileScreenView=e.matches};e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};e.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(e instanceof i){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new i(e)}else{return[2]}this.certificateDecoded.parseExtensions();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:t=r.sent();this.certificateDecodeError=t;console.error("Error certificate parse:",t);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};e.prototype.watchCertificateAndDecode=function(e,t){if(typeof e==="string"&&typeof t==="string"){if(e!==t){this.decodeCertificate(e)}return}if(e instanceof i&&t instanceof i){if(e.serialNumber!==t.serialNumber){this.decodeCertificate(e)}}};e.prototype.getIssuerDnLink=function(){return this.issuerDnLink};e.prototype.renderErrorState=function(){return r("div",{class:"status_wrapper"},r(u,null,"There was an error decoding this certificate."))};e.prototype.renderEmptyState=function(){return r("div",{class:"status_wrapper"},r(u,null,"There is no certificate available."))};e.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(o,Object.assign({},this.certificateDecoded)),r(n,{name:this.certificateDecoded.subject}),r(s,{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:h,getDNSNameLink:d,getIPAddressLink:b,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&r(g,{certificate:this.certificateDecoded})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}());y.style=f}}}));
|
|
5
|
+
//# sourceMappingURL=p-26981468.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["certificateViewerCss","CertificateViewer","exports","this","getAuthKeyIdParentLink","value","_a","_this","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","class_1","prototype","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","certificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509Certificate","certificateDecoded","parseExtensions","getThumbprint","_b","sent","certificateDecodeError","error_1","console","error","watchCertificateAndDecode","newValue","oldValue","serialNumber","getIssuerDnLink","issuerDnLink","renderErrorState","h","class","Typography","renderEmptyState","render","Host","String","BasicInformation","Object","assign","SubjectName","name","subject","IssuerName","issuer","PublicKey","publicKey","Signature","signature","Thumbprints","thumbprints","Extensions","extensions","getLEILink","getDNSNameLink","getIPAddressLink","download","Miscellaneous"],"sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\n\nimport {\n X509Certificate,\n} from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: CertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView: boolean = false;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: CertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: CertificateProp, oldValue: CertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;ieAAA,IAAMA,EAAuB,mhS,ICyChBC,EAAiBC,EAAA,yC,mCAsIpBC,KAAAC,uBAAyB,SAACC,G,MAAkB,OAAAC,EAAAC,EAAKC,uBAAmB,MAAAF,SAAA,SAAAA,EACxEG,QAAQ,gBAAiBJ,E,EAErBF,KAAAO,yBAA2B,SAACL,G,MAAkB,OAAAC,EAAAC,EAAKI,yBAAqB,MAAAL,SAAA,SAAAA,EAC5EG,QAAQ,gBAAiBJ,E,EAErBF,KAAAS,4BAA8B,SAACP,G,MAAkB,OAAAC,EAAAC,EAAKM,4BAAwB,MAAAP,SAAA,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ar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
System.register(["./p-5aabeba7.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.h}],execute:function(){
|
|
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
|
+
*/
|
|
12
|
+
var r=undefined&&undefined.__rest||function(t,n){var r={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0)r[e]=t[e];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var o=0,e=Object.getOwnPropertySymbols(t);o<e.length;o++){if(n.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o]))r[e[o]]=t[e[o]]}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 o=t("T",(function(t,o){var a;var c=t.component,s=t.variant,l=s===void 0?"b2":s,p=t.color,i=p===void 0?"black":p,u=t.class,b=r(t,["component","variant","color","class"]);var f=c||e[l]||"p";return n(f,Object.assign({},b,{class:(a={typography:true},a["t-".concat(l)]=true,a["c-".concat(i)]=true,a[u]=Boolean(u),a)}),o)}));
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/var a=t("B",(function(t,r){var e;var a=t.href,c=t.class,s=t.startIcon,l=t.onClick;var p=!!a;var i=p?"a":"button";return n(i,{type:!p&&"button",href:p&&a,target:p&&"_blank",rel:p&&"noreferrer noopener",onClick:l,class:(e={button:true,m_no_padding:r.length===0},e[c]=Boolean(c),e)},s,r.length>0&&n(o,{variant:"b3",color:"black",component:"span"},r))}))}}}));
|
|
20
|
+
//# sourceMappingURL=p-2fcad8cb.system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["variantMapping","h1","h2","h3","h4","h5","s1","s2","b1","b2","b3","btn1","btn2","c1","c2","Typography","exports","props","children","componentProp","component","_b","variant","_c","color","classProp","class","other","__rest","Component","h","Object","assign","_a","typography","concat","Boolean","Button","href","startIcon","onClick","isLink","TagType","type","target","rel","button","m_no_padding","length"],"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 { TypographyType, ColorType } from '../../interface';\n\ninterface TypographyProps {\n component?: keyof JSX.IntrinsicElements;\n variant?: TypographyType;\n color?: ColorType;\n class?: string;\n}\n\nconst variantMapping: Record<TypographyType, '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<TypographyProps> = (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 {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 { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { Typography } from '../typography';\n\nexport interface ButtonProps {\n href?: string;\n class?: string;\n startIcon?: VNode;\n onClick?: (event: MouseEvent) => void;\n}\n\nexport const Button: FunctionalComponent<ButtonProps> = (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 onClick={onClick}\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 >\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"],"mappings":";;;;;;;;;;;8WAkBA,IAAMA,EAAiG,CACrGC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,IACJC,GAAI,IACJC,GAAI,IACJC,KAAM,OACNC,KAAM,OACNC,GAAI,IACJC,GAAI,K,IAGOC,EAAUC,EAAA,KAAyC,SAACC,EAAOC,G,MAEpE,IAAWC,EAKTF,EAAKG,UAJPC,EAIEJ,EAAKK,QAJPA,EAAOD,SAAA,EAAG,KAAIA,EACdE,EAGEN,EAAKO,MAHPA,EAAKD,SAAA,EAAG,QAAOA,EACRE,EAELR,EAAKS,MADJC,EAAKC,EACNX,EANE,yCAQN,IAAMY,EAAYV,GAAiBnB,EAAesB,IAAY,IAE9D,OACEQ,EAACD,EAASE,OAAAC,OAAA,GACJL,EAAK,CACTD,OAAKO,EAAA,CACHC,WAAY,MACZD,EAAC,KAAAE,OAAKb,IAAY,KAClBW,EAAC,KAAAE,OAAKX,IAAU,KAChBS,EAACR,GAAYW,QAAQX,G,KAGtBP,EAGP;;;;;;;aCzCamB,EAAMrB,EAAA,KAAqC,SAACC,EAAOC,G,MAE5D,IAAAoB,EAIErB,EAAKqB,KAHAb,EAGLR,EAAKS,MAFPa,EAEEtB,EAAKsB,UADPC,EACEvB,EAAKuB,QAET,IAAMC,IAAWH,EACjB,IAAMI,EAAUD,EAAS,IAAM,SAE/B,OACEX,EAACY,EAAO,CACNC,MAAOF,GAAU,SACjBH,KAAMG,GAAUH,EAChBM,OAAQH,GAAU,SAClBI,IAAKJ,GAAU,sBACfD,QAASA,EACTd,OAAKO,EAAA,CACHa,OAAQ,KAERC,aAAc7B,EAAS8B,SAAW,GAClCf,EAACR,GAAYW,QAAQX,G,IAGtBc,EAEArB,EAAS8B,OAAS,GACjBlB,EAACf,EAAU,CACTO,QAAQ,KACRE,MAAM,QACNJ,UAAU,QAETF,GAKX,G"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n["throw"](t))}catch(t){i(t)}}function u(t){t.done?r(t.value):o(t.value).then(a,s)}u((n=n.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:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];o=0}finally{n=i=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-c0a298fd.system.js","./p-ae9189f6.system.js"],(function(t){"use strict";var e,r,n,o,i,a,s,u,c,f,l,p,h,m,b,y,v,g,d,w,j;return{setters:[function(t){e=t.A;r=t.e;n=t.C;o=t.N;i=t.f;a=t.E;s=t.g;u=t.h;c=t.j;f=t.k;l=t.R;p=t.l;h=t.m;m=t.n;b=t.o;y=t.p;v=t.q;g=t.r;d=t.s},function(t){w=t.b;j=t.D}],execute:function(){
|
|
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
|
+
*/
|
|
12
|
+
var _=function(t){__extends(e,t);function e(e){var a=t.call(this,r(e),n)||this;a.thumbprints={};a.type="X.509 Certificate";var s=a.asn.tbsCertificate;a.serialNumber=w.Convert.ToHex(s.serialNumber);a.subject=new o(s.subject).toJSON();a.issuer=new o(s.issuer).toJSON();a.version=s.version+1;var u=s.validity.notBefore.utcTime||s.validity.notBefore.generalTime;if(!u){throw new Error("Cannot get 'notBefore' value")}a.notBefore=u;var c=s.validity.notAfter.utcTime||s.validity.notAfter.generalTime;if(!c){throw new Error("Cannot get 'notAfter' value")}a.notAfter=c;a.validity=i(a.notBefore,a.notAfter);return a}e.prototype.parseExtensions=function(){var t=this.asn.tbsCertificate;if(t.extensions){this.extensions=t.extensions.map((function(t){return new a(s.serialize(t))}))}};e.prototype.getPublicKeyInfo=function(t){var e=this;var r=t.subjectPublicKey,n=t.algorithm;var o;if(n.algorithm===u&&n.parameters){o=s.parse(n.parameters,c)}if(n.algorithm===f){o=s.parse(r,l)}if(n.algorithm===p){o=s.parse(r,h);o=o.map((function(t){return e.getPublicKeyInfo(t)}))}var i=s.serialize(t);return{params:o,value:i,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===m){var o=s.parse(e,b);var i=s.parse(r.parameters,y);n=i.map((function(t,e){return Object.assign(Object.assign({},t),{value:o[e]})}))}return{params:n,value:e,algorithm:r.algorithm}},enumerable:false,configurable:true});e.prototype.exportAsBase64=function(){return w.Convert.ToBase64(this.raw)};e.prototype.exportAsHexFormatted=function(){return v(w.Convert.ToHex(this.raw))};e.prototype.exportAsPemFormatted=function(){return"-----BEGIN CERTIFICATE-----\n".concat(g(this.exportAsBase64()),"\n-----END CERTIFICATE-----")};e.prototype.getThumbprint=function(t){if(t===void 0){t="SHA-1"}return __awaiter(this,void 0,void 0,(function(){var e,r;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,d(t,this.raw)];case 1:e=n.sent();if(e){this.thumbprints[t]=w.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"){return e.value}if(e.shortName==="E"){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.downloadAsPEM=function(t){j.cert.asPEM(this.exportAsPemFormatted(),t||this.commonName)};e.prototype.downloadAsDER=function(t){j.cert.asDER(this.exportAsHexFormatted(),t||this.commonName)};return e}(e);t("X",_)}}}));
|
|
13
|
+
//# sourceMappingURL=p-31586b23.system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__extends","X509Certificate","_super","raw","_this","call","this","certificateRawToBuffer","Certificate","thumbprints","type","tbsCertificate","asn","serialNumber","Convert","ToHex","subject","Name","toJSON","issuer","version","notBefore","validity","utcTime","generalTime","Error","notAfter","dateDiff","prototype","parseExtensions","extensions","map","e","Extension","AsnConvert","serialize","getPublicKeyInfo","publicKeyInfo","subjectPublicKey","algorithm","params","id_ecPublicKey","parameters","parse","ECParameters","id_rsaEncryption","RSAPublicKey","id_composite_key","CompositePublicKey","param","spki","value","Object","defineProperty","subjectPublicKeyInfo","_a","signatureValue","signatureAlgorithm","id_alg_composite","compositeSignatureValues_1","CompositeSignatureValue","compositeParams","CompositeParams","index","assign","exportAsBase64","ToBase64","exportAsHexFormatted","hexFormat","exportAsPemFormatted","concat","base64Format","getThumbprint","getCertificateThumbprint","thumbprint","sent","console","error","error_1","i","length","name","shortName","JSON","stringify","subjectToString","join","issuerToString","downloadAsPEM","Download","cert","asPEM","commonName","downloadAsDER","asDER","AsnData"],"sources":["src/crypto/x509_certificate.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport {\n id_composite_key,\n id_alg_composite,\n CompositePublicKey,\n CompositeSignatureValue,\n CompositeParams,\n} from '@peculiar/asn1-x509-post-quantum';\nimport { Certificate, SubjectPublicKeyInfo } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { dateDiff, Download } from '../utils';\n\nimport { Name, INameJSON } from './name';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\nexport interface ISignature {\n algorithm: string;\n value: BufferSource;\n params?: {\n algorithm: string;\n value: BufferSource;\n }[];\n}\n\nexport interface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey | IPublicKey[];\n}\n\nexport class X509Certificate extends AsnData<Certificate> {\n public readonly serialNumber: string;\n\n public readonly subject: INameJSON[];\n\n public readonly issuer: INameJSON[];\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public readonly version: number;\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'X.509 Certificate';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), Certificate);\n\n const { tbsCertificate } = this.asn;\n\n this.serialNumber = Convert.ToHex(tbsCertificate.serialNumber);\n this.subject = new Name(tbsCertificate.subject).toJSON();\n this.issuer = new Name(tbsCertificate.issuer).toJSON();\n this.version = tbsCertificate.version + 1;\n\n const notBefore = tbsCertificate.validity.notBefore.utcTime\n || tbsCertificate.validity.notBefore.generalTime;\n\n if (!notBefore) {\n throw new Error(\"Cannot get 'notBefore' value\");\n }\n\n this.notBefore = notBefore;\n\n const notAfter = tbsCertificate.validity.notAfter.utcTime\n || tbsCertificate.validity.notAfter.generalTime;\n\n if (!notAfter) {\n throw new Error(\"Cannot get 'notAfter' value\");\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n }\n\n public parseExtensions() {\n const { tbsCertificate } = this.asn;\n\n if (tbsCertificate.extensions) {\n this.extensions = tbsCertificate.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n private getPublicKeyInfo(publicKeyInfo: SubjectPublicKeyInfo) {\n const { subjectPublicKey, algorithm } = publicKeyInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n if (algorithm.algorithm === id_composite_key) {\n params = AsnConvert.parse(subjectPublicKey, CompositePublicKey);\n\n params = params.map((param) => this.getPublicKeyInfo(param));\n }\n\n const spki = AsnConvert.serialize(publicKeyInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get publicKey(): IPublicKey {\n return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo);\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n let params;\n\n if (signatureAlgorithm.algorithm === id_alg_composite) {\n const compositeSignatureValues = AsnConvert.parse(signatureValue, CompositeSignatureValue);\n const compositeParams = AsnConvert.parse(signatureAlgorithm.parameters, CompositeParams);\n\n params = compositeParams.map((param, index) => ({\n ...param,\n value: compositeSignatureValues[index],\n }));\n }\n\n return {\n params,\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN CERTIFICATE-----\\n${base64Format(this.exportAsBase64())}\\n-----END CERTIFICATE-----`;\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get issuerCommonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN') {\n return name.value;\n }\n\n if (name.shortName === 'E') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get isRoot(): boolean {\n return JSON.stringify(this.issuer) === JSON.stringify(this.subject);\n }\n\n public subjectToString() {\n if (!this.subject) {\n return '';\n }\n\n return this.subject\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public issuerToString() {\n if (!this.issuer) {\n return '';\n }\n\n return this.issuer\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public downloadAsPEM(name?: string) {\n Download.cert.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.cert.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;kBAgDqCA,UAAAC,EAAAC,GAqBnC,SAAAD,EAAYE,GAAZ,IAAAC,EACEF,EAAAG,KAAAC,KAAMC,EAAuBJ,GAAMK,IAAYF,KAL1CF,EAAAK,YAAsC,GAEtCL,EAAAM,KAAe,oBAKZ,IAAAC,EAAmBP,EAAKQ,IAAGD,eAEnCP,EAAKS,aAAeC,UAAQC,MAAMJ,EAAeE,cACjDT,EAAKY,QAAU,IAAIC,EAAKN,EAAeK,SAASE,SAChDd,EAAKe,OAAS,IAAIF,EAAKN,EAAeQ,QAAQD,SAC9Cd,EAAKgB,QAAUT,EAAeS,QAAU,EAExC,IAAMC,EAAYV,EAAeW,SAASD,UAAUE,SAC/CZ,EAAeW,SAASD,UAAUG,YAEvC,IAAKH,EAAW,CACd,MAAM,IAAII,MAAM,+B,CAGlBrB,EAAKiB,UAAYA,EAEjB,IAAMK,EAAWf,EAAeW,SAASI,SAASH,SAC7CZ,EAAeW,SAASI,SAASF,YAEtC,IAAKE,EAAU,CACb,MAAM,IAAID,MAAM,8B,CAGlBrB,EAAKsB,SAAWA,EAChBtB,EAAKkB,SAAWK,EAASvB,EAAKiB,UAAWjB,EAAKsB,U,SAGzCzB,EAAA2B,UAAAC,gBAAA,WACG,IAAAlB,EAAmBL,KAAKM,IAAGD,eAEnC,GAAIA,EAAemB,WAAY,CAC7BxB,KAAKwB,WAAanB,EAAemB,WAC9BC,KAAI,SAACC,GAAM,WAAIC,EAAUC,EAAWC,UAAUH,GAAnC,G,GAIV/B,EAAA2B,UAAAQ,iBAAA,SAAiBC,GAAjB,IAAAjC,EAAAE,KACE,IAAAgC,EAAgCD,EAAaC,iBAA3BC,EAAcF,EAA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AGW,EAAKC,UAAS,KAAAZ,OAAIW,EAAK9B,MADlB,IAGTmC,KAAK,K,EAGHrF,EAAA2B,UAAA2D,eAAA,WACL,IAAKjF,KAAKa,OAAQ,CAChB,MAAO,E,CAGT,OAAOb,KAAKa,OACTY,KAAI,SAACkD,GAAI,MACR,GAAAX,OAAGW,EAAKC,UAAS,KAAAZ,OAAIW,EAAK9B,MADlB,IAGTmC,KAAK,K,EAGHrF,EAAA2B,UAAA4D,cAAA,SAAcP,GACnBQ,EAASC,KAAKC,MACZrF,KAAK+D,uBACLY,GAAQ3E,KAAKsF,W,EAIV3F,EAAA2B,UAAAiE,cAAA,SAAcZ,GACnBQ,EAASC,KAAKI,MACZxF,KAAK6D,uBACLc,GAAQ3E,KAAKsF,W,YApNkBG,G"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{A as t,t as s,u as e,v as i,w as r,E as a,g as n,x as o,U as h,y as c,z as u,B as l,V as E,D as m,I as f,F as g,W as A,G as p,H as b,J as d,T as w,K as x,L as C,M as T,O as R,P as I,Q as v,S as k,X as N,e as F,Y as y,f as B,s as D,q as P,r as H,Z as S,N as L,h as X,j as U,k as j,R as q,_ as G}from"./p-74c241e7.js";import{b as K,D as M}from"./p-a053c132.js";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/class $ extends t{getAsnExtnValue(){return this.asn.values[0]}constructor(t){super(t,s);const F=this.getAsnExtnValue();switch(this.asn.type){case k:this.value=i.parse(F,N);break;case I:this.value=i.parse(F,v);break;case T:this.value=i.parse(F,R);break;case x:this.value=i.parse(F,C);break;case d:this.value=i.parse(F,w);break;case p:this.value=i.parse(F,b);break;case g:this.value=i.parse(F,A);break;case m:this.value=i.parse(F,f);break;case l:this.value=i.parse(F,E);break;case c:this.value=i.parse(F,u);break;case o:this.value=i.parse(F,h);break;case e:{const t=i.parse(F,r);this.value=t.map((t=>new a(n.serialize(t))));break}default:this.value=K.Convert.ToHex(F)}}}
|
|
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
|
+
*/class O extends t{constructor(t){var s;super(F(t),y);this.thumbprints={};this.type="X.509 Attribute Certificate";const{acinfo:e}=this.asn;this.serialNumber=K.Convert.ToHex(e.serialNumber);this.version=e.version;const i=e.attrCertValidityPeriod.notBeforeTime;if(!i){throw new Error("Cannot get 'notBefore' value")}this.notBefore=i;const r=e.attrCertValidityPeriod.notAfterTime;if(!r){throw new Error("Cannot get 'notAfter' value")}this.notAfter=r;this.validity=B(this.notBefore,this.notAfter);this.issuer=e.issuer.v1Form||((s=e.issuer.v2Form)===null||s===void 0?void 0:s.issuerName);this.holder=e.holder}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}parseExtensions(){const{acinfo:t}=this.asn;if(t.extensions){this.extensions=t.extensions.map((t=>new a(n.serialize(t))))}}parseAttributes(){const{acinfo:t}=this.asn;if(t.attributes){this.attributes=t.attributes.map((t=>new $(n.serialize(t))))}}async getThumbprint(t="SHA-1"){try{const s=await D(t,this.raw);if(s){this.thumbprints[t]=K.Convert.ToHex(s)}}catch(t){console.error("Error thumbprint get:",t)}}exportAsBase64(){return K.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(K.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${H(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}downloadAsPEM(t){M.attrCert.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){M.attrCert.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/class Q extends t{constructor(t){super(F(t),S);this.thumbprints={};this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:s}=this.asn;this.subject=new L(s.subject).toJSON();this.version=s.version}get publicKey(){const{subjectPublicKey:t,algorithm:s}=this.asn.certificationRequestInfo.subjectPKInfo;let e;if(s.algorithm===X&&s.parameters){e=n.parse(s.parameters,U)}if(s.algorithm===j){e=n.parse(t,q)}const i=n.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:e,value:i,algorithm:s.algorithm}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.subject){return""}for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if(s.shortName==="CN"||s.shortName==="E"||s.shortName==="O"){return s.value}}return""}async getThumbprint(t="SHA-1"){try{const s=await D(t,this.raw);if(s){this.thumbprints[t]=K.Convert.ToHex(s)}}catch(t){console.error("Error thumbprint get:",t)}}parseAttributes(){const{certificationRequestInfo:t}=this.asn;if(t.attributes){this.attributes=t.attributes.map((t=>new $(n.serialize(t))))}}exportAsBase64(){return K.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(K.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${H(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}downloadAsPEM(t){M.csr.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){M.csr.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
|
|
26
|
+
/**
|
|
27
|
+
* @license
|
|
28
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/class V extends t{constructor(t){super(F(t),G);this.thumbprints={};this.type="X.509 Certificate Revocation List";const{tbsCertList:s}=this.asn;this.issuer=new L(s.issuer).toJSON();this.version=s.version+1;this.lastUpdate=s.thisUpdate.getTime();this.nextUpdate=s.nextUpdate.getTime();this.revokedCertificates=(s.revokedCertificates||[]).map((t=>{var s;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:(s=t.crlEntryExtensions)===null||s===void 0?void 0:s.map((t=>new a(n.serialize(t))))}}))}async getThumbprint(t="SHA-1"){try{const s=await D(t,this.raw);if(s){this.thumbprints[t]=K.Convert.ToHex(s)}}catch(t){console.error("Error thumbprint get:",t)}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.issuer){return""}for(let t=0;t<this.issuer.length;t+=1){const s=this.issuer[t];if(s.shortName==="CN"||s.shortName==="E"||s.shortName==="O"){return s.value}}return""}parseExtensions(){const{tbsCertList:t}=this.asn;if(t.crlExtensions){this.extensions=t.crlExtensions.map((t=>new a(n.serialize(t))))}}exportAsBase64(){return K.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(K.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN X509 CRL-----\n${H(this.exportAsBase64())}\n-----END X509 CRL-----`}downloadAsPEM(t){M.crl.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){M.crl.asDER(this.exportAsHexFormatted(),t||this.commonName)}}export{Q as C,O as X,V as a};
|
|
33
|
+
//# sourceMappingURL=p-43eb3721.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Attribute","AsnData","getAsnExtnValue","this","asn","values","constructor","raw","super","AsnAttribute","asnExtnValue","type","id_DomainNameBeneficiary","value","AsnParser","parse","DomainNameBeneficiary","id_DomainNameLegalRepresentative","DomainNameLegalRepresentative","id_DomainNameOwner","DomainNameOwner","id_DomainNameTechnicalOperator","DomainNameTechnicalOperator","id_TypeRelationship","TypeRelationship","id_ActivityDescription","ActivityDescription","id_WebGDPR","WebGDPR","id_InsuranceValue","InsuranceValue","id_ValuationRanking","ValuationRanking","id_pkcs9_at_challengePassword","ChallengePassword","id_pkcs9_at_unstructuredName","UnstructuredName","id_pkcs9_at_extensionRequest","extensionRequest","ExtensionRequest","map","e","Extension","AsnConvert","serialize","Convert","ToHex","X509AttributeCertificate","certificateRawToBuffer","AttributeCertificate","thumbprints","acinfo","serialNumber","version","notBefore","attrCertValidityPeriod","notBeforeTime","Error","notAfter","notAfterTime","validity","dateDiff","issuer","v1Form","_a","v2Form","issuerName","holder","signature","signatureValue","signatureAlgorithm","algorithm","parseExtensions","extensions","parseAttributes","attributes","getThumbprint","thumbprint","getCertificateThumbprint","error","console","exportAsBase64","ToBase64","exportAsHexFormatted","hexFormat","exportAsPemFormatted","base64Format","commonName","downloadAsPEM","name","Download","attrCert","asPEM","downloadAsDER","asDER","CSR","CertificationRequest","certificationRequestInfo","subject","Name","toJSON","publicKey","subjectPublicKey","subjectPKInfo","params","id_ecPublicKey","parameters","ECParameters","id_rsaEncryption","RSAPublicKey","spki","i","length","shortName","csr","CRL","CertificateList","tbsCertList","lastUpdate","thisUpdate","getTime","nextUpdate","revokedCertificates","revokedCertificate","revocationDate","userCertificate","crlEntryExtensions","crlExtensions","crl"],"sources":["src/crypto/attribute.ts","src/crypto/x509_attribute_certificate.ts","src/crypto/csr.ts","src/crypto/crl.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser, AsnConvert } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\n\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\n\nexport type TAttributeValue = DomainNameBeneficiary\n| DomainNameLegalRepresentative\n| DomainNameOwner\n| DomainNameTechnicalOperator\n| TypeRelationship\n| ActivityDescription\n| WebGDPR\n| InsuranceValue\n| ValuationRanking\n| Extension<TExtensionValue>[]\n| ChallengePassword\n| UnstructuredName\n| string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n switch (this.asn.type) {\n case id_DomainNameBeneficiary:\n this.value = AsnParser.parse(asnExtnValue, DomainNameBeneficiary) as T;\n break;\n case id_DomainNameLegalRepresentative:\n this.value = AsnParser.parse(asnExtnValue, DomainNameLegalRepresentative) as T;\n break;\n case id_DomainNameOwner:\n this.value = AsnParser.parse(asnExtnValue, DomainNameOwner) as T;\n break;\n case id_DomainNameTechnicalOperator:\n this.value = AsnParser.parse(asnExtnValue, DomainNameTechnicalOperator) as T;\n break;\n case id_TypeRelationship:\n this.value = AsnParser.parse(asnExtnValue, TypeRelationship) as T;\n break;\n case id_ActivityDescription:\n this.value = AsnParser.parse(asnExtnValue, ActivityDescription) as T;\n break;\n case id_WebGDPR:\n this.value = AsnParser.parse(asnExtnValue, WebGDPR) as T;\n break;\n case id_InsuranceValue:\n this.value = AsnParser.parse(asnExtnValue, InsuranceValue) as T;\n break;\n case id_ValuationRanking:\n this.value = AsnParser.parse(asnExtnValue, ValuationRanking) as T;\n break;\n case id_pkcs9_at_challengePassword:\n this.value = AsnParser.parse(asnExtnValue, ChallengePassword) as T;\n break;\n case id_pkcs9_at_unstructuredName:\n this.value = AsnParser.parse(asnExtnValue, UnstructuredName) as T;\n break;\n case id_pkcs9_at_extensionRequest: {\n const extensionRequest = AsnParser.parse(asnExtnValue, ExtensionRequest);\n\n this.value = extensionRequest\n .map((e) => new Extension(AsnConvert.serialize(e))) as T;\n break;\n }\n default:\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport type { GeneralName } from '@peculiar/asn1-x509';\nimport { AttributeCertificate, Holder } from '@peculiar/asn1-x509-attr';\nimport { Convert } from 'pvtsutils';\n\nimport { dateDiff, Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Extension, TExtensionValue } from './extension';\nimport { Attribute, TAttributeValue } from './attribute';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport class X509AttributeCertificate extends AsnData<AttributeCertificate> {\n public readonly serialNumber: string;\n\n public readonly version: number;\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly issuer: GeneralName[];\n\n public holder: Holder;\n\n public type: string = 'X.509 Attribute Certificate';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), AttributeCertificate);\n\n const { acinfo } = this.asn;\n\n this.serialNumber = Convert.ToHex(acinfo.serialNumber);\n this.version = acinfo.version;\n\n const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;\n\n if (!notBefore) {\n throw new Error(\"Cannot get 'notBefore' value\");\n }\n\n this.notBefore = notBefore;\n\n const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;\n\n if (!notAfter) {\n throw new Error(\"Cannot get 'notAfter' value\");\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n this.issuer = acinfo.issuer.v1Form || acinfo.issuer.v2Form?.issuerName;\n this.holder = acinfo.holder;\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n\n return {\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public parseExtensions() {\n const { acinfo } = this.asn;\n\n if (acinfo.extensions) {\n this.extensions = acinfo.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public parseAttributes() {\n const { acinfo } = this.asn;\n\n if (acinfo.attributes) {\n this.attributes = acinfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN ATTRIBUTE CERTIFICATE-----\\n${base64Format(this.exportAsBase64())}\\n-----END ATTRIBUTE CERTIFICATE-----`;\n }\n\n public get commonName(): string {\n return `attribute-certificate-${this.thumbprints['SHA-1']}`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.attrCert.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.attrCert.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport { CertificationRequest } from '@peculiar/asn1-csr';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { Attribute, TAttributeValue } from './attribute';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\ninterface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey;\n}\n\nexport class CSR extends AsnData<CertificationRequest> {\n public readonly subject: INameJSON[];\n\n public readonly version: number;\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'PKCS#10 Certificate Request';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificationRequest);\n\n const { certificationRequestInfo } = this.asn;\n\n this.subject = new Name(certificationRequestInfo.subject).toJSON();\n this.version = certificationRequestInfo.version;\n }\n\n public get publicKey(): IPublicKey {\n const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public parseAttributes() {\n const { certificationRequestInfo } = this.asn;\n\n if (certificationRequestInfo.attributes) {\n this.attributes = certificationRequestInfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN CERTIFICATE REQUEST-----\\n${base64Format(this.exportAsBase64())}\\n-----END CERTIFICATE REQUEST-----`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.csr.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.csr.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { CertificateList, Time } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { Download } from '../utils';\n\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport interface IRevokedCertificate {\n userCertificate: ArrayBuffer;\n revocationDate: Time;\n crlEntryExtensions?: Extension<TExtensionValue>[];\n}\n\nexport class CRL extends AsnData<CertificateList> {\n public readonly issuer: INameJSON[];\n\n public readonly version: number;\n\n public readonly lastUpdate: Date;\n\n public readonly nextUpdate: Date;\n\n public extensions: Extension<TExtensionValue>[];\n\n public revokedCertificates: IRevokedCertificate[];\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'X.509 Certificate Revocation List';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificateList);\n\n const { tbsCertList } = this.asn;\n\n this.issuer = new Name(tbsCertList.issuer).toJSON();\n this.version = tbsCertList.version + 1;\n this.lastUpdate = tbsCertList.thisUpdate.getTime();\n this.nextUpdate = tbsCertList.nextUpdate.getTime();\n\n this.revokedCertificates = (tbsCertList.revokedCertificates || [])\n .map((revokedCertificate) => ({\n revocationDate: revokedCertificate.revocationDate,\n userCertificate: revokedCertificate.userCertificate,\n crlEntryExtensions: revokedCertificate.crlEntryExtensions\n ?.map((e) => new Extension(AsnConvert.serialize(e))),\n }));\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public parseExtensions() {\n const { tbsCertList } = this.asn;\n\n if (tbsCertList.crlExtensions) {\n this.extensions = tbsCertList.crlExtensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN X509 CRL-----\\n${base64Format(this.exportAsBase64())}\\n-----END X509 CRL-----`;\n }\n\n public downloadAsPEM(name?: string) {\n Download.crl.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.crl.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n"],"mappings":";;;;;;;;;;SAmEaA,UAA6CC,EAGhD,eAAAC,GACN,OAAOC,KAAKC,IAAIC,OAAO,E,CAGzB,WAAAC,CAAYC,GACVC,MAAMD,EAAKE,GAEX,MAAMC,EAAeP,KAAKD,kBAE1B,OAAQC,KAAKC,IAAIO,MACf,KAAKC,EACHT,KAAKU,MAAQC,EAAUC,MAAML,EAAcM,GAC3C,MACF,KAAKC,EACHd,KAAKU,MAAQC,EAAUC,MAAML,EAAcQ,GAC3C,MACF,KAAKC,EACHhB,KAAKU,MAAQC,EAAUC,MAAML,EAAcU,GAC3C,MACF,KAAKC,EACHlB,KAAKU,MAAQC,EAAUC,MAAML,EAAcY,GAC3C,MACF,KAAKC,EACHpB,KAAKU,MAAQC,EAAUC,MAAML,EAAcc,GAC3C,MACF,KAAKC,EACHtB,KAAKU,MAAQC,EAAUC,MAAML,EAAcgB,GAC3C,MACF,KAAKC,EACHxB,KAAKU,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,KAAK2D,OAAQ,CAChB,MAAO,E,CAGT,IAAK,IAAIiD,EAAI,EAAGA,EAAI5G,KAAK2D,OAAOkD,OAAQD,GAAK,EAAG,CAC9C,MAAMtB,EAAOtF,KAAK2D,OAAOiD,GAEzB,GAAItB,EAAKwB,YAAc,MAAQxB,EAAKwB,YAAc,KAAOxB,EAAKwB,YAAc,IAAK,CAC/E,OAAOxB,EAAK5E,K,EAIhB,MAAO,E,CAGF,eAAA2D,GACL,MAAM6C,YAAEA,GAAgBlH,KAAKC,IAE7B,GAAIiH,EAAYU,cAAe,CAC7B5H,KAAKsE,WAAa4C,EAAYU,cAC3BvF,KAAKC,GAAM,IAAIC,EAAUC,EAAWC,UAAUH,K,EAI9C,cAAAwC,GACL,OAAOpC,UAAQqC,SAAS/E,KAAKI,I,CAGxB,oBAAA4E,GACL,OAAOC,EAAUvC,UAAQC,MAAM3C,KAAKI,K,CAG/B,oBAAA8E,GACL,MAAO,6BAA6BC,EAAanF,KAAK8E,2C,CAGjD,aAAAO,CAAcC,GACnBC,EAASsC,IAAIpC,MACXzF,KAAKkF,uBACLI,GAAQtF,KAAKoF,W,CAIV,aAAAM,CAAcJ,GACnBC,EAASsC,IAAIlC,MACX3F,KAAKgF,uBACLM,GAAQtF,KAAKoF,W"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{h as t,r as s,H as r,g as i}from"./p-0b356bb5.js";import{T as e,B as o}from"./p-7f9beaa8.js";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const a=s=>{const{color:r="gray-10"}=s;return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"31",fill:"none"},t("path",{fill:`var(--pv-color-${r})`,d:"M15 13.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm14 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"}))};const n='.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 c=class{constructor(t){s(this,t);this.handleClick=()=>{this.open=!this.open};this.groups=[];this.open=false}render(){return t(r,{class:{is_shown:this.open}},t(o,{class:"button_popover",onClick:this.handleClick,startIcon:t(a,null)}),t("div",{role:"dialog",tabIndex:-1,class:"popover","aria-hidden":String(this.open)},this.groups.map((s=>t("div",{class:"group"},t(e,{variant:"c2",color:"gray-9",class:"group_title"},s.title),s.options.map((s=>t(o,{class:"button_option",startIcon:s.startIcon,href:s.href,onClick:t=>{t.stopPropagation();this.handleClick();if(s.onClick){s.onClick(t)}}},s.text))))))))}};c.style=n;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 h=class{constructor(t){s(this,t);this.box=50;this.size=24;this.width=4}render(){return t(r,null,t("div",{class:"circle_progress",style:{width:`${this.size}px`,height:`${this.size}px`}},t("svg",{class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},t("circle",{class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}),t("circle",{class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}))))}};h.style=l;const p=":host{display:inline}::slotted(mark){background-color:var(--pv-color-attention-tint-4)}";const d=class{constructor(t){s(this,t);this.tag="mark";this.search=undefined}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let s=t;if(this.search){const r=new RegExp(`(${this.search})`,"gi");s=t.replace(r,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=s}resetHighlightSearch(t){const s=new RegExp(`</?${this.tag}>`,"g");return t.replace(s,"")}render(){return t(r,null,t("slot",null))}get host(){return i(this)}};d.style=p;export{c as peculiar_button_menu,h as peculiar_circular_progress,d as peculiar_highlight_words};
|
|
12
|
+
//# sourceMappingURL=p-5823e6e8.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActionsIcon","props","color","h","xmlns","width","height","fill","d","buttonMenuCss","ButtonMenu","this","handleClick","open","render","Host","class","is_shown","Button","onClick","startIcon","role","tabIndex","String","groups","map","group","Typography","variant","title","options","option","href","event","stopPropagation","text","circularProgressCss","CircularProgress","box","style","size","viewBox","cx","cy","r","strokeWidth","highlightWordsCss","HighlightWords","tag","componentDidLoad","handleHighlightSearch","componentDidUpdate","basicString","resetHighlightSearch","host","innerHTML","result","search","substring","RegExp","replace","source"],"sources":["src/components/icons/actions.tsx","src/components/button-menu/button-menu.scss?tag=peculiar-button-menu&encapsulation=scoped","src/components/button-menu/button-menu.tsx","src/components/circular-progress/circular-progress.scss?tag=peculiar-circular-progress&encapsulation=shadow","src/components/circular-progress/circular-progress.tsx","src/components/highlight-words/highlight-words.scss?tag=peculiar-highlight-words&encapsulation=shadow","src/components/highlight-words/highlight-words.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const ActionsIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-10' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"31\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n d=\"M15 13.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm14 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z\"\n />\n </svg>\n );\n};\n",":host {\n display: inline-flex;\n position: relative;\n\n &.is_shown {\n .button_popover {\n &:before {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n content: '';\n }\n }\n\n .popover {\n display: block;\n }\n }\n}\n\n.popover {\n min-width: 200px;\n position: absolute;\n top: 100%;\n right: 0;\n border-radius: 4px;\n z-index: 1;\n box-shadow: var(--pv-shadow-light-medium);\n background: var(--pv-color-white);\n padding: var(--pv-size-base-2) 0;\n margin: var(--pv-size-base) 0;\n display: none;\n}\n\n.button_option {\n width: 100%;\n justify-content: flex-start;\n border-radius: 0;\n}\n\n.group {\n &:not(:last-child) {\n border-bottom: 1px solid var(--pv-color-gray-5);\n padding-bottom: var(--pv-size-base-2);\n margin-bottom: var(--pv-size-base);\n }\n}\n\n.group_title {\n line-height: var(--pv-size-base-6);\n padding: 0 var(--pv-size-base-2);\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n State,\n Prop,\n Host,\n} from '@stencil/core';\nimport { Button, ButtonProps } from '../button';\nimport { Typography } from '../typography';\nimport { ActionsIcon } from '../icons';\n\nexport interface ButtonMenuGroupOptions extends ButtonProps {\n text: string | string[];\n}\n\nexport interface ButtonMenuGroup {\n title: string | string[];\n options: ButtonMenuGroupOptions[];\n}\n\n@Component({\n tag: 'peculiar-button-menu',\n styleUrl: 'button-menu.scss',\n scoped: true,\n})\nexport class ButtonMenu {\n @Prop() groups: ButtonMenuGroup[] = [];\n\n @State() open: boolean = false;\n\n handleClick = () => {\n this.open = !this.open;\n };\n\n render() {\n return (\n <Host\n class={{\n is_shown: this.open,\n }}\n >\n <Button\n class=\"button_popover\"\n onClick={this.handleClick}\n startIcon={<ActionsIcon />}\n />\n <div\n role=\"dialog\"\n tabIndex={-1}\n class=\"popover\"\n aria-hidden={String(this.open)}\n >\n {this.groups.map((group) => (\n <div class=\"group\">\n <Typography\n variant=\"c2\"\n color=\"gray-9\"\n class=\"group_title\"\n >\n {group.title}\n </Typography>\n {group.options.map((option) => (\n <Button\n class=\"button_option\"\n startIcon={option.startIcon}\n href={option.href}\n onClick={(event) => {\n event.stopPropagation();\n\n this.handleClick();\n\n if (option.onClick) {\n option.onClick(event);\n }\n }}\n >\n {option.text}\n </Button>\n ))}\n </div>\n ))}\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: block;\n width: 100%;\n}\n\n@keyframes circular-rotate {\n to {\n transform: rotate(1turn);\n }\n}\n\n@keyframes circular-dash {\n 0% {\n stroke-dasharray: 1,200;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100,200;\n stroke-dashoffset: -15;\n }\n\n to {\n stroke-dasharray: 100,200;\n stroke-dashoffset: -120;\n }\n}\n\n.circle_progress {\n margin: 0 auto;\n}\n\n.circle_progress_svg {\n animation: circular-rotate 1.4s linear infinite;\n}\n\n.circle_progress_circle {\n stroke-linecap: round;\n animation: circular-dash 1.4s ease-in-out infinite;\n stroke-dasharray: 80,200;\n stroke-dashoffset: 0;\n stroke: var(--pv-color-secondary);\n}\n\n.circle_progress_backdrop {\n stroke: var(--pv-color-gray-3);\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Host,\n h,\n Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'peculiar-circular-progress',\n styleUrl: 'circular-progress.scss',\n shadow: true,\n})\nexport class CircularProgress {\n /**\n * Width/height of progress circle.\n */\n @Prop() size: number = 24;\n\n /**\n * Stroke width of progress bar circle.\n */\n @Prop() width: number = 4;\n\n private box: number = 50;\n\n render() {\n return (\n <Host>\n <div\n class=\"circle_progress\"\n style={{\n width: `${this.size}px`,\n height: `${this.size}px`,\n }}\n >\n <svg\n class=\"circle_progress_svg\"\n viewBox={`0 0 ${this.box} ${this.box}`}\n >\n <circle\n class=\"circle_progress_backdrop\"\n cx={this.box / 2}\n cy={this.box / 2}\n r={(this.box / 2) - 5}\n fill=\"none\"\n style={{\n strokeWidth: `${this.width}px`,\n }}\n />\n <circle\n class=\"circle_progress_circle\"\n cx={this.box / 2}\n cy={this.box / 2}\n r={(this.box / 2) - 5}\n fill=\"none\"\n style={{\n strokeWidth: `${this.width}px`,\n }}\n />\n </svg>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline;\n}\n\n::slotted(mark) {\n background-color: var(--pv-color-attention-tint-4);\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component, Host, h, Element, Prop,\n} from '@stencil/core';\n\n@Component({\n tag: 'peculiar-highlight-words',\n styleUrl: 'highlight-words.scss',\n shadow: true,\n})\nexport class HighlightWords {\n @Element() host: HTMLElement;\n\n @Prop() search: string;\n\n private tag: string = 'mark';\n\n componentDidLoad() {\n this.handleHighlightSearch();\n }\n\n componentDidUpdate() {\n this.handleHighlightSearch();\n }\n\n handleHighlightSearch() {\n const basicString = this.resetHighlightSearch(this.host.innerHTML);\n let result = basicString;\n\n if (this.search) {\n const substring = new RegExp(`(${this.search})`, 'gi');\n\n result = basicString.replace(substring, `<${this.tag}>$1</${this.tag}>`);\n }\n\n this.host.innerHTML = result;\n }\n\n resetHighlightSearch(source: string) {\n // eslint-disable-next-line no-useless-escape\n const substring = new RegExp(`<\\/?${this.tag}>`, 'g');\n\n return source.replace(substring, '');\n }\n\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;GAWO,MAAMA,EAA2DC,IACtE,MAAMC,MAAEA,EAAQ,WAAcD,EAE9B,OACEE,EAAA,OACEC,MAAM,6BACNC,MAAM,KACNC,OAAO,KACPC,KAAK,QAELJ,EAAA,QACEI,KAAM,kBAAkBL,KACxBM,EAAE,8GAEA,ECzBV,MAAMC,EAAgB,s/B,MCiCTC,EAAU,M,yBAKrBC,KAAAC,YAAc,KACZD,KAA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,OACLgC,MAAO,CACLM,YAAa,GAAGlC,KAAKN,e,aChErC,MAAMyC,EAAoB,0F,MCiBbC,EAAc,M,yBAKjBpC,KAAAqC,IAAc,O,sBAEtB,gBAAAC,GACEtC,KAAKuC,uB,CAGP,kBAAAC,GACExC,KAAKuC,uB,CAGP,qBAAAA,GACE,MAAME,EAAczC,KAAK0C,qBAAqB1C,KAAK2C,KAAKC,WACxD,IAAIC,EAASJ,EAEb,GAAIzC,KAAK8C,OAAQ,CACf,MAAMC,EAAY,IAAIC,OAAO,IAAIhD,KAAK8C,UAAW,MAEjDD,EAASJ,EAAYQ,QAAQF,EAAW,IAAI/C,KAAKqC,WAAWrC,KAAKqC,O,CAGnErC,KAAK2C,KAAKC,UAAYC,C,CAGxB,oBAAAH,CAAqBQ,GAEnB,MAAMH,EAAY,IAAIC,OAAO,MAAOhD,KAAKqC,OAAQ,KAEjD,OAAOa,EAAOD,QAAQF,EAAW,G,CAGnC,MAAA5C,GACE,OACEX,EAACY,EAAI,KACHZ,EAAA,a"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{h as t,r as e,c as a,H as r}from"./p-0b356bb5.js";import{X as o}from"./p-6e79b9c8.js";import{$ as s,a0 as i,a1 as n}from"./p-74c241e7.js";import"./p-a053c132.js";import{T as c,B as l}from"./p-7f9beaa8.js";import{D as v}from"./p-17e3c47b.js";import{A as p,a as h}from"./p-709994c1.js";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const d=e=>{const{certificate:a,showIssuer:r}=e;const o=(e,a)=>t("tr",null,t("td",null,t(c,{variant:"b2",color:"gray-9"},e)),t("td",null,t(c,{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))))};
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/const b=e=>{const{color:a="secondary"}=e;return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"31",fill:"none"},t("path",{fill:`var(--pv-color-${a})`,d:"M6.71 19.79a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1 1 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1 1 0 0 0 .21-1.09 1 1 0 0 0-.21-.33ZM10 11.5h14a1 1 0 0 0 0-2H10a1 1 0 0 0 0 2Zm-3.29 3.29a1 1 0 0 0-1.09-.21 1.15 1.15 0 0 0-.33.21 1 1 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1 1 0 0 0-.21-.33ZM24 14.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2ZM6.71 9.79a1 1 0 0 0-.33-.21 1 1 0 0 0-1.09.21 1.15 1.15 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a1 1 0 0 0 1.09-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1.15 1.15 0 0 0-.21-.33ZM24 19.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z"}))};
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/const g=e=>{const{color:a="secondary"}=e;return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"31",fill:"none"},t("path",{fill:`var(--pv-color-${a})`,d:"M21 14.32a1 1 0 0 0-1 1v7.18a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1h7.18a1 1 0 0 0 0-2H8a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h11a3 3 0 0 0 3-3v-7.18a1 1 0 0 0-1-1Zm3.92-8.2a1 1 0 0 0-.54-.54A1 1 0 0 0 24 5.5h-6a1 1 0 1 0 0 2h3.59l-10.3 10.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219L23 8.91v3.59a1 1 0 0 0 2 0v-6a1.001 1.001 0 0 0-.08-.38Z"}))};
|
|
26
|
+
/**
|
|
27
|
+
* @license
|
|
28
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/const u=e=>{const{color:a="gray-9"}=e;return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none"},t("path",{fill:`var(--pv-color-${a})`,"fill-rule":"evenodd",d:"m16.37 15 5.442 5.44c.25.252.25.663 0 .914l-.459.457a.646.646 0 0 1-.913 0L15 16.371l-5.44 5.44a.648.648 0 0 1-.915 0l-.457-.457a.649.649 0 0 1 0-.913L13.63 15 8.188 9.56a.649.649 0 0 1 0-.914l.457-.457a.648.648 0 0 1 .915 0l5.44 5.44 5.44-5.44a.646.646 0 0 1 .913 0l.46.457c.25.25.25.662 0 .913L16.37 15Z","clip-rule":"evenodd"}))};const m="*{-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 w=class{constructor(t){e(this,t);this.detailsOpen=a(this,"detailsOpen",7);this.detailsClose=a(this,"detailsClose",7);this.isHasRoots=false;this.handleClickDetails=t=>{this.certificateSelectedForDetails=t;this.detailsOpen.emit(t)};this.handleModalClose=()=>{this.certificateSelectedForDetails=undefined;this.detailsClose.emit()};this.handleSearch=t=>{this.search=t.target.value.trim()};this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.search="";this.certificatesDecoded=[];this.expandedRow=undefined;this.certificateSelectedForDetails=undefined;this.isDecodeInProcess=true}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}handleClickDownloadAsPem(t){t.body.downloadAsPEM(t.name||t.body.commonName)}handleClickDownloadAsDer(t){t.body.downloadAsDER(t.name||t.body.commonName)}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(b,null),onClick:()=>this.handleClickDetails(e.body)}]},{title:s.getString("downloadOptions"),options:[{text:s.getString("download.pem"),startIcon:t(v,null),onClick:()=>this.handleClickDownloadAsPem(e)},{text:s.getString("download.der"),startIcon:t(v,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(g,null)}]:[],...((r=e.tests)===null||r===void 0?void 0:r.revoked)?[{text:s.getString("revoked"),href:e.tests.revoked,startIcon:t(g,null)}]:[],...((o=e.tests)===null||o===void 0?void 0:o.expired)?[{text:s.getString("expired"),href:e.tests.expired,startIcon:t(g,null)}]:[]]}]:[]]})}renderExpandedRow(e){const a=this.getMaxColSpanValue()-2;return t("tr",{class:"expanded_summary"},t("td",null),t("td",{colSpan:a},t(d,{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 v=n[r.body.signature.algorithm]||r.body.signature.algorithm;if(this.filterWithSearch&&this.search){const t=[v,r.body.issuerCommonName,r.name,r.body.commonName,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(c,{variant:"b2",color:"gray-9"},s.getString("issuer"))),t("td",null,t(c,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},r.body.issuerCommonName)))),t("tr",null,t("td",null,t(c,{variant:"b2",color:"gray-9"},s.getString("name"))),t("td",null,t(c,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},r.name||r.body.commonName)))),t("tr",null,t("td",null,t(c,{variant:"b2",color:"gray-9"},s.getString("publicKey"))),t("td",null,t(c,{variant:"b2",color:"black"},t("peculiar-highlight-words",{search:e},v)))),t("tr",null,t("td",null,t(c,{variant:"b2",color:"gray-9"},s.getString("fingerprint")," (SHA-1)")),t("td",null,t(c,{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,{onClick:this.handleClickRow.bind(this,o),startIcon:i?t(p,null):t(h,null)})))))))]);return}a.push([t("tr",{class:{m_expanded:i},key:r.body.thumbprints["SHA-1"]},t("td",null,t(l,{class:"button_table_cell",onClick:this.handleClickRow.bind(this,o),startIcon:i?t(p,null):t(h,null)})),!this.isHasRoots&&t("td",null,t(c,null,t("peculiar-highlight-words",{search:e},r.body.issuerCommonName))),t("td",null,t(c,null,t("peculiar-highlight-words",{search:e},r.name||r.body.commonName))),t("td",null,t(c,null,t("peculiar-highlight-words",{search:e},v))),t("td",null,t(c,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",onClick:this.handleModalClose,"aria-hidden":"true"}),t("div",{class:"modal_container",role:"dialog",part:"presentation_container"},t("header",{class:"modal_header"},t(c,{variant:"h4"},s.getString("certificateDetails")),t(l,{onClick:this.handleModalClose,startIcon:t(u,null)})),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",{onInput:this.handleSearch,type:"search",value:"",class:"input_search t-b3 c-black",disabled:!this.certificatesDecoded.length,placeholder:"Search"}))}renderEmptyState(){const e=this.getMaxColSpanValue();return t("tr",null,t("td",{class:"status_wrapper",colSpan:e},t(c,{variant:"b1"},"There are no certificates available.")))}renderEmptySearchState(){const e=this.getMaxColSpanValue();return t("tr",null,t("td",{class:"status_wrapper",colSpan:e},t(c,{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,{"data-mobile-screen-view":String(this.mobileScreenView)},this.renderSearch(),t("table",null,!this.mobileScreenView&&t("thead",null,t("tr",null,t("th",null),!this.isHasRoots&&t("th",{class:"col_issuer"},t(c,{variant:"s2"},s.getString("issuer"))),t("th",{class:"col_name"},t(c,{variant:"s2"},s.getString("name"))),t("th",{class:"col_public_key"},t(c,{variant:"s2"},s.getString("publicKey"))),t("th",{class:"col_fingerprint"},t(c,{variant:"s2"},s.getString("fingerprint")," (SHA-1)")),t("th",null))),t("tbody",null,this.renderTableBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};w.style=m;export{w as peculiar_certificates_viewer};
|
|
33
|
+
//# sourceMappingURL=p-596836a7.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CertificateSummary","props","certificate","showIssuer","renderRow","name","value","h","Typography","variant","color","l10n","getString","subjectToString","issuerToString","serialNumber","version","validity","dateShort","notBefore","notAfter","DetailsIcon","xmlns","width","height","fill","d","LinkIcon","CrossIcon","certificatesViewerCss","CertificatesViewer","this","isHasRoots","handleClickDetails","certificateSelectedForDetails","detailsOpen","emit","handleModalClose","undefined","detailsClose","handleSearch","event","search","target","trim","handleMediaQueryChange","mobileScreenView","matches","componentWillLoad","certificatesDecodeAndSet","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","watchCertificates","newValue","oldValue","JSON","stringify","hasRoots","Array","isArray","certificates","data","decoded","X509Certificate","getThumbprint","push","body","tests","isRoot","error","console","isDecodeInProcess","certificatesDecoded","handleClickDownloadAsPem","downloadAsPEM","commonName","handleClickDownloadAsDer","downloadAsDER","handleClickRow","index","isExpandedRowClicked","expandedRow","getMaxColSpanValue","colSpan","renderCertificateButtonActions","isHasTestURLs","expired","revoked","valid","class","groups","title","options","text","startIcon","onClick","DownloadIcon","_a","href","_b","_c","renderExpandedRow","renderCertificatesRows","searchHighlight","highlightWithSearch","content","forEach","isExpandedRow","publicKeyValue","OIDs","signature","algorithm","filterWithSearch","certificateStringForSearch","issuerCommonName","thumbprints","join","toLowerCase","indexOf","certificate_row","m_expanded","key","Button","ArrowTopIcon","ArrowBottomIcon","renderCertificateDetailsModal","role","part","renderSearch","onInput","type","disabled","length","placeholder","renderEmptyState","renderEmptySearchState","renderLoadingState","renderTableBody","certificatesRows","render","Host","String"],"sources":["src/components/certificate-summary/certificate-summary.tsx","src/components/icons/details.tsx","src/components/icons/link.tsx","src/components/icons/cross.tsx","src/components/certificates-viewer/certificates-viewer.scss?tag=peculiar-certificates-viewer&encapsulation=shadow","src/components/certificates-viewer/certificates-viewer.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { X509Certificate } from '../../crypto';\nimport { dateShort, l10n } from '../../utils';\nimport { Typography } from '../typography';\n\ninterface CertificateSummaryProps {\n certificate: X509Certificate;\n showIssuer?: boolean;\n}\n\nexport const CertificateSummary: FunctionalComponent<CertificateSummaryProps> = (props) => {\n const {\n certificate,\n showIssuer,\n } = props;\n\n const renderRow = (name: string | string[], value: string | number) => (\n <tr>\n <td>\n <Typography\n variant=\"b2\"\n color=\"gray-9\"\n >\n {name}\n </Typography>\n </td>\n <td>\n <Typography\n variant=\"b2\"\n color=\"black\"\n >\n {value}\n </Typography>\n </td>\n </tr>\n );\n\n return (\n <table>\n <tbody>\n {renderRow(\n l10n.getString('subjectName'),\n certificate.subjectToString(),\n )}\n {showIssuer && renderRow(\n l10n.getString('issuerName'),\n certificate.issuerToString(),\n )}\n\n {renderRow(\n l10n.getString('serialNumber'),\n certificate.serialNumber,\n )}\n {renderRow(\n l10n.getString('version'),\n certificate.version,\n )}\n {renderRow(\n l10n.getString('validity'),\n certificate.validity,\n )}\n {renderRow(\n l10n.getString('issued'),\n dateShort(certificate.notBefore),\n )}\n {renderRow(\n l10n.getString('expired'),\n dateShort(certificate.notAfter),\n )}\n </tbody>\n </table>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const DetailsIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'secondary' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"31\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n d=\"M6.71 19.79a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1 1 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1 1 0 0 0 .21-1.09 1 1 0 0 0-.21-.33ZM10 11.5h14a1 1 0 0 0 0-2H10a1 1 0 0 0 0 2Zm-3.29 3.29a1 1 0 0 0-1.09-.21 1.15 1.15 0 0 0-.33.21 1 1 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1 1 0 0 0-.21-.33ZM24 14.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2ZM6.71 9.79a1 1 0 0 0-.33-.21 1 1 0 0 0-1.09.21 1.15 1.15 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a1 1 0 0 0 1.09-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1.15 1.15 0 0 0-.21-.33ZM24 19.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z\"\n />\n </svg>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const LinkIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'secondary' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"31\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n d=\"M21 14.32a1 1 0 0 0-1 1v7.18a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1h7.18a1 1 0 0 0 0-2H8a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h11a3 3 0 0 0 3-3v-7.18a1 1 0 0 0-1-1Zm3.92-8.2a1 1 0 0 0-.54-.54A1 1 0 0 0 24 5.5h-6a1 1 0 1 0 0 2h3.59l-10.3 10.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219L23 8.91v3.59a1 1 0 0 0 2 0v-6a1.001 1.001 0 0 0-.08-.38Z\"\n />\n </svg>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const CrossIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-9' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n fill-rule=\"evenodd\"\n d=\"m16.37 15 5.442 5.44c.25.252.25.663 0 .914l-.459.457a.646.646 0 0 1-.913 0L15 16.371l-5.44 5.44a.648.648 0 0 1-.915 0l-.457-.457a.649.649 0 0 1 0-.913L13.63 15 8.188 9.56a.649.649 0 0 1 0-.914l.457-.457a.648.648 0 0 1 .915 0l5.44 5.44 5.44-5.44a.646.646 0 0 1 .913 0l.46.457c.25.25.25.662 0 .913L16.37 15Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n );\n};\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n word-wrap: break-word;\n min-width: 280px;\n overflow: auto;\n position: relative;\n}\n\n.search_section {\n padding: var(--pv-size-base-4);\n border-bottom: 1px solid var(--pv-color-gray-4);\n}\n\n.input_search {\n height: var(--pv-size-base-8);\n width: 100%;\n outline: none;\n background-color: var(--pv-color-gray-1);\n padding: 0 var(--pv-size-base-2);\n border: 1px solid var(--pv-color-gray-7);\n border-radius: 4px;\n transition: background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;\n &::placeholder {\n color: var(--pv-color-gray-9);\n }\n}\n\ntable {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n\n td, th {\n border-bottom: 1px solid var(--pv-color-gray-4);\n vertical-align: top;\n text-align: left;\n\n &:first-child {\n padding-right: 0;\n width: var(--pv-size-base-10);\n }\n &:last-child {\n padding-left: 0;\n width: var(--pv-size-base-10);\n }\n }\n\n th {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n\n &.col_action {\n padding: 0;\n }\n }\n\n td {\n padding: var(--pv-size-base-4);\n }\n\n tr {\n &.m_expanded {\n background: var(--pv-color-gray-1);\n\n > td {\n border-bottom: none;\n }\n }\n\n &.expanded_summary {\n background: var(--pv-color-gray-1);\n\n table {\n table-layout: initial;\n\n td {\n border-bottom: none;\n padding: var(--pv-size-base-2);\n\n &:first-child {\n width: 200px;\n }\n\n &:last-child {\n width: auto;\n }\n }\n }\n }\n }\n}\n\n.button_table_cell {\n margin-top: -3px;\n}\n\n.status_wrapper {\n text-align: center;\n height: var(--pv-size-base-16);\n vertical-align: middle;\n}\n\n.modal_wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n animation: fadeIn 200ms;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.modal_backdrop {\n background: var(--pv-color-black);\n z-index: -1;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.5;\n}\n\n.modal_container {\n background: var(--pv-color-white);\n width: 100%;\n display: flex;\n max-height: calc(100% - 60px);\n flex-direction: column;\n margin: var(--pv-size-base-6);\n position: relative;\n outline: none;\n box-shadow: var(--pv-shadow-dark-hight);\n overflow: hidden;\n border: 0px;\n padding: 0px;\n max-width: 640px;\n border-radius: 4px;\n}\n\n.modal_header {\n padding: var(--pv-size-base-3) var(--pv-size-base-4);\n display: flex;\n flex: 0 0 auto;\n -webkit-box-pack: justify;\n justify-content: space-between;\n gap: var(--pv-size-base-2);\n border-bottom: 1px solid var(--pv-color-gray-5);\n}\n\n.modal_content {\n flex: 1 1 auto;\n overflow: auto;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tbody, tr, td {\n display: block;\n width: 100% !important;\n padding: 0;\n border: none;\n }\n\n thead {\n display: none;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n }\n\n .expanded_summary {\n padding: 0;\n }\n\n .certificate_row {\n border-bottom: 1px solid var(--pv-color-gray-5);\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n }\n\n .certificate_row_actions {\n padding-top: var(--pv-size-base-6);\n\n td {\n display: flex;\n justify-content: right;\n gap: var(--pv-size-base-4);\n }\n }\n }\n\n .button_table_cell {\n margin-top: 0;\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Event,\n EventEmitter,\n Build,\n} from '@stencil/core';\n\nimport { X509Certificate } from '../../crypto';\nimport { OIDs } from '../../constants/oids';\nimport { l10n } from '../../utils';\nimport { Typography } from '../typography';\nimport { CertificateSummary } from '../certificate-summary';\nimport { Button } from '../button';\nimport {\n DownloadIcon,\n LinkIcon,\n DetailsIcon,\n ArrowBottomIcon,\n ArrowTopIcon,\n CrossIcon,\n} from '../icons';\n\nexport interface ICertificate {\n value: string;\n name?: string;\n tests?: {\n valid?: string;\n revoked?: string;\n expired?: string;\n };\n}\n\ninterface ICertificateDecoded {\n body: X509Certificate;\n tests?: ICertificate['tests'];\n name?: string;\n}\n\n@Component({\n tag: 'peculiar-certificates-viewer',\n styleUrl: 'certificates-viewer.scss',\n shadow: true,\n})\nexport class CertificatesViewer {\n private isHasRoots: boolean = false;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * List of certificates values for decode and show in the list.\n * <br />\n * **NOTE**: If you do not provide a `name` value when\n * invocing the component it will take the first Subject CN value.\n * <br />\n * **NOTE**: If you do not provide a `tests` this column will be ommited from the rendered page.\n * <br />\n * **NOTE**: If the supplied certificates are self-signed the issuer column will be ommited.\n */\n @Prop() certificates: ICertificate[] = [];\n\n /**\n * Use filter in the list when search is changed.\n */\n @Prop() filterWithSearch: boolean = true;\n\n /**\n * Use highlight chapters in the list when search is changed.\n */\n @Prop() highlightWithSearch: boolean = true;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n /**\n * Emitted when the user open certificate details modal.\n */\n @Event() detailsOpen!: EventEmitter<X509Certificate>;\n\n /**\n * Emitted when the user close certificate details modal.\n */\n @Event() detailsClose!: EventEmitter<void>;\n\n @State() mobileScreenView: boolean = false;\n\n @State() search: string = '';\n\n @State() certificatesDecoded: ICertificateDecoded[] = [];\n\n @State() expandedRow?: number;\n\n @State() certificateSelectedForDetails?: X509Certificate;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.certificatesDecodeAndSet();\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n @Watch('certificates')\n watchCertificates(newValue: ICertificate[], oldValue: ICertificate[]) {\n /**\n * Prevent rerender after set the same `certificates` prop.\n */\n if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {\n this.certificatesDecodeAndSet();\n }\n }\n\n async certificatesDecodeAndSet() {\n let hasRoots = false;\n\n if (!Array.isArray(this.certificates)) {\n return;\n }\n\n const data: ICertificateDecoded[] = [];\n\n // eslint-disable-next-line no-restricted-syntax\n for (const certificate of this.certificates) {\n try {\n const decoded = new X509Certificate(certificate.value);\n\n await decoded.getThumbprint('SHA-1');\n\n data.push({\n body: decoded,\n tests: certificate.tests,\n name: certificate.name,\n });\n\n if (!hasRoots && decoded.isRoot) {\n hasRoots = true;\n }\n } catch (error) {\n console.error('Error certificate parse:', error);\n }\n }\n\n this.isHasRoots = hasRoots;\n this.isDecodeInProcess = false;\n this.certificatesDecoded = data;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsPem(certificate: ICertificateDecoded) {\n certificate.body.downloadAsPEM(certificate.name || certificate.body.commonName);\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsDer(certificate: ICertificateDecoded) {\n certificate.body.downloadAsDER(certificate.name || certificate.body.commonName);\n }\n\n private handleClickDetails = (certificate: X509Certificate) => {\n this.certificateSelectedForDetails = certificate;\n this.detailsOpen.emit(certificate);\n };\n\n private handleModalClose = () => {\n this.certificateSelectedForDetails = undefined;\n\n this.detailsClose.emit();\n };\n\n private handleClickRow(index: number) {\n const isExpandedRowClicked = this.expandedRow === index;\n\n this.expandedRow = isExpandedRowClicked\n ? undefined\n : index;\n }\n\n private handleSearch = (event: any) => {\n this.search = event.target.value.trim();\n };\n\n private getMaxColSpanValue() {\n let colSpan = 5;\n\n if (!this.isHasRoots) {\n colSpan += 1;\n }\n\n return colSpan;\n }\n\n private renderCertificateButtonActions(certificate: ICertificateDecoded) {\n const isHasTestURLs = certificate.tests\n && (certificate.tests.expired || certificate.tests.revoked || certificate.tests.valid);\n\n return (\n <peculiar-button-menu\n class=\"button_table_cell\"\n groups={[\n {\n title: l10n.getString('previewCertificate'),\n options: [\n {\n text: l10n.getString('viewDetails'),\n startIcon: <DetailsIcon />,\n onClick: () => this.handleClickDetails(certificate.body),\n },\n ],\n },\n {\n title: l10n.getString('downloadOptions'),\n options: [\n {\n text: l10n.getString('download.pem'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsPem(certificate),\n },\n {\n text: l10n.getString('download.der'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsDer(certificate),\n },\n ],\n },\n ...(isHasTestURLs ? [{\n title: l10n.getString('testURLs'),\n options: [\n ...(certificate.tests?.valid ? [{\n text: l10n.getString('valid'),\n href: certificate.tests.valid,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.revoked ? [{\n text: l10n.getString('revoked'),\n href: certificate.tests.revoked,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.expired ? [{\n text: l10n.getString('expired'),\n href: certificate.tests.expired,\n startIcon: <LinkIcon />,\n }] : []),\n ],\n }] : []),\n ]}\n />\n );\n }\n\n private renderExpandedRow(certificate: X509Certificate) {\n const colSpan = this.getMaxColSpanValue() - 2;\n\n return (\n <tr class=\"expanded_summary\">\n <td />\n <td colSpan={colSpan}>\n <CertificateSummary\n certificate={certificate}\n showIssuer={!certificate.isRoot}\n />\n </td>\n <td />\n </tr>\n );\n }\n\n private renderCertificatesRows() {\n const searchHighlight = this.highlightWithSearch\n ? this.search\n : '';\n const content = [];\n\n this.certificatesDecoded.forEach((certificate, index) => {\n const isExpandedRow = index === this.expandedRow;\n const publicKeyValue = OIDs[certificate.body.signature.algorithm]\n || certificate.body.signature.algorithm;\n\n if (this.filterWithSearch && this.search) {\n const certificateStringForSearch = [\n publicKeyValue,\n certificate.body.issuerCommonName,\n certificate.name,\n certificate.body.commonName,\n certificate.body.thumbprints['SHA-1'],\n ]\n .join(' ')\n .toLowerCase();\n\n if (certificateStringForSearch.indexOf(this.search.toLowerCase()) === -1) {\n return;\n }\n }\n\n if (this.mobileScreenView) {\n content.push([\n <tr\n class={{\n certificate_row: true,\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <table>\n <tbody>\n {!this.isHasRoots && (\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('issuer')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n )}\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('name')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('publicKey')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('fingerprint')}\n (SHA-1)\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n {isExpandedRow && this.renderExpandedRow(certificate.body)}\n <tr class=\"certificate_row_actions\">\n <td>\n {this.renderCertificateButtonActions(certificate)}\n <Button\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>,\n ]);\n\n return;\n }\n\n content.push([\n <tr\n class={{\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <Button\n class=\"button_table_cell\"\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n {!this.isHasRoots && (\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n )}\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n {this.renderCertificateButtonActions(certificate)}\n </td>\n </tr>,\n isExpandedRow && this.renderExpandedRow(certificate.body),\n ]);\n });\n\n return content;\n }\n\n private renderCertificateDetailsModal() {\n if (!this.certificateSelectedForDetails) {\n return null;\n }\n\n return (\n <div\n class=\"modal_wrapper\"\n role=\"presentation\"\n aria-hidden=\"false\"\n part=\"presentation\"\n >\n <div\n class=\"modal_backdrop\"\n onClick={this.handleModalClose}\n aria-hidden=\"true\"\n />\n <div\n class=\"modal_container\"\n role=\"dialog\"\n part=\"presentation_container\"\n >\n <header class=\"modal_header\">\n <Typography\n variant=\"h4\"\n >\n {l10n.getString('certificateDetails')}\n </Typography>\n <Button\n onClick={this.handleModalClose}\n startIcon={<CrossIcon />}\n />\n </header>\n <div class=\"modal_content\">\n <peculiar-certificate-viewer\n certificate={this.certificateSelectedForDetails}\n mobileMediaQueryString={this.mobileMediaQueryString}\n />\n </div>\n </div>\n </div>\n );\n }\n\n private renderSearch() {\n if (!this.filterWithSearch && !this.highlightWithSearch) {\n return null;\n }\n\n return (\n <div class=\"search_section\">\n <input\n onInput={this.handleSearch}\n type=\"search\"\n value=\"\"\n class=\"input_search t-b3 c-black\"\n disabled={!this.certificatesDecoded.length}\n placeholder=\"Search\"\n />\n </div>\n );\n }\n\n private renderEmptyState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n There are no certificates available.\n </Typography>\n </td>\n </tr>\n );\n }\n\n private renderEmptySearchState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n No results found for “\n {this.search}\n “\n </Typography>\n </td>\n </tr>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderLoadingState() {\n return (\n <div class=\"loading_container\">\n <peculiar-circular-progress />\n </div>\n );\n }\n\n private renderTableBody() {\n if (this.isDecodeInProcess) {\n return null;\n }\n\n if (!this.certificatesDecoded.length) {\n return this.renderEmptyState();\n }\n\n const certificatesRows = this.renderCertificatesRows();\n\n if (this.search && !certificatesRows.length) {\n return this.renderEmptySearchState();\n }\n\n return certificatesRows;\n }\n\n render() {\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n {this.renderSearch()}\n <table>\n {!this.mobileScreenView && (\n <thead>\n <tr>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n {!this.isHasRoots && (\n <th class=\"col_issuer\">\n <Typography variant=\"s2\">\n {l10n.getString('issuer')}\n </Typography>\n </th>\n )}\n <th class=\"col_name\">\n <Typography variant=\"s2\">\n {l10n.getString('name')}\n </Typography>\n </th>\n <th class=\"col_public_key\">\n <Typography variant=\"s2\">\n {l10n.getString('publicKey')}\n </Typography>\n </th>\n <th class=\"col_fingerprint\">\n <Typography variant=\"s2\">\n {l10n.getString('fingerprint')}\n (SHA-1)\n </Typography>\n </th>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n </tr>\n </thead>\n )}\n <tbody>\n {this.renderTableBody()}\n </tbody>\n </table>\n\n {this.renderCertificateDetailsModal()}\n {this.isDecodeInProcess && this.renderLoadingState()}\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;GAkBO,MAAMA,EAAoEC,IAC/E,MAAMC,YACJA,EAAWC,WACXA,GACEF,EAEJ,MAAMG,EAAY,CAACC,EAAyBC,IAC1CC,EAAA,UACEA,EAAA,UACEA,EAACC,EAAU,CACTC,QAAQ,KACRC,MAAM,UAELL,IAGLE,EAAA,UACEA,EAACC,EAAU,CACTC,QAAQ,KACRC,MAAM,SAELJ,KAMT,OACEC,EAAA,aACEA,EAAA,aACGH,EACCO,EAAKC,UAAU,eACfV,EAAYW,mBAEbV,GAAcC,EACbO,EAAKC,UAAU,cACfV,EAAYY,kBAGbV,EACCO,EAAKC,UAAU,gBACfV,EAAYa,cAEbX,EACCO,EAAKC,UAAU,WACfV,EAAYc,SAEbZ,EACCO,EAAKC,UAAU,YACfV,EAAYe,UAEbb,EAC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