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