baselode 0.1.3 → 0.1.4
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 +1548 -1333
- package/dist/baselode.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/baselode.js
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import { OrbitControls as
|
|
7
|
-
import { FlyControls as
|
|
8
|
-
import { ViewportGizmo as
|
|
9
|
-
const
|
|
1
|
+
import W from "papaparse";
|
|
2
|
+
import { jsx as L, jsxs as Q } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as lt, useState as K, useEffect as ae, useMemo as ke } from "react";
|
|
4
|
+
import Ce from "plotly.js-dist-min";
|
|
5
|
+
import * as N from "three";
|
|
6
|
+
import { OrbitControls as Ot } from "three/examples/jsm/controls/OrbitControls";
|
|
7
|
+
import { FlyControls as Vt } from "three/examples/jsm/controls/FlyControls";
|
|
8
|
+
import { ViewportGizmo as wt } from "three-viewport-gizmo";
|
|
9
|
+
const E = "hole_id", te = "latitude", ne = "longitude", ge = "elevation", j = "azimuth", B = "dip", X = "from", G = "to", Re = "mid", se = "project_id", ce = "easting", ue = "northing", at = "crs", Y = "depth", ct = "alpha", ut = "beta", $t = "strike", hr = {
|
|
10
10
|
// A unique hole identifier across the entire dataset and all future data sets
|
|
11
|
-
[
|
|
11
|
+
[E]: "string",
|
|
12
12
|
// The hole ID from the original collar source
|
|
13
13
|
datasource_hole_id: "string",
|
|
14
14
|
// The project ID or project code from the original collar source, if available
|
|
15
|
-
[
|
|
15
|
+
[se]: "string",
|
|
16
16
|
// The latitude of the collar, in decimal degrees (WGS84)
|
|
17
|
-
[ee]: "number",
|
|
18
|
-
// The longitude of the collar, in decimal degrees (WGS84)
|
|
19
17
|
[te]: "number",
|
|
18
|
+
// The longitude of the collar, in decimal degrees (WGS84)
|
|
19
|
+
[ne]: "number",
|
|
20
20
|
// The elevation of the collar, in meters above sea level (WGS84)
|
|
21
|
-
[
|
|
21
|
+
[ge]: "number",
|
|
22
22
|
// The easting coordinate of the collar, in meters (projected CRS)
|
|
23
|
-
[
|
|
23
|
+
[ce]: "number",
|
|
24
24
|
// The northing coordinate of the collar, in meters (projected CRS)
|
|
25
|
-
[
|
|
25
|
+
[ue]: "number",
|
|
26
26
|
// The coordinate reference system of the collar coordinates for easting/northing, as an EPSG code or proj string
|
|
27
|
-
[
|
|
28
|
-
},
|
|
27
|
+
[at]: "string"
|
|
28
|
+
}, pr = {
|
|
29
29
|
// The unique hole id that maps to the collar and any other data tables
|
|
30
|
-
[
|
|
30
|
+
[E]: "string",
|
|
31
31
|
// The depth along the hole where the survey measurement was taken / started
|
|
32
|
-
[
|
|
32
|
+
[Y]: "number",
|
|
33
33
|
// The depth along the hole where the survey measurement ended, if applicable (some surveys are point measurements and may not have a 'to' depth)
|
|
34
|
-
[
|
|
34
|
+
[G]: "number",
|
|
35
35
|
// The azimuth of the hole at the survey depth, in degrees from north
|
|
36
|
-
[
|
|
36
|
+
[j]: "number",
|
|
37
37
|
// The dip of the hole at the survey depth, in degrees from horizontal (negative values indicate downward inclination)
|
|
38
|
-
[
|
|
39
|
-
},
|
|
38
|
+
[B]: "number"
|
|
39
|
+
}, br = {
|
|
40
40
|
// The unique hole id that maps to the collar and any other data tables
|
|
41
|
-
[
|
|
41
|
+
[E]: "string",
|
|
42
42
|
// The depth along the hole where the assay interval starts
|
|
43
|
-
[
|
|
43
|
+
[X]: "number",
|
|
44
44
|
// The depth along the hole where the assay interval ends
|
|
45
|
-
[
|
|
45
|
+
[G]: "number",
|
|
46
46
|
// The midpoint depth of the assay interval
|
|
47
|
-
[
|
|
47
|
+
[Re]: "number"
|
|
48
48
|
// assay value columns are variable and not standardized here.
|
|
49
49
|
// Assays may be flattened (one column per assay type) or long (one row per assay type with an additional 'assay_type' column)
|
|
50
|
-
},
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
50
|
+
}, yr = {
|
|
51
|
+
[E]: "string",
|
|
52
|
+
[Y]: "number",
|
|
53
|
+
[B]: "number",
|
|
54
|
+
[j]: "number",
|
|
55
|
+
[ct]: "number",
|
|
56
|
+
[ut]: "number",
|
|
57
57
|
comments: "string"
|
|
58
|
-
},
|
|
59
|
-
[
|
|
58
|
+
}, Rt = {
|
|
59
|
+
[E]: ["hole_id", "holeid", "hole id", "hole-id"],
|
|
60
60
|
datasource_hole_id: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
},
|
|
77
|
-
for (const [e, t] of Object.entries(
|
|
61
|
+
[se]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
|
|
62
|
+
[te]: ["latitude", "lat"],
|
|
63
|
+
[ne]: ["longitude", "lon"],
|
|
64
|
+
[ge]: ["elevation", "rl", "elev", "z"],
|
|
65
|
+
[ce]: ["easting", "x"],
|
|
66
|
+
[ue]: ["northing", "y"],
|
|
67
|
+
[at]: ["crs", "epsg", "projection"],
|
|
68
|
+
[X]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
|
|
69
|
+
[G]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
|
|
70
|
+
[j]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdrn", "dipdir_calc", "dipdirect_calc"],
|
|
71
|
+
[B]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
|
|
72
|
+
[ct]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
|
|
73
|
+
[ut]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
|
|
74
|
+
[Y]: ["depth", "survey_depth", "surveydepth"],
|
|
75
|
+
[$t]: ["strike", "str"]
|
|
76
|
+
}, mt = {};
|
|
77
|
+
for (const [e, t] of Object.entries(Rt))
|
|
78
78
|
for (const n of t) {
|
|
79
79
|
const r = n.toLowerCase().trim();
|
|
80
|
-
|
|
80
|
+
mt[r] = e;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ie(e) {
|
|
83
83
|
return (e || "").toString().trim().toLowerCase().replace(/\s+/g, "_");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
const r = { ...
|
|
85
|
+
function pe(e, t = null, n = null) {
|
|
86
|
+
const r = { ...mt };
|
|
87
87
|
if (n) {
|
|
88
|
-
for (const [
|
|
89
|
-
if (
|
|
90
|
-
const
|
|
91
|
-
r[
|
|
88
|
+
for (const [s, i] of Object.entries(n))
|
|
89
|
+
if (s != null && i != null) {
|
|
90
|
+
const c = Ie(s), u = Ie(i);
|
|
91
|
+
r[c] = u;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
const o = {};
|
|
95
|
-
for (const [
|
|
96
|
-
const
|
|
97
|
-
o[u] =
|
|
95
|
+
for (const [s, i] of Object.entries(e)) {
|
|
96
|
+
const c = Ie(s), u = r[c] || c;
|
|
97
|
+
o[u] = i;
|
|
98
98
|
}
|
|
99
99
|
return o;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
return e.map((r) =>
|
|
101
|
+
function gr(e, t = null, n = null) {
|
|
102
|
+
return e.map((r) => pe(r, t, n));
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const Ht = /* @__PURE__ */ new Set([
|
|
105
105
|
"hole_id",
|
|
106
106
|
"holeid",
|
|
107
107
|
"id",
|
|
@@ -133,153 +133,153 @@ const Pt = /* @__PURE__ */ new Set([
|
|
|
133
133
|
"todepth",
|
|
134
134
|
"comment",
|
|
135
135
|
"z"
|
|
136
|
-
]),
|
|
137
|
-
function
|
|
136
|
+
]), Ve = "[baselode:data]";
|
|
137
|
+
function jt(e, t = "Unknown error") {
|
|
138
138
|
if (e instanceof Error) return e;
|
|
139
139
|
const n = typeof e == "string" && e.trim() ? e : t;
|
|
140
140
|
return new Error(n);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const r =
|
|
142
|
+
function w(e, t, n = "Operation failed") {
|
|
143
|
+
const r = jt(t, n), o = new Error(`${e}: ${r.message}`);
|
|
144
144
|
return o.cause = r, o;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function _r(e, t) {
|
|
147
147
|
if (t !== void 0) {
|
|
148
|
-
console.warn(`${
|
|
148
|
+
console.warn(`${Ve} ${e}`, t);
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
console.warn(`${
|
|
151
|
+
console.warn(`${Ve} ${e}`);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
console.info(`${
|
|
153
|
+
function xr(e) {
|
|
154
|
+
console.info(`${Ve} ${e}`);
|
|
155
155
|
}
|
|
156
|
-
const Se = (e, t = null) =>
|
|
157
|
-
function
|
|
158
|
-
return { holeId: e[
|
|
156
|
+
const Se = (e, t = null) => pe(e, null, t);
|
|
157
|
+
function Bt(e) {
|
|
158
|
+
return { holeId: e[E] };
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
const n = e[
|
|
160
|
+
function dt(e, t = null) {
|
|
161
|
+
const n = e[E], r = n !== void 0 ? `${n}`.trim() : "";
|
|
162
162
|
if (!r) return null;
|
|
163
|
-
const o = e[
|
|
164
|
-
return !Number.isFinite(
|
|
163
|
+
const o = e[se] || e.project || e.project_code, s = Number(e[X]), i = Number(e[G]);
|
|
164
|
+
return !Number.isFinite(s) || !Number.isFinite(i) || i <= s ? null : {
|
|
165
165
|
holeId: r,
|
|
166
166
|
project: o,
|
|
167
|
-
from:
|
|
168
|
-
to:
|
|
167
|
+
from: s,
|
|
168
|
+
to: i,
|
|
169
169
|
...e
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function ft(e, t) {
|
|
173
173
|
var o;
|
|
174
|
-
const n = t.sort((
|
|
175
|
-
return n.forEach((
|
|
176
|
-
const { from:
|
|
177
|
-
z:
|
|
178
|
-
from:
|
|
179
|
-
to:
|
|
180
|
-
[
|
|
181
|
-
[
|
|
182
|
-
...
|
|
174
|
+
const n = t.sort((s, i) => s.from - i.from), r = [];
|
|
175
|
+
return n.forEach((s) => {
|
|
176
|
+
const { from: i, to: c, project: u, ...l } = s, a = {
|
|
177
|
+
z: i,
|
|
178
|
+
from: i,
|
|
179
|
+
to: c,
|
|
180
|
+
[E]: e,
|
|
181
|
+
[se]: u,
|
|
182
|
+
...l
|
|
183
183
|
};
|
|
184
|
-
r.push(
|
|
184
|
+
r.push(a), r.push({ ...a, z: c });
|
|
185
185
|
}), { id: e, project: (o = n[0]) == null ? void 0 : o.project, points: r };
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Nr(e, t = null) {
|
|
188
188
|
return new Promise((n, r) => {
|
|
189
189
|
const o = /* @__PURE__ */ new Set();
|
|
190
|
-
|
|
190
|
+
W.parse(e, {
|
|
191
191
|
header: !0,
|
|
192
192
|
dynamicTyping: !0,
|
|
193
193
|
skipEmptyLines: !0,
|
|
194
|
-
step: (
|
|
195
|
-
const
|
|
196
|
-
|
|
194
|
+
step: (s) => {
|
|
195
|
+
const c = Se(s.data, t)[E];
|
|
196
|
+
c !== void 0 && `${c}`.trim() !== "" && o.add(`${c}`.trim());
|
|
197
197
|
},
|
|
198
198
|
complete: () => n(Array.from(o)),
|
|
199
|
-
error: (
|
|
199
|
+
error: (s) => r(w("parseAssayHoleIds", s))
|
|
200
200
|
});
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
return Object.entries(e || {}).some(([t, n]) => !(
|
|
203
|
+
function Gt(e) {
|
|
204
|
+
return Object.entries(e || {}).some(([t, n]) => !(Ht.has(t) || n == null || typeof n == "string" && n.trim() === ""));
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Ut(e, t = null) {
|
|
207
207
|
return new Promise((n, r) => {
|
|
208
208
|
const o = /* @__PURE__ */ new Map();
|
|
209
|
-
|
|
209
|
+
W.parse(e, {
|
|
210
210
|
header: !0,
|
|
211
211
|
dynamicTyping: !0,
|
|
212
212
|
skipEmptyLines: !0,
|
|
213
|
-
step: (
|
|
214
|
-
const
|
|
215
|
-
if (!
|
|
216
|
-
const u =
|
|
213
|
+
step: (s) => {
|
|
214
|
+
const i = Se(s.data, t);
|
|
215
|
+
if (!Gt(i)) return;
|
|
216
|
+
const u = Bt(i).holeId;
|
|
217
217
|
if (u !== void 0 && `${u}`.trim() !== "") {
|
|
218
|
-
const
|
|
219
|
-
o.has(
|
|
220
|
-
holeId:
|
|
218
|
+
const l = `${u}`.trim();
|
|
219
|
+
o.has(l) || o.set(l, {
|
|
220
|
+
holeId: l
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
complete: () => n(Array.from(o.values())),
|
|
225
|
-
error: (
|
|
225
|
+
error: (s) => r(w("parseAssayHoleIdsWithAssays", s))
|
|
226
226
|
});
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
return new Promise((o,
|
|
231
|
-
const
|
|
232
|
-
if (!
|
|
233
|
-
|
|
229
|
+
function Yt(e, t, n = null, r = null) {
|
|
230
|
+
return new Promise((o, s) => {
|
|
231
|
+
const i = `${t}`.trim();
|
|
232
|
+
if (!i) {
|
|
233
|
+
s(w("parseAssayHole", new Error("Missing hole id")));
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
|
-
const
|
|
237
|
-
|
|
236
|
+
const c = [];
|
|
237
|
+
W.parse(e, {
|
|
238
238
|
header: !0,
|
|
239
239
|
dynamicTyping: !0,
|
|
240
240
|
skipEmptyLines: !0,
|
|
241
241
|
step: (u) => {
|
|
242
|
-
const
|
|
243
|
-
|
|
242
|
+
const l = Se(u.data, r), a = dt(l, r);
|
|
243
|
+
a && `${a.holeId}`.trim() === i && c.push(a);
|
|
244
244
|
},
|
|
245
245
|
complete: () => {
|
|
246
|
-
if (!
|
|
246
|
+
if (!c.length) {
|
|
247
247
|
o(null);
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
|
-
const u =
|
|
250
|
+
const u = ft(i, c);
|
|
251
251
|
o(u);
|
|
252
252
|
},
|
|
253
|
-
error: (u) =>
|
|
253
|
+
error: (u) => s(w("parseAssayHole", u))
|
|
254
254
|
});
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function qt(e, t = null, n = null) {
|
|
258
258
|
return new Promise((r, o) => {
|
|
259
|
-
|
|
259
|
+
W.parse(e, {
|
|
260
260
|
header: !0,
|
|
261
261
|
dynamicTyping: !0,
|
|
262
262
|
skipEmptyLines: !0,
|
|
263
|
-
complete: (
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
const
|
|
267
|
-
|
|
263
|
+
complete: (s) => {
|
|
264
|
+
const i = /* @__PURE__ */ new Map();
|
|
265
|
+
s.data.forEach((u) => {
|
|
266
|
+
const l = Se(u, n), a = dt(l, n);
|
|
267
|
+
a && (i.has(a.holeId) || i.set(a.holeId, []), i.get(a.holeId).push(a));
|
|
268
268
|
});
|
|
269
|
-
const
|
|
270
|
-
r({ holes:
|
|
269
|
+
const c = Array.from(i.entries()).map(([u, l]) => ft(u, l));
|
|
270
|
+
r({ holes: c });
|
|
271
271
|
},
|
|
272
|
-
error: (
|
|
272
|
+
error: (s) => o(w("parseAssaysCSV", s))
|
|
273
273
|
});
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function zr(e = {}) {
|
|
277
277
|
const t = {};
|
|
278
278
|
return Object.entries(e || {}).forEach(([n, r]) => {
|
|
279
|
-
n && (t[
|
|
279
|
+
n && (t[Ie(n)] = r);
|
|
280
280
|
}), t;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Mr(e = {}, t = [], n) {
|
|
283
283
|
for (const r of t) {
|
|
284
284
|
const o = e[r];
|
|
285
285
|
if (o != null && `${o}`.trim() !== "")
|
|
@@ -287,16 +287,16 @@ function lr(e = {}, t = [], n) {
|
|
|
287
287
|
}
|
|
288
288
|
return n;
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
function
|
|
290
|
+
const Xt = 4;
|
|
291
|
+
function ht(e = [], t = "") {
|
|
292
292
|
if (!e.length) return [];
|
|
293
293
|
if (!t) return e;
|
|
294
|
-
const n = e.findIndex((
|
|
294
|
+
const n = e.findIndex((s) => s === t);
|
|
295
295
|
if (n === -1) return e;
|
|
296
|
-
const r = e[n], o = e.filter((
|
|
296
|
+
const r = e[n], o = e.filter((s, i) => i !== n);
|
|
297
297
|
return [r, ...o];
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Ae({
|
|
300
300
|
property: e = "",
|
|
301
301
|
chartType: t = "",
|
|
302
302
|
categoricalProps: n = [],
|
|
@@ -305,49 +305,49 @@ function Me({
|
|
|
305
305
|
} = {}) {
|
|
306
306
|
return e ? r.includes(e) ? "comment" : n.includes(e) ? "categorical" : e === "dip" ? "tadpole" : !t || t === "categorical" || t === "comment" || t === "tadpole" ? o : t : t || o;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function pt({
|
|
309
309
|
holeIds: e = [],
|
|
310
310
|
focusedHoleId: t = "",
|
|
311
|
-
plotCount: n =
|
|
311
|
+
plotCount: n = Xt,
|
|
312
312
|
defaultProp: r = "",
|
|
313
313
|
categoricalProps: o = [],
|
|
314
|
-
commentProps:
|
|
315
|
-
numericDefaultChartType:
|
|
314
|
+
commentProps: s = [],
|
|
315
|
+
numericDefaultChartType: i = "markers+line"
|
|
316
316
|
} = {}) {
|
|
317
|
-
const
|
|
318
|
-
return Array.from({ length: n }).map((u,
|
|
319
|
-
const
|
|
317
|
+
const c = ht(e, t);
|
|
318
|
+
return Array.from({ length: n }).map((u, l) => {
|
|
319
|
+
const a = c[l] || e[l] || "", m = Ae({
|
|
320
320
|
property: r,
|
|
321
321
|
chartType: "",
|
|
322
322
|
categoricalProps: o,
|
|
323
|
-
commentProps:
|
|
324
|
-
numericDefaultChartType:
|
|
323
|
+
commentProps: s,
|
|
324
|
+
numericDefaultChartType: i
|
|
325
325
|
});
|
|
326
326
|
return {
|
|
327
|
-
holeId:
|
|
327
|
+
holeId: a,
|
|
328
328
|
property: r,
|
|
329
329
|
chartType: m
|
|
330
330
|
};
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
const
|
|
334
|
-
[
|
|
333
|
+
const xe = "numeric", Me = "categorical", _e = "comment", ve = "hidden", we = "tadpole", Xe = {
|
|
334
|
+
[xe]: [
|
|
335
335
|
{ value: "bar", label: "Bars" },
|
|
336
336
|
{ value: "markers", label: "Markers" },
|
|
337
337
|
{ value: "markers+line", label: "Markers + Line" },
|
|
338
338
|
{ value: "line", label: "Line only" }
|
|
339
339
|
],
|
|
340
|
-
[
|
|
340
|
+
[Me]: [
|
|
341
341
|
{ value: "categorical", label: "Categorical bands" }
|
|
342
342
|
],
|
|
343
|
-
[
|
|
343
|
+
[_e]: [
|
|
344
344
|
{ value: "comment", label: "Comments" }
|
|
345
345
|
],
|
|
346
|
-
[
|
|
346
|
+
[we]: [
|
|
347
347
|
{ value: "tadpole", label: "Tadpole" }
|
|
348
348
|
],
|
|
349
|
-
[
|
|
350
|
-
},
|
|
349
|
+
[ve]: []
|
|
350
|
+
}, Ze = /* @__PURE__ */ new Set([
|
|
351
351
|
// Hole identifiers
|
|
352
352
|
"hole_id",
|
|
353
353
|
"holeid",
|
|
@@ -402,7 +402,7 @@ const ye = "numeric", _e = "categorical", pe = "comment", Ce = "hidden", Oe = "t
|
|
|
402
402
|
"data_source",
|
|
403
403
|
"_hole_key",
|
|
404
404
|
"_hole_id_key"
|
|
405
|
-
]),
|
|
405
|
+
]), Zt = /* @__PURE__ */ new Set([
|
|
406
406
|
"comments",
|
|
407
407
|
"comment",
|
|
408
408
|
"notes",
|
|
@@ -414,71 +414,71 @@ const ye = "numeric", _e = "categorical", pe = "comment", Ce = "hidden", Oe = "t
|
|
|
414
414
|
"struct_comment",
|
|
415
415
|
"structcomment"
|
|
416
416
|
]);
|
|
417
|
-
function
|
|
417
|
+
function Wt(e) {
|
|
418
418
|
if (!(e != null && e.length))
|
|
419
419
|
return { byType: {}, numericCols: [], categoricalCols: [], commentCols: [] };
|
|
420
420
|
const t = new Set(e.flatMap((r) => Object.keys(r || {}))), n = {};
|
|
421
421
|
for (const r of t) {
|
|
422
422
|
const o = r.toLowerCase().trim();
|
|
423
|
-
if (
|
|
424
|
-
n[r] =
|
|
423
|
+
if (Ze.has(o) || Ze.has(r)) {
|
|
424
|
+
n[r] = ve;
|
|
425
425
|
continue;
|
|
426
426
|
}
|
|
427
|
-
if (
|
|
428
|
-
const
|
|
429
|
-
const
|
|
430
|
-
return
|
|
427
|
+
if (Zt.has(o)) {
|
|
428
|
+
const c = e.some((u) => {
|
|
429
|
+
const l = u[r];
|
|
430
|
+
return l != null && String(l).trim() !== "" && String(l) !== "null";
|
|
431
431
|
});
|
|
432
|
-
n[r] =
|
|
432
|
+
n[r] = c ? _e : ve;
|
|
433
433
|
continue;
|
|
434
434
|
}
|
|
435
|
-
let
|
|
436
|
-
for (const
|
|
437
|
-
const u =
|
|
438
|
-
if (!(u == null || typeof u == "string" && u.trim() === "") && (
|
|
439
|
-
|
|
435
|
+
let s = !1, i = !1;
|
|
436
|
+
for (const c of e) {
|
|
437
|
+
const u = c[r];
|
|
438
|
+
if (!(u == null || typeof u == "string" && u.trim() === "") && (i = !0, typeof u == "number" && Number.isFinite(u))) {
|
|
439
|
+
s = !0;
|
|
440
440
|
break;
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
|
|
443
|
+
i ? s ? n[r] = xe : n[r] = Me : n[r] = ve;
|
|
444
444
|
}
|
|
445
445
|
return {
|
|
446
446
|
byType: n,
|
|
447
|
-
numericCols: Object.entries(n).filter(([, r]) => r ===
|
|
448
|
-
categoricalCols: Object.entries(n).filter(([, r]) => r ===
|
|
449
|
-
commentCols: Object.entries(n).filter(([, r]) => r ===
|
|
447
|
+
numericCols: Object.entries(n).filter(([, r]) => r === xe).map(([r]) => r),
|
|
448
|
+
categoricalCols: Object.entries(n).filter(([, r]) => r === Me).map(([r]) => r),
|
|
449
|
+
commentCols: Object.entries(n).filter(([, r]) => r === _e).map(([r]) => r)
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
return
|
|
452
|
+
function He(e) {
|
|
453
|
+
return Xe[e] ?? Xe[xe];
|
|
454
454
|
}
|
|
455
|
-
function
|
|
456
|
-
const t =
|
|
457
|
-
return t.length ? e ===
|
|
455
|
+
function Cr(e) {
|
|
456
|
+
const t = He(e);
|
|
457
|
+
return t.length ? e === xe ? "line" : t[0].value : "markers+line";
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
const t = e.flatMap((
|
|
459
|
+
function Ee(e = []) {
|
|
460
|
+
const t = e.flatMap((c) => c.points || []), { numericCols: n, categoricalCols: r, commentCols: o, byType: s } = Wt(t), i = n[0] || r[0] || "";
|
|
461
461
|
return {
|
|
462
462
|
numericProps: n,
|
|
463
463
|
categoricalProps: r,
|
|
464
464
|
commentProps: o,
|
|
465
|
-
columnMeta:
|
|
466
|
-
defaultProp:
|
|
465
|
+
columnMeta: s,
|
|
466
|
+
defaultProp: i
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
async function
|
|
470
|
-
return await
|
|
469
|
+
async function Kt(e, t = null) {
|
|
470
|
+
return await Ut(e);
|
|
471
471
|
}
|
|
472
|
-
async function
|
|
473
|
-
return await
|
|
472
|
+
async function Jt(e, t, n = null) {
|
|
473
|
+
return await Yt(e, t);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Qt(e = [], t = "") {
|
|
476
476
|
if (!e.length) return null;
|
|
477
|
-
const { numericProps: n, categoricalProps: r, commentProps: o, columnMeta:
|
|
478
|
-
holeIds:
|
|
477
|
+
const { numericProps: n, categoricalProps: r, commentProps: o, columnMeta: s, defaultProp: i } = Ee(e), c = e.map((l) => l.id || l.holeId).filter(Boolean), u = pt({
|
|
478
|
+
holeIds: c,
|
|
479
479
|
focusedHoleId: t,
|
|
480
480
|
plotCount: 4,
|
|
481
|
-
defaultProp:
|
|
481
|
+
defaultProp: i,
|
|
482
482
|
categoricalProps: r,
|
|
483
483
|
commentProps: o,
|
|
484
484
|
numericDefaultChartType: "line"
|
|
@@ -488,160 +488,160 @@ function jt(e = [], t = "") {
|
|
|
488
488
|
numericProps: n,
|
|
489
489
|
categoricalProps: r,
|
|
490
490
|
commentProps: o,
|
|
491
|
-
columnMeta:
|
|
492
|
-
defaultProp:
|
|
491
|
+
columnMeta: s,
|
|
492
|
+
defaultProp: i,
|
|
493
493
|
traceConfigs: u
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
async function
|
|
497
|
-
const { holes: r } = await
|
|
496
|
+
async function Ir(e, t = "", n = null) {
|
|
497
|
+
const { holes: r } = await qt(e, n), o = Qt(r, t);
|
|
498
498
|
if (!o) throw new Error("No valid assay intervals found.");
|
|
499
499
|
return o;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Ar(e, t = null) {
|
|
502
502
|
return new Promise((n, r) => {
|
|
503
|
-
|
|
503
|
+
W.parse(e, {
|
|
504
504
|
header: !0,
|
|
505
505
|
dynamicTyping: !0,
|
|
506
506
|
skipEmptyLines: !0,
|
|
507
507
|
complete: (o) => {
|
|
508
|
-
const
|
|
509
|
-
n(
|
|
508
|
+
const s = o.data.map((i) => en(i, t)).filter((i) => i[E] && Number.isFinite(i[Y]) && Number.isFinite(i[B]) && Number.isFinite(i[j]));
|
|
509
|
+
n(s);
|
|
510
510
|
},
|
|
511
|
-
error: (o) => r(
|
|
511
|
+
error: (o) => r(w("parseSurveyCSV", o))
|
|
512
512
|
});
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
const n =
|
|
515
|
+
function en(e, t = null) {
|
|
516
|
+
const n = pe(e, null, t), r = n[E], o = n[se] || n.project || n.project_code, s = ye(n[te]), i = ye(n[ne]), c = ye(n[Y]), u = ye(n[B]), l = ye(n[j]), a = ye(n.maxdepth);
|
|
517
517
|
return {
|
|
518
518
|
raw: n,
|
|
519
|
-
[
|
|
520
|
-
[
|
|
521
|
-
[ee]: i,
|
|
519
|
+
[E]: r,
|
|
520
|
+
[se]: o,
|
|
522
521
|
[te]: s,
|
|
523
|
-
[
|
|
524
|
-
[
|
|
525
|
-
[
|
|
526
|
-
|
|
522
|
+
[ne]: i,
|
|
523
|
+
[Y]: c,
|
|
524
|
+
[B]: u,
|
|
525
|
+
[j]: l,
|
|
526
|
+
maxdepth: a,
|
|
527
527
|
// Legacy field names for backwards compatibility
|
|
528
528
|
project_code: o,
|
|
529
|
-
latitude:
|
|
530
|
-
longitude:
|
|
531
|
-
surveydepth:
|
|
529
|
+
latitude: s,
|
|
530
|
+
longitude: i,
|
|
531
|
+
surveydepth: c
|
|
532
532
|
};
|
|
533
533
|
}
|
|
534
|
-
const
|
|
534
|
+
const ye = (e) => {
|
|
535
535
|
const t = Number(e);
|
|
536
536
|
return Number.isFinite(t) ? t : void 0;
|
|
537
537
|
};
|
|
538
|
-
function
|
|
539
|
-
var
|
|
538
|
+
function vr(e, t) {
|
|
539
|
+
var l, a, m, d;
|
|
540
540
|
const n = /* @__PURE__ */ new Map();
|
|
541
541
|
e.forEach((f) => {
|
|
542
|
-
const
|
|
543
|
-
if (!
|
|
544
|
-
const p =
|
|
542
|
+
const b = (f[E] || f.holeId || f.id || "").toString().trim();
|
|
543
|
+
if (!b) return;
|
|
544
|
+
const p = b.toLowerCase();
|
|
545
545
|
n.has(p) || n.set(p, f);
|
|
546
546
|
});
|
|
547
|
-
const r = ((
|
|
547
|
+
const r = ((l = e[0]) == null ? void 0 : l.lat) ?? ((a = e[0]) == null ? void 0 : a[te]) ?? 0, o = ((m = e[0]) == null ? void 0 : m.lng) ?? ((d = e[0]) == null ? void 0 : d[ne]) ?? 0, s = 111132, i = 111320 * Math.cos(r * Math.PI / 180), c = /* @__PURE__ */ new Map();
|
|
548
548
|
t.forEach((f) => {
|
|
549
|
-
const
|
|
550
|
-
if (!
|
|
551
|
-
const p =
|
|
552
|
-
|
|
549
|
+
const b = (f[E] || "").toString().trim();
|
|
550
|
+
if (!b) return;
|
|
551
|
+
const p = b.toLowerCase();
|
|
552
|
+
c.has(p) || c.set(p, []), c.get(p).push(f);
|
|
553
553
|
});
|
|
554
554
|
const u = [];
|
|
555
|
-
return
|
|
556
|
-
const p = n.get(
|
|
555
|
+
return c.forEach((f, b) => {
|
|
556
|
+
const p = n.get(b);
|
|
557
557
|
if (!p) return;
|
|
558
|
-
const h = f.filter((
|
|
558
|
+
const h = f.filter((T) => Number.isFinite(T[Y] ?? T.surveydepth)).sort((T, R) => (T[Y] ?? T.surveydepth) - (R[Y] ?? R.surveydepth));
|
|
559
559
|
if (!h.length) return;
|
|
560
|
-
const
|
|
561
|
-
let M = 0,
|
|
562
|
-
for (let
|
|
563
|
-
const
|
|
564
|
-
if (!
|
|
565
|
-
|
|
566
|
-
x:
|
|
567
|
-
y:
|
|
560
|
+
const _ = p.lat ?? p[te], y = p.lng ?? p[ne], I = 111132, z = 111320 * Math.cos(_ * Math.PI / 180), x = (y - o) * i, D = (_ - r) * s, S = [];
|
|
561
|
+
let M = 0, O = 0, $ = 0;
|
|
562
|
+
for (let T = 0; T < h.length; T += 1) {
|
|
563
|
+
const R = h[T], q = h[T - 1], A = R[Y] ?? R.surveydepth, v = R[j] ?? R.azimuth, P = R[B] ?? R.dip;
|
|
564
|
+
if (!q) {
|
|
565
|
+
S.push({
|
|
566
|
+
x: x + M,
|
|
567
|
+
y: D + O,
|
|
568
568
|
z: 0,
|
|
569
|
-
md:
|
|
570
|
-
azimuth:
|
|
571
|
-
dip:
|
|
569
|
+
md: A,
|
|
570
|
+
azimuth: v,
|
|
571
|
+
dip: P
|
|
572
572
|
});
|
|
573
573
|
continue;
|
|
574
574
|
}
|
|
575
|
-
const
|
|
576
|
-
if (
|
|
577
|
-
const
|
|
578
|
-
Math.sin(
|
|
579
|
-
),
|
|
580
|
-
M +=
|
|
581
|
-
x:
|
|
582
|
-
y:
|
|
583
|
-
z:
|
|
575
|
+
const g = q[Y] ?? q.surveydepth, C = q[j] ?? q.azimuth, F = q[B] ?? q.dip, V = A - g;
|
|
576
|
+
if (V <= 0) continue;
|
|
577
|
+
const k = We(F), H = We(P), U = $e(C), re = $e(v), de = Math.acos(
|
|
578
|
+
Math.sin(k) * Math.sin(H) * Math.cos(U - re) + Math.cos(k) * Math.cos(H)
|
|
579
|
+
), ie = de > 1e-6 ? 2 / de * Math.tan(de / 2) : 1, Ne = 0.5 * V * (Math.sin(k) * Math.cos(U) + Math.sin(H) * Math.cos(re)) * ie, le = 0.5 * V * (Math.sin(k) * Math.sin(U) + Math.sin(H) * Math.sin(re)) * ie, Pe = 0.5 * V * (Math.cos(k) + Math.cos(H)) * ie;
|
|
580
|
+
M += Ne, O += le, $ += Pe, S.push({
|
|
581
|
+
x: x + M,
|
|
582
|
+
y: D + O,
|
|
583
|
+
z: -$,
|
|
584
584
|
// render with z up; depth down
|
|
585
|
-
md:
|
|
586
|
-
azimuth:
|
|
587
|
-
dip:
|
|
585
|
+
md: A,
|
|
586
|
+
azimuth: v,
|
|
587
|
+
dip: P
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
|
-
const
|
|
591
|
-
...
|
|
592
|
-
lat:
|
|
593
|
-
lng:
|
|
590
|
+
const Z = S.map((T) => ({
|
|
591
|
+
...T,
|
|
592
|
+
lat: _ + T.y / I,
|
|
593
|
+
lng: y + T.x / z
|
|
594
594
|
}));
|
|
595
595
|
u.push({
|
|
596
|
-
id: p[
|
|
597
|
-
project: p[
|
|
598
|
-
points:
|
|
596
|
+
id: p[E] || p.holeId || b,
|
|
597
|
+
project: p[se] || p.project_id || p.project || "",
|
|
598
|
+
points: Z,
|
|
599
599
|
collar: p
|
|
600
600
|
});
|
|
601
601
|
}), u;
|
|
602
602
|
}
|
|
603
|
-
const
|
|
603
|
+
const $e = (e) => e * Math.PI / 180, We = (e) => {
|
|
604
604
|
const t = Number(e), n = 90 + (Number.isFinite(t) ? t : 0), r = Math.min(180, Math.max(0, n));
|
|
605
|
-
return
|
|
605
|
+
return $e(r);
|
|
606
606
|
};
|
|
607
|
-
function
|
|
607
|
+
function ee(e, t = void 0) {
|
|
608
608
|
const n = Number(e);
|
|
609
609
|
return Number.isFinite(n) ? n : t;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function Ke(e) {
|
|
612
612
|
return e == null ? "" : `${e}`.trim();
|
|
613
613
|
}
|
|
614
|
-
function
|
|
615
|
-
const n = t || "hole_id", o = [n, "hole_id", "holeId", "id"].find((
|
|
614
|
+
function De(e = [], t = null) {
|
|
615
|
+
const n = t || "hole_id", o = [n, "hole_id", "holeId", "id"].find((s) => e.some((i) => Ke(i == null ? void 0 : i[s])));
|
|
616
616
|
if (!o)
|
|
617
|
-
throw
|
|
617
|
+
throw w("canonicalizeHoleIdRows", new Error(`hole id column '${n}' not found`));
|
|
618
618
|
return {
|
|
619
619
|
aliasCol: o,
|
|
620
|
-
rows: e.map((
|
|
621
|
-
...
|
|
622
|
-
hole_id:
|
|
620
|
+
rows: e.map((s) => ({
|
|
621
|
+
...s,
|
|
622
|
+
hole_id: Ke(s == null ? void 0 : s[o])
|
|
623
623
|
}))
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function Je(e) {
|
|
627
627
|
return Number(e) * Math.PI / 180;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
const n =
|
|
631
|
-
return { ca: o, cb:
|
|
629
|
+
function Le(e, t) {
|
|
630
|
+
const n = Je(e), r = Je(t), o = Math.cos(r) * Math.sin(n), s = Math.cos(r) * Math.cos(n), i = Math.sin(r) * -1;
|
|
631
|
+
return { ca: o, cb: s, cc: i };
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
const
|
|
635
|
-
if (
|
|
633
|
+
function tn(e, t, n, r, o, s = "minimum_curvature") {
|
|
634
|
+
const i = Le(t, n), c = Le(r, o);
|
|
635
|
+
if (s === "tangential")
|
|
636
636
|
return {
|
|
637
|
-
dx: e *
|
|
638
|
-
dy: e *
|
|
639
|
-
dz: e *
|
|
637
|
+
dx: e * i.ca,
|
|
638
|
+
dy: e * i.cb,
|
|
639
|
+
dz: e * i.cc,
|
|
640
640
|
azimuth: t,
|
|
641
641
|
dip: n
|
|
642
642
|
};
|
|
643
|
-
if (
|
|
644
|
-
const m = 0.5 * (t + r), d = 0.5 * (n + o), f =
|
|
643
|
+
if (s === "balanced_tangential") {
|
|
644
|
+
const m = 0.5 * (t + r), d = 0.5 * (n + o), f = Le(m, d);
|
|
645
645
|
return {
|
|
646
646
|
dx: e * f.ca,
|
|
647
647
|
dy: e * f.cb,
|
|
@@ -650,293 +650,293 @@ function Bt(e, t, n, r, o, i = "minimum_curvature") {
|
|
|
650
650
|
dip: d
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
const u =
|
|
653
|
+
const u = i.ca * c.ca + i.cb * c.cb + i.cc * c.cc, l = Math.acos(Math.max(-1, Math.min(1, u))), a = l > 1e-6 ? 2 * Math.tan(l / 2) / l : 1;
|
|
654
654
|
return {
|
|
655
|
-
dx: 0.5 * e * (
|
|
656
|
-
dy: 0.5 * e * (
|
|
657
|
-
dz: 0.5 * e * (
|
|
655
|
+
dx: 0.5 * e * (i.ca + c.ca) * a,
|
|
656
|
+
dy: 0.5 * e * (i.cb + c.cb) * a,
|
|
657
|
+
dz: 0.5 * e * (i.cc + c.cc) * a,
|
|
658
658
|
azimuth: r,
|
|
659
659
|
dip: o
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function je(e = [], t = [], n = {}) {
|
|
663
663
|
const {
|
|
664
664
|
step: r = 1,
|
|
665
665
|
holeIdCol: o = null,
|
|
666
|
-
method:
|
|
667
|
-
} = n,
|
|
668
|
-
if (!
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
!d.hole_id ||
|
|
666
|
+
method: s = "minimum_curvature"
|
|
667
|
+
} = n, i = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, c = De(e, o), u = De(t, o || c.aliasCol);
|
|
668
|
+
if (!c.rows.length || !u.rows.length) return [];
|
|
669
|
+
const l = /* @__PURE__ */ new Map();
|
|
670
|
+
c.rows.forEach((d) => {
|
|
671
|
+
!d.hole_id || l.has(d.hole_id) || l.set(d.hole_id, d);
|
|
672
672
|
});
|
|
673
|
-
const
|
|
673
|
+
const a = /* @__PURE__ */ new Map();
|
|
674
674
|
u.rows.forEach((d) => {
|
|
675
|
-
d.hole_id && (
|
|
675
|
+
d.hole_id && (a.has(d.hole_id) || a.set(d.hole_id, []), a.get(d.hole_id).push(d));
|
|
676
676
|
});
|
|
677
677
|
const m = [];
|
|
678
|
-
return
|
|
679
|
-
const
|
|
680
|
-
if (!
|
|
681
|
-
const p = [...d].map((
|
|
682
|
-
...
|
|
683
|
-
from:
|
|
684
|
-
azimuth:
|
|
685
|
-
dip:
|
|
686
|
-
})).filter((
|
|
678
|
+
return a.forEach((d, f) => {
|
|
679
|
+
const b = l.get(f);
|
|
680
|
+
if (!b) return;
|
|
681
|
+
const p = [...d].map((S) => ({
|
|
682
|
+
...S,
|
|
683
|
+
from: ee(S.from),
|
|
684
|
+
azimuth: ee(S.azimuth),
|
|
685
|
+
dip: ee(S.dip)
|
|
686
|
+
})).filter((S) => Number.isFinite(S.from) && Number.isFinite(S.azimuth) && Number.isFinite(S.dip)).sort((S, M) => S.from - M.from);
|
|
687
687
|
if (!p.length) return;
|
|
688
|
-
let h =
|
|
689
|
-
const
|
|
688
|
+
let h = ee(b.x, 0), _ = ee(b.y, 0), y = ee(b.z, 0), I = p[0].from;
|
|
689
|
+
const z = p[0].azimuth, x = p[0].dip, D = {
|
|
690
690
|
hole_id: f,
|
|
691
|
-
md:
|
|
691
|
+
md: I,
|
|
692
692
|
x: h,
|
|
693
|
-
y:
|
|
694
|
-
z:
|
|
695
|
-
azimuth:
|
|
696
|
-
dip:
|
|
693
|
+
y: _,
|
|
694
|
+
z: y,
|
|
695
|
+
azimuth: z,
|
|
696
|
+
dip: x
|
|
697
697
|
};
|
|
698
|
-
|
|
699
|
-
for (let
|
|
700
|
-
const M = p[
|
|
701
|
-
if (
|
|
702
|
-
const
|
|
703
|
-
for (let
|
|
704
|
-
|
|
705
|
-
const
|
|
706
|
-
h +=
|
|
707
|
-
const
|
|
698
|
+
c.aliasCol !== "hole_id" && b[c.aliasCol] !== void 0 && (D[c.aliasCol] = b[c.aliasCol]), m.push(D);
|
|
699
|
+
for (let S = 0; S < p.length - 1; S += 1) {
|
|
700
|
+
const M = p[S], O = p[S + 1], $ = M.from, T = O.from - $;
|
|
701
|
+
if (T <= 0) continue;
|
|
702
|
+
const R = Math.max(1, Math.ceil(T / i)), q = T / R;
|
|
703
|
+
for (let A = 0; A < R; A += 1) {
|
|
704
|
+
I += q;
|
|
705
|
+
const v = (I - $) / T, P = M.azimuth + v * (O.azimuth - M.azimuth), g = M.dip + v * (O.dip - M.dip), C = tn(q, M.azimuth, M.dip, O.azimuth, O.dip, s);
|
|
706
|
+
h += C.dx, _ += C.dy, y += C.dz;
|
|
707
|
+
const F = {
|
|
708
708
|
hole_id: f,
|
|
709
|
-
md:
|
|
709
|
+
md: I,
|
|
710
710
|
x: h,
|
|
711
|
-
y:
|
|
712
|
-
z:
|
|
713
|
-
azimuth:
|
|
714
|
-
dip:
|
|
711
|
+
y: _,
|
|
712
|
+
z: y,
|
|
713
|
+
azimuth: s === "minimum_curvature" ? P : C.azimuth,
|
|
714
|
+
dip: s === "minimum_curvature" ? g : C.dip
|
|
715
715
|
};
|
|
716
|
-
|
|
716
|
+
c.aliasCol !== "hole_id" && b[c.aliasCol] !== void 0 && (F[c.aliasCol] = b[c.aliasCol]), m.push(F);
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
719
|
}), m;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
return
|
|
721
|
+
function nn(e, t, n = {}) {
|
|
722
|
+
return je(e, t, { ...n, method: "minimum_curvature" });
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
return
|
|
724
|
+
function Er(e, t, n = {}) {
|
|
725
|
+
return je(e, t, { ...n, method: "tangential" });
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
return
|
|
727
|
+
function Dr(e, t, n = {}) {
|
|
728
|
+
return je(e, t, { ...n, method: "balanced_tangential" });
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
return
|
|
730
|
+
function Sr(e, t, n = {}) {
|
|
731
|
+
return nn(e, t, n);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function rn(e, t) {
|
|
734
734
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
735
735
|
let n = null, r = 1 / 0;
|
|
736
736
|
for (let o = 0; o < e.length; o += 1) {
|
|
737
|
-
const
|
|
738
|
-
if (!Number.isFinite(
|
|
739
|
-
const
|
|
740
|
-
|
|
737
|
+
const s = e[o], i = ee(s.md);
|
|
738
|
+
if (!Number.isFinite(i)) continue;
|
|
739
|
+
const c = Math.abs(i - t);
|
|
740
|
+
c < r && (r = c, n = s);
|
|
741
741
|
}
|
|
742
742
|
return n;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
const r = n.holeIdCol || "hole_id", o =
|
|
746
|
-
if (!o.rows.length || !
|
|
747
|
-
const
|
|
748
|
-
return
|
|
749
|
-
|
|
750
|
-
}),
|
|
751
|
-
|
|
752
|
-
}), o.rows.map((
|
|
753
|
-
const u =
|
|
754
|
-
if (!
|
|
755
|
-
const m =
|
|
756
|
-
if (!m) return { ...
|
|
757
|
-
const d = { ...
|
|
744
|
+
function Pr(e = [], t = [], n = {}) {
|
|
745
|
+
const r = n.holeIdCol || "hole_id", o = De(e, r), s = De(t, r);
|
|
746
|
+
if (!o.rows.length || !s.rows.length) return [...o.rows];
|
|
747
|
+
const i = /* @__PURE__ */ new Map();
|
|
748
|
+
return s.rows.forEach((c) => {
|
|
749
|
+
c.hole_id && (i.has(c.hole_id) || i.set(c.hole_id, []), i.get(c.hole_id).push(c));
|
|
750
|
+
}), i.forEach((c, u) => {
|
|
751
|
+
i.set(u, [...c].sort((l, a) => ee(l.md, 0) - ee(a.md, 0)));
|
|
752
|
+
}), o.rows.map((c) => {
|
|
753
|
+
const u = ee(c.from), l = ee(c.to), a = Number.isFinite(u) && Number.isFinite(l) ? 0.5 * (u + l) : void 0;
|
|
754
|
+
if (!c.hole_id || !Number.isFinite(a)) return { ...c };
|
|
755
|
+
const m = rn(i.get(c.hole_id) || [], a);
|
|
756
|
+
if (!m) return { ...c };
|
|
757
|
+
const d = { ...c };
|
|
758
758
|
return ["md", "x", "y", "z", "azimuth", "dip"].forEach((f) => {
|
|
759
759
|
m[f] !== void 0 && (Object.prototype.hasOwnProperty.call(d, f) ? d[`${f}_trace`] = m[f] : d[f] = m[f]);
|
|
760
760
|
}), d;
|
|
761
761
|
});
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function kr(e, t = null) {
|
|
764
764
|
return new Promise((n, r) => {
|
|
765
|
-
|
|
765
|
+
W.parse(e, {
|
|
766
766
|
header: !0,
|
|
767
767
|
dynamicTyping: !0,
|
|
768
768
|
skipEmptyLines: !0,
|
|
769
769
|
complete: (o) => {
|
|
770
|
-
const
|
|
771
|
-
o.data.forEach((
|
|
772
|
-
const
|
|
773
|
-
!m || d === null || d === void 0 || f === null || f === void 0 ||
|
|
774
|
-
...
|
|
770
|
+
const s = /* @__PURE__ */ new Map();
|
|
771
|
+
o.data.forEach((c, u) => {
|
|
772
|
+
const l = pe(c, null, t), a = l[E], m = a !== void 0 ? `${a}`.trim() : "", d = l[ce] ?? l.x, f = l[ue] ?? l.y, b = l[ge] ?? l.z, p = l.order ?? u;
|
|
773
|
+
!m || d === null || d === void 0 || f === null || f === void 0 || b === null || b === void 0 || (s.has(m) || s.set(m, []), s.get(m).push({
|
|
774
|
+
...l,
|
|
775
775
|
holeId: m,
|
|
776
776
|
order: p,
|
|
777
777
|
x: Number(d) ?? 0,
|
|
778
778
|
y: Number(f) ?? 0,
|
|
779
|
-
z: Number(
|
|
779
|
+
z: Number(b) ?? 0
|
|
780
780
|
}));
|
|
781
781
|
});
|
|
782
|
-
const
|
|
783
|
-
id:
|
|
784
|
-
points: u.sort((
|
|
785
|
-
...
|
|
786
|
-
x: Number(
|
|
787
|
-
y: Number(
|
|
788
|
-
z: Number(
|
|
782
|
+
const i = Array.from(s.entries()).map(([c, u]) => ({
|
|
783
|
+
id: c,
|
|
784
|
+
points: u.sort((l, a) => l.order - a.order).map((l) => ({
|
|
785
|
+
...l,
|
|
786
|
+
x: Number(l.x) || 0,
|
|
787
|
+
y: Number(l.y) || 0,
|
|
788
|
+
z: Number(l.z) || 0
|
|
789
789
|
}))
|
|
790
790
|
}));
|
|
791
|
-
n({ holes:
|
|
791
|
+
n({ holes: i });
|
|
792
792
|
},
|
|
793
|
-
error: (o) => r(
|
|
793
|
+
error: (o) => r(w("parseDrillholesCSV", o))
|
|
794
794
|
});
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function ze(e) {
|
|
798
798
|
return e ? Array.isArray(e) ? [...e] : [] : [];
|
|
799
799
|
}
|
|
800
800
|
function J(e) {
|
|
801
801
|
const t = Number(e);
|
|
802
802
|
return Number.isFinite(t) ? t : void 0;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function bt(e = [], t = []) {
|
|
805
805
|
const n = [...e];
|
|
806
806
|
return n.sort((r, o) => {
|
|
807
|
-
for (let
|
|
808
|
-
const
|
|
809
|
-
if (
|
|
810
|
-
return
|
|
807
|
+
for (let s = 0; s < t.length; s += 1) {
|
|
808
|
+
const i = t[s], c = r == null ? void 0 : r[i], u = o == null ? void 0 : o[i];
|
|
809
|
+
if (c !== u)
|
|
810
|
+
return c == null ? 1 : u == null ? -1 : typeof c == "number" && typeof u == "number" ? c - u : `${c}`.localeCompare(`${u}`);
|
|
811
811
|
}
|
|
812
812
|
return 0;
|
|
813
813
|
}), n;
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function on(e, t = {}) {
|
|
816
816
|
return new Promise((n, r) => {
|
|
817
|
-
|
|
817
|
+
W.parse(e, {
|
|
818
818
|
header: !0,
|
|
819
819
|
dynamicTyping: !0,
|
|
820
820
|
skipEmptyLines: !0,
|
|
821
821
|
...t,
|
|
822
822
|
complete: (o) => n(Array.isArray(o == null ? void 0 : o.data) ? o.data : []),
|
|
823
|
-
error: (o) => r(
|
|
823
|
+
error: (o) => r(w("loadTable(csv)", o))
|
|
824
824
|
});
|
|
825
825
|
});
|
|
826
826
|
}
|
|
827
|
-
function
|
|
828
|
-
return e.map((r) =>
|
|
827
|
+
function sn(e = [], t = null, n = null) {
|
|
828
|
+
return e.map((r) => pe(r, t, n));
|
|
829
829
|
}
|
|
830
|
-
async function
|
|
830
|
+
async function Be(e, t = {}) {
|
|
831
831
|
const {
|
|
832
832
|
kind: n = "csv",
|
|
833
833
|
columnMap: r = null,
|
|
834
834
|
sourceColumnMap: o = null,
|
|
835
|
-
papaParseConfig:
|
|
835
|
+
papaParseConfig: s = {}
|
|
836
836
|
} = t;
|
|
837
|
-
let
|
|
837
|
+
let i;
|
|
838
838
|
if (Array.isArray(e))
|
|
839
|
-
|
|
839
|
+
i = ze(e);
|
|
840
840
|
else if (n === "csv")
|
|
841
|
-
|
|
842
|
-
else throw n === "parquet" || n === "sql" ?
|
|
843
|
-
return
|
|
841
|
+
i = await on(e, s);
|
|
842
|
+
else throw n === "parquet" || n === "sql" ? w("loadTable", new Error(`Unsupported kind in JS runtime: ${n}`)) : w("loadTable", new Error(`Unsupported kind: ${n}`));
|
|
843
|
+
return sn(i, r, o);
|
|
844
844
|
}
|
|
845
|
-
async function
|
|
845
|
+
async function Lr(e, t = {}) {
|
|
846
846
|
const {
|
|
847
847
|
crs: n = null,
|
|
848
848
|
sourceColumnMap: r = null,
|
|
849
849
|
keepAll: o = !0,
|
|
850
|
-
...
|
|
851
|
-
} = t,
|
|
852
|
-
if (!
|
|
853
|
-
throw
|
|
854
|
-
const u =
|
|
855
|
-
if (!u && !
|
|
856
|
-
throw
|
|
857
|
-
const
|
|
850
|
+
...s
|
|
851
|
+
} = t, i = await Be(e, { ...s, sourceColumnMap: r });
|
|
852
|
+
if (!i.some((d) => E in d))
|
|
853
|
+
throw w("loadCollars", new Error(`Collar table missing column: ${E}`));
|
|
854
|
+
const u = i.some((d) => ce in d && ue in d), l = i.some((d) => te in d && ne in d);
|
|
855
|
+
if (!u && !l)
|
|
856
|
+
throw w("loadCollars", new Error("Collar table missing coordinate columns (need easting/northing or latitude/longitude)"));
|
|
857
|
+
const a = i.map((d) => {
|
|
858
858
|
const f = { ...d };
|
|
859
|
-
if (
|
|
860
|
-
const
|
|
861
|
-
f[
|
|
859
|
+
if (E in f) {
|
|
860
|
+
const b = f[E];
|
|
861
|
+
f[E] = b == null ? "" : `${b}`.trim();
|
|
862
862
|
}
|
|
863
|
-
return
|
|
863
|
+
return te in f && (f[te] = J(f[te])), ne in f && (f[ne] = J(f[ne])), ge in f && (f[ge] = J(f[ge])), ce in f && (f[ce] = J(f[ce])), ue in f && (f[ue] = J(f[ue])), !("datasource_hole_id" in f) && E in f && (f.datasource_hole_id = f[E]), f;
|
|
864
864
|
});
|
|
865
|
-
if (!
|
|
866
|
-
throw
|
|
867
|
-
return
|
|
865
|
+
if (!a.every((d) => !(!d[E] || l && (!Number.isFinite(d[te]) || !Number.isFinite(d[ne])) || u && !l && (!Number.isFinite(d[ce]) || !Number.isFinite(d[ue])))))
|
|
866
|
+
throw w("loadCollars", new Error("Collar table has missing required values"));
|
|
867
|
+
return a;
|
|
868
868
|
}
|
|
869
|
-
async function
|
|
869
|
+
async function Tr(e, t = {}) {
|
|
870
870
|
const {
|
|
871
871
|
sourceColumnMap: n = null,
|
|
872
872
|
keepAll: r = !0,
|
|
873
873
|
...o
|
|
874
|
-
} = t,
|
|
875
|
-
for (const
|
|
876
|
-
if (!
|
|
877
|
-
throw
|
|
878
|
-
const
|
|
879
|
-
const
|
|
880
|
-
if (
|
|
881
|
-
const m =
|
|
882
|
-
|
|
874
|
+
} = t, s = await Be(e, { ...o, sourceColumnMap: n }), i = [E, Y, j, B];
|
|
875
|
+
for (const l of i)
|
|
876
|
+
if (!s.some((m) => l in m))
|
|
877
|
+
throw w("loadSurveys", new Error(`Survey table missing column: ${l}`));
|
|
878
|
+
const c = s.map((l) => {
|
|
879
|
+
const a = { ...l };
|
|
880
|
+
if (E in a) {
|
|
881
|
+
const m = a[E];
|
|
882
|
+
a[E] = m == null ? "" : `${m}`.trim();
|
|
883
883
|
}
|
|
884
|
-
return
|
|
884
|
+
return Y in a && (a[Y] = J(a[Y])), G in a && (a[G] = J(a[G])), j in a && (a[j] = J(a[j])), B in a && (a[B] = J(a[B])), a;
|
|
885
885
|
});
|
|
886
|
-
if (!
|
|
887
|
-
throw
|
|
888
|
-
return
|
|
886
|
+
if (!c.every((l) => !(!l[E] || !Number.isFinite(l[Y]) || !Number.isFinite(l[j]) || !Number.isFinite(l[B]))))
|
|
887
|
+
throw w("loadSurveys", new Error("Survey table has missing required values"));
|
|
888
|
+
return bt(c, [E, Y]);
|
|
889
889
|
}
|
|
890
|
-
async function
|
|
890
|
+
async function Fr(e, t = {}) {
|
|
891
891
|
const {
|
|
892
892
|
sourceColumnMap: n = null,
|
|
893
893
|
keepAll: r = !0,
|
|
894
894
|
...o
|
|
895
|
-
} = t,
|
|
896
|
-
for (const
|
|
897
|
-
if (!
|
|
898
|
-
throw
|
|
899
|
-
const
|
|
900
|
-
const
|
|
901
|
-
if (
|
|
902
|
-
const m =
|
|
903
|
-
|
|
895
|
+
} = t, s = await Be(e, { ...o, sourceColumnMap: n }), i = [E, X, G];
|
|
896
|
+
for (const l of i)
|
|
897
|
+
if (!s.some((m) => l in m))
|
|
898
|
+
throw w("loadAssays", new Error(`Assay table missing column: ${l}`));
|
|
899
|
+
const c = s.map((l) => {
|
|
900
|
+
const a = { ...l };
|
|
901
|
+
if (E in a) {
|
|
902
|
+
const m = a[E];
|
|
903
|
+
a[E] = m == null ? "" : `${m}`.trim();
|
|
904
904
|
}
|
|
905
|
-
return
|
|
905
|
+
return X in a && (a[X] = J(a[X])), G in a && (a[G] = J(a[G])), X in a && G in a && Number.isFinite(a[X]) && Number.isFinite(a[G]) && (a[Re] = 0.5 * (a[X] + a[G])), a;
|
|
906
906
|
});
|
|
907
|
-
if (!
|
|
908
|
-
throw
|
|
909
|
-
return
|
|
907
|
+
if (!c.every((l) => !(!l[E] || !Number.isFinite(l[X]) || !Number.isFinite(l[G]))))
|
|
908
|
+
throw w("loadAssays", new Error("Assay table has missing required values"));
|
|
909
|
+
return bt(c, [E, X, G]);
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
const r = Array.isArray(n.onCols) && n.onCols.length ? n.onCols : [
|
|
911
|
+
function Or(e = [], t = [], n = {}) {
|
|
912
|
+
const r = Array.isArray(n.onCols) && n.onCols.length ? n.onCols : [E];
|
|
913
913
|
if (!t.length) return [...e];
|
|
914
|
-
const o = (
|
|
915
|
-
return t.forEach((
|
|
916
|
-
|
|
917
|
-
}), e.map((
|
|
918
|
-
const
|
|
919
|
-
if (!
|
|
920
|
-
const u = { ...
|
|
921
|
-
return Object.entries(
|
|
922
|
-
r.includes(
|
|
914
|
+
const o = (i) => r.map((c) => `${(i == null ? void 0 : i[c]) ?? ""}`).join("|"), s = /* @__PURE__ */ new Map();
|
|
915
|
+
return t.forEach((i) => {
|
|
916
|
+
s.set(o(i), i);
|
|
917
|
+
}), e.map((i) => {
|
|
918
|
+
const c = s.get(o(i));
|
|
919
|
+
if (!c) return { ...i };
|
|
920
|
+
const u = { ...i };
|
|
921
|
+
return Object.entries(c).forEach(([l, a]) => {
|
|
922
|
+
r.includes(l) || (Object.prototype.hasOwnProperty.call(u, l) ? u[`${l}_trace`] = a : u[l] = a);
|
|
923
923
|
}), u;
|
|
924
924
|
});
|
|
925
925
|
}
|
|
926
|
-
function
|
|
927
|
-
return t == null ? [...e] : e.length ? e.some((r) =>
|
|
926
|
+
function Vr(e = [], t = null) {
|
|
927
|
+
return t == null ? [...e] : e.length ? e.some((r) => se in r) ? e.filter((r) => (r == null ? void 0 : r[se]) === t) : [...e] : [];
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function wr(e = [], t = []) {
|
|
930
930
|
return e.map((n) => {
|
|
931
931
|
const r = { ...n };
|
|
932
932
|
return t.forEach((o) => {
|
|
933
933
|
if (!(o in r)) return;
|
|
934
|
-
const
|
|
935
|
-
r[o] =
|
|
934
|
+
const s = J(r[o]);
|
|
935
|
+
r[o] = s;
|
|
936
936
|
}), r;
|
|
937
937
|
});
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function $r({
|
|
940
940
|
collars: e = [],
|
|
941
941
|
surveys: t = [],
|
|
942
942
|
assays: n = [],
|
|
@@ -944,137 +944,191 @@ function Cr({
|
|
|
944
944
|
metadata: o = {}
|
|
945
945
|
} = {}) {
|
|
946
946
|
return {
|
|
947
|
-
collars:
|
|
948
|
-
surveys:
|
|
949
|
-
assays:
|
|
950
|
-
structures:
|
|
947
|
+
collars: ze(e),
|
|
948
|
+
surveys: ze(t),
|
|
949
|
+
assays: ze(n),
|
|
950
|
+
structures: ze(r),
|
|
951
951
|
metadata: o || {}
|
|
952
952
|
};
|
|
953
953
|
}
|
|
954
|
-
|
|
954
|
+
const yt = ["x", "y", "z", "dx", "dy", "dz"], ln = {
|
|
955
|
+
x: ["x", "easting", "center_x", "xc", "xcentre", "xcenter", "x_centre", "x_center", "cx"],
|
|
956
|
+
y: ["y", "northing", "center_y", "yc", "ycentre", "ycenter", "y_centre", "y_center", "cy"],
|
|
957
|
+
z: ["z", "elevation", "center_z", "zc", "zcentre", "zcenter", "z_centre", "z_center", "cz"],
|
|
958
|
+
dx: ["dx", "size_x", "sx", "sizex", "dim_x", "block_size_x"],
|
|
959
|
+
dy: ["dy", "size_y", "sy", "sizey", "dim_y", "block_size_y"],
|
|
960
|
+
dz: ["dz", "size_z", "sz", "sizez", "dim_z", "block_size_z"]
|
|
961
|
+
}, gt = {};
|
|
962
|
+
Object.entries(ln).forEach(([e, t]) => {
|
|
963
|
+
t.forEach((n) => {
|
|
964
|
+
gt[n.toLowerCase()] = e;
|
|
965
|
+
});
|
|
966
|
+
});
|
|
967
|
+
function an(e) {
|
|
968
|
+
const t = {};
|
|
969
|
+
return Object.entries(e).forEach(([n, r]) => {
|
|
970
|
+
const o = gt[n.toLowerCase().trim()] || n;
|
|
971
|
+
t[o] = r;
|
|
972
|
+
}), t;
|
|
973
|
+
}
|
|
974
|
+
function Rr(e) {
|
|
955
975
|
return new Promise((t, n) => {
|
|
956
|
-
|
|
976
|
+
W.parse(e, {
|
|
957
977
|
header: !0,
|
|
958
978
|
dynamicTyping: !0,
|
|
979
|
+
skipEmptyLines: !0,
|
|
959
980
|
complete: (r) => {
|
|
960
|
-
const
|
|
961
|
-
(
|
|
962
|
-
), i =
|
|
963
|
-
(
|
|
981
|
+
const s = (r.data || []).map(an).filter(
|
|
982
|
+
(c) => c.x !== null && c.y !== null && c.z !== null
|
|
983
|
+
), i = Object.keys(s[0] || {}).filter(
|
|
984
|
+
(c) => !yt.includes(c)
|
|
964
985
|
);
|
|
965
|
-
t({ data:
|
|
986
|
+
t({ data: s, properties: i });
|
|
966
987
|
},
|
|
967
988
|
error: (r) => {
|
|
968
|
-
n(
|
|
989
|
+
n(w("parseBlockModelCSV", r));
|
|
969
990
|
}
|
|
970
991
|
});
|
|
971
992
|
});
|
|
972
993
|
}
|
|
973
|
-
function
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
994
|
+
function Hr(e) {
|
|
995
|
+
if (typeof e == "string")
|
|
996
|
+
try {
|
|
997
|
+
return JSON.parse(e);
|
|
998
|
+
} catch (t) {
|
|
999
|
+
throw w("loadBlockModelMetadata", t);
|
|
1000
|
+
}
|
|
1001
|
+
if (e && typeof e == "object") return e;
|
|
1002
|
+
throw w("loadBlockModelMetadata", new Error("Invalid metadata source"));
|
|
1003
|
+
}
|
|
1004
|
+
function cn(e, t) {
|
|
1005
|
+
const n = e.map((s) => s[t]).filter((s) => s != null);
|
|
1006
|
+
if (n.length > 0 && n.every((s) => typeof s == "number")) {
|
|
1007
|
+
const s = Math.min(...n), i = Math.max(...n);
|
|
1008
|
+
return { type: "numeric", min: s, max: i, values: n };
|
|
978
1009
|
}
|
|
979
1010
|
return { type: "categorical", categories: [...new Set(n)], values: n };
|
|
980
1011
|
}
|
|
981
|
-
function
|
|
1012
|
+
function jr(e) {
|
|
1013
|
+
if (!e || e.length === 0) return {};
|
|
1014
|
+
const t = Object.keys(e[0]).filter(
|
|
1015
|
+
(r) => !yt.includes(r)
|
|
1016
|
+
), n = {};
|
|
1017
|
+
return t.forEach((r) => {
|
|
1018
|
+
n[r] = cn(e, r);
|
|
1019
|
+
}), n;
|
|
1020
|
+
}
|
|
1021
|
+
function un(e, t) {
|
|
1022
|
+
return !t || typeof t != "object" ? e : e.filter(
|
|
1023
|
+
(n) => Object.entries(t).every(([r, o]) => {
|
|
1024
|
+
const s = n[r];
|
|
1025
|
+
return o == null ? !0 : typeof o != "object" || Array.isArray(o) ? s === o : !("gt" in o && !(s > o.gt) || "gte" in o && !(s >= o.gte) || "lt" in o && !(s < o.lt) || "lte" in o && !(s <= o.lte) || "eq" in o && s !== o.eq || "ne" in o && s === o.ne || "in" in o && !o.in.includes(s));
|
|
1026
|
+
})
|
|
1027
|
+
);
|
|
1028
|
+
}
|
|
1029
|
+
function Br(e, t = null) {
|
|
1030
|
+
return (t ? un(e, t) : e).reduce((r, o) => {
|
|
1031
|
+
const s = Number(o.dx) || 0, i = Number(o.dy) || 0, c = Number(o.dz) || 0;
|
|
1032
|
+
return r + s * i * c;
|
|
1033
|
+
}, 0);
|
|
1034
|
+
}
|
|
1035
|
+
function mn(e, t, n) {
|
|
982
1036
|
if (!t) return new n.Color("#888888");
|
|
983
1037
|
if (t.type === "numeric") {
|
|
984
|
-
const
|
|
985
|
-
return new n.Color().setHSL(
|
|
1038
|
+
const s = t.max - t.min, c = (1 - (s === 0 ? 0.5 : (e - t.min) / s)) * 240;
|
|
1039
|
+
return new n.Color().setHSL(c / 360, 0.8, 0.5);
|
|
986
1040
|
}
|
|
987
1041
|
const o = t.categories.indexOf(e) / Math.max(t.categories.length, 1) * 360;
|
|
988
1042
|
return new n.Color().setHSL(o / 360, 0.7, 0.5);
|
|
989
1043
|
}
|
|
990
|
-
const
|
|
991
|
-
function
|
|
1044
|
+
const Ge = (e, t = null) => pe(e, null, t);
|
|
1045
|
+
function dn(e) {
|
|
992
1046
|
if (!e.length) return null;
|
|
993
|
-
const t = e[0], n =
|
|
1047
|
+
const t = e[0], n = X in t && G in t, r = Y in t && !n;
|
|
994
1048
|
return n ? "interval" : r ? "point" : null;
|
|
995
1049
|
}
|
|
996
|
-
function
|
|
1050
|
+
function oe(e) {
|
|
997
1051
|
const t = Number(e);
|
|
998
1052
|
return Number.isFinite(t) ? t : null;
|
|
999
1053
|
}
|
|
1000
|
-
function
|
|
1001
|
-
const t = e[
|
|
1054
|
+
function _t(e) {
|
|
1055
|
+
const t = e[E] !== void 0 ? `${e[E]}`.trim() : "";
|
|
1002
1056
|
if (!t) return null;
|
|
1003
|
-
const n =
|
|
1057
|
+
const n = oe(e[Y]);
|
|
1004
1058
|
return n === null ? null : {
|
|
1005
|
-
[
|
|
1006
|
-
[
|
|
1007
|
-
[
|
|
1008
|
-
[
|
|
1059
|
+
[E]: t,
|
|
1060
|
+
[Y]: n,
|
|
1061
|
+
[B]: oe(e[B]),
|
|
1062
|
+
[j]: oe(e[j]),
|
|
1009
1063
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
1010
1064
|
...e
|
|
1011
1065
|
};
|
|
1012
1066
|
}
|
|
1013
|
-
function
|
|
1014
|
-
const t = e[
|
|
1067
|
+
function xt(e) {
|
|
1068
|
+
const t = e[E] !== void 0 ? `${e[E]}`.trim() : "";
|
|
1015
1069
|
if (!t) return null;
|
|
1016
|
-
const n =
|
|
1070
|
+
const n = oe(e[X]), r = oe(e[G]);
|
|
1017
1071
|
if (n === null || r === null || r <= n) return null;
|
|
1018
1072
|
const o = 0.5 * (n + r);
|
|
1019
1073
|
return {
|
|
1020
|
-
[
|
|
1021
|
-
[
|
|
1022
|
-
[
|
|
1074
|
+
[E]: t,
|
|
1075
|
+
[X]: n,
|
|
1076
|
+
[G]: r,
|
|
1023
1077
|
mid: o,
|
|
1024
|
-
[
|
|
1025
|
-
[
|
|
1078
|
+
[B]: oe(e[B]),
|
|
1079
|
+
[j]: oe(e[j]),
|
|
1026
1080
|
classification: e.classification != null ? `${e.classification}` : null,
|
|
1027
1081
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
1028
1082
|
...e
|
|
1029
1083
|
};
|
|
1030
1084
|
}
|
|
1031
|
-
function
|
|
1085
|
+
function Gr(e) {
|
|
1032
1086
|
const t = [], n = [];
|
|
1033
1087
|
for (const r of e) {
|
|
1034
|
-
const o = [],
|
|
1035
|
-
|
|
1088
|
+
const o = [], s = oe(r[B]), i = oe(r[j]);
|
|
1089
|
+
s !== null && (s < 0 || s > 90) && o.push(`dip ${s} out of range [0, 90]`), i !== null && (i < 0 || i >= 360) && o.push(`azimuth ${i} out of range [0, 360)`), o.length ? n.push({ row: r, message: o.join("; ") }) : t.push(r);
|
|
1036
1090
|
}
|
|
1037
1091
|
return { valid: t, errors: n };
|
|
1038
1092
|
}
|
|
1039
|
-
function
|
|
1093
|
+
function Ur(e, t = null) {
|
|
1040
1094
|
return new Promise((n, r) => {
|
|
1041
1095
|
const o = {
|
|
1042
1096
|
header: !0,
|
|
1043
1097
|
dynamicTyping: !0,
|
|
1044
1098
|
skipEmptyLines: !0,
|
|
1045
|
-
complete: (
|
|
1046
|
-
const
|
|
1047
|
-
for (const
|
|
1048
|
-
const u =
|
|
1049
|
-
|
|
1099
|
+
complete: (s) => {
|
|
1100
|
+
const i = [];
|
|
1101
|
+
for (const c of s.data) {
|
|
1102
|
+
const u = Ge(c, t), l = _t(u);
|
|
1103
|
+
l && i.push(l);
|
|
1050
1104
|
}
|
|
1051
|
-
n(
|
|
1105
|
+
n(i);
|
|
1052
1106
|
},
|
|
1053
|
-
error: (
|
|
1107
|
+
error: (s) => r(w("parseStructuralPointsCSV", s))
|
|
1054
1108
|
};
|
|
1055
1109
|
typeof e == "string" && !e.startsWith("data:") && e.includes(`
|
|
1056
|
-
`) ?
|
|
1110
|
+
`) ? W.parse(e, o) : W.parse(e, o);
|
|
1057
1111
|
});
|
|
1058
1112
|
}
|
|
1059
|
-
function
|
|
1113
|
+
function Yr(e, t = null) {
|
|
1060
1114
|
return new Promise((n, r) => {
|
|
1061
|
-
|
|
1115
|
+
W.parse(e, {
|
|
1062
1116
|
header: !0,
|
|
1063
1117
|
dynamicTyping: !0,
|
|
1064
1118
|
skipEmptyLines: !0,
|
|
1065
1119
|
complete: (o) => {
|
|
1066
|
-
const
|
|
1067
|
-
for (const
|
|
1068
|
-
const
|
|
1069
|
-
u &&
|
|
1120
|
+
const s = [];
|
|
1121
|
+
for (const i of o.data) {
|
|
1122
|
+
const c = Ge(i, t), u = xt(c);
|
|
1123
|
+
u && s.push(u);
|
|
1070
1124
|
}
|
|
1071
|
-
n(
|
|
1125
|
+
n(s);
|
|
1072
1126
|
},
|
|
1073
|
-
error: (o) => r(
|
|
1127
|
+
error: (o) => r(w("parseStructuralIntervalsCSV", o))
|
|
1074
1128
|
});
|
|
1075
1129
|
});
|
|
1076
1130
|
}
|
|
1077
|
-
function
|
|
1131
|
+
function fn(e, t = E) {
|
|
1078
1132
|
const n = /* @__PURE__ */ new Map();
|
|
1079
1133
|
for (const r of e) {
|
|
1080
1134
|
const o = r[t] != null ? String(r[t]).trim() : "";
|
|
@@ -1082,337 +1136,337 @@ function Kt(e, t = z) {
|
|
|
1082
1136
|
}
|
|
1083
1137
|
return Array.from(n.values());
|
|
1084
1138
|
}
|
|
1085
|
-
function
|
|
1139
|
+
function hn(e, t = null) {
|
|
1086
1140
|
return new Promise((n, r) => {
|
|
1087
|
-
|
|
1141
|
+
W.parse(e, {
|
|
1088
1142
|
header: !0,
|
|
1089
1143
|
dynamicTyping: !0,
|
|
1090
1144
|
skipEmptyLines: !0,
|
|
1091
1145
|
complete: (o) => {
|
|
1092
|
-
const
|
|
1093
|
-
if (!
|
|
1094
|
-
r(
|
|
1146
|
+
const s = o.data.map((u) => Ge(u, t)), i = dn(s);
|
|
1147
|
+
if (!i) {
|
|
1148
|
+
r(w(
|
|
1095
1149
|
"parseStructuralCSV",
|
|
1096
1150
|
new Error("Structural CSV requires either 'depth' (point) or 'from'/'to' (interval) columns")
|
|
1097
1151
|
));
|
|
1098
1152
|
return;
|
|
1099
1153
|
}
|
|
1100
|
-
const
|
|
1101
|
-
for (const u of
|
|
1102
|
-
const
|
|
1103
|
-
|
|
1154
|
+
const c = [];
|
|
1155
|
+
for (const u of s) {
|
|
1156
|
+
const l = i === "interval" ? xt(u) : _t(u);
|
|
1157
|
+
l && c.push(l);
|
|
1104
1158
|
}
|
|
1105
|
-
n({ schema:
|
|
1159
|
+
n({ schema: i, rows: c });
|
|
1106
1160
|
},
|
|
1107
|
-
error: (o) => r(
|
|
1161
|
+
error: (o) => r(w("parseStructuralCSV", o))
|
|
1108
1162
|
});
|
|
1109
1163
|
});
|
|
1110
1164
|
}
|
|
1111
|
-
function
|
|
1165
|
+
function pn(e) {
|
|
1112
1166
|
return new Promise((t) => {
|
|
1113
|
-
|
|
1167
|
+
W.parse(e, {
|
|
1114
1168
|
header: !0,
|
|
1115
1169
|
dynamicTyping: !0,
|
|
1116
1170
|
skipEmptyLines: !0,
|
|
1117
1171
|
complete: (n) => {
|
|
1118
1172
|
const r = /* @__PURE__ */ new Map();
|
|
1119
|
-
for (const
|
|
1120
|
-
const
|
|
1121
|
-
if (!
|
|
1122
|
-
const u = Number(
|
|
1123
|
-
if (!Number.isFinite(u) || !Number.isFinite(
|
|
1124
|
-
const
|
|
1173
|
+
for (const s of n.data) {
|
|
1174
|
+
const i = pe(s), c = i[E] != null ? `${i[E]}`.trim() : "";
|
|
1175
|
+
if (!c) continue;
|
|
1176
|
+
const u = Number(i[X]), l = Number(i[G]);
|
|
1177
|
+
if (!Number.isFinite(u) || !Number.isFinite(l) || l <= u) continue;
|
|
1178
|
+
const a = (u + l) / 2, { [B]: m, [j]: d, ...f } = i, b = {
|
|
1125
1179
|
...f,
|
|
1126
|
-
[
|
|
1127
|
-
[
|
|
1128
|
-
[
|
|
1129
|
-
[
|
|
1130
|
-
[
|
|
1180
|
+
[E]: c,
|
|
1181
|
+
[X]: u,
|
|
1182
|
+
[G]: l,
|
|
1183
|
+
[Re]: a,
|
|
1184
|
+
[Y]: a,
|
|
1131
1185
|
// unified depth field for y-axis rendering
|
|
1132
1186
|
_source: "assay"
|
|
1133
1187
|
};
|
|
1134
|
-
r.has(
|
|
1188
|
+
r.has(c) || r.set(c, []), r.get(c).push(b);
|
|
1135
1189
|
}
|
|
1136
|
-
const o = Array.from(r.entries()).map(([
|
|
1137
|
-
holeId:
|
|
1138
|
-
points:
|
|
1190
|
+
const o = Array.from(r.entries()).map(([s, i]) => ({
|
|
1191
|
+
holeId: s,
|
|
1192
|
+
points: i.sort((c, u) => c[X] - u[X])
|
|
1139
1193
|
}));
|
|
1140
1194
|
t(o);
|
|
1141
1195
|
}
|
|
1142
1196
|
});
|
|
1143
1197
|
});
|
|
1144
1198
|
}
|
|
1145
|
-
async function
|
|
1199
|
+
async function qr({ assayCsv: e, structuralCsv: t } = {}) {
|
|
1146
1200
|
const [n, r] = await Promise.all([
|
|
1147
|
-
e ?
|
|
1148
|
-
t ?
|
|
1149
|
-
({ rows:
|
|
1201
|
+
e ? pn(e) : Promise.resolve([]),
|
|
1202
|
+
t ? hn(t).then(
|
|
1203
|
+
({ rows: s }) => fn(s.map((i) => ({ ...i, _source: "structural" })))
|
|
1150
1204
|
) : Promise.resolve([])
|
|
1151
|
-
]), o = new Map(n.map((
|
|
1152
|
-
for (const
|
|
1153
|
-
const
|
|
1154
|
-
if (
|
|
1155
|
-
if (o.has(
|
|
1156
|
-
const
|
|
1157
|
-
o.set(
|
|
1205
|
+
]), o = new Map(n.map((s) => [s.holeId, { ...s, points: [...s.points] }]));
|
|
1206
|
+
for (const s of r) {
|
|
1207
|
+
const i = s.holeId;
|
|
1208
|
+
if (i)
|
|
1209
|
+
if (o.has(i)) {
|
|
1210
|
+
const c = o.get(i);
|
|
1211
|
+
o.set(i, { ...c, points: [...c.points, ...s.points || []] });
|
|
1158
1212
|
} else
|
|
1159
|
-
o.set(
|
|
1213
|
+
o.set(i, s);
|
|
1160
1214
|
}
|
|
1161
1215
|
return { holes: Array.from(o.values()) };
|
|
1162
1216
|
}
|
|
1163
|
-
function
|
|
1217
|
+
function bn(e, t) {
|
|
1164
1218
|
if (!e || e.length === 0 || !Number.isFinite(t)) return null;
|
|
1165
1219
|
const n = e.length;
|
|
1166
1220
|
if (n === 1) {
|
|
1167
|
-
const
|
|
1168
|
-
return { x: Number(
|
|
1221
|
+
const y = e[0];
|
|
1222
|
+
return { x: Number(y.x), y: Number(y.y), z: Number(y.z), dx: 0, dy: 0, dz: -1 };
|
|
1169
1223
|
}
|
|
1170
1224
|
let r = -1;
|
|
1171
|
-
for (let
|
|
1172
|
-
const
|
|
1173
|
-
if (t >=
|
|
1174
|
-
r =
|
|
1225
|
+
for (let y = 0; y < n - 1; y++) {
|
|
1226
|
+
const I = Number(e[y].md), z = Number(e[y + 1].md);
|
|
1227
|
+
if (t >= I && t <= z) {
|
|
1228
|
+
r = y;
|
|
1175
1229
|
break;
|
|
1176
1230
|
}
|
|
1177
1231
|
}
|
|
1178
|
-
let o,
|
|
1232
|
+
let o, s, i;
|
|
1179
1233
|
if (r === -1) {
|
|
1180
|
-
t < Number(e[0].md) ? (o = e[0],
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1234
|
+
t < Number(e[0].md) ? (o = e[0], s = e[1]) : (o = e[n - 2], s = e[n - 1]);
|
|
1235
|
+
const y = Number(o.md), z = Number(s.md) - y;
|
|
1236
|
+
i = z > 0 ? (t - y) / z : t < y ? 0 : 1;
|
|
1183
1237
|
} else {
|
|
1184
|
-
o = e[r],
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1238
|
+
o = e[r], s = e[r + 1];
|
|
1239
|
+
const y = Number(o.md), z = Number(s.md) - y;
|
|
1240
|
+
i = z > 0 ? (t - y) / z : 0;
|
|
1187
1241
|
}
|
|
1188
|
-
const
|
|
1189
|
-
let
|
|
1190
|
-
const f = Number(o.azimuth),
|
|
1191
|
-
if (Number.isFinite(f) && Number.isFinite(
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1242
|
+
const c = Number(o.x) + i * (Number(s.x) - Number(o.x)), u = Number(o.y) + i * (Number(s.y) - Number(o.y)), l = Number(o.z) + i * (Number(s.z) - Number(o.z));
|
|
1243
|
+
let a, m, d;
|
|
1244
|
+
const f = Number(o.azimuth), b = Number(o.dip), p = Number(s.azimuth), h = Number(s.dip);
|
|
1245
|
+
if (Number.isFinite(f) && Number.isFinite(b)) {
|
|
1246
|
+
const y = Number.isFinite(p) && Number.isFinite(h) ? f + i * (p - f) : f, I = Number.isFinite(p) && Number.isFinite(h) ? b + i * (h - b) : b, z = y * Math.PI / 180, x = I * Math.PI / 180;
|
|
1247
|
+
a = Math.cos(x) * Math.sin(z), m = Math.cos(x) * Math.cos(z), d = -Math.sin(x);
|
|
1194
1248
|
} else {
|
|
1195
|
-
const
|
|
1196
|
-
if (
|
|
1197
|
-
|
|
1249
|
+
const y = Number(s.x) - Number(o.x), I = Number(s.y) - Number(o.y), z = Number(s.z) - Number(o.z), x = Math.sqrt(y * y + I * I + z * z);
|
|
1250
|
+
if (x < 1e-10) return { x: c, y: u, z: l, dx: 0, dy: 0, dz: -1 };
|
|
1251
|
+
a = y / x, m = I / x, d = z / x;
|
|
1198
1252
|
}
|
|
1199
|
-
const
|
|
1200
|
-
return
|
|
1201
|
-
}
|
|
1202
|
-
function
|
|
1203
|
-
const { betaZeroAxis: o = "B", betaHandedness:
|
|
1204
|
-
let
|
|
1205
|
-
const m =
|
|
1206
|
-
Math.abs(m) > 0.99 && (
|
|
1253
|
+
const _ = Math.sqrt(a * a + m * m + d * d);
|
|
1254
|
+
return _ < 1e-10 ? { x: c, y: u, z: l, dx: 0, dy: 0, dz: -1 } : { x: c, y: u, z: l, dx: a / _, dy: m / _, dz: d / _ };
|
|
1255
|
+
}
|
|
1256
|
+
function yn(e, t, n, r = {}) {
|
|
1257
|
+
const { betaZeroAxis: o = "B", betaHandedness: s = 1 } = r, { dx: i, dy: c, dz: u } = n, l = [i, c, u];
|
|
1258
|
+
let a = [0, 0, 1];
|
|
1259
|
+
const m = l[0] * a[0] + l[1] * a[1] + l[2] * a[2];
|
|
1260
|
+
Math.abs(m) > 0.99 && (a = [0, 1, 0]);
|
|
1207
1261
|
const d = [
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
], f = Math.sqrt(d[0] ** 2 + d[1] ** 2 + d[2] ** 2),
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
], h = Math.sqrt(p[0] ** 2 + p[1] ** 2 + p[2] ** 2),
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1262
|
+
a[1] * l[2] - a[2] * l[1],
|
|
1263
|
+
a[2] * l[0] - a[0] * l[2],
|
|
1264
|
+
a[0] * l[1] - a[1] * l[0]
|
|
1265
|
+
], f = Math.sqrt(d[0] ** 2 + d[1] ** 2 + d[2] ** 2), b = f > 1e-10 ? [d[0] / f, d[1] / f, d[2] / f] : [1, 0, 0], p = [
|
|
1266
|
+
l[1] * b[2] - l[2] * b[1],
|
|
1267
|
+
l[2] * b[0] - l[0] * b[2],
|
|
1268
|
+
l[0] * b[1] - l[1] * b[0]
|
|
1269
|
+
], h = Math.sqrt(p[0] ** 2 + p[1] ** 2 + p[2] ** 2), _ = h > 1e-10 ? [p[0] / h, p[1] / h, p[2] / h] : [0, 1, 0], y = o === "R" ? b : _, I = t * Math.PI / 180 * s, z = Math.cos(I), x = Math.sin(I), D = y[0] * l[0] + y[1] * l[1] + y[2] * l[2], S = [
|
|
1270
|
+
l[1] * y[2] - l[2] * y[1],
|
|
1271
|
+
l[2] * y[0] - l[0] * y[2],
|
|
1272
|
+
l[0] * y[1] - l[1] * y[0]
|
|
1219
1273
|
], M = [
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
],
|
|
1224
|
-
return
|
|
1274
|
+
y[0] * z + S[0] * x + l[0] * D * (1 - z),
|
|
1275
|
+
y[1] * z + S[1] * x + l[1] * D * (1 - z),
|
|
1276
|
+
y[2] * z + S[2] * x + l[2] * D * (1 - z)
|
|
1277
|
+
], O = (90 - e) * Math.PI / 180, $ = Math.cos(O), Z = Math.sin(O), T = $ * M[0] + Z * l[0], R = $ * M[1] + Z * l[1], q = $ * M[2] + Z * l[2], A = Math.sqrt(T * T + R * R + q * q);
|
|
1278
|
+
return A < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: T / A, ny: R / A, nz: q / A };
|
|
1225
1279
|
}
|
|
1226
|
-
function
|
|
1280
|
+
function gn(e, t, n = {}) {
|
|
1227
1281
|
if (!(e != null && e.length) || !(t != null && t.length)) return [];
|
|
1228
1282
|
const r = /* @__PURE__ */ new Map();
|
|
1229
|
-
for (const
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1283
|
+
for (const s of t) {
|
|
1284
|
+
const i = s.hole_id != null ? `${s.hole_id}`.trim().toLowerCase() : "";
|
|
1285
|
+
i && (r.has(i) || r.set(i, []), r.get(i).push(s));
|
|
1232
1286
|
}
|
|
1233
|
-
for (const [,
|
|
1234
|
-
|
|
1287
|
+
for (const [, s] of r)
|
|
1288
|
+
s.sort((i, c) => Number(i.md) - Number(c.md));
|
|
1235
1289
|
const o = [];
|
|
1236
|
-
for (const
|
|
1237
|
-
const
|
|
1238
|
-
if (!
|
|
1239
|
-
const
|
|
1240
|
-
if (!
|
|
1241
|
-
const u =
|
|
1290
|
+
for (const s of e) {
|
|
1291
|
+
const i = s.hole_id != null ? `${s.hole_id}`.trim().toLowerCase() : "";
|
|
1292
|
+
if (!i) continue;
|
|
1293
|
+
const c = r.get(i);
|
|
1294
|
+
if (!c || c.length === 0) continue;
|
|
1295
|
+
const u = s.depth != null ? Number(s.depth) : s.mid != null ? Number(s.mid) : null;
|
|
1242
1296
|
if (!Number.isFinite(u)) continue;
|
|
1243
|
-
const
|
|
1244
|
-
if (!
|
|
1245
|
-
const { x:
|
|
1246
|
-
let h,
|
|
1247
|
-
const
|
|
1248
|
-
if (Number.isFinite(
|
|
1249
|
-
const
|
|
1250
|
-
h =
|
|
1297
|
+
const l = bn(c, u);
|
|
1298
|
+
if (!l) continue;
|
|
1299
|
+
const { x: a, y: m, z: d, dx: f, dy: b, dz: p } = l;
|
|
1300
|
+
let h, _, y;
|
|
1301
|
+
const I = s.alpha != null ? Number(s.alpha) : null, z = s.beta != null ? Number(s.beta) : null;
|
|
1302
|
+
if (Number.isFinite(I)) {
|
|
1303
|
+
const x = Number.isFinite(z) ? z : 0, D = yn(I, x, { dx: f, dy: b, dz: p }, n);
|
|
1304
|
+
h = D.nx, _ = D.ny, y = D.nz;
|
|
1251
1305
|
} else {
|
|
1252
|
-
const
|
|
1253
|
-
if (!Number.isFinite(
|
|
1254
|
-
const
|
|
1255
|
-
h = Math.sin(M) * Math.sin(
|
|
1306
|
+
const x = s.dip != null ? Number(s.dip) : null, D = s.azimuth != null ? Number(s.azimuth) : null;
|
|
1307
|
+
if (!Number.isFinite(x) || !Number.isFinite(D)) continue;
|
|
1308
|
+
const S = x * Math.PI / 180, M = D * Math.PI / 180;
|
|
1309
|
+
h = Math.sin(M) * Math.sin(S), _ = Math.cos(M) * Math.sin(S), y = Math.cos(S);
|
|
1256
1310
|
}
|
|
1257
|
-
o.push({ ...
|
|
1311
|
+
o.push({ ...s, x: a, y: m, z: d, nx: h, ny: _, nz: y });
|
|
1258
1312
|
}
|
|
1259
1313
|
return o;
|
|
1260
1314
|
}
|
|
1261
|
-
const
|
|
1262
|
-
function
|
|
1315
|
+
const Qe = "#8b1e3f", _n = "#a8324f", xn = "#6b7280", Nn = { l: 4, r: 4, t: 4, b: 4 }, et = 10, tt = 12;
|
|
1316
|
+
function nt(e) {
|
|
1263
1317
|
return e ? typeof e == "string" ? { text: e } : e : {};
|
|
1264
1318
|
}
|
|
1265
|
-
function
|
|
1266
|
-
const t =
|
|
1319
|
+
function Nt(e = {}) {
|
|
1320
|
+
const t = nt(e.xaxis && e.xaxis.title), n = nt(e.yaxis && e.yaxis.title);
|
|
1267
1321
|
return {
|
|
1268
1322
|
...e,
|
|
1269
|
-
margin:
|
|
1323
|
+
margin: Nn,
|
|
1270
1324
|
autosize: !0,
|
|
1271
1325
|
width: void 0,
|
|
1272
1326
|
xaxis: {
|
|
1273
1327
|
...e.xaxis || {},
|
|
1274
1328
|
tickfont: {
|
|
1275
1329
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1276
|
-
size:
|
|
1330
|
+
size: et
|
|
1277
1331
|
},
|
|
1278
1332
|
title: {
|
|
1279
1333
|
...t,
|
|
1280
|
-
font: { ...t.font || {}, size:
|
|
1334
|
+
font: { ...t.font || {}, size: tt }
|
|
1281
1335
|
}
|
|
1282
1336
|
},
|
|
1283
1337
|
yaxis: {
|
|
1284
1338
|
...e.yaxis || {},
|
|
1285
1339
|
tickfont: {
|
|
1286
1340
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1287
|
-
size:
|
|
1341
|
+
size: et
|
|
1288
1342
|
},
|
|
1289
1343
|
title: {
|
|
1290
1344
|
...n,
|
|
1291
|
-
font: { ...n.font || {}, size:
|
|
1345
|
+
font: { ...n.font || {}, size: tt }
|
|
1292
1346
|
}
|
|
1293
1347
|
}
|
|
1294
1348
|
};
|
|
1295
1349
|
}
|
|
1296
|
-
function
|
|
1350
|
+
function zn(e, t) {
|
|
1297
1351
|
var r;
|
|
1298
1352
|
if (!e || !t) return !1;
|
|
1299
1353
|
const n = e.points || [];
|
|
1300
1354
|
for (let o = 0; o < n.length; o += 1) {
|
|
1301
|
-
const
|
|
1302
|
-
if (
|
|
1355
|
+
const s = (r = n[o]) == null ? void 0 : r[t];
|
|
1356
|
+
if (s != null && (typeof s == "number" && Number.isFinite(s) || typeof s == "string" && s.trim() !== ""))
|
|
1303
1357
|
return !0;
|
|
1304
1358
|
}
|
|
1305
1359
|
return !1;
|
|
1306
1360
|
}
|
|
1307
|
-
function
|
|
1361
|
+
function Mn(e, t, n) {
|
|
1308
1362
|
if (!e || !t) return [];
|
|
1309
|
-
const r = (e == null ? void 0 : e.points) || [], o = [],
|
|
1310
|
-
return r.forEach((
|
|
1311
|
-
let
|
|
1312
|
-
|
|
1363
|
+
const r = (e == null ? void 0 : e.points) || [], o = [], s = /* @__PURE__ */ new Set();
|
|
1364
|
+
return r.forEach((i) => {
|
|
1365
|
+
let c = Number(
|
|
1366
|
+
i.from ?? i.samp_from ?? i.sample_from ?? i.fromdepth ?? i.from_depth ?? i.depth_from
|
|
1313
1367
|
), u = Number(
|
|
1314
|
-
|
|
1368
|
+
i.to ?? i.samp_to ?? i.sample_to ?? i.todepth ?? i.to_depth ?? i.depth_to
|
|
1315
1369
|
);
|
|
1316
|
-
if (!Number.isFinite(
|
|
1317
|
-
const f = Number(
|
|
1318
|
-
Number.isFinite(f) && (
|
|
1370
|
+
if (!Number.isFinite(c) || !Number.isFinite(u)) {
|
|
1371
|
+
const f = Number(i.depth ?? i.md);
|
|
1372
|
+
Number.isFinite(f) && (c = f, u = f);
|
|
1319
1373
|
}
|
|
1320
|
-
const
|
|
1321
|
-
if (!Number.isFinite(
|
|
1322
|
-
const
|
|
1323
|
-
if (
|
|
1324
|
-
|
|
1325
|
-
const m = (
|
|
1374
|
+
const l = i == null ? void 0 : i[t];
|
|
1375
|
+
if (!Number.isFinite(c) || !Number.isFinite(u) || u < c || l == null || l === "" || n && typeof l == "string" && /^(nan|null|none)$/i.test(l.trim())) return;
|
|
1376
|
+
const a = `${t}:${c}-${u}`;
|
|
1377
|
+
if (s.has(a)) return;
|
|
1378
|
+
s.add(a);
|
|
1379
|
+
const m = (c + u) / 2, d = n ? l : Number(l);
|
|
1326
1380
|
!n && !Number.isFinite(d) || o.push({
|
|
1327
1381
|
z: m,
|
|
1328
1382
|
val: d,
|
|
1329
|
-
from:
|
|
1383
|
+
from: c,
|
|
1330
1384
|
to: u,
|
|
1331
1385
|
errorPlus: u - m,
|
|
1332
|
-
errorMinus: m -
|
|
1386
|
+
errorMinus: m - c
|
|
1333
1387
|
});
|
|
1334
|
-
}), o.sort((
|
|
1388
|
+
}), o.sort((i, c) => c.z - i.z);
|
|
1335
1389
|
}
|
|
1336
|
-
function
|
|
1390
|
+
function Cn(e, t) {
|
|
1337
1391
|
if (!e.length) return { data: [], layout: {} };
|
|
1338
|
-
const n = [...e].sort((
|
|
1339
|
-
for (let
|
|
1340
|
-
const m = n[
|
|
1341
|
-
if (
|
|
1392
|
+
const n = [...e].sort((a, m) => m.z - a.z), r = [];
|
|
1393
|
+
for (let a = 0; a < n.length; a += 1) {
|
|
1394
|
+
const m = n[a], d = n[a + 1], f = m.z, b = d ? d.z : m.z - 20;
|
|
1395
|
+
if (b === f) continue;
|
|
1342
1396
|
const p = m.val == null ? "" : String(m.val).trim();
|
|
1343
|
-
!p || /^(nan|null|none)$/i.test(p) || r.push({ y0: f, y1:
|
|
1397
|
+
!p || /^(nan|null|none)$/i.test(p) || r.push({ y0: f, y1: b, category: p, fromVal: m.from, toVal: m.to });
|
|
1344
1398
|
}
|
|
1345
|
-
const o = ["#4e79a7", "#f28e2b", "#e15759", "#76b7b2", "#59a14f", "#edc948", "#b07aa1", "#ff9da7", "#9c755f", "#bab0ac", "#d4a6c8", "#86bcb6"],
|
|
1346
|
-
|
|
1347
|
-
),
|
|
1399
|
+
const o = ["#4e79a7", "#f28e2b", "#e15759", "#76b7b2", "#59a14f", "#edc948", "#b07aa1", "#ff9da7", "#9c755f", "#bab0ac", "#d4a6c8", "#86bcb6"], s = [...new Set(r.map((a) => a.category))], i = Object.fromEntries(
|
|
1400
|
+
s.map((a, m) => [a, o[m % o.length]])
|
|
1401
|
+
), c = r.map((a) => ({
|
|
1348
1402
|
type: "rect",
|
|
1349
1403
|
xref: "x",
|
|
1350
1404
|
yref: "y",
|
|
1351
1405
|
x0: 0,
|
|
1352
1406
|
x1: 1,
|
|
1353
|
-
y0:
|
|
1354
|
-
y1:
|
|
1355
|
-
fillcolor:
|
|
1407
|
+
y0: a.y0,
|
|
1408
|
+
y1: a.y1,
|
|
1409
|
+
fillcolor: i[a.category],
|
|
1356
1410
|
line: { width: 0 }
|
|
1357
1411
|
}));
|
|
1358
1412
|
return { data: [{
|
|
1359
1413
|
x: r.map(() => 0.5),
|
|
1360
|
-
y: r.map((
|
|
1414
|
+
y: r.map((a) => (a.y0 + a.y1) / 2),
|
|
1361
1415
|
mode: "text",
|
|
1362
|
-
text: r.map((
|
|
1416
|
+
text: r.map((a) => a.category),
|
|
1363
1417
|
textposition: "middle center",
|
|
1364
1418
|
showlegend: !1,
|
|
1365
1419
|
hoverinfo: "text",
|
|
1366
|
-
customdata: r.map((
|
|
1420
|
+
customdata: r.map((a) => [Math.min(a.fromVal, a.toVal), Math.max(a.fromVal, a.toVal)]),
|
|
1367
1421
|
hovertemplate: "Category: %{text}<br>from: %{customdata[0]} to: %{customdata[1]}<extra></extra>"
|
|
1368
|
-
}], layout:
|
|
1422
|
+
}], layout: Nt({
|
|
1369
1423
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1370
1424
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1371
|
-
shapes:
|
|
1425
|
+
shapes: c,
|
|
1372
1426
|
showlegend: !1,
|
|
1373
1427
|
title: t || void 0
|
|
1374
1428
|
}) };
|
|
1375
1429
|
}
|
|
1376
|
-
function
|
|
1430
|
+
function In(e, t, n) {
|
|
1377
1431
|
if (!e.length) return { data: [], layout: {} };
|
|
1378
|
-
const r = n === "bar", o = n === "markers",
|
|
1379
|
-
x: e.map((
|
|
1380
|
-
y: e.map((
|
|
1432
|
+
const r = n === "bar", o = n === "markers", s = n === "line", i = {
|
|
1433
|
+
x: e.map((a) => a.val),
|
|
1434
|
+
y: e.map((a) => a.z),
|
|
1381
1435
|
hovertemplate: `${t}: %{x}<br>from: %{customdata[0]} to: %{customdata[1]}<extra></extra>`,
|
|
1382
|
-
customdata: e.map((
|
|
1383
|
-
},
|
|
1436
|
+
customdata: e.map((a) => [Math.min(a.from, a.to), Math.max(a.from, a.to)])
|
|
1437
|
+
}, c = {
|
|
1384
1438
|
type: "data",
|
|
1385
1439
|
symmetric: !1,
|
|
1386
|
-
array: e.map((
|
|
1387
|
-
arrayminus: e.map((
|
|
1440
|
+
array: e.map((a) => a.errorPlus),
|
|
1441
|
+
arrayminus: e.map((a) => a.errorMinus),
|
|
1388
1442
|
thickness: 1.5,
|
|
1389
1443
|
width: 2,
|
|
1390
|
-
color:
|
|
1444
|
+
color: xn
|
|
1391
1445
|
};
|
|
1392
1446
|
return { data: [r ? {
|
|
1393
|
-
...
|
|
1447
|
+
...i,
|
|
1394
1448
|
type: "bar",
|
|
1395
1449
|
orientation: "h",
|
|
1396
|
-
marker: { color:
|
|
1397
|
-
error_y:
|
|
1450
|
+
marker: { color: Qe },
|
|
1451
|
+
error_y: c
|
|
1398
1452
|
} : {
|
|
1399
|
-
...
|
|
1453
|
+
...i,
|
|
1400
1454
|
type: "scatter",
|
|
1401
|
-
mode: o ? "markers" :
|
|
1402
|
-
line: { color:
|
|
1403
|
-
marker: { size: 7, color:
|
|
1404
|
-
error_y:
|
|
1405
|
-
}], layout:
|
|
1455
|
+
mode: o ? "markers" : s ? "lines" : "lines+markers",
|
|
1456
|
+
line: { color: Qe, width: 2 },
|
|
1457
|
+
marker: { size: 7, color: _n },
|
|
1458
|
+
error_y: s ? void 0 : c
|
|
1459
|
+
}], layout: Nt({
|
|
1406
1460
|
xaxis: { title: t, zeroline: !1 },
|
|
1407
1461
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1408
1462
|
barmode: "overlay",
|
|
1409
1463
|
showlegend: !1
|
|
1410
1464
|
}) };
|
|
1411
1465
|
}
|
|
1412
|
-
function
|
|
1413
|
-
return !e || !e.length || !n ? { data: [], layout: {} } : t || r === "categorical" ?
|
|
1466
|
+
function An({ points: e, isCategorical: t, property: n, chartType: r }) {
|
|
1467
|
+
return !e || !e.length || !n ? { data: [], layout: {} } : t || r === "categorical" ? Cn(e, n) : In(e, n, r);
|
|
1414
1468
|
}
|
|
1415
|
-
const
|
|
1469
|
+
const zt = [
|
|
1416
1470
|
"#0f172a",
|
|
1417
1471
|
"#1e3a5f",
|
|
1418
1472
|
"#7c3aed",
|
|
@@ -1423,24 +1477,24 @@ const bt = [
|
|
|
1423
1477
|
"#db2777",
|
|
1424
1478
|
"#65a30d",
|
|
1425
1479
|
"#9333ea"
|
|
1426
|
-
],
|
|
1427
|
-
function
|
|
1480
|
+
], vn = { l: 4, r: 4, t: 4, b: 4 }, rt = 10, ot = 12;
|
|
1481
|
+
function Mt(e = {}) {
|
|
1428
1482
|
return {
|
|
1429
1483
|
...e,
|
|
1430
|
-
margin:
|
|
1484
|
+
margin: vn,
|
|
1431
1485
|
autosize: !0,
|
|
1432
1486
|
width: void 0,
|
|
1433
1487
|
xaxis: {
|
|
1434
1488
|
...e.xaxis || {},
|
|
1435
1489
|
tickfont: {
|
|
1436
1490
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1437
|
-
size:
|
|
1491
|
+
size: rt
|
|
1438
1492
|
},
|
|
1439
1493
|
title: {
|
|
1440
1494
|
...e.xaxis && e.xaxis.title || {},
|
|
1441
1495
|
font: {
|
|
1442
1496
|
...e.xaxis && e.xaxis.title && e.xaxis.title.font || {},
|
|
1443
|
-
size:
|
|
1497
|
+
size: ot
|
|
1444
1498
|
}
|
|
1445
1499
|
}
|
|
1446
1500
|
},
|
|
@@ -1448,66 +1502,66 @@ function gt(e = {}) {
|
|
|
1448
1502
|
...e.yaxis || {},
|
|
1449
1503
|
tickfont: {
|
|
1450
1504
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1451
|
-
size:
|
|
1505
|
+
size: rt
|
|
1452
1506
|
},
|
|
1453
1507
|
title: {
|
|
1454
1508
|
...e.yaxis && e.yaxis.title || {},
|
|
1455
1509
|
font: {
|
|
1456
1510
|
...e.yaxis && e.yaxis.title && e.yaxis.title.font || {},
|
|
1457
|
-
size:
|
|
1511
|
+
size: ot
|
|
1458
1512
|
}
|
|
1459
1513
|
}
|
|
1460
1514
|
}
|
|
1461
1515
|
};
|
|
1462
1516
|
}
|
|
1463
|
-
function
|
|
1517
|
+
function En(e, {
|
|
1464
1518
|
tailScale: t = 5,
|
|
1465
1519
|
colorBy: n = null,
|
|
1466
|
-
palette: r =
|
|
1467
|
-
depthCol: o =
|
|
1468
|
-
dipCol:
|
|
1469
|
-
azCol:
|
|
1520
|
+
palette: r = zt,
|
|
1521
|
+
depthCol: o = Y,
|
|
1522
|
+
dipCol: s = B,
|
|
1523
|
+
azCol: i = j
|
|
1470
1524
|
} = {}) {
|
|
1471
|
-
const
|
|
1472
|
-
(
|
|
1525
|
+
const c = e.filter(
|
|
1526
|
+
(b) => b[o] != null && b[s] != null && b[i] != null
|
|
1473
1527
|
);
|
|
1474
|
-
if (!
|
|
1528
|
+
if (!c.length)
|
|
1475
1529
|
return { data: [], layout: {} };
|
|
1476
1530
|
const u = {};
|
|
1477
|
-
n && [...new Set(
|
|
1531
|
+
n && [...new Set(c.map((p) => p[n]).filter((p) => p != null))].sort().forEach((p, h) => {
|
|
1478
1532
|
u[p] = r[h % r.length];
|
|
1479
1533
|
});
|
|
1480
|
-
const
|
|
1481
|
-
for (const
|
|
1482
|
-
const p = Number(
|
|
1483
|
-
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1534
|
+
const l = /* @__PURE__ */ new Map(), a = [];
|
|
1535
|
+
for (const b of c) {
|
|
1536
|
+
const p = Number(b[o]), h = Number(b[s]), _ = Number(b[i]), y = n ? b[n] ?? "_default" : "_default", I = n ? u[y] ?? "#0f172a" : "#0f172a";
|
|
1537
|
+
l.has(y) || l.set(y, { xs: [], ys: [], dips: [], azs: [], color: I });
|
|
1538
|
+
const z = l.get(y);
|
|
1539
|
+
z.xs.push(h), z.ys.push(p), z.dips.push(h), z.azs.push(_);
|
|
1540
|
+
const x = _ * Math.PI / 180, D = t * (Math.abs(h) / 90), S = Math.sin(x) * D, M = Math.cos(x) * D;
|
|
1541
|
+
a.push({
|
|
1488
1542
|
type: "line",
|
|
1489
1543
|
x0: h,
|
|
1490
1544
|
y0: p,
|
|
1491
|
-
x1: h +
|
|
1545
|
+
x1: h + S,
|
|
1492
1546
|
y1: p + M,
|
|
1493
|
-
line: { color:
|
|
1547
|
+
line: { color: I, width: 2 }
|
|
1494
1548
|
});
|
|
1495
1549
|
}
|
|
1496
|
-
const m = [], d = n &&
|
|
1497
|
-
for (const [
|
|
1550
|
+
const m = [], d = n && l.size > 1;
|
|
1551
|
+
for (const [b, p] of l.entries())
|
|
1498
1552
|
m.push({
|
|
1499
1553
|
type: "scatter",
|
|
1500
1554
|
x: p.xs,
|
|
1501
1555
|
y: p.ys,
|
|
1502
1556
|
mode: "markers",
|
|
1503
|
-
name:
|
|
1557
|
+
name: b !== "_default" ? String(b) : void 0,
|
|
1504
1558
|
marker: { size: 8, color: p.color },
|
|
1505
|
-
showlegend: d &&
|
|
1506
|
-
customdata: p.dips.map((h,
|
|
1559
|
+
showlegend: d && b !== "_default",
|
|
1560
|
+
customdata: p.dips.map((h, _) => [h, p.azs[_]]),
|
|
1507
1561
|
hovertemplate: "Depth: %{y}<br>Dip: %{customdata[0]}<br>Az: %{customdata[1]}<extra></extra>"
|
|
1508
1562
|
});
|
|
1509
1563
|
return { data: m, layout: {
|
|
1510
|
-
shapes:
|
|
1564
|
+
shapes: a,
|
|
1511
1565
|
height: 400,
|
|
1512
1566
|
margin: { l: 40, r: 10, t: 10, b: 40 },
|
|
1513
1567
|
xaxis: {
|
|
@@ -1521,23 +1575,23 @@ function fn(e, {
|
|
|
1521
1575
|
showlegend: !!d
|
|
1522
1576
|
} };
|
|
1523
1577
|
}
|
|
1524
|
-
function
|
|
1578
|
+
function Xr(e, {
|
|
1525
1579
|
labelCol: t = "structure_type",
|
|
1526
|
-
palette: n =
|
|
1527
|
-
fromCol: r =
|
|
1528
|
-
toCol: o =
|
|
1580
|
+
palette: n = zt,
|
|
1581
|
+
fromCol: r = X,
|
|
1582
|
+
toCol: o = G
|
|
1529
1583
|
} = {}) {
|
|
1530
|
-
const
|
|
1584
|
+
const s = e.filter((m) => m[r] != null && m[o] != null && Number(m[o]) > Number(m[r])).filter((m) => {
|
|
1531
1585
|
const d = m[t];
|
|
1532
1586
|
if (d == null) return !1;
|
|
1533
1587
|
const f = String(d).trim();
|
|
1534
1588
|
return f !== "" && !/^(nan|null|none)$/i.test(f);
|
|
1535
1589
|
}).map((m) => ({ from: Number(m[r]), to: Number(m[o]), label: String(m[t]).trim() })).sort((m, d) => m.from - d.from);
|
|
1536
|
-
if (!
|
|
1590
|
+
if (!s.length)
|
|
1537
1591
|
return { data: [], layout: {} };
|
|
1538
|
-
const
|
|
1539
|
-
return
|
|
1540
|
-
|
|
1592
|
+
const i = [], c = [], u = [];
|
|
1593
|
+
return s.forEach((m, d) => {
|
|
1594
|
+
i.push({
|
|
1541
1595
|
type: "rect",
|
|
1542
1596
|
xref: "x",
|
|
1543
1597
|
yref: "y",
|
|
@@ -1547,51 +1601,51 @@ function Dr(e, {
|
|
|
1547
1601
|
y1: m.to,
|
|
1548
1602
|
fillcolor: n[d % n.length],
|
|
1549
1603
|
line: { width: 0 }
|
|
1550
|
-
}),
|
|
1604
|
+
}), c.push(0.5 * (m.from + m.to)), u.push(m.label);
|
|
1551
1605
|
}), { data: [{
|
|
1552
1606
|
type: "scatter",
|
|
1553
1607
|
x: Array(u.length).fill(0.5),
|
|
1554
|
-
y:
|
|
1608
|
+
y: c,
|
|
1555
1609
|
mode: "text",
|
|
1556
1610
|
text: u,
|
|
1557
1611
|
textposition: "middle center",
|
|
1558
1612
|
showlegend: !1,
|
|
1559
1613
|
hoverinfo: "text"
|
|
1560
|
-
}], layout:
|
|
1561
|
-
shapes:
|
|
1614
|
+
}], layout: Mt({
|
|
1615
|
+
shapes: i,
|
|
1562
1616
|
height: 400,
|
|
1563
1617
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1564
1618
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1565
1619
|
showlegend: !1
|
|
1566
1620
|
}) };
|
|
1567
1621
|
}
|
|
1568
|
-
function
|
|
1622
|
+
function Dn(e, t) {
|
|
1569
1623
|
if (!e) return "";
|
|
1570
1624
|
const n = String(e).trim().split(/\s+/), r = [];
|
|
1571
1625
|
let o = "";
|
|
1572
|
-
for (const
|
|
1573
|
-
o && o.length + 1 +
|
|
1626
|
+
for (const s of n)
|
|
1627
|
+
o && o.length + 1 + s.length > t ? (r.push(o), o = s) : o = o ? `${o} ${s}` : s;
|
|
1574
1628
|
return o && r.push(o), r.join("<br>");
|
|
1575
1629
|
}
|
|
1576
|
-
function
|
|
1630
|
+
function Sn(e, {
|
|
1577
1631
|
commentCol: t = "comments",
|
|
1578
|
-
fromCol: n =
|
|
1579
|
-
toCol: r =
|
|
1632
|
+
fromCol: n = X,
|
|
1633
|
+
toCol: r = G,
|
|
1580
1634
|
bgColor: o = "#f1f5f9",
|
|
1581
|
-
borderColor:
|
|
1582
|
-
textColor:
|
|
1583
|
-
charsPerLine:
|
|
1635
|
+
borderColor: s = "#cbd5e1",
|
|
1636
|
+
textColor: i = "#1e293b",
|
|
1637
|
+
charsPerLine: c = 18
|
|
1584
1638
|
} = {}) {
|
|
1585
1639
|
const u = e.filter((h) => h[n] != null && h[r] != null && Number(h[r]) > Number(h[n])).map((h) => {
|
|
1586
|
-
const
|
|
1587
|
-
return { from: Number(h[n]), to: Number(h[r]), comment:
|
|
1588
|
-
}).sort((h,
|
|
1640
|
+
const _ = h[t], y = _ != null && String(_).trim() !== "" && String(_) !== "null" ? String(_).trim() : "";
|
|
1641
|
+
return { from: Number(h[n]), to: Number(h[r]), comment: y };
|
|
1642
|
+
}).sort((h, _) => h.from - _.from);
|
|
1589
1643
|
if (!u.length)
|
|
1590
1644
|
return { data: [], layout: {} };
|
|
1591
|
-
const
|
|
1645
|
+
const l = [], a = [], m = [], d = [], f = [];
|
|
1592
1646
|
for (const h of u) {
|
|
1593
|
-
const
|
|
1594
|
-
|
|
1647
|
+
const _ = 0.5 * (h.from + h.to), y = !!h.comment;
|
|
1648
|
+
l.push({
|
|
1595
1649
|
type: "rect",
|
|
1596
1650
|
xref: "x",
|
|
1597
1651
|
yref: "y",
|
|
@@ -1599,313 +1653,313 @@ function pn(e, {
|
|
|
1599
1653
|
x1: 1,
|
|
1600
1654
|
y0: h.from,
|
|
1601
1655
|
y1: h.to,
|
|
1602
|
-
fillcolor:
|
|
1603
|
-
line: { color:
|
|
1604
|
-
}),
|
|
1656
|
+
fillcolor: y ? o : "rgba(0,0,0,0)",
|
|
1657
|
+
line: { color: s, width: 1 }
|
|
1658
|
+
}), y && (a.push(0.5), m.push(_), d.push(Dn(h.comment, c)), f.push(`${h.from}–${h.to} m: ${h.comment}`));
|
|
1605
1659
|
}
|
|
1606
|
-
return { data:
|
|
1660
|
+
return { data: a.length ? [{
|
|
1607
1661
|
type: "scatter",
|
|
1608
|
-
x:
|
|
1662
|
+
x: a,
|
|
1609
1663
|
y: m,
|
|
1610
1664
|
mode: "text",
|
|
1611
1665
|
text: d,
|
|
1612
1666
|
textposition: "middle center",
|
|
1613
|
-
textfont: { color:
|
|
1667
|
+
textfont: { color: i, size: 10 },
|
|
1614
1668
|
hovertext: f,
|
|
1615
1669
|
hoverinfo: "text",
|
|
1616
1670
|
showlegend: !1
|
|
1617
|
-
}] : [], layout:
|
|
1618
|
-
shapes:
|
|
1671
|
+
}] : [], layout: Mt({
|
|
1672
|
+
shapes: l,
|
|
1619
1673
|
height: 400,
|
|
1620
1674
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1621
1675
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1622
1676
|
showlegend: !1
|
|
1623
1677
|
}) };
|
|
1624
1678
|
}
|
|
1625
|
-
function
|
|
1679
|
+
function Zr(e, {
|
|
1626
1680
|
symbolSize: t = 10,
|
|
1627
1681
|
xCol: n = "easting",
|
|
1628
1682
|
yCol: r = "northing"
|
|
1629
1683
|
} = {}) {
|
|
1630
|
-
const o = e[n] != null ? Number(e[n]) : null,
|
|
1631
|
-
if (o === null ||
|
|
1632
|
-
const u = (
|
|
1684
|
+
const o = e[n] != null ? Number(e[n]) : null, s = e[r] != null ? Number(e[r]) : null, i = e[B] != null ? Number(e[B]) : null, c = e[j] != null ? Number(e[j]) : null;
|
|
1685
|
+
if (o === null || s === null || i === null || c === null) return null;
|
|
1686
|
+
const u = (c - 90 + 360) % 360, l = u * Math.PI / 180, a = c * Math.PI / 180, m = t * Math.sin(l), d = t * Math.cos(l), f = t * 0.4 * (i / 90), b = f * Math.sin(a), p = f * Math.cos(a);
|
|
1633
1687
|
return {
|
|
1634
1688
|
strike: u,
|
|
1635
|
-
dipValue:
|
|
1689
|
+
dipValue: i,
|
|
1636
1690
|
x: o,
|
|
1637
|
-
y:
|
|
1691
|
+
y: s,
|
|
1638
1692
|
strikeX0: o - m,
|
|
1639
|
-
strikeY0:
|
|
1693
|
+
strikeY0: s - d,
|
|
1640
1694
|
strikeX1: o + m,
|
|
1641
|
-
strikeY1:
|
|
1642
|
-
tickX1: o +
|
|
1643
|
-
tickY1:
|
|
1695
|
+
strikeY1: s + d,
|
|
1696
|
+
tickX1: o + b,
|
|
1697
|
+
tickY1: s + p
|
|
1644
1698
|
};
|
|
1645
1699
|
}
|
|
1646
|
-
const
|
|
1647
|
-
function
|
|
1700
|
+
const Ct = "markers+line";
|
|
1701
|
+
function Pn(e, t) {
|
|
1648
1702
|
var r;
|
|
1649
|
-
const n =
|
|
1650
|
-
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) ||
|
|
1651
|
-
}
|
|
1652
|
-
function
|
|
1653
|
-
const
|
|
1654
|
-
return
|
|
1655
|
-
const h = m ===
|
|
1656
|
-
if (!
|
|
1657
|
-
const
|
|
1658
|
-
if (!
|
|
1659
|
-
let
|
|
1703
|
+
const n = He(e);
|
|
1704
|
+
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) || Ct;
|
|
1705
|
+
}
|
|
1706
|
+
function Wr({ config: e, graph: t, holeOptions: n = [], propertyOptions: r = [], onConfigChange: o }) {
|
|
1707
|
+
const s = lt(null), i = t == null ? void 0 : t.hole, c = (t == null ? void 0 : t.points) || [], u = (e == null ? void 0 : e.property) || "", l = (e == null ? void 0 : e.chartType) || Ct, a = (e == null ? void 0 : e.holeId) || "", m = (t == null ? void 0 : t.displayType) || (t != null && t.isComment ? _e : t != null && t.isCategorical ? Me : xe), d = He(m), f = Pn(m, l), [b, p] = K("");
|
|
1708
|
+
return ae(() => {
|
|
1709
|
+
const h = m === _e, _ = m === we;
|
|
1710
|
+
if (!i || !u || !h && !_ && c.length === 0) return;
|
|
1711
|
+
const y = s.current;
|
|
1712
|
+
if (!y) return;
|
|
1713
|
+
let I;
|
|
1660
1714
|
try {
|
|
1661
|
-
h ?
|
|
1662
|
-
points:
|
|
1663
|
-
isCategorical: m ===
|
|
1715
|
+
h ? I = Sn(c, { commentCol: u, fromCol: "from", toCol: "to" }) : _ ? I = En(c) : I = An({
|
|
1716
|
+
points: c,
|
|
1717
|
+
isCategorical: m === Me,
|
|
1664
1718
|
property: u,
|
|
1665
1719
|
chartType: f
|
|
1666
1720
|
});
|
|
1667
|
-
} catch (
|
|
1668
|
-
console.error("Plot build error",
|
|
1721
|
+
} catch (x) {
|
|
1722
|
+
console.error("Plot build error", x), p((x == null ? void 0 : x.message) || "Plot build error");
|
|
1669
1723
|
return;
|
|
1670
1724
|
}
|
|
1671
|
-
if ((!(
|
|
1725
|
+
if ((!(I != null && I.data) || I.data.length === 0) && !h)
|
|
1672
1726
|
return;
|
|
1673
|
-
const
|
|
1727
|
+
const z = {
|
|
1674
1728
|
displayModeBar: !0,
|
|
1675
1729
|
responsive: !0,
|
|
1676
1730
|
useResizeHandler: !0,
|
|
1677
1731
|
modeBarButtonsToRemove: ["select2d", "lasso2d", "zoom2d", "zoomIn2d", "zoomOut2d", "autoScale2d"]
|
|
1678
1732
|
};
|
|
1679
1733
|
try {
|
|
1680
|
-
p(""),
|
|
1681
|
-
|
|
1734
|
+
p(""), Ce.react(y, I.data, I.layout, z), requestAnimationFrame(() => {
|
|
1735
|
+
y && y.parentElement && Ce.Plots.resize(y);
|
|
1682
1736
|
});
|
|
1683
|
-
} catch (
|
|
1684
|
-
console.error("Plot render error",
|
|
1737
|
+
} catch (x) {
|
|
1738
|
+
console.error("Plot render error", x), p((x == null ? void 0 : x.message) || "Plot render error");
|
|
1685
1739
|
}
|
|
1686
1740
|
return () => {
|
|
1687
|
-
if (
|
|
1741
|
+
if (y)
|
|
1688
1742
|
try {
|
|
1689
|
-
|
|
1690
|
-
} catch (
|
|
1691
|
-
console.warn("Plot purge error",
|
|
1743
|
+
Ce.purge(y);
|
|
1744
|
+
} catch (x) {
|
|
1745
|
+
console.warn("Plot purge error", x);
|
|
1692
1746
|
}
|
|
1693
1747
|
};
|
|
1694
|
-
}, [
|
|
1695
|
-
const h =
|
|
1748
|
+
}, [i, u, f, m, c]), ae(() => {
|
|
1749
|
+
const h = s.current;
|
|
1696
1750
|
if (!h || typeof ResizeObserver > "u") return;
|
|
1697
|
-
const
|
|
1751
|
+
const _ = new ResizeObserver(() => {
|
|
1698
1752
|
try {
|
|
1699
|
-
h && h.data &&
|
|
1700
|
-
} catch (
|
|
1701
|
-
console.warn("Plot resize error",
|
|
1753
|
+
h && h.data && Ce.Plots.resize(h);
|
|
1754
|
+
} catch (y) {
|
|
1755
|
+
console.warn("Plot resize error", y);
|
|
1702
1756
|
}
|
|
1703
1757
|
});
|
|
1704
|
-
return
|
|
1705
|
-
}, []), !
|
|
1758
|
+
return _.observe(h), () => _.disconnect();
|
|
1759
|
+
}, []), !i || !u ? /* @__PURE__ */ L("div", { className: "plot-card empty", children: /* @__PURE__ */ L("div", { className: "placeholder", children: e != null && e.holeId ? t != null && t.loading ? `Loading ${e.holeId}...` : "Select a property" : "Loading demo data..." }) }) : m !== _e && m !== we && c.length === 0 ? /* @__PURE__ */ L("div", { className: "plot-card empty", children: /* @__PURE__ */ L("div", { className: "placeholder", children: "No data" }) }) : b ? /* @__PURE__ */ L("div", { className: "plot-card empty", children: /* @__PURE__ */ Q("div", { className: "placeholder", children: [
|
|
1706
1760
|
"Plot error: ",
|
|
1707
|
-
|
|
1708
|
-
] }) }) : /* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1761
|
+
b
|
|
1762
|
+
] }) }) : /* @__PURE__ */ Q("div", { className: "plot-card", children: [
|
|
1763
|
+
/* @__PURE__ */ L("div", { className: "plot-title", children: /* @__PURE__ */ L(
|
|
1710
1764
|
"select",
|
|
1711
1765
|
{
|
|
1712
1766
|
className: "plot-select",
|
|
1713
|
-
value:
|
|
1767
|
+
value: a,
|
|
1714
1768
|
onChange: (h) => o && o({ holeId: h.target.value }),
|
|
1715
1769
|
children: n.map((h) => {
|
|
1716
|
-
const
|
|
1717
|
-
return /* @__PURE__ */
|
|
1770
|
+
const _ = typeof h == "string" ? h : h.holeId, y = typeof h == "string" ? h : h.label || h.holeId;
|
|
1771
|
+
return /* @__PURE__ */ L("option", { value: _, children: y }, _);
|
|
1718
1772
|
})
|
|
1719
1773
|
}
|
|
1720
1774
|
) }),
|
|
1721
|
-
/* @__PURE__ */
|
|
1722
|
-
r.length > 0 && /* @__PURE__ */
|
|
1775
|
+
/* @__PURE__ */ Q("div", { className: "plot-controls column", children: [
|
|
1776
|
+
r.length > 0 && /* @__PURE__ */ L(
|
|
1723
1777
|
"select",
|
|
1724
1778
|
{
|
|
1725
1779
|
className: "plot-select",
|
|
1726
1780
|
value: u,
|
|
1727
1781
|
onChange: (h) => o && o({ property: h.target.value }),
|
|
1728
|
-
children: r.map((h) => /* @__PURE__ */
|
|
1782
|
+
children: r.map((h) => /* @__PURE__ */ L("option", { value: h, children: h }, h))
|
|
1729
1783
|
}
|
|
1730
1784
|
),
|
|
1731
|
-
d.length > 1 && /* @__PURE__ */
|
|
1785
|
+
d.length > 1 && /* @__PURE__ */ L(
|
|
1732
1786
|
"select",
|
|
1733
1787
|
{
|
|
1734
1788
|
className: "plot-select",
|
|
1735
1789
|
value: f,
|
|
1736
1790
|
onChange: (h) => o && o({ chartType: h.target.value }),
|
|
1737
|
-
children: d.map((h) => /* @__PURE__ */
|
|
1791
|
+
children: d.map((h) => /* @__PURE__ */ L("option", { value: h.value, children: h.label }, h.value))
|
|
1738
1792
|
}
|
|
1739
1793
|
)
|
|
1740
1794
|
] }),
|
|
1741
|
-
/* @__PURE__ */
|
|
1795
|
+
/* @__PURE__ */ L("div", { className: "plotly-chart", ref: s })
|
|
1742
1796
|
] });
|
|
1743
1797
|
}
|
|
1744
|
-
function
|
|
1798
|
+
function st(e, t) {
|
|
1745
1799
|
if (!(t != null && t.length)) return e;
|
|
1746
1800
|
const n = new Map(e.map((r) => [r.id || r.holeId, { ...r }]));
|
|
1747
1801
|
for (const r of t) {
|
|
1748
1802
|
const o = r.id || r.holeId;
|
|
1749
1803
|
if (o)
|
|
1750
1804
|
if (n.has(o)) {
|
|
1751
|
-
const
|
|
1752
|
-
n.set(o, { ...
|
|
1805
|
+
const s = n.get(o);
|
|
1806
|
+
n.set(o, { ...s, points: [...s.points || [], ...r.points || []] });
|
|
1753
1807
|
} else
|
|
1754
1808
|
n.set(o, r);
|
|
1755
1809
|
}
|
|
1756
1810
|
return Array.from(n.values());
|
|
1757
1811
|
}
|
|
1758
|
-
function
|
|
1812
|
+
function kn(e, t) {
|
|
1759
1813
|
if (!e || !t) return [];
|
|
1760
1814
|
const n = /* @__PURE__ */ new Set(), r = [];
|
|
1761
1815
|
for (const o of e.points || []) {
|
|
1762
|
-
const
|
|
1763
|
-
if (!Number.isFinite(
|
|
1764
|
-
const
|
|
1765
|
-
n.has(
|
|
1816
|
+
const s = Number(o.from ?? o.samp_from ?? o.depth_from ?? o.from_depth), i = Number(o.to ?? o.samp_to ?? o.depth_to ?? o.to_depth);
|
|
1817
|
+
if (!Number.isFinite(s) || !Number.isFinite(i) || i <= s) continue;
|
|
1818
|
+
const c = `${s}-${i}`;
|
|
1819
|
+
n.has(c) || (n.add(c), r.push({ from: s, to: i, [t]: o[t] ?? "" }));
|
|
1766
1820
|
}
|
|
1767
1821
|
return r;
|
|
1768
1822
|
}
|
|
1769
|
-
function
|
|
1823
|
+
function Kr({
|
|
1770
1824
|
initialFocusedHoleId: e = "",
|
|
1771
1825
|
sourceFile: t = null,
|
|
1772
1826
|
extraHoles: n = [],
|
|
1773
1827
|
plotCount: r = 4
|
|
1774
1828
|
} = {}) {
|
|
1775
|
-
const [o,
|
|
1776
|
-
|
|
1777
|
-
!t ||
|
|
1778
|
-
if (!
|
|
1779
|
-
const
|
|
1780
|
-
|
|
1781
|
-
holeIds:
|
|
1782
|
-
focusedHoleId:
|
|
1829
|
+
const [o, s] = K([]), [i, c] = K([]), [u, l] = K([]), [a, m] = K([]), [d, f] = K([]), [b, p] = K({}), [h, _] = K(""), [y, I] = K([]), [z, x] = K(""), [D, S] = K(e || ""), [M, O] = K([]), $ = lt(null);
|
|
1830
|
+
ae(() => {
|
|
1831
|
+
!t || $.current === t || ($.current = t, Kt(t).then((A) => {
|
|
1832
|
+
if (!A) return;
|
|
1833
|
+
const v = Array.from(new Map(A.map((P) => [P.holeId, P])).values());
|
|
1834
|
+
c(v), I(pt({
|
|
1835
|
+
holeIds: v.map((P) => P.holeId),
|
|
1836
|
+
focusedHoleId: D,
|
|
1783
1837
|
plotCount: r,
|
|
1784
1838
|
defaultProp: "",
|
|
1785
|
-
categoricalProps:
|
|
1839
|
+
categoricalProps: a,
|
|
1786
1840
|
commentProps: d,
|
|
1787
1841
|
numericDefaultChartType: "markers+line"
|
|
1788
1842
|
}));
|
|
1789
|
-
}).catch((
|
|
1790
|
-
console.info("Assay metadata load skipped:",
|
|
1843
|
+
}).catch((A) => {
|
|
1844
|
+
console.info("Assay metadata load skipped:", A.message);
|
|
1791
1845
|
}));
|
|
1792
|
-
}, [t,
|
|
1846
|
+
}, [t, D, r, a, d]), ae(() => {
|
|
1793
1847
|
if (!(n != null && n.length)) return;
|
|
1794
|
-
const
|
|
1795
|
-
|
|
1796
|
-
const
|
|
1797
|
-
return
|
|
1848
|
+
const A = n.map((v) => ({ holeId: v.id || v.holeId })).filter((v) => v.holeId);
|
|
1849
|
+
c((v) => {
|
|
1850
|
+
const P = new Set(v.map((C) => C.holeId)), g = A.filter((C) => !P.has(C.holeId));
|
|
1851
|
+
return g.length ? [...v, ...g] : v;
|
|
1798
1852
|
});
|
|
1799
|
-
}, [n]),
|
|
1800
|
-
|
|
1801
|
-
}, [
|
|
1802
|
-
if (!
|
|
1803
|
-
|
|
1853
|
+
}, [n]), ae(() => {
|
|
1854
|
+
x((A) => A && A.startsWith("Loading data for hole") ? A : "");
|
|
1855
|
+
}, [y]), ae(() => {
|
|
1856
|
+
if (!i.length) {
|
|
1857
|
+
I([]);
|
|
1804
1858
|
return;
|
|
1805
1859
|
}
|
|
1806
|
-
const
|
|
1807
|
-
|
|
1808
|
-
var
|
|
1809
|
-
const
|
|
1810
|
-
property:
|
|
1811
|
-
chartType:
|
|
1812
|
-
categoricalProps:
|
|
1860
|
+
const A = ht(i.map((v) => v.holeId), D);
|
|
1861
|
+
I((v) => Array.from({ length: r }).map((g, C) => {
|
|
1862
|
+
var U;
|
|
1863
|
+
const F = v[C] || {}, V = i.some((re) => re.holeId === F.holeId) ? F.holeId : A[C] || ((U = i[C]) == null ? void 0 : U.holeId) || "", k = F.property || h, H = Ae({
|
|
1864
|
+
property: k,
|
|
1865
|
+
chartType: F.chartType,
|
|
1866
|
+
categoricalProps: a,
|
|
1813
1867
|
commentProps: d,
|
|
1814
1868
|
numericDefaultChartType: "markers+line"
|
|
1815
1869
|
});
|
|
1816
|
-
return { holeId:
|
|
1870
|
+
return { holeId: V, property: k, chartType: H };
|
|
1817
1871
|
}));
|
|
1818
|
-
}, [
|
|
1872
|
+
}, [i, D, h, a, d, r]), ae(() => {
|
|
1819
1873
|
if (!t) return;
|
|
1820
|
-
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
const
|
|
1825
|
-
[...
|
|
1874
|
+
y.map((v) => v.holeId).filter(Boolean).forEach((v) => {
|
|
1875
|
+
const P = o.some((C) => (C.id || C.holeId) === v), g = M.includes(v);
|
|
1876
|
+
P || g || (O((C) => [...C, v]), Jt(t, v).then((C) => {
|
|
1877
|
+
O((F) => F.filter((V) => V !== v)), C && s((F) => {
|
|
1878
|
+
const V = st(
|
|
1879
|
+
[...F.filter((H) => (H.id || H.holeId) !== v), C],
|
|
1826
1880
|
n
|
|
1827
|
-
),
|
|
1828
|
-
return
|
|
1829
|
-
...
|
|
1830
|
-
property:
|
|
1831
|
-
chartType:
|
|
1832
|
-
property:
|
|
1833
|
-
chartType:
|
|
1834
|
-
categoricalProps:
|
|
1835
|
-
commentProps:
|
|
1881
|
+
), k = Ee(V);
|
|
1882
|
+
return l(k.numericProps), m(k.categoricalProps), f(k.commentProps), p(k.columnMeta), !h && k.defaultProp && (_(k.defaultProp), I((H) => H.map((U) => ({
|
|
1883
|
+
...U,
|
|
1884
|
+
property: U.property || k.defaultProp,
|
|
1885
|
+
chartType: Ae({
|
|
1886
|
+
property: U.property || k.defaultProp,
|
|
1887
|
+
chartType: U.chartType,
|
|
1888
|
+
categoricalProps: k.categoricalProps,
|
|
1889
|
+
commentProps: k.commentProps,
|
|
1836
1890
|
numericDefaultChartType: "markers+line"
|
|
1837
1891
|
})
|
|
1838
|
-
})))),
|
|
1892
|
+
})))), V;
|
|
1839
1893
|
});
|
|
1840
|
-
}).catch((
|
|
1841
|
-
console.error(
|
|
1894
|
+
}).catch((C) => {
|
|
1895
|
+
console.error(C), O((F) => F.filter((V) => V !== v)), x(C.message || `Error loading hole ${v}`);
|
|
1842
1896
|
}));
|
|
1843
1897
|
});
|
|
1844
|
-
}, [
|
|
1845
|
-
n != null && n.length &&
|
|
1846
|
-
if (!
|
|
1847
|
-
const
|
|
1848
|
-
return
|
|
1898
|
+
}, [y, t, o, M, h, n]), ae(() => {
|
|
1899
|
+
n != null && n.length && s((A) => {
|
|
1900
|
+
if (!A.length) {
|
|
1901
|
+
const g = Ee(n);
|
|
1902
|
+
return l(g.numericProps), m(g.categoricalProps), f(g.commentProps), p(g.columnMeta), !h && g.defaultProp && _(g.defaultProp), n;
|
|
1849
1903
|
}
|
|
1850
|
-
const
|
|
1851
|
-
return
|
|
1904
|
+
const v = st(A, n), P = Ee(v);
|
|
1905
|
+
return l(P.numericProps), m(P.categoricalProps), f(P.commentProps), p(P.columnMeta), !h && P.defaultProp && _(P.defaultProp), v;
|
|
1852
1906
|
});
|
|
1853
1907
|
}, [n]);
|
|
1854
|
-
const
|
|
1855
|
-
() => [...u, ...
|
|
1856
|
-
[u,
|
|
1857
|
-
),
|
|
1858
|
-
() =>
|
|
1859
|
-
[
|
|
1860
|
-
),
|
|
1861
|
-
const
|
|
1862
|
-
return Array.from({ length: r }).map((
|
|
1863
|
-
const
|
|
1864
|
-
let
|
|
1865
|
-
|
|
1866
|
-
const
|
|
1908
|
+
const Z = ke(
|
|
1909
|
+
() => [...u, ...a, ...d],
|
|
1910
|
+
[u, a, d]
|
|
1911
|
+
), T = ke(
|
|
1912
|
+
() => i.map((A) => ({ holeId: A.holeId, label: A.holeId })).sort((A, v) => A.label.localeCompare(v.label)),
|
|
1913
|
+
[i]
|
|
1914
|
+
), R = ke(() => {
|
|
1915
|
+
const A = [...u, ...a, ...d];
|
|
1916
|
+
return Array.from({ length: r }).map((v, P) => {
|
|
1917
|
+
const g = y[P] || {}, C = o.find((le) => (le.id || le.holeId) === g.holeId) || null, F = C ? A.filter((le) => zn(C, le)) : A;
|
|
1918
|
+
let V = g.property || h;
|
|
1919
|
+
C && !F.includes(V) && (V = F[0] || V);
|
|
1920
|
+
const k = d.includes(V), H = !k && a.includes(V), U = !k && !H && V === "dip", re = k ? "comment" : U ? "tadpole" : H ? "categorical" : "numeric", de = U ? "tadpole" : g.chartType || (k ? "comment" : H ? "categorical" : "markers+line"), ie = g.holeId || (C == null ? void 0 : C.id) || (C == null ? void 0 : C.holeId) || "", Ne = U ? (C == null ? void 0 : C.points) || [] : k ? kn(C, V) : Mn(C, V, H);
|
|
1867
1921
|
return {
|
|
1868
|
-
config: { holeId:
|
|
1869
|
-
hole:
|
|
1870
|
-
loading: M.includes(
|
|
1871
|
-
isCategorical:
|
|
1872
|
-
isComment:
|
|
1873
|
-
isTadpole:
|
|
1874
|
-
displayType:
|
|
1875
|
-
points:
|
|
1876
|
-
propertyOptions:
|
|
1877
|
-
label:
|
|
1922
|
+
config: { holeId: ie, property: V, chartType: de },
|
|
1923
|
+
hole: C,
|
|
1924
|
+
loading: M.includes(g.holeId),
|
|
1925
|
+
isCategorical: H,
|
|
1926
|
+
isComment: k,
|
|
1927
|
+
isTadpole: U,
|
|
1928
|
+
displayType: re,
|
|
1929
|
+
points: Ne,
|
|
1930
|
+
propertyOptions: F,
|
|
1931
|
+
label: ie
|
|
1878
1932
|
};
|
|
1879
1933
|
});
|
|
1880
|
-
}, [
|
|
1881
|
-
|
|
1882
|
-
const
|
|
1883
|
-
return
|
|
1884
|
-
property:
|
|
1885
|
-
chartType:
|
|
1886
|
-
categoricalProps:
|
|
1934
|
+
}, [y, o, h, a, d, M, r, u]), q = (A, v) => {
|
|
1935
|
+
I((P) => {
|
|
1936
|
+
const g = [...P], F = { ...g[A] || {}, ...v };
|
|
1937
|
+
return v.property && (F.chartType = Ae({
|
|
1938
|
+
property: v.property,
|
|
1939
|
+
chartType: F.chartType,
|
|
1940
|
+
categoricalProps: a,
|
|
1887
1941
|
commentProps: d,
|
|
1888
1942
|
numericDefaultChartType: "markers+line"
|
|
1889
|
-
})),
|
|
1943
|
+
})), g[A] = F, g;
|
|
1890
1944
|
});
|
|
1891
1945
|
};
|
|
1892
1946
|
return {
|
|
1893
|
-
error:
|
|
1894
|
-
focusedHoleId:
|
|
1895
|
-
setFocusedHoleId:
|
|
1896
|
-
setError:
|
|
1897
|
-
holeCount:
|
|
1947
|
+
error: z,
|
|
1948
|
+
focusedHoleId: D,
|
|
1949
|
+
setFocusedHoleId: S,
|
|
1950
|
+
setError: x,
|
|
1951
|
+
holeCount: i.length,
|
|
1898
1952
|
numericProps: u,
|
|
1899
|
-
categoricalProps:
|
|
1953
|
+
categoricalProps: a,
|
|
1900
1954
|
commentProps: d,
|
|
1901
|
-
columnMeta:
|
|
1902
|
-
propertyOptions:
|
|
1903
|
-
labeledHoleOptions:
|
|
1904
|
-
traceGraphs:
|
|
1905
|
-
handleConfigChange:
|
|
1955
|
+
columnMeta: b,
|
|
1956
|
+
propertyOptions: Z,
|
|
1957
|
+
labeledHoleOptions: T,
|
|
1958
|
+
traceGraphs: R,
|
|
1959
|
+
handleConfigChange: q
|
|
1906
1960
|
};
|
|
1907
1961
|
}
|
|
1908
|
-
const
|
|
1962
|
+
const Ln = [
|
|
1909
1963
|
"#313695",
|
|
1910
1964
|
"#4575b4",
|
|
1911
1965
|
"#74add1",
|
|
@@ -1917,8 +1971,8 @@ const gn = [
|
|
|
1917
1971
|
"#d73027",
|
|
1918
1972
|
"#a50026"
|
|
1919
1973
|
];
|
|
1920
|
-
function
|
|
1921
|
-
const n = e.filter((
|
|
1974
|
+
function Tn(e = [], t = Ln) {
|
|
1975
|
+
const n = e.filter((l) => Number.isFinite(l));
|
|
1922
1976
|
if (!n.length)
|
|
1923
1977
|
return {
|
|
1924
1978
|
min: null,
|
|
@@ -1927,44 +1981,44 @@ function _n(e = [], t = gn) {
|
|
|
1927
1981
|
bins: [],
|
|
1928
1982
|
colors: t
|
|
1929
1983
|
};
|
|
1930
|
-
const r = n.slice().sort((
|
|
1931
|
-
if (
|
|
1932
|
-
const
|
|
1984
|
+
const r = n.slice().sort((l, a) => l - a), o = r[0], s = r[r.length - 1], i = t.length;
|
|
1985
|
+
if (s === o) {
|
|
1986
|
+
const l = t.map((a, m) => ({
|
|
1933
1987
|
index: m,
|
|
1934
1988
|
min: o,
|
|
1935
|
-
max:
|
|
1989
|
+
max: s,
|
|
1936
1990
|
label: `${o}`
|
|
1937
1991
|
}));
|
|
1938
1992
|
return {
|
|
1939
1993
|
min: o,
|
|
1940
|
-
max:
|
|
1994
|
+
max: s,
|
|
1941
1995
|
step: 0,
|
|
1942
|
-
bins:
|
|
1996
|
+
bins: l,
|
|
1943
1997
|
colors: t
|
|
1944
1998
|
};
|
|
1945
1999
|
}
|
|
1946
|
-
const
|
|
1947
|
-
const m =
|
|
2000
|
+
const c = t.map((l, a) => {
|
|
2001
|
+
const m = a / i, d = (a + 1) / i, f = Math.floor(m * r.length), b = Math.min(r.length - 1, Math.floor(d * r.length)), p = r[f], h = a === i - 1 ? s : r[b];
|
|
1948
2002
|
return {
|
|
1949
|
-
index:
|
|
2003
|
+
index: a,
|
|
1950
2004
|
min: p,
|
|
1951
2005
|
max: h,
|
|
1952
|
-
label:
|
|
2006
|
+
label: Fn(p, h)
|
|
1953
2007
|
};
|
|
1954
|
-
}), u = (
|
|
2008
|
+
}), u = (s - o) / i;
|
|
1955
2009
|
return {
|
|
1956
2010
|
min: o,
|
|
1957
|
-
max:
|
|
2011
|
+
max: s,
|
|
1958
2012
|
step: u,
|
|
1959
|
-
bins:
|
|
2013
|
+
bins: c,
|
|
1960
2014
|
colors: t
|
|
1961
2015
|
};
|
|
1962
2016
|
}
|
|
1963
|
-
function
|
|
2017
|
+
function Fn(e, t) {
|
|
1964
2018
|
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";
|
|
1965
2019
|
return `${n(e)} – ${n(t)}`;
|
|
1966
2020
|
}
|
|
1967
|
-
function
|
|
2021
|
+
function It(e, t) {
|
|
1968
2022
|
if (!Number.isFinite(e) || !t || !Array.isArray(t.bins) || !t.bins.length)
|
|
1969
2023
|
return -1;
|
|
1970
2024
|
if (t.max === t.min)
|
|
@@ -1976,92 +2030,92 @@ function xt(e, t) {
|
|
|
1976
2030
|
}
|
|
1977
2031
|
return -1;
|
|
1978
2032
|
}
|
|
1979
|
-
function
|
|
1980
|
-
const r =
|
|
2033
|
+
function On(e, t, n = "#8b1e3f") {
|
|
2034
|
+
const r = It(e, t);
|
|
1981
2035
|
return r < 0 ? n : t.colors[r] || n;
|
|
1982
2036
|
}
|
|
1983
|
-
function
|
|
2037
|
+
function At(e) {
|
|
1984
2038
|
return Array.isArray(e) ? e : [];
|
|
1985
2039
|
}
|
|
1986
|
-
function
|
|
2040
|
+
function Te(e) {
|
|
1987
2041
|
const t = Number(e);
|
|
1988
2042
|
return Number.isFinite(t) ? t : void 0;
|
|
1989
2043
|
}
|
|
1990
|
-
function
|
|
2044
|
+
function vt(e = {}) {
|
|
1991
2045
|
return {
|
|
1992
2046
|
...e,
|
|
1993
|
-
x:
|
|
1994
|
-
y:
|
|
1995
|
-
z:
|
|
2047
|
+
x: Te(e.x),
|
|
2048
|
+
y: Te(e.y),
|
|
2049
|
+
z: Te(e.z)
|
|
1996
2050
|
};
|
|
1997
2051
|
}
|
|
1998
|
-
function
|
|
1999
|
-
const [r, o] = t,
|
|
2000
|
-
return
|
|
2052
|
+
function Vn(e = [], t = [0, 0], n = 0) {
|
|
2053
|
+
const [r, o] = t, s = Number(n) * Math.PI / 180, i = Math.cos(s), c = Math.sin(s);
|
|
2054
|
+
return At(e).map(vt).map((u) => {
|
|
2001
2055
|
if (!Number.isFinite(u.x) || !Number.isFinite(u.y)) return { ...u };
|
|
2002
|
-
const
|
|
2056
|
+
const l = u.x - r, a = u.y - o;
|
|
2003
2057
|
return {
|
|
2004
2058
|
...u,
|
|
2005
|
-
along:
|
|
2006
|
-
across:
|
|
2059
|
+
along: l * c + a * i,
|
|
2060
|
+
across: l * i - a * c
|
|
2007
2061
|
};
|
|
2008
2062
|
});
|
|
2009
2063
|
}
|
|
2010
|
-
function
|
|
2011
|
-
const o =
|
|
2012
|
-
return !Number.isFinite(
|
|
2064
|
+
function wn(e = [], t = [0, 0], n = 0, r = 50) {
|
|
2065
|
+
const o = Vn(e, t, n), s = 0.5 * Number(r || 0);
|
|
2066
|
+
return !Number.isFinite(s) || s <= 0 ? o : o.filter((i) => Number.isFinite(i.across) && Math.abs(i.across) <= s);
|
|
2013
2067
|
}
|
|
2014
|
-
function
|
|
2015
|
-
let r =
|
|
2068
|
+
function Jr(e = [], t = null, n = null) {
|
|
2069
|
+
let r = At(e).map(vt);
|
|
2016
2070
|
if (Array.isArray(t) && t.length === 2) {
|
|
2017
|
-
const [o,
|
|
2018
|
-
r = r.filter((
|
|
2071
|
+
const [o, s] = t;
|
|
2072
|
+
r = r.filter((i) => Number.isFinite(i.z) && i.z <= Number(o) && i.z >= Number(s));
|
|
2019
2073
|
}
|
|
2020
2074
|
return n && (r = r.map((o) => ({
|
|
2021
2075
|
...o,
|
|
2022
2076
|
color_value: o == null ? void 0 : o[n]
|
|
2023
2077
|
}))), r;
|
|
2024
2078
|
}
|
|
2025
|
-
function
|
|
2026
|
-
let
|
|
2027
|
-
return o && (
|
|
2028
|
-
...
|
|
2029
|
-
color_value:
|
|
2030
|
-
}))),
|
|
2079
|
+
function Qr(e = [], t = [0, 0], n = 0, r = 50, o = null) {
|
|
2080
|
+
let s = wn(e, t, n, r);
|
|
2081
|
+
return o && (s = s.map((i) => ({
|
|
2082
|
+
...i,
|
|
2083
|
+
color_value: i == null ? void 0 : i[o]
|
|
2084
|
+
}))), s;
|
|
2031
2085
|
}
|
|
2032
|
-
function
|
|
2086
|
+
function Ue(e) {
|
|
2033
2087
|
return Array.isArray(e) ? e : [];
|
|
2034
2088
|
}
|
|
2035
|
-
function
|
|
2089
|
+
function Ye(e = {}) {
|
|
2036
2090
|
return e.hole_id ?? e.holeId ?? e.id;
|
|
2037
2091
|
}
|
|
2038
|
-
function
|
|
2092
|
+
function he(e, t = void 0) {
|
|
2039
2093
|
const n = Number(e);
|
|
2040
2094
|
return Number.isFinite(n) ? n : t;
|
|
2041
2095
|
}
|
|
2042
|
-
function
|
|
2096
|
+
function eo(e = [], t = null) {
|
|
2043
2097
|
const n = /* @__PURE__ */ new Map();
|
|
2044
|
-
|
|
2045
|
-
const
|
|
2046
|
-
if (
|
|
2047
|
-
const
|
|
2048
|
-
n.has(
|
|
2098
|
+
Ue(e).forEach((o) => {
|
|
2099
|
+
const s = Ye(o);
|
|
2100
|
+
if (s == null || `${s}`.trim() === "") return;
|
|
2101
|
+
const i = `${s}`;
|
|
2102
|
+
n.has(i) || n.set(i, []), n.get(i).push(o);
|
|
2049
2103
|
});
|
|
2050
2104
|
const r = [];
|
|
2051
|
-
return n.forEach((o,
|
|
2052
|
-
const
|
|
2053
|
-
hole_id:
|
|
2054
|
-
x:
|
|
2055
|
-
y:
|
|
2056
|
-
z:
|
|
2105
|
+
return n.forEach((o, s) => {
|
|
2106
|
+
const i = [...o].sort((u, l) => he(u.md, 0) - he(l.md, 0)), c = {
|
|
2107
|
+
hole_id: s,
|
|
2108
|
+
x: i.map((u) => he(u.x, 0)),
|
|
2109
|
+
y: i.map((u) => he(u.y, 0)),
|
|
2110
|
+
z: i.map((u) => he(u.z, 0)),
|
|
2057
2111
|
color: null
|
|
2058
2112
|
};
|
|
2059
|
-
t && (
|
|
2113
|
+
t && (c.color = i.map((u) => u == null ? void 0 : u[t])), r.push(c);
|
|
2060
2114
|
}), r;
|
|
2061
2115
|
}
|
|
2062
|
-
function
|
|
2063
|
-
return
|
|
2064
|
-
hole_id:
|
|
2116
|
+
function to(e = [], t = 1, n = null) {
|
|
2117
|
+
return Ue(e).map((r) => ({
|
|
2118
|
+
hole_id: Ye(r),
|
|
2065
2119
|
from: r == null ? void 0 : r.from,
|
|
2066
2120
|
to: r == null ? void 0 : r.to,
|
|
2067
2121
|
radius: t,
|
|
@@ -2069,14 +2123,14 @@ function wr(e = [], t = 1, n = null) {
|
|
|
2069
2123
|
value: n ? r == null ? void 0 : r[n] : null
|
|
2070
2124
|
}));
|
|
2071
2125
|
}
|
|
2072
|
-
function
|
|
2073
|
-
return t ?
|
|
2074
|
-
hole_id:
|
|
2126
|
+
function no(e = [], t = null) {
|
|
2127
|
+
return t ? Ue(e).filter((n) => Object.prototype.hasOwnProperty.call(n || {}, t)).map((n) => ({
|
|
2128
|
+
hole_id: Ye(n),
|
|
2075
2129
|
label: n == null ? void 0 : n[t],
|
|
2076
|
-
depth: 0.5 * (
|
|
2130
|
+
depth: 0.5 * (he(n == null ? void 0 : n.from, 0) + he(n == null ? void 0 : n.to, 0))
|
|
2077
2131
|
})) : [];
|
|
2078
2132
|
}
|
|
2079
|
-
const
|
|
2133
|
+
const $n = {
|
|
2080
2134
|
bedding: "#2563eb",
|
|
2081
2135
|
foliation: "#16a34a",
|
|
2082
2136
|
joint: "#9333ea",
|
|
@@ -2085,13 +2139,13 @@ const Cn = {
|
|
|
2085
2139
|
"shear zone": "#0ea5e9",
|
|
2086
2140
|
"fault zone": "#ef4444"
|
|
2087
2141
|
};
|
|
2088
|
-
function
|
|
2089
|
-
const n = t ||
|
|
2090
|
-
return new
|
|
2142
|
+
function Rn(e, t) {
|
|
2143
|
+
const n = t || $n, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
|
|
2144
|
+
return new N.Color(o).getHex();
|
|
2091
2145
|
}
|
|
2092
|
-
function
|
|
2146
|
+
function Hn(e, t) {
|
|
2093
2147
|
const n = e * Math.PI / 180, r = t * Math.PI / 180;
|
|
2094
|
-
return new
|
|
2148
|
+
return new N.Vector3(
|
|
2095
2149
|
Math.sin(r) * Math.sin(n),
|
|
2096
2150
|
// East component
|
|
2097
2151
|
Math.cos(r) * Math.sin(n),
|
|
@@ -2100,60 +2154,60 @@ function An(e, t) {
|
|
|
2100
2154
|
// Up component
|
|
2101
2155
|
).normalize();
|
|
2102
2156
|
}
|
|
2103
|
-
function
|
|
2157
|
+
function jn(e, t = {}) {
|
|
2104
2158
|
const {
|
|
2105
2159
|
radius: n = 5,
|
|
2106
2160
|
discThickness: r = 0.2,
|
|
2107
2161
|
opacity: o = 0.7,
|
|
2108
|
-
segments:
|
|
2109
|
-
colorMap:
|
|
2110
|
-
} = t,
|
|
2111
|
-
for (const
|
|
2112
|
-
const
|
|
2113
|
-
if (
|
|
2114
|
-
const f =
|
|
2162
|
+
segments: s = 32,
|
|
2163
|
+
colorMap: i = null
|
|
2164
|
+
} = t, c = new N.Group(), u = new N.Vector3(0, 1, 0);
|
|
2165
|
+
for (const l of e) {
|
|
2166
|
+
const a = l.x != null ? l.x : l.easting != null ? l.easting : null, m = l.y != null ? l.y : l.northing != null ? l.northing : null, d = l.z != null ? l.z : l.elevation != null ? l.elevation : null;
|
|
2167
|
+
if (a == null || m == null || d == null || !Number.isFinite(a) || !Number.isFinite(m) || !Number.isFinite(d)) continue;
|
|
2168
|
+
const f = l[B] != null ? Number(l[B]) : null, b = l[j] != null ? Number(l[j]) : null;
|
|
2115
2169
|
let p;
|
|
2116
|
-
if (
|
|
2117
|
-
p = new
|
|
2170
|
+
if (l.nx != null && Number.isFinite(l.nx) && l.ny != null && Number.isFinite(l.ny) && l.nz != null && Number.isFinite(l.nz))
|
|
2171
|
+
p = new N.Vector3(l.nx, l.ny, l.nz).normalize();
|
|
2118
2172
|
else {
|
|
2119
|
-
if (f == null ||
|
|
2120
|
-
p =
|
|
2173
|
+
if (f == null || b == null || !Number.isFinite(f) || !Number.isFinite(b)) continue;
|
|
2174
|
+
p = Hn(f, b);
|
|
2121
2175
|
}
|
|
2122
|
-
const h = new
|
|
2123
|
-
color:
|
|
2176
|
+
const h = new N.CylinderGeometry(n, n, r, s, 1, !1), _ = new N.MeshStandardMaterial({
|
|
2177
|
+
color: Rn(l.structure_type, i),
|
|
2124
2178
|
transparent: !0,
|
|
2125
2179
|
opacity: o,
|
|
2126
|
-
side:
|
|
2127
|
-
}),
|
|
2128
|
-
|
|
2180
|
+
side: N.DoubleSide
|
|
2181
|
+
}), y = new N.Mesh(h, _);
|
|
2182
|
+
y.position.set(a, m, d), y.quaternion.setFromUnitVectors(u, p), y.userData = {
|
|
2129
2183
|
type: "structure",
|
|
2130
|
-
hole_id:
|
|
2131
|
-
depth:
|
|
2132
|
-
structure_type:
|
|
2184
|
+
hole_id: l.hole_id,
|
|
2185
|
+
depth: l.depth ?? l.mid,
|
|
2186
|
+
structure_type: l.structure_type,
|
|
2133
2187
|
dip: f,
|
|
2134
|
-
azimuth:
|
|
2135
|
-
comments:
|
|
2136
|
-
},
|
|
2188
|
+
azimuth: b,
|
|
2189
|
+
comments: l.comments
|
|
2190
|
+
}, c.add(y);
|
|
2137
2191
|
}
|
|
2138
|
-
return
|
|
2192
|
+
return c;
|
|
2139
2193
|
}
|
|
2140
|
-
function
|
|
2141
|
-
var n, r, o,
|
|
2194
|
+
function qe(e) {
|
|
2195
|
+
var n, r, o, s, i, c, u, l, a;
|
|
2142
2196
|
if (!e) return "";
|
|
2143
2197
|
const t = (m) => Number.isFinite(m) ? m.toFixed(3) : "nan";
|
|
2144
2198
|
return [
|
|
2145
2199
|
t((n = e.camera) == null ? void 0 : n.x),
|
|
2146
2200
|
t((r = e.camera) == null ? void 0 : r.y),
|
|
2147
2201
|
t((o = e.camera) == null ? void 0 : o.z),
|
|
2148
|
-
t((
|
|
2149
|
-
t((
|
|
2150
|
-
t((
|
|
2202
|
+
t((s = e.target) == null ? void 0 : s.x),
|
|
2203
|
+
t((i = e.target) == null ? void 0 : i.y),
|
|
2204
|
+
t((c = e.target) == null ? void 0 : c.z),
|
|
2151
2205
|
t((u = e.up) == null ? void 0 : u.x),
|
|
2152
|
-
t((
|
|
2153
|
-
t((
|
|
2206
|
+
t((l = e.up) == null ? void 0 : l.y),
|
|
2207
|
+
t((a = e.up) == null ? void 0 : a.z)
|
|
2154
2208
|
].join("|");
|
|
2155
2209
|
}
|
|
2156
|
-
function
|
|
2210
|
+
function Et(e) {
|
|
2157
2211
|
return !e.camera || !e.controls ? null : {
|
|
2158
2212
|
camera: {
|
|
2159
2213
|
x: e.camera.position.x,
|
|
@@ -2172,55 +2226,55 @@ function Mt(e) {
|
|
|
2172
2226
|
}
|
|
2173
2227
|
};
|
|
2174
2228
|
}
|
|
2175
|
-
function
|
|
2229
|
+
function Bn(e, t) {
|
|
2176
2230
|
if (!e.camera || !e.controls || !t) return !1;
|
|
2177
2231
|
const n = t.camera || {}, r = t.target || {}, o = t.up || {};
|
|
2178
|
-
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 =
|
|
2232
|
+
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 = qe(t), !0) : !1;
|
|
2179
2233
|
}
|
|
2180
|
-
function
|
|
2234
|
+
function Gn(e) {
|
|
2181
2235
|
if (!e.viewChangeHandler) return;
|
|
2182
2236
|
const t = Date.now();
|
|
2183
2237
|
if (t - e._lastViewEmitMs < 250) return;
|
|
2184
|
-
const n =
|
|
2238
|
+
const n = Et(e);
|
|
2185
2239
|
if (!n) return;
|
|
2186
|
-
const r =
|
|
2240
|
+
const r = qe(n);
|
|
2187
2241
|
r !== e._lastViewSignature && (e._lastViewSignature = r, e._lastViewEmitMs = t, e.viewChangeHandler(n));
|
|
2188
2242
|
}
|
|
2189
|
-
function
|
|
2190
|
-
const
|
|
2191
|
-
e.controls.target.set(
|
|
2243
|
+
function Fe(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: s, maxZ: i }) {
|
|
2244
|
+
const c = (t + n) / 2, u = (r + o) / 2, l = (s + i) / 2, a = n - t, m = o - r, d = i - s, b = Math.max(a, m, d, 1) * 2;
|
|
2245
|
+
e.controls.target.set(c, u, l), e.camera.position.set(c + b, u + b, l + b), e.camera.lookAt(c, u, l), e.controls.update();
|
|
2192
2246
|
}
|
|
2193
|
-
function
|
|
2247
|
+
function Un(e, t = 1e3) {
|
|
2194
2248
|
!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());
|
|
2195
2249
|
}
|
|
2196
|
-
function
|
|
2250
|
+
function Yn(e, t = 2e3) {
|
|
2197
2251
|
!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());
|
|
2198
2252
|
}
|
|
2199
|
-
function
|
|
2253
|
+
function qn(e, t = 0, n = 0) {
|
|
2200
2254
|
e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
|
|
2201
2255
|
}
|
|
2202
|
-
function
|
|
2256
|
+
function Xn(e, t = 1.1) {
|
|
2203
2257
|
!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());
|
|
2204
2258
|
}
|
|
2205
|
-
function
|
|
2259
|
+
function Zn(e, t = 1.2) {
|
|
2206
2260
|
if (!e.lastBounds) return;
|
|
2207
2261
|
const {
|
|
2208
2262
|
minX: n,
|
|
2209
2263
|
maxX: r,
|
|
2210
2264
|
minY: o,
|
|
2211
|
-
maxY:
|
|
2212
|
-
minZ:
|
|
2213
|
-
maxZ:
|
|
2214
|
-
} = e.lastBounds, u = (r - n) * t,
|
|
2265
|
+
maxY: s,
|
|
2266
|
+
minZ: i,
|
|
2267
|
+
maxZ: c
|
|
2268
|
+
} = e.lastBounds, u = (r - n) * t, l = (s - o) * t, a = (c - i) * t, m = (n + r) / 2, d = (o + s) / 2, f = (i + c) / 2, p = Math.max(u, l, a, 1) * 2;
|
|
2215
2269
|
e.controls.target.set(m, d, f), e.camera.position.set(m + p, d + p, f + p), e.camera.lookAt(m, d, f), e.controls.update();
|
|
2216
2270
|
}
|
|
2217
|
-
const
|
|
2218
|
-
function
|
|
2271
|
+
const Wn = 1, Kn = 120;
|
|
2272
|
+
function Jn(e, t) {
|
|
2219
2273
|
if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
|
|
2220
|
-
const n = Math.min(
|
|
2221
|
-
return e.camera.position.copy(r).addScaledVector(
|
|
2274
|
+
const n = Math.min(Kn, Math.max(Wn, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), s = e.camera.fov * Math.PI / 180, i = 2 * o * Math.tan(s / 2), c = n * Math.PI / 180, u = i / (2 * Math.tan(c / 2)), l = e.camera.position.clone().sub(r).normalize();
|
|
2275
|
+
return e.camera.position.copy(r).addScaledVector(l, u), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
|
|
2222
2276
|
}
|
|
2223
|
-
function
|
|
2277
|
+
function Qn(e, t = "orbit") {
|
|
2224
2278
|
if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
|
|
2225
2279
|
e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
|
|
2226
2280
|
else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
|
|
@@ -2229,76 +2283,76 @@ function wn(e, t = "orbit") {
|
|
|
2229
2283
|
e.controls.target.copy(n), e.controls.update();
|
|
2230
2284
|
}
|
|
2231
2285
|
}
|
|
2232
|
-
const
|
|
2233
|
-
function
|
|
2286
|
+
const me = "#9ca3af";
|
|
2287
|
+
function it(e, t) {
|
|
2234
2288
|
const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
|
|
2235
2289
|
if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
|
|
2236
|
-
const o = Math.min(n, r),
|
|
2237
|
-
return
|
|
2290
|
+
const o = Math.min(n, r), s = Math.max(n, r);
|
|
2291
|
+
return s <= o ? null : { segStart: o, segEnd: s };
|
|
2238
2292
|
}
|
|
2239
|
-
function
|
|
2293
|
+
function er(e, t, n) {
|
|
2240
2294
|
let r = 0, o = 0;
|
|
2241
|
-
for (let
|
|
2242
|
-
const
|
|
2243
|
-
if (!Number.isFinite(u) || !Number.isFinite(
|
|
2244
|
-
const m = Math.max(t, u), f = Math.min(n,
|
|
2245
|
-
f <= 0 || (r +=
|
|
2295
|
+
for (let i = 0; i < e.length; i += 1) {
|
|
2296
|
+
const c = e[i], u = Number(c == null ? void 0 : c.from), l = Number(c == null ? void 0 : c.to), a = Number(c == null ? void 0 : c.value);
|
|
2297
|
+
if (!Number.isFinite(u) || !Number.isFinite(l) || !Number.isFinite(a) || l <= u) continue;
|
|
2298
|
+
const m = Math.max(t, u), f = Math.min(n, l) - m;
|
|
2299
|
+
f <= 0 || (r += a * f, o += f);
|
|
2246
2300
|
}
|
|
2247
2301
|
if (o <= 0) return null;
|
|
2248
|
-
const
|
|
2249
|
-
return Number.isFinite(
|
|
2302
|
+
const s = r / o;
|
|
2303
|
+
return Number.isFinite(s) ? s : null;
|
|
2250
2304
|
}
|
|
2251
|
-
function
|
|
2252
|
-
if (!Number.isFinite(e)) return new
|
|
2253
|
-
if (
|
|
2254
|
-
const r =
|
|
2255
|
-
return new
|
|
2305
|
+
function tr(e, t) {
|
|
2306
|
+
if (!Number.isFinite(e)) return new N.Color(me);
|
|
2307
|
+
if (It(e, t) < 0) return new N.Color(me);
|
|
2308
|
+
const r = On(e, t, me);
|
|
2309
|
+
return new N.Color(r);
|
|
2256
2310
|
}
|
|
2257
|
-
function
|
|
2311
|
+
function nr(e = {}) {
|
|
2258
2312
|
return {
|
|
2259
2313
|
preserveView: !!e.preserveView,
|
|
2260
2314
|
assayIntervalsByHole: e.assayIntervalsByHole || null,
|
|
2261
2315
|
selectedAssayVariable: e.selectedAssayVariable || ""
|
|
2262
2316
|
};
|
|
2263
2317
|
}
|
|
2264
|
-
function
|
|
2318
|
+
function rr(e, t) {
|
|
2265
2319
|
if (!e || !t) return [];
|
|
2266
2320
|
const n = [];
|
|
2267
2321
|
return Object.values(e).forEach((r) => {
|
|
2268
2322
|
(r || []).forEach((o) => {
|
|
2269
|
-
const
|
|
2270
|
-
Number.isFinite(
|
|
2323
|
+
const s = Number(o == null ? void 0 : o.value);
|
|
2324
|
+
Number.isFinite(s) && n.push(s);
|
|
2271
2325
|
});
|
|
2272
2326
|
}), n;
|
|
2273
2327
|
}
|
|
2274
|
-
function
|
|
2328
|
+
function Oe(e) {
|
|
2275
2329
|
return {
|
|
2276
2330
|
holeId: e.id,
|
|
2277
2331
|
project: e.project
|
|
2278
2332
|
};
|
|
2279
2333
|
}
|
|
2280
|
-
class
|
|
2334
|
+
class ro {
|
|
2281
2335
|
constructor() {
|
|
2282
|
-
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
|
|
2336
|
+
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 N.Clock(), this.handleCanvasClick = null, this.raycaster = new N.Raycaster(), this.pointer = new N.Vector2(), this.drillholeClickHandler = null, this.blockClickHandler = null, this.controlMode = "orbit", this._tmpDir = new N.Vector3(), this.viewChangeHandler = null, this._lastViewSignature = "", this._lastViewEmitMs = 0;
|
|
2283
2337
|
}
|
|
2284
2338
|
init(t) {
|
|
2285
2339
|
if (!t) return;
|
|
2286
2340
|
this.container = t;
|
|
2287
2341
|
const n = t.clientWidth, r = t.clientHeight;
|
|
2288
|
-
this.scene = new
|
|
2289
|
-
const o = new
|
|
2342
|
+
this.scene = new N.Scene(), this.scene.background = new N.Color(16777215), this.camera = new N.PerspectiveCamera(28, n / r, 1e-3, 1e5), this.camera.up.set(0, 0, 1), this.camera.position.set(50, 50, 50), this.camera.lookAt(0, 0, 0), this.renderer = new N.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(n, r), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.autoClear = !1, t.appendChild(this.renderer.domElement);
|
|
2343
|
+
const o = new N.AmbientLight(16777215, 0.5);
|
|
2290
2344
|
this.scene.add(o);
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2293
|
-
const
|
|
2294
|
-
this.scene.add(
|
|
2295
|
-
LEFT:
|
|
2296
|
-
MIDDLE:
|
|
2297
|
-
RIGHT:
|
|
2345
|
+
const s = new N.DirectionalLight(16777215, 0.6);
|
|
2346
|
+
s.position.set(10, 10, 5), this.scene.add(s);
|
|
2347
|
+
const i = new N.AxesHelper(20);
|
|
2348
|
+
this.scene.add(i), this.controls = new Ot(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 = {
|
|
2349
|
+
LEFT: N.MOUSE.PAN,
|
|
2350
|
+
MIDDLE: N.MOUSE.DOLLY,
|
|
2351
|
+
RIGHT: N.MOUSE.ROTATE
|
|
2298
2352
|
}, this.controls.touches = {
|
|
2299
|
-
ONE:
|
|
2300
|
-
TWO:
|
|
2301
|
-
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new
|
|
2353
|
+
ONE: N.TOUCH.ROTATE,
|
|
2354
|
+
TWO: N.TOUCH.PAN
|
|
2355
|
+
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new Vt(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 wt(this.camera, this.renderer, {
|
|
2302
2356
|
container: this.container,
|
|
2303
2357
|
placement: "top-right",
|
|
2304
2358
|
size: 110,
|
|
@@ -2306,52 +2360,62 @@ class $r {
|
|
|
2306
2360
|
animated: !0,
|
|
2307
2361
|
speed: 1.5
|
|
2308
2362
|
}), this.gizmo.attachControls(this.controls), this._attachCanvasClickHandler();
|
|
2309
|
-
const
|
|
2310
|
-
var
|
|
2311
|
-
this.frameId = requestAnimationFrame(
|
|
2363
|
+
const c = () => {
|
|
2364
|
+
var l;
|
|
2365
|
+
this.frameId = requestAnimationFrame(c);
|
|
2312
2366
|
const u = this.clock.getDelta();
|
|
2313
|
-
this.renderer.clear(), this.controlMode === "fly" && ((
|
|
2367
|
+
this.renderer.clear(), this.controlMode === "fly" && ((l = this.flyControls) != null && l.enabled) ? this.flyControls.update(u) : this.controls && this.controls.update(), this._emitViewChangeIfNeeded(), this.renderer.render(this.scene, this.camera), this.gizmo && this.gizmo.render();
|
|
2314
2368
|
};
|
|
2315
|
-
|
|
2369
|
+
c();
|
|
2316
2370
|
}
|
|
2317
2371
|
setViewChangeHandler(t) {
|
|
2318
2372
|
this.viewChangeHandler = typeof t == "function" ? t : null;
|
|
2319
2373
|
}
|
|
2320
2374
|
getViewState() {
|
|
2321
|
-
return
|
|
2375
|
+
return Et(this);
|
|
2322
2376
|
}
|
|
2323
2377
|
setViewState(t) {
|
|
2324
|
-
return
|
|
2378
|
+
return Bn(this, t);
|
|
2325
2379
|
}
|
|
2326
2380
|
_buildViewSignature(t) {
|
|
2327
|
-
return
|
|
2381
|
+
return qe(t);
|
|
2328
2382
|
}
|
|
2329
2383
|
_emitViewChangeIfNeeded() {
|
|
2330
|
-
|
|
2384
|
+
Gn(this);
|
|
2331
2385
|
}
|
|
2332
2386
|
_attachCanvasClickHandler() {
|
|
2333
2387
|
const t = this.renderer;
|
|
2334
2388
|
t && (this.handleCanvasClick = (n) => {
|
|
2335
|
-
var f,
|
|
2389
|
+
var f, b, p, h, _, y, I;
|
|
2336
2390
|
if (n.button !== 0) return;
|
|
2337
2391
|
if ((f = this.gizmo) != null && f.domElement) {
|
|
2338
|
-
const
|
|
2339
|
-
if (n.clientX >=
|
|
2392
|
+
const z = this.gizmo.domElement.getBoundingClientRect();
|
|
2393
|
+
if (n.clientX >= z.left && n.clientX <= z.right && n.clientY >= z.top && n.clientY <= z.bottom)
|
|
2394
|
+
return;
|
|
2395
|
+
}
|
|
2396
|
+
const r = t.domElement.getBoundingClientRect(), o = n.clientX - r.left, s = n.clientY - r.top;
|
|
2397
|
+
if (this.pointer.x = o / r.width * 2 - 1, this.pointer.y = -(s / r.height * 2) + 1, this.raycaster.setFromCamera(this.pointer, this.camera), this.blocks.length > 0) {
|
|
2398
|
+
const z = this.raycaster.intersectObjects(this.blocks, !1);
|
|
2399
|
+
if (z.length > 0) {
|
|
2400
|
+
const x = z[0], D = x.object;
|
|
2401
|
+
if ((b = D == null ? void 0 : D.userData) != null && b._isMergedBlocks && this.blockClickHandler) {
|
|
2402
|
+
const S = Math.floor(x.faceIndex / 2), M = D.userData._quadToBlock[S];
|
|
2403
|
+
M && this.blockClickHandler(M);
|
|
2404
|
+
}
|
|
2340
2405
|
return;
|
|
2406
|
+
}
|
|
2341
2407
|
}
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
const _ = l[0].object;
|
|
2347
|
-
this.drillholeClickHandler && this.drillholeClickHandler({ type: "structure", ..._.userData });
|
|
2408
|
+
const i = this.raycaster.intersectObjects(this.drillMeshes, !0), c = this.raycaster.intersectObjects(this.structuralMeshes, !0), u = ((p = i[0]) == null ? void 0 : p.distance) ?? 1 / 0;
|
|
2409
|
+
if ((((h = c[0]) == null ? void 0 : h.distance) ?? 1 / 0) < u && c.length > 0) {
|
|
2410
|
+
const z = c[0].object;
|
|
2411
|
+
this.drillholeClickHandler && this.drillholeClickHandler({ type: "structure", ...z.userData });
|
|
2348
2412
|
return;
|
|
2349
2413
|
}
|
|
2350
|
-
if (
|
|
2351
|
-
let
|
|
2352
|
-
for (;
|
|
2353
|
-
|
|
2354
|
-
const m = (
|
|
2414
|
+
if (i.length === 0) return;
|
|
2415
|
+
let a = i[0].object;
|
|
2416
|
+
for (; a && a.parent && !((_ = a.userData) != null && _.holeId); )
|
|
2417
|
+
a = a.parent;
|
|
2418
|
+
const m = (y = a == null ? void 0 : a.userData) == null ? void 0 : y.holeId, d = (I = a == null ? void 0 : a.userData) == null ? void 0 : I.project;
|
|
2355
2419
|
m && this.drillholeClickHandler && this.drillholeClickHandler({ holeId: m, project: d });
|
|
2356
2420
|
}, t.domElement.addEventListener("click", this.handleCanvasClick));
|
|
2357
2421
|
}
|
|
@@ -2360,93 +2424,153 @@ class $r {
|
|
|
2360
2424
|
const t = this.container.clientWidth, n = this.container.clientHeight;
|
|
2361
2425
|
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update();
|
|
2362
2426
|
}
|
|
2363
|
-
|
|
2427
|
+
/**
|
|
2428
|
+
* Render block model data as a single merged mesh of exterior faces only.
|
|
2429
|
+
*
|
|
2430
|
+
* Adjacent blocks' shared faces are skipped so there are no coincident
|
|
2431
|
+
* polygons and therefore no z-fighting. Vertex colours are used so the
|
|
2432
|
+
* entire model is a single draw call.
|
|
2433
|
+
*
|
|
2434
|
+
* Accepts rows with canonical column names ``x``, ``y``, ``z``, ``dx``,
|
|
2435
|
+
* ``dy``, ``dz`` (produced by :func:`parseBlockModelCSV`).
|
|
2436
|
+
*
|
|
2437
|
+
* @param {Array<Object>} data - Block rows (canonical column names)
|
|
2438
|
+
* @param {string} selectedProperty - Attribute column used for colouring
|
|
2439
|
+
* @param {Object} stats - Property statistics (from :func:`calculatePropertyStats`)
|
|
2440
|
+
* @param {Object} [options]
|
|
2441
|
+
* @param {Object} [options.offset] - Optional ``{x, y, z}`` translation applied
|
|
2442
|
+
* to all block centres before rendering. When omitted the scene defaults to
|
|
2443
|
+
* auto-centering by shifting the extent centre to the origin.
|
|
2444
|
+
* @param {number} [options.opacity=1.0] - Initial material opacity (0–1)
|
|
2445
|
+
* @param {boolean} [options.autoCenter=true] - If true and no offset is
|
|
2446
|
+
* supplied, translate block centres so the extent centre sits at the origin.
|
|
2447
|
+
*/
|
|
2448
|
+
setBlocks(t, n, r, o = {}) {
|
|
2364
2449
|
if (!this.scene || (this._clearBlocks(), !t || !n || !r)) return;
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2450
|
+
const { autoCenter: s = !0, opacity: i = 1 } = o;
|
|
2451
|
+
let c = 1 / 0, u = -1 / 0, l = 1 / 0, a = -1 / 0, m = 1 / 0, d = -1 / 0;
|
|
2452
|
+
t.forEach((g) => {
|
|
2453
|
+
const C = Number(g.x ?? g.center_x ?? 0), F = Number(g.y ?? g.center_y ?? 0), V = Number(g.z ?? g.center_z ?? 0), k = Number(g.dx ?? g.size_x ?? 1), H = Number(g.dy ?? g.size_y ?? 1), U = Number(g.dz ?? g.size_z ?? 1);
|
|
2454
|
+
c = Math.min(c, C - k / 2), u = Math.max(u, C + k / 2), l = Math.min(l, F - H / 2), a = Math.max(a, F + H / 2), m = Math.min(m, V - U / 2), d = Math.max(d, V + U / 2);
|
|
2455
|
+
});
|
|
2456
|
+
let f = 0, b = 0, p = 0;
|
|
2457
|
+
o.offset ? (f = Number(o.offset.x ?? 0), b = Number(o.offset.y ?? 0), p = Number(o.offset.z ?? 0)) : s && (f = -((c + u) / 2), b = -((l + a) / 2), p = -((m + d) / 2));
|
|
2458
|
+
const h = c + f, _ = u + f, y = l + b, I = a + b, z = m + p, x = d + p, D = (g, C, F) => `${Math.round(g)},${Math.round(C)},${Math.round(F)}`, S = new Set(
|
|
2459
|
+
t.map((g) => D(Number(g.x ?? 0), Number(g.y ?? 0), Number(g.z ?? 0)))
|
|
2460
|
+
), M = [
|
|
2461
|
+
{ normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
|
|
2462
|
+
{ normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
|
|
2463
|
+
{ normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
|
|
2464
|
+
{ normal: [0, -1, 0], neibDir: [0, -1, 0], verts: [[1, -1, 1], [-1, -1, 1], [-1, -1, -1], [1, -1, -1]] },
|
|
2465
|
+
{ normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
|
|
2466
|
+
{ normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
|
|
2467
|
+
], O = [], $ = [], Z = [], T = [], R = [];
|
|
2468
|
+
let q = 0;
|
|
2469
|
+
if (t.forEach((g) => {
|
|
2470
|
+
const C = Number(g.x ?? g.center_x ?? 0), F = Number(g.y ?? g.center_y ?? 0), V = Number(g.z ?? g.center_z ?? 0), k = Number(g.dx ?? g.size_x ?? 1), H = Number(g.dy ?? g.size_y ?? 1), U = Number(g.dz ?? g.size_z ?? 1), re = C + f, de = F + b, ie = V + p, Ne = mn(g[n], r, N), { r: le, g: Pe, b: Dt } = Ne;
|
|
2471
|
+
M.forEach((fe) => {
|
|
2472
|
+
const St = C + fe.neibDir[0] * k, Pt = F + fe.neibDir[1] * H, kt = V + fe.neibDir[2] * U;
|
|
2473
|
+
if (S.has(D(St, Pt, kt))) return;
|
|
2474
|
+
const be = q;
|
|
2475
|
+
fe.verts.forEach(([Lt, Tt, Ft]) => {
|
|
2476
|
+
O.push(re + Lt * k / 2, de + Tt * H / 2, ie + Ft * U / 2), $.push(fe.normal[0], fe.normal[1], fe.normal[2]), Z.push(le, Pe, Dt), q++;
|
|
2477
|
+
}), T.push(be, be + 1, be + 2, be, be + 2, be + 3), R.push(g);
|
|
2478
|
+
});
|
|
2479
|
+
}), O.length === 0) return;
|
|
2480
|
+
const A = new N.BufferGeometry();
|
|
2481
|
+
A.setAttribute("position", new N.Float32BufferAttribute(O, 3)), A.setAttribute("normal", new N.Float32BufferAttribute($, 3)), A.setAttribute("color", new N.Float32BufferAttribute(Z, 3)), A.setIndex(T);
|
|
2482
|
+
const v = new N.MeshLambertMaterial({
|
|
2483
|
+
vertexColors: !0,
|
|
2484
|
+
transparent: i < 1,
|
|
2485
|
+
opacity: i,
|
|
2486
|
+
side: N.DoubleSide
|
|
2487
|
+
// safe — all interior faces are already removed
|
|
2488
|
+
}), P = new N.Mesh(A, v);
|
|
2489
|
+
P.userData._isMergedBlocks = !0, P.userData._quadToBlock = R, this.scene.add(P), this.blocks.push(P), this.camera && this.controls && (this.lastBounds = { minX: h, maxX: _, minY: y, maxY: I, minZ: z, maxZ: x }, Fe(this, { minX: h, maxX: _, minY: y, maxY: I, minZ: z, maxZ: x }));
|
|
2490
|
+
}
|
|
2491
|
+
/**
|
|
2492
|
+
* Update the opacity of all currently rendered blocks.
|
|
2493
|
+
* @param {number} opacity - New opacity value between 0 (transparent) and 1 (opaque)
|
|
2494
|
+
*/
|
|
2495
|
+
setBlockOpacity(t) {
|
|
2496
|
+
const n = Math.max(0, Math.min(1, Number(t)));
|
|
2497
|
+
this.blocks.forEach((r) => {
|
|
2498
|
+
r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
/**
|
|
2502
|
+
* Register a click handler for block selection.
|
|
2503
|
+
* The handler is called with the full block row data when a block is clicked.
|
|
2504
|
+
* @param {Function|null} handler - Callback ``(blockData) => void``, or null to clear
|
|
2505
|
+
*/
|
|
2506
|
+
setBlockClickHandler(t) {
|
|
2507
|
+
this.blockClickHandler = typeof t == "function" ? t : null;
|
|
2384
2508
|
}
|
|
2385
2509
|
setDrillholes(t, n = {}) {
|
|
2386
2510
|
if (!this.scene || (this._clearDrillholes(), !t || t.length === 0)) return;
|
|
2387
|
-
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable:
|
|
2388
|
-
let u = 1 / 0,
|
|
2389
|
-
const
|
|
2390
|
-
t.forEach((h,
|
|
2391
|
-
const
|
|
2392
|
-
u = Math.min(u, M.x),
|
|
2393
|
-
const
|
|
2394
|
-
return
|
|
2511
|
+
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: s } = nr(n), i = rr(o, s), c = Tn(i);
|
|
2512
|
+
let u = 1 / 0, l = -1 / 0, a = 1 / 0, m = -1 / 0, d = 1 / 0, f = -1 / 0;
|
|
2513
|
+
const b = new N.Vector3(), p = new N.Vector3(0, 1, 0);
|
|
2514
|
+
t.forEach((h, _) => {
|
|
2515
|
+
const I = _ * 137.5 % 360 / 360, z = new N.Color().setHSL(I, 0.75, 0.55), x = (h.points || []).map((M) => {
|
|
2516
|
+
u = Math.min(u, M.x), l = Math.max(l, M.x), a = Math.min(a, M.y), m = Math.max(m, M.y), d = Math.min(d, M.z), f = Math.max(f, M.z);
|
|
2517
|
+
const O = new N.Vector3(M.x, M.y, M.z);
|
|
2518
|
+
return O.md = M.md, O;
|
|
2395
2519
|
});
|
|
2396
|
-
if (
|
|
2397
|
-
if (
|
|
2398
|
-
const M = new
|
|
2399
|
-
color:
|
|
2400
|
-
emissive:
|
|
2520
|
+
if (x.length < 2) {
|
|
2521
|
+
if (x.length === 1) {
|
|
2522
|
+
const M = new N.SphereGeometry(5, 12, 12), O = new N.MeshLambertMaterial({
|
|
2523
|
+
color: z,
|
|
2524
|
+
emissive: z,
|
|
2401
2525
|
emissiveIntensity: 0.2
|
|
2402
|
-
}),
|
|
2403
|
-
|
|
2526
|
+
}), $ = new N.Mesh(M, O);
|
|
2527
|
+
$.position.copy(x[0]), $.userData = Oe(h), this.scene.add($), this.drillLines.push($), this.drillMeshes.push($);
|
|
2404
2528
|
}
|
|
2405
2529
|
return;
|
|
2406
2530
|
}
|
|
2407
|
-
const
|
|
2408
|
-
|
|
2409
|
-
const
|
|
2410
|
-
for (let M = 0; M <
|
|
2411
|
-
const
|
|
2412
|
-
if (
|
|
2413
|
-
const
|
|
2414
|
-
selectedAssayVariable:
|
|
2415
|
-
assayIntervals:
|
|
2416
|
-
assayScale:
|
|
2531
|
+
const D = new N.Group();
|
|
2532
|
+
D.userData = Oe(h);
|
|
2533
|
+
const S = s ? this._resolveAssayIntervalsForHole(h, o) : [];
|
|
2534
|
+
for (let M = 0; M < x.length - 1; M += 1) {
|
|
2535
|
+
const O = x[M], $ = x[M + 1], Z = b.subVectors($, O), T = Z.length();
|
|
2536
|
+
if (T <= 1e-3) continue;
|
|
2537
|
+
const R = 2.2, q = new N.CylinderGeometry(R, R, T, 6, 1, !0), A = this._getSegmentColor({
|
|
2538
|
+
selectedAssayVariable: s,
|
|
2539
|
+
assayIntervals: S,
|
|
2540
|
+
assayScale: c,
|
|
2417
2541
|
holeId: h.id,
|
|
2418
2542
|
segmentIndex: M,
|
|
2419
|
-
p1:
|
|
2420
|
-
p2:
|
|
2421
|
-
}),
|
|
2422
|
-
color:
|
|
2543
|
+
p1: O,
|
|
2544
|
+
p2: $
|
|
2545
|
+
}), v = new N.MeshLambertMaterial({
|
|
2546
|
+
color: A,
|
|
2423
2547
|
flatShading: !0,
|
|
2424
|
-
emissive:
|
|
2548
|
+
emissive: A,
|
|
2425
2549
|
emissiveIntensity: 0.15
|
|
2426
|
-
}),
|
|
2427
|
-
|
|
2550
|
+
}), P = new N.Mesh(q, v);
|
|
2551
|
+
P.position.copy(O.clone().addScaledVector(Z, 0.5)), P.quaternion.setFromUnitVectors(p, Z.clone().normalize()), P.userData = Oe(h), D.add(P), this.drillMeshes.push(P);
|
|
2428
2552
|
}
|
|
2429
|
-
this.scene.add(
|
|
2430
|
-
}), this.camera && this.controls && (this.lastBounds = { minX: u, maxX:
|
|
2553
|
+
this.scene.add(D), this.drillLines.push(D);
|
|
2554
|
+
}), this.camera && this.controls && (this.lastBounds = { minX: u, maxX: l, minY: a, maxY: m, minZ: d, maxZ: f }, r || Fe(this, { minX: u, maxX: l, minY: a, maxY: m, minZ: d, maxZ: f }));
|
|
2431
2555
|
}
|
|
2432
|
-
_getSegmentColor({ selectedAssayVariable: t, assayIntervals: n, assayScale: r, holeId: o, segmentIndex:
|
|
2556
|
+
_getSegmentColor({ selectedAssayVariable: t, assayIntervals: n, assayScale: r, holeId: o, segmentIndex: s, p1: i, p2: c }) {
|
|
2433
2557
|
if (!t)
|
|
2434
|
-
return
|
|
2558
|
+
return sr(o, s);
|
|
2435
2559
|
if (t === "__HAS_ASSAY__") {
|
|
2436
|
-
if (!(n != null && n.length)) return new
|
|
2437
|
-
const
|
|
2438
|
-
return
|
|
2439
|
-
const f = Number(d == null ? void 0 : d.from),
|
|
2440
|
-
if (!Number.isFinite(f) || !Number.isFinite(
|
|
2441
|
-
const p = Math.max(
|
|
2442
|
-
return Math.min(
|
|
2443
|
-
}) ? new
|
|
2560
|
+
if (!(n != null && n.length)) return new N.Color(me);
|
|
2561
|
+
const a = it(i, c);
|
|
2562
|
+
return a ? n.some((d) => {
|
|
2563
|
+
const f = Number(d == null ? void 0 : d.from), b = Number(d == null ? void 0 : d.to);
|
|
2564
|
+
if (!Number.isFinite(f) || !Number.isFinite(b)) return !1;
|
|
2565
|
+
const p = Math.max(a.segStart, f);
|
|
2566
|
+
return Math.min(a.segEnd, b) > p;
|
|
2567
|
+
}) ? new N.Color("#ff8c42") : new N.Color(me) : new N.Color(me);
|
|
2444
2568
|
}
|
|
2445
|
-
if (!(n != null && n.length)) return new
|
|
2446
|
-
const u =
|
|
2447
|
-
if (!u) return new
|
|
2448
|
-
const
|
|
2449
|
-
return
|
|
2569
|
+
if (!(n != null && n.length)) return new N.Color(me);
|
|
2570
|
+
const u = it(i, c);
|
|
2571
|
+
if (!u) return new N.Color(me);
|
|
2572
|
+
const l = er(n, u.segStart, u.segEnd);
|
|
2573
|
+
return tr(l, r);
|
|
2450
2574
|
}
|
|
2451
2575
|
_resolveAssayIntervalsForHole(t, n) {
|
|
2452
2576
|
if (!n || !t) return [];
|
|
@@ -2454,30 +2578,30 @@ class $r {
|
|
|
2454
2578
|
if (!r) return [];
|
|
2455
2579
|
const o = n[r];
|
|
2456
2580
|
if (Array.isArray(o) && o.length) return o;
|
|
2457
|
-
const
|
|
2458
|
-
if (
|
|
2459
|
-
const
|
|
2460
|
-
if (Array.isArray(
|
|
2581
|
+
const s = or(r);
|
|
2582
|
+
if (s) {
|
|
2583
|
+
const i = n[s];
|
|
2584
|
+
if (Array.isArray(i) && i.length) return i;
|
|
2461
2585
|
}
|
|
2462
2586
|
return [];
|
|
2463
2587
|
}
|
|
2464
|
-
_fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ:
|
|
2465
|
-
|
|
2588
|
+
_fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: s, maxZ: i }) {
|
|
2589
|
+
Fe(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: s, maxZ: i });
|
|
2466
2590
|
}
|
|
2467
2591
|
recenterCameraToOrigin(t = 1e3) {
|
|
2468
|
-
|
|
2592
|
+
Un(this, t);
|
|
2469
2593
|
}
|
|
2470
2594
|
lookDown(t = 2e3) {
|
|
2471
|
-
|
|
2595
|
+
Yn(this, t);
|
|
2472
2596
|
}
|
|
2473
2597
|
pan(t = 0, n = 0) {
|
|
2474
|
-
|
|
2598
|
+
qn(this, t, n);
|
|
2475
2599
|
}
|
|
2476
2600
|
dolly(t = 1.1) {
|
|
2477
|
-
|
|
2601
|
+
Xn(this, t);
|
|
2478
2602
|
}
|
|
2479
2603
|
focusOnLastBounds(t = 1.2) {
|
|
2480
|
-
|
|
2604
|
+
Zn(this, t);
|
|
2481
2605
|
}
|
|
2482
2606
|
_clearBlocks() {
|
|
2483
2607
|
this.blocks.forEach((t) => {
|
|
@@ -2487,15 +2611,15 @@ class $r {
|
|
|
2487
2611
|
setStructuralDiscs(t, n, r = {}) {
|
|
2488
2612
|
if (!this.scene || (this._clearStructuralDiscs(), !(t != null && t.length) || !(n != null && n.length))) return;
|
|
2489
2613
|
const { maxDiscs: o = 3e3 } = r;
|
|
2490
|
-
let
|
|
2491
|
-
if (
|
|
2492
|
-
const u =
|
|
2493
|
-
for (let
|
|
2494
|
-
|
|
2495
|
-
|
|
2614
|
+
let s = t;
|
|
2615
|
+
if (s.length > o) {
|
|
2616
|
+
const u = s.length / o, l = [];
|
|
2617
|
+
for (let a = 0; a < o; a++)
|
|
2618
|
+
l.push(s[Math.floor(a * u)]);
|
|
2619
|
+
s = l;
|
|
2496
2620
|
}
|
|
2497
|
-
const
|
|
2498
|
-
|
|
2621
|
+
const i = n.flatMap((u) => (u.points || []).map((l) => ({ ...l, hole_id: u.id }))), c = gn(s, i, r);
|
|
2622
|
+
c.length && (this.structuralGroup = jn(c, r), this.scene.add(this.structuralGroup), this.structuralGroup.traverse((u) => {
|
|
2499
2623
|
u.isMesh && this.structuralMeshes.push(u);
|
|
2500
2624
|
}));
|
|
2501
2625
|
}
|
|
@@ -2505,7 +2629,7 @@ class $r {
|
|
|
2505
2629
|
* @param {number} fovDeg - Desired FOV in degrees
|
|
2506
2630
|
*/
|
|
2507
2631
|
setCameraFov(t) {
|
|
2508
|
-
|
|
2632
|
+
Jn(this, t);
|
|
2509
2633
|
}
|
|
2510
2634
|
setStructuralDiscsVisible(t) {
|
|
2511
2635
|
this.structuralGroup && (this.structuralGroup.visible = !!t);
|
|
@@ -2529,24 +2653,24 @@ class $r {
|
|
|
2529
2653
|
this.drillholeClickHandler = t;
|
|
2530
2654
|
}
|
|
2531
2655
|
setControlMode(t = "orbit") {
|
|
2532
|
-
|
|
2656
|
+
Qn(this, t);
|
|
2533
2657
|
}
|
|
2534
2658
|
}
|
|
2535
|
-
function
|
|
2659
|
+
function or(e) {
|
|
2536
2660
|
return `${e ?? ""}`.trim().toLowerCase();
|
|
2537
2661
|
}
|
|
2538
|
-
function
|
|
2539
|
-
const n = `${e ?? ""}:${t ?? 0}`, r =
|
|
2540
|
-
return
|
|
2662
|
+
function sr(e, t) {
|
|
2663
|
+
const n = `${e ?? ""}:${t ?? 0}`, r = ir(n), o = (t ?? 0) % 14 / 14, s = (r * 0.15 + o * 0.85) % 1, i = new N.Color();
|
|
2664
|
+
return i.setHSL(s, 1, 0.5), i;
|
|
2541
2665
|
}
|
|
2542
|
-
function
|
|
2666
|
+
function ir(e) {
|
|
2543
2667
|
const t = `${e ?? ""}`;
|
|
2544
2668
|
let n = 2166136261;
|
|
2545
2669
|
for (let r = 0; r < t.length; r += 1)
|
|
2546
2670
|
n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
|
|
2547
2671
|
return (n >>> 0) / 4294967295;
|
|
2548
2672
|
}
|
|
2549
|
-
function
|
|
2673
|
+
function oo({
|
|
2550
2674
|
controlMode: e = "orbit",
|
|
2551
2675
|
onToggleFly: t = () => {
|
|
2552
2676
|
},
|
|
@@ -2557,134 +2681,225 @@ function Hr({
|
|
|
2557
2681
|
onFit: o = () => {
|
|
2558
2682
|
}
|
|
2559
2683
|
}) {
|
|
2560
|
-
return /* @__PURE__ */
|
|
2561
|
-
/* @__PURE__ */
|
|
2562
|
-
/* @__PURE__ */
|
|
2563
|
-
/* @__PURE__ */
|
|
2564
|
-
/* @__PURE__ */
|
|
2684
|
+
return /* @__PURE__ */ Q("div", { className: "baselode-3d-controls", children: [
|
|
2685
|
+
/* @__PURE__ */ L("button", { type: "button", className: "ghost-button", onClick: n, children: "Recenter to (0,0,0)" }),
|
|
2686
|
+
/* @__PURE__ */ L("button", { type: "button", className: "ghost-button", onClick: r, children: "Look down" }),
|
|
2687
|
+
/* @__PURE__ */ L("button", { type: "button", className: "ghost-button", onClick: o, children: "Fit to scene" }),
|
|
2688
|
+
/* @__PURE__ */ L("button", { type: "button", className: "ghost-button", onClick: t, children: e === "orbit" ? "Enable fly controls" : "Disable fly controls" })
|
|
2689
|
+
] });
|
|
2690
|
+
}
|
|
2691
|
+
function so({
|
|
2692
|
+
properties: e = [],
|
|
2693
|
+
selectedProperty: t = "",
|
|
2694
|
+
onPropertyChange: n = () => {
|
|
2695
|
+
},
|
|
2696
|
+
opacity: r = 0.85,
|
|
2697
|
+
onOpacityChange: o = () => {
|
|
2698
|
+
},
|
|
2699
|
+
propertyStats: s = null,
|
|
2700
|
+
clickedBlock: i = null,
|
|
2701
|
+
onPopupClose: c = () => {
|
|
2702
|
+
}
|
|
2703
|
+
}) {
|
|
2704
|
+
var u, l;
|
|
2705
|
+
return /* @__PURE__ */ Q("div", { className: "bm-widget", children: [
|
|
2706
|
+
/* @__PURE__ */ L("label", { className: "bm-widget__label", htmlFor: "bm-property-select", children: "Color by" }),
|
|
2707
|
+
/* @__PURE__ */ Q(
|
|
2708
|
+
"select",
|
|
2709
|
+
{
|
|
2710
|
+
id: "bm-property-select",
|
|
2711
|
+
className: "bm-widget__select",
|
|
2712
|
+
value: t,
|
|
2713
|
+
onChange: (a) => n(a.target.value),
|
|
2714
|
+
children: [
|
|
2715
|
+
e.length === 0 && /* @__PURE__ */ L("option", { value: "", children: "— no attributes —" }),
|
|
2716
|
+
e.map((a) => /* @__PURE__ */ L("option", { value: a, children: a }, a))
|
|
2717
|
+
]
|
|
2718
|
+
}
|
|
2719
|
+
),
|
|
2720
|
+
s && s.type === "numeric" && /* @__PURE__ */ Q("div", { className: "bm-widget__scale", children: [
|
|
2721
|
+
/* @__PURE__ */ L("span", { className: "bm-widget__scale-label bm-widget__scale-label--min", children: ((u = s.min) == null ? void 0 : u.toFixed(2)) ?? "—" }),
|
|
2722
|
+
/* @__PURE__ */ L("div", { className: "bm-widget__scale-bar" }),
|
|
2723
|
+
/* @__PURE__ */ L("span", { className: "bm-widget__scale-label bm-widget__scale-label--max", children: ((l = s.max) == null ? void 0 : l.toFixed(2)) ?? "—" })
|
|
2724
|
+
] }),
|
|
2725
|
+
s && s.type === "categorical" && /* @__PURE__ */ L("div", { className: "bm-widget__categories", children: (s.categories || []).map((a, m) => {
|
|
2726
|
+
const d = Math.round(m / Math.max(s.categories.length, 1) * 360);
|
|
2727
|
+
return /* @__PURE__ */ L(
|
|
2728
|
+
"span",
|
|
2729
|
+
{
|
|
2730
|
+
className: "bm-widget__category-chip",
|
|
2731
|
+
style: { background: `hsl(${d},70%,50%)` },
|
|
2732
|
+
children: a
|
|
2733
|
+
},
|
|
2734
|
+
a
|
|
2735
|
+
);
|
|
2736
|
+
}) }),
|
|
2737
|
+
/* @__PURE__ */ Q("label", { className: "bm-widget__label", htmlFor: "bm-opacity-slider", children: [
|
|
2738
|
+
"Opacity (",
|
|
2739
|
+
Math.round(r * 100),
|
|
2740
|
+
"%)"
|
|
2741
|
+
] }),
|
|
2742
|
+
/* @__PURE__ */ L(
|
|
2743
|
+
"input",
|
|
2744
|
+
{
|
|
2745
|
+
id: "bm-opacity-slider",
|
|
2746
|
+
type: "range",
|
|
2747
|
+
className: "bm-widget__slider",
|
|
2748
|
+
min: "0",
|
|
2749
|
+
max: "1",
|
|
2750
|
+
step: "0.01",
|
|
2751
|
+
value: r,
|
|
2752
|
+
onChange: (a) => o(parseFloat(a.target.value))
|
|
2753
|
+
}
|
|
2754
|
+
),
|
|
2755
|
+
i && /* @__PURE__ */ Q("div", { className: "bm-widget__popup", children: [
|
|
2756
|
+
/* @__PURE__ */ Q("div", { className: "bm-widget__popup-header", children: [
|
|
2757
|
+
/* @__PURE__ */ L("span", { children: "Block attributes" }),
|
|
2758
|
+
/* @__PURE__ */ L(
|
|
2759
|
+
"button",
|
|
2760
|
+
{
|
|
2761
|
+
type: "button",
|
|
2762
|
+
className: "bm-widget__popup-close",
|
|
2763
|
+
onClick: c,
|
|
2764
|
+
"aria-label": "Close",
|
|
2765
|
+
children: "×"
|
|
2766
|
+
}
|
|
2767
|
+
)
|
|
2768
|
+
] }),
|
|
2769
|
+
/* @__PURE__ */ L("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ L("tbody", { children: Object.entries(i).map(([a, m]) => /* @__PURE__ */ Q("tr", { children: [
|
|
2770
|
+
/* @__PURE__ */ L("th", { children: a }),
|
|
2771
|
+
/* @__PURE__ */ L("td", { children: m == null ? "—" : String(m) })
|
|
2772
|
+
] }, a)) }) })
|
|
2773
|
+
] })
|
|
2565
2774
|
] });
|
|
2566
2775
|
}
|
|
2567
2776
|
export {
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
te as
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
Vn as
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2777
|
+
Ln as ASSAY_COLOR_PALETTE_10,
|
|
2778
|
+
Ht as ASSAY_NON_VALUE_FIELDS,
|
|
2779
|
+
j as AZIMUTH,
|
|
2780
|
+
br as BASELODE_DATA_MODEL_DRILL_ASSAY,
|
|
2781
|
+
hr as BASELODE_DATA_MODEL_DRILL_COLLAR,
|
|
2782
|
+
pr as BASELODE_DATA_MODEL_DRILL_SURVEY,
|
|
2783
|
+
yr as BASELODE_DATA_MODEL_STRUCTURAL_POINT,
|
|
2784
|
+
oo as Baselode3DControls,
|
|
2785
|
+
ro as Baselode3DScene,
|
|
2786
|
+
so as BlockModelWidget,
|
|
2787
|
+
Xe as CHART_OPTIONS,
|
|
2788
|
+
Zt as COMMENT_COLUMN_NAMES,
|
|
2789
|
+
at as CRS,
|
|
2790
|
+
Rt as DEFAULT_COLUMN_MAP,
|
|
2791
|
+
Y as DEPTH,
|
|
2792
|
+
B as DIP,
|
|
2793
|
+
Me as DISPLAY_CATEGORICAL,
|
|
2794
|
+
_e as DISPLAY_COMMENT,
|
|
2795
|
+
ve as DISPLAY_HIDDEN,
|
|
2796
|
+
xe as DISPLAY_NUMERIC,
|
|
2797
|
+
we as DISPLAY_TADPOLE,
|
|
2798
|
+
ce as EASTING,
|
|
2799
|
+
ge as ELEVATION,
|
|
2800
|
+
xn as ERROR_COLOR,
|
|
2801
|
+
Kn as FOV_MAX_DEG,
|
|
2802
|
+
Wn as FOV_MIN_DEG,
|
|
2803
|
+
X as FROM,
|
|
2804
|
+
Ze as HIDDEN_COLUMNS,
|
|
2805
|
+
E as HOLE_ID,
|
|
2806
|
+
te as LATITUDE,
|
|
2807
|
+
ne as LONGITUDE,
|
|
2808
|
+
Re as MID,
|
|
2809
|
+
ue as NORTHING,
|
|
2810
|
+
Qe as NUMERIC_LINE_COLOR,
|
|
2811
|
+
_n as NUMERIC_MARKER_COLOR,
|
|
2812
|
+
se as PROJECT_ID,
|
|
2813
|
+
$t as STRIKE,
|
|
2814
|
+
G as TO,
|
|
2815
|
+
Wr as TracePlot,
|
|
2816
|
+
yn as alphaBetaToNormal,
|
|
2817
|
+
no as annotationsFromIntervals,
|
|
2818
|
+
$r as assembleDataset,
|
|
2819
|
+
Pr as attachAssayPositions,
|
|
2820
|
+
Dr as balancedTangentialDesurvey,
|
|
2821
|
+
Qt as buildAssayState,
|
|
2822
|
+
Sn as buildCommentsConfig,
|
|
2823
|
+
Tn as buildEqualRangeColorScale,
|
|
2824
|
+
Mn as buildIntervalPoints,
|
|
2825
|
+
An as buildPlotConfig,
|
|
2826
|
+
Zr as buildStrikeDipSymbol,
|
|
2827
|
+
jn as buildStructuralDiscs,
|
|
2828
|
+
Xr as buildStructuralStripConfig,
|
|
2829
|
+
En as buildTadpoleConfig,
|
|
2830
|
+
Sr as buildTraces,
|
|
2831
|
+
qe as buildViewSignature,
|
|
2832
|
+
Br as calculateBlockVolume,
|
|
2833
|
+
cn as calculatePropertyStats,
|
|
2834
|
+
Wt as classifyColumns,
|
|
2835
|
+
wr as coerceNumeric,
|
|
2836
|
+
gn as computeStructuralPositions,
|
|
2837
|
+
Cr as defaultChartType,
|
|
2838
|
+
Ee as deriveAssayProps,
|
|
2839
|
+
vr as desurveyTraces,
|
|
2840
|
+
Hn as dipAzimuthToNormal,
|
|
2841
|
+
Xn as dolly,
|
|
2842
|
+
Gn as emitViewChangeIfNeeded,
|
|
2843
|
+
un as filterBlocks,
|
|
2844
|
+
Vr as filterByProject,
|
|
2845
|
+
Fe as fitCameraToBounds,
|
|
2846
|
+
Zn as focusOnLastBounds,
|
|
2847
|
+
jr as getBlockStats,
|
|
2848
|
+
He as getChartOptions,
|
|
2849
|
+
mn as getColorForValue,
|
|
2850
|
+
It as getEqualRangeBinIndex,
|
|
2851
|
+
On as getEqualRangeColor,
|
|
2852
|
+
Et as getViewState,
|
|
2853
|
+
fn as groupRowsByHole,
|
|
2854
|
+
zn as holeHasData,
|
|
2855
|
+
bn as interpolateTrace,
|
|
2856
|
+
to as intervalsAsTubes,
|
|
2857
|
+
Or as joinAssaysToTraces,
|
|
2858
|
+
Ir as loadAssayFile,
|
|
2859
|
+
Jt as loadAssayHole,
|
|
2860
|
+
Kt as loadAssayMetadata,
|
|
2861
|
+
Fr as loadAssays,
|
|
2862
|
+
Hr as loadBlockModelMetadata,
|
|
2863
|
+
Lr as loadCollars,
|
|
2864
|
+
Tr as loadSurveys,
|
|
2865
|
+
Be as loadTable,
|
|
2866
|
+
xr as logDataInfo,
|
|
2867
|
+
_r as logDataWarning,
|
|
2868
|
+
Yn as lookDown,
|
|
2869
|
+
nn as minimumCurvatureDesurvey,
|
|
2870
|
+
an as normalizeBlockRow,
|
|
2871
|
+
zr as normalizeCsvRow,
|
|
2872
|
+
Ie as normalizeFieldName,
|
|
2873
|
+
qn as pan,
|
|
2874
|
+
pn as parseAssayCsvTextToHoles,
|
|
2875
|
+
Yt as parseAssayHole,
|
|
2876
|
+
Nr as parseAssayHoleIds,
|
|
2877
|
+
Ut as parseAssayHoleIdsWithAssays,
|
|
2878
|
+
qt as parseAssaysCSV,
|
|
2879
|
+
Rr as parseBlockModelCSV,
|
|
2880
|
+
kr as parseDrillholesCSV,
|
|
2881
|
+
hn as parseStructuralCSV,
|
|
2882
|
+
Yr as parseStructuralIntervalsCSV,
|
|
2883
|
+
Ur as parseStructuralPointsCSV,
|
|
2884
|
+
Ar as parseSurveyCSV,
|
|
2885
|
+
qr as parseUnifiedDataset,
|
|
2886
|
+
Mr as pickFirstPresent,
|
|
2887
|
+
Jr as planView,
|
|
2888
|
+
Vn as projectTraceToSection,
|
|
2889
|
+
Un as recenterCameraToOrigin,
|
|
2890
|
+
ht as reorderHoleIds,
|
|
2891
|
+
Qr as sectionView,
|
|
2892
|
+
wn as sectionWindow,
|
|
2893
|
+
Qn as setControlMode,
|
|
2894
|
+
Jn as setFov,
|
|
2895
|
+
Bn as setViewState,
|
|
2896
|
+
pe as standardizeColumns,
|
|
2897
|
+
gr as standardizeRowArray,
|
|
2898
|
+
Er as tangentialDesurvey,
|
|
2899
|
+
jt as toError,
|
|
2900
|
+
eo as tracesAsSegments,
|
|
2901
|
+
Kr as useDrillholeTraceGrid,
|
|
2902
|
+
Gr as validateStructuralPoints,
|
|
2903
|
+
w as withDataErrorContext
|
|
2689
2904
|
};
|
|
2690
2905
|
//# sourceMappingURL=baselode.js.map
|