@poor-knight/cesium-utils 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,54 +4,54 @@ var M = (s, i, r) => ue(s, typeof i != "symbol" ? i + "" : i, r);
4
4
  import * as Cesium from "cesium";
5
5
  import { Cartesian2, Cartesian3, VerticalOrigin, HorizontalOrigin, Color, LabelStyle, defined, DeveloperError, Event, Credit, Ellipsoid, GeographicTilingScheme, TerrainProvider, HeightmapTerrainData, Resource, Rectangle as Rectangle$1, ScreenSpaceEventHandler, ScreenSpaceEventType, ImageryLayer, WebMapServiceImageryProvider, HeightReference, NearFarScalar, SceneMode, BoundingSphere, Occluder, SceneTransforms, LabelCollection } from "cesium";
6
6
  var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, inflate$2 = {};
7
- const adler32$1 = (s, i, r, a) => {
8
- let h = s & 65535 | 0, o = s >>> 16 & 65535 | 0, u = 0;
7
+ const adler32$1 = (s, i, r, o) => {
8
+ let h = s & 65535 | 0, a = s >>> 16 & 65535 | 0, u = 0;
9
9
  for (; r !== 0; ) {
10
10
  u = r > 2e3 ? 2e3 : r, r -= u;
11
11
  do
12
- h = h + i[a++] | 0, o = o + h | 0;
12
+ h = h + i[o++] | 0, a = a + h | 0;
13
13
  while (--u);
14
- h %= 65521, o %= 65521;
14
+ h %= 65521, a %= 65521;
15
15
  }
16
- return h | o << 16 | 0;
16
+ return h | a << 16 | 0;
17
17
  };
18
18
  var adler32_1 = adler32$1;
19
19
  const makeTable = () => {
20
20
  let s, i = [];
21
21
  for (var r = 0; r < 256; r++) {
22
22
  s = r;
23
- for (var a = 0; a < 8; a++)
23
+ for (var o = 0; o < 8; o++)
24
24
  s = s & 1 ? 3988292384 ^ s >>> 1 : s >>> 1;
25
25
  i[r] = s;
26
26
  }
27
27
  return i;
28
- }, crcTable = new Uint32Array(makeTable()), crc32$1 = (s, i, r, a) => {
29
- const h = crcTable, o = a + r;
28
+ }, crcTable = new Uint32Array(makeTable()), crc32$1 = (s, i, r, o) => {
29
+ const h = crcTable, a = o + r;
30
30
  s ^= -1;
31
- for (let u = a; u < o; u++)
31
+ for (let u = o; u < a; u++)
32
32
  s = s >>> 8 ^ h[(s ^ i[u]) & 255];
33
33
  return s ^ -1;
34
34
  };
35
35
  var crc32_1 = crc32$1;
36
36
  const BAD$1 = 16209, TYPE$1 = 16191;
37
37
  var inffast = function(i, r) {
38
- let a, h, o, u, c, d, l, m, y, g, p, v, _, w, O, b, x, T, E, C, R, I, k, A;
38
+ let o, h, a, u, c, d, l, m, y, g, p, v, _, w, O, b, x, T, E, C, R, I, k, A;
39
39
  const P = i.state;
40
- a = i.next_in, k = i.input, h = a + (i.avail_in - 5), o = i.next_out, A = i.output, u = o - (r - i.avail_out), c = o + (i.avail_out - 257), d = P.dmax, l = P.wsize, m = P.whave, y = P.wnext, g = P.window, p = P.hold, v = P.bits, _ = P.lencode, w = P.distcode, O = (1 << P.lenbits) - 1, b = (1 << P.distbits) - 1;
40
+ o = i.next_in, k = i.input, h = o + (i.avail_in - 5), a = i.next_out, A = i.output, u = a - (r - i.avail_out), c = a + (i.avail_out - 257), d = P.dmax, l = P.wsize, m = P.whave, y = P.wnext, g = P.window, p = P.hold, v = P.bits, _ = P.lencode, w = P.distcode, O = (1 << P.lenbits) - 1, b = (1 << P.distbits) - 1;
41
41
  e: do {
42
- v < 15 && (p += k[a++] << v, v += 8, p += k[a++] << v, v += 8), x = _[p & O];
42
+ v < 15 && (p += k[o++] << v, v += 8, p += k[o++] << v, v += 8), x = _[p & O];
43
43
  t: for (; ; ) {
44
44
  if (T = x >>> 24, p >>>= T, v -= T, T = x >>> 16 & 255, T === 0)
45
- A[o++] = x & 65535;
45
+ A[a++] = x & 65535;
46
46
  else if (T & 16) {
47
- E = x & 65535, T &= 15, T && (v < T && (p += k[a++] << v, v += 8), E += p & (1 << T) - 1, p >>>= T, v -= T), v < 15 && (p += k[a++] << v, v += 8, p += k[a++] << v, v += 8), x = w[p & b];
47
+ E = x & 65535, T &= 15, T && (v < T && (p += k[o++] << v, v += 8), E += p & (1 << T) - 1, p >>>= T, v -= T), v < 15 && (p += k[o++] << v, v += 8, p += k[o++] << v, v += 8), x = w[p & b];
48
48
  r: for (; ; ) {
49
49
  if (T = x >>> 24, p >>>= T, v -= T, T = x >>> 16 & 255, T & 16) {
50
- if (C = x & 65535, T &= 15, v < T && (p += k[a++] << v, v += 8, v < T && (p += k[a++] << v, v += 8)), C += p & (1 << T) - 1, C > d) {
50
+ if (C = x & 65535, T &= 15, v < T && (p += k[o++] << v, v += 8, v < T && (p += k[o++] << v, v += 8)), C += p & (1 << T) - 1, C > d) {
51
51
  i.msg = "invalid distance too far back", P.mode = BAD$1;
52
52
  break e;
53
53
  }
54
- if (p >>>= T, v -= T, T = o - u, C > T) {
54
+ if (p >>>= T, v -= T, T = a - u, C > T) {
55
55
  if (T = C - T, T > m && P.sane) {
56
56
  i.msg = "invalid distance too far back", P.mode = BAD$1;
57
57
  break e;
@@ -60,40 +60,40 @@ var inffast = function(i, r) {
60
60
  if (R += l - T, T < E) {
61
61
  E -= T;
62
62
  do
63
- A[o++] = g[R++];
63
+ A[a++] = g[R++];
64
64
  while (--T);
65
- R = o - C, I = A;
65
+ R = a - C, I = A;
66
66
  }
67
67
  } else if (y < T) {
68
68
  if (R += l + y - T, T -= y, T < E) {
69
69
  E -= T;
70
70
  do
71
- A[o++] = g[R++];
71
+ A[a++] = g[R++];
72
72
  while (--T);
73
73
  if (R = 0, y < E) {
74
74
  T = y, E -= T;
75
75
  do
76
- A[o++] = g[R++];
76
+ A[a++] = g[R++];
77
77
  while (--T);
78
- R = o - C, I = A;
78
+ R = a - C, I = A;
79
79
  }
80
80
  }
81
81
  } else if (R += y - T, T < E) {
82
82
  E -= T;
83
83
  do
84
- A[o++] = g[R++];
84
+ A[a++] = g[R++];
85
85
  while (--T);
86
- R = o - C, I = A;
86
+ R = a - C, I = A;
87
87
  }
88
88
  for (; E > 2; )
89
- A[o++] = I[R++], A[o++] = I[R++], A[o++] = I[R++], E -= 3;
90
- E && (A[o++] = I[R++], E > 1 && (A[o++] = I[R++]));
89
+ A[a++] = I[R++], A[a++] = I[R++], A[a++] = I[R++], E -= 3;
90
+ E && (A[a++] = I[R++], E > 1 && (A[a++] = I[R++]));
91
91
  } else {
92
- R = o - C;
92
+ R = a - C;
93
93
  do
94
- A[o++] = A[R++], A[o++] = A[R++], A[o++] = A[R++], E -= 3;
94
+ A[a++] = A[R++], A[a++] = A[R++], A[a++] = A[R++], E -= 3;
95
95
  while (E > 2);
96
- E && (A[o++] = A[R++], E > 1 && (A[o++] = A[R++]));
96
+ E && (A[a++] = A[R++], E > 1 && (A[a++] = A[R++]));
97
97
  }
98
98
  } else if ((T & 64) === 0) {
99
99
  x = w[(x & 65535) + (p & (1 << T) - 1)];
@@ -116,8 +116,8 @@ var inffast = function(i, r) {
116
116
  }
117
117
  break;
118
118
  }
119
- } while (a < h && o < c);
120
- E = v >> 3, a -= E, v -= E << 3, p &= (1 << v) - 1, i.next_in = a, i.next_out = o, i.avail_in = a < h ? 5 + (h - a) : 5 - (a - h), i.avail_out = o < c ? 257 + (c - o) : 257 - (o - c), P.hold = p, P.bits = v;
119
+ } while (o < h && a < c);
120
+ E = v >> 3, o -= E, v -= E << 3, p &= (1 << v) - 1, i.next_in = o, i.next_out = a, i.avail_in = o < h ? 5 + (h - o) : 5 - (o - h), i.avail_out = a < c ? 257 + (c - a) : 257 - (a - c), P.hold = p, P.bits = v;
121
121
  };
122
122
  const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS$1 = 1, DISTS$1 = 2, lbase = new Uint16Array([
123
123
  /* Length codes 257..285 base */
@@ -253,19 +253,19 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
253
253
  29,
254
254
  64,
255
255
  64
256
- ]), inflate_table$1 = (s, i, r, a, h, o, u, c) => {
256
+ ]), inflate_table$1 = (s, i, r, o, h, a, u, c) => {
257
257
  const d = c.bits;
258
258
  let l = 0, m = 0, y = 0, g = 0, p = 0, v = 0, _ = 0, w = 0, O = 0, b = 0, x, T, E, C, R, I = null, k;
259
259
  const A = new Uint16Array(MAXBITS + 1), P = new Uint16Array(MAXBITS + 1);
260
- let $ = null, z, q, V;
260
+ let $ = null, H, q, V;
261
261
  for (l = 0; l <= MAXBITS; l++)
262
262
  A[l] = 0;
263
- for (m = 0; m < a; m++)
263
+ for (m = 0; m < o; m++)
264
264
  A[i[r + m]]++;
265
265
  for (p = d, g = MAXBITS; g >= 1 && A[g] === 0; g--)
266
266
  ;
267
267
  if (p > g && (p = g), g === 0)
268
- return h[o++] = 1 << 24 | 64 << 16 | 0, h[o++] = 1 << 24 | 64 << 16 | 0, c.bits = 1, 0;
268
+ return h[a++] = 1 << 24 | 64 << 16 | 0, h[a++] = 1 << 24 | 64 << 16 | 0, c.bits = 1, 0;
269
269
  for (y = 1; y < g && A[y] === 0; y++)
270
270
  ;
271
271
  for (p < y && (p = y), w = 1, l = 1; l <= MAXBITS; l++)
@@ -275,14 +275,14 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
275
275
  return -1;
276
276
  for (P[1] = 0, l = 1; l < MAXBITS; l++)
277
277
  P[l + 1] = P[l] + A[l];
278
- for (m = 0; m < a; m++)
278
+ for (m = 0; m < o; m++)
279
279
  i[r + m] !== 0 && (u[P[i[r + m]]++] = m);
280
- if (s === CODES$1 ? (I = $ = u, k = 20) : s === LENS$1 ? (I = lbase, $ = lext, k = 257) : (I = dbase, $ = dext, k = 0), b = 0, m = 0, l = y, R = o, v = p, _ = 0, E = -1, O = 1 << p, C = O - 1, s === LENS$1 && O > ENOUGH_LENS$1 || s === DISTS$1 && O > ENOUGH_DISTS$1)
280
+ if (s === CODES$1 ? (I = $ = u, k = 20) : s === LENS$1 ? (I = lbase, $ = lext, k = 257) : (I = dbase, $ = dext, k = 0), b = 0, m = 0, l = y, R = a, v = p, _ = 0, E = -1, O = 1 << p, C = O - 1, s === LENS$1 && O > ENOUGH_LENS$1 || s === DISTS$1 && O > ENOUGH_DISTS$1)
281
281
  return 1;
282
282
  for (; ; ) {
283
- z = l - _, u[m] + 1 < k ? (q = 0, V = u[m]) : u[m] >= k ? (q = $[u[m] - k], V = I[u[m] - k]) : (q = 96, V = 0), x = 1 << l - _, T = 1 << v, y = T;
283
+ H = l - _, u[m] + 1 < k ? (q = 0, V = u[m]) : u[m] >= k ? (q = $[u[m] - k], V = I[u[m] - k]) : (q = 96, V = 0), x = 1 << l - _, T = 1 << v, y = T;
284
284
  do
285
- T -= x, h[R + (b >> _) + T] = z << 24 | q << 16 | V | 0;
285
+ T -= x, h[R + (b >> _) + T] = H << 24 | q << 16 | V | 0;
286
286
  while (T !== 0);
287
287
  for (x = 1 << l - 1; b & x; )
288
288
  x >>= 1;
@@ -296,7 +296,7 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
296
296
  v++, w <<= 1;
297
297
  if (O += 1 << v, s === LENS$1 && O > ENOUGH_LENS$1 || s === DISTS$1 && O > ENOUGH_DISTS$1)
298
298
  return 1;
299
- E = b & C, h[E] = p << 24 | v << 16 | R - o | 0;
299
+ E = b & C, h[E] = p << 24 | v << 16 | R - a | 0;
300
300
  }
301
301
  }
302
302
  return b !== 0 && (h[R + b] = l - _ << 24 | 64 << 16 | 0), c.bits = p, 0;
@@ -356,15 +356,15 @@ const inflateStateCheck = (s) => {
356
356
  let r;
357
357
  if (inflateStateCheck(s))
358
358
  return Z_STREAM_ERROR$1;
359
- const a = s.state;
360
- return i < 0 ? (r = 0, i = -i) : (r = (i >> 4) + 5, i < 48 && (i &= 15)), i && (i < 8 || i > 15) ? Z_STREAM_ERROR$1 : (a.window !== null && a.wbits !== i && (a.window = null), a.wrap = r, a.wbits = i, inflateReset(s));
359
+ const o = s.state;
360
+ return i < 0 ? (r = 0, i = -i) : (r = (i >> 4) + 5, i < 48 && (i &= 15)), i && (i < 8 || i > 15) ? Z_STREAM_ERROR$1 : (o.window !== null && o.wbits !== i && (o.window = null), o.wrap = r, o.wbits = i, inflateReset(s));
361
361
  }, inflateInit2 = (s, i) => {
362
362
  if (!s)
363
363
  return Z_STREAM_ERROR$1;
364
364
  const r = new InflateState();
365
365
  s.state = r, r.strm = s, r.window = null, r.mode = HEAD;
366
- const a = inflateReset2(s, i);
367
- return a !== Z_OK$1 && (s.state = null), a;
366
+ const o = inflateReset2(s, i);
367
+ return o !== Z_OK$1 && (s.state = null), o;
368
368
  }, inflateInit = (s) => inflateInit2(s, DEF_WBITS);
369
369
  let virgin = !0, lenfix, distfix;
370
370
  const fixedtables = (s) => {
@@ -388,12 +388,12 @@ const fixedtables = (s) => {
388
388
  }), virgin = !1;
389
389
  }
390
390
  s.lencode = lenfix, s.lenbits = 9, s.distcode = distfix, s.distbits = 5;
391
- }, updatewindow = (s, i, r, a) => {
391
+ }, updatewindow = (s, i, r, o) => {
392
392
  let h;
393
- const o = s.state;
394
- return o.window === null && (o.wsize = 1 << o.wbits, o.wnext = 0, o.whave = 0, o.window = new Uint8Array(o.wsize)), a >= o.wsize ? (o.window.set(i.subarray(r - o.wsize, r), 0), o.wnext = 0, o.whave = o.wsize) : (h = o.wsize - o.wnext, h > a && (h = a), o.window.set(i.subarray(r - a, r - a + h), o.wnext), a -= h, a ? (o.window.set(i.subarray(r - a, r), 0), o.wnext = a, o.whave = o.wsize) : (o.wnext += h, o.wnext === o.wsize && (o.wnext = 0), o.whave < o.wsize && (o.whave += h))), 0;
393
+ const a = s.state;
394
+ return a.window === null && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0, a.window = new Uint8Array(a.wsize)), o >= a.wsize ? (a.window.set(i.subarray(r - a.wsize, r), 0), a.wnext = 0, a.whave = a.wsize) : (h = a.wsize - a.wnext, h > o && (h = o), a.window.set(i.subarray(r - o, r - o + h), a.wnext), o -= h, o ? (a.window.set(i.subarray(r - o, r), 0), a.wnext = o, a.whave = a.wsize) : (a.wnext += h, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += h))), 0;
395
395
  }, inflate$1 = (s, i) => {
396
- let r, a, h, o, u, c, d, l, m, y, g, p, v, _, w = 0, O, b, x, T, E, C, R, I;
396
+ let r, o, h, a, u, c, d, l, m, y, g, p, v, _, w = 0, O, b, x, T, E, C, R, I;
397
397
  const k = new Uint8Array(4);
398
398
  let A, P;
399
399
  const $ = (
@@ -402,7 +402,7 @@ const fixedtables = (s) => {
402
402
  );
403
403
  if (inflateStateCheck(s) || !s.output || !s.input && s.avail_in !== 0)
404
404
  return Z_STREAM_ERROR$1;
405
- r = s.state, r.mode === TYPE && (r.mode = TYPEDO), u = s.next_out, h = s.output, d = s.avail_out, o = s.next_in, a = s.input, c = s.avail_in, l = r.hold, m = r.bits, y = c, g = d, I = Z_OK$1;
405
+ r = s.state, r.mode === TYPE && (r.mode = TYPEDO), u = s.next_out, h = s.output, d = s.avail_out, a = s.next_in, o = s.input, c = s.avail_in, l = r.hold, m = r.bits, y = c, g = d, I = Z_OK$1;
406
406
  e: for (; ; )
407
407
  switch (r.mode) {
408
408
  case HEAD:
@@ -413,7 +413,7 @@ const fixedtables = (s) => {
413
413
  for (; m < 16; ) {
414
414
  if (c === 0)
415
415
  break e;
416
- c--, l += a[o++] << m, m += 8;
416
+ c--, l += o[a++] << m, m += 8;
417
417
  }
418
418
  if (r.wrap & 2 && l === 35615) {
419
419
  r.wbits === 0 && (r.wbits = 15), r.check = 0, k[0] = l & 255, k[1] = l >>> 8 & 255, r.check = crc32(r.check, k, 2, 0), l = 0, m = 0, r.mode = FLAGS;
@@ -437,7 +437,7 @@ const fixedtables = (s) => {
437
437
  for (; m < 16; ) {
438
438
  if (c === 0)
439
439
  break e;
440
- c--, l += a[o++] << m, m += 8;
440
+ c--, l += o[a++] << m, m += 8;
441
441
  }
442
442
  if (r.flags = l, (r.flags & 255) !== Z_DEFLATED) {
443
443
  s.msg = "unknown compression method", r.mode = BAD;
@@ -453,7 +453,7 @@ const fixedtables = (s) => {
453
453
  for (; m < 32; ) {
454
454
  if (c === 0)
455
455
  break e;
456
- c--, l += a[o++] << m, m += 8;
456
+ c--, l += o[a++] << m, m += 8;
457
457
  }
458
458
  r.head && (r.head.time = l), r.flags & 512 && r.wrap & 4 && (k[0] = l & 255, k[1] = l >>> 8 & 255, k[2] = l >>> 16 & 255, k[3] = l >>> 24 & 255, r.check = crc32(r.check, k, 4, 0)), l = 0, m = 0, r.mode = OS;
459
459
  /* falls through */
@@ -461,7 +461,7 @@ const fixedtables = (s) => {
461
461
  for (; m < 16; ) {
462
462
  if (c === 0)
463
463
  break e;
464
- c--, l += a[o++] << m, m += 8;
464
+ c--, l += o[a++] << m, m += 8;
465
465
  }
466
466
  r.head && (r.head.xflags = l & 255, r.head.os = l >> 8), r.flags & 512 && r.wrap & 4 && (k[0] = l & 255, k[1] = l >>> 8 & 255, r.check = crc32(r.check, k, 2, 0)), l = 0, m = 0, r.mode = EXLEN;
467
467
  /* falls through */
@@ -470,7 +470,7 @@ const fixedtables = (s) => {
470
470
  for (; m < 16; ) {
471
471
  if (c === 0)
472
472
  break e;
473
- c--, l += a[o++] << m, m += 8;
473
+ c--, l += o[a++] << m, m += 8;
474
474
  }
475
475
  r.length = l, r.head && (r.head.extra_len = l), r.flags & 512 && r.wrap & 4 && (k[0] = l & 255, k[1] = l >>> 8 & 255, r.check = crc32(r.check, k, 2, 0)), l = 0, m = 0;
476
476
  } else r.head && (r.head.extra = null);
@@ -478,14 +478,14 @@ const fixedtables = (s) => {
478
478
  /* falls through */
479
479
  case EXTRA:
480
480
  if (r.flags & 1024 && (p = r.length, p > c && (p = c), p && (r.head && (R = r.head.extra_len - r.length, r.head.extra || (r.head.extra = new Uint8Array(r.head.extra_len)), r.head.extra.set(
481
- a.subarray(
482
- o,
481
+ o.subarray(
482
+ a,
483
483
  // extra field is limited to 65536 bytes
484
484
  // - no need for additional size check
485
- o + p
485
+ a + p
486
486
  ),
487
487
  R
488
- )), r.flags & 512 && r.wrap & 4 && (r.check = crc32(r.check, a, p, o)), c -= p, o += p, r.length -= p), r.length))
488
+ )), r.flags & 512 && r.wrap & 4 && (r.check = crc32(r.check, o, p, a)), c -= p, a += p, r.length -= p), r.length))
489
489
  break e;
490
490
  r.length = 0, r.mode = NAME;
491
491
  /* falls through */
@@ -495,9 +495,9 @@ const fixedtables = (s) => {
495
495
  break e;
496
496
  p = 0;
497
497
  do
498
- R = a[o + p++], r.head && R && r.length < 65536 && (r.head.name += String.fromCharCode(R));
498
+ R = o[a + p++], r.head && R && r.length < 65536 && (r.head.name += String.fromCharCode(R));
499
499
  while (R && p < c);
500
- if (r.flags & 512 && r.wrap & 4 && (r.check = crc32(r.check, a, p, o)), c -= p, o += p, R)
500
+ if (r.flags & 512 && r.wrap & 4 && (r.check = crc32(r.check, o, p, a)), c -= p, a += p, R)
501
501
  break e;
502
502
  } else r.head && (r.head.name = null);
503
503
  r.length = 0, r.mode = COMMENT;
@@ -508,9 +508,9 @@ const fixedtables = (s) => {
508
508
  break e;
509
509
  p = 0;
510
510
  do
511
- R = a[o + p++], r.head && R && r.length < 65536 && (r.head.comment += String.fromCharCode(R));
511
+ R = o[a + p++], r.head && R && r.length < 65536 && (r.head.comment += String.fromCharCode(R));
512
512
  while (R && p < c);
513
- if (r.flags & 512 && r.wrap & 4 && (r.check = crc32(r.check, a, p, o)), c -= p, o += p, R)
513
+ if (r.flags & 512 && r.wrap & 4 && (r.check = crc32(r.check, o, p, a)), c -= p, a += p, R)
514
514
  break e;
515
515
  } else r.head && (r.head.comment = null);
516
516
  r.mode = HCRC;
@@ -520,7 +520,7 @@ const fixedtables = (s) => {
520
520
  for (; m < 16; ) {
521
521
  if (c === 0)
522
522
  break e;
523
- c--, l += a[o++] << m, m += 8;
523
+ c--, l += o[a++] << m, m += 8;
524
524
  }
525
525
  if (r.wrap & 4 && l !== (r.check & 65535)) {
526
526
  s.msg = "header crc mismatch", r.mode = BAD;
@@ -534,13 +534,13 @@ const fixedtables = (s) => {
534
534
  for (; m < 32; ) {
535
535
  if (c === 0)
536
536
  break e;
537
- c--, l += a[o++] << m, m += 8;
537
+ c--, l += o[a++] << m, m += 8;
538
538
  }
539
539
  s.adler = r.check = zswap32(l), l = 0, m = 0, r.mode = DICT;
540
540
  /* falls through */
541
541
  case DICT:
542
542
  if (r.havedict === 0)
543
- return s.next_out = u, s.avail_out = d, s.next_in = o, s.avail_in = c, r.hold = l, r.bits = m, Z_NEED_DICT$1;
543
+ return s.next_out = u, s.avail_out = d, s.next_in = a, s.avail_in = c, r.hold = l, r.bits = m, Z_NEED_DICT$1;
544
544
  s.adler = r.check = 1, r.mode = TYPE;
545
545
  /* falls through */
546
546
  case TYPE:
@@ -555,7 +555,7 @@ const fixedtables = (s) => {
555
555
  for (; m < 3; ) {
556
556
  if (c === 0)
557
557
  break e;
558
- c--, l += a[o++] << m, m += 8;
558
+ c--, l += o[a++] << m, m += 8;
559
559
  }
560
560
  switch (r.last = l & 1, l >>>= 1, m -= 1, l & 3) {
561
561
  case 0:
@@ -579,7 +579,7 @@ const fixedtables = (s) => {
579
579
  for (l >>>= m & 7, m -= m & 7; m < 32; ) {
580
580
  if (c === 0)
581
581
  break e;
582
- c--, l += a[o++] << m, m += 8;
582
+ c--, l += o[a++] << m, m += 8;
583
583
  }
584
584
  if ((l & 65535) !== (l >>> 16 ^ 65535)) {
585
585
  s.msg = "invalid stored block lengths", r.mode = BAD;
@@ -595,7 +595,7 @@ const fixedtables = (s) => {
595
595
  if (p = r.length, p) {
596
596
  if (p > c && (p = c), p > d && (p = d), p === 0)
597
597
  break e;
598
- h.set(a.subarray(o, o + p), u), c -= p, o += p, d -= p, u += p, r.length -= p;
598
+ h.set(o.subarray(a, a + p), u), c -= p, a += p, d -= p, u += p, r.length -= p;
599
599
  break;
600
600
  }
601
601
  r.mode = TYPE;
@@ -604,7 +604,7 @@ const fixedtables = (s) => {
604
604
  for (; m < 14; ) {
605
605
  if (c === 0)
606
606
  break e;
607
- c--, l += a[o++] << m, m += 8;
607
+ c--, l += o[a++] << m, m += 8;
608
608
  }
609
609
  if (r.nlen = (l & 31) + 257, l >>>= 5, m -= 5, r.ndist = (l & 31) + 1, l >>>= 5, m -= 5, r.ncode = (l & 15) + 4, l >>>= 4, m -= 4, r.nlen > 286 || r.ndist > 30) {
610
610
  s.msg = "too many length or distance symbols", r.mode = BAD;
@@ -617,7 +617,7 @@ const fixedtables = (s) => {
617
617
  for (; m < 3; ) {
618
618
  if (c === 0)
619
619
  break e;
620
- c--, l += a[o++] << m, m += 8;
620
+ c--, l += o[a++] << m, m += 8;
621
621
  }
622
622
  r.lens[$[r.have++]] = l & 7, l >>>= 3, m -= 3;
623
623
  }
@@ -636,7 +636,7 @@ const fixedtables = (s) => {
636
636
  for (; w = r.lencode[l & (1 << r.lenbits) - 1], O = w >>> 24, b = w >>> 16 & 255, x = w & 65535, !(O <= m); ) {
637
637
  if (c === 0)
638
638
  break e;
639
- c--, l += a[o++] << m, m += 8;
639
+ c--, l += o[a++] << m, m += 8;
640
640
  }
641
641
  if (x < 16)
642
642
  l >>>= O, m -= O, r.lens[r.have++] = x;
@@ -645,7 +645,7 @@ const fixedtables = (s) => {
645
645
  for (P = O + 2; m < P; ) {
646
646
  if (c === 0)
647
647
  break e;
648
- c--, l += a[o++] << m, m += 8;
648
+ c--, l += o[a++] << m, m += 8;
649
649
  }
650
650
  if (l >>>= O, m -= O, r.have === 0) {
651
651
  s.msg = "invalid bit length repeat", r.mode = BAD;
@@ -656,14 +656,14 @@ const fixedtables = (s) => {
656
656
  for (P = O + 3; m < P; ) {
657
657
  if (c === 0)
658
658
  break e;
659
- c--, l += a[o++] << m, m += 8;
659
+ c--, l += o[a++] << m, m += 8;
660
660
  }
661
661
  l >>>= O, m -= O, R = 0, p = 3 + (l & 7), l >>>= 3, m -= 3;
662
662
  } else {
663
663
  for (P = O + 7; m < P; ) {
664
664
  if (c === 0)
665
665
  break e;
666
- c--, l += a[o++] << m, m += 8;
666
+ c--, l += o[a++] << m, m += 8;
667
667
  }
668
668
  l >>>= O, m -= O, R = 0, p = 11 + (l & 127), l >>>= 7, m -= 7;
669
669
  }
@@ -710,19 +710,19 @@ const fixedtables = (s) => {
710
710
  /* falls through */
711
711
  case LEN:
712
712
  if (c >= 6 && d >= 258) {
713
- s.next_out = u, s.avail_out = d, s.next_in = o, s.avail_in = c, r.hold = l, r.bits = m, inflate_fast(s, g), u = s.next_out, h = s.output, d = s.avail_out, o = s.next_in, a = s.input, c = s.avail_in, l = r.hold, m = r.bits, r.mode === TYPE && (r.back = -1);
713
+ s.next_out = u, s.avail_out = d, s.next_in = a, s.avail_in = c, r.hold = l, r.bits = m, inflate_fast(s, g), u = s.next_out, h = s.output, d = s.avail_out, a = s.next_in, o = s.input, c = s.avail_in, l = r.hold, m = r.bits, r.mode === TYPE && (r.back = -1);
714
714
  break;
715
715
  }
716
716
  for (r.back = 0; w = r.lencode[l & (1 << r.lenbits) - 1], O = w >>> 24, b = w >>> 16 & 255, x = w & 65535, !(O <= m); ) {
717
717
  if (c === 0)
718
718
  break e;
719
- c--, l += a[o++] << m, m += 8;
719
+ c--, l += o[a++] << m, m += 8;
720
720
  }
721
721
  if (b && (b & 240) === 0) {
722
722
  for (T = O, E = b, C = x; w = r.lencode[C + ((l & (1 << T + E) - 1) >> T)], O = w >>> 24, b = w >>> 16 & 255, x = w & 65535, !(T + O <= m); ) {
723
723
  if (c === 0)
724
724
  break e;
725
- c--, l += a[o++] << m, m += 8;
725
+ c--, l += o[a++] << m, m += 8;
726
726
  }
727
727
  l >>>= T, m -= T, r.back += T;
728
728
  }
@@ -745,7 +745,7 @@ const fixedtables = (s) => {
745
745
  for (P = r.extra; m < P; ) {
746
746
  if (c === 0)
747
747
  break e;
748
- c--, l += a[o++] << m, m += 8;
748
+ c--, l += o[a++] << m, m += 8;
749
749
  }
750
750
  r.length += l & (1 << r.extra) - 1, l >>>= r.extra, m -= r.extra, r.back += r.extra;
751
751
  }
@@ -755,13 +755,13 @@ const fixedtables = (s) => {
755
755
  for (; w = r.distcode[l & (1 << r.distbits) - 1], O = w >>> 24, b = w >>> 16 & 255, x = w & 65535, !(O <= m); ) {
756
756
  if (c === 0)
757
757
  break e;
758
- c--, l += a[o++] << m, m += 8;
758
+ c--, l += o[a++] << m, m += 8;
759
759
  }
760
760
  if ((b & 240) === 0) {
761
761
  for (T = O, E = b, C = x; w = r.distcode[C + ((l & (1 << T + E) - 1) >> T)], O = w >>> 24, b = w >>> 16 & 255, x = w & 65535, !(T + O <= m); ) {
762
762
  if (c === 0)
763
763
  break e;
764
- c--, l += a[o++] << m, m += 8;
764
+ c--, l += o[a++] << m, m += 8;
765
765
  }
766
766
  l >>>= T, m -= T, r.back += T;
767
767
  }
@@ -776,7 +776,7 @@ const fixedtables = (s) => {
776
776
  for (P = r.extra; m < P; ) {
777
777
  if (c === 0)
778
778
  break e;
779
- c--, l += a[o++] << m, m += 8;
779
+ c--, l += o[a++] << m, m += 8;
780
780
  }
781
781
  r.offset += l & (1 << r.extra) - 1, l >>>= r.extra, m -= r.extra, r.back += r.extra;
782
782
  }
@@ -813,7 +813,7 @@ const fixedtables = (s) => {
813
813
  for (; m < 32; ) {
814
814
  if (c === 0)
815
815
  break e;
816
- c--, l |= a[o++] << m, m += 8;
816
+ c--, l |= o[a++] << m, m += 8;
817
817
  }
818
818
  if (g -= d, s.total_out += g, r.total += g, r.wrap & 4 && g && (s.adler = r.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/
819
819
  r.flags ? crc32(r.check, h, g, u - g) : adler32(r.check, h, g, u - g)), g = d, r.wrap & 4 && (r.flags ? l : zswap32(l)) !== r.check) {
@@ -829,7 +829,7 @@ const fixedtables = (s) => {
829
829
  for (; m < 32; ) {
830
830
  if (c === 0)
831
831
  break e;
832
- c--, l += a[o++] << m, m += 8;
832
+ c--, l += o[a++] << m, m += 8;
833
833
  }
834
834
  if (r.wrap & 4 && l !== (r.total & 4294967295)) {
835
835
  s.msg = "incorrect length check", r.mode = BAD;
@@ -852,7 +852,7 @@ const fixedtables = (s) => {
852
852
  default:
853
853
  return Z_STREAM_ERROR$1;
854
854
  }
855
- return s.next_out = u, s.avail_out = d, s.next_in = o, s.avail_in = c, r.hold = l, r.bits = m, (r.wsize || g !== s.avail_out && r.mode < BAD && (r.mode < CHECK || i !== Z_FINISH$1)) && updatewindow(s, s.output, s.next_out, g - s.avail_out), y -= s.avail_in, g -= s.avail_out, s.total_in += y, s.total_out += g, r.total += g, r.wrap & 4 && g && (s.adler = r.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
855
+ return s.next_out = u, s.avail_out = d, s.next_in = a, s.avail_in = c, r.hold = l, r.bits = m, (r.wsize || g !== s.avail_out && r.mode < BAD && (r.mode < CHECK || i !== Z_FINISH$1)) && updatewindow(s, s.output, s.next_out, g - s.avail_out), y -= s.avail_in, g -= s.avail_out, s.total_in += y, s.total_out += g, r.total += g, r.wrap & 4 && g && (s.adler = r.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
856
856
  r.flags ? crc32(r.check, h, g, s.next_out - g) : adler32(r.check, h, g, s.next_out - g)), s.data_type = r.bits + (r.last ? 64 : 0) + (r.mode === TYPE ? 128 : 0) + (r.mode === LEN_ || r.mode === COPY_ ? 256 : 0), (y === 0 && g === 0 || i === Z_FINISH$1) && I === Z_OK$1 && (I = Z_BUF_ERROR), I;
857
857
  }, inflateEnd = (s) => {
858
858
  if (inflateStateCheck(s))
@@ -866,8 +866,8 @@ const fixedtables = (s) => {
866
866
  return (r.wrap & 2) === 0 ? Z_STREAM_ERROR$1 : (r.head = i, i.done = !1, Z_OK$1);
867
867
  }, inflateSetDictionary = (s, i) => {
868
868
  const r = i.length;
869
- let a, h, o;
870
- return inflateStateCheck(s) || (a = s.state, a.wrap !== 0 && a.mode !== DICT) ? Z_STREAM_ERROR$1 : a.mode === DICT && (h = 1, h = adler32(h, i, r, 0), h !== a.check) ? Z_DATA_ERROR$1 : (o = updatewindow(s, i, r, r), o ? (a.mode = MEM, Z_MEM_ERROR$1) : (a.havedict = 1, Z_OK$1));
869
+ let o, h, a;
870
+ return inflateStateCheck(s) || (o = s.state, o.wrap !== 0 && o.mode !== DICT) ? Z_STREAM_ERROR$1 : o.mode === DICT && (h = 1, h = adler32(h, i, r, 0), h !== o.check) ? Z_DATA_ERROR$1 : (a = updatewindow(s, i, r, r), a ? (o.mode = MEM, Z_MEM_ERROR$1) : (o.havedict = 1, Z_OK$1));
871
871
  };
872
872
  inflate$2.inflateReset = inflateReset;
873
873
  inflate$2.inflateReset2 = inflateReset2;
@@ -888,19 +888,19 @@ common$1.assign = function(s) {
888
888
  if (r) {
889
889
  if (typeof r != "object")
890
890
  throw new TypeError(r + "must be non-object");
891
- for (const a in r)
892
- _has(r, a) && (s[a] = r[a]);
891
+ for (const o in r)
892
+ _has(r, o) && (s[o] = r[o]);
893
893
  }
894
894
  }
895
895
  return s;
896
896
  };
897
897
  common$1.flattenChunks = (s) => {
898
898
  let i = 0;
899
- for (let a = 0, h = s.length; a < h; a++)
900
- i += s[a].length;
899
+ for (let o = 0, h = s.length; o < h; o++)
900
+ i += s[o].length;
901
901
  const r = new Uint8Array(i);
902
- for (let a = 0, h = 0, o = s.length; a < o; a++) {
903
- let u = s[a];
902
+ for (let o = 0, h = 0, a = s.length; o < a; o++) {
903
+ let u = s[o];
904
904
  r.set(u, h), h += u.length;
905
905
  }
906
906
  return r;
@@ -919,47 +919,47 @@ _utf8len[254] = _utf8len[254] = 1;
919
919
  strings$1.string2buf = (s) => {
920
920
  if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
921
921
  return new TextEncoder().encode(s);
922
- let i, r, a, h, o, u = s.length, c = 0;
922
+ let i, r, o, h, a, u = s.length, c = 0;
923
923
  for (h = 0; h < u; h++)
924
- r = s.charCodeAt(h), (r & 64512) === 55296 && h + 1 < u && (a = s.charCodeAt(h + 1), (a & 64512) === 56320 && (r = 65536 + (r - 55296 << 10) + (a - 56320), h++)), c += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
925
- for (i = new Uint8Array(c), o = 0, h = 0; o < c; h++)
926
- r = s.charCodeAt(h), (r & 64512) === 55296 && h + 1 < u && (a = s.charCodeAt(h + 1), (a & 64512) === 56320 && (r = 65536 + (r - 55296 << 10) + (a - 56320), h++)), r < 128 ? i[o++] = r : r < 2048 ? (i[o++] = 192 | r >>> 6, i[o++] = 128 | r & 63) : r < 65536 ? (i[o++] = 224 | r >>> 12, i[o++] = 128 | r >>> 6 & 63, i[o++] = 128 | r & 63) : (i[o++] = 240 | r >>> 18, i[o++] = 128 | r >>> 12 & 63, i[o++] = 128 | r >>> 6 & 63, i[o++] = 128 | r & 63);
924
+ r = s.charCodeAt(h), (r & 64512) === 55296 && h + 1 < u && (o = s.charCodeAt(h + 1), (o & 64512) === 56320 && (r = 65536 + (r - 55296 << 10) + (o - 56320), h++)), c += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
925
+ for (i = new Uint8Array(c), a = 0, h = 0; a < c; h++)
926
+ r = s.charCodeAt(h), (r & 64512) === 55296 && h + 1 < u && (o = s.charCodeAt(h + 1), (o & 64512) === 56320 && (r = 65536 + (r - 55296 << 10) + (o - 56320), h++)), r < 128 ? i[a++] = r : r < 2048 ? (i[a++] = 192 | r >>> 6, i[a++] = 128 | r & 63) : r < 65536 ? (i[a++] = 224 | r >>> 12, i[a++] = 128 | r >>> 6 & 63, i[a++] = 128 | r & 63) : (i[a++] = 240 | r >>> 18, i[a++] = 128 | r >>> 12 & 63, i[a++] = 128 | r >>> 6 & 63, i[a++] = 128 | r & 63);
927
927
  return i;
928
928
  };
929
929
  const buf2binstring = (s, i) => {
930
930
  if (i < 65534 && s.subarray && STR_APPLY_UIA_OK)
931
931
  return String.fromCharCode.apply(null, s.length === i ? s : s.subarray(0, i));
932
932
  let r = "";
933
- for (let a = 0; a < i; a++)
934
- r += String.fromCharCode(s[a]);
933
+ for (let o = 0; o < i; o++)
934
+ r += String.fromCharCode(s[o]);
935
935
  return r;
936
936
  };
937
937
  strings$1.buf2string = (s, i) => {
938
938
  const r = i || s.length;
939
939
  if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
940
940
  return new TextDecoder().decode(s.subarray(0, i));
941
- let a, h;
942
- const o = new Array(r * 2);
943
- for (h = 0, a = 0; a < r; ) {
944
- let u = s[a++];
941
+ let o, h;
942
+ const a = new Array(r * 2);
943
+ for (h = 0, o = 0; o < r; ) {
944
+ let u = s[o++];
945
945
  if (u < 128) {
946
- o[h++] = u;
946
+ a[h++] = u;
947
947
  continue;
948
948
  }
949
949
  let c = _utf8len[u];
950
950
  if (c > 4) {
951
- o[h++] = 65533, a += c - 1;
951
+ a[h++] = 65533, o += c - 1;
952
952
  continue;
953
953
  }
954
- for (u &= c === 2 ? 31 : c === 3 ? 15 : 7; c > 1 && a < r; )
955
- u = u << 6 | s[a++] & 63, c--;
954
+ for (u &= c === 2 ? 31 : c === 3 ? 15 : 7; c > 1 && o < r; )
955
+ u = u << 6 | s[o++] & 63, c--;
956
956
  if (c > 1) {
957
- o[h++] = 65533;
957
+ a[h++] = 65533;
958
958
  continue;
959
959
  }
960
- u < 65536 ? o[h++] = u : (u -= 65536, o[h++] = 55296 | u >> 10 & 1023, o[h++] = 56320 | u & 1023);
960
+ u < 65536 ? a[h++] = u : (u -= 65536, a[h++] = 55296 | u >> 10 & 1023, a[h++] = 56320 | u & 1023);
961
961
  }
962
- return buf2binstring(o, h);
962
+ return buf2binstring(a, h);
963
963
  };
964
964
  strings$1.utf8border = (s, i) => {
965
965
  i = i || s.length, i > s.length && (i = s.length);
@@ -1023,30 +1023,30 @@ function Inflate(s) {
1023
1023
  throw new Error(msg[r]);
1024
1024
  }
1025
1025
  Inflate.prototype.push = function(s, i) {
1026
- const r = this.strm, a = this.options.chunkSize, h = this.options.dictionary;
1027
- let o, u, c;
1026
+ const r = this.strm, o = this.options.chunkSize, h = this.options.dictionary;
1027
+ let a, u, c;
1028
1028
  if (this.ended) return !1;
1029
1029
  for (i === ~~i ? u = i : u = i === !0 ? Z_FINISH : Z_NO_FLUSH, toString.call(s) === "[object ArrayBuffer]" ? r.input = new Uint8Array(s) : r.input = s, r.next_in = 0, r.avail_in = r.input.length; ; ) {
1030
- for (r.avail_out === 0 && (r.output = new Uint8Array(a), r.next_out = 0, r.avail_out = a), o = zlib_inflate.inflate(r, u), o === Z_NEED_DICT && h && (o = zlib_inflate.inflateSetDictionary(r, h), o === Z_OK ? o = zlib_inflate.inflate(r, u) : o === Z_DATA_ERROR && (o = Z_NEED_DICT)); r.avail_in > 0 && o === Z_STREAM_END && r.state.wrap > 0 && s[r.next_in] !== 0; )
1031
- zlib_inflate.inflateReset(r), o = zlib_inflate.inflate(r, u);
1032
- switch (o) {
1030
+ for (r.avail_out === 0 && (r.output = new Uint8Array(o), r.next_out = 0, r.avail_out = o), a = zlib_inflate.inflate(r, u), a === Z_NEED_DICT && h && (a = zlib_inflate.inflateSetDictionary(r, h), a === Z_OK ? a = zlib_inflate.inflate(r, u) : a === Z_DATA_ERROR && (a = Z_NEED_DICT)); r.avail_in > 0 && a === Z_STREAM_END && r.state.wrap > 0 && s[r.next_in] !== 0; )
1031
+ zlib_inflate.inflateReset(r), a = zlib_inflate.inflate(r, u);
1032
+ switch (a) {
1033
1033
  case Z_STREAM_ERROR:
1034
1034
  case Z_DATA_ERROR:
1035
1035
  case Z_NEED_DICT:
1036
1036
  case Z_MEM_ERROR:
1037
- return this.onEnd(o), this.ended = !0, !1;
1037
+ return this.onEnd(a), this.ended = !0, !1;
1038
1038
  }
1039
- if (c = r.avail_out, r.next_out && (r.avail_out === 0 || o === Z_STREAM_END))
1039
+ if (c = r.avail_out, r.next_out && (r.avail_out === 0 || a === Z_STREAM_END))
1040
1040
  if (this.options.to === "string") {
1041
1041
  let d = strings.utf8border(r.output, r.next_out), l = r.next_out - d, m = strings.buf2string(r.output, d);
1042
- r.next_out = l, r.avail_out = a - l, l && r.output.set(r.output.subarray(d, d + l), 0), this.onData(m);
1042
+ r.next_out = l, r.avail_out = o - l, l && r.output.set(r.output.subarray(d, d + l), 0), this.onData(m);
1043
1043
  } else
1044
1044
  this.onData(
1045
1045
  r.output.length === r.next_out ? r.output : r.output.subarray(0, r.next_out)
1046
1046
  );
1047
- if (!(o === Z_OK && c === 0)) {
1048
- if (o === Z_STREAM_END)
1049
- return o = zlib_inflate.inflateEnd(this.strm), this.onEnd(o), this.ended = !0, !0;
1047
+ if (!(a === Z_OK && c === 0)) {
1048
+ if (a === Z_STREAM_END)
1049
+ return a = zlib_inflate.inflateEnd(this.strm), this.onEnd(a), this.ended = !0, !0;
1050
1050
  if (r.avail_in === 0) break;
1051
1051
  }
1052
1052
  }
@@ -1064,9 +1064,9 @@ function inflate(s, i) {
1064
1064
  return r.result;
1065
1065
  }
1066
1066
  var inflate_2 = inflate;
1067
- function f(s, i, r, a, h, o) {
1068
- let u = s.tileXYToRectangle(r, a, h);
1069
- return defined(Rectangle$1.intersection(u, i, o));
1067
+ function f(s, i, r, o, h, a) {
1068
+ let u = s.tileXYToRectangle(r, o, h);
1069
+ return defined(Rectangle$1.intersection(u, i, a));
1070
1070
  }
1071
1071
  class GeoTerrainProvider {
1072
1072
  constructor(i) {
@@ -1104,31 +1104,31 @@ class GeoTerrainProvider {
1104
1104
  };
1105
1105
  const r = i.credit;
1106
1106
  typeof r == "string" && (this._credit = new Credit(r)), this._rectangles = [];
1107
- const a = i.ellipsoid ?? Ellipsoid.WGS84;
1107
+ const o = i.ellipsoid ?? Ellipsoid.WGS84;
1108
1108
  this._tilingScheme = new GeographicTilingScheme({
1109
- ellipsoid: a
1109
+ ellipsoid: o
1110
1110
  }), this._heightmapWidth = 64, this._heightmapHeight = 64, this._levelZeroMaximumGeometricError = TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(
1111
- a,
1111
+ o,
1112
1112
  Math.min(this._heightmapWidth, this._heightmapHeight),
1113
1113
  this._tilingScheme.getNumberOfXTilesAtLevel(0)
1114
1114
  ), this._ready = !0, this._topLevel = i.topLevel ?? 5, this._bottomLevel = i.bottomLevel ?? 25;
1115
1115
  }
1116
- requestTileGeometry(i, r, a, h) {
1116
+ requestTileGeometry(i, r, o, h) {
1117
1117
  if (!this.ready)
1118
1118
  throw new DeveloperError("requestTileGeometry must not be called before ready returns true.");
1119
- if (a >= this._bottomLevel) return Promise.reject(`${a}该级别不发送请求!`);
1120
- if (a < this._topLevel)
1119
+ if (o >= this._bottomLevel) return Promise.reject(`${o}该级别不发送请求!`);
1120
+ if (o < this._topLevel)
1121
1121
  return Promise.resolve(
1122
1122
  new HeightmapTerrainData({
1123
1123
  buffer: this.getVHeightBuffer(),
1124
1124
  width: this._heightmapWidth,
1125
1125
  height: this._heightmapHeight,
1126
- childTileMask: this.getChildTileMask(i, r, a),
1126
+ childTileMask: this.getChildTileMask(i, r, o),
1127
1127
  structure: this._terrainDataStructure
1128
1128
  })
1129
1129
  );
1130
- let o = "", u = this._url;
1131
- Array.isArray(this._subdomains) && this._subdomains.length && (o = this._subdomains[(i + r) % this._subdomains.length], u = u.replace("{s}", o)), u = u.replace("{token}", this._token).replace("{x}", i).replace("{y}", r).replace("{z}", a + 1);
1130
+ let a = "", u = this._url;
1131
+ Array.isArray(this._subdomains) && this._subdomains.length && (a = this._subdomains[(i + r) % this._subdomains.length], u = u.replace("{s}", a)), u = u.replace("{token}", this._token).replace("{x}", i).replace("{y}", r).replace("{z}", o + 1);
1132
1132
  const c = Resource.fetchArrayBuffer({
1133
1133
  url: u,
1134
1134
  request: h
@@ -1139,7 +1139,7 @@ class GeoTerrainProvider {
1139
1139
  buffer: this.transformBuffer(d),
1140
1140
  width: this._heightmapWidth,
1141
1141
  height: this._heightmapHeight,
1142
- childTileMask: this.getChildTileMask(i, r, a),
1142
+ childTileMask: this.getChildTileMask(i, r, o),
1143
1143
  structure: this._terrainDataStructure
1144
1144
  });
1145
1145
  return l._skirtHeight = 6e3, l;
@@ -1150,18 +1150,18 @@ class GeoTerrainProvider {
1150
1150
  throw new DeveloperError("requestTileGeometry must not be called before ready returns true.");
1151
1151
  return this._levelZeroMaximumGeometricError / (1 << i);
1152
1152
  }
1153
- getTileDataAvailable(i, r, a) {
1154
- if (a < 25) return !0;
1153
+ getTileDataAvailable(i, r, o) {
1154
+ if (o < 25) return !0;
1155
1155
  }
1156
1156
  transformBuffer(i) {
1157
1157
  let r = 2;
1158
1158
  this._dataType === "int" ? r = 2 : this._dataType === "float" && (r = 4);
1159
- let a = i;
1160
- if (a.length !== 22500 * r) return null;
1161
- let h, o, u, c, d = new ArrayBuffer(r), l = new DataView(d), m = this._heightmapWidth, y = this._heightmapHeight, g = new Uint8Array(m * y * 4);
1159
+ let o = i;
1160
+ if (o.length !== 22500 * r) return null;
1161
+ let h, a, u, c, d = new ArrayBuffer(r), l = new DataView(d), m = this._heightmapWidth, y = this._heightmapHeight, g = new Uint8Array(m * y * 4);
1162
1162
  for (let p = 0; p < y; p++)
1163
1163
  for (let v = 0; v < m; v++) {
1164
- u = parseInt(149 * p / (y - 1)), c = parseInt(149 * v / (m - 1)), o = r * (150 * u + c), r === 4 ? (l.setInt8(0, a[o]), l.setInt8(1, a[o + 1]), l.setInt8(2, a[o + 2]), l.setInt8(3, a[o + 3]), h = l.getFloat32(0, !0)) : h = a[o] + 256 * a[o + 1], (1e4 < h || h < -2e3) && (h = 0);
1164
+ u = parseInt(149 * p / (y - 1)), c = parseInt(149 * v / (m - 1)), a = r * (150 * u + c), r === 4 ? (l.setInt8(0, o[a]), l.setInt8(1, o[a + 1]), l.setInt8(2, o[a + 2]), l.setInt8(3, o[a + 3]), h = l.getFloat32(0, !0)) : h = o[a] + 256 * o[a + 1], (1e4 < h || h < -2e3) && (h = 0);
1165
1165
  let _ = (h + 1e3) / 1e-3, w = 4 * (p * m + v);
1166
1166
  g[w] = _ / 65536, g[1 + w] = (_ - 256 * g[w] * 256) / 256, g[2 + w] = _ - 256 * g[w] * 256 - 256 * g[1 + w], g[3 + w] = 255;
1167
1167
  }
@@ -1177,13 +1177,13 @@ class GeoTerrainProvider {
1177
1177
  }
1178
1178
  return i;
1179
1179
  }
1180
- getChildTileMask(i, r, a) {
1181
- let h = new Rectangle$1(), o = this._tilingScheme, u = this._rectangles, c = o.tileXYToRectangle(i, r, a), d = 0;
1180
+ getChildTileMask(i, r, o) {
1181
+ let h = new Rectangle$1(), a = this._tilingScheme, u = this._rectangles, c = a.tileXYToRectangle(i, r, o), d = 0;
1182
1182
  for (let l = 0; l < u.length && d !== 15; ++l) {
1183
1183
  let m = u[l];
1184
- if (!(m.maxLevel <= a)) {
1184
+ if (!(m.maxLevel <= o)) {
1185
1185
  let y = m.rectangle, g = Rectangle$1.intersection(y, c, h);
1186
- defined(g) && (f(o, y, 2 * i, 2 * r, a + 1, h) && (d |= 4), f(o, y, 2 * i + 1, 2 * r, a + 1, h) && (d |= 8), f(o, y, 2 * i, 2 * r + 1, a + 1, h) && (d |= 1), f(o, y, 2 * i + 1, 2 * r + 1, a + 1, h) && (d |= 2));
1186
+ defined(g) && (f(a, y, 2 * i, 2 * r, o + 1, h) && (d |= 4), f(a, y, 2 * i + 1, 2 * r, o + 1, h) && (d |= 8), f(a, y, 2 * i, 2 * r + 1, o + 1, h) && (d |= 1), f(a, y, 2 * i + 1, 2 * r + 1, o + 1, h) && (d |= 2));
1187
1187
  }
1188
1188
  }
1189
1189
  return d;
@@ -1194,9 +1194,9 @@ function requireAspromise() {
1194
1194
  if (hasRequiredAspromise) return aspromise;
1195
1195
  hasRequiredAspromise = 1, aspromise = s;
1196
1196
  function s(i, r) {
1197
- for (var a = new Array(arguments.length - 1), h = 0, o = 2, u = !0; o < arguments.length; ) a[h++] = arguments[o++];
1197
+ for (var o = new Array(arguments.length - 1), h = 0, a = 2, u = !0; a < arguments.length; ) o[h++] = arguments[a++];
1198
1198
  return new Promise(function(d, l) {
1199
- a[h] = function(y) {
1199
+ o[h] = function(y) {
1200
1200
  if (u)
1201
1201
  if (u = !1, y) l(y);
1202
1202
  else {
@@ -1205,7 +1205,7 @@ function requireAspromise() {
1205
1205
  }
1206
1206
  };
1207
1207
  try {
1208
- i.apply(r || null, a);
1208
+ i.apply(r || null, o);
1209
1209
  } catch (m) {
1210
1210
  u && (u = !1, l(m));
1211
1211
  }
@@ -1223,8 +1223,8 @@ function requireBase64() {
1223
1223
  for (var l = 0; --d % 4 > 1 && c.charAt(d) === "="; ) ++l;
1224
1224
  return Math.ceil(c.length * 3) / 4 - l;
1225
1225
  };
1226
- for (var r = new Array(64), a = new Array(123), h = 0; h < 64; )
1227
- a[r[h] = h < 26 ? h + 65 : h < 52 ? h + 71 : h < 62 ? h - 4 : h - 59 | 43] = h++;
1226
+ for (var r = new Array(64), o = new Array(123), h = 0; h < 64; )
1227
+ o[r[h] = h < 26 ? h + 65 : h < 52 ? h + 71 : h < 62 ? h - 4 : h - 59 | 43] = h++;
1228
1228
  i.encode = function(c, d, l) {
1229
1229
  for (var m = null, y = [], g = 0, p = 0, v; d < l; ) {
1230
1230
  var _ = c[d++];
@@ -1243,12 +1243,12 @@ function requireBase64() {
1243
1243
  }
1244
1244
  return p && (y[g++] = r[v], y[g++] = 61, p === 1 && (y[g++] = 61)), m ? (g && m.push(String.fromCharCode.apply(String, y.slice(0, g))), m.join("")) : String.fromCharCode.apply(String, y.slice(0, g));
1245
1245
  };
1246
- var o = "invalid encoding";
1246
+ var a = "invalid encoding";
1247
1247
  i.decode = function(c, d, l) {
1248
1248
  for (var m = l, y = 0, g, p = 0; p < c.length; ) {
1249
1249
  var v = c.charCodeAt(p++);
1250
1250
  if (v === 61 && y > 1) break;
1251
- if ((v = a[v]) === void 0) throw Error(o);
1251
+ if ((v = o[v]) === void 0) throw Error(a);
1252
1252
  switch (y) {
1253
1253
  case 0:
1254
1254
  g = v, y = 1;
@@ -1264,7 +1264,7 @@ function requireBase64() {
1264
1264
  break;
1265
1265
  }
1266
1266
  }
1267
- if (y === 1) throw Error(o);
1267
+ if (y === 1) throw Error(a);
1268
1268
  return l - m;
1269
1269
  }, i.test = function(c) {
1270
1270
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c);
@@ -1278,23 +1278,23 @@ function requireEventemitter() {
1278
1278
  function s() {
1279
1279
  this._listeners = {};
1280
1280
  }
1281
- return s.prototype.on = function(r, a, h) {
1281
+ return s.prototype.on = function(r, o, h) {
1282
1282
  return (this._listeners[r] || (this._listeners[r] = [])).push({
1283
- fn: a,
1283
+ fn: o,
1284
1284
  ctx: h || this
1285
1285
  }), this;
1286
- }, s.prototype.off = function(r, a) {
1286
+ }, s.prototype.off = function(r, o) {
1287
1287
  if (r === void 0) this._listeners = {};
1288
- else if (a === void 0) this._listeners[r] = [];
1288
+ else if (o === void 0) this._listeners[r] = [];
1289
1289
  else
1290
- for (var h = this._listeners[r], o = 0; o < h.length; )
1291
- h[o].fn === a ? h.splice(o, 1) : ++o;
1290
+ for (var h = this._listeners[r], a = 0; a < h.length; )
1291
+ h[a].fn === o ? h.splice(a, 1) : ++a;
1292
1292
  return this;
1293
1293
  }, s.prototype.emit = function(r) {
1294
- var a = this._listeners[r];
1295
- if (a) {
1296
- for (var h = [], o = 1; o < arguments.length; ) h.push(arguments[o++]);
1297
- for (o = 0; o < a.length; ) a[o].fn.apply(a[o++].ctx, h);
1294
+ var o = this._listeners[r];
1295
+ if (o) {
1296
+ for (var h = [], a = 1; a < arguments.length; ) h.push(arguments[a++]);
1297
+ for (a = 0; a < o.length; ) o[a].fn.apply(o[a++].ctx, h);
1298
1298
  }
1299
1299
  return this;
1300
1300
  }, eventemitter;
@@ -1303,7 +1303,7 @@ var float, hasRequiredFloat;
1303
1303
  function requireFloat() {
1304
1304
  if (hasRequiredFloat) return float;
1305
1305
  hasRequiredFloat = 1, float = s(s);
1306
- function s(o) {
1306
+ function s(a) {
1307
1307
  return typeof Float32Array < "u" ? function() {
1308
1308
  var u = new Float32Array([-0]), c = new Uint8Array(u.buffer), d = c[3] === 128;
1309
1309
  function l(p, v, _) {
@@ -1312,14 +1312,14 @@ function requireFloat() {
1312
1312
  function m(p, v, _) {
1313
1313
  u[0] = p, v[_] = c[3], v[_ + 1] = c[2], v[_ + 2] = c[1], v[_ + 3] = c[0];
1314
1314
  }
1315
- o.writeFloatLE = d ? l : m, o.writeFloatBE = d ? m : l;
1315
+ a.writeFloatLE = d ? l : m, a.writeFloatBE = d ? m : l;
1316
1316
  function y(p, v) {
1317
1317
  return c[0] = p[v], c[1] = p[v + 1], c[2] = p[v + 2], c[3] = p[v + 3], u[0];
1318
1318
  }
1319
1319
  function g(p, v) {
1320
1320
  return c[3] = p[v], c[2] = p[v + 1], c[1] = p[v + 2], c[0] = p[v + 3], u[0];
1321
1321
  }
1322
- o.readFloatLE = d ? y : g, o.readFloatBE = d ? g : y;
1322
+ a.readFloatLE = d ? y : g, a.readFloatBE = d ? g : y;
1323
1323
  }() : function() {
1324
1324
  function u(d, l, m, y) {
1325
1325
  var g = l < 0 ? 1 : 0;
@@ -1341,12 +1341,12 @@ function requireFloat() {
1341
1341
  d((g << 31 | p + 127 << 23 | v) >>> 0, m, y);
1342
1342
  }
1343
1343
  }
1344
- o.writeFloatLE = u.bind(null, i), o.writeFloatBE = u.bind(null, r);
1344
+ a.writeFloatLE = u.bind(null, i), a.writeFloatBE = u.bind(null, r);
1345
1345
  function c(d, l, m) {
1346
1346
  var y = d(l, m), g = (y >> 31) * 2 + 1, p = y >>> 23 & 255, v = y & 8388607;
1347
1347
  return p === 255 ? v ? NaN : g * (1 / 0) : p === 0 ? g * 1401298464324817e-60 * v : g * Math.pow(2, p - 150) * (v + 8388608);
1348
1348
  }
1349
- o.readFloatLE = c.bind(null, a), o.readFloatBE = c.bind(null, h);
1349
+ a.readFloatLE = c.bind(null, o), a.readFloatBE = c.bind(null, h);
1350
1350
  }(), typeof Float64Array < "u" ? function() {
1351
1351
  var u = new Float64Array([-0]), c = new Uint8Array(u.buffer), d = c[7] === 128;
1352
1352
  function l(p, v, _) {
@@ -1355,14 +1355,14 @@ function requireFloat() {
1355
1355
  function m(p, v, _) {
1356
1356
  u[0] = p, v[_] = c[7], v[_ + 1] = c[6], v[_ + 2] = c[5], v[_ + 3] = c[4], v[_ + 4] = c[3], v[_ + 5] = c[2], v[_ + 6] = c[1], v[_ + 7] = c[0];
1357
1357
  }
1358
- o.writeDoubleLE = d ? l : m, o.writeDoubleBE = d ? m : l;
1358
+ a.writeDoubleLE = d ? l : m, a.writeDoubleBE = d ? m : l;
1359
1359
  function y(p, v) {
1360
1360
  return c[0] = p[v], c[1] = p[v + 1], c[2] = p[v + 2], c[3] = p[v + 3], c[4] = p[v + 4], c[5] = p[v + 5], c[6] = p[v + 6], c[7] = p[v + 7], u[0];
1361
1361
  }
1362
1362
  function g(p, v) {
1363
1363
  return c[7] = p[v], c[6] = p[v + 1], c[5] = p[v + 2], c[4] = p[v + 3], c[3] = p[v + 4], c[2] = p[v + 5], c[1] = p[v + 6], c[0] = p[v + 7], u[0];
1364
1364
  }
1365
- o.readDoubleLE = d ? y : g, o.readDoubleBE = d ? g : y;
1365
+ a.readDoubleLE = d ? y : g, a.readDoubleBE = d ? g : y;
1366
1366
  }() : function() {
1367
1367
  function u(d, l, m, y, g, p) {
1368
1368
  var v = y < 0 ? 1 : 0;
@@ -1392,25 +1392,25 @@ function requireFloat() {
1392
1392
  }
1393
1393
  }
1394
1394
  }
1395
- o.writeDoubleLE = u.bind(null, i, 0, 4), o.writeDoubleBE = u.bind(null, r, 4, 0);
1395
+ a.writeDoubleLE = u.bind(null, i, 0, 4), a.writeDoubleBE = u.bind(null, r, 4, 0);
1396
1396
  function c(d, l, m, y, g) {
1397
1397
  var p = d(y, g + l), v = d(y, g + m), _ = (v >> 31) * 2 + 1, w = v >>> 20 & 2047, O = 4294967296 * (v & 1048575) + p;
1398
1398
  return w === 2047 ? O ? NaN : _ * (1 / 0) : w === 0 ? _ * 5e-324 * O : _ * Math.pow(2, w - 1075) * (O + 4503599627370496);
1399
1399
  }
1400
- o.readDoubleLE = c.bind(null, a, 0, 4), o.readDoubleBE = c.bind(null, h, 4, 0);
1401
- }(), o;
1400
+ a.readDoubleLE = c.bind(null, o, 0, 4), a.readDoubleBE = c.bind(null, h, 4, 0);
1401
+ }(), a;
1402
1402
  }
1403
- function i(o, u, c) {
1404
- u[c] = o & 255, u[c + 1] = o >>> 8 & 255, u[c + 2] = o >>> 16 & 255, u[c + 3] = o >>> 24;
1403
+ function i(a, u, c) {
1404
+ u[c] = a & 255, u[c + 1] = a >>> 8 & 255, u[c + 2] = a >>> 16 & 255, u[c + 3] = a >>> 24;
1405
1405
  }
1406
- function r(o, u, c) {
1407
- u[c] = o >>> 24, u[c + 1] = o >>> 16 & 255, u[c + 2] = o >>> 8 & 255, u[c + 3] = o & 255;
1406
+ function r(a, u, c) {
1407
+ u[c] = a >>> 24, u[c + 1] = a >>> 16 & 255, u[c + 2] = a >>> 8 & 255, u[c + 3] = a & 255;
1408
1408
  }
1409
- function a(o, u) {
1410
- return (o[u] | o[u + 1] << 8 | o[u + 2] << 16 | o[u + 3] << 24) >>> 0;
1409
+ function o(a, u) {
1410
+ return (a[u] | a[u + 1] << 8 | a[u + 2] << 16 | a[u + 3] << 24) >>> 0;
1411
1411
  }
1412
- function h(o, u) {
1413
- return (o[u] << 24 | o[u + 1] << 16 | o[u + 2] << 8 | o[u + 3]) >>> 0;
1412
+ function h(a, u) {
1413
+ return (a[u] << 24 | a[u + 1] << 16 | a[u + 2] << 8 | a[u + 3]) >>> 0;
1414
1414
  }
1415
1415
  return float;
1416
1416
  }
@@ -1432,20 +1432,20 @@ var utf8$2 = {}, hasRequiredUtf8;
1432
1432
  function requireUtf8() {
1433
1433
  return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(s) {
1434
1434
  var i = s;
1435
- i.length = function(a) {
1436
- for (var h = 0, o = 0, u = 0; u < a.length; ++u)
1437
- o = a.charCodeAt(u), o < 128 ? h += 1 : o < 2048 ? h += 2 : (o & 64512) === 55296 && (a.charCodeAt(u + 1) & 64512) === 56320 ? (++u, h += 4) : h += 3;
1435
+ i.length = function(o) {
1436
+ for (var h = 0, a = 0, u = 0; u < o.length; ++u)
1437
+ a = o.charCodeAt(u), a < 128 ? h += 1 : a < 2048 ? h += 2 : (a & 64512) === 55296 && (o.charCodeAt(u + 1) & 64512) === 56320 ? (++u, h += 4) : h += 3;
1438
1438
  return h;
1439
- }, i.read = function(a, h, o) {
1440
- var u = o - h;
1439
+ }, i.read = function(o, h, a) {
1440
+ var u = a - h;
1441
1441
  if (u < 1) return "";
1442
- for (var c = null, d = [], l = 0, m; h < o; )
1443
- m = a[h++], m < 128 ? d[l++] = m : m > 191 && m < 224 ? d[l++] = (m & 31) << 6 | a[h++] & 63 : m > 239 && m < 365 ? (m = ((m & 7) << 18 | (a[h++] & 63) << 12 | (a[h++] & 63) << 6 | a[h++] & 63) - 65536, d[l++] = 55296 + (m >> 10), d[l++] = 56320 + (m & 1023)) : d[l++] = (m & 15) << 12 | (a[h++] & 63) << 6 | a[h++] & 63, l > 8191 && ((c || (c = [])).push(String.fromCharCode.apply(String, d)), l = 0);
1442
+ for (var c = null, d = [], l = 0, m; h < a; )
1443
+ m = o[h++], m < 128 ? d[l++] = m : m > 191 && m < 224 ? d[l++] = (m & 31) << 6 | o[h++] & 63 : m > 239 && m < 365 ? (m = ((m & 7) << 18 | (o[h++] & 63) << 12 | (o[h++] & 63) << 6 | o[h++] & 63) - 65536, d[l++] = 55296 + (m >> 10), d[l++] = 56320 + (m & 1023)) : d[l++] = (m & 15) << 12 | (o[h++] & 63) << 6 | o[h++] & 63, l > 8191 && ((c || (c = [])).push(String.fromCharCode.apply(String, d)), l = 0);
1444
1444
  return c ? (l && c.push(String.fromCharCode.apply(String, d.slice(0, l))), c.join("")) : String.fromCharCode.apply(String, d.slice(0, l));
1445
- }, i.write = function(a, h, o) {
1446
- for (var u = o, c, d, l = 0; l < a.length; ++l)
1447
- c = a.charCodeAt(l), c < 128 ? h[o++] = c : c < 2048 ? (h[o++] = c >> 6 | 192, h[o++] = c & 63 | 128) : (c & 64512) === 55296 && ((d = a.charCodeAt(l + 1)) & 64512) === 56320 ? (c = 65536 + ((c & 1023) << 10) + (d & 1023), ++l, h[o++] = c >> 18 | 240, h[o++] = c >> 12 & 63 | 128, h[o++] = c >> 6 & 63 | 128, h[o++] = c & 63 | 128) : (h[o++] = c >> 12 | 224, h[o++] = c >> 6 & 63 | 128, h[o++] = c & 63 | 128);
1448
- return o - u;
1445
+ }, i.write = function(o, h, a) {
1446
+ for (var u = a, c, d, l = 0; l < o.length; ++l)
1447
+ c = o.charCodeAt(l), c < 128 ? h[a++] = c : c < 2048 ? (h[a++] = c >> 6 | 192, h[a++] = c & 63 | 128) : (c & 64512) === 55296 && ((d = o.charCodeAt(l + 1)) & 64512) === 56320 ? (c = 65536 + ((c & 1023) << 10) + (d & 1023), ++l, h[a++] = c >> 18 | 240, h[a++] = c >> 12 & 63 | 128, h[a++] = c >> 6 & 63 | 128, h[a++] = c & 63 | 128) : (h[a++] = c >> 12 | 224, h[a++] = c >> 6 & 63 | 128, h[a++] = c & 63 | 128);
1448
+ return a - u;
1449
1449
  };
1450
1450
  }(utf8$2)), utf8$2;
1451
1451
  }
@@ -1453,10 +1453,10 @@ var pool_1, hasRequiredPool;
1453
1453
  function requirePool() {
1454
1454
  if (hasRequiredPool) return pool_1;
1455
1455
  hasRequiredPool = 1, pool_1 = s;
1456
- function s(i, r, a) {
1457
- var h = a || 8192, o = h >>> 1, u = null, c = h;
1456
+ function s(i, r, o) {
1457
+ var h = o || 8192, a = h >>> 1, u = null, c = h;
1458
1458
  return function(l) {
1459
- if (l < 1 || l > o) return i(l);
1459
+ if (l < 1 || l > a) return i(l);
1460
1460
  c + l > h && (u = i(h), c = 0);
1461
1461
  var m = r.call(u, c, c += l);
1462
1462
  return c & 7 && (c = (c | 7) + 1), m;
@@ -1469,8 +1469,8 @@ function requireLongbits() {
1469
1469
  if (hasRequiredLongbits) return longbits;
1470
1470
  hasRequiredLongbits = 1, longbits = i;
1471
1471
  var s = requireMinimal();
1472
- function i(o, u) {
1473
- this.lo = o >>> 0, this.hi = u >>> 0;
1472
+ function i(a, u) {
1473
+ this.lo = a >>> 0, this.hi = u >>> 0;
1474
1474
  }
1475
1475
  var r = i.zero = new i(0, 0);
1476
1476
  r.toNumber = function() {
@@ -1480,7 +1480,7 @@ function requireLongbits() {
1480
1480
  }, r.length = function() {
1481
1481
  return 1;
1482
1482
  };
1483
- var a = i.zeroHash = "\0\0\0\0\0\0\0\0";
1483
+ var o = i.zeroHash = "\0\0\0\0\0\0\0\0";
1484
1484
  i.fromNumber = function(u) {
1485
1485
  if (u === 0) return r;
1486
1486
  var c = u < 0;
@@ -1511,7 +1511,7 @@ function requireLongbits() {
1511
1511
  };
1512
1512
  var h = String.prototype.charCodeAt;
1513
1513
  return i.fromHash = function(u) {
1514
- return u === a ? r : new i(
1514
+ return u === o ? r : new i(
1515
1515
  (h.call(u, 0) | h.call(u, 1) << 8 | h.call(u, 2) << 16 | h.call(u, 3) << 24) >>> 0,
1516
1516
  (h.call(u, 4) | h.call(u, 5) << 8 | h.call(u, 6) << 16 | h.call(u, 7) << 24) >>> 0
1517
1517
  );
@@ -1548,21 +1548,21 @@ function requireMinimal() {
1548
1548
  /* istanbul ignore next */
1549
1549
  {}
1550
1550
  ), i.isInteger = Number.isInteger || /* istanbul ignore next */
1551
- function(o) {
1552
- return typeof o == "number" && isFinite(o) && Math.floor(o) === o;
1553
- }, i.isString = function(o) {
1554
- return typeof o == "string" || o instanceof String;
1555
- }, i.isObject = function(o) {
1556
- return o && typeof o == "object";
1551
+ function(a) {
1552
+ return typeof a == "number" && isFinite(a) && Math.floor(a) === a;
1553
+ }, i.isString = function(a) {
1554
+ return typeof a == "string" || a instanceof String;
1555
+ }, i.isObject = function(a) {
1556
+ return a && typeof a == "object";
1557
1557
  }, i.isset = /**
1558
1558
  * Checks if a property on a message is considered to be present.
1559
1559
  * @param {Object} obj Plain object or message instance
1560
1560
  * @param {string} prop Property name
1561
1561
  * @returns {boolean} `true` if considered to be present, otherwise `false`
1562
1562
  */
1563
- i.isSet = function(o, u) {
1564
- var c = o[u];
1565
- return c != null && o.hasOwnProperty(u) ? typeof c != "object" || (Array.isArray(c) ? c.length : Object.keys(c).length) > 0 : !1;
1563
+ i.isSet = function(a, u) {
1564
+ var c = a[u];
1565
+ return c != null && a.hasOwnProperty(u) ? typeof c != "object" || (Array.isArray(c) ? c.length : Object.keys(c).length) > 0 : !1;
1566
1566
  }, i.Buffer = function() {
1567
1567
  try {
1568
1568
  var h = i.inquire("buffer").Buffer;
@@ -1573,39 +1573,39 @@ function requireMinimal() {
1573
1573
  } catch {
1574
1574
  return null;
1575
1575
  }
1576
- }(), i._Buffer_from = null, i._Buffer_allocUnsafe = null, i.newBuffer = function(o) {
1577
- return typeof o == "number" ? i.Buffer ? i._Buffer_allocUnsafe(o) : new i.Array(o) : i.Buffer ? i._Buffer_from(o) : typeof Uint8Array > "u" ? o : new Uint8Array(o);
1576
+ }(), i._Buffer_from = null, i._Buffer_allocUnsafe = null, i.newBuffer = function(a) {
1577
+ return typeof a == "number" ? i.Buffer ? i._Buffer_allocUnsafe(a) : new i.Array(a) : i.Buffer ? i._Buffer_from(a) : typeof Uint8Array > "u" ? a : new Uint8Array(a);
1578
1578
  }, i.Array = typeof Uint8Array < "u" ? Uint8Array : Array, i.Long = /* istanbul ignore next */
1579
1579
  i.global.dcodeIO && /* istanbul ignore next */
1580
1580
  i.global.dcodeIO.Long || /* istanbul ignore next */
1581
- i.global.Long || i.inquire("long"), i.key2Re = /^true|false|0|1$/, i.key32Re = /^-?(?:0|[1-9][0-9]*)$/, i.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, i.longToHash = function(o) {
1582
- return o ? i.LongBits.from(o).toHash() : i.LongBits.zeroHash;
1583
- }, i.longFromHash = function(o, u) {
1584
- var c = i.LongBits.fromHash(o);
1581
+ i.global.Long || i.inquire("long"), i.key2Re = /^true|false|0|1$/, i.key32Re = /^-?(?:0|[1-9][0-9]*)$/, i.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, i.longToHash = function(a) {
1582
+ return a ? i.LongBits.from(a).toHash() : i.LongBits.zeroHash;
1583
+ }, i.longFromHash = function(a, u) {
1584
+ var c = i.LongBits.fromHash(a);
1585
1585
  return i.Long ? i.Long.fromBits(c.lo, c.hi, u) : c.toNumber(!!u);
1586
1586
  };
1587
- function r(h, o, u) {
1588
- for (var c = Object.keys(o), d = 0; d < c.length; ++d)
1589
- (h[c[d]] === void 0 || !u) && (h[c[d]] = o[c[d]]);
1587
+ function r(h, a, u) {
1588
+ for (var c = Object.keys(a), d = 0; d < c.length; ++d)
1589
+ (h[c[d]] === void 0 || !u) && (h[c[d]] = a[c[d]]);
1590
1590
  return h;
1591
1591
  }
1592
- i.merge = r, i.lcFirst = function(o) {
1593
- return o.charAt(0).toLowerCase() + o.substring(1);
1592
+ i.merge = r, i.lcFirst = function(a) {
1593
+ return a.charAt(0).toLowerCase() + a.substring(1);
1594
1594
  };
1595
- function a(h) {
1596
- function o(u, c) {
1597
- if (!(this instanceof o)) return new o(u, c);
1595
+ function o(h) {
1596
+ function a(u, c) {
1597
+ if (!(this instanceof a)) return new a(u, c);
1598
1598
  Object.defineProperty(this, "message", {
1599
1599
  get: function() {
1600
1600
  return u;
1601
1601
  }
1602
- }), Error.captureStackTrace ? Error.captureStackTrace(this, o) : Object.defineProperty(this, "stack", {
1602
+ }), Error.captureStackTrace ? Error.captureStackTrace(this, a) : Object.defineProperty(this, "stack", {
1603
1603
  value: new Error().stack || ""
1604
1604
  }), c && r(this, c);
1605
1605
  }
1606
- return o.prototype = Object.create(Error.prototype, {
1606
+ return a.prototype = Object.create(Error.prototype, {
1607
1607
  constructor: {
1608
- value: o,
1608
+ value: a,
1609
1609
  writable: !0,
1610
1610
  enumerable: !1,
1611
1611
  configurable: !0
@@ -1630,19 +1630,19 @@ function requireMinimal() {
1630
1630
  enumerable: !1,
1631
1631
  configurable: !0
1632
1632
  }
1633
- }), o;
1633
+ }), a;
1634
1634
  }
1635
- i.newError = a, i.ProtocolError = a("ProtocolError"), i.oneOfGetter = function(o) {
1636
- for (var u = {}, c = 0; c < o.length; ++c) u[o[c]] = 1;
1635
+ i.newError = o, i.ProtocolError = o("ProtocolError"), i.oneOfGetter = function(a) {
1636
+ for (var u = {}, c = 0; c < a.length; ++c) u[a[c]] = 1;
1637
1637
  return function() {
1638
1638
  for (var d = Object.keys(this), l = d.length - 1; l > -1; --l)
1639
1639
  if (u[d[l]] === 1 && this[d[l]] !== void 0 && this[d[l]] !== null)
1640
1640
  return d[l];
1641
1641
  };
1642
- }, i.oneOfSetter = function(o) {
1642
+ }, i.oneOfSetter = function(a) {
1643
1643
  return function(u) {
1644
- for (var c = 0; c < o.length; ++c)
1645
- o[c] !== u && delete this[o[c]];
1644
+ for (var c = 0; c < a.length; ++c)
1645
+ a[c] !== u && delete this[a[c]];
1646
1646
  };
1647
1647
  }, i.toJSONOptions = {
1648
1648
  longs: String,
@@ -1692,8 +1692,8 @@ Writer$1.alloc = function s(i) {
1692
1692
  return new util$7.Array(i);
1693
1693
  };
1694
1694
  util$7.Array !== Array && (Writer$1.alloc = util$7.pool(Writer$1.alloc, util$7.Array.prototype.subarray));
1695
- Writer$1.prototype._push = function s(i, r, a) {
1696
- return this.tail = this.tail.next = new Op(i, r, a), this.len += r, this;
1695
+ Writer$1.prototype._push = function s(i, r, o) {
1696
+ return this.tail = this.tail.next = new Op(i, r, o), this.len += r, this;
1697
1697
  };
1698
1698
  function writeByte(s, i, r) {
1699
1699
  i[r] = s & 255;
@@ -1757,20 +1757,20 @@ Writer$1.prototype.float = function s(i) {
1757
1757
  Writer$1.prototype.double = function s(i) {
1758
1758
  return this._push(util$7.float.writeDoubleLE, 8, i);
1759
1759
  };
1760
- var writeBytes = util$7.Array.prototype.set ? function s(i, r, a) {
1761
- r.set(i, a);
1760
+ var writeBytes = util$7.Array.prototype.set ? function s(i, r, o) {
1761
+ r.set(i, o);
1762
1762
  } : (
1763
1763
  /* istanbul ignore next */
1764
- function s(i, r, a) {
1765
- for (var h = 0; h < i.length; ++h) r[a + h] = i[h];
1764
+ function s(i, r, o) {
1765
+ for (var h = 0; h < i.length; ++h) r[o + h] = i[h];
1766
1766
  }
1767
1767
  );
1768
1768
  Writer$1.prototype.bytes = function s(i) {
1769
1769
  var r = i.length >>> 0;
1770
1770
  if (!r) return this._push(writeByte, 1, 0);
1771
1771
  if (util$7.isString(i)) {
1772
- var a = Writer$1.alloc(r = base64.length(i));
1773
- base64.decode(i, a, 0), i = a;
1772
+ var o = Writer$1.alloc(r = base64.length(i));
1773
+ base64.decode(i, o, 0), i = o;
1774
1774
  }
1775
1775
  return this.uint32(r)._push(writeBytes, r, i);
1776
1776
  };
@@ -1785,12 +1785,12 @@ Writer$1.prototype.reset = function s() {
1785
1785
  return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new Op(noop, 0, 0), this.len = 0), this;
1786
1786
  };
1787
1787
  Writer$1.prototype.ldelim = function s() {
1788
- var i = this.head, r = this.tail, a = this.len;
1789
- return this.reset().uint32(a), a && (this.tail.next = i.next, this.tail = r, this.len += a), this;
1788
+ var i = this.head, r = this.tail, o = this.len;
1789
+ return this.reset().uint32(o), o && (this.tail.next = i.next, this.tail = r, this.len += o), this;
1790
1790
  };
1791
1791
  Writer$1.prototype.finish = function s() {
1792
- for (var i = this.head.next, r = this.constructor.alloc(this.len), a = 0; i; )
1793
- i.fn(i.val, r, a), a += i.len, i = i.next;
1792
+ for (var i = this.head.next, r = this.constructor.alloc(this.len), o = 0; i; )
1793
+ i.fn(i.val, r, o), o += i.len, i = i.next;
1794
1794
  return r;
1795
1795
  };
1796
1796
  Writer$1._configure = function(s) {
@@ -1803,16 +1803,16 @@ function BufferWriter() {
1803
1803
  Writer.call(this);
1804
1804
  }
1805
1805
  BufferWriter._configure = function() {
1806
- BufferWriter.alloc = util$6._Buffer_allocUnsafe, BufferWriter.writeBytesBuffer = util$6.Buffer && util$6.Buffer.prototype instanceof Uint8Array && util$6.Buffer.prototype.set.name === "set" ? function(i, r, a) {
1807
- r.set(i, a);
1806
+ BufferWriter.alloc = util$6._Buffer_allocUnsafe, BufferWriter.writeBytesBuffer = util$6.Buffer && util$6.Buffer.prototype instanceof Uint8Array && util$6.Buffer.prototype.set.name === "set" ? function(i, r, o) {
1807
+ r.set(i, o);
1808
1808
  } : (
1809
1809
  /* istanbul ignore next */
1810
- function(i, r, a) {
1810
+ function(i, r, o) {
1811
1811
  if (i.copy)
1812
- i.copy(r, a, 0, i.length);
1812
+ i.copy(r, o, 0, i.length);
1813
1813
  else
1814
1814
  for (var h = 0; h < i.length; )
1815
- r[a++] = i[h++];
1815
+ r[o++] = i[h++];
1816
1816
  }
1817
1817
  );
1818
1818
  };
@@ -1935,15 +1935,15 @@ Reader$1.prototype.double = function s() {
1935
1935
  return this.pos += 8, i;
1936
1936
  };
1937
1937
  Reader$1.prototype.bytes = function s() {
1938
- var i = this.uint32(), r = this.pos, a = this.pos + i;
1939
- if (a > this.len) throw indexOutOfRange(this, i);
1938
+ var i = this.uint32(), r = this.pos, o = this.pos + i;
1939
+ if (o > this.len) throw indexOutOfRange(this, i);
1940
1940
  if (this.pos += i, Array.isArray(this.buf))
1941
- return this.buf.slice(r, a);
1942
- if (r === a) {
1941
+ return this.buf.slice(r, o);
1942
+ if (r === o) {
1943
1943
  var h = util$5.Buffer;
1944
1944
  return h ? h.alloc(0) : new this.buf.constructor(0);
1945
1945
  }
1946
- return this._slice.call(this.buf, r, a);
1946
+ return this._slice.call(this.buf, r, o);
1947
1947
  };
1948
1948
  Reader$1.prototype.string = function s() {
1949
1949
  var i = this.bytes();
@@ -2027,13 +2027,13 @@ function Service$1(s, i, r) {
2027
2027
  if (typeof s != "function") throw TypeError("rpcImpl must be a function");
2028
2028
  util$3.EventEmitter.call(this), this.rpcImpl = s, this.requestDelimited = !!i, this.responseDelimited = !!r;
2029
2029
  }
2030
- Service$1.prototype.rpcCall = function s(i, r, a, h, o) {
2030
+ Service$1.prototype.rpcCall = function s(i, r, o, h, a) {
2031
2031
  if (!h) throw TypeError("request must be specified");
2032
2032
  var u = this;
2033
- if (!o) return util$3.asPromise(s, u, i, r, a, h);
2033
+ if (!a) return util$3.asPromise(s, u, i, r, o, h);
2034
2034
  if (!u.rpcImpl) {
2035
2035
  setTimeout(function() {
2036
- o(Error("already ended"));
2036
+ a(Error("already ended"));
2037
2037
  }, 0);
2038
2038
  return;
2039
2039
  }
@@ -2043,7 +2043,7 @@ Service$1.prototype.rpcCall = function s(i, r, a, h, o) {
2043
2043
  r[u.requestDelimited ? "encodeDelimited" : "encode"](h).finish(),
2044
2044
  function(d, l) {
2045
2045
  if (d)
2046
- return u.emit("error", d, i), o(d);
2046
+ return u.emit("error", d, i), a(d);
2047
2047
  if (l === null) {
2048
2048
  u.end(
2049
2049
  /* endedByRPC */
@@ -2051,18 +2051,18 @@ Service$1.prototype.rpcCall = function s(i, r, a, h, o) {
2051
2051
  );
2052
2052
  return;
2053
2053
  }
2054
- if (!(l instanceof a))
2054
+ if (!(l instanceof o))
2055
2055
  try {
2056
- l = a[u.responseDelimited ? "decodeDelimited" : "decode"](l);
2056
+ l = o[u.responseDelimited ? "decodeDelimited" : "decode"](l);
2057
2057
  } catch (m) {
2058
- return u.emit("error", m, i), o(m);
2058
+ return u.emit("error", m, i), a(m);
2059
2059
  }
2060
- return u.emit("data", l, i), o(null, l);
2060
+ return u.emit("data", l, i), a(null, l);
2061
2061
  }
2062
2062
  );
2063
2063
  } catch (c) {
2064
2064
  u.emit("error", c, i), setTimeout(function() {
2065
- o(c);
2065
+ a(c);
2066
2066
  }, 0);
2067
2067
  return;
2068
2068
  }
@@ -2087,19 +2087,19 @@ var util$2 = { exports: {} }, codegen_1 = codegen;
2087
2087
  function codegen(s, i) {
2088
2088
  typeof s == "string" && (i = s, s = void 0);
2089
2089
  var r = [];
2090
- function a(o) {
2091
- if (typeof o != "string") {
2090
+ function o(a) {
2091
+ if (typeof a != "string") {
2092
2092
  var u = h();
2093
- if (codegen.verbose && console.warn("codegen: " + u), u = "return " + u, o) {
2094
- for (var c = Object.keys(o), d = new Array(c.length + 1), l = new Array(c.length), m = 0; m < c.length; )
2095
- d[m] = c[m], l[m] = o[c[m++]];
2093
+ if (codegen.verbose && console.warn("codegen: " + u), u = "return " + u, a) {
2094
+ for (var c = Object.keys(a), d = new Array(c.length + 1), l = new Array(c.length), m = 0; m < c.length; )
2095
+ d[m] = c[m], l[m] = a[c[m++]];
2096
2096
  return d[m] = u, Function.apply(null, d).apply(null, l);
2097
2097
  }
2098
2098
  return Function(u)();
2099
2099
  }
2100
2100
  for (var y = new Array(arguments.length - 1), g = 0; g < y.length; )
2101
2101
  y[g] = arguments[++g];
2102
- if (g = 0, o = o.replace(/%([%dfijs])/g, function(v, _) {
2102
+ if (g = 0, a = a.replace(/%([%dfijs])/g, function(v, _) {
2103
2103
  var w = y[g++];
2104
2104
  switch (_) {
2105
2105
  case "d":
@@ -2114,28 +2114,28 @@ function codegen(s, i) {
2114
2114
  }
2115
2115
  return "%";
2116
2116
  }), g !== y.length) throw Error("parameter count mismatch");
2117
- return r.push(o), a;
2117
+ return r.push(a), o;
2118
2118
  }
2119
- function h(o) {
2120
- return "function " + (o || i || "") + "(" + (s && s.join(",") || "") + `){
2119
+ function h(a) {
2120
+ return "function " + (a || i || "") + "(" + (s && s.join(",") || "") + `){
2121
2121
  ` + r.join(`
2122
2122
  `) + `
2123
2123
  }`;
2124
2124
  }
2125
- return a.toString = h, a;
2125
+ return o.toString = h, o;
2126
2126
  }
2127
2127
  codegen.verbose = !1;
2128
2128
  var fetch_1 = fetch, asPromise = requireAspromise(), inquire = requireInquire(), fs = inquire("fs");
2129
2129
  function fetch(s, i, r) {
2130
- return typeof i == "function" ? (r = i, i = {}) : i || (i = {}), r ? !i.xhr && fs && fs.readFile ? fs.readFile(s, function(h, o) {
2131
- return h && typeof XMLHttpRequest < "u" ? fetch.xhr(s, i, r) : h ? r(h) : r(null, i.binary ? o : o.toString("utf8"));
2130
+ return typeof i == "function" ? (r = i, i = {}) : i || (i = {}), r ? !i.xhr && fs && fs.readFile ? fs.readFile(s, function(h, a) {
2131
+ return h && typeof XMLHttpRequest < "u" ? fetch.xhr(s, i, r) : h ? r(h) : r(null, i.binary ? a : a.toString("utf8"));
2132
2132
  }) : fetch.xhr(s, i, r) : asPromise(fetch, this, s, i);
2133
2133
  }
2134
- fetch.xhr = function s(i, r, a) {
2134
+ fetch.xhr = function s(i, r, o) {
2135
2135
  var h = new XMLHttpRequest();
2136
2136
  h.onreadystatechange = function() {
2137
2137
  if (h.readyState === 4) {
2138
- if (h.status !== 0 && h.status !== 200) return a(Error("status " + h.status));
2138
+ if (h.status !== 0 && h.status !== 200) return o(Error("status " + h.status));
2139
2139
  if (r.binary) {
2140
2140
  var u = h.response;
2141
2141
  if (!u) {
@@ -2143,9 +2143,9 @@ fetch.xhr = function s(i, r, a) {
2143
2143
  for (var c = 0; c < h.responseText.length; ++c)
2144
2144
  u.push(h.responseText.charCodeAt(c) & 255);
2145
2145
  }
2146
- return a(null, typeof Uint8Array < "u" ? new Uint8Array(u) : u);
2146
+ return o(null, typeof Uint8Array < "u" ? new Uint8Array(u) : u);
2147
2147
  }
2148
- return a(null, h.responseText);
2148
+ return o(null, h.responseText);
2149
2149
  }
2150
2150
  }, r.binary && ("overrideMimeType" in h && h.overrideMimeType("text/plain; charset=x-user-defined"), h.responseType = "arraybuffer"), h.open("GET", i), h.send();
2151
2151
  };
@@ -2157,32 +2157,32 @@ var path = {};
2157
2157
  * @param {string} path Path to test
2158
2158
  * @returns {boolean} `true` if path is absolute
2159
2159
  */
2160
- i.isAbsolute = function(o) {
2161
- return /^(?:\/|\w+:)/.test(o);
2160
+ i.isAbsolute = function(a) {
2161
+ return /^(?:\/|\w+:)/.test(a);
2162
2162
  }
2163
- ), a = (
2163
+ ), o = (
2164
2164
  /**
2165
2165
  * Normalizes the specified path.
2166
2166
  * @param {string} path Path to normalize
2167
2167
  * @returns {string} Normalized path
2168
2168
  */
2169
- i.normalize = function(o) {
2170
- o = o.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
2171
- var u = o.split("/"), c = r(o), d = "";
2169
+ i.normalize = function(a) {
2170
+ a = a.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
2171
+ var u = a.split("/"), c = r(a), d = "";
2172
2172
  c && (d = u.shift() + "/");
2173
2173
  for (var l = 0; l < u.length; )
2174
2174
  u[l] === ".." ? l > 0 && u[l - 1] !== ".." ? u.splice(--l, 2) : c ? u.splice(l, 1) : ++l : u[l] === "." ? u.splice(l, 1) : ++l;
2175
2175
  return d + u.join("/");
2176
2176
  }
2177
2177
  );
2178
- i.resolve = function(o, u, c) {
2179
- return c || (u = a(u)), r(u) ? u : (c || (o = a(o)), (o = o.replace(/(?:\/|^)[^/]+$/, "")).length ? a(o + "/" + u) : u);
2178
+ i.resolve = function(a, u, c) {
2179
+ return c || (u = o(u)), r(u) ? u : (c || (a = o(a)), (a = a.replace(/(?:\/|^)[^/]+$/, "")).length ? o(a + "/" + u) : u);
2180
2180
  };
2181
2181
  })(path);
2182
2182
  var types$1 = {}, hasRequiredTypes;
2183
2183
  function requireTypes() {
2184
2184
  return hasRequiredTypes || (hasRequiredTypes = 1, function(s) {
2185
- var i = s, r = requireUtil(), a = [
2185
+ var i = s, r = requireUtil(), o = [
2186
2186
  "double",
2187
2187
  // 0
2188
2188
  "float",
@@ -2214,9 +2214,9 @@ function requireTypes() {
2214
2214
  "bytes"
2215
2215
  // 14
2216
2216
  ];
2217
- function h(o, u) {
2217
+ function h(a, u) {
2218
2218
  var c = 0, d = {};
2219
- for (u |= 0; c < o.length; ) d[a[c + u]] = o[c++];
2219
+ for (u |= 0; c < a.length; ) d[o[c + u]] = a[c++];
2220
2220
  return d;
2221
2221
  }
2222
2222
  i.basic = h([
@@ -2361,17 +2361,17 @@ function requireField() {
2361
2361
  hasRequiredField = 1, field = u;
2362
2362
  var s = requireObject();
2363
2363
  ((u.prototype = Object.create(s.prototype)).constructor = u).className = "Field";
2364
- var i = require_enum(), r = requireTypes(), a = requireUtil(), h, o = /^required|optional|repeated$/;
2364
+ var i = require_enum(), r = requireTypes(), o = requireUtil(), h, a = /^required|optional|repeated$/;
2365
2365
  u.fromJSON = function(d, l) {
2366
2366
  return new u(d, l.id, l.type, l.rule, l.extend, l.options, l.comment);
2367
2367
  };
2368
2368
  function u(c, d, l, m, y, g, p) {
2369
- if (a.isObject(m) ? (p = y, g = m, m = y = void 0) : a.isObject(y) && (p = g, g = y, y = void 0), s.call(this, c, g), !a.isInteger(d) || d < 0) throw TypeError("id must be a non-negative integer");
2370
- if (!a.isString(l)) throw TypeError("type must be a string");
2371
- if (m !== void 0 && !o.test(m = m.toString().toLowerCase()))
2369
+ if (o.isObject(m) ? (p = y, g = m, m = y = void 0) : o.isObject(y) && (p = g, g = y, y = void 0), s.call(this, c, g), !o.isInteger(d) || d < 0) throw TypeError("id must be a non-negative integer");
2370
+ if (!o.isString(l)) throw TypeError("type must be a string");
2371
+ if (m !== void 0 && !a.test(m = m.toString().toLowerCase()))
2372
2372
  throw TypeError("rule must be a string rule");
2373
- if (y !== void 0 && !a.isString(y)) throw TypeError("extend must be a string");
2374
- m === "proto3_optional" && (m = "optional"), this.rule = m && m !== "optional" ? m : void 0, this.type = l, this.id = d, this.extend = y || void 0, this.required = m === "required", this.optional = !this.required, this.repeated = m === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = a.Long ? r.long[l] !== void 0 : (
2373
+ if (y !== void 0 && !o.isString(y)) throw TypeError("extend must be a string");
2374
+ m === "proto3_optional" && (m = "optional"), this.rule = m && m !== "optional" ? m : void 0, this.type = l, this.id = d, this.extend = y || void 0, this.required = m === "required", this.optional = !this.required, this.repeated = m === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = o.Long ? r.long[l] !== void 0 : (
2375
2375
  /* istanbul ignore next */
2376
2376
  !1
2377
2377
  ), this.bytes = l === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = p;
@@ -2384,7 +2384,7 @@ function requireField() {
2384
2384
  return d === "packed" && (this._packed = null), s.prototype.setOption.call(this, d, l, m);
2385
2385
  }, u.prototype.toJSON = function(d) {
2386
2386
  var l = d ? !!d.keepComments : !1;
2387
- return a.toObject([
2387
+ return o.toObject([
2388
2388
  "rule",
2389
2389
  this.rule !== "optional" && this.rule || void 0,
2390
2390
  "type",
@@ -2401,23 +2401,23 @@ function requireField() {
2401
2401
  }, u.prototype.resolve = function() {
2402
2402
  if (this.resolved) return this;
2403
2403
  if ((this.typeDefault = r.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof h ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof i && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof i)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
2404
- this.typeDefault = a.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
2404
+ this.typeDefault = o.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
2405
2405
  else if (this.bytes && typeof this.typeDefault == "string") {
2406
2406
  var d;
2407
- a.base64.test(this.typeDefault) ? a.base64.decode(
2407
+ o.base64.test(this.typeDefault) ? o.base64.decode(
2408
2408
  this.typeDefault,
2409
- d = a.newBuffer(a.base64.length(this.typeDefault)),
2409
+ d = o.newBuffer(o.base64.length(this.typeDefault)),
2410
2410
  0
2411
- ) : a.utf8.write(
2411
+ ) : o.utf8.write(
2412
2412
  this.typeDefault,
2413
- d = a.newBuffer(a.utf8.length(this.typeDefault)),
2413
+ d = o.newBuffer(o.utf8.length(this.typeDefault)),
2414
2414
  0
2415
2415
  ), this.typeDefault = d;
2416
2416
  }
2417
- return this.map ? this.defaultValue = a.emptyObject : this.repeated ? this.defaultValue = a.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof h && (this.parent.ctor.prototype[this.name] = this.defaultValue), s.prototype.resolve.call(this);
2417
+ return this.map ? this.defaultValue = o.emptyObject : this.repeated ? this.defaultValue = o.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof h && (this.parent.ctor.prototype[this.name] = this.defaultValue), s.prototype.resolve.call(this);
2418
2418
  }, u.d = function(d, l, m, y) {
2419
- return typeof l == "function" ? l = a.decorateType(l).name : l && typeof l == "object" && (l = a.decorateEnum(l).name), function(p, v) {
2420
- a.decorateType(p.constructor).add(
2419
+ return typeof l == "function" ? l = o.decorateType(l).name : l && typeof l == "object" && (l = o.decorateEnum(l).name), function(p, v) {
2420
+ o.decorateType(p.constructor).add(
2421
2421
  new u(v, d, l, m, {
2422
2422
  default: y
2423
2423
  })
@@ -2430,18 +2430,18 @@ function requireField() {
2430
2430
  var oneof, hasRequiredOneof;
2431
2431
  function requireOneof() {
2432
2432
  if (hasRequiredOneof) return oneof;
2433
- hasRequiredOneof = 1, oneof = a;
2433
+ hasRequiredOneof = 1, oneof = o;
2434
2434
  var s = requireObject();
2435
- ((a.prototype = Object.create(s.prototype)).constructor = a).className = "OneOf";
2435
+ ((o.prototype = Object.create(s.prototype)).constructor = o).className = "OneOf";
2436
2436
  var i = requireField(), r = requireUtil();
2437
- function a(o, u, c, d) {
2438
- if (Array.isArray(u) || (c = u, u = void 0), s.call(this, o, c), !(u === void 0 || Array.isArray(u)))
2437
+ function o(a, u, c, d) {
2438
+ if (Array.isArray(u) || (c = u, u = void 0), s.call(this, a, c), !(u === void 0 || Array.isArray(u)))
2439
2439
  throw TypeError("fieldNames must be an Array");
2440
2440
  this.oneof = u || [], this.fieldsArray = [], this.comment = d;
2441
2441
  }
2442
- a.fromJSON = function(u, c) {
2443
- return new a(u, c.oneof, c.options, c.comment);
2444
- }, a.prototype.toJSON = function(u) {
2442
+ o.fromJSON = function(u, c) {
2443
+ return new o(u, c.oneof, c.options, c.comment);
2444
+ }, o.prototype.toJSON = function(u) {
2445
2445
  var c = u ? !!u.keepComments : !1;
2446
2446
  return r.toObject([
2447
2447
  "options",
@@ -2452,34 +2452,34 @@ function requireOneof() {
2452
2452
  c ? this.comment : void 0
2453
2453
  ]);
2454
2454
  };
2455
- function h(o) {
2456
- if (o.parent)
2457
- for (var u = 0; u < o.fieldsArray.length; ++u)
2458
- o.fieldsArray[u].parent || o.parent.add(o.fieldsArray[u]);
2455
+ function h(a) {
2456
+ if (a.parent)
2457
+ for (var u = 0; u < a.fieldsArray.length; ++u)
2458
+ a.fieldsArray[u].parent || a.parent.add(a.fieldsArray[u]);
2459
2459
  }
2460
- return a.prototype.add = function(u) {
2460
+ return o.prototype.add = function(u) {
2461
2461
  if (!(u instanceof i)) throw TypeError("field must be a Field");
2462
2462
  return u.parent && u.parent !== this.parent && u.parent.remove(u), this.oneof.push(u.name), this.fieldsArray.push(u), u.partOf = this, h(this), this;
2463
- }, a.prototype.remove = function(u) {
2463
+ }, o.prototype.remove = function(u) {
2464
2464
  if (!(u instanceof i)) throw TypeError("field must be a Field");
2465
2465
  var c = this.fieldsArray.indexOf(u);
2466
2466
  if (c < 0) throw Error(u + " is not a member of " + this);
2467
2467
  return this.fieldsArray.splice(c, 1), c = this.oneof.indexOf(u.name), c > -1 && this.oneof.splice(c, 1), u.partOf = null, this;
2468
- }, a.prototype.onAdd = function(u) {
2468
+ }, o.prototype.onAdd = function(u) {
2469
2469
  s.prototype.onAdd.call(this, u);
2470
2470
  for (var c = this, d = 0; d < this.oneof.length; ++d) {
2471
2471
  var l = u.get(this.oneof[d]);
2472
2472
  l && !l.partOf && (l.partOf = c, c.fieldsArray.push(l));
2473
2473
  }
2474
2474
  h(this);
2475
- }, a.prototype.onRemove = function(u) {
2475
+ }, o.prototype.onRemove = function(u) {
2476
2476
  for (var c = 0, d; c < this.fieldsArray.length; ++c)
2477
2477
  (d = this.fieldsArray[c]).parent && d.parent.remove(d);
2478
2478
  s.prototype.onRemove.call(this, u);
2479
- }, a.d = function() {
2479
+ }, o.d = function() {
2480
2480
  for (var u = new Array(arguments.length), c = 0; c < arguments.length; ) u[c] = arguments[c++];
2481
2481
  return function(l, m) {
2482
- r.decorateType(l.constructor).add(new a(m, u)), Object.defineProperty(l, m, {
2482
+ r.decorateType(l.constructor).add(new o(m, u)), Object.defineProperty(l, m, {
2483
2483
  get: r.oneOfGetter(u),
2484
2484
  set: r.oneOfSetter(u)
2485
2485
  });
@@ -2492,7 +2492,7 @@ function requireNamespace() {
2492
2492
  hasRequiredNamespace = 1, namespace = d;
2493
2493
  var s = requireObject();
2494
2494
  ((d.prototype = Object.create(s.prototype)).constructor = d).className = "Namespace";
2495
- var i = requireField(), r = requireUtil(), a = requireOneof(), h, o, u;
2495
+ var i = requireField(), r = requireUtil(), o = requireOneof(), h, a, u;
2496
2496
  d.fromJSON = function(y, g) {
2497
2497
  return new d(y, g.options).addJSON(g.nested);
2498
2498
  };
@@ -2538,7 +2538,7 @@ function requireNamespace() {
2538
2538
  for (var p = Object.keys(y), v = 0, _; v < p.length; ++v)
2539
2539
  _ = y[p[v]], g.add(
2540
2540
  // most to least likely
2541
- (_.fields !== void 0 ? h.fromJSON : _.values !== void 0 ? u.fromJSON : _.methods !== void 0 ? o.fromJSON : _.id !== void 0 ? i.fromJSON : d.fromJSON)(p[v], _)
2541
+ (_.fields !== void 0 ? h.fromJSON : _.values !== void 0 ? u.fromJSON : _.methods !== void 0 ? a.fromJSON : _.id !== void 0 ? i.fromJSON : d.fromJSON)(p[v], _)
2542
2542
  );
2543
2543
  return this;
2544
2544
  }, d.prototype.get = function(y) {
@@ -2547,13 +2547,13 @@ function requireNamespace() {
2547
2547
  if (this.nested && this.nested[y] instanceof u) return this.nested[y].values;
2548
2548
  throw Error("no such enum: " + y);
2549
2549
  }, d.prototype.add = function(y) {
2550
- if (!(y instanceof i && y.extend !== void 0 || y instanceof h || y instanceof a || y instanceof u || y instanceof o || y instanceof d))
2550
+ if (!(y instanceof i && y.extend !== void 0 || y instanceof h || y instanceof o || y instanceof u || y instanceof a || y instanceof d))
2551
2551
  throw TypeError("object must be a valid nested object");
2552
2552
  if (!this.nested) this.nested = {};
2553
2553
  else {
2554
2554
  var g = this.get(y.name);
2555
2555
  if (g)
2556
- if (g instanceof d && y instanceof d && !(g instanceof h || g instanceof o)) {
2556
+ if (g instanceof d && y instanceof d && !(g instanceof h || g instanceof a)) {
2557
2557
  for (var p = g.nestedArray, v = 0; v < p.length; ++v) y.add(p[v]);
2558
2558
  this.remove(g), this.nested || (this.nested = {}), y.setOptions(g.options, !0);
2559
2559
  } else throw Error("duplicate name '" + y.name + "' in " + this);
@@ -2608,28 +2608,28 @@ function requireNamespace() {
2608
2608
  if (!g) throw Error("no such Type or Enum '" + y + "' in " + this);
2609
2609
  return g;
2610
2610
  }, d.prototype.lookupService = function(y) {
2611
- var g = this.lookup(y, [o]);
2611
+ var g = this.lookup(y, [a]);
2612
2612
  if (!g) throw Error("no such Service '" + y + "' in " + this);
2613
2613
  return g;
2614
2614
  }, d._configure = function(m, y, g) {
2615
- h = m, o = y, u = g;
2615
+ h = m, a = y, u = g;
2616
2616
  }, namespace;
2617
2617
  }
2618
2618
  var mapfield, hasRequiredMapfield;
2619
2619
  function requireMapfield() {
2620
2620
  if (hasRequiredMapfield) return mapfield;
2621
- hasRequiredMapfield = 1, mapfield = a;
2621
+ hasRequiredMapfield = 1, mapfield = o;
2622
2622
  var s = requireField();
2623
- ((a.prototype = Object.create(s.prototype)).constructor = a).className = "MapField";
2623
+ ((o.prototype = Object.create(s.prototype)).constructor = o).className = "MapField";
2624
2624
  var i = requireTypes(), r = requireUtil();
2625
- function a(h, o, u, c, d, l) {
2626
- if (s.call(this, h, o, c, void 0, void 0, d, l), !r.isString(u)) throw TypeError("keyType must be a string");
2625
+ function o(h, a, u, c, d, l) {
2626
+ if (s.call(this, h, a, c, void 0, void 0, d, l), !r.isString(u)) throw TypeError("keyType must be a string");
2627
2627
  this.keyType = u, this.resolvedKeyType = null, this.map = !0;
2628
2628
  }
2629
- return a.fromJSON = function(o, u) {
2630
- return new a(o, u.id, u.keyType, u.type, u.options, u.comment);
2631
- }, a.prototype.toJSON = function(o) {
2632
- var u = o ? !!o.keepComments : !1;
2629
+ return o.fromJSON = function(a, u) {
2630
+ return new o(a, u.id, u.keyType, u.type, u.options, u.comment);
2631
+ }, o.prototype.toJSON = function(a) {
2632
+ var u = a ? !!a.keepComments : !1;
2633
2633
  return r.toObject([
2634
2634
  "keyType",
2635
2635
  this.keyType,
@@ -2644,13 +2644,13 @@ function requireMapfield() {
2644
2644
  "comment",
2645
2645
  u ? this.comment : void 0
2646
2646
  ]);
2647
- }, a.prototype.resolve = function() {
2647
+ }, o.prototype.resolve = function() {
2648
2648
  if (this.resolved) return this;
2649
2649
  if (i.mapKey[this.keyType] === void 0) throw Error("invalid key type: " + this.keyType);
2650
2650
  return s.prototype.resolve.call(this);
2651
- }, a.d = function(o, u, c) {
2651
+ }, o.d = function(a, u, c) {
2652
2652
  return typeof c == "function" ? c = r.decorateType(c).name : c && typeof c == "object" && (c = r.decorateEnum(c).name), function(l, m) {
2653
- r.decorateType(l.constructor).add(new a(m, o, u, c));
2653
+ r.decorateType(l.constructor).add(new o(m, a, u, c));
2654
2654
  };
2655
2655
  }, mapfield;
2656
2656
  }
@@ -2661,26 +2661,26 @@ function requireMethod() {
2661
2661
  var s = requireObject();
2662
2662
  ((r.prototype = Object.create(s.prototype)).constructor = r).className = "Method";
2663
2663
  var i = requireUtil();
2664
- function r(a, h, o, u, c, d, l, m, y) {
2664
+ function r(o, h, a, u, c, d, l, m, y) {
2665
2665
  if (i.isObject(c) ? (l = c, c = d = void 0) : i.isObject(d) && (l = d, d = void 0), !(h === void 0 || i.isString(h))) throw TypeError("type must be a string");
2666
- if (!i.isString(o)) throw TypeError("requestType must be a string");
2666
+ if (!i.isString(a)) throw TypeError("requestType must be a string");
2667
2667
  if (!i.isString(u)) throw TypeError("responseType must be a string");
2668
- s.call(this, a, l), this.type = h || "rpc", this.requestType = o, this.requestStream = c ? !0 : void 0, this.responseType = u, this.responseStream = d ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = m, this.parsedOptions = y;
2668
+ s.call(this, o, l), this.type = h || "rpc", this.requestType = a, this.requestStream = c ? !0 : void 0, this.responseType = u, this.responseStream = d ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = m, this.parsedOptions = y;
2669
2669
  }
2670
- return r.fromJSON = function(h, o) {
2670
+ return r.fromJSON = function(h, a) {
2671
2671
  return new r(
2672
2672
  h,
2673
- o.type,
2674
- o.requestType,
2675
- o.responseType,
2676
- o.requestStream,
2677
- o.responseStream,
2678
- o.options,
2679
- o.comment,
2680
- o.parsedOptions
2673
+ a.type,
2674
+ a.requestType,
2675
+ a.responseType,
2676
+ a.requestStream,
2677
+ a.responseStream,
2678
+ a.options,
2679
+ a.comment,
2680
+ a.parsedOptions
2681
2681
  );
2682
2682
  }, r.prototype.toJSON = function(h) {
2683
- var o = h ? !!h.keepComments : !1;
2683
+ var a = h ? !!h.keepComments : !1;
2684
2684
  return i.toObject([
2685
2685
  "type",
2686
2686
  this.type !== "rpc" && /* istanbul ignore next */
@@ -2696,7 +2696,7 @@ function requireMethod() {
2696
2696
  "options",
2697
2697
  this.options,
2698
2698
  "comment",
2699
- o ? this.comment : void 0,
2699
+ a ? this.comment : void 0,
2700
2700
  "parsedOptions",
2701
2701
  this.parsedOptions
2702
2702
  ]);
@@ -2710,7 +2710,7 @@ function requireService() {
2710
2710
  hasRequiredService = 1, service = h;
2711
2711
  var s = requireNamespace();
2712
2712
  ((h.prototype = Object.create(s.prototype)).constructor = h).className = "Service";
2713
- var i = requireMethod(), r = requireUtil(), a = rpc;
2713
+ var i = requireMethod(), r = requireUtil(), o = rpc;
2714
2714
  function h(u, c) {
2715
2715
  s.call(this, u, c), this.methods = {}, this._methodsArray = null;
2716
2716
  }
@@ -2738,7 +2738,7 @@ function requireService() {
2738
2738
  return this._methodsArray || (this._methodsArray = r.toArray(this.methods));
2739
2739
  }
2740
2740
  });
2741
- function o(u) {
2741
+ function a(u) {
2742
2742
  return u._methodsArray = null, u;
2743
2743
  }
2744
2744
  return h.prototype.get = function(c) {
@@ -2748,15 +2748,15 @@ function requireService() {
2748
2748
  return s.prototype.resolve.call(this);
2749
2749
  }, h.prototype.add = function(c) {
2750
2750
  if (this.get(c.name)) throw Error("duplicate name '" + c.name + "' in " + this);
2751
- return c instanceof i ? (this.methods[c.name] = c, c.parent = this, o(this)) : s.prototype.add.call(this, c);
2751
+ return c instanceof i ? (this.methods[c.name] = c, c.parent = this, a(this)) : s.prototype.add.call(this, c);
2752
2752
  }, h.prototype.remove = function(c) {
2753
2753
  if (c instanceof i) {
2754
2754
  if (this.methods[c.name] !== c) throw Error(c + " is not a member of " + this);
2755
- return delete this.methods[c.name], c.parent = null, o(this);
2755
+ return delete this.methods[c.name], c.parent = null, a(this);
2756
2756
  }
2757
2757
  return s.prototype.remove.call(this, c);
2758
2758
  }, h.prototype.create = function(c, d, l) {
2759
- for (var m = new a.Service(c, d, l), y = 0, g; y < /* initializes */
2759
+ for (var m = new o.Service(c, d, l), y = 0, g; y < /* initializes */
2760
2760
  this.methodsArray.length; ++y) {
2761
2761
  var p = r.lcFirst((g = this._methodsArray[y]).resolve().name).replace(/[^$\w_]/g, "");
2762
2762
  m[p] = r.codegen(
@@ -2809,21 +2809,21 @@ function requireDecoder() {
2809
2809
  if (hasRequiredDecoder) return decoder_1;
2810
2810
  hasRequiredDecoder = 1, decoder_1 = h;
2811
2811
  var s = require_enum(), i = requireTypes(), r = requireUtil();
2812
- function a(o) {
2813
- return "missing required '" + o.name + "'";
2812
+ function o(a) {
2813
+ return "missing required '" + a.name + "'";
2814
2814
  }
2815
- function h(o) {
2816
- var u = r.codegen(["r", "l"], o.name + "$decode")("if(!(r instanceof Reader))")(
2815
+ function h(a) {
2816
+ var u = r.codegen(["r", "l"], a.name + "$decode")("if(!(r instanceof Reader))")(
2817
2817
  "r=Reader.create(r)"
2818
2818
  )(
2819
- "var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (o.fieldsArray.filter(function(g) {
2819
+ "var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (a.fieldsArray.filter(function(g) {
2820
2820
  return g.map;
2821
2821
  }).length ? ",k,value" : "")
2822
2822
  )("while(r.pos<c){")("var t=r.uint32()");
2823
- o.group && u("if((t&7)===4)")("break"), u("switch(t>>>3){");
2823
+ a.group && u("if((t&7)===4)")("break"), u("switch(t>>>3){");
2824
2824
  for (var c = 0; c < /* initializes */
2825
- o.fieldsArray.length; ++c) {
2826
- var d = o._fieldsArray[c].resolve(), l = d.resolvedType instanceof s ? "int32" : d.type, m = "m" + r.safeProp(d.name);
2825
+ a.fieldsArray.length; ++c) {
2826
+ var d = a._fieldsArray[c].resolve(), l = d.resolvedType instanceof s ? "int32" : d.type, m = "m" + r.safeProp(d.name);
2827
2827
  u("case %i: {", d.id), d.map ? (u("if(%s===util.emptyObject)", m)("%s={}", m)("var c2 = r.uint32()+r.pos"), i.defaults[d.keyType] !== void 0 ? u("k=%j", i.defaults[d.keyType]) : u("k=null"), i.defaults[l] !== void 0 ? u("value=%j", i.defaults[l]) : u("value=null"), u("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")(
2828
2828
  "case 1: k=r.%s(); break",
2829
2829
  d.keyType
@@ -2841,11 +2841,11 @@ function requireDecoder() {
2841
2841
  c
2842
2842
  ) : u("%s=r.%s()", m, l), u("break")("}");
2843
2843
  }
2844
- for (u("default:")("r.skipType(t&7)")("break")("}")("}"), c = 0; c < o._fieldsArray.length; ++c) {
2845
- var y = o._fieldsArray[c];
2844
+ for (u("default:")("r.skipType(t&7)")("break")("}")("}"), c = 0; c < a._fieldsArray.length; ++c) {
2845
+ var y = a._fieldsArray[c];
2846
2846
  y.required && u("if(!m.hasOwnProperty(%j))", y.name)(
2847
2847
  "throw util.ProtocolError(%j,{instance:m})",
2848
- a(y)
2848
+ o(y)
2849
2849
  );
2850
2850
  }
2851
2851
  return u("return m");
@@ -2855,12 +2855,12 @@ function requireDecoder() {
2855
2855
  var verifier_1, hasRequiredVerifier;
2856
2856
  function requireVerifier() {
2857
2857
  if (hasRequiredVerifier) return verifier_1;
2858
- hasRequiredVerifier = 1, verifier_1 = o;
2858
+ hasRequiredVerifier = 1, verifier_1 = a;
2859
2859
  var s = require_enum(), i = requireUtil();
2860
2860
  function r(u, c) {
2861
2861
  return u.name + ": " + c + (u.repeated && c !== "array" ? "[]" : u.map && c !== "object" ? "{k:" + u.keyType + "}" : "") + " expected";
2862
2862
  }
2863
- function a(u, c, d, l) {
2863
+ function o(u, c, d, l) {
2864
2864
  if (c.resolvedType)
2865
2865
  if (c.resolvedType instanceof s) {
2866
2866
  u("switch(%s){", l)("default:")("return%j", r(c, "enum value"));
@@ -2941,7 +2941,7 @@ function requireVerifier() {
2941
2941
  }
2942
2942
  return u;
2943
2943
  }
2944
- function o(u) {
2944
+ function a(u) {
2945
2945
  var c = i.codegen(["m"], u.name + "$verify")('if(typeof m!=="object"||m===null)')(
2946
2946
  "return%j",
2947
2947
  "object expected"
@@ -2954,18 +2954,18 @@ function requireVerifier() {
2954
2954
  c("if(!util.isObject(%s))", g)("return%j", r(y, "object"))(
2955
2955
  "var k=Object.keys(%s)",
2956
2956
  g
2957
- )("for(var i=0;i<k.length;++i){"), h(c, y, "k[i]"), a(c, y, m, g + "[k[i]]")("}");
2957
+ )("for(var i=0;i<k.length;++i){"), h(c, y, "k[i]"), o(c, y, m, g + "[k[i]]")("}");
2958
2958
  else if (y.repeated)
2959
2959
  c("if(!Array.isArray(%s))", g)("return%j", r(y, "array"))(
2960
2960
  "for(var i=0;i<%s.length;++i){",
2961
2961
  g
2962
- ), a(c, y, m, g + "[i]")("}");
2962
+ ), o(c, y, m, g + "[i]")("}");
2963
2963
  else {
2964
2964
  if (y.partOf) {
2965
2965
  var p = i.safeProp(y.partOf.name);
2966
2966
  l[y.partOf.name] === 1 && c("if(p%s===1)", p)("return%j", y.partOf.name + ": multiple values"), l[y.partOf.name] = 1, c("p%s=1", p);
2967
2967
  }
2968
- a(c, y, m, g);
2968
+ o(c, y, m, g);
2969
2969
  }
2970
2970
  y.optional && c("}");
2971
2971
  }
@@ -2976,7 +2976,7 @@ function requireVerifier() {
2976
2976
  var converter = {}, hasRequiredConverter;
2977
2977
  function requireConverter() {
2978
2978
  return hasRequiredConverter || (hasRequiredConverter = 1, function(s) {
2979
- var i = s, r = require_enum(), a = requireUtil();
2979
+ var i = s, r = require_enum(), o = requireUtil();
2980
2980
  function h(u, c, d, l) {
2981
2981
  var m = !1;
2982
2982
  if (c.resolvedType)
@@ -3058,13 +3058,13 @@ function requireConverter() {
3058
3058
  return u;
3059
3059
  }
3060
3060
  i.fromObject = function(c) {
3061
- var d = c.fieldsArray, l = a.codegen(["d"], c.name + "$fromObject")("if(d instanceof this.ctor)")(
3061
+ var d = c.fieldsArray, l = o.codegen(["d"], c.name + "$fromObject")("if(d instanceof this.ctor)")(
3062
3062
  "return d"
3063
3063
  );
3064
3064
  if (!d.length) return l("return new this.ctor");
3065
3065
  l("var m=new this.ctor");
3066
3066
  for (var m = 0; m < d.length; ++m) {
3067
- var y = d[m].resolve(), g = a.safeProp(y.name);
3067
+ var y = d[m].resolve(), g = o.safeProp(y.name);
3068
3068
  y.map ? (l("if(d%s){", g)('if(typeof d%s!=="object")', g)(
3069
3069
  "throw TypeError(%j)",
3070
3070
  y.fullName + ": object expected"
@@ -3097,7 +3097,7 @@ function requireConverter() {
3097
3097
  }
3098
3098
  return l("return m");
3099
3099
  };
3100
- function o(u, c, d, l) {
3100
+ function a(u, c, d, l) {
3101
3101
  if (c.resolvedType)
3102
3102
  c.resolvedType instanceof r ? u(
3103
3103
  "d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",
@@ -3156,22 +3156,22 @@ function requireConverter() {
3156
3156
  return u;
3157
3157
  }
3158
3158
  i.toObject = function(c) {
3159
- var d = c.fieldsArray.slice().sort(a.compareFieldsById);
3160
- if (!d.length) return a.codegen()("return {}");
3161
- for (var l = a.codegen(["m", "o"], c.name + "$toObject")("if(!o)")("o={}")("var d={}"), m = [], y = [], g = [], p = 0; p < d.length; ++p)
3159
+ var d = c.fieldsArray.slice().sort(o.compareFieldsById);
3160
+ if (!d.length) return o.codegen()("return {}");
3161
+ for (var l = o.codegen(["m", "o"], c.name + "$toObject")("if(!o)")("o={}")("var d={}"), m = [], y = [], g = [], p = 0; p < d.length; ++p)
3162
3162
  d[p].partOf || (d[p].resolve().repeated ? m : d[p].map ? y : g).push(d[p]);
3163
3163
  if (m.length) {
3164
3164
  for (l("if(o.arrays||o.defaults){"), p = 0; p < m.length; ++p)
3165
- l("d%s=[]", a.safeProp(m[p].name));
3165
+ l("d%s=[]", o.safeProp(m[p].name));
3166
3166
  l("}");
3167
3167
  }
3168
3168
  if (y.length) {
3169
- for (l("if(o.objects||o.defaults){"), p = 0; p < y.length; ++p) l("d%s={}", a.safeProp(y[p].name));
3169
+ for (l("if(o.objects||o.defaults){"), p = 0; p < y.length; ++p) l("d%s={}", o.safeProp(y[p].name));
3170
3170
  l("}");
3171
3171
  }
3172
3172
  if (g.length) {
3173
3173
  for (l("if(o.defaults){"), p = 0; p < g.length; ++p) {
3174
- var v = g[p], _ = a.safeProp(v.name);
3174
+ var v = g[p], _ = o.safeProp(v.name);
3175
3175
  if (v.resolvedType instanceof r)
3176
3176
  l(
3177
3177
  "d%s=o.enums===String?%j:%j",
@@ -3211,10 +3211,10 @@ function requireConverter() {
3211
3211
  }
3212
3212
  var O = !1;
3213
3213
  for (p = 0; p < d.length; ++p) {
3214
- var v = d[p], b = c._fieldsArray.indexOf(v), _ = a.safeProp(v.name);
3214
+ var v = d[p], b = c._fieldsArray.indexOf(v), _ = o.safeProp(v.name);
3215
3215
  v.map ? (O || (O = !0, l("var ks2")), l("if(m%s&&(ks2=Object.keys(m%s)).length){", _, _)("d%s={}", _)(
3216
3216
  "for(var j=0;j<ks2.length;++j){"
3217
- ), o(
3217
+ ), a(
3218
3218
  l,
3219
3219
  v,
3220
3220
  /* sorted */
@@ -3223,19 +3223,19 @@ function requireConverter() {
3223
3223
  )("}")) : v.repeated ? (l("if(m%s&&m%s.length){", _, _)("d%s=[]", _)(
3224
3224
  "for(var j=0;j<m%s.length;++j){",
3225
3225
  _
3226
- ), o(
3226
+ ), a(
3227
3227
  l,
3228
3228
  v,
3229
3229
  /* sorted */
3230
3230
  b,
3231
3231
  _ + "[j]"
3232
- )("}")) : (l("if(m%s!=null&&m.hasOwnProperty(%j)){", _, v.name), o(
3232
+ )("}")) : (l("if(m%s!=null&&m.hasOwnProperty(%j)){", _, v.name), a(
3233
3233
  l,
3234
3234
  v,
3235
3235
  /* sorted */
3236
3236
  b,
3237
3237
  _
3238
- ), v.partOf && l("if(o.oneofs)")("d%s=%j", a.safeProp(v.partOf.name), v.name)), l("}");
3238
+ ), v.partOf && l("if(o.oneofs)")("d%s=%j", o.safeProp(v.partOf.name), v.name)), l("}");
3239
3239
  }
3240
3240
  return l("return d");
3241
3241
  };
@@ -3245,31 +3245,31 @@ var wrappers = {};
3245
3245
  (function(s) {
3246
3246
  var i = s, r = message;
3247
3247
  i[".google.protobuf.Any"] = {
3248
- fromObject: function(a) {
3249
- if (a && a["@type"]) {
3250
- var h = a["@type"].substring(a["@type"].lastIndexOf("/") + 1), o = this.lookup(h);
3251
- if (o) {
3252
- var u = a["@type"].charAt(0) === "." ? a["@type"].slice(1) : a["@type"];
3248
+ fromObject: function(o) {
3249
+ if (o && o["@type"]) {
3250
+ var h = o["@type"].substring(o["@type"].lastIndexOf("/") + 1), a = this.lookup(h);
3251
+ if (a) {
3252
+ var u = o["@type"].charAt(0) === "." ? o["@type"].slice(1) : o["@type"];
3253
3253
  return u.indexOf("/") === -1 && (u = "/" + u), this.create({
3254
3254
  type_url: u,
3255
- value: o.encode(o.fromObject(a)).finish()
3255
+ value: a.encode(a.fromObject(o)).finish()
3256
3256
  });
3257
3257
  }
3258
3258
  }
3259
- return this.fromObject(a);
3259
+ return this.fromObject(o);
3260
3260
  },
3261
- toObject: function(a, h) {
3262
- var o = "type.googleapis.com/", u = "", c = "";
3263
- if (h && h.json && a.type_url && a.value) {
3264
- c = a.type_url.substring(a.type_url.lastIndexOf("/") + 1), u = a.type_url.substring(0, a.type_url.lastIndexOf("/") + 1);
3261
+ toObject: function(o, h) {
3262
+ var a = "type.googleapis.com/", u = "", c = "";
3263
+ if (h && h.json && o.type_url && o.value) {
3264
+ c = o.type_url.substring(o.type_url.lastIndexOf("/") + 1), u = o.type_url.substring(0, o.type_url.lastIndexOf("/") + 1);
3265
3265
  var d = this.lookup(c);
3266
- d && (a = d.decode(a.value));
3266
+ d && (o = d.decode(o.value));
3267
3267
  }
3268
- if (!(a instanceof this.ctor) && a instanceof r) {
3269
- var l = a.$type.toObject(a, h), m = a.$type.fullName[0] === "." ? a.$type.fullName.slice(1) : a.$type.fullName;
3270
- return u === "" && (u = o), c = u + m, l["@type"] = c, l;
3268
+ if (!(o instanceof this.ctor) && o instanceof r) {
3269
+ var l = o.$type.toObject(o, h), m = o.$type.fullName[0] === "." ? o.$type.fullName.slice(1) : o.$type.fullName;
3270
+ return u === "" && (u = a), c = u + m, l["@type"] = c, l;
3271
3271
  }
3272
- return this.toObject(a, h);
3272
+ return this.toObject(o, h);
3273
3273
  }
3274
3274
  };
3275
3275
  })(wrappers);
@@ -3279,7 +3279,7 @@ function requireType() {
3279
3279
  hasRequiredType = 1, type = _;
3280
3280
  var s = requireNamespace();
3281
3281
  ((_.prototype = Object.create(s.prototype)).constructor = _).className = "Type";
3282
- var i = require_enum(), r = requireOneof(), a = requireField(), h = requireMapfield(), o = requireService(), u = message, c = reader, d = writer, l = requireUtil(), m = requireEncoder(), y = requireDecoder(), g = requireVerifier(), p = requireConverter(), v = wrappers;
3282
+ var i = require_enum(), r = requireOneof(), o = requireField(), h = requireMapfield(), a = requireService(), u = message, c = reader, d = writer, l = requireUtil(), m = requireEncoder(), y = requireDecoder(), g = requireVerifier(), p = requireConverter(), v = wrappers;
3283
3283
  function _(O, b) {
3284
3284
  s.call(this, O, b), this.fields = {}, this.oneofs = void 0, this.extensions = void 0, this.reserved = void 0, this.group = void 0, this._fieldsById = null, this._fieldsArray = null, this._oneofsArray = null, this._ctor = null;
3285
3285
  }
@@ -3365,7 +3365,7 @@ function requireType() {
3365
3365
  T.extensions = x.extensions, T.reserved = x.reserved;
3366
3366
  for (var E = Object.keys(x.fields), C = 0; C < E.length; ++C)
3367
3367
  T.add(
3368
- (typeof x.fields[E[C]].keyType < "u" ? h.fromJSON : a.fromJSON)(
3368
+ (typeof x.fields[E[C]].keyType < "u" ? h.fromJSON : o.fromJSON)(
3369
3369
  E[C],
3370
3370
  x.fields[E[C]]
3371
3371
  )
@@ -3378,7 +3378,7 @@ function requireType() {
3378
3378
  var R = x.nested[E[C]];
3379
3379
  T.add(
3380
3380
  // most to least likely
3381
- (R.id !== void 0 ? a.fromJSON : R.fields !== void 0 ? _.fromJSON : R.values !== void 0 ? i.fromJSON : R.methods !== void 0 ? o.fromJSON : s.fromJSON)(E[C], R)
3381
+ (R.id !== void 0 ? o.fromJSON : R.fields !== void 0 ? _.fromJSON : R.values !== void 0 ? i.fromJSON : R.methods !== void 0 ? a.fromJSON : s.fromJSON)(E[C], R)
3382
3382
  );
3383
3383
  }
3384
3384
  return x.extensions && x.extensions.length && (T.extensions = x.extensions), x.reserved && x.reserved.length && (T.reserved = x.reserved), x.group && (T.group = !0), x.comment && (T.comment = x.comment), T;
@@ -3416,7 +3416,7 @@ function requireType() {
3416
3416
  return this.fields[b] || this.oneofs && this.oneofs[b] || this.nested && this.nested[b] || null;
3417
3417
  }, _.prototype.add = function(b) {
3418
3418
  if (this.get(b.name)) throw Error("duplicate name '" + b.name + "' in " + this);
3419
- if (b instanceof a && b.extend === void 0) {
3419
+ if (b instanceof o && b.extend === void 0) {
3420
3420
  if (this._fieldsById ? (
3421
3421
  /* istanbul ignore next */
3422
3422
  this._fieldsById[b.id]
@@ -3429,7 +3429,7 @@ function requireType() {
3429
3429
  }
3430
3430
  return b instanceof r ? (this.oneofs || (this.oneofs = {}), this.oneofs[b.name] = b, b.onAdd(this), w(this)) : s.prototype.add.call(this, b);
3431
3431
  }, _.prototype.remove = function(b) {
3432
- if (b instanceof a && b.extend === void 0) {
3432
+ if (b instanceof o && b.extend === void 0) {
3433
3433
  if (!this.fields || this.fields[b.name] !== b)
3434
3434
  throw Error(b + " is not a member of " + this);
3435
3435
  return delete this.fields[b.name], b.parent = null, b.onRemove(this), w(this);
@@ -3500,7 +3500,7 @@ function requireRoot() {
3500
3500
  hasRequiredRoot = 1, root$1 = d;
3501
3501
  var s = requireNamespace();
3502
3502
  ((d.prototype = Object.create(s.prototype)).constructor = d).className = "Root";
3503
- var i = requireField(), r = require_enum(), a = requireOneof(), h = requireUtil(), o, u, c;
3503
+ var i = requireField(), r = require_enum(), o = requireOneof(), h = requireUtil(), a, u, c;
3504
3504
  function d(g) {
3505
3505
  s.call(this, "", g), this.deferred = [], this.files = [];
3506
3506
  }
@@ -3534,13 +3534,13 @@ function requireRoot() {
3534
3534
  if (h.isString(A) && A.charAt(0) === "{" && (A = JSON.parse(A)), !h.isString(A)) w.setOptions(A.options).addJSON(A.nested);
3535
3535
  else {
3536
3536
  u.filename = k;
3537
- var P = u(A, w, v), $, z = 0;
3537
+ var P = u(A, w, v), $, H = 0;
3538
3538
  if (P.imports)
3539
- for (; z < P.imports.length; ++z)
3540
- ($ = x(P.imports[z]) || w.resolvePath(k, P.imports[z])) && E($);
3539
+ for (; H < P.imports.length; ++H)
3540
+ ($ = x(P.imports[H]) || w.resolvePath(k, P.imports[H])) && E($);
3541
3541
  if (P.weakImports)
3542
- for (z = 0; z < P.weakImports.length; ++z)
3543
- ($ = x(P.weakImports[z]) || w.resolvePath(k, P.weakImports[z])) && E($, !0);
3542
+ for (H = 0; H < P.weakImports.length; ++H)
3543
+ ($ = x(P.weakImports[H]) || w.resolvePath(k, P.weakImports[H])) && E($, !0);
3544
3544
  }
3545
3545
  } catch (q) {
3546
3546
  b(q);
@@ -3565,13 +3565,13 @@ function requireRoot() {
3565
3565
  }
3566
3566
  T(k, P);
3567
3567
  } else
3568
- ++C, w.fetch(k, function($, z) {
3568
+ ++C, w.fetch(k, function($, H) {
3569
3569
  if (--C, !!_) {
3570
3570
  if ($) {
3571
3571
  A ? C || b(null, w) : b($);
3572
3572
  return;
3573
3573
  }
3574
- T(k, z);
3574
+ T(k, H);
3575
3575
  }
3576
3576
  });
3577
3577
  }
@@ -3617,8 +3617,8 @@ function requireRoot() {
3617
3617
  !p.extensionField && (y(this, p) || this.deferred.push(p));
3618
3618
  else if (p instanceof r)
3619
3619
  m.test(p.name) && (p.parent[p.name] = p.values);
3620
- else if (!(p instanceof a)) {
3621
- if (p instanceof o)
3620
+ else if (!(p instanceof o)) {
3621
+ if (p instanceof a)
3622
3622
  for (var v = 0; v < this.deferred.length; )
3623
3623
  y(this, this.deferred[v]) ? this.deferred.splice(v, 1) : ++v;
3624
3624
  for (var _ = 0; _ < /* initializes */
@@ -3650,14 +3650,14 @@ function requireRoot() {
3650
3650
  m.test(p.name) && delete p.parent[p.name];
3651
3651
  }
3652
3652
  }, d._configure = function(g, p, v) {
3653
- o = g, u = p, c = v;
3653
+ a = g, u = p, c = v;
3654
3654
  }, root$1;
3655
3655
  }
3656
3656
  var hasRequiredUtil;
3657
3657
  function requireUtil() {
3658
3658
  if (hasRequiredUtil) return util$2.exports;
3659
3659
  hasRequiredUtil = 1;
3660
- var s = util$2.exports = requireMinimal(), i = roots, r, a;
3660
+ var s = util$2.exports = requireMinimal(), i = roots, r, o;
3661
3661
  s.codegen = codegen_1, s.fetch = fetch_1, s.path = path, s.fs = s.inquire("fs"), s.toArray = function(l) {
3662
3662
  if (l) {
3663
3663
  for (var m = Object.keys(l), y = new Array(m.length), g = 0; g < m.length; ) y[g] = l[m[g++]];
@@ -3671,13 +3671,13 @@ function requireUtil() {
3671
3671
  }
3672
3672
  return m;
3673
3673
  };
3674
- var h = /\\/g, o = /"/g;
3674
+ var h = /\\/g, a = /"/g;
3675
3675
  s.isReserved = function(l) {
3676
3676
  return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(
3677
3677
  l
3678
3678
  );
3679
3679
  }, s.safeProp = function(l) {
3680
- return !/^[$\w_]+$/.test(l) || s.isReserved(l) ? '["' + l.replace(h, "\\\\").replace(o, '\\"') + '"]' : "." + l;
3680
+ return !/^[$\w_]+$/.test(l) || s.isReserved(l) ? '["' + l.replace(h, "\\\\").replace(a, '\\"') + '"]' : "." + l;
3681
3681
  }, s.ucFirst = function(l) {
3682
3682
  return l.charAt(0).toUpperCase() + l.substring(1);
3683
3683
  };
@@ -3704,8 +3704,8 @@ function requireUtil() {
3704
3704
  var c = 0;
3705
3705
  return s.decorateEnum = function(l) {
3706
3706
  if (l.$type) return l.$type;
3707
- a || (a = require_enum());
3708
- var m = new a("Enum" + c++, l);
3707
+ o || (o = require_enum());
3708
+ var m = new o("Enum" + c++, l);
3709
3709
  return s.decorateRoot.add(m), Object.defineProperty(l, "$type", {
3710
3710
  value: m,
3711
3711
  enumerable: !1
@@ -3737,10 +3737,10 @@ function requireObject() {
3737
3737
  if (hasRequiredObject) return object;
3738
3738
  hasRequiredObject = 1, object = r, r.className = "ReflectionObject";
3739
3739
  var s = requireUtil(), i;
3740
- function r(a, h) {
3741
- if (!s.isString(a)) throw TypeError("name must be a string");
3740
+ function r(o, h) {
3741
+ if (!s.isString(o)) throw TypeError("name must be a string");
3742
3742
  if (h && !s.isObject(h)) throw TypeError("options must be an object");
3743
- this.options = h, this.parsedOptions = null, this.name = a, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
3743
+ this.options = h, this.parsedOptions = null, this.name = o, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
3744
3744
  }
3745
3745
  return Object.defineProperties(r.prototype, {
3746
3746
  /**
@@ -3751,8 +3751,8 @@ function requireObject() {
3751
3751
  */
3752
3752
  root: {
3753
3753
  get: function() {
3754
- for (var a = this; a.parent !== null; ) a = a.parent;
3755
- return a;
3754
+ for (var o = this; o.parent !== null; ) o = o.parent;
3755
+ return o;
3756
3756
  }
3757
3757
  },
3758
3758
  /**
@@ -3763,9 +3763,9 @@ function requireObject() {
3763
3763
  */
3764
3764
  fullName: {
3765
3765
  get: function() {
3766
- for (var a = [this.name], h = this.parent; h; )
3767
- a.unshift(h.name), h = h.parent;
3768
- return a.join(".");
3766
+ for (var o = [this.name], h = this.parent; h; )
3767
+ o.unshift(h.name), h = h.parent;
3768
+ return o.join(".");
3769
3769
  }
3770
3770
  }
3771
3771
  }), r.prototype.toJSON = /* istanbul ignore next */
@@ -3773,18 +3773,18 @@ function requireObject() {
3773
3773
  throw Error();
3774
3774
  }, r.prototype.onAdd = function(h) {
3775
3775
  this.parent && this.parent !== h && this.parent.remove(this), this.parent = h, this.resolved = !1;
3776
- var o = h.root;
3777
- o instanceof i && o._handleAdd(this);
3776
+ var a = h.root;
3777
+ a instanceof i && a._handleAdd(this);
3778
3778
  }, r.prototype.onRemove = function(h) {
3779
- var o = h.root;
3780
- o instanceof i && o._handleRemove(this), this.parent = null, this.resolved = !1;
3779
+ var a = h.root;
3780
+ a instanceof i && a._handleRemove(this), this.parent = null, this.resolved = !1;
3781
3781
  }, r.prototype.resolve = function() {
3782
3782
  return this.resolved ? this : (this.root instanceof i && (this.resolved = !0), this);
3783
3783
  }, r.prototype.getOption = function(h) {
3784
3784
  if (this.options) return this.options[h];
3785
- }, r.prototype.setOption = function(h, o, u) {
3786
- return (!u || !this.options || this.options[h] === void 0) && ((this.options || (this.options = {}))[h] = o), this;
3787
- }, r.prototype.setParsedOption = function(h, o, u) {
3785
+ }, r.prototype.setOption = function(h, a, u) {
3786
+ return (!u || !this.options || this.options[h] === void 0) && ((this.options || (this.options = {}))[h] = a), this;
3787
+ }, r.prototype.setParsedOption = function(h, a, u) {
3788
3788
  this.parsedOptions || (this.parsedOptions = []);
3789
3789
  var c = this.parsedOptions;
3790
3790
  if (u) {
@@ -3793,44 +3793,44 @@ function requireObject() {
3793
3793
  });
3794
3794
  if (d) {
3795
3795
  var l = d[h];
3796
- s.setProperty(l, u, o);
3796
+ s.setProperty(l, u, a);
3797
3797
  } else
3798
- d = {}, d[h] = s.setProperty({}, u, o), c.push(d);
3798
+ d = {}, d[h] = s.setProperty({}, u, a), c.push(d);
3799
3799
  } else {
3800
3800
  var m = {};
3801
- m[h] = o, c.push(m);
3801
+ m[h] = a, c.push(m);
3802
3802
  }
3803
3803
  return this;
3804
- }, r.prototype.setOptions = function(h, o) {
3804
+ }, r.prototype.setOptions = function(h, a) {
3805
3805
  if (h)
3806
3806
  for (var u = Object.keys(h), c = 0; c < u.length; ++c)
3807
- this.setOption(u[c], h[u[c]], o);
3807
+ this.setOption(u[c], h[u[c]], a);
3808
3808
  return this;
3809
3809
  }, r.prototype.toString = function() {
3810
- var h = this.constructor.className, o = this.fullName;
3811
- return o.length ? h + " " + o : h;
3812
- }, r._configure = function(a) {
3813
- i = a;
3810
+ var h = this.constructor.className, a = this.fullName;
3811
+ return a.length ? h + " " + a : h;
3812
+ }, r._configure = function(o) {
3813
+ i = o;
3814
3814
  }, object;
3815
3815
  }
3816
3816
  var _enum, hasRequired_enum;
3817
3817
  function require_enum() {
3818
3818
  if (hasRequired_enum) return _enum;
3819
- hasRequired_enum = 1, _enum = a;
3819
+ hasRequired_enum = 1, _enum = o;
3820
3820
  var s = requireObject();
3821
- ((a.prototype = Object.create(s.prototype)).constructor = a).className = "Enum";
3821
+ ((o.prototype = Object.create(s.prototype)).constructor = o).className = "Enum";
3822
3822
  var i = requireNamespace(), r = requireUtil();
3823
- function a(h, o, u, c, d, l) {
3824
- if (s.call(this, h, u), o && typeof o != "object") throw TypeError("values must be an object");
3825
- if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = c, this.comments = d || {}, this.valuesOptions = l, this.reserved = void 0, o)
3826
- for (var m = Object.keys(o), y = 0; y < m.length; ++y)
3827
- typeof o[m[y]] == "number" && (this.valuesById[this.values[m[y]] = o[m[y]]] = m[y]);
3828
- }
3829
- return a.fromJSON = function(o, u) {
3830
- var c = new a(o, u.values, u.options, u.comment, u.comments);
3823
+ function o(h, a, u, c, d, l) {
3824
+ if (s.call(this, h, u), a && typeof a != "object") throw TypeError("values must be an object");
3825
+ if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = c, this.comments = d || {}, this.valuesOptions = l, this.reserved = void 0, a)
3826
+ for (var m = Object.keys(a), y = 0; y < m.length; ++y)
3827
+ typeof a[m[y]] == "number" && (this.valuesById[this.values[m[y]] = a[m[y]]] = m[y]);
3828
+ }
3829
+ return o.fromJSON = function(a, u) {
3830
+ var c = new o(a, u.values, u.options, u.comment, u.comments);
3831
3831
  return c.reserved = u.reserved, c;
3832
- }, a.prototype.toJSON = function(o) {
3833
- var u = o ? !!o.keepComments : !1;
3832
+ }, o.prototype.toJSON = function(a) {
3833
+ var u = a ? !!a.keepComments : !1;
3834
3834
  return r.toObject([
3835
3835
  "options",
3836
3836
  this.options,
@@ -3845,27 +3845,27 @@ function require_enum() {
3845
3845
  "comments",
3846
3846
  u ? this.comments : void 0
3847
3847
  ]);
3848
- }, a.prototype.add = function(o, u, c, d) {
3849
- if (!r.isString(o)) throw TypeError("name must be a string");
3848
+ }, o.prototype.add = function(a, u, c, d) {
3849
+ if (!r.isString(a)) throw TypeError("name must be a string");
3850
3850
  if (!r.isInteger(u)) throw TypeError("id must be an integer");
3851
- if (this.values[o] !== void 0) throw Error("duplicate name '" + o + "' in " + this);
3851
+ if (this.values[a] !== void 0) throw Error("duplicate name '" + a + "' in " + this);
3852
3852
  if (this.isReservedId(u)) throw Error("id " + u + " is reserved in " + this);
3853
- if (this.isReservedName(o)) throw Error("name '" + o + "' is reserved in " + this);
3853
+ if (this.isReservedName(a)) throw Error("name '" + a + "' is reserved in " + this);
3854
3854
  if (this.valuesById[u] !== void 0) {
3855
3855
  if (!(this.options && this.options.allow_alias))
3856
3856
  throw Error("duplicate id " + u + " in " + this);
3857
- this.values[o] = u;
3858
- } else this.valuesById[this.values[o] = u] = o;
3859
- return d && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[o] = d || null), this.comments[o] = c || null, this;
3860
- }, a.prototype.remove = function(o) {
3861
- if (!r.isString(o)) throw TypeError("name must be a string");
3862
- var u = this.values[o];
3863
- if (u == null) throw Error("name '" + o + "' does not exist in " + this);
3864
- return delete this.valuesById[u], delete this.values[o], delete this.comments[o], this.valuesOptions && delete this.valuesOptions[o], this;
3865
- }, a.prototype.isReservedId = function(o) {
3866
- return i.isReservedId(this.reserved, o);
3867
- }, a.prototype.isReservedName = function(o) {
3868
- return i.isReservedName(this.reserved, o);
3857
+ this.values[a] = u;
3858
+ } else this.valuesById[this.values[a] = u] = a;
3859
+ return d && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[a] = d || null), this.comments[a] = c || null, this;
3860
+ }, o.prototype.remove = function(a) {
3861
+ if (!r.isString(a)) throw TypeError("name must be a string");
3862
+ var u = this.values[a];
3863
+ if (u == null) throw Error("name '" + a + "' does not exist in " + this);
3864
+ return delete this.valuesById[u], delete this.values[a], delete this.comments[a], this.valuesOptions && delete this.valuesOptions[a], this;
3865
+ }, o.prototype.isReservedId = function(a) {
3866
+ return i.isReservedId(this.reserved, a);
3867
+ }, o.prototype.isReservedName = function(a) {
3868
+ return i.isReservedName(this.reserved, a);
3869
3869
  }, _enum;
3870
3870
  }
3871
3871
  var encoder_1, hasRequiredEncoder;
@@ -3873,26 +3873,26 @@ function requireEncoder() {
3873
3873
  if (hasRequiredEncoder) return encoder_1;
3874
3874
  hasRequiredEncoder = 1, encoder_1 = h;
3875
3875
  var s = require_enum(), i = requireTypes(), r = requireUtil();
3876
- function a(o, u, c, d) {
3877
- return u.resolvedType.group ? o(
3876
+ function o(a, u, c, d) {
3877
+ return u.resolvedType.group ? a(
3878
3878
  "types[%i].encode(%s,w.uint32(%i)).uint32(%i)",
3879
3879
  c,
3880
3880
  d,
3881
3881
  (u.id << 3 | 3) >>> 0,
3882
3882
  (u.id << 3 | 4) >>> 0
3883
- ) : o(
3883
+ ) : a(
3884
3884
  "types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",
3885
3885
  c,
3886
3886
  d,
3887
3887
  (u.id << 3 | 2) >>> 0
3888
3888
  );
3889
3889
  }
3890
- function h(o) {
3891
- for (var u = r.codegen(["m", "w"], o.name + "$encode")("if(!w)")("w=Writer.create()"), c, d, l = (
3890
+ function h(a) {
3891
+ for (var u = r.codegen(["m", "w"], a.name + "$encode")("if(!w)")("w=Writer.create()"), c, d, l = (
3892
3892
  /* initializes */
3893
- o.fieldsArray.slice().sort(r.compareFieldsById)
3893
+ a.fieldsArray.slice().sort(r.compareFieldsById)
3894
3894
  ), c = 0; c < l.length; ++c) {
3895
- var m = l[c].resolve(), y = o._fieldsArray.indexOf(m), g = m.resolvedType instanceof s ? "int32" : m.type, p = i.basic[g];
3895
+ var m = l[c].resolve(), y = a._fieldsArray.indexOf(m), g = m.resolvedType instanceof s ? "int32" : m.type, p = i.basic[g];
3896
3896
  d = "m" + r.safeProp(m.name), m.map ? (u(
3897
3897
  "if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",
3898
3898
  d,
@@ -3913,7 +3913,7 @@ function requireEncoder() {
3913
3913
  "w.%s(%s[i])",
3914
3914
  g,
3915
3915
  d
3916
- )("w.ldelim()") : (u("for(var i=0;i<%s.length;++i)", d), p === void 0 ? a(u, m, y, d + "[i]") : u("w.uint32(%i).%s(%s[i])", (m.id << 3 | p) >>> 0, g, d)), u("}")) : (m.optional && u("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", d, m.name), p === void 0 ? a(u, m, y, d) : u("w.uint32(%i).%s(%s)", (m.id << 3 | p) >>> 0, g, d));
3916
+ )("w.ldelim()") : (u("for(var i=0;i<%s.length;++i)", d), p === void 0 ? o(u, m, y, d + "[i]") : u("w.uint32(%i).%s(%s[i])", (m.id << 3 | p) >>> 0, g, d)), u("}")) : (m.optional && u("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", d, m.name), p === void 0 ? o(u, m, y, d) : u("w.uint32(%i).%s(%s)", (m.id << 3 | p) >>> 0, g, d));
3917
3917
  }
3918
3918
  return u("return w");
3919
3919
  }
@@ -3972,7 +3972,7 @@ function unescape(s) {
3972
3972
  tokenize$1.unescape = unescape;
3973
3973
  function tokenize$1(s, i) {
3974
3974
  s = s.toString();
3975
- var r = 0, a = s.length, h = 1, o = 0, u = {}, c = [], d = null;
3975
+ var r = 0, o = s.length, h = 1, a = 0, u = {}, c = [], d = null;
3976
3976
  function l(T) {
3977
3977
  return Error("illegal " + T + " (line " + h + ")");
3978
3978
  }
@@ -4004,14 +4004,14 @@ function tokenize$1(s, i) {
4004
4004
  for (var P = s.substring(T, E).split(setCommentSplitRe), $ = 0; $ < P.length; ++$)
4005
4005
  P[$] = P[$].replace(i ? setCommentAltRe : setCommentRe, "").trim();
4006
4006
  R.text = P.join(`
4007
- `).trim(), u[h] = R, o = h;
4007
+ `).trim(), u[h] = R, a = h;
4008
4008
  }
4009
4009
  function p(T) {
4010
4010
  var E = v(T), C = s.substring(T, E), R = /^\s*\/\//.test(C);
4011
4011
  return R;
4012
4012
  }
4013
4013
  function v(T) {
4014
- for (var E = T; E < a && y(E) !== `
4014
+ for (var E = T; E < o && y(E) !== `
4015
4015
  `; )
4016
4016
  E++;
4017
4017
  return E;
@@ -4021,28 +4021,28 @@ function tokenize$1(s, i) {
4021
4021
  if (d) return m();
4022
4022
  var T, E, C, R, I, k = r === 0;
4023
4023
  do {
4024
- if (r === a) return null;
4024
+ if (r === o) return null;
4025
4025
  for (T = !1; whitespaceRe.test(C = y(r)); )
4026
4026
  if (C === `
4027
- ` && (k = !0, ++h), ++r === a) return null;
4027
+ ` && (k = !0, ++h), ++r === o) return null;
4028
4028
  if (y(r) === "/") {
4029
- if (++r === a)
4029
+ if (++r === o)
4030
4030
  throw l("comment");
4031
4031
  if (y(r) === "/")
4032
4032
  if (i) {
4033
4033
  if (R = r, I = !1, p(r - 1)) {
4034
4034
  I = !0;
4035
4035
  do
4036
- if (r = v(r), r === a || (r++, !k))
4036
+ if (r = v(r), r === o || (r++, !k))
4037
4037
  break;
4038
4038
  while (p(r));
4039
4039
  } else
4040
- r = Math.min(a, v(r) + 1);
4040
+ r = Math.min(o, v(r) + 1);
4041
4041
  I && (g(R, r, k), k = !0), h++, T = !0;
4042
4042
  } else {
4043
4043
  for (I = y(R = r + 1) === "/"; y(++r) !== `
4044
4044
  `; )
4045
- if (r === a)
4045
+ if (r === o)
4046
4046
  return null;
4047
4047
  ++r, I && (g(R, r - 1, k), k = !0), ++h, T = !0;
4048
4048
  }
@@ -4050,7 +4050,7 @@ function tokenize$1(s, i) {
4050
4050
  R = r + 1, I = i || y(R) === "*";
4051
4051
  do {
4052
4052
  if (C === `
4053
- ` && ++h, ++r === a)
4053
+ ` && ++h, ++r === o)
4054
4054
  throw l("comment");
4055
4055
  E = C, C = y(r);
4056
4056
  } while (E !== "*" || C !== "/");
@@ -4062,7 +4062,7 @@ function tokenize$1(s, i) {
4062
4062
  var A = r;
4063
4063
  delimRe.lastIndex = 0;
4064
4064
  var P = delimRe.test(y(A++));
4065
- if (!P) for (; A < a && !delimRe.test(y(A)); ) ++A;
4065
+ if (!P) for (; A < o && !delimRe.test(y(A)); ) ++A;
4066
4066
  var $ = s.substring(r, r = A);
4067
4067
  return ($ === '"' || $ === "'") && (d = $), $;
4068
4068
  }
@@ -4086,7 +4086,7 @@ function tokenize$1(s, i) {
4086
4086
  }
4087
4087
  function x(T) {
4088
4088
  var E = null, C;
4089
- return T === void 0 ? (C = u[h - 1], delete u[h - 1], C && (i || C.type === "*" || C.lineEmpty) && (E = C.leading ? C.text : null)) : (o < T && O(), C = u[T], delete u[T], C && !C.lineEmpty && (i || C.type === "/") && (E = C.leading ? null : C.text)), E;
4089
+ return T === void 0 ? (C = u[h - 1], delete u[h - 1], C && (i || C.type === "*" || C.lineEmpty) && (E = C.leading ? C.text : null)) : (a < T && O(), C = u[T], delete u[T], C && !C.lineEmpty && (i || C.type === "/") && (E = C.leading ? null : C.text)), E;
4090
4090
  }
4091
4091
  return Object.defineProperty(
4092
4092
  {
@@ -4112,7 +4112,7 @@ parse.defaults = {
4112
4112
  var tokenize = tokenize_1, Root = requireRoot(), Type = requireType(), Field = requireField(), MapField = requireMapfield(), OneOf = requireOneof(), Enum = require_enum(), Service = requireService(), Method = requireMethod(), types = requireTypes(), util = requireUtil(), base10Re = /^[1-9][0-9]*$/, base10NegRe = /^-?[1-9][0-9]*$/, base16Re = /^0[x][0-9a-fA-F]+$/, base16NegRe = /^-?0[x][0-9a-fA-F]+$/, base8Re = /^0[0-7]+$/, base8NegRe = /^-?0[0-7]+$/, numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/, typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, fqTypeRefRe = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;
4113
4113
  function parse(s, i, r) {
4114
4114
  i instanceof Root || (r = i, i = new Root()), r || (r = parse.defaults);
4115
- var a = r.preferTrailingComment || !1, h = tokenize(s, r.alternateCommentMode || !1), o = h.next, u = h.push, c = h.peek, d = h.skip, l = h.cmnt, m = !0, y, g, p, v, _ = !1, w = i, O = r.keepCase ? function(S) {
4115
+ var o = r.preferTrailingComment || !1, h = tokenize(s, r.alternateCommentMode || !1), a = h.next, u = h.push, c = h.peek, d = h.skip, l = h.cmnt, m = !0, y, g, p, v, _ = !1, w = i, O = r.keepCase ? function(S) {
4116
4116
  return S;
4117
4117
  } : util.camelCase;
4118
4118
  function b(S, D, N) {
@@ -4124,13 +4124,13 @@ function parse(s, i, r) {
4124
4124
  function x() {
4125
4125
  var S = [], D;
4126
4126
  do {
4127
- if ((D = o()) !== '"' && D !== "'") throw b(D);
4128
- S.push(o()), d(D), D = c();
4127
+ if ((D = a()) !== '"' && D !== "'") throw b(D);
4128
+ S.push(a()), d(D), D = c();
4129
4129
  } while (D === '"' || D === "'");
4130
4130
  return S.join("");
4131
4131
  }
4132
4132
  function T() {
4133
- var S = o();
4133
+ var S = a();
4134
4134
  switch (S) {
4135
4135
  case "'":
4136
4136
  case '"':
@@ -4156,19 +4156,19 @@ function parse(s, i, r) {
4156
4156
  function E(S, D) {
4157
4157
  var N, B;
4158
4158
  do
4159
- D && ((N = c()) === '"' || N === "'") ? S.push(x()) : S.push([B = R(o()), d("to", !0) ? R(o()) : B]);
4159
+ D && ((N = c()) === '"' || N === "'") ? S.push(x()) : S.push([B = R(a()), d("to", !0) ? R(a()) : B]);
4160
4160
  while (d(",", !0));
4161
4161
  var L = {
4162
4162
  options: void 0
4163
4163
  };
4164
- L.setOption = function(F, H) {
4165
- this.options === void 0 && (this.options = {}), this.options[F] = H;
4164
+ L.setOption = function(F, z) {
4165
+ this.options === void 0 && (this.options = {}), this.options[F] = z;
4166
4166
  }, $(
4167
4167
  L,
4168
- function(H) {
4169
- if (H === "option")
4170
- G(L, H), d(";");
4171
- else throw b(H);
4168
+ function(z) {
4169
+ if (z === "option")
4170
+ G(L, z), d(";");
4171
+ else throw b(z);
4172
4172
  },
4173
4173
  function() {
4174
4174
  te(L);
@@ -4213,17 +4213,17 @@ function parse(s, i, r) {
4213
4213
  }
4214
4214
  function I() {
4215
4215
  if (y !== void 0) throw b("package");
4216
- if (y = o(), !typeRefRe.test(y)) throw b(y, "name");
4216
+ if (y = a(), !typeRefRe.test(y)) throw b(y, "name");
4217
4217
  w = w.define(y), d(";");
4218
4218
  }
4219
4219
  function k() {
4220
4220
  var S = c(), D;
4221
4221
  switch (S) {
4222
4222
  case "weak":
4223
- D = p || (p = []), o();
4223
+ D = p || (p = []), a();
4224
4224
  break;
4225
4225
  case "public":
4226
- o();
4226
+ a();
4227
4227
  default:
4228
4228
  D = g || (g = []);
4229
4229
  break;
@@ -4239,26 +4239,26 @@ function parse(s, i, r) {
4239
4239
  case "option":
4240
4240
  return G(S, D), d(";"), !0;
4241
4241
  case "message":
4242
- return z(S, D), !0;
4242
+ return H(S, D), !0;
4243
4243
  case "enum":
4244
4244
  return U(S, D), !0;
4245
4245
  case "service":
4246
4246
  return se(S, D), !0;
4247
4247
  case "extend":
4248
- return oe(S, D), !0;
4248
+ return ae(S, D), !0;
4249
4249
  }
4250
4250
  return !1;
4251
4251
  }
4252
4252
  function $(S, D, N) {
4253
4253
  var B = h.line;
4254
4254
  if (S && (typeof S.comment != "string" && (S.comment = l()), S.filename = parse.filename), d("{", !0)) {
4255
- for (var L; (L = o()) !== "}"; ) D(L);
4255
+ for (var L; (L = a()) !== "}"; ) D(L);
4256
4256
  d(";", !0);
4257
4257
  } else
4258
- N && N(), d(";"), S && (typeof S.comment != "string" || a) && (S.comment = l(B) || S.comment);
4258
+ N && N(), d(";"), S && (typeof S.comment != "string" || o) && (S.comment = l(B) || S.comment);
4259
4259
  }
4260
- function z(S, D) {
4261
- if (!nameRe.test(D = o())) throw b(D, "type name");
4260
+ function H(S, D) {
4261
+ if (!nameRe.test(D = a())) throw b(D, "type name");
4262
4262
  var N = new Type(D);
4263
4263
  $(N, function(L) {
4264
4264
  if (!P(N, L))
@@ -4290,18 +4290,18 @@ function parse(s, i, r) {
4290
4290
  }), S.add(N);
4291
4291
  }
4292
4292
  function q(S, D, N) {
4293
- var B = o();
4293
+ var B = a();
4294
4294
  if (B === "group") {
4295
4295
  V(S, D);
4296
4296
  return;
4297
4297
  }
4298
4298
  for (; B.endsWith(".") || c().startsWith("."); )
4299
- B += o();
4299
+ B += a();
4300
4300
  if (!typeRefRe.test(B)) throw b(B, "type");
4301
- var L = o();
4301
+ var L = a();
4302
4302
  if (!nameRe.test(L)) throw b(L, "name");
4303
4303
  L = O(L), d("=");
4304
- var F = new Field(L, R(o()), B, D, N);
4304
+ var F = new Field(L, R(a()), B, D, N);
4305
4305
  if ($(
4306
4306
  F,
4307
4307
  function(W) {
@@ -4313,8 +4313,8 @@ function parse(s, i, r) {
4313
4313
  te(F);
4314
4314
  }
4315
4315
  ), D === "proto3_optional") {
4316
- var H = new OneOf("_" + L);
4317
- F.setOption("proto3_optional", !0), H.add(F), S.add(H);
4316
+ var z = new OneOf("_" + L);
4317
+ F.setOption("proto3_optional", !0), z.add(F), S.add(z);
4318
4318
  } else
4319
4319
  S.add(F);
4320
4320
  !_ && F.repeated && (types.packed[B] !== void 0 || types.basic[B] === void 0) && F.setOption(
@@ -4325,14 +4325,14 @@ function parse(s, i, r) {
4325
4325
  );
4326
4326
  }
4327
4327
  function V(S, D) {
4328
- var N = o();
4328
+ var N = a();
4329
4329
  if (!nameRe.test(N)) throw b(N, "name");
4330
4330
  var B = util.lcFirst(N);
4331
4331
  N === B && (N = util.ucFirst(N)), d("=");
4332
- var L = R(o()), F = new Type(N);
4332
+ var L = R(a()), F = new Type(N);
4333
4333
  F.group = !0;
4334
- var H = new Field(B, L, N, D);
4335
- H.filename = parse.filename, $(F, function(W) {
4334
+ var z = new Field(B, L, N, D);
4335
+ z.filename = parse.filename, $(F, function(W) {
4336
4336
  switch (W) {
4337
4337
  case "option":
4338
4338
  G(F, W), d(";");
@@ -4345,7 +4345,7 @@ function parse(s, i, r) {
4345
4345
  _ ? q(F, "proto3_optional") : q(F, "optional");
4346
4346
  break;
4347
4347
  case "message":
4348
- z(F, W);
4348
+ H(F, W);
4349
4349
  break;
4350
4350
  case "enum":
4351
4351
  U(F, W);
@@ -4354,26 +4354,26 @@ function parse(s, i, r) {
4354
4354
  default:
4355
4355
  throw b(W);
4356
4356
  }
4357
- }), S.add(F).add(H);
4357
+ }), S.add(F).add(z);
4358
4358
  }
4359
4359
  function Z(S) {
4360
4360
  d("<");
4361
- var D = o();
4361
+ var D = a();
4362
4362
  if (types.mapKey[D] === void 0) throw b(D, "type");
4363
4363
  d(",");
4364
- var N = o();
4364
+ var N = a();
4365
4365
  if (!typeRefRe.test(N)) throw b(N, "type");
4366
4366
  d(">");
4367
- var B = o();
4367
+ var B = a();
4368
4368
  if (!nameRe.test(B)) throw b(B, "name");
4369
4369
  d("=");
4370
- var L = new MapField(O(B), R(o()), D, N);
4370
+ var L = new MapField(O(B), R(a()), D, N);
4371
4371
  $(
4372
4372
  L,
4373
- function(H) {
4374
- if (H === "option")
4375
- G(L, H), d(";");
4376
- else throw b(H);
4373
+ function(z) {
4374
+ if (z === "option")
4375
+ G(L, z), d(";");
4376
+ else throw b(z);
4377
4377
  },
4378
4378
  function() {
4379
4379
  te(L);
@@ -4381,14 +4381,14 @@ function parse(s, i, r) {
4381
4381
  ), S.add(L);
4382
4382
  }
4383
4383
  function X(S, D) {
4384
- if (!nameRe.test(D = o())) throw b(D, "name");
4384
+ if (!nameRe.test(D = a())) throw b(D, "name");
4385
4385
  var N = new OneOf(O(D));
4386
4386
  $(N, function(L) {
4387
4387
  L === "option" ? (G(N, L), d(";")) : (u(L), q(N, "optional"));
4388
4388
  }), S.add(N);
4389
4389
  }
4390
4390
  function U(S, D) {
4391
- if (!nameRe.test(D = o())) throw b(D, "name");
4391
+ if (!nameRe.test(D = a())) throw b(D, "name");
4392
4392
  var N = new Enum(D);
4393
4393
  $(N, function(L) {
4394
4394
  switch (L) {
@@ -4406,7 +4406,7 @@ function parse(s, i, r) {
4406
4406
  function ee(S, D) {
4407
4407
  if (!nameRe.test(D)) throw b(D, "name");
4408
4408
  d("=");
4409
- var N = R(o(), !0), B = {
4409
+ var N = R(a(), !0), B = {
4410
4410
  options: void 0
4411
4411
  };
4412
4412
  B.setOption = function(L, F) {
@@ -4425,16 +4425,16 @@ function parse(s, i, r) {
4425
4425
  }
4426
4426
  function G(S, D) {
4427
4427
  var N = d("(", !0);
4428
- if (!typeRefRe.test(D = o())) throw b(D, "name");
4428
+ if (!typeRefRe.test(D = a())) throw b(D, "name");
4429
4429
  var B = D, L = B, F;
4430
- N && (d(")"), B = "(" + B + ")", L = B, D = c(), fqTypeRefRe.test(D) && (F = D.slice(1), B += D, o())), d("=");
4431
- var H = K(S, B);
4432
- ne(S, L, H, F);
4430
+ N && (d(")"), B = "(" + B + ")", L = B, D = c(), fqTypeRefRe.test(D) && (F = D.slice(1), B += D, a())), d("=");
4431
+ var z = K(S, B);
4432
+ ne(S, L, z, F);
4433
4433
  }
4434
4434
  function K(S, D) {
4435
4435
  if (d("{", !0)) {
4436
4436
  for (var N = {}; !d("}", !0); ) {
4437
- if (!nameRe.test(j = o()))
4437
+ if (!nameRe.test(j = a()))
4438
4438
  throw b(j, "name");
4439
4439
  if (j === null)
4440
4440
  throw b(j, "end of input");
@@ -4451,8 +4451,8 @@ function parse(s, i, r) {
4451
4451
  }
4452
4452
  } else
4453
4453
  B = T(), Q(S, D + "." + j, B);
4454
- var H = N[L];
4455
- H && (B = [].concat(H).concat(B)), N[L] = B, d(",", !0), d(";", !0);
4454
+ var z = N[L];
4455
+ z && (B = [].concat(z).concat(B)), N[L] = B, d(",", !0), d(";", !0);
4456
4456
  }
4457
4457
  return N;
4458
4458
  }
@@ -4475,29 +4475,29 @@ function parse(s, i, r) {
4475
4475
  return S;
4476
4476
  }
4477
4477
  function se(S, D) {
4478
- if (!nameRe.test(D = o())) throw b(D, "service name");
4478
+ if (!nameRe.test(D = a())) throw b(D, "service name");
4479
4479
  var N = new Service(D);
4480
4480
  $(N, function(L) {
4481
4481
  if (!P(N, L))
4482
- if (L === "rpc") ae(N, L);
4482
+ if (L === "rpc") oe(N, L);
4483
4483
  else throw b(L);
4484
4484
  }), S.add(N);
4485
4485
  }
4486
- function ae(S, D) {
4486
+ function oe(S, D) {
4487
4487
  var N = l(), B = D;
4488
- if (!nameRe.test(D = o())) throw b(D, "name");
4489
- var L = D, F, H, J, W;
4490
- if (d("("), d("stream", !0) && (H = !0), !typeRefRe.test(D = o()) || (F = D, d(")"), d("returns"), d("("), d("stream", !0) && (W = !0), !typeRefRe.test(D = o()))) throw b(D);
4488
+ if (!nameRe.test(D = a())) throw b(D, "name");
4489
+ var L = D, F, z, J, W;
4490
+ if (d("("), d("stream", !0) && (z = !0), !typeRefRe.test(D = a()) || (F = D, d(")"), d("returns"), d("("), d("stream", !0) && (W = !0), !typeRefRe.test(D = a()))) throw b(D);
4491
4491
  J = D, d(")");
4492
- var re = new Method(L, B, F, J, H, W);
4492
+ var re = new Method(L, B, F, J, z, W);
4493
4493
  re.comment = N, $(re, function(ie) {
4494
4494
  if (ie === "option")
4495
4495
  G(re, ie), d(";");
4496
4496
  else throw b(ie);
4497
4497
  }), S.add(re);
4498
4498
  }
4499
- function oe(S, D) {
4500
- if (!typeRefRe.test(D = o())) throw b(D, "reference");
4499
+ function ae(S, D) {
4500
+ if (!typeRefRe.test(D = a())) throw b(D, "reference");
4501
4501
  var N = D;
4502
4502
  $(null, function(L) {
4503
4503
  switch (L) {
@@ -4515,7 +4515,7 @@ function parse(s, i, r) {
4515
4515
  }
4516
4516
  });
4517
4517
  }
4518
- for (var j; (j = o()) !== null; )
4518
+ for (var j; (j = a()) !== null; )
4519
4519
  switch (j) {
4520
4520
  case "package":
4521
4521
  if (!m) throw b(j);
@@ -4896,37 +4896,37 @@ var index = {
4896
4896
  };
4897
4897
  function invertToCanvas(s) {
4898
4898
  var c;
4899
- const i = s.width, r = s.height, a = document.createElement("canvas");
4900
- a.width = i, a.height = r;
4901
- const h = a.getContext("2d");
4899
+ const i = s.width, r = s.height, o = document.createElement("canvas");
4900
+ o.width = i, o.height = r;
4901
+ const h = o.getContext("2d");
4902
4902
  h.translate(0, r), h.scale(1, -1), h.drawImage(s, 0, 0);
4903
- const o = h.getImageData(0, 0, i, r), u = o.data;
4903
+ const a = h.getImageData(0, 0, i, r), u = a.data;
4904
4904
  for (let d = 0; d < u.length; d += 4)
4905
4905
  u[d] = 255 - u[d], u[d + 1] = 255 - u[d + 1], u[d + 2] = 255 - u[d + 2];
4906
- return h.putImageData(o, 0, 0), "close" in s && ((c = s.close) == null || c.call(s)), a;
4906
+ return h.putImageData(a, 0, 0), "close" in s && ((c = s.close) == null || c.call(s)), o;
4907
4907
  }
4908
4908
  class CustomWebMapTileServiceImageryProvider extends Cesium.WebMapTileServiceImageryProvider {
4909
4909
  constructor(i) {
4910
4910
  super(i), this.options = i;
4911
4911
  }
4912
- requestImage(i, r, a, h) {
4912
+ requestImage(i, r, o, h) {
4913
4913
  this.options.subdomains && h && h.url && (h.url = h.url.replace(
4914
4914
  "{s}",
4915
- this.pickSubdomain(i, r, a, this.options.subdomains)
4915
+ this.pickSubdomain(i, r, o, this.options.subdomains)
4916
4916
  ));
4917
- const o = super.requestImage(i, r, a, h);
4918
- return o && o.then((u) => {
4917
+ const a = super.requestImage(i, r, o, h);
4918
+ return a && a.then((u) => {
4919
4919
  var c, d;
4920
4920
  return ((d = (c = this.options).requestInterceptor) == null ? void 0 : d.call(c, u)) ?? u;
4921
4921
  });
4922
4922
  }
4923
- pickSubdomain(i, r, a, h) {
4924
- const o = Math.abs(i * 73856093 ^ r * 19349663 ^ a * 83492791) % h.length;
4925
- return h[o];
4923
+ pickSubdomain(i, r, o, h) {
4924
+ const a = Math.abs(i * 73856093 ^ r * 19349663 ^ o * 83492791) % h.length;
4925
+ return h[a];
4926
4926
  }
4927
4927
  }
4928
4928
  function createTdtProvider(s, i) {
4929
- const { token: r, ...a } = i;
4929
+ const { token: r, ...o } = i;
4930
4930
  return new CustomWebMapTileServiceImageryProvider({
4931
4931
  url: `https://t{s}.tianditu.gov.cn/${s}_w/wmts?tk=${r}`,
4932
4932
  subdomains: ["0", "1", "2", "3", "4", "5", "6", "7"],
@@ -4936,7 +4936,7 @@ function createTdtProvider(s, i) {
4936
4936
  tileMatrixSetID: "w",
4937
4937
  maximumLevel: 18,
4938
4938
  credit: new Cesium.Credit("TianDiTu"),
4939
- ...a
4939
+ ...o
4940
4940
  });
4941
4941
  }
4942
4942
  function createTdtTerrain(s) {
@@ -4952,11 +4952,11 @@ function getRawTag(s) {
4952
4952
  var i = hasOwnProperty$6.call(s, symToStringTag$1), r = s[symToStringTag$1];
4953
4953
  try {
4954
4954
  s[symToStringTag$1] = void 0;
4955
- var a = !0;
4955
+ var o = !0;
4956
4956
  } catch {
4957
4957
  }
4958
4958
  var h = nativeObjectToString$1.call(s);
4959
- return a && (i ? s[symToStringTag$1] = r : delete s[symToStringTag$1]), h;
4959
+ return o && (i ? s[symToStringTag$1] = r : delete s[symToStringTag$1]), h;
4960
4960
  }
4961
4961
  var objectProto$7 = Object.prototype, nativeObjectToString = objectProto$7.toString;
4962
4962
  function objectToString(s) {
@@ -5067,8 +5067,8 @@ var HOT_COUNT = 800, HOT_SPAN = 16, nativeNow = Date.now;
5067
5067
  function shortOut(s) {
5068
5068
  var i = 0, r = 0;
5069
5069
  return function() {
5070
- var a = nativeNow(), h = HOT_SPAN - (a - r);
5071
- if (r = a, h > 0) {
5070
+ var o = nativeNow(), h = HOT_SPAN - (o - r);
5071
+ if (r = o, h > 0) {
5072
5072
  if (++i >= HOT_COUNT)
5073
5073
  return arguments[0];
5074
5074
  } else
@@ -5105,11 +5105,11 @@ function eq(s, i) {
5105
5105
  var nativeMax$1 = Math.max;
5106
5106
  function overRest(s, i, r) {
5107
5107
  return i = nativeMax$1(i === void 0 ? s.length - 1 : i, 0), function() {
5108
- for (var a = arguments, h = -1, o = nativeMax$1(a.length - i, 0), u = Array(o); ++h < o; )
5109
- u[h] = a[i + h];
5108
+ for (var o = arguments, h = -1, a = nativeMax$1(o.length - i, 0), u = Array(a); ++h < a; )
5109
+ u[h] = o[i + h];
5110
5110
  h = -1;
5111
5111
  for (var c = Array(i + 1); ++h < i; )
5112
- c[h] = a[h];
5112
+ c[h] = o[h];
5113
5113
  return c[i] = r(u), apply(s, this, c);
5114
5114
  };
5115
5115
  }
@@ -5126,8 +5126,8 @@ function isArrayLike(s) {
5126
5126
  function isIterateeCall(s, i, r) {
5127
5127
  if (!isObject(r))
5128
5128
  return !1;
5129
- var a = typeof i;
5130
- return (a == "number" ? isArrayLike(r) && isIndex(i, r.length) : a == "string" && i in r) ? eq(r[i], s) : !1;
5129
+ var o = typeof i;
5130
+ return (o == "number" ? isArrayLike(r) && isIndex(i, r.length) : o == "string" && i in r) ? eq(r[i], s) : !1;
5131
5131
  }
5132
5132
  var objectProto$5 = Object.prototype;
5133
5133
  function isPrototype(s) {
@@ -5135,9 +5135,9 @@ function isPrototype(s) {
5135
5135
  return s === r;
5136
5136
  }
5137
5137
  function baseTimes(s, i) {
5138
- for (var r = -1, a = Array(s); ++r < s; )
5139
- a[r] = i(r);
5140
- return a;
5138
+ for (var r = -1, o = Array(s); ++r < s; )
5139
+ o[r] = i(r);
5140
+ return o;
5141
5141
  }
5142
5142
  var argsTag$1 = "[object Arguments]";
5143
5143
  function baseIsArguments(s) {
@@ -5170,12 +5170,12 @@ var freeExports = typeof exports == "object" && exports && !exports.nodeType &&
5170
5170
  }
5171
5171
  }(), nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray, isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
5172
5172
  function arrayLikeKeys(s, i) {
5173
- var r = isArray(s), a = !r && isArguments(s), h = !r && !a && isBuffer(s), o = !r && !a && !h && isTypedArray(s), u = r || a || h || o, c = u ? baseTimes(s.length, String) : [], d = c.length;
5173
+ var r = isArray(s), o = !r && isArguments(s), h = !r && !o && isBuffer(s), a = !r && !o && !h && isTypedArray(s), u = r || o || h || a, c = u ? baseTimes(s.length, String) : [], d = c.length;
5174
5174
  for (var l in s)
5175
5175
  u && // Safari 9 has enumerable `arguments.length` in strict mode.
5176
5176
  (l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
5177
5177
  h && (l == "offset" || l == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
5178
- o && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
5178
+ a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
5179
5179
  isIndex(l, d)) || c.push(l);
5180
5180
  return c;
5181
5181
  }
@@ -5191,8 +5191,8 @@ function baseKeysIn(s) {
5191
5191
  if (!isObject(s))
5192
5192
  return nativeKeysIn(s);
5193
5193
  var i = isPrototype(s), r = [];
5194
- for (var a in s)
5195
- a == "constructor" && (i || !hasOwnProperty$3.call(s, a)) || r.push(a);
5194
+ for (var o in s)
5195
+ o == "constructor" && (i || !hasOwnProperty$3.call(s, o)) || r.push(o);
5196
5196
  return r;
5197
5197
  }
5198
5198
  function keysIn(s) {
@@ -5228,8 +5228,8 @@ function hashSet(s, i) {
5228
5228
  function Hash(s) {
5229
5229
  var i = -1, r = s == null ? 0 : s.length;
5230
5230
  for (this.clear(); ++i < r; ) {
5231
- var a = s[i];
5232
- this.set(a[0], a[1]);
5231
+ var o = s[i];
5232
+ this.set(o[0], o[1]);
5233
5233
  }
5234
5234
  }
5235
5235
  Hash.prototype.clear = hashClear;
@@ -5251,8 +5251,8 @@ function listCacheDelete(s) {
5251
5251
  var i = this.__data__, r = assocIndexOf(i, s);
5252
5252
  if (r < 0)
5253
5253
  return !1;
5254
- var a = i.length - 1;
5255
- return r == a ? i.pop() : splice.call(i, r, 1), --this.size, !0;
5254
+ var o = i.length - 1;
5255
+ return r == o ? i.pop() : splice.call(i, r, 1), --this.size, !0;
5256
5256
  }
5257
5257
  function listCacheGet(s) {
5258
5258
  var i = this.__data__, r = assocIndexOf(i, s);
@@ -5262,14 +5262,14 @@ function listCacheHas(s) {
5262
5262
  return assocIndexOf(this.__data__, s) > -1;
5263
5263
  }
5264
5264
  function listCacheSet(s, i) {
5265
- var r = this.__data__, a = assocIndexOf(r, s);
5266
- return a < 0 ? (++this.size, r.push([s, i])) : r[a][1] = i, this;
5265
+ var r = this.__data__, o = assocIndexOf(r, s);
5266
+ return o < 0 ? (++this.size, r.push([s, i])) : r[o][1] = i, this;
5267
5267
  }
5268
5268
  function ListCache(s) {
5269
5269
  var i = -1, r = s == null ? 0 : s.length;
5270
5270
  for (this.clear(); ++i < r; ) {
5271
- var a = s[i];
5272
- this.set(a[0], a[1]);
5271
+ var o = s[i];
5272
+ this.set(o[0], o[1]);
5273
5273
  }
5274
5274
  }
5275
5275
  ListCache.prototype.clear = listCacheClear;
@@ -5304,14 +5304,14 @@ function mapCacheHas(s) {
5304
5304
  return getMapData(this, s).has(s);
5305
5305
  }
5306
5306
  function mapCacheSet(s, i) {
5307
- var r = getMapData(this, s), a = r.size;
5308
- return r.set(s, i), this.size += r.size == a ? 0 : 1, this;
5307
+ var r = getMapData(this, s), o = r.size;
5308
+ return r.set(s, i), this.size += r.size == o ? 0 : 1, this;
5309
5309
  }
5310
5310
  function MapCache(s) {
5311
5311
  var i = -1, r = s == null ? 0 : s.length;
5312
5312
  for (this.clear(); ++i < r; ) {
5313
- var a = s[i];
5314
- this.set(a[0], a[1]);
5313
+ var o = s[i];
5314
+ this.set(o[0], o[1]);
5315
5315
  }
5316
5316
  }
5317
5317
  MapCache.prototype.clear = mapCacheClear;
@@ -5324,11 +5324,11 @@ function memoize(s, i) {
5324
5324
  if (typeof s != "function" || i != null && typeof i != "function")
5325
5325
  throw new TypeError(FUNC_ERROR_TEXT$1);
5326
5326
  var r = function() {
5327
- var a = arguments, h = i ? i.apply(this, a) : a[0], o = r.cache;
5328
- if (o.has(h))
5329
- return o.get(h);
5330
- var u = s.apply(this, a);
5331
- return r.cache = o.set(h, u) || o, u;
5327
+ var o = arguments, h = i ? i.apply(this, o) : o[0], a = r.cache;
5328
+ if (a.has(h))
5329
+ return a.get(h);
5330
+ var u = s.apply(this, o);
5331
+ return r.cache = a.set(h, u) || a, u;
5332
5332
  };
5333
5333
  return r.cache = new (memoize.Cache || MapCache)(), r;
5334
5334
  }
@@ -5337,24 +5337,24 @@ var now = function() {
5337
5337
  return root.Date.now();
5338
5338
  }, FUNC_ERROR_TEXT = "Expected a function", nativeMax = Math.max, nativeMin = Math.min;
5339
5339
  function debounce(s, i, r) {
5340
- var a, h, o, u, c, d, l = 0, m = !1, y = !1, g = !0;
5340
+ var o, h, a, u, c, d, l = 0, m = !1, y = !1, g = !0;
5341
5341
  if (typeof s != "function")
5342
5342
  throw new TypeError(FUNC_ERROR_TEXT);
5343
- i = toNumber(i) || 0, isObject(r) && (m = !!r.leading, y = "maxWait" in r, o = y ? nativeMax(toNumber(r.maxWait) || 0, i) : o, g = "trailing" in r ? !!r.trailing : g);
5343
+ i = toNumber(i) || 0, isObject(r) && (m = !!r.leading, y = "maxWait" in r, a = y ? nativeMax(toNumber(r.maxWait) || 0, i) : a, g = "trailing" in r ? !!r.trailing : g);
5344
5344
  function p(C) {
5345
- var R = a, I = h;
5346
- return a = h = void 0, l = C, u = s.apply(I, R), u;
5345
+ var R = o, I = h;
5346
+ return o = h = void 0, l = C, u = s.apply(I, R), u;
5347
5347
  }
5348
5348
  function v(C) {
5349
5349
  return l = C, c = setTimeout(O, i), m ? p(C) : u;
5350
5350
  }
5351
5351
  function _(C) {
5352
5352
  var R = C - d, I = C - l, k = i - R;
5353
- return y ? nativeMin(k, o - I) : k;
5353
+ return y ? nativeMin(k, a - I) : k;
5354
5354
  }
5355
5355
  function w(C) {
5356
5356
  var R = C - d, I = C - l;
5357
- return d === void 0 || R >= i || R < 0 || y && I >= o;
5357
+ return d === void 0 || R >= i || R < 0 || y && I >= a;
5358
5358
  }
5359
5359
  function O() {
5360
5360
  var C = now();
@@ -5363,17 +5363,17 @@ function debounce(s, i, r) {
5363
5363
  c = setTimeout(O, _(C));
5364
5364
  }
5365
5365
  function b(C) {
5366
- return c = void 0, g && a ? p(C) : (a = h = void 0, u);
5366
+ return c = void 0, g && o ? p(C) : (o = h = void 0, u);
5367
5367
  }
5368
5368
  function x() {
5369
- c !== void 0 && clearTimeout(c), l = 0, a = d = h = c = void 0;
5369
+ c !== void 0 && clearTimeout(c), l = 0, o = d = h = c = void 0;
5370
5370
  }
5371
5371
  function T() {
5372
5372
  return c === void 0 ? u : b(now());
5373
5373
  }
5374
5374
  function E() {
5375
5375
  var C = now(), R = w(C);
5376
- if (a = arguments, h = this, d = C, R) {
5376
+ if (o = arguments, h = this, d = C, R) {
5377
5377
  if (c === void 0)
5378
5378
  return v(d);
5379
5379
  if (y)
@@ -5385,11 +5385,11 @@ function debounce(s, i, r) {
5385
5385
  }
5386
5386
  var objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, defaults = baseRest(function(s, i) {
5387
5387
  s = Object(s);
5388
- var r = -1, a = i.length, h = a > 2 ? i[2] : void 0;
5389
- for (h && isIterateeCall(i[0], i[1], h) && (a = 1); ++r < a; )
5390
- for (var o = i[r], u = keysIn(o), c = -1, d = u.length; ++c < d; ) {
5388
+ var r = -1, o = i.length, h = o > 2 ? i[2] : void 0;
5389
+ for (h && isIterateeCall(i[0], i[1], h) && (o = 1); ++r < o; )
5390
+ for (var a = i[r], u = keysIn(a), c = -1, d = u.length; ++c < d; ) {
5391
5391
  var l = u[c], m = s[l];
5392
- (m === void 0 || eq(m, objectProto[l]) && !hasOwnProperty.call(s, l)) && (s[l] = o[l]);
5392
+ (m === void 0 || eq(m, objectProto[l]) && !hasOwnProperty.call(s, l)) && (s[l] = a[l]);
5393
5393
  }
5394
5394
  return s;
5395
5395
  });
@@ -5400,23 +5400,23 @@ var eventemitter3 = { exports: {} }, hasRequiredEventemitter3;
5400
5400
  function requireEventemitter3() {
5401
5401
  return hasRequiredEventemitter3 || (hasRequiredEventemitter3 = 1, function(s) {
5402
5402
  var i = Object.prototype.hasOwnProperty, r = "~";
5403
- function a() {
5403
+ function o() {
5404
5404
  }
5405
- Object.create && (a.prototype = /* @__PURE__ */ Object.create(null), new a().__proto__ || (r = !1));
5405
+ Object.create && (o.prototype = /* @__PURE__ */ Object.create(null), new o().__proto__ || (r = !1));
5406
5406
  function h(d, l, m) {
5407
5407
  this.fn = d, this.context = l, this.once = m || !1;
5408
5408
  }
5409
- function o(d, l, m, y, g) {
5409
+ function a(d, l, m, y, g) {
5410
5410
  if (typeof m != "function")
5411
5411
  throw new TypeError("The listener must be a function");
5412
5412
  var p = new h(m, y || d, g), v = r ? r + l : l;
5413
5413
  return d._events[v] ? d._events[v].fn ? d._events[v] = [d._events[v], p] : d._events[v].push(p) : (d._events[v] = p, d._eventsCount++), d;
5414
5414
  }
5415
5415
  function u(d, l) {
5416
- --d._eventsCount === 0 ? d._events = new a() : delete d._events[l];
5416
+ --d._eventsCount === 0 ? d._events = new o() : delete d._events[l];
5417
5417
  }
5418
5418
  function c() {
5419
- this._events = new a(), this._eventsCount = 0;
5419
+ this._events = new o(), this._eventsCount = 0;
5420
5420
  }
5421
5421
  c.prototype.eventNames = function() {
5422
5422
  var l = [], m, y;
@@ -5480,9 +5480,9 @@ function requireEventemitter3() {
5480
5480
  }
5481
5481
  return !0;
5482
5482
  }, c.prototype.on = function(l, m, y) {
5483
- return o(this, l, m, y, !1);
5483
+ return a(this, l, m, y, !1);
5484
5484
  }, c.prototype.once = function(l, m, y) {
5485
- return o(this, l, m, y, !0);
5485
+ return a(this, l, m, y, !0);
5486
5486
  }, c.prototype.removeListener = function(l, m, y, g) {
5487
5487
  var p = r ? r + l : l;
5488
5488
  if (!this._events[p]) return this;
@@ -5499,15 +5499,15 @@ function requireEventemitter3() {
5499
5499
  return this;
5500
5500
  }, c.prototype.removeAllListeners = function(l) {
5501
5501
  var m;
5502
- return l ? (m = r ? r + l : l, this._events[m] && u(this, m)) : (this._events = new a(), this._eventsCount = 0), this;
5502
+ return l ? (m = r ? r + l : l, this._events[m] && u(this, m)) : (this._events = new o(), this._eventsCount = 0), this;
5503
5503
  }, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = r, c.EventEmitter = c, s.exports = c;
5504
5504
  }(eventemitter3)), eventemitter3.exports;
5505
5505
  }
5506
5506
  var eventemitter3Exports = requireEventemitter3();
5507
5507
  const EventEmitter = /* @__PURE__ */ getDefaultExportFromCjs(eventemitter3Exports);
5508
5508
  class WmsLayer {
5509
- constructor(i, r, a, h = 1 / 0) {
5510
- this.ctrl = i, this.key = r, this.layer = a, this.zIndex = h, this.ctrl.registerLayer(this);
5509
+ constructor(i, r, o, h = 1 / 0) {
5510
+ this.ctrl = i, this.key = r, this.layer = o, this.zIndex = h, this.ctrl.registerLayer(this);
5511
5511
  }
5512
5512
  show(i) {
5513
5513
  this.ctrl.showLayer(i, this.key);
@@ -5531,7 +5531,7 @@ class WmsLayerController extends EventEmitter {
5531
5531
  this.handler || this.hookClickEvent(r), this.imgLayer = new ImageryLayer(
5532
5532
  new WebMapServiceImageryProvider({
5533
5533
  ...this.args,
5534
- layers: this.showLayers.map((a) => this.layerMap.get(a).layer).join(",")
5534
+ layers: this.showLayers.map((o) => this.layerMap.get(o).layer).join(",")
5535
5535
  })
5536
5536
  ), this.imgLayer.show = !0, r.imageryLayers.add(this.imgLayer);
5537
5537
  }, 200));
@@ -5553,21 +5553,21 @@ class WmsLayerController extends EventEmitter {
5553
5553
  throw new Error(`Layer with key 【${r.key}】 is already registered`);
5554
5554
  this.layerMap.set(r.key, r);
5555
5555
  }
5556
- showLayer(r, a) {
5557
- if (!this.layerMap.has(a))
5558
- throw new Error(`Layer with key 【${a}】 is not registered`);
5559
- this.showLayers.push(a), this.showLayers.sort((h, o) => {
5560
- const u = this.layerMap.get(h).zIndex, c = this.layerMap.get(o).zIndex;
5556
+ showLayer(r, o) {
5557
+ if (!this.layerMap.has(o))
5558
+ throw new Error(`Layer with key 【${o}】 is not registered`);
5559
+ this.showLayers.push(o), this.showLayers.sort((h, a) => {
5560
+ const u = this.layerMap.get(h).zIndex, c = this.layerMap.get(a).zIndex;
5561
5561
  return u - c;
5562
5562
  }), this.update(r);
5563
5563
  }
5564
- hideLayer(r, a) {
5565
- const h = this.showLayers.indexOf(a);
5564
+ hideLayer(r, o) {
5565
+ const h = this.showLayers.indexOf(o);
5566
5566
  h !== -1 && (this.showLayers.splice(h, 1), this.update(r));
5567
5567
  }
5568
5568
  hookClickEvent(r) {
5569
- this.handler = new ScreenSpaceEventHandler(r.scene.canvas), this.handler.setInputAction(async (a) => {
5570
- const h = r.scene, o = h.camera.getPickRay(a.position), u = await h.imageryLayers.pickImageryLayerFeatures(o, r.scene);
5569
+ this.handler = new ScreenSpaceEventHandler(r.scene.canvas), this.handler.setInputAction(async (o) => {
5570
+ const h = r.scene, a = h.camera.getPickRay(o.position), u = await h.imageryLayers.pickImageryLayerFeatures(a, r.scene);
5571
5571
  this.emit("click", u);
5572
5572
  }, ScreenSpaceEventType.LEFT_CLICK);
5573
5573
  }
@@ -5613,15 +5613,15 @@ const createShipIconUrl = memoize(
5613
5613
  (s, i) => `${s},${i}`
5614
5614
  ), createShipIconV2 = memoize(
5615
5615
  (s) => {
5616
- const i = s.designBeam, r = s.designLength, a = s.aisFromBow != null && s.aisFromCenter != null ? { x: s.aisFromCenter, y: s.designLength - s.aisFromBow } : { x: 0, y: r / 2 }, h = `${i / 2 + a.x} ${a.y}`, o = `${-i / 2 + a.x} ${a.y}`, u = `${a.x} ${a.y}`, c = `${a.x} ${-r + a.y}`, d = Math.floor(r * 4 / 5), l = Math.floor((r - d) * 2 / 3), m = `M${u}
5617
- C${h} ${h} ${i / 2 + a.x} ${a.y - 3}
5618
- V${-d + a.y}
5619
- C${i / 2 + a.x} ${a.y - d - l} ${2 + a.x} ${-r + a.y} ${c}
5620
- C${-2 + a.x} ${-r + a.y} ${-i / 2 + a.x} ${a.y - d - l} ${-i / 2 + a.x} ${-d + a.y}
5621
- V${-3 + a.y}
5622
- C${o} ${o} ${u}`, y = Math.max(Math.abs(i / 2 + a.x), Math.abs(-i / 2 + a.x)), g = Math.max(
5623
- Math.abs(-r + a.y + (s.isMoving ? -5 : 0)),
5624
- Math.abs(a.y + (s.isMoving ? 146 / 124 * i : 0))
5616
+ const i = s.designBeam, r = s.designLength, o = s.aisFromBow != null && s.aisFromCenter != null ? { x: s.aisFromCenter, y: s.designLength - s.aisFromBow } : { x: 0, y: r / 2 }, h = `${i / 2 + o.x} ${o.y}`, a = `${-i / 2 + o.x} ${o.y}`, u = `${o.x} ${o.y}`, c = `${o.x} ${-r + o.y}`, d = Math.floor(r * 4 / 5), l = Math.floor((r - d) * 2 / 3), m = `M${u}
5617
+ C${h} ${h} ${i / 2 + o.x} ${o.y - 3}
5618
+ V${-d + o.y}
5619
+ C${i / 2 + o.x} ${o.y - d - l} ${2 + o.x} ${-r + o.y} ${c}
5620
+ C${-2 + o.x} ${-r + o.y} ${-i / 2 + o.x} ${o.y - d - l} ${-i / 2 + o.x} ${-d + o.y}
5621
+ V${-3 + o.y}
5622
+ C${a} ${a} ${u}`, y = Math.max(Math.abs(i / 2 + o.x), Math.abs(-i / 2 + o.x)), g = Math.max(
5623
+ Math.abs(-r + o.y + (s.isMoving ? -5 : 0)),
5624
+ Math.abs(o.y + (s.isMoving ? 146 / 124 * i : 0))
5625
5625
  ), p = [-y * 1.2, -g, 2 * y * 1.2, 2 * g], v = { x: 2 * 1.2 * y / i, y: 2 * g / r }, _ = `<?xml version="1.0" encoding="UTF-8"?>
5626
5626
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="${p.join(" ")}">
5627
5627
  <defs>
@@ -5651,7 +5651,7 @@ const createShipIconUrl = memoize(
5651
5651
  <path id="svg_1" data-name="svg 1" class="cls-2" d="M${c}v-5"/>
5652
5652
  <path id="svg_4" data-name="svg 4" class="cls-1" d="${m}"/>
5653
5653
  </g>
5654
- <image id="img_1" width="${i}" height="${146 / 124 * i}" transform="translate(${-i / 2 + a.x} ${a.y})" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAACSCAMAAACwjl5+AAAAq1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Nr6iZAAAAOXRSTlMABRshFgkSZg5qJmFdWlEqOXBFPYVJQYB1VXtNLpc1mzKguZCKtJONxc69yaukwa/SqN/k1trs6fBhRQqRAAAVcElEQVR42rSX3ZKaQBCFgxoIICh/ggjiIMPPMAOy6yZ5/yfLaTBVSa5istu1Vepe+M3p7jkHPz1Vmqav99umYLxsh7bvO6oeb8ZR1XUS7TaftU8fVdqX9cWpGBt5WeJvKbwbOJvyujEPlv5RcLBXZyesc1lyMSk5qWmS0zQxNQrGVF2Fpv9hdOg+2HFzZZwPQjFWFAxV4FUNJd5VcWr4u4+hgx0YcVgVchRtOSmW50wpVoA+lS0vWB6mifkxdE2H7jSOazaVfYtJo91yHKVSUmLq/Yihp2Zi09a9N1rb7Hxi07oN/dAOgnMwB4F9E3jtW1Y1oWea2yhbve/Oa583WWR4SRLnGHAPVkd3bblpA70XvcjDKjVs24ku70rX9NU5OgIeV9ect0L03a3rbve3l5e3+6273Vp0opVVmnrG1jkFl9UX7R3HfY5c2zCTOLxKNHzobzdCv3779voK/ls3tOi+ihPPcI5uFGRrXdPeZ8t16+y7zpbgVcHFWLb9fUZ/RX0D/e2txew5zxPTcNzIP+xBR+vfgb2x9oeTe3Rs04sLXuKmDWg5sb+jFnqH9ZejrL3t1o0Oh+CcrWG1/4v//GW1OwfR6XRybC+5SrBLPnTd/YXYC/3l7XYfJB+VVA3aHgX7/fli/TddA3ud7Q++758cI6kUVwo3rOu7t9/ht46rETe/iA3Az5cs261X+hfQ/4Otb9a7bB/sA9+1zbCYGIOx4FID/voV9AWOje8GxSaY3jW1XYzcsnbWf9E1DfNeW1l2yc6B75hxDjNVk6Q4Rdtp3x4zv3dt23Oy+bquUvsUZNYa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"/>
5654
+ <image id="img_1" width="${i}" height="${146 / 124 * i}" transform="translate(${-i / 2 + o.x} ${o.y})" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAACSCAMAAACwjl5+AAAAq1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Nr6iZAAAAOXRSTlMABRshFgkSZg5qJmFdWlEqOXBFPYVJQYB1VXtNLpc1mzKguZCKtJONxc69yaukwa/SqN/k1trs6fBhRQqRAAAVcElEQVR42rSX3ZKaQBCFgxoIICh/ggjiIMPPMAOy6yZ5/yfLaTBVSa5istu1Vepe+M3p7jkHPz1Vmqav99umYLxsh7bvO6oeb8ZR1XUS7TaftU8fVdqX9cWpGBt5WeJvKbwbOJvyujEPlv5RcLBXZyesc1lyMSk5qWmS0zQxNQrGVF2Fpv9hdOg+2HFzZZwPQjFWFAxV4FUNJd5VcWr4u4+hgx0YcVgVchRtOSmW50wpVoA+lS0vWB6mifkxdE2H7jSOazaVfYtJo91yHKVSUmLq/Yihp2Zi09a9N1rb7Hxi07oN/dAOgnMwB4F9E3jtW1Y1oWea2yhbve/Oa583WWR4SRLnGHAPVkd3bblpA70XvcjDKjVs24ku70rX9NU5OgIeV9ect0L03a3rbve3l5e3+6273Vp0opVVmnrG1jkFl9UX7R3HfY5c2zCTOLxKNHzobzdCv3779voK/ls3tOi+ihPPcI5uFGRrXdPeZ8t16+y7zpbgVcHFWLb9fUZ/RX0D/e2txew5zxPTcNzIP+xBR+vfgb2x9oeTe3Rs04sLXuKmDWg5sb+jFnqH9ZejrL3t1o0Oh+CcrWG1/4v//GW1OwfR6XRybC+5SrBLPnTd/YXYC/3l7XYfJB+VVA3aHgX7/fli/TddA3ud7Q++758cI6kUVwo3rOu7t9/ht46rETe/iA3Az5cs261X+hfQ/4Otb9a7bB/sA9+1zbCYGIOx4FID/voV9AWOje8GxSaY3jW1XYzcsnbWf9E1DfNeW1l2yc6B75hxDjNVk6Q4Rdtp3x4zv3dt23Oy+bquUvsUZNYa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"/>
5655
5655
  </svg>`;
5656
5656
  return { url: URL.createObjectURL(new Blob([_], { type: "image/svg+xml" })), viewBox: p, scale: v };
5657
5657
  },
@@ -5705,12 +5705,12 @@ const createShipIconUrl = memoize(
5705
5705
  // 油船
5706
5706
  ]);
5707
5707
  function createAlphaSampled(s) {
5708
- const i = new Cesium.SampledProperty(Cesium.Color), r = (s == null ? void 0 : s.startTime) ?? Cesium.JulianDate.now(), a = Cesium.JulianDate.addMinutes(r, 1, new Cesium.JulianDate()), h = Cesium.JulianDate.addMinutes(r, 5, new Cesium.JulianDate()), o = Cesium.JulianDate.fromIso8601("2100-01-01T00:00:00Z"), u = (s == null ? void 0 : s.color) ?? Cesium.Color.WHITE;
5709
- return i.addSample(r, u.withAlpha(1)), i.addSample(a, u.withAlpha(1)), i.addSample(h, u.withAlpha(0.2)), i.addSample(o, u.withAlpha(0.1)), i;
5708
+ const i = new Cesium.SampledProperty(Cesium.Color), r = (s == null ? void 0 : s.startTime) ?? Cesium.JulianDate.now(), o = Cesium.JulianDate.addMinutes(r, 1, new Cesium.JulianDate()), h = Cesium.JulianDate.addMinutes(r, 5, new Cesium.JulianDate()), a = Cesium.JulianDate.fromIso8601("2100-01-01T00:00:00Z"), u = (s == null ? void 0 : s.color) ?? Cesium.Color.WHITE;
5709
+ return i.addSample(r, u.withAlpha(1)), i.addSample(o, u.withAlpha(1)), i.addSample(h, u.withAlpha(0.2)), i.addSample(a, u.withAlpha(0.1)), i;
5710
5710
  }
5711
5711
  function getHideAfterFiveMinutesProperty(s) {
5712
5712
  const i = s ?? Cesium.JulianDate.now(), r = Cesium.JulianDate.addMinutes(i, 5, new Cesium.JulianDate());
5713
- return new Cesium.CallbackProperty((a) => a ? Cesium.JulianDate.lessThan(a, r) : !0, !1);
5713
+ return new Cesium.CallbackProperty((o) => o ? Cesium.JulianDate.lessThan(o, r) : !0, !1);
5714
5714
  }
5715
5715
  function createRoundedRectImage({
5716
5716
  text: s = "未知",
@@ -5718,48 +5718,48 @@ function createRoundedRectImage({
5718
5718
  // 默认透明背景
5719
5719
  stroke: r = "#FFFFFF",
5720
5720
  // 描边颜色
5721
- strokeWidth: a = 2,
5721
+ strokeWidth: o = 2,
5722
5722
  // 描边宽度
5723
5723
  textColor: h = "#FFFFFF",
5724
- fontFamily: o = "微软雅黑, Segoe UI, Helvetica, Arial, sans-serif",
5724
+ fontFamily: a = "微软雅黑, Segoe UI, Helvetica, Arial, sans-serif",
5725
5725
  fontWeight: u = "normal",
5726
5726
  fontSize: c = 12,
5727
5727
  padding: d = 6,
5728
5728
  radius: l = 5
5729
5729
  } = {}) {
5730
- const m = Math.max(0, s.length * c * 0.6 + d * 2), y = c * 1.6, g = 2, p = Math.ceil(a / 2) + 1, v = m + p * 2, _ = y + p * 2, w = document.createElement("canvas");
5730
+ const m = Math.max(0, s.length * c * 0.6 + d * 2), y = c * 1.6, g = 2, p = Math.ceil(o / 2) + 1, v = m + p * 2, _ = y + p * 2, w = document.createElement("canvas");
5731
5731
  w.width = Math.round(v * g), w.height = Math.round(_ * g), w.style.width = `${v}px`, w.style.height = `${_}px`;
5732
5732
  const O = w.getContext("2d");
5733
5733
  if (!O) throw new Error("无法获取2D绘图上下文");
5734
5734
  O.scale(g, g), O.clearRect(0, 0, v, _), O.lineJoin = "round", O.lineCap = "round";
5735
5735
  const b = p, x = p, T = v - p, E = _ - p, C = T - b, R = E - x, I = Math.min(l, Math.min(C, R) / 2);
5736
- O.beginPath(), O.moveTo(b + I, x), O.lineTo(T - I, x), O.quadraticCurveTo(T, x, T, x + I), O.lineTo(T, E - I), O.quadraticCurveTo(T, E, T - I, E), O.lineTo(b + I, E), O.quadraticCurveTo(b, E, b, E - I), O.lineTo(b, x + I), O.quadraticCurveTo(b, x, b + I, x), O.closePath(), i && i !== "transparent" && (O.fillStyle = i, O.fill()), O.lineWidth = a, O.strokeStyle = r, O.stroke();
5736
+ O.beginPath(), O.moveTo(b + I, x), O.lineTo(T - I, x), O.quadraticCurveTo(T, x, T, x + I), O.lineTo(T, E - I), O.quadraticCurveTo(T, E, T - I, E), O.lineTo(b + I, E), O.quadraticCurveTo(b, E, b, E - I), O.lineTo(b, x + I), O.quadraticCurveTo(b, x, b + I, x), O.closePath(), i && i !== "transparent" && (O.fillStyle = i, O.fill()), O.lineWidth = o, O.strokeStyle = r, O.stroke();
5737
5737
  const k = Math.max(0, m - d * 2);
5738
5738
  let A = c;
5739
- for (O.fillStyle = h, O.textAlign = "center", O.textBaseline = "middle", O.font = `${u} ${A}px ${o}`; O.measureText(s).width > k && A > 10; )
5740
- A -= 1, O.font = `${u} ${A}px ${o}`;
5739
+ for (O.fillStyle = h, O.textAlign = "center", O.textBaseline = "middle", O.font = `${u} ${A}px ${a}`; O.measureText(s).width > k && A > 10; )
5740
+ A -= 1, O.font = `${u} ${A}px ${a}`;
5741
5741
  return O.fillText(s, v / 2, _ / 2 + 1), w;
5742
5742
  }
5743
5743
  function hookClusterEvent(s) {
5744
- s.clustering.clusterEvent.addEventListener((r, a) => {
5745
- const h = r[0], o = h.billboard, u = h.label, c = h.point;
5746
- a.label.show = !1, a.point.show = !1, o && (a.billboard = Cesium.clone(o)), u && (a.label = Cesium.clone(u)), c ? a.point = Cesium.clone(c) : (a.billboard.show = !0, a.billboard.image = Cesium.buildModuleUrl("Widgets/Images/clusterIcon.png"));
5744
+ s.clustering.clusterEvent.addEventListener((r, o) => {
5745
+ const h = r[0], a = h.billboard, u = h.label, c = h.point;
5746
+ o.label.show = !1, o.point.show = !1, a && (o.billboard = Cesium.clone(a)), u && (o.label = Cesium.clone(u)), c ? o.point = Cesium.clone(c) : (o.billboard.show = !0, o.billboard.image = Cesium.buildModuleUrl("Widgets/Images/clusterIcon.png"));
5747
5747
  });
5748
5748
  }
5749
5749
  class ShipLayer extends EventEmitter {
5750
- constructor(r, a, h) {
5751
- var o, u, c;
5750
+ constructor(r, o, h) {
5751
+ var a, u, c;
5752
5752
  super();
5753
5753
  M(this, "db");
5754
5754
  M(this, "labelDataSource", new Cesium.CustomDataSource("ship-labels"));
5755
+ M(this, "IS_MOVING_THRESHOLD");
5755
5756
  M(this, "isMounted", !1);
5756
5757
  M(this, "_viewer", null);
5757
5758
  M(this, "entityMap", /* @__PURE__ */ new Map());
5758
- M(this, "IS_MOVING_THRESHOLD", 1);
5759
5759
  M(this, "shadowEntityMap", /* @__PURE__ */ new WeakMap());
5760
5760
  /**显隐entity,回调返回显示隐藏的状态,不传Fn时默认显示所有 */
5761
5761
  M(this, "hookFilterEntityFn");
5762
- this.key = r, this.zIndex = a, this.opt = h, this.db = new Cesium.CustomDataSource(r), this.labelDataSource.clustering.enabled = ((o = h == null ? void 0 : h.clustering) == null ? void 0 : o.enabled) ?? !0, this.labelDataSource.clustering.pixelRange = ((u = h == null ? void 0 : h.clustering) == null ? void 0 : u.pixelRange) ?? 15, this.labelDataSource.clustering.minimumClusterSize = ((c = h == null ? void 0 : h.clustering) == null ? void 0 : c.minimumClusterSize) ?? 2, hookClusterEvent(this.labelDataSource);
5762
+ this.key = r, this.zIndex = o, this.opt = h, this.IS_MOVING_THRESHOLD = (h == null ? void 0 : h.IS_MOVING_THRESHOLD) ?? 1, this.db = new Cesium.CustomDataSource(r), this.labelDataSource.clustering.enabled = ((a = h == null ? void 0 : h.clustering) == null ? void 0 : a.enabled) ?? !0, this.labelDataSource.clustering.pixelRange = ((u = h == null ? void 0 : h.clustering) == null ? void 0 : u.pixelRange) ?? 15, this.labelDataSource.clustering.minimumClusterSize = ((c = h == null ? void 0 : h.clustering) == null ? void 0 : c.minimumClusterSize) ?? 2, hookClusterEvent(this.labelDataSource);
5763
5763
  }
5764
5764
  show(r) {
5765
5765
  this.isMounted || (r.dataSources.add(this.db), r.dataSources.add(this.labelDataSource), this._viewer = r, this.isMounted = !0), this.db.show = !0;
@@ -5768,46 +5768,46 @@ class ShipLayer extends EventEmitter {
5768
5768
  this.isMounted && (this.db.show = !1, this.labelDataSource.show = !1);
5769
5769
  }
5770
5770
  contain(r) {
5771
- const a = r.id.replace(/_shadow\d*$/, "");
5772
- return this.entityMap.has(a);
5771
+ const o = r.id.replace(/_shadow\d*$/, "");
5772
+ return this.entityMap.has(o);
5773
5773
  }
5774
5774
  /**生成entity, geojson的id优先和mmsi保持一致,没有mmsi的情况下,使用nanoid生成 */
5775
5775
  render(r) {
5776
- r.features.forEach((a) => {
5777
- this.renderFeature(a);
5776
+ r.features.forEach((o) => {
5777
+ this.renderFeature(o);
5778
5778
  });
5779
5779
  }
5780
5780
  /**获取id */
5781
5781
  getIdByFeature(r) {
5782
5782
  var h;
5783
- const a = String(((h = r.properties) == null ? void 0 : h.mmsi) ?? r.id);
5784
- if (!a) throw new Error("feature必须有mmsi或id");
5785
- return "ship_mmsi_" + a;
5783
+ const o = String(((h = r.properties) == null ? void 0 : h.mmsi) ?? r.id);
5784
+ if (!o) throw new Error("feature必须有mmsi或id");
5785
+ return "ship_mmsi_" + o;
5786
5786
  }
5787
5787
  /**渲染feature */
5788
5788
  renderFeature(r) {
5789
5789
  var l, m;
5790
- const a = this.getIdByFeature(r), h = new Cesium.SampledPositionProperty();
5790
+ const o = this.getIdByFeature(r), h = new Cesium.SampledPositionProperty();
5791
5791
  h.backwardExtrapolationType = Cesium.ExtrapolationType.HOLD, h.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD;
5792
- const o = Cesium.Cartesian3.fromDegrees(
5792
+ const a = Cesium.Cartesian3.fromDegrees(
5793
5793
  r.geometry.coordinates[0],
5794
5794
  r.geometry.coordinates[1]
5795
5795
  );
5796
- h.addSample(((l = this._viewer) == null ? void 0 : l.clock.currentTime) ?? Cesium.JulianDate.now(), o);
5796
+ h.addSample(((l = this._viewer) == null ? void 0 : l.clock.currentTime) ?? Cesium.JulianDate.now(), a);
5797
5797
  const u = ((m = r.properties) == null ? void 0 : m.courseOverGroundTrue) ?? 0, c = new Cesium.Entity({
5798
- id: a,
5798
+ id: o,
5799
5799
  position: h,
5800
5800
  orientation: new Cesium.ConstantProperty(
5801
5801
  Cesium.Transforms.headingPitchRollQuaternion(
5802
- o,
5802
+ a,
5803
5803
  new Cesium.HeadingPitchRoll(u, 0, 0)
5804
5804
  )
5805
5805
  ),
5806
5806
  properties: r.properties ?? {}
5807
5807
  });
5808
- this.entityMap.set(a, c), this.db.entities.add(c), this.renderEntity(c);
5808
+ this.entityMap.set(o, c), this.db.entities.add(c), this.renderEntity(c);
5809
5809
  const d = new Cesium.Entity({
5810
- id: a + "_shadow1",
5810
+ id: o + "_shadow1",
5811
5811
  position: h,
5812
5812
  properties: r.properties ?? {}
5813
5813
  });
@@ -5815,13 +5815,13 @@ class ShipLayer extends EventEmitter {
5815
5815
  }
5816
5816
  /**更新or新增feature */
5817
5817
  update(r) {
5818
- var h, o, u, c, d, l, m, y, g, p, v, _, w, O;
5819
- const a = this.db.entities.getById(this.getIdByFeature(r));
5820
- if (a) {
5821
- const b = this.labelDataSource.entities.getById(a.id + "_shadow1"), x = this.shadowEntityMap.get(a), T = ((h = r.properties) == null ? void 0 : h.shipTypeId) ?? -1, E = shipTypeColorMap.get(T) ?? shipTypeColorMap.get(-1), [C, R] = r.geometry.coordinates, I = ((o = this._viewer) == null ? void 0 : o.clock.currentTime) ?? Cesium.JulianDate.now(), k = (u = a.position) == null ? void 0 : u.getValue(I), A = Cesium.Cartesian3.fromDegrees(C, R), P = new Cesium.SampledPositionProperty();
5818
+ var h, a, u, c, d, l, m, y, g, p, v, _, w, O;
5819
+ const o = this.db.entities.getById(this.getIdByFeature(r));
5820
+ if (o) {
5821
+ const b = this.labelDataSource.entities.getById(o.id + "_shadow1"), x = this.shadowEntityMap.get(o), T = ((h = r.properties) == null ? void 0 : h.shipTypeId) ?? -1, E = shipTypeColorMap.get(T) ?? shipTypeColorMap.get(-1), [C, R] = r.geometry.coordinates, I = ((a = this._viewer) == null ? void 0 : a.clock.currentTime) ?? Cesium.JulianDate.now(), k = (u = o.position) == null ? void 0 : u.getValue(I), A = Cesium.Cartesian3.fromDegrees(C, R), P = new Cesium.SampledPositionProperty();
5822
5822
  P.backwardExtrapolationType = Cesium.ExtrapolationType.HOLD, P.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD;
5823
- const $ = (c = a.properties) == null ? void 0 : c.getValue().updateTime, z = (d = r.properties) == null ? void 0 : d.updateTime;
5824
- if ($ && z && new Date(z).getTime() - new Date($).getTime() >= 3 * 1e3 * 60)
5823
+ const $ = (c = o.properties) == null ? void 0 : c.getValue().updateTime, H = (d = r.properties) == null ? void 0 : d.updateTime;
5824
+ if ($ && H && new Date(H).getTime() - new Date($).getTime() >= 3 * 1e3 * 60)
5825
5825
  P.addSample(I, A);
5826
5826
  else {
5827
5827
  const q = Cesium.JulianDate.addSeconds(I, 3, new Cesium.JulianDate());
@@ -5830,11 +5830,11 @@ class ShipLayer extends EventEmitter {
5830
5830
  k ?? A
5831
5831
  ), P.addSample(q, A);
5832
5832
  }
5833
- if (a.position = P, x && (x.position = P), b && (b.position = P), a.properties)
5833
+ if (o.position = P, x && (x.position = P), b && (b.position = P), o.properties)
5834
5834
  for (const [q, V] of Object.entries(r.properties ?? {})) {
5835
5835
  if (q == "speedOverGround") {
5836
- const Z = a.properties.getValue().speedOverGround ?? 0, X = Number(Z) > this.IS_MOVING_THRESHOLD, U = Number(V) > this.IS_MOVING_THRESHOLD;
5837
- if (X !== U && (a.billboard && (a.billboard.image = new Cesium.ConstantProperty(
5836
+ const Z = o.properties.getValue().speedOverGround ?? 0, X = Number(Z) > this.IS_MOVING_THRESHOLD, U = Number(V) > this.IS_MOVING_THRESHOLD;
5837
+ if (X !== U && (o.billboard && (o.billboard.image = new Cesium.ConstantProperty(
5838
5838
  createShipIconUrl(E, U)
5839
5839
  )), x != null && x.plane)) {
5840
5840
  const ee = ((l = r.properties) == null ? void 0 : l.designBeam) ?? ((y = (m = this.opt) == null ? void 0 : m.defaultValue) == null ? void 0 : y.designBeam) ?? 12, G = ((g = r.properties) == null ? void 0 : g.designLength) ?? ((v = (p = this.opt) == null ? void 0 : p.defaultValue) == null ? void 0 : v.designLength) ?? 35, K = createShipIconV2({
@@ -5854,7 +5854,7 @@ class ShipLayer extends EventEmitter {
5854
5854
  }
5855
5855
  if (q == "courseOverGroundTrue") {
5856
5856
  const Z = ((w = r.properties) == null ? void 0 : w.courseOverGroundTrue) ?? 0;
5857
- a.billboard.rotation = new Cesium.ConstantProperty(
5857
+ o.billboard.rotation = new Cesium.ConstantProperty(
5858
5858
  typeof V == "number" ? -1 * V : 0
5859
5859
  );
5860
5860
  const X = new Cesium.ConstantProperty(
@@ -5867,7 +5867,7 @@ class ShipLayer extends EventEmitter {
5867
5867
  }
5868
5868
  if (q == "updateTime") {
5869
5869
  const Z = Cesium.JulianDate.fromDate(new Date(V));
5870
- a.billboard.color = createAlphaSampled({
5870
+ o.billboard.color = createAlphaSampled({
5871
5871
  startTime: Z
5872
5872
  });
5873
5873
  const X = (O = x == null ? void 0 : x.plane) == null ? void 0 : O.material;
@@ -5875,17 +5875,16 @@ class ShipLayer extends EventEmitter {
5875
5875
  startTime: Z
5876
5876
  }));
5877
5877
  const U = getHideAfterFiveMinutesProperty(Z);
5878
- b != null && b.billboard && (b.billboard.show = U), a.point.show = U;
5878
+ b != null && b.billboard && (b.billboard.show = U), o.point.show = U;
5879
5879
  }
5880
- a.properties[q] = V, x != null && x.properties && (x.properties[q] = V);
5880
+ o.properties[q] = V, x != null && x.properties && (x.properties[q] = V);
5881
5881
  }
5882
5882
  } else
5883
5883
  this.renderFeature(r);
5884
5884
  }
5885
- // 判定移动的速度阈值(米/秒)
5886
5885
  renderEntity(r) {
5887
5886
  var m, y, g, p, v, _, w, O, b;
5888
- const a = (m = r.properties) == null ? void 0 : m.getValue(), h = (a == null ? void 0 : a.shipTypeId) ?? -1, o = shipTypeColorMap.get(h) ?? shipTypeColorMap.get(-1), u = Number((a == null ? void 0 : a.speedOverGround) ?? 0), c = a != null && a.updateTime ? new Date(a.updateTime) : /* @__PURE__ */ new Date(), d = Cesium.JulianDate.fromDate(c), l = createShipIconUrl(o, u > this.IS_MOVING_THRESHOLD);
5887
+ const o = (m = r.properties) == null ? void 0 : m.getValue(), h = (o == null ? void 0 : o.shipTypeId) ?? -1, a = shipTypeColorMap.get(h) ?? shipTypeColorMap.get(-1), u = Number((o == null ? void 0 : o.speedOverGround) ?? 0), c = o != null && o.updateTime ? new Date(o.updateTime) : /* @__PURE__ */ new Date(), d = Cesium.JulianDate.fromDate(c), l = createShipIconUrl(a, u > this.IS_MOVING_THRESHOLD);
5889
5888
  r.point = new Cesium.PointGraphics({
5890
5889
  pixelSize: 4,
5891
5890
  color: Cesium.Color.fromCssColorString("#8AF22C"),
@@ -5915,7 +5914,7 @@ class ShipLayer extends EventEmitter {
5915
5914
  }
5916
5915
  renderLabelEntity(r) {
5917
5916
  var d, l, m, y, g, p, v;
5918
- const a = (d = r.properties) == null ? void 0 : d.getValue(), h = a != null && a.updateTime ? new Date(a.updateTime) : /* @__PURE__ */ new Date(), o = Cesium.JulianDate.fromDate(h), u = ((m = (l = r.properties) == null ? void 0 : l.getValue()) == null ? void 0 : m.name) ?? ((y = r.properties) != null && y.getValue().mmsi ? "mmsi:" + ((g = r.properties) == null ? void 0 : g.getValue().mmsi) : "未知"), c = createRoundedRectImage({ text: u });
5917
+ const o = (d = r.properties) == null ? void 0 : d.getValue(), h = o != null && o.updateTime ? new Date(o.updateTime) : /* @__PURE__ */ new Date(), a = Cesium.JulianDate.fromDate(h), u = ((m = (l = r.properties) == null ? void 0 : l.getValue()) == null ? void 0 : m.name) ?? ((y = r.properties) != null && y.getValue().mmsi ? "mmsi:" + ((g = r.properties) == null ? void 0 : g.getValue().mmsi) : "未知"), c = createRoundedRectImage({ text: u });
5919
5918
  r.billboard = new Cesium.BillboardGraphics({
5920
5919
  image: new Cesium.ConstantProperty(c),
5921
5920
  width: new Cesium.ConstantProperty(Number(c.style.width.replace("px", ""))),
@@ -5932,26 +5931,26 @@ class ShipLayer extends EventEmitter {
5932
5931
  ((v = (p = this.opt) == null ? void 0 : p.distanceDisplayConditions) == null ? void 0 : v.far) ?? 15e3
5933
5932
  ),
5934
5933
  disableDepthTestDistance: 5e3,
5935
- show: getHideAfterFiveMinutesProperty(o)
5934
+ show: getHideAfterFiveMinutesProperty(a)
5936
5935
  });
5937
5936
  }
5938
5937
  createShipPlane(r) {
5939
5938
  var p, v, _, w, O;
5940
- const a = new Cesium.Entity({
5939
+ const o = new Cesium.Entity({
5941
5940
  id: r.id + "_shadow",
5942
5941
  position: r.position,
5943
5942
  orientation: r.orientation,
5944
5943
  properties: r.properties
5945
5944
  });
5946
- this.shadowEntityMap.set(r, a), this.db.entities.add(a);
5947
- const h = (p = r.properties) == null ? void 0 : p.getValue(), o = h != null && h.updateTime ? new Date(h.updateTime) : /* @__PURE__ */ new Date(), u = Cesium.JulianDate.fromDate(o), c = Number((h == null ? void 0 : h.speedOverGround) ?? 0), d = (h == null ? void 0 : h.designBeam) ?? ((_ = (v = this.opt) == null ? void 0 : v.defaultValue) == null ? void 0 : _.designBeam) ?? 12, l = (h == null ? void 0 : h.designLength) ?? ((O = (w = this.opt) == null ? void 0 : w.defaultValue) == null ? void 0 : O.designLength) ?? 35, m = (h == null ? void 0 : h.shipTypeId) ?? -1, y = shipTypeColorMap.get(m) ?? shipTypeColorMap.get(-1), g = createShipIconV2({
5945
+ this.shadowEntityMap.set(r, o), this.db.entities.add(o);
5946
+ const h = (p = r.properties) == null ? void 0 : p.getValue(), a = h != null && h.updateTime ? new Date(h.updateTime) : /* @__PURE__ */ new Date(), u = Cesium.JulianDate.fromDate(a), c = Number((h == null ? void 0 : h.speedOverGround) ?? 0), d = (h == null ? void 0 : h.designBeam) ?? ((_ = (v = this.opt) == null ? void 0 : v.defaultValue) == null ? void 0 : _.designBeam) ?? 12, l = (h == null ? void 0 : h.designLength) ?? ((O = (w = this.opt) == null ? void 0 : w.defaultValue) == null ? void 0 : O.designLength) ?? 35, m = (h == null ? void 0 : h.shipTypeId) ?? -1, y = shipTypeColorMap.get(m) ?? shipTypeColorMap.get(-1), g = createShipIconV2({
5948
5947
  color: y,
5949
5948
  isMoving: c > this.IS_MOVING_THRESHOLD,
5950
5949
  ...h,
5951
5950
  designBeam: d,
5952
5951
  designLength: l
5953
5952
  });
5954
- a.plane = new Cesium.PlaneGraphics({
5953
+ o.plane = new Cesium.PlaneGraphics({
5955
5954
  plane: new Cesium.Plane(Cesium.Cartesian3.UNIT_Z, 0),
5956
5955
  dimensions: new Cesium.Cartesian2(d * g.scale.x, l * g.scale.y),
5957
5956
  show: new Cesium.CallbackProperty(() => {
@@ -5971,16 +5970,16 @@ class ShipLayer extends EventEmitter {
5971
5970
  });
5972
5971
  }
5973
5972
  hideEntityByCondition(r) {
5974
- this.hookFilterEntityFn && this.off("createEntity", this.hookFilterEntityFn), this.hookFilterEntityFn = (a) => {
5975
- const h = (r == null ? void 0 : r(a)) ?? !0;
5976
- a.show = h;
5977
- const o = this.shadowEntityMap.get(a);
5978
- o && (o.show = h);
5979
- const u = this.labelDataSource.entities.getById(a.id + "_shadow1");
5973
+ this.hookFilterEntityFn && this.off("createEntity", this.hookFilterEntityFn), this.hookFilterEntityFn = (o) => {
5974
+ const h = (r == null ? void 0 : r(o)) ?? !0;
5975
+ o.show = h;
5976
+ const a = this.shadowEntityMap.get(o);
5977
+ a && (a.show = h);
5978
+ const u = this.labelDataSource.entities.getById(o.id + "_shadow1");
5980
5979
  u && (u.show = h);
5981
- }, this.db.entities.values.forEach((a) => {
5980
+ }, this.db.entities.values.forEach((o) => {
5982
5981
  var h;
5983
- (h = this.hookFilterEntityFn) == null || h.call(this, a);
5982
+ (h = this.hookFilterEntityFn) == null || h.call(this, o);
5984
5983
  }), r && this.on("createEntity", this.hookFilterEntityFn);
5985
5984
  }
5986
5985
  }
@@ -5991,18 +5990,18 @@ new Array(4);
5991
5990
  var e$2 = [], t$2 = [];
5992
5991
  function n$2(s, i) {
5993
5992
  if (s && typeof document < "u") {
5994
- var r, a = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, o = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
5993
+ var r, o = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, a = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
5995
5994
  if (h) {
5996
- var u = e$2.indexOf(o);
5997
- u === -1 && (u = e$2.push(o) - 1, t$2[u] = {}), r = t$2[u] && t$2[u][a] ? t$2[u][a] : t$2[u][a] = c();
5995
+ var u = e$2.indexOf(a);
5996
+ u === -1 && (u = e$2.push(a) - 1, t$2[u] = {}), r = t$2[u] && t$2[u][o] ? t$2[u][o] : t$2[u][o] = c();
5998
5997
  } else r = c();
5999
5998
  s.charCodeAt(0) === 65279 && (s = s.substring(1)), r.styleSheet ? r.styleSheet.cssText += s : r.appendChild(document.createTextNode(s));
6000
5999
  }
6001
6000
  function c() {
6002
6001
  var d = document.createElement("style");
6003
6002
  if (d.setAttribute("type", "text/css"), i.attributes) for (var l = Object.keys(i.attributes), m = 0; m < l.length; m++) d.setAttribute(l[m], i.attributes[l[m]]);
6004
- var y = a === "prepend" ? "afterbegin" : "beforeend";
6005
- return o.insertAdjacentElement(y, d), d;
6003
+ var y = o === "prepend" ? "afterbegin" : "beforeend";
6004
+ return a.insertAdjacentElement(y, d), d;
6006
6005
  }
6007
6006
  }
6008
6007
  var css$2 = '.cesium-tool-tip{background:rgba(0,0,0,.6);border-radius:4px;color:#fff;left:0;line-height:30px;min-height:30px;min-width:100px;padding:0 10px;pointer-events:none;position:absolute;top:0;visibility:hidden;z-index:-1}.cesium-tool-tip:before{border-bottom:10px solid transparent;border-right:10px solid rgba(0,0,0,.6);border-top:10px solid transparent;content:"";display:block;left:-10px;pointer-events:none;position:absolute;top:calc(50% - 10px)}';
@@ -6024,11 +6023,11 @@ class Popup {
6024
6023
  M(this, "setPosition", () => {
6025
6024
  if (this._position && this._viewer && this._position) {
6026
6025
  if (this._viewer.scene.mode === SceneMode.SCENE3D) {
6027
- const a = this._viewer.scene.camera.position, h = new BoundingSphere(
6026
+ const o = this._viewer.scene.camera.position, h = new BoundingSphere(
6028
6027
  new Cartesian3(0, 0, 0),
6029
6028
  635e4
6030
6029
  );
6031
- if (!new Occluder(h, a).isPointVisible(this._position)) {
6030
+ if (!new Occluder(h, o).isPointVisible(this._position)) {
6032
6031
  this.switchElementShow(!1);
6033
6032
  return;
6034
6033
  }
@@ -6041,16 +6040,16 @@ class Popup {
6041
6040
  if (this._screenPosition && this._screenPosition.x === i.x && this._screenPosition.y === i.y)
6042
6041
  return;
6043
6042
  this.switchElementShow(!0);
6044
- const a = i.x - r.clientWidth / 2 + this._offset[0], h = i.y - r.clientHeight + this._offset[1];
6045
- r.style.left = `${a}px`, r.style.top = `${h}px`, this._screenPosition = i;
6043
+ const o = i.x - r.clientWidth / 2 + this._offset[0], h = i.y - r.clientHeight + this._offset[1];
6044
+ r.style.left = `${o}px`, r.style.top = `${h}px`, this._screenPosition = i;
6046
6045
  }
6047
6046
  }
6048
6047
  });
6049
6048
  this._viewer = i, this._options = r;
6050
- const { position: a, element: h, offset: o } = r;
6049
+ const { position: o, element: h, offset: a } = r;
6051
6050
  if (!h)
6052
6051
  throw Error("no element!");
6053
- this._position = a ? Cartesian3.fromDegrees(a[0], a[1], a[2]) : null, this._element = h, this._offset = [(o == null ? void 0 : o[0]) ?? 0, (o == null ? void 0 : o[1]) ?? 0], this.addMapListener();
6052
+ this._position = o ? Cartesian3.fromDegrees(o[0], o[1], o[2]) : null, this._element = h, this._offset = [(a == null ? void 0 : a[0]) ?? 0, (a == null ? void 0 : a[1]) ?? 0], this.addMapListener();
6054
6053
  }
6055
6054
  set position(i) {
6056
6055
  if (!i) {
@@ -6082,18 +6081,18 @@ class Popup {
6082
6081
  var e$1 = [], t$1 = [];
6083
6082
  function n$1(s, i) {
6084
6083
  if (s && typeof document < "u") {
6085
- var r, a = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, o = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
6084
+ var r, o = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, a = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
6086
6085
  if (h) {
6087
- var u = e$1.indexOf(o);
6088
- u === -1 && (u = e$1.push(o) - 1, t$1[u] = {}), r = t$1[u] && t$1[u][a] ? t$1[u][a] : t$1[u][a] = c();
6086
+ var u = e$1.indexOf(a);
6087
+ u === -1 && (u = e$1.push(a) - 1, t$1[u] = {}), r = t$1[u] && t$1[u][o] ? t$1[u][o] : t$1[u][o] = c();
6089
6088
  } else r = c();
6090
6089
  s.charCodeAt(0) === 65279 && (s = s.substring(1)), r.styleSheet ? r.styleSheet.cssText += s : r.appendChild(document.createTextNode(s));
6091
6090
  }
6092
6091
  function c() {
6093
6092
  var d = document.createElement("style");
6094
6093
  if (d.setAttribute("type", "text/css"), i.attributes) for (var l = Object.keys(i.attributes), m = 0; m < l.length; m++) d.setAttribute(l[m], i.attributes[l[m]]);
6095
- var y = a === "prepend" ? "afterbegin" : "beforeend";
6096
- return o.insertAdjacentElement(y, d), d;
6094
+ var y = o === "prepend" ? "afterbegin" : "beforeend";
6095
+ return a.insertAdjacentElement(y, d), d;
6097
6096
  }
6098
6097
  }
6099
6098
  var css$1 = ".cesium-compass{cursor:pointer;height:60px;pointer-events:auto;position:absolute;right:15px;top:100px;user-select:none;width:60px}.cesium-compass .out-ring{fill:rgba(23,49,71,.702);background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px;left:0;position:absolute;top:0;transition:all .3s ease;width:60px}.cesium-compass .out-ring svg{height:60px;width:60px}.cesium-compass:hover .rotation_marker svg{height:70.2px;width:70.2px}.cesium-compass .gyro{align-items:center;background:#fff;border-radius:50%;box-sizing:border-box;display:flex;height:30px;justify-content:center;margin:0 auto;padding:4px;position:relative;text-align:center;top:50%;transform:translateY(-50%);transition:all .3s ease;width:30px}.cesium-compass .gyro svg{height:20px;width:20px}.rotation_marker{background-repeat:no-repeat;background-size:contain;border-radius:50%;position:relative}.rotation_marker svg{height:60px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);transition:all .3s ease;width:60px}.cesium-compass .gyro-active,.cesium-compass .gyro:hover{fill:#68adfe}";
@@ -6101,18 +6100,18 @@ n$1(css$1, {});
6101
6100
  var e = [], t = [];
6102
6101
  function n(s, i) {
6103
6102
  if (s && typeof document < "u") {
6104
- var r, a = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, o = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
6103
+ var r, o = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, a = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
6105
6104
  if (h) {
6106
- var u = e.indexOf(o);
6107
- u === -1 && (u = e.push(o) - 1, t[u] = {}), r = t[u] && t[u][a] ? t[u][a] : t[u][a] = c();
6105
+ var u = e.indexOf(a);
6106
+ u === -1 && (u = e.push(a) - 1, t[u] = {}), r = t[u] && t[u][o] ? t[u][o] : t[u][o] = c();
6108
6107
  } else r = c();
6109
6108
  s.charCodeAt(0) === 65279 && (s = s.substring(1)), r.styleSheet ? r.styleSheet.cssText += s : r.appendChild(document.createTextNode(s));
6110
6109
  }
6111
6110
  function c() {
6112
6111
  var d = document.createElement("style");
6113
6112
  if (d.setAttribute("type", "text/css"), i.attributes) for (var l = Object.keys(i.attributes), m = 0; m < l.length; m++) d.setAttribute(l[m], i.attributes[l[m]]);
6114
- var y = a === "prepend" ? "afterbegin" : "beforeend";
6115
- return o.insertAdjacentElement(y, d), d;
6113
+ var y = o === "prepend" ? "afterbegin" : "beforeend";
6114
+ return a.insertAdjacentElement(y, d), d;
6116
6115
  }
6117
6116
  }
6118
6117
  var css = ".cesium-zoom-controller{border-radius:100px;box-sizing:border-box;display:flex;flex-direction:column;line-height:1.2rem;pointer-events:auto;position:absolute;right:30px;text-align:center;top:187px;user-select:none}.cesium-zoom-controller .refresh,.cesium-zoom-controller .zoom-in,.cesium-zoom-controller .zoom-out{border-radius:14%;margin-bottom:5px}.cesium-zoom-controller .cesium-button{background:#2a2e39;border:none;margin-right:0;transition:all .3s cubic-bezier(.645,.045,.355,1);transition-delay:0s;transition-duration:.2s;transition-property:all;transition-timing-function:cubic-bezier(.645,.045,.355,1)}.cesium-zoom-controller .cesium-button:hover{background:#48b;box-shadow:none}.cesium-zoom-controller .cesium-button:active{fill:#edffff;background:#adf;color:#edffff}.cesium-zoom-controller .cesium-toolbar-button{align-items:center;display:flex;height:30px;justify-content:center;width:30px}";
@@ -6120,8 +6119,8 @@ n(css, {});
6120
6119
  var heatmap$1 = { exports: {} }, heatmap = heatmap$1.exports, hasRequiredHeatmap;
6121
6120
  function requireHeatmap() {
6122
6121
  return hasRequiredHeatmap || (hasRequiredHeatmap = 1, function(s) {
6123
- (function(i, r, a) {
6124
- s.exports ? s.exports = a() : r[i] = a();
6122
+ (function(i, r, o) {
6123
+ s.exports ? s.exports = o() : r[i] = o();
6125
6124
  })("h337", heatmap, function() {
6126
6125
  var i = {
6127
6126
  defaultRadius: 40,
@@ -6258,7 +6257,7 @@ function requireHeatmap() {
6258
6257
  return false;
6259
6258
  }*/
6260
6259
  }, l;
6261
- }(), a = function() {
6260
+ }(), o = function() {
6262
6261
  var l = function(p) {
6263
6262
  var v = p.gradient || p.defaultGradient, _ = document.createElement("canvas"), w = _.getContext("2d", { willReadFrequently: !0 });
6264
6263
  _.width = 256, _.height = 1;
@@ -6332,10 +6331,10 @@ function requireHeatmap() {
6332
6331
  var p = this._renderBoundaries[0], v = this._renderBoundaries[1], _ = this._renderBoundaries[2] - p, w = this._renderBoundaries[3] - v, O = this._width, b = this._height, x = this._opacity, T = this._maxOpacity, E = this._minOpacity, C = this._useGradientOpacity;
6333
6332
  p < 0 && (p = 0), v < 0 && (v = 0), p + _ > O && (_ = O - p), v + w > b && (w = b - v);
6334
6333
  for (var R = this.shadowCtx.getImageData(p, v, _, w), I = R.data, k = I.length, A = this._palette, P = 3; P < k; P += 4) {
6335
- var $ = I[P], z = $ * 4;
6336
- if (z) {
6334
+ var $ = I[P], H = $ * 4;
6335
+ if (H) {
6337
6336
  var q;
6338
- x > 0 ? q = x : $ < T ? $ < E ? q = E : q = $ : q = T, I[P - 3] = A[z], I[P - 2] = A[z + 1], I[P - 1] = A[z + 2], I[P] = C ? A[z + 3] : q;
6337
+ x > 0 ? q = x : $ < T ? $ < E ? q = E : q = $ : q = T, I[P - 3] = A[H], I[P - 2] = A[H + 1], I[P - 1] = A[H + 2], I[P] = C ? A[H + 3] : q;
6339
6338
  }
6340
6339
  }
6341
6340
  this.ctx.putImageData(R, p, v), this._renderBoundaries = [1e3, 1e3, 0, 0];
@@ -6350,8 +6349,8 @@ function requireHeatmap() {
6350
6349
  }, g;
6351
6350
  }(), h = function() {
6352
6351
  var l = !1;
6353
- return i.defaultRenderer === "canvas2d" && (l = a), l;
6354
- }(), o = {
6352
+ return i.defaultRenderer === "canvas2d" && (l = o), l;
6353
+ }(), a = {
6355
6354
  merge: function() {
6356
6355
  for (var d = {}, l = arguments.length, m = 0; m < l; m++) {
6357
6356
  var y = arguments[m];
@@ -6392,7 +6391,7 @@ function requireHeatmap() {
6392
6391
  }), _.setCoordinator(v);
6393
6392
  };
6394
6393
  function y() {
6395
- var g = this._config = o.merge(i, arguments[0] || {});
6394
+ var g = this._config = a.merge(i, arguments[0] || {});
6396
6395
  if (this._coordinator = new l(), g.plugin) {
6397
6396
  var p = g.plugin;
6398
6397
  if (i.plugins[p]) {
@@ -6421,7 +6420,7 @@ function requireHeatmap() {
6421
6420
  return this._store.setDataMin.apply(this._store, arguments), this;
6422
6421
  },
6423
6422
  configure: function(g) {
6424
- return this._config = o.merge(this._config, g), this._renderer.updateConfig(this._config), this._coordinator.emit("renderall", this._store._getInternalData()), this;
6423
+ return this._config = a.merge(this._config, g), this._renderer.updateConfig(this._config), this._coordinator.emit("renderall", this._store._getInternalData()), this;
6425
6424
  },
6426
6425
  repaint: function() {
6427
6426
  return this._coordinator.emit("renderall", this._store._getInternalData()), this;
@@ -6459,25 +6458,25 @@ const Y = class Y extends EventEmitter {
6459
6458
  }
6460
6459
  popup(r) {
6461
6460
  var c;
6462
- const a = r.element;
6463
- a.style.position = "absolute";
6464
- const h = r.viewer.container, o = () => {
6465
- u && (u.destroy(), h.removeChild(a), this.popupMap.delete(r.id), this.emit("onUnmount", r.id));
6461
+ const o = r.element;
6462
+ o.style.position = "absolute";
6463
+ const h = r.viewer.container, a = () => {
6464
+ u && (u.destroy(), h.removeChild(o), this.popupMap.delete(r.id), this.emit("onUnmount", r.id));
6466
6465
  };
6467
- h.appendChild(a), this.emit("onMount", r.id), (c = this.popupMap.get(r.id)) == null || c.destroy();
6466
+ h.appendChild(o), this.emit("onMount", r.id), (c = this.popupMap.get(r.id)) == null || c.destroy();
6468
6467
  const u = new Popup(r.viewer, {
6469
6468
  position: r.position,
6470
6469
  offset: r.offset ?? [0, 0],
6471
- element: a
6470
+ element: o
6472
6471
  });
6473
6472
  this.popupMap.set(r.id, {
6474
6473
  popup: u,
6475
- destroy: o
6474
+ destroy: a
6476
6475
  });
6477
6476
  }
6478
6477
  close(r) {
6479
- const a = this.popupMap.get(r);
6480
- a && (a.destroy(), this.popupMap.delete(r), this.emit("onUnmount", r));
6478
+ const o = this.popupMap.get(r);
6479
+ o && (o.destroy(), this.popupMap.delete(r), this.emit("onUnmount", r));
6481
6480
  }
6482
6481
  closeAll() {
6483
6482
  this.popupMap.forEach((r) => r.destroy()), this.popupMap.clear();
@@ -6512,8 +6511,8 @@ function ListenLeftClick(s) {
6512
6511
  if (memoizeMap.has(s))
6513
6512
  return memoizeMap.get(s);
6514
6513
  const i = new EventEmitter();
6515
- return new Cesium.ScreenSpaceEventHandler(s.scene.canvas).setInputAction((a) => {
6516
- i.emit("click", a);
6514
+ return new Cesium.ScreenSpaceEventHandler(s.scene.canvas).setInputAction((o) => {
6515
+ i.emit("click", o);
6517
6516
  }, Cesium.ScreenSpaceEventType.LEFT_CLICK), memoizeMap.set(s, i), i;
6518
6517
  }
6519
6518
  function uniqueId() {
@@ -6562,18 +6561,18 @@ class Subscriber {
6562
6561
  }
6563
6562
  _eventRegister(i) {
6564
6563
  if (this._isDestroy) return;
6565
- const r = this._eventCollection[i], a = this._externalEventCollection[i];
6564
+ const r = this._eventCollection[i], o = this._externalEventCollection[i];
6566
6565
  this._handler.setInputAction((h) => {
6567
- var o, u;
6568
- if (a.size > 0) {
6569
- const c = a.values();
6566
+ var a, u;
6567
+ if (o.size > 0) {
6568
+ const c = o.values();
6570
6569
  let d = c.next();
6571
6570
  for (; !d.done; )
6572
6571
  d.value(h), d = c.next();
6573
6572
  }
6574
6573
  if (!this._isDestroy && (h.position || h.endPosition)) {
6575
6574
  let c;
6576
- i === "MOUSE_MOVE" ? c = (o = this._viewer.scene.pick(h.endPosition)) == null ? void 0 : o.id : c = (u = this._viewer.scene.pick(h.position)) == null ? void 0 : u.id, c && r.has(c.id) && typeof r.get(c.id) == "function" && r.get(c.id)(h, c);
6575
+ i === "MOUSE_MOVE" ? c = (a = this._viewer.scene.pick(h.endPosition)) == null ? void 0 : a.id : c = (u = this._viewer.scene.pick(h.position)) == null ? void 0 : u.id, c && r.has(c.id) && typeof r.get(c.id) == "function" && r.get(c.id)(h, c);
6577
6576
  }
6578
6577
  }, ScreenSpaceEventType[i]);
6579
6578
  }
@@ -6586,11 +6585,11 @@ class Subscriber {
6586
6585
  *
6587
6586
  * @param {EventType} eventType 事件类型
6588
6587
  */
6589
- add(i, r, a) {
6588
+ add(i, r, o) {
6590
6589
  if (!this._isDestroy) {
6591
- this._eventCollection[a].size === 0 && this._externalEventCollection[a].size === 0 && this._eventRegister(a), i = Array.isArray(i) ? i : [i];
6590
+ this._eventCollection[o].size === 0 && this._externalEventCollection[o].size === 0 && this._eventRegister(o), i = Array.isArray(i) ? i : [i];
6592
6591
  for (const h of i)
6593
- this._eventCollection[a].set(h.id, r);
6592
+ this._eventCollection[o].set(h.id, r);
6594
6593
  }
6595
6594
  }
6596
6595
  /**
@@ -6602,8 +6601,8 @@ class Subscriber {
6602
6601
  addExternal(i, r) {
6603
6602
  if (this._isDestroy) return;
6604
6603
  this._eventCollection[r].size === 0 && this._externalEventCollection[r].size === 0 && this._eventRegister(r);
6605
- const a = uniqueId();
6606
- return this._externalEventCollection[r].set(a, i), a;
6604
+ const o = uniqueId();
6605
+ return this._externalEventCollection[r].set(o, i), o;
6607
6606
  }
6608
6607
  /**
6609
6608
  *@description 移除指定Substance的相应事件
@@ -6613,25 +6612,25 @@ class Subscriber {
6613
6612
  remove(i, r) {
6614
6613
  if (!this._isDestroy) {
6615
6614
  i = Array.isArray(i) ? i : [i];
6616
- for (const a of i)
6617
- this._eventCollection[r].has(a.id) && this._eventCollection[r].delete(a.id);
6615
+ for (const o of i)
6616
+ this._eventCollection[r].has(o.id) && this._eventCollection[r].delete(o.id);
6618
6617
  }
6619
6618
  }
6620
6619
  removeExternal(i, r) {
6621
- var a;
6620
+ var o;
6622
6621
  if (!this._isDestroy) {
6623
6622
  i = Array.isArray(i) ? i : [i];
6624
6623
  for (const h of i) {
6625
- const o = r || this._searchExternal(h);
6626
- (a = this._externalEventCollection[o]) != null && a.has(h) && this._externalEventCollection[o].delete(h);
6624
+ const a = r || this._searchExternal(h);
6625
+ (o = this._externalEventCollection[a]) != null && o.has(h) && this._externalEventCollection[a].delete(h);
6627
6626
  }
6628
6627
  }
6629
6628
  }
6630
6629
  _searchExternal(i) {
6631
6630
  if (this._isDestroy) return;
6632
6631
  const r = Object.keys(this._externalEventCollection);
6633
- for (const a of r)
6634
- if (this._externalEventCollection[a].has(i)) return a;
6632
+ for (const o of r)
6633
+ if (this._externalEventCollection[o].has(i)) return o;
6635
6634
  }
6636
6635
  removeNative(i, r) {
6637
6636
  i.screenSpaceEventHandler.removeInputAction(this.convertCesiumEventType(r));
@@ -6693,10 +6692,10 @@ class PolygonDrawer {
6693
6692
  M(this, "_events", []);
6694
6693
  M(this, "_labels");
6695
6694
  M(this, "_tips", {
6696
- leftClick: "LeftClick to add point",
6697
- rightClick: "RightClick cancel",
6698
- doubleClick: "DoubleClick compleate",
6699
- edit: "LeftClick to edit"
6695
+ leftClick: "左键添加",
6696
+ rightClick: "右键取消",
6697
+ doubleClick: "双击完成",
6698
+ edit: "左键编辑,右键删除"
6700
6699
  });
6701
6700
  M(this, "_hoveredPoint", null);
6702
6701
  /**
@@ -6705,8 +6704,8 @@ class PolygonDrawer {
6705
6704
  M(this, "handlePosChange", () => {
6706
6705
  if (this._posChange) {
6707
6706
  const i = [], r = this._activePoint ? this._pointGeometry.indexOf(this._activePoint) : -1;
6708
- this._positions.map((a, h) => {
6709
- h !== r && i.push(this.cartesian2lonlat(a));
6707
+ this._positions.map((o, h) => {
6708
+ h !== r && i.push(this.cartesian2lonlat(o));
6710
6709
  }), this._posChange(i);
6711
6710
  }
6712
6711
  });
@@ -6716,8 +6715,8 @@ class PolygonDrawer {
6716
6715
  M(this, "onMouseClickPoint", (i, r) => {
6717
6716
  if (this._status === "EDITING" && this._activePoint)
6718
6717
  return;
6719
- const a = this._pointGeometry.indexOf(r);
6720
- this.activeOnePosition(a), this._status = "EDITING";
6718
+ const o = this._pointGeometry.indexOf(r);
6719
+ this.activeOnePosition(o), this._status = "EDITING";
6721
6720
  });
6722
6721
  /**
6723
6722
  * 绘制多边形
@@ -6726,7 +6725,8 @@ class PolygonDrawer {
6726
6725
  const r = this._viewer.entities.add({
6727
6726
  polygon: {
6728
6727
  hierarchy: Array.isArray(i) ? new Cesium.PolygonHierarchy(i) : i,
6729
- material: Cesium.Color.YELLOW.withAlpha(0.5)
6728
+ material: Cesium.Color.YELLOW.withAlpha(0.5),
6729
+ ...this._options.polygon ?? {}
6730
6730
  }
6731
6731
  });
6732
6732
  return this._polygon = r, this._viewer.scene.requestRender(), r;
@@ -6735,26 +6735,26 @@ class PolygonDrawer {
6735
6735
  * 鼠标移动时改变活动点的位置和position坐标串
6736
6736
  */
6737
6737
  M(this, "handleMouseMove", (i) => {
6738
- var o;
6738
+ var a;
6739
6739
  const { ellipsoid: r } = this._viewer.scene.globe;
6740
6740
  if (!i.endPosition) return;
6741
- const a = this._viewer.camera.pickEllipsoid(i.endPosition, r);
6741
+ const o = this._viewer.camera.pickEllipsoid(i.endPosition, r);
6742
6742
  if (this._status === "END") {
6743
- const u = (o = this._viewer.scene.pick(i.endPosition)) == null ? void 0 : o.id;
6743
+ const u = (a = this._viewer.scene.pick(i.endPosition)) == null ? void 0 : a.id;
6744
6744
  this._hoveredPoint && this._hoveredPoint !== u && (this.updatePointSize(this._hoveredPoint, 5), this._hoveredPoint = null, this.updateLabel({
6745
6745
  show: !1
6746
6746
  }), this._viewer.canvas.style.cursor = "default"), !this._hoveredPoint && this._pointGeometry.indexOf(u) !== -1 && (this._hoveredPoint = u, this.updatePointSize(u, 10), this.updateLabel({
6747
- position: a,
6747
+ position: o,
6748
6748
  text: this._tips.edit,
6749
6749
  show: !0
6750
6750
  }), this._viewer.canvas.style.cursor = "pointer");
6751
6751
  return;
6752
6752
  }
6753
6753
  if (!this._activePoint) return;
6754
- this._activePoint.position.setValue(a);
6754
+ this._activePoint.position.setValue(o);
6755
6755
  const h = this._pointGeometry.indexOf(this._activePoint);
6756
- this._positions.length >= 2 && a && this._positions.splice(h, 1, a), this.updateLabel({
6757
- position: a
6756
+ this._positions.length >= 2 && o && this._positions.splice(h, 1, o), this.updateLabel({
6757
+ position: o
6758
6758
  }), this._viewer.scene.requestRender();
6759
6759
  });
6760
6760
  /**
@@ -6762,14 +6762,14 @@ class PolygonDrawer {
6762
6762
  */
6763
6763
  M(this, "handleMouseLeftClick", (i) => {
6764
6764
  if (!i.position || !this._activePoint) return;
6765
- const { ellipsoid: r } = this._viewer.scene.globe, a = this._viewer.camera.pickEllipsoid(i.position, r);
6766
- if (!a || !Cesium.defined(a) || this._lastClickPosition && Cesium.Cartesian2.magnitude(
6765
+ const { ellipsoid: r } = this._viewer.scene.globe, o = this._viewer.camera.pickEllipsoid(i.position, r);
6766
+ if (!o || !Cesium.defined(o) || this._lastClickPosition && Cesium.Cartesian2.magnitude(
6767
6767
  Cesium.Cartesian2.subtract(this._lastClickPosition, i.position, {})
6768
6768
  ) < this._mouseDelta)
6769
6769
  return;
6770
- const h = this._pointGeometry.indexOf(this._activePoint), o = this.drawPoint(a);
6771
- if (this.updatePointSize(this._activePoint, 5), this._activePoint = o, this._pointGeometry.splice(h + 1, 0, o), this._positions.splice(h + 1, 0, a), Cesium.Cartesian2.clone(i.position, this._lastClickPosition), this._positions.length === 1) {
6772
- this._positions.push(a);
6770
+ const h = this._pointGeometry.indexOf(this._activePoint), a = this.drawPoint(o);
6771
+ if (this.updatePointSize(this._activePoint, 5), this._activePoint = a, this._pointGeometry.splice(h + 1, 0, a), this._positions.splice(h + 1, 0, o), Cesium.Cartesian2.clone(i.position, this._lastClickPosition), this._positions.length === 1) {
6772
+ this._positions.push(o);
6773
6773
  const u = new Cesium.CallbackProperty(
6774
6774
  () => new Cesium.PolygonHierarchy(this._positions),
6775
6775
  !1
@@ -6785,8 +6785,8 @@ class PolygonDrawer {
6785
6785
  */
6786
6786
  M(this, "addOnePosition", (i, r) => {
6787
6787
  if (!Array.isArray(r)) return !1;
6788
- const a = Cesium.Cartesian3.fromDegrees(r[0], r[1]), h = this.drawPoint(a);
6789
- return this.updatePointSize(h, 5), this._subscriber.add(h, this.onMouseClickPoint, "LEFT_CLICK"), this._positions.splice(i, 0, a), this._pointGeometry.splice(i, 0, h), this.handlePosChange(), this._viewer.scene.requestRender(), !0;
6788
+ const o = Cesium.Cartesian3.fromDegrees(r[0], r[1]), h = this.drawPoint(o);
6789
+ return this.updatePointSize(h, 5), this._subscriber.add(h, this.onMouseClickPoint, "LEFT_CLICK"), this._positions.splice(i, 0, o), this._pointGeometry.splice(i, 0, h), this.handlePosChange(), this._viewer.scene.requestRender(), !0;
6790
6790
  });
6791
6791
  /**
6792
6792
  * 改变一个点的坐标信息
@@ -6796,8 +6796,8 @@ class PolygonDrawer {
6796
6796
  */
6797
6797
  M(this, "changeOnePosition", (i, r) => {
6798
6798
  if (!Array.isArray(r)) return !1;
6799
- const a = Cesium.Cartesian3.fromDegrees(r[0], r[1]);
6800
- return this._positions[i] = a, this._pointGeometry[i].position.setValue(a), !0;
6799
+ const o = Cesium.Cartesian3.fromDegrees(r[0], r[1]);
6800
+ return this._positions[i] = o, this._pointGeometry[i].position.setValue(o), !0;
6801
6801
  });
6802
6802
  /**
6803
6803
  * 移除一个点
@@ -6806,8 +6806,8 @@ class PolygonDrawer {
6806
6806
  */
6807
6807
  M(this, "removeOnePosition", (i) => {
6808
6808
  if (this._positions.length <= 2) return !1;
6809
- const a = this._pointGeometry[i];
6810
- return this._status === "EDITING" && this._subscriber.remove(a, "LEFT_CLICK"), this._viewer.entities.remove(a), this._positions.splice(i, 1), this._pointGeometry.splice(i, 1), this.handlePosChange(), this._viewer.scene.requestRender(), !0;
6809
+ const o = this._pointGeometry[i];
6810
+ return this._status === "EDITING" && this._subscriber.remove(o, "LEFT_CLICK"), this._viewer.entities.remove(o), this._positions.splice(i, 1), this._pointGeometry.splice(i, 1), this.handlePosChange(), this._viewer.scene.requestRender(), !0;
6811
6811
  });
6812
6812
  /**
6813
6813
  * 将一个点设置为活动点
@@ -6818,10 +6818,20 @@ class PolygonDrawer {
6818
6818
  this._activePoint = r, this.updatePointSize(this._activePoint, 10), this.updateLabel(), this._viewer.scene.requestRender();
6819
6819
  });
6820
6820
  // 右键取消上一个点
6821
- M(this, "handleMouseRightClick", () => {
6822
- if (!this._activePoint) return;
6823
- const i = this._pointGeometry.indexOf(this._activePoint);
6824
- i <= 0 || (this.removeOnePosition(i - 1), this.updateLabel());
6821
+ M(this, "handleMouseRightClick", (i) => {
6822
+ var o;
6823
+ if (this._status == "END" && i.position) {
6824
+ const h = (o = this._viewer.scene.pick(i.position)) == null ? void 0 : o.id;
6825
+ if (!h) return;
6826
+ const a = this._pointGeometry.indexOf(h);
6827
+ if (a === -1) return;
6828
+ this.removeOnePosition(a), this.updateLabel(), this.handlePosChange(), this._callBack && this._callBack(this._positions.map(this.cartesian2lonlat));
6829
+ return;
6830
+ }
6831
+ if (!this._activePoint)
6832
+ return;
6833
+ const r = this._pointGeometry.indexOf(this._activePoint);
6834
+ r <= 0 || (this.removeOnePosition(r - 1), this.updateLabel());
6825
6835
  });
6826
6836
  M(this, "removePolygon", () => {
6827
6837
  this._polygon && (this._viewer.entities.remove(this._polygon), this._polygon = null);
@@ -6833,20 +6843,20 @@ class PolygonDrawer {
6833
6843
  */
6834
6844
  M(this, "cartesian2lonlat", (i) => {
6835
6845
  if (!i) return [];
6836
- const { accuracy: r } = this._options, a = this._viewer.scene.globe.ellipsoid.cartesianToCartographic(i), h = +Cesium.Math.toDegrees(a.longitude).toFixed(r), o = +Cesium.Math.toDegrees(a.latitude).toFixed(r);
6837
- return [h, o];
6846
+ const { accuracy: r } = this._options, o = this._viewer.scene.globe.ellipsoid.cartesianToCartographic(i), h = +Cesium.Math.toDegrees(o.longitude).toFixed(r), a = +Cesium.Math.toDegrees(o.latitude).toFixed(r);
6847
+ return [h, a];
6838
6848
  });
6839
6849
  /**
6840
6850
  * 结束绘制
6841
6851
  * @returns boolean
6842
6852
  */
6843
- M(this, "endDraw", () => {
6853
+ M(this, "endDraw", (i) => {
6844
6854
  if (!this._activePoint) return !1;
6845
- const i = this._pointGeometry.indexOf(this._activePoint);
6846
- return this._positions.splice(i, 1), this._positions.length < 3 ? !1 : (this._options.once ? this.stop(!1) : this.start(), this._options.retainGeo === !1 && this.removePolygon(), this._subscriber.add(this._pointGeometry, this.onMouseClickPoint, "LEFT_CLICK"), this._callBack && this._callBack(this._positions.map(this.cartesian2lonlat)), this.updateLabel(), !0);
6855
+ const r = this._pointGeometry.indexOf(this._activePoint);
6856
+ return this._positions.splice(r, 1), this._positions.length < 3 ? !1 : (this._options.once ? this.stop(!1) : this.start(), this._options.retainGeo === !1 && this.removePolygon(), this._subscriber.add(this._pointGeometry, this.onMouseClickPoint, "LEFT_CLICK"), this._callBack && !(i != null && i.ignoreCallback) && this._callBack(this._positions.map(this.cartesian2lonlat)), this.updateLabel(), !0);
6847
6857
  });
6848
- if (!i) throw new Error("no viewer object");
6849
- this._viewer = i, this._callBack = r == null ? void 0 : r.callback, this._posChange = r == null ? void 0 : r.posChange, this._options = { ...this._options, ...r }, (r == null ? void 0 : r.positions) instanceof Array && (this._positions = r.positions), this._tips = { ...this._tips, ...r == null ? void 0 : r.tips }, this._status = "INIT", this._viewer.scene.pickPositionSupported || console.warn("浏览器不支持 pickPosition属性,无法在有地形的情况下正确选点"), this._labels = new LabelCollection(), i.scene.primitives.add(this._labels), this._labels.add({
6858
+ if (this.options = r, !i) throw new Error("no viewer object");
6859
+ this._viewer = i, this._callBack = r == null ? void 0 : r.callback, this._posChange = r == null ? void 0 : r.posChange, this._options = { ...this._options, ...r }, this._tips = { ...this._tips, ...r == null ? void 0 : r.tips }, this._status = "INIT", this._viewer.scene.pickPositionSupported || console.warn("浏览器不支持 pickPosition属性,无法在有地形的情况下正确选点"), this._labels = new LabelCollection(), i.scene.primitives.add(this._labels), this._labels.add({
6850
6860
  show: !0,
6851
6861
  position: Cesium.Cartesian3.ZERO,
6852
6862
  text: "start",
@@ -6859,7 +6869,7 @@ class PolygonDrawer {
6859
6869
  pixelOffset: new Cesium.Cartesian2(4, 30),
6860
6870
  scale: 1,
6861
6871
  scaleByDistance: new Cesium.NearFarScalar(1, 0.85, 8e6, 0.75)
6862
- }), this._subscriber = new Subscriber(this._viewer);
6872
+ }), this._subscriber = new Subscriber(this._viewer), r != null && r.positions && r.positions.length > 2 && this.initializeFromPositions();
6863
6873
  }
6864
6874
  get status() {
6865
6875
  return this._status;
@@ -6867,6 +6877,26 @@ class PolygonDrawer {
6867
6877
  get isDestroy() {
6868
6878
  return this._status === "DESTROY";
6869
6879
  }
6880
+ /**
6881
+ * 根据传入的positions初始化图形并进入编辑状态
6882
+ */
6883
+ initializeFromPositions() {
6884
+ var r;
6885
+ const i = (r = this.options) == null ? void 0 : r.positions;
6886
+ i && (this.start(), i.forEach((o, h) => {
6887
+ if (!this._activePoint || h == i.length - 1 && o.equals(i[0])) return;
6888
+ const a = this._pointGeometry.indexOf(this._activePoint), u = this.drawPoint(o);
6889
+ if (this.updatePointSize(u, 5), this._pointGeometry.splice(a, 0, u), this._positions.splice(a, 0, o), this._positions.length === 1) {
6890
+ this._positions.push(o);
6891
+ const c = new Cesium.CallbackProperty(
6892
+ () => new Cesium.PolygonHierarchy(this._positions),
6893
+ !1
6894
+ );
6895
+ this.removePolygon(), this.drawShape(c);
6896
+ }
6897
+ this.updateLabel();
6898
+ }), this.endDraw({ ignoreCallback: !0 }));
6899
+ }
6870
6900
  /**
6871
6901
  * 更新标签信息
6872
6902
  * @param options 标签位置、标签文字, 不填则按照默认逻辑更新
@@ -6885,8 +6915,8 @@ class PolygonDrawer {
6885
6915
  this._positions.length > 2 && (l = `${u}, ${c}, ${d}`), r.text = l;
6886
6916
  return;
6887
6917
  }
6888
- const { position: a, text: h, show: o = !0 } = i;
6889
- a && (r.position = a), h !== void 0 && (r.text = h), r.show = o;
6918
+ const { position: o, text: h, show: a = !0 } = i;
6919
+ o && (r.position = o), h !== void 0 && (r.text = h), r.show = a;
6890
6920
  }
6891
6921
  drawPoint(i) {
6892
6922
  const r = this._viewer.entities.add({
@@ -6911,8 +6941,8 @@ class PolygonDrawer {
6911
6941
  this.stop(), this._pointGeometry = [];
6912
6942
  const i = this._positions[1] ?? new Cesium.Cartesian3(), r = this.drawPoint(i);
6913
6943
  if (this._positions.length = 0, this._pointGeometry.push(r), this._activePoint = r, this._subscriber.removeNative(this._viewer, "LEFT_DOUBLE_CLICK"), this._events.length === 0) {
6914
- const a = this._subscriber.addExternal(this.handleMouseLeftClick, "LEFT_CLICK"), h = this._subscriber.addExternal(this.handleMouseMove, "MOUSE_MOVE"), o = this._subscriber.addExternal(this.handleMouseRightClick, "RIGHT_CLICK"), u = this._subscriber.addExternal(this.endDraw, "LEFT_DOUBLE_CLICK");
6915
- this._events = [a, h, o, u];
6944
+ const o = this._subscriber.addExternal(this.handleMouseLeftClick, "LEFT_CLICK"), h = this._subscriber.addExternal(this.handleMouseMove, "MOUSE_MOVE"), a = this._subscriber.addExternal(this.handleMouseRightClick, "RIGHT_CLICK"), u = this._subscriber.addExternal(() => this.endDraw(), "LEFT_DOUBLE_CLICK");
6945
+ this._events = [o, h, a, u];
6916
6946
  }
6917
6947
  this.updateLabel(), this._status = "START", this.handlePosChange();
6918
6948
  }
@@ -6935,8 +6965,8 @@ class PolygonDrawer {
6935
6965
  clear() {
6936
6966
  this.stop(), this.removePolygon(), this.updateLabel();
6937
6967
  }
6938
- destory() {
6939
- this._subscriber.removeExternal(this._events), this._events = [], this.clear(), this._labels.destroy(), this._subscriber.destroy(), this._status = "DESTROY";
6968
+ destroy() {
6969
+ this._events = [], this.clear(), this._viewer.scene.primitives.remove(this._labels), this._subscriber.destroy(), this._status = "DESTROY";
6940
6970
  }
6941
6971
  }
6942
6972
  export {