@opensecret/react 1.0.0-beta.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.d.ts +14 -5
- package/dist/opensecret-react.es.js +577 -569
- package/dist/opensecret-react.umd.js +17 -17
- package/package.json +1 -1
|
@@ -58,7 +58,10 @@ class Cy {
|
|
|
58
58
|
* Build a complete URL for an API path
|
|
59
59
|
*/
|
|
60
60
|
buildUrl(e) {
|
|
61
|
-
|
|
61
|
+
if (e.startsWith("http"))
|
|
62
|
+
return e;
|
|
63
|
+
const t = this.resolveEndpoint(e), n = t.baseUrl.endsWith("/") ? t.baseUrl.slice(0, -1) : t.baseUrl, i = e.startsWith("/") ? e : `/${e}`;
|
|
64
|
+
return `${n}${i}`;
|
|
62
65
|
}
|
|
63
66
|
/**
|
|
64
67
|
* Get the appropriate refresh token function name for a given path
|
|
@@ -159,10 +162,10 @@ function Cr(r) {
|
|
|
159
162
|
}
|
|
160
163
|
const Oy = 20;
|
|
161
164
|
function Ty(r, e, t) {
|
|
162
|
-
let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], h = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], m = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], x = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], G = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20],
|
|
165
|
+
let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], h = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], m = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], x = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], G = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], N = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], v = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], A = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], O = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], k = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], j = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], R = n, le = i, X = s, re = o, Y = c, ye = u, Fe = h, lt = m, St = x, Bt = G, Ot = N, _t = v, ut = A, Ye = O, ae = k, Ee = j;
|
|
163
166
|
for (let pt = 0; pt < Oy; pt += 2)
|
|
164
167
|
R = R + Y | 0, ut ^= R, ut = ut >>> 16 | ut << 16, St = St + ut | 0, Y ^= St, Y = Y >>> 20 | Y << 12, le = le + ye | 0, Ye ^= le, Ye = Ye >>> 16 | Ye << 16, Bt = Bt + Ye | 0, ye ^= Bt, ye = ye >>> 20 | ye << 12, X = X + Fe | 0, ae ^= X, ae = ae >>> 16 | ae << 16, Ot = Ot + ae | 0, Fe ^= Ot, Fe = Fe >>> 20 | Fe << 12, re = re + lt | 0, Ee ^= re, Ee = Ee >>> 16 | Ee << 16, _t = _t + Ee | 0, lt ^= _t, lt = lt >>> 20 | lt << 12, X = X + Fe | 0, ae ^= X, ae = ae >>> 24 | ae << 8, Ot = Ot + ae | 0, Fe ^= Ot, Fe = Fe >>> 25 | Fe << 7, re = re + lt | 0, Ee ^= re, Ee = Ee >>> 24 | Ee << 8, _t = _t + Ee | 0, lt ^= _t, lt = lt >>> 25 | lt << 7, le = le + ye | 0, Ye ^= le, Ye = Ye >>> 24 | Ye << 8, Bt = Bt + Ye | 0, ye ^= Bt, ye = ye >>> 25 | ye << 7, R = R + Y | 0, ut ^= R, ut = ut >>> 24 | ut << 8, St = St + ut | 0, Y ^= St, Y = Y >>> 25 | Y << 7, R = R + ye | 0, Ee ^= R, Ee = Ee >>> 16 | Ee << 16, Ot = Ot + Ee | 0, ye ^= Ot, ye = ye >>> 20 | ye << 12, le = le + Fe | 0, ut ^= le, ut = ut >>> 16 | ut << 16, _t = _t + ut | 0, Fe ^= _t, Fe = Fe >>> 20 | Fe << 12, X = X + lt | 0, Ye ^= X, Ye = Ye >>> 16 | Ye << 16, St = St + Ye | 0, lt ^= St, lt = lt >>> 20 | lt << 12, re = re + Y | 0, ae ^= re, ae = ae >>> 16 | ae << 16, Bt = Bt + ae | 0, Y ^= Bt, Y = Y >>> 20 | Y << 12, X = X + lt | 0, Ye ^= X, Ye = Ye >>> 24 | Ye << 8, St = St + Ye | 0, lt ^= St, lt = lt >>> 25 | lt << 7, re = re + Y | 0, ae ^= re, ae = ae >>> 24 | ae << 8, Bt = Bt + ae | 0, Y ^= Bt, Y = Y >>> 25 | Y << 7, le = le + Fe | 0, ut ^= le, ut = ut >>> 24 | ut << 8, _t = _t + ut | 0, Fe ^= _t, Fe = Fe >>> 25 | Fe << 7, R = R + ye | 0, Ee ^= R, Ee = Ee >>> 24 | Ee << 8, Ot = Ot + Ee | 0, ye ^= Ot, ye = ye >>> 25 | ye << 7;
|
|
165
|
-
Gt(R + n | 0, r, 0), Gt(le + i | 0, r, 4), Gt(X + s | 0, r, 8), Gt(re + o | 0, r, 12), Gt(Y + c | 0, r, 16), Gt(ye + u | 0, r, 20), Gt(Fe + h | 0, r, 24), Gt(lt + m | 0, r, 28), Gt(St + x | 0, r, 32), Gt(Bt + G | 0, r, 36), Gt(Ot +
|
|
168
|
+
Gt(R + n | 0, r, 0), Gt(le + i | 0, r, 4), Gt(X + s | 0, r, 8), Gt(re + o | 0, r, 12), Gt(Y + c | 0, r, 16), Gt(ye + u | 0, r, 20), Gt(Fe + h | 0, r, 24), Gt(lt + m | 0, r, 28), Gt(St + x | 0, r, 32), Gt(Bt + G | 0, r, 36), Gt(Ot + N | 0, r, 40), Gt(_t + v | 0, r, 44), Gt(ut + A | 0, r, 48), Gt(Ye + O | 0, r, 52), Gt(ae + k | 0, r, 56), Gt(Ee + j | 0, r, 60);
|
|
166
169
|
}
|
|
167
170
|
function il(r, e, t, n, i = 0) {
|
|
168
171
|
if (r.length !== 32)
|
|
@@ -238,7 +241,7 @@ class Uy {
|
|
|
238
241
|
this._r[8] = (u >>> 8 | h << 8) & 8191, this._r[9] = h >>> 5 & 127, this._pad[0] = e[16] | e[17] << 8, this._pad[1] = e[18] | e[19] << 8, this._pad[2] = e[20] | e[21] << 8, this._pad[3] = e[22] | e[23] << 8, this._pad[4] = e[24] | e[25] << 8, this._pad[5] = e[26] | e[27] << 8, this._pad[6] = e[28] | e[29] << 8, this._pad[7] = e[30] | e[31] << 8;
|
|
239
242
|
}
|
|
240
243
|
_blocks(e, t, n) {
|
|
241
|
-
let i = this._fin ? 0 : 2048, s = this._h[0], o = this._h[1], c = this._h[2], u = this._h[3], h = this._h[4], m = this._h[5], x = this._h[6], G = this._h[7],
|
|
244
|
+
let i = this._fin ? 0 : 2048, s = this._h[0], o = this._h[1], c = this._h[2], u = this._h[3], h = this._h[4], m = this._h[5], x = this._h[6], G = this._h[7], N = this._h[8], v = this._h[9], A = this._r[0], O = this._r[1], k = this._r[2], j = this._r[3], R = this._r[4], le = this._r[5], X = this._r[6], re = this._r[7], Y = this._r[8], ye = this._r[9];
|
|
242
245
|
for (; n >= 16; ) {
|
|
243
246
|
let Fe = e[t + 0] | e[t + 1] << 8;
|
|
244
247
|
s += Fe & 8191;
|
|
@@ -255,29 +258,29 @@ class Uy {
|
|
|
255
258
|
let ut = e[t + 12] | e[t + 13] << 8;
|
|
256
259
|
G += (_t >>> 11 | ut << 5) & 8191;
|
|
257
260
|
let Ye = e[t + 14] | e[t + 15] << 8;
|
|
258
|
-
|
|
261
|
+
N += (ut >>> 8 | Ye << 8) & 8191, v += Ye >>> 5 | i;
|
|
259
262
|
let ae = 0, Ee = ae;
|
|
260
|
-
Ee += s * A, Ee += o * (5 * ye), Ee += c * (5 * Y), Ee += u * (5 * re), Ee += h * (5 * X), ae = Ee >>> 13, Ee &= 8191, Ee += m * (5 * le), Ee += x * (5 * R), Ee += G * (5 * j), Ee +=
|
|
263
|
+
Ee += s * A, Ee += o * (5 * ye), Ee += c * (5 * Y), Ee += u * (5 * re), Ee += h * (5 * X), ae = Ee >>> 13, Ee &= 8191, Ee += m * (5 * le), Ee += x * (5 * R), Ee += G * (5 * j), Ee += N * (5 * k), Ee += v * (5 * O), ae += Ee >>> 13, Ee &= 8191;
|
|
261
264
|
let pt = ae;
|
|
262
|
-
pt += s * O, pt += o * A, pt += c * (5 * ye), pt += u * (5 * Y), pt += h * (5 * re), ae = pt >>> 13, pt &= 8191, pt += m * (5 * X), pt += x * (5 * le), pt += G * (5 * R), pt +=
|
|
265
|
+
pt += s * O, pt += o * A, pt += c * (5 * ye), pt += u * (5 * Y), pt += h * (5 * re), ae = pt >>> 13, pt &= 8191, pt += m * (5 * X), pt += x * (5 * le), pt += G * (5 * R), pt += N * (5 * j), pt += v * (5 * k), ae += pt >>> 13, pt &= 8191;
|
|
263
266
|
let Rt = ae;
|
|
264
|
-
Rt += s * k, Rt += o * O, Rt += c * A, Rt += u * (5 * ye), Rt += h * (5 * Y), ae = Rt >>> 13, Rt &= 8191, Rt += m * (5 * re), Rt += x * (5 * X), Rt += G * (5 * le), Rt +=
|
|
267
|
+
Rt += s * k, Rt += o * O, Rt += c * A, Rt += u * (5 * ye), Rt += h * (5 * Y), ae = Rt >>> 13, Rt &= 8191, Rt += m * (5 * re), Rt += x * (5 * X), Rt += G * (5 * le), Rt += N * (5 * R), Rt += v * (5 * j), ae += Rt >>> 13, Rt &= 8191;
|
|
265
268
|
let Ut = ae;
|
|
266
|
-
Ut += s * j, Ut += o * k, Ut += c * O, Ut += u * A, Ut += h * (5 * ye), ae = Ut >>> 13, Ut &= 8191, Ut += m * (5 * Y), Ut += x * (5 * re), Ut += G * (5 * X), Ut +=
|
|
269
|
+
Ut += s * j, Ut += o * k, Ut += c * O, Ut += u * A, Ut += h * (5 * ye), ae = Ut >>> 13, Ut &= 8191, Ut += m * (5 * Y), Ut += x * (5 * re), Ut += G * (5 * X), Ut += N * (5 * le), Ut += v * (5 * R), ae += Ut >>> 13, Ut &= 8191;
|
|
267
270
|
let fe = ae;
|
|
268
|
-
fe += s * R, fe += o * j, fe += c * k, fe += u * O, fe += h * A, ae = fe >>> 13, fe &= 8191, fe += m * (5 * ye), fe += x * (5 * Y), fe += G * (5 * re), fe +=
|
|
271
|
+
fe += s * R, fe += o * j, fe += c * k, fe += u * O, fe += h * A, ae = fe >>> 13, fe &= 8191, fe += m * (5 * ye), fe += x * (5 * Y), fe += G * (5 * re), fe += N * (5 * X), fe += v * (5 * le), ae += fe >>> 13, fe &= 8191;
|
|
269
272
|
let tt = ae;
|
|
270
|
-
tt += s * le, tt += o * R, tt += c * j, tt += u * k, tt += h * O, ae = tt >>> 13, tt &= 8191, tt += m * A, tt += x * (5 * ye), tt += G * (5 * Y), tt +=
|
|
273
|
+
tt += s * le, tt += o * R, tt += c * j, tt += u * k, tt += h * O, ae = tt >>> 13, tt &= 8191, tt += m * A, tt += x * (5 * ye), tt += G * (5 * Y), tt += N * (5 * re), tt += v * (5 * X), ae += tt >>> 13, tt &= 8191;
|
|
271
274
|
let yt = ae;
|
|
272
|
-
yt += s * X, yt += o * le, yt += c * R, yt += u * j, yt += h * k, ae = yt >>> 13, yt &= 8191, yt += m * O, yt += x * A, yt += G * (5 * ye), yt +=
|
|
275
|
+
yt += s * X, yt += o * le, yt += c * R, yt += u * j, yt += h * k, ae = yt >>> 13, yt &= 8191, yt += m * O, yt += x * A, yt += G * (5 * ye), yt += N * (5 * Y), yt += v * (5 * re), ae += yt >>> 13, yt &= 8191;
|
|
273
276
|
let te = ae;
|
|
274
|
-
te += s * re, te += o * X, te += c * le, te += u * R, te += h * j, ae = te >>> 13, te &= 8191, te += m * k, te += x * O, te += G * A, te +=
|
|
277
|
+
te += s * re, te += o * X, te += c * le, te += u * R, te += h * j, ae = te >>> 13, te &= 8191, te += m * k, te += x * O, te += G * A, te += N * (5 * ye), te += v * (5 * Y), ae += te >>> 13, te &= 8191;
|
|
275
278
|
let ht = ae;
|
|
276
|
-
ht += s * Y, ht += o * re, ht += c * X, ht += u * le, ht += h * R, ae = ht >>> 13, ht &= 8191, ht += m * j, ht += x * k, ht += G * O, ht +=
|
|
279
|
+
ht += s * Y, ht += o * re, ht += c * X, ht += u * le, ht += h * R, ae = ht >>> 13, ht &= 8191, ht += m * j, ht += x * k, ht += G * O, ht += N * A, ht += v * (5 * ye), ae += ht >>> 13, ht &= 8191;
|
|
277
280
|
let Mt = ae;
|
|
278
|
-
Mt += s * ye, Mt += o * Y, Mt += c * re, Mt += u * X, Mt += h * le, ae = Mt >>> 13, Mt &= 8191, Mt += m * R, Mt += x * j, Mt += G * k, Mt +=
|
|
281
|
+
Mt += s * ye, Mt += o * Y, Mt += c * re, Mt += u * X, Mt += h * le, ae = Mt >>> 13, Mt &= 8191, Mt += m * R, Mt += x * j, Mt += G * k, Mt += N * O, Mt += v * A, ae += Mt >>> 13, Mt &= 8191, ae = (ae << 2) + ae | 0, ae = ae + Ee | 0, Ee = ae & 8191, ae = ae >>> 13, pt += ae, s = Ee, o = pt, c = Rt, u = Ut, h = fe, m = tt, x = yt, G = te, N = ht, v = Mt, t += 16, n -= 16;
|
|
279
282
|
}
|
|
280
|
-
this._h[0] = s, this._h[1] = o, this._h[2] = c, this._h[3] = u, this._h[4] = h, this._h[5] = m, this._h[6] = x, this._h[7] = G, this._h[8] =
|
|
283
|
+
this._h[0] = s, this._h[1] = o, this._h[2] = c, this._h[3] = u, this._h[4] = h, this._h[5] = m, this._h[6] = x, this._h[7] = G, this._h[8] = N, this._h[9] = v;
|
|
281
284
|
}
|
|
282
285
|
finish(e, t = 0) {
|
|
283
286
|
const n = new Uint16Array(10);
|
|
@@ -529,9 +532,9 @@ var Of;
|
|
|
529
532
|
} : function(_, I) {
|
|
530
533
|
return _[I];
|
|
531
534
|
}
|
|
532
|
-
}, x = Object.getPrototypeOf(Function), G = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : bs(),
|
|
533
|
-
function j(_, I,
|
|
534
|
-
if (fe(
|
|
535
|
+
}, x = Object.getPrototypeOf(Function), G = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : bs(), N = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : xs(), v = typeof WeakMap == "function" ? WeakMap : Bo(), A = i ? Symbol.for("@reflect-metadata:registry") : void 0, O = ms(), k = Oi(O);
|
|
536
|
+
function j(_, I, T, K) {
|
|
537
|
+
if (fe(T)) {
|
|
535
538
|
if (!hs(_))
|
|
536
539
|
throw new TypeError();
|
|
537
540
|
if (!ds(I))
|
|
@@ -544,49 +547,49 @@ var Of;
|
|
|
544
547
|
throw new TypeError();
|
|
545
548
|
if (!te(K) && !fe(K) && !tt(K))
|
|
546
549
|
throw new TypeError();
|
|
547
|
-
return tt(K) && (K = void 0),
|
|
550
|
+
return tt(K) && (K = void 0), T = or(T), Ot(_, I, T, K);
|
|
548
551
|
}
|
|
549
552
|
}
|
|
550
553
|
e("decorate", j);
|
|
551
554
|
function R(_, I) {
|
|
552
|
-
function
|
|
555
|
+
function T(K, xe) {
|
|
553
556
|
if (!te(K))
|
|
554
557
|
throw new TypeError();
|
|
555
558
|
if (!fe(xe) && !$c(xe))
|
|
556
559
|
throw new TypeError();
|
|
557
560
|
Ee(_, I, K, xe);
|
|
558
561
|
}
|
|
559
|
-
return
|
|
562
|
+
return T;
|
|
560
563
|
}
|
|
561
564
|
e("metadata", R);
|
|
562
|
-
function le(_, I,
|
|
563
|
-
if (!te(
|
|
565
|
+
function le(_, I, T, K) {
|
|
566
|
+
if (!te(T))
|
|
564
567
|
throw new TypeError();
|
|
565
|
-
return fe(K) || (K = or(K)), Ee(_, I,
|
|
568
|
+
return fe(K) || (K = or(K)), Ee(_, I, T, K);
|
|
566
569
|
}
|
|
567
570
|
e("defineMetadata", le);
|
|
568
|
-
function X(_, I,
|
|
571
|
+
function X(_, I, T) {
|
|
569
572
|
if (!te(I))
|
|
570
573
|
throw new TypeError();
|
|
571
|
-
return fe(
|
|
574
|
+
return fe(T) || (T = or(T)), _t(_, I, T);
|
|
572
575
|
}
|
|
573
576
|
e("hasMetadata", X);
|
|
574
|
-
function re(_, I,
|
|
577
|
+
function re(_, I, T) {
|
|
575
578
|
if (!te(I))
|
|
576
579
|
throw new TypeError();
|
|
577
|
-
return fe(
|
|
580
|
+
return fe(T) || (T = or(T)), ut(_, I, T);
|
|
578
581
|
}
|
|
579
582
|
e("hasOwnMetadata", re);
|
|
580
|
-
function Y(_, I,
|
|
583
|
+
function Y(_, I, T) {
|
|
581
584
|
if (!te(I))
|
|
582
585
|
throw new TypeError();
|
|
583
|
-
return fe(
|
|
586
|
+
return fe(T) || (T = or(T)), Ye(_, I, T);
|
|
584
587
|
}
|
|
585
588
|
e("getMetadata", Y);
|
|
586
|
-
function ye(_, I,
|
|
589
|
+
function ye(_, I, T) {
|
|
587
590
|
if (!te(I))
|
|
588
591
|
throw new TypeError();
|
|
589
|
-
return fe(
|
|
592
|
+
return fe(T) || (T = or(T)), ae(_, I, T);
|
|
590
593
|
}
|
|
591
594
|
e("getOwnMetadata", ye);
|
|
592
595
|
function Fe(_, I) {
|
|
@@ -601,24 +604,24 @@ var Of;
|
|
|
601
604
|
return fe(I) || (I = or(I)), Rt(_, I);
|
|
602
605
|
}
|
|
603
606
|
e("getOwnMetadataKeys", lt);
|
|
604
|
-
function St(_, I,
|
|
607
|
+
function St(_, I, T) {
|
|
605
608
|
if (!te(I))
|
|
606
609
|
throw new TypeError();
|
|
607
|
-
if (fe(
|
|
610
|
+
if (fe(T) || (T = or(T)), !te(I))
|
|
608
611
|
throw new TypeError();
|
|
609
|
-
fe(
|
|
612
|
+
fe(T) || (T = or(T));
|
|
610
613
|
var K = Wr(
|
|
611
614
|
I,
|
|
612
|
-
|
|
615
|
+
T,
|
|
613
616
|
/*Create*/
|
|
614
617
|
!1
|
|
615
618
|
);
|
|
616
|
-
return fe(K) ? !1 : K.OrdinaryDeleteMetadata(_, I,
|
|
619
|
+
return fe(K) ? !1 : K.OrdinaryDeleteMetadata(_, I, T);
|
|
617
620
|
}
|
|
618
621
|
e("deleteMetadata", St);
|
|
619
622
|
function Bt(_, I) {
|
|
620
|
-
for (var
|
|
621
|
-
var K = _[
|
|
623
|
+
for (var T = _.length - 1; T >= 0; --T) {
|
|
624
|
+
var K = _[T], xe = K(I);
|
|
622
625
|
if (!fe(xe) && !tt(xe)) {
|
|
623
626
|
if (!ds(xe))
|
|
624
627
|
throw new TypeError();
|
|
@@ -627,9 +630,9 @@ var Of;
|
|
|
627
630
|
}
|
|
628
631
|
return I;
|
|
629
632
|
}
|
|
630
|
-
function Ot(_, I,
|
|
633
|
+
function Ot(_, I, T, K) {
|
|
631
634
|
for (var xe = _.length - 1; xe >= 0; --xe) {
|
|
632
|
-
var bt = _[xe], xt = bt(I,
|
|
635
|
+
var bt = _[xe], xt = bt(I, T, K);
|
|
633
636
|
if (!fe(xt) && !tt(xt)) {
|
|
634
637
|
if (!te(xt))
|
|
635
638
|
throw new TypeError();
|
|
@@ -638,60 +641,60 @@ var Of;
|
|
|
638
641
|
}
|
|
639
642
|
return K;
|
|
640
643
|
}
|
|
641
|
-
function _t(_, I,
|
|
642
|
-
var K = ut(_, I,
|
|
644
|
+
function _t(_, I, T) {
|
|
645
|
+
var K = ut(_, I, T);
|
|
643
646
|
if (K)
|
|
644
647
|
return !0;
|
|
645
648
|
var xe = Bi(I);
|
|
646
|
-
return tt(xe) ? !1 : _t(_, xe,
|
|
649
|
+
return tt(xe) ? !1 : _t(_, xe, T);
|
|
647
650
|
}
|
|
648
|
-
function ut(_, I,
|
|
651
|
+
function ut(_, I, T) {
|
|
649
652
|
var K = Wr(
|
|
650
653
|
I,
|
|
651
|
-
|
|
654
|
+
T,
|
|
652
655
|
/*Create*/
|
|
653
656
|
!1
|
|
654
657
|
);
|
|
655
|
-
return fe(K) ? !1 : fs(K.OrdinaryHasOwnMetadata(_, I,
|
|
658
|
+
return fe(K) ? !1 : fs(K.OrdinaryHasOwnMetadata(_, I, T));
|
|
656
659
|
}
|
|
657
|
-
function Ye(_, I,
|
|
658
|
-
var K = ut(_, I,
|
|
660
|
+
function Ye(_, I, T) {
|
|
661
|
+
var K = ut(_, I, T);
|
|
659
662
|
if (K)
|
|
660
|
-
return ae(_, I,
|
|
663
|
+
return ae(_, I, T);
|
|
661
664
|
var xe = Bi(I);
|
|
662
665
|
if (!tt(xe))
|
|
663
|
-
return Ye(_, xe,
|
|
666
|
+
return Ye(_, xe, T);
|
|
664
667
|
}
|
|
665
|
-
function ae(_, I,
|
|
668
|
+
function ae(_, I, T) {
|
|
666
669
|
var K = Wr(
|
|
667
670
|
I,
|
|
668
|
-
|
|
671
|
+
T,
|
|
669
672
|
/*Create*/
|
|
670
673
|
!1
|
|
671
674
|
);
|
|
672
675
|
if (!fe(K))
|
|
673
|
-
return K.OrdinaryGetOwnMetadata(_, I,
|
|
676
|
+
return K.OrdinaryGetOwnMetadata(_, I, T);
|
|
674
677
|
}
|
|
675
|
-
function Ee(_, I,
|
|
678
|
+
function Ee(_, I, T, K) {
|
|
676
679
|
var xe = Wr(
|
|
677
|
-
|
|
680
|
+
T,
|
|
678
681
|
K,
|
|
679
682
|
/*Create*/
|
|
680
683
|
!0
|
|
681
684
|
);
|
|
682
|
-
xe.OrdinaryDefineOwnMetadata(_, I,
|
|
685
|
+
xe.OrdinaryDefineOwnMetadata(_, I, T, K);
|
|
683
686
|
}
|
|
684
687
|
function pt(_, I) {
|
|
685
|
-
var
|
|
688
|
+
var T = Rt(_, I), K = Bi(_);
|
|
686
689
|
if (K === null)
|
|
687
|
-
return
|
|
690
|
+
return T;
|
|
688
691
|
var xe = pt(K, I);
|
|
689
692
|
if (xe.length <= 0)
|
|
690
|
-
return
|
|
691
|
-
if (
|
|
693
|
+
return T;
|
|
694
|
+
if (T.length <= 0)
|
|
692
695
|
return xe;
|
|
693
|
-
for (var bt = new
|
|
694
|
-
var ne =
|
|
696
|
+
for (var bt = new N(), xt = [], je = 0, Z = T; je < Z.length; je++) {
|
|
697
|
+
var ne = Z[je], he = bt.has(ne);
|
|
695
698
|
he || (bt.add(ne), xt.push(ne));
|
|
696
699
|
}
|
|
697
700
|
for (var ve = 0, We = xe; ve < We.length; ve++) {
|
|
@@ -701,13 +704,13 @@ var Of;
|
|
|
701
704
|
return xt;
|
|
702
705
|
}
|
|
703
706
|
function Rt(_, I) {
|
|
704
|
-
var
|
|
707
|
+
var T = Wr(
|
|
705
708
|
_,
|
|
706
709
|
I,
|
|
707
710
|
/*create*/
|
|
708
711
|
!1
|
|
709
712
|
);
|
|
710
|
-
return
|
|
713
|
+
return T ? T.OrdinaryOwnMetadataKeys(_, I) : [];
|
|
711
714
|
}
|
|
712
715
|
function Ut(_) {
|
|
713
716
|
if (_ === null)
|
|
@@ -756,9 +759,9 @@ var Of;
|
|
|
756
759
|
case 5:
|
|
757
760
|
return _;
|
|
758
761
|
}
|
|
759
|
-
var
|
|
762
|
+
var T = "string", K = Co(_, s);
|
|
760
763
|
if (K !== void 0) {
|
|
761
|
-
var xe = K.call(_,
|
|
764
|
+
var xe = K.call(_, T);
|
|
762
765
|
if (te(xe))
|
|
763
766
|
throw new TypeError();
|
|
764
767
|
return xe;
|
|
@@ -766,7 +769,7 @@ var Of;
|
|
|
766
769
|
return Mt(_);
|
|
767
770
|
}
|
|
768
771
|
function Mt(_, I) {
|
|
769
|
-
var
|
|
772
|
+
var T, K;
|
|
770
773
|
{
|
|
771
774
|
var xe = _.toString;
|
|
772
775
|
if (pn(xe)) {
|
|
@@ -774,9 +777,9 @@ var Of;
|
|
|
774
777
|
if (!te(K))
|
|
775
778
|
return K;
|
|
776
779
|
}
|
|
777
|
-
var
|
|
778
|
-
if (pn(
|
|
779
|
-
var K =
|
|
780
|
+
var T = _.valueOf;
|
|
781
|
+
if (pn(T)) {
|
|
782
|
+
var K = T.call(_);
|
|
780
783
|
if (!te(K))
|
|
781
784
|
return K;
|
|
782
785
|
}
|
|
@@ -816,26 +819,26 @@ var Of;
|
|
|
816
819
|
return _ === I || _ !== _ && I !== I;
|
|
817
820
|
}
|
|
818
821
|
function Co(_, I) {
|
|
819
|
-
var
|
|
820
|
-
if (
|
|
821
|
-
if (!pn(
|
|
822
|
+
var T = _[I];
|
|
823
|
+
if (T != null) {
|
|
824
|
+
if (!pn(T))
|
|
822
825
|
throw new TypeError();
|
|
823
|
-
return
|
|
826
|
+
return T;
|
|
824
827
|
}
|
|
825
828
|
}
|
|
826
829
|
function ys(_) {
|
|
827
830
|
var I = Co(_, o);
|
|
828
831
|
if (!pn(I))
|
|
829
832
|
throw new TypeError();
|
|
830
|
-
var
|
|
831
|
-
if (!te(
|
|
833
|
+
var T = I.call(_);
|
|
834
|
+
if (!te(T))
|
|
832
835
|
throw new TypeError();
|
|
833
|
-
return
|
|
836
|
+
return T;
|
|
834
837
|
}
|
|
835
838
|
function gs(_) {
|
|
836
839
|
return _.value;
|
|
837
840
|
}
|
|
838
|
-
function
|
|
841
|
+
function Zr(_) {
|
|
839
842
|
var I = _.next();
|
|
840
843
|
return I.done ? !1 : I;
|
|
841
844
|
}
|
|
@@ -847,7 +850,7 @@ var Of;
|
|
|
847
850
|
var I = Object.getPrototypeOf(_);
|
|
848
851
|
if (typeof _ != "function" || _ === x || I !== x)
|
|
849
852
|
return I;
|
|
850
|
-
var
|
|
853
|
+
var T = _.prototype, K = T && Object.getPrototypeOf(T);
|
|
851
854
|
if (K == null || K === Object.prototype)
|
|
852
855
|
return I;
|
|
853
856
|
var xe = K.constructor;
|
|
@@ -856,9 +859,9 @@ var Of;
|
|
|
856
859
|
function vs() {
|
|
857
860
|
var _;
|
|
858
861
|
!fe(A) && typeof t.Reflect < "u" && !(A in t.Reflect) && typeof t.Reflect.defineMetadata == "function" && (_ = ws(t.Reflect));
|
|
859
|
-
var I,
|
|
862
|
+
var I, T, K, xe = new v(), bt = {
|
|
860
863
|
registerProvider: xt,
|
|
861
|
-
getProvider:
|
|
864
|
+
getProvider: Z,
|
|
862
865
|
setProvider: he
|
|
863
866
|
};
|
|
864
867
|
return bt;
|
|
@@ -873,13 +876,13 @@ var Of;
|
|
|
873
876
|
break;
|
|
874
877
|
case I === ve:
|
|
875
878
|
break;
|
|
876
|
-
case fe(
|
|
877
|
-
|
|
879
|
+
case fe(T):
|
|
880
|
+
T = ve;
|
|
878
881
|
break;
|
|
879
|
-
case
|
|
882
|
+
case T === ve:
|
|
880
883
|
break;
|
|
881
884
|
default:
|
|
882
|
-
K === void 0 && (K = new
|
|
885
|
+
K === void 0 && (K = new N()), K.add(ve);
|
|
883
886
|
break;
|
|
884
887
|
}
|
|
885
888
|
}
|
|
@@ -887,12 +890,12 @@ var Of;
|
|
|
887
890
|
if (!fe(I)) {
|
|
888
891
|
if (I.isProviderFor(ve, We))
|
|
889
892
|
return I;
|
|
890
|
-
if (!fe(
|
|
891
|
-
if (
|
|
893
|
+
if (!fe(T)) {
|
|
894
|
+
if (T.isProviderFor(ve, We))
|
|
892
895
|
return I;
|
|
893
896
|
if (!fe(K))
|
|
894
897
|
for (var Xe = ys(K); ; ) {
|
|
895
|
-
var gt =
|
|
898
|
+
var gt = Zr(Xe);
|
|
896
899
|
if (!gt)
|
|
897
900
|
return;
|
|
898
901
|
var zt = gs(gt);
|
|
@@ -904,19 +907,19 @@ var Of;
|
|
|
904
907
|
if (!fe(_) && _.isProviderFor(ve, We))
|
|
905
908
|
return _;
|
|
906
909
|
}
|
|
907
|
-
function
|
|
910
|
+
function Z(ve, We) {
|
|
908
911
|
var Xe = xe.get(ve), gt;
|
|
909
912
|
return fe(Xe) || (gt = Xe.get(We)), fe(gt) && (gt = je(ve, We), fe(gt) || (fe(Xe) && (Xe = new G(), xe.set(ve, Xe)), Xe.set(We, gt))), gt;
|
|
910
913
|
}
|
|
911
914
|
function ne(ve) {
|
|
912
915
|
if (fe(ve))
|
|
913
916
|
throw new TypeError();
|
|
914
|
-
return I === ve ||
|
|
917
|
+
return I === ve || T === ve || !fe(K) && K.has(ve);
|
|
915
918
|
}
|
|
916
919
|
function he(ve, We, Xe) {
|
|
917
920
|
if (!ne(Xe))
|
|
918
921
|
throw new Error("Metadata provider not registered.");
|
|
919
|
-
var gt =
|
|
922
|
+
var gt = Z(ve, We);
|
|
920
923
|
if (gt !== Xe) {
|
|
921
924
|
if (!fe(gt))
|
|
922
925
|
return !1;
|
|
@@ -936,7 +939,7 @@ var Of;
|
|
|
936
939
|
}), _;
|
|
937
940
|
}
|
|
938
941
|
function Oi(_) {
|
|
939
|
-
var I = new v(),
|
|
942
|
+
var I = new v(), T = {
|
|
940
943
|
isProviderFor: function(ne, he) {
|
|
941
944
|
var ve = I.get(ne);
|
|
942
945
|
return fe(ve) ? !1 : ve.has(he);
|
|
@@ -945,9 +948,9 @@ var Of;
|
|
|
945
948
|
OrdinaryHasOwnMetadata: xe,
|
|
946
949
|
OrdinaryGetOwnMetadata: bt,
|
|
947
950
|
OrdinaryOwnMetadataKeys: je,
|
|
948
|
-
OrdinaryDeleteMetadata:
|
|
951
|
+
OrdinaryDeleteMetadata: Z
|
|
949
952
|
};
|
|
950
|
-
return O.registerProvider(
|
|
953
|
+
return O.registerProvider(T), T;
|
|
951
954
|
function K(ne, he, ve) {
|
|
952
955
|
var We = I.get(ne), Xe = !1;
|
|
953
956
|
if (fe(We)) {
|
|
@@ -959,7 +962,7 @@ var Of;
|
|
|
959
962
|
if (fe(gt)) {
|
|
960
963
|
if (!ve)
|
|
961
964
|
return;
|
|
962
|
-
if (gt = new G(), We.set(he, gt), !_.setProvider(ne, he,
|
|
965
|
+
if (gt = new G(), We.set(he, gt), !_.setProvider(ne, he, T))
|
|
963
966
|
throw We.delete(he), Xe && I.delete(ne), new Error("Wrong provider for target.");
|
|
964
967
|
}
|
|
965
968
|
return gt;
|
|
@@ -1002,7 +1005,7 @@ var Of;
|
|
|
1002
1005
|
if (fe(We))
|
|
1003
1006
|
return ve;
|
|
1004
1007
|
for (var Xe = We.keys(), gt = ys(Xe), zt = 0; ; ) {
|
|
1005
|
-
var Ti =
|
|
1008
|
+
var Ti = Zr(gt);
|
|
1006
1009
|
if (!Ti)
|
|
1007
1010
|
return ve.length = zt, ve;
|
|
1008
1011
|
var Ss = gs(Ti);
|
|
@@ -1018,7 +1021,7 @@ var Of;
|
|
|
1018
1021
|
zt++;
|
|
1019
1022
|
}
|
|
1020
1023
|
}
|
|
1021
|
-
function
|
|
1024
|
+
function Z(ne, he, ve) {
|
|
1022
1025
|
var We = K(
|
|
1023
1026
|
he,
|
|
1024
1027
|
ve,
|
|
@@ -1035,51 +1038,51 @@ var Of;
|
|
|
1035
1038
|
}
|
|
1036
1039
|
}
|
|
1037
1040
|
function ws(_) {
|
|
1038
|
-
var I = _.defineMetadata,
|
|
1039
|
-
isProviderFor: function(
|
|
1040
|
-
var he = xt.get(
|
|
1041
|
-
return !fe(he) && he.has(ne) ? !0 : xe(
|
|
1041
|
+
var I = _.defineMetadata, T = _.hasOwnMetadata, K = _.getOwnMetadata, xe = _.getOwnMetadataKeys, bt = _.deleteMetadata, xt = new v(), je = {
|
|
1042
|
+
isProviderFor: function(Z, ne) {
|
|
1043
|
+
var he = xt.get(Z);
|
|
1044
|
+
return !fe(he) && he.has(ne) ? !0 : xe(Z, ne).length ? (fe(he) && (he = new N(), xt.set(Z, he)), he.add(ne), !0) : !1;
|
|
1042
1045
|
},
|
|
1043
1046
|
OrdinaryDefineOwnMetadata: I,
|
|
1044
|
-
OrdinaryHasOwnMetadata:
|
|
1047
|
+
OrdinaryHasOwnMetadata: T,
|
|
1045
1048
|
OrdinaryGetOwnMetadata: K,
|
|
1046
1049
|
OrdinaryOwnMetadataKeys: xe,
|
|
1047
1050
|
OrdinaryDeleteMetadata: bt
|
|
1048
1051
|
};
|
|
1049
1052
|
return je;
|
|
1050
1053
|
}
|
|
1051
|
-
function Wr(_, I,
|
|
1054
|
+
function Wr(_, I, T) {
|
|
1052
1055
|
var K = O.getProvider(_, I);
|
|
1053
1056
|
if (!fe(K))
|
|
1054
1057
|
return K;
|
|
1055
|
-
if (
|
|
1058
|
+
if (T) {
|
|
1056
1059
|
if (O.setProvider(_, I, k))
|
|
1057
1060
|
return k;
|
|
1058
1061
|
throw new Error("Illegal state.");
|
|
1059
1062
|
}
|
|
1060
1063
|
}
|
|
1061
1064
|
function bs() {
|
|
1062
|
-
var _ = {}, I = [],
|
|
1065
|
+
var _ = {}, I = [], T = (
|
|
1063
1066
|
/** @class */
|
|
1064
1067
|
function() {
|
|
1065
|
-
function je(
|
|
1066
|
-
this._index = 0, this._keys =
|
|
1068
|
+
function je(Z, ne, he) {
|
|
1069
|
+
this._index = 0, this._keys = Z, this._values = ne, this._selector = he;
|
|
1067
1070
|
}
|
|
1068
1071
|
return je.prototype["@@iterator"] = function() {
|
|
1069
1072
|
return this;
|
|
1070
1073
|
}, je.prototype[o] = function() {
|
|
1071
1074
|
return this;
|
|
1072
1075
|
}, je.prototype.next = function() {
|
|
1073
|
-
var
|
|
1074
|
-
if (
|
|
1075
|
-
var ne = this._selector(this._keys[
|
|
1076
|
-
return
|
|
1076
|
+
var Z = this._index;
|
|
1077
|
+
if (Z >= 0 && Z < this._keys.length) {
|
|
1078
|
+
var ne = this._selector(this._keys[Z], this._values[Z]);
|
|
1079
|
+
return Z + 1 >= this._keys.length ? (this._index = -1, this._keys = I, this._values = I) : this._index++, { value: ne, done: !1 };
|
|
1077
1080
|
}
|
|
1078
1081
|
return { value: void 0, done: !0 };
|
|
1079
|
-
}, je.prototype.throw = function(
|
|
1080
|
-
throw this._index >= 0 && (this._index = -1, this._keys = I, this._values = I),
|
|
1081
|
-
}, je.prototype.return = function(
|
|
1082
|
-
return this._index >= 0 && (this._index = -1, this._keys = I, this._values = I), { value:
|
|
1082
|
+
}, je.prototype.throw = function(Z) {
|
|
1083
|
+
throw this._index >= 0 && (this._index = -1, this._keys = I, this._values = I), Z;
|
|
1084
|
+
}, je.prototype.return = function(Z) {
|
|
1085
|
+
return this._index >= 0 && (this._index = -1, this._keys = I, this._values = I), { value: Z, done: !0 };
|
|
1083
1086
|
}, je;
|
|
1084
1087
|
}()
|
|
1085
1088
|
), K = (
|
|
@@ -1094,72 +1097,72 @@ var Of;
|
|
|
1094
1097
|
},
|
|
1095
1098
|
enumerable: !0,
|
|
1096
1099
|
configurable: !0
|
|
1097
|
-
}), je.prototype.has = function(
|
|
1100
|
+
}), je.prototype.has = function(Z) {
|
|
1098
1101
|
return this._find(
|
|
1099
|
-
|
|
1102
|
+
Z,
|
|
1100
1103
|
/*insert*/
|
|
1101
1104
|
!1
|
|
1102
1105
|
) >= 0;
|
|
1103
|
-
}, je.prototype.get = function(
|
|
1106
|
+
}, je.prototype.get = function(Z) {
|
|
1104
1107
|
var ne = this._find(
|
|
1105
|
-
|
|
1108
|
+
Z,
|
|
1106
1109
|
/*insert*/
|
|
1107
1110
|
!1
|
|
1108
1111
|
);
|
|
1109
1112
|
return ne >= 0 ? this._values[ne] : void 0;
|
|
1110
|
-
}, je.prototype.set = function(
|
|
1113
|
+
}, je.prototype.set = function(Z, ne) {
|
|
1111
1114
|
var he = this._find(
|
|
1112
|
-
|
|
1115
|
+
Z,
|
|
1113
1116
|
/*insert*/
|
|
1114
1117
|
!0
|
|
1115
1118
|
);
|
|
1116
1119
|
return this._values[he] = ne, this;
|
|
1117
|
-
}, je.prototype.delete = function(
|
|
1120
|
+
}, je.prototype.delete = function(Z) {
|
|
1118
1121
|
var ne = this._find(
|
|
1119
|
-
|
|
1122
|
+
Z,
|
|
1120
1123
|
/*insert*/
|
|
1121
1124
|
!1
|
|
1122
1125
|
);
|
|
1123
1126
|
if (ne >= 0) {
|
|
1124
1127
|
for (var he = this._keys.length, ve = ne + 1; ve < he; ve++)
|
|
1125
1128
|
this._keys[ve - 1] = this._keys[ve], this._values[ve - 1] = this._values[ve];
|
|
1126
|
-
return this._keys.length--, this._values.length--, ps(
|
|
1129
|
+
return this._keys.length--, this._values.length--, ps(Z, this._cacheKey) && (this._cacheKey = _, this._cacheIndex = -2), !0;
|
|
1127
1130
|
}
|
|
1128
1131
|
return !1;
|
|
1129
1132
|
}, je.prototype.clear = function() {
|
|
1130
1133
|
this._keys.length = 0, this._values.length = 0, this._cacheKey = _, this._cacheIndex = -2;
|
|
1131
1134
|
}, je.prototype.keys = function() {
|
|
1132
|
-
return new
|
|
1135
|
+
return new T(this._keys, this._values, xe);
|
|
1133
1136
|
}, je.prototype.values = function() {
|
|
1134
|
-
return new
|
|
1137
|
+
return new T(this._keys, this._values, bt);
|
|
1135
1138
|
}, je.prototype.entries = function() {
|
|
1136
|
-
return new
|
|
1139
|
+
return new T(this._keys, this._values, xt);
|
|
1137
1140
|
}, je.prototype["@@iterator"] = function() {
|
|
1138
1141
|
return this.entries();
|
|
1139
1142
|
}, je.prototype[o] = function() {
|
|
1140
1143
|
return this.entries();
|
|
1141
|
-
}, je.prototype._find = function(
|
|
1142
|
-
if (!ps(this._cacheKey,
|
|
1144
|
+
}, je.prototype._find = function(Z, ne) {
|
|
1145
|
+
if (!ps(this._cacheKey, Z)) {
|
|
1143
1146
|
this._cacheIndex = -1;
|
|
1144
1147
|
for (var he = 0; he < this._keys.length; he++)
|
|
1145
|
-
if (ps(this._keys[he],
|
|
1148
|
+
if (ps(this._keys[he], Z)) {
|
|
1146
1149
|
this._cacheIndex = he;
|
|
1147
1150
|
break;
|
|
1148
1151
|
}
|
|
1149
1152
|
}
|
|
1150
|
-
return this._cacheIndex < 0 && ne && (this._cacheIndex = this._keys.length, this._keys.push(
|
|
1153
|
+
return this._cacheIndex < 0 && ne && (this._cacheIndex = this._keys.length, this._keys.push(Z), this._values.push(void 0)), this._cacheIndex;
|
|
1151
1154
|
}, je;
|
|
1152
1155
|
}()
|
|
1153
1156
|
);
|
|
1154
1157
|
return K;
|
|
1155
|
-
function xe(je,
|
|
1158
|
+
function xe(je, Z) {
|
|
1156
1159
|
return je;
|
|
1157
1160
|
}
|
|
1158
|
-
function bt(je,
|
|
1159
|
-
return
|
|
1161
|
+
function bt(je, Z) {
|
|
1162
|
+
return Z;
|
|
1160
1163
|
}
|
|
1161
|
-
function xt(je,
|
|
1162
|
-
return [je,
|
|
1164
|
+
function xt(je, Z) {
|
|
1165
|
+
return [je, Z];
|
|
1163
1166
|
}
|
|
1164
1167
|
}
|
|
1165
1168
|
function xs() {
|
|
@@ -1175,12 +1178,12 @@ var Of;
|
|
|
1175
1178
|
},
|
|
1176
1179
|
enumerable: !0,
|
|
1177
1180
|
configurable: !0
|
|
1178
|
-
}), I.prototype.has = function(
|
|
1179
|
-
return this._map.has(
|
|
1180
|
-
}, I.prototype.add = function(
|
|
1181
|
-
return this._map.set(
|
|
1182
|
-
}, I.prototype.delete = function(
|
|
1183
|
-
return this._map.delete(
|
|
1181
|
+
}), I.prototype.has = function(T) {
|
|
1182
|
+
return this._map.has(T);
|
|
1183
|
+
}, I.prototype.add = function(T) {
|
|
1184
|
+
return this._map.set(T, T), this;
|
|
1185
|
+
}, I.prototype.delete = function(T) {
|
|
1186
|
+
return this._map.delete(T);
|
|
1184
1187
|
}, I.prototype.clear = function() {
|
|
1185
1188
|
this._map.clear();
|
|
1186
1189
|
}, I.prototype.keys = function() {
|
|
@@ -1199,78 +1202,78 @@ var Of;
|
|
|
1199
1202
|
return _;
|
|
1200
1203
|
}
|
|
1201
1204
|
function Bo() {
|
|
1202
|
-
var _ = 16, I = m.create(),
|
|
1205
|
+
var _ = 16, I = m.create(), T = K();
|
|
1203
1206
|
return (
|
|
1204
1207
|
/** @class */
|
|
1205
1208
|
function() {
|
|
1206
|
-
function
|
|
1209
|
+
function Z() {
|
|
1207
1210
|
this._key = K();
|
|
1208
1211
|
}
|
|
1209
|
-
return
|
|
1212
|
+
return Z.prototype.has = function(ne) {
|
|
1210
1213
|
var he = xe(
|
|
1211
1214
|
ne,
|
|
1212
1215
|
/*create*/
|
|
1213
1216
|
!1
|
|
1214
1217
|
);
|
|
1215
1218
|
return he !== void 0 ? m.has(he, this._key) : !1;
|
|
1216
|
-
},
|
|
1219
|
+
}, Z.prototype.get = function(ne) {
|
|
1217
1220
|
var he = xe(
|
|
1218
1221
|
ne,
|
|
1219
1222
|
/*create*/
|
|
1220
1223
|
!1
|
|
1221
1224
|
);
|
|
1222
1225
|
return he !== void 0 ? m.get(he, this._key) : void 0;
|
|
1223
|
-
},
|
|
1226
|
+
}, Z.prototype.set = function(ne, he) {
|
|
1224
1227
|
var ve = xe(
|
|
1225
1228
|
ne,
|
|
1226
1229
|
/*create*/
|
|
1227
1230
|
!0
|
|
1228
1231
|
);
|
|
1229
1232
|
return ve[this._key] = he, this;
|
|
1230
|
-
},
|
|
1233
|
+
}, Z.prototype.delete = function(ne) {
|
|
1231
1234
|
var he = xe(
|
|
1232
1235
|
ne,
|
|
1233
1236
|
/*create*/
|
|
1234
1237
|
!1
|
|
1235
1238
|
);
|
|
1236
1239
|
return he !== void 0 ? delete he[this._key] : !1;
|
|
1237
|
-
},
|
|
1240
|
+
}, Z.prototype.clear = function() {
|
|
1238
1241
|
this._key = K();
|
|
1239
|
-
},
|
|
1242
|
+
}, Z;
|
|
1240
1243
|
}()
|
|
1241
1244
|
);
|
|
1242
1245
|
function K() {
|
|
1243
|
-
var
|
|
1246
|
+
var Z;
|
|
1244
1247
|
do
|
|
1245
|
-
|
|
1246
|
-
while (m.has(I,
|
|
1247
|
-
return I[
|
|
1248
|
+
Z = "@@WeakMap@@" + je();
|
|
1249
|
+
while (m.has(I, Z));
|
|
1250
|
+
return I[Z] = !0, Z;
|
|
1248
1251
|
}
|
|
1249
|
-
function xe(
|
|
1250
|
-
if (!n.call(
|
|
1252
|
+
function xe(Z, ne) {
|
|
1253
|
+
if (!n.call(Z, T)) {
|
|
1251
1254
|
if (!ne)
|
|
1252
1255
|
return;
|
|
1253
|
-
Object.defineProperty(
|
|
1256
|
+
Object.defineProperty(Z, T, { value: m.create() });
|
|
1254
1257
|
}
|
|
1255
|
-
return
|
|
1258
|
+
return Z[T];
|
|
1256
1259
|
}
|
|
1257
|
-
function bt(
|
|
1260
|
+
function bt(Z, ne) {
|
|
1258
1261
|
for (var he = 0; he < ne; ++he)
|
|
1259
|
-
|
|
1260
|
-
return
|
|
1262
|
+
Z[he] = Math.random() * 255 | 0;
|
|
1263
|
+
return Z;
|
|
1261
1264
|
}
|
|
1262
|
-
function xt(
|
|
1265
|
+
function xt(Z) {
|
|
1263
1266
|
if (typeof Uint8Array == "function") {
|
|
1264
|
-
var ne = new Uint8Array(
|
|
1265
|
-
return typeof crypto < "u" ? crypto.getRandomValues(ne) : typeof msCrypto < "u" ? msCrypto.getRandomValues(ne) : bt(ne,
|
|
1267
|
+
var ne = new Uint8Array(Z);
|
|
1268
|
+
return typeof crypto < "u" ? crypto.getRandomValues(ne) : typeof msCrypto < "u" ? msCrypto.getRandomValues(ne) : bt(ne, Z), ne;
|
|
1266
1269
|
}
|
|
1267
|
-
return bt(new Array(
|
|
1270
|
+
return bt(new Array(Z), Z);
|
|
1268
1271
|
}
|
|
1269
1272
|
function je() {
|
|
1270
|
-
var
|
|
1271
|
-
|
|
1273
|
+
var Z = xt(_);
|
|
1274
|
+
Z[6] = Z[6] & 79 | 64, Z[8] = Z[8] & 191 | 128;
|
|
1272
1275
|
for (var ne = "", he = 0; he < _; ++he) {
|
|
1273
|
-
var ve =
|
|
1276
|
+
var ve = Z[he];
|
|
1274
1277
|
(he === 4 || he === 6 || he === 8) && (ne += "-"), ve < 16 && (ne += "0"), ne += ve.toString(16).toLowerCase();
|
|
1275
1278
|
}
|
|
1276
1279
|
return ne;
|
|
@@ -1355,7 +1358,7 @@ class W {
|
|
|
1355
1358
|
return e[e.length - 1] instanceof Function ? this.toView(i, e[e.length - 1]) : i.buffer;
|
|
1356
1359
|
}
|
|
1357
1360
|
}
|
|
1358
|
-
const Vc = "string", Ky = /^[0-9a-f]+$/i,
|
|
1361
|
+
const Vc = "string", Ky = /^[0-9a-f]+$/i, qy = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/, Zy = /^[a-zA-Z0-9-_]+$/;
|
|
1359
1362
|
class Tf {
|
|
1360
1363
|
static fromString(e) {
|
|
1361
1364
|
const t = unescape(encodeURIComponent(e)), n = new Uint8Array(t.length);
|
|
@@ -1393,10 +1396,10 @@ class de {
|
|
|
1393
1396
|
return typeof e === Vc && Ky.test(e);
|
|
1394
1397
|
}
|
|
1395
1398
|
static isBase64(e) {
|
|
1396
|
-
return typeof e === Vc &&
|
|
1399
|
+
return typeof e === Vc && qy.test(e);
|
|
1397
1400
|
}
|
|
1398
1401
|
static isBase64Url(e) {
|
|
1399
|
-
return typeof e === Vc &&
|
|
1402
|
+
return typeof e === Vc && Zy.test(e);
|
|
1400
1403
|
}
|
|
1401
1404
|
static ToString(e, t = "utf8") {
|
|
1402
1405
|
const n = W.toUint8Array(e);
|
|
@@ -1890,8 +1893,8 @@ class Id extends fn(Ei) {
|
|
|
1890
1893
|
if (u === m) {
|
|
1891
1894
|
m += 255;
|
|
1892
1895
|
const G = new Uint8Array(m);
|
|
1893
|
-
for (let
|
|
1894
|
-
G[
|
|
1896
|
+
for (let N = 0; N < h.length; N++)
|
|
1897
|
+
G[N] = h[N];
|
|
1895
1898
|
h = this.valueHexView = new Uint8Array(m);
|
|
1896
1899
|
}
|
|
1897
1900
|
}
|
|
@@ -2918,7 +2921,7 @@ class Kd extends fr {
|
|
|
2918
2921
|
}
|
|
2919
2922
|
}
|
|
2920
2923
|
Kd.NAME = "ObjectIdentifierValueBlock";
|
|
2921
|
-
var
|
|
2924
|
+
var qd;
|
|
2922
2925
|
class Ka extends Jt {
|
|
2923
2926
|
constructor(e = {}) {
|
|
2924
2927
|
super(e, Kd), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 6;
|
|
@@ -2939,8 +2942,8 @@ class Ka extends Jt {
|
|
|
2939
2942
|
};
|
|
2940
2943
|
}
|
|
2941
2944
|
}
|
|
2942
|
-
|
|
2943
|
-
ce.ObjectIdentifier =
|
|
2945
|
+
qd = Ka;
|
|
2946
|
+
ce.ObjectIdentifier = qd;
|
|
2944
2947
|
Ka.NAME = "OBJECT IDENTIFIER";
|
|
2945
2948
|
class cl extends fn(Ei) {
|
|
2946
2949
|
constructor({ valueDec: e = 0, ...t } = {}) {
|
|
@@ -2994,7 +2997,7 @@ class cl extends fn(Ei) {
|
|
|
2994
2997
|
}
|
|
2995
2998
|
}
|
|
2996
2999
|
cl.NAME = "relativeSidBlock";
|
|
2997
|
-
class
|
|
3000
|
+
class Zd extends fr {
|
|
2998
3001
|
constructor({ value: e = yr, ...t } = {}) {
|
|
2999
3002
|
super(t), this.value = [], e && this.fromString(e);
|
|
3000
3003
|
}
|
|
@@ -3050,11 +3053,11 @@ class qd extends fr {
|
|
|
3050
3053
|
return e;
|
|
3051
3054
|
}
|
|
3052
3055
|
}
|
|
3053
|
-
|
|
3056
|
+
Zd.NAME = "RelativeObjectIdentifierValueBlock";
|
|
3054
3057
|
var Wd;
|
|
3055
3058
|
class Uu extends Jt {
|
|
3056
3059
|
constructor(e = {}) {
|
|
3057
|
-
super(e,
|
|
3060
|
+
super(e, Zd), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 13;
|
|
3058
3061
|
}
|
|
3059
3062
|
getValue() {
|
|
3060
3063
|
return this.valueBlock.toString();
|
|
@@ -3156,14 +3159,14 @@ class rp extends kr {
|
|
|
3156
3159
|
}
|
|
3157
3160
|
rp.NAME = "BmpStringValueBlock";
|
|
3158
3161
|
var np;
|
|
3159
|
-
class
|
|
3162
|
+
class qa extends rp {
|
|
3160
3163
|
constructor({ ...e } = {}) {
|
|
3161
3164
|
super(e), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 30;
|
|
3162
3165
|
}
|
|
3163
3166
|
}
|
|
3164
|
-
np =
|
|
3167
|
+
np = qa;
|
|
3165
3168
|
ce.BmpString = np;
|
|
3166
|
-
|
|
3169
|
+
qa.NAME = "BMPString";
|
|
3167
3170
|
class ip extends kr {
|
|
3168
3171
|
fromBuffer(e) {
|
|
3169
3172
|
const t = ArrayBuffer.isView(e) ? e.slice().buffer : e.slice(0), n = new Uint8Array(t);
|
|
@@ -3186,14 +3189,14 @@ class ip extends kr {
|
|
|
3186
3189
|
}
|
|
3187
3190
|
ip.NAME = "UniversalStringValueBlock";
|
|
3188
3191
|
var sp;
|
|
3189
|
-
class
|
|
3192
|
+
class Za extends ip {
|
|
3190
3193
|
constructor({ ...e } = {}) {
|
|
3191
3194
|
super(e), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 28;
|
|
3192
3195
|
}
|
|
3193
3196
|
}
|
|
3194
|
-
sp =
|
|
3197
|
+
sp = Za;
|
|
3195
3198
|
ce.UniversalString = sp;
|
|
3196
|
-
|
|
3199
|
+
Za.NAME = "UniversalString";
|
|
3197
3200
|
var op;
|
|
3198
3201
|
class Wa extends kr {
|
|
3199
3202
|
constructor(e = {}) {
|
|
@@ -3362,15 +3365,15 @@ class nc extends po {
|
|
|
3362
3365
|
if (n.indexOf("-") !== -1)
|
|
3363
3366
|
throw new Error("Wrong input string for conversion");
|
|
3364
3367
|
} else {
|
|
3365
|
-
let x = 1, G = n.indexOf("+"),
|
|
3368
|
+
let x = 1, G = n.indexOf("+"), N = "";
|
|
3366
3369
|
if (G === -1 && (G = n.indexOf("-"), x = -1), G !== -1) {
|
|
3367
|
-
if (
|
|
3370
|
+
if (N = n.substring(G + 1), n = n.substring(0, G), N.length !== 2 && N.length !== 4)
|
|
3368
3371
|
throw new Error("Wrong input string for conversion");
|
|
3369
|
-
let v = parseInt(
|
|
3372
|
+
let v = parseInt(N.substring(0, 2), 10);
|
|
3370
3373
|
if (isNaN(v.valueOf()))
|
|
3371
3374
|
throw new Error("Wrong input string for conversion");
|
|
3372
|
-
if (c = x * v,
|
|
3373
|
-
if (v = parseInt(
|
|
3375
|
+
if (c = x * v, N.length === 4) {
|
|
3376
|
+
if (v = parseInt(N.substring(2, 4), 10), isNaN(v.valueOf()))
|
|
3374
3377
|
throw new Error("Wrong input string for conversion");
|
|
3375
3378
|
u = x * v;
|
|
3376
3379
|
}
|
|
@@ -3753,7 +3756,7 @@ const Ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3753
3756
|
BaseBlock: Jt,
|
|
3754
3757
|
BaseStringBlock: ju,
|
|
3755
3758
|
BitString: oi,
|
|
3756
|
-
BmpString:
|
|
3759
|
+
BmpString: qa,
|
|
3757
3760
|
Boolean: za,
|
|
3758
3761
|
CharacterString: rc,
|
|
3759
3762
|
Choice: Hu,
|
|
@@ -3784,7 +3787,7 @@ const Ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3784
3787
|
TeletexString: Ja,
|
|
3785
3788
|
TimeOfDay: $u,
|
|
3786
3789
|
UTCTime: po,
|
|
3787
|
-
UniversalString:
|
|
3790
|
+
UniversalString: Za,
|
|
3788
3791
|
Utf8String: In,
|
|
3789
3792
|
ValueBlock: fr,
|
|
3790
3793
|
VideotexString: Xa,
|
|
@@ -3905,7 +3908,7 @@ function Tr(r) {
|
|
|
3905
3908
|
toASN: (e) => new r({ value: e })
|
|
3906
3909
|
};
|
|
3907
3910
|
}
|
|
3908
|
-
const Sp = Tr(In), wg = Tr(
|
|
3911
|
+
const Sp = Tr(In), wg = Tr(qa), bg = Tr(Za), xg = Tr(Wa), Ag = Tr(Ya), Sg = Tr(Ja), _g = Tr(Xa), Eg = Tr(Qa), kg = Tr(ec), Ig = Tr(ho), Cg = Tr(tc), Bg = Tr(rc), Og = {
|
|
3909
3912
|
fromASN: (r) => r.toDate(),
|
|
3910
3913
|
toASN: (r) => new po({ valueDate: r })
|
|
3911
3914
|
}, Tg = {
|
|
@@ -4166,7 +4169,7 @@ class Rg {
|
|
|
4166
4169
|
throw new Error("Converter is empty");
|
|
4167
4170
|
if (m.repeated)
|
|
4168
4171
|
if (m.implicit) {
|
|
4169
|
-
const
|
|
4172
|
+
const N = m.repeated === "sequence" ? mn : wn, v = new N();
|
|
4170
4173
|
v.valueBlock = h.valueBlock;
|
|
4171
4174
|
const A = Ui(v.toBER(!1));
|
|
4172
4175
|
if (A.offset === -1)
|
|
@@ -4176,9 +4179,9 @@ class Rg {
|
|
|
4176
4179
|
const O = A.result.valueBlock.value;
|
|
4177
4180
|
c[u] = Array.from(O, (k) => G.fromASN(k));
|
|
4178
4181
|
} else
|
|
4179
|
-
c[u] = Array.from(h, (
|
|
4182
|
+
c[u] = Array.from(h, (N) => G.fromASN(N));
|
|
4180
4183
|
else {
|
|
4181
|
-
let
|
|
4184
|
+
let N = h;
|
|
4182
4185
|
if (m.implicit) {
|
|
4183
4186
|
let v;
|
|
4184
4187
|
if (gn(x))
|
|
@@ -4189,9 +4192,9 @@ class Rg {
|
|
|
4189
4192
|
throw new Error(`Cannot get '${A}' class from asn1js module`);
|
|
4190
4193
|
v = new O();
|
|
4191
4194
|
}
|
|
4192
|
-
v.valueBlock =
|
|
4195
|
+
v.valueBlock = N.valueBlock, N = Ui(v.toBER(!1)).result;
|
|
4193
4196
|
}
|
|
4194
|
-
c[u] = G.fromASN(
|
|
4197
|
+
c[u] = G.fromASN(N);
|
|
4195
4198
|
}
|
|
4196
4199
|
} else if (m.repeated) {
|
|
4197
4200
|
if (!Array.isArray(h))
|
|
@@ -4320,7 +4323,7 @@ class dt extends Array {
|
|
|
4320
4323
|
}
|
|
4321
4324
|
}
|
|
4322
4325
|
}
|
|
4323
|
-
class
|
|
4326
|
+
class q {
|
|
4324
4327
|
static serialize(e) {
|
|
4325
4328
|
return zu.serialize(e);
|
|
4326
4329
|
}
|
|
@@ -4328,7 +4331,7 @@ class Z {
|
|
|
4328
4331
|
return Rg.parse(e, t);
|
|
4329
4332
|
}
|
|
4330
4333
|
static toString(e) {
|
|
4331
|
-
const t = W.isBufferSource(e) ? W.toArrayBuffer(e) :
|
|
4334
|
+
const t = W.isBufferSource(e) ? W.toArrayBuffer(e) : q.serialize(e), n = Ui(t);
|
|
4332
4335
|
if (n.offset === -1)
|
|
4333
4336
|
throw new Error(`Cannot decode ASN.1 data. ${n.result.error}`);
|
|
4334
4337
|
return n.result.toString();
|
|
@@ -4400,8 +4403,8 @@ var Ep = { exports: {} };
|
|
|
4400
4403
|
v = `0${v}`;
|
|
4401
4404
|
return v;
|
|
4402
4405
|
}
|
|
4403
|
-
const
|
|
4404
|
-
|
|
4406
|
+
const N = {};
|
|
4407
|
+
N.IPv4 = function() {
|
|
4405
4408
|
function v(A) {
|
|
4406
4409
|
if (A.length !== 4)
|
|
4407
4410
|
throw new Error("ipaddr: ipv4 octet count should be 4");
|
|
@@ -4477,17 +4480,17 @@ var Ep = { exports: {} };
|
|
|
4477
4480
|
return null;
|
|
4478
4481
|
return 32 - A;
|
|
4479
4482
|
}, v.prototype.range = function() {
|
|
4480
|
-
return
|
|
4483
|
+
return N.subnetMatch(this, this.SpecialRanges);
|
|
4481
4484
|
}, v.prototype.toByteArray = function() {
|
|
4482
4485
|
return this.octets.slice(0);
|
|
4483
4486
|
}, v.prototype.toIPv4MappedAddress = function() {
|
|
4484
|
-
return
|
|
4487
|
+
return N.IPv6.parse(`::ffff:${this.toString()}`);
|
|
4485
4488
|
}, v.prototype.toNormalizedString = function() {
|
|
4486
4489
|
return this.toString();
|
|
4487
4490
|
}, v.prototype.toString = function() {
|
|
4488
4491
|
return this.octets.join(".");
|
|
4489
4492
|
}, v;
|
|
4490
|
-
}(),
|
|
4493
|
+
}(), N.IPv4.broadcastAddressFromCIDR = function(v) {
|
|
4491
4494
|
try {
|
|
4492
4495
|
const A = this.parseCIDR(v), O = A[0].toByteArray(), k = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), j = [];
|
|
4493
4496
|
let R = 0;
|
|
@@ -4497,23 +4500,23 @@ var Ep = { exports: {} };
|
|
|
4497
4500
|
} catch {
|
|
4498
4501
|
throw new Error("ipaddr: the address does not have IPv4 CIDR format");
|
|
4499
4502
|
}
|
|
4500
|
-
},
|
|
4503
|
+
}, N.IPv4.isIPv4 = function(v) {
|
|
4501
4504
|
return this.parser(v) !== null;
|
|
4502
|
-
},
|
|
4505
|
+
}, N.IPv4.isValid = function(v) {
|
|
4503
4506
|
try {
|
|
4504
4507
|
return new this(this.parser(v)), !0;
|
|
4505
4508
|
} catch {
|
|
4506
4509
|
return !1;
|
|
4507
4510
|
}
|
|
4508
|
-
},
|
|
4511
|
+
}, N.IPv4.isValidCIDR = function(v) {
|
|
4509
4512
|
try {
|
|
4510
4513
|
return this.parseCIDR(v), !0;
|
|
4511
4514
|
} catch {
|
|
4512
4515
|
return !1;
|
|
4513
4516
|
}
|
|
4514
|
-
},
|
|
4515
|
-
return !!(
|
|
4516
|
-
},
|
|
4517
|
+
}, N.IPv4.isValidFourPartDecimal = function(v) {
|
|
4518
|
+
return !!(N.IPv4.isValid(v) && v.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/));
|
|
4519
|
+
}, N.IPv4.networkAddressFromCIDR = function(v) {
|
|
4517
4520
|
let A, O, k, j, R;
|
|
4518
4521
|
try {
|
|
4519
4522
|
for (A = this.parseCIDR(v), k = A[0].toByteArray(), R = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), j = [], O = 0; O < 4; )
|
|
@@ -4522,12 +4525,12 @@ var Ep = { exports: {} };
|
|
|
4522
4525
|
} catch {
|
|
4523
4526
|
throw new Error("ipaddr: the address does not have IPv4 CIDR format");
|
|
4524
4527
|
}
|
|
4525
|
-
},
|
|
4528
|
+
}, N.IPv4.parse = function(v) {
|
|
4526
4529
|
const A = this.parser(v);
|
|
4527
4530
|
if (A === null)
|
|
4528
4531
|
throw new Error("ipaddr: string is not formatted like an IPv4 Address");
|
|
4529
4532
|
return new this(A);
|
|
4530
|
-
},
|
|
4533
|
+
}, N.IPv4.parseCIDR = function(v) {
|
|
4531
4534
|
let A;
|
|
4532
4535
|
if (A = v.match(/^(.+)\/(\d+)$/)) {
|
|
4533
4536
|
const O = parseInt(A[2]);
|
|
@@ -4541,7 +4544,7 @@ var Ep = { exports: {} };
|
|
|
4541
4544
|
}
|
|
4542
4545
|
}
|
|
4543
4546
|
throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range");
|
|
4544
|
-
},
|
|
4547
|
+
}, N.IPv4.parser = function(v) {
|
|
4545
4548
|
let A, O, k;
|
|
4546
4549
|
if (A = v.match(n.fourOctet))
|
|
4547
4550
|
return function() {
|
|
@@ -4571,7 +4574,7 @@ var Ep = { exports: {} };
|
|
|
4571
4574
|
throw new Error("ipaddr: address outside defined range");
|
|
4572
4575
|
return R.push(x(j[0])), R.push(x(j[1])), R.push(k >> 8 & 255), R.push(k & 255), R;
|
|
4573
4576
|
}() : null;
|
|
4574
|
-
},
|
|
4577
|
+
}, N.IPv4.subnetMaskFromPrefixLength = function(v) {
|
|
4575
4578
|
if (v = parseInt(v), v < 0 || v > 32)
|
|
4576
4579
|
throw new Error("ipaddr: invalid IPv4 prefix length");
|
|
4577
4580
|
const A = [0, 0, 0, 0];
|
|
@@ -4580,7 +4583,7 @@ var Ep = { exports: {} };
|
|
|
4580
4583
|
for (; O < k; )
|
|
4581
4584
|
A[O] = 255, O++;
|
|
4582
4585
|
return k < 4 && (A[k] = Math.pow(2, v % 8) - 1 << 8 - v % 8), new this(A);
|
|
4583
|
-
},
|
|
4586
|
+
}, N.IPv6 = function() {
|
|
4584
4587
|
function v(A, O) {
|
|
4585
4588
|
let k, j;
|
|
4586
4589
|
if (A.length === 16)
|
|
@@ -4670,7 +4673,7 @@ var Ep = { exports: {} };
|
|
|
4670
4673
|
return null;
|
|
4671
4674
|
return 128 - A;
|
|
4672
4675
|
}, v.prototype.range = function() {
|
|
4673
|
-
return
|
|
4676
|
+
return N.subnetMatch(this, this.SpecialRanges);
|
|
4674
4677
|
}, v.prototype.toByteArray = function() {
|
|
4675
4678
|
let A;
|
|
4676
4679
|
const O = [], k = this.parts;
|
|
@@ -4690,7 +4693,7 @@ var Ep = { exports: {} };
|
|
|
4690
4693
|
if (!this.isIPv4MappedAddress())
|
|
4691
4694
|
throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");
|
|
4692
4695
|
const A = this.parts.slice(-2), O = A[0], k = A[1];
|
|
4693
|
-
return new
|
|
4696
|
+
return new N.IPv4([O >> 8, O & 255, k >> 8, k & 255]);
|
|
4694
4697
|
}, v.prototype.toNormalizedString = function() {
|
|
4695
4698
|
const A = (function() {
|
|
4696
4699
|
const k = [];
|
|
@@ -4709,7 +4712,7 @@ var Ep = { exports: {} };
|
|
|
4709
4712
|
}, v.prototype.toString = function() {
|
|
4710
4713
|
return this.toRFC5952String();
|
|
4711
4714
|
}, v;
|
|
4712
|
-
}(),
|
|
4715
|
+
}(), N.IPv6.broadcastAddressFromCIDR = function(v) {
|
|
4713
4716
|
try {
|
|
4714
4717
|
const A = this.parseCIDR(v), O = A[0].toByteArray(), k = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), j = [];
|
|
4715
4718
|
let R = 0;
|
|
@@ -4719,9 +4722,9 @@ var Ep = { exports: {} };
|
|
|
4719
4722
|
} catch (A) {
|
|
4720
4723
|
throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${A})`);
|
|
4721
4724
|
}
|
|
4722
|
-
},
|
|
4725
|
+
}, N.IPv6.isIPv6 = function(v) {
|
|
4723
4726
|
return this.parser(v) !== null;
|
|
4724
|
-
},
|
|
4727
|
+
}, N.IPv6.isValid = function(v) {
|
|
4725
4728
|
if (typeof v == "string" && v.indexOf(":") === -1)
|
|
4726
4729
|
return !1;
|
|
4727
4730
|
try {
|
|
@@ -4730,7 +4733,7 @@ var Ep = { exports: {} };
|
|
|
4730
4733
|
} catch {
|
|
4731
4734
|
return !1;
|
|
4732
4735
|
}
|
|
4733
|
-
},
|
|
4736
|
+
}, N.IPv6.isValidCIDR = function(v) {
|
|
4734
4737
|
if (typeof v == "string" && v.indexOf(":") === -1)
|
|
4735
4738
|
return !1;
|
|
4736
4739
|
try {
|
|
@@ -4738,7 +4741,7 @@ var Ep = { exports: {} };
|
|
|
4738
4741
|
} catch {
|
|
4739
4742
|
return !1;
|
|
4740
4743
|
}
|
|
4741
|
-
},
|
|
4744
|
+
}, N.IPv6.networkAddressFromCIDR = function(v) {
|
|
4742
4745
|
let A, O, k, j, R;
|
|
4743
4746
|
try {
|
|
4744
4747
|
for (A = this.parseCIDR(v), k = A[0].toByteArray(), R = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), j = [], O = 0; O < 16; )
|
|
@@ -4747,12 +4750,12 @@ var Ep = { exports: {} };
|
|
|
4747
4750
|
} catch (le) {
|
|
4748
4751
|
throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${le})`);
|
|
4749
4752
|
}
|
|
4750
|
-
},
|
|
4753
|
+
}, N.IPv6.parse = function(v) {
|
|
4751
4754
|
const A = this.parser(v);
|
|
4752
4755
|
if (A.parts === null)
|
|
4753
4756
|
throw new Error("ipaddr: string is not formatted like an IPv6 Address");
|
|
4754
4757
|
return new this(A.parts, A.zoneId);
|
|
4755
|
-
},
|
|
4758
|
+
}, N.IPv6.parseCIDR = function(v) {
|
|
4756
4759
|
let A, O, k;
|
|
4757
4760
|
if ((O = v.match(/^(.+)\/(\d+)$/)) && (A = parseInt(O[2]), A >= 0 && A <= 128))
|
|
4758
4761
|
return k = [this.parse(O[1]), A], Object.defineProperty(k, "toString", {
|
|
@@ -4761,7 +4764,7 @@ var Ep = { exports: {} };
|
|
|
4761
4764
|
}
|
|
4762
4765
|
}), k;
|
|
4763
4766
|
throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range");
|
|
4764
|
-
},
|
|
4767
|
+
}, N.IPv6.parser = function(v) {
|
|
4765
4768
|
let A, O, k, j, R, le;
|
|
4766
4769
|
if (k = v.match(u.deprecatedTransitional))
|
|
4767
4770
|
return this.parser(`::ffff:${k[1]}`);
|
|
@@ -4782,7 +4785,7 @@ var Ep = { exports: {} };
|
|
|
4782
4785
|
};
|
|
4783
4786
|
}
|
|
4784
4787
|
return null;
|
|
4785
|
-
},
|
|
4788
|
+
}, N.IPv6.subnetMaskFromPrefixLength = function(v) {
|
|
4786
4789
|
if (v = parseInt(v), v < 0 || v > 128)
|
|
4787
4790
|
throw new Error("ipaddr: invalid IPv6 prefix length");
|
|
4788
4791
|
const A = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
@@ -4791,37 +4794,37 @@ var Ep = { exports: {} };
|
|
|
4791
4794
|
for (; O < k; )
|
|
4792
4795
|
A[O] = 255, O++;
|
|
4793
4796
|
return k < 16 && (A[k] = Math.pow(2, v % 8) - 1 << 8 - v % 8), new this(A);
|
|
4794
|
-
},
|
|
4797
|
+
}, N.fromByteArray = function(v) {
|
|
4795
4798
|
const A = v.length;
|
|
4796
4799
|
if (A === 4)
|
|
4797
|
-
return new
|
|
4800
|
+
return new N.IPv4(v);
|
|
4798
4801
|
if (A === 16)
|
|
4799
|
-
return new
|
|
4802
|
+
return new N.IPv6(v);
|
|
4800
4803
|
throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address");
|
|
4801
|
-
},
|
|
4802
|
-
return
|
|
4803
|
-
},
|
|
4804
|
-
return
|
|
4805
|
-
},
|
|
4806
|
-
if (
|
|
4807
|
-
return
|
|
4808
|
-
if (
|
|
4809
|
-
return
|
|
4804
|
+
}, N.isValid = function(v) {
|
|
4805
|
+
return N.IPv6.isValid(v) || N.IPv4.isValid(v);
|
|
4806
|
+
}, N.isValidCIDR = function(v) {
|
|
4807
|
+
return N.IPv6.isValidCIDR(v) || N.IPv4.isValidCIDR(v);
|
|
4808
|
+
}, N.parse = function(v) {
|
|
4809
|
+
if (N.IPv6.isValid(v))
|
|
4810
|
+
return N.IPv6.parse(v);
|
|
4811
|
+
if (N.IPv4.isValid(v))
|
|
4812
|
+
return N.IPv4.parse(v);
|
|
4810
4813
|
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format");
|
|
4811
|
-
},
|
|
4814
|
+
}, N.parseCIDR = function(v) {
|
|
4812
4815
|
try {
|
|
4813
|
-
return
|
|
4816
|
+
return N.IPv6.parseCIDR(v);
|
|
4814
4817
|
} catch {
|
|
4815
4818
|
try {
|
|
4816
|
-
return
|
|
4819
|
+
return N.IPv4.parseCIDR(v);
|
|
4817
4820
|
} catch {
|
|
4818
4821
|
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format");
|
|
4819
4822
|
}
|
|
4820
4823
|
}
|
|
4821
|
-
},
|
|
4824
|
+
}, N.process = function(v) {
|
|
4822
4825
|
const A = this.parse(v);
|
|
4823
4826
|
return A.kind() === "ipv6" && A.isIPv4MappedAddress() ? A.toIPv4Address() : A;
|
|
4824
|
-
},
|
|
4827
|
+
}, N.subnetMatch = function(v, A, O) {
|
|
4825
4828
|
let k, j, R, le;
|
|
4826
4829
|
O == null && (O = "unicast");
|
|
4827
4830
|
for (j in A)
|
|
@@ -4831,7 +4834,7 @@ var Ep = { exports: {} };
|
|
|
4831
4834
|
return j;
|
|
4832
4835
|
}
|
|
4833
4836
|
return O;
|
|
4834
|
-
}, r.exports ? r.exports =
|
|
4837
|
+
}, r.exports ? r.exports = N : e.ipaddr = N;
|
|
4835
4838
|
})(sl);
|
|
4836
4839
|
})(Ep);
|
|
4837
4840
|
var Uf = Ep.exports;
|
|
@@ -5019,8 +5022,8 @@ let Pi = dl = class extends dt {
|
|
|
5019
5022
|
Pi = dl = f([
|
|
5020
5023
|
H({ type: M.Sequence, itemType: yo })
|
|
5021
5024
|
], Pi);
|
|
5022
|
-
const
|
|
5023
|
-
class
|
|
5025
|
+
const qo = `${Yn}.35`;
|
|
5026
|
+
class qu extends et {
|
|
5024
5027
|
}
|
|
5025
5028
|
class ni {
|
|
5026
5029
|
constructor(e = {}) {
|
|
@@ -5028,7 +5031,7 @@ class ni {
|
|
|
5028
5031
|
}
|
|
5029
5032
|
}
|
|
5030
5033
|
f([
|
|
5031
|
-
y({ type:
|
|
5034
|
+
y({ type: qu, context: 0, optional: !0, implicit: !0 })
|
|
5032
5035
|
], ni.prototype, "keyIdentifier", void 0);
|
|
5033
5036
|
f([
|
|
5034
5037
|
y({ type: Ue, context: 1, optional: !0, implicit: !0, repeated: "sequence" })
|
|
@@ -5043,17 +5046,17 @@ f([
|
|
|
5043
5046
|
})
|
|
5044
5047
|
], ni.prototype, "authorityCertSerialNumber", void 0);
|
|
5045
5048
|
const kp = `${Yn}.19`;
|
|
5046
|
-
class
|
|
5049
|
+
class Zo {
|
|
5047
5050
|
constructor(e = {}) {
|
|
5048
5051
|
this.cA = !1, Object.assign(this, e);
|
|
5049
5052
|
}
|
|
5050
5053
|
}
|
|
5051
5054
|
f([
|
|
5052
5055
|
y({ type: b.Boolean, defaultValue: !1 })
|
|
5053
|
-
],
|
|
5056
|
+
], Zo.prototype, "cA", void 0);
|
|
5054
5057
|
f([
|
|
5055
5058
|
y({ type: b.Integer, optional: !0 })
|
|
5056
|
-
],
|
|
5059
|
+
], Zo.prototype, "pathLenConstraint", void 0);
|
|
5057
5060
|
var yl;
|
|
5058
5061
|
let cr = yl = class extends dt {
|
|
5059
5062
|
constructor(e) {
|
|
@@ -5097,24 +5100,24 @@ f([
|
|
|
5097
5100
|
An = f([
|
|
5098
5101
|
H({ type: M.Choice })
|
|
5099
5102
|
], An);
|
|
5100
|
-
class
|
|
5103
|
+
class Zu {
|
|
5101
5104
|
constructor(e = {}) {
|
|
5102
5105
|
this.organization = new An(), this.noticeNumbers = [], Object.assign(this, e);
|
|
5103
5106
|
}
|
|
5104
5107
|
}
|
|
5105
5108
|
f([
|
|
5106
5109
|
y({ type: An })
|
|
5107
|
-
],
|
|
5110
|
+
], Zu.prototype, "organization", void 0);
|
|
5108
5111
|
f([
|
|
5109
5112
|
y({ type: b.Integer, repeated: "sequence" })
|
|
5110
|
-
],
|
|
5113
|
+
], Zu.prototype, "noticeNumbers", void 0);
|
|
5111
5114
|
class Wu {
|
|
5112
5115
|
constructor(e = {}) {
|
|
5113
5116
|
Object.assign(this, e);
|
|
5114
5117
|
}
|
|
5115
5118
|
}
|
|
5116
5119
|
f([
|
|
5117
|
-
y({ type:
|
|
5120
|
+
y({ type: Zu, optional: !0 })
|
|
5118
5121
|
], Wu.prototype, "noticeRef", void 0);
|
|
5119
5122
|
f([
|
|
5120
5123
|
y({ type: An, optional: !0 })
|
|
@@ -5439,16 +5442,16 @@ f([
|
|
|
5439
5442
|
y({ type: b.Any, repeated: "set" })
|
|
5440
5443
|
], Sn.prototype, "values", void 0);
|
|
5441
5444
|
var Ol;
|
|
5442
|
-
let
|
|
5445
|
+
let qf = Ol = class extends dt {
|
|
5443
5446
|
constructor(e) {
|
|
5444
5447
|
super(e), Object.setPrototypeOf(this, Ol.prototype);
|
|
5445
5448
|
}
|
|
5446
5449
|
};
|
|
5447
|
-
|
|
5450
|
+
qf = Ol = f([
|
|
5448
5451
|
H({ type: M.Sequence, itemType: Sn })
|
|
5449
|
-
],
|
|
5452
|
+
], qf);
|
|
5450
5453
|
const Qu = `${Yn}.14`;
|
|
5451
|
-
class Ln extends
|
|
5454
|
+
class Ln extends qu {
|
|
5452
5455
|
}
|
|
5453
5456
|
class jp {
|
|
5454
5457
|
constructor(e = {}) {
|
|
@@ -5486,14 +5489,14 @@ f([
|
|
|
5486
5489
|
y({ type: Pp })
|
|
5487
5490
|
], Rp.prototype, "entrustInfoFlags", void 0);
|
|
5488
5491
|
var Tl;
|
|
5489
|
-
let
|
|
5492
|
+
let Zf = Tl = class extends dt {
|
|
5490
5493
|
constructor(e) {
|
|
5491
5494
|
super(e), Object.setPrototypeOf(this, Tl.prototype);
|
|
5492
5495
|
}
|
|
5493
5496
|
};
|
|
5494
|
-
|
|
5497
|
+
Zf = Tl = f([
|
|
5495
5498
|
H({ type: M.Sequence, itemType: yo })
|
|
5496
|
-
],
|
|
5499
|
+
], Zf);
|
|
5497
5500
|
class oe {
|
|
5498
5501
|
constructor(e = {}) {
|
|
5499
5502
|
this.algorithm = "", Object.assign(this, e);
|
|
@@ -5957,45 +5960,45 @@ var Dl;
|
|
|
5957
5960
|
(function(r) {
|
|
5958
5961
|
r[r.v2 = 1] = "v2";
|
|
5959
5962
|
})(Dl || (Dl = {}));
|
|
5960
|
-
class
|
|
5963
|
+
class qr {
|
|
5961
5964
|
constructor(e = {}) {
|
|
5962
5965
|
this.version = Dl.v2, this.holder = new go(), this.issuer = new zi(), this.signature = new oe(), this.serialNumber = new ArrayBuffer(0), this.attrCertValidityPeriod = new dc(), this.attributes = [], Object.assign(this, e);
|
|
5963
5966
|
}
|
|
5964
5967
|
}
|
|
5965
5968
|
f([
|
|
5966
5969
|
y({ type: b.Integer })
|
|
5967
|
-
],
|
|
5970
|
+
], qr.prototype, "version", void 0);
|
|
5968
5971
|
f([
|
|
5969
5972
|
y({ type: go })
|
|
5970
|
-
],
|
|
5973
|
+
], qr.prototype, "holder", void 0);
|
|
5971
5974
|
f([
|
|
5972
5975
|
y({ type: zi })
|
|
5973
|
-
],
|
|
5976
|
+
], qr.prototype, "issuer", void 0);
|
|
5974
5977
|
f([
|
|
5975
5978
|
y({ type: oe })
|
|
5976
|
-
],
|
|
5979
|
+
], qr.prototype, "signature", void 0);
|
|
5977
5980
|
f([
|
|
5978
5981
|
y({ type: b.Integer, converter: wt })
|
|
5979
|
-
],
|
|
5982
|
+
], qr.prototype, "serialNumber", void 0);
|
|
5980
5983
|
f([
|
|
5981
5984
|
y({ type: dc })
|
|
5982
|
-
],
|
|
5985
|
+
], qr.prototype, "attrCertValidityPeriod", void 0);
|
|
5983
5986
|
f([
|
|
5984
5987
|
y({ type: Sn, repeated: "sequence" })
|
|
5985
|
-
],
|
|
5988
|
+
], qr.prototype, "attributes", void 0);
|
|
5986
5989
|
f([
|
|
5987
5990
|
y({ type: b.BitString, optional: !0 })
|
|
5988
|
-
],
|
|
5991
|
+
], qr.prototype, "issuerUniqueID", void 0);
|
|
5989
5992
|
f([
|
|
5990
5993
|
y({ type: hi, optional: !0 })
|
|
5991
|
-
],
|
|
5994
|
+
], qr.prototype, "extensions", void 0);
|
|
5992
5995
|
class pc {
|
|
5993
5996
|
constructor(e = {}) {
|
|
5994
|
-
this.acinfo = new
|
|
5997
|
+
this.acinfo = new qr(), this.signatureAlgorithm = new oe(), this.signatureValue = new ArrayBuffer(0), Object.assign(this, e);
|
|
5995
5998
|
}
|
|
5996
5999
|
}
|
|
5997
6000
|
f([
|
|
5998
|
-
y({ type:
|
|
6001
|
+
y({ type: qr })
|
|
5999
6002
|
], pc.prototype, "acinfo", void 0);
|
|
6000
6003
|
f([
|
|
6001
6004
|
y({ type: oe })
|
|
@@ -6260,27 +6263,27 @@ f([
|
|
|
6260
6263
|
f([
|
|
6261
6264
|
y({ type: mc, optional: !0 })
|
|
6262
6265
|
], wc.prototype, "other", void 0);
|
|
6263
|
-
let
|
|
6266
|
+
let qi = class {
|
|
6264
6267
|
constructor(e = {}) {
|
|
6265
6268
|
Object.assign(this, e);
|
|
6266
6269
|
}
|
|
6267
6270
|
};
|
|
6268
6271
|
f([
|
|
6269
6272
|
y({ type: wc, context: 0, implicit: !0, optional: !0 })
|
|
6270
|
-
],
|
|
6273
|
+
], qi.prototype, "rKeyId", void 0);
|
|
6271
6274
|
f([
|
|
6272
6275
|
y({ type: os, optional: !0 })
|
|
6273
|
-
],
|
|
6274
|
-
|
|
6276
|
+
], qi.prototype, "issuerAndSerialNumber", void 0);
|
|
6277
|
+
qi = f([
|
|
6275
6278
|
H({ type: M.Choice })
|
|
6276
|
-
],
|
|
6279
|
+
], qi);
|
|
6277
6280
|
class af {
|
|
6278
6281
|
constructor(e = {}) {
|
|
6279
|
-
this.rid = new
|
|
6282
|
+
this.rid = new qi(), this.encryptedKey = new et(), Object.assign(this, e);
|
|
6280
6283
|
}
|
|
6281
6284
|
}
|
|
6282
6285
|
f([
|
|
6283
|
-
y({ type:
|
|
6286
|
+
y({ type: qi })
|
|
6284
6287
|
], af.prototype, "rid", void 0);
|
|
6285
6288
|
f([
|
|
6286
6289
|
y({ type: et })
|
|
@@ -6341,30 +6344,30 @@ f([
|
|
|
6341
6344
|
f([
|
|
6342
6345
|
y({ type: sa })
|
|
6343
6346
|
], cs.prototype, "recipientEncryptedKeys", void 0);
|
|
6344
|
-
let
|
|
6347
|
+
let Zi = class {
|
|
6345
6348
|
constructor(e = {}) {
|
|
6346
6349
|
Object.assign(this, e);
|
|
6347
6350
|
}
|
|
6348
6351
|
};
|
|
6349
6352
|
f([
|
|
6350
6353
|
y({ type: Ln, context: 0, implicit: !0 })
|
|
6351
|
-
],
|
|
6354
|
+
], Zi.prototype, "subjectKeyIdentifier", void 0);
|
|
6352
6355
|
f([
|
|
6353
6356
|
y({ type: os })
|
|
6354
|
-
],
|
|
6355
|
-
|
|
6357
|
+
], Zi.prototype, "issuerAndSerialNumber", void 0);
|
|
6358
|
+
Zi = f([
|
|
6356
6359
|
H({ type: M.Choice })
|
|
6357
|
-
],
|
|
6360
|
+
], Zi);
|
|
6358
6361
|
class mo {
|
|
6359
6362
|
constructor(e = {}) {
|
|
6360
|
-
this.version = an.v0, this.rid = new
|
|
6363
|
+
this.version = an.v0, this.rid = new Zi(), this.keyEncryptionAlgorithm = new cn(), this.encryptedKey = new et(), Object.assign(this, e);
|
|
6361
6364
|
}
|
|
6362
6365
|
}
|
|
6363
6366
|
f([
|
|
6364
6367
|
y({ type: b.Integer })
|
|
6365
6368
|
], mo.prototype, "version", void 0);
|
|
6366
6369
|
f([
|
|
6367
|
-
y({ type:
|
|
6370
|
+
y({ type: Zi })
|
|
6368
6371
|
], mo.prototype, "rid", void 0);
|
|
6369
6372
|
f([
|
|
6370
6373
|
y({ type: cn })
|
|
@@ -6506,14 +6509,14 @@ f([
|
|
|
6506
6509
|
y({ type: ca, context: 1, implicit: !0, optional: !0 })
|
|
6507
6510
|
], uf.prototype, "crls", void 0);
|
|
6508
6511
|
var Kl;
|
|
6509
|
-
let
|
|
6512
|
+
let ql = Kl = class extends dt {
|
|
6510
6513
|
constructor(e) {
|
|
6511
6514
|
super(e), Object.setPrototypeOf(this, Kl.prototype);
|
|
6512
6515
|
}
|
|
6513
6516
|
};
|
|
6514
|
-
|
|
6517
|
+
ql = Kl = f([
|
|
6515
6518
|
H({ type: M.Set, itemType: as })
|
|
6516
|
-
],
|
|
6519
|
+
], ql);
|
|
6517
6520
|
class Ao {
|
|
6518
6521
|
constructor(e = {}) {
|
|
6519
6522
|
this.version = an.v0, this.recipientInfos = new oa(), this.encryptedContentInfo = new vo(), Object.assign(this, e);
|
|
@@ -6532,9 +6535,9 @@ f([
|
|
|
6532
6535
|
y({ type: vo })
|
|
6533
6536
|
], Ao.prototype, "encryptedContentInfo", void 0);
|
|
6534
6537
|
f([
|
|
6535
|
-
y({ type:
|
|
6538
|
+
y({ type: ql, context: 1, implicit: !0, optional: !0 })
|
|
6536
6539
|
], Ao.prototype, "unprotectedAttrs", void 0);
|
|
6537
|
-
const zg = "1.2.840.113549.1.7.1",
|
|
6540
|
+
const zg = "1.2.840.113549.1.7.1", Zl = "1.2.840.113549.1.7.2";
|
|
6538
6541
|
var Wl;
|
|
6539
6542
|
let la = Wl = class extends dt {
|
|
6540
6543
|
constructor(e) {
|
|
@@ -6573,7 +6576,7 @@ function So(r) {
|
|
|
6573
6576
|
}
|
|
6574
6577
|
const Gg = So(ff);
|
|
6575
6578
|
So(Mp);
|
|
6576
|
-
const Kg = So(hf),
|
|
6579
|
+
const Kg = So(hf), qg = So(df), Zg = So(pf);
|
|
6577
6580
|
let Hs = class {
|
|
6578
6581
|
constructor(e = {}) {
|
|
6579
6582
|
Object.assign(this, e);
|
|
@@ -6697,10 +6700,10 @@ Ft(tv);
|
|
|
6697
6700
|
Ft(rv);
|
|
6698
6701
|
const Fp = new oe({
|
|
6699
6702
|
algorithm: Ac,
|
|
6700
|
-
parameters:
|
|
6703
|
+
parameters: q.serialize(vi)
|
|
6701
6704
|
}), zp = new oe({
|
|
6702
6705
|
algorithm: Jg,
|
|
6703
|
-
parameters:
|
|
6706
|
+
parameters: q.serialize(Ko.toASN(new Uint8Array([218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9]).buffer))
|
|
6704
6707
|
});
|
|
6705
6708
|
Ft(gi);
|
|
6706
6709
|
Ft(Xg);
|
|
@@ -6716,7 +6719,7 @@ class Sc {
|
|
|
6716
6719
|
constructor(e = {}) {
|
|
6717
6720
|
this.hashAlgorithm = new oe(vi), this.maskGenAlgorithm = new oe({
|
|
6718
6721
|
algorithm: Ac,
|
|
6719
|
-
parameters:
|
|
6722
|
+
parameters: q.serialize(vi)
|
|
6720
6723
|
}), this.pSourceAlgorithm = new oe(zp), Object.assign(this, e);
|
|
6721
6724
|
}
|
|
6722
6725
|
}
|
|
@@ -6731,13 +6734,13 @@ f([
|
|
|
6731
6734
|
], Sc.prototype, "pSourceAlgorithm", void 0);
|
|
6732
6735
|
new oe({
|
|
6733
6736
|
algorithm: Yg,
|
|
6734
|
-
parameters:
|
|
6737
|
+
parameters: q.serialize(new Sc())
|
|
6735
6738
|
});
|
|
6736
6739
|
class mi {
|
|
6737
6740
|
constructor(e = {}) {
|
|
6738
6741
|
this.hashAlgorithm = new oe(vi), this.maskGenAlgorithm = new oe({
|
|
6739
6742
|
algorithm: Ac,
|
|
6740
|
-
parameters:
|
|
6743
|
+
parameters: q.serialize(vi)
|
|
6741
6744
|
}), this.saltLength = 20, this.trailerField = 1, Object.assign(this, e);
|
|
6742
6745
|
}
|
|
6743
6746
|
}
|
|
@@ -6755,7 +6758,7 @@ f([
|
|
|
6755
6758
|
], mi.prototype, "trailerField", void 0);
|
|
6756
6759
|
new oe({
|
|
6757
6760
|
algorithm: js,
|
|
6758
|
-
parameters:
|
|
6761
|
+
parameters: q.serialize(new mi())
|
|
6759
6762
|
});
|
|
6760
6763
|
class _c {
|
|
6761
6764
|
constructor(e = {}) {
|
|
@@ -7132,7 +7135,7 @@ var vv = function(r) {
|
|
|
7132
7135
|
this.preResolution = new vv(), this.postResolution = new mv();
|
|
7133
7136
|
}
|
|
7134
7137
|
return r;
|
|
7135
|
-
}(),
|
|
7138
|
+
}(), qp = /* @__PURE__ */ new Map(), bv = function() {
|
|
7136
7139
|
function r(e) {
|
|
7137
7140
|
this.parent = e, this._registry = new hv(), this.interceptors = new wv(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
7138
7141
|
}
|
|
@@ -7338,7 +7341,7 @@ var vv = function(r) {
|
|
|
7338
7341
|
return n.resolve(s, t);
|
|
7339
7342
|
});
|
|
7340
7343
|
var i = function() {
|
|
7341
|
-
var s =
|
|
7344
|
+
var s = qp.get(e);
|
|
7342
7345
|
if (!s || s.length === 0) {
|
|
7343
7346
|
if (e.length === 0)
|
|
7344
7347
|
return new e();
|
|
@@ -7365,7 +7368,7 @@ var vv = function(r) {
|
|
|
7365
7368
|
}(), lr = new bv();
|
|
7366
7369
|
function kc() {
|
|
7367
7370
|
return function(r) {
|
|
7368
|
-
|
|
7371
|
+
qp.set(r, cv(r));
|
|
7369
7372
|
};
|
|
7370
7373
|
}
|
|
7371
7374
|
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
@@ -7399,17 +7402,17 @@ let sh = iu = class extends dt {
|
|
|
7399
7402
|
sh = iu = f([
|
|
7400
7403
|
H({ type: M.Sequence, itemType: bn })
|
|
7401
7404
|
], sh);
|
|
7402
|
-
class
|
|
7405
|
+
class Zp {
|
|
7403
7406
|
constructor(e = {}) {
|
|
7404
7407
|
this.certId = "", this.certValue = new ArrayBuffer(0), Object.assign(this, e);
|
|
7405
7408
|
}
|
|
7406
7409
|
}
|
|
7407
7410
|
f([
|
|
7408
7411
|
y({ type: b.ObjectIdentifier })
|
|
7409
|
-
],
|
|
7412
|
+
], Zp.prototype, "certId", void 0);
|
|
7410
7413
|
f([
|
|
7411
7414
|
y({ type: b.Any, context: 0 })
|
|
7412
|
-
],
|
|
7415
|
+
], Zp.prototype, "certValue", void 0);
|
|
7413
7416
|
class Wp {
|
|
7414
7417
|
constructor(e = {}) {
|
|
7415
7418
|
this.crlId = "", this.crltValue = new ArrayBuffer(0), Object.assign(this, e);
|
|
@@ -7835,7 +7838,7 @@ class xv {
|
|
|
7835
7838
|
const Yi = "crypto.algorithmProvider";
|
|
7836
7839
|
lr.registerSingleton(Yi, xv);
|
|
7837
7840
|
var Mo;
|
|
7838
|
-
const br = "1.3.36.3.3.2.8.1.1", Ah = `${br}.1`, Sh = `${br}.2`, _h = `${br}.3`, Eh = `${br}.4`, kh = `${br}.5`, Ih = `${br}.6`, Ch = `${br}.7`, Bh = `${br}.8`, Oh = `${br}.9`, Th = `${br}.10`, Nh = `${br}.11`, jh = `${br}.12`, Ph = `${br}.13`, Rh = `${br}.14`, Uh = "brainpoolP160r1", Dh = "brainpoolP160t1", $h = "brainpoolP192r1", Mh = "brainpoolP192t1", Vh = "brainpoolP224r1", Lh = "brainpoolP224t1", Hh = "brainpoolP256r1", Fh = "brainpoolP256t1", zh = "brainpoolP320r1", Gh = "brainpoolP320t1", Kh = "brainpoolP384r1",
|
|
7841
|
+
const br = "1.3.36.3.3.2.8.1.1", Ah = `${br}.1`, Sh = `${br}.2`, _h = `${br}.3`, Eh = `${br}.4`, kh = `${br}.5`, Ih = `${br}.6`, Ch = `${br}.7`, Bh = `${br}.8`, Oh = `${br}.9`, Th = `${br}.10`, Nh = `${br}.11`, jh = `${br}.12`, Ph = `${br}.13`, Rh = `${br}.14`, Uh = "brainpoolP160r1", Dh = "brainpoolP160t1", $h = "brainpoolP192r1", Mh = "brainpoolP192t1", Vh = "brainpoolP224r1", Lh = "brainpoolP224t1", Hh = "brainpoolP256r1", Fh = "brainpoolP256t1", zh = "brainpoolP320r1", Gh = "brainpoolP320t1", Kh = "brainpoolP384r1", qh = "brainpoolP384t1", Zh = "brainpoolP512r1", Wh = "brainpoolP512t1", kt = "ECDSA";
|
|
7839
7842
|
let zs = Mo = class {
|
|
7840
7843
|
toAsnAlgorithm(e) {
|
|
7841
7844
|
switch (e.name.toLowerCase()) {
|
|
@@ -7847,9 +7850,9 @@ let zs = Mo = class {
|
|
|
7847
7850
|
case "sha-256":
|
|
7848
7851
|
return Kg;
|
|
7849
7852
|
case "sha-384":
|
|
7850
|
-
return Zg;
|
|
7851
|
-
case "sha-512":
|
|
7852
7853
|
return qg;
|
|
7854
|
+
case "sha-512":
|
|
7855
|
+
return Zg;
|
|
7853
7856
|
}
|
|
7854
7857
|
else if ("namedCurve" in e) {
|
|
7855
7858
|
let t = "";
|
|
@@ -7899,10 +7902,10 @@ let zs = Mo = class {
|
|
|
7899
7902
|
case Kh:
|
|
7900
7903
|
t = Nh;
|
|
7901
7904
|
break;
|
|
7902
|
-
case
|
|
7905
|
+
case qh:
|
|
7903
7906
|
t = jh;
|
|
7904
7907
|
break;
|
|
7905
|
-
case
|
|
7908
|
+
case Zh:
|
|
7906
7909
|
t = Ph;
|
|
7907
7910
|
break;
|
|
7908
7911
|
case Wh:
|
|
@@ -7912,7 +7915,7 @@ let zs = Mo = class {
|
|
|
7912
7915
|
if (t)
|
|
7913
7916
|
return new oe({
|
|
7914
7917
|
algorithm: Ls,
|
|
7915
|
-
parameters:
|
|
7918
|
+
parameters: q.serialize(new zn({ namedCurve: t }))
|
|
7916
7919
|
});
|
|
7917
7920
|
}
|
|
7918
7921
|
}
|
|
@@ -7931,7 +7934,7 @@ let zs = Mo = class {
|
|
|
7931
7934
|
case Ls: {
|
|
7932
7935
|
if (!e.parameters)
|
|
7933
7936
|
throw new TypeError("Cannot get required parameters from EC algorithm");
|
|
7934
|
-
switch (
|
|
7937
|
+
switch (q.parse(e.parameters, zn).namedCurve) {
|
|
7935
7938
|
case Qf:
|
|
7936
7939
|
return { name: kt, namedCurve: "P-256" };
|
|
7937
7940
|
case Mo.SECP256K1:
|
|
@@ -7963,9 +7966,9 @@ let zs = Mo = class {
|
|
|
7963
7966
|
case Nh:
|
|
7964
7967
|
return { name: kt, namedCurve: Kh };
|
|
7965
7968
|
case jh:
|
|
7966
|
-
return { name: kt, namedCurve: Zh };
|
|
7967
|
-
case Ph:
|
|
7968
7969
|
return { name: kt, namedCurve: qh };
|
|
7970
|
+
case Ph:
|
|
7971
|
+
return { name: kt, namedCurve: Zh };
|
|
7969
7972
|
case Rh:
|
|
7970
7973
|
return { name: kt, namedCurve: Wh };
|
|
7971
7974
|
}
|
|
@@ -8035,7 +8038,7 @@ Bn.items = {
|
|
|
8035
8038
|
[Lg]: "E-mail Protection",
|
|
8036
8039
|
[Hg]: "Time Stamping",
|
|
8037
8040
|
[Fg]: "OCSP Signing",
|
|
8038
|
-
[
|
|
8041
|
+
[Zl]: "Signed Data"
|
|
8039
8042
|
};
|
|
8040
8043
|
class Gn {
|
|
8041
8044
|
static serialize(e) {
|
|
@@ -8096,9 +8099,9 @@ class Jn {
|
|
|
8096
8099
|
constructor(...e) {
|
|
8097
8100
|
if (e.length === 1) {
|
|
8098
8101
|
const t = e[0];
|
|
8099
|
-
this.rawData =
|
|
8102
|
+
this.rawData = q.serialize(t), this.onInit(t);
|
|
8100
8103
|
} else {
|
|
8101
|
-
const t =
|
|
8104
|
+
const t = q.parse(e[0], e[1]);
|
|
8102
8105
|
this.rawData = W.toArrayBuffer(e[0]), this.onInit(t);
|
|
8103
8106
|
}
|
|
8104
8107
|
}
|
|
@@ -8108,7 +8111,7 @@ class Jn {
|
|
|
8108
8111
|
toString(e = "text") {
|
|
8109
8112
|
switch (e) {
|
|
8110
8113
|
case "asn":
|
|
8111
|
-
return
|
|
8114
|
+
return q.toString(this.rawData);
|
|
8112
8115
|
case "text":
|
|
8113
8116
|
return Gn.serialize(this.toTextObject());
|
|
8114
8117
|
case "hex":
|
|
@@ -8136,7 +8139,7 @@ Jn.NAME = "ASN";
|
|
|
8136
8139
|
class jr extends Jn {
|
|
8137
8140
|
constructor(...e) {
|
|
8138
8141
|
let t;
|
|
8139
|
-
W.isBufferSource(e[0]) ? t = W.toArrayBuffer(e[0]) : t =
|
|
8142
|
+
W.isBufferSource(e[0]) ? t = W.toArrayBuffer(e[0]) : t = q.serialize(new Hr({
|
|
8140
8143
|
extnID: e[0],
|
|
8141
8144
|
critical: e[1],
|
|
8142
8145
|
extnValue: new et(W.toArrayBuffer(e[2]))
|
|
@@ -8210,7 +8213,7 @@ class Dn {
|
|
|
8210
8213
|
}
|
|
8211
8214
|
n0 = Symbol.toStringTag;
|
|
8212
8215
|
Dn.DEFAULT = "default";
|
|
8213
|
-
const
|
|
8216
|
+
const Zt = new Dn(), Sv = /^[0-2](?:\.[1-9][0-9]*)+$/;
|
|
8214
8217
|
function _v(r) {
|
|
8215
8218
|
return new RegExp(Sv).test(r);
|
|
8216
8219
|
}
|
|
@@ -8266,7 +8269,7 @@ class Hn {
|
|
|
8266
8269
|
const i = t[n];
|
|
8267
8270
|
this.extraNames.register(n, i);
|
|
8268
8271
|
}
|
|
8269
|
-
typeof e == "string" ? this.asn = this.fromString(e) : e instanceof Ht ? this.asn = e : W.isBufferSource(e) ? this.asn =
|
|
8272
|
+
typeof e == "string" ? this.asn = this.fromString(e) : e instanceof Ht ? this.asn = e : W.isBufferSource(e) ? this.asn = q.parse(e, Ht) : this.asn = this.fromJSON(e);
|
|
8270
8273
|
}
|
|
8271
8274
|
getField(e) {
|
|
8272
8275
|
const t = this.extraNames.findId(e) || mr.findId(e), n = [];
|
|
@@ -8366,22 +8369,22 @@ class Hn {
|
|
|
8366
8369
|
`).replace(/\\0d/ig, "\r").replace(/\\0g/ig, " ").replace(/\\(.)/g, "$1");
|
|
8367
8370
|
}
|
|
8368
8371
|
toArrayBuffer() {
|
|
8369
|
-
return
|
|
8372
|
+
return q.serialize(this.asn);
|
|
8370
8373
|
}
|
|
8371
8374
|
async getThumbprint(...e) {
|
|
8372
8375
|
var t;
|
|
8373
8376
|
let n, i = "SHA-1";
|
|
8374
|
-
return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (i = e[0] || i, n = e[1] ||
|
|
8377
|
+
return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (i = e[0] || i, n = e[1] || Zt.get()) : n = e[0] || Zt.get(), await n.subtle.digest(i, this.toArrayBuffer());
|
|
8375
8378
|
}
|
|
8376
8379
|
}
|
|
8377
|
-
const s0 = "Cannot initialize GeneralName from ASN.1 data.", Yh = `${s0} Unsupported string format in use.`, Iv = `${s0} Value doesn't match to GUID regular expression.`, Jh = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, Xh = "1.3.6.1.4.1.311.25.1", Qh = "1.3.6.1.4.1.311.20.2.3", Fc = "dns", zc = "dn", Gc = "email", Kc = "ip",
|
|
8380
|
+
const s0 = "Cannot initialize GeneralName from ASN.1 data.", Yh = `${s0} Unsupported string format in use.`, Iv = `${s0} Value doesn't match to GUID regular expression.`, Jh = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, Xh = "1.3.6.1.4.1.311.25.1", Qh = "1.3.6.1.4.1.311.20.2.3", Fc = "dns", zc = "dn", Gc = "email", Kc = "ip", qc = "url", Zc = "guid", Wc = "upn", No = "id";
|
|
8378
8381
|
class $n extends Jn {
|
|
8379
8382
|
constructor(...e) {
|
|
8380
8383
|
let t;
|
|
8381
8384
|
if (e.length === 2)
|
|
8382
8385
|
switch (e[0]) {
|
|
8383
8386
|
case zc: {
|
|
8384
|
-
const n = new Hn(e[1]).toArrayBuffer(), i =
|
|
8387
|
+
const n = new Hn(e[1]).toArrayBuffer(), i = q.parse(n, Ht);
|
|
8385
8388
|
t = new Ue({ directoryName: i });
|
|
8386
8389
|
break;
|
|
8387
8390
|
}
|
|
@@ -8391,7 +8394,7 @@ class $n extends Jn {
|
|
|
8391
8394
|
case Gc:
|
|
8392
8395
|
t = new Ue({ rfc822Name: e[1] });
|
|
8393
8396
|
break;
|
|
8394
|
-
case
|
|
8397
|
+
case Zc: {
|
|
8395
8398
|
const n = new RegExp(Jh, "i").exec(e[1]);
|
|
8396
8399
|
if (!n)
|
|
8397
8400
|
throw new Error("Cannot parse GUID value. Value doesn't match to regular expression");
|
|
@@ -8399,7 +8402,7 @@ class $n extends Jn {
|
|
|
8399
8402
|
t = new Ue({
|
|
8400
8403
|
otherName: new Ds({
|
|
8401
8404
|
typeId: Xh,
|
|
8402
|
-
value:
|
|
8405
|
+
value: q.serialize(new et(de.FromHex(i)))
|
|
8403
8406
|
})
|
|
8404
8407
|
});
|
|
8405
8408
|
break;
|
|
@@ -8414,18 +8417,18 @@ class $n extends Jn {
|
|
|
8414
8417
|
t = new Ue({
|
|
8415
8418
|
otherName: new Ds({
|
|
8416
8419
|
typeId: Qh,
|
|
8417
|
-
value:
|
|
8420
|
+
value: q.serialize(Sp.toASN(e[1]))
|
|
8418
8421
|
})
|
|
8419
8422
|
});
|
|
8420
8423
|
break;
|
|
8421
8424
|
}
|
|
8422
|
-
case
|
|
8425
|
+
case qc:
|
|
8423
8426
|
t = new Ue({ uniformResourceIdentifier: e[1] });
|
|
8424
8427
|
break;
|
|
8425
8428
|
default:
|
|
8426
8429
|
throw new Error("Cannot create GeneralName. Unsupported type of the name");
|
|
8427
8430
|
}
|
|
8428
|
-
else W.isBufferSource(e[0]) ? t =
|
|
8431
|
+
else W.isBufferSource(e[0]) ? t = q.parse(e[0], Ue) : t = e[0];
|
|
8429
8432
|
super(t);
|
|
8430
8433
|
}
|
|
8431
8434
|
onInit(e) {
|
|
@@ -8436,20 +8439,20 @@ class $n extends Jn {
|
|
|
8436
8439
|
else if (e.iPAddress != null)
|
|
8437
8440
|
this.type = Kc, this.value = e.iPAddress;
|
|
8438
8441
|
else if (e.uniformResourceIdentifier != null)
|
|
8439
|
-
this.type =
|
|
8442
|
+
this.type = qc, this.value = e.uniformResourceIdentifier;
|
|
8440
8443
|
else if (e.registeredID != null)
|
|
8441
8444
|
this.type = No, this.value = e.registeredID;
|
|
8442
8445
|
else if (e.directoryName != null)
|
|
8443
8446
|
this.type = zc, this.value = new Hn(e.directoryName).toString();
|
|
8444
8447
|
else if (e.otherName != null)
|
|
8445
8448
|
if (e.otherName.typeId === Xh) {
|
|
8446
|
-
this.type =
|
|
8447
|
-
const t =
|
|
8449
|
+
this.type = Zc;
|
|
8450
|
+
const t = q.parse(e.otherName.value, et), n = new RegExp(Jh, "i").exec(de.ToHex(t));
|
|
8448
8451
|
if (!n)
|
|
8449
8452
|
throw new Error(Iv);
|
|
8450
8453
|
this.value = n.slice(1).map((i, s) => s < 3 ? de.ToHex(new Uint8Array(de.FromHex(i)).reverse()) : i).join("-");
|
|
8451
8454
|
} else if (e.otherName.typeId === Qh)
|
|
8452
|
-
this.type = Wc, this.value =
|
|
8455
|
+
this.type = Wc, this.value = q.parse(e.otherName.value, Xt).toString();
|
|
8453
8456
|
else
|
|
8454
8457
|
throw new Error(Yh);
|
|
8455
8458
|
else
|
|
@@ -8466,11 +8469,11 @@ class $n extends Jn {
|
|
|
8466
8469
|
switch (this.type) {
|
|
8467
8470
|
case zc:
|
|
8468
8471
|
case Fc:
|
|
8469
|
-
case
|
|
8472
|
+
case Zc:
|
|
8470
8473
|
case Kc:
|
|
8471
8474
|
case No:
|
|
8472
8475
|
case Wc:
|
|
8473
|
-
case
|
|
8476
|
+
case qc:
|
|
8474
8477
|
e = this.type.toUpperCase();
|
|
8475
8478
|
break;
|
|
8476
8479
|
case Gc:
|
|
@@ -8494,12 +8497,12 @@ class Gs extends Jn {
|
|
|
8494
8497
|
if (i instanceof Ue)
|
|
8495
8498
|
n.push(i);
|
|
8496
8499
|
else {
|
|
8497
|
-
const s =
|
|
8500
|
+
const s = q.parse(new $n(i.type, i.value).rawData, Ue);
|
|
8498
8501
|
n.push(s);
|
|
8499
8502
|
}
|
|
8500
8503
|
t = new cr(n);
|
|
8501
8504
|
} else if (W.isBufferSource(e))
|
|
8502
|
-
t =
|
|
8505
|
+
t = q.parse(e, cr);
|
|
8503
8506
|
else
|
|
8504
8507
|
throw new Error("Cannot initialize GeneralNames. Incorrect incoming arguments");
|
|
8505
8508
|
super(t);
|
|
@@ -8654,7 +8657,7 @@ class Fr extends Jn {
|
|
|
8654
8657
|
}
|
|
8655
8658
|
}
|
|
8656
8659
|
class sn extends Fr {
|
|
8657
|
-
static async create(e, t =
|
|
8660
|
+
static async create(e, t = Zt.get()) {
|
|
8658
8661
|
if (e instanceof sn)
|
|
8659
8662
|
return e;
|
|
8660
8663
|
if (Dn.isCryptoKey(e)) {
|
|
@@ -8675,16 +8678,16 @@ class sn extends Fr {
|
|
|
8675
8678
|
}
|
|
8676
8679
|
async export(...e) {
|
|
8677
8680
|
let t, n = ["verify"], i = { hash: "SHA-256", ...this.algorithm };
|
|
8678
|
-
e.length > 1 ? (i = e[0] || i, n = e[1] || n, t = e[2] ||
|
|
8681
|
+
e.length > 1 ? (i = e[0] || i, n = e[1] || n, t = e[2] || Zt.get()) : t = e[0] || Zt.get();
|
|
8679
8682
|
let s = this.rawData;
|
|
8680
|
-
const o =
|
|
8683
|
+
const o = q.parse(this.rawData, rn);
|
|
8681
8684
|
return o.algorithm.algorithm === js && (s = Rv(o, s)), t.subtle.importKey("spki", s, i, !0, n);
|
|
8682
8685
|
}
|
|
8683
8686
|
onInit(e) {
|
|
8684
8687
|
const t = lr.resolve(Yi), n = this.algorithm = t.toWebAlgorithm(e.algorithm);
|
|
8685
8688
|
switch (e.algorithm.algorithm) {
|
|
8686
8689
|
case gi: {
|
|
8687
|
-
const i =
|
|
8690
|
+
const i = q.parse(e.subjectPublicKey, yf), s = W.toUint8Array(i.modulus);
|
|
8688
8691
|
n.publicExponent = W.toUint8Array(i.publicExponent), n.modulusLength = (s[0] ? s : s.slice(1)).byteLength << 3;
|
|
8689
8692
|
break;
|
|
8690
8693
|
}
|
|
@@ -8693,16 +8696,16 @@ class sn extends Fr {
|
|
|
8693
8696
|
async getThumbprint(...e) {
|
|
8694
8697
|
var t;
|
|
8695
8698
|
let n, i = "SHA-1";
|
|
8696
|
-
return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (i = e[0] || i, n = e[1] ||
|
|
8699
|
+
return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (i = e[0] || i, n = e[1] || Zt.get()) : n = e[0] || Zt.get(), await n.subtle.digest(i, this.rawData);
|
|
8697
8700
|
}
|
|
8698
8701
|
async getKeyIdentifier(...e) {
|
|
8699
8702
|
let t, n = "SHA-1";
|
|
8700
|
-
e.length === 1 ? typeof e[0] == "string" ? (n = e[0], t =
|
|
8701
|
-
const i =
|
|
8703
|
+
e.length === 1 ? typeof e[0] == "string" ? (n = e[0], t = Zt.get()) : t = e[0] : e.length === 2 ? (n = e[0], t = e[1]) : t = Zt.get();
|
|
8704
|
+
const i = q.parse(this.rawData, rn);
|
|
8702
8705
|
return await t.subtle.digest(n, i.subjectPublicKey);
|
|
8703
8706
|
}
|
|
8704
8707
|
toTextObject() {
|
|
8705
|
-
const e = this.toTextObjectEmpty(), t =
|
|
8708
|
+
const e = this.toTextObjectEmpty(), t = q.parse(this.rawData, rn);
|
|
8706
8709
|
switch (e.Algorithm = Gn.serializeAlgorithm(t.algorithm), t.algorithm.algorithm) {
|
|
8707
8710
|
case Ls:
|
|
8708
8711
|
e["EC Point"] = t.subjectPublicKey;
|
|
@@ -8718,55 +8721,55 @@ function Rv(r, e) {
|
|
|
8718
8721
|
return r.algorithm = new oe({
|
|
8719
8722
|
algorithm: gi,
|
|
8720
8723
|
parameters: null
|
|
8721
|
-
}), e =
|
|
8724
|
+
}), e = q.serialize(r), e;
|
|
8722
8725
|
}
|
|
8723
|
-
class
|
|
8724
|
-
static async create(e, t = !1, n =
|
|
8726
|
+
class qs extends jr {
|
|
8727
|
+
static async create(e, t = !1, n = Zt.get()) {
|
|
8725
8728
|
if ("name" in e && "serialNumber" in e)
|
|
8726
|
-
return new
|
|
8729
|
+
return new qs(e, t);
|
|
8727
8730
|
const s = await (await sn.create(e, n)).getKeyIdentifier(n);
|
|
8728
|
-
return new
|
|
8731
|
+
return new qs(de.ToHex(s), t);
|
|
8729
8732
|
}
|
|
8730
8733
|
constructor(...e) {
|
|
8731
8734
|
if (W.isBufferSource(e[0]))
|
|
8732
8735
|
super(e[0]);
|
|
8733
8736
|
else if (typeof e[0] == "string") {
|
|
8734
|
-
const t = new ni({ keyIdentifier: new
|
|
8735
|
-
super(
|
|
8737
|
+
const t = new ni({ keyIdentifier: new qu(de.FromHex(e[0])) });
|
|
8738
|
+
super(qo, e[1], q.serialize(t));
|
|
8736
8739
|
} else {
|
|
8737
|
-
const t = e[0], n = t.name instanceof Gs ?
|
|
8740
|
+
const t = e[0], n = t.name instanceof Gs ? q.parse(t.name.rawData, cr) : t.name, i = new ni({
|
|
8738
8741
|
authorityCertIssuer: n,
|
|
8739
8742
|
authorityCertSerialNumber: de.FromHex(t.serialNumber)
|
|
8740
8743
|
});
|
|
8741
|
-
super(
|
|
8744
|
+
super(qo, e[1], q.serialize(i));
|
|
8742
8745
|
}
|
|
8743
8746
|
}
|
|
8744
8747
|
onInit(e) {
|
|
8745
8748
|
super.onInit(e);
|
|
8746
|
-
const t =
|
|
8749
|
+
const t = q.parse(e.extnValue, ni);
|
|
8747
8750
|
t.keyIdentifier && (this.keyId = de.ToHex(t.keyIdentifier)), (t.authorityCertIssuer || t.authorityCertSerialNumber) && (this.certId = {
|
|
8748
8751
|
name: t.authorityCertIssuer || [],
|
|
8749
8752
|
serialNumber: t.authorityCertSerialNumber ? de.ToHex(t.authorityCertSerialNumber) : ""
|
|
8750
8753
|
});
|
|
8751
8754
|
}
|
|
8752
8755
|
toTextObject() {
|
|
8753
|
-
const e = this.toTextObjectWithoutValue(), t =
|
|
8756
|
+
const e = this.toTextObjectWithoutValue(), t = q.parse(this.value, ni);
|
|
8754
8757
|
return t.authorityCertIssuer && (e["Authority Issuer"] = new Gs(t.authorityCertIssuer).toTextObject()), t.authorityCertSerialNumber && (e["Authority Serial Number"] = t.authorityCertSerialNumber), t.keyIdentifier && (e[""] = t.keyIdentifier), e;
|
|
8755
8758
|
}
|
|
8756
8759
|
}
|
|
8757
|
-
|
|
8760
|
+
qs.NAME = "Authority Key Identifier";
|
|
8758
8761
|
class o0 extends jr {
|
|
8759
8762
|
constructor(...e) {
|
|
8760
8763
|
if (W.isBufferSource(e[0])) {
|
|
8761
8764
|
super(e[0]);
|
|
8762
|
-
const t =
|
|
8765
|
+
const t = q.parse(this.value, Zo);
|
|
8763
8766
|
this.ca = t.cA, this.pathLength = t.pathLenConstraint;
|
|
8764
8767
|
} else {
|
|
8765
|
-
const t = new
|
|
8768
|
+
const t = new Zo({
|
|
8766
8769
|
cA: e[0],
|
|
8767
8770
|
pathLenConstraint: e[1]
|
|
8768
8771
|
});
|
|
8769
|
-
super(kp, e[2],
|
|
8772
|
+
super(kp, e[2], q.serialize(t)), this.ca = e[0], this.pathLength = e[1];
|
|
8770
8773
|
}
|
|
8771
8774
|
}
|
|
8772
8775
|
toTextObject() {
|
|
@@ -8783,11 +8786,11 @@ class a0 extends jr {
|
|
|
8783
8786
|
constructor(...e) {
|
|
8784
8787
|
if (W.isBufferSource(e[0])) {
|
|
8785
8788
|
super(e[0]);
|
|
8786
|
-
const t =
|
|
8789
|
+
const t = q.parse(this.value, Xo);
|
|
8787
8790
|
this.usages = t.map((n) => n);
|
|
8788
8791
|
} else {
|
|
8789
8792
|
const t = new Xo(e[0]);
|
|
8790
|
-
super(Bp, e[1],
|
|
8793
|
+
super(Bp, e[1], q.serialize(t)), this.usages = e[0];
|
|
8791
8794
|
}
|
|
8792
8795
|
}
|
|
8793
8796
|
toTextObject() {
|
|
@@ -8804,36 +8807,36 @@ class c0 extends jr {
|
|
|
8804
8807
|
constructor(...e) {
|
|
8805
8808
|
if (W.isBufferSource(e[0])) {
|
|
8806
8809
|
super(e[0]);
|
|
8807
|
-
const t =
|
|
8810
|
+
const t = q.parse(this.value, Hc);
|
|
8808
8811
|
this.usages = t.toNumber();
|
|
8809
8812
|
} else {
|
|
8810
8813
|
const t = new Hc(e[0]);
|
|
8811
|
-
super(Op, e[1],
|
|
8814
|
+
super(Op, e[1], q.serialize(t)), this.usages = e[0];
|
|
8812
8815
|
}
|
|
8813
8816
|
}
|
|
8814
8817
|
toTextObject() {
|
|
8815
|
-
const e = this.toTextObjectWithoutValue(), t =
|
|
8818
|
+
const e = this.toTextObjectWithoutValue(), t = q.parse(this.value, Hc);
|
|
8816
8819
|
return e[""] = t.toJSON().join(", "), e;
|
|
8817
8820
|
}
|
|
8818
8821
|
}
|
|
8819
8822
|
c0.NAME = "Key Usages";
|
|
8820
8823
|
class Tc extends jr {
|
|
8821
|
-
static async create(e, t = !1, n =
|
|
8824
|
+
static async create(e, t = !1, n = Zt.get()) {
|
|
8822
8825
|
const s = await (await sn.create(e, n)).getKeyIdentifier(n);
|
|
8823
8826
|
return new Tc(de.ToHex(s), t);
|
|
8824
8827
|
}
|
|
8825
8828
|
constructor(...e) {
|
|
8826
8829
|
if (W.isBufferSource(e[0])) {
|
|
8827
8830
|
super(e[0]);
|
|
8828
|
-
const t =
|
|
8831
|
+
const t = q.parse(this.value, Ln);
|
|
8829
8832
|
this.keyId = de.ToHex(t);
|
|
8830
8833
|
} else {
|
|
8831
8834
|
const t = typeof e[0] == "string" ? de.FromHex(e[0]) : e[0], n = new Ln(t);
|
|
8832
|
-
super(Qu, e[1],
|
|
8835
|
+
super(Qu, e[1], q.serialize(n)), this.keyId = de.ToHex(t);
|
|
8833
8836
|
}
|
|
8834
8837
|
}
|
|
8835
8838
|
toTextObject() {
|
|
8836
|
-
const e = this.toTextObjectWithoutValue(), t =
|
|
8839
|
+
const e = this.toTextObjectWithoutValue(), t = q.parse(this.value, Ln);
|
|
8837
8840
|
return e[""] = t, e;
|
|
8838
8841
|
}
|
|
8839
8842
|
}
|
|
@@ -8844,7 +8847,7 @@ class l0 extends jr {
|
|
|
8844
8847
|
}
|
|
8845
8848
|
onInit(e) {
|
|
8846
8849
|
super.onInit(e);
|
|
8847
|
-
const t =
|
|
8850
|
+
const t = q.parse(e.extnValue, Bl);
|
|
8848
8851
|
this.names = new Gs(t);
|
|
8849
8852
|
}
|
|
8850
8853
|
toTextObject() {
|
|
@@ -8870,13 +8873,13 @@ class u0 extends jr {
|
|
|
8870
8873
|
var t;
|
|
8871
8874
|
if (W.isBufferSource(e[0])) {
|
|
8872
8875
|
super(e[0]);
|
|
8873
|
-
const n =
|
|
8876
|
+
const n = q.parse(this.value, Yo);
|
|
8874
8877
|
this.policies = n.map((i) => i.policyIdentifier);
|
|
8875
8878
|
} else {
|
|
8876
8879
|
const n = e[0], i = (t = e[1]) !== null && t !== void 0 ? t : !1, s = new Yo(n.map((o) => new ac({
|
|
8877
8880
|
policyIdentifier: o
|
|
8878
8881
|
})));
|
|
8879
|
-
super(Ip, i,
|
|
8882
|
+
super(Ip, i, q.serialize(s)), this.policies = n;
|
|
8880
8883
|
}
|
|
8881
8884
|
}
|
|
8882
8885
|
toTextObject() {
|
|
@@ -8897,16 +8900,16 @@ class f0 extends jr {
|
|
|
8897
8900
|
fullName: [new Ue({ uniformResourceIdentifier: o })]
|
|
8898
8901
|
})
|
|
8899
8902
|
})), s = new Di(i);
|
|
8900
|
-
super(wl, e[1],
|
|
8903
|
+
super(wl, e[1], q.serialize(s));
|
|
8901
8904
|
} else {
|
|
8902
8905
|
const n = new Di(e[0]);
|
|
8903
|
-
super(wl, e[1],
|
|
8906
|
+
super(wl, e[1], q.serialize(n));
|
|
8904
8907
|
}
|
|
8905
8908
|
(t = this.distributionPoints) !== null && t !== void 0 || (this.distributionPoints = []);
|
|
8906
8909
|
}
|
|
8907
8910
|
onInit(e) {
|
|
8908
8911
|
super.onInit(e);
|
|
8909
|
-
const t =
|
|
8912
|
+
const t = q.parse(e.extnValue, Di);
|
|
8910
8913
|
this.distributionPoints = t;
|
|
8911
8914
|
}
|
|
8912
8915
|
toTextObject() {
|
|
@@ -8926,15 +8929,15 @@ class h0 extends jr {
|
|
|
8926
8929
|
super(e[0]);
|
|
8927
8930
|
else if (e[0] instanceof Pi) {
|
|
8928
8931
|
const o = new Pi(e[0]);
|
|
8929
|
-
super(pl, e[1],
|
|
8932
|
+
super(pl, e[1], q.serialize(o));
|
|
8930
8933
|
} else {
|
|
8931
8934
|
const o = e[0], c = new Pi();
|
|
8932
|
-
Po(c, o, $f, "ocsp"), Po(c, o, Mf, "caIssuers"), Po(c, o, Vf, "timeStamping"), Po(c, o, Lf, "caRepository"), super(pl, e[1],
|
|
8935
|
+
Po(c, o, $f, "ocsp"), Po(c, o, Mf, "caIssuers"), Po(c, o, Vf, "timeStamping"), Po(c, o, Lf, "caRepository"), super(pl, e[1], q.serialize(c));
|
|
8933
8936
|
}
|
|
8934
8937
|
(t = this.ocsp) !== null && t !== void 0 || (this.ocsp = []), (n = this.caIssuers) !== null && n !== void 0 || (this.caIssuers = []), (i = this.timeStamping) !== null && i !== void 0 || (this.timeStamping = []), (s = this.caRepository) !== null && s !== void 0 || (this.caRepository = []);
|
|
8935
8938
|
}
|
|
8936
8939
|
onInit(e) {
|
|
8937
|
-
super.onInit(e), this.ocsp = [], this.caIssuers = [], this.timeStamping = [], this.caRepository = [],
|
|
8940
|
+
super.onInit(e), this.ocsp = [], this.caIssuers = [], this.timeStamping = [], this.caRepository = [], q.parse(e.extnValue, Pi).forEach((n) => {
|
|
8938
8941
|
switch (n.accessMethod) {
|
|
8939
8942
|
case $f:
|
|
8940
8943
|
this.ocsp.push(new $n(n.accessLocation));
|
|
@@ -8974,7 +8977,7 @@ function Po(r, e, t, n) {
|
|
|
8974
8977
|
i && (Array.isArray(i) ? i : [i]).forEach((o) => {
|
|
8975
8978
|
typeof o == "string" && (o = new $n("url", o)), r.push(new yo({
|
|
8976
8979
|
accessMethod: t,
|
|
8977
|
-
accessLocation:
|
|
8980
|
+
accessLocation: q.parse(o.rawData, Ue)
|
|
8978
8981
|
}));
|
|
8979
8982
|
});
|
|
8980
8983
|
}
|
|
@@ -8985,7 +8988,7 @@ class us extends Jn {
|
|
|
8985
8988
|
t = W.toArrayBuffer(e[0]);
|
|
8986
8989
|
else {
|
|
8987
8990
|
const n = e[0], i = Array.isArray(e[1]) ? e[1].map((s) => W.toArrayBuffer(s)) : [];
|
|
8988
|
-
t =
|
|
8991
|
+
t = q.serialize(new Sn({ type: n, values: i }));
|
|
8989
8992
|
}
|
|
8990
8993
|
super(t, Sn);
|
|
8991
8994
|
}
|
|
@@ -9011,13 +9014,13 @@ class d0 extends us {
|
|
|
9011
9014
|
const n = new xa({
|
|
9012
9015
|
printableString: e[0]
|
|
9013
9016
|
});
|
|
9014
|
-
super(e0, [
|
|
9017
|
+
super(e0, [q.serialize(n)]);
|
|
9015
9018
|
}
|
|
9016
9019
|
(t = this.password) !== null && t !== void 0 || (this.password = "");
|
|
9017
9020
|
}
|
|
9018
9021
|
onInit(e) {
|
|
9019
9022
|
if (super.onInit(e), this.values[0]) {
|
|
9020
|
-
const t =
|
|
9023
|
+
const t = q.parse(this.values[0], xa);
|
|
9021
9024
|
this.password = t.toString();
|
|
9022
9025
|
}
|
|
9023
9026
|
}
|
|
@@ -9035,15 +9038,15 @@ class wf extends us {
|
|
|
9035
9038
|
else {
|
|
9036
9039
|
const n = e[0], i = new hi();
|
|
9037
9040
|
for (const s of n)
|
|
9038
|
-
i.push(
|
|
9039
|
-
super(mf, [
|
|
9041
|
+
i.push(q.parse(s.rawData, Hr));
|
|
9042
|
+
super(mf, [q.serialize(i)]);
|
|
9040
9043
|
}
|
|
9041
9044
|
(t = this.items) !== null && t !== void 0 || (this.items = []);
|
|
9042
9045
|
}
|
|
9043
9046
|
onInit(e) {
|
|
9044
9047
|
if (super.onInit(e), this.values[0]) {
|
|
9045
|
-
const t =
|
|
9046
|
-
this.items = t.map((n) => Pr.create(
|
|
9048
|
+
const t = q.parse(this.values[0], hi);
|
|
9049
|
+
this.items = t.map((n) => Pr.create(q.serialize(n)));
|
|
9047
9050
|
}
|
|
9048
9051
|
}
|
|
9049
9052
|
toTextObject() {
|
|
@@ -9081,7 +9084,7 @@ let bu = Vo = class {
|
|
|
9081
9084
|
hashAlgorithm: n,
|
|
9082
9085
|
maskGenAlgorithm: new oe({
|
|
9083
9086
|
algorithm: Ac,
|
|
9084
|
-
parameters:
|
|
9087
|
+
parameters: q.serialize(n)
|
|
9085
9088
|
}),
|
|
9086
9089
|
saltLength: t
|
|
9087
9090
|
}) : null;
|
|
@@ -9121,7 +9124,7 @@ let bu = Vo = class {
|
|
|
9121
9124
|
const t = Vo.createPssParams(e.hash, e.saltLength);
|
|
9122
9125
|
if (!t)
|
|
9123
9126
|
throw new Error("Cannot create PSS parameters");
|
|
9124
|
-
return new oe({ algorithm: js, parameters:
|
|
9127
|
+
return new oe({ algorithm: js, parameters: q.serialize(t) });
|
|
9125
9128
|
} else
|
|
9126
9129
|
return new oe({ algorithm: js, parameters: null });
|
|
9127
9130
|
}
|
|
@@ -9141,7 +9144,7 @@ let bu = Vo = class {
|
|
|
9141
9144
|
return { name: "RSASSA-PKCS1-v1_5", hash: { name: "SHA-512" } };
|
|
9142
9145
|
case js:
|
|
9143
9146
|
if (e.parameters) {
|
|
9144
|
-
const t =
|
|
9147
|
+
const t = q.parse(e.parameters, mi);
|
|
9145
9148
|
return {
|
|
9146
9149
|
name: "RSA-PSS",
|
|
9147
9150
|
hash: lr.resolve(Yi).toWebAlgorithm(t.hashAlgorithm),
|
|
@@ -9210,13 +9213,13 @@ class Or {
|
|
|
9210
9213
|
toAsnSignature(e, t) {
|
|
9211
9214
|
if (e.name === "ECDSA") {
|
|
9212
9215
|
const n = e.namedCurve, i = Or.namedCurveSize.get(n) || Or.defaultNamedCurveSize, s = new ua(), o = W.toUint8Array(t);
|
|
9213
|
-
return s.r = this.removePadding(o.slice(0, i), !0), s.s = this.removePadding(o.slice(i, i + i), !0),
|
|
9216
|
+
return s.r = this.removePadding(o.slice(0, i), !0), s.s = this.removePadding(o.slice(i, i + i), !0), q.serialize(s);
|
|
9214
9217
|
}
|
|
9215
9218
|
return null;
|
|
9216
9219
|
}
|
|
9217
9220
|
toWebSignature(e, t) {
|
|
9218
9221
|
if (e.name === "ECDSA") {
|
|
9219
|
-
const n =
|
|
9222
|
+
const n = q.parse(t, ua), i = e.namedCurve, s = Or.namedCurveSize.get(i) || Or.defaultNamedCurveSize, o = this.addPadding(s, this.removePadding(n.r)), c = this.addPadding(s, this.removePadding(n.s));
|
|
9220
9223
|
return Wy(o, c);
|
|
9221
9224
|
}
|
|
9222
9225
|
return null;
|
|
@@ -9282,9 +9285,9 @@ class Dv extends Fr {
|
|
|
9282
9285
|
Fr.isAsnEncoded(e) ? super(e, Fs) : super(e), this.tag = gr.CertificateRequestTag;
|
|
9283
9286
|
}
|
|
9284
9287
|
onInit(e) {
|
|
9285
|
-
this.tbs =
|
|
9288
|
+
this.tbs = q.serialize(e.certificationRequestInfo), this.publicKey = new sn(e.certificationRequestInfo.subjectPKInfo);
|
|
9286
9289
|
const t = lr.resolve(Yi);
|
|
9287
|
-
this.signatureAlgorithm = t.toWebAlgorithm(e.signatureAlgorithm), this.signature = e.signature, this.attributes = e.certificationRequestInfo.attributes.map((i) => Nc.create(
|
|
9290
|
+
this.signatureAlgorithm = t.toWebAlgorithm(e.signatureAlgorithm), this.signature = e.signature, this.attributes = e.certificationRequestInfo.attributes.map((i) => Nc.create(q.serialize(i)));
|
|
9288
9291
|
const n = this.getAttribute(mf);
|
|
9289
9292
|
this.extensions = [], n instanceof wf && (this.extensions = n.items), this.subjectName = new Hn(e.certificationRequestInfo.subject), this.subject = this.subjectName.toString();
|
|
9290
9293
|
}
|
|
@@ -9306,7 +9309,7 @@ class Dv extends Fr {
|
|
|
9306
9309
|
getExtensions(e) {
|
|
9307
9310
|
return this.extensions.filter((t) => t.type === e);
|
|
9308
9311
|
}
|
|
9309
|
-
async verify(e =
|
|
9312
|
+
async verify(e = Zt.get()) {
|
|
9310
9313
|
const t = { ...this.publicKey.algorithm, ...this.signatureAlgorithm }, n = await this.publicKey.export(t, ["verify"], e), i = lr.resolveAll(jc).reverse();
|
|
9311
9314
|
let s = null;
|
|
9312
9315
|
for (const c of i)
|
|
@@ -9317,7 +9320,7 @@ class Dv extends Fr {
|
|
|
9317
9320
|
return await e.subtle.verify(this.signatureAlgorithm, n, s, this.tbs);
|
|
9318
9321
|
}
|
|
9319
9322
|
toTextObject() {
|
|
9320
|
-
const e = this.toTextObjectEmpty(), t =
|
|
9323
|
+
const e = this.toTextObjectEmpty(), t = q.parse(this.rawData, Fs), n = t.certificationRequestInfo, i = new Qe("", {
|
|
9321
9324
|
Version: `${Hi[n.version]} (${n.version})`,
|
|
9322
9325
|
Subject: this.subject,
|
|
9323
9326
|
"Subject Public Key Info": this.publicKey
|
|
@@ -9343,7 +9346,7 @@ class wi extends Fr {
|
|
|
9343
9346
|
}
|
|
9344
9347
|
onInit(e) {
|
|
9345
9348
|
const t = e.tbsCertificate;
|
|
9346
|
-
this.tbs =
|
|
9349
|
+
this.tbs = q.serialize(t), this.serialNumber = de.ToHex(t.serialNumber), this.subjectName = new Hn(t.subject), this.subject = new Hn(t.subject).toString(), this.issuerName = new Hn(t.issuer), this.issuer = this.issuerName.toString();
|
|
9347
9350
|
const n = lr.resolve(Yi);
|
|
9348
9351
|
this.signatureAlgorithm = n.toWebAlgorithm(e.signatureAlgorithm), this.signature = e.signatureValue;
|
|
9349
9352
|
const i = t.validity.notBefore.utcTime || t.validity.notBefore.generalTime;
|
|
@@ -9353,7 +9356,7 @@ class wi extends Fr {
|
|
|
9353
9356
|
const s = t.validity.notAfter.utcTime || t.validity.notAfter.generalTime;
|
|
9354
9357
|
if (!s)
|
|
9355
9358
|
throw new Error("Cannot get 'notAfter' value");
|
|
9356
|
-
this.notAfter = s, this.extensions = [], t.extensions && (this.extensions = t.extensions.map((o) => Pr.create(
|
|
9359
|
+
this.notAfter = s, this.extensions = [], t.extensions && (this.extensions = t.extensions.map((o) => Pr.create(q.serialize(o)))), this.publicKey = new sn(t.subjectPublicKeyInfo);
|
|
9357
9360
|
}
|
|
9358
9361
|
getExtension(e) {
|
|
9359
9362
|
for (const t of this.extensions)
|
|
@@ -9367,7 +9370,7 @@ class wi extends Fr {
|
|
|
9367
9370
|
getExtensions(e) {
|
|
9368
9371
|
return this.extensions.filter((t) => typeof e == "string" ? t.type === e : t instanceof e);
|
|
9369
9372
|
}
|
|
9370
|
-
async verify(e = {}, t =
|
|
9373
|
+
async verify(e = {}, t = Zt.get()) {
|
|
9371
9374
|
let n, i;
|
|
9372
9375
|
const s = e.publicKey;
|
|
9373
9376
|
try {
|
|
@@ -9402,13 +9405,13 @@ class wi extends Fr {
|
|
|
9402
9405
|
}
|
|
9403
9406
|
async getThumbprint(...e) {
|
|
9404
9407
|
let t, n = "SHA-1";
|
|
9405
|
-
return e[0] && (e[0].subtle ? t = e[0] : (n = e[0] || n, t = e[1])), t ?? (t =
|
|
9408
|
+
return e[0] && (e[0].subtle ? t = e[0] : (n = e[0] || n, t = e[1])), t ?? (t = Zt.get()), await t.subtle.digest(n, this.rawData);
|
|
9406
9409
|
}
|
|
9407
|
-
async isSelfSigned(e =
|
|
9410
|
+
async isSelfSigned(e = Zt.get()) {
|
|
9408
9411
|
return this.subject === this.issuer && await this.verify({ signatureOnly: !0 }, e);
|
|
9409
9412
|
}
|
|
9410
9413
|
toTextObject() {
|
|
9411
|
-
const e = this.toTextObjectEmpty(), t =
|
|
9414
|
+
const e = this.toTextObjectEmpty(), t = q.parse(this.rawData, di), n = t.tbsCertificate, i = new Qe("", {
|
|
9412
9415
|
Version: `${Hi[n.version]} (${n.version})`,
|
|
9413
9416
|
"Serial Number": n.serialNumber,
|
|
9414
9417
|
"Signature Algorithm": Gn.serializeAlgorithm(n.signature),
|
|
@@ -9450,19 +9453,19 @@ class $v extends Array {
|
|
|
9450
9453
|
t.version = 1, t.encapContentInfo.eContentType = zg, t.encapContentInfo.eContent = new Ki({
|
|
9451
9454
|
single: new et()
|
|
9452
9455
|
}), t.certificates = new Ms(this.map((s) => new pi({
|
|
9453
|
-
certificate:
|
|
9456
|
+
certificate: q.parse(s.rawData, di)
|
|
9454
9457
|
})));
|
|
9455
9458
|
const n = new bn({
|
|
9456
|
-
contentType:
|
|
9457
|
-
content:
|
|
9458
|
-
}), i =
|
|
9459
|
+
contentType: Zl,
|
|
9460
|
+
content: q.serialize(t)
|
|
9461
|
+
}), i = q.serialize(n);
|
|
9459
9462
|
return e === "raw" ? i : this.toString(e);
|
|
9460
9463
|
}
|
|
9461
9464
|
import(e) {
|
|
9462
|
-
const t = Fr.toArrayBuffer(e), n =
|
|
9463
|
-
if (n.contentType !==
|
|
9465
|
+
const t = Fr.toArrayBuffer(e), n = q.parse(t, bn);
|
|
9466
|
+
if (n.contentType !== Zl)
|
|
9464
9467
|
throw new TypeError("Cannot parse CMS package. Incoming data is not a SignedData object.");
|
|
9465
|
-
const i =
|
|
9468
|
+
const i = q.parse(n.content, xn);
|
|
9466
9469
|
this.clear();
|
|
9467
9470
|
for (const s of i.certificates || [])
|
|
9468
9471
|
s.certificate && this.push(new wi(s.certificate));
|
|
@@ -9480,7 +9483,7 @@ class $v extends Array {
|
|
|
9480
9483
|
return this.map((n) => n.toString("pem")).join(`
|
|
9481
9484
|
`);
|
|
9482
9485
|
case "asn":
|
|
9483
|
-
return
|
|
9486
|
+
return q.toString(t);
|
|
9484
9487
|
case "hex":
|
|
9485
9488
|
return de.ToHex(t);
|
|
9486
9489
|
case "base64":
|
|
@@ -9494,7 +9497,7 @@ class $v extends Array {
|
|
|
9494
9497
|
}
|
|
9495
9498
|
}
|
|
9496
9499
|
toTextObject() {
|
|
9497
|
-
const e =
|
|
9500
|
+
const e = q.parse(this.export("raw"), bn), t = q.parse(e.content, xn);
|
|
9498
9501
|
return new Qe("X509Certificates", {
|
|
9499
9502
|
"Content Type": Bn.toString(e.contentType),
|
|
9500
9503
|
Content: new Qe("", {
|
|
@@ -9508,7 +9511,7 @@ class Mv {
|
|
|
9508
9511
|
constructor(e = {}) {
|
|
9509
9512
|
this.certificates = [], e.certificates && (this.certificates = e.certificates);
|
|
9510
9513
|
}
|
|
9511
|
-
async build(e, t =
|
|
9514
|
+
async build(e, t = Zt.get()) {
|
|
9512
9515
|
const n = new $v(e);
|
|
9513
9516
|
let i = e;
|
|
9514
9517
|
for (; i = await this.findIssuer(i, t); ) {
|
|
@@ -9522,9 +9525,9 @@ class Mv {
|
|
|
9522
9525
|
}
|
|
9523
9526
|
return n;
|
|
9524
9527
|
}
|
|
9525
|
-
async findIssuer(e, t =
|
|
9528
|
+
async findIssuer(e, t = Zt.get()) {
|
|
9526
9529
|
if (!await e.isSelfSigned(t)) {
|
|
9527
|
-
const n = e.getExtension(
|
|
9530
|
+
const n = e.getExtension(qo);
|
|
9528
9531
|
for (const i of this.certificates)
|
|
9529
9532
|
if (i.subject === e.issuer) {
|
|
9530
9533
|
if (n) {
|
|
@@ -9534,7 +9537,7 @@ class Mv {
|
|
|
9534
9537
|
continue;
|
|
9535
9538
|
} else if (n.certId) {
|
|
9536
9539
|
const s = i.getExtension(Xu);
|
|
9537
|
-
if (s && !(n.certId.serialNumber === i.serialNumber && Fo(
|
|
9540
|
+
if (s && !(n.certId.serialNumber === i.serialNumber && Fo(q.serialize(n.certId.name), q.serialize(s))))
|
|
9538
9541
|
continue;
|
|
9539
9542
|
}
|
|
9540
9543
|
}
|
|
@@ -9559,7 +9562,7 @@ Pr.register(kp, o0);
|
|
|
9559
9562
|
Pr.register(Bp, a0);
|
|
9560
9563
|
Pr.register(Op, c0);
|
|
9561
9564
|
Pr.register(Qu, Tc);
|
|
9562
|
-
Pr.register(
|
|
9565
|
+
Pr.register(qo, qs);
|
|
9563
9566
|
Pr.register(Xu, l0);
|
|
9564
9567
|
Pr.register(wl, f0);
|
|
9565
9568
|
Pr.register(pl, h0);
|
|
@@ -9577,7 +9580,7 @@ let Er = (Es = class {
|
|
|
9577
9580
|
}, Ve(Es, "BREAK", Symbol.for("github.com/hildjj/cbor2/break")), Ve(Es, "ENCODED", Symbol.for("github.com/hildjj/cbor2/cbor-encoded")), Ve(Es, "LENGTH", Symbol.for("github.com/hildjj/cbor2/length")), Es);
|
|
9578
9581
|
const Sa = { MIN: -(2n ** 63n), MAX: 2n ** 64n - 1n };
|
|
9579
9582
|
var vn, Qr;
|
|
9580
|
-
let
|
|
9583
|
+
let qe = (vn = class {
|
|
9581
9584
|
constructor(e, t = void 0) {
|
|
9582
9585
|
Ve(this, "tag");
|
|
9583
9586
|
Ve(this, "contents");
|
|
@@ -9622,12 +9625,12 @@ function _a(r) {
|
|
|
9622
9625
|
function Vv(r) {
|
|
9623
9626
|
if (r != null && typeof r == "object") return r[Er.LENGTH];
|
|
9624
9627
|
}
|
|
9625
|
-
function
|
|
9628
|
+
function Zs(r, e) {
|
|
9626
9629
|
Object.defineProperty(r, Er.ENCODED, { configurable: !0, enumerable: !1, value: e });
|
|
9627
9630
|
}
|
|
9628
9631
|
function ks(r, e) {
|
|
9629
9632
|
const t = Object(r);
|
|
9630
|
-
return
|
|
9633
|
+
return Zs(t, e), t;
|
|
9631
9634
|
}
|
|
9632
9635
|
function p0(r) {
|
|
9633
9636
|
let e = Math.ceil(r.length / 2);
|
|
@@ -9783,7 +9786,7 @@ function Kv(r) {
|
|
|
9783
9786
|
}
|
|
9784
9787
|
return r;
|
|
9785
9788
|
}
|
|
9786
|
-
function
|
|
9789
|
+
function qv(r) {
|
|
9787
9790
|
switch (r.length) {
|
|
9788
9791
|
case 2:
|
|
9789
9792
|
g0(r, 0, !0);
|
|
@@ -9802,7 +9805,7 @@ function Zv(r) {
|
|
|
9802
9805
|
throw new TypeError(`Bad input to isSubnormal: ${r}`);
|
|
9803
9806
|
}
|
|
9804
9807
|
}
|
|
9805
|
-
const ad = we.SIMPLE_FLOAT << 5 | mt.TWO,
|
|
9808
|
+
const ad = we.SIMPLE_FLOAT << 5 | mt.TWO, Zv = we.SIMPLE_FLOAT << 5 | mt.FOUR, Wv = we.SIMPLE_FLOAT << 5 | mt.EIGHT, Yv = we.SIMPLE_FLOAT << 5 | Mn.TRUE, Jv = we.SIMPLE_FLOAT << 5 | Mn.FALSE, Xv = we.SIMPLE_FLOAT << 5 | Mn.UNDEFINED, Qv = we.SIMPLE_FLOAT << 5 | Mn.NULL, e1 = new TextEncoder(), t1 = { ...Ea.defaultOptions, avoidInts: !1, cde: !1, collapseBigInts: !0, dcbor: !1, float64: !1, flushToZero: !1, forceEndian: null, ignoreOriginalEncoding: !1, largeNegativeAsBigInt: !1, reduceUnsafeNumbers: !1, rejectBigInts: !1, rejectCustomSimples: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectUndefined: !1, simplifyNegativeZero: !1, sortKeys: null, stringNormalization: null }, v0 = { cde: !0, ignoreOriginalEncoding: !0, sortKeys: y0 }, r1 = { ...v0, dcbor: !0, largeNegativeAsBigInt: !0, reduceUnsafeNumbers: !0, rejectCustomSimples: !0, rejectDuplicateKeys: !0, rejectUndefined: !0, simplifyNegativeZero: !0, stringNormalization: "NFC" };
|
|
9806
9809
|
function m0(r) {
|
|
9807
9810
|
const e = r < 0;
|
|
9808
9811
|
return typeof r == "bigint" ? [e ? -r - 1n : r, e] : [e ? -r - 1 : r, e];
|
|
@@ -9812,7 +9815,7 @@ function Xc(r, e, t) {
|
|
|
9812
9815
|
if (isNaN(r)) e.writeUint8(ad), e.writeUint16(32256);
|
|
9813
9816
|
else if (!t.float64 && Math.fround(r) === r) {
|
|
9814
9817
|
const n = Gv(r);
|
|
9815
|
-
n === null ? (e.writeUint8(
|
|
9818
|
+
n === null ? (e.writeUint8(Zv), e.writeFloat32(r)) : (e.writeUint8(ad), e.writeUint16(n));
|
|
9816
9819
|
} else e.writeUint8(Wv), e.writeFloat64(r);
|
|
9817
9820
|
}
|
|
9818
9821
|
function zr(r, e, t) {
|
|
@@ -9954,13 +9957,13 @@ const Tn = class Tn {
|
|
|
9954
9957
|
Ve(Tn, "KnownSimple", /* @__PURE__ */ new Map([[Mn.FALSE, !1], [Mn.TRUE, !0], [Mn.NULL, null], [Mn.UNDEFINED, void 0]]));
|
|
9955
9958
|
let Ws = Tn;
|
|
9956
9959
|
const c1 = new TextDecoder("utf8", { fatal: !0, ignoreBOM: !0 });
|
|
9957
|
-
var Ar, Dr,
|
|
9960
|
+
var Ar, Dr, qt, Ir, Wt, ei, Eu, Is;
|
|
9958
9961
|
const Va = class Va {
|
|
9959
9962
|
constructor(e, t) {
|
|
9960
9963
|
rr(this, Wt);
|
|
9961
9964
|
rr(this, Ar);
|
|
9962
9965
|
rr(this, Dr);
|
|
9963
|
-
rr(this,
|
|
9966
|
+
rr(this, qt, 0);
|
|
9964
9967
|
rr(this, Ir);
|
|
9965
9968
|
if (Et(this, Ir, { ...Va.defaultOptions, ...t }), typeof e == "string") switch ($(this, Ir).encoding) {
|
|
9966
9969
|
case "hex":
|
|
@@ -9976,34 +9979,34 @@ const Va = class Va {
|
|
|
9976
9979
|
Et(this, Dr, new DataView($(this, Ar).buffer, $(this, Ar).byteOffset, $(this, Ar).byteLength));
|
|
9977
9980
|
}
|
|
9978
9981
|
toHere(e) {
|
|
9979
|
-
return $(this, Ar).subarray(e, $(this,
|
|
9982
|
+
return $(this, Ar).subarray(e, $(this, qt));
|
|
9980
9983
|
}
|
|
9981
9984
|
*[Symbol.iterator]() {
|
|
9982
|
-
if (yield* Re(this, Wt, ei).call(this, 0), $(this,
|
|
9985
|
+
if (yield* Re(this, Wt, ei).call(this, 0), $(this, qt) !== $(this, Ar).length) throw new Error("Extra data in input");
|
|
9983
9986
|
}
|
|
9984
9987
|
};
|
|
9985
|
-
Ar = new WeakMap(), Dr = new WeakMap(),
|
|
9988
|
+
Ar = new WeakMap(), Dr = new WeakMap(), qt = new WeakMap(), Ir = new WeakMap(), Wt = new WeakSet(), ei = function* (e) {
|
|
9986
9989
|
if (e++ > $(this, Ir).maxDepth) throw new Error(`Maximum depth ${$(this, Ir).maxDepth} exceeded`);
|
|
9987
|
-
const t = $(this,
|
|
9990
|
+
const t = $(this, qt), n = $(this, Dr).getUint8(Ef(this, qt)._++), i = n >> 5, s = n & 31;
|
|
9988
9991
|
let o = s, c = !1, u = 0;
|
|
9989
9992
|
switch (s) {
|
|
9990
9993
|
case mt.ONE:
|
|
9991
|
-
if (u = 1, o = $(this, Dr).getUint8($(this,
|
|
9994
|
+
if (u = 1, o = $(this, Dr).getUint8($(this, qt)), i === we.SIMPLE_FLOAT) {
|
|
9992
9995
|
if (o < 32) throw new Error(`Invalid simple encoding in extra byte: ${o}`);
|
|
9993
9996
|
c = !0;
|
|
9994
9997
|
} else if ($(this, Ir).requirePreferred && o < 24) throw new Error(`Unexpectedly long integer encoding (1) for ${o}`);
|
|
9995
9998
|
break;
|
|
9996
9999
|
case mt.TWO:
|
|
9997
|
-
if (u = 2, i === we.SIMPLE_FLOAT) o = g0($(this, Ar), $(this,
|
|
9998
|
-
else if (o = $(this, Dr).getUint16($(this,
|
|
10000
|
+
if (u = 2, i === we.SIMPLE_FLOAT) o = g0($(this, Ar), $(this, qt));
|
|
10001
|
+
else if (o = $(this, Dr).getUint16($(this, qt), !1), $(this, Ir).requirePreferred && o <= 255) throw new Error(`Unexpectedly long integer encoding (2) for ${o}`);
|
|
9999
10002
|
break;
|
|
10000
10003
|
case mt.FOUR:
|
|
10001
|
-
if (u = 4, i === we.SIMPLE_FLOAT) o = $(this, Dr).getFloat32($(this,
|
|
10002
|
-
else if (o = $(this, Dr).getUint32($(this,
|
|
10004
|
+
if (u = 4, i === we.SIMPLE_FLOAT) o = $(this, Dr).getFloat32($(this, qt), !1);
|
|
10005
|
+
else if (o = $(this, Dr).getUint32($(this, qt), !1), $(this, Ir).requirePreferred && o <= 65535) throw new Error(`Unexpectedly long integer encoding (4) for ${o}`);
|
|
10003
10006
|
break;
|
|
10004
10007
|
case mt.EIGHT: {
|
|
10005
|
-
if (u = 8, i === we.SIMPLE_FLOAT) o = $(this, Dr).getFloat64($(this,
|
|
10006
|
-
else if (o = $(this, Dr).getBigUint64($(this,
|
|
10008
|
+
if (u = 8, i === we.SIMPLE_FLOAT) o = $(this, Dr).getFloat64($(this, qt), !1);
|
|
10009
|
+
else if (o = $(this, Dr).getBigUint64($(this, qt), !1), o <= Number.MAX_SAFE_INTEGER && (o = Number(o)), $(this, Ir).requirePreferred && o <= 4294967295) throw new Error(`Unexpectedly long integer encoding (8) for ${o}`);
|
|
10007
10010
|
break;
|
|
10008
10011
|
}
|
|
10009
10012
|
case 28:
|
|
@@ -10025,7 +10028,7 @@ Ar = new WeakMap(), Dr = new WeakMap(), Zt = new WeakMap(), Ir = new WeakMap(),
|
|
|
10025
10028
|
default:
|
|
10026
10029
|
c = !0;
|
|
10027
10030
|
}
|
|
10028
|
-
switch (Et(this,
|
|
10031
|
+
switch (Et(this, qt, $(this, qt) + u), i) {
|
|
10029
10032
|
case we.POS_INT:
|
|
10030
10033
|
yield [i, s, o, t, u];
|
|
10031
10034
|
break;
|
|
@@ -10064,7 +10067,7 @@ Ar = new WeakMap(), Dr = new WeakMap(), Zt = new WeakMap(), Ir = new WeakMap(),
|
|
|
10064
10067
|
}
|
|
10065
10068
|
}
|
|
10066
10069
|
}, Eu = function(e) {
|
|
10067
|
-
const t = $(this, Ar).subarray($(this,
|
|
10070
|
+
const t = $(this, Ar).subarray($(this, qt), Et(this, qt, $(this, qt) + e));
|
|
10068
10071
|
if (t.length !== e) throw new Error(`Unexpected end of stream reading ${e} bytes, got ${t.length}`);
|
|
10069
10072
|
return t;
|
|
10070
10073
|
}, Is = function* (e, t, n, i = !0) {
|
|
@@ -10123,7 +10126,7 @@ let Nn = (tn = class {
|
|
|
10123
10126
|
const h = i.toHere(u);
|
|
10124
10127
|
if (h.length !== 3 || h[1] !== 126 || h[2] !== 0) throw new Error(`Invalid NaN encoding: "${Vr(h)}"`);
|
|
10125
10128
|
}
|
|
10126
|
-
if (n.rejectSubnormals &&
|
|
10129
|
+
if (n.rejectSubnormals && qv(i.toHere(u + 1)), n.rejectLongFloats) {
|
|
10127
10130
|
const h = Pc(c, { chunkSize: 9, reduceUnsafeNumbers: n.rejectUnsafeFloatInts });
|
|
10128
10131
|
if (h[0] >> 5 !== s) throw new Error(`Should have been encoded as int, not float: ${c}`);
|
|
10129
10132
|
if (h.length < l1.get(o)) throw new Error(`Number should have been encoded shorter: ${c}`);
|
|
@@ -10148,7 +10151,7 @@ let Nn = (tn = class {
|
|
|
10148
10151
|
return new n.ParentType(e, c * 2, t, n);
|
|
10149
10152
|
case we.TAG: {
|
|
10150
10153
|
const h = new n.ParentType(e, 1, t, n);
|
|
10151
|
-
return h.children = new
|
|
10154
|
+
return h.children = new qe(c), h;
|
|
10152
10155
|
}
|
|
10153
10156
|
}
|
|
10154
10157
|
throw new TypeError(`Invalid major type: ${s}`);
|
|
@@ -10162,7 +10165,7 @@ let Nn = (tn = class {
|
|
|
10162
10165
|
}
|
|
10163
10166
|
replaceLast(e, t, n) {
|
|
10164
10167
|
let i, s = -1 / 0;
|
|
10165
|
-
if (this.children instanceof
|
|
10168
|
+
if (this.children instanceof qe ? (s = 0, i = this.children.contents, this.children.contents = e) : (s = this.children.length - 1, i = this.children[s], this.children[s] = e), $(this, en)) {
|
|
10166
10169
|
const o = _a(e) || n.toHere(t.offset);
|
|
10167
10170
|
$(this, en)[s] = o;
|
|
10168
10171
|
}
|
|
@@ -10206,7 +10209,7 @@ let Nn = (tn = class {
|
|
|
10206
10209
|
default:
|
|
10207
10210
|
throw new TypeError(`Invalid mt on convert: ${this.mt}`);
|
|
10208
10211
|
}
|
|
10209
|
-
return $(this, ar).saveOriginal && t && typeof t == "object" &&
|
|
10212
|
+
return $(this, ar).saveOriginal && t && typeof t == "object" && Zs(t, e.toHere(this.offset)), t;
|
|
10210
10213
|
}
|
|
10211
10214
|
}, ar = new WeakMap(), en = new WeakMap(), La = new WeakSet(), x0 = function() {
|
|
10212
10215
|
const e = this.children, t = e.length;
|
|
@@ -10280,8 +10283,8 @@ function S0(r, e, t) {
|
|
|
10280
10283
|
break;
|
|
10281
10284
|
case we.TAG: {
|
|
10282
10285
|
n += `Tag #${r.value}`;
|
|
10283
|
-
const u = r.children, [h] = u.contents.children, m = new
|
|
10284
|
-
|
|
10286
|
+
const u = r.children, [h] = u.contents.children, m = new qe(u.tag, h);
|
|
10287
|
+
Zs(m, i);
|
|
10285
10288
|
const x = m.comment(e, r.depth);
|
|
10286
10289
|
x && (n += ": ", n += x), o || (o = m.noChildren);
|
|
10287
10290
|
break;
|
|
@@ -10320,11 +10323,11 @@ function h1(r, e) {
|
|
|
10320
10323
|
else throw new Error("Unexpected BREAK");
|
|
10321
10324
|
if (!A0(s)) {
|
|
10322
10325
|
const m = new ku(c, 0, i, t);
|
|
10323
|
-
m.leaf = !0, m.children.push(s),
|
|
10326
|
+
m.leaf = !0, m.children.push(s), Zs(m, n.toHere(c[3])), s = m;
|
|
10324
10327
|
}
|
|
10325
10328
|
let u = (s.depth + 1) * 2;
|
|
10326
10329
|
const h = s.numBytes();
|
|
10327
|
-
for (h && (u += 1, u += h * 2), t.minCol = Math.max(t.minCol, u), i && i.push(s, n, c[3]), i = s; i != null && i.done; ) s = i, s.leaf ||
|
|
10330
|
+
for (h && (u += 1, u += h * 2), t.minCol = Math.max(t.minCol, u), i && i.push(s, n, c[3]), i = s; i != null && i.done; ) s = i, s.leaf || Zs(s, n.toHere(s.offset)), { parent: i } = i;
|
|
10328
10331
|
}
|
|
10329
10332
|
e && (e.minCol = t.minCol);
|
|
10330
10333
|
let o = t.noPrefixHex ? "" : `0x${Vr(n.toHere(0))}
|
|
@@ -10364,11 +10367,11 @@ Pt(Map, (r, e, t) => {
|
|
|
10364
10367
|
function ld(r) {
|
|
10365
10368
|
return jn(r.contents), new Date(r.contents);
|
|
10366
10369
|
}
|
|
10367
|
-
ld.comment = (r) => (jn(r.contents), `(String Date) ${new Date(r.contents).toISOString()}`),
|
|
10370
|
+
ld.comment = (r) => (jn(r.contents), `(String Date) ${new Date(r.contents).toISOString()}`), qe.registerDecoder(At.DATE_STRING, ld);
|
|
10368
10371
|
function ud(r) {
|
|
10369
10372
|
return _0(r.contents), new Date(r.contents * 1e3);
|
|
10370
10373
|
}
|
|
10371
|
-
ud.comment = (r) => (_0(r.contents), `(Epoch Date) ${new Date(r.contents * 1e3).toISOString()}`),
|
|
10374
|
+
ud.comment = (r) => (_0(r.contents), `(Epoch Date) ${new Date(r.contents * 1e3).toISOString()}`), qe.registerDecoder(At.DATE_EPOCH, ud), Pt(Date, (r) => [At.DATE_EPOCH, r.valueOf() / 1e3]);
|
|
10372
10375
|
function Ia(r, e, t) {
|
|
10373
10376
|
if (bi(e.contents), t.rejectBigInts) throw new Error(`Decoding unwanted big integer: ${e}(h'${Vr(e.contents)}')`);
|
|
10374
10377
|
if (t.requirePreferred && e.contents[0] === 0) throw new Error(`Decoding overly-large bigint: ${e.tag}(h'${Vr(e.contents)})`);
|
|
@@ -10377,7 +10380,7 @@ function Ia(r, e, t) {
|
|
|
10377
10380
|
return t.boxed ? ks(n, e.contents) : n;
|
|
10378
10381
|
}
|
|
10379
10382
|
const fd = Ia.bind(null, !1), hd = Ia.bind(null, !0);
|
|
10380
|
-
fd.comment = (r, e) => `(Positive BigInt) ${Ia(!1, r, e)}n`, hd.comment = (r, e) => `(Negative BigInt) ${Ia(!0, r, e)}n`,
|
|
10383
|
+
fd.comment = (r, e) => `(Positive BigInt) ${Ia(!1, r, e)}n`, hd.comment = (r, e) => `(Negative BigInt) ${Ia(!0, r, e)}n`, qe.registerDecoder(At.POS_BIGINT, fd), qe.registerDecoder(At.NEG_BIGINT, hd);
|
|
10381
10384
|
function el(r, e) {
|
|
10382
10385
|
return bi(r.contents), r;
|
|
10383
10386
|
}
|
|
@@ -10393,15 +10396,15 @@ el.comment = (r, e, t) => {
|
|
|
10393
10396
|
`;
|
|
10394
10397
|
return h += `${"".padStart((t + 1) * 2, " ")}${c}`.padEnd(n.minCol + 1, " "), h += `-- Bytes (Length: ${r.contents.length})
|
|
10395
10398
|
`, h += u, h;
|
|
10396
|
-
}, el.noChildren = !0,
|
|
10399
|
+
}, el.noChildren = !0, qe.registerDecoder(At.CBOR, el), qe.registerDecoder(At.URI, (r) => (jn(r.contents), new URL(r.contents)), "URI"), Pt(URL, (r) => [At.URI, r.toString()]), qe.registerDecoder(At.BASE64URL, (r) => (jn(r.contents), Fv(r.contents)), "Base64url-encoded"), qe.registerDecoder(At.BASE64, (r) => (jn(r.contents), bf(r.contents)), "Base64-encoded"), qe.registerDecoder(35, (r) => (jn(r.contents), new RegExp(r.contents)), "RegExp"), qe.registerDecoder(21065, (r) => {
|
|
10397
10400
|
jn(r.contents);
|
|
10398
10401
|
let e = r.contents.replace(new RegExp("(?<!\\\\)(?<!\\[(?:[^\\]]|\\\\\\])*)\\.", "g"), `[^
|
|
10399
10402
|
\r]`);
|
|
10400
10403
|
return e = `^(?:${e})$`, new RegExp(e, "u");
|
|
10401
|
-
}, "I-RegExp"),
|
|
10404
|
+
}, "I-RegExp"), qe.registerDecoder(At.REGEXP, (r) => {
|
|
10402
10405
|
if (E0(r.contents), r.contents.length < 1 || r.contents.length > 2) throw new Error(`Invalid RegExp Array: ${r.contents}`);
|
|
10403
10406
|
return new RegExp(r.contents[0], r.contents[1]);
|
|
10404
|
-
}, "RegExp"), Pt(RegExp, (r) => [At.REGEXP, [r.source, r.flags]]),
|
|
10407
|
+
}, "RegExp"), Pt(RegExp, (r) => [At.REGEXP, [r.source, r.flags]]), qe.registerDecoder(64, (r) => (bi(r.contents), r.contents), "uint8 Typed Array");
|
|
10405
10408
|
function nr(r, e, t) {
|
|
10406
10409
|
bi(r.contents);
|
|
10407
10410
|
let n = r.contents.length;
|
|
@@ -10419,11 +10422,11 @@ function On(r, e, t, n, i) {
|
|
|
10419
10422
|
for (const u of n) c(u, s);
|
|
10420
10423
|
}
|
|
10421
10424
|
}
|
|
10422
|
-
|
|
10425
|
+
qe.registerDecoder(65, (r) => nr(r, Uint16Array, !1), "uint16, big endian, Typed Array"), qe.registerDecoder(66, (r) => nr(r, Uint32Array, !1), "uint32, big endian, Typed Array"), qe.registerDecoder(67, (r) => nr(r, BigUint64Array, !1), "uint64, big endian, Typed Array"), qe.registerDecoder(68, (r) => (bi(r.contents), new Uint8ClampedArray(r.contents)), "uint8 Typed Array, clamped arithmetic"), Pt(Uint8ClampedArray, (r) => [68, new Uint8Array(r.buffer, r.byteOffset, r.byteLength)]), qe.registerDecoder(69, (r) => nr(r, Uint16Array, !0), "uint16, little endian, Typed Array"), Pt(Uint16Array, (r, e, t) => On(e, 69, 65, r, t)), qe.registerDecoder(70, (r) => nr(r, Uint32Array, !0), "uint32, little endian, Typed Array"), Pt(Uint32Array, (r, e, t) => On(e, 70, 66, r, t)), qe.registerDecoder(71, (r) => nr(r, BigUint64Array, !0), "uint64, little endian, Typed Array"), Pt(BigUint64Array, (r, e, t) => On(e, 71, 67, r, t)), qe.registerDecoder(72, (r) => (bi(r.contents), new Int8Array(r.contents)), "sint8 Typed Array"), Pt(Int8Array, (r) => [72, new Uint8Array(r.buffer, r.byteOffset, r.byteLength)]), qe.registerDecoder(73, (r) => nr(r, Int16Array, !1), "sint16, big endian, Typed Array"), qe.registerDecoder(74, (r) => nr(r, Int32Array, !1), "sint32, big endian, Typed Array"), qe.registerDecoder(75, (r) => nr(r, BigInt64Array, !1), "sint64, big endian, Typed Array"), qe.registerDecoder(77, (r) => nr(r, Int16Array, !0), "sint16, little endian, Typed Array"), Pt(Int16Array, (r, e, t) => On(e, 77, 73, r, t)), qe.registerDecoder(78, (r) => nr(r, Int32Array, !0), "sint32, little endian, Typed Array"), Pt(Int32Array, (r, e, t) => On(e, 78, 74, r, t)), qe.registerDecoder(79, (r) => nr(r, BigInt64Array, !0), "sint64, little endian, Typed Array"), Pt(BigInt64Array, (r, e, t) => On(e, 79, 75, r, t)), qe.registerDecoder(81, (r) => nr(r, Float32Array, !1), "IEEE 754 binary32, big endian, Typed Array"), qe.registerDecoder(82, (r) => nr(r, Float64Array, !1), "IEEE 754 binary64, big endian, Typed Array"), qe.registerDecoder(85, (r) => nr(r, Float32Array, !0), "IEEE 754 binary32, little endian, Typed Array"), Pt(Float32Array, (r, e, t) => On(e, 85, 81, r, t)), qe.registerDecoder(86, (r) => nr(r, Float64Array, !0), "IEEE 754 binary64, big endian, Typed Array"), Pt(Float64Array, (r, e, t) => On(e, 86, 82, r, t)), qe.registerDecoder(At.SET, (r) => (E0(r.contents), new Set(r.contents)), "Set"), Pt(Set, (r) => [At.SET, [...r]]), qe.registerDecoder(At.JSON, (r) => (jn(r.contents), JSON.parse(r.contents)), "JSON-encoded"), qe.registerDecoder(At.SELF_DESCRIBED, (r) => r.contents, "Self-Described"), qe.registerDecoder(At.INVALID_16, () => {
|
|
10423
10426
|
throw new Error(`Tag always invalid: ${At.INVALID_16}`);
|
|
10424
|
-
}, "Invalid"),
|
|
10427
|
+
}, "Invalid"), qe.registerDecoder(At.INVALID_32, () => {
|
|
10425
10428
|
throw new Error(`Tag always invalid: ${At.INVALID_32}`);
|
|
10426
|
-
}, "Invalid"),
|
|
10429
|
+
}, "Invalid"), qe.registerDecoder(At.INVALID_64, () => {
|
|
10427
10430
|
throw new Error(`Tag always invalid: ${At.INVALID_64}`);
|
|
10428
10431
|
}, "Invalid");
|
|
10429
10432
|
function tl(r) {
|
|
@@ -11543,7 +11546,7 @@ Kn.create = (r) => new Kn({
|
|
|
11543
11546
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
11544
11547
|
...Le(r)
|
|
11545
11548
|
});
|
|
11546
|
-
class
|
|
11549
|
+
class qn extends Ge {
|
|
11547
11550
|
constructor() {
|
|
11548
11551
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
11549
11552
|
}
|
|
@@ -11591,7 +11594,7 @@ class Zn extends Ge {
|
|
|
11591
11594
|
return this.setLimit("max", e, !1, Se.toString(t));
|
|
11592
11595
|
}
|
|
11593
11596
|
setLimit(e, t, n, i) {
|
|
11594
|
-
return new
|
|
11597
|
+
return new qn({
|
|
11595
11598
|
...this._def,
|
|
11596
11599
|
checks: [
|
|
11597
11600
|
...this._def.checks,
|
|
@@ -11605,7 +11608,7 @@ class Zn extends Ge {
|
|
|
11605
11608
|
});
|
|
11606
11609
|
}
|
|
11607
11610
|
_addCheck(e) {
|
|
11608
|
-
return new
|
|
11611
|
+
return new qn({
|
|
11609
11612
|
...this._def,
|
|
11610
11613
|
checks: [...this._def.checks, e]
|
|
11611
11614
|
});
|
|
@@ -11662,9 +11665,9 @@ class Zn extends Ge {
|
|
|
11662
11665
|
return e;
|
|
11663
11666
|
}
|
|
11664
11667
|
}
|
|
11665
|
-
|
|
11668
|
+
qn.create = (r) => {
|
|
11666
11669
|
var e;
|
|
11667
|
-
return new
|
|
11670
|
+
return new qn({
|
|
11668
11671
|
checks: [],
|
|
11669
11672
|
typeName: ke.ZodBigInt,
|
|
11670
11673
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
@@ -12322,7 +12325,7 @@ ro.create = (r, e) => new ro({
|
|
|
12322
12325
|
typeName: ke.ZodUnion,
|
|
12323
12326
|
...Le(e)
|
|
12324
12327
|
});
|
|
12325
|
-
const yn = (r) => r instanceof so ? yn(r.schema) : r instanceof Gr ? yn(r.innerType()) : r instanceof oo ? [r.value] : r instanceof
|
|
12328
|
+
const yn = (r) => r instanceof so ? yn(r.schema) : r instanceof Gr ? yn(r.innerType()) : r instanceof oo ? [r.value] : r instanceof Zn ? r.options : r instanceof ao ? it.objectValues(r.enum) : r instanceof co ? yn(r._def.innerType) : r instanceof eo ? [void 0] : r instanceof to ? [null] : r instanceof on ? [void 0, ...yn(r.unwrap())] : r instanceof Wn ? [null, ...yn(r.unwrap())] : r instanceof Af || r instanceof uo ? yn(r.unwrap()) : r instanceof lo ? yn(r._def.innerType) : [];
|
|
12326
12329
|
class Rc extends Ge {
|
|
12327
12330
|
_parse(e) {
|
|
12328
12331
|
const { ctx: t } = this._processInputParams(e);
|
|
@@ -12700,11 +12703,11 @@ class $i extends Ge {
|
|
|
12700
12703
|
if (this._def.returns instanceof es) {
|
|
12701
12704
|
const c = this;
|
|
12702
12705
|
return ur(async function(...u) {
|
|
12703
|
-
const h = new _r([]), m = await c._def.args.parseAsync(u, s).catch((
|
|
12704
|
-
throw h.addIssue(n(u,
|
|
12706
|
+
const h = new _r([]), m = await c._def.args.parseAsync(u, s).catch((N) => {
|
|
12707
|
+
throw h.addIssue(n(u, N)), h;
|
|
12705
12708
|
}), x = await Reflect.apply(o, this, m);
|
|
12706
|
-
return await c._def.returns._def.type.parseAsync(x, s).catch((
|
|
12707
|
-
throw h.addIssue(i(x,
|
|
12709
|
+
return await c._def.returns._def.type.parseAsync(x, s).catch((N) => {
|
|
12710
|
+
throw h.addIssue(i(x, N)), h;
|
|
12708
12711
|
});
|
|
12709
12712
|
});
|
|
12710
12713
|
} else {
|
|
@@ -12789,13 +12792,13 @@ oo.create = (r, e) => new oo({
|
|
|
12789
12792
|
...Le(e)
|
|
12790
12793
|
});
|
|
12791
12794
|
function T0(r, e) {
|
|
12792
|
-
return new
|
|
12795
|
+
return new Zn({
|
|
12793
12796
|
values: r,
|
|
12794
12797
|
typeName: ke.ZodEnum,
|
|
12795
12798
|
...Le(e)
|
|
12796
12799
|
});
|
|
12797
12800
|
}
|
|
12798
|
-
class
|
|
12801
|
+
class Zn extends Ge {
|
|
12799
12802
|
constructor() {
|
|
12800
12803
|
super(...arguments), Cs.set(this, void 0);
|
|
12801
12804
|
}
|
|
@@ -12840,20 +12843,20 @@ class qn extends Ge {
|
|
|
12840
12843
|
return e;
|
|
12841
12844
|
}
|
|
12842
12845
|
extract(e, t = this._def) {
|
|
12843
|
-
return
|
|
12846
|
+
return Zn.create(e, {
|
|
12844
12847
|
...this._def,
|
|
12845
12848
|
...t
|
|
12846
12849
|
});
|
|
12847
12850
|
}
|
|
12848
12851
|
exclude(e, t = this._def) {
|
|
12849
|
-
return
|
|
12852
|
+
return Zn.create(this.options.filter((n) => !e.includes(n)), {
|
|
12850
12853
|
...this._def,
|
|
12851
12854
|
...t
|
|
12852
12855
|
});
|
|
12853
12856
|
}
|
|
12854
12857
|
}
|
|
12855
12858
|
Cs = /* @__PURE__ */ new WeakMap();
|
|
12856
|
-
|
|
12859
|
+
Zn.create = T0;
|
|
12857
12860
|
class ao extends Ge {
|
|
12858
12861
|
constructor() {
|
|
12859
12862
|
super(...arguments), Bs.set(this, void 0);
|
|
@@ -13193,14 +13196,14 @@ var ke;
|
|
|
13193
13196
|
})(ke || (ke = {}));
|
|
13194
13197
|
const j1 = (r, e = {
|
|
13195
13198
|
message: `Input not instance of ${r.name}`
|
|
13196
|
-
}) => N0((t) => t instanceof r, e), j0 = Mr.create, P0 = Kn.create, P1 = Ra.create, R1 =
|
|
13199
|
+
}) => N0((t) => t instanceof r, e), j0 = Mr.create, P0 = Kn.create, P1 = Ra.create, R1 = qn.create, R0 = Qs.create, U1 = xi.create, D1 = Na.create, $1 = eo.create, M1 = to.create, V1 = Qi.create, L1 = ai.create, H1 = En.create, F1 = ja.create, z1 = Lr.create, G1 = Ct.create, K1 = Ct.strictCreate, q1 = ro.create, Z1 = Rc.create, W1 = no.create, Y1 = un.create, J1 = io.create, X1 = Pa.create, Q1 = Ai.create, em = $i.create, tm = so.create, rm = oo.create, nm = Zn.create, im = ao.create, sm = es.create, pd = Gr.create, om = on.create, am = Wn.create, cm = Gr.createWithPreprocess, lm = Io.create, um = () => j0().optional(), fm = () => P0().optional(), hm = () => R0().optional(), dm = {
|
|
13197
13200
|
string: (r) => Mr.create({ ...r, coerce: !0 }),
|
|
13198
13201
|
number: (r) => Kn.create({ ...r, coerce: !0 }),
|
|
13199
13202
|
boolean: (r) => Qs.create({
|
|
13200
13203
|
...r,
|
|
13201
13204
|
coerce: !0
|
|
13202
13205
|
}),
|
|
13203
|
-
bigint: (r) =>
|
|
13206
|
+
bigint: (r) => qn.create({ ...r, coerce: !0 }),
|
|
13204
13207
|
date: (r) => xi.create({ ...r, coerce: !0 })
|
|
13205
13208
|
}, pm = Ie;
|
|
13206
13209
|
var It = /* @__PURE__ */ Object.freeze({
|
|
@@ -13231,7 +13234,7 @@ var It = /* @__PURE__ */ Object.freeze({
|
|
|
13231
13234
|
datetimeRegex: O0,
|
|
13232
13235
|
ZodString: Mr,
|
|
13233
13236
|
ZodNumber: Kn,
|
|
13234
|
-
ZodBigInt:
|
|
13237
|
+
ZodBigInt: qn,
|
|
13235
13238
|
ZodBoolean: Qs,
|
|
13236
13239
|
ZodDate: xi,
|
|
13237
13240
|
ZodSymbol: Na,
|
|
@@ -13253,7 +13256,7 @@ var It = /* @__PURE__ */ Object.freeze({
|
|
|
13253
13256
|
ZodFunction: $i,
|
|
13254
13257
|
ZodLazy: so,
|
|
13255
13258
|
ZodLiteral: oo,
|
|
13256
|
-
ZodEnum:
|
|
13259
|
+
ZodEnum: Zn,
|
|
13257
13260
|
ZodNativeEnum: ao,
|
|
13258
13261
|
ZodPromise: es,
|
|
13259
13262
|
ZodEffects: Gr,
|
|
@@ -13280,7 +13283,7 @@ var It = /* @__PURE__ */ Object.freeze({
|
|
|
13280
13283
|
bigint: R1,
|
|
13281
13284
|
boolean: R0,
|
|
13282
13285
|
date: U1,
|
|
13283
|
-
discriminatedUnion:
|
|
13286
|
+
discriminatedUnion: Z1,
|
|
13284
13287
|
effect: pd,
|
|
13285
13288
|
enum: nm,
|
|
13286
13289
|
function: em,
|
|
@@ -13311,7 +13314,7 @@ var It = /* @__PURE__ */ Object.freeze({
|
|
|
13311
13314
|
transformer: pd,
|
|
13312
13315
|
tuple: Y1,
|
|
13313
13316
|
undefined: $1,
|
|
13314
|
-
union:
|
|
13317
|
+
union: q1,
|
|
13315
13318
|
unknown: L1,
|
|
13316
13319
|
void: F1,
|
|
13317
13320
|
NEVER: pm,
|
|
@@ -13410,10 +13413,10 @@ async function Si(r, e, t) {
|
|
|
13410
13413
|
certificates: c
|
|
13411
13414
|
}).build(h);
|
|
13412
13415
|
console.log("Chain items:", x);
|
|
13413
|
-
const
|
|
13416
|
+
const N = (/* @__PURE__ */ new Date()).getTime();
|
|
13414
13417
|
for (let k = 0; k < x.length; k++) {
|
|
13415
13418
|
const j = x[k];
|
|
13416
|
-
if (console.log("CERT: ", k), console.log(j.subject), console.log("Not before:", j.notBefore), console.log("Not after:", j.notAfter), console.log(j.toString("pem")), j.notBefore.getTime() >
|
|
13419
|
+
if (console.log("CERT: ", k), console.log(j.subject), console.log("Not before:", j.notBefore), console.log("Not after:", j.notAfter), console.log(j.toString("pem")), j.notBefore.getTime() > N || j.notAfter.getTime() < N)
|
|
13417
13420
|
throw new Error("Certificate is expired.");
|
|
13418
13421
|
console.log(`Certificate ${k} is not expired.`);
|
|
13419
13422
|
}
|
|
@@ -13462,7 +13465,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13462
13465
|
throw new Error("no PRNG");
|
|
13463
13466
|
}, i = new Uint8Array(16), s = new Uint8Array(32);
|
|
13464
13467
|
s[0] = 9;
|
|
13465
|
-
var o = t(), c = t([1]), u = t([56129, 1]), h = t([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), m = t([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), x = t([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), G = t([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]),
|
|
13468
|
+
var o = t(), c = t([1]), u = t([56129, 1]), h = t([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), m = t([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), x = t([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), G = t([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), N = t([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
|
|
13466
13469
|
function v(l, p, d, a) {
|
|
13467
13470
|
l[p] = d >> 24 & 255, l[p + 1] = d >> 16 & 255, l[p + 2] = d >> 8 & 255, l[p + 3] = d & 255, l[p + 4] = a >> 24 & 255, l[p + 5] = a >> 16 & 255, l[p + 6] = a >> 8 & 255, l[p + 7] = a & 255;
|
|
13468
13471
|
}
|
|
@@ -13863,7 +13866,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13863
13866
|
}
|
|
13864
13867
|
return a;
|
|
13865
13868
|
}
|
|
13866
|
-
function
|
|
13869
|
+
function Zr(l, p, d) {
|
|
13867
13870
|
var a = new Int32Array(8), g = new Int32Array(8), S = new Uint8Array(256), E, U = d;
|
|
13868
13871
|
for (a[0] = 1779033703, a[1] = 3144134277, a[2] = 1013904242, a[3] = 2773480762, a[4] = 1359893119, a[5] = 2600822924, a[6] = 528734635, a[7] = 1541459225, g[0] = 4089235720, g[1] = 2227873595, g[2] = 4271175723, g[3] = 1595750129, g[4] = 2917565137, g[5] = 725511199, g[6] = 4215389547, g[7] = 327033209, gs(a, g, p, d), d %= 128, E = 0; E < d; E++) S[E] = p[U - d + E];
|
|
13869
13872
|
for (S[d] = 128, d = 256 - 128 * (d < 112 ? 1 : 0), S[d - 9] = 0, v(S, d - 8, U / 536870912 | 0, U << 3), gs(a, g, S, d), E = 0; E < 8; E++) v(l, 8 * E, a[E], g[E]);
|
|
@@ -13893,7 +13896,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13893
13896
|
}
|
|
13894
13897
|
function ws(l, p, d) {
|
|
13895
13898
|
var a = new Uint8Array(64), g = [t(), t(), t(), t()], S;
|
|
13896
|
-
for (d || n(p, 32),
|
|
13899
|
+
for (d || n(p, 32), Zr(a, p, 32), a[0] &= 248, a[31] &= 127, a[31] |= 64, Oi(g, a), vs(l, g), S = 0; S < 32; S++) p[S + 32] = l[S];
|
|
13897
13900
|
return 0;
|
|
13898
13901
|
}
|
|
13899
13902
|
var Wr = new Float64Array([237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]);
|
|
@@ -13918,12 +13921,12 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13918
13921
|
}
|
|
13919
13922
|
function Bo(l, p, d, a) {
|
|
13920
13923
|
var g = new Uint8Array(64), S = new Uint8Array(64), E = new Uint8Array(64), U, z, be = new Float64Array(64), Q = [t(), t(), t(), t()];
|
|
13921
|
-
|
|
13924
|
+
Zr(g, a, 32), g[0] &= 248, g[31] &= 127, g[31] |= 64;
|
|
13922
13925
|
var ot = d + 64;
|
|
13923
13926
|
for (U = 0; U < d; U++) l[64 + U] = p[U];
|
|
13924
13927
|
for (U = 0; U < 32; U++) l[32 + U] = g[32 + U];
|
|
13925
|
-
for (
|
|
13926
|
-
for (
|
|
13928
|
+
for (Zr(E, l.subarray(32), d + 32), xs(E), Oi(Q, E), vs(l, Q), U = 32; U < 64; U++) l[U] = a[U];
|
|
13929
|
+
for (Zr(S, l, d + 64), xs(S), U = 0; U < 64; U++) be[U] = 0;
|
|
13927
13930
|
for (U = 0; U < 32; U++) be[U] = E[U];
|
|
13928
13931
|
for (U = 0; U < 32; U++)
|
|
13929
13932
|
for (z = 0; z < 32; z++)
|
|
@@ -13932,21 +13935,21 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13932
13935
|
}
|
|
13933
13936
|
function As(l, p) {
|
|
13934
13937
|
var d = t(), a = t(), g = t(), S = t(), E = t(), U = t(), z = t();
|
|
13935
|
-
return Ye(l[2], c), fe(l[1], p), ht(g, l[1]), te(S, g, h), yt(g, g, l[2]), tt(S, l[2], S), ht(E, S), ht(U, E), te(z, U, E), te(d, z, g), te(d, d, S), fs(d, d), te(d, d, g), te(d, d, S), te(d, d, S), te(l[0], d, S), ht(a, l[0]), te(a, a, S), Rt(a, g) && te(l[0], l[0],
|
|
13938
|
+
return Ye(l[2], c), fe(l[1], p), ht(g, l[1]), te(S, g, h), yt(g, g, l[2]), tt(S, l[2], S), ht(E, S), ht(U, E), te(z, U, E), te(d, z, g), te(d, d, S), fs(d, d), te(d, d, g), te(d, d, S), te(d, d, S), te(l[0], d, S), ht(a, l[0]), te(a, a, S), Rt(a, g) && te(l[0], l[0], N), ht(a, l[0]), te(a, a, S), Rt(a, g) ? -1 : (Ut(l[0]) === p[31] >> 7 && yt(l[0], o, l[0]), te(l[3], l[0], l[1]), 0);
|
|
13936
13939
|
}
|
|
13937
13940
|
function _(l, p, d, a) {
|
|
13938
13941
|
var g, S = new Uint8Array(32), E = new Uint8Array(64), U = [t(), t(), t(), t()], z = [t(), t(), t(), t()];
|
|
13939
13942
|
if (d < 64 || As(z, a)) return -1;
|
|
13940
13943
|
for (g = 0; g < d; g++) l[g] = p[g];
|
|
13941
13944
|
for (g = 0; g < 32; g++) l[g + 32] = a[g];
|
|
13942
|
-
if (
|
|
13945
|
+
if (Zr(E, l, d), xs(E), ms(U, z, E), Oi(z, p.subarray(32)), Xn(U, z), vs(S, U), d -= 64, k(p, 0, S, 0)) {
|
|
13943
13946
|
for (g = 0; g < d; g++) l[g] = 0;
|
|
13944
13947
|
return -1;
|
|
13945
13948
|
}
|
|
13946
13949
|
for (g = 0; g < d; g++) l[g] = p[g + 64];
|
|
13947
13950
|
return d;
|
|
13948
13951
|
}
|
|
13949
|
-
var I = 32,
|
|
13952
|
+
var I = 32, T = 24, K = 32, xe = 16, bt = 32, xt = 32, je = 32, Z = 32, ne = 32, he = T, ve = K, We = xe, Xe = 64, gt = 32, zt = 64, Ti = 32, Ss = 64;
|
|
13950
13953
|
e.lowlevel = {
|
|
13951
13954
|
crypto_core_hsalsa20: X,
|
|
13952
13955
|
crypto_stream_xor: lt,
|
|
@@ -13966,18 +13969,18 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13966
13969
|
crypto_box: ps,
|
|
13967
13970
|
crypto_box_open: Co,
|
|
13968
13971
|
crypto_box_keypair: hs,
|
|
13969
|
-
crypto_hash:
|
|
13972
|
+
crypto_hash: Zr,
|
|
13970
13973
|
crypto_sign: Bo,
|
|
13971
13974
|
crypto_sign_keypair: ws,
|
|
13972
13975
|
crypto_sign_open: _,
|
|
13973
13976
|
crypto_secretbox_KEYBYTES: I,
|
|
13974
|
-
crypto_secretbox_NONCEBYTES:
|
|
13977
|
+
crypto_secretbox_NONCEBYTES: T,
|
|
13975
13978
|
crypto_secretbox_ZEROBYTES: K,
|
|
13976
13979
|
crypto_secretbox_BOXZEROBYTES: xe,
|
|
13977
13980
|
crypto_scalarmult_BYTES: bt,
|
|
13978
13981
|
crypto_scalarmult_SCALARBYTES: xt,
|
|
13979
13982
|
crypto_box_PUBLICKEYBYTES: je,
|
|
13980
|
-
crypto_box_SECRETKEYBYTES:
|
|
13983
|
+
crypto_box_SECRETKEYBYTES: Z,
|
|
13981
13984
|
crypto_box_BEFORENMBYTES: ne,
|
|
13982
13985
|
crypto_box_NONCEBYTES: he,
|
|
13983
13986
|
crypto_box_ZEROBYTES: ve,
|
|
@@ -14005,11 +14008,11 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14005
14008
|
};
|
|
14006
14009
|
function Oo(l, p) {
|
|
14007
14010
|
if (l.length !== I) throw new Error("bad key size");
|
|
14008
|
-
if (p.length !==
|
|
14011
|
+
if (p.length !== T) throw new Error("bad nonce size");
|
|
14009
14012
|
}
|
|
14010
14013
|
function Ey(l, p) {
|
|
14011
14014
|
if (l.length !== je) throw new Error("bad public key size");
|
|
14012
|
-
if (p.length !==
|
|
14015
|
+
if (p.length !== Z) throw new Error("bad secret key size");
|
|
14013
14016
|
}
|
|
14014
14017
|
function xr() {
|
|
14015
14018
|
for (var l = 0; l < arguments.length; l++)
|
|
@@ -14030,7 +14033,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14030
14033
|
xr(l, p, d), Oo(d, p);
|
|
14031
14034
|
for (var a = new Uint8Array(xe + l.length), g = new Uint8Array(a.length), S = 0; S < l.length; S++) a[S + xe] = l[S];
|
|
14032
14035
|
return a.length < 32 || ut(g, a, a.length, p, d) !== 0 ? null : g.subarray(K);
|
|
14033
|
-
}, e.secretbox.keyLength = I, e.secretbox.nonceLength =
|
|
14036
|
+
}, e.secretbox.keyLength = I, e.secretbox.nonceLength = T, e.secretbox.overheadLength = xe, e.scalarMult = function(l, p) {
|
|
14034
14037
|
if (xr(l, p), l.length !== xt) throw new Error("bad n size");
|
|
14035
14038
|
if (p.length !== bt) throw new Error("bad p size");
|
|
14036
14039
|
var d = new Uint8Array(bt);
|
|
@@ -14050,14 +14053,14 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14050
14053
|
var g = e.box.before(d, a);
|
|
14051
14054
|
return e.secretbox.open(l, p, g);
|
|
14052
14055
|
}, e.box.open.after = e.secretbox.open, e.box.keyPair = function() {
|
|
14053
|
-
var l = new Uint8Array(je), p = new Uint8Array(
|
|
14056
|
+
var l = new Uint8Array(je), p = new Uint8Array(Z);
|
|
14054
14057
|
return hs(l, p), { publicKey: l, secretKey: p };
|
|
14055
14058
|
}, e.box.keyPair.fromSecretKey = function(l) {
|
|
14056
|
-
if (xr(l), l.length !==
|
|
14059
|
+
if (xr(l), l.length !== Z)
|
|
14057
14060
|
throw new Error("bad secret key size");
|
|
14058
14061
|
var p = new Uint8Array(je);
|
|
14059
14062
|
return or(p, l), { publicKey: p, secretKey: new Uint8Array(l) };
|
|
14060
|
-
}, e.box.publicKeyLength = je, e.box.secretKeyLength =
|
|
14063
|
+
}, e.box.publicKeyLength = je, e.box.secretKeyLength = Z, e.box.sharedKeyLength = ne, e.box.nonceLength = he, e.box.overheadLength = e.secretbox.overheadLength, e.sign = function(l, p) {
|
|
14061
14064
|
if (xr(l, p), p.length !== zt)
|
|
14062
14065
|
throw new Error("bad secret key size");
|
|
14063
14066
|
var d = new Uint8Array(Xe + l.length);
|
|
@@ -14097,7 +14100,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14097
14100
|
}, e.sign.publicKeyLength = gt, e.sign.secretKeyLength = zt, e.sign.seedLength = Ti, e.sign.signatureLength = Xe, e.hash = function(l) {
|
|
14098
14101
|
xr(l);
|
|
14099
14102
|
var p = new Uint8Array(Ss);
|
|
14100
|
-
return
|
|
14103
|
+
return Zr(p, l, l.length), p;
|
|
14101
14104
|
}, e.hash.hashLength = Ss, e.verify = function(l, p) {
|
|
14102
14105
|
return xr(l, p), l.length === 0 || p.length === 0 || l.length !== p.length ? !1 : A(l, 0, p, 0, l.length) === 0;
|
|
14103
14106
|
}, e.setPRNG = function(l) {
|
|
@@ -14147,7 +14150,7 @@ async function _i(r, e) {
|
|
|
14147
14150
|
e
|
|
14148
14151
|
);
|
|
14149
14152
|
console.log("Key exchange completed.");
|
|
14150
|
-
const m = D0.scalarMult(o.secretKey, c), x = Rs(u), G = 12,
|
|
14153
|
+
const m = D0.scalarMult(o.secretKey, c), x = Rs(u), G = 12, N = x.slice(0, G), v = x.slice(G), O = new Tu(m).open(N, v);
|
|
14151
14154
|
if (O)
|
|
14152
14155
|
return console.log("Session key decrypted successfully"), window.sessionStorage.setItem("sessionKey", $r(O)), window.sessionStorage.setItem("sessionId", h), { sessionKey: O, sessionId: h };
|
|
14153
14156
|
throw new Error("Failed to decrypt session key");
|
|
@@ -14172,11 +14175,11 @@ async function Tm(r, e) {
|
|
|
14172
14175
|
"Failed to login"
|
|
14173
14176
|
);
|
|
14174
14177
|
}
|
|
14175
|
-
async function Nm(r, e, t) {
|
|
14178
|
+
async function Nm(r, e, t, n) {
|
|
14176
14179
|
return Vt(
|
|
14177
14180
|
`${st}/platform/register`,
|
|
14178
14181
|
"POST",
|
|
14179
|
-
{ email: r, password: e,
|
|
14182
|
+
{ email: r, password: e, invite_code: t, name: n },
|
|
14180
14183
|
void 0,
|
|
14181
14184
|
"Failed to register"
|
|
14182
14185
|
);
|
|
@@ -14208,56 +14211,56 @@ async function Pm() {
|
|
|
14208
14211
|
}
|
|
14209
14212
|
}
|
|
14210
14213
|
async function $0(r) {
|
|
14211
|
-
return
|
|
14214
|
+
return Ze(
|
|
14212
14215
|
`${st}/platform/orgs`,
|
|
14213
14216
|
"POST",
|
|
14214
14217
|
{ name: r }
|
|
14215
14218
|
);
|
|
14216
14219
|
}
|
|
14217
14220
|
async function M0() {
|
|
14218
|
-
return
|
|
14221
|
+
return Ze(
|
|
14219
14222
|
`${st}/platform/orgs`,
|
|
14220
14223
|
"GET",
|
|
14221
14224
|
void 0
|
|
14222
14225
|
);
|
|
14223
14226
|
}
|
|
14224
14227
|
async function V0(r) {
|
|
14225
|
-
return
|
|
14228
|
+
return Ze(
|
|
14226
14229
|
`${st}/platform/orgs/${r}`,
|
|
14227
14230
|
"DELETE",
|
|
14228
14231
|
void 0
|
|
14229
14232
|
);
|
|
14230
14233
|
}
|
|
14231
14234
|
async function L0(r, e, t) {
|
|
14232
|
-
return
|
|
14235
|
+
return Ze(
|
|
14233
14236
|
`${st}/platform/orgs/${r}/projects`,
|
|
14234
14237
|
"POST",
|
|
14235
14238
|
{ name: e, description: t }
|
|
14236
14239
|
);
|
|
14237
14240
|
}
|
|
14238
14241
|
async function H0(r) {
|
|
14239
|
-
return
|
|
14242
|
+
return Ze(
|
|
14240
14243
|
`${st}/platform/orgs/${r}/projects`,
|
|
14241
14244
|
"GET",
|
|
14242
14245
|
void 0
|
|
14243
14246
|
);
|
|
14244
14247
|
}
|
|
14245
14248
|
async function F0(r, e) {
|
|
14246
|
-
return
|
|
14249
|
+
return Ze(
|
|
14247
14250
|
`${st}/platform/orgs/${r}/projects/${e}`,
|
|
14248
14251
|
"GET",
|
|
14249
14252
|
void 0
|
|
14250
14253
|
);
|
|
14251
14254
|
}
|
|
14252
14255
|
async function z0(r, e, t) {
|
|
14253
|
-
return
|
|
14256
|
+
return Ze(
|
|
14254
14257
|
`${st}/platform/orgs/${r}/projects/${e}`,
|
|
14255
14258
|
"PATCH",
|
|
14256
14259
|
t
|
|
14257
14260
|
);
|
|
14258
14261
|
}
|
|
14259
14262
|
async function G0(r, e) {
|
|
14260
|
-
return
|
|
14263
|
+
return Ze(
|
|
14261
14264
|
`${st}/platform/orgs/${r}/projects/${e}`,
|
|
14262
14265
|
"DELETE",
|
|
14263
14266
|
void 0
|
|
@@ -14272,49 +14275,49 @@ async function K0(r, e, t, n) {
|
|
|
14272
14275
|
throw new Error(
|
|
14273
14276
|
"Secret must be base64 encoded. Use @stablelib/base64's encode function to encode your data."
|
|
14274
14277
|
);
|
|
14275
|
-
return
|
|
14278
|
+
return Ze(
|
|
14276
14279
|
`${st}/platform/orgs/${r}/projects/${e}/secrets`,
|
|
14277
14280
|
"POST",
|
|
14278
14281
|
{ key_name: t, secret: n }
|
|
14279
14282
|
);
|
|
14280
14283
|
}
|
|
14281
|
-
async function
|
|
14282
|
-
return
|
|
14284
|
+
async function q0(r, e) {
|
|
14285
|
+
return Ze(
|
|
14283
14286
|
`${st}/platform/orgs/${r}/projects/${e}/secrets`,
|
|
14284
14287
|
"GET",
|
|
14285
14288
|
void 0
|
|
14286
14289
|
);
|
|
14287
14290
|
}
|
|
14288
|
-
async function
|
|
14289
|
-
return
|
|
14291
|
+
async function Z0(r, e, t) {
|
|
14292
|
+
return Ze(
|
|
14290
14293
|
`${st}/platform/orgs/${r}/projects/${e}/secrets/${t}`,
|
|
14291
14294
|
"DELETE",
|
|
14292
14295
|
void 0
|
|
14293
14296
|
);
|
|
14294
14297
|
}
|
|
14295
14298
|
async function W0(r, e) {
|
|
14296
|
-
return
|
|
14299
|
+
return Ze(
|
|
14297
14300
|
`${st}/platform/orgs/${r}/projects/${e}/settings/email`,
|
|
14298
14301
|
"GET",
|
|
14299
14302
|
void 0
|
|
14300
14303
|
);
|
|
14301
14304
|
}
|
|
14302
14305
|
async function Y0(r, e, t) {
|
|
14303
|
-
return
|
|
14306
|
+
return Ze(
|
|
14304
14307
|
`${st}/platform/orgs/${r}/projects/${e}/settings/email`,
|
|
14305
14308
|
"PUT",
|
|
14306
14309
|
t
|
|
14307
14310
|
);
|
|
14308
14311
|
}
|
|
14309
14312
|
async function J0(r, e) {
|
|
14310
|
-
return
|
|
14313
|
+
return Ze(
|
|
14311
14314
|
`${st}/platform/orgs/${r}/projects/${e}/settings/oauth`,
|
|
14312
14315
|
"GET",
|
|
14313
14316
|
void 0
|
|
14314
14317
|
);
|
|
14315
14318
|
}
|
|
14316
14319
|
async function X0(r, e, t) {
|
|
14317
|
-
return
|
|
14320
|
+
return Ze(
|
|
14318
14321
|
`${st}/platform/orgs/${r}/projects/${e}/settings/oauth`,
|
|
14319
14322
|
"PUT",
|
|
14320
14323
|
t
|
|
@@ -14323,63 +14326,63 @@ async function X0(r, e, t) {
|
|
|
14323
14326
|
async function Q0(r, e, t) {
|
|
14324
14327
|
if (!e || e.trim() === "")
|
|
14325
14328
|
throw new Error("Email is required");
|
|
14326
|
-
return
|
|
14329
|
+
return Ze(
|
|
14327
14330
|
`${st}/platform/orgs/${r}/invites`,
|
|
14328
14331
|
"POST",
|
|
14329
14332
|
{ email: e, role: t }
|
|
14330
14333
|
);
|
|
14331
14334
|
}
|
|
14332
14335
|
async function ey(r) {
|
|
14333
|
-
return
|
|
14336
|
+
return Ze(
|
|
14334
14337
|
`${st}/platform/orgs/${r}/invites`,
|
|
14335
14338
|
"GET",
|
|
14336
14339
|
void 0
|
|
14337
14340
|
);
|
|
14338
14341
|
}
|
|
14339
14342
|
async function ty(r, e) {
|
|
14340
|
-
return
|
|
14343
|
+
return Ze(
|
|
14341
14344
|
`${st}/platform/orgs/${r}/invites/${e}`,
|
|
14342
14345
|
"GET",
|
|
14343
14346
|
void 0
|
|
14344
14347
|
);
|
|
14345
14348
|
}
|
|
14346
14349
|
async function ry(r, e) {
|
|
14347
|
-
return
|
|
14350
|
+
return Ze(
|
|
14348
14351
|
`${st}/platform/orgs/${r}/invites/${e}`,
|
|
14349
14352
|
"DELETE",
|
|
14350
14353
|
void 0
|
|
14351
14354
|
);
|
|
14352
14355
|
}
|
|
14353
14356
|
async function ny(r) {
|
|
14354
|
-
return
|
|
14357
|
+
return Ze(
|
|
14355
14358
|
`${st}/platform/orgs/${r}/memberships`,
|
|
14356
14359
|
"GET",
|
|
14357
14360
|
void 0
|
|
14358
14361
|
);
|
|
14359
14362
|
}
|
|
14360
14363
|
async function iy(r, e, t) {
|
|
14361
|
-
return
|
|
14364
|
+
return Ze(
|
|
14362
14365
|
`${st}/platform/orgs/${r}/memberships/${e}`,
|
|
14363
14366
|
"PATCH",
|
|
14364
14367
|
{ role: t }
|
|
14365
14368
|
);
|
|
14366
14369
|
}
|
|
14367
14370
|
async function sy(r, e) {
|
|
14368
|
-
return
|
|
14371
|
+
return Ze(
|
|
14369
14372
|
`${st}/platform/orgs/${r}/memberships/${e}`,
|
|
14370
14373
|
"DELETE",
|
|
14371
14374
|
void 0
|
|
14372
14375
|
);
|
|
14373
14376
|
}
|
|
14374
14377
|
async function oy(r) {
|
|
14375
|
-
return
|
|
14378
|
+
return Ze(
|
|
14376
14379
|
`${st}/platform/accept_invite/${r}`,
|
|
14377
14380
|
"POST",
|
|
14378
14381
|
void 0
|
|
14379
14382
|
);
|
|
14380
14383
|
}
|
|
14381
14384
|
async function Um() {
|
|
14382
|
-
return
|
|
14385
|
+
return Ze(`${st}/platform/me`, "GET", void 0);
|
|
14383
14386
|
}
|
|
14384
14387
|
async function ay(r) {
|
|
14385
14388
|
return Vt(
|
|
@@ -14391,7 +14394,7 @@ async function ay(r) {
|
|
|
14391
14394
|
);
|
|
14392
14395
|
}
|
|
14393
14396
|
async function Da() {
|
|
14394
|
-
return
|
|
14397
|
+
return Ze(
|
|
14395
14398
|
`${st}/platform/request_verification`,
|
|
14396
14399
|
"POST",
|
|
14397
14400
|
void 0,
|
|
@@ -14431,14 +14434,14 @@ async function uy(r, e) {
|
|
|
14431
14434
|
current_password: r,
|
|
14432
14435
|
new_password: e
|
|
14433
14436
|
};
|
|
14434
|
-
return
|
|
14437
|
+
return Ze(
|
|
14435
14438
|
`${st}/platform/change-password`,
|
|
14436
14439
|
"POST",
|
|
14437
14440
|
t,
|
|
14438
14441
|
"Failed to change platform password"
|
|
14439
14442
|
);
|
|
14440
14443
|
}
|
|
14441
|
-
async function
|
|
14444
|
+
async function Ze(r, e, t, n) {
|
|
14442
14445
|
const i = async (s = !1) => {
|
|
14443
14446
|
try {
|
|
14444
14447
|
if (s) {
|
|
@@ -14479,7 +14482,7 @@ async function fy(r, e, t, n, i) {
|
|
|
14479
14482
|
}
|
|
14480
14483
|
if (!c || !u)
|
|
14481
14484
|
throw new Error("Failed to make encrypted API call, no attestation available.");
|
|
14482
|
-
const
|
|
14485
|
+
const N = t ? JSON.stringify(t) : void 0, v = N ? Ad(c, N) : void 0, A = {
|
|
14483
14486
|
"Content-Type": "application/json",
|
|
14484
14487
|
"x-session-id": u
|
|
14485
14488
|
};
|
|
@@ -14507,10 +14510,10 @@ async function fy(r, e, t, n, i) {
|
|
|
14507
14510
|
}
|
|
14508
14511
|
return k;
|
|
14509
14512
|
}, m = async (x, G = !1) => {
|
|
14510
|
-
var
|
|
14513
|
+
var N;
|
|
14511
14514
|
try {
|
|
14512
14515
|
const v = await h(x, G);
|
|
14513
|
-
return (v.status === 400 || (
|
|
14516
|
+
return (v.status === 400 || (N = v.error) != null && N.includes("Encryption error")) && !G ? (console.log("Encryption error or Bad Request, attempting to renew attestation"), m(x, !0)) : v;
|
|
14514
14517
|
} catch (v) {
|
|
14515
14518
|
return {
|
|
14516
14519
|
status: 500,
|
|
@@ -14589,7 +14592,7 @@ async function Uc() {
|
|
|
14589
14592
|
}
|
|
14590
14593
|
}
|
|
14591
14594
|
async function Fm() {
|
|
14592
|
-
return
|
|
14595
|
+
return Ze(
|
|
14593
14596
|
`${ft}/protected/user`,
|
|
14594
14597
|
"GET",
|
|
14595
14598
|
void 0,
|
|
@@ -14597,7 +14600,7 @@ async function Fm() {
|
|
|
14597
14600
|
);
|
|
14598
14601
|
}
|
|
14599
14602
|
async function hy(r, e) {
|
|
14600
|
-
return
|
|
14603
|
+
return Ze(
|
|
14601
14604
|
`${ft}/protected/kv/${r}`,
|
|
14602
14605
|
"PUT",
|
|
14603
14606
|
e,
|
|
@@ -14605,7 +14608,7 @@ async function hy(r, e) {
|
|
|
14605
14608
|
);
|
|
14606
14609
|
}
|
|
14607
14610
|
async function dy(r) {
|
|
14608
|
-
return
|
|
14611
|
+
return Ze(
|
|
14609
14612
|
`${ft}/protected/kv/${r}`,
|
|
14610
14613
|
"DELETE",
|
|
14611
14614
|
void 0,
|
|
@@ -14614,7 +14617,7 @@ async function dy(r) {
|
|
|
14614
14617
|
}
|
|
14615
14618
|
async function py(r) {
|
|
14616
14619
|
try {
|
|
14617
|
-
return await
|
|
14620
|
+
return await Ze(
|
|
14618
14621
|
`${ft}/protected/kv/${r}`,
|
|
14619
14622
|
"GET",
|
|
14620
14623
|
void 0,
|
|
@@ -14626,7 +14629,7 @@ async function py(r) {
|
|
|
14626
14629
|
}
|
|
14627
14630
|
}
|
|
14628
14631
|
async function yy() {
|
|
14629
|
-
return
|
|
14632
|
+
return Ze(
|
|
14630
14633
|
`${ft}/protected/kv`,
|
|
14631
14634
|
"GET",
|
|
14632
14635
|
void 0,
|
|
@@ -14647,7 +14650,7 @@ async function gy(r) {
|
|
|
14647
14650
|
);
|
|
14648
14651
|
}
|
|
14649
14652
|
async function $a() {
|
|
14650
|
-
return
|
|
14653
|
+
return Ze(
|
|
14651
14654
|
`${ft}/protected/request_verification`,
|
|
14652
14655
|
"POST",
|
|
14653
14656
|
void 0,
|
|
@@ -14672,7 +14675,7 @@ async function Km(r, e, t) {
|
|
|
14672
14675
|
throw new Error("Key exchange failed");
|
|
14673
14676
|
return i.json();
|
|
14674
14677
|
}
|
|
14675
|
-
async function
|
|
14678
|
+
async function qm(r, e, t) {
|
|
14676
14679
|
const n = {
|
|
14677
14680
|
email: r,
|
|
14678
14681
|
hashed_secret: e,
|
|
@@ -14686,7 +14689,7 @@ async function Zm(r, e, t) {
|
|
|
14686
14689
|
"Failed to request password reset"
|
|
14687
14690
|
);
|
|
14688
14691
|
}
|
|
14689
|
-
async function
|
|
14692
|
+
async function Zm(r, e, t, n, i) {
|
|
14690
14693
|
const s = {
|
|
14691
14694
|
email: r,
|
|
14692
14695
|
alphanumeric_code: e,
|
|
@@ -14707,7 +14710,7 @@ async function vy(r, e) {
|
|
|
14707
14710
|
current_password: r,
|
|
14708
14711
|
new_password: e
|
|
14709
14712
|
};
|
|
14710
|
-
return
|
|
14713
|
+
return Ze(
|
|
14711
14714
|
`${ft}/protected/change_password`,
|
|
14712
14715
|
"POST",
|
|
14713
14716
|
t,
|
|
@@ -14777,7 +14780,7 @@ async function Xm(r, e, t) {
|
|
|
14777
14780
|
}
|
|
14778
14781
|
}
|
|
14779
14782
|
async function my() {
|
|
14780
|
-
return
|
|
14783
|
+
return Ze(
|
|
14781
14784
|
`${ft}/protected/private_key`,
|
|
14782
14785
|
"GET",
|
|
14783
14786
|
void 0,
|
|
@@ -14786,7 +14789,7 @@ async function my() {
|
|
|
14786
14789
|
}
|
|
14787
14790
|
async function wy(r) {
|
|
14788
14791
|
const e = r ? `${ft}/protected/private_key_bytes?derivation_path=${encodeURIComponent(r)}` : `${ft}/protected/private_key_bytes`;
|
|
14789
|
-
return
|
|
14792
|
+
return Ze(
|
|
14790
14793
|
e,
|
|
14791
14794
|
"GET",
|
|
14792
14795
|
void 0,
|
|
@@ -14795,7 +14798,7 @@ async function wy(r) {
|
|
|
14795
14798
|
}
|
|
14796
14799
|
async function by(r, e, t) {
|
|
14797
14800
|
const n = $r(r);
|
|
14798
|
-
return
|
|
14801
|
+
return Ze(
|
|
14799
14802
|
`${ft}/protected/sign_message`,
|
|
14800
14803
|
"POST",
|
|
14801
14804
|
{
|
|
@@ -14808,7 +14811,7 @@ async function by(r, e, t) {
|
|
|
14808
14811
|
}
|
|
14809
14812
|
async function xy(r, e) {
|
|
14810
14813
|
const t = e ? `${ft}/protected/public_key?algorithm=${r}&derivation_path=${encodeURIComponent(e)}` : `${ft}/protected/public_key?algorithm=${r}`;
|
|
14811
|
-
return
|
|
14814
|
+
return Ze(
|
|
14812
14815
|
t,
|
|
14813
14816
|
"GET",
|
|
14814
14817
|
void 0,
|
|
@@ -14821,7 +14824,7 @@ async function Qm(r, e, t) {
|
|
|
14821
14824
|
password: e,
|
|
14822
14825
|
...t !== void 0 && { name: t }
|
|
14823
14826
|
};
|
|
14824
|
-
return
|
|
14827
|
+
return Ze(
|
|
14825
14828
|
`${ft}/protected/convert_guest`,
|
|
14826
14829
|
"POST",
|
|
14827
14830
|
n,
|
|
@@ -14829,7 +14832,7 @@ async function Qm(r, e, t) {
|
|
|
14829
14832
|
);
|
|
14830
14833
|
}
|
|
14831
14834
|
async function ew(r) {
|
|
14832
|
-
return
|
|
14835
|
+
return Ze(
|
|
14833
14836
|
`${ft}/protected/third_party_token`,
|
|
14834
14837
|
"POST",
|
|
14835
14838
|
{ audience: r },
|
|
@@ -14870,7 +14873,7 @@ function tw() {
|
|
|
14870
14873
|
if ((n = h.headers.get("content-type")) != null && n.includes("text/event-stream")) {
|
|
14871
14874
|
const m = (i = h.body) == null ? void 0 : i.getReader(), x = new TextDecoder();
|
|
14872
14875
|
let G = "";
|
|
14873
|
-
const
|
|
14876
|
+
const N = new ReadableStream({
|
|
14874
14877
|
async start(v) {
|
|
14875
14878
|
for (; ; ) {
|
|
14876
14879
|
const { done: A, value: O } = await m.read();
|
|
@@ -14910,7 +14913,7 @@ function tw() {
|
|
|
14910
14913
|
v.close();
|
|
14911
14914
|
}
|
|
14912
14915
|
});
|
|
14913
|
-
return new Response(
|
|
14916
|
+
return new Response(N, {
|
|
14914
14917
|
headers: h.headers,
|
|
14915
14918
|
status: h.status,
|
|
14916
14919
|
statusText: h.statusText
|
|
@@ -15157,7 +15160,7 @@ function ax({
|
|
|
15157
15160
|
throw console.error(Y), Y;
|
|
15158
15161
|
}
|
|
15159
15162
|
}
|
|
15160
|
-
async function
|
|
15163
|
+
async function N(X, re, Y) {
|
|
15161
15164
|
try {
|
|
15162
15165
|
await Qm(X, re, Y), await u();
|
|
15163
15166
|
} catch (ye) {
|
|
@@ -15185,7 +15188,7 @@ function ax({
|
|
|
15185
15188
|
signOut: v,
|
|
15186
15189
|
signUp: m,
|
|
15187
15190
|
signUpGuest: G,
|
|
15188
|
-
convertGuestToUserAccount:
|
|
15191
|
+
convertGuestToUserAccount: N,
|
|
15189
15192
|
get: py,
|
|
15190
15193
|
put: hy,
|
|
15191
15194
|
list: yy,
|
|
@@ -15196,8 +15199,8 @@ function ax({
|
|
|
15196
15199
|
requestNewVerificationEmail: $a,
|
|
15197
15200
|
changePassword: vy,
|
|
15198
15201
|
refreshAccessToken: Uc,
|
|
15199
|
-
requestPasswordReset: (X, re) =>
|
|
15200
|
-
confirmPasswordReset: (X, re, Y, ye) =>
|
|
15202
|
+
requestPasswordReset: (X, re) => qm(X, re, t),
|
|
15203
|
+
confirmPasswordReset: (X, re, Y, ye) => Zm(X, re, Y, ye, t),
|
|
15201
15204
|
initiateGitHubAuth: async (X) => {
|
|
15202
15205
|
try {
|
|
15203
15206
|
return await Wm(t, X);
|
|
@@ -15304,8 +15307,8 @@ const _y = md({
|
|
|
15304
15307
|
updateProject: z0,
|
|
15305
15308
|
deleteProject: G0,
|
|
15306
15309
|
createProjectSecret: K0,
|
|
15307
|
-
listProjectSecrets:
|
|
15308
|
-
deleteProjectSecret:
|
|
15310
|
+
listProjectSecrets: q0,
|
|
15311
|
+
deleteProjectSecret: Z0,
|
|
15309
15312
|
getEmailSettings: W0,
|
|
15310
15313
|
updateEmailSettings: Y0,
|
|
15311
15314
|
getOAuthSettings: J0,
|
|
@@ -15337,6 +15340,10 @@ function cx({
|
|
|
15337
15340
|
Om(e), Promise.resolve().then(() => bd).then(({ apiConfig: m }) => {
|
|
15338
15341
|
const x = m.appApiUrl || "";
|
|
15339
15342
|
m.configure(x, e);
|
|
15343
|
+
}).catch((m) => {
|
|
15344
|
+
throw console.error("Failed to load apiConfig:", m), new Error(
|
|
15345
|
+
"Failed to initialize OpenSecretDeveloper - could not load required dependencies"
|
|
15346
|
+
);
|
|
15340
15347
|
});
|
|
15341
15348
|
}, [e]);
|
|
15342
15349
|
async function s() {
|
|
@@ -15368,34 +15375,35 @@ function cx({
|
|
|
15368
15375
|
const m = window.crypto.randomUUID(), x = await fetch(`${e}/attestation/${m}`);
|
|
15369
15376
|
if (!x.ok)
|
|
15370
15377
|
throw new Error("Failed to fetch attestation document");
|
|
15371
|
-
const G = await x.json(),
|
|
15378
|
+
const G = await x.json(), N = await Si(
|
|
15372
15379
|
G.attestation_document,
|
|
15373
15380
|
ts,
|
|
15374
15381
|
m
|
|
15375
15382
|
);
|
|
15376
|
-
return rs(
|
|
15383
|
+
return rs(N, N.cabundle, t);
|
|
15377
15384
|
};
|
|
15378
15385
|
Os(() => {
|
|
15379
15386
|
s();
|
|
15380
15387
|
}, []);
|
|
15381
15388
|
async function c(m, x) {
|
|
15382
15389
|
try {
|
|
15383
|
-
const { access_token: G, refresh_token:
|
|
15384
|
-
return window.localStorage.setItem("access_token", G), window.localStorage.setItem("refresh_token",
|
|
15390
|
+
const { access_token: G, refresh_token: N } = await Tm(m, x);
|
|
15391
|
+
return window.localStorage.setItem("access_token", G), window.localStorage.setItem("refresh_token", N), await s(), { access_token: G, refresh_token: N, id: "", email: m };
|
|
15385
15392
|
} catch (G) {
|
|
15386
15393
|
throw console.error("Login error:", G), G;
|
|
15387
15394
|
}
|
|
15388
15395
|
}
|
|
15389
|
-
async function u(m, x, G) {
|
|
15396
|
+
async function u(m, x, G, N) {
|
|
15390
15397
|
try {
|
|
15391
|
-
const { access_token:
|
|
15398
|
+
const { access_token: v, refresh_token: A } = await Nm(
|
|
15392
15399
|
m,
|
|
15393
15400
|
x,
|
|
15394
|
-
G
|
|
15401
|
+
G,
|
|
15402
|
+
N
|
|
15395
15403
|
);
|
|
15396
|
-
return window.localStorage.setItem("access_token",
|
|
15397
|
-
} catch (
|
|
15398
|
-
throw console.error("Registration error:",
|
|
15404
|
+
return window.localStorage.setItem("access_token", v), window.localStorage.setItem("refresh_token", A), await s(), { access_token: v, refresh_token: A, id: "", email: m, name: N };
|
|
15405
|
+
} catch (v) {
|
|
15406
|
+
throw console.error("Registration error:", v), v;
|
|
15399
15407
|
}
|
|
15400
15408
|
}
|
|
15401
15409
|
const h = {
|
|
@@ -15438,8 +15446,8 @@ function cx({
|
|
|
15438
15446
|
updateProject: z0,
|
|
15439
15447
|
deleteProject: G0,
|
|
15440
15448
|
createProjectSecret: K0,
|
|
15441
|
-
listProjectSecrets:
|
|
15442
|
-
deleteProjectSecret:
|
|
15449
|
+
listProjectSecrets: q0,
|
|
15450
|
+
deleteProjectSecret: Z0,
|
|
15443
15451
|
getEmailSettings: W0,
|
|
15444
15452
|
updateEmailSettings: Y0,
|
|
15445
15453
|
getOAuthSettings: J0,
|