baselode 0.1.19 → 0.1.20

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.
@@ -1,86 +1,121 @@
1
1
  import * as f from "three";
2
- import { OrbitControls as rt } from "three/examples/jsm/controls/OrbitControls";
3
- import { FlyControls as ot } from "three/examples/jsm/controls/FlyControls";
4
- import { ViewportGizmo as it } from "three-viewport-gizmo";
5
- import { EffectComposer as st } from "three/examples/jsm/postprocessing/EffectComposer.js";
6
- import { RenderPass as at } from "three/examples/jsm/postprocessing/RenderPass.js";
7
- import { OutlinePass as lt } from "three/examples/jsm/postprocessing/OutlinePass.js";
8
- import ct from "papaparse";
9
- const H = "hole_id", Ne = "latitude", ke = "longitude", Oe = "elevation", Z = "azimuth", W = "dip", te = "from", J = "to", ce = "mid", Le = "project_id", De = "easting", Ae = "northing", we = "crs", ue = "depth", xe = "alpha", Se = "beta", ut = "strike", ve = "geology_code", Fe = "geology_description", Qn = {
2
+ import { OrbitControls as it } from "three/examples/jsm/controls/OrbitControls";
3
+ import { FlyControls as st } from "three/examples/jsm/controls/FlyControls";
4
+ import { ViewportGizmo as at } from "three-viewport-gizmo";
5
+ import { EffectComposer as lt } from "three/examples/jsm/postprocessing/EffectComposer.js";
6
+ import { RenderPass as ct } from "three/examples/jsm/postprocessing/RenderPass.js";
7
+ import { OutlinePass as ut } from "three/examples/jsm/postprocessing/OutlinePass.js";
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 = {
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
13
- datasource_hole_id: "string",
13
+ [we]: "string",
14
14
  // The project ID or project code from the original collar source, if available
15
- [Le]: "string",
15
+ [xe]: "string",
16
16
  // The latitude of the collar, in decimal degrees (WGS84)
17
- [Ne]: "number",
17
+ [ue]: "number",
18
18
  // The longitude of the collar, in decimal degrees (WGS84)
19
- [ke]: "number",
19
+ [me]: "number",
20
20
  // The elevation of the collar, in meters above sea level (WGS84)
21
- [Oe]: "number",
21
+ [de]: "number",
22
22
  // The easting coordinate of the collar, in meters (projected CRS)
23
- [De]: "number",
23
+ [fe]: "number",
24
24
  // The northing coordinate of the collar, in meters (projected CRS)
25
- [Ae]: "number",
26
- // The coordinate reference system of the collar coordinates for easting/northing, as an EPSG code or proj string
27
- [we]: "string"
28
- }, er = {
25
+ [he]: "number",
26
+ // The coordinate reference system of the collar coordinates for easting/northing,
27
+ // as an EPSG code or proj string
28
+ [be]: "string",
29
+ // Internal join key used by source schemas (e.g. raw_gswa) — distinct from
30
+ // the public hole_id.
31
+ [dt]: "string",
32
+ // Per-row dict of source-specific fields outside the canonical schema
33
+ // (populated by `bundleExtras`; empty object when the source had nothing extra).
34
+ [G]: "object"
35
+ }, yr = {
29
36
  // The unique hole id that maps to the collar and any other data tables
30
37
  [H]: "string",
31
38
  // The depth along the hole where the survey measurement was taken / started
32
- [ue]: "number",
33
- // The depth along the hole where the survey measurement ended, if applicable (some surveys are point measurements and may not have a 'to' depth)
34
- [J]: "number",
39
+ [ge]: "number",
40
+ // The depth along the hole where the survey measurement ended, if applicable
41
+ // (some surveys are point measurements and may not have a 'to' depth)
42
+ [Q]: "number",
35
43
  // The azimuth of the hole at the survey depth, in degrees from north
36
- [Z]: "number",
37
- // The dip of the hole at the survey depth, in degrees from horizontal (negative values indicate downward inclination)
38
- [W]: "number"
39
- }, tr = {
44
+ [W]: "number",
45
+ // The dip of the hole at the survey depth, in degrees from horizontal
46
+ // (negative values indicate downward inclination)
47
+ [K]: "number",
48
+ // Per-row dict of source-specific fields outside the canonical schema.
49
+ [G]: "object"
50
+ }, _r = {
40
51
  // The unique hole id that maps to the collar and any other data tables
41
52
  [H]: "string",
42
53
  // The depth along the hole where the assay interval starts
43
- [te]: "number",
54
+ [ne]: "number",
44
55
  // The depth along the hole where the assay interval ends
45
- [J]: "number",
56
+ [Q]: "number",
46
57
  // The midpoint depth of the assay interval
47
- [ce]: "number"
48
- // assay value columns are variable and not standardized here.
49
- // Assays may be flattened (one column per assay type) or long (one row per assay type with an additional 'assay_type' column)
50
- }, nr = {
58
+ [pe]: "number",
59
+ // assay value columns are variable and not standardized here.
60
+ // Assays may be flattened (one column per assay type) or long
61
+ // (one row per assay type with an additional 'assay_type' column).
62
+ // Per-row dict of source-specific fields outside the canonical schema
63
+ // (sample identifiers, lab metadata, detection-limit flags, etc.).
64
+ [G]: "object"
65
+ }, Mr = {
51
66
  [H]: "string",
52
- [te]: "number",
53
- [J]: "number",
54
- [ce]: "number",
55
- [ve]: "string",
56
- [Fe]: "string"
57
- }, rr = {
67
+ [ne]: "number",
68
+ [Q]: "number",
69
+ [pe]: "number",
70
+ [Ce]: "string",
71
+ [Ie]: "string",
72
+ // Per-row dict of source-specific fields outside the canonical schema.
73
+ [G]: "object"
74
+ }, Er = {
58
75
  [H]: "string",
59
- [ue]: "number",
76
+ [ge]: "number",
77
+ [K]: "number",
60
78
  [W]: "number",
61
- [Z]: "number",
62
- [xe]: "number",
63
- [Se]: "number",
64
- comments: "string"
65
- }, or = {
79
+ [Fe]: "number",
80
+ [ve]: "number",
81
+ [yt]: "string",
82
+ // Per-row dict of source-specific fields outside the canonical schema.
83
+ [G]: "object"
84
+ }, zr = {
66
85
  [H]: "string",
67
- [te]: "number",
68
- [J]: "number",
69
- [ce]: "number"
86
+ [ne]: "number",
87
+ [Q]: "number",
88
+ [pe]: "number",
70
89
  // value columns are variable — not standardized here
71
- }, ir = -999.25, mt = {
90
+ // Per-row dict of source-specific fields outside the canonical schema.
91
+ [G]: "object"
92
+ }, Nr = {
93
+ [pt]: "string",
94
+ [ht]: "string",
95
+ [bt]: "string",
96
+ [ue]: "number",
97
+ [me]: "number",
98
+ [de]: "number",
99
+ [fe]: "number",
100
+ [he]: "number",
101
+ [be]: "string",
102
+ [ft]: "string",
103
+ // Per-row dict of source-specific fields outside the canonical schema
104
+ // (analyte values, lab metadata, detection-limit flags, anumber, ...).
105
+ [G]: "object"
106
+ }, _t = {
72
107
  [H]: ["hole_id", "holeid", "hole id", "hole-id"],
73
- datasource_hole_id: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
74
- [Le]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
75
- [Ne]: ["latitude", "lat"],
76
- [ke]: ["longitude", "lon"],
77
- [Oe]: ["elevation", "rl", "elev", "z"],
78
- [De]: ["easting", "x"],
79
- [Ae]: ["northing", "y"],
80
- [we]: ["crs", "epsg", "projection"],
81
- [te]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
82
- [J]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
83
- [ve]: [
108
+ [we]: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
109
+ [xe]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
110
+ [ue]: ["latitude", "lat"],
111
+ [me]: ["longitude", "lon"],
112
+ [de]: ["elevation", "rl", "elev", "z"],
113
+ [fe]: ["easting", "x"],
114
+ [he]: ["northing", "y"],
115
+ [be]: ["crs", "epsg", "projection"],
116
+ [ne]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
117
+ [Q]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
118
+ [Ce]: [
84
119
  "geology_code",
85
120
  "geologycode",
86
121
  "lith1",
@@ -90,7 +125,7 @@ const H = "hole_id", Ne = "latitude", ke = "longitude", Oe = "elevation", Z = "a
90
125
  "plot_lithology",
91
126
  "rock1"
92
127
  ],
93
- [Fe]: [
128
+ [Ie]: [
94
129
  "geology_description",
95
130
  "geologydescription",
96
131
  "geology_comment",
@@ -101,57 +136,57 @@ const H = "hole_id", Ne = "latitude", ke = "longitude", Oe = "elevation", Z = "a
101
136
  "description",
102
137
  "comments"
103
138
  ],
104
- [Z]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdir_calc", "dipdirect_calc"],
105
- [W]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
106
- [xe]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
107
- [Se]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
139
+ [W]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdir_calc", "dipdirect_calc"],
140
+ [K]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
141
+ [Fe]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
142
+ [ve]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
108
143
  declination: ["declination", "dec"],
109
- [ue]: ["depth", "survey_depth", "surveydepth", "md", "measured_depth", "dept"],
110
- [ut]: ["strike", "str"]
111
- }, dt = {};
112
- for (const [e, t] of Object.entries(mt))
144
+ [ge]: ["depth", "survey_depth", "surveydepth", "md", "measured_depth", "dept"],
145
+ [gt]: ["strike", "str"]
146
+ }, Mt = {};
147
+ for (const [e, t] of Object.entries(_t))
113
148
  for (const n of t) {
114
149
  const r = n.toLowerCase().trim();
115
- dt[r] = e;
150
+ Mt[r] = e;
116
151
  }
117
- const oe = "[baselode:data]";
118
- function ft(e, t = "Unknown error") {
152
+ const ie = "[baselode:data]";
153
+ function Et(e, t = "Unknown error") {
119
154
  if (e instanceof Error) return e;
120
155
  const n = typeof e == "string" && e.trim() ? e : t;
121
156
  return new Error(n);
122
157
  }
123
- function ie(e, t, n = "Operation failed") {
124
- const r = ft(t, n), o = new Error(`${e}: ${r.message}`);
158
+ function se(e, t, n = "Operation failed") {
159
+ const r = Et(t, n), o = new Error(`${e}: ${r.message}`);
125
160
  return o.cause = r, o;
126
161
  }
127
- function sr(e, t) {
162
+ function Or(e, t) {
128
163
  if (t !== void 0) {
129
- console.warn(`${oe} ${e}`, t);
164
+ console.warn(`${ie} ${e}`, t);
130
165
  return;
131
166
  }
132
- console.warn(`${oe} ${e}`);
167
+ console.warn(`${ie} ${e}`);
133
168
  }
134
- function ar(e) {
135
- console.info(`${oe} ${e}`);
169
+ function kr(e) {
170
+ console.info(`${ie} ${e}`);
136
171
  }
137
- const K = "numeric", se = "categorical", ae = "comment", Q = "hidden", ht = "tadpole", be = {
138
- [K]: [
172
+ const J = "numeric", ae = "categorical", le = "comment", ee = "hidden", zt = "tadpole", ze = {
173
+ [J]: [
139
174
  { value: "bar", label: "Bars" },
140
175
  { value: "markers", label: "Markers" },
141
176
  { value: "markers+line", label: "Markers + Line" },
142
177
  { value: "line", label: "Line only" }
143
178
  ],
144
- [se]: [
179
+ [ae]: [
145
180
  { value: "categorical", label: "Categorical bands" }
146
181
  ],
147
- [ae]: [
182
+ [le]: [
148
183
  { value: "comment", label: "Comments" }
149
184
  ],
150
- [ht]: [
185
+ [zt]: [
151
186
  { value: "tadpole", label: "Tadpole" }
152
187
  ],
153
- [Q]: []
154
- }, ge = /* @__PURE__ */ new Set([
188
+ [ee]: []
189
+ }, Ne = /* @__PURE__ */ new Set([
155
190
  // Hole identifiers
156
191
  "hole_id",
157
192
  "holeid",
@@ -206,7 +241,7 @@ const K = "numeric", se = "categorical", ae = "comment", Q = "hidden", ht = "tad
206
241
  "data_source",
207
242
  "_hole_key",
208
243
  "_hole_id_key"
209
- ]), bt = /* @__PURE__ */ new Set([
244
+ ]), Nt = /* @__PURE__ */ new Set([
210
245
  "comments",
211
246
  "comment",
212
247
  "notes",
@@ -219,22 +254,22 @@ const K = "numeric", se = "categorical", ae = "comment", Q = "hidden", ht = "tad
219
254
  "structcomment",
220
255
  "geology_description"
221
256
  ]);
222
- function lr(e) {
257
+ function Ar(e) {
223
258
  if (!(e != null && e.length))
224
259
  return { byType: {}, numericCols: [], categoricalCols: [], commentCols: [] };
225
260
  const t = new Set(e.flatMap((r) => Object.keys(r || {}))), n = {};
226
261
  for (const r of t) {
227
262
  const o = r.toLowerCase().trim();
228
- if (ge.has(o) || ge.has(r)) {
229
- n[r] = Q;
263
+ if (Ne.has(o) || Ne.has(r)) {
264
+ n[r] = ee;
230
265
  continue;
231
266
  }
232
- if (bt.has(o)) {
267
+ if (Nt.has(o)) {
233
268
  const c = e.some((l) => {
234
269
  const s = l[r];
235
270
  return s != null && String(s).trim() !== "" && String(s) !== "null";
236
271
  });
237
- n[r] = c ? ae : Q;
272
+ n[r] = c ? le : ee;
238
273
  continue;
239
274
  }
240
275
  let i = !1, a = !1;
@@ -245,73 +280,73 @@ function lr(e) {
245
280
  break;
246
281
  }
247
282
  }
248
- a ? i ? n[r] = K : n[r] = se : n[r] = Q;
283
+ a ? i ? n[r] = J : n[r] = ae : n[r] = ee;
249
284
  }
250
285
  return {
251
286
  byType: n,
252
- numericCols: Object.entries(n).filter(([, r]) => r === K).map(([r]) => r),
253
- categoricalCols: Object.entries(n).filter(([, r]) => r === se).map(([r]) => r),
254
- commentCols: Object.entries(n).filter(([, r]) => r === ae).map(([r]) => r)
287
+ numericCols: Object.entries(n).filter(([, r]) => r === J).map(([r]) => r),
288
+ categoricalCols: Object.entries(n).filter(([, r]) => r === ae).map(([r]) => r),
289
+ commentCols: Object.entries(n).filter(([, r]) => r === le).map(([r]) => r)
255
290
  };
256
291
  }
257
- function gt(e) {
258
- return be[e] ?? be[K];
292
+ function Ot(e) {
293
+ return ze[e] ?? ze[J];
259
294
  }
260
- function cr(e) {
261
- const t = gt(e);
262
- return t.length ? e === K ? "line" : t[0].value : "markers+line";
295
+ function Lr(e) {
296
+ const t = Ot(e);
297
+ return t.length ? e === J ? "line" : t[0].value : "markers+line";
263
298
  }
264
- const Ie = ["x", "y", "z", "dx", "dy", "dz"], pt = {
299
+ const Te = ["x", "y", "z", "dx", "dy", "dz"], kt = {
265
300
  x: ["x", "easting", "center_x", "xc", "xcentre", "xcenter", "x_centre", "x_center", "cx"],
266
301
  y: ["y", "northing", "center_y", "yc", "ycentre", "ycenter", "y_centre", "y_center", "cy"],
267
302
  z: ["z", "elevation", "center_z", "zc", "zcentre", "zcenter", "z_centre", "z_center", "cz"],
268
303
  dx: ["dx", "size_x", "sx", "sizex", "dim_x", "block_size_x"],
269
304
  dy: ["dy", "size_y", "sy", "sizey", "dim_y", "block_size_y"],
270
305
  dz: ["dz", "size_z", "sz", "sizez", "dim_z", "block_size_z"]
271
- }, Ce = {};
272
- Object.entries(pt).forEach(([e, t]) => {
306
+ }, Be = {};
307
+ Object.entries(kt).forEach(([e, t]) => {
273
308
  t.forEach((n) => {
274
- Ce[n.toLowerCase()] = e;
309
+ Be[n.toLowerCase()] = e;
275
310
  });
276
311
  });
277
- function yt(e) {
312
+ function At(e) {
278
313
  const t = {};
279
314
  return Object.entries(e).forEach(([n, r]) => {
280
- const o = Ce[n.toLowerCase().trim()] || n;
315
+ const o = Be[n.toLowerCase().trim()] || n;
281
316
  t[o] = r;
282
317
  }), t;
283
318
  }
284
- function ur(e) {
319
+ function Dr(e) {
285
320
  return new Promise((t, n) => {
286
- ct.parse(e, {
321
+ mt.parse(e, {
287
322
  header: !0,
288
323
  dynamicTyping: !0,
289
324
  skipEmptyLines: !0,
290
325
  complete: (r) => {
291
- const i = (r.data || []).map(yt).filter(
326
+ const i = (r.data || []).map(At).filter(
292
327
  (c) => c.x !== null && c.y !== null && c.z !== null
293
328
  ), a = Object.keys(i[0] || {}).filter(
294
- (c) => !Ie.includes(c)
329
+ (c) => !Te.includes(c)
295
330
  );
296
331
  t({ data: i, properties: a });
297
332
  },
298
333
  error: (r) => {
299
- n(ie("parseBlockModelCSV", r));
334
+ n(se("parseBlockModelCSV", r));
300
335
  }
301
336
  });
302
337
  });
303
338
  }
304
- function mr(e) {
339
+ function Sr(e) {
305
340
  if (typeof e == "string")
306
341
  try {
307
342
  return JSON.parse(e);
308
343
  } catch (t) {
309
- throw ie("loadBlockModelMetadata", t);
344
+ throw se("loadBlockModelMetadata", t);
310
345
  }
311
346
  if (e && typeof e == "object") return e;
312
- throw ie("loadBlockModelMetadata", new Error("Invalid metadata source"));
347
+ throw se("loadBlockModelMetadata", new Error("Invalid metadata source"));
313
348
  }
314
- function _t(e, t) {
349
+ function Lt(e, t) {
315
350
  const n = e.map((i) => i[t]).filter((i) => i != null);
316
351
  if (n.length > 0 && n.every((i) => typeof i == "number")) {
317
352
  const i = Math.min(...n), a = Math.max(...n);
@@ -319,16 +354,16 @@ function _t(e, t) {
319
354
  }
320
355
  return { type: "categorical", categories: [...new Set(n)], values: n };
321
356
  }
322
- function dr(e) {
357
+ function wr(e) {
323
358
  if (!e || e.length === 0) return {};
324
359
  const t = Object.keys(e[0]).filter(
325
- (r) => !Ie.includes(r)
360
+ (r) => !Te.includes(r)
326
361
  ), n = {};
327
362
  return t.forEach((r) => {
328
- n[r] = _t(e, r);
363
+ n[r] = Lt(e, r);
329
364
  }), n;
330
365
  }
331
- function Mt(e, t) {
366
+ function Dt(e, t) {
332
367
  return !t || typeof t != "object" ? e : e.filter(
333
368
  (n) => Object.entries(t).every(([r, o]) => {
334
369
  const i = n[r];
@@ -336,13 +371,13 @@ function Mt(e, t) {
336
371
  })
337
372
  );
338
373
  }
339
- function fr(e, t = null) {
340
- return (t ? Mt(e, t) : e).reduce((r, o) => {
374
+ function xr(e, t = null) {
375
+ return (t ? Dt(e, t) : e).reduce((r, o) => {
341
376
  const i = Number(o.dx) || 0, a = Number(o.dy) || 0, c = Number(o.dz) || 0;
342
377
  return r + i * a * c;
343
378
  }, 0);
344
379
  }
345
- function zt(e, t, n) {
380
+ function St(e, t, n) {
346
381
  if (!t) return new n.Color("#888888");
347
382
  if (t.type === "numeric") {
348
383
  const i = t.max - t.min, c = (1 - (i === 0 ? 0.5 : (e - t.min) / i)) * 240;
@@ -351,7 +386,7 @@ function zt(e, t, n) {
351
386
  const o = t.categories.indexOf(e) / Math.max(t.categories.length, 1) * 360;
352
387
  return new n.Color().setHSL(o / 360, 0.7, 0.5);
353
388
  }
354
- function Et(e, t) {
389
+ function wt(e, t) {
355
390
  if (!e || e.length === 0 || !Number.isFinite(t)) return null;
356
391
  const n = e.length;
357
392
  if (n === 1) {
@@ -360,8 +395,8 @@ function Et(e, t) {
360
395
  }
361
396
  let r = -1;
362
397
  for (let b = 0; b < n - 1; b++) {
363
- const L = Number(e[b].md), y = Number(e[b + 1].md);
364
- if (t >= L && t <= y) {
398
+ const A = Number(e[b].md), y = Number(e[b + 1].md);
399
+ if (t >= A && t <= y) {
365
400
  r = b;
366
401
  break;
367
402
  }
@@ -377,44 +412,44 @@ function Et(e, t) {
377
412
  a = y > 0 ? (t - b) / y : 0;
378
413
  }
379
414
  const c = Number(o.x) + a * (Number(i.x) - Number(o.x)), l = Number(o.y) + a * (Number(i.y) - Number(o.y)), s = Number(o.z) + a * (Number(i.z) - Number(o.z));
380
- let u, g, m;
381
- const h = Number(o.azimuth), d = Number(o.dip), p = Number(i.azimuth), N = Number(i.dip);
415
+ let u, p, m;
416
+ const h = Number(o.azimuth), d = Number(o.dip), g = Number(i.azimuth), N = Number(i.dip);
382
417
  if (Number.isFinite(h) && Number.isFinite(d)) {
383
- const b = Number.isFinite(p) && Number.isFinite(N) ? h + a * (p - h) : h, L = Number.isFinite(p) && Number.isFinite(N) ? d + a * (N - d) : d, y = b * Math.PI / 180, z = L * Math.PI / 180;
384
- u = Math.cos(z) * Math.sin(y), g = Math.cos(z) * Math.cos(y), m = -Math.sin(z);
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;
419
+ u = Math.cos(E) * Math.sin(y), p = Math.cos(E) * Math.cos(y), m = -Math.sin(E);
385
420
  } else {
386
- const b = Number(i.x) - Number(o.x), L = Number(i.y) - Number(o.y), y = Number(i.z) - Number(o.z), z = Math.sqrt(b * b + L * L + y * y);
387
- if (z < 1e-10) return { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 };
388
- u = b / z, g = L / z, m = y / z;
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);
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;
389
424
  }
390
- const k = Math.sqrt(u * u + g * g + m * m);
391
- return k < 1e-10 ? { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 } : { x: c, y: l, z: s, dx: u / k, dy: g / k, dz: m / k };
425
+ const O = Math.sqrt(u * u + p * p + m * m);
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 };
392
427
  }
393
- function Nt(e, t, n, r = {}) {
428
+ function xt(e, t, n, r = {}) {
394
429
  const { betaZeroAxis: o = "B", betaHandedness: i = 1 } = r, { dx: a, dy: c, dz: l } = n, s = [a, c, l];
395
430
  let u = [0, 0, 1];
396
- const g = s[0] * u[0] + s[1] * u[1] + s[2] * u[2];
397
- Math.abs(g) > 0.99 && (u = [0, 1, 0]);
431
+ const p = s[0] * u[0] + s[1] * u[1] + s[2] * u[2];
432
+ Math.abs(p) > 0.99 && (u = [0, 1, 0]);
398
433
  const m = [
399
434
  u[1] * s[2] - u[2] * s[1],
400
435
  u[2] * s[0] - u[0] * s[2],
401
436
  u[0] * s[1] - u[1] * s[0]
402
- ], h = Math.sqrt(m[0] ** 2 + m[1] ** 2 + m[2] ** 2), d = h > 1e-10 ? [m[0] / h, m[1] / h, m[2] / h] : [1, 0, 0], p = [
437
+ ], h = Math.sqrt(m[0] ** 2 + m[1] ** 2 + m[2] ** 2), d = h > 1e-10 ? [m[0] / h, m[1] / h, m[2] / h] : [1, 0, 0], g = [
403
438
  s[1] * d[2] - s[2] * d[1],
404
439
  s[2] * d[0] - s[0] * d[2],
405
440
  s[0] * d[1] - s[1] * d[0]
406
- ], N = Math.sqrt(p[0] ** 2 + p[1] ** 2 + p[2] ** 2), k = N > 1e-10 ? [p[0] / N, p[1] / N, p[2] / N] : [0, 1, 0], b = o === "R" ? d : k, L = t * Math.PI / 180 * i, y = Math.cos(L), z = Math.sin(L), O = b[0] * s[0] + b[1] * s[1] + b[2] * s[2], A = [
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 = [
407
442
  s[1] * b[2] - s[2] * b[1],
408
443
  s[2] * b[0] - s[0] * b[2],
409
444
  s[0] * b[1] - s[1] * b[0]
410
- ], x = [
411
- b[0] * y + A[0] * z + s[0] * O * (1 - y),
412
- b[1] * y + A[1] * z + s[1] * O * (1 - y),
413
- b[2] * y + A[2] * z + s[2] * O * (1 - y)
414
- ], D = (90 - e) * Math.PI / 180, S = Math.cos(D), w = Math.sin(D), F = S * x[0] + w * s[0], C = S * x[1] + w * s[1], I = S * x[2] + w * s[2], T = Math.sqrt(F * F + C * C + I * I);
415
- return T < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: F / T, ny: C / T, nz: I / T };
416
- }
417
- function kt(e, t, n = {}) {
445
+ ], w = [
446
+ b[0] * y + D[0] * E + s[0] * k * (1 - y),
447
+ b[1] * y + D[1] * E + s[1] * k * (1 - y),
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 };
451
+ }
452
+ function Ft(e, t, n = {}) {
418
453
  if (!(e != null && e.length) || !(t != null && t.length)) return [];
419
454
  const r = /* @__PURE__ */ new Map();
420
455
  for (const i of t) {
@@ -431,25 +466,25 @@ function kt(e, t, n = {}) {
431
466
  if (!c || c.length === 0) continue;
432
467
  const l = i.depth != null ? Number(i.depth) : i.mid != null ? Number(i.mid) : null;
433
468
  if (!Number.isFinite(l)) continue;
434
- const s = Et(c, l);
469
+ const s = wt(c, l);
435
470
  if (!s) continue;
436
- const { x: u, y: g, z: m, dx: h, dy: d, dz: p } = s;
437
- let N, k, b;
438
- const L = i.alpha != null ? Number(i.alpha) : null, y = i.beta != null ? Number(i.beta) : null;
439
- if (Number.isFinite(L)) {
440
- const z = Number.isFinite(y) ? y : 0, O = Nt(L, z, { dx: h, dy: d, dz: p }, n);
441
- N = O.nx, k = O.ny, b = O.nz;
471
+ const { x: u, y: p, z: m, dx: h, dy: d, dz: g } = s;
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);
476
+ N = k.nx, O = k.ny, b = k.nz;
442
477
  } else {
443
- const z = i.dip != null ? Number(i.dip) : null, O = i.azimuth != null ? Number(i.azimuth) : null;
444
- if (!Number.isFinite(z) || !Number.isFinite(O)) continue;
445
- const A = z * Math.PI / 180, x = O * Math.PI / 180;
446
- N = Math.sin(x) * Math.sin(A), k = Math.cos(x) * Math.sin(A), b = Math.cos(A);
478
+ const E = i.dip != null ? Number(i.dip) : null, k = i.azimuth != null ? Number(i.azimuth) : null;
479
+ if (!Number.isFinite(E) || !Number.isFinite(k)) continue;
480
+ const D = E * Math.PI / 180, w = k * Math.PI / 180;
481
+ N = Math.sin(w) * Math.sin(D), O = Math.cos(w) * Math.sin(D), b = Math.cos(D);
447
482
  }
448
- o.push({ ...i, x: u, y: g, z: m, nx: N, ny: k, nz: b });
483
+ o.push({ ...i, x: u, y: p, z: m, nx: N, ny: O, nz: b });
449
484
  }
450
485
  return o;
451
486
  }
452
- const Ot = "baselode", hr = Ot, Lt = [
487
+ const vt = "baselode", Fr = vt, Ct = [
453
488
  "#8b1e3f",
454
489
  "#2563eb",
455
490
  "#16a34a",
@@ -474,11 +509,11 @@ const Ot = "baselode", hr = Ot, Lt = [
474
509
  muted_3: "#e2e8f0",
475
510
  primary: "#8b1e3f",
476
511
  primary_2: "#a8324f"
477
- }, me = {
512
+ }, ye = {
478
513
  layout: {
479
514
  paper_bgcolor: M.bg,
480
515
  plot_bgcolor: M.bg,
481
- colorway: Lt,
516
+ colorway: Ct,
482
517
  font: {
483
518
  family: "Inter, system-ui, sans-serif",
484
519
  size: 12,
@@ -605,7 +640,7 @@ const Ot = "baselode", hr = Ot, Lt = [
605
640
  }
606
641
  }]
607
642
  }
608
- }, br = me, _ = {
643
+ }, vr = ye, _ = {
609
644
  bg: "#1b1b1f",
610
645
  panel: "#25252a",
611
646
  ink: "#f0f0e4",
@@ -617,7 +652,7 @@ const Ot = "baselode", hr = Ot, Lt = [
617
652
  muted_1: "#8a8a80",
618
653
  muted_2: "#5e5e56",
619
654
  muted_3: "#3a3a34"
620
- }, gr = "baselode-dark", pr = {
655
+ }, Cr = "baselode-dark", Ir = {
621
656
  layout: {
622
657
  font: {
623
658
  family: "Inter, Arial, sans-serif",
@@ -760,7 +795,7 @@ const Ot = "baselode", hr = Ot, Lt = [
760
795
  }
761
796
  }]
762
797
  }
763
- }, Dt = "#7f7f7f", ee = {
798
+ }, It = "#7f7f7f", te = {
764
799
  Au: "#FFD700",
765
800
  // gold
766
801
  Ag: "#C0C0C0",
@@ -797,7 +832,7 @@ const Ot = "baselode", hr = Ot, Lt = [
797
832
  // aluminium / yellow
798
833
  U: "#8BC34A"
799
834
  // uranium / lime green
800
- }, At = {
835
+ }, Tt = {
801
836
  // Sedimentary
802
837
  shale: "#607D8B",
803
838
  mudstone: "#78909C",
@@ -836,11 +871,11 @@ const Ot = "baselode", hr = Ot, Lt = [
836
871
  calcite: "#F9FBE7",
837
872
  vein: "#FFFFFF",
838
873
  unknown: "#9E9E9E"
839
- }, ne = {
840
- commodity: ee,
841
- lithology: At
874
+ }, re = {
875
+ commodity: te,
876
+ lithology: Tt
842
877
  };
843
- function wt(e, t, n = Dt) {
878
+ function Bt(e, t, n = It) {
844
879
  if (!t || e == null) return n;
845
880
  const r = String(e).trim();
846
881
  if (Object.prototype.hasOwnProperty.call(t, r)) return t[r];
@@ -849,13 +884,13 @@ function wt(e, t, n = Dt) {
849
884
  if (String(i).trim().toLowerCase() === o) return a;
850
885
  return n;
851
886
  }
852
- function xt(e) {
887
+ function Pt(e) {
853
888
  if (e == null) return {};
854
889
  if (typeof e == "string") {
855
890
  const t = e.trim().toLowerCase();
856
- if (Object.prototype.hasOwnProperty.call(ne, t))
857
- return ne[t];
858
- const n = Object.keys(ne).sort().join(", ");
891
+ if (Object.prototype.hasOwnProperty.call(re, t))
892
+ return re[t];
893
+ const n = Object.keys(re).sort().join(", ");
859
894
  throw new RangeError(
860
895
  `Unknown built-in colour map '${e}'. Available maps: ${n}`
861
896
  );
@@ -865,39 +900,39 @@ function xt(e) {
865
900
  `colourMap must be null, a string, or a plain object; got ${Array.isArray(e) ? "Array" : Object.prototype.toString.call(e)}`
866
901
  );
867
902
  }
868
- const St = "#8b1e3f", vt = "#a8324f";
869
- function Ft(e) {
903
+ const Rt = "#8b1e3f", Vt = "#a8324f";
904
+ function Ht(e) {
870
905
  if (!e) return null;
871
906
  const t = e.split(/[_\-/\s]+/);
872
907
  for (const n of t) {
873
- if (Object.prototype.hasOwnProperty.call(ee, n))
874
- return ee[n];
908
+ if (Object.prototype.hasOwnProperty.call(te, n))
909
+ return te[n];
875
910
  const r = n.toLowerCase();
876
- for (const [o, i] of Object.entries(ee))
911
+ for (const [o, i] of Object.entries(te))
877
912
  if (o.toLowerCase() === r) return i;
878
913
  }
879
914
  return null;
880
915
  }
881
- const It = "#6b7280", Ct = { l: 42, r: 4, t: 4, b: 30 }, pe = 10, ye = 12;
882
- function _e(e) {
916
+ const Gt = "#6b7280", jt = { l: 42, r: 4, t: 4, b: 30 }, Oe = 10, ke = 12;
917
+ function Ae(e) {
883
918
  return e ? typeof e == "string" ? { text: e } : e : {};
884
919
  }
885
- function Be(e = {}) {
886
- const t = _e(e.xaxis && e.xaxis.title), n = _e(e.yaxis && e.yaxis.title);
920
+ function Pe(e = {}) {
921
+ const t = Ae(e.xaxis && e.xaxis.title), n = Ae(e.yaxis && e.yaxis.title);
887
922
  return {
888
923
  ...e,
889
- margin: Ct,
924
+ margin: jt,
890
925
  autosize: !0,
891
926
  width: void 0,
892
927
  xaxis: {
893
928
  ...e.xaxis || {},
894
929
  tickfont: {
895
930
  ...e.xaxis && e.xaxis.tickfont || {},
896
- size: pe
931
+ size: Oe
897
932
  },
898
933
  title: {
899
934
  ...t,
900
- font: { ...t.font || {}, size: ye }
935
+ font: { ...t.font || {}, size: ke }
901
936
  }
902
937
  },
903
938
  yaxis: {
@@ -905,16 +940,16 @@ function Be(e = {}) {
905
940
  automargin: !0,
906
941
  tickfont: {
907
942
  ...e.yaxis && e.yaxis.tickfont || {},
908
- size: pe
943
+ size: Oe
909
944
  },
910
945
  title: {
911
946
  ...n,
912
- font: { ...n.font || {}, size: ye }
947
+ font: { ...n.font || {}, size: ke }
913
948
  }
914
949
  }
915
950
  };
916
951
  }
917
- function yr(e, t) {
952
+ function Tr(e, t) {
918
953
  var r;
919
954
  if (!e || !t) return !1;
920
955
  const n = e.points || [];
@@ -925,7 +960,7 @@ function yr(e, t) {
925
960
  }
926
961
  return !1;
927
962
  }
928
- function _r(e, t, n) {
963
+ function Br(e, t, n) {
929
964
  if (!e || !t) return [];
930
965
  const r = (e == null ? void 0 : e.points) || [], o = [], i = /* @__PURE__ */ new Set();
931
966
  return r.forEach((a) => {
@@ -943,22 +978,22 @@ function _r(e, t, n) {
943
978
  const u = `${t}:${c}-${l}:${String(s)}`;
944
979
  if (i.has(u)) return;
945
980
  i.add(u);
946
- const g = (c + l) / 2, m = n ? s : Number(s);
981
+ const p = (c + l) / 2, m = n ? s : Number(s);
947
982
  !n && !Number.isFinite(m) || o.push({
948
- z: g,
983
+ z: p,
949
984
  val: m,
950
985
  from: c,
951
986
  to: l,
952
- errorPlus: l - g,
953
- errorMinus: g - c
987
+ errorPlus: l - p,
988
+ errorMinus: p - c
954
989
  });
955
990
  }), o.sort((a, c) => c.z - a.z);
956
991
  }
957
- function Bt(e, t, n, r) {
992
+ function Ut(e, t, n, r) {
958
993
  if (!e.length) return { data: [], layout: {} };
959
994
  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);
960
995
  if (!o.length) return { data: [], layout: {} };
961
- const i = xt(n), a = [
996
+ const i = Pt(n), a = [
962
997
  "#1f77b4",
963
998
  // blue
964
999
  "#ff7f0e",
@@ -990,7 +1025,7 @@ function Bt(e, t, n, r) {
990
1025
  ], c = [...new Set(o.map((m) => m.category))];
991
1026
  function l(m, h) {
992
1027
  if (i && Object.keys(i).length > 0) {
993
- const d = wt(m, i, null);
1028
+ const d = Bt(m, i, null);
994
1029
  if (d !== null) return d;
995
1030
  }
996
1031
  return a[h % a.length];
@@ -1012,61 +1047,61 @@ function Bt(e, t, n, r) {
1012
1047
  customdata: h.map((d) => [d.from, d.to]),
1013
1048
  hovertemplate: `${t}: ${m}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`
1014
1049
  };
1015
- }), layout: Be({
1050
+ }), layout: Pe({
1016
1051
  barmode: "overlay",
1017
1052
  bargap: 0,
1018
1053
  xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
1019
1054
  yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
1020
1055
  showlegend: !1,
1021
1056
  title: t || void 0,
1022
- template: r !== void 0 ? r : me
1057
+ template: r !== void 0 ? r : ye
1023
1058
  }) };
1024
1059
  }
1025
- function Tt(e, t, n, r, o) {
1060
+ function Yt(e, t, n, r, o) {
1026
1061
  if (!e.length) return { data: [], layout: {} };
1027
- const i = n === "bar", a = n === "markers", c = n === "line", l = r || St, s = r || vt, u = {
1062
+ const i = n === "bar", a = n === "markers", c = n === "line", l = r || Rt, s = r || Vt, u = {
1028
1063
  x: e.map((d) => d.val),
1029
1064
  y: e.map((d) => d.z),
1030
1065
  hovertemplate: `${t}: %{x}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`,
1031
1066
  customdata: e.map((d) => [Math.min(d.from, d.to), Math.max(d.from, d.to)])
1032
- }, g = {
1067
+ }, p = {
1033
1068
  type: "data",
1034
1069
  symmetric: !1,
1035
1070
  array: e.map((d) => d.errorPlus),
1036
1071
  arrayminus: e.map((d) => d.errorMinus),
1037
1072
  thickness: 1.5,
1038
1073
  width: 2,
1039
- color: It
1074
+ color: Gt
1040
1075
  };
1041
1076
  return { data: [i ? {
1042
1077
  ...u,
1043
1078
  type: "bar",
1044
1079
  orientation: "h",
1045
1080
  marker: { color: l },
1046
- error_y: g
1081
+ error_y: p
1047
1082
  } : {
1048
1083
  ...u,
1049
1084
  type: "scatter",
1050
1085
  mode: a ? "markers" : c ? "lines" : "lines+markers",
1051
1086
  line: { color: l, width: 2 },
1052
1087
  marker: { size: 7, color: s },
1053
- error_y: c ? void 0 : g
1054
- }], layout: Be({
1088
+ error_y: c ? void 0 : p
1089
+ }], layout: Pe({
1055
1090
  xaxis: { title: t, zeroline: !1 },
1056
1091
  yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
1057
1092
  barmode: "overlay",
1058
1093
  showlegend: !1,
1059
- template: o !== void 0 ? o : me
1094
+ template: o !== void 0 ? o : ye
1060
1095
  }) };
1061
1096
  }
1062
- function Pt({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
1097
+ function $t({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
1063
1098
  if (!e || !e.length || !n) return { data: [], layout: {} };
1064
1099
  if (t || r === "categorical")
1065
- return Bt(e, n, o, i);
1066
- const a = Ft(n);
1067
- return Tt(e, n, r, a, i);
1100
+ return Ut(e, n, o, i);
1101
+ const a = Ht(n);
1102
+ return Yt(e, n, r, a, i);
1068
1103
  }
1069
- function Mr(e = [], {
1104
+ function Pr(e = [], {
1070
1105
  fromCol: t = "from",
1071
1106
  toCol: n = "to",
1072
1107
  categoryCol: r = "geology_code",
@@ -1077,16 +1112,16 @@ function Mr(e = [], {
1077
1112
  return e.forEach((c) => {
1078
1113
  const l = Number(c == null ? void 0 : c[t]), s = Number(c == null ? void 0 : c[n]), u = c == null ? void 0 : c[r];
1079
1114
  if (!Number.isFinite(l) || !Number.isFinite(s) || s <= l || u == null || `${u}`.trim() === "") return;
1080
- const g = (l + s) / 2;
1115
+ const p = (l + s) / 2;
1081
1116
  a.push({
1082
- z: g,
1117
+ z: p,
1083
1118
  val: `${u}`,
1084
1119
  from: l,
1085
1120
  to: s,
1086
- errorPlus: s - g,
1087
- errorMinus: g - l
1121
+ errorPlus: s - p,
1122
+ errorMinus: p - l
1088
1123
  });
1089
- }), a.sort((c, l) => l.z - c.z), Pt({
1124
+ }), a.sort((c, l) => l.z - c.z), $t({
1090
1125
  points: a,
1091
1126
  isCategorical: !0,
1092
1127
  property: r,
@@ -1095,7 +1130,7 @@ function Mr(e = [], {
1095
1130
  template: i
1096
1131
  });
1097
1132
  }
1098
- const Rt = [
1133
+ const Xt = [
1099
1134
  "#313695",
1100
1135
  "#4575b4",
1101
1136
  "#74add1",
@@ -1107,7 +1142,7 @@ const Rt = [
1107
1142
  "#d73027",
1108
1143
  "#a50026"
1109
1144
  ];
1110
- function Vt(e = [], t = Rt) {
1145
+ function qt(e = [], t = Xt) {
1111
1146
  const n = e.filter((s) => Number.isFinite(s));
1112
1147
  if (!n.length)
1113
1148
  return {
@@ -1119,8 +1154,8 @@ function Vt(e = [], t = Rt) {
1119
1154
  };
1120
1155
  const r = n.slice().sort((s, u) => s - u), o = r[0], i = r[r.length - 1], a = t.length;
1121
1156
  if (i === o) {
1122
- const s = t.map((u, g) => ({
1123
- index: g,
1157
+ const s = t.map((u, p) => ({
1158
+ index: p,
1124
1159
  min: o,
1125
1160
  max: i,
1126
1161
  label: `${o}`
@@ -1134,12 +1169,12 @@ function Vt(e = [], t = Rt) {
1134
1169
  };
1135
1170
  }
1136
1171
  const c = t.map((s, u) => {
1137
- const g = u / a, m = (u + 1) / a, h = Math.floor(g * r.length), d = Math.min(r.length - 1, Math.floor(m * r.length)), p = r[h], N = u === a - 1 ? i : r[d];
1172
+ const p = u / a, m = (u + 1) / a, h = Math.floor(p * r.length), d = Math.min(r.length - 1, Math.floor(m * r.length)), g = r[h], N = u === a - 1 ? i : r[d];
1138
1173
  return {
1139
1174
  index: u,
1140
- min: p,
1175
+ min: g,
1141
1176
  max: N,
1142
- label: Ht(p, N)
1177
+ label: Zt(g, N)
1143
1178
  };
1144
1179
  }), l = (i - o) / a;
1145
1180
  return {
@@ -1150,11 +1185,11 @@ function Vt(e = [], t = Rt) {
1150
1185
  colors: t
1151
1186
  };
1152
1187
  }
1153
- function Ht(e, t) {
1188
+ function Zt(e, t) {
1154
1189
  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";
1155
1190
  return `${n(e)} – ${n(t)}`;
1156
1191
  }
1157
- function Te(e, t) {
1192
+ function Re(e, t) {
1158
1193
  if (!Number.isFinite(e) || !t || !Array.isArray(t.bins) || !t.bins.length)
1159
1194
  return -1;
1160
1195
  if (t.max === t.min)
@@ -1166,18 +1201,18 @@ function Te(e, t) {
1166
1201
  }
1167
1202
  return -1;
1168
1203
  }
1169
- function Gt(e, t, n = "#8b1e3f") {
1170
- const r = Te(e, t);
1204
+ function Wt(e, t, n = "#8b1e3f") {
1205
+ const r = Re(e, t);
1171
1206
  return r < 0 ? n : t.colors[r] || n;
1172
1207
  }
1173
- function G(e) {
1208
+ function j(e) {
1174
1209
  e.selectables = [
1175
1210
  ...e.blocks,
1176
1211
  ...e.drillMeshes,
1177
1212
  ...e.structuralMeshes
1178
1213
  ];
1179
1214
  }
1180
- const jt = {
1215
+ const Kt = {
1181
1216
  bedding: "#2563eb",
1182
1217
  foliation: "#16a34a",
1183
1218
  joint: "#9333ea",
@@ -1186,11 +1221,11 @@ const jt = {
1186
1221
  "shear zone": "#0ea5e9",
1187
1222
  "fault zone": "#ef4444"
1188
1223
  };
1189
- function Yt(e, t) {
1190
- const n = t || jt, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
1224
+ function Jt(e, t) {
1225
+ const n = t || Kt, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
1191
1226
  return new f.Color(o).getHex();
1192
1227
  }
1193
- function Ut(e, t) {
1228
+ function Qt(e, t) {
1194
1229
  const n = e * Math.PI / 180, r = t * Math.PI / 180;
1195
1230
  return new f.Vector3(
1196
1231
  Math.sin(r) * Math.sin(n),
@@ -1201,7 +1236,7 @@ function Ut(e, t) {
1201
1236
  // Up component
1202
1237
  ).normalize();
1203
1238
  }
1204
- function $t(e, t = {}) {
1239
+ function en(e, t = {}) {
1205
1240
  const {
1206
1241
  radius: n = 5,
1207
1242
  discThickness: r = 0.2,
@@ -1210,23 +1245,23 @@ function $t(e, t = {}) {
1210
1245
  colorMap: a = null
1211
1246
  } = t, c = new f.Group(), l = new f.Vector3(0, 1, 0);
1212
1247
  for (const s of e) {
1213
- const u = s.x != null ? s.x : s.easting != null ? s.easting : null, g = s.y != null ? s.y : s.northing != null ? s.northing : null, m = s.z != null ? s.z : s.elevation != null ? s.elevation : null;
1214
- if (u == null || g == null || m == null || !Number.isFinite(u) || !Number.isFinite(g) || !Number.isFinite(m)) continue;
1215
- const h = s[W] != null ? Number(s[W]) : null, d = s[Z] != null ? Number(s[Z]) : null;
1216
- let p;
1248
+ const u = s.x != null ? s.x : s.easting != null ? s.easting : null, p = s.y != null ? s.y : s.northing != null ? s.northing : null, m = s.z != null ? s.z : s.elevation != null ? s.elevation : null;
1249
+ if (u == null || p == null || m == null || !Number.isFinite(u) || !Number.isFinite(p) || !Number.isFinite(m)) continue;
1250
+ const h = s[K] != null ? Number(s[K]) : null, d = s[W] != null ? Number(s[W]) : null;
1251
+ let g;
1217
1252
  if (s.nx != null && Number.isFinite(s.nx) && s.ny != null && Number.isFinite(s.ny) && s.nz != null && Number.isFinite(s.nz))
1218
- p = new f.Vector3(s.nx, s.ny, s.nz).normalize();
1253
+ g = new f.Vector3(s.nx, s.ny, s.nz).normalize();
1219
1254
  else {
1220
1255
  if (h == null || d == null || !Number.isFinite(h) || !Number.isFinite(d)) continue;
1221
- p = Ut(h, d);
1256
+ g = Qt(h, d);
1222
1257
  }
1223
- const N = new f.CylinderGeometry(n, n, r, i, 1, !1), k = new f.MeshStandardMaterial({
1224
- color: Yt(s.structure_type, a),
1258
+ const N = new f.CylinderGeometry(n, n, r, i, 1, !1), O = new f.MeshStandardMaterial({
1259
+ color: Jt(s.structure_type, a),
1225
1260
  transparent: !0,
1226
1261
  opacity: o,
1227
1262
  side: f.DoubleSide
1228
- }), b = new f.Mesh(N, k);
1229
- b.position.set(u, g, m), b.quaternion.setFromUnitVectors(l, p), b.userData = {
1263
+ }), b = new f.Mesh(N, O);
1264
+ b.position.set(u, p, m), b.quaternion.setFromUnitVectors(l, g), b.userData = {
1230
1265
  type: "structure",
1231
1266
  hole_id: s.hole_id,
1232
1267
  depth: s.depth ?? s.mid,
@@ -1238,8 +1273,8 @@ function $t(e, t = {}) {
1238
1273
  }
1239
1274
  return c;
1240
1275
  }
1241
- function Xt(e, t, n, r = {}) {
1242
- if (!e.scene || (Pe(e), !(t != null && t.length) || !(n != null && n.length))) return;
1276
+ function tn(e, t, n, r = {}) {
1277
+ if (!e.scene || (Ve(e), !(t != null && t.length) || !(n != null && n.length))) return;
1243
1278
  const { maxDiscs: o = 3e3 } = r;
1244
1279
  let i = t;
1245
1280
  if (i.length > o) {
@@ -1248,21 +1283,21 @@ function Xt(e, t, n, r = {}) {
1248
1283
  s.push(i[Math.floor(u * l)]);
1249
1284
  i = s;
1250
1285
  }
1251
- const a = n.flatMap((l) => (l.points || []).map((s) => ({ ...s, hole_id: l.id }))), c = kt(i, a, r);
1252
- c.length && (e.structuralGroup = $t(c, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((l) => {
1286
+ 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) => {
1253
1288
  l.isMesh && e.structuralMeshes.push(l);
1254
- }), G(e));
1289
+ }), j(e));
1255
1290
  }
1256
- function Pe(e) {
1291
+ function Ve(e) {
1257
1292
  e.structuralGroup && (e.scene.remove(e.structuralGroup), e.structuralGroup.traverse((t) => {
1258
1293
  t.isMesh && (t.geometry.dispose(), t.material.dispose());
1259
- }), e.structuralGroup = null), e.structuralMeshes = [], G(e);
1294
+ }), e.structuralGroup = null), e.structuralMeshes = [], j(e);
1260
1295
  }
1261
- function qt(e, t) {
1296
+ function nn(e, t) {
1262
1297
  e.structuralGroup && (e.structuralGroup.visible = !!t);
1263
1298
  }
1264
- let Zt = 0;
1265
- function Wt(e) {
1299
+ let rn = 0;
1300
+ function on(e) {
1266
1301
  let t, n, r, o;
1267
1302
  if ("width" in e || "height" in e || "x" in e && !("maxX" in e)) {
1268
1303
  const i = Number(e.x ?? 0), a = Number(e.y ?? 0), c = Number(e.width ?? 0), l = Number(e.height ?? 0);
@@ -1279,7 +1314,7 @@ function Wt(e) {
1279
1314
  );
1280
1315
  return { minX: t, minY: n, maxX: r, maxY: o };
1281
1316
  }
1282
- function Kt(e) {
1317
+ function sn(e) {
1283
1318
  if (e.type === "texture")
1284
1319
  return Promise.resolve(e.texture);
1285
1320
  let t, n = !1;
@@ -1308,58 +1343,58 @@ function Kt(e) {
1308
1343
  );
1309
1344
  });
1310
1345
  }
1311
- async function zr(e) {
1312
- const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++Zt}`, c = e.name ?? a;
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;
1313
1348
  let l = e.opacity ?? 1;
1314
1349
  if ((l < 0 || l > 1) && (console.warn(
1315
1350
  `[baselode] raster overlay "${a}": opacity ${l} is outside [0, 1] — clamped`
1316
1351
  ), l = Math.max(0, Math.min(1, l))), !t) throw new Error("raster overlay: options.source is required");
1317
1352
  if (!n) throw new Error("raster overlay: options.bounds is required");
1318
- const s = Wt(n), { minX: u, minY: g, maxX: m, maxY: h } = s, d = m - u, p = h - g, N = (u + m) / 2, k = (g + h) / 2, b = await Kt(t), L = new f.PlaneGeometry(d, p), y = new f.MeshBasicMaterial({
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({
1319
1354
  map: b,
1320
1355
  transparent: !0,
1321
1356
  opacity: l,
1322
1357
  side: f.DoubleSide,
1323
1358
  depthWrite: !1
1324
- }), z = new f.Mesh(L, y);
1325
- return z.position.set(N, k, r), z.renderOrder = i, z.visible = o, { id: a, name: c, mesh: z, texture: b, bounds: s, elevation: r, opacity: l, visible: o };
1359
+ }), E = new f.Mesh(A, y);
1360
+ 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 };
1326
1361
  }
1327
- function Jt(e, t) {
1328
- e.scene && (e.rasterOverlays.has(t.id) && de(e, t.id), e.rasterOverlays.set(t.id, t), e.scene.add(t.mesh));
1362
+ function an(e, t) {
1363
+ e.scene && (e.rasterOverlays.has(t.id) && _e(e, t.id), e.rasterOverlays.set(t.id, t), e.scene.add(t.mesh));
1329
1364
  }
1330
- function de(e, t) {
1365
+ function _e(e, t) {
1331
1366
  var r;
1332
1367
  const n = e.rasterOverlays.get(t);
1333
1368
  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));
1334
1369
  }
1335
- function Qt(e, t, n) {
1370
+ function ln(e, t, n) {
1336
1371
  const r = e.rasterOverlays.get(t);
1337
1372
  if (!r) return;
1338
1373
  const o = Math.max(0, Math.min(1, Number(n)));
1339
1374
  r.opacity = o, r.mesh.material.opacity = o, r.mesh.material.needsUpdate = !0;
1340
1375
  }
1341
- function en(e, t, n) {
1376
+ function cn(e, t, n) {
1342
1377
  const r = e.rasterOverlays.get(t);
1343
1378
  r && (r.visible = !!n, r.mesh.visible = r.visible);
1344
1379
  }
1345
- function tn(e, t, n) {
1380
+ function un(e, t, n) {
1346
1381
  const r = e.rasterOverlays.get(t);
1347
1382
  r && (r.elevation = Number(n), r.mesh.position.setZ(r.elevation));
1348
1383
  }
1349
- function nn(e, t) {
1384
+ function mn(e, t) {
1350
1385
  return e.rasterOverlays.get(t);
1351
1386
  }
1352
- function rn(e) {
1387
+ function dn(e) {
1353
1388
  return Array.from(e.rasterOverlays.values());
1354
1389
  }
1355
- function on(e) {
1390
+ function fn(e) {
1356
1391
  for (const t of [...e.rasterOverlays.keys()])
1357
- de(e, t);
1392
+ _e(e, t);
1358
1393
  }
1359
- function fe(e) {
1394
+ function Me(e) {
1360
1395
  var n, r, o, i, a, c, l, s, u;
1361
1396
  if (!e) return "";
1362
- const t = (g) => Number.isFinite(g) ? g.toFixed(3) : "nan";
1397
+ const t = (p) => Number.isFinite(p) ? p.toFixed(3) : "nan";
1363
1398
  return [
1364
1399
  t((n = e.camera) == null ? void 0 : n.x),
1365
1400
  t((r = e.camera) == null ? void 0 : r.y),
@@ -1372,7 +1407,7 @@ function fe(e) {
1372
1407
  t((u = e.up) == null ? void 0 : u.z)
1373
1408
  ].join("|");
1374
1409
  }
1375
- function Re(e) {
1410
+ function He(e) {
1376
1411
  return !e.camera || !e.controls ? null : {
1377
1412
  camera: {
1378
1413
  x: e.camera.position.x,
@@ -1391,37 +1426,37 @@ function Re(e) {
1391
1426
  }
1392
1427
  };
1393
1428
  }
1394
- function sn(e, t) {
1429
+ function hn(e, t) {
1395
1430
  if (!e.camera || !e.controls || !t) return !1;
1396
1431
  const n = t.camera || {}, r = t.target || {}, o = t.up || {};
1397
- 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 = fe(t), !0) : !1;
1432
+ 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;
1398
1433
  }
1399
- function an(e) {
1434
+ function bn(e) {
1400
1435
  if (!e.viewChangeHandler) return;
1401
1436
  const t = Date.now();
1402
1437
  if (t - e._lastViewEmitMs < 250) return;
1403
- const n = Re(e);
1438
+ const n = He(e);
1404
1439
  if (!n) return;
1405
- const r = fe(n);
1440
+ const r = Me(n);
1406
1441
  r !== e._lastViewSignature && (e._lastViewSignature = r, e._lastViewEmitMs = t, e.viewChangeHandler(n));
1407
1442
  }
1408
- function he(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
1409
- const c = (t + n) / 2, l = (r + o) / 2, s = (i + a) / 2, u = n - t, g = o - r, m = a - i, d = Math.max(u, g, m, 1) * 2;
1443
+ function Ee(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
1444
+ 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;
1410
1445
  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();
1411
1446
  }
1412
- function ln(e, t = 1e3) {
1447
+ function pn(e, t = 1e3) {
1413
1448
  !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());
1414
1449
  }
1415
- function cn(e, t = 2e3) {
1450
+ function gn(e, t = 2e3) {
1416
1451
  !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());
1417
1452
  }
1418
- function un(e, t = 0, n = 0) {
1453
+ function yn(e, t = 0, n = 0) {
1419
1454
  e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
1420
1455
  }
1421
- function mn(e, t = 1.1) {
1456
+ function _n(e, t = 1.1) {
1422
1457
  !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());
1423
1458
  }
1424
- function dn(e, t = 1.2) {
1459
+ function Mn(e, t = 1.2) {
1425
1460
  if (!e.lastBounds) return;
1426
1461
  const {
1427
1462
  minX: n,
@@ -1430,16 +1465,16 @@ function dn(e, t = 1.2) {
1430
1465
  maxY: i,
1431
1466
  minZ: a,
1432
1467
  maxZ: c
1433
- } = e.lastBounds, l = (r - n) * t, s = (i - o) * t, u = (c - a) * t, g = (n + r) / 2, m = (o + i) / 2, h = (a + c) / 2, p = Math.max(l, s, u, 1) * 2;
1434
- e.controls.target.set(g, m, h), e.camera.position.set(g + p, m + p, h + p), e.camera.lookAt(g, m, h), e.controls.update();
1468
+ } = 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
+ 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();
1435
1470
  }
1436
- const fn = 1, hn = 120;
1437
- function bn(e, t) {
1471
+ const En = 1, zn = 120;
1472
+ function Nn(e, t) {
1438
1473
  if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
1439
- const n = Math.min(hn, Math.max(fn, 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();
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();
1440
1475
  return e.camera.position.copy(r).addScaledVector(s, l), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
1441
1476
  }
1442
- function gn(e, t = "orbit") {
1477
+ function On(e, t = "orbit") {
1443
1478
  if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
1444
1479
  e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
1445
1480
  else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
@@ -1448,37 +1483,37 @@ function gn(e, t = "orbit") {
1448
1483
  e.controls.target.copy(n), e.controls.update();
1449
1484
  }
1450
1485
  }
1451
- const B = "#9ca3af";
1452
- function Me(e, t) {
1486
+ const T = "#9ca3af";
1487
+ function Le(e, t) {
1453
1488
  const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
1454
1489
  if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
1455
1490
  const o = Math.min(n, r), i = Math.max(n, r);
1456
1491
  return i <= o ? null : { segStart: o, segEnd: i };
1457
1492
  }
1458
- function pn(e, t, n) {
1493
+ function kn(e, t, n) {
1459
1494
  let r = 0, o = 0;
1460
1495
  for (let a = 0; a < e.length; a += 1) {
1461
1496
  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);
1462
1497
  if (!Number.isFinite(l) || !Number.isFinite(s) || !Number.isFinite(u) || s <= l) continue;
1463
- const g = Math.max(t, l), h = Math.min(n, s) - g;
1498
+ const p = Math.max(t, l), h = Math.min(n, s) - p;
1464
1499
  h <= 0 || (r += u * h, o += h);
1465
1500
  }
1466
1501
  if (o <= 0) return null;
1467
1502
  const i = r / o;
1468
1503
  return Number.isFinite(i) ? i : null;
1469
1504
  }
1470
- function yn(e, t) {
1471
- if (!Number.isFinite(e)) return new f.Color(B);
1472
- if (Te(e, t) < 0) return new f.Color(B);
1473
- const r = Gt(e, t, B);
1505
+ function An(e, t) {
1506
+ if (!Number.isFinite(e)) return new f.Color(T);
1507
+ if (Re(e, t) < 0) return new f.Color(T);
1508
+ const r = Wt(e, t, T);
1474
1509
  return new f.Color(r);
1475
1510
  }
1476
- function _n(e) {
1477
- if (!e || !String(e).trim()) return B;
1478
- const t = Ve(String(e).toLowerCase().trim());
1511
+ function Ln(e) {
1512
+ if (!e || !String(e).trim()) return T;
1513
+ const t = Ge(String(e).toLowerCase().trim());
1479
1514
  return "#" + new f.Color().setHSL(t, 0.7, 0.5).getHexString();
1480
1515
  }
1481
- function Mn(e = {}) {
1516
+ function Dn(e = {}) {
1482
1517
  return {
1483
1518
  preserveView: !!e.preserveView,
1484
1519
  assayIntervalsByHole: e.assayIntervalsByHole || null,
@@ -1486,7 +1521,7 @@ function Mn(e = {}) {
1486
1521
  isCategoricalVariable: !!e.isCategoricalVariable
1487
1522
  };
1488
1523
  }
1489
- function zn(e, t) {
1524
+ function Sn(e, t) {
1490
1525
  if (!e || !t) return [];
1491
1526
  const n = [];
1492
1527
  return Object.values(e).forEach((r) => {
@@ -1496,27 +1531,27 @@ function zn(e, t) {
1496
1531
  });
1497
1532
  }), n;
1498
1533
  }
1499
- function re(e) {
1534
+ function oe(e) {
1500
1535
  return {
1501
1536
  holeId: e.id,
1502
1537
  project: e.project
1503
1538
  };
1504
1539
  }
1505
- function En(e) {
1540
+ function wn(e) {
1506
1541
  return `${e ?? ""}`.trim().toLowerCase();
1507
1542
  }
1508
- function Nn(e, t) {
1509
- const n = `${e ?? ""}:${t ?? 0}`, r = Ve(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, a = new f.Color();
1543
+ function xn(e, t) {
1544
+ 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();
1510
1545
  return a.setHSL(i, 1, 0.5), a;
1511
1546
  }
1512
- function Ve(e) {
1547
+ function Ge(e) {
1513
1548
  const t = `${e ?? ""}`;
1514
1549
  let n = 2166136261;
1515
1550
  for (let r = 0; r < t.length; r += 1)
1516
1551
  n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
1517
1552
  return (n >>> 0) / 4294967295;
1518
1553
  }
1519
- function kn(e, t, n) {
1554
+ function Fn(e, t, n) {
1520
1555
  let r = null, o = 0;
1521
1556
  for (const i of e) {
1522
1557
  const a = Number(i == null ? void 0 : i.from), c = Number(i == null ? void 0 : i.to);
@@ -1526,108 +1561,108 @@ function kn(e, t, n) {
1526
1561
  }
1527
1562
  return r;
1528
1563
  }
1529
- function On(e, t) {
1564
+ function vn(e, t) {
1530
1565
  if (!t || !e) return [];
1531
1566
  const n = e.id || e.holeId;
1532
1567
  if (!n) return [];
1533
1568
  const r = t[n];
1534
1569
  if (Array.isArray(r) && r.length) return r;
1535
- const o = En(n);
1570
+ const o = wn(n);
1536
1571
  if (o) {
1537
1572
  const i = t[o];
1538
1573
  if (Array.isArray(i) && i.length) return i;
1539
1574
  }
1540
1575
  return [];
1541
1576
  }
1542
- function Ln({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: a, isCategorical: c }) {
1577
+ function Cn({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: a, isCategorical: c }) {
1543
1578
  if (!e)
1544
- return Nn(r, o);
1579
+ return xn(r, o);
1545
1580
  if (e === "__HAS_ASSAY__") {
1546
- if (!(t != null && t.length)) return new f.Color(B);
1547
- const u = Me(i, a);
1581
+ if (!(t != null && t.length)) return new f.Color(T);
1582
+ const u = Le(i, a);
1548
1583
  return u ? t.some((m) => {
1549
1584
  const h = Number(m == null ? void 0 : m.from), d = Number(m == null ? void 0 : m.to);
1550
1585
  if (!Number.isFinite(h) || !Number.isFinite(d)) return !1;
1551
- const p = Math.max(u.segStart, h);
1552
- return Math.min(u.segEnd, d) > p;
1553
- }) ? new f.Color("#ff8c42") : new f.Color(B) : new f.Color(B);
1586
+ const g = Math.max(u.segStart, h);
1587
+ return Math.min(u.segEnd, d) > g;
1588
+ }) ? new f.Color("#ff8c42") : new f.Color(T) : new f.Color(T);
1554
1589
  }
1555
- if (!(t != null && t.length)) return new f.Color(B);
1556
- const l = Me(i, a);
1557
- if (!l) return new f.Color(B);
1590
+ if (!(t != null && t.length)) return new f.Color(T);
1591
+ const l = Le(i, a);
1592
+ if (!l) return new f.Color(T);
1558
1593
  if (c) {
1559
- const u = kn(t, l.segStart, l.segEnd);
1560
- return new f.Color(_n(u));
1561
- }
1562
- const s = pn(t, l.segStart, l.segEnd);
1563
- return yn(s, n);
1564
- }
1565
- function Dn(e, t, n = {}) {
1566
- if (!e.scene || (He(e), !t || t.length === 0)) return;
1567
- const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: a } = Mn(n), c = a ? [] : zn(o, i), l = Vt(c);
1568
- let s = 1 / 0, u = -1 / 0, g = 1 / 0, m = -1 / 0, h = 1 / 0, d = -1 / 0;
1569
- const p = new f.Vector3(), N = new f.Vector3(0, 1, 0);
1570
- t.forEach((k, b) => {
1571
- const y = b * 137.5 % 360 / 360, z = new f.Color().setHSL(y, 0.75, 0.55), O = (k.points || []).map((D) => {
1572
- s = Math.min(s, D.x), u = Math.max(u, D.x), g = Math.min(g, D.y), m = Math.max(m, D.y), h = Math.min(h, D.z), d = Math.max(d, D.z);
1573
- const S = new f.Vector3(D.x, D.y, D.z);
1574
- return S.md = D.md, S;
1594
+ const u = Fn(t, l.segStart, l.segEnd);
1595
+ return new f.Color(Ln(u));
1596
+ }
1597
+ const s = kn(t, l.segStart, l.segEnd);
1598
+ return An(s, n);
1599
+ }
1600
+ function In(e, t, n = {}) {
1601
+ 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);
1603
+ let s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0, h = 1 / 0, d = -1 / 0;
1604
+ const g = new f.Vector3(), N = new f.Vector3(0, 1, 0);
1605
+ 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;
1575
1610
  });
1576
- if (O.length < 2) {
1577
- if (O.length === 1) {
1578
- const D = new f.SphereGeometry(5, 12, 12), S = new f.MeshLambertMaterial({
1579
- color: z,
1580
- emissive: z,
1611
+ if (k.length < 2) {
1612
+ if (k.length === 1) {
1613
+ const L = new f.SphereGeometry(5, 12, 12), x = new f.MeshLambertMaterial({
1614
+ color: E,
1615
+ emissive: E,
1581
1616
  emissiveIntensity: 0.2
1582
- }), w = new f.Mesh(D, S);
1583
- w.position.copy(O[0]), w.userData = re(k), e.scene.add(w), e.drillLines.push(w), e.drillMeshes.push(w);
1617
+ }), S = new f.Mesh(L, x);
1618
+ S.position.copy(k[0]), S.userData = oe(O), e.scene.add(S), e.drillLines.push(S), e.drillMeshes.push(S);
1584
1619
  }
1585
1620
  return;
1586
1621
  }
1587
- const A = new f.Group();
1588
- A.userData = re(k);
1589
- const x = i ? On(k, o) : [];
1590
- for (let D = 0; D < O.length - 1; D += 1) {
1591
- const S = O[D], w = O[D + 1], F = p.subVectors(w, S), C = F.length();
1592
- if (C <= 1e-3) continue;
1593
- const I = 2.2, T = new f.CylinderGeometry(I, I, C, 6, 1, !0), P = Ln({
1622
+ const D = new f.Group();
1623
+ 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({
1594
1629
  selectedAssayVariable: i,
1595
- assayIntervals: x,
1630
+ assayIntervals: w,
1596
1631
  assayScale: l,
1597
- holeId: k.id,
1598
- segmentIndex: D,
1599
- p1: S,
1600
- p2: w,
1632
+ holeId: O.id,
1633
+ segmentIndex: L,
1634
+ p1: x,
1635
+ p2: S,
1601
1636
  isCategorical: a
1602
- }), E = new f.MeshLambertMaterial({
1637
+ }), z = new f.MeshLambertMaterial({
1603
1638
  color: P,
1604
1639
  flatShading: !0,
1605
1640
  emissive: P,
1606
1641
  emissiveIntensity: 0.15
1607
- }), v = new f.Mesh(T, E);
1608
- v.position.copy(S.clone().addScaledVector(F, 0.5)), v.quaternion.setFromUnitVectors(N, F.clone().normalize()), v.userData = re(k), A.add(v), e.drillMeshes.push(v);
1642
+ }), F = new f.Mesh(B, z);
1643
+ 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);
1609
1644
  }
1610
- e.scene.add(A), e.drillLines.push(A);
1611
- }), e.camera && e.controls && (e.lastBounds = { minX: s, maxX: u, minY: g, maxY: m, minZ: h, maxZ: d }, r || he(e, { minX: s, maxX: u, minY: g, maxY: m, minZ: h, maxZ: d })), G(e);
1645
+ e.scene.add(D), e.drillLines.push(D);
1646
+ }), e.camera && e.controls && (e.lastBounds = { minX: s, maxX: u, minY: p, maxY: m, minZ: h, maxZ: d }, r || Ee(e, { minX: s, maxX: u, minY: p, maxY: m, minZ: h, maxZ: d })), j(e);
1612
1647
  }
1613
- function He(e) {
1648
+ function je(e) {
1614
1649
  e.drillLines.forEach((t) => {
1615
1650
  e.scene.remove(t), t.isGroup ? t.traverse((n) => {
1616
1651
  n.isMesh && (n.geometry.dispose(), n.material.dispose());
1617
1652
  }) : t.isMesh && (t.geometry.dispose(), t.material.dispose());
1618
- }), e.drillLines = [], e.drillMeshes = [], G(e);
1653
+ }), e.drillLines = [], e.drillMeshes = [], j(e);
1619
1654
  }
1620
- const An = 20, wn = 15, xn = "#00bcd4";
1621
- function Sn(e = {}) {
1655
+ const Tn = 20, Bn = 15, Pn = "#00bcd4";
1656
+ function Rn(e = {}) {
1622
1657
  return {
1623
- panelWidth: e.panelWidth != null ? Number(e.panelWidth) : An,
1624
- lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) : wn,
1625
- color: e.color || xn,
1658
+ panelWidth: e.panelWidth != null ? Number(e.panelWidth) : Tn,
1659
+ lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) : Bn,
1660
+ color: e.color || Pn,
1626
1661
  valueMin: e.valueMin != null ? Number(e.valueMin) : null,
1627
1662
  valueMax: e.valueMax != null ? Number(e.valueMax) : null
1628
1663
  };
1629
1664
  }
1630
- function Er(e) {
1665
+ function Vr(e) {
1631
1666
  if (!e || e.length < 2) return null;
1632
1667
  let t = -1 / 0, n = 1 / 0;
1633
1668
  for (const o of e)
@@ -1635,47 +1670,47 @@ function Er(e) {
1635
1670
  const r = t - n;
1636
1671
  return r < 1e-3 ? null : { topZ: t, botZ: n, height: r };
1637
1672
  }
1638
- function vn(e, t, n, r, o, i, a) {
1673
+ function Vn(e, t, n, r, o, i, a) {
1639
1674
  if (!Array.isArray(e) || !Array.isArray(t)) return [];
1640
1675
  const c = Math.min(e.length, t.length), l = [];
1641
1676
  for (let b = 0; b < c; b++)
1642
1677
  Number.isFinite(e[b]) && Number.isFinite(t[b]) && l.push({ d: e[b], v: t[b] });
1643
1678
  if (l.length < 2) return [];
1644
- 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)), p = o ?? h, k = (i ?? d) - p || 1;
1645
- return l.map(({ d: b, v: L }) => {
1646
- const y = (b - u) / m, z = Math.max(0, Math.min(1, (L - p) / k)), O = -n / 2 + z * n, A = y * r;
1647
- return new f.Vector3(O, A, 0.01);
1679
+ 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;
1682
+ return new f.Vector3(k, D, 0.01);
1648
1683
  });
1649
1684
  }
1650
- function Fn(e, t) {
1685
+ function Hn(e, t) {
1651
1686
  const n = e.length;
1652
1687
  if (n < 2) return null;
1653
1688
  const r = [], o = [];
1654
1689
  let i = 0;
1655
1690
  for (let c = 0; c < n - 1; c++) {
1656
- const l = e[c], s = e[c + 1], u = s.x - l.x, g = s.y - l.y, m = Math.sqrt(u * u + g * g);
1691
+ const l = e[c], s = e[c + 1], u = s.x - l.x, p = s.y - l.y, m = Math.sqrt(u * u + p * p);
1657
1692
  if (m < 1e-6) continue;
1658
- const h = -g / m * t, d = u / m * t, p = 0.01;
1693
+ const h = -p / m * t, d = u / m * t, g = 0.01;
1659
1694
  r.push(
1660
1695
  l.x + h,
1661
1696
  l.y + d,
1662
- p,
1697
+ g,
1663
1698
  l.x - h,
1664
1699
  l.y - d,
1665
- p,
1700
+ g,
1666
1701
  s.x + h,
1667
1702
  s.y + d,
1668
- p,
1703
+ g,
1669
1704
  s.x - h,
1670
1705
  s.y - d,
1671
- p
1706
+ g
1672
1707
  ), o.push(i, i + 1, i + 2, i + 1, i + 3, i + 2), i += 4;
1673
1708
  }
1674
1709
  if (r.length === 0) return null;
1675
1710
  const a = new f.BufferGeometry();
1676
1711
  return a.setAttribute("position", new f.Float32BufferAttribute(r, 3)), a.setIndex(o), a;
1677
1712
  }
1678
- function In(e, t) {
1713
+ function Gn(e, t) {
1679
1714
  const n = e.points || [];
1680
1715
  if (n.length < 2) return null;
1681
1716
  const r = n[0], o = n[n.length - 1], i = new f.Vector3(
@@ -1684,67 +1719,67 @@ function In(e, t) {
1684
1719
  o.z - r.z
1685
1720
  ), a = i.length();
1686
1721
  if (a < 1e-3) return null;
1687
- const c = i.clone().normalize(), l = Sn(t.options), { panelWidth: s, lateralOffset: u, color: g, valueMin: m, valueMax: h } = l, d = new f.Vector3(0, 0, 1);
1688
- let p = new f.Vector3().crossVectors(c, d);
1689
- p.lengthSq() < 1e-6 ? p.set(1, 0, 0) : p.normalize();
1690
- const N = new f.Vector3().crossVectors(p, c).normalize(), k = new f.Vector3(r.x, r.y, r.z).addScaledVector(p, u), b = new f.Matrix4().makeBasis(p, c, N), L = new f.Quaternion().setFromRotationMatrix(b), y = n.map((F) => F.md).filter(Number.isFinite), z = y.length > 0 ? Math.max(...y) : a, O = vn(
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);
1723
+ let g = new f.Vector3().crossVectors(c, d);
1724
+ 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(
1691
1726
  t.depths,
1692
1727
  t.values,
1693
1728
  s,
1694
1729
  a,
1695
1730
  m,
1696
1731
  h,
1697
- z
1732
+ E
1698
1733
  );
1699
- if (O.length < 2) return null;
1700
- const A = new f.Group();
1701
- A.userData = { holeId: e.id, isStripLog: !0 };
1702
- const x = s * 0.025, D = Fn(O, x);
1703
- if (!D) return null;
1704
- const S = new f.MeshBasicMaterial({
1705
- color: new f.Color(g),
1734
+ if (k.length < 2) return null;
1735
+ const D = new f.Group();
1736
+ D.userData = { holeId: e.id, isStripLog: !0 };
1737
+ const w = s * 0.025, L = Hn(k, w);
1738
+ if (!L) return null;
1739
+ const x = new f.MeshBasicMaterial({
1740
+ color: new f.Color(p),
1706
1741
  side: f.DoubleSide
1707
- }), w = new f.Mesh(D, S);
1708
- return w.position.copy(k), w.quaternion.copy(L), A.add(w), A;
1742
+ }), S = new f.Mesh(L, x);
1743
+ return S.position.copy(O), S.quaternion.copy(A), D.add(S), D;
1709
1744
  }
1710
- function Cn(e, t, n) {
1711
- if (!e.scene || (le(e), !n || n.length === 0) || !t || t.length === 0) return;
1745
+ function jn(e, t, n) {
1746
+ if (!e.scene || (ce(e), !n || n.length === 0) || !t || t.length === 0) return;
1712
1747
  const r = /* @__PURE__ */ new Map();
1713
1748
  t.forEach((o) => {
1714
1749
  o.id != null && r.set(o.id, o);
1715
1750
  }), n.forEach((o) => {
1716
1751
  const i = r.get(o.holeId);
1717
1752
  if (!i) return;
1718
- const a = In(i, o);
1753
+ const a = Gn(i, o);
1719
1754
  a && (e.scene.add(a), e.stripLogGroups.push(a));
1720
1755
  });
1721
1756
  }
1722
- function le(e) {
1757
+ function ce(e) {
1723
1758
  e.stripLogGroups && (e.stripLogGroups.forEach((t) => {
1724
1759
  e.scene && e.scene.remove(t), t.traverse((n) => {
1725
1760
  n.geometry && n.geometry.dispose(), n.material && n.material.dispose();
1726
1761
  });
1727
1762
  }), e.stripLogGroups = []);
1728
1763
  }
1729
- const ze = "#ffffbb", Bn = 2, Tn = 1.5, Pn = 1;
1730
- function Rn(e) {
1764
+ const De = "#ffffbb", Un = 2, Yn = 1.5, $n = 1;
1765
+ function Xn(e) {
1731
1766
  const { renderer: t, scene: n, camera: r, container: o } = e;
1732
1767
  if (!t || !n || !r) return;
1733
- 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 st(t), l = new at(n, r);
1768
+ 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);
1734
1769
  c.addPass(l);
1735
- const s = new f.Vector2(i, a), u = new lt(s, n, r);
1736
- u.visibleEdgeColor.set(ze), u.hiddenEdgeColor.set(ze), u.edgeStrength = Bn, u.edgeThickness = Tn, u.edgeGlow = Pn, u.pulsePeriod = 0, u.selectedObjects = [], c.addPass(u), c.setSize(i, a), e._composer = c, e._outlinePass = u;
1770
+ 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;
1737
1772
  }
1738
- function Vn(e, t, n) {
1773
+ function qn(e, t, n) {
1739
1774
  !e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
1740
1775
  }
1741
- function q(e, t) {
1776
+ function Z(e, t) {
1742
1777
  e._outlinePass && (e._outlinePass.selectedObjects = t ? [t] : [], e._selectedObject = t || null);
1743
1778
  }
1744
- function Ee(e) {
1779
+ function Se(e) {
1745
1780
  e._composer && (e._composer.dispose(), e._composer = null), e._outlinePass = null, e._selectedObject = null, e.selectables = [];
1746
1781
  }
1747
- const Hn = [
1782
+ const Zn = [
1748
1783
  { normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
1749
1784
  { normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
1750
1785
  { normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
@@ -1752,86 +1787,86 @@ const Hn = [
1752
1787
  { normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
1753
1788
  { normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
1754
1789
  ];
1755
- function Gn(e, t, n, r, o = {}) {
1756
- if (!e.scene || (Ge(e), !t || !n || !r)) return;
1790
+ function Wn(e, t, n, r, o = {}) {
1791
+ if (!e.scene || (Ue(e), !t || !n || !r)) return;
1757
1792
  const { autoCenter: i = !0, opacity: a = 1 } = o;
1758
- let c = 1 / 0, l = -1 / 0, s = 1 / 0, u = -1 / 0, g = 1 / 0, m = -1 / 0;
1759
- t.forEach((E) => {
1760
- const v = Number(E.x ?? E.center_x ?? 0), R = Number(E.y ?? E.center_y ?? 0), Y = Number(E.z ?? E.center_z ?? 0), U = Number(E.dx ?? E.size_x ?? 1), $ = Number(E.dy ?? E.size_y ?? 1), X = Number(E.dz ?? E.size_z ?? 1);
1761
- c = Math.min(c, v - U / 2), l = Math.max(l, v + U / 2), s = Math.min(s, R - $ / 2), u = Math.max(u, R + $ / 2), g = Math.min(g, Y - X / 2), m = Math.max(m, Y + X / 2);
1793
+ let c = 1 / 0, l = -1 / 0, s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0;
1794
+ t.forEach((z) => {
1795
+ 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);
1796
+ c = Math.min(c, F - $ / 2), l = Math.max(l, F + $ / 2), s = Math.min(s, R - X / 2), u = Math.max(u, R + X / 2), p = Math.min(p, Y - q / 2), m = Math.max(m, Y + q / 2);
1762
1797
  });
1763
- let h = 0, d = 0, p = 0;
1764
- o.offset ? (h = Number(o.offset.x ?? 0), d = Number(o.offset.y ?? 0), p = Number(o.offset.z ?? 0)) : i && (h = -((c + l) / 2), d = -((s + u) / 2), p = -((g + m) / 2));
1765
- const N = c + h, k = l + h, b = s + d, L = u + d, y = g + p, z = m + p, O = (E, v, R) => `${Math.round(E)},${Math.round(v)},${Math.round(R)}`, A = new Set(
1766
- t.map((E) => O(Number(E.x ?? 0), Number(E.y ?? 0), Number(E.z ?? 0)))
1767
- ), x = [], D = [], S = [], w = [], F = [];
1768
- let C = 0;
1769
- if (t.forEach((E) => {
1770
- const v = Number(E.x ?? E.center_x ?? 0), R = Number(E.y ?? E.center_y ?? 0), Y = Number(E.z ?? E.center_z ?? 0), U = Number(E.dx ?? E.size_x ?? 1), $ = Number(E.dy ?? E.size_y ?? 1), X = Number(E.dz ?? E.size_z ?? 1), Ye = v + h, Ue = R + d, $e = Y + p, Xe = zt(E[n], r, f), { r: qe, g: Ze, b: We } = Xe;
1771
- Hn.forEach((V) => {
1772
- const Ke = v + V.neibDir[0] * U, Je = R + V.neibDir[1] * $, Qe = Y + V.neibDir[2] * X;
1773
- if (A.has(O(Ke, Je, Qe))) return;
1774
- const j = C;
1775
- V.verts.forEach(([et, tt, nt]) => {
1776
- x.push(Ye + et * U / 2, Ue + tt * $ / 2, $e + nt * X / 2), D.push(V.normal[0], V.normal[1], V.normal[2]), S.push(qe, Ze, We), C++;
1777
- }), w.push(j, j + 1, j + 2, j, j + 2, j + 3), F.push(E);
1798
+ let h = 0, d = 0, g = 0;
1799
+ 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(
1801
+ 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;
1804
+ if (t.forEach((z) => {
1805
+ 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) => {
1807
+ const Qe = F + V.neibDir[0] * $, et = R + V.neibDir[1] * X, tt = Y + V.neibDir[2] * q;
1808
+ if (D.has(k(Qe, et, tt))) return;
1809
+ const U = I;
1810
+ 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++;
1812
+ }), S.push(U, U + 1, U + 2, U, U + 2, U + 3), v.push(z);
1778
1813
  });
1779
- }), x.length === 0) return;
1780
- const I = new f.BufferGeometry();
1781
- I.setAttribute("position", new f.Float32BufferAttribute(x, 3)), I.setAttribute("normal", new f.Float32BufferAttribute(D, 3)), I.setAttribute("color", new f.Float32BufferAttribute(S, 3)), I.setIndex(w);
1782
- const T = new f.MeshLambertMaterial({
1814
+ }), 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({
1783
1818
  vertexColors: !0,
1784
1819
  transparent: a < 1,
1785
1820
  opacity: a,
1786
1821
  side: f.DoubleSide
1787
- }), P = new f.Mesh(I, T);
1788
- P.userData._isMergedBlocks = !0, P.userData._quadToBlock = F, P.userData._offset = { x: h, y: d, z: p }, e.scene.add(P), e.blocks.push(P), G(e), e.camera && e.controls && (e.lastBounds = { minX: N, maxX: k, minY: b, maxY: L, minZ: y, maxZ: z }, he(e, { minX: N, maxX: k, minY: b, maxY: L, minZ: y, maxZ: z }));
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 }));
1789
1824
  }
1790
- function Ge(e) {
1825
+ function Ue(e) {
1791
1826
  var t;
1792
1827
  e.blocks.forEach((n) => {
1793
1828
  e.scene.remove(n), n.geometry.dispose(), n.material.dispose();
1794
- }), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null), G(e);
1829
+ }), 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);
1795
1830
  }
1796
- function jn(e, t) {
1831
+ function Kn(e, t) {
1797
1832
  const n = Math.max(0, Math.min(1, Number(t)));
1798
1833
  e.blocks.forEach((r) => {
1799
1834
  r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
1800
1835
  });
1801
1836
  }
1802
- function Yn(e, t, n) {
1803
- 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), g = Number(t.dz ?? t.size_z ?? 1);
1837
+ function Jn(e, t, n) {
1838
+ 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);
1804
1839
  if (!e._blockHighlightMesh) {
1805
1840
  const m = new f.BoxGeometry(1, 1, 1), h = new f.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
1806
1841
  e._blockHighlightMesh = new f.Mesh(m, h), e.scene.add(e._blockHighlightMesh);
1807
1842
  }
1808
- return e._blockHighlightMesh.position.set(a, c, l), e._blockHighlightMesh.scale.set(s, u, g), e._blockHighlightMesh;
1843
+ return e._blockHighlightMesh.position.set(a, c, l), e._blockHighlightMesh.scale.set(s, u, p), e._blockHighlightMesh;
1809
1844
  }
1810
- function je(e) {
1845
+ function Ye(e) {
1811
1846
  var o, i;
1812
1847
  if (!e._outlinePass || e.selectables.length === 0) {
1813
- e._outlinePass && q(e, null);
1848
+ e._outlinePass && Z(e, null);
1814
1849
  return;
1815
1850
  }
1816
1851
  const t = e.raycaster.intersectObjects(e.selectables, !0);
1817
1852
  if (t.length === 0) {
1818
- q(e, null);
1853
+ Z(e, null);
1819
1854
  return;
1820
1855
  }
1821
1856
  const n = t[0], r = n.object;
1822
1857
  if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
1823
1858
  const a = Math.floor(n.faceIndex / 2), c = (i = r.userData._quadToBlock) == null ? void 0 : i[a];
1824
1859
  if (c) {
1825
- q(e, Yn(e, c, r.userData._offset));
1860
+ Z(e, Jn(e, c, r.userData._offset));
1826
1861
  return;
1827
1862
  }
1828
1863
  }
1829
- q(e, r);
1864
+ Z(e, r);
1830
1865
  }
1831
- function Un(e) {
1866
+ function Qn(e) {
1832
1867
  const t = e.renderer;
1833
1868
  t && (e.handleCanvasClick = (n) => {
1834
- var h, d, p, N, k, b, L;
1869
+ var h, d, g, N, O, b, A;
1835
1870
  if (n.button !== 0) return;
1836
1871
  if ((h = e.gizmo) != null && h.domElement) {
1837
1872
  const y = e.gizmo.domElement.getBoundingClientRect();
@@ -1839,18 +1874,18 @@ function Un(e) {
1839
1874
  return;
1840
1875
  }
1841
1876
  const r = t.domElement.getBoundingClientRect(), o = n.clientX - r.left, i = n.clientY - r.top;
1842
- if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), je(e), e.blocks.length > 0) {
1877
+ if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), Ye(e), e.blocks.length > 0) {
1843
1878
  const y = e.raycaster.intersectObjects(e.blocks, !1);
1844
1879
  if (y.length > 0) {
1845
- const z = y[0], O = z.object;
1846
- if ((d = O == null ? void 0 : O.userData) != null && d._isMergedBlocks && e.blockClickHandler) {
1847
- const A = Math.floor(z.faceIndex / 2), x = O.userData._quadToBlock[A];
1848
- x && e.blockClickHandler(x);
1880
+ const E = y[0], k = E.object;
1881
+ if ((d = k == null ? void 0 : k.userData) != null && d._isMergedBlocks && e.blockClickHandler) {
1882
+ const D = Math.floor(E.faceIndex / 2), w = k.userData._quadToBlock[D];
1883
+ w && e.blockClickHandler(w);
1849
1884
  }
1850
1885
  return;
1851
1886
  }
1852
1887
  }
1853
- const a = e.raycaster.intersectObjects(e.drillMeshes, !0), c = e.raycaster.intersectObjects(e.structuralMeshes, !0), l = ((p = a[0]) == null ? void 0 : p.distance) ?? 1 / 0;
1888
+ const a = e.raycaster.intersectObjects(e.drillMeshes, !0), c = e.raycaster.intersectObjects(e.structuralMeshes, !0), l = ((g = a[0]) == null ? void 0 : g.distance) ?? 1 / 0;
1854
1889
  if ((((N = c[0]) == null ? void 0 : N.distance) ?? 1 / 0) < l && c.length > 0) {
1855
1890
  const y = c[0].object;
1856
1891
  e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...y.userData });
@@ -1858,13 +1893,13 @@ function Un(e) {
1858
1893
  }
1859
1894
  if (a.length === 0) return;
1860
1895
  let u = a[0].object;
1861
- for (; u && u.parent && !((k = u.userData) != null && k.holeId); )
1896
+ for (; u && u.parent && !((O = u.userData) != null && O.holeId); )
1862
1897
  u = u.parent;
1863
- const g = (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;
1864
- g && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: g, project: m });
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;
1899
+ p && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: p, project: m });
1865
1900
  }, t.domElement.addEventListener("click", e.handleCanvasClick));
1866
1901
  }
1867
- class Nr {
1902
+ class Hr {
1868
1903
  constructor() {
1869
1904
  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();
1870
1905
  }
@@ -1878,21 +1913,21 @@ class Nr {
1878
1913
  const i = new f.DirectionalLight(16777215, 1.5);
1879
1914
  i.position.set(10, 10, 5), this.scene.add(i);
1880
1915
  const a = new f.AxesHelper(20);
1881
- this.scene.add(a), this.controls = new rt(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.controls.screenSpacePanning = !0, this.controls.enableZoom = !0, this.controls.zoomSpeed = 10, this.controls.minDistance = 1e-4, this.controls.maxDistance = 5e6, this.controls.mouseButtons = {
1916
+ this.scene.add(a), this.controls = new it(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.controls.screenSpacePanning = !0, this.controls.enableZoom = !0, this.controls.zoomSpeed = 10, this.controls.minDistance = 1e-4, this.controls.maxDistance = 5e6, this.controls.mouseButtons = {
1882
1917
  LEFT: f.MOUSE.PAN,
1883
1918
  MIDDLE: f.MOUSE.DOLLY,
1884
1919
  RIGHT: f.MOUSE.ROTATE
1885
1920
  }, this.controls.touches = {
1886
1921
  ONE: f.TOUCH.ROTATE,
1887
1922
  TWO: f.TOUCH.DOLLY_PAN
1888
- }, this.controls.maxPolarAngle = Math.PI, this.flyControls = new ot(this.camera, this.renderer.domElement), this.flyControls.movementSpeed = 2e3, this.flyControls.rollSpeed = Math.PI / 12, this.flyControls.dragToLook = !0, this.flyControls.enabled = !1, this.gizmo = new it(this.camera, this.renderer, {
1923
+ }, this.controls.maxPolarAngle = Math.PI, this.flyControls = new st(this.camera, this.renderer.domElement), this.flyControls.movementSpeed = 2e3, this.flyControls.rollSpeed = Math.PI / 12, this.flyControls.dragToLook = !0, this.flyControls.enabled = !1, this.gizmo = new at(this.camera, this.renderer, {
1889
1924
  container: this.container,
1890
1925
  placement: "top-right",
1891
1926
  size: 110,
1892
1927
  offset: { top: 12, right: 12 },
1893
1928
  animated: !0,
1894
1929
  speed: 1.5
1895
- }), this.gizmo.attachControls(this.controls), Un(this), this._wheelRelay = (l) => {
1930
+ }), this.gizmo.attachControls(this.controls), Qn(this), this._wheelRelay = (l) => {
1896
1931
  l.target !== this.renderer.domElement && (l.preventDefault(), this.renderer.domElement.dispatchEvent(new WheelEvent("wheel", {
1897
1932
  clientX: l.clientX,
1898
1933
  clientY: l.clientY,
@@ -1905,7 +1940,7 @@ class Nr {
1905
1940
  altKey: l.altKey,
1906
1941
  bubbles: !1
1907
1942
  })));
1908
- }, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }), Rn(this);
1943
+ }, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }), Xn(this);
1909
1944
  const c = () => {
1910
1945
  var s;
1911
1946
  this.frameId = requestAnimationFrame(c);
@@ -1917,16 +1952,16 @@ class Nr {
1917
1952
  resize() {
1918
1953
  if (!this.container || !this.camera || !this.renderer) return;
1919
1954
  const t = this.container.clientWidth, n = this.container.clientHeight;
1920
- this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), Vn(this, t, n);
1955
+ this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), qn(this, t, n);
1921
1956
  }
1922
1957
  dispose() {
1923
- 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, Ge(this), He(this), le(this), Pe(this), on(this), Ee(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));
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));
1924
1959
  }
1925
1960
  // ---------------------------------------------------------------------------
1926
1961
  // Data renderers — delegate to domain modules
1927
1962
  // ---------------------------------------------------------------------------
1928
1963
  setDrillholes(t, n = {}) {
1929
- Dn(this, t, n);
1964
+ In(this, t, n);
1930
1965
  }
1931
1966
  /**
1932
1967
  * Add floating 2D strip log panels beside drillholes in the 3D scene.
@@ -1941,13 +1976,13 @@ class Nr {
1941
1976
  * - `options` {object} — optional: panelWidth, lateralOffset, color, valueMin, valueMax
1942
1977
  */
1943
1978
  setStripLogs(t, n) {
1944
- Cn(this, t, n);
1979
+ jn(this, t, n);
1945
1980
  }
1946
1981
  /**
1947
1982
  * Remove all strip log panels from the scene and free GPU resources.
1948
1983
  */
1949
1984
  clearStripLogs() {
1950
- le(this);
1985
+ ce(this);
1951
1986
  }
1952
1987
  /**
1953
1988
  * Render block model data as a single merged mesh of exterior faces only.
@@ -1957,20 +1992,20 @@ class Nr {
1957
1992
  * @param {Object} [options]
1958
1993
  */
1959
1994
  setBlocks(t, n, r, o = {}) {
1960
- Gn(this, t, n, r, o);
1995
+ Wn(this, t, n, r, o);
1961
1996
  }
1962
1997
  /**
1963
1998
  * Update the opacity of all currently rendered blocks.
1964
1999
  * @param {number} opacity - New opacity value between 0 and 1
1965
2000
  */
1966
2001
  setBlockOpacity(t) {
1967
- jn(this, t);
2002
+ Kn(this, t);
1968
2003
  }
1969
2004
  setStructuralDiscs(t, n, r = {}) {
1970
- Xt(this, t, n, r);
2005
+ tn(this, t, n, r);
1971
2006
  }
1972
2007
  setStructuralDiscsVisible(t) {
1973
- qt(this, t);
2008
+ nn(this, t);
1974
2009
  }
1975
2010
  // ---------------------------------------------------------------------------
1976
2011
  // Click handlers
@@ -1992,41 +2027,41 @@ class Nr {
1992
2027
  this.viewChangeHandler = typeof t == "function" ? t : null;
1993
2028
  }
1994
2029
  getViewState() {
1995
- return Re(this);
2030
+ return He(this);
1996
2031
  }
1997
2032
  setViewState(t) {
1998
- return sn(this, t);
2033
+ return hn(this, t);
1999
2034
  }
2000
2035
  _buildViewSignature(t) {
2001
- return fe(t);
2036
+ return Me(t);
2002
2037
  }
2003
2038
  _emitViewChangeIfNeeded() {
2004
- an(this);
2039
+ bn(this);
2005
2040
  }
2006
2041
  _fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
2007
- he(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a });
2042
+ Ee(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a });
2008
2043
  }
2009
2044
  recenterCameraToOrigin(t = 1e3) {
2010
- ln(this, t);
2045
+ pn(this, t);
2011
2046
  }
2012
2047
  lookDown(t = 2e3) {
2013
- cn(this, t);
2048
+ gn(this, t);
2014
2049
  }
2015
2050
  pan(t = 0, n = 0) {
2016
- un(this, t, n);
2051
+ yn(this, t, n);
2017
2052
  }
2018
2053
  dolly(t = 1.1) {
2019
- mn(this, t);
2054
+ _n(this, t);
2020
2055
  }
2021
2056
  focusOnLastBounds(t = 1.2) {
2022
- dn(this, t);
2057
+ Mn(this, t);
2023
2058
  }
2024
2059
  /**
2025
2060
  * Change the camera field-of-view while keeping the visible scene the same apparent size.
2026
2061
  * @param {number} fovDeg - Desired FOV in degrees
2027
2062
  */
2028
2063
  setCameraFov(t) {
2029
- bn(this, t);
2064
+ Nn(this, t);
2030
2065
  }
2031
2066
  /**
2032
2067
  * Set the scene background colour.
@@ -2036,13 +2071,13 @@ class Nr {
2036
2071
  this.scene && (this.scene.background = new f.Color(t === "black" ? 0 : 16777215));
2037
2072
  }
2038
2073
  setControlMode(t = "orbit") {
2039
- gn(this, t);
2074
+ On(this, t);
2040
2075
  }
2041
2076
  // ---------------------------------------------------------------------------
2042
2077
  // Selection glow public API
2043
2078
  // ---------------------------------------------------------------------------
2044
2079
  _syncSelectables() {
2045
- G(this);
2080
+ j(this);
2046
2081
  }
2047
2082
  /**
2048
2083
  * Register the objects that are candidates for click-select glow.
@@ -2056,7 +2091,7 @@ class Nr {
2056
2091
  * @param {THREE.Object3D|null} object
2057
2092
  */
2058
2093
  selectObject(t) {
2059
- q(this, t || null);
2094
+ Z(this, t || null);
2060
2095
  }
2061
2096
  /**
2062
2097
  * Return the currently selected object, or null if nothing is selected.
@@ -2069,11 +2104,11 @@ class Nr {
2069
2104
  * Dispose the effect composer and all GPU resources used by the selection glow.
2070
2105
  */
2071
2106
  disposeGlow() {
2072
- Ee(this);
2107
+ Se(this);
2073
2108
  }
2074
2109
  /** @private */
2075
2110
  _updateSelectionFromPointer() {
2076
- je(this);
2111
+ Ye(this);
2077
2112
  }
2078
2113
  // ---------------------------------------------------------------------------
2079
2114
  // Raster overlay API — delegate to rasterOverlayScene
@@ -2083,14 +2118,14 @@ class Nr {
2083
2118
  * @param {object} layer - Layer descriptor returned by createRasterOverlay()
2084
2119
  */
2085
2120
  addRasterOverlay(t) {
2086
- Jt(this, t);
2121
+ an(this, t);
2087
2122
  }
2088
2123
  /**
2089
2124
  * Remove a raster overlay from the scene and dispose its GPU resources.
2090
2125
  * @param {string} id - Overlay id
2091
2126
  */
2092
2127
  removeRasterOverlay(t) {
2093
- de(this, t);
2128
+ _e(this, t);
2094
2129
  }
2095
2130
  /**
2096
2131
  * Set the opacity of a raster overlay at runtime.
@@ -2098,7 +2133,7 @@ class Nr {
2098
2133
  * @param {number} opacity - New opacity [0, 1]
2099
2134
  */
2100
2135
  setRasterOverlayOpacity(t, n) {
2101
- Qt(this, t, n);
2136
+ ln(this, t, n);
2102
2137
  }
2103
2138
  /**
2104
2139
  * Show or hide a raster overlay.
@@ -2106,7 +2141,7 @@ class Nr {
2106
2141
  * @param {boolean} visible
2107
2142
  */
2108
2143
  setRasterOverlayVisibility(t, n) {
2109
- en(this, t, n);
2144
+ cn(this, t, n);
2110
2145
  }
2111
2146
  /**
2112
2147
  * Update the elevation (Z position) of a raster overlay.
@@ -2114,7 +2149,7 @@ class Nr {
2114
2149
  * @param {number} elevation
2115
2150
  */
2116
2151
  setRasterOverlayElevation(t, n) {
2117
- tn(this, t, n);
2152
+ un(this, t, n);
2118
2153
  }
2119
2154
  /**
2120
2155
  * Return a raster overlay by id, or undefined if not found.
@@ -2122,131 +2157,151 @@ class Nr {
2122
2157
  * @returns {object|undefined}
2123
2158
  */
2124
2159
  getRasterOverlay(t) {
2125
- return nn(this, t);
2160
+ return mn(this, t);
2126
2161
  }
2127
2162
  /**
2128
2163
  * Return all raster overlay layers in insertion order.
2129
2164
  * @returns {object[]}
2130
2165
  */
2131
2166
  listRasterOverlays() {
2132
- return rn(this);
2167
+ return dn(this);
2133
2168
  }
2134
2169
  }
2135
2170
  export {
2136
- hn as $,
2137
- Z as A,
2138
- nr as B,
2139
- M as C,
2140
- ue as D,
2141
- De as E,
2142
- te as F,
2143
- ve as G,
2171
+ be as $,
2172
+ W as A,
2173
+ Mr as B,
2174
+ Er as C,
2175
+ ge as D,
2176
+ fe as E,
2177
+ ne as F,
2178
+ Ce as G,
2144
2179
  H,
2145
- br as I,
2146
- hr as J,
2147
- Ot as K,
2148
- Ne as L,
2149
- ce as M,
2150
- Ae as N,
2151
- ne as O,
2152
- Le as P,
2153
- Nr as Q,
2154
- be as R,
2155
- bt as S,
2156
- J as T,
2157
- ee as U,
2158
- we as V,
2159
- mt as W,
2160
- Q as X,
2161
- It as Y,
2162
- Dt as Z,
2163
- dt as _,
2164
- ke as a,
2165
- fn as a0,
2166
- ge as a1,
2167
- At as a2,
2168
- St as a3,
2169
- vt as a4,
2170
- ut as a5,
2171
- xn as a6,
2172
- wn as a7,
2173
- An as a8,
2174
- Jt as a9,
2175
- Er as aA,
2176
- nn as aB,
2177
- Re as aC,
2178
- Et as aD,
2179
- rn as aE,
2180
- mr as aF,
2181
- ar as aG,
2182
- sr as aH,
2183
- cn as aI,
2184
- yt as aJ,
2185
- Wt as aK,
2186
- Sn as aL,
2187
- un as aM,
2188
- ur as aN,
2189
- ln as aO,
2190
- de as aP,
2191
- xt as aQ,
2192
- gn as aR,
2193
- bn as aS,
2194
- tn as aT,
2195
- Qt as aU,
2196
- en as aV,
2197
- Cn as aW,
2198
- sn as aX,
2199
- ft as aY,
2200
- Nt as aa,
2201
- Mr as ab,
2202
- Vt as ac,
2203
- In as ad,
2204
- vn as ae,
2205
- $t as af,
2206
- fe as ag,
2207
- fr as ah,
2208
- _t as ai,
2209
- on as aj,
2210
- le as ak,
2211
- kt as al,
2212
- zr as am,
2213
- cr as an,
2214
- Ut as ao,
2215
- mn as ap,
2216
- an as aq,
2217
- Mt as ar,
2218
- he as as,
2219
- dn as at,
2220
- dr as au,
2221
- _n as av,
2222
- zt as aw,
2223
- wt as ax,
2224
- Te as ay,
2225
- Gt as az,
2226
- W as b,
2227
- lr as c,
2228
- Oe as d,
2229
- Fe as e,
2230
- ir as f,
2231
- me as g,
2232
- ae as h,
2233
- se as i,
2234
- K as j,
2235
- gt as k,
2236
- Pt as l,
2237
- ht as m,
2238
- yr as n,
2239
- _r as o,
2240
- Rt as p,
2241
- Lt as q,
2242
- _ as r,
2243
- pr as s,
2244
- gr as t,
2245
- tr as u,
2246
- Qn as v,
2247
- ie as w,
2248
- er as x,
2249
- or as y,
2250
- rr as z
2180
+ Nr as I,
2181
+ M as J,
2182
+ vr as K,
2183
+ ue as L,
2184
+ pe as M,
2185
+ he as N,
2186
+ Fr as O,
2187
+ xe as P,
2188
+ vt as Q,
2189
+ ve as R,
2190
+ re as S,
2191
+ Q as T,
2192
+ Hr as U,
2193
+ ze as V,
2194
+ dt as W,
2195
+ yt as X,
2196
+ Nt as Y,
2197
+ te as Z,
2198
+ Mt as _,
2199
+ me as a,
2200
+ Or as a$,
2201
+ ar as a0,
2202
+ we as a1,
2203
+ hr as a2,
2204
+ ht as a3,
2205
+ dr as a4,
2206
+ mr as a5,
2207
+ _t as a6,
2208
+ ee as a7,
2209
+ Gt as a8,
2210
+ G as a9,
2211
+ Me as aA,
2212
+ xr as aB,
2213
+ Lt as aC,
2214
+ fn as aD,
2215
+ ce as aE,
2216
+ Ft as aF,
2217
+ Rr as aG,
2218
+ Lr as aH,
2219
+ Qt as aI,
2220
+ _n as aJ,
2221
+ bn as aK,
2222
+ Dt as aL,
2223
+ Ee as aM,
2224
+ Mn as aN,
2225
+ wr as aO,
2226
+ Ln as aP,
2227
+ St as aQ,
2228
+ Bt as aR,
2229
+ Re as aS,
2230
+ Wt as aT,
2231
+ Vr as aU,
2232
+ mn as aV,
2233
+ He as aW,
2234
+ 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,
2242
+ Ne as ae,
2243
+ lr as af,
2244
+ Tt as ag,
2245
+ cr as ah,
2246
+ Rt as ai,
2247
+ Vt as aj,
2248
+ bt as ak,
2249
+ pt as al,
2250
+ gt as am,
2251
+ Pn as an,
2252
+ Bn as ao,
2253
+ Tn as ap,
2254
+ ur as aq,
2255
+ ft as ar,
2256
+ fr as as,
2257
+ an as at,
2258
+ xt as au,
2259
+ Pr as av,
2260
+ qt as aw,
2261
+ Gn as ax,
2262
+ Vn as ay,
2263
+ en as az,
2264
+ 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,
2272
+ _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,
2281
+ Et as bg,
2282
+ Ar as c,
2283
+ de as d,
2284
+ Ie as e,
2285
+ br as f,
2286
+ ye as g,
2287
+ 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
+ Br as o,
2295
+ Fe as p,
2296
+ Xt as q,
2297
+ Ct as r,
2298
+ _ as s,
2299
+ Ir as t,
2300
+ Cr as u,
2301
+ _r as v,
2302
+ se as w,
2303
+ gr as x,
2304
+ yr as y,
2305
+ zr as z
2251
2306
  };
2252
- //# sourceMappingURL=baselode3dScene-DbELmWnr.js.map
2307
+ //# sourceMappingURL=baselode3dScene-qMfVRKxK.js.map