gws-client 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.es.js +810 -666
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,91 +1,99 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var be = Object.defineProperty, xe = Object.defineProperties;
|
|
2
|
+
var Ne = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var re = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var $e = Object.prototype.hasOwnProperty, Te = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Y = (s, e, t) => e in s ? be(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, m = (s, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
$e.call(e, t) && Y(s, t, e[t]);
|
|
8
8
|
if (re)
|
|
9
9
|
for (var t of re(e))
|
|
10
|
-
|
|
10
|
+
Te.call(e, t) && Y(s, t, e[t]);
|
|
11
11
|
return s;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
}, _ = (s, e) => xe(s, Ne(e));
|
|
13
|
+
var a = (s, e, t) => Y(s, typeof e != "symbol" ? e + "" : e, t);
|
|
14
|
+
var c = (s, e, t) => new Promise((n, i) => {
|
|
15
|
+
var r = (d) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
l(t.next(d));
|
|
18
18
|
} catch (u) {
|
|
19
|
-
|
|
19
|
+
i(u);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, o = (d) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
l(t.throw(d));
|
|
24
24
|
} catch (u) {
|
|
25
|
-
|
|
25
|
+
i(u);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, l = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(r, o);
|
|
28
|
+
l((t = t.apply(s, e)).next());
|
|
29
29
|
});
|
|
30
|
-
const
|
|
30
|
+
const Me = window.location.href.includes("https") ? "wss://localhost:19528" : "ws://localhost:9527", ae = "1", oe = "2";
|
|
31
31
|
var Se = /* @__PURE__ */ ((s) => (s.MIN = "0", s.LOW = "1", s.MIDDLE = "2", s.HIGH = "3", s))(Se || {});
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const I = {
|
|
33
|
+
LEVEL_1: 1,
|
|
34
|
+
LEVEL_2: 2,
|
|
35
|
+
LEVEL_3: 4
|
|
36
|
+
}, Fe = {
|
|
37
|
+
OPEN: I.LEVEL_1,
|
|
38
|
+
INTERNAL: I.LEVEL_2 | I.LEVEL_1,
|
|
39
|
+
OMP: I.LEVEL_3 | I.LEVEL_2 | I.LEVEL_1
|
|
40
|
+
}, Ge = "00000001", q = "NO_SEAL_AVAILABLE", Oe = "CERTIFICATE_NOT_FOUND", Ve = "CLIENT_CONNECTION_FAILED", Ze = "ACCESS_DENIED";
|
|
41
|
+
function He(s) {
|
|
34
42
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
35
43
|
}
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
for (var s = [], e = [], t = typeof Uint8Array != "undefined" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
|
|
41
|
-
s[
|
|
44
|
+
var F = {}, ce;
|
|
45
|
+
function Ue() {
|
|
46
|
+
if (ce) return F;
|
|
47
|
+
ce = 1, F.byteLength = l, F.toByteArray = u, F.fromByteArray = w;
|
|
48
|
+
for (var s = [], e = [], t = typeof Uint8Array != "undefined" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, r = n.length; i < r; ++i)
|
|
49
|
+
s[i] = n[i], e[n.charCodeAt(i)] = i;
|
|
42
50
|
e[45] = 62, e[95] = 63;
|
|
43
|
-
function
|
|
51
|
+
function o(h) {
|
|
44
52
|
var f = h.length;
|
|
45
53
|
if (f % 4 > 0)
|
|
46
54
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
var y =
|
|
50
|
-
return [
|
|
55
|
+
var E = h.indexOf("=");
|
|
56
|
+
E === -1 && (E = f);
|
|
57
|
+
var y = E === f ? 0 : 4 - E % 4;
|
|
58
|
+
return [E, y];
|
|
51
59
|
}
|
|
52
|
-
function
|
|
53
|
-
var f =
|
|
54
|
-
return (
|
|
60
|
+
function l(h) {
|
|
61
|
+
var f = o(h), E = f[0], y = f[1];
|
|
62
|
+
return (E + y) * 3 / 4 - y;
|
|
55
63
|
}
|
|
56
|
-
function d(h, f,
|
|
57
|
-
return (f +
|
|
64
|
+
function d(h, f, E) {
|
|
65
|
+
return (f + E) * 3 / 4 - E;
|
|
58
66
|
}
|
|
59
67
|
function u(h) {
|
|
60
|
-
var f,
|
|
61
|
-
for (
|
|
62
|
-
f = e[h.charCodeAt(
|
|
63
|
-
return
|
|
68
|
+
var f, E = o(h), y = E[0], S = E[1], k = new t(d(h, y, S)), p = 0, D = S > 0 ? y - 4 : y, v;
|
|
69
|
+
for (v = 0; v < D; v += 4)
|
|
70
|
+
f = e[h.charCodeAt(v)] << 18 | e[h.charCodeAt(v + 1)] << 12 | e[h.charCodeAt(v + 2)] << 6 | e[h.charCodeAt(v + 3)], k[p++] = f >> 16 & 255, k[p++] = f >> 8 & 255, k[p++] = f & 255;
|
|
71
|
+
return S === 2 && (f = e[h.charCodeAt(v)] << 2 | e[h.charCodeAt(v + 1)] >> 4, k[p++] = f & 255), S === 1 && (f = e[h.charCodeAt(v)] << 10 | e[h.charCodeAt(v + 1)] << 4 | e[h.charCodeAt(v + 2)] >> 2, k[p++] = f >> 8 & 255, k[p++] = f & 255), k;
|
|
64
72
|
}
|
|
65
73
|
function C(h) {
|
|
66
74
|
return s[h >> 18 & 63] + s[h >> 12 & 63] + s[h >> 6 & 63] + s[h & 63];
|
|
67
75
|
}
|
|
68
|
-
function g(h, f,
|
|
69
|
-
for (var y,
|
|
70
|
-
y = (h[
|
|
71
|
-
return
|
|
76
|
+
function g(h, f, E) {
|
|
77
|
+
for (var y, S = [], k = f; k < E; k += 3)
|
|
78
|
+
y = (h[k] << 16 & 16711680) + (h[k + 1] << 8 & 65280) + (h[k + 2] & 255), S.push(C(y));
|
|
79
|
+
return S.join("");
|
|
72
80
|
}
|
|
73
|
-
function
|
|
74
|
-
for (var f,
|
|
75
|
-
|
|
76
|
-
return y === 1 ? (f = h[
|
|
81
|
+
function w(h) {
|
|
82
|
+
for (var f, E = h.length, y = E % 3, S = [], k = 16383, p = 0, D = E - y; p < D; p += k)
|
|
83
|
+
S.push(g(h, p, p + k > D ? D : p + k));
|
|
84
|
+
return y === 1 ? (f = h[E - 1], S.push(
|
|
77
85
|
s[f >> 2] + s[f << 4 & 63] + "=="
|
|
78
|
-
)) : y === 2 && (f = (h[
|
|
86
|
+
)) : y === 2 && (f = (h[E - 2] << 8) + h[E - 1], S.push(
|
|
79
87
|
s[f >> 10] + s[f >> 4 & 63] + s[f << 2 & 63] + "="
|
|
80
|
-
)),
|
|
88
|
+
)), S.join("");
|
|
81
89
|
}
|
|
82
|
-
return
|
|
90
|
+
return F;
|
|
83
91
|
}
|
|
84
|
-
var
|
|
85
|
-
const
|
|
86
|
-
class
|
|
92
|
+
var je = Ue();
|
|
93
|
+
const le = /* @__PURE__ */ He(je);
|
|
94
|
+
class Ke {
|
|
87
95
|
constructor() {
|
|
88
|
-
|
|
96
|
+
a(this, "deps", /* @__PURE__ */ new Map());
|
|
89
97
|
}
|
|
90
98
|
on(e, t) {
|
|
91
99
|
this.deps.set(e, t);
|
|
@@ -103,26 +111,26 @@ class Ve {
|
|
|
103
111
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
104
112
|
}
|
|
105
113
|
})();
|
|
106
|
-
var
|
|
107
|
-
function
|
|
114
|
+
var ze = Object.defineProperty, Qe = (s, e, t) => e in s ? ze(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, ue = (s, e, t) => Qe(s, typeof e != "symbol" ? e + "" : e, t);
|
|
115
|
+
function ee() {
|
|
108
116
|
}
|
|
109
|
-
function
|
|
117
|
+
function We(s, e) {
|
|
110
118
|
for (const t in e) s[t] = e[t];
|
|
111
119
|
return (
|
|
112
120
|
/** @type {T & S} */
|
|
113
121
|
s
|
|
114
122
|
);
|
|
115
123
|
}
|
|
116
|
-
function
|
|
124
|
+
function ve(s) {
|
|
117
125
|
return s();
|
|
118
126
|
}
|
|
119
|
-
function
|
|
127
|
+
function de() {
|
|
120
128
|
return /* @__PURE__ */ Object.create(null);
|
|
121
129
|
}
|
|
122
|
-
function
|
|
123
|
-
s.forEach(
|
|
130
|
+
function U(s) {
|
|
131
|
+
s.forEach(ve);
|
|
124
132
|
}
|
|
125
|
-
function
|
|
133
|
+
function V(s) {
|
|
126
134
|
return typeof s == "function";
|
|
127
135
|
}
|
|
128
136
|
function ke(s, e) {
|
|
@@ -131,37 +139,37 @@ function ke(s, e) {
|
|
|
131
139
|
function Je(s) {
|
|
132
140
|
return Object.keys(s).length === 0;
|
|
133
141
|
}
|
|
134
|
-
function
|
|
142
|
+
function Re(s, e, t, n) {
|
|
135
143
|
if (s) {
|
|
136
|
-
const
|
|
137
|
-
return s[0](
|
|
144
|
+
const i = Ie(s, e, t, n);
|
|
145
|
+
return s[0](i);
|
|
138
146
|
}
|
|
139
147
|
}
|
|
140
|
-
function
|
|
141
|
-
return s[1] && n ?
|
|
148
|
+
function Ie(s, e, t, n) {
|
|
149
|
+
return s[1] && n ? We(t.ctx.slice(), s[1](n(e))) : t.ctx;
|
|
142
150
|
}
|
|
143
|
-
function
|
|
151
|
+
function Ye(s, e, t, n) {
|
|
144
152
|
if (s[2] && n) {
|
|
145
|
-
const
|
|
153
|
+
const i = s[2](n(t));
|
|
146
154
|
if (e.dirty === void 0)
|
|
155
|
+
return i;
|
|
156
|
+
if (typeof i == "object") {
|
|
157
|
+
const r = [], o = Math.max(e.dirty.length, i.length);
|
|
158
|
+
for (let l = 0; l < o; l += 1)
|
|
159
|
+
r[l] = e.dirty[l] | i[l];
|
|
147
160
|
return r;
|
|
148
|
-
if (typeof r == "object") {
|
|
149
|
-
const a = [], i = Math.max(e.dirty.length, r.length);
|
|
150
|
-
for (let c = 0; c < i; c += 1)
|
|
151
|
-
a[c] = e.dirty[c] | r[c];
|
|
152
|
-
return a;
|
|
153
161
|
}
|
|
154
|
-
return e.dirty |
|
|
162
|
+
return e.dirty | i;
|
|
155
163
|
}
|
|
156
164
|
return e.dirty;
|
|
157
165
|
}
|
|
158
|
-
function qe(s, e, t, n,
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
s.p(
|
|
166
|
+
function qe(s, e, t, n, i, r) {
|
|
167
|
+
if (i) {
|
|
168
|
+
const o = Ie(e, t, n, r);
|
|
169
|
+
s.p(o, i);
|
|
162
170
|
}
|
|
163
171
|
}
|
|
164
|
-
function
|
|
172
|
+
function Xe(s) {
|
|
165
173
|
if (s.ctx.length > 32) {
|
|
166
174
|
const e = [], t = s.ctx.length / 32;
|
|
167
175
|
for (let n = 0; n < t; n++)
|
|
@@ -170,145 +178,145 @@ function Ke(s) {
|
|
|
170
178
|
}
|
|
171
179
|
return -1;
|
|
172
180
|
}
|
|
173
|
-
function
|
|
181
|
+
function he(s) {
|
|
174
182
|
return s == null ? "" : s;
|
|
175
183
|
}
|
|
176
|
-
function
|
|
184
|
+
function L(s, e) {
|
|
177
185
|
s.appendChild(e);
|
|
178
186
|
}
|
|
179
|
-
function
|
|
187
|
+
function R(s, e, t) {
|
|
180
188
|
s.insertBefore(e, t || null);
|
|
181
189
|
}
|
|
182
|
-
function
|
|
190
|
+
function j(s) {
|
|
183
191
|
s.parentNode && s.parentNode.removeChild(s);
|
|
184
192
|
}
|
|
185
|
-
function
|
|
193
|
+
function pe(s, e) {
|
|
186
194
|
for (let t = 0; t < s.length; t += 1)
|
|
187
195
|
s[t] && s[t].d(e);
|
|
188
196
|
}
|
|
189
|
-
function
|
|
197
|
+
function P(s) {
|
|
190
198
|
return document.createElement(s);
|
|
191
199
|
}
|
|
192
|
-
function
|
|
200
|
+
function T(s) {
|
|
193
201
|
return document.createTextNode(s);
|
|
194
202
|
}
|
|
195
|
-
function
|
|
196
|
-
return
|
|
203
|
+
function K() {
|
|
204
|
+
return T(" ");
|
|
197
205
|
}
|
|
198
|
-
function
|
|
199
|
-
return
|
|
206
|
+
function et() {
|
|
207
|
+
return T("");
|
|
200
208
|
}
|
|
201
|
-
function
|
|
209
|
+
function G(s, e, t, n) {
|
|
202
210
|
return s.addEventListener(e, t, n), () => s.removeEventListener(e, t, n);
|
|
203
211
|
}
|
|
204
|
-
function
|
|
212
|
+
function B(s, e, t) {
|
|
205
213
|
t == null ? s.removeAttribute(e) : s.getAttribute(e) !== t && s.setAttribute(e, t);
|
|
206
214
|
}
|
|
207
|
-
function
|
|
215
|
+
function tt(s) {
|
|
208
216
|
return Array.from(s.childNodes);
|
|
209
217
|
}
|
|
210
|
-
function
|
|
218
|
+
function z(s, e) {
|
|
211
219
|
e = "" + e, s.data !== e && (s.data = /** @type {string} */
|
|
212
220
|
e);
|
|
213
221
|
}
|
|
214
|
-
function
|
|
222
|
+
function W(s, e, t, n) {
|
|
215
223
|
t == null ? s.style.removeProperty(e) : s.style.setProperty(e, t, "");
|
|
216
224
|
}
|
|
217
|
-
let
|
|
218
|
-
function
|
|
219
|
-
|
|
225
|
+
let se;
|
|
226
|
+
function Z(s) {
|
|
227
|
+
se = s;
|
|
220
228
|
}
|
|
221
|
-
const
|
|
222
|
-
let
|
|
223
|
-
const
|
|
224
|
-
let
|
|
225
|
-
function
|
|
226
|
-
|
|
229
|
+
const N = [], ge = [];
|
|
230
|
+
let M = [];
|
|
231
|
+
const ye = [], nt = /* @__PURE__ */ Promise.resolve();
|
|
232
|
+
let te = !1;
|
|
233
|
+
function st() {
|
|
234
|
+
te || (te = !0, nt.then(_e));
|
|
227
235
|
}
|
|
228
|
-
function
|
|
229
|
-
|
|
236
|
+
function ne(s) {
|
|
237
|
+
M.push(s);
|
|
230
238
|
}
|
|
231
|
-
const
|
|
232
|
-
let
|
|
233
|
-
function
|
|
234
|
-
if (
|
|
239
|
+
const X = /* @__PURE__ */ new Set();
|
|
240
|
+
let x = 0;
|
|
241
|
+
function _e() {
|
|
242
|
+
if (x !== 0)
|
|
235
243
|
return;
|
|
236
|
-
const s =
|
|
244
|
+
const s = se;
|
|
237
245
|
do {
|
|
238
246
|
try {
|
|
239
|
-
for (;
|
|
240
|
-
const e =
|
|
241
|
-
|
|
247
|
+
for (; x < N.length; ) {
|
|
248
|
+
const e = N[x];
|
|
249
|
+
x++, Z(e), it(e.$$);
|
|
242
250
|
}
|
|
243
251
|
} catch (e) {
|
|
244
|
-
throw
|
|
252
|
+
throw N.length = 0, x = 0, e;
|
|
245
253
|
}
|
|
246
|
-
for (
|
|
247
|
-
for (let e = 0; e <
|
|
248
|
-
const t =
|
|
249
|
-
|
|
254
|
+
for (Z(null), N.length = 0, x = 0; ge.length; ) ge.pop()();
|
|
255
|
+
for (let e = 0; e < M.length; e += 1) {
|
|
256
|
+
const t = M[e];
|
|
257
|
+
X.has(t) || (X.add(t), t());
|
|
250
258
|
}
|
|
251
|
-
|
|
252
|
-
} while (
|
|
253
|
-
for (;
|
|
254
|
-
|
|
255
|
-
|
|
259
|
+
M.length = 0;
|
|
260
|
+
} while (N.length);
|
|
261
|
+
for (; ye.length; )
|
|
262
|
+
ye.pop()();
|
|
263
|
+
te = !1, X.clear(), Z(s);
|
|
256
264
|
}
|
|
257
|
-
function
|
|
265
|
+
function it(s) {
|
|
258
266
|
if (s.fragment !== null) {
|
|
259
|
-
s.update(),
|
|
267
|
+
s.update(), U(s.before_update);
|
|
260
268
|
const e = s.dirty;
|
|
261
|
-
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(
|
|
269
|
+
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(ne);
|
|
262
270
|
}
|
|
263
271
|
}
|
|
264
|
-
function
|
|
272
|
+
function rt(s) {
|
|
265
273
|
const e = [], t = [];
|
|
266
|
-
|
|
274
|
+
M.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), M = e;
|
|
267
275
|
}
|
|
268
|
-
const
|
|
269
|
-
let
|
|
270
|
-
function
|
|
271
|
-
s && s.i && (
|
|
276
|
+
const Q = /* @__PURE__ */ new Set();
|
|
277
|
+
let at;
|
|
278
|
+
function ie(s, e) {
|
|
279
|
+
s && s.i && (Q.delete(s), s.i(e));
|
|
272
280
|
}
|
|
273
|
-
function
|
|
281
|
+
function Le(s, e, t, n) {
|
|
274
282
|
if (s && s.o) {
|
|
275
|
-
if (
|
|
276
|
-
|
|
277
|
-
|
|
283
|
+
if (Q.has(s)) return;
|
|
284
|
+
Q.add(s), at.c.push(() => {
|
|
285
|
+
Q.delete(s);
|
|
278
286
|
}), s.o(e);
|
|
279
287
|
}
|
|
280
288
|
}
|
|
281
|
-
function
|
|
289
|
+
function J(s) {
|
|
282
290
|
return (s == null ? void 0 : s.length) !== void 0 ? s : Array.from(s);
|
|
283
291
|
}
|
|
284
|
-
function
|
|
292
|
+
function ot(s) {
|
|
285
293
|
s && s.c();
|
|
286
294
|
}
|
|
287
295
|
function Ae(s, e, t) {
|
|
288
|
-
const { fragment: n, after_update:
|
|
289
|
-
n && n.m(e, t),
|
|
290
|
-
const
|
|
291
|
-
s.$$.on_destroy ? s.$$.on_destroy.push(...
|
|
292
|
-
}),
|
|
296
|
+
const { fragment: n, after_update: i } = s.$$;
|
|
297
|
+
n && n.m(e, t), ne(() => {
|
|
298
|
+
const r = s.$$.on_mount.map(ve).filter(V);
|
|
299
|
+
s.$$.on_destroy ? s.$$.on_destroy.push(...r) : U(r), s.$$.on_mount = [];
|
|
300
|
+
}), i.forEach(ne);
|
|
293
301
|
}
|
|
294
|
-
function
|
|
302
|
+
function Be(s, e) {
|
|
295
303
|
const t = s.$$;
|
|
296
|
-
t.fragment !== null && (
|
|
304
|
+
t.fragment !== null && (rt(t.after_update), U(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
297
305
|
}
|
|
298
|
-
function
|
|
299
|
-
s.$$.dirty[0] === -1 && (
|
|
306
|
+
function ct(s, e) {
|
|
307
|
+
s.$$.dirty[0] === -1 && (N.push(s), st(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
300
308
|
}
|
|
301
|
-
function
|
|
302
|
-
const d =
|
|
303
|
-
|
|
309
|
+
function De(s, e, t, n, i, r, o = null, l = [-1]) {
|
|
310
|
+
const d = se;
|
|
311
|
+
Z(s);
|
|
304
312
|
const u = s.$$ = {
|
|
305
313
|
fragment: null,
|
|
306
314
|
ctx: [],
|
|
307
315
|
// state
|
|
308
|
-
props:
|
|
309
|
-
update:
|
|
310
|
-
not_equal:
|
|
311
|
-
bound:
|
|
316
|
+
props: r,
|
|
317
|
+
update: ee,
|
|
318
|
+
not_equal: i,
|
|
319
|
+
bound: de(),
|
|
312
320
|
// lifecycle
|
|
313
321
|
on_mount: [],
|
|
314
322
|
on_destroy: [],
|
|
@@ -317,33 +325,33 @@ function be(s, e, t, n, r, a, i = null, c = [-1]) {
|
|
|
317
325
|
after_update: [],
|
|
318
326
|
context: new Map(e.context || (d ? d.$$.context : [])),
|
|
319
327
|
// everything else
|
|
320
|
-
callbacks:
|
|
321
|
-
dirty:
|
|
328
|
+
callbacks: de(),
|
|
329
|
+
dirty: l,
|
|
322
330
|
skip_bound: !1,
|
|
323
331
|
root: e.target || d.$$.root
|
|
324
332
|
};
|
|
325
|
-
|
|
333
|
+
o && o(u.root);
|
|
326
334
|
let C = !1;
|
|
327
|
-
if (u.ctx = t ? t(s, e.props || {}, (g,
|
|
328
|
-
const f = h.length ? h[0] :
|
|
329
|
-
return u.ctx &&
|
|
330
|
-
}) : [], u.update(), C = !0,
|
|
335
|
+
if (u.ctx = t ? t(s, e.props || {}, (g, w, ...h) => {
|
|
336
|
+
const f = h.length ? h[0] : w;
|
|
337
|
+
return u.ctx && i(u.ctx[g], u.ctx[g] = f) && (!u.skip_bound && u.bound[g] && u.bound[g](f), C && ct(s, g)), w;
|
|
338
|
+
}) : [], u.update(), C = !0, U(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
|
331
339
|
if (e.hydrate) {
|
|
332
|
-
const g =
|
|
333
|
-
u.fragment && u.fragment.l(g), g.forEach(
|
|
340
|
+
const g = tt(e.target);
|
|
341
|
+
u.fragment && u.fragment.l(g), g.forEach(j);
|
|
334
342
|
} else
|
|
335
343
|
u.fragment && u.fragment.c();
|
|
336
|
-
e.intro &&
|
|
344
|
+
e.intro && ie(s.$$.fragment), Ae(s, e.target, e.anchor), _e();
|
|
337
345
|
}
|
|
338
|
-
|
|
346
|
+
Z(d);
|
|
339
347
|
}
|
|
340
|
-
class
|
|
348
|
+
class Pe {
|
|
341
349
|
constructor() {
|
|
342
|
-
|
|
350
|
+
ue(this, "$$"), ue(this, "$$set");
|
|
343
351
|
}
|
|
344
352
|
/** @returns {void} */
|
|
345
353
|
$destroy() {
|
|
346
|
-
|
|
354
|
+
Be(this, 1), this.$destroy = ee;
|
|
347
355
|
}
|
|
348
356
|
/**
|
|
349
357
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -352,12 +360,12 @@ class _e {
|
|
|
352
360
|
* @returns {() => void}
|
|
353
361
|
*/
|
|
354
362
|
$on(e, t) {
|
|
355
|
-
if (!
|
|
356
|
-
return
|
|
363
|
+
if (!V(t))
|
|
364
|
+
return ee;
|
|
357
365
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
358
366
|
return n.push(t), () => {
|
|
359
|
-
const
|
|
360
|
-
|
|
367
|
+
const i = n.indexOf(t);
|
|
368
|
+
i !== -1 && n.splice(i, 1);
|
|
361
369
|
};
|
|
362
370
|
}
|
|
363
371
|
/**
|
|
@@ -368,24 +376,24 @@ class _e {
|
|
|
368
376
|
this.$$set && !Je(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
369
377
|
}
|
|
370
378
|
}
|
|
371
|
-
const
|
|
372
|
-
typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
373
|
-
function
|
|
374
|
-
let e, t, n,
|
|
379
|
+
const lt = "4";
|
|
380
|
+
typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(lt);
|
|
381
|
+
function ut(s) {
|
|
382
|
+
let e, t, n, i = (
|
|
375
383
|
/*title*/
|
|
376
384
|
(s[1] || "标题") + ""
|
|
377
|
-
),
|
|
385
|
+
), r, o, l, d, u, C, g = (
|
|
378
386
|
/*cancelText*/
|
|
379
387
|
(s[4] || "取消") + ""
|
|
380
|
-
),
|
|
388
|
+
), w, h, f, E = (
|
|
381
389
|
/*okText*/
|
|
382
390
|
(s[5] || "确认") + ""
|
|
383
|
-
), y,
|
|
384
|
-
const
|
|
391
|
+
), y, S, k, p;
|
|
392
|
+
const D = (
|
|
385
393
|
/*#slots*/
|
|
386
394
|
s[8].default
|
|
387
|
-
),
|
|
388
|
-
|
|
395
|
+
), v = Re(
|
|
396
|
+
D,
|
|
389
397
|
s,
|
|
390
398
|
/*$$scope*/
|
|
391
399
|
s[7],
|
|
@@ -393,63 +401,63 @@ function ot(s) {
|
|
|
393
401
|
);
|
|
394
402
|
return {
|
|
395
403
|
c() {
|
|
396
|
-
e =
|
|
404
|
+
e = P("div"), t = P("div"), n = P("div"), r = T(i), o = K(), l = P("div"), v && v.c(), d = K(), u = P("div"), C = P("button"), w = T(g), h = K(), f = P("button"), y = T(E), B(n, "class", "model-title svelte-16iv9d0"), B(l, "class", "slot svelte-16iv9d0"), B(C, "class", "modal-btn svelte-16iv9d0"), B(f, "class", "modal-btn success svelte-16iv9d0"), W(
|
|
397
405
|
f,
|
|
398
406
|
"background-color",
|
|
399
407
|
/*theme*/
|
|
400
408
|
s[6]
|
|
401
|
-
),
|
|
409
|
+
), B(u, "class", "modal-footer svelte-16iv9d0"), B(t, "class", "modal-content svelte-16iv9d0"), B(e, "class", "modal-background modal-visible svelte-16iv9d0");
|
|
402
410
|
},
|
|
403
|
-
m(A,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
411
|
+
m(A, b) {
|
|
412
|
+
R(A, e, b), L(e, t), L(t, n), L(n, r), L(t, o), L(t, l), v && v.m(l, null), L(t, d), L(t, u), L(u, C), L(C, w), L(u, h), L(u, f), L(f, y), S = !0, k || (p = [
|
|
413
|
+
G(C, "click", function() {
|
|
414
|
+
V(
|
|
407
415
|
/*onCancel*/
|
|
408
416
|
s[0]
|
|
409
417
|
) && s[0].apply(this, arguments);
|
|
410
418
|
}),
|
|
411
|
-
|
|
412
|
-
|
|
419
|
+
G(f, "click", function() {
|
|
420
|
+
V(
|
|
413
421
|
/*onOk*/
|
|
414
422
|
s[2]
|
|
415
423
|
) && s[2].apply(this, arguments);
|
|
416
424
|
}),
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
425
|
+
G(t, "click", dt),
|
|
426
|
+
G(e, "click", function() {
|
|
427
|
+
V(
|
|
420
428
|
/*onClose*/
|
|
421
429
|
s[3]
|
|
422
430
|
) && s[3].apply(this, arguments);
|
|
423
431
|
})
|
|
424
|
-
],
|
|
432
|
+
], k = !0);
|
|
425
433
|
},
|
|
426
|
-
p(A, [
|
|
427
|
-
s = A, (!
|
|
428
|
-
2) &&
|
|
429
|
-
(s[1] || "标题") + "") &&
|
|
434
|
+
p(A, [b]) {
|
|
435
|
+
s = A, (!S || b & /*title*/
|
|
436
|
+
2) && i !== (i = /*title*/
|
|
437
|
+
(s[1] || "标题") + "") && z(r, i), v && v.p && (!S || b & /*$$scope*/
|
|
430
438
|
128) && qe(
|
|
431
|
-
|
|
432
|
-
|
|
439
|
+
v,
|
|
440
|
+
D,
|
|
433
441
|
s,
|
|
434
442
|
/*$$scope*/
|
|
435
443
|
s[7],
|
|
436
|
-
|
|
437
|
-
|
|
444
|
+
S ? Ye(
|
|
445
|
+
D,
|
|
438
446
|
/*$$scope*/
|
|
439
447
|
s[7],
|
|
440
|
-
|
|
448
|
+
b,
|
|
441
449
|
null
|
|
442
|
-
) :
|
|
450
|
+
) : Xe(
|
|
443
451
|
/*$$scope*/
|
|
444
452
|
s[7]
|
|
445
453
|
),
|
|
446
454
|
null
|
|
447
|
-
), (!
|
|
455
|
+
), (!S || b & /*cancelText*/
|
|
448
456
|
16) && g !== (g = /*cancelText*/
|
|
449
|
-
(s[4] || "取消") + "") &&
|
|
450
|
-
32) &&
|
|
451
|
-
(s[5] || "确认") + "") &&
|
|
452
|
-
64) &&
|
|
457
|
+
(s[4] || "取消") + "") && z(w, g), (!S || b & /*okText*/
|
|
458
|
+
32) && E !== (E = /*okText*/
|
|
459
|
+
(s[5] || "确认") + "") && z(y, E), (!S || b & /*theme*/
|
|
460
|
+
64) && W(
|
|
453
461
|
f,
|
|
454
462
|
"background-color",
|
|
455
463
|
/*theme*/
|
|
@@ -457,26 +465,26 @@ function ot(s) {
|
|
|
457
465
|
);
|
|
458
466
|
},
|
|
459
467
|
i(A) {
|
|
460
|
-
|
|
468
|
+
S || (ie(v, A), S = !0);
|
|
461
469
|
},
|
|
462
470
|
o(A) {
|
|
463
|
-
|
|
471
|
+
Le(v, A), S = !1;
|
|
464
472
|
},
|
|
465
473
|
d(A) {
|
|
466
|
-
A &&
|
|
474
|
+
A && j(e), v && v.d(A), k = !1, U(p);
|
|
467
475
|
}
|
|
468
476
|
};
|
|
469
477
|
}
|
|
470
|
-
const
|
|
471
|
-
function
|
|
472
|
-
let { $$slots: n = {}, $$scope:
|
|
473
|
-
return s.$$set = (
|
|
474
|
-
"onCancel" in
|
|
475
|
-
}, [
|
|
478
|
+
const dt = (s) => s.stopPropagation();
|
|
479
|
+
function ht(s, e, t) {
|
|
480
|
+
let { $$slots: n = {}, $$scope: i } = e, { onCancel: r } = e, { title: o } = e, { onOk: l } = e, { onClose: d } = e, { cancelText: u } = e, { okText: C } = e, { theme: g } = e;
|
|
481
|
+
return s.$$set = (w) => {
|
|
482
|
+
"onCancel" in w && t(0, r = w.onCancel), "title" in w && t(1, o = w.title), "onOk" in w && t(2, l = w.onOk), "onClose" in w && t(3, d = w.onClose), "cancelText" in w && t(4, u = w.cancelText), "okText" in w && t(5, C = w.okText), "theme" in w && t(6, g = w.theme), "$$scope" in w && t(7, i = w.$$scope);
|
|
483
|
+
}, [r, o, l, d, u, C, g, i, n];
|
|
476
484
|
}
|
|
477
|
-
class
|
|
485
|
+
class gt extends Pe {
|
|
478
486
|
constructor(e) {
|
|
479
|
-
super(),
|
|
487
|
+
super(), De(this, e, ht, ut, ke, {
|
|
480
488
|
onCancel: 0,
|
|
481
489
|
title: 1,
|
|
482
490
|
onOk: 2,
|
|
@@ -487,15 +495,15 @@ class ut extends _e {
|
|
|
487
495
|
});
|
|
488
496
|
}
|
|
489
497
|
}
|
|
490
|
-
function
|
|
498
|
+
function fe(s, e, t) {
|
|
491
499
|
const n = s.slice();
|
|
492
500
|
return n[13] = e[t], n[15] = t, n;
|
|
493
501
|
}
|
|
494
|
-
function
|
|
502
|
+
function Ce(s, e, t) {
|
|
495
503
|
const n = s.slice();
|
|
496
504
|
return n[16] = e[t], n;
|
|
497
505
|
}
|
|
498
|
-
function
|
|
506
|
+
function we(s) {
|
|
499
507
|
let e, t = (
|
|
500
508
|
/*col*/
|
|
501
509
|
(s[16].format ? (
|
|
@@ -514,43 +522,43 @@ function Ce(s) {
|
|
|
514
522
|
), n;
|
|
515
523
|
return {
|
|
516
524
|
c() {
|
|
517
|
-
e =
|
|
525
|
+
e = P("div"), n = T(t), B(e, "class", "svelte-1kh75ag"), W(e, "width", `${100 / /*columns*/
|
|
518
526
|
s[1].length}%`);
|
|
519
527
|
},
|
|
520
|
-
m(
|
|
521
|
-
|
|
528
|
+
m(i, r) {
|
|
529
|
+
R(i, e, r), L(e, n);
|
|
522
530
|
},
|
|
523
|
-
p(
|
|
524
|
-
|
|
531
|
+
p(i, r) {
|
|
532
|
+
r & /*columns, data*/
|
|
525
533
|
3 && t !== (t = /*col*/
|
|
526
|
-
(
|
|
534
|
+
(i[16].format ? (
|
|
527
535
|
/*col*/
|
|
528
|
-
|
|
536
|
+
i[16].format(
|
|
529
537
|
/*row*/
|
|
530
|
-
|
|
538
|
+
i[13]
|
|
531
539
|
)
|
|
532
540
|
) : (
|
|
533
541
|
/*row*/
|
|
534
|
-
|
|
542
|
+
i[13][
|
|
535
543
|
/*col*/
|
|
536
|
-
|
|
544
|
+
i[16].key
|
|
537
545
|
]
|
|
538
|
-
)) + "") &&
|
|
539
|
-
2 &&
|
|
540
|
-
|
|
546
|
+
)) + "") && z(n, t), r & /*columns*/
|
|
547
|
+
2 && W(e, "width", `${100 / /*columns*/
|
|
548
|
+
i[1].length}%`);
|
|
541
549
|
},
|
|
542
|
-
d(
|
|
543
|
-
|
|
550
|
+
d(i) {
|
|
551
|
+
i && j(e);
|
|
544
552
|
}
|
|
545
553
|
};
|
|
546
554
|
}
|
|
547
555
|
function me(s) {
|
|
548
|
-
let e, t, n,
|
|
556
|
+
let e, t, n, i, r, o = J(
|
|
549
557
|
/*columns*/
|
|
550
558
|
s[1]
|
|
551
|
-
),
|
|
552
|
-
for (let u = 0; u <
|
|
553
|
-
|
|
559
|
+
), l = [];
|
|
560
|
+
for (let u = 0; u < o.length; u += 1)
|
|
561
|
+
l[u] = we(Ce(s, o, u));
|
|
554
562
|
function d() {
|
|
555
563
|
return (
|
|
556
564
|
/*click_handler*/
|
|
@@ -562,90 +570,90 @@ function me(s) {
|
|
|
562
570
|
}
|
|
563
571
|
return {
|
|
564
572
|
c() {
|
|
565
|
-
e =
|
|
566
|
-
for (let u = 0; u <
|
|
567
|
-
|
|
568
|
-
t =
|
|
573
|
+
e = P("div");
|
|
574
|
+
for (let u = 0; u < l.length; u += 1)
|
|
575
|
+
l[u].c();
|
|
576
|
+
t = K(), B(e, "class", n = he(`cert-item ${/*index*/
|
|
569
577
|
s[15] === 0 ? "cert-item-first" : ""} ${/*index*/
|
|
570
578
|
s[15] === /*selectedIndex*/
|
|
571
579
|
s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag");
|
|
572
580
|
},
|
|
573
581
|
m(u, C) {
|
|
574
|
-
|
|
575
|
-
for (let g = 0; g <
|
|
576
|
-
|
|
577
|
-
|
|
582
|
+
R(u, e, C);
|
|
583
|
+
for (let g = 0; g < l.length; g += 1)
|
|
584
|
+
l[g] && l[g].m(e, null);
|
|
585
|
+
L(e, t), i || (r = G(e, "click", d), i = !0);
|
|
578
586
|
},
|
|
579
587
|
p(u, C) {
|
|
580
588
|
if (s = u, C & /*columns, data*/
|
|
581
589
|
3) {
|
|
582
|
-
|
|
590
|
+
o = J(
|
|
583
591
|
/*columns*/
|
|
584
592
|
s[1]
|
|
585
593
|
);
|
|
586
594
|
let g;
|
|
587
|
-
for (g = 0; g <
|
|
588
|
-
const
|
|
589
|
-
|
|
595
|
+
for (g = 0; g < o.length; g += 1) {
|
|
596
|
+
const w = Ce(s, o, g);
|
|
597
|
+
l[g] ? l[g].p(w, C) : (l[g] = we(w), l[g].c(), l[g].m(e, t));
|
|
590
598
|
}
|
|
591
|
-
for (; g <
|
|
592
|
-
|
|
593
|
-
|
|
599
|
+
for (; g < l.length; g += 1)
|
|
600
|
+
l[g].d(1);
|
|
601
|
+
l.length = o.length;
|
|
594
602
|
}
|
|
595
603
|
C & /*selectedIndex*/
|
|
596
|
-
128 && n !== (n =
|
|
604
|
+
128 && n !== (n = he(`cert-item ${/*index*/
|
|
597
605
|
s[15] === 0 ? "cert-item-first" : ""} ${/*index*/
|
|
598
606
|
s[15] === /*selectedIndex*/
|
|
599
|
-
s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") &&
|
|
607
|
+
s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") && B(e, "class", n);
|
|
600
608
|
},
|
|
601
609
|
d(u) {
|
|
602
|
-
u &&
|
|
610
|
+
u && j(e), pe(l, u), i = !1, r();
|
|
603
611
|
}
|
|
604
612
|
};
|
|
605
613
|
}
|
|
606
|
-
function
|
|
607
|
-
let e, t =
|
|
614
|
+
function yt(s) {
|
|
615
|
+
let e, t = J(
|
|
608
616
|
/*data*/
|
|
609
617
|
s[0]
|
|
610
618
|
), n = [];
|
|
611
|
-
for (let
|
|
612
|
-
n[
|
|
619
|
+
for (let i = 0; i < t.length; i += 1)
|
|
620
|
+
n[i] = me(fe(s, t, i));
|
|
613
621
|
return {
|
|
614
622
|
c() {
|
|
615
|
-
for (let r = 0; r < n.length; r += 1)
|
|
616
|
-
n[r].c();
|
|
617
|
-
e = Ye();
|
|
618
|
-
},
|
|
619
|
-
m(r, a) {
|
|
620
623
|
for (let i = 0; i < n.length; i += 1)
|
|
621
|
-
n[i]
|
|
622
|
-
|
|
624
|
+
n[i].c();
|
|
625
|
+
e = et();
|
|
623
626
|
},
|
|
624
|
-
|
|
625
|
-
|
|
627
|
+
m(i, r) {
|
|
628
|
+
for (let o = 0; o < n.length; o += 1)
|
|
629
|
+
n[o] && n[o].m(i, r);
|
|
630
|
+
R(i, e, r);
|
|
631
|
+
},
|
|
632
|
+
p(i, r) {
|
|
633
|
+
if (r & /*selectedIndex, columns, data*/
|
|
626
634
|
131) {
|
|
627
|
-
t =
|
|
635
|
+
t = J(
|
|
628
636
|
/*data*/
|
|
629
|
-
|
|
637
|
+
i[0]
|
|
630
638
|
);
|
|
631
|
-
let
|
|
632
|
-
for (
|
|
633
|
-
const
|
|
634
|
-
n[
|
|
639
|
+
let o;
|
|
640
|
+
for (o = 0; o < t.length; o += 1) {
|
|
641
|
+
const l = fe(i, t, o);
|
|
642
|
+
n[o] ? n[o].p(l, r) : (n[o] = me(l), n[o].c(), n[o].m(e.parentNode, e));
|
|
635
643
|
}
|
|
636
|
-
for (;
|
|
637
|
-
n[
|
|
644
|
+
for (; o < n.length; o += 1)
|
|
645
|
+
n[o].d(1);
|
|
638
646
|
n.length = t.length;
|
|
639
647
|
}
|
|
640
648
|
},
|
|
641
|
-
d(
|
|
642
|
-
|
|
649
|
+
d(i) {
|
|
650
|
+
i && j(e), pe(n, i);
|
|
643
651
|
}
|
|
644
652
|
};
|
|
645
653
|
}
|
|
646
|
-
function
|
|
654
|
+
function ft(s) {
|
|
647
655
|
let e, t;
|
|
648
|
-
return e = new
|
|
656
|
+
return e = new gt({
|
|
649
657
|
props: {
|
|
650
658
|
onOk: (
|
|
651
659
|
/*handleOk*/
|
|
@@ -675,70 +683,70 @@ function ht(s) {
|
|
|
675
683
|
/*theme*/
|
|
676
684
|
s[5]
|
|
677
685
|
),
|
|
678
|
-
$$slots: { default: [
|
|
686
|
+
$$slots: { default: [yt] },
|
|
679
687
|
$$scope: { ctx: s }
|
|
680
688
|
}
|
|
681
689
|
}), {
|
|
682
690
|
c() {
|
|
683
|
-
|
|
691
|
+
ot(e.$$.fragment);
|
|
684
692
|
},
|
|
685
|
-
m(n,
|
|
686
|
-
Ae(e, n,
|
|
693
|
+
m(n, i) {
|
|
694
|
+
Ae(e, n, i), t = !0;
|
|
687
695
|
},
|
|
688
|
-
p(n, [
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
4 && (
|
|
692
|
-
n[2]),
|
|
693
|
-
8 && (
|
|
694
|
-
n[3]),
|
|
695
|
-
16 && (
|
|
696
|
-
n[4]),
|
|
697
|
-
64 && (
|
|
698
|
-
n[6]),
|
|
699
|
-
32 && (
|
|
700
|
-
n[5]),
|
|
701
|
-
524419 && (
|
|
696
|
+
p(n, [i]) {
|
|
697
|
+
const r = {};
|
|
698
|
+
i & /*onClose*/
|
|
699
|
+
4 && (r.onClose = /*onClose*/
|
|
700
|
+
n[2]), i & /*cancelText*/
|
|
701
|
+
8 && (r.cancelText = /*cancelText*/
|
|
702
|
+
n[3]), i & /*okText*/
|
|
703
|
+
16 && (r.okText = /*okText*/
|
|
704
|
+
n[4]), i & /*title*/
|
|
705
|
+
64 && (r.title = /*title*/
|
|
706
|
+
n[6]), i & /*theme*/
|
|
707
|
+
32 && (r.theme = /*theme*/
|
|
708
|
+
n[5]), i & /*$$scope, data, selectedIndex, columns*/
|
|
709
|
+
524419 && (r.$$scope = { dirty: i, ctx: n }), e.$set(r);
|
|
702
710
|
},
|
|
703
711
|
i(n) {
|
|
704
|
-
t || (
|
|
712
|
+
t || (ie(e.$$.fragment, n), t = !0);
|
|
705
713
|
},
|
|
706
714
|
o(n) {
|
|
707
|
-
|
|
715
|
+
Le(e.$$.fragment, n), t = !1;
|
|
708
716
|
},
|
|
709
717
|
d(n) {
|
|
710
|
-
|
|
718
|
+
Be(e, n);
|
|
711
719
|
}
|
|
712
720
|
};
|
|
713
721
|
}
|
|
714
|
-
function
|
|
715
|
-
let { data: n = [] } = e, { columns:
|
|
722
|
+
function Ct(s, e, t) {
|
|
723
|
+
let { data: n = [] } = e, { columns: i = [] } = e, { onCancel: r } = e, { onOk: o } = e, { onClose: l } = e, { cancelText: d = "" } = e, { okText: u = "" } = e, { theme: C = "#409eff" } = e, { title: g = "" } = e, w = 0;
|
|
716
724
|
const h = () => {
|
|
717
|
-
|
|
725
|
+
r(`${g}失败`), l == null || l();
|
|
718
726
|
}, f = () => {
|
|
719
|
-
|
|
720
|
-
},
|
|
727
|
+
o == null || o(n[w]), l == null || l();
|
|
728
|
+
}, E = (y) => t(7, w = y);
|
|
721
729
|
return s.$$set = (y) => {
|
|
722
|
-
"data" in y && t(0, n = y.data), "columns" in y && t(1,
|
|
730
|
+
"data" in y && t(0, n = y.data), "columns" in y && t(1, i = y.columns), "onCancel" in y && t(10, r = y.onCancel), "onOk" in y && t(11, o = y.onOk), "onClose" in y && t(2, l = y.onClose), "cancelText" in y && t(3, d = y.cancelText), "okText" in y && t(4, u = y.okText), "theme" in y && t(5, C = y.theme), "title" in y && t(6, g = y.title);
|
|
723
731
|
}, [
|
|
724
732
|
n,
|
|
725
|
-
|
|
726
|
-
|
|
733
|
+
i,
|
|
734
|
+
l,
|
|
727
735
|
d,
|
|
728
736
|
u,
|
|
729
737
|
C,
|
|
730
738
|
g,
|
|
731
|
-
|
|
739
|
+
w,
|
|
732
740
|
h,
|
|
733
741
|
f,
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
742
|
+
r,
|
|
743
|
+
o,
|
|
744
|
+
E
|
|
737
745
|
];
|
|
738
746
|
}
|
|
739
|
-
class
|
|
747
|
+
class wt extends Pe {
|
|
740
748
|
constructor(e) {
|
|
741
|
-
super(),
|
|
749
|
+
super(), De(this, e, Ct, ft, ke, {
|
|
742
750
|
data: 0,
|
|
743
751
|
columns: 1,
|
|
744
752
|
onCancel: 10,
|
|
@@ -751,21 +759,21 @@ class yt extends _e {
|
|
|
751
759
|
});
|
|
752
760
|
}
|
|
753
761
|
}
|
|
754
|
-
class
|
|
762
|
+
class mt {
|
|
755
763
|
constructor() {
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
this.modalInstance.current = new
|
|
764
|
+
a(this, "modalInstance", { current: null });
|
|
765
|
+
a(this, "open", (e) => new Promise((t, n) => {
|
|
766
|
+
this.modalInstance.current = new wt({
|
|
759
767
|
target: document.body,
|
|
760
|
-
props:
|
|
761
|
-
onCancel: (
|
|
768
|
+
props: _(m({}, e), {
|
|
769
|
+
onCancel: (i) => {
|
|
762
770
|
n({
|
|
763
771
|
code: -1,
|
|
764
|
-
msg:
|
|
772
|
+
msg: i
|
|
765
773
|
});
|
|
766
774
|
},
|
|
767
|
-
onOk: (
|
|
768
|
-
t(
|
|
775
|
+
onOk: (i) => {
|
|
776
|
+
t(i);
|
|
769
777
|
},
|
|
770
778
|
onClose: () => {
|
|
771
779
|
this.close();
|
|
@@ -773,7 +781,7 @@ class ft {
|
|
|
773
781
|
})
|
|
774
782
|
});
|
|
775
783
|
}));
|
|
776
|
-
|
|
784
|
+
a(this, "close", () => {
|
|
777
785
|
setTimeout(() => {
|
|
778
786
|
var e;
|
|
779
787
|
(e = this.modalInstance.current) == null || e.$destroy();
|
|
@@ -781,27 +789,27 @@ class ft {
|
|
|
781
789
|
});
|
|
782
790
|
}
|
|
783
791
|
}
|
|
784
|
-
const
|
|
785
|
-
function
|
|
786
|
-
const n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),
|
|
792
|
+
const O = new mt();
|
|
793
|
+
function Et(s = 32, e = !0, t = 0) {
|
|
794
|
+
const n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), i = [];
|
|
787
795
|
if (t = t || n.length, s)
|
|
788
|
-
for (let
|
|
796
|
+
for (let r = 0; r < s; r++) i[r] = n[0 | Math.random() * t];
|
|
789
797
|
else {
|
|
790
|
-
let
|
|
791
|
-
|
|
792
|
-
for (let
|
|
793
|
-
|
|
798
|
+
let r;
|
|
799
|
+
i[8] = i[13] = i[18] = i[23] = "-", i[14] = "4";
|
|
800
|
+
for (let o = 0; o < 36; o++)
|
|
801
|
+
i[o] || (r = 0 | Math.random() * 16, i[o] = n[o === 19 ? r & 3 | 8 : r]);
|
|
794
802
|
}
|
|
795
|
-
return e ? (
|
|
803
|
+
return e ? (i.shift(), `u${i.join("")}`) : i.join("");
|
|
796
804
|
}
|
|
797
|
-
const
|
|
805
|
+
const St = [
|
|
798
806
|
{
|
|
799
807
|
key: "CN"
|
|
800
808
|
},
|
|
801
809
|
{
|
|
802
810
|
format: (s) => `${s.DevClass}(${s.sn})`
|
|
803
811
|
}
|
|
804
|
-
],
|
|
812
|
+
], vt = [
|
|
805
813
|
{
|
|
806
814
|
key: "SealId"
|
|
807
815
|
},
|
|
@@ -811,102 +819,119 @@ const mt = [
|
|
|
811
819
|
{
|
|
812
820
|
format: (s) => `${s.FileName}(${s.FileSize}B)`
|
|
813
821
|
}
|
|
814
|
-
],
|
|
822
|
+
], Ee = [
|
|
815
823
|
{
|
|
816
824
|
key: "SealId"
|
|
817
825
|
}
|
|
826
|
+
], kt = [
|
|
827
|
+
{
|
|
828
|
+
key: "manu"
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
key: "sn"
|
|
832
|
+
}
|
|
818
833
|
];
|
|
819
|
-
class
|
|
834
|
+
class It {
|
|
820
835
|
constructor(e) {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
836
|
+
a(this, "socketInstance", null);
|
|
837
|
+
a(this, "eventBus", new Ke());
|
|
838
|
+
a(this, "scene");
|
|
839
|
+
a(this, "isRememberPin", !1);
|
|
840
|
+
a(this, "pinPolicy");
|
|
841
|
+
a(this, "socketConfig", null);
|
|
842
|
+
a(this, "isConnecting", !1);
|
|
843
|
+
a(this, "messageQueue", []);
|
|
844
|
+
a(this, "getSocketReadyState", () => {
|
|
829
845
|
var e;
|
|
830
846
|
return (e = this.socketInstance) == null ? void 0 : e.readyState;
|
|
831
847
|
});
|
|
832
|
-
|
|
848
|
+
a(this, "destroy", () => {
|
|
833
849
|
var e;
|
|
834
850
|
(e = this.socketInstance) == null || e.close();
|
|
835
851
|
});
|
|
836
|
-
|
|
837
|
-
var
|
|
838
|
-
const
|
|
839
|
-
var
|
|
840
|
-
if (((
|
|
852
|
+
a(this, "sendMessage", (e, t, n) => new Promise((i, r) => {
|
|
853
|
+
var l;
|
|
854
|
+
const o = () => {
|
|
855
|
+
var g, w;
|
|
856
|
+
if (((g = this.socketInstance) == null ? void 0 : g.readyState) !== WebSocket.OPEN) {
|
|
841
857
|
r({
|
|
842
|
-
errCode:
|
|
858
|
+
errCode: Ve,
|
|
843
859
|
msg: "数字证书客户端连接失败"
|
|
844
860
|
});
|
|
845
861
|
return;
|
|
846
862
|
}
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
},
|
|
863
|
+
const d = Et(), u = (h) => {
|
|
864
|
+
h.success ? i(h.data) : r(h);
|
|
865
|
+
}, C = {
|
|
850
866
|
function: e,
|
|
851
|
-
args:
|
|
852
|
-
msgid:
|
|
867
|
+
args: t ? [t] : [],
|
|
868
|
+
msgid: d
|
|
853
869
|
};
|
|
854
|
-
(
|
|
870
|
+
(w = this.socketInstance) == null || w.send(JSON.stringify(C)), this.eventBus.on(e, u), this.eventBus.on(d, u);
|
|
855
871
|
};
|
|
856
|
-
if (
|
|
857
|
-
|
|
872
|
+
if (n && (this.scene & n) !== n) {
|
|
873
|
+
r({
|
|
874
|
+
errCode: Ze,
|
|
875
|
+
msg: "无权限执行此操作"
|
|
876
|
+
});
|
|
858
877
|
return;
|
|
859
878
|
}
|
|
860
|
-
this.
|
|
879
|
+
if (((l = this.socketInstance) == null ? void 0 : l.readyState) === WebSocket.OPEN) {
|
|
880
|
+
o();
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
this.messageQueue.push(o), this.isConnecting || this.initSocket(this.socketConfig);
|
|
861
884
|
}));
|
|
862
|
-
|
|
885
|
+
a(this, "flushMsgQueue", () => {
|
|
863
886
|
var e;
|
|
864
887
|
(e = this.messageQueue) == null || e.forEach((t) => t()), this.messageQueue = [];
|
|
865
888
|
});
|
|
866
|
-
|
|
867
|
-
var t, n,
|
|
889
|
+
a(this, "handleEventData", (e) => c(this, null, function* () {
|
|
890
|
+
var t, n, i, r, o, l, d, u;
|
|
868
891
|
if (e.data instanceof Blob) {
|
|
869
|
-
const C = yield e.data.arrayBuffer(),
|
|
892
|
+
const C = yield e.data.arrayBuffer(), w = new TextDecoder(
|
|
893
|
+
navigator.userAgent.includes("Windows") ? "gbk" : "utf-8"
|
|
894
|
+
).decode(C), h = JSON.parse(w), f = {
|
|
870
895
|
success: (t = h.result) == null ? void 0 : t.success,
|
|
871
896
|
msg: (n = h.result) == null ? void 0 : n.msg,
|
|
872
|
-
errCode: (
|
|
897
|
+
errCode: (i = h.result) == null ? void 0 : i.errCode,
|
|
873
898
|
data: h.data,
|
|
874
|
-
type: (
|
|
875
|
-
},
|
|
876
|
-
y ? this.eventBus.emit(y, f) : this.eventBus.emit(
|
|
899
|
+
type: (r = h.result) == null ? void 0 : r.event
|
|
900
|
+
}, E = (o = h.result) == null ? void 0 : o.function, y = (l = h.result) == null ? void 0 : l.msgid;
|
|
901
|
+
y ? this.eventBus.emit(y, f) : this.eventBus.emit(E, f), (u = (d = this.socketConfig) == null ? void 0 : d.onMessage) == null || u.call(d, f);
|
|
877
902
|
}
|
|
878
903
|
}));
|
|
879
|
-
|
|
904
|
+
a(this, "base64Encode", (e) => {
|
|
880
905
|
const t = new TextEncoder().encode(e);
|
|
881
|
-
return
|
|
906
|
+
return le.fromByteArray(t);
|
|
882
907
|
});
|
|
883
|
-
|
|
884
|
-
const t =
|
|
908
|
+
a(this, "base64Decode", (e) => {
|
|
909
|
+
const t = le.toByteArray(e);
|
|
885
910
|
return new TextDecoder().decode(t);
|
|
886
911
|
});
|
|
887
|
-
|
|
912
|
+
a(this, "changeIsRememberPin", (e) => c(this, null, function* () {
|
|
888
913
|
this.isRememberPin = e;
|
|
889
914
|
}));
|
|
890
|
-
|
|
915
|
+
a(this, "changePinPolicy", (e) => c(this, null, function* () {
|
|
891
916
|
this.pinPolicy = e;
|
|
892
917
|
}));
|
|
893
|
-
|
|
918
|
+
a(this, "checkCertIsLogin", (e) => c(this, null, function* () {
|
|
894
919
|
return yield this.sendMessage("GZCA_IsLogin", e);
|
|
895
920
|
}));
|
|
896
|
-
|
|
921
|
+
a(this, "addUkeyEvents", () => c(this, null, function* () {
|
|
897
922
|
this.sendMessage("GZCA_WaitForDevEvent", {
|
|
898
|
-
Type:
|
|
923
|
+
Type: Ge
|
|
899
924
|
}), this.eventBus.on(
|
|
900
925
|
"GZCA_OnDeviceChange",
|
|
901
926
|
(e) => {
|
|
902
|
-
var t, n,
|
|
903
|
-
(
|
|
927
|
+
var t, n, i;
|
|
928
|
+
(i = (t = this.socketConfig) == null ? void 0 : t.onUkeyChange) == null || i.call(t, _(m({}, e), {
|
|
904
929
|
data: (n = e.data) == null ? void 0 : n[0]
|
|
905
930
|
}));
|
|
906
931
|
}
|
|
907
932
|
);
|
|
908
933
|
}));
|
|
909
|
-
|
|
934
|
+
a(this, "certLogin", (e) => c(this, null, function* () {
|
|
910
935
|
const t = yield this.checkCertIsLogin({
|
|
911
936
|
ContainerName: e
|
|
912
937
|
});
|
|
@@ -917,330 +942,413 @@ class St {
|
|
|
917
942
|
PinPolicy: this.pinPolicy
|
|
918
943
|
}));
|
|
919
944
|
}));
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
945
|
+
a(this, "verifyPin", (e) => c(this, null, function* () {
|
|
946
|
+
var t;
|
|
947
|
+
yield this.sendMessage("GZCA_Login", {
|
|
948
|
+
ContainerName: e.ContainerName,
|
|
949
|
+
IsLogin: e.UserPin ? "Y" : "N",
|
|
950
|
+
UserPin: (t = e.UserPin) != null ? t : "123456",
|
|
951
|
+
PinPolicy: this.pinPolicy
|
|
952
|
+
});
|
|
923
953
|
}));
|
|
924
|
-
|
|
925
|
-
|
|
954
|
+
a(this, "getCert", (e, t, n) => c(this, null, function* () {
|
|
955
|
+
const i = t != null ? t : yield this.chooseCert(e);
|
|
956
|
+
return this.isRememberPin && n && (yield this.certLogin(i.ContainerName)), i;
|
|
957
|
+
}));
|
|
958
|
+
a(this, "chooseCert", (e) => c(this, null, function* () {
|
|
959
|
+
var i;
|
|
926
960
|
const t = yield this.getCertList(e);
|
|
927
|
-
return t != null && t.length ? (t == null ? void 0 : t.length) === 1 ? t[0] : yield
|
|
961
|
+
return t != null && t.length ? (t == null ? void 0 : t.length) === 1 ? t[0] : yield O.open({
|
|
928
962
|
title: "选择证书",
|
|
929
963
|
data: t,
|
|
930
|
-
columns:
|
|
931
|
-
theme: (
|
|
964
|
+
columns: St,
|
|
965
|
+
theme: (i = this.socketConfig) == null ? void 0 : i.theme
|
|
932
966
|
}) : Promise.reject({
|
|
933
|
-
errCode:
|
|
967
|
+
errCode: Oe,
|
|
934
968
|
msg: "暂无证书"
|
|
935
969
|
});
|
|
936
970
|
}));
|
|
937
|
-
|
|
971
|
+
a(this, "getCertList", (e) => c(this, null, function* () {
|
|
938
972
|
return yield this.sendMessage(
|
|
939
973
|
"GZCA_GetCertList",
|
|
940
974
|
e
|
|
941
975
|
);
|
|
942
976
|
}));
|
|
943
|
-
|
|
944
|
-
return yield this.sendMessage("GZCA_Pkcs1SignData",
|
|
977
|
+
a(this, "pkcs1Sign", (e) => c(this, null, function* () {
|
|
978
|
+
return yield this.sendMessage("GZCA_Pkcs1SignData", m({
|
|
945
979
|
IsLogin: this.getIsLogin(),
|
|
946
980
|
PinPolicy: this.pinPolicy
|
|
947
981
|
}, e != null ? e : {}));
|
|
948
982
|
}));
|
|
949
|
-
|
|
950
|
-
return yield this.sendMessage("GZCA_Pkcs1SignDataEx",
|
|
983
|
+
a(this, "pkcs1Base64Sign", (e) => c(this, null, function* () {
|
|
984
|
+
return yield this.sendMessage("GZCA_Pkcs1SignDataEx", m({
|
|
951
985
|
IsLogin: this.getIsLogin(),
|
|
952
986
|
PinPolicy: this.pinPolicy
|
|
953
987
|
}, e != null ? e : {}));
|
|
954
988
|
}));
|
|
955
|
-
|
|
956
|
-
return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx",
|
|
989
|
+
a(this, "batchPkcs1Base64Sign", (e) => c(this, null, function* () {
|
|
990
|
+
return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx", m({
|
|
957
991
|
IsLogin: this.getIsLogin(),
|
|
958
992
|
PinPolicy: this.pinPolicy
|
|
959
993
|
}, e != null ? e : {}));
|
|
960
994
|
}));
|
|
961
|
-
|
|
995
|
+
a(this, "pkcs1VerifySignature", (e) => c(this, null, function* () {
|
|
962
996
|
return yield this.sendMessage("GZCA_Pkcs1VerifySign", e);
|
|
963
997
|
}));
|
|
964
|
-
|
|
998
|
+
a(this, "pkcs1Base64VerifySignature", (e) => c(this, null, function* () {
|
|
965
999
|
return yield this.sendMessage("GZCA_Pkcs1VerifySignEx", e);
|
|
966
1000
|
}));
|
|
967
|
-
|
|
968
|
-
return yield this.sendMessage(
|
|
969
|
-
|
|
970
|
-
|
|
1001
|
+
a(this, "getSealList", (e) => c(this, null, function* () {
|
|
1002
|
+
return yield this.sendMessage(
|
|
1003
|
+
"GZCA_EnumSeals",
|
|
1004
|
+
m({
|
|
1005
|
+
IsLogin: this.getIsLogin()
|
|
1006
|
+
}, e != null ? e : {}),
|
|
1007
|
+
I.LEVEL_2
|
|
1008
|
+
);
|
|
971
1009
|
}));
|
|
972
|
-
|
|
973
|
-
return yield this.sendMessage(
|
|
974
|
-
|
|
975
|
-
|
|
1010
|
+
a(this, "writeSeal", (e) => c(this, null, function* () {
|
|
1011
|
+
return yield this.sendMessage(
|
|
1012
|
+
"GZCA_WriteSeal",
|
|
1013
|
+
m({
|
|
1014
|
+
IsLogin: this.getIsLogin()
|
|
1015
|
+
}, e != null ? e : {}),
|
|
1016
|
+
I.LEVEL_2
|
|
1017
|
+
);
|
|
976
1018
|
}));
|
|
977
|
-
|
|
978
|
-
return yield this.sendMessage(
|
|
979
|
-
|
|
980
|
-
|
|
1019
|
+
a(this, "deleteSeal", (e) => c(this, null, function* () {
|
|
1020
|
+
return yield this.sendMessage(
|
|
1021
|
+
"GZCA_DeleteSeal",
|
|
1022
|
+
m({
|
|
1023
|
+
IsLogin: this.getIsLogin()
|
|
1024
|
+
}, e != null ? e : {}),
|
|
1025
|
+
I.LEVEL_2
|
|
1026
|
+
);
|
|
981
1027
|
}));
|
|
982
|
-
|
|
983
|
-
return yield this.sendMessage(
|
|
984
|
-
|
|
985
|
-
|
|
1028
|
+
a(this, "getSealInfo", (e) => c(this, null, function* () {
|
|
1029
|
+
return yield this.sendMessage(
|
|
1030
|
+
"GZCA_ReadSeal",
|
|
1031
|
+
m({
|
|
1032
|
+
IsLogin: this.getIsLogin()
|
|
1033
|
+
}, e != null ? e : {}),
|
|
1034
|
+
I.LEVEL_2
|
|
1035
|
+
);
|
|
986
1036
|
}));
|
|
987
|
-
|
|
988
|
-
return yield this.sendMessage(
|
|
989
|
-
|
|
990
|
-
|
|
1037
|
+
a(this, "getTPSealList", (e) => c(this, null, function* () {
|
|
1038
|
+
return yield this.sendMessage(
|
|
1039
|
+
"GZCA_GetSealPicList",
|
|
1040
|
+
m({
|
|
1041
|
+
IsLogin: this.getIsLogin()
|
|
1042
|
+
}, e != null ? e : {}),
|
|
1043
|
+
I.LEVEL_2
|
|
1044
|
+
);
|
|
991
1045
|
}));
|
|
992
|
-
|
|
1046
|
+
a(this, "getTPSealPic", (e) => c(this, null, function* () {
|
|
993
1047
|
var n;
|
|
994
|
-
return yield this.sendMessage(
|
|
995
|
-
|
|
996
|
-
|
|
1048
|
+
return yield this.sendMessage(
|
|
1049
|
+
"GZCA_GetSealPicData",
|
|
1050
|
+
m({
|
|
1051
|
+
IsLogin: (n = e.IsLogin) != null ? n : this.getIsLogin()
|
|
1052
|
+
}, e != null ? e : {}),
|
|
1053
|
+
I.LEVEL_2
|
|
1054
|
+
);
|
|
997
1055
|
}));
|
|
998
|
-
|
|
1056
|
+
a(this, "sm2SignPreprocess1", (e) => c(this, null, function* () {
|
|
999
1057
|
return yield this.sendMessage("GZCA_PrepareSm2SignStep1", e);
|
|
1000
1058
|
}));
|
|
1001
|
-
|
|
1059
|
+
a(this, "sm2SignPreprocess2", (e) => c(this, null, function* () {
|
|
1002
1060
|
return yield this.sendMessage("GZCA_PrepareSm2SignStep2", e);
|
|
1003
1061
|
}));
|
|
1004
|
-
|
|
1005
|
-
return yield this.sendMessage("GZCA_Pkcs1SignDataForHash",
|
|
1062
|
+
a(this, "pkcs1HashSign", (e) => c(this, null, function* () {
|
|
1063
|
+
return yield this.sendMessage("GZCA_Pkcs1SignDataForHash", m({
|
|
1006
1064
|
IsLogin: this.getIsLogin(),
|
|
1007
1065
|
PinPolicy: this.pinPolicy
|
|
1008
1066
|
}, e != null ? e : {}));
|
|
1009
1067
|
}));
|
|
1010
|
-
|
|
1068
|
+
a(this, "pkcs1HashVerifySignature", (e) => c(this, null, function* () {
|
|
1011
1069
|
return yield this.sendMessage("GZCA_Pkcs1VerifySignForHash", e);
|
|
1012
1070
|
}));
|
|
1013
|
-
|
|
1014
|
-
return yield this.sendMessage("GZCA_Pkcs7SignData",
|
|
1071
|
+
a(this, "pkcs7Sign", (e) => c(this, null, function* () {
|
|
1072
|
+
return yield this.sendMessage("GZCA_Pkcs7SignData", m({
|
|
1015
1073
|
IsLogin: this.getIsLogin(),
|
|
1016
1074
|
IsAuthAttr: "Y",
|
|
1017
1075
|
PinPolicy: this.pinPolicy
|
|
1018
1076
|
}, e != null ? e : {}));
|
|
1019
1077
|
}));
|
|
1020
|
-
|
|
1078
|
+
a(this, "pkcs7VerifySignature", (e) => c(this, null, function* () {
|
|
1021
1079
|
return yield this.sendMessage("GZCA_Pkcs7VerifySign", e);
|
|
1022
1080
|
}));
|
|
1023
|
-
|
|
1081
|
+
a(this, "sm3Hash", (e) => c(this, null, function* () {
|
|
1024
1082
|
return yield this.sendMessage("GZCA_HashData", e);
|
|
1025
1083
|
}));
|
|
1026
|
-
|
|
1084
|
+
a(this, "sm3HexHash", (e) => c(this, null, function* () {
|
|
1027
1085
|
return yield this.sendMessage("GZCA_HashDataEx", e);
|
|
1028
1086
|
}));
|
|
1029
|
-
|
|
1087
|
+
a(this, "sm3FileHash", (e) => c(this, null, function* () {
|
|
1030
1088
|
return yield this.sendMessage("GZCA_HashFile", e);
|
|
1031
1089
|
}));
|
|
1032
|
-
|
|
1090
|
+
a(this, "sm3HashEncryption", (e) => c(this, null, function* () {
|
|
1033
1091
|
return yield this.sendMessage("GZCA_HMac", e);
|
|
1034
1092
|
}));
|
|
1035
|
-
|
|
1093
|
+
a(this, "pkcs7Encryption", (e) => c(this, null, function* () {
|
|
1036
1094
|
return yield this.sendMessage("GZCA_Pkcs7EncryptData", e);
|
|
1037
1095
|
}));
|
|
1038
|
-
|
|
1039
|
-
return yield this.sendMessage("GZCA_Pkcs7DecryptData",
|
|
1096
|
+
a(this, "pkcs7Decryption", (e) => c(this, null, function* () {
|
|
1097
|
+
return yield this.sendMessage("GZCA_Pkcs7DecryptData", m({
|
|
1040
1098
|
IsLogin: this.getIsLogin()
|
|
1041
1099
|
}, e != null ? e : {}));
|
|
1042
1100
|
}));
|
|
1043
|
-
|
|
1101
|
+
a(this, "pkcs7FileEncryption", (e) => c(this, null, function* () {
|
|
1044
1102
|
return yield this.sendMessage("GZCA_EnvelopeSealFileEx_qyzc", e);
|
|
1045
1103
|
}));
|
|
1046
|
-
|
|
1047
|
-
return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc",
|
|
1104
|
+
a(this, "pkcs7FileDecryption", (e) => c(this, null, function* () {
|
|
1105
|
+
return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc", m({
|
|
1048
1106
|
IsLogin: this.getIsLogin()
|
|
1049
1107
|
}, e != null ? e : {}));
|
|
1050
1108
|
}));
|
|
1051
|
-
|
|
1109
|
+
a(this, "asymmetricEncryption", (e) => c(this, null, function* () {
|
|
1052
1110
|
return yield this.sendMessage("GZCA_AsymEncryptData", e);
|
|
1053
1111
|
}));
|
|
1054
|
-
|
|
1055
|
-
return yield this.sendMessage("GZCA_AsymDecryptData",
|
|
1112
|
+
a(this, "asymmetricDecryption", (e) => c(this, null, function* () {
|
|
1113
|
+
return yield this.sendMessage("GZCA_AsymDecryptData", m({
|
|
1056
1114
|
IsLogin: this.getIsLogin()
|
|
1057
1115
|
}, e != null ? e : {}));
|
|
1058
1116
|
}));
|
|
1059
|
-
|
|
1117
|
+
a(this, "sm4Encryption", (e) => c(this, null, function* () {
|
|
1060
1118
|
return yield this.sendMessage("GZCA_EncryptDataEx", e);
|
|
1061
1119
|
}));
|
|
1062
|
-
|
|
1120
|
+
a(this, "sm4Decryption", (e) => c(this, null, function* () {
|
|
1063
1121
|
return yield this.sendMessage("GZCA_DecryptDataEx", e);
|
|
1064
1122
|
}));
|
|
1065
|
-
|
|
1123
|
+
a(this, "getCertInfo", (e) => c(this, null, function* () {
|
|
1066
1124
|
return yield this.sendMessage("GZCA_GetCertInfo", e);
|
|
1067
1125
|
}));
|
|
1068
|
-
|
|
1126
|
+
a(this, "getCertInfoByOid", (e) => c(this, null, function* () {
|
|
1069
1127
|
return yield this.sendMessage("GZCA_GetCertInfoByOid", e);
|
|
1070
1128
|
}));
|
|
1071
|
-
|
|
1072
|
-
return yield this.sendMessage(
|
|
1129
|
+
a(this, "getSealVendor", (e) => c(this, null, function* () {
|
|
1130
|
+
return yield this.sendMessage(
|
|
1131
|
+
"GZCA_GetSealIssuer",
|
|
1132
|
+
e,
|
|
1133
|
+
I.LEVEL_2
|
|
1134
|
+
);
|
|
1073
1135
|
}));
|
|
1074
|
-
|
|
1075
|
-
return yield this.sendMessage(
|
|
1076
|
-
|
|
1077
|
-
|
|
1136
|
+
a(this, "deleteAllSealByVendor", (e) => c(this, null, function* () {
|
|
1137
|
+
return yield this.sendMessage(
|
|
1138
|
+
"GZCA_ClearSeal",
|
|
1139
|
+
m({
|
|
1140
|
+
IsLogin: this.getIsLogin()
|
|
1141
|
+
}, e != null ? e : {}),
|
|
1142
|
+
I.LEVEL_2
|
|
1143
|
+
);
|
|
1078
1144
|
}));
|
|
1079
|
-
|
|
1080
|
-
|
|
1145
|
+
a(this, "applyCert", (e) => c(this, null, function* () {
|
|
1146
|
+
return yield this.sendMessage(
|
|
1147
|
+
"GZCA_ApplyCert",
|
|
1148
|
+
{
|
|
1149
|
+
manu: e.manu,
|
|
1150
|
+
sn: e.sn,
|
|
1151
|
+
keyid: e.ContainerName,
|
|
1152
|
+
type: e.type,
|
|
1153
|
+
url: e.url
|
|
1154
|
+
},
|
|
1155
|
+
I.LEVEL_3
|
|
1156
|
+
);
|
|
1157
|
+
}));
|
|
1158
|
+
a(this, "resetPin", (e) => c(this, null, function* () {
|
|
1159
|
+
return yield this.sendMessage(
|
|
1160
|
+
"GZCA_UnblockUserPin",
|
|
1161
|
+
m({}, e != null ? e : {}),
|
|
1162
|
+
I.LEVEL_3
|
|
1163
|
+
);
|
|
1164
|
+
}));
|
|
1165
|
+
a(this, "getUKeyList", () => c(this, null, function* () {
|
|
1166
|
+
return yield this.sendMessage(
|
|
1167
|
+
"GetUKeyList",
|
|
1168
|
+
void 0,
|
|
1169
|
+
I.LEVEL_3
|
|
1170
|
+
);
|
|
1171
|
+
}));
|
|
1172
|
+
a(this, "getUKeyInfo", (e) => c(this, null, function* () {
|
|
1173
|
+
return yield this.sendMessage(
|
|
1174
|
+
"GetUKeyID",
|
|
1175
|
+
e != null ? e : {},
|
|
1176
|
+
I.LEVEL_3
|
|
1177
|
+
);
|
|
1178
|
+
}));
|
|
1179
|
+
var t, n, i;
|
|
1180
|
+
this.socketConfig = e, this.initSocket(e), this.isRememberPin = (t = e.isRememberPin) != null ? t : !1, this.scene = (n = e.scene) != null ? n : Fe.OPEN, this.pinPolicy = (i = e.pinPolicy) != null ? i : Se.MIN;
|
|
1081
1181
|
}
|
|
1082
1182
|
initSocket(e) {
|
|
1083
1183
|
this.isConnecting = !0;
|
|
1084
1184
|
const t = new WebSocket(e.url);
|
|
1085
|
-
|
|
1086
|
-
var
|
|
1087
|
-
this.isConnecting = !1, (
|
|
1185
|
+
t.onerror = (n) => {
|
|
1186
|
+
var i;
|
|
1187
|
+
this.isConnecting = !1, (i = e.onError) == null || i.call(e, n), this.flushMsgQueue();
|
|
1088
1188
|
}, t.onopen = (n) => {
|
|
1089
|
-
var
|
|
1090
|
-
this.isConnecting = !1, (
|
|
1189
|
+
var i;
|
|
1190
|
+
this.isConnecting = !1, (i = e.onOpen) == null || i.call(e, n), e.onUkeyChange && this.addUkeyEvents(), this.flushMsgQueue();
|
|
1091
1191
|
}, t.onmessage = (n) => {
|
|
1092
1192
|
this.handleEventData(n);
|
|
1093
1193
|
}, t.onclose = (n) => {
|
|
1094
|
-
var
|
|
1095
|
-
this.isConnecting = !1, (
|
|
1096
|
-
}, this.socketInstance = t
|
|
1194
|
+
var i;
|
|
1195
|
+
this.isConnecting = !1, (i = e.onClose) == null || i.call(e, n);
|
|
1196
|
+
}, this.socketInstance = t;
|
|
1097
1197
|
}
|
|
1098
1198
|
getIsLogin() {
|
|
1099
1199
|
return this.isRememberPin ? "Y" : "N";
|
|
1100
1200
|
}
|
|
1101
1201
|
}
|
|
1102
|
-
const
|
|
1202
|
+
const $ = class $ {
|
|
1103
1203
|
constructor(e) {
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
this.gwsConfig = e != null ? e : {}, this.coreInstance = new
|
|
1108
|
-
url:
|
|
1204
|
+
a(this, "coreInstance", null);
|
|
1205
|
+
a(this, "gwsConfig", {});
|
|
1206
|
+
a(this, "createGwsCore", (e) => {
|
|
1207
|
+
this.gwsConfig = e != null ? e : {}, this.coreInstance = new It(_(m({}, e != null ? e : {}), {
|
|
1208
|
+
url: Me
|
|
1109
1209
|
}));
|
|
1110
1210
|
});
|
|
1111
|
-
|
|
1211
|
+
a(this, "appendCertBase64", (e, t = !0) => c(this, null, function* () {
|
|
1112
1212
|
if (e.CertB64) return e;
|
|
1113
1213
|
const n = t ? yield this.getSignatureCert() : yield this.getEncryptionCert();
|
|
1114
|
-
return
|
|
1214
|
+
return _(m({}, e != null ? e : {}), { CertB64: n == null ? void 0 : n.CertB64 });
|
|
1115
1215
|
}));
|
|
1116
|
-
|
|
1216
|
+
a(this, "destroy", () => {
|
|
1117
1217
|
var e;
|
|
1118
1218
|
(e = this.coreInstance) == null || e.destroy(), this.coreInstance = null;
|
|
1119
1219
|
});
|
|
1120
|
-
|
|
1220
|
+
a(this, "restart", (e) => {
|
|
1121
1221
|
this.coreInstance && this.destroy(), this.gwsConfig = e != null ? e : this.gwsConfig, this.createGwsCore(e);
|
|
1122
1222
|
});
|
|
1123
|
-
|
|
1223
|
+
a(this, "getSocketReadyState", () => {
|
|
1124
1224
|
var e;
|
|
1125
1225
|
return (e = this.coreInstance) == null ? void 0 : e.getSocketReadyState();
|
|
1126
1226
|
});
|
|
1127
|
-
|
|
1128
|
-
var r;
|
|
1129
|
-
|
|
1227
|
+
a(this, "verifyPin", (e, t) => c(this, null, function* () {
|
|
1228
|
+
var i, r;
|
|
1229
|
+
const n = yield this.getSignatureCert(t);
|
|
1230
|
+
return (r = this.coreInstance) == null ? void 0 : r.verifyPin({
|
|
1231
|
+
ContainerName: (i = n == null ? void 0 : n.ContainerName) != null ? i : "",
|
|
1232
|
+
UserPin: e == null ? void 0 : e.UserPin
|
|
1233
|
+
});
|
|
1234
|
+
}));
|
|
1235
|
+
a(this, "getSignatureCert", (e, t = !0) => c(this, null, function* () {
|
|
1236
|
+
var i;
|
|
1237
|
+
return yield (i = this.coreInstance) == null ? void 0 : i.getCert(
|
|
1130
1238
|
{ CertType: ae },
|
|
1131
1239
|
e,
|
|
1132
1240
|
t
|
|
1133
1241
|
);
|
|
1134
1242
|
}));
|
|
1135
|
-
|
|
1243
|
+
a(this, "getSignatureCertList", () => c(this, null, function* () {
|
|
1136
1244
|
var t;
|
|
1137
1245
|
return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
|
|
1138
1246
|
CertType: ae
|
|
1139
1247
|
});
|
|
1140
1248
|
}));
|
|
1141
|
-
|
|
1142
|
-
var
|
|
1143
|
-
return yield (
|
|
1144
|
-
{ CertType:
|
|
1249
|
+
a(this, "getEncryptionCert", (e, t = !0) => c(this, null, function* () {
|
|
1250
|
+
var i;
|
|
1251
|
+
return yield (i = this.coreInstance) == null ? void 0 : i.getCert(
|
|
1252
|
+
{ CertType: oe },
|
|
1145
1253
|
e,
|
|
1146
1254
|
t
|
|
1147
1255
|
);
|
|
1148
1256
|
}));
|
|
1149
|
-
|
|
1257
|
+
a(this, "getEncryptionCertList", () => c(this, null, function* () {
|
|
1150
1258
|
var t;
|
|
1151
1259
|
return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
|
|
1152
|
-
CertType:
|
|
1260
|
+
CertType: oe
|
|
1153
1261
|
});
|
|
1154
1262
|
}));
|
|
1155
|
-
|
|
1263
|
+
a(this, "base64Encode", (e) => {
|
|
1156
1264
|
var t;
|
|
1157
1265
|
return (t = this.coreInstance) == null ? void 0 : t.base64Encode(e.Data);
|
|
1158
1266
|
});
|
|
1159
|
-
|
|
1267
|
+
a(this, "base64Decode", (e) => {
|
|
1160
1268
|
var t;
|
|
1161
1269
|
return (t = this.coreInstance) == null ? void 0 : t.base64Decode(e.DataB64);
|
|
1162
1270
|
});
|
|
1163
|
-
|
|
1271
|
+
a(this, "changeIsRememberPin", (e) => {
|
|
1164
1272
|
var t;
|
|
1165
1273
|
(t = this.coreInstance) == null || t.changeIsRememberPin(e);
|
|
1166
1274
|
});
|
|
1167
|
-
|
|
1275
|
+
a(this, "changePinPolicy", (e) => {
|
|
1168
1276
|
var t;
|
|
1169
1277
|
(t = this.coreInstance) == null || t.changePinPolicy(e);
|
|
1170
1278
|
});
|
|
1171
|
-
|
|
1172
|
-
var
|
|
1173
|
-
const n = yield this.getSignatureCert(t),
|
|
1174
|
-
ContainerName: (
|
|
1279
|
+
a(this, "pkcs1Sign", (e, t) => c(this, null, function* () {
|
|
1280
|
+
var r, o, l;
|
|
1281
|
+
const n = yield this.getSignatureCert(t), i = yield (o = this.coreInstance) == null ? void 0 : o.pkcs1Sign(_(m({}, e != null ? e : {}), {
|
|
1282
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1175
1283
|
}));
|
|
1176
|
-
return (
|
|
1284
|
+
return (l = i == null ? void 0 : i[0]) == null ? void 0 : l.SignData;
|
|
1177
1285
|
}));
|
|
1178
|
-
|
|
1179
|
-
var
|
|
1180
|
-
const t = yield this.appendCertBase64(e), n = yield (
|
|
1286
|
+
a(this, "pkcs1VerifySignature", (e) => c(this, null, function* () {
|
|
1287
|
+
var i;
|
|
1288
|
+
const t = yield this.appendCertBase64(e), n = yield (i = this.coreInstance) == null ? void 0 : i.pkcs1VerifySignature(t);
|
|
1181
1289
|
return Array.isArray(n);
|
|
1182
1290
|
}));
|
|
1183
|
-
|
|
1184
|
-
var
|
|
1185
|
-
const n = yield this.getSignatureCert(t),
|
|
1291
|
+
a(this, "pkcs1Base64Sign", (e, t) => c(this, null, function* () {
|
|
1292
|
+
var o, l, d, u, C;
|
|
1293
|
+
const n = yield this.getSignatureCert(t), i = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (o = e.Data) != null ? o : "" }), r = yield (u = this.coreInstance) == null ? void 0 : u.pkcs1Base64Sign(_(m({}, e != null ? e : {}), {
|
|
1186
1294
|
ContainerName: (d = n == null ? void 0 : n.ContainerName) != null ? d : "",
|
|
1187
|
-
DataB64: r
|
|
1188
|
-
}));
|
|
1189
|
-
return (C = a == null ? void 0 : a[0]) == null ? void 0 : C.SignData;
|
|
1190
|
-
}));
|
|
1191
|
-
o(this, "batchPkcs1Base64Sign", (e, t) => l(this, null, function* () {
|
|
1192
|
-
var C, g, m, h, f, w;
|
|
1193
|
-
const n = "|", r = (g = e.DataB64) != null ? g : (C = e.Data) == null ? void 0 : C.map((y) => this.base64Encode({ Data: y })), a = yield this.getSignatureCert(t);
|
|
1194
|
-
let i = "";
|
|
1195
|
-
i = Array.isArray(r) ? r == null ? void 0 : r.map((y, p) => `${p}:${y}`).join(n) : "";
|
|
1196
|
-
const c = yield (h = this.coreInstance) == null ? void 0 : h.batchPkcs1Base64Sign({
|
|
1197
|
-
ContainerName: (m = a == null ? void 0 : a.ContainerName) != null ? m : "",
|
|
1198
1295
|
DataB64: i
|
|
1199
|
-
})
|
|
1296
|
+
}));
|
|
1297
|
+
return (C = r == null ? void 0 : r[0]) == null ? void 0 : C.SignData;
|
|
1298
|
+
}));
|
|
1299
|
+
a(this, "batchPkcs1Base64Sign", (e, t) => c(this, null, function* () {
|
|
1300
|
+
var C, g, w, h, f, E;
|
|
1301
|
+
const n = "|", i = (g = e.DataB64) != null ? g : (C = e.Data) == null ? void 0 : C.map((y) => this.base64Encode({ Data: y })), r = yield this.getSignatureCert(t);
|
|
1302
|
+
let o = "";
|
|
1303
|
+
o = Array.isArray(i) ? i == null ? void 0 : i.map((y, S) => `${S}:${y}`).join(n) : "";
|
|
1304
|
+
const l = yield (h = this.coreInstance) == null ? void 0 : h.batchPkcs1Base64Sign({
|
|
1305
|
+
ContainerName: (w = r == null ? void 0 : r.ContainerName) != null ? w : "",
|
|
1306
|
+
DataB64: o
|
|
1307
|
+
}), d = (E = (f = l == null ? void 0 : l[0]) == null ? void 0 : f.SignData) == null ? void 0 : E.split(n), u = [];
|
|
1200
1308
|
return d.forEach((y) => {
|
|
1201
|
-
const
|
|
1202
|
-
u[
|
|
1309
|
+
const S = y.split(":"), k = Number(S[0]), p = S[1];
|
|
1310
|
+
u[k] = p;
|
|
1203
1311
|
}), u;
|
|
1204
1312
|
}));
|
|
1205
|
-
|
|
1206
|
-
var
|
|
1207
|
-
const t = (
|
|
1208
|
-
return !!(yield (
|
|
1313
|
+
a(this, "pkcs1Base64VerifySignature", (e) => c(this, null, function* () {
|
|
1314
|
+
var r, o, l;
|
|
1315
|
+
const t = (o = e.DataB64) != null ? o : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield this.appendCertBase64(e);
|
|
1316
|
+
return !!(yield (l = this.coreInstance) == null ? void 0 : l.pkcs1Base64VerifySignature({
|
|
1209
1317
|
CertB64: n.CertB64,
|
|
1210
1318
|
DataB64: t,
|
|
1211
1319
|
SignData: n.SignData
|
|
1212
1320
|
}));
|
|
1213
1321
|
}));
|
|
1214
|
-
|
|
1215
|
-
var
|
|
1322
|
+
a(this, "writeSeal", (e, t) => c(this, null, function* () {
|
|
1323
|
+
var r, o;
|
|
1216
1324
|
const n = yield this.getSignatureCert(t);
|
|
1217
|
-
return !!(yield (
|
|
1218
|
-
ContainerName: (
|
|
1325
|
+
return !!(yield (o = this.coreInstance) == null ? void 0 : o.writeSeal(_(m({}, e != null ? e : {}), {
|
|
1326
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1219
1327
|
})));
|
|
1220
1328
|
}));
|
|
1221
|
-
|
|
1222
|
-
var
|
|
1329
|
+
a(this, "deleteSeal", (e) => c(this, null, function* () {
|
|
1330
|
+
var r, o, l, d, u;
|
|
1223
1331
|
const t = yield this.getSealList(e);
|
|
1224
|
-
if (!((
|
|
1332
|
+
if (!((r = t == null ? void 0 : t.data) != null && r.length))
|
|
1225
1333
|
return Promise.reject({
|
|
1226
|
-
errCode:
|
|
1334
|
+
errCode: q,
|
|
1227
1335
|
msg: "暂无印章"
|
|
1228
1336
|
});
|
|
1229
|
-
const n = yield
|
|
1337
|
+
const n = yield O.open({
|
|
1230
1338
|
title: "删除印章",
|
|
1231
1339
|
data: t == null ? void 0 : t.data,
|
|
1232
|
-
columns:
|
|
1340
|
+
columns: Ee,
|
|
1233
1341
|
okText: "删除"
|
|
1234
1342
|
});
|
|
1235
1343
|
return !!(yield (u = this.coreInstance) == null ? void 0 : u.deleteSeal({
|
|
1236
|
-
ContainerName: (
|
|
1344
|
+
ContainerName: (l = (o = t == null ? void 0 : t.cert) == null ? void 0 : o.ContainerName) != null ? l : "",
|
|
1237
1345
|
SealId: (d = n == null ? void 0 : n.SealId) != null ? d : ""
|
|
1238
1346
|
}));
|
|
1239
1347
|
}));
|
|
1240
|
-
|
|
1241
|
-
var
|
|
1242
|
-
const t = yield this.getSignatureCert(e), n = yield (
|
|
1243
|
-
ContainerName: (
|
|
1348
|
+
a(this, "getSealList", (e) => c(this, null, function* () {
|
|
1349
|
+
var i, r;
|
|
1350
|
+
const t = yield this.getSignatureCert(e), n = yield (r = this.coreInstance) == null ? void 0 : r.getSealList({
|
|
1351
|
+
ContainerName: (i = t == null ? void 0 : t.ContainerName) != null ? i : "",
|
|
1244
1352
|
IsLogin: "Y"
|
|
1245
1353
|
});
|
|
1246
1354
|
return {
|
|
@@ -1248,230 +1356,266 @@ const N = class N {
|
|
|
1248
1356
|
data: n
|
|
1249
1357
|
};
|
|
1250
1358
|
}));
|
|
1251
|
-
|
|
1252
|
-
var
|
|
1359
|
+
a(this, "getSealInfo", (e) => c(this, null, function* () {
|
|
1360
|
+
var r, o, l, d, u, C, g;
|
|
1253
1361
|
const t = yield this.getSealList(e);
|
|
1254
|
-
if (!((
|
|
1362
|
+
if (!((r = t == null ? void 0 : t.data) != null && r.length))
|
|
1255
1363
|
return Promise.reject({
|
|
1256
|
-
errCode:
|
|
1364
|
+
errCode: q,
|
|
1257
1365
|
msg: "暂无印章"
|
|
1258
1366
|
});
|
|
1259
|
-
const n = ((
|
|
1367
|
+
const n = ((o = t == null ? void 0 : t.data) == null ? void 0 : o.length) > 1 ? yield O.open({
|
|
1260
1368
|
title: "选择印章",
|
|
1261
1369
|
data: t == null ? void 0 : t.data,
|
|
1262
|
-
columns:
|
|
1263
|
-
theme: (
|
|
1264
|
-
}) : t == null ? void 0 : t.data[0],
|
|
1370
|
+
columns: Ee,
|
|
1371
|
+
theme: (l = this.gwsConfig) == null ? void 0 : l.theme
|
|
1372
|
+
}) : t == null ? void 0 : t.data[0], i = yield (g = this.coreInstance) == null ? void 0 : g.getSealInfo({
|
|
1265
1373
|
ContainerName: (u = (d = t == null ? void 0 : t.cert) == null ? void 0 : d.ContainerName) != null ? u : "",
|
|
1266
1374
|
SealId: (C = n == null ? void 0 : n.SealId) != null ? C : ""
|
|
1267
1375
|
});
|
|
1268
|
-
return
|
|
1376
|
+
return i == null ? void 0 : i[0];
|
|
1269
1377
|
}));
|
|
1270
|
-
|
|
1271
|
-
var
|
|
1272
|
-
const n = yield this.getSignatureCert(t),
|
|
1273
|
-
ContainerName: (
|
|
1378
|
+
a(this, "getTPSealList", (e, t) => c(this, null, function* () {
|
|
1379
|
+
var r, o;
|
|
1380
|
+
const n = yield this.getSignatureCert(t), i = yield (o = this.coreInstance) == null ? void 0 : o.getTPSealList({
|
|
1381
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : "",
|
|
1274
1382
|
Vid: e == null ? void 0 : e.Vid
|
|
1275
1383
|
});
|
|
1276
1384
|
return {
|
|
1277
1385
|
cert: n,
|
|
1278
|
-
data:
|
|
1386
|
+
data: i
|
|
1279
1387
|
};
|
|
1280
1388
|
}));
|
|
1281
|
-
|
|
1282
|
-
var
|
|
1389
|
+
a(this, "getTPSeal", (e, t) => c(this, null, function* () {
|
|
1390
|
+
var r, o, l;
|
|
1283
1391
|
const n = yield this.getTPSealList(e, t);
|
|
1284
|
-
if (!((
|
|
1392
|
+
if (!((r = n == null ? void 0 : n.data) != null && r.length))
|
|
1285
1393
|
return Promise.reject({
|
|
1286
|
-
errCode:
|
|
1394
|
+
errCode: q,
|
|
1287
1395
|
msg: "暂无印章"
|
|
1288
1396
|
});
|
|
1289
|
-
const
|
|
1397
|
+
const i = ((o = n == null ? void 0 : n.data) == null ? void 0 : o.length) === 1 ? n == null ? void 0 : n.data[0] : yield O.open({
|
|
1290
1398
|
title: "选择印章",
|
|
1291
1399
|
data: n == null ? void 0 : n.data,
|
|
1292
|
-
columns:
|
|
1293
|
-
theme: (
|
|
1400
|
+
columns: vt,
|
|
1401
|
+
theme: (l = this.gwsConfig) == null ? void 0 : l.theme
|
|
1294
1402
|
});
|
|
1295
1403
|
return {
|
|
1296
1404
|
cert: n == null ? void 0 : n.cert,
|
|
1297
|
-
data:
|
|
1405
|
+
data: i
|
|
1298
1406
|
};
|
|
1299
1407
|
}));
|
|
1300
|
-
|
|
1301
|
-
var
|
|
1302
|
-
const n = yield this.getTPSeal(e, t),
|
|
1303
|
-
ContainerName: (
|
|
1304
|
-
}, (
|
|
1408
|
+
a(this, "getTPSealPic", (e, t) => c(this, null, function* () {
|
|
1409
|
+
var r, o, l, d, u;
|
|
1410
|
+
const n = yield this.getTPSeal(e, t), i = yield (u = this.coreInstance) == null ? void 0 : u.getTPSealPic(_(m({
|
|
1411
|
+
ContainerName: (o = (r = n == null ? void 0 : n.cert) == null ? void 0 : r.ContainerName) != null ? o : ""
|
|
1412
|
+
}, (l = n == null ? void 0 : n.data) != null ? l : {}), {
|
|
1305
1413
|
FileSize: String((d = n == null ? void 0 : n.data) == null ? void 0 : d.FileSize)
|
|
1306
1414
|
}));
|
|
1307
|
-
return
|
|
1415
|
+
return i == null ? void 0 : i[0];
|
|
1308
1416
|
}));
|
|
1309
|
-
|
|
1310
|
-
var
|
|
1311
|
-
const t = yield this.appendCertBase64(e), n = yield (
|
|
1312
|
-
return (
|
|
1417
|
+
a(this, "sm2SignPreprocess1", (e) => c(this, null, function* () {
|
|
1418
|
+
var i, r;
|
|
1419
|
+
const t = yield this.appendCertBase64(e), n = yield (i = this.coreInstance) == null ? void 0 : i.sm2SignPreprocess1(t);
|
|
1420
|
+
return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.Z;
|
|
1313
1421
|
}));
|
|
1314
|
-
|
|
1315
|
-
var
|
|
1316
|
-
const t = this.base64Encode({ Data: (
|
|
1422
|
+
a(this, "sm2SignPreprocess2", (e) => c(this, null, function* () {
|
|
1423
|
+
var r, o;
|
|
1424
|
+
const t = this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield this.appendCertBase64(e), i = yield (o = this.coreInstance) == null ? void 0 : o.sm2SignPreprocess2({
|
|
1317
1425
|
CertB64: n.CertB64,
|
|
1318
1426
|
DataB64: t
|
|
1319
1427
|
});
|
|
1320
|
-
return
|
|
1428
|
+
return i == null ? void 0 : i[0].H;
|
|
1321
1429
|
}));
|
|
1322
|
-
|
|
1323
|
-
var
|
|
1324
|
-
const n = yield this.getSignatureCert(t),
|
|
1325
|
-
ContainerName: (
|
|
1430
|
+
a(this, "pkcs1HashSign", (e, t) => c(this, null, function* () {
|
|
1431
|
+
var r, o, l, d;
|
|
1432
|
+
const n = yield this.getSignatureCert(t), i = yield (l = this.coreInstance) == null ? void 0 : l.pkcs1HashSign({
|
|
1433
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : "",
|
|
1326
1434
|
DataB64: e.DataB64,
|
|
1327
|
-
HashAlg: (
|
|
1435
|
+
HashAlg: (o = e.HashAlg) != null ? o : "sm3"
|
|
1328
1436
|
});
|
|
1329
|
-
return (d =
|
|
1437
|
+
return (d = i == null ? void 0 : i[0]) == null ? void 0 : d.SignData;
|
|
1330
1438
|
}));
|
|
1331
|
-
|
|
1332
|
-
var
|
|
1439
|
+
a(this, "pkcs1HashVerifySignature", (e) => c(this, null, function* () {
|
|
1440
|
+
var i, r;
|
|
1333
1441
|
const t = yield this.appendCertBase64(e);
|
|
1334
|
-
return !!(yield (
|
|
1335
|
-
HashAlg: (
|
|
1442
|
+
return !!(yield (r = this.coreInstance) == null ? void 0 : r.pkcs1HashVerifySignature(_(m({}, t), {
|
|
1443
|
+
HashAlg: (i = t.HashAlg) != null ? i : "sm3"
|
|
1336
1444
|
})));
|
|
1337
1445
|
}));
|
|
1338
|
-
|
|
1339
|
-
var
|
|
1340
|
-
const n = (
|
|
1341
|
-
ContainerName: (d =
|
|
1446
|
+
a(this, "pkcs7Sign", (e, t) => c(this, null, function* () {
|
|
1447
|
+
var o, l, d, u, C;
|
|
1448
|
+
const n = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (o = e.Data) != null ? o : "" }), i = yield this.getSignatureCert(t), r = yield (u = this.coreInstance) == null ? void 0 : u.pkcs7Sign(_(m({}, e != null ? e : {}), {
|
|
1449
|
+
ContainerName: (d = i == null ? void 0 : i.ContainerName) != null ? d : "",
|
|
1342
1450
|
DataB64: n
|
|
1343
1451
|
}));
|
|
1344
|
-
return (C =
|
|
1452
|
+
return (C = r == null ? void 0 : r[0]) == null ? void 0 : C.SignData;
|
|
1345
1453
|
}));
|
|
1346
|
-
|
|
1347
|
-
var
|
|
1348
|
-
const t = (
|
|
1349
|
-
return !!(yield (
|
|
1454
|
+
a(this, "pkcs7VerifySignature", (e) => c(this, null, function* () {
|
|
1455
|
+
var i, r, o;
|
|
1456
|
+
const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (i = e.Data) != null ? i : "" });
|
|
1457
|
+
return !!(yield (o = this.coreInstance) == null ? void 0 : o.pkcs7VerifySignature({
|
|
1350
1458
|
DataB64: t,
|
|
1351
1459
|
SignData: e.SignData
|
|
1352
1460
|
}));
|
|
1353
1461
|
}));
|
|
1354
|
-
|
|
1355
|
-
var n,
|
|
1462
|
+
a(this, "sm3Hash", (e) => c(this, null, function* () {
|
|
1463
|
+
var n, i;
|
|
1356
1464
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3Hash(e);
|
|
1357
|
-
return (
|
|
1465
|
+
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
|
|
1358
1466
|
}));
|
|
1359
|
-
|
|
1360
|
-
var n,
|
|
1467
|
+
a(this, "sm3HexHash", (e) => c(this, null, function* () {
|
|
1468
|
+
var n, i;
|
|
1361
1469
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3HexHash(e);
|
|
1362
|
-
return (
|
|
1470
|
+
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
|
|
1363
1471
|
}));
|
|
1364
|
-
|
|
1365
|
-
var n,
|
|
1472
|
+
a(this, "sm3FileHash", (e) => c(this, null, function* () {
|
|
1473
|
+
var n, i;
|
|
1366
1474
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3FileHash(e);
|
|
1367
|
-
return (
|
|
1475
|
+
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
|
|
1368
1476
|
}));
|
|
1369
|
-
|
|
1370
|
-
var
|
|
1371
|
-
const t = (
|
|
1477
|
+
a(this, "sm3HashEncryption", (e) => c(this, null, function* () {
|
|
1478
|
+
var r, o, l, d, u, C;
|
|
1479
|
+
const t = (o = e.DataB64) != null ? o : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = (d = e.KeyB64) != null ? d : this.base64Encode({ Data: (l = e.Key) != null ? l : "" }), i = yield (u = this.coreInstance) == null ? void 0 : u.sm3HashEncryption({
|
|
1372
1480
|
dataB64: t,
|
|
1373
1481
|
keyB64: n,
|
|
1374
1482
|
alg: "sm3"
|
|
1375
1483
|
});
|
|
1376
|
-
return (C =
|
|
1484
|
+
return (C = i == null ? void 0 : i[0]) == null ? void 0 : C.DataB64;
|
|
1377
1485
|
}));
|
|
1378
|
-
|
|
1379
|
-
var
|
|
1486
|
+
a(this, "pkcs7Encryption", (e) => c(this, null, function* () {
|
|
1487
|
+
var i, r, o, l;
|
|
1380
1488
|
if (!e.CertB64List) {
|
|
1381
1489
|
const d = yield this.getEncryptionCert();
|
|
1382
1490
|
e.CertB64List = d == null ? void 0 : d.CertB64;
|
|
1383
1491
|
}
|
|
1384
|
-
const t = (
|
|
1492
|
+
const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (i = e.Data) != null ? i : "" }), n = yield (o = this.coreInstance) == null ? void 0 : o.pkcs7Encryption({
|
|
1385
1493
|
DataB64: t,
|
|
1386
1494
|
CertB64List: e.CertB64List
|
|
1387
1495
|
});
|
|
1388
|
-
return (
|
|
1496
|
+
return (l = n == null ? void 0 : n[0]) == null ? void 0 : l.DataB64;
|
|
1389
1497
|
}));
|
|
1390
|
-
|
|
1391
|
-
var
|
|
1392
|
-
const t = yield this.getEncryptionCert(), n = yield (
|
|
1498
|
+
a(this, "pkcs7Decryption", (e) => c(this, null, function* () {
|
|
1499
|
+
var r, o;
|
|
1500
|
+
const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7Decryption(_(m({}, e != null ? e : {}), {
|
|
1393
1501
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1394
|
-
})),
|
|
1395
|
-
return e.shouldDecodeBase64 ? this.base64Decode({ DataB64:
|
|
1502
|
+
})), i = (o = n == null ? void 0 : n[0]) == null ? void 0 : o.DataB64;
|
|
1503
|
+
return e.shouldDecodeBase64 ? this.base64Decode({ DataB64: i }) : i;
|
|
1396
1504
|
}));
|
|
1397
|
-
|
|
1398
|
-
var
|
|
1399
|
-
const t = yield this.appendCertBase64(e, !1), n = yield (
|
|
1400
|
-
return (
|
|
1505
|
+
a(this, "pkcs7FileEncryption", (e) => c(this, null, function* () {
|
|
1506
|
+
var i, r;
|
|
1507
|
+
const t = yield this.appendCertBase64(e, !1), n = yield (i = this.coreInstance) == null ? void 0 : i.pkcs7FileEncryption(t);
|
|
1508
|
+
return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.DataB64;
|
|
1401
1509
|
}));
|
|
1402
|
-
|
|
1403
|
-
var
|
|
1404
|
-
const t = yield this.getEncryptionCert(), n = yield (
|
|
1510
|
+
a(this, "pkcs7FileDecryption", (e) => c(this, null, function* () {
|
|
1511
|
+
var i, r, o;
|
|
1512
|
+
const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7FileDecryption({
|
|
1405
1513
|
SrcFile: e.SrcFile,
|
|
1406
|
-
DstFile: (
|
|
1514
|
+
DstFile: (i = e.DstFile) != null ? i : e.SrcFile.slice(0, -4),
|
|
1407
1515
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1408
1516
|
});
|
|
1409
|
-
return (
|
|
1517
|
+
return (o = n == null ? void 0 : n[0]) == null ? void 0 : o.DataB64;
|
|
1410
1518
|
}));
|
|
1411
|
-
|
|
1412
|
-
var
|
|
1413
|
-
const t = yield this.appendCertBase64(e, !1), n = yield (
|
|
1414
|
-
return (
|
|
1519
|
+
a(this, "asymmetricEncryption", (e) => c(this, null, function* () {
|
|
1520
|
+
var i, r;
|
|
1521
|
+
const t = yield this.appendCertBase64(e, !1), n = yield (i = this.coreInstance) == null ? void 0 : i.asymmetricEncryption(t);
|
|
1522
|
+
return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.Data;
|
|
1415
1523
|
}));
|
|
1416
|
-
|
|
1417
|
-
var
|
|
1418
|
-
const n = yield this.getEncryptionCert(t),
|
|
1524
|
+
a(this, "asymmetricDecryption", (e, t) => c(this, null, function* () {
|
|
1525
|
+
var r, o;
|
|
1526
|
+
const n = yield this.getEncryptionCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.asymmetricDecryption(_(m({}, e != null ? e : {}), {
|
|
1419
1527
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1420
1528
|
}));
|
|
1421
|
-
return (
|
|
1529
|
+
return (o = i == null ? void 0 : i[0]) == null ? void 0 : o.Data;
|
|
1422
1530
|
}));
|
|
1423
|
-
|
|
1531
|
+
a(this, "sm4Encryption", (e) => c(this, null, function* () {
|
|
1424
1532
|
var n;
|
|
1425
1533
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm4Encryption(e);
|
|
1426
1534
|
return t == null ? void 0 : t[0];
|
|
1427
1535
|
}));
|
|
1428
|
-
|
|
1429
|
-
var n,
|
|
1536
|
+
a(this, "sm4Decryption", (e) => c(this, null, function* () {
|
|
1537
|
+
var n, i;
|
|
1430
1538
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm4Decryption(e);
|
|
1431
|
-
return (
|
|
1539
|
+
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.Data;
|
|
1432
1540
|
}));
|
|
1433
|
-
|
|
1434
|
-
var n,
|
|
1541
|
+
a(this, "getCertInfo", (e) => c(this, null, function* () {
|
|
1542
|
+
var n, i;
|
|
1435
1543
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfo(e);
|
|
1436
|
-
return
|
|
1544
|
+
return m({}, (i = t == null ? void 0 : t[0]) != null ? i : {});
|
|
1437
1545
|
}));
|
|
1438
|
-
|
|
1439
|
-
var n,
|
|
1440
|
-
const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(
|
|
1441
|
-
return (
|
|
1546
|
+
a(this, "getCertInfoByOid", (e) => c(this, null, function* () {
|
|
1547
|
+
var n, i;
|
|
1548
|
+
const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(m({}, e != null ? e : {}));
|
|
1549
|
+
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.OidValue;
|
|
1442
1550
|
}));
|
|
1443
|
-
|
|
1444
|
-
var
|
|
1445
|
-
const t = yield this.getSignatureCert(e), n = yield (
|
|
1551
|
+
a(this, "getSealVendor", (e) => c(this, null, function* () {
|
|
1552
|
+
var i;
|
|
1553
|
+
const t = yield this.getSignatureCert(e), n = yield (i = this.coreInstance) == null ? void 0 : i.getSealVendor({
|
|
1446
1554
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1447
1555
|
});
|
|
1448
1556
|
return n == null ? void 0 : n[0];
|
|
1449
1557
|
}));
|
|
1450
|
-
|
|
1451
|
-
var
|
|
1452
|
-
const n = yield this.getSignatureCert(t),
|
|
1558
|
+
a(this, "deleteAllSealByVendor", (e, t) => c(this, null, function* () {
|
|
1559
|
+
var r;
|
|
1560
|
+
const n = yield this.getSignatureCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.deleteAllSealByVendor(_(m({}, e != null ? e : {}), {
|
|
1561
|
+
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1562
|
+
}));
|
|
1563
|
+
return i == null ? void 0 : i[0];
|
|
1564
|
+
}));
|
|
1565
|
+
a(this, "getUKeyList", (e) => c(this, null, function* () {
|
|
1566
|
+
var i;
|
|
1567
|
+
if (e) return e;
|
|
1568
|
+
const t = yield (i = this.coreInstance) == null ? void 0 : i.getUKeyList();
|
|
1569
|
+
return yield O.open({
|
|
1570
|
+
title: "选择介质",
|
|
1571
|
+
data: t,
|
|
1572
|
+
columns: kt
|
|
1573
|
+
});
|
|
1574
|
+
}));
|
|
1575
|
+
a(this, "getUKeyInfo", (e) => c(this, null, function* () {
|
|
1576
|
+
var i;
|
|
1577
|
+
const t = yield this.getUKeyList(e), n = yield (i = this.coreInstance) == null ? void 0 : i.getUKeyInfo({
|
|
1578
|
+
manu: t == null ? void 0 : t.manu,
|
|
1579
|
+
sn: t == null ? void 0 : t.sn
|
|
1580
|
+
});
|
|
1581
|
+
return n == null ? void 0 : n[0];
|
|
1582
|
+
}));
|
|
1583
|
+
a(this, "applyCert", (e, t) => c(this, null, function* () {
|
|
1584
|
+
var o;
|
|
1585
|
+
const n = yield this.getUKeyList(t), i = yield this.getUKeyInfo(n);
|
|
1586
|
+
return yield (o = this.coreInstance) == null ? void 0 : o.applyCert(_(m({}, e != null ? e : {}), {
|
|
1587
|
+
manu: i == null ? void 0 : i.manu,
|
|
1588
|
+
sn: i == null ? void 0 : i.sn,
|
|
1589
|
+
ContainerName: i == null ? void 0 : i.keyid
|
|
1590
|
+
}));
|
|
1591
|
+
}));
|
|
1592
|
+
a(this, "resetPin", (e, t) => c(this, null, function* () {
|
|
1593
|
+
var r;
|
|
1594
|
+
const n = yield this.getSignatureCert(t);
|
|
1595
|
+
return yield (r = this.coreInstance) == null ? void 0 : r.resetPin(_(m({}, e != null ? e : {}), {
|
|
1596
|
+
manu: n == null ? void 0 : n.manu,
|
|
1597
|
+
sn: n == null ? void 0 : n.sn,
|
|
1453
1598
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1454
1599
|
}));
|
|
1455
|
-
return r == null ? void 0 : r[0];
|
|
1456
1600
|
}));
|
|
1457
|
-
return
|
|
1601
|
+
return $.instance && !(e != null && e.isCreateNew) ? $.instance : (this.createGwsCore(e), $.instance = this, this);
|
|
1458
1602
|
}
|
|
1459
1603
|
};
|
|
1460
|
-
|
|
1461
|
-
let H =
|
|
1462
|
-
function
|
|
1604
|
+
a($, "instance", null);
|
|
1605
|
+
let H = $;
|
|
1606
|
+
function _t(s) {
|
|
1463
1607
|
return new Promise((e, t) => {
|
|
1464
1608
|
if (H.instance && !(s != null && s.isCreateNew))
|
|
1465
1609
|
e(H.instance);
|
|
1466
1610
|
else {
|
|
1467
|
-
const n = new H(
|
|
1468
|
-
onOpen(
|
|
1469
|
-
var
|
|
1470
|
-
e(n), (
|
|
1611
|
+
const n = new H(_(m({}, s != null ? s : {}), {
|
|
1612
|
+
onOpen(i) {
|
|
1613
|
+
var r;
|
|
1614
|
+
e(n), (r = s == null ? void 0 : s.onOpen) == null || r.call(s, i);
|
|
1471
1615
|
},
|
|
1472
|
-
onClose(
|
|
1473
|
-
var
|
|
1474
|
-
t(
|
|
1616
|
+
onClose(i) {
|
|
1617
|
+
var r;
|
|
1618
|
+
t(i), (r = s == null ? void 0 : s.onClose) == null || r.call(s, i);
|
|
1475
1619
|
}
|
|
1476
1620
|
}));
|
|
1477
1621
|
}
|
|
@@ -1479,5 +1623,5 @@ function kt(s) {
|
|
|
1479
1623
|
}
|
|
1480
1624
|
export {
|
|
1481
1625
|
H as GwsService,
|
|
1482
|
-
|
|
1626
|
+
_t as createService
|
|
1483
1627
|
};
|