baselode 0.1.20 → 0.1.22
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 +1561 -1353
- package/dist/baselode.js.map +1 -1
- package/dist/{baselode3dScene-qMfVRKxK.js → baselode3dScene-4nzt80B1.js} +951 -884
- package/dist/baselode3dScene-4nzt80B1.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tool-ui.js +376 -355
- package/dist/tool-ui.js.map +1 -1
- package/package.json +1 -1
- package/dist/baselode3dScene-qMfVRKxK.js.map +0 -1
package/dist/baselode.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import {
|
|
1
|
+
import { _ as Nt, w as U, H as N, P as de, F as M, T as O, c as vt, L as re, a as oe, D as V, A as Y, b as W, E as pe, N as ge, d as Ee, M as ve, G as le, e as ce, B as Et, f as et, g as $e, h as ze, i as tt, j as Ge, k as At, l as nt, m as St, n as Tt, o as Lt, p as It } from "./baselode3dScene-4nzt80B1.js";
|
|
2
|
+
import { q as vr, r as Er, s as Ar, t as Sr, u as Tr, v as Lr, x as Ir, y as Cr, z as Mr, C as Pr, I as Or, J as xr, K as Dr, O as Rr, Q as zr, R as Fr, S as $r, U as kr, V as wr, W as Ur, X as Hr, Y as Gr, Z as Br, $ as Vr, a0 as jr, a1 as Yr, a2 as Wr, a3 as qr, a4 as Xr, a5 as Kr, a6 as Zr, a7 as Jr, a8 as Qr, a9 as eo, aa as to, ab as no, ac as ro, ad as oo, ae as so, af as io, ag as ao, ah as lo, ai as co, aj as uo, ak as mo, al as fo, am as ho, an as po, ao as go, ap as bo, aq as yo, ar as _o, as as No, at as vo, au as Eo, av as Ao, aw as So, ax as To, ay as Lo, az as Io, aA as Co, aB as Mo, aC as Po, aD as Oo, aE as xo, aF as Do, aG as Ro, aH as zo, aI as Fo, aJ as $o, aK as ko, aL as wo, aM as Uo, aN as Ho, aO as Go, aP as Bo, aQ as Vo, aR as jo, aS as Yo, aT as Wo, aU as qo, aV as Xo, aW as Ko, aX as Zo, aY as Jo, aZ as Qo, a_ as es, a$ as ts, b0 as ns, b1 as rs, b2 as os, b3 as ss, b4 as is, b5 as as, b6 as ls, b7 as cs, b8 as us, b9 as ds, ba as ms, bb as fs, bc as hs, bd as ps, be as gs, bf as bs, bg as ys, bh as _s, bi as Ns, bj as vs, bk as Es, bl as As } from "./baselode3dScene-4nzt80B1.js";
|
|
3
3
|
import J from "papaparse";
|
|
4
|
-
import { jsx as S,
|
|
5
|
-
import { useRef as
|
|
6
|
-
import
|
|
4
|
+
import { jsxs as w, jsx as S, Fragment as Ct } from "react/jsx-runtime";
|
|
5
|
+
import { useRef as ye, useState as K, useEffect as te, useMemo as ee, useCallback as Pe } from "react";
|
|
6
|
+
import Oe from "plotly.js-dist-min";
|
|
7
7
|
import * as Q from "three";
|
|
8
|
-
function
|
|
8
|
+
function Ae(e) {
|
|
9
9
|
return (e || "").toString().trim().toLowerCase().replace(/\s+/g, "_");
|
|
10
10
|
}
|
|
11
11
|
function ie(e, n = null, t = null) {
|
|
12
|
-
const
|
|
12
|
+
const r = { ...Nt };
|
|
13
13
|
if (t) {
|
|
14
|
-
for (const [i,
|
|
15
|
-
if (i != null &&
|
|
16
|
-
const a =
|
|
17
|
-
|
|
14
|
+
for (const [i, s] of Object.entries(t))
|
|
15
|
+
if (i != null && s != null) {
|
|
16
|
+
const a = Ae(i), l = Ae(s);
|
|
17
|
+
r[a] = l;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
for (const [i,
|
|
22
|
-
const a =
|
|
23
|
-
|
|
20
|
+
const o = {};
|
|
21
|
+
for (const [i, s] of Object.entries(e)) {
|
|
22
|
+
const a = Ae(i), l = r[a] || a;
|
|
23
|
+
o[l] = s;
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return o;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return e.map((
|
|
27
|
+
function Pn(e, n = null, t = null) {
|
|
28
|
+
return e.map((r) => ie(r, n, t));
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const Mt = /* @__PURE__ */ new Set([
|
|
31
31
|
"hole_id",
|
|
32
32
|
"holeid",
|
|
33
33
|
"id",
|
|
@@ -59,84 +59,84 @@ const It = /* @__PURE__ */ new Set([
|
|
|
59
59
|
"todepth",
|
|
60
60
|
"comment",
|
|
61
61
|
"z"
|
|
62
|
-
]),
|
|
63
|
-
function
|
|
64
|
-
return { holeId: e[
|
|
65
|
-
}
|
|
66
|
-
function
|
|
67
|
-
const t = e[
|
|
68
|
-
if (!
|
|
69
|
-
const
|
|
70
|
-
return !Number.isFinite(i) || !Number.isFinite(
|
|
71
|
-
holeId:
|
|
72
|
-
project:
|
|
62
|
+
]), Ie = (e, n = null) => ie(e, null, n);
|
|
63
|
+
function Pt(e) {
|
|
64
|
+
return { holeId: e[N] };
|
|
65
|
+
}
|
|
66
|
+
function rt(e, n = null) {
|
|
67
|
+
const t = e[N], r = t !== void 0 ? `${t}`.trim() : "";
|
|
68
|
+
if (!r) return null;
|
|
69
|
+
const o = e[de] || e.project || e.project_code, i = Number(e[M]), s = Number(e[O]);
|
|
70
|
+
return !Number.isFinite(i) || !Number.isFinite(s) || s <= i ? null : {
|
|
71
|
+
holeId: r,
|
|
72
|
+
project: o,
|
|
73
73
|
from: i,
|
|
74
|
-
to:
|
|
74
|
+
to: s,
|
|
75
75
|
...e
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
var
|
|
80
|
-
const t = n.sort((i,
|
|
78
|
+
function ot(e, n) {
|
|
79
|
+
var o;
|
|
80
|
+
const t = n.sort((i, s) => i.from - s.from), r = [];
|
|
81
81
|
return t.forEach((i) => {
|
|
82
|
-
const { from:
|
|
83
|
-
z:
|
|
84
|
-
from:
|
|
82
|
+
const { from: s, to: a, project: l, ...u } = i, c = {
|
|
83
|
+
z: s,
|
|
84
|
+
from: s,
|
|
85
85
|
to: a,
|
|
86
|
-
[
|
|
86
|
+
[N]: e,
|
|
87
87
|
[de]: l,
|
|
88
88
|
...u
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
}), { id: e, project: (
|
|
90
|
+
r.push(c), r.push({ ...c, z: a });
|
|
91
|
+
}), { id: e, project: (o = t[0]) == null ? void 0 : o.project, points: r };
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return new Promise((t,
|
|
95
|
-
const
|
|
93
|
+
function On(e, n = null) {
|
|
94
|
+
return new Promise((t, r) => {
|
|
95
|
+
const o = /* @__PURE__ */ new Set();
|
|
96
96
|
J.parse(e, {
|
|
97
97
|
header: !0,
|
|
98
98
|
dynamicTyping: !0,
|
|
99
99
|
skipEmptyLines: !0,
|
|
100
100
|
step: (i) => {
|
|
101
|
-
const a =
|
|
102
|
-
a !== void 0 && `${a}`.trim() !== "" &&
|
|
101
|
+
const a = Ie(i.data, n)[N];
|
|
102
|
+
a !== void 0 && `${a}`.trim() !== "" && o.add(`${a}`.trim());
|
|
103
103
|
},
|
|
104
|
-
complete: () => t(Array.from(
|
|
105
|
-
error: (i) =>
|
|
104
|
+
complete: () => t(Array.from(o)),
|
|
105
|
+
error: (i) => r(U("parseAssayHoleIds", i))
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
return Object.entries(e || {}).some(([n, t]) => !(
|
|
109
|
+
function Ot(e) {
|
|
110
|
+
return Object.entries(e || {}).some(([n, t]) => !(Mt.has(n) || t == null || typeof t == "string" && t.trim() === ""));
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return new Promise((t,
|
|
114
|
-
const
|
|
112
|
+
function xt(e, n = null) {
|
|
113
|
+
return new Promise((t, r) => {
|
|
114
|
+
const o = /* @__PURE__ */ new Map();
|
|
115
115
|
J.parse(e, {
|
|
116
116
|
header: !0,
|
|
117
117
|
dynamicTyping: !0,
|
|
118
118
|
skipEmptyLines: !0,
|
|
119
119
|
step: (i) => {
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
122
|
-
const l =
|
|
120
|
+
const s = Ie(i.data, n);
|
|
121
|
+
if (!Ot(s)) return;
|
|
122
|
+
const l = Pt(s).holeId;
|
|
123
123
|
if (l !== void 0 && `${l}`.trim() !== "") {
|
|
124
124
|
const u = `${l}`.trim();
|
|
125
|
-
|
|
125
|
+
o.has(u) || o.set(u, {
|
|
126
126
|
holeId: u
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
|
-
complete: () => t(Array.from(
|
|
131
|
-
error: (i) =>
|
|
130
|
+
complete: () => t(Array.from(o.values())),
|
|
131
|
+
error: (i) => r(U("parseAssayHoleIdsWithAssays", i))
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return new Promise((
|
|
137
|
-
const
|
|
138
|
-
if (!
|
|
139
|
-
i(
|
|
135
|
+
function Dt(e, n, t = null, r = null) {
|
|
136
|
+
return new Promise((o, i) => {
|
|
137
|
+
const s = `${n}`.trim();
|
|
138
|
+
if (!s) {
|
|
139
|
+
i(U("parseAssayHole", new Error("Missing hole id")));
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
const a = [];
|
|
@@ -145,169 +145,169 @@ function Tt(e, n, t = null, s = null) {
|
|
|
145
145
|
dynamicTyping: !0,
|
|
146
146
|
skipEmptyLines: !0,
|
|
147
147
|
step: (l) => {
|
|
148
|
-
const u =
|
|
149
|
-
c && `${c.holeId}`.trim() ===
|
|
148
|
+
const u = Ie(l.data, r), c = rt(u, r);
|
|
149
|
+
c && `${c.holeId}`.trim() === s && a.push(c);
|
|
150
150
|
},
|
|
151
151
|
complete: () => {
|
|
152
152
|
if (!a.length) {
|
|
153
|
-
|
|
153
|
+
o(null);
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
|
-
const l =
|
|
157
|
-
|
|
156
|
+
const l = ot(s, a);
|
|
157
|
+
o(l);
|
|
158
158
|
},
|
|
159
|
-
error: (l) => i(
|
|
159
|
+
error: (l) => i(U("parseAssayHole", l))
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
return new Promise((
|
|
163
|
+
function Rt(e, n = null, t = null) {
|
|
164
|
+
return new Promise((r, o) => {
|
|
165
165
|
J.parse(e, {
|
|
166
166
|
header: !0,
|
|
167
167
|
dynamicTyping: !0,
|
|
168
168
|
skipEmptyLines: !0,
|
|
169
169
|
complete: (i) => {
|
|
170
|
-
const
|
|
170
|
+
const s = /* @__PURE__ */ new Map();
|
|
171
171
|
i.data.forEach((l) => {
|
|
172
|
-
const u =
|
|
173
|
-
c && (
|
|
172
|
+
const u = Ie(l, t), c = rt(u, t);
|
|
173
|
+
c && (s.has(c.holeId) || s.set(c.holeId, []), s.get(c.holeId).push(c));
|
|
174
174
|
});
|
|
175
|
-
const a = Array.from(
|
|
176
|
-
|
|
175
|
+
const a = Array.from(s.entries()).map(([l, u]) => ot(l, u));
|
|
176
|
+
r({ holes: a });
|
|
177
177
|
},
|
|
178
|
-
error: (i) =>
|
|
178
|
+
error: (i) => o(U("parseAssaysCSV", i))
|
|
179
179
|
});
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function xn(e = {}) {
|
|
183
183
|
const n = {};
|
|
184
|
-
return Object.entries(e || {}).forEach(([t,
|
|
185
|
-
t && (n[
|
|
184
|
+
return Object.entries(e || {}).forEach(([t, r]) => {
|
|
185
|
+
t && (n[Ae(t)] = r);
|
|
186
186
|
}), n;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
for (const
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
return
|
|
188
|
+
function Dn(e = {}, n = [], t) {
|
|
189
|
+
for (const r of n) {
|
|
190
|
+
const o = e[r];
|
|
191
|
+
if (o != null && `${o}`.trim() !== "")
|
|
192
|
+
return o;
|
|
193
193
|
}
|
|
194
194
|
return t;
|
|
195
195
|
}
|
|
196
|
-
const
|
|
196
|
+
const zt = 4;
|
|
197
197
|
function st(e = [], n = "") {
|
|
198
198
|
if (!e.length) return [];
|
|
199
199
|
if (!n) return e;
|
|
200
200
|
const t = e.findIndex((i) => i === n);
|
|
201
201
|
if (t === -1) return e;
|
|
202
|
-
const
|
|
203
|
-
return [
|
|
202
|
+
const r = e[t], o = e.filter((i, s) => s !== t);
|
|
203
|
+
return [r, ...o];
|
|
204
204
|
}
|
|
205
205
|
function Se({
|
|
206
206
|
property: e = "",
|
|
207
207
|
chartType: n = "",
|
|
208
208
|
categoricalProps: t = [],
|
|
209
|
-
commentProps:
|
|
210
|
-
numericDefaultChartType:
|
|
209
|
+
commentProps: r = [],
|
|
210
|
+
numericDefaultChartType: o = "markers+line"
|
|
211
211
|
} = {}) {
|
|
212
|
-
return e ?
|
|
212
|
+
return e ? r.includes(e) ? "comment" : t.includes(e) ? "categorical" : e === "dip" ? "tadpole" : !n || n === "categorical" || n === "comment" || n === "tadpole" ? o : n : n || o;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function it({
|
|
215
215
|
holeIds: e = [],
|
|
216
216
|
focusedHoleId: n = "",
|
|
217
|
-
plotCount: t =
|
|
218
|
-
defaultProp:
|
|
219
|
-
categoricalProps:
|
|
217
|
+
plotCount: t = zt,
|
|
218
|
+
defaultProp: r = "",
|
|
219
|
+
categoricalProps: o = [],
|
|
220
220
|
commentProps: i = [],
|
|
221
|
-
numericDefaultChartType:
|
|
221
|
+
numericDefaultChartType: s = "markers+line"
|
|
222
222
|
} = {}) {
|
|
223
223
|
const a = st(e, n);
|
|
224
224
|
return Array.from({ length: t }).map((l, u) => {
|
|
225
|
-
const c = a[u] || e[u] || "",
|
|
226
|
-
property:
|
|
225
|
+
const c = a[u] || e[u] || "", d = Se({
|
|
226
|
+
property: r,
|
|
227
227
|
chartType: "",
|
|
228
|
-
categoricalProps:
|
|
228
|
+
categoricalProps: o,
|
|
229
229
|
commentProps: i,
|
|
230
|
-
numericDefaultChartType:
|
|
230
|
+
numericDefaultChartType: s
|
|
231
231
|
});
|
|
232
232
|
return {
|
|
233
233
|
holeId: c,
|
|
234
|
-
property:
|
|
235
|
-
chartType:
|
|
234
|
+
property: r,
|
|
235
|
+
chartType: d
|
|
236
236
|
};
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
const n = e.flatMap((a) => a.points || []), { numericCols: t, categoricalCols:
|
|
239
|
+
function Te(e = []) {
|
|
240
|
+
const n = e.flatMap((a) => a.points || []), { numericCols: t, categoricalCols: r, commentCols: o, byType: i } = vt(n), s = t[0] || r[0] || "";
|
|
241
241
|
return {
|
|
242
242
|
numericProps: t,
|
|
243
|
-
categoricalProps:
|
|
244
|
-
commentProps:
|
|
243
|
+
categoricalProps: r,
|
|
244
|
+
commentProps: o,
|
|
245
245
|
columnMeta: i,
|
|
246
|
-
defaultProp:
|
|
246
|
+
defaultProp: s
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
async function
|
|
250
|
-
return await
|
|
249
|
+
async function Ft(e, n = null) {
|
|
250
|
+
return await xt(e);
|
|
251
251
|
}
|
|
252
|
-
async function
|
|
253
|
-
return await
|
|
252
|
+
async function $t(e, n, t = null) {
|
|
253
|
+
return await Dt(e, n);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function kt(e = [], n = "") {
|
|
256
256
|
if (!e.length) return null;
|
|
257
|
-
const { numericProps: t, categoricalProps:
|
|
257
|
+
const { numericProps: t, categoricalProps: r, commentProps: o, columnMeta: i, defaultProp: s } = Te(e), a = e.map((u) => u.id || u.holeId).filter(Boolean), l = it({
|
|
258
258
|
holeIds: a,
|
|
259
259
|
focusedHoleId: n,
|
|
260
260
|
plotCount: 4,
|
|
261
|
-
defaultProp:
|
|
262
|
-
categoricalProps:
|
|
263
|
-
commentProps:
|
|
261
|
+
defaultProp: s,
|
|
262
|
+
categoricalProps: r,
|
|
263
|
+
commentProps: o,
|
|
264
264
|
numericDefaultChartType: "line"
|
|
265
265
|
});
|
|
266
266
|
return {
|
|
267
267
|
holes: e,
|
|
268
268
|
numericProps: t,
|
|
269
|
-
categoricalProps:
|
|
270
|
-
commentProps:
|
|
269
|
+
categoricalProps: r,
|
|
270
|
+
commentProps: o,
|
|
271
271
|
columnMeta: i,
|
|
272
|
-
defaultProp:
|
|
272
|
+
defaultProp: s,
|
|
273
273
|
traceConfigs: l
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
async function
|
|
277
|
-
const { holes:
|
|
278
|
-
if (!
|
|
279
|
-
return
|
|
276
|
+
async function Rn(e, n = "", t = null) {
|
|
277
|
+
const { holes: r } = await Rt(e, t), o = kt(r, n);
|
|
278
|
+
if (!o) throw new Error("No valid assay intervals found.");
|
|
279
|
+
return o;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return new Promise((t,
|
|
281
|
+
function zn(e, n = null) {
|
|
282
|
+
return new Promise((t, r) => {
|
|
283
283
|
J.parse(e, {
|
|
284
284
|
header: !0,
|
|
285
285
|
dynamicTyping: !0,
|
|
286
286
|
skipEmptyLines: !0,
|
|
287
|
-
complete: (
|
|
288
|
-
const i =
|
|
287
|
+
complete: (o) => {
|
|
288
|
+
const i = o.data.map((s) => wt(s, n)).filter((s) => s[N] && Number.isFinite(s[V]) && Number.isFinite(s[W]) && Number.isFinite(s[Y]));
|
|
289
289
|
t(i);
|
|
290
290
|
},
|
|
291
|
-
error: (
|
|
291
|
+
error: (o) => r(U("parseSurveyCSV", o))
|
|
292
292
|
});
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
const t = ie(e, null, n),
|
|
295
|
+
function wt(e, n = null) {
|
|
296
|
+
const t = ie(e, null, n), r = t[N], o = t[de] || t.project || t.project_code, i = he(t[re]), s = he(t[oe]), a = he(t[V]), l = he(t[W]), u = he(t[Y]), c = he(t.maxdepth);
|
|
297
297
|
return {
|
|
298
298
|
raw: t,
|
|
299
|
-
[
|
|
300
|
-
[de]:
|
|
301
|
-
[
|
|
302
|
-
[
|
|
303
|
-
[
|
|
304
|
-
[
|
|
305
|
-
[
|
|
299
|
+
[N]: r,
|
|
300
|
+
[de]: o,
|
|
301
|
+
[re]: i,
|
|
302
|
+
[oe]: s,
|
|
303
|
+
[V]: a,
|
|
304
|
+
[W]: l,
|
|
305
|
+
[Y]: u,
|
|
306
306
|
maxdepth: c,
|
|
307
307
|
// Legacy field names for backwards compatibility
|
|
308
|
-
project_code:
|
|
308
|
+
project_code: o,
|
|
309
309
|
latitude: i,
|
|
310
|
-
longitude:
|
|
310
|
+
longitude: s,
|
|
311
311
|
surveydepth: a
|
|
312
312
|
};
|
|
313
313
|
}
|
|
@@ -315,251 +315,251 @@ const he = (e) => {
|
|
|
315
315
|
const n = Number(e);
|
|
316
316
|
return Number.isFinite(n) ? n : void 0;
|
|
317
317
|
};
|
|
318
|
-
function
|
|
319
|
-
var u, c,
|
|
318
|
+
function Fn(e, n) {
|
|
319
|
+
var u, c, d, m;
|
|
320
320
|
const t = /* @__PURE__ */ new Map();
|
|
321
321
|
e.forEach((f) => {
|
|
322
|
-
const
|
|
323
|
-
if (!
|
|
324
|
-
const
|
|
325
|
-
t.has(
|
|
322
|
+
const b = (f[N] || f.holeId || f.id || "").toString().trim();
|
|
323
|
+
if (!b) return;
|
|
324
|
+
const p = b.toLowerCase();
|
|
325
|
+
t.has(p) || t.set(p, f);
|
|
326
326
|
});
|
|
327
|
-
const
|
|
327
|
+
const r = ((u = e[0]) == null ? void 0 : u.lat) ?? ((c = e[0]) == null ? void 0 : c[re]) ?? 0, o = ((d = e[0]) == null ? void 0 : d.lng) ?? ((m = e[0]) == null ? void 0 : m[oe]) ?? 0, i = 111132, s = 111320 * Math.cos(r * Math.PI / 180), a = /* @__PURE__ */ new Map();
|
|
328
328
|
n.forEach((f) => {
|
|
329
|
-
const
|
|
330
|
-
if (!
|
|
331
|
-
const
|
|
332
|
-
a.has(
|
|
329
|
+
const b = (f[N] || "").toString().trim();
|
|
330
|
+
if (!b) return;
|
|
331
|
+
const p = b.toLowerCase();
|
|
332
|
+
a.has(p) || a.set(p, []), a.get(p).push(f);
|
|
333
333
|
});
|
|
334
334
|
const l = [];
|
|
335
|
-
return a.forEach((f,
|
|
336
|
-
const
|
|
337
|
-
if (!
|
|
338
|
-
const
|
|
339
|
-
if (!
|
|
340
|
-
const
|
|
341
|
-
let R = 0,
|
|
342
|
-
for (let
|
|
343
|
-
const z =
|
|
344
|
-
if (!
|
|
345
|
-
|
|
335
|
+
return a.forEach((f, b) => {
|
|
336
|
+
const p = t.get(b);
|
|
337
|
+
if (!p) return;
|
|
338
|
+
const v = f.filter((A) => Number.isFinite(A[V] ?? A.surveydepth)).sort((A, z) => (A[V] ?? A.surveydepth) - (z[V] ?? z.surveydepth));
|
|
339
|
+
if (!v.length) return;
|
|
340
|
+
const g = p.lat ?? p[re], L = p.lng ?? p[oe], C = 111132, j = 111320 * Math.cos(g * Math.PI / 180), H = (L - o) * s, $ = (g - r) * i, D = [];
|
|
341
|
+
let R = 0, G = 0, h = 0;
|
|
342
|
+
for (let A = 0; A < v.length; A += 1) {
|
|
343
|
+
const z = v[A], E = v[A - 1], _ = z[V] ?? z.surveydepth, y = z[Y] ?? z.azimuth, I = z[W] ?? z.dip;
|
|
344
|
+
if (!E) {
|
|
345
|
+
D.push({
|
|
346
346
|
x: H + R,
|
|
347
|
-
y:
|
|
347
|
+
y: $ + G,
|
|
348
348
|
z: 0,
|
|
349
|
-
md:
|
|
350
|
-
azimuth:
|
|
351
|
-
dip:
|
|
349
|
+
md: _,
|
|
350
|
+
azimuth: y,
|
|
351
|
+
dip: I
|
|
352
352
|
});
|
|
353
353
|
continue;
|
|
354
354
|
}
|
|
355
|
-
const F =
|
|
355
|
+
const F = E[V] ?? E.surveydepth, T = E[Y] ?? E.azimuth, x = E[W] ?? E.dip, B = _ - F;
|
|
356
356
|
if (B <= 0) continue;
|
|
357
|
-
const
|
|
358
|
-
Math.sin(
|
|
359
|
-
), me =
|
|
360
|
-
R +=
|
|
357
|
+
const k = Be(x), q = Be(I), X = Fe(T), ae = Fe(y), _e = Math.acos(
|
|
358
|
+
Math.sin(k) * Math.sin(q) * Math.cos(X - ae) + Math.cos(k) * Math.cos(q)
|
|
359
|
+
), me = _e > 1e-6 ? 2 / _e * Math.tan(_e / 2) : 1, Me = 0.5 * B * (Math.sin(k) * Math.cos(X) + Math.sin(q) * Math.cos(ae)) * me, fe = 0.5 * B * (Math.sin(k) * Math.sin(X) + Math.sin(q) * Math.sin(ae)) * me, _t = 0.5 * B * (Math.cos(k) + Math.cos(q)) * me;
|
|
360
|
+
R += Me, G += fe, h += _t, D.push({
|
|
361
361
|
x: H + R,
|
|
362
|
-
y:
|
|
363
|
-
z: -
|
|
362
|
+
y: $ + G,
|
|
363
|
+
z: -h,
|
|
364
364
|
// render with z up; depth down
|
|
365
|
-
md:
|
|
366
|
-
azimuth:
|
|
367
|
-
dip:
|
|
365
|
+
md: _,
|
|
366
|
+
azimuth: y,
|
|
367
|
+
dip: I
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
const
|
|
371
|
-
...
|
|
372
|
-
lat:
|
|
373
|
-
lng:
|
|
370
|
+
const P = D.map((A) => ({
|
|
371
|
+
...A,
|
|
372
|
+
lat: g + A.y / C,
|
|
373
|
+
lng: L + A.x / j
|
|
374
374
|
}));
|
|
375
375
|
l.push({
|
|
376
|
-
id:
|
|
377
|
-
project:
|
|
378
|
-
points:
|
|
379
|
-
collar:
|
|
376
|
+
id: p[N] || p.holeId || b,
|
|
377
|
+
project: p[de] || p.project_id || p.project || "",
|
|
378
|
+
points: P,
|
|
379
|
+
collar: p
|
|
380
380
|
});
|
|
381
381
|
}), l;
|
|
382
382
|
}
|
|
383
|
-
const Fe = (e) => e * Math.PI / 180,
|
|
384
|
-
const n = Number(e), t = 90 + (Number.isFinite(n) ? n : 0),
|
|
385
|
-
return Fe(
|
|
383
|
+
const Fe = (e) => e * Math.PI / 180, Be = (e) => {
|
|
384
|
+
const n = Number(e), t = 90 + (Number.isFinite(n) ? n : 0), r = Math.min(180, Math.max(0, t));
|
|
385
|
+
return Fe(r);
|
|
386
386
|
};
|
|
387
|
-
function
|
|
387
|
+
function ne(e, n = void 0) {
|
|
388
388
|
const t = Number(e);
|
|
389
389
|
return Number.isFinite(t) ? t : n;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Ve(e) {
|
|
392
392
|
return e == null ? "" : `${e}`.trim();
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const t = n || "hole_id",
|
|
396
|
-
if (!
|
|
397
|
-
throw
|
|
394
|
+
function Le(e = [], n = null) {
|
|
395
|
+
const t = n || "hole_id", o = [t, "hole_id", "holeId", "id"].find((i) => e.some((s) => Ve(s == null ? void 0 : s[i])));
|
|
396
|
+
if (!o)
|
|
397
|
+
throw U("canonicalizeHoleIdRows", new Error(`hole id column '${t}' not found`));
|
|
398
398
|
return {
|
|
399
|
-
aliasCol:
|
|
399
|
+
aliasCol: o,
|
|
400
400
|
rows: e.map((i) => ({
|
|
401
401
|
...i,
|
|
402
|
-
hole_id:
|
|
402
|
+
hole_id: Ve(i == null ? void 0 : i[o])
|
|
403
403
|
}))
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function je(e) {
|
|
407
407
|
return Number(e) * Math.PI / 180;
|
|
408
408
|
}
|
|
409
409
|
function xe(e, n) {
|
|
410
|
-
const t =
|
|
411
|
-
return { ca:
|
|
410
|
+
const t = je(e), r = je(n), o = Math.cos(r) * Math.sin(t), i = Math.cos(r) * Math.cos(t), s = Math.sin(r) * -1;
|
|
411
|
+
return { ca: o, cb: i, cc: s };
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
const
|
|
413
|
+
function Ut(e, n, t, r, o, i = "minimum_curvature") {
|
|
414
|
+
const s = xe(n, t), a = xe(r, o);
|
|
415
415
|
if (i === "tangential")
|
|
416
416
|
return {
|
|
417
|
-
dx: e *
|
|
418
|
-
dy: e *
|
|
419
|
-
dz: e *
|
|
417
|
+
dx: e * s.ca,
|
|
418
|
+
dy: e * s.cb,
|
|
419
|
+
dz: e * s.cc,
|
|
420
420
|
azimuth: n,
|
|
421
421
|
dip: t
|
|
422
422
|
};
|
|
423
423
|
if (i === "balanced_tangential") {
|
|
424
|
-
const
|
|
424
|
+
const d = 0.5 * (n + r), m = 0.5 * (t + o), f = xe(d, m);
|
|
425
425
|
return {
|
|
426
426
|
dx: e * f.ca,
|
|
427
427
|
dy: e * f.cb,
|
|
428
428
|
dz: e * f.cc,
|
|
429
|
-
azimuth:
|
|
430
|
-
dip:
|
|
429
|
+
azimuth: d,
|
|
430
|
+
dip: m
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
const l =
|
|
433
|
+
const l = s.ca * a.ca + s.cb * a.cb + s.cc * a.cc, u = Math.acos(Math.max(-1, Math.min(1, l))), c = u > 1e-6 ? 2 * Math.tan(u / 2) / u : 1;
|
|
434
434
|
return {
|
|
435
|
-
dx: 0.5 * e * (
|
|
436
|
-
dy: 0.5 * e * (
|
|
437
|
-
dz: 0.5 * e * (
|
|
438
|
-
azimuth:
|
|
439
|
-
dip:
|
|
435
|
+
dx: 0.5 * e * (s.ca + a.ca) * c,
|
|
436
|
+
dy: 0.5 * e * (s.cb + a.cb) * c,
|
|
437
|
+
dz: 0.5 * e * (s.cc + a.cc) * c,
|
|
438
|
+
azimuth: r,
|
|
439
|
+
dip: o
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
function ke(e = [], n = [], t = {}) {
|
|
443
443
|
const {
|
|
444
|
-
step:
|
|
445
|
-
holeIdCol:
|
|
444
|
+
step: r = 1,
|
|
445
|
+
holeIdCol: o = null,
|
|
446
446
|
method: i = "minimum_curvature"
|
|
447
|
-
} = t,
|
|
447
|
+
} = t, s = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, a = Le(e, o), l = Le(n, o || a.aliasCol);
|
|
448
448
|
if (!a.rows.length || !l.rows.length) return [];
|
|
449
449
|
const u = /* @__PURE__ */ new Map();
|
|
450
|
-
a.rows.forEach((
|
|
451
|
-
!
|
|
450
|
+
a.rows.forEach((m) => {
|
|
451
|
+
!m.hole_id || u.has(m.hole_id) || u.set(m.hole_id, m);
|
|
452
452
|
});
|
|
453
453
|
const c = /* @__PURE__ */ new Map();
|
|
454
|
-
l.rows.forEach((
|
|
455
|
-
|
|
454
|
+
l.rows.forEach((m) => {
|
|
455
|
+
m.hole_id && (c.has(m.hole_id) || c.set(m.hole_id, []), c.get(m.hole_id).push(m));
|
|
456
456
|
});
|
|
457
|
-
const
|
|
458
|
-
return c.forEach((
|
|
459
|
-
const
|
|
460
|
-
if (!
|
|
461
|
-
const
|
|
462
|
-
...
|
|
463
|
-
from:
|
|
464
|
-
azimuth:
|
|
465
|
-
dip:
|
|
466
|
-
})).filter((
|
|
467
|
-
if (!
|
|
468
|
-
let
|
|
469
|
-
const
|
|
457
|
+
const d = [];
|
|
458
|
+
return c.forEach((m, f) => {
|
|
459
|
+
const b = u.get(f);
|
|
460
|
+
if (!b) return;
|
|
461
|
+
const p = [...m].map((D) => ({
|
|
462
|
+
...D,
|
|
463
|
+
from: ne(D.from),
|
|
464
|
+
azimuth: ne(D.azimuth),
|
|
465
|
+
dip: ne(D.dip)
|
|
466
|
+
})).filter((D) => Number.isFinite(D.from) && Number.isFinite(D.azimuth) && Number.isFinite(D.dip)).sort((D, R) => D.from - R.from);
|
|
467
|
+
if (!p.length) return;
|
|
468
|
+
let v = ne(b.x, 0), g = ne(b.y, 0), L = ne(b.z, 0), C = p[0].from;
|
|
469
|
+
const j = p[0].azimuth, H = p[0].dip, $ = {
|
|
470
470
|
hole_id: f,
|
|
471
|
-
md:
|
|
472
|
-
x:
|
|
473
|
-
y:
|
|
474
|
-
z:
|
|
475
|
-
azimuth:
|
|
471
|
+
md: C,
|
|
472
|
+
x: v,
|
|
473
|
+
y: g,
|
|
474
|
+
z: L,
|
|
475
|
+
azimuth: j,
|
|
476
476
|
dip: H
|
|
477
477
|
};
|
|
478
|
-
a.aliasCol !== "hole_id" &&
|
|
479
|
-
for (let
|
|
480
|
-
const R =
|
|
481
|
-
if (
|
|
482
|
-
const z = Math.max(1, Math.ceil(
|
|
483
|
-
for (let
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
const
|
|
478
|
+
a.aliasCol !== "hole_id" && b[a.aliasCol] !== void 0 && ($[a.aliasCol] = b[a.aliasCol]), d.push($);
|
|
479
|
+
for (let D = 0; D < p.length - 1; D += 1) {
|
|
480
|
+
const R = p[D], G = p[D + 1], h = R.from, A = G.from - h;
|
|
481
|
+
if (A <= 0) continue;
|
|
482
|
+
const z = Math.max(1, Math.ceil(A / s)), E = A / z;
|
|
483
|
+
for (let _ = 0; _ < z; _ += 1) {
|
|
484
|
+
C += E;
|
|
485
|
+
const y = (C - h) / A, I = R.azimuth + y * (G.azimuth - R.azimuth), F = R.dip + y * (G.dip - R.dip), T = Ut(E, R.azimuth, R.dip, G.azimuth, G.dip, i);
|
|
486
|
+
v += T.dx, g += T.dy, L += T.dz;
|
|
487
|
+
const x = {
|
|
488
488
|
hole_id: f,
|
|
489
|
-
md:
|
|
490
|
-
x:
|
|
491
|
-
y:
|
|
492
|
-
z:
|
|
493
|
-
azimuth: i === "minimum_curvature" ?
|
|
494
|
-
dip: i === "minimum_curvature" ? F :
|
|
489
|
+
md: C,
|
|
490
|
+
x: v,
|
|
491
|
+
y: g,
|
|
492
|
+
z: L,
|
|
493
|
+
azimuth: i === "minimum_curvature" ? I : T.azimuth,
|
|
494
|
+
dip: i === "minimum_curvature" ? F : T.dip
|
|
495
495
|
};
|
|
496
|
-
a.aliasCol !== "hole_id" &&
|
|
496
|
+
a.aliasCol !== "hole_id" && b[a.aliasCol] !== void 0 && (x[a.aliasCol] = b[a.aliasCol]), d.push(x);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
}),
|
|
499
|
+
}), d;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Ht(e, n, t = {}) {
|
|
502
502
|
return ke(e, n, { ...t, method: "minimum_curvature" });
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function $n(e, n, t = {}) {
|
|
505
505
|
return ke(e, n, { ...t, method: "tangential" });
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function kn(e, n, t = {}) {
|
|
508
508
|
return ke(e, n, { ...t, method: "balanced_tangential" });
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
return
|
|
510
|
+
function wn(e, n, t = {}) {
|
|
511
|
+
return Ht(e, n, t);
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Gt(e, n) {
|
|
514
514
|
if (!e.length || !Number.isFinite(n)) return null;
|
|
515
|
-
let t = null,
|
|
516
|
-
for (let
|
|
517
|
-
const i = e[
|
|
518
|
-
if (!Number.isFinite(
|
|
519
|
-
const a = Math.abs(
|
|
520
|
-
a <
|
|
515
|
+
let t = null, r = 1 / 0;
|
|
516
|
+
for (let o = 0; o < e.length; o += 1) {
|
|
517
|
+
const i = e[o], s = ne(i.md);
|
|
518
|
+
if (!Number.isFinite(s)) continue;
|
|
519
|
+
const a = Math.abs(s - n);
|
|
520
|
+
a < r && (r = a, t = i);
|
|
521
521
|
}
|
|
522
522
|
return t;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
const
|
|
524
|
+
function Un(e = [], n = [], t = {}) {
|
|
525
|
+
const r = t.holeIdCol || "hole_id", o = Le(e, r), i = Le(n, r);
|
|
526
|
+
if (!o.rows.length || !i.rows.length) return [...o.rows];
|
|
527
|
+
const s = /* @__PURE__ */ new Map();
|
|
528
528
|
return i.rows.forEach((a) => {
|
|
529
|
-
a.hole_id && (
|
|
530
|
-
}),
|
|
531
|
-
|
|
532
|
-
}),
|
|
533
|
-
const l =
|
|
529
|
+
a.hole_id && (s.has(a.hole_id) || s.set(a.hole_id, []), s.get(a.hole_id).push(a));
|
|
530
|
+
}), s.forEach((a, l) => {
|
|
531
|
+
s.set(l, [...a].sort((u, c) => ne(u.md, 0) - ne(c.md, 0)));
|
|
532
|
+
}), o.rows.map((a) => {
|
|
533
|
+
const l = ne(a.from), u = ne(a.to), c = Number.isFinite(l) && Number.isFinite(u) ? 0.5 * (l + u) : void 0;
|
|
534
534
|
if (!a.hole_id || !Number.isFinite(c)) return { ...a };
|
|
535
|
-
const
|
|
536
|
-
if (!
|
|
537
|
-
const
|
|
535
|
+
const d = Gt(s.get(a.hole_id) || [], c);
|
|
536
|
+
if (!d) return { ...a };
|
|
537
|
+
const m = { ...a };
|
|
538
538
|
return ["md", "x", "y", "z", "azimuth", "dip"].forEach((f) => {
|
|
539
|
-
|
|
540
|
-
}),
|
|
539
|
+
d[f] !== void 0 && (Object.prototype.hasOwnProperty.call(m, f) ? m[`${f}_trace`] = d[f] : m[f] = d[f]);
|
|
540
|
+
}), m;
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
return new Promise((t,
|
|
543
|
+
function Hn(e, n = null) {
|
|
544
|
+
return new Promise((t, r) => {
|
|
545
545
|
J.parse(e, {
|
|
546
546
|
header: !0,
|
|
547
547
|
dynamicTyping: !0,
|
|
548
548
|
skipEmptyLines: !0,
|
|
549
|
-
complete: (
|
|
549
|
+
complete: (o) => {
|
|
550
550
|
const i = /* @__PURE__ */ new Map();
|
|
551
|
-
|
|
552
|
-
const u = ie(a, null, n), c = u[
|
|
553
|
-
!
|
|
551
|
+
o.data.forEach((a, l) => {
|
|
552
|
+
const u = ie(a, null, n), c = u[N], d = c !== void 0 ? `${c}`.trim() : "", m = u[pe] ?? u.x, f = u[ge] ?? u.y, b = u[Ee] ?? u.z, p = u.order ?? l;
|
|
553
|
+
!d || m === null || m === void 0 || f === null || f === void 0 || b === null || b === void 0 || (i.has(d) || i.set(d, []), i.get(d).push({
|
|
554
554
|
...u,
|
|
555
|
-
holeId:
|
|
556
|
-
order:
|
|
557
|
-
x: Number(
|
|
555
|
+
holeId: d,
|
|
556
|
+
order: p,
|
|
557
|
+
x: Number(m) ?? 0,
|
|
558
558
|
y: Number(f) ?? 0,
|
|
559
|
-
z: Number(
|
|
559
|
+
z: Number(b) ?? 0
|
|
560
560
|
}));
|
|
561
561
|
});
|
|
562
|
-
const
|
|
562
|
+
const s = Array.from(i.entries()).map(([a, l]) => ({
|
|
563
563
|
id: a,
|
|
564
564
|
points: l.sort((u, c) => u.order - c.order).map((u) => ({
|
|
565
565
|
...u,
|
|
@@ -568,13 +568,13 @@ function On(e, n = null) {
|
|
|
568
568
|
z: Number(u.z) || 0
|
|
569
569
|
}))
|
|
570
570
|
}));
|
|
571
|
-
t({ holes:
|
|
571
|
+
t({ holes: s });
|
|
572
572
|
},
|
|
573
|
-
error: (
|
|
573
|
+
error: (o) => r(U("parseDrillholesCSV", o))
|
|
574
574
|
});
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function be(e) {
|
|
578
578
|
return e ? Array.isArray(e) ? [...e] : [] : [];
|
|
579
579
|
}
|
|
580
580
|
function Z(e) {
|
|
@@ -583,311 +583,311 @@ function Z(e) {
|
|
|
583
583
|
}
|
|
584
584
|
function Ne(e = [], n = []) {
|
|
585
585
|
const t = [...e];
|
|
586
|
-
return t.sort((
|
|
586
|
+
return t.sort((r, o) => {
|
|
587
587
|
for (let i = 0; i < n.length; i += 1) {
|
|
588
|
-
const
|
|
588
|
+
const s = n[i], a = r == null ? void 0 : r[s], l = o == null ? void 0 : o[s];
|
|
589
589
|
if (a !== l)
|
|
590
590
|
return a == null ? 1 : l == null ? -1 : typeof a == "number" && typeof l == "number" ? a - l : `${a}`.localeCompare(`${l}`);
|
|
591
591
|
}
|
|
592
592
|
return 0;
|
|
593
593
|
}), t;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Bt(e = [], n = "Intervals") {
|
|
596
596
|
if (!e.length) return;
|
|
597
|
-
const t = Ne(e, [
|
|
598
|
-
t.forEach((
|
|
599
|
-
const i = `${(
|
|
600
|
-
if (!i || !Number.isFinite(
|
|
601
|
-
const l =
|
|
602
|
-
if (Number.isFinite(l) &&
|
|
603
|
-
throw
|
|
597
|
+
const t = Ne(e, [N, M, O]), r = /* @__PURE__ */ new Map();
|
|
598
|
+
t.forEach((o) => {
|
|
599
|
+
const i = `${(o == null ? void 0 : o[N]) ?? ""}`.trim(), s = Number(o == null ? void 0 : o[M]), a = Number(o == null ? void 0 : o[O]);
|
|
600
|
+
if (!i || !Number.isFinite(s) || !Number.isFinite(a)) return;
|
|
601
|
+
const l = r.get(i);
|
|
602
|
+
if (Number.isFinite(l) && s < l)
|
|
603
|
+
throw U(
|
|
604
604
|
"validateNoOverlappingIntervals",
|
|
605
|
-
new Error(`${n} intervals overlap for hole '${i}': from=${
|
|
605
|
+
new Error(`${n} intervals overlap for hole '${i}': from=${s} is less than previous to=${l}`)
|
|
606
606
|
);
|
|
607
|
-
|
|
607
|
+
r.set(i, a);
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return new Promise((t,
|
|
610
|
+
function Vt(e, n = {}) {
|
|
611
|
+
return new Promise((t, r) => {
|
|
612
612
|
J.parse(e, {
|
|
613
613
|
header: !0,
|
|
614
614
|
dynamicTyping: !0,
|
|
615
615
|
skipEmptyLines: !0,
|
|
616
616
|
...n,
|
|
617
|
-
complete: (
|
|
618
|
-
error: (
|
|
617
|
+
complete: (o) => t(Array.isArray(o == null ? void 0 : o.data) ? o.data : []),
|
|
618
|
+
error: (o) => r(U("loadTable(csv)", o))
|
|
619
619
|
});
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return e.map((
|
|
622
|
+
function jt(e = [], n = null, t = null) {
|
|
623
|
+
return e.map((r) => ie(r, n, t));
|
|
624
624
|
}
|
|
625
|
-
async function
|
|
625
|
+
async function Ce(e, n = {}) {
|
|
626
626
|
const {
|
|
627
627
|
kind: t = "csv",
|
|
628
|
-
columnMap:
|
|
629
|
-
sourceColumnMap:
|
|
628
|
+
columnMap: r = null,
|
|
629
|
+
sourceColumnMap: o = null,
|
|
630
630
|
papaParseConfig: i = {}
|
|
631
631
|
} = n;
|
|
632
|
-
let
|
|
632
|
+
let s;
|
|
633
633
|
if (Array.isArray(e))
|
|
634
|
-
|
|
634
|
+
s = be(e);
|
|
635
635
|
else if (t === "csv")
|
|
636
|
-
|
|
637
|
-
else throw t === "parquet" || t === "sql" ?
|
|
638
|
-
return
|
|
636
|
+
s = await Vt(e, i);
|
|
637
|
+
else throw t === "parquet" || t === "sql" ? U("loadTable", new Error(`Unsupported kind in JS runtime: ${t}`)) : U("loadTable", new Error(`Unsupported kind: ${t}`));
|
|
638
|
+
return jt(s, r, o);
|
|
639
639
|
}
|
|
640
|
-
async function
|
|
640
|
+
async function Gn(e, n = {}) {
|
|
641
641
|
const {
|
|
642
642
|
crs: t = null,
|
|
643
|
-
sourceColumnMap:
|
|
644
|
-
keepAll:
|
|
643
|
+
sourceColumnMap: r = null,
|
|
644
|
+
keepAll: o = !0,
|
|
645
645
|
...i
|
|
646
|
-
} = n,
|
|
647
|
-
if (!
|
|
648
|
-
throw
|
|
649
|
-
const l =
|
|
646
|
+
} = n, s = await Ce(e, { ...i, sourceColumnMap: r });
|
|
647
|
+
if (!s.some((m) => N in m))
|
|
648
|
+
throw U("loadCollars", new Error(`Collar table missing column: ${N}`));
|
|
649
|
+
const l = s.some((m) => pe in m && ge in m), u = s.some((m) => re in m && oe in m);
|
|
650
650
|
if (!l && !u)
|
|
651
|
-
throw
|
|
652
|
-
const c =
|
|
653
|
-
const f = { ...
|
|
654
|
-
if (
|
|
655
|
-
const
|
|
656
|
-
f[
|
|
651
|
+
throw U("loadCollars", new Error("Collar table missing coordinate columns (need easting/northing or latitude/longitude)"));
|
|
652
|
+
const c = s.map((m) => {
|
|
653
|
+
const f = { ...m };
|
|
654
|
+
if (N in f) {
|
|
655
|
+
const b = f[N];
|
|
656
|
+
f[N] = b == null ? "" : `${b}`.trim();
|
|
657
657
|
}
|
|
658
|
-
return
|
|
658
|
+
return re in f && (f[re] = Z(f[re])), oe in f && (f[oe] = Z(f[oe])), Ee in f && (f[Ee] = Z(f[Ee])), pe in f && (f[pe] = Z(f[pe])), ge in f && (f[ge] = Z(f[ge])), !("datasource_hole_id" in f) && N in f && (f.datasource_hole_id = f[N]), f;
|
|
659
659
|
});
|
|
660
|
-
if (!c.every((
|
|
661
|
-
throw
|
|
660
|
+
if (!c.every((m) => !(!m[N] || u && (!Number.isFinite(m[re]) || !Number.isFinite(m[oe])) || l && !u && (!Number.isFinite(m[pe]) || !Number.isFinite(m[ge])))))
|
|
661
|
+
throw U("loadCollars", new Error("Collar table has missing required values"));
|
|
662
662
|
return c;
|
|
663
663
|
}
|
|
664
|
-
async function
|
|
664
|
+
async function Bn(e, n = {}) {
|
|
665
665
|
const {
|
|
666
666
|
sourceColumnMap: t = null,
|
|
667
|
-
keepAll:
|
|
668
|
-
...
|
|
669
|
-
} = n, i = await
|
|
670
|
-
for (const u of
|
|
671
|
-
if (!i.some((
|
|
672
|
-
throw
|
|
667
|
+
keepAll: r = !0,
|
|
668
|
+
...o
|
|
669
|
+
} = n, i = await Ce(e, { ...o, sourceColumnMap: t }), s = [N, V, Y, W];
|
|
670
|
+
for (const u of s)
|
|
671
|
+
if (!i.some((d) => u in d))
|
|
672
|
+
throw U("loadSurveys", new Error(`Survey table missing column: ${u}`));
|
|
673
673
|
const a = i.map((u) => {
|
|
674
674
|
const c = { ...u };
|
|
675
|
-
if (
|
|
676
|
-
const
|
|
677
|
-
c[
|
|
675
|
+
if (N in c) {
|
|
676
|
+
const d = c[N];
|
|
677
|
+
c[N] = d == null ? "" : `${d}`.trim();
|
|
678
678
|
}
|
|
679
|
-
return
|
|
679
|
+
return V in c && (c[V] = Z(c[V])), O in c && (c[O] = Z(c[O])), Y in c && (c[Y] = Z(c[Y])), W in c && (c[W] = Z(c[W])), c;
|
|
680
680
|
});
|
|
681
|
-
if (!a.every((u) => !(!u[
|
|
682
|
-
throw
|
|
683
|
-
return Ne(a, [
|
|
681
|
+
if (!a.every((u) => !(!u[N] || !Number.isFinite(u[V]) || !Number.isFinite(u[Y]) || !Number.isFinite(u[W]))))
|
|
682
|
+
throw U("loadSurveys", new Error("Survey table has missing required values"));
|
|
683
|
+
return Ne(a, [N, V]);
|
|
684
684
|
}
|
|
685
|
-
async function
|
|
685
|
+
async function Vn(e, n = {}) {
|
|
686
686
|
const {
|
|
687
687
|
sourceColumnMap: t = null,
|
|
688
|
-
keepAll:
|
|
689
|
-
...
|
|
690
|
-
} = n, i = await
|
|
691
|
-
for (const u of
|
|
692
|
-
if (!i.some((
|
|
693
|
-
throw
|
|
688
|
+
keepAll: r = !0,
|
|
689
|
+
...o
|
|
690
|
+
} = n, i = await Ce(e, { ...o, sourceColumnMap: t }), s = [N, M, O];
|
|
691
|
+
for (const u of s)
|
|
692
|
+
if (!i.some((d) => u in d))
|
|
693
|
+
throw U("loadAssays", new Error(`Assay table missing column: ${u}`));
|
|
694
694
|
const a = i.map((u) => {
|
|
695
695
|
const c = { ...u };
|
|
696
|
-
if (
|
|
697
|
-
const
|
|
698
|
-
c[
|
|
696
|
+
if (N in c) {
|
|
697
|
+
const d = c[N];
|
|
698
|
+
c[N] = d == null ? "" : `${d}`.trim();
|
|
699
699
|
}
|
|
700
|
-
return
|
|
700
|
+
return M in c && (c[M] = Z(c[M])), O in c && (c[O] = Z(c[O])), M in c && O in c && Number.isFinite(c[M]) && Number.isFinite(c[O]) && (c[ve] = 0.5 * (c[M] + c[O])), c;
|
|
701
701
|
});
|
|
702
|
-
if (!a.every((u) => !(!u[
|
|
703
|
-
throw
|
|
704
|
-
return Ne(a, [
|
|
702
|
+
if (!a.every((u) => !(!u[N] || !Number.isFinite(u[M]) || !Number.isFinite(u[O]) || !(u[O] > u[M]))))
|
|
703
|
+
throw U("loadAssays", new Error("Assay table has missing required values"));
|
|
704
|
+
return Ne(a, [N, M, O]);
|
|
705
705
|
}
|
|
706
|
-
async function
|
|
706
|
+
async function jn(e, n = {}) {
|
|
707
707
|
const {
|
|
708
708
|
sourceColumnMap: t = null,
|
|
709
|
-
keepAll:
|
|
710
|
-
...
|
|
711
|
-
} = n, i = await
|
|
712
|
-
for (const c of
|
|
713
|
-
if (!i.some((
|
|
714
|
-
throw
|
|
709
|
+
keepAll: r = !0,
|
|
710
|
+
...o
|
|
711
|
+
} = n, i = await Ce(e, { ...o, sourceColumnMap: t }), s = [N, M, O];
|
|
712
|
+
for (const c of s)
|
|
713
|
+
if (!i.some((m) => c in m))
|
|
714
|
+
throw U("loadGeology", new Error(`Geology table missing column: ${c}`));
|
|
715
715
|
const a = i.map((c) => {
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
718
|
-
const
|
|
719
|
-
|
|
716
|
+
const d = { ...c };
|
|
717
|
+
if (N in d) {
|
|
718
|
+
const b = d[N];
|
|
719
|
+
d[N] = b == null ? "" : `${b}`.trim();
|
|
720
720
|
}
|
|
721
|
-
|
|
722
|
-
const
|
|
723
|
-
return !
|
|
721
|
+
M in d && (d[M] = Z(d[M])), O in d && (d[O] = Z(d[O])), M in d && O in d && Number.isFinite(d[M]) && Number.isFinite(d[O]) && (d[O] === d[M] && (d[M] = Math.round(d[M] * 1e3) / 1e3, d[O] = d[M] + 1e-3), d[ve] = 0.5 * (d[M] + d[O]));
|
|
722
|
+
const m = d[le] !== void 0 && d[le] !== null && `${d[le]}`.trim() !== "", f = d[ce] !== void 0 && d[ce] !== null && `${d[ce]}`.trim() !== "";
|
|
723
|
+
return !m && f && (d[le] = d[ce]), m && !f && (d[ce] = d[le]), d;
|
|
724
724
|
});
|
|
725
|
-
if (!a.every((c) => !(!c[
|
|
726
|
-
throw
|
|
725
|
+
if (!a.every((c) => !(!c[N] || !Number.isFinite(c[M]) || !Number.isFinite(c[O]) || !(c[O] > c[M]))))
|
|
726
|
+
throw U("loadGeology", new Error("Geology table has missing or invalid interval values"));
|
|
727
727
|
if (!a.some((c) => {
|
|
728
|
-
const
|
|
729
|
-
return
|
|
728
|
+
const d = c[le], m = c[ce];
|
|
729
|
+
return d != null && `${d}`.trim() !== "" || m != null && `${m}`.trim() !== "";
|
|
730
730
|
}))
|
|
731
|
-
throw
|
|
732
|
-
if (
|
|
733
|
-
const c = new Set(Object.keys(
|
|
731
|
+
throw U("loadGeology", new Error(`Geology table missing categorical columns: ${le} or ${ce}`));
|
|
732
|
+
if (Bt(a, "Geology"), !r) {
|
|
733
|
+
const c = new Set(Object.keys(Et));
|
|
734
734
|
return Ne(
|
|
735
|
-
a.map((
|
|
736
|
-
[
|
|
735
|
+
a.map((d) => Object.fromEntries(Object.entries(d).filter(([m]) => c.has(m)))),
|
|
736
|
+
[N, M, O]
|
|
737
737
|
);
|
|
738
738
|
}
|
|
739
|
-
return Ne(a, [
|
|
739
|
+
return Ne(a, [N, M, O]);
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
const
|
|
741
|
+
function Yn(e = [], n = [], t = {}) {
|
|
742
|
+
const r = Array.isArray(t.onCols) && t.onCols.length ? t.onCols : [N];
|
|
743
743
|
if (!n.length) return [...e];
|
|
744
|
-
const
|
|
745
|
-
return n.forEach((
|
|
746
|
-
i.set(
|
|
747
|
-
}), e.map((
|
|
748
|
-
const a = i.get(
|
|
749
|
-
if (!a) return { ...
|
|
750
|
-
const l = { ...
|
|
744
|
+
const o = (s) => r.map((a) => `${(s == null ? void 0 : s[a]) ?? ""}`).join("|"), i = /* @__PURE__ */ new Map();
|
|
745
|
+
return n.forEach((s) => {
|
|
746
|
+
i.set(o(s), s);
|
|
747
|
+
}), e.map((s) => {
|
|
748
|
+
const a = i.get(o(s));
|
|
749
|
+
if (!a) return { ...s };
|
|
750
|
+
const l = { ...s };
|
|
751
751
|
return Object.entries(a).forEach(([u, c]) => {
|
|
752
|
-
|
|
752
|
+
r.includes(u) || (Object.prototype.hasOwnProperty.call(l, u) ? l[`${u}_trace`] = c : l[u] = c);
|
|
753
753
|
}), l;
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
return n == null ? [...e] : e.length ? e.some((
|
|
756
|
+
function Wn(e = [], n = null) {
|
|
757
|
+
return n == null ? [...e] : e.length ? e.some((r) => de in r) ? e.filter((r) => (r == null ? void 0 : r[de]) === n) : [...e] : [];
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function qn(e = [], n = []) {
|
|
760
760
|
return e.map((t) => {
|
|
761
|
-
const
|
|
762
|
-
return n.forEach((
|
|
763
|
-
if (!(
|
|
764
|
-
const i = Z(
|
|
765
|
-
|
|
766
|
-
}),
|
|
761
|
+
const r = { ...t };
|
|
762
|
+
return n.forEach((o) => {
|
|
763
|
+
if (!(o in r)) return;
|
|
764
|
+
const i = Z(r[o]);
|
|
765
|
+
r[o] = i;
|
|
766
|
+
}), r;
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function Xn({
|
|
770
770
|
collars: e = [],
|
|
771
771
|
surveys: n = [],
|
|
772
772
|
assays: t = [],
|
|
773
|
-
geology:
|
|
774
|
-
structures:
|
|
773
|
+
geology: r = [],
|
|
774
|
+
structures: o = [],
|
|
775
775
|
metadata: i = {}
|
|
776
776
|
} = {}) {
|
|
777
777
|
return {
|
|
778
|
-
collars:
|
|
779
|
-
surveys:
|
|
780
|
-
assays:
|
|
781
|
-
geology:
|
|
782
|
-
structures:
|
|
778
|
+
collars: be(e),
|
|
779
|
+
surveys: be(n),
|
|
780
|
+
assays: be(t),
|
|
781
|
+
geology: be(r),
|
|
782
|
+
structures: be(o),
|
|
783
783
|
metadata: i || {}
|
|
784
784
|
};
|
|
785
785
|
}
|
|
786
786
|
const we = (e, n = null) => ie(e, null, n);
|
|
787
|
-
function
|
|
787
|
+
function Yt(e) {
|
|
788
788
|
if (!e.length) return null;
|
|
789
|
-
const n = e[0], t =
|
|
790
|
-
return t ? "interval" :
|
|
789
|
+
const n = e[0], t = M in n && O in n, r = V in n && !t;
|
|
790
|
+
return t ? "interval" : r ? "point" : null;
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function se(e) {
|
|
793
793
|
const n = Number(e);
|
|
794
794
|
return Number.isFinite(n) ? n : null;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
const n = e[
|
|
796
|
+
function at(e) {
|
|
797
|
+
const n = e[N] !== void 0 ? `${e[N]}`.trim() : "";
|
|
798
798
|
if (!n) return null;
|
|
799
|
-
const t =
|
|
799
|
+
const t = se(e[V]);
|
|
800
800
|
return t === null ? null : {
|
|
801
|
-
[
|
|
802
|
-
[
|
|
803
|
-
[
|
|
804
|
-
[
|
|
801
|
+
[N]: n,
|
|
802
|
+
[V]: t,
|
|
803
|
+
[W]: se(e[W]),
|
|
804
|
+
[Y]: se(e[Y]),
|
|
805
805
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
806
806
|
...e
|
|
807
807
|
};
|
|
808
808
|
}
|
|
809
|
-
function
|
|
810
|
-
const n = e[
|
|
809
|
+
function lt(e) {
|
|
810
|
+
const n = e[N] !== void 0 ? `${e[N]}`.trim() : "";
|
|
811
811
|
if (!n) return null;
|
|
812
|
-
const t =
|
|
813
|
-
if (t === null ||
|
|
814
|
-
const
|
|
812
|
+
const t = se(e[M]), r = se(e[O]);
|
|
813
|
+
if (t === null || r === null || r <= t) return null;
|
|
814
|
+
const o = 0.5 * (t + r);
|
|
815
815
|
return {
|
|
816
|
-
[
|
|
817
|
-
[
|
|
818
|
-
[
|
|
819
|
-
mid:
|
|
820
|
-
[
|
|
821
|
-
[
|
|
816
|
+
[N]: n,
|
|
817
|
+
[M]: t,
|
|
818
|
+
[O]: r,
|
|
819
|
+
mid: o,
|
|
820
|
+
[W]: se(e[W]),
|
|
821
|
+
[Y]: se(e[Y]),
|
|
822
822
|
classification: e.classification != null ? `${e.classification}` : null,
|
|
823
823
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
824
824
|
...e
|
|
825
825
|
};
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function Kn(e) {
|
|
828
828
|
const n = [], t = [];
|
|
829
|
-
for (const
|
|
830
|
-
const
|
|
831
|
-
i !== null && (i < 0 || i > 90) &&
|
|
829
|
+
for (const r of e) {
|
|
830
|
+
const o = [], i = se(r[W]), s = se(r[Y]);
|
|
831
|
+
i !== null && (i < 0 || i > 90) && o.push(`dip ${i} out of range [0, 90]`), s !== null && (s < 0 || s >= 360) && o.push(`azimuth ${s} out of range [0, 360)`), o.length ? t.push({ row: r, message: o.join("; ") }) : n.push(r);
|
|
832
832
|
}
|
|
833
833
|
return { valid: n, errors: t };
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
return new Promise((t,
|
|
837
|
-
const
|
|
835
|
+
function Zn(e, n = null) {
|
|
836
|
+
return new Promise((t, r) => {
|
|
837
|
+
const o = {
|
|
838
838
|
header: !0,
|
|
839
839
|
dynamicTyping: !0,
|
|
840
840
|
skipEmptyLines: !0,
|
|
841
841
|
complete: (i) => {
|
|
842
|
-
const
|
|
842
|
+
const s = [];
|
|
843
843
|
for (const a of i.data) {
|
|
844
|
-
const l = we(a, n), u =
|
|
845
|
-
u &&
|
|
844
|
+
const l = we(a, n), u = at(l);
|
|
845
|
+
u && s.push(u);
|
|
846
846
|
}
|
|
847
|
-
t(
|
|
847
|
+
t(s);
|
|
848
848
|
},
|
|
849
|
-
error: (i) =>
|
|
849
|
+
error: (i) => r(U("parseStructuralPointsCSV", i))
|
|
850
850
|
};
|
|
851
851
|
typeof e == "string" && !e.startsWith("data:") && e.includes(`
|
|
852
|
-
`) ? J.parse(e,
|
|
852
|
+
`) ? J.parse(e, o) : J.parse(e, o);
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
|
-
function
|
|
856
|
-
return new Promise((t,
|
|
855
|
+
function Jn(e, n = null) {
|
|
856
|
+
return new Promise((t, r) => {
|
|
857
857
|
J.parse(e, {
|
|
858
858
|
header: !0,
|
|
859
859
|
dynamicTyping: !0,
|
|
860
860
|
skipEmptyLines: !0,
|
|
861
|
-
complete: (
|
|
861
|
+
complete: (o) => {
|
|
862
862
|
const i = [];
|
|
863
|
-
for (const
|
|
864
|
-
const a = we(
|
|
863
|
+
for (const s of o.data) {
|
|
864
|
+
const a = we(s, n), l = lt(a);
|
|
865
865
|
l && i.push(l);
|
|
866
866
|
}
|
|
867
867
|
t(i);
|
|
868
868
|
},
|
|
869
|
-
error: (
|
|
869
|
+
error: (o) => r(U("parseStructuralIntervalsCSV", o))
|
|
870
870
|
});
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Wt(e, n = N) {
|
|
874
874
|
const t = /* @__PURE__ */ new Map();
|
|
875
|
-
for (const
|
|
876
|
-
const
|
|
877
|
-
|
|
875
|
+
for (const r of e) {
|
|
876
|
+
const o = r[n] != null ? String(r[n]).trim() : "";
|
|
877
|
+
o && (t.has(o) || t.set(o, { holeId: o, points: [] }), t.get(o).points.push(r));
|
|
878
878
|
}
|
|
879
879
|
return Array.from(t.values());
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
return new Promise((t,
|
|
881
|
+
function qt(e, n = null) {
|
|
882
|
+
return new Promise((t, r) => {
|
|
883
883
|
J.parse(e, {
|
|
884
884
|
header: !0,
|
|
885
885
|
dynamicTyping: !0,
|
|
886
886
|
skipEmptyLines: !0,
|
|
887
|
-
complete: (
|
|
888
|
-
const i =
|
|
889
|
-
if (!
|
|
890
|
-
|
|
887
|
+
complete: (o) => {
|
|
888
|
+
const i = o.data.map((l) => we(l, n)), s = Yt(i);
|
|
889
|
+
if (!s) {
|
|
890
|
+
r(U(
|
|
891
891
|
"parseStructuralCSV",
|
|
892
892
|
new Error("Structural CSV requires either 'depth' (point) or 'from'/'to' (interval) columns")
|
|
893
893
|
));
|
|
@@ -895,283 +895,283 @@ function Gt(e, n = null) {
|
|
|
895
895
|
}
|
|
896
896
|
const a = [];
|
|
897
897
|
for (const l of i) {
|
|
898
|
-
const u =
|
|
898
|
+
const u = s === "interval" ? lt(l) : at(l);
|
|
899
899
|
u && a.push(u);
|
|
900
900
|
}
|
|
901
|
-
t({ schema:
|
|
901
|
+
t({ schema: s, rows: a });
|
|
902
902
|
},
|
|
903
|
-
error: (
|
|
903
|
+
error: (o) => r(U("parseStructuralCSV", o))
|
|
904
904
|
});
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function Xt(e) {
|
|
908
908
|
return new Promise((n) => {
|
|
909
909
|
J.parse(e, {
|
|
910
910
|
header: !0,
|
|
911
911
|
dynamicTyping: !0,
|
|
912
912
|
skipEmptyLines: !0,
|
|
913
913
|
complete: (t) => {
|
|
914
|
-
const
|
|
914
|
+
const r = /* @__PURE__ */ new Map();
|
|
915
915
|
for (const i of t.data) {
|
|
916
|
-
const
|
|
916
|
+
const s = ie(i), a = s[N] != null ? `${s[N]}`.trim() : "";
|
|
917
917
|
if (!a) continue;
|
|
918
|
-
const l = Number(
|
|
918
|
+
const l = Number(s[M]), u = Number(s[O]);
|
|
919
919
|
if (!Number.isFinite(l) || !Number.isFinite(u) || u <= l) continue;
|
|
920
|
-
const c = (l + u) / 2, { [
|
|
920
|
+
const c = (l + u) / 2, { [W]: d, [Y]: m, ...f } = s, b = {
|
|
921
921
|
...f,
|
|
922
|
-
[
|
|
923
|
-
[
|
|
924
|
-
[
|
|
925
|
-
[
|
|
926
|
-
[
|
|
922
|
+
[N]: a,
|
|
923
|
+
[M]: l,
|
|
924
|
+
[O]: u,
|
|
925
|
+
[ve]: c,
|
|
926
|
+
[V]: c,
|
|
927
927
|
// unified depth field for y-axis rendering
|
|
928
928
|
_source: "assay"
|
|
929
929
|
};
|
|
930
|
-
|
|
930
|
+
r.has(a) || r.set(a, []), r.get(a).push(b);
|
|
931
931
|
}
|
|
932
|
-
const
|
|
932
|
+
const o = Array.from(r.entries()).map(([i, s]) => ({
|
|
933
933
|
holeId: i,
|
|
934
|
-
points:
|
|
934
|
+
points: s.sort((a, l) => a[M] - l[M])
|
|
935
935
|
}));
|
|
936
|
-
n(
|
|
936
|
+
n(o);
|
|
937
937
|
}
|
|
938
938
|
});
|
|
939
939
|
});
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function Kt(e) {
|
|
942
942
|
return new Promise((n) => {
|
|
943
943
|
J.parse(e, {
|
|
944
944
|
header: !0,
|
|
945
945
|
dynamicTyping: !0,
|
|
946
946
|
skipEmptyLines: !0,
|
|
947
947
|
complete: (t) => {
|
|
948
|
-
const
|
|
949
|
-
for (const
|
|
950
|
-
const i = ie(
|
|
951
|
-
if (!
|
|
952
|
-
const a = Number(i[
|
|
948
|
+
const r = /* @__PURE__ */ new Map();
|
|
949
|
+
for (const o of t.data) {
|
|
950
|
+
const i = ie(o), s = (i[N] ?? "").toString().trim();
|
|
951
|
+
if (!s) continue;
|
|
952
|
+
const a = Number(i[M]), l = Number(i[O]);
|
|
953
953
|
if (!Number.isFinite(a) || !Number.isFinite(l) || l <= a) continue;
|
|
954
|
-
const u = (a + l) / 2, { [
|
|
955
|
-
...
|
|
956
|
-
[
|
|
957
|
-
[
|
|
958
|
-
[
|
|
959
|
-
[
|
|
960
|
-
[
|
|
954
|
+
const u = (a + l) / 2, { [W]: c, [Y]: d, ...m } = i, f = {
|
|
955
|
+
...m,
|
|
956
|
+
[N]: s,
|
|
957
|
+
[M]: a,
|
|
958
|
+
[O]: l,
|
|
959
|
+
[ve]: u,
|
|
960
|
+
[V]: u,
|
|
961
961
|
_source: "geology"
|
|
962
962
|
};
|
|
963
|
-
|
|
963
|
+
r.has(s) || r.set(s, []), r.get(s).push(f);
|
|
964
964
|
}
|
|
965
965
|
n({
|
|
966
|
-
holes: Array.from(
|
|
967
|
-
holeId:
|
|
968
|
-
points: i.sort((
|
|
966
|
+
holes: Array.from(r.entries()).map(([o, i]) => ({
|
|
967
|
+
holeId: o,
|
|
968
|
+
points: i.sort((s, a) => s[M] - a[M])
|
|
969
969
|
}))
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
972
|
});
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
|
-
async function
|
|
976
|
-
const [
|
|
977
|
-
e ?
|
|
978
|
-
n ?
|
|
979
|
-
({ rows: a }) =>
|
|
975
|
+
async function Qn({ assayCsv: e, structuralCsv: n, geologyCsv: t } = {}) {
|
|
976
|
+
const [r, o, i] = await Promise.all([
|
|
977
|
+
e ? Xt(e) : Promise.resolve([]),
|
|
978
|
+
n ? qt(n).then(
|
|
979
|
+
({ rows: a }) => Wt(a.map((l) => ({ ...l, _source: "structural" })))
|
|
980
980
|
) : Promise.resolve([]),
|
|
981
|
-
t ?
|
|
982
|
-
]),
|
|
983
|
-
for (const a of [...
|
|
981
|
+
t ? Kt(t).then(({ holes: a }) => a) : Promise.resolve([])
|
|
982
|
+
]), s = new Map(r.map((a) => [a.holeId, { ...a, points: [...a.points] }]));
|
|
983
|
+
for (const a of [...o, ...i]) {
|
|
984
984
|
const l = a.holeId;
|
|
985
985
|
if (l)
|
|
986
|
-
if (
|
|
987
|
-
const u =
|
|
988
|
-
|
|
986
|
+
if (s.has(l)) {
|
|
987
|
+
const u = s.get(l);
|
|
988
|
+
s.set(l, { ...u, points: [...u.points, ...a.points || []] });
|
|
989
989
|
} else
|
|
990
|
-
|
|
990
|
+
s.set(l, a);
|
|
991
991
|
}
|
|
992
|
-
return { holes: Array.from(
|
|
992
|
+
return { holes: Array.from(s.values()) };
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
const i =
|
|
994
|
+
function er(e, n, t, r, o = {}) {
|
|
995
|
+
const i = o.fromCol || "from", s = o.toCol || "to", a = o.holeCol || "hole_id";
|
|
996
996
|
if (!e || !e.length) return [];
|
|
997
997
|
const l = {};
|
|
998
998
|
for (const c of e) {
|
|
999
|
-
const
|
|
1000
|
-
|
|
999
|
+
const d = c[a];
|
|
1000
|
+
d != null && (l[d] || (l[d] = []), l[d].push(c));
|
|
1001
1001
|
}
|
|
1002
1002
|
const u = [];
|
|
1003
|
-
for (const [c,
|
|
1004
|
-
const f = [...
|
|
1005
|
-
const
|
|
1006
|
-
return Number.isFinite(
|
|
1003
|
+
for (const [c, d] of Object.entries(l)) {
|
|
1004
|
+
const f = [...d].sort((g, L) => Number(g[i]) - Number(L[i])).filter((g) => {
|
|
1005
|
+
const L = Number(g[n]);
|
|
1006
|
+
return Number.isFinite(L) && L >= t;
|
|
1007
1007
|
});
|
|
1008
1008
|
if (!f.length) continue;
|
|
1009
|
-
const
|
|
1010
|
-
let
|
|
1011
|
-
for (const
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1009
|
+
const b = [];
|
|
1010
|
+
let p = [], v = null;
|
|
1011
|
+
for (const g of f) {
|
|
1012
|
+
const L = Number(g[i]), C = Number(g[s]);
|
|
1013
|
+
v === null || Math.abs(L - v) > 1e-6 ? (p.length && b.push(p), p = [g]) : p.push(g), v = C;
|
|
1014
1014
|
}
|
|
1015
|
-
|
|
1016
|
-
for (const
|
|
1017
|
-
const
|
|
1018
|
-
if (
|
|
1019
|
-
let H = 0,
|
|
1020
|
-
for (const
|
|
1021
|
-
const
|
|
1022
|
-
H +=
|
|
1015
|
+
p.length && b.push(p);
|
|
1016
|
+
for (const g of b) {
|
|
1017
|
+
const L = Number(g[0][i]), C = Number(g[g.length - 1][s]), j = C - L;
|
|
1018
|
+
if (j < r) continue;
|
|
1019
|
+
let H = 0, $ = 0;
|
|
1020
|
+
for (const h of g) {
|
|
1021
|
+
const P = Number(h[n]), A = Number(h[s]) - Number(h[i]);
|
|
1022
|
+
H += P * A, $ += A;
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1024
|
+
const D = H / $, R = g.length, G = `${j.toFixed(1)} m @ ${D.toFixed(2)} ${n}`;
|
|
1025
1025
|
u.push({
|
|
1026
1026
|
[a]: c,
|
|
1027
1027
|
assay_field: n,
|
|
1028
|
-
[i]:
|
|
1029
|
-
[
|
|
1030
|
-
length:
|
|
1031
|
-
avg_grade:
|
|
1028
|
+
[i]: L,
|
|
1029
|
+
[s]: C,
|
|
1030
|
+
length: j,
|
|
1031
|
+
avg_grade: D,
|
|
1032
1032
|
n_samples: R,
|
|
1033
|
-
label:
|
|
1033
|
+
label: G
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
return u;
|
|
1038
1038
|
}
|
|
1039
|
-
const
|
|
1040
|
-
function
|
|
1041
|
-
if (e[
|
|
1042
|
-
const
|
|
1043
|
-
if (Number.isFinite(
|
|
1039
|
+
const ct = ["depth", "md", "measured_depth", "dept", "z"];
|
|
1040
|
+
function Zt(e) {
|
|
1041
|
+
if (e[V] !== void 0) {
|
|
1042
|
+
const r = Number(e[V]);
|
|
1043
|
+
if (Number.isFinite(r)) return r;
|
|
1044
1044
|
}
|
|
1045
|
-
for (const
|
|
1046
|
-
if (e[
|
|
1047
|
-
const
|
|
1048
|
-
if (Number.isFinite(
|
|
1045
|
+
for (const r of ct)
|
|
1046
|
+
if (e[r] !== void 0) {
|
|
1047
|
+
const o = Number(e[r]);
|
|
1048
|
+
if (Number.isFinite(o)) return o;
|
|
1049
1049
|
}
|
|
1050
|
-
const n = Number(e[
|
|
1050
|
+
const n = Number(e[M]), t = Number(e[O]);
|
|
1051
1051
|
return Number.isFinite(n) && Number.isFinite(t) && t >= n ? (n + t) / 2 : null;
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function Jt(e) {
|
|
1054
1054
|
if (e.length === 0) return [];
|
|
1055
|
-
const n = /* @__PURE__ */ new Set([
|
|
1056
|
-
return Object.keys(e[0]).filter((
|
|
1057
|
-
let
|
|
1055
|
+
const n = /* @__PURE__ */ new Set([N, V, M, O, ve, ...ct]);
|
|
1056
|
+
return Object.keys(e[0]).filter((r) => !n.has(r)).filter((r) => {
|
|
1057
|
+
let o = 0;
|
|
1058
1058
|
for (const i of e) {
|
|
1059
|
-
const
|
|
1060
|
-
Number.isFinite(
|
|
1059
|
+
const s = Number(i[r]);
|
|
1060
|
+
Number.isFinite(s) && o++;
|
|
1061
1061
|
}
|
|
1062
|
-
return
|
|
1062
|
+
return o / e.length > 0.5;
|
|
1063
1063
|
});
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const
|
|
1065
|
+
function tr(e, n = null) {
|
|
1066
|
+
const r = J.parse(e, {
|
|
1067
1067
|
header: !0,
|
|
1068
1068
|
skipEmptyLines: !0,
|
|
1069
1069
|
dynamicTyping: !1
|
|
1070
1070
|
}).data || [];
|
|
1071
|
-
if (
|
|
1072
|
-
const
|
|
1073
|
-
for (const l of
|
|
1074
|
-
const u = l[
|
|
1071
|
+
if (r.length === 0) return [];
|
|
1072
|
+
const o = r.map((l) => ie(l, null, n)), i = Jt(o), s = /* @__PURE__ */ new Map();
|
|
1073
|
+
for (const l of o) {
|
|
1074
|
+
const u = l[N] != null ? `${l[N]}`.trim() : "";
|
|
1075
1075
|
if (!u) continue;
|
|
1076
|
-
const c =
|
|
1077
|
-
c === null || c < 0 || (
|
|
1076
|
+
const c = Zt(l);
|
|
1077
|
+
c === null || c < 0 || (s.has(u) || s.set(u, []), s.get(u).push({ depth: c, row: l }));
|
|
1078
1078
|
}
|
|
1079
1079
|
const a = [];
|
|
1080
|
-
for (const [l, u] of
|
|
1081
|
-
u.sort((
|
|
1080
|
+
for (const [l, u] of s) {
|
|
1081
|
+
u.sort((d, m) => d.depth - m.depth);
|
|
1082
1082
|
const c = {};
|
|
1083
|
-
for (const
|
|
1084
|
-
const
|
|
1085
|
-
for (const { depth:
|
|
1086
|
-
const
|
|
1087
|
-
Number.isFinite(
|
|
1083
|
+
for (const d of i) {
|
|
1084
|
+
const m = [], f = [];
|
|
1085
|
+
for (const { depth: b, row: p } of u) {
|
|
1086
|
+
const v = Number(p[d]);
|
|
1087
|
+
Number.isFinite(v) && v !== et && (m.push(b), f.push(v));
|
|
1088
1088
|
}
|
|
1089
|
-
|
|
1089
|
+
m.length >= 2 && (c[d] = { depths: m, values: f });
|
|
1090
1090
|
}
|
|
1091
1091
|
Object.keys(c).length > 0 && a.push({ holeId: l, channels: c });
|
|
1092
1092
|
}
|
|
1093
1093
|
return a;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1096
|
-
const
|
|
1097
|
-
for (const { holeId:
|
|
1098
|
-
const
|
|
1099
|
-
if (!
|
|
1100
|
-
const { depths: a, values: l } = i[
|
|
1101
|
-
|
|
1095
|
+
function nr(e, n = null, t = {}) {
|
|
1096
|
+
const r = [];
|
|
1097
|
+
for (const { holeId: o, channels: i } of e) {
|
|
1098
|
+
const s = n && i[n] ? n : Object.keys(i)[0];
|
|
1099
|
+
if (!s) continue;
|
|
1100
|
+
const { depths: a, values: l } = i[s];
|
|
1101
|
+
r.push({ holeId: o, depths: a, values: l, options: t });
|
|
1102
1102
|
}
|
|
1103
|
-
return
|
|
1103
|
+
return r;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function ut(e) {
|
|
1106
1106
|
const n = e.indexOf(".");
|
|
1107
1107
|
if (n < 0) return null;
|
|
1108
|
-
const t = e.slice(0, n).trim().toUpperCase(),
|
|
1108
|
+
const t = e.slice(0, n).trim().toUpperCase(), r = e.slice(n + 1), o = r.match(/^(\S*)\s*(.*)/s), i = o ? o[1] : "", s = o ? o[2] : r, a = s.lastIndexOf(":"), l = a >= 0 ? s.slice(0, a).trim() : s.trim(), u = a >= 0 ? s.slice(a + 1).trim() : "";
|
|
1109
1109
|
return { mnem: t, unit: i, value: l, description: u };
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Qt(e) {
|
|
1112
1112
|
const n = [];
|
|
1113
1113
|
let t = null;
|
|
1114
|
-
for (const
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1114
|
+
for (const r of e.split(/\r?\n/)) {
|
|
1115
|
+
const o = r.trimEnd();
|
|
1116
|
+
o.startsWith("~") ? (t = { type: o.slice(1, 2).toUpperCase(), lines: [] }, n.push(t)) : t && t.lines.push(o);
|
|
1117
1117
|
}
|
|
1118
1118
|
return n;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function Ye(e = []) {
|
|
1121
1121
|
const n = {};
|
|
1122
1122
|
for (const t of e) {
|
|
1123
|
-
const
|
|
1124
|
-
if (!
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1123
|
+
const r = t.trimStart();
|
|
1124
|
+
if (!r || r.startsWith("#")) continue;
|
|
1125
|
+
const o = ut(t);
|
|
1126
|
+
o && (n[o.mnem] = o);
|
|
1127
1127
|
}
|
|
1128
1128
|
return n;
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1131
|
-
var
|
|
1132
|
-
const t =
|
|
1133
|
-
if (!
|
|
1134
|
-
const a =
|
|
1135
|
-
for (const
|
|
1136
|
-
const
|
|
1137
|
-
if (!
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1130
|
+
function rr(e, n = {}) {
|
|
1131
|
+
var g, L, C, j, H, $, D, R, G;
|
|
1132
|
+
const t = Qt(e), r = t.find((h) => h.type === "V"), o = t.find((h) => h.type === "W"), i = t.find((h) => h.type === "C"), s = t.find((h) => h.type === "A");
|
|
1133
|
+
if (!s) return [];
|
|
1134
|
+
const a = Ye(r == null ? void 0 : r.lines), l = Ye(o == null ? void 0 : o.lines), u = [];
|
|
1135
|
+
for (const h of (i == null ? void 0 : i.lines) ?? []) {
|
|
1136
|
+
const P = h.trimStart();
|
|
1137
|
+
if (!P || P.startsWith("#")) continue;
|
|
1138
|
+
const A = ut(h);
|
|
1139
|
+
A && u.push(A);
|
|
1140
1140
|
}
|
|
1141
|
-
(((
|
|
1141
|
+
(((L = (g = a.WRAP) == null ? void 0 : g.value) == null ? void 0 : L.trim().toUpperCase()) ?? "NO") === "YES" && console.warn(
|
|
1142
1142
|
"parseLasFile: WRAP YES is not supported. Data rows may be read incorrectly."
|
|
1143
1143
|
);
|
|
1144
|
-
const
|
|
1145
|
-
let
|
|
1146
|
-
if ((
|
|
1147
|
-
const
|
|
1148
|
-
Number.isFinite(
|
|
1144
|
+
const d = n.holeId ?? (((j = (C = l.WELL) == null ? void 0 : C.value) == null ? void 0 : j.trim()) || null) ?? ((($ = (H = l.UWI) == null ? void 0 : H.value) == null ? void 0 : $.trim()) || null) ?? (((R = (D = l.API) == null ? void 0 : D.value) == null ? void 0 : R.trim()) || null) ?? "unknown";
|
|
1145
|
+
let m = et;
|
|
1146
|
+
if ((G = l.NULL) != null && G.value) {
|
|
1147
|
+
const h = Number(l.NULL.value);
|
|
1148
|
+
Number.isFinite(h) && (m = h);
|
|
1149
1149
|
}
|
|
1150
|
-
if (n.nullSentinel !== void 0 && (
|
|
1151
|
-
const f = u.slice(1),
|
|
1152
|
-
for (const { mnem:
|
|
1153
|
-
|
|
1154
|
-
const
|
|
1155
|
-
for (const { mnem:
|
|
1156
|
-
|
|
1157
|
-
for (const
|
|
1158
|
-
const
|
|
1159
|
-
if (!
|
|
1160
|
-
const
|
|
1161
|
-
if (
|
|
1162
|
-
const z = Number(
|
|
1163
|
-
if (!(!Number.isFinite(z) || z ===
|
|
1164
|
-
for (let
|
|
1165
|
-
const
|
|
1166
|
-
Number.isFinite(
|
|
1150
|
+
if (n.nullSentinel !== void 0 && (m = n.nullSentinel), u.length === 0) return [];
|
|
1151
|
+
const f = u.slice(1), b = {};
|
|
1152
|
+
for (const { mnem: h, unit: P } of f)
|
|
1153
|
+
b[h.toLowerCase()] = P;
|
|
1154
|
+
const p = {};
|
|
1155
|
+
for (const { mnem: h } of f)
|
|
1156
|
+
p[h.toLowerCase()] = { depths: [], values: [] };
|
|
1157
|
+
for (const h of s.lines) {
|
|
1158
|
+
const P = h.trimStart();
|
|
1159
|
+
if (!P || P.startsWith("#")) continue;
|
|
1160
|
+
const A = P.split(/\s+/);
|
|
1161
|
+
if (A.length < 2) continue;
|
|
1162
|
+
const z = Number(A[0]);
|
|
1163
|
+
if (!(!Number.isFinite(z) || z === m))
|
|
1164
|
+
for (let E = 0; E < f.length; E++) {
|
|
1165
|
+
const _ = f[E].mnem.toLowerCase(), y = Number(A[E + 1]);
|
|
1166
|
+
Number.isFinite(y) && y !== m && (p[_].depths.push(z), p[_].values.push(y));
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
const
|
|
1170
|
-
for (const [
|
|
1171
|
-
|
|
1172
|
-
return Object.keys(
|
|
1169
|
+
const v = {};
|
|
1170
|
+
for (const [h, P] of Object.entries(p))
|
|
1171
|
+
P.depths.length >= 2 && (v[h] = P);
|
|
1172
|
+
return Object.keys(v).length === 0 ? [] : [{ holeId: d, units: b, channels: v }];
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1174
|
+
const dt = [
|
|
1175
1175
|
"#0f172a",
|
|
1176
1176
|
"#1e3a5f",
|
|
1177
1177
|
"#7c3aed",
|
|
@@ -1182,25 +1182,26 @@ const ct = [
|
|
|
1182
1182
|
"#db2777",
|
|
1183
1183
|
"#65a30d",
|
|
1184
1184
|
"#9333ea"
|
|
1185
|
-
],
|
|
1186
|
-
function
|
|
1185
|
+
], en = { l: 42, r: 4, t: 4, b: 36 }, We = 10, qe = 11, tn = 6;
|
|
1186
|
+
function mt(e = {}) {
|
|
1187
1187
|
return {
|
|
1188
1188
|
...e,
|
|
1189
|
-
margin:
|
|
1189
|
+
margin: en,
|
|
1190
1190
|
autosize: !0,
|
|
1191
1191
|
width: void 0,
|
|
1192
1192
|
xaxis: {
|
|
1193
1193
|
...e.xaxis || {},
|
|
1194
1194
|
tickfont: {
|
|
1195
1195
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1196
|
-
size:
|
|
1196
|
+
size: We
|
|
1197
1197
|
},
|
|
1198
1198
|
title: {
|
|
1199
1199
|
...e.xaxis && e.xaxis.title || {},
|
|
1200
1200
|
font: {
|
|
1201
1201
|
...e.xaxis && e.xaxis.title && e.xaxis.title.font || {},
|
|
1202
|
-
size:
|
|
1203
|
-
}
|
|
1202
|
+
size: qe
|
|
1203
|
+
},
|
|
1204
|
+
standoff: (e.xaxis && e.xaxis.title && e.xaxis.title.standoff) ?? tn
|
|
1204
1205
|
}
|
|
1205
1206
|
},
|
|
1206
1207
|
yaxis: {
|
|
@@ -1208,67 +1209,67 @@ function ut(e = {}) {
|
|
|
1208
1209
|
automargin: !0,
|
|
1209
1210
|
tickfont: {
|
|
1210
1211
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1211
|
-
size:
|
|
1212
|
+
size: We
|
|
1212
1213
|
},
|
|
1213
1214
|
title: {
|
|
1214
1215
|
...e.yaxis && e.yaxis.title || {},
|
|
1215
1216
|
font: {
|
|
1216
1217
|
...e.yaxis && e.yaxis.title && e.yaxis.title.font || {},
|
|
1217
|
-
size:
|
|
1218
|
+
size: qe
|
|
1218
1219
|
}
|
|
1219
1220
|
}
|
|
1220
1221
|
}
|
|
1221
1222
|
};
|
|
1222
1223
|
}
|
|
1223
|
-
function
|
|
1224
|
+
function nn(e, {
|
|
1224
1225
|
tailScale: n = 5,
|
|
1225
1226
|
colorBy: t = null,
|
|
1226
|
-
palette:
|
|
1227
|
-
depthCol:
|
|
1228
|
-
dipCol: i =
|
|
1229
|
-
azCol:
|
|
1227
|
+
palette: r = dt,
|
|
1228
|
+
depthCol: o = V,
|
|
1229
|
+
dipCol: i = W,
|
|
1230
|
+
azCol: s = Y,
|
|
1230
1231
|
template: a = void 0
|
|
1231
1232
|
} = {}) {
|
|
1232
1233
|
const l = e.filter(
|
|
1233
|
-
(
|
|
1234
|
+
(p) => p[o] != null && p[i] != null && p[s] != null
|
|
1234
1235
|
);
|
|
1235
1236
|
if (!l.length)
|
|
1236
1237
|
return { data: [], layout: {} };
|
|
1237
1238
|
const u = {};
|
|
1238
|
-
t && [...new Set(l.map((
|
|
1239
|
-
u[
|
|
1239
|
+
t && [...new Set(l.map((v) => v[t]).filter((v) => v != null))].sort().forEach((v, g) => {
|
|
1240
|
+
u[v] = r[g % r.length];
|
|
1240
1241
|
});
|
|
1241
|
-
const c = /* @__PURE__ */ new Map(),
|
|
1242
|
-
for (const
|
|
1243
|
-
const
|
|
1244
|
-
c.has(
|
|
1245
|
-
const H = c.get(
|
|
1246
|
-
H.xs.push(
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1242
|
+
const c = /* @__PURE__ */ new Map(), d = [];
|
|
1243
|
+
for (const p of l) {
|
|
1244
|
+
const v = Number(p[o]), g = Number(p[i]), L = Number(p[s]), C = t ? p[t] ?? "_default" : "_default", j = t ? u[C] ?? "#0f172a" : "#0f172a";
|
|
1245
|
+
c.has(C) || c.set(C, { xs: [], ys: [], dips: [], azs: [], color: j });
|
|
1246
|
+
const H = c.get(C);
|
|
1247
|
+
H.xs.push(g), H.ys.push(v), H.dips.push(g), H.azs.push(L);
|
|
1248
|
+
const $ = L * Math.PI / 180, D = n * (Math.abs(g) / 90), R = Math.sin($) * D, G = Math.cos($) * D;
|
|
1249
|
+
d.push({
|
|
1249
1250
|
type: "line",
|
|
1250
|
-
x0:
|
|
1251
|
-
y0:
|
|
1252
|
-
x1:
|
|
1253
|
-
y1:
|
|
1254
|
-
line: { color:
|
|
1251
|
+
x0: g,
|
|
1252
|
+
y0: v,
|
|
1253
|
+
x1: g + R,
|
|
1254
|
+
y1: v + G,
|
|
1255
|
+
line: { color: j, width: 2 }
|
|
1255
1256
|
});
|
|
1256
1257
|
}
|
|
1257
|
-
const
|
|
1258
|
-
for (const [
|
|
1259
|
-
|
|
1258
|
+
const m = [], f = t && c.size > 1;
|
|
1259
|
+
for (const [p, v] of c.entries())
|
|
1260
|
+
m.push({
|
|
1260
1261
|
type: "scatter",
|
|
1261
|
-
x:
|
|
1262
|
-
y:
|
|
1262
|
+
x: v.xs,
|
|
1263
|
+
y: v.ys,
|
|
1263
1264
|
mode: "markers",
|
|
1264
|
-
name:
|
|
1265
|
-
marker: { size: 8, color:
|
|
1266
|
-
showlegend: f &&
|
|
1267
|
-
customdata:
|
|
1265
|
+
name: p !== "_default" ? String(p) : void 0,
|
|
1266
|
+
marker: { size: 8, color: v.color },
|
|
1267
|
+
showlegend: f && p !== "_default",
|
|
1268
|
+
customdata: v.dips.map((g, L) => [g, v.azs[L]]),
|
|
1268
1269
|
hovertemplate: "Depth: %{y}<br>Dip: %{customdata[0]}<br>Az: %{customdata[1]}<extra></extra>"
|
|
1269
1270
|
});
|
|
1270
|
-
return { data:
|
|
1271
|
-
shapes:
|
|
1271
|
+
return { data: m, layout: {
|
|
1272
|
+
shapes: d,
|
|
1272
1273
|
height: 400,
|
|
1273
1274
|
margin: { l: 40, r: 10, t: 10, b: 40 },
|
|
1274
1275
|
xaxis: {
|
|
@@ -1283,35 +1284,35 @@ function Xt(e, {
|
|
|
1283
1284
|
template: a !== void 0 ? a : $e
|
|
1284
1285
|
} };
|
|
1285
1286
|
}
|
|
1286
|
-
function
|
|
1287
|
+
function or(e, {
|
|
1287
1288
|
labelCol: n = "structure_type",
|
|
1288
|
-
palette: t =
|
|
1289
|
-
fromCol:
|
|
1290
|
-
toCol:
|
|
1289
|
+
palette: t = dt,
|
|
1290
|
+
fromCol: r = M,
|
|
1291
|
+
toCol: o = O,
|
|
1291
1292
|
template: i = void 0
|
|
1292
1293
|
} = {}) {
|
|
1293
|
-
const
|
|
1294
|
-
const f =
|
|
1294
|
+
const s = e.filter((m) => m[r] != null && m[o] != null && Number(m[o]) > Number(m[r])).filter((m) => {
|
|
1295
|
+
const f = m[n];
|
|
1295
1296
|
if (f == null) return !1;
|
|
1296
|
-
const
|
|
1297
|
-
return
|
|
1298
|
-
}).map((
|
|
1299
|
-
if (!
|
|
1297
|
+
const b = String(f).trim();
|
|
1298
|
+
return b !== "" && !/^(nan|null|none)$/i.test(b);
|
|
1299
|
+
}).map((m) => ({ from: Number(m[r]), to: Number(m[o]), label: String(m[n]).trim() })).sort((m, f) => m.from - f.from);
|
|
1300
|
+
if (!s.length)
|
|
1300
1301
|
return { data: [], layout: {} };
|
|
1301
1302
|
const a = [], l = [], u = [];
|
|
1302
|
-
return
|
|
1303
|
+
return s.forEach((m, f) => {
|
|
1303
1304
|
a.push({
|
|
1304
1305
|
type: "rect",
|
|
1305
1306
|
xref: "x",
|
|
1306
1307
|
yref: "y",
|
|
1307
1308
|
x0: 0,
|
|
1308
1309
|
x1: 1,
|
|
1309
|
-
y0:
|
|
1310
|
-
y1:
|
|
1310
|
+
y0: m.from,
|
|
1311
|
+
y1: m.to,
|
|
1311
1312
|
fillcolor: t[f % t.length],
|
|
1312
1313
|
line: { width: 0 },
|
|
1313
1314
|
layer: "below"
|
|
1314
|
-
}), l.push(0.5 * (
|
|
1315
|
+
}), l.push(0.5 * (m.from + m.to)), u.push(m.label);
|
|
1315
1316
|
}), { data: [{
|
|
1316
1317
|
type: "scatter",
|
|
1317
1318
|
x: Array(u.length).fill(0.5),
|
|
@@ -1321,7 +1322,7 @@ function Wn(e, {
|
|
|
1321
1322
|
textposition: "middle center",
|
|
1322
1323
|
showlegend: !1,
|
|
1323
1324
|
hoverinfo: "text"
|
|
1324
|
-
}], layout:
|
|
1325
|
+
}], layout: mt({
|
|
1325
1326
|
shapes: a,
|
|
1326
1327
|
height: 400,
|
|
1327
1328
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
@@ -1332,56 +1333,56 @@ function Wn(e, {
|
|
|
1332
1333
|
}
|
|
1333
1334
|
function Xe(e, n) {
|
|
1334
1335
|
if (!e) return "";
|
|
1335
|
-
const t = String(e).trim().split(/\s+/),
|
|
1336
|
-
let
|
|
1336
|
+
const t = String(e).trim().split(/\s+/), r = [];
|
|
1337
|
+
let o = "";
|
|
1337
1338
|
for (const i of t)
|
|
1338
|
-
|
|
1339
|
-
return
|
|
1339
|
+
o && o.length + 1 + i.length > n ? (r.push(o), o = i) : o = o ? `${o} ${i}` : i;
|
|
1340
|
+
return o && r.push(o), r.join("<br>");
|
|
1340
1341
|
}
|
|
1341
|
-
function
|
|
1342
|
+
function rn(e, {
|
|
1342
1343
|
commentCol: n = "comments",
|
|
1343
|
-
fromCol: t =
|
|
1344
|
-
toCol:
|
|
1345
|
-
bgColor:
|
|
1344
|
+
fromCol: t = M,
|
|
1345
|
+
toCol: r = O,
|
|
1346
|
+
bgColor: o = "#f1f5f9",
|
|
1346
1347
|
borderColor: i = "#cbd5e1",
|
|
1347
|
-
textColor:
|
|
1348
|
+
textColor: s = "#1e293b",
|
|
1348
1349
|
charsPerLine: a = 18,
|
|
1349
1350
|
template: l = void 0
|
|
1350
1351
|
} = {}) {
|
|
1351
|
-
const u = e.filter((
|
|
1352
|
-
const
|
|
1353
|
-
return { from: Number(
|
|
1354
|
-
}).sort((
|
|
1352
|
+
const u = e.filter((g) => g[t] != null && g[r] != null && Number(g[r]) > Number(g[t])).map((g) => {
|
|
1353
|
+
const L = g[n], C = L != null && String(L).trim() !== "" && String(L) !== "null" ? String(L).trim() : "";
|
|
1354
|
+
return { from: Number(g[t]), to: Number(g[r]), comment: C };
|
|
1355
|
+
}).sort((g, L) => g.from - L.from);
|
|
1355
1356
|
if (!u.length)
|
|
1356
1357
|
return { data: [], layout: {} };
|
|
1357
|
-
const c = [],
|
|
1358
|
-
for (const
|
|
1359
|
-
const
|
|
1358
|
+
const c = [], d = [], m = [], f = [], b = [];
|
|
1359
|
+
for (const g of u) {
|
|
1360
|
+
const L = 0.5 * (g.from + g.to), C = !!g.comment;
|
|
1360
1361
|
c.push({
|
|
1361
1362
|
type: "rect",
|
|
1362
1363
|
xref: "x",
|
|
1363
1364
|
yref: "y",
|
|
1364
1365
|
x0: 0,
|
|
1365
1366
|
x1: 1,
|
|
1366
|
-
y0:
|
|
1367
|
-
y1:
|
|
1368
|
-
fillcolor:
|
|
1367
|
+
y0: g.from,
|
|
1368
|
+
y1: g.to,
|
|
1369
|
+
fillcolor: C ? o : "rgba(0,0,0,0)",
|
|
1369
1370
|
line: { color: i, width: 1 },
|
|
1370
1371
|
layer: "below"
|
|
1371
|
-
}),
|
|
1372
|
+
}), C && (d.push(0.5), m.push(L), f.push(Xe(g.comment, a)), b.push(`${g.from.toFixed(3)}–${g.to.toFixed(3)} m<br>${Xe(g.comment, 40)}`));
|
|
1372
1373
|
}
|
|
1373
|
-
return { data:
|
|
1374
|
+
return { data: d.length ? [{
|
|
1374
1375
|
type: "scatter",
|
|
1375
|
-
x:
|
|
1376
|
-
y:
|
|
1376
|
+
x: d,
|
|
1377
|
+
y: m,
|
|
1377
1378
|
mode: "text",
|
|
1378
1379
|
text: f,
|
|
1379
1380
|
textposition: "middle center",
|
|
1380
|
-
textfont: { color:
|
|
1381
|
-
hovertext:
|
|
1381
|
+
textfont: { color: s, size: 10 },
|
|
1382
|
+
hovertext: b,
|
|
1382
1383
|
hoverinfo: "text",
|
|
1383
1384
|
showlegend: !1
|
|
1384
|
-
}] : [], layout:
|
|
1385
|
+
}] : [], layout: mt({
|
|
1385
1386
|
shapes: c,
|
|
1386
1387
|
height: 400,
|
|
1387
1388
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
@@ -1390,435 +1391,637 @@ function Zt(e, {
|
|
|
1390
1391
|
template: l !== void 0 ? l : $e
|
|
1391
1392
|
}) };
|
|
1392
1393
|
}
|
|
1393
|
-
function
|
|
1394
|
+
function sr(e, {
|
|
1394
1395
|
symbolSize: n = 10,
|
|
1395
1396
|
xCol: t = "easting",
|
|
1396
|
-
yCol:
|
|
1397
|
+
yCol: r = "northing"
|
|
1397
1398
|
} = {}) {
|
|
1398
|
-
const
|
|
1399
|
-
if (
|
|
1400
|
-
const l = (a - 90 + 360) % 360, u = l * Math.PI / 180, c = a * Math.PI / 180,
|
|
1399
|
+
const o = e[t] != null ? Number(e[t]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[W] != null ? Number(e[W]) : null, a = e[Y] != null ? Number(e[Y]) : null;
|
|
1400
|
+
if (o === null || i === null || s === null || a === null) return null;
|
|
1401
|
+
const l = (a - 90 + 360) % 360, u = l * Math.PI / 180, c = a * Math.PI / 180, d = n * Math.sin(u), m = n * Math.cos(u), f = n * 0.4 * (s / 90), b = f * Math.sin(c), p = f * Math.cos(c);
|
|
1401
1402
|
return {
|
|
1402
1403
|
strike: l,
|
|
1403
|
-
dipValue:
|
|
1404
|
-
x:
|
|
1404
|
+
dipValue: s,
|
|
1405
|
+
x: o,
|
|
1405
1406
|
y: i,
|
|
1406
|
-
strikeX0:
|
|
1407
|
-
strikeY0: i -
|
|
1408
|
-
strikeX1:
|
|
1409
|
-
strikeY1: i +
|
|
1410
|
-
tickX1:
|
|
1411
|
-
tickY1: i +
|
|
1407
|
+
strikeX0: o - d,
|
|
1408
|
+
strikeY0: i - m,
|
|
1409
|
+
strikeX1: o + d,
|
|
1410
|
+
strikeY1: i + m,
|
|
1411
|
+
tickX1: o + b,
|
|
1412
|
+
tickY1: i + p
|
|
1412
1413
|
};
|
|
1413
1414
|
}
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1415
|
+
function on({
|
|
1416
|
+
holeId: e,
|
|
1417
|
+
hole: n,
|
|
1418
|
+
holeOptions: t,
|
|
1419
|
+
property: r,
|
|
1420
|
+
propertyOptions: o,
|
|
1421
|
+
displayType: i,
|
|
1422
|
+
points: s,
|
|
1423
|
+
renderError: a
|
|
1424
|
+
}) {
|
|
1425
|
+
if (a)
|
|
1426
|
+
return { kind: "placeholder", text: `Plot error: ${a}` };
|
|
1427
|
+
const l = t || [];
|
|
1428
|
+
if (!e)
|
|
1429
|
+
return l.length === 0 ? { kind: "placeholder", text: "No holes loaded" } : { kind: "placeholder", text: "Select a hole" };
|
|
1430
|
+
if (!n)
|
|
1431
|
+
return { kind: "placeholder", text: `Loading ${e}…` };
|
|
1432
|
+
const u = o || [];
|
|
1433
|
+
return r ? !(i === ze) && !(i === tt) && (s || []).length === 0 ? { kind: "placeholder", text: `No values for ${r} in hole ${e}` } : { kind: "chart" } : u.length === 0 ? { kind: "placeholder", text: `No properties available for hole ${e}` } : { kind: "placeholder", text: "Select a property" };
|
|
1434
|
+
}
|
|
1435
|
+
function ft(e, n) {
|
|
1436
|
+
if (typeof n == "function") return n(e);
|
|
1437
|
+
if (!(typeof n != "string" || !n) && !(e == null || typeof e != "object"))
|
|
1438
|
+
return e[n];
|
|
1439
|
+
}
|
|
1440
|
+
function sn(e, n) {
|
|
1441
|
+
const t = [], r = /* @__PURE__ */ new Set();
|
|
1442
|
+
for (const o of e || []) {
|
|
1443
|
+
const i = ft(o, n);
|
|
1444
|
+
i == null || i === "" || r.has(i) || (r.add(i), t.push(i));
|
|
1445
|
+
}
|
|
1446
|
+
return t;
|
|
1447
|
+
}
|
|
1448
|
+
function an(e, n, t) {
|
|
1449
|
+
return t == null || t === "" ? e || [] : (e || []).filter((r) => ft(r, n) === t);
|
|
1450
|
+
}
|
|
1451
|
+
function ln({
|
|
1452
|
+
chartOptions: e,
|
|
1453
|
+
showHoleSelect: n,
|
|
1454
|
+
showPropertySelect: t,
|
|
1455
|
+
showChartTypeSelect: r
|
|
1456
|
+
}) {
|
|
1457
|
+
return {
|
|
1458
|
+
hole: n !== !1,
|
|
1459
|
+
property: t !== !1,
|
|
1460
|
+
chartType: r !== !1 && (e || []).length > 1
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
const ht = "markers+line";
|
|
1464
|
+
function cn(e, n) {
|
|
1465
|
+
var r;
|
|
1466
|
+
const t = nt(e);
|
|
1467
|
+
return t.some((o) => o.value === n) ? n : ((r = t[0]) == null ? void 0 : r.value) || ht;
|
|
1468
|
+
}
|
|
1469
|
+
function Ke(e) {
|
|
1470
|
+
const n = typeof e == "string" ? e : e.holeId, t = typeof e == "string" ? e : e.label || e.holeId;
|
|
1471
|
+
return [n, t];
|
|
1472
|
+
}
|
|
1473
|
+
function Ze(e) {
|
|
1474
|
+
const n = typeof e == "string" ? e : e.value, t = typeof e == "string" ? e : e.label ?? e.value;
|
|
1475
|
+
return [n, t];
|
|
1476
|
+
}
|
|
1477
|
+
function un({ selector: e, holeOptions: n, selectedHoleId: t, onConfigChange: r }) {
|
|
1478
|
+
const o = (e == null ? void 0 : e.kind) || "hole";
|
|
1479
|
+
if (o === "field") {
|
|
1480
|
+
const s = e.value ?? "", a = e.options || [], l = e.label || "Selection";
|
|
1481
|
+
return /* @__PURE__ */ w(
|
|
1482
|
+
"select",
|
|
1483
|
+
{
|
|
1484
|
+
className: "plot-select plot-select--field",
|
|
1485
|
+
value: s,
|
|
1486
|
+
onChange: (u) => e.onChange && e.onChange(u.target.value),
|
|
1487
|
+
disabled: a.length === 0,
|
|
1488
|
+
"aria-label": l,
|
|
1489
|
+
children: [
|
|
1490
|
+
a.length === 0 && /* @__PURE__ */ S("option", { value: "", children: "—" }),
|
|
1491
|
+
!s && a.length > 0 && /* @__PURE__ */ S("option", { value: "", disabled: !0, hidden: !0, children: `Select ${l.toLowerCase()}` }),
|
|
1492
|
+
a.map((u) => {
|
|
1493
|
+
const [c, d] = Ze(u);
|
|
1494
|
+
return /* @__PURE__ */ S("option", { value: c, children: d }, c);
|
|
1495
|
+
})
|
|
1496
|
+
]
|
|
1497
|
+
}
|
|
1498
|
+
);
|
|
1499
|
+
}
|
|
1500
|
+
if (o === "group+hole") {
|
|
1501
|
+
const s = e.groupBy, a = e.groupValue ?? "", l = e.groupLabel || "Group", u = e.groupOptions || sn(n, s), c = an(n, s, a);
|
|
1502
|
+
return /* @__PURE__ */ w(Ct, { children: [
|
|
1503
|
+
/* @__PURE__ */ w(
|
|
1504
|
+
"select",
|
|
1505
|
+
{
|
|
1506
|
+
className: "plot-select plot-select--group",
|
|
1507
|
+
value: a,
|
|
1508
|
+
onChange: (d) => e.onGroupChange && e.onGroupChange(d.target.value),
|
|
1509
|
+
disabled: u.length === 0,
|
|
1510
|
+
"aria-label": l,
|
|
1511
|
+
children: [
|
|
1512
|
+
u.length === 0 && /* @__PURE__ */ w("option", { value: "", children: [
|
|
1513
|
+
"No ",
|
|
1514
|
+
l.toLowerCase(),
|
|
1515
|
+
"s"
|
|
1516
|
+
] }),
|
|
1517
|
+
!a && u.length > 0 && /* @__PURE__ */ S("option", { value: "", disabled: !0, hidden: !0, children: `Select ${l.toLowerCase()}` }),
|
|
1518
|
+
u.map((d) => {
|
|
1519
|
+
const [m, f] = Ze(d);
|
|
1520
|
+
return /* @__PURE__ */ S("option", { value: m, children: f }, m);
|
|
1521
|
+
})
|
|
1522
|
+
]
|
|
1523
|
+
}
|
|
1524
|
+
),
|
|
1525
|
+
/* @__PURE__ */ w(
|
|
1526
|
+
"select",
|
|
1527
|
+
{
|
|
1528
|
+
className: "plot-select plot-select--hole",
|
|
1529
|
+
value: t,
|
|
1530
|
+
onChange: (d) => r && r({ holeId: d.target.value }),
|
|
1531
|
+
disabled: c.length === 0,
|
|
1532
|
+
"aria-label": "Hole",
|
|
1533
|
+
children: [
|
|
1534
|
+
c.length === 0 && /* @__PURE__ */ S("option", { value: "", children: "No holes" }),
|
|
1535
|
+
!t && c.length > 0 && /* @__PURE__ */ S("option", { value: "", disabled: !0, hidden: !0, children: "Select a hole" }),
|
|
1536
|
+
c.map((d) => {
|
|
1537
|
+
const [m, f] = Ke(d);
|
|
1538
|
+
return /* @__PURE__ */ S("option", { value: m, children: f }, m);
|
|
1539
|
+
})
|
|
1540
|
+
]
|
|
1541
|
+
}
|
|
1542
|
+
)
|
|
1543
|
+
] });
|
|
1544
|
+
}
|
|
1545
|
+
const i = n.length > 0;
|
|
1546
|
+
return /* @__PURE__ */ w(
|
|
1547
|
+
"select",
|
|
1548
|
+
{
|
|
1549
|
+
className: "plot-select plot-select--hole",
|
|
1550
|
+
value: t,
|
|
1551
|
+
onChange: (s) => r && r({ holeId: s.target.value }),
|
|
1552
|
+
disabled: !i,
|
|
1553
|
+
"aria-label": "Hole",
|
|
1554
|
+
children: [
|
|
1555
|
+
!i && /* @__PURE__ */ S("option", { value: "", children: "No holes loaded" }),
|
|
1556
|
+
!t && i && /* @__PURE__ */ S("option", { value: "", disabled: !0, hidden: !0, children: "Select a hole" }),
|
|
1557
|
+
n.map((s) => {
|
|
1558
|
+
const [a, l] = Ke(s);
|
|
1559
|
+
return /* @__PURE__ */ S("option", { value: a, children: l }, a);
|
|
1560
|
+
})
|
|
1561
|
+
]
|
|
1562
|
+
}
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
function ir({
|
|
1566
|
+
config: e,
|
|
1567
|
+
graph: n,
|
|
1568
|
+
holeOptions: t = [],
|
|
1569
|
+
propertyOptions: r = [],
|
|
1570
|
+
propertyMeta: o,
|
|
1571
|
+
onConfigChange: i,
|
|
1572
|
+
template: s,
|
|
1573
|
+
showHoleSelect: a = !0,
|
|
1574
|
+
showPropertySelect: l = !0,
|
|
1575
|
+
showChartTypeSelect: u = !0,
|
|
1576
|
+
holeSelector: c
|
|
1577
|
+
}) {
|
|
1578
|
+
const d = ye(null), m = ye(null), f = n == null ? void 0 : n.hole, b = (n == null ? void 0 : n.points) || [], p = (e == null ? void 0 : e.property) || "", v = o == null ? void 0 : o[p], g = (e == null ? void 0 : e.chartType) || ht, L = (e == null ? void 0 : e.holeId) || "", C = (n == null ? void 0 : n.displayType) || (n != null && n.isComment ? ze : n != null && n.isCategorical ? Ge : At), j = nt(C), H = cn(C, g), [$, D] = K(""), [R, G] = K({ width: 0, height: 0 }), h = on({
|
|
1579
|
+
holeId: L,
|
|
1580
|
+
hole: f,
|
|
1581
|
+
holeOptions: t,
|
|
1582
|
+
property: p,
|
|
1583
|
+
propertyOptions: r,
|
|
1584
|
+
displayType: C,
|
|
1585
|
+
points: b,
|
|
1586
|
+
renderError: $
|
|
1587
|
+
}), P = h.kind !== "chart", A = ln({
|
|
1588
|
+
chartOptions: j,
|
|
1589
|
+
showHoleSelect: a,
|
|
1590
|
+
showPropertySelect: l,
|
|
1591
|
+
showChartTypeSelect: u
|
|
1592
|
+
}), z = r.length > 0;
|
|
1593
|
+
return te(() => {
|
|
1594
|
+
const E = d.current;
|
|
1595
|
+
if (!E || typeof ResizeObserver > "u") return;
|
|
1596
|
+
let _ = 0;
|
|
1597
|
+
const y = () => {
|
|
1598
|
+
_ && cancelAnimationFrame(_), _ = requestAnimationFrame(() => {
|
|
1599
|
+
const F = Math.max(0, Math.floor(E.clientWidth)), T = Math.max(0, Math.floor(E.clientHeight));
|
|
1600
|
+
G((x) => x.width === F && x.height === T ? x : { width: F, height: T });
|
|
1601
|
+
});
|
|
1602
|
+
};
|
|
1603
|
+
y();
|
|
1604
|
+
const I = new ResizeObserver(y);
|
|
1605
|
+
return I.observe(E), () => {
|
|
1606
|
+
_ && cancelAnimationFrame(_), I.disconnect();
|
|
1607
|
+
};
|
|
1608
|
+
}, []), te(() => {
|
|
1609
|
+
if (h.kind !== "chart") return;
|
|
1610
|
+
const E = m.current;
|
|
1611
|
+
if (!E || R.width <= 0 || R.height <= 0) return;
|
|
1612
|
+
const _ = C === ze, y = C === tt;
|
|
1613
|
+
let I;
|
|
1428
1614
|
try {
|
|
1429
|
-
|
|
1430
|
-
points:
|
|
1431
|
-
isCategorical:
|
|
1432
|
-
property:
|
|
1433
|
-
chartType:
|
|
1434
|
-
template:
|
|
1615
|
+
_ ? I = rn(b, { commentCol: p, fromCol: "from", toCol: "to" }) : y ? I = nn(b) : I = St({
|
|
1616
|
+
points: b,
|
|
1617
|
+
isCategorical: C === Ge,
|
|
1618
|
+
property: p,
|
|
1619
|
+
chartType: H,
|
|
1620
|
+
template: s,
|
|
1621
|
+
meta: v
|
|
1435
1622
|
});
|
|
1436
|
-
} catch (
|
|
1437
|
-
console.error("Plot build error",
|
|
1623
|
+
} catch (x) {
|
|
1624
|
+
console.error("Plot build error", x), D((x == null ? void 0 : x.message) || "Plot build error");
|
|
1438
1625
|
return;
|
|
1439
1626
|
}
|
|
1440
|
-
if ((!(
|
|
1627
|
+
if ((!(I != null && I.data) || I.data.length === 0) && !_)
|
|
1441
1628
|
return;
|
|
1442
|
-
const
|
|
1629
|
+
const F = {
|
|
1443
1630
|
displayModeBar: !0,
|
|
1444
|
-
responsive: !
|
|
1445
|
-
useResizeHandler: !0,
|
|
1631
|
+
responsive: !1,
|
|
1446
1632
|
modeBarButtonsToRemove: ["select2d", "lasso2d", "autoScale2d"]
|
|
1633
|
+
}, T = {
|
|
1634
|
+
...I.layout,
|
|
1635
|
+
autosize: !1,
|
|
1636
|
+
width: R.width,
|
|
1637
|
+
height: R.height
|
|
1447
1638
|
};
|
|
1448
1639
|
try {
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
} catch (O) {
|
|
1453
|
-
console.error("Plot render error", O), b((O == null ? void 0 : O.message) || "Plot render error");
|
|
1640
|
+
D(""), Oe.react(E, I.data, T, F);
|
|
1641
|
+
} catch (x) {
|
|
1642
|
+
console.error("Plot render error", x), D((x == null ? void 0 : x.message) || "Plot render error");
|
|
1454
1643
|
}
|
|
1455
1644
|
return () => {
|
|
1456
|
-
if (
|
|
1645
|
+
if (E)
|
|
1457
1646
|
try {
|
|
1458
|
-
|
|
1459
|
-
} catch (
|
|
1460
|
-
console.warn("Plot purge error",
|
|
1647
|
+
Oe.purge(E);
|
|
1648
|
+
} catch (x) {
|
|
1649
|
+
console.warn("Plot purge error", x);
|
|
1461
1650
|
}
|
|
1462
1651
|
};
|
|
1463
|
-
}, [
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1652
|
+
}, [
|
|
1653
|
+
h.kind,
|
|
1654
|
+
f,
|
|
1655
|
+
p,
|
|
1656
|
+
v,
|
|
1657
|
+
H,
|
|
1658
|
+
C,
|
|
1659
|
+
b,
|
|
1660
|
+
s,
|
|
1661
|
+
R.width,
|
|
1662
|
+
R.height
|
|
1663
|
+
]), te(() => {
|
|
1664
|
+
const E = m.current;
|
|
1665
|
+
if (!E || typeof ResizeObserver > "u") return;
|
|
1666
|
+
const _ = new ResizeObserver(() => {
|
|
1467
1667
|
try {
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1668
|
+
if (E && E.data) {
|
|
1669
|
+
const y = Math.max(0, Math.floor(E.clientWidth)), I = Math.max(0, Math.floor(E.clientHeight));
|
|
1670
|
+
y > 0 && I > 0 && Oe.relayout(E, { width: y, height: I, autosize: !1 });
|
|
1671
|
+
}
|
|
1672
|
+
} catch (y) {
|
|
1673
|
+
console.warn("Plot resize error", y);
|
|
1471
1674
|
}
|
|
1472
1675
|
});
|
|
1473
|
-
return
|
|
1474
|
-
}, []),
|
|
1475
|
-
"
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
)
|
|
1676
|
+
return _.observe(E), () => _.disconnect();
|
|
1677
|
+
}, [h.kind]), /* @__PURE__ */ w("div", { className: `plot-card${P ? " empty" : ""}`, children: [
|
|
1678
|
+
/* @__PURE__ */ w("header", { className: "plot-card__controls", children: [
|
|
1679
|
+
A.hole && /* @__PURE__ */ S("div", { className: "plot-title", children: un({
|
|
1680
|
+
selector: c,
|
|
1681
|
+
holeOptions: t,
|
|
1682
|
+
selectedHoleId: L,
|
|
1683
|
+
onConfigChange: i
|
|
1684
|
+
}) }),
|
|
1685
|
+
(A.property || A.chartType) && /* @__PURE__ */ w("div", { className: "plot-controls column", children: [
|
|
1686
|
+
A.property && /* @__PURE__ */ w(
|
|
1687
|
+
"select",
|
|
1688
|
+
{
|
|
1689
|
+
className: "plot-select plot-select--property",
|
|
1690
|
+
value: p,
|
|
1691
|
+
onChange: (E) => i && i({ property: E.target.value }),
|
|
1692
|
+
disabled: !z,
|
|
1693
|
+
"aria-label": "Property",
|
|
1694
|
+
children: [
|
|
1695
|
+
!z && /* @__PURE__ */ S("option", { value: "", children: "—" }),
|
|
1696
|
+
!p && z && /* @__PURE__ */ S("option", { value: "", disabled: !0, hidden: !0, children: "Select a property" }),
|
|
1697
|
+
r.map((E) => /* @__PURE__ */ S("option", { value: E, children: Tt(E, o == null ? void 0 : o[E]) }, E))
|
|
1698
|
+
]
|
|
1699
|
+
}
|
|
1700
|
+
),
|
|
1701
|
+
A.chartType && /* @__PURE__ */ S(
|
|
1702
|
+
"select",
|
|
1703
|
+
{
|
|
1704
|
+
className: "plot-select plot-select--chart-type",
|
|
1705
|
+
value: H,
|
|
1706
|
+
onChange: (E) => i && i({ chartType: E.target.value }),
|
|
1707
|
+
"aria-label": "Chart type",
|
|
1708
|
+
children: j.map((E) => /* @__PURE__ */ S("option", { value: E.value, children: E.label }, E.value))
|
|
1709
|
+
}
|
|
1710
|
+
)
|
|
1711
|
+
] })
|
|
1509
1712
|
] }),
|
|
1510
|
-
/* @__PURE__ */ S("div", { className: "plotly-chart", ref:
|
|
1713
|
+
/* @__PURE__ */ S("div", { className: "plot-card__body", ref: d, children: h.kind === "chart" ? /* @__PURE__ */ S("div", { className: "plotly-chart", ref: m }) : /* @__PURE__ */ S("div", { className: "placeholder", children: h.text }) })
|
|
1511
1714
|
] });
|
|
1512
1715
|
}
|
|
1513
|
-
function
|
|
1716
|
+
function Je(e, n) {
|
|
1514
1717
|
if (!(n != null && n.length)) return e;
|
|
1515
|
-
const t = new Map(e.map((
|
|
1516
|
-
for (const
|
|
1517
|
-
const
|
|
1518
|
-
if (
|
|
1519
|
-
if (t.has(
|
|
1520
|
-
const i = t.get(
|
|
1521
|
-
t.set(
|
|
1718
|
+
const t = new Map(e.map((r) => [r.id || r.holeId, { ...r }]));
|
|
1719
|
+
for (const r of n) {
|
|
1720
|
+
const o = r.id || r.holeId;
|
|
1721
|
+
if (o)
|
|
1722
|
+
if (t.has(o)) {
|
|
1723
|
+
const i = t.get(o);
|
|
1724
|
+
t.set(o, { ...i, points: [...i.points || [], ...r.points || []] });
|
|
1522
1725
|
} else
|
|
1523
|
-
t.set(
|
|
1726
|
+
t.set(o, r);
|
|
1524
1727
|
}
|
|
1525
1728
|
return Array.from(t.values());
|
|
1526
1729
|
}
|
|
1527
|
-
function
|
|
1730
|
+
function dn(e, n) {
|
|
1528
1731
|
if (!e || !n) return [];
|
|
1529
|
-
const t = /* @__PURE__ */ new Set(),
|
|
1530
|
-
for (const
|
|
1531
|
-
const i = Number(
|
|
1532
|
-
if (!Number.isFinite(i) || !Number.isFinite(
|
|
1533
|
-
const a = `${i}-${
|
|
1534
|
-
t.has(a) || (t.add(a),
|
|
1732
|
+
const t = /* @__PURE__ */ new Set(), r = [];
|
|
1733
|
+
for (const o of e.points || []) {
|
|
1734
|
+
const i = Number(o.from ?? o.samp_from ?? o.depth_from ?? o.from_depth), s = Number(o.to ?? o.samp_to ?? o.depth_to ?? o.to_depth);
|
|
1735
|
+
if (!Number.isFinite(i) || !Number.isFinite(s) || s <= i) continue;
|
|
1736
|
+
const a = `${i}-${s}`;
|
|
1737
|
+
t.has(a) || (t.add(a), r.push({ from: i, to: s, [n]: o[n] ?? "" }));
|
|
1535
1738
|
}
|
|
1536
|
-
return
|
|
1739
|
+
return r;
|
|
1537
1740
|
}
|
|
1538
|
-
function
|
|
1741
|
+
function ar({
|
|
1539
1742
|
initialFocusedHoleId: e = "",
|
|
1540
1743
|
sourceFile: n = null,
|
|
1541
1744
|
extraHoles: t = [],
|
|
1542
|
-
plotCount:
|
|
1745
|
+
plotCount: r = 4
|
|
1543
1746
|
} = {}) {
|
|
1544
|
-
const [
|
|
1545
|
-
|
|
1546
|
-
!n ||
|
|
1547
|
-
if (!
|
|
1548
|
-
const
|
|
1549
|
-
a(
|
|
1550
|
-
holeIds:
|
|
1551
|
-
focusedHoleId:
|
|
1552
|
-
plotCount:
|
|
1747
|
+
const [o, i] = K([]), [s, a] = K([]), [l, u] = K([]), [c, d] = K([]), [m, f] = K([]), [b, p] = K({}), [v, g] = K(""), [L, C] = K([]), [j, H] = K(""), [$, D] = K(e || ""), [R, G] = K([]), h = ye(null);
|
|
1748
|
+
te(() => {
|
|
1749
|
+
!n || h.current === n || (h.current = n, Ft(n).then((_) => {
|
|
1750
|
+
if (!_) return;
|
|
1751
|
+
const y = Array.from(new Map(_.map((I) => [I.holeId, I])).values());
|
|
1752
|
+
a(y), C(it({
|
|
1753
|
+
holeIds: y.map((I) => I.holeId),
|
|
1754
|
+
focusedHoleId: $,
|
|
1755
|
+
plotCount: r,
|
|
1553
1756
|
defaultProp: "",
|
|
1554
1757
|
categoricalProps: c,
|
|
1555
|
-
commentProps:
|
|
1758
|
+
commentProps: m,
|
|
1556
1759
|
numericDefaultChartType: "markers+line"
|
|
1557
1760
|
}));
|
|
1558
|
-
}).catch((
|
|
1559
|
-
console.info("Assay metadata load skipped:",
|
|
1761
|
+
}).catch((_) => {
|
|
1762
|
+
console.info("Assay metadata load skipped:", _.message);
|
|
1560
1763
|
}));
|
|
1561
|
-
}, [n,
|
|
1764
|
+
}, [n, $, r, c, m]), te(() => {
|
|
1562
1765
|
if (!(t != null && t.length)) return;
|
|
1563
|
-
const
|
|
1564
|
-
a((
|
|
1565
|
-
const
|
|
1566
|
-
return F.length ? [...
|
|
1766
|
+
const _ = t.map((y) => ({ holeId: y.id || y.holeId })).filter((y) => y.holeId);
|
|
1767
|
+
a((y) => {
|
|
1768
|
+
const I = new Set(y.map((T) => T.holeId)), F = _.filter((T) => !I.has(T.holeId));
|
|
1769
|
+
return F.length ? [...y, ...F] : y;
|
|
1567
1770
|
});
|
|
1568
|
-
}, [t]),
|
|
1569
|
-
H((
|
|
1570
|
-
}, [
|
|
1571
|
-
if (!
|
|
1572
|
-
|
|
1771
|
+
}, [t]), te(() => {
|
|
1772
|
+
H((_) => _ && _.startsWith("Loading ") && _.includes(" for hole ") ? _ : "");
|
|
1773
|
+
}, [L]), te(() => {
|
|
1774
|
+
if (!s.length) {
|
|
1775
|
+
C([]);
|
|
1573
1776
|
return;
|
|
1574
1777
|
}
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
var
|
|
1578
|
-
const
|
|
1579
|
-
property:
|
|
1580
|
-
chartType:
|
|
1778
|
+
const _ = st(s.map((y) => y.holeId), $);
|
|
1779
|
+
C((y) => Array.from({ length: r }).map((F, T) => {
|
|
1780
|
+
var X;
|
|
1781
|
+
const x = y[T] || {}, B = s.some((ae) => ae.holeId === x.holeId) ? x.holeId : _[T] || ((X = s[T]) == null ? void 0 : X.holeId) || "", k = x.property || v, q = Se({
|
|
1782
|
+
property: k,
|
|
1783
|
+
chartType: x.chartType,
|
|
1581
1784
|
categoricalProps: c,
|
|
1582
|
-
commentProps:
|
|
1785
|
+
commentProps: m,
|
|
1583
1786
|
numericDefaultChartType: "markers+line"
|
|
1584
1787
|
});
|
|
1585
|
-
return { holeId: B, property:
|
|
1788
|
+
return { holeId: B, property: k, chartType: q };
|
|
1586
1789
|
}));
|
|
1587
|
-
}, [
|
|
1790
|
+
}, [s, $, v, c, m, r]), te(() => {
|
|
1588
1791
|
if (!n) return;
|
|
1589
|
-
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
const B =
|
|
1594
|
-
[...
|
|
1792
|
+
L.map((y) => y.holeId).filter(Boolean).forEach((y) => {
|
|
1793
|
+
const I = o.some((T) => (T.id || T.holeId) === y), F = R.includes(y);
|
|
1794
|
+
I || F || (G((T) => [...T, y]), $t(n, y).then((T) => {
|
|
1795
|
+
G((x) => x.filter((B) => B !== y)), T && i((x) => {
|
|
1796
|
+
const B = Je(
|
|
1797
|
+
[...x.filter((q) => (q.id || q.holeId) !== y), T],
|
|
1595
1798
|
t
|
|
1596
|
-
),
|
|
1597
|
-
return u(
|
|
1598
|
-
...
|
|
1599
|
-
property:
|
|
1799
|
+
), k = Te(B);
|
|
1800
|
+
return u(k.numericProps), d(k.categoricalProps), f(k.commentProps), p(k.columnMeta), !v && k.defaultProp && (g(k.defaultProp), C((q) => q.map((X) => ({
|
|
1801
|
+
...X,
|
|
1802
|
+
property: X.property || k.defaultProp,
|
|
1600
1803
|
chartType: Se({
|
|
1601
|
-
property:
|
|
1602
|
-
chartType:
|
|
1603
|
-
categoricalProps:
|
|
1604
|
-
commentProps:
|
|
1804
|
+
property: X.property || k.defaultProp,
|
|
1805
|
+
chartType: X.chartType,
|
|
1806
|
+
categoricalProps: k.categoricalProps,
|
|
1807
|
+
commentProps: k.commentProps,
|
|
1605
1808
|
numericDefaultChartType: "markers+line"
|
|
1606
1809
|
})
|
|
1607
1810
|
})))), B;
|
|
1608
1811
|
});
|
|
1609
|
-
}).catch((
|
|
1610
|
-
console.error(
|
|
1812
|
+
}).catch((T) => {
|
|
1813
|
+
console.error(T), G((x) => x.filter((B) => B !== y)), H(T.message || `Error loading hole ${y}`);
|
|
1611
1814
|
}));
|
|
1612
1815
|
});
|
|
1613
|
-
}, [
|
|
1614
|
-
t != null && t.length && i((
|
|
1615
|
-
if (!
|
|
1616
|
-
const F =
|
|
1617
|
-
return u(F.numericProps),
|
|
1816
|
+
}, [L, n, o, R, v, t]), te(() => {
|
|
1817
|
+
t != null && t.length && i((_) => {
|
|
1818
|
+
if (!_.length) {
|
|
1819
|
+
const F = Te(t);
|
|
1820
|
+
return u(F.numericProps), d(F.categoricalProps), f(F.commentProps), p(F.columnMeta), !v && F.defaultProp && g(F.defaultProp), t;
|
|
1618
1821
|
}
|
|
1619
|
-
const
|
|
1620
|
-
return u(
|
|
1822
|
+
const y = Je(_, t), I = Te(y);
|
|
1823
|
+
return u(I.numericProps), d(I.categoricalProps), f(I.commentProps), p(I.columnMeta), !v && I.defaultProp && g(I.defaultProp), y;
|
|
1621
1824
|
});
|
|
1622
1825
|
}, [t]);
|
|
1623
|
-
const
|
|
1624
|
-
() => [...l, ...c, ...
|
|
1625
|
-
[l, c,
|
|
1626
|
-
),
|
|
1627
|
-
() =>
|
|
1628
|
-
[
|
|
1826
|
+
const P = ee(
|
|
1827
|
+
() => [...l, ...c, ...m],
|
|
1828
|
+
[l, c, m]
|
|
1829
|
+
), A = ee(
|
|
1830
|
+
() => s.map((_) => ({ holeId: _.holeId, label: _.holeId })).sort((_, y) => _.label.localeCompare(y.label)),
|
|
1831
|
+
[s]
|
|
1629
1832
|
), z = ee(() => {
|
|
1630
|
-
const
|
|
1631
|
-
return Array.from({ length:
|
|
1632
|
-
const F =
|
|
1633
|
-
let B = F.property ||
|
|
1634
|
-
|
|
1635
|
-
const
|
|
1833
|
+
const _ = [...l, ...c, ...m];
|
|
1834
|
+
return Array.from({ length: r }).map((y, I) => {
|
|
1835
|
+
const F = L[I] || {}, T = o.find((fe) => (fe.id || fe.holeId) === F.holeId) || null, x = T ? _.filter((fe) => Lt(T, fe)) : _;
|
|
1836
|
+
let B = F.property || v;
|
|
1837
|
+
T && !x.includes(B) && (B = x[0] || B);
|
|
1838
|
+
const k = m.includes(B), q = !k && c.includes(B), X = !k && !q && B === "dip", ae = k ? "comment" : X ? "tadpole" : q ? "categorical" : "numeric", _e = X ? "tadpole" : F.chartType || (k ? "comment" : q ? "categorical" : "markers+line"), me = F.holeId || (T == null ? void 0 : T.id) || (T == null ? void 0 : T.holeId) || "", Me = X ? (T == null ? void 0 : T.points) || [] : k ? dn(T, B) : It(T, B, q);
|
|
1636
1839
|
return {
|
|
1637
|
-
config: { holeId: me, property: B, chartType:
|
|
1638
|
-
hole:
|
|
1840
|
+
config: { holeId: me, property: B, chartType: _e },
|
|
1841
|
+
hole: T,
|
|
1639
1842
|
loading: R.includes(F.holeId),
|
|
1640
1843
|
isCategorical: q,
|
|
1641
|
-
isComment:
|
|
1642
|
-
isTadpole:
|
|
1844
|
+
isComment: k,
|
|
1845
|
+
isTadpole: X,
|
|
1643
1846
|
displayType: ae,
|
|
1644
|
-
points:
|
|
1645
|
-
propertyOptions:
|
|
1847
|
+
points: Me,
|
|
1848
|
+
propertyOptions: x,
|
|
1646
1849
|
label: me
|
|
1647
1850
|
};
|
|
1648
1851
|
});
|
|
1649
|
-
}, [
|
|
1650
|
-
|
|
1651
|
-
const F = [...
|
|
1652
|
-
return
|
|
1653
|
-
property:
|
|
1654
|
-
chartType:
|
|
1852
|
+
}, [L, o, v, c, m, R, r, l]), E = (_, y) => {
|
|
1853
|
+
C((I) => {
|
|
1854
|
+
const F = [...I], x = { ...F[_] || {}, ...y };
|
|
1855
|
+
return y.property && (x.chartType = Se({
|
|
1856
|
+
property: y.property,
|
|
1857
|
+
chartType: x.chartType,
|
|
1655
1858
|
categoricalProps: c,
|
|
1656
|
-
commentProps:
|
|
1859
|
+
commentProps: m,
|
|
1657
1860
|
numericDefaultChartType: "markers+line"
|
|
1658
|
-
})), F[
|
|
1861
|
+
})), F[_] = x, F;
|
|
1659
1862
|
});
|
|
1660
1863
|
};
|
|
1661
1864
|
return {
|
|
1662
|
-
error:
|
|
1663
|
-
focusedHoleId:
|
|
1664
|
-
setFocusedHoleId:
|
|
1865
|
+
error: j,
|
|
1866
|
+
focusedHoleId: $,
|
|
1867
|
+
setFocusedHoleId: D,
|
|
1665
1868
|
setError: H,
|
|
1666
|
-
holeCount:
|
|
1869
|
+
holeCount: s.length,
|
|
1667
1870
|
numericProps: l,
|
|
1668
1871
|
categoricalProps: c,
|
|
1669
|
-
commentProps:
|
|
1670
|
-
columnMeta:
|
|
1671
|
-
propertyOptions:
|
|
1672
|
-
labeledHoleOptions:
|
|
1872
|
+
commentProps: m,
|
|
1873
|
+
columnMeta: b,
|
|
1874
|
+
propertyOptions: P,
|
|
1875
|
+
labeledHoleOptions: A,
|
|
1673
1876
|
traceGraphs: z,
|
|
1674
|
-
handleConfigChange:
|
|
1877
|
+
handleConfigChange: E
|
|
1675
1878
|
};
|
|
1676
1879
|
}
|
|
1677
|
-
function
|
|
1880
|
+
function pt(e) {
|
|
1678
1881
|
return Array.isArray(e) ? e : [];
|
|
1679
1882
|
}
|
|
1680
|
-
function
|
|
1883
|
+
function De(e) {
|
|
1681
1884
|
const n = Number(e);
|
|
1682
1885
|
return Number.isFinite(n) ? n : void 0;
|
|
1683
1886
|
}
|
|
1684
|
-
function
|
|
1887
|
+
function gt(e = {}) {
|
|
1685
1888
|
return {
|
|
1686
1889
|
...e,
|
|
1687
|
-
x:
|
|
1688
|
-
y:
|
|
1689
|
-
z:
|
|
1890
|
+
x: De(e.x),
|
|
1891
|
+
y: De(e.y),
|
|
1892
|
+
z: De(e.z)
|
|
1690
1893
|
};
|
|
1691
1894
|
}
|
|
1692
|
-
function
|
|
1693
|
-
const [
|
|
1694
|
-
return
|
|
1895
|
+
function mn(e = [], n = [0, 0], t = 0) {
|
|
1896
|
+
const [r, o] = n, i = Number(t) * Math.PI / 180, s = Math.cos(i), a = Math.sin(i);
|
|
1897
|
+
return pt(e).map(gt).map((l) => {
|
|
1695
1898
|
if (!Number.isFinite(l.x) || !Number.isFinite(l.y)) return { ...l };
|
|
1696
|
-
const u = l.x -
|
|
1899
|
+
const u = l.x - r, c = l.y - o;
|
|
1697
1900
|
return {
|
|
1698
1901
|
...l,
|
|
1699
|
-
along: u * a + c *
|
|
1700
|
-
across: u *
|
|
1902
|
+
along: u * a + c * s,
|
|
1903
|
+
across: u * s - c * a
|
|
1701
1904
|
};
|
|
1702
1905
|
});
|
|
1703
1906
|
}
|
|
1704
|
-
function
|
|
1705
|
-
const
|
|
1706
|
-
return !Number.isFinite(i) || i <= 0 ?
|
|
1907
|
+
function fn(e = [], n = [0, 0], t = 0, r = 50) {
|
|
1908
|
+
const o = mn(e, n, t), i = 0.5 * Number(r || 0);
|
|
1909
|
+
return !Number.isFinite(i) || i <= 0 ? o : o.filter((s) => Number.isFinite(s.across) && Math.abs(s.across) <= i);
|
|
1707
1910
|
}
|
|
1708
|
-
function
|
|
1709
|
-
let
|
|
1911
|
+
function lr(e = [], n = null, t = null) {
|
|
1912
|
+
let r = pt(e).map(gt);
|
|
1710
1913
|
if (Array.isArray(n) && n.length === 2) {
|
|
1711
|
-
const [
|
|
1712
|
-
|
|
1914
|
+
const [o, i] = n;
|
|
1915
|
+
r = r.filter((s) => Number.isFinite(s.z) && s.z <= Number(o) && s.z >= Number(i));
|
|
1713
1916
|
}
|
|
1714
|
-
return t && (
|
|
1715
|
-
...r,
|
|
1716
|
-
color_value: r == null ? void 0 : r[t]
|
|
1717
|
-
}))), s;
|
|
1718
|
-
}
|
|
1719
|
-
function Jn(e = [], n = [0, 0], t = 0, s = 50, r = null) {
|
|
1720
|
-
let i = tn(e, n, t, s);
|
|
1721
|
-
return r && (i = i.map((o) => ({
|
|
1917
|
+
return t && (r = r.map((o) => ({
|
|
1722
1918
|
...o,
|
|
1723
|
-
color_value: o == null ? void 0 : o[
|
|
1919
|
+
color_value: o == null ? void 0 : o[t]
|
|
1920
|
+
}))), r;
|
|
1921
|
+
}
|
|
1922
|
+
function cr(e = [], n = [0, 0], t = 0, r = 50, o = null) {
|
|
1923
|
+
let i = fn(e, n, t, r);
|
|
1924
|
+
return o && (i = i.map((s) => ({
|
|
1925
|
+
...s,
|
|
1926
|
+
color_value: s == null ? void 0 : s[o]
|
|
1724
1927
|
}))), i;
|
|
1725
1928
|
}
|
|
1726
|
-
function
|
|
1929
|
+
function Ue(e) {
|
|
1727
1930
|
return Array.isArray(e) ? e : [];
|
|
1728
1931
|
}
|
|
1729
|
-
function
|
|
1932
|
+
function He(e = {}) {
|
|
1730
1933
|
return e.hole_id ?? e.holeId ?? e.id;
|
|
1731
1934
|
}
|
|
1732
1935
|
function ue(e, n = void 0) {
|
|
1733
1936
|
const t = Number(e);
|
|
1734
1937
|
return Number.isFinite(t) ? t : n;
|
|
1735
1938
|
}
|
|
1736
|
-
function
|
|
1939
|
+
function ur(e = [], n = null) {
|
|
1737
1940
|
const t = /* @__PURE__ */ new Map();
|
|
1738
|
-
|
|
1739
|
-
const i =
|
|
1941
|
+
Ue(e).forEach((o) => {
|
|
1942
|
+
const i = He(o);
|
|
1740
1943
|
if (i == null || `${i}`.trim() === "") return;
|
|
1741
|
-
const
|
|
1742
|
-
t.has(
|
|
1944
|
+
const s = `${i}`;
|
|
1945
|
+
t.has(s) || t.set(s, []), t.get(s).push(o);
|
|
1743
1946
|
});
|
|
1744
|
-
const
|
|
1745
|
-
return t.forEach((
|
|
1746
|
-
const
|
|
1947
|
+
const r = [];
|
|
1948
|
+
return t.forEach((o, i) => {
|
|
1949
|
+
const s = [...o].sort((l, u) => ue(l.md, 0) - ue(u.md, 0)), a = {
|
|
1747
1950
|
hole_id: i,
|
|
1748
|
-
x:
|
|
1749
|
-
y:
|
|
1750
|
-
z:
|
|
1951
|
+
x: s.map((l) => ue(l.x, 0)),
|
|
1952
|
+
y: s.map((l) => ue(l.y, 0)),
|
|
1953
|
+
z: s.map((l) => ue(l.z, 0)),
|
|
1751
1954
|
color: null
|
|
1752
1955
|
};
|
|
1753
|
-
n && (a.color =
|
|
1754
|
-
}),
|
|
1755
|
-
}
|
|
1756
|
-
function
|
|
1757
|
-
return
|
|
1758
|
-
hole_id:
|
|
1759
|
-
from:
|
|
1760
|
-
to:
|
|
1956
|
+
n && (a.color = s.map((l) => l == null ? void 0 : l[n])), r.push(a);
|
|
1957
|
+
}), r;
|
|
1958
|
+
}
|
|
1959
|
+
function dr(e = [], n = 1, t = null) {
|
|
1960
|
+
return Ue(e).map((r) => ({
|
|
1961
|
+
hole_id: He(r),
|
|
1962
|
+
from: r == null ? void 0 : r.from,
|
|
1963
|
+
to: r == null ? void 0 : r.to,
|
|
1761
1964
|
radius: n,
|
|
1762
|
-
color: t ?
|
|
1763
|
-
value: t ?
|
|
1965
|
+
color: t ? r == null ? void 0 : r[t] : null,
|
|
1966
|
+
value: t ? r == null ? void 0 : r[t] : null
|
|
1764
1967
|
}));
|
|
1765
1968
|
}
|
|
1766
|
-
function
|
|
1767
|
-
return n ?
|
|
1768
|
-
hole_id:
|
|
1969
|
+
function mr(e = [], n = null) {
|
|
1970
|
+
return n ? Ue(e).filter((t) => Object.prototype.hasOwnProperty.call(t || {}, n)).map((t) => ({
|
|
1971
|
+
hole_id: He(t),
|
|
1769
1972
|
label: t == null ? void 0 : t[n],
|
|
1770
1973
|
depth: 0.5 * (ue(t == null ? void 0 : t.from, 0) + ue(t == null ? void 0 : t.to, 0))
|
|
1771
1974
|
})) : [];
|
|
1772
1975
|
}
|
|
1773
|
-
function
|
|
1976
|
+
function fr({
|
|
1774
1977
|
controlMode: e = "orbit",
|
|
1775
1978
|
onToggleFly: n = () => {
|
|
1776
1979
|
},
|
|
1777
1980
|
onRecenter: t = () => {
|
|
1778
1981
|
},
|
|
1779
|
-
onLookDown:
|
|
1982
|
+
onLookDown: r = () => {
|
|
1780
1983
|
},
|
|
1781
|
-
onFit:
|
|
1984
|
+
onFit: o = () => {
|
|
1782
1985
|
},
|
|
1783
1986
|
darkBackground: i = !1,
|
|
1784
|
-
onToggleDarkBackground:
|
|
1987
|
+
onToggleDarkBackground: s = () => {
|
|
1785
1988
|
}
|
|
1786
1989
|
}) {
|
|
1787
|
-
return /* @__PURE__ */
|
|
1990
|
+
return /* @__PURE__ */ w("div", { className: "baselode-3d-controls", children: [
|
|
1788
1991
|
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick: t, children: "Recenter to (0,0,0)" }),
|
|
1789
|
-
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick:
|
|
1790
|
-
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick:
|
|
1992
|
+
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick: r, children: "Look down" }),
|
|
1993
|
+
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick: o, children: "Fit to scene" }),
|
|
1791
1994
|
/* @__PURE__ */ S("button", { type: "button", className: "ghost-button", onClick: n, children: e === "orbit" ? "Enable fly controls" : "Disable fly controls" }),
|
|
1792
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ w("label", { className: "baselode-3d-controls-checkbox", children: [
|
|
1793
1996
|
/* @__PURE__ */ S(
|
|
1794
1997
|
"input",
|
|
1795
1998
|
{
|
|
1796
1999
|
type: "checkbox",
|
|
1797
2000
|
checked: i,
|
|
1798
|
-
onChange:
|
|
2001
|
+
onChange: s
|
|
1799
2002
|
}
|
|
1800
2003
|
),
|
|
1801
2004
|
"Dark background"
|
|
1802
2005
|
] })
|
|
1803
2006
|
] });
|
|
1804
2007
|
}
|
|
1805
|
-
function
|
|
2008
|
+
function hr({
|
|
1806
2009
|
properties: e = [],
|
|
1807
2010
|
selectedProperty: n = "",
|
|
1808
2011
|
onPropertyChange: t = () => {
|
|
1809
2012
|
},
|
|
1810
|
-
opacity:
|
|
1811
|
-
onOpacityChange:
|
|
2013
|
+
opacity: r = 0.85,
|
|
2014
|
+
onOpacityChange: o = () => {
|
|
1812
2015
|
},
|
|
1813
2016
|
propertyStats: i = null,
|
|
1814
|
-
clickedBlock:
|
|
2017
|
+
clickedBlock: s = null,
|
|
1815
2018
|
onPopupClose: a = () => {
|
|
1816
2019
|
}
|
|
1817
2020
|
}) {
|
|
1818
2021
|
var l, u;
|
|
1819
|
-
return /* @__PURE__ */
|
|
2022
|
+
return /* @__PURE__ */ w("div", { className: "bm-widget", children: [
|
|
1820
2023
|
/* @__PURE__ */ S("label", { className: "bm-widget__label", htmlFor: "bm-property-select", children: "Color by" }),
|
|
1821
|
-
/* @__PURE__ */
|
|
2024
|
+
/* @__PURE__ */ w(
|
|
1822
2025
|
"select",
|
|
1823
2026
|
{
|
|
1824
2027
|
id: "bm-property-select",
|
|
@@ -1831,26 +2034,26 @@ function ss({
|
|
|
1831
2034
|
]
|
|
1832
2035
|
}
|
|
1833
2036
|
),
|
|
1834
|
-
i && i.type === "numeric" && /* @__PURE__ */
|
|
2037
|
+
i && i.type === "numeric" && /* @__PURE__ */ w("div", { className: "bm-widget__scale", children: [
|
|
1835
2038
|
/* @__PURE__ */ S("span", { className: "bm-widget__scale-label bm-widget__scale-label--min", children: ((l = i.min) == null ? void 0 : l.toFixed(2)) ?? "—" }),
|
|
1836
2039
|
/* @__PURE__ */ S("div", { className: "bm-widget__scale-bar" }),
|
|
1837
2040
|
/* @__PURE__ */ S("span", { className: "bm-widget__scale-label bm-widget__scale-label--max", children: ((u = i.max) == null ? void 0 : u.toFixed(2)) ?? "—" })
|
|
1838
2041
|
] }),
|
|
1839
|
-
i && i.type === "categorical" && /* @__PURE__ */ S("div", { className: "bm-widget__categories", children: (i.categories || []).map((c,
|
|
1840
|
-
const
|
|
2042
|
+
i && i.type === "categorical" && /* @__PURE__ */ S("div", { className: "bm-widget__categories", children: (i.categories || []).map((c, d) => {
|
|
2043
|
+
const m = Math.round(d / Math.max(i.categories.length, 1) * 360);
|
|
1841
2044
|
return /* @__PURE__ */ S(
|
|
1842
2045
|
"span",
|
|
1843
2046
|
{
|
|
1844
2047
|
className: "bm-widget__category-chip",
|
|
1845
|
-
style: { background: `hsl(${
|
|
2048
|
+
style: { background: `hsl(${m},70%,50%)` },
|
|
1846
2049
|
children: c
|
|
1847
2050
|
},
|
|
1848
2051
|
c
|
|
1849
2052
|
);
|
|
1850
2053
|
}) }),
|
|
1851
|
-
/* @__PURE__ */
|
|
2054
|
+
/* @__PURE__ */ w("label", { className: "bm-widget__label", htmlFor: "bm-opacity-slider", children: [
|
|
1852
2055
|
"Opacity (",
|
|
1853
|
-
Math.round(
|
|
2056
|
+
Math.round(r * 100),
|
|
1854
2057
|
"%)"
|
|
1855
2058
|
] }),
|
|
1856
2059
|
/* @__PURE__ */ S(
|
|
@@ -1862,12 +2065,12 @@ function ss({
|
|
|
1862
2065
|
min: "0",
|
|
1863
2066
|
max: "1",
|
|
1864
2067
|
step: "0.01",
|
|
1865
|
-
value:
|
|
1866
|
-
onChange: (c) =>
|
|
2068
|
+
value: r,
|
|
2069
|
+
onChange: (c) => o(parseFloat(c.target.value))
|
|
1867
2070
|
}
|
|
1868
2071
|
),
|
|
1869
|
-
|
|
1870
|
-
/* @__PURE__ */
|
|
2072
|
+
s && /* @__PURE__ */ w("div", { className: "bm-widget__popup", children: [
|
|
2073
|
+
/* @__PURE__ */ w("div", { className: "bm-widget__popup-header", children: [
|
|
1871
2074
|
/* @__PURE__ */ S("span", { children: "Block attributes" }),
|
|
1872
2075
|
/* @__PURE__ */ S(
|
|
1873
2076
|
"button",
|
|
@@ -1880,159 +2083,159 @@ function ss({
|
|
|
1880
2083
|
}
|
|
1881
2084
|
)
|
|
1882
2085
|
] }),
|
|
1883
|
-
/* @__PURE__ */ S("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ S("tbody", { children: Object.entries(
|
|
2086
|
+
/* @__PURE__ */ S("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ S("tbody", { children: Object.entries(s).map(([c, d]) => /* @__PURE__ */ w("tr", { children: [
|
|
1884
2087
|
/* @__PURE__ */ S("th", { children: c }),
|
|
1885
|
-
/* @__PURE__ */ S("td", { children:
|
|
2088
|
+
/* @__PURE__ */ S("td", { children: d == null ? "—" : String(d) })
|
|
1886
2089
|
] }, c)) }) })
|
|
1887
2090
|
] })
|
|
1888
2091
|
] });
|
|
1889
2092
|
}
|
|
1890
|
-
const
|
|
2093
|
+
const hn = [
|
|
1891
2094
|
{ minZoom: 0, lodKey: "thumb" },
|
|
1892
2095
|
{ minZoom: 4, lodKey: "medium" },
|
|
1893
2096
|
{ minZoom: 7, lodKey: "full" }
|
|
1894
|
-
],
|
|
1895
|
-
function
|
|
2097
|
+
], bt = 50;
|
|
2098
|
+
function pn(e, n, t = hn) {
|
|
1896
2099
|
var i;
|
|
1897
|
-
const
|
|
1898
|
-
if (!
|
|
2100
|
+
const r = e.lod_urls;
|
|
2101
|
+
if (!r || typeof r != "object" || Array.isArray(r))
|
|
1899
2102
|
return e.image_url || "";
|
|
1900
|
-
let
|
|
1901
|
-
for (const
|
|
1902
|
-
n >=
|
|
1903
|
-
return
|
|
2103
|
+
let o = ((i = t[0]) == null ? void 0 : i.lodKey) ?? "thumb";
|
|
2104
|
+
for (const s of t)
|
|
2105
|
+
n >= s.minZoom && (o = s.lodKey);
|
|
2106
|
+
return r[o] || e.image_url || "";
|
|
1904
2107
|
}
|
|
1905
|
-
function
|
|
2108
|
+
function gn(e) {
|
|
1906
2109
|
return [...e].sort((n, t) => (n.from_depth ?? 0) - (t.from_depth ?? 0));
|
|
1907
2110
|
}
|
|
1908
|
-
function
|
|
2111
|
+
function bn(e) {
|
|
1909
2112
|
const n = {};
|
|
1910
2113
|
for (const t of e) {
|
|
1911
|
-
const
|
|
1912
|
-
n[
|
|
2114
|
+
const r = t.photo_set != null && t.photo_set !== "" ? String(t.photo_set) : "default";
|
|
2115
|
+
n[r] || (n[r] = []), n[r].push(t);
|
|
1913
2116
|
}
|
|
1914
2117
|
return n;
|
|
1915
2118
|
}
|
|
1916
|
-
function
|
|
1917
|
-
const
|
|
1918
|
-
if (e >= n || t <= 0) return
|
|
1919
|
-
const
|
|
1920
|
-
for (let
|
|
1921
|
-
const a = Math.round(
|
|
1922
|
-
|
|
2119
|
+
function yn(e, n, t = 10) {
|
|
2120
|
+
const r = [];
|
|
2121
|
+
if (e >= n || t <= 0) return r;
|
|
2122
|
+
const o = Math.ceil(e / t) * t, i = t * 1e-9;
|
|
2123
|
+
for (let s = o; s <= n + i; s += t) {
|
|
2124
|
+
const a = Math.round(s * 1e6) / 1e6;
|
|
2125
|
+
r.push({ depth: a, label: `${a} m` });
|
|
1923
2126
|
}
|
|
1924
|
-
return
|
|
2127
|
+
return r;
|
|
1925
2128
|
}
|
|
1926
|
-
function
|
|
2129
|
+
function _n(e) {
|
|
1927
2130
|
return e >= 9 ? 1 : e >= 7 ? 2 : e >= 5 ? 5 : e >= 3 ? 10 : 20;
|
|
1928
2131
|
}
|
|
1929
|
-
function
|
|
2132
|
+
function yt(e) {
|
|
1930
2133
|
return `tray_${String(e).padStart(3, "0")}.jpg`;
|
|
1931
2134
|
}
|
|
1932
|
-
function
|
|
1933
|
-
const
|
|
2135
|
+
function Nn(e, n, t, r, o = "Tray Images", i = yt) {
|
|
2136
|
+
const s = (t ?? "").replace(/\/$/, ""), a = (r ?? "").replace(/\/$/, "");
|
|
1934
2137
|
return n.map((l, u) => {
|
|
1935
|
-
const c = l.filename ?? i(u),
|
|
2138
|
+
const c = l.filename ?? i(u), d = l.photoSet ?? o;
|
|
1936
2139
|
return {
|
|
1937
2140
|
hole_id: e,
|
|
1938
2141
|
from_depth: l.fromDepth,
|
|
1939
2142
|
to_depth: l.toDepth,
|
|
1940
|
-
photo_set:
|
|
1941
|
-
image_url: `${
|
|
2143
|
+
photo_set: d,
|
|
2144
|
+
image_url: `${s}/${c}`,
|
|
1942
2145
|
lod_urls: {
|
|
1943
|
-
thumb: `${
|
|
2146
|
+
thumb: `${s}/${c}`,
|
|
1944
2147
|
full: `${a}/${c}`
|
|
1945
2148
|
}
|
|
1946
2149
|
};
|
|
1947
2150
|
});
|
|
1948
2151
|
}
|
|
1949
|
-
function
|
|
1950
|
-
const
|
|
1951
|
-
return Math.max(1, Math.round(e * t *
|
|
2152
|
+
function pr(e, n, t = bt) {
|
|
2153
|
+
const r = n / 5;
|
|
2154
|
+
return Math.max(1, Math.round(e * t * r));
|
|
1952
2155
|
}
|
|
1953
|
-
const
|
|
1954
|
-
function
|
|
2156
|
+
const Re = 5, Qe = 1.12, vn = 0.05, En = 40;
|
|
2157
|
+
function An({
|
|
1955
2158
|
photos: e = [],
|
|
1956
2159
|
holeId: n = "",
|
|
1957
2160
|
initialZoom: t = 5,
|
|
1958
|
-
transform:
|
|
1959
|
-
onTransformChange:
|
|
2161
|
+
transform: r,
|
|
2162
|
+
onTransformChange: o
|
|
1960
2163
|
}) {
|
|
1961
|
-
const [i,
|
|
2164
|
+
const [i, s] = K({ scale: 1, tx: 0, ty: 0 }), a = r ?? i, l = ye(a);
|
|
1962
2165
|
l.current = a;
|
|
1963
|
-
const u =
|
|
1964
|
-
(
|
|
1965
|
-
const
|
|
1966
|
-
|
|
2166
|
+
const u = Pe(
|
|
2167
|
+
(h) => {
|
|
2168
|
+
const P = typeof h == "function" ? h(l.current) : h;
|
|
2169
|
+
o ? o(P) : s(P);
|
|
1967
2170
|
},
|
|
1968
|
-
[
|
|
1969
|
-
), [c,
|
|
1970
|
-
const
|
|
1971
|
-
for (const
|
|
1972
|
-
const
|
|
1973
|
-
|
|
2171
|
+
[o]
|
|
2172
|
+
), [c, d] = K(!1), m = ye(null), f = ye(null), b = ee(() => gn(e), [e]), p = ee(() => bn(b), [b]), v = ee(() => {
|
|
2173
|
+
const h = /* @__PURE__ */ new Set();
|
|
2174
|
+
for (const P of e) {
|
|
2175
|
+
const A = P.photo_set != null && P.photo_set !== "" ? String(P.photo_set) : "default";
|
|
2176
|
+
h.add(A);
|
|
1974
2177
|
}
|
|
1975
|
-
return [...
|
|
1976
|
-
}, [e]), { minDepth:
|
|
1977
|
-
if (!
|
|
1978
|
-
const
|
|
2178
|
+
return [...h];
|
|
2179
|
+
}, [e]), { minDepth: g, maxDepth: L } = ee(() => {
|
|
2180
|
+
if (!b.length) return { minDepth: 0, maxDepth: 0 };
|
|
2181
|
+
const h = b.map((P) => P.to_depth ?? P.from_depth ?? 0);
|
|
1979
2182
|
return {
|
|
1980
|
-
minDepth:
|
|
1981
|
-
maxDepth: Math.max(...
|
|
2183
|
+
minDepth: b[0].from_depth ?? 0,
|
|
2184
|
+
maxDepth: Math.max(...h)
|
|
1982
2185
|
};
|
|
1983
|
-
}, [
|
|
1984
|
-
() => Math.max(1, Math.round((
|
|
1985
|
-
[
|
|
2186
|
+
}, [b]), C = bt * Re / 5, j = ee(
|
|
2187
|
+
() => Math.max(1, Math.round((L - g) * C)),
|
|
2188
|
+
[g, L, C]
|
|
1986
2189
|
), H = ee(() => {
|
|
1987
|
-
const
|
|
1988
|
-
return
|
|
1989
|
-
}, [
|
|
2190
|
+
const h = _n(Re);
|
|
2191
|
+
return yn(g, L, h);
|
|
2192
|
+
}, [g, L]), $ = 540 * Re / 5, D = ee(
|
|
1990
2193
|
() => Math.max(1, Math.min(10, Math.round(t * a.scale))),
|
|
1991
2194
|
[t, a.scale]
|
|
1992
|
-
), R =
|
|
1993
|
-
|
|
1994
|
-
const
|
|
1995
|
-
u((
|
|
1996
|
-
const
|
|
2195
|
+
), R = Pe((h) => {
|
|
2196
|
+
h.preventDefault();
|
|
2197
|
+
const P = h.deltaY < 0 ? Qe : 1 / Qe, A = f.current.getBoundingClientRect(), z = h.clientX - A.left, E = h.clientY - A.top;
|
|
2198
|
+
u((_) => {
|
|
2199
|
+
const y = Math.max(vn, Math.min(En, _.scale * P)), I = y / _.scale;
|
|
1997
2200
|
return {
|
|
1998
|
-
scale:
|
|
1999
|
-
tx: z - (z -
|
|
2000
|
-
ty:
|
|
2201
|
+
scale: y,
|
|
2202
|
+
tx: z - (z - _.tx) * I,
|
|
2203
|
+
ty: E - (E - _.ty) * I
|
|
2001
2204
|
};
|
|
2002
2205
|
});
|
|
2003
2206
|
}, [u]);
|
|
2004
|
-
|
|
2005
|
-
const
|
|
2006
|
-
if (
|
|
2007
|
-
return
|
|
2207
|
+
te(() => {
|
|
2208
|
+
const h = f.current;
|
|
2209
|
+
if (h)
|
|
2210
|
+
return h.addEventListener("wheel", R, { passive: !1 }), () => h.removeEventListener("wheel", R);
|
|
2008
2211
|
}, [R]);
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2011
|
-
x:
|
|
2012
|
-
y:
|
|
2212
|
+
const G = Pe((h) => {
|
|
2213
|
+
h.button === 0 && (h.preventDefault(), m.current = {
|
|
2214
|
+
x: h.clientX,
|
|
2215
|
+
y: h.clientY,
|
|
2013
2216
|
tx: l.current.tx,
|
|
2014
2217
|
ty: l.current.ty
|
|
2015
|
-
},
|
|
2218
|
+
}, d(!0));
|
|
2016
2219
|
}, []);
|
|
2017
|
-
return
|
|
2018
|
-
const
|
|
2019
|
-
if (!
|
|
2020
|
-
const { tx: z, ty:
|
|
2021
|
-
u((
|
|
2022
|
-
...
|
|
2023
|
-
tx: z + (
|
|
2024
|
-
ty:
|
|
2220
|
+
return te(() => {
|
|
2221
|
+
const h = (A) => {
|
|
2222
|
+
if (!m.current) return;
|
|
2223
|
+
const { tx: z, ty: E, x: _, y } = m.current;
|
|
2224
|
+
u((I) => ({
|
|
2225
|
+
...I,
|
|
2226
|
+
tx: z + (A.clientX - _),
|
|
2227
|
+
ty: E + (A.clientY - y)
|
|
2025
2228
|
}));
|
|
2026
|
-
},
|
|
2027
|
-
|
|
2229
|
+
}, P = () => {
|
|
2230
|
+
m.current = null, d(!1);
|
|
2028
2231
|
};
|
|
2029
|
-
return window.addEventListener("mousemove",
|
|
2030
|
-
window.removeEventListener("mousemove",
|
|
2232
|
+
return window.addEventListener("mousemove", h), window.addEventListener("mouseup", P), () => {
|
|
2233
|
+
window.removeEventListener("mousemove", h), window.removeEventListener("mouseup", P);
|
|
2031
2234
|
};
|
|
2032
|
-
}, [u]), /* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */
|
|
2235
|
+
}, [u]), /* @__PURE__ */ w("div", { className: "core-photo-table", children: [
|
|
2236
|
+
/* @__PURE__ */ w("div", { className: "core-photo-controls", children: [
|
|
2034
2237
|
n && /* @__PURE__ */ S("span", { className: "core-photo-hole-id", children: n }),
|
|
2035
|
-
/* @__PURE__ */
|
|
2238
|
+
/* @__PURE__ */ w("span", { className: "core-photo-zoom-label", children: [
|
|
2036
2239
|
Math.round(a.scale * 100),
|
|
2037
2240
|
"%"
|
|
2038
2241
|
] }),
|
|
@@ -2047,16 +2250,16 @@ function mn({
|
|
|
2047
2250
|
}
|
|
2048
2251
|
)
|
|
2049
2252
|
] }),
|
|
2050
|
-
e.length > 0 && /* @__PURE__ */
|
|
2253
|
+
e.length > 0 && /* @__PURE__ */ w("div", { className: "core-photo-col-headers", children: [
|
|
2051
2254
|
/* @__PURE__ */ S("div", { className: "core-photo-ruler-spacer" }),
|
|
2052
|
-
|
|
2255
|
+
v.map((h) => /* @__PURE__ */ S(
|
|
2053
2256
|
"div",
|
|
2054
2257
|
{
|
|
2055
2258
|
className: "core-photo-set-header",
|
|
2056
|
-
style: { width:
|
|
2057
|
-
children:
|
|
2259
|
+
style: { width: $ },
|
|
2260
|
+
children: h
|
|
2058
2261
|
},
|
|
2059
|
-
|
|
2262
|
+
h
|
|
2060
2263
|
))
|
|
2061
2264
|
] }),
|
|
2062
2265
|
e.length === 0 ? /* @__PURE__ */ S("div", { className: "core-photo-empty", children: "No photos to display." }) : /* @__PURE__ */ S(
|
|
@@ -2064,13 +2267,13 @@ function mn({
|
|
|
2064
2267
|
{
|
|
2065
2268
|
className: `core-photo-scroll${c ? " is-dragging" : ""}`,
|
|
2066
2269
|
ref: f,
|
|
2067
|
-
onMouseDown:
|
|
2068
|
-
children: /* @__PURE__ */
|
|
2270
|
+
onMouseDown: G,
|
|
2271
|
+
children: /* @__PURE__ */ w(
|
|
2069
2272
|
"div",
|
|
2070
2273
|
{
|
|
2071
2274
|
className: "core-photo-inner",
|
|
2072
2275
|
style: {
|
|
2073
|
-
height:
|
|
2276
|
+
height: j,
|
|
2074
2277
|
transform: `translate(${a.tx}px, ${a.ty}px) scale(${a.scale})`,
|
|
2075
2278
|
transformOrigin: "0 0"
|
|
2076
2279
|
},
|
|
@@ -2079,60 +2282,60 @@ function mn({
|
|
|
2079
2282
|
"div",
|
|
2080
2283
|
{
|
|
2081
2284
|
className: "core-photo-depth-ruler",
|
|
2082
|
-
style: { height:
|
|
2083
|
-
children: H.map(({ depth:
|
|
2285
|
+
style: { height: j },
|
|
2286
|
+
children: H.map(({ depth: h, label: P }) => /* @__PURE__ */ S(
|
|
2084
2287
|
"div",
|
|
2085
2288
|
{
|
|
2086
2289
|
className: "core-photo-depth-marker",
|
|
2087
2290
|
style: {
|
|
2088
|
-
top: Math.round((
|
|
2291
|
+
top: Math.round((h - g) * C)
|
|
2089
2292
|
},
|
|
2090
|
-
children:
|
|
2293
|
+
children: P
|
|
2091
2294
|
},
|
|
2092
|
-
|
|
2295
|
+
h
|
|
2093
2296
|
))
|
|
2094
2297
|
}
|
|
2095
2298
|
),
|
|
2096
|
-
|
|
2299
|
+
v.map((h) => /* @__PURE__ */ S(
|
|
2097
2300
|
"div",
|
|
2098
2301
|
{
|
|
2099
2302
|
className: "core-photo-col-body",
|
|
2100
|
-
style: { height:
|
|
2101
|
-
children:
|
|
2102
|
-
const
|
|
2103
|
-
(
|
|
2104
|
-
),
|
|
2303
|
+
style: { height: j, width: $ },
|
|
2304
|
+
children: p[h].map((P) => {
|
|
2305
|
+
const A = P.from_depth ?? 0, z = P.to_depth ?? A, E = Math.round(
|
|
2306
|
+
(A - g) * C
|
|
2307
|
+
), _ = Math.max(
|
|
2105
2308
|
2,
|
|
2106
|
-
Math.round((z -
|
|
2107
|
-
),
|
|
2108
|
-
return /* @__PURE__ */
|
|
2309
|
+
Math.round((z - A) * C)
|
|
2310
|
+
), y = pn(P, D);
|
|
2311
|
+
return /* @__PURE__ */ w(
|
|
2109
2312
|
"div",
|
|
2110
2313
|
{
|
|
2111
2314
|
className: "core-photo-item",
|
|
2112
|
-
style: { top:
|
|
2113
|
-
title: `${
|
|
2315
|
+
style: { top: E, height: _, width: $ },
|
|
2316
|
+
title: `${A}–${z} m`,
|
|
2114
2317
|
children: [
|
|
2115
|
-
|
|
2318
|
+
y ? /* @__PURE__ */ S(
|
|
2116
2319
|
"img",
|
|
2117
2320
|
{
|
|
2118
|
-
src:
|
|
2119
|
-
alt: `Core ${
|
|
2321
|
+
src: y,
|
|
2322
|
+
alt: `Core ${A}–${z} m`,
|
|
2120
2323
|
loading: "lazy"
|
|
2121
2324
|
}
|
|
2122
2325
|
) : /* @__PURE__ */ S("div", { className: "core-photo-no-image" }),
|
|
2123
|
-
|
|
2124
|
-
|
|
2326
|
+
_ >= 18 && /* @__PURE__ */ w("span", { className: "core-photo-item-label", children: [
|
|
2327
|
+
A,
|
|
2125
2328
|
"–",
|
|
2126
2329
|
z,
|
|
2127
2330
|
" m"
|
|
2128
2331
|
] })
|
|
2129
2332
|
]
|
|
2130
2333
|
},
|
|
2131
|
-
`${
|
|
2334
|
+
`${P.hole_id ?? ""}-${A}-${z}-${h}`
|
|
2132
2335
|
);
|
|
2133
2336
|
})
|
|
2134
2337
|
},
|
|
2135
|
-
|
|
2338
|
+
h
|
|
2136
2339
|
))
|
|
2137
2340
|
]
|
|
2138
2341
|
}
|
|
@@ -2141,33 +2344,33 @@ function mn({
|
|
|
2141
2344
|
)
|
|
2142
2345
|
] });
|
|
2143
2346
|
}
|
|
2144
|
-
function
|
|
2347
|
+
function gr({
|
|
2145
2348
|
holeId: e = "",
|
|
2146
2349
|
trays: n = [],
|
|
2147
2350
|
thumbBaseUrl: t = "",
|
|
2148
|
-
fullBaseUrl:
|
|
2149
|
-
photoSet:
|
|
2150
|
-
getFilename: i =
|
|
2151
|
-
initialZoom:
|
|
2351
|
+
fullBaseUrl: r = "",
|
|
2352
|
+
photoSet: o = "Tray Images",
|
|
2353
|
+
getFilename: i = yt,
|
|
2354
|
+
initialZoom: s = 5,
|
|
2152
2355
|
transform: a,
|
|
2153
2356
|
onTransformChange: l
|
|
2154
2357
|
}) {
|
|
2155
2358
|
const u = ee(
|
|
2156
|
-
() =>
|
|
2157
|
-
[e, n, t,
|
|
2359
|
+
() => Nn(e, n, t, r, o, i),
|
|
2360
|
+
[e, n, t, r, o, i]
|
|
2158
2361
|
);
|
|
2159
2362
|
return /* @__PURE__ */ S(
|
|
2160
|
-
|
|
2363
|
+
An,
|
|
2161
2364
|
{
|
|
2162
2365
|
photos: u,
|
|
2163
2366
|
holeId: e,
|
|
2164
|
-
initialZoom:
|
|
2367
|
+
initialZoom: s,
|
|
2165
2368
|
transform: a,
|
|
2166
2369
|
onTransformChange: l
|
|
2167
2370
|
}
|
|
2168
2371
|
);
|
|
2169
2372
|
}
|
|
2170
|
-
function
|
|
2373
|
+
function br(e) {
|
|
2171
2374
|
const n = typeof e == "string" ? JSON.parse(e) : e;
|
|
2172
2375
|
if (n.schema_version !== "1.0")
|
|
2173
2376
|
throw new Error(
|
|
@@ -2175,18 +2378,18 @@ function is(e) {
|
|
|
2175
2378
|
);
|
|
2176
2379
|
if (!Array.isArray(n.blocks))
|
|
2177
2380
|
throw new Error('"blocks" must be a JSON array.');
|
|
2178
|
-
const t = n.blocks.map((
|
|
2179
|
-
if (
|
|
2180
|
-
if (
|
|
2181
|
-
if (!Array.isArray(
|
|
2182
|
-
if (!Array.isArray(
|
|
2381
|
+
const t = n.blocks.map((r, o) => {
|
|
2382
|
+
if (r.id == null) throw new Error(`Block at index ${o} is missing required field "id".`);
|
|
2383
|
+
if (r.name == null) throw new Error(`Block "${r.id}" is missing required field "name".`);
|
|
2384
|
+
if (!Array.isArray(r.vertices)) throw new Error(`Block "${r.id}" is missing required field "vertices".`);
|
|
2385
|
+
if (!Array.isArray(r.triangles)) throw new Error(`Block "${r.id}" is missing required field "triangles".`);
|
|
2183
2386
|
return {
|
|
2184
|
-
id:
|
|
2185
|
-
name:
|
|
2186
|
-
vertices:
|
|
2187
|
-
triangles:
|
|
2188
|
-
attributes:
|
|
2189
|
-
material:
|
|
2387
|
+
id: r.id,
|
|
2388
|
+
name: r.name,
|
|
2389
|
+
vertices: r.vertices,
|
|
2390
|
+
triangles: r.triangles,
|
|
2391
|
+
attributes: r.attributes ?? {},
|
|
2392
|
+
material: r.material ?? {}
|
|
2190
2393
|
};
|
|
2191
2394
|
});
|
|
2192
2395
|
return {
|
|
@@ -2195,244 +2398,249 @@ function is(e) {
|
|
|
2195
2398
|
blocks: t
|
|
2196
2399
|
};
|
|
2197
2400
|
}
|
|
2198
|
-
function
|
|
2401
|
+
function Sn(e) {
|
|
2199
2402
|
const n = new Q.BufferGeometry(), t = new Float32Array(e.vertices.length * 3);
|
|
2200
|
-
e.vertices.forEach(([
|
|
2201
|
-
t[a * 3] =
|
|
2403
|
+
e.vertices.forEach(([o, i, s], a) => {
|
|
2404
|
+
t[a * 3] = o, t[a * 3 + 1] = i, t[a * 3 + 2] = s;
|
|
2202
2405
|
}), n.setAttribute("position", new Q.BufferAttribute(t, 3));
|
|
2203
|
-
const
|
|
2204
|
-
return e.triangles.forEach(([
|
|
2205
|
-
|
|
2206
|
-
}), n.setIndex(new Q.BufferAttribute(
|
|
2406
|
+
const r = new Uint32Array(e.triangles.length * 3);
|
|
2407
|
+
return e.triangles.forEach(([o, i, s], a) => {
|
|
2408
|
+
r[a * 3] = o, r[a * 3 + 1] = i, r[a * 3 + 2] = s;
|
|
2409
|
+
}), n.setIndex(new Q.BufferAttribute(r, 1)), n;
|
|
2207
2410
|
}
|
|
2208
|
-
function
|
|
2209
|
-
const { defaultOpacity:
|
|
2411
|
+
function yr(e, n, t = {}) {
|
|
2412
|
+
const { defaultOpacity: r = 1 } = t, o = new Q.Group();
|
|
2210
2413
|
return n.blocks.forEach((i) => {
|
|
2211
|
-
var
|
|
2212
|
-
const
|
|
2414
|
+
var p, v;
|
|
2415
|
+
const s = Sn(i), a = ((p = i.material) == null ? void 0 : p.color) ?? "#888888", l = ((v = i.material) == null ? void 0 : v.opacity) ?? r, u = l < 1, c = new Q.MeshStandardMaterial({
|
|
2213
2416
|
color: new Q.Color(a),
|
|
2214
2417
|
opacity: l,
|
|
2215
2418
|
transparent: u,
|
|
2216
2419
|
side: Q.DoubleSide,
|
|
2217
2420
|
flatShading: !0
|
|
2218
|
-
}),
|
|
2219
|
-
|
|
2421
|
+
}), d = new Q.Mesh(s, c);
|
|
2422
|
+
d.userData = {
|
|
2220
2423
|
id: i.id,
|
|
2221
2424
|
attributes: i.attributes
|
|
2222
2425
|
};
|
|
2223
|
-
const
|
|
2224
|
-
|
|
2225
|
-
}), e.add(
|
|
2426
|
+
const m = new Q.EdgesGeometry(s, 15), f = new Q.LineBasicMaterial({ color: "#ffffbb", linewidth: 1 }), b = new Q.LineSegments(m, f);
|
|
2427
|
+
b.visible = !1, d.add(b), o.add(d);
|
|
2428
|
+
}), e.add(o), o;
|
|
2226
2429
|
}
|
|
2227
2430
|
export {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2431
|
+
vr as ALPHA,
|
|
2432
|
+
Er as ASSAY_COLOR_PALETTE_10,
|
|
2433
|
+
Mt as ASSAY_NON_VALUE_FIELDS,
|
|
2434
|
+
Y as AZIMUTH,
|
|
2435
|
+
Ar as BASELODE_COLORWAY,
|
|
2436
|
+
Sr as BASELODE_DARK,
|
|
2437
|
+
Tr as BASELODE_DARK_TEMPLATE,
|
|
2438
|
+
Lr as BASELODE_DARK_TEMPLATE_NAME,
|
|
2439
|
+
Ir as BASELODE_DATA_MODEL_DRILL_ASSAY,
|
|
2440
|
+
Cr as BASELODE_DATA_MODEL_DRILL_COLLAR,
|
|
2441
|
+
Et as BASELODE_DATA_MODEL_DRILL_GEOLOGY,
|
|
2442
|
+
Mr as BASELODE_DATA_MODEL_DRILL_SURVEY,
|
|
2443
|
+
Pr as BASELODE_DATA_MODEL_GEOPHYSICS,
|
|
2444
|
+
Or as BASELODE_DATA_MODEL_STRUCTURAL_POINT,
|
|
2445
|
+
xr as BASELODE_DATA_MODEL_SURFACE_SAMPLE,
|
|
2446
|
+
Dr as BASELODE_LIGHT,
|
|
2447
|
+
Rr as BASELODE_LIGHT_TEMPLATE,
|
|
2448
|
+
zr as BASELODE_LIGHT_TEMPLATE_NAME,
|
|
2246
2449
|
$e as BASELODE_TEMPLATE,
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2450
|
+
Fr as BASELODE_TEMPLATE_NAME,
|
|
2451
|
+
bt as BASE_PIXELS_PER_METRE,
|
|
2452
|
+
$r as BETA,
|
|
2453
|
+
kr as BUILTIN_COLOUR_MAPS,
|
|
2454
|
+
fr as Baselode3DControls,
|
|
2455
|
+
wr as Baselode3DScene,
|
|
2456
|
+
hr as BlockModelWidget,
|
|
2457
|
+
Ur as CHART_OPTIONS,
|
|
2458
|
+
Hr as COLLAR_ID,
|
|
2459
|
+
Gr as COMMENTS,
|
|
2460
|
+
Br as COMMENT_COLUMN_NAMES,
|
|
2461
|
+
Vr as COMMODITY_COLOURS,
|
|
2462
|
+
jr as CRS,
|
|
2463
|
+
An as CorePhotoTable,
|
|
2464
|
+
gr as CorePhotoViewer,
|
|
2465
|
+
Yr as DATASOURCE,
|
|
2466
|
+
Wr as DATASOURCE_HOLE_ID,
|
|
2467
|
+
qr as DATASOURCE_SAMPLE_ID,
|
|
2468
|
+
Xr as DATASOURCE_SURFACE_SAMPLE_ID,
|
|
2469
|
+
Kr as DATE_END,
|
|
2470
|
+
Zr as DATE_START,
|
|
2471
|
+
Jr as DEFAULT_ATTRIBUTE_COLUMN,
|
|
2472
|
+
Qr as DEFAULT_COLUMN_MAP,
|
|
2473
|
+
hn as DEFAULT_LOD_BREAKPOINTS,
|
|
2474
|
+
eo as DEFAULT_UNIT_COLUMN,
|
|
2475
|
+
V as DEPTH,
|
|
2476
|
+
W as DIP,
|
|
2477
|
+
Ge as DISPLAY_CATEGORICAL,
|
|
2478
|
+
ze as DISPLAY_COMMENT,
|
|
2479
|
+
to as DISPLAY_HIDDEN,
|
|
2480
|
+
At as DISPLAY_NUMERIC,
|
|
2481
|
+
tt as DISPLAY_TADPOLE,
|
|
2277
2482
|
pe as EASTING,
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2483
|
+
Ee as ELEVATION,
|
|
2484
|
+
no as ERROR_COLOR,
|
|
2485
|
+
ro as EXTRA,
|
|
2486
|
+
oo as FALLBACK_COLOUR,
|
|
2487
|
+
so as FOV_MAX_DEG,
|
|
2488
|
+
io as FOV_MIN_DEG,
|
|
2489
|
+
M as FROM,
|
|
2285
2490
|
le as GEOLOGY_CODE,
|
|
2286
2491
|
ce as GEOLOGY_DESCRIPTION,
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2492
|
+
ao as GEOPHYSICS_NULL,
|
|
2493
|
+
et as GEOPHYSICS_NULL_SENTINEL,
|
|
2494
|
+
lo as HIDDEN_COLUMNS,
|
|
2495
|
+
N as HOLE_ID,
|
|
2496
|
+
co as HOLE_TYPE,
|
|
2497
|
+
re as LATITUDE,
|
|
2498
|
+
uo as LITHOLOGY_COLOURS,
|
|
2499
|
+
oe as LONGITUDE,
|
|
2500
|
+
mo as MAX_DEPTH,
|
|
2501
|
+
ve as MID,
|
|
2502
|
+
ge as NORTHING,
|
|
2503
|
+
fo as NUMERIC_LINE_COLOR,
|
|
2504
|
+
ho as NUMERIC_MARKER_COLOR,
|
|
2300
2505
|
de as PROJECT_ID,
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2506
|
+
po as REPORT_NUMBER,
|
|
2507
|
+
go as SAMPLE_ID,
|
|
2508
|
+
bo as STRIKE,
|
|
2509
|
+
yo as STRIP_LOG_DEFAULT_COLOR,
|
|
2510
|
+
_o as STRIP_LOG_DEFAULT_LATERAL_OFFSET,
|
|
2511
|
+
No as STRIP_LOG_DEFAULT_PANEL_WIDTH,
|
|
2512
|
+
vo as SURFACE_SAMPLE_ID,
|
|
2513
|
+
Eo as SURFACE_SAMPLE_TYPE,
|
|
2514
|
+
Ao as SURVEY_TYPE,
|
|
2515
|
+
O as TO,
|
|
2516
|
+
ir as TracePlot,
|
|
2517
|
+
yr as addGradeBlocksToScene,
|
|
2518
|
+
So as addRasterOverlay,
|
|
2519
|
+
To as alphaBetaToNormal,
|
|
2520
|
+
mr as annotationsFromIntervals,
|
|
2521
|
+
Xn as assembleDataset,
|
|
2522
|
+
Un as attachAssayPositions,
|
|
2523
|
+
kn as balancedTangentialDesurvey,
|
|
2524
|
+
kt as buildAssayState,
|
|
2525
|
+
Lo as buildCategoricalStripLogConfig,
|
|
2526
|
+
rn as buildCommentsConfig,
|
|
2527
|
+
yn as buildDepthMarkers,
|
|
2528
|
+
Io as buildEqualRangeColorScale,
|
|
2529
|
+
It as buildIntervalPoints,
|
|
2530
|
+
St as buildPlotConfig,
|
|
2531
|
+
sr as buildStrikeDipSymbol,
|
|
2532
|
+
Co as buildStripLogGroup,
|
|
2533
|
+
Mo as buildStripLogLinePoints,
|
|
2534
|
+
Po as buildStructuralDiscs,
|
|
2535
|
+
or as buildStructuralStripConfig,
|
|
2536
|
+
nn as buildTadpoleConfig,
|
|
2537
|
+
wn as buildTraces,
|
|
2538
|
+
Nn as buildTrayPhotos,
|
|
2539
|
+
Oo as buildViewSignature,
|
|
2540
|
+
xo as calculateBlockVolume,
|
|
2541
|
+
Do as calculatePropertyStats,
|
|
2542
|
+
vt as classifyColumns,
|
|
2543
|
+
Ro as clearRasterOverlays,
|
|
2544
|
+
zo as clearStripLogs,
|
|
2545
|
+
qn as coerceNumeric,
|
|
2546
|
+
Fo as computeStructuralPositions,
|
|
2547
|
+
$o as createRasterOverlay,
|
|
2548
|
+
ko as defaultChartType,
|
|
2549
|
+
yt as defaultTrayFilename,
|
|
2550
|
+
pr as depthIntervalToPixels,
|
|
2551
|
+
_n as depthMarkerInterval,
|
|
2552
|
+
Te as deriveAssayProps,
|
|
2553
|
+
wo as derivePropertyMeta,
|
|
2554
|
+
Fn as desurveyTraces,
|
|
2555
|
+
Uo as dipAzimuthToNormal,
|
|
2556
|
+
Ho as dolly,
|
|
2557
|
+
Go as emitViewChangeIfNeeded,
|
|
2558
|
+
Bo as filterBlocks,
|
|
2559
|
+
Wn as filterByProject,
|
|
2560
|
+
Vo as fitCameraToBounds,
|
|
2561
|
+
jo as focusOnLastBounds,
|
|
2562
|
+
Tt as formatPropertyLabel,
|
|
2563
|
+
nr as geophysicsToStripLogs,
|
|
2564
|
+
Yo as getBlockStats,
|
|
2565
|
+
Wo as getCategoryHexColor,
|
|
2566
|
+
nt as getChartOptions,
|
|
2567
|
+
qo as getColorForValue,
|
|
2568
|
+
Xo as getColour,
|
|
2569
|
+
Ko as getEqualRangeBinIndex,
|
|
2570
|
+
Zo as getEqualRangeColor,
|
|
2571
|
+
Jo as getHoleVerticalExtent,
|
|
2572
|
+
Qo as getRasterOverlay,
|
|
2573
|
+
es as getViewState,
|
|
2574
|
+
Sn as gradeBlockToThreeGeometry,
|
|
2575
|
+
bn as groupPhotosBySet,
|
|
2576
|
+
Wt as groupRowsByHole,
|
|
2577
|
+
Lt as holeHasData,
|
|
2578
|
+
ts as interpolateTrace,
|
|
2579
|
+
dr as intervalsAsTubes,
|
|
2580
|
+
Yn as joinAssaysToTraces,
|
|
2581
|
+
ns as listRasterOverlays,
|
|
2582
|
+
Rn as loadAssayFile,
|
|
2583
|
+
$t as loadAssayHole,
|
|
2584
|
+
Ft as loadAssayMetadata,
|
|
2585
|
+
Vn as loadAssays,
|
|
2586
|
+
rs as loadBlockModelMetadata,
|
|
2587
|
+
Gn as loadCollars,
|
|
2588
|
+
jn as loadGeology,
|
|
2589
|
+
br as loadGradeBlocksFromJson,
|
|
2590
|
+
Bn as loadSurveys,
|
|
2591
|
+
Ce as loadTable,
|
|
2592
|
+
os as logDataInfo,
|
|
2593
|
+
ss as logDataWarning,
|
|
2594
|
+
is as lookDown,
|
|
2595
|
+
Ht as minimumCurvatureDesurvey,
|
|
2596
|
+
as as normalizeBlockRow,
|
|
2597
|
+
ls as normalizeBounds,
|
|
2598
|
+
xn as normalizeCsvRow,
|
|
2599
|
+
Ae as normalizeFieldName,
|
|
2600
|
+
cs as normalizeStripLogOptions,
|
|
2601
|
+
us as pan,
|
|
2602
|
+
Xt as parseAssayCsvTextToHoles,
|
|
2603
|
+
Dt as parseAssayHole,
|
|
2604
|
+
On as parseAssayHoleIds,
|
|
2605
|
+
xt as parseAssayHoleIdsWithAssays,
|
|
2606
|
+
Rt as parseAssaysCSV,
|
|
2607
|
+
ds as parseBlockModelCSV,
|
|
2608
|
+
Hn as parseDrillholesCSV,
|
|
2609
|
+
Kt as parseGeologyCsvText,
|
|
2610
|
+
tr as parseGeophysicsCSV,
|
|
2611
|
+
rr as parseLasFile,
|
|
2612
|
+
qt as parseStructuralCSV,
|
|
2613
|
+
Jn as parseStructuralIntervalsCSV,
|
|
2614
|
+
Zn as parseStructuralPointsCSV,
|
|
2615
|
+
zn as parseSurveyCSV,
|
|
2616
|
+
Qn as parseUnifiedDataset,
|
|
2617
|
+
Dn as pickFirstPresent,
|
|
2618
|
+
lr as planView,
|
|
2619
|
+
mn as projectTraceToSection,
|
|
2620
|
+
ms as recenterCameraToOrigin,
|
|
2621
|
+
fs as removeRasterOverlay,
|
|
2415
2622
|
st as reorderHoleIds,
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2623
|
+
hs as resolveColourMap,
|
|
2624
|
+
ps as resolvePropertyLabelParts,
|
|
2625
|
+
cr as sectionView,
|
|
2626
|
+
fn as sectionWindow,
|
|
2627
|
+
pn as selectPhotoLodUrl,
|
|
2628
|
+
gs as setControlMode,
|
|
2629
|
+
bs as setFov,
|
|
2630
|
+
ys as setRasterOverlayElevation,
|
|
2631
|
+
_s as setRasterOverlayOpacity,
|
|
2632
|
+
Ns as setRasterOverlayVisibility,
|
|
2633
|
+
vs as setStripLogs,
|
|
2634
|
+
Es as setViewState,
|
|
2635
|
+
er as significantIntercepts,
|
|
2636
|
+
gn as sortPhotosByDepth,
|
|
2429
2637
|
ie as standardizeColumns,
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2638
|
+
Pn as standardizeRowArray,
|
|
2639
|
+
$n as tangentialDesurvey,
|
|
2640
|
+
As as toError,
|
|
2641
|
+
ur as tracesAsSegments,
|
|
2642
|
+
ar as useDrillholeTraceGrid,
|
|
2643
|
+
Kn as validateStructuralPoints,
|
|
2644
|
+
U as withDataErrorContext
|
|
2437
2645
|
};
|
|
2438
2646
|
//# sourceMappingURL=baselode.js.map
|