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