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