@opensecret/react 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +55 -0
- package/dist/opensecret-react.es.js +570 -560
- package/dist/opensecret-react.umd.js +18 -18
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var eg = Object.defineProperty;
|
|
2
2
|
var Cf = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var Ke = (r, e, t) =>
|
|
5
|
+
var tg = (r, e, t) => e in r ? eg(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var Ke = (r, e, t) => tg(r, typeof e != "symbol" ? e + "" : e, t), Vc = (r, e, t) => e.has(r) || Cf("Cannot " + t);
|
|
7
7
|
var $ = (r, e, t) => (Vc(r, e, "read from private field"), t ? t.call(r) : e.get(r)), rr = (r, e, t) => e.has(r) ? Cf("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), kt = (r, e, t, n) => (Vc(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), Ve = (r, e, t) => (Vc(r, e, "access private method"), t);
|
|
8
8
|
var Bf = (r, e, t, n) => ({
|
|
9
9
|
set _(i) {
|
|
@@ -16,7 +16,7 @@ var Bf = (r, e, t, n) => ({
|
|
|
16
16
|
import { jsx as Sd } from "react/jsx-runtime";
|
|
17
17
|
import { createContext as _d, useState as Do, useEffect as Os, useContext as Ed } from "react";
|
|
18
18
|
const hr = 256;
|
|
19
|
-
class
|
|
19
|
+
class rg {
|
|
20
20
|
// TODO(dchest): methods to encode chunk-by-chunk.
|
|
21
21
|
constructor(e = "=") {
|
|
22
22
|
Ke(this, "_paddingCharacter");
|
|
@@ -84,7 +84,7 @@ class tg {
|
|
|
84
84
|
return t;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
const Id = new
|
|
87
|
+
const Id = new rg();
|
|
88
88
|
function _r(r) {
|
|
89
89
|
return Id.encode(r);
|
|
90
90
|
}
|
|
@@ -102,10 +102,10 @@ function Br(r) {
|
|
|
102
102
|
r[e] = 0;
|
|
103
103
|
return r;
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
function
|
|
105
|
+
const ng = 20;
|
|
106
|
+
function ig(r, e, t) {
|
|
107
107
|
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], v = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], b = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], H = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], T = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], m = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], A = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], k = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], I = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], P = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], D = n, ye = i, tt = s, De = o, Te = c, He = u, yt = h, pt = v, ue = b, fe = H, ge = T, Se = m, Re = A, Je = k, ie = I, ke = P;
|
|
108
|
-
for (let mt = 0; mt <
|
|
108
|
+
for (let mt = 0; mt < ng; mt += 2)
|
|
109
109
|
D = D + Te | 0, Re ^= D, Re = Re >>> 16 | Re << 16, ue = ue + Re | 0, Te ^= ue, Te = Te >>> 20 | Te << 12, ye = ye + He | 0, Je ^= ye, Je = Je >>> 16 | Je << 16, fe = fe + Je | 0, He ^= fe, He = He >>> 20 | He << 12, tt = tt + yt | 0, ie ^= tt, ie = ie >>> 16 | ie << 16, ge = ge + ie | 0, yt ^= ge, yt = yt >>> 20 | yt << 12, De = De + pt | 0, ke ^= De, ke = ke >>> 16 | ke << 16, Se = Se + ke | 0, pt ^= Se, pt = pt >>> 20 | pt << 12, tt = tt + yt | 0, ie ^= tt, ie = ie >>> 24 | ie << 8, ge = ge + ie | 0, yt ^= ge, yt = yt >>> 25 | yt << 7, De = De + pt | 0, ke ^= De, ke = ke >>> 24 | ke << 8, Se = Se + ke | 0, pt ^= Se, pt = pt >>> 25 | pt << 7, ye = ye + He | 0, Je ^= ye, Je = Je >>> 24 | Je << 8, fe = fe + Je | 0, He ^= fe, He = He >>> 25 | He << 7, D = D + Te | 0, Re ^= D, Re = Re >>> 24 | Re << 8, ue = ue + Re | 0, Te ^= ue, Te = Te >>> 25 | Te << 7, D = D + He | 0, ke ^= D, ke = ke >>> 16 | ke << 16, ge = ge + ke | 0, He ^= ge, He = He >>> 20 | He << 12, ye = ye + yt | 0, Re ^= ye, Re = Re >>> 16 | Re << 16, Se = Se + Re | 0, yt ^= Se, yt = yt >>> 20 | yt << 12, tt = tt + pt | 0, Je ^= tt, Je = Je >>> 16 | Je << 16, ue = ue + Je | 0, pt ^= ue, pt = pt >>> 20 | pt << 12, De = De + Te | 0, ie ^= De, ie = ie >>> 16 | ie << 16, fe = fe + ie | 0, Te ^= fe, Te = Te >>> 20 | Te << 12, tt = tt + pt | 0, Je ^= tt, Je = Je >>> 24 | Je << 8, ue = ue + Je | 0, pt ^= ue, pt = pt >>> 25 | pt << 7, De = De + Te | 0, ie ^= De, ie = ie >>> 24 | ie << 8, fe = fe + ie | 0, Te ^= fe, Te = Te >>> 25 | Te << 7, ye = ye + yt | 0, Re ^= ye, Re = Re >>> 24 | Re << 8, Se = Se + Re | 0, yt ^= Se, yt = yt >>> 25 | yt << 7, D = D + He | 0, ke ^= D, ke = ke >>> 24 | ke << 8, ge = ge + ke | 0, He ^= ge, He = He >>> 25 | He << 7;
|
|
110
110
|
zt(D + n | 0, r, 0), zt(ye + i | 0, r, 4), zt(tt + s | 0, r, 8), zt(De + o | 0, r, 12), zt(Te + c | 0, r, 16), zt(He + u | 0, r, 20), zt(yt + h | 0, r, 24), zt(pt + v | 0, r, 28), zt(ue + b | 0, r, 32), zt(fe + H | 0, r, 36), zt(ge + T | 0, r, 40), zt(Se + m | 0, r, 44), zt(Re + A | 0, r, 48), zt(Je + k | 0, r, 52), zt(ie + I | 0, r, 56), zt(ke + P | 0, r, 60);
|
|
111
111
|
}
|
|
@@ -126,24 +126,24 @@ function il(r, e, t, n, i = 0) {
|
|
|
126
126
|
}
|
|
127
127
|
const c = new Uint8Array(64);
|
|
128
128
|
for (let u = 0; u < t.length; u += 64) {
|
|
129
|
-
|
|
129
|
+
ig(c, s, r);
|
|
130
130
|
for (let h = u; h < u + 64 && h < t.length; h++)
|
|
131
131
|
n[h] = t[h] ^ c[h - u];
|
|
132
|
-
|
|
132
|
+
sg(s, 0, o);
|
|
133
133
|
}
|
|
134
134
|
return Br(c), i === 0 && Br(s), n;
|
|
135
135
|
}
|
|
136
136
|
function Tf(r, e, t, n = 0) {
|
|
137
137
|
return Br(t), il(r, e, t, t, n);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function sg(r, e, t) {
|
|
140
140
|
let n = 1;
|
|
141
141
|
for (; t--; )
|
|
142
142
|
n = n + (r[e] & 255) | 0, r[e] = n & 255, n >>>= 8, e++;
|
|
143
143
|
if (n > 0)
|
|
144
144
|
throw new Error("ChaCha: counter overflow");
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function og(r, e) {
|
|
147
147
|
if (r.length !== e.length)
|
|
148
148
|
return 0;
|
|
149
149
|
let t = 0;
|
|
@@ -151,13 +151,13 @@ function sg(r, e) {
|
|
|
151
151
|
t |= r[n] ^ e[n];
|
|
152
152
|
return 1 & t - 1 >>> 8;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
return r.length === 0 || e.length === 0 ? !1 :
|
|
154
|
+
function ag(r, e) {
|
|
155
|
+
return r.length === 0 || e.length === 0 ? !1 : og(r, e) !== 0;
|
|
156
156
|
}
|
|
157
|
-
const
|
|
158
|
-
class
|
|
157
|
+
const cg = 16;
|
|
158
|
+
class lg {
|
|
159
159
|
constructor(e) {
|
|
160
|
-
Ke(this, "digestLength",
|
|
160
|
+
Ke(this, "digestLength", cg);
|
|
161
161
|
Ke(this, "_buffer", new Uint8Array(16));
|
|
162
162
|
Ke(this, "_r", new Uint16Array(10));
|
|
163
163
|
Ke(this, "_h", new Uint16Array(10));
|
|
@@ -271,16 +271,16 @@ class cg {
|
|
|
271
271
|
return Br(this._buffer), Br(this._r), Br(this._h), Br(this._pad), this._leftover = 0, this._fin = 0, this._finished = !0, this;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const ug = 32, fg = 12, hg = 16, Nf = new Uint8Array(16);
|
|
275
275
|
class Nu {
|
|
276
276
|
/**
|
|
277
277
|
* Creates a new instance with the given 32-byte key.
|
|
278
278
|
*/
|
|
279
279
|
constructor(e) {
|
|
280
|
-
Ke(this, "nonceLength",
|
|
281
|
-
Ke(this, "tagLength",
|
|
280
|
+
Ke(this, "nonceLength", fg);
|
|
281
|
+
Ke(this, "tagLength", hg);
|
|
282
282
|
Ke(this, "_key");
|
|
283
|
-
if (e.length !==
|
|
283
|
+
if (e.length !== ug)
|
|
284
284
|
throw new Error("ChaCha20Poly1305 needs 32-byte key");
|
|
285
285
|
this._key = new Uint8Array(e);
|
|
286
286
|
}
|
|
@@ -336,7 +336,7 @@ class Nu {
|
|
|
336
336
|
const o = new Uint8Array(32);
|
|
337
337
|
Tf(this._key, s, o, 4);
|
|
338
338
|
const c = new Uint8Array(this.tagLength);
|
|
339
|
-
if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !
|
|
339
|
+
if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !ag(c, t.subarray(t.length - this.tagLength, t.length)))
|
|
340
340
|
return null;
|
|
341
341
|
const u = t.length - this.tagLength;
|
|
342
342
|
let h;
|
|
@@ -352,7 +352,7 @@ class Nu {
|
|
|
352
352
|
return Br(this._key), this;
|
|
353
353
|
}
|
|
354
354
|
_authenticate(e, t, n, i) {
|
|
355
|
-
const s = new
|
|
355
|
+
const s = new lg(t);
|
|
356
356
|
i && (s.update(i), i.length % 16 > 0 && s.update(Nf.subarray(i.length % 16))), s.update(n), n.length % 16 > 0 && s.update(Nf.subarray(n.length % 16));
|
|
357
357
|
const o = new Uint8Array(8);
|
|
358
358
|
i && Of(i.length, o), s.update(o), Of(n.length, o), s.update(o);
|
|
@@ -363,7 +363,7 @@ class Nu {
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
const Pf = 65536;
|
|
366
|
-
class
|
|
366
|
+
class dg {
|
|
367
367
|
constructor() {
|
|
368
368
|
Ke(this, "isAvailable", !1);
|
|
369
369
|
Ke(this, "isInstantiated", !1);
|
|
@@ -378,12 +378,12 @@ class hg {
|
|
|
378
378
|
return t;
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
const
|
|
382
|
-
function
|
|
381
|
+
const pg = new dg();
|
|
382
|
+
function yg(r, e = pg) {
|
|
383
383
|
return e.randomBytes(r);
|
|
384
384
|
}
|
|
385
385
|
function kd(r, e) {
|
|
386
|
-
const t = new Nu(r), n =
|
|
386
|
+
const t = new Nu(r), n = yg(12), s = new TextEncoder().encode(e), o = t.seal(n, s), c = new Uint8Array(n.length + o.length);
|
|
387
387
|
return c.set(n), c.set(o, n.length), _r(c);
|
|
388
388
|
}
|
|
389
389
|
function sl(r, e) {
|
|
@@ -393,10 +393,10 @@ function sl(r, e) {
|
|
|
393
393
|
return new TextDecoder().decode(c);
|
|
394
394
|
}
|
|
395
395
|
var ol = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
396
|
-
function
|
|
396
|
+
function gg(r) {
|
|
397
397
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function vg(r) {
|
|
400
400
|
if (r.__esModule) return r;
|
|
401
401
|
var e = r.default;
|
|
402
402
|
if (typeof e == "function") {
|
|
@@ -494,12 +494,12 @@ var jf;
|
|
|
494
494
|
}
|
|
495
495
|
e("decorate", P);
|
|
496
496
|
function D(_, C) {
|
|
497
|
-
function N(K,
|
|
497
|
+
function N(K, Ae) {
|
|
498
498
|
if (!Q(K))
|
|
499
499
|
throw new TypeError();
|
|
500
|
-
if (!ae(
|
|
500
|
+
if (!ae(Ae) && !Mc(Ae))
|
|
501
501
|
throw new TypeError();
|
|
502
|
-
ke(_, C, K,
|
|
502
|
+
ke(_, C, K, Ae);
|
|
503
503
|
}
|
|
504
504
|
return N;
|
|
505
505
|
}
|
|
@@ -563,18 +563,18 @@ var jf;
|
|
|
563
563
|
e("deleteMetadata", ue);
|
|
564
564
|
function fe(_, C) {
|
|
565
565
|
for (var N = _.length - 1; N >= 0; --N) {
|
|
566
|
-
var K = _[N],
|
|
567
|
-
if (!ae(
|
|
568
|
-
if (!ds(
|
|
566
|
+
var K = _[N], Ae = K(C);
|
|
567
|
+
if (!ae(Ae) && !ot(Ae)) {
|
|
568
|
+
if (!ds(Ae))
|
|
569
569
|
throw new TypeError();
|
|
570
|
-
C =
|
|
570
|
+
C = Ae;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
return C;
|
|
574
574
|
}
|
|
575
575
|
function ge(_, C, N, K) {
|
|
576
|
-
for (var
|
|
577
|
-
var _t = _[
|
|
576
|
+
for (var Ae = _.length - 1; Ae >= 0; --Ae) {
|
|
577
|
+
var _t = _[Ae], Et = _t(C, N, K);
|
|
578
578
|
if (!ae(Et) && !ot(Et)) {
|
|
579
579
|
if (!Q(Et))
|
|
580
580
|
throw new TypeError();
|
|
@@ -587,8 +587,8 @@ var jf;
|
|
|
587
587
|
var K = Re(_, C, N);
|
|
588
588
|
if (K)
|
|
589
589
|
return !0;
|
|
590
|
-
var
|
|
591
|
-
return ot(
|
|
590
|
+
var Ae = Bi(C);
|
|
591
|
+
return ot(Ae) ? !1 : Se(_, Ae, N);
|
|
592
592
|
}
|
|
593
593
|
function Re(_, C, N) {
|
|
594
594
|
var K = Wr(
|
|
@@ -603,9 +603,9 @@ var jf;
|
|
|
603
603
|
var K = Re(_, C, N);
|
|
604
604
|
if (K)
|
|
605
605
|
return ie(_, C, N);
|
|
606
|
-
var
|
|
607
|
-
if (!ot(
|
|
608
|
-
return Je(_,
|
|
606
|
+
var Ae = Bi(C);
|
|
607
|
+
if (!ot(Ae))
|
|
608
|
+
return Je(_, Ae, N);
|
|
609
609
|
}
|
|
610
610
|
function ie(_, C, N) {
|
|
611
611
|
var K = Wr(
|
|
@@ -618,28 +618,28 @@ var jf;
|
|
|
618
618
|
return K.OrdinaryGetOwnMetadata(_, C, N);
|
|
619
619
|
}
|
|
620
620
|
function ke(_, C, N, K) {
|
|
621
|
-
var
|
|
621
|
+
var Ae = Wr(
|
|
622
622
|
N,
|
|
623
623
|
K,
|
|
624
624
|
/*Create*/
|
|
625
625
|
!0
|
|
626
626
|
);
|
|
627
|
-
|
|
627
|
+
Ae.OrdinaryDefineOwnMetadata(_, C, N, K);
|
|
628
628
|
}
|
|
629
629
|
function mt(_, C) {
|
|
630
630
|
var N = Ut(_, C), K = Bi(_);
|
|
631
631
|
if (K === null)
|
|
632
632
|
return N;
|
|
633
|
-
var
|
|
634
|
-
if (
|
|
633
|
+
var Ae = mt(K, C);
|
|
634
|
+
if (Ae.length <= 0)
|
|
635
635
|
return N;
|
|
636
636
|
if (N.length <= 0)
|
|
637
|
-
return
|
|
637
|
+
return Ae;
|
|
638
638
|
for (var _t = new T(), Et = [], $e = 0, Z = N; $e < Z.length; $e++) {
|
|
639
639
|
var ee = Z[$e], ce = _t.has(ee);
|
|
640
640
|
ce || (_t.add(ee), Et.push(ee));
|
|
641
641
|
}
|
|
642
|
-
for (var ve = 0, et =
|
|
642
|
+
for (var ve = 0, et = Ae; ve < et.length; ve++) {
|
|
643
643
|
var ee = et[ve], ce = _t.has(ee);
|
|
644
644
|
ce || (_t.add(ee), Et.push(ee));
|
|
645
645
|
}
|
|
@@ -703,19 +703,19 @@ var jf;
|
|
|
703
703
|
}
|
|
704
704
|
var N = "string", K = Co(_, s);
|
|
705
705
|
if (K !== void 0) {
|
|
706
|
-
var
|
|
707
|
-
if (Q(
|
|
706
|
+
var Ae = K.call(_, N);
|
|
707
|
+
if (Q(Ae))
|
|
708
708
|
throw new TypeError();
|
|
709
|
-
return
|
|
709
|
+
return Ae;
|
|
710
710
|
}
|
|
711
711
|
return Vt(_);
|
|
712
712
|
}
|
|
713
713
|
function Vt(_, C) {
|
|
714
714
|
var N, K;
|
|
715
715
|
{
|
|
716
|
-
var
|
|
717
|
-
if (pn(
|
|
718
|
-
var K =
|
|
716
|
+
var Ae = _.toString;
|
|
717
|
+
if (pn(Ae)) {
|
|
718
|
+
var K = Ae.call(_);
|
|
719
719
|
if (!Q(K))
|
|
720
720
|
return K;
|
|
721
721
|
}
|
|
@@ -795,13 +795,13 @@ var jf;
|
|
|
795
795
|
var N = _.prototype, K = N && Object.getPrototypeOf(N);
|
|
796
796
|
if (K == null || K === Object.prototype)
|
|
797
797
|
return C;
|
|
798
|
-
var
|
|
799
|
-
return typeof
|
|
798
|
+
var Ae = K.constructor;
|
|
799
|
+
return typeof Ae != "function" || Ae === _ ? C : Ae;
|
|
800
800
|
}
|
|
801
801
|
function vs() {
|
|
802
802
|
var _;
|
|
803
803
|
!ae(A) && typeof t.Reflect < "u" && !(A in t.Reflect) && typeof t.Reflect.defineMetadata == "function" && (_ = ws(t.Reflect));
|
|
804
|
-
var C, N, K,
|
|
804
|
+
var C, N, K, Ae = new m(), _t = {
|
|
805
805
|
registerProvider: Et,
|
|
806
806
|
getProvider: Z,
|
|
807
807
|
setProvider: ce
|
|
@@ -850,8 +850,8 @@ var jf;
|
|
|
850
850
|
return _;
|
|
851
851
|
}
|
|
852
852
|
function Z(ve, et) {
|
|
853
|
-
var nt =
|
|
854
|
-
return ae(nt) || (bt = nt.get(et)), ae(bt) && (bt = $e(ve, et), ae(bt) || (ae(nt) && (nt = new H(),
|
|
853
|
+
var nt = Ae.get(ve), bt;
|
|
854
|
+
return ae(nt) || (bt = nt.get(et)), ae(bt) && (bt = $e(ve, et), ae(bt) || (ae(nt) && (nt = new H(), Ae.set(ve, nt)), nt.set(et, bt))), bt;
|
|
855
855
|
}
|
|
856
856
|
function ee(ve) {
|
|
857
857
|
if (ae(ve))
|
|
@@ -865,8 +865,8 @@ var jf;
|
|
|
865
865
|
if (bt !== nt) {
|
|
866
866
|
if (!ae(bt))
|
|
867
867
|
return !1;
|
|
868
|
-
var Gt =
|
|
869
|
-
ae(Gt) && (Gt = new H(),
|
|
868
|
+
var Gt = Ae.get(ve);
|
|
869
|
+
ae(Gt) && (Gt = new H(), Ae.set(ve, Gt)), Gt.set(et, nt);
|
|
870
870
|
}
|
|
871
871
|
return !0;
|
|
872
872
|
}
|
|
@@ -887,7 +887,7 @@ var jf;
|
|
|
887
887
|
return ae(ve) ? !1 : ve.has(ce);
|
|
888
888
|
},
|
|
889
889
|
OrdinaryDefineOwnMetadata: Et,
|
|
890
|
-
OrdinaryHasOwnMetadata:
|
|
890
|
+
OrdinaryHasOwnMetadata: Ae,
|
|
891
891
|
OrdinaryGetOwnMetadata: _t,
|
|
892
892
|
OrdinaryOwnMetadataKeys: $e,
|
|
893
893
|
OrdinaryDeleteMetadata: Z
|
|
@@ -909,7 +909,7 @@ var jf;
|
|
|
909
909
|
}
|
|
910
910
|
return bt;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function Ae(ee, ce, ve) {
|
|
913
913
|
var et = K(
|
|
914
914
|
ce,
|
|
915
915
|
ve,
|
|
@@ -980,15 +980,15 @@ var jf;
|
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
function ws(_) {
|
|
983
|
-
var C = _.defineMetadata, N = _.hasOwnMetadata, K = _.getOwnMetadata,
|
|
983
|
+
var C = _.defineMetadata, N = _.hasOwnMetadata, K = _.getOwnMetadata, Ae = _.getOwnMetadataKeys, _t = _.deleteMetadata, Et = new m(), $e = {
|
|
984
984
|
isProviderFor: function(Z, ee) {
|
|
985
985
|
var ce = Et.get(Z);
|
|
986
|
-
return !ae(ce) && ce.has(ee) ? !0 :
|
|
986
|
+
return !ae(ce) && ce.has(ee) ? !0 : Ae(Z, ee).length ? (ae(ce) && (ce = new T(), Et.set(Z, ce)), ce.add(ee), !0) : !1;
|
|
987
987
|
},
|
|
988
988
|
OrdinaryDefineOwnMetadata: C,
|
|
989
989
|
OrdinaryHasOwnMetadata: N,
|
|
990
990
|
OrdinaryGetOwnMetadata: K,
|
|
991
|
-
OrdinaryOwnMetadataKeys:
|
|
991
|
+
OrdinaryOwnMetadataKeys: Ae,
|
|
992
992
|
OrdinaryDeleteMetadata: _t
|
|
993
993
|
};
|
|
994
994
|
return $e;
|
|
@@ -1074,7 +1074,7 @@ var jf;
|
|
|
1074
1074
|
}, $e.prototype.clear = function() {
|
|
1075
1075
|
this._keys.length = 0, this._values.length = 0, this._cacheKey = _, this._cacheIndex = -2;
|
|
1076
1076
|
}, $e.prototype.keys = function() {
|
|
1077
|
-
return new N(this._keys, this._values,
|
|
1077
|
+
return new N(this._keys, this._values, Ae);
|
|
1078
1078
|
}, $e.prototype.values = function() {
|
|
1079
1079
|
return new N(this._keys, this._values, _t);
|
|
1080
1080
|
}, $e.prototype.entries = function() {
|
|
@@ -1097,7 +1097,7 @@ var jf;
|
|
|
1097
1097
|
}()
|
|
1098
1098
|
);
|
|
1099
1099
|
return K;
|
|
1100
|
-
function
|
|
1100
|
+
function Ae($e, Z) {
|
|
1101
1101
|
return $e;
|
|
1102
1102
|
}
|
|
1103
1103
|
function _t($e, Z) {
|
|
@@ -1152,28 +1152,28 @@ var jf;
|
|
|
1152
1152
|
this._key = K();
|
|
1153
1153
|
}
|
|
1154
1154
|
return Z.prototype.has = function(ee) {
|
|
1155
|
-
var ce =
|
|
1155
|
+
var ce = Ae(
|
|
1156
1156
|
ee,
|
|
1157
1157
|
/*create*/
|
|
1158
1158
|
!1
|
|
1159
1159
|
);
|
|
1160
1160
|
return ce !== void 0 ? v.has(ce, this._key) : !1;
|
|
1161
1161
|
}, Z.prototype.get = function(ee) {
|
|
1162
|
-
var ce =
|
|
1162
|
+
var ce = Ae(
|
|
1163
1163
|
ee,
|
|
1164
1164
|
/*create*/
|
|
1165
1165
|
!1
|
|
1166
1166
|
);
|
|
1167
1167
|
return ce !== void 0 ? v.get(ce, this._key) : void 0;
|
|
1168
1168
|
}, Z.prototype.set = function(ee, ce) {
|
|
1169
|
-
var ve =
|
|
1169
|
+
var ve = Ae(
|
|
1170
1170
|
ee,
|
|
1171
1171
|
/*create*/
|
|
1172
1172
|
!0
|
|
1173
1173
|
);
|
|
1174
1174
|
return ve[this._key] = ce, this;
|
|
1175
1175
|
}, Z.prototype.delete = function(ee) {
|
|
1176
|
-
var ce =
|
|
1176
|
+
var ce = Ae(
|
|
1177
1177
|
ee,
|
|
1178
1178
|
/*create*/
|
|
1179
1179
|
!1
|
|
@@ -1191,7 +1191,7 @@ var jf;
|
|
|
1191
1191
|
while (v.has(C, Z));
|
|
1192
1192
|
return C[Z] = !0, Z;
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function Ae(Z, ee) {
|
|
1195
1195
|
if (!n.call(Z, N)) {
|
|
1196
1196
|
if (!ee)
|
|
1197
1197
|
return;
|
|
@@ -1250,10 +1250,10 @@ var jf;
|
|
|
1250
1250
|
* SOFTWARE.
|
|
1251
1251
|
*
|
|
1252
1252
|
*/
|
|
1253
|
-
const
|
|
1253
|
+
const mg = "[object ArrayBuffer]";
|
|
1254
1254
|
class W {
|
|
1255
1255
|
static isArrayBuffer(e) {
|
|
1256
|
-
return Object.prototype.toString.call(e) ===
|
|
1256
|
+
return Object.prototype.toString.call(e) === mg;
|
|
1257
1257
|
}
|
|
1258
1258
|
static toArrayBuffer(e) {
|
|
1259
1259
|
return this.isArrayBuffer(e) ? e : e.byteLength === e.buffer.byteLength || e.byteOffset === 0 && e.byteLength === e.buffer.byteLength ? e.buffer : this.toUint8Array(e.buffer).slice(e.byteOffset, e.byteOffset + e.byteLength).buffer;
|
|
@@ -1300,7 +1300,7 @@ class W {
|
|
|
1300
1300
|
return e[e.length - 1] instanceof Function ? this.toView(i, e[e.length - 1]) : i.buffer;
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
const Lc = "string",
|
|
1303
|
+
const Lc = "string", wg = /^[0-9a-f]+$/i, bg = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/, xg = /^[a-zA-Z0-9-_]+$/;
|
|
1304
1304
|
class Rf {
|
|
1305
1305
|
static fromString(e) {
|
|
1306
1306
|
const t = unescape(encodeURIComponent(e)), n = new Uint8Array(t.length);
|
|
@@ -1335,13 +1335,13 @@ class Yr {
|
|
|
1335
1335
|
}
|
|
1336
1336
|
class le {
|
|
1337
1337
|
static isHex(e) {
|
|
1338
|
-
return typeof e === Lc &&
|
|
1338
|
+
return typeof e === Lc && wg.test(e);
|
|
1339
1339
|
}
|
|
1340
1340
|
static isBase64(e) {
|
|
1341
|
-
return typeof e === Lc &&
|
|
1341
|
+
return typeof e === Lc && bg.test(e);
|
|
1342
1342
|
}
|
|
1343
1343
|
static isBase64Url(e) {
|
|
1344
|
-
return typeof e === Lc &&
|
|
1344
|
+
return typeof e === Lc && xg.test(e);
|
|
1345
1345
|
}
|
|
1346
1346
|
static ToString(e, t = "utf8") {
|
|
1347
1347
|
const n = W.toUint8Array(e);
|
|
@@ -1502,7 +1502,7 @@ class le {
|
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
1504
|
le.DEFAULT_UTF8_ENCODING = "utf8";
|
|
1505
|
-
function
|
|
1505
|
+
function Ag(...r) {
|
|
1506
1506
|
const e = r.map((i) => i.byteLength).reduce((i, s) => i + s), t = new Uint8Array(e);
|
|
1507
1507
|
let n = 0;
|
|
1508
1508
|
return r.map((i) => new Uint8Array(i)).forEach((i) => {
|
|
@@ -1578,7 +1578,7 @@ function Cd() {
|
|
|
1578
1578
|
s[c] = r[c];
|
|
1579
1579
|
return s[0] &= 127, Mi(s, 8) - n;
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function Sg(r) {
|
|
1582
1582
|
const e = r < 0 ? r * -1 : r;
|
|
1583
1583
|
let t = 128;
|
|
1584
1584
|
for (let n = 1; n < 8; n++) {
|
|
@@ -1601,7 +1601,7 @@ function Ag(r) {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
return new ArrayBuffer(0);
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function _g(r, e) {
|
|
1605
1605
|
if (r.byteLength !== e.byteLength)
|
|
1606
1606
|
return !1;
|
|
1607
1607
|
const t = new Uint8Array(r), n = new Uint8Array(e);
|
|
@@ -1683,7 +1683,7 @@ class Fa {
|
|
|
1683
1683
|
return Pu(this.items);
|
|
1684
1684
|
}
|
|
1685
1685
|
}
|
|
1686
|
-
const _s = [new Uint8Array([1])], Uf = "0123456789", Hc = "name", Df = "valueHexView",
|
|
1686
|
+
const _s = [new Uint8Array([1])], Uf = "0123456789", Hc = "name", Df = "valueHexView", Eg = "isHexOnly", Ig = "idBlock", kg = "tagClass", Cg = "tagNumber", Bg = "isConstructed", Og = "fromBER", Tg = "toBER", Ng = "local", yr = "", Kr = new ArrayBuffer(0), Ga = new Uint8Array(0), Us = "EndOfContent", Bd = "OCTET STRING", Od = "BIT STRING";
|
|
1687
1687
|
function fn(r) {
|
|
1688
1688
|
var e;
|
|
1689
1689
|
return e = class extends r {
|
|
@@ -1975,7 +1975,7 @@ class Jt extends Ei {
|
|
|
1975
1975
|
if (!(e instanceof this.constructor))
|
|
1976
1976
|
return !1;
|
|
1977
1977
|
const t = this.toBER(), n = e.toBER();
|
|
1978
|
-
return
|
|
1978
|
+
return _g(t, n);
|
|
1979
1979
|
}
|
|
1980
1980
|
}
|
|
1981
1981
|
Jt.NAME = "BaseBlock";
|
|
@@ -2019,7 +2019,7 @@ class fo extends Jt {
|
|
|
2019
2019
|
Rd = fo;
|
|
2020
2020
|
se.Primitive = Rd;
|
|
2021
2021
|
fo.NAME = "PRIMITIVE";
|
|
2022
|
-
function
|
|
2022
|
+
function Pg(r, e) {
|
|
2023
2023
|
if (r instanceof e)
|
|
2024
2024
|
return r;
|
|
2025
2025
|
const t = new e();
|
|
@@ -2176,7 +2176,7 @@ function ns(r, e = 0, t = r.length) {
|
|
|
2176
2176
|
default:
|
|
2177
2177
|
u = i.idBlock.isConstructed ? se.Constructed : se.Primitive;
|
|
2178
2178
|
}
|
|
2179
|
-
return i =
|
|
2179
|
+
return i = Pg(i, u), c = i.fromBER(r, e, i.lenBlock.isIndefiniteForm ? t : i.lenBlock.length), i.valueBeforeDecodeView = r.subarray(n, n + i.blockLength), {
|
|
2180
2180
|
offset: c,
|
|
2181
2181
|
result: i
|
|
2182
2182
|
};
|
|
@@ -2191,7 +2191,7 @@ function Ui(r) {
|
|
|
2191
2191
|
}
|
|
2192
2192
|
return ns(W.toUint8Array(r).slice(), 0, r.byteLength);
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2194
|
+
function jg(r, e) {
|
|
2195
2195
|
return r ? 1 : e;
|
|
2196
2196
|
}
|
|
2197
2197
|
class Vn extends fr {
|
|
@@ -2205,7 +2205,7 @@ class Vn extends fr {
|
|
|
2205
2205
|
if (this.valueBeforeDecodeView = i.subarray(t, t + n), this.valueBeforeDecodeView.length === 0)
|
|
2206
2206
|
return this.warnings.push("Zero buffer length"), t;
|
|
2207
2207
|
let s = t;
|
|
2208
|
-
for (;
|
|
2208
|
+
for (; jg(this.isIndefiniteForm, n) > 0; ) {
|
|
2209
2209
|
const o = ns(i, s, n);
|
|
2210
2210
|
if (o.offset === -1)
|
|
2211
2211
|
return this.error = o.result.error, this.warnings.concat(o.result.warnings), -1;
|
|
@@ -2523,7 +2523,7 @@ Kd = oi;
|
|
|
2523
2523
|
se.BitString = Kd;
|
|
2524
2524
|
oi.NAME = Od;
|
|
2525
2525
|
var qd;
|
|
2526
|
-
function
|
|
2526
|
+
function Rg(r, e) {
|
|
2527
2527
|
const t = new Uint8Array([0]), n = new Uint8Array(r), i = new Uint8Array(e);
|
|
2528
2528
|
let s = n.slice(0);
|
|
2529
2529
|
const o = s.length - 1, c = i.slice(0), u = c.length - 1;
|
|
@@ -2561,7 +2561,7 @@ function $f(r) {
|
|
|
2561
2561
|
}
|
|
2562
2562
|
return _s[r];
|
|
2563
2563
|
}
|
|
2564
|
-
function
|
|
2564
|
+
function Ug(r, e) {
|
|
2565
2565
|
let t = 0;
|
|
2566
2566
|
const n = new Uint8Array(r), i = new Uint8Array(e), s = n.slice(0), o = s.length - 1, c = i.slice(0), u = c.length - 1;
|
|
2567
2567
|
let h, v = 0;
|
|
@@ -2591,7 +2591,7 @@ class Uu extends fn(fr) {
|
|
|
2591
2591
|
this.valueHexView.length >= 4 ? (this.warnings.push("Too big Integer for decoding, hex only"), this.isHexOnly = !0, this._valueDec = 0) : (this.isHexOnly = !1, this.valueHexView.length > 0 && (this._valueDec = Cd.call(this)));
|
|
2592
2592
|
}
|
|
2593
2593
|
set valueDec(e) {
|
|
2594
|
-
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(
|
|
2594
|
+
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(Sg(e));
|
|
2595
2595
|
}
|
|
2596
2596
|
get valueDec() {
|
|
2597
2597
|
return this._valueDec;
|
|
@@ -2642,10 +2642,10 @@ class Uu extends fn(fr) {
|
|
|
2642
2642
|
if ((i & 1) === 1)
|
|
2643
2643
|
switch (n) {
|
|
2644
2644
|
case e:
|
|
2645
|
-
t =
|
|
2645
|
+
t = Ug($f(n), t), o = "-";
|
|
2646
2646
|
break;
|
|
2647
2647
|
default:
|
|
2648
|
-
t =
|
|
2648
|
+
t = Rg(t, $f(n));
|
|
2649
2649
|
}
|
|
2650
2650
|
n++, i >>= 1;
|
|
2651
2651
|
}
|
|
@@ -3463,7 +3463,7 @@ class zo extends ui {
|
|
|
3463
3463
|
super(n), this.value = e, this.local = t;
|
|
3464
3464
|
}
|
|
3465
3465
|
}
|
|
3466
|
-
class
|
|
3466
|
+
class Dg {
|
|
3467
3467
|
constructor({ data: e = Ga } = {}) {
|
|
3468
3468
|
this.dataView = W.toUint8Array(e);
|
|
3469
3469
|
}
|
|
@@ -3519,17 +3519,17 @@ function ri(r, e, t) {
|
|
|
3519
3519
|
verified: !1,
|
|
3520
3520
|
result: { error: "Wrong ASN.1 schema" }
|
|
3521
3521
|
};
|
|
3522
|
-
if (!(
|
|
3522
|
+
if (!(Ig in t))
|
|
3523
3523
|
return {
|
|
3524
3524
|
verified: !1,
|
|
3525
3525
|
result: { error: "Wrong ASN.1 schema" }
|
|
3526
3526
|
};
|
|
3527
|
-
if (!(
|
|
3527
|
+
if (!(Og in t.idBlock))
|
|
3528
3528
|
return {
|
|
3529
3529
|
verified: !1,
|
|
3530
3530
|
result: { error: "Wrong ASN.1 schema" }
|
|
3531
3531
|
};
|
|
3532
|
-
if (!(
|
|
3532
|
+
if (!(Tg in t.idBlock))
|
|
3533
3533
|
return {
|
|
3534
3534
|
verified: !1,
|
|
3535
3535
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3545,7 +3545,7 @@ function ri(r, e, t) {
|
|
|
3545
3545
|
verified: !1,
|
|
3546
3546
|
result: { error: "Error decoding idBlock for ASN.1 schema" }
|
|
3547
3547
|
};
|
|
3548
|
-
if (t.idBlock.hasOwnProperty(
|
|
3548
|
+
if (t.idBlock.hasOwnProperty(kg) === !1)
|
|
3549
3549
|
return {
|
|
3550
3550
|
verified: !1,
|
|
3551
3551
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3555,7 +3555,7 @@ function ri(r, e, t) {
|
|
|
3555
3555
|
verified: !1,
|
|
3556
3556
|
result: r
|
|
3557
3557
|
};
|
|
3558
|
-
if (t.idBlock.hasOwnProperty(
|
|
3558
|
+
if (t.idBlock.hasOwnProperty(Cg) === !1)
|
|
3559
3559
|
return {
|
|
3560
3560
|
verified: !1,
|
|
3561
3561
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3565,7 +3565,7 @@ function ri(r, e, t) {
|
|
|
3565
3565
|
verified: !1,
|
|
3566
3566
|
result: r
|
|
3567
3567
|
};
|
|
3568
|
-
if (t.idBlock.hasOwnProperty(
|
|
3568
|
+
if (t.idBlock.hasOwnProperty(Bg) === !1)
|
|
3569
3569
|
return {
|
|
3570
3570
|
verified: !1,
|
|
3571
3571
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3575,7 +3575,7 @@ function ri(r, e, t) {
|
|
|
3575
3575
|
verified: !1,
|
|
3576
3576
|
result: r
|
|
3577
3577
|
};
|
|
3578
|
-
if (!(
|
|
3578
|
+
if (!(Eg in t.idBlock))
|
|
3579
3579
|
return {
|
|
3580
3580
|
verified: !1,
|
|
3581
3581
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3645,7 +3645,7 @@ function ri(r, e, t) {
|
|
|
3645
3645
|
return t.name && (t.name = t.name.replace(/^\s+|\s+$/g, yr), t.name && delete r[t.name]), o;
|
|
3646
3646
|
if (Hc in t.valueBlock.value[0] && t.valueBlock.value[0].name.length > 0) {
|
|
3647
3647
|
let h = {};
|
|
3648
|
-
|
|
3648
|
+
Ng in t.valueBlock.value[0] && t.valueBlock.value[0].local ? h = e : h = r, typeof h[t.valueBlock.value[0].name] > "u" && (h[t.valueBlock.value[0].name] = []), h[t.valueBlock.value[0].name].push(e.valueBlock.value[u]);
|
|
3649
3649
|
}
|
|
3650
3650
|
} else if (o = ri(r, e.valueBlock.value[u - s], t.valueBlock.value[u]), o.verified === !1)
|
|
3651
3651
|
if (t.valueBlock.value[u].optional)
|
|
@@ -3680,7 +3680,7 @@ function ri(r, e, t) {
|
|
|
3680
3680
|
result: r
|
|
3681
3681
|
};
|
|
3682
3682
|
}
|
|
3683
|
-
function
|
|
3683
|
+
function $g(r, e) {
|
|
3684
3684
|
if (!(e instanceof Object))
|
|
3685
3685
|
return {
|
|
3686
3686
|
verified: !1,
|
|
@@ -3720,7 +3720,7 @@ const Ip = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3720
3720
|
OctetString: si,
|
|
3721
3721
|
Primitive: fo,
|
|
3722
3722
|
PrintableString: Ja,
|
|
3723
|
-
RawData:
|
|
3723
|
+
RawData: Dg,
|
|
3724
3724
|
RelativeObjectIdentifier: Du,
|
|
3725
3725
|
Repeated: zo,
|
|
3726
3726
|
Sequence: mn,
|
|
@@ -3737,7 +3737,7 @@ const Ip = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3737
3737
|
VisibleString: ho,
|
|
3738
3738
|
compareSchema: ri,
|
|
3739
3739
|
fromBER: Ui,
|
|
3740
|
-
verifySchema:
|
|
3740
|
+
verifySchema: $g
|
|
3741
3741
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3742
3742
|
var M;
|
|
3743
3743
|
(function(r) {
|
|
@@ -3809,7 +3809,7 @@ class st {
|
|
|
3809
3809
|
return new si({ name: e });
|
|
3810
3810
|
}
|
|
3811
3811
|
}
|
|
3812
|
-
const
|
|
3812
|
+
const Mg = {
|
|
3813
3813
|
fromASN: (r) => r instanceof li ? null : r.valueBeforeDecodeView,
|
|
3814
3814
|
toASN: (r) => {
|
|
3815
3815
|
if (r === null)
|
|
@@ -3819,28 +3819,28 @@ const $g = {
|
|
|
3819
3819
|
throw new Error(e.result.error);
|
|
3820
3820
|
return e.result;
|
|
3821
3821
|
}
|
|
3822
|
-
},
|
|
3822
|
+
}, Vg = {
|
|
3823
3823
|
fromASN: (r) => r.valueBlock.valueHexView.byteLength >= 4 ? r.valueBlock.toString() : r.valueBlock.valueDec,
|
|
3824
3824
|
toASN: (r) => new nn({ value: +r })
|
|
3825
|
-
},
|
|
3825
|
+
}, Lg = {
|
|
3826
3826
|
fromASN: (r) => r.valueBlock.valueDec,
|
|
3827
3827
|
toASN: (r) => new Ka({ value: r })
|
|
3828
3828
|
}, St = {
|
|
3829
3829
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3830
3830
|
toASN: (r) => new nn({ valueHex: r })
|
|
3831
|
-
},
|
|
3831
|
+
}, Hg = {
|
|
3832
3832
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3833
3833
|
toASN: (r) => new oi({ valueHex: r })
|
|
3834
|
-
},
|
|
3834
|
+
}, Fg = {
|
|
3835
3835
|
fromASN: (r) => r.valueBlock.toString(),
|
|
3836
3836
|
toASN: (r) => new qa({ value: r })
|
|
3837
|
-
},
|
|
3837
|
+
}, Gg = {
|
|
3838
3838
|
fromASN: (r) => r.valueBlock.value,
|
|
3839
3839
|
toASN: (r) => new za({ value: r })
|
|
3840
3840
|
}, Ko = {
|
|
3841
3841
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3842
3842
|
toASN: (r) => new si({ valueHex: r })
|
|
3843
|
-
},
|
|
3843
|
+
}, zg = {
|
|
3844
3844
|
fromASN: (r) => new st(r.getValue()),
|
|
3845
3845
|
toASN: (r) => r.toASN()
|
|
3846
3846
|
};
|
|
@@ -3850,62 +3850,62 @@ function Nr(r) {
|
|
|
3850
3850
|
toASN: (e) => new r({ value: e })
|
|
3851
3851
|
};
|
|
3852
3852
|
}
|
|
3853
|
-
const kp = Nr(kn),
|
|
3853
|
+
const kp = Nr(kn), Kg = Nr(Za), qg = Nr(Wa), Zg = Nr(Ya), Wg = Nr(Ja), Yg = Nr(Xa), Jg = Nr(Qa), Xg = Nr(ec), Qg = Nr(tc), ev = Nr(ho), tv = Nr(rc), rv = Nr(nc), nv = {
|
|
3854
3854
|
fromASN: (r) => r.toDate(),
|
|
3855
3855
|
toASN: (r) => new po({ valueDate: r })
|
|
3856
|
-
},
|
|
3856
|
+
}, iv = {
|
|
3857
3857
|
fromASN: (r) => r.toDate(),
|
|
3858
3858
|
toASN: (r) => new ic({ valueDate: r })
|
|
3859
|
-
},
|
|
3859
|
+
}, sv = {
|
|
3860
3860
|
fromASN: () => null,
|
|
3861
3861
|
toASN: () => new li()
|
|
3862
3862
|
};
|
|
3863
3863
|
function Gu(r) {
|
|
3864
3864
|
switch (r) {
|
|
3865
3865
|
case x.Any:
|
|
3866
|
-
return
|
|
3866
|
+
return Mg;
|
|
3867
3867
|
case x.BitString:
|
|
3868
|
-
return
|
|
3868
|
+
return Hg;
|
|
3869
3869
|
case x.BmpString:
|
|
3870
|
-
return
|
|
3870
|
+
return Kg;
|
|
3871
3871
|
case x.Boolean:
|
|
3872
|
-
return
|
|
3872
|
+
return Gg;
|
|
3873
3873
|
case x.CharacterString:
|
|
3874
|
-
return
|
|
3874
|
+
return rv;
|
|
3875
3875
|
case x.Enumerated:
|
|
3876
|
-
return
|
|
3876
|
+
return Lg;
|
|
3877
3877
|
case x.GeneralString:
|
|
3878
|
-
return
|
|
3878
|
+
return tv;
|
|
3879
3879
|
case x.GeneralizedTime:
|
|
3880
|
-
return
|
|
3880
|
+
return iv;
|
|
3881
3881
|
case x.GraphicString:
|
|
3882
|
-
return
|
|
3882
|
+
return Qg;
|
|
3883
3883
|
case x.IA5String:
|
|
3884
|
-
return
|
|
3884
|
+
return Xg;
|
|
3885
3885
|
case x.Integer:
|
|
3886
|
-
return
|
|
3886
|
+
return Vg;
|
|
3887
3887
|
case x.Null:
|
|
3888
|
-
return
|
|
3888
|
+
return sv;
|
|
3889
3889
|
case x.NumericString:
|
|
3890
|
-
return
|
|
3890
|
+
return Zg;
|
|
3891
3891
|
case x.ObjectIdentifier:
|
|
3892
|
-
return
|
|
3892
|
+
return Fg;
|
|
3893
3893
|
case x.OctetString:
|
|
3894
3894
|
return Ko;
|
|
3895
3895
|
case x.PrintableString:
|
|
3896
|
-
return Zg;
|
|
3897
|
-
case x.TeletexString:
|
|
3898
3896
|
return Wg;
|
|
3897
|
+
case x.TeletexString:
|
|
3898
|
+
return Yg;
|
|
3899
3899
|
case x.UTCTime:
|
|
3900
|
-
return
|
|
3900
|
+
return nv;
|
|
3901
3901
|
case x.UniversalString:
|
|
3902
|
-
return
|
|
3902
|
+
return qg;
|
|
3903
3903
|
case x.Utf8String:
|
|
3904
3904
|
return kp;
|
|
3905
3905
|
case x.VideotexString:
|
|
3906
|
-
return
|
|
3906
|
+
return Jg;
|
|
3907
3907
|
case x.VisibleString:
|
|
3908
|
-
return
|
|
3908
|
+
return ev;
|
|
3909
3909
|
default:
|
|
3910
3910
|
return null;
|
|
3911
3911
|
}
|
|
@@ -3921,7 +3921,7 @@ function Cp(r) {
|
|
|
3921
3921
|
}
|
|
3922
3922
|
return !1;
|
|
3923
3923
|
}
|
|
3924
|
-
function
|
|
3924
|
+
function ov(r, e) {
|
|
3925
3925
|
if (!(r && e) || r.byteLength !== e.byteLength)
|
|
3926
3926
|
return !1;
|
|
3927
3927
|
const t = new Uint8Array(r), n = new Uint8Array(e);
|
|
@@ -3930,7 +3930,7 @@ function sv(r, e) {
|
|
|
3930
3930
|
return !1;
|
|
3931
3931
|
return !0;
|
|
3932
3932
|
}
|
|
3933
|
-
class
|
|
3933
|
+
class av {
|
|
3934
3934
|
constructor() {
|
|
3935
3935
|
this.items = /* @__PURE__ */ new WeakMap();
|
|
3936
3936
|
}
|
|
@@ -4038,7 +4038,7 @@ class ov {
|
|
|
4038
4038
|
return t ? this.items.get(t) || this.findParentSchema(t) : null;
|
|
4039
4039
|
}
|
|
4040
4040
|
}
|
|
4041
|
-
const Or = new
|
|
4041
|
+
const Or = new av(), F = (r) => (e) => {
|
|
4042
4042
|
let t;
|
|
4043
4043
|
Or.has(e) ? t = Or.get(e) : (t = Or.createDefault(e), Or.set(e, t)), Object.assign(t, r);
|
|
4044
4044
|
}, y = (r) => (e, t) => {
|
|
@@ -4058,7 +4058,7 @@ class Mf extends Error {
|
|
|
4058
4058
|
super(...arguments), this.schemas = [];
|
|
4059
4059
|
}
|
|
4060
4060
|
}
|
|
4061
|
-
class
|
|
4061
|
+
class cv {
|
|
4062
4062
|
static parse(e, t) {
|
|
4063
4063
|
const n = Ui(e);
|
|
4064
4064
|
if (n.result.error)
|
|
@@ -4176,7 +4176,7 @@ class zu {
|
|
|
4176
4176
|
} else
|
|
4177
4177
|
for (const o in n.items) {
|
|
4178
4178
|
const c = n.items[o], u = e[o];
|
|
4179
|
-
if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" &&
|
|
4179
|
+
if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" && ov(this.serialize(c.defaultValue), this.serialize(u)))
|
|
4180
4180
|
continue;
|
|
4181
4181
|
const h = zu.toAsnItem(c, o, t, u);
|
|
4182
4182
|
if (typeof c.context == "number")
|
|
@@ -4270,7 +4270,7 @@ class q {
|
|
|
4270
4270
|
return zu.serialize(e);
|
|
4271
4271
|
}
|
|
4272
4272
|
static parse(e, t) {
|
|
4273
|
-
return
|
|
4273
|
+
return cv.parse(e, t);
|
|
4274
4274
|
}
|
|
4275
4275
|
static toString(e) {
|
|
4276
4276
|
const t = W.isBufferSource(e) ? W.toArrayBuffer(e) : q.serialize(e), n = Ui(t);
|
|
@@ -4881,7 +4881,7 @@ let Ht = hl = class extends dl {
|
|
|
4881
4881
|
Ht = hl = f([
|
|
4882
4882
|
F({ type: M.Sequence })
|
|
4883
4883
|
], Ht);
|
|
4884
|
-
const
|
|
4884
|
+
const lv = {
|
|
4885
4885
|
fromASN: (r) => Lf.toString(Ko.fromASN(r)),
|
|
4886
4886
|
toASN: (r) => Ko.toASN(Lf.fromString(r))
|
|
4887
4887
|
};
|
|
@@ -4934,7 +4934,7 @@ f([
|
|
|
4934
4934
|
y({ type: x.IA5String, context: 6, implicit: !0 })
|
|
4935
4935
|
], Le.prototype, "uniformResourceIdentifier", void 0);
|
|
4936
4936
|
f([
|
|
4937
|
-
y({ type: x.OctetString, context: 7, implicit: !0, converter:
|
|
4937
|
+
y({ type: x.OctetString, context: 7, implicit: !0, converter: lv })
|
|
4938
4938
|
], Le.prototype, "iPAddress", void 0);
|
|
4939
4939
|
f([
|
|
4940
4940
|
y({ type: x.ObjectIdentifier, context: 8, implicit: !0 })
|
|
@@ -4942,9 +4942,9 @@ f([
|
|
|
4942
4942
|
Le = f([
|
|
4943
4943
|
F({ type: M.Choice })
|
|
4944
4944
|
], Le);
|
|
4945
|
-
const qu = "1.3.6.1.5.5.7",
|
|
4945
|
+
const qu = "1.3.6.1.5.5.7", uv = `${qu}.1`, is = `${qu}.3`, ac = `${qu}.48`, Hf = `${ac}.1`, Ff = `${ac}.2`, Gf = `${ac}.3`, zf = `${ac}.5`, Yn = "2.5.29";
|
|
4946
4946
|
var pl;
|
|
4947
|
-
const yl = `${
|
|
4947
|
+
const yl = `${uv}.1`;
|
|
4948
4948
|
class yo {
|
|
4949
4949
|
constructor(e = {}) {
|
|
4950
4950
|
this.accessMethod = "", this.accessLocation = new Le(), Object.assign(this, e);
|
|
@@ -5239,7 +5239,7 @@ let Xo = Sl = class extends vt {
|
|
|
5239
5239
|
Xo = Sl = f([
|
|
5240
5240
|
F({ type: M.Sequence, itemType: x.ObjectIdentifier })
|
|
5241
5241
|
], Xo);
|
|
5242
|
-
const
|
|
5242
|
+
const fv = `${is}.1`, hv = `${is}.2`, dv = `${is}.3`, pv = `${is}.4`, yv = `${is}.8`, gv = `${is}.9`;
|
|
5243
5243
|
let _l = class {
|
|
5244
5244
|
constructor(e = new ArrayBuffer(0)) {
|
|
5245
5245
|
this.value = e;
|
|
@@ -6160,7 +6160,7 @@ f([
|
|
|
6160
6160
|
y({ type: st, context: 0, implicit: !0, optional: !0 })
|
|
6161
6161
|
], Vs.prototype, "value", void 0);
|
|
6162
6162
|
f([
|
|
6163
|
-
y({ type: st, converter:
|
|
6163
|
+
y({ type: st, converter: zg, context: 0, implicit: !0, optional: !0, repeated: "sequence" })
|
|
6164
6164
|
], Vs.prototype, "constructedValue", void 0);
|
|
6165
6165
|
Vs = f([
|
|
6166
6166
|
F({ type: M.Choice })
|
|
@@ -6479,7 +6479,7 @@ f([
|
|
|
6479
6479
|
f([
|
|
6480
6480
|
y({ type: Zl, context: 1, implicit: !0, optional: !0 })
|
|
6481
6481
|
], Ao.prototype, "unprotectedAttrs", void 0);
|
|
6482
|
-
const
|
|
6482
|
+
const vv = "1.2.840.113549.1.7.1", Wl = "1.2.840.113549.1.7.2";
|
|
6483
6483
|
var Yl;
|
|
6484
6484
|
let la = Yl = class extends vt {
|
|
6485
6485
|
constructor(e) {
|
|
@@ -6516,9 +6516,9 @@ const Ls = "1.2.840.10045.2.1", hf = "1.2.840.10045.4.1", Fp = "1.2.840.10045.4.
|
|
|
6516
6516
|
function So(r) {
|
|
6517
6517
|
return new ne({ algorithm: r });
|
|
6518
6518
|
}
|
|
6519
|
-
const
|
|
6519
|
+
const mv = So(hf);
|
|
6520
6520
|
So(Fp);
|
|
6521
|
-
const
|
|
6521
|
+
const wv = So(df), bv = So(pf), xv = So(yf);
|
|
6522
6522
|
let Hs = class {
|
|
6523
6523
|
constructor(e = {}) {
|
|
6524
6524
|
Object.assign(this, e);
|
|
@@ -6533,7 +6533,7 @@ f([
|
|
|
6533
6533
|
Hs = f([
|
|
6534
6534
|
F({ type: M.Sequence })
|
|
6535
6535
|
], Hs);
|
|
6536
|
-
class
|
|
6536
|
+
class Av extends st {
|
|
6537
6537
|
}
|
|
6538
6538
|
let Wi = class {
|
|
6539
6539
|
constructor(e = {}) {
|
|
@@ -6571,7 +6571,7 @@ f([
|
|
|
6571
6571
|
y({ type: Wi })
|
|
6572
6572
|
], _n.prototype, "curve", void 0);
|
|
6573
6573
|
f([
|
|
6574
|
-
y({ type:
|
|
6574
|
+
y({ type: Av })
|
|
6575
6575
|
], _n.prototype, "base", void 0);
|
|
6576
6576
|
f([
|
|
6577
6577
|
y({ type: x.Integer, converter: St })
|
|
@@ -6627,29 +6627,29 @@ f([
|
|
|
6627
6627
|
f([
|
|
6628
6628
|
y({ type: x.Integer, converter: St })
|
|
6629
6629
|
], ua.prototype, "s", void 0);
|
|
6630
|
-
const wr = "1.2.840.113549.1.1", gi = `${wr}.1`,
|
|
6630
|
+
const wr = "1.2.840.113549.1.1", gi = `${wr}.1`, Sv = `${wr}.7`, _v = `${wr}.9`, Ps = `${wr}.10`, Ev = `${wr}.2`, Iv = `${wr}.4`, fa = `${wr}.5`, kv = `${wr}.14`, Xl = `${wr}.11`, ha = `${wr}.12`, da = `${wr}.13`, Gp = `${wr}.15`, zp = `${wr}.16`, pa = "1.3.14.3.2.26", Kp = "2.16.840.1.101.3.4.2.4", ya = "2.16.840.1.101.3.4.2.1", ga = "2.16.840.1.101.3.4.2.2", va = "2.16.840.1.101.3.4.2.3", Cv = "2.16.840.1.101.3.4.2.5", Bv = "2.16.840.1.101.3.4.2.6", Ov = "1.2.840.113549.2.2", Tv = "1.2.840.113549.2.5", Sc = `${wr}.8`;
|
|
6631
6631
|
function Ft(r) {
|
|
6632
6632
|
return new ne({ algorithm: r, parameters: null });
|
|
6633
6633
|
}
|
|
6634
|
-
Ft(Bv);
|
|
6635
6634
|
Ft(Ov);
|
|
6635
|
+
Ft(Tv);
|
|
6636
6636
|
const vi = Ft(pa);
|
|
6637
6637
|
Ft(Kp);
|
|
6638
6638
|
Ft(ya);
|
|
6639
6639
|
Ft(ga);
|
|
6640
6640
|
Ft(va);
|
|
6641
|
-
Ft(kv);
|
|
6642
6641
|
Ft(Cv);
|
|
6642
|
+
Ft(Bv);
|
|
6643
6643
|
const qp = new ne({
|
|
6644
6644
|
algorithm: Sc,
|
|
6645
6645
|
parameters: q.serialize(vi)
|
|
6646
6646
|
}), Zp = new ne({
|
|
6647
|
-
algorithm:
|
|
6647
|
+
algorithm: _v,
|
|
6648
6648
|
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))
|
|
6649
6649
|
});
|
|
6650
6650
|
Ft(gi);
|
|
6651
|
-
Ft(_v);
|
|
6652
6651
|
Ft(Ev);
|
|
6652
|
+
Ft(Iv);
|
|
6653
6653
|
Ft(fa);
|
|
6654
6654
|
Ft(Gp);
|
|
6655
6655
|
Ft(zp);
|
|
@@ -6675,7 +6675,7 @@ f([
|
|
|
6675
6675
|
y({ type: ne, context: 2, defaultValue: Zp })
|
|
6676
6676
|
], _c.prototype, "pSourceAlgorithm", void 0);
|
|
6677
6677
|
new ne({
|
|
6678
|
-
algorithm:
|
|
6678
|
+
algorithm: Sv,
|
|
6679
6679
|
parameters: q.serialize(new _c())
|
|
6680
6680
|
});
|
|
6681
6681
|
class mi {
|
|
@@ -6815,7 +6815,7 @@ function vf(r, e) {
|
|
|
6815
6815
|
}
|
|
6816
6816
|
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
6817
6817
|
}
|
|
6818
|
-
function
|
|
6818
|
+
function Nv(r, e, t, n) {
|
|
6819
6819
|
function i(s) {
|
|
6820
6820
|
return s instanceof t ? s : new t(function(o) {
|
|
6821
6821
|
o(s);
|
|
@@ -6842,7 +6842,7 @@ function Tv(r, e, t, n) {
|
|
|
6842
6842
|
h((n = n.apply(r, [])).next());
|
|
6843
6843
|
});
|
|
6844
6844
|
}
|
|
6845
|
-
function
|
|
6845
|
+
function Pv(r, e) {
|
|
6846
6846
|
var t = { label: 0, sent: function() {
|
|
6847
6847
|
if (s[0] & 1) throw s[1];
|
|
6848
6848
|
return s[1];
|
|
@@ -6934,9 +6934,9 @@ function ti() {
|
|
|
6934
6934
|
r = r.concat(ma(arguments[e]));
|
|
6935
6935
|
return r;
|
|
6936
6936
|
}
|
|
6937
|
-
var
|
|
6938
|
-
function
|
|
6939
|
-
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(
|
|
6937
|
+
var jv = "injectionTokens";
|
|
6938
|
+
function Rv(r) {
|
|
6939
|
+
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(jv, r) || {};
|
|
6940
6940
|
return Object.keys(t).forEach(function(n) {
|
|
6941
6941
|
e[+n] = t[n];
|
|
6942
6942
|
}), e;
|
|
@@ -6984,13 +6984,13 @@ var Yp = function() {
|
|
|
6984
6984
|
function Ni(r) {
|
|
6985
6985
|
return typeof r == "string" || typeof r == "symbol";
|
|
6986
6986
|
}
|
|
6987
|
-
function
|
|
6987
|
+
function Uv(r) {
|
|
6988
6988
|
return typeof r == "object" && "token" in r && "multiple" in r;
|
|
6989
6989
|
}
|
|
6990
6990
|
function oh(r) {
|
|
6991
6991
|
return typeof r == "object" && "token" in r && "transform" in r;
|
|
6992
6992
|
}
|
|
6993
|
-
function
|
|
6993
|
+
function Dv(r) {
|
|
6994
6994
|
return typeof r == "function" || r instanceof Yp;
|
|
6995
6995
|
}
|
|
6996
6996
|
function $o(r) {
|
|
@@ -6999,7 +6999,7 @@ function $o(r) {
|
|
|
6999
6999
|
function Mo(r) {
|
|
7000
7000
|
return r.useValue != null;
|
|
7001
7001
|
}
|
|
7002
|
-
function
|
|
7002
|
+
function $v(r) {
|
|
7003
7003
|
return Wp(r) || Mo(r) || $o(r) || nu(r);
|
|
7004
7004
|
}
|
|
7005
7005
|
var mf = function() {
|
|
@@ -7025,7 +7025,7 @@ var mf = function() {
|
|
|
7025
7025
|
}, r.prototype.ensure = function(e) {
|
|
7026
7026
|
this._registryMap.has(e) || this._registryMap.set(e, []);
|
|
7027
7027
|
}, r;
|
|
7028
|
-
}(),
|
|
7028
|
+
}(), Mv = function(r) {
|
|
7029
7029
|
vf(e, r);
|
|
7030
7030
|
function e() {
|
|
7031
7031
|
return r !== null && r.apply(this, arguments) || this;
|
|
@@ -7037,54 +7037,54 @@ var mf = function() {
|
|
|
7037
7037
|
}
|
|
7038
7038
|
return r;
|
|
7039
7039
|
}();
|
|
7040
|
-
function
|
|
7040
|
+
function Vv(r, e) {
|
|
7041
7041
|
if (r === null)
|
|
7042
7042
|
return "at position #" + e;
|
|
7043
7043
|
var t = r.split(",")[e].trim();
|
|
7044
7044
|
return '"' + t + '" at position #' + e;
|
|
7045
7045
|
}
|
|
7046
|
-
function
|
|
7046
|
+
function Lv(r, e, t) {
|
|
7047
7047
|
return t === void 0 && (t = " "), ti([r], e.message.split(`
|
|
7048
7048
|
`).map(function(n) {
|
|
7049
7049
|
return t + n;
|
|
7050
7050
|
})).join(`
|
|
7051
7051
|
`);
|
|
7052
7052
|
}
|
|
7053
|
-
function
|
|
7054
|
-
var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o =
|
|
7055
|
-
return
|
|
7053
|
+
function Hv(r, e, t) {
|
|
7054
|
+
var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o = Vv(s, e);
|
|
7055
|
+
return Lv("Cannot inject the dependency " + o + ' of "' + r.name + '" constructor. Reason:', t);
|
|
7056
7056
|
}
|
|
7057
|
-
function
|
|
7057
|
+
function Fv(r) {
|
|
7058
7058
|
if (typeof r.dispose != "function")
|
|
7059
7059
|
return !1;
|
|
7060
7060
|
var e = r.dispose;
|
|
7061
7061
|
return !(e.length > 0);
|
|
7062
7062
|
}
|
|
7063
|
-
var
|
|
7063
|
+
var Gv = function(r) {
|
|
7064
7064
|
vf(e, r);
|
|
7065
7065
|
function e() {
|
|
7066
7066
|
return r !== null && r.apply(this, arguments) || this;
|
|
7067
7067
|
}
|
|
7068
7068
|
return e;
|
|
7069
|
-
}(mf),
|
|
7069
|
+
}(mf), zv = function(r) {
|
|
7070
7070
|
vf(e, r);
|
|
7071
7071
|
function e() {
|
|
7072
7072
|
return r !== null && r.apply(this, arguments) || this;
|
|
7073
7073
|
}
|
|
7074
7074
|
return e;
|
|
7075
|
-
}(mf),
|
|
7075
|
+
}(mf), Kv = /* @__PURE__ */ function() {
|
|
7076
7076
|
function r() {
|
|
7077
|
-
this.preResolution = new
|
|
7077
|
+
this.preResolution = new Gv(), this.postResolution = new zv();
|
|
7078
7078
|
}
|
|
7079
7079
|
return r;
|
|
7080
|
-
}(), Jp = /* @__PURE__ */ new Map(),
|
|
7080
|
+
}(), Jp = /* @__PURE__ */ new Map(), qv = function() {
|
|
7081
7081
|
function r(e) {
|
|
7082
|
-
this.parent = e, this._registry = new
|
|
7082
|
+
this.parent = e, this._registry = new Mv(), this.interceptors = new Kv(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
7083
7083
|
}
|
|
7084
7084
|
return r.prototype.register = function(e, t, n) {
|
|
7085
7085
|
n === void 0 && (n = { lifecycle: dr.Transient }), this.ensureNotDisposed();
|
|
7086
7086
|
var i;
|
|
7087
|
-
if (
|
|
7087
|
+
if ($v(t) ? i = t : i = { useClass: t }, $o(i))
|
|
7088
7088
|
for (var s = [e], o = i; o != null; ) {
|
|
7089
7089
|
var c = o.useToken;
|
|
7090
7090
|
if (s.includes(c))
|
|
@@ -7131,7 +7131,7 @@ var Fv = function(r) {
|
|
|
7131
7131
|
var i = this.resolveRegistration(n, t);
|
|
7132
7132
|
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
7133
7133
|
}
|
|
7134
|
-
if (
|
|
7134
|
+
if (Dv(e)) {
|
|
7135
7135
|
var i = this.construct(e, t);
|
|
7136
7136
|
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
7137
7137
|
}
|
|
@@ -7258,9 +7258,9 @@ var Fv = function(r) {
|
|
|
7258
7258
|
options: n
|
|
7259
7259
|
});
|
|
7260
7260
|
}, r.prototype.dispose = function() {
|
|
7261
|
-
return
|
|
7261
|
+
return Nv(this, void 0, void 0, function() {
|
|
7262
7262
|
var e;
|
|
7263
|
-
return
|
|
7263
|
+
return Pv(this, function(t) {
|
|
7264
7264
|
switch (t.label) {
|
|
7265
7265
|
case 0:
|
|
7266
7266
|
return this.disposed = !0, e = [], this.disposables.forEach(function(n) {
|
|
@@ -7292,25 +7292,25 @@ var Fv = function(r) {
|
|
|
7292
7292
|
var o = s.map(n.resolveParams(t, e));
|
|
7293
7293
|
return new (e.bind.apply(e, ti([void 0], o)))();
|
|
7294
7294
|
}();
|
|
7295
|
-
return
|
|
7295
|
+
return Fv(i) && this.disposables.add(i), i;
|
|
7296
7296
|
}, r.prototype.resolveParams = function(e, t) {
|
|
7297
7297
|
var n = this;
|
|
7298
7298
|
return function(i, s) {
|
|
7299
7299
|
var o, c, u;
|
|
7300
7300
|
try {
|
|
7301
|
-
return
|
|
7301
|
+
return Uv(i) ? oh(i) ? i.multiple ? (o = n.resolve(i.transform)).transform.apply(o, ti([n.resolveAll(i.token)], i.transformArgs)) : (c = n.resolve(i.transform)).transform.apply(c, ti([n.resolve(i.token, e)], i.transformArgs)) : i.multiple ? n.resolveAll(i.token) : n.resolve(i.token, e) : oh(i) ? (u = n.resolve(i.transform, e)).transform.apply(u, ti([n.resolve(i.token, e)], i.transformArgs)) : n.resolve(i, e);
|
|
7302
7302
|
} catch (h) {
|
|
7303
|
-
throw new Error(
|
|
7303
|
+
throw new Error(Hv(t, s, h));
|
|
7304
7304
|
}
|
|
7305
7305
|
};
|
|
7306
7306
|
}, r.prototype.ensureNotDisposed = function() {
|
|
7307
7307
|
if (this.disposed)
|
|
7308
7308
|
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
7309
7309
|
}, r;
|
|
7310
|
-
}(), lr = new
|
|
7310
|
+
}(), lr = new qv();
|
|
7311
7311
|
function kc() {
|
|
7312
7312
|
return function(r) {
|
|
7313
|
-
Jp.set(r,
|
|
7313
|
+
Jp.set(r, Rv(r));
|
|
7314
7314
|
};
|
|
7315
7315
|
}
|
|
7316
7316
|
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
@@ -7742,7 +7742,7 @@ f([
|
|
|
7742
7742
|
*
|
|
7743
7743
|
*/
|
|
7744
7744
|
const Io = "crypto.algorithm";
|
|
7745
|
-
class
|
|
7745
|
+
class Zv {
|
|
7746
7746
|
getAlgorithms() {
|
|
7747
7747
|
return lr.resolveAll(Io);
|
|
7748
7748
|
}
|
|
@@ -7778,7 +7778,7 @@ class qv {
|
|
|
7778
7778
|
}
|
|
7779
7779
|
}
|
|
7780
7780
|
const Yi = "crypto.algorithmProvider";
|
|
7781
|
-
lr.registerSingleton(Yi,
|
|
7781
|
+
lr.registerSingleton(Yi, Zv);
|
|
7782
7782
|
var Vo;
|
|
7783
7783
|
const br = "1.3.36.3.3.2.8.1.1", Ih = `${br}.1`, kh = `${br}.2`, Ch = `${br}.3`, Bh = `${br}.4`, Oh = `${br}.5`, Th = `${br}.6`, Nh = `${br}.7`, Ph = `${br}.8`, jh = `${br}.9`, Rh = `${br}.10`, Uh = `${br}.11`, Dh = `${br}.12`, $h = `${br}.13`, Mh = `${br}.14`, Vh = "brainpoolP160r1", Lh = "brainpoolP160t1", Hh = "brainpoolP192r1", Fh = "brainpoolP192t1", Gh = "brainpoolP224r1", zh = "brainpoolP224t1", Kh = "brainpoolP256r1", qh = "brainpoolP256t1", Zh = "brainpoolP320r1", Wh = "brainpoolP320t1", Yh = "brainpoolP384r1", Jh = "brainpoolP384t1", Xh = "brainpoolP512r1", Qh = "brainpoolP512t1", Ct = "ECDSA";
|
|
7784
7784
|
let Gs = Vo = class {
|
|
@@ -7788,13 +7788,13 @@ let Gs = Vo = class {
|
|
|
7788
7788
|
if ("hash" in e)
|
|
7789
7789
|
switch ((typeof e.hash == "string" ? e.hash : e.hash.name).toLowerCase()) {
|
|
7790
7790
|
case "sha-1":
|
|
7791
|
-
return vv;
|
|
7792
|
-
case "sha-256":
|
|
7793
7791
|
return mv;
|
|
7794
|
-
case "sha-
|
|
7792
|
+
case "sha-256":
|
|
7795
7793
|
return wv;
|
|
7796
|
-
case "sha-
|
|
7794
|
+
case "sha-384":
|
|
7797
7795
|
return bv;
|
|
7796
|
+
case "sha-512":
|
|
7797
|
+
return xv;
|
|
7798
7798
|
}
|
|
7799
7799
|
else if ("namedCurve" in e) {
|
|
7800
7800
|
let t = "";
|
|
@@ -7934,7 +7934,7 @@ class it {
|
|
|
7934
7934
|
}
|
|
7935
7935
|
it.NAME = s0;
|
|
7936
7936
|
it.VALUE = o0;
|
|
7937
|
-
class
|
|
7937
|
+
class Wv {
|
|
7938
7938
|
static toTextObject(e) {
|
|
7939
7939
|
const t = new it("Algorithm Identifier", {}, Bn.toString(e.algorithm));
|
|
7940
7940
|
if (e.parameters)
|
|
@@ -7964,7 +7964,7 @@ Bn.items = {
|
|
|
7964
7964
|
[va]: "sha512",
|
|
7965
7965
|
[gi]: "rsaEncryption",
|
|
7966
7966
|
[fa]: "sha1WithRSAEncryption",
|
|
7967
|
-
[
|
|
7967
|
+
[kv]: "sha224WithRSAEncryption",
|
|
7968
7968
|
[Xl]: "sha256WithRSAEncryption",
|
|
7969
7969
|
[ha]: "sha384WithRSAEncryption",
|
|
7970
7970
|
[da]: "sha512WithRSAEncryption",
|
|
@@ -7974,12 +7974,12 @@ Bn.items = {
|
|
|
7974
7974
|
[df]: "ecdsaWithSHA256",
|
|
7975
7975
|
[pf]: "ecdsaWithSHA384",
|
|
7976
7976
|
[yf]: "ecdsaWithSHA512",
|
|
7977
|
-
[
|
|
7978
|
-
[
|
|
7979
|
-
[
|
|
7980
|
-
[
|
|
7981
|
-
[
|
|
7982
|
-
[
|
|
7977
|
+
[fv]: "TLS WWW server authentication",
|
|
7978
|
+
[hv]: "TLS WWW client authentication",
|
|
7979
|
+
[dv]: "Code Signing",
|
|
7980
|
+
[pv]: "E-mail Protection",
|
|
7981
|
+
[yv]: "Time Stamping",
|
|
7982
|
+
[gv]: "OCSP Signing",
|
|
7983
7983
|
[Wl]: "Signed Data"
|
|
7984
7984
|
};
|
|
7985
7985
|
class zn {
|
|
@@ -8036,7 +8036,7 @@ class zn {
|
|
|
8036
8036
|
}
|
|
8037
8037
|
}
|
|
8038
8038
|
zn.oidSerializer = Bn;
|
|
8039
|
-
zn.algorithmSerializer =
|
|
8039
|
+
zn.algorithmSerializer = Wv;
|
|
8040
8040
|
class Jn {
|
|
8041
8041
|
constructor(...e) {
|
|
8042
8042
|
if (e.length === 1) {
|
|
@@ -8155,9 +8155,9 @@ class Dn {
|
|
|
8155
8155
|
}
|
|
8156
8156
|
a0 = Symbol.toStringTag;
|
|
8157
8157
|
Dn.DEFAULT = "default";
|
|
8158
|
-
const Zt = new Dn(),
|
|
8159
|
-
function
|
|
8160
|
-
return new RegExp(
|
|
8158
|
+
const Zt = new Dn(), Yv = /^[0-2](?:\.[1-9][0-9]*)+$/;
|
|
8159
|
+
function Jv(r) {
|
|
8160
|
+
return new RegExp(Yv).test(r);
|
|
8161
8161
|
}
|
|
8162
8162
|
class c0 {
|
|
8163
8163
|
constructor(e = {}) {
|
|
@@ -8169,7 +8169,7 @@ class c0 {
|
|
|
8169
8169
|
return this.items[e] || null;
|
|
8170
8170
|
}
|
|
8171
8171
|
findId(e) {
|
|
8172
|
-
return
|
|
8172
|
+
return Jv(e) ? e : this.get(e);
|
|
8173
8173
|
}
|
|
8174
8174
|
register(e, t) {
|
|
8175
8175
|
this.items[e] = t, this.items[t] = e;
|
|
@@ -8188,11 +8188,11 @@ mr.register("G", "2.5.4.42");
|
|
|
8188
8188
|
mr.register("I", "2.5.4.43");
|
|
8189
8189
|
mr.register("SN", "2.5.4.4");
|
|
8190
8190
|
mr.register("T", "2.5.4.12");
|
|
8191
|
-
function
|
|
8191
|
+
function Xv(r, e) {
|
|
8192
8192
|
return `\\${le.ToHex(le.FromUtf8String(e)).toUpperCase()}`;
|
|
8193
8193
|
}
|
|
8194
|
-
function
|
|
8195
|
-
return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/,
|
|
8194
|
+
function Qv(r) {
|
|
8195
|
+
return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/, Xv);
|
|
8196
8196
|
}
|
|
8197
8197
|
class Hn {
|
|
8198
8198
|
static isASCII(e) {
|
|
@@ -8225,7 +8225,7 @@ class Hn {
|
|
|
8225
8225
|
}
|
|
8226
8226
|
toString() {
|
|
8227
8227
|
return this.asn.map((e) => e.map((t) => {
|
|
8228
|
-
const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${le.ToHex(t.value.anyValue)}` :
|
|
8228
|
+
const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${le.ToHex(t.value.anyValue)}` : Qv(t.value.toString());
|
|
8229
8229
|
return `${n}=${i}`;
|
|
8230
8230
|
}).join("+")).join(", ");
|
|
8231
8231
|
}
|
|
@@ -8319,7 +8319,7 @@ class Hn {
|
|
|
8319
8319
|
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());
|
|
8320
8320
|
}
|
|
8321
8321
|
}
|
|
8322
|
-
const l0 = "Cannot initialize GeneralName from ASN.1 data.", ed = `${l0} Unsupported string format in use.`,
|
|
8322
|
+
const l0 = "Cannot initialize GeneralName from ASN.1 data.", ed = `${l0} Unsupported string format in use.`, em = `${l0} Value doesn't match to GUID regular expression.`, td = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, rd = "1.3.6.1.4.1.311.25.1", nd = "1.3.6.1.4.1.311.20.2.3", Gc = "dns", zc = "dn", Kc = "email", qc = "ip", Zc = "url", Wc = "guid", Yc = "upn", No = "id";
|
|
8323
8323
|
class $n extends Jn {
|
|
8324
8324
|
constructor(...e) {
|
|
8325
8325
|
let t;
|
|
@@ -8391,7 +8391,7 @@ class $n extends Jn {
|
|
|
8391
8391
|
this.type = Wc;
|
|
8392
8392
|
const t = q.parse(e.otherName.value, st), n = new RegExp(td, "i").exec(le.ToHex(t));
|
|
8393
8393
|
if (!n)
|
|
8394
|
-
throw new Error(
|
|
8394
|
+
throw new Error(em);
|
|
8395
8395
|
this.value = n.slice(1).map((i, s) => s < 3 ? le.ToHex(new Uint8Array(le.FromHex(i)).reverse()) : i).join("-");
|
|
8396
8396
|
} else if (e.otherName.typeId === nd)
|
|
8397
8397
|
this.type = Yc, this.value = q.parse(e.otherName.value, Xt).toString();
|
|
@@ -8476,7 +8476,7 @@ class zs extends Jn {
|
|
|
8476
8476
|
}
|
|
8477
8477
|
}
|
|
8478
8478
|
zs.NAME = "GeneralNames";
|
|
8479
|
-
const js = "-{5}", Ks = "\\n",
|
|
8479
|
+
const js = "-{5}", Ks = "\\n", tm = `[^${Ks}]+`, rm = `${js}BEGIN (${tm}(?=${js}))${js}`, nm = `${js}END \\1${js}`, Ji = "\\n", im = `[^:${Ks}]+`, sm = `(?:[^${Ks}]+${Ji}(?: +[^${Ks}]+${Ji})*)`, om = "[a-zA-Z0-9=+/]+", am = `(?:${om}${Ji})+`, id = `${rm}${Ji}(?:((?:${im}: ${sm})+))?${Ji}?(${am})${nm}`;
|
|
8480
8480
|
class gr {
|
|
8481
8481
|
static isPem(e) {
|
|
8482
8482
|
return typeof e == "string" && new RegExp(id, "g").test(e);
|
|
@@ -8623,7 +8623,7 @@ class sn extends Fr {
|
|
|
8623
8623
|
e.length > 1 ? (i = e[0] || i, n = e[1] || n, t = e[2] || Zt.get()) : t = e[0] || Zt.get();
|
|
8624
8624
|
let s = this.rawData;
|
|
8625
8625
|
const o = q.parse(this.rawData, rn);
|
|
8626
|
-
return o.algorithm.algorithm === Ps && (s =
|
|
8626
|
+
return o.algorithm.algorithm === Ps && (s = cm(o, s)), t.subtle.importKey("spki", s, i, !0, n);
|
|
8627
8627
|
}
|
|
8628
8628
|
onInit(e) {
|
|
8629
8629
|
const t = lr.resolve(Yi), n = this.algorithm = t.toWebAlgorithm(e.algorithm);
|
|
@@ -8659,7 +8659,7 @@ class sn extends Fr {
|
|
|
8659
8659
|
return e;
|
|
8660
8660
|
}
|
|
8661
8661
|
}
|
|
8662
|
-
function
|
|
8662
|
+
function cm(r, e) {
|
|
8663
8663
|
return r.algorithm = new ne({
|
|
8664
8664
|
algorithm: gi,
|
|
8665
8665
|
parameters: null
|
|
@@ -9010,7 +9010,7 @@ class Pc {
|
|
|
9010
9010
|
}
|
|
9011
9011
|
Pc.items = /* @__PURE__ */ new Map();
|
|
9012
9012
|
const jc = "crypto.signatureFormatter";
|
|
9013
|
-
class
|
|
9013
|
+
class lm {
|
|
9014
9014
|
toAsnSignature(e, t) {
|
|
9015
9015
|
return W.toArrayBuffer(t);
|
|
9016
9016
|
}
|
|
@@ -9162,7 +9162,7 @@ class Tr {
|
|
|
9162
9162
|
toWebSignature(e, t) {
|
|
9163
9163
|
if (e.name === "ECDSA") {
|
|
9164
9164
|
const n = q.parse(t, ua), i = e.namedCurve, s = Tr.namedCurveSize.get(i) || Tr.defaultNamedCurveSize, o = this.addPadding(s, this.removePadding(n.r)), c = this.addPadding(s, this.removePadding(n.s));
|
|
9165
|
-
return
|
|
9165
|
+
return Ag(o, c);
|
|
9166
9166
|
}
|
|
9167
9167
|
return null;
|
|
9168
9168
|
}
|
|
@@ -9222,7 +9222,7 @@ Su = f([
|
|
|
9222
9222
|
kc()
|
|
9223
9223
|
], Su);
|
|
9224
9224
|
lr.registerSingleton(Io, Su);
|
|
9225
|
-
class
|
|
9225
|
+
class um extends Fr {
|
|
9226
9226
|
constructor(e) {
|
|
9227
9227
|
Fr.isAsnEncoded(e) ? super(e, Fs) : super(e), this.tag = gr.CertificateRequestTag;
|
|
9228
9228
|
}
|
|
@@ -9281,7 +9281,7 @@ class lm extends Fr {
|
|
|
9281
9281
|
}), e;
|
|
9282
9282
|
}
|
|
9283
9283
|
}
|
|
9284
|
-
|
|
9284
|
+
um.NAME = "PKCS#10 Certificate Request";
|
|
9285
9285
|
class wi extends Fr {
|
|
9286
9286
|
constructor(e) {
|
|
9287
9287
|
Fr.isAsnEncoded(e) ? super(e, di) : super(e), this.tag = gr.CertificateTag;
|
|
@@ -9380,7 +9380,7 @@ class wi extends Fr {
|
|
|
9380
9380
|
}
|
|
9381
9381
|
}
|
|
9382
9382
|
wi.NAME = "Certificate";
|
|
9383
|
-
class
|
|
9383
|
+
class fm extends Array {
|
|
9384
9384
|
constructor(e) {
|
|
9385
9385
|
if (super(), Fr.isAsnEncoded(e))
|
|
9386
9386
|
this.import(e);
|
|
@@ -9392,7 +9392,7 @@ class um extends Array {
|
|
|
9392
9392
|
}
|
|
9393
9393
|
export(e) {
|
|
9394
9394
|
const t = new xn();
|
|
9395
|
-
t.version = 1, t.encapContentInfo.eContentType =
|
|
9395
|
+
t.version = 1, t.encapContentInfo.eContentType = vv, t.encapContentInfo.eContent = new Ki({
|
|
9396
9396
|
single: new st()
|
|
9397
9397
|
}), t.certificates = new Ms(this.map((s) => new pi({
|
|
9398
9398
|
certificate: q.parse(s.rawData, di)
|
|
@@ -9449,12 +9449,12 @@ class um extends Array {
|
|
|
9449
9449
|
});
|
|
9450
9450
|
}
|
|
9451
9451
|
}
|
|
9452
|
-
class
|
|
9452
|
+
class hm {
|
|
9453
9453
|
constructor(e = {}) {
|
|
9454
9454
|
this.certificates = [], e.certificates && (this.certificates = e.certificates);
|
|
9455
9455
|
}
|
|
9456
9456
|
async build(e, t = Zt.get()) {
|
|
9457
|
-
const n = new
|
|
9457
|
+
const n = new fm(e);
|
|
9458
9458
|
let i = e;
|
|
9459
9459
|
for (; i = await this.findIssuer(i, t); ) {
|
|
9460
9460
|
const s = await i.getThumbprint(t);
|
|
@@ -9510,7 +9510,7 @@ Rr.register(bl, y0);
|
|
|
9510
9510
|
Rr.register(yl, g0);
|
|
9511
9511
|
Pc.register(i0, v0);
|
|
9512
9512
|
Pc.register(wf, bf);
|
|
9513
|
-
lr.registerSingleton(jc,
|
|
9513
|
+
lr.registerSingleton(jc, lm);
|
|
9514
9514
|
lr.registerSingleton(jc, Tr);
|
|
9515
9515
|
Tr.namedCurveSize.set("P-256", 32);
|
|
9516
9516
|
Tr.namedCurveSize.set("K-256", 32);
|
|
@@ -9564,7 +9564,7 @@ let Qe = (vn = class {
|
|
|
9564
9564
|
function _a(r) {
|
|
9565
9565
|
if (r != null && typeof r == "object") return r[Ir.ENCODED];
|
|
9566
9566
|
}
|
|
9567
|
-
function
|
|
9567
|
+
function dm(r) {
|
|
9568
9568
|
if (r != null && typeof r == "object") return r[Ir.LENGTH];
|
|
9569
9569
|
}
|
|
9570
9570
|
function Zs(r, e) {
|
|
@@ -9584,7 +9584,7 @@ function m0(r) {
|
|
|
9584
9584
|
function Vr(r) {
|
|
9585
9585
|
return r.reduce((e, t) => e + t.toString(16).padStart(2, "0"), "");
|
|
9586
9586
|
}
|
|
9587
|
-
function
|
|
9587
|
+
function pm(r) {
|
|
9588
9588
|
const e = r.reduce((i, s) => i + s.length, 0), t = new Uint8Array(e);
|
|
9589
9589
|
let n = 0;
|
|
9590
9590
|
for (const i of r) t.set(i, n), n += i.length;
|
|
@@ -9594,12 +9594,12 @@ function xf(r) {
|
|
|
9594
9594
|
const e = atob(r);
|
|
9595
9595
|
return Uint8Array.from(e, (t) => t.codePointAt(0));
|
|
9596
9596
|
}
|
|
9597
|
-
const
|
|
9598
|
-
function
|
|
9599
|
-
const e = r.replace(/[_-]/g, (t) =>
|
|
9597
|
+
const ym = { "-": "+", _: "/" };
|
|
9598
|
+
function gm(r) {
|
|
9599
|
+
const e = r.replace(/[_-]/g, (t) => ym[t]);
|
|
9600
9600
|
return xf(e.padEnd(Math.ceil(e.length / 4) * 4, "="));
|
|
9601
9601
|
}
|
|
9602
|
-
function
|
|
9602
|
+
function vm() {
|
|
9603
9603
|
const r = new Uint8Array(4), e = new Uint32Array(r.buffer);
|
|
9604
9604
|
return !((e[0] = 1) & r[0]);
|
|
9605
9605
|
}
|
|
@@ -9704,7 +9704,7 @@ function b0(r, e = 0, t = !1) {
|
|
|
9704
9704
|
} else if (i === 31) return s ? NaN : n * (1 / 0);
|
|
9705
9705
|
return n * 2 ** (i - 25) * (1024 + s);
|
|
9706
9706
|
}
|
|
9707
|
-
function
|
|
9707
|
+
function mm(r) {
|
|
9708
9708
|
const e = new DataView(new ArrayBuffer(4));
|
|
9709
9709
|
e.setFloat32(0, r, !1);
|
|
9710
9710
|
const t = e.getUint32(0, !1);
|
|
@@ -9719,7 +9719,7 @@ function vm(r) {
|
|
|
9719
9719
|
else return null;
|
|
9720
9720
|
return n;
|
|
9721
9721
|
}
|
|
9722
|
-
function
|
|
9722
|
+
function wm(r) {
|
|
9723
9723
|
if (r !== 0) {
|
|
9724
9724
|
const e = new ArrayBuffer(8), t = new DataView(e);
|
|
9725
9725
|
t.setFloat64(0, r, !1);
|
|
@@ -9728,7 +9728,7 @@ function mm(r) {
|
|
|
9728
9728
|
}
|
|
9729
9729
|
return r;
|
|
9730
9730
|
}
|
|
9731
|
-
function
|
|
9731
|
+
function bm(r) {
|
|
9732
9732
|
switch (r.length) {
|
|
9733
9733
|
case 2:
|
|
9734
9734
|
b0(r, 0, !0);
|
|
@@ -9747,7 +9747,7 @@ function wm(r) {
|
|
|
9747
9747
|
throw new TypeError(`Bad input to isSubnormal: ${r}`);
|
|
9748
9748
|
}
|
|
9749
9749
|
}
|
|
9750
|
-
const fd = we.SIMPLE_FLOAT << 5 | At.TWO,
|
|
9750
|
+
const fd = we.SIMPLE_FLOAT << 5 | At.TWO, xm = we.SIMPLE_FLOAT << 5 | At.FOUR, Am = we.SIMPLE_FLOAT << 5 | At.EIGHT, Sm = we.SIMPLE_FLOAT << 5 | Mn.TRUE, _m = we.SIMPLE_FLOAT << 5 | Mn.FALSE, Em = we.SIMPLE_FLOAT << 5 | Mn.UNDEFINED, Im = we.SIMPLE_FLOAT << 5 | Mn.NULL, km = new TextEncoder(), Cm = { ...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 }, x0 = { cde: !0, ignoreOriginalEncoding: !0, sortKeys: w0 }, Bm = { ...x0, dcbor: !0, largeNegativeAsBigInt: !0, reduceUnsafeNumbers: !0, rejectCustomSimples: !0, rejectDuplicateKeys: !0, rejectUndefined: !0, simplifyNegativeZero: !0, stringNormalization: "NFC" };
|
|
9751
9751
|
function A0(r) {
|
|
9752
9752
|
const e = r < 0;
|
|
9753
9753
|
return typeof r == "bigint" ? [e ? -r - 1n : r, e] : [e ? -r - 1 : r, e];
|
|
@@ -9756,9 +9756,9 @@ function Qc(r, e, t) {
|
|
|
9756
9756
|
if (t.rejectFloats) throw new Error(`Attempt to encode an unwanted floating point number: ${r}`);
|
|
9757
9757
|
if (isNaN(r)) e.writeUint8(fd), e.writeUint16(32256);
|
|
9758
9758
|
else if (!t.float64 && Math.fround(r) === r) {
|
|
9759
|
-
const n =
|
|
9760
|
-
n === null ? (e.writeUint8(
|
|
9761
|
-
} else e.writeUint8(
|
|
9759
|
+
const n = mm(r);
|
|
9760
|
+
n === null ? (e.writeUint8(xm), e.writeFloat32(r)) : (e.writeUint8(fd), e.writeUint16(n));
|
|
9761
|
+
} else e.writeUint8(Am), e.writeFloat64(r);
|
|
9762
9762
|
}
|
|
9763
9763
|
function Gr(r, e, t) {
|
|
9764
9764
|
const [n, i] = A0(r);
|
|
@@ -9787,34 +9787,34 @@ function S0(r, e, t) {
|
|
|
9787
9787
|
const u = m0(c + o);
|
|
9788
9788
|
Gr(u.length, e, we.BYTE_STRING), e.write(u);
|
|
9789
9789
|
}
|
|
9790
|
-
function Bm(r, e, t) {
|
|
9791
|
-
t.flushToZero && (r = mm(r)), Object.is(r, -0) ? t.simplifyNegativeZero ? t.avoidInts ? Qc(0, e, t) : Gr(0, e) : Qc(r, e, t) : !t.avoidInts && Number.isSafeInteger(r) ? Gr(r, e) : t.reduceUnsafeNumbers && Math.floor(r) === r && r >= Sa.MIN && r <= Sa.MAX ? S0(BigInt(r), e, t) : Qc(r, e, t);
|
|
9792
|
-
}
|
|
9793
9790
|
function Om(r, e, t) {
|
|
9794
|
-
|
|
9795
|
-
Gr(i.length, e, we.UTF8_STRING), e.write(i);
|
|
9791
|
+
t.flushToZero && (r = wm(r)), Object.is(r, -0) ? t.simplifyNegativeZero ? t.avoidInts ? Qc(0, e, t) : Gr(0, e) : Qc(r, e, t) : !t.avoidInts && Number.isSafeInteger(r) ? Gr(r, e) : t.reduceUnsafeNumbers && Math.floor(r) === r && r >= Sa.MIN && r <= Sa.MAX ? S0(BigInt(r), e, t) : Qc(r, e, t);
|
|
9796
9792
|
}
|
|
9797
9793
|
function Tm(r, e, t) {
|
|
9794
|
+
const n = t.stringNormalization ? r.normalize(t.stringNormalization) : r, i = km.encode(n);
|
|
9795
|
+
Gr(i.length, e, we.UTF8_STRING), e.write(i);
|
|
9796
|
+
}
|
|
9797
|
+
function Nm(r, e, t) {
|
|
9798
9798
|
const n = r;
|
|
9799
9799
|
Af(n, n.length, we.ARRAY, e, t);
|
|
9800
9800
|
for (const i of n) ii(i, e, t);
|
|
9801
9801
|
}
|
|
9802
|
-
function
|
|
9802
|
+
function Pm(r, e) {
|
|
9803
9803
|
const t = r;
|
|
9804
9804
|
Gr(t.length, e, we.BYTE_STRING), e.write(t);
|
|
9805
9805
|
}
|
|
9806
|
-
const Eu = /* @__PURE__ */ new Map([[Array,
|
|
9806
|
+
const Eu = /* @__PURE__ */ new Map([[Array, Nm], [Uint8Array, Pm]]);
|
|
9807
9807
|
function Rt(r, e) {
|
|
9808
9808
|
const t = Eu.get(r);
|
|
9809
9809
|
return Eu.set(r, e), t;
|
|
9810
9810
|
}
|
|
9811
9811
|
function Af(r, e, t, n, i) {
|
|
9812
|
-
const s =
|
|
9812
|
+
const s = dm(r);
|
|
9813
9813
|
s && !i.ignoreOriginalEncoding ? n.write(s) : Gr(e, n, t);
|
|
9814
9814
|
}
|
|
9815
|
-
function
|
|
9815
|
+
function jm(r, e, t) {
|
|
9816
9816
|
if (r === null) {
|
|
9817
|
-
e.writeUint8(
|
|
9817
|
+
e.writeUint8(Im);
|
|
9818
9818
|
return;
|
|
9819
9819
|
}
|
|
9820
9820
|
if (!t.ignoreOriginalEncoding && Ir.ENCODED in r) {
|
|
@@ -9843,23 +9843,23 @@ function Pm(r, e, t) {
|
|
|
9843
9843
|
function ii(r, e, t) {
|
|
9844
9844
|
switch (typeof r) {
|
|
9845
9845
|
case "number":
|
|
9846
|
-
|
|
9846
|
+
Om(r, e, t);
|
|
9847
9847
|
break;
|
|
9848
9848
|
case "bigint":
|
|
9849
9849
|
S0(r, e, t);
|
|
9850
9850
|
break;
|
|
9851
9851
|
case "string":
|
|
9852
|
-
|
|
9852
|
+
Tm(r, e, t);
|
|
9853
9853
|
break;
|
|
9854
9854
|
case "boolean":
|
|
9855
|
-
e.writeUint8(r ?
|
|
9855
|
+
e.writeUint8(r ? Sm : _m);
|
|
9856
9856
|
break;
|
|
9857
9857
|
case "undefined":
|
|
9858
9858
|
if (t.rejectUndefined) throw new Error("Attempt to encode unwanted undefined.");
|
|
9859
|
-
e.writeUint8(
|
|
9859
|
+
e.writeUint8(Em);
|
|
9860
9860
|
break;
|
|
9861
9861
|
case "object":
|
|
9862
|
-
|
|
9862
|
+
jm(r, e, t);
|
|
9863
9863
|
break;
|
|
9864
9864
|
case "symbol":
|
|
9865
9865
|
throw new TypeError(`Unknown symbol: ${r.toString()}`);
|
|
@@ -9868,8 +9868,8 @@ function ii(r, e, t) {
|
|
|
9868
9868
|
}
|
|
9869
9869
|
}
|
|
9870
9870
|
function Rc(r, e = {}) {
|
|
9871
|
-
const t = { ...
|
|
9872
|
-
e.dcbor ? Object.assign(t,
|
|
9871
|
+
const t = { ...Cm };
|
|
9872
|
+
e.dcbor ? Object.assign(t, Bm) : e.cde && Object.assign(t, x0), Object.assign(t, e);
|
|
9873
9873
|
const n = new Ea(t);
|
|
9874
9874
|
return ii(r, n, t), n.read();
|
|
9875
9875
|
}
|
|
@@ -9898,7 +9898,7 @@ const Tn = class Tn {
|
|
|
9898
9898
|
};
|
|
9899
9899
|
Ke(Tn, "KnownSimple", /* @__PURE__ */ new Map([[Mn.FALSE, !1], [Mn.TRUE, !0], [Mn.NULL, null], [Mn.UNDEFINED, void 0]]));
|
|
9900
9900
|
let Ws = Tn;
|
|
9901
|
-
const
|
|
9901
|
+
const Rm = new TextDecoder("utf8", { fatal: !0, ignoreBOM: !0 });
|
|
9902
9902
|
var Ar, $r, qt, Cr, Wt, ei, Iu, ks;
|
|
9903
9903
|
const La = class La {
|
|
9904
9904
|
constructor(e, t) {
|
|
@@ -9981,7 +9981,7 @@ Ar = new WeakMap(), $r = new WeakMap(), qt = new WeakMap(), Cr = new WeakMap(),
|
|
|
9981
9981
|
o === 1 / 0 ? yield* Ve(this, Wt, ks).call(this, i, e, t) : yield [i, s, Ve(this, Wt, Iu).call(this, o), t, o];
|
|
9982
9982
|
break;
|
|
9983
9983
|
case we.UTF8_STRING:
|
|
9984
|
-
o === 1 / 0 ? yield* Ve(this, Wt, ks).call(this, i, e, t) : yield [i, s,
|
|
9984
|
+
o === 1 / 0 ? yield* Ve(this, Wt, ks).call(this, i, e, t) : yield [i, s, Rm.decode(Ve(this, Wt, Iu).call(this, o)), t, o];
|
|
9985
9985
|
break;
|
|
9986
9986
|
case we.ARRAY:
|
|
9987
9987
|
if (o === 1 / 0) yield* Ve(this, Wt, ks).call(this, i, e, t, !1);
|
|
@@ -10027,7 +10027,7 @@ Ar = new WeakMap(), $r = new WeakMap(), qt = new WeakMap(), Cr = new WeakMap(),
|
|
|
10027
10027
|
}
|
|
10028
10028
|
}, Ke(La, "defaultOptions", { maxDepth: 1024, encoding: "hex", requirePreferred: !1 });
|
|
10029
10029
|
let Ys = La;
|
|
10030
|
-
const
|
|
10030
|
+
const Um = /* @__PURE__ */ new Map([[At.ZERO, 1], [At.ONE, 2], [At.TWO, 3], [At.FOUR, 5], [At.EIGHT, 9]]), Dm = new Uint8Array(0);
|
|
10031
10031
|
var tn, ar, en, Ha, E0;
|
|
10032
10032
|
let Nn = (tn = class {
|
|
10033
10033
|
constructor(e, t, n, i) {
|
|
@@ -10068,10 +10068,10 @@ let Nn = (tn = class {
|
|
|
10068
10068
|
const h = i.toHere(u);
|
|
10069
10069
|
if (h.length !== 3 || h[1] !== 126 || h[2] !== 0) throw new Error(`Invalid NaN encoding: "${Vr(h)}"`);
|
|
10070
10070
|
}
|
|
10071
|
-
if (n.rejectSubnormals &&
|
|
10071
|
+
if (n.rejectSubnormals && bm(i.toHere(u + 1)), n.rejectLongFloats) {
|
|
10072
10072
|
const h = Rc(c, { chunkSize: 9, reduceUnsafeNumbers: n.rejectUnsafeFloatInts });
|
|
10073
10073
|
if (h[0] >> 5 !== s) throw new Error(`Should have been encoded as int, not float: ${c}`);
|
|
10074
|
-
if (h.length <
|
|
10074
|
+
if (h.length < Um.get(o)) throw new Error(`Number should have been encoded shorter: ${c}`);
|
|
10075
10075
|
}
|
|
10076
10076
|
if (typeof c == "number" && n.boxed) return Is(c, i.toHere(u));
|
|
10077
10077
|
} else {
|
|
@@ -10139,7 +10139,7 @@ let Nn = (tn = class {
|
|
|
10139
10139
|
break;
|
|
10140
10140
|
}
|
|
10141
10141
|
case we.BYTE_STRING:
|
|
10142
|
-
return
|
|
10142
|
+
return pm(this.children);
|
|
10143
10143
|
case we.UTF8_STRING: {
|
|
10144
10144
|
const n = this.children.join("");
|
|
10145
10145
|
t = $(this, ar).boxed ? Is(n, e.toHere(this.offset)) : n;
|
|
@@ -10158,7 +10158,7 @@ let Nn = (tn = class {
|
|
|
10158
10158
|
if (t % 2) throw new Error("Missing map value");
|
|
10159
10159
|
const n = new Array(t / 2);
|
|
10160
10160
|
if ($(this, en)) for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], $(this, en)[i]];
|
|
10161
|
-
else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1],
|
|
10161
|
+
else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], Dm];
|
|
10162
10162
|
return n;
|
|
10163
10163
|
}, Ke(tn, "defaultDecodeOptions", { ...Ys.defaultOptions, ParentType: tn, boxed: !1, cde: !1, dcbor: !1, diagnosticSizes: _0.PREFERRED, convertUnsafeIntsToFloat: !1, pretty: !1, preferMap: !1, rejectLargeNegatives: !1, rejectBigInts: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectInts: !1, rejectLongLoundNaN: !1, rejectLongFloats: !1, rejectNegativeZero: !1, rejectSimple: !1, rejectStreaming: !1, rejectStringsNotNormalizedAs: null, rejectSubnormals: !1, rejectUndefined: !1, rejectUnsafeFloatInts: !1, saveOriginal: !1, sortKeys: null }), Ke(tn, "cdeDecodeOptions", { cde: !0, rejectStreaming: !0, requirePreferred: !0, sortKeys: w0 }), Ke(tn, "dcborDecodeOptions", { ...tn.cdeDecodeOptions, dcbor: !0, convertUnsafeIntsToFloat: !0, rejectDuplicateKeys: !0, rejectLargeNegatives: !0, rejectLongLoundNaN: !0, rejectLongFloats: !0, rejectNegativeZero: !0, rejectSimple: !0, rejectUndefined: !0, rejectUnsafeFloatInts: !0, rejectStringsNotNormalizedAs: "NFC" }), tn);
|
|
10164
10164
|
var xd, Ad;
|
|
@@ -10256,9 +10256,9 @@ function k0(r, e, t) {
|
|
|
10256
10256
|
}
|
|
10257
10257
|
return n;
|
|
10258
10258
|
}
|
|
10259
|
-
const
|
|
10260
|
-
function
|
|
10261
|
-
const t = {
|
|
10259
|
+
const $m = { ...Nn.defaultDecodeOptions, initialDepth: 0, noPrefixHex: !1, minCol: 0 };
|
|
10260
|
+
function Mm(r, e) {
|
|
10261
|
+
const t = { ...$m, ...e, ParentType: ku, saveOriginal: !0 }, n = new Ys(r, t);
|
|
10262
10262
|
let i, s;
|
|
10263
10263
|
for (const c of n) {
|
|
10264
10264
|
if (s = Nn.create(c, i, t, n), c[2] === Ir.BREAK) if (i != null && i.isStreaming) i.left = 1;
|
|
@@ -10276,7 +10276,7 @@ function $m(r, e) {
|
|
|
10276
10276
|
`;
|
|
10277
10277
|
return o += k0(s, t), o;
|
|
10278
10278
|
}
|
|
10279
|
-
const hd = !
|
|
10279
|
+
const hd = !vm();
|
|
10280
10280
|
function C0(r) {
|
|
10281
10281
|
if (typeof r == "object" && r) {
|
|
10282
10282
|
if (r.constructor !== Number) throw new Error(`Expected number: ${r}`);
|
|
@@ -10333,12 +10333,12 @@ tl.comment = (r, e, t) => {
|
|
|
10333
10333
|
const o = i[s] & 31;
|
|
10334
10334
|
let c = Vr(i.subarray(s, ++s));
|
|
10335
10335
|
o >= 24 && (c += " ", c += Vr(i.subarray(s, s + 2 ** (o - 24)))), n.minCol = Math.max(n.minCol, (t + 1) * 2 + c.length);
|
|
10336
|
-
const u =
|
|
10336
|
+
const u = Mm(r.contents, n);
|
|
10337
10337
|
let h = `Embedded CBOR
|
|
10338
10338
|
`;
|
|
10339
10339
|
return h += `${"".padStart((t + 1) * 2, " ")}${c}`.padEnd(n.minCol + 1, " "), h += `-- Bytes (Length: ${r.contents.length})
|
|
10340
10340
|
`, h += u, h;
|
|
10341
|
-
}, tl.noChildren = !0, Qe.registerDecoder(It.CBOR, tl), Qe.registerDecoder(It.URI, (r) => (Pn(r.contents), new URL(r.contents)), "URI"), Rt(URL, (r) => [It.URI, r.toString()]), Qe.registerDecoder(It.BASE64URL, (r) => (Pn(r.contents),
|
|
10341
|
+
}, tl.noChildren = !0, Qe.registerDecoder(It.CBOR, tl), Qe.registerDecoder(It.URI, (r) => (Pn(r.contents), new URL(r.contents)), "URI"), Rt(URL, (r) => [It.URI, r.toString()]), Qe.registerDecoder(It.BASE64URL, (r) => (Pn(r.contents), gm(r.contents)), "Base64url-encoded"), Qe.registerDecoder(It.BASE64, (r) => (Pn(r.contents), xf(r.contents)), "Base64-encoded"), Qe.registerDecoder(35, (r) => (Pn(r.contents), new RegExp(r.contents)), "RegExp"), Qe.registerDecoder(21065, (r) => {
|
|
10342
10342
|
Pn(r.contents);
|
|
10343
10343
|
let e = r.contents.replace(new RegExp("(?<!\\\\)(?<!\\[(?:[^\\]]|\\\\\\])*)\\.", "g"), `[^
|
|
10344
10344
|
\r]`);
|
|
@@ -10501,7 +10501,7 @@ const re = lt.arrayToEnum([
|
|
|
10501
10501
|
"invalid_intersection_types",
|
|
10502
10502
|
"not_multiple_of",
|
|
10503
10503
|
"not_finite"
|
|
10504
|
-
]),
|
|
10504
|
+
]), Vm = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
10505
10505
|
class Er extends Error {
|
|
10506
10506
|
constructor(e) {
|
|
10507
10507
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -10619,7 +10619,7 @@ const Xi = (r, e) => {
|
|
|
10619
10619
|
return { message: t };
|
|
10620
10620
|
};
|
|
10621
10621
|
let O0 = Xi;
|
|
10622
|
-
function
|
|
10622
|
+
function Lm(r) {
|
|
10623
10623
|
O0 = r;
|
|
10624
10624
|
}
|
|
10625
10625
|
function Ba() {
|
|
@@ -10645,7 +10645,7 @@ const Oa = (r) => {
|
|
|
10645
10645
|
path: s,
|
|
10646
10646
|
message: c
|
|
10647
10647
|
};
|
|
10648
|
-
},
|
|
10648
|
+
}, Hm = [];
|
|
10649
10649
|
function X(r, e) {
|
|
10650
10650
|
const t = Ba(), n = Oa({
|
|
10651
10651
|
issueData: e,
|
|
@@ -10936,14 +10936,14 @@ class Ye {
|
|
|
10936
10936
|
return this.safeParse(null).success;
|
|
10937
10937
|
}
|
|
10938
10938
|
}
|
|
10939
|
-
const
|
|
10939
|
+
const Fm = /^c[^\s-]{8,}$/i, Gm = /^[0-9a-z]+$/, zm = /^[0-9A-HJKMNP-TV-Z]{26}$/, Km = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, qm = /^[a-z0-9_-]{21}$/i, Zm = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Wm = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ym = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
10940
10940
|
let nl;
|
|
10941
|
-
const
|
|
10941
|
+
const Jm = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Xm = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Qm = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, N0 = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", e1 = new RegExp(`^${N0}$`);
|
|
10942
10942
|
function P0(r) {
|
|
10943
10943
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
10944
10944
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
10945
10945
|
}
|
|
10946
|
-
function
|
|
10946
|
+
function t1(r) {
|
|
10947
10947
|
return new RegExp(`^${P0(r)}$`);
|
|
10948
10948
|
}
|
|
10949
10949
|
function j0(r) {
|
|
@@ -10951,8 +10951,8 @@ function j0(r) {
|
|
|
10951
10951
|
const t = [];
|
|
10952
10952
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
10953
10953
|
}
|
|
10954
|
-
function
|
|
10955
|
-
return !!((e === "v4" || !e) &&
|
|
10954
|
+
function r1(r, e) {
|
|
10955
|
+
return !!((e === "v4" || !e) && Jm.test(r) || (e === "v6" || !e) && Xm.test(r));
|
|
10956
10956
|
}
|
|
10957
10957
|
class Mr extends Ye {
|
|
10958
10958
|
_parse(e) {
|
|
@@ -11003,43 +11003,43 @@ class Mr extends Ye {
|
|
|
11003
11003
|
message: s.message
|
|
11004
11004
|
}), n.dirty());
|
|
11005
11005
|
} else if (s.kind === "email")
|
|
11006
|
-
|
|
11006
|
+
Wm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11007
11007
|
validation: "email",
|
|
11008
11008
|
code: G.invalid_string,
|
|
11009
11009
|
message: s.message
|
|
11010
11010
|
}), n.dirty());
|
|
11011
11011
|
else if (s.kind === "emoji")
|
|
11012
|
-
nl || (nl = new RegExp(
|
|
11012
|
+
nl || (nl = new RegExp(Ym, "u")), nl.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11013
11013
|
validation: "emoji",
|
|
11014
11014
|
code: G.invalid_string,
|
|
11015
11015
|
message: s.message
|
|
11016
11016
|
}), n.dirty());
|
|
11017
11017
|
else if (s.kind === "uuid")
|
|
11018
|
-
|
|
11018
|
+
Km.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11019
11019
|
validation: "uuid",
|
|
11020
11020
|
code: G.invalid_string,
|
|
11021
11021
|
message: s.message
|
|
11022
11022
|
}), n.dirty());
|
|
11023
11023
|
else if (s.kind === "nanoid")
|
|
11024
|
-
|
|
11024
|
+
qm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11025
11025
|
validation: "nanoid",
|
|
11026
11026
|
code: G.invalid_string,
|
|
11027
11027
|
message: s.message
|
|
11028
11028
|
}), n.dirty());
|
|
11029
11029
|
else if (s.kind === "cuid")
|
|
11030
|
-
|
|
11030
|
+
Fm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11031
11031
|
validation: "cuid",
|
|
11032
11032
|
code: G.invalid_string,
|
|
11033
11033
|
message: s.message
|
|
11034
11034
|
}), n.dirty());
|
|
11035
11035
|
else if (s.kind === "cuid2")
|
|
11036
|
-
|
|
11036
|
+
Gm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11037
11037
|
validation: "cuid2",
|
|
11038
11038
|
code: G.invalid_string,
|
|
11039
11039
|
message: s.message
|
|
11040
11040
|
}), n.dirty());
|
|
11041
11041
|
else if (s.kind === "ulid")
|
|
11042
|
-
|
|
11042
|
+
zm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11043
11043
|
validation: "ulid",
|
|
11044
11044
|
code: G.invalid_string,
|
|
11045
11045
|
message: s.message
|
|
@@ -11074,23 +11074,23 @@ class Mr extends Ye {
|
|
|
11074
11074
|
code: G.invalid_string,
|
|
11075
11075
|
validation: "datetime",
|
|
11076
11076
|
message: s.message
|
|
11077
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
11077
|
+
}), n.dirty()) : s.kind === "date" ? e1.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11078
11078
|
code: G.invalid_string,
|
|
11079
11079
|
validation: "date",
|
|
11080
11080
|
message: s.message
|
|
11081
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
11081
|
+
}), n.dirty()) : s.kind === "time" ? t1(s).test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11082
11082
|
code: G.invalid_string,
|
|
11083
11083
|
validation: "time",
|
|
11084
11084
|
message: s.message
|
|
11085
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
11085
|
+
}), n.dirty()) : s.kind === "duration" ? Zm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11086
11086
|
validation: "duration",
|
|
11087
11087
|
code: G.invalid_string,
|
|
11088
11088
|
message: s.message
|
|
11089
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
11089
|
+
}), n.dirty()) : s.kind === "ip" ? r1(e.data, s.version) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11090
11090
|
validation: "ip",
|
|
11091
11091
|
code: G.invalid_string,
|
|
11092
11092
|
message: s.message
|
|
11093
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
11093
|
+
}), n.dirty()) : s.kind === "base64" ? Qm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
|
|
11094
11094
|
validation: "base64",
|
|
11095
11095
|
code: G.invalid_string,
|
|
11096
11096
|
message: s.message
|
|
@@ -11312,7 +11312,7 @@ Mr.create = (r) => {
|
|
|
11312
11312
|
...qe(r)
|
|
11313
11313
|
});
|
|
11314
11314
|
};
|
|
11315
|
-
function
|
|
11315
|
+
function n1(r, e) {
|
|
11316
11316
|
const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, i = t > n ? t : n, s = parseInt(r.toFixed(i).replace(".", "")), o = parseInt(e.toFixed(i).replace(".", ""));
|
|
11317
11317
|
return s % o / Math.pow(10, i);
|
|
11318
11318
|
}
|
|
@@ -11351,7 +11351,7 @@ class Kn extends Ye {
|
|
|
11351
11351
|
inclusive: s.inclusive,
|
|
11352
11352
|
exact: !1,
|
|
11353
11353
|
message: s.message
|
|
11354
|
-
}), i.dirty()) : s.kind === "multipleOf" ?
|
|
11354
|
+
}), i.dirty()) : s.kind === "multipleOf" ? n1(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), X(n, {
|
|
11355
11355
|
code: G.not_multiple_of,
|
|
11356
11356
|
multipleOf: s.value,
|
|
11357
11357
|
message: s.message
|
|
@@ -13052,7 +13052,7 @@ Ra.create = (r) => new Ra({
|
|
|
13052
13052
|
typeName: Ce.ZodNaN,
|
|
13053
13053
|
...qe(r)
|
|
13054
13054
|
});
|
|
13055
|
-
const
|
|
13055
|
+
const i1 = Symbol("zod_brand");
|
|
13056
13056
|
class Sf extends Ye {
|
|
13057
13057
|
_parse(e) {
|
|
13058
13058
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
@@ -13129,16 +13129,16 @@ function U0(r, e = {}, t) {
|
|
|
13129
13129
|
}
|
|
13130
13130
|
}) : Qi.create();
|
|
13131
13131
|
}
|
|
13132
|
-
const
|
|
13132
|
+
const s1 = {
|
|
13133
13133
|
object: Ot.lazycreate
|
|
13134
13134
|
};
|
|
13135
13135
|
var Ce;
|
|
13136
13136
|
(function(r) {
|
|
13137
13137
|
r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
|
|
13138
13138
|
})(Ce || (Ce = {}));
|
|
13139
|
-
const
|
|
13139
|
+
const o1 = (r, e = {
|
|
13140
13140
|
message: `Input not instance of ${r.name}`
|
|
13141
|
-
}) => U0((t) => t instanceof r, e), D0 = Mr.create, $0 = Kn.create,
|
|
13141
|
+
}) => U0((t) => t instanceof r, e), D0 = Mr.create, $0 = Kn.create, a1 = Ra.create, c1 = qn.create, M0 = Qs.create, l1 = xi.create, u1 = Na.create, f1 = eo.create, h1 = to.create, d1 = Qi.create, p1 = ai.create, y1 = En.create, g1 = Pa.create, v1 = Lr.create, m1 = Ot.create, w1 = Ot.strictCreate, b1 = ro.create, x1 = Uc.create, A1 = no.create, S1 = un.create, _1 = io.create, E1 = ja.create, I1 = Ai.create, k1 = $i.create, C1 = so.create, B1 = oo.create, O1 = Zn.create, T1 = ao.create, N1 = es.create, md = zr.create, P1 = on.create, j1 = Wn.create, R1 = zr.createWithPreprocess, U1 = ko.create, D1 = () => D0().optional(), $1 = () => $0().optional(), M1 = () => M0().optional(), V1 = {
|
|
13142
13142
|
string: (r) => Mr.create({ ...r, coerce: !0 }),
|
|
13143
13143
|
number: (r) => Kn.create({ ...r, coerce: !0 }),
|
|
13144
13144
|
boolean: (r) => Qs.create({
|
|
@@ -13147,14 +13147,14 @@ const s1 = (r, e = {
|
|
|
13147
13147
|
}),
|
|
13148
13148
|
bigint: (r) => qn.create({ ...r, coerce: !0 }),
|
|
13149
13149
|
date: (r) => xi.create({ ...r, coerce: !0 })
|
|
13150
|
-
},
|
|
13150
|
+
}, L1 = Be;
|
|
13151
13151
|
var Bt = /* @__PURE__ */ Object.freeze({
|
|
13152
13152
|
__proto__: null,
|
|
13153
13153
|
defaultErrorMap: Xi,
|
|
13154
|
-
setErrorMap:
|
|
13154
|
+
setErrorMap: Lm,
|
|
13155
13155
|
getErrorMap: Ba,
|
|
13156
13156
|
makeIssue: Oa,
|
|
13157
|
-
EMPTY_PATH:
|
|
13157
|
+
EMPTY_PATH: Hm,
|
|
13158
13158
|
addIssueToContext: X,
|
|
13159
13159
|
ParseStatus: sr,
|
|
13160
13160
|
INVALID: Be,
|
|
@@ -13208,66 +13208,66 @@ var Bt = /* @__PURE__ */ Object.freeze({
|
|
|
13208
13208
|
ZodDefault: co,
|
|
13209
13209
|
ZodCatch: lo,
|
|
13210
13210
|
ZodNaN: Ra,
|
|
13211
|
-
BRAND:
|
|
13211
|
+
BRAND: i1,
|
|
13212
13212
|
ZodBranded: Sf,
|
|
13213
13213
|
ZodPipeline: ko,
|
|
13214
13214
|
ZodReadonly: uo,
|
|
13215
13215
|
custom: U0,
|
|
13216
13216
|
Schema: Ye,
|
|
13217
13217
|
ZodSchema: Ye,
|
|
13218
|
-
late:
|
|
13218
|
+
late: s1,
|
|
13219
13219
|
get ZodFirstPartyTypeKind() {
|
|
13220
13220
|
return Ce;
|
|
13221
13221
|
},
|
|
13222
|
-
coerce:
|
|
13223
|
-
any:
|
|
13224
|
-
array:
|
|
13225
|
-
bigint:
|
|
13222
|
+
coerce: V1,
|
|
13223
|
+
any: d1,
|
|
13224
|
+
array: v1,
|
|
13225
|
+
bigint: c1,
|
|
13226
13226
|
boolean: M0,
|
|
13227
|
-
date:
|
|
13228
|
-
discriminatedUnion:
|
|
13227
|
+
date: l1,
|
|
13228
|
+
discriminatedUnion: x1,
|
|
13229
13229
|
effect: md,
|
|
13230
|
-
enum:
|
|
13231
|
-
function:
|
|
13232
|
-
instanceof:
|
|
13233
|
-
intersection:
|
|
13234
|
-
lazy:
|
|
13235
|
-
literal:
|
|
13236
|
-
map:
|
|
13237
|
-
nan:
|
|
13238
|
-
nativeEnum:
|
|
13239
|
-
never:
|
|
13240
|
-
null:
|
|
13241
|
-
nullable:
|
|
13230
|
+
enum: O1,
|
|
13231
|
+
function: k1,
|
|
13232
|
+
instanceof: o1,
|
|
13233
|
+
intersection: A1,
|
|
13234
|
+
lazy: C1,
|
|
13235
|
+
literal: B1,
|
|
13236
|
+
map: E1,
|
|
13237
|
+
nan: a1,
|
|
13238
|
+
nativeEnum: T1,
|
|
13239
|
+
never: y1,
|
|
13240
|
+
null: h1,
|
|
13241
|
+
nullable: j1,
|
|
13242
13242
|
number: $0,
|
|
13243
|
-
object:
|
|
13244
|
-
oboolean:
|
|
13245
|
-
onumber:
|
|
13246
|
-
optional:
|
|
13247
|
-
ostring:
|
|
13248
|
-
pipeline:
|
|
13249
|
-
preprocess:
|
|
13250
|
-
promise:
|
|
13251
|
-
record:
|
|
13252
|
-
set:
|
|
13253
|
-
strictObject:
|
|
13243
|
+
object: m1,
|
|
13244
|
+
oboolean: M1,
|
|
13245
|
+
onumber: $1,
|
|
13246
|
+
optional: P1,
|
|
13247
|
+
ostring: D1,
|
|
13248
|
+
pipeline: U1,
|
|
13249
|
+
preprocess: R1,
|
|
13250
|
+
promise: N1,
|
|
13251
|
+
record: _1,
|
|
13252
|
+
set: I1,
|
|
13253
|
+
strictObject: w1,
|
|
13254
13254
|
string: D0,
|
|
13255
|
-
symbol:
|
|
13255
|
+
symbol: u1,
|
|
13256
13256
|
transformer: md,
|
|
13257
|
-
tuple:
|
|
13258
|
-
undefined:
|
|
13259
|
-
union:
|
|
13260
|
-
unknown:
|
|
13261
|
-
void:
|
|
13262
|
-
NEVER:
|
|
13257
|
+
tuple: S1,
|
|
13258
|
+
undefined: f1,
|
|
13259
|
+
union: b1,
|
|
13260
|
+
unknown: p1,
|
|
13261
|
+
void: g1,
|
|
13262
|
+
NEVER: L1,
|
|
13263
13263
|
ZodIssueCode: G,
|
|
13264
|
-
quotelessJson:
|
|
13264
|
+
quotelessJson: Vm,
|
|
13265
13265
|
ZodError: Er
|
|
13266
13266
|
});
|
|
13267
13267
|
const Ua = new Uint8Array([48, 130, 2, 17, 48, 130, 1, 150, 160, 3, 2, 1, 2, 2, 17, 0, 249, 49, 117, 104, 27, 144, 175, 225, 29, 70, 204, 180, 228, 231, 248, 86, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 3, 48, 73, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 12, 6, 65, 109, 97, 122, 111, 110, 49, 12, 48, 10, 6, 3, 85, 4, 11, 12, 3, 65, 87, 83, 49, 27, 48, 25, 6, 3, 85, 4, 3, 12, 18, 97, 119, 115, 46, 110, 105, 116, 114, 111, 45, 101, 110, 99, 108, 97, 118, 101, 115, 48, 30, 23, 13, 49, 57, 49, 48, 50, 56, 49, 51, 50, 56, 48, 53, 90, 23, 13, 52, 57, 49, 48, 50, 56, 49, 52, 50, 56, 48, 53, 90, 48, 73, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 12, 6, 65, 109, 97, 122, 111, 110, 49, 12, 48, 10, 6, 3, 85, 4, 11, 12, 3, 65, 87, 83, 49, 27, 48, 25, 6, 3, 85, 4, 3, 12, 18, 97, 119, 115, 46, 110, 105, 116, 114, 111, 45, 101, 110, 99, 108, 97, 118, 101, 115, 48, 118, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 3, 98, 0, 4, 252, 2, 84, 235, 166, 8, 193, 243, 104, 112, 226, 154, 218, 144, 190, 70, 56, 50, 146, 115, 110, 137, 75, 255, 246, 114, 217, 137, 68, 75, 80, 81, 229, 52, 164, 177, 246, 219, 227, 192, 188, 88, 26, 50, 183, 177, 118, 7, 14, 222, 18, 214, 154, 63, 234, 33, 27, 102, 231, 82, 207, 125, 209, 221, 9, 95, 111, 19, 112, 244, 23, 8, 67, 217, 220, 16, 1, 33, 228, 207, 99, 1, 40, 9, 102, 68, 135, 201, 121, 98, 132, 48, 77, 197, 63, 244, 163, 66, 48, 64, 48, 15, 6, 3, 85, 29, 19, 1, 1, 255, 4, 5, 48, 3, 1, 1, 255, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 144, 37, 181, 13, 217, 5, 71, 231, 150, 195, 150, 250, 114, 157, 207, 153, 169, 223, 75, 150, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 1, 134, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 3, 3, 105, 0, 48, 102, 2, 49, 0, 163, 127, 47, 145, 161, 201, 189, 94, 231, 184, 98, 124, 22, 152, 210, 85, 3, 142, 31, 3, 67, 249, 91, 99, 169, 98, 140, 61, 57, 128, 149, 69, 161, 30, 188, 191, 46, 59, 85, 216, 174, 238, 113, 180, 195, 214, 173, 243, 2, 49, 0, 162, 243, 155, 22, 5, 178, 112, 40, 165, 221, 75, 160, 105, 181, 1, 110, 101, 180, 251, 222, 143, 224, 6, 29, 106, 83, 25, 127, 156, 218, 245, 217, 67, 188, 97, 252, 43, 235, 3, 203, 111, 238, 141, 35, 2, 243, 223, 246]);
|
|
13268
13268
|
if (!Ua || Ua.length === 0)
|
|
13269
13269
|
throw new Error("AWS root certificate is empty or not loaded correctly");
|
|
13270
|
-
const
|
|
13270
|
+
const H1 = Bt.object({
|
|
13271
13271
|
module_id: Bt.string().min(1),
|
|
13272
13272
|
digest: Bt.literal("SHA384"),
|
|
13273
13273
|
timestamp: Bt.number().min(1677721600),
|
|
@@ -13277,18 +13277,18 @@ const L1 = Bt.object({
|
|
|
13277
13277
|
public_key: Bt.nullable(Bt.instanceof(Uint8Array)),
|
|
13278
13278
|
user_data: Bt.nullable(Bt.instanceof(Uint8Array)),
|
|
13279
13279
|
nonce: Bt.nullable(Bt.instanceof(Uint8Array))
|
|
13280
|
-
}),
|
|
13280
|
+
}), F1 = Bt.object({
|
|
13281
13281
|
protected: Bt.instanceof(Uint8Array),
|
|
13282
13282
|
// There's an "unprotected" header in the CBOR, but we never use it
|
|
13283
13283
|
payload: Bt.instanceof(Uint8Array),
|
|
13284
13284
|
signature: Bt.instanceof(Uint8Array)
|
|
13285
13285
|
});
|
|
13286
|
-
async function
|
|
13286
|
+
async function G1(r) {
|
|
13287
13287
|
try {
|
|
13288
13288
|
if (!r)
|
|
13289
13289
|
throw new Error("Attestation document is empty.");
|
|
13290
13290
|
const e = Rs(r), t = Ca(e), n = t[0], i = t[2], s = t[3];
|
|
13291
|
-
return
|
|
13291
|
+
return F1.parse({
|
|
13292
13292
|
protected: n,
|
|
13293
13293
|
payload: i,
|
|
13294
13294
|
signature: s
|
|
@@ -13297,15 +13297,15 @@ async function F1(r) {
|
|
|
13297
13297
|
throw console.error("Error parsing document data:", e), new Error("Failed to parse document data.");
|
|
13298
13298
|
}
|
|
13299
13299
|
}
|
|
13300
|
-
async function
|
|
13300
|
+
async function z1(r) {
|
|
13301
13301
|
try {
|
|
13302
13302
|
const e = Ca(r);
|
|
13303
|
-
return
|
|
13303
|
+
return H1.parse(e);
|
|
13304
13304
|
} catch (e) {
|
|
13305
13305
|
throw console.error("Error parsing document payload:", e), new Error("Failed to parse document payload.");
|
|
13306
13306
|
}
|
|
13307
13307
|
}
|
|
13308
|
-
function
|
|
13308
|
+
function K1(r, e) {
|
|
13309
13309
|
const t = [
|
|
13310
13310
|
"Signature1",
|
|
13311
13311
|
// Context string
|
|
@@ -13318,10 +13318,10 @@ function z1(r, e) {
|
|
|
13318
13318
|
];
|
|
13319
13319
|
return Rc(t);
|
|
13320
13320
|
}
|
|
13321
|
-
async function
|
|
13321
|
+
async function q1(r, e) {
|
|
13322
13322
|
try {
|
|
13323
13323
|
console.log("SIGNATURE:"), console.log(_r(r.signature));
|
|
13324
|
-
const t =
|
|
13324
|
+
const t = K1(r.protected, r.payload), n = await crypto.subtle.digest("SHA-384", t);
|
|
13325
13325
|
return console.log("SIGNATURE STRUCTURE DIGEST:"), console.log(_r(new Uint8Array(n))), await crypto.subtle.verify(
|
|
13326
13326
|
// TODO: these could be derived from the document, but we're hardcoding them for now
|
|
13327
13327
|
{
|
|
@@ -13338,7 +13338,7 @@ async function K1(r, e) {
|
|
|
13338
13338
|
}
|
|
13339
13339
|
async function Si(r, e, t) {
|
|
13340
13340
|
try {
|
|
13341
|
-
const n = await
|
|
13341
|
+
const n = await G1(r), i = await z1(n.payload);
|
|
13342
13342
|
if (!i.nonce)
|
|
13343
13343
|
throw new Error("Attestation document does not have a nonce.");
|
|
13344
13344
|
const o = new TextDecoder("utf-8").decode(i.nonce);
|
|
@@ -13351,7 +13351,7 @@ async function Si(r, e, t) {
|
|
|
13351
13351
|
const P = new wi(i.cabundle[I]);
|
|
13352
13352
|
c.push(P);
|
|
13353
13353
|
}
|
|
13354
|
-
const h = new wi(i.certificate), b = await new
|
|
13354
|
+
const h = new wi(i.certificate), b = await new hm({
|
|
13355
13355
|
certificates: c
|
|
13356
13356
|
}).build(h);
|
|
13357
13357
|
console.log("Chain items:", b);
|
|
@@ -13366,7 +13366,7 @@ async function Si(r, e, t) {
|
|
|
13366
13366
|
throw new Error("Certificate chain length does not match length of cabundle.");
|
|
13367
13367
|
const m = h.publicKey;
|
|
13368
13368
|
console.log("PUBLIC KEY:"), console.log(_r(new Uint8Array(m.rawData)));
|
|
13369
|
-
const A = await m.export(), k = await
|
|
13369
|
+
const A = await m.export(), k = await q1(n, A);
|
|
13370
13370
|
if (console.log("Signature verified:", k), !k)
|
|
13371
13371
|
throw new Error("Signature verification failed.");
|
|
13372
13372
|
return i;
|
|
@@ -13374,29 +13374,29 @@ async function Si(r, e, t) {
|
|
|
13374
13374
|
throw console.error("Error verifying attestation document:", n), n;
|
|
13375
13375
|
}
|
|
13376
13376
|
}
|
|
13377
|
-
const
|
|
13377
|
+
const Z1 = Bt.object({
|
|
13378
13378
|
public_key: Bt.nullable(Bt.instanceof(Uint8Array))
|
|
13379
13379
|
});
|
|
13380
|
-
async function
|
|
13380
|
+
async function W1(r) {
|
|
13381
13381
|
const e = Rs(r), n = Ca(e)[2], i = Ca(n);
|
|
13382
|
-
return await
|
|
13382
|
+
return await Z1.parse(i);
|
|
13383
13383
|
}
|
|
13384
|
-
async function
|
|
13384
|
+
async function Y1(r, e) {
|
|
13385
13385
|
try {
|
|
13386
|
-
const t = await
|
|
13387
|
-
return n && (n === "http://127.0.0.1:3000" || n === "http://localhost:3000" || n === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await
|
|
13386
|
+
const t = await ww(r, e), n = e || hw();
|
|
13387
|
+
return n && (n === "http://127.0.0.1:3000" || n === "http://localhost:3000" || n === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await W1(t)) : await Si(t, Ua, r);
|
|
13388
13388
|
} catch (t) {
|
|
13389
13389
|
throw t instanceof Error ? (console.error("Error verifying attestation document:", t), new Error(`Couldn't process attestation document: ${t.message}`)) : (console.error("Error verifying attestation document:", t), new Error("Couldn't process attestation document."));
|
|
13390
13390
|
}
|
|
13391
13391
|
}
|
|
13392
|
-
function
|
|
13392
|
+
function J1(r) {
|
|
13393
13393
|
throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
13394
13394
|
}
|
|
13395
13395
|
var V0 = { exports: {} };
|
|
13396
|
-
const
|
|
13396
|
+
const X1 = {}, Q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13397
13397
|
__proto__: null,
|
|
13398
|
-
default:
|
|
13399
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
13398
|
+
default: X1
|
|
13399
|
+
}, Symbol.toStringTag, { value: "Module" })), ew = /* @__PURE__ */ vg(Q1);
|
|
13400
13400
|
(function(r) {
|
|
13401
13401
|
(function(e) {
|
|
13402
13402
|
var t = function(l) {
|
|
@@ -13891,7 +13891,7 @@ const J1 = {}, X1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13891
13891
|
for (g = 0; g < d; g++) l[g] = p[g + 64];
|
|
13892
13892
|
return d;
|
|
13893
13893
|
}
|
|
13894
|
-
var C = 32, N = 24, K = 32,
|
|
13894
|
+
var C = 32, N = 24, K = 32, Ae = 16, _t = 32, Et = 32, $e = 32, Z = 32, ee = 32, ce = N, ve = K, et = Ae, nt = 64, bt = 32, Gt = 64, Ti = 32, Ss = 64;
|
|
13895
13895
|
e.lowlevel = {
|
|
13896
13896
|
crypto_core_hsalsa20: tt,
|
|
13897
13897
|
crypto_stream_xor: pt,
|
|
@@ -13918,7 +13918,7 @@ const J1 = {}, X1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13918
13918
|
crypto_secretbox_KEYBYTES: C,
|
|
13919
13919
|
crypto_secretbox_NONCEBYTES: N,
|
|
13920
13920
|
crypto_secretbox_ZEROBYTES: K,
|
|
13921
|
-
crypto_secretbox_BOXZEROBYTES:
|
|
13921
|
+
crypto_secretbox_BOXZEROBYTES: Ae,
|
|
13922
13922
|
crypto_scalarmult_BYTES: _t,
|
|
13923
13923
|
crypto_scalarmult_SCALARBYTES: Et,
|
|
13924
13924
|
crypto_box_PUBLICKEYBYTES: $e,
|
|
@@ -13952,7 +13952,7 @@ const J1 = {}, X1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13952
13952
|
if (l.length !== C) throw new Error("bad key size");
|
|
13953
13953
|
if (p.length !== N) throw new Error("bad nonce size");
|
|
13954
13954
|
}
|
|
13955
|
-
function
|
|
13955
|
+
function Qy(l, p) {
|
|
13956
13956
|
if (l.length !== $e) throw new Error("bad public key size");
|
|
13957
13957
|
if (p.length !== Z) throw new Error("bad secret key size");
|
|
13958
13958
|
}
|
|
@@ -13970,12 +13970,12 @@ const J1 = {}, X1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13970
13970
|
}, e.secretbox = function(l, p, d) {
|
|
13971
13971
|
xr(l, p, d), Oo(d, p);
|
|
13972
13972
|
for (var a = new Uint8Array(K + l.length), g = new Uint8Array(a.length), S = 0; S < l.length; S++) a[S + K] = l[S];
|
|
13973
|
-
return Se(g, a, a.length, p, d), g.subarray(
|
|
13973
|
+
return Se(g, a, a.length, p, d), g.subarray(Ae);
|
|
13974
13974
|
}, e.secretbox.open = function(l, p, d) {
|
|
13975
13975
|
xr(l, p, d), Oo(d, p);
|
|
13976
|
-
for (var a = new Uint8Array(
|
|
13976
|
+
for (var a = new Uint8Array(Ae + l.length), g = new Uint8Array(a.length), S = 0; S < l.length; S++) a[S + Ae] = l[S];
|
|
13977
13977
|
return a.length < 32 || Re(g, a, a.length, p, d) !== 0 ? null : g.subarray(K);
|
|
13978
|
-
}, e.secretbox.keyLength = C, e.secretbox.nonceLength = N, e.secretbox.overheadLength =
|
|
13978
|
+
}, e.secretbox.keyLength = C, e.secretbox.nonceLength = N, e.secretbox.overheadLength = Ae, e.scalarMult = function(l, p) {
|
|
13979
13979
|
if (xr(l, p), l.length !== Et) throw new Error("bad n size");
|
|
13980
13980
|
if (p.length !== _t) throw new Error("bad p size");
|
|
13981
13981
|
var d = new Uint8Array(_t);
|
|
@@ -13988,7 +13988,7 @@ const J1 = {}, X1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13988
13988
|
var g = e.box.before(d, a);
|
|
13989
13989
|
return e.secretbox(l, p, g);
|
|
13990
13990
|
}, e.box.before = function(l, p) {
|
|
13991
|
-
xr(l, p),
|
|
13991
|
+
xr(l, p), Qy(l, p);
|
|
13992
13992
|
var d = new Uint8Array(ee);
|
|
13993
13993
|
return pn(d, l, p), d;
|
|
13994
13994
|
}, e.box.after = e.secretbox, e.box.open = function(l, p, d, a) {
|
|
@@ -14058,7 +14058,7 @@ const J1 = {}, X1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14058
14058
|
for (g = 0; g < a; g++) d[g] = S[g];
|
|
14059
14059
|
kf(S);
|
|
14060
14060
|
});
|
|
14061
|
-
} else typeof
|
|
14061
|
+
} else typeof J1 < "u" && (l = ew, l && l.randomBytes && e.setPRNG(function(d, a) {
|
|
14062
14062
|
var g, S = l.randomBytes(a);
|
|
14063
14063
|
for (g = 0; g < a; g++) d[g] = S[g];
|
|
14064
14064
|
kf(S);
|
|
@@ -14066,9 +14066,9 @@ const J1 = {}, X1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14066
14066
|
}();
|
|
14067
14067
|
})(r.exports ? r.exports : self.nacl = self.nacl || {});
|
|
14068
14068
|
})(V0);
|
|
14069
|
-
var
|
|
14070
|
-
const L0 = /* @__PURE__ */
|
|
14071
|
-
function
|
|
14069
|
+
var tw = V0.exports;
|
|
14070
|
+
const L0 = /* @__PURE__ */ gg(tw);
|
|
14071
|
+
function rw() {
|
|
14072
14072
|
return L0.box.keyPair();
|
|
14073
14073
|
}
|
|
14074
14074
|
async function _i(r, e) {
|
|
@@ -14081,12 +14081,12 @@ async function _i(r, e) {
|
|
|
14081
14081
|
}
|
|
14082
14082
|
const i = window.crypto.randomUUID();
|
|
14083
14083
|
console.log("Generated attestation nonce:", i);
|
|
14084
|
-
const s = await
|
|
14084
|
+
const s = await Y1(i, e);
|
|
14085
14085
|
if (s && s.public_key) {
|
|
14086
14086
|
console.log("Attestation document verification succeeded");
|
|
14087
|
-
const o =
|
|
14087
|
+
const o = rw();
|
|
14088
14088
|
console.log("Generated client key pair");
|
|
14089
|
-
const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await
|
|
14089
|
+
const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await bw(
|
|
14090
14090
|
_r(o.publicKey),
|
|
14091
14091
|
i,
|
|
14092
14092
|
e
|
|
@@ -14105,10 +14105,10 @@ async function _i(r, e) {
|
|
|
14105
14105
|
}
|
|
14106
14106
|
}
|
|
14107
14107
|
let ut = "";
|
|
14108
|
-
function
|
|
14108
|
+
function nw(r) {
|
|
14109
14109
|
ut = r;
|
|
14110
14110
|
}
|
|
14111
|
-
async function
|
|
14111
|
+
async function iw(r, e) {
|
|
14112
14112
|
return Tt(
|
|
14113
14113
|
`${ut}/platform/login`,
|
|
14114
14114
|
"POST",
|
|
@@ -14117,7 +14117,7 @@ async function nw(r, e) {
|
|
|
14117
14117
|
"Failed to login"
|
|
14118
14118
|
);
|
|
14119
14119
|
}
|
|
14120
|
-
async function
|
|
14120
|
+
async function sw(r, e, t, n) {
|
|
14121
14121
|
return Tt(
|
|
14122
14122
|
`${ut}/platform/register`,
|
|
14123
14123
|
"POST",
|
|
@@ -14126,7 +14126,7 @@ async function iw(r, e, t, n) {
|
|
|
14126
14126
|
"Failed to register"
|
|
14127
14127
|
);
|
|
14128
14128
|
}
|
|
14129
|
-
async function
|
|
14129
|
+
async function ow(r) {
|
|
14130
14130
|
return Tt(
|
|
14131
14131
|
`${ut}/platform/logout`,
|
|
14132
14132
|
"POST",
|
|
@@ -14135,7 +14135,7 @@ async function sw(r) {
|
|
|
14135
14135
|
"Failed to logout"
|
|
14136
14136
|
);
|
|
14137
14137
|
}
|
|
14138
|
-
async function
|
|
14138
|
+
async function aw() {
|
|
14139
14139
|
const r = window.localStorage.getItem("refresh_token");
|
|
14140
14140
|
if (!r) throw new Error("No refresh token available");
|
|
14141
14141
|
const e = { refresh_token: r };
|
|
@@ -14208,12 +14208,12 @@ async function W0(r, e) {
|
|
|
14208
14208
|
void 0
|
|
14209
14209
|
);
|
|
14210
14210
|
}
|
|
14211
|
-
function
|
|
14211
|
+
function cw(r) {
|
|
14212
14212
|
const e = /^[A-Za-z0-9+/]*[=]{0,2}$/, t = r.length % 4 === 0, n = e.test(r);
|
|
14213
14213
|
return t && n;
|
|
14214
14214
|
}
|
|
14215
14215
|
async function Y0(r, e, t, n) {
|
|
14216
|
-
if (!
|
|
14216
|
+
if (!cw(n))
|
|
14217
14217
|
throw new Error(
|
|
14218
14218
|
"Secret must be base64 encoded. Use @stablelib/base64's encode function to encode your data."
|
|
14219
14219
|
);
|
|
@@ -14323,7 +14323,7 @@ async function uy(r) {
|
|
|
14323
14323
|
void 0
|
|
14324
14324
|
);
|
|
14325
14325
|
}
|
|
14326
|
-
async function
|
|
14326
|
+
async function lw() {
|
|
14327
14327
|
return pe(`${ut}/platform/me`, "GET", void 0);
|
|
14328
14328
|
}
|
|
14329
14329
|
async function fy(r) {
|
|
@@ -14383,7 +14383,7 @@ async function py(r, e) {
|
|
|
14383
14383
|
"Failed to change platform password"
|
|
14384
14384
|
);
|
|
14385
14385
|
}
|
|
14386
|
-
class
|
|
14386
|
+
class uw {
|
|
14387
14387
|
constructor() {
|
|
14388
14388
|
Ke(this, "_appApiUrl", "");
|
|
14389
14389
|
Ke(this, "_platformApiUrl", "");
|
|
@@ -14438,7 +14438,7 @@ class lw {
|
|
|
14438
14438
|
return this.isPlatformPath(e) ? "platformRefreshToken" : "refreshToken";
|
|
14439
14439
|
}
|
|
14440
14440
|
}
|
|
14441
|
-
const $a = new
|
|
14441
|
+
const $a = new uw(), yy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14442
14442
|
__proto__: null,
|
|
14443
14443
|
apiConfig: $a
|
|
14444
14444
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -14448,7 +14448,7 @@ async function pe(r, e, t, n) {
|
|
|
14448
14448
|
if (s) {
|
|
14449
14449
|
console.log("Refreshing access token");
|
|
14450
14450
|
const u = $a.getRefreshFunction(r);
|
|
14451
|
-
console.log(`Using ${u}`), u === "platformRefreshToken" ? await
|
|
14451
|
+
console.log(`Using ${u}`), u === "platformRefreshToken" ? await aw() : await Dc();
|
|
14452
14452
|
}
|
|
14453
14453
|
const o = window.localStorage.getItem("access_token");
|
|
14454
14454
|
if (!o)
|
|
@@ -14548,29 +14548,29 @@ async function Tt(r, e, t, n, i) {
|
|
|
14548
14548
|
throw new Error("No data received from the server");
|
|
14549
14549
|
return s.data;
|
|
14550
14550
|
}
|
|
14551
|
-
let
|
|
14552
|
-
function
|
|
14553
|
-
|
|
14551
|
+
let xe = "";
|
|
14552
|
+
function fw(r) {
|
|
14553
|
+
xe = r;
|
|
14554
14554
|
}
|
|
14555
|
-
function
|
|
14556
|
-
return
|
|
14555
|
+
function hw() {
|
|
14556
|
+
return xe;
|
|
14557
14557
|
}
|
|
14558
|
-
async function
|
|
14558
|
+
async function dw(r, e, t) {
|
|
14559
14559
|
return Tt(
|
|
14560
|
-
`${
|
|
14560
|
+
`${xe}/login`,
|
|
14561
14561
|
"POST",
|
|
14562
14562
|
{ email: r, password: e, client_id: t }
|
|
14563
14563
|
);
|
|
14564
14564
|
}
|
|
14565
|
-
async function
|
|
14565
|
+
async function pw(r, e, t) {
|
|
14566
14566
|
return Tt(
|
|
14567
|
-
`${
|
|
14567
|
+
`${xe}/login`,
|
|
14568
14568
|
"POST",
|
|
14569
14569
|
{ id: r, password: e, client_id: t }
|
|
14570
14570
|
);
|
|
14571
14571
|
}
|
|
14572
|
-
async function
|
|
14573
|
-
return Tt(`${
|
|
14572
|
+
async function yw(r, e, t, n, i) {
|
|
14573
|
+
return Tt(`${xe}/register`, "POST", {
|
|
14574
14574
|
email: r,
|
|
14575
14575
|
password: e,
|
|
14576
14576
|
inviteCode: t.toLowerCase(),
|
|
@@ -14578,8 +14578,8 @@ async function pw(r, e, t, n, i) {
|
|
|
14578
14578
|
name: i
|
|
14579
14579
|
});
|
|
14580
14580
|
}
|
|
14581
|
-
async function
|
|
14582
|
-
return Tt(`${
|
|
14581
|
+
async function gw(r, e, t) {
|
|
14582
|
+
return Tt(`${xe}/register`, "POST", {
|
|
14583
14583
|
password: r,
|
|
14584
14584
|
inviteCode: e.toLowerCase(),
|
|
14585
14585
|
client_id: t
|
|
@@ -14591,7 +14591,7 @@ async function Dc() {
|
|
|
14591
14591
|
const e = { refresh_token: r };
|
|
14592
14592
|
try {
|
|
14593
14593
|
const t = await Tt(
|
|
14594
|
-
`${
|
|
14594
|
+
`${xe}/refresh`,
|
|
14595
14595
|
"POST",
|
|
14596
14596
|
e,
|
|
14597
14597
|
void 0,
|
|
@@ -14602,9 +14602,9 @@ async function Dc() {
|
|
|
14602
14602
|
throw console.error("Error refreshing token:", t), t;
|
|
14603
14603
|
}
|
|
14604
14604
|
}
|
|
14605
|
-
async function
|
|
14605
|
+
async function vw() {
|
|
14606
14606
|
return pe(
|
|
14607
|
-
`${
|
|
14607
|
+
`${xe}/protected/user`,
|
|
14608
14608
|
"GET",
|
|
14609
14609
|
void 0,
|
|
14610
14610
|
"Failed to fetch user"
|
|
@@ -14612,7 +14612,7 @@ async function gw() {
|
|
|
14612
14612
|
}
|
|
14613
14613
|
async function vy(r, e) {
|
|
14614
14614
|
return pe(
|
|
14615
|
-
`${
|
|
14615
|
+
`${xe}/protected/kv/${r}`,
|
|
14616
14616
|
"PUT",
|
|
14617
14617
|
e,
|
|
14618
14618
|
"Failed to put key-value pair"
|
|
@@ -14620,7 +14620,7 @@ async function vy(r, e) {
|
|
|
14620
14620
|
}
|
|
14621
14621
|
async function my(r) {
|
|
14622
14622
|
return pe(
|
|
14623
|
-
`${
|
|
14623
|
+
`${xe}/protected/kv/${r}`,
|
|
14624
14624
|
"DELETE",
|
|
14625
14625
|
void 0,
|
|
14626
14626
|
"Failed to delete key-value pair"
|
|
@@ -14628,7 +14628,7 @@ async function my(r) {
|
|
|
14628
14628
|
}
|
|
14629
14629
|
async function wy() {
|
|
14630
14630
|
return pe(
|
|
14631
|
-
`${
|
|
14631
|
+
`${xe}/protected/kv`,
|
|
14632
14632
|
"DELETE",
|
|
14633
14633
|
void 0,
|
|
14634
14634
|
"Failed to delete all key-value pairs"
|
|
@@ -14637,7 +14637,7 @@ async function wy() {
|
|
|
14637
14637
|
async function by(r) {
|
|
14638
14638
|
try {
|
|
14639
14639
|
return await pe(
|
|
14640
|
-
`${
|
|
14640
|
+
`${xe}/protected/kv/${r}`,
|
|
14641
14641
|
"GET",
|
|
14642
14642
|
void 0,
|
|
14643
14643
|
"Failed to get key-value pair"
|
|
@@ -14649,19 +14649,19 @@ async function by(r) {
|
|
|
14649
14649
|
}
|
|
14650
14650
|
async function xy() {
|
|
14651
14651
|
return pe(
|
|
14652
|
-
`${
|
|
14652
|
+
`${xe}/protected/kv`,
|
|
14653
14653
|
"GET",
|
|
14654
14654
|
void 0,
|
|
14655
14655
|
"Failed to list key-value pairs"
|
|
14656
14656
|
);
|
|
14657
14657
|
}
|
|
14658
|
-
async function
|
|
14658
|
+
async function mw(r) {
|
|
14659
14659
|
const e = { refresh_token: r };
|
|
14660
|
-
return Tt(`${
|
|
14660
|
+
return Tt(`${xe}/logout`, "POST", e);
|
|
14661
14661
|
}
|
|
14662
14662
|
async function Ay(r) {
|
|
14663
14663
|
return Tt(
|
|
14664
|
-
`${
|
|
14664
|
+
`${xe}/verify-email/${r}`,
|
|
14665
14665
|
"GET",
|
|
14666
14666
|
void 0,
|
|
14667
14667
|
void 0,
|
|
@@ -14670,20 +14670,20 @@ async function Ay(r) {
|
|
|
14670
14670
|
}
|
|
14671
14671
|
async function Ma() {
|
|
14672
14672
|
return pe(
|
|
14673
|
-
`${
|
|
14673
|
+
`${xe}/protected/request_verification`,
|
|
14674
14674
|
"POST",
|
|
14675
14675
|
void 0,
|
|
14676
14676
|
"Failed to request new verification code"
|
|
14677
14677
|
);
|
|
14678
14678
|
}
|
|
14679
|
-
async function
|
|
14680
|
-
const n = await fetch(`${e ||
|
|
14679
|
+
async function ww(r, e) {
|
|
14680
|
+
const n = await fetch(`${e || xe}/attestation/${r}`);
|
|
14681
14681
|
if (!n.ok)
|
|
14682
14682
|
throw new Error(`Request failed with status ${n.status}`);
|
|
14683
14683
|
return (await n.json()).attestation_document;
|
|
14684
14684
|
}
|
|
14685
|
-
async function
|
|
14686
|
-
const i = await fetch(`${t ||
|
|
14685
|
+
async function bw(r, e, t) {
|
|
14686
|
+
const i = await fetch(`${t || xe}/key_exchange`, {
|
|
14687
14687
|
method: "POST",
|
|
14688
14688
|
headers: {
|
|
14689
14689
|
"Content-Type": "application/json"
|
|
@@ -14694,21 +14694,21 @@ async function ww(r, e, t) {
|
|
|
14694
14694
|
throw new Error("Key exchange failed");
|
|
14695
14695
|
return i.json();
|
|
14696
14696
|
}
|
|
14697
|
-
async function
|
|
14697
|
+
async function xw(r, e, t) {
|
|
14698
14698
|
const n = {
|
|
14699
14699
|
email: r,
|
|
14700
14700
|
hashed_secret: e,
|
|
14701
14701
|
client_id: t
|
|
14702
14702
|
};
|
|
14703
14703
|
return Tt(
|
|
14704
|
-
`${
|
|
14704
|
+
`${xe}/password-reset/request`,
|
|
14705
14705
|
"POST",
|
|
14706
14706
|
n,
|
|
14707
14707
|
void 0,
|
|
14708
14708
|
"Failed to request password reset"
|
|
14709
14709
|
);
|
|
14710
14710
|
}
|
|
14711
|
-
async function
|
|
14711
|
+
async function Aw(r, e, t, n, i) {
|
|
14712
14712
|
const s = {
|
|
14713
14713
|
email: r,
|
|
14714
14714
|
alphanumeric_code: e,
|
|
@@ -14717,7 +14717,7 @@ async function xw(r, e, t, n, i) {
|
|
|
14717
14717
|
client_id: i
|
|
14718
14718
|
};
|
|
14719
14719
|
return Tt(
|
|
14720
|
-
`${
|
|
14720
|
+
`${xe}/password-reset/confirm`,
|
|
14721
14721
|
"POST",
|
|
14722
14722
|
s,
|
|
14723
14723
|
void 0,
|
|
@@ -14730,16 +14730,16 @@ async function Sy(r, e) {
|
|
|
14730
14730
|
new_password: e
|
|
14731
14731
|
};
|
|
14732
14732
|
return pe(
|
|
14733
|
-
`${
|
|
14733
|
+
`${xe}/protected/change_password`,
|
|
14734
14734
|
"POST",
|
|
14735
14735
|
t,
|
|
14736
14736
|
"Failed to change password"
|
|
14737
14737
|
);
|
|
14738
14738
|
}
|
|
14739
|
-
async function
|
|
14739
|
+
async function Sw(r, e) {
|
|
14740
14740
|
try {
|
|
14741
14741
|
return await Tt(
|
|
14742
|
-
`${
|
|
14742
|
+
`${xe}/auth/github`,
|
|
14743
14743
|
"POST",
|
|
14744
14744
|
e ? { invite_code: e, client_id: r } : { client_id: r },
|
|
14745
14745
|
void 0,
|
|
@@ -14749,11 +14749,11 @@ async function Aw(r, e) {
|
|
|
14749
14749
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14750
14750
|
}
|
|
14751
14751
|
}
|
|
14752
|
-
async function
|
|
14752
|
+
async function _w(r, e, t) {
|
|
14753
14753
|
const n = { code: r, state: e, invite_code: t };
|
|
14754
14754
|
try {
|
|
14755
14755
|
return await Tt(
|
|
14756
|
-
`${
|
|
14756
|
+
`${xe}/auth/github/callback`,
|
|
14757
14757
|
"POST",
|
|
14758
14758
|
n,
|
|
14759
14759
|
void 0,
|
|
@@ -14767,10 +14767,10 @@ async function Sw(r, e, t) {
|
|
|
14767
14767
|
) : new Error("Failed to authenticate with GitHub. Please try again.") : i;
|
|
14768
14768
|
}
|
|
14769
14769
|
}
|
|
14770
|
-
async function
|
|
14770
|
+
async function Ew(r, e) {
|
|
14771
14771
|
try {
|
|
14772
14772
|
return await Tt(
|
|
14773
|
-
`${
|
|
14773
|
+
`${xe}/auth/google`,
|
|
14774
14774
|
"POST",
|
|
14775
14775
|
e ? { invite_code: e, client_id: r } : { client_id: r },
|
|
14776
14776
|
void 0,
|
|
@@ -14780,11 +14780,11 @@ async function _w(r, e) {
|
|
|
14780
14780
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14781
14781
|
}
|
|
14782
14782
|
}
|
|
14783
|
-
async function
|
|
14783
|
+
async function Iw(r, e, t) {
|
|
14784
14784
|
const n = { code: r, state: e, invite_code: t };
|
|
14785
14785
|
try {
|
|
14786
14786
|
return await Tt(
|
|
14787
|
-
`${
|
|
14787
|
+
`${xe}/auth/google/callback`,
|
|
14788
14788
|
"POST",
|
|
14789
14789
|
n,
|
|
14790
14790
|
void 0,
|
|
@@ -14798,10 +14798,10 @@ async function Ew(r, e, t) {
|
|
|
14798
14798
|
) : new Error("Failed to authenticate with Google. Please try again.") : i;
|
|
14799
14799
|
}
|
|
14800
14800
|
}
|
|
14801
|
-
async function
|
|
14801
|
+
async function kw(r, e) {
|
|
14802
14802
|
try {
|
|
14803
14803
|
return await Tt(
|
|
14804
|
-
`${
|
|
14804
|
+
`${xe}/auth/apple`,
|
|
14805
14805
|
"POST",
|
|
14806
14806
|
e ? { invite_code: e, client_id: r } : { client_id: r },
|
|
14807
14807
|
void 0,
|
|
@@ -14811,11 +14811,11 @@ async function Iw(r, e) {
|
|
|
14811
14811
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14812
14812
|
}
|
|
14813
14813
|
}
|
|
14814
|
-
async function
|
|
14814
|
+
async function Cw(r, e, t) {
|
|
14815
14815
|
const n = { code: r, state: e, invite_code: t };
|
|
14816
14816
|
try {
|
|
14817
14817
|
return await Tt(
|
|
14818
|
-
`${
|
|
14818
|
+
`${xe}/auth/apple/callback`,
|
|
14819
14819
|
"POST",
|
|
14820
14820
|
n,
|
|
14821
14821
|
void 0,
|
|
@@ -14829,7 +14829,7 @@ async function kw(r, e, t) {
|
|
|
14829
14829
|
) : new Error("Failed to authenticate with Apple. Please try again.") : i;
|
|
14830
14830
|
}
|
|
14831
14831
|
}
|
|
14832
|
-
async function
|
|
14832
|
+
async function Bw(r, e, t) {
|
|
14833
14833
|
const n = {
|
|
14834
14834
|
...r,
|
|
14835
14835
|
client_id: e,
|
|
@@ -14837,7 +14837,7 @@ async function Cw(r, e, t) {
|
|
|
14837
14837
|
};
|
|
14838
14838
|
try {
|
|
14839
14839
|
return await Tt(
|
|
14840
|
-
`${
|
|
14840
|
+
`${xe}/auth/apple/native`,
|
|
14841
14841
|
"POST",
|
|
14842
14842
|
n,
|
|
14843
14843
|
void 0,
|
|
@@ -14852,7 +14852,7 @@ async function Cw(r, e, t) {
|
|
|
14852
14852
|
}
|
|
14853
14853
|
}
|
|
14854
14854
|
async function _y(r) {
|
|
14855
|
-
let e = `${
|
|
14855
|
+
let e = `${xe}/protected/private_key`;
|
|
14856
14856
|
const t = [];
|
|
14857
14857
|
return r != null && r.seed_phrase_derivation_path && t.push(
|
|
14858
14858
|
`seed_phrase_derivation_path=${encodeURIComponent(r.seed_phrase_derivation_path)}`
|
|
@@ -14866,7 +14866,7 @@ async function _y(r) {
|
|
|
14866
14866
|
);
|
|
14867
14867
|
}
|
|
14868
14868
|
async function Ey(r) {
|
|
14869
|
-
let e = `${
|
|
14869
|
+
let e = `${xe}/protected/private_key_bytes`;
|
|
14870
14870
|
const t = [];
|
|
14871
14871
|
return r != null && r.seed_phrase_derivation_path && t.push(
|
|
14872
14872
|
`seed_phrase_derivation_path=${encodeURIComponent(r.seed_phrase_derivation_path)}`
|
|
@@ -14886,14 +14886,14 @@ async function Iy(r, e, t) {
|
|
|
14886
14886
|
...t && Object.keys(t).length > 0 && { key_options: t }
|
|
14887
14887
|
};
|
|
14888
14888
|
return pe(
|
|
14889
|
-
`${
|
|
14889
|
+
`${xe}/protected/sign_message`,
|
|
14890
14890
|
"POST",
|
|
14891
14891
|
i,
|
|
14892
14892
|
"Failed to sign message"
|
|
14893
14893
|
);
|
|
14894
14894
|
}
|
|
14895
14895
|
async function ky(r, e) {
|
|
14896
|
-
let t = `${
|
|
14896
|
+
let t = `${xe}/protected/public_key?algorithm=${r}`;
|
|
14897
14897
|
return e != null && e.seed_phrase_derivation_path && (t += `&seed_phrase_derivation_path=${encodeURIComponent(e.seed_phrase_derivation_path)}`), e != null && e.private_key_derivation_path && (t += `&private_key_derivation_path=${encodeURIComponent(e.private_key_derivation_path)}`), pe(
|
|
14898
14898
|
t,
|
|
14899
14899
|
"GET",
|
|
@@ -14901,22 +14901,22 @@ async function ky(r, e) {
|
|
|
14901
14901
|
"Failed to fetch public key"
|
|
14902
14902
|
);
|
|
14903
14903
|
}
|
|
14904
|
-
async function
|
|
14904
|
+
async function Ow(r, e, t) {
|
|
14905
14905
|
const n = {
|
|
14906
14906
|
email: r,
|
|
14907
14907
|
password: e,
|
|
14908
14908
|
...t !== void 0 && { name: t }
|
|
14909
14909
|
};
|
|
14910
14910
|
return pe(
|
|
14911
|
-
`${
|
|
14911
|
+
`${xe}/protected/convert_guest`,
|
|
14912
14912
|
"POST",
|
|
14913
14913
|
n,
|
|
14914
14914
|
"Failed to convert guest account"
|
|
14915
14915
|
);
|
|
14916
14916
|
}
|
|
14917
|
-
async function
|
|
14917
|
+
async function Tw(r) {
|
|
14918
14918
|
return pe(
|
|
14919
|
-
`${
|
|
14919
|
+
`${xe}/protected/third_party_token`,
|
|
14920
14920
|
"POST",
|
|
14921
14921
|
r ? { audience: r } : {},
|
|
14922
14922
|
"Failed to generate third party token"
|
|
@@ -14928,7 +14928,7 @@ async function Cy(r, e) {
|
|
|
14928
14928
|
...e && Object.keys(e).length > 0 && { key_options: e }
|
|
14929
14929
|
};
|
|
14930
14930
|
return pe(
|
|
14931
|
-
`${
|
|
14931
|
+
`${xe}/protected/encrypt`,
|
|
14932
14932
|
"POST",
|
|
14933
14933
|
t,
|
|
14934
14934
|
"Failed to encrypt data"
|
|
@@ -14940,30 +14940,30 @@ async function By(r, e) {
|
|
|
14940
14940
|
...e && Object.keys(e).length > 0 && { key_options: e }
|
|
14941
14941
|
};
|
|
14942
14942
|
return pe(
|
|
14943
|
-
`${
|
|
14943
|
+
`${xe}/protected/decrypt`,
|
|
14944
14944
|
"POST",
|
|
14945
14945
|
t,
|
|
14946
14946
|
"Failed to decrypt data"
|
|
14947
14947
|
);
|
|
14948
14948
|
}
|
|
14949
|
-
async function
|
|
14949
|
+
async function Nw(r) {
|
|
14950
14950
|
const e = {
|
|
14951
14951
|
hashed_secret: r
|
|
14952
14952
|
};
|
|
14953
14953
|
return pe(
|
|
14954
|
-
`${
|
|
14954
|
+
`${xe}/protected/delete-account/request`,
|
|
14955
14955
|
"POST",
|
|
14956
14956
|
e,
|
|
14957
14957
|
"Failed to request account deletion"
|
|
14958
14958
|
);
|
|
14959
14959
|
}
|
|
14960
|
-
async function
|
|
14960
|
+
async function Pw(r, e) {
|
|
14961
14961
|
const t = {
|
|
14962
14962
|
confirmation_code: r,
|
|
14963
14963
|
plaintext_secret: e
|
|
14964
14964
|
};
|
|
14965
14965
|
return pe(
|
|
14966
|
-
`${
|
|
14966
|
+
`${xe}/protected/delete-account/confirm`,
|
|
14967
14967
|
"POST",
|
|
14968
14968
|
t,
|
|
14969
14969
|
"Failed to confirm account deletion"
|
|
@@ -14972,7 +14972,7 @@ async function Nw(r, e) {
|
|
|
14972
14972
|
async function Oy(r) {
|
|
14973
14973
|
try {
|
|
14974
14974
|
const e = await gy(
|
|
14975
|
-
`${
|
|
14975
|
+
`${xe}/v1/models`,
|
|
14976
14976
|
"GET",
|
|
14977
14977
|
void 0,
|
|
14978
14978
|
"Failed to fetch models",
|
|
@@ -14988,12 +14988,12 @@ async function Oy(r) {
|
|
|
14988
14988
|
}
|
|
14989
14989
|
}
|
|
14990
14990
|
const wd = 10 * 1024 * 1024;
|
|
14991
|
-
function
|
|
14991
|
+
function jw(r) {
|
|
14992
14992
|
return new Promise((e) => setTimeout(e, r));
|
|
14993
14993
|
}
|
|
14994
14994
|
async function Ty(r) {
|
|
14995
14995
|
return pe(
|
|
14996
|
-
`${
|
|
14996
|
+
`${xe}/protected/api-keys`,
|
|
14997
14997
|
"POST",
|
|
14998
14998
|
{ name: r },
|
|
14999
14999
|
"Failed to create API key"
|
|
@@ -15001,7 +15001,7 @@ async function Ty(r) {
|
|
|
15001
15001
|
}
|
|
15002
15002
|
async function Ny() {
|
|
15003
15003
|
const r = await pe(
|
|
15004
|
-
`${
|
|
15004
|
+
`${xe}/protected/api-keys`,
|
|
15005
15005
|
"GET",
|
|
15006
15006
|
void 0,
|
|
15007
15007
|
"Failed to list API keys"
|
|
@@ -15011,7 +15011,7 @@ async function Ny() {
|
|
|
15011
15011
|
async function Py(r) {
|
|
15012
15012
|
const e = encodeURIComponent(r);
|
|
15013
15013
|
return pe(
|
|
15014
|
-
`${
|
|
15014
|
+
`${xe}/protected/api-keys/${e}`,
|
|
15015
15015
|
"DELETE",
|
|
15016
15016
|
void 0,
|
|
15017
15017
|
"Failed to delete API key"
|
|
@@ -15025,7 +15025,7 @@ async function Ef(r) {
|
|
|
15025
15025
|
content_base64: n
|
|
15026
15026
|
};
|
|
15027
15027
|
return pe(
|
|
15028
|
-
`${
|
|
15028
|
+
`${xe}/v1/documents/upload`,
|
|
15029
15029
|
"POST",
|
|
15030
15030
|
s,
|
|
15031
15031
|
"Failed to upload document"
|
|
@@ -15036,7 +15036,7 @@ async function If(r) {
|
|
|
15036
15036
|
task_id: r
|
|
15037
15037
|
};
|
|
15038
15038
|
return pe(
|
|
15039
|
-
`${
|
|
15039
|
+
`${xe}/v1/documents/status`,
|
|
15040
15040
|
"POST",
|
|
15041
15041
|
e,
|
|
15042
15042
|
"Failed to check document status"
|
|
@@ -15056,7 +15056,7 @@ async function jy(r, e) {
|
|
|
15056
15056
|
throw new Error(c.error || "Document processing failed");
|
|
15057
15057
|
case "pending":
|
|
15058
15058
|
case "started":
|
|
15059
|
-
await
|
|
15059
|
+
await jw(t), o++;
|
|
15060
15060
|
break;
|
|
15061
15061
|
default:
|
|
15062
15062
|
throw new Error(`Unknown document status: ${c.status}`);
|
|
@@ -15075,7 +15075,7 @@ async function Ry(r, e, t, n, i, s) {
|
|
|
15075
15075
|
...i !== void 0 && { temperature: i }
|
|
15076
15076
|
};
|
|
15077
15077
|
return gy(
|
|
15078
|
-
`${
|
|
15078
|
+
`${xe}/v1/audio/transcriptions`,
|
|
15079
15079
|
"POST",
|
|
15080
15080
|
b,
|
|
15081
15081
|
"Failed to transcribe audio",
|
|
@@ -15083,7 +15083,7 @@ async function Ry(r, e, t, n, i, s) {
|
|
|
15083
15083
|
);
|
|
15084
15084
|
}
|
|
15085
15085
|
async function Uy(r) {
|
|
15086
|
-
let e = `${
|
|
15086
|
+
let e = `${xe}/v1/responses`;
|
|
15087
15087
|
const t = [];
|
|
15088
15088
|
return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), r != null && r.order && t.push(`order=${encodeURIComponent(r.order)}`), t.length > 0 && (e += `?${t.join("&")}`), pe(
|
|
15089
15089
|
e,
|
|
@@ -15094,7 +15094,7 @@ async function Uy(r) {
|
|
|
15094
15094
|
}
|
|
15095
15095
|
async function Dy(r) {
|
|
15096
15096
|
return pe(
|
|
15097
|
-
`${
|
|
15097
|
+
`${xe}/v1/responses/${encodeURIComponent(r)}`,
|
|
15098
15098
|
"GET",
|
|
15099
15099
|
void 0,
|
|
15100
15100
|
"Failed to retrieve response"
|
|
@@ -15102,7 +15102,7 @@ async function Dy(r) {
|
|
|
15102
15102
|
}
|
|
15103
15103
|
async function $y(r) {
|
|
15104
15104
|
return pe(
|
|
15105
|
-
`${
|
|
15105
|
+
`${xe}/v1/responses/${encodeURIComponent(r)}/cancel`,
|
|
15106
15106
|
"POST",
|
|
15107
15107
|
void 0,
|
|
15108
15108
|
"Failed to cancel response"
|
|
@@ -15110,14 +15110,22 @@ async function $y(r) {
|
|
|
15110
15110
|
}
|
|
15111
15111
|
async function My() {
|
|
15112
15112
|
return pe(
|
|
15113
|
-
`${
|
|
15113
|
+
`${xe}/v1/conversations`,
|
|
15114
15114
|
"DELETE",
|
|
15115
15115
|
void 0,
|
|
15116
15116
|
"Failed to delete conversations"
|
|
15117
15117
|
);
|
|
15118
15118
|
}
|
|
15119
15119
|
async function Vy(r) {
|
|
15120
|
-
|
|
15120
|
+
return pe(
|
|
15121
|
+
`${xe}/v1/conversations/batch-delete`,
|
|
15122
|
+
"POST",
|
|
15123
|
+
{ ids: r },
|
|
15124
|
+
"Failed to batch delete conversations"
|
|
15125
|
+
);
|
|
15126
|
+
}
|
|
15127
|
+
async function Ly(r) {
|
|
15128
|
+
let e = `${xe}/v1/conversations`;
|
|
15121
15129
|
const t = [];
|
|
15122
15130
|
return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), t.length > 0 && (e += `?${t.join("&")}`), pe(
|
|
15123
15131
|
e,
|
|
@@ -15126,32 +15134,32 @@ async function Vy(r) {
|
|
|
15126
15134
|
"Failed to list conversations"
|
|
15127
15135
|
);
|
|
15128
15136
|
}
|
|
15129
|
-
async function
|
|
15137
|
+
async function Hy(r) {
|
|
15130
15138
|
return pe(
|
|
15131
|
-
`${
|
|
15139
|
+
`${xe}/v1/responses`,
|
|
15132
15140
|
"POST",
|
|
15133
15141
|
r,
|
|
15134
15142
|
"Failed to create response"
|
|
15135
15143
|
);
|
|
15136
15144
|
}
|
|
15137
|
-
async function
|
|
15145
|
+
async function Fy(r) {
|
|
15138
15146
|
return pe(
|
|
15139
|
-
`${
|
|
15147
|
+
`${xe}/v1/responses/${encodeURIComponent(r)}`,
|
|
15140
15148
|
"DELETE",
|
|
15141
15149
|
void 0,
|
|
15142
15150
|
"Failed to delete response"
|
|
15143
15151
|
);
|
|
15144
15152
|
}
|
|
15145
|
-
async function
|
|
15153
|
+
async function Gy(r) {
|
|
15146
15154
|
return pe(
|
|
15147
|
-
`${
|
|
15155
|
+
`${xe}/v1/instructions`,
|
|
15148
15156
|
"POST",
|
|
15149
15157
|
r,
|
|
15150
15158
|
"Failed to create instruction"
|
|
15151
15159
|
);
|
|
15152
15160
|
}
|
|
15153
|
-
async function
|
|
15154
|
-
let e = `${
|
|
15161
|
+
async function zy(r) {
|
|
15162
|
+
let e = `${xe}/v1/instructions`;
|
|
15155
15163
|
const t = [];
|
|
15156
15164
|
return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), r != null && r.order && t.push(`order=${encodeURIComponent(r.order)}`), t.length > 0 && (e += `?${t.join("&")}`), pe(
|
|
15157
15165
|
e,
|
|
@@ -15160,39 +15168,39 @@ async function Gy(r) {
|
|
|
15160
15168
|
"Failed to list instructions"
|
|
15161
15169
|
);
|
|
15162
15170
|
}
|
|
15163
|
-
async function
|
|
15171
|
+
async function Ky(r) {
|
|
15164
15172
|
return pe(
|
|
15165
|
-
`${
|
|
15173
|
+
`${xe}/v1/instructions/${encodeURIComponent(r)}`,
|
|
15166
15174
|
"GET",
|
|
15167
15175
|
void 0,
|
|
15168
15176
|
"Failed to retrieve instruction"
|
|
15169
15177
|
);
|
|
15170
15178
|
}
|
|
15171
|
-
async function
|
|
15179
|
+
async function qy(r, e) {
|
|
15172
15180
|
return pe(
|
|
15173
|
-
`${
|
|
15181
|
+
`${xe}/v1/instructions/${encodeURIComponent(r)}`,
|
|
15174
15182
|
"POST",
|
|
15175
15183
|
e,
|
|
15176
15184
|
"Failed to update instruction"
|
|
15177
15185
|
);
|
|
15178
15186
|
}
|
|
15179
|
-
async function
|
|
15187
|
+
async function Zy(r) {
|
|
15180
15188
|
return pe(
|
|
15181
|
-
`${
|
|
15189
|
+
`${xe}/v1/instructions/${encodeURIComponent(r)}`,
|
|
15182
15190
|
"DELETE",
|
|
15183
15191
|
void 0,
|
|
15184
15192
|
"Failed to delete instruction"
|
|
15185
15193
|
);
|
|
15186
15194
|
}
|
|
15187
|
-
async function
|
|
15195
|
+
async function Wy(r) {
|
|
15188
15196
|
return pe(
|
|
15189
|
-
`${
|
|
15197
|
+
`${xe}/v1/instructions/${encodeURIComponent(r)}/set-default`,
|
|
15190
15198
|
"POST",
|
|
15191
15199
|
void 0,
|
|
15192
15200
|
"Failed to set default instruction"
|
|
15193
15201
|
);
|
|
15194
15202
|
}
|
|
15195
|
-
function
|
|
15203
|
+
function Rw(r) {
|
|
15196
15204
|
return async (e, t) => {
|
|
15197
15205
|
var i, s;
|
|
15198
15206
|
const n = () => {
|
|
@@ -15236,7 +15244,7 @@ function jw(r) {
|
|
|
15236
15244
|
const D = T.decode(P);
|
|
15237
15245
|
m += D;
|
|
15238
15246
|
let ye;
|
|
15239
|
-
for (; ye =
|
|
15247
|
+
for (; ye = Uw(m); ) {
|
|
15240
15248
|
m = m.slice(ye.length);
|
|
15241
15249
|
const tt = ye.split(`
|
|
15242
15250
|
`);
|
|
@@ -15318,13 +15326,13 @@ function jw(r) {
|
|
|
15318
15326
|
}
|
|
15319
15327
|
};
|
|
15320
15328
|
}
|
|
15321
|
-
function
|
|
15329
|
+
function Uw(r) {
|
|
15322
15330
|
const e = r.indexOf(`
|
|
15323
15331
|
|
|
15324
15332
|
`);
|
|
15325
15333
|
return e === -1 ? null : r.slice(0, e + 2);
|
|
15326
15334
|
}
|
|
15327
|
-
const
|
|
15335
|
+
const Dw = [
|
|
15328
15336
|
"eeddbb58f57c38894d6d5af5e575fbe791c5bf3bbcfb5df8da8cfcf0c2e1da1913108e6a762112444740b88c163d7f4b",
|
|
15329
15337
|
"74ed417f88cb0ca76c4a3d10f278bd010f1d3f95eafb254d4732511bb50e404507a4049b779c5230137e4091a5582271",
|
|
15330
15338
|
"9043fcab93b972d3c14ad2dc8fa78ca7ad374fc937c02435681772a003f7a72876bc4d578089b5c4cf3fe9b480f1aabb",
|
|
@@ -15332,7 +15340,7 @@ const Uw = [
|
|
|
15332
15340
|
"91cb67311e910cce68cd5b7d0de77aa40610d87c6681439b44c46c3ff786ae643956ab2c812478a1da8745b259f07a45",
|
|
15333
15341
|
"859065ac81b81d3735130ba08b8af72a7256b603fefb74faabae25ed28cca6edcaa7c10ea32b5948d675c18a9b0f2b1d",
|
|
15334
15342
|
"acd82a7d3943e23e95a9dc3ce0b0107ea358d6287f9e3afa245622f7c7e3e0a66142a928b6efcc02f594a95366d3a99d"
|
|
15335
|
-
],
|
|
15343
|
+
], $w = [
|
|
15336
15344
|
"62c0407056217a4c10764ed9045694c29fa93255d3cc04c2f989cdd9a1f8050c8b169714c71f1118ebce2fcc9951d1a9",
|
|
15337
15345
|
"cb95519905443f9f66f05f63c548b61ad1561a27fd5717b69285861aaea3c3063fe12a2571773b67fea3c6c11b4d8ec6",
|
|
15338
15346
|
"deb5895831b5e4286f5a2dcf5e9c27383821446f8df2b465f141d10743599be20ba3bb381ce063bf7139cc89f7f61d4c",
|
|
@@ -15340,14 +15348,14 @@ const Uw = [
|
|
|
15340
15348
|
"669404ea71435b8f498b48db7816a5c2ab1d258b1a77685b11d84d15a73189504d79c4dee13a658de9f4a0cbfc39cfe8",
|
|
15341
15349
|
"a791bf92c25ffdfd372660e460a0e238c6778c090672df6509ae4bc065cf8668b6baac6b6a11d554af53ee0ff0172ad5",
|
|
15342
15350
|
"c4285443b87b9b12a6cea3bef1064ec060f652b235a297095975af8f134e5ed65f92d70d4616fdec80af9dff48bb9f35"
|
|
15343
|
-
],
|
|
15351
|
+
], Mw = "MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEHiUY9kFWK1GqBGzczohhwEwElXzgWLDZa9R6wBx3JOBocgSt9+UIzZlJbPDjYeGBfDUXh7Z62BG2vVsh2NgclLB5S7A2ucBBtb1wd8vSQHP8jpdPhZX1slauPgbnROIP", Vw = {
|
|
15344
15352
|
prod: "https://raw.githubusercontent.com/OpenSecretCloud/opensecret/master/pcrProdHistory.json",
|
|
15345
15353
|
dev: "https://raw.githubusercontent.com/OpenSecretCloud/opensecret/master/pcrDevHistory.json"
|
|
15346
15354
|
};
|
|
15347
|
-
async function
|
|
15355
|
+
async function Lw() {
|
|
15348
15356
|
try {
|
|
15349
15357
|
const r = new Uint8Array(
|
|
15350
|
-
atob(
|
|
15358
|
+
atob(Mw).split("").map((e) => e.charCodeAt(0))
|
|
15351
15359
|
);
|
|
15352
15360
|
return await crypto.subtle.importKey(
|
|
15353
15361
|
"spki",
|
|
@@ -15369,9 +15377,9 @@ async function Vw() {
|
|
|
15369
15377
|
throw console.error("Error importing verification key:", r), new Error("Failed to import PCR verification key");
|
|
15370
15378
|
}
|
|
15371
15379
|
}
|
|
15372
|
-
async function
|
|
15380
|
+
async function Hw(r, e) {
|
|
15373
15381
|
try {
|
|
15374
|
-
const t = (e == null ? void 0 : e[r]) ||
|
|
15382
|
+
const t = (e == null ? void 0 : e[r]) || Vw[r], n = await fetch(t);
|
|
15375
15383
|
if (!n.ok)
|
|
15376
15384
|
throw new Error(`Failed to fetch PCR history: ${n.status}`);
|
|
15377
15385
|
return await n.json();
|
|
@@ -15379,7 +15387,7 @@ async function Lw(r, e) {
|
|
|
15379
15387
|
throw console.error("Error fetching PCR history:", t), new Error("Failed to fetch PCR history");
|
|
15380
15388
|
}
|
|
15381
15389
|
}
|
|
15382
|
-
async function
|
|
15390
|
+
async function Fw(r, e, t) {
|
|
15383
15391
|
try {
|
|
15384
15392
|
const i = new TextEncoder().encode(r), s = new Uint8Array(
|
|
15385
15393
|
atob(e).split("").map((o) => o.charCodeAt(0))
|
|
@@ -15400,9 +15408,9 @@ async function Hw(r, e, t) {
|
|
|
15400
15408
|
}
|
|
15401
15409
|
async function bd(r, e, t) {
|
|
15402
15410
|
try {
|
|
15403
|
-
const n = await
|
|
15411
|
+
const n = await Lw(), i = await Hw(e, t);
|
|
15404
15412
|
for (const s of i)
|
|
15405
|
-
if (s.PCR0 === r && await
|
|
15413
|
+
if (s.PCR0 === r && await Fw(s.PCR0, s.signature, n))
|
|
15406
15414
|
return {
|
|
15407
15415
|
isMatch: !0,
|
|
15408
15416
|
text: "PCR0 matches remotely attested value",
|
|
@@ -15413,8 +15421,8 @@ async function bd(r, e, t) {
|
|
|
15413
15421
|
return console.error("PCR remote validation error:", n), null;
|
|
15414
15422
|
}
|
|
15415
15423
|
}
|
|
15416
|
-
async function
|
|
15417
|
-
const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...
|
|
15424
|
+
async function Gw(r, e) {
|
|
15425
|
+
const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...Dw], n = [...(e == null ? void 0 : e.pcr0DevValues) || [], ...$w];
|
|
15418
15426
|
if (t.includes(r))
|
|
15419
15427
|
return {
|
|
15420
15428
|
isMatch: !0,
|
|
@@ -15450,21 +15458,21 @@ async function Fw(r, e) {
|
|
|
15450
15458
|
};
|
|
15451
15459
|
}
|
|
15452
15460
|
const ts = Ua, $c = "641a0321a3e244efe456463195d606317ed7cdcc3c1756e09893f3c68f79bb5b";
|
|
15453
|
-
function
|
|
15461
|
+
function Yy(r) {
|
|
15454
15462
|
return Array.from(r).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
15455
15463
|
}
|
|
15456
|
-
async function
|
|
15464
|
+
async function zw(r) {
|
|
15457
15465
|
const e = await crypto.subtle.digest("SHA-256", r);
|
|
15458
|
-
return
|
|
15466
|
+
return Yy(new Uint8Array(e));
|
|
15459
15467
|
}
|
|
15460
15468
|
async function rs(r, e, t) {
|
|
15461
15469
|
console.log("Raw timestamp:", r.timestamp), console.log("Date object:", new Date(r.timestamp));
|
|
15462
15470
|
const n = Array.from(r.pcrs.entries()).map(([v, b]) => ({
|
|
15463
15471
|
id: v,
|
|
15464
|
-
value:
|
|
15472
|
+
value: Yy(b)
|
|
15465
15473
|
})).filter((v) => !v.value.match(/^0+$/)), i = n.find((v) => v.id === 0);
|
|
15466
15474
|
let s = null;
|
|
15467
|
-
i && (s = await
|
|
15475
|
+
i && (s = await Gw(i.value, t));
|
|
15468
15476
|
const o = [...e, r.certificate].map((v) => {
|
|
15469
15477
|
const b = new wi(v);
|
|
15470
15478
|
return {
|
|
@@ -15474,7 +15482,7 @@ async function rs(r, e, t) {
|
|
|
15474
15482
|
pem: b.toString("pem"),
|
|
15475
15483
|
isRoot: b.subject === "C=US, O=Amazon, OU=AWS, CN=aws.nitro-enclaves"
|
|
15476
15484
|
};
|
|
15477
|
-
}), c = new TextDecoder(), u = new wi(e[0]), h = await
|
|
15485
|
+
}), c = new TextDecoder(), u = new wi(e[0]), h = await zw(u.rawData);
|
|
15478
15486
|
return {
|
|
15479
15487
|
moduleId: r.module_id,
|
|
15480
15488
|
publicKey: r.public_key ? _r(r.public_key) : null,
|
|
@@ -15496,7 +15504,7 @@ async function rs(r, e, t) {
|
|
|
15496
15504
|
validatedPcr0Hash: s
|
|
15497
15505
|
};
|
|
15498
15506
|
}
|
|
15499
|
-
const
|
|
15507
|
+
const Jy = _d({
|
|
15500
15508
|
auth: {
|
|
15501
15509
|
loading: !0,
|
|
15502
15510
|
user: void 0
|
|
@@ -15581,18 +15589,19 @@ const Yy = _d({
|
|
|
15581
15589
|
fetchResponsesList: Uy,
|
|
15582
15590
|
fetchResponse: Dy,
|
|
15583
15591
|
cancelResponse: $y,
|
|
15584
|
-
deleteResponse:
|
|
15585
|
-
createResponse:
|
|
15586
|
-
listConversations:
|
|
15592
|
+
deleteResponse: Fy,
|
|
15593
|
+
createResponse: Hy,
|
|
15594
|
+
listConversations: Ly,
|
|
15587
15595
|
deleteConversations: My,
|
|
15588
|
-
|
|
15589
|
-
|
|
15590
|
-
|
|
15591
|
-
|
|
15592
|
-
|
|
15593
|
-
|
|
15596
|
+
batchDeleteConversations: Vy,
|
|
15597
|
+
createInstruction: Gy,
|
|
15598
|
+
listInstructions: zy,
|
|
15599
|
+
getInstruction: Ky,
|
|
15600
|
+
updateInstruction: qy,
|
|
15601
|
+
deleteInstruction: Zy,
|
|
15602
|
+
setDefaultInstruction: Wy
|
|
15594
15603
|
});
|
|
15595
|
-
function
|
|
15604
|
+
function Kx({
|
|
15596
15605
|
children: r,
|
|
15597
15606
|
apiUrl: e,
|
|
15598
15607
|
clientId: t,
|
|
@@ -15622,12 +15631,12 @@ function zx({
|
|
|
15622
15631
|
throw new Error(
|
|
15623
15632
|
"OpenSecretProvider requires a non-empty clientId. Please provide a valid project UUID."
|
|
15624
15633
|
);
|
|
15625
|
-
|
|
15634
|
+
fw(e), Promise.resolve().then(() => yy).then(({ apiConfig: ue }) => {
|
|
15626
15635
|
const fe = ue.platformApiUrl || "";
|
|
15627
15636
|
ue.configure(e, fe);
|
|
15628
15637
|
});
|
|
15629
15638
|
}, [e, t]), Os(() => {
|
|
15630
|
-
h(e ? () =>
|
|
15639
|
+
h(e ? () => Rw(o ? { apiKey: o } : void 0) : void 0);
|
|
15631
15640
|
}, [e, o]);
|
|
15632
15641
|
async function b() {
|
|
15633
15642
|
const ue = window.localStorage.getItem("access_token"), fe = window.localStorage.getItem("refresh_token");
|
|
@@ -15639,7 +15648,7 @@ function zx({
|
|
|
15639
15648
|
return;
|
|
15640
15649
|
}
|
|
15641
15650
|
try {
|
|
15642
|
-
const ge = await
|
|
15651
|
+
const ge = await vw();
|
|
15643
15652
|
s({
|
|
15644
15653
|
loading: !1,
|
|
15645
15654
|
user: ge
|
|
@@ -15657,7 +15666,7 @@ function zx({
|
|
|
15657
15666
|
async function H(ue, fe) {
|
|
15658
15667
|
console.log("Signing in");
|
|
15659
15668
|
try {
|
|
15660
|
-
const { access_token: ge, refresh_token: Se } = await
|
|
15669
|
+
const { access_token: ge, refresh_token: Se } = await dw(ue, fe, t);
|
|
15661
15670
|
window.localStorage.setItem("access_token", ge), window.localStorage.setItem("refresh_token", Se), v(void 0), await b();
|
|
15662
15671
|
} catch (ge) {
|
|
15663
15672
|
throw console.error(ge), ge;
|
|
@@ -15665,7 +15674,7 @@ function zx({
|
|
|
15665
15674
|
}
|
|
15666
15675
|
async function T(ue, fe, ge, Se) {
|
|
15667
15676
|
try {
|
|
15668
|
-
const { access_token: Re, refresh_token: Je } = await
|
|
15677
|
+
const { access_token: Re, refresh_token: Je } = await yw(
|
|
15669
15678
|
ue,
|
|
15670
15679
|
fe,
|
|
15671
15680
|
ge,
|
|
@@ -15680,7 +15689,7 @@ function zx({
|
|
|
15680
15689
|
async function m(ue, fe) {
|
|
15681
15690
|
console.log("Signing in Guest");
|
|
15682
15691
|
try {
|
|
15683
|
-
const { access_token: ge, refresh_token: Se } = await
|
|
15692
|
+
const { access_token: ge, refresh_token: Se } = await pw(ue, fe, t);
|
|
15684
15693
|
window.localStorage.setItem("access_token", ge), window.localStorage.setItem("refresh_token", Se), v(void 0), await b();
|
|
15685
15694
|
} catch (ge) {
|
|
15686
15695
|
throw console.error(ge), ge;
|
|
@@ -15688,7 +15697,7 @@ function zx({
|
|
|
15688
15697
|
}
|
|
15689
15698
|
async function A(ue, fe) {
|
|
15690
15699
|
try {
|
|
15691
|
-
const { access_token: ge, refresh_token: Se, id: Re } = await
|
|
15700
|
+
const { access_token: ge, refresh_token: Se, id: Re } = await gw(
|
|
15692
15701
|
ue,
|
|
15693
15702
|
fe,
|
|
15694
15703
|
t
|
|
@@ -15700,7 +15709,7 @@ function zx({
|
|
|
15700
15709
|
}
|
|
15701
15710
|
async function k(ue, fe, ge) {
|
|
15702
15711
|
try {
|
|
15703
|
-
await
|
|
15712
|
+
await Ow(ue, fe, ge), await b();
|
|
15704
15713
|
} catch (Se) {
|
|
15705
15714
|
throw console.error(Se), Se;
|
|
15706
15715
|
}
|
|
@@ -15709,7 +15718,7 @@ function zx({
|
|
|
15709
15718
|
const ue = window.localStorage.getItem("refresh_token");
|
|
15710
15719
|
if (ue)
|
|
15711
15720
|
try {
|
|
15712
|
-
await
|
|
15721
|
+
await mw(ue);
|
|
15713
15722
|
} catch (fe) {
|
|
15714
15723
|
console.error("Error during logout:", fe);
|
|
15715
15724
|
}
|
|
@@ -15740,20 +15749,20 @@ function zx({
|
|
|
15740
15749
|
requestNewVerificationEmail: Ma,
|
|
15741
15750
|
changePassword: Sy,
|
|
15742
15751
|
refreshAccessToken: Dc,
|
|
15743
|
-
requestPasswordReset: (ue, fe) =>
|
|
15744
|
-
confirmPasswordReset: (ue, fe, ge, Se) =>
|
|
15745
|
-
requestAccountDeletion:
|
|
15746
|
-
confirmAccountDeletion:
|
|
15752
|
+
requestPasswordReset: (ue, fe) => xw(ue, fe, t),
|
|
15753
|
+
confirmPasswordReset: (ue, fe, ge, Se) => Aw(ue, fe, ge, Se, t),
|
|
15754
|
+
requestAccountDeletion: Nw,
|
|
15755
|
+
confirmAccountDeletion: Pw,
|
|
15747
15756
|
initiateGitHubAuth: async (ue) => {
|
|
15748
15757
|
try {
|
|
15749
|
-
return await
|
|
15758
|
+
return await Sw(t, ue);
|
|
15750
15759
|
} catch (fe) {
|
|
15751
15760
|
throw console.error("Failed to initiate GitHub auth:", fe), fe;
|
|
15752
15761
|
}
|
|
15753
15762
|
},
|
|
15754
15763
|
handleGitHubCallback: async (ue, fe, ge) => {
|
|
15755
15764
|
try {
|
|
15756
|
-
const { access_token: Se, refresh_token: Re } = await
|
|
15765
|
+
const { access_token: Se, refresh_token: Re } = await _w(
|
|
15757
15766
|
ue,
|
|
15758
15767
|
fe,
|
|
15759
15768
|
ge
|
|
@@ -15765,14 +15774,14 @@ function zx({
|
|
|
15765
15774
|
},
|
|
15766
15775
|
initiateGoogleAuth: async (ue) => {
|
|
15767
15776
|
try {
|
|
15768
|
-
return await
|
|
15777
|
+
return await Ew(t, ue);
|
|
15769
15778
|
} catch (fe) {
|
|
15770
15779
|
throw console.error("Failed to initiate Google auth:", fe), fe;
|
|
15771
15780
|
}
|
|
15772
15781
|
},
|
|
15773
15782
|
handleGoogleCallback: async (ue, fe, ge) => {
|
|
15774
15783
|
try {
|
|
15775
|
-
const { access_token: Se, refresh_token: Re } = await
|
|
15784
|
+
const { access_token: Se, refresh_token: Re } = await Iw(
|
|
15776
15785
|
ue,
|
|
15777
15786
|
fe,
|
|
15778
15787
|
ge
|
|
@@ -15784,14 +15793,14 @@ function zx({
|
|
|
15784
15793
|
},
|
|
15785
15794
|
initiateAppleAuth: async (ue) => {
|
|
15786
15795
|
try {
|
|
15787
|
-
return await
|
|
15796
|
+
return await kw(t, ue);
|
|
15788
15797
|
} catch (fe) {
|
|
15789
15798
|
throw console.error("Failed to initiate Apple auth:", fe), fe;
|
|
15790
15799
|
}
|
|
15791
15800
|
},
|
|
15792
15801
|
handleAppleCallback: async (ue, fe, ge) => {
|
|
15793
15802
|
try {
|
|
15794
|
-
const { access_token: Se, refresh_token: Re } = await
|
|
15803
|
+
const { access_token: Se, refresh_token: Re } = await Cw(
|
|
15795
15804
|
ue,
|
|
15796
15805
|
fe,
|
|
15797
15806
|
ge
|
|
@@ -15803,7 +15812,7 @@ function zx({
|
|
|
15803
15812
|
},
|
|
15804
15813
|
handleAppleNativeSignIn: async (ue, fe) => {
|
|
15805
15814
|
try {
|
|
15806
|
-
const { access_token: ge, refresh_token: Se } = await
|
|
15815
|
+
const { access_token: ge, refresh_token: Se } = await Bw(
|
|
15807
15816
|
ue,
|
|
15808
15817
|
t,
|
|
15809
15818
|
fe
|
|
@@ -15836,7 +15845,7 @@ function zx({
|
|
|
15836
15845
|
);
|
|
15837
15846
|
return rs(Se, Se.cabundle, n);
|
|
15838
15847
|
},
|
|
15839
|
-
generateThirdPartyToken:
|
|
15848
|
+
generateThirdPartyToken: Tw,
|
|
15840
15849
|
encryptData: Cy,
|
|
15841
15850
|
decryptData: By,
|
|
15842
15851
|
fetchModels: Oy,
|
|
@@ -15850,20 +15859,21 @@ function zx({
|
|
|
15850
15859
|
fetchResponsesList: Uy,
|
|
15851
15860
|
fetchResponse: Dy,
|
|
15852
15861
|
cancelResponse: $y,
|
|
15853
|
-
deleteResponse:
|
|
15854
|
-
createResponse:
|
|
15855
|
-
listConversations:
|
|
15862
|
+
deleteResponse: Fy,
|
|
15863
|
+
createResponse: Hy,
|
|
15864
|
+
listConversations: Ly,
|
|
15856
15865
|
deleteConversations: My,
|
|
15857
|
-
|
|
15858
|
-
|
|
15859
|
-
|
|
15860
|
-
|
|
15861
|
-
|
|
15862
|
-
|
|
15866
|
+
batchDeleteConversations: Vy,
|
|
15867
|
+
createInstruction: Gy,
|
|
15868
|
+
listInstructions: zy,
|
|
15869
|
+
getInstruction: Ky,
|
|
15870
|
+
updateInstruction: qy,
|
|
15871
|
+
deleteInstruction: Zy,
|
|
15872
|
+
setDefaultInstruction: Wy
|
|
15863
15873
|
};
|
|
15864
|
-
return /* @__PURE__ */ Sd(
|
|
15874
|
+
return /* @__PURE__ */ Sd(Jy.Provider, { value: pt, children: r });
|
|
15865
15875
|
}
|
|
15866
|
-
const
|
|
15876
|
+
const Xy = _d({
|
|
15867
15877
|
auth: {
|
|
15868
15878
|
loading: !0,
|
|
15869
15879
|
developer: void 0
|
|
@@ -15920,7 +15930,7 @@ const Jy = _d({
|
|
|
15920
15930
|
acceptInvite: uy,
|
|
15921
15931
|
apiUrl: ""
|
|
15922
15932
|
});
|
|
15923
|
-
function
|
|
15933
|
+
function qx({
|
|
15924
15934
|
children: r,
|
|
15925
15935
|
apiUrl: e,
|
|
15926
15936
|
pcrConfig: t = {}
|
|
@@ -15934,7 +15944,7 @@ function Kx({
|
|
|
15934
15944
|
throw new Error(
|
|
15935
15945
|
"OpenSecretDeveloper requires a non-empty apiUrl. Please provide a valid API endpoint URL."
|
|
15936
15946
|
);
|
|
15937
|
-
|
|
15947
|
+
nw(e), Promise.resolve().then(() => yy).then(({ apiConfig: v }) => {
|
|
15938
15948
|
const b = v.appApiUrl || "";
|
|
15939
15949
|
v.configure(b, e);
|
|
15940
15950
|
}).catch((v) => {
|
|
@@ -15953,7 +15963,7 @@ function Kx({
|
|
|
15953
15963
|
return;
|
|
15954
15964
|
}
|
|
15955
15965
|
try {
|
|
15956
|
-
const H = await
|
|
15966
|
+
const H = await lw();
|
|
15957
15967
|
i({
|
|
15958
15968
|
loading: !1,
|
|
15959
15969
|
developer: {
|
|
@@ -15984,7 +15994,7 @@ function Kx({
|
|
|
15984
15994
|
}, []);
|
|
15985
15995
|
async function c(v, b) {
|
|
15986
15996
|
try {
|
|
15987
|
-
const { access_token: H, refresh_token: T } = await
|
|
15997
|
+
const { access_token: H, refresh_token: T } = await iw(v, b);
|
|
15988
15998
|
return window.localStorage.setItem("access_token", H), window.localStorage.setItem("refresh_token", T), await s(), { access_token: H, refresh_token: T, id: "", email: v };
|
|
15989
15999
|
} catch (H) {
|
|
15990
16000
|
throw console.error("Login error:", H), H;
|
|
@@ -15992,7 +16002,7 @@ function Kx({
|
|
|
15992
16002
|
}
|
|
15993
16003
|
async function u(v, b, H, T) {
|
|
15994
16004
|
try {
|
|
15995
|
-
const { access_token: m, refresh_token: A } = await
|
|
16005
|
+
const { access_token: m, refresh_token: A } = await sw(
|
|
15996
16006
|
v,
|
|
15997
16007
|
b,
|
|
15998
16008
|
H,
|
|
@@ -16012,7 +16022,7 @@ function Kx({
|
|
|
16012
16022
|
const v = window.localStorage.getItem("refresh_token");
|
|
16013
16023
|
if (v)
|
|
16014
16024
|
try {
|
|
16015
|
-
await
|
|
16025
|
+
await ow(v);
|
|
16016
16026
|
} catch (b) {
|
|
16017
16027
|
console.error("Error during logout:", b);
|
|
16018
16028
|
}
|
|
@@ -16059,34 +16069,34 @@ function Kx({
|
|
|
16059
16069
|
acceptInvite: uy,
|
|
16060
16070
|
apiUrl: e
|
|
16061
16071
|
};
|
|
16062
|
-
return /* @__PURE__ */ Sd(
|
|
16063
|
-
}
|
|
16064
|
-
function qx() {
|
|
16065
|
-
return Ed(Yy);
|
|
16072
|
+
return /* @__PURE__ */ Sd(Xy.Provider, { value: h, children: r });
|
|
16066
16073
|
}
|
|
16067
16074
|
function Zx() {
|
|
16068
16075
|
return Ed(Jy);
|
|
16069
16076
|
}
|
|
16070
16077
|
function Wx() {
|
|
16078
|
+
return Ed(Xy);
|
|
16079
|
+
}
|
|
16080
|
+
function Yx() {
|
|
16071
16081
|
const r = new Uint8Array(32);
|
|
16072
16082
|
return crypto.getRandomValues(r), Array.from(r, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
16073
16083
|
}
|
|
16074
|
-
async function
|
|
16084
|
+
async function Jx(r) {
|
|
16075
16085
|
const t = new TextEncoder().encode(r), n = await crypto.subtle.digest("SHA-256", t);
|
|
16076
16086
|
return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
16077
16087
|
}
|
|
16078
16088
|
export {
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
|
|
16082
|
-
|
|
16089
|
+
Jy as OpenSecretContext,
|
|
16090
|
+
qx as OpenSecretDeveloper,
|
|
16091
|
+
Xy as OpenSecretDeveloperContext,
|
|
16092
|
+
Kx as OpenSecretProvider,
|
|
16083
16093
|
$a as apiConfig,
|
|
16084
16094
|
Ty as createApiKey,
|
|
16085
|
-
|
|
16095
|
+
Rw as createCustomFetch,
|
|
16086
16096
|
Py as deleteApiKey,
|
|
16087
|
-
|
|
16088
|
-
|
|
16097
|
+
Yx as generateSecureSecret,
|
|
16098
|
+
Jx as hashSecret,
|
|
16089
16099
|
Ny as listApiKeys,
|
|
16090
|
-
|
|
16091
|
-
|
|
16100
|
+
Zx as useOpenSecret,
|
|
16101
|
+
Wx as useOpenSecretDeveloper
|
|
16092
16102
|
};
|