gws-client 1.3.0 → 1.3.2

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