baselode 0.1.20 → 0.1.21

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.
@@ -6,7 +6,7 @@ import { EffectComposer as lt } from "three/examples/jsm/postprocessing/EffectCo
6
6
  import { RenderPass as ct } from "three/examples/jsm/postprocessing/RenderPass.js";
7
7
  import { OutlinePass as ut } from "three/examples/jsm/postprocessing/OutlinePass.js";
8
8
  import mt from "papaparse";
9
- const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole_id", lr = "hole_type", cr = "max_depth", ur = "surface_sample_id", ft = "surface_sample_type", ht = "datasource_surface_sample_id", xe = "project_id", bt = "report_number", ue = "latitude", me = "longitude", de = "elevation", fe = "easting", he = "northing", be = "crs", mr = "date_start", dr = "date_end", W = "azimuth", K = "dip", fr = "survey_type", pt = "sample_id", hr = "datasource_sample_id", ne = "from", Q = "to", pe = "mid", ge = "depth", gt = "strike", Fe = "alpha", ve = "beta", Ce = "geology_code", Ie = "geology_description", yt = "comments", G = "extra", br = -999.25, pr = -999.25, gr = {
9
+ const lr = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole_id", cr = "hole_type", ur = "max_depth", mr = "surface_sample_id", ft = "surface_sample_type", ht = "datasource_surface_sample_id", xe = "project_id", bt = "report_number", ue = "latitude", me = "longitude", de = "elevation", fe = "easting", he = "northing", be = "crs", dr = "date_start", fr = "date_end", W = "azimuth", K = "dip", hr = "survey_type", pt = "sample_id", br = "datasource_sample_id", ne = "from", Q = "to", pe = "mid", ge = "depth", gt = "strike", Fe = "alpha", ve = "beta", Ie = "geology_code", Ce = "geology_description", yt = "comments", G = "extra", pr = -999.25, gr = -999.25, yr = {
10
10
  // A unique hole identifier across the entire dataset and all future data sets
11
11
  [H]: "string",
12
12
  // The hole ID from the original collar source
@@ -32,7 +32,7 @@ const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole
32
32
  // Per-row dict of source-specific fields outside the canonical schema
33
33
  // (populated by `bundleExtras`; empty object when the source had nothing extra).
34
34
  [G]: "object"
35
- }, yr = {
35
+ }, _r = {
36
36
  // The unique hole id that maps to the collar and any other data tables
37
37
  [H]: "string",
38
38
  // The depth along the hole where the survey measurement was taken / started
@@ -47,7 +47,7 @@ const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole
47
47
  [K]: "number",
48
48
  // Per-row dict of source-specific fields outside the canonical schema.
49
49
  [G]: "object"
50
- }, _r = {
50
+ }, Mr = {
51
51
  // The unique hole id that maps to the collar and any other data tables
52
52
  [H]: "string",
53
53
  // The depth along the hole where the assay interval starts
@@ -62,16 +62,16 @@ const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole
62
62
  // Per-row dict of source-specific fields outside the canonical schema
63
63
  // (sample identifiers, lab metadata, detection-limit flags, etc.).
64
64
  [G]: "object"
65
- }, Mr = {
65
+ }, Er = {
66
66
  [H]: "string",
67
67
  [ne]: "number",
68
68
  [Q]: "number",
69
69
  [pe]: "number",
70
- [Ce]: "string",
71
70
  [Ie]: "string",
71
+ [Ce]: "string",
72
72
  // Per-row dict of source-specific fields outside the canonical schema.
73
73
  [G]: "object"
74
- }, Er = {
74
+ }, zr = {
75
75
  [H]: "string",
76
76
  [ge]: "number",
77
77
  [K]: "number",
@@ -81,7 +81,7 @@ const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole
81
81
  [yt]: "string",
82
82
  // Per-row dict of source-specific fields outside the canonical schema.
83
83
  [G]: "object"
84
- }, zr = {
84
+ }, Nr = {
85
85
  [H]: "string",
86
86
  [ne]: "number",
87
87
  [Q]: "number",
@@ -89,7 +89,7 @@ const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole
89
89
  // value columns are variable — not standardized here
90
90
  // Per-row dict of source-specific fields outside the canonical schema.
91
91
  [G]: "object"
92
- }, Nr = {
92
+ }, Or = {
93
93
  [pt]: "string",
94
94
  [ht]: "string",
95
95
  [bt]: "string",
@@ -115,7 +115,7 @@ const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole
115
115
  [be]: ["crs", "epsg", "projection"],
116
116
  [ne]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
117
117
  [Q]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
118
- [Ce]: [
118
+ [Ie]: [
119
119
  "geology_code",
120
120
  "geologycode",
121
121
  "lith1",
@@ -125,7 +125,7 @@ const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole
125
125
  "plot_lithology",
126
126
  "rock1"
127
127
  ],
128
- [Ie]: [
128
+ [Ce]: [
129
129
  "geology_description",
130
130
  "geologydescription",
131
131
  "geology_comment",
@@ -159,14 +159,14 @@ function se(e, t, n = "Operation failed") {
159
159
  const r = Et(t, n), o = new Error(`${e}: ${r.message}`);
160
160
  return o.cause = r, o;
161
161
  }
162
- function Or(e, t) {
162
+ function kr(e, t) {
163
163
  if (t !== void 0) {
164
164
  console.warn(`${ie} ${e}`, t);
165
165
  return;
166
166
  }
167
167
  console.warn(`${ie} ${e}`);
168
168
  }
169
- function kr(e) {
169
+ function Lr(e) {
170
170
  console.info(`${ie} ${e}`);
171
171
  }
172
172
  const J = "numeric", ae = "categorical", le = "comment", ee = "hidden", zt = "tadpole", ze = {
@@ -292,7 +292,7 @@ function Ar(e) {
292
292
  function Ot(e) {
293
293
  return ze[e] ?? ze[J];
294
294
  }
295
- function Lr(e) {
295
+ function Dr(e) {
296
296
  const t = Ot(e);
297
297
  return t.length ? e === J ? "line" : t[0].value : "markers+line";
298
298
  }
@@ -303,27 +303,27 @@ const Te = ["x", "y", "z", "dx", "dy", "dz"], kt = {
303
303
  dx: ["dx", "size_x", "sx", "sizex", "dim_x", "block_size_x"],
304
304
  dy: ["dy", "size_y", "sy", "sizey", "dim_y", "block_size_y"],
305
305
  dz: ["dz", "size_z", "sz", "sizez", "dim_z", "block_size_z"]
306
- }, Be = {};
306
+ }, Pe = {};
307
307
  Object.entries(kt).forEach(([e, t]) => {
308
308
  t.forEach((n) => {
309
- Be[n.toLowerCase()] = e;
309
+ Pe[n.toLowerCase()] = e;
310
310
  });
311
311
  });
312
- function At(e) {
312
+ function Lt(e) {
313
313
  const t = {};
314
314
  return Object.entries(e).forEach(([n, r]) => {
315
- const o = Be[n.toLowerCase().trim()] || n;
315
+ const o = Pe[n.toLowerCase().trim()] || n;
316
316
  t[o] = r;
317
317
  }), t;
318
318
  }
319
- function Dr(e) {
319
+ function Sr(e) {
320
320
  return new Promise((t, n) => {
321
321
  mt.parse(e, {
322
322
  header: !0,
323
323
  dynamicTyping: !0,
324
324
  skipEmptyLines: !0,
325
325
  complete: (r) => {
326
- const i = (r.data || []).map(At).filter(
326
+ const i = (r.data || []).map(Lt).filter(
327
327
  (c) => c.x !== null && c.y !== null && c.z !== null
328
328
  ), a = Object.keys(i[0] || {}).filter(
329
329
  (c) => !Te.includes(c)
@@ -336,7 +336,7 @@ function Dr(e) {
336
336
  });
337
337
  });
338
338
  }
339
- function Sr(e) {
339
+ function wr(e) {
340
340
  if (typeof e == "string")
341
341
  try {
342
342
  return JSON.parse(e);
@@ -346,7 +346,7 @@ function Sr(e) {
346
346
  if (e && typeof e == "object") return e;
347
347
  throw se("loadBlockModelMetadata", new Error("Invalid metadata source"));
348
348
  }
349
- function Lt(e, t) {
349
+ function At(e, t) {
350
350
  const n = e.map((i) => i[t]).filter((i) => i != null);
351
351
  if (n.length > 0 && n.every((i) => typeof i == "number")) {
352
352
  const i = Math.min(...n), a = Math.max(...n);
@@ -354,13 +354,13 @@ function Lt(e, t) {
354
354
  }
355
355
  return { type: "categorical", categories: [...new Set(n)], values: n };
356
356
  }
357
- function wr(e) {
357
+ function xr(e) {
358
358
  if (!e || e.length === 0) return {};
359
359
  const t = Object.keys(e[0]).filter(
360
360
  (r) => !Te.includes(r)
361
361
  ), n = {};
362
362
  return t.forEach((r) => {
363
- n[r] = Lt(e, r);
363
+ n[r] = At(e, r);
364
364
  }), n;
365
365
  }
366
366
  function Dt(e, t) {
@@ -371,7 +371,7 @@ function Dt(e, t) {
371
371
  })
372
372
  );
373
373
  }
374
- function xr(e, t = null) {
374
+ function Fr(e, t = null) {
375
375
  return (t ? Dt(e, t) : e).reduce((r, o) => {
376
376
  const i = Number(o.dx) || 0, a = Number(o.dy) || 0, c = Number(o.dz) || 0;
377
377
  return r + i * a * c;
@@ -395,8 +395,8 @@ function wt(e, t) {
395
395
  }
396
396
  let r = -1;
397
397
  for (let b = 0; b < n - 1; b++) {
398
- const A = Number(e[b].md), y = Number(e[b + 1].md);
399
- if (t >= A && t <= y) {
398
+ const L = Number(e[b].md), y = Number(e[b + 1].md);
399
+ if (t >= L && t <= y) {
400
400
  r = b;
401
401
  break;
402
402
  }
@@ -415,12 +415,12 @@ function wt(e, t) {
415
415
  let u, p, m;
416
416
  const h = Number(o.azimuth), d = Number(o.dip), g = Number(i.azimuth), N = Number(i.dip);
417
417
  if (Number.isFinite(h) && Number.isFinite(d)) {
418
- const b = Number.isFinite(g) && Number.isFinite(N) ? h + a * (g - h) : h, A = Number.isFinite(g) && Number.isFinite(N) ? d + a * (N - d) : d, y = b * Math.PI / 180, E = A * Math.PI / 180;
418
+ const b = Number.isFinite(g) && Number.isFinite(N) ? h + a * (g - h) : h, L = Number.isFinite(g) && Number.isFinite(N) ? d + a * (N - d) : d, y = b * Math.PI / 180, E = L * Math.PI / 180;
419
419
  u = Math.cos(E) * Math.sin(y), p = Math.cos(E) * Math.cos(y), m = -Math.sin(E);
420
420
  } else {
421
- const b = Number(i.x) - Number(o.x), A = Number(i.y) - Number(o.y), y = Number(i.z) - Number(o.z), E = Math.sqrt(b * b + A * A + y * y);
421
+ const b = Number(i.x) - Number(o.x), L = Number(i.y) - Number(o.y), y = Number(i.z) - Number(o.z), E = Math.sqrt(b * b + L * L + y * y);
422
422
  if (E < 1e-10) return { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 };
423
- u = b / E, p = A / E, m = y / E;
423
+ u = b / E, p = L / E, m = y / E;
424
424
  }
425
425
  const O = Math.sqrt(u * u + p * p + m * m);
426
426
  return O < 1e-10 ? { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 } : { x: c, y: l, z: s, dx: u / O, dy: p / O, dz: m / O };
@@ -438,7 +438,7 @@ function xt(e, t, n, r = {}) {
438
438
  s[1] * d[2] - s[2] * d[1],
439
439
  s[2] * d[0] - s[0] * d[2],
440
440
  s[0] * d[1] - s[1] * d[0]
441
- ], N = Math.sqrt(g[0] ** 2 + g[1] ** 2 + g[2] ** 2), O = N > 1e-10 ? [g[0] / N, g[1] / N, g[2] / N] : [0, 1, 0], b = o === "R" ? d : O, A = t * Math.PI / 180 * i, y = Math.cos(A), E = Math.sin(A), k = b[0] * s[0] + b[1] * s[1] + b[2] * s[2], D = [
441
+ ], N = Math.sqrt(g[0] ** 2 + g[1] ** 2 + g[2] ** 2), O = N > 1e-10 ? [g[0] / N, g[1] / N, g[2] / N] : [0, 1, 0], b = o === "R" ? d : O, L = t * Math.PI / 180 * i, y = Math.cos(L), E = Math.sin(L), k = b[0] * s[0] + b[1] * s[1] + b[2] * s[2], D = [
442
442
  s[1] * b[2] - s[2] * b[1],
443
443
  s[2] * b[0] - s[0] * b[2],
444
444
  s[0] * b[1] - s[1] * b[0]
@@ -446,8 +446,8 @@ function xt(e, t, n, r = {}) {
446
446
  b[0] * y + D[0] * E + s[0] * k * (1 - y),
447
447
  b[1] * y + D[1] * E + s[1] * k * (1 - y),
448
448
  b[2] * y + D[2] * E + s[2] * k * (1 - y)
449
- ], L = (90 - e) * Math.PI / 180, x = Math.cos(L), S = Math.sin(L), v = x * w[0] + S * s[0], I = x * w[1] + S * s[1], C = x * w[2] + S * s[2], B = Math.sqrt(v * v + I * I + C * C);
450
- return B < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: v / B, ny: I / B, nz: C / B };
449
+ ], A = (90 - e) * Math.PI / 180, x = Math.cos(A), S = Math.sin(A), v = x * w[0] + S * s[0], C = x * w[1] + S * s[1], I = x * w[2] + S * s[2], P = Math.sqrt(v * v + C * C + I * I);
450
+ return P < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: v / P, ny: C / P, nz: I / P };
451
451
  }
452
452
  function Ft(e, t, n = {}) {
453
453
  if (!(e != null && e.length) || !(t != null && t.length)) return [];
@@ -470,9 +470,9 @@ function Ft(e, t, n = {}) {
470
470
  if (!s) continue;
471
471
  const { x: u, y: p, z: m, dx: h, dy: d, dz: g } = s;
472
472
  let N, O, b;
473
- const A = i.alpha != null ? Number(i.alpha) : null, y = i.beta != null ? Number(i.beta) : null;
474
- if (Number.isFinite(A)) {
475
- const E = Number.isFinite(y) ? y : 0, k = xt(A, E, { dx: h, dy: d, dz: g }, n);
473
+ const L = i.alpha != null ? Number(i.alpha) : null, y = i.beta != null ? Number(i.beta) : null;
474
+ if (Number.isFinite(L)) {
475
+ const E = Number.isFinite(y) ? y : 0, k = xt(L, E, { dx: h, dy: d, dz: g }, n);
476
476
  N = k.nx, O = k.ny, b = k.nz;
477
477
  } else {
478
478
  const E = i.dip != null ? Number(i.dip) : null, k = i.azimuth != null ? Number(i.azimuth) : null;
@@ -484,7 +484,7 @@ function Ft(e, t, n = {}) {
484
484
  }
485
485
  return o;
486
486
  }
487
- const vt = "baselode", Fr = vt, Ct = [
487
+ const vt = "baselode", vr = vt, It = [
488
488
  "#8b1e3f",
489
489
  "#2563eb",
490
490
  "#16a34a",
@@ -513,7 +513,7 @@ const vt = "baselode", Fr = vt, Ct = [
513
513
  layout: {
514
514
  paper_bgcolor: M.bg,
515
515
  plot_bgcolor: M.bg,
516
- colorway: Ct,
516
+ colorway: It,
517
517
  font: {
518
518
  family: "Inter, system-ui, sans-serif",
519
519
  size: 12,
@@ -640,7 +640,7 @@ const vt = "baselode", Fr = vt, Ct = [
640
640
  }
641
641
  }]
642
642
  }
643
- }, vr = ye, _ = {
643
+ }, Ir = ye, _ = {
644
644
  bg: "#1b1b1f",
645
645
  panel: "#25252a",
646
646
  ink: "#f0f0e4",
@@ -652,19 +652,18 @@ const vt = "baselode", Fr = vt, Ct = [
652
652
  muted_1: "#8a8a80",
653
653
  muted_2: "#5e5e56",
654
654
  muted_3: "#3a3a34"
655
- }, Cr = "baselode-dark", Ir = {
655
+ }, Cr = "baselode-dark", Tr = {
656
656
  layout: {
657
657
  font: {
658
- family: "Inter, Arial, sans-serif",
658
+ family: "Inter, system-ui, sans-serif",
659
659
  color: _.ink,
660
- size: 14
660
+ size: 12
661
661
  },
662
662
  title: {
663
- x: 0.02,
664
- xanchor: "left",
663
+ x: 0.05,
665
664
  font: {
666
- family: "Inter, Arial, sans-serif",
667
- size: 22,
665
+ family: "Inter, system-ui, sans-serif",
666
+ size: 14,
668
667
  color: _.ink
669
668
  }
670
669
  },
@@ -684,9 +683,9 @@ const vt = "baselode", Fr = vt, Ct = [
684
683
  bgcolor: _.panel,
685
684
  bordercolor: _.accent,
686
685
  font: {
687
- family: "Inter, Arial, sans-serif",
686
+ family: "Inter, system-ui, sans-serif",
688
687
  color: _.ink,
689
- size: 13
688
+ size: 12
690
689
  }
691
690
  },
692
691
  legend: {
@@ -694,9 +693,9 @@ const vt = "baselode", Fr = vt, Ct = [
694
693
  bordercolor: _.line,
695
694
  borderwidth: 1,
696
695
  font: {
697
- family: "Inter, Arial, sans-serif",
696
+ family: "Inter, system-ui, sans-serif",
698
697
  color: _.ink,
699
- size: 12
698
+ size: 11
700
699
  },
701
700
  orientation: "h",
702
701
  yanchor: "bottom",
@@ -705,7 +704,10 @@ const vt = "baselode", Fr = vt, Ct = [
705
704
  x: 0
706
705
  },
707
706
  xaxis: {
708
- showline: !1,
707
+ showline: !0,
708
+ linewidth: 1,
709
+ linecolor: _.line,
710
+ mirror: !1,
709
711
  ticks: "outside",
710
712
  tickwidth: 1,
711
713
  tickcolor: _.muted_1,
@@ -714,11 +716,14 @@ const vt = "baselode", Fr = vt, Ct = [
714
716
  gridcolor: _.grid,
715
717
  gridwidth: 1,
716
718
  zeroline: !1,
717
- title_font: { color: _.ink },
718
- tickfont: { color: _.ink_soft }
719
+ title_font: { color: _.ink, size: 12 },
720
+ tickfont: { color: _.ink_soft, size: 10 }
719
721
  },
720
722
  yaxis: {
721
- showline: !1,
723
+ showline: !0,
724
+ linewidth: 1,
725
+ linecolor: _.line,
726
+ mirror: !1,
722
727
  ticks: "outside",
723
728
  tickwidth: 1,
724
729
  tickcolor: _.muted_1,
@@ -727,8 +732,8 @@ const vt = "baselode", Fr = vt, Ct = [
727
732
  gridcolor: _.grid,
728
733
  gridwidth: 1,
729
734
  zeroline: !1,
730
- title_font: { color: _.ink },
731
- tickfont: { color: _.ink_soft }
735
+ title_font: { color: _.ink, size: 12 },
736
+ tickfont: { color: _.ink_soft, size: 10 }
732
737
  },
733
738
  bargap: 0.18,
734
739
  bargroupgap: 0.08
@@ -795,7 +800,7 @@ const vt = "baselode", Fr = vt, Ct = [
795
800
  }
796
801
  }]
797
802
  }
798
- }, It = "#7f7f7f", te = {
803
+ }, Ct = "#7f7f7f", te = {
799
804
  Au: "#FFD700",
800
805
  // gold
801
806
  Ag: "#C0C0C0",
@@ -875,7 +880,7 @@ const vt = "baselode", Fr = vt, Ct = [
875
880
  commodity: te,
876
881
  lithology: Tt
877
882
  };
878
- function Bt(e, t, n = It) {
883
+ function Pt(e, t, n = Ct) {
879
884
  if (!t || e == null) return n;
880
885
  const r = String(e).trim();
881
886
  if (Object.prototype.hasOwnProperty.call(t, r)) return t[r];
@@ -884,7 +889,7 @@ function Bt(e, t, n = It) {
884
889
  if (String(i).trim().toLowerCase() === o) return a;
885
890
  return n;
886
891
  }
887
- function Pt(e) {
892
+ function Bt(e) {
888
893
  if (e == null) return {};
889
894
  if (typeof e == "string") {
890
895
  const t = e.trim().toLowerCase();
@@ -913,12 +918,12 @@ function Ht(e) {
913
918
  }
914
919
  return null;
915
920
  }
916
- const Gt = "#6b7280", jt = { l: 42, r: 4, t: 4, b: 30 }, Oe = 10, ke = 12;
917
- function Ae(e) {
921
+ const Gt = "#6b7280", jt = { l: 42, r: 4, t: 4, b: 36 }, Oe = 10, ke = 11, Ut = 6;
922
+ function Le(e) {
918
923
  return e ? typeof e == "string" ? { text: e } : e : {};
919
924
  }
920
- function Pe(e = {}) {
921
- const t = Ae(e.xaxis && e.xaxis.title), n = Ae(e.yaxis && e.yaxis.title);
925
+ function Be(e = {}) {
926
+ const t = Le(e.xaxis && e.xaxis.title), n = Le(e.yaxis && e.yaxis.title);
922
927
  return {
923
928
  ...e,
924
929
  margin: jt,
@@ -932,7 +937,8 @@ function Pe(e = {}) {
932
937
  },
933
938
  title: {
934
939
  ...t,
935
- font: { ...t.font || {}, size: ke }
940
+ font: { ...t.font || {}, size: ke },
941
+ standoff: t.standoff ?? Ut
936
942
  }
937
943
  },
938
944
  yaxis: {
@@ -949,7 +955,7 @@ function Pe(e = {}) {
949
955
  }
950
956
  };
951
957
  }
952
- function Tr(e, t) {
958
+ function Pr(e, t) {
953
959
  var r;
954
960
  if (!e || !t) return !1;
955
961
  const n = e.points || [];
@@ -989,11 +995,11 @@ function Br(e, t, n) {
989
995
  });
990
996
  }), o.sort((a, c) => c.z - a.z);
991
997
  }
992
- function Ut(e, t, n, r) {
998
+ function Yt(e, t, n, r) {
993
999
  if (!e.length) return { data: [], layout: {} };
994
1000
  const o = e.filter((m) => Number.isFinite(m == null ? void 0 : m.from) && Number.isFinite(m == null ? void 0 : m.to) && m.to > m.from).map((m) => ({ ...m, category: `${(m == null ? void 0 : m.val) ?? ""}`.trim() })).filter((m) => m.category !== "" && !/^(nan|null|none)$/i.test(m.category)).sort((m, h) => m.from - h.from || m.to - h.to);
995
1001
  if (!o.length) return { data: [], layout: {} };
996
- const i = Pt(n), a = [
1002
+ const i = Bt(n), a = [
997
1003
  "#1f77b4",
998
1004
  // blue
999
1005
  "#ff7f0e",
@@ -1025,7 +1031,7 @@ function Ut(e, t, n, r) {
1025
1031
  ], c = [...new Set(o.map((m) => m.category))];
1026
1032
  function l(m, h) {
1027
1033
  if (i && Object.keys(i).length > 0) {
1028
- const d = Bt(m, i, null);
1034
+ const d = Pt(m, i, null);
1029
1035
  if (d !== null) return d;
1030
1036
  }
1031
1037
  return a[h % a.length];
@@ -1047,7 +1053,7 @@ function Ut(e, t, n, r) {
1047
1053
  customdata: h.map((d) => [d.from, d.to]),
1048
1054
  hovertemplate: `${t}: ${m}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`
1049
1055
  };
1050
- }), layout: Pe({
1056
+ }), layout: Be({
1051
1057
  barmode: "overlay",
1052
1058
  bargap: 0,
1053
1059
  xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
@@ -1057,7 +1063,7 @@ function Ut(e, t, n, r) {
1057
1063
  template: r !== void 0 ? r : ye
1058
1064
  }) };
1059
1065
  }
1060
- function Yt(e, t, n, r, o) {
1066
+ function $t(e, t, n, r, o) {
1061
1067
  if (!e.length) return { data: [], layout: {} };
1062
1068
  const i = n === "bar", a = n === "markers", c = n === "line", l = r || Rt, s = r || Vt, u = {
1063
1069
  x: e.map((d) => d.val),
@@ -1086,7 +1092,7 @@ function Yt(e, t, n, r, o) {
1086
1092
  line: { color: l, width: 2 },
1087
1093
  marker: { size: 7, color: s },
1088
1094
  error_y: c ? void 0 : p
1089
- }], layout: Pe({
1095
+ }], layout: Be({
1090
1096
  xaxis: { title: t, zeroline: !1 },
1091
1097
  yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
1092
1098
  barmode: "overlay",
@@ -1094,14 +1100,14 @@ function Yt(e, t, n, r, o) {
1094
1100
  template: o !== void 0 ? o : ye
1095
1101
  }) };
1096
1102
  }
1097
- function $t({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
1103
+ function Xt({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
1098
1104
  if (!e || !e.length || !n) return { data: [], layout: {} };
1099
1105
  if (t || r === "categorical")
1100
- return Ut(e, n, o, i);
1106
+ return Yt(e, n, o, i);
1101
1107
  const a = Ht(n);
1102
- return Yt(e, n, r, a, i);
1108
+ return $t(e, n, r, a, i);
1103
1109
  }
1104
- function Pr(e = [], {
1110
+ function Rr(e = [], {
1105
1111
  fromCol: t = "from",
1106
1112
  toCol: n = "to",
1107
1113
  categoryCol: r = "geology_code",
@@ -1121,7 +1127,7 @@ function Pr(e = [], {
1121
1127
  errorPlus: s - p,
1122
1128
  errorMinus: p - l
1123
1129
  });
1124
- }), a.sort((c, l) => l.z - c.z), $t({
1130
+ }), a.sort((c, l) => l.z - c.z), Xt({
1125
1131
  points: a,
1126
1132
  isCategorical: !0,
1127
1133
  property: r,
@@ -1130,7 +1136,7 @@ function Pr(e = [], {
1130
1136
  template: i
1131
1137
  });
1132
1138
  }
1133
- const Xt = [
1139
+ const qt = [
1134
1140
  "#313695",
1135
1141
  "#4575b4",
1136
1142
  "#74add1",
@@ -1142,7 +1148,7 @@ const Xt = [
1142
1148
  "#d73027",
1143
1149
  "#a50026"
1144
1150
  ];
1145
- function qt(e = [], t = Xt) {
1151
+ function Zt(e = [], t = qt) {
1146
1152
  const n = e.filter((s) => Number.isFinite(s));
1147
1153
  if (!n.length)
1148
1154
  return {
@@ -1174,7 +1180,7 @@ function qt(e = [], t = Xt) {
1174
1180
  index: u,
1175
1181
  min: g,
1176
1182
  max: N,
1177
- label: Zt(g, N)
1183
+ label: Wt(g, N)
1178
1184
  };
1179
1185
  }), l = (i - o) / a;
1180
1186
  return {
@@ -1185,7 +1191,7 @@ function qt(e = [], t = Xt) {
1185
1191
  colors: t
1186
1192
  };
1187
1193
  }
1188
- function Zt(e, t) {
1194
+ function Wt(e, t) {
1189
1195
  const n = (r) => Number.isFinite(r) ? Math.abs(r) >= 1e3 ? r.toFixed(0) : Math.abs(r) >= 10 ? r.toFixed(1) : Math.abs(r) >= 0.1 ? r.toFixed(2) : r.toFixed(3) : "n/a";
1190
1196
  return `${n(e)} – ${n(t)}`;
1191
1197
  }
@@ -1201,7 +1207,7 @@ function Re(e, t) {
1201
1207
  }
1202
1208
  return -1;
1203
1209
  }
1204
- function Wt(e, t, n = "#8b1e3f") {
1210
+ function Kt(e, t, n = "#8b1e3f") {
1205
1211
  const r = Re(e, t);
1206
1212
  return r < 0 ? n : t.colors[r] || n;
1207
1213
  }
@@ -1212,7 +1218,7 @@ function j(e) {
1212
1218
  ...e.structuralMeshes
1213
1219
  ];
1214
1220
  }
1215
- const Kt = {
1221
+ const Jt = {
1216
1222
  bedding: "#2563eb",
1217
1223
  foliation: "#16a34a",
1218
1224
  joint: "#9333ea",
@@ -1221,11 +1227,11 @@ const Kt = {
1221
1227
  "shear zone": "#0ea5e9",
1222
1228
  "fault zone": "#ef4444"
1223
1229
  };
1224
- function Jt(e, t) {
1225
- const n = t || Kt, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
1230
+ function Qt(e, t) {
1231
+ const n = t || Jt, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
1226
1232
  return new f.Color(o).getHex();
1227
1233
  }
1228
- function Qt(e, t) {
1234
+ function en(e, t) {
1229
1235
  const n = e * Math.PI / 180, r = t * Math.PI / 180;
1230
1236
  return new f.Vector3(
1231
1237
  Math.sin(r) * Math.sin(n),
@@ -1236,7 +1242,7 @@ function Qt(e, t) {
1236
1242
  // Up component
1237
1243
  ).normalize();
1238
1244
  }
1239
- function en(e, t = {}) {
1245
+ function tn(e, t = {}) {
1240
1246
  const {
1241
1247
  radius: n = 5,
1242
1248
  discThickness: r = 0.2,
@@ -1253,10 +1259,10 @@ function en(e, t = {}) {
1253
1259
  g = new f.Vector3(s.nx, s.ny, s.nz).normalize();
1254
1260
  else {
1255
1261
  if (h == null || d == null || !Number.isFinite(h) || !Number.isFinite(d)) continue;
1256
- g = Qt(h, d);
1262
+ g = en(h, d);
1257
1263
  }
1258
1264
  const N = new f.CylinderGeometry(n, n, r, i, 1, !1), O = new f.MeshStandardMaterial({
1259
- color: Jt(s.structure_type, a),
1265
+ color: Qt(s.structure_type, a),
1260
1266
  transparent: !0,
1261
1267
  opacity: o,
1262
1268
  side: f.DoubleSide
@@ -1273,7 +1279,7 @@ function en(e, t = {}) {
1273
1279
  }
1274
1280
  return c;
1275
1281
  }
1276
- function tn(e, t, n, r = {}) {
1282
+ function nn(e, t, n, r = {}) {
1277
1283
  if (!e.scene || (Ve(e), !(t != null && t.length) || !(n != null && n.length))) return;
1278
1284
  const { maxDiscs: o = 3e3 } = r;
1279
1285
  let i = t;
@@ -1284,7 +1290,7 @@ function tn(e, t, n, r = {}) {
1284
1290
  i = s;
1285
1291
  }
1286
1292
  const a = n.flatMap((l) => (l.points || []).map((s) => ({ ...s, hole_id: l.id }))), c = Ft(i, a, r);
1287
- c.length && (e.structuralGroup = en(c, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((l) => {
1293
+ c.length && (e.structuralGroup = tn(c, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((l) => {
1288
1294
  l.isMesh && e.structuralMeshes.push(l);
1289
1295
  }), j(e));
1290
1296
  }
@@ -1293,11 +1299,11 @@ function Ve(e) {
1293
1299
  t.isMesh && (t.geometry.dispose(), t.material.dispose());
1294
1300
  }), e.structuralGroup = null), e.structuralMeshes = [], j(e);
1295
1301
  }
1296
- function nn(e, t) {
1302
+ function rn(e, t) {
1297
1303
  e.structuralGroup && (e.structuralGroup.visible = !!t);
1298
1304
  }
1299
- let rn = 0;
1300
- function on(e) {
1305
+ let on = 0;
1306
+ function sn(e) {
1301
1307
  let t, n, r, o;
1302
1308
  if ("width" in e || "height" in e || "x" in e && !("maxX" in e)) {
1303
1309
  const i = Number(e.x ?? 0), a = Number(e.y ?? 0), c = Number(e.width ?? 0), l = Number(e.height ?? 0);
@@ -1314,7 +1320,7 @@ function on(e) {
1314
1320
  );
1315
1321
  return { minX: t, minY: n, maxX: r, maxY: o };
1316
1322
  }
1317
- function sn(e) {
1323
+ function an(e) {
1318
1324
  if (e.type === "texture")
1319
1325
  return Promise.resolve(e.texture);
1320
1326
  let t, n = !1;
@@ -1343,23 +1349,23 @@ function sn(e) {
1343
1349
  );
1344
1350
  });
1345
1351
  }
1346
- async function Rr(e) {
1347
- const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++rn}`, c = e.name ?? a;
1352
+ async function Vr(e) {
1353
+ const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++on}`, c = e.name ?? a;
1348
1354
  let l = e.opacity ?? 1;
1349
1355
  if ((l < 0 || l > 1) && (console.warn(
1350
1356
  `[baselode] raster overlay "${a}": opacity ${l} is outside [0, 1] — clamped`
1351
1357
  ), l = Math.max(0, Math.min(1, l))), !t) throw new Error("raster overlay: options.source is required");
1352
1358
  if (!n) throw new Error("raster overlay: options.bounds is required");
1353
- const s = on(n), { minX: u, minY: p, maxX: m, maxY: h } = s, d = m - u, g = h - p, N = (u + m) / 2, O = (p + h) / 2, b = await sn(t), A = new f.PlaneGeometry(d, g), y = new f.MeshBasicMaterial({
1359
+ const s = sn(n), { minX: u, minY: p, maxX: m, maxY: h } = s, d = m - u, g = h - p, N = (u + m) / 2, O = (p + h) / 2, b = await an(t), L = new f.PlaneGeometry(d, g), y = new f.MeshBasicMaterial({
1354
1360
  map: b,
1355
1361
  transparent: !0,
1356
1362
  opacity: l,
1357
1363
  side: f.DoubleSide,
1358
1364
  depthWrite: !1
1359
- }), E = new f.Mesh(A, y);
1365
+ }), E = new f.Mesh(L, y);
1360
1366
  return E.position.set(N, O, r), E.renderOrder = i, E.visible = o, { id: a, name: c, mesh: E, texture: b, bounds: s, elevation: r, opacity: l, visible: o };
1361
1367
  }
1362
- function an(e, t) {
1368
+ function ln(e, t) {
1363
1369
  e.scene && (e.rasterOverlays.has(t.id) && _e(e, t.id), e.rasterOverlays.set(t.id, t), e.scene.add(t.mesh));
1364
1370
  }
1365
1371
  function _e(e, t) {
@@ -1367,27 +1373,27 @@ function _e(e, t) {
1367
1373
  const n = e.rasterOverlays.get(t);
1368
1374
  n && ((r = e.scene) == null || r.remove(n.mesh), n.mesh.geometry.dispose(), n.mesh.material.dispose(), n.texture && n.texture.dispose(), e.rasterOverlays.delete(t));
1369
1375
  }
1370
- function ln(e, t, n) {
1376
+ function cn(e, t, n) {
1371
1377
  const r = e.rasterOverlays.get(t);
1372
1378
  if (!r) return;
1373
1379
  const o = Math.max(0, Math.min(1, Number(n)));
1374
1380
  r.opacity = o, r.mesh.material.opacity = o, r.mesh.material.needsUpdate = !0;
1375
1381
  }
1376
- function cn(e, t, n) {
1382
+ function un(e, t, n) {
1377
1383
  const r = e.rasterOverlays.get(t);
1378
1384
  r && (r.visible = !!n, r.mesh.visible = r.visible);
1379
1385
  }
1380
- function un(e, t, n) {
1386
+ function mn(e, t, n) {
1381
1387
  const r = e.rasterOverlays.get(t);
1382
1388
  r && (r.elevation = Number(n), r.mesh.position.setZ(r.elevation));
1383
1389
  }
1384
- function mn(e, t) {
1390
+ function dn(e, t) {
1385
1391
  return e.rasterOverlays.get(t);
1386
1392
  }
1387
- function dn(e) {
1393
+ function fn(e) {
1388
1394
  return Array.from(e.rasterOverlays.values());
1389
1395
  }
1390
- function fn(e) {
1396
+ function hn(e) {
1391
1397
  for (const t of [...e.rasterOverlays.keys()])
1392
1398
  _e(e, t);
1393
1399
  }
@@ -1426,12 +1432,12 @@ function He(e) {
1426
1432
  }
1427
1433
  };
1428
1434
  }
1429
- function hn(e, t) {
1435
+ function bn(e, t) {
1430
1436
  if (!e.camera || !e.controls || !t) return !1;
1431
1437
  const n = t.camera || {}, r = t.target || {}, o = t.up || {};
1432
1438
  return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature = Me(t), !0) : !1;
1433
1439
  }
1434
- function bn(e) {
1440
+ function pn(e) {
1435
1441
  if (!e.viewChangeHandler) return;
1436
1442
  const t = Date.now();
1437
1443
  if (t - e._lastViewEmitMs < 250) return;
@@ -1444,19 +1450,19 @@ function Ee(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
1444
1450
  const c = (t + n) / 2, l = (r + o) / 2, s = (i + a) / 2, u = n - t, p = o - r, m = a - i, d = Math.max(u, p, m, 1) * 2;
1445
1451
  e.controls.target.set(c, l, s), e.camera.position.set(c + d, l + d, s + d), e.camera.lookAt(c, l, s), e.controls.update();
1446
1452
  }
1447
- function pn(e, t = 1e3) {
1453
+ function gn(e, t = 1e3) {
1448
1454
  !e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(t, t, t), e.camera.lookAt(0, 0, 0), e.controls.update());
1449
1455
  }
1450
- function gn(e, t = 2e3) {
1456
+ function yn(e, t = 2e3) {
1451
1457
  !e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(0, 0, t), e.camera.up.set(0, 1, 0), e.camera.lookAt(0, 0, 0), e.controls.update());
1452
1458
  }
1453
- function yn(e, t = 0, n = 0) {
1459
+ function _n(e, t = 0, n = 0) {
1454
1460
  e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
1455
1461
  }
1456
- function _n(e, t = 1.1) {
1462
+ function Mn(e, t = 1.1) {
1457
1463
  !e.controls || typeof e.controls.dollyIn != "function" || typeof e.controls.dollyOut != "function" || (t > 1 ? e.controls.dollyOut(t) : e.controls.dollyIn(1 / t), e.controls.update());
1458
1464
  }
1459
- function Mn(e, t = 1.2) {
1465
+ function En(e, t = 1.2) {
1460
1466
  if (!e.lastBounds) return;
1461
1467
  const {
1462
1468
  minX: n,
@@ -1468,13 +1474,13 @@ function Mn(e, t = 1.2) {
1468
1474
  } = e.lastBounds, l = (r - n) * t, s = (i - o) * t, u = (c - a) * t, p = (n + r) / 2, m = (o + i) / 2, h = (a + c) / 2, g = Math.max(l, s, u, 1) * 2;
1469
1475
  e.controls.target.set(p, m, h), e.camera.position.set(p + g, m + g, h + g), e.camera.lookAt(p, m, h), e.controls.update();
1470
1476
  }
1471
- const En = 1, zn = 120;
1472
- function Nn(e, t) {
1477
+ const zn = 1, Nn = 120;
1478
+ function On(e, t) {
1473
1479
  if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
1474
- const n = Math.min(zn, Math.max(En, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), i = e.camera.fov * Math.PI / 180, a = 2 * o * Math.tan(i / 2), c = n * Math.PI / 180, l = a / (2 * Math.tan(c / 2)), s = e.camera.position.clone().sub(r).normalize();
1480
+ const n = Math.min(Nn, Math.max(zn, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), i = e.camera.fov * Math.PI / 180, a = 2 * o * Math.tan(i / 2), c = n * Math.PI / 180, l = a / (2 * Math.tan(c / 2)), s = e.camera.position.clone().sub(r).normalize();
1475
1481
  return e.camera.position.copy(r).addScaledVector(s, l), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
1476
1482
  }
1477
- function On(e, t = "orbit") {
1483
+ function kn(e, t = "orbit") {
1478
1484
  if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
1479
1485
  e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
1480
1486
  else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
@@ -1484,13 +1490,13 @@ function On(e, t = "orbit") {
1484
1490
  }
1485
1491
  }
1486
1492
  const T = "#9ca3af";
1487
- function Le(e, t) {
1493
+ function Ae(e, t) {
1488
1494
  const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
1489
1495
  if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
1490
1496
  const o = Math.min(n, r), i = Math.max(n, r);
1491
1497
  return i <= o ? null : { segStart: o, segEnd: i };
1492
1498
  }
1493
- function kn(e, t, n) {
1499
+ function Ln(e, t, n) {
1494
1500
  let r = 0, o = 0;
1495
1501
  for (let a = 0; a < e.length; a += 1) {
1496
1502
  const c = e[a], l = Number(c == null ? void 0 : c.from), s = Number(c == null ? void 0 : c.to), u = Number(c == null ? void 0 : c.value);
@@ -1505,15 +1511,15 @@ function kn(e, t, n) {
1505
1511
  function An(e, t) {
1506
1512
  if (!Number.isFinite(e)) return new f.Color(T);
1507
1513
  if (Re(e, t) < 0) return new f.Color(T);
1508
- const r = Wt(e, t, T);
1514
+ const r = Kt(e, t, T);
1509
1515
  return new f.Color(r);
1510
1516
  }
1511
- function Ln(e) {
1517
+ function Dn(e) {
1512
1518
  if (!e || !String(e).trim()) return T;
1513
1519
  const t = Ge(String(e).toLowerCase().trim());
1514
1520
  return "#" + new f.Color().setHSL(t, 0.7, 0.5).getHexString();
1515
1521
  }
1516
- function Dn(e = {}) {
1522
+ function Sn(e = {}) {
1517
1523
  return {
1518
1524
  preserveView: !!e.preserveView,
1519
1525
  assayIntervalsByHole: e.assayIntervalsByHole || null,
@@ -1521,7 +1527,7 @@ function Dn(e = {}) {
1521
1527
  isCategoricalVariable: !!e.isCategoricalVariable
1522
1528
  };
1523
1529
  }
1524
- function Sn(e, t) {
1530
+ function wn(e, t) {
1525
1531
  if (!e || !t) return [];
1526
1532
  const n = [];
1527
1533
  return Object.values(e).forEach((r) => {
@@ -1537,10 +1543,10 @@ function oe(e) {
1537
1543
  project: e.project
1538
1544
  };
1539
1545
  }
1540
- function wn(e) {
1546
+ function xn(e) {
1541
1547
  return `${e ?? ""}`.trim().toLowerCase();
1542
1548
  }
1543
- function xn(e, t) {
1549
+ function Fn(e, t) {
1544
1550
  const n = `${e ?? ""}:${t ?? 0}`, r = Ge(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, a = new f.Color();
1545
1551
  return a.setHSL(i, 1, 0.5), a;
1546
1552
  }
@@ -1551,7 +1557,7 @@ function Ge(e) {
1551
1557
  n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
1552
1558
  return (n >>> 0) / 4294967295;
1553
1559
  }
1554
- function Fn(e, t, n) {
1560
+ function vn(e, t, n) {
1555
1561
  let r = null, o = 0;
1556
1562
  for (const i of e) {
1557
1563
  const a = Number(i == null ? void 0 : i.from), c = Number(i == null ? void 0 : i.to);
@@ -1561,13 +1567,13 @@ function Fn(e, t, n) {
1561
1567
  }
1562
1568
  return r;
1563
1569
  }
1564
- function vn(e, t) {
1570
+ function In(e, t) {
1565
1571
  if (!t || !e) return [];
1566
1572
  const n = e.id || e.holeId;
1567
1573
  if (!n) return [];
1568
1574
  const r = t[n];
1569
1575
  if (Array.isArray(r) && r.length) return r;
1570
- const o = wn(n);
1576
+ const o = xn(n);
1571
1577
  if (o) {
1572
1578
  const i = t[o];
1573
1579
  if (Array.isArray(i) && i.length) return i;
@@ -1576,10 +1582,10 @@ function vn(e, t) {
1576
1582
  }
1577
1583
  function Cn({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: a, isCategorical: c }) {
1578
1584
  if (!e)
1579
- return xn(r, o);
1585
+ return Fn(r, o);
1580
1586
  if (e === "__HAS_ASSAY__") {
1581
1587
  if (!(t != null && t.length)) return new f.Color(T);
1582
- const u = Le(i, a);
1588
+ const u = Ae(i, a);
1583
1589
  return u ? t.some((m) => {
1584
1590
  const h = Number(m == null ? void 0 : m.from), d = Number(m == null ? void 0 : m.to);
1585
1591
  if (!Number.isFinite(h) || !Number.isFinite(d)) return !1;
@@ -1588,58 +1594,58 @@ function Cn({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId
1588
1594
  }) ? new f.Color("#ff8c42") : new f.Color(T) : new f.Color(T);
1589
1595
  }
1590
1596
  if (!(t != null && t.length)) return new f.Color(T);
1591
- const l = Le(i, a);
1597
+ const l = Ae(i, a);
1592
1598
  if (!l) return new f.Color(T);
1593
1599
  if (c) {
1594
- const u = Fn(t, l.segStart, l.segEnd);
1595
- return new f.Color(Ln(u));
1600
+ const u = vn(t, l.segStart, l.segEnd);
1601
+ return new f.Color(Dn(u));
1596
1602
  }
1597
- const s = kn(t, l.segStart, l.segEnd);
1603
+ const s = Ln(t, l.segStart, l.segEnd);
1598
1604
  return An(s, n);
1599
1605
  }
1600
- function In(e, t, n = {}) {
1606
+ function Tn(e, t, n = {}) {
1601
1607
  if (!e.scene || (je(e), !t || t.length === 0)) return;
1602
- const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: a } = Dn(n), c = a ? [] : Sn(o, i), l = qt(c);
1608
+ const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: a } = Sn(n), c = a ? [] : wn(o, i), l = Zt(c);
1603
1609
  let s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0, h = 1 / 0, d = -1 / 0;
1604
1610
  const g = new f.Vector3(), N = new f.Vector3(0, 1, 0);
1605
1611
  t.forEach((O, b) => {
1606
- const y = b * 137.5 % 360 / 360, E = new f.Color().setHSL(y, 0.75, 0.55), k = (O.points || []).map((L) => {
1607
- s = Math.min(s, L.x), u = Math.max(u, L.x), p = Math.min(p, L.y), m = Math.max(m, L.y), h = Math.min(h, L.z), d = Math.max(d, L.z);
1608
- const x = new f.Vector3(L.x, L.y, L.z);
1609
- return x.md = L.md, x;
1612
+ const y = b * 137.5 % 360 / 360, E = new f.Color().setHSL(y, 0.75, 0.55), k = (O.points || []).map((A) => {
1613
+ s = Math.min(s, A.x), u = Math.max(u, A.x), p = Math.min(p, A.y), m = Math.max(m, A.y), h = Math.min(h, A.z), d = Math.max(d, A.z);
1614
+ const x = new f.Vector3(A.x, A.y, A.z);
1615
+ return x.md = A.md, x;
1610
1616
  });
1611
1617
  if (k.length < 2) {
1612
1618
  if (k.length === 1) {
1613
- const L = new f.SphereGeometry(5, 12, 12), x = new f.MeshLambertMaterial({
1619
+ const A = new f.SphereGeometry(5, 12, 12), x = new f.MeshLambertMaterial({
1614
1620
  color: E,
1615
1621
  emissive: E,
1616
1622
  emissiveIntensity: 0.2
1617
- }), S = new f.Mesh(L, x);
1623
+ }), S = new f.Mesh(A, x);
1618
1624
  S.position.copy(k[0]), S.userData = oe(O), e.scene.add(S), e.drillLines.push(S), e.drillMeshes.push(S);
1619
1625
  }
1620
1626
  return;
1621
1627
  }
1622
1628
  const D = new f.Group();
1623
1629
  D.userData = oe(O);
1624
- const w = i ? vn(O, o) : [];
1625
- for (let L = 0; L < k.length - 1; L += 1) {
1626
- const x = k[L], S = k[L + 1], v = g.subVectors(S, x), I = v.length();
1627
- if (I <= 1e-3) continue;
1628
- const C = 2.2, B = new f.CylinderGeometry(C, C, I, 6, 1, !0), P = Cn({
1630
+ const w = i ? In(O, o) : [];
1631
+ for (let A = 0; A < k.length - 1; A += 1) {
1632
+ const x = k[A], S = k[A + 1], v = g.subVectors(S, x), C = v.length();
1633
+ if (C <= 1e-3) continue;
1634
+ const I = 2.2, P = new f.CylinderGeometry(I, I, C, 6, 1, !0), B = Cn({
1629
1635
  selectedAssayVariable: i,
1630
1636
  assayIntervals: w,
1631
1637
  assayScale: l,
1632
1638
  holeId: O.id,
1633
- segmentIndex: L,
1639
+ segmentIndex: A,
1634
1640
  p1: x,
1635
1641
  p2: S,
1636
1642
  isCategorical: a
1637
1643
  }), z = new f.MeshLambertMaterial({
1638
- color: P,
1644
+ color: B,
1639
1645
  flatShading: !0,
1640
- emissive: P,
1646
+ emissive: B,
1641
1647
  emissiveIntensity: 0.15
1642
- }), F = new f.Mesh(B, z);
1648
+ }), F = new f.Mesh(P, z);
1643
1649
  F.position.copy(x.clone().addScaledVector(v, 0.5)), F.quaternion.setFromUnitVectors(N, v.clone().normalize()), F.userData = oe(O), D.add(F), e.drillMeshes.push(F);
1644
1650
  }
1645
1651
  e.scene.add(D), e.drillLines.push(D);
@@ -1652,17 +1658,17 @@ function je(e) {
1652
1658
  }) : t.isMesh && (t.geometry.dispose(), t.material.dispose());
1653
1659
  }), e.drillLines = [], e.drillMeshes = [], j(e);
1654
1660
  }
1655
- const Tn = 20, Bn = 15, Pn = "#00bcd4";
1656
- function Rn(e = {}) {
1661
+ const Pn = 20, Bn = 15, Rn = "#00bcd4";
1662
+ function Vn(e = {}) {
1657
1663
  return {
1658
- panelWidth: e.panelWidth != null ? Number(e.panelWidth) : Tn,
1664
+ panelWidth: e.panelWidth != null ? Number(e.panelWidth) : Pn,
1659
1665
  lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) : Bn,
1660
- color: e.color || Pn,
1666
+ color: e.color || Rn,
1661
1667
  valueMin: e.valueMin != null ? Number(e.valueMin) : null,
1662
1668
  valueMax: e.valueMax != null ? Number(e.valueMax) : null
1663
1669
  };
1664
1670
  }
1665
- function Vr(e) {
1671
+ function Hr(e) {
1666
1672
  if (!e || e.length < 2) return null;
1667
1673
  let t = -1 / 0, n = 1 / 0;
1668
1674
  for (const o of e)
@@ -1670,19 +1676,19 @@ function Vr(e) {
1670
1676
  const r = t - n;
1671
1677
  return r < 1e-3 ? null : { topZ: t, botZ: n, height: r };
1672
1678
  }
1673
- function Vn(e, t, n, r, o, i, a) {
1679
+ function Hn(e, t, n, r, o, i, a) {
1674
1680
  if (!Array.isArray(e) || !Array.isArray(t)) return [];
1675
1681
  const c = Math.min(e.length, t.length), l = [];
1676
1682
  for (let b = 0; b < c; b++)
1677
1683
  Number.isFinite(e[b]) && Number.isFinite(t[b]) && l.push({ d: e[b], v: t[b] });
1678
1684
  if (l.length < 2) return [];
1679
1685
  const s = a != null && a > 0 ? a : null, u = s != null ? 0 : Math.min(...l.map((b) => b.d)), m = (s ?? Math.max(...l.map((b) => b.d))) - u || 1, h = Math.min(...l.map((b) => b.v)), d = Math.max(...l.map((b) => b.v)), g = o ?? h, O = (i ?? d) - g || 1;
1680
- return l.map(({ d: b, v: A }) => {
1681
- const y = (b - u) / m, E = Math.max(0, Math.min(1, (A - g) / O)), k = -n / 2 + E * n, D = y * r;
1686
+ return l.map(({ d: b, v: L }) => {
1687
+ const y = (b - u) / m, E = Math.max(0, Math.min(1, (L - g) / O)), k = -n / 2 + E * n, D = y * r;
1682
1688
  return new f.Vector3(k, D, 0.01);
1683
1689
  });
1684
1690
  }
1685
- function Hn(e, t) {
1691
+ function Gn(e, t) {
1686
1692
  const n = e.length;
1687
1693
  if (n < 2) return null;
1688
1694
  const r = [], o = [];
@@ -1710,7 +1716,7 @@ function Hn(e, t) {
1710
1716
  const a = new f.BufferGeometry();
1711
1717
  return a.setAttribute("position", new f.Float32BufferAttribute(r, 3)), a.setIndex(o), a;
1712
1718
  }
1713
- function Gn(e, t) {
1719
+ function jn(e, t) {
1714
1720
  const n = e.points || [];
1715
1721
  if (n.length < 2) return null;
1716
1722
  const r = n[0], o = n[n.length - 1], i = new f.Vector3(
@@ -1719,10 +1725,10 @@ function Gn(e, t) {
1719
1725
  o.z - r.z
1720
1726
  ), a = i.length();
1721
1727
  if (a < 1e-3) return null;
1722
- const c = i.clone().normalize(), l = Rn(t.options), { panelWidth: s, lateralOffset: u, color: p, valueMin: m, valueMax: h } = l, d = new f.Vector3(0, 0, 1);
1728
+ const c = i.clone().normalize(), l = Vn(t.options), { panelWidth: s, lateralOffset: u, color: p, valueMin: m, valueMax: h } = l, d = new f.Vector3(0, 0, 1);
1723
1729
  let g = new f.Vector3().crossVectors(c, d);
1724
1730
  g.lengthSq() < 1e-6 ? g.set(1, 0, 0) : g.normalize();
1725
- const N = new f.Vector3().crossVectors(g, c).normalize(), O = new f.Vector3(r.x, r.y, r.z).addScaledVector(g, u), b = new f.Matrix4().makeBasis(g, c, N), A = new f.Quaternion().setFromRotationMatrix(b), y = n.map((v) => v.md).filter(Number.isFinite), E = y.length > 0 ? Math.max(...y) : a, k = Vn(
1731
+ const N = new f.Vector3().crossVectors(g, c).normalize(), O = new f.Vector3(r.x, r.y, r.z).addScaledVector(g, u), b = new f.Matrix4().makeBasis(g, c, N), L = new f.Quaternion().setFromRotationMatrix(b), y = n.map((v) => v.md).filter(Number.isFinite), E = y.length > 0 ? Math.max(...y) : a, k = Hn(
1726
1732
  t.depths,
1727
1733
  t.values,
1728
1734
  s,
@@ -1734,15 +1740,15 @@ function Gn(e, t) {
1734
1740
  if (k.length < 2) return null;
1735
1741
  const D = new f.Group();
1736
1742
  D.userData = { holeId: e.id, isStripLog: !0 };
1737
- const w = s * 0.025, L = Hn(k, w);
1738
- if (!L) return null;
1743
+ const w = s * 0.025, A = Gn(k, w);
1744
+ if (!A) return null;
1739
1745
  const x = new f.MeshBasicMaterial({
1740
1746
  color: new f.Color(p),
1741
1747
  side: f.DoubleSide
1742
- }), S = new f.Mesh(L, x);
1743
- return S.position.copy(O), S.quaternion.copy(A), D.add(S), D;
1748
+ }), S = new f.Mesh(A, x);
1749
+ return S.position.copy(O), S.quaternion.copy(L), D.add(S), D;
1744
1750
  }
1745
- function jn(e, t, n) {
1751
+ function Un(e, t, n) {
1746
1752
  if (!e.scene || (ce(e), !n || n.length === 0) || !t || t.length === 0) return;
1747
1753
  const r = /* @__PURE__ */ new Map();
1748
1754
  t.forEach((o) => {
@@ -1750,7 +1756,7 @@ function jn(e, t, n) {
1750
1756
  }), n.forEach((o) => {
1751
1757
  const i = r.get(o.holeId);
1752
1758
  if (!i) return;
1753
- const a = Gn(i, o);
1759
+ const a = jn(i, o);
1754
1760
  a && (e.scene.add(a), e.stripLogGroups.push(a));
1755
1761
  });
1756
1762
  }
@@ -1761,16 +1767,16 @@ function ce(e) {
1761
1767
  });
1762
1768
  }), e.stripLogGroups = []);
1763
1769
  }
1764
- const De = "#ffffbb", Un = 2, Yn = 1.5, $n = 1;
1765
- function Xn(e) {
1770
+ const De = "#ffffbb", Yn = 2, $n = 1.5, Xn = 1;
1771
+ function qn(e) {
1766
1772
  const { renderer: t, scene: n, camera: r, container: o } = e;
1767
1773
  if (!t || !n || !r) return;
1768
1774
  const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, a = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, c = new lt(t), l = new ct(n, r);
1769
1775
  c.addPass(l);
1770
1776
  const s = new f.Vector2(i, a), u = new ut(s, n, r);
1771
- u.visibleEdgeColor.set(De), u.hiddenEdgeColor.set(De), u.edgeStrength = Un, u.edgeThickness = Yn, u.edgeGlow = $n, u.pulsePeriod = 0, u.selectedObjects = [], c.addPass(u), c.setSize(i, a), e._composer = c, e._outlinePass = u;
1777
+ u.visibleEdgeColor.set(De), u.hiddenEdgeColor.set(De), u.edgeStrength = Yn, u.edgeThickness = $n, u.edgeGlow = Xn, u.pulsePeriod = 0, u.selectedObjects = [], c.addPass(u), c.setSize(i, a), e._composer = c, e._outlinePass = u;
1772
1778
  }
1773
- function qn(e, t, n) {
1779
+ function Zn(e, t, n) {
1774
1780
  !e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
1775
1781
  }
1776
1782
  function Z(e, t) {
@@ -1779,7 +1785,7 @@ function Z(e, t) {
1779
1785
  function Se(e) {
1780
1786
  e._composer && (e._composer.dispose(), e._composer = null), e._outlinePass = null, e._selectedObject = null, e.selectables = [];
1781
1787
  }
1782
- const Zn = [
1788
+ const Wn = [
1783
1789
  { normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
1784
1790
  { normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
1785
1791
  { normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
@@ -1787,7 +1793,7 @@ const Zn = [
1787
1793
  { normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
1788
1794
  { normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
1789
1795
  ];
1790
- function Wn(e, t, n, r, o = {}) {
1796
+ function Kn(e, t, n, r, o = {}) {
1791
1797
  if (!e.scene || (Ue(e), !t || !n || !r)) return;
1792
1798
  const { autoCenter: i = !0, opacity: a = 1 } = o;
1793
1799
  let c = 1 / 0, l = -1 / 0, s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0;
@@ -1797,30 +1803,30 @@ function Wn(e, t, n, r, o = {}) {
1797
1803
  });
1798
1804
  let h = 0, d = 0, g = 0;
1799
1805
  o.offset ? (h = Number(o.offset.x ?? 0), d = Number(o.offset.y ?? 0), g = Number(o.offset.z ?? 0)) : i && (h = -((c + l) / 2), d = -((s + u) / 2), g = -((p + m) / 2));
1800
- const N = c + h, O = l + h, b = s + d, A = u + d, y = p + g, E = m + g, k = (z, F, R) => `${Math.round(z)},${Math.round(F)},${Math.round(R)}`, D = new Set(
1806
+ const N = c + h, O = l + h, b = s + d, L = u + d, y = p + g, E = m + g, k = (z, F, R) => `${Math.round(z)},${Math.round(F)},${Math.round(R)}`, D = new Set(
1801
1807
  t.map((z) => k(Number(z.x ?? 0), Number(z.y ?? 0), Number(z.z ?? 0)))
1802
- ), w = [], L = [], x = [], S = [], v = [];
1803
- let I = 0;
1808
+ ), w = [], A = [], x = [], S = [], v = [];
1809
+ let C = 0;
1804
1810
  if (t.forEach((z) => {
1805
1811
  const F = Number(z.x ?? z.center_x ?? 0), R = Number(z.y ?? z.center_y ?? 0), Y = Number(z.z ?? z.center_z ?? 0), $ = Number(z.dx ?? z.size_x ?? 1), X = Number(z.dy ?? z.size_y ?? 1), q = Number(z.dz ?? z.size_z ?? 1), $e = F + h, Xe = R + d, qe = Y + g, Ze = St(z[n], r, f), { r: We, g: Ke, b: Je } = Ze;
1806
- Zn.forEach((V) => {
1812
+ Wn.forEach((V) => {
1807
1813
  const Qe = F + V.neibDir[0] * $, et = R + V.neibDir[1] * X, tt = Y + V.neibDir[2] * q;
1808
1814
  if (D.has(k(Qe, et, tt))) return;
1809
- const U = I;
1815
+ const U = C;
1810
1816
  V.verts.forEach(([nt, rt, ot]) => {
1811
- w.push($e + nt * $ / 2, Xe + rt * X / 2, qe + ot * q / 2), L.push(V.normal[0], V.normal[1], V.normal[2]), x.push(We, Ke, Je), I++;
1817
+ w.push($e + nt * $ / 2, Xe + rt * X / 2, qe + ot * q / 2), A.push(V.normal[0], V.normal[1], V.normal[2]), x.push(We, Ke, Je), C++;
1812
1818
  }), S.push(U, U + 1, U + 2, U, U + 2, U + 3), v.push(z);
1813
1819
  });
1814
1820
  }), w.length === 0) return;
1815
- const C = new f.BufferGeometry();
1816
- C.setAttribute("position", new f.Float32BufferAttribute(w, 3)), C.setAttribute("normal", new f.Float32BufferAttribute(L, 3)), C.setAttribute("color", new f.Float32BufferAttribute(x, 3)), C.setIndex(S);
1817
- const B = new f.MeshLambertMaterial({
1821
+ const I = new f.BufferGeometry();
1822
+ I.setAttribute("position", new f.Float32BufferAttribute(w, 3)), I.setAttribute("normal", new f.Float32BufferAttribute(A, 3)), I.setAttribute("color", new f.Float32BufferAttribute(x, 3)), I.setIndex(S);
1823
+ const P = new f.MeshLambertMaterial({
1818
1824
  vertexColors: !0,
1819
1825
  transparent: a < 1,
1820
1826
  opacity: a,
1821
1827
  side: f.DoubleSide
1822
- }), P = new f.Mesh(C, B);
1823
- P.userData._isMergedBlocks = !0, P.userData._quadToBlock = v, P.userData._offset = { x: h, y: d, z: g }, e.scene.add(P), e.blocks.push(P), j(e), e.camera && e.controls && (e.lastBounds = { minX: N, maxX: O, minY: b, maxY: A, minZ: y, maxZ: E }, Ee(e, { minX: N, maxX: O, minY: b, maxY: A, minZ: y, maxZ: E }));
1828
+ }), B = new f.Mesh(I, P);
1829
+ B.userData._isMergedBlocks = !0, B.userData._quadToBlock = v, B.userData._offset = { x: h, y: d, z: g }, e.scene.add(B), e.blocks.push(B), j(e), e.camera && e.controls && (e.lastBounds = { minX: N, maxX: O, minY: b, maxY: L, minZ: y, maxZ: E }, Ee(e, { minX: N, maxX: O, minY: b, maxY: L, minZ: y, maxZ: E }));
1824
1830
  }
1825
1831
  function Ue(e) {
1826
1832
  var t;
@@ -1828,13 +1834,13 @@ function Ue(e) {
1828
1834
  e.scene.remove(n), n.geometry.dispose(), n.material.dispose();
1829
1835
  }), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null), j(e);
1830
1836
  }
1831
- function Kn(e, t) {
1837
+ function Jn(e, t) {
1832
1838
  const n = Math.max(0, Math.min(1, Number(t)));
1833
1839
  e.blocks.forEach((r) => {
1834
1840
  r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
1835
1841
  });
1836
1842
  }
1837
- function Jn(e, t, n) {
1843
+ function Qn(e, t, n) {
1838
1844
  const r = (n == null ? void 0 : n.x) ?? 0, o = (n == null ? void 0 : n.y) ?? 0, i = (n == null ? void 0 : n.z) ?? 0, a = Number(t.x ?? t.center_x ?? 0) + r, c = Number(t.y ?? t.center_y ?? 0) + o, l = Number(t.z ?? t.center_z ?? 0) + i, s = Number(t.dx ?? t.size_x ?? 1), u = Number(t.dy ?? t.size_y ?? 1), p = Number(t.dz ?? t.size_z ?? 1);
1839
1845
  if (!e._blockHighlightMesh) {
1840
1846
  const m = new f.BoxGeometry(1, 1, 1), h = new f.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
@@ -1857,16 +1863,16 @@ function Ye(e) {
1857
1863
  if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
1858
1864
  const a = Math.floor(n.faceIndex / 2), c = (i = r.userData._quadToBlock) == null ? void 0 : i[a];
1859
1865
  if (c) {
1860
- Z(e, Jn(e, c, r.userData._offset));
1866
+ Z(e, Qn(e, c, r.userData._offset));
1861
1867
  return;
1862
1868
  }
1863
1869
  }
1864
1870
  Z(e, r);
1865
1871
  }
1866
- function Qn(e) {
1872
+ function er(e) {
1867
1873
  const t = e.renderer;
1868
1874
  t && (e.handleCanvasClick = (n) => {
1869
- var h, d, g, N, O, b, A;
1875
+ var h, d, g, N, O, b, L;
1870
1876
  if (n.button !== 0) return;
1871
1877
  if ((h = e.gizmo) != null && h.domElement) {
1872
1878
  const y = e.gizmo.domElement.getBoundingClientRect();
@@ -1895,11 +1901,11 @@ function Qn(e) {
1895
1901
  let u = a[0].object;
1896
1902
  for (; u && u.parent && !((O = u.userData) != null && O.holeId); )
1897
1903
  u = u.parent;
1898
- const p = (b = u == null ? void 0 : u.userData) == null ? void 0 : b.holeId, m = (A = u == null ? void 0 : u.userData) == null ? void 0 : A.project;
1904
+ const p = (b = u == null ? void 0 : u.userData) == null ? void 0 : b.holeId, m = (L = u == null ? void 0 : u.userData) == null ? void 0 : L.project;
1899
1905
  p && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: p, project: m });
1900
1906
  }, t.domElement.addEventListener("click", e.handleCanvasClick));
1901
1907
  }
1902
- class Hr {
1908
+ class Gr {
1903
1909
  constructor() {
1904
1910
  this.container = null, this.scene = null, this.camera = null, this.renderer = null, this.controls = null, this.flyControls = null, this.gizmo = null, this.blocks = [], this.drillLines = [], this.drillMeshes = [], this.structuralGroup = null, this.structuralMeshes = [], this.stripLogGroups = [], this.frameId = null, this.clock = new f.Clock(), this.handleCanvasClick = null, this.raycaster = new f.Raycaster(), this.pointer = new f.Vector2(), this.drillholeClickHandler = null, this.blockClickHandler = null, this.controlMode = "orbit", this._tmpDir = new f.Vector3(), this.viewChangeHandler = null, this._lastViewSignature = "", this._lastViewEmitMs = 0, this.selectables = [], this._selectedObject = null, this._composer = null, this._blockHighlightMesh = null, this._outlinePass = null, this.rasterOverlays = /* @__PURE__ */ new Map();
1905
1911
  }
@@ -1927,7 +1933,7 @@ class Hr {
1927
1933
  offset: { top: 12, right: 12 },
1928
1934
  animated: !0,
1929
1935
  speed: 1.5
1930
- }), this.gizmo.attachControls(this.controls), Qn(this), this._wheelRelay = (l) => {
1936
+ }), this.gizmo.attachControls(this.controls), er(this), this._wheelRelay = (l) => {
1931
1937
  l.target !== this.renderer.domElement && (l.preventDefault(), this.renderer.domElement.dispatchEvent(new WheelEvent("wheel", {
1932
1938
  clientX: l.clientX,
1933
1939
  clientY: l.clientY,
@@ -1940,7 +1946,7 @@ class Hr {
1940
1946
  altKey: l.altKey,
1941
1947
  bubbles: !1
1942
1948
  })));
1943
- }, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }), Xn(this);
1949
+ }, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }), qn(this);
1944
1950
  const c = () => {
1945
1951
  var s;
1946
1952
  this.frameId = requestAnimationFrame(c);
@@ -1952,16 +1958,16 @@ class Hr {
1952
1958
  resize() {
1953
1959
  if (!this.container || !this.camera || !this.renderer) return;
1954
1960
  const t = this.container.clientWidth, n = this.container.clientHeight;
1955
- this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), qn(this, t, n);
1961
+ this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), Zn(this, t, n);
1956
1962
  }
1957
1963
  dispose() {
1958
- this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null, Ue(this), je(this), ce(this), Ve(this), fn(this), Se(this), this.container && this._wheelRelay && this.container.removeEventListener("wheel", this._wheelRelay), this.controls && this.controls.dispose(), this.flyControls && this.flyControls.dispose(), this.renderer && (this.renderer.dispose(), this.container && this.renderer.domElement && this.container.removeChild(this.renderer.domElement));
1964
+ this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null, Ue(this), je(this), ce(this), Ve(this), hn(this), Se(this), this.container && this._wheelRelay && this.container.removeEventListener("wheel", this._wheelRelay), this.controls && this.controls.dispose(), this.flyControls && this.flyControls.dispose(), this.renderer && (this.renderer.dispose(), this.container && this.renderer.domElement && this.container.removeChild(this.renderer.domElement));
1959
1965
  }
1960
1966
  // ---------------------------------------------------------------------------
1961
1967
  // Data renderers — delegate to domain modules
1962
1968
  // ---------------------------------------------------------------------------
1963
1969
  setDrillholes(t, n = {}) {
1964
- In(this, t, n);
1970
+ Tn(this, t, n);
1965
1971
  }
1966
1972
  /**
1967
1973
  * Add floating 2D strip log panels beside drillholes in the 3D scene.
@@ -1976,7 +1982,7 @@ class Hr {
1976
1982
  * - `options` {object} — optional: panelWidth, lateralOffset, color, valueMin, valueMax
1977
1983
  */
1978
1984
  setStripLogs(t, n) {
1979
- jn(this, t, n);
1985
+ Un(this, t, n);
1980
1986
  }
1981
1987
  /**
1982
1988
  * Remove all strip log panels from the scene and free GPU resources.
@@ -1992,20 +1998,20 @@ class Hr {
1992
1998
  * @param {Object} [options]
1993
1999
  */
1994
2000
  setBlocks(t, n, r, o = {}) {
1995
- Wn(this, t, n, r, o);
2001
+ Kn(this, t, n, r, o);
1996
2002
  }
1997
2003
  /**
1998
2004
  * Update the opacity of all currently rendered blocks.
1999
2005
  * @param {number} opacity - New opacity value between 0 and 1
2000
2006
  */
2001
2007
  setBlockOpacity(t) {
2002
- Kn(this, t);
2008
+ Jn(this, t);
2003
2009
  }
2004
2010
  setStructuralDiscs(t, n, r = {}) {
2005
- tn(this, t, n, r);
2011
+ nn(this, t, n, r);
2006
2012
  }
2007
2013
  setStructuralDiscsVisible(t) {
2008
- nn(this, t);
2014
+ rn(this, t);
2009
2015
  }
2010
2016
  // ---------------------------------------------------------------------------
2011
2017
  // Click handlers
@@ -2030,38 +2036,38 @@ class Hr {
2030
2036
  return He(this);
2031
2037
  }
2032
2038
  setViewState(t) {
2033
- return hn(this, t);
2039
+ return bn(this, t);
2034
2040
  }
2035
2041
  _buildViewSignature(t) {
2036
2042
  return Me(t);
2037
2043
  }
2038
2044
  _emitViewChangeIfNeeded() {
2039
- bn(this);
2045
+ pn(this);
2040
2046
  }
2041
2047
  _fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
2042
2048
  Ee(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a });
2043
2049
  }
2044
2050
  recenterCameraToOrigin(t = 1e3) {
2045
- pn(this, t);
2051
+ gn(this, t);
2046
2052
  }
2047
2053
  lookDown(t = 2e3) {
2048
- gn(this, t);
2054
+ yn(this, t);
2049
2055
  }
2050
2056
  pan(t = 0, n = 0) {
2051
- yn(this, t, n);
2057
+ _n(this, t, n);
2052
2058
  }
2053
2059
  dolly(t = 1.1) {
2054
- _n(this, t);
2060
+ Mn(this, t);
2055
2061
  }
2056
2062
  focusOnLastBounds(t = 1.2) {
2057
- Mn(this, t);
2063
+ En(this, t);
2058
2064
  }
2059
2065
  /**
2060
2066
  * Change the camera field-of-view while keeping the visible scene the same apparent size.
2061
2067
  * @param {number} fovDeg - Desired FOV in degrees
2062
2068
  */
2063
2069
  setCameraFov(t) {
2064
- Nn(this, t);
2070
+ On(this, t);
2065
2071
  }
2066
2072
  /**
2067
2073
  * Set the scene background colour.
@@ -2071,7 +2077,7 @@ class Hr {
2071
2077
  this.scene && (this.scene.background = new f.Color(t === "black" ? 0 : 16777215));
2072
2078
  }
2073
2079
  setControlMode(t = "orbit") {
2074
- On(this, t);
2080
+ kn(this, t);
2075
2081
  }
2076
2082
  // ---------------------------------------------------------------------------
2077
2083
  // Selection glow public API
@@ -2118,7 +2124,7 @@ class Hr {
2118
2124
  * @param {object} layer - Layer descriptor returned by createRasterOverlay()
2119
2125
  */
2120
2126
  addRasterOverlay(t) {
2121
- an(this, t);
2127
+ ln(this, t);
2122
2128
  }
2123
2129
  /**
2124
2130
  * Remove a raster overlay from the scene and dispose its GPU resources.
@@ -2133,7 +2139,7 @@ class Hr {
2133
2139
  * @param {number} opacity - New opacity [0, 1]
2134
2140
  */
2135
2141
  setRasterOverlayOpacity(t, n) {
2136
- ln(this, t, n);
2142
+ cn(this, t, n);
2137
2143
  }
2138
2144
  /**
2139
2145
  * Show or hide a raster overlay.
@@ -2141,7 +2147,7 @@ class Hr {
2141
2147
  * @param {boolean} visible
2142
2148
  */
2143
2149
  setRasterOverlayVisibility(t, n) {
2144
- cn(this, t, n);
2150
+ un(this, t, n);
2145
2151
  }
2146
2152
  /**
2147
2153
  * Update the elevation (Z position) of a raster overlay.
@@ -2149,7 +2155,7 @@ class Hr {
2149
2155
  * @param {number} elevation
2150
2156
  */
2151
2157
  setRasterOverlayElevation(t, n) {
2152
- un(this, t, n);
2158
+ mn(this, t, n);
2153
2159
  }
2154
2160
  /**
2155
2161
  * Return a raster overlay by id, or undefined if not found.
@@ -2157,39 +2163,39 @@ class Hr {
2157
2163
  * @returns {object|undefined}
2158
2164
  */
2159
2165
  getRasterOverlay(t) {
2160
- return mn(this, t);
2166
+ return dn(this, t);
2161
2167
  }
2162
2168
  /**
2163
2169
  * Return all raster overlay layers in insertion order.
2164
2170
  * @returns {object[]}
2165
2171
  */
2166
2172
  listRasterOverlays() {
2167
- return dn(this);
2173
+ return fn(this);
2168
2174
  }
2169
2175
  }
2170
2176
  export {
2171
2177
  be as $,
2172
2178
  W as A,
2173
- Mr as B,
2174
- Er as C,
2179
+ Er as B,
2180
+ zr as C,
2175
2181
  ge as D,
2176
2182
  fe as E,
2177
2183
  ne as F,
2178
- Ce as G,
2184
+ Ie as G,
2179
2185
  H,
2180
- Nr as I,
2186
+ Or as I,
2181
2187
  M as J,
2182
- vr as K,
2188
+ Ir as K,
2183
2189
  ue as L,
2184
2190
  pe as M,
2185
2191
  he as N,
2186
- Fr as O,
2192
+ vr as O,
2187
2193
  xe as P,
2188
2194
  vt as Q,
2189
2195
  ve as R,
2190
2196
  re as S,
2191
2197
  Q as T,
2192
- Hr as U,
2198
+ Gr as U,
2193
2199
  ze as V,
2194
2200
  dt as W,
2195
2201
  yt as X,
@@ -2197,111 +2203,111 @@ export {
2197
2203
  te as Z,
2198
2204
  Mt as _,
2199
2205
  me as a,
2200
- Or as a$,
2201
- ar as a0,
2206
+ kr as a$,
2207
+ lr as a0,
2202
2208
  we as a1,
2203
- hr as a2,
2209
+ br as a2,
2204
2210
  ht as a3,
2205
- dr as a4,
2206
- mr as a5,
2211
+ fr as a4,
2212
+ dr as a5,
2207
2213
  _t as a6,
2208
2214
  ee as a7,
2209
2215
  Gt as a8,
2210
2216
  G as a9,
2211
2217
  Me as aA,
2212
- xr as aB,
2213
- Lt as aC,
2214
- fn as aD,
2218
+ Fr as aB,
2219
+ At as aC,
2220
+ hn as aD,
2215
2221
  ce as aE,
2216
2222
  Ft as aF,
2217
- Rr as aG,
2218
- Lr as aH,
2219
- Qt as aI,
2220
- _n as aJ,
2221
- bn as aK,
2223
+ Vr as aG,
2224
+ Dr as aH,
2225
+ en as aI,
2226
+ Mn as aJ,
2227
+ pn as aK,
2222
2228
  Dt as aL,
2223
2229
  Ee as aM,
2224
- Mn as aN,
2225
- wr as aO,
2226
- Ln as aP,
2230
+ En as aN,
2231
+ xr as aO,
2232
+ Dn as aP,
2227
2233
  St as aQ,
2228
- Bt as aR,
2234
+ Pt as aR,
2229
2235
  Re as aS,
2230
- Wt as aT,
2231
- Vr as aU,
2232
- mn as aV,
2236
+ Kt as aT,
2237
+ Hr as aU,
2238
+ dn as aV,
2233
2239
  He as aW,
2234
2240
  wt as aX,
2235
- dn as aY,
2236
- Sr as aZ,
2237
- kr as a_,
2238
- It as aa,
2239
- zn as ab,
2240
- En as ac,
2241
- pr as ad,
2241
+ fn as aY,
2242
+ wr as aZ,
2243
+ Lr as a_,
2244
+ Ct as aa,
2245
+ Nn as ab,
2246
+ zn as ac,
2247
+ gr as ad,
2242
2248
  Ne as ae,
2243
- lr as af,
2249
+ cr as af,
2244
2250
  Tt as ag,
2245
- cr as ah,
2251
+ ur as ah,
2246
2252
  Rt as ai,
2247
2253
  Vt as aj,
2248
2254
  bt as ak,
2249
2255
  pt as al,
2250
2256
  gt as am,
2251
- Pn as an,
2257
+ Rn as an,
2252
2258
  Bn as ao,
2253
- Tn as ap,
2254
- ur as aq,
2259
+ Pn as ap,
2260
+ mr as aq,
2255
2261
  ft as ar,
2256
- fr as as,
2257
- an as at,
2262
+ hr as as,
2263
+ ln as at,
2258
2264
  xt as au,
2259
- Pr as av,
2260
- qt as aw,
2261
- Gn as ax,
2262
- Vn as ay,
2263
- en as az,
2265
+ Rr as av,
2266
+ Zt as aw,
2267
+ jn as ax,
2268
+ Hn as ay,
2269
+ tn as az,
2264
2270
  K as b,
2265
- gn as b0,
2266
- At as b1,
2267
- on as b2,
2268
- Rn as b3,
2269
- yn as b4,
2270
- Dr as b5,
2271
- pn as b6,
2271
+ yn as b0,
2272
+ Lt as b1,
2273
+ sn as b2,
2274
+ Vn as b3,
2275
+ _n as b4,
2276
+ Sr as b5,
2277
+ gn as b6,
2272
2278
  _e as b7,
2273
- Pt as b8,
2274
- On as b9,
2275
- Nn as ba,
2276
- un as bb,
2277
- ln as bc,
2278
- cn as bd,
2279
- jn as be,
2280
- hn as bf,
2279
+ Bt as b8,
2280
+ kn as b9,
2281
+ On as ba,
2282
+ mn as bb,
2283
+ cn as bc,
2284
+ un as bd,
2285
+ Un as be,
2286
+ bn as bf,
2281
2287
  Et as bg,
2282
2288
  Ar as c,
2283
2289
  de as d,
2284
- Ie as e,
2285
- br as f,
2290
+ Ce as e,
2291
+ pr as f,
2286
2292
  ye as g,
2287
2293
  le as h,
2288
- ae as i,
2289
- J as j,
2290
- Ot as k,
2291
- $t as l,
2292
- zt as m,
2293
- Tr as n,
2294
+ zt as i,
2295
+ ae as j,
2296
+ J as k,
2297
+ Ot as l,
2298
+ Xt as m,
2299
+ Pr as n,
2294
2300
  Br as o,
2295
2301
  Fe as p,
2296
- Xt as q,
2297
- Ct as r,
2302
+ qt as q,
2303
+ It as r,
2298
2304
  _ as s,
2299
- Ir as t,
2305
+ Tr as t,
2300
2306
  Cr as u,
2301
- _r as v,
2307
+ Mr as v,
2302
2308
  se as w,
2303
- gr as x,
2304
- yr as y,
2305
- zr as z
2309
+ yr as x,
2310
+ _r as y,
2311
+ Nr as z
2306
2312
  };
2307
- //# sourceMappingURL=baselode3dScene-qMfVRKxK.js.map
2313
+ //# sourceMappingURL=baselode3dScene-CLEvddGM.js.map