@peculiar/certificates-viewer 3.0.1 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{certification_request-96951e7b.js → certification_request-43396146.js} +8 -3
- package/dist/cjs/{l10n-2e7def18.js → l10n-d4a77087.js} +6 -11
- package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +8 -4
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +1 -1
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -5
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +1 -3
- package/dist/collection/crypto/csr.js +3 -1
- package/dist/collection/crypto/utils.js +4 -1
- package/dist/collection/crypto/x509_attribute_certificate.js +3 -1
- package/dist/collection/crypto/x509_certificate.js +3 -1
- package/dist/collection/utils/date_formatter.js +3 -11
- package/dist/esm/{certification_request-48e8b956.js → certification_request-16ea346c.js} +8 -3
- package/dist/esm/{l10n-ead9928b.js → l10n-9ac63748.js} +6 -11
- package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +8 -4
- package/dist/esm/peculiar-certificate-summary_3.entry.js +1 -1
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -5
- package/dist/peculiar/p-7452b86e.entry.js +4 -0
- package/dist/peculiar/p-99797a49.js +34 -0
- package/dist/peculiar/{p-e5f99586.entry.js → p-b09a1f0b.entry.js} +1 -1
- package/dist/peculiar/{p-452d69af.entry.js → p-d0db9e70.entry.js} +3 -3
- package/dist/peculiar/{p-886e9c53.js → p-d7ed39f0.js} +3 -3
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/crypto/utils.d.ts +1 -1
- package/package.json +2 -2
- package/dist/peculiar/p-9ae6b1f8.entry.js +0 -4
- package/dist/peculiar/p-d09b762f.js +0 -33
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
const download = require('./download-5e7d5455.js');
|
|
7
|
-
const l10n = require('./l10n-
|
|
7
|
+
const l10n = require('./l10n-d4a77087.js');
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-cb1f949a.js');
|
|
9
9
|
|
|
10
10
|
/*!
|
|
@@ -10224,7 +10224,10 @@ const certificateRawToBuffer = (raw) => {
|
|
|
10224
10224
|
};
|
|
10225
10225
|
const getCertificateThumbprint = async (algorithm, data) => {
|
|
10226
10226
|
const crypto = cryptoProvider.get();
|
|
10227
|
-
|
|
10227
|
+
if (crypto.subtle) {
|
|
10228
|
+
return crypto.subtle.digest(algorithm, data);
|
|
10229
|
+
}
|
|
10230
|
+
return undefined;
|
|
10228
10231
|
};
|
|
10229
10232
|
|
|
10230
10233
|
/**
|
|
@@ -10300,7 +10303,9 @@ class X509Certificate extends AsnData {
|
|
|
10300
10303
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
10301
10304
|
try {
|
|
10302
10305
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
10303
|
-
|
|
10306
|
+
if (thumbprint) {
|
|
10307
|
+
this.thumbprints[algorithm['name'] || algorithm] = download.build.Convert.ToHex(thumbprint);
|
|
10308
|
+
}
|
|
10304
10309
|
}
|
|
10305
10310
|
catch (error) {
|
|
10306
10311
|
console.error('Error thumbprint get:', error);
|
|
@@ -630,6 +630,10 @@ var dayjs_min = _commonjsHelpers.createCommonjsModule(function (module, exports)
|
|
|
630
630
|
!function(t,e){module.exports=e();}(_commonjsHelpers.commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",D={};D[v]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(v=i),i||!r&&v},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var v=this.$locale().weekStart||0,D=(y<v?y+7:y)-v;return $(r?m-D:m+(6-D),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,v=O.m(this,M);return v=(l={},l[c]=v/12,l[f]=v,l[h]=v/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?v:O.a(v)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[v],w.Ls=D,w.p={},w}));
|
|
631
631
|
});
|
|
632
632
|
|
|
633
|
+
var relativeTime = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
634
|
+
!function(r,e){module.exports=e();}(_commonjsHelpers.commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
|
|
635
|
+
});
|
|
636
|
+
|
|
633
637
|
/**
|
|
634
638
|
* @license
|
|
635
639
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -637,6 +641,7 @@ var dayjs_min = _commonjsHelpers.createCommonjsModule(function (module, exports)
|
|
|
637
641
|
* This source code is licensed under the MIT license found in the
|
|
638
642
|
* LICENSE file in the root directory of this source tree.
|
|
639
643
|
*/
|
|
644
|
+
dayjs_min.extend(relativeTime);
|
|
640
645
|
const dateShort = (date) => (new Date(date).toUTCString());
|
|
641
646
|
const dateDiff = (dateStart, dateEnd) => {
|
|
642
647
|
if (!dateStart || !dateEnd) {
|
|
@@ -644,17 +649,7 @@ const dateDiff = (dateStart, dateEnd) => {
|
|
|
644
649
|
}
|
|
645
650
|
const start = dayjs_min(dateStart);
|
|
646
651
|
const end = dayjs_min(dateEnd);
|
|
647
|
-
|
|
648
|
-
const diffYears = end.diff(start, 'year', true);
|
|
649
|
-
if (Number.isInteger(diffYears)) {
|
|
650
|
-
return `${diffYears} year${ending(diffYears)}`;
|
|
651
|
-
}
|
|
652
|
-
const diffMonth = end.diff(start, 'month', true);
|
|
653
|
-
if (Number.isInteger(diffMonth)) {
|
|
654
|
-
return `${diffMonth} month${ending(diffMonth)}`;
|
|
655
|
-
}
|
|
656
|
-
const diffDays = end.diff(start, 'day');
|
|
657
|
-
return `${diffDays} day${ending(diffDays)}`;
|
|
652
|
+
return start.to(end, true);
|
|
658
653
|
};
|
|
659
654
|
|
|
660
655
|
const basicInformation = "Basic Information";
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-064e95c7.js');
|
|
9
|
-
const certification_request = require('./certification_request-
|
|
9
|
+
const certification_request = require('./certification_request-43396146.js');
|
|
10
10
|
const download = require('./download-5e7d5455.js');
|
|
11
|
-
const l10n = require('./l10n-
|
|
11
|
+
const l10n = require('./l10n-d4a77087.js');
|
|
12
12
|
require('./_commonjsHelpers-cb1f949a.js');
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -157,7 +157,9 @@ class X509AttributeCertificate extends certification_request.AsnData {
|
|
|
157
157
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
158
158
|
try {
|
|
159
159
|
const thumbprint = await certification_request.getCertificateThumbprint(algorithm, this.raw);
|
|
160
|
-
|
|
160
|
+
if (thumbprint) {
|
|
161
|
+
this.thumbprints[algorithm['name'] || algorithm] = download.build.Convert.ToHex(thumbprint);
|
|
162
|
+
}
|
|
161
163
|
}
|
|
162
164
|
catch (error) {
|
|
163
165
|
console.error('Error thumbprint get:', error);
|
|
@@ -231,7 +233,9 @@ class CSR extends certification_request.AsnData {
|
|
|
231
233
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
232
234
|
try {
|
|
233
235
|
const thumbprint = await certification_request.getCertificateThumbprint(algorithm, this.raw);
|
|
234
|
-
|
|
236
|
+
if (thumbprint) {
|
|
237
|
+
this.thumbprints[algorithm['name'] || algorithm] = download.build.Convert.ToHex(thumbprint);
|
|
238
|
+
}
|
|
235
239
|
}
|
|
236
240
|
catch (error) {
|
|
237
241
|
console.error('Error thumbprint get:', error);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-064e95c7.js');
|
|
9
|
-
const l10n = require('./l10n-
|
|
9
|
+
const l10n = require('./l10n-d4a77087.js');
|
|
10
10
|
require('./_commonjsHelpers-cb1f949a.js');
|
|
11
11
|
|
|
12
12
|
const certificateSummaryCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}td{border:none;padding:0}table{width:100%;border-spacing:0;border-collapse:collapse}td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td:first-child{width:130px;padding-right:10px}table td:last-child{width:calc(100% - 130px)}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{width:100%}}";
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-064e95c7.js');
|
|
9
|
-
const certification_request = require('./certification_request-
|
|
9
|
+
const certification_request = require('./certification_request-43396146.js');
|
|
10
10
|
const download = require('./download-5e7d5455.js');
|
|
11
|
-
const l10n = require('./l10n-
|
|
11
|
+
const l10n = require('./l10n-d4a77087.js');
|
|
12
12
|
require('./_commonjsHelpers-cb1f949a.js');
|
|
13
13
|
|
|
14
14
|
const certificatesViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:\"\"}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}";
|
|
@@ -175,9 +175,7 @@ const CertificatesViewer = class {
|
|
|
175
175
|
content.push([
|
|
176
176
|
index.h("tr", { class: {
|
|
177
177
|
expanded: isExpandedRow,
|
|
178
|
-
}, onClick: this.handleClickRow.bind(this, index$1),
|
|
179
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
180
|
-
key: index$1 }, !this.isHasRoots && (index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('issuer'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.issuerCommonName)))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('name'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.name || certificate.body.commonName))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('publicKey'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, publicKeyValue))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('fingerprint'), "\u00A0 (SHA-1):"), index.h("peculiar-typography", { class: "content", monospace: true }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.thumbprints['SHA-1']))), index.h("td", { class: "align_center" }, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('actions'), ":"), index.h("span", { class: "content" }, index.h("peculiar-button", { onClick: this.handleClickDetails.bind(this, certificate.body), class: "button_table_action" }, l10n.l10n.getString('details')), index.h("peculiar-button-split", { onClick: this.handleClickDownloadAsPem.bind(this, certificate), actions: [{
|
|
178
|
+
}, onClick: this.handleClickRow.bind(this, index$1), key: certificate.body.thumbprints['SHA-1'] }, !this.isHasRoots && (index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('issuer'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.issuerCommonName)))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('name'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.name || certificate.body.commonName))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('publicKey'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, publicKeyValue))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('fingerprint'), "\u00A0 (SHA-1):"), index.h("peculiar-typography", { class: "content", monospace: true }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.thumbprints['SHA-1']))), index.h("td", { class: "align_center" }, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('actions'), ":"), index.h("span", { class: "content" }, index.h("peculiar-button", { onClick: this.handleClickDetails.bind(this, certificate.body), class: "button_table_action" }, l10n.l10n.getString('details')), index.h("peculiar-button-split", { onClick: this.handleClickDownloadAsPem.bind(this, certificate), actions: [{
|
|
181
179
|
text: l10n.l10n.getString('download.der'),
|
|
182
180
|
onClick: this.handleClickDownloadAsDer.bind(this, certificate),
|
|
183
181
|
}], class: "button_table_action" }, l10n.l10n.getString('download.pem')))), this.isHasTests && (index.h("td", { class: "align_center" }, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('testURLs'), ":"), index.h("span", { class: "content" }, this.renderCertificateTests(certificate.tests))))),
|
|
@@ -174,9 +174,7 @@ export class CertificatesViewer {
|
|
|
174
174
|
content.push([
|
|
175
175
|
h("tr", { class: {
|
|
176
176
|
expanded: isExpandedRow,
|
|
177
|
-
}, onClick: this.handleClickRow.bind(this, index),
|
|
178
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
179
|
-
key: index },
|
|
177
|
+
}, onClick: this.handleClickRow.bind(this, index), key: certificate.body.thumbprints['SHA-1'] },
|
|
180
178
|
!this.isHasRoots && (h("td", null,
|
|
181
179
|
h("peculiar-typography", { class: "mobile_title", color: "grey_5" },
|
|
182
180
|
l10n.getString('issuer'),
|
|
@@ -64,7 +64,9 @@ export class CSR extends AsnData {
|
|
|
64
64
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
65
65
|
try {
|
|
66
66
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
67
|
-
|
|
67
|
+
if (thumbprint) {
|
|
68
|
+
this.thumbprints[algorithm['name'] || algorithm] = Convert.ToHex(thumbprint);
|
|
69
|
+
}
|
|
68
70
|
}
|
|
69
71
|
catch (error) {
|
|
70
72
|
console.error('Error thumbprint get:', error);
|
|
@@ -30,5 +30,8 @@ export const certificateRawToBuffer = (raw) => {
|
|
|
30
30
|
};
|
|
31
31
|
export const getCertificateThumbprint = async (algorithm, data) => {
|
|
32
32
|
const crypto = cryptoProvider.get();
|
|
33
|
-
|
|
33
|
+
if (crypto.subtle) {
|
|
34
|
+
return crypto.subtle.digest(algorithm, data);
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
34
37
|
};
|
|
@@ -63,7 +63,9 @@ export class X509AttributeCertificate extends AsnData {
|
|
|
63
63
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
64
64
|
try {
|
|
65
65
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
66
|
-
|
|
66
|
+
if (thumbprint) {
|
|
67
|
+
this.thumbprints[algorithm['name'] || algorithm] = Convert.ToHex(thumbprint);
|
|
68
|
+
}
|
|
67
69
|
}
|
|
68
70
|
catch (error) {
|
|
69
71
|
console.error('Error thumbprint get:', error);
|
|
@@ -84,7 +84,9 @@ export class X509Certificate extends AsnData {
|
|
|
84
84
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
85
85
|
try {
|
|
86
86
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
87
|
-
|
|
87
|
+
if (thumbprint) {
|
|
88
|
+
this.thumbprints[algorithm['name'] || algorithm] = Convert.ToHex(thumbprint);
|
|
89
|
+
}
|
|
88
90
|
}
|
|
89
91
|
catch (error) {
|
|
90
92
|
console.error('Error thumbprint get:', error);
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
11
|
import dayjs from 'dayjs';
|
|
12
|
+
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
13
|
+
dayjs.extend(relativeTime);
|
|
12
14
|
export const dateShort = (date) => (new Date(date).toUTCString());
|
|
13
15
|
export const dateDiff = (dateStart, dateEnd) => {
|
|
14
16
|
if (!dateStart || !dateEnd) {
|
|
@@ -16,15 +18,5 @@ export const dateDiff = (dateStart, dateEnd) => {
|
|
|
16
18
|
}
|
|
17
19
|
const start = dayjs(dateStart);
|
|
18
20
|
const end = dayjs(dateEnd);
|
|
19
|
-
|
|
20
|
-
const diffYears = end.diff(start, 'year', true);
|
|
21
|
-
if (Number.isInteger(diffYears)) {
|
|
22
|
-
return `${diffYears} year${ending(diffYears)}`;
|
|
23
|
-
}
|
|
24
|
-
const diffMonth = end.diff(start, 'month', true);
|
|
25
|
-
if (Number.isInteger(diffMonth)) {
|
|
26
|
-
return `${diffMonth} month${ending(diffMonth)}`;
|
|
27
|
-
}
|
|
28
|
-
const diffDays = end.diff(start, 'day');
|
|
29
|
-
return `${diffDays} day${ending(diffDays)}`;
|
|
21
|
+
return start.to(end, true);
|
|
30
22
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { b as build } from './download-cf68ac2c.js';
|
|
5
|
-
import { d as dateDiff } from './l10n-
|
|
5
|
+
import { d as dateDiff } from './l10n-9ac63748.js';
|
|
6
6
|
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-bfbd2ad8.js';
|
|
7
7
|
|
|
8
8
|
/*!
|
|
@@ -10222,7 +10222,10 @@ const certificateRawToBuffer = (raw) => {
|
|
|
10222
10222
|
};
|
|
10223
10223
|
const getCertificateThumbprint = async (algorithm, data) => {
|
|
10224
10224
|
const crypto = cryptoProvider.get();
|
|
10225
|
-
|
|
10225
|
+
if (crypto.subtle) {
|
|
10226
|
+
return crypto.subtle.digest(algorithm, data);
|
|
10227
|
+
}
|
|
10228
|
+
return undefined;
|
|
10226
10229
|
};
|
|
10227
10230
|
|
|
10228
10231
|
/**
|
|
@@ -10298,7 +10301,9 @@ class X509Certificate extends AsnData {
|
|
|
10298
10301
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
10299
10302
|
try {
|
|
10300
10303
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
10301
|
-
|
|
10304
|
+
if (thumbprint) {
|
|
10305
|
+
this.thumbprints[algorithm['name'] || algorithm] = build.Convert.ToHex(thumbprint);
|
|
10306
|
+
}
|
|
10302
10307
|
}
|
|
10303
10308
|
catch (error) {
|
|
10304
10309
|
console.error('Error thumbprint get:', error);
|
|
@@ -628,6 +628,10 @@ var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
|
628
628
|
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",D={};D[v]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(v=i),i||!r&&v},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var v=this.$locale().weekStart||0,D=(y<v?y+7:y)-v;return $(r?m-D:m+(6-D),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,v=O.m(this,M);return v=(l={},l[c]=v/12,l[f]=v,l[h]=v/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?v:O.a(v)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[v],w.Ls=D,w.p={},w}));
|
|
629
629
|
});
|
|
630
630
|
|
|
631
|
+
var relativeTime = createCommonjsModule(function (module, exports) {
|
|
632
|
+
!function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
|
|
633
|
+
});
|
|
634
|
+
|
|
631
635
|
/**
|
|
632
636
|
* @license
|
|
633
637
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -635,6 +639,7 @@ var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
|
635
639
|
* This source code is licensed under the MIT license found in the
|
|
636
640
|
* LICENSE file in the root directory of this source tree.
|
|
637
641
|
*/
|
|
642
|
+
dayjs_min.extend(relativeTime);
|
|
638
643
|
const dateShort = (date) => (new Date(date).toUTCString());
|
|
639
644
|
const dateDiff = (dateStart, dateEnd) => {
|
|
640
645
|
if (!dateStart || !dateEnd) {
|
|
@@ -642,17 +647,7 @@ const dateDiff = (dateStart, dateEnd) => {
|
|
|
642
647
|
}
|
|
643
648
|
const start = dayjs_min(dateStart);
|
|
644
649
|
const end = dayjs_min(dateEnd);
|
|
645
|
-
|
|
646
|
-
const diffYears = end.diff(start, 'year', true);
|
|
647
|
-
if (Number.isInteger(diffYears)) {
|
|
648
|
-
return `${diffYears} year${ending(diffYears)}`;
|
|
649
|
-
}
|
|
650
|
-
const diffMonth = end.diff(start, 'month', true);
|
|
651
|
-
if (Number.isInteger(diffMonth)) {
|
|
652
|
-
return `${diffMonth} month${ending(diffMonth)}`;
|
|
653
|
-
}
|
|
654
|
-
const diffDays = end.diff(start, 'day');
|
|
655
|
-
return `${diffDays} day${ending(diffDays)}`;
|
|
650
|
+
return start.to(end, true);
|
|
656
651
|
};
|
|
657
652
|
|
|
658
653
|
const basicInformation = "Basic Information";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { h, r as registerInstance, H as Host, c as createEvent } from './index-bbd484d9.js';
|
|
5
|
-
import { A as AsnData, a as Attribute$1, i as id_pkcs9_at_extensionRequest, b as AsnParser, E as ExtensionRequest, c as Extension, d as AsnConvert, e as id_pkcs9_at_unstructuredName, U as UnstructuredName, f as id_pkcs9_at_challengePassword, C as ChallengePassword, g as id_ValuationRanking, V as ValuationRanking, h as id_InsuranceValue, I as InsuranceValue, j as id_WebGDPR, W as WebGDPR, k as id_ActivityDescription, l as ActivityDescription, m as id_TypeRelationship, T as TypeRelationship, n as id_DomainNameTechnicalOperator, D as DomainNameTechnicalOperator, o as id_DomainNameOwner, p as DomainNameOwner, q as id_DomainNameLegalRepresentative, r as DomainNameLegalRepresentative, s as id_DomainNameBeneficiary, t as DomainNameBeneficiary, u as certificateRawToBuffer, v as AttributeCertificate, w as getCertificateThumbprint, x as hexFormat, y as base64Format, z as CertificationRequest, N as Name, B as id_ecPublicKey, F as ECParameters, G as id_rsaEncryption, R as RSAPublicKey, O as OIDs, H as Name$1, J as OtherName, K as DisplayText, L as UserNotice, M as EDIPartyName, P as AsnIntegerArrayBufferConverter, Q as KeyUsage, S as BasicConstraints, X as ExtendedKeyUsage, Y as SubjectKeyIdentifier, Z as AuthorityKeyIdentifier, _ as CRLDistributionPoints, $ as AuthorityInfoAccessSyntax, a0 as SubjectInfoAccessSyntax, a1 as SubjectAlternativeName, a2 as CertificatePolicies, a3 as CertificateTransparency, a4 as NameConstraints, a5 as CertificateTemplate, a6 as EnrollCertTypeChoice, a7 as CaVersion, a8 as QCStatements, a9 as NetscapeComment, aa as NetscapeCertType, ab as LeiRole, ac as LeiChoice, ad as Timestamp, ae as ArchiveRevInfo, af as CRLReason, ag as SubjectDirectoryAttributes, ah as PrivateKeyUsagePeriod, ai as EntrustVersionInfo, aj as BiometricSyntax, ak as LogotypeExtn, al as TNAuthorizationList, am as PolicyConstraints, an as PolicyMappings, ao as isPem, ap as isX509Pem, aq as isPkcs10Pem, ar as isX509AttributePem, as as X509Certificate } from './certification_request-
|
|
5
|
+
import { A as AsnData, a as Attribute$1, i as id_pkcs9_at_extensionRequest, b as AsnParser, E as ExtensionRequest, c as Extension, d as AsnConvert, e as id_pkcs9_at_unstructuredName, U as UnstructuredName, f as id_pkcs9_at_challengePassword, C as ChallengePassword, g as id_ValuationRanking, V as ValuationRanking, h as id_InsuranceValue, I as InsuranceValue, j as id_WebGDPR, W as WebGDPR, k as id_ActivityDescription, l as ActivityDescription, m as id_TypeRelationship, T as TypeRelationship, n as id_DomainNameTechnicalOperator, D as DomainNameTechnicalOperator, o as id_DomainNameOwner, p as DomainNameOwner, q as id_DomainNameLegalRepresentative, r as DomainNameLegalRepresentative, s as id_DomainNameBeneficiary, t as DomainNameBeneficiary, u as certificateRawToBuffer, v as AttributeCertificate, w as getCertificateThumbprint, x as hexFormat, y as base64Format, z as CertificationRequest, N as Name, B as id_ecPublicKey, F as ECParameters, G as id_rsaEncryption, R as RSAPublicKey, O as OIDs, H as Name$1, J as OtherName, K as DisplayText, L as UserNotice, M as EDIPartyName, P as AsnIntegerArrayBufferConverter, Q as KeyUsage, S as BasicConstraints, X as ExtendedKeyUsage, Y as SubjectKeyIdentifier, Z as AuthorityKeyIdentifier, _ as CRLDistributionPoints, $ as AuthorityInfoAccessSyntax, a0 as SubjectInfoAccessSyntax, a1 as SubjectAlternativeName, a2 as CertificatePolicies, a3 as CertificateTransparency, a4 as NameConstraints, a5 as CertificateTemplate, a6 as EnrollCertTypeChoice, a7 as CaVersion, a8 as QCStatements, a9 as NetscapeComment, aa as NetscapeCertType, ab as LeiRole, ac as LeiChoice, ad as Timestamp, ae as ArchiveRevInfo, af as CRLReason, ag as SubjectDirectoryAttributes, ah as PrivateKeyUsagePeriod, ai as EntrustVersionInfo, aj as BiometricSyntax, ak as LogotypeExtn, al as TNAuthorizationList, am as PolicyConstraints, an as PolicyMappings, ao as isPem, ap as isX509Pem, aq as isPkcs10Pem, ar as isX509AttributePem, as as X509Certificate } from './certification_request-16ea346c.js';
|
|
6
6
|
import { b as build, D as Download } from './download-cf68ac2c.js';
|
|
7
|
-
import { d as dateDiff, l as l10n, a as dateShort, h as history } from './l10n-
|
|
7
|
+
import { d as dateDiff, l as l10n, a as dateShort, h as history } from './l10n-9ac63748.js';
|
|
8
8
|
import './_commonjsHelpers-bfbd2ad8.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -153,7 +153,9 @@ class X509AttributeCertificate extends AsnData {
|
|
|
153
153
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
154
154
|
try {
|
|
155
155
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
156
|
-
|
|
156
|
+
if (thumbprint) {
|
|
157
|
+
this.thumbprints[algorithm['name'] || algorithm] = build.Convert.ToHex(thumbprint);
|
|
158
|
+
}
|
|
157
159
|
}
|
|
158
160
|
catch (error) {
|
|
159
161
|
console.error('Error thumbprint get:', error);
|
|
@@ -227,7 +229,9 @@ class CSR extends AsnData {
|
|
|
227
229
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
228
230
|
try {
|
|
229
231
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
230
|
-
|
|
232
|
+
if (thumbprint) {
|
|
233
|
+
this.thumbprints[algorithm['name'] || algorithm] = build.Convert.ToHex(thumbprint);
|
|
234
|
+
}
|
|
231
235
|
}
|
|
232
236
|
catch (error) {
|
|
233
237
|
console.error('Error thumbprint get:', error);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-bbd484d9.js';
|
|
5
|
-
import { l as l10n, a as dateShort } from './l10n-
|
|
5
|
+
import { l as l10n, a as dateShort } from './l10n-9ac63748.js';
|
|
6
6
|
import './_commonjsHelpers-bfbd2ad8.js';
|
|
7
7
|
|
|
8
8
|
const certificateSummaryCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}td{border:none;padding:0}table{width:100%;border-spacing:0;border-collapse:collapse}td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td:first-child{width:130px;padding-right:10px}table td:last-child{width:calc(100% - 130px)}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{width:100%}}";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-bbd484d9.js';
|
|
5
|
-
import { as as X509Certificate, O as OIDs } from './certification_request-
|
|
5
|
+
import { as as X509Certificate, O as OIDs } from './certification_request-16ea346c.js';
|
|
6
6
|
import { D as Download } from './download-cf68ac2c.js';
|
|
7
|
-
import { l as l10n } from './l10n-
|
|
7
|
+
import { l as l10n } from './l10n-9ac63748.js';
|
|
8
8
|
import './_commonjsHelpers-bfbd2ad8.js';
|
|
9
9
|
|
|
10
10
|
const certificatesViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:\"\"}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}";
|
|
@@ -171,9 +171,7 @@ const CertificatesViewer = class {
|
|
|
171
171
|
content.push([
|
|
172
172
|
h("tr", { class: {
|
|
173
173
|
expanded: isExpandedRow,
|
|
174
|
-
}, onClick: this.handleClickRow.bind(this, index),
|
|
175
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
176
|
-
key: index }, !this.isHasRoots && (h("td", null, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('issuer'), ":"), h("peculiar-typography", { class: "content" }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.issuerCommonName)))), h("td", null, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('name'), ":"), h("peculiar-typography", { class: "content" }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.name || certificate.body.commonName))), h("td", null, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('publicKey'), ":"), h("peculiar-typography", { class: "content" }, h("peculiar-highlight-words", { search: searchHighlight }, publicKeyValue))), h("td", null, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('fingerprint'), "\u00A0 (SHA-1):"), h("peculiar-typography", { class: "content", monospace: true }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.thumbprints['SHA-1']))), h("td", { class: "align_center" }, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('actions'), ":"), h("span", { class: "content" }, h("peculiar-button", { onClick: this.handleClickDetails.bind(this, certificate.body), class: "button_table_action" }, l10n.getString('details')), h("peculiar-button-split", { onClick: this.handleClickDownloadAsPem.bind(this, certificate), actions: [{
|
|
174
|
+
}, onClick: this.handleClickRow.bind(this, index), key: certificate.body.thumbprints['SHA-1'] }, !this.isHasRoots && (h("td", null, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('issuer'), ":"), h("peculiar-typography", { class: "content" }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.issuerCommonName)))), h("td", null, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('name'), ":"), h("peculiar-typography", { class: "content" }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.name || certificate.body.commonName))), h("td", null, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('publicKey'), ":"), h("peculiar-typography", { class: "content" }, h("peculiar-highlight-words", { search: searchHighlight }, publicKeyValue))), h("td", null, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('fingerprint'), "\u00A0 (SHA-1):"), h("peculiar-typography", { class: "content", monospace: true }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.thumbprints['SHA-1']))), h("td", { class: "align_center" }, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('actions'), ":"), h("span", { class: "content" }, h("peculiar-button", { onClick: this.handleClickDetails.bind(this, certificate.body), class: "button_table_action" }, l10n.getString('details')), h("peculiar-button-split", { onClick: this.handleClickDownloadAsPem.bind(this, certificate), actions: [{
|
|
177
175
|
text: l10n.getString('download.der'),
|
|
178
176
|
onClick: this.handleClickDownloadAsDer.bind(this, certificate),
|
|
179
177
|
}], class: "button_table_action" }, l10n.getString('download.pem')))), this.isHasTests && (h("td", { class: "align_center" }, h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.getString('testURLs'), ":"), h("span", { class: "content" }, this.renderCertificateTests(certificate.tests))))),
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{as as a,O as i}from"./p-d7ed39f0.js";import{D as l}from"./p-c774ec0b.js";import{l as s}from"./p-99797a49.js";import"./p-d0b55fbb.js";const c=class{constructor(e){t(this,e),this.detailsOpen=r(this,"detailsOpen",7),this.detailsClose=r(this,"detailsClose",7),this.certificates=[],this.filterWithSearch=!0,this.highlightWithSearch=!0,this.search="",this.certificatesDecoded=[],this.isDecodeInProcess=!0,this.isHasTests=!1,this.isHasRoots=!1,this.handleClickDetails=(t,r)=>{r.stopPropagation(),this.certificateSelectedForDetails=t,this.detailsOpen.emit(t)},this.handleModalClose=()=>{this.certificateSelectedForDetails=void 0,this.detailsClose.emit()},this.handleSearch=t=>{this.search=t.target.value.trim()}}componentWillLoad(){this.certificatesDecodeAndSet()}watchCertificates(t,r){JSON.stringify(t)!==JSON.stringify(r)&&this.certificatesDecodeAndSet()}async certificatesDecodeAndSet(){let t=!1,r=!1;if(!Array.isArray(this.certificates))return;const e=[];for(const o of this.certificates)try{const i=new a(o.value);await i.getThumbprint("SHA-1"),e.push({body:i,tests:o.tests,name:o.name}),!r&&i.isRoot&&(r=!0),t||o.tests&&(o.tests.expired||o.tests.revoked||o.tests.valid)&&(t=!0)}catch(t){console.error("Error certificate parse:",t)}this.isHasTests=t,this.isHasRoots=r,this.isDecodeInProcess=!1,this.certificatesDecoded=e}handleClickDownloadAsPem(t,r){r.stopPropagation(),l.x509.asPEM(t.body.exportAsPemFormatted(),t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),l.x509.asPEM(t.body.exportAsHexFormatted(),t.name||t.body.commonName)}handleClickRow(t){this.expandedRow=this.expandedRow===t?void 0:t}getMaxColSpanValue(){let t=4;return this.isHasTests&&(t+=1),this.isHasRoots||(t+=1),t}renderExpandedRow(t){const r=this.getMaxColSpanValue();return e("tr",{class:"expanded_summary"},e("td",{colSpan:r},e("peculiar-certificate-summary",{certificate:t,showIssuer:!t.isRoot})))}renderCertificateTests(t){if(!t)return null;const r=[];return t.valid&&r.push(e("peculiar-button",{class:"button_table_action",href:t.valid,target:"_blank"},s.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},s.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},s.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const l=a===this.expandedRow,c=i[o.body.signature.algorithm]||o.body.signature.algorithm;this.filterWithSearch&&this.search&&-1===[c,o.body.issuerCommonName,o.name,o.body.commonName,o.body.thumbprints["SHA-1"]].join(" ").toLowerCase().indexOf(this.search.toLowerCase())||r.push([e("tr",{class:{expanded:l},onClick:this.handleClickRow.bind(this,a),key:o.body.thumbprints["SHA-1"]},!this.isHasRoots&&e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("issuer"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.body.issuerCommonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("name"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.name||o.body.commonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("publicKey"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},c))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("fingerprint")," (SHA-1):"),e("peculiar-typography",{class:"content",monospace:!0},e("peculiar-highlight-words",{search:t},o.body.thumbprints["SHA-1"]))),e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},s.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:s.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},s.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),l&&this.renderExpandedRow(o.body)])})),r}renderCertificateDetailsModal(){return this.certificateSelectedForDetails?e("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},e("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),e("div",{class:"modal_container",role:"dialog",part:"presentation_container"},e("header",{class:"modal_title"},e("peculiar-typography",{type:"h4"},s.getString("certificateDetails")),e("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},e("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z"})))),e("div",{class:"modal_content"},e("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails})))):null}renderSearch(){return this.filterWithSearch||this.highlightWithSearch?e("div",{class:"search_section"},e("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"})):null}renderEmptyState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))}renderEmptySearchState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))}renderLoadingState(){return e("div",{class:"loading_container"},e("peculiar-circular-progress",null))}renderBody(){if(this.isDecodeInProcess)return null;if(!this.certificatesDecoded.length)return this.renderEmptyState();const t=this.renderContentState();return this.search&&!t.length?this.renderEmptySearchState():t}render(){return e(o,null,this.renderSearch(),e("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},e("thead",null,e("tr",null,!this.isHasRoots&&e("th",{class:"col_issuer"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("fingerprint")," (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},s.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},s.getString("testURLs"))))),e("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};c.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}';export{c as peculiar_certificates_viewer}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{c as n,a as t}from"./p-d0b55fbb.js";function r(){return(r=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n}).apply(this,arguments)}function i(n){return"/"===n.charAt(0)}function e(n,t){for(var r=t,i=r+1,e=n.length;i<e;r+=1,i+=1)n[r]=n[i];n.pop()}function o(n,t,o,u){var s;"string"==typeof n?(s=function(n){var t=n||"/",r="",i="",e=t.indexOf("#");-1!==e&&(i=t.substr(e),t=t.substr(0,e));var o=t.indexOf("?");return-1!==o&&(r=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===r?"":r,hash:"#"===i?"":i}}(n)).state=t:(void 0===(s=r({},n)).pathname&&(s.pathname=""),s.search?"?"!==s.search.charAt(0)&&(s.search="?"+s.search):s.search="",s.hash?"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash):s.hash="",void 0!==t&&void 0===s.state&&(s.state=t));try{s.pathname=decodeURI(s.pathname)}catch(n){throw n instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):n}return o&&(s.key=o),u?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=function(n,t){void 0===t&&(t="");var r,o=n&&n.split("/")||[],u=t&&t.split("/")||[],s=n&&i(n),a=t&&i(t),c=s||a;if(n&&i(n)?u=o:o.length&&(u.pop(),u=u.concat(o)),!u.length)return"/";if(u.length){var f=u[u.length-1];r="."===f||".."===f||""===f}else r=!1;for(var h=0,d=u.length;d>=0;d--){var l=u[d];"."===l?e(u,d):".."===l?(e(u,d),h++):h&&(e(u,d),h--)}if(!c)for(;h--;h)u.unshift("..");!c||""===u[0]||u[0]&&i(u[0])||u.unshift("");var v=u.join("/");return r&&"/"!==v.substr(-1)&&(v+="/"),v}(s.pathname,u.pathname)):s.pathname=u.pathname:s.pathname||(s.pathname="/"),s}var u=!("undefined"==typeof window||!window.document||!window.document.createElement);function s(n,t){t(window.confirm(n))}function a(){try{return window.history.state||{}}catch(n){return{}}}
|
|
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
|
+
const c=function(n){void 0===n&&(n={}),u||function(){throw new Error("Invariant failed")}();var t,i,e=window.history,c=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,f=!(-1===window.navigator.userAgent.indexOf("Trident")),h=n.forceRefresh,d=void 0!==h&&h,l=n.getUserConfirmation,v=void 0===l?s:l,w=n.keyLength,y=void 0===w?6:w,m=n.basename?function(n){return"/"===n.charAt(n.length-1)?n.slice(0,-1):n}("/"===(i=n.basename).charAt(0)?i:"/"+i):"";function p(n){var t=n||{},r=t.key,i=t.state,e=window.location,u=e.pathname+e.search+e.hash;return m&&(u=function(n,t){return function(n,t){return 0===n.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(n.charAt(t.length))}(n,t)?n.substr(t.length):n}(u,m)),o(u,i,r)}function M(){return Math.random().toString(36).substr(2,y)}var g,D,b=(g=null,D=[],{setPrompt:function(n){return g=n,function(){g===n&&(g=null)}},confirmTransitionTo:function(n,t,r,i){if(null!=g){var e="function"==typeof g?g(n,t):g;"string"==typeof e?"function"==typeof r?r(e,i):i(!0):i(!1!==e)}else i(!0)},appendListener:function(n){var t=!0;function r(){t&&n.apply(void 0,arguments)}return D.push(r),function(){t=!1,D=D.filter((function(n){return n!==r}))}},notifyListeners:function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];D.forEach((function(n){return n.apply(void 0,t)}))}});function S(n){r(E,n),E.length=e.length,b.notifyListeners(E.location,E.action)}function _(n){(function(n){return void 0===n.state&&-1===navigator.userAgent.indexOf("CriOS")})(n)||$(p(n.state))}function I(){$(p(a()))}var P=!1;function $(n){P?(P=!1,S()):b.confirmTransitionTo(n,"POP",v,(function(t){t?S({action:"POP",location:n}):function(n){var t=A.indexOf(E.location.key);-1===t&&(t=0);var r=A.indexOf(n.key);-1===r&&(r=0);var i=t-r;i&&(P=!0,T(i))}(n)}))}var H=p(a()),A=[H.key];function N(n){return m+function(n){var t=n.search,r=n.hash,i=n.pathname||"/";return t&&"?"!==t&&(i+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}(n)}function T(n){e.go(n)}var Y=0;function k(n){1===(Y+=n)&&1===n?(window.addEventListener("popstate",_),f&&window.addEventListener("hashchange",I)):0===Y&&(window.removeEventListener("popstate",_),f&&window.removeEventListener("hashchange",I))}var C=!1,E={length:e.length,action:"POP",location:H,createHref:N,push:function(n,t){var r="PUSH",i=o(n,t,M(),E.location);b.confirmTransitionTo(i,r,v,(function(n){if(n){var t=N(i);if(c)if(e.pushState({key:i.key,state:i.state},null,t),d)window.location.href=t;else{var o=A.indexOf(E.location.key),u=A.slice(0,o+1);u.push(i.key),A=u,S({action:r,location:i})}else window.location.href=t}}))},replace:function(n,t){var r="REPLACE",i=o(n,t,M(),E.location);b.confirmTransitionTo(i,r,v,(function(n){if(n){var t=N(i);if(c)if(e.replaceState({key:i.key,state:i.state},null,t),d)window.location.replace(t);else{var o=A.indexOf(E.location.key);-1!==o&&(A[o]=i.key),S({action:r,location:i})}else window.location.replace(t)}}))},go:T,goBack:function(){T(-1)},goForward:function(){T(1)},block:function(n){void 0===n&&(n=!1);var t=b.setPrompt(n);return C||(k(1),C=!0),function(){return C&&(C=!1,k(-1)),t()}},listen:function(n){var t=b.appendListener(n);return k(1),function(){k(-1),t()}}};return E}
|
|
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
|
+
*/(),f=Object.assign(c,{parseHash:function(n=window.location.hash){if(!n.length)return{};const t=n.replace(/^(#|\?)?\/?/,"").split("&"),r={};for(let n=0;n<t.length;n+=1){const i=t[n].split("=");try{r[i[0]]=i[1]&&decodeURIComponent(i[1])}catch(n){console.warn(n)}}return r}
|
|
20
|
+
/**
|
|
21
|
+
* @license
|
|
22
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/,queryStringify:function(n){const t=[];return Object.keys(n).forEach((r=>{"string"!=typeof n[r]&&"boolean"!=typeof n[r]&&"number"!=typeof n[r]||t.push(`${r}=${encodeURIComponent(n[r])}`)})),t.join("&")}});var h=n((function(n){n.exports=function(){var n=6e4,t=36e5,r="millisecond",i="second",e="minute",o="hour",u="day",s="week",a="month",c="quarter",f="year",h="date",d="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},y=function(n,t,r){var i=String(n);return!i||i.length>=t?n:""+Array(t+1-i.length).join(r)+n},m={s:y,z:function(n){var t=-n.utcOffset(),r=Math.abs(t),i=Math.floor(r/60),e=r%60;return(t<=0?"+":"-")+y(i,2,"0")+":"+y(e,2,"0")},m:function n(t,r){if(t.date()<r.date())return-n(r,t);var i=12*(r.year()-t.year())+(r.month()-t.month()),e=t.clone().add(i,a),o=r-e<0,u=t.clone().add(i+(o?-1:1),a);return+(-(i+(r-e)/(o?e-u:u-e))||0)},a:function(n){return n<0?Math.ceil(n)||0:Math.floor(n)},p:function(n){return{M:a,y:f,w:s,d:u,D:h,h:o,m:e,s:i,ms:r,Q:c}[n]||String(n||"").toLowerCase().replace(/s$/,"")},u:function(n){return void 0===n}},p="en",M={};M[p]=w;var g=function(n){return n instanceof _},D=function n(t,r,i){var e;if(!t)return p;if("string"==typeof t){var o=t.toLowerCase();M[o]&&(e=o),r&&(M[o]=r,e=o);var u=t.split("-");if(!e&&u.length>1)return n(u[0])}else{var s=t.name;M[s]=t,e=s}return!i&&e&&(p=e),e||!i&&p},b=function(n,t){if(g(n))return n.clone();var r="object"==typeof t?t:{};return r.date=n,r.args=arguments,new _(r)},S=m;S.l=D,S.i=g,S.w=function(n,t){return b(n,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var _=function(){function w(n){this.$L=D(n.locale,null,!0),this.parse(n)}var y=w.prototype;return y.parse=function(n){this.$d=function(n){var t=n.date,r=n.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(l);if(i){var e=i[2]-1||0,o=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)}(n),this.$x=n.x||{},this.init()},y.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},y.$utils=function(){return S},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(n,t){var r=b(n);return this.startOf(t)<=r&&r<=this.endOf(t)},y.isAfter=function(n,t){return b(n)<this.startOf(t)},y.isBefore=function(n,t){return this.endOf(t)<b(n)},y.$g=function(n,t,r){return S.u(n)?this[t]:this.set(r,n)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(n,t){var r=this,c=!!S.u(t)||t,d=S.p(n),l=function(n,t){var i=S.w(r.$u?Date.UTC(r.$y,t,n):new Date(r.$y,t,n),r);return c?i:i.endOf(u)},v=function(n,t){return S.w(r.toDate()[n].apply(r.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},w=this.$W,y=this.$M,m=this.$D,p="set"+(this.$u?"UTC":"");switch(d){case f:return c?l(1,0):l(31,11);case a:return c?l(1,y):l(0,y+1);case s:var M=this.$locale().weekStart||0,g=(w<M?w+7:w)-M;return l(c?m-g:m+(6-g),y);case u:case h:return v(p+"Hours",0);case o:return v(p+"Minutes",1);case e:return v(p+"Seconds",2);case i:return v(p+"Milliseconds",3);default:return this.clone()}},y.endOf=function(n){return this.startOf(n,!1)},y.$set=function(n,t){var s,c=S.p(n),d="set"+(this.$u?"UTC":""),l=(s={},s[u]=d+"Date",s[h]=d+"Date",s[a]=d+"Month",s[f]=d+"FullYear",s[o]=d+"Hours",s[e]=d+"Minutes",s[i]=d+"Seconds",s[r]=d+"Milliseconds",s)[c],v=c===u?this.$D+(t-this.$W):t;if(c===a||c===f){var w=this.clone().set(h,1);w.$d[l](v),w.init(),this.$d=w.set(h,Math.min(this.$D,w.daysInMonth())).$d}else l&&this.$d[l](v);return this.init(),this},y.set=function(n,t){return this.clone().$set(n,t)},y.get=function(n){return this[S.p(n)]()},y.add=function(r,c){var h,d=this;r=Number(r);var l=S.p(c),v=function(n){var t=b(d);return S.w(t.date(t.date()+Math.round(n*r)),d)};if(l===a)return this.set(a,this.$M+r);if(l===f)return this.set(f,this.$y+r);if(l===u)return v(1);if(l===s)return v(7);var w=(h={},h[e]=n,h[o]=t,h[i]=1e3,h)[l]||1,y=this.$d.getTime()+r*w;return S.w(y,this)},y.subtract=function(n,t){return this.add(-1*n,t)},y.format=function(n){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var i=n||"YYYY-MM-DDTHH:mm:ssZ",e=S.z(this),o=this.$H,u=this.$m,s=this.$M,a=r.weekdays,c=r.months,f=function(n,r,e,o){return n&&(n[r]||n(t,i))||e[r].slice(0,o)},h=function(n){return S.s(o%12||12,n,"0")},l=r.meridiem||function(n,t,r){var i=n<12?"AM":"PM";return r?i.toLowerCase():i},w={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:f(r.monthsShort,s,c,3),MMMM:f(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:f(r.weekdaysMin,this.$W,a,2),ddd:f(r.weekdaysShort,this.$W,a,3),dddd:a[this.$W],H:String(o),HH:S.s(o,2,"0"),h:h(1),hh:h(2),a:l(o,u,!0),A:l(o,u,!1),m:String(u),mm:S.s(u,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:e};return i.replace(v,(function(n,t){return t||w[n]||e.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,h,d){var l,v=S.p(h),w=b(r),y=(w.utcOffset()-this.utcOffset())*n,m=this-w,p=S.m(this,w);return p=(l={},l[f]=p/12,l[a]=p,l[c]=p/3,l[s]=(m-y)/6048e5,l[u]=(m-y)/864e5,l[o]=m/t,l[e]=m/n,l[i]=m/1e3,l)[v]||m,d?p:S.a(p)},y.daysInMonth=function(){return this.endOf(a).$D},y.$locale=function(){return M[this.$L]},y.locale=function(n,t){if(!n)return this.$L;var r=this.clone(),i=D(n,t,!0);return i&&(r.$L=i),r},y.clone=function(){return S.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},w}(),I=_.prototype;return b.prototype=I,[["$ms",r],["$s",i],["$m",e],["$H",o],["$W",u],["$M",a],["$y",f],["$D",h]].forEach((function(n){I[n[1]]=function(t){return this.$g(t,n[0],n[1])}})),b.extend=function(n,t){return n.$i||(n(t,_,b),n.$i=!0),b},b.locale=D,b.isDayjs=g,b.unix=function(n){return b(1e3*n)},b.en=M[p],b.Ls=M,b.p={},b}()})),d=n((function(n){n.exports=function(n,t,r){n=n||{};var i=t.prototype,e={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(n,t,r,e){return i.fromToBase(n,t,r,e)}r.en.relativeTime=e,i.fromToBase=function(t,i,o,u,s){for(var a,c,f,h=o.$locale().relativeTime||e,d=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=d.length,v=0;v<l;v+=1){var w=d[v];w.d&&(a=u?r(t).diff(o,w.d,!0):o.diff(t,w.d,!0));var y=(n.rounding||Math.round)(Math.abs(a));if(f=a>0,y<=w.r||!w.r){y<=1&&v>0&&(w=d[v-1]);var m=h[w.l];s&&(y=s(""+y)),c="string"==typeof m?m.replace("%d",y):m(y,i,w.l,f);break}}if(i)return c;var p=f?h.future:h.past;return"function"==typeof p?p(c):p.replace("%s",c)},i.to=function(n,t){return o(n,t,this,!0)},i.from=function(n,t){return o(n,t,this)};var u=function(n){return n.$u?r.utc():r()};i.toNow=function(n){return this.to(u(this),n)},i.fromNow=function(n){return this.from(u(this),n)}}}));
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/
|
|
34
|
+
h.extend(d);const l=n=>new Date(n).toUTCString(),v=(n,t)=>{if(!n||!t)return"";const r=h(n),i=h(t);return r.to(i,!0)},w={en:{basicInformation:"Basic Information",subjectName:"Subject Name",issuerName:"Issuer Name",publicKeyInfo:"Public Key Info",signature:"Signature",extensions:"Extensions",miscellaneous:"Miscellaneous",download:"Download","download.pem":"Download PEM","download.der":"Download DER",serialNumber:"Serial Number",version:"Version",validity:"Validity",issued:"Issued",expired:"Expired",algorithm:"Algorithm",namedCurve:"Named Curve",exponent:"Exponent",modulus:"Modulus",value:"Value",valid:"Valid",revoked:"Revoked",issuer:"Issuer",name:"Name",publicKey:"Public Key",fingerprint:"Fingerprint",fingerprints:"Fingerprints",actions:"Actions",details:"Details",testURLs:"Test URLs",certificateDetails:"Certificate Details",holder:"Holder",digestInfo:"Digest Info",type:"Type"}},y=new class{constructor(){this.setLocale=n=>{this.locale=n&&w[n]?n:"en"},this.getLocale=()=>this.locale;const n=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(n)}getString(n,t){const r=w[this.locale][n];if(!r)return"";if(!t)return r;const i=r.split(t.pattern);return i.length>1?[i[0],t.replacer,i[1]]:r}};export{l as a,v as d,f as h,y as l}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as r,H as s,g as i}from"./p-f7683ba5.js";import{l as e,a as o}from"./p-
|
|
4
|
+
import{r as t,h as r,H as s,g as i}from"./p-f7683ba5.js";import{l as e,a as o}from"./p-99797a49.js";import"./p-d0b55fbb.js";const a=class{constructor(r){t(this,r),this.showIssuer=!0}renderRow(t,s,i){return r("tr",null,r("td",null,r("peculiar-typography",{color:"grey_5"},t,":")),r("td",null,r("peculiar-typography",{class:"meta_value",monospace:i},s)))}render(){return r(s,null,r("table",null,r("tbody",null,this.renderRow(e.getString("subjectName"),this.certificate.subjectToString()),this.showIssuer&&this.renderRow(e.getString("issuerName"),this.certificate.issuerToString()),this.renderRow(e.getString("serialNumber"),this.certificate.serialNumber,!0),this.renderRow(e.getString("version"),this.certificate.version),this.renderRow(e.getString("validity"),this.certificate.validity),this.renderRow(e.getString("issued"),o(this.certificate.notBefore)),this.renderRow(e.getString("expired"),o(this.certificate.notAfter)))))}};a.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}td{border:none;padding:0}table{width:100%;border-spacing:0;border-collapse:collapse}td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td:first-child{width:130px;padding-right:10px}table td:last-child{width:calc(100% - 130px)}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{width:100%}}";const h=class{constructor(r){t(this,r),this.size=24,this.width=4,this.box=50}render(){return r(s,null,r("div",{class:"circle_progress",style:{width:`${this.size}px`,height:`${this.size}px`}},r("svg",{class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},r("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`}}),r("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=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}: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:#3584f7;stroke:rgba(var(--pv-color-primary-rgb), 1)}.circle_progress_backdrop{stroke:#d1d5d9;stroke:rgba(var(--pv-color-grey_3-rgb), 1)}";const l=class{constructor(r){t(this,r),this.tag="mark"}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let r=t;if(this.search){const s=new RegExp(`(${this.search})`,"gi");r=t.replace(s,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=r}resetHighlightSearch(t){const r=new RegExp(`</?${this.tag}>`,"g");return t.replace(r,"")}render(){return r(s,null,r("slot",null))}get host(){return i(this)}};l.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline}::slotted(mark){background-color:rgba(247, 168, 49, 0.4);background-color:rgba(var(--pv-color-attention-rgb), 0.4)}";export{a as peculiar_certificate_summary,h as peculiar_circular_progress,l as peculiar_highlight_words}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,r as t,H as a,c as i}from"./p-f7683ba5.js";import{A as n,a as o,i as r,b as s,E as l,c,d,e as b,U as p,f as h,C as u,g as f,V as g,h as m,I as v,j as x,W as y,k as w,l as k,m as _,T as C,n as z,D as A,o as S,p as I,q as N,r as L,s as D,t as j,u as E,v as T,w as K,x as P,y as O,z as G,N as $,B as R,F as V,G as H,R as q,O as B,H as F,J as U,K as Y,L as M,M as X,P as W,Q,S as J,X as Z,Y as ee,Z as te,_ as ae,$ as ie,a0 as ne,a1 as oe,a2 as re,a3 as se,a4 as le,a5 as ce,a6 as de,a7 as be,a8 as pe,a9 as he,aa as ue,ab as fe,ac as ge,ad as me,ae as ve,af as xe,ag as ye,ah as we,ai as ke,aj as _e,ak as Ce,al as ze,am as Ae,an as Se,ao as Ie,ap as Ne,aq as Le,ar as De,as as je}from"./p-
|
|
4
|
+
import{h as e,r as t,H as a,c as i}from"./p-f7683ba5.js";import{A as n,a as o,i as r,b as s,E as l,c,d,e as b,U as p,f as h,C as u,g as f,V as g,h as m,I as v,j as x,W as y,k as w,l as k,m as _,T as C,n as z,D as A,o as S,p as I,q as N,r as L,s as D,t as j,u as E,v as T,w as K,x as P,y as O,z as G,N as $,B as R,F as V,G as H,R as q,O as B,H as F,J as U,K as Y,L as M,M as X,P as W,Q,S as J,X as Z,Y as ee,Z as te,_ as ae,$ as ie,a0 as ne,a1 as oe,a2 as re,a3 as se,a4 as le,a5 as ce,a6 as de,a7 as be,a8 as pe,a9 as he,aa as ue,ab as fe,ac as ge,ad as me,ae as ve,af as xe,ag as ye,ah as we,ai as ke,aj as _e,ak as Ce,al as ze,am as Ae,an as Se,ao as Ie,ap as Ne,aq as Le,ar as De,as as je}from"./p-d7ed39f0.js";import{b as Ee,D as Te}from"./p-c774ec0b.js";import{d as Ke,l as Pe,a as Oe,h as Ge}from"./p-99797a49.js";import"./p-d0b55fbb.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -22,14 +22,14 @@ import{h as e,r as t,H as a,c as i}from"./p-f7683ba5.js";import{A as n,a as o,i
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/class Ve extends n{constructor(e){var t;super(E(e),T),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:a}=this.asn;this.serialNumber=Ee.Convert.ToHex(a.serialNumber),this.version=a.version;const i=a.attrCertValidityPeriod.notBeforeTime;if(!i)throw new Error("Cannot get 'notBefore' value");this.notBefore=i;const n=a.attrCertValidityPeriod.notAfterTime;if(!n)throw new Error("Cannot get 'notAfter' value");this.notAfter=n,this.validity=Ke(this.notBefore,this.notAfter),this.issuer=a.issuer.v1Form||(null===(t=a.issuer.v2Form)||void 0===t?void 0:t.issuerName),this.holder=a.holder}get signature(){const{signatureValue:e,signatureAlgorithm:t}=this.asn;return{value:e,algorithm:t.algorithm}}parseExtensions(){const{acinfo:e}=this.asn;e.extensions&&(this.extensions=e.extensions.map((e=>new c(d.serialize(e)))))}parseAttributes(){const{acinfo:e}=this.asn;e.attributes&&(this.attributes=e.attributes.map((e=>new Re(d.serialize(e)))))}async getThumbprint(e="SHA-1"){try{const t=await K(e,this.raw);this.thumbprints[e.name||e]=Ee.Convert.ToHex(t)}catch(e){console.error("Error thumbprint get:",e)}}exportAsBase64(){return Ee.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(Ee.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${O(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}}
|
|
25
|
+
*/class Ve extends n{constructor(e){var t;super(E(e),T),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:a}=this.asn;this.serialNumber=Ee.Convert.ToHex(a.serialNumber),this.version=a.version;const i=a.attrCertValidityPeriod.notBeforeTime;if(!i)throw new Error("Cannot get 'notBefore' value");this.notBefore=i;const n=a.attrCertValidityPeriod.notAfterTime;if(!n)throw new Error("Cannot get 'notAfter' value");this.notAfter=n,this.validity=Ke(this.notBefore,this.notAfter),this.issuer=a.issuer.v1Form||(null===(t=a.issuer.v2Form)||void 0===t?void 0:t.issuerName),this.holder=a.holder}get signature(){const{signatureValue:e,signatureAlgorithm:t}=this.asn;return{value:e,algorithm:t.algorithm}}parseExtensions(){const{acinfo:e}=this.asn;e.extensions&&(this.extensions=e.extensions.map((e=>new c(d.serialize(e)))))}parseAttributes(){const{acinfo:e}=this.asn;e.attributes&&(this.attributes=e.attributes.map((e=>new Re(d.serialize(e)))))}async getThumbprint(e="SHA-1"){try{const t=await K(e,this.raw);t&&(this.thumbprints[e.name||e]=Ee.Convert.ToHex(t))}catch(e){console.error("Error thumbprint get:",e)}}exportAsBase64(){return Ee.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(Ee.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${O(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}}
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the MIT license found in the
|
|
31
31
|
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/class He extends n{constructor(e){super(E(e),G),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:t}=this.asn;this.subject=new $(t.subject).toJSON(),this.version=t.version}get publicKey(){const{subjectPublicKey:e,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;return t.algorithm===R&&t.parameters&&(a=d.parse(t.parameters,V)),t.algorithm===H&&(a=d.parse(e,q)),{params:a,value:d.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:t.algorithm}}get signature(){const{signature:e,signatureAlgorithm:t}=this.asn;return{value:e,algorithm:t.algorithm}}get commonName(){if(!this.subject)return"";for(let e=0;e<this.subject.length;e+=1){const t=this.subject[e];if("CN"===t.shortName||"E"===t.shortName||"O"===t.shortName)return t.value}return""}async getThumbprint(e="SHA-1"){try{const t=await K(e,this.raw);this.thumbprints[e.name||e]=Ee.Convert.ToHex(t)}catch(e){console.error("Error thumbprint get:",e)}}parseAttributes(){const{certificationRequestInfo:e}=this.asn;e.attributes&&(this.attributes=e.attributes.map((e=>new Re(d.serialize(e)))))}exportAsBase64(){return Ee.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(Ee.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${O(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}}
|
|
32
|
+
*/class He extends n{constructor(e){super(E(e),G),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:t}=this.asn;this.subject=new $(t.subject).toJSON(),this.version=t.version}get publicKey(){const{subjectPublicKey:e,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;return t.algorithm===R&&t.parameters&&(a=d.parse(t.parameters,V)),t.algorithm===H&&(a=d.parse(e,q)),{params:a,value:d.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:t.algorithm}}get signature(){const{signature:e,signatureAlgorithm:t}=this.asn;return{value:e,algorithm:t.algorithm}}get commonName(){if(!this.subject)return"";for(let e=0;e<this.subject.length;e+=1){const t=this.subject[e];if("CN"===t.shortName||"E"===t.shortName||"O"===t.shortName)return t.value}return""}async getThumbprint(e="SHA-1"){try{const t=await K(e,this.raw);t&&(this.thumbprints[e.name||e]=Ee.Convert.ToHex(t))}catch(e){console.error("Error thumbprint get:",e)}}parseAttributes(){const{certificationRequestInfo:e}=this.asn;e.attributes&&(this.attributes=e.attributes.map((e=>new Re(d.serialize(e)))))}exportAsBase64(){return Ee.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(Ee.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${O(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}}
|
|
33
33
|
/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{b as t}from"./p-c774ec0b.js";import{d as e}from"./p-
|
|
4
|
+
import{b as t}from"./p-c774ec0b.js";import{d as e}from"./p-99797a49.js";import{c as i,a as r}from"./p-d0b55fbb.js";
|
|
5
5
|
/*!
|
|
6
6
|
Copyright (c) Peculiar Ventures, LLC
|
|
7
7
|
*/function s(t,e){let i=0;if(1===t.length)return t[0];for(let r=t.length-1;r>=0;r--)i+=t[t.length-1-r]*Math.pow(2,e*r);return i}function n(t,e,i=-1){const r=i;let s=t,n=0,o=Math.pow(2,e);for(let i=1;i<8;i++){if(t<o){let t;if(r<0)t=new ArrayBuffer(i),n=i;else{if(r<i)return new ArrayBuffer(0);t=new ArrayBuffer(r),n=r}const o=new Uint8Array(t);for(let t=i-1;t>=0;t--){const i=Math.pow(2,t*e);o[n-t-1]=Math.floor(s/i),s-=o[n-t-1]*i}return t}o*=Math.pow(2,e)}return new ArrayBuffer(0)}function o(...t){let e=0,i=0;for(const i of t)e+=i.length;const r=new ArrayBuffer(e),s=new Uint8Array(r);for(const e of t)s.set(e,i),i+=e.length;return s}function a(){const t=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){const e=0===t[0]&&0==(128&t[1]);(255===t[0]&&128&t[1]||e)&&this.warnings.push("Needlessly long format")}const e=new ArrayBuffer(this.valueHex.byteLength),i=new Uint8Array(e);for(let t=0;t<this.valueHex.byteLength;t++)i[t]=0;i[0]=128&t[0];const r=s(i,8),n=new ArrayBuffer(this.valueHex.byteLength),o=new Uint8Array(n);for(let e=0;e<this.valueHex.byteLength;e++)o[e]=t[e];return o[0]&=127,s(o,8)-r}function c(t,e){const i=t.toString(10);if(e<i.length)return"";const r=e-i.length,s=new Array(r);for(let t=0;t<r;t++)s[t]="0";return s.join("").concat(i)}
|
|
@@ -76,7 +76,7 @@ class gn extends mn{constructor(e){super(e,Qi);const i=this.getAsnExtnValue();tr
|
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the MIT license found in the
|
|
78
78
|
* LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/class vn{constructor(){this.providers=new Map;const t=window.crypto||window.msCrypto;void 0!==t&&this.set(vn.DEFAULT,t)}static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}get(t=vn.DEFAULT){const e=this.providers.get(t.toLowerCase());if(!e)throw new Error(`Cannot get Crypto by name '${t}'`);return e}set(t,e){if("string"==typeof t){if(!e)throw new TypeError("Argument 'value' is required");this.providers.set(t.toLowerCase(),e)}else this.providers.set(vn.DEFAULT,t);return this}}vn.DEFAULT="default";const En=new vn,wn=t=>t.replace(/(.{32})/g,"$1\n").replace(/(.{4})/g,"$1 ").trim(),Pn=t=>t.replace(/(.{64})/g,"$1\n"),Dn=e=>{const i=e.replace(/.*base64,/,"").replace(/-----.+-----/g,"").replace(/[\s\r\n]/g,"");let r;return r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(i)?t.Convert.FromHex(i):(t=>{try{return window.atob(t),!0}catch(t){return!1}})(i)||xr(i)?t.Convert.FromBase64(i):t.Convert.FromBinary(e),r},bn=async(t,e)=>En.get().subtle.digest(t,e);
|
|
79
|
+
*/class vn{constructor(){this.providers=new Map;const t=window.crypto||window.msCrypto;void 0!==t&&this.set(vn.DEFAULT,t)}static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}get(t=vn.DEFAULT){const e=this.providers.get(t.toLowerCase());if(!e)throw new Error(`Cannot get Crypto by name '${t}'`);return e}set(t,e){if("string"==typeof t){if(!e)throw new TypeError("Argument 'value' is required");this.providers.set(t.toLowerCase(),e)}else this.providers.set(vn.DEFAULT,t);return this}}vn.DEFAULT="default";const En=new vn,wn=t=>t.replace(/(.{32})/g,"$1\n").replace(/(.{4})/g,"$1 ").trim(),Pn=t=>t.replace(/(.{64})/g,"$1\n"),Dn=e=>{const i=e.replace(/.*base64,/,"").replace(/-----.+-----/g,"").replace(/[\s\r\n]/g,"");let r;return r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(i)?t.Convert.FromHex(i):(t=>{try{return window.atob(t),!0}catch(t){return!1}})(i)||xr(i)?t.Convert.FromBase64(i):t.Convert.FromBinary(e),r},bn=async(t,e)=>{const i=En.get();if(i.subtle)return i.subtle.digest(t,e)};
|
|
80
80
|
/**
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -84,4 +84,4 @@ class gn extends mn{constructor(e){super(e,Qi);const i=this.getAsnExtnValue();tr
|
|
|
84
84
|
* This source code is licensed under the MIT license found in the
|
|
85
85
|
* LICENSE file in the root directory of this source tree.
|
|
86
86
|
*/
|
|
87
|
-
class Bn extends mn{constructor(i){super(Dn(i),Ji),this.thumbprints={},this.type="X.509 Certificate";const{tbsCertificate:r}=this.asn;this.serialNumber=t.Convert.ToHex(r.serialNumber),this.subject=new _r(r.subject).toJSON(),this.issuer=new _r(r.issuer).toJSON(),this.version=r.version+1;const s=r.validity.notBefore.utcTime||r.validity.notBefore.generalTime;if(!s)throw new Error("Cannot get 'notBefore' value");this.notBefore=s;const n=r.validity.notAfter.utcTime||r.validity.notAfter.generalTime;if(!n)throw new Error("Cannot get 'notAfter' value");this.notAfter=n,this.validity=e(this.notBefore,this.notAfter)}parseExtensions(){const{tbsCertificate:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new gn(Se.serialize(t)))))}get publicKey(){const{subjectPublicKey:t,algorithm:e}=this.asn.tbsCertificate.subjectPublicKeyInfo;let i;return"1.2.840.10045.2.1"===e.algorithm&&e.parameters&&(i=Se.parse(e.parameters,ir)),e.algorithm===or&&(i=Se.parse(t,Tr)),{params:i,value:Se.serialize(this.asn.tbsCertificate.subjectPublicKeyInfo),algorithm:e.algorithm}}get signature(){const{signatureValue:t,signatureAlgorithm:e}=this.asn;return{value:t,algorithm:e.algorithm}}exportAsBase64(){return t.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return wn(t.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE-----\n${Pn(this.exportAsBase64())}\n-----END CERTIFICATE-----`}async getThumbprint(e="SHA-1"){try{const i=await bn(e,this.raw);this.thumbprints[e.name||e]=t.Convert.ToHex(i)}catch(t){console.error("Error thumbprint get:",t)}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const e=this.subject[t];if("CN"===e.shortName||"E"===e.shortName||"O"===e.shortName)return e.value}return""}get issuerCommonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const e=this.issuer[t];if("CN"===e.shortName)return e.value;if("E"===e.shortName)return e.value}return""}get isRoot(){return JSON.stringify(this.issuer)===JSON.stringify(this.subject)}subjectToString(){return this.subject?this.subject.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}issuerToString(){return this.issuer?this.issuer.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}}class In{constructor(t={}){this.acIssuer=new Oe,this.acSerial=0,this.attrs=[],Object.assign(this,t)}}var Tn;Ce([he({type:Oe})],In.prototype,"acIssuer",void 0),Ce([he({type:Ot.Integer})],In.prototype,"acSerial",void 0),Ce([he({type:xi,repeated:"sequence"})],In.prototype,"attrs",void 0);let xn=Tn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Tn.prototype)}};xn=Tn=Ce([ue({type:Rt.Sequence,itemType:Ot.ObjectIdentifier})],xn);class Rn{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}}Ce([he({type:Ot.Integer,optional:!0})],Rn.prototype,"pathLenConstraint",void 0),Ce([he({type:xn,implicit:!0,context:0,optional:!0})],Rn.prototype,"permittedAttrs",void 0),Ce([he({type:xn,implicit:!0,context:1,optional:!0})],Rn.prototype,"excludedAttrs",void 0),Ce([he({type:Ot.Boolean,defaultValue:!0})],Rn.prototype,"permitUnSpecified",void 0);class On{constructor(t={}){this.issuer=new Ve,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}}var Nn;Ce([he({type:Ve})],On.prototype,"issuer",void 0),Ce([he({type:Ot.Integer,converter:Kt})],On.prototype,"serial",void 0),Ce([he({type:Ot.BitString,optional:!0})],On.prototype,"issuerUID",void 0),function(t){t[t.publicKey=0]="publicKey",t[t.publicKeyCert=1]="publicKeyCert",t[t.otherObjectTypes=2]="otherObjectTypes"}(Nn||(Nn={}));class Mn{constructor(t={}){this.digestedObjectType=Nn.publicKey,this.digestAlgorithm=new Fi,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.Enumerated})],Mn.prototype,"digestedObjectType",void 0),Ce([he({type:Ot.ObjectIdentifier,optional:!0})],Mn.prototype,"otherObjectTypeID",void 0),Ce([he({type:Fi})],Mn.prototype,"digestAlgorithm",void 0),Ce([he({type:Ot.BitString})],Mn.prototype,"objectDigest",void 0);class kn{constructor(t={}){Object.assign(this,t)}}Ce([he({type:Ve,optional:!0})],kn.prototype,"issuerName",void 0),Ce([he({type:On,context:0,implicit:!0,optional:!0})],kn.prototype,"baseCertificateID",void 0),Ce([he({type:Mn,context:1,implicit:!0,optional:!0})],kn.prototype,"objectDigestInfo",void 0);let Kn=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Oe,repeated:"sequence"})],Kn.prototype,"v1Form",void 0),Ce([he({type:kn,context:0,implicit:!0})],Kn.prototype,"v2Form",void 0),Kn=Ce([ue({type:Rt.Choice})],Kn);class Hn{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}}Ce([he({type:Ot.GeneralizedTime})],Hn.prototype,"notBeforeTime",void 0),Ce([he({type:Ot.GeneralizedTime})],Hn.prototype,"notAfterTime",void 0);class jn{constructor(t={}){Object.assign(this,t)}}var _n,Un,Fn;Ce([he({type:On,implicit:!0,context:0,optional:!0})],jn.prototype,"baseCertificateID",void 0),Ce([he({type:Ve,implicit:!0,context:1,optional:!0})],jn.prototype,"entityName",void 0),Ce([he({type:Mn,implicit:!0,context:2,optional:!0})],jn.prototype,"objectDigestInfo",void 0),function(t){t[t.v2=1]="v2"}(_n||(_n={}));class Vn{constructor(t={}){this.version=_n.v2,this.holder=new jn,this.issuer=new Kn,this.signature=new Fi,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new Hn,this.attributes=[],Object.assign(this,t)}}Ce([he({type:Ot.Integer})],Vn.prototype,"version",void 0),Ce([he({type:jn})],Vn.prototype,"holder",void 0),Ce([he({type:Kn})],Vn.prototype,"issuer",void 0),Ce([he({type:Fi})],Vn.prototype,"signature",void 0),Ce([he({type:Ot.Integer,converter:Kt})],Vn.prototype,"serialNumber",void 0),Ce([he({type:Hn})],Vn.prototype,"attrCertValidityPeriod",void 0),Ce([he({type:xi,repeated:"sequence"})],Vn.prototype,"attributes",void 0),Ce([he({type:Ot.BitString,optional:!0})],Vn.prototype,"issuerUniqueID",void 0),Ce([he({type:Wi,optional:!0})],Vn.prototype,"extensions",void 0);class Ln{constructor(t={}){this.acinfo=new Vn,this.signatureAlgorithm=new Fi,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Vn})],Ln.prototype,"acinfo",void 0),Ce([he({type:Fi})],Ln.prototype,"signatureAlgorithm",void 0),Ce([he({type:Ot.BitString})],Ln.prototype,"signatureValue",void 0),function(t){t[t.unmarked=1]="unmarked",t[t.unclassified=2]="unclassified",t[t.restricted=4]="restricted",t[t.confidential=8]="confidential",t[t.secret=16]="secret",t[t.topSecret=32]="topSecret"}(Un||(Un={}));class Gn extends se{}class $n{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier,implicit:!0,context:0})],$n.prototype,"type",void 0),Ce([he({type:Ot.Any,implicit:!0,context:1})],$n.prototype,"value",void 0);class Qn{constructor(t={}){this.policyId="",this.classList=new Gn(Un.unclassified),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Qn.prototype,"policyId",void 0),Ce([he({type:Gn,defaultValue:new Gn(Un.unclassified)})],Qn.prototype,"classList",void 0),Ce([he({type:$n,repeated:"set"})],Qn.prototype,"securityCategories",void 0);class Wn{constructor(t={}){Object.assign(this,t)}}Ce([he({type:ne})],Wn.prototype,"cotets",void 0),Ce([he({type:Ot.ObjectIdentifier})],Wn.prototype,"oid",void 0),Ce([he({type:Ot.Utf8String})],Wn.prototype,"string",void 0);class qn{constructor(t={}){this.values=[],Object.assign(this,t)}}Ce([he({type:Ve,implicit:!0,context:0,optional:!0})],qn.prototype,"policyAuthority",void 0),Ce([he({type:Wn,repeated:"sequence"})],qn.prototype,"values",void 0);class zn{constructor(t={}){this.targetCertificate=new On,Object.assign(this,t)}}Ce([he({type:On})],zn.prototype,"targetCertificate",void 0),Ce([he({type:Oe,optional:!0})],zn.prototype,"targetName",void 0),Ce([he({type:Mn,optional:!0})],zn.prototype,"certDigestInfo",void 0);let Jn=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Oe,context:0,implicit:!0})],Jn.prototype,"targetName",void 0),Ce([he({type:Oe,context:1,implicit:!0})],Jn.prototype,"targetGroup",void 0),Ce([he({type:zn,context:2,implicit:!0})],Jn.prototype,"targetCert",void 0),Jn=Ce([ue({type:Rt.Choice})],Jn);let Zn=Fn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Fn.prototype)}};var Xn;Zn=Fn=Ce([ue({type:Rt.Sequence,itemType:Jn})],Zn);let Yn=Xn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Xn.prototype)}};Yn=Xn=Ce([ue({type:Rt.Sequence,itemType:Zn})],Yn);class to{constructor(t={}){Object.assign(this,t)}}Ce([he({type:Ve,implicit:!0,context:0,optional:!0})],to.prototype,"roleAuthority",void 0),Ce([he({type:Oe,implicit:!0,context:1})],to.prototype,"roleName",void 0);class eo{constructor(t={}){this.service=new Oe,this.ident=new Oe,Object.assign(this,t)}}Ce([he({type:Oe})],eo.prototype,"service",void 0),Ce([he({type:Oe})],eo.prototype,"ident",void 0),Ce([he({type:ne,optional:!0})],eo.prototype,"authInfo",void 0);const io="0.4.0.9496.6";let ro=class{constructor(t={}){this.codeAuthority=new Oe,this.codeId=new Oe,this.shortName="",this.shortDescription="",Object.assign(this,t)}};Ce([he({type:Oe,context:0})],ro.prototype,"codeAuthority",void 0),Ce([he({type:Oe,context:1})],ro.prototype,"codeId",void 0),Ce([he({type:Ot.Utf8String,context:2})],ro.prototype,"shortName",void 0),Ce([he({type:Ot.Utf8String,context:3})],ro.prototype,"shortDescription",void 0),ro=Ce([ue({type:Rt.Sequence})],ro);let so=class extends Ie{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};so=Ce([ue({type:Rt.Sequence})],so);const no="0.4.0.9496.1";let oo=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};oo=Ce([ue({type:Rt.Sequence})],oo);const ao="0.4.0.9496.2";let co=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};co=Ce([ue({type:Rt.Sequence})],co);const lo="0.4.0.9496.3";let uo=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};uo=Ce([ue({type:Rt.Sequence})],uo);const ho="0.4.0.9496.4";let po=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};po=Ce([ue({type:Rt.Sequence})],po);const fo="0.4.0.9496.8";let yo=class{constructor(t={}){this.location="",this.base=0,this.degree=0,Object.assign(this,t)}toString(){return`${this.base} x 10^${this.degree} ${this.location}`}};Ce([he({type:Ot.PrintableString})],yo.prototype,"location",void 0),Ce([he({type:Ot.Integer})],yo.prototype,"base",void 0),Ce([he({type:Ot.Integer})],yo.prototype,"degree",void 0),yo=Ce([ue({type:Rt.Sequence})],yo);const So="0.4.0.9496.9";let Co=class{constructor(t={}){this.stars5=0,this.stars4=0,this.stars3=0,this.stars2=0,this.stars1=0,Object.assign(this,t)}};Ce([he({type:Ot.Integer})],Co.prototype,"stars5",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars4",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars3",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars2",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars1",void 0),Co=Ce([ue({type:Rt.Sequence})],Co);const Ao="0.4.0.9496.5";let mo=class{constructor(t={}){this.DNBvsDNO=new se(0),this.DNBvsDNT=new se(0),this.DNOvsDNT=new se(0),Object.assign(this,t)}};Ce([he({type:se,context:0})],mo.prototype,"DNBvsDNO",void 0),Ce([he({type:se,context:1})],mo.prototype,"DNBvsDNT",void 0),Ce([he({type:se,context:2})],mo.prototype,"DNOvsDNT",void 0),mo=Ce([ue({type:Rt.Sequence})],mo);const go="0.4.0.9496.7";let vo=class{constructor(t={}){this.assessmentAuthority=new Oe,this.assessmentRef=new Oe,this.assessmentLocation=new Oe,this.dataStorageTerritory="",this.description="",Object.assign(this,t)}};Ce([he({type:Oe,context:0})],vo.prototype,"assessmentAuthority",void 0),Ce([he({type:Oe,context:1})],vo.prototype,"assessmentRef",void 0),Ce([he({type:Oe,context:2})],vo.prototype,"assessmentLocation",void 0),Ce([he({type:Ot.PrintableString,context:3})],vo.prototype,"dataStorageTerritory",void 0),Ce([he({type:Ot.Utf8String,context:4})],vo.prototype,"description",void 0),vo=Ce([ue({type:Rt.Sequence})],vo);class Eo{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}}var wo;Ce([he({type:Ot.ObjectIdentifier})],Eo.prototype,"attrType",void 0),Ce([he({type:Ot.Any,repeated:"set"})],Eo.prototype,"attrValues",void 0);class Po{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Po.prototype,"otherCertFormat",void 0),Ce([he({type:Ot.Any})],Po.prototype,"otherCert",void 0);let Do=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Ji})],Do.prototype,"certificate",void 0),Ce([he({type:Ln,context:2,implicit:!0})],Do.prototype,"v2AttrCert",void 0),Ce([he({type:Po,context:3,implicit:!0})],Do.prototype,"other",void 0),Do=Ce([ue({type:Rt.Choice})],Do);let bo=wo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,wo.prototype)}};bo=wo=Ce([ue({type:Rt.Set,itemType:Do})],bo);class Bo{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Bo.prototype,"contentType",void 0),Ce([he({type:Ot.Any,context:0})],Bo.prototype,"content",void 0);let Io=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:ne})],Io.prototype,"single",void 0),Ce([he({type:Ot.Any})],Io.prototype,"any",void 0),Io=Ce([ue({type:Rt.Choice})],Io);class To{constructor(t={}){this.eContentType="",Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],To.prototype,"eContentType",void 0),Ce([he({type:Io,context:0,optional:!0})],To.prototype,"eContent",void 0);class xo{constructor(t={}){this.issuer=new Ie,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}}var Ro;Ce([he({type:Ie})],xo.prototype,"issuer",void 0),Ce([he({type:Ot.Integer,converter:Kt})],xo.prototype,"serialNumber",void 0);class Oo{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Oo.prototype,"otherRevInfoFormat",void 0),Ce([he({type:Ot.Any})],Oo.prototype,"otherRevInfo",void 0);let No=class{constructor(t={}){this.other=new Oo,Object.assign(this,t)}};Ce([he({type:Oo,context:1,implicit:!0})],No.prototype,"other",void 0),No=Ce([ue({type:Rt.Choice})],No);let Mo=Ro=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Ro.prototype)}};var ko;Mo=Ro=Ce([ue({type:Rt.Set,itemType:No})],Mo),function(t){t[t.v0=0]="v0",t[t.v1=1]="v1",t[t.v2=2]="v2",t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v5=5]="v5"}(ko||(ko={}));let Ko=class extends Fi{};Ko=Ce([ue({type:Rt.Sequence})],Ko);let Ho=class extends Fi{};Ho=Ce([ue({type:Rt.Sequence})],Ho);let jo=class{constructor(t={}){Object.assign(this,t)}};var _o;Ce([he({type:Ni,context:0,implicit:!0})],jo.prototype,"subjectKeyIdentifier",void 0),Ce([he({type:xo})],jo.prototype,"issuerAndSerialNumber",void 0),jo=Ce([ue({type:Rt.Choice})],jo);class Uo{constructor(t={}){this.version=ko.v0,this.sid=new jo,this.digestAlgorithm=new Ko,this.signatureAlgorithm=new Ho,this.signature=new ne,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],Uo.prototype,"version",void 0),Ce([he({type:jo})],Uo.prototype,"sid",void 0),Ce([he({type:Ko})],Uo.prototype,"digestAlgorithm",void 0),Ce([he({type:Eo,repeated:"set",context:0,implicit:!0,optional:!0})],Uo.prototype,"signedAttrs",void 0),Ce([he({type:Ho})],Uo.prototype,"signatureAlgorithm",void 0),Ce([he({type:ne})],Uo.prototype,"signature",void 0),Ce([he({type:Eo,repeated:"set",context:1,implicit:!0,optional:!0})],Uo.prototype,"unsignedAttrs",void 0);let Fo=_o=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,_o.prototype)}};var Vo;Fo=_o=Ce([ue({type:Rt.Set,itemType:Uo})],Fo);let Lo=Vo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Vo.prototype)}};Lo=Vo=Ce([ue({type:Rt.Set,itemType:Ko})],Lo);class Go{constructor(t={}){this.version=ko.v0,this.digestAlgorithms=new Lo,this.encapContentInfo=new To,this.signerInfos=new Fo,Object.assign(this,t)}}var $o;Ce([he({type:Ot.Integer})],Go.prototype,"version",void 0),Ce([he({type:Lo})],Go.prototype,"digestAlgorithms",void 0),Ce([he({type:To})],Go.prototype,"encapContentInfo",void 0),Ce([he({type:bo,context:0,implicit:!0,optional:!0})],Go.prototype,"certificates",void 0),Ce([he({type:No,context:1,implicit:!0,optional:!0})],Go.prototype,"crls",void 0),Ce([he({type:Fo})],Go.prototype,"signerInfos",void 0);class Qo{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}}Ce([he({type:Ot.ObjectIdentifier})],Qo.prototype,"attrId",void 0),Ce([he({type:Ot.Any,repeated:"set"})],Qo.prototype,"attrValues",void 0);let Wo=$o=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,$o.prototype)}};var qo;Wo=$o=Ce([ue({type:Rt.Sequence,itemType:Qo})],Wo);let zo=qo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,qo.prototype)}};zo=qo=Ce([ue({type:Rt.Sequence,itemType:Bo})],zo);class Jo{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Jo.prototype,"certId",void 0),Ce([he({type:Ot.Any,context:0})],Jo.prototype,"certValue",void 0);class Zo{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Zo.prototype,"crlId",void 0),Ce([he({type:Ot.Any,context:0})],Zo.prototype,"crltValue",void 0);class Xo extends ne{}class Yo{constructor(t={}){this.encryptionAlgorithm=new Fi,this.encryptedData=new Xo,Object.assign(this,t)}}var ta,ea;Ce([he({type:Fi})],Yo.prototype,"encryptionAlgorithm",void 0),Ce([he({type:Xo})],Yo.prototype,"encryptedData",void 0),function(t){t[t.v1=0]="v1"}(ea||(ea={}));class ia extends ne{}let ra=ta=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ta.prototype)}};ra=ta=Ce([ue({type:Rt.Sequence,itemType:xi})],ra);class sa{constructor(t={}){this.version=ea.v1,this.privateKeyAlgorithm=new Fi,this.privateKey=new ia,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],sa.prototype,"version",void 0),Ce([he({type:Fi})],sa.prototype,"privateKeyAlgorithm",void 0),Ce([he({type:ia})],sa.prototype,"privateKey",void 0),Ce([he({type:ra,implicit:!0,context:0,optional:!0})],sa.prototype,"attributes",void 0);let na=class extends sa{};na=Ce([ue({type:Rt.Sequence})],na);let oa=class extends Yo{};oa=Ce([ue({type:Rt.Sequence})],oa);class aa{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],aa.prototype,"secretTypeId",void 0),Ce([he({type:Ot.Any,context:0})],aa.prototype,"secretValue",void 0);class ca{constructor(t={}){this.mac=new Pr,this.macSalt=new ne,this.iterations=1,Object.assign(this,t)}}Ce([he({type:Pr})],ca.prototype,"mac",void 0),Ce([he({type:ne})],ca.prototype,"macSalt",void 0),Ce([he({type:Ot.Integer,defaultValue:1})],ca.prototype,"iterations",void 0);class la{constructor(t={}){this.version=3,this.authSafe=new Bo,this.macData=new ca,Object.assign(this,t)}}var ua;Ce([he({type:Ot.Integer})],la.prototype,"version",void 0),Ce([he({type:Bo})],la.prototype,"authSafe",void 0),Ce([he({type:ca,optional:!0})],la.prototype,"macData",void 0);class ha{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],ha.prototype,"bagId",void 0),Ce([he({type:Ot.Any,context:0})],ha.prototype,"bagValue",void 0),Ce([he({type:Qo,repeated:"set",optional:!0})],ha.prototype,"bagAttributes",void 0);let pa=ua=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ua.prototype)}};var da,fa,ya;pa=ua=Ce([ue({type:Rt.Sequence,itemType:ha})],pa);const Sa="1.2.840.113549.1.9",Ca=`${Sa}.2`,Aa=`${Sa}.7`,ma=`${Sa}.14`;let ga=class extends we{constructor(t={}){super(t)}toString(){return{}.toString(),this.ia5String||super.toString()}};Ce([he({type:Ot.IA5String})],ga.prototype,"ia5String",void 0),ga=Ce([ue({type:Rt.Choice})],ga);let va=class extends Bo{};va=Ce([ue({type:Rt.Sequence})],va);let Ea=class extends la{};Ea=Ce([ue({type:Rt.Sequence})],Ea);let wa=class extends Yo{};wa=Ce([ue({type:Rt.Sequence})],wa);let Pa=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.IA5String})],Pa.prototype,"value",void 0),Pa=Ce([ue({type:Rt.Choice})],Pa);let Da=class extends ga{};Da=Ce([ue({type:Rt.Choice})],Da);let ba=class extends we{};ba=Ce([ue({type:Rt.Choice})],ba);let Ba=class{constructor(t=new Date){this.value=t}};Ce([he({type:Ot.GeneralizedTime})],Ba.prototype,"value",void 0),Ba=Ce([ue({type:Rt.Choice})],Ba);let Ia=class extends we{};Ia=Ce([ue({type:Rt.Choice})],Ia);let Ta=class{constructor(t="M"){this.value=t}toString(){return this.value}};Ce([he({type:Ot.PrintableString})],Ta.prototype,"value",void 0),Ta=Ce([ue({type:Rt.Choice})],Ta);let xa=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.PrintableString})],xa.prototype,"value",void 0),xa=Ce([ue({type:Rt.Choice})],xa);let Ra=class extends xa{};Ra=Ce([ue({type:Rt.Choice})],Ra);let Oa=class extends we{};Oa=Ce([ue({type:Rt.Choice})],Oa);let Na=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.ObjectIdentifier})],Na.prototype,"value",void 0),Na=Ce([ue({type:Rt.Choice})],Na);let Ma=class extends Li{};Ma=Ce([ue({type:Rt.Choice})],Ma);let ka=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};Ce([he({type:Ot.Integer})],ka.prototype,"value",void 0),ka=Ce([ue({type:Rt.Choice})],ka);let Ka=class extends Uo{};Ka=Ce([ue({type:Rt.Sequence})],Ka);let Ha=class extends we{};Ha=Ce([ue({type:Rt.Choice})],Ha);let ja=da=class extends Wi{constructor(t){super(t),Object.setPrototypeOf(this,da.prototype)}};ja=da=Ce([ue({type:Rt.Sequence})],ja);let _a=fa=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,fa.prototype)}};_a=fa=Ce([ue({type:Rt.Set,itemType:Eo})],_a);let Ua=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.BmpString})],Ua.prototype,"value",void 0),Ua=Ce([ue({type:Rt.Choice})],Ua);let Fa=class extends Fi{};Fa=Ce([ue({type:Rt.Sequence})],Fa);let Va=ya=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ya.prototype)}};var La;Va=ya=Ce([ue({type:Rt.Sequence,itemType:Fa})],Va);let Ga=La=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,La.prototype)}};Ga=La=Ce([ue({type:Rt.Sequence,itemType:xi})],Ga);class $a{constructor(t={}){this.version=0,this.subject=new Ie,this.subjectPKInfo=new Vi,this.attributes=new Ga,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],$a.prototype,"version",void 0),Ce([he({type:Ie})],$a.prototype,"subject",void 0),Ce([he({type:Vi})],$a.prototype,"subjectPKInfo",void 0),Ce([he({type:Ga,implicit:!0,context:0})],$a.prototype,"attributes",void 0);class Qa{constructor(t={}){this.certificationRequestInfo=new $a,this.signatureAlgorithm=new Fi,this.signature=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:$a})],Qa.prototype,"certificationRequestInfo",void 0),Ce([he({type:Fi})],Qa.prototype,"signatureAlgorithm",void 0),Ce([he({type:Ot.BitString})],Qa.prototype,"signature",void 0);export{He as $,mn as A,tr as B,Ha as C,po as D,ja as E,ir as F,or as G,Ie as H,yo as I,xe as J,Qe as K,qe as L,Re as M,_r as N,kr as O,Kt as P,gi as Q,Tr as R,Ue as S,mo as T,Da as U,Co as V,vo as W,di as X,Ni as Y,_e as Z,oi as _,xi as a,Ui as a0,Ti as a1,Xe as a2,Vs as a3,wi as a4,is as a5,ss as a6,ns as a7,Zr as a8,Is as a9,Bs as aa,Ms as ab,Ns as ac,Gs as ad,Ls as ae,hi as af,Oi as ag,Mi as ah,ji as ai,Gr as aj,sn as ak,fn as al,Pi as am,Bi as an,xr as ao,Rr as ap,Or as aq,Nr as ar,Bn as as,de as b,gn as c,Se as d,Ca as e,Aa as f,So as g,fo as h,ma as i,go as j,io as k,ro as l,Ao as m,ho as n,lo as o,uo as p,ao as q,co as r,no as s,oo as t,Dn as u,Ln as v,bn as w,wn as x,Pn as y,Qa as z}
|
|
87
|
+
class Bn extends mn{constructor(i){super(Dn(i),Ji),this.thumbprints={},this.type="X.509 Certificate";const{tbsCertificate:r}=this.asn;this.serialNumber=t.Convert.ToHex(r.serialNumber),this.subject=new _r(r.subject).toJSON(),this.issuer=new _r(r.issuer).toJSON(),this.version=r.version+1;const s=r.validity.notBefore.utcTime||r.validity.notBefore.generalTime;if(!s)throw new Error("Cannot get 'notBefore' value");this.notBefore=s;const n=r.validity.notAfter.utcTime||r.validity.notAfter.generalTime;if(!n)throw new Error("Cannot get 'notAfter' value");this.notAfter=n,this.validity=e(this.notBefore,this.notAfter)}parseExtensions(){const{tbsCertificate:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new gn(Se.serialize(t)))))}get publicKey(){const{subjectPublicKey:t,algorithm:e}=this.asn.tbsCertificate.subjectPublicKeyInfo;let i;return"1.2.840.10045.2.1"===e.algorithm&&e.parameters&&(i=Se.parse(e.parameters,ir)),e.algorithm===or&&(i=Se.parse(t,Tr)),{params:i,value:Se.serialize(this.asn.tbsCertificate.subjectPublicKeyInfo),algorithm:e.algorithm}}get signature(){const{signatureValue:t,signatureAlgorithm:e}=this.asn;return{value:t,algorithm:e.algorithm}}exportAsBase64(){return t.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return wn(t.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE-----\n${Pn(this.exportAsBase64())}\n-----END CERTIFICATE-----`}async getThumbprint(e="SHA-1"){try{const i=await bn(e,this.raw);i&&(this.thumbprints[e.name||e]=t.Convert.ToHex(i))}catch(t){console.error("Error thumbprint get:",t)}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const e=this.subject[t];if("CN"===e.shortName||"E"===e.shortName||"O"===e.shortName)return e.value}return""}get issuerCommonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const e=this.issuer[t];if("CN"===e.shortName)return e.value;if("E"===e.shortName)return e.value}return""}get isRoot(){return JSON.stringify(this.issuer)===JSON.stringify(this.subject)}subjectToString(){return this.subject?this.subject.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}issuerToString(){return this.issuer?this.issuer.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}}class In{constructor(t={}){this.acIssuer=new Oe,this.acSerial=0,this.attrs=[],Object.assign(this,t)}}var Tn;Ce([he({type:Oe})],In.prototype,"acIssuer",void 0),Ce([he({type:Ot.Integer})],In.prototype,"acSerial",void 0),Ce([he({type:xi,repeated:"sequence"})],In.prototype,"attrs",void 0);let xn=Tn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Tn.prototype)}};xn=Tn=Ce([ue({type:Rt.Sequence,itemType:Ot.ObjectIdentifier})],xn);class Rn{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}}Ce([he({type:Ot.Integer,optional:!0})],Rn.prototype,"pathLenConstraint",void 0),Ce([he({type:xn,implicit:!0,context:0,optional:!0})],Rn.prototype,"permittedAttrs",void 0),Ce([he({type:xn,implicit:!0,context:1,optional:!0})],Rn.prototype,"excludedAttrs",void 0),Ce([he({type:Ot.Boolean,defaultValue:!0})],Rn.prototype,"permitUnSpecified",void 0);class On{constructor(t={}){this.issuer=new Ve,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}}var Nn;Ce([he({type:Ve})],On.prototype,"issuer",void 0),Ce([he({type:Ot.Integer,converter:Kt})],On.prototype,"serial",void 0),Ce([he({type:Ot.BitString,optional:!0})],On.prototype,"issuerUID",void 0),function(t){t[t.publicKey=0]="publicKey",t[t.publicKeyCert=1]="publicKeyCert",t[t.otherObjectTypes=2]="otherObjectTypes"}(Nn||(Nn={}));class Mn{constructor(t={}){this.digestedObjectType=Nn.publicKey,this.digestAlgorithm=new Fi,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.Enumerated})],Mn.prototype,"digestedObjectType",void 0),Ce([he({type:Ot.ObjectIdentifier,optional:!0})],Mn.prototype,"otherObjectTypeID",void 0),Ce([he({type:Fi})],Mn.prototype,"digestAlgorithm",void 0),Ce([he({type:Ot.BitString})],Mn.prototype,"objectDigest",void 0);class kn{constructor(t={}){Object.assign(this,t)}}Ce([he({type:Ve,optional:!0})],kn.prototype,"issuerName",void 0),Ce([he({type:On,context:0,implicit:!0,optional:!0})],kn.prototype,"baseCertificateID",void 0),Ce([he({type:Mn,context:1,implicit:!0,optional:!0})],kn.prototype,"objectDigestInfo",void 0);let Kn=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Oe,repeated:"sequence"})],Kn.prototype,"v1Form",void 0),Ce([he({type:kn,context:0,implicit:!0})],Kn.prototype,"v2Form",void 0),Kn=Ce([ue({type:Rt.Choice})],Kn);class Hn{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}}Ce([he({type:Ot.GeneralizedTime})],Hn.prototype,"notBeforeTime",void 0),Ce([he({type:Ot.GeneralizedTime})],Hn.prototype,"notAfterTime",void 0);class jn{constructor(t={}){Object.assign(this,t)}}var _n,Un,Fn;Ce([he({type:On,implicit:!0,context:0,optional:!0})],jn.prototype,"baseCertificateID",void 0),Ce([he({type:Ve,implicit:!0,context:1,optional:!0})],jn.prototype,"entityName",void 0),Ce([he({type:Mn,implicit:!0,context:2,optional:!0})],jn.prototype,"objectDigestInfo",void 0),function(t){t[t.v2=1]="v2"}(_n||(_n={}));class Vn{constructor(t={}){this.version=_n.v2,this.holder=new jn,this.issuer=new Kn,this.signature=new Fi,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new Hn,this.attributes=[],Object.assign(this,t)}}Ce([he({type:Ot.Integer})],Vn.prototype,"version",void 0),Ce([he({type:jn})],Vn.prototype,"holder",void 0),Ce([he({type:Kn})],Vn.prototype,"issuer",void 0),Ce([he({type:Fi})],Vn.prototype,"signature",void 0),Ce([he({type:Ot.Integer,converter:Kt})],Vn.prototype,"serialNumber",void 0),Ce([he({type:Hn})],Vn.prototype,"attrCertValidityPeriod",void 0),Ce([he({type:xi,repeated:"sequence"})],Vn.prototype,"attributes",void 0),Ce([he({type:Ot.BitString,optional:!0})],Vn.prototype,"issuerUniqueID",void 0),Ce([he({type:Wi,optional:!0})],Vn.prototype,"extensions",void 0);class Ln{constructor(t={}){this.acinfo=new Vn,this.signatureAlgorithm=new Fi,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Vn})],Ln.prototype,"acinfo",void 0),Ce([he({type:Fi})],Ln.prototype,"signatureAlgorithm",void 0),Ce([he({type:Ot.BitString})],Ln.prototype,"signatureValue",void 0),function(t){t[t.unmarked=1]="unmarked",t[t.unclassified=2]="unclassified",t[t.restricted=4]="restricted",t[t.confidential=8]="confidential",t[t.secret=16]="secret",t[t.topSecret=32]="topSecret"}(Un||(Un={}));class Gn extends se{}class $n{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier,implicit:!0,context:0})],$n.prototype,"type",void 0),Ce([he({type:Ot.Any,implicit:!0,context:1})],$n.prototype,"value",void 0);class Qn{constructor(t={}){this.policyId="",this.classList=new Gn(Un.unclassified),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Qn.prototype,"policyId",void 0),Ce([he({type:Gn,defaultValue:new Gn(Un.unclassified)})],Qn.prototype,"classList",void 0),Ce([he({type:$n,repeated:"set"})],Qn.prototype,"securityCategories",void 0);class Wn{constructor(t={}){Object.assign(this,t)}}Ce([he({type:ne})],Wn.prototype,"cotets",void 0),Ce([he({type:Ot.ObjectIdentifier})],Wn.prototype,"oid",void 0),Ce([he({type:Ot.Utf8String})],Wn.prototype,"string",void 0);class qn{constructor(t={}){this.values=[],Object.assign(this,t)}}Ce([he({type:Ve,implicit:!0,context:0,optional:!0})],qn.prototype,"policyAuthority",void 0),Ce([he({type:Wn,repeated:"sequence"})],qn.prototype,"values",void 0);class zn{constructor(t={}){this.targetCertificate=new On,Object.assign(this,t)}}Ce([he({type:On})],zn.prototype,"targetCertificate",void 0),Ce([he({type:Oe,optional:!0})],zn.prototype,"targetName",void 0),Ce([he({type:Mn,optional:!0})],zn.prototype,"certDigestInfo",void 0);let Jn=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Oe,context:0,implicit:!0})],Jn.prototype,"targetName",void 0),Ce([he({type:Oe,context:1,implicit:!0})],Jn.prototype,"targetGroup",void 0),Ce([he({type:zn,context:2,implicit:!0})],Jn.prototype,"targetCert",void 0),Jn=Ce([ue({type:Rt.Choice})],Jn);let Zn=Fn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Fn.prototype)}};var Xn;Zn=Fn=Ce([ue({type:Rt.Sequence,itemType:Jn})],Zn);let Yn=Xn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Xn.prototype)}};Yn=Xn=Ce([ue({type:Rt.Sequence,itemType:Zn})],Yn);class to{constructor(t={}){Object.assign(this,t)}}Ce([he({type:Ve,implicit:!0,context:0,optional:!0})],to.prototype,"roleAuthority",void 0),Ce([he({type:Oe,implicit:!0,context:1})],to.prototype,"roleName",void 0);class eo{constructor(t={}){this.service=new Oe,this.ident=new Oe,Object.assign(this,t)}}Ce([he({type:Oe})],eo.prototype,"service",void 0),Ce([he({type:Oe})],eo.prototype,"ident",void 0),Ce([he({type:ne,optional:!0})],eo.prototype,"authInfo",void 0);const io="0.4.0.9496.6";let ro=class{constructor(t={}){this.codeAuthority=new Oe,this.codeId=new Oe,this.shortName="",this.shortDescription="",Object.assign(this,t)}};Ce([he({type:Oe,context:0})],ro.prototype,"codeAuthority",void 0),Ce([he({type:Oe,context:1})],ro.prototype,"codeId",void 0),Ce([he({type:Ot.Utf8String,context:2})],ro.prototype,"shortName",void 0),Ce([he({type:Ot.Utf8String,context:3})],ro.prototype,"shortDescription",void 0),ro=Ce([ue({type:Rt.Sequence})],ro);let so=class extends Ie{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};so=Ce([ue({type:Rt.Sequence})],so);const no="0.4.0.9496.1";let oo=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};oo=Ce([ue({type:Rt.Sequence})],oo);const ao="0.4.0.9496.2";let co=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};co=Ce([ue({type:Rt.Sequence})],co);const lo="0.4.0.9496.3";let uo=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};uo=Ce([ue({type:Rt.Sequence})],uo);const ho="0.4.0.9496.4";let po=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};po=Ce([ue({type:Rt.Sequence})],po);const fo="0.4.0.9496.8";let yo=class{constructor(t={}){this.location="",this.base=0,this.degree=0,Object.assign(this,t)}toString(){return`${this.base} x 10^${this.degree} ${this.location}`}};Ce([he({type:Ot.PrintableString})],yo.prototype,"location",void 0),Ce([he({type:Ot.Integer})],yo.prototype,"base",void 0),Ce([he({type:Ot.Integer})],yo.prototype,"degree",void 0),yo=Ce([ue({type:Rt.Sequence})],yo);const So="0.4.0.9496.9";let Co=class{constructor(t={}){this.stars5=0,this.stars4=0,this.stars3=0,this.stars2=0,this.stars1=0,Object.assign(this,t)}};Ce([he({type:Ot.Integer})],Co.prototype,"stars5",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars4",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars3",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars2",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars1",void 0),Co=Ce([ue({type:Rt.Sequence})],Co);const Ao="0.4.0.9496.5";let mo=class{constructor(t={}){this.DNBvsDNO=new se(0),this.DNBvsDNT=new se(0),this.DNOvsDNT=new se(0),Object.assign(this,t)}};Ce([he({type:se,context:0})],mo.prototype,"DNBvsDNO",void 0),Ce([he({type:se,context:1})],mo.prototype,"DNBvsDNT",void 0),Ce([he({type:se,context:2})],mo.prototype,"DNOvsDNT",void 0),mo=Ce([ue({type:Rt.Sequence})],mo);const go="0.4.0.9496.7";let vo=class{constructor(t={}){this.assessmentAuthority=new Oe,this.assessmentRef=new Oe,this.assessmentLocation=new Oe,this.dataStorageTerritory="",this.description="",Object.assign(this,t)}};Ce([he({type:Oe,context:0})],vo.prototype,"assessmentAuthority",void 0),Ce([he({type:Oe,context:1})],vo.prototype,"assessmentRef",void 0),Ce([he({type:Oe,context:2})],vo.prototype,"assessmentLocation",void 0),Ce([he({type:Ot.PrintableString,context:3})],vo.prototype,"dataStorageTerritory",void 0),Ce([he({type:Ot.Utf8String,context:4})],vo.prototype,"description",void 0),vo=Ce([ue({type:Rt.Sequence})],vo);class Eo{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}}var wo;Ce([he({type:Ot.ObjectIdentifier})],Eo.prototype,"attrType",void 0),Ce([he({type:Ot.Any,repeated:"set"})],Eo.prototype,"attrValues",void 0);class Po{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Po.prototype,"otherCertFormat",void 0),Ce([he({type:Ot.Any})],Po.prototype,"otherCert",void 0);let Do=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Ji})],Do.prototype,"certificate",void 0),Ce([he({type:Ln,context:2,implicit:!0})],Do.prototype,"v2AttrCert",void 0),Ce([he({type:Po,context:3,implicit:!0})],Do.prototype,"other",void 0),Do=Ce([ue({type:Rt.Choice})],Do);let bo=wo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,wo.prototype)}};bo=wo=Ce([ue({type:Rt.Set,itemType:Do})],bo);class Bo{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Bo.prototype,"contentType",void 0),Ce([he({type:Ot.Any,context:0})],Bo.prototype,"content",void 0);let Io=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:ne})],Io.prototype,"single",void 0),Ce([he({type:Ot.Any})],Io.prototype,"any",void 0),Io=Ce([ue({type:Rt.Choice})],Io);class To{constructor(t={}){this.eContentType="",Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],To.prototype,"eContentType",void 0),Ce([he({type:Io,context:0,optional:!0})],To.prototype,"eContent",void 0);class xo{constructor(t={}){this.issuer=new Ie,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}}var Ro;Ce([he({type:Ie})],xo.prototype,"issuer",void 0),Ce([he({type:Ot.Integer,converter:Kt})],xo.prototype,"serialNumber",void 0);class Oo{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Oo.prototype,"otherRevInfoFormat",void 0),Ce([he({type:Ot.Any})],Oo.prototype,"otherRevInfo",void 0);let No=class{constructor(t={}){this.other=new Oo,Object.assign(this,t)}};Ce([he({type:Oo,context:1,implicit:!0})],No.prototype,"other",void 0),No=Ce([ue({type:Rt.Choice})],No);let Mo=Ro=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Ro.prototype)}};var ko;Mo=Ro=Ce([ue({type:Rt.Set,itemType:No})],Mo),function(t){t[t.v0=0]="v0",t[t.v1=1]="v1",t[t.v2=2]="v2",t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v5=5]="v5"}(ko||(ko={}));let Ko=class extends Fi{};Ko=Ce([ue({type:Rt.Sequence})],Ko);let Ho=class extends Fi{};Ho=Ce([ue({type:Rt.Sequence})],Ho);let jo=class{constructor(t={}){Object.assign(this,t)}};var _o;Ce([he({type:Ni,context:0,implicit:!0})],jo.prototype,"subjectKeyIdentifier",void 0),Ce([he({type:xo})],jo.prototype,"issuerAndSerialNumber",void 0),jo=Ce([ue({type:Rt.Choice})],jo);class Uo{constructor(t={}){this.version=ko.v0,this.sid=new jo,this.digestAlgorithm=new Ko,this.signatureAlgorithm=new Ho,this.signature=new ne,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],Uo.prototype,"version",void 0),Ce([he({type:jo})],Uo.prototype,"sid",void 0),Ce([he({type:Ko})],Uo.prototype,"digestAlgorithm",void 0),Ce([he({type:Eo,repeated:"set",context:0,implicit:!0,optional:!0})],Uo.prototype,"signedAttrs",void 0),Ce([he({type:Ho})],Uo.prototype,"signatureAlgorithm",void 0),Ce([he({type:ne})],Uo.prototype,"signature",void 0),Ce([he({type:Eo,repeated:"set",context:1,implicit:!0,optional:!0})],Uo.prototype,"unsignedAttrs",void 0);let Fo=_o=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,_o.prototype)}};var Vo;Fo=_o=Ce([ue({type:Rt.Set,itemType:Uo})],Fo);let Lo=Vo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Vo.prototype)}};Lo=Vo=Ce([ue({type:Rt.Set,itemType:Ko})],Lo);class Go{constructor(t={}){this.version=ko.v0,this.digestAlgorithms=new Lo,this.encapContentInfo=new To,this.signerInfos=new Fo,Object.assign(this,t)}}var $o;Ce([he({type:Ot.Integer})],Go.prototype,"version",void 0),Ce([he({type:Lo})],Go.prototype,"digestAlgorithms",void 0),Ce([he({type:To})],Go.prototype,"encapContentInfo",void 0),Ce([he({type:bo,context:0,implicit:!0,optional:!0})],Go.prototype,"certificates",void 0),Ce([he({type:No,context:1,implicit:!0,optional:!0})],Go.prototype,"crls",void 0),Ce([he({type:Fo})],Go.prototype,"signerInfos",void 0);class Qo{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}}Ce([he({type:Ot.ObjectIdentifier})],Qo.prototype,"attrId",void 0),Ce([he({type:Ot.Any,repeated:"set"})],Qo.prototype,"attrValues",void 0);let Wo=$o=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,$o.prototype)}};var qo;Wo=$o=Ce([ue({type:Rt.Sequence,itemType:Qo})],Wo);let zo=qo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,qo.prototype)}};zo=qo=Ce([ue({type:Rt.Sequence,itemType:Bo})],zo);class Jo{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Jo.prototype,"certId",void 0),Ce([he({type:Ot.Any,context:0})],Jo.prototype,"certValue",void 0);class Zo{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Zo.prototype,"crlId",void 0),Ce([he({type:Ot.Any,context:0})],Zo.prototype,"crltValue",void 0);class Xo extends ne{}class Yo{constructor(t={}){this.encryptionAlgorithm=new Fi,this.encryptedData=new Xo,Object.assign(this,t)}}var ta,ea;Ce([he({type:Fi})],Yo.prototype,"encryptionAlgorithm",void 0),Ce([he({type:Xo})],Yo.prototype,"encryptedData",void 0),function(t){t[t.v1=0]="v1"}(ea||(ea={}));class ia extends ne{}let ra=ta=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ta.prototype)}};ra=ta=Ce([ue({type:Rt.Sequence,itemType:xi})],ra);class sa{constructor(t={}){this.version=ea.v1,this.privateKeyAlgorithm=new Fi,this.privateKey=new ia,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],sa.prototype,"version",void 0),Ce([he({type:Fi})],sa.prototype,"privateKeyAlgorithm",void 0),Ce([he({type:ia})],sa.prototype,"privateKey",void 0),Ce([he({type:ra,implicit:!0,context:0,optional:!0})],sa.prototype,"attributes",void 0);let na=class extends sa{};na=Ce([ue({type:Rt.Sequence})],na);let oa=class extends Yo{};oa=Ce([ue({type:Rt.Sequence})],oa);class aa{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],aa.prototype,"secretTypeId",void 0),Ce([he({type:Ot.Any,context:0})],aa.prototype,"secretValue",void 0);class ca{constructor(t={}){this.mac=new Pr,this.macSalt=new ne,this.iterations=1,Object.assign(this,t)}}Ce([he({type:Pr})],ca.prototype,"mac",void 0),Ce([he({type:ne})],ca.prototype,"macSalt",void 0),Ce([he({type:Ot.Integer,defaultValue:1})],ca.prototype,"iterations",void 0);class la{constructor(t={}){this.version=3,this.authSafe=new Bo,this.macData=new ca,Object.assign(this,t)}}var ua;Ce([he({type:Ot.Integer})],la.prototype,"version",void 0),Ce([he({type:Bo})],la.prototype,"authSafe",void 0),Ce([he({type:ca,optional:!0})],la.prototype,"macData",void 0);class ha{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],ha.prototype,"bagId",void 0),Ce([he({type:Ot.Any,context:0})],ha.prototype,"bagValue",void 0),Ce([he({type:Qo,repeated:"set",optional:!0})],ha.prototype,"bagAttributes",void 0);let pa=ua=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ua.prototype)}};var da,fa,ya;pa=ua=Ce([ue({type:Rt.Sequence,itemType:ha})],pa);const Sa="1.2.840.113549.1.9",Ca=`${Sa}.2`,Aa=`${Sa}.7`,ma=`${Sa}.14`;let ga=class extends we{constructor(t={}){super(t)}toString(){return{}.toString(),this.ia5String||super.toString()}};Ce([he({type:Ot.IA5String})],ga.prototype,"ia5String",void 0),ga=Ce([ue({type:Rt.Choice})],ga);let va=class extends Bo{};va=Ce([ue({type:Rt.Sequence})],va);let Ea=class extends la{};Ea=Ce([ue({type:Rt.Sequence})],Ea);let wa=class extends Yo{};wa=Ce([ue({type:Rt.Sequence})],wa);let Pa=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.IA5String})],Pa.prototype,"value",void 0),Pa=Ce([ue({type:Rt.Choice})],Pa);let Da=class extends ga{};Da=Ce([ue({type:Rt.Choice})],Da);let ba=class extends we{};ba=Ce([ue({type:Rt.Choice})],ba);let Ba=class{constructor(t=new Date){this.value=t}};Ce([he({type:Ot.GeneralizedTime})],Ba.prototype,"value",void 0),Ba=Ce([ue({type:Rt.Choice})],Ba);let Ia=class extends we{};Ia=Ce([ue({type:Rt.Choice})],Ia);let Ta=class{constructor(t="M"){this.value=t}toString(){return this.value}};Ce([he({type:Ot.PrintableString})],Ta.prototype,"value",void 0),Ta=Ce([ue({type:Rt.Choice})],Ta);let xa=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.PrintableString})],xa.prototype,"value",void 0),xa=Ce([ue({type:Rt.Choice})],xa);let Ra=class extends xa{};Ra=Ce([ue({type:Rt.Choice})],Ra);let Oa=class extends we{};Oa=Ce([ue({type:Rt.Choice})],Oa);let Na=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.ObjectIdentifier})],Na.prototype,"value",void 0),Na=Ce([ue({type:Rt.Choice})],Na);let Ma=class extends Li{};Ma=Ce([ue({type:Rt.Choice})],Ma);let ka=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};Ce([he({type:Ot.Integer})],ka.prototype,"value",void 0),ka=Ce([ue({type:Rt.Choice})],ka);let Ka=class extends Uo{};Ka=Ce([ue({type:Rt.Sequence})],Ka);let Ha=class extends we{};Ha=Ce([ue({type:Rt.Choice})],Ha);let ja=da=class extends Wi{constructor(t){super(t),Object.setPrototypeOf(this,da.prototype)}};ja=da=Ce([ue({type:Rt.Sequence})],ja);let _a=fa=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,fa.prototype)}};_a=fa=Ce([ue({type:Rt.Set,itemType:Eo})],_a);let Ua=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.BmpString})],Ua.prototype,"value",void 0),Ua=Ce([ue({type:Rt.Choice})],Ua);let Fa=class extends Fi{};Fa=Ce([ue({type:Rt.Sequence})],Fa);let Va=ya=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ya.prototype)}};var La;Va=ya=Ce([ue({type:Rt.Sequence,itemType:Fa})],Va);let Ga=La=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,La.prototype)}};Ga=La=Ce([ue({type:Rt.Sequence,itemType:xi})],Ga);class $a{constructor(t={}){this.version=0,this.subject=new Ie,this.subjectPKInfo=new Vi,this.attributes=new Ga,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],$a.prototype,"version",void 0),Ce([he({type:Ie})],$a.prototype,"subject",void 0),Ce([he({type:Vi})],$a.prototype,"subjectPKInfo",void 0),Ce([he({type:Ga,implicit:!0,context:0})],$a.prototype,"attributes",void 0);class Qa{constructor(t={}){this.certificationRequestInfo=new $a,this.signatureAlgorithm=new Fi,this.signature=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:$a})],Qa.prototype,"certificationRequestInfo",void 0),Ce([he({type:Fi})],Qa.prototype,"signatureAlgorithm",void 0),Ce([he({type:Ot.BitString})],Qa.prototype,"signature",void 0);export{He as $,mn as A,tr as B,Ha as C,po as D,ja as E,ir as F,or as G,Ie as H,yo as I,xe as J,Qe as K,qe as L,Re as M,_r as N,kr as O,Kt as P,gi as Q,Tr as R,Ue as S,mo as T,Da as U,Co as V,vo as W,di as X,Ni as Y,_e as Z,oi as _,xi as a,Ui as a0,Ti as a1,Xe as a2,Vs as a3,wi as a4,is as a5,ss as a6,ns as a7,Zr as a8,Is as a9,Bs as aa,Ms as ab,Ns as ac,Gs as ad,Ls as ae,hi as af,Oi as ag,Mi as ah,ji as ai,Gr as aj,sn as ak,fn as al,Pi as am,Bi as an,xr as ao,Rr as ap,Or as aq,Nr as ar,Bn as as,de as b,gn as c,Se as d,Ca as e,Aa as f,So as g,fo as h,ma as i,go as j,io as k,ro as l,Ao as m,ho as n,lo as o,uo as p,ao as q,co as r,no as s,oo as t,Dn as u,Ln as v,bn as w,wn as x,Pn as y,Qa as z}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-
|
|
4
|
+
import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-d0db9e70",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],certificateDecoded:[32]}],[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-b09a1f0b",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]],["p-7452b86e",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]]],e)));
|
|
@@ -2,4 +2,4 @@ export declare const base64Clarify: (base64: string) => string;
|
|
|
2
2
|
export declare const hexFormat: (hex: string) => string;
|
|
3
3
|
export declare const base64Format: (base64: string) => string;
|
|
4
4
|
export declare const certificateRawToBuffer: (raw: string) => ArrayBuffer;
|
|
5
|
-
export declare const getCertificateThumbprint: (algorithm: globalThis.AlgorithmIdentifier, data: ArrayBuffer) => Promise<ArrayBuffer>;
|
|
5
|
+
export declare const getCertificateThumbprint: (algorithm: globalThis.AlgorithmIdentifier, data: ArrayBuffer) => Promise<ArrayBuffer | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peculiar/certificates-viewer",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Peculiar Certificate Viewer web-components makes it easy for you to display certificate related details in your web application.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "b0e64f46e3d31cdc22fdff8f816b970b8175eb77"
|
|
75
75
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{as as a,O as i}from"./p-886e9c53.js";import{D as l}from"./p-c774ec0b.js";import{l as s}from"./p-d09b762f.js";import"./p-d0b55fbb.js";const c=class{constructor(e){t(this,e),this.detailsOpen=r(this,"detailsOpen",7),this.detailsClose=r(this,"detailsClose",7),this.certificates=[],this.filterWithSearch=!0,this.highlightWithSearch=!0,this.search="",this.certificatesDecoded=[],this.isDecodeInProcess=!0,this.isHasTests=!1,this.isHasRoots=!1,this.handleClickDetails=(t,r)=>{r.stopPropagation(),this.certificateSelectedForDetails=t,this.detailsOpen.emit(t)},this.handleModalClose=()=>{this.certificateSelectedForDetails=void 0,this.detailsClose.emit()},this.handleSearch=t=>{this.search=t.target.value.trim()}}componentWillLoad(){this.certificatesDecodeAndSet()}watchCertificates(t,r){JSON.stringify(t)!==JSON.stringify(r)&&this.certificatesDecodeAndSet()}async certificatesDecodeAndSet(){let t=!1,r=!1;if(!Array.isArray(this.certificates))return;const e=[];for(const o of this.certificates)try{const i=new a(o.value);await i.getThumbprint("SHA-1"),e.push({body:i,tests:o.tests,name:o.name}),!r&&i.isRoot&&(r=!0),t||o.tests&&(o.tests.expired||o.tests.revoked||o.tests.valid)&&(t=!0)}catch(t){console.error("Error certificate parse:",t)}this.isHasTests=t,this.isHasRoots=r,this.isDecodeInProcess=!1,this.certificatesDecoded=e}handleClickDownloadAsPem(t,r){r.stopPropagation(),l.x509.asPEM(t.body.exportAsPemFormatted(),t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),l.x509.asPEM(t.body.exportAsHexFormatted(),t.name||t.body.commonName)}handleClickRow(t){this.expandedRow=this.expandedRow===t?void 0:t}getMaxColSpanValue(){let t=4;return this.isHasTests&&(t+=1),this.isHasRoots||(t+=1),t}renderExpandedRow(t){const r=this.getMaxColSpanValue();return e("tr",{class:"expanded_summary"},e("td",{colSpan:r},e("peculiar-certificate-summary",{certificate:t,showIssuer:!t.isRoot})))}renderCertificateTests(t){if(!t)return null;const r=[];return t.valid&&r.push(e("peculiar-button",{class:"button_table_action",href:t.valid,target:"_blank"},s.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},s.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},s.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const l=a===this.expandedRow,c=i[o.body.signature.algorithm]||o.body.signature.algorithm;this.filterWithSearch&&this.search&&-1===[c,o.body.issuerCommonName,o.name,o.body.commonName,o.body.thumbprints["SHA-1"]].join(" ").toLowerCase().indexOf(this.search.toLowerCase())||r.push([e("tr",{class:{expanded:l},onClick:this.handleClickRow.bind(this,a),key:a},!this.isHasRoots&&e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("issuer"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.body.issuerCommonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("name"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.name||o.body.commonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("publicKey"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},c))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("fingerprint")," (SHA-1):"),e("peculiar-typography",{class:"content",monospace:!0},e("peculiar-highlight-words",{search:t},o.body.thumbprints["SHA-1"]))),e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},s.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:s.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},s.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),l&&this.renderExpandedRow(o.body)])})),r}renderCertificateDetailsModal(){return this.certificateSelectedForDetails?e("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},e("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),e("div",{class:"modal_container",role:"dialog",part:"presentation_container"},e("header",{class:"modal_title"},e("peculiar-typography",{type:"h4"},s.getString("certificateDetails")),e("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},e("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z"})))),e("div",{class:"modal_content"},e("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails})))):null}renderSearch(){return this.filterWithSearch||this.highlightWithSearch?e("div",{class:"search_section"},e("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"})):null}renderEmptyState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))}renderEmptySearchState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))}renderLoadingState(){return e("div",{class:"loading_container"},e("peculiar-circular-progress",null))}renderBody(){if(this.isDecodeInProcess)return null;if(!this.certificatesDecoded.length)return this.renderEmptyState();const t=this.renderContentState();return this.search&&!t.length?this.renderEmptySearchState():t}render(){return e(o,null,this.renderSearch(),e("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},e("thead",null,e("tr",null,!this.isHasRoots&&e("th",{class:"col_issuer"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("fingerprint")," (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},s.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},s.getString("testURLs"))))),e("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};c.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}';export{c as peculiar_certificates_viewer}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{c as n,a as t}from"./p-d0b55fbb.js";function r(){return(r=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n}).apply(this,arguments)}function i(n){return"/"===n.charAt(0)}function e(n,t){for(var r=t,i=r+1,e=n.length;i<e;r+=1,i+=1)n[r]=n[i];n.pop()}function o(n,t,o,u){var s;"string"==typeof n?(s=function(n){var t=n||"/",r="",i="",e=t.indexOf("#");-1!==e&&(i=t.substr(e),t=t.substr(0,e));var o=t.indexOf("?");return-1!==o&&(r=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===r?"":r,hash:"#"===i?"":i}}(n)).state=t:(void 0===(s=r({},n)).pathname&&(s.pathname=""),s.search?"?"!==s.search.charAt(0)&&(s.search="?"+s.search):s.search="",s.hash?"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash):s.hash="",void 0!==t&&void 0===s.state&&(s.state=t));try{s.pathname=decodeURI(s.pathname)}catch(n){throw n instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):n}return o&&(s.key=o),u?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=function(n,t){void 0===t&&(t="");var r,o=n&&n.split("/")||[],u=t&&t.split("/")||[],s=n&&i(n),a=t&&i(t),c=s||a;if(n&&i(n)?u=o:o.length&&(u.pop(),u=u.concat(o)),!u.length)return"/";if(u.length){var f=u[u.length-1];r="."===f||".."===f||""===f}else r=!1;for(var h=0,d=u.length;d>=0;d--){var v=u[d];"."===v?e(u,d):".."===v?(e(u,d),h++):h&&(e(u,d),h--)}if(!c)for(;h--;h)u.unshift("..");!c||""===u[0]||u[0]&&i(u[0])||u.unshift("");var l=u.join("/");return r&&"/"!==l.substr(-1)&&(l+="/"),l}(s.pathname,u.pathname)):s.pathname=u.pathname:s.pathname||(s.pathname="/"),s}var u=!("undefined"==typeof window||!window.document||!window.document.createElement);function s(n,t){t(window.confirm(n))}function a(){try{return window.history.state||{}}catch(n){return{}}}
|
|
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
|
-
const c=function(n){void 0===n&&(n={}),u||function(){throw new Error("Invariant failed")}();var t,i,e=window.history,c=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,f=!(-1===window.navigator.userAgent.indexOf("Trident")),h=n.forceRefresh,d=void 0!==h&&h,v=n.getUserConfirmation,l=void 0===v?s:v,w=n.keyLength,m=void 0===w?6:w,y=n.basename?function(n){return"/"===n.charAt(n.length-1)?n.slice(0,-1):n}("/"===(i=n.basename).charAt(0)?i:"/"+i):"";function p(n){var t=n||{},r=t.key,i=t.state,e=window.location,u=e.pathname+e.search+e.hash;return y&&(u=function(n,t){return function(n,t){return 0===n.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(n.charAt(t.length))}(n,t)?n.substr(t.length):n}(u,y)),o(u,i,r)}function M(){return Math.random().toString(36).substr(2,m)}var g,D,b=(g=null,D=[],{setPrompt:function(n){return g=n,function(){g===n&&(g=null)}},confirmTransitionTo:function(n,t,r,i){if(null!=g){var e="function"==typeof g?g(n,t):g;"string"==typeof e?"function"==typeof r?r(e,i):i(!0):i(!1!==e)}else i(!0)},appendListener:function(n){var t=!0;function r(){t&&n.apply(void 0,arguments)}return D.push(r),function(){t=!1,D=D.filter((function(n){return n!==r}))}},notifyListeners:function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];D.forEach((function(n){return n.apply(void 0,t)}))}});function S(n){r(R,n),R.length=e.length,b.notifyListeners(R.location,R.action)}function $(n){(function(n){return void 0===n.state&&-1===navigator.userAgent.indexOf("CriOS")})(n)||P(p(n.state))}function _(){P(p(a()))}var I=!1;function P(n){I?(I=!1,S()):b.confirmTransitionTo(n,"POP",l,(function(t){t?S({action:"POP",location:n}):function(n){var t=H.indexOf(R.location.key);-1===t&&(t=0);var r=H.indexOf(n.key);-1===r&&(r=0);var i=t-r;i&&(I=!0,T(i))}(n)}))}var N=p(a()),H=[N.key];function A(n){return y+function(n){var t=n.search,r=n.hash,i=n.pathname||"/";return t&&"?"!==t&&(i+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}(n)}function T(n){e.go(n)}var Y=0;function C(n){1===(Y+=n)&&1===n?(window.addEventListener("popstate",$),f&&window.addEventListener("hashchange",_)):0===Y&&(window.removeEventListener("popstate",$),f&&window.removeEventListener("hashchange",_))}var E=!1,R={length:e.length,action:"POP",location:N,createHref:A,push:function(n,t){var r="PUSH",i=o(n,t,M(),R.location);b.confirmTransitionTo(i,r,l,(function(n){if(n){var t=A(i);if(c)if(e.pushState({key:i.key,state:i.state},null,t),d)window.location.href=t;else{var o=H.indexOf(R.location.key),u=H.slice(0,o+1);u.push(i.key),H=u,S({action:r,location:i})}else window.location.href=t}}))},replace:function(n,t){var r="REPLACE",i=o(n,t,M(),R.location);b.confirmTransitionTo(i,r,l,(function(n){if(n){var t=A(i);if(c)if(e.replaceState({key:i.key,state:i.state},null,t),d)window.location.replace(t);else{var o=H.indexOf(R.location.key);-1!==o&&(H[o]=i.key),S({action:r,location:i})}else window.location.replace(t)}}))},go:T,goBack:function(){T(-1)},goForward:function(){T(1)},block:function(n){void 0===n&&(n=!1);var t=b.setPrompt(n);return E||(C(1),E=!0),function(){return E&&(E=!1,C(-1)),t()}},listen:function(n){var t=b.appendListener(n);return C(1),function(){C(-1),t()}}};return R}
|
|
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
|
-
*/(),f=Object.assign(c,{parseHash:function(n=window.location.hash){if(!n.length)return{};const t=n.replace(/^(#|\?)?\/?/,"").split("&"),r={};for(let n=0;n<t.length;n+=1){const i=t[n].split("=");try{r[i[0]]=i[1]&&decodeURIComponent(i[1])}catch(n){console.warn(n)}}return r}
|
|
20
|
-
/**
|
|
21
|
-
* @license
|
|
22
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/,queryStringify:function(n){const t=[];return Object.keys(n).forEach((r=>{"string"!=typeof n[r]&&"boolean"!=typeof n[r]&&"number"!=typeof n[r]||t.push(`${r}=${encodeURIComponent(n[r])}`)})),t.join("&")}});var h=n((function(n){n.exports=function(){var n=6e4,t=36e5,r="millisecond",i="second",e="minute",o="hour",u="day",s="week",a="month",c="quarter",f="year",h="date",d="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,l=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(n,t,r){var i=String(n);return!i||i.length>=t?n:""+Array(t+1-i.length).join(r)+n},y={s:m,z:function(n){var t=-n.utcOffset(),r=Math.abs(t),i=Math.floor(r/60),e=r%60;return(t<=0?"+":"-")+m(i,2,"0")+":"+m(e,2,"0")},m:function n(t,r){if(t.date()<r.date())return-n(r,t);var i=12*(r.year()-t.year())+(r.month()-t.month()),e=t.clone().add(i,a),o=r-e<0,u=t.clone().add(i+(o?-1:1),a);return+(-(i+(r-e)/(o?e-u:u-e))||0)},a:function(n){return n<0?Math.ceil(n)||0:Math.floor(n)},p:function(n){return{M:a,y:f,w:s,d:u,D:h,h:o,m:e,s:i,ms:r,Q:c}[n]||String(n||"").toLowerCase().replace(/s$/,"")},u:function(n){return void 0===n}},p="en",M={};M[p]=w;var g=function(n){return n instanceof $},D=function n(t,r,i){var e;if(!t)return p;if("string"==typeof t){var o=t.toLowerCase();M[o]&&(e=o),r&&(M[o]=r,e=o);var u=t.split("-");if(!e&&u.length>1)return n(u[0])}else{var s=t.name;M[s]=t,e=s}return!i&&e&&(p=e),e||!i&&p},b=function(n,t){if(g(n))return n.clone();var r="object"==typeof t?t:{};return r.date=n,r.args=arguments,new $(r)},S=y;S.l=D,S.i=g,S.w=function(n,t){return b(n,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var $=function(){function w(n){this.$L=D(n.locale,null,!0),this.parse(n)}var m=w.prototype;return m.parse=function(n){this.$d=function(n){var t=n.date,r=n.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(v);if(i){var e=i[2]-1||0,o=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)}(n),this.$x=n.x||{},this.init()},m.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(n,t){var r=b(n);return this.startOf(t)<=r&&r<=this.endOf(t)},m.isAfter=function(n,t){return b(n)<this.startOf(t)},m.isBefore=function(n,t){return this.endOf(t)<b(n)},m.$g=function(n,t,r){return S.u(n)?this[t]:this.set(r,n)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(n,t){var r=this,c=!!S.u(t)||t,d=S.p(n),v=function(n,t){var i=S.w(r.$u?Date.UTC(r.$y,t,n):new Date(r.$y,t,n),r);return c?i:i.endOf(u)},l=function(n,t){return S.w(r.toDate()[n].apply(r.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},w=this.$W,m=this.$M,y=this.$D,p="set"+(this.$u?"UTC":"");switch(d){case f:return c?v(1,0):v(31,11);case a:return c?v(1,m):v(0,m+1);case s:var M=this.$locale().weekStart||0,g=(w<M?w+7:w)-M;return v(c?y-g:y+(6-g),m);case u:case h:return l(p+"Hours",0);case o:return l(p+"Minutes",1);case e:return l(p+"Seconds",2);case i:return l(p+"Milliseconds",3);default:return this.clone()}},m.endOf=function(n){return this.startOf(n,!1)},m.$set=function(n,t){var s,c=S.p(n),d="set"+(this.$u?"UTC":""),v=(s={},s[u]=d+"Date",s[h]=d+"Date",s[a]=d+"Month",s[f]=d+"FullYear",s[o]=d+"Hours",s[e]=d+"Minutes",s[i]=d+"Seconds",s[r]=d+"Milliseconds",s)[c],l=c===u?this.$D+(t-this.$W):t;if(c===a||c===f){var w=this.clone().set(h,1);w.$d[v](l),w.init(),this.$d=w.set(h,Math.min(this.$D,w.daysInMonth())).$d}else v&&this.$d[v](l);return this.init(),this},m.set=function(n,t){return this.clone().$set(n,t)},m.get=function(n){return this[S.p(n)]()},m.add=function(r,c){var h,d=this;r=Number(r);var v=S.p(c),l=function(n){var t=b(d);return S.w(t.date(t.date()+Math.round(n*r)),d)};if(v===a)return this.set(a,this.$M+r);if(v===f)return this.set(f,this.$y+r);if(v===u)return l(1);if(v===s)return l(7);var w=(h={},h[e]=n,h[o]=t,h[i]=1e3,h)[v]||1,m=this.$d.getTime()+r*w;return S.w(m,this)},m.subtract=function(n,t){return this.add(-1*n,t)},m.format=function(n){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var i=n||"YYYY-MM-DDTHH:mm:ssZ",e=S.z(this),o=this.$H,u=this.$m,s=this.$M,a=r.weekdays,c=r.months,f=function(n,r,e,o){return n&&(n[r]||n(t,i))||e[r].slice(0,o)},h=function(n){return S.s(o%12||12,n,"0")},v=r.meridiem||function(n,t,r){var i=n<12?"AM":"PM";return r?i.toLowerCase():i},w={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:f(r.monthsShort,s,c,3),MMMM:f(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:f(r.weekdaysMin,this.$W,a,2),ddd:f(r.weekdaysShort,this.$W,a,3),dddd:a[this.$W],H:String(o),HH:S.s(o,2,"0"),h:h(1),hh:h(2),a:v(o,u,!0),A:v(o,u,!1),m:String(u),mm:S.s(u,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:e};return i.replace(l,(function(n,t){return t||w[n]||e.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,h,d){var v,l=S.p(h),w=b(r),m=(w.utcOffset()-this.utcOffset())*n,y=this-w,p=S.m(this,w);return p=(v={},v[f]=p/12,v[a]=p,v[c]=p/3,v[s]=(y-m)/6048e5,v[u]=(y-m)/864e5,v[o]=y/t,v[e]=y/n,v[i]=y/1e3,v)[l]||y,d?p:S.a(p)},m.daysInMonth=function(){return this.endOf(a).$D},m.$locale=function(){return M[this.$L]},m.locale=function(n,t){if(!n)return this.$L;var r=this.clone(),i=D(n,t,!0);return i&&(r.$L=i),r},m.clone=function(){return S.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},w}(),_=$.prototype;return b.prototype=_,[["$ms",r],["$s",i],["$m",e],["$H",o],["$W",u],["$M",a],["$y",f],["$D",h]].forEach((function(n){_[n[1]]=function(t){return this.$g(t,n[0],n[1])}})),b.extend=function(n,t){return n.$i||(n(t,$,b),n.$i=!0),b},b.locale=D,b.isDayjs=g,b.unix=function(n){return b(1e3*n)},b.en=M[p],b.Ls=M,b.p={},b}()}));
|
|
27
|
-
/**
|
|
28
|
-
* @license
|
|
29
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/const d=n=>new Date(n).toUTCString(),v=(n,t)=>{if(!n||!t)return"";const r=h(n),i=h(t),e=n=>1===n?"":"s",o=i.diff(r,"year",!0);if(Number.isInteger(o))return`${o} year${e(o)}`;const u=i.diff(r,"month",!0);if(Number.isInteger(u))return`${u} month${e(u)}`;const s=i.diff(r,"day");return`${s} day${e(s)}`},l={en:{basicInformation:"Basic Information",subjectName:"Subject Name",issuerName:"Issuer Name",publicKeyInfo:"Public Key Info",signature:"Signature",extensions:"Extensions",miscellaneous:"Miscellaneous",download:"Download","download.pem":"Download PEM","download.der":"Download DER",serialNumber:"Serial Number",version:"Version",validity:"Validity",issued:"Issued",expired:"Expired",algorithm:"Algorithm",namedCurve:"Named Curve",exponent:"Exponent",modulus:"Modulus",value:"Value",valid:"Valid",revoked:"Revoked",issuer:"Issuer",name:"Name",publicKey:"Public Key",fingerprint:"Fingerprint",fingerprints:"Fingerprints",actions:"Actions",details:"Details",testURLs:"Test URLs",certificateDetails:"Certificate Details",holder:"Holder",digestInfo:"Digest Info",type:"Type"}},w=new class{constructor(){this.setLocale=n=>{this.locale=n&&l[n]?n:"en"},this.getLocale=()=>this.locale;const n=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(n)}getString(n,t){const r=l[this.locale][n];if(!r)return"";if(!t)return r;const i=r.split(t.pattern);return i.length>1?[i[0],t.replacer,i[1]]:r}};export{d as a,v as d,f as h,w as l}
|