@peculiar/certificates-viewer 4.6.1 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attribute-certificate-viewer.js +2 -2
- package/components/attribute.js +2 -1
- package/components/attribute.js.map +1 -1
- package/components/certificate-viewer.js +2 -2
- package/components/crl-viewer.js +2 -2
- package/components/csr-viewer.js +2 -2
- package/components/csr-viewer.js.map +1 -1
- package/components/download.js +19 -99
- package/components/download.js.map +1 -1
- package/components/index2.js +50 -2
- package/components/index2.js.map +1 -1
- package/components/miscellaneous.js +100 -2
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +1 -1
- package/components/peculiar-certificates-viewer.js +1 -1
- package/components/pkcs10_certificate_request.js +1 -6
- package/components/pkcs10_certificate_request.js.map +1 -1
- package/dist/cjs/{certification_request-CxHe71zR.js → certification_request-DISQwgjn.js} +72 -112
- package/dist/cjs/certification_request-DISQwgjn.js.map +1 -0
- package/dist/cjs/extension-CGZpfI3W.js +110 -0
- package/dist/cjs/extension-CGZpfI3W.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{miscellaneous-DeBEwLDy.js → miscellaneous-D_RAtkZz.js} +78 -77
- package/dist/cjs/{miscellaneous-DeBEwLDy.js.map → miscellaneous-D_RAtkZz.js.map} +1 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js +54 -5
- package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +5 -4
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -3
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -2
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
- package/dist/cjs/{pkcs10_certificate_request-CHMDxe2Z.js → pkcs10_certificate_request-BQkkkT42.js} +4 -8
- package/dist/cjs/pkcs10_certificate_request-BQkkkT42.js.map +1 -0
- package/dist/cjs/{x509_certificate-CzplJQ0X.js → x509_certificate-DGRpZGA2.js} +5 -4
- package/dist/cjs/{x509_certificate-CzplJQ0X.js.map → x509_certificate-DGRpZGA2.js.map} +1 -1
- package/dist/cjs/{x509_crl-B7kFbLDV.js → x509_crl-DMvJk_81.js} +8 -7
- package/dist/cjs/{x509_crl-B7kFbLDV.js.map → x509_crl-DMvJk_81.js.map} +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js +25 -0
- package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/index.js +10 -1
- package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js +27 -0
- package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js.map +1 -0
- package/dist/collection/components/csr-viewer/csr-viewer.js +2 -2
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
- package/dist/collection/constants/oids.js +2 -0
- package/dist/collection/constants/oids.js.map +1 -1
- package/dist/collection/crypto/attribute.js +2 -0
- package/dist/collection/crypto/attribute.js.map +1 -1
- package/dist/collection/crypto/pkcs10_certificate_request.js +0 -7
- package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
- package/dist/esm/{certification_request-PeMaLTUD.js → certification_request-CSS3OhZq.js} +21 -101
- package/dist/esm/certification_request-CSS3OhZq.js.map +1 -0
- package/dist/esm/extension-CUOKUt7o.js +107 -0
- package/dist/esm/extension-CUOKUt7o.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/{miscellaneous-bVeJt-6m.js → miscellaneous-DVlekgVM.js} +4 -3
- package/dist/esm/{miscellaneous-bVeJt-6m.js.map → miscellaneous-DVlekgVM.js.map} +1 -1
- package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js +54 -5
- package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-decoder.entry.js +5 -4
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +4 -3
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -2
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm/{pkcs10_certificate_request-CK8FH47X.js → pkcs10_certificate_request-B9Q42jiE.js} +4 -8
- package/dist/esm/pkcs10_certificate_request-B9Q42jiE.js.map +1 -0
- package/dist/esm/{x509_certificate-CEEWtU_T.js → x509_certificate-fWXLCtc8.js} +4 -3
- package/dist/{esm-es5/x509_certificate-CEEWtU_T.js.map → esm/x509_certificate-fWXLCtc8.js.map} +1 -1
- package/dist/esm/{x509_crl-BcZd9KVn.js → x509_crl-Dq33Vv-q.js} +5 -4
- package/dist/{esm-es5/x509_crl-BcZd9KVn.js.map → esm/x509_crl-Dq33Vv-q.js.map} +1 -1
- package/dist/esm-es5/{certification_request-PeMaLTUD.js → certification_request-CSS3OhZq.js} +5 -12
- package/dist/esm-es5/certification_request-CSS3OhZq.js.map +1 -0
- package/dist/esm-es5/extension-CUOKUt7o.js +12 -0
- package/dist/esm-es5/extension-CUOKUt7o.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{miscellaneous-bVeJt-6m.js → miscellaneous-DVlekgVM.js} +2 -2
- package/dist/esm-es5/{miscellaneous-bVeJt-6m.js.map → miscellaneous-DVlekgVM.js.map} +1 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js +17 -3
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm-es5/pkcs10_certificate_request-B9Q42jiE.js +19 -0
- package/dist/esm-es5/pkcs10_certificate_request-B9Q42jiE.js.map +1 -0
- package/dist/esm-es5/{x509_certificate-CEEWtU_T.js → x509_certificate-fWXLCtc8.js} +4 -4
- package/dist/{esm/x509_certificate-CEEWtU_T.js.map → esm-es5/x509_certificate-fWXLCtc8.js.map} +1 -1
- package/dist/esm-es5/{x509_crl-BcZd9KVn.js → x509_crl-Dq33Vv-q.js} +2 -2
- package/dist/{esm/x509_crl-BcZd9KVn.js.map → esm-es5/x509_crl-Dq33Vv-q.js.map} +1 -1
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/p-17ebc78c.system.entry.js +5 -0
- package/dist/peculiar/{p-14fcbc5c.system.entry.js.map → p-17ebc78c.system.entry.js.map} +1 -1
- package/dist/peculiar/{p-5479a530.entry.js → p-4cc72a56.entry.js} +2 -2
- package/dist/peculiar/p-7fTYvx_V.system.js +19 -0
- package/dist/peculiar/p-7fTYvx_V.system.js.map +1 -0
- package/dist/peculiar/p-BGASC3UX.system.js +1 -1
- package/dist/peculiar/{p-CjWRKsN-.js → p-BG_D4qzJ.js} +3 -3
- package/dist/peculiar/{p-CjWRKsN-.js.map → p-BG_D4qzJ.js.map} +1 -1
- package/dist/peculiar/{p-CZwhKPgb.system.js → p-BTn-wukS.system.js} +2 -2
- package/dist/peculiar/p-BTn-wukS.system.js.map +1 -0
- package/dist/peculiar/{p-BaebEpW0.system.js.map → p-Bsy7Sqzl.system.js.map} +1 -1
- package/dist/peculiar/{p-DRvp86xt.system.js → p-CEzxVCEh.system.js} +5 -5
- package/dist/peculiar/{p-DRvp86xt.system.js.map → p-CEzxVCEh.system.js.map} +1 -1
- package/dist/peculiar/{p-PeMaLTUD.js → p-CSS3OhZq.js} +9 -16
- package/dist/peculiar/p-CSS3OhZq.js.map +1 -0
- package/dist/peculiar/p-CZuaTO2G.js +12 -0
- package/dist/peculiar/p-CZuaTO2G.js.map +1 -0
- package/dist/peculiar/p-CgCUixvk.system.js +12 -0
- package/dist/peculiar/p-CgCUixvk.system.js.map +1 -0
- package/dist/peculiar/p-CoPYW15U.js +19 -0
- package/dist/peculiar/p-CoPYW15U.js.map +1 -0
- package/dist/peculiar/{p-BypepohK.system.js.map → p-D8TC0Na9.system.js.map} +1 -1
- package/dist/peculiar/p-DKooqn40.js +369 -0
- package/dist/peculiar/{p-CGRNSrHk.js.map → p-DKooqn40.js.map} +1 -1
- package/dist/peculiar/p-DLsQGkmT.system.js.map +1 -0
- package/dist/peculiar/{p-C9sY8yng.system.js → p-DTz3NA_M.system.js} +3 -3
- package/dist/peculiar/{p-C9sY8yng.system.js.map → p-DTz3NA_M.system.js.map} +1 -1
- package/dist/peculiar/p-D_WeukQa.system.js +135 -0
- package/dist/peculiar/p-D_WeukQa.system.js.map +1 -0
- package/dist/peculiar/{p-CezfC5i1.system.js → p-DcTXA-2R.system.js} +17 -17
- package/dist/peculiar/{p-CezfC5i1.system.js.map → p-DcTXA-2R.system.js.map} +1 -1
- package/dist/peculiar/{p-84f69023.system.entry.js → p-a193f8fd.system.entry.js} +2 -2
- package/dist/peculiar/p-a4e74904.entry.js +124 -0
- package/dist/peculiar/p-a4e74904.entry.js.map +1 -0
- package/dist/peculiar/p-ce006f1c.system.entry.js +5 -0
- package/dist/peculiar/{p-591a9019.system.entry.js.map → p-ce006f1c.system.entry.js.map} +1 -1
- package/dist/peculiar/p-e3967e76.entry.js +5 -0
- package/dist/peculiar/{p-0de4837d.entry.js.map → p-e3967e76.entry.js.map} +1 -1
- package/dist/peculiar/p-e7c60082.system.entry.js +125 -0
- package/dist/peculiar/p-e7c60082.system.entry.js.map +1 -0
- package/dist/peculiar/p-f465afe6.entry.js +5 -0
- package/dist/peculiar/{p-315805ce.entry.js.map → p-f465afe6.entry.js.map} +1 -1
- package/dist/peculiar/{p-BloT0Xj9.system.js.map → p-tBL0ekYY.system.js.map} +1 -1
- package/dist/peculiar/{p-DrmgUhyv.js → p-tl0v45Y7.js} +4 -4
- package/dist/peculiar/{p-DrmgUhyv.js.map → p-tl0v45Y7.js.map} +1 -1
- package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar-certificates-viewer.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-details-parts/attributes/extension_request_attribute.d.ts +15 -0
- package/dist/types/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.d.ts +15 -0
- package/dist/types/constants/oids.d.ts +2 -0
- package/dist/types/crypto/attribute.d.ts +2 -0
- package/dist/types/crypto/pkcs10_certificate_request.d.ts +0 -2
- package/hydrate/index.js +68 -6
- package/hydrate/index.mjs +68 -6
- package/package.json +3 -2
- package/dist/cjs/certification_request-CxHe71zR.js.map +0 -1
- package/dist/cjs/pkcs10_certificate_request-CHMDxe2Z.js.map +0 -1
- package/dist/esm/certification_request-PeMaLTUD.js.map +0 -1
- package/dist/esm/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
- package/dist/esm-es5/certification_request-PeMaLTUD.js.map +0 -1
- package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js +0 -19
- package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
- package/dist/peculiar/p-00d6f11f.system.entry.js +0 -111
- package/dist/peculiar/p-00d6f11f.system.entry.js.map +0 -1
- package/dist/peculiar/p-0de4837d.entry.js +0 -5
- package/dist/peculiar/p-14fcbc5c.system.entry.js +0 -5
- package/dist/peculiar/p-315805ce.entry.js +0 -5
- package/dist/peculiar/p-591a9019.system.entry.js +0 -5
- package/dist/peculiar/p-BipKYW6e.system.js +0 -142
- package/dist/peculiar/p-BipKYW6e.system.js.map +0 -1
- package/dist/peculiar/p-CGRNSrHk.js +0 -369
- package/dist/peculiar/p-CZwhKPgb.system.js.map +0 -1
- package/dist/peculiar/p-D1eNnGDF.js +0 -19
- package/dist/peculiar/p-D1eNnGDF.js.map +0 -1
- package/dist/peculiar/p-ITVWR0oT.system.js.map +0 -1
- package/dist/peculiar/p-J1t5v5N3.system.js +0 -19
- package/dist/peculiar/p-J1t5v5N3.system.js.map +0 -1
- package/dist/peculiar/p-PeMaLTUD.js.map +0 -1
- package/dist/peculiar/p-c8b3766a.entry.js +0 -110
- package/dist/peculiar/p-c8b3766a.entry.js.map +0 -1
- /package/dist/peculiar/{p-5479a530.entry.js.map → p-4cc72a56.entry.js.map} +0 -0
- /package/dist/peculiar/{p-84f69023.system.entry.js.map → p-a193f8fd.system.entry.js.map} +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,c as t,h as r,H as a}from"./p-CwgZaF40.js";import{a as o}from"./p-F2F0McJX.js";import{P as s,b as c,$ as i,a0 as n,a1 as v,a2 as p,a3 as l,e as h,C as d,a4 as b,D as g}from"./p-PeMaLTUD.js";import{X as f}from"./p-CjWRKsN-.js";import{X as y,a as w}from"./p-DrmgUhyv.js";import{P as x}from"./p-D1eNnGDF.js";import{T as u,B as m}from"./p-CutTi-2B.js";const z="1.2.840.113549.1.7.1";const k="1.2.840.113549.1.7.2";class C extends Array{constructor(e){super();const t=s.isPem(e)?s.decode(e).map((e=>c.Convert.ToBase64Url(e))):e.split(",");if(t.length<2){throw new Error("Unable to parse string. The array of elements is less than 2")}for(const e of t){this.push(new f(e))}}get commonName(){return Array.from(this).map((e=>e.commonName)).join("_")}get raw(){const e=new i;e.version=1;e.encapContentInfo.eContentType=z;e.encapContentInfo.eContent=new n({single:new v});e.certificates=new p(Array.from(this).map((e=>new l({certificate:h.parse(e.raw,d)}))));const t=new b({contentType:k,content:h.serialize(e)});return h.serialize(t)}toString(e="pem"){switch(e){case"pem":return Array.from(this).map((e=>e.toString("pem"))).join("\n");case"base64url":return Array.from(this).map((e=>e.toString("base64url"))).join(",");default:return Array.from(this).map((e=>e.toString("base64"))).join(",")}}downloadAsPEM(e){g.cert.asPEM(this.toString("pem"),e||this.commonName)}downloadAsDER(e){g.cert.asDER(this.raw,e||this.commonName)}}const j="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%}.textarea{min-height:300px;width:100%;border-radius:4px;border:1px solid var(--pv-color-gray-5);padding:14px;font-family:monospace;resize:vertical}.controls{margin-top:var(--pv-size-base-2);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-2);margin-bottom:var(--pv-size-base-12)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";const D=class{constructor(r){e(this,r);this.successParse=t(this,"successParse");this.clearCertificate=t(this,"clearCertificate");this.handleClickDecode=()=>{const{value:e}=this.inputPaste;if(e){this.decode(e)}};this.handleClickClear=()=>{this.clearValue()};this.handleChangeInputFile=async e=>{const t=e.target;if(t.files){const e=await o(t.files[0]);if(typeof e.value==="string"){this.decode(e.value)}t.value=""}};this.handleChangeExample=e=>{if(e.target.value){this.decode(e.target.value)}else{this.clearValue()}};this.handleDropFile=async e=>{e.stopPropagation();e.preventDefault();const t=e.dataTransfer;if(t.files){const e=await o(t.files[0]);if(typeof e.value==="string"){this.decode(e.value)}}}}componentDidLoad(){if(this.certificateToDecode){setTimeout((()=>this.decode(this.certificateToDecode)),100)}}clearValue(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()}setValue(e){this.certificateDecoded=e;this.inputPaste.value=e.toString("pem");this.successParse.emit(e.toString("base64url"))}decode(e){new Promise((t=>{t(new C(e))})).catch((()=>new f(e))).catch((()=>new y(e))).catch((()=>new x(e))).catch((()=>new w(e))).then((e=>this.setValue(e))).catch((t=>{console.log(t);alert(`Error decoding certificate:\n"${e}"\n\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.`)}))}renderCertificate(){if(this.certificateDecoded instanceof C){return r("peculiar-certificate-chain-viewer",{certificates:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof f){return r("peculiar-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof y){return r("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof x){return r("peculiar-csr-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof w){return r("peculiar-crl-viewer",{certificate:this.certificateDecoded,download:true})}return null}render(){var e;return r(a,{key:"2c4ec8c59145c494dee26f7e6eae99b10481f091"},r("textarea",{key:"88129c0b5c56b2458c4af2df6d746c25d4252fd2",placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:e=>{this.inputPaste=e},onDrop:this.handleDropFile}),r("div",{key:"3730b1bade8d27bb9bc1617018dc5bf01f9277ef",class:"controls"},r("div",{key:"b803986ab6d5bfaf5e61cd9df57428e6bff6bb55",class:"control_row"},r(u,{key:"e6ed2ea27f11d0957da4109e19483cd040febb01",variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),r("input",{key:"898d0fdd1de5f204337ab8bf77ad1dafd25da882",type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl",value:"",onChange:this.handleChangeInputFile})),((e=this.certificateExamples)===null||e===void 0?void 0:e.length)&&r("div",{key:"d6cf99bfc145f44fdfef32e52eb6afa8ec3836cf",class:"control_row"},r(u,{key:"4f7ff1b34fe34837909e328afdf401a5826d89f5",variant:"b3",color:"secondary-tint-2"},"Load examples:"),r("select",{key:"47c7433eefc2e82fb5dd9a30f062cc71104f7f5b",onChange:this.handleChangeExample},r("option",{key:"667a68723f7a22b954c1c89e1e86b85ddc6b4fd5",value:""},"None"),this.certificateExamples.map((e=>r("option",{value:e.value},e.title))))),r("div",{key:"e1fc1f00e7bb998d26a818fee955df9561f8e6c0",class:"control_row"},r(m,{key:"254fdd5ff25e644ba5d233d9cec2508a28e023c9",onClick:this.handleClickDecode},"Decode"),r(m,{key:"594d6e51c56a1b51440f6495eb85af0eda75bcef",onClick:this.handleClickClear},"Clear"))),this.renderCertificate())}};D.style=j;export{D as peculiar_certificate_decoder};
|
|
5
|
-
//# sourceMappingURL=p-315805ce.entry.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
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 o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();var __awaiter=this&&this.__awaiter||function(t,e,r,o){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,n){function c(t){try{s(o.next(t))}catch(t){n(t)}}function i(t){try{s(o["throw"](t))}catch(t){n(t)}}function s(t){t.done?r(t.value):a(t.value).then(c,i)}s((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,a,n,c;return c={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function i(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");while(c&&(c=0,i[0]&&(r=0)),r)try{if(o=1,a&&(n=i[0]&2?a["return"]:i[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;if(a=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;a=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){r.label=i[1];break}if(i[0]===6&&r.label<n[1]){r.label=n[1];n=i;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(i);break}if(n[2])r.ops.pop();r.trys.pop();continue}i=e.call(t,r)}catch(t){i=[6,t];a=0}finally{o=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
|
|
2
|
-
/*!
|
|
3
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
-
*/System.register(["./p-DKl0YViA.system.js","./p-D2QB-8Q6.system.js","./p-BipKYW6e.system.js","./p-C9sY8yng.system.js","./p-DRvp86xt.system.js","./p-J1t5v5N3.system.js","./p-B4PdAFCr.system.js"],(function(t){"use strict";var e,r,o,a,n,c,i,s,v,p,l,h,f,u,b,d,g,y,w,x,m,z;return{setters:[function(t){e=t.r;r=t.c;o=t.h;a=t.H},function(t){n=t.a},function(t){c=t.P;i=t.b;s=t.$;v=t.a0;p=t.a1;l=t.a2;h=t.a3;f=t.e;u=t.C;b=t.a4;d=t.D},function(t){g=t.X},function(t){y=t.X;w=t.a},function(t){x=t.P},function(t){m=t.T;z=t.B}],execute:function(){var k="1.2.840.113549.1.7.1";var _="1.2.840.113549.1.7.2";var j=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;var o=c.isPem(e)?c.decode(e).map((function(t){return i.Convert.ToBase64Url(t)})):e.split(",");if(o.length<2){throw new Error("Unable to parse string. The array of elements is less than 2")}for(var a=0,n=o;a<n.length;a++){var s=n[a];r.push(new g(s))}return r}Object.defineProperty(e.prototype,"commonName",{get:function(){return Array.from(this).map((function(t){return t.commonName})).join("_")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"raw",{get:function(){var t=new s;t.version=1;t.encapContentInfo.eContentType=k;t.encapContentInfo.eContent=new v({single:new p});t.certificates=new l(Array.from(this).map((function(t){return new h({certificate:f.parse(t.raw,u)})})));var e=new b({contentType:_,content:f.serialize(t)});return f.serialize(e)},enumerable:false,configurable:true});e.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return Array.from(this).map((function(t){return t.toString("pem")})).join("\n");case"base64url":return Array.from(this).map((function(t){return t.toString("base64url")})).join(",");default:return Array.from(this).map((function(t){return t.toString("base64")})).join(",")}};e.prototype.downloadAsPEM=function(t){d.cert.asPEM(this.toString("pem"),t||this.commonName)};e.prototype.downloadAsDER=function(t){d.cert.asDER(this.raw,t||this.commonName)};return e}(Array);var C="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%}.textarea{min-height:300px;width:100%;border-radius:4px;border:1px solid var(--pv-color-gray-5);padding:14px;font-family:monospace;resize:vertical}.controls{margin-top:var(--pv-size-base-2);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-2);margin-bottom:var(--pv-size-base-12)}.control_row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--pv-size-base)}";var A=t("peculiar_certificate_decoder",function(){function t(t){var o=this;e(this,t);this.successParse=r(this,"successParse");this.clearCertificate=r(this,"clearCertificate");this.handleClickDecode=function(){var t=o.inputPaste.value;if(t){o.decode(t)}};this.handleClickClear=function(){o.clearValue()};this.handleChangeInputFile=function(t){return __awaiter(o,void 0,void 0,(function(){var e,r;return __generator(this,(function(o){switch(o.label){case 0:e=t.target;if(!e.files)return[3,2];return[4,n(e.files[0])];case 1:r=o.sent();if(typeof r.value==="string"){this.decode(r.value)}e.value="";o.label=2;case 2:return[2]}}))}))};this.handleChangeExample=function(t){if(t.target.value){o.decode(t.target.value)}else{o.clearValue()}};this.handleDropFile=function(t){return __awaiter(o,void 0,void 0,(function(){var e,r;return __generator(this,(function(o){switch(o.label){case 0:t.stopPropagation();t.preventDefault();e=t.dataTransfer;if(!e.files)return[3,2];return[4,n(e.files[0])];case 1:r=o.sent();if(typeof r.value==="string"){this.decode(r.value)}o.label=2;case 2:return[2]}}))}))}}t.prototype.componentDidLoad=function(){var t=this;if(this.certificateToDecode){setTimeout((function(){return t.decode(t.certificateToDecode)}),100)}};t.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;this.clearCertificate.emit()};t.prototype.setValue=function(t){this.certificateDecoded=t;this.inputPaste.value=t.toString("pem");this.successParse.emit(t.toString("base64url"))};t.prototype.decode=function(t){var e=this;new Promise((function(e){e(new j(t))})).catch((function(){return new g(t)})).catch((function(){return new y(t)})).catch((function(){return new x(t)})).catch((function(){return new w(t)})).then((function(t){return e.setValue(t)})).catch((function(e){console.log(e);alert('Error decoding certificate:\n"'.concat(t,'"\n\nPlease try to use Certificate/AttributeCertificate/CertificateRequest/CRL.'))}))};t.prototype.renderCertificate=function(){if(this.certificateDecoded instanceof j){return o("peculiar-certificate-chain-viewer",{certificates:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof g){return o("peculiar-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof y){return o("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof x){return o("peculiar-csr-viewer",{certificate:this.certificateDecoded,download:true})}if(this.certificateDecoded instanceof w){return o("peculiar-crl-viewer",{certificate:this.certificateDecoded,download:true})}return null};t.prototype.render=function(){var t=this;var e;return o(a,{key:"2c4ec8c59145c494dee26f7e6eae99b10481f091"},o("textarea",{key:"88129c0b5c56b2458c4af2df6d746c25d4252fd2",placeholder:"Certificate DER or PEM",class:"textarea t-b2 c-black",ref:function(e){t.inputPaste=e},onDrop:this.handleDropFile}),o("div",{key:"3730b1bade8d27bb9bc1617018dc5bf01f9277ef",class:"controls"},o("div",{key:"b803986ab6d5bfaf5e61cd9df57428e6bff6bb55",class:"control_row"},o(m,{key:"e6ed2ea27f11d0957da4109e19483cd040febb01",variant:"b3",color:"secondary-tint-2"},"Drag or load file:"),o("input",{key:"898d0fdd1de5f204337ab8bf77ad1dafd25da882",type:"file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl",value:"",onChange:this.handleChangeInputFile})),((e=this.certificateExamples)===null||e===void 0?void 0:e.length)&&o("div",{key:"d6cf99bfc145f44fdfef32e52eb6afa8ec3836cf",class:"control_row"},o(m,{key:"4f7ff1b34fe34837909e328afdf401a5826d89f5",variant:"b3",color:"secondary-tint-2"},"Load examples:"),o("select",{key:"47c7433eefc2e82fb5dd9a30f062cc71104f7f5b",onChange:this.handleChangeExample},o("option",{key:"667a68723f7a22b954c1c89e1e86b85ddc6b4fd5",value:""},"None"),this.certificateExamples.map((function(t){return o("option",{value:t.value},t.title)})))),o("div",{key:"e1fc1f00e7bb998d26a818fee955df9561f8e6c0",class:"control_row"},o(z,{key:"254fdd5ff25e644ba5d233d9cec2508a28e023c9",onClick:this.handleClickDecode},"Decode"),o(z,{key:"594d6e51c56a1b51440f6495eb85af0eda75bcef",onClick:this.handleClickClear},"Clear"))),this.renderCertificate())};return t}());A.style=C}}}));
|
|
5
|
-
//# sourceMappingURL=p-591a9019.system.entry.js.map
|