@pan-ya/libgeo3dviewer 1.7.38 → 1.7.40

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.
@@ -16,7 +16,7 @@ import { GridMaterial as Rs } from "@babylonjs/materials";
16
16
  import "@babylonjs/materials/legacy/legacy-grid";
17
17
  import { createRoot as Bs } from "react-dom/client";
18
18
  import { i as ua, f as Ds, c as Fs, g as zs, d as $s, r as Ws, a as Us } from "./TubeUtil-DXs09yUD.js";
19
- import { P as ih } from "./TubeUtil-DXs09yUD.js";
19
+ import { P as ah } from "./TubeUtil-DXs09yUD.js";
20
20
  import "@babylonjs/core/Loading/Plugins/babylonFileLoader";
21
21
  import "@babylonjs/core/Loading/sceneLoader";
22
22
  import "@babylonjs/core/Materials";
@@ -100,7 +100,7 @@ function Vs() {
100
100
  ), R = (
101
101
  /* extra bits for each distance code */
102
102
  [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]
103
- ), M = (
103
+ ), L = (
104
104
  /* extra bits for each bit length code */
105
105
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]
106
106
  ), S = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], B = 512, k = new Array((g + 2) * 2);
@@ -150,20 +150,20 @@ function Vs() {
150
150
  D.bi_valid === 16 ? (oe(D, D.bi_buf), D.bi_buf = 0, D.bi_valid = 0) : D.bi_valid >= 8 && (D.pending_buf[D.pending++] = D.bi_buf & 255, D.bi_buf >>= 8, D.bi_valid -= 8);
151
151
  }
152
152
  function Se(D, de) {
153
- var ve = de.dyn_tree, be = de.max_code, Z = de.stat_desc.static_tree, ie = de.stat_desc.has_stree, w = de.stat_desc.extra_bits, pe = de.stat_desc.extra_base, Ie = de.stat_desc.max_length, h, q, j, L, H, J, we = 0;
154
- for (L = 0; L <= m; L++)
155
- D.bl_count[L] = 0;
153
+ var ve = de.dyn_tree, be = de.max_code, Z = de.stat_desc.static_tree, ie = de.stat_desc.has_stree, w = de.stat_desc.extra_bits, pe = de.stat_desc.extra_base, Ie = de.stat_desc.max_length, h, q, j, M, H, J, we = 0;
154
+ for (M = 0; M <= m; M++)
155
+ D.bl_count[M] = 0;
156
156
  for (ve[D.heap[D.heap_max] * 2 + 1] = 0, h = D.heap_max + 1; h < y; h++)
157
- q = D.heap[h], L = ve[ve[q * 2 + 1] * 2 + 1] + 1, L > Ie && (L = Ie, we++), ve[q * 2 + 1] = L, !(q > be) && (D.bl_count[L]++, H = 0, q >= pe && (H = w[q - pe]), J = ve[q * 2], D.opt_len += J * (L + H), ie && (D.static_len += J * (Z[q * 2 + 1] + H)));
157
+ q = D.heap[h], M = ve[ve[q * 2 + 1] * 2 + 1] + 1, M > Ie && (M = Ie, we++), ve[q * 2 + 1] = M, !(q > be) && (D.bl_count[M]++, H = 0, q >= pe && (H = w[q - pe]), J = ve[q * 2], D.opt_len += J * (M + H), ie && (D.static_len += J * (Z[q * 2 + 1] + H)));
158
158
  if (we !== 0) {
159
159
  do {
160
- for (L = Ie - 1; D.bl_count[L] === 0; )
161
- L--;
162
- D.bl_count[L]--, D.bl_count[L + 1] += 2, D.bl_count[Ie]--, we -= 2;
160
+ for (M = Ie - 1; D.bl_count[M] === 0; )
161
+ M--;
162
+ D.bl_count[M]--, D.bl_count[M + 1] += 2, D.bl_count[Ie]--, we -= 2;
163
163
  } while (we > 0);
164
- for (L = Ie; L !== 0; L--)
165
- for (q = D.bl_count[L]; q !== 0; )
166
- j = D.heap[--h], !(j > be) && (ve[j * 2 + 1] !== L && (D.opt_len += (L - ve[j * 2 + 1]) * ve[j * 2], ve[j * 2 + 1] = L), q--);
164
+ for (M = Ie; M !== 0; M--)
165
+ for (q = D.bl_count[M]; q !== 0; )
166
+ j = D.heap[--h], !(j > be) && (ve[j * 2 + 1] !== M && (D.opt_len += (M - ve[j * 2 + 1]) * ve[j * 2], ve[j * 2 + 1] = M), q--);
167
167
  }
168
168
  }
169
169
  function Ce(D, de, ve) {
@@ -198,7 +198,7 @@ function Vs() {
198
198
  k[D * 2 + 1] = 8, D++, ie[8]++;
199
199
  for (Ce(k, g + 1, ie), D = 0; D < p; D++)
200
200
  E[D * 2 + 1] = 5, E[D * 2] = ae(D, 5);
201
- ne = new U(k, T, f + 1, g, m), ee = new U(E, R, 0, p, m), G = new U(new Array(0), M, 0, _, P);
201
+ ne = new U(k, T, f + 1, g, m), ee = new U(E, R, 0, p, m), G = new U(new Array(0), L, 0, _, P);
202
202
  }
203
203
  function Q(D) {
204
204
  var de;
@@ -398,7 +398,7 @@ var Lr;
398
398
  function Zs() {
399
399
  if (Lr) return At;
400
400
  Lr = 1;
401
- var e = fn(), t = Vs(), n = pa(), a = ha(), i = or(), o = 0, r = 1, l = 3, s = 4, c = 5, d = 0, u = 1, f = -2, g = -3, p = -5, _ = -1, y = 1, m = 2, x = 3, P = 4, b = 0, A = 2, I = 8, C = 9, T = 15, R = 8, M = 29, S = 256, B = S + 1 + M, k = 30, E = 19, v = 2 * B + 1, O = 15, z = 3, W = 258, U = W + z + 1, ne = 32, ee = 42, G = 69, le = 73, re = 91, oe = 103, Y = 113, ce = 666, ae = 1, X = 2, Se = 3, Ce = 4, V = 3;
401
+ var e = fn(), t = Vs(), n = pa(), a = ha(), i = or(), o = 0, r = 1, l = 3, s = 4, c = 5, d = 0, u = 1, f = -2, g = -3, p = -5, _ = -1, y = 1, m = 2, x = 3, P = 4, b = 0, A = 2, I = 8, C = 9, T = 15, R = 8, L = 29, S = 256, B = S + 1 + L, k = 30, E = 19, v = 2 * B + 1, O = 15, z = 3, W = 258, U = W + z + 1, ne = 32, ee = 42, G = 69, le = 73, re = 91, oe = 103, Y = 113, ce = 666, ae = 1, X = 2, Se = 3, Ce = 4, V = 3;
402
402
  function Q(h, q) {
403
403
  return h.msg = i[q], q;
404
404
  }
@@ -422,45 +422,45 @@ function Zs() {
422
422
  function me(h, q) {
423
423
  h.pending_buf[h.pending++] = q >>> 8 & 255, h.pending_buf[h.pending++] = q & 255;
424
424
  }
425
- function Le(h, q, j, L) {
425
+ function Le(h, q, j, M) {
426
426
  var H = h.avail_in;
427
- return H > L && (H = L), H === 0 ? 0 : (h.avail_in -= H, e.arraySet(q, h.input, h.next_in, H, j), h.state.wrap === 1 ? h.adler = n(h.adler, q, H, j) : h.state.wrap === 2 && (h.adler = a(h.adler, q, H, j)), h.next_in += H, h.total_in += H, H);
427
+ return H > M && (H = M), H === 0 ? 0 : (h.avail_in -= H, e.arraySet(q, h.input, h.next_in, H, j), h.state.wrap === 1 ? h.adler = n(h.adler, q, H, j) : h.state.wrap === 2 && (h.adler = a(h.adler, q, H, j)), h.next_in += H, h.total_in += H, H);
428
428
  }
429
429
  function Oe(h, q) {
430
- var j = h.max_chain_length, L = h.strstart, H, J, we = h.prev_length, ke = h.nice_match, Te = h.strstart > h.w_size - U ? h.strstart - (h.w_size - U) : 0, Ge = h.window, Ht = h.w_mask, at = h.prev, Ye = h.strstart + W, ct = Ge[L + we - 1], gt = Ge[L + we];
430
+ var j = h.max_chain_length, M = h.strstart, H, J, we = h.prev_length, ke = h.nice_match, Te = h.strstart > h.w_size - U ? h.strstart - (h.w_size - U) : 0, Ge = h.window, Ht = h.w_mask, at = h.prev, Ye = h.strstart + W, ct = Ge[M + we - 1], gt = Ge[M + we];
431
431
  h.prev_length >= h.good_match && (j >>= 2), ke > h.lookahead && (ke = h.lookahead);
432
432
  do
433
- if (H = q, !(Ge[H + we] !== gt || Ge[H + we - 1] !== ct || Ge[H] !== Ge[L] || Ge[++H] !== Ge[L + 1])) {
434
- L += 2, H++;
433
+ if (H = q, !(Ge[H + we] !== gt || Ge[H + we - 1] !== ct || Ge[H] !== Ge[M] || Ge[++H] !== Ge[M + 1])) {
434
+ M += 2, H++;
435
435
  do
436
436
  ;
437
- while (Ge[++L] === Ge[++H] && Ge[++L] === Ge[++H] && Ge[++L] === Ge[++H] && Ge[++L] === Ge[++H] && Ge[++L] === Ge[++H] && Ge[++L] === Ge[++H] && Ge[++L] === Ge[++H] && Ge[++L] === Ge[++H] && L < Ye);
438
- if (J = W - (Ye - L), L = Ye - W, J > we) {
437
+ while (Ge[++M] === Ge[++H] && Ge[++M] === Ge[++H] && Ge[++M] === Ge[++H] && Ge[++M] === Ge[++H] && Ge[++M] === Ge[++H] && Ge[++M] === Ge[++H] && Ge[++M] === Ge[++H] && Ge[++M] === Ge[++H] && M < Ye);
438
+ if (J = W - (Ye - M), M = Ye - W, J > we) {
439
439
  if (h.match_start = q, we = J, J >= ke)
440
440
  break;
441
- ct = Ge[L + we - 1], gt = Ge[L + we];
441
+ ct = Ge[M + we - 1], gt = Ge[M + we];
442
442
  }
443
443
  }
444
444
  while ((q = at[q & Ht]) > Te && --j !== 0);
445
445
  return we <= h.lookahead ? we : h.lookahead;
446
446
  }
447
447
  function ze(h) {
448
- var q = h.w_size, j, L, H, J, we;
448
+ var q = h.w_size, j, M, H, J, we;
449
449
  do {
450
450
  if (J = h.window_size - h.lookahead - h.strstart, h.strstart >= q + (q - U)) {
451
- e.arraySet(h.window, h.window, q, q, 0), h.match_start -= q, h.strstart -= q, h.block_start -= q, L = h.hash_size, j = L;
451
+ e.arraySet(h.window, h.window, q, q, 0), h.match_start -= q, h.strstart -= q, h.block_start -= q, M = h.hash_size, j = M;
452
452
  do
453
453
  H = h.head[--j], h.head[j] = H >= q ? H - q : 0;
454
- while (--L);
455
- L = q, j = L;
454
+ while (--M);
455
+ M = q, j = M;
456
456
  do
457
457
  H = h.prev[--j], h.prev[j] = H >= q ? H - q : 0;
458
- while (--L);
458
+ while (--M);
459
459
  J += q;
460
460
  }
461
461
  if (h.strm.avail_in === 0)
462
462
  break;
463
- if (L = Le(h.strm, h.window, h.strstart + h.lookahead, J), h.lookahead += L, h.lookahead + h.insert >= z)
463
+ if (M = Le(h.strm, h.window, h.strstart + h.lookahead, J), h.lookahead += M, h.lookahead + h.insert >= z)
464
464
  for (we = h.strstart - h.insert, h.ins_h = h.window[we], h.ins_h = (h.ins_h << h.hash_shift ^ h.window[we + 1]) & h.hash_mask; h.insert && (h.ins_h = (h.ins_h << h.hash_shift ^ h.window[we + z - 1]) & h.hash_mask, h.prev[we & h.w_mask] = h.head[h.ins_h], h.head[h.ins_h] = we, we++, h.insert--, !(h.lookahead + h.insert < z)); )
465
465
  ;
466
466
  } while (h.lookahead < U && h.strm.avail_in !== 0);
@@ -475,14 +475,14 @@ function Zs() {
475
475
  break;
476
476
  }
477
477
  h.strstart += h.lookahead, h.lookahead = 0;
478
- var L = h.block_start + j;
479
- if ((h.strstart === 0 || h.strstart >= L) && (h.lookahead = h.strstart - L, h.strstart = L, xe(h, !1), h.strm.avail_out === 0) || h.strstart - h.block_start >= h.w_size - U && (xe(h, !1), h.strm.avail_out === 0))
478
+ var M = h.block_start + j;
479
+ if ((h.strstart === 0 || h.strstart >= M) && (h.lookahead = h.strstart - M, h.strstart = M, xe(h, !1), h.strm.avail_out === 0) || h.strstart - h.block_start >= h.w_size - U && (xe(h, !1), h.strm.avail_out === 0))
480
480
  return ae;
481
481
  }
482
482
  return h.insert = 0, q === s ? (xe(h, !0), h.strm.avail_out === 0 ? Se : Ce) : (h.strstart > h.block_start && (xe(h, !1), h.strm.avail_out === 0), ae);
483
483
  }
484
484
  function Be(h, q) {
485
- for (var j, L; ; ) {
485
+ for (var j, M; ; ) {
486
486
  if (h.lookahead < U) {
487
487
  if (ze(h), h.lookahead < U && q === o)
488
488
  return ae;
@@ -490,7 +490,7 @@ function Zs() {
490
490
  break;
491
491
  }
492
492
  if (j = 0, h.lookahead >= z && (h.ins_h = (h.ins_h << h.hash_shift ^ h.window[h.strstart + z - 1]) & h.hash_mask, j = h.prev[h.strstart & h.w_mask] = h.head[h.ins_h], h.head[h.ins_h] = h.strstart), j !== 0 && h.strstart - j <= h.w_size - U && (h.match_length = Oe(h, j)), h.match_length >= z)
493
- if (L = t._tr_tally(h, h.strstart - h.match_start, h.match_length - z), h.lookahead -= h.match_length, h.match_length <= h.max_lazy_match && h.lookahead >= z) {
493
+ if (M = t._tr_tally(h, h.strstart - h.match_start, h.match_length - z), h.lookahead -= h.match_length, h.match_length <= h.max_lazy_match && h.lookahead >= z) {
494
494
  h.match_length--;
495
495
  do
496
496
  h.strstart++, h.ins_h = (h.ins_h << h.hash_shift ^ h.window[h.strstart + z - 1]) & h.hash_mask, j = h.prev[h.strstart & h.w_mask] = h.head[h.ins_h], h.head[h.ins_h] = h.strstart;
@@ -499,14 +499,14 @@ function Zs() {
499
499
  } else
500
500
  h.strstart += h.match_length, h.match_length = 0, h.ins_h = h.window[h.strstart], h.ins_h = (h.ins_h << h.hash_shift ^ h.window[h.strstart + 1]) & h.hash_mask;
501
501
  else
502
- L = t._tr_tally(h, 0, h.window[h.strstart]), h.lookahead--, h.strstart++;
503
- if (L && (xe(h, !1), h.strm.avail_out === 0))
502
+ M = t._tr_tally(h, 0, h.window[h.strstart]), h.lookahead--, h.strstart++;
503
+ if (M && (xe(h, !1), h.strm.avail_out === 0))
504
504
  return ae;
505
505
  }
506
506
  return h.insert = h.strstart < z - 1 ? h.strstart : z - 1, q === s ? (xe(h, !0), h.strm.avail_out === 0 ? Se : Ce) : h.last_lit && (xe(h, !1), h.strm.avail_out === 0) ? ae : X;
507
507
  }
508
508
  function Ue(h, q) {
509
- for (var j, L, H; ; ) {
509
+ for (var j, M, H; ; ) {
510
510
  if (h.lookahead < U) {
511
511
  if (ze(h), h.lookahead < U && q === o)
512
512
  return ae;
@@ -514,33 +514,33 @@ function Zs() {
514
514
  break;
515
515
  }
516
516
  if (j = 0, h.lookahead >= z && (h.ins_h = (h.ins_h << h.hash_shift ^ h.window[h.strstart + z - 1]) & h.hash_mask, j = h.prev[h.strstart & h.w_mask] = h.head[h.ins_h], h.head[h.ins_h] = h.strstart), h.prev_length = h.match_length, h.prev_match = h.match_start, h.match_length = z - 1, j !== 0 && h.prev_length < h.max_lazy_match && h.strstart - j <= h.w_size - U && (h.match_length = Oe(h, j), h.match_length <= 5 && (h.strategy === y || h.match_length === z && h.strstart - h.match_start > 4096) && (h.match_length = z - 1)), h.prev_length >= z && h.match_length <= h.prev_length) {
517
- H = h.strstart + h.lookahead - z, L = t._tr_tally(h, h.strstart - 1 - h.prev_match, h.prev_length - z), h.lookahead -= h.prev_length - 1, h.prev_length -= 2;
517
+ H = h.strstart + h.lookahead - z, M = t._tr_tally(h, h.strstart - 1 - h.prev_match, h.prev_length - z), h.lookahead -= h.prev_length - 1, h.prev_length -= 2;
518
518
  do
519
519
  ++h.strstart <= H && (h.ins_h = (h.ins_h << h.hash_shift ^ h.window[h.strstart + z - 1]) & h.hash_mask, j = h.prev[h.strstart & h.w_mask] = h.head[h.ins_h], h.head[h.ins_h] = h.strstart);
520
520
  while (--h.prev_length !== 0);
521
- if (h.match_available = 0, h.match_length = z - 1, h.strstart++, L && (xe(h, !1), h.strm.avail_out === 0))
521
+ if (h.match_available = 0, h.match_length = z - 1, h.strstart++, M && (xe(h, !1), h.strm.avail_out === 0))
522
522
  return ae;
523
523
  } else if (h.match_available) {
524
- if (L = t._tr_tally(h, 0, h.window[h.strstart - 1]), L && xe(h, !1), h.strstart++, h.lookahead--, h.strm.avail_out === 0)
524
+ if (M = t._tr_tally(h, 0, h.window[h.strstart - 1]), M && xe(h, !1), h.strstart++, h.lookahead--, h.strm.avail_out === 0)
525
525
  return ae;
526
526
  } else
527
527
  h.match_available = 1, h.strstart++, h.lookahead--;
528
528
  }
529
- return h.match_available && (L = t._tr_tally(h, 0, h.window[h.strstart - 1]), h.match_available = 0), h.insert = h.strstart < z - 1 ? h.strstart : z - 1, q === s ? (xe(h, !0), h.strm.avail_out === 0 ? Se : Ce) : h.last_lit && (xe(h, !1), h.strm.avail_out === 0) ? ae : X;
529
+ return h.match_available && (M = t._tr_tally(h, 0, h.window[h.strstart - 1]), h.match_available = 0), h.insert = h.strstart < z - 1 ? h.strstart : z - 1, q === s ? (xe(h, !0), h.strm.avail_out === 0 ? Se : Ce) : h.last_lit && (xe(h, !1), h.strm.avail_out === 0) ? ae : X;
530
530
  }
531
531
  function qe(h, q) {
532
- for (var j, L, H, J, we = h.window; ; ) {
532
+ for (var j, M, H, J, we = h.window; ; ) {
533
533
  if (h.lookahead <= W) {
534
534
  if (ze(h), h.lookahead <= W && q === o)
535
535
  return ae;
536
536
  if (h.lookahead === 0)
537
537
  break;
538
538
  }
539
- if (h.match_length = 0, h.lookahead >= z && h.strstart > 0 && (H = h.strstart - 1, L = we[H], L === we[++H] && L === we[++H] && L === we[++H])) {
539
+ if (h.match_length = 0, h.lookahead >= z && h.strstart > 0 && (H = h.strstart - 1, M = we[H], M === we[++H] && M === we[++H] && M === we[++H])) {
540
540
  J = h.strstart + W;
541
541
  do
542
542
  ;
543
- while (L === we[++H] && L === we[++H] && L === we[++H] && L === we[++H] && L === we[++H] && L === we[++H] && L === we[++H] && L === we[++H] && H < J);
543
+ while (M === we[++H] && M === we[++H] && M === we[++H] && M === we[++H] && M === we[++H] && M === we[++H] && M === we[++H] && M === we[++H] && H < J);
544
544
  h.match_length = W - (J - H), h.match_length > h.lookahead && (h.match_length = h.lookahead);
545
545
  }
546
546
  if (h.match_length >= z ? (j = t._tr_tally(h, 1, h.match_length - z), h.lookahead -= h.match_length, h.strstart += h.match_length, h.match_length = 0) : (j = t._tr_tally(h, 0, h.window[h.strstart]), h.lookahead--, h.strstart++), j && (xe(h, !1), h.strm.avail_out === 0))
@@ -560,8 +560,8 @@ function Zs() {
560
560
  }
561
561
  return h.insert = 0, q === s ? (xe(h, !0), h.strm.avail_out === 0 ? Se : Ce) : h.last_lit && (xe(h, !1), h.strm.avail_out === 0) ? ae : X;
562
562
  }
563
- function Ze(h, q, j, L, H) {
564
- this.good_length = h, this.max_lazy = q, this.nice_length = j, this.max_chain = L, this.func = H;
563
+ function Ze(h, q, j, M, H) {
564
+ this.good_length = h, this.max_lazy = q, this.nice_length = j, this.max_chain = M, this.func = H;
565
565
  }
566
566
  var it;
567
567
  it = [
@@ -604,100 +604,100 @@ function Zs() {
604
604
  function be(h, q) {
605
605
  return !h || !h.state || h.state.wrap !== 2 ? f : (h.state.gzhead = q, d);
606
606
  }
607
- function Z(h, q, j, L, H, J) {
607
+ function Z(h, q, j, M, H, J) {
608
608
  if (!h)
609
609
  return f;
610
610
  var we = 1;
611
- if (q === _ && (q = 6), L < 0 ? (we = 0, L = -L) : L > 15 && (we = 2, L -= 16), H < 1 || H > C || j !== I || L < 8 || L > 15 || q < 0 || q > 9 || J < 0 || J > P)
611
+ if (q === _ && (q = 6), M < 0 ? (we = 0, M = -M) : M > 15 && (we = 2, M -= 16), H < 1 || H > C || j !== I || M < 8 || M > 15 || q < 0 || q > 9 || J < 0 || J > P)
612
612
  return Q(h, f);
613
- L === 8 && (L = 9);
613
+ M === 8 && (M = 9);
614
614
  var ke = new D();
615
- return h.state = ke, ke.strm = h, ke.wrap = we, ke.gzhead = null, ke.w_bits = L, ke.w_size = 1 << ke.w_bits, ke.w_mask = ke.w_size - 1, ke.hash_bits = H + 7, ke.hash_size = 1 << ke.hash_bits, ke.hash_mask = ke.hash_size - 1, ke.hash_shift = ~~((ke.hash_bits + z - 1) / z), ke.window = new e.Buf8(ke.w_size * 2), ke.head = new e.Buf16(ke.hash_size), ke.prev = new e.Buf16(ke.w_size), ke.lit_bufsize = 1 << H + 6, ke.pending_buf_size = ke.lit_bufsize * 4, ke.pending_buf = new e.Buf8(ke.pending_buf_size), ke.d_buf = 1 * ke.lit_bufsize, ke.l_buf = 3 * ke.lit_bufsize, ke.level = q, ke.strategy = J, ke.method = j, ve(h);
615
+ return h.state = ke, ke.strm = h, ke.wrap = we, ke.gzhead = null, ke.w_bits = M, ke.w_size = 1 << ke.w_bits, ke.w_mask = ke.w_size - 1, ke.hash_bits = H + 7, ke.hash_size = 1 << ke.hash_bits, ke.hash_mask = ke.hash_size - 1, ke.hash_shift = ~~((ke.hash_bits + z - 1) / z), ke.window = new e.Buf8(ke.w_size * 2), ke.head = new e.Buf16(ke.hash_size), ke.prev = new e.Buf16(ke.w_size), ke.lit_bufsize = 1 << H + 6, ke.pending_buf_size = ke.lit_bufsize * 4, ke.pending_buf = new e.Buf8(ke.pending_buf_size), ke.d_buf = 1 * ke.lit_bufsize, ke.l_buf = 3 * ke.lit_bufsize, ke.level = q, ke.strategy = J, ke.method = j, ve(h);
616
616
  }
617
617
  function ie(h, q) {
618
618
  return Z(h, q, I, T, R, b);
619
619
  }
620
620
  function w(h, q) {
621
- var j, L, H, J;
621
+ var j, M, H, J;
622
622
  if (!h || !h.state || q > c || q < 0)
623
623
  return h ? Q(h, f) : f;
624
- if (L = h.state, !h.output || !h.input && h.avail_in !== 0 || L.status === ce && q !== s)
624
+ if (M = h.state, !h.output || !h.input && h.avail_in !== 0 || M.status === ce && q !== s)
625
625
  return Q(h, h.avail_out === 0 ? p : f);
626
- if (L.strm = h, j = L.last_flush, L.last_flush = q, L.status === ee)
627
- if (L.wrap === 2)
628
- h.adler = 0, fe(L, 31), fe(L, 139), fe(L, 8), L.gzhead ? (fe(
629
- L,
630
- (L.gzhead.text ? 1 : 0) + (L.gzhead.hcrc ? 2 : 0) + (L.gzhead.extra ? 4 : 0) + (L.gzhead.name ? 8 : 0) + (L.gzhead.comment ? 16 : 0)
631
- ), fe(L, L.gzhead.time & 255), fe(L, L.gzhead.time >> 8 & 255), fe(L, L.gzhead.time >> 16 & 255), fe(L, L.gzhead.time >> 24 & 255), fe(L, L.level === 9 ? 2 : L.strategy >= m || L.level < 2 ? 4 : 0), fe(L, L.gzhead.os & 255), L.gzhead.extra && L.gzhead.extra.length && (fe(L, L.gzhead.extra.length & 255), fe(L, L.gzhead.extra.length >> 8 & 255)), L.gzhead.hcrc && (h.adler = a(h.adler, L.pending_buf, L.pending, 0)), L.gzindex = 0, L.status = G) : (fe(L, 0), fe(L, 0), fe(L, 0), fe(L, 0), fe(L, 0), fe(L, L.level === 9 ? 2 : L.strategy >= m || L.level < 2 ? 4 : 0), fe(L, V), L.status = Y);
626
+ if (M.strm = h, j = M.last_flush, M.last_flush = q, M.status === ee)
627
+ if (M.wrap === 2)
628
+ h.adler = 0, fe(M, 31), fe(M, 139), fe(M, 8), M.gzhead ? (fe(
629
+ M,
630
+ (M.gzhead.text ? 1 : 0) + (M.gzhead.hcrc ? 2 : 0) + (M.gzhead.extra ? 4 : 0) + (M.gzhead.name ? 8 : 0) + (M.gzhead.comment ? 16 : 0)
631
+ ), fe(M, M.gzhead.time & 255), fe(M, M.gzhead.time >> 8 & 255), fe(M, M.gzhead.time >> 16 & 255), fe(M, M.gzhead.time >> 24 & 255), fe(M, M.level === 9 ? 2 : M.strategy >= m || M.level < 2 ? 4 : 0), fe(M, M.gzhead.os & 255), M.gzhead.extra && M.gzhead.extra.length && (fe(M, M.gzhead.extra.length & 255), fe(M, M.gzhead.extra.length >> 8 & 255)), M.gzhead.hcrc && (h.adler = a(h.adler, M.pending_buf, M.pending, 0)), M.gzindex = 0, M.status = G) : (fe(M, 0), fe(M, 0), fe(M, 0), fe(M, 0), fe(M, 0), fe(M, M.level === 9 ? 2 : M.strategy >= m || M.level < 2 ? 4 : 0), fe(M, V), M.status = Y);
632
632
  else {
633
- var we = I + (L.w_bits - 8 << 4) << 8, ke = -1;
634
- L.strategy >= m || L.level < 2 ? ke = 0 : L.level < 6 ? ke = 1 : L.level === 6 ? ke = 2 : ke = 3, we |= ke << 6, L.strstart !== 0 && (we |= ne), we += 31 - we % 31, L.status = Y, me(L, we), L.strstart !== 0 && (me(L, h.adler >>> 16), me(L, h.adler & 65535)), h.adler = 1;
635
- }
636
- if (L.status === G)
637
- if (L.gzhead.extra) {
638
- for (H = L.pending; L.gzindex < (L.gzhead.extra.length & 65535) && !(L.pending === L.pending_buf_size && (L.gzhead.hcrc && L.pending > H && (h.adler = a(h.adler, L.pending_buf, L.pending - H, H)), te(h), H = L.pending, L.pending === L.pending_buf_size)); )
639
- fe(L, L.gzhead.extra[L.gzindex] & 255), L.gzindex++;
640
- L.gzhead.hcrc && L.pending > H && (h.adler = a(h.adler, L.pending_buf, L.pending - H, H)), L.gzindex === L.gzhead.extra.length && (L.gzindex = 0, L.status = le);
633
+ var we = I + (M.w_bits - 8 << 4) << 8, ke = -1;
634
+ M.strategy >= m || M.level < 2 ? ke = 0 : M.level < 6 ? ke = 1 : M.level === 6 ? ke = 2 : ke = 3, we |= ke << 6, M.strstart !== 0 && (we |= ne), we += 31 - we % 31, M.status = Y, me(M, we), M.strstart !== 0 && (me(M, h.adler >>> 16), me(M, h.adler & 65535)), h.adler = 1;
635
+ }
636
+ if (M.status === G)
637
+ if (M.gzhead.extra) {
638
+ for (H = M.pending; M.gzindex < (M.gzhead.extra.length & 65535) && !(M.pending === M.pending_buf_size && (M.gzhead.hcrc && M.pending > H && (h.adler = a(h.adler, M.pending_buf, M.pending - H, H)), te(h), H = M.pending, M.pending === M.pending_buf_size)); )
639
+ fe(M, M.gzhead.extra[M.gzindex] & 255), M.gzindex++;
640
+ M.gzhead.hcrc && M.pending > H && (h.adler = a(h.adler, M.pending_buf, M.pending - H, H)), M.gzindex === M.gzhead.extra.length && (M.gzindex = 0, M.status = le);
641
641
  } else
642
- L.status = le;
643
- if (L.status === le)
644
- if (L.gzhead.name) {
645
- H = L.pending;
642
+ M.status = le;
643
+ if (M.status === le)
644
+ if (M.gzhead.name) {
645
+ H = M.pending;
646
646
  do {
647
- if (L.pending === L.pending_buf_size && (L.gzhead.hcrc && L.pending > H && (h.adler = a(h.adler, L.pending_buf, L.pending - H, H)), te(h), H = L.pending, L.pending === L.pending_buf_size)) {
647
+ if (M.pending === M.pending_buf_size && (M.gzhead.hcrc && M.pending > H && (h.adler = a(h.adler, M.pending_buf, M.pending - H, H)), te(h), H = M.pending, M.pending === M.pending_buf_size)) {
648
648
  J = 1;
649
649
  break;
650
650
  }
651
- L.gzindex < L.gzhead.name.length ? J = L.gzhead.name.charCodeAt(L.gzindex++) & 255 : J = 0, fe(L, J);
651
+ M.gzindex < M.gzhead.name.length ? J = M.gzhead.name.charCodeAt(M.gzindex++) & 255 : J = 0, fe(M, J);
652
652
  } while (J !== 0);
653
- L.gzhead.hcrc && L.pending > H && (h.adler = a(h.adler, L.pending_buf, L.pending - H, H)), J === 0 && (L.gzindex = 0, L.status = re);
653
+ M.gzhead.hcrc && M.pending > H && (h.adler = a(h.adler, M.pending_buf, M.pending - H, H)), J === 0 && (M.gzindex = 0, M.status = re);
654
654
  } else
655
- L.status = re;
656
- if (L.status === re)
657
- if (L.gzhead.comment) {
658
- H = L.pending;
655
+ M.status = re;
656
+ if (M.status === re)
657
+ if (M.gzhead.comment) {
658
+ H = M.pending;
659
659
  do {
660
- if (L.pending === L.pending_buf_size && (L.gzhead.hcrc && L.pending > H && (h.adler = a(h.adler, L.pending_buf, L.pending - H, H)), te(h), H = L.pending, L.pending === L.pending_buf_size)) {
660
+ if (M.pending === M.pending_buf_size && (M.gzhead.hcrc && M.pending > H && (h.adler = a(h.adler, M.pending_buf, M.pending - H, H)), te(h), H = M.pending, M.pending === M.pending_buf_size)) {
661
661
  J = 1;
662
662
  break;
663
663
  }
664
- L.gzindex < L.gzhead.comment.length ? J = L.gzhead.comment.charCodeAt(L.gzindex++) & 255 : J = 0, fe(L, J);
664
+ M.gzindex < M.gzhead.comment.length ? J = M.gzhead.comment.charCodeAt(M.gzindex++) & 255 : J = 0, fe(M, J);
665
665
  } while (J !== 0);
666
- L.gzhead.hcrc && L.pending > H && (h.adler = a(h.adler, L.pending_buf, L.pending - H, H)), J === 0 && (L.status = oe);
666
+ M.gzhead.hcrc && M.pending > H && (h.adler = a(h.adler, M.pending_buf, M.pending - H, H)), J === 0 && (M.status = oe);
667
667
  } else
668
- L.status = oe;
669
- if (L.status === oe && (L.gzhead.hcrc ? (L.pending + 2 > L.pending_buf_size && te(h), L.pending + 2 <= L.pending_buf_size && (fe(L, h.adler & 255), fe(L, h.adler >> 8 & 255), h.adler = 0, L.status = Y)) : L.status = Y), L.pending !== 0) {
668
+ M.status = oe;
669
+ if (M.status === oe && (M.gzhead.hcrc ? (M.pending + 2 > M.pending_buf_size && te(h), M.pending + 2 <= M.pending_buf_size && (fe(M, h.adler & 255), fe(M, h.adler >> 8 & 255), h.adler = 0, M.status = Y)) : M.status = Y), M.pending !== 0) {
670
670
  if (te(h), h.avail_out === 0)
671
- return L.last_flush = -1, d;
671
+ return M.last_flush = -1, d;
672
672
  } else if (h.avail_in === 0 && Me(q) <= Me(j) && q !== s)
673
673
  return Q(h, p);
674
- if (L.status === ce && h.avail_in !== 0)
674
+ if (M.status === ce && h.avail_in !== 0)
675
675
  return Q(h, p);
676
- if (h.avail_in !== 0 || L.lookahead !== 0 || q !== o && L.status !== ce) {
677
- var Te = L.strategy === m ? nt(L, q) : L.strategy === x ? qe(L, q) : it[L.level].func(L, q);
678
- if ((Te === Se || Te === Ce) && (L.status = ce), Te === ae || Te === Se)
679
- return h.avail_out === 0 && (L.last_flush = -1), d;
680
- if (Te === X && (q === r ? t._tr_align(L) : q !== c && (t._tr_stored_block(L, 0, 0, !1), q === l && (Ae(L.head), L.lookahead === 0 && (L.strstart = 0, L.block_start = 0, L.insert = 0))), te(h), h.avail_out === 0))
681
- return L.last_flush = -1, d;
676
+ if (h.avail_in !== 0 || M.lookahead !== 0 || q !== o && M.status !== ce) {
677
+ var Te = M.strategy === m ? nt(M, q) : M.strategy === x ? qe(M, q) : it[M.level].func(M, q);
678
+ if ((Te === Se || Te === Ce) && (M.status = ce), Te === ae || Te === Se)
679
+ return h.avail_out === 0 && (M.last_flush = -1), d;
680
+ if (Te === X && (q === r ? t._tr_align(M) : q !== c && (t._tr_stored_block(M, 0, 0, !1), q === l && (Ae(M.head), M.lookahead === 0 && (M.strstart = 0, M.block_start = 0, M.insert = 0))), te(h), h.avail_out === 0))
681
+ return M.last_flush = -1, d;
682
682
  }
683
- return q !== s ? d : L.wrap <= 0 ? u : (L.wrap === 2 ? (fe(L, h.adler & 255), fe(L, h.adler >> 8 & 255), fe(L, h.adler >> 16 & 255), fe(L, h.adler >> 24 & 255), fe(L, h.total_in & 255), fe(L, h.total_in >> 8 & 255), fe(L, h.total_in >> 16 & 255), fe(L, h.total_in >> 24 & 255)) : (me(L, h.adler >>> 16), me(L, h.adler & 65535)), te(h), L.wrap > 0 && (L.wrap = -L.wrap), L.pending !== 0 ? d : u);
683
+ return q !== s ? d : M.wrap <= 0 ? u : (M.wrap === 2 ? (fe(M, h.adler & 255), fe(M, h.adler >> 8 & 255), fe(M, h.adler >> 16 & 255), fe(M, h.adler >> 24 & 255), fe(M, h.total_in & 255), fe(M, h.total_in >> 8 & 255), fe(M, h.total_in >> 16 & 255), fe(M, h.total_in >> 24 & 255)) : (me(M, h.adler >>> 16), me(M, h.adler & 65535)), te(h), M.wrap > 0 && (M.wrap = -M.wrap), M.pending !== 0 ? d : u);
684
684
  }
685
685
  function pe(h) {
686
686
  var q;
687
687
  return !h || !h.state ? f : (q = h.state.status, q !== ee && q !== G && q !== le && q !== re && q !== oe && q !== Y && q !== ce ? Q(h, f) : (h.state = null, q === Y ? Q(h, g) : d));
688
688
  }
689
689
  function Ie(h, q) {
690
- var j = q.length, L, H, J, we, ke, Te, Ge, Ht;
691
- if (!h || !h.state || (L = h.state, we = L.wrap, we === 2 || we === 1 && L.status !== ee || L.lookahead))
690
+ var j = q.length, M, H, J, we, ke, Te, Ge, Ht;
691
+ if (!h || !h.state || (M = h.state, we = M.wrap, we === 2 || we === 1 && M.status !== ee || M.lookahead))
692
692
  return f;
693
- for (we === 1 && (h.adler = n(h.adler, q, j, 0)), L.wrap = 0, j >= L.w_size && (we === 0 && (Ae(L.head), L.strstart = 0, L.block_start = 0, L.insert = 0), Ht = new e.Buf8(L.w_size), e.arraySet(Ht, q, j - L.w_size, L.w_size, 0), q = Ht, j = L.w_size), ke = h.avail_in, Te = h.next_in, Ge = h.input, h.avail_in = j, h.next_in = 0, h.input = q, ze(L); L.lookahead >= z; ) {
694
- H = L.strstart, J = L.lookahead - (z - 1);
693
+ for (we === 1 && (h.adler = n(h.adler, q, j, 0)), M.wrap = 0, j >= M.w_size && (we === 0 && (Ae(M.head), M.strstart = 0, M.block_start = 0, M.insert = 0), Ht = new e.Buf8(M.w_size), e.arraySet(Ht, q, j - M.w_size, M.w_size, 0), q = Ht, j = M.w_size), ke = h.avail_in, Te = h.next_in, Ge = h.input, h.avail_in = j, h.next_in = 0, h.input = q, ze(M); M.lookahead >= z; ) {
694
+ H = M.strstart, J = M.lookahead - (z - 1);
695
695
  do
696
- L.ins_h = (L.ins_h << L.hash_shift ^ L.window[H + z - 1]) & L.hash_mask, L.prev[H & L.w_mask] = L.head[L.ins_h], L.head[L.ins_h] = H, H++;
696
+ M.ins_h = (M.ins_h << M.hash_shift ^ M.window[H + z - 1]) & M.hash_mask, M.prev[H & M.w_mask] = M.head[M.ins_h], M.head[M.ins_h] = H, H++;
697
697
  while (--J);
698
- L.strstart = H, L.lookahead = z - 1, ze(L);
698
+ M.strstart = H, M.lookahead = z - 1, ze(M);
699
699
  }
700
- return L.strstart += L.lookahead, L.block_start = L.strstart, L.insert = L.lookahead, L.lookahead = 0, L.match_length = L.prev_length = z - 1, L.match_available = 0, h.next_in = Te, h.input = Ge, h.avail_in = ke, L.wrap = we, d;
700
+ return M.strstart += M.lookahead, M.block_start = M.strstart, M.insert = M.lookahead, M.lookahead = 0, M.match_length = M.prev_length = z - 1, M.match_available = 0, h.next_in = Te, h.input = Ge, h.avail_in = ke, M.wrap = we, d;
701
701
  }
702
702
  return At.deflateInit = ie, At.deflateInit2 = Z, At.deflateReset = ve, At.deflateResetKeep = de, At.deflateSetHeader = be, At.deflate = w, At.deflateEnd = pe, At.deflateSetDictionary = Ie, At.deflateInfo = "pako deflate (from Nodeca project)", At;
703
703
  }
@@ -846,7 +846,7 @@ function Ys() {
846
846
  Fr = 1;
847
847
  var e = 30, t = 12;
848
848
  return Ao = function(a, i) {
849
- var o, r, l, s, c, d, u, f, g, p, _, y, m, x, P, b, A, I, C, T, R, M, S, B, k;
849
+ var o, r, l, s, c, d, u, f, g, p, _, y, m, x, P, b, A, I, C, T, R, L, S, B, k;
850
850
  o = a.state, r = a.next_in, B = a.input, l = r + (a.avail_in - 5), s = a.next_out, k = a.output, c = s - (i - a.avail_out), d = s + (a.avail_out - 257), u = o.dmax, f = o.wsize, g = o.whave, p = o.wnext, _ = o.window, y = o.hold, m = o.bits, x = o.lencode, P = o.distcode, b = (1 << o.lenbits) - 1, A = (1 << o.distbits) - 1;
851
851
  e:
852
852
  do {
@@ -869,44 +869,44 @@ function Ys() {
869
869
  a.msg = "invalid distance too far back", o.mode = e;
870
870
  break e;
871
871
  }
872
- if (M = 0, S = _, p === 0) {
873
- if (M += f - C, C < T) {
872
+ if (L = 0, S = _, p === 0) {
873
+ if (L += f - C, C < T) {
874
874
  T -= C;
875
875
  do
876
- k[s++] = _[M++];
876
+ k[s++] = _[L++];
877
877
  while (--C);
878
- M = s - R, S = k;
878
+ L = s - R, S = k;
879
879
  }
880
880
  } else if (p < C) {
881
- if (M += f + p - C, C -= p, C < T) {
881
+ if (L += f + p - C, C -= p, C < T) {
882
882
  T -= C;
883
883
  do
884
- k[s++] = _[M++];
884
+ k[s++] = _[L++];
885
885
  while (--C);
886
- if (M = 0, p < T) {
886
+ if (L = 0, p < T) {
887
887
  C = p, T -= C;
888
888
  do
889
- k[s++] = _[M++];
889
+ k[s++] = _[L++];
890
890
  while (--C);
891
- M = s - R, S = k;
891
+ L = s - R, S = k;
892
892
  }
893
893
  }
894
- } else if (M += p - C, C < T) {
894
+ } else if (L += p - C, C < T) {
895
895
  T -= C;
896
896
  do
897
- k[s++] = _[M++];
897
+ k[s++] = _[L++];
898
898
  while (--C);
899
- M = s - R, S = k;
899
+ L = s - R, S = k;
900
900
  }
901
901
  for (; T > 2; )
902
- k[s++] = S[M++], k[s++] = S[M++], k[s++] = S[M++], T -= 3;
903
- T && (k[s++] = S[M++], T > 1 && (k[s++] = S[M++]));
902
+ k[s++] = S[L++], k[s++] = S[L++], k[s++] = S[L++], T -= 3;
903
+ T && (k[s++] = S[L++], T > 1 && (k[s++] = S[L++]));
904
904
  } else {
905
- M = s - R;
905
+ L = s - R;
906
906
  do
907
- k[s++] = k[M++], k[s++] = k[M++], k[s++] = k[M++], T -= 3;
907
+ k[s++] = k[L++], k[s++] = k[L++], k[s++] = k[L++], T -= 3;
908
908
  while (T > 2);
909
- T && (k[s++] = k[M++], T > 1 && (k[s++] = k[M++]));
909
+ T && (k[s++] = k[L++], T > 1 && (k[s++] = k[L++]));
910
910
  }
911
911
  } else if (C & 64) {
912
912
  a.msg = "invalid distance code", o.mode = e;
@@ -1075,7 +1075,7 @@ function Js() {
1075
1075
  64
1076
1076
  ];
1077
1077
  return Eo = function(f, g, p, _, y, m, x, P) {
1078
- var b = P.bits, A = 0, I = 0, C = 0, T = 0, R = 0, M = 0, S = 0, B = 0, k = 0, E = 0, v, O, z, W, U, ne = null, ee = 0, G, le = new e.Buf16(t + 1), re = new e.Buf16(t + 1), oe = null, Y = 0, ce, ae, X;
1078
+ var b = P.bits, A = 0, I = 0, C = 0, T = 0, R = 0, L = 0, S = 0, B = 0, k = 0, E = 0, v, O, z, W, U, ne = null, ee = 0, G, le = new e.Buf16(t + 1), re = new e.Buf16(t + 1), oe = null, Y = 0, ce, ae, X;
1079
1079
  for (A = 0; A <= t; A++)
1080
1080
  le[A] = 0;
1081
1081
  for (I = 0; I < _; I++)
@@ -1095,10 +1095,10 @@ function Js() {
1095
1095
  re[A + 1] = re[A] + le[A];
1096
1096
  for (I = 0; I < _; I++)
1097
1097
  g[p + I] !== 0 && (x[re[g[p + I]]++] = I);
1098
- if (f === i ? (ne = oe = x, G = 19) : f === o ? (ne = l, ee -= 257, oe = s, Y -= 257, G = 256) : (ne = c, oe = d, G = -1), E = 0, I = 0, A = C, U = m, M = R, S = 0, z = -1, k = 1 << R, W = k - 1, f === o && k > n || f === r && k > a)
1098
+ if (f === i ? (ne = oe = x, G = 19) : f === o ? (ne = l, ee -= 257, oe = s, Y -= 257, G = 256) : (ne = c, oe = d, G = -1), E = 0, I = 0, A = C, U = m, L = R, S = 0, z = -1, k = 1 << R, W = k - 1, f === o && k > n || f === r && k > a)
1099
1099
  return 1;
1100
1100
  for (; ; ) {
1101
- ce = A - S, x[I] < G ? (ae = 0, X = x[I]) : x[I] > G ? (ae = oe[Y + x[I]], X = ne[ee + x[I]]) : (ae = 96, X = 0), v = 1 << A - S, O = 1 << M, C = O;
1101
+ ce = A - S, x[I] < G ? (ae = 0, X = x[I]) : x[I] > G ? (ae = oe[Y + x[I]], X = ne[ee + x[I]]) : (ae = 96, X = 0), v = 1 << A - S, O = 1 << L, C = O;
1102
1102
  do
1103
1103
  O -= v, y[U + (E >> S) + O] = ce << 24 | ae << 16 | X | 0;
1104
1104
  while (O !== 0);
@@ -1110,11 +1110,11 @@ function Js() {
1110
1110
  A = g[p + x[I]];
1111
1111
  }
1112
1112
  if (A > R && (E & W) !== z) {
1113
- for (S === 0 && (S = R), U += C, M = A - S, B = 1 << M; M + S < T && (B -= le[M + S], !(B <= 0)); )
1114
- M++, B <<= 1;
1115
- if (k += 1 << M, f === o && k > n || f === r && k > a)
1113
+ for (S === 0 && (S = R), U += C, L = A - S, B = 1 << L; L + S < T && (B -= le[L + S], !(B <= 0)); )
1114
+ L++, B <<= 1;
1115
+ if (k += 1 << L, f === o && k > n || f === r && k > a)
1116
1116
  return 1;
1117
- z = E & W, y[z] = R << 24 | M << 16 | U - m | 0;
1117
+ z = E & W, y[z] = R << 24 | L << 16 | U - m | 0;
1118
1118
  }
1119
1119
  }
1120
1120
  return E !== 0 && (y[U + E] = A - S << 24 | 64 << 16 | 0), P.bits = R, 0;
@@ -1124,7 +1124,7 @@ var $r;
1124
1124
  function Xs() {
1125
1125
  if ($r) return Nt;
1126
1126
  $r = 1;
1127
- var e = fn(), t = pa(), n = ha(), a = Ys(), i = Js(), o = 0, r = 1, l = 2, s = 4, c = 5, d = 6, u = 0, f = 1, g = 2, p = -2, _ = -3, y = -4, m = -5, x = 8, P = 1, b = 2, A = 3, I = 4, C = 5, T = 6, R = 7, M = 8, S = 9, B = 10, k = 11, E = 12, v = 13, O = 14, z = 15, W = 16, U = 17, ne = 18, ee = 19, G = 20, le = 21, re = 22, oe = 23, Y = 24, ce = 25, ae = 26, X = 27, Se = 28, Ce = 29, V = 30, Q = 31, Me = 32, Ae = 852, te = 592, xe = 15, fe = xe;
1127
+ var e = fn(), t = pa(), n = ha(), a = Ys(), i = Js(), o = 0, r = 1, l = 2, s = 4, c = 5, d = 6, u = 0, f = 1, g = 2, p = -2, _ = -3, y = -4, m = -5, x = 8, P = 1, b = 2, A = 3, I = 4, C = 5, T = 6, R = 7, L = 8, S = 9, B = 10, k = 11, E = 12, v = 13, O = 14, z = 15, W = 16, U = 17, ne = 18, ee = 19, G = 20, le = 21, re = 22, oe = 23, Y = 24, ce = 25, ae = 26, X = 27, Se = 28, Ce = 29, V = 30, Q = 31, Me = 32, Ae = 852, te = 592, xe = 15, fe = xe;
1128
1128
  function me(Z) {
1129
1129
  return (Z >>> 24 & 255) + (Z >>> 8 & 65280) + ((Z & 65280) << 8) + ((Z & 255) << 24);
1130
1130
  }
@@ -1173,13 +1173,13 @@ function Xs() {
1173
1173
  return h.window === null && (h.wsize = 1 << h.wbits, h.wnext = 0, h.whave = 0, h.window = new e.Buf8(h.wsize)), pe >= h.wsize ? (e.arraySet(h.window, ie, w - h.wsize, h.wsize, 0), h.wnext = 0, h.whave = h.wsize) : (Ie = h.wsize - h.wnext, Ie > pe && (Ie = pe), e.arraySet(h.window, ie, w - pe, Ie, h.wnext), pe -= Ie, pe ? (e.arraySet(h.window, ie, w - pe, pe, 0), h.wnext = pe, h.whave = h.wsize) : (h.wnext += Ie, h.wnext === h.wsize && (h.wnext = 0), h.whave < h.wsize && (h.whave += Ie))), 0;
1174
1174
  }
1175
1175
  function D(Z, ie) {
1176
- var w, pe, Ie, h, q, j, L, H, J, we, ke, Te, Ge, Ht, at = 0, Ye, ct, gt, _t, to, no, st, Tt, dt = new e.Buf8(4), Vt, Ft, br = (
1176
+ var w, pe, Ie, h, q, j, M, H, J, we, ke, Te, Ge, Ht, at = 0, Ye, ct, gt, _t, to, no, st, Tt, dt = new e.Buf8(4), Vt, Ft, br = (
1177
1177
  /* permutation of code lengths */
1178
1178
  [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]
1179
1179
  );
1180
1180
  if (!Z || !Z.state || !Z.output || !Z.input && Z.avail_in !== 0)
1181
1181
  return p;
1182
- w = Z.state, w.mode === E && (w.mode = v), q = Z.next_out, Ie = Z.output, L = Z.avail_out, h = Z.next_in, pe = Z.input, j = Z.avail_in, H = w.hold, J = w.bits, we = j, ke = L, Tt = u;
1182
+ w = Z.state, w.mode === E && (w.mode = v), q = Z.next_out, Ie = Z.output, M = Z.avail_out, h = Z.next_in, pe = Z.input, j = Z.avail_in, H = w.hold, J = w.bits, we = j, ke = M, Tt = u;
1183
1183
  e:
1184
1184
  for (; ; )
1185
1185
  switch (w.mode) {
@@ -1277,8 +1277,8 @@ function Xs() {
1277
1277
  if (w.flags & 512 && (w.check = n(w.check, pe, Te, h)), j -= Te, h += Te, st)
1278
1278
  break e;
1279
1279
  } else w.head && (w.head.name = null);
1280
- w.length = 0, w.mode = M;
1281
- case M:
1280
+ w.length = 0, w.mode = L;
1281
+ case L:
1282
1282
  if (w.flags & 4096) {
1283
1283
  if (j === 0)
1284
1284
  break e;
@@ -1314,7 +1314,7 @@ function Xs() {
1314
1314
  Z.adler = w.check = me(H), H = 0, J = 0, w.mode = k;
1315
1315
  case k:
1316
1316
  if (w.havedict === 0)
1317
- return Z.next_out = q, Z.avail_out = L, Z.next_in = h, Z.avail_in = j, w.hold = H, w.bits = J, g;
1317
+ return Z.next_out = q, Z.avail_out = M, Z.next_in = h, Z.avail_in = j, w.hold = H, w.bits = J, g;
1318
1318
  Z.adler = w.check = 1, w.mode = E;
1319
1319
  case E:
1320
1320
  if (ie === c || ie === d)
@@ -1363,9 +1363,9 @@ function Xs() {
1363
1363
  w.mode = W;
1364
1364
  case W:
1365
1365
  if (Te = w.length, Te) {
1366
- if (Te > j && (Te = j), Te > L && (Te = L), Te === 0)
1366
+ if (Te > j && (Te = j), Te > M && (Te = M), Te === 0)
1367
1367
  break e;
1368
- e.arraySet(Ie, pe, h, Te, q), j -= Te, h += Te, L -= Te, q += Te, w.length -= Te;
1368
+ e.arraySet(Ie, pe, h, Te, q), j -= Te, h += Te, M -= Te, q += Te, w.length -= Te;
1369
1369
  break;
1370
1370
  }
1371
1371
  w.mode = E;
@@ -1460,8 +1460,8 @@ function Xs() {
1460
1460
  case G:
1461
1461
  w.mode = le;
1462
1462
  case le:
1463
- if (j >= 6 && L >= 258) {
1464
- Z.next_out = q, Z.avail_out = L, Z.next_in = h, Z.avail_in = j, w.hold = H, w.bits = J, a(Z, ke), q = Z.next_out, Ie = Z.output, L = Z.avail_out, h = Z.next_in, pe = Z.input, j = Z.avail_in, H = w.hold, J = w.bits, w.mode === E && (w.back = -1);
1463
+ if (j >= 6 && M >= 258) {
1464
+ Z.next_out = q, Z.avail_out = M, Z.next_in = h, Z.avail_in = j, w.hold = H, w.bits = J, a(Z, ke), q = Z.next_out, Ie = Z.output, M = Z.avail_out, h = Z.next_in, pe = Z.input, j = Z.avail_in, H = w.hold, J = w.bits, w.mode === E && (w.back = -1);
1465
1465
  break;
1466
1466
  }
1467
1467
  for (w.back = 0; at = w.lencode[H & (1 << w.lenbits) - 1], Ye = at >>> 24, ct = at >>> 16 & 255, gt = at & 65535, !(Ye <= J); ) {
@@ -1534,9 +1534,9 @@ function Xs() {
1534
1534
  }
1535
1535
  w.mode = ce;
1536
1536
  case ce:
1537
- if (L === 0)
1537
+ if (M === 0)
1538
1538
  break e;
1539
- if (Te = ke - L, w.offset > Te) {
1539
+ if (Te = ke - M, w.offset > Te) {
1540
1540
  if (Te = w.offset - Te, Te > w.whave && w.sane) {
1541
1541
  Z.msg = "invalid distance too far back", w.mode = V;
1542
1542
  break;
@@ -1544,16 +1544,16 @@ function Xs() {
1544
1544
  Te > w.wnext ? (Te -= w.wnext, Ge = w.wsize - Te) : Ge = w.wnext - Te, Te > w.length && (Te = w.length), Ht = w.window;
1545
1545
  } else
1546
1546
  Ht = Ie, Ge = q - w.offset, Te = w.length;
1547
- Te > L && (Te = L), L -= Te, w.length -= Te;
1547
+ Te > M && (Te = M), M -= Te, w.length -= Te;
1548
1548
  do
1549
1549
  Ie[q++] = Ht[Ge++];
1550
1550
  while (--Te);
1551
1551
  w.length === 0 && (w.mode = le);
1552
1552
  break;
1553
1553
  case ae:
1554
- if (L === 0)
1554
+ if (M === 0)
1555
1555
  break e;
1556
- Ie[q++] = w.length, L--, w.mode = le;
1556
+ Ie[q++] = w.length, M--, w.mode = le;
1557
1557
  break;
1558
1558
  case X:
1559
1559
  if (w.wrap) {
@@ -1562,8 +1562,8 @@ function Xs() {
1562
1562
  break e;
1563
1563
  j--, H |= pe[h++] << J, J += 8;
1564
1564
  }
1565
- if (ke -= L, Z.total_out += ke, w.total += ke, ke && (Z.adler = w.check = /*UPDATE(state.check, put - _out, _out);*/
1566
- w.flags ? n(w.check, Ie, ke, q - ke) : t(w.check, Ie, ke, q - ke)), ke = L, (w.flags ? H : me(H)) !== w.check) {
1565
+ if (ke -= M, Z.total_out += ke, w.total += ke, ke && (Z.adler = w.check = /*UPDATE(state.check, put - _out, _out);*/
1566
+ w.flags ? n(w.check, Ie, ke, q - ke) : t(w.check, Ie, ke, q - ke)), ke = M, (w.flags ? H : me(H)) !== w.check) {
1567
1567
  Z.msg = "incorrect data check", w.mode = V;
1568
1568
  break;
1569
1569
  }
@@ -1596,7 +1596,7 @@ function Xs() {
1596
1596
  default:
1597
1597
  return p;
1598
1598
  }
1599
- return Z.next_out = q, Z.avail_out = L, Z.next_in = h, Z.avail_in = j, w.hold = H, w.bits = J, (w.wsize || ke !== Z.avail_out && w.mode < V && (w.mode < X || ie !== s)) && ft(Z, Z.output, Z.next_out, ke - Z.avail_out), we -= Z.avail_in, ke -= Z.avail_out, Z.total_in += we, Z.total_out += ke, w.total += ke, w.wrap && ke && (Z.adler = w.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
1599
+ return Z.next_out = q, Z.avail_out = M, Z.next_in = h, Z.avail_in = j, w.hold = H, w.bits = J, (w.wsize || ke !== Z.avail_out && w.mode < V && (w.mode < X || ie !== s)) && ft(Z, Z.output, Z.next_out, ke - Z.avail_out), we -= Z.avail_in, ke -= Z.avail_out, Z.total_in += we, Z.total_out += ke, w.total += ke, w.wrap && ke && (Z.adler = w.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
1600
1600
  w.flags ? n(w.check, Ie, ke, Z.next_out - ke) : t(w.check, Ie, ke, Z.next_out - ke)), Z.data_type = w.bits + (w.last ? 64 : 0) + (w.mode === E ? 128 : 0) + (w.mode === G || w.mode === z ? 256 : 0), (we === 0 && ke === 0 || ie === s) && Tt === u && (Tt = m), Tt;
1601
1601
  }
1602
1602
  function de(Z) {
@@ -1763,25 +1763,25 @@ function Qs() {
1763
1763
  f[C] = o[T], f[C + 1] = o[T + 2], f[C + 2] = o[T + 4], f[C + 3] = 255, b != -1 && y(o, T) == b && y(o, T + 2) == A && y(o, T + 4) == I && (f[C + 3] = 0);
1764
1764
  }
1765
1765
  } else if (p == 3) {
1766
- var R = s.tabs.PLTE, M = s.tabs.tRNS, S = M ? M.length : 0;
1766
+ var R = s.tabs.PLTE, L = s.tabs.tRNS, S = L ? L.length : 0;
1767
1767
  if (_ == 1) for (var B = 0; B < l; B++)
1768
1768
  for (var k = B * u, E = B * r, x = 0; x < r; x++) {
1769
1769
  var C = E + x << 2, v = o[k + (x >> 3)] >> 7 - ((x & 7) << 0) & 1, O = 3 * v;
1770
- f[C] = R[O], f[C + 1] = R[O + 1], f[C + 2] = R[O + 2], f[C + 3] = v < S ? M[v] : 255;
1770
+ f[C] = R[O], f[C + 1] = R[O + 1], f[C + 2] = R[O + 2], f[C + 3] = v < S ? L[v] : 255;
1771
1771
  }
1772
1772
  if (_ == 2) for (var B = 0; B < l; B++)
1773
1773
  for (var k = B * u, E = B * r, x = 0; x < r; x++) {
1774
1774
  var C = E + x << 2, v = o[k + (x >> 2)] >> 6 - ((x & 3) << 1) & 3, O = 3 * v;
1775
- f[C] = R[O], f[C + 1] = R[O + 1], f[C + 2] = R[O + 2], f[C + 3] = v < S ? M[v] : 255;
1775
+ f[C] = R[O], f[C + 1] = R[O + 1], f[C + 2] = R[O + 2], f[C + 3] = v < S ? L[v] : 255;
1776
1776
  }
1777
1777
  if (_ == 4) for (var B = 0; B < l; B++)
1778
1778
  for (var k = B * u, E = B * r, x = 0; x < r; x++) {
1779
1779
  var C = E + x << 2, v = o[k + (x >> 1)] >> 4 - ((x & 1) << 2) & 15, O = 3 * v;
1780
- f[C] = R[O], f[C + 1] = R[O + 1], f[C + 2] = R[O + 2], f[C + 3] = v < S ? M[v] : 255;
1780
+ f[C] = R[O], f[C + 1] = R[O + 1], f[C + 2] = R[O + 2], f[C + 3] = v < S ? L[v] : 255;
1781
1781
  }
1782
1782
  if (_ == 8) for (var x = 0; x < c; x++) {
1783
1783
  var C = x << 2, v = o[x], O = 3 * v;
1784
- f[C] = R[O], f[C + 1] = R[O + 1], f[C + 2] = R[O + 2], f[C + 3] = v < S ? M[v] : 255;
1784
+ f[C] = R[O], f[C + 1] = R[O + 1], f[C + 2] = R[O + 2], f[C + 3] = v < S ? L[v] : 255;
1785
1785
  }
1786
1786
  } else if (p == 4) {
1787
1787
  if (_ == 8) for (var x = 0; x < c; x++) {
@@ -1848,16 +1848,16 @@ function Qs() {
1848
1848
  for (var m = 0; m < 8; m++) u.tabs[P].push(s.readUint(r, l + m * 4));
1849
1849
  } else if (P == "tEXt") {
1850
1850
  u.tabs[P] == null && (u.tabs[P] = {});
1851
- var T = s.nextZero(r, l), R = s.readASCII(r, l, T - l), M = s.readASCII(r, T + 1, l + x - T - 1);
1852
- u.tabs[P][R] = M;
1851
+ var T = s.nextZero(r, l), R = s.readASCII(r, l, T - l), L = s.readASCII(r, T + 1, l + x - T - 1);
1852
+ u.tabs[P][R] = L;
1853
1853
  } else if (P == "iTXt") {
1854
1854
  u.tabs[P] == null && (u.tabs[P] = {});
1855
1855
  var T = 0, S = l;
1856
1856
  T = s.nextZero(r, S);
1857
1857
  var R = s.readASCII(r, S, T - S);
1858
1858
  S = T + 1, r[S], r[S + 1], S += 2, T = s.nextZero(r, S), s.readASCII(r, S, T - S), S = T + 1, T = s.nextZero(r, S), s.readUTF8(r, S, T - S), S = T + 1;
1859
- var M = s.readUTF8(r, S, x - (S - l));
1860
- u.tabs[P][R] = M;
1859
+ var L = s.readUTF8(r, S, x - (S - l));
1860
+ u.tabs[P][R] = L;
1861
1861
  } else if (P == "PLTE")
1862
1862
  u.tabs[P] = s.readBytes(r, l, x);
1863
1863
  else if (P == "hIST") {
@@ -1893,8 +1893,8 @@ function Qs() {
1893
1893
  T += b, A++;
1894
1894
  var R = Math.ceil(A * c / 8);
1895
1895
  a.decode._filterZero(o, r, g, A, I);
1896
- for (var M = 0, S = p[x]; S < s; ) {
1897
- for (var B = _[x], k = g + M * R << 3; B < l; ) {
1896
+ for (var L = 0, S = p[x]; S < s; ) {
1897
+ for (var B = _[x], k = g + L * R << 3; B < l; ) {
1898
1898
  if (c == 1) {
1899
1899
  var E = o[k >> 3];
1900
1900
  E = E >> 7 - (k & 7) & 1, f[S * u + (B >> 3)] |= E << 7 - ((B & 3) << 0);
@@ -1911,7 +1911,7 @@ function Qs() {
1911
1911
  for (var v = S * u + B * d, O = 0; O < d; O++) f[v + O] = o[(k >> 3) + O];
1912
1912
  k += c, B += b;
1913
1913
  }
1914
- M++, S += P;
1914
+ L++, S += P;
1915
1915
  }
1916
1916
  A * I != 0 && (g += I * (1 + R)), x = x + 1;
1917
1917
  }
@@ -1999,14 +1999,14 @@ function Qs() {
1999
1999
  if (u >= 0 && f >= 0 ? (y = x * r + P << 2, m = (f + x) * c + u + P << 2) : (y = (-f + x) * r - u + P << 2, m = x * c + P << 2), g == 0)
2000
2000
  s[m] = o[y], s[m + 1] = o[y + 1], s[m + 2] = o[y + 2], s[m + 3] = o[y + 3];
2001
2001
  else if (g == 1) {
2002
- var b = o[y + 3] * 0.00392156862745098, A = o[y] * b, I = o[y + 1] * b, C = o[y + 2] * b, T = s[m + 3] * (1 / 255), R = s[m] * T, M = s[m + 1] * T, S = s[m + 2] * T, B = 1 - b, k = b + T * B, E = k == 0 ? 0 : 1 / k;
2003
- s[m + 3] = 255 * k, s[m + 0] = (A + R * B) * E, s[m + 1] = (I + M * B) * E, s[m + 2] = (C + S * B) * E;
2002
+ var b = o[y + 3] * 0.00392156862745098, A = o[y] * b, I = o[y + 1] * b, C = o[y + 2] * b, T = s[m + 3] * (1 / 255), R = s[m] * T, L = s[m + 1] * T, S = s[m + 2] * T, B = 1 - b, k = b + T * B, E = k == 0 ? 0 : 1 / k;
2003
+ s[m + 3] = 255 * k, s[m + 0] = (A + R * B) * E, s[m + 1] = (I + L * B) * E, s[m + 2] = (C + S * B) * E;
2004
2004
  } else if (g == 2) {
2005
- var b = o[y + 3], A = o[y], I = o[y + 1], C = o[y + 2], T = s[m + 3], R = s[m], M = s[m + 1], S = s[m + 2];
2006
- b == T && A == R && I == M && C == S ? (s[m] = 0, s[m + 1] = 0, s[m + 2] = 0, s[m + 3] = 0) : (s[m] = A, s[m + 1] = I, s[m + 2] = C, s[m + 3] = b);
2005
+ var b = o[y + 3], A = o[y], I = o[y + 1], C = o[y + 2], T = s[m + 3], R = s[m], L = s[m + 1], S = s[m + 2];
2006
+ b == T && A == R && I == L && C == S ? (s[m] = 0, s[m + 1] = 0, s[m + 2] = 0, s[m + 3] = 0) : (s[m] = A, s[m + 1] = I, s[m + 2] = C, s[m + 3] = b);
2007
2007
  } else if (g == 3) {
2008
- var b = o[y + 3], A = o[y], I = o[y + 1], C = o[y + 2], T = s[m + 3], R = s[m], M = s[m + 1], S = s[m + 2];
2009
- if (b == T && A == R && I == M && C == S) continue;
2008
+ var b = o[y + 3], A = o[y], I = o[y + 1], C = o[y + 2], T = s[m + 3], R = s[m], L = s[m + 1], S = s[m + 2];
2009
+ if (b == T && A == R && I == L && C == S) continue;
2010
2010
  if (b < 220 && T > 20) return !1;
2011
2011
  }
2012
2012
  return !0;
@@ -2020,8 +2020,8 @@ function Qs() {
2020
2020
  var I = b.plte.length;
2021
2021
  m(u, p, I * 3), p += 4, P(u, p, "PLTE"), p += 4;
2022
2022
  for (var g = 0; g < I; g++) {
2023
- var C = g * 3, T = b.plte[g], R = T & 255, M = T >> 8 & 255, S = T >> 16 & 255;
2024
- u[p + C + 0] = R, u[p + C + 1] = M, u[p + C + 2] = S;
2023
+ var C = g * 3, T = b.plte[g], R = T & 255, L = T >> 8 & 255, S = T >> 16 & 255;
2024
+ u[p + C + 0] = R, u[p + C + 1] = L, u[p + C + 2] = S;
2025
2025
  }
2026
2026
  if (p += I * 3, m(u, p, y(u, p - I * 3 - 4, I * 3 + 4)), p += 4, b.gotAlpha) {
2027
2027
  m(u, p, I), p += 4, P(u, p, "tRNS"), p += 4;
@@ -2067,8 +2067,8 @@ function Qs() {
2067
2067
  if ((x < r || C != T[x - 1] && C != T[x - r]) && b[C] == null && (b[C] = A.length, A.push(C), A.length >= 300))
2068
2068
  break;
2069
2069
  }
2070
- var R = P ? c : !1, M = A.length;
2071
- M <= 256 && d == !1 && (M <= 2 ? f = 1 : M <= 4 ? f = 2 : M <= 16 ? f = 4 : f = 8, c && (f = 8), P = !0);
2070
+ var R = P ? c : !1, L = A.length;
2071
+ L <= 256 && d == !1 && (L <= 2 ? f = 1 : L <= 4 ? f = 2 : L <= 16 ? f = 4 : f = 8, c && (f = 8), P = !0);
2072
2072
  for (var S = [], _ = 0; _ < o.length; _++) {
2073
2073
  var B = new Uint8Array(o[_]), k = new Uint32Array(B.buffer), E = 0, v = 0, O = r, z = l, W = 0;
2074
2074
  if (_ != 0 && !R) {
@@ -2086,7 +2086,7 @@ function Qs() {
2086
2086
  new Uint32Array(V.buffer), a._copyTile(Ce, r, l, V, O, z, -E, -v, 0), a._copyTile(B, r, l, V, O, z, -E, -v, 3) ? (a._copyTile(B, r, l, V, O, z, -E, -v, 2), W = 1) : (a._copyTile(B, r, l, V, O, z, -E, -v, 0), W = 0), B = V, k = new Uint32Array(B.buffer);
2087
2087
  }
2088
2088
  var Q = 4 * O;
2089
- if (M <= 256 && d == !1) {
2089
+ if (L <= 256 && d == !1) {
2090
2090
  Q = Math.ceil(f * O / 8);
2091
2091
  for (var V = new Uint8Array(Q * z), ae = 0; ae < z; ae++) {
2092
2092
  var x = ae * Q, Me = ae * O;
@@ -2177,8 +2177,8 @@ function Qs() {
2177
2177
  return ne.bst.N - U.bst.N;
2178
2178
  });
2179
2179
  for (var R = 0; R < s.length; R++) {
2180
- for (var M = a.quantize.planeDst, S = new Uint8Array(s[R].buffer), B = new Uint32Array(s[R].buffer), k = S.length, d = 0; d < k; d += 4) {
2181
- for (var E = S[d] * 0.00392156862745098, v = S[d + 1] * (1 / 255), O = S[d + 2] * (1 / 255), z = S[d + 3] * (1 / 255), W = m; W.left; ) W = M(W.est, E, v, O, z) <= 0 ? W.left : W.right;
2180
+ for (var L = a.quantize.planeDst, S = new Uint8Array(s[R].buffer), B = new Uint32Array(s[R].buffer), k = S.length, d = 0; d < k; d += 4) {
2181
+ for (var E = S[d] * 0.00392156862745098, v = S[d + 1] * (1 / 255), O = S[d + 2] * (1 / 255), z = S[d + 3] * (1 / 255), W = m; W.left; ) W = L(W.est, E, v, O, z) <= 0 ? W.left : W.right;
2182
2182
  B[d >> 2] = W.est.rgba;
2183
2183
  }
2184
2184
  s[R] = B.buffer;
@@ -2278,7 +2278,7 @@ function Qs() {
2278
2278
  })();
2279
2279
  })(da);
2280
2280
  var js = da.exports;
2281
- const el = /* @__PURE__ */ fa(js), tl = Hs, Hp = { batchUpdate: tl }, It = (e) => new F(
2281
+ const el = /* @__PURE__ */ fa(js), tl = Hs, Vp = { batchUpdate: tl }, It = (e) => new F(
2282
2282
  1 / (e && e.scalePlane ? e.scalePlane : 1) * Math.min(
2283
2283
  e && e.scalePlane ? e.scalePlane : 1,
2284
2284
  e && e.scaleDepth ? e.scaleDepth : 1
@@ -2295,7 +2295,7 @@ const el = /* @__PURE__ */ fa(js), tl = Hs, Hp = { batchUpdate: tl }, It = (e) =
2295
2295
  1 / (e.scalePlane ? e.scalePlane : 1),
2296
2296
  1 / (e.scaleDepth ? e.scaleDepth : 1),
2297
2297
  1 / (e.scalePlane ? e.scalePlane : 1)
2298
- ) : F.One(), Vp = (e) => {
2298
+ ) : F.One(), Zp = (e) => {
2299
2299
  if (e instanceof er) {
2300
2300
  const t = e.alpha;
2301
2301
  return (t > 0 ? t : Math.PI - t) / Math.PI * 180 % 360;
@@ -2356,7 +2356,7 @@ const ir = un({
2356
2356
  } = e, r = Ee(), l = Os(), [s, c] = $.useState(void 0), d = $.useRef({}), [u, f] = $.useState({}), g = $.useRef(0), p = $.useRef(0), _ = $.useRef(/* @__PURE__ */ new Set()), y = $.useRef(/* @__PURE__ */ new Map()), m = $.useRef({
2357
2357
  lastReportedLoaded: -1,
2358
2358
  lastReportedTotal: -1
2359
- }), [, x] = $.useState(0), P = $.useRef(null), b = $.useRef(null), A = $.useRef(!1), I = $.useRef(null), C = $.useRef([]), T = $.useRef(null), R = $.useRef(0), M = $.useRef(/* @__PURE__ */ new WeakMap()), S = $.useRef(1), B = $.useRef(
2359
+ }), [, x] = $.useState(0), P = $.useRef(null), b = $.useRef(null), A = $.useRef(!1), I = $.useRef(null), C = $.useRef([]), T = $.useRef(null), R = $.useRef(0), L = $.useRef(/* @__PURE__ */ new WeakMap()), S = $.useRef(1), B = $.useRef(
2360
2360
  /* @__PURE__ */ new Map()
2361
2361
  ), k = $.useRef(0), E = $.useRef({
2362
2362
  isDown: !1,
@@ -2425,11 +2425,11 @@ const ir = un({
2425
2425
  const te = (xe = b.current) == null ? void 0 : xe._pickingTexture;
2426
2426
  P.current !== (te != null ? te : null) && (P.current = te != null ? te : null, x((fe) => fe + 1));
2427
2427
  }, []), U = $.useCallback((te) => {
2428
- const xe = M.current.get(te);
2428
+ const xe = L.current.get(te);
2429
2429
  if (xe)
2430
2430
  return xe;
2431
2431
  const fe = S.current++;
2432
- return M.current.set(te, fe), fe;
2432
+ return L.current.set(te, fe), fe;
2433
2433
  }, []), ne = $.useCallback(() => {
2434
2434
  const te = [], xe = /* @__PURE__ */ new Set();
2435
2435
  if (!r)
@@ -2720,9 +2720,9 @@ const vo = ({
2720
2720
  assetType: n = 0
2721
2721
  /* BINARY */
2722
2722
  }) => {
2723
- var A, I, C, T, R, M;
2723
+ var A, I, C, T, R, L;
2724
2724
  const a = Ee(), { onPreFetch: i } = Qe(ir), o = Qe(ar), r = Pe(0), l = Pe(0), s = Pe(/* @__PURE__ */ new Set()), c = Pe(/* @__PURE__ */ new Map()), [d, u] = ye(void 0), f = (A = o == null ? void 0 : o.cache) != null ? A : {}, g = (I = o == null ? void 0 : o.setCache) != null ? I : () => {
2725
- }, p = (C = o == null ? void 0 : o.loadedCount) != null ? C : l, _ = (T = o == null ? void 0 : o.totalCount) != null ? T : r, y = (R = o == null ? void 0 : o.pending) != null ? R : s, m = (M = o == null ? void 0 : o.inflight) != null ? M : c, x = et(async (S) => {
2725
+ }, p = (C = o == null ? void 0 : o.loadedCount) != null ? C : l, _ = (T = o == null ? void 0 : o.totalCount) != null ? T : r, y = (R = o == null ? void 0 : o.pending) != null ? R : s, m = (L = o == null ? void 0 : o.inflight) != null ? L : c, x = et(async (S) => {
2726
2726
  let B = 1, k;
2727
2727
  for (; B >= 0; )
2728
2728
  try {
@@ -2929,7 +2929,7 @@ const vo = ({
2929
2929
  }, 1e3);
2930
2930
  return () => clearInterval(C);
2931
2931
  }, [x]), /* @__PURE__ */ N(ge, {});
2932
- }, Zp = ({ url: e, cacheType: t, assetType: n = Pa.BINARY }) => (vo({ url: e, cacheType: t, assetType: n }), /* @__PURE__ */ N(ge, {}));
2932
+ }, Gp = ({ url: e, cacheType: t, assetType: n = Pa.BINARY }) => (vo({ url: e, cacheType: t, assetType: n }), /* @__PURE__ */ N(ge, {}));
2933
2933
  class cl {
2934
2934
  constructor(t) {
2935
2935
  // 数据帧
@@ -3762,7 +3762,7 @@ function yl() {
3762
3762
  if (E >= x) return S;
3763
3763
  } else {
3764
3764
  if (E <= -P) return B;
3765
- if (E + 1 >= P) return M;
3765
+ if (E + 1 >= P) return L;
3766
3766
  }
3767
3767
  return E < 0 ? d(-E, v).neg() : u(
3768
3768
  E % m | 0,
@@ -3814,8 +3814,8 @@ function yl() {
3814
3814
  i.UONE = T;
3815
3815
  var R = c(-1);
3816
3816
  i.NEG_ONE = R;
3817
- var M = u(-1, 2147483647, !1);
3818
- i.MAX_VALUE = M;
3817
+ var L = u(-1, 2147483647, !1);
3818
+ i.MAX_VALUE = L;
3819
3819
  var S = u(-1, -1, !0);
3820
3820
  i.MAX_UNSIGNED_VALUE = S;
3821
3821
  var B = u(0, -2147483648, !1);
@@ -6322,12 +6322,12 @@ function Hl(e) {
6322
6322
  return zo = i, $o = i * (t - 1) * n, Wo = i * (t + 1) * n, Uo = -i * a, io = 2 * n, ao = -a, _i = (zo + $o) / (1 - io - ao), Pi = (Wo + Uo) / (1 - io - ao), new Float32Array([zo, $o, Wo, Uo, io, ao, _i, Pi]);
6323
6323
  }
6324
6324
  function bi(e, t, n, a, i, o) {
6325
- var r, l, s, c, d, u, f, g, p, _, y, m, x, P, b, A, I, C, T, R, M, S, B, k, E, v, O, z, W, U;
6325
+ var r, l, s, c, d, u, f, g, p, _, y, m, x, P, b, A, I, C, T, R, L, S, B, k, E, v, O, z, W, U;
6326
6326
  for (E = 0; E < o; E++) {
6327
- for (S = E * i, B = E, k = 0, r = e[S], l = r & 255, s = r >> 8 & 255, c = r >> 16 & 255, d = r >> 24 & 255, C = l * a[6], T = s * a[6], R = c * a[6], M = d * a[6], P = C, b = T, A = R, I = M, O = a[0], z = a[1], W = a[4], U = a[5], v = 0; v < i; v++)
6328
- r = e[S], u = r & 255, f = r >> 8 & 255, g = r >> 16 & 255, p = r >> 24 & 255, _ = u * O + l * z + P * W + C * U, y = f * O + s * z + b * W + T * U, m = g * O + c * z + A * W + R * U, x = p * O + d * z + I * W + M * U, C = P, T = b, R = A, M = I, P = _, b = y, A = m, I = x, l = u, s = f, c = g, d = p, n[k] = P, n[k + 1] = b, n[k + 2] = A, n[k + 3] = I, k += 4, S++;
6329
- for (S--, k -= 4, B += o * (i - 1), r = e[S], l = r & 255, s = r >> 8 & 255, c = r >> 16 & 255, d = r >> 24 & 255, C = l * a[7], T = s * a[7], R = c * a[7], M = d * a[7], P = C, b = T, A = R, I = M, u = l, f = s, g = c, p = d, O = a[2], z = a[3], v = i - 1; v >= 0; v--)
6330
- _ = u * O + l * z + P * W + C * U, y = f * O + s * z + b * W + T * U, m = g * O + c * z + A * W + R * U, x = p * O + d * z + I * W + M * U, C = P, T = b, R = A, M = I, P = _, b = y, A = m, I = x, l = u, s = f, c = g, d = p, r = e[S], u = r & 255, f = r >> 8 & 255, g = r >> 16 & 255, p = r >> 24 & 255, r = (n[k] + P << 0) + (n[k + 1] + b << 8) + (n[k + 2] + A << 16) + (n[k + 3] + I << 24), t[B] = r, S--, k -= 4, B -= o;
6327
+ for (S = E * i, B = E, k = 0, r = e[S], l = r & 255, s = r >> 8 & 255, c = r >> 16 & 255, d = r >> 24 & 255, C = l * a[6], T = s * a[6], R = c * a[6], L = d * a[6], P = C, b = T, A = R, I = L, O = a[0], z = a[1], W = a[4], U = a[5], v = 0; v < i; v++)
6328
+ r = e[S], u = r & 255, f = r >> 8 & 255, g = r >> 16 & 255, p = r >> 24 & 255, _ = u * O + l * z + P * W + C * U, y = f * O + s * z + b * W + T * U, m = g * O + c * z + A * W + R * U, x = p * O + d * z + I * W + L * U, C = P, T = b, R = A, L = I, P = _, b = y, A = m, I = x, l = u, s = f, c = g, d = p, n[k] = P, n[k + 1] = b, n[k + 2] = A, n[k + 3] = I, k += 4, S++;
6329
+ for (S--, k -= 4, B += o * (i - 1), r = e[S], l = r & 255, s = r >> 8 & 255, c = r >> 16 & 255, d = r >> 24 & 255, C = l * a[7], T = s * a[7], R = c * a[7], L = d * a[7], P = C, b = T, A = R, I = L, u = l, f = s, g = c, p = d, O = a[2], z = a[3], v = i - 1; v >= 0; v--)
6330
+ _ = u * O + l * z + P * W + C * U, y = f * O + s * z + b * W + T * U, m = g * O + c * z + A * W + R * U, x = p * O + d * z + I * W + L * U, C = P, T = b, R = A, L = I, P = _, b = y, A = m, I = x, l = u, s = f, c = g, d = p, r = e[S], u = r & 255, f = r >> 8 & 255, g = r >> 16 & 255, p = r >> 24 & 255, r = (n[k] + P << 0) + (n[k + 1] + b << 8) + (n[k + 2] + A << 16) + (n[k + 3] + I << 24), t[B] = r, S--, k -= 4, B -= o;
6331
6331
  }
6332
6332
  }
6333
6333
  function Vl(e, t, n, a) {
@@ -7141,20 +7141,20 @@ void main(void) {
7141
7141
  }, [o, r, l, s]), ue(() => {
7142
7142
  const C = i.current;
7143
7143
  t && o && C && a((T) => {
7144
- let R = (o.maximum.x - o.minimum.x) / s, M = (o.maximum.z - o.minimum.z) / s, S = 0;
7145
- if (R < M) {
7144
+ let R = (o.maximum.x - o.minimum.x) / s, L = (o.maximum.z - o.minimum.z) / s, S = 0;
7145
+ if (R < L) {
7146
7146
  const E = R;
7147
- R = M, M = E, S = 1;
7147
+ R = L, L = E, S = 1;
7148
7148
  }
7149
- const B = R / M;
7150
- R * M > 2048 * 2048 && (R = 2048, M = 2048 / B);
7149
+ const B = R / L;
7150
+ R * L > 2048 * 2048 && (R = 2048, L = 2048 / B);
7151
7151
  let k;
7152
- return T ? (T.scaleTo(R, M), T.update(), k = T) : k = new Cn(
7152
+ return T ? (T.scaleTo(R, L), T.update(), k = T) : k = new Cn(
7153
7153
  "dynamic-texture",
7154
- { width: R, height: M },
7154
+ { width: R, height: L },
7155
7155
  t,
7156
7156
  !1
7157
- ), k.clear(), k.update(), console.log("[Geo3DViewer] 设置动态划线 ", o, R, M, s), C.setVector3("oMin", o.minimum), C.setVector3("oMax", o.maximum), C.setFloat("textureOverlayRotate", S), C.setTexture("textureOverlaySampler", k), k;
7157
+ ), k.clear(), k.update(), console.log("[Geo3DViewer] 设置动态划线 ", o, R, L, s), C.setVector3("oMin", o.minimum), C.setVector3("oMax", o.maximum), C.setFloat("textureOverlayRotate", S), C.setTexture("textureOverlaySampler", k), k;
7158
7158
  });
7159
7159
  }, [o, s, t]), ue(() => {
7160
7160
  if (n && o && (u.length > 0 || f.length > 0)) {
@@ -7166,24 +7166,24 @@ void main(void) {
7166
7166
  }
7167
7167
  const R = C / T;
7168
7168
  C * T > 2048 * 2048 && (C = 2048, T = 2048 / R);
7169
- const M = n.getContext();
7169
+ const L = n.getContext();
7170
7170
  u.forEach((S) => {
7171
7171
  if (S.points.length < 2) return;
7172
- M.beginPath();
7172
+ L.beginPath();
7173
7173
  const B = S.offset ? S.offset : new tt(0, 0), k = 1 - S.points[0].x + B.x, E = 1 - S.points[0].y + B.y;
7174
- M.moveTo(k * C, E * T);
7174
+ L.moveTo(k * C, E * T);
7175
7175
  for (let v = 1; v < S.points.length; v++) {
7176
7176
  const O = S.offset ? S.offset : new tt(0, 0), z = 1 - S.points[v].x + O.x, W = 1 - S.points[v].y + O.y;
7177
- M.lineTo(z * C, W * T);
7177
+ L.lineTo(z * C, W * T);
7178
7178
  }
7179
- M.strokeStyle = `rgb(${S.color.r * 255}, ${S.color.g * 255}, ${S.color.b * 255})`, C * T > 2048 * 2048 ? M.lineWidth = S.width / R : M.lineWidth = S.width, M.stroke();
7179
+ L.strokeStyle = `rgb(${S.color.r * 255}, ${S.color.g * 255}, ${S.color.b * 255})`, C * T > 2048 * 2048 ? L.lineWidth = S.width / R : L.lineWidth = S.width, L.stroke();
7180
7180
  }), f.forEach((S) => {
7181
7181
  var v, O;
7182
- M.font = `${S.fontSize}px Arial`;
7182
+ L.font = `${S.fontSize}px Arial`;
7183
7183
  const B = (v = S.color) != null ? v : he.White(), k = S.offset ? S.offset : new tt(0, 0), E = (O = S.rotation) != null ? O : 0;
7184
- if (M.save(), M.translate((1 - S.position.x + k.x) * C, (1 - S.position.y + k.y) * T), M.rotate(E), S.clearArea) {
7185
- const z = M.measureText(S.text);
7186
- M.clearRect(
7184
+ if (L.save(), L.translate((1 - S.position.x + k.x) * C, (1 - S.position.y + k.y) * T), L.rotate(E), S.clearArea) {
7185
+ const z = L.measureText(S.text);
7186
+ L.clearRect(
7187
7187
  -z.width * 0.15,
7188
7188
  0.5 * S.fontSize * (1 - 0.3),
7189
7189
  z.width * 1.3,
@@ -7191,16 +7191,16 @@ void main(void) {
7191
7191
  );
7192
7192
  }
7193
7193
  if (S.background) {
7194
- M.fillStyle = `rgba(${S.background.r * 255}, ${S.background.g * 255}, ${S.background.b * 255})`;
7195
- const z = M.measureText(S.text);
7196
- M.fillRect(
7194
+ L.fillStyle = `rgba(${S.background.r * 255}, ${S.background.g * 255}, ${S.background.b * 255})`;
7195
+ const z = L.measureText(S.text);
7196
+ L.fillRect(
7197
7197
  -z.width * 0.05,
7198
7198
  0.5 * (S.fontSize * (0.5 - 0.1)),
7199
7199
  z.width * 1.1,
7200
7200
  -S.fontSize * 1.1
7201
7201
  );
7202
7202
  }
7203
- M.fillStyle = `rgb(${B.r * 255}, ${B.g * 255}, ${B.b * 255})`, M.fillText(S.text, 0, 0), M.restore();
7203
+ L.fillStyle = `rgb(${B.r * 255}, ${B.g * 255}, ${B.b * 255})`, L.fillText(S.text, 0, 0), L.restore();
7204
7204
  }), n.update();
7205
7205
  }
7206
7206
  }, [u, n, o, s, f]), /* @__PURE__ */ N(
@@ -13433,49 +13433,49 @@ const Hn = (e) => {
13433
13433
  }, [_, m, y, x, n]), $.useEffect(() => {
13434
13434
  t && n && x && o((T) => {
13435
13435
  T && T.dispose();
13436
- let R = (x.maximum.x - x.minimum.x) / y, M = (x.maximum.z - x.minimum.z) / y, S = 0;
13437
- if (R < M) {
13436
+ let R = (x.maximum.x - x.minimum.x) / y, L = (x.maximum.z - x.minimum.z) / y, S = 0;
13437
+ if (R < L) {
13438
13438
  const E = R;
13439
- R = M, M = E, S = 1;
13439
+ R = L, L = E, S = 1;
13440
13440
  }
13441
- const B = R / M;
13442
- R * M > 2048 * 2048 && (R = 2048, M = 2048 / B);
13441
+ const B = R / L;
13442
+ R * L > 2048 * 2048 && (R = 2048, L = 2048 / B);
13443
13443
  const k = new Cn(
13444
13444
  "dynamic-texture",
13445
- { width: R, height: M },
13445
+ { width: R, height: L },
13446
13446
  t,
13447
13447
  !1
13448
13448
  );
13449
- return k.clear(), console.log("[Geo3DViewer] 设置动态划线 ", x, R, M, y), n.setVector3("oMin", x.minimum), n.setVector3("oMax", x.maximum), n.setFloat("textureOverlayRotate", S), n.setTexture("textureOverlaySampler", k), k;
13449
+ return k.clear(), console.log("[Geo3DViewer] 设置动态划线 ", x, R, L, y), n.setVector3("oMin", x.minimum), n.setVector3("oMax", x.maximum), n.setFloat("textureOverlayRotate", S), n.setTexture("textureOverlaySampler", k), k;
13450
13450
  });
13451
13451
  }, [x, n, y, t]), $.useEffect(() => {
13452
13452
  var T;
13453
13453
  if (i && x)
13454
13454
  if ((T = i.getScene()) != null && T.getEngine()) {
13455
13455
  i.clear();
13456
- let R = (x.maximum.x - x.minimum.x) / y, M = (x.maximum.z - x.minimum.z) / y;
13457
- if (R < M) {
13456
+ let R = (x.maximum.x - x.minimum.x) / y, L = (x.maximum.z - x.minimum.z) / y;
13457
+ if (R < L) {
13458
13458
  const k = R;
13459
- R = M, M = k;
13459
+ R = L, L = k;
13460
13460
  }
13461
- const S = R / M;
13462
- R * M > 2048 * 2048 && (R = 2048, M = 2048 / S);
13461
+ const S = R / L;
13462
+ R * L > 2048 * 2048 && (R = 2048, L = 2048 / S);
13463
13463
  const B = i.getContext();
13464
13464
  P.forEach((k) => {
13465
13465
  if (k.points.length < 2) return;
13466
13466
  B.beginPath();
13467
13467
  const E = k.offset ? k.offset : new tt(0, 0), v = 1 - k.points[0].x + E.x, O = 1 - k.points[0].y + E.y;
13468
- B.moveTo(v * R, O * M);
13468
+ B.moveTo(v * R, O * L);
13469
13469
  for (let z = 1; z < k.points.length; z++) {
13470
13470
  const W = k.offset ? k.offset : new tt(0, 0), U = 1 - k.points[z].x + W.x, ne = 1 - k.points[z].y + W.y;
13471
- B.lineTo(U * R, ne * M);
13471
+ B.lineTo(U * R, ne * L);
13472
13472
  }
13473
- B.strokeStyle = `rgb(${k.color.r * 255}, ${k.color.g * 255}, ${k.color.b * 255})`, R * M > 2048 * 2048 ? B.lineWidth = k.width / S : B.lineWidth = k.width, B.stroke();
13473
+ B.strokeStyle = `rgb(${k.color.r * 255}, ${k.color.g * 255}, ${k.color.b * 255})`, R * L > 2048 * 2048 ? B.lineWidth = k.width / S : B.lineWidth = k.width, B.stroke();
13474
13474
  }), b.forEach((k) => {
13475
13475
  var z, W;
13476
13476
  B.font = `${k.fontSize}px Arial`;
13477
13477
  const E = (z = k.color) != null ? z : he.White(), v = k.offset ? k.offset : new tt(0, 0), O = (W = k.rotation) != null ? W : 0;
13478
- if (B.save(), B.translate((1 - k.position.x + v.x) * R, (1 - k.position.y + v.y) * M), B.rotate(O), k.clearArea) {
13478
+ if (B.save(), B.translate((1 - k.position.x + v.x) * R, (1 - k.position.y + v.y) * L), B.rotate(O), k.clearArea) {
13479
13479
  const U = B.measureText(k.text);
13480
13480
  B.clearRect(
13481
13481
  -U.width * 0.15,
@@ -13588,10 +13588,10 @@ const Hn = (e) => {
13588
13588
  if (C) {
13589
13589
  const R = C.getBlockByName(
13590
13590
  "contourLineStartHeight"
13591
- ), M = C.getBlockByName("contourLineColor"), S = C.getBlockByName("contourLineWidth"), B = C.getBlockByName("contourLineStep");
13591
+ ), L = C.getBlockByName("contourLineColor"), S = C.getBlockByName("contourLineWidth"), B = C.getBlockByName("contourLineStep");
13592
13592
  if (y && P) {
13593
13593
  const k = (T = y.startHeight) != null ? T : P.centerWorld.y / x;
13594
- return R && (R.value = k * x), M && (M.value = y.color), S && (S.value = y.width), B && (B.value = y.stepHeight * x), console.log(
13594
+ return R && (R.value = k * x), L && (L.value = y.color), S && (S.value = y.width), B && (B.value = y.stepHeight * x), console.log(
13595
13595
  "[Geo3DViewer] 等高线设置 ",
13596
13596
  y,
13597
13597
  P.centerWorld,
@@ -13599,20 +13599,20 @@ const Hn = (e) => {
13599
13599
  k * x,
13600
13600
  k * x + 16 * y.stepHeight * x
13601
13601
  ), () => {
13602
- C && (R && (R.value = 0), M && (M.value = new he(0, 0, 0)), S && (S.value = 0), B && (B.value = 0));
13602
+ C && (R && (R.value = 0), L && (L.value = new he(0, 0, 0)), S && (S.value = 0), B && (B.value = 0));
13603
13603
  };
13604
13604
  } else
13605
- R && (R.value = 0), M && (M.value = new he(0, 0, 0)), S && (S.value = 0), B && (B.value = 0), console.log("[Geo3DViewer] 等高线设置 关闭");
13605
+ R && (R.value = 0), L && (L.value = new he(0, 0, 0)), S && (S.value = 0), B && (B.value = 0), console.log("[Geo3DViewer] 等高线设置 关闭");
13606
13606
  C.markAsDirty(Xn.MiscDirtyFlag);
13607
13607
  }
13608
13608
  }, [y, x, m, P]), $.useEffect(() => {
13609
13609
  t && P && o((C) => {
13610
13610
  var v, O;
13611
13611
  C && C.dispose();
13612
- let T = (P.maximum.x - P.minimum.x) / m, R = (P.maximum.z - P.minimum.z) / m, M = 0;
13612
+ let T = (P.maximum.x - P.minimum.x) / m, R = (P.maximum.z - P.minimum.z) / m, L = 0;
13613
13613
  if (T < R) {
13614
13614
  const z = T;
13615
- T = R, R = z, M = 1;
13615
+ T = R, R = z, L = 1;
13616
13616
  }
13617
13617
  const S = T / R;
13618
13618
  T * R > 2048 * 2048 && (T = 2048, R = 2048 / S);
@@ -13626,7 +13626,7 @@ const Hn = (e) => {
13626
13626
  const k = (v = n.current) == null ? void 0 : v.getBlockByName("angle"), E = (O = n.current) == null ? void 0 : O.getBlockByName(
13627
13627
  "OverlayTexture"
13628
13628
  );
13629
- return k && (k.value = M * (Math.PI / 2)), E && (E.texture = B), B;
13629
+ return k && (k.value = L * (Math.PI / 2)), E && (E.texture = B), B;
13630
13630
  });
13631
13631
  }, [P, m, t]), $.useEffect(() => {
13632
13632
  var C;
@@ -13638,8 +13638,8 @@ const Hn = (e) => {
13638
13638
  const B = T;
13639
13639
  T = R, R = B;
13640
13640
  }
13641
- const M = T / R;
13642
- T * R > 2048 * 2048 && (T = 2048, R = 2048 / M);
13641
+ const L = T / R;
13642
+ T * R > 2048 * 2048 && (T = 2048, R = 2048 / L);
13643
13643
  const S = i.getContext();
13644
13644
  b.forEach((B) => {
13645
13645
  if (B.points.length < 2) return;
@@ -13650,7 +13650,7 @@ const Hn = (e) => {
13650
13650
  const z = B.offset ? B.offset : new tt(0, 0), W = 1 - B.points[O].x + z.x, U = 1 - B.points[O].y + z.y;
13651
13651
  S.lineTo(W * T, U * R);
13652
13652
  }
13653
- S.strokeStyle = `rgb(${B.color.r * 255}, ${B.color.g * 255}, ${B.color.b * 255})`, T * R > 2048 * 2048 ? S.lineWidth = B.width / M : S.lineWidth = B.width, S.stroke();
13653
+ S.strokeStyle = `rgb(${B.color.r * 255}, ${B.color.g * 255}, ${B.color.b * 255})`, T * R > 2048 * 2048 ? S.lineWidth = B.width / L : S.lineWidth = B.width, S.stroke();
13654
13654
  }), A.forEach((B) => {
13655
13655
  var O, z;
13656
13656
  S.font = `${B.fontSize}px Arial`;
@@ -13702,7 +13702,7 @@ const Hn = (e) => {
13702
13702
  cutNormal: C,
13703
13703
  value: T,
13704
13704
  zOffset: R,
13705
- zOffsetUnits: M,
13705
+ zOffsetUnits: L,
13706
13706
  counterLine: S = void 0,
13707
13707
  scaleDepth: B = 1,
13708
13708
  scalePlane: k = 1,
@@ -13872,7 +13872,7 @@ const Hn = (e) => {
13872
13872
  },
13873
13873
  disableDepthWrite: O,
13874
13874
  zOffset: R,
13875
- zOffsetUnits: M
13875
+ zOffsetUnits: L
13876
13876
  }
13877
13877
  );
13878
13878
  }, nf = (e) => {
@@ -13883,7 +13883,7 @@ const Hn = (e) => {
13883
13883
  alphaStage: C,
13884
13884
  cutNormal: T,
13885
13885
  value: R,
13886
- tilingFactor: M = 0.1,
13886
+ tilingFactor: L = 0.1,
13887
13887
  sideTilingFactor: S = 0.1,
13888
13888
  mode: B = 0,
13889
13889
  zOffset: k,
@@ -13933,8 +13933,8 @@ const Hn = (e) => {
13933
13933
  }, [t, C, n]), $.useEffect(() => {
13934
13934
  n && A && n.setTexture("textureSampler", A);
13935
13935
  }, [n, A]), $.useEffect(() => {
13936
- n && M && n.setFloat("tilingFactor", M), n && S && n.setFloat("sideTilingFactor", S);
13937
- }, [M, S, n]), $.useEffect(() => {
13936
+ n && L && n.setFloat("tilingFactor", L), n && S && n.setFloat("sideTilingFactor", S);
13937
+ }, [L, S, n]), $.useEffect(() => {
13938
13938
  n && B && n.setInt("mode", B);
13939
13939
  }, [n, B]), $.useEffect(() => {
13940
13940
  n && (I ? n.setTexture("textureSideSampler", I) : n.setTexture("textureSideSampler", A));
@@ -14086,7 +14086,7 @@ const Hn = (e) => {
14086
14086
  disableDepthWrite: ee
14087
14087
  }
14088
14088
  );
14089
- }, Gp = (e) => /* @__PURE__ */ N(
14089
+ }, Yp = (e) => /* @__PURE__ */ N(
14090
14090
  kt,
14091
14091
  {
14092
14092
  ...e,
@@ -14299,15 +14299,15 @@ const Hn = (e) => {
14299
14299
  A.beginPath();
14300
14300
  const C = I.offset ? I.offset : new tt(0, 0), T = 1 - I.points[0].x + C.x, R = 1 - I.points[0].y + C.y;
14301
14301
  A.moveTo(T * x, R * P);
14302
- for (let M = 1; M < I.points.length; M++) {
14303
- const S = I.offset ? I.offset : new tt(0, 0), B = 1 - I.points[M].x + S.x, k = 1 - I.points[M].y + S.y;
14302
+ for (let L = 1; L < I.points.length; L++) {
14303
+ const S = I.offset ? I.offset : new tt(0, 0), B = 1 - I.points[L].x + S.x, k = 1 - I.points[L].y + S.y;
14304
14304
  A.lineTo(B * x, k * P);
14305
14305
  }
14306
14306
  A.strokeStyle = `rgb(${I.color.r * 255}, ${I.color.g * 255}, ${I.color.b * 255})`, x * P > 2048 * 2048 ? A.lineWidth = I.width / b : A.lineWidth = I.width, A.stroke();
14307
14307
  }), f.forEach((I) => {
14308
- var M, S;
14308
+ var L, S;
14309
14309
  A.font = `${I.fontSize}px Arial`;
14310
- const C = (M = I.color) != null ? M : he.White(), T = I.offset ? I.offset : new tt(0, 0), R = (S = I.rotation) != null ? S : 0;
14310
+ const C = (L = I.color) != null ? L : he.White(), T = I.offset ? I.offset : new tt(0, 0), R = (S = I.rotation) != null ? S : 0;
14311
14311
  if (A.save(), A.translate((1 - I.position.x + T.x) * x, (1 - I.position.y + T.y) * P), A.rotate(R), I.clearArea) {
14312
14312
  const B = A.measureText(I.text);
14313
14313
  A.clearRect(
@@ -14402,8 +14402,8 @@ const Hn = (e) => {
14402
14402
  const T = s.current;
14403
14403
  T && (I.applyToMesh(T), T.getScene().onAfterRenderObservable.addOnce(() => {
14404
14404
  if (!T.isDisposed()) {
14405
- const M = T.getBoundingInfo();
14406
- y(M.boundingBox);
14405
+ const L = T.getBoundingInfo();
14406
+ y(L.boundingBox);
14407
14407
  }
14408
14408
  })), He.RemoveTagsFrom(s.current, "loading");
14409
14409
  }
@@ -14866,7 +14866,7 @@ const lt = (e) => {
14866
14866
  $.useEffect(() => {
14867
14867
  console.log("[Geo3DViewer] FormationFace Loading: ", e, t);
14868
14868
  }, [e, t]);
14869
- const [C, T] = $.useState(), [R, M] = $.useState(F.Zero()), [S, B] = $.useState(void 0);
14869
+ const [C, T] = $.useState(), [R, L] = $.useState(F.Zero()), [S, B] = $.useState(void 0);
14870
14870
  return $.useEffect(() => {
14871
14871
  if (P) {
14872
14872
  const v = c.current;
@@ -14875,7 +14875,7 @@ const lt = (e) => {
14875
14875
  const U = an.decode(new Uint8Array(P));
14876
14876
  {
14877
14877
  const { name: G, points: le, indices: re, colorId: oe, value: Y, center: ce } = U;
14878
- O = le, z = re, W = Y, p(oe), f(G), ce && M(new F(ce.x, ce.y, ce.z));
14878
+ O = le, z = re, W = Y, p(oe), f(G), ce && L(new F(ce.x, ce.y, ce.z));
14879
14879
  }
14880
14880
  const ne = new Je();
14881
14881
  ne.positions = O, ne.indices = z, ne.colors = W;
@@ -15248,7 +15248,7 @@ const lt = (e) => {
15248
15248
  }), T = ot({
15249
15249
  url: l == null ? void 0 : l.sideTexture,
15250
15250
  cacheType: $e.URL_PREFIX_MATCH
15251
- }), [R, M] = $.useState(void 0);
15251
+ }), [R, L] = $.useState(void 0);
15252
15252
  return $.useEffect(() => {
15253
15253
  console.log("[Geo3DViewer] FormationVolume Loading: ", e);
15254
15254
  }, [e]), $.useEffect(() => {
@@ -15269,14 +15269,14 @@ const lt = (e) => {
15269
15269
  A(te.boundingBox.center.add(new F(te.boundingBox.extendSize.x, 0, 0))), o || k.getScene().onAfterRenderObservable.addOnce(() => {
15270
15270
  if (!k.isDisposed()) {
15271
15271
  const fe = k.getBoundingInfo();
15272
- M(fe.boundingBox);
15272
+ L(fe.boundingBox);
15273
15273
  }
15274
15274
  });
15275
15275
  }
15276
15276
  return E && (Se.applyToMesh(E), o && E.getScene().onAfterRenderObservable.addOnce(() => {
15277
15277
  if (!E.isDisposed()) {
15278
15278
  const xe = E.getBoundingInfo();
15279
- M(xe.boundingBox);
15279
+ L(xe.boundingBox);
15280
15280
  }
15281
15281
  })), He.RemoveTagsFrom(k, "loading"), He.RemoveTagsFrom(c, "loading"), () => {
15282
15282
  k && new Je().applyToMesh(k), E && new Je().applyToMesh(E);
@@ -15731,12 +15731,12 @@ const Wa = ({
15731
15731
  if (P) {
15732
15732
  const T = d.current;
15733
15733
  He.EnableFor(T), He.AddTagsTo(T, "loading");
15734
- const R = an.decode(new Uint8Array(P)), { name: M, points: S, indices: B, value: k, colorId: E, center: v } = R;
15734
+ const R = an.decode(new Uint8Array(P)), { name: L, points: S, indices: B, value: k, colorId: E, center: v } = R;
15735
15735
  v && A(new F(v.x, v.y, v.z));
15736
15736
  const O = new Je();
15737
15737
  O.positions = S, O.indices = B, O.colors = k;
15738
15738
  const z = [];
15739
- return Je.ComputeNormals(S, B, z), O.normals = z, y(E), f(M), T && (O.applyToMesh(T), T.getScene().onAfterRenderObservable.addOnce(() => {
15739
+ return Je.ComputeNormals(S, B, z), O.normals = z, y(E), f(L), T && (O.applyToMesh(T), T.getScene().onAfterRenderObservable.addOnce(() => {
15740
15740
  if (!T.isDisposed()) {
15741
15741
  const U = T.getBoundingInfo();
15742
15742
  C(U.boundingBox);
@@ -15895,7 +15895,7 @@ const Wa = ({
15895
15895
  visibleEdgeEffect: m = !1
15896
15896
  }) => {
15897
15897
  var B, k;
15898
- const [x, P] = $.useState(), b = $.useContext(We), [A, I] = $.useState(!0), [C, T] = $.useState(""), R = pt({ url: e, cacheType: $e.URL_PREFIX_MATCH }), [M, S] = ye([]);
15898
+ const [x, P] = $.useState(), b = $.useContext(We), [A, I] = $.useState(!0), [C, T] = $.useState(""), R = pt({ url: e, cacheType: $e.URL_PREFIX_MATCH }), [L, S] = ye([]);
15899
15899
  return $.useEffect(() => {
15900
15900
  console.log("[Geo3DViewer] ComplexFormationManager Loading: ", e);
15901
15901
  }, [e]), $.useEffect(() => {
@@ -16002,7 +16002,7 @@ const Wa = ({
16002
16002
  },
16003
16003
  `${C}-${E.name}`
16004
16004
  )) : null,
16005
- M && p && y && a === 0 && M.map((E, v) => /* @__PURE__ */ N(
16005
+ L && p && y && a === 0 && L.map((E, v) => /* @__PURE__ */ N(
16006
16006
  vf,
16007
16007
  {
16008
16008
  visible: m,
@@ -16056,10 +16056,10 @@ const Wa = ({
16056
16056
  };
16057
16057
  }, [i, r, o, d, e]), $.useEffect(() => {
16058
16058
  if (f && f.min && f.max && c) {
16059
- const I = f.origin || F.Zero(), C = [], T = [], R = [], M = [...o];
16060
- M.length === 0 && M.push(a);
16061
- for (let S = 0; S < M.length; S++) {
16062
- let B = M[S] / 1;
16059
+ const I = f.origin || F.Zero(), C = [], T = [], R = [], L = [...o];
16060
+ L.length === 0 && L.push(a);
16061
+ for (let S = 0; S < L.length; S++) {
16062
+ let B = L[S] / 1;
16063
16063
  B < 1 && (B = 200);
16064
16064
  const k = [];
16065
16065
  for (let O = 0; O <= f.max.x - f.min.x; O += B)
@@ -16149,12 +16149,12 @@ const Wa = ({
16149
16149
  children: [
16150
16150
  g.map((I, C) => I.map((T, R) => {
16151
16151
  var S;
16152
- const M = T;
16152
+ const L = T;
16153
16153
  return /* @__PURE__ */ N(
16154
16154
  "transformNode",
16155
16155
  {
16156
16156
  name: `axis-x-${C}-${R}`,
16157
- position: M == null ? void 0 : M.position,
16157
+ position: L == null ? void 0 : L.position,
16158
16158
  setEnabled: C === P,
16159
16159
  scaling: new F(
16160
16160
  1 / De(f).x,
@@ -16164,7 +16164,7 @@ const Wa = ({
16164
16164
  children: /* @__PURE__ */ N(
16165
16165
  lt,
16166
16166
  {
16167
- text: `${M ? M.text : ""}`,
16167
+ text: `${L ? L.text : ""}`,
16168
16168
  fontSize: (S = r[C]) != null ? S : n,
16169
16169
  color: t.toHexString()
16170
16170
  }
@@ -16175,12 +16175,12 @@ const Wa = ({
16175
16175
  })),
16176
16176
  _.map((I, C) => I.map((T, R) => {
16177
16177
  var S;
16178
- const M = T;
16178
+ const L = T;
16179
16179
  return /* @__PURE__ */ N(
16180
16180
  "transformNode",
16181
16181
  {
16182
16182
  name: `axis-x-${C}-${R}`,
16183
- position: M == null ? void 0 : M.position,
16183
+ position: L == null ? void 0 : L.position,
16184
16184
  setEnabled: C === P,
16185
16185
  scaling: new F(
16186
16186
  1 / De(f).x,
@@ -16190,7 +16190,7 @@ const Wa = ({
16190
16190
  children: /* @__PURE__ */ N(
16191
16191
  lt,
16192
16192
  {
16193
- text: `${M ? M.text : ""}`,
16193
+ text: `${L ? L.text : ""}`,
16194
16194
  fontSize: (S = r[C]) != null ? S : n,
16195
16195
  color: t.toHexString()
16196
16196
  }
@@ -16201,12 +16201,12 @@ const Wa = ({
16201
16201
  })),
16202
16202
  m.map((I, C) => I.map((T, R) => {
16203
16203
  var S;
16204
- const M = T;
16204
+ const L = T;
16205
16205
  return /* @__PURE__ */ N(
16206
16206
  "transformNode",
16207
16207
  {
16208
16208
  name: `axis-x-${C}-${R}`,
16209
- position: M == null ? void 0 : M.position,
16209
+ position: L == null ? void 0 : L.position,
16210
16210
  setEnabled: C === P,
16211
16211
  scaling: new F(
16212
16212
  1 / De(f).x,
@@ -16216,7 +16216,7 @@ const Wa = ({
16216
16216
  children: /* @__PURE__ */ N(
16217
16217
  lt,
16218
16218
  {
16219
- text: `${M ? M.text : ""}`,
16219
+ text: `${L ? L.text : ""}`,
16220
16220
  fontSize: (S = r[C]) != null ? S : n,
16221
16221
  color: t.toHexString()
16222
16222
  }
@@ -16779,6 +16779,7 @@ const Va = ({
16779
16779
  name: `densityslice-${e}-${d}-${s}-mesh`,
16780
16780
  ref: l,
16781
16781
  setEnabled: n,
16782
+ useVertexColors: !0,
16782
16783
  children: /* @__PURE__ */ N(
16783
16784
  cn,
16784
16785
  {
@@ -17096,7 +17097,7 @@ const If = (e, t) => {
17096
17097
  edges: C = [],
17097
17098
  actions: T,
17098
17099
  actionName: R
17099
- } = e, M = ot({
17100
+ } = e, L = ot({
17100
17101
  url: y == null ? void 0 : y.texture,
17101
17102
  cacheType: $e.URL_PREFIX_MATCH
17102
17103
  }), S = ot({
@@ -17154,7 +17155,7 @@ const If = (e, t) => {
17154
17155
  scaling: De(o),
17155
17156
  ref: i,
17156
17157
  children: [
17157
- /* @__PURE__ */ N("mesh", { name: `${b}-mesh`, ref: a, children: y.type === Ke.TEXTURE ? M ? /* @__PURE__ */ N(
17158
+ /* @__PURE__ */ N("mesh", { name: `${b}-mesh`, ref: a, children: y.type === Ke.TEXTURE ? L ? /* @__PURE__ */ N(
17158
17159
  Hn,
17159
17160
  {
17160
17161
  name: `formationslice-${b}-mat`,
@@ -17164,7 +17165,7 @@ const If = (e, t) => {
17164
17165
  alphaMode: Fe.ALPHA_COMBINE,
17165
17166
  alpha: x,
17166
17167
  sideTexture: S,
17167
- texture: M,
17168
+ texture: L,
17168
17169
  tilingFactor: y.tilingFactor,
17169
17170
  sideTilingFactor: (v = y == null ? void 0 : y.sideTilingFactor) != null ? v : y == null ? void 0 : y.tilingFactor,
17170
17171
  mode: y.textureMode === void 0 ? yn.PLANE : y.textureMode,
@@ -17400,46 +17401,46 @@ const Af = ({
17400
17401
  farPlane: s = 1e4,
17401
17402
  skipPickingWhenCameraMoves: c = !1
17402
17403
  }) => {
17403
- const d = Ee(), u = $.useContext(We), [f, g] = $.useState(null), [p, _] = $.useState(null), [y, m] = $.useState(n), [x, P] = $.useState(a), [, b] = $.useState(null), A = $.useCallback((M) => {
17404
- _(M);
17404
+ const d = Ee(), u = $.useContext(We), [f, g] = $.useState(null), [p, _] = $.useState(null), [y, m] = $.useState(n), [x, P] = $.useState(a), [, b] = $.useState(null), A = $.useCallback((L) => {
17405
+ _(L);
17405
17406
  }, []), { setViewCamera: I } = $.useContext(rr), C = $.useCallback(() => {
17406
17407
  if (p && f) {
17407
- const M = new F();
17408
- M.addInPlace(p.position), M.addInPlace(p.getDirection(new F(0, 0, 25))), l == 4 ? (M.addInPlace(p.getDirection(new F(0, 7 + i.y, 0))), M.addInPlace(p.getDirection(new F(15 + i.x, 0, 0)))) : l == 3 ? (M.addInPlace(p.getDirection(new F(0, 7 + i.y, 0))), M.addInPlace(p.getDirection(new F(-15 + i.x, 0, 0)))) : l == 2 ? (M.addInPlace(p.getDirection(new F(0, -7 + i.y, 0))), M.addInPlace(p.getDirection(new F(15 + i.x, 0, 0)))) : l == 1 && (M.addInPlace(p.getDirection(new F(0, -7 + i.y, 0))), M.addInPlace(p.getDirection(new F(-15 + i.x, 0, 0)))), f.xAxis.position = M.clone(), f.yAxis.position = M.clone(), f.zAxis.position = M.clone();
17408
+ const L = new F();
17409
+ L.addInPlace(p.position), L.addInPlace(p.getDirection(new F(0, 0, 25))), l == 4 ? (L.addInPlace(p.getDirection(new F(0, 7 + i.y, 0))), L.addInPlace(p.getDirection(new F(15 + i.x, 0, 0)))) : l == 3 ? (L.addInPlace(p.getDirection(new F(0, 7 + i.y, 0))), L.addInPlace(p.getDirection(new F(-15 + i.x, 0, 0)))) : l == 2 ? (L.addInPlace(p.getDirection(new F(0, -7 + i.y, 0))), L.addInPlace(p.getDirection(new F(15 + i.x, 0, 0)))) : l == 1 && (L.addInPlace(p.getDirection(new F(0, -7 + i.y, 0))), L.addInPlace(p.getDirection(new F(-15 + i.x, 0, 0)))), f.xAxis.position = L.clone(), f.yAxis.position = L.clone(), f.zAxis.position = L.clone();
17409
17410
  }
17410
17411
  }, [p, f, l, i.y, i.x]);
17411
17412
  $.useEffect(() => {
17412
17413
  if (d && l != 0) {
17413
- const M = new oa(d, 2, null);
17414
- return g(M), () => {
17415
- M == null || M.dispose(), g(null);
17414
+ const L = new oa(d, 2, null);
17415
+ return g(L), () => {
17416
+ L == null || L.dispose(), g(null);
17416
17417
  };
17417
17418
  }
17418
17419
  }, [d, l]), $.useEffect(() => {
17419
17420
  C();
17420
17421
  }, [C]);
17421
17422
  const T = et(
17422
- (M) => {
17423
+ (L) => {
17423
17424
  if (u && u.min && u.max)
17424
- return F.Clamp(M, u == null ? void 0 : u.min, u == null ? void 0 : u.max);
17425
+ return F.Clamp(L, u == null ? void 0 : u.min, u == null ? void 0 : u.max);
17425
17426
  },
17426
17427
  [u]
17427
17428
  ), R = et(
17428
- (M) => {
17429
- d && (d.skipPointerMovePicking = M);
17429
+ (L) => {
17430
+ d && (d.skipPointerMovePicking = L);
17430
17431
  },
17431
17432
  [d]
17432
17433
  );
17433
17434
  return $.useEffect(() => {
17434
17435
  if (!d || !p)
17435
17436
  return;
17436
- const M = p.onViewMatrixChangedObservable.add(() => {
17437
+ const L = p.onViewMatrixChangedObservable.add(() => {
17437
17438
  c && (R(!0), b((S) => (S && clearTimeout(S), setTimeout(() => {
17438
17439
  R(!1), b(null);
17439
17440
  }, 250)))), m(p.alpha), P(p.beta), C();
17440
17441
  });
17441
17442
  return () => {
17442
- p.onViewMatrixChangedObservable.remove(M), b((S) => (S && clearTimeout(S), null)), R(!1);
17443
+ p.onViewMatrixChangedObservable.remove(L), b((S) => (S && clearTimeout(S), null)), R(!1);
17443
17444
  };
17444
17445
  }, [
17445
17446
  d,
@@ -17568,7 +17569,7 @@ const Af = ({
17568
17569
  o,
17569
17570
  I
17570
17571
  ]);
17571
- const [R, M] = ye();
17572
+ const [R, L] = ye();
17572
17573
  return ue(() => {
17573
17574
  if (g) {
17574
17575
  const S = {
@@ -17585,7 +17586,7 @@ const Af = ({
17585
17586
  g && (g.lockedTarget = null, b(B));
17586
17587
  }
17587
17588
  };
17588
- M(S), y && y.current && (y.current.rawCamera = g, y.current.cameraTools = S);
17589
+ L(S), y && y.current && (y.current.rawCamera = g, y.current.cameraTools = S);
17589
17590
  }
17590
17591
  }, [y, g]), mt(
17591
17592
  t,
@@ -17596,7 +17597,7 @@ const Af = ({
17596
17597
  }),
17597
17598
  [R, g]
17598
17599
  ), /* @__PURE__ */ N("universalCamera", { name: "universal-main-camera", position: n, ref: C, maxZ: 0 });
17599
- }, Yp = ht(Ef);
17600
+ }, Jp = ht(Ef);
17600
17601
  class Mf extends ms {
17601
17602
  constructor() {
17602
17603
  super(...arguments);
@@ -17979,7 +17980,7 @@ const Ga = un(void 0), Uf = (e, t = "BIN") => {
17979
17980
  return ue(() => {
17980
17981
  console.log(
17981
17982
  `
17982
- %c Geo3DViewer Library %c Version: 1.7.38 %c
17983
+ %c Geo3DViewer Library %c Version: 1.7.40 %c
17983
17984
  `,
17984
17985
  "color:#e0e0e0;background:#873e23;padding:5px 0;border-top-left-radius:5px;border-bottom-left-radius:5px;",
17985
17986
  "color:#455a64;background:#e0e0e0;padding:5px 0;",
@@ -18339,7 +18340,7 @@ const Gf = ({
18339
18340
  pickingBoxScale: u = F.One(),
18340
18341
  labelStyle: f
18341
18342
  }, g) => {
18342
- const p = Ee(), _ = ba({ url: t }), y = $.useRef(null), m = $.useRef(null), [x, P] = $.useState(null), [b, A] = $.useState(5), [I, C] = $.useState(5), [T, R] = $.useState(5), [M, S] = $.useState(F.Zero()), [B, k] = $.useState(F.One()), [E, v] = $.useState([]), O = $.useContext(We), { scaleWithParent: z = !0 } = f || {};
18343
+ const p = Ee(), _ = ba({ url: t }), y = $.useRef(null), m = $.useRef(null), [x, P] = $.useState(null), [b, A] = $.useState(5), [I, C] = $.useState(5), [T, R] = $.useState(5), [L, S] = $.useState(F.Zero()), [B, k] = $.useState(F.One()), [E, v] = $.useState([]), O = $.useContext(We), { scaleWithParent: z = !0 } = f || {};
18343
18344
  return $.useEffect(() => {
18344
18345
  console.log("[Geo3DViewer] ModelLoader Loading: ", t);
18345
18346
  }, [t]), mt(
@@ -18459,7 +18460,7 @@ const Gf = ({
18459
18460
  "transformNode",
18460
18461
  {
18461
18462
  name: `transform-model-label-${e}`,
18462
- position: M.add(
18463
+ position: L.add(
18463
18464
  f != null && f.offset ? f.offset.multiplyByFloats(
18464
18465
  O != null && O.scalePlane ? O == null ? void 0 : O.scalePlane : 1,
18465
18466
  1,
@@ -18484,7 +18485,7 @@ const Gf = ({
18484
18485
  ref: y,
18485
18486
  size: 1,
18486
18487
  scaling: new F(T, b, I).multiply(u),
18487
- position: M,
18488
+ position: L,
18488
18489
  rotation: B,
18489
18490
  setEnabled: d ? d.length === 0 : !0,
18490
18491
  children: /* @__PURE__ */ N("standardMaterial", { name: `pick-mesh-${e}-mat`, alpha: r ? 0.5 : 0 })
@@ -18587,7 +18588,7 @@ const Gf = ({
18587
18588
  angle: b = Math.PI / 2,
18588
18589
  radius: A = 4,
18589
18590
  fluidRender: I
18590
- } = e, C = Ee(), [T, R] = ye(), M = Pe(null);
18591
+ } = e, C = Ee(), [T, R] = ye(), L = Pe(null);
18591
18592
  return ue(() => {
18592
18593
  T && (T.blendMode = l, s && (T.color1 = s), c && (T.color2 = c), d && (T.colorDead = d), u !== void 0 && (T.minSize = u), f !== void 0 && (T.maxSize = f), g !== void 0 && (T.minLifeTime = g), p !== void 0 && (T.maxLifeTime = p), y !== void 0 && (T.minEmitPower = y), m !== void 0 && (T.maxEmitPower = m), x !== void 0 && (T.updateSpeed = x), T.preWarmCycles = 60 * 8, _ && (T.gravity = _), T.createConeEmitter(A, b), P && (T.particleTexture = new Wt(P), T.particleTexture.onLoadObservable.add(() => {
18593
18594
  T.start();
@@ -18619,7 +18620,7 @@ const Gf = ({
18619
18620
  R(S);
18620
18621
  }
18621
18622
  return () => {
18622
- console.log("particlesystem disposed!"), M.current && (M.current.object.particleSize = 0);
18623
+ console.log("particlesystem disposed!"), L.current && (L.current.object.particleSize = 0);
18623
18624
  };
18624
18625
  }, [t, o, T, C, a]), ue(() => {
18625
18626
  T && (C == null || C.executeWhenReady(() => {
@@ -18629,7 +18630,7 @@ const Gf = ({
18629
18630
  if (E) {
18630
18631
  E.addParticleSystem(T);
18631
18632
  const v = E.getRenderObjectFromParticleSystem(T);
18632
- M.current = v, v && (v.object.particleSize = (S = I == null ? void 0 : I.particleSize) != null ? S : 0.75, v.object.particleThicknessAlpha = 0.02, v.object.useTrueRenderingForDiffuseTexture = !0, v.targetRenderer.minimumThickness = v.object.particleThicknessAlpha, v.targetRenderer.blurDepthFilterSize = 10, v.targetRenderer.blurDepthDepthScale = 10, v.targetRenderer.thicknessMapSize = 1024, v.targetRenderer.density = (B = I == null ? void 0 : I.density) != null ? B : 8, v.targetRenderer.fresnelClamp = 0.04, v.targetRenderer.fluidColor = (k = I == null ? void 0 : I.fluidColor) != null ? k : new he(219 / 255, 228 / 255, 1), v.targetRenderer.generateDiffuseTexture = !1);
18633
+ L.current = v, v && (v.object.particleSize = (S = I == null ? void 0 : I.particleSize) != null ? S : 0.75, v.object.particleThicknessAlpha = 0.02, v.object.useTrueRenderingForDiffuseTexture = !0, v.targetRenderer.minimumThickness = v.object.particleThicknessAlpha, v.targetRenderer.blurDepthFilterSize = 10, v.targetRenderer.blurDepthDepthScale = 10, v.targetRenderer.thicknessMapSize = 1024, v.targetRenderer.density = (B = I == null ? void 0 : I.density) != null ? B : 8, v.targetRenderer.fresnelClamp = 0.04, v.targetRenderer.fluidColor = (k = I == null ? void 0 : I.fluidColor) != null ? k : new he(219 / 255, 228 / 255, 1), v.targetRenderer.generateDiffuseTexture = !1);
18633
18634
  }
18634
18635
  }
18635
18636
  }));
@@ -18664,11 +18665,11 @@ const Gf = ({
18664
18665
  if (u)
18665
18666
  return A((R) => {
18666
18667
  R == null || R.dispose();
18667
- const M = new Ps("video-texture", u, n, !1, !1, void 0, {
18668
+ const L = new Ps("video-texture", u, n, !1, !1, void 0, {
18668
18669
  autoPlay: !0,
18669
18670
  autoUpdateTexture: !0
18670
18671
  });
18671
- return M.hasAlpha = !0, M;
18672
+ return L.hasAlpha = !0, L;
18672
18673
  }), () => {
18673
18674
  A((R) => (R == null || R.dispose(), null));
18674
18675
  };
@@ -18676,8 +18677,8 @@ const Gf = ({
18676
18677
  if (f) {
18677
18678
  const R = new Cn("dyn-texture", f, n);
18678
18679
  return R.hasAlpha = !0, x.current = R, () => {
18679
- var M;
18680
- (M = x.current) == null || M.dispose();
18680
+ var L;
18681
+ (L = x.current) == null || L.dispose();
18681
18682
  };
18682
18683
  }
18683
18684
  }, [f]), ue(() => {
@@ -18687,8 +18688,8 @@ const Gf = ({
18687
18688
  () => x,
18688
18689
  [x]
18689
18690
  ), ue(() => {
18690
- var M;
18691
- const R = (M = P.current) == null ? void 0 : M.getChildMeshes()[0];
18691
+ var L;
18692
+ const R = (L = P.current) == null ? void 0 : L.getChildMeshes()[0];
18692
18693
  R && (R.metadata = {
18693
18694
  pickable: _ ? {
18694
18695
  name: i,
@@ -18840,7 +18841,7 @@ const id = ({
18840
18841
  const m = Ee(), x = $.useRef(null), P = $.useContext(We), b = pt({ url: t, cacheType: $e.URL_PREFIX_MATCH }), [A, I] = $.useState(F.Zero()), [C, T] = $.useState(void 0), R = ot({
18841
18842
  url: c == null ? void 0 : c.texture,
18842
18843
  cacheType: $e.URL_PREFIX_MATCH
18843
- }), M = ot({
18844
+ }), L = ot({
18844
18845
  url: c == null ? void 0 : c.sideTexture,
18845
18846
  cacheType: $e.URL_PREFIX_MATCH
18846
18847
  }), S = ot({
@@ -18995,7 +18996,7 @@ const id = ({
18995
18996
  transparencyMode: Ne.MATERIAL_ALPHABLEND,
18996
18997
  alphaMode: Fe.ALPHA_COMBINE,
18997
18998
  texture: R,
18998
- sideTexture: M,
18999
+ sideTexture: L,
18999
19000
  alphaStage: a,
19000
19001
  cutNormal: r,
19001
19002
  value: l,
@@ -19447,7 +19448,19 @@ void main(void) {
19447
19448
  ),
19448
19449
  x
19449
19450
  ] });
19450
- }, Jn = ht(pd), hd = (e) => {
19451
+ }, Jn = ht(pd);
19452
+ function hd(e, t) {
19453
+ if (typeof t == "string")
19454
+ return t === e;
19455
+ if (t.mode === "prefix")
19456
+ return e.startsWith(t.value);
19457
+ try {
19458
+ return new RegExp(t.value, t.flags).test(e);
19459
+ } catch (n) {
19460
+ return !1;
19461
+ }
19462
+ }
19463
+ const md = (e) => {
19451
19464
  const [t, n] = ye({
19452
19465
  top: {
19453
19466
  vertices: [],
@@ -19485,7 +19498,7 @@ void main(void) {
19485
19498
  return ue(() => {
19486
19499
  if (R && !r.current) {
19487
19500
  r.current = !0;
19488
- let M = [];
19501
+ let L = [];
19489
19502
  const S = Ra.decode(new Uint8Array(R));
19490
19503
  console.log(S), d(S.name);
19491
19504
  const { boxes: B } = S, k = [], E = [], v = [], O = [], z = [], W = [], U = [], ne = [], ee = [];
@@ -19501,7 +19514,7 @@ void main(void) {
19501
19514
  let V = 0;
19502
19515
  if (ae && ae.vertices && ae.indices && ae.colors && (U.push(...ae.vertices), ne.push(...ae.indices.map((me) => me + re)), ee.push(...ae.colors), V = Math.max(...ae.indices)), re += V + 1, Y.name) {
19503
19516
  const me = new F((Q = Y.startPosition) == null ? void 0 : Q.x, (Me = Y.startPosition) == null ? void 0 : Me.y, (Ae = Y.startPosition) == null ? void 0 : Ae.z), Le = new F((te = Y.endPosition) == null ? void 0 : te.x, (xe = Y.endPosition) == null ? void 0 : xe.y, (fe = Y.endPosition) == null ? void 0 : fe.z), Oe = me.add(Le).scale(0.5);
19504
- M.push({
19517
+ L.push({
19505
19518
  name: Y.name,
19506
19519
  position: Oe
19507
19520
  });
@@ -19522,7 +19535,7 @@ void main(void) {
19522
19535
  indices: ne,
19523
19536
  colors: ee
19524
19537
  }
19525
- }), o(oe), f(M), () => {
19538
+ }), o(oe), f(L), () => {
19526
19539
  r.current = !1, n({
19527
19540
  top: {
19528
19541
  vertices: [],
@@ -19543,7 +19556,7 @@ void main(void) {
19543
19556
  };
19544
19557
  }
19545
19558
  }, [R]), ue(() => {
19546
- const M = a == null ? void 0 : a.onPointerObservable.add(function(S) {
19559
+ const L = a == null ? void 0 : a.onPointerObservable.add(function(S) {
19547
19560
  if (P)
19548
19561
  switch (S.type) {
19549
19562
  case on.POINTERUP:
@@ -19556,12 +19569,18 @@ void main(void) {
19556
19569
  }
19557
19570
  });
19558
19571
  return () => {
19559
- a == null || a.onPointerObservable.remove(M);
19572
+ a == null || a.onPointerObservable.remove(L);
19560
19573
  };
19561
19574
  }, [x, g, c, P, a]), ue(() => {
19562
- u.forEach((M) => {
19563
- (A == null ? void 0 : A.nameList.length) > 0 && A.nameList.includes(M.name) && s((S) => [...S, { name: M.name, position: M.position }]);
19564
- });
19575
+ if (!(A != null && A.nameList.length)) {
19576
+ s([]);
19577
+ return;
19578
+ }
19579
+ s(
19580
+ u.filter(
19581
+ (L) => A.nameList.some((S) => hd(L.name, S))
19582
+ )
19583
+ );
19565
19584
  }, [A, u]), /* @__PURE__ */ Ve(ge, { children: [
19566
19585
  t.top.vertices.length > 0 && t.top.indices.length > 0 && /* @__PURE__ */ N(
19567
19586
  Jn,
@@ -19614,17 +19633,17 @@ void main(void) {
19614
19633
  children: m
19615
19634
  }
19616
19635
  ),
19617
- l.map((M, S) => /* @__PURE__ */ Ve("transformNode", { name: `roadway-name-${M.name}-${S}-root`, children: [
19636
+ l.map((L, S) => /* @__PURE__ */ Ve("transformNode", { name: `roadway-name-${L.name}-${S}-root`, children: [
19618
19637
  /* @__PURE__ */ N(
19619
19638
  "transformNode",
19620
19639
  {
19621
- name: `roadway-name-${M.name}-${S}`,
19622
- position: M.position.add(y).add((A == null ? void 0 : A.offset) || new F(0, 0, 0)),
19640
+ name: `roadway-name-${L.name}-${S}`,
19641
+ position: L.position.add(y).add((A == null ? void 0 : A.offset) || new F(0, 0, 0)),
19623
19642
  billboardMode: ut.BILLBOARDMODE_ALL,
19624
19643
  children: /* @__PURE__ */ N(
19625
19644
  lt,
19626
19645
  {
19627
- text: M.name,
19646
+ text: L.name,
19628
19647
  fontSize: (A == null ? void 0 : A.fontSize) || 18,
19629
19648
  color: (A == null ? void 0 : A.color) || "#FFFFFF"
19630
19649
  }
@@ -19635,14 +19654,14 @@ void main(void) {
19635
19654
  A.offset && A.offset.y !== 0 ? /* @__PURE__ */ N(
19636
19655
  "lineSystem",
19637
19656
  {
19638
- name: `roadway-name-${M.name}-${S}-line`,
19639
- lines: [[M.position, M.position.add(A.offset)]],
19657
+ name: `roadway-name-${L.name}-${S}-line`,
19658
+ lines: [[L.position, L.position.add(A.offset)]],
19640
19659
  color: he.White()
19641
19660
  }
19642
19661
  ) : null
19643
19662
  ] }))
19644
19663
  ] });
19645
- }, md = (e) => {
19664
+ }, gd = (e) => {
19646
19665
  const { id: t, node: n } = e, [a, i] = ye([]), [o, r] = ye([]), l = (c, d) => {
19647
19666
  const u = [];
19648
19667
  let f = 0;
@@ -19702,7 +19721,7 @@ void main(void) {
19702
19721
  },
19703
19722
  f
19704
19723
  )) }, d)) });
19705
- }, gd = (e) => {
19724
+ }, vd = (e) => {
19706
19725
  const { nodes: t } = e, n = Pe(null), a = Pe([]), [i, o] = ye(), r = (l) => {
19707
19726
  const s = [];
19708
19727
  for (let d = 0; d < l.length; d++)
@@ -19742,7 +19761,7 @@ void main(void) {
19742
19761
  };
19743
19762
  }, [t]), /* @__PURE__ */ Ve(ge, { children: [
19744
19763
  t && t.map((l, s) => a.current.find((d) => d === l.name) ? null : /* @__PURE__ */ N(
19745
- md,
19764
+ gd,
19746
19765
  {
19747
19766
  id: s,
19748
19767
  node: l
@@ -19767,7 +19786,7 @@ void main(void) {
19767
19786
  }
19768
19787
  )
19769
19788
  ] });
19770
- }, vd = (e) => {
19789
+ }, xd = (e) => {
19771
19790
  const { url: t, zOffset: n, zOffsetUnits: a, uScale: i, vScale: o, isBlink: r } = e, [l, s] = ye(), [c, d] = ye(1);
19772
19791
  return ue(() => {
19773
19792
  const u = new Wt(t);
@@ -19797,7 +19816,7 @@ void main(void) {
19797
19816
  sideOrientation: Ne.CounterClockWiseSideOrientation
19798
19817
  }
19799
19818
  );
19800
- }, xd = (e) => {
19819
+ }, yd = (e) => {
19801
19820
  const { node: t, roadwayWidth: n, textureLength: a, url: i, visible: o = !0, isBlink: r = !0 } = e, [l, s] = ye(), c = Pe(null), [d, u] = ye(), [f, g] = ye(!1), [p, _] = ye(1), y = (m, x, P, b) => {
19802
19821
  const I = F.Distance(m, x) / b, C = F.Distance(m, P), T = Math.floor(C / I);
19803
19822
  return Math.min(T, b - 1);
@@ -19833,7 +19852,7 @@ void main(void) {
19833
19852
  setEnabled: f && o,
19834
19853
  scaling: new F(p, 1, 1),
19835
19854
  children: /* @__PURE__ */ N(
19836
- vd,
19855
+ xd,
19837
19856
  {
19838
19857
  name: t.name,
19839
19858
  alphaMode: Fe.ALPHA_COMBINE,
@@ -19848,10 +19867,10 @@ void main(void) {
19848
19867
  )
19849
19868
  }
19850
19869
  ) });
19851
- }, yd = (e) => {
19870
+ }, Cd = (e) => {
19852
19871
  const { nodes: t, roadwayWidth: n = 2, textureLength: a = 4, url: i, visible: o = !0, isBlink: r = !0 } = e;
19853
19872
  return /* @__PURE__ */ N(ge, { children: t && t.map((l, s) => /* @__PURE__ */ N(
19854
- xd,
19873
+ yd,
19855
19874
  {
19856
19875
  node: l,
19857
19876
  roadwayWidth: n,
@@ -19863,7 +19882,7 @@ void main(void) {
19863
19882
  s
19864
19883
  )) });
19865
19884
  };
19866
- class Cd {
19885
+ class _d {
19867
19886
  constructor(t, n, a) {
19868
19887
  _e(this, "sourceVertex");
19869
19888
  _e(this, "targetVertex");
@@ -19884,7 +19903,7 @@ class Cd {
19884
19903
  return this._influence;
19885
19904
  }
19886
19905
  }
19887
- const _d = ({
19906
+ const Pd = ({
19888
19907
  position: e = F.Zero(),
19889
19908
  id: t,
19890
19909
  node: n,
@@ -19911,7 +19930,7 @@ const _d = ({
19911
19930
  }), m.current.getBlockByName("TimeSpeed").value = a, m.current.getBlockByName("PerlinMultiply").value = i, m.current.getBlockByName("waterFlow").value = o, m.current.getBlockByName("ClippedHeight").value = r, m.current.alpha = l, m.current.getBlockByName("Gradient").colorSteps = s;
19912
19931
  const A = m.current;
19913
19932
  A.getBlockByName("MaskEnabled").value = 0, A.build(!1, !0, !0);
19914
- const I = n.start, C = n.end, T = F.Normalize(C.subtract(I)), R = Math.asin(T.y), M = Math.atan2(T.x, T.z), S = new F(-R, M, 0);
19933
+ const I = n.start, C = n.end, T = F.Normalize(C.subtract(I)), R = Math.asin(T.y), L = Math.atan2(T.x, T.z), S = new F(-R, L, 0);
19915
19934
  return y(S), b.morphTargetManager = new bs(), b.morphTargetManager.enableNormalMorphing = !0, P.current = b.getVerticesData(Bt.PositionKind).slice(0), P.current.length === 0 && console.log("[Geo3DViewer] 水模拟,原始 SourceKind 为空", t, n.name), b.material = m.current, () => {
19916
19935
  var B;
19917
19936
  (B = m.current) == null || B.dispose();
@@ -19922,9 +19941,9 @@ const _d = ({
19922
19941
  if (b && A) {
19923
19942
  console.log(`[Geo3DViewer] 正在更新 ${t} / ${n.name} 的进度 Time: ${n.time / 1e3}`);
19924
19943
  const I = A.getVerticesData(Bt.PositionKind).slice(0);
19925
- I.length === 0 && console.log("[Geo3DViewer] 水模拟 SourceKind 为空", t, n.name), A.updateMeshPositions((M) => {
19926
- for (let S = 0; S < M.length; S++)
19927
- M[S] = P.current[S];
19944
+ I.length === 0 && console.log("[Geo3DViewer] 水模拟 SourceKind 为空", t, n.name), A.updateMeshPositions((L) => {
19945
+ for (let S = 0; S < L.length; S++)
19946
+ L[S] = P.current[S];
19928
19947
  });
19929
19948
  const C = A.applyDisplacementMapFromBuffer(
19930
19949
  n.glurHeightMap,
@@ -19936,11 +19955,11 @@ const _d = ({
19936
19955
  tt.One(),
19937
19956
  !1
19938
19957
  ).getVerticesData(Bt.PositionKind).slice(0);
19939
- C.length === 0 && console.log("[Geo3DViewer] 水模拟 SourceKind 为空", t, n.name), b.updateMeshPositions((M) => {
19940
- for (let S = 0; S < M.length; S++)
19941
- M[S] = C[S];
19958
+ C.length === 0 && console.log("[Geo3DViewer] 水模拟 SourceKind 为空", t, n.name), b.updateMeshPositions((L) => {
19959
+ for (let S = 0; S < L.length; S++)
19960
+ L[S] = C[S];
19942
19961
  });
19943
- const T = new Cd(I, C, b), R = new Un(
19962
+ const T = new _d(I, C, b), R = new Un(
19944
19963
  "waterAnimation",
19945
19964
  "influence",
19946
19965
  1e3 / 30,
@@ -20016,10 +20035,10 @@ const _d = ({
20016
20035
  ]
20017
20036
  }
20018
20037
  ) });
20019
- }, Pd = (e) => {
20038
+ }, bd = (e) => {
20020
20039
  const { nodes: t } = e;
20021
20040
  return /* @__PURE__ */ N(ge, { children: t && t.map((n, a) => /* @__PURE__ */ N(
20022
- _d,
20041
+ Pd,
20023
20042
  {
20024
20043
  id: a,
20025
20044
  node: n,
@@ -20036,7 +20055,7 @@ const _d = ({
20036
20055
  },
20037
20056
  n.name
20038
20057
  )) });
20039
- }, bd = (e) => {
20058
+ }, kd = (e) => {
20040
20059
  const { rootUrl: t, size: n = 1e3, name: a = "skybox" } = e;
20041
20060
  return /* @__PURE__ */ N(Ms, { rootUrl: t, size: n, name: a });
20042
20061
  };
@@ -20165,8 +20184,8 @@ const Rn = {
20165
20184
  function Wn(e) {
20166
20185
  return e != null;
20167
20186
  }
20168
- var kd = /* @__PURE__ */ ((e) => (e[e.TETRAHEDRON = 0] = "TETRAHEDRON", e[e.OCTAHEDRON = 1] = "OCTAHEDRON", e[e.DODECAHEDRON = 2] = "DODECAHEDRON", e[e.ICOSAHEDRON = 3] = "ICOSAHEDRON", e[e.RHOMBICUBOCTAHEDRON = 4] = "RHOMBICUBOCTAHEDRON", e[e.SPECIAL_CIRCLE = 5] = "SPECIAL_CIRCLE", e))(kd || {});
20169
- const Td = ({
20187
+ var Td = /* @__PURE__ */ ((e) => (e[e.TETRAHEDRON = 0] = "TETRAHEDRON", e[e.OCTAHEDRON = 1] = "OCTAHEDRON", e[e.DODECAHEDRON = 2] = "DODECAHEDRON", e[e.ICOSAHEDRON = 3] = "ICOSAHEDRON", e[e.RHOMBICUBOCTAHEDRON = 4] = "RHOMBICUBOCTAHEDRON", e[e.SPECIAL_CIRCLE = 5] = "SPECIAL_CIRCLE", e))(Td || {});
20188
+ const Nd = ({
20170
20189
  url: e,
20171
20190
  colorCodec: t,
20172
20191
  alpha: n = 1,
@@ -20187,26 +20206,26 @@ const Td = ({
20187
20206
  if (I && C) {
20188
20207
  g(A), _(new F(I.x, I.y, I.z));
20189
20208
  const T = new Float32Array(C.length * 16), R = new Float32Array(C.length * 4);
20190
- return C.forEach((M, S) => {
20191
- if (M.point) {
20209
+ return C.forEach((L, S) => {
20210
+ if (L.point) {
20192
20211
  const B = new F(
20193
- M.point.x,
20194
- M.point.y,
20195
- M.point.z
20212
+ L.point.x,
20213
+ L.point.y,
20214
+ L.point.z
20196
20215
  ).multiplyByFloats(
20197
20216
  c && c.scalePlane ? c.scalePlane : 1,
20198
20217
  c && c.scaleDepth ? c.scaleDepth : 1,
20199
20218
  c && c.scalePlane ? c.scalePlane : 1
20200
20219
  ), k = vn.Identity(), E = new F(
20201
- M.vRadius * o,
20202
- M.vRadius * o,
20203
- M.vRadius * o
20220
+ L.vRadius * o,
20221
+ L.vRadius * o,
20222
+ L.vRadius * o
20204
20223
  );
20205
20224
  if (nr.Compose(E, k, B).copyToArray(T, S * 16), t) {
20206
- const O = d.colorCodecs[t].array, z = O[Math.floor(M.vColor * (O.length - 1))];
20225
+ const O = d.colorCodecs[t].array, z = O[Math.floor(L.vColor * (O.length - 1))];
20207
20226
  R.set([z.r, z.g, z.b, n], S * 4);
20208
20227
  } else {
20209
- const O = d.colorIDs[M.colorId];
20228
+ const O = d.colorIDs[L.colorId];
20210
20229
  R.set([O.r, O.g, O.b, n], S * 4);
20211
20230
  }
20212
20231
  }
@@ -20306,8 +20325,8 @@ const Td = ({
20306
20325
  }
20307
20326
  );
20308
20327
  };
20309
- var Nd = /* @__PURE__ */ ((e) => (e[e.OSM = 1] = "OSM", e[e.AMAP = 2] = "AMAP", e))(Nd || {});
20310
- const Sd = ({
20328
+ var Sd = /* @__PURE__ */ ((e) => (e[e.OSM = 1] = "OSM", e[e.AMAP = 2] = "AMAP", e))(Sd || {});
20329
+ const Id = ({
20311
20330
  mode: e = 1,
20312
20331
  baseUrl: t,
20313
20332
  visible: n = !0,
@@ -20328,11 +20347,11 @@ const Sd = ({
20328
20347
  const A = _.current, I = y.current;
20329
20348
  if (A && I) {
20330
20349
  const C = A.getTotalVertices(), T = A.getIndices().length / (u.w * u.h), R = [];
20331
- let M = 0, S = 0;
20350
+ let L = 0, S = 0;
20332
20351
  for (let k = 0; k < u.h; k++)
20333
20352
  for (let E = 0; E < u.w; E++) {
20334
20353
  const v = new Ts(
20335
- M++,
20354
+ L++,
20336
20355
  0,
20337
20356
  C,
20338
20357
  S,
@@ -20648,7 +20667,7 @@ const Bn = {
20648
20667
  function Lt(e) {
20649
20668
  return e != null;
20650
20669
  }
20651
- const Id = (e, t) => {
20670
+ const wd = (e, t) => {
20652
20671
  const n = Pe(null), a = Qe(We), { id: i, name: o, visible: r = !0, position: l, children: s, isRegular: c = !0 } = e;
20653
20672
  return mt(
20654
20673
  t,
@@ -20665,7 +20684,7 @@ const Id = (e, t) => {
20665
20684
  children: s
20666
20685
  }
20667
20686
  );
20668
- }, wd = ht(Id), Od = (e) => {
20687
+ }, Od = ht(wd), Ad = (e) => {
20669
20688
  const t = Ee(), n = Pe(null), { title: a, url: i, color: o, v: r, actions: l, path: s, radius: c, mesh: d } = e;
20670
20689
  return ue(() => {
20671
20690
  n.current && (n.current.metadata = {
@@ -20692,7 +20711,7 @@ const Id = (e, t) => {
20692
20711
  diffuseTexture: i !== "" ? new Wt(i) : void 0
20693
20712
  }
20694
20713
  ) });
20695
- }, Ad = (e, t) => {
20714
+ }, Ed = (e, t) => {
20696
20715
  const { name: n, position: a, slices: i, meshs: o, actions: r } = e, l = Pe(null);
20697
20716
  return mt(
20698
20717
  t,
@@ -20701,7 +20720,7 @@ const Id = (e, t) => {
20701
20720
  ), /* @__PURE__ */ N("transformNode", { name: "lod0", ref: l, setEnabled: !1, children: a && i.map((s, c) => {
20702
20721
  var d, u, f, g, p, _;
20703
20722
  return /* @__PURE__ */ N(
20704
- Od,
20723
+ Ad,
20705
20724
  {
20706
20725
  id: c,
20707
20726
  v: s.v,
@@ -20720,7 +20739,7 @@ const Id = (e, t) => {
20720
20739
  c
20721
20740
  );
20722
20741
  }) });
20723
- }, Ed = $.forwardRef(Ad), Md = (e) => {
20742
+ }, Md = $.forwardRef(Ed), Ld = (e) => {
20724
20743
  const t = Ee(), n = Pe(null), a = Qe(We), {
20725
20744
  id: i,
20726
20745
  vertices: o,
@@ -20744,7 +20763,7 @@ const Id = (e, t) => {
20744
20763
  onRightClick: _.onRightClick,
20745
20764
  onMiddleClick: _.onMiddleClick,
20746
20765
  onHover: (m, x, P, b, A) => {
20747
- var I, C, T, R, M, S;
20766
+ var I, C, T, R, L, S;
20748
20767
  if (_.onHover && t && f && P) {
20749
20768
  const B = P;
20750
20769
  for (let k = 0; k < f.length; k++) {
@@ -20754,7 +20773,7 @@ const Id = (e, t) => {
20754
20773
  (T = f[k].start) == null ? void 0 : T.z
20755
20774
  ).add(g).multiply(De(a)), v = new F(
20756
20775
  (R = f[k].end) == null ? void 0 : R.x,
20757
- (M = f[k].end) == null ? void 0 : M.y,
20776
+ (L = f[k].end) == null ? void 0 : L.y,
20758
20777
  (S = f[k].end) == null ? void 0 : S.z
20759
20778
  ).add(g).multiply(De(a)), O = bt.CreateTube(
20760
20779
  "boundingbox-tmp",
@@ -20824,7 +20843,7 @@ const Id = (e, t) => {
20824
20843
  return /* @__PURE__ */ N(hr, { alpha: u });
20825
20844
  }, [u, d, s, i, c, p]);
20826
20845
  return /* @__PURE__ */ N("transformNode", { name: `${p}-main-node`, children: /* @__PURE__ */ N("mesh", { name: `${p}-mesh`, ref: n, isPickable: !0, children: y() }) });
20827
- }, Ld = (e, t) => {
20846
+ }, Rd = (e, t) => {
20828
20847
  const {
20829
20848
  id: n,
20830
20849
  visible: a = !0,
@@ -20842,7 +20861,7 @@ const Id = (e, t) => {
20842
20861
  () => f.current,
20843
20862
  []
20844
20863
  ), /* @__PURE__ */ N("transformNode", { name: "lod1", ref: f, setEnabled: !1, children: o.length > 0 && /* @__PURE__ */ N(
20845
- Md,
20864
+ Ld,
20846
20865
  {
20847
20866
  id: n,
20848
20867
  visible: a,
@@ -20858,7 +20877,7 @@ const Id = (e, t) => {
20858
20877
  slices: c
20859
20878
  }
20860
20879
  ) });
20861
- }, Rd = $.forwardRef(Ld), Bd = (e, t) => {
20880
+ }, Bd = $.forwardRef(Rd), Dd = (e, t) => {
20862
20881
  const n = Pe(null), a = Qe(We), { style: i, name: o = "tube" } = e;
20863
20882
  return mt(
20864
20883
  t,
@@ -20882,9 +20901,9 @@ const Id = (e, t) => {
20882
20901
  )
20883
20902
  }
20884
20903
  );
20885
- }, Ka = ht(Bd), Dd = (e) => {
20904
+ }, Ka = ht(Dd), Fd = (e) => {
20886
20905
  var ae, X, Se, Ce;
20887
- const t = Ee(), [n, a] = ye([]), [i, o] = ye([]), [r, l] = ye([]), s = Pe(null), c = Pe(null), d = Pe(null), [u, f] = ye(""), [g, p] = ye(new F(0, 0, 0)), _ = Pe(null), y = Pe(null), m = Pe(null), [x, P] = ye([]), b = Pe(!1), A = Qe(We), [I, C] = ye([]), [T, R] = ye(!1), [M, S] = ye(!1), {
20906
+ const t = Ee(), [n, a] = ye([]), [i, o] = ye([]), [r, l] = ye([]), s = Pe(null), c = Pe(null), d = Pe(null), [u, f] = ye(""), [g, p] = ye(new F(0, 0, 0)), _ = Pe(null), y = Pe(null), m = Pe(null), [x, P] = ye([]), b = Pe(!1), A = Qe(We), [I, C] = ye([]), [T, R] = ye(!1), [L, S] = ye(!1), {
20888
20907
  id: B,
20889
20908
  url: k,
20890
20909
  color: E,
@@ -20905,7 +20924,7 @@ const Id = (e, t) => {
20905
20924
  return ue(() => {
20906
20925
  re && oe && Y ? (s.current = re, c.current = oe, d.current = Y) : S(!0);
20907
20926
  }, [Y, re, oe]), ue(() => {
20908
- !b.current && M && (b.current = !0, ln.get(k, {
20927
+ !b.current && L && (b.current = !0, ln.get(k, {
20909
20928
  responseType: "arraybuffer"
20910
20929
  }).then((V) => {
20911
20930
  var xe, fe, me, Le, Oe, ze, Re, Be, Ue;
@@ -20928,7 +20947,7 @@ const Id = (e, t) => {
20928
20947
  O === "custom" ? ua(Q.indices) : Q.indices
20929
20948
  ), l(Q.colors);
20930
20949
  }));
20931
- }, [k, t, E, O, e.style.basePosition, le, M, A]), ue(() => {
20950
+ }, [k, t, E, O, e.style.basePosition, le, L, A]), ue(() => {
20932
20951
  const V = setInterval(() => {
20933
20952
  var Q, Me, Ae, te, xe, fe, me, Le, Oe, ze, Re, Be, Ue, qe;
20934
20953
  if (t && t.cameras.length > 0 && t.activeCamera && s.current && c.current && d.current) {
@@ -20946,7 +20965,7 @@ const Id = (e, t) => {
20946
20965
  };
20947
20966
  }, [G, ee, I.length, A, t]), /* @__PURE__ */ N(ge, { children: /* @__PURE__ */ Ve("transformNode", { name: `tube-${B} `, children: [
20948
20967
  /* @__PURE__ */ Ve(
20949
- wd,
20968
+ Od,
20950
20969
  {
20951
20970
  id: B,
20952
20971
  name: u,
@@ -20954,7 +20973,7 @@ const Id = (e, t) => {
20954
20973
  position: (ae = s.current) != null ? ae : new F(0, 0, 0),
20955
20974
  isRegular: ce,
20956
20975
  children: [
20957
- M && /* @__PURE__ */ N(
20976
+ L && /* @__PURE__ */ N(
20958
20977
  Ka,
20959
20978
  {
20960
20979
  id: B,
@@ -20969,8 +20988,8 @@ const Id = (e, t) => {
20969
20988
  ref: m
20970
20989
  }
20971
20990
  ),
20972
- T && M && ee[0] && I.length > 0 && /* @__PURE__ */ N(
20973
- Ed,
20991
+ T && L && ee[0] && I.length > 0 && /* @__PURE__ */ N(
20992
+ Md,
20974
20993
  {
20975
20994
  id: B,
20976
20995
  name: u,
@@ -20982,8 +21001,8 @@ const Id = (e, t) => {
20982
21001
  ref: _
20983
21002
  }
20984
21003
  ),
20985
- M && /* @__PURE__ */ N(
20986
- Rd,
21004
+ L && /* @__PURE__ */ N(
21005
+ Bd,
20987
21006
  {
20988
21007
  id: B,
20989
21008
  name: u,
@@ -21048,7 +21067,7 @@ const Qa = {
21048
21067
  const t = Wi();
21049
21068
  return t.group = ((n = e.group) == null ? void 0 : n.map((a) => Yt.fromPartial(a))) || [], t;
21050
21069
  }
21051
- }, Fd = (e) => {
21070
+ }, zd = (e) => {
21052
21071
  const t = Ee(), [n, a] = ye([]), i = Pe(!1), o = Qe(We), { visible: r = !0, groupUrl: l, modelUrl: s, group: c, actions: d } = e, u = et((f, g) => g ? new sn(g == null ? void 0 : g.r, g == null ? void 0 : g.g, g == null ? void 0 : g.b, g == null ? void 0 : g.a) : f || new sn(1, 1, 1, 1), []);
21053
21072
  return ue(() => {
21054
21073
  if (!i.current && (i.current = !0, l && ln.get(l, {
@@ -21081,15 +21100,15 @@ const Qa = {
21081
21100
  if (n.length > 0) {
21082
21101
  const I = [], C = [];
21083
21102
  for (let T = 0; T < n.length; T++) {
21084
- const R = n[T], M = new F((g = R.origin) == null ? void 0 : g.x, (p = R.origin) == null ? void 0 : p.y, (_ = R.origin) == null ? void 0 : _.z), S = R.sliceList;
21103
+ const R = n[T], L = new F((g = R.origin) == null ? void 0 : g.x, (p = R.origin) == null ? void 0 : p.y, (_ = R.origin) == null ? void 0 : _.z), S = R.sliceList;
21085
21104
  if (S) {
21086
21105
  const B = [], k = [];
21087
21106
  for (let E = 0; E < S.length; E++)
21088
21107
  B.push(
21089
- M.add(new F((y = S[E].start) == null ? void 0 : y.x, (m = S[E].start) == null ? void 0 : m.y, (x = S[E].start) == null ? void 0 : x.z)).multiply(De(o))
21108
+ L.add(new F((y = S[E].start) == null ? void 0 : y.x, (m = S[E].start) == null ? void 0 : m.y, (x = S[E].start) == null ? void 0 : x.z)).multiply(De(o))
21090
21109
  // .add(group[i].offset ?? new Vector3(0, 0, 0)),
21091
21110
  ), k.push(u(void 0, S[E].color)), E === S.length - 1 && (B.push(
21092
- M.add(new F((P = S[E].end) == null ? void 0 : P.x, (b = S[E].end) == null ? void 0 : b.y, (A = S[E].end) == null ? void 0 : A.z)).multiply(De(o))
21111
+ L.add(new F((P = S[E].end) == null ? void 0 : P.x, (b = S[E].end) == null ? void 0 : b.y, (A = S[E].end) == null ? void 0 : A.z)).multiply(De(o))
21093
21112
  // .add(group[i].offset ?? new Vector3(0, 0, 0)),
21094
21113
  ), k.push(u(void 0, S[E].color)));
21095
21114
  I.push(B), C.push(k);
@@ -21288,7 +21307,7 @@ const Dn = {
21288
21307
  function jt(e) {
21289
21308
  return e != null;
21290
21309
  }
21291
- const zd = `#version 300 es
21310
+ const $d = `#version 300 es
21292
21311
  precision highp float;
21293
21312
 
21294
21313
  in vec2 vUV;
@@ -21299,7 +21318,7 @@ out vec4 fragColor;
21299
21318
 
21300
21319
  void main(void) {
21301
21320
  fragColor = vColor;
21302
- }`, $d = `#version 300 es
21321
+ }`, Wd = `#version 300 es
21303
21322
  precision highp float;
21304
21323
 
21305
21324
  // Attributes
@@ -21327,7 +21346,7 @@ void main(void) {
21327
21346
  vUV = uv;
21328
21347
 
21329
21348
  vColor = color;
21330
- }`, Wd = (e) => {
21349
+ }`, Ud = (e) => {
21331
21350
  const t = Pe(null), { billboardMode: n = "All", zOffset: a, zOffsetUnits: i } = e, [o, r] = ye(), l = Ee();
21332
21351
  return ue(() => {
21333
21352
  const s = () => {
@@ -21346,8 +21365,8 @@ void main(void) {
21346
21365
  name: e.name,
21347
21366
  backFaceCulling: !1,
21348
21367
  needDepthPrePass: e.needDepthPrePass,
21349
- vertex: $d,
21350
- fragment: zd,
21368
+ vertex: Wd,
21369
+ fragment: $d,
21351
21370
  transparencyMode: e.transparencyMode,
21352
21371
  alphaMode: e.alphaMode,
21353
21372
  options: {
@@ -21360,7 +21379,7 @@ void main(void) {
21360
21379
  sideOrientation: Ne.CounterClockWiseSideOrientation
21361
21380
  }
21362
21381
  );
21363
- }, Ud = (e, t) => {
21382
+ }, Hd = (e, t) => {
21364
21383
  const n = Ee(), a = Pe(null), i = Pe(null), o = Qe(We), { id: r, visible: l = !0, vertices: s, indices: c, colors: d, uvs: u, position: f, customMaterial: g } = e, { title: p, color: _, fontSize: y } = e.style;
21365
21384
  return mt(
21366
21385
  t,
@@ -21390,7 +21409,7 @@ void main(void) {
21390
21409
  ref: i,
21391
21410
  setEnabled: l,
21392
21411
  children: [
21393
- /* @__PURE__ */ N("mesh", { name: "curve", ref: a, scaling: new F(1, 1, 1), children: g ? /* @__PURE__ */ N(Wd, { name: `material-${r}`, billboardMode: "none" }) : /* @__PURE__ */ N("standardMaterial", { name: `material-${r}`, backFaceCulling: !1 }) }),
21412
+ /* @__PURE__ */ N("mesh", { name: "curve", ref: a, scaling: new F(1, 1, 1), children: g ? /* @__PURE__ */ N(Ud, { name: `material-${r}`, billboardMode: "none" }) : /* @__PURE__ */ N("standardMaterial", { name: `material-${r}`, backFaceCulling: !1 }) }),
21394
21413
  /* @__PURE__ */ N(
21395
21414
  "transformNode",
21396
21415
  {
@@ -21410,7 +21429,7 @@ void main(void) {
21410
21429
  ]
21411
21430
  }
21412
21431
  );
21413
- }, Hd = ht(Ud), Zi = (e) => {
21432
+ }, Vd = ht(Hd), Zi = (e) => {
21414
21433
  var k, E;
21415
21434
  const t = Ee(), [n, a] = ye([]), [i, o] = ye([]), [r, l] = ye([]), [s, c] = ye([]), [d, u] = ye(), [f, g] = ye(), [p, _] = ye(), { colorCodecs: y } = Qe(qt), {
21416
21435
  id: m,
@@ -21422,7 +21441,7 @@ void main(void) {
21422
21441
  width: C = 20,
21423
21442
  offset: T = new F(0, 0, 0),
21424
21443
  direction: R = "right"
21425
- } = e, M = pt({ url: x, cacheType: $e.EXACTLY_MATCH }), S = et(
21444
+ } = e, L = pt({ url: x, cacheType: $e.EXACTLY_MATCH }), S = et(
21426
21445
  (v, O, z, W, U = !0) => {
21427
21446
  if (t) {
21428
21447
  const ne = bt.CreateRibbon(
@@ -21459,8 +21478,8 @@ void main(void) {
21459
21478
  );
21460
21479
  ue(() => {
21461
21480
  var v, O, z, W, U;
21462
- if (M) {
21463
- const ne = _r.decode(new Uint8Array(M)), ee = C / (ne.max - ne.min), G = ne.min < 0 ? -ne.min : 0, le = R === "right" ? C / 2 : C;
21481
+ if (L) {
21482
+ const ne = _r.decode(new Uint8Array(L)), ee = C / (ne.max - ne.min), G = ne.min < 0 ? -ne.min : 0, le = R === "right" ? C / 2 : C;
21464
21483
  console.log(ne);
21465
21484
  const re = [], oe = ne.chart.map((X) => {
21466
21485
  const Se = X.position ? X.position : {
@@ -21497,7 +21516,7 @@ void main(void) {
21497
21516
  (k = e.style) == null ? void 0 : k.offset,
21498
21517
  C,
21499
21518
  (E = e.style) == null ? void 0 : E.fontSize,
21500
- M,
21519
+ L,
21501
21520
  R
21502
21521
  ]);
21503
21522
  const B = et(() => {
@@ -21510,7 +21529,7 @@ void main(void) {
21510
21529
  t && t.activeCamera && (t == null || t.activeCamera.onViewMatrixChangedObservable.removeCallback(v));
21511
21530
  };
21512
21531
  }, [B, t]), /* @__PURE__ */ N(ge, { children: b && n.length > 0 && r.length > 0 && /* @__PURE__ */ N(
21513
- Hd,
21532
+ Vd,
21514
21533
  {
21515
21534
  id: m,
21516
21535
  visible: b,
@@ -21527,7 +21546,7 @@ void main(void) {
21527
21546
  customMaterial: A
21528
21547
  }
21529
21548
  ) });
21530
- }, Vd = (e) => {
21549
+ }, Zd = (e) => {
21531
21550
  const t = Pe(null), n = Qe(We), { id: a, visible: i = !0, position: o } = e, { title: r, color: l, fontSize: s } = e.style;
21532
21551
  return /* @__PURE__ */ N(
21533
21552
  "transformNode",
@@ -21565,11 +21584,11 @@ void main(void) {
21565
21584
  )
21566
21585
  }
21567
21586
  );
21568
- }, Zd = (e) => {
21587
+ }, Gd = (e) => {
21569
21588
  var x, P;
21570
21589
  const t = Ee(), [n, a] = ye(), [i, o] = ye(), [r, l] = ye(), [s, c] = ye([]), { id: d, url: u, visible: f = !0, offset: g = new F(0, 0, 0), color: p, width: _ = 20 } = e, y = pt({ url: u, cacheType: $e.EXACTLY_MATCH }), m = Qe(We);
21571
21590
  return ue(() => {
21572
- var b, A, I, C, T, R, M, S;
21591
+ var b, A, I, C, T, R, L, S;
21573
21592
  if (y) {
21574
21593
  const B = _r.decode(new Uint8Array(y)), k = _ / (B.max - B.min), E = B.min < 0 ? -B.min : 0, v = new F(
21575
21594
  (b = B.origin) == null ? void 0 : b.x,
@@ -21586,7 +21605,7 @@ void main(void) {
21586
21605
  const W = O[O.length - 1].position;
21587
21606
  if (W) {
21588
21607
  const U = new F(W.x, W.y, W.z).add(
21589
- new F(_ / 2 - ((M = e.style) != null && M.fontSize ? e.style.fontSize / 2 : 0), 0, 0)
21608
+ new F(_ / 2 - ((L = e.style) != null && L.fontSize ? e.style.fontSize / 2 : 0), 0, 0)
21590
21609
  ).add((S = e.style) != null && S.offset ? e.style.offset : new F(0, 0, 0));
21591
21610
  o(new F(U.x, U.y, U.z));
21592
21611
  }
@@ -21594,7 +21613,7 @@ void main(void) {
21594
21613
  }
21595
21614
  }, [u, t, g, (x = e.style) == null ? void 0 : x.offset, (P = e.style) == null ? void 0 : P.fontSize, y, m, _]), /* @__PURE__ */ Ve(ge, { children: [
21596
21615
  /* @__PURE__ */ N(
21597
- Vd,
21616
+ Zd,
21598
21617
  {
21599
21618
  id: d,
21600
21619
  visible: f,
@@ -21756,7 +21775,7 @@ const Fn = {
21756
21775
  function Qt(e) {
21757
21776
  return e != null;
21758
21777
  }
21759
- const Gd = (e, t) => {
21778
+ const Yd = (e, t) => {
21760
21779
  const n = Ee(), a = Pe(null), i = Pe(null), o = Qe(We), {
21761
21780
  id: r,
21762
21781
  visible: l = !0,
@@ -21785,13 +21804,13 @@ const Gd = (e, t) => {
21785
21804
  onRightClick: m.onRightClick,
21786
21805
  onMiddleClick: m.onMiddleClick,
21787
21806
  onHover: (b, A, I, C, T) => {
21788
- var R, M, S, B, k, E;
21807
+ var R, L, S, B, k, E;
21789
21808
  if (m.onHover && n && x && I) {
21790
21809
  const v = I;
21791
21810
  for (let O = 0; O < x.length; O++) {
21792
21811
  const z = new F(
21793
21812
  (R = x[O].start) == null ? void 0 : R.x,
21794
- (M = x[O].start) == null ? void 0 : M.y,
21813
+ (L = x[O].start) == null ? void 0 : L.y,
21795
21814
  (S = x[O].start) == null ? void 0 : S.z
21796
21815
  ).add(u).multiply(De(o)), W = new F(
21797
21816
  (B = x[O].end) == null ? void 0 : B.x,
@@ -21892,7 +21911,7 @@ const Gd = (e, t) => {
21892
21911
  ),
21893
21912
  g
21894
21913
  ] });
21895
- }, Yd = ht(Gd), Jd = (e, t) => {
21914
+ }, Jd = ht(Yd), Xd = (e, t) => {
21896
21915
  const n = Pe(null), a = Qe(We);
21897
21916
  mt(
21898
21917
  t,
@@ -21939,7 +21958,7 @@ const Gd = (e, t) => {
21939
21958
  )) : /* @__PURE__ */ N(ge, {})
21940
21959
  }
21941
21960
  );
21942
- }, Xd = ht(Jd), Ji = (e) => {
21961
+ }, qd = ht(Xd), Ji = (e) => {
21943
21962
  var S, B, k, E, v;
21944
21963
  const t = Ee(), [n, a] = ye([]), [i, o] = ye([]), [r, l] = ye([]), [s, c] = ye(), [d, u] = ye([]), [f, g] = ye(0), [p, _] = ye(), { colorIDs: y } = Qe(qt), {
21945
21964
  id: m,
@@ -21951,11 +21970,11 @@ const Gd = (e, t) => {
21951
21970
  frontSide: C = !1,
21952
21971
  customMaterial: T = !1,
21953
21972
  actions: R
21954
- } = e, M = pt({ url: x, cacheType: $e.EXACTLY_MATCH });
21973
+ } = e, L = pt({ url: x, cacheType: $e.EXACTLY_MATCH });
21955
21974
  return ue(() => {
21956
21975
  var O, z, W, U, ne, ee;
21957
- if (M) {
21958
- const G = ja.decode(new Uint8Array(M)), le = [];
21976
+ if (L) {
21977
+ const G = ja.decode(new Uint8Array(L)), le = [];
21959
21978
  G.layerList.forEach((Ce, V) => {
21960
21979
  var Q, Me, Ae, te, xe, fe;
21961
21980
  le.push(Ce), V < G.layerList.length && le.push({
@@ -22010,9 +22029,9 @@ const Gd = (e, t) => {
22010
22029
  }
22011
22030
  u(Se), g(G.layerList ? G.layerList[0].radius : 0);
22012
22031
  }
22013
- }, [x, t, C, I, T, b, y, M, P]), /* @__PURE__ */ Ve("transformNode", { name: `node-layer-${m}`, children: [
22032
+ }, [x, t, C, I, T, b, y, L, P]), /* @__PURE__ */ Ve("transformNode", { name: `node-layer-${m}`, children: [
22014
22033
  n.length > 0 && i.length > 0 && /* @__PURE__ */ N(
22015
- Yd,
22034
+ Jd,
22016
22035
  {
22017
22036
  id: m,
22018
22037
  name: "tube-layer",
@@ -22028,7 +22047,7 @@ const Gd = (e, t) => {
22028
22047
  }
22029
22048
  ),
22030
22049
  d.length > 0 && /* @__PURE__ */ N(
22031
- Xd,
22050
+ qd,
22032
22051
  {
22033
22052
  id: m,
22034
22053
  data: d,
@@ -22048,9 +22067,9 @@ const Gd = (e, t) => {
22048
22067
  if (d === "start")
22049
22068
  m.push(new F(p[R * 3], p[R * 3 + 1], p[R * 3 + 2]));
22050
22069
  else {
22051
- const M = p.length - 2 * g * 3;
22070
+ const L = p.length - 2 * g * 3;
22052
22071
  m.push(
22053
- new F(p[R * 3 + M], p[R * 3 + 1 + M], p[R * 3 + 2 + M])
22072
+ new F(p[R * 3 + L], p[R * 3 + 1 + L], p[R * 3 + 2 + L])
22054
22073
  );
22055
22074
  }
22056
22075
  const P = [], b = [];
@@ -22096,7 +22115,7 @@ const Gd = (e, t) => {
22096
22115
  }
22097
22116
  ), [c.b, c.g, c.r, f, u]);
22098
22117
  return /* @__PURE__ */ N("mesh", { name: `${u}-mesh`, ref: n, isPickable: !0, children: y() });
22099
- }, qd = (e) => {
22118
+ }, Kd = (e) => {
22100
22119
  const t = Ee(), n = Pe(null), [a, i] = ye(F.Zero()), [o, r] = ye([]), [l, s] = ye([]), [c, d] = ye([]), [u, f] = ye(""), [g, p] = ye(new F(0, 0, 0)), [_, y] = ye([]), m = Qe(We), {
22101
22120
  id: x,
22102
22121
  color: P,
@@ -22106,7 +22125,7 @@ const Gd = (e, t) => {
22106
22125
  materialType: C = "standard",
22107
22126
  actions: T,
22108
22127
  tessellation: R = 32,
22109
- style: M
22128
+ style: L
22110
22129
  } = e, S = Pe(!1), B = et(
22111
22130
  (E) => {
22112
22131
  var ee, G, le;
@@ -22145,10 +22164,10 @@ const Gd = (e, t) => {
22145
22164
  if (console.log(v), v.sliceList.length === 0)
22146
22165
  return;
22147
22166
  f(v.name);
22148
- const O = M != null && M.basePosition && M.basePosition === "top" ? v.sliceList[0].start : v.sliceList[v.sliceList.length - 1].end;
22167
+ const O = L != null && L.basePosition && L.basePosition === "top" ? v.sliceList[0].start : v.sliceList[v.sliceList.length - 1].end;
22149
22168
  p(new F(O == null ? void 0 : O.x, O == null ? void 0 : O.y, O == null ? void 0 : O.z)), i(new F((z = v.origin) == null ? void 0 : z.x, (W = v.origin) == null ? void 0 : W.y, (U = v.origin) == null ? void 0 : U.z)), B(v);
22150
22169
  }));
22151
- }, [B, M == null ? void 0 : M.basePosition, b]), ue(() => {
22170
+ }, [B, L == null ? void 0 : L.basePosition, b]), ue(() => {
22152
22171
  if (n && n.current && t) {
22153
22172
  const E = new Je();
22154
22173
  E.positions = o, E.indices = l, E.normals = c, E.applyToMesh(n.current);
@@ -22219,16 +22238,16 @@ const Gd = (e, t) => {
22219
22238
  materialType: C
22220
22239
  }
22221
22240
  ),
22222
- M && /* @__PURE__ */ N(
22241
+ L && /* @__PURE__ */ N(
22223
22242
  Ka,
22224
22243
  {
22225
22244
  id: x,
22226
22245
  style: {
22227
22246
  title: u,
22228
22247
  position: g,
22229
- offset: M.offset,
22230
- fontSize: M.fontSize,
22231
- color: M.color
22248
+ offset: L.offset,
22249
+ fontSize: L.fontSize,
22250
+ color: L.color
22232
22251
  }
22233
22252
  }
22234
22253
  ),
@@ -22236,7 +22255,7 @@ const Gd = (e, t) => {
22236
22255
  ]
22237
22256
  }
22238
22257
  );
22239
- }, Kd = (e) => {
22258
+ }, Qd = (e) => {
22240
22259
  const { id: t, visible: n = !0, children: a, offset: i = new F(0, 0, 0) } = e;
22241
22260
  return /* @__PURE__ */ N(ge, { children: /* @__PURE__ */ N("transformNode", { name: `tube-${t}`, setEnabled: n, position: i, children: a }) });
22242
22261
  };
@@ -22377,7 +22396,7 @@ const zn = {
22377
22396
  function en(e) {
22378
22397
  return e != null;
22379
22398
  }
22380
- const Qd = [
22399
+ const jd = [
22381
22400
  0,
22382
22401
  0.05,
22383
22402
  0.1,
@@ -22399,7 +22418,7 @@ const Qd = [
22399
22418
  0.9,
22400
22419
  0.95,
22401
22420
  1
22402
- ], jd = ({
22421
+ ], ep = ({
22403
22422
  url: e,
22404
22423
  alpha: t = {
22405
22424
  typeAlpha0: 1,
@@ -22412,7 +22431,7 @@ const Qd = [
22412
22431
  $.useEffect(() => {
22413
22432
  console.log("[Geo3DViewer] VoxelGrid Loading: ", e);
22414
22433
  }, [e]);
22415
- const p = (_) => Qd[_];
22434
+ const p = (_) => jd[_];
22416
22435
  return $.useEffect(() => {
22417
22436
  if (i && u) {
22418
22437
  const _ = es.decode(new Uint8Array(u)), { name: y, origin: m, dataPoints: x, size: P } = _;
@@ -22427,8 +22446,8 @@ const Qd = [
22427
22446
  const A = new Float32Array(x.length * 16), I = new Float32Array(x.length * 4);
22428
22447
  return x.forEach((C, T) => {
22429
22448
  if (C.point) {
22430
- const R = new F(C.point.x, C.point.y, C.point.z), M = C.rotation ? vn.FromEulerAngles(C.rotation.x, C.rotation.y, C.rotation.z) : vn.Identity(), S = new F(C.vScale + 1, C.vScale + 1, C.vScale + 1);
22431
- nr.Compose(S, M, R).copyToArray(A, T * 16);
22449
+ const R = new F(C.point.x, C.point.y, C.point.z), L = C.rotation ? vn.FromEulerAngles(C.rotation.x, C.rotation.y, C.rotation.z) : vn.Identity(), S = new F(C.vScale + 1, C.vScale + 1, C.vScale + 1);
22450
+ nr.Compose(S, L, R).copyToArray(A, T * 16);
22432
22451
  let k = r.colorIDs[C.colorId];
22433
22452
  k || (k = sn.FromColor3(he.Random())), I.set(
22434
22453
  [k.r, k.g, k.b, p(C.pointType)],
@@ -22459,7 +22478,7 @@ const Qd = [
22459
22478
  children: /* @__PURE__ */ N(lf, { name: `voxel-${l}-mat`, typeAlpha: t, ref: f })
22460
22479
  }
22461
22480
  );
22462
- }, ep = (e, t) => {
22481
+ }, tp = (e, t) => {
22463
22482
  const {
22464
22483
  viewer: n,
22465
22484
  camera: a,
@@ -22485,7 +22504,7 @@ const Qd = [
22485
22504
  coordinate: C,
22486
22505
  tileMaps: T,
22487
22506
  pointClickZones: R,
22488
- progressedAttributeBodies: M,
22507
+ progressedAttributeBodies: L,
22489
22508
  ribbonLayers: S,
22490
22509
  intersectingLines: B,
22491
22510
  tubeInstances: k,
@@ -22521,36 +22540,36 @@ const Qd = [
22521
22540
  u ? /* @__PURE__ */ N(uf, { ...u }) : /* @__PURE__ */ N(ge, {}),
22522
22541
  f ? f.map((V) => /* @__PURE__ */ N(Gf, { ...V }, `gridDiagram-${V.url}`)) : /* @__PURE__ */ N(ge, {}),
22523
22542
  g ? g.map((V) => /* @__PURE__ */ N(cf, { ...V }, `attributebody-${V.url}`)) : /* @__PURE__ */ N(ge, {}),
22524
- p ? p.map((V) => /* @__PURE__ */ Ve(Dd, { ...V, children: [
22543
+ p ? p.map((V) => /* @__PURE__ */ Ve(Fd, { ...V, children: [
22525
22544
  V.charts ? V.charts.map((Q) => /* @__PURE__ */ N(Zi, { ...Q }, `tubechart-${Q.url}`)) : /* @__PURE__ */ N(ge, {}),
22526
22545
  V.layers ? V.layers.map((Q) => /* @__PURE__ */ N(Ji, { ...Q }, `tubelayer-${Q.url}`)) : /* @__PURE__ */ N(ge, {}),
22527
22546
  V.tools ? V.tools.map((Q) => /* @__PURE__ */ N(Ui, { ...Q }, `tubelayer-${Q.name}`)) : /* @__PURE__ */ N(ge, {})
22528
22547
  ] }, `tube-${V.url}`)) : /* @__PURE__ */ N(ge, {}),
22529
- _ ? _.map((V) => /* @__PURE__ */ N(hd, { ...V }, `roadway-${V.url}`)) : /* @__PURE__ */ N(ge, {}),
22548
+ _ ? _.map((V) => /* @__PURE__ */ N(md, { ...V }, `roadway-${V.url}`)) : /* @__PURE__ */ N(ge, {}),
22530
22549
  x ? x.map((V, Q) => /* @__PURE__ */ N(sd, { ...V }, `rayclick-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22531
22550
  P ? P.map((V, Q) => /* @__PURE__ */ N(Ha, { ...V }, `line-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22532
- b ? b.map((V, Q) => /* @__PURE__ */ N(Td, { ...V }, `spaceheat-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22551
+ b ? b.map((V, Q) => /* @__PURE__ */ N(Nd, { ...V }, `spaceheat-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22533
22552
  A ? /* @__PURE__ */ N(Jf, { target: void 0, distance: 0 }) : /* @__PURE__ */ N(ge, {}),
22534
22553
  I ? /* @__PURE__ */ N(Nf, {}) : /* @__PURE__ */ N(ge, {}),
22535
22554
  C ? /* @__PURE__ */ N(yf, { ...C }, "coordinate") : /* @__PURE__ */ N(ge, {}),
22536
- T ? T.map((V, Q) => /* @__PURE__ */ N(Sd, { ...V }, `tilemap-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22555
+ T ? T.map((V, Q) => /* @__PURE__ */ N(Id, { ...V }, `tilemap-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22537
22556
  R ? R.map((V, Q) => /* @__PURE__ */ N(id, { ...V }, `pointClickZone-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22538
- M ? M.map((V, Q) => /* @__PURE__ */ N(ad, { ...V }, `progressedAttributeBody-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22557
+ L ? L.map((V, Q) => /* @__PURE__ */ N(ad, { ...V }, `progressedAttributeBody-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22539
22558
  S ? S.map((V, Q) => /* @__PURE__ */ N(ld, { ...V }, `ribbonlayer-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22540
22559
  B ? B.map((V, Q) => /* @__PURE__ */ N(Yf, { ...V }, `intersectingLine-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22541
- k ? k.map((V, Q) => /* @__PURE__ */ N(Fd, { ...V }, `tubeinstance-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22560
+ k ? k.map((V, Q) => /* @__PURE__ */ N(zd, { ...V }, `tubeinstance-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22542
22561
  E ? /* @__PURE__ */ N(jf, {}) : /* @__PURE__ */ N(ge, {}),
22543
- v ? v.map((V, Q) => /* @__PURE__ */ N(jd, { ...V }, `voxelgrid-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22562
+ v ? v.map((V, Q) => /* @__PURE__ */ N(ep, { ...V }, `voxelgrid-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22544
22563
  O ? O.map((V, Q) => /* @__PURE__ */ N(od, { ...V }, `planeimage-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22545
22564
  z ? z.map((V, Q) => /* @__PURE__ */ N(Of, { ...V }, `guitext-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22546
- W && /* @__PURE__ */ N(bd, { ...W }),
22565
+ W && /* @__PURE__ */ N(kd, { ...W }),
22547
22566
  U ? U.map((V, Q) => /* @__PURE__ */ N(ed, { ...V }, `particlesystem-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22548
22567
  ne ? ne.map((V, Q) => /* @__PURE__ */ N(td, { ...V }, `waterEffect-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22549
22568
  ee ? ee.map((V, Q) => /* @__PURE__ */ N(Cr, { ...V }, `modelLoaders-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22550
22569
  G ? G.map((V, Q) => /* @__PURE__ */ N(Qf, { ...V }, `modelanimtionloader-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22551
- le ? le.map((V, Q) => /* @__PURE__ */ N(Ho, { ...V, children: /* @__PURE__ */ N(gd, {}) }, `animation-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22570
+ le ? le.map((V, Q) => /* @__PURE__ */ N(Ho, { ...V, children: /* @__PURE__ */ N(vd, {}) }, `animation-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22552
22571
  re ? re.map((V, Q) => /* @__PURE__ */ N(Ho, { ...V, children: /* @__PURE__ */ N(
22553
- yd,
22572
+ Cd,
22554
22573
  {
22555
22574
  roadwayWidth: V.roadwayWidth,
22556
22575
  textureLength: V.textureLength,
@@ -22560,7 +22579,7 @@ const Qd = [
22560
22579
  }
22561
22580
  ) }, `animation-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22562
22581
  oe ? oe.map((V, Q) => /* @__PURE__ */ N(Ho, { ...V, children: /* @__PURE__ */ N(
22563
- Pd,
22582
+ bd,
22564
22583
  {
22565
22584
  timeSpeed: V.timeSpeed,
22566
22585
  perlinMultiply: V.perlinMultiply,
@@ -22573,12 +22592,12 @@ const Qd = [
22573
22592
  ) }, `animation-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22574
22593
  Y ? Y.map((V, Q) => /* @__PURE__ */ N(bf, { ...V }, `contourline-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22575
22594
  ce ? ce.map((V, Q) => /* @__PURE__ */ N(Ui, { ...V }, `tubeTool-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22576
- ae ? ae.map((V, Q) => /* @__PURE__ */ N(Kd, { ...V, children: V.main ? V.main.map((Me, Ae) => /* @__PURE__ */ N(qd, { ...Me }, `tubeMain-${Ae}`)) : null }, `tubeOil-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22595
+ ae ? ae.map((V, Q) => /* @__PURE__ */ N(Qd, { ...V, children: V.main ? V.main.map((Me, Ae) => /* @__PURE__ */ N(Kd, { ...Me }, `tubeMain-${Ae}`)) : null }, `tubeOil-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22577
22596
  X ? X.map((V, Q) => /* @__PURE__ */ N(Ji, { ...V }, `tubeLayer-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22578
- Se ? Se.map((V, Q) => /* @__PURE__ */ N(Zd, { ...V }, `tubeChartLine-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22597
+ Se ? Se.map((V, Q) => /* @__PURE__ */ N(Gd, { ...V }, `tubeChartLine-${Q}`)) : /* @__PURE__ */ N(ge, {}),
22579
22598
  Ce ? Ce.map((V, Q) => /* @__PURE__ */ N(Zi, { ...V }, `tubeChart-${Q}`)) : /* @__PURE__ */ N(ge, {})
22580
22599
  ] });
22581
- }, Jp = ht(ep), Xp = (e) => {
22600
+ }, Xp = ht(tp), qp = (e) => {
22582
22601
  const t = Ee(), n = Pe(null), { keyFrames: a, speed: i } = e;
22583
22602
  return ue(() => {
22584
22603
  if (t && n.current && n.current.animations.length === 0) {
@@ -22860,10 +22879,10 @@ const $n = {
22860
22879
  function Rt(e) {
22861
22880
  return e != null;
22862
22881
  }
22863
- const qp = (e) => {
22882
+ const Kp = (e) => {
22864
22883
  const t = Ee(), [n, a] = ye([]), [i, o] = ye([]), [r, l] = ye(F.Zero()), s = Qe(We), c = Pe(null), d = Pe(!1), [u, f] = ye([]), { url: g, name: p = "rod", visible: _ = !0, color: y } = e, m = et(
22865
22884
  (x) => {
22866
- var T, R, M;
22885
+ var T, R, L;
22867
22886
  const P = x.sliceList.filter((S) => !(S.v.length > 0)).map((S) => {
22868
22887
  const B = S.start ? S.start : {
22869
22888
  x: 0,
@@ -22872,7 +22891,7 @@ const qp = (e) => {
22872
22891
  };
22873
22892
  return new F(B.x, B.y, B.z);
22874
22893
  }), b = x.sliceList[x.sliceList.length - 1];
22875
- if (P.length > 0 && P.push(new F((T = b.end) == null ? void 0 : T.x, (R = b.end) == null ? void 0 : R.y, (M = b.end) == null ? void 0 : M.z)), P.length < 1)
22894
+ if (P.length > 0 && P.push(new F((T = b.end) == null ? void 0 : T.x, (R = b.end) == null ? void 0 : R.y, (L = b.end) == null ? void 0 : L.z)), P.length < 1)
22876
22895
  return;
22877
22896
  const A = bt.CreateTube(
22878
22897
  "tube-tmp",
@@ -22924,8 +22943,8 @@ const qp = (e) => {
22924
22943
  for (let C = 0; C < u.length; C++) {
22925
22944
  const T = u[C], R = x.createInstance("tubeinstance-sphere-" + C);
22926
22945
  R.setEnabled(_);
22927
- const M = r.multiply(De(s));
22928
- R.position = M.add(
22946
+ const L = r.multiply(De(s));
22947
+ R.position = L.add(
22929
22948
  new F((P = T.position) == null ? void 0 : P.x, (b = T.position) == null ? void 0 : b.y, (A = T.position) == null ? void 0 : A.z).multiply(
22930
22949
  De(s)
22931
22950
  )
@@ -22956,7 +22975,7 @@ const qp = (e) => {
22956
22975
  }
22957
22976
  );
22958
22977
  };
22959
- class Kp {
22978
+ class Qp {
22960
22979
  constructor(t) {
22961
22980
  _e(this, "children", []);
22962
22981
  _e(this, "params", {});
@@ -22983,7 +23002,7 @@ class Kp {
22983
23002
  n.render(a);
22984
23003
  }
22985
23004
  }
22986
- const tp = (e, t) => {
23005
+ const np = (e, t) => {
22987
23006
  const [n, a] = ye();
22988
23007
  return ue(() => {
22989
23008
  a(e.props);
@@ -22996,8 +23015,8 @@ const tp = (e, t) => {
22996
23015
  }),
22997
23016
  []
22998
23017
  ), n ? /* @__PURE__ */ N(e.type, { ...n }) : null;
22999
- }, np = ht(tp);
23000
- class op {
23018
+ }, op = ht(np);
23019
+ class rp {
23001
23020
  constructor(t, n) {
23002
23021
  _e(this, "value");
23003
23022
  _e(this, "type");
@@ -23009,7 +23028,7 @@ class op {
23009
23028
  }
23010
23029
  render() {
23011
23030
  var t;
23012
- return $.createElement(np, {
23031
+ return $.createElement(op, {
23013
23032
  ref: this.ref,
23014
23033
  key: (t = this.value.id) != null ? t : 0,
23015
23034
  props: this.value,
@@ -23017,8 +23036,8 @@ class op {
23017
23036
  });
23018
23037
  }
23019
23038
  }
23020
- function Qp(e, t) {
23021
- return new op(e, t);
23039
+ function jp(e, t) {
23040
+ return new rp(e, t);
23022
23041
  }
23023
23042
  const uo = 1e-8;
23024
23043
  function Vo(e, t) {
@@ -23071,7 +23090,7 @@ function Pr(e, t) {
23071
23090
  n[a] += t.x, n[a + 1] += t.y, n[a + 2] += t.z;
23072
23091
  return n;
23073
23092
  }
23074
- function rp(e) {
23093
+ function ip(e) {
23075
23094
  return {
23076
23095
  vertices: Pr(
23077
23096
  e.points,
@@ -23107,7 +23126,7 @@ function as(e) {
23107
23126
  colorId: e.colorId
23108
23127
  };
23109
23128
  }
23110
- function ip(e) {
23129
+ function ap(e) {
23111
23130
  const t = e[0], n = e[1], a = e[2], i = e[3], o = e[4], r = e[5], l = e[6], s = e[7], c = e[8];
23112
23131
  return rs(
23113
23132
  { x: t, y: n, z: a },
@@ -23115,7 +23134,7 @@ function ip(e) {
23115
23134
  { x: l - t, y: s - n, z: c - a }
23116
23135
  );
23117
23136
  }
23118
- function ap(e) {
23137
+ function sp(e) {
23119
23138
  const [t, n, a, i] = e, o = Vo(i, t), r = Vo(n, t), l = os(o, r), s = mn(l);
23120
23139
  if (mn(o) < uo)
23121
23140
  throw new Error("Invalid planeCorners: point1 and point4 must define a non-zero edge");
@@ -23144,13 +23163,13 @@ function ss(e, t) {
23144
23163
  }
23145
23164
  return n;
23146
23165
  }
23147
- function sp(e, t) {
23166
+ function lp(e, t) {
23148
23167
  const n = [];
23149
23168
  for (const a of e)
23150
23169
  n.push(a.x, a.y, a.z);
23151
23170
  return ss(n, t);
23152
23171
  }
23153
- function lp(e, t, n, a, i) {
23172
+ function cp(e, t, n, a, i) {
23154
23173
  const o = (t.v - n.v) * (e.u - n.u) + (n.u - t.u) * (e.v - n.v);
23155
23174
  if (Math.abs(o) < 1e-10) return [0, 0, 0, !1];
23156
23175
  const r = ((t.v - n.v) * (a - n.u) + (n.u - t.u) * (i - n.v)) / o, l = ((n.v - e.v) * (a - n.u) + (e.u - n.u) * (i - n.v)) / o, s = 1 - r - l;
@@ -23166,15 +23185,15 @@ function Yo(e, t) {
23166
23185
  const n = e[t];
23167
23186
  return [n.r, n.g, n.b, n.a];
23168
23187
  }
23169
- function cp(e, t, n, a, i, o) {
23188
+ function up(e, t, n, a, i, o) {
23170
23189
  const { indices: r, values: l, vMin: s, vMax: c, colorId: d } = e, { colorCodecs: u, colorIDs: f, colorCodecKey: g } = o, p = i.data, _ = !!(g && u && u[g]), y = _ ? u[g] : null;
23171
23190
  for (let m = 0; m < r.length; m += 3) {
23172
- const x = r[m], P = r[m + 1], b = r[m + 2], A = a[x], I = a[P], C = a[b], T = Math.max(0, Math.floor(Math.min(A.u, I.u, C.u))), R = Math.min(t - 1, Math.ceil(Math.max(A.u, I.u, C.u))), M = Math.max(0, Math.floor(Math.min(A.v, I.v, C.v))), S = Math.min(n - 1, Math.ceil(Math.max(A.v, I.v, C.v)));
23191
+ const x = r[m], P = r[m + 1], b = r[m + 2], A = a[x], I = a[P], C = a[b], T = Math.max(0, Math.floor(Math.min(A.u, I.u, C.u))), R = Math.min(t - 1, Math.ceil(Math.max(A.u, I.u, C.u))), L = Math.max(0, Math.floor(Math.min(A.v, I.v, C.v))), S = Math.min(n - 1, Math.ceil(Math.max(A.v, I.v, C.v)));
23173
23192
  let B, k, E;
23174
23193
  _ && y ? (B = Go(y, l[x], s, c), k = Go(y, l[P], s, c), E = Go(y, l[b], s, c)) : (B = Yo(f != null ? f : {}, d), k = Yo(f != null ? f : {}, d), E = Yo(f != null ? f : {}, d));
23175
- for (let v = M; v <= S; v++)
23194
+ for (let v = L; v <= S; v++)
23176
23195
  for (let O = T; O <= R; O++) {
23177
- const [z, W, U, ne] = lp(A, I, C, O, v);
23196
+ const [z, W, U, ne] = cp(A, I, C, O, v);
23178
23197
  if (!ne) continue;
23179
23198
  const ee = (v * t + O) * 4;
23180
23199
  p[ee] = Math.round(Math.max(0, Math.min(255, (z * B[0] + W * k[0] + U * E[0]) * 255))), p[ee + 1] = Math.round(
@@ -23193,7 +23212,7 @@ function ea(e) {
23193
23212
  o.u < t && (t = o.u), o.u > n && (n = o.u), o.v < a && (a = o.v), o.v > i && (i = o.v);
23194
23213
  return { minU: t, maxU: n, minV: a, maxV: i };
23195
23214
  }
23196
- function up(e, t, n, a) {
23215
+ function fp(e, t, n, a) {
23197
23216
  var s, c, d;
23198
23217
  const i = (s = a.renderScale) != null ? s : 1, o = (c = a.maxCanvasWidth) != null ? c : 8192, r = (d = a.maxCanvasHeight) != null ? d : 8192;
23199
23218
  if (a.pixelsPerUnit != null && a.pixelsPerUnit > 0) {
@@ -23243,20 +23262,20 @@ function ls(e, t) {
23243
23262
  const n = e.filter((T) => T.vertices.length >= 9 && T.indices.length >= 3), a = n[0];
23244
23263
  if (!a)
23245
23264
  throw new Error("No valid mesh data to render");
23246
- const i = t.planeCorners ? ap(t.planeCorners) : ip(a.vertices), o = n.map((T) => ({
23265
+ const i = t.planeCorners ? sp(t.planeCorners) : ap(a.vertices), o = n.map((T) => ({
23247
23266
  meshData: T,
23248
23267
  points2D: ta(ss(T.vertices, i), t)
23249
23268
  }));
23250
23269
  let r = 1 / 0, l = -1 / 0, s = 1 / 0, c = -1 / 0;
23251
23270
  if (t.planeCorners) {
23252
- const T = ea(ta(sp(t.planeCorners, i), t));
23271
+ const T = ea(ta(lp(t.planeCorners, i), t));
23253
23272
  r = T.minU, l = T.maxU, s = T.minV, c = T.maxV;
23254
23273
  } else
23255
23274
  for (const { points2D: T } of o) {
23256
23275
  const R = ea(T);
23257
23276
  R.minU < r && (r = R.minU), R.maxU > l && (l = R.maxU), R.minV < s && (s = R.minV), R.maxV > c && (c = R.maxV);
23258
23277
  }
23259
- const d = l - r || 1, u = c - s || 1, f = d / u, { width: g, height: p } = up(f, d, u, t);
23278
+ const d = l - r || 1, u = c - s || 1, f = d / u, { width: g, height: p } = fp(f, d, u, t);
23260
23279
  let _ = g, y = p, m = 0, x = 0;
23261
23280
  f > g / p ? (y = g / f, x = (p - y) / 2) : (_ = p * f, m = (g - _) / 2);
23262
23281
  const P = _ / d, b = y / u, A = document.createElement("canvas");
@@ -23265,21 +23284,21 @@ function ls(e, t) {
23265
23284
  I.fillStyle = "#fff", I.fillRect(0, 0, g, p);
23266
23285
  const C = I.getImageData(0, 0, g, p);
23267
23286
  for (const { meshData: T, points2D: R } of o) {
23268
- const M = R.map((S) => ({
23287
+ const L = R.map((S) => ({
23269
23288
  u: (S.u - r) * P + m,
23270
23289
  v: (S.v - s) * b + x
23271
23290
  }));
23272
- cp(T, g, p, M, C, t);
23291
+ up(T, g, p, L, C, t);
23273
23292
  }
23274
23293
  return I.putImageData(C, 0, 0), { canvas: A, imageData: C };
23275
23294
  }
23276
23295
  function bo(e, t) {
23277
23296
  return ls([e], t);
23278
23297
  }
23279
- function fp(e, t = {}) {
23280
- return bo(rp(e), t);
23281
- }
23282
23298
  function dp(e, t = {}) {
23299
+ return bo(ip(e), t);
23300
+ }
23301
+ function pp(e, t = {}) {
23283
23302
  var o;
23284
23303
  const n = (o = t.sliceIndex) != null ? o : 0, a = e.slices[n];
23285
23304
  if (!a)
@@ -23291,37 +23310,37 @@ function dp(e, t = {}) {
23291
23310
  z: e.center.z
23292
23311
  })), bo(i, t);
23293
23312
  }
23294
- function jp(e, t = {}) {
23313
+ function eh(e, t = {}) {
23295
23314
  return bo(is(e), t);
23296
23315
  }
23297
- function pp(e, t = {}) {
23298
- return bo(as(e), t);
23299
- }
23300
23316
  function hp(e, t = {}) {
23301
- return ls(e.map(as), t);
23317
+ return bo(as(e), t);
23302
23318
  }
23303
23319
  function mp(e, t = {}) {
23304
- return fp(xr.decode(new Uint8Array(e)), t);
23320
+ return ls(e.map(as), t);
23305
23321
  }
23306
23322
  function gp(e, t = {}) {
23307
- return dp(yr.decode(new Uint8Array(e)), t);
23323
+ return dp(xr.decode(new Uint8Array(e)), t);
23308
23324
  }
23309
23325
  function vp(e, t = {}) {
23310
- return pp(an.decode(new Uint8Array(e)), t);
23326
+ return pp(yr.decode(new Uint8Array(e)), t);
23327
+ }
23328
+ function xp(e, t = {}) {
23329
+ return hp(an.decode(new Uint8Array(e)), t);
23311
23330
  }
23312
- function xp(e, t, n = {}) {
23331
+ function yp(e, t, n = {}) {
23313
23332
  if (eo.decode(new Uint8Array(e)).formations.length > 0 && t.length === 0)
23314
23333
  throw new Error("FormationGroup contains formations but no formation buffers were provided");
23315
23334
  const i = t.map((o) => an.decode(new Uint8Array(o)));
23316
- return hp(i, n);
23335
+ return mp(i, n);
23317
23336
  }
23318
- async function eh(e, t, n = {}) {
23337
+ async function th(e, t, n = {}) {
23319
23338
  const a = await fetch(e);
23320
23339
  if (!a.ok) throw new Error(`Failed to fetch slice data: ${a.status} ${a.statusText}`);
23321
- const i = await a.arrayBuffer(), o = t === "density" ? mp(i, n) : t === "formation" ? gp(i, n) : vp(i, n), r = await yp(o.canvas);
23340
+ const i = await a.arrayBuffer(), o = t === "density" ? gp(i, n) : t === "formation" ? vp(i, n) : xp(i, n), r = await Cp(o.canvas);
23322
23341
  return URL.createObjectURL(r);
23323
23342
  }
23324
- async function th(e, t = {}) {
23343
+ async function nh(e, t = {}) {
23325
23344
  var l;
23326
23345
  const n = await fetch(e);
23327
23346
  if (!n.ok) throw new Error(`Failed to fetch formation group data: ${n.status} ${n.statusText}`);
@@ -23333,9 +23352,9 @@ async function th(e, t = {}) {
23333
23352
  return d.arrayBuffer();
23334
23353
  })
23335
23354
  );
23336
- return xp(a, r, t);
23355
+ return yp(a, r, t);
23337
23356
  }
23338
- function yp(e) {
23357
+ function Cp(e) {
23339
23358
  return new Promise((t, n) => {
23340
23359
  e.toBlob(
23341
23360
  (a) => {
@@ -23345,30 +23364,30 @@ function yp(e) {
23345
23364
  );
23346
23365
  });
23347
23366
  }
23348
- function nh(e) {
23367
+ function oh(e) {
23349
23368
  return e.toDataURL("image/png");
23350
23369
  }
23351
23370
  export {
23352
23371
  cf as AttributeBody,
23353
23372
  hn as AxesViewerPosition,
23354
- Zp as CachePreload,
23373
+ Gp as CachePreload,
23355
23374
  $e as CacheType,
23356
23375
  uf as ColorCodec,
23357
23376
  xf as ComplexFormationManager,
23358
23377
  yf as Coordinate,
23359
23378
  kt as CustomShader,
23360
23379
  hr as DarkMetalMaterial,
23361
- Jp as DataBinding,
23380
+ Xp as DataBinding,
23362
23381
  Va as DensitySlice,
23363
23382
  Nf as FPS,
23364
- Gp as FlatMaterial,
23383
+ Yp as FlatMaterial,
23365
23384
  mr as FormationFace,
23366
23385
  Sf as FormationManager,
23367
23386
  Za as FormationSlice,
23368
23387
  gr as FormationVolume,
23369
23388
  lt as GUIText,
23370
23389
  Af as Geo3DCamera,
23371
- Yp as Geo3DUniversalCamera,
23390
+ Jp as Geo3DUniversalCamera,
23372
23391
  Ya as Geo3DViewer,
23373
23392
  Gf as GridDiagram,
23374
23393
  Ho as Ground,
@@ -23387,48 +23406,48 @@ export {
23387
23406
  ad as ProgressedAttributeBody,
23388
23407
  tf as ProgressedRemapColorByRedChannelMaterial,
23389
23408
  nf as ProgressedRepeatedTextureMaterial,
23390
- ih as PureComponents,
23409
+ ah as PureComponents,
23391
23410
  sd as RayClick,
23392
23411
  cn as RemapColorByRedChannelMaterial,
23393
23412
  Hn as RepeatedTextureMaterial,
23394
23413
  ld as RibbonLayer,
23395
- hd as RoadWay,
23396
- Xp as Roam,
23397
- qp as Rod,
23414
+ md as RoadWay,
23415
+ qp as Roam,
23416
+ Kp as Rod,
23398
23417
  tn as ScaleMode,
23399
- Kp as Scene,
23400
- bd as SkyBox,
23401
- Td as SpaceHeat,
23402
- kd as SpaceHeatObjectType,
23418
+ Qp as Scene,
23419
+ kd as SkyBox,
23420
+ Nd as SpaceHeat,
23421
+ Td as SpaceHeatObjectType,
23403
23422
  Wa as StructureLayer,
23404
- Sd as TileMap,
23405
- Nd as TileMapMode,
23406
- Dd as Tube,
23423
+ Id as TileMap,
23424
+ Sd as TileMapMode,
23425
+ Fd as Tube,
23407
23426
  Zi as TubeChart,
23408
- Zd as TubeChartLine,
23409
- Fd as TubeInstance,
23427
+ Gd as TubeChartLine,
23428
+ zd as TubeInstance,
23410
23429
  Ji as TubeLayer,
23411
- qd as TubeMain,
23412
- Kd as TubeOil,
23430
+ Kd as TubeMain,
23431
+ Qd as TubeOil,
23413
23432
  Ui as TubeTool,
23414
- Hp as Utils,
23415
- jd as VoxelGrid,
23416
- Vp as calcCompass,
23433
+ Vp as Utils,
23434
+ ep as VoxelGrid,
23435
+ Zp as calcCompass,
23417
23436
  It as calcGUIScale,
23418
23437
  nl as calcInvTransformNodeScale,
23419
23438
  De as calcTransformNodeScale,
23420
- yp as canvasToPngBlob,
23421
- nh as canvasToPngDataUrl,
23422
- Qp as createComponentInstance,
23423
- mp as renderDensitySliceFromBuffer,
23424
- fp as renderDensitySliceToCanvas,
23425
- vp as renderFormationFromBuffer,
23426
- xp as renderFormationGroupFromBuffers,
23427
- th as renderFormationGroupFromUrl,
23428
- hp as renderFormationGroupToCanvas,
23429
- jp as renderFormationSliceToCanvas,
23430
- gp as renderFormationSlicesFromBuffer,
23431
- dp as renderFormationSlicesToCanvas,
23432
- pp as renderFormationToCanvas,
23433
- eh as renderSliceFromUrl
23439
+ Cp as canvasToPngBlob,
23440
+ oh as canvasToPngDataUrl,
23441
+ jp as createComponentInstance,
23442
+ gp as renderDensitySliceFromBuffer,
23443
+ dp as renderDensitySliceToCanvas,
23444
+ xp as renderFormationFromBuffer,
23445
+ yp as renderFormationGroupFromBuffers,
23446
+ nh as renderFormationGroupFromUrl,
23447
+ mp as renderFormationGroupToCanvas,
23448
+ eh as renderFormationSliceToCanvas,
23449
+ vp as renderFormationSlicesFromBuffer,
23450
+ pp as renderFormationSlicesToCanvas,
23451
+ hp as renderFormationToCanvas,
23452
+ th as renderSliceFromUrl
23434
23453
  };