@seayoo-web/app-info 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,313 +1,318 @@
1
- import { loadAsync as J } from "jszip";
2
- function Q(p) {
3
- return typeof p == "string" ? p : `${p}`;
1
+ import rt from "jszip";
2
+ function Q(f) {
3
+ return typeof f == "string" ? f : `${f}`;
4
4
  }
5
- function ot(p) {
6
- return typeof p == "number" ? p : typeof p == "string" ? /^\d+(?:\.\d+)/.test(p) ? +p : Number(p) : NaN;
5
+ function ct(f) {
6
+ return typeof f == "number" ? f : typeof f == "string" ? /^\d+(?:\.\d+)/.test(f) ? +f : Number(f) : NaN;
7
7
  }
8
- function R(p) {
9
- return p instanceof Error ? p : new Error(String(p));
8
+ function P(f) {
9
+ return f instanceof Error ? f : new Error(String(f));
10
10
  }
11
- function rt(p) {
12
- return `data:image/png;base64,${p}`;
11
+ function it(f) {
12
+ return `data:image/png;base64,${f}`;
13
13
  }
14
- class Mt {
14
+ async function nt(f, i, n) {
15
+ const s = f.file(i) || f.filter((w) => w.includes(i))[0];
16
+ if (!s)
17
+ return new Error(`not found ${i}`);
18
+ const c = await s.async(n).catch(P);
19
+ return c instanceof Error ? new Error(`read ${i} error: ${c.message}`) : { name: s.name, content: c };
20
+ }
21
+ const st = rt.loadAsync;
22
+ class Gt {
15
23
  zip;
16
24
  constructor(i) {
17
- this.zip = J(i).catch(R);
25
+ this.zip = st(i).catch(P);
18
26
  }
19
27
  async parse(i) {
20
28
  const n = await this.zip;
21
29
  if (n instanceof Error)
22
30
  return new Error(`load file error: ${n.message}`);
23
- const a = await ht(n);
24
- if (a instanceof Error)
25
- return new Error(`read pack.info error: ${a.message}`);
31
+ const s = await ft(n);
32
+ if (s instanceof Error)
33
+ return new Error(`read pack.info error: ${s.message}`);
26
34
  const c = {
27
- package: a.summary.app.bundleName,
28
- versionCode: a.summary.app.version.code,
29
- versionName: a.summary.app.version.name,
30
- pack: a
35
+ package: s.summary.app.bundleName,
36
+ versionCode: s.summary.app.version.code,
37
+ versionName: s.summary.app.version.name,
38
+ pack: s
31
39
  };
32
40
  if (i?.ignoreIcon)
33
41
  return c;
34
- const w = a.packages.find((m) => m.moduleType === "entry");
42
+ const w = s.packages.find((v) => v.moduleType === "entry");
35
43
  if (!w)
36
44
  return c;
37
- const y = n.file(`${w.name}.hap`);
38
- if (!y)
45
+ const d = n.file(`${w.name}.hap`);
46
+ if (!d)
39
47
  return c;
40
- const b = await y.async("arraybuffer").catch(R);
41
- if (b instanceof Error)
48
+ const E = await d.async("arraybuffer").catch(P);
49
+ if (E instanceof Error)
42
50
  return c;
43
- const v = await J(b).catch(R);
44
- if (v instanceof Error)
51
+ const T = await st(E).catch(P);
52
+ if (T instanceof Error)
45
53
  return c;
46
- const N = await ut(v);
47
- if (N instanceof Error)
54
+ const U = await gt(T);
55
+ if (U instanceof Error)
48
56
  return c;
49
- const T = await lt(v, N.app.icon);
50
- return T instanceof Error || (c.icon = rt(T)), c;
57
+ const I = await pt(T, U.app.icon);
58
+ return I instanceof Error || (c.icon = it(I)), c;
51
59
  }
52
60
  /**
53
61
  * 读取指定文件的内容
54
62
  */
55
- async readFile(i) {
56
- const n = await this.zip;
57
- if (n instanceof Error)
58
- return n;
59
- const a = typeof i == "string" ? n.file(i) : n.file(i)[0];
60
- return a ? await a.async("arraybuffer").catch(R) : new Error(`not found ${i}`);
63
+ async readFile(i, n) {
64
+ const s = await this.zip;
65
+ return s instanceof Error ? new Error(`load file error: ${s.message}`) : await nt(s, i, n);
61
66
  }
62
67
  }
63
- async function ht(p) {
64
- const i = p.file("pack.info");
68
+ async function ft(f) {
69
+ const i = f.file("pack.info");
65
70
  if (!i)
66
71
  return new Error("not found pack.info file");
67
- const n = await i.async("text").catch(R);
72
+ const n = await i.async("text").catch(P);
68
73
  if (n instanceof Error)
69
74
  return new Error(`read pack.info file error: ${n.message}`);
70
75
  if (!n)
71
76
  return new Error("pack.info file is empty");
72
77
  try {
73
78
  return JSON.parse(n);
74
- } catch (a) {
75
- const c = R(a);
79
+ } catch (s) {
80
+ const c = P(s);
76
81
  return new Error(`parse pack.info file error: ${c.message}`);
77
82
  }
78
83
  }
79
- async function ut(p) {
80
- const i = p.file("module.json") || p.file("module.json5");
84
+ async function gt(f) {
85
+ const i = f.file("module.json") || f.file("module.json5");
81
86
  if (!i)
82
87
  return new Error("not found module.json file");
83
- const n = await i.async("text").catch(R);
88
+ const n = await i.async("text").catch(P);
84
89
  if (n instanceof Error)
85
90
  return new Error(`read module.json file error: ${n.message}`);
86
91
  if (!n)
87
92
  return new Error("module.json file is empty");
88
93
  try {
89
94
  return JSON.parse(n);
90
- } catch (a) {
91
- const c = R(a);
95
+ } catch (s) {
96
+ const c = P(s);
92
97
  return new Error(`parse module.json file error: ${c.message}`);
93
98
  }
94
99
  }
95
- async function lt(p, i) {
96
- const a = `resources/base/media/${(i || "app_icon").replace(/(?:^\$media:|\.[a-z]+$)/gi, "")}.png`, c = p.file(a);
100
+ async function pt(f, i) {
101
+ const s = `resources/base/media/${(i || "app_icon").replace(/(?:^\$media:|\.[a-z]+$)/gi, "")}.png`, c = f.file(s);
97
102
  if (!c)
98
- return new Error(`not found icon file at ${a}`);
99
- const w = await c.async("base64").catch(R);
103
+ return new Error(`not found icon file at ${s}`);
104
+ const w = await c.async("base64").catch(P);
100
105
  return w instanceof Error ? new Error(`read icon file error: ${w.message}`) : w;
101
106
  }
102
- function ct(p) {
103
- return p && p.__esModule && Object.prototype.hasOwnProperty.call(p, "default") ? p.default : p;
107
+ function dt(f) {
108
+ return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
104
109
  }
105
- function at(p) {
106
- throw new Error('Could not dynamically require "' + p + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
110
+ function ut(f) {
111
+ throw new Error('Could not dynamically require "' + f + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
107
112
  }
108
- var W = { exports: {} }, K = { exports: {} }, ft = K.exports, it;
109
- function gt() {
110
- return it || (it = 1, function(p) {
113
+ var K = { exports: {} }, J = { exports: {} }, yt = J.exports, at;
114
+ function wt() {
115
+ return at || (at = 1, function(f) {
111
116
  /**
112
117
  * @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
113
118
  * Released under the Apache License, Version 2.0
114
119
  * see: https://github.com/dcodeIO/long.js for details
115
120
  */
116
121
  (function(i, n) {
117
- typeof at == "function" && p && p.exports ? p.exports = n() : (i.dcodeIO = i.dcodeIO || {}).Long = n();
118
- })(ft, function() {
119
- function i(f, h, E) {
120
- this.low = f | 0, this.high = h | 0, this.unsigned = !!E;
122
+ typeof ut == "function" && f && f.exports ? f.exports = n() : (i.dcodeIO = i.dcodeIO || {}).Long = n();
123
+ })(yt, function() {
124
+ function i(g, h, b) {
125
+ this.low = g | 0, this.high = h | 0, this.unsigned = !!b;
121
126
  }
122
127
  i.prototype.__isLong__, Object.defineProperty(i.prototype, "__isLong__", {
123
128
  value: !0,
124
129
  enumerable: !1,
125
130
  configurable: !1
126
131
  });
127
- function n(f) {
128
- return (f && f.__isLong__) === !0;
132
+ function n(g) {
133
+ return (g && g.__isLong__) === !0;
129
134
  }
130
135
  i.isLong = n;
131
- var a = {}, c = {};
132
- function w(f, h) {
133
- var E, I, x;
134
- return h ? (f >>>= 0, (x = 0 <= f && f < 256) && (I = c[f], I) ? I : (E = b(f, (f | 0) < 0 ? -1 : 0, !0), x && (c[f] = E), E)) : (f |= 0, (x = -128 <= f && f < 128) && (I = a[f], I) ? I : (E = b(f, f < 0 ? -1 : 0, !1), x && (a[f] = E), E));
136
+ var s = {}, c = {};
137
+ function w(g, h) {
138
+ var b, m, x;
139
+ return h ? (g >>>= 0, (x = 0 <= g && g < 256) && (m = c[g], m) ? m : (b = E(g, (g | 0) < 0 ? -1 : 0, !0), x && (c[g] = b), b)) : (g |= 0, (x = -128 <= g && g < 128) && (m = s[g], m) ? m : (b = E(g, g < 0 ? -1 : 0, !1), x && (s[g] = b), b));
135
140
  }
136
141
  i.fromInt = w;
137
- function y(f, h) {
138
- if (isNaN(f) || !isFinite(f))
142
+ function d(g, h) {
143
+ if (isNaN(g) || !isFinite(g))
139
144
  return h ? l : u;
140
145
  if (h) {
141
- if (f < 0)
146
+ if (g < 0)
142
147
  return l;
143
- if (f >= r)
144
- return L;
145
- } else {
146
- if (f <= -s)
148
+ if (g >= r)
147
149
  return _;
148
- if (f + 1 >= s)
149
- return A;
150
+ } else {
151
+ if (g <= -a)
152
+ return L;
153
+ if (g + 1 >= a)
154
+ return N;
150
155
  }
151
- return f < 0 ? y(-f, h).neg() : b(f % e | 0, f / e | 0, h);
156
+ return g < 0 ? d(-g, h).neg() : E(g % e | 0, g / e | 0, h);
152
157
  }
153
- i.fromNumber = y;
154
- function b(f, h, E) {
155
- return new i(f, h, E);
158
+ i.fromNumber = d;
159
+ function E(g, h, b) {
160
+ return new i(g, h, b);
156
161
  }
157
- i.fromBits = b;
158
- var v = Math.pow;
159
- function N(f, h, E) {
160
- if (f.length === 0)
162
+ i.fromBits = E;
163
+ var T = Math.pow;
164
+ function U(g, h, b) {
165
+ if (g.length === 0)
161
166
  throw Error("empty string");
162
- if (f === "NaN" || f === "Infinity" || f === "+Infinity" || f === "-Infinity")
167
+ if (g === "NaN" || g === "Infinity" || g === "+Infinity" || g === "-Infinity")
163
168
  return u;
164
- if (typeof h == "number" ? (E = h, h = !1) : h = !!h, E = E || 10, E < 2 || 36 < E)
169
+ if (typeof h == "number" ? (b = h, h = !1) : h = !!h, b = b || 10, b < 2 || 36 < b)
165
170
  throw RangeError("radix");
166
- var I;
167
- if ((I = f.indexOf("-")) > 0)
171
+ var m;
172
+ if ((m = g.indexOf("-")) > 0)
168
173
  throw Error("interior hyphen");
169
- if (I === 0)
170
- return N(f.substring(1), h, E).neg();
171
- for (var x = y(v(E, 8)), U = u, k = 0; k < f.length; k += 8) {
172
- var B = Math.min(8, f.length - k), C = parseInt(f.substring(k, k + B), E);
173
- if (B < 8) {
174
- var D = y(v(E, B));
175
- U = U.mul(D).add(y(C));
174
+ if (m === 0)
175
+ return U(g.substring(1), h, b).neg();
176
+ for (var x = d(T(b, 8)), A = u, k = 0; k < g.length; k += 8) {
177
+ var O = Math.min(8, g.length - k), C = parseInt(g.substring(k, k + O), b);
178
+ if (O < 8) {
179
+ var D = d(T(b, O));
180
+ A = A.mul(D).add(d(C));
176
181
  } else
177
- U = U.mul(x), U = U.add(y(C));
182
+ A = A.mul(x), A = A.add(d(C));
178
183
  }
179
- return U.unsigned = h, U;
184
+ return A.unsigned = h, A;
180
185
  }
181
- i.fromString = N;
182
- function T(f) {
183
- return f instanceof i ? f : typeof f == "number" ? y(f) : typeof f == "string" ? N(f) : b(f.low, f.high, f.unsigned);
186
+ i.fromString = U;
187
+ function I(g) {
188
+ return g instanceof i ? g : typeof g == "number" ? d(g) : typeof g == "string" ? U(g) : E(g.low, g.high, g.unsigned);
184
189
  }
185
- i.fromValue = T;
186
- var m = 65536, t = 1 << 24, e = m * m, r = e * e, s = r / 2, o = w(t), u = w(0);
190
+ i.fromValue = I;
191
+ var v = 65536, t = 1 << 24, e = v * v, r = e * e, a = r / 2, o = w(t), u = w(0);
187
192
  i.ZERO = u;
188
193
  var l = w(0, !0);
189
194
  i.UZERO = l;
190
- var g = w(1);
191
- i.ONE = g;
195
+ var p = w(1);
196
+ i.ONE = p;
192
197
  var F = w(1, !0);
193
198
  i.UONE = F;
194
199
  var S = w(-1);
195
200
  i.NEG_ONE = S;
196
- var A = b(-1, 2147483647, !1);
197
- i.MAX_VALUE = A;
198
- var L = b(-1, -1, !0);
199
- i.MAX_UNSIGNED_VALUE = L;
200
- var _ = b(0, -2147483648, !1);
201
- i.MIN_VALUE = _;
202
- var d = i.prototype;
203
- return d.toInt = function() {
201
+ var N = E(-1, 2147483647, !1);
202
+ i.MAX_VALUE = N;
203
+ var _ = E(-1, -1, !0);
204
+ i.MAX_UNSIGNED_VALUE = _;
205
+ var L = E(0, -2147483648, !1);
206
+ i.MIN_VALUE = L;
207
+ var y = i.prototype;
208
+ return y.toInt = function() {
204
209
  return this.unsigned ? this.low >>> 0 : this.low;
205
- }, d.toNumber = function() {
210
+ }, y.toNumber = function() {
206
211
  return this.unsigned ? (this.high >>> 0) * e + (this.low >>> 0) : this.high * e + (this.low >>> 0);
207
- }, d.toString = function(h) {
212
+ }, y.toString = function(h) {
208
213
  if (h = h || 10, h < 2 || 36 < h)
209
214
  throw RangeError("radix");
210
215
  if (this.isZero())
211
216
  return "0";
212
217
  if (this.isNegative())
213
- if (this.eq(_)) {
214
- var E = y(h), I = this.div(E), x = I.mul(E).sub(this);
215
- return I.toString(h) + x.toInt().toString(h);
218
+ if (this.eq(L)) {
219
+ var b = d(h), m = this.div(b), x = m.mul(b).sub(this);
220
+ return m.toString(h) + x.toInt().toString(h);
216
221
  } else
217
222
  return "-" + this.neg().toString(h);
218
- for (var U = y(v(h, 6), this.unsigned), k = this, B = ""; ; ) {
219
- var C = k.div(U), D = k.sub(C.mul(U)).toInt() >>> 0, M = D.toString(h);
223
+ for (var A = d(T(h, 6), this.unsigned), k = this, O = ""; ; ) {
224
+ var C = k.div(A), D = k.sub(C.mul(A)).toInt() >>> 0, M = D.toString(h);
220
225
  if (k = C, k.isZero())
221
- return M + B;
226
+ return M + O;
222
227
  for (; M.length < 6; )
223
228
  M = "0" + M;
224
- B = "" + M + B;
229
+ O = "" + M + O;
225
230
  }
226
- }, d.getHighBits = function() {
231
+ }, y.getHighBits = function() {
227
232
  return this.high;
228
- }, d.getHighBitsUnsigned = function() {
233
+ }, y.getHighBitsUnsigned = function() {
229
234
  return this.high >>> 0;
230
- }, d.getLowBits = function() {
235
+ }, y.getLowBits = function() {
231
236
  return this.low;
232
- }, d.getLowBitsUnsigned = function() {
237
+ }, y.getLowBitsUnsigned = function() {
233
238
  return this.low >>> 0;
234
- }, d.getNumBitsAbs = function() {
239
+ }, y.getNumBitsAbs = function() {
235
240
  if (this.isNegative())
236
- return this.eq(_) ? 64 : this.neg().getNumBitsAbs();
237
- for (var h = this.high != 0 ? this.high : this.low, E = 31; E > 0 && (h & 1 << E) == 0; E--)
241
+ return this.eq(L) ? 64 : this.neg().getNumBitsAbs();
242
+ for (var h = this.high != 0 ? this.high : this.low, b = 31; b > 0 && (h & 1 << b) == 0; b--)
238
243
  ;
239
- return this.high != 0 ? E + 33 : E + 1;
240
- }, d.isZero = function() {
244
+ return this.high != 0 ? b + 33 : b + 1;
245
+ }, y.isZero = function() {
241
246
  return this.high === 0 && this.low === 0;
242
- }, d.isNegative = function() {
247
+ }, y.isNegative = function() {
243
248
  return !this.unsigned && this.high < 0;
244
- }, d.isPositive = function() {
249
+ }, y.isPositive = function() {
245
250
  return this.unsigned || this.high >= 0;
246
- }, d.isOdd = function() {
251
+ }, y.isOdd = function() {
247
252
  return (this.low & 1) === 1;
248
- }, d.isEven = function() {
253
+ }, y.isEven = function() {
249
254
  return (this.low & 1) === 0;
250
- }, d.equals = function(h) {
251
- return n(h) || (h = T(h)), this.unsigned !== h.unsigned && this.high >>> 31 === 1 && h.high >>> 31 === 1 ? !1 : this.high === h.high && this.low === h.low;
252
- }, d.eq = d.equals, d.notEquals = function(h) {
255
+ }, y.equals = function(h) {
256
+ return n(h) || (h = I(h)), this.unsigned !== h.unsigned && this.high >>> 31 === 1 && h.high >>> 31 === 1 ? !1 : this.high === h.high && this.low === h.low;
257
+ }, y.eq = y.equals, y.notEquals = function(h) {
253
258
  return !this.eq(
254
259
  /* validates */
255
260
  h
256
261
  );
257
- }, d.neq = d.notEquals, d.lessThan = function(h) {
262
+ }, y.neq = y.notEquals, y.lessThan = function(h) {
258
263
  return this.comp(
259
264
  /* validates */
260
265
  h
261
266
  ) < 0;
262
- }, d.lt = d.lessThan, d.lessThanOrEqual = function(h) {
267
+ }, y.lt = y.lessThan, y.lessThanOrEqual = function(h) {
263
268
  return this.comp(
264
269
  /* validates */
265
270
  h
266
271
  ) <= 0;
267
- }, d.lte = d.lessThanOrEqual, d.greaterThan = function(h) {
272
+ }, y.lte = y.lessThanOrEqual, y.greaterThan = function(h) {
268
273
  return this.comp(
269
274
  /* validates */
270
275
  h
271
276
  ) > 0;
272
- }, d.gt = d.greaterThan, d.greaterThanOrEqual = function(h) {
277
+ }, y.gt = y.greaterThan, y.greaterThanOrEqual = function(h) {
273
278
  return this.comp(
274
279
  /* validates */
275
280
  h
276
281
  ) >= 0;
277
- }, d.gte = d.greaterThanOrEqual, d.compare = function(h) {
278
- if (n(h) || (h = T(h)), this.eq(h))
282
+ }, y.gte = y.greaterThanOrEqual, y.compare = function(h) {
283
+ if (n(h) || (h = I(h)), this.eq(h))
279
284
  return 0;
280
- var E = this.isNegative(), I = h.isNegative();
281
- return E && !I ? -1 : !E && I ? 1 : this.unsigned ? h.high >>> 0 > this.high >>> 0 || h.high === this.high && h.low >>> 0 > this.low >>> 0 ? -1 : 1 : this.sub(h).isNegative() ? -1 : 1;
282
- }, d.comp = d.compare, d.negate = function() {
283
- return !this.unsigned && this.eq(_) ? _ : this.not().add(g);
284
- }, d.neg = d.negate, d.add = function(h) {
285
- n(h) || (h = T(h));
286
- var E = this.high >>> 16, I = this.high & 65535, x = this.low >>> 16, U = this.low & 65535, k = h.high >>> 16, B = h.high & 65535, C = h.low >>> 16, D = h.low & 65535, M = 0, P = 0, z = 0, Y = 0;
287
- return Y += U + D, z += Y >>> 16, Y &= 65535, z += x + C, P += z >>> 16, z &= 65535, P += I + B, M += P >>> 16, P &= 65535, M += E + k, M &= 65535, b(z << 16 | Y, M << 16 | P, this.unsigned);
288
- }, d.subtract = function(h) {
289
- return n(h) || (h = T(h)), this.add(h.neg());
290
- }, d.sub = d.subtract, d.multiply = function(h) {
291
- if (this.isZero() || (n(h) || (h = T(h)), h.isZero()))
285
+ var b = this.isNegative(), m = h.isNegative();
286
+ return b && !m ? -1 : !b && m ? 1 : this.unsigned ? h.high >>> 0 > this.high >>> 0 || h.high === this.high && h.low >>> 0 > this.low >>> 0 ? -1 : 1 : this.sub(h).isNegative() ? -1 : 1;
287
+ }, y.comp = y.compare, y.negate = function() {
288
+ return !this.unsigned && this.eq(L) ? L : this.not().add(p);
289
+ }, y.neg = y.negate, y.add = function(h) {
290
+ n(h) || (h = I(h));
291
+ var b = this.high >>> 16, m = this.high & 65535, x = this.low >>> 16, A = this.low & 65535, k = h.high >>> 16, O = h.high & 65535, C = h.low >>> 16, D = h.low & 65535, M = 0, B = 0, z = 0, Y = 0;
292
+ return Y += A + D, z += Y >>> 16, Y &= 65535, z += x + C, B += z >>> 16, z &= 65535, B += m + O, M += B >>> 16, B &= 65535, M += b + k, M &= 65535, E(z << 16 | Y, M << 16 | B, this.unsigned);
293
+ }, y.subtract = function(h) {
294
+ return n(h) || (h = I(h)), this.add(h.neg());
295
+ }, y.sub = y.subtract, y.multiply = function(h) {
296
+ if (this.isZero() || (n(h) || (h = I(h)), h.isZero()))
292
297
  return u;
293
- if (this.eq(_))
294
- return h.isOdd() ? _ : u;
295
- if (h.eq(_))
296
- return this.isOdd() ? _ : u;
298
+ if (this.eq(L))
299
+ return h.isOdd() ? L : u;
300
+ if (h.eq(L))
301
+ return this.isOdd() ? L : u;
297
302
  if (this.isNegative())
298
303
  return h.isNegative() ? this.neg().mul(h.neg()) : this.neg().mul(h).neg();
299
304
  if (h.isNegative())
300
305
  return this.mul(h.neg()).neg();
301
306
  if (this.lt(o) && h.lt(o))
302
- return y(this.toNumber() * h.toNumber(), this.unsigned);
303
- var E = this.high >>> 16, I = this.high & 65535, x = this.low >>> 16, U = this.low & 65535, k = h.high >>> 16, B = h.high & 65535, C = h.low >>> 16, D = h.low & 65535, M = 0, P = 0, z = 0, Y = 0;
304
- return Y += U * D, z += Y >>> 16, Y &= 65535, z += x * D, P += z >>> 16, z &= 65535, z += U * C, P += z >>> 16, z &= 65535, P += I * D, M += P >>> 16, P &= 65535, P += x * C, M += P >>> 16, P &= 65535, P += U * B, M += P >>> 16, P &= 65535, M += E * D + I * C + x * B + U * k, M &= 65535, b(z << 16 | Y, M << 16 | P, this.unsigned);
305
- }, d.mul = d.multiply, d.divide = function(h) {
306
- if (n(h) || (h = T(h)), h.isZero())
307
+ return d(this.toNumber() * h.toNumber(), this.unsigned);
308
+ var b = this.high >>> 16, m = this.high & 65535, x = this.low >>> 16, A = this.low & 65535, k = h.high >>> 16, O = h.high & 65535, C = h.low >>> 16, D = h.low & 65535, M = 0, B = 0, z = 0, Y = 0;
309
+ return Y += A * D, z += Y >>> 16, Y &= 65535, z += x * D, B += z >>> 16, z &= 65535, z += A * C, B += z >>> 16, z &= 65535, B += m * D, M += B >>> 16, B &= 65535, B += x * C, M += B >>> 16, B &= 65535, B += A * O, M += B >>> 16, B &= 65535, M += b * D + m * C + x * O + A * k, M &= 65535, E(z << 16 | Y, M << 16 | B, this.unsigned);
310
+ }, y.mul = y.multiply, y.divide = function(h) {
311
+ if (n(h) || (h = I(h)), h.isZero())
307
312
  throw Error("division by zero");
308
313
  if (this.isZero())
309
314
  return this.unsigned ? l : u;
310
- var E, I, x;
315
+ var b, m, x;
311
316
  if (this.unsigned) {
312
317
  if (h.unsigned || (h = h.toUnsigned()), h.gt(this))
313
318
  return l;
@@ -315,14 +320,14 @@ function gt() {
315
320
  return F;
316
321
  x = l;
317
322
  } else {
318
- if (this.eq(_)) {
319
- if (h.eq(g) || h.eq(S))
320
- return _;
321
- if (h.eq(_))
322
- return g;
323
- var U = this.shr(1);
324
- return E = U.div(h).shl(1), E.eq(u) ? h.isNegative() ? g : S : (I = this.sub(h.mul(E)), x = E.add(I.div(h)), x);
325
- } else if (h.eq(_))
323
+ if (this.eq(L)) {
324
+ if (h.eq(p) || h.eq(S))
325
+ return L;
326
+ if (h.eq(L))
327
+ return p;
328
+ var A = this.shr(1);
329
+ return b = A.div(h).shl(1), b.eq(u) ? h.isNegative() ? p : S : (m = this.sub(h.mul(b)), x = b.add(m.div(h)), x);
330
+ } else if (h.eq(L))
326
331
  return this.unsigned ? l : u;
327
332
  if (this.isNegative())
328
333
  return h.isNegative() ? this.neg().div(h.neg()) : this.neg().div(h).neg();
@@ -330,60 +335,60 @@ function gt() {
330
335
  return this.div(h.neg()).neg();
331
336
  x = u;
332
337
  }
333
- for (I = this; I.gte(h); ) {
334
- E = Math.max(1, Math.floor(I.toNumber() / h.toNumber()));
335
- for (var k = Math.ceil(Math.log(E) / Math.LN2), B = k <= 48 ? 1 : v(2, k - 48), C = y(E), D = C.mul(h); D.isNegative() || D.gt(I); )
336
- E -= B, C = y(E, this.unsigned), D = C.mul(h);
337
- C.isZero() && (C = g), x = x.add(C), I = I.sub(D);
338
+ for (m = this; m.gte(h); ) {
339
+ b = Math.max(1, Math.floor(m.toNumber() / h.toNumber()));
340
+ for (var k = Math.ceil(Math.log(b) / Math.LN2), O = k <= 48 ? 1 : T(2, k - 48), C = d(b), D = C.mul(h); D.isNegative() || D.gt(m); )
341
+ b -= O, C = d(b, this.unsigned), D = C.mul(h);
342
+ C.isZero() && (C = p), x = x.add(C), m = m.sub(D);
338
343
  }
339
344
  return x;
340
- }, d.div = d.divide, d.modulo = function(h) {
341
- return n(h) || (h = T(h)), this.sub(this.div(h).mul(h));
342
- }, d.mod = d.modulo, d.not = function() {
343
- return b(~this.low, ~this.high, this.unsigned);
344
- }, d.and = function(h) {
345
- return n(h) || (h = T(h)), b(this.low & h.low, this.high & h.high, this.unsigned);
346
- }, d.or = function(h) {
347
- return n(h) || (h = T(h)), b(this.low | h.low, this.high | h.high, this.unsigned);
348
- }, d.xor = function(h) {
349
- return n(h) || (h = T(h)), b(this.low ^ h.low, this.high ^ h.high, this.unsigned);
350
- }, d.shiftLeft = function(h) {
351
- return n(h) && (h = h.toInt()), (h &= 63) === 0 ? this : h < 32 ? b(this.low << h, this.high << h | this.low >>> 32 - h, this.unsigned) : b(0, this.low << h - 32, this.unsigned);
352
- }, d.shl = d.shiftLeft, d.shiftRight = function(h) {
353
- return n(h) && (h = h.toInt()), (h &= 63) === 0 ? this : h < 32 ? b(this.low >>> h | this.high << 32 - h, this.high >> h, this.unsigned) : b(this.high >> h - 32, this.high >= 0 ? 0 : -1, this.unsigned);
354
- }, d.shr = d.shiftRight, d.shiftRightUnsigned = function(h) {
345
+ }, y.div = y.divide, y.modulo = function(h) {
346
+ return n(h) || (h = I(h)), this.sub(this.div(h).mul(h));
347
+ }, y.mod = y.modulo, y.not = function() {
348
+ return E(~this.low, ~this.high, this.unsigned);
349
+ }, y.and = function(h) {
350
+ return n(h) || (h = I(h)), E(this.low & h.low, this.high & h.high, this.unsigned);
351
+ }, y.or = function(h) {
352
+ return n(h) || (h = I(h)), E(this.low | h.low, this.high | h.high, this.unsigned);
353
+ }, y.xor = function(h) {
354
+ return n(h) || (h = I(h)), E(this.low ^ h.low, this.high ^ h.high, this.unsigned);
355
+ }, y.shiftLeft = function(h) {
356
+ return n(h) && (h = h.toInt()), (h &= 63) === 0 ? this : h < 32 ? E(this.low << h, this.high << h | this.low >>> 32 - h, this.unsigned) : E(0, this.low << h - 32, this.unsigned);
357
+ }, y.shl = y.shiftLeft, y.shiftRight = function(h) {
358
+ return n(h) && (h = h.toInt()), (h &= 63) === 0 ? this : h < 32 ? E(this.low >>> h | this.high << 32 - h, this.high >> h, this.unsigned) : E(this.high >> h - 32, this.high >= 0 ? 0 : -1, this.unsigned);
359
+ }, y.shr = y.shiftRight, y.shiftRightUnsigned = function(h) {
355
360
  if (n(h) && (h = h.toInt()), h &= 63, h === 0)
356
361
  return this;
357
- var E = this.high;
362
+ var b = this.high;
358
363
  if (h < 32) {
359
- var I = this.low;
360
- return b(I >>> h | E << 32 - h, E >>> h, this.unsigned);
361
- } else return h === 32 ? b(E, 0, this.unsigned) : b(E >>> h - 32, 0, this.unsigned);
362
- }, d.shru = d.shiftRightUnsigned, d.toSigned = function() {
363
- return this.unsigned ? b(this.low, this.high, !1) : this;
364
- }, d.toUnsigned = function() {
365
- return this.unsigned ? this : b(this.low, this.high, !0);
366
- }, d.toBytes = function(f) {
367
- return f ? this.toBytesLE() : this.toBytesBE();
368
- }, d.toBytesLE = function() {
369
- var f = this.high, h = this.low;
364
+ var m = this.low;
365
+ return E(m >>> h | b << 32 - h, b >>> h, this.unsigned);
366
+ } else return h === 32 ? E(b, 0, this.unsigned) : E(b >>> h - 32, 0, this.unsigned);
367
+ }, y.shru = y.shiftRightUnsigned, y.toSigned = function() {
368
+ return this.unsigned ? E(this.low, this.high, !1) : this;
369
+ }, y.toUnsigned = function() {
370
+ return this.unsigned ? this : E(this.low, this.high, !0);
371
+ }, y.toBytes = function(g) {
372
+ return g ? this.toBytesLE() : this.toBytesBE();
373
+ }, y.toBytesLE = function() {
374
+ var g = this.high, h = this.low;
370
375
  return [
371
376
  h & 255,
372
377
  h >>> 8 & 255,
373
378
  h >>> 16 & 255,
374
379
  h >>> 24 & 255,
375
- f & 255,
376
- f >>> 8 & 255,
377
- f >>> 16 & 255,
378
- f >>> 24 & 255
380
+ g & 255,
381
+ g >>> 8 & 255,
382
+ g >>> 16 & 255,
383
+ g >>> 24 & 255
379
384
  ];
380
- }, d.toBytesBE = function() {
381
- var f = this.high, h = this.low;
385
+ }, y.toBytesBE = function() {
386
+ var g = this.high, h = this.low;
382
387
  return [
383
- f >>> 24 & 255,
384
- f >>> 16 & 255,
385
- f >>> 8 & 255,
386
- f & 255,
388
+ g >>> 24 & 255,
389
+ g >>> 16 & 255,
390
+ g >>> 8 & 255,
391
+ g & 255,
387
392
  h >>> 24 & 255,
388
393
  h >>> 16 & 255,
389
394
  h >>> 8 & 255,
@@ -391,11 +396,11 @@ function gt() {
391
396
  ];
392
397
  }, i;
393
398
  });
394
- }(K)), K.exports;
399
+ }(J)), J.exports;
395
400
  }
396
- var pt = W.exports, nt;
397
- function dt() {
398
- return nt || (nt = 1, function(p) {
401
+ var bt = K.exports, ot;
402
+ function Et() {
403
+ return ot || (ot = 1, function(f) {
399
404
  /**
400
405
  * @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
401
406
  * Backing buffer: ArrayBuffer, Accessor: Uint8Array
@@ -403,15 +408,15 @@ function dt() {
403
408
  * see: https://github.com/dcodeIO/bytebuffer.js for details
404
409
  */
405
410
  (function(i, n) {
406
- typeof at == "function" && p && p.exports ? p.exports = function() {
407
- var a;
411
+ typeof ut == "function" && f && f.exports ? f.exports = function() {
412
+ var s;
408
413
  try {
409
- a = gt();
414
+ s = wt();
410
415
  } catch {
411
416
  }
412
- return n(a);
417
+ return n(s);
413
418
  }() : (i.dcodeIO = i.dcodeIO || {}).ByteBuffer = n(i.dcodeIO.Long);
414
- })(pt, function(i) {
419
+ })(bt, function(i) {
415
420
  var n = function(t, e, r) {
416
421
  if (typeof t > "u" && (t = n.DEFAULT_CAPACITY), typeof e > "u" && (e = n.DEFAULT_ENDIAN), typeof r > "u" && (r = n.DEFAULT_NOASSERT), !r) {
417
422
  if (t = t | 0, t < 0)
@@ -421,20 +426,20 @@ function dt() {
421
426
  this.buffer = t === 0 ? c : new ArrayBuffer(t), this.view = t === 0 ? null : new Uint8Array(this.buffer), this.offset = 0, this.markedOffset = -1, this.limit = t, this.littleEndian = e, this.noAssert = r;
422
427
  };
423
428
  n.VERSION = "5.0.1", n.LITTLE_ENDIAN = !0, n.BIG_ENDIAN = !1, n.DEFAULT_CAPACITY = 16, n.DEFAULT_ENDIAN = n.BIG_ENDIAN, n.DEFAULT_NOASSERT = !1, n.Long = i || null;
424
- var a = n.prototype;
425
- a.__isByteBuffer__, Object.defineProperty(a, "__isByteBuffer__", {
429
+ var s = n.prototype;
430
+ s.__isByteBuffer__, Object.defineProperty(s, "__isByteBuffer__", {
426
431
  value: !0,
427
432
  enumerable: !1,
428
433
  configurable: !1
429
434
  });
430
435
  var c = new ArrayBuffer(0), w = String.fromCharCode;
431
- function y(t) {
436
+ function d(t) {
432
437
  var e = 0;
433
438
  return function() {
434
439
  return e < t.length ? t.charCodeAt(e++) : null;
435
440
  };
436
441
  }
437
- function b() {
442
+ function E() {
438
443
  var t = [], e = [];
439
444
  return function() {
440
445
  if (arguments.length === 0)
@@ -446,22 +451,22 @@ function dt() {
446
451
  return Uint8Array;
447
452
  }, n.allocate = function(t, e, r) {
448
453
  return new n(t, e, r);
449
- }, n.concat = function(t, e, r, s) {
450
- (typeof e == "boolean" || typeof e != "string") && (s = r, r = e, e = void 0);
451
- for (var o = 0, u = 0, l = t.length, g; u < l; ++u)
452
- n.isByteBuffer(t[u]) || (t[u] = n.wrap(t[u], e)), g = t[u].limit - t[u].offset, g > 0 && (o += g);
454
+ }, n.concat = function(t, e, r, a) {
455
+ (typeof e == "boolean" || typeof e != "string") && (a = r, r = e, e = void 0);
456
+ for (var o = 0, u = 0, l = t.length, p; u < l; ++u)
457
+ n.isByteBuffer(t[u]) || (t[u] = n.wrap(t[u], e)), p = t[u].limit - t[u].offset, p > 0 && (o += p);
453
458
  if (o === 0)
454
- return new n(0, r, s);
455
- var F = new n(o, r, s), S;
459
+ return new n(0, r, a);
460
+ var F = new n(o, r, a), S;
456
461
  for (u = 0; u < l; )
457
- S = t[u++], g = S.limit - S.offset, !(g <= 0) && (F.view.set(S.view.subarray(S.offset, S.limit), F.offset), F.offset += g);
462
+ S = t[u++], p = S.limit - S.offset, !(p <= 0) && (F.view.set(S.view.subarray(S.offset, S.limit), F.offset), F.offset += p);
458
463
  return F.limit = F.offset, F.offset = 0, F;
459
464
  }, n.isByteBuffer = function(t) {
460
465
  return (t && t.__isByteBuffer__) === !0;
461
466
  }, n.type = function() {
462
467
  return ArrayBuffer;
463
- }, n.wrap = function(t, e, r, s) {
464
- if (typeof e != "string" && (s = r, r = e, e = void 0), typeof t == "string")
468
+ }, n.wrap = function(t, e, r, a) {
469
+ if (typeof e != "string" && (a = r, r = e, e = void 0), typeof t == "string")
465
470
  switch (typeof e > "u" && (e = "utf8"), e) {
466
471
  case "base64":
467
472
  return n.fromBase64(t, r);
@@ -480,19 +485,19 @@ function dt() {
480
485
  throw TypeError("Illegal buffer");
481
486
  var o;
482
487
  if (n.isByteBuffer(t))
483
- return o = a.clone.call(t), o.markedOffset = -1, o;
488
+ return o = s.clone.call(t), o.markedOffset = -1, o;
484
489
  if (t instanceof Uint8Array)
485
- o = new n(0, r, s), t.length > 0 && (o.buffer = t.buffer, o.offset = t.byteOffset, o.limit = t.byteOffset + t.byteLength, o.view = new Uint8Array(t.buffer));
490
+ o = new n(0, r, a), t.length > 0 && (o.buffer = t.buffer, o.offset = t.byteOffset, o.limit = t.byteOffset + t.byteLength, o.view = new Uint8Array(t.buffer));
486
491
  else if (t instanceof ArrayBuffer)
487
- o = new n(0, r, s), t.byteLength > 0 && (o.buffer = t, o.offset = 0, o.limit = t.byteLength, o.view = t.byteLength > 0 ? new Uint8Array(t) : null);
492
+ o = new n(0, r, a), t.byteLength > 0 && (o.buffer = t, o.offset = 0, o.limit = t.byteLength, o.view = t.byteLength > 0 ? new Uint8Array(t) : null);
488
493
  else if (Object.prototype.toString.call(t) === "[object Array]") {
489
- o = new n(t.length, r, s), o.limit = t.length;
494
+ o = new n(t.length, r, a), o.limit = t.length;
490
495
  for (var u = 0; u < t.length; ++u)
491
496
  o.view[u] = t[u];
492
497
  } else
493
498
  throw TypeError("Illegal buffer");
494
499
  return o;
495
- }, a.writeBitSet = function(t, e) {
500
+ }, s.writeBitSet = function(t, e) {
496
501
  var r = typeof e > "u";
497
502
  if (r && (e = this.offset), !this.noAssert) {
498
503
  if (!(t instanceof Array))
@@ -502,27 +507,27 @@ function dt() {
502
507
  if (e >>>= 0, e < 0 || e + 0 > this.buffer.byteLength)
503
508
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
504
509
  }
505
- var s = e, o = t.length, u = o >> 3, l = 0, g;
510
+ var a = e, o = t.length, u = o >> 3, l = 0, p;
506
511
  for (e += this.writeVarint32(o, e); u--; )
507
- g = !!t[l++] & 1 | (!!t[l++] & 1) << 1 | (!!t[l++] & 1) << 2 | (!!t[l++] & 1) << 3 | (!!t[l++] & 1) << 4 | (!!t[l++] & 1) << 5 | (!!t[l++] & 1) << 6 | (!!t[l++] & 1) << 7, this.writeByte(g, e++);
512
+ p = !!t[l++] & 1 | (!!t[l++] & 1) << 1 | (!!t[l++] & 1) << 2 | (!!t[l++] & 1) << 3 | (!!t[l++] & 1) << 4 | (!!t[l++] & 1) << 5 | (!!t[l++] & 1) << 6 | (!!t[l++] & 1) << 7, this.writeByte(p, e++);
508
513
  if (l < o) {
509
514
  var F = 0;
510
- for (g = 0; l < o; ) g = g | (!!t[l++] & 1) << F++;
511
- this.writeByte(g, e++);
515
+ for (p = 0; l < o; ) p = p | (!!t[l++] & 1) << F++;
516
+ this.writeByte(p, e++);
512
517
  }
513
- return r ? (this.offset = e, this) : e - s;
514
- }, a.readBitSet = function(t) {
518
+ return r ? (this.offset = e, this) : e - a;
519
+ }, s.readBitSet = function(t) {
515
520
  var e = typeof t > "u";
516
521
  e && (t = this.offset);
517
- var r = this.readVarint32(t), s = r.value, o = s >> 3, u = 0, l = [], g;
522
+ var r = this.readVarint32(t), a = r.value, o = a >> 3, u = 0, l = [], p;
518
523
  for (t += r.length; o--; )
519
- g = this.readByte(t++), l[u++] = !!(g & 1), l[u++] = !!(g & 2), l[u++] = !!(g & 4), l[u++] = !!(g & 8), l[u++] = !!(g & 16), l[u++] = !!(g & 32), l[u++] = !!(g & 64), l[u++] = !!(g & 128);
520
- if (u < s) {
524
+ p = this.readByte(t++), l[u++] = !!(p & 1), l[u++] = !!(p & 2), l[u++] = !!(p & 4), l[u++] = !!(p & 8), l[u++] = !!(p & 16), l[u++] = !!(p & 32), l[u++] = !!(p & 64), l[u++] = !!(p & 128);
525
+ if (u < a) {
521
526
  var F = 0;
522
- for (g = this.readByte(t++); u < s; ) l[u++] = !!(g >> F++ & 1);
527
+ for (p = this.readByte(t++); u < a; ) l[u++] = !!(p >> F++ & 1);
523
528
  }
524
529
  return e && (this.offset = t), l;
525
- }, a.readBytes = function(t, e) {
530
+ }, s.readBytes = function(t, e) {
526
531
  var r = typeof e > "u";
527
532
  if (r && (e = this.offset), !this.noAssert) {
528
533
  if (typeof e != "number" || e % 1 !== 0)
@@ -530,9 +535,9 @@ function dt() {
530
535
  if (e >>>= 0, e < 0 || e + t > this.buffer.byteLength)
531
536
  throw RangeError("Illegal offset: 0 <= " + e + " (+" + t + ") <= " + this.buffer.byteLength);
532
537
  }
533
- var s = this.slice(e, e + t);
534
- return r && (this.offset += t), s;
535
- }, a.writeBytes = a.append, a.writeInt8 = function(t, e) {
538
+ var a = this.slice(e, e + t);
539
+ return r && (this.offset += t), a;
540
+ }, s.writeBytes = s.append, s.writeInt8 = function(t, e) {
536
541
  var r = typeof e > "u";
537
542
  if (r && (e = this.offset), !this.noAssert) {
538
543
  if (typeof t != "number" || t % 1 !== 0)
@@ -543,9 +548,9 @@ function dt() {
543
548
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
544
549
  }
545
550
  e += 1;
546
- var s = this.buffer.byteLength;
547
- return e > s && this.resize((s *= 2) > e ? s : e), e -= 1, this.view[e] = t, r && (this.offset += 1), this;
548
- }, a.writeByte = a.writeInt8, a.readInt8 = function(t) {
551
+ var a = this.buffer.byteLength;
552
+ return e > a && this.resize((a *= 2) > e ? a : e), e -= 1, this.view[e] = t, r && (this.offset += 1), this;
553
+ }, s.writeByte = s.writeInt8, s.readInt8 = function(t) {
549
554
  var e = typeof t > "u";
550
555
  if (e && (t = this.offset), !this.noAssert) {
551
556
  if (typeof t != "number" || t % 1 !== 0)
@@ -555,7 +560,7 @@ function dt() {
555
560
  }
556
561
  var r = this.view[t];
557
562
  return (r & 128) === 128 && (r = -(255 - r + 1)), e && (this.offset += 1), r;
558
- }, a.readByte = a.readInt8, a.writeUint8 = function(t, e) {
563
+ }, s.readByte = s.readInt8, s.writeUint8 = function(t, e) {
559
564
  var r = typeof e > "u";
560
565
  if (r && (e = this.offset), !this.noAssert) {
561
566
  if (typeof t != "number" || t % 1 !== 0)
@@ -566,9 +571,9 @@ function dt() {
566
571
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
567
572
  }
568
573
  e += 1;
569
- var s = this.buffer.byteLength;
570
- return e > s && this.resize((s *= 2) > e ? s : e), e -= 1, this.view[e] = t, r && (this.offset += 1), this;
571
- }, a.writeUInt8 = a.writeUint8, a.readUint8 = function(t) {
574
+ var a = this.buffer.byteLength;
575
+ return e > a && this.resize((a *= 2) > e ? a : e), e -= 1, this.view[e] = t, r && (this.offset += 1), this;
576
+ }, s.writeUInt8 = s.writeUint8, s.readUint8 = function(t) {
572
577
  var e = typeof t > "u";
573
578
  if (e && (t = this.offset), !this.noAssert) {
574
579
  if (typeof t != "number" || t % 1 !== 0)
@@ -578,7 +583,7 @@ function dt() {
578
583
  }
579
584
  var r = this.view[t];
580
585
  return e && (this.offset += 1), r;
581
- }, a.readUInt8 = a.readUint8, a.writeInt16 = function(t, e) {
586
+ }, s.readUInt8 = s.readUint8, s.writeInt16 = function(t, e) {
582
587
  var r = typeof e > "u";
583
588
  if (r && (e = this.offset), !this.noAssert) {
584
589
  if (typeof t != "number" || t % 1 !== 0)
@@ -589,9 +594,9 @@ function dt() {
589
594
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
590
595
  }
591
596
  e += 2;
592
- var s = this.buffer.byteLength;
593
- return e > s && this.resize((s *= 2) > e ? s : e), e -= 2, this.littleEndian ? (this.view[e + 1] = (t & 65280) >>> 8, this.view[e] = t & 255) : (this.view[e] = (t & 65280) >>> 8, this.view[e + 1] = t & 255), r && (this.offset += 2), this;
594
- }, a.writeShort = a.writeInt16, a.readInt16 = function(t) {
597
+ var a = this.buffer.byteLength;
598
+ return e > a && this.resize((a *= 2) > e ? a : e), e -= 2, this.littleEndian ? (this.view[e + 1] = (t & 65280) >>> 8, this.view[e] = t & 255) : (this.view[e] = (t & 65280) >>> 8, this.view[e + 1] = t & 255), r && (this.offset += 2), this;
599
+ }, s.writeShort = s.writeInt16, s.readInt16 = function(t) {
595
600
  var e = typeof t > "u";
596
601
  if (e && (t = this.offset), !this.noAssert) {
597
602
  if (typeof t != "number" || t % 1 !== 0)
@@ -601,7 +606,7 @@ function dt() {
601
606
  }
602
607
  var r = 0;
603
608
  return this.littleEndian ? (r = this.view[t], r |= this.view[t + 1] << 8) : (r = this.view[t] << 8, r |= this.view[t + 1]), (r & 32768) === 32768 && (r = -(65535 - r + 1)), e && (this.offset += 2), r;
604
- }, a.readShort = a.readInt16, a.writeUint16 = function(t, e) {
609
+ }, s.readShort = s.readInt16, s.writeUint16 = function(t, e) {
605
610
  var r = typeof e > "u";
606
611
  if (r && (e = this.offset), !this.noAssert) {
607
612
  if (typeof t != "number" || t % 1 !== 0)
@@ -612,9 +617,9 @@ function dt() {
612
617
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
613
618
  }
614
619
  e += 2;
615
- var s = this.buffer.byteLength;
616
- return e > s && this.resize((s *= 2) > e ? s : e), e -= 2, this.littleEndian ? (this.view[e + 1] = (t & 65280) >>> 8, this.view[e] = t & 255) : (this.view[e] = (t & 65280) >>> 8, this.view[e + 1] = t & 255), r && (this.offset += 2), this;
617
- }, a.writeUInt16 = a.writeUint16, a.readUint16 = function(t) {
620
+ var a = this.buffer.byteLength;
621
+ return e > a && this.resize((a *= 2) > e ? a : e), e -= 2, this.littleEndian ? (this.view[e + 1] = (t & 65280) >>> 8, this.view[e] = t & 255) : (this.view[e] = (t & 65280) >>> 8, this.view[e + 1] = t & 255), r && (this.offset += 2), this;
622
+ }, s.writeUInt16 = s.writeUint16, s.readUint16 = function(t) {
618
623
  var e = typeof t > "u";
619
624
  if (e && (t = this.offset), !this.noAssert) {
620
625
  if (typeof t != "number" || t % 1 !== 0)
@@ -624,7 +629,7 @@ function dt() {
624
629
  }
625
630
  var r = 0;
626
631
  return this.littleEndian ? (r = this.view[t], r |= this.view[t + 1] << 8) : (r = this.view[t] << 8, r |= this.view[t + 1]), e && (this.offset += 2), r;
627
- }, a.readUInt16 = a.readUint16, a.writeInt32 = function(t, e) {
632
+ }, s.readUInt16 = s.readUint16, s.writeInt32 = function(t, e) {
628
633
  var r = typeof e > "u";
629
634
  if (r && (e = this.offset), !this.noAssert) {
630
635
  if (typeof t != "number" || t % 1 !== 0)
@@ -635,9 +640,9 @@ function dt() {
635
640
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
636
641
  }
637
642
  e += 4;
638
- var s = this.buffer.byteLength;
639
- return e > s && this.resize((s *= 2) > e ? s : e), e -= 4, this.littleEndian ? (this.view[e + 3] = t >>> 24 & 255, this.view[e + 2] = t >>> 16 & 255, this.view[e + 1] = t >>> 8 & 255, this.view[e] = t & 255) : (this.view[e] = t >>> 24 & 255, this.view[e + 1] = t >>> 16 & 255, this.view[e + 2] = t >>> 8 & 255, this.view[e + 3] = t & 255), r && (this.offset += 4), this;
640
- }, a.writeInt = a.writeInt32, a.readInt32 = function(t) {
643
+ var a = this.buffer.byteLength;
644
+ return e > a && this.resize((a *= 2) > e ? a : e), e -= 4, this.littleEndian ? (this.view[e + 3] = t >>> 24 & 255, this.view[e + 2] = t >>> 16 & 255, this.view[e + 1] = t >>> 8 & 255, this.view[e] = t & 255) : (this.view[e] = t >>> 24 & 255, this.view[e + 1] = t >>> 16 & 255, this.view[e + 2] = t >>> 8 & 255, this.view[e + 3] = t & 255), r && (this.offset += 4), this;
645
+ }, s.writeInt = s.writeInt32, s.readInt32 = function(t) {
641
646
  var e = typeof t > "u";
642
647
  if (e && (t = this.offset), !this.noAssert) {
643
648
  if (typeof t != "number" || t % 1 !== 0)
@@ -647,7 +652,7 @@ function dt() {
647
652
  }
648
653
  var r = 0;
649
654
  return this.littleEndian ? (r = this.view[t + 2] << 16, r |= this.view[t + 1] << 8, r |= this.view[t], r += this.view[t + 3] << 24 >>> 0) : (r = this.view[t + 1] << 16, r |= this.view[t + 2] << 8, r |= this.view[t + 3], r += this.view[t] << 24 >>> 0), r |= 0, e && (this.offset += 4), r;
650
- }, a.readInt = a.readInt32, a.writeUint32 = function(t, e) {
655
+ }, s.readInt = s.readInt32, s.writeUint32 = function(t, e) {
651
656
  var r = typeof e > "u";
652
657
  if (r && (e = this.offset), !this.noAssert) {
653
658
  if (typeof t != "number" || t % 1 !== 0)
@@ -658,9 +663,9 @@ function dt() {
658
663
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
659
664
  }
660
665
  e += 4;
661
- var s = this.buffer.byteLength;
662
- return e > s && this.resize((s *= 2) > e ? s : e), e -= 4, this.littleEndian ? (this.view[e + 3] = t >>> 24 & 255, this.view[e + 2] = t >>> 16 & 255, this.view[e + 1] = t >>> 8 & 255, this.view[e] = t & 255) : (this.view[e] = t >>> 24 & 255, this.view[e + 1] = t >>> 16 & 255, this.view[e + 2] = t >>> 8 & 255, this.view[e + 3] = t & 255), r && (this.offset += 4), this;
663
- }, a.writeUInt32 = a.writeUint32, a.readUint32 = function(t) {
666
+ var a = this.buffer.byteLength;
667
+ return e > a && this.resize((a *= 2) > e ? a : e), e -= 4, this.littleEndian ? (this.view[e + 3] = t >>> 24 & 255, this.view[e + 2] = t >>> 16 & 255, this.view[e + 1] = t >>> 8 & 255, this.view[e] = t & 255) : (this.view[e] = t >>> 24 & 255, this.view[e + 1] = t >>> 16 & 255, this.view[e + 2] = t >>> 8 & 255, this.view[e + 3] = t & 255), r && (this.offset += 4), this;
668
+ }, s.writeUInt32 = s.writeUint32, s.readUint32 = function(t) {
664
669
  var e = typeof t > "u";
665
670
  if (e && (t = this.offset), !this.noAssert) {
666
671
  if (typeof t != "number" || t % 1 !== 0)
@@ -670,7 +675,7 @@ function dt() {
670
675
  }
671
676
  var r = 0;
672
677
  return this.littleEndian ? (r = this.view[t + 2] << 16, r |= this.view[t + 1] << 8, r |= this.view[t], r += this.view[t + 3] << 24 >>> 0) : (r = this.view[t + 1] << 16, r |= this.view[t + 2] << 8, r |= this.view[t + 3], r += this.view[t] << 24 >>> 0), e && (this.offset += 4), r;
673
- }, a.readUInt32 = a.readUint32, i && (a.writeInt64 = function(t, e) {
678
+ }, s.readUInt32 = s.readUint32, i && (s.writeInt64 = function(t, e) {
674
679
  var r = typeof e > "u";
675
680
  if (r && (e = this.offset), !this.noAssert) {
676
681
  if (typeof t == "number")
@@ -685,11 +690,11 @@ function dt() {
685
690
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
686
691
  }
687
692
  typeof t == "number" ? t = i.fromNumber(t) : typeof t == "string" && (t = i.fromString(t)), e += 8;
688
- var s = this.buffer.byteLength;
689
- e > s && this.resize((s *= 2) > e ? s : e), e -= 8;
693
+ var a = this.buffer.byteLength;
694
+ e > a && this.resize((a *= 2) > e ? a : e), e -= 8;
690
695
  var o = t.low, u = t.high;
691
696
  return this.littleEndian ? (this.view[e + 3] = o >>> 24 & 255, this.view[e + 2] = o >>> 16 & 255, this.view[e + 1] = o >>> 8 & 255, this.view[e] = o & 255, e += 4, this.view[e + 3] = u >>> 24 & 255, this.view[e + 2] = u >>> 16 & 255, this.view[e + 1] = u >>> 8 & 255, this.view[e] = u & 255) : (this.view[e] = u >>> 24 & 255, this.view[e + 1] = u >>> 16 & 255, this.view[e + 2] = u >>> 8 & 255, this.view[e + 3] = u & 255, e += 4, this.view[e] = o >>> 24 & 255, this.view[e + 1] = o >>> 16 & 255, this.view[e + 2] = o >>> 8 & 255, this.view[e + 3] = o & 255), r && (this.offset += 8), this;
692
- }, a.writeLong = a.writeInt64, a.readInt64 = function(t) {
697
+ }, s.writeLong = s.writeInt64, s.readInt64 = function(t) {
693
698
  var e = typeof t > "u";
694
699
  if (e && (t = this.offset), !this.noAssert) {
695
700
  if (typeof t != "number" || t % 1 !== 0)
@@ -697,11 +702,11 @@ function dt() {
697
702
  if (t >>>= 0, t < 0 || t + 8 > this.buffer.byteLength)
698
703
  throw RangeError("Illegal offset: 0 <= " + t + " (+8) <= " + this.buffer.byteLength);
699
704
  }
700
- var r = 0, s = 0;
701
- this.littleEndian ? (r = this.view[t + 2] << 16, r |= this.view[t + 1] << 8, r |= this.view[t], r += this.view[t + 3] << 24 >>> 0, t += 4, s = this.view[t + 2] << 16, s |= this.view[t + 1] << 8, s |= this.view[t], s += this.view[t + 3] << 24 >>> 0) : (s = this.view[t + 1] << 16, s |= this.view[t + 2] << 8, s |= this.view[t + 3], s += this.view[t] << 24 >>> 0, t += 4, r = this.view[t + 1] << 16, r |= this.view[t + 2] << 8, r |= this.view[t + 3], r += this.view[t] << 24 >>> 0);
702
- var o = new i(r, s, !1);
705
+ var r = 0, a = 0;
706
+ this.littleEndian ? (r = this.view[t + 2] << 16, r |= this.view[t + 1] << 8, r |= this.view[t], r += this.view[t + 3] << 24 >>> 0, t += 4, a = this.view[t + 2] << 16, a |= this.view[t + 1] << 8, a |= this.view[t], a += this.view[t + 3] << 24 >>> 0) : (a = this.view[t + 1] << 16, a |= this.view[t + 2] << 8, a |= this.view[t + 3], a += this.view[t] << 24 >>> 0, t += 4, r = this.view[t + 1] << 16, r |= this.view[t + 2] << 8, r |= this.view[t + 3], r += this.view[t] << 24 >>> 0);
707
+ var o = new i(r, a, !1);
703
708
  return e && (this.offset += 8), o;
704
- }, a.readLong = a.readInt64, a.writeUint64 = function(t, e) {
709
+ }, s.readLong = s.readInt64, s.writeUint64 = function(t, e) {
705
710
  var r = typeof e > "u";
706
711
  if (r && (e = this.offset), !this.noAssert) {
707
712
  if (typeof t == "number")
@@ -716,11 +721,11 @@ function dt() {
716
721
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
717
722
  }
718
723
  typeof t == "number" ? t = i.fromNumber(t) : typeof t == "string" && (t = i.fromString(t)), e += 8;
719
- var s = this.buffer.byteLength;
720
- e > s && this.resize((s *= 2) > e ? s : e), e -= 8;
724
+ var a = this.buffer.byteLength;
725
+ e > a && this.resize((a *= 2) > e ? a : e), e -= 8;
721
726
  var o = t.low, u = t.high;
722
727
  return this.littleEndian ? (this.view[e + 3] = o >>> 24 & 255, this.view[e + 2] = o >>> 16 & 255, this.view[e + 1] = o >>> 8 & 255, this.view[e] = o & 255, e += 4, this.view[e + 3] = u >>> 24 & 255, this.view[e + 2] = u >>> 16 & 255, this.view[e + 1] = u >>> 8 & 255, this.view[e] = u & 255) : (this.view[e] = u >>> 24 & 255, this.view[e + 1] = u >>> 16 & 255, this.view[e + 2] = u >>> 8 & 255, this.view[e + 3] = u & 255, e += 4, this.view[e] = o >>> 24 & 255, this.view[e + 1] = o >>> 16 & 255, this.view[e + 2] = o >>> 8 & 255, this.view[e + 3] = o & 255), r && (this.offset += 8), this;
723
- }, a.writeUInt64 = a.writeUint64, a.readUint64 = function(t) {
728
+ }, s.writeUInt64 = s.writeUint64, s.readUint64 = function(t) {
724
729
  var e = typeof t > "u";
725
730
  if (e && (t = this.offset), !this.noAssert) {
726
731
  if (typeof t != "number" || t % 1 !== 0)
@@ -728,35 +733,35 @@ function dt() {
728
733
  if (t >>>= 0, t < 0 || t + 8 > this.buffer.byteLength)
729
734
  throw RangeError("Illegal offset: 0 <= " + t + " (+8) <= " + this.buffer.byteLength);
730
735
  }
731
- var r = 0, s = 0;
732
- this.littleEndian ? (r = this.view[t + 2] << 16, r |= this.view[t + 1] << 8, r |= this.view[t], r += this.view[t + 3] << 24 >>> 0, t += 4, s = this.view[t + 2] << 16, s |= this.view[t + 1] << 8, s |= this.view[t], s += this.view[t + 3] << 24 >>> 0) : (s = this.view[t + 1] << 16, s |= this.view[t + 2] << 8, s |= this.view[t + 3], s += this.view[t] << 24 >>> 0, t += 4, r = this.view[t + 1] << 16, r |= this.view[t + 2] << 8, r |= this.view[t + 3], r += this.view[t] << 24 >>> 0);
733
- var o = new i(r, s, !0);
736
+ var r = 0, a = 0;
737
+ this.littleEndian ? (r = this.view[t + 2] << 16, r |= this.view[t + 1] << 8, r |= this.view[t], r += this.view[t + 3] << 24 >>> 0, t += 4, a = this.view[t + 2] << 16, a |= this.view[t + 1] << 8, a |= this.view[t], a += this.view[t + 3] << 24 >>> 0) : (a = this.view[t + 1] << 16, a |= this.view[t + 2] << 8, a |= this.view[t + 3], a += this.view[t] << 24 >>> 0, t += 4, r = this.view[t + 1] << 16, r |= this.view[t + 2] << 8, r |= this.view[t + 3], r += this.view[t] << 24 >>> 0);
738
+ var o = new i(r, a, !0);
734
739
  return e && (this.offset += 8), o;
735
- }, a.readUInt64 = a.readUint64);
736
- function v(t, e, r, s, o) {
737
- var u, l, g = o * 8 - s - 1, F = (1 << g) - 1, S = F >> 1, A = -7, L = r ? o - 1 : 0, _ = r ? -1 : 1, d = t[e + L];
738
- for (L += _, u = d & (1 << -A) - 1, d >>= -A, A += g; A > 0; u = u * 256 + t[e + L], L += _, A -= 8)
740
+ }, s.readUInt64 = s.readUint64);
741
+ function T(t, e, r, a, o) {
742
+ var u, l, p = o * 8 - a - 1, F = (1 << p) - 1, S = F >> 1, N = -7, _ = r ? o - 1 : 0, L = r ? -1 : 1, y = t[e + _];
743
+ for (_ += L, u = y & (1 << -N) - 1, y >>= -N, N += p; N > 0; u = u * 256 + t[e + _], _ += L, N -= 8)
739
744
  ;
740
- for (l = u & (1 << -A) - 1, u >>= -A, A += s; A > 0; l = l * 256 + t[e + L], L += _, A -= 8)
745
+ for (l = u & (1 << -N) - 1, u >>= -N, N += a; N > 0; l = l * 256 + t[e + _], _ += L, N -= 8)
741
746
  ;
742
747
  if (u === 0)
743
748
  u = 1 - S;
744
749
  else {
745
750
  if (u === F)
746
- return l ? NaN : (d ? -1 : 1) * (1 / 0);
747
- l = l + Math.pow(2, s), u = u - S;
751
+ return l ? NaN : (y ? -1 : 1) * (1 / 0);
752
+ l = l + Math.pow(2, a), u = u - S;
748
753
  }
749
- return (d ? -1 : 1) * l * Math.pow(2, u - s);
754
+ return (y ? -1 : 1) * l * Math.pow(2, u - a);
750
755
  }
751
- function N(t, e, r, s, o, u) {
752
- var l, g, F, S = u * 8 - o - 1, A = (1 << S) - 1, L = A >> 1, _ = o === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, d = s ? 0 : u - 1, f = s ? 1 : -1, h = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
753
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (g = isNaN(e) ? 1 : 0, l = A) : (l = Math.floor(Math.log(e) / Math.LN2), e * (F = Math.pow(2, -l)) < 1 && (l--, F *= 2), l + L >= 1 ? e += _ / F : e += _ * Math.pow(2, 1 - L), e * F >= 2 && (l++, F /= 2), l + L >= A ? (g = 0, l = A) : l + L >= 1 ? (g = (e * F - 1) * Math.pow(2, o), l = l + L) : (g = e * Math.pow(2, L - 1) * Math.pow(2, o), l = 0)); o >= 8; t[r + d] = g & 255, d += f, g /= 256, o -= 8)
756
+ function U(t, e, r, a, o, u) {
757
+ var l, p, F, S = u * 8 - o - 1, N = (1 << S) - 1, _ = N >> 1, L = o === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = a ? 0 : u - 1, g = a ? 1 : -1, h = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
758
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (p = isNaN(e) ? 1 : 0, l = N) : (l = Math.floor(Math.log(e) / Math.LN2), e * (F = Math.pow(2, -l)) < 1 && (l--, F *= 2), l + _ >= 1 ? e += L / F : e += L * Math.pow(2, 1 - _), e * F >= 2 && (l++, F /= 2), l + _ >= N ? (p = 0, l = N) : l + _ >= 1 ? (p = (e * F - 1) * Math.pow(2, o), l = l + _) : (p = e * Math.pow(2, _ - 1) * Math.pow(2, o), l = 0)); o >= 8; t[r + y] = p & 255, y += g, p /= 256, o -= 8)
754
759
  ;
755
- for (l = l << o | g, S += o; S > 0; t[r + d] = l & 255, d += f, l /= 256, S -= 8)
760
+ for (l = l << o | p, S += o; S > 0; t[r + y] = l & 255, y += g, l /= 256, S -= 8)
756
761
  ;
757
- t[r + d - f] |= h * 128;
762
+ t[r + y - g] |= h * 128;
758
763
  }
759
- a.writeFloat32 = function(t, e) {
764
+ s.writeFloat32 = function(t, e) {
760
765
  var r = typeof e > "u";
761
766
  if (r && (e = this.offset), !this.noAssert) {
762
767
  if (typeof t != "number")
@@ -767,9 +772,9 @@ function dt() {
767
772
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
768
773
  }
769
774
  e += 4;
770
- var s = this.buffer.byteLength;
771
- return e > s && this.resize((s *= 2) > e ? s : e), e -= 4, N(this.view, t, e, this.littleEndian, 23, 4), r && (this.offset += 4), this;
772
- }, a.writeFloat = a.writeFloat32, a.readFloat32 = function(t) {
775
+ var a = this.buffer.byteLength;
776
+ return e > a && this.resize((a *= 2) > e ? a : e), e -= 4, U(this.view, t, e, this.littleEndian, 23, 4), r && (this.offset += 4), this;
777
+ }, s.writeFloat = s.writeFloat32, s.readFloat32 = function(t) {
773
778
  var e = typeof t > "u";
774
779
  if (e && (t = this.offset), !this.noAssert) {
775
780
  if (typeof t != "number" || t % 1 !== 0)
@@ -777,9 +782,9 @@ function dt() {
777
782
  if (t >>>= 0, t < 0 || t + 4 > this.buffer.byteLength)
778
783
  throw RangeError("Illegal offset: 0 <= " + t + " (+4) <= " + this.buffer.byteLength);
779
784
  }
780
- var r = v(this.view, t, this.littleEndian, 23, 4);
785
+ var r = T(this.view, t, this.littleEndian, 23, 4);
781
786
  return e && (this.offset += 4), r;
782
- }, a.readFloat = a.readFloat32, a.writeFloat64 = function(t, e) {
787
+ }, s.readFloat = s.readFloat32, s.writeFloat64 = function(t, e) {
783
788
  var r = typeof e > "u";
784
789
  if (r && (e = this.offset), !this.noAssert) {
785
790
  if (typeof t != "number")
@@ -790,9 +795,9 @@ function dt() {
790
795
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
791
796
  }
792
797
  e += 8;
793
- var s = this.buffer.byteLength;
794
- return e > s && this.resize((s *= 2) > e ? s : e), e -= 8, N(this.view, t, e, this.littleEndian, 52, 8), r && (this.offset += 8), this;
795
- }, a.writeDouble = a.writeFloat64, a.readFloat64 = function(t) {
798
+ var a = this.buffer.byteLength;
799
+ return e > a && this.resize((a *= 2) > e ? a : e), e -= 8, U(this.view, t, e, this.littleEndian, 52, 8), r && (this.offset += 8), this;
800
+ }, s.writeDouble = s.writeFloat64, s.readFloat64 = function(t) {
796
801
  var e = typeof t > "u";
797
802
  if (e && (t = this.offset), !this.noAssert) {
798
803
  if (typeof t != "number" || t % 1 !== 0)
@@ -800,15 +805,15 @@ function dt() {
800
805
  if (t >>>= 0, t < 0 || t + 8 > this.buffer.byteLength)
801
806
  throw RangeError("Illegal offset: 0 <= " + t + " (+8) <= " + this.buffer.byteLength);
802
807
  }
803
- var r = v(this.view, t, this.littleEndian, 52, 8);
808
+ var r = T(this.view, t, this.littleEndian, 52, 8);
804
809
  return e && (this.offset += 8), r;
805
- }, a.readDouble = a.readFloat64, n.MAX_VARINT32_BYTES = 5, n.calculateVarint32 = function(t) {
810
+ }, s.readDouble = s.readFloat64, n.MAX_VARINT32_BYTES = 5, n.calculateVarint32 = function(t) {
806
811
  return t = t >>> 0, t < 128 ? 1 : t < 16384 ? 2 : t < 1 << 21 ? 3 : t < 1 << 28 ? 4 : 5;
807
812
  }, n.zigZagEncode32 = function(t) {
808
813
  return ((t |= 0) << 1 ^ t >> 31) >>> 0;
809
814
  }, n.zigZagDecode32 = function(t) {
810
815
  return t >>> 1 ^ -(t & 1) | 0;
811
- }, a.writeVarint32 = function(t, e) {
816
+ }, s.writeVarint32 = function(t, e) {
812
817
  var r = typeof e > "u";
813
818
  if (r && (e = this.offset), !this.noAssert) {
814
819
  if (typeof t != "number" || t % 1 !== 0)
@@ -818,15 +823,15 @@ function dt() {
818
823
  if (e >>>= 0, e < 0 || e + 0 > this.buffer.byteLength)
819
824
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
820
825
  }
821
- var s = n.calculateVarint32(t), o;
822
- e += s;
826
+ var a = n.calculateVarint32(t), o;
827
+ e += a;
823
828
  var u = this.buffer.byteLength;
824
- for (e > u && this.resize((u *= 2) > e ? u : e), e -= s, t >>>= 0; t >= 128; )
829
+ for (e > u && this.resize((u *= 2) > e ? u : e), e -= a, t >>>= 0; t >= 128; )
825
830
  o = t & 127 | 128, this.view[e++] = o, t >>>= 7;
826
- return this.view[e++] = t, r ? (this.offset = e, this) : s;
827
- }, a.writeVarint32ZigZag = function(t, e) {
831
+ return this.view[e++] = t, r ? (this.offset = e, this) : a;
832
+ }, s.writeVarint32ZigZag = function(t, e) {
828
833
  return this.writeVarint32(n.zigZagEncode32(t), e);
829
- }, a.readVarint32 = function(t) {
834
+ }, s.readVarint32 = function(t) {
830
835
  var e = typeof t > "u";
831
836
  if (e && (t = this.offset), !this.noAssert) {
832
837
  if (typeof t != "number" || t % 1 !== 0)
@@ -834,30 +839,30 @@ function dt() {
834
839
  if (t >>>= 0, t < 0 || t + 1 > this.buffer.byteLength)
835
840
  throw RangeError("Illegal offset: 0 <= " + t + " (+1) <= " + this.buffer.byteLength);
836
841
  }
837
- var r = 0, s = 0, o;
842
+ var r = 0, a = 0, o;
838
843
  do {
839
844
  if (!this.noAssert && t > this.limit) {
840
845
  var u = Error("Truncated");
841
846
  throw u.truncated = !0, u;
842
847
  }
843
- o = this.view[t++], r < 5 && (s |= (o & 127) << 7 * r), ++r;
848
+ o = this.view[t++], r < 5 && (a |= (o & 127) << 7 * r), ++r;
844
849
  } while ((o & 128) !== 0);
845
- return s |= 0, e ? (this.offset = t, s) : {
846
- value: s,
850
+ return a |= 0, e ? (this.offset = t, a) : {
851
+ value: a,
847
852
  length: r
848
853
  };
849
- }, a.readVarint32ZigZag = function(t) {
854
+ }, s.readVarint32ZigZag = function(t) {
850
855
  var e = this.readVarint32(t);
851
856
  return typeof e == "object" ? e.value = n.zigZagDecode32(e.value) : e = n.zigZagDecode32(e), e;
852
857
  }, i && (n.MAX_VARINT64_BYTES = 10, n.calculateVarint64 = function(t) {
853
858
  typeof t == "number" ? t = i.fromNumber(t) : typeof t == "string" && (t = i.fromString(t));
854
- var e = t.toInt() >>> 0, r = t.shiftRightUnsigned(28).toInt() >>> 0, s = t.shiftRightUnsigned(56).toInt() >>> 0;
855
- return s == 0 ? r == 0 ? e < 16384 ? e < 128 ? 1 : 2 : e < 1 << 21 ? 3 : 4 : r < 16384 ? r < 128 ? 5 : 6 : r < 1 << 21 ? 7 : 8 : s < 128 ? 9 : 10;
859
+ var e = t.toInt() >>> 0, r = t.shiftRightUnsigned(28).toInt() >>> 0, a = t.shiftRightUnsigned(56).toInt() >>> 0;
860
+ return a == 0 ? r == 0 ? e < 16384 ? e < 128 ? 1 : 2 : e < 1 << 21 ? 3 : 4 : r < 16384 ? r < 128 ? 5 : 6 : r < 1 << 21 ? 7 : 8 : a < 128 ? 9 : 10;
856
861
  }, n.zigZagEncode64 = function(t) {
857
862
  return typeof t == "number" ? t = i.fromNumber(t, !1) : typeof t == "string" ? t = i.fromString(t, !1) : t.unsigned !== !1 && (t = t.toSigned()), t.shiftLeft(1).xor(t.shiftRight(63)).toUnsigned();
858
863
  }, n.zigZagDecode64 = function(t) {
859
864
  return typeof t == "number" ? t = i.fromNumber(t, !1) : typeof t == "string" ? t = i.fromString(t, !1) : t.unsigned !== !1 && (t = t.toSigned()), t.shiftRightUnsigned(1).xor(t.and(i.ONE).toSigned().negate()).toSigned();
860
- }, a.writeVarint64 = function(t, e) {
865
+ }, s.writeVarint64 = function(t, e) {
861
866
  var r = typeof e > "u";
862
867
  if (r && (e = this.offset), !this.noAssert) {
863
868
  if (typeof t == "number")
@@ -872,35 +877,35 @@ function dt() {
872
877
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
873
878
  }
874
879
  typeof t == "number" ? t = i.fromNumber(t, !1) : typeof t == "string" ? t = i.fromString(t, !1) : t.unsigned !== !1 && (t = t.toSigned());
875
- var s = n.calculateVarint64(t), o = t.toInt() >>> 0, u = t.shiftRightUnsigned(28).toInt() >>> 0, l = t.shiftRightUnsigned(56).toInt() >>> 0;
876
- e += s;
877
- var g = this.buffer.byteLength;
878
- switch (e > g && this.resize((g *= 2) > e ? g : e), e -= s, s) {
880
+ var a = n.calculateVarint64(t), o = t.toInt() >>> 0, u = t.shiftRightUnsigned(28).toInt() >>> 0, l = t.shiftRightUnsigned(56).toInt() >>> 0;
881
+ e += a;
882
+ var p = this.buffer.byteLength;
883
+ switch (e > p && this.resize((p *= 2) > e ? p : e), e -= a, a) {
879
884
  case 10:
880
885
  this.view[e + 9] = l >>> 7 & 1;
881
886
  case 9:
882
- this.view[e + 8] = s !== 9 ? l | 128 : l & 127;
887
+ this.view[e + 8] = a !== 9 ? l | 128 : l & 127;
883
888
  case 8:
884
- this.view[e + 7] = s !== 8 ? u >>> 21 | 128 : u >>> 21 & 127;
889
+ this.view[e + 7] = a !== 8 ? u >>> 21 | 128 : u >>> 21 & 127;
885
890
  case 7:
886
- this.view[e + 6] = s !== 7 ? u >>> 14 | 128 : u >>> 14 & 127;
891
+ this.view[e + 6] = a !== 7 ? u >>> 14 | 128 : u >>> 14 & 127;
887
892
  case 6:
888
- this.view[e + 5] = s !== 6 ? u >>> 7 | 128 : u >>> 7 & 127;
893
+ this.view[e + 5] = a !== 6 ? u >>> 7 | 128 : u >>> 7 & 127;
889
894
  case 5:
890
- this.view[e + 4] = s !== 5 ? u | 128 : u & 127;
895
+ this.view[e + 4] = a !== 5 ? u | 128 : u & 127;
891
896
  case 4:
892
- this.view[e + 3] = s !== 4 ? o >>> 21 | 128 : o >>> 21 & 127;
897
+ this.view[e + 3] = a !== 4 ? o >>> 21 | 128 : o >>> 21 & 127;
893
898
  case 3:
894
- this.view[e + 2] = s !== 3 ? o >>> 14 | 128 : o >>> 14 & 127;
899
+ this.view[e + 2] = a !== 3 ? o >>> 14 | 128 : o >>> 14 & 127;
895
900
  case 2:
896
- this.view[e + 1] = s !== 2 ? o >>> 7 | 128 : o >>> 7 & 127;
901
+ this.view[e + 1] = a !== 2 ? o >>> 7 | 128 : o >>> 7 & 127;
897
902
  case 1:
898
- this.view[e] = s !== 1 ? o | 128 : o & 127;
903
+ this.view[e] = a !== 1 ? o | 128 : o & 127;
899
904
  }
900
- return r ? (this.offset += s, this) : s;
901
- }, a.writeVarint64ZigZag = function(t, e) {
905
+ return r ? (this.offset += a, this) : a;
906
+ }, s.writeVarint64ZigZag = function(t, e) {
902
907
  return this.writeVarint64(n.zigZagEncode64(t), e);
903
- }, a.readVarint64 = function(t) {
908
+ }, s.readVarint64 = function(t) {
904
909
  var e = typeof t > "u";
905
910
  if (e && (t = this.offset), !this.noAssert) {
906
911
  if (typeof t != "number" || t % 1 !== 0)
@@ -908,38 +913,38 @@ function dt() {
908
913
  if (t >>>= 0, t < 0 || t + 1 > this.buffer.byteLength)
909
914
  throw RangeError("Illegal offset: 0 <= " + t + " (+1) <= " + this.buffer.byteLength);
910
915
  }
911
- var r = t, s = 0, o = 0, u = 0, l = 0;
912
- if (l = this.view[t++], s = l & 127, l & 128 && (l = this.view[t++], s |= (l & 127) << 7, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], s |= (l & 127) << 14, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], s |= (l & 127) << 21, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], o = l & 127, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], o |= (l & 127) << 7, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], o |= (l & 127) << 14, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], o |= (l & 127) << 21, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], u = l & 127, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], u |= (l & 127) << 7, l & 128 || this.noAssert && typeof l > "u"))))))))))
916
+ var r = t, a = 0, o = 0, u = 0, l = 0;
917
+ if (l = this.view[t++], a = l & 127, l & 128 && (l = this.view[t++], a |= (l & 127) << 7, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], a |= (l & 127) << 14, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], a |= (l & 127) << 21, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], o = l & 127, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], o |= (l & 127) << 7, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], o |= (l & 127) << 14, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], o |= (l & 127) << 21, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], u = l & 127, (l & 128 || this.noAssert && typeof l > "u") && (l = this.view[t++], u |= (l & 127) << 7, l & 128 || this.noAssert && typeof l > "u"))))))))))
913
918
  throw Error("Buffer overrun");
914
- var g = i.fromBits(s | o << 28, o >>> 4 | u << 24, !1);
915
- return e ? (this.offset = t, g) : {
916
- value: g,
919
+ var p = i.fromBits(a | o << 28, o >>> 4 | u << 24, !1);
920
+ return e ? (this.offset = t, p) : {
921
+ value: p,
917
922
  length: t - r
918
923
  };
919
- }, a.readVarint64ZigZag = function(t) {
924
+ }, s.readVarint64ZigZag = function(t) {
920
925
  var e = this.readVarint64(t);
921
926
  return e && e.value instanceof i ? e.value = n.zigZagDecode64(e.value) : e = n.zigZagDecode64(e), e;
922
- }), a.writeCString = function(t, e) {
927
+ }), s.writeCString = function(t, e) {
923
928
  var r = typeof e > "u";
924
929
  r && (e = this.offset);
925
- var s, o = t.length;
930
+ var a, o = t.length;
926
931
  if (!this.noAssert) {
927
932
  if (typeof t != "string")
928
933
  throw TypeError("Illegal str: Not a string");
929
- for (s = 0; s < o; ++s)
930
- if (t.charCodeAt(s) === 0)
934
+ for (a = 0; a < o; ++a)
935
+ if (t.charCodeAt(a) === 0)
931
936
  throw RangeError("Illegal str: Contains NULL-characters");
932
937
  if (typeof e != "number" || e % 1 !== 0)
933
938
  throw TypeError("Illegal offset: " + e + " (not an integer)");
934
939
  if (e >>>= 0, e < 0 || e + 0 > this.buffer.byteLength)
935
940
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
936
941
  }
937
- o = m.calculateUTF16asUTF8(y(t))[1], e += o + 1;
942
+ o = v.calculateUTF16asUTF8(d(t))[1], e += o + 1;
938
943
  var u = this.buffer.byteLength;
939
- return e > u && this.resize((u *= 2) > e ? u : e), e -= o + 1, m.encodeUTF16toUTF8(y(t), (function(l) {
944
+ return e > u && this.resize((u *= 2) > e ? u : e), e -= o + 1, v.encodeUTF16toUTF8(d(t), (function(l) {
940
945
  this.view[e++] = l;
941
946
  }).bind(this)), this.view[e++] = 0, r ? (this.offset = e, this) : o;
942
- }, a.readCString = function(t) {
947
+ }, s.readCString = function(t) {
943
948
  var e = typeof t > "u";
944
949
  if (e && (t = this.offset), !this.noAssert) {
945
950
  if (typeof t != "number" || t % 1 !== 0)
@@ -947,17 +952,17 @@ function dt() {
947
952
  if (t >>>= 0, t < 0 || t + 1 > this.buffer.byteLength)
948
953
  throw RangeError("Illegal offset: 0 <= " + t + " (+1) <= " + this.buffer.byteLength);
949
954
  }
950
- var r = t, s, o = -1;
951
- return m.decodeUTF8toUTF16((function() {
955
+ var r = t, a, o = -1;
956
+ return v.decodeUTF8toUTF16((function() {
952
957
  if (o === 0) return null;
953
958
  if (t >= this.limit)
954
959
  throw RangeError("Illegal range: Truncated data, " + t + " < " + this.limit);
955
960
  return o = this.view[t++], o === 0 ? null : o;
956
- }).bind(this), s = b(), !0), e ? (this.offset = t, s()) : {
957
- string: s(),
961
+ }).bind(this), a = E(), !0), e ? (this.offset = t, a()) : {
962
+ string: a(),
958
963
  length: t - r
959
964
  };
960
- }, a.writeIString = function(t, e) {
965
+ }, s.writeIString = function(t, e) {
961
966
  var r = typeof e > "u";
962
967
  if (r && (e = this.offset), !this.noAssert) {
963
968
  if (typeof t != "string")
@@ -967,15 +972,15 @@ function dt() {
967
972
  if (e >>>= 0, e < 0 || e + 0 > this.buffer.byteLength)
968
973
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
969
974
  }
970
- var s = e, o;
971
- o = m.calculateUTF16asUTF8(y(t), this.noAssert)[1], e += 4 + o;
975
+ var a = e, o;
976
+ o = v.calculateUTF16asUTF8(d(t), this.noAssert)[1], e += 4 + o;
972
977
  var u = this.buffer.byteLength;
973
- if (e > u && this.resize((u *= 2) > e ? u : e), e -= 4 + o, this.littleEndian ? (this.view[e + 3] = o >>> 24 & 255, this.view[e + 2] = o >>> 16 & 255, this.view[e + 1] = o >>> 8 & 255, this.view[e] = o & 255) : (this.view[e] = o >>> 24 & 255, this.view[e + 1] = o >>> 16 & 255, this.view[e + 2] = o >>> 8 & 255, this.view[e + 3] = o & 255), e += 4, m.encodeUTF16toUTF8(y(t), (function(l) {
978
+ if (e > u && this.resize((u *= 2) > e ? u : e), e -= 4 + o, this.littleEndian ? (this.view[e + 3] = o >>> 24 & 255, this.view[e + 2] = o >>> 16 & 255, this.view[e + 1] = o >>> 8 & 255, this.view[e] = o & 255) : (this.view[e] = o >>> 24 & 255, this.view[e + 1] = o >>> 16 & 255, this.view[e + 2] = o >>> 8 & 255, this.view[e + 3] = o & 255), e += 4, v.encodeUTF16toUTF8(d(t), (function(l) {
974
979
  this.view[e++] = l;
975
- }).bind(this)), e !== s + 4 + o)
980
+ }).bind(this)), e !== a + 4 + o)
976
981
  throw RangeError("Illegal range: Truncated data, " + e + " == " + (e + 4 + o));
977
- return r ? (this.offset = e, this) : e - s;
978
- }, a.readIString = function(t) {
982
+ return r ? (this.offset = e, this) : e - a;
983
+ }, s.readIString = function(t) {
979
984
  var e = typeof t > "u";
980
985
  if (e && (t = this.offset), !this.noAssert) {
981
986
  if (typeof t != "number" || t % 1 !== 0)
@@ -983,12 +988,12 @@ function dt() {
983
988
  if (t >>>= 0, t < 0 || t + 4 > this.buffer.byteLength)
984
989
  throw RangeError("Illegal offset: 0 <= " + t + " (+4) <= " + this.buffer.byteLength);
985
990
  }
986
- var r = t, s = this.readUint32(t), o = this.readUTF8String(s, n.METRICS_BYTES, t += 4);
991
+ var r = t, a = this.readUint32(t), o = this.readUTF8String(a, n.METRICS_BYTES, t += 4);
987
992
  return t += o.length, e ? (this.offset = t, o.string) : {
988
993
  string: o.string,
989
994
  length: t - r
990
995
  };
991
- }, n.METRICS_CHARS = "c", n.METRICS_BYTES = "b", a.writeUTF8String = function(t, e) {
996
+ }, n.METRICS_CHARS = "c", n.METRICS_BYTES = "b", s.writeUTF8String = function(t, e) {
992
997
  var r = typeof e > "u";
993
998
  if (r && (e = this.offset), !this.noAssert) {
994
999
  if (typeof e != "number" || e % 1 !== 0)
@@ -996,20 +1001,20 @@ function dt() {
996
1001
  if (e >>>= 0, e < 0 || e + 0 > this.buffer.byteLength)
997
1002
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
998
1003
  }
999
- var s, o = e;
1000
- s = m.calculateUTF16asUTF8(y(t))[1], e += s;
1004
+ var a, o = e;
1005
+ a = v.calculateUTF16asUTF8(d(t))[1], e += a;
1001
1006
  var u = this.buffer.byteLength;
1002
- return e > u && this.resize((u *= 2) > e ? u : e), e -= s, m.encodeUTF16toUTF8(y(t), (function(l) {
1007
+ return e > u && this.resize((u *= 2) > e ? u : e), e -= a, v.encodeUTF16toUTF8(d(t), (function(l) {
1003
1008
  this.view[e++] = l;
1004
1009
  }).bind(this)), r ? (this.offset = e, this) : e - o;
1005
- }, a.writeString = a.writeUTF8String, n.calculateUTF8Chars = function(t) {
1006
- return m.calculateUTF16asUTF8(y(t))[0];
1010
+ }, s.writeString = s.writeUTF8String, n.calculateUTF8Chars = function(t) {
1011
+ return v.calculateUTF16asUTF8(d(t))[0];
1007
1012
  }, n.calculateUTF8Bytes = function(t) {
1008
- return m.calculateUTF16asUTF8(y(t))[1];
1009
- }, n.calculateString = n.calculateUTF8Bytes, a.readUTF8String = function(t, e, r) {
1013
+ return v.calculateUTF16asUTF8(d(t))[1];
1014
+ }, n.calculateString = n.calculateUTF8Bytes, s.readUTF8String = function(t, e, r) {
1010
1015
  typeof e == "number" && (r = e, e = void 0);
1011
- var s = typeof r > "u";
1012
- if (s && (r = this.offset), typeof e > "u" && (e = n.METRICS_CHARS), !this.noAssert) {
1016
+ var a = typeof r > "u";
1017
+ if (a && (r = this.offset), typeof e > "u" && (e = n.METRICS_CHARS), !this.noAssert) {
1013
1018
  if (typeof t != "number" || t % 1 !== 0)
1014
1019
  throw TypeError("Illegal length: " + t + " (not an integer)");
1015
1020
  if (t |= 0, typeof r != "number" || r % 1 !== 0)
@@ -1019,13 +1024,13 @@ function dt() {
1019
1024
  }
1020
1025
  var o = 0, u = r, l;
1021
1026
  if (e === n.METRICS_CHARS) {
1022
- if (l = b(), m.decodeUTF8((function() {
1027
+ if (l = E(), v.decodeUTF8((function() {
1023
1028
  return o < t && r < this.limit ? this.view[r++] : null;
1024
1029
  }).bind(this), function(F) {
1025
- ++o, m.UTF8toUTF16(F, l);
1030
+ ++o, v.UTF8toUTF16(F, l);
1026
1031
  }), o !== t)
1027
1032
  throw RangeError("Illegal range: Truncated data, " + o + " == " + t);
1028
- return s ? (this.offset = r, l()) : {
1033
+ return a ? (this.offset = r, l()) : {
1029
1034
  string: l(),
1030
1035
  length: r - u
1031
1036
  };
@@ -1036,18 +1041,18 @@ function dt() {
1036
1041
  if (r >>>= 0, r < 0 || r + t > this.buffer.byteLength)
1037
1042
  throw RangeError("Illegal offset: 0 <= " + r + " (+" + t + ") <= " + this.buffer.byteLength);
1038
1043
  }
1039
- var g = r + t;
1040
- if (m.decodeUTF8toUTF16((function() {
1041
- return r < g ? this.view[r++] : null;
1042
- }).bind(this), l = b(), this.noAssert), r !== g)
1043
- throw RangeError("Illegal range: Truncated data, " + r + " == " + g);
1044
- return s ? (this.offset = r, l()) : {
1044
+ var p = r + t;
1045
+ if (v.decodeUTF8toUTF16((function() {
1046
+ return r < p ? this.view[r++] : null;
1047
+ }).bind(this), l = E(), this.noAssert), r !== p)
1048
+ throw RangeError("Illegal range: Truncated data, " + r + " == " + p);
1049
+ return a ? (this.offset = r, l()) : {
1045
1050
  string: l(),
1046
1051
  length: r - u
1047
1052
  };
1048
1053
  } else
1049
1054
  throw TypeError("Unsupported metrics: " + e);
1050
- }, a.readString = a.readUTF8String, a.writeVString = function(t, e) {
1055
+ }, s.readString = s.readUTF8String, s.writeVString = function(t, e) {
1051
1056
  var r = typeof e > "u";
1052
1057
  if (r && (e = this.offset), !this.noAssert) {
1053
1058
  if (typeof t != "string")
@@ -1057,15 +1062,15 @@ function dt() {
1057
1062
  if (e >>>= 0, e < 0 || e + 0 > this.buffer.byteLength)
1058
1063
  throw RangeError("Illegal offset: 0 <= " + e + " (+0) <= " + this.buffer.byteLength);
1059
1064
  }
1060
- var s = e, o, u;
1061
- o = m.calculateUTF16asUTF8(y(t), this.noAssert)[1], u = n.calculateVarint32(o), e += u + o;
1065
+ var a = e, o, u;
1066
+ o = v.calculateUTF16asUTF8(d(t), this.noAssert)[1], u = n.calculateVarint32(o), e += u + o;
1062
1067
  var l = this.buffer.byteLength;
1063
- if (e > l && this.resize((l *= 2) > e ? l : e), e -= u + o, e += this.writeVarint32(o, e), m.encodeUTF16toUTF8(y(t), (function(g) {
1064
- this.view[e++] = g;
1065
- }).bind(this)), e !== s + o + u)
1068
+ if (e > l && this.resize((l *= 2) > e ? l : e), e -= u + o, e += this.writeVarint32(o, e), v.encodeUTF16toUTF8(d(t), (function(p) {
1069
+ this.view[e++] = p;
1070
+ }).bind(this)), e !== a + o + u)
1066
1071
  throw RangeError("Illegal range: Truncated data, " + e + " == " + (e + o + u));
1067
- return r ? (this.offset = e, this) : e - s;
1068
- }, a.readVString = function(t) {
1072
+ return r ? (this.offset = e, this) : e - a;
1073
+ }, s.readVString = function(t) {
1069
1074
  var e = typeof t > "u";
1070
1075
  if (e && (t = this.offset), !this.noAssert) {
1071
1076
  if (typeof t != "number" || t % 1 !== 0)
@@ -1073,15 +1078,15 @@ function dt() {
1073
1078
  if (t >>>= 0, t < 0 || t + 1 > this.buffer.byteLength)
1074
1079
  throw RangeError("Illegal offset: 0 <= " + t + " (+1) <= " + this.buffer.byteLength);
1075
1080
  }
1076
- var r = t, s = this.readVarint32(t), o = this.readUTF8String(s.value, n.METRICS_BYTES, t += s.length);
1081
+ var r = t, a = this.readVarint32(t), o = this.readUTF8String(a.value, n.METRICS_BYTES, t += a.length);
1077
1082
  return t += o.length, e ? (this.offset = t, o.string) : {
1078
1083
  string: o.string,
1079
1084
  length: t - r
1080
1085
  };
1081
- }, a.append = function(t, e, r) {
1086
+ }, s.append = function(t, e, r) {
1082
1087
  (typeof e == "number" || typeof e != "string") && (r = e, e = void 0);
1083
- var s = typeof r > "u";
1084
- if (s && (r = this.offset), !this.noAssert) {
1088
+ var a = typeof r > "u";
1089
+ if (a && (r = this.offset), !this.noAssert) {
1085
1090
  if (typeof r != "number" || r % 1 !== 0)
1086
1091
  throw TypeError("Illegal offset: " + r + " (not an integer)");
1087
1092
  if (r >>>= 0, r < 0 || r + 0 > this.buffer.byteLength)
@@ -1092,19 +1097,19 @@ function dt() {
1092
1097
  if (o <= 0) return this;
1093
1098
  r += o;
1094
1099
  var u = this.buffer.byteLength;
1095
- return r > u && this.resize((u *= 2) > r ? u : r), r -= o, this.view.set(t.view.subarray(t.offset, t.limit), r), t.offset += o, s && (this.offset += o), this;
1096
- }, a.appendTo = function(t, e) {
1100
+ return r > u && this.resize((u *= 2) > r ? u : r), r -= o, this.view.set(t.view.subarray(t.offset, t.limit), r), t.offset += o, a && (this.offset += o), this;
1101
+ }, s.appendTo = function(t, e) {
1097
1102
  return t.append(this, e), this;
1098
- }, a.assert = function(t) {
1103
+ }, s.assert = function(t) {
1099
1104
  return this.noAssert = !t, this;
1100
- }, a.capacity = function() {
1105
+ }, s.capacity = function() {
1101
1106
  return this.buffer.byteLength;
1102
- }, a.clear = function() {
1107
+ }, s.clear = function() {
1103
1108
  return this.offset = 0, this.limit = this.buffer.byteLength, this.markedOffset = -1, this;
1104
- }, a.clone = function(t) {
1109
+ }, s.clone = function(t) {
1105
1110
  var e = new n(0, this.littleEndian, this.noAssert);
1106
1111
  return t ? (e.buffer = new ArrayBuffer(this.buffer.byteLength), e.view = new Uint8Array(e.buffer)) : (e.buffer = this.buffer, e.view = this.view), e.offset = this.offset, e.markedOffset = this.markedOffset, e.limit = this.limit, e;
1107
- }, a.compact = function(t, e) {
1112
+ }, s.compact = function(t, e) {
1108
1113
  if (typeof t > "u" && (t = this.offset), typeof e > "u" && (e = this.limit), !this.noAssert) {
1109
1114
  if (typeof t != "number" || t % 1 !== 0)
1110
1115
  throw TypeError("Illegal begin: Not an integer");
@@ -1118,9 +1123,9 @@ function dt() {
1118
1123
  var r = e - t;
1119
1124
  if (r === 0)
1120
1125
  return this.buffer = c, this.view = null, this.markedOffset >= 0 && (this.markedOffset -= t), this.offset = 0, this.limit = 0, this;
1121
- var s = new ArrayBuffer(r), o = new Uint8Array(s);
1122
- return o.set(this.view.subarray(t, e)), this.buffer = s, this.view = o, this.markedOffset >= 0 && (this.markedOffset -= t), this.offset = 0, this.limit = r, this;
1123
- }, a.copy = function(t, e) {
1126
+ var a = new ArrayBuffer(r), o = new Uint8Array(a);
1127
+ return o.set(this.view.subarray(t, e)), this.buffer = a, this.view = o, this.markedOffset >= 0 && (this.markedOffset -= t), this.offset = 0, this.limit = r, this;
1128
+ }, s.copy = function(t, e) {
1124
1129
  if (typeof t > "u" && (t = this.offset), typeof e > "u" && (e = this.limit), !this.noAssert) {
1125
1130
  if (typeof t != "number" || t % 1 !== 0)
1126
1131
  throw TypeError("Illegal begin: Not an integer");
@@ -1131,24 +1136,24 @@ function dt() {
1131
1136
  }
1132
1137
  if (t === e)
1133
1138
  return new n(0, this.littleEndian, this.noAssert);
1134
- var r = e - t, s = new n(r, this.littleEndian, this.noAssert);
1135
- return s.offset = 0, s.limit = r, s.markedOffset >= 0 && (s.markedOffset -= t), this.copyTo(s, 0, t, e), s;
1136
- }, a.copyTo = function(t, e, r, s) {
1139
+ var r = e - t, a = new n(r, this.littleEndian, this.noAssert);
1140
+ return a.offset = 0, a.limit = r, a.markedOffset >= 0 && (a.markedOffset -= t), this.copyTo(a, 0, t, e), a;
1141
+ }, s.copyTo = function(t, e, r, a) {
1137
1142
  var o, u;
1138
1143
  if (!this.noAssert && !n.isByteBuffer(t))
1139
1144
  throw TypeError("Illegal target: Not a ByteBuffer");
1140
- if (e = (u = typeof e > "u") ? t.offset : e | 0, r = (o = typeof r > "u") ? this.offset : r | 0, s = typeof s > "u" ? this.limit : s | 0, e < 0 || e > t.buffer.byteLength)
1145
+ if (e = (u = typeof e > "u") ? t.offset : e | 0, r = (o = typeof r > "u") ? this.offset : r | 0, a = typeof a > "u" ? this.limit : a | 0, e < 0 || e > t.buffer.byteLength)
1141
1146
  throw RangeError("Illegal target range: 0 <= " + e + " <= " + t.buffer.byteLength);
1142
- if (r < 0 || s > this.buffer.byteLength)
1147
+ if (r < 0 || a > this.buffer.byteLength)
1143
1148
  throw RangeError("Illegal source range: 0 <= " + r + " <= " + this.buffer.byteLength);
1144
- var l = s - r;
1145
- return l === 0 ? t : (t.ensureCapacity(e + l), t.view.set(this.view.subarray(r, s), e), o && (this.offset += l), u && (t.offset += l), this);
1146
- }, a.ensureCapacity = function(t) {
1149
+ var l = a - r;
1150
+ return l === 0 ? t : (t.ensureCapacity(e + l), t.view.set(this.view.subarray(r, a), e), o && (this.offset += l), u && (t.offset += l), this);
1151
+ }, s.ensureCapacity = function(t) {
1147
1152
  var e = this.buffer.byteLength;
1148
1153
  return e < t ? this.resize((e *= 2) > t ? e : t) : this;
1149
- }, a.fill = function(t, e, r) {
1150
- var s = typeof e > "u";
1151
- if (s && (e = this.offset), typeof t == "string" && t.length > 0 && (t = t.charCodeAt(0)), typeof e > "u" && (e = this.offset), typeof r > "u" && (r = this.limit), !this.noAssert) {
1154
+ }, s.fill = function(t, e, r) {
1155
+ var a = typeof e > "u";
1156
+ if (a && (e = this.offset), typeof t == "string" && t.length > 0 && (t = t.charCodeAt(0)), typeof e > "u" && (e = this.offset), typeof r > "u" && (r = this.limit), !this.noAssert) {
1152
1157
  if (typeof t != "number" || t % 1 !== 0)
1153
1158
  throw TypeError("Illegal value: " + t + " (not an integer)");
1154
1159
  if (t |= 0, typeof e != "number" || e % 1 !== 0)
@@ -1161,10 +1166,10 @@ function dt() {
1161
1166
  if (e >= r)
1162
1167
  return this;
1163
1168
  for (; e < r; ) this.view[e++] = t;
1164
- return s && (this.offset = e), this;
1165
- }, a.flip = function() {
1169
+ return a && (this.offset = e), this;
1170
+ }, s.flip = function() {
1166
1171
  return this.limit = this.offset, this.offset = 0, this;
1167
- }, a.mark = function(t) {
1172
+ }, s.mark = function(t) {
1168
1173
  if (t = typeof t > "u" ? this.offset : t, !this.noAssert) {
1169
1174
  if (typeof t != "number" || t % 1 !== 0)
1170
1175
  throw TypeError("Illegal offset: " + t + " (not an integer)");
@@ -1172,18 +1177,18 @@ function dt() {
1172
1177
  throw RangeError("Illegal offset: 0 <= " + t + " (+0) <= " + this.buffer.byteLength);
1173
1178
  }
1174
1179
  return this.markedOffset = t, this;
1175
- }, a.order = function(t) {
1180
+ }, s.order = function(t) {
1176
1181
  if (!this.noAssert && typeof t != "boolean")
1177
1182
  throw TypeError("Illegal littleEndian: Not a boolean");
1178
1183
  return this.littleEndian = !!t, this;
1179
- }, a.LE = function(t) {
1184
+ }, s.LE = function(t) {
1180
1185
  return this.littleEndian = typeof t < "u" ? !!t : !0, this;
1181
- }, a.BE = function(t) {
1186
+ }, s.BE = function(t) {
1182
1187
  return this.littleEndian = typeof t < "u" ? !t : !1, this;
1183
- }, a.prepend = function(t, e, r) {
1188
+ }, s.prepend = function(t, e, r) {
1184
1189
  (typeof e == "number" || typeof e != "string") && (r = e, e = void 0);
1185
- var s = typeof r > "u";
1186
- if (s && (r = this.offset), !this.noAssert) {
1190
+ var a = typeof r > "u";
1191
+ if (a && (r = this.offset), !this.noAssert) {
1187
1192
  if (typeof r != "number" || r % 1 !== 0)
1188
1193
  throw TypeError("Illegal offset: " + r + " (not an integer)");
1189
1194
  if (r >>>= 0, r < 0 || r + 0 > this.buffer.byteLength)
@@ -1194,14 +1199,14 @@ function dt() {
1194
1199
  if (o <= 0) return this;
1195
1200
  var u = o - r;
1196
1201
  if (u > 0) {
1197
- var l = new ArrayBuffer(this.buffer.byteLength + u), g = new Uint8Array(l);
1198
- g.set(this.view.subarray(r, this.buffer.byteLength), o), this.buffer = l, this.view = g, this.offset += u, this.markedOffset >= 0 && (this.markedOffset += u), this.limit += u, r += u;
1202
+ var l = new ArrayBuffer(this.buffer.byteLength + u), p = new Uint8Array(l);
1203
+ p.set(this.view.subarray(r, this.buffer.byteLength), o), this.buffer = l, this.view = p, this.offset += u, this.markedOffset >= 0 && (this.markedOffset += u), this.limit += u, r += u;
1199
1204
  } else
1200
1205
  new Uint8Array(this.buffer);
1201
- return this.view.set(t.view.subarray(t.offset, t.limit), r - o), t.offset = t.limit, s && (this.offset -= o), this;
1202
- }, a.prependTo = function(t, e) {
1206
+ return this.view.set(t.view.subarray(t.offset, t.limit), r - o), t.offset = t.limit, a && (this.offset -= o), this;
1207
+ }, s.prependTo = function(t, e) {
1203
1208
  return t.prepend(this, e), this;
1204
- }, a.printDebug = function(t) {
1209
+ }, s.printDebug = function(t) {
1205
1210
  typeof t != "function" && (t = console.log.bind(console)), t(
1206
1211
  this.toString() + `
1207
1212
  -------------------------------------------------------------------
@@ -1210,11 +1215,11 @@ function dt() {
1210
1215
  !0
1211
1216
  )
1212
1217
  );
1213
- }, a.remaining = function() {
1218
+ }, s.remaining = function() {
1214
1219
  return this.limit - this.offset;
1215
- }, a.reset = function() {
1220
+ }, s.reset = function() {
1216
1221
  return this.markedOffset >= 0 ? (this.offset = this.markedOffset, this.markedOffset = -1) : this.offset = 0, this;
1217
- }, a.resize = function(t) {
1222
+ }, s.resize = function(t) {
1218
1223
  if (!this.noAssert) {
1219
1224
  if (typeof t != "number" || t % 1 !== 0)
1220
1225
  throw TypeError("Illegal capacity: " + t + " (not an integer)");
@@ -1226,7 +1231,7 @@ function dt() {
1226
1231
  r.set(this.view), this.buffer = e, this.view = r;
1227
1232
  }
1228
1233
  return this;
1229
- }, a.reverse = function(t, e) {
1234
+ }, s.reverse = function(t, e) {
1230
1235
  if (typeof t > "u" && (t = this.offset), typeof e > "u" && (e = this.limit), !this.noAssert) {
1231
1236
  if (typeof t != "number" || t % 1 !== 0)
1232
1237
  throw TypeError("Illegal begin: Not an integer");
@@ -1236,7 +1241,7 @@ function dt() {
1236
1241
  throw RangeError("Illegal range: 0 <= " + t + " <= " + e + " <= " + this.buffer.byteLength);
1237
1242
  }
1238
1243
  return t === e ? this : (Array.prototype.reverse.call(this.view.subarray(t, e)), this);
1239
- }, a.skip = function(t) {
1244
+ }, s.skip = function(t) {
1240
1245
  if (!this.noAssert) {
1241
1246
  if (typeof t != "number" || t % 1 !== 0)
1242
1247
  throw TypeError("Illegal length: " + t + " (not an integer)");
@@ -1246,7 +1251,7 @@ function dt() {
1246
1251
  if (!this.noAssert && (e < 0 || e > this.buffer.byteLength))
1247
1252
  throw RangeError("Illegal length: 0 <= " + this.offset + " + " + t + " <= " + this.buffer.byteLength);
1248
1253
  return this.offset = e, this;
1249
- }, a.slice = function(t, e) {
1254
+ }, s.slice = function(t, e) {
1250
1255
  if (typeof t > "u" && (t = this.offset), typeof e > "u" && (e = this.limit), !this.noAssert) {
1251
1256
  if (typeof t != "number" || t % 1 !== 0)
1252
1257
  throw TypeError("Illegal begin: Not an integer");
@@ -1257,7 +1262,7 @@ function dt() {
1257
1262
  }
1258
1263
  var r = this.clone();
1259
1264
  return r.offset = t, r.limit = e, r;
1260
- }, a.toBuffer = function(t) {
1265
+ }, s.toBuffer = function(t) {
1261
1266
  var e = this.offset, r = this.limit;
1262
1267
  if (!this.noAssert) {
1263
1268
  if (typeof e != "number" || e % 1 !== 0)
@@ -1271,9 +1276,9 @@ function dt() {
1271
1276
  return this.buffer;
1272
1277
  if (e === r)
1273
1278
  return c;
1274
- var s = new ArrayBuffer(r - e);
1275
- return new Uint8Array(s).set(new Uint8Array(this.buffer).subarray(e, r), 0), s;
1276
- }, a.toArrayBuffer = a.toBuffer, a.toString = function(t, e, r) {
1279
+ var a = new ArrayBuffer(r - e);
1280
+ return new Uint8Array(a).set(new Uint8Array(this.buffer).subarray(e, r), 0), a;
1281
+ }, s.toArrayBuffer = s.toBuffer, s.toString = function(t, e, r) {
1277
1282
  if (typeof t > "u")
1278
1283
  return "ByteBufferAB(offset=" + this.offset + ",markedOffset=" + this.markedOffset + ",limit=" + this.limit + ",capacity=" + this.capacity() + ")";
1279
1284
  switch (typeof t == "number" && (t = "utf8", e = t, r = e), t) {
@@ -1293,7 +1298,7 @@ function dt() {
1293
1298
  throw Error("Unsupported encoding: " + t);
1294
1299
  }
1295
1300
  };
1296
- var T = function() {
1301
+ var I = function() {
1297
1302
  for (var t = {}, e = [
1298
1303
  65,
1299
1304
  66,
@@ -1359,26 +1364,26 @@ function dt() {
1359
1364
  57,
1360
1365
  43,
1361
1366
  47
1362
- ], r = [], s = 0, o = e.length; s < o; ++s)
1363
- r[e[s]] = s;
1367
+ ], r = [], a = 0, o = e.length; a < o; ++a)
1368
+ r[e[a]] = a;
1364
1369
  return t.encode = function(u, l) {
1365
- for (var g, F; (g = u()) !== null; )
1366
- l(e[g >> 2 & 63]), F = (g & 3) << 4, (g = u()) !== null ? (F |= g >> 4 & 15, l(e[(F | g >> 4 & 15) & 63]), F = (g & 15) << 2, (g = u()) !== null ? (l(e[(F | g >> 6 & 3) & 63]), l(e[g & 63])) : (l(e[F & 63]), l(61))) : (l(e[F & 63]), l(61), l(61));
1370
+ for (var p, F; (p = u()) !== null; )
1371
+ l(e[p >> 2 & 63]), F = (p & 3) << 4, (p = u()) !== null ? (F |= p >> 4 & 15, l(e[(F | p >> 4 & 15) & 63]), F = (p & 15) << 2, (p = u()) !== null ? (l(e[(F | p >> 6 & 3) & 63]), l(e[p & 63])) : (l(e[F & 63]), l(61))) : (l(e[F & 63]), l(61), l(61));
1367
1372
  }, t.decode = function(u, l) {
1368
- var g, F, S;
1369
- function A(L) {
1370
- throw Error("Illegal character code: " + L);
1373
+ var p, F, S;
1374
+ function N(_) {
1375
+ throw Error("Illegal character code: " + _);
1371
1376
  }
1372
- for (; (g = u()) !== null; )
1373
- if (F = r[g], typeof F > "u" && A(g), (g = u()) !== null && (S = r[g], typeof S > "u" && A(g), l(F << 2 >>> 0 | (S & 48) >> 4), (g = u()) !== null)) {
1374
- if (F = r[g], typeof F > "u") {
1375
- if (g === 61) break;
1376
- A(g);
1377
+ for (; (p = u()) !== null; )
1378
+ if (F = r[p], typeof F > "u" && N(p), (p = u()) !== null && (S = r[p], typeof S > "u" && N(p), l(F << 2 >>> 0 | (S & 48) >> 4), (p = u()) !== null)) {
1379
+ if (F = r[p], typeof F > "u") {
1380
+ if (p === 61) break;
1381
+ N(p);
1377
1382
  }
1378
- if (l((S & 15) << 4 >>> 0 | (F & 60) >> 2), (g = u()) !== null) {
1379
- if (S = r[g], typeof S > "u") {
1380
- if (g === 61) break;
1381
- A(g);
1383
+ if (l((S & 15) << 4 >>> 0 | (F & 60) >> 2), (p = u()) !== null) {
1384
+ if (S = r[p], typeof S > "u") {
1385
+ if (p === 61) break;
1386
+ N(p);
1382
1387
  }
1383
1388
  l((F & 3) << 6 >>> 0 | S);
1384
1389
  }
@@ -1387,44 +1392,44 @@ function dt() {
1387
1392
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u);
1388
1393
  }, t;
1389
1394
  }();
1390
- a.toBase64 = function(t, e) {
1395
+ s.toBase64 = function(t, e) {
1391
1396
  if (typeof t > "u" && (t = this.offset), typeof e > "u" && (e = this.limit), t = t | 0, e = e | 0, t < 0 || e > this.capacity || t > e)
1392
1397
  throw RangeError("begin, end");
1393
1398
  var r;
1394
- return T.encode((function() {
1399
+ return I.encode((function() {
1395
1400
  return t < e ? this.view[t++] : null;
1396
- }).bind(this), r = b()), r();
1401
+ }).bind(this), r = E()), r();
1397
1402
  }, n.fromBase64 = function(t, e) {
1398
1403
  if (typeof t != "string")
1399
1404
  throw TypeError("str");
1400
- var r = new n(t.length / 4 * 3, e), s = 0;
1401
- return T.decode(y(t), function(o) {
1402
- r.view[s++] = o;
1403
- }), r.limit = s, r;
1405
+ var r = new n(t.length / 4 * 3, e), a = 0;
1406
+ return I.decode(d(t), function(o) {
1407
+ r.view[a++] = o;
1408
+ }), r.limit = a, r;
1404
1409
  }, n.btoa = function(t) {
1405
1410
  return n.fromBinary(t).toBase64();
1406
1411
  }, n.atob = function(t) {
1407
1412
  return n.fromBase64(t).toBinary();
1408
- }, a.toBinary = function(t, e) {
1413
+ }, s.toBinary = function(t, e) {
1409
1414
  if (typeof t > "u" && (t = this.offset), typeof e > "u" && (e = this.limit), t |= 0, e |= 0, t < 0 || e > this.capacity() || t > e)
1410
1415
  throw RangeError("begin, end");
1411
1416
  if (t === e)
1412
1417
  return "";
1413
- for (var r = [], s = []; t < e; )
1414
- r.push(this.view[t++]), r.length >= 1024 && (s.push(String.fromCharCode.apply(String, r)), r = []);
1415
- return s.join("") + String.fromCharCode.apply(String, r);
1418
+ for (var r = [], a = []; t < e; )
1419
+ r.push(this.view[t++]), r.length >= 1024 && (a.push(String.fromCharCode.apply(String, r)), r = []);
1420
+ return a.join("") + String.fromCharCode.apply(String, r);
1416
1421
  }, n.fromBinary = function(t, e) {
1417
1422
  if (typeof t != "string")
1418
1423
  throw TypeError("str");
1419
- for (var r = 0, s = t.length, o, u = new n(s, e); r < s; ) {
1424
+ for (var r = 0, a = t.length, o, u = new n(a, e); r < a; ) {
1420
1425
  if (o = t.charCodeAt(r), o > 255)
1421
1426
  throw RangeError("illegal char code: " + o);
1422
1427
  u.view[r++] = o;
1423
1428
  }
1424
- return u.limit = s, u;
1425
- }, a.toDebug = function(t) {
1426
- for (var e = -1, r = this.buffer.byteLength, s, o = "", u = "", l = ""; e < r; ) {
1427
- if (e !== -1 && (s = this.view[e], s < 16 ? o += "0" + s.toString(16).toUpperCase() : o += s.toString(16).toUpperCase(), t && (u += s > 32 && s < 127 ? String.fromCharCode(s) : ".")), ++e, t && e > 0 && e % 16 === 0 && e !== r) {
1429
+ return u.limit = a, u;
1430
+ }, s.toDebug = function(t) {
1431
+ for (var e = -1, r = this.buffer.byteLength, a, o = "", u = "", l = ""; e < r; ) {
1432
+ if (e !== -1 && (a = this.view[e], a < 16 ? o += "0" + a.toString(16).toUpperCase() : o += a.toString(16).toUpperCase(), t && (u += a > 32 && a < 127 ? String.fromCharCode(a) : ".")), ++e, t && e > 0 && e % 16 === 0 && e !== r) {
1428
1433
  for (; o.length < 3 * 16 + 3; ) o += " ";
1429
1434
  l += o + u + `
1430
1435
  `, o = u = "";
@@ -1439,75 +1444,75 @@ function dt() {
1439
1444
  }
1440
1445
  return t ? l : o;
1441
1446
  }, n.fromDebug = function(t, e, r) {
1442
- for (var s = t.length, o = new n((s + 1) / 3 | 0, e, r), u = 0, l = 0, g, F, S = !1, A = !1, L = !1, _ = !1, d = !1; u < s; ) {
1443
- switch (g = t.charAt(u++)) {
1447
+ for (var a = t.length, o = new n((a + 1) / 3 | 0, e, r), u = 0, l = 0, p, F, S = !1, N = !1, _ = !1, L = !1, y = !1; u < a; ) {
1448
+ switch (p = t.charAt(u++)) {
1444
1449
  case "!":
1445
1450
  if (!r) {
1446
- if (A || L || _) {
1447
- d = !0;
1451
+ if (N || _ || L) {
1452
+ y = !0;
1448
1453
  break;
1449
1454
  }
1450
- A = L = _ = !0;
1455
+ N = _ = L = !0;
1451
1456
  }
1452
1457
  o.offset = o.markedOffset = o.limit = l, S = !1;
1453
1458
  break;
1454
1459
  case "|":
1455
1460
  if (!r) {
1456
- if (A || _) {
1457
- d = !0;
1461
+ if (N || L) {
1462
+ y = !0;
1458
1463
  break;
1459
1464
  }
1460
- A = _ = !0;
1465
+ N = L = !0;
1461
1466
  }
1462
1467
  o.offset = o.limit = l, S = !1;
1463
1468
  break;
1464
1469
  case "[":
1465
1470
  if (!r) {
1466
- if (A || L) {
1467
- d = !0;
1471
+ if (N || _) {
1472
+ y = !0;
1468
1473
  break;
1469
1474
  }
1470
- A = L = !0;
1475
+ N = _ = !0;
1471
1476
  }
1472
1477
  o.offset = o.markedOffset = l, S = !1;
1473
1478
  break;
1474
1479
  case "<":
1475
1480
  if (!r) {
1476
- if (A) {
1477
- d = !0;
1481
+ if (N) {
1482
+ y = !0;
1478
1483
  break;
1479
1484
  }
1480
- A = !0;
1485
+ N = !0;
1481
1486
  }
1482
1487
  o.offset = l, S = !1;
1483
1488
  break;
1484
1489
  case "]":
1485
1490
  if (!r) {
1486
- if (_ || L) {
1487
- d = !0;
1491
+ if (L || _) {
1492
+ y = !0;
1488
1493
  break;
1489
1494
  }
1490
- _ = L = !0;
1495
+ L = _ = !0;
1491
1496
  }
1492
1497
  o.limit = o.markedOffset = l, S = !1;
1493
1498
  break;
1494
1499
  case ">":
1495
1500
  if (!r) {
1496
- if (_) {
1497
- d = !0;
1501
+ if (L) {
1502
+ y = !0;
1498
1503
  break;
1499
1504
  }
1500
- _ = !0;
1505
+ L = !0;
1501
1506
  }
1502
1507
  o.limit = l, S = !1;
1503
1508
  break;
1504
1509
  case "'":
1505
1510
  if (!r) {
1506
- if (L) {
1507
- d = !0;
1511
+ if (_) {
1512
+ y = !0;
1508
1513
  break;
1509
1514
  }
1510
- L = !0;
1515
+ _ = !0;
1511
1516
  }
1512
1517
  o.markedOffset = l, S = !1;
1513
1518
  break;
@@ -1516,24 +1521,24 @@ function dt() {
1516
1521
  break;
1517
1522
  default:
1518
1523
  if (!r && S) {
1519
- d = !0;
1524
+ y = !0;
1520
1525
  break;
1521
1526
  }
1522
- if (F = parseInt(g + t.charAt(u++), 16), !r && (isNaN(F) || F < 0 || F > 255))
1527
+ if (F = parseInt(p + t.charAt(u++), 16), !r && (isNaN(F) || F < 0 || F > 255))
1523
1528
  throw TypeError("Illegal str: Not a debug encoded string");
1524
1529
  o.view[l++] = F, S = !0;
1525
1530
  }
1526
- if (d)
1531
+ if (y)
1527
1532
  throw TypeError("Illegal str: Invalid symbol at " + u);
1528
1533
  }
1529
1534
  if (!r) {
1530
- if (!A || !_)
1535
+ if (!N || !L)
1531
1536
  throw TypeError("Illegal str: Missing offset or limit");
1532
1537
  if (l < o.buffer.byteLength)
1533
- throw TypeError("Illegal str: Not a debug encoded string (is it hex?) " + l + " < " + s);
1538
+ throw TypeError("Illegal str: Not a debug encoded string (is it hex?) " + l + " < " + a);
1534
1539
  }
1535
1540
  return o;
1536
- }, a.toHex = function(t, e) {
1541
+ }, s.toHex = function(t, e) {
1537
1542
  if (t = typeof t > "u" ? this.offset : t, e = typeof e > "u" ? this.limit : e, !this.noAssert) {
1538
1543
  if (typeof t != "number" || t % 1 !== 0)
1539
1544
  throw TypeError("Illegal begin: Not an integer");
@@ -1542,8 +1547,8 @@ function dt() {
1542
1547
  if (e >>>= 0, t < 0 || t > e || e > this.buffer.byteLength)
1543
1548
  throw RangeError("Illegal range: 0 <= " + t + " <= " + e + " <= " + this.buffer.byteLength);
1544
1549
  }
1545
- for (var r = new Array(e - t), s; t < e; )
1546
- s = this.view[t++], s < 16 ? r.push("0", s.toString(16)) : r.push(s.toString(16));
1550
+ for (var r = new Array(e - t), a; t < e; )
1551
+ a = this.view[t++], a < 16 ? r.push("0", a.toString(16)) : r.push(a.toString(16));
1547
1552
  return r.join("");
1548
1553
  }, n.fromHex = function(t, e, r) {
1549
1554
  if (!r) {
@@ -1552,73 +1557,73 @@ function dt() {
1552
1557
  if (t.length % 2 !== 0)
1553
1558
  throw TypeError("Illegal str: Length not a multiple of 2");
1554
1559
  }
1555
- for (var s = t.length, o = new n(s / 2 | 0, e), u, l = 0, g = 0; l < s; l += 2) {
1560
+ for (var a = t.length, o = new n(a / 2 | 0, e), u, l = 0, p = 0; l < a; l += 2) {
1556
1561
  if (u = parseInt(t.substring(l, l + 2), 16), !r && (!isFinite(u) || u < 0 || u > 255))
1557
1562
  throw TypeError("Illegal str: Contains non-hex characters");
1558
- o.view[g++] = u;
1563
+ o.view[p++] = u;
1559
1564
  }
1560
- return o.limit = g, o;
1565
+ return o.limit = p, o;
1561
1566
  };
1562
- var m = function() {
1567
+ var v = function() {
1563
1568
  var t = {};
1564
1569
  return t.MAX_CODEPOINT = 1114111, t.encodeUTF8 = function(e, r) {
1565
- var s = null;
1566
- for (typeof e == "number" && (s = e, e = function() {
1570
+ var a = null;
1571
+ for (typeof e == "number" && (a = e, e = function() {
1567
1572
  return null;
1568
- }); s !== null || (s = e()) !== null; )
1569
- s < 128 ? r(s & 127) : s < 2048 ? (r(s >> 6 & 31 | 192), r(s & 63 | 128)) : s < 65536 ? (r(s >> 12 & 15 | 224), r(s >> 6 & 63 | 128), r(s & 63 | 128)) : (r(s >> 18 & 7 | 240), r(s >> 12 & 63 | 128), r(s >> 6 & 63 | 128), r(s & 63 | 128)), s = null;
1573
+ }); a !== null || (a = e()) !== null; )
1574
+ a < 128 ? r(a & 127) : a < 2048 ? (r(a >> 6 & 31 | 192), r(a & 63 | 128)) : a < 65536 ? (r(a >> 12 & 15 | 224), r(a >> 6 & 63 | 128), r(a & 63 | 128)) : (r(a >> 18 & 7 | 240), r(a >> 12 & 63 | 128), r(a >> 6 & 63 | 128), r(a & 63 | 128)), a = null;
1570
1575
  }, t.decodeUTF8 = function(e, r) {
1571
- for (var s, o, u, l, g = function(F) {
1576
+ for (var a, o, u, l, p = function(F) {
1572
1577
  F = F.slice(0, F.indexOf(null));
1573
1578
  var S = Error(F.toString());
1574
1579
  throw S.name = "TruncatedError", S.bytes = F, S;
1575
- }; (s = e()) !== null; )
1576
- if ((s & 128) === 0)
1577
- r(s);
1578
- else if ((s & 224) === 192)
1579
- (o = e()) === null && g([s, o]), r((s & 31) << 6 | o & 63);
1580
- else if ((s & 240) === 224)
1581
- ((o = e()) === null || (u = e()) === null) && g([s, o, u]), r((s & 15) << 12 | (o & 63) << 6 | u & 63);
1582
- else if ((s & 248) === 240)
1583
- ((o = e()) === null || (u = e()) === null || (l = e()) === null) && g([s, o, u, l]), r((s & 7) << 18 | (o & 63) << 12 | (u & 63) << 6 | l & 63);
1584
- else throw RangeError("Illegal starting byte: " + s);
1580
+ }; (a = e()) !== null; )
1581
+ if ((a & 128) === 0)
1582
+ r(a);
1583
+ else if ((a & 224) === 192)
1584
+ (o = e()) === null && p([a, o]), r((a & 31) << 6 | o & 63);
1585
+ else if ((a & 240) === 224)
1586
+ ((o = e()) === null || (u = e()) === null) && p([a, o, u]), r((a & 15) << 12 | (o & 63) << 6 | u & 63);
1587
+ else if ((a & 248) === 240)
1588
+ ((o = e()) === null || (u = e()) === null || (l = e()) === null) && p([a, o, u, l]), r((a & 7) << 18 | (o & 63) << 12 | (u & 63) << 6 | l & 63);
1589
+ else throw RangeError("Illegal starting byte: " + a);
1585
1590
  }, t.UTF16toUTF8 = function(e, r) {
1586
- for (var s, o = null; (s = o !== null ? o : e()) !== null; ) {
1587
- if (s >= 55296 && s <= 57343 && (o = e()) !== null && o >= 56320 && o <= 57343) {
1588
- r((s - 55296) * 1024 + o - 56320 + 65536), o = null;
1591
+ for (var a, o = null; (a = o !== null ? o : e()) !== null; ) {
1592
+ if (a >= 55296 && a <= 57343 && (o = e()) !== null && o >= 56320 && o <= 57343) {
1593
+ r((a - 55296) * 1024 + o - 56320 + 65536), o = null;
1589
1594
  continue;
1590
1595
  }
1591
- r(s);
1596
+ r(a);
1592
1597
  }
1593
1598
  o !== null && r(o);
1594
1599
  }, t.UTF8toUTF16 = function(e, r) {
1595
- var s = null;
1596
- for (typeof e == "number" && (s = e, e = function() {
1600
+ var a = null;
1601
+ for (typeof e == "number" && (a = e, e = function() {
1597
1602
  return null;
1598
- }); s !== null || (s = e()) !== null; )
1599
- s <= 65535 ? r(s) : (s -= 65536, r((s >> 10) + 55296), r(s % 1024 + 56320)), s = null;
1603
+ }); a !== null || (a = e()) !== null; )
1604
+ a <= 65535 ? r(a) : (a -= 65536, r((a >> 10) + 55296), r(a % 1024 + 56320)), a = null;
1600
1605
  }, t.encodeUTF16toUTF8 = function(e, r) {
1601
- t.UTF16toUTF8(e, function(s) {
1602
- t.encodeUTF8(s, r);
1606
+ t.UTF16toUTF8(e, function(a) {
1607
+ t.encodeUTF8(a, r);
1603
1608
  });
1604
1609
  }, t.decodeUTF8toUTF16 = function(e, r) {
1605
- t.decodeUTF8(e, function(s) {
1606
- t.UTF8toUTF16(s, r);
1610
+ t.decodeUTF8(e, function(a) {
1611
+ t.UTF8toUTF16(a, r);
1607
1612
  });
1608
1613
  }, t.calculateCodePoint = function(e) {
1609
1614
  return e < 128 ? 1 : e < 2048 ? 2 : e < 65536 ? 3 : 4;
1610
1615
  }, t.calculateUTF8 = function(e) {
1611
- for (var r, s = 0; (r = e()) !== null; )
1612
- s += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
1613
- return s;
1616
+ for (var r, a = 0; (r = e()) !== null; )
1617
+ a += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
1618
+ return a;
1614
1619
  }, t.calculateUTF16asUTF8 = function(e) {
1615
- var r = 0, s = 0;
1620
+ var r = 0, a = 0;
1616
1621
  return t.UTF16toUTF8(e, function(o) {
1617
- ++r, s += o < 128 ? 1 : o < 2048 ? 2 : o < 65536 ? 3 : 4;
1618
- }), [r, s];
1622
+ ++r, a += o < 128 ? 1 : o < 2048 ? 2 : o < 65536 ? 3 : 4;
1623
+ }), [r, a];
1619
1624
  }, t;
1620
1625
  }();
1621
- return a.toUTF8 = function(t, e) {
1626
+ return s.toUTF8 = function(t, e) {
1622
1627
  if (typeof t > "u" && (t = this.offset), typeof e > "u" && (e = this.limit), !this.noAssert) {
1623
1628
  if (typeof t != "number" || t % 1 !== 0)
1624
1629
  throw TypeError("Illegal begin: Not an integer");
@@ -1629,9 +1634,9 @@ function dt() {
1629
1634
  }
1630
1635
  var r;
1631
1636
  try {
1632
- m.decodeUTF8toUTF16((function() {
1637
+ v.decodeUTF8toUTF16((function() {
1633
1638
  return t < e ? this.view[t++] : null;
1634
- }).bind(this), r = b());
1639
+ }).bind(this), r = E());
1635
1640
  } catch {
1636
1641
  if (t !== e)
1637
1642
  throw RangeError("Illegal range: Truncated data, " + t + " != " + e);
@@ -1640,16 +1645,16 @@ function dt() {
1640
1645
  }, n.fromUTF8 = function(t, e, r) {
1641
1646
  if (!r && typeof t != "string")
1642
1647
  throw TypeError("Illegal str: Not a string");
1643
- var s = new n(m.calculateUTF16asUTF8(y(t), !0)[1], e, r), o = 0;
1644
- return m.encodeUTF16toUTF8(y(t), function(u) {
1645
- s.view[o++] = u;
1646
- }), s.limit = o, s;
1648
+ var a = new n(v.calculateUTF16asUTF8(d(t), !0)[1], e, r), o = 0;
1649
+ return v.encodeUTF16toUTF8(d(t), function(u) {
1650
+ a.view[o++] = u;
1651
+ }), a.limit = o, a;
1647
1652
  }, n;
1648
1653
  });
1649
- }(W)), W.exports;
1654
+ }(K)), K.exports;
1650
1655
  }
1651
- var yt = dt();
1652
- const q = /* @__PURE__ */ ct(yt), wt = 1, Et = 2, bt = 512, Ft = 513, Tt = 514, vt = 1, It = 3;
1656
+ var Ft = Et();
1657
+ const q = /* @__PURE__ */ dt(Ft), Tt = 1, It = 2, vt = 512, mt = 513, xt = 514, St = 1, Ut = 3;
1653
1658
  class H {
1654
1659
  // 实例属性的类型标注
1655
1660
  valueStringPool;
@@ -1670,10 +1675,10 @@ class H {
1670
1675
  * @returns {ByteBuffer}
1671
1676
  */
1672
1677
  static readBytes(i, n) {
1673
- const a = new Uint8Array(n);
1678
+ const s = new Uint8Array(n);
1674
1679
  for (let c = 0; c < n; c++)
1675
- a[c] = i.readUint8();
1676
- return q.wrap(a, "binary", !0);
1680
+ s[c] = i.readUint8();
1681
+ return q.wrap(s, "binary", !0);
1677
1682
  }
1678
1683
  /**
1679
1684
  *
@@ -1681,33 +1686,33 @@ class H {
1681
1686
  * @return {Record<string, string[]>}
1682
1687
  */
1683
1688
  processResourceTable(i) {
1684
- const n = q.wrap(i, "binary", !0), a = n.readShort(), c = n.readShort(), w = n.readInt(), y = n.readInt();
1685
- let b, v;
1686
- if (a !== Et)
1689
+ const n = q.wrap(i, "binary", !0), s = n.readShort(), c = n.readShort(), w = n.readInt(), d = n.readInt();
1690
+ let E, T;
1691
+ if (s !== It)
1687
1692
  throw new Error("No RES_TABLE_TYPE found!");
1688
1693
  if (w !== n.limit)
1689
1694
  throw new Error("The buffer size not matches to the resource table size.");
1690
1695
  n.offset = c;
1691
- let N = 0, T = 0;
1696
+ let U = 0, I = 0;
1692
1697
  for (; ; ) {
1693
- let m, t, e;
1698
+ let v, t, e;
1694
1699
  try {
1695
- m = n.offset, t = n.readShort(), n.readShort(), e = n.readInt();
1700
+ v = n.offset, t = n.readShort(), n.readShort(), e = n.readInt();
1696
1701
  } catch {
1697
1702
  break;
1698
1703
  }
1699
- if (t === wt)
1700
- N === 0 && (b = new q(e), n.offset = m, n.prependTo(b), v = q.wrap(b, "binary", !0), v.LE(), this.valueStringPool = this.processStringPool(v)), N++;
1701
- else if (t === bt)
1702
- b = new q(e), n.offset = m, n.prependTo(b), v = q.wrap(b, "binary", !0), v.LE(), this.processPackage(v), T++;
1704
+ if (t === Tt)
1705
+ U === 0 && (E = new q(e), n.offset = v, n.prependTo(E), T = q.wrap(E, "binary", !0), T.LE(), this.valueStringPool = this.processStringPool(T)), U++;
1706
+ else if (t === vt)
1707
+ E = new q(e), n.offset = v, n.prependTo(E), T = q.wrap(E, "binary", !0), T.LE(), this.processPackage(T), I++;
1703
1708
  else
1704
1709
  throw new Error("Unsupported type");
1705
- if (n.offset = m + e, !n.remaining())
1710
+ if (n.offset = v + e, !n.remaining())
1706
1711
  break;
1707
1712
  }
1708
- if (N !== 1)
1713
+ if (U !== 1)
1709
1714
  throw new Error("More than 1 string pool found!");
1710
- if (T !== y)
1715
+ if (I !== d)
1711
1716
  throw new Error("Real package count not equals the declared count.");
1712
1717
  return this.responseMap;
1713
1718
  }
@@ -1719,33 +1724,33 @@ class H {
1719
1724
  i.readShort();
1720
1725
  const n = i.readShort();
1721
1726
  i.readInt();
1722
- const a = i.readInt();
1723
- this.package_id = a;
1724
- for (let m = 0; m < 256; ++m)
1727
+ const s = i.readInt();
1728
+ this.package_id = s;
1729
+ for (let v = 0; v < 256; ++v)
1725
1730
  i.readUint8();
1726
1731
  const c = i.readInt();
1727
1732
  i.readInt();
1728
1733
  const w = i.readInt();
1729
1734
  if (i.readInt(), c !== n)
1730
1735
  throw new Error("TypeStrings must immediately following the package structure header.");
1731
- let y = i.offset;
1736
+ let d = i.offset;
1732
1737
  i.offset = c;
1733
- const b = H.readBytes(i, i.limit - i.offset);
1734
- i.offset = y, this.typeStringPool = this.processStringPool(b), i.offset = w, i.readShort(), i.readShort();
1735
- const v = i.readInt();
1736
- y = i.offset, i.offset = w;
1737
- const N = H.readBytes(i, i.limit - i.offset);
1738
- i.offset = y, this.keyStringPool = this.processStringPool(N), i.offset = w + v;
1739
- let T;
1738
+ const E = H.readBytes(i, i.limit - i.offset);
1739
+ i.offset = d, this.typeStringPool = this.processStringPool(E), i.offset = w, i.readShort(), i.readShort();
1740
+ const T = i.readInt();
1741
+ d = i.offset, i.offset = w;
1742
+ const U = H.readBytes(i, i.limit - i.offset);
1743
+ i.offset = d, this.keyStringPool = this.processStringPool(U), i.offset = w + T;
1744
+ let I;
1740
1745
  for (; ; ) {
1741
- const m = i.offset;
1746
+ const v = i.offset;
1742
1747
  let t, e;
1743
1748
  try {
1744
1749
  t = i.readShort(), i.readShort(), e = i.readInt();
1745
1750
  } catch {
1746
1751
  break;
1747
1752
  }
1748
- if (t === Tt ? (i.offset = m, T = H.readBytes(i, e), this.processTypeSpec(T)) : t === Ft && (i.offset = m, T = H.readBytes(i, e), this.processType(T)), e === 0 || (i.offset = m + e, !i.remaining()))
1753
+ if (t === xt ? (i.offset = v, I = H.readBytes(i, e), this.processTypeSpec(I)) : t === mt && (i.offset = v, I = H.readBytes(i, e), this.processType(I)), e === 0 || (i.offset = v + e, !i.remaining()))
1749
1754
  break;
1750
1755
  }
1751
1756
  }
@@ -1757,30 +1762,30 @@ class H {
1757
1762
  i.readShort();
1758
1763
  const n = i.readShort();
1759
1764
  i.readInt();
1760
- const a = i.readByte();
1765
+ const s = i.readByte();
1761
1766
  i.readByte(), i.readShort();
1762
- const c = i.readInt(), w = i.readInt(), y = {};
1767
+ const c = i.readInt(), w = i.readInt(), d = {};
1763
1768
  if (i.readInt(), i.offset = n, n + c * 4 !== w)
1764
1769
  throw new Error("HeaderSize, entryCount and entriesStart are not valid.");
1765
- const b = new Array(c);
1766
- for (let v = 0; v < c; ++v)
1767
- b[v] = i.readInt();
1768
- for (let v = 0; v < c; ++v) {
1769
- if (b[v] === -1) continue;
1770
- const N = this.package_id << 24 | a << 16 | v, T = i.offset;
1771
- let m, t, e, r;
1770
+ const E = new Array(c);
1771
+ for (let T = 0; T < c; ++T)
1772
+ E[T] = i.readInt();
1773
+ for (let T = 0; T < c; ++T) {
1774
+ if (E[T] === -1) continue;
1775
+ const U = this.package_id << 24 | s << 16 | T, I = i.offset;
1776
+ let v, t, e, r;
1772
1777
  try {
1773
- i.readShort(), m = i.readShort(), t = i.readInt();
1778
+ i.readShort(), v = i.readShort(), t = i.readInt();
1774
1779
  } catch {
1775
1780
  break;
1776
1781
  }
1777
- if ((m & 1) === 0) {
1782
+ if ((v & 1) === 0) {
1778
1783
  i.readShort(), i.readByte(), e = i.readByte(), r = i.readInt();
1779
- const o = Number(N).toString(16), u = this.keyStringPool[t];
1784
+ const o = Number(U).toString(16), u = this.keyStringPool[t];
1780
1785
  let l = null;
1781
- const g = parseInt(o, 16);
1782
- let F = this.entryMap[g];
1783
- F == null && (F = []), F.push(u), this.entryMap[g] = F, e === It ? l = this.valueStringPool[r] : e === vt ? y[o] = r : l = "" + r, this.putIntoMap("@" + o, l), i.offset = T + 8 + 8;
1786
+ const p = parseInt(o, 16);
1787
+ let F = this.entryMap[p];
1788
+ F == null && (F = []), F.push(u), this.entryMap[p] = F, e === Ut ? l = this.valueStringPool[r] : e === St ? d[o] = r : l = "" + r, this.putIntoMap("@" + o, l), i.offset = I + 8 + 8;
1784
1789
  } else {
1785
1790
  i.readInt();
1786
1791
  const o = i.readInt();
@@ -1788,11 +1793,11 @@ class H {
1788
1793
  i.readInt(), i.readShort(), i.readByte(), e = i.readByte(), r = i.readInt();
1789
1794
  }
1790
1795
  }
1791
- for (const v in y) {
1792
- const N = this.responseMap["@" + Number(y[v]).toString(16).toUpperCase()];
1793
- if (N != null && Object.keys(N).length < 1e3)
1794
- for (const T of N)
1795
- this.putIntoMap("@" + v, T);
1796
+ for (const T in d) {
1797
+ const U = this.responseMap["@" + Number(d[T]).toString(16).toUpperCase()];
1798
+ if (U != null && Object.keys(U).length < 1e3)
1799
+ for (const I of U)
1800
+ this.putIntoMap("@" + T, I);
1796
1801
  }
1797
1802
  }
1798
1803
  /**
@@ -1804,36 +1809,36 @@ class H {
1804
1809
  i.readShort(), i.readShort(), i.readInt();
1805
1810
  const n = i.readInt();
1806
1811
  i.readInt();
1807
- const a = i.readInt(), c = i.readInt();
1812
+ const s = i.readInt(), c = i.readInt();
1808
1813
  i.readInt();
1809
- let w, y;
1810
- const b = (a & 256) !== 0, v = new Array(n);
1811
- for (let T = 0; T < n; ++T)
1812
- v[T] = i.readInt();
1813
- const N = new Array(n);
1814
- for (let T = 0; T < n; ++T) {
1815
- const m = c + v[T];
1816
- if (i.offset = m, N[T] = "", b) {
1814
+ let w, d;
1815
+ const E = (s & 256) !== 0, T = new Array(n);
1816
+ for (let I = 0; I < n; ++I)
1817
+ T[I] = i.readInt();
1818
+ const U = new Array(n);
1819
+ for (let I = 0; I < n; ++I) {
1820
+ const v = c + T[I];
1821
+ if (i.offset = v, U[I] = "", E) {
1817
1822
  w = i.readUint8(), (w & 128) !== 0 && (w = ((w & 127) << 8) + i.readUint8());
1818
1823
  let t = i.readUint8();
1819
1824
  if ((t & 128) !== 0 && (t = ((t & 127) << 8) + i.readUint8()), t > 0) {
1820
- y = H.readBytes(i, t);
1825
+ d = H.readBytes(i, t);
1821
1826
  try {
1822
- N[T] = q.wrap(y, "utf8", !0).toString("utf8");
1827
+ U[I] = q.wrap(d, "utf8", !0).toString("utf8");
1823
1828
  } catch {
1824
1829
  }
1825
1830
  } else
1826
- N[T] = "";
1831
+ U[I] = "";
1827
1832
  } else if (w = i.readUint16(), (w & 32768) !== 0 && (w = ((w & 32767) << 16) + i.readUint16()), w > 0) {
1828
1833
  const t = w * 2;
1829
- y = H.readBytes(i, t);
1834
+ d = H.readBytes(i, t);
1830
1835
  try {
1831
- N[T] = q.wrap(y, "utf8", !0).toString("utf8");
1836
+ U[I] = q.wrap(d, "utf8", !0).toString("utf8");
1832
1837
  } catch {
1833
1838
  }
1834
1839
  }
1835
1840
  }
1836
- return N;
1841
+ return U;
1837
1842
  }
1838
1843
  /**
1839
1844
  *
@@ -1841,9 +1846,9 @@ class H {
1841
1846
  */
1842
1847
  processTypeSpec(i) {
1843
1848
  i.readShort(), i.readShort(), i.readInt(), i.readByte(), i.readByte(), i.readShort();
1844
- const n = i.readInt(), a = new Array(n);
1849
+ const n = i.readInt(), s = new Array(n);
1845
1850
  for (let c = 0; c < n; ++c)
1846
- a[c] = i.readInt();
1851
+ s[c] = i.readInt();
1847
1852
  }
1848
1853
  /**
1849
1854
  *
@@ -1851,8 +1856,8 @@ class H {
1851
1856
  * @param {string | null} value - 资源值,可能是 null
1852
1857
  */
1853
1858
  putIntoMap(i, n) {
1854
- const a = i.toUpperCase();
1855
- this.responseMap[a] == null && (this.responseMap[a] = []), n && this.responseMap[a].push(n);
1859
+ const s = i.toUpperCase();
1860
+ this.responseMap[s] == null && (this.responseMap[s] = []), n && this.responseMap[s].push(n);
1856
1861
  }
1857
1862
  }
1858
1863
  const V = {
@@ -1869,10 +1874,10 @@ const V = {
1869
1874
  XML_END_ELEMENT: 259,
1870
1875
  XML_CDATA: 260,
1871
1876
  XML_RESOURCE_MAP: 384
1872
- }, Z = {
1877
+ }, G = {
1873
1878
  SORTED: 1,
1874
1879
  UTF8: 256
1875
- }, O = {
1880
+ }, R = {
1876
1881
  COMPLEX_UNIT_DIP: 1,
1877
1882
  COMPLEX_UNIT_FRACTION: 0,
1878
1883
  COMPLEX_UNIT_FRACTION_PARENT: 1,
@@ -1894,7 +1899,7 @@ const V = {
1894
1899
  TYPE_REFERENCE: 1,
1895
1900
  TYPE_STRING: 3
1896
1901
  };
1897
- class mt {
1902
+ class At {
1898
1903
  view;
1899
1904
  // Use DataView for reading little-endian data
1900
1905
  cursor;
@@ -1952,24 +1957,24 @@ class mt {
1952
1957
  unit: null,
1953
1958
  rawUnit: 0
1954
1959
  // Will be overwritten
1955
- }, n = this.readU32(), a = n & 255;
1956
- switch (i.value = n >> 8, i.rawUnit = a, a) {
1957
- case O.COMPLEX_UNIT_MM:
1960
+ }, n = this.readU32(), s = n & 255;
1961
+ switch (i.value = n >> 8, i.rawUnit = s, s) {
1962
+ case R.COMPLEX_UNIT_MM:
1958
1963
  i.unit = "mm";
1959
1964
  break;
1960
- case O.COMPLEX_UNIT_PX:
1965
+ case R.COMPLEX_UNIT_PX:
1961
1966
  i.unit = "px";
1962
1967
  break;
1963
- case O.COMPLEX_UNIT_DIP:
1968
+ case R.COMPLEX_UNIT_DIP:
1964
1969
  i.unit = "dp";
1965
1970
  break;
1966
- case O.COMPLEX_UNIT_SP:
1971
+ case R.COMPLEX_UNIT_SP:
1967
1972
  i.unit = "sp";
1968
1973
  break;
1969
- case O.COMPLEX_UNIT_PT:
1974
+ case R.COMPLEX_UNIT_PT:
1970
1975
  i.unit = "pt";
1971
1976
  break;
1972
- case O.COMPLEX_UNIT_IN:
1977
+ case R.COMPLEX_UNIT_IN:
1973
1978
  i.unit = "in";
1974
1979
  break;
1975
1980
  }
@@ -1983,12 +1988,12 @@ class mt {
1983
1988
  type: null,
1984
1989
  rawType: 0
1985
1990
  // Will be overwritten
1986
- }, n = this.readU32(), a = n & 15;
1987
- switch (i.value = this.convertIntToFloat(n >> 4), i.rawType = a, a) {
1988
- case O.COMPLEX_UNIT_FRACTION:
1991
+ }, n = this.readU32(), s = n & 15;
1992
+ switch (i.value = this.convertIntToFloat(n >> 4), i.rawType = s, s) {
1993
+ case R.COMPLEX_UNIT_FRACTION:
1989
1994
  i.type = "%";
1990
1995
  break;
1991
- case O.COMPLEX_UNIT_FRACTION_PARENT:
1996
+ case R.COMPLEX_UNIT_FRACTION_PARENT:
1992
1997
  i.type = "%p";
1993
1998
  break;
1994
1999
  }
@@ -2012,57 +2017,57 @@ class mt {
2012
2017
  rawType: 0
2013
2018
  // Will be overwritten
2014
2019
  }, n = this.cursor;
2015
- let a = this.readU16();
2020
+ let s = this.readU16();
2016
2021
  this.readU8();
2017
2022
  const c = this.readU8();
2018
- switch (a === 0 && (a = 8), i.rawType = c, c) {
2019
- case O.TYPE_INT_DEC:
2023
+ switch (s === 0 && (s = 8), i.rawType = c, c) {
2024
+ case R.TYPE_INT_DEC:
2020
2025
  i.value = this.readS32(), i.type = "int_dec";
2021
2026
  break;
2022
- case O.TYPE_INT_HEX:
2027
+ case R.TYPE_INT_HEX:
2023
2028
  i.value = this.readS32(), i.type = "int_hex";
2024
2029
  break;
2025
- case O.TYPE_STRING:
2026
- const y = this.readS32();
2027
- i.value = y >= 0 ? this.strings[y] : "", i.type = "string";
2030
+ case R.TYPE_STRING:
2031
+ const d = this.readS32();
2032
+ i.value = d >= 0 ? this.strings[d] : "", i.type = "string";
2028
2033
  break;
2029
- case O.TYPE_REFERENCE:
2030
- const b = this.readU32();
2031
- i.value = `resourceId:0x${b.toString(16)}`, i.type = "reference";
2034
+ case R.TYPE_REFERENCE:
2035
+ const E = this.readU32();
2036
+ i.value = `resourceId:0x${E.toString(16)}`, i.type = "reference";
2032
2037
  break;
2033
- case O.TYPE_INT_BOOLEAN:
2038
+ case R.TYPE_INT_BOOLEAN:
2034
2039
  i.value = this.readS32() !== 0, i.type = "boolean";
2035
2040
  break;
2036
- case O.TYPE_NULL:
2041
+ case R.TYPE_NULL:
2037
2042
  this.readU32(), i.value = null, i.type = "null";
2038
2043
  break;
2039
- case O.TYPE_INT_COLOR_RGB8:
2044
+ case R.TYPE_INT_COLOR_RGB8:
2040
2045
  i.value = this.readHex24(), i.type = "rgb8";
2041
2046
  break;
2042
- case O.TYPE_INT_COLOR_RGB4:
2047
+ case R.TYPE_INT_COLOR_RGB4:
2043
2048
  i.value = this.readHex24(), i.type = "rgb4";
2044
2049
  break;
2045
- case O.TYPE_INT_COLOR_ARGB8:
2050
+ case R.TYPE_INT_COLOR_ARGB8:
2046
2051
  i.value = this.readHex32(), i.type = "argb8";
2047
2052
  break;
2048
- case O.TYPE_INT_COLOR_ARGB4:
2053
+ case R.TYPE_INT_COLOR_ARGB4:
2049
2054
  i.value = this.readHex32(), i.type = "argb4";
2050
2055
  break;
2051
- case O.TYPE_DIMENSION:
2056
+ case R.TYPE_DIMENSION:
2052
2057
  i.value = this.readDimension(), i.type = "dimension";
2053
2058
  break;
2054
- case O.TYPE_FRACTION:
2059
+ case R.TYPE_FRACTION:
2055
2060
  i.value = this.readFraction(), i.type = "fraction";
2056
2061
  break;
2057
2062
  default: {
2058
- const v = c.toString(16);
2059
- console.debug(`Not sure what to do with typed value of type 0x${v}, falling back to reading an uint32.`), i.value = this.readU32(), i.type = "unknown";
2063
+ const T = c.toString(16);
2064
+ console.debug(`Not sure what to do with typed value of type 0x${T}, falling back to reading an uint32.`), i.value = this.readU32(), i.type = "unknown";
2060
2065
  }
2061
2066
  }
2062
- const w = n + a;
2067
+ const w = n + s;
2063
2068
  if (this.cursor !== w) {
2064
- const y = c.toString(16), b = w - this.cursor;
2065
- console.debug(`Cursor is off by ${b} bytes at ${this.cursor} at supposed end of typed value of type 0x${y}. The typed value started at offset ${n} and is supposed to end at offset ${w}. Ignoring the rest of the value.`), this.cursor = w;
2069
+ const d = c.toString(16), E = w - this.cursor;
2070
+ console.debug(`Cursor is off by ${E} bytes at ${this.cursor} at supposed end of typed value of type 0x${d}. The typed value started at offset ${n} and is supposed to end at offset ${w}. Ignoring the rest of the value.`), this.cursor = w;
2066
2071
  }
2067
2072
  return this.debug && console.groupEnd(), i;
2068
2073
  }
@@ -2074,21 +2079,21 @@ class mt {
2074
2079
  // Use TextDecoder for browser compatibility
2075
2080
  readString(i) {
2076
2081
  this.debug && console.group("readString", i);
2077
- let n, a;
2082
+ let n, s;
2078
2083
  switch (i) {
2079
2084
  case "utf-8":
2080
- a = this.readLength8(), this.debug && console.debug("stringLength:", a), n = this.readLength8(), this.debug && console.debug("byteLength:", n);
2085
+ s = this.readLength8(), this.debug && console.debug("stringLength:", s), n = this.readLength8(), this.debug && console.debug("byteLength:", n);
2081
2086
  break;
2082
2087
  // Continue below to decode using TextDecoder
2083
2088
  case "ucs2":
2084
- a = this.readLength16(), this.debug && console.debug("stringLength:", a), n = a * 2, this.debug && console.debug("byteLength:", n);
2089
+ s = this.readLength16(), this.debug && console.debug("stringLength:", s), n = s * 2, this.debug && console.debug("byteLength:", n);
2085
2090
  break;
2086
2091
  // Continue below to decode using TextDecoder
2087
2092
  default:
2088
2093
  throw new Error(`Unsupported encoding '${i}'`);
2089
2094
  }
2090
- const c = new TextDecoder(i === "ucs2" ? "utf-16le" : i), w = new Uint8Array(this.view.buffer, this.cursor, n), y = c.decode(w);
2091
- return this.cursor += n, this.debug && (console.debug("value:", y), console.groupEnd()), y;
2095
+ const c = new TextDecoder(i === "ucs2" ? "utf-16le" : i), w = new Uint8Array(this.view.buffer, this.cursor, n), d = c.decode(w);
2096
+ return this.cursor += n, this.debug && (console.debug("value:", d), console.groupEnd()), d;
2092
2097
  }
2093
2098
  readChunkHeader() {
2094
2099
  this.debug && console.group("readChunkHeader");
@@ -2104,21 +2109,21 @@ class mt {
2104
2109
  if (this.debug && console.group("readStringPool"), i.stringCount = this.readU32(), this.debug && console.debug("stringCount:", i.stringCount), i.styleCount = this.readU32(), this.debug && console.debug("styleCount:", i.styleCount), i.flags = this.readU32(), this.debug && console.debug("flags:", i.flags), i.stringsStart = this.readU32(), this.debug && console.debug("stringsStart:", i.stringsStart), i.stylesStart = this.readU32(), this.debug && console.debug("stylesStart:", i.stylesStart), i.chunkType !== $.STRING_POOL)
2105
2110
  throw new Error("Invalid string pool header");
2106
2111
  const n = [];
2107
- for (let y = 0, b = i.stringCount; y < b; ++y)
2108
- this.debug && console.debug("offset:", y), n.push(this.readU32());
2109
- const a = (i.flags & Z.SORTED) === Z.SORTED;
2110
- this.debug && console.debug("sorted:", a);
2111
- const c = (i.flags & Z.UTF8) === Z.UTF8 ? "utf-8" : "ucs2";
2112
+ for (let d = 0, E = i.stringCount; d < E; ++d)
2113
+ this.debug && console.debug("offset:", d), n.push(this.readU32());
2114
+ const s = (i.flags & G.SORTED) === G.SORTED;
2115
+ this.debug && console.debug("sorted:", s);
2116
+ const c = (i.flags & G.UTF8) === G.UTF8 ? "utf-8" : "ucs2";
2112
2117
  this.debug && console.debug("encoding:", c);
2113
2118
  const w = i.startOffset + (i.stringsStart || 0);
2114
- for (let y = 0, b = i.stringCount; y < b; ++y)
2115
- this.debug && (console.debug("string:", y), console.debug("offset:", n[y])), this.cursor = w + n[y], this.strings.push(this.readString(c));
2119
+ for (let d = 0, E = i.stringCount; d < E; ++d)
2120
+ this.debug && (console.debug("string:", d), console.debug("offset:", n[d])), this.cursor = w + n[d], this.strings.push(this.readString(c));
2116
2121
  return this.cursor = i.startOffset + i.chunkSize, this.debug && console.groupEnd(), null;
2117
2122
  }
2118
2123
  readResourceMap(i) {
2119
2124
  this.debug && console.group("readResourceMap");
2120
2125
  const n = Math.floor((i.chunkSize - i.headerSize) / 4);
2121
- for (let a = 0; a < n; ++a)
2126
+ for (let s = 0; s < n; ++s)
2122
2127
  this.resources.push(this.readU32());
2123
2128
  return this.debug && console.groupEnd(), null;
2124
2129
  }
@@ -2138,11 +2143,11 @@ class mt {
2138
2143
  childNodes: []
2139
2144
  };
2140
2145
  this.readU32(), this.readU32();
2141
- const a = this.readS32(), c = this.readS32();
2142
- a >= 0 && (n.namespaceURI = this.strings[a]), c >= 0 && (n.nodeName = this.strings[c]), this.readU16(), this.readU16();
2146
+ const s = this.readS32(), c = this.readS32();
2147
+ s >= 0 && (n.namespaceURI = this.strings[s]), c >= 0 && (n.nodeName = this.strings[c]), this.readU16(), this.readU16();
2143
2148
  const w = this.readU16();
2144
2149
  this.readU16(), this.readU16(), this.readU16();
2145
- for (let y = 0; y < w; ++y)
2150
+ for (let d = 0; d < w; ++d)
2146
2151
  n.attributes.push(this.readXmlAttribute());
2147
2152
  return this.document ? (this.parent && this.parent.nodeType === V.ELEMENT_NODE && this.parent.childNodes.push(n), this.parent = n) : this.document = this.parent = n, this.stack.push(n), this.debug && console.groupEnd(), n;
2148
2153
  }
@@ -2156,8 +2161,8 @@ class mt {
2156
2161
  value: null,
2157
2162
  typedValue: {}
2158
2163
  // Will be overwritten
2159
- }, n = this.readS32(), a = this.readS32(), c = this.readS32();
2160
- return n >= 0 && (i.namespaceURI = this.strings[n]), a >= 0 && (i.nodeName = i.name = this.strings[a]), c >= 0 && (i.name === "versionName" && this.strings[c] && (this.strings[c] = this.strings[c].replace(/[^\d\w-.]/g, "")), i.value = this.strings[c]), i.typedValue = this.readTypedValue(), this.debug && console.groupEnd(), i;
2164
+ }, n = this.readS32(), s = this.readS32(), c = this.readS32();
2165
+ return n >= 0 && (i.namespaceURI = this.strings[n]), s >= 0 && (i.nodeName = i.name = this.strings[s]), c >= 0 && (i.name === "versionName" && this.strings[c] && (this.strings[c] = this.strings[c].replace(/[^\d\w-.]/g, "")), i.value = this.strings[c]), i.typedValue = this.readTypedValue(), this.debug && console.groupEnd(), i;
2161
2166
  }
2162
2167
  readXmlElementEnd(i) {
2163
2168
  return this.debug && console.group("readXmlCData", i), this.readU32(), this.readU32(), this.readS32(), this.readS32(), this.stack.pop(), this.parent = this.stack[this.stack.length - 1] || null, this.debug && console.groupEnd(), null;
@@ -2173,8 +2178,8 @@ class mt {
2173
2178
  // Will be overwritten
2174
2179
  };
2175
2180
  this.readU32(), this.readU32();
2176
- const a = this.readS32();
2177
- return a >= 0 && (n.data = this.strings[a]), n.typedValue = this.readTypedValue(), this.parent && this.parent.nodeType === V.ELEMENT_NODE && this.parent.childNodes.push(n), this.debug && console.groupEnd(), n;
2181
+ const s = this.readS32();
2182
+ return s >= 0 && (n.data = this.strings[s]), n.typedValue = this.readTypedValue(), this.parent && this.parent.nodeType === V.ELEMENT_NODE && this.parent.childNodes.push(n), this.debug && console.groupEnd(), n;
2178
2183
  }
2179
2184
  readNull(i) {
2180
2185
  return this.debug && console.group("readNull"), this.cursor += i.chunkSize - i.headerSize, this.debug && console.groupEnd(), null;
@@ -2188,47 +2193,47 @@ class mt {
2188
2193
  throw new Error("Invalid XML header");
2189
2194
  for (; this.cursor < this.view.byteLength; ) {
2190
2195
  this.debug && console.group("chunk");
2191
- const n = this.cursor, a = this.readChunkHeader();
2192
- switch (a.chunkType) {
2196
+ const n = this.cursor, s = this.readChunkHeader();
2197
+ switch (s.chunkType) {
2193
2198
  case $.STRING_POOL:
2194
- this.readStringPool(a);
2199
+ this.readStringPool(s);
2195
2200
  break;
2196
2201
  case $.XML_RESOURCE_MAP:
2197
- this.readResourceMap(a);
2202
+ this.readResourceMap(s);
2198
2203
  break;
2199
2204
  case $.XML_START_NAMESPACE:
2200
- this.readXmlNamespaceStart(a);
2205
+ this.readXmlNamespaceStart(s);
2201
2206
  break;
2202
2207
  case $.XML_END_NAMESPACE:
2203
- this.readXmlNamespaceEnd(a);
2208
+ this.readXmlNamespaceEnd(s);
2204
2209
  break;
2205
2210
  case $.XML_START_ELEMENT:
2206
- this.readXmlElementStart(a);
2211
+ this.readXmlElementStart(s);
2207
2212
  break;
2208
2213
  case $.XML_END_ELEMENT:
2209
- this.readXmlElementEnd(a);
2214
+ this.readXmlElementEnd(s);
2210
2215
  break;
2211
2216
  case $.XML_CDATA:
2212
- this.readXmlCData(a);
2217
+ this.readXmlCData(s);
2213
2218
  break;
2214
2219
  case $.NULL:
2215
- this.readNull(a);
2220
+ this.readNull(s);
2216
2221
  break;
2217
2222
  default:
2218
- throw new Error(`Unsupported chunk type '0x${a.chunkType.toString(16)}'`);
2223
+ throw new Error(`Unsupported chunk type '0x${s.chunkType.toString(16)}'`);
2219
2224
  }
2220
- const c = n + a.chunkSize;
2225
+ const c = n + s.chunkSize;
2221
2226
  if (this.cursor !== c) {
2222
- const w = c - this.cursor, y = a.chunkType.toString(16);
2223
- console.debug(`Cursor is off by ${w} bytes at ${this.cursor} at supposed end of chunk of type 0x${y}. The chunk started at offset ${n} and is supposed to end at offset ${c}. Ignoring the rest of the chunk.`), this.cursor = c;
2227
+ const w = c - this.cursor, d = s.chunkType.toString(16);
2228
+ console.debug(`Cursor is off by ${w} bytes at ${this.cursor} at supposed end of chunk of type 0x${d}. The chunk started at offset ${n} and is supposed to end at offset ${c}. Ignoring the rest of the chunk.`), this.cursor = c;
2224
2229
  }
2225
2230
  this.debug && console.groupEnd();
2226
2231
  }
2227
2232
  return this.debug && console.groupEnd(), this.document;
2228
2233
  }
2229
2234
  }
2230
- const xt = "android.intent.action.MAIN", St = "android.intent.category.LAUNCHER";
2231
- class Nt {
2235
+ const Nt = "android.intent.action.MAIN", Lt = "android.intent.category.LAUNCHER";
2236
+ class _t {
2232
2237
  buffer;
2233
2238
  xmlParser;
2234
2239
  /**
@@ -2236,7 +2241,7 @@ class Nt {
2236
2241
  * @param options Configuration options for the underlying BinaryXmlParser.
2237
2242
  */
2238
2243
  constructor(i, n = {}) {
2239
- this.buffer = i, this.xmlParser = new mt(this.buffer, n);
2244
+ this.buffer = i, this.xmlParser = new At(this.buffer, n);
2240
2245
  }
2241
2246
  /**
2242
2247
  * Flattens the attributes of an XML element into a simple key/value object.
@@ -2247,20 +2252,20 @@ class Nt {
2247
2252
  collapseAttributes(i) {
2248
2253
  const n = /* @__PURE__ */ Object.create(null);
2249
2254
  if (i.nodeType === V.ELEMENT_NODE)
2250
- for (const a of Array.from(i.attributes))
2251
- n[a.name] = a.typedValue.value;
2255
+ for (const s of Array.from(i.attributes))
2256
+ n[s.name] = s.typedValue.value;
2252
2257
  return n;
2253
2258
  }
2254
2259
  /**
2255
2260
  * Parses child nodes of a component into intent filters and meta data.
2256
2261
  */
2257
2262
  parseIntents(i, n) {
2258
- n.intentFilters = [], n.metaData = [], i.childNodes.forEach((a) => {
2259
- if (a.nodeType === V.ELEMENT_NODE)
2260
- switch (a.nodeName) {
2263
+ n.intentFilters = [], n.metaData = [], i.childNodes.forEach((s) => {
2264
+ if (s.nodeType === V.ELEMENT_NODE)
2265
+ switch (s.nodeName) {
2261
2266
  case "intent-filter": {
2262
- const c = this.collapseAttributes(a);
2263
- c.actions = [], c.categories = [], c.data = [], a.childNodes.forEach((w) => {
2267
+ const c = this.collapseAttributes(s);
2268
+ c.actions = [], c.categories = [], c.data = [], s.childNodes.forEach((w) => {
2264
2269
  if (w.nodeType === V.ELEMENT_NODE)
2265
2270
  switch (w.nodeName) {
2266
2271
  case "action":
@@ -2277,7 +2282,7 @@ class Nt {
2277
2282
  break;
2278
2283
  }
2279
2284
  case "meta-data":
2280
- n.metaData.push(this.collapseAttributes(a));
2285
+ n.metaData.push(this.collapseAttributes(s));
2281
2286
  break;
2282
2287
  }
2283
2288
  });
@@ -2289,32 +2294,32 @@ class Nt {
2289
2294
  */
2290
2295
  parseApplication(i) {
2291
2296
  const n = this.collapseAttributes(i);
2292
- return n.activities = [], n.activityAliases = [], n.launcherActivities = [], n.services = [], n.receivers = [], n.providers = [], n.usesLibraries = [], n.metaData = [], i.childNodes.forEach((a) => {
2293
- if (a.nodeType === V.ELEMENT_NODE)
2294
- switch (a.nodeName) {
2297
+ return n.activities = [], n.activityAliases = [], n.launcherActivities = [], n.services = [], n.receivers = [], n.providers = [], n.usesLibraries = [], n.metaData = [], i.childNodes.forEach((s) => {
2298
+ if (s.nodeType === V.ELEMENT_NODE)
2299
+ switch (s.nodeName) {
2295
2300
  case "activity": {
2296
- const c = this.collapseAttributes(a);
2297
- this.parseIntents(a, c), n.activities.push(c), this.isLauncherActivity(c) && n.launcherActivities.push(c);
2301
+ const c = this.collapseAttributes(s);
2302
+ this.parseIntents(s, c), n.activities.push(c), this.isLauncherActivity(c) && n.launcherActivities.push(c);
2298
2303
  break;
2299
2304
  }
2300
2305
  case "activity-alias": {
2301
- const c = this.collapseAttributes(a);
2302
- this.parseIntents(a, c), n.activityAliases.push(c), this.isLauncherActivity(c) && n.launcherActivities.push(c);
2306
+ const c = this.collapseAttributes(s);
2307
+ this.parseIntents(s, c), n.activityAliases.push(c), this.isLauncherActivity(c) && n.launcherActivities.push(c);
2303
2308
  break;
2304
2309
  }
2305
2310
  case "service": {
2306
- const c = this.collapseAttributes(a);
2307
- this.parseIntents(a, c), n.services.push(c);
2311
+ const c = this.collapseAttributes(s);
2312
+ this.parseIntents(s, c), n.services.push(c);
2308
2313
  break;
2309
2314
  }
2310
2315
  case "receiver": {
2311
- const c = this.collapseAttributes(a);
2312
- this.parseIntents(a, c), n.receivers.push(c);
2316
+ const c = this.collapseAttributes(s);
2317
+ this.parseIntents(s, c), n.receivers.push(c);
2313
2318
  break;
2314
2319
  }
2315
2320
  case "provider": {
2316
- const c = this.collapseAttributes(a);
2317
- c.grantUriPermissions = [], c.metaData = [], c.pathPermissions = [], a.childNodes.forEach((w) => {
2321
+ const c = this.collapseAttributes(s);
2322
+ c.grantUriPermissions = [], c.metaData = [], c.pathPermissions = [], s.childNodes.forEach((w) => {
2318
2323
  if (w.nodeType === V.ELEMENT_NODE)
2319
2324
  switch (w.nodeName) {
2320
2325
  case "grant-uri-permission":
@@ -2331,10 +2336,10 @@ class Nt {
2331
2336
  break;
2332
2337
  }
2333
2338
  case "uses-library":
2334
- n.usesLibraries.push(this.collapseAttributes(a));
2339
+ n.usesLibraries.push(this.collapseAttributes(s));
2335
2340
  break;
2336
2341
  case "meta-data":
2337
- n.metaData.push(this.collapseAttributes(a));
2342
+ n.metaData.push(this.collapseAttributes(s));
2338
2343
  break;
2339
2344
  }
2340
2345
  }), n;
@@ -2346,7 +2351,7 @@ class Nt {
2346
2351
  */
2347
2352
  isLauncherActivity(i) {
2348
2353
  return i.intentFilters.some(function(n) {
2349
- return n.actions.some((c) => c.name === xt) ? n.categories.some((c) => c.name === St) : !1;
2354
+ return n.actions.some((c) => c.name === Nt) ? n.categories.some((c) => c.name === Lt) : !1;
2350
2355
  });
2351
2356
  }
2352
2357
  /**
@@ -2355,103 +2360,101 @@ class Nt {
2355
2360
  */
2356
2361
  parse() {
2357
2362
  const i = this.xmlParser.parse(), n = this.collapseAttributes(i);
2358
- return n.usesPermissions = [], n.usesPermissionsSDK23 = [], n.permissions = [], n.permissionTrees = [], n.permissionGroups = [], n.instrumentation = null, n.usesSdk = null, n.usesConfiguration = null, n.usesFeatures = [], n.supportsScreens = null, n.compatibleScreens = [], n.supportsGlTextures = [], i.childNodes.forEach((a) => {
2359
- if (a.nodeType === V.ELEMENT_NODE)
2360
- switch (a.nodeName) {
2363
+ return n.usesPermissions = [], n.usesPermissionsSDK23 = [], n.permissions = [], n.permissionTrees = [], n.permissionGroups = [], n.instrumentation = null, n.usesSdk = null, n.usesConfiguration = null, n.usesFeatures = [], n.supportsScreens = null, n.compatibleScreens = [], n.supportsGlTextures = [], i.childNodes.forEach((s) => {
2364
+ if (s.nodeType === V.ELEMENT_NODE)
2365
+ switch (s.nodeName) {
2361
2366
  case "uses-permission":
2362
- n.usesPermissions.push(this.collapseAttributes(a));
2367
+ n.usesPermissions.push(this.collapseAttributes(s));
2363
2368
  break;
2364
2369
  case "uses-permission-sdk-23":
2365
- n.usesPermissionsSDK23.push(this.collapseAttributes(a));
2370
+ n.usesPermissionsSDK23.push(this.collapseAttributes(s));
2366
2371
  break;
2367
2372
  case "permission":
2368
- n.permissions.push(this.collapseAttributes(a));
2373
+ n.permissions.push(this.collapseAttributes(s));
2369
2374
  break;
2370
2375
  case "permission-tree":
2371
- n.permissionTrees.push(this.collapseAttributes(a));
2376
+ n.permissionTrees.push(this.collapseAttributes(s));
2372
2377
  break;
2373
2378
  case "permission-group":
2374
- n.permissionGroups.push(this.collapseAttributes(a));
2379
+ n.permissionGroups.push(this.collapseAttributes(s));
2375
2380
  break;
2376
2381
  case "instrumentation":
2377
- n.instrumentation = this.collapseAttributes(a);
2382
+ n.instrumentation = this.collapseAttributes(s);
2378
2383
  break;
2379
2384
  case "uses-sdk":
2380
- n.usesSdk = this.collapseAttributes(a);
2385
+ n.usesSdk = this.collapseAttributes(s);
2381
2386
  break;
2382
2387
  case "uses-configuration":
2383
- n.usesConfiguration = this.collapseAttributes(a);
2388
+ n.usesConfiguration = this.collapseAttributes(s);
2384
2389
  break;
2385
2390
  case "uses-feature":
2386
- n.usesFeatures.push(this.collapseAttributes(a));
2391
+ n.usesFeatures.push(this.collapseAttributes(s));
2387
2392
  break;
2388
2393
  case "supports-screens":
2389
- n.supportsScreens = this.collapseAttributes(a);
2394
+ n.supportsScreens = this.collapseAttributes(s);
2390
2395
  break;
2391
2396
  case "compatible-screens":
2392
- a.childNodes.forEach((c) => {
2397
+ s.childNodes.forEach((c) => {
2393
2398
  if (c.nodeType === V.ELEMENT_NODE)
2394
2399
  return n.compatibleScreens.push(this.collapseAttributes(c));
2395
2400
  });
2396
2401
  break;
2397
2402
  case "supports-gl-texture":
2398
- n.supportsGlTextures.push(this.collapseAttributes(a));
2403
+ n.supportsGlTextures.push(this.collapseAttributes(s));
2399
2404
  break;
2400
2405
  case "application":
2401
- n.application = this.parseApplication(a);
2406
+ n.application = this.parseApplication(s);
2402
2407
  break;
2403
2408
  }
2404
2409
  }), n;
2405
2410
  }
2406
2411
  }
2407
- class Dt {
2412
+ const kt = rt.loadAsync;
2413
+ class Wt {
2408
2414
  zip;
2409
2415
  constructor(i) {
2410
- this.zip = J(i).catch(R);
2416
+ this.zip = kt(i).catch(P);
2411
2417
  }
2412
2418
  async parse(i) {
2413
2419
  const n = await this.zip;
2414
2420
  if (n instanceof Error)
2415
2421
  return new Error(`load file error: ${n.message}`);
2416
- const a = n.file("AndroidManifest.xml"), c = i?.ignoreIcon ? null : n.file("resources.arsc"), [w, y] = await Promise.all([
2417
- a?.async("arraybuffer").catch(R),
2418
- c?.async("arraybuffer").catch(R)
2422
+ const s = n.file("AndroidManifest.xml"), c = i?.ignoreIcon ? null : n.file("resources.arsc"), [w, d] = await Promise.all([
2423
+ s?.async("arraybuffer").catch(P),
2424
+ c?.async("arraybuffer").catch(P)
2419
2425
  ]);
2420
2426
  if (!w || w instanceof Error)
2421
2427
  return new Error("not found AndroidManifest.xml");
2422
- const b = Ut(w);
2423
- if (b instanceof Error)
2424
- return new Error(`parse AndroidManifest.xml error: ${b.message}`);
2425
- const v = {
2426
- package: b.package,
2427
- versionCode: b.versionCode,
2428
- versionName: b.versionName,
2429
- manifest: b
2430
- }, N = b.application?.icon;
2431
- if (!y || y instanceof Error || !N || typeof N != "string")
2432
- return v;
2433
- const T = At(y, N);
2434
- if (!T)
2435
- return v;
2436
- const m = n.file(T);
2437
- if (!m)
2438
- return v;
2439
- const t = await m.async("base64").catch(R);
2440
- return t instanceof Error || (v.icon = rt(t)), v;
2428
+ const E = Ct(w);
2429
+ if (E instanceof Error)
2430
+ return new Error(`parse AndroidManifest.xml error: ${E.message}`);
2431
+ const T = {
2432
+ package: E.package,
2433
+ versionCode: E.versionCode,
2434
+ versionName: E.versionName,
2435
+ manifest: E
2436
+ }, U = E.application?.icon;
2437
+ if (!d || d instanceof Error || !U || typeof U != "string")
2438
+ return T;
2439
+ const I = Rt(d, U);
2440
+ if (!I)
2441
+ return T;
2442
+ const v = n.file(I);
2443
+ if (!v)
2444
+ return T;
2445
+ const t = await v.async("base64").catch(P);
2446
+ return t instanceof Error || (T.icon = it(t)), T;
2441
2447
  }
2442
2448
  /**
2443
2449
  * 读取指定文件的内容
2444
2450
  */
2445
- async readFile(i) {
2446
- const n = await this.zip;
2447
- if (n instanceof Error)
2448
- return n;
2449
- const a = typeof i == "string" ? n.file(i) : n.file(i)[0];
2450
- return a ? await a.async("arraybuffer").catch(R) : new Error(`not found ${i}`);
2451
+ async readFile(i, n) {
2452
+ const s = await this.zip;
2453
+ return s instanceof Error ? new Error(`load file error: ${s.message}`) : await nt(s, i, n);
2451
2454
  }
2452
2455
  }
2453
- function Ut(p) {
2454
- const i = new Nt(p, {
2456
+ function Ct(f) {
2457
+ const i = new _t(f, {
2455
2458
  ignore: [
2456
2459
  "application.activity",
2457
2460
  "application.service",
@@ -2463,101 +2466,141 @@ function Ut(p) {
2463
2466
  try {
2464
2467
  return i.parse();
2465
2468
  } catch (n) {
2466
- return R(n);
2469
+ return P(n);
2467
2470
  }
2468
2471
  }
2469
- function At(p, i) {
2472
+ function Rt(f, i) {
2470
2473
  try {
2471
- const n = new H().processResourceTable(p), a = i.replace(/^resourceId:0x/, "@").toUpperCase();
2472
- return n[a]?.[0] || "";
2474
+ const n = new H().processResourceTable(f), s = i.replace(/^resourceId:0x/, "@").toUpperCase();
2475
+ return n[s]?.[0] || "";
2473
2476
  } catch {
2474
2477
  return "";
2475
2478
  }
2476
2479
  }
2477
- typeof globalThis < "u" || typeof self < "u" || typeof window < "u" || Function("return this")();
2478
- function G(p, ...i) {
2479
- if (!p || typeof p != "object") return !1;
2480
- const n = Object.getPrototypeOf(p);
2481
- return n !== Object.prototype && n !== null ? !1 : i.every((a) => a in p);
2480
+ const Z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
2481
+ function Ot(f) {
2482
+ return typeof f == "function";
2482
2483
  }
2483
- class _t {
2484
+ function lt(f) {
2485
+ return typeof f == "object" && f !== null;
2486
+ }
2487
+ function Pt() {
2488
+ return "wx" in Z && lt(Z.wx) && "getSystemInfo" in Z.wx && Ot(Z.wx.getSystemInfo);
2489
+ }
2490
+ function Bt() {
2491
+ return "window" in Z && lt(Z.window) && !Pt();
2492
+ }
2493
+ function W(f, ...i) {
2494
+ if (!f || typeof f != "object") return !1;
2495
+ const n = Object.getPrototypeOf(f);
2496
+ return n !== Object.prototype && n !== null ? !1 : i.every((s) => s in f);
2497
+ }
2498
+ function Mt(f) {
2499
+ const i = new DataView(f);
2500
+ if (f.byteLength < 8)
2501
+ return f;
2502
+ const n = new Uint8Array(f, 0, 8), s = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]);
2503
+ for (let r = 0; r < 8; r++)
2504
+ if (n[r] !== s[r])
2505
+ return f;
2506
+ if (f.byteLength < 20)
2507
+ return f;
2508
+ const c = 8, w = i.getUint32(c, !1), d = new Uint8Array(f, c + 4, 4);
2509
+ if (String.fromCharCode(d[0], d[1], d[2], d[3]) !== "CgBI")
2510
+ return f;
2511
+ const T = c + 12 + w;
2512
+ if (f.byteLength < T)
2513
+ return f;
2514
+ const U = f.byteLength - (12 + w), I = new ArrayBuffer(U), v = new Uint8Array(I), t = new Uint8Array(f, 0, c);
2515
+ v.set(t, 0);
2516
+ const e = new Uint8Array(f, T);
2517
+ return v.set(e, c), I;
2518
+ }
2519
+ function Dt(f) {
2520
+ const i = new Uint8Array(f);
2521
+ let n = "";
2522
+ for (let s = 0; s < i.byteLength; s++)
2523
+ n += String.fromCharCode(i[s]);
2524
+ return Bt() ? btoa(n) : Buffer.from(n, "binary").toString("base64");
2525
+ }
2526
+ class zt {
2484
2527
  constructor(i) {
2485
2528
  this.UID = i;
2486
2529
  }
2487
2530
  }
2488
- const Lt = 9783072e5, X = 100 * 1e3 * 1e3, kt = 32768;
2489
- function et(p, i, n) {
2490
- return new DataView(p, i, n);
2531
+ const Xt = 9783072e5, X = 100 * 1e3 * 1e3, Vt = 32768;
2532
+ function et(f, i, n) {
2533
+ return new DataView(f, i, n);
2491
2534
  }
2492
- function j(p, i = 0) {
2535
+ function j(f, i = 0) {
2493
2536
  let n = 0;
2494
- for (let a = i; a < p.length; a++)
2495
- n <<= 8, n |= p[a] & 255;
2537
+ for (let s = i; s < f.length; s++)
2538
+ n <<= 8, n |= f[s] & 255;
2496
2539
  return n;
2497
2540
  }
2498
- function tt(p, i) {
2499
- return et(p, i, 8).getUint32(4, !1);
2541
+ function tt(f, i) {
2542
+ return et(f, i, 8).getUint32(4, !1);
2500
2543
  }
2501
- function Rt(p) {
2502
- const i = p.length;
2544
+ function $t(f) {
2545
+ const i = f.length;
2503
2546
  for (let n = 0; n < i; n += 2) {
2504
- const a = p[n];
2505
- p[n] = p[n + 1], p[n + 1] = a;
2547
+ const s = f[n];
2548
+ f[n] = f[n + 1], f[n + 1] = s;
2506
2549
  }
2507
- return p;
2550
+ return f;
2508
2551
  }
2509
- function Ct(p) {
2552
+ function Yt(f) {
2510
2553
  let i = "", n;
2511
- for (n = 0; n < p.length && p[n] === 0; n++)
2554
+ for (n = 0; n < f.length && f[n] === 0; n++)
2512
2555
  ;
2513
- for (; n < p.length; n++) {
2514
- const a = "00" + p[n].toString(16);
2515
- i += a.substring(a.length - 2);
2556
+ for (; n < f.length; n++) {
2557
+ const s = "00" + f[n].toString(16);
2558
+ i += s.substring(s.length - 2);
2516
2559
  }
2517
2560
  return i;
2518
2561
  }
2519
- function st(p) {
2562
+ function ht(f) {
2520
2563
  try {
2521
- return Ot(p);
2564
+ return jt(f);
2522
2565
  } catch (i) {
2523
- return R(i);
2566
+ return P(i);
2524
2567
  }
2525
2568
  }
2526
- function Ot(p) {
2527
- const i = new Uint8Array(p), n = i.slice(0, 6);
2569
+ function jt(f) {
2570
+ const i = new Uint8Array(f), n = i.slice(0, 6);
2528
2571
  if (new TextDecoder("utf8").decode(n) !== "bplist")
2529
2572
  throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.");
2530
- const c = p.byteLength - 32, w = new DataView(p, c, 32), y = w.getUint8(6), b = w.getUint8(7), v = tt(p, c + 8), N = tt(p, c + 16), T = tt(p, c + 24);
2531
- if (v > kt)
2573
+ const c = f.byteLength - 32, w = new DataView(f, c, 32), d = w.getUint8(6), E = w.getUint8(7), T = tt(f, c + 8), U = tt(f, c + 16), I = tt(f, c + 24);
2574
+ if (T > Vt)
2532
2575
  throw new Error("maxObjectCount exceeded");
2533
- const m = [];
2534
- for (let e = 0; e < v; e++) {
2535
- const r = i.slice(T + e * y, T + (e + 1) * y);
2536
- m[e] = j(r, 0);
2576
+ const v = [];
2577
+ for (let e = 0; e < T; e++) {
2578
+ const r = i.slice(I + e * d, I + (e + 1) * d);
2579
+ v[e] = j(r, 0);
2537
2580
  }
2538
2581
  function t(e) {
2539
- const r = m[e], s = i[r], o = (s & 240) >> 4, u = s & 15;
2582
+ const r = v[e], a = i[r], o = (a & 240) >> 4, u = a & 15;
2540
2583
  switch (o) {
2541
2584
  case 0:
2542
2585
  return l();
2543
2586
  case 1:
2544
- return g();
2587
+ return p();
2545
2588
  case 8:
2546
2589
  return F();
2547
2590
  case 2:
2548
2591
  return S();
2549
2592
  case 3:
2550
- return A();
2593
+ return N();
2551
2594
  case 4:
2552
- return L();
2595
+ return _();
2553
2596
  case 5:
2554
- return _(!1);
2597
+ return L(!1);
2555
2598
  case 6:
2556
- return _(!0);
2599
+ return L(!0);
2557
2600
  case 10:
2558
- return d();
2601
+ return y();
2559
2602
  case 13:
2560
- return f();
2603
+ return g();
2561
2604
  default:
2562
2605
  throw new Error("Unhandled type 0x" + o.toString(16));
2563
2606
  }
@@ -2575,15 +2618,15 @@ function Ot(p) {
2575
2618
  throw new Error("Unhandled simple type 0x" + o.toString(16) + u.toString(16));
2576
2619
  }
2577
2620
  }
2578
- function g() {
2621
+ function p() {
2579
2622
  const h = Math.pow(2, u);
2580
2623
  if (h < X) {
2581
- const E = i.slice(r + 1, r + 1 + h);
2624
+ const b = i.slice(r + 1, r + 1 + h);
2582
2625
  if (h === 16) {
2583
- const I = Ct(E);
2584
- return BigInt("0x" + I);
2626
+ const m = Yt(b);
2627
+ return BigInt("0x" + m);
2585
2628
  }
2586
- return E.reduce((I, x) => (I <<= 8, I |= x & 255, I), 0);
2629
+ return b.reduce((m, x) => (m <<= 8, m |= x & 255, m), 0);
2587
2630
  }
2588
2631
  throw new Error(
2589
2632
  "Too little heap space available! Wanted to read " + h + " bytes, but only " + X + " are available."
@@ -2592,7 +2635,7 @@ function Ot(p) {
2592
2635
  function F() {
2593
2636
  const h = u + 1;
2594
2637
  if (h < X)
2595
- return new _t(j(i.slice(r + 1, r + 1 + h)));
2638
+ return new zt(j(i.slice(r + 1, r + 1 + h)));
2596
2639
  throw new Error(
2597
2640
  "Too little heap space available! Wanted to read " + h + " bytes, but only " + X + " are available."
2598
2641
  );
@@ -2600,98 +2643,99 @@ function Ot(p) {
2600
2643
  function S() {
2601
2644
  const h = Math.pow(2, u);
2602
2645
  if (h < X) {
2603
- const E = et(p, r + 1, h);
2646
+ const b = et(f, r + 1, h);
2604
2647
  if (h === 4)
2605
- return E.getFloat32(0, !1);
2648
+ return b.getFloat32(0, !1);
2606
2649
  if (h === 8)
2607
- return E.getFloat64(0, !1);
2650
+ return b.getFloat64(0, !1);
2608
2651
  } else
2609
2652
  throw new Error(
2610
2653
  "Too little heap space available! Wanted to read " + h + " bytes, but only " + X + " are available."
2611
2654
  );
2612
2655
  return 0;
2613
2656
  }
2614
- function A() {
2615
- const E = et(p, r + 1, 8).getFloat64(0, !1);
2616
- return new Date(Lt + 1e3 * E);
2657
+ function N() {
2658
+ const b = et(f, r + 1, 8).getFloat64(0, !1);
2659
+ return new Date(Xt + 1e3 * b);
2617
2660
  }
2618
- function L() {
2619
- let h = 1, E = u;
2661
+ function _() {
2662
+ let h = 1, b = u;
2620
2663
  if (u === 15) {
2621
- const x = i[r + 1] & 15, U = Math.pow(2, x);
2622
- h = 2 + U, E = j(i.slice(r + 2, r + 2 + U));
2664
+ const x = i[r + 1] & 15, A = Math.pow(2, x);
2665
+ h = 2 + A, b = j(i.slice(r + 2, r + 2 + A));
2623
2666
  }
2624
- if (E < X)
2625
- return i.slice(r + h, r + h + E);
2667
+ if (b < X)
2668
+ return i.slice(r + h, r + h + b);
2626
2669
  throw new Error(
2627
- "Too little heap space available! Wanted to read " + E + " bytes, but only " + X + " are available."
2670
+ "Too little heap space available! Wanted to read " + b + " bytes, but only " + X + " are available."
2628
2671
  );
2629
2672
  }
2630
- function _(h) {
2631
- let E = "utf8", I = u, x = 1;
2673
+ function L(h) {
2674
+ let b = "utf8", m = u, x = 1;
2632
2675
  if (u === 15) {
2633
- const k = i[r + 1] & 15, B = Math.pow(2, k);
2634
- x = 2 + B, I = j(i.slice(r + 2, r + 2 + B));
2676
+ const k = i[r + 1] & 15, O = Math.pow(2, k);
2677
+ x = 2 + O, m = j(i.slice(r + 2, r + 2 + O));
2635
2678
  }
2636
- if (I *= h ? 2 : 1, I < X) {
2637
- let U = i.slice(r + x, r + x + I);
2679
+ if (m *= h ? 2 : 1, m < X) {
2680
+ let A = i.slice(r + x, r + x + m);
2638
2681
  if (h) {
2639
- const k = new Uint8Array(U);
2640
- U = Rt(k), E = "utf-16le";
2682
+ const k = new Uint8Array(A);
2683
+ A = $t(k), b = "utf-16le";
2641
2684
  } else
2642
- E = "utf8";
2643
- return new TextDecoder(E).decode(U);
2685
+ b = "utf8";
2686
+ return new TextDecoder(b).decode(A);
2644
2687
  }
2645
2688
  throw new Error(
2646
- "Too little heap space available! Wanted to read " + I + " bytes, but only " + X + " are available."
2689
+ "Too little heap space available! Wanted to read " + m + " bytes, but only " + X + " are available."
2647
2690
  );
2648
2691
  }
2649
- function d() {
2650
- let h = u, E = 1;
2692
+ function y() {
2693
+ let h = u, b = 1;
2651
2694
  if (u === 15) {
2652
- const U = i[r + 1] & 15, k = Math.pow(2, U);
2653
- E = 2 + k, h = j(i.slice(r + 2, r + 2 + k));
2695
+ const A = i[r + 1] & 15, k = Math.pow(2, A);
2696
+ b = 2 + k, h = j(i.slice(r + 2, r + 2 + k));
2654
2697
  }
2655
- if (h * b > X)
2698
+ if (h * E > X)
2656
2699
  throw new Error("Too little heap space available!");
2657
- const I = [];
2700
+ const m = [];
2658
2701
  for (let x = 0; x < h; x++) {
2659
- const U = j(
2660
- i.slice(r + E + x * b, r + E + (x + 1) * b)
2702
+ const A = j(
2703
+ i.slice(r + b + x * E, r + b + (x + 1) * E)
2661
2704
  );
2662
- I[x] = t(U);
2705
+ m[x] = t(A);
2663
2706
  }
2664
- return I;
2707
+ return m;
2665
2708
  }
2666
- function f() {
2667
- let h = u, E = 1;
2709
+ function g() {
2710
+ let h = u, b = 1;
2668
2711
  if (u === 15) {
2669
- const U = i[r + 1] & 15, k = Math.pow(2, U);
2670
- E = 2 + k, h = j(i.slice(r + 2, r + 2 + k));
2712
+ const A = i[r + 1] & 15, k = Math.pow(2, A);
2713
+ b = 2 + k, h = j(i.slice(r + 2, r + 2 + k));
2671
2714
  }
2672
- if (h * 2 * b > X)
2715
+ if (h * 2 * E > X)
2673
2716
  throw new Error("Too little heap space available!");
2674
- const I = {};
2717
+ const m = {};
2675
2718
  for (let x = 0; x < h; x++) {
2676
- const U = j(
2677
- i.slice(r + E + x * b, r + E + (x + 1) * b)
2719
+ const A = j(
2720
+ i.slice(r + b + x * E, r + b + (x + 1) * E)
2678
2721
  ), k = j(
2679
2722
  i.slice(
2680
- r + E + h * b + x * b,
2681
- r + E + h * b + (x + 1) * b
2723
+ r + b + h * E + x * E,
2724
+ r + b + h * E + (x + 1) * E
2682
2725
  )
2683
- ), B = t(U), C = t(k);
2684
- I[String(B)] = C;
2726
+ ), O = t(A), C = t(k);
2727
+ m[String(O)] = C;
2685
2728
  }
2686
- return I;
2729
+ return m;
2687
2730
  }
2688
2731
  }
2689
- return t(N);
2732
+ return t(U);
2690
2733
  }
2691
- class zt {
2734
+ const qt = rt.loadAsync;
2735
+ class Kt {
2692
2736
  zip;
2693
2737
  constructor(i) {
2694
- this.zip = J(i).catch(R);
2738
+ this.zip = qt(i).catch(P);
2695
2739
  }
2696
2740
  /**
2697
2741
  * 解析应用 plist 信息
@@ -2700,30 +2744,35 @@ class zt {
2700
2744
  const n = await this.zip;
2701
2745
  if (n instanceof Error)
2702
2746
  return new Error(`load IPA error: ${n.message}`);
2703
- const a = n.filter((T) => /payload\/[^/]+?.app\/info.plist$/i.test(T))[0];
2704
- if (!a)
2747
+ const s = n.filter((t) => /payload\/[^/]+?.app\/info.plist$/i.test(t))[0];
2748
+ if (!s)
2705
2749
  return new Error("not found Info.plist file in IPA");
2706
- const c = await a.async("arraybuffer").catch(R);
2750
+ const c = await s.async("arraybuffer").catch(P);
2707
2751
  if (c instanceof Error)
2708
2752
  return new Error(`read Info.plist file error: ${c.message}`);
2709
- const w = st(c);
2753
+ const w = ht(c);
2710
2754
  if (w instanceof Error)
2711
2755
  return new Error(`parse Info.plist error: ${w.message}`);
2712
- const y = {
2756
+ const d = {
2713
2757
  package: "CFBundleIdentifier" in w ? Q(w.CFBundleIdentifier) : "",
2714
- versionCode: "CFBundleVersion" in w ? ot(w.CFBundleVersion) : 0,
2758
+ versionCode: "CFBundleVersion" in w ? ct(w.CFBundleVersion) : 0,
2715
2759
  versionName: "CFBundleShortVersionString" in w ? Q(w.CFBundleShortVersionString) : "",
2716
2760
  plist: w
2717
2761
  };
2718
2762
  if (i?.ignoreIcon)
2719
- return y;
2720
- const b = Bt(w), v = n.filter(
2721
- b ? (T) => T.includes(b) : (T) => /\/icon[^.]*?\.png/i.test(T)
2722
- )[0];
2723
- if (!v)
2724
- return y;
2725
- const N = await v.async("base64").catch(R);
2726
- return N instanceof Error || (y.icon = rt(N)), y;
2763
+ return d;
2764
+ const E = Ht(w);
2765
+ if (d.iconPath = E, !d.iconPath)
2766
+ return d;
2767
+ const T = n.filter((t) => t.includes(E))[0];
2768
+ if (!T)
2769
+ return d;
2770
+ d.iconPath = T.name;
2771
+ const U = await T.async("arraybuffer").catch(P);
2772
+ if (U instanceof Error)
2773
+ return d;
2774
+ const I = Mt(U), v = Dt(I);
2775
+ return d.icon = it(v), d;
2727
2776
  }
2728
2777
  // async parseProvision() {
2729
2778
  // const zip = await this.zip;
@@ -2753,30 +2802,27 @@ class zt {
2753
2802
  const n = await this.zip;
2754
2803
  if (n instanceof Error)
2755
2804
  return n;
2756
- const a = i.replace(/\.framework/i, ""), c = new RegExp(`\\/frameworks\\/${a}\\.framework\\/[^/]+?\\.plist$`, "i"), w = n.file(c)[0];
2805
+ const s = i.replace(/\.framework/i, ""), c = new RegExp(`\\/frameworks\\/${s}\\.framework\\/[^/]+?\\.plist$`, "i"), w = n.file(c)[0];
2757
2806
  if (!w)
2758
2807
  return new Error(`not found ${i} plist file in IPA`);
2759
- const y = await w.async("arraybuffer").catch(R);
2760
- return y instanceof Error ? new Error(`read ${i} plist file error: ${y.message}`) : st(y);
2808
+ const d = await w.async("arraybuffer").catch(P);
2809
+ return d instanceof Error ? new Error(`read ${i} plist file error: ${d.message}`) : ht(d);
2761
2810
  }
2762
2811
  /**
2763
2812
  * 读取指定文件的内容
2764
2813
  */
2765
- async readFile(i) {
2766
- const n = await this.zip;
2767
- if (n instanceof Error)
2768
- return n;
2769
- const a = typeof i == "string" ? n.file(i) : n.file(i)[0];
2770
- return a ? await a.async("arraybuffer").catch(R) : new Error(`not found ${i}`);
2814
+ async readFile(i, n) {
2815
+ const s = await this.zip;
2816
+ return s instanceof Error ? new Error(`load file error: ${s.message}`) : await nt(s, i, n);
2771
2817
  }
2772
2818
  }
2773
- function Bt(p) {
2774
- return G(p, "CFBundleIcons") && G(p.CFBundleIcons, "CFBundlePrimaryIcon") && G(p.CFBundleIcons.CFBundlePrimaryIcon, "CFBundleIconFiles") && Array.isArray(p.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles) && p.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length ? Q(
2775
- p.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles[p.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length - 1]
2776
- ) : G(p, "CFBundleIconFiles") && Array.isArray(p.CFBundleIconFiles) && p.CFBundleIconFiles.length ? Q(p.CFBundleIconFiles[p.CFBundleIconFiles.length - 1]) : "";
2819
+ function Ht(f) {
2820
+ return W(f, "CFBundleIcons") && W(f.CFBundleIcons, "CFBundlePrimaryIcon") && W(f.CFBundleIcons.CFBundlePrimaryIcon, "CFBundleIconFiles") && Array.isArray(f.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles) && f.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length ? Q(
2821
+ f.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles[f.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length - 1]
2822
+ ) : W(f, "CFBundleIconFiles") && Array.isArray(f.CFBundleIconFiles) && f.CFBundleIconFiles.length ? Q(f.CFBundleIconFiles[f.CFBundleIconFiles.length - 1]) : "";
2777
2823
  }
2778
2824
  export {
2779
- Dt as AndroidAppParser,
2780
- Mt as HosAppParser,
2781
- zt as IosAppParser
2825
+ Wt as AndroidAppParser,
2826
+ Gt as HosAppParser,
2827
+ Kt as IosAppParser
2782
2828
  };