baselode 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baselode.js +1773 -1302
- package/dist/baselode.js.map +1 -1
- package/package.json +1 -1
package/dist/baselode.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx as $, jsxs as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
1
|
+
import Q from "papaparse";
|
|
2
|
+
import { jsx as $, jsxs as te } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as _t, useState as ee, useEffect as fe, useMemo as Re } from "react";
|
|
4
|
+
import Le from "plotly.js-dist-min";
|
|
5
5
|
import * as y from "three";
|
|
6
|
-
import { OrbitControls as
|
|
7
|
-
import { FlyControls as
|
|
8
|
-
import { ViewportGizmo as
|
|
9
|
-
import { EffectComposer as
|
|
10
|
-
import { RenderPass as
|
|
11
|
-
import { OutlinePass as
|
|
12
|
-
const z = "hole_id",
|
|
6
|
+
import { OrbitControls as Jt } from "three/examples/jsm/controls/OrbitControls";
|
|
7
|
+
import { FlyControls as Qt } from "three/examples/jsm/controls/FlyControls";
|
|
8
|
+
import { ViewportGizmo as en } from "three-viewport-gizmo";
|
|
9
|
+
import { EffectComposer as tn } from "three/examples/jsm/postprocessing/EffectComposer.js";
|
|
10
|
+
import { RenderPass as nn } from "three/examples/jsm/postprocessing/RenderPass.js";
|
|
11
|
+
import { OutlinePass as rn } from "three/examples/jsm/postprocessing/OutlinePass.js";
|
|
12
|
+
const z = "hole_id", re = "latitude", oe = "longitude", ke = "elevation", G = "azimuth", U = "dip", C = "from", D = "to", Ie = "mid", ue = "project_id", he = "easting", pe = "northing", Nt = "crs", W = "depth", zt = "alpha", Mt = "beta", on = "strike", se = "geology_code", le = "geology_description", ao = {
|
|
13
13
|
// A unique hole identifier across the entire dataset and all future data sets
|
|
14
14
|
[z]: "string",
|
|
15
15
|
// The hole ID from the original collar source
|
|
16
16
|
datasource_hole_id: "string",
|
|
17
17
|
// The project ID or project code from the original collar source, if available
|
|
18
|
-
[
|
|
18
|
+
[ue]: "string",
|
|
19
19
|
// The latitude of the collar, in decimal degrees (WGS84)
|
|
20
|
-
[
|
|
20
|
+
[re]: "number",
|
|
21
21
|
// The longitude of the collar, in decimal degrees (WGS84)
|
|
22
|
-
[
|
|
22
|
+
[oe]: "number",
|
|
23
23
|
// The elevation of the collar, in meters above sea level (WGS84)
|
|
24
|
-
[
|
|
24
|
+
[ke]: "number",
|
|
25
25
|
// The easting coordinate of the collar, in meters (projected CRS)
|
|
26
|
-
[
|
|
26
|
+
[he]: "number",
|
|
27
27
|
// The northing coordinate of the collar, in meters (projected CRS)
|
|
28
|
-
[
|
|
28
|
+
[pe]: "number",
|
|
29
29
|
// The coordinate reference system of the collar coordinates for easting/northing, as an EPSG code or proj string
|
|
30
|
-
[
|
|
31
|
-
},
|
|
30
|
+
[Nt]: "string"
|
|
31
|
+
}, co = {
|
|
32
32
|
// The unique hole id that maps to the collar and any other data tables
|
|
33
33
|
[z]: "string",
|
|
34
34
|
// The depth along the hole where the survey measurement was taken / started
|
|
35
|
-
[
|
|
35
|
+
[W]: "number",
|
|
36
36
|
// The depth along the hole where the survey measurement ended, if applicable (some surveys are point measurements and may not have a 'to' depth)
|
|
37
37
|
[D]: "number",
|
|
38
38
|
// The azimuth of the hole at the survey depth, in degrees from north
|
|
39
|
-
[
|
|
39
|
+
[G]: "number",
|
|
40
40
|
// The dip of the hole at the survey depth, in degrees from horizontal (negative values indicate downward inclination)
|
|
41
|
-
[
|
|
42
|
-
},
|
|
41
|
+
[U]: "number"
|
|
42
|
+
}, uo = {
|
|
43
43
|
// The unique hole id that maps to the collar and any other data tables
|
|
44
44
|
[z]: "string",
|
|
45
45
|
// The depth along the hole where the assay interval starts
|
|
46
|
-
[
|
|
46
|
+
[C]: "number",
|
|
47
47
|
// The depth along the hole where the assay interval ends
|
|
48
48
|
[D]: "number",
|
|
49
49
|
// The midpoint depth of the assay interval
|
|
50
|
-
[
|
|
50
|
+
[Ie]: "number"
|
|
51
51
|
// assay value columns are variable and not standardized here.
|
|
52
52
|
// Assays may be flattened (one column per assay type) or long (one row per assay type with an additional 'assay_type' column)
|
|
53
|
-
},
|
|
53
|
+
}, sn = {
|
|
54
54
|
[z]: "string",
|
|
55
|
-
[
|
|
55
|
+
[C]: "number",
|
|
56
56
|
[D]: "number",
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
},
|
|
57
|
+
[Ie]: "number",
|
|
58
|
+
[se]: "string",
|
|
59
|
+
[le]: "string"
|
|
60
|
+
}, mo = {
|
|
61
61
|
[z]: "string",
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
62
|
+
[W]: "number",
|
|
63
|
+
[U]: "number",
|
|
64
|
+
[G]: "number",
|
|
65
|
+
[zt]: "number",
|
|
66
|
+
[Mt]: "number",
|
|
67
67
|
comments: "string"
|
|
68
|
-
},
|
|
68
|
+
}, ln = {
|
|
69
69
|
[z]: ["hole_id", "holeid", "hole id", "hole-id"],
|
|
70
70
|
datasource_hole_id: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
71
|
+
[ue]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
|
|
72
|
+
[re]: ["latitude", "lat"],
|
|
73
|
+
[oe]: ["longitude", "lon"],
|
|
74
|
+
[ke]: ["elevation", "rl", "elev", "z"],
|
|
75
|
+
[he]: ["easting", "x"],
|
|
76
|
+
[pe]: ["northing", "y"],
|
|
77
|
+
[Nt]: ["crs", "epsg", "projection"],
|
|
78
|
+
[C]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
|
|
79
79
|
[D]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
|
|
80
|
-
[
|
|
80
|
+
[se]: [
|
|
81
81
|
"geology_code",
|
|
82
82
|
"geologycode",
|
|
83
83
|
"lith1",
|
|
@@ -87,7 +87,7 @@ const z = "hole_id", te = "latitude", ne = "longitude", Me = "elevation", B = "a
|
|
|
87
87
|
"plot_lithology",
|
|
88
88
|
"rock1"
|
|
89
89
|
],
|
|
90
|
-
[
|
|
90
|
+
[le]: [
|
|
91
91
|
"geology_description",
|
|
92
92
|
"geologydescription",
|
|
93
93
|
"geology_comment",
|
|
@@ -98,42 +98,42 @@ const z = "hole_id", te = "latitude", ne = "longitude", Me = "elevation", B = "a
|
|
|
98
98
|
"description",
|
|
99
99
|
"comments"
|
|
100
100
|
],
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
101
|
+
[G]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdir_calc", "dipdirect_calc"],
|
|
102
|
+
[U]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
|
|
103
|
+
[zt]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
|
|
104
|
+
[Mt]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
|
|
105
105
|
declination: ["declination", "dec"],
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
},
|
|
109
|
-
for (const [e, t] of Object.entries(
|
|
106
|
+
[W]: ["depth", "survey_depth", "surveydepth"],
|
|
107
|
+
[on]: ["strike", "str"]
|
|
108
|
+
}, Et = {};
|
|
109
|
+
for (const [e, t] of Object.entries(ln))
|
|
110
110
|
for (const n of t) {
|
|
111
111
|
const r = n.toLowerCase().trim();
|
|
112
|
-
|
|
112
|
+
Et[r] = e;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Oe(e) {
|
|
115
115
|
return (e || "").toString().trim().toLowerCase().replace(/\s+/g, "_");
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
const r = { ...
|
|
117
|
+
function be(e, t = null, n = null) {
|
|
118
|
+
const r = { ...Et };
|
|
119
119
|
if (n) {
|
|
120
120
|
for (const [i, s] of Object.entries(n))
|
|
121
121
|
if (i != null && s != null) {
|
|
122
|
-
const l =
|
|
123
|
-
r[l] =
|
|
122
|
+
const l = Oe(i), u = Oe(s);
|
|
123
|
+
r[l] = u;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
const o = {};
|
|
127
127
|
for (const [i, s] of Object.entries(e)) {
|
|
128
|
-
const l =
|
|
129
|
-
o[
|
|
128
|
+
const l = Oe(i), u = r[l] || l;
|
|
129
|
+
o[u] = s;
|
|
130
130
|
}
|
|
131
131
|
return o;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return e.map((r) =>
|
|
133
|
+
function fo(e, t = null, n = null) {
|
|
134
|
+
return e.map((r) => be(r, t, n));
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const an = /* @__PURE__ */ new Set([
|
|
137
137
|
"hole_id",
|
|
138
138
|
"holeid",
|
|
139
139
|
"id",
|
|
@@ -165,34 +165,34 @@ const rn = /* @__PURE__ */ new Set([
|
|
|
165
165
|
"todepth",
|
|
166
166
|
"comment",
|
|
167
167
|
"z"
|
|
168
|
-
]),
|
|
169
|
-
function
|
|
168
|
+
]), Xe = "[baselode:data]";
|
|
169
|
+
function cn(e, t = "Unknown error") {
|
|
170
170
|
if (e instanceof Error) return e;
|
|
171
171
|
const n = typeof e == "string" && e.trim() ? e : t;
|
|
172
172
|
return new Error(n);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const r =
|
|
174
|
+
function j(e, t, n = "Operation failed") {
|
|
175
|
+
const r = cn(t, n), o = new Error(`${e}: ${r.message}`);
|
|
176
176
|
return o.cause = r, o;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function ho(e, t) {
|
|
179
179
|
if (t !== void 0) {
|
|
180
|
-
console.warn(`${
|
|
180
|
+
console.warn(`${Xe} ${e}`, t);
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
console.warn(`${
|
|
183
|
+
console.warn(`${Xe} ${e}`);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
console.info(`${
|
|
185
|
+
function po(e) {
|
|
186
|
+
console.info(`${Xe} ${e}`);
|
|
187
187
|
}
|
|
188
|
-
const
|
|
189
|
-
function
|
|
188
|
+
const Ve = (e, t = null) => be(e, null, t);
|
|
189
|
+
function un(e) {
|
|
190
190
|
return { holeId: e[z] };
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function kt(e, t = null) {
|
|
193
193
|
const n = e[z], r = n !== void 0 ? `${n}`.trim() : "";
|
|
194
194
|
if (!r) return null;
|
|
195
|
-
const o = e[
|
|
195
|
+
const o = e[ue] || e.project || e.project_code, i = Number(e[C]), s = Number(e[D]);
|
|
196
196
|
return !Number.isFinite(i) || !Number.isFinite(s) || s <= i ? null : {
|
|
197
197
|
holeId: r,
|
|
198
198
|
project: o,
|
|
@@ -201,117 +201,117 @@ function Nt(e, t = null) {
|
|
|
201
201
|
...e
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function At(e, t) {
|
|
205
205
|
var o;
|
|
206
206
|
const n = t.sort((i, s) => i.from - s.from), r = [];
|
|
207
207
|
return n.forEach((i) => {
|
|
208
|
-
const { from: s, to: l, project:
|
|
208
|
+
const { from: s, to: l, project: u, ...a } = i, c = {
|
|
209
209
|
z: s,
|
|
210
210
|
from: s,
|
|
211
211
|
to: l,
|
|
212
212
|
[z]: e,
|
|
213
|
-
[
|
|
213
|
+
[ue]: u,
|
|
214
214
|
...a
|
|
215
215
|
};
|
|
216
|
-
r.push(
|
|
216
|
+
r.push(c), r.push({ ...c, z: l });
|
|
217
217
|
}), { id: e, project: (o = n[0]) == null ? void 0 : o.project, points: r };
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function bo(e, t = null) {
|
|
220
220
|
return new Promise((n, r) => {
|
|
221
221
|
const o = /* @__PURE__ */ new Set();
|
|
222
|
-
|
|
222
|
+
Q.parse(e, {
|
|
223
223
|
header: !0,
|
|
224
224
|
dynamicTyping: !0,
|
|
225
225
|
skipEmptyLines: !0,
|
|
226
226
|
step: (i) => {
|
|
227
|
-
const l =
|
|
227
|
+
const l = Ve(i.data, t)[z];
|
|
228
228
|
l !== void 0 && `${l}`.trim() !== "" && o.add(`${l}`.trim());
|
|
229
229
|
},
|
|
230
230
|
complete: () => n(Array.from(o)),
|
|
231
|
-
error: (i) => r(
|
|
231
|
+
error: (i) => r(j("parseAssayHoleIds", i))
|
|
232
232
|
});
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
return Object.entries(e || {}).some(([t, n]) => !(
|
|
235
|
+
function dn(e) {
|
|
236
|
+
return Object.entries(e || {}).some(([t, n]) => !(an.has(t) || n == null || typeof n == "string" && n.trim() === ""));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function mn(e, t = null) {
|
|
239
239
|
return new Promise((n, r) => {
|
|
240
240
|
const o = /* @__PURE__ */ new Map();
|
|
241
|
-
|
|
241
|
+
Q.parse(e, {
|
|
242
242
|
header: !0,
|
|
243
243
|
dynamicTyping: !0,
|
|
244
244
|
skipEmptyLines: !0,
|
|
245
245
|
step: (i) => {
|
|
246
|
-
const s =
|
|
247
|
-
if (!
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
const a = `${
|
|
246
|
+
const s = Ve(i.data, t);
|
|
247
|
+
if (!dn(s)) return;
|
|
248
|
+
const u = un(s).holeId;
|
|
249
|
+
if (u !== void 0 && `${u}`.trim() !== "") {
|
|
250
|
+
const a = `${u}`.trim();
|
|
251
251
|
o.has(a) || o.set(a, {
|
|
252
252
|
holeId: a
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
255
|
},
|
|
256
256
|
complete: () => n(Array.from(o.values())),
|
|
257
|
-
error: (i) => r(
|
|
257
|
+
error: (i) => r(j("parseAssayHoleIdsWithAssays", i))
|
|
258
258
|
});
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function fn(e, t, n = null, r = null) {
|
|
262
262
|
return new Promise((o, i) => {
|
|
263
263
|
const s = `${t}`.trim();
|
|
264
264
|
if (!s) {
|
|
265
|
-
i(
|
|
265
|
+
i(j("parseAssayHole", new Error("Missing hole id")));
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
268
268
|
const l = [];
|
|
269
|
-
|
|
269
|
+
Q.parse(e, {
|
|
270
270
|
header: !0,
|
|
271
271
|
dynamicTyping: !0,
|
|
272
272
|
skipEmptyLines: !0,
|
|
273
|
-
step: (
|
|
274
|
-
const a =
|
|
275
|
-
|
|
273
|
+
step: (u) => {
|
|
274
|
+
const a = Ve(u.data, r), c = kt(a, r);
|
|
275
|
+
c && `${c.holeId}`.trim() === s && l.push(c);
|
|
276
276
|
},
|
|
277
277
|
complete: () => {
|
|
278
278
|
if (!l.length) {
|
|
279
279
|
o(null);
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
|
-
const
|
|
283
|
-
o(
|
|
282
|
+
const u = At(s, l);
|
|
283
|
+
o(u);
|
|
284
284
|
},
|
|
285
|
-
error: (
|
|
285
|
+
error: (u) => i(j("parseAssayHole", u))
|
|
286
286
|
});
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function hn(e, t = null, n = null) {
|
|
290
290
|
return new Promise((r, o) => {
|
|
291
|
-
|
|
291
|
+
Q.parse(e, {
|
|
292
292
|
header: !0,
|
|
293
293
|
dynamicTyping: !0,
|
|
294
294
|
skipEmptyLines: !0,
|
|
295
295
|
complete: (i) => {
|
|
296
296
|
const s = /* @__PURE__ */ new Map();
|
|
297
|
-
i.data.forEach((
|
|
298
|
-
const a =
|
|
299
|
-
|
|
297
|
+
i.data.forEach((u) => {
|
|
298
|
+
const a = Ve(u, n), c = kt(a, n);
|
|
299
|
+
c && (s.has(c.holeId) || s.set(c.holeId, []), s.get(c.holeId).push(c));
|
|
300
300
|
});
|
|
301
|
-
const l = Array.from(s.entries()).map(([
|
|
301
|
+
const l = Array.from(s.entries()).map(([u, a]) => At(u, a));
|
|
302
302
|
r({ holes: l });
|
|
303
303
|
},
|
|
304
|
-
error: (i) => o(
|
|
304
|
+
error: (i) => o(j("parseAssaysCSV", i))
|
|
305
305
|
});
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function go(e = {}) {
|
|
309
309
|
const t = {};
|
|
310
310
|
return Object.entries(e || {}).forEach(([n, r]) => {
|
|
311
|
-
n && (t[
|
|
311
|
+
n && (t[Oe(n)] = r);
|
|
312
312
|
}), t;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function yo(e = {}, t = [], n) {
|
|
315
315
|
for (const r of t) {
|
|
316
316
|
const o = e[r];
|
|
317
317
|
if (o != null && `${o}`.trim() !== "")
|
|
@@ -319,8 +319,8 @@ function io(e = {}, t = [], n) {
|
|
|
319
319
|
}
|
|
320
320
|
return n;
|
|
321
321
|
}
|
|
322
|
-
const
|
|
323
|
-
function
|
|
322
|
+
const pn = 4;
|
|
323
|
+
function xt(e = [], t = "") {
|
|
324
324
|
if (!e.length) return [];
|
|
325
325
|
if (!t) return e;
|
|
326
326
|
const n = e.findIndex((i) => i === t);
|
|
@@ -328,7 +328,7 @@ function Mt(e = [], t = "") {
|
|
|
328
328
|
const r = e[n], o = e.filter((i, s) => s !== n);
|
|
329
329
|
return [r, ...o];
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Pe({
|
|
332
332
|
property: e = "",
|
|
333
333
|
chartType: t = "",
|
|
334
334
|
categoricalProps: n = [],
|
|
@@ -337,18 +337,18 @@ function ke({
|
|
|
337
337
|
} = {}) {
|
|
338
338
|
return e ? r.includes(e) ? "comment" : n.includes(e) ? "categorical" : e === "dip" ? "tadpole" : !t || t === "categorical" || t === "comment" || t === "tadpole" ? o : t : t || o;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function It({
|
|
341
341
|
holeIds: e = [],
|
|
342
342
|
focusedHoleId: t = "",
|
|
343
|
-
plotCount: n =
|
|
343
|
+
plotCount: n = pn,
|
|
344
344
|
defaultProp: r = "",
|
|
345
345
|
categoricalProps: o = [],
|
|
346
346
|
commentProps: i = [],
|
|
347
347
|
numericDefaultChartType: s = "markers+line"
|
|
348
348
|
} = {}) {
|
|
349
|
-
const l =
|
|
350
|
-
return Array.from({ length: n }).map((
|
|
351
|
-
const
|
|
349
|
+
const l = xt(e, t);
|
|
350
|
+
return Array.from({ length: n }).map((u, a) => {
|
|
351
|
+
const c = l[a] || e[a] || "", m = Pe({
|
|
352
352
|
property: r,
|
|
353
353
|
chartType: "",
|
|
354
354
|
categoricalProps: o,
|
|
@@ -356,30 +356,30 @@ function xt({
|
|
|
356
356
|
numericDefaultChartType: s
|
|
357
357
|
});
|
|
358
358
|
return {
|
|
359
|
-
holeId:
|
|
359
|
+
holeId: c,
|
|
360
360
|
property: r,
|
|
361
361
|
chartType: m
|
|
362
362
|
};
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
const
|
|
366
|
-
[
|
|
365
|
+
const xe = "numeric", De = "categorical", Ae = "comment", Te = "hidden", We = "tadpole", ot = {
|
|
366
|
+
[xe]: [
|
|
367
367
|
{ value: "bar", label: "Bars" },
|
|
368
368
|
{ value: "markers", label: "Markers" },
|
|
369
369
|
{ value: "markers+line", label: "Markers + Line" },
|
|
370
370
|
{ value: "line", label: "Line only" }
|
|
371
371
|
],
|
|
372
|
-
[
|
|
372
|
+
[De]: [
|
|
373
373
|
{ value: "categorical", label: "Categorical bands" }
|
|
374
374
|
],
|
|
375
|
-
[
|
|
375
|
+
[Ae]: [
|
|
376
376
|
{ value: "comment", label: "Comments" }
|
|
377
377
|
],
|
|
378
|
-
[
|
|
378
|
+
[We]: [
|
|
379
379
|
{ value: "tadpole", label: "Tadpole" }
|
|
380
380
|
],
|
|
381
|
-
[
|
|
382
|
-
},
|
|
381
|
+
[Te]: []
|
|
382
|
+
}, it = /* @__PURE__ */ new Set([
|
|
383
383
|
// Hole identifiers
|
|
384
384
|
"hole_id",
|
|
385
385
|
"holeid",
|
|
@@ -434,7 +434,7 @@ const Ie = "numeric", Se = "categorical", xe = "comment", Oe = "hidden", Ge = "t
|
|
|
434
434
|
"data_source",
|
|
435
435
|
"_hole_key",
|
|
436
436
|
"_hole_id_key"
|
|
437
|
-
]),
|
|
437
|
+
]), bn = /* @__PURE__ */ new Set([
|
|
438
438
|
"comments",
|
|
439
439
|
"comment",
|
|
440
440
|
"notes",
|
|
@@ -447,50 +447,50 @@ const Ie = "numeric", Se = "categorical", xe = "comment", Oe = "hidden", Ge = "t
|
|
|
447
447
|
"structcomment",
|
|
448
448
|
"geology_description"
|
|
449
449
|
]);
|
|
450
|
-
function
|
|
450
|
+
function gn(e) {
|
|
451
451
|
if (!(e != null && e.length))
|
|
452
452
|
return { byType: {}, numericCols: [], categoricalCols: [], commentCols: [] };
|
|
453
453
|
const t = new Set(e.flatMap((r) => Object.keys(r || {}))), n = {};
|
|
454
454
|
for (const r of t) {
|
|
455
455
|
const o = r.toLowerCase().trim();
|
|
456
|
-
if (
|
|
457
|
-
n[r] =
|
|
456
|
+
if (it.has(o) || it.has(r)) {
|
|
457
|
+
n[r] = Te;
|
|
458
458
|
continue;
|
|
459
459
|
}
|
|
460
|
-
if (
|
|
461
|
-
const l = e.some((
|
|
462
|
-
const a =
|
|
460
|
+
if (bn.has(o)) {
|
|
461
|
+
const l = e.some((u) => {
|
|
462
|
+
const a = u[r];
|
|
463
463
|
return a != null && String(a).trim() !== "" && String(a) !== "null";
|
|
464
464
|
});
|
|
465
|
-
n[r] = l ?
|
|
465
|
+
n[r] = l ? Ae : Te;
|
|
466
466
|
continue;
|
|
467
467
|
}
|
|
468
468
|
let i = !1, s = !1;
|
|
469
469
|
for (const l of e) {
|
|
470
|
-
const
|
|
471
|
-
if (!(
|
|
470
|
+
const u = l[r];
|
|
471
|
+
if (!(u == null || typeof u == "string" && u.trim() === "") && (s = !0, typeof u == "number" && Number.isFinite(u))) {
|
|
472
472
|
i = !0;
|
|
473
473
|
break;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
s ? i ? n[r] =
|
|
476
|
+
s ? i ? n[r] = xe : n[r] = De : n[r] = Te;
|
|
477
477
|
}
|
|
478
478
|
return {
|
|
479
479
|
byType: n,
|
|
480
|
-
numericCols: Object.entries(n).filter(([, r]) => r ===
|
|
481
|
-
categoricalCols: Object.entries(n).filter(([, r]) => r ===
|
|
482
|
-
commentCols: Object.entries(n).filter(([, r]) => r ===
|
|
480
|
+
numericCols: Object.entries(n).filter(([, r]) => r === xe).map(([r]) => r),
|
|
481
|
+
categoricalCols: Object.entries(n).filter(([, r]) => r === De).map(([r]) => r),
|
|
482
|
+
commentCols: Object.entries(n).filter(([, r]) => r === Ae).map(([r]) => r)
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function Ke(e) {
|
|
486
|
+
return ot[e] ?? ot[xe];
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
const t =
|
|
490
|
-
return t.length ? e ===
|
|
488
|
+
function _o(e) {
|
|
489
|
+
const t = Ke(e);
|
|
490
|
+
return t.length ? e === xe ? "line" : t[0].value : "markers+line";
|
|
491
491
|
}
|
|
492
|
-
function
|
|
493
|
-
const t = e.flatMap((l) => l.points || []), { numericCols: n, categoricalCols: r, commentCols: o, byType: i } =
|
|
492
|
+
function we(e = []) {
|
|
493
|
+
const t = e.flatMap((l) => l.points || []), { numericCols: n, categoricalCols: r, commentCols: o, byType: i } = gn(t), s = n[0] || r[0] || "";
|
|
494
494
|
return {
|
|
495
495
|
numericProps: n,
|
|
496
496
|
categoricalProps: r,
|
|
@@ -499,15 +499,15 @@ function Le(e = []) {
|
|
|
499
499
|
defaultProp: s
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
async function
|
|
503
|
-
return await
|
|
502
|
+
async function yn(e, t = null) {
|
|
503
|
+
return await mn(e);
|
|
504
504
|
}
|
|
505
|
-
async function
|
|
506
|
-
return await
|
|
505
|
+
async function _n(e, t, n = null) {
|
|
506
|
+
return await fn(e, t);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Nn(e = [], t = "") {
|
|
509
509
|
if (!e.length) return null;
|
|
510
|
-
const { numericProps: n, categoricalProps: r, commentProps: o, columnMeta: i, defaultProp: s } =
|
|
510
|
+
const { numericProps: n, categoricalProps: r, commentProps: o, columnMeta: i, defaultProp: s } = we(e), l = e.map((a) => a.id || a.holeId).filter(Boolean), u = It({
|
|
511
511
|
holeIds: l,
|
|
512
512
|
focusedHoleId: t,
|
|
513
513
|
plotCount: 4,
|
|
@@ -523,40 +523,40 @@ function bn(e = [], t = "") {
|
|
|
523
523
|
commentProps: o,
|
|
524
524
|
columnMeta: i,
|
|
525
525
|
defaultProp: s,
|
|
526
|
-
traceConfigs:
|
|
526
|
+
traceConfigs: u
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
|
-
async function
|
|
530
|
-
const { holes: r } = await
|
|
529
|
+
async function No(e, t = "", n = null) {
|
|
530
|
+
const { holes: r } = await hn(e, n), o = Nn(r, t);
|
|
531
531
|
if (!o) throw new Error("No valid assay intervals found.");
|
|
532
532
|
return o;
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function zo(e, t = null) {
|
|
535
535
|
return new Promise((n, r) => {
|
|
536
|
-
|
|
536
|
+
Q.parse(e, {
|
|
537
537
|
header: !0,
|
|
538
538
|
dynamicTyping: !0,
|
|
539
539
|
skipEmptyLines: !0,
|
|
540
540
|
complete: (o) => {
|
|
541
|
-
const i = o.data.map((s) =>
|
|
541
|
+
const i = o.data.map((s) => zn(s, t)).filter((s) => s[z] && Number.isFinite(s[W]) && Number.isFinite(s[U]) && Number.isFinite(s[G]));
|
|
542
542
|
n(i);
|
|
543
543
|
},
|
|
544
|
-
error: (o) => r(
|
|
544
|
+
error: (o) => r(j("parseSurveyCSV", o))
|
|
545
545
|
});
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
const n =
|
|
548
|
+
function zn(e, t = null) {
|
|
549
|
+
const n = be(e, null, t), r = n[z], o = n[ue] || n.project || n.project_code, i = Me(n[re]), s = Me(n[oe]), l = Me(n[W]), u = Me(n[U]), a = Me(n[G]), c = Me(n.maxdepth);
|
|
550
550
|
return {
|
|
551
551
|
raw: n,
|
|
552
552
|
[z]: r,
|
|
553
|
-
[
|
|
554
|
-
[
|
|
555
|
-
[
|
|
556
|
-
[
|
|
557
|
-
[
|
|
558
|
-
[
|
|
559
|
-
maxdepth:
|
|
553
|
+
[ue]: o,
|
|
554
|
+
[re]: i,
|
|
555
|
+
[oe]: s,
|
|
556
|
+
[W]: l,
|
|
557
|
+
[U]: u,
|
|
558
|
+
[G]: a,
|
|
559
|
+
maxdepth: c,
|
|
560
560
|
// Legacy field names for backwards compatibility
|
|
561
561
|
project_code: o,
|
|
562
562
|
latitude: i,
|
|
@@ -564,107 +564,107 @@ function gn(e, t = null) {
|
|
|
564
564
|
surveydepth: l
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
|
-
const
|
|
567
|
+
const Me = (e) => {
|
|
568
568
|
const t = Number(e);
|
|
569
569
|
return Number.isFinite(t) ? t : void 0;
|
|
570
570
|
};
|
|
571
|
-
function
|
|
572
|
-
var a,
|
|
571
|
+
function Mo(e, t) {
|
|
572
|
+
var a, c, m, d;
|
|
573
573
|
const n = /* @__PURE__ */ new Map();
|
|
574
574
|
e.forEach((f) => {
|
|
575
|
-
const
|
|
576
|
-
if (!
|
|
577
|
-
const b =
|
|
575
|
+
const h = (f[z] || f.holeId || f.id || "").toString().trim();
|
|
576
|
+
if (!h) return;
|
|
577
|
+
const b = h.toLowerCase();
|
|
578
578
|
n.has(b) || n.set(b, f);
|
|
579
579
|
});
|
|
580
|
-
const r = ((a = e[0]) == null ? void 0 : a.lat) ?? ((
|
|
580
|
+
const r = ((a = e[0]) == null ? void 0 : a.lat) ?? ((c = e[0]) == null ? void 0 : c[re]) ?? 0, o = ((m = e[0]) == null ? void 0 : m.lng) ?? ((d = e[0]) == null ? void 0 : d[oe]) ?? 0, i = 111132, s = 111320 * Math.cos(r * Math.PI / 180), l = /* @__PURE__ */ new Map();
|
|
581
581
|
t.forEach((f) => {
|
|
582
|
-
const
|
|
583
|
-
if (!
|
|
584
|
-
const b =
|
|
582
|
+
const h = (f[z] || "").toString().trim();
|
|
583
|
+
if (!h) return;
|
|
584
|
+
const b = h.toLowerCase();
|
|
585
585
|
l.has(b) || l.set(b, []), l.get(b).push(f);
|
|
586
586
|
});
|
|
587
|
-
const
|
|
588
|
-
return l.forEach((f,
|
|
589
|
-
const b = n.get(
|
|
587
|
+
const u = [];
|
|
588
|
+
return l.forEach((f, h) => {
|
|
589
|
+
const b = n.get(h);
|
|
590
590
|
if (!b) return;
|
|
591
|
-
const
|
|
592
|
-
if (!
|
|
593
|
-
const
|
|
594
|
-
let
|
|
595
|
-
for (let
|
|
596
|
-
const
|
|
597
|
-
if (!
|
|
598
|
-
|
|
599
|
-
x:
|
|
600
|
-
y:
|
|
591
|
+
const _ = f.filter((w) => Number.isFinite(w[W] ?? w.surveydepth)).sort((w, q) => (w[W] ?? w.surveydepth) - (q[W] ?? q.surveydepth));
|
|
592
|
+
if (!_.length) return;
|
|
593
|
+
const p = b.lat ?? b[re], g = b.lng ?? b[oe], E = 111132, M = 111320 * Math.cos(p * Math.PI / 180), v = (g - o) * s, k = (p - r) * i, F = [];
|
|
594
|
+
let T = 0, L = 0, Y = 0;
|
|
595
|
+
for (let w = 0; w < _.length; w += 1) {
|
|
596
|
+
const q = _[w], R = _[w - 1], I = q[W] ?? q.surveydepth, A = q[G] ?? q.azimuth, N = q[U] ?? q.dip;
|
|
597
|
+
if (!R) {
|
|
598
|
+
F.push({
|
|
599
|
+
x: v + T,
|
|
600
|
+
y: k + L,
|
|
601
601
|
z: 0,
|
|
602
|
-
md:
|
|
603
|
-
azimuth:
|
|
604
|
-
dip:
|
|
602
|
+
md: I,
|
|
603
|
+
azimuth: A,
|
|
604
|
+
dip: N
|
|
605
605
|
});
|
|
606
606
|
continue;
|
|
607
607
|
}
|
|
608
|
-
const
|
|
609
|
-
if (
|
|
610
|
-
const
|
|
611
|
-
Math.sin(
|
|
612
|
-
),
|
|
613
|
-
|
|
614
|
-
x:
|
|
615
|
-
y:
|
|
616
|
-
z: -
|
|
608
|
+
const O = R[W] ?? R.surveydepth, x = R[G] ?? R.azimuth, V = R[U] ?? R.dip, H = I - O;
|
|
609
|
+
if (H <= 0) continue;
|
|
610
|
+
const B = st(V), X = st(N), K = Ze(x), ie = Ze(A), ge = Math.acos(
|
|
611
|
+
Math.sin(B) * Math.sin(X) * Math.cos(K - ie) + Math.cos(B) * Math.cos(X)
|
|
612
|
+
), de = ge > 1e-6 ? 2 / ge * Math.tan(ge / 2) : 1, ve = 0.5 * H * (Math.sin(B) * Math.cos(K) + Math.sin(X) * Math.cos(ie)) * de, me = 0.5 * H * (Math.sin(B) * Math.sin(K) + Math.sin(X) * Math.sin(ie)) * de, je = 0.5 * H * (Math.cos(B) + Math.cos(X)) * de;
|
|
613
|
+
T += ve, L += me, Y += je, F.push({
|
|
614
|
+
x: v + T,
|
|
615
|
+
y: k + L,
|
|
616
|
+
z: -Y,
|
|
617
617
|
// render with z up; depth down
|
|
618
|
-
md:
|
|
619
|
-
azimuth:
|
|
620
|
-
dip:
|
|
618
|
+
md: I,
|
|
619
|
+
azimuth: A,
|
|
620
|
+
dip: N
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
|
-
const
|
|
624
|
-
...
|
|
625
|
-
lat:
|
|
626
|
-
lng: g +
|
|
623
|
+
const Z = F.map((w) => ({
|
|
624
|
+
...w,
|
|
625
|
+
lat: p + w.y / E,
|
|
626
|
+
lng: g + w.x / M
|
|
627
627
|
}));
|
|
628
|
-
|
|
629
|
-
id: b[z] || b.holeId ||
|
|
630
|
-
project: b[
|
|
631
|
-
points:
|
|
628
|
+
u.push({
|
|
629
|
+
id: b[z] || b.holeId || h,
|
|
630
|
+
project: b[ue] || b.project_id || b.project || "",
|
|
631
|
+
points: Z,
|
|
632
632
|
collar: b
|
|
633
633
|
});
|
|
634
|
-
}),
|
|
634
|
+
}), u;
|
|
635
635
|
}
|
|
636
|
-
const
|
|
636
|
+
const Ze = (e) => e * Math.PI / 180, st = (e) => {
|
|
637
637
|
const t = Number(e), n = 90 + (Number.isFinite(t) ? t : 0), r = Math.min(180, Math.max(0, n));
|
|
638
|
-
return
|
|
638
|
+
return Ze(r);
|
|
639
639
|
};
|
|
640
|
-
function
|
|
640
|
+
function ne(e, t = void 0) {
|
|
641
641
|
const n = Number(e);
|
|
642
642
|
return Number.isFinite(n) ? n : t;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function lt(e) {
|
|
645
645
|
return e == null ? "" : `${e}`.trim();
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
const n = t || "hole_id", o = [n, "hole_id", "holeId", "id"].find((i) => e.some((s) =>
|
|
647
|
+
function $e(e = [], t = null) {
|
|
648
|
+
const n = t || "hole_id", o = [n, "hole_id", "holeId", "id"].find((i) => e.some((s) => lt(s == null ? void 0 : s[i])));
|
|
649
649
|
if (!o)
|
|
650
|
-
throw
|
|
650
|
+
throw j("canonicalizeHoleIdRows", new Error(`hole id column '${n}' not found`));
|
|
651
651
|
return {
|
|
652
652
|
aliasCol: o,
|
|
653
653
|
rows: e.map((i) => ({
|
|
654
654
|
...i,
|
|
655
|
-
hole_id:
|
|
655
|
+
hole_id: lt(i == null ? void 0 : i[o])
|
|
656
656
|
}))
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function at(e) {
|
|
660
660
|
return Number(e) * Math.PI / 180;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
const n =
|
|
662
|
+
function Ge(e, t) {
|
|
663
|
+
const n = at(e), r = at(t), o = Math.cos(r) * Math.sin(n), i = Math.cos(r) * Math.cos(n), s = Math.sin(r) * -1;
|
|
664
664
|
return { ca: o, cb: i, cc: s };
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
const s =
|
|
666
|
+
function Mn(e, t, n, r, o, i = "minimum_curvature") {
|
|
667
|
+
const s = Ge(t, n), l = Ge(r, o);
|
|
668
668
|
if (i === "tangential")
|
|
669
669
|
return {
|
|
670
670
|
dx: e * s.ca,
|
|
@@ -674,7 +674,7 @@ function yn(e, t, n, r, o, i = "minimum_curvature") {
|
|
|
674
674
|
dip: n
|
|
675
675
|
};
|
|
676
676
|
if (i === "balanced_tangential") {
|
|
677
|
-
const m = 0.5 * (t + r), d = 0.5 * (n + o), f =
|
|
677
|
+
const m = 0.5 * (t + r), d = 0.5 * (n + o), f = Ge(m, d);
|
|
678
678
|
return {
|
|
679
679
|
dx: e * f.ca,
|
|
680
680
|
dy: e * f.cb,
|
|
@@ -683,109 +683,109 @@ function yn(e, t, n, r, o, i = "minimum_curvature") {
|
|
|
683
683
|
dip: d
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
const
|
|
686
|
+
const u = s.ca * l.ca + s.cb * l.cb + s.cc * l.cc, a = Math.acos(Math.max(-1, Math.min(1, u))), c = a > 1e-6 ? 2 * Math.tan(a / 2) / a : 1;
|
|
687
687
|
return {
|
|
688
|
-
dx: 0.5 * e * (s.ca + l.ca) *
|
|
689
|
-
dy: 0.5 * e * (s.cb + l.cb) *
|
|
690
|
-
dz: 0.5 * e * (s.cc + l.cc) *
|
|
688
|
+
dx: 0.5 * e * (s.ca + l.ca) * c,
|
|
689
|
+
dy: 0.5 * e * (s.cb + l.cb) * c,
|
|
690
|
+
dz: 0.5 * e * (s.cc + l.cc) * c,
|
|
691
691
|
azimuth: r,
|
|
692
692
|
dip: o
|
|
693
693
|
};
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function Je(e = [], t = [], n = {}) {
|
|
696
696
|
const {
|
|
697
697
|
step: r = 1,
|
|
698
698
|
holeIdCol: o = null,
|
|
699
699
|
method: i = "minimum_curvature"
|
|
700
|
-
} = n, s = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, l =
|
|
701
|
-
if (!l.rows.length || !
|
|
700
|
+
} = n, s = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, l = $e(e, o), u = $e(t, o || l.aliasCol);
|
|
701
|
+
if (!l.rows.length || !u.rows.length) return [];
|
|
702
702
|
const a = /* @__PURE__ */ new Map();
|
|
703
703
|
l.rows.forEach((d) => {
|
|
704
704
|
!d.hole_id || a.has(d.hole_id) || a.set(d.hole_id, d);
|
|
705
705
|
});
|
|
706
|
-
const
|
|
707
|
-
|
|
708
|
-
d.hole_id && (
|
|
706
|
+
const c = /* @__PURE__ */ new Map();
|
|
707
|
+
u.rows.forEach((d) => {
|
|
708
|
+
d.hole_id && (c.has(d.hole_id) || c.set(d.hole_id, []), c.get(d.hole_id).push(d));
|
|
709
709
|
});
|
|
710
710
|
const m = [];
|
|
711
|
-
return
|
|
712
|
-
const
|
|
713
|
-
if (!
|
|
714
|
-
const b = [...d].map((
|
|
715
|
-
...
|
|
716
|
-
from:
|
|
717
|
-
azimuth:
|
|
718
|
-
dip:
|
|
719
|
-
})).filter((
|
|
711
|
+
return c.forEach((d, f) => {
|
|
712
|
+
const h = a.get(f);
|
|
713
|
+
if (!h) return;
|
|
714
|
+
const b = [...d].map((F) => ({
|
|
715
|
+
...F,
|
|
716
|
+
from: ne(F.from),
|
|
717
|
+
azimuth: ne(F.azimuth),
|
|
718
|
+
dip: ne(F.dip)
|
|
719
|
+
})).filter((F) => Number.isFinite(F.from) && Number.isFinite(F.azimuth) && Number.isFinite(F.dip)).sort((F, T) => F.from - T.from);
|
|
720
720
|
if (!b.length) return;
|
|
721
|
-
let
|
|
722
|
-
const M = b[0].azimuth,
|
|
721
|
+
let _ = ne(h.x, 0), p = ne(h.y, 0), g = ne(h.z, 0), E = b[0].from;
|
|
722
|
+
const M = b[0].azimuth, v = b[0].dip, k = {
|
|
723
723
|
hole_id: f,
|
|
724
|
-
md:
|
|
725
|
-
x:
|
|
726
|
-
y:
|
|
724
|
+
md: E,
|
|
725
|
+
x: _,
|
|
726
|
+
y: p,
|
|
727
727
|
z: g,
|
|
728
728
|
azimuth: M,
|
|
729
|
-
dip:
|
|
729
|
+
dip: v
|
|
730
730
|
};
|
|
731
|
-
l.aliasCol !== "hole_id" &&
|
|
732
|
-
for (let
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
735
|
-
const
|
|
736
|
-
for (let
|
|
737
|
-
|
|
738
|
-
const
|
|
739
|
-
|
|
731
|
+
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (k[l.aliasCol] = h[l.aliasCol]), m.push(k);
|
|
732
|
+
for (let F = 0; F < b.length - 1; F += 1) {
|
|
733
|
+
const T = b[F], L = b[F + 1], Y = T.from, w = L.from - Y;
|
|
734
|
+
if (w <= 0) continue;
|
|
735
|
+
const q = Math.max(1, Math.ceil(w / s)), R = w / q;
|
|
736
|
+
for (let I = 0; I < q; I += 1) {
|
|
737
|
+
E += R;
|
|
738
|
+
const A = (E - Y) / w, N = T.azimuth + A * (L.azimuth - T.azimuth), O = T.dip + A * (L.dip - T.dip), x = Mn(R, T.azimuth, T.dip, L.azimuth, L.dip, i);
|
|
739
|
+
_ += x.dx, p += x.dy, g += x.dz;
|
|
740
740
|
const V = {
|
|
741
741
|
hole_id: f,
|
|
742
|
-
md:
|
|
743
|
-
x:
|
|
744
|
-
y:
|
|
742
|
+
md: E,
|
|
743
|
+
x: _,
|
|
744
|
+
y: p,
|
|
745
745
|
z: g,
|
|
746
|
-
azimuth: i === "minimum_curvature" ?
|
|
747
|
-
dip: i === "minimum_curvature" ?
|
|
746
|
+
azimuth: i === "minimum_curvature" ? N : x.azimuth,
|
|
747
|
+
dip: i === "minimum_curvature" ? O : x.dip
|
|
748
748
|
};
|
|
749
|
-
l.aliasCol !== "hole_id" &&
|
|
749
|
+
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (V[l.aliasCol] = h[l.aliasCol]), m.push(V);
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
}), m;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
754
|
+
function En(e, t, n = {}) {
|
|
755
|
+
return Je(e, t, { ...n, method: "minimum_curvature" });
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
757
|
+
function Eo(e, t, n = {}) {
|
|
758
|
+
return Je(e, t, { ...n, method: "tangential" });
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
return
|
|
760
|
+
function ko(e, t, n = {}) {
|
|
761
|
+
return Je(e, t, { ...n, method: "balanced_tangential" });
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
return
|
|
763
|
+
function Ao(e, t, n = {}) {
|
|
764
|
+
return En(e, t, n);
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function kn(e, t) {
|
|
767
767
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
768
768
|
let n = null, r = 1 / 0;
|
|
769
769
|
for (let o = 0; o < e.length; o += 1) {
|
|
770
|
-
const i = e[o], s =
|
|
770
|
+
const i = e[o], s = ne(i.md);
|
|
771
771
|
if (!Number.isFinite(s)) continue;
|
|
772
772
|
const l = Math.abs(s - t);
|
|
773
773
|
l < r && (r = l, n = i);
|
|
774
774
|
}
|
|
775
775
|
return n;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
const r = n.holeIdCol || "hole_id", o =
|
|
777
|
+
function xo(e = [], t = [], n = {}) {
|
|
778
|
+
const r = n.holeIdCol || "hole_id", o = $e(e, r), i = $e(t, r);
|
|
779
779
|
if (!o.rows.length || !i.rows.length) return [...o.rows];
|
|
780
780
|
const s = /* @__PURE__ */ new Map();
|
|
781
781
|
return i.rows.forEach((l) => {
|
|
782
782
|
l.hole_id && (s.has(l.hole_id) || s.set(l.hole_id, []), s.get(l.hole_id).push(l));
|
|
783
|
-
}), s.forEach((l,
|
|
784
|
-
s.set(
|
|
783
|
+
}), s.forEach((l, u) => {
|
|
784
|
+
s.set(u, [...l].sort((a, c) => ne(a.md, 0) - ne(c.md, 0)));
|
|
785
785
|
}), o.rows.map((l) => {
|
|
786
|
-
const
|
|
787
|
-
if (!l.hole_id || !Number.isFinite(
|
|
788
|
-
const m =
|
|
786
|
+
const u = ne(l.from), a = ne(l.to), c = Number.isFinite(u) && Number.isFinite(a) ? 0.5 * (u + a) : void 0;
|
|
787
|
+
if (!l.hole_id || !Number.isFinite(c)) return { ...l };
|
|
788
|
+
const m = kn(s.get(l.hole_id) || [], c);
|
|
789
789
|
if (!m) return { ...l };
|
|
790
790
|
const d = { ...l };
|
|
791
791
|
return ["md", "x", "y", "z", "azimuth", "dip"].forEach((f) => {
|
|
@@ -793,28 +793,28 @@ function ho(e = [], t = [], n = {}) {
|
|
|
793
793
|
}), d;
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Io(e, t = null) {
|
|
797
797
|
return new Promise((n, r) => {
|
|
798
|
-
|
|
798
|
+
Q.parse(e, {
|
|
799
799
|
header: !0,
|
|
800
800
|
dynamicTyping: !0,
|
|
801
801
|
skipEmptyLines: !0,
|
|
802
802
|
complete: (o) => {
|
|
803
803
|
const i = /* @__PURE__ */ new Map();
|
|
804
|
-
o.data.forEach((l,
|
|
805
|
-
const a =
|
|
806
|
-
!m || d === null || d === void 0 || f === null || f === void 0 ||
|
|
804
|
+
o.data.forEach((l, u) => {
|
|
805
|
+
const a = be(l, null, t), c = a[z], m = c !== void 0 ? `${c}`.trim() : "", d = a[he] ?? a.x, f = a[pe] ?? a.y, h = a[ke] ?? a.z, b = a.order ?? u;
|
|
806
|
+
!m || d === null || d === void 0 || f === null || f === void 0 || h === null || h === void 0 || (i.has(m) || i.set(m, []), i.get(m).push({
|
|
807
807
|
...a,
|
|
808
808
|
holeId: m,
|
|
809
809
|
order: b,
|
|
810
810
|
x: Number(d) ?? 0,
|
|
811
811
|
y: Number(f) ?? 0,
|
|
812
|
-
z: Number(
|
|
812
|
+
z: Number(h) ?? 0
|
|
813
813
|
}));
|
|
814
814
|
});
|
|
815
|
-
const s = Array.from(i.entries()).map(([l,
|
|
815
|
+
const s = Array.from(i.entries()).map(([l, u]) => ({
|
|
816
816
|
id: l,
|
|
817
|
-
points:
|
|
817
|
+
points: u.sort((a, c) => a.order - c.order).map((a) => ({
|
|
818
818
|
...a,
|
|
819
819
|
x: Number(a.x) || 0,
|
|
820
820
|
y: Number(a.y) || 0,
|
|
@@ -823,59 +823,59 @@ function po(e, t = null) {
|
|
|
823
823
|
}));
|
|
824
824
|
n({ holes: s });
|
|
825
825
|
},
|
|
826
|
-
error: (o) => r(
|
|
826
|
+
error: (o) => r(j("parseDrillholesCSV", o))
|
|
827
827
|
});
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function Ee(e) {
|
|
831
831
|
return e ? Array.isArray(e) ? [...e] : [] : [];
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function J(e) {
|
|
834
834
|
const t = Number(e);
|
|
835
835
|
return Number.isFinite(t) ? t : void 0;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function Fe(e = [], t = []) {
|
|
838
838
|
const n = [...e];
|
|
839
839
|
return n.sort((r, o) => {
|
|
840
840
|
for (let i = 0; i < t.length; i += 1) {
|
|
841
|
-
const s = t[i], l = r == null ? void 0 : r[s],
|
|
842
|
-
if (l !==
|
|
843
|
-
return l == null ? 1 :
|
|
841
|
+
const s = t[i], l = r == null ? void 0 : r[s], u = o == null ? void 0 : o[s];
|
|
842
|
+
if (l !== u)
|
|
843
|
+
return l == null ? 1 : u == null ? -1 : typeof l == "number" && typeof u == "number" ? l - u : `${l}`.localeCompare(`${u}`);
|
|
844
844
|
}
|
|
845
845
|
return 0;
|
|
846
846
|
}), n;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function An(e = [], t = "Intervals") {
|
|
849
849
|
if (!e.length) return;
|
|
850
|
-
const n =
|
|
850
|
+
const n = Fe(e, [z, C, D]), r = /* @__PURE__ */ new Map();
|
|
851
851
|
n.forEach((o) => {
|
|
852
|
-
const i = `${(o == null ? void 0 : o[z]) ?? ""}`.trim(), s = Number(o == null ? void 0 : o[
|
|
852
|
+
const i = `${(o == null ? void 0 : o[z]) ?? ""}`.trim(), s = Number(o == null ? void 0 : o[C]), l = Number(o == null ? void 0 : o[D]);
|
|
853
853
|
if (!i || !Number.isFinite(s) || !Number.isFinite(l)) return;
|
|
854
|
-
const
|
|
855
|
-
if (Number.isFinite(
|
|
856
|
-
throw
|
|
854
|
+
const u = r.get(i);
|
|
855
|
+
if (Number.isFinite(u) && s < u)
|
|
856
|
+
throw j(
|
|
857
857
|
"validateNoOverlappingIntervals",
|
|
858
|
-
new Error(`${t} intervals overlap for hole '${i}': from=${s} is less than previous to=${
|
|
858
|
+
new Error(`${t} intervals overlap for hole '${i}': from=${s} is less than previous to=${u}`)
|
|
859
859
|
);
|
|
860
860
|
r.set(i, l);
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function xn(e, t = {}) {
|
|
864
864
|
return new Promise((n, r) => {
|
|
865
|
-
|
|
865
|
+
Q.parse(e, {
|
|
866
866
|
header: !0,
|
|
867
867
|
dynamicTyping: !0,
|
|
868
868
|
skipEmptyLines: !0,
|
|
869
869
|
...t,
|
|
870
870
|
complete: (o) => n(Array.isArray(o == null ? void 0 : o.data) ? o.data : []),
|
|
871
|
-
error: (o) => r(
|
|
871
|
+
error: (o) => r(j("loadTable(csv)", o))
|
|
872
872
|
});
|
|
873
873
|
});
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
return e.map((r) =>
|
|
875
|
+
function In(e = [], t = null, n = null) {
|
|
876
|
+
return e.map((r) => be(r, t, n));
|
|
877
877
|
}
|
|
878
|
-
async function
|
|
878
|
+
async function He(e, t = {}) {
|
|
879
879
|
const {
|
|
880
880
|
kind: n = "csv",
|
|
881
881
|
columnMap: r = null,
|
|
@@ -884,114 +884,114 @@ async function $e(e, t = {}) {
|
|
|
884
884
|
} = t;
|
|
885
885
|
let s;
|
|
886
886
|
if (Array.isArray(e))
|
|
887
|
-
s =
|
|
887
|
+
s = Ee(e);
|
|
888
888
|
else if (n === "csv")
|
|
889
|
-
s = await
|
|
890
|
-
else throw n === "parquet" || n === "sql" ?
|
|
891
|
-
return
|
|
889
|
+
s = await xn(e, i);
|
|
890
|
+
else throw n === "parquet" || n === "sql" ? j("loadTable", new Error(`Unsupported kind in JS runtime: ${n}`)) : j("loadTable", new Error(`Unsupported kind: ${n}`));
|
|
891
|
+
return In(s, r, o);
|
|
892
892
|
}
|
|
893
|
-
async function
|
|
893
|
+
async function Co(e, t = {}) {
|
|
894
894
|
const {
|
|
895
895
|
crs: n = null,
|
|
896
896
|
sourceColumnMap: r = null,
|
|
897
897
|
keepAll: o = !0,
|
|
898
898
|
...i
|
|
899
|
-
} = t, s = await
|
|
899
|
+
} = t, s = await He(e, { ...i, sourceColumnMap: r });
|
|
900
900
|
if (!s.some((d) => z in d))
|
|
901
|
-
throw
|
|
902
|
-
const
|
|
903
|
-
if (!
|
|
904
|
-
throw
|
|
905
|
-
const
|
|
901
|
+
throw j("loadCollars", new Error(`Collar table missing column: ${z}`));
|
|
902
|
+
const u = s.some((d) => he in d && pe in d), a = s.some((d) => re in d && oe in d);
|
|
903
|
+
if (!u && !a)
|
|
904
|
+
throw j("loadCollars", new Error("Collar table missing coordinate columns (need easting/northing or latitude/longitude)"));
|
|
905
|
+
const c = s.map((d) => {
|
|
906
906
|
const f = { ...d };
|
|
907
907
|
if (z in f) {
|
|
908
|
-
const
|
|
909
|
-
f[z] =
|
|
908
|
+
const h = f[z];
|
|
909
|
+
f[z] = h == null ? "" : `${h}`.trim();
|
|
910
910
|
}
|
|
911
|
-
return
|
|
911
|
+
return re in f && (f[re] = J(f[re])), oe in f && (f[oe] = J(f[oe])), ke in f && (f[ke] = J(f[ke])), he in f && (f[he] = J(f[he])), pe in f && (f[pe] = J(f[pe])), !("datasource_hole_id" in f) && z in f && (f.datasource_hole_id = f[z]), f;
|
|
912
912
|
});
|
|
913
|
-
if (!
|
|
914
|
-
throw
|
|
915
|
-
return
|
|
913
|
+
if (!c.every((d) => !(!d[z] || a && (!Number.isFinite(d[re]) || !Number.isFinite(d[oe])) || u && !a && (!Number.isFinite(d[he]) || !Number.isFinite(d[pe])))))
|
|
914
|
+
throw j("loadCollars", new Error("Collar table has missing required values"));
|
|
915
|
+
return c;
|
|
916
916
|
}
|
|
917
|
-
async function
|
|
917
|
+
async function vo(e, t = {}) {
|
|
918
918
|
const {
|
|
919
919
|
sourceColumnMap: n = null,
|
|
920
920
|
keepAll: r = !0,
|
|
921
921
|
...o
|
|
922
|
-
} = t, i = await
|
|
922
|
+
} = t, i = await He(e, { ...o, sourceColumnMap: n }), s = [z, W, G, U];
|
|
923
923
|
for (const a of s)
|
|
924
924
|
if (!i.some((m) => a in m))
|
|
925
|
-
throw
|
|
925
|
+
throw j("loadSurveys", new Error(`Survey table missing column: ${a}`));
|
|
926
926
|
const l = i.map((a) => {
|
|
927
|
-
const
|
|
928
|
-
if (z in
|
|
929
|
-
const m =
|
|
930
|
-
|
|
927
|
+
const c = { ...a };
|
|
928
|
+
if (z in c) {
|
|
929
|
+
const m = c[z];
|
|
930
|
+
c[z] = m == null ? "" : `${m}`.trim();
|
|
931
931
|
}
|
|
932
|
-
return
|
|
932
|
+
return W in c && (c[W] = J(c[W])), D in c && (c[D] = J(c[D])), G in c && (c[G] = J(c[G])), U in c && (c[U] = J(c[U])), c;
|
|
933
933
|
});
|
|
934
|
-
if (!l.every((a) => !(!a[z] || !Number.isFinite(a[
|
|
935
|
-
throw
|
|
936
|
-
return
|
|
934
|
+
if (!l.every((a) => !(!a[z] || !Number.isFinite(a[W]) || !Number.isFinite(a[G]) || !Number.isFinite(a[U]))))
|
|
935
|
+
throw j("loadSurveys", new Error("Survey table has missing required values"));
|
|
936
|
+
return Fe(l, [z, W]);
|
|
937
937
|
}
|
|
938
|
-
async function
|
|
938
|
+
async function So(e, t = {}) {
|
|
939
939
|
const {
|
|
940
940
|
sourceColumnMap: n = null,
|
|
941
941
|
keepAll: r = !0,
|
|
942
942
|
...o
|
|
943
|
-
} = t, i = await
|
|
943
|
+
} = t, i = await He(e, { ...o, sourceColumnMap: n }), s = [z, C, D];
|
|
944
944
|
for (const a of s)
|
|
945
945
|
if (!i.some((m) => a in m))
|
|
946
|
-
throw
|
|
946
|
+
throw j("loadAssays", new Error(`Assay table missing column: ${a}`));
|
|
947
947
|
const l = i.map((a) => {
|
|
948
|
-
const
|
|
949
|
-
if (z in
|
|
950
|
-
const m =
|
|
951
|
-
|
|
948
|
+
const c = { ...a };
|
|
949
|
+
if (z in c) {
|
|
950
|
+
const m = c[z];
|
|
951
|
+
c[z] = m == null ? "" : `${m}`.trim();
|
|
952
952
|
}
|
|
953
|
-
return
|
|
953
|
+
return C in c && (c[C] = J(c[C])), D in c && (c[D] = J(c[D])), C in c && D in c && Number.isFinite(c[C]) && Number.isFinite(c[D]) && (c[Ie] = 0.5 * (c[C] + c[D])), c;
|
|
954
954
|
});
|
|
955
|
-
if (!l.every((a) => !(!a[z] || !Number.isFinite(a[
|
|
956
|
-
throw
|
|
957
|
-
return
|
|
955
|
+
if (!l.every((a) => !(!a[z] || !Number.isFinite(a[C]) || !Number.isFinite(a[D]) || !(a[D] > a[C]))))
|
|
956
|
+
throw j("loadAssays", new Error("Assay table has missing required values"));
|
|
957
|
+
return Fe(l, [z, C, D]);
|
|
958
958
|
}
|
|
959
|
-
async function
|
|
959
|
+
async function Do(e, t = {}) {
|
|
960
960
|
const {
|
|
961
961
|
sourceColumnMap: n = null,
|
|
962
962
|
keepAll: r = !0,
|
|
963
963
|
...o
|
|
964
|
-
} = t, i = await
|
|
965
|
-
for (const
|
|
966
|
-
if (!i.some((d) =>
|
|
967
|
-
throw
|
|
968
|
-
const l = i.map((
|
|
969
|
-
const m = { ...
|
|
964
|
+
} = t, i = await He(e, { ...o, sourceColumnMap: n }), s = [z, C, D];
|
|
965
|
+
for (const c of s)
|
|
966
|
+
if (!i.some((d) => c in d))
|
|
967
|
+
throw j("loadGeology", new Error(`Geology table missing column: ${c}`));
|
|
968
|
+
const l = i.map((c) => {
|
|
969
|
+
const m = { ...c };
|
|
970
970
|
if (z in m) {
|
|
971
|
-
const
|
|
972
|
-
m[z] =
|
|
971
|
+
const h = m[z];
|
|
972
|
+
m[z] = h == null ? "" : `${h}`.trim();
|
|
973
973
|
}
|
|
974
|
-
|
|
975
|
-
const d = m[
|
|
976
|
-
return !d && f && (m[
|
|
974
|
+
C in m && (m[C] = J(m[C])), D in m && (m[D] = J(m[D])), C in m && D in m && Number.isFinite(m[C]) && Number.isFinite(m[D]) && (m[D] === m[C] && (m[C] = Math.round(m[C] * 1e3) / 1e3, m[D] = m[C] + 1e-3), m[Ie] = 0.5 * (m[C] + m[D]));
|
|
975
|
+
const d = m[se] !== void 0 && m[se] !== null && `${m[se]}`.trim() !== "", f = m[le] !== void 0 && m[le] !== null && `${m[le]}`.trim() !== "";
|
|
976
|
+
return !d && f && (m[se] = m[le]), d && !f && (m[le] = m[se]), m;
|
|
977
977
|
});
|
|
978
|
-
if (!l.every((
|
|
979
|
-
throw
|
|
980
|
-
if (!l.some((
|
|
981
|
-
const m =
|
|
978
|
+
if (!l.every((c) => !(!c[z] || !Number.isFinite(c[C]) || !Number.isFinite(c[D]) || !(c[D] > c[C]))))
|
|
979
|
+
throw j("loadGeology", new Error("Geology table has missing or invalid interval values"));
|
|
980
|
+
if (!l.some((c) => {
|
|
981
|
+
const m = c[se], d = c[le];
|
|
982
982
|
return m != null && `${m}`.trim() !== "" || d != null && `${d}`.trim() !== "";
|
|
983
983
|
}))
|
|
984
|
-
throw
|
|
985
|
-
if (
|
|
986
|
-
const
|
|
987
|
-
return
|
|
988
|
-
l.map((m) => Object.fromEntries(Object.entries(m).filter(([d]) =>
|
|
989
|
-
[z,
|
|
984
|
+
throw j("loadGeology", new Error(`Geology table missing categorical columns: ${se} or ${le}`));
|
|
985
|
+
if (An(l, "Geology"), !r) {
|
|
986
|
+
const c = new Set(Object.keys(sn));
|
|
987
|
+
return Fe(
|
|
988
|
+
l.map((m) => Object.fromEntries(Object.entries(m).filter(([d]) => c.has(d)))),
|
|
989
|
+
[z, C, D]
|
|
990
990
|
);
|
|
991
991
|
}
|
|
992
|
-
return
|
|
992
|
+
return Fe(l, [z, C, D]);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Fo(e = [], t = [], n = {}) {
|
|
995
995
|
const r = Array.isArray(n.onCols) && n.onCols.length ? n.onCols : [z];
|
|
996
996
|
if (!t.length) return [...e];
|
|
997
997
|
const o = (s) => r.map((l) => `${(s == null ? void 0 : s[l]) ?? ""}`).join("|"), i = /* @__PURE__ */ new Map();
|
|
@@ -1000,26 +1000,26 @@ function No(e = [], t = [], n = {}) {
|
|
|
1000
1000
|
}), e.map((s) => {
|
|
1001
1001
|
const l = i.get(o(s));
|
|
1002
1002
|
if (!l) return { ...s };
|
|
1003
|
-
const
|
|
1004
|
-
return Object.entries(l).forEach(([a,
|
|
1005
|
-
r.includes(a) || (Object.prototype.hasOwnProperty.call(
|
|
1006
|
-
}),
|
|
1003
|
+
const u = { ...s };
|
|
1004
|
+
return Object.entries(l).forEach(([a, c]) => {
|
|
1005
|
+
r.includes(a) || (Object.prototype.hasOwnProperty.call(u, a) ? u[`${a}_trace`] = c : u[a] = c);
|
|
1006
|
+
}), u;
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1010
|
-
return t == null ? [...e] : e.length ? e.some((r) =>
|
|
1009
|
+
function Lo(e = [], t = null) {
|
|
1010
|
+
return t == null ? [...e] : e.length ? e.some((r) => ue in r) ? e.filter((r) => (r == null ? void 0 : r[ue]) === t) : [...e] : [];
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function Oo(e = [], t = []) {
|
|
1013
1013
|
return e.map((n) => {
|
|
1014
1014
|
const r = { ...n };
|
|
1015
1015
|
return t.forEach((o) => {
|
|
1016
1016
|
if (!(o in r)) return;
|
|
1017
|
-
const i =
|
|
1017
|
+
const i = J(r[o]);
|
|
1018
1018
|
r[o] = i;
|
|
1019
1019
|
}), r;
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Po({
|
|
1023
1023
|
collars: e = [],
|
|
1024
1024
|
surveys: t = [],
|
|
1025
1025
|
assays: n = [],
|
|
@@ -1028,65 +1028,65 @@ function xo({
|
|
|
1028
1028
|
metadata: i = {}
|
|
1029
1029
|
} = {}) {
|
|
1030
1030
|
return {
|
|
1031
|
-
collars:
|
|
1032
|
-
surveys:
|
|
1033
|
-
assays:
|
|
1034
|
-
geology:
|
|
1035
|
-
structures:
|
|
1031
|
+
collars: Ee(e),
|
|
1032
|
+
surveys: Ee(t),
|
|
1033
|
+
assays: Ee(n),
|
|
1034
|
+
geology: Ee(r),
|
|
1035
|
+
structures: Ee(o),
|
|
1036
1036
|
metadata: i || {}
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
1039
|
-
const
|
|
1039
|
+
const Ct = ["x", "y", "z", "dx", "dy", "dz"], Cn = {
|
|
1040
1040
|
x: ["x", "easting", "center_x", "xc", "xcentre", "xcenter", "x_centre", "x_center", "cx"],
|
|
1041
1041
|
y: ["y", "northing", "center_y", "yc", "ycentre", "ycenter", "y_centre", "y_center", "cy"],
|
|
1042
1042
|
z: ["z", "elevation", "center_z", "zc", "zcentre", "zcenter", "z_centre", "z_center", "cz"],
|
|
1043
1043
|
dx: ["dx", "size_x", "sx", "sizex", "dim_x", "block_size_x"],
|
|
1044
1044
|
dy: ["dy", "size_y", "sy", "sizey", "dim_y", "block_size_y"],
|
|
1045
1045
|
dz: ["dz", "size_z", "sz", "sizez", "dim_z", "block_size_z"]
|
|
1046
|
-
},
|
|
1047
|
-
Object.entries(
|
|
1046
|
+
}, vt = {};
|
|
1047
|
+
Object.entries(Cn).forEach(([e, t]) => {
|
|
1048
1048
|
t.forEach((n) => {
|
|
1049
|
-
|
|
1049
|
+
vt[n.toLowerCase()] = e;
|
|
1050
1050
|
});
|
|
1051
1051
|
});
|
|
1052
|
-
function
|
|
1052
|
+
function vn(e) {
|
|
1053
1053
|
const t = {};
|
|
1054
1054
|
return Object.entries(e).forEach(([n, r]) => {
|
|
1055
|
-
const o =
|
|
1055
|
+
const o = vt[n.toLowerCase().trim()] || n;
|
|
1056
1056
|
t[o] = r;
|
|
1057
1057
|
}), t;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function To(e) {
|
|
1060
1060
|
return new Promise((t, n) => {
|
|
1061
|
-
|
|
1061
|
+
Q.parse(e, {
|
|
1062
1062
|
header: !0,
|
|
1063
1063
|
dynamicTyping: !0,
|
|
1064
1064
|
skipEmptyLines: !0,
|
|
1065
1065
|
complete: (r) => {
|
|
1066
|
-
const i = (r.data || []).map(
|
|
1066
|
+
const i = (r.data || []).map(vn).filter(
|
|
1067
1067
|
(l) => l.x !== null && l.y !== null && l.z !== null
|
|
1068
1068
|
), s = Object.keys(i[0] || {}).filter(
|
|
1069
|
-
(l) => !
|
|
1069
|
+
(l) => !Ct.includes(l)
|
|
1070
1070
|
);
|
|
1071
1071
|
t({ data: i, properties: s });
|
|
1072
1072
|
},
|
|
1073
1073
|
error: (r) => {
|
|
1074
|
-
n(
|
|
1074
|
+
n(j("parseBlockModelCSV", r));
|
|
1075
1075
|
}
|
|
1076
1076
|
});
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function wo(e) {
|
|
1080
1080
|
if (typeof e == "string")
|
|
1081
1081
|
try {
|
|
1082
1082
|
return JSON.parse(e);
|
|
1083
1083
|
} catch (t) {
|
|
1084
|
-
throw
|
|
1084
|
+
throw j("loadBlockModelMetadata", t);
|
|
1085
1085
|
}
|
|
1086
1086
|
if (e && typeof e == "object") return e;
|
|
1087
|
-
throw
|
|
1087
|
+
throw j("loadBlockModelMetadata", new Error("Invalid metadata source"));
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Sn(e, t) {
|
|
1090
1090
|
const n = e.map((i) => i[t]).filter((i) => i != null);
|
|
1091
1091
|
if (n.length > 0 && n.every((i) => typeof i == "number")) {
|
|
1092
1092
|
const i = Math.min(...n), s = Math.max(...n);
|
|
@@ -1094,16 +1094,16 @@ function vn(e, t) {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
return { type: "categorical", categories: [...new Set(n)], values: n };
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function Bo(e) {
|
|
1098
1098
|
if (!e || e.length === 0) return {};
|
|
1099
1099
|
const t = Object.keys(e[0]).filter(
|
|
1100
|
-
(r) => !
|
|
1100
|
+
(r) => !Ct.includes(r)
|
|
1101
1101
|
), n = {};
|
|
1102
1102
|
return t.forEach((r) => {
|
|
1103
|
-
n[r] =
|
|
1103
|
+
n[r] = Sn(e, r);
|
|
1104
1104
|
}), n;
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function Dn(e, t) {
|
|
1107
1107
|
return !t || typeof t != "object" ? e : e.filter(
|
|
1108
1108
|
(n) => Object.entries(t).every(([r, o]) => {
|
|
1109
1109
|
const i = n[r];
|
|
@@ -1111,13 +1111,13 @@ function An(e, t) {
|
|
|
1111
1111
|
})
|
|
1112
1112
|
);
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1115
|
-
return (t ?
|
|
1114
|
+
function $o(e, t = null) {
|
|
1115
|
+
return (t ? Dn(e, t) : e).reduce((r, o) => {
|
|
1116
1116
|
const i = Number(o.dx) || 0, s = Number(o.dy) || 0, l = Number(o.dz) || 0;
|
|
1117
1117
|
return r + i * s * l;
|
|
1118
1118
|
}, 0);
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function Fn(e, t, n) {
|
|
1121
1121
|
if (!t) return new n.Color("#888888");
|
|
1122
1122
|
if (t.type === "numeric") {
|
|
1123
1123
|
const i = t.max - t.min, l = (1 - (i === 0 ? 0.5 : (e - t.min) / i)) * 240;
|
|
@@ -1126,56 +1126,56 @@ function Sn(e, t, n) {
|
|
|
1126
1126
|
const o = t.categories.indexOf(e) / Math.max(t.categories.length, 1) * 360;
|
|
1127
1127
|
return new n.Color().setHSL(o / 360, 0.7, 0.5);
|
|
1128
1128
|
}
|
|
1129
|
-
const
|
|
1130
|
-
function
|
|
1129
|
+
const Qe = (e, t = null) => be(e, null, t);
|
|
1130
|
+
function Ln(e) {
|
|
1131
1131
|
if (!e.length) return null;
|
|
1132
|
-
const t = e[0], n =
|
|
1132
|
+
const t = e[0], n = C in t && D in t, r = W in t && !n;
|
|
1133
1133
|
return n ? "interval" : r ? "point" : null;
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function ce(e) {
|
|
1136
1136
|
const t = Number(e);
|
|
1137
1137
|
return Number.isFinite(t) ? t : null;
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function St(e) {
|
|
1140
1140
|
const t = e[z] !== void 0 ? `${e[z]}`.trim() : "";
|
|
1141
1141
|
if (!t) return null;
|
|
1142
|
-
const n =
|
|
1142
|
+
const n = ce(e[W]);
|
|
1143
1143
|
return n === null ? null : {
|
|
1144
1144
|
[z]: t,
|
|
1145
|
-
[
|
|
1146
|
-
[
|
|
1147
|
-
[
|
|
1145
|
+
[W]: n,
|
|
1146
|
+
[U]: ce(e[U]),
|
|
1147
|
+
[G]: ce(e[G]),
|
|
1148
1148
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
1149
1149
|
...e
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function Dt(e) {
|
|
1153
1153
|
const t = e[z] !== void 0 ? `${e[z]}`.trim() : "";
|
|
1154
1154
|
if (!t) return null;
|
|
1155
|
-
const n =
|
|
1155
|
+
const n = ce(e[C]), r = ce(e[D]);
|
|
1156
1156
|
if (n === null || r === null || r <= n) return null;
|
|
1157
1157
|
const o = 0.5 * (n + r);
|
|
1158
1158
|
return {
|
|
1159
1159
|
[z]: t,
|
|
1160
|
-
[
|
|
1160
|
+
[C]: n,
|
|
1161
1161
|
[D]: r,
|
|
1162
1162
|
mid: o,
|
|
1163
|
-
[
|
|
1164
|
-
[
|
|
1163
|
+
[U]: ce(e[U]),
|
|
1164
|
+
[G]: ce(e[G]),
|
|
1165
1165
|
classification: e.classification != null ? `${e.classification}` : null,
|
|
1166
1166
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
1167
1167
|
...e
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function Vo(e) {
|
|
1171
1171
|
const t = [], n = [];
|
|
1172
1172
|
for (const r of e) {
|
|
1173
|
-
const o = [], i =
|
|
1173
|
+
const o = [], i = ce(r[U]), s = ce(r[G]);
|
|
1174
1174
|
i !== null && (i < 0 || i > 90) && o.push(`dip ${i} out of range [0, 90]`), s !== null && (s < 0 || s >= 360) && o.push(`azimuth ${s} out of range [0, 360)`), o.length ? n.push({ row: r, message: o.join("; ") }) : t.push(r);
|
|
1175
1175
|
}
|
|
1176
1176
|
return { valid: t, errors: n };
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function Ho(e, t = null) {
|
|
1179
1179
|
return new Promise((n, r) => {
|
|
1180
1180
|
const o = {
|
|
1181
1181
|
header: !0,
|
|
@@ -1184,36 +1184,36 @@ function Do(e, t = null) {
|
|
|
1184
1184
|
complete: (i) => {
|
|
1185
1185
|
const s = [];
|
|
1186
1186
|
for (const l of i.data) {
|
|
1187
|
-
const
|
|
1187
|
+
const u = Qe(l, t), a = St(u);
|
|
1188
1188
|
a && s.push(a);
|
|
1189
1189
|
}
|
|
1190
1190
|
n(s);
|
|
1191
1191
|
},
|
|
1192
|
-
error: (i) => r(
|
|
1192
|
+
error: (i) => r(j("parseStructuralPointsCSV", i))
|
|
1193
1193
|
};
|
|
1194
1194
|
typeof e == "string" && !e.startsWith("data:") && e.includes(`
|
|
1195
|
-
`) ?
|
|
1195
|
+
`) ? Q.parse(e, o) : Q.parse(e, o);
|
|
1196
1196
|
});
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function jo(e, t = null) {
|
|
1199
1199
|
return new Promise((n, r) => {
|
|
1200
|
-
|
|
1200
|
+
Q.parse(e, {
|
|
1201
1201
|
header: !0,
|
|
1202
1202
|
dynamicTyping: !0,
|
|
1203
1203
|
skipEmptyLines: !0,
|
|
1204
1204
|
complete: (o) => {
|
|
1205
1205
|
const i = [];
|
|
1206
1206
|
for (const s of o.data) {
|
|
1207
|
-
const l =
|
|
1208
|
-
|
|
1207
|
+
const l = Qe(s, t), u = Dt(l);
|
|
1208
|
+
u && i.push(u);
|
|
1209
1209
|
}
|
|
1210
1210
|
n(i);
|
|
1211
1211
|
},
|
|
1212
|
-
error: (o) => r(
|
|
1212
|
+
error: (o) => r(j("parseStructuralIntervalsCSV", o))
|
|
1213
1213
|
});
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function On(e, t = z) {
|
|
1217
1217
|
const n = /* @__PURE__ */ new Map();
|
|
1218
1218
|
for (const r of e) {
|
|
1219
1219
|
const o = r[t] != null ? String(r[t]).trim() : "";
|
|
@@ -1221,86 +1221,86 @@ function Pn(e, t = z) {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
return Array.from(n.values());
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function Pn(e, t = null) {
|
|
1225
1225
|
return new Promise((n, r) => {
|
|
1226
|
-
|
|
1226
|
+
Q.parse(e, {
|
|
1227
1227
|
header: !0,
|
|
1228
1228
|
dynamicTyping: !0,
|
|
1229
1229
|
skipEmptyLines: !0,
|
|
1230
1230
|
complete: (o) => {
|
|
1231
|
-
const i = o.data.map((
|
|
1231
|
+
const i = o.data.map((u) => Qe(u, t)), s = Ln(i);
|
|
1232
1232
|
if (!s) {
|
|
1233
|
-
r(
|
|
1233
|
+
r(j(
|
|
1234
1234
|
"parseStructuralCSV",
|
|
1235
1235
|
new Error("Structural CSV requires either 'depth' (point) or 'from'/'to' (interval) columns")
|
|
1236
1236
|
));
|
|
1237
1237
|
return;
|
|
1238
1238
|
}
|
|
1239
1239
|
const l = [];
|
|
1240
|
-
for (const
|
|
1241
|
-
const a = s === "interval" ?
|
|
1240
|
+
for (const u of i) {
|
|
1241
|
+
const a = s === "interval" ? Dt(u) : St(u);
|
|
1242
1242
|
a && l.push(a);
|
|
1243
1243
|
}
|
|
1244
1244
|
n({ schema: s, rows: l });
|
|
1245
1245
|
},
|
|
1246
|
-
error: (o) => r(
|
|
1246
|
+
error: (o) => r(j("parseStructuralCSV", o))
|
|
1247
1247
|
});
|
|
1248
1248
|
});
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function Tn(e) {
|
|
1251
1251
|
return new Promise((t) => {
|
|
1252
|
-
|
|
1252
|
+
Q.parse(e, {
|
|
1253
1253
|
header: !0,
|
|
1254
1254
|
dynamicTyping: !0,
|
|
1255
1255
|
skipEmptyLines: !0,
|
|
1256
1256
|
complete: (n) => {
|
|
1257
1257
|
const r = /* @__PURE__ */ new Map();
|
|
1258
1258
|
for (const i of n.data) {
|
|
1259
|
-
const s =
|
|
1259
|
+
const s = be(i), l = s[z] != null ? `${s[z]}`.trim() : "";
|
|
1260
1260
|
if (!l) continue;
|
|
1261
|
-
const
|
|
1262
|
-
if (!Number.isFinite(
|
|
1263
|
-
const
|
|
1261
|
+
const u = Number(s[C]), a = Number(s[D]);
|
|
1262
|
+
if (!Number.isFinite(u) || !Number.isFinite(a) || a <= u) continue;
|
|
1263
|
+
const c = (u + a) / 2, { [U]: m, [G]: d, ...f } = s, h = {
|
|
1264
1264
|
...f,
|
|
1265
1265
|
[z]: l,
|
|
1266
|
-
[
|
|
1266
|
+
[C]: u,
|
|
1267
1267
|
[D]: a,
|
|
1268
|
-
[
|
|
1269
|
-
[
|
|
1268
|
+
[Ie]: c,
|
|
1269
|
+
[W]: c,
|
|
1270
1270
|
// unified depth field for y-axis rendering
|
|
1271
1271
|
_source: "assay"
|
|
1272
1272
|
};
|
|
1273
|
-
r.has(l) || r.set(l, []), r.get(l).push(
|
|
1273
|
+
r.has(l) || r.set(l, []), r.get(l).push(h);
|
|
1274
1274
|
}
|
|
1275
1275
|
const o = Array.from(r.entries()).map(([i, s]) => ({
|
|
1276
1276
|
holeId: i,
|
|
1277
|
-
points: s.sort((l,
|
|
1277
|
+
points: s.sort((l, u) => l[C] - u[C])
|
|
1278
1278
|
}));
|
|
1279
1279
|
t(o);
|
|
1280
1280
|
}
|
|
1281
1281
|
});
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function wn(e) {
|
|
1285
1285
|
return new Promise((t) => {
|
|
1286
|
-
|
|
1286
|
+
Q.parse(e, {
|
|
1287
1287
|
header: !0,
|
|
1288
1288
|
dynamicTyping: !0,
|
|
1289
1289
|
skipEmptyLines: !0,
|
|
1290
1290
|
complete: (n) => {
|
|
1291
1291
|
const r = /* @__PURE__ */ new Map();
|
|
1292
1292
|
for (const o of n.data) {
|
|
1293
|
-
const i =
|
|
1293
|
+
const i = be(o), s = (i[z] ?? "").toString().trim();
|
|
1294
1294
|
if (!s) continue;
|
|
1295
|
-
const l = Number(i[
|
|
1296
|
-
if (!Number.isFinite(l) || !Number.isFinite(
|
|
1297
|
-
const a = (l +
|
|
1295
|
+
const l = Number(i[C]), u = Number(i[D]);
|
|
1296
|
+
if (!Number.isFinite(l) || !Number.isFinite(u) || u <= l) continue;
|
|
1297
|
+
const a = (l + u) / 2, { [U]: c, [G]: m, ...d } = i, f = {
|
|
1298
1298
|
...d,
|
|
1299
1299
|
[z]: s,
|
|
1300
|
-
[
|
|
1301
|
-
[D]:
|
|
1302
|
-
[
|
|
1303
|
-
[
|
|
1300
|
+
[C]: l,
|
|
1301
|
+
[D]: u,
|
|
1302
|
+
[Ie]: a,
|
|
1303
|
+
[W]: a,
|
|
1304
1304
|
_source: "geology"
|
|
1305
1305
|
};
|
|
1306
1306
|
r.has(s) || r.set(s, []), r.get(s).push(f);
|
|
@@ -1308,33 +1308,33 @@ function On(e) {
|
|
|
1308
1308
|
t({
|
|
1309
1309
|
holes: Array.from(r.entries()).map(([o, i]) => ({
|
|
1310
1310
|
holeId: o,
|
|
1311
|
-
points: i.sort((s, l) => s[
|
|
1311
|
+
points: i.sort((s, l) => s[C] - l[C])
|
|
1312
1312
|
}))
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
1315
|
});
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
|
-
async function
|
|
1318
|
+
async function Ro({ assayCsv: e, structuralCsv: t, geologyCsv: n } = {}) {
|
|
1319
1319
|
const [r, o, i] = await Promise.all([
|
|
1320
|
-
e ?
|
|
1321
|
-
t ?
|
|
1322
|
-
({ rows: l }) =>
|
|
1320
|
+
e ? Tn(e) : Promise.resolve([]),
|
|
1321
|
+
t ? Pn(t).then(
|
|
1322
|
+
({ rows: l }) => On(l.map((u) => ({ ...u, _source: "structural" })))
|
|
1323
1323
|
) : Promise.resolve([]),
|
|
1324
|
-
n ?
|
|
1324
|
+
n ? wn(n).then(({ holes: l }) => l) : Promise.resolve([])
|
|
1325
1325
|
]), s = new Map(r.map((l) => [l.holeId, { ...l, points: [...l.points] }]));
|
|
1326
1326
|
for (const l of [...o, ...i]) {
|
|
1327
|
-
const
|
|
1328
|
-
if (
|
|
1329
|
-
if (s.has(
|
|
1330
|
-
const a = s.get(
|
|
1331
|
-
s.set(
|
|
1327
|
+
const u = l.holeId;
|
|
1328
|
+
if (u)
|
|
1329
|
+
if (s.has(u)) {
|
|
1330
|
+
const a = s.get(u);
|
|
1331
|
+
s.set(u, { ...a, points: [...a.points, ...l.points || []] });
|
|
1332
1332
|
} else
|
|
1333
|
-
s.set(
|
|
1333
|
+
s.set(u, l);
|
|
1334
1334
|
}
|
|
1335
1335
|
return { holes: Array.from(s.values()) };
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Bn(e, t) {
|
|
1338
1338
|
if (!e || e.length === 0 || !Number.isFinite(t)) return null;
|
|
1339
1339
|
const n = e.length;
|
|
1340
1340
|
if (n === 1) {
|
|
@@ -1343,8 +1343,8 @@ function Ln(e, t) {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
let r = -1;
|
|
1345
1345
|
for (let g = 0; g < n - 1; g++) {
|
|
1346
|
-
const
|
|
1347
|
-
if (t >=
|
|
1346
|
+
const E = Number(e[g].md), M = Number(e[g + 1].md);
|
|
1347
|
+
if (t >= E && t <= M) {
|
|
1348
1348
|
r = g;
|
|
1349
1349
|
break;
|
|
1350
1350
|
}
|
|
@@ -1359,45 +1359,45 @@ function Ln(e, t) {
|
|
|
1359
1359
|
const g = Number(o.md), M = Number(i.md) - g;
|
|
1360
1360
|
s = M > 0 ? (t - g) / M : 0;
|
|
1361
1361
|
}
|
|
1362
|
-
const l = Number(o.x) + s * (Number(i.x) - Number(o.x)),
|
|
1363
|
-
let
|
|
1364
|
-
const f = Number(o.azimuth),
|
|
1365
|
-
if (Number.isFinite(f) && Number.isFinite(
|
|
1366
|
-
const g = Number.isFinite(b) && Number.isFinite(
|
|
1367
|
-
|
|
1362
|
+
const l = Number(o.x) + s * (Number(i.x) - Number(o.x)), u = Number(o.y) + s * (Number(i.y) - Number(o.y)), a = Number(o.z) + s * (Number(i.z) - Number(o.z));
|
|
1363
|
+
let c, m, d;
|
|
1364
|
+
const f = Number(o.azimuth), h = Number(o.dip), b = Number(i.azimuth), _ = Number(i.dip);
|
|
1365
|
+
if (Number.isFinite(f) && Number.isFinite(h)) {
|
|
1366
|
+
const g = Number.isFinite(b) && Number.isFinite(_) ? f + s * (b - f) : f, E = Number.isFinite(b) && Number.isFinite(_) ? h + s * (_ - h) : h, M = g * Math.PI / 180, v = E * Math.PI / 180;
|
|
1367
|
+
c = Math.cos(v) * Math.sin(M), m = Math.cos(v) * Math.cos(M), d = -Math.sin(v);
|
|
1368
1368
|
} else {
|
|
1369
|
-
const g = Number(i.x) - Number(o.x),
|
|
1370
|
-
if (
|
|
1371
|
-
|
|
1372
|
-
}
|
|
1373
|
-
const
|
|
1374
|
-
return
|
|
1375
|
-
}
|
|
1376
|
-
function
|
|
1377
|
-
const { betaZeroAxis: o = "B", betaHandedness: i = 1 } = r, { dx: s, dy: l, dz:
|
|
1378
|
-
let
|
|
1379
|
-
const m = a[0] *
|
|
1380
|
-
Math.abs(m) > 0.99 && (
|
|
1369
|
+
const g = Number(i.x) - Number(o.x), E = Number(i.y) - Number(o.y), M = Number(i.z) - Number(o.z), v = Math.sqrt(g * g + E * E + M * M);
|
|
1370
|
+
if (v < 1e-10) return { x: l, y: u, z: a, dx: 0, dy: 0, dz: -1 };
|
|
1371
|
+
c = g / v, m = E / v, d = M / v;
|
|
1372
|
+
}
|
|
1373
|
+
const p = Math.sqrt(c * c + m * m + d * d);
|
|
1374
|
+
return p < 1e-10 ? { x: l, y: u, z: a, dx: 0, dy: 0, dz: -1 } : { x: l, y: u, z: a, dx: c / p, dy: m / p, dz: d / p };
|
|
1375
|
+
}
|
|
1376
|
+
function $n(e, t, n, r = {}) {
|
|
1377
|
+
const { betaZeroAxis: o = "B", betaHandedness: i = 1 } = r, { dx: s, dy: l, dz: u } = n, a = [s, l, u];
|
|
1378
|
+
let c = [0, 0, 1];
|
|
1379
|
+
const m = a[0] * c[0] + a[1] * c[1] + a[2] * c[2];
|
|
1380
|
+
Math.abs(m) > 0.99 && (c = [0, 1, 0]);
|
|
1381
1381
|
const d = [
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
], f = Math.sqrt(d[0] ** 2 + d[1] ** 2 + d[2] ** 2),
|
|
1386
|
-
a[1] *
|
|
1387
|
-
a[2] *
|
|
1388
|
-
a[0] *
|
|
1389
|
-
],
|
|
1382
|
+
c[1] * a[2] - c[2] * a[1],
|
|
1383
|
+
c[2] * a[0] - c[0] * a[2],
|
|
1384
|
+
c[0] * a[1] - c[1] * a[0]
|
|
1385
|
+
], f = Math.sqrt(d[0] ** 2 + d[1] ** 2 + d[2] ** 2), h = f > 1e-10 ? [d[0] / f, d[1] / f, d[2] / f] : [1, 0, 0], b = [
|
|
1386
|
+
a[1] * h[2] - a[2] * h[1],
|
|
1387
|
+
a[2] * h[0] - a[0] * h[2],
|
|
1388
|
+
a[0] * h[1] - a[1] * h[0]
|
|
1389
|
+
], _ = Math.sqrt(b[0] ** 2 + b[1] ** 2 + b[2] ** 2), p = _ > 1e-10 ? [b[0] / _, b[1] / _, b[2] / _] : [0, 1, 0], g = o === "R" ? h : p, E = t * Math.PI / 180 * i, M = Math.cos(E), v = Math.sin(E), k = g[0] * a[0] + g[1] * a[1] + g[2] * a[2], F = [
|
|
1390
1390
|
a[1] * g[2] - a[2] * g[1],
|
|
1391
1391
|
a[2] * g[0] - a[0] * g[2],
|
|
1392
1392
|
a[0] * g[1] - a[1] * g[0]
|
|
1393
|
-
],
|
|
1394
|
-
g[0] * M +
|
|
1395
|
-
g[1] * M +
|
|
1396
|
-
g[2] * M +
|
|
1397
|
-
],
|
|
1398
|
-
return
|
|
1399
|
-
}
|
|
1400
|
-
function
|
|
1393
|
+
], T = [
|
|
1394
|
+
g[0] * M + F[0] * v + a[0] * k * (1 - M),
|
|
1395
|
+
g[1] * M + F[1] * v + a[1] * k * (1 - M),
|
|
1396
|
+
g[2] * M + F[2] * v + a[2] * k * (1 - M)
|
|
1397
|
+
], L = (90 - e) * Math.PI / 180, Y = Math.cos(L), Z = Math.sin(L), w = Y * T[0] + Z * a[0], q = Y * T[1] + Z * a[1], R = Y * T[2] + Z * a[2], I = Math.sqrt(w * w + q * q + R * R);
|
|
1398
|
+
return I < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: w / I, ny: q / I, nz: R / I };
|
|
1399
|
+
}
|
|
1400
|
+
function Vn(e, t, n = {}) {
|
|
1401
1401
|
if (!(e != null && e.length) || !(t != null && t.length)) return [];
|
|
1402
1402
|
const r = /* @__PURE__ */ new Map();
|
|
1403
1403
|
for (const i of t) {
|
|
@@ -1412,46 +1412,475 @@ function Tn(e, t, n = {}) {
|
|
|
1412
1412
|
if (!s) continue;
|
|
1413
1413
|
const l = r.get(s);
|
|
1414
1414
|
if (!l || l.length === 0) continue;
|
|
1415
|
-
const
|
|
1416
|
-
if (!Number.isFinite(
|
|
1417
|
-
const a =
|
|
1415
|
+
const u = i.depth != null ? Number(i.depth) : i.mid != null ? Number(i.mid) : null;
|
|
1416
|
+
if (!Number.isFinite(u)) continue;
|
|
1417
|
+
const a = Bn(l, u);
|
|
1418
1418
|
if (!a) continue;
|
|
1419
|
-
const { x:
|
|
1420
|
-
let
|
|
1421
|
-
const
|
|
1422
|
-
if (Number.isFinite(
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1419
|
+
const { x: c, y: m, z: d, dx: f, dy: h, dz: b } = a;
|
|
1420
|
+
let _, p, g;
|
|
1421
|
+
const E = i.alpha != null ? Number(i.alpha) : null, M = i.beta != null ? Number(i.beta) : null;
|
|
1422
|
+
if (Number.isFinite(E)) {
|
|
1423
|
+
const v = Number.isFinite(M) ? M : 0, k = $n(E, v, { dx: f, dy: h, dz: b }, n);
|
|
1424
|
+
_ = k.nx, p = k.ny, g = k.nz;
|
|
1425
1425
|
} else {
|
|
1426
|
-
const
|
|
1427
|
-
if (!Number.isFinite(
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1426
|
+
const v = i.dip != null ? Number(i.dip) : null, k = i.azimuth != null ? Number(i.azimuth) : null;
|
|
1427
|
+
if (!Number.isFinite(v) || !Number.isFinite(k)) continue;
|
|
1428
|
+
const F = v * Math.PI / 180, T = k * Math.PI / 180;
|
|
1429
|
+
_ = Math.sin(T) * Math.sin(F), p = Math.cos(T) * Math.sin(F), g = Math.cos(F);
|
|
1430
1430
|
}
|
|
1431
|
-
o.push({ ...i, x:
|
|
1431
|
+
o.push({ ...i, x: c, y: m, z: d, nx: _, ny: p, nz: g });
|
|
1432
1432
|
}
|
|
1433
1433
|
return o;
|
|
1434
1434
|
}
|
|
1435
|
-
const
|
|
1436
|
-
|
|
1435
|
+
const Hn = "baselode", Go = Hn, jn = [
|
|
1436
|
+
"#8b1e3f",
|
|
1437
|
+
"#2563eb",
|
|
1438
|
+
"#16a34a",
|
|
1439
|
+
"#f59e0b",
|
|
1440
|
+
"#7c3aed",
|
|
1441
|
+
"#0ea5e9",
|
|
1442
|
+
"#ef4444",
|
|
1443
|
+
"#10b981",
|
|
1444
|
+
"#f97316",
|
|
1445
|
+
"#8b5cf6"
|
|
1446
|
+
], P = {
|
|
1447
|
+
bg: "#ffffff",
|
|
1448
|
+
panel: "#f8fafc",
|
|
1449
|
+
ink: "#1e293b",
|
|
1450
|
+
ink_soft: "#64748b",
|
|
1451
|
+
grid: "#e8e8e8",
|
|
1452
|
+
line: "#d0d0d0",
|
|
1453
|
+
accent: "#f59e0b",
|
|
1454
|
+
accent_2: "#fcd34d",
|
|
1455
|
+
muted_1: "#94a3b8",
|
|
1456
|
+
muted_2: "#cbd5e1",
|
|
1457
|
+
muted_3: "#e2e8f0",
|
|
1458
|
+
primary: "#8b1e3f",
|
|
1459
|
+
primary_2: "#a8324f"
|
|
1460
|
+
}, Ce = {
|
|
1461
|
+
layout: {
|
|
1462
|
+
paper_bgcolor: P.bg,
|
|
1463
|
+
plot_bgcolor: P.bg,
|
|
1464
|
+
colorway: jn,
|
|
1465
|
+
font: {
|
|
1466
|
+
family: "Inter, system-ui, sans-serif",
|
|
1467
|
+
size: 12,
|
|
1468
|
+
color: P.ink
|
|
1469
|
+
},
|
|
1470
|
+
title: {
|
|
1471
|
+
font: { size: 14, color: P.ink },
|
|
1472
|
+
x: 0.05
|
|
1473
|
+
},
|
|
1474
|
+
hovermode: "x unified",
|
|
1475
|
+
hoverlabel: {
|
|
1476
|
+
bgcolor: P.bg,
|
|
1477
|
+
bordercolor: P.line,
|
|
1478
|
+
font: { size: 12, color: P.ink }
|
|
1479
|
+
},
|
|
1480
|
+
legend: {
|
|
1481
|
+
bgcolor: "rgba(255,255,255,0.9)",
|
|
1482
|
+
bordercolor: P.muted_3,
|
|
1483
|
+
borderwidth: 1,
|
|
1484
|
+
font: { size: 11, color: P.ink },
|
|
1485
|
+
orientation: "h",
|
|
1486
|
+
yanchor: "bottom",
|
|
1487
|
+
y: 1.02,
|
|
1488
|
+
xanchor: "left",
|
|
1489
|
+
x: 0
|
|
1490
|
+
},
|
|
1491
|
+
xaxis: {
|
|
1492
|
+
showline: !0,
|
|
1493
|
+
linewidth: 1,
|
|
1494
|
+
linecolor: P.line,
|
|
1495
|
+
mirror: !1,
|
|
1496
|
+
ticks: "outside",
|
|
1497
|
+
tickwidth: 1,
|
|
1498
|
+
tickcolor: P.line,
|
|
1499
|
+
ticklen: 4,
|
|
1500
|
+
showgrid: !0,
|
|
1501
|
+
gridcolor: P.grid,
|
|
1502
|
+
gridwidth: 1,
|
|
1503
|
+
zeroline: !1,
|
|
1504
|
+
title_font: { color: P.ink, size: 12 },
|
|
1505
|
+
tickfont: { color: P.ink_soft, size: 10 }
|
|
1506
|
+
},
|
|
1507
|
+
yaxis: {
|
|
1508
|
+
showline: !0,
|
|
1509
|
+
linewidth: 1,
|
|
1510
|
+
linecolor: P.line,
|
|
1511
|
+
mirror: !1,
|
|
1512
|
+
ticks: "outside",
|
|
1513
|
+
tickwidth: 1,
|
|
1514
|
+
tickcolor: P.line,
|
|
1515
|
+
ticklen: 4,
|
|
1516
|
+
showgrid: !0,
|
|
1517
|
+
gridcolor: P.grid,
|
|
1518
|
+
gridwidth: 1,
|
|
1519
|
+
zeroline: !1,
|
|
1520
|
+
title_font: { color: P.ink, size: 12 },
|
|
1521
|
+
tickfont: { color: P.ink_soft, size: 10 }
|
|
1522
|
+
},
|
|
1523
|
+
modebar: {
|
|
1524
|
+
remove: ["select2d", "lasso2d", "autoScale2d"]
|
|
1525
|
+
},
|
|
1526
|
+
bargap: 0.18,
|
|
1527
|
+
bargroupgap: 0.08
|
|
1528
|
+
},
|
|
1529
|
+
data: {
|
|
1530
|
+
scatter: [{
|
|
1531
|
+
mode: "lines+markers",
|
|
1532
|
+
line: { width: 2, color: P.primary },
|
|
1533
|
+
marker: {
|
|
1534
|
+
size: 7,
|
|
1535
|
+
color: P.primary_2,
|
|
1536
|
+
line: { width: 1.5, color: P.bg }
|
|
1537
|
+
}
|
|
1538
|
+
}],
|
|
1539
|
+
bar: [{
|
|
1540
|
+
marker: {
|
|
1541
|
+
color: P.primary,
|
|
1542
|
+
line: { color: P.bg, width: 0 }
|
|
1543
|
+
}
|
|
1544
|
+
}],
|
|
1545
|
+
histogram: [{
|
|
1546
|
+
marker: {
|
|
1547
|
+
color: P.primary,
|
|
1548
|
+
line: { color: P.bg, width: 0 }
|
|
1549
|
+
}
|
|
1550
|
+
}],
|
|
1551
|
+
box: [{
|
|
1552
|
+
fillcolor: P.accent,
|
|
1553
|
+
line: { color: P.ink, width: 1.5 },
|
|
1554
|
+
marker: { color: P.ink }
|
|
1555
|
+
}],
|
|
1556
|
+
violin: [{
|
|
1557
|
+
fillcolor: P.accent,
|
|
1558
|
+
line: { color: P.ink, width: 1.5 },
|
|
1559
|
+
marker: { color: P.ink }
|
|
1560
|
+
}],
|
|
1561
|
+
heatmap: [{
|
|
1562
|
+
colorscale: [
|
|
1563
|
+
[0, "#ffffff"],
|
|
1564
|
+
[0.2, "#f1f5f9"],
|
|
1565
|
+
[0.4, "#cbd5e1"],
|
|
1566
|
+
[0.6, "#94a3b8"],
|
|
1567
|
+
[0.8, "#475569"],
|
|
1568
|
+
[1, "#1e293b"]
|
|
1569
|
+
],
|
|
1570
|
+
colorbar: {
|
|
1571
|
+
outlinecolor: P.line,
|
|
1572
|
+
tickcolor: P.line,
|
|
1573
|
+
tickfont: { color: P.ink_soft }
|
|
1574
|
+
}
|
|
1575
|
+
}],
|
|
1576
|
+
contour: [{
|
|
1577
|
+
colorscale: [
|
|
1578
|
+
[0, "#ffffff"],
|
|
1579
|
+
[0.25, "#fef3c7"],
|
|
1580
|
+
[0.5, "#f59e0b"],
|
|
1581
|
+
[0.75, "#92400e"],
|
|
1582
|
+
[1, "#1e293b"]
|
|
1583
|
+
],
|
|
1584
|
+
colorbar: {
|
|
1585
|
+
outlinecolor: P.line,
|
|
1586
|
+
tickcolor: P.line,
|
|
1587
|
+
tickfont: { color: P.ink_soft }
|
|
1588
|
+
}
|
|
1589
|
+
}]
|
|
1590
|
+
}
|
|
1591
|
+
}, Uo = Ce, S = {
|
|
1592
|
+
bg: "#1b1b1f",
|
|
1593
|
+
panel: "#25252a",
|
|
1594
|
+
ink: "#f0f0e4",
|
|
1595
|
+
ink_soft: "#c8c8b8",
|
|
1596
|
+
grid: "#2a2a26",
|
|
1597
|
+
line: "#3a3a34",
|
|
1598
|
+
accent: "#ffffbb",
|
|
1599
|
+
accent_2: "#f3ef9b",
|
|
1600
|
+
muted_1: "#8a8a80",
|
|
1601
|
+
muted_2: "#5e5e56",
|
|
1602
|
+
muted_3: "#3a3a34"
|
|
1603
|
+
}, Yo = "baselode-dark", qo = {
|
|
1604
|
+
layout: {
|
|
1605
|
+
font: {
|
|
1606
|
+
family: "Inter, Arial, sans-serif",
|
|
1607
|
+
color: S.ink,
|
|
1608
|
+
size: 14
|
|
1609
|
+
},
|
|
1610
|
+
title: {
|
|
1611
|
+
x: 0.02,
|
|
1612
|
+
xanchor: "left",
|
|
1613
|
+
font: {
|
|
1614
|
+
family: "Inter, Arial, sans-serif",
|
|
1615
|
+
size: 22,
|
|
1616
|
+
color: S.ink
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
paper_bgcolor: S.bg,
|
|
1620
|
+
plot_bgcolor: S.bg,
|
|
1621
|
+
colorway: [
|
|
1622
|
+
S.ink,
|
|
1623
|
+
S.accent,
|
|
1624
|
+
S.muted_1,
|
|
1625
|
+
S.accent_2,
|
|
1626
|
+
S.muted_2,
|
|
1627
|
+
S.muted_3
|
|
1628
|
+
],
|
|
1629
|
+
margin: { l: 70, r: 30, t: 70, b: 60 },
|
|
1630
|
+
hovermode: "x unified",
|
|
1631
|
+
hoverlabel: {
|
|
1632
|
+
bgcolor: S.panel,
|
|
1633
|
+
bordercolor: S.accent,
|
|
1634
|
+
font: {
|
|
1635
|
+
family: "Inter, Arial, sans-serif",
|
|
1636
|
+
color: S.ink,
|
|
1637
|
+
size: 13
|
|
1638
|
+
}
|
|
1639
|
+
},
|
|
1640
|
+
legend: {
|
|
1641
|
+
bgcolor: "rgba(37,37,42,0.88)",
|
|
1642
|
+
bordercolor: S.line,
|
|
1643
|
+
borderwidth: 1,
|
|
1644
|
+
font: {
|
|
1645
|
+
family: "Inter, Arial, sans-serif",
|
|
1646
|
+
color: S.ink,
|
|
1647
|
+
size: 12
|
|
1648
|
+
},
|
|
1649
|
+
orientation: "h",
|
|
1650
|
+
yanchor: "bottom",
|
|
1651
|
+
y: 1.02,
|
|
1652
|
+
xanchor: "left",
|
|
1653
|
+
x: 0
|
|
1654
|
+
},
|
|
1655
|
+
xaxis: {
|
|
1656
|
+
showline: !1,
|
|
1657
|
+
ticks: "outside",
|
|
1658
|
+
tickwidth: 1,
|
|
1659
|
+
tickcolor: S.muted_1,
|
|
1660
|
+
ticklen: 6,
|
|
1661
|
+
showgrid: !0,
|
|
1662
|
+
gridcolor: S.grid,
|
|
1663
|
+
gridwidth: 1,
|
|
1664
|
+
zeroline: !1,
|
|
1665
|
+
title_font: { color: S.ink },
|
|
1666
|
+
tickfont: { color: S.ink_soft }
|
|
1667
|
+
},
|
|
1668
|
+
yaxis: {
|
|
1669
|
+
showline: !1,
|
|
1670
|
+
ticks: "outside",
|
|
1671
|
+
tickwidth: 1,
|
|
1672
|
+
tickcolor: S.muted_1,
|
|
1673
|
+
ticklen: 6,
|
|
1674
|
+
showgrid: !0,
|
|
1675
|
+
gridcolor: S.grid,
|
|
1676
|
+
gridwidth: 1,
|
|
1677
|
+
zeroline: !1,
|
|
1678
|
+
title_font: { color: S.ink },
|
|
1679
|
+
tickfont: { color: S.ink_soft }
|
|
1680
|
+
},
|
|
1681
|
+
bargap: 0.18,
|
|
1682
|
+
bargroupgap: 0.08
|
|
1683
|
+
},
|
|
1684
|
+
data: {
|
|
1685
|
+
scatter: [{
|
|
1686
|
+
mode: "lines+markers",
|
|
1687
|
+
line: { width: 2.5, color: S.ink },
|
|
1688
|
+
marker: {
|
|
1689
|
+
size: 7,
|
|
1690
|
+
color: S.ink,
|
|
1691
|
+
line: { width: 1.5, color: S.bg }
|
|
1692
|
+
}
|
|
1693
|
+
}],
|
|
1694
|
+
bar: [{
|
|
1695
|
+
marker: {
|
|
1696
|
+
color: S.ink,
|
|
1697
|
+
line: { color: S.bg, width: 0 }
|
|
1698
|
+
}
|
|
1699
|
+
}],
|
|
1700
|
+
histogram: [{
|
|
1701
|
+
marker: {
|
|
1702
|
+
color: S.ink,
|
|
1703
|
+
line: { color: S.bg, width: 0 }
|
|
1704
|
+
}
|
|
1705
|
+
}],
|
|
1706
|
+
box: [{
|
|
1707
|
+
fillcolor: S.accent,
|
|
1708
|
+
line: { color: S.ink, width: 1.5 },
|
|
1709
|
+
marker: { color: S.ink }
|
|
1710
|
+
}],
|
|
1711
|
+
violin: [{
|
|
1712
|
+
fillcolor: S.accent,
|
|
1713
|
+
line: { color: S.ink, width: 1.5 },
|
|
1714
|
+
marker: { color: S.ink }
|
|
1715
|
+
}],
|
|
1716
|
+
heatmap: [{
|
|
1717
|
+
colorscale: [
|
|
1718
|
+
[0, "#1b1b1f"],
|
|
1719
|
+
[0.2, "#2e2e28"],
|
|
1720
|
+
[0.4, "#5e5e50"],
|
|
1721
|
+
[0.6, "#c8c89a"],
|
|
1722
|
+
[0.8, "#f3ef9b"],
|
|
1723
|
+
[1, "#ffffbb"]
|
|
1724
|
+
],
|
|
1725
|
+
colorbar: {
|
|
1726
|
+
outlinecolor: S.ink,
|
|
1727
|
+
tickcolor: S.ink,
|
|
1728
|
+
tickfont: { color: S.ink_soft }
|
|
1729
|
+
}
|
|
1730
|
+
}],
|
|
1731
|
+
contour: [{
|
|
1732
|
+
colorscale: [
|
|
1733
|
+
[0, "#1b1b1f"],
|
|
1734
|
+
[0.25, "#2e2e28"],
|
|
1735
|
+
[0.5, "#6b6b50"],
|
|
1736
|
+
[0.75, "#f3ef9b"],
|
|
1737
|
+
[1, "#ffffbb"]
|
|
1738
|
+
],
|
|
1739
|
+
colorbar: {
|
|
1740
|
+
outlinecolor: S.ink,
|
|
1741
|
+
tickcolor: S.ink,
|
|
1742
|
+
tickfont: { color: S.ink_soft }
|
|
1743
|
+
}
|
|
1744
|
+
}]
|
|
1745
|
+
}
|
|
1746
|
+
}, Rn = "#7f7f7f", Be = {
|
|
1747
|
+
Au: "#FFD700",
|
|
1748
|
+
// gold
|
|
1749
|
+
Ag: "#C0C0C0",
|
|
1750
|
+
// silver
|
|
1751
|
+
Cu: "#B87333",
|
|
1752
|
+
// copper / orange-brown
|
|
1753
|
+
Fe: "#8B4513",
|
|
1754
|
+
// iron / rusty brown
|
|
1755
|
+
Ni: "#4CAF50",
|
|
1756
|
+
// nickel / green
|
|
1757
|
+
Zn: "#78909C",
|
|
1758
|
+
// zinc / blue-grey
|
|
1759
|
+
Pb: "#607D8B",
|
|
1760
|
+
// lead / slate
|
|
1761
|
+
Mo: "#9C27B0",
|
|
1762
|
+
// molybdenite / purple
|
|
1763
|
+
Co: "#2196F3",
|
|
1764
|
+
// cobalt / blue
|
|
1765
|
+
Li: "#FF5722",
|
|
1766
|
+
// lithium / deep orange
|
|
1767
|
+
Mn: "#795548",
|
|
1768
|
+
// manganese / brown
|
|
1769
|
+
Cr: "#009688",
|
|
1770
|
+
// chromium / teal
|
|
1771
|
+
V: "#673AB7",
|
|
1772
|
+
// vanadium / deep purple
|
|
1773
|
+
W: "#FF9800",
|
|
1774
|
+
// tungsten / amber
|
|
1775
|
+
Sn: "#9E9E9E",
|
|
1776
|
+
// tin / medium grey
|
|
1777
|
+
Ti: "#00BCD4",
|
|
1778
|
+
// titanium / cyan
|
|
1779
|
+
Al: "#FFEB3B",
|
|
1780
|
+
// aluminium / yellow
|
|
1781
|
+
U: "#8BC34A"
|
|
1782
|
+
// uranium / lime green
|
|
1783
|
+
}, Gn = {
|
|
1784
|
+
// Sedimentary
|
|
1785
|
+
shale: "#607D8B",
|
|
1786
|
+
mudstone: "#78909C",
|
|
1787
|
+
siltstone: "#90A4AE",
|
|
1788
|
+
sandstone: "#F5CBA7",
|
|
1789
|
+
limestone: "#B0BEC5",
|
|
1790
|
+
dolomite: "#CFD8DC",
|
|
1791
|
+
conglomerate: "#D7CCC8",
|
|
1792
|
+
coal: "#212121",
|
|
1793
|
+
// Iron-formation
|
|
1794
|
+
BIF: "#8B4513",
|
|
1795
|
+
ironstone: "#A0522D",
|
|
1796
|
+
// Igneous – intrusive
|
|
1797
|
+
granite: "#EF9A9A",
|
|
1798
|
+
granodiorite: "#F48FB1",
|
|
1799
|
+
diorite: "#CE93D8",
|
|
1800
|
+
gabbro: "#546E7A",
|
|
1801
|
+
peridotite: "#33691E",
|
|
1802
|
+
pegmatite: "#FFF9C4",
|
|
1803
|
+
// Igneous – extrusive / volcanic
|
|
1804
|
+
basalt: "#37474F",
|
|
1805
|
+
andesite: "#78909C",
|
|
1806
|
+
rhyolite: "#FFCCBC",
|
|
1807
|
+
dacite: "#FFAB91",
|
|
1808
|
+
tuff: "#D7CCC8",
|
|
1809
|
+
breccia: "#BCAAA4",
|
|
1810
|
+
// Metamorphic
|
|
1811
|
+
schist: "#80CBC4",
|
|
1812
|
+
gneiss: "#4DB6AC",
|
|
1813
|
+
quartzite: "#E0F7FA",
|
|
1814
|
+
marble: "#F5F5F5",
|
|
1815
|
+
slate: "#455A64",
|
|
1816
|
+
phyllite: "#80DEEA",
|
|
1817
|
+
// Other
|
|
1818
|
+
quartz: "#ECEFF1",
|
|
1819
|
+
calcite: "#F9FBE7",
|
|
1820
|
+
vein: "#FFFFFF",
|
|
1821
|
+
unknown: "#9E9E9E"
|
|
1822
|
+
}, Ue = {
|
|
1823
|
+
commodity: Be,
|
|
1824
|
+
lithology: Gn
|
|
1825
|
+
};
|
|
1826
|
+
function Un(e, t, n = Rn) {
|
|
1827
|
+
if (!t || e == null) return n;
|
|
1828
|
+
const r = String(e).trim();
|
|
1829
|
+
if (Object.prototype.hasOwnProperty.call(t, r)) return t[r];
|
|
1830
|
+
const o = r.toLowerCase();
|
|
1831
|
+
for (const [i, s] of Object.entries(t))
|
|
1832
|
+
if (String(i).trim().toLowerCase() === o) return s;
|
|
1833
|
+
return n;
|
|
1834
|
+
}
|
|
1835
|
+
function Yn(e) {
|
|
1836
|
+
if (e == null) return {};
|
|
1837
|
+
if (typeof e == "string") {
|
|
1838
|
+
const t = e.trim().toLowerCase();
|
|
1839
|
+
if (Object.prototype.hasOwnProperty.call(Ue, t))
|
|
1840
|
+
return Ue[t];
|
|
1841
|
+
const n = Object.keys(Ue).sort().join(", ");
|
|
1842
|
+
throw new RangeError(
|
|
1843
|
+
`Unknown built-in colour map '${e}'. Available maps: ${n}`
|
|
1844
|
+
);
|
|
1845
|
+
}
|
|
1846
|
+
if (typeof e == "object" && Object.getPrototypeOf(e) === Object.prototype) return e;
|
|
1847
|
+
throw new TypeError(
|
|
1848
|
+
`colourMap must be null, a string, or a plain object; got ${Array.isArray(e) ? "Array" : Object.prototype.toString.call(e)}`
|
|
1849
|
+
);
|
|
1850
|
+
}
|
|
1851
|
+
const qn = "#8b1e3f", Xn = "#a8324f";
|
|
1852
|
+
function Wn(e) {
|
|
1853
|
+
if (!e) return null;
|
|
1854
|
+
const t = e.split(/[_\-/\s]+/);
|
|
1855
|
+
for (const n of t) {
|
|
1856
|
+
if (Object.prototype.hasOwnProperty.call(Be, n))
|
|
1857
|
+
return Be[n];
|
|
1858
|
+
const r = n.toLowerCase();
|
|
1859
|
+
for (const [o, i] of Object.entries(Be))
|
|
1860
|
+
if (o.toLowerCase() === r) return i;
|
|
1861
|
+
}
|
|
1862
|
+
return null;
|
|
1863
|
+
}
|
|
1864
|
+
const Zn = "#6b7280", Kn = { l: 42, r: 4, t: 4, b: 30 }, ct = 10, ut = 12;
|
|
1865
|
+
function dt(e) {
|
|
1437
1866
|
return e ? typeof e == "string" ? { text: e } : e : {};
|
|
1438
1867
|
}
|
|
1439
|
-
function
|
|
1440
|
-
const t =
|
|
1868
|
+
function Ft(e = {}) {
|
|
1869
|
+
const t = dt(e.xaxis && e.xaxis.title), n = dt(e.yaxis && e.yaxis.title);
|
|
1441
1870
|
return {
|
|
1442
1871
|
...e,
|
|
1443
|
-
margin:
|
|
1872
|
+
margin: Kn,
|
|
1444
1873
|
autosize: !0,
|
|
1445
1874
|
width: void 0,
|
|
1446
1875
|
xaxis: {
|
|
1447
1876
|
...e.xaxis || {},
|
|
1448
1877
|
tickfont: {
|
|
1449
1878
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1450
|
-
size:
|
|
1879
|
+
size: ct
|
|
1451
1880
|
},
|
|
1452
1881
|
title: {
|
|
1453
1882
|
...t,
|
|
1454
|
-
font: { ...t.font || {}, size:
|
|
1883
|
+
font: { ...t.font || {}, size: ut }
|
|
1455
1884
|
}
|
|
1456
1885
|
},
|
|
1457
1886
|
yaxis: {
|
|
@@ -1459,16 +1888,16 @@ function St(e = {}) {
|
|
|
1459
1888
|
automargin: !0,
|
|
1460
1889
|
tickfont: {
|
|
1461
1890
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1462
|
-
size:
|
|
1891
|
+
size: ct
|
|
1463
1892
|
},
|
|
1464
1893
|
title: {
|
|
1465
1894
|
...n,
|
|
1466
|
-
font: { ...n.font || {}, size:
|
|
1895
|
+
font: { ...n.font || {}, size: ut }
|
|
1467
1896
|
}
|
|
1468
1897
|
}
|
|
1469
1898
|
};
|
|
1470
1899
|
}
|
|
1471
|
-
function
|
|
1900
|
+
function Jn(e, t) {
|
|
1472
1901
|
var r;
|
|
1473
1902
|
if (!e || !t) return !1;
|
|
1474
1903
|
const n = e.points || [];
|
|
@@ -1479,40 +1908,40 @@ function Hn(e, t) {
|
|
|
1479
1908
|
}
|
|
1480
1909
|
return !1;
|
|
1481
1910
|
}
|
|
1482
|
-
function
|
|
1911
|
+
function Qn(e, t, n) {
|
|
1483
1912
|
if (!e || !t) return [];
|
|
1484
1913
|
const r = (e == null ? void 0 : e.points) || [], o = [], i = /* @__PURE__ */ new Set();
|
|
1485
1914
|
return r.forEach((s) => {
|
|
1486
1915
|
let l = Number(
|
|
1487
1916
|
s.from ?? s.samp_from ?? s.sample_from ?? s.fromdepth ?? s.from_depth ?? s.depth_from
|
|
1488
|
-
),
|
|
1917
|
+
), u = Number(
|
|
1489
1918
|
s.to ?? s.samp_to ?? s.sample_to ?? s.todepth ?? s.to_depth ?? s.depth_to
|
|
1490
1919
|
);
|
|
1491
|
-
if (!Number.isFinite(l) || !Number.isFinite(
|
|
1920
|
+
if (!Number.isFinite(l) || !Number.isFinite(u)) {
|
|
1492
1921
|
const f = Number(s.depth ?? s.md);
|
|
1493
|
-
Number.isFinite(f) && (l = f,
|
|
1922
|
+
Number.isFinite(f) && (l = f, u = f);
|
|
1494
1923
|
}
|
|
1495
1924
|
const a = s == null ? void 0 : s[t];
|
|
1496
|
-
if (!Number.isFinite(l) || !Number.isFinite(
|
|
1497
|
-
const
|
|
1498
|
-
if (i.has(
|
|
1499
|
-
i.add(
|
|
1500
|
-
const m = (l +
|
|
1925
|
+
if (!Number.isFinite(l) || !Number.isFinite(u) || u < l || a == null || a === "" || n && typeof a == "string" && /^(nan|null|none)$/i.test(a.trim())) return;
|
|
1926
|
+
const c = `${t}:${l}-${u}:${String(a)}`;
|
|
1927
|
+
if (i.has(c)) return;
|
|
1928
|
+
i.add(c);
|
|
1929
|
+
const m = (l + u) / 2, d = n ? a : Number(a);
|
|
1501
1930
|
!n && !Number.isFinite(d) || o.push({
|
|
1502
1931
|
z: m,
|
|
1503
1932
|
val: d,
|
|
1504
1933
|
from: l,
|
|
1505
|
-
to:
|
|
1506
|
-
errorPlus:
|
|
1934
|
+
to: u,
|
|
1935
|
+
errorPlus: u - m,
|
|
1507
1936
|
errorMinus: m - l
|
|
1508
1937
|
});
|
|
1509
1938
|
}), o.sort((s, l) => l.z - s.z);
|
|
1510
1939
|
}
|
|
1511
|
-
function
|
|
1940
|
+
function er(e, t, n, r) {
|
|
1512
1941
|
if (!e.length) return { data: [], layout: {} };
|
|
1513
|
-
const
|
|
1514
|
-
if (!
|
|
1515
|
-
const
|
|
1942
|
+
const o = e.filter((d) => Number.isFinite(d == null ? void 0 : d.from) && Number.isFinite(d == null ? void 0 : d.to) && d.to > d.from).map((d) => ({ ...d, category: `${(d == null ? void 0 : d.val) ?? ""}`.trim() })).filter((d) => d.category !== "" && !/^(nan|null|none)$/i.test(d.category)).sort((d, f) => d.from - f.from || d.to - f.to);
|
|
1943
|
+
if (!o.length) return { data: [], layout: {} };
|
|
1944
|
+
const i = Yn(n), s = [
|
|
1516
1945
|
"#1f77b4",
|
|
1517
1946
|
// blue
|
|
1518
1947
|
"#ff7f0e",
|
|
@@ -1541,95 +1970,115 @@ function Bn(e, t) {
|
|
|
1541
1970
|
// violet
|
|
1542
1971
|
"#636363"
|
|
1543
1972
|
// dark gray
|
|
1544
|
-
],
|
|
1545
|
-
|
|
1546
|
-
|
|
1973
|
+
], l = [...new Set(o.map((d) => d.category))];
|
|
1974
|
+
function u(d, f) {
|
|
1975
|
+
if (i && Object.keys(i).length > 0) {
|
|
1976
|
+
const h = Un(d, i, null);
|
|
1977
|
+
if (h !== null) return h;
|
|
1978
|
+
}
|
|
1979
|
+
return s[f % s.length];
|
|
1980
|
+
}
|
|
1981
|
+
const a = new Map(
|
|
1982
|
+
l.map((d, f) => [d, u(d, f)])
|
|
1983
|
+
);
|
|
1984
|
+
return { data: l.map((d) => {
|
|
1985
|
+
const f = o.filter((h) => h.category === d);
|
|
1547
1986
|
return {
|
|
1548
1987
|
type: "bar",
|
|
1549
|
-
x:
|
|
1550
|
-
y:
|
|
1551
|
-
base:
|
|
1988
|
+
x: f.map(() => 0.5),
|
|
1989
|
+
y: f.map((h) => h.to - h.from),
|
|
1990
|
+
base: f.map((h) => h.from),
|
|
1552
1991
|
width: 1,
|
|
1553
|
-
marker: { color:
|
|
1554
|
-
name:
|
|
1992
|
+
marker: { color: a.get(d), line: { width: 0 } },
|
|
1993
|
+
name: d,
|
|
1555
1994
|
showlegend: !1,
|
|
1556
|
-
customdata:
|
|
1557
|
-
hovertemplate: `${t}: ${
|
|
1995
|
+
customdata: f.map((h) => [h.from, h.to]),
|
|
1996
|
+
hovertemplate: `${t}: ${d}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`
|
|
1558
1997
|
};
|
|
1559
|
-
}), layout:
|
|
1998
|
+
}), layout: Ft({
|
|
1560
1999
|
barmode: "overlay",
|
|
1561
2000
|
bargap: 0,
|
|
1562
2001
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1563
2002
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1564
2003
|
showlegend: !1,
|
|
1565
|
-
title: t || void 0
|
|
2004
|
+
title: t || void 0,
|
|
2005
|
+
template: r !== void 0 ? r : Ce
|
|
1566
2006
|
}) };
|
|
1567
2007
|
}
|
|
1568
|
-
function
|
|
2008
|
+
function tr(e, t, n, r, o) {
|
|
1569
2009
|
if (!e.length) return { data: [], layout: {} };
|
|
1570
|
-
const
|
|
1571
|
-
x: e.map((
|
|
1572
|
-
y: e.map((
|
|
2010
|
+
const i = n === "bar", s = n === "markers", l = n === "line", u = r || qn, a = r || Xn, c = {
|
|
2011
|
+
x: e.map((h) => h.val),
|
|
2012
|
+
y: e.map((h) => h.z),
|
|
1573
2013
|
hovertemplate: `${t}: %{x}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`,
|
|
1574
|
-
customdata: e.map((
|
|
1575
|
-
},
|
|
2014
|
+
customdata: e.map((h) => [Math.min(h.from, h.to), Math.max(h.from, h.to)])
|
|
2015
|
+
}, m = {
|
|
1576
2016
|
type: "data",
|
|
1577
2017
|
symmetric: !1,
|
|
1578
|
-
array: e.map((
|
|
1579
|
-
arrayminus: e.map((
|
|
2018
|
+
array: e.map((h) => h.errorPlus),
|
|
2019
|
+
arrayminus: e.map((h) => h.errorMinus),
|
|
1580
2020
|
thickness: 1.5,
|
|
1581
2021
|
width: 2,
|
|
1582
|
-
color:
|
|
2022
|
+
color: Zn
|
|
1583
2023
|
};
|
|
1584
|
-
return { data: [
|
|
1585
|
-
...
|
|
2024
|
+
return { data: [i ? {
|
|
2025
|
+
...c,
|
|
1586
2026
|
type: "bar",
|
|
1587
2027
|
orientation: "h",
|
|
1588
|
-
marker: { color:
|
|
1589
|
-
error_y:
|
|
2028
|
+
marker: { color: u },
|
|
2029
|
+
error_y: m
|
|
1590
2030
|
} : {
|
|
1591
|
-
...
|
|
2031
|
+
...c,
|
|
1592
2032
|
type: "scatter",
|
|
1593
|
-
mode:
|
|
1594
|
-
line: { color:
|
|
1595
|
-
marker: { size: 7, color:
|
|
1596
|
-
error_y:
|
|
1597
|
-
}], layout:
|
|
2033
|
+
mode: s ? "markers" : l ? "lines" : "lines+markers",
|
|
2034
|
+
line: { color: u, width: 2 },
|
|
2035
|
+
marker: { size: 7, color: a },
|
|
2036
|
+
error_y: l ? void 0 : m
|
|
2037
|
+
}], layout: Ft({
|
|
1598
2038
|
xaxis: { title: t, zeroline: !1 },
|
|
1599
2039
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1600
2040
|
barmode: "overlay",
|
|
1601
|
-
showlegend: !1
|
|
2041
|
+
showlegend: !1,
|
|
2042
|
+
template: o !== void 0 ? o : Ce
|
|
1602
2043
|
}) };
|
|
1603
2044
|
}
|
|
1604
|
-
function
|
|
1605
|
-
|
|
2045
|
+
function Lt({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
|
|
2046
|
+
if (!e || !e.length || !n) return { data: [], layout: {} };
|
|
2047
|
+
if (t || r === "categorical")
|
|
2048
|
+
return er(e, n, o, i);
|
|
2049
|
+
const s = Wn(n);
|
|
2050
|
+
return tr(e, n, r, s, i);
|
|
1606
2051
|
}
|
|
1607
|
-
function
|
|
2052
|
+
function Xo(e = [], {
|
|
1608
2053
|
fromCol: t = "from",
|
|
1609
2054
|
toCol: n = "to",
|
|
1610
|
-
categoryCol: r = "geology_code"
|
|
2055
|
+
categoryCol: r = "geology_code",
|
|
2056
|
+
colourMap: o = null,
|
|
2057
|
+
template: i = void 0
|
|
1611
2058
|
} = {}) {
|
|
1612
|
-
const
|
|
1613
|
-
return e.forEach((
|
|
1614
|
-
const
|
|
1615
|
-
if (!Number.isFinite(
|
|
1616
|
-
const
|
|
1617
|
-
|
|
1618
|
-
z:
|
|
2059
|
+
const s = [];
|
|
2060
|
+
return e.forEach((l) => {
|
|
2061
|
+
const u = Number(l == null ? void 0 : l[t]), a = Number(l == null ? void 0 : l[n]), c = l == null ? void 0 : l[r];
|
|
2062
|
+
if (!Number.isFinite(u) || !Number.isFinite(a) || a <= u || c == null || `${c}`.trim() === "") return;
|
|
2063
|
+
const m = (u + a) / 2;
|
|
2064
|
+
s.push({
|
|
2065
|
+
z: m,
|
|
1619
2066
|
val: `${c}`,
|
|
1620
|
-
from:
|
|
1621
|
-
to:
|
|
1622
|
-
errorPlus:
|
|
1623
|
-
errorMinus:
|
|
2067
|
+
from: u,
|
|
2068
|
+
to: a,
|
|
2069
|
+
errorPlus: a - m,
|
|
2070
|
+
errorMinus: m - u
|
|
1624
2071
|
});
|
|
1625
|
-
}),
|
|
1626
|
-
points:
|
|
2072
|
+
}), s.sort((l, u) => u.z - l.z), Lt({
|
|
2073
|
+
points: s,
|
|
1627
2074
|
isCategorical: !0,
|
|
1628
2075
|
property: r,
|
|
1629
|
-
chartType: "categorical"
|
|
2076
|
+
chartType: "categorical",
|
|
2077
|
+
colourMap: o,
|
|
2078
|
+
template: i
|
|
1630
2079
|
});
|
|
1631
2080
|
}
|
|
1632
|
-
const
|
|
2081
|
+
const Ot = [
|
|
1633
2082
|
"#0f172a",
|
|
1634
2083
|
"#1e3a5f",
|
|
1635
2084
|
"#7c3aed",
|
|
@@ -1640,24 +2089,24 @@ const Pt = [
|
|
|
1640
2089
|
"#db2777",
|
|
1641
2090
|
"#65a30d",
|
|
1642
2091
|
"#9333ea"
|
|
1643
|
-
],
|
|
1644
|
-
function
|
|
2092
|
+
], nr = { l: 42, r: 4, t: 4, b: 30 }, mt = 10, ft = 12;
|
|
2093
|
+
function Pt(e = {}) {
|
|
1645
2094
|
return {
|
|
1646
2095
|
...e,
|
|
1647
|
-
margin:
|
|
2096
|
+
margin: nr,
|
|
1648
2097
|
autosize: !0,
|
|
1649
2098
|
width: void 0,
|
|
1650
2099
|
xaxis: {
|
|
1651
2100
|
...e.xaxis || {},
|
|
1652
2101
|
tickfont: {
|
|
1653
2102
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1654
|
-
size:
|
|
2103
|
+
size: mt
|
|
1655
2104
|
},
|
|
1656
2105
|
title: {
|
|
1657
2106
|
...e.xaxis && e.xaxis.title || {},
|
|
1658
2107
|
font: {
|
|
1659
2108
|
...e.xaxis && e.xaxis.title && e.xaxis.title.font || {},
|
|
1660
|
-
size:
|
|
2109
|
+
size: ft
|
|
1661
2110
|
}
|
|
1662
2111
|
}
|
|
1663
2112
|
},
|
|
@@ -1666,66 +2115,67 @@ function Ct(e = {}) {
|
|
|
1666
2115
|
automargin: !0,
|
|
1667
2116
|
tickfont: {
|
|
1668
2117
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1669
|
-
size:
|
|
2118
|
+
size: mt
|
|
1670
2119
|
},
|
|
1671
2120
|
title: {
|
|
1672
2121
|
...e.yaxis && e.yaxis.title || {},
|
|
1673
2122
|
font: {
|
|
1674
2123
|
...e.yaxis && e.yaxis.title && e.yaxis.title.font || {},
|
|
1675
|
-
size:
|
|
2124
|
+
size: ft
|
|
1676
2125
|
}
|
|
1677
2126
|
}
|
|
1678
2127
|
}
|
|
1679
2128
|
};
|
|
1680
2129
|
}
|
|
1681
|
-
function
|
|
2130
|
+
function rr(e, {
|
|
1682
2131
|
tailScale: t = 5,
|
|
1683
2132
|
colorBy: n = null,
|
|
1684
|
-
palette: r =
|
|
1685
|
-
depthCol: o =
|
|
1686
|
-
dipCol: i =
|
|
1687
|
-
azCol: s =
|
|
2133
|
+
palette: r = Ot,
|
|
2134
|
+
depthCol: o = W,
|
|
2135
|
+
dipCol: i = U,
|
|
2136
|
+
azCol: s = G,
|
|
2137
|
+
template: l = void 0
|
|
1688
2138
|
} = {}) {
|
|
1689
|
-
const
|
|
1690
|
-
(
|
|
2139
|
+
const u = e.filter(
|
|
2140
|
+
(b) => b[o] != null && b[i] != null && b[s] != null
|
|
1691
2141
|
);
|
|
1692
|
-
if (!
|
|
2142
|
+
if (!u.length)
|
|
1693
2143
|
return { data: [], layout: {} };
|
|
1694
|
-
const
|
|
1695
|
-
n && [...new Set(
|
|
1696
|
-
|
|
2144
|
+
const a = {};
|
|
2145
|
+
n && [...new Set(u.map((_) => _[n]).filter((_) => _ != null))].sort().forEach((_, p) => {
|
|
2146
|
+
a[_] = r[p % r.length];
|
|
1697
2147
|
});
|
|
1698
|
-
const
|
|
1699
|
-
for (const
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1704
|
-
const
|
|
1705
|
-
|
|
2148
|
+
const c = /* @__PURE__ */ new Map(), m = [];
|
|
2149
|
+
for (const b of u) {
|
|
2150
|
+
const _ = Number(b[o]), p = Number(b[i]), g = Number(b[s]), E = n ? b[n] ?? "_default" : "_default", M = n ? a[E] ?? "#0f172a" : "#0f172a";
|
|
2151
|
+
c.has(E) || c.set(E, { xs: [], ys: [], dips: [], azs: [], color: M });
|
|
2152
|
+
const v = c.get(E);
|
|
2153
|
+
v.xs.push(p), v.ys.push(_), v.dips.push(p), v.azs.push(g);
|
|
2154
|
+
const k = g * Math.PI / 180, F = t * (Math.abs(p) / 90), T = Math.sin(k) * F, L = Math.cos(k) * F;
|
|
2155
|
+
m.push({
|
|
1706
2156
|
type: "line",
|
|
1707
|
-
x0:
|
|
1708
|
-
y0:
|
|
1709
|
-
x1:
|
|
1710
|
-
y1:
|
|
1711
|
-
line: { color:
|
|
2157
|
+
x0: p,
|
|
2158
|
+
y0: _,
|
|
2159
|
+
x1: p + T,
|
|
2160
|
+
y1: _ + L,
|
|
2161
|
+
line: { color: M, width: 2 }
|
|
1712
2162
|
});
|
|
1713
2163
|
}
|
|
1714
|
-
const
|
|
1715
|
-
for (const [
|
|
1716
|
-
|
|
2164
|
+
const d = [], f = n && c.size > 1;
|
|
2165
|
+
for (const [b, _] of c.entries())
|
|
2166
|
+
d.push({
|
|
1717
2167
|
type: "scatter",
|
|
1718
|
-
x:
|
|
1719
|
-
y:
|
|
2168
|
+
x: _.xs,
|
|
2169
|
+
y: _.ys,
|
|
1720
2170
|
mode: "markers",
|
|
1721
|
-
name:
|
|
1722
|
-
marker: { size: 8, color:
|
|
1723
|
-
showlegend:
|
|
1724
|
-
customdata:
|
|
2171
|
+
name: b !== "_default" ? String(b) : void 0,
|
|
2172
|
+
marker: { size: 8, color: _.color },
|
|
2173
|
+
showlegend: f && b !== "_default",
|
|
2174
|
+
customdata: _.dips.map((p, g) => [p, _.azs[g]]),
|
|
1725
2175
|
hovertemplate: "Depth: %{y}<br>Dip: %{customdata[0]}<br>Az: %{customdata[1]}<extra></extra>"
|
|
1726
2176
|
});
|
|
1727
|
-
return { data:
|
|
1728
|
-
shapes:
|
|
2177
|
+
return { data: d, layout: {
|
|
2178
|
+
shapes: m,
|
|
1729
2179
|
height: 400,
|
|
1730
2180
|
margin: { l: 40, r: 10, t: 10, b: 40 },
|
|
1731
2181
|
xaxis: {
|
|
@@ -1736,55 +2186,58 @@ function Un(e, {
|
|
|
1736
2186
|
tickvals: [-90, -60, -30, 0, 30, 60, 90]
|
|
1737
2187
|
},
|
|
1738
2188
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1739
|
-
showlegend: !!
|
|
2189
|
+
showlegend: !!f,
|
|
2190
|
+
template: l !== void 0 ? l : Ce
|
|
1740
2191
|
} };
|
|
1741
2192
|
}
|
|
1742
|
-
function
|
|
2193
|
+
function Wo(e, {
|
|
1743
2194
|
labelCol: t = "structure_type",
|
|
1744
|
-
palette: n =
|
|
1745
|
-
fromCol: r =
|
|
1746
|
-
toCol: o = D
|
|
2195
|
+
palette: n = Ot,
|
|
2196
|
+
fromCol: r = C,
|
|
2197
|
+
toCol: o = D,
|
|
2198
|
+
template: i = void 0
|
|
1747
2199
|
} = {}) {
|
|
1748
|
-
const
|
|
1749
|
-
const
|
|
1750
|
-
if (
|
|
1751
|
-
const
|
|
1752
|
-
return
|
|
1753
|
-
}).map((
|
|
1754
|
-
if (!
|
|
2200
|
+
const s = e.filter((d) => d[r] != null && d[o] != null && Number(d[o]) > Number(d[r])).filter((d) => {
|
|
2201
|
+
const f = d[t];
|
|
2202
|
+
if (f == null) return !1;
|
|
2203
|
+
const h = String(f).trim();
|
|
2204
|
+
return h !== "" && !/^(nan|null|none)$/i.test(h);
|
|
2205
|
+
}).map((d) => ({ from: Number(d[r]), to: Number(d[o]), label: String(d[t]).trim() })).sort((d, f) => d.from - f.from);
|
|
2206
|
+
if (!s.length)
|
|
1755
2207
|
return { data: [], layout: {} };
|
|
1756
|
-
const
|
|
1757
|
-
return
|
|
1758
|
-
|
|
2208
|
+
const l = [], u = [], a = [];
|
|
2209
|
+
return s.forEach((d, f) => {
|
|
2210
|
+
l.push({
|
|
1759
2211
|
type: "rect",
|
|
1760
2212
|
xref: "x",
|
|
1761
2213
|
yref: "y",
|
|
1762
2214
|
x0: 0,
|
|
1763
2215
|
x1: 1,
|
|
1764
|
-
y0:
|
|
1765
|
-
y1:
|
|
1766
|
-
fillcolor: n[
|
|
2216
|
+
y0: d.from,
|
|
2217
|
+
y1: d.to,
|
|
2218
|
+
fillcolor: n[f % n.length],
|
|
1767
2219
|
line: { width: 0 },
|
|
1768
2220
|
layer: "below"
|
|
1769
|
-
}),
|
|
2221
|
+
}), u.push(0.5 * (d.from + d.to)), a.push(d.label);
|
|
1770
2222
|
}), { data: [{
|
|
1771
2223
|
type: "scatter",
|
|
1772
|
-
x: Array(
|
|
1773
|
-
y:
|
|
2224
|
+
x: Array(a.length).fill(0.5),
|
|
2225
|
+
y: u,
|
|
1774
2226
|
mode: "text",
|
|
1775
|
-
text:
|
|
2227
|
+
text: a,
|
|
1776
2228
|
textposition: "middle center",
|
|
1777
2229
|
showlegend: !1,
|
|
1778
2230
|
hoverinfo: "text"
|
|
1779
|
-
}], layout:
|
|
1780
|
-
shapes:
|
|
2231
|
+
}], layout: Pt({
|
|
2232
|
+
shapes: l,
|
|
1781
2233
|
height: 400,
|
|
1782
2234
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1783
2235
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1784
|
-
showlegend: !1
|
|
2236
|
+
showlegend: !1,
|
|
2237
|
+
template: i !== void 0 ? i : Ce
|
|
1785
2238
|
}) };
|
|
1786
2239
|
}
|
|
1787
|
-
function
|
|
2240
|
+
function ht(e, t) {
|
|
1788
2241
|
if (!e) return "";
|
|
1789
2242
|
const n = String(e).trim().split(/\s+/), r = [];
|
|
1790
2243
|
let o = "";
|
|
@@ -1792,66 +2245,68 @@ function ut(e, t) {
|
|
|
1792
2245
|
o && o.length + 1 + i.length > t ? (r.push(o), o = i) : o = o ? `${o} ${i}` : i;
|
|
1793
2246
|
return o && r.push(o), r.join("<br>");
|
|
1794
2247
|
}
|
|
1795
|
-
function
|
|
2248
|
+
function or(e, {
|
|
1796
2249
|
commentCol: t = "comments",
|
|
1797
|
-
fromCol: n =
|
|
2250
|
+
fromCol: n = C,
|
|
1798
2251
|
toCol: r = D,
|
|
1799
2252
|
bgColor: o = "#f1f5f9",
|
|
1800
2253
|
borderColor: i = "#cbd5e1",
|
|
1801
2254
|
textColor: s = "#1e293b",
|
|
1802
|
-
charsPerLine: l = 18
|
|
2255
|
+
charsPerLine: l = 18,
|
|
2256
|
+
template: u = void 0
|
|
1803
2257
|
} = {}) {
|
|
1804
|
-
const
|
|
1805
|
-
const
|
|
1806
|
-
return { from: Number(
|
|
1807
|
-
}).sort((
|
|
1808
|
-
if (!
|
|
2258
|
+
const a = e.filter((p) => p[n] != null && p[r] != null && Number(p[r]) > Number(p[n])).map((p) => {
|
|
2259
|
+
const g = p[t], E = g != null && String(g).trim() !== "" && String(g) !== "null" ? String(g).trim() : "";
|
|
2260
|
+
return { from: Number(p[n]), to: Number(p[r]), comment: E };
|
|
2261
|
+
}).sort((p, g) => p.from - g.from);
|
|
2262
|
+
if (!a.length)
|
|
1809
2263
|
return { data: [], layout: {} };
|
|
1810
|
-
const
|
|
1811
|
-
for (const
|
|
1812
|
-
const
|
|
1813
|
-
|
|
2264
|
+
const c = [], m = [], d = [], f = [], h = [];
|
|
2265
|
+
for (const p of a) {
|
|
2266
|
+
const g = 0.5 * (p.from + p.to), E = !!p.comment;
|
|
2267
|
+
c.push({
|
|
1814
2268
|
type: "rect",
|
|
1815
2269
|
xref: "x",
|
|
1816
2270
|
yref: "y",
|
|
1817
2271
|
x0: 0,
|
|
1818
2272
|
x1: 1,
|
|
1819
|
-
y0:
|
|
1820
|
-
y1:
|
|
1821
|
-
fillcolor:
|
|
2273
|
+
y0: p.from,
|
|
2274
|
+
y1: p.to,
|
|
2275
|
+
fillcolor: E ? o : "rgba(0,0,0,0)",
|
|
1822
2276
|
line: { color: i, width: 1 },
|
|
1823
2277
|
layer: "below"
|
|
1824
|
-
}),
|
|
2278
|
+
}), E && (m.push(0.5), d.push(g), f.push(ht(p.comment, l)), h.push(`${p.from.toFixed(3)}–${p.to.toFixed(3)} m<br>${ht(p.comment, 40)}`));
|
|
1825
2279
|
}
|
|
1826
|
-
return { data:
|
|
2280
|
+
return { data: m.length ? [{
|
|
1827
2281
|
type: "scatter",
|
|
1828
|
-
x:
|
|
1829
|
-
y:
|
|
2282
|
+
x: m,
|
|
2283
|
+
y: d,
|
|
1830
2284
|
mode: "text",
|
|
1831
|
-
text:
|
|
2285
|
+
text: f,
|
|
1832
2286
|
textposition: "middle center",
|
|
1833
2287
|
textfont: { color: s, size: 10 },
|
|
1834
|
-
hovertext:
|
|
2288
|
+
hovertext: h,
|
|
1835
2289
|
hoverinfo: "text",
|
|
1836
2290
|
showlegend: !1
|
|
1837
|
-
}] : [], layout:
|
|
1838
|
-
shapes:
|
|
2291
|
+
}] : [], layout: Pt({
|
|
2292
|
+
shapes: c,
|
|
1839
2293
|
height: 400,
|
|
1840
2294
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1841
2295
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1842
|
-
showlegend: !1
|
|
2296
|
+
showlegend: !1,
|
|
2297
|
+
template: u !== void 0 ? u : Ce
|
|
1843
2298
|
}) };
|
|
1844
2299
|
}
|
|
1845
|
-
function
|
|
2300
|
+
function Zo(e, {
|
|
1846
2301
|
symbolSize: t = 10,
|
|
1847
2302
|
xCol: n = "easting",
|
|
1848
2303
|
yCol: r = "northing"
|
|
1849
2304
|
} = {}) {
|
|
1850
|
-
const o = e[n] != null ? Number(e[n]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[
|
|
2305
|
+
const o = e[n] != null ? Number(e[n]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[U] != null ? Number(e[U]) : null, l = e[G] != null ? Number(e[G]) : null;
|
|
1851
2306
|
if (o === null || i === null || s === null || l === null) return null;
|
|
1852
|
-
const
|
|
2307
|
+
const u = (l - 90 + 360) % 360, a = u * Math.PI / 180, c = l * Math.PI / 180, m = t * Math.sin(a), d = t * Math.cos(a), f = t * 0.4 * (s / 90), h = f * Math.sin(c), b = f * Math.cos(c);
|
|
1853
2308
|
return {
|
|
1854
|
-
strike:
|
|
2309
|
+
strike: u,
|
|
1855
2310
|
dipValue: s,
|
|
1856
2311
|
x: o,
|
|
1857
2312
|
y: i,
|
|
@@ -1859,109 +2314,110 @@ function Lo(e, {
|
|
|
1859
2314
|
strikeY0: i - d,
|
|
1860
2315
|
strikeX1: o + m,
|
|
1861
2316
|
strikeY1: i + d,
|
|
1862
|
-
tickX1: o +
|
|
2317
|
+
tickX1: o + h,
|
|
1863
2318
|
tickY1: i + b
|
|
1864
2319
|
};
|
|
1865
2320
|
}
|
|
1866
|
-
const
|
|
1867
|
-
function
|
|
2321
|
+
const Tt = "markers+line";
|
|
2322
|
+
function ir(e, t) {
|
|
1868
2323
|
var r;
|
|
1869
|
-
const n =
|
|
1870
|
-
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) ||
|
|
1871
|
-
}
|
|
1872
|
-
function
|
|
1873
|
-
const
|
|
1874
|
-
return
|
|
1875
|
-
const
|
|
1876
|
-
if (!
|
|
1877
|
-
const
|
|
1878
|
-
if (!
|
|
1879
|
-
let
|
|
2324
|
+
const n = Ke(e);
|
|
2325
|
+
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) || Tt;
|
|
2326
|
+
}
|
|
2327
|
+
function Ko({ config: e, graph: t, holeOptions: n = [], propertyOptions: r = [], onConfigChange: o, template: i }) {
|
|
2328
|
+
const s = _t(null), l = t == null ? void 0 : t.hole, u = (t == null ? void 0 : t.points) || [], a = (e == null ? void 0 : e.property) || "", c = (e == null ? void 0 : e.chartType) || Tt, m = (e == null ? void 0 : e.holeId) || "", d = (t == null ? void 0 : t.displayType) || (t != null && t.isComment ? Ae : t != null && t.isCategorical ? De : xe), f = Ke(d), h = ir(d, c), [b, _] = ee("");
|
|
2329
|
+
return fe(() => {
|
|
2330
|
+
const p = d === Ae, g = d === We;
|
|
2331
|
+
if (!l || !a || !p && !g && u.length === 0) return;
|
|
2332
|
+
const E = s.current;
|
|
2333
|
+
if (!E) return;
|
|
2334
|
+
let M;
|
|
1880
2335
|
try {
|
|
1881
|
-
|
|
1882
|
-
points:
|
|
1883
|
-
isCategorical:
|
|
1884
|
-
property:
|
|
1885
|
-
chartType:
|
|
2336
|
+
p ? M = or(u, { commentCol: a, fromCol: "from", toCol: "to" }) : g ? M = rr(u) : M = Lt({
|
|
2337
|
+
points: u,
|
|
2338
|
+
isCategorical: d === De,
|
|
2339
|
+
property: a,
|
|
2340
|
+
chartType: h,
|
|
2341
|
+
template: i
|
|
1886
2342
|
});
|
|
1887
|
-
} catch (
|
|
1888
|
-
console.error("Plot build error",
|
|
2343
|
+
} catch (k) {
|
|
2344
|
+
console.error("Plot build error", k), _((k == null ? void 0 : k.message) || "Plot build error");
|
|
1889
2345
|
return;
|
|
1890
2346
|
}
|
|
1891
|
-
if ((!(
|
|
2347
|
+
if ((!(M != null && M.data) || M.data.length === 0) && !p)
|
|
1892
2348
|
return;
|
|
1893
|
-
const
|
|
2349
|
+
const v = {
|
|
1894
2350
|
displayModeBar: !0,
|
|
1895
2351
|
responsive: !0,
|
|
1896
2352
|
useResizeHandler: !0,
|
|
1897
2353
|
modeBarButtonsToRemove: ["select2d", "lasso2d", "autoScale2d"]
|
|
1898
2354
|
};
|
|
1899
2355
|
try {
|
|
1900
|
-
|
|
1901
|
-
|
|
2356
|
+
_(""), Le.react(E, M.data, M.layout, v), requestAnimationFrame(() => {
|
|
2357
|
+
E && E.parentElement && Le.Plots.resize(E);
|
|
1902
2358
|
});
|
|
1903
|
-
} catch (
|
|
1904
|
-
console.error("Plot render error",
|
|
2359
|
+
} catch (k) {
|
|
2360
|
+
console.error("Plot render error", k), _((k == null ? void 0 : k.message) || "Plot render error");
|
|
1905
2361
|
}
|
|
1906
2362
|
return () => {
|
|
1907
|
-
if (
|
|
2363
|
+
if (E)
|
|
1908
2364
|
try {
|
|
1909
|
-
|
|
1910
|
-
} catch (
|
|
1911
|
-
console.warn("Plot purge error",
|
|
2365
|
+
Le.purge(E);
|
|
2366
|
+
} catch (k) {
|
|
2367
|
+
console.warn("Plot purge error", k);
|
|
1912
2368
|
}
|
|
1913
2369
|
};
|
|
1914
|
-
}, [
|
|
1915
|
-
const
|
|
1916
|
-
if (!
|
|
1917
|
-
const
|
|
2370
|
+
}, [l, a, h, d, u, i]), fe(() => {
|
|
2371
|
+
const p = s.current;
|
|
2372
|
+
if (!p || typeof ResizeObserver > "u") return;
|
|
2373
|
+
const g = new ResizeObserver(() => {
|
|
1918
2374
|
try {
|
|
1919
|
-
|
|
1920
|
-
} catch (
|
|
1921
|
-
console.warn("Plot resize error",
|
|
2375
|
+
p && p.data && Le.Plots.resize(p);
|
|
2376
|
+
} catch (E) {
|
|
2377
|
+
console.warn("Plot resize error", E);
|
|
1922
2378
|
}
|
|
1923
2379
|
});
|
|
1924
|
-
return
|
|
1925
|
-
}, []), !
|
|
2380
|
+
return g.observe(p), () => g.disconnect();
|
|
2381
|
+
}, []), !l || !a ? /* @__PURE__ */ $("div", { className: "plot-card empty", children: /* @__PURE__ */ $("div", { className: "placeholder", children: e != null && e.holeId ? t != null && t.loading ? `Loading ${e.holeId}...` : "Select a property" : "Loading demo data..." }) }) : d !== Ae && d !== We && u.length === 0 ? /* @__PURE__ */ $("div", { className: "plot-card empty", children: /* @__PURE__ */ $("div", { className: "placeholder", children: "No data" }) }) : b ? /* @__PURE__ */ $("div", { className: "plot-card empty", children: /* @__PURE__ */ te("div", { className: "placeholder", children: [
|
|
1926
2382
|
"Plot error: ",
|
|
1927
|
-
|
|
1928
|
-
] }) }) : /* @__PURE__ */
|
|
2383
|
+
b
|
|
2384
|
+
] }) }) : /* @__PURE__ */ te("div", { className: "plot-card", children: [
|
|
1929
2385
|
/* @__PURE__ */ $("div", { className: "plot-title", children: /* @__PURE__ */ $(
|
|
1930
2386
|
"select",
|
|
1931
2387
|
{
|
|
1932
2388
|
className: "plot-select",
|
|
1933
|
-
value:
|
|
1934
|
-
onChange: (
|
|
1935
|
-
children: n.map((
|
|
1936
|
-
const
|
|
1937
|
-
return /* @__PURE__ */ $("option", { value:
|
|
2389
|
+
value: m,
|
|
2390
|
+
onChange: (p) => o && o({ holeId: p.target.value }),
|
|
2391
|
+
children: n.map((p) => {
|
|
2392
|
+
const g = typeof p == "string" ? p : p.holeId, E = typeof p == "string" ? p : p.label || p.holeId;
|
|
2393
|
+
return /* @__PURE__ */ $("option", { value: g, children: E }, g);
|
|
1938
2394
|
})
|
|
1939
2395
|
}
|
|
1940
2396
|
) }),
|
|
1941
|
-
/* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ te("div", { className: "plot-controls column", children: [
|
|
1942
2398
|
r.length > 0 && /* @__PURE__ */ $(
|
|
1943
2399
|
"select",
|
|
1944
2400
|
{
|
|
1945
2401
|
className: "plot-select",
|
|
1946
|
-
value:
|
|
1947
|
-
onChange: (
|
|
1948
|
-
children: r.map((
|
|
2402
|
+
value: a,
|
|
2403
|
+
onChange: (p) => o && o({ property: p.target.value }),
|
|
2404
|
+
children: r.map((p) => /* @__PURE__ */ $("option", { value: p, children: p }, p))
|
|
1949
2405
|
}
|
|
1950
2406
|
),
|
|
1951
|
-
|
|
2407
|
+
f.length > 1 && /* @__PURE__ */ $(
|
|
1952
2408
|
"select",
|
|
1953
2409
|
{
|
|
1954
2410
|
className: "plot-select",
|
|
1955
|
-
value:
|
|
1956
|
-
onChange: (
|
|
1957
|
-
children:
|
|
2411
|
+
value: h,
|
|
2412
|
+
onChange: (p) => o && o({ chartType: p.target.value }),
|
|
2413
|
+
children: f.map((p) => /* @__PURE__ */ $("option", { value: p.value, children: p.label }, p.value))
|
|
1958
2414
|
}
|
|
1959
2415
|
)
|
|
1960
2416
|
] }),
|
|
1961
|
-
/* @__PURE__ */ $("div", { className: "plotly-chart", ref:
|
|
2417
|
+
/* @__PURE__ */ $("div", { className: "plotly-chart", ref: s })
|
|
1962
2418
|
] });
|
|
1963
2419
|
}
|
|
1964
|
-
function
|
|
2420
|
+
function pt(e, t) {
|
|
1965
2421
|
if (!(t != null && t.length)) return e;
|
|
1966
2422
|
const n = new Map(e.map((r) => [r.id || r.holeId, { ...r }]));
|
|
1967
2423
|
for (const r of t) {
|
|
@@ -1975,7 +2431,7 @@ function mt(e, t) {
|
|
|
1975
2431
|
}
|
|
1976
2432
|
return Array.from(n.values());
|
|
1977
2433
|
}
|
|
1978
|
-
function
|
|
2434
|
+
function sr(e, t) {
|
|
1979
2435
|
if (!e || !t) return [];
|
|
1980
2436
|
const n = /* @__PURE__ */ new Set(), r = [];
|
|
1981
2437
|
for (const o of e.points || []) {
|
|
@@ -1986,146 +2442,146 @@ function Xn(e, t) {
|
|
|
1986
2442
|
}
|
|
1987
2443
|
return r;
|
|
1988
2444
|
}
|
|
1989
|
-
function
|
|
2445
|
+
function Jo({
|
|
1990
2446
|
initialFocusedHoleId: e = "",
|
|
1991
2447
|
sourceFile: t = null,
|
|
1992
2448
|
extraHoles: n = [],
|
|
1993
2449
|
plotCount: r = 4
|
|
1994
2450
|
} = {}) {
|
|
1995
|
-
const [o, i] =
|
|
1996
|
-
|
|
1997
|
-
!t ||
|
|
1998
|
-
if (!
|
|
1999
|
-
const
|
|
2000
|
-
l(
|
|
2001
|
-
holeIds:
|
|
2002
|
-
focusedHoleId:
|
|
2451
|
+
const [o, i] = ee([]), [s, l] = ee([]), [u, a] = ee([]), [c, m] = ee([]), [d, f] = ee([]), [h, b] = ee({}), [_, p] = ee(""), [g, E] = ee([]), [M, v] = ee(""), [k, F] = ee(e || ""), [T, L] = ee([]), Y = _t(null);
|
|
2452
|
+
fe(() => {
|
|
2453
|
+
!t || Y.current === t || (Y.current = t, yn(t).then((I) => {
|
|
2454
|
+
if (!I) return;
|
|
2455
|
+
const A = Array.from(new Map(I.map((N) => [N.holeId, N])).values());
|
|
2456
|
+
l(A), E(It({
|
|
2457
|
+
holeIds: A.map((N) => N.holeId),
|
|
2458
|
+
focusedHoleId: k,
|
|
2003
2459
|
plotCount: r,
|
|
2004
2460
|
defaultProp: "",
|
|
2005
|
-
categoricalProps:
|
|
2461
|
+
categoricalProps: c,
|
|
2006
2462
|
commentProps: d,
|
|
2007
2463
|
numericDefaultChartType: "markers+line"
|
|
2008
2464
|
}));
|
|
2009
|
-
}).catch((
|
|
2010
|
-
console.info("Assay metadata load skipped:",
|
|
2465
|
+
}).catch((I) => {
|
|
2466
|
+
console.info("Assay metadata load skipped:", I.message);
|
|
2011
2467
|
}));
|
|
2012
|
-
}, [t,
|
|
2468
|
+
}, [t, k, r, c, d]), fe(() => {
|
|
2013
2469
|
if (!(n != null && n.length)) return;
|
|
2014
|
-
const
|
|
2015
|
-
l((
|
|
2016
|
-
const
|
|
2017
|
-
return
|
|
2470
|
+
const I = n.map((A) => ({ holeId: A.id || A.holeId })).filter((A) => A.holeId);
|
|
2471
|
+
l((A) => {
|
|
2472
|
+
const N = new Set(A.map((x) => x.holeId)), O = I.filter((x) => !N.has(x.holeId));
|
|
2473
|
+
return O.length ? [...A, ...O] : A;
|
|
2018
2474
|
});
|
|
2019
|
-
}, [n]),
|
|
2020
|
-
|
|
2021
|
-
}, [g]),
|
|
2475
|
+
}, [n]), fe(() => {
|
|
2476
|
+
v((I) => I && I.startsWith("Loading ") && I.includes(" for hole ") ? I : "");
|
|
2477
|
+
}, [g]), fe(() => {
|
|
2022
2478
|
if (!s.length) {
|
|
2023
|
-
|
|
2479
|
+
E([]);
|
|
2024
2480
|
return;
|
|
2025
2481
|
}
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2028
|
-
var
|
|
2029
|
-
const V = x
|
|
2030
|
-
property:
|
|
2482
|
+
const I = xt(s.map((A) => A.holeId), k);
|
|
2483
|
+
E((A) => Array.from({ length: r }).map((O, x) => {
|
|
2484
|
+
var K;
|
|
2485
|
+
const V = A[x] || {}, H = s.some((ie) => ie.holeId === V.holeId) ? V.holeId : I[x] || ((K = s[x]) == null ? void 0 : K.holeId) || "", B = V.property || _, X = Pe({
|
|
2486
|
+
property: B,
|
|
2031
2487
|
chartType: V.chartType,
|
|
2032
|
-
categoricalProps:
|
|
2488
|
+
categoricalProps: c,
|
|
2033
2489
|
commentProps: d,
|
|
2034
2490
|
numericDefaultChartType: "markers+line"
|
|
2035
2491
|
});
|
|
2036
|
-
return { holeId:
|
|
2492
|
+
return { holeId: H, property: B, chartType: X };
|
|
2037
2493
|
}));
|
|
2038
|
-
}, [s,
|
|
2494
|
+
}, [s, k, _, c, d, r]), fe(() => {
|
|
2039
2495
|
if (!t) return;
|
|
2040
|
-
g.map((
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
const
|
|
2045
|
-
[...V.filter((
|
|
2496
|
+
g.map((A) => A.holeId).filter(Boolean).forEach((A) => {
|
|
2497
|
+
const N = o.some((x) => (x.id || x.holeId) === A), O = T.includes(A);
|
|
2498
|
+
N || O || (L((x) => [...x, A]), _n(t, A).then((x) => {
|
|
2499
|
+
L((V) => V.filter((H) => H !== A)), x && i((V) => {
|
|
2500
|
+
const H = pt(
|
|
2501
|
+
[...V.filter((X) => (X.id || X.holeId) !== A), x],
|
|
2046
2502
|
n
|
|
2047
|
-
),
|
|
2048
|
-
return a(
|
|
2049
|
-
...
|
|
2050
|
-
property:
|
|
2051
|
-
chartType:
|
|
2052
|
-
property:
|
|
2053
|
-
chartType:
|
|
2054
|
-
categoricalProps:
|
|
2055
|
-
commentProps:
|
|
2503
|
+
), B = we(H);
|
|
2504
|
+
return a(B.numericProps), m(B.categoricalProps), f(B.commentProps), b(B.columnMeta), !_ && B.defaultProp && (p(B.defaultProp), E((X) => X.map((K) => ({
|
|
2505
|
+
...K,
|
|
2506
|
+
property: K.property || B.defaultProp,
|
|
2507
|
+
chartType: Pe({
|
|
2508
|
+
property: K.property || B.defaultProp,
|
|
2509
|
+
chartType: K.chartType,
|
|
2510
|
+
categoricalProps: B.categoricalProps,
|
|
2511
|
+
commentProps: B.commentProps,
|
|
2056
2512
|
numericDefaultChartType: "markers+line"
|
|
2057
2513
|
})
|
|
2058
|
-
})))),
|
|
2514
|
+
})))), H;
|
|
2059
2515
|
});
|
|
2060
|
-
}).catch((
|
|
2061
|
-
console.error(
|
|
2516
|
+
}).catch((x) => {
|
|
2517
|
+
console.error(x), L((V) => V.filter((H) => H !== A)), v(x.message || `Error loading hole ${A}`);
|
|
2062
2518
|
}));
|
|
2063
2519
|
});
|
|
2064
|
-
}, [g, t, o,
|
|
2065
|
-
n != null && n.length && i((
|
|
2066
|
-
if (!
|
|
2067
|
-
const
|
|
2068
|
-
return a(
|
|
2520
|
+
}, [g, t, o, T, _, n]), fe(() => {
|
|
2521
|
+
n != null && n.length && i((I) => {
|
|
2522
|
+
if (!I.length) {
|
|
2523
|
+
const O = we(n);
|
|
2524
|
+
return a(O.numericProps), m(O.categoricalProps), f(O.commentProps), b(O.columnMeta), !_ && O.defaultProp && p(O.defaultProp), n;
|
|
2069
2525
|
}
|
|
2070
|
-
const
|
|
2071
|
-
return a(
|
|
2526
|
+
const A = pt(I, n), N = we(A);
|
|
2527
|
+
return a(N.numericProps), m(N.categoricalProps), f(N.commentProps), b(N.columnMeta), !_ && N.defaultProp && p(N.defaultProp), A;
|
|
2072
2528
|
});
|
|
2073
2529
|
}, [n]);
|
|
2074
|
-
const
|
|
2075
|
-
() => [...
|
|
2076
|
-
[
|
|
2077
|
-
),
|
|
2078
|
-
() => s.map((
|
|
2530
|
+
const Z = Re(
|
|
2531
|
+
() => [...u, ...c, ...d],
|
|
2532
|
+
[u, c, d]
|
|
2533
|
+
), w = Re(
|
|
2534
|
+
() => s.map((I) => ({ holeId: I.holeId, label: I.holeId })).sort((I, A) => I.label.localeCompare(A.label)),
|
|
2079
2535
|
[s]
|
|
2080
|
-
),
|
|
2081
|
-
const
|
|
2082
|
-
return Array.from({ length: r }).map((
|
|
2083
|
-
const
|
|
2084
|
-
let
|
|
2085
|
-
|
|
2086
|
-
const
|
|
2536
|
+
), q = Re(() => {
|
|
2537
|
+
const I = [...u, ...c, ...d];
|
|
2538
|
+
return Array.from({ length: r }).map((A, N) => {
|
|
2539
|
+
const O = g[N] || {}, x = o.find((me) => (me.id || me.holeId) === O.holeId) || null, V = x ? I.filter((me) => Jn(x, me)) : I;
|
|
2540
|
+
let H = O.property || _;
|
|
2541
|
+
x && !V.includes(H) && (H = V[0] || H);
|
|
2542
|
+
const B = d.includes(H), X = !B && c.includes(H), K = !B && !X && H === "dip", ie = B ? "comment" : K ? "tadpole" : X ? "categorical" : "numeric", ge = K ? "tadpole" : O.chartType || (B ? "comment" : X ? "categorical" : "markers+line"), de = O.holeId || (x == null ? void 0 : x.id) || (x == null ? void 0 : x.holeId) || "", ve = K ? (x == null ? void 0 : x.points) || [] : B ? sr(x, H) : Qn(x, H, X);
|
|
2087
2543
|
return {
|
|
2088
|
-
config: { holeId:
|
|
2089
|
-
hole:
|
|
2090
|
-
loading:
|
|
2091
|
-
isCategorical:
|
|
2092
|
-
isComment:
|
|
2093
|
-
isTadpole:
|
|
2094
|
-
displayType:
|
|
2544
|
+
config: { holeId: de, property: H, chartType: ge },
|
|
2545
|
+
hole: x,
|
|
2546
|
+
loading: T.includes(O.holeId),
|
|
2547
|
+
isCategorical: X,
|
|
2548
|
+
isComment: B,
|
|
2549
|
+
isTadpole: K,
|
|
2550
|
+
displayType: ie,
|
|
2095
2551
|
points: ve,
|
|
2096
2552
|
propertyOptions: V,
|
|
2097
|
-
label:
|
|
2553
|
+
label: de
|
|
2098
2554
|
};
|
|
2099
2555
|
});
|
|
2100
|
-
}, [g, o,
|
|
2101
|
-
|
|
2102
|
-
const
|
|
2103
|
-
return
|
|
2104
|
-
property:
|
|
2556
|
+
}, [g, o, _, c, d, T, r, u]), R = (I, A) => {
|
|
2557
|
+
E((N) => {
|
|
2558
|
+
const O = [...N], V = { ...O[I] || {}, ...A };
|
|
2559
|
+
return A.property && (V.chartType = Pe({
|
|
2560
|
+
property: A.property,
|
|
2105
2561
|
chartType: V.chartType,
|
|
2106
|
-
categoricalProps:
|
|
2562
|
+
categoricalProps: c,
|
|
2107
2563
|
commentProps: d,
|
|
2108
2564
|
numericDefaultChartType: "markers+line"
|
|
2109
|
-
})),
|
|
2565
|
+
})), O[I] = V, O;
|
|
2110
2566
|
});
|
|
2111
2567
|
};
|
|
2112
2568
|
return {
|
|
2113
2569
|
error: M,
|
|
2114
|
-
focusedHoleId:
|
|
2115
|
-
setFocusedHoleId:
|
|
2116
|
-
setError:
|
|
2570
|
+
focusedHoleId: k,
|
|
2571
|
+
setFocusedHoleId: F,
|
|
2572
|
+
setError: v,
|
|
2117
2573
|
holeCount: s.length,
|
|
2118
|
-
numericProps:
|
|
2119
|
-
categoricalProps:
|
|
2574
|
+
numericProps: u,
|
|
2575
|
+
categoricalProps: c,
|
|
2120
2576
|
commentProps: d,
|
|
2121
|
-
columnMeta:
|
|
2122
|
-
propertyOptions:
|
|
2123
|
-
labeledHoleOptions:
|
|
2124
|
-
traceGraphs:
|
|
2125
|
-
handleConfigChange:
|
|
2577
|
+
columnMeta: h,
|
|
2578
|
+
propertyOptions: Z,
|
|
2579
|
+
labeledHoleOptions: w,
|
|
2580
|
+
traceGraphs: q,
|
|
2581
|
+
handleConfigChange: R
|
|
2126
2582
|
};
|
|
2127
2583
|
}
|
|
2128
|
-
const
|
|
2584
|
+
const lr = [
|
|
2129
2585
|
"#313695",
|
|
2130
2586
|
"#4575b4",
|
|
2131
2587
|
"#74add1",
|
|
@@ -2137,7 +2593,7 @@ const Wn = [
|
|
|
2137
2593
|
"#d73027",
|
|
2138
2594
|
"#a50026"
|
|
2139
2595
|
];
|
|
2140
|
-
function
|
|
2596
|
+
function ar(e = [], t = lr) {
|
|
2141
2597
|
const n = e.filter((a) => Number.isFinite(a));
|
|
2142
2598
|
if (!n.length)
|
|
2143
2599
|
return {
|
|
@@ -2147,9 +2603,9 @@ function Zn(e = [], t = Wn) {
|
|
|
2147
2603
|
bins: [],
|
|
2148
2604
|
colors: t
|
|
2149
2605
|
};
|
|
2150
|
-
const r = n.slice().sort((a,
|
|
2606
|
+
const r = n.slice().sort((a, c) => a - c), o = r[0], i = r[r.length - 1], s = t.length;
|
|
2151
2607
|
if (i === o) {
|
|
2152
|
-
const a = t.map((
|
|
2608
|
+
const a = t.map((c, m) => ({
|
|
2153
2609
|
index: m,
|
|
2154
2610
|
min: o,
|
|
2155
2611
|
max: i,
|
|
@@ -2163,28 +2619,28 @@ function Zn(e = [], t = Wn) {
|
|
|
2163
2619
|
colors: t
|
|
2164
2620
|
};
|
|
2165
2621
|
}
|
|
2166
|
-
const l = t.map((a,
|
|
2167
|
-
const m =
|
|
2622
|
+
const l = t.map((a, c) => {
|
|
2623
|
+
const m = c / s, d = (c + 1) / s, f = Math.floor(m * r.length), h = Math.min(r.length - 1, Math.floor(d * r.length)), b = r[f], _ = c === s - 1 ? i : r[h];
|
|
2168
2624
|
return {
|
|
2169
|
-
index:
|
|
2625
|
+
index: c,
|
|
2170
2626
|
min: b,
|
|
2171
|
-
max:
|
|
2172
|
-
label:
|
|
2627
|
+
max: _,
|
|
2628
|
+
label: cr(b, _)
|
|
2173
2629
|
};
|
|
2174
|
-
}),
|
|
2630
|
+
}), u = (i - o) / s;
|
|
2175
2631
|
return {
|
|
2176
2632
|
min: o,
|
|
2177
2633
|
max: i,
|
|
2178
|
-
step:
|
|
2634
|
+
step: u,
|
|
2179
2635
|
bins: l,
|
|
2180
2636
|
colors: t
|
|
2181
2637
|
};
|
|
2182
2638
|
}
|
|
2183
|
-
function
|
|
2639
|
+
function cr(e, t) {
|
|
2184
2640
|
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";
|
|
2185
2641
|
return `${n(e)} – ${n(t)}`;
|
|
2186
2642
|
}
|
|
2187
|
-
function
|
|
2643
|
+
function wt(e, t) {
|
|
2188
2644
|
if (!Number.isFinite(e) || !t || !Array.isArray(t.bins) || !t.bins.length)
|
|
2189
2645
|
return -1;
|
|
2190
2646
|
if (t.max === t.min)
|
|
@@ -2196,43 +2652,43 @@ function Ot(e, t) {
|
|
|
2196
2652
|
}
|
|
2197
2653
|
return -1;
|
|
2198
2654
|
}
|
|
2199
|
-
function
|
|
2200
|
-
const r =
|
|
2655
|
+
function ur(e, t, n = "#8b1e3f") {
|
|
2656
|
+
const r = wt(e, t);
|
|
2201
2657
|
return r < 0 ? n : t.colors[r] || n;
|
|
2202
2658
|
}
|
|
2203
|
-
function
|
|
2659
|
+
function Bt(e) {
|
|
2204
2660
|
return Array.isArray(e) ? e : [];
|
|
2205
2661
|
}
|
|
2206
|
-
function
|
|
2662
|
+
function Ye(e) {
|
|
2207
2663
|
const t = Number(e);
|
|
2208
2664
|
return Number.isFinite(t) ? t : void 0;
|
|
2209
2665
|
}
|
|
2210
|
-
function
|
|
2666
|
+
function $t(e = {}) {
|
|
2211
2667
|
return {
|
|
2212
2668
|
...e,
|
|
2213
|
-
x:
|
|
2214
|
-
y:
|
|
2215
|
-
z:
|
|
2669
|
+
x: Ye(e.x),
|
|
2670
|
+
y: Ye(e.y),
|
|
2671
|
+
z: Ye(e.z)
|
|
2216
2672
|
};
|
|
2217
2673
|
}
|
|
2218
|
-
function
|
|
2674
|
+
function dr(e = [], t = [0, 0], n = 0) {
|
|
2219
2675
|
const [r, o] = t, i = Number(n) * Math.PI / 180, s = Math.cos(i), l = Math.sin(i);
|
|
2220
|
-
return
|
|
2221
|
-
if (!Number.isFinite(
|
|
2222
|
-
const a =
|
|
2676
|
+
return Bt(e).map($t).map((u) => {
|
|
2677
|
+
if (!Number.isFinite(u.x) || !Number.isFinite(u.y)) return { ...u };
|
|
2678
|
+
const a = u.x - r, c = u.y - o;
|
|
2223
2679
|
return {
|
|
2224
|
-
...
|
|
2225
|
-
along: a * l +
|
|
2226
|
-
across: a * s -
|
|
2680
|
+
...u,
|
|
2681
|
+
along: a * l + c * s,
|
|
2682
|
+
across: a * s - c * l
|
|
2227
2683
|
};
|
|
2228
2684
|
});
|
|
2229
2685
|
}
|
|
2230
|
-
function
|
|
2231
|
-
const o =
|
|
2686
|
+
function mr(e = [], t = [0, 0], n = 0, r = 50) {
|
|
2687
|
+
const o = dr(e, t, n), i = 0.5 * Number(r || 0);
|
|
2232
2688
|
return !Number.isFinite(i) || i <= 0 ? o : o.filter((s) => Number.isFinite(s.across) && Math.abs(s.across) <= i);
|
|
2233
2689
|
}
|
|
2234
|
-
function
|
|
2235
|
-
let r =
|
|
2690
|
+
function Qo(e = [], t = null, n = null) {
|
|
2691
|
+
let r = Bt(e).map($t);
|
|
2236
2692
|
if (Array.isArray(t) && t.length === 2) {
|
|
2237
2693
|
const [o, i] = t;
|
|
2238
2694
|
r = r.filter((s) => Number.isFinite(s.z) && s.z <= Number(o) && s.z >= Number(i));
|
|
@@ -2242,46 +2698,46 @@ function $o(e = [], t = null, n = null) {
|
|
|
2242
2698
|
color_value: o == null ? void 0 : o[n]
|
|
2243
2699
|
}))), r;
|
|
2244
2700
|
}
|
|
2245
|
-
function
|
|
2246
|
-
let i =
|
|
2701
|
+
function ei(e = [], t = [0, 0], n = 0, r = 50, o = null) {
|
|
2702
|
+
let i = mr(e, t, n, r);
|
|
2247
2703
|
return o && (i = i.map((s) => ({
|
|
2248
2704
|
...s,
|
|
2249
2705
|
color_value: s == null ? void 0 : s[o]
|
|
2250
2706
|
}))), i;
|
|
2251
2707
|
}
|
|
2252
|
-
function
|
|
2708
|
+
function et(e) {
|
|
2253
2709
|
return Array.isArray(e) ? e : [];
|
|
2254
2710
|
}
|
|
2255
|
-
function
|
|
2711
|
+
function tt(e = {}) {
|
|
2256
2712
|
return e.hole_id ?? e.holeId ?? e.id;
|
|
2257
2713
|
}
|
|
2258
|
-
function
|
|
2714
|
+
function _e(e, t = void 0) {
|
|
2259
2715
|
const n = Number(e);
|
|
2260
2716
|
return Number.isFinite(n) ? n : t;
|
|
2261
2717
|
}
|
|
2262
|
-
function
|
|
2718
|
+
function ti(e = [], t = null) {
|
|
2263
2719
|
const n = /* @__PURE__ */ new Map();
|
|
2264
|
-
|
|
2265
|
-
const i =
|
|
2720
|
+
et(e).forEach((o) => {
|
|
2721
|
+
const i = tt(o);
|
|
2266
2722
|
if (i == null || `${i}`.trim() === "") return;
|
|
2267
2723
|
const s = `${i}`;
|
|
2268
2724
|
n.has(s) || n.set(s, []), n.get(s).push(o);
|
|
2269
2725
|
});
|
|
2270
2726
|
const r = [];
|
|
2271
2727
|
return n.forEach((o, i) => {
|
|
2272
|
-
const s = [...o].sort((
|
|
2728
|
+
const s = [...o].sort((u, a) => _e(u.md, 0) - _e(a.md, 0)), l = {
|
|
2273
2729
|
hole_id: i,
|
|
2274
|
-
x: s.map((
|
|
2275
|
-
y: s.map((
|
|
2276
|
-
z: s.map((
|
|
2730
|
+
x: s.map((u) => _e(u.x, 0)),
|
|
2731
|
+
y: s.map((u) => _e(u.y, 0)),
|
|
2732
|
+
z: s.map((u) => _e(u.z, 0)),
|
|
2277
2733
|
color: null
|
|
2278
2734
|
};
|
|
2279
|
-
t && (l.color = s.map((
|
|
2735
|
+
t && (l.color = s.map((u) => u == null ? void 0 : u[t])), r.push(l);
|
|
2280
2736
|
}), r;
|
|
2281
2737
|
}
|
|
2282
|
-
function
|
|
2283
|
-
return
|
|
2284
|
-
hole_id:
|
|
2738
|
+
function ni(e = [], t = 1, n = null) {
|
|
2739
|
+
return et(e).map((r) => ({
|
|
2740
|
+
hole_id: tt(r),
|
|
2285
2741
|
from: r == null ? void 0 : r.from,
|
|
2286
2742
|
to: r == null ? void 0 : r.to,
|
|
2287
2743
|
radius: t,
|
|
@@ -2289,21 +2745,21 @@ function Ho(e = [], t = 1, n = null) {
|
|
|
2289
2745
|
value: n ? r == null ? void 0 : r[n] : null
|
|
2290
2746
|
}));
|
|
2291
2747
|
}
|
|
2292
|
-
function
|
|
2293
|
-
return t ?
|
|
2294
|
-
hole_id:
|
|
2748
|
+
function ri(e = [], t = null) {
|
|
2749
|
+
return t ? et(e).filter((n) => Object.prototype.hasOwnProperty.call(n || {}, t)).map((n) => ({
|
|
2750
|
+
hole_id: tt(n),
|
|
2295
2751
|
label: n == null ? void 0 : n[t],
|
|
2296
|
-
depth: 0.5 * (
|
|
2752
|
+
depth: 0.5 * (_e(n == null ? void 0 : n.from, 0) + _e(n == null ? void 0 : n.to, 0))
|
|
2297
2753
|
})) : [];
|
|
2298
2754
|
}
|
|
2299
|
-
function
|
|
2755
|
+
function Ne(e) {
|
|
2300
2756
|
e.selectables = [
|
|
2301
2757
|
...e.blocks,
|
|
2302
2758
|
...e.drillMeshes,
|
|
2303
2759
|
...e.structuralMeshes
|
|
2304
2760
|
];
|
|
2305
2761
|
}
|
|
2306
|
-
const
|
|
2762
|
+
const fr = {
|
|
2307
2763
|
bedding: "#2563eb",
|
|
2308
2764
|
foliation: "#16a34a",
|
|
2309
2765
|
joint: "#9333ea",
|
|
@@ -2312,11 +2768,11 @@ const tr = {
|
|
|
2312
2768
|
"shear zone": "#0ea5e9",
|
|
2313
2769
|
"fault zone": "#ef4444"
|
|
2314
2770
|
};
|
|
2315
|
-
function
|
|
2316
|
-
const n = t ||
|
|
2771
|
+
function hr(e, t) {
|
|
2772
|
+
const n = t || fr, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
|
|
2317
2773
|
return new y.Color(o).getHex();
|
|
2318
2774
|
}
|
|
2319
|
-
function
|
|
2775
|
+
function pr(e, t) {
|
|
2320
2776
|
const n = e * Math.PI / 180, r = t * Math.PI / 180;
|
|
2321
2777
|
return new y.Vector3(
|
|
2322
2778
|
Math.sin(r) * Math.sin(n),
|
|
@@ -2327,68 +2783,68 @@ function rr(e, t) {
|
|
|
2327
2783
|
// Up component
|
|
2328
2784
|
).normalize();
|
|
2329
2785
|
}
|
|
2330
|
-
function
|
|
2786
|
+
function br(e, t = {}) {
|
|
2331
2787
|
const {
|
|
2332
2788
|
radius: n = 5,
|
|
2333
2789
|
discThickness: r = 0.2,
|
|
2334
2790
|
opacity: o = 0.7,
|
|
2335
2791
|
segments: i = 32,
|
|
2336
2792
|
colorMap: s = null
|
|
2337
|
-
} = t, l = new y.Group(),
|
|
2793
|
+
} = t, l = new y.Group(), u = new y.Vector3(0, 1, 0);
|
|
2338
2794
|
for (const a of e) {
|
|
2339
|
-
const
|
|
2340
|
-
if (
|
|
2341
|
-
const f = a[
|
|
2795
|
+
const c = a.x != null ? a.x : a.easting != null ? a.easting : null, m = a.y != null ? a.y : a.northing != null ? a.northing : null, d = a.z != null ? a.z : a.elevation != null ? a.elevation : null;
|
|
2796
|
+
if (c == null || m == null || d == null || !Number.isFinite(c) || !Number.isFinite(m) || !Number.isFinite(d)) continue;
|
|
2797
|
+
const f = a[U] != null ? Number(a[U]) : null, h = a[G] != null ? Number(a[G]) : null;
|
|
2342
2798
|
let b;
|
|
2343
2799
|
if (a.nx != null && Number.isFinite(a.nx) && a.ny != null && Number.isFinite(a.ny) && a.nz != null && Number.isFinite(a.nz))
|
|
2344
2800
|
b = new y.Vector3(a.nx, a.ny, a.nz).normalize();
|
|
2345
2801
|
else {
|
|
2346
|
-
if (f == null ||
|
|
2347
|
-
b =
|
|
2802
|
+
if (f == null || h == null || !Number.isFinite(f) || !Number.isFinite(h)) continue;
|
|
2803
|
+
b = pr(f, h);
|
|
2348
2804
|
}
|
|
2349
|
-
const
|
|
2350
|
-
color:
|
|
2805
|
+
const _ = new y.CylinderGeometry(n, n, r, i, 1, !1), p = new y.MeshStandardMaterial({
|
|
2806
|
+
color: hr(a.structure_type, s),
|
|
2351
2807
|
transparent: !0,
|
|
2352
2808
|
opacity: o,
|
|
2353
2809
|
side: y.DoubleSide
|
|
2354
|
-
}), g = new y.Mesh(
|
|
2355
|
-
g.position.set(
|
|
2810
|
+
}), g = new y.Mesh(_, p);
|
|
2811
|
+
g.position.set(c, m, d), g.quaternion.setFromUnitVectors(u, b), g.userData = {
|
|
2356
2812
|
type: "structure",
|
|
2357
2813
|
hole_id: a.hole_id,
|
|
2358
2814
|
depth: a.depth ?? a.mid,
|
|
2359
2815
|
structure_type: a.structure_type,
|
|
2360
2816
|
dip: f,
|
|
2361
|
-
azimuth:
|
|
2817
|
+
azimuth: h,
|
|
2362
2818
|
comments: a.comments
|
|
2363
2819
|
}, l.add(g);
|
|
2364
2820
|
}
|
|
2365
2821
|
return l;
|
|
2366
2822
|
}
|
|
2367
|
-
function
|
|
2368
|
-
if (!e.scene || (
|
|
2823
|
+
function gr(e, t, n, r = {}) {
|
|
2824
|
+
if (!e.scene || (Vt(e), !(t != null && t.length) || !(n != null && n.length))) return;
|
|
2369
2825
|
const { maxDiscs: o = 3e3 } = r;
|
|
2370
2826
|
let i = t;
|
|
2371
2827
|
if (i.length > o) {
|
|
2372
|
-
const
|
|
2373
|
-
for (let
|
|
2374
|
-
a.push(i[Math.floor(
|
|
2828
|
+
const u = i.length / o, a = [];
|
|
2829
|
+
for (let c = 0; c < o; c++)
|
|
2830
|
+
a.push(i[Math.floor(c * u)]);
|
|
2375
2831
|
i = a;
|
|
2376
2832
|
}
|
|
2377
|
-
const s = n.flatMap((
|
|
2378
|
-
l.length && (e.structuralGroup =
|
|
2379
|
-
|
|
2380
|
-
}),
|
|
2833
|
+
const s = n.flatMap((u) => (u.points || []).map((a) => ({ ...a, hole_id: u.id }))), l = Vn(i, s, r);
|
|
2834
|
+
l.length && (e.structuralGroup = br(l, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((u) => {
|
|
2835
|
+
u.isMesh && e.structuralMeshes.push(u);
|
|
2836
|
+
}), Ne(e));
|
|
2381
2837
|
}
|
|
2382
|
-
function
|
|
2838
|
+
function Vt(e) {
|
|
2383
2839
|
e.structuralGroup && (e.scene.remove(e.structuralGroup), e.structuralGroup.traverse((t) => {
|
|
2384
2840
|
t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
2385
|
-
}), e.structuralGroup = null), e.structuralMeshes = [],
|
|
2841
|
+
}), e.structuralGroup = null), e.structuralMeshes = [], Ne(e);
|
|
2386
2842
|
}
|
|
2387
|
-
function
|
|
2843
|
+
function yr(e, t) {
|
|
2388
2844
|
e.structuralGroup && (e.structuralGroup.visible = !!t);
|
|
2389
2845
|
}
|
|
2390
|
-
function
|
|
2391
|
-
var n, r, o, i, s, l,
|
|
2846
|
+
function nt(e) {
|
|
2847
|
+
var n, r, o, i, s, l, u, a, c;
|
|
2392
2848
|
if (!e) return "";
|
|
2393
2849
|
const t = (m) => Number.isFinite(m) ? m.toFixed(3) : "nan";
|
|
2394
2850
|
return [
|
|
@@ -2398,12 +2854,12 @@ function Ke(e) {
|
|
|
2398
2854
|
t((i = e.target) == null ? void 0 : i.x),
|
|
2399
2855
|
t((s = e.target) == null ? void 0 : s.y),
|
|
2400
2856
|
t((l = e.target) == null ? void 0 : l.z),
|
|
2401
|
-
t((
|
|
2857
|
+
t((u = e.up) == null ? void 0 : u.x),
|
|
2402
2858
|
t((a = e.up) == null ? void 0 : a.y),
|
|
2403
|
-
t((
|
|
2859
|
+
t((c = e.up) == null ? void 0 : c.z)
|
|
2404
2860
|
].join("|");
|
|
2405
2861
|
}
|
|
2406
|
-
function
|
|
2862
|
+
function Ht(e) {
|
|
2407
2863
|
return !e.camera || !e.controls ? null : {
|
|
2408
2864
|
camera: {
|
|
2409
2865
|
x: e.camera.position.x,
|
|
@@ -2422,37 +2878,37 @@ function $t(e) {
|
|
|
2422
2878
|
}
|
|
2423
2879
|
};
|
|
2424
2880
|
}
|
|
2425
|
-
function
|
|
2881
|
+
function _r(e, t) {
|
|
2426
2882
|
if (!e.camera || !e.controls || !t) return !1;
|
|
2427
2883
|
const n = t.camera || {}, r = t.target || {}, o = t.up || {};
|
|
2428
|
-
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 =
|
|
2884
|
+
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 = nt(t), !0) : !1;
|
|
2429
2885
|
}
|
|
2430
|
-
function
|
|
2886
|
+
function Nr(e) {
|
|
2431
2887
|
if (!e.viewChangeHandler) return;
|
|
2432
2888
|
const t = Date.now();
|
|
2433
2889
|
if (t - e._lastViewEmitMs < 250) return;
|
|
2434
|
-
const n =
|
|
2890
|
+
const n = Ht(e);
|
|
2435
2891
|
if (!n) return;
|
|
2436
|
-
const r =
|
|
2892
|
+
const r = nt(n);
|
|
2437
2893
|
r !== e._lastViewSignature && (e._lastViewSignature = r, e._lastViewEmitMs = t, e.viewChangeHandler(n));
|
|
2438
2894
|
}
|
|
2439
|
-
function
|
|
2440
|
-
const l = (t + n) / 2,
|
|
2441
|
-
e.controls.target.set(l,
|
|
2895
|
+
function rt(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s }) {
|
|
2896
|
+
const l = (t + n) / 2, u = (r + o) / 2, a = (i + s) / 2, c = n - t, m = o - r, d = s - i, h = Math.max(c, m, d, 1) * 2;
|
|
2897
|
+
e.controls.target.set(l, u, a), e.camera.position.set(l + h, u + h, a + h), e.camera.lookAt(l, u, a), e.controls.update();
|
|
2442
2898
|
}
|
|
2443
|
-
function
|
|
2899
|
+
function zr(e, t = 1e3) {
|
|
2444
2900
|
!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());
|
|
2445
2901
|
}
|
|
2446
|
-
function
|
|
2902
|
+
function Mr(e, t = 2e3) {
|
|
2447
2903
|
!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());
|
|
2448
2904
|
}
|
|
2449
|
-
function
|
|
2905
|
+
function Er(e, t = 0, n = 0) {
|
|
2450
2906
|
e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
|
|
2451
2907
|
}
|
|
2452
|
-
function
|
|
2908
|
+
function kr(e, t = 1.1) {
|
|
2453
2909
|
!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());
|
|
2454
2910
|
}
|
|
2455
|
-
function
|
|
2911
|
+
function Ar(e, t = 1.2) {
|
|
2456
2912
|
if (!e.lastBounds) return;
|
|
2457
2913
|
const {
|
|
2458
2914
|
minX: n,
|
|
@@ -2461,16 +2917,16 @@ function fr(e, t = 1.2) {
|
|
|
2461
2917
|
maxY: i,
|
|
2462
2918
|
minZ: s,
|
|
2463
2919
|
maxZ: l
|
|
2464
|
-
} = e.lastBounds,
|
|
2920
|
+
} = e.lastBounds, u = (r - n) * t, a = (i - o) * t, c = (l - s) * t, m = (n + r) / 2, d = (o + i) / 2, f = (s + l) / 2, b = Math.max(u, a, c, 1) * 2;
|
|
2465
2921
|
e.controls.target.set(m, d, f), e.camera.position.set(m + b, d + b, f + b), e.camera.lookAt(m, d, f), e.controls.update();
|
|
2466
2922
|
}
|
|
2467
|
-
const
|
|
2468
|
-
function
|
|
2923
|
+
const xr = 1, Ir = 120;
|
|
2924
|
+
function Cr(e, t) {
|
|
2469
2925
|
if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
|
|
2470
|
-
const n = Math.min(
|
|
2471
|
-
return e.camera.position.copy(r).addScaledVector(a,
|
|
2926
|
+
const n = Math.min(Ir, Math.max(xr, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), i = e.camera.fov * Math.PI / 180, s = 2 * o * Math.tan(i / 2), l = n * Math.PI / 180, u = s / (2 * Math.tan(l / 2)), a = e.camera.position.clone().sub(r).normalize();
|
|
2927
|
+
return e.camera.position.copy(r).addScaledVector(a, u), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
|
|
2472
2928
|
}
|
|
2473
|
-
function
|
|
2929
|
+
function vr(e, t = "orbit") {
|
|
2474
2930
|
if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
|
|
2475
2931
|
e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
|
|
2476
2932
|
else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
|
|
@@ -2479,37 +2935,37 @@ function gr(e, t = "orbit") {
|
|
|
2479
2935
|
e.controls.target.copy(n), e.controls.update();
|
|
2480
2936
|
}
|
|
2481
2937
|
}
|
|
2482
|
-
const
|
|
2483
|
-
function
|
|
2938
|
+
const ae = "#9ca3af";
|
|
2939
|
+
function bt(e, t) {
|
|
2484
2940
|
const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
|
|
2485
2941
|
if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
|
|
2486
2942
|
const o = Math.min(n, r), i = Math.max(n, r);
|
|
2487
2943
|
return i <= o ? null : { segStart: o, segEnd: i };
|
|
2488
2944
|
}
|
|
2489
|
-
function
|
|
2945
|
+
function Sr(e, t, n) {
|
|
2490
2946
|
let r = 0, o = 0;
|
|
2491
2947
|
for (let s = 0; s < e.length; s += 1) {
|
|
2492
|
-
const l = e[s],
|
|
2493
|
-
if (!Number.isFinite(
|
|
2494
|
-
const m = Math.max(t,
|
|
2495
|
-
f <= 0 || (r +=
|
|
2948
|
+
const l = e[s], u = Number(l == null ? void 0 : l.from), a = Number(l == null ? void 0 : l.to), c = Number(l == null ? void 0 : l.value);
|
|
2949
|
+
if (!Number.isFinite(u) || !Number.isFinite(a) || !Number.isFinite(c) || a <= u) continue;
|
|
2950
|
+
const m = Math.max(t, u), f = Math.min(n, a) - m;
|
|
2951
|
+
f <= 0 || (r += c * f, o += f);
|
|
2496
2952
|
}
|
|
2497
2953
|
if (o <= 0) return null;
|
|
2498
2954
|
const i = r / o;
|
|
2499
2955
|
return Number.isFinite(i) ? i : null;
|
|
2500
2956
|
}
|
|
2501
|
-
function
|
|
2502
|
-
if (!Number.isFinite(e)) return new y.Color(
|
|
2503
|
-
if (
|
|
2504
|
-
const r =
|
|
2957
|
+
function Dr(e, t) {
|
|
2958
|
+
if (!Number.isFinite(e)) return new y.Color(ae);
|
|
2959
|
+
if (wt(e, t) < 0) return new y.Color(ae);
|
|
2960
|
+
const r = ur(e, t, ae);
|
|
2505
2961
|
return new y.Color(r);
|
|
2506
2962
|
}
|
|
2507
|
-
function
|
|
2508
|
-
if (!e || !String(e).trim()) return
|
|
2509
|
-
const t =
|
|
2963
|
+
function Fr(e) {
|
|
2964
|
+
if (!e || !String(e).trim()) return ae;
|
|
2965
|
+
const t = jt(String(e).toLowerCase().trim());
|
|
2510
2966
|
return "#" + new y.Color().setHSL(t, 0.7, 0.5).getHexString();
|
|
2511
2967
|
}
|
|
2512
|
-
function
|
|
2968
|
+
function Lr(e = {}) {
|
|
2513
2969
|
return {
|
|
2514
2970
|
preserveView: !!e.preserveView,
|
|
2515
2971
|
assayIntervalsByHole: e.assayIntervalsByHole || null,
|
|
@@ -2517,7 +2973,7 @@ function zr(e = {}) {
|
|
|
2517
2973
|
isCategoricalVariable: !!e.isCategoricalVariable
|
|
2518
2974
|
};
|
|
2519
2975
|
}
|
|
2520
|
-
function
|
|
2976
|
+
function Or(e, t) {
|
|
2521
2977
|
if (!e || !t) return [];
|
|
2522
2978
|
const n = [];
|
|
2523
2979
|
return Object.values(e).forEach((r) => {
|
|
@@ -2527,146 +2983,146 @@ function Mr(e, t) {
|
|
|
2527
2983
|
});
|
|
2528
2984
|
}), n;
|
|
2529
2985
|
}
|
|
2530
|
-
function
|
|
2986
|
+
function qe(e) {
|
|
2531
2987
|
return {
|
|
2532
2988
|
holeId: e.id,
|
|
2533
2989
|
project: e.project
|
|
2534
2990
|
};
|
|
2535
2991
|
}
|
|
2536
|
-
function
|
|
2992
|
+
function Pr(e) {
|
|
2537
2993
|
return `${e ?? ""}`.trim().toLowerCase();
|
|
2538
2994
|
}
|
|
2539
|
-
function
|
|
2540
|
-
const n = `${e ?? ""}:${t ?? 0}`, r =
|
|
2995
|
+
function Tr(e, t) {
|
|
2996
|
+
const n = `${e ?? ""}:${t ?? 0}`, r = jt(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, s = new y.Color();
|
|
2541
2997
|
return s.setHSL(i, 1, 0.5), s;
|
|
2542
2998
|
}
|
|
2543
|
-
function
|
|
2999
|
+
function jt(e) {
|
|
2544
3000
|
const t = `${e ?? ""}`;
|
|
2545
3001
|
let n = 2166136261;
|
|
2546
3002
|
for (let r = 0; r < t.length; r += 1)
|
|
2547
3003
|
n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
|
|
2548
3004
|
return (n >>> 0) / 4294967295;
|
|
2549
3005
|
}
|
|
2550
|
-
function
|
|
3006
|
+
function wr(e, t, n) {
|
|
2551
3007
|
let r = null, o = 0;
|
|
2552
3008
|
for (const i of e) {
|
|
2553
3009
|
const s = Number(i == null ? void 0 : i.from), l = Number(i == null ? void 0 : i.to);
|
|
2554
3010
|
if (!Number.isFinite(s) || !Number.isFinite(l)) continue;
|
|
2555
|
-
const
|
|
2556
|
-
|
|
3011
|
+
const u = Math.min(n, l) - Math.max(t, s);
|
|
3012
|
+
u > o && (o = u, r = i == null ? void 0 : i.value);
|
|
2557
3013
|
}
|
|
2558
3014
|
return r;
|
|
2559
3015
|
}
|
|
2560
|
-
function
|
|
3016
|
+
function Br(e, t) {
|
|
2561
3017
|
if (!t || !e) return [];
|
|
2562
3018
|
const n = e.id || e.holeId;
|
|
2563
3019
|
if (!n) return [];
|
|
2564
3020
|
const r = t[n];
|
|
2565
3021
|
if (Array.isArray(r) && r.length) return r;
|
|
2566
|
-
const o =
|
|
3022
|
+
const o = Pr(n);
|
|
2567
3023
|
if (o) {
|
|
2568
3024
|
const i = t[o];
|
|
2569
3025
|
if (Array.isArray(i) && i.length) return i;
|
|
2570
3026
|
}
|
|
2571
3027
|
return [];
|
|
2572
3028
|
}
|
|
2573
|
-
function
|
|
3029
|
+
function $r({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: s, isCategorical: l }) {
|
|
2574
3030
|
if (!e)
|
|
2575
|
-
return
|
|
3031
|
+
return Tr(r, o);
|
|
2576
3032
|
if (e === "__HAS_ASSAY__") {
|
|
2577
|
-
if (!(t != null && t.length)) return new y.Color(
|
|
2578
|
-
const
|
|
2579
|
-
return
|
|
2580
|
-
const f = Number(d == null ? void 0 : d.from),
|
|
2581
|
-
if (!Number.isFinite(f) || !Number.isFinite(
|
|
2582
|
-
const b = Math.max(
|
|
2583
|
-
return Math.min(
|
|
2584
|
-
}) ? new y.Color("#ff8c42") : new y.Color(
|
|
2585
|
-
}
|
|
2586
|
-
if (!(t != null && t.length)) return new y.Color(
|
|
2587
|
-
const
|
|
2588
|
-
if (!
|
|
3033
|
+
if (!(t != null && t.length)) return new y.Color(ae);
|
|
3034
|
+
const c = bt(i, s);
|
|
3035
|
+
return c ? t.some((d) => {
|
|
3036
|
+
const f = Number(d == null ? void 0 : d.from), h = Number(d == null ? void 0 : d.to);
|
|
3037
|
+
if (!Number.isFinite(f) || !Number.isFinite(h)) return !1;
|
|
3038
|
+
const b = Math.max(c.segStart, f);
|
|
3039
|
+
return Math.min(c.segEnd, h) > b;
|
|
3040
|
+
}) ? new y.Color("#ff8c42") : new y.Color(ae) : new y.Color(ae);
|
|
3041
|
+
}
|
|
3042
|
+
if (!(t != null && t.length)) return new y.Color(ae);
|
|
3043
|
+
const u = bt(i, s);
|
|
3044
|
+
if (!u) return new y.Color(ae);
|
|
2589
3045
|
if (l) {
|
|
2590
|
-
const
|
|
2591
|
-
return new y.Color(
|
|
2592
|
-
}
|
|
2593
|
-
const a =
|
|
2594
|
-
return
|
|
2595
|
-
}
|
|
2596
|
-
function
|
|
2597
|
-
if (!e.scene || (
|
|
2598
|
-
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: s } =
|
|
2599
|
-
let a = 1 / 0,
|
|
2600
|
-
const b = new y.Vector3(),
|
|
2601
|
-
t.forEach((
|
|
2602
|
-
const M = g * 137.5 % 360 / 360,
|
|
2603
|
-
a = Math.min(a,
|
|
2604
|
-
const
|
|
2605
|
-
return
|
|
3046
|
+
const c = wr(t, u.segStart, u.segEnd);
|
|
3047
|
+
return new y.Color(Fr(c));
|
|
3048
|
+
}
|
|
3049
|
+
const a = Sr(t, u.segStart, u.segEnd);
|
|
3050
|
+
return Dr(a, n);
|
|
3051
|
+
}
|
|
3052
|
+
function Vr(e, t, n = {}) {
|
|
3053
|
+
if (!e.scene || (Rt(e), !t || t.length === 0)) return;
|
|
3054
|
+
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: s } = Lr(n), l = s ? [] : Or(o, i), u = ar(l);
|
|
3055
|
+
let a = 1 / 0, c = -1 / 0, m = 1 / 0, d = -1 / 0, f = 1 / 0, h = -1 / 0;
|
|
3056
|
+
const b = new y.Vector3(), _ = new y.Vector3(0, 1, 0);
|
|
3057
|
+
t.forEach((p, g) => {
|
|
3058
|
+
const M = g * 137.5 % 360 / 360, v = new y.Color().setHSL(M, 0.75, 0.55), k = (p.points || []).map((L) => {
|
|
3059
|
+
a = Math.min(a, L.x), c = Math.max(c, L.x), m = Math.min(m, L.y), d = Math.max(d, L.y), f = Math.min(f, L.z), h = Math.max(h, L.z);
|
|
3060
|
+
const Y = new y.Vector3(L.x, L.y, L.z);
|
|
3061
|
+
return Y.md = L.md, Y;
|
|
2606
3062
|
});
|
|
2607
|
-
if (
|
|
2608
|
-
if (
|
|
2609
|
-
const
|
|
2610
|
-
color:
|
|
2611
|
-
emissive:
|
|
3063
|
+
if (k.length < 2) {
|
|
3064
|
+
if (k.length === 1) {
|
|
3065
|
+
const L = new y.SphereGeometry(5, 12, 12), Y = new y.MeshLambertMaterial({
|
|
3066
|
+
color: v,
|
|
3067
|
+
emissive: v,
|
|
2612
3068
|
emissiveIntensity: 0.2
|
|
2613
|
-
}),
|
|
2614
|
-
|
|
3069
|
+
}), Z = new y.Mesh(L, Y);
|
|
3070
|
+
Z.position.copy(k[0]), Z.userData = qe(p), e.scene.add(Z), e.drillLines.push(Z), e.drillMeshes.push(Z);
|
|
2615
3071
|
}
|
|
2616
3072
|
return;
|
|
2617
3073
|
}
|
|
2618
|
-
const
|
|
2619
|
-
|
|
2620
|
-
const
|
|
2621
|
-
for (let
|
|
2622
|
-
const
|
|
2623
|
-
if (
|
|
2624
|
-
const
|
|
3074
|
+
const F = new y.Group();
|
|
3075
|
+
F.userData = qe(p);
|
|
3076
|
+
const T = i ? Br(p, o) : [];
|
|
3077
|
+
for (let L = 0; L < k.length - 1; L += 1) {
|
|
3078
|
+
const Y = k[L], Z = k[L + 1], w = b.subVectors(Z, Y), q = w.length();
|
|
3079
|
+
if (q <= 1e-3) continue;
|
|
3080
|
+
const R = 2.2, I = new y.CylinderGeometry(R, R, q, 6, 1, !0), A = $r({
|
|
2625
3081
|
selectedAssayVariable: i,
|
|
2626
|
-
assayIntervals:
|
|
2627
|
-
assayScale:
|
|
2628
|
-
holeId:
|
|
2629
|
-
segmentIndex:
|
|
2630
|
-
p1:
|
|
2631
|
-
p2:
|
|
3082
|
+
assayIntervals: T,
|
|
3083
|
+
assayScale: u,
|
|
3084
|
+
holeId: p.id,
|
|
3085
|
+
segmentIndex: L,
|
|
3086
|
+
p1: Y,
|
|
3087
|
+
p2: Z,
|
|
2632
3088
|
isCategorical: s
|
|
2633
|
-
}),
|
|
2634
|
-
color:
|
|
3089
|
+
}), N = new y.MeshLambertMaterial({
|
|
3090
|
+
color: A,
|
|
2635
3091
|
flatShading: !0,
|
|
2636
|
-
emissive:
|
|
3092
|
+
emissive: A,
|
|
2637
3093
|
emissiveIntensity: 0.15
|
|
2638
|
-
}),
|
|
2639
|
-
|
|
3094
|
+
}), O = new y.Mesh(I, N);
|
|
3095
|
+
O.position.copy(Y.clone().addScaledVector(w, 0.5)), O.quaternion.setFromUnitVectors(_, w.clone().normalize()), O.userData = qe(p), F.add(O), e.drillMeshes.push(O);
|
|
2640
3096
|
}
|
|
2641
|
-
e.scene.add(
|
|
2642
|
-
}), e.camera && e.controls && (e.lastBounds = { minX: a, maxX:
|
|
3097
|
+
e.scene.add(F), e.drillLines.push(F);
|
|
3098
|
+
}), e.camera && e.controls && (e.lastBounds = { minX: a, maxX: c, minY: m, maxY: d, minZ: f, maxZ: h }, r || rt(e, { minX: a, maxX: c, minY: m, maxY: d, minZ: f, maxZ: h })), Ne(e);
|
|
2643
3099
|
}
|
|
2644
|
-
function
|
|
3100
|
+
function Rt(e) {
|
|
2645
3101
|
e.drillLines.forEach((t) => {
|
|
2646
3102
|
e.scene.remove(t), t.isGroup ? t.traverse((n) => {
|
|
2647
3103
|
n.isMesh && (n.geometry.dispose(), n.material.dispose());
|
|
2648
3104
|
}) : t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
2649
|
-
}), e.drillLines = [], e.drillMeshes = [],
|
|
3105
|
+
}), e.drillLines = [], e.drillMeshes = [], Ne(e);
|
|
2650
3106
|
}
|
|
2651
|
-
const
|
|
2652
|
-
function
|
|
3107
|
+
const gt = "#ffffbb", Hr = 2, jr = 1.5, Rr = 1;
|
|
3108
|
+
function Gr(e) {
|
|
2653
3109
|
const { renderer: t, scene: n, camera: r, container: o } = e;
|
|
2654
3110
|
if (!t || !n || !r) return;
|
|
2655
|
-
const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, s = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, l = new
|
|
2656
|
-
l.addPass(
|
|
2657
|
-
const a = new y.Vector2(i, s),
|
|
2658
|
-
|
|
3111
|
+
const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, s = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, l = new tn(t), u = new nn(n, r);
|
|
3112
|
+
l.addPass(u);
|
|
3113
|
+
const a = new y.Vector2(i, s), c = new rn(a, n, r);
|
|
3114
|
+
c.visibleEdgeColor.set(gt), c.hiddenEdgeColor.set(gt), c.edgeStrength = Hr, c.edgeThickness = jr, c.edgeGlow = Rr, c.pulsePeriod = 0, c.selectedObjects = [], l.addPass(c), l.setSize(i, s), e._composer = l, e._outlinePass = c;
|
|
2659
3115
|
}
|
|
2660
|
-
function
|
|
3116
|
+
function Ur(e, t, n) {
|
|
2661
3117
|
!e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
|
|
2662
3118
|
}
|
|
2663
|
-
function
|
|
3119
|
+
function Se(e, t) {
|
|
2664
3120
|
e._outlinePass && (e._outlinePass.selectedObjects = t ? [t] : [], e._selectedObject = t || null);
|
|
2665
3121
|
}
|
|
2666
|
-
function
|
|
3122
|
+
function yt(e) {
|
|
2667
3123
|
e._composer && (e._composer.dispose(), e._composer = null), e._outlinePass = null, e._selectedObject = null, e.selectables = [];
|
|
2668
3124
|
}
|
|
2669
|
-
const
|
|
3125
|
+
const Yr = [
|
|
2670
3126
|
{ normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
|
|
2671
3127
|
{ normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
|
|
2672
3128
|
{ normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
|
|
@@ -2674,86 +3130,86 @@ const Lr = [
|
|
|
2674
3130
|
{ normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
|
|
2675
3131
|
{ normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
|
|
2676
3132
|
];
|
|
2677
|
-
function
|
|
2678
|
-
if (!e.scene || (
|
|
3133
|
+
function qr(e, t, n, r, o = {}) {
|
|
3134
|
+
if (!e.scene || (Gt(e), !t || !n || !r)) return;
|
|
2679
3135
|
const { autoCenter: i = !0, opacity: s = 1 } = o;
|
|
2680
|
-
let l = 1 / 0,
|
|
2681
|
-
t.forEach((
|
|
2682
|
-
const
|
|
2683
|
-
l = Math.min(l,
|
|
3136
|
+
let l = 1 / 0, u = -1 / 0, a = 1 / 0, c = -1 / 0, m = 1 / 0, d = -1 / 0;
|
|
3137
|
+
t.forEach((N) => {
|
|
3138
|
+
const O = Number(N.x ?? N.center_x ?? 0), x = Number(N.y ?? N.center_y ?? 0), V = Number(N.z ?? N.center_z ?? 0), H = Number(N.dx ?? N.size_x ?? 1), B = Number(N.dy ?? N.size_y ?? 1), X = Number(N.dz ?? N.size_z ?? 1);
|
|
3139
|
+
l = Math.min(l, O - H / 2), u = Math.max(u, O + H / 2), a = Math.min(a, x - B / 2), c = Math.max(c, x + B / 2), m = Math.min(m, V - X / 2), d = Math.max(d, V + X / 2);
|
|
2684
3140
|
});
|
|
2685
|
-
let f = 0,
|
|
2686
|
-
o.offset ? (f = Number(o.offset.x ?? 0),
|
|
2687
|
-
const
|
|
2688
|
-
t.map((
|
|
2689
|
-
),
|
|
2690
|
-
let
|
|
2691
|
-
if (t.forEach((
|
|
2692
|
-
const
|
|
2693
|
-
|
|
2694
|
-
const
|
|
2695
|
-
if (
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
}),
|
|
3141
|
+
let f = 0, h = 0, b = 0;
|
|
3142
|
+
o.offset ? (f = Number(o.offset.x ?? 0), h = Number(o.offset.y ?? 0), b = Number(o.offset.z ?? 0)) : i && (f = -((l + u) / 2), h = -((a + c) / 2), b = -((m + d) / 2));
|
|
3143
|
+
const _ = l + f, p = u + f, g = a + h, E = c + h, M = m + b, v = d + b, k = (N, O, x) => `${Math.round(N)},${Math.round(O)},${Math.round(x)}`, F = new Set(
|
|
3144
|
+
t.map((N) => k(Number(N.x ?? 0), Number(N.y ?? 0), Number(N.z ?? 0)))
|
|
3145
|
+
), T = [], L = [], Y = [], Z = [], w = [];
|
|
3146
|
+
let q = 0;
|
|
3147
|
+
if (t.forEach((N) => {
|
|
3148
|
+
const O = Number(N.x ?? N.center_x ?? 0), x = Number(N.y ?? N.center_y ?? 0), V = Number(N.z ?? N.center_z ?? 0), H = Number(N.dx ?? N.size_x ?? 1), B = Number(N.dy ?? N.size_y ?? 1), X = Number(N.dz ?? N.size_z ?? 1), K = O + f, ie = x + h, ge = V + b, de = Fn(N[n], r, y), { r: ve, g: me, b: je } = de;
|
|
3149
|
+
Yr.forEach((ye) => {
|
|
3150
|
+
const Yt = O + ye.neibDir[0] * H, qt = x + ye.neibDir[1] * B, Xt = V + ye.neibDir[2] * X;
|
|
3151
|
+
if (F.has(k(Yt, qt, Xt))) return;
|
|
3152
|
+
const ze = q;
|
|
3153
|
+
ye.verts.forEach(([Wt, Zt, Kt]) => {
|
|
3154
|
+
T.push(K + Wt * H / 2, ie + Zt * B / 2, ge + Kt * X / 2), L.push(ye.normal[0], ye.normal[1], ye.normal[2]), Y.push(ve, me, je), q++;
|
|
3155
|
+
}), Z.push(ze, ze + 1, ze + 2, ze, ze + 2, ze + 3), w.push(N);
|
|
2700
3156
|
});
|
|
2701
|
-
}),
|
|
2702
|
-
const
|
|
2703
|
-
|
|
2704
|
-
const
|
|
3157
|
+
}), T.length === 0) return;
|
|
3158
|
+
const R = new y.BufferGeometry();
|
|
3159
|
+
R.setAttribute("position", new y.Float32BufferAttribute(T, 3)), R.setAttribute("normal", new y.Float32BufferAttribute(L, 3)), R.setAttribute("color", new y.Float32BufferAttribute(Y, 3)), R.setIndex(Z);
|
|
3160
|
+
const I = new y.MeshLambertMaterial({
|
|
2705
3161
|
vertexColors: !0,
|
|
2706
3162
|
transparent: s < 1,
|
|
2707
3163
|
opacity: s,
|
|
2708
3164
|
side: y.DoubleSide
|
|
2709
|
-
}),
|
|
2710
|
-
|
|
3165
|
+
}), A = new y.Mesh(R, I);
|
|
3166
|
+
A.userData._isMergedBlocks = !0, A.userData._quadToBlock = w, A.userData._offset = { x: f, y: h, z: b }, e.scene.add(A), e.blocks.push(A), Ne(e), e.camera && e.controls && (e.lastBounds = { minX: _, maxX: p, minY: g, maxY: E, minZ: M, maxZ: v }, rt(e, { minX: _, maxX: p, minY: g, maxY: E, minZ: M, maxZ: v }));
|
|
2711
3167
|
}
|
|
2712
|
-
function
|
|
3168
|
+
function Gt(e) {
|
|
2713
3169
|
var t;
|
|
2714
3170
|
e.blocks.forEach((n) => {
|
|
2715
3171
|
e.scene.remove(n), n.geometry.dispose(), n.material.dispose();
|
|
2716
|
-
}), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null),
|
|
3172
|
+
}), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null), Ne(e);
|
|
2717
3173
|
}
|
|
2718
|
-
function
|
|
3174
|
+
function Xr(e, t) {
|
|
2719
3175
|
const n = Math.max(0, Math.min(1, Number(t)));
|
|
2720
3176
|
e.blocks.forEach((r) => {
|
|
2721
3177
|
r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
|
|
2722
3178
|
});
|
|
2723
3179
|
}
|
|
2724
|
-
function
|
|
2725
|
-
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, s = Number(t.x ?? t.center_x ?? 0) + r, l = Number(t.y ?? t.center_y ?? 0) + o,
|
|
3180
|
+
function Wr(e, t, n) {
|
|
3181
|
+
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, s = Number(t.x ?? t.center_x ?? 0) + r, l = Number(t.y ?? t.center_y ?? 0) + o, u = Number(t.z ?? t.center_z ?? 0) + i, a = Number(t.dx ?? t.size_x ?? 1), c = Number(t.dy ?? t.size_y ?? 1), m = Number(t.dz ?? t.size_z ?? 1);
|
|
2726
3182
|
if (!e._blockHighlightMesh) {
|
|
2727
3183
|
const d = new y.BoxGeometry(1, 1, 1), f = new y.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
|
|
2728
3184
|
e._blockHighlightMesh = new y.Mesh(d, f), e.scene.add(e._blockHighlightMesh);
|
|
2729
3185
|
}
|
|
2730
|
-
return e._blockHighlightMesh.position.set(s, l,
|
|
3186
|
+
return e._blockHighlightMesh.position.set(s, l, u), e._blockHighlightMesh.scale.set(a, c, m), e._blockHighlightMesh;
|
|
2731
3187
|
}
|
|
2732
|
-
function
|
|
3188
|
+
function Ut(e) {
|
|
2733
3189
|
var o, i;
|
|
2734
3190
|
if (!e._outlinePass || e.selectables.length === 0) {
|
|
2735
|
-
e._outlinePass &&
|
|
3191
|
+
e._outlinePass && Se(e, null);
|
|
2736
3192
|
return;
|
|
2737
3193
|
}
|
|
2738
3194
|
const t = e.raycaster.intersectObjects(e.selectables, !0);
|
|
2739
3195
|
if (t.length === 0) {
|
|
2740
|
-
|
|
3196
|
+
Se(e, null);
|
|
2741
3197
|
return;
|
|
2742
3198
|
}
|
|
2743
3199
|
const n = t[0], r = n.object;
|
|
2744
3200
|
if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
|
|
2745
3201
|
const s = Math.floor(n.faceIndex / 2), l = (i = r.userData._quadToBlock) == null ? void 0 : i[s];
|
|
2746
3202
|
if (l) {
|
|
2747
|
-
|
|
3203
|
+
Se(e, Wr(e, l, r.userData._offset));
|
|
2748
3204
|
return;
|
|
2749
3205
|
}
|
|
2750
3206
|
}
|
|
2751
|
-
|
|
3207
|
+
Se(e, r);
|
|
2752
3208
|
}
|
|
2753
|
-
function
|
|
3209
|
+
function Zr(e) {
|
|
2754
3210
|
const t = e.renderer;
|
|
2755
3211
|
t && (e.handleCanvasClick = (n) => {
|
|
2756
|
-
var f,
|
|
3212
|
+
var f, h, b, _, p, g, E;
|
|
2757
3213
|
if (n.button !== 0) return;
|
|
2758
3214
|
if ((f = e.gizmo) != null && f.domElement) {
|
|
2759
3215
|
const M = e.gizmo.domElement.getBoundingClientRect();
|
|
@@ -2761,32 +3217,32 @@ function Vr(e) {
|
|
|
2761
3217
|
return;
|
|
2762
3218
|
}
|
|
2763
3219
|
const r = t.domElement.getBoundingClientRect(), o = n.clientX - r.left, i = n.clientY - r.top;
|
|
2764
|
-
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera),
|
|
3220
|
+
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), Ut(e), e.blocks.length > 0) {
|
|
2765
3221
|
const M = e.raycaster.intersectObjects(e.blocks, !1);
|
|
2766
3222
|
if (M.length > 0) {
|
|
2767
|
-
const
|
|
2768
|
-
if ((
|
|
2769
|
-
const
|
|
2770
|
-
|
|
3223
|
+
const v = M[0], k = v.object;
|
|
3224
|
+
if ((h = k == null ? void 0 : k.userData) != null && h._isMergedBlocks && e.blockClickHandler) {
|
|
3225
|
+
const F = Math.floor(v.faceIndex / 2), T = k.userData._quadToBlock[F];
|
|
3226
|
+
T && e.blockClickHandler(T);
|
|
2771
3227
|
}
|
|
2772
3228
|
return;
|
|
2773
3229
|
}
|
|
2774
3230
|
}
|
|
2775
|
-
const s = e.raycaster.intersectObjects(e.drillMeshes, !0), l = e.raycaster.intersectObjects(e.structuralMeshes, !0),
|
|
2776
|
-
if ((((
|
|
3231
|
+
const s = e.raycaster.intersectObjects(e.drillMeshes, !0), l = e.raycaster.intersectObjects(e.structuralMeshes, !0), u = ((b = s[0]) == null ? void 0 : b.distance) ?? 1 / 0;
|
|
3232
|
+
if ((((_ = l[0]) == null ? void 0 : _.distance) ?? 1 / 0) < u && l.length > 0) {
|
|
2777
3233
|
const M = l[0].object;
|
|
2778
3234
|
e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...M.userData });
|
|
2779
3235
|
return;
|
|
2780
3236
|
}
|
|
2781
3237
|
if (s.length === 0) return;
|
|
2782
|
-
let
|
|
2783
|
-
for (;
|
|
2784
|
-
|
|
2785
|
-
const m = (g =
|
|
3238
|
+
let c = s[0].object;
|
|
3239
|
+
for (; c && c.parent && !((p = c.userData) != null && p.holeId); )
|
|
3240
|
+
c = c.parent;
|
|
3241
|
+
const m = (g = c == null ? void 0 : c.userData) == null ? void 0 : g.holeId, d = (E = c == null ? void 0 : c.userData) == null ? void 0 : E.project;
|
|
2786
3242
|
m && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: m, project: d });
|
|
2787
3243
|
}, t.domElement.addEventListener("click", e.handleCanvasClick));
|
|
2788
3244
|
}
|
|
2789
|
-
class
|
|
3245
|
+
class oi {
|
|
2790
3246
|
constructor() {
|
|
2791
3247
|
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.frameId = null, this.clock = new y.Clock(), this.handleCanvasClick = null, this.raycaster = new y.Raycaster(), this.pointer = new y.Vector2(), this.drillholeClickHandler = null, this.blockClickHandler = null, this.controlMode = "orbit", this._tmpDir = new y.Vector3(), this.viewChangeHandler = null, this._lastViewSignature = "", this._lastViewEmitMs = 0, this.selectables = [], this._selectedObject = null, this._composer = null, this._blockHighlightMesh = null, this._outlinePass = null;
|
|
2792
3248
|
}
|
|
@@ -2800,42 +3256,42 @@ class Bo {
|
|
|
2800
3256
|
const i = new y.DirectionalLight(16777215, 1.5);
|
|
2801
3257
|
i.position.set(10, 10, 5), this.scene.add(i);
|
|
2802
3258
|
const s = new y.AxesHelper(20);
|
|
2803
|
-
this.scene.add(s), this.controls = new
|
|
3259
|
+
this.scene.add(s), this.controls = new Jt(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.controls.screenSpacePanning = !0, this.controls.enableZoom = !0, this.controls.zoomSpeed = 1.2, this.controls.minDistance = 3e-3, this.controls.maxDistance = 4e4, this.controls.mouseButtons = {
|
|
2804
3260
|
LEFT: y.MOUSE.PAN,
|
|
2805
3261
|
MIDDLE: y.MOUSE.DOLLY,
|
|
2806
3262
|
RIGHT: y.MOUSE.ROTATE
|
|
2807
3263
|
}, this.controls.touches = {
|
|
2808
3264
|
ONE: y.TOUCH.ROTATE,
|
|
2809
3265
|
TWO: y.TOUCH.PAN
|
|
2810
|
-
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new
|
|
3266
|
+
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new Qt(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 en(this.camera, this.renderer, {
|
|
2811
3267
|
container: this.container,
|
|
2812
3268
|
placement: "top-right",
|
|
2813
3269
|
size: 110,
|
|
2814
3270
|
offset: { top: 12, right: 12 },
|
|
2815
3271
|
animated: !0,
|
|
2816
3272
|
speed: 1.5
|
|
2817
|
-
}), this.gizmo.attachControls(this.controls),
|
|
3273
|
+
}), this.gizmo.attachControls(this.controls), Zr(this), Gr(this);
|
|
2818
3274
|
const l = () => {
|
|
2819
3275
|
var a;
|
|
2820
3276
|
this.frameId = requestAnimationFrame(l);
|
|
2821
|
-
const
|
|
2822
|
-
this.renderer.clear(), this.controlMode === "fly" && ((a = this.flyControls) != null && a.enabled) ? this.flyControls.update(
|
|
3277
|
+
const u = this.clock.getDelta();
|
|
3278
|
+
this.renderer.clear(), this.controlMode === "fly" && ((a = this.flyControls) != null && a.enabled) ? this.flyControls.update(u) : this.controls && this.controls.update(), this._emitViewChangeIfNeeded(), this._composer ? this._composer.render(u) : this.renderer.render(this.scene, this.camera), this.gizmo && this.gizmo.render();
|
|
2823
3279
|
};
|
|
2824
3280
|
l();
|
|
2825
3281
|
}
|
|
2826
3282
|
resize() {
|
|
2827
3283
|
if (!this.container || !this.camera || !this.renderer) return;
|
|
2828
3284
|
const t = this.container.clientWidth, n = this.container.clientHeight;
|
|
2829
|
-
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(),
|
|
3285
|
+
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), Ur(this, t, n);
|
|
2830
3286
|
}
|
|
2831
3287
|
dispose() {
|
|
2832
|
-
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,
|
|
3288
|
+
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, Gt(this), Rt(this), Vt(this), yt(this), 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));
|
|
2833
3289
|
}
|
|
2834
3290
|
// ---------------------------------------------------------------------------
|
|
2835
3291
|
// Data renderers — delegate to domain modules
|
|
2836
3292
|
// ---------------------------------------------------------------------------
|
|
2837
3293
|
setDrillholes(t, n = {}) {
|
|
2838
|
-
|
|
3294
|
+
Vr(this, t, n);
|
|
2839
3295
|
}
|
|
2840
3296
|
/**
|
|
2841
3297
|
* Render block model data as a single merged mesh of exterior faces only.
|
|
@@ -2845,20 +3301,20 @@ class Bo {
|
|
|
2845
3301
|
* @param {Object} [options]
|
|
2846
3302
|
*/
|
|
2847
3303
|
setBlocks(t, n, r, o = {}) {
|
|
2848
|
-
|
|
3304
|
+
qr(this, t, n, r, o);
|
|
2849
3305
|
}
|
|
2850
3306
|
/**
|
|
2851
3307
|
* Update the opacity of all currently rendered blocks.
|
|
2852
3308
|
* @param {number} opacity - New opacity value between 0 and 1
|
|
2853
3309
|
*/
|
|
2854
3310
|
setBlockOpacity(t) {
|
|
2855
|
-
|
|
3311
|
+
Xr(this, t);
|
|
2856
3312
|
}
|
|
2857
3313
|
setStructuralDiscs(t, n, r = {}) {
|
|
2858
|
-
|
|
3314
|
+
gr(this, t, n, r);
|
|
2859
3315
|
}
|
|
2860
3316
|
setStructuralDiscsVisible(t) {
|
|
2861
|
-
|
|
3317
|
+
yr(this, t);
|
|
2862
3318
|
}
|
|
2863
3319
|
// ---------------------------------------------------------------------------
|
|
2864
3320
|
// Click handlers
|
|
@@ -2880,50 +3336,50 @@ class Bo {
|
|
|
2880
3336
|
this.viewChangeHandler = typeof t == "function" ? t : null;
|
|
2881
3337
|
}
|
|
2882
3338
|
getViewState() {
|
|
2883
|
-
return
|
|
3339
|
+
return Ht(this);
|
|
2884
3340
|
}
|
|
2885
3341
|
setViewState(t) {
|
|
2886
|
-
return
|
|
3342
|
+
return _r(this, t);
|
|
2887
3343
|
}
|
|
2888
3344
|
_buildViewSignature(t) {
|
|
2889
|
-
return
|
|
3345
|
+
return nt(t);
|
|
2890
3346
|
}
|
|
2891
3347
|
_emitViewChangeIfNeeded() {
|
|
2892
|
-
|
|
3348
|
+
Nr(this);
|
|
2893
3349
|
}
|
|
2894
3350
|
_fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s }) {
|
|
2895
|
-
|
|
3351
|
+
rt(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s });
|
|
2896
3352
|
}
|
|
2897
3353
|
recenterCameraToOrigin(t = 1e3) {
|
|
2898
|
-
|
|
3354
|
+
zr(this, t);
|
|
2899
3355
|
}
|
|
2900
3356
|
lookDown(t = 2e3) {
|
|
2901
|
-
|
|
3357
|
+
Mr(this, t);
|
|
2902
3358
|
}
|
|
2903
3359
|
pan(t = 0, n = 0) {
|
|
2904
|
-
|
|
3360
|
+
Er(this, t, n);
|
|
2905
3361
|
}
|
|
2906
3362
|
dolly(t = 1.1) {
|
|
2907
|
-
|
|
3363
|
+
kr(this, t);
|
|
2908
3364
|
}
|
|
2909
3365
|
focusOnLastBounds(t = 1.2) {
|
|
2910
|
-
|
|
3366
|
+
Ar(this, t);
|
|
2911
3367
|
}
|
|
2912
3368
|
/**
|
|
2913
3369
|
* Change the camera field-of-view while keeping the visible scene the same apparent size.
|
|
2914
3370
|
* @param {number} fovDeg - Desired FOV in degrees
|
|
2915
3371
|
*/
|
|
2916
3372
|
setCameraFov(t) {
|
|
2917
|
-
|
|
3373
|
+
Cr(this, t);
|
|
2918
3374
|
}
|
|
2919
3375
|
setControlMode(t = "orbit") {
|
|
2920
|
-
|
|
3376
|
+
vr(this, t);
|
|
2921
3377
|
}
|
|
2922
3378
|
// ---------------------------------------------------------------------------
|
|
2923
3379
|
// Selection glow public API
|
|
2924
3380
|
// ---------------------------------------------------------------------------
|
|
2925
3381
|
_syncSelectables() {
|
|
2926
|
-
|
|
3382
|
+
Ne(this);
|
|
2927
3383
|
}
|
|
2928
3384
|
/**
|
|
2929
3385
|
* Register the objects that are candidates for click-select glow.
|
|
@@ -2937,7 +3393,7 @@ class Bo {
|
|
|
2937
3393
|
* @param {THREE.Object3D|null} object
|
|
2938
3394
|
*/
|
|
2939
3395
|
selectObject(t) {
|
|
2940
|
-
|
|
3396
|
+
Se(this, t || null);
|
|
2941
3397
|
}
|
|
2942
3398
|
/**
|
|
2943
3399
|
* Return the currently selected object, or null if nothing is selected.
|
|
@@ -2950,14 +3406,14 @@ class Bo {
|
|
|
2950
3406
|
* Dispose the effect composer and all GPU resources used by the selection glow.
|
|
2951
3407
|
*/
|
|
2952
3408
|
disposeGlow() {
|
|
2953
|
-
|
|
3409
|
+
yt(this);
|
|
2954
3410
|
}
|
|
2955
3411
|
/** @private */
|
|
2956
3412
|
_updateSelectionFromPointer() {
|
|
2957
|
-
|
|
3413
|
+
Ut(this);
|
|
2958
3414
|
}
|
|
2959
3415
|
}
|
|
2960
|
-
function
|
|
3416
|
+
function ii({
|
|
2961
3417
|
controlMode: e = "orbit",
|
|
2962
3418
|
onToggleFly: t = () => {
|
|
2963
3419
|
},
|
|
@@ -2968,14 +3424,14 @@ function Ro({
|
|
|
2968
3424
|
onFit: o = () => {
|
|
2969
3425
|
}
|
|
2970
3426
|
}) {
|
|
2971
|
-
return /* @__PURE__ */
|
|
3427
|
+
return /* @__PURE__ */ te("div", { className: "baselode-3d-controls", children: [
|
|
2972
3428
|
/* @__PURE__ */ $("button", { type: "button", className: "ghost-button", onClick: n, children: "Recenter to (0,0,0)" }),
|
|
2973
3429
|
/* @__PURE__ */ $("button", { type: "button", className: "ghost-button", onClick: r, children: "Look down" }),
|
|
2974
3430
|
/* @__PURE__ */ $("button", { type: "button", className: "ghost-button", onClick: o, children: "Fit to scene" }),
|
|
2975
3431
|
/* @__PURE__ */ $("button", { type: "button", className: "ghost-button", onClick: t, children: e === "orbit" ? "Enable fly controls" : "Disable fly controls" })
|
|
2976
3432
|
] });
|
|
2977
3433
|
}
|
|
2978
|
-
function
|
|
3434
|
+
function si({
|
|
2979
3435
|
properties: e = [],
|
|
2980
3436
|
selectedProperty: t = "",
|
|
2981
3437
|
onPropertyChange: n = () => {
|
|
@@ -2988,40 +3444,40 @@ function Go({
|
|
|
2988
3444
|
onPopupClose: l = () => {
|
|
2989
3445
|
}
|
|
2990
3446
|
}) {
|
|
2991
|
-
var
|
|
2992
|
-
return /* @__PURE__ */
|
|
3447
|
+
var u, a;
|
|
3448
|
+
return /* @__PURE__ */ te("div", { className: "bm-widget", children: [
|
|
2993
3449
|
/* @__PURE__ */ $("label", { className: "bm-widget__label", htmlFor: "bm-property-select", children: "Color by" }),
|
|
2994
|
-
/* @__PURE__ */
|
|
3450
|
+
/* @__PURE__ */ te(
|
|
2995
3451
|
"select",
|
|
2996
3452
|
{
|
|
2997
3453
|
id: "bm-property-select",
|
|
2998
3454
|
className: "bm-widget__select",
|
|
2999
3455
|
value: t,
|
|
3000
|
-
onChange: (
|
|
3456
|
+
onChange: (c) => n(c.target.value),
|
|
3001
3457
|
children: [
|
|
3002
3458
|
e.length === 0 && /* @__PURE__ */ $("option", { value: "", children: "— no attributes —" }),
|
|
3003
|
-
e.map((
|
|
3459
|
+
e.map((c) => /* @__PURE__ */ $("option", { value: c, children: c }, c))
|
|
3004
3460
|
]
|
|
3005
3461
|
}
|
|
3006
3462
|
),
|
|
3007
|
-
i && i.type === "numeric" && /* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */ $("span", { className: "bm-widget__scale-label bm-widget__scale-label--min", children: ((
|
|
3463
|
+
i && i.type === "numeric" && /* @__PURE__ */ te("div", { className: "bm-widget__scale", children: [
|
|
3464
|
+
/* @__PURE__ */ $("span", { className: "bm-widget__scale-label bm-widget__scale-label--min", children: ((u = i.min) == null ? void 0 : u.toFixed(2)) ?? "—" }),
|
|
3009
3465
|
/* @__PURE__ */ $("div", { className: "bm-widget__scale-bar" }),
|
|
3010
3466
|
/* @__PURE__ */ $("span", { className: "bm-widget__scale-label bm-widget__scale-label--max", children: ((a = i.max) == null ? void 0 : a.toFixed(2)) ?? "—" })
|
|
3011
3467
|
] }),
|
|
3012
|
-
i && i.type === "categorical" && /* @__PURE__ */ $("div", { className: "bm-widget__categories", children: (i.categories || []).map((
|
|
3468
|
+
i && i.type === "categorical" && /* @__PURE__ */ $("div", { className: "bm-widget__categories", children: (i.categories || []).map((c, m) => {
|
|
3013
3469
|
const d = Math.round(m / Math.max(i.categories.length, 1) * 360);
|
|
3014
3470
|
return /* @__PURE__ */ $(
|
|
3015
3471
|
"span",
|
|
3016
3472
|
{
|
|
3017
3473
|
className: "bm-widget__category-chip",
|
|
3018
3474
|
style: { background: `hsl(${d},70%,50%)` },
|
|
3019
|
-
children:
|
|
3475
|
+
children: c
|
|
3020
3476
|
},
|
|
3021
|
-
|
|
3477
|
+
c
|
|
3022
3478
|
);
|
|
3023
3479
|
}) }),
|
|
3024
|
-
/* @__PURE__ */
|
|
3480
|
+
/* @__PURE__ */ te("label", { className: "bm-widget__label", htmlFor: "bm-opacity-slider", children: [
|
|
3025
3481
|
"Opacity (",
|
|
3026
3482
|
Math.round(r * 100),
|
|
3027
3483
|
"%)"
|
|
@@ -3036,11 +3492,11 @@ function Go({
|
|
|
3036
3492
|
max: "1",
|
|
3037
3493
|
step: "0.01",
|
|
3038
3494
|
value: r,
|
|
3039
|
-
onChange: (
|
|
3495
|
+
onChange: (c) => o(parseFloat(c.target.value))
|
|
3040
3496
|
}
|
|
3041
3497
|
),
|
|
3042
|
-
s && /* @__PURE__ */
|
|
3043
|
-
/* @__PURE__ */
|
|
3498
|
+
s && /* @__PURE__ */ te("div", { className: "bm-widget__popup", children: [
|
|
3499
|
+
/* @__PURE__ */ te("div", { className: "bm-widget__popup-header", children: [
|
|
3044
3500
|
/* @__PURE__ */ $("span", { children: "Block attributes" }),
|
|
3045
3501
|
/* @__PURE__ */ $(
|
|
3046
3502
|
"button",
|
|
@@ -3053,14 +3509,14 @@ function Go({
|
|
|
3053
3509
|
}
|
|
3054
3510
|
)
|
|
3055
3511
|
] }),
|
|
3056
|
-
/* @__PURE__ */ $("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ $("tbody", { children: Object.entries(s).map(([
|
|
3057
|
-
/* @__PURE__ */ $("th", { children:
|
|
3512
|
+
/* @__PURE__ */ $("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ $("tbody", { children: Object.entries(s).map(([c, m]) => /* @__PURE__ */ te("tr", { children: [
|
|
3513
|
+
/* @__PURE__ */ $("th", { children: c }),
|
|
3058
3514
|
/* @__PURE__ */ $("td", { children: m == null ? "—" : String(m) })
|
|
3059
|
-
] },
|
|
3515
|
+
] }, c)) }) })
|
|
3060
3516
|
] })
|
|
3061
3517
|
] });
|
|
3062
3518
|
}
|
|
3063
|
-
function
|
|
3519
|
+
function li(e) {
|
|
3064
3520
|
const t = typeof e == "string" ? JSON.parse(e) : e;
|
|
3065
3521
|
if (t.schema_version !== "1.0")
|
|
3066
3522
|
throw new Error(
|
|
@@ -3088,7 +3544,7 @@ function Uo(e) {
|
|
|
3088
3544
|
blocks: n
|
|
3089
3545
|
};
|
|
3090
3546
|
}
|
|
3091
|
-
function
|
|
3547
|
+
function Kr(e) {
|
|
3092
3548
|
const t = new y.BufferGeometry(), n = new Float32Array(e.vertices.length * 3);
|
|
3093
3549
|
e.vertices.forEach(([o, i, s], l) => {
|
|
3094
3550
|
n[l * 3] = o, n[l * 3 + 1] = i, n[l * 3 + 2] = s;
|
|
@@ -3098,162 +3554,177 @@ function wr(e) {
|
|
|
3098
3554
|
r[l * 3] = o, r[l * 3 + 1] = i, r[l * 3 + 2] = s;
|
|
3099
3555
|
}), t.setIndex(new y.BufferAttribute(r, 1)), t;
|
|
3100
3556
|
}
|
|
3101
|
-
function
|
|
3557
|
+
function ai(e, t, n = {}) {
|
|
3102
3558
|
const { defaultOpacity: r = 1 } = n, o = new y.Group();
|
|
3103
3559
|
return t.blocks.forEach((i) => {
|
|
3104
|
-
var b,
|
|
3105
|
-
const s =
|
|
3560
|
+
var b, _;
|
|
3561
|
+
const s = Kr(i), l = ((b = i.material) == null ? void 0 : b.color) ?? "#888888", u = ((_ = i.material) == null ? void 0 : _.opacity) ?? r, a = u < 1, c = new y.MeshStandardMaterial({
|
|
3106
3562
|
color: new y.Color(l),
|
|
3107
|
-
opacity:
|
|
3563
|
+
opacity: u,
|
|
3108
3564
|
transparent: a,
|
|
3109
3565
|
side: y.DoubleSide,
|
|
3110
3566
|
flatShading: !0
|
|
3111
|
-
}), m = new y.Mesh(s,
|
|
3567
|
+
}), m = new y.Mesh(s, c);
|
|
3112
3568
|
m.userData = {
|
|
3113
3569
|
id: i.id,
|
|
3114
3570
|
attributes: i.attributes
|
|
3115
3571
|
};
|
|
3116
|
-
const d = new y.EdgesGeometry(s, 15), f = new y.LineBasicMaterial({ color: "#ffffbb", linewidth: 1 }),
|
|
3117
|
-
|
|
3572
|
+
const d = new y.EdgesGeometry(s, 15), f = new y.LineBasicMaterial({ color: "#ffffbb", linewidth: 1 }), h = new y.LineSegments(d, f);
|
|
3573
|
+
h.visible = !1, m.add(h), o.add(m);
|
|
3118
3574
|
}), e.add(o), o;
|
|
3119
3575
|
}
|
|
3120
3576
|
export {
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3577
|
+
lr as ASSAY_COLOR_PALETTE_10,
|
|
3578
|
+
an as ASSAY_NON_VALUE_FIELDS,
|
|
3579
|
+
G as AZIMUTH,
|
|
3580
|
+
jn as BASELODE_COLORWAY,
|
|
3581
|
+
S as BASELODE_DARK,
|
|
3582
|
+
qo as BASELODE_DARK_TEMPLATE,
|
|
3583
|
+
Yo as BASELODE_DARK_TEMPLATE_NAME,
|
|
3584
|
+
uo as BASELODE_DATA_MODEL_DRILL_ASSAY,
|
|
3585
|
+
ao as BASELODE_DATA_MODEL_DRILL_COLLAR,
|
|
3586
|
+
sn as BASELODE_DATA_MODEL_DRILL_GEOLOGY,
|
|
3587
|
+
co as BASELODE_DATA_MODEL_DRILL_SURVEY,
|
|
3588
|
+
mo as BASELODE_DATA_MODEL_STRUCTURAL_POINT,
|
|
3589
|
+
P as BASELODE_LIGHT,
|
|
3590
|
+
Uo as BASELODE_LIGHT_TEMPLATE,
|
|
3591
|
+
Go as BASELODE_LIGHT_TEMPLATE_NAME,
|
|
3592
|
+
Ce as BASELODE_TEMPLATE,
|
|
3593
|
+
Hn as BASELODE_TEMPLATE_NAME,
|
|
3594
|
+
Ue as BUILTIN_COLOUR_MAPS,
|
|
3595
|
+
ii as Baselode3DControls,
|
|
3596
|
+
oi as Baselode3DScene,
|
|
3597
|
+
si as BlockModelWidget,
|
|
3598
|
+
ot as CHART_OPTIONS,
|
|
3599
|
+
bn as COMMENT_COLUMN_NAMES,
|
|
3600
|
+
Be as COMMODITY_COLOURS,
|
|
3601
|
+
Nt as CRS,
|
|
3602
|
+
ln as DEFAULT_COLUMN_MAP,
|
|
3603
|
+
W as DEPTH,
|
|
3604
|
+
U as DIP,
|
|
3605
|
+
De as DISPLAY_CATEGORICAL,
|
|
3606
|
+
Ae as DISPLAY_COMMENT,
|
|
3607
|
+
Te as DISPLAY_HIDDEN,
|
|
3608
|
+
xe as DISPLAY_NUMERIC,
|
|
3609
|
+
We as DISPLAY_TADPOLE,
|
|
3610
|
+
he as EASTING,
|
|
3611
|
+
ke as ELEVATION,
|
|
3612
|
+
Zn as ERROR_COLOR,
|
|
3613
|
+
Rn as FALLBACK_COLOUR,
|
|
3614
|
+
Ir as FOV_MAX_DEG,
|
|
3615
|
+
xr as FOV_MIN_DEG,
|
|
3616
|
+
C as FROM,
|
|
3617
|
+
se as GEOLOGY_CODE,
|
|
3618
|
+
le as GEOLOGY_DESCRIPTION,
|
|
3619
|
+
it as HIDDEN_COLUMNS,
|
|
3152
3620
|
z as HOLE_ID,
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3621
|
+
re as LATITUDE,
|
|
3622
|
+
Gn as LITHOLOGY_COLOURS,
|
|
3623
|
+
oe as LONGITUDE,
|
|
3624
|
+
Ie as MID,
|
|
3625
|
+
pe as NORTHING,
|
|
3626
|
+
qn as NUMERIC_LINE_COLOR,
|
|
3627
|
+
Xn as NUMERIC_MARKER_COLOR,
|
|
3628
|
+
ue as PROJECT_ID,
|
|
3629
|
+
on as STRIKE,
|
|
3161
3630
|
D as TO,
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
En as
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3631
|
+
Ko as TracePlot,
|
|
3632
|
+
ai as addGradeBlocksToScene,
|
|
3633
|
+
$n as alphaBetaToNormal,
|
|
3634
|
+
ri as annotationsFromIntervals,
|
|
3635
|
+
Po as assembleDataset,
|
|
3636
|
+
xo as attachAssayPositions,
|
|
3637
|
+
ko as balancedTangentialDesurvey,
|
|
3638
|
+
Nn as buildAssayState,
|
|
3639
|
+
Xo as buildCategoricalStripLogConfig,
|
|
3640
|
+
or as buildCommentsConfig,
|
|
3641
|
+
ar as buildEqualRangeColorScale,
|
|
3642
|
+
Qn as buildIntervalPoints,
|
|
3643
|
+
Lt as buildPlotConfig,
|
|
3644
|
+
Zo as buildStrikeDipSymbol,
|
|
3645
|
+
br as buildStructuralDiscs,
|
|
3646
|
+
Wo as buildStructuralStripConfig,
|
|
3647
|
+
rr as buildTadpoleConfig,
|
|
3648
|
+
Ao as buildTraces,
|
|
3649
|
+
nt as buildViewSignature,
|
|
3650
|
+
$o as calculateBlockVolume,
|
|
3651
|
+
Sn as calculatePropertyStats,
|
|
3652
|
+
gn as classifyColumns,
|
|
3653
|
+
Oo as coerceNumeric,
|
|
3654
|
+
Vn as computeStructuralPositions,
|
|
3655
|
+
_o as defaultChartType,
|
|
3656
|
+
we as deriveAssayProps,
|
|
3657
|
+
Mo as desurveyTraces,
|
|
3658
|
+
pr as dipAzimuthToNormal,
|
|
3659
|
+
kr as dolly,
|
|
3660
|
+
Nr as emitViewChangeIfNeeded,
|
|
3661
|
+
Dn as filterBlocks,
|
|
3662
|
+
Lo as filterByProject,
|
|
3663
|
+
rt as fitCameraToBounds,
|
|
3664
|
+
Ar as focusOnLastBounds,
|
|
3665
|
+
Bo as getBlockStats,
|
|
3666
|
+
Fr as getCategoryHexColor,
|
|
3667
|
+
Ke as getChartOptions,
|
|
3668
|
+
Fn as getColorForValue,
|
|
3669
|
+
Un as getColour,
|
|
3670
|
+
wt as getEqualRangeBinIndex,
|
|
3671
|
+
ur as getEqualRangeColor,
|
|
3672
|
+
Ht as getViewState,
|
|
3673
|
+
Kr as gradeBlockToThreeGeometry,
|
|
3674
|
+
On as groupRowsByHole,
|
|
3675
|
+
Jn as holeHasData,
|
|
3676
|
+
Bn as interpolateTrace,
|
|
3677
|
+
ni as intervalsAsTubes,
|
|
3678
|
+
Fo as joinAssaysToTraces,
|
|
3679
|
+
No as loadAssayFile,
|
|
3680
|
+
_n as loadAssayHole,
|
|
3681
|
+
yn as loadAssayMetadata,
|
|
3682
|
+
So as loadAssays,
|
|
3683
|
+
wo as loadBlockModelMetadata,
|
|
3684
|
+
Co as loadCollars,
|
|
3685
|
+
Do as loadGeology,
|
|
3686
|
+
li as loadGradeBlocksFromJson,
|
|
3687
|
+
vo as loadSurveys,
|
|
3688
|
+
He as loadTable,
|
|
3689
|
+
po as logDataInfo,
|
|
3690
|
+
ho as logDataWarning,
|
|
3691
|
+
Mr as lookDown,
|
|
3692
|
+
En as minimumCurvatureDesurvey,
|
|
3693
|
+
vn as normalizeBlockRow,
|
|
3694
|
+
go as normalizeCsvRow,
|
|
3695
|
+
Oe as normalizeFieldName,
|
|
3696
|
+
Er as pan,
|
|
3697
|
+
Tn as parseAssayCsvTextToHoles,
|
|
3698
|
+
fn as parseAssayHole,
|
|
3699
|
+
bo as parseAssayHoleIds,
|
|
3700
|
+
mn as parseAssayHoleIdsWithAssays,
|
|
3701
|
+
hn as parseAssaysCSV,
|
|
3702
|
+
To as parseBlockModelCSV,
|
|
3703
|
+
Io as parseDrillholesCSV,
|
|
3704
|
+
wn as parseGeologyCsvText,
|
|
3705
|
+
Pn as parseStructuralCSV,
|
|
3706
|
+
jo as parseStructuralIntervalsCSV,
|
|
3707
|
+
Ho as parseStructuralPointsCSV,
|
|
3708
|
+
zo as parseSurveyCSV,
|
|
3709
|
+
Ro as parseUnifiedDataset,
|
|
3710
|
+
yo as pickFirstPresent,
|
|
3711
|
+
Qo as planView,
|
|
3712
|
+
dr as projectTraceToSection,
|
|
3713
|
+
zr as recenterCameraToOrigin,
|
|
3714
|
+
xt as reorderHoleIds,
|
|
3715
|
+
Yn as resolveColourMap,
|
|
3716
|
+
ei as sectionView,
|
|
3717
|
+
mr as sectionWindow,
|
|
3718
|
+
vr as setControlMode,
|
|
3719
|
+
Cr as setFov,
|
|
3720
|
+
_r as setViewState,
|
|
3721
|
+
be as standardizeColumns,
|
|
3722
|
+
fo as standardizeRowArray,
|
|
3723
|
+
Eo as tangentialDesurvey,
|
|
3724
|
+
cn as toError,
|
|
3725
|
+
ti as tracesAsSegments,
|
|
3726
|
+
Jo as useDrillholeTraceGrid,
|
|
3727
|
+
Vo as validateStructuralPoints,
|
|
3728
|
+
j as withDataErrorContext
|
|
3258
3729
|
};
|
|
3259
3730
|
//# sourceMappingURL=baselode.js.map
|