@equinor/esv-intersection 3.0.12 → 3.1.0
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +608 -589
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/layers/CalloutCanvasLayer.d.ts +11 -0
- package/dist/layers/CalloutCanvasLayer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/layers/CalloutCanvasLayer.ts +98 -3
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as ot from "pixi.js";
|
|
2
|
-
import { autoDetectRenderer as cs, Container as Gi, Renderer as hs, RENDERER_TYPE as ls, Graphics as Gt, Point as qi, Texture as
|
|
2
|
+
import { autoDetectRenderer as cs, Container as Gi, Renderer as hs, RENDERER_TYPE as ls, Graphics as Gt, Point as qi, Texture as V, WRAP_MODES as ke, Rectangle as qt, groupD8 as Pn, MeshGeometry as Cn, Mesh as Ln, MeshMaterial as kn, SimpleRope as Qn } from "pixi.js";
|
|
3
3
|
function us(e) {
|
|
4
4
|
return e;
|
|
5
5
|
}
|
|
6
|
-
var
|
|
6
|
+
var Ue = 1, he = 2, nn = 3, ne = 4, Jn = 1e-6;
|
|
7
7
|
function fs(e) {
|
|
8
8
|
return "translate(" + e + ",0)";
|
|
9
9
|
}
|
|
@@ -20,17 +20,17 @@ function ms() {
|
|
|
20
20
|
return !this.__axis;
|
|
21
21
|
}
|
|
22
22
|
function ji(e, t) {
|
|
23
|
-
var n = [], i = null, r = null, s = 6, o = 6, a = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, h = e ===
|
|
23
|
+
var n = [], i = null, r = null, s = 6, o = 6, a = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, h = e === Ue || e === ne ? -1 : 1, l = e === ne || e === he ? "x" : "y", u = e === Ue || e === nn ? fs : ds;
|
|
24
24
|
function f(d) {
|
|
25
|
-
var
|
|
26
|
-
S = S.merge(S.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), T = T.merge(k), R = R.merge(k.append("line").attr("stroke", "currentColor").attr(l + "2", h * s)), P = P.merge(k.append("text").attr("fill", "currentColor").attr(l, h * y).attr("dy", e ===
|
|
25
|
+
var p = i ?? (t.ticks ? t.ticks.apply(t, n) : t.domain()), g = r ?? (t.tickFormat ? t.tickFormat.apply(t, n) : us), y = Math.max(s, 0) + a, m = t.range(), x = +m[0] + c, v = +m[m.length - 1] + c, M = (t.bandwidth ? gs : ps)(t.copy(), c), b = d.selection ? d.selection() : d, S = b.selectAll(".domain").data([null]), T = b.selectAll(".tick").data(p, t).order(), C = T.exit(), k = T.enter().append("g").attr("class", "tick"), R = T.select("line"), P = T.select("text");
|
|
26
|
+
S = S.merge(S.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), T = T.merge(k), R = R.merge(k.append("line").attr("stroke", "currentColor").attr(l + "2", h * s)), P = P.merge(k.append("text").attr("fill", "currentColor").attr(l, h * y).attr("dy", e === Ue ? "0em" : e === nn ? "0.71em" : "0.32em")), d !== b && (S = S.transition(d), T = T.transition(d), R = R.transition(d), P = P.transition(d), C = C.transition(d).attr("opacity", Jn).attr("transform", function(I) {
|
|
27
27
|
return isFinite(I = M(I)) ? u(I + c) : this.getAttribute("transform");
|
|
28
28
|
}), k.attr("opacity", Jn).attr("transform", function(I) {
|
|
29
29
|
var N = this.parentNode.__axis;
|
|
30
30
|
return u((N && isFinite(N = N(I)) ? N : M(I)) + c);
|
|
31
31
|
})), C.remove(), S.attr("d", e === ne || e === he ? o ? "M" + h * o + "," + x + "H" + c + "V" + v + "H" + h * o : "M" + c + "," + x + "V" + v : o ? "M" + x + "," + h * o + "V" + c + "H" + v + "V" + h * o : "M" + x + "," + c + "H" + v), T.attr("opacity", 1).attr("transform", function(I) {
|
|
32
32
|
return u(M(I) + c);
|
|
33
|
-
}), R.attr(l + "2", h * s), P.attr(l, h * y).text(
|
|
33
|
+
}), R.attr(l + "2", h * s), P.attr(l, h * y).text(g), b.filter(ms).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === he ? "start" : e === ne ? "end" : "middle"), b.each(function() {
|
|
34
34
|
this.__axis = M;
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -192,7 +192,7 @@ function sn(e, t) {
|
|
|
192
192
|
}
|
|
193
193
|
return n;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Ve(e, t) {
|
|
196
196
|
let n = 0;
|
|
197
197
|
if (t === void 0)
|
|
198
198
|
for (let i of e)
|
|
@@ -470,14 +470,14 @@ En(G, on, Ji(te, {
|
|
|
470
470
|
hex: ai,
|
|
471
471
|
// Deprecated! Use color.formatHex.
|
|
472
472
|
formatHex: ai,
|
|
473
|
-
formatHex8:
|
|
473
|
+
formatHex8: Us,
|
|
474
474
|
formatRgb: ci,
|
|
475
475
|
toString: ci
|
|
476
476
|
}));
|
|
477
477
|
function ai() {
|
|
478
478
|
return `#${Mt(this.r)}${Mt(this.g)}${Mt(this.b)}`;
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Us() {
|
|
481
481
|
return `#${Mt(this.r)}${Mt(this.g)}${Mt(this.b)}${Mt((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
482
482
|
}
|
|
483
483
|
function ci() {
|
|
@@ -507,13 +507,13 @@ function tr(e) {
|
|
|
507
507
|
var t = e.r / 255, n = e.g / 255, i = e.b / 255, r = Math.min(t, n, i), s = Math.max(t, n, i), o = NaN, a = s - r, c = (s + r) / 2;
|
|
508
508
|
return a ? (t === s ? o = (n - i) / a + (n < i) * 6 : n === s ? o = (i - t) / a + 2 : o = (t - n) / a + 4, a /= c < 0.5 ? s + r : 2 - s - r, o *= 60) : a = c > 0 && c < 1 ? 0 : o, new nt(o, a, c, e.opacity);
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Vs(e, t, n, i) {
|
|
511
511
|
return arguments.length === 1 ? tr(e) : new nt(e, t, n, i ?? 1);
|
|
512
512
|
}
|
|
513
513
|
function nt(e, t, n, i) {
|
|
514
514
|
this.h = +e, this.s = +t, this.l = +n, this.opacity = +i;
|
|
515
515
|
}
|
|
516
|
-
En(nt,
|
|
516
|
+
En(nt, Vs, Ji(te, {
|
|
517
517
|
brighter(e) {
|
|
518
518
|
return e = e == null ? ye : Math.pow(ye, e), new nt(this.h, this.s, this.l * e, this.opacity);
|
|
519
519
|
},
|
|
@@ -523,9 +523,9 @@ En(nt, Us, Ji(te, {
|
|
|
523
523
|
rgb() {
|
|
524
524
|
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, i = n + (n < 0.5 ? n : 1 - n) * t, r = 2 * n - i;
|
|
525
525
|
return new G(
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
526
|
+
We(e >= 240 ? e - 240 : e + 120, r, i),
|
|
527
|
+
We(e, r, i),
|
|
528
|
+
We(e < 120 ? e + 240 : e - 120, r, i),
|
|
529
529
|
this.opacity
|
|
530
530
|
);
|
|
531
531
|
},
|
|
@@ -546,28 +546,28 @@ function li(e) {
|
|
|
546
546
|
function re(e) {
|
|
547
547
|
return Math.max(0, Math.min(1, e || 0));
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function We(e, t, n) {
|
|
550
550
|
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
551
551
|
}
|
|
552
552
|
const Fn = (e) => () => e;
|
|
553
|
-
function
|
|
553
|
+
function Ws(e, t) {
|
|
554
554
|
return function(n) {
|
|
555
555
|
return e + n * t;
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function Ys(e, t, n) {
|
|
559
559
|
return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(i) {
|
|
560
560
|
return Math.pow(e + i * t, n);
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
function Gs(e) {
|
|
564
564
|
return (e = +e) == 1 ? er : function(t, n) {
|
|
565
|
-
return n - t ?
|
|
565
|
+
return n - t ? Ys(t, n, e) : Fn(isNaN(t) ? n : t);
|
|
566
566
|
};
|
|
567
567
|
}
|
|
568
568
|
function er(e, t) {
|
|
569
569
|
var n = t - e;
|
|
570
|
-
return n ?
|
|
570
|
+
return n ? Ws(e, n) : Fn(isNaN(e) ? t : e);
|
|
571
571
|
}
|
|
572
572
|
const Kt = function e(t) {
|
|
573
573
|
var n = Gs(t);
|
|
@@ -625,7 +625,7 @@ function Qs(e, t) {
|
|
|
625
625
|
return i;
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
var an = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
|
|
628
|
+
var an = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Ye = new RegExp(an.source, "g");
|
|
629
629
|
function Js(e) {
|
|
630
630
|
return function() {
|
|
631
631
|
return e;
|
|
@@ -637,9 +637,9 @@ function to(e) {
|
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
639
|
function nr(e, t) {
|
|
640
|
-
var n = an.lastIndex =
|
|
641
|
-
for (e = e + "", t = t + ""; (i = an.exec(e)) && (r =
|
|
642
|
-
(s = r.index) > n && (s = t.slice(n, s), a[o] ? a[o] += s : a[++o] = s), (i = i[0]) === (r = r[0]) ? a[o] ? a[o] += r : a[++o] = r : (a[++o] = null, c.push({ i: o, x: et(i, r) })), n =
|
|
640
|
+
var n = an.lastIndex = Ye.lastIndex = 0, i, r, s, o = -1, a = [], c = [];
|
|
641
|
+
for (e = e + "", t = t + ""; (i = an.exec(e)) && (r = Ye.exec(t)); )
|
|
642
|
+
(s = r.index) > n && (s = t.slice(n, s), a[o] ? a[o] += s : a[++o] = s), (i = i[0]) === (r = r[0]) ? a[o] ? a[o] += r : a[++o] = r : (a[++o] = null, c.push({ i: o, x: et(i, r) })), n = Ye.lastIndex;
|
|
643
643
|
return n < t.length && (s = t.slice(n), a[o] ? a[o] += s : a[++o] = s), a.length < 2 ? c[0] ? to(c[0].x) : Js(t) : (t = c.length, function(h) {
|
|
644
644
|
for (var l = 0, u; l < t; ++l)
|
|
645
645
|
a[(u = c[l]).i] = u.x(h);
|
|
@@ -686,10 +686,10 @@ function rr(e, t, n, i) {
|
|
|
686
686
|
function r(h) {
|
|
687
687
|
return h.length ? h.pop() + " " : "";
|
|
688
688
|
}
|
|
689
|
-
function s(h, l, u, f, d,
|
|
689
|
+
function s(h, l, u, f, d, p) {
|
|
690
690
|
if (h !== u || l !== f) {
|
|
691
|
-
var
|
|
692
|
-
|
|
691
|
+
var g = d.push("translate(", null, t, null, n);
|
|
692
|
+
p.push({ i: g - 4, x: et(h, u) }, { i: g - 2, x: et(l, f) });
|
|
693
693
|
} else
|
|
694
694
|
(u || f) && d.push("translate(" + u + t + f + n);
|
|
695
695
|
}
|
|
@@ -699,18 +699,18 @@ function rr(e, t, n, i) {
|
|
|
699
699
|
function a(h, l, u, f) {
|
|
700
700
|
h !== l ? f.push({ i: u.push(r(u) + "skewX(", null, i) - 2, x: et(h, l) }) : l && u.push(r(u) + "skewX(" + l + i);
|
|
701
701
|
}
|
|
702
|
-
function c(h, l, u, f, d,
|
|
702
|
+
function c(h, l, u, f, d, p) {
|
|
703
703
|
if (h !== u || l !== f) {
|
|
704
|
-
var
|
|
705
|
-
|
|
704
|
+
var g = d.push(r(d) + "scale(", null, ",", null, ")");
|
|
705
|
+
p.push({ i: g - 4, x: et(h, u) }, { i: g - 2, x: et(l, f) });
|
|
706
706
|
} else
|
|
707
707
|
(u !== 1 || f !== 1) && d.push(r(d) + "scale(" + u + "," + f + ")");
|
|
708
708
|
}
|
|
709
709
|
return function(h, l) {
|
|
710
710
|
var u = [], f = [];
|
|
711
711
|
return h = e(h), l = e(l), s(h.translateX, h.translateY, l.translateX, l.translateY, u, f), o(h.rotate, l.rotate, u, f), a(h.skewX, l.skewX, u, f), c(h.scaleX, h.scaleY, l.scaleX, l.scaleY, u, f), h = l = null, function(d) {
|
|
712
|
-
for (var
|
|
713
|
-
u[(y = f[
|
|
712
|
+
for (var p = -1, g = f.length, y; ++p < g; )
|
|
713
|
+
u[(y = f[p]).i] = y.x(d);
|
|
714
714
|
return u.join("");
|
|
715
715
|
};
|
|
716
716
|
};
|
|
@@ -727,22 +727,22 @@ function co(e) {
|
|
|
727
727
|
}
|
|
728
728
|
const ho = function e(t, n, i) {
|
|
729
729
|
function r(s, o) {
|
|
730
|
-
var a = s[0], c = s[1], h = s[2], l = o[0], u = o[1], f = o[2], d = l - a,
|
|
731
|
-
if (
|
|
730
|
+
var a = s[0], c = s[1], h = s[2], l = o[0], u = o[1], f = o[2], d = l - a, p = u - c, g = d * d + p * p, y, m;
|
|
731
|
+
if (g < oo)
|
|
732
732
|
m = Math.log(f / h) / t, y = function(T) {
|
|
733
733
|
return [
|
|
734
734
|
a + T * d,
|
|
735
|
-
c + T *
|
|
735
|
+
c + T * p,
|
|
736
736
|
h * Math.exp(t * T * m)
|
|
737
737
|
];
|
|
738
738
|
};
|
|
739
739
|
else {
|
|
740
|
-
var x = Math.sqrt(
|
|
740
|
+
var x = Math.sqrt(g), v = (f * f - h * h + i * g) / (2 * h * n * x), M = (f * f - h * h - i * g) / (2 * f * n * x), b = Math.log(Math.sqrt(v * v + 1) - v), S = Math.log(Math.sqrt(M * M + 1) - M);
|
|
741
741
|
m = (S - b) / t, y = function(T) {
|
|
742
742
|
var C = T * m, k = fi(b), R = h / (n * x) * (k * co(t * C + b) - ao(b));
|
|
743
743
|
return [
|
|
744
744
|
a + R * d,
|
|
745
|
-
c + R *
|
|
745
|
+
c + R * p,
|
|
746
746
|
h * k / fi(t * C + b)
|
|
747
747
|
];
|
|
748
748
|
};
|
|
@@ -940,9 +940,9 @@ function Ao(e) {
|
|
|
940
940
|
var t = e.grouping === void 0 || e.thousands === void 0 ? mi : wo(yi.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", i = e.currency === void 0 ? "" : e.currency[1] + "", r = e.decimal === void 0 ? "." : e.decimal + "", s = e.numerals === void 0 ? mi : bo(yi.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", a = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
|
|
941
941
|
function h(u) {
|
|
942
942
|
u = ve(u);
|
|
943
|
-
var f = u.fill, d = u.align,
|
|
943
|
+
var f = u.fill, d = u.align, p = u.sign, g = u.symbol, y = u.zero, m = u.width, x = u.comma, v = u.precision, M = u.trim, b = u.type;
|
|
944
944
|
b === "n" ? (x = !0, b = "g") : gi[b] || (v === void 0 && (v = 12), M = !0, b = "g"), (y || f === "0" && d === "=") && (y = !0, f = "0", d = "=");
|
|
945
|
-
var S =
|
|
945
|
+
var S = g === "$" ? n : g === "#" && /[boxX]/.test(b) ? "0" + b.toLowerCase() : "", T = g === "$" ? i : /[%p]/.test(b) ? o : "", C = gi[b], k = /[defgprs%]/.test(b);
|
|
946
946
|
v = v === void 0 ? 6 : /[gprs]/.test(b) ? Math.max(1, Math.min(21, v)) : Math.max(0, Math.min(20, v));
|
|
947
947
|
function R(P) {
|
|
948
948
|
var I = S, N = T, _, A, w;
|
|
@@ -951,7 +951,7 @@ function Ao(e) {
|
|
|
951
951
|
else {
|
|
952
952
|
P = +P;
|
|
953
953
|
var L = P < 0 || 1 / P < 0;
|
|
954
|
-
if (P = isNaN(P) ? c : C(Math.abs(P), v), M && (P = So(P)), L && +P == 0 &&
|
|
954
|
+
if (P = isNaN(P) ? c : C(Math.abs(P), v), M && (P = So(P)), L && +P == 0 && p !== "+" && (L = !1), I = (L ? p === "(" ? p : a : p === "-" || p === "(" ? "" : p) + I, N = (b === "s" ? _i[8 + sr / 3] : "") + N + (L && p === "(" ? ")" : ""), k) {
|
|
955
955
|
for (_ = -1, A = P.length; ++_ < A; )
|
|
956
956
|
if (w = P.charCodeAt(_), 48 > w || w > 57) {
|
|
957
957
|
N = (w === 46 ? r + P.slice(_ + 1) : P.slice(_)) + N, P = P.slice(0, _);
|
|
@@ -982,9 +982,9 @@ function Ao(e) {
|
|
|
982
982
|
}, R;
|
|
983
983
|
}
|
|
984
984
|
function l(u, f) {
|
|
985
|
-
var d = h((u = ve(u), u.type = "f", u)),
|
|
985
|
+
var d = h((u = ve(u), u.type = "f", u)), p = Math.max(-8, Math.min(8, Math.floor(Dt(f) / 3))) * 3, g = Math.pow(10, -p), y = _i[8 + p / 3];
|
|
986
986
|
return function(m) {
|
|
987
|
-
return d(
|
|
987
|
+
return d(g * m) + y;
|
|
988
988
|
};
|
|
989
989
|
}
|
|
990
990
|
return {
|
|
@@ -1190,13 +1190,13 @@ function Do(e) {
|
|
|
1190
1190
|
t += Math.pow(e[n], 2);
|
|
1191
1191
|
return t;
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Vt(e) {
|
|
1194
1194
|
var t = Do(e);
|
|
1195
1195
|
return t === 0 ? t : Math.sqrt(t);
|
|
1196
1196
|
}
|
|
1197
1197
|
function vi(e, t) {
|
|
1198
1198
|
t === void 0 && (t = e);
|
|
1199
|
-
var n =
|
|
1199
|
+
var n = Vt(e);
|
|
1200
1200
|
return n === 0 ? Oo(0, t) : Tt(e, 1 / n, t);
|
|
1201
1201
|
}
|
|
1202
1202
|
function Oo(e, t) {
|
|
@@ -1260,9 +1260,9 @@ var D = function() {
|
|
|
1260
1260
|
}, set: function(t) {
|
|
1261
1261
|
this[1] = t;
|
|
1262
1262
|
}, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "magnitude", { get: function() {
|
|
1263
|
-
return
|
|
1263
|
+
return Vt(this);
|
|
1264
1264
|
}, set: function(t) {
|
|
1265
|
-
var n =
|
|
1265
|
+
var n = Vt(this);
|
|
1266
1266
|
Tt(this, t / n, this);
|
|
1267
1267
|
}, enumerable: !0, configurable: !0 }), Object.defineProperty(e.prototype, "mutable", { get: function() {
|
|
1268
1268
|
return this.isMutating = !0, this;
|
|
@@ -1291,10 +1291,10 @@ var D = function() {
|
|
|
1291
1291
|
}, e.prototype.scale = function(t) {
|
|
1292
1292
|
return Tt(this, t, this.isMutating ? this : e.zero);
|
|
1293
1293
|
}, e.prototype.rescale = function(t) {
|
|
1294
|
-
var n =
|
|
1294
|
+
var n = Vt(this);
|
|
1295
1295
|
return n <= 0 ? this.isMutating ? this : e.zero : Tt(this, t / n, this.isMutating ? this : e.zero);
|
|
1296
1296
|
}, e.prototype.clampMagnitude = function(t) {
|
|
1297
|
-
var n =
|
|
1297
|
+
var n = Vt(this);
|
|
1298
1298
|
return n > t ? Tt(this, t / n, this.isMutating ? this : e.zero) : this.isMutating ? this : this.clone();
|
|
1299
1299
|
}, e.prototype.rotate = function(t) {
|
|
1300
1300
|
return qe(this, t, this.isMutating ? this : e.zero);
|
|
@@ -1436,7 +1436,7 @@ function fn(e, t, n) {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
return [i, r, s, o];
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function Uo(e, t, n) {
|
|
1440
1440
|
n === void 0 && (n = !1);
|
|
1441
1441
|
var i = n ? t.length : t.length - 1;
|
|
1442
1442
|
if (e === 1)
|
|
@@ -1444,17 +1444,17 @@ function Vo(e, t, n) {
|
|
|
1444
1444
|
var r = i * e, s = Math.floor(r);
|
|
1445
1445
|
return { index: s, weight: r - s };
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function Vo(e, t) {
|
|
1448
1448
|
for (var n = 0; n < e.length; n++)
|
|
1449
1449
|
e[n] = t;
|
|
1450
1450
|
return e;
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1452
|
+
function Wo(e, t) {
|
|
1453
1453
|
for (var n = 0; n < e.length; n++)
|
|
1454
1454
|
e[n] = t(e[n], n);
|
|
1455
1455
|
return e;
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Yo(e, t, n) {
|
|
1458
1458
|
n === void 0 && (n = 0);
|
|
1459
1459
|
for (var i = 0; i < e.length; i++)
|
|
1460
1460
|
n = t(n, e[i], i);
|
|
@@ -1550,10 +1550,10 @@ function be(e, t) {
|
|
|
1550
1550
|
return n === 0 ? 0 : Math.sqrt(n);
|
|
1551
1551
|
}
|
|
1552
1552
|
function yt(e, t) {
|
|
1553
|
-
var n = t ? we(e, t) : e, i =
|
|
1553
|
+
var n = t ? we(e, t) : e, i = Yo(n, function(s, o) {
|
|
1554
1554
|
return s + Math.pow(o, 2);
|
|
1555
1555
|
}), r = Math.sqrt(i);
|
|
1556
|
-
return r === 0 ?
|
|
1556
|
+
return r === 0 ? Vo(n, 0) : Wo(n, function(s) {
|
|
1557
1557
|
return s / r;
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
@@ -1573,13 +1573,13 @@ function Zo(e, t, n, i, r) {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
function Ko(e, t, n, i, r) {
|
|
1575
1575
|
for (var s = Number.isFinite(r.tension) ? r.tension : 0.5, o = Number.isFinite(r.alpha) ? r.alpha : null, a = o > 0 ? Zo(e, t, n, i, o) : null, c = new Array(e.length), h = 0; h < e.length; h++) {
|
|
1576
|
-
var l = 0, u = 0, f = e[h], d = t[h],
|
|
1576
|
+
var l = 0, u = 0, f = e[h], d = t[h], p = n[h], g = i[h];
|
|
1577
1577
|
if (a) {
|
|
1578
1578
|
var y = a[0], m = a[1], x = a[2], v = a[3];
|
|
1579
|
-
m - x != 0 && (y - m != 0 && y - x != 0 && (l = (1 - s) * (x - m) * ((f - d) / (y - m) - (f -
|
|
1579
|
+
m - x != 0 && (y - m != 0 && y - x != 0 && (l = (1 - s) * (x - m) * ((f - d) / (y - m) - (f - p) / (y - x) + (d - p) / (m - x))), m - v != 0 && x - v != 0 && (u = (1 - s) * (x - m) * ((d - p) / (m - x) - (d - g) / (m - v) + (p - g) / (x - v))));
|
|
1580
1580
|
} else
|
|
1581
|
-
l = (1 - s) * (
|
|
1582
|
-
var M = 2 * d - 2 *
|
|
1581
|
+
l = (1 - s) * (p - f) * 0.5, u = (1 - s) * (g - d) * 0.5;
|
|
1582
|
+
var M = 2 * d - 2 * p + l + u, b = -3 * d + 3 * p - 2 * l - u, S = l, T = d;
|
|
1583
1583
|
c[h] = [M, b, S, T];
|
|
1584
1584
|
}
|
|
1585
1585
|
return c;
|
|
@@ -1636,7 +1636,7 @@ var lr = function() {
|
|
|
1636
1636
|
}, enumerable: !1, configurable: !0 }), e.prototype.reset = function() {
|
|
1637
1637
|
this._invalidateCache();
|
|
1638
1638
|
}, e.prototype.evaluateForT = function(t, n, i) {
|
|
1639
|
-
var r =
|
|
1639
|
+
var r = Uo(n, this.points, this.closed), s = r.index;
|
|
1640
1640
|
return pn(t, r.weight, this.getCoefficients(s), i);
|
|
1641
1641
|
}, e.prototype.getCoefficients = function(t) {
|
|
1642
1642
|
if (this.points) {
|
|
@@ -1706,10 +1706,10 @@ var lr = function() {
|
|
|
1706
1706
|
var h = Ft(pn(It, c, o)), l = h === 0 ? 0 : 1 / h;
|
|
1707
1707
|
this.tension > 0.95 && (l = Q(l, -1, 1)), s.push(l);
|
|
1708
1708
|
}
|
|
1709
|
-
var u = i - 1, f = [], d = [],
|
|
1709
|
+
var u = i - 1, f = [], d = [], p = r[0], g = s[0], y = 1 / u;
|
|
1710
1710
|
for (a = 0; a < u; ++a) {
|
|
1711
|
-
var m =
|
|
1712
|
-
|
|
1711
|
+
var m = p, x = (p = r[a + 1]) - m, v = g, M = s[a + 1];
|
|
1712
|
+
g = M;
|
|
1713
1713
|
var b = y / x, S = (v + M - 2 * b) / (x * x), T = (3 * b - 2 * v - M) / x;
|
|
1714
1714
|
f.push(S), d.push(T);
|
|
1715
1715
|
}
|
|
@@ -1742,8 +1742,8 @@ var lr = function() {
|
|
|
1742
1742
|
var l = Math.max(0, dn(i, o)), u = l * r;
|
|
1743
1743
|
if (o[l] === i)
|
|
1744
1744
|
return u;
|
|
1745
|
-
var f = a[l], d = h[l],
|
|
1746
|
-
return ((d *
|
|
1745
|
+
var f = a[l], d = h[l], p = c[l], g = i - o[l];
|
|
1746
|
+
return ((d * g + p) * g + f) * g + u;
|
|
1747
1747
|
}, t.prototype.lengthAt = function(n) {
|
|
1748
1748
|
return n * this.arcLengths[this.arcLengths.length - 1];
|
|
1749
1749
|
}, t.prototype.getT = function(n) {
|
|
@@ -1843,14 +1843,14 @@ var lr = function() {
|
|
|
1843
1843
|
for (var i = [], r = [], s = this.getTimeFromPosition(t), o = this.getTimeFromPosition(n), a = this.getPointAtTime(s), c = this.getPointAtTime(o), h = this.closed ? this.points.length : this.points.length - 1, l = Math.floor(h * s), u = Math.ceil(h * o), f = 0; f < a.length; f++)
|
|
1844
1844
|
i[f] = Math.min(a[f], c[f]), r[f] = Math.max(a[f], c[f]);
|
|
1845
1845
|
for (var d = function(m) {
|
|
1846
|
-
var x = fn(m - 1,
|
|
1846
|
+
var x = fn(m - 1, p.points, p.closed)[2];
|
|
1847
1847
|
if (m < u)
|
|
1848
1848
|
for (var v = 0; v < x.length; v++)
|
|
1849
1849
|
x[v] < i[v] && (i[v] = x[v]), x[v] > r[v] && (r[v] = x[v]);
|
|
1850
|
-
if (
|
|
1850
|
+
if (p.tension < 1) {
|
|
1851
1851
|
var M = h * s - (m - 1), b = h * o - (m - 1), S = function(k) {
|
|
1852
1852
|
return k > -it && k <= 1 + it && (m - 1 !== l || k > M) && (m !== u || k < b);
|
|
1853
|
-
}, T =
|
|
1853
|
+
}, T = p._curveMapper.getCoefficients(m - 1), C = function(k) {
|
|
1854
1854
|
var R = T[k];
|
|
1855
1855
|
cr(3 * R[0], 2 * R[1], R[2]).filter(S).forEach(function(P) {
|
|
1856
1856
|
var I = Rt(P, T[k]);
|
|
@@ -1860,8 +1860,8 @@ var lr = function() {
|
|
|
1860
1860
|
for (v = 0; v < T.length; v++)
|
|
1861
1861
|
C(v);
|
|
1862
1862
|
}
|
|
1863
|
-
},
|
|
1864
|
-
d(
|
|
1863
|
+
}, p = this, g = l + 1; g <= u; g++)
|
|
1864
|
+
d(g);
|
|
1865
1865
|
var y = { min: i, max: r };
|
|
1866
1866
|
return t === 0 && n === 1 && this._cache.set("bbox", y), y;
|
|
1867
1867
|
}, e.prototype.getPoints = function(t, n, i, r) {
|
|
@@ -1880,9 +1880,9 @@ var lr = function() {
|
|
|
1880
1880
|
throw Error("Invalid threshold. Must be a number greater than zero!");
|
|
1881
1881
|
var r = 10 * this.points.length - 1, s = new Array(t.length), o = 1 / 0, a = 0, c = this.createLookupTable(r);
|
|
1882
1882
|
Array.from(c.keys()).forEach(function(f) {
|
|
1883
|
-
var d = c.get(f),
|
|
1884
|
-
if (
|
|
1885
|
-
return o =
|
|
1883
|
+
var d = c.get(f), p = be(t, d);
|
|
1884
|
+
if (p < o)
|
|
1885
|
+
return o = p, a = f, !0;
|
|
1886
1886
|
});
|
|
1887
1887
|
for (var h = this.getTimeFromPosition(a), l = function(f) {
|
|
1888
1888
|
if (f >= 0 && f <= 1) {
|
|
@@ -1909,8 +1909,8 @@ var lr = function() {
|
|
|
1909
1909
|
}, e.prototype.getIntersectsAsTime = function(t, n, i, r) {
|
|
1910
1910
|
n === void 0 && (n = 0), i === void 0 && (i = 0), r === void 0 && (r = this._lmargin);
|
|
1911
1911
|
for (var s = n, o = /* @__PURE__ */ new Set(), a = this.closed ? this.points.length : this.points.length - 1, c = 0; c < a && (i === 0 || o.size < Math.abs(i)); c += 1) {
|
|
1912
|
-
var h = i < 0 ? a - (c + 1) : c, l = fn(h, this.points, this.closed), u = l[1], f = l[2], d = this._curveMapper.getCoefficients(h),
|
|
1913
|
-
if (u[s] < f[s] ? (
|
|
1912
|
+
var h = i < 0 ? a - (c + 1) : c, l = fn(h, this.points, this.closed), u = l[1], f = l[2], d = this._curveMapper.getCoefficients(h), p = void 0, g = void 0;
|
|
1913
|
+
if (u[s] < f[s] ? (p = u[s], g = f[s]) : (p = f[s], g = u[s]), t - r <= g && t + r >= p) {
|
|
1914
1914
|
var y = Qo(t, d[s]);
|
|
1915
1915
|
i < 0 ? y.sort(function(v, M) {
|
|
1916
1916
|
return M - v;
|
|
@@ -1956,8 +1956,8 @@ var lr = function() {
|
|
|
1956
1956
|
o.forEach(function(u, f) {
|
|
1957
1957
|
if (!Number.isFinite(u) || u < 0 || u > 1)
|
|
1958
1958
|
throw Error("Invalid position (u) for sample in forEach!");
|
|
1959
|
-
var d = s.getTimeFromPosition(u),
|
|
1960
|
-
l = { u, t: d, i: f, value:
|
|
1959
|
+
var d = s.getTimeFromPosition(u), p = t({ u, t: d, i: f, prev: l });
|
|
1960
|
+
l = { u, t: d, i: f, value: p };
|
|
1961
1961
|
});
|
|
1962
1962
|
}, e.prototype.map = function(t, n, i, r) {
|
|
1963
1963
|
var s = this;
|
|
@@ -1976,8 +1976,8 @@ var lr = function() {
|
|
|
1976
1976
|
return o.map(function(u, f) {
|
|
1977
1977
|
if (!Number.isFinite(u) || u < 0 || u > 1)
|
|
1978
1978
|
throw Error("Invalid position (u) for sample in map()!");
|
|
1979
|
-
var d = s.getTimeFromPosition(u),
|
|
1980
|
-
return l = { u, t: d, i: f, value:
|
|
1979
|
+
var d = s.getTimeFromPosition(u), p = t({ u, t: d, i: f, prev: l });
|
|
1980
|
+
return l = { u, t: d, i: f, value: p }, p;
|
|
1981
1981
|
});
|
|
1982
1982
|
}, e.prototype.reduce = function(t, n, i, r, s) {
|
|
1983
1983
|
var o = this;
|
|
@@ -1995,8 +1995,8 @@ var lr = function() {
|
|
|
1995
1995
|
return a.reduce(function(u, f, d) {
|
|
1996
1996
|
if (!Number.isFinite(f) || f < 0 || f > 1)
|
|
1997
1997
|
throw Error("Invalid position (u) for sample in map()!");
|
|
1998
|
-
var
|
|
1999
|
-
return t({ acc: u, u: f, t:
|
|
1998
|
+
var p = o.getTimeFromPosition(f);
|
|
1999
|
+
return t({ acc: u, u: f, t: p, i: d });
|
|
2000
2000
|
}, n);
|
|
2001
2001
|
}, e.prototype._invalidateCache = function() {
|
|
2002
2002
|
return this._cache = /* @__PURE__ */ new Map(), this;
|
|
@@ -2126,12 +2126,12 @@ class ea {
|
|
|
2126
2126
|
* @param {Number} maxDepth Max recursive depth
|
|
2127
2127
|
*/
|
|
2128
2128
|
static bisect(t, n = 0, i = 1, r = 5e-3, s = 4, o = 10) {
|
|
2129
|
-
const a = (f, d,
|
|
2130
|
-
const v = (f + d) / 2, M = t(v), b = D.distance(
|
|
2129
|
+
const a = (f, d, p, g, y, m, x = 0) => {
|
|
2130
|
+
const v = (f + d) / 2, M = t(v), b = D.distance(p, M), S = D.distance(M, g), T = b + S;
|
|
2131
2131
|
if (x >= s && Math.abs(T - y) < m || x >= o)
|
|
2132
2132
|
return T;
|
|
2133
2133
|
const C = m / 2, k = x + 1;
|
|
2134
|
-
return a(f, v,
|
|
2134
|
+
return a(f, v, p, M, b, C, k) + a(v, d, M, g, S, C, k);
|
|
2135
2135
|
}, c = t(n), h = t(i), l = D.distance(c, h);
|
|
2136
2136
|
return a(n, i, c, h, l, r);
|
|
2137
2137
|
}
|
|
@@ -2357,28 +2357,28 @@ class Qt {
|
|
|
2357
2357
|
getTrajectory(t, n = 0, i = 1) {
|
|
2358
2358
|
const r = n < 0 ? -n : 0, s = i > 1 ? i - 1 : 0, o = this.interpolators.trajectory.getPointAt(0), a = this.interpolators.trajectory.getPointAt(1);
|
|
2359
2359
|
let c, h, l = 0;
|
|
2360
|
-
const u = Math.max(0, n), f = Math.min(1, i), d = this.interpolators.trajectory.getPointAt(u),
|
|
2360
|
+
const u = Math.max(0, n), f = Math.min(1, i), d = this.interpolators.trajectory.getPointAt(u), p = this.interpolators.trajectory.getPointAt(f);
|
|
2361
2361
|
r ? (c = [
|
|
2362
2362
|
o[0] + this.startVector[0] * r * this.displacement,
|
|
2363
2363
|
o[1] + this.startVector[1] * r * this.displacement
|
|
2364
2364
|
], l = -D.distance(c, o)) : n > 0 && (l = D.distance(d, o)), s && (h = [a[0] + this.endVector[0] * s * this.displacement, a[1] + this.endVector[1] * s * this.displacement]);
|
|
2365
|
-
const
|
|
2365
|
+
const g = [], y = i - n, m = Math.floor(r / y * t), x = Math.ceil((f - u) / y * t), v = t - x - m;
|
|
2366
2366
|
if (c) {
|
|
2367
|
-
|
|
2367
|
+
g.push(c);
|
|
2368
2368
|
for (let b = 1; b < m; b++) {
|
|
2369
2369
|
const S = b / m * r * this.displacement;
|
|
2370
|
-
|
|
2370
|
+
g.push([c[0] - this.startVector[0] * S, c[1] - this.startVector[1] * S]);
|
|
2371
2371
|
}
|
|
2372
2372
|
}
|
|
2373
2373
|
const M = this.interpolators.trajectory.getPoints(x - 1, null, u, f);
|
|
2374
|
-
if (
|
|
2374
|
+
if (g.push(...M), h) {
|
|
2375
2375
|
for (let b = 1; b < v - 1; b++) {
|
|
2376
2376
|
const S = b / v * s * this.displacement;
|
|
2377
|
-
|
|
2377
|
+
g.push([p[0] + this.endVector[0] * S, p[1] + this.endVector[1] * S]);
|
|
2378
2378
|
}
|
|
2379
|
-
|
|
2379
|
+
g.push(h);
|
|
2380
2380
|
}
|
|
2381
|
-
return { points:
|
|
2381
|
+
return { points: g, offset: l };
|
|
2382
2382
|
}
|
|
2383
2383
|
/**
|
|
2384
2384
|
* Generate a set of coordinates along the trajectory of the curve
|
|
@@ -2395,9 +2395,9 @@ class Qt {
|
|
|
2395
2395
|
}
|
|
2396
2396
|
const f = this.interpolators.trajectory.getPoints(o, null, 0, 1);
|
|
2397
2397
|
c.push(...f);
|
|
2398
|
-
const d = new D(this.interpolators.trajectory.getPointAt(1)),
|
|
2398
|
+
const d = new D(this.interpolators.trajectory.getPointAt(1)), p = new D(this.endVector), g = i / (a - 1);
|
|
2399
2399
|
for (let x = 1; x < a; x++) {
|
|
2400
|
-
const v = x *
|
|
2400
|
+
const v = x * g, M = d.add(p.scale(v));
|
|
2401
2401
|
c.push(M.toArray());
|
|
2402
2402
|
}
|
|
2403
2403
|
const y = -n;
|
|
@@ -2608,11 +2608,11 @@ function ka(e, t) {
|
|
|
2608
2608
|
var n = t ? Ca : Pa, i = this._parents, r = this._groups;
|
|
2609
2609
|
typeof e != "function" && (e = Aa(e));
|
|
2610
2610
|
for (var s = r.length, o = new Array(s), a = new Array(s), c = new Array(s), h = 0; h < s; ++h) {
|
|
2611
|
-
var l = i[h], u = r[h], f = u.length, d = Ea(e.call(l, l && l.__data__, h, i)),
|
|
2612
|
-
n(l, u,
|
|
2613
|
-
for (var x = 0, v = 0, M, b; x <
|
|
2614
|
-
if (M =
|
|
2615
|
-
for (x >= v && (v = x + 1); !(b = y[v]) && ++v <
|
|
2611
|
+
var l = i[h], u = r[h], f = u.length, d = Ea(e.call(l, l && l.__data__, h, i)), p = d.length, g = a[h] = new Array(p), y = o[h] = new Array(p), m = c[h] = new Array(f);
|
|
2612
|
+
n(l, u, g, y, m, d, t);
|
|
2613
|
+
for (var x = 0, v = 0, M, b; x < p; ++x)
|
|
2614
|
+
if (M = g[x]) {
|
|
2615
|
+
for (x >= v && (v = x + 1); !(b = y[v]) && ++v < p; )
|
|
2616
2616
|
;
|
|
2617
2617
|
M._next = b || null;
|
|
2618
2618
|
}
|
|
@@ -2631,8 +2631,8 @@ function Ra(e, t, n) {
|
|
|
2631
2631
|
}
|
|
2632
2632
|
function Ia(e) {
|
|
2633
2633
|
for (var t = e.selection ? e.selection() : e, n = this._groups, i = t._groups, r = n.length, s = i.length, o = Math.min(r, s), a = new Array(r), c = 0; c < o; ++c)
|
|
2634
|
-
for (var h = n[c], l = i[c], u = h.length, f = a[c] = new Array(u), d,
|
|
2635
|
-
(d = h[
|
|
2634
|
+
for (var h = n[c], l = i[c], u = h.length, f = a[c] = new Array(u), d, p = 0; p < u; ++p)
|
|
2635
|
+
(d = h[p] || l[p]) && (f[p] = d);
|
|
2636
2636
|
for (; c < r; ++c)
|
|
2637
2637
|
a[c] = n[c];
|
|
2638
2638
|
return new K(a, this._parents);
|
|
@@ -2683,23 +2683,23 @@ function Ha() {
|
|
|
2683
2683
|
function Xa() {
|
|
2684
2684
|
return !this.node();
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function Ua(e) {
|
|
2687
2687
|
for (var t = this._groups, n = 0, i = t.length; n < i; ++n)
|
|
2688
2688
|
for (var r = t[n], s = 0, o = r.length, a; s < o; ++s)
|
|
2689
2689
|
(a = r[s]) && e.call(a, a.__data__, s, r);
|
|
2690
2690
|
return this;
|
|
2691
2691
|
}
|
|
2692
|
-
function
|
|
2692
|
+
function Va(e) {
|
|
2693
2693
|
return function() {
|
|
2694
2694
|
this.removeAttribute(e);
|
|
2695
2695
|
};
|
|
2696
2696
|
}
|
|
2697
|
-
function
|
|
2697
|
+
function Wa(e) {
|
|
2698
2698
|
return function() {
|
|
2699
2699
|
this.removeAttributeNS(e.space, e.local);
|
|
2700
2700
|
};
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2702
|
+
function Ya(e, t) {
|
|
2703
2703
|
return function() {
|
|
2704
2704
|
this.setAttribute(e, t);
|
|
2705
2705
|
};
|
|
@@ -2727,7 +2727,7 @@ function Za(e, t) {
|
|
|
2727
2727
|
var i = this.node();
|
|
2728
2728
|
return n.local ? i.getAttributeNS(n.space, n.local) : i.getAttribute(n);
|
|
2729
2729
|
}
|
|
2730
|
-
return this.each((t == null ? n.local ?
|
|
2730
|
+
return this.each((t == null ? n.local ? Wa : Va : typeof t == "function" ? n.local ? ja : qa : n.local ? Ga : Ya)(n, t));
|
|
2731
2731
|
}
|
|
2732
2732
|
function yr(e) {
|
|
2733
2733
|
return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
|
|
@@ -3012,7 +3012,7 @@ K.prototype = ee.prototype = {
|
|
|
3012
3012
|
node: Ba,
|
|
3013
3013
|
size: Ha,
|
|
3014
3014
|
empty: Xa,
|
|
3015
|
-
each:
|
|
3015
|
+
each: Ua,
|
|
3016
3016
|
attr: Za,
|
|
3017
3017
|
style: tc,
|
|
3018
3018
|
property: rc,
|
|
@@ -3080,7 +3080,7 @@ ue.prototype = $n.prototype = {
|
|
|
3080
3080
|
var n = this._, i = Xc(e + "", n), r, s = -1, o = i.length;
|
|
3081
3081
|
if (arguments.length < 2) {
|
|
3082
3082
|
for (; ++s < o; )
|
|
3083
|
-
if ((r = (e = i[s]).type) && (r =
|
|
3083
|
+
if ((r = (e = i[s]).type) && (r = Uc(n[r], e.name)))
|
|
3084
3084
|
return r;
|
|
3085
3085
|
return;
|
|
3086
3086
|
}
|
|
@@ -3116,7 +3116,7 @@ ue.prototype = $n.prototype = {
|
|
|
3116
3116
|
i[r].value.apply(t, n);
|
|
3117
3117
|
}
|
|
3118
3118
|
};
|
|
3119
|
-
function
|
|
3119
|
+
function Uc(e, t) {
|
|
3120
3120
|
for (var n = 0, i = e.length, r; n < i; ++n)
|
|
3121
3121
|
if ((r = e[n]).name === t)
|
|
3122
3122
|
return r.value;
|
|
@@ -3133,23 +3133,23 @@ const mn = { capture: !0, passive: !1 };
|
|
|
3133
3133
|
function yn(e) {
|
|
3134
3134
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
3135
3135
|
}
|
|
3136
|
-
function
|
|
3136
|
+
function Vc(e) {
|
|
3137
3137
|
var t = e.document.documentElement, n = Z(e).on("dragstart.drag", yn, mn);
|
|
3138
3138
|
"onselectstart" in t ? n.on("selectstart.drag", yn, mn) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
|
|
3139
3139
|
}
|
|
3140
|
-
function
|
|
3140
|
+
function Wc(e, t) {
|
|
3141
3141
|
var n = e.document.documentElement, i = Z(e).on("dragstart.drag", null);
|
|
3142
3142
|
t && (i.on("click.drag", yn, mn), setTimeout(function() {
|
|
3143
3143
|
i.on("click.drag", null);
|
|
3144
3144
|
}, 0)), "onselectstart" in n ? i.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
3145
3145
|
}
|
|
3146
|
-
var Nt = 0,
|
|
3146
|
+
var Nt = 0, Wt = 0, Xt = 0, Sr = 1e3, Me, Yt, Ae = 0, Ct = 0, Fe = 0, Jt = typeof performance == "object" && performance.now ? performance : Date, Mr = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
3147
3147
|
setTimeout(e, 17);
|
|
3148
3148
|
};
|
|
3149
3149
|
function Bn() {
|
|
3150
|
-
return Ct || (Mr(
|
|
3150
|
+
return Ct || (Mr(Yc), Ct = Jt.now() + Fe);
|
|
3151
3151
|
}
|
|
3152
|
-
function
|
|
3152
|
+
function Yc() {
|
|
3153
3153
|
Ct = 0;
|
|
3154
3154
|
}
|
|
3155
3155
|
function Pe() {
|
|
@@ -3160,7 +3160,7 @@ Pe.prototype = Ar.prototype = {
|
|
|
3160
3160
|
restart: function(e, t, n) {
|
|
3161
3161
|
if (typeof e != "function")
|
|
3162
3162
|
throw new TypeError("callback is not a function");
|
|
3163
|
-
n = (n == null ? Bn() : +n) + (t == null ? 0 : +t), !this._next &&
|
|
3163
|
+
n = (n == null ? Bn() : +n) + (t == null ? 0 : +t), !this._next && Yt !== this && (Yt ? Yt._next = this : Me = this, Yt = this), this._call = e, this._time = n, _n();
|
|
3164
3164
|
},
|
|
3165
3165
|
stop: function() {
|
|
3166
3166
|
this._call && (this._call = null, this._time = 1 / 0, _n());
|
|
@@ -3177,7 +3177,7 @@ function Gc() {
|
|
|
3177
3177
|
--Nt;
|
|
3178
3178
|
}
|
|
3179
3179
|
function Ei() {
|
|
3180
|
-
Ct = (Ae = Jt.now()) + Fe, Nt =
|
|
3180
|
+
Ct = (Ae = Jt.now()) + Fe, Nt = Wt = 0;
|
|
3181
3181
|
try {
|
|
3182
3182
|
Gc();
|
|
3183
3183
|
} finally {
|
|
@@ -3191,13 +3191,13 @@ function qc() {
|
|
|
3191
3191
|
function jc() {
|
|
3192
3192
|
for (var e, t = Me, n, i = 1 / 0; t; )
|
|
3193
3193
|
t._call ? (i > t._time && (i = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Me = n);
|
|
3194
|
-
|
|
3194
|
+
Yt = e, _n(i);
|
|
3195
3195
|
}
|
|
3196
3196
|
function _n(e) {
|
|
3197
3197
|
if (!Nt) {
|
|
3198
|
-
|
|
3198
|
+
Wt && (Wt = clearTimeout(Wt));
|
|
3199
3199
|
var t = e - Ct;
|
|
3200
|
-
t > 24 ? (e < 1 / 0 && (
|
|
3200
|
+
t > 24 ? (e < 1 / 0 && (Wt = setTimeout(Ei, e - Jt.now() - Fe)), Xt && (Xt = clearInterval(Xt))) : (Xt || (Ae = Jt.now(), Xt = setInterval(qc, Sr)), Nt = 1, Mr(Ei));
|
|
3201
3201
|
}
|
|
3202
3202
|
}
|
|
3203
3203
|
function Fi(e, t, n) {
|
|
@@ -3549,8 +3549,8 @@ function Rh(e) {
|
|
|
3549
3549
|
for (var i = this._groups, r = i.length, s = [], o = [], a = 0; a < r; ++a)
|
|
3550
3550
|
for (var c = i[a], h = c.length, l, u = 0; u < h; ++u)
|
|
3551
3551
|
if (l = c[u]) {
|
|
3552
|
-
for (var f = e.call(l, l.__data__, u, c), d,
|
|
3553
|
-
(d = f[
|
|
3552
|
+
for (var f = e.call(l, l.__data__, u, c), d, p = rt(l, n), g = 0, y = f.length; g < y; ++g)
|
|
3553
|
+
(d = f[g]) && Re(d, t, n, g, f, p);
|
|
3554
3554
|
s.push(f), o.push(l);
|
|
3555
3555
|
}
|
|
3556
3556
|
return new pt(s, o, t, n);
|
|
@@ -3609,7 +3609,7 @@ function Xh(e, t, n) {
|
|
|
3609
3609
|
}
|
|
3610
3610
|
return s._value = t, s;
|
|
3611
3611
|
}
|
|
3612
|
-
function
|
|
3612
|
+
function Uh(e, t, n) {
|
|
3613
3613
|
var i = "style." + (e += "");
|
|
3614
3614
|
if (arguments.length < 2)
|
|
3615
3615
|
return (i = this.tween(i)) && i._value;
|
|
@@ -3619,19 +3619,19 @@ function Vh(e, t, n) {
|
|
|
3619
3619
|
throw new Error();
|
|
3620
3620
|
return this.tween(i, Xh(e, t, n ?? ""));
|
|
3621
3621
|
}
|
|
3622
|
-
function
|
|
3622
|
+
function Vh(e) {
|
|
3623
3623
|
return function() {
|
|
3624
3624
|
this.textContent = e;
|
|
3625
3625
|
};
|
|
3626
3626
|
}
|
|
3627
|
-
function
|
|
3627
|
+
function Wh(e) {
|
|
3628
3628
|
return function() {
|
|
3629
3629
|
var t = e(this);
|
|
3630
3630
|
this.textContent = t ?? "";
|
|
3631
3631
|
};
|
|
3632
3632
|
}
|
|
3633
|
-
function
|
|
3634
|
-
return this.tween("text", typeof e == "function" ?
|
|
3633
|
+
function Yh(e) {
|
|
3634
|
+
return this.tween("text", typeof e == "function" ? Wh(Xn(this, "text", e)) : Vh(e == null ? "" : e + ""));
|
|
3635
3635
|
}
|
|
3636
3636
|
function Gh(e) {
|
|
3637
3637
|
return function(t) {
|
|
@@ -3710,8 +3710,8 @@ pt.prototype = {
|
|
|
3710
3710
|
attr: hh,
|
|
3711
3711
|
attrTween: ph,
|
|
3712
3712
|
style: Bh,
|
|
3713
|
-
styleTween:
|
|
3714
|
-
text:
|
|
3713
|
+
styleTween: Uh,
|
|
3714
|
+
text: Yh,
|
|
3715
3715
|
textTween: jh,
|
|
3716
3716
|
remove: Eh,
|
|
3717
3717
|
tween: nh,
|
|
@@ -3802,12 +3802,12 @@ ft.prototype = {
|
|
|
3802
3802
|
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
3803
3803
|
}
|
|
3804
3804
|
};
|
|
3805
|
-
var
|
|
3805
|
+
var Un = new ft(1, 0, 0);
|
|
3806
3806
|
ft.prototype;
|
|
3807
3807
|
function Ke(e) {
|
|
3808
3808
|
e.stopImmediatePropagation();
|
|
3809
3809
|
}
|
|
3810
|
-
function
|
|
3810
|
+
function Ut(e) {
|
|
3811
3811
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
3812
3812
|
}
|
|
3813
3813
|
function rl(e) {
|
|
@@ -3818,7 +3818,7 @@ function sl() {
|
|
|
3818
3818
|
return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
|
|
3819
3819
|
}
|
|
3820
3820
|
function zi() {
|
|
3821
|
-
return this.__zoom ||
|
|
3821
|
+
return this.__zoom || Un;
|
|
3822
3822
|
}
|
|
3823
3823
|
function ol(e) {
|
|
3824
3824
|
return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);
|
|
@@ -3834,7 +3834,7 @@ function cl(e, t, n) {
|
|
|
3834
3834
|
);
|
|
3835
3835
|
}
|
|
3836
3836
|
function hl() {
|
|
3837
|
-
var e = rl, t = sl, n = cl, i = ol, r = al, s = [0, 1 / 0], o = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], a = 250, c = ho, h = $n("start", "zoom", "end"), l, u, f, d = 500,
|
|
3837
|
+
var e = rl, t = sl, n = cl, i = ol, r = al, s = [0, 1 / 0], o = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], a = 250, c = ho, h = $n("start", "zoom", "end"), l, u, f, d = 500, p = 150, g = 0, y = 10;
|
|
3838
3838
|
function m(_) {
|
|
3839
3839
|
_.property("__zoom", zi).on("wheel.zoom", C, { passive: !1 }).on("mousedown.zoom", k).on("dblclick.zoom", R).filter(r).on("touchstart.zoom", P).on("touchmove.zoom", I).on("touchend.zoom touchcancel.zoom", N).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
3840
3840
|
}
|
|
@@ -3863,7 +3863,7 @@ function hl() {
|
|
|
3863
3863
|
}, m.translateTo = function(_, A, w, L, E) {
|
|
3864
3864
|
m.transform(_, function() {
|
|
3865
3865
|
var F = t.apply(this, arguments), z = this.__zoom, O = L == null ? M(F) : typeof L == "function" ? L.apply(this, arguments) : L;
|
|
3866
|
-
return n(
|
|
3866
|
+
return n(Un.translate(O[0], O[1]).scale(z.k).translate(
|
|
3867
3867
|
typeof A == "function" ? -A.apply(this, arguments) : -A,
|
|
3868
3868
|
typeof w == "function" ? -w.apply(this, arguments) : -w
|
|
3869
3869
|
), F, o);
|
|
@@ -3885,15 +3885,15 @@ function hl() {
|
|
|
3885
3885
|
}).on("interrupt.zoom end.zoom", function() {
|
|
3886
3886
|
S(this, arguments).event(L).end();
|
|
3887
3887
|
}).tween("zoom", function() {
|
|
3888
|
-
var E = this, F = arguments, z = S(E, F).event(L), O = t.apply(E, F), $ = w == null ? M(O) : typeof w == "function" ? w.apply(E, F) : w, B = Math.max(O[1][0] - O[0][0], O[1][1] - O[0][1]), H = E.__zoom,
|
|
3889
|
-
return function(
|
|
3890
|
-
if (
|
|
3891
|
-
|
|
3888
|
+
var E = this, F = arguments, z = S(E, F).event(L), O = t.apply(E, F), $ = w == null ? M(O) : typeof w == "function" ? w.apply(E, F) : w, B = Math.max(O[1][0] - O[0][0], O[1][1] - O[0][1]), H = E.__zoom, W = typeof A == "function" ? A.apply(E, F) : A, q = c(H.invert($).concat(B / H.k), W.invert($).concat(B / W.k));
|
|
3889
|
+
return function(U) {
|
|
3890
|
+
if (U === 1)
|
|
3891
|
+
U = W;
|
|
3892
3892
|
else {
|
|
3893
|
-
var
|
|
3894
|
-
|
|
3893
|
+
var Y = q(U), st = B / Y[2];
|
|
3894
|
+
U = new ft(st, $[0] - Y[0] * st, $[1] - Y[1] * st);
|
|
3895
3895
|
}
|
|
3896
|
-
z.zoom(null,
|
|
3896
|
+
z.zoom(null, U);
|
|
3897
3897
|
};
|
|
3898
3898
|
});
|
|
3899
3899
|
}
|
|
@@ -3943,7 +3943,7 @@ function hl() {
|
|
|
3943
3943
|
return;
|
|
3944
3944
|
w.mouse = [F, L.invert(F)], pe(this), w.start();
|
|
3945
3945
|
}
|
|
3946
|
-
|
|
3946
|
+
Ut(_), w.wheel = setTimeout(z, p), w.zoom("mouse", n(v(x(L, E), w.mouse[0], w.mouse[1]), w.extent, o));
|
|
3947
3947
|
function z() {
|
|
3948
3948
|
w.wheel = null, w.end();
|
|
3949
3949
|
}
|
|
@@ -3952,22 +3952,22 @@ function hl() {
|
|
|
3952
3952
|
if (f || !e.apply(this, arguments))
|
|
3953
3953
|
return;
|
|
3954
3954
|
var w = _.currentTarget, L = S(this, A, !0).event(_), E = Z(_.view).on("mousemove.zoom", $, !0).on("mouseup.zoom", B, !0), F = gt(_, w), z = _.clientX, O = _.clientY;
|
|
3955
|
-
|
|
3955
|
+
Vc(_.view), Ke(_), L.mouse = [F, this.__zoom.invert(F)], pe(this), L.start();
|
|
3956
3956
|
function $(H) {
|
|
3957
|
-
if (
|
|
3958
|
-
var
|
|
3959
|
-
L.moved =
|
|
3957
|
+
if (Ut(H), !L.moved) {
|
|
3958
|
+
var W = H.clientX - z, q = H.clientY - O;
|
|
3959
|
+
L.moved = W * W + q * q > g;
|
|
3960
3960
|
}
|
|
3961
3961
|
L.event(H).zoom("mouse", n(v(L.that.__zoom, L.mouse[0] = gt(H, w), L.mouse[1]), L.extent, o));
|
|
3962
3962
|
}
|
|
3963
3963
|
function B(H) {
|
|
3964
|
-
E.on("mousemove.zoom mouseup.zoom", null),
|
|
3964
|
+
E.on("mousemove.zoom mouseup.zoom", null), Wc(H.view, L.moved), Ut(H), L.event(H).end();
|
|
3965
3965
|
}
|
|
3966
3966
|
}
|
|
3967
3967
|
function R(_, ...A) {
|
|
3968
3968
|
if (e.apply(this, arguments)) {
|
|
3969
3969
|
var w = this.__zoom, L = gt(_.changedTouches ? _.changedTouches[0] : _, this), E = w.invert(L), F = w.k * (_.shiftKey ? 0.5 : 2), z = n(v(x(w, F), L, E), t.apply(this, A), o);
|
|
3970
|
-
|
|
3970
|
+
Ut(_), a > 0 ? Z(this).transition().duration(a).call(b, z, L, _) : Z(this).call(m.transform, z, L, _);
|
|
3971
3971
|
}
|
|
3972
3972
|
}
|
|
3973
3973
|
function P(_, ...A) {
|
|
@@ -3983,11 +3983,11 @@ function hl() {
|
|
|
3983
3983
|
function I(_, ...A) {
|
|
3984
3984
|
if (this.__zooming) {
|
|
3985
3985
|
var w = S(this, A).event(_), L = _.changedTouches, E = L.length, F, z, O, $;
|
|
3986
|
-
for (
|
|
3986
|
+
for (Ut(_), F = 0; F < E; ++F)
|
|
3987
3987
|
z = L[F], O = gt(z, this), w.touch0 && w.touch0[2] === z.identifier ? w.touch0[0] = O : w.touch1 && w.touch1[2] === z.identifier && (w.touch1[0] = O);
|
|
3988
3988
|
if (z = w.that.__zoom, w.touch1) {
|
|
3989
|
-
var B = w.touch0[0], H = w.touch0[1],
|
|
3990
|
-
z = x(z, Math.sqrt(
|
|
3989
|
+
var B = w.touch0[0], H = w.touch0[1], W = w.touch1[0], q = w.touch1[1], U = (U = W[0] - B[0]) * U + (U = W[1] - B[1]) * U, Y = (Y = q[0] - H[0]) * Y + (Y = q[1] - H[1]) * Y;
|
|
3990
|
+
z = x(z, Math.sqrt(U / Y)), O = [(B[0] + W[0]) / 2, (B[1] + W[1]) / 2], $ = [(H[0] + q[0]) / 2, (H[1] + q[1]) / 2];
|
|
3991
3991
|
} else if (w.touch0)
|
|
3992
3992
|
O = w.touch0[0], $ = w.touch0[1];
|
|
3993
3993
|
else
|
|
@@ -4032,7 +4032,7 @@ function hl() {
|
|
|
4032
4032
|
var _ = h.on.apply(h, arguments);
|
|
4033
4033
|
return _ === h ? m : _;
|
|
4034
4034
|
}, m.clickDistance = function(_) {
|
|
4035
|
-
return arguments.length ? (
|
|
4035
|
+
return arguments.length ? (g = (_ = +_) * _, m) : Math.sqrt(g);
|
|
4036
4036
|
}, m.tapDistance = function(_) {
|
|
4037
4037
|
return arguments.length ? (y = +_, m) : y;
|
|
4038
4038
|
}, m;
|
|
@@ -4200,8 +4200,8 @@ class fl {
|
|
|
4200
4200
|
* Update scale
|
|
4201
4201
|
*/
|
|
4202
4202
|
applyTransform(t) {
|
|
4203
|
-
const { width: n, scaleX: i, scaleY: r, xSpan: s, xBounds: o, yBounds: a, zFactor: c } = this, { viewportRatio: h, isXInverted: l, isYInverted: u } = this, f = n * t.k, d = s / f,
|
|
4204
|
-
i.domain([x, x + (l ? -
|
|
4203
|
+
const { width: n, scaleX: i, scaleY: r, xSpan: s, xBounds: o, yBounds: a, zFactor: c } = this, { viewportRatio: h, isXInverted: l, isYInverted: u } = this, f = n * t.k, d = s / f, p = s / t.k, g = p / c / h, y = d * t.x, m = d / c * t.y, x = o[0] - (l ? -y : y), v = a[0] - (u ? -m : m);
|
|
4204
|
+
i.domain([x, x + (l ? -p : p)]), r.domain([v, v + (u ? -g : g)]), this.currentTransform = t;
|
|
4205
4205
|
}
|
|
4206
4206
|
/**
|
|
4207
4207
|
* Set new viewport
|
|
@@ -4214,15 +4214,15 @@ class fl {
|
|
|
4214
4214
|
setViewport(t, n, i, r) {
|
|
4215
4215
|
const { zoom: s, container: o, calculateTransform: a, scaleX: c, scaleY: h, isXInverted: l } = this;
|
|
4216
4216
|
if (t == null || i == null || isNaN(t) || isNaN(i)) {
|
|
4217
|
-
const
|
|
4218
|
-
(t == null || isNaN(t)) && (t =
|
|
4217
|
+
const g = c.domain(), y = g[1] - g[0];
|
|
4218
|
+
(t == null || isNaN(t)) && (t = g[0] + y / 2 || 0), (i == null || isNaN(i)) && (i = Math.abs(y) || 1);
|
|
4219
4219
|
}
|
|
4220
4220
|
if (n == null || isNaN(n)) {
|
|
4221
|
-
const
|
|
4222
|
-
n =
|
|
4221
|
+
const g = h.domain();
|
|
4222
|
+
n = g[0] + (g[1] - g[0]) / 2 || 0;
|
|
4223
4223
|
}
|
|
4224
|
-
const u = l ? -i : i, f = t - u / 2, d = f + u,
|
|
4225
|
-
r != null && Number.isFinite(r) && r > 0 ? s.transform(o.transition().duration(r),
|
|
4224
|
+
const u = l ? -i : i, f = t - u / 2, d = f + u, p = a(f, d, n);
|
|
4225
|
+
r != null && Number.isFinite(r) && r > 0 ? s.transform(o.transition().duration(r), p) : s.transform(o, p);
|
|
4226
4226
|
}
|
|
4227
4227
|
/**
|
|
4228
4228
|
* Set bounds
|
|
@@ -4244,8 +4244,8 @@ class fl {
|
|
|
4244
4244
|
else {
|
|
4245
4245
|
const d = this.container.node();
|
|
4246
4246
|
if (d) {
|
|
4247
|
-
const { width:
|
|
4248
|
-
h =
|
|
4247
|
+
const { width: p, height: g } = d.getBoundingClientRect();
|
|
4248
|
+
h = p, l = g;
|
|
4249
4249
|
}
|
|
4250
4250
|
}
|
|
4251
4251
|
const u = Math.max(1, h), f = Math.max(1, l);
|
|
@@ -4259,8 +4259,8 @@ class fl {
|
|
|
4259
4259
|
* @returns New transformation matrix
|
|
4260
4260
|
*/
|
|
4261
4261
|
calculateTransform(t, n, i) {
|
|
4262
|
-
const { scaleX: r, xSpan: s, xBounds: o, yBounds: a, zFactor: c, viewportRatio: h, isXInverted: l, isYInverted: u } = this, [f, d] = r.range(),
|
|
4263
|
-
return
|
|
4262
|
+
const { scaleX: r, xSpan: s, xBounds: o, yBounds: a, zFactor: c, viewportRatio: h, isXInverted: l, isYInverted: u } = this, [f, d] = r.range(), p = Math.abs(n - t), g = s / p, y = p / (d - f), m = i - (u ? -p : p) / c / h / 2, x = (o[0] - t) / (l ? -y : y), v = (a[0] - m) / ((u ? -y : y) / c);
|
|
4263
|
+
return Un.translate(x, v).scale(g);
|
|
4264
4264
|
}
|
|
4265
4265
|
/**
|
|
4266
4266
|
* Recalcualate the transform
|
|
@@ -4445,7 +4445,7 @@ class Lt extends Ie {
|
|
|
4445
4445
|
t == null || t.save(), t == null || t.resetTransform(), t == null || t.clearRect(0, 0, (n == null ? void 0 : n.width) ?? 0, (n == null ? void 0 : n.height) ?? 0), t == null || t.restore();
|
|
4446
4446
|
}
|
|
4447
4447
|
}
|
|
4448
|
-
class
|
|
4448
|
+
class V0 extends Ie {
|
|
4449
4449
|
onMount(t) {
|
|
4450
4450
|
super.onMount(t);
|
|
4451
4451
|
const { elm: n } = t, i = t.width || parseInt((n == null ? void 0 : n.getAttribute("width")) ?? "", 10) || ze, r = t.height || parseInt((n == null ? void 0 : n.getAttribute("height")) ?? "", 10) || De;
|
|
@@ -4507,7 +4507,7 @@ class xl extends Ie {
|
|
|
4507
4507
|
}
|
|
4508
4508
|
}
|
|
4509
4509
|
}
|
|
4510
|
-
class
|
|
4510
|
+
class W0 {
|
|
4511
4511
|
constructor(t) {
|
|
4512
4512
|
const n = {
|
|
4513
4513
|
width: ze,
|
|
@@ -4639,7 +4639,7 @@ const vl = (e) => e.kind === "pAndASymbol", wl = (e) => e.kind === "cementSqueez
|
|
|
4639
4639
|
default:
|
|
4640
4640
|
return Oe(t);
|
|
4641
4641
|
}
|
|
4642
|
-
},
|
|
4642
|
+
}, Y0 = (e) => J(
|
|
4643
4643
|
{
|
|
4644
4644
|
Perforation: () => !0,
|
|
4645
4645
|
OpenHoleGravelPack: () => !0,
|
|
@@ -4649,7 +4649,7 @@ const vl = (e) => e.kind === "pAndASymbol", wl = (e) => e.kind === "cementSqueez
|
|
|
4649
4649
|
CasedHoleFracPack: () => !1
|
|
4650
4650
|
},
|
|
4651
4651
|
e.subKind
|
|
4652
|
-
),
|
|
4652
|
+
), G0 = (e) => J(
|
|
4653
4653
|
{
|
|
4654
4654
|
Perforation: () => !1,
|
|
4655
4655
|
OpenHoleGravelPack: () => !1,
|
|
@@ -4709,7 +4709,7 @@ function Pl(e) {
|
|
|
4709
4709
|
e.subKind
|
|
4710
4710
|
);
|
|
4711
4711
|
}
|
|
4712
|
-
function
|
|
4712
|
+
function q0(e) {
|
|
4713
4713
|
return J(
|
|
4714
4714
|
{
|
|
4715
4715
|
Perforation: () => !0,
|
|
@@ -4735,7 +4735,7 @@ function Cl(e) {
|
|
|
4735
4735
|
e.subKind
|
|
4736
4736
|
);
|
|
4737
4737
|
}
|
|
4738
|
-
function
|
|
4738
|
+
function j0(e) {
|
|
4739
4739
|
return J(
|
|
4740
4740
|
{
|
|
4741
4741
|
Perforation: () => !1,
|
|
@@ -4811,7 +4811,7 @@ function Bl(e) {
|
|
|
4811
4811
|
function wn(e, t, n, i) {
|
|
4812
4812
|
return _t(Bl(i) * e, t, n);
|
|
4813
4813
|
}
|
|
4814
|
-
function
|
|
4814
|
+
function Z0(e, t) {
|
|
4815
4815
|
const n = e.x + e.width, i = t.x + t.width;
|
|
4816
4816
|
return !(t.x > n || i < e.x);
|
|
4817
4817
|
}
|
|
@@ -4819,7 +4819,7 @@ function Hl(e, t, n = zr, i = Dr) {
|
|
|
4819
4819
|
const r = e.x + e.width + n, s = t.x + t.width + n, o = e.y + e.height + i, a = t.y + t.height + i;
|
|
4820
4820
|
return !(t.x - n > r || t.y - i > o || s + n < e.x || a + i < e.y);
|
|
4821
4821
|
}
|
|
4822
|
-
function
|
|
4822
|
+
function K0(e, t) {
|
|
4823
4823
|
const n = e.x + e.width, i = t.x + t.width, r = e.y + e.height, s = t.y + t.height;
|
|
4824
4824
|
if (t.x > n || t.y > r || i < e.x || s < e.y)
|
|
4825
4825
|
return;
|
|
@@ -4839,20 +4839,24 @@ function Di(e, t, n = zr, i = Dr) {
|
|
|
4839
4839
|
dy: h
|
|
4840
4840
|
};
|
|
4841
4841
|
}
|
|
4842
|
-
const Xl = 7,
|
|
4842
|
+
const Xl = 7, Ul = 11, Vl = 7, Wl = 20, Yl = 120, Gl = 19, ql = "rgba(0, 0, 0, 0.5)", jl = 5, Zl = 5;
|
|
4843
|
+
function Kl(e, t) {
|
|
4844
|
+
return e ?? t;
|
|
4845
|
+
}
|
|
4846
|
+
const tt = {
|
|
4843
4847
|
topleft: "topleft",
|
|
4844
4848
|
topright: "topright",
|
|
4845
4849
|
bottomleft: "bottomleft",
|
|
4846
4850
|
bottomright: "bottomright"
|
|
4847
4851
|
};
|
|
4848
|
-
class
|
|
4852
|
+
class Q0 extends Lt {
|
|
4849
4853
|
constructor(t, n) {
|
|
4850
4854
|
super(t, n), this.callouts = [], this.groupFilter = [], this.renderAnnotation = (i, r, s, o, a, c) => {
|
|
4851
4855
|
this.renderText(i, s, o - a, a, c, "arial", "bold"), this.renderText(r, s, o, a, c);
|
|
4852
4856
|
}, this.renderLine = (i, r, s, o, a, c, h = !0) => {
|
|
4853
4857
|
const { ctx: l } = this, u = h ? i : i + s, f = h ? i + s : i, d = r + 2;
|
|
4854
4858
|
l != null && (l.strokeStyle = c, l.lineWidth = 1, l.beginPath(), l.moveTo(o, a), l.lineTo(u, d), l.lineTo(f, d), l.stroke());
|
|
4855
|
-
}, this.minFontSize = (n == null ? void 0 : n.minFontSize) || Xl, this.maxFontSize = (n == null ? void 0 : n.maxFontSize) ||
|
|
4859
|
+
}, this.minFontSize = (n == null ? void 0 : n.minFontSize) || Xl, this.maxFontSize = (n == null ? void 0 : n.maxFontSize) || Ul, this.fontSizeFactor = (n == null ? void 0 : n.fontSizeFactor) || Vl, this.offsetMin = (n == null ? void 0 : n.offsetMin) || Wl, this.offsetMax = (n == null ? void 0 : n.offsetMax) || Yl, this.offsetFactor = (n == null ? void 0 : n.offsetFactor) || Gl, this.fontColor = n == null ? void 0 : n.fontColor, n != null && n.backgroundColor ? (this.backgroundActive = !0, this.backgroundColor = n.backgroundColor) : (this.backgroundActive = !1, this.backgroundColor = ql), this.backgroundPadding = (n == null ? void 0 : n.backgroundPadding) || jl, this.backgroundBorderRadius = Kl(n == null ? void 0 : n.backgroundBorderRadius, Zl);
|
|
4856
4860
|
}
|
|
4857
4861
|
setGroupFilter(t) {
|
|
4858
4862
|
this.groupFilter = t, this.callouts = [], this.render();
|
|
@@ -4873,7 +4877,7 @@ class q0 extends Lt {
|
|
|
4873
4877
|
if (!t || this.callouts.length <= 0) {
|
|
4874
4878
|
const { data: o, ctx: a, groupFilter: c } = this, { calculateDisplacementFromBottom: h } = this.referenceSystem.options, l = h ? r[0] < r[1] : r[0] > r[1], u = 0;
|
|
4875
4879
|
a != null && (a.font = `bold ${s}px arial`);
|
|
4876
|
-
const f = o.filter((
|
|
4880
|
+
const f = o.filter((p) => c.length <= 0 || c.includes(p.group)), d = wn(this.offsetFactor, this.offsetMin, this.offsetMax, n);
|
|
4877
4881
|
this.callouts = this.positionCallouts(f, l, n, i, u, s, d);
|
|
4878
4882
|
}
|
|
4879
4883
|
this.callouts.forEach((o) => {
|
|
@@ -4889,17 +4893,32 @@ class q0 extends Lt {
|
|
|
4889
4893
|
});
|
|
4890
4894
|
});
|
|
4891
4895
|
}
|
|
4896
|
+
renderBackground(t, n, i, r, s) {
|
|
4897
|
+
const { ctx: o } = this;
|
|
4898
|
+
if (o == null)
|
|
4899
|
+
return;
|
|
4900
|
+
const a = this.backgroundPadding, c = this.backgroundBorderRadius, h = this.measureTextWidth(t, s, "arial", "bold"), l = this.measureTextWidth(n, s), u = Math.max(h, l) + a * 2, f = (s + a) * 2, d = i - a, p = r - 2 * s - a;
|
|
4901
|
+
if (o.fillStyle = this.backgroundColor, c > 0) {
|
|
4902
|
+
const g = d + u, y = p + f;
|
|
4903
|
+
o.beginPath(), o.moveTo(d + c, p), o.lineTo(g - c, p), o.quadraticCurveTo(g, p, g, p + c), o.lineTo(g, y - c), o.quadraticCurveTo(g, y, g - c, y), o.lineTo(d + c, y), o.quadraticCurveTo(d, y, d, y - c), o.lineTo(d, p + c), o.quadraticCurveTo(d, p, d + c, p), o.fill();
|
|
4904
|
+
} else
|
|
4905
|
+
o.fillRect(d, p, u, f);
|
|
4906
|
+
}
|
|
4892
4907
|
renderText(t, n, i, r, s, o = "arial", a = "normal") {
|
|
4893
4908
|
const { ctx: c } = this;
|
|
4894
|
-
c != null && (c.font = `${a} ${r}px ${o}`, c.fillStyle = s, c.fillText(t, n, i));
|
|
4909
|
+
c != null && (c.font = `${a} ${r}px ${o}`, c.fillStyle = this.fontColor || s, c.fillText(t, n, i));
|
|
4910
|
+
}
|
|
4911
|
+
measureTextWidth(t, n, i = "arial", r = "normal") {
|
|
4912
|
+
const { ctx: s } = this;
|
|
4913
|
+
return s == null ? 0 : (s.font = `${r} ${n}px ${i}`, s.measureText(t).width);
|
|
4895
4914
|
}
|
|
4896
|
-
renderPoint(t, n, i = 3) {
|
|
4897
|
-
const { ctx:
|
|
4898
|
-
|
|
4915
|
+
renderPoint(t, n, i, r = 3) {
|
|
4916
|
+
const { ctx: s } = this;
|
|
4917
|
+
s != null && (s.fillStyle = i, s.beginPath(), s.moveTo(t, n), s.arc(t, n, r, 0, Math.PI * 2), s.fill());
|
|
4899
4918
|
}
|
|
4900
4919
|
renderCallout(t, n, i, r, s) {
|
|
4901
4920
|
const o = this.getPosition(i, s), { x: a, y: c } = o, { height: h, width: l, x: u, y: f } = i, d = s === tt.topright || s === tt.bottomright;
|
|
4902
|
-
this.renderAnnotation(t, n, a, c, h, r), this.renderPoint(u, f), this.renderLine(a, c, l, u, f, r, d);
|
|
4921
|
+
this.backgroundActive && this.renderBackground(t, n, a, c, h), this.renderAnnotation(t, n, a, c, h, r), this.renderPoint(u, f, r), this.renderLine(a, c, l, u, f, r, d);
|
|
4903
4922
|
}
|
|
4904
4923
|
getPosition(t, n) {
|
|
4905
4924
|
const { x: i, y: r, offsetX: s = 0, offsetY: o = 0, width: a } = t;
|
|
@@ -4936,8 +4955,8 @@ class q0 extends Lt {
|
|
|
4936
4955
|
if (t.length === 0)
|
|
4937
4956
|
return [];
|
|
4938
4957
|
const c = n ? tt.topleft : tt.topright, h = t.map((f) => {
|
|
4939
|
-
var
|
|
4940
|
-
const d = f.pos ? f.pos : (
|
|
4958
|
+
var p;
|
|
4959
|
+
const d = f.pos ? f.pos : (p = this.referenceSystem) == null ? void 0 : p.project(f.md);
|
|
4941
4960
|
return {
|
|
4942
4961
|
title: f.title,
|
|
4943
4962
|
label: f.label,
|
|
@@ -4986,7 +5005,7 @@ class q0 extends Lt {
|
|
|
4986
5005
|
}
|
|
4987
5006
|
}
|
|
4988
5007
|
}
|
|
4989
|
-
const
|
|
5008
|
+
const Ql = 16, Jl = 6;
|
|
4990
5009
|
function ut(e) {
|
|
4991
5010
|
const t = dt(e);
|
|
4992
5011
|
if (t != null) {
|
|
@@ -4995,13 +5014,13 @@ function ut(e) {
|
|
|
4995
5014
|
} else
|
|
4996
5015
|
throw Error(`Could not format string ${e} to hex code.`);
|
|
4997
5016
|
}
|
|
4998
|
-
function
|
|
4999
|
-
return typeof e == "string" ? e : `#${e.toString(
|
|
5017
|
+
function tu(e) {
|
|
5018
|
+
return typeof e == "string" ? e : `#${e.toString(Ql).padStart(Jl, "0")}`;
|
|
5000
5019
|
}
|
|
5001
|
-
const
|
|
5002
|
-
class
|
|
5020
|
+
const eu = 1e4;
|
|
5021
|
+
class J0 extends Lt {
|
|
5003
5022
|
constructor(t, n) {
|
|
5004
|
-
super(t, n), this.surfaceAreasPaths = [], this.surfaceLinesPaths = [], this.maxDepth =
|
|
5023
|
+
super(t, n), this.surfaceAreasPaths = [], this.surfaceLinesPaths = [], this.maxDepth = eu, this.drawPolygonPath = (i, r) => {
|
|
5005
5024
|
const { ctx: s } = this;
|
|
5006
5025
|
s != null && (s.fillStyle = i, s.fill(r));
|
|
5007
5026
|
}, this.drawLinePath = (i, r) => {
|
|
@@ -5014,10 +5033,10 @@ class j0 extends Lt {
|
|
|
5014
5033
|
for (let f = 0; f < i.length; f++) {
|
|
5015
5034
|
const d = !!((o = i[f]) != null && o[1]);
|
|
5016
5035
|
d && (s === null && (s = []), s.push((a = i[f]) == null ? void 0 : a[0], (c = i[f]) == null ? void 0 : c[1]));
|
|
5017
|
-
const
|
|
5018
|
-
if ((!d ||
|
|
5019
|
-
for (let
|
|
5020
|
-
s.push((l = i[
|
|
5036
|
+
const p = f === i.length - 1;
|
|
5037
|
+
if ((!d || p) && s.length > 0) {
|
|
5038
|
+
for (let g = d ? f : f - 1; g >= 0 && ((h = i[g]) != null && h[1]); g--)
|
|
5039
|
+
s.push((l = i[g]) == null ? void 0 : l[0], ((u = i[g]) == null ? void 0 : u[2]) || this.maxDepth);
|
|
5021
5040
|
r.push(s), s = [];
|
|
5022
5041
|
}
|
|
5023
5042
|
}
|
|
@@ -5052,7 +5071,7 @@ class j0 extends Lt {
|
|
|
5052
5071
|
});
|
|
5053
5072
|
}
|
|
5054
5073
|
colorToCSSColor(t) {
|
|
5055
|
-
return
|
|
5074
|
+
return tu(t);
|
|
5056
5075
|
}
|
|
5057
5076
|
generateSurfaceAreasPaths() {
|
|
5058
5077
|
var t;
|
|
@@ -5073,7 +5092,7 @@ class j0 extends Lt {
|
|
|
5073
5092
|
}
|
|
5074
5093
|
}
|
|
5075
5094
|
function Or(e, t) {
|
|
5076
|
-
var c, h, l, u, f, d,
|
|
5095
|
+
var c, h, l, u, f, d, p, g, y;
|
|
5077
5096
|
if (e.length < 2)
|
|
5078
5097
|
return -1;
|
|
5079
5098
|
const n = 20;
|
|
@@ -5089,13 +5108,13 @@ function Or(e, t) {
|
|
|
5089
5108
|
else if (t <= s && t > x)
|
|
5090
5109
|
r = m, o = (d = e[r]) == null ? void 0 : d[0];
|
|
5091
5110
|
else if (t <= x && t >= o)
|
|
5092
|
-
i = m, s = (
|
|
5111
|
+
i = m, s = (p = e[i]) == null ? void 0 : p[0];
|
|
5093
5112
|
else
|
|
5094
5113
|
return -1;
|
|
5095
5114
|
}
|
|
5096
5115
|
let a = -1;
|
|
5097
5116
|
for (let m = i; m < r; m++) {
|
|
5098
|
-
const x = (
|
|
5117
|
+
const x = (g = e[m]) == null ? void 0 : g[0], v = (y = e[m + 1]) == null ? void 0 : y[0];
|
|
5099
5118
|
if (x != null && v != null && Math.min(x, v) <= t && t <= Math.max(x, v)) {
|
|
5100
5119
|
a = m;
|
|
5101
5120
|
break;
|
|
@@ -5110,31 +5129,31 @@ function bt(e, t, n = 0, i = 0) {
|
|
|
5110
5129
|
if (s !== -1) {
|
|
5111
5130
|
const l = (o = e[s]) == null ? void 0 : o[1], u = (a = e[s + 1]) == null ? void 0 : a[1];
|
|
5112
5131
|
if (l && u) {
|
|
5113
|
-
const f = ((c = e[s]) == null ? void 0 : c[0]) ?? 0,
|
|
5132
|
+
const f = ((c = e[s]) == null ? void 0 : c[0]) ?? 0, p = (((h = e[s + 1]) == null ? void 0 : h[0]) ?? 0) - f, y = (t - f) / p;
|
|
5114
5133
|
r = l * (1 - y) + u * y, n && n > r && (r = n), i && i < r && (r = i);
|
|
5115
5134
|
}
|
|
5116
5135
|
}
|
|
5117
5136
|
return r;
|
|
5118
5137
|
}
|
|
5119
|
-
const
|
|
5138
|
+
const Vn = (e, t) => ({
|
|
5120
5139
|
title: e.pickIdentifier || e.identifier,
|
|
5121
5140
|
group: t,
|
|
5122
5141
|
label: `${e.md} ${e.mdUnit} ${e.depthReferencePoint}`,
|
|
5123
5142
|
color: t === "strat-picks" ? "#227" : "rgba(0,0,0,0.8)",
|
|
5124
5143
|
md: e.md
|
|
5125
5144
|
});
|
|
5126
|
-
function
|
|
5127
|
-
return e ? e.map((t) =>
|
|
5145
|
+
function nu(e) {
|
|
5146
|
+
return e ? e.map((t) => Vn(t, "ref-picks")) : [];
|
|
5128
5147
|
}
|
|
5129
|
-
function
|
|
5130
|
-
return e ? e.filter((t) => t.entryPick.md === t.from).map((t) =>
|
|
5148
|
+
function iu(e) {
|
|
5149
|
+
return e ? e.filter((t) => t.entryPick.md === t.from).map((t) => Vn(t.entryPick, "strat-picks")) : [];
|
|
5131
5150
|
}
|
|
5132
|
-
function
|
|
5133
|
-
return e ? e.filter((t) => e.findIndex((n) => Math.abs(n.entryPick.md - t.exitPick.md) < 0.5) === -1).map((t) =>
|
|
5151
|
+
function ru(e) {
|
|
5152
|
+
return e ? e.filter((t) => e.findIndex((n) => Math.abs(n.entryPick.md - t.exitPick.md) < 0.5) === -1).map((t) => Vn(t.exitPick, "strat-picks")).filter((t, n, i) => n === i.findIndex((r) => r.title === t.title && r.md === t.md)) : [];
|
|
5134
5153
|
}
|
|
5135
|
-
const
|
|
5154
|
+
const tf = (e) => [...nu(e.nonUnitPicks), ...iu(e.unitPicks), ...ru(e.unitPicks)].sort(
|
|
5136
5155
|
(t, n) => t.md - n.md
|
|
5137
|
-
),
|
|
5156
|
+
), su = (e) => ({
|
|
5138
5157
|
unitName: e.identifier,
|
|
5139
5158
|
topSurface: e.top,
|
|
5140
5159
|
baseSurface: e.base,
|
|
@@ -5149,7 +5168,7 @@ const Z0 = (e) => [...Ql(e.nonUnitPicks), ...Jl(e.unitPicks), ...tu(e.unitPicks)
|
|
|
5149
5168
|
lithType: e.lithologyType,
|
|
5150
5169
|
parent: e.stratUnitParent
|
|
5151
5170
|
});
|
|
5152
|
-
function
|
|
5171
|
+
function ou(e, t, n) {
|
|
5153
5172
|
if (n.length === 0)
|
|
5154
5173
|
return [[e, t]];
|
|
5155
5174
|
const i = [];
|
|
@@ -5160,9 +5179,9 @@ function nu(e, t, n) {
|
|
|
5160
5179
|
}
|
|
5161
5180
|
return r < t && i.push([r, t]), i;
|
|
5162
5181
|
}
|
|
5163
|
-
const
|
|
5164
|
-
function
|
|
5165
|
-
const n =
|
|
5182
|
+
const au = (e) => e.map(su);
|
|
5183
|
+
function cu(e, t) {
|
|
5184
|
+
const n = au(t), i = [], r = [];
|
|
5166
5185
|
return e.forEach((s) => {
|
|
5167
5186
|
const o = n.filter((a) => {
|
|
5168
5187
|
var c;
|
|
@@ -5181,7 +5200,7 @@ function ru(e, t) {
|
|
|
5181
5200
|
) : i.push({ identifier: s.pickIdentifier, ...s });
|
|
5182
5201
|
}), { joined: r, nonUnitPicks: i };
|
|
5183
5202
|
}
|
|
5184
|
-
function
|
|
5203
|
+
function hu(e) {
|
|
5185
5204
|
const t = [];
|
|
5186
5205
|
let n = null;
|
|
5187
5206
|
const i = e.filter((r) => r.level).sort((r, s) => r.unitName.localeCompare(s.unitName) || r.md - s.md || r.ageTop - s.ageTop);
|
|
@@ -5236,9 +5255,9 @@ function su(e) {
|
|
|
5236
5255
|
}
|
|
5237
5256
|
return t;
|
|
5238
5257
|
}
|
|
5239
|
-
function
|
|
5258
|
+
function ef(e, t) {
|
|
5240
5259
|
var a;
|
|
5241
|
-
const { joined: n, nonUnitPicks: i } =
|
|
5260
|
+
const { joined: n, nonUnitPicks: i } = cu(e, t), s = hu(n).filter((c) => c.mdEntry < c.mdExit).sort((c, h) => c.mdEntry - h.mdEntry || c.level - h.level).reverse(), o = [];
|
|
5242
5261
|
for (; s.length > 0; ) {
|
|
5243
5262
|
const c = s.pop(), h = [];
|
|
5244
5263
|
for (; s.length > 0 && ((a = s[s.length - 1]) == null ? void 0 : a.level) > c.level; )
|
|
@@ -5246,7 +5265,7 @@ function K0(e, t) {
|
|
|
5246
5265
|
h.reverse(), h.push(c);
|
|
5247
5266
|
const l = [];
|
|
5248
5267
|
h.forEach((u) => {
|
|
5249
|
-
const f =
|
|
5268
|
+
const f = ou(u.mdEntry, u.mdExit, l);
|
|
5250
5269
|
l.push(...f.map((d) => ({ from: d[0], to: d[1], itm: u })));
|
|
5251
5270
|
}), l.sort((u, f) => u.from - f.from), o.push(
|
|
5252
5271
|
...l.map((u) => ({
|
|
@@ -5258,7 +5277,7 @@ function K0(e, t) {
|
|
|
5258
5277
|
}
|
|
5259
5278
|
return { unitPicks: o, nonUnitPicks: i };
|
|
5260
5279
|
}
|
|
5261
|
-
function
|
|
5280
|
+
function lu(e, t) {
|
|
5262
5281
|
const n = e.map((s, o) => o * t / e.length), i = Pt().domain(n).range(e);
|
|
5263
5282
|
return Array.from(new Array(t).keys()).map((s) => {
|
|
5264
5283
|
var a;
|
|
@@ -5266,7 +5285,7 @@ function ou(e, t) {
|
|
|
5266
5285
|
return o != null ? [o.r, o.g, o.b] : [0, 0, 0];
|
|
5267
5286
|
});
|
|
5268
5287
|
}
|
|
5269
|
-
const
|
|
5288
|
+
const nf = (e) => e ? {
|
|
5270
5289
|
x: e.minX,
|
|
5271
5290
|
y: e.minTvdMsl,
|
|
5272
5291
|
width: e.maxX - e.minX,
|
|
@@ -5277,10 +5296,10 @@ const Q0 = (e) => e ? {
|
|
|
5277
5296
|
width: 0,
|
|
5278
5297
|
height: 0
|
|
5279
5298
|
};
|
|
5280
|
-
function
|
|
5299
|
+
function rf(e, t) {
|
|
5281
5300
|
if (!(e && e.datapoints))
|
|
5282
5301
|
return null;
|
|
5283
|
-
const n = t.reduce((d,
|
|
5302
|
+
const n = t.reduce((d, p) => Math.min(d, p[0]), 0), i = t.reduce((d, p) => Math.max(d, p[0]), 0), r = e.yAxisValues && e.yAxisValues[0], s = e.yAxisValues && e.yAxisValues[e.yAxisValues.length - 1], o = e.datapoints || [], a = -o.reduce((d, p) => Math.min(...p, d), 0), c = o.reduce((d, p) => Math.max(...p, d), 0), h = Math.max(Math.abs(a), Math.abs(c)), l = -h, u = h;
|
|
5284
5303
|
return {
|
|
5285
5304
|
minX: n,
|
|
5286
5305
|
maxX: i,
|
|
@@ -5293,7 +5312,7 @@ function J0(e, t) {
|
|
|
5293
5312
|
}
|
|
5294
5313
|
};
|
|
5295
5314
|
}
|
|
5296
|
-
async function
|
|
5315
|
+
async function sf(e, t, n, i = { isLeftToRight: !0 }) {
|
|
5297
5316
|
var _, A, w, L, E, F, z, O;
|
|
5298
5317
|
if (!(e && e.datapoints && e.datapoints.length > 0))
|
|
5299
5318
|
return;
|
|
@@ -5301,9 +5320,9 @@ async function tf(e, t, n, i = { isLeftToRight: !0 }) {
|
|
|
5301
5320
|
min: c,
|
|
5302
5321
|
max: h,
|
|
5303
5322
|
difference: h - c
|
|
5304
|
-
}, u = ((_ = t[0]) == null ? void 0 : _[0]) - ((A = t[t.length - 1]) == null ? void 0 : A[0]), f = Math.abs(Math.floor(u / 5)), d = e.yAxisValues.length,
|
|
5323
|
+
}, u = ((_ = t[0]) == null ? void 0 : _[0]) - ((A = t[t.length - 1]) == null ? void 0 : A[0]), f = Math.abs(Math.floor(u / 5)), d = e.yAxisValues.length, p = 1e3, g = lu(n, p), y = new Uint8ClampedArray(f * d * 4);
|
|
5305
5324
|
let m = 0;
|
|
5306
|
-
const x = (
|
|
5325
|
+
const x = (p - 1) / l.difference;
|
|
5307
5326
|
let v = i != null && i.isLeftToRight ? (w = t[0]) == null ? void 0 : w[0] : (L = t[t.length - 1]) == null ? void 0 : L[0];
|
|
5308
5327
|
const M = u / f * (i != null && i.isLeftToRight ? -1 : 1);
|
|
5309
5328
|
let b, S, T, C, k;
|
|
@@ -5311,20 +5330,20 @@ async function tf(e, t, n, i = { isLeftToRight: !0 }) {
|
|
|
5311
5330
|
let P;
|
|
5312
5331
|
for (let $ = 0; $ < f; $++) {
|
|
5313
5332
|
m = $ * 4;
|
|
5314
|
-
const B = Or(t, v), H = (E = t[B]) == null ? void 0 : E[0], q = ((F = t[B + 1]) == null ? void 0 : F[0]) - H,
|
|
5333
|
+
const B = Or(t, v), H = (E = t[B]) == null ? void 0 : E[0], q = ((F = t[B + 1]) == null ? void 0 : F[0]) - H, Y = (v - H) / q;
|
|
5315
5334
|
for (let st = 0; st < d; st++)
|
|
5316
|
-
b = (z = r[st]) == null ? void 0 : z[B], S = (O = r[st]) == null ? void 0 : O[B + 1], b == null || S == null ? (k = R, P = 0) : (T = b * (1 -
|
|
5335
|
+
b = (z = r[st]) == null ? void 0 : z[B], S = (O = r[st]) == null ? void 0 : O[B + 1], b == null || S == null ? (k = R, P = 0) : (T = b * (1 - Y) + S * Y, C = (T - l.min) * x, C = _t(~~C, 0, p - 1), k = g[C], P = 255), y.set([k[0], k[1], k[2], P], m), m += f * 4;
|
|
5317
5336
|
v += M;
|
|
5318
5337
|
}
|
|
5319
5338
|
const I = new ImageData(y, f, d);
|
|
5320
5339
|
return await createImageBitmap(I, 0, 0, f, d);
|
|
5321
5340
|
}
|
|
5322
|
-
const
|
|
5323
|
-
function
|
|
5324
|
-
const i = n.filter((d) => d.data.values), r =
|
|
5325
|
-
|
|
5326
|
-
const a =
|
|
5327
|
-
...
|
|
5341
|
+
const uu = 2147483648, fu = 4294967295;
|
|
5342
|
+
function of(e, t, n) {
|
|
5343
|
+
const i = n.filter((d) => d.data.values), r = _u(i), s = /* @__PURE__ */ new Map(), o = mu(r, t, s);
|
|
5344
|
+
yu(o);
|
|
5345
|
+
const a = du(r, e), c = Tu(e, o, t), h = gu(s, c), u = [
|
|
5346
|
+
...pu(h, e),
|
|
5328
5347
|
...Object.values(c).flat().filter((d) => !d.exclude)
|
|
5329
5348
|
];
|
|
5330
5349
|
return {
|
|
@@ -5332,7 +5351,7 @@ function ef(e, t, n) {
|
|
|
5332
5351
|
areas: u
|
|
5333
5352
|
};
|
|
5334
5353
|
}
|
|
5335
|
-
function
|
|
5354
|
+
function du(e, t) {
|
|
5336
5355
|
return e.filter((i) => i.visualization === "line").map((i) => ({
|
|
5337
5356
|
id: i.name,
|
|
5338
5357
|
label: i.name,
|
|
@@ -5341,7 +5360,7 @@ function hu(e, t) {
|
|
|
5341
5360
|
data: t.map((r, s) => [r[0], i.values[s]])
|
|
5342
5361
|
}));
|
|
5343
5362
|
}
|
|
5344
|
-
function
|
|
5363
|
+
function pu(e, t) {
|
|
5345
5364
|
return e.map((i, r) => {
|
|
5346
5365
|
const s = r + 1 < e.length ? e[r + 1] : null;
|
|
5347
5366
|
return {
|
|
@@ -5351,7 +5370,7 @@ function lu(e, t) {
|
|
|
5351
5370
|
};
|
|
5352
5371
|
});
|
|
5353
5372
|
}
|
|
5354
|
-
function
|
|
5373
|
+
function gu(e, t) {
|
|
5355
5374
|
return Array.from(e.values()).sort((i, r) => i.age - r.age).filter((i) => {
|
|
5356
5375
|
const r = t[i.name], s = r && r.length > 0;
|
|
5357
5376
|
return s || console.warn(`Intersection surface group '${i.name}' has no valid entries and will be discarded.`), s;
|
|
@@ -5360,12 +5379,12 @@ function uu(e, t) {
|
|
|
5360
5379
|
return {
|
|
5361
5380
|
id: i.name,
|
|
5362
5381
|
label: i.name,
|
|
5363
|
-
color:
|
|
5382
|
+
color: vu(r),
|
|
5364
5383
|
top: o.data.map((a) => a[1])
|
|
5365
5384
|
};
|
|
5366
5385
|
});
|
|
5367
5386
|
}
|
|
5368
|
-
function
|
|
5387
|
+
function mu(e, t, n) {
|
|
5369
5388
|
const i = t && t.find((o) => o.stratUnitLevel === 1), r = i ? i.identifier : "SEABED";
|
|
5370
5389
|
return e.filter((o) => o.visualization === "interval" || o.visualization === "none").map((o) => {
|
|
5371
5390
|
const a = [], c = Nr(t, o.name, a);
|
|
@@ -5381,7 +5400,7 @@ function fu(e, t, n) {
|
|
|
5381
5400
|
};
|
|
5382
5401
|
});
|
|
5383
5402
|
}
|
|
5384
|
-
function
|
|
5403
|
+
function yu(e) {
|
|
5385
5404
|
e.sort((t, n) => {
|
|
5386
5405
|
if (!t.unit && !n.unit)
|
|
5387
5406
|
return 0;
|
|
@@ -5404,7 +5423,7 @@ function Nr(e, t, n = []) {
|
|
|
5404
5423
|
}
|
|
5405
5424
|
return null;
|
|
5406
5425
|
}
|
|
5407
|
-
function
|
|
5426
|
+
function _u(e) {
|
|
5408
5427
|
return e.map((t) => {
|
|
5409
5428
|
const n = t.visualSettings.displayName, i = n.replace(/\s(Base|Top)/gi, ""), r = n.toLowerCase().endsWith("base");
|
|
5410
5429
|
return {
|
|
@@ -5416,11 +5435,11 @@ function pu(e) {
|
|
|
5416
5435
|
};
|
|
5417
5436
|
});
|
|
5418
5437
|
}
|
|
5419
|
-
function
|
|
5420
|
-
return e.colorR === null || e.colorG === null || e.colorB === null ?
|
|
5438
|
+
function xu(e) {
|
|
5439
|
+
return e.colorR === null || e.colorG === null || e.colorB === null ? uu : e.colorR << 16 | e.colorG << 8 | e.colorB;
|
|
5421
5440
|
}
|
|
5422
|
-
const
|
|
5423
|
-
function
|
|
5441
|
+
const vu = Qi().domain([0, 100]).range(lo(Kt("#e6f1cf", "#85906d"), 10));
|
|
5442
|
+
function wu(e, t, n, i) {
|
|
5424
5443
|
const r = t + 1;
|
|
5425
5444
|
if (!n || r >= n.length)
|
|
5426
5445
|
return;
|
|
@@ -5429,27 +5448,27 @@ function yu(e, t, n, i) {
|
|
|
5429
5448
|
return s;
|
|
5430
5449
|
for (let o = r; o < n.length; o++) {
|
|
5431
5450
|
const a = n[o];
|
|
5432
|
-
if (!(a != null && a.isBase) ||
|
|
5451
|
+
if (!(a != null && a.isBase) || bu(e, a, i))
|
|
5433
5452
|
return o;
|
|
5434
5453
|
}
|
|
5435
5454
|
}
|
|
5436
|
-
function
|
|
5455
|
+
function bu(e, t, n) {
|
|
5437
5456
|
const i = [];
|
|
5438
5457
|
return Nr(n, e.name, i), i.some((r) => t.name === r.identifier);
|
|
5439
5458
|
}
|
|
5440
|
-
function
|
|
5459
|
+
function Tu(e, t, n) {
|
|
5441
5460
|
return t.reduce((r, s, o) => {
|
|
5442
5461
|
var a;
|
|
5443
5462
|
if (!s.isBase) {
|
|
5444
5463
|
r[s.group] || (r[s.group] = []);
|
|
5445
|
-
const c =
|
|
5464
|
+
const c = wu(s, o, t, n);
|
|
5446
5465
|
(a = r[s.group]) == null || a.push({
|
|
5447
5466
|
id: s.name,
|
|
5448
5467
|
label: s.name,
|
|
5449
|
-
color: s.unit &&
|
|
5468
|
+
color: s.unit && xu(s.unit) || fu,
|
|
5450
5469
|
exclude: s.visualization === "none" || !s.unit,
|
|
5451
5470
|
data: e.map((h, l) => {
|
|
5452
|
-
const u = s.values[l] != null ?
|
|
5471
|
+
const u = s.values[l] != null ? Su(c, t, l) : void 0;
|
|
5453
5472
|
return [h[0], s.values[l], u];
|
|
5454
5473
|
})
|
|
5455
5474
|
});
|
|
@@ -5457,7 +5476,7 @@ function xu(e, t, n) {
|
|
|
5457
5476
|
return r;
|
|
5458
5477
|
}, {});
|
|
5459
5478
|
}
|
|
5460
|
-
function
|
|
5479
|
+
function Su(e, t, n) {
|
|
5461
5480
|
var i, r;
|
|
5462
5481
|
if (!(!t || !e || e >= t.length)) {
|
|
5463
5482
|
for (let s = e; s < t.length; s++)
|
|
@@ -5465,8 +5484,8 @@ function vu(e, t, n) {
|
|
|
5465
5484
|
return (r = t[s]) == null ? void 0 : r.values[n];
|
|
5466
5485
|
}
|
|
5467
5486
|
}
|
|
5468
|
-
const Oi = 0.1, Qe = 1e3,
|
|
5469
|
-
function
|
|
5487
|
+
const Oi = 0.1, Qe = 1e3, Mu = 150, Au = 30, Pu = 10;
|
|
5488
|
+
function af(e) {
|
|
5470
5489
|
var r;
|
|
5471
5490
|
if (!e || e.length === 0)
|
|
5472
5491
|
return [];
|
|
@@ -5475,31 +5494,31 @@ function nf(e) {
|
|
|
5475
5494
|
n[o][0] = i - s[0];
|
|
5476
5495
|
}), n;
|
|
5477
5496
|
}
|
|
5478
|
-
function
|
|
5497
|
+
function cf(e, t) {
|
|
5479
5498
|
if (!e || e.length === 0)
|
|
5480
5499
|
return [];
|
|
5481
|
-
const n = e ? e.map((x) => [x.easting, x.northing, x.tvd, x.md]) : [], i = new Dn(n, { tension: 0.75, arcDivisions: 5e3 }), r = i.length, s = Math.round(r *
|
|
5500
|
+
const n = e ? e.map((x) => [x.easting, x.northing, x.tvd, x.md]) : [], i = new Dn(n, { tension: 0.75, arcDivisions: 5e3 }), r = i.length, s = Math.round(r * Pu);
|
|
5482
5501
|
let o;
|
|
5483
5502
|
s > 0 ? o = $r(i.getPoints(s), 5e-4, 10) : o = [[n[0][0], n[0][1]]];
|
|
5484
5503
|
const a = o[0], c = o[o.length - 1], h = D.distance(a, c);
|
|
5485
5504
|
let l;
|
|
5486
|
-
if (h <
|
|
5505
|
+
if (h < Mu) {
|
|
5487
5506
|
const v = t / 180 * Math.PI;
|
|
5488
5507
|
l = new D(Math.cos(v), Math.sin(v)).mutable;
|
|
5489
5508
|
} else
|
|
5490
|
-
l =
|
|
5509
|
+
l = Cu(o, Au);
|
|
5491
5510
|
const u = Math.max(0, Qe - r), f = u + r, d = [];
|
|
5492
|
-
let
|
|
5493
|
-
const
|
|
5494
|
-
u > 0 && (
|
|
5495
|
-
(x) => l.set(
|
|
5496
|
-
),
|
|
5511
|
+
let p = [];
|
|
5512
|
+
const g = l.toArray();
|
|
5513
|
+
u > 0 && (p = xi(Math.ceil(u * Oi)).map(
|
|
5514
|
+
(x) => l.set(g).scale(u * (1 - x)).subFrom(a).toArray()
|
|
5515
|
+
), p.pop(), d.push(...p)), d.push(...o);
|
|
5497
5516
|
const y = xi(Math.ceil(Qe * Oi)).map(
|
|
5498
|
-
(x) => l.set(
|
|
5517
|
+
(x) => l.set(g).scale(Qe * x).add(c).toArray()
|
|
5499
5518
|
).splice(1);
|
|
5500
5519
|
return d.push(...y), Br(d, void 0, f);
|
|
5501
5520
|
}
|
|
5502
|
-
function
|
|
5521
|
+
function Cu(e, t) {
|
|
5503
5522
|
const n = D.zero.mutable;
|
|
5504
5523
|
let i = 0;
|
|
5505
5524
|
const r = D.zero.mutable;
|
|
@@ -5517,10 +5536,10 @@ function $r(e, t = 1e-3, n = 10) {
|
|
|
5517
5536
|
let [o, a] = s[0];
|
|
5518
5537
|
const c = [e[0]];
|
|
5519
5538
|
for (let l = 1; l + 1 < s.length; l++) {
|
|
5520
|
-
const [u, f] = s[l] ?? [], [d,
|
|
5521
|
-
if (u != null && f != null && d != null &&
|
|
5522
|
-
const
|
|
5523
|
-
(
|
|
5539
|
+
const [u, f] = s[l] ?? [], [d, p] = s[l + 1] ?? [];
|
|
5540
|
+
if (u != null && f != null && d != null && p != null && (d - u !== 0 || p - f !== 0)) {
|
|
5541
|
+
const g = Math.abs(o * p - a * d + d * f - p * u + a * u - o * f) / Math.sqrt((d - o) ** 2 + (p - a) ** 2), y = [o - u, a - f], m = Math.sqrt(y[0] ** 2 + y[1] ** 2);
|
|
5542
|
+
(g > t || m >= n) && (c.push([u + i, f + r]), [o, a] = [u, f]);
|
|
5524
5543
|
}
|
|
5525
5544
|
}
|
|
5526
5545
|
const h = s[s.length - 1];
|
|
@@ -5533,19 +5552,19 @@ function Br(e, t, n = 0) {
|
|
|
5533
5552
|
return r += Math.sqrt(a ** 2 + c ** 2), i = o, [n > 0 ? n - r : r, o[2] ?? 0];
|
|
5534
5553
|
});
|
|
5535
5554
|
}
|
|
5536
|
-
const
|
|
5537
|
-
class
|
|
5555
|
+
const Lu = 18, ku = 8, Eu = 13, Fu = "black", Ru = "Arial", Iu = 70;
|
|
5556
|
+
class hf extends Lt {
|
|
5538
5557
|
constructor(t, n) {
|
|
5539
|
-
super(t, n), this.defaultMargins =
|
|
5540
|
-
const { data: a } = i, { ctx: c, maxFontSizeInWorldCoordinates: h, isXFlipped: l } = this, { xScale: u, yScale: f, xRatio: d, yRatio:
|
|
5558
|
+
super(t, n), this.defaultMargins = Lu, this.defaultMinFontSize = ku, this.defaultMaxFontSize = Eu, this.defaultTextColor = Fu, this.defaultFont = Ru, this.isLabelsOnLeftSide = !0, this.maxFontSizeInWorldCoordinates = Iu, this.isXFlipped = !1, this.areasWithAvgTopDepth = [], this.drawAreaLabel = (i, r, s, o) => {
|
|
5559
|
+
const { data: a } = i, { ctx: c, maxFontSizeInWorldCoordinates: h, isXFlipped: l } = this, { xScale: u, yScale: f, xRatio: d, yRatio: p, zFactor: g } = this.rescaleEvent;
|
|
5541
5560
|
if (c == null)
|
|
5542
5561
|
return;
|
|
5543
5562
|
let y = this.checkDrawLabelsOnLeftSide();
|
|
5544
5563
|
const x = (this.options.margins || this.defaultMargins) * (l ? -1 : 1) / d, v = this.options.minFontSize || this.defaultMinFontSize;
|
|
5545
|
-
let b = (this.options.maxFontSize || this.defaultMaxFontSize) /
|
|
5546
|
-
b > h && (b = h, b *
|
|
5564
|
+
let b = (this.options.maxFontSize || this.defaultMaxFontSize) / p;
|
|
5565
|
+
b > h && (b = h, b * p < v && (b = v / p));
|
|
5547
5566
|
const S = u.invert(u.range()[0]) + x, T = u.invert(u.range()[1]) - x, [C, k] = this.getSurfacesAreaEdges();
|
|
5548
|
-
c.save(), c.font = `${b *
|
|
5567
|
+
c.save(), c.font = `${b * p}px ${this.options.font || this.defaultFont}`;
|
|
5549
5568
|
let R = c.measureText(i.label ?? ""), P = R.width / d;
|
|
5550
5569
|
if (y) {
|
|
5551
5570
|
const X = S + (l ? -P : P);
|
|
@@ -5575,17 +5594,17 @@ class sf extends Lt {
|
|
|
5575
5594
|
B || (B = new D(O.x, A));
|
|
5576
5595
|
const H = B.y - O.y;
|
|
5577
5596
|
if (H < b) {
|
|
5578
|
-
if (H *
|
|
5597
|
+
if (H * p < v)
|
|
5579
5598
|
return;
|
|
5580
|
-
b = H, c.font = `${b *
|
|
5599
|
+
b = H, c.font = `${b * p}px ${this.options.font || this.defaultFont}`, R = c.measureText(i.label ?? ""), P = R.width / d;
|
|
5581
5600
|
}
|
|
5582
|
-
const
|
|
5601
|
+
const W = y !== l ? D.right : D.left, q = this.calcAreaDir(
|
|
5583
5602
|
z,
|
|
5584
5603
|
$,
|
|
5585
5604
|
I,
|
|
5586
5605
|
w,
|
|
5587
5606
|
F,
|
|
5588
|
-
|
|
5607
|
+
W,
|
|
5589
5608
|
_,
|
|
5590
5609
|
A,
|
|
5591
5610
|
0,
|
|
@@ -5594,14 +5613,14 @@ class sf extends Lt {
|
|
|
5594
5613
|
(r == null ? void 0 : r.data.map((X) => [X[0], X[1]])) ?? [],
|
|
5595
5614
|
s,
|
|
5596
5615
|
o
|
|
5597
|
-
),
|
|
5598
|
-
c && (c.textAlign = y ? "left" : "right", c.translate(u(
|
|
5616
|
+
), U = Math.atan(Math.tan(q) * g), Y = I, st = (O.y + B.y) / 2, as = l ? -U : U;
|
|
5617
|
+
c && (c.textAlign = y ? "left" : "right", c.translate(u(Y), f(st)), c.rotate(as), c.fillStyle = this.options.textColor || this.defaultTextColor, c.font = `${b * p}px ${this.options.font || this.defaultFont}`, c.textBaseline = "middle", c.fillText(i.label ?? "", 0, 0), c.restore());
|
|
5599
5618
|
}, this.drawLineLabel = (i) => {
|
|
5600
5619
|
const { ctx: r, isXFlipped: s } = this, { xScale: o, yScale: a, xRatio: c, yRatio: h, zFactor: l } = this.rescaleEvent;
|
|
5601
5620
|
if (r == null)
|
|
5602
5621
|
return;
|
|
5603
|
-
const u = this.checkDrawLabelsOnLeftSide(), f = this.getMarginsInWorldCoordinates(),
|
|
5604
|
-
r.save(), r.font = `${
|
|
5622
|
+
const u = this.checkDrawLabelsOnLeftSide(), f = this.getMarginsInWorldCoordinates(), p = (this.options.maxFontSize || this.defaultMaxFontSize) / h;
|
|
5623
|
+
r.save(), r.font = `${p * h}px ${this.options.font || this.defaultFont}`;
|
|
5605
5624
|
const y = r.measureText(i.label).width / c, m = o.invert(o.range()[0]) + f, x = o.invert(o.range()[1]) - f, [v, M] = this.getSurfacesAreaEdges();
|
|
5606
5625
|
let b;
|
|
5607
5626
|
const S = 5;
|
|
@@ -5609,7 +5628,7 @@ class sf extends Lt {
|
|
|
5609
5628
|
const T = y / S * (u ? -1 : 1), { data: C } = i, k = this.calcPos(C, b, S, T), R = this.calcLineDir(C, b, S, T, l, u ? D.left : D.right);
|
|
5610
5629
|
if (!k || !R)
|
|
5611
5630
|
return;
|
|
5612
|
-
const P = b, I = k.y - Rr -
|
|
5631
|
+
const P = b, I = k.y - Rr - p / 2, N = D.angleRight(R) - (u ? Math.PI : 0);
|
|
5613
5632
|
r && (r.textAlign = u ? "right" : "left", r.translate(o(P), a(I)), r.rotate(N), r.fillStyle = this.colorToCSSColor(i.color), r.textBaseline = "middle", r.fillText(i.label, 0, 0), r.restore());
|
|
5614
5633
|
}, this.render = this.render.bind(this), this.getMarginsInWorldCoordinates = this.getMarginsInWorldCoordinates.bind(this), this.getSurfacesAreaEdges = this.getSurfacesAreaEdges.bind(this), this.updateXFlipped = this.updateXFlipped.bind(this), this.generateSurfacesWithAvgDepth = this.generateSurfacesWithAvgDepth.bind(this);
|
|
5615
5634
|
}
|
|
@@ -5675,9 +5694,9 @@ class sf extends Lt {
|
|
|
5675
5694
|
const l = D.zero.mutable;
|
|
5676
5695
|
let u = 0;
|
|
5677
5696
|
for (let f = 0; f < i; f++) {
|
|
5678
|
-
const d = n + f * r,
|
|
5679
|
-
if (
|
|
5680
|
-
const
|
|
5697
|
+
const d = n + f * r, p = bt(t, d, s, o);
|
|
5698
|
+
if (p) {
|
|
5699
|
+
const g = this.getAlternativeYValueIfAvailable(d, s, o, a, c, h), y = g ? Math.min(p, g) : p;
|
|
5681
5700
|
l.add(d, y), u++;
|
|
5682
5701
|
}
|
|
5683
5702
|
}
|
|
@@ -5702,13 +5721,13 @@ class sf extends Lt {
|
|
|
5702
5721
|
return h;
|
|
5703
5722
|
const u = new D(n, l * s), f = D.zero.mutable;
|
|
5704
5723
|
for (let d = 1; d <= i; d++) {
|
|
5705
|
-
const
|
|
5706
|
-
|
|
5724
|
+
const p = n + d * r, g = bt(t, n, a, c);
|
|
5725
|
+
g !== null && (f.set(p, g * s), f.sub(u), h.add(f));
|
|
5707
5726
|
}
|
|
5708
5727
|
return h;
|
|
5709
5728
|
}
|
|
5710
|
-
calcAreaDir(t, n, i, r, s, o = D.left, a, c, h = 0, l = Math.PI / 4, u = 4, f, d = null,
|
|
5711
|
-
const
|
|
5729
|
+
calcAreaDir(t, n, i, r, s, o = D.left, a, c, h = 0, l = Math.PI / 4, u = 4, f, d = null, p) {
|
|
5730
|
+
const g = [], y = D.zero.mutable;
|
|
5712
5731
|
let m;
|
|
5713
5732
|
for (let T = 0; T <= r; T++) {
|
|
5714
5733
|
const C = i + T * s, k = bt(t, C, a, c), R = bt(n, C, a, c) || c, P = this.getAlternativeYValueIfAvailable(
|
|
@@ -5717,7 +5736,7 @@ class sf extends Lt {
|
|
|
5717
5736
|
c,
|
|
5718
5737
|
f,
|
|
5719
5738
|
d,
|
|
5720
|
-
|
|
5739
|
+
p
|
|
5721
5740
|
), I = P ? Math.min(R, P) : R;
|
|
5722
5741
|
if (T === 0) {
|
|
5723
5742
|
if (k === null)
|
|
@@ -5725,9 +5744,9 @@ class sf extends Lt {
|
|
|
5725
5744
|
const N = (k + I) / 2;
|
|
5726
5745
|
m = new D(i, N);
|
|
5727
5746
|
} else
|
|
5728
|
-
k !== null ? (y.set(C, (k + I) / 2), y.sub(m),
|
|
5747
|
+
k !== null ? (y.set(C, (k + I) / 2), y.sub(m), g.push(D.angleRight(y))) : g.push(D.angleRight(o));
|
|
5729
5748
|
}
|
|
5730
|
-
const x =
|
|
5749
|
+
const x = g[0], v = g.map((T) => T - x);
|
|
5731
5750
|
let M = 0;
|
|
5732
5751
|
return v.reduce((T, C) => {
|
|
5733
5752
|
const k = (Math.abs(C) - h) / l, R = Math.pow(1 - _t(k, 0, 1), u);
|
|
@@ -5745,24 +5764,24 @@ class sf extends Lt {
|
|
|
5745
5764
|
getSurfacesAreaEdges() {
|
|
5746
5765
|
var c, h;
|
|
5747
5766
|
const t = ((c = this.data) == null ? void 0 : c.areas.reduce((l, u) => {
|
|
5748
|
-
var
|
|
5767
|
+
var p, g;
|
|
5749
5768
|
const { data: f } = u, d = f.find((y) => y[1] != null);
|
|
5750
5769
|
d && l.push(d[0]);
|
|
5751
5770
|
for (let y = f.length - 1; y >= 0; y--)
|
|
5752
|
-
if (((
|
|
5753
|
-
l.push((
|
|
5771
|
+
if (((p = f[y]) == null ? void 0 : p[1]) != null) {
|
|
5772
|
+
l.push((g = f[y]) == null ? void 0 : g[0]);
|
|
5754
5773
|
break;
|
|
5755
5774
|
}
|
|
5756
5775
|
return l;
|
|
5757
5776
|
}, [])) ?? [];
|
|
5758
5777
|
t.push(
|
|
5759
5778
|
...((h = this.data) == null ? void 0 : h.lines.reduce((l, u) => {
|
|
5760
|
-
var
|
|
5779
|
+
var p, g;
|
|
5761
5780
|
const { data: f } = u, d = f.find((y) => y[1] != null);
|
|
5762
5781
|
d && l.push(d[0]);
|
|
5763
5782
|
for (let y = f.length - 1; y >= 0; y--)
|
|
5764
|
-
if (((
|
|
5765
|
-
l.push((
|
|
5783
|
+
if (((p = f[y]) == null ? void 0 : p[1]) != null) {
|
|
5784
|
+
l.push((g = f[y]) == null ? void 0 : g[0]);
|
|
5766
5785
|
break;
|
|
5767
5786
|
}
|
|
5768
5787
|
return l;
|
|
@@ -5781,15 +5800,15 @@ class sf extends Lt {
|
|
|
5781
5800
|
u.length === 0 && (u = [t.interpolators.curtain.getPointAt(0)]);
|
|
5782
5801
|
let f = t.interpolators.curtain.getIntersects(l, 1, 0);
|
|
5783
5802
|
f.length === 0 && (f = [t.interpolators.curtain.getPointAt(1)]);
|
|
5784
|
-
const d = Math.max((I = u[0]) == null ? void 0 : I[0], (N = f[0]) == null ? void 0 : N[0]),
|
|
5785
|
-
left: n ? d :
|
|
5786
|
-
right: n ?
|
|
5787
|
-
}, y = this.getMarginsInWorldCoordinates(), m = a + y, x = c - y, [v, M] = this.getSurfacesAreaEdges(), b = n ? Math.min(m, v) : Math.max(m, v), S = n ? Math.max(x, M) : Math.min(x, M), T = Math.max(n ? b -
|
|
5803
|
+
const d = Math.max((I = u[0]) == null ? void 0 : I[0], (N = f[0]) == null ? void 0 : N[0]), p = Math.min((_ = u[0]) == null ? void 0 : _[0], (A = f[0]) == null ? void 0 : A[0]), g = {
|
|
5804
|
+
left: n ? d : p,
|
|
5805
|
+
right: n ? p : d
|
|
5806
|
+
}, y = this.getMarginsInWorldCoordinates(), m = a + y, x = c - y, [v, M] = this.getSurfacesAreaEdges(), b = n ? Math.min(m, v) : Math.max(m, v), S = n ? Math.max(x, M) : Math.min(x, M), T = Math.max(n ? b - g.left : g.left - b, 0), C = Math.max(n ? g.right - S : S - g.right, 0), k = T * s, R = C * s;
|
|
5788
5807
|
return T > C || k > o || k < o && R < o && n || ((w = f[0]) == null ? void 0 : w[1]) < h;
|
|
5789
5808
|
}
|
|
5790
5809
|
}
|
|
5791
|
-
const
|
|
5792
|
-
class
|
|
5810
|
+
const zu = 1e4;
|
|
5811
|
+
class lf extends Ir {
|
|
5793
5812
|
constructor() {
|
|
5794
5813
|
super(...arguments), this.isPreRendered = !1, this.createPolygons = (t) => {
|
|
5795
5814
|
var r, s, o, a, c, h;
|
|
@@ -5801,7 +5820,7 @@ class of extends Ir {
|
|
|
5801
5820
|
const f = l === t.length - 1;
|
|
5802
5821
|
if ((!u || f) && i) {
|
|
5803
5822
|
for (let d = u ? l : l - 1; d >= 0 && ((a = t[d]) != null && a[1]); d--)
|
|
5804
|
-
i.push((c = t[d]) == null ? void 0 : c[0], ((h = t[d]) == null ? void 0 : h[2]) ||
|
|
5823
|
+
i.push((c = t[d]) == null ? void 0 : c[0], ((h = t[d]) == null ? void 0 : h[2]) || zu);
|
|
5805
5824
|
n.push(i), i = void 0;
|
|
5806
5825
|
}
|
|
5807
5826
|
}
|
|
@@ -5831,17 +5850,17 @@ class of extends Ir {
|
|
|
5831
5850
|
t && (t.areas.forEach((n) => this.generateAreaPolygon(n)), t.lines.forEach((n) => this.generateSurfaceLine(n)), this.isPreRendered = !0);
|
|
5832
5851
|
}
|
|
5833
5852
|
}
|
|
5834
|
-
const Hr = "lightgray", Xr = "gray",
|
|
5853
|
+
const Hr = "lightgray", Xr = "gray", Ur = 0.25, Vr = 0.75, Du = {
|
|
5835
5854
|
minorColor: Hr,
|
|
5836
5855
|
majorColor: Xr,
|
|
5837
|
-
minorWidth:
|
|
5838
|
-
majorWidth:
|
|
5856
|
+
minorWidth: Ur,
|
|
5857
|
+
majorWidth: Vr
|
|
5839
5858
|
};
|
|
5840
5859
|
class Je extends Lt {
|
|
5841
5860
|
constructor(t, n) {
|
|
5842
5861
|
super(t, n), this._offsetX = 0, this._offsetY = 0, this.options = {
|
|
5843
5862
|
...this.options,
|
|
5844
|
-
...n ||
|
|
5863
|
+
...n || Du
|
|
5845
5864
|
}, this.render = this.render.bind(this);
|
|
5846
5865
|
}
|
|
5847
5866
|
onUpdate(t) {
|
|
@@ -5856,10 +5875,10 @@ class Je extends Lt {
|
|
|
5856
5875
|
return;
|
|
5857
5876
|
const a = t.xScale.copy(), c = t.yScale.copy(), h = a.domain(), l = c.domain(), u = this.offsetX, f = this.offsetY;
|
|
5858
5877
|
a.domain([h[0] - u, h[1] - u]), c.domain([l[0] - f, l[1] - f]);
|
|
5859
|
-
const [d,
|
|
5860
|
-
n.lineWidth = i ||
|
|
5878
|
+
const [d, p] = a.range(), [g, y] = c.range();
|
|
5879
|
+
n.lineWidth = i || Ur, n.strokeStyle = r || Hr;
|
|
5861
5880
|
const m = this.mapMinorTicks(a.ticks()), x = this.mapMinorTicks(c.ticks());
|
|
5862
|
-
this.renderTicksX(a, m,
|
|
5881
|
+
this.renderTicksX(a, m, g, y), this.renderTicksY(c, x, d, p), n.lineWidth = s || Vr, n.strokeStyle = o || Xr, this.renderTicksX(a, a.ticks(), g, y), this.renderTicksY(c, c.ticks(), d, p), n.restore();
|
|
5863
5882
|
}
|
|
5864
5883
|
renderTicksX(t, n, i, r) {
|
|
5865
5884
|
n.forEach((s) => {
|
|
@@ -5890,7 +5909,7 @@ class Je extends Lt {
|
|
|
5890
5909
|
this._offsetY = t;
|
|
5891
5910
|
}
|
|
5892
5911
|
}
|
|
5893
|
-
class
|
|
5912
|
+
class uf extends Lt {
|
|
5894
5913
|
onMount(t) {
|
|
5895
5914
|
super.onMount(t);
|
|
5896
5915
|
const n = document.createElement("img");
|
|
@@ -5903,15 +5922,15 @@ class af extends Lt {
|
|
|
5903
5922
|
super.onRescale(t), this.setTransform(t), this.render(t);
|
|
5904
5923
|
}
|
|
5905
5924
|
render(t) {
|
|
5906
|
-
var f, d,
|
|
5925
|
+
var f, d, p;
|
|
5907
5926
|
const n = parseInt(((f = this.elm) == null ? void 0 : f.getAttribute("width")) ?? "0", 10), i = parseInt(((d = this.elm) == null ? void 0 : d.getAttribute("height")) ?? "0", 10), { xScale: r, yScale: s, xRatio: o, yRatio: a, x: c, y: h } = t, l = n * (o || 1), u = i * (a || 1);
|
|
5908
5927
|
this.clearCanvas(), this.img != null && (this.isLoading ? this.img.onload = () => {
|
|
5909
|
-
var
|
|
5910
|
-
this.isLoading = !1, this.img != null && ((
|
|
5911
|
-
} : (
|
|
5928
|
+
var g;
|
|
5929
|
+
this.isLoading = !1, this.img != null && ((g = this.ctx) == null || g.drawImage(this.img, r(c || 0), s(h || 0), l, u));
|
|
5930
|
+
} : (p = this.ctx) == null || p.drawImage(this.img, r(c || 0), s(h || 0), l, u));
|
|
5912
5931
|
}
|
|
5913
5932
|
}
|
|
5914
|
-
const
|
|
5933
|
+
const Ou = {
|
|
5915
5934
|
dash: [10, 5],
|
|
5916
5935
|
// eslint-disable-line no-magic-numbers
|
|
5917
5936
|
width: 1,
|
|
@@ -5920,7 +5939,7 @@ const Ru = {
|
|
|
5920
5939
|
scale: 1,
|
|
5921
5940
|
useTexture: !1,
|
|
5922
5941
|
alignment: 0.5
|
|
5923
|
-
},
|
|
5942
|
+
}, Wr = class mt {
|
|
5924
5943
|
/**
|
|
5925
5944
|
* Create a DashLine
|
|
5926
5945
|
* @param graphics
|
|
@@ -5935,7 +5954,7 @@ const Ru = {
|
|
|
5935
5954
|
* @param [options.alignment] - The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner)
|
|
5936
5955
|
*/
|
|
5937
5956
|
constructor(t, n = {}) {
|
|
5938
|
-
this.cursor = new ot.Point(), this.scale = 1, this.graphics = t, n = { ...
|
|
5957
|
+
this.cursor = new ot.Point(), this.scale = 1, this.graphics = t, n = { ...Ou, ...n }, this.dash = n.dash, this.dashSize = this.dash.reduce((i, r) => i + r), this.useTexture = n.useTexture, this.options = n, this.setLineStyle();
|
|
5939
5958
|
}
|
|
5940
5959
|
/** resets line style to enable dashed line (useful if lineStyle was changed on graphics element) */
|
|
5941
5960
|
setLineStyle() {
|
|
@@ -5979,18 +5998,18 @@ const Ru = {
|
|
|
5979
5998
|
const a = Math.cos(s), c = Math.sin(s);
|
|
5980
5999
|
let h = this.cursor.x, l = this.cursor.y;
|
|
5981
6000
|
const u = this.lineLength % (this.dashSize * this.scale);
|
|
5982
|
-
let f = 0, d = 0,
|
|
6001
|
+
let f = 0, d = 0, p = 0;
|
|
5983
6002
|
for (let y = 0; y < this.dash.length; y++) {
|
|
5984
6003
|
const m = this.dash[y] * this.scale;
|
|
5985
|
-
if (u <
|
|
5986
|
-
f = y, d = u -
|
|
6004
|
+
if (u < p + m) {
|
|
6005
|
+
f = y, d = u - p;
|
|
5987
6006
|
break;
|
|
5988
6007
|
} else
|
|
5989
|
-
|
|
6008
|
+
p += m;
|
|
5990
6009
|
}
|
|
5991
|
-
let
|
|
5992
|
-
for (;
|
|
5993
|
-
const y = this.dash[f] * this.scale - d, m =
|
|
6010
|
+
let g = r;
|
|
6011
|
+
for (; g > 0; ) {
|
|
6012
|
+
const y = this.dash[f] * this.scale - d, m = g > y ? y : g;
|
|
5994
6013
|
if (o && mt.distance(h + a * m, l + c * m, this.start.x, this.start.y) <= m) {
|
|
5995
6014
|
if (f % 2 === 0) {
|
|
5996
6015
|
const v = mt.distance(h, l, this.start.x, this.start.y) - this.dash[this.dash.length - 1] * this.scale;
|
|
@@ -5998,7 +6017,7 @@ const Ru = {
|
|
|
5998
6017
|
}
|
|
5999
6018
|
break;
|
|
6000
6019
|
}
|
|
6001
|
-
h += a * m, l += c * m, f % 2 ? this.graphics.moveTo(h, l) : this.graphics.lineTo(h, l),
|
|
6020
|
+
h += a * m, l += c * m, f % 2 ? this.graphics.moveTo(h, l) : this.graphics.lineTo(h, l), g -= m, f++, f = f === this.dash.length ? 0 : f, d = 0;
|
|
6002
6021
|
}
|
|
6003
6022
|
}
|
|
6004
6023
|
return this.lineLength += r, this.cursor.set(t, n), this;
|
|
@@ -6093,9 +6112,9 @@ const Ru = {
|
|
|
6093
6112
|
return c.baseTexture.scaleMode = ot.SCALE_MODES.NEAREST, c;
|
|
6094
6113
|
}
|
|
6095
6114
|
};
|
|
6096
|
-
|
|
6097
|
-
let
|
|
6098
|
-
const bn = (e) => new D(e.x, e.y),
|
|
6115
|
+
Wr.dashTextureCache = {};
|
|
6116
|
+
let Nu = Wr;
|
|
6117
|
+
const bn = (e) => new D(e.x, e.y), $u = (e) => new qi(e[0], e[1]), Yr = (e) => {
|
|
6099
6118
|
if (e.length < 2)
|
|
6100
6119
|
return [new D(0)];
|
|
6101
6120
|
let t;
|
|
@@ -6109,7 +6128,7 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6109
6128
|
});
|
|
6110
6129
|
}, Gr = (e, t, n) => {
|
|
6111
6130
|
const i = bn(e);
|
|
6112
|
-
return
|
|
6131
|
+
return $u(i.add(t.scale(n)));
|
|
6113
6132
|
}, Tn = (e, t, n) => {
|
|
6114
6133
|
if (e.length !== t.length)
|
|
6115
6134
|
throw new Error("Number of vectors does not match number of points");
|
|
@@ -6119,7 +6138,7 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6119
6138
|
return Gr(i, s, n);
|
|
6120
6139
|
throw new Error(`Trying to read index ${r} of point ${i}, but no such vector was found!`);
|
|
6121
6140
|
});
|
|
6122
|
-
}, Ni = (e, t, n, i) => e <= i && n <= t,
|
|
6141
|
+
}, Ni = (e, t, n, i) => e <= i && n <= t, Bu = (e, t, n, i) => e < i && n < t, Hu = (e) => Array.from(new Set(e)), Ne = (e, t, n, i) => {
|
|
6123
6142
|
const r = i.filter((o) => Ni(e, t, o.start, o.end)), s = n.filter((o) => Ni(e, t, o.start, o.end));
|
|
6124
6143
|
return {
|
|
6125
6144
|
overlappingHoles: r,
|
|
@@ -6129,16 +6148,16 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6129
6148
|
const s = n.flatMap(
|
|
6130
6149
|
(a) => [a.start - 1e-4, a.start, a.end, a.end + 1e-4]
|
|
6131
6150
|
).filter((a) => a >= e && a <= t);
|
|
6132
|
-
return s.push(e), s.push(t),
|
|
6151
|
+
return s.push(e), s.push(t), Hu(s).sort((a, c) => a - c);
|
|
6133
6152
|
}, j = (e) => e.kind === "casing" ? e.innerDiameter : e.diameter, qr = (e, t, n, i) => {
|
|
6134
6153
|
const s = e.find(
|
|
6135
6154
|
(h) => h.start <= i && h.end >= i
|
|
6136
6155
|
), o = s ? s.diameter : 0, a = t.filter((h) => j(h) > o).sort((h, l) => j(h) - j(l)).find((h) => h.start <= i && h.end >= i), c = n.find((h) => h.start <= i && h.end >= i && h.diameter > o);
|
|
6137
6156
|
return a ? j(a) : c ? c.diameter : 100;
|
|
6138
|
-
},
|
|
6157
|
+
}, Xu = (e, t, n, i) => {
|
|
6139
6158
|
const s = e.sort((a, c) => c.diameter - a.diameter).find((a) => a.start <= n && a.end >= n), o = t.find((a) => a.start <= n && a.end >= n);
|
|
6140
6159
|
return s && i !== "Open hole frac pack" && i !== "Open hole gravel pack" ? j(s) : o ? o.diameter : 100;
|
|
6141
|
-
},
|
|
6160
|
+
}, Uu = (e, t, n, i) => {
|
|
6142
6161
|
const s = e.sort((h, l) => j(h) - j(l)).find((h) => h.start <= i && h.end >= i);
|
|
6143
6162
|
if (s)
|
|
6144
6163
|
return j(s);
|
|
@@ -6149,69 +6168,69 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6149
6168
|
return j(a);
|
|
6150
6169
|
const c = n.find((h) => h.start <= i && h.end >= i && h.diameter);
|
|
6151
6170
|
return c ? c.diameter : 100;
|
|
6152
|
-
},
|
|
6153
|
-
const { attachedStrings: o, nonAttachedStrings: a } =
|
|
6171
|
+
}, Vu = (e, t, n, i, r, s) => {
|
|
6172
|
+
const { attachedStrings: o, nonAttachedStrings: a } = Wn(e.referenceIds, t, n);
|
|
6154
6173
|
if (o.length === 0)
|
|
6155
6174
|
throw new Error(`Invalid cement data, can't find referenced casing/completion string for cement with id '${e.id}'`);
|
|
6156
|
-
o.sort((
|
|
6157
|
-
const c = o[o.length - 1].end, { overlappingOuterStrings: h, overlappingHoles: l } = Ne(e.toc, c, a, i), u = [...h, ...l].map((
|
|
6158
|
-
start:
|
|
6159
|
-
end:
|
|
6175
|
+
o.sort((g, y) => g.end - y.end);
|
|
6176
|
+
const c = o[o.length - 1].end, { overlappingOuterStrings: h, overlappingHoles: l } = Ne(e.toc, c, a, i), u = [...h, ...l].map((g) => ({
|
|
6177
|
+
start: g.start,
|
|
6178
|
+
end: g.end
|
|
6160
6179
|
}));
|
|
6161
|
-
return $e([e.toc, c], u).flatMap((
|
|
6180
|
+
return $e([e.toc, c], u).flatMap((g, y, m) => {
|
|
6162
6181
|
if (y === m.length - 1)
|
|
6163
6182
|
return [];
|
|
6164
|
-
const x = m[y + 1], v = qr(o, h, l,
|
|
6165
|
-
return [{ top:
|
|
6166
|
-
}).map((
|
|
6167
|
-
diameter:
|
|
6168
|
-
points: s(
|
|
6183
|
+
const x = m[y + 1], v = qr(o, h, l, g);
|
|
6184
|
+
return [{ top: g, bottom: x, diameter: v * r }];
|
|
6185
|
+
}).map((g) => ({
|
|
6186
|
+
diameter: g.diameter,
|
|
6187
|
+
points: s(g.top, g.bottom)
|
|
6169
6188
|
}));
|
|
6170
|
-
},
|
|
6189
|
+
}, Wn = (e, t, n) => [...t, ...n].reduce(
|
|
6171
6190
|
(i, r) => e.includes(r.id) ? { ...i, attachedStrings: [...i.attachedStrings, r] } : { ...i, nonAttachedStrings: [...i.nonAttachedStrings, r] },
|
|
6172
6191
|
{ attachedStrings: [], nonAttachedStrings: [] }
|
|
6173
|
-
),
|
|
6174
|
-
const { attachedStrings: o, nonAttachedStrings: a } =
|
|
6192
|
+
), Wu = (e, t, n, i, r, s) => {
|
|
6193
|
+
const { attachedStrings: o, nonAttachedStrings: a } = Wn(e.referenceIds, t, n);
|
|
6175
6194
|
if (o.length === 0)
|
|
6176
6195
|
throw new Error(`Invalid cement squeeze data, can't find referenced casing/completion for squeeze with id '${e.id}'`);
|
|
6177
|
-
const { overlappingOuterStrings: c, overlappingHoles: h } = Ne(e.start, e.end, a, i), l = [...c, ...h].map((
|
|
6178
|
-
start:
|
|
6179
|
-
end:
|
|
6196
|
+
const { overlappingOuterStrings: c, overlappingHoles: h } = Ne(e.start, e.end, a, i), l = [...c, ...h].map((p) => ({
|
|
6197
|
+
start: p.start,
|
|
6198
|
+
end: p.end
|
|
6180
6199
|
}));
|
|
6181
|
-
return $e([e.start, e.end], l).flatMap((
|
|
6182
|
-
if (
|
|
6200
|
+
return $e([e.start, e.end], l).flatMap((p, g, y) => {
|
|
6201
|
+
if (g === y.length - 1)
|
|
6183
6202
|
return [];
|
|
6184
|
-
const m = y[
|
|
6185
|
-
return [{ top:
|
|
6186
|
-
}).map((
|
|
6187
|
-
diameter:
|
|
6188
|
-
points: s(
|
|
6203
|
+
const m = y[g + 1], x = qr(o, c, h, p);
|
|
6204
|
+
return [{ top: p, bottom: m, diameter: x * r }];
|
|
6205
|
+
}).map((p) => ({
|
|
6206
|
+
diameter: p.diameter,
|
|
6207
|
+
points: s(p.top, p.bottom)
|
|
6189
6208
|
}));
|
|
6190
|
-
},
|
|
6191
|
-
const { attachedStrings: o, nonAttachedStrings: a } =
|
|
6192
|
-
start:
|
|
6193
|
-
end:
|
|
6209
|
+
}, Yu = (e, t, n, i, r, s) => {
|
|
6210
|
+
const { attachedStrings: o, nonAttachedStrings: a } = Wn(e.referenceIds, t, n), { overlappingHoles: c, overlappingOuterStrings: h } = Ne(e.start, e.end, a, i), l = [...o, ...c, ...h].map((p) => ({
|
|
6211
|
+
start: p.start,
|
|
6212
|
+
end: p.end
|
|
6194
6213
|
}));
|
|
6195
|
-
return $e([e.start, e.end], l).flatMap((
|
|
6196
|
-
if (
|
|
6214
|
+
return $e([e.start, e.end], l).flatMap((p, g, y) => {
|
|
6215
|
+
if (g === y.length - 1)
|
|
6197
6216
|
return [];
|
|
6198
|
-
const m = y[
|
|
6199
|
-
return [{ top:
|
|
6200
|
-
}).map((
|
|
6201
|
-
diameter:
|
|
6202
|
-
points: s(
|
|
6217
|
+
const m = y[g + 1], x = Uu(o, h, c, p);
|
|
6218
|
+
return [{ top: p, bottom: m, diameter: x * r }];
|
|
6219
|
+
}).map((p) => ({
|
|
6220
|
+
diameter: p.diameter,
|
|
6221
|
+
points: s(p.top, p.bottom)
|
|
6203
6222
|
}));
|
|
6204
|
-
},
|
|
6223
|
+
}, Gu = (e, t, n, i, r) => {
|
|
6205
6224
|
const o = t.createLinearGradient(0, 0, 0, e.height);
|
|
6206
6225
|
return o.addColorStop(0, n), o.addColorStop(0.5 - r, i), o.addColorStop(0.5 + r, i), o.addColorStop(1, n), o;
|
|
6207
|
-
},
|
|
6226
|
+
}, qu = ({ firstColor: e, secondColor: t }, n, i) => {
|
|
6208
6227
|
const r = document.createElement("canvas");
|
|
6209
6228
|
r.width = n, r.height = i;
|
|
6210
6229
|
const s = r.getContext("2d");
|
|
6211
6230
|
if (s == null)
|
|
6212
6231
|
throw Error("Could not get canvas context!");
|
|
6213
|
-
return s.fillStyle =
|
|
6214
|
-
},
|
|
6232
|
+
return s.fillStyle = Gu(r, s, e, t, 0), s.fillRect(0, 0, r.width, r.height), V.from(r);
|
|
6233
|
+
}, ju = ({ scalingFactor: e }) => {
|
|
6215
6234
|
const t = document.createElement("canvas"), n = xt * e;
|
|
6216
6235
|
t.width = n, t.height = n;
|
|
6217
6236
|
const i = t.getContext("2d");
|
|
@@ -6223,16 +6242,16 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6223
6242
|
const s = n / 3;
|
|
6224
6243
|
for (let o = -t.width; o < t.width; o++)
|
|
6225
6244
|
i.moveTo(-t.width + s * o, -t.height), i.lineTo(t.width + s * o, t.height * 2);
|
|
6226
|
-
return i.stroke(),
|
|
6227
|
-
},
|
|
6245
|
+
return i.stroke(), V.from(t);
|
|
6246
|
+
}, Zu = ({ innerColor: e, outerColor: t, scalingFactor: n }) => {
|
|
6228
6247
|
const i = xt * n, r = document.createElement("canvas");
|
|
6229
6248
|
r.width = i, r.height = i;
|
|
6230
6249
|
const s = r.getContext("2d");
|
|
6231
6250
|
if (s == null)
|
|
6232
6251
|
throw Error("Could not get canvas context!");
|
|
6233
6252
|
const o = s.createLinearGradient(0, 0, 0, i), a = 0.3, c = 0.7;
|
|
6234
|
-
return o.addColorStop(0, t), o.addColorStop(a, e), o.addColorStop(c, e), o.addColorStop(1, t), s.fillStyle = o, s.fillRect(0, 0, r.width, r.height),
|
|
6235
|
-
},
|
|
6253
|
+
return o.addColorStop(0, t), o.addColorStop(a, e), o.addColorStop(c, e), o.addColorStop(1, t), s.fillStyle = o, s.fillRect(0, 0, r.width, r.height), V.from(r);
|
|
6254
|
+
}, Ku = ({ firstColor: e, secondColor: t, scalingFactor: n }) => {
|
|
6236
6255
|
const i = document.createElement("canvas"), r = xt * n, s = n;
|
|
6237
6256
|
i.width = r, i.height = r;
|
|
6238
6257
|
const o = i.getContext("2d");
|
|
@@ -6242,8 +6261,8 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6242
6261
|
const a = r / 12;
|
|
6243
6262
|
for (let c = -i.width; c < i.width; c++)
|
|
6244
6263
|
o.moveTo(-i.width + a * c, -i.height), o.lineTo(i.width + a * c, i.height);
|
|
6245
|
-
return o.stroke(),
|
|
6246
|
-
},
|
|
6264
|
+
return o.stroke(), V.from(i);
|
|
6265
|
+
}, Qu = ({ firstColor: e, secondColor: t, scalingFactor: n }) => {
|
|
6247
6266
|
const i = document.createElement("canvas"), r = xt * n;
|
|
6248
6267
|
i.width = r, i.height = r;
|
|
6249
6268
|
const s = i.getContext("2d");
|
|
@@ -6253,8 +6272,8 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6253
6272
|
const o = r / 12;
|
|
6254
6273
|
for (let a = -i.width; a < i.width; a++)
|
|
6255
6274
|
s.moveTo(-i.width + o * a, -i.height), s.lineTo(i.width + o * a, i.height * 2);
|
|
6256
|
-
return s.stroke(),
|
|
6257
|
-
},
|
|
6275
|
+
return s.stroke(), V.from(i);
|
|
6276
|
+
}, Ju = ({ firstColor: e, secondColor: t, scalingFactor: n }) => {
|
|
6258
6277
|
const i = document.createElement("canvas"), r = xt * n, s = n;
|
|
6259
6278
|
i.width = r, i.height = r;
|
|
6260
6279
|
const o = i.getContext("2d");
|
|
@@ -6264,25 +6283,25 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6264
6283
|
const a = r / 12;
|
|
6265
6284
|
for (let c = -i.width; c < i.width; c++)
|
|
6266
6285
|
o.moveTo(-i.width + a * c, -i.height), o.lineTo(i.width + a * c, i.height * 2);
|
|
6267
|
-
return o.stroke(),
|
|
6286
|
+
return o.stroke(), V.from(i);
|
|
6268
6287
|
}, ge = (e, t) => {
|
|
6269
|
-
const n =
|
|
6288
|
+
const n = Yr(t), i = Tn(t, n, e);
|
|
6270
6289
|
return { leftPath: Tn(t, n, -e), rightPath: i };
|
|
6271
|
-
}, tn = (e, t) => ({ kind: "casing", start: e, end: t }),
|
|
6272
|
-
const t = (e.windows || []).filter((n) =>
|
|
6290
|
+
}, tn = (e, t) => ({ kind: "casing", start: e, end: t }), t0 = (e, t) => ({ kind: "casing-window", start: e, end: t }), e0 = (e) => {
|
|
6291
|
+
const t = (e.windows || []).filter((n) => Bu(e.start, e.end, n.start, n.end)).reduce(
|
|
6273
6292
|
({ intervals: n, lastBottom: i }, r, s, o) => {
|
|
6274
6293
|
const a = (
|
|
6275
6294
|
// last bottom before current start?
|
|
6276
6295
|
i < r.start ? tn(i, r.start) : null
|
|
6277
|
-
), c = a ? a.end : i, h = Math.max(c, r.start), l = Math.min(e.end, r.end), u =
|
|
6278
|
-
f < e.end ? tn(f, e.end) : null,
|
|
6279
|
-
return { intervals: [...n, ...
|
|
6296
|
+
), c = a ? a.end : i, h = Math.max(c, r.start), l = Math.min(e.end, r.end), u = t0(h, l), f = l, p = s === o.length - 1 && // still room for a casing interval?
|
|
6297
|
+
f < e.end ? tn(f, e.end) : null, g = [a, u, p].filter((y) => y != null);
|
|
6298
|
+
return { intervals: [...n, ...g], lastBottom: f };
|
|
6280
6299
|
},
|
|
6281
6300
|
{ intervals: [], lastBottom: e.start }
|
|
6282
6301
|
);
|
|
6283
6302
|
return t.intervals.length ? t.intervals : [tn(e.start, e.end)];
|
|
6284
|
-
},
|
|
6285
|
-
const i = t.diameter * e, r = i / 2, o = t.innerDiameter * e / 2, a = r - o, c =
|
|
6303
|
+
}, n0 = (e, t, n) => {
|
|
6304
|
+
const i = t.diameter * e, r = i / 2, o = t.innerDiameter * e / 2, a = r - o, c = e0(t).map((h) => {
|
|
6286
6305
|
const l = n(h.start, h.end), { leftPath: u, rightPath: f } = ge(r, l);
|
|
6287
6306
|
return { kind: h.kind, leftPath: u, rightPath: f, pathPoints: l };
|
|
6288
6307
|
});
|
|
@@ -6296,7 +6315,7 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6296
6315
|
hasShoe: t.hasShoe,
|
|
6297
6316
|
bottom: t.end
|
|
6298
6317
|
};
|
|
6299
|
-
},
|
|
6318
|
+
}, i0 = (e, t, n, i, r) => {
|
|
6300
6319
|
const { overlappingOuterStrings: s, overlappingHoles: o } = Ne(e.start, e.end, t, n), a = [...s, ...o].map((u) => ({
|
|
6301
6320
|
start: u.start,
|
|
6302
6321
|
end: u.end
|
|
@@ -6304,8 +6323,8 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6304
6323
|
return $e([e.start, e.end], a).flatMap((u, f, d) => {
|
|
6305
6324
|
if (f === d.length - 1)
|
|
6306
6325
|
return [];
|
|
6307
|
-
const
|
|
6308
|
-
return [{ top: u, bottom:
|
|
6326
|
+
const p = d[f + 1], g = Xu(s, o, u, e.subKind);
|
|
6327
|
+
return [{ top: u, bottom: p, diameter: g * i }];
|
|
6309
6328
|
}).map((u) => {
|
|
6310
6329
|
const f = r(u.top, u.bottom);
|
|
6311
6330
|
return {
|
|
@@ -6318,25 +6337,25 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6318
6337
|
t.fillStyle = r, t.strokeStyle = r;
|
|
6319
6338
|
const s = [0, 0], o = [e.width, e.height];
|
|
6320
6339
|
t.save(), t.globalAlpha = i, t.fillRect(...s, ...o), t.restore();
|
|
6321
|
-
},
|
|
6340
|
+
}, Yn = (e, t, n, i, r) => {
|
|
6322
6341
|
const { fracLineCurve: s } = i, o = 10, a = e.width / o, c = n / 3 * i.scalingFactor, h = c / 4, l = c / 2, u = 0, f = r === "diameter" ? 0 : l;
|
|
6323
6342
|
t.globalAlpha = i.packingOpacity;
|
|
6324
6343
|
const d = () => {
|
|
6325
|
-
for (let
|
|
6326
|
-
const
|
|
6344
|
+
for (let p = -1; p < o; p++) {
|
|
6345
|
+
const g = [p * a + u + a / 2, e.height / 2 - h - f - h];
|
|
6327
6346
|
t.beginPath();
|
|
6328
|
-
const y = [...
|
|
6347
|
+
const y = [...g], m = [g[0] - s * 2, g[1] - h / 4], x = [g[0], g[1] - h / 2], v = [g[0] + s * 2, g[1] - h / 2 - h / 4], M = [g[0], g[1] - h];
|
|
6329
6348
|
t.bezierCurveTo(...y, ...m, ...x), t.bezierCurveTo(...x, ...v, ...M), t.stroke();
|
|
6330
6349
|
}
|
|
6331
|
-
for (let
|
|
6332
|
-
const
|
|
6350
|
+
for (let p = -1; p < o; p++) {
|
|
6351
|
+
const g = [p * a + a + u + a / 2, e.height / 2 + c / 2 + f];
|
|
6333
6352
|
t.beginPath();
|
|
6334
|
-
const y = [...
|
|
6353
|
+
const y = [...g], m = [g[0] - s * 2, g[1] + h / 4], x = [g[0], g[1] + h / 2], v = [g[0] + s * 2, g[1] + h / 2 + h / 4], M = [g[0], g[1] + h];
|
|
6335
6354
|
t.bezierCurveTo(...y, ...m, ...x), t.bezierCurveTo(...x, ...v, ...M), t.stroke();
|
|
6336
6355
|
}
|
|
6337
6356
|
};
|
|
6338
6357
|
t.strokeStyle = i.yellow, t.lineWidth = 6, t.save(), d(), t.restore(), t.lineWidth = 1, t.strokeStyle = i.outline, d(), t.closePath();
|
|
6339
|
-
},
|
|
6358
|
+
}, r0 = (e, t, n, i) => {
|
|
6340
6359
|
const s = e.width / 4;
|
|
6341
6360
|
t.strokeStyle = i.outline;
|
|
6342
6361
|
const o = n / 3 * i.scalingFactor;
|
|
@@ -6358,8 +6377,8 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6358
6377
|
const r = (t == null ? void 0 : t.canvasCtx) || n.getContext("2d"), s = [0, 0], o = [n.width, n.height];
|
|
6359
6378
|
if (r == null)
|
|
6360
6379
|
throw Error("Could not get canvas context!");
|
|
6361
|
-
return r.fillStyle = "#ff00ff", r.fillRect(...s, ...o), new
|
|
6362
|
-
|
|
6380
|
+
return r.fillStyle = "#ff00ff", r.fillRect(...s, ...o), new V(
|
|
6381
|
+
V.from(n, { wrapMode: ke.CLAMP }).baseTexture,
|
|
6363
6382
|
void 0,
|
|
6364
6383
|
new qt(0, 0, n.width, n.height),
|
|
6365
6384
|
void 0,
|
|
@@ -6372,24 +6391,24 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6372
6391
|
if (s == null)
|
|
6373
6392
|
throw Error("Could not get canvas context!");
|
|
6374
6393
|
return { canvas: n, ctx: s };
|
|
6375
|
-
}, wt = (e) => new
|
|
6376
|
-
|
|
6394
|
+
}, wt = (e) => new V(
|
|
6395
|
+
V.from(e, { wrapMode: ke.CLAMP }).baseTexture,
|
|
6377
6396
|
void 0,
|
|
6378
6397
|
new qt(0, 0, e.width, e.height),
|
|
6379
6398
|
void 0,
|
|
6380
6399
|
Pn.MIRROR_HORIZONTAL
|
|
6381
|
-
),
|
|
6400
|
+
), s0 = (e, t) => (n) => t.some((i) => n(i) && kl(e, i)), Gn = {
|
|
6382
6401
|
packing: () => ct(),
|
|
6383
6402
|
fracLines: () => ct(),
|
|
6384
6403
|
spikes: (e, t, n, i) => {
|
|
6385
|
-
const { canvas: r, ctx: s } = vt(t, i), o =
|
|
6386
|
-
return s.globalAlpha = i.packingOpacity, e.isOpen ? (s.fillStyle = u, s.strokeStyle = u) : (s.fillStyle = i.grey, s.strokeStyle = i.grey),
|
|
6404
|
+
const { canvas: r, ctx: s } = vt(t, i), o = s0(e, n), a = o(Pl), c = o(Ll), h = o(Cl), u = a || c || h ? i.yellow : i.red;
|
|
6405
|
+
return s.globalAlpha = i.packingOpacity, e.isOpen ? (s.fillStyle = u, s.strokeStyle = u) : (s.fillStyle = i.grey, s.strokeStyle = i.grey), r0(r, s, t.diameter, i), h && Yn(r, s, t.diameter, i, "spike"), wt(r);
|
|
6387
6406
|
}
|
|
6388
6407
|
}, jr = {
|
|
6389
6408
|
packing: () => ct(),
|
|
6390
6409
|
fracLines: (e, t) => {
|
|
6391
6410
|
const { canvas: n, ctx: i } = vt(e, t);
|
|
6392
|
-
return
|
|
6411
|
+
return Yn(n, i, e.diameter, t, "diameter"), wt(n);
|
|
6393
6412
|
},
|
|
6394
6413
|
spikes: () => ct()
|
|
6395
6414
|
}, Ce = {
|
|
@@ -6423,10 +6442,10 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6423
6442
|
},
|
|
6424
6443
|
fracLines: (e, t) => {
|
|
6425
6444
|
const { canvas: n, ctx: i } = vt(e, t);
|
|
6426
|
-
return
|
|
6445
|
+
return Yn(n, i, e.diameter, t, "diameter"), wt(n);
|
|
6427
6446
|
},
|
|
6428
6447
|
spikes: () => ct()
|
|
6429
|
-
},
|
|
6448
|
+
}, o0 = (e, t, n) => J(
|
|
6430
6449
|
{
|
|
6431
6450
|
Perforation: () => Gn.packing(),
|
|
6432
6451
|
CasedHoleFracturation: () => Ce.packing(t, n),
|
|
@@ -6436,7 +6455,7 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6436
6455
|
CasedHoleGravelPack: () => qn.packing(t, n)
|
|
6437
6456
|
},
|
|
6438
6457
|
e.subKind
|
|
6439
|
-
),
|
|
6458
|
+
), a0 = (e, t, n) => J(
|
|
6440
6459
|
{
|
|
6441
6460
|
Perforation: () => Gn.fracLines(),
|
|
6442
6461
|
OpenHoleGravelPack: () => jn.fracLines(),
|
|
@@ -6446,7 +6465,7 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6446
6465
|
CasedHoleFracPack: () => Ce.fracLines(t, n)
|
|
6447
6466
|
},
|
|
6448
6467
|
e.subKind
|
|
6449
|
-
),
|
|
6468
|
+
), c0 = (e, t, n, i) => J(
|
|
6450
6469
|
{
|
|
6451
6470
|
Perforation: () => Gn.spikes(e, n, t, i),
|
|
6452
6471
|
OpenHoleGravelPack: () => jn.spikes(),
|
|
@@ -6457,12 +6476,12 @@ const bn = (e) => new D(e.x, e.y), zu = (e) => new qi(e[0], e[1]), Wr = (e) => {
|
|
|
6457
6476
|
},
|
|
6458
6477
|
e.subKind
|
|
6459
6478
|
);
|
|
6460
|
-
class
|
|
6479
|
+
class h0 extends Cn {
|
|
6461
6480
|
/**
|
|
6462
6481
|
* @param segments - An array of segments with points and diameter to construct this rope.
|
|
6463
6482
|
*/
|
|
6464
6483
|
constructor(t) {
|
|
6465
|
-
const n =
|
|
6484
|
+
const n = Ve(t, (i) => i.points.length);
|
|
6466
6485
|
super(new Float32Array(n * 4), new Float32Array(n * 4), new Uint16Array((n - 1) * 6)), this.segments = t, this.build();
|
|
6467
6486
|
}
|
|
6468
6487
|
/**
|
|
@@ -6474,11 +6493,11 @@ class s0 extends Cn {
|
|
|
6474
6493
|
}
|
|
6475
6494
|
/** Refreshes Rope indices and uvs */
|
|
6476
6495
|
build() {
|
|
6477
|
-
var
|
|
6496
|
+
var p, g, y, m, x, v, M, b;
|
|
6478
6497
|
const t = this.segments;
|
|
6479
6498
|
if (!t)
|
|
6480
6499
|
return;
|
|
6481
|
-
const n = this.getBuffer("aVertexPosition"), i = this.getBuffer("aTextureCoord"), r = this.getIndex(), s =
|
|
6500
|
+
const n = this.getBuffer("aVertexPosition"), i = this.getBuffer("aTextureCoord"), r = this.getIndex(), s = Ve(t, (S) => S.points.length);
|
|
6482
6501
|
if (s < 1)
|
|
6483
6502
|
return;
|
|
6484
6503
|
n.data.length / 4 !== s && (n.data = new Float32Array(s * 4), i.data = new Float32Array(s * 4), r.data = new Uint16Array((s - 1) * 6));
|
|
@@ -6487,8 +6506,8 @@ class s0 extends Cn {
|
|
|
6487
6506
|
const c = t.length, h = sn(t, (S) => S.diameter);
|
|
6488
6507
|
let l = 0, u = 0, f = 0, d = 0;
|
|
6489
6508
|
for (let S = 0; S < c; S++) {
|
|
6490
|
-
let T = (
|
|
6491
|
-
const C = h, k = ((
|
|
6509
|
+
let T = (p = t[S]) == null ? void 0 : p.points[0];
|
|
6510
|
+
const C = h, k = ((g = t[S]) == null ? void 0 : g.diameter) / h / 2, R = (y = t[S]) == null ? void 0 : y.points.length;
|
|
6492
6511
|
for (let P = 0; P < R; P++) {
|
|
6493
6512
|
const I = T.x - ((x = (m = t[S]) == null ? void 0 : m.points[P]) == null ? void 0 : x.x), N = T.y - ((M = (v = t[S]) == null ? void 0 : v.points[P]) == null ? void 0 : M.y), _ = Math.sqrt(I * I + N * N);
|
|
6494
6513
|
T = (b = t[S]) == null ? void 0 : b.points[P], l += _ / C, o[u] = l, o[u + 1] = 0.5 - k, o[u + 2] = l, o[u + 3] = 0.5 + k, u += 4;
|
|
@@ -6503,19 +6522,19 @@ class s0 extends Cn {
|
|
|
6503
6522
|
updateVertices() {
|
|
6504
6523
|
var s, o, a, c, h, l, u, f;
|
|
6505
6524
|
const t = this.segments;
|
|
6506
|
-
if (
|
|
6525
|
+
if (Ve(t, (d) => d.points.length) < 1)
|
|
6507
6526
|
return;
|
|
6508
6527
|
const i = t.length;
|
|
6509
6528
|
let r = 0;
|
|
6510
6529
|
for (let d = 0; d < i; d++) {
|
|
6511
|
-
let
|
|
6530
|
+
let p = (s = t[d]) == null ? void 0 : s.points[0], g, y = 0, m = 0;
|
|
6512
6531
|
const x = (o = this.buffers[0]) == null ? void 0 : o.data, v = (a = t[d]) == null ? void 0 : a.points.length;
|
|
6513
6532
|
let M = 0;
|
|
6514
6533
|
for (let b = 0; b < v; b++) {
|
|
6515
6534
|
const S = (c = t[d]) == null ? void 0 : c.points[b];
|
|
6516
|
-
M = r + b * 4, b < ((h = t[d]) == null ? void 0 : h.points.length) - 1 ?
|
|
6535
|
+
M = r + b * 4, b < ((h = t[d]) == null ? void 0 : h.points.length) - 1 ? g = (l = t[d]) == null ? void 0 : l.points[b + 1] : g = S, m = -(g.x - p.x), y = g.y - p.y;
|
|
6517
6536
|
const T = Math.sqrt(y * y + m * m), C = ((u = t[d]) == null ? void 0 : u.diameter) / 2;
|
|
6518
|
-
y /= T, m /= T, y *= C, m *= C, x != null && (x[M] = S.x + y, x[M + 1] = S.y + m, x[M + 2] = S.x - y, x[M + 3] = S.y - m),
|
|
6537
|
+
y /= T, m /= T, y *= C, m *= C, x != null && (x[M] = S.x + y, x[M + 1] = S.y + m, x[M + 2] = S.x - y, x[M + 3] = S.y - m), p = S;
|
|
6519
6538
|
}
|
|
6520
6539
|
r = M + 4;
|
|
6521
6540
|
}
|
|
@@ -6525,13 +6544,13 @@ class s0 extends Cn {
|
|
|
6525
6544
|
this.build();
|
|
6526
6545
|
}
|
|
6527
6546
|
}
|
|
6528
|
-
class
|
|
6547
|
+
class l0 extends Ln {
|
|
6529
6548
|
/**
|
|
6530
6549
|
* @param texture - The texture to use on the rope.
|
|
6531
6550
|
* @param segments - An array of segments with points and diaeter to construct this rope.
|
|
6532
6551
|
*/
|
|
6533
6552
|
constructor(t, n) {
|
|
6534
|
-
const i = new
|
|
6553
|
+
const i = new h0(n), r = new kn(t);
|
|
6535
6554
|
t.baseTexture.wrapMode = ke.REPEAT, super(i, r), this.autoUpdate = !0;
|
|
6536
6555
|
}
|
|
6537
6556
|
_render(t) {
|
|
@@ -6539,7 +6558,7 @@ class o0 extends Ln {
|
|
|
6539
6558
|
this.autoUpdate && n.update(), super._render(t);
|
|
6540
6559
|
}
|
|
6541
6560
|
}
|
|
6542
|
-
class
|
|
6561
|
+
class u0 extends Cn {
|
|
6543
6562
|
/**
|
|
6544
6563
|
* @param {number} [width=200] - The width (i.e., thickness) of the rope.
|
|
6545
6564
|
* @param {PIXI.Point[]} [points] - An array of PIXI.Point objects to construct this rope.
|
|
@@ -6573,13 +6592,13 @@ class a0 extends Cn {
|
|
|
6573
6592
|
let a = 0, c = t[0];
|
|
6574
6593
|
const h = t.length;
|
|
6575
6594
|
for (let d = 0; d < h; d++) {
|
|
6576
|
-
const
|
|
6577
|
-
c = t[d], a += m / this._width, s[
|
|
6595
|
+
const p = d * 4, g = c.x - ((u = t[d]) == null ? void 0 : u.x), y = c.y - ((f = t[d]) == null ? void 0 : f.y), m = Math.sqrt(g * g + y * y);
|
|
6596
|
+
c = t[d], a += m / this._width, s[p] = a, s[p + 1] = 0, s[p + 2] = a, s[p + 3] = 1;
|
|
6578
6597
|
}
|
|
6579
6598
|
let l = 0;
|
|
6580
6599
|
for (let d = 0; d < h - 1; d++) {
|
|
6581
|
-
const
|
|
6582
|
-
o[l++] =
|
|
6600
|
+
const p = d * 2;
|
|
6601
|
+
o[l++] = p, o[l++] = p + 1, o[l++] = p + 2, o[l++] = p + 2, o[l++] = p + 1, o[l++] = p + 3;
|
|
6583
6602
|
}
|
|
6584
6603
|
i.update(), r.update(), this.updateVertices();
|
|
6585
6604
|
}
|
|
@@ -6596,8 +6615,8 @@ class a0 extends Cn {
|
|
|
6596
6615
|
for (let l = 0; l < a; l++) {
|
|
6597
6616
|
const u = t[l], f = l * 4;
|
|
6598
6617
|
l < t.length - 1 ? i = t[l + 1] : i = u, s = -(i.x - n.x), r = i.y - n.y;
|
|
6599
|
-
const d = Math.sqrt(r * r + s * s),
|
|
6600
|
-
r /= d, s /= d, r *=
|
|
6618
|
+
const d = Math.sqrt(r * r + s * s), p = this._width / 2;
|
|
6619
|
+
r /= d, s /= d, r *= p, s *= p, o[f] = u.x + r, o[f + 1] = u.y + s, o[f + 2] = u.x - r, o[f + 3] = u.y - s, n = u;
|
|
6601
6620
|
}
|
|
6602
6621
|
(h = this.buffers[0]) == null || h.update();
|
|
6603
6622
|
}
|
|
@@ -6605,7 +6624,7 @@ class a0 extends Cn {
|
|
|
6605
6624
|
this.build();
|
|
6606
6625
|
}
|
|
6607
6626
|
}
|
|
6608
|
-
class
|
|
6627
|
+
class f0 extends Ln {
|
|
6609
6628
|
/**
|
|
6610
6629
|
* Note: The wrap mode of the texture is set to REPEAT if `textureScale` is positive.
|
|
6611
6630
|
* @param texture - The texture to use on the rope. (attempt to set UV wrapping, will fail on non-power of two textures)
|
|
@@ -6613,7 +6632,7 @@ class c0 extends Ln {
|
|
|
6613
6632
|
* @param width - Width of rope
|
|
6614
6633
|
*/
|
|
6615
6634
|
constructor(t, n, i) {
|
|
6616
|
-
const r = new
|
|
6635
|
+
const r = new u0(n, i), s = new kn(t);
|
|
6617
6636
|
t.baseTexture.wrapMode = ke.REPEAT, super(r, s), this.autoUpdate = !0;
|
|
6618
6637
|
}
|
|
6619
6638
|
_render(t) {
|
|
@@ -6621,7 +6640,7 @@ class c0 extends Ln {
|
|
|
6621
6640
|
this.autoUpdate && n.update(), super._render(t);
|
|
6622
6641
|
}
|
|
6623
6642
|
}
|
|
6624
|
-
class
|
|
6643
|
+
class d0 extends Cn {
|
|
6625
6644
|
/**
|
|
6626
6645
|
* @param width - The width (i.e., thickness) of the rope.
|
|
6627
6646
|
* @param points - An array of PIXI.Point objects to construct this rope.
|
|
@@ -6631,7 +6650,7 @@ class h0 extends Cn {
|
|
|
6631
6650
|
}
|
|
6632
6651
|
/** Refreshes Rope indices and uvs */
|
|
6633
6652
|
build() {
|
|
6634
|
-
var d,
|
|
6653
|
+
var d, p, g, y;
|
|
6635
6654
|
const t = this.points;
|
|
6636
6655
|
if (!t)
|
|
6637
6656
|
return;
|
|
@@ -6642,14 +6661,14 @@ class h0 extends Cn {
|
|
|
6642
6661
|
const s = t.length;
|
|
6643
6662
|
let o = 0, a = t[0];
|
|
6644
6663
|
for (let m = 0; m < s; m++) {
|
|
6645
|
-
const x = a.x - ((d = t[m]) == null ? void 0 : d.x), v = a.y - ((
|
|
6664
|
+
const x = a.x - ((d = t[m]) == null ? void 0 : d.x), v = a.y - ((p = t[m]) == null ? void 0 : p.y), M = Math.sqrt(x * x + v * v);
|
|
6646
6665
|
a = t[m], o += M;
|
|
6647
6666
|
}
|
|
6648
6667
|
const c = i.data, h = r.data;
|
|
6649
6668
|
c[0] = 0, c[1] = 0, c[2] = 0, c[3] = 1;
|
|
6650
6669
|
let l = 0, u = t[0];
|
|
6651
6670
|
for (let m = 0; m < s; m++) {
|
|
6652
|
-
const x = m * 4, v = u.x - ((
|
|
6671
|
+
const x = m * 4, v = u.x - ((g = t[m]) == null ? void 0 : g.x), M = u.y - ((y = t[m]) == null ? void 0 : y.y), b = Math.sqrt(v * v + M * M);
|
|
6653
6672
|
u = t[m], l += b / o, c[x] = l, c[x + 1] = 0, c[x + 2] = l, c[x + 3] = 1;
|
|
6654
6673
|
}
|
|
6655
6674
|
let f = 0;
|
|
@@ -6670,8 +6689,8 @@ class h0 extends Cn {
|
|
|
6670
6689
|
for (let l = 0; l < a; l++) {
|
|
6671
6690
|
const u = t[l], f = l * 4;
|
|
6672
6691
|
l < t.length - 1 ? i = t[l + 1] : i = u, s = -(i.x - n.x), r = i.y - n.y;
|
|
6673
|
-
const d = Math.sqrt(r * r + s * s),
|
|
6674
|
-
r /= d, s /= d, r *=
|
|
6692
|
+
const d = Math.sqrt(r * r + s * s), p = this._width / 2;
|
|
6693
|
+
r /= d, s /= d, r *= p, s *= p, o[f] = u.x + r, o[f + 1] = u.y + s, o[f + 2] = u.x - r, o[f + 3] = u.y - s, n = u;
|
|
6675
6694
|
}
|
|
6676
6695
|
(h = this.buffers[0]) == null || h.update();
|
|
6677
6696
|
}
|
|
@@ -6679,13 +6698,13 @@ class h0 extends Cn {
|
|
|
6679
6698
|
this.updateVertices();
|
|
6680
6699
|
}
|
|
6681
6700
|
}
|
|
6682
|
-
class
|
|
6701
|
+
class p0 extends Ln {
|
|
6683
6702
|
/**
|
|
6684
6703
|
* @param texture - The texture to use on the rope.
|
|
6685
6704
|
* @param points - An array of {@link PIXI.Point} objects to construct this rope.
|
|
6686
6705
|
*/
|
|
6687
6706
|
constructor(t, n) {
|
|
6688
|
-
const i = new
|
|
6707
|
+
const i = new d0(n, t.height), r = new kn(t);
|
|
6689
6708
|
super(i, r), this.autoUpdate = !0;
|
|
6690
6709
|
}
|
|
6691
6710
|
_render(t) {
|
|
@@ -6693,7 +6712,7 @@ class l0 extends Ln {
|
|
|
6693
6712
|
(this.autoUpdate || n._width !== this.shader.texture.height) && (n._width = this.shader.texture.height, n.update()), super._render(t);
|
|
6694
6713
|
}
|
|
6695
6714
|
}
|
|
6696
|
-
const
|
|
6715
|
+
const g0 = (e, t, n) => (i) => {
|
|
6697
6716
|
switch (i.kind) {
|
|
6698
6717
|
case "casing":
|
|
6699
6718
|
return e(i);
|
|
@@ -6704,7 +6723,7 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6704
6723
|
default:
|
|
6705
6724
|
return Oe(i);
|
|
6706
6725
|
}
|
|
6707
|
-
},
|
|
6726
|
+
}, m0 = (e) => ({
|
|
6708
6727
|
exaggerationFactor: 2,
|
|
6709
6728
|
internalLayerOptions: El(e),
|
|
6710
6729
|
holeOptions: Fl,
|
|
@@ -6760,17 +6779,17 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6760
6779
|
this.drawRope(c.pathPoints, f, o), c.kind === "casing-window" ? this.drawCasingWindowOutline(c.leftPath, c.rightPath, s, r.casingWallWidth) : this.drawOutline(c.leftPath, c.rightPath, a, r.casingWallWidth, u);
|
|
6761
6780
|
});
|
|
6762
6781
|
}, this.generateShoe = (r, s, o, a) => {
|
|
6763
|
-
const c = r - o, h = r, l = this.getZFactorScaledPathForPoints(c, h), u =
|
|
6764
|
-
return [...f,
|
|
6782
|
+
const c = r - o, h = r, l = this.getZFactorScaledPathForPoints(c, h), u = Yr(l), f = Tn(l, u, s * (a < 0 ? -1 : 1)), d = l[l.length - 1], p = u[u.length - 1], g = Gr(d, p, a + s * (a < 0 ? -1 : 1));
|
|
6783
|
+
return [...f, g];
|
|
6765
6784
|
}, this.createCementSqueezeShape = (r, s, o, a) => {
|
|
6766
6785
|
const { exaggerationFactor: c = 1 } = this.options;
|
|
6767
|
-
return
|
|
6786
|
+
return Wu(r, s, o, a, c, this.getZFactorScaledPathForPoints);
|
|
6768
6787
|
}, this.createPerforationShape = (r, s, o) => {
|
|
6769
6788
|
const { exaggerationFactor: a = 1 } = this.options;
|
|
6770
|
-
return
|
|
6789
|
+
return i0(r, s, o, a, this.getZFactorScaledPathForPoints);
|
|
6771
6790
|
}, this.options = {
|
|
6772
6791
|
...this.options,
|
|
6773
|
-
...
|
|
6792
|
+
...m0(this.id),
|
|
6774
6793
|
...i
|
|
6775
6794
|
};
|
|
6776
6795
|
}
|
|
@@ -6835,18 +6854,18 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6835
6854
|
* @param lineAlignment alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outer).
|
|
6836
6855
|
*/
|
|
6837
6856
|
drawCasingWindowOutline(t, n, { lineColor: i, windowOptions: r }, s = 1) {
|
|
6838
|
-
var
|
|
6839
|
-
const o = !!((y = (
|
|
6857
|
+
var g, y;
|
|
6858
|
+
const o = !!((y = (g = this.referenceSystem) == null ? void 0 : g.options) != null && y.calculateDisplacementFromBottom), [a, c] = o ? [t, n] : [n, t], [h, l] = o ? [1, 0] : [0, 1], u = new Gt();
|
|
6840
6859
|
u.lineStyle(s, ut(i), void 0, l);
|
|
6841
6860
|
const f = a[0];
|
|
6842
6861
|
u.moveTo(f.x, f.y), a.forEach((m) => u.lineTo(m.x, m.y));
|
|
6843
|
-
const d = new
|
|
6862
|
+
const d = new Nu(u, {
|
|
6844
6863
|
dash: [r.dashLength, r.spaceLength],
|
|
6845
6864
|
color: ut(r.dashColor),
|
|
6846
6865
|
width: s,
|
|
6847
6866
|
alignment: h
|
|
6848
|
-
}),
|
|
6849
|
-
d.moveTo(
|
|
6867
|
+
}), p = c[0];
|
|
6868
|
+
d.moveTo(p.x, p.y), c.forEach((m) => {
|
|
6850
6869
|
d.lineTo(m.x, m.y);
|
|
6851
6870
|
}), this.addChild(u);
|
|
6852
6871
|
}
|
|
@@ -6854,56 +6873,56 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6854
6873
|
if (!this.data || !this.referenceSystem)
|
|
6855
6874
|
return;
|
|
6856
6875
|
const { exaggerationFactor: t = 1 } = this.options, { holeSizes: n, casings: i, cements: r, completion: s, symbols: o, pAndA: a, perforations: c } = this.data;
|
|
6857
|
-
this.updateSymbolCache(o), n.sort((
|
|
6858
|
-
const h = n.length > 0 ? (sn(n, (
|
|
6859
|
-
this.internalLayerVisibility.holeLayerId && n.forEach((
|
|
6860
|
-
const l = i.map((
|
|
6861
|
-
(
|
|
6876
|
+
this.updateSymbolCache(o), n.sort((g, y) => y.diameter - g.diameter);
|
|
6877
|
+
const h = n.length > 0 ? (sn(n, (g) => g.diameter) ?? 0) * t : pl * t;
|
|
6878
|
+
this.internalLayerVisibility.holeLayerId && n.forEach((g) => this.drawHoleSize(h, g)), i.sort((g, y) => y.diameter - g.diameter);
|
|
6879
|
+
const l = i.map((g) => this.createCasingRenderObject(g)), u = r.map(
|
|
6880
|
+
(g) => ({
|
|
6862
6881
|
kind: "cement",
|
|
6863
|
-
segments:
|
|
6864
|
-
casingIds: (
|
|
6882
|
+
segments: Vu(g, i, s, n, t, this.getZFactorScaledPathForPoints),
|
|
6883
|
+
casingIds: (g.referenceIds || []).filter((y) => y)
|
|
6865
6884
|
})
|
|
6866
6885
|
), [f, d] = a.reduce(
|
|
6867
|
-
([
|
|
6886
|
+
([g, y], m) => wl(m) ? [[m, ...g], y] : [g, [m, ...y]],
|
|
6868
6887
|
[[], []]
|
|
6869
|
-
),
|
|
6888
|
+
), p = f.map((g) => ({
|
|
6870
6889
|
kind: "cementSqueeze",
|
|
6871
|
-
segments: this.createCementSqueezeShape(
|
|
6872
|
-
casingIds:
|
|
6890
|
+
segments: this.createCementSqueezeShape(g, i, s, n),
|
|
6891
|
+
casingIds: g.referenceIds
|
|
6873
6892
|
}));
|
|
6874
|
-
if (this.sortCementAndCasingRenderObjects(l, u,
|
|
6875
|
-
|
|
6876
|
-
(
|
|
6877
|
-
this.internalLayerVisibility.casingLayerId && (this.drawCasing(
|
|
6893
|
+
if (this.sortCementAndCasingRenderObjects(l, u, p).forEach(
|
|
6894
|
+
g0(
|
|
6895
|
+
(g) => {
|
|
6896
|
+
this.internalLayerVisibility.casingLayerId && (this.drawCasing(g), g.hasShoe && this.drawShoe(g.bottom, g.referenceRadius));
|
|
6878
6897
|
},
|
|
6879
|
-
(
|
|
6898
|
+
(g) => {
|
|
6880
6899
|
if (this.internalLayerVisibility.cementLayerId) {
|
|
6881
6900
|
const y = this.getCementTexture();
|
|
6882
|
-
y && this.drawComplexRope(
|
|
6901
|
+
y && this.drawComplexRope(g.segments, y);
|
|
6883
6902
|
}
|
|
6884
6903
|
},
|
|
6885
|
-
(
|
|
6904
|
+
(g) => {
|
|
6886
6905
|
if (this.internalLayerVisibility.pAndALayerId) {
|
|
6887
6906
|
const y = this.getCementSqueezeTexture();
|
|
6888
|
-
y && this.drawComplexRope(
|
|
6907
|
+
y && this.drawComplexRope(g.segments, y);
|
|
6889
6908
|
}
|
|
6890
6909
|
}
|
|
6891
6910
|
)
|
|
6892
|
-
), this.perforationRopeAndTextureReferences.forEach(({ rope:
|
|
6893
|
-
|
|
6911
|
+
), this.perforationRopeAndTextureReferences.forEach(({ rope: g, texture: y }) => {
|
|
6912
|
+
g.destroy({
|
|
6894
6913
|
children: !0,
|
|
6895
6914
|
texture: !0,
|
|
6896
6915
|
baseTexture: !0
|
|
6897
6916
|
}), y.destroy(!0);
|
|
6898
6917
|
}), this.perforationRopeAndTextureReferences = [], this.internalLayerVisibility.perforationLayerId) {
|
|
6899
|
-
const { perforationOptions:
|
|
6918
|
+
const { perforationOptions: g } = this.options, y = c.filter(Sl), m = c.filter(Ml), x = c.filter(Al);
|
|
6900
6919
|
y.forEach((v) => {
|
|
6901
6920
|
const b = this.createPerforationShape(v, i, n).reduce(
|
|
6902
6921
|
(S, T) => (S[T.diameter] || (S[T.diameter] = []), S[T.diameter] = [...S[T.diameter] ?? [], T], S),
|
|
6903
6922
|
{}
|
|
6904
6923
|
);
|
|
6905
6924
|
Object.values(b).forEach((S) => {
|
|
6906
|
-
const T =
|
|
6925
|
+
const T = o0(v, S[0], g), C = this.drawComplexRope(S, T);
|
|
6907
6926
|
C && this.perforationRopeAndTextureReferences.push({ rope: C, texture: T });
|
|
6908
6927
|
});
|
|
6909
6928
|
}), x.forEach((v) => {
|
|
@@ -6913,7 +6932,7 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6913
6932
|
);
|
|
6914
6933
|
Object.values(S).forEach((T) => {
|
|
6915
6934
|
T.forEach((C) => {
|
|
6916
|
-
const k =
|
|
6935
|
+
const k = c0(v, c, C, g), R = this.drawComplexRope([C], k);
|
|
6917
6936
|
R && this.perforationRopeAndTextureReferences.push({ rope: R, texture: k });
|
|
6918
6937
|
});
|
|
6919
6938
|
});
|
|
@@ -6924,7 +6943,7 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6924
6943
|
);
|
|
6925
6944
|
Object.values(S).forEach((T) => {
|
|
6926
6945
|
T.forEach((C) => {
|
|
6927
|
-
const k =
|
|
6946
|
+
const k = a0(v, C, g), R = this.drawComplexRope([C], k);
|
|
6928
6947
|
R && this.perforationRopeAndTextureReferences.push({ rope: R, texture: k });
|
|
6929
6948
|
});
|
|
6930
6949
|
});
|
|
@@ -6932,19 +6951,19 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6932
6951
|
}
|
|
6933
6952
|
this.internalLayerVisibility.completionLayerId && s.forEach(
|
|
6934
6953
|
Tl(
|
|
6935
|
-
(
|
|
6936
|
-
(
|
|
6937
|
-
(
|
|
6938
|
-
const y = this.prepareSymbolRenderObject(
|
|
6954
|
+
(g) => this.drawScreen(g),
|
|
6955
|
+
(g) => this.drawTubing(g),
|
|
6956
|
+
(g) => {
|
|
6957
|
+
const y = this.prepareSymbolRenderObject(g);
|
|
6939
6958
|
this.drawSymbolComponent(y);
|
|
6940
6959
|
}
|
|
6941
6960
|
)
|
|
6942
|
-
), this.internalLayerVisibility.pAndALayerId && d.forEach((
|
|
6943
|
-
if (vl(
|
|
6944
|
-
const y = this.prepareSymbolRenderObject(
|
|
6961
|
+
), this.internalLayerVisibility.pAndALayerId && d.forEach((g) => {
|
|
6962
|
+
if (vl(g)) {
|
|
6963
|
+
const y = this.prepareSymbolRenderObject(g);
|
|
6945
6964
|
this.drawSymbolComponent(y);
|
|
6946
6965
|
}
|
|
6947
|
-
bl(
|
|
6966
|
+
bl(g) && this.drawCementPlug(g, i, s, n);
|
|
6948
6967
|
});
|
|
6949
6968
|
}
|
|
6950
6969
|
updateSymbolCache(t) {
|
|
@@ -6952,11 +6971,11 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6952
6971
|
return;
|
|
6953
6972
|
const n = Object.keys(this.textureSymbolCacheArray);
|
|
6954
6973
|
Object.entries(t).forEach(([i, r]) => {
|
|
6955
|
-
!n.includes(i) && this.textureSymbolCacheArray && (this.textureSymbolCacheArray[i] =
|
|
6974
|
+
!n.includes(i) && this.textureSymbolCacheArray && (this.textureSymbolCacheArray[i] = V.from(r));
|
|
6956
6975
|
});
|
|
6957
6976
|
}
|
|
6958
6977
|
drawCementPlug(t, n, i, r) {
|
|
6959
|
-
const { exaggerationFactor: s = 1, cementPlugOptions: o } = this.options, a =
|
|
6978
|
+
const { exaggerationFactor: s = 1, cementPlugOptions: o } = this.options, a = Yu(
|
|
6960
6979
|
t,
|
|
6961
6980
|
n,
|
|
6962
6981
|
i,
|
|
@@ -6979,21 +6998,21 @@ const u0 = (e, t, n) => (i) => {
|
|
|
6979
6998
|
}
|
|
6980
6999
|
createCasingRenderObject(t) {
|
|
6981
7000
|
const { exaggerationFactor: n = 1 } = this.options;
|
|
6982
|
-
return
|
|
7001
|
+
return n0(n, t, this.getZFactorScaledPathForPoints);
|
|
6983
7002
|
}
|
|
6984
7003
|
getCementPlugTexture(t) {
|
|
6985
|
-
return this.cementPlugTextureCache || (this.cementPlugTextureCache =
|
|
7004
|
+
return this.cementPlugTextureCache || (this.cementPlugTextureCache = Qu(t)), this.cementPlugTextureCache;
|
|
6986
7005
|
}
|
|
6987
7006
|
drawSVGRope(t, n) {
|
|
6988
7007
|
if (t.length === 0)
|
|
6989
7008
|
return;
|
|
6990
|
-
const i = new
|
|
7009
|
+
const i = new p0(n, t);
|
|
6991
7010
|
this.addChild(i);
|
|
6992
7011
|
}
|
|
6993
7012
|
getSymbolTexture(t, n) {
|
|
6994
7013
|
var r, s;
|
|
6995
7014
|
const i = (s = (r = this.textureSymbolCacheArray) == null ? void 0 : r[t]) == null ? void 0 : s.baseTexture;
|
|
6996
|
-
return i ? new
|
|
7015
|
+
return i ? new V(i, void 0, new qt(0, 0, 0, n), void 0, Pn.MAIN_DIAGONAL) : void 0;
|
|
6997
7016
|
}
|
|
6998
7017
|
drawHoleRope(t, n, i) {
|
|
6999
7018
|
if (t.length === 0)
|
|
@@ -7003,9 +7022,9 @@ const u0 = (e, t, n) => (i) => {
|
|
|
7003
7022
|
}
|
|
7004
7023
|
getHoleTexture(t, n, i) {
|
|
7005
7024
|
const r = xt, s = r, o = r, a = n / i * r;
|
|
7006
|
-
this.holeTextureCache || (this.holeTextureCache =
|
|
7025
|
+
this.holeTextureCache || (this.holeTextureCache = qu(t, o, s));
|
|
7007
7026
|
const c = this.holeTextureCache.baseTexture, h = (s - a) / 2, l = new qt(0, h, o, a);
|
|
7008
|
-
return new
|
|
7027
|
+
return new V(c, l);
|
|
7009
7028
|
}
|
|
7010
7029
|
/**
|
|
7011
7030
|
* The rendering order of these components needs to be aligned
|
|
@@ -7041,11 +7060,11 @@ const u0 = (e, t, n) => (i) => {
|
|
|
7041
7060
|
drawComplexRope(t, n) {
|
|
7042
7061
|
if (t.length === 0)
|
|
7043
7062
|
return;
|
|
7044
|
-
const i = new
|
|
7063
|
+
const i = new l0(n, t);
|
|
7045
7064
|
return this.addChild(i), i;
|
|
7046
7065
|
}
|
|
7047
7066
|
createCasingTexture(t) {
|
|
7048
|
-
return new
|
|
7067
|
+
return new V(V.WHITE.baseTexture, void 0, new qt(0, 0, 16, t));
|
|
7049
7068
|
}
|
|
7050
7069
|
drawShoe(t, n) {
|
|
7051
7070
|
const { exaggerationFactor: i = 1, casingOptions: r } = this.options, s = r.shoeSize.width * i, o = r.shoeSize.length * i, a = this.generateShoe(t, n, o, s), c = this.generateShoe(t, n, o, -s);
|
|
@@ -7054,14 +7073,14 @@ const u0 = (e, t, n) => (i) => {
|
|
|
7054
7073
|
getCementTexture() {
|
|
7055
7074
|
if (!this.cementTextureCache) {
|
|
7056
7075
|
const { cementOptions: t } = this.options;
|
|
7057
|
-
t && (this.cementTextureCache =
|
|
7076
|
+
t && (this.cementTextureCache = Ku(t));
|
|
7058
7077
|
}
|
|
7059
7078
|
return this.cementTextureCache;
|
|
7060
7079
|
}
|
|
7061
7080
|
getCementSqueezeTexture() {
|
|
7062
7081
|
if (!this.cementSqueezeTextureCache) {
|
|
7063
7082
|
const { cementSqueezeOptions: t } = this.options;
|
|
7064
|
-
t && (this.cementSqueezeTextureCache =
|
|
7083
|
+
t && (this.cementSqueezeTextureCache = Ju(t));
|
|
7065
7084
|
}
|
|
7066
7085
|
return this.cementSqueezeTextureCache;
|
|
7067
7086
|
}
|
|
@@ -7074,25 +7093,25 @@ const u0 = (e, t, n) => (i) => {
|
|
|
7074
7093
|
this.drawCompletionRope(a, c, o);
|
|
7075
7094
|
}
|
|
7076
7095
|
getTubingTexture(t) {
|
|
7077
|
-
return this.tubingTextureCache || (this.tubingTextureCache =
|
|
7096
|
+
return this.tubingTextureCache || (this.tubingTextureCache = Zu(t)), this.tubingTextureCache;
|
|
7078
7097
|
}
|
|
7079
7098
|
getScreenTexture() {
|
|
7080
7099
|
if (!this.screenTextureCache) {
|
|
7081
7100
|
const { screenOptions: t } = this.options;
|
|
7082
|
-
t && (this.screenTextureCache =
|
|
7101
|
+
t && (this.screenTextureCache = ju(t));
|
|
7083
7102
|
}
|
|
7084
7103
|
return this.screenTextureCache;
|
|
7085
7104
|
}
|
|
7086
7105
|
drawCompletionRope(t, n, i) {
|
|
7087
7106
|
if (t.length === 0)
|
|
7088
7107
|
return;
|
|
7089
|
-
const r = new
|
|
7108
|
+
const r = new f0(n, t, i);
|
|
7090
7109
|
this.addChild(r);
|
|
7091
7110
|
}
|
|
7092
7111
|
};
|
|
7093
7112
|
Zr.getOutlineClosureType = (e, t) => e === 0 ? e === t ? "TopAndBottom" : "Top" : e === t ? "Bottom" : "None";
|
|
7094
|
-
let
|
|
7095
|
-
class
|
|
7113
|
+
let ff = Zr;
|
|
7114
|
+
class df extends Lt {
|
|
7096
7115
|
onMount(t) {
|
|
7097
7116
|
super.onMount(t);
|
|
7098
7117
|
}
|
|
@@ -7114,13 +7133,13 @@ function kt(e) {
|
|
|
7114
7133
|
return e;
|
|
7115
7134
|
};
|
|
7116
7135
|
}
|
|
7117
|
-
const $i = 1e-12, Sn = Math.PI, Mn = 2 * Sn, St = 1e-6,
|
|
7136
|
+
const $i = 1e-12, Sn = Math.PI, Mn = 2 * Sn, St = 1e-6, y0 = Mn - St;
|
|
7118
7137
|
function Qr(e) {
|
|
7119
7138
|
this._ += e[0];
|
|
7120
7139
|
for (let t = 1, n = e.length; t < n; ++t)
|
|
7121
7140
|
this._ += arguments[t] + e[t];
|
|
7122
7141
|
}
|
|
7123
|
-
function
|
|
7142
|
+
function _0(e) {
|
|
7124
7143
|
let t = Math.floor(e);
|
|
7125
7144
|
if (!(t >= 0))
|
|
7126
7145
|
throw new Error(`invalid digits: ${e}`);
|
|
@@ -7133,10 +7152,10 @@ function p0(e) {
|
|
|
7133
7152
|
this._ += Math.round(arguments[r] * n) / n + i[r];
|
|
7134
7153
|
};
|
|
7135
7154
|
}
|
|
7136
|
-
class
|
|
7155
|
+
class x0 {
|
|
7137
7156
|
constructor(t) {
|
|
7138
7157
|
this._x0 = this._y0 = // start of current subpath
|
|
7139
|
-
this._x1 = this._y1 = null, this._ = "", this._append = t == null ? Qr :
|
|
7158
|
+
this._x1 = this._y1 = null, this._ = "", this._append = t == null ? Qr : _0(t);
|
|
7140
7159
|
}
|
|
7141
7160
|
moveTo(t, n) {
|
|
7142
7161
|
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +n}`;
|
|
@@ -7163,15 +7182,15 @@ class g0 {
|
|
|
7163
7182
|
if (!(Math.abs(u * c - h * l) > St) || !s)
|
|
7164
7183
|
this._append`L${this._x1 = t},${this._y1 = n}`;
|
|
7165
7184
|
else {
|
|
7166
|
-
let d = i - o,
|
|
7167
|
-
Math.abs(M - 1) > St && this._append`L${t + M * l},${n + M * u}`, this._append`A${s},${s},0,0,${+(u * d > l *
|
|
7185
|
+
let d = i - o, p = r - a, g = c * c + h * h, y = d * d + p * p, m = Math.sqrt(g), x = Math.sqrt(f), v = s * Math.tan((Sn - Math.acos((g + f - y) / (2 * m * x))) / 2), M = v / x, b = v / m;
|
|
7186
|
+
Math.abs(M - 1) > St && this._append`L${t + M * l},${n + M * u}`, this._append`A${s},${s},0,0,${+(u * d > l * p)},${this._x1 = t + b * c},${this._y1 = n + b * h}`;
|
|
7168
7187
|
}
|
|
7169
7188
|
}
|
|
7170
7189
|
arc(t, n, i, r, s, o) {
|
|
7171
7190
|
if (t = +t, n = +n, i = +i, o = !!o, i < 0)
|
|
7172
7191
|
throw new Error(`negative radius: ${i}`);
|
|
7173
7192
|
let a = i * Math.cos(r), c = i * Math.sin(r), h = t + a, l = n + c, u = 1 ^ o, f = o ? r - s : s - r;
|
|
7174
|
-
this._x1 === null ? this._append`M${h},${l}` : (Math.abs(this._x1 - h) > St || Math.abs(this._y1 - l) > St) && this._append`L${h},${l}`, i && (f < 0 && (f = f % Mn + Mn), f >
|
|
7193
|
+
this._x1 === null ? this._append`M${h},${l}` : (Math.abs(this._x1 - h) > St || Math.abs(this._y1 - l) > St) && this._append`L${h},${l}`, i && (f < 0 && (f = f % Mn + Mn), f > y0 ? this._append`A${i},${i},0,1,${u},${t - a},${n - c}A${i},${i},0,1,${u},${this._x1 = h},${this._y1 = l}` : f > St && this._append`A${i},${i},0,${+(f >= Sn)},${u},${this._x1 = t + i * Math.cos(s)},${this._y1 = n + i * Math.sin(s)}`);
|
|
7175
7194
|
}
|
|
7176
7195
|
rect(t, n, i, r) {
|
|
7177
7196
|
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +n}h${i = +i}v${+r}h${-i}Z`;
|
|
@@ -7180,7 +7199,7 @@ class g0 {
|
|
|
7180
7199
|
return this._;
|
|
7181
7200
|
}
|
|
7182
7201
|
}
|
|
7183
|
-
function
|
|
7202
|
+
function v0(e) {
|
|
7184
7203
|
let t = 3;
|
|
7185
7204
|
return e.digits = function(n) {
|
|
7186
7205
|
if (!arguments.length)
|
|
@@ -7194,9 +7213,9 @@ function m0(e) {
|
|
|
7194
7213
|
t = i;
|
|
7195
7214
|
}
|
|
7196
7215
|
return e;
|
|
7197
|
-
}, () => new
|
|
7216
|
+
}, () => new x0(t);
|
|
7198
7217
|
}
|
|
7199
|
-
function
|
|
7218
|
+
function w0(e) {
|
|
7200
7219
|
return typeof e == "object" && "length" in e ? e : Array.from(e);
|
|
7201
7220
|
}
|
|
7202
7221
|
function Jr(e) {
|
|
@@ -7231,17 +7250,17 @@ Jr.prototype = {
|
|
|
7231
7250
|
function ts(e) {
|
|
7232
7251
|
return new Jr(e);
|
|
7233
7252
|
}
|
|
7234
|
-
function
|
|
7253
|
+
function b0(e) {
|
|
7235
7254
|
return e[0];
|
|
7236
7255
|
}
|
|
7237
|
-
function
|
|
7256
|
+
function T0(e) {
|
|
7238
7257
|
return e[1];
|
|
7239
7258
|
}
|
|
7240
|
-
function
|
|
7241
|
-
var n = kt(!0), i = null, r = ts, s = null, o =
|
|
7242
|
-
e = typeof e == "function" ? e : e === void 0 ?
|
|
7259
|
+
function S0(e, t) {
|
|
7260
|
+
var n = kt(!0), i = null, r = ts, s = null, o = v0(a);
|
|
7261
|
+
e = typeof e == "function" ? e : e === void 0 ? b0 : kt(e), t = typeof t == "function" ? t : t === void 0 ? T0 : kt(t);
|
|
7243
7262
|
function a(c) {
|
|
7244
|
-
var h, l = (c =
|
|
7263
|
+
var h, l = (c = w0(c)).length, u, f = !1, d;
|
|
7245
7264
|
for (i == null && (s = r(d = o())), h = 0; h <= l; ++h)
|
|
7246
7265
|
!(h < l && n(u = c[h], h, c)) === f && ((f = !f) ? s.lineStart() : s.lineEnd()), f && s.point(+e(u, h, c), +t(u, h, c));
|
|
7247
7266
|
if (d)
|
|
@@ -7311,7 +7330,7 @@ He.prototype = {
|
|
|
7311
7330
|
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
|
|
7312
7331
|
}
|
|
7313
7332
|
};
|
|
7314
|
-
function
|
|
7333
|
+
function M0(e) {
|
|
7315
7334
|
return new He(e);
|
|
7316
7335
|
}
|
|
7317
7336
|
function es(e) {
|
|
@@ -7357,7 +7376,7 @@ es.prototype = {
|
|
|
7357
7376
|
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
|
|
7358
7377
|
}
|
|
7359
7378
|
};
|
|
7360
|
-
function
|
|
7379
|
+
function A0(e) {
|
|
7361
7380
|
return new es(e);
|
|
7362
7381
|
}
|
|
7363
7382
|
function ns(e, t) {
|
|
@@ -7381,7 +7400,7 @@ ns.prototype = {
|
|
|
7381
7400
|
this._x.push(+e), this._y.push(+t);
|
|
7382
7401
|
}
|
|
7383
7402
|
};
|
|
7384
|
-
const
|
|
7403
|
+
const P0 = function e(t) {
|
|
7385
7404
|
function n(i) {
|
|
7386
7405
|
return t === 1 ? new He(i) : new ns(i, t);
|
|
7387
7406
|
}
|
|
@@ -7440,7 +7459,7 @@ Kn.prototype = {
|
|
|
7440
7459
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
7441
7460
|
}
|
|
7442
7461
|
};
|
|
7443
|
-
const
|
|
7462
|
+
const C0 = function e(t) {
|
|
7444
7463
|
function n(i) {
|
|
7445
7464
|
return new Kn(i, t);
|
|
7446
7465
|
}
|
|
@@ -7448,7 +7467,7 @@ const S0 = function e(t) {
|
|
|
7448
7467
|
return e(+i);
|
|
7449
7468
|
}, n;
|
|
7450
7469
|
}(0);
|
|
7451
|
-
function
|
|
7470
|
+
function L0(e, t, n) {
|
|
7452
7471
|
var i = e._x1, r = e._y1, s = e._x2, o = e._y2;
|
|
7453
7472
|
if (e._l01_a > $i) {
|
|
7454
7473
|
var a = 2 * e._l01_2a + 3 * e._l01_a * e._l12_a + e._l12_2a, c = 3 * e._l01_a * (e._l01_a + e._l12_a);
|
|
@@ -7499,13 +7518,13 @@ is.prototype = {
|
|
|
7499
7518
|
case 2:
|
|
7500
7519
|
this._point = 3;
|
|
7501
7520
|
default:
|
|
7502
|
-
|
|
7521
|
+
L0(this, e, t);
|
|
7503
7522
|
break;
|
|
7504
7523
|
}
|
|
7505
7524
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
7506
7525
|
}
|
|
7507
7526
|
};
|
|
7508
|
-
const
|
|
7527
|
+
const k0 = function e(t) {
|
|
7509
7528
|
function n(i) {
|
|
7510
7529
|
return t ? new is(i, t) : new Kn(i, 0);
|
|
7511
7530
|
}
|
|
@@ -7516,11 +7535,11 @@ const A0 = function e(t) {
|
|
|
7516
7535
|
function Xi(e) {
|
|
7517
7536
|
return e < 0 ? -1 : 1;
|
|
7518
7537
|
}
|
|
7519
|
-
function
|
|
7538
|
+
function Ui(e, t, n) {
|
|
7520
7539
|
var i = e._x1 - e._x0, r = t - e._x1, s = (e._y1 - e._y0) / (i || r < 0 && -0), o = (n - e._y1) / (r || i < 0 && -0), a = (s * r + o * i) / (i + r);
|
|
7521
7540
|
return (Xi(s) + Xi(o)) * Math.min(Math.abs(s), Math.abs(o), 0.5 * Math.abs(a)) || 0;
|
|
7522
7541
|
}
|
|
7523
|
-
function
|
|
7542
|
+
function Vi(e, t) {
|
|
7524
7543
|
var n = e._x1 - e._x0;
|
|
7525
7544
|
return n ? (3 * (e._y1 - e._y0) / n - t) / 2 : t;
|
|
7526
7545
|
}
|
|
@@ -7547,7 +7566,7 @@ Le.prototype = {
|
|
|
7547
7566
|
this._context.lineTo(this._x1, this._y1);
|
|
7548
7567
|
break;
|
|
7549
7568
|
case 3:
|
|
7550
|
-
en(this, this._t0,
|
|
7569
|
+
en(this, this._t0, Vi(this, this._t0));
|
|
7551
7570
|
break;
|
|
7552
7571
|
}
|
|
7553
7572
|
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
@@ -7563,10 +7582,10 @@ Le.prototype = {
|
|
|
7563
7582
|
this._point = 2;
|
|
7564
7583
|
break;
|
|
7565
7584
|
case 2:
|
|
7566
|
-
this._point = 3, en(this,
|
|
7585
|
+
this._point = 3, en(this, Vi(this, n = Ui(this, e, t)), n);
|
|
7567
7586
|
break;
|
|
7568
7587
|
default:
|
|
7569
|
-
en(this, this._t0, n =
|
|
7588
|
+
en(this, this._t0, n = Ui(this, e, t));
|
|
7570
7589
|
break;
|
|
7571
7590
|
}
|
|
7572
7591
|
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = n;
|
|
@@ -7596,10 +7615,10 @@ ss.prototype = {
|
|
|
7596
7615
|
this._context.bezierCurveTo(t, e, i, n, s, r);
|
|
7597
7616
|
}
|
|
7598
7617
|
};
|
|
7599
|
-
function
|
|
7618
|
+
function E0(e) {
|
|
7600
7619
|
return new Le(e);
|
|
7601
7620
|
}
|
|
7602
|
-
function
|
|
7621
|
+
function F0(e) {
|
|
7603
7622
|
return new rs(e);
|
|
7604
7623
|
}
|
|
7605
7624
|
function os(e) {
|
|
@@ -7621,7 +7640,7 @@ os.prototype = {
|
|
|
7621
7640
|
if (this._line ? this._context.lineTo(e[0], t[0]) : this._context.moveTo(e[0], t[0]), n === 2)
|
|
7622
7641
|
this._context.lineTo(e[1], t[1]);
|
|
7623
7642
|
else
|
|
7624
|
-
for (var i =
|
|
7643
|
+
for (var i = Wi(e), r = Wi(t), s = 0, o = 1; o < n; ++s, ++o)
|
|
7625
7644
|
this._context.bezierCurveTo(i[0][s], r[0][s], i[1][s], r[1][s], e[o], t[o]);
|
|
7626
7645
|
(this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
|
|
7627
7646
|
},
|
|
@@ -7629,7 +7648,7 @@ os.prototype = {
|
|
|
7629
7648
|
this._x.push(+e), this._y.push(+t);
|
|
7630
7649
|
}
|
|
7631
7650
|
};
|
|
7632
|
-
function
|
|
7651
|
+
function Wi(e) {
|
|
7633
7652
|
var t, n = e.length - 1, i, r = new Array(n), s = new Array(n), o = new Array(n);
|
|
7634
7653
|
for (r[0] = 0, s[0] = 2, o[0] = e[0] + 2 * e[1], t = 1; t < n - 1; ++t)
|
|
7635
7654
|
r[t] = 1, s[t] = 4, o[t] = 4 * e[t] + 2 * e[t + 1];
|
|
@@ -7641,7 +7660,7 @@ function Yi(e) {
|
|
|
7641
7660
|
s[t] = 2 * e[t + 1] - r[t + 1];
|
|
7642
7661
|
return [r, s];
|
|
7643
7662
|
}
|
|
7644
|
-
function
|
|
7663
|
+
function R0(e) {
|
|
7645
7664
|
return new os(e);
|
|
7646
7665
|
}
|
|
7647
7666
|
function Xe(e, t) {
|
|
@@ -7680,17 +7699,17 @@ Xe.prototype = {
|
|
|
7680
7699
|
this._x = e, this._y = t;
|
|
7681
7700
|
}
|
|
7682
7701
|
};
|
|
7683
|
-
function
|
|
7702
|
+
function I0(e) {
|
|
7684
7703
|
return new Xe(e, 0.5);
|
|
7685
7704
|
}
|
|
7686
|
-
function
|
|
7705
|
+
function z0(e) {
|
|
7687
7706
|
return new Xe(e, 0);
|
|
7688
7707
|
}
|
|
7689
|
-
function
|
|
7708
|
+
function D0(e) {
|
|
7690
7709
|
return new Xe(e, 1);
|
|
7691
7710
|
}
|
|
7692
|
-
const
|
|
7693
|
-
class
|
|
7711
|
+
const O0 = 0.7, N0 = 0.9, $0 = 1;
|
|
7712
|
+
class pf extends xl {
|
|
7694
7713
|
constructor(t, n) {
|
|
7695
7714
|
super(t, n), this.options = {
|
|
7696
7715
|
...this.options,
|
|
@@ -7719,48 +7738,48 @@ class lf extends xl {
|
|
|
7719
7738
|
switch (o) {
|
|
7720
7739
|
default:
|
|
7721
7740
|
case "curveCatmullRom":
|
|
7722
|
-
s =
|
|
7741
|
+
s = k0.alpha(a || O0);
|
|
7723
7742
|
break;
|
|
7724
7743
|
case "curveLinear":
|
|
7725
7744
|
s = ts;
|
|
7726
7745
|
break;
|
|
7727
7746
|
case "curveBasis":
|
|
7728
|
-
s =
|
|
7747
|
+
s = M0;
|
|
7729
7748
|
break;
|
|
7730
7749
|
case "curveBasisClosed":
|
|
7731
|
-
s =
|
|
7750
|
+
s = A0;
|
|
7732
7751
|
break;
|
|
7733
7752
|
case "curveBundle":
|
|
7734
|
-
s =
|
|
7753
|
+
s = P0.beta(a || $0);
|
|
7735
7754
|
break;
|
|
7736
7755
|
case "curveCardinal":
|
|
7737
|
-
s =
|
|
7756
|
+
s = C0.tension(a || N0);
|
|
7738
7757
|
break;
|
|
7739
7758
|
case "curveMonotoneX":
|
|
7740
|
-
s =
|
|
7759
|
+
s = E0;
|
|
7741
7760
|
break;
|
|
7742
7761
|
case "curveMonotoneY":
|
|
7743
|
-
s =
|
|
7762
|
+
s = F0;
|
|
7744
7763
|
break;
|
|
7745
7764
|
case "curveNatural":
|
|
7746
|
-
s =
|
|
7765
|
+
s = R0;
|
|
7747
7766
|
break;
|
|
7748
7767
|
case "curveStep":
|
|
7749
|
-
s =
|
|
7768
|
+
s = I0;
|
|
7750
7769
|
break;
|
|
7751
7770
|
case "curveStepAfter":
|
|
7752
|
-
s =
|
|
7771
|
+
s = D0;
|
|
7753
7772
|
break;
|
|
7754
7773
|
case "curveStepBefore":
|
|
7755
|
-
s =
|
|
7774
|
+
s = z0;
|
|
7756
7775
|
break;
|
|
7757
7776
|
}
|
|
7758
|
-
return
|
|
7777
|
+
return S0().curve(s)(r) ?? "";
|
|
7759
7778
|
}
|
|
7760
7779
|
return "";
|
|
7761
7780
|
}
|
|
7762
7781
|
}
|
|
7763
|
-
const
|
|
7782
|
+
const Yi = (e, t) => {
|
|
7764
7783
|
switch (t.lineType) {
|
|
7765
7784
|
case "wavy":
|
|
7766
7785
|
return e.wavy(t);
|
|
@@ -7772,7 +7791,7 @@ const Wi = (e, t) => {
|
|
|
7772
7791
|
return Oe(t.lineType);
|
|
7773
7792
|
}
|
|
7774
7793
|
};
|
|
7775
|
-
class
|
|
7794
|
+
class gf extends Lt {
|
|
7776
7795
|
constructor() {
|
|
7777
7796
|
super(...arguments), this.yScale = null, this.xScale = null;
|
|
7778
7797
|
}
|
|
@@ -7812,7 +7831,7 @@ class uf extends Lt {
|
|
|
7812
7831
|
t.save(), t.strokeStyle = s, t.font = o, t.textAlign = "end", t.textBaseline = "bottom", t.fillText(n.text ?? "", i - a, r), t.restore();
|
|
7813
7832
|
}
|
|
7814
7833
|
setCtxLineStyle(t, n) {
|
|
7815
|
-
|
|
7834
|
+
Yi(
|
|
7816
7835
|
{
|
|
7817
7836
|
solid: () => {
|
|
7818
7837
|
t.setLineDash([]);
|
|
@@ -7834,7 +7853,7 @@ class uf extends Lt {
|
|
|
7834
7853
|
!this.ctx || !this.yScale || !this.xScale || requestAnimationFrame(() => {
|
|
7835
7854
|
var t;
|
|
7836
7855
|
this.clearCanvas(), (t = this.data) == null || t.forEach((n) => {
|
|
7837
|
-
|
|
7856
|
+
Yi(
|
|
7838
7857
|
{
|
|
7839
7858
|
solid: (i) => this.drawSolid(i),
|
|
7840
7859
|
dashed: (i) => this.drawDashed(i),
|
|
@@ -7846,7 +7865,7 @@ class uf extends Lt {
|
|
|
7846
7865
|
});
|
|
7847
7866
|
}
|
|
7848
7867
|
}
|
|
7849
|
-
class
|
|
7868
|
+
class B0 {
|
|
7850
7869
|
/**
|
|
7851
7870
|
* Handles layers and axis also holds a zoom and pan handler object
|
|
7852
7871
|
* @param container root container
|
|
@@ -8007,7 +8026,7 @@ class D0 {
|
|
|
8007
8026
|
this._axis && this._axis.onRescale(t), this.layers && this.layers.forEach((n) => n.isVisible === !0 ? n.onRescale(t) : {});
|
|
8008
8027
|
}
|
|
8009
8028
|
}
|
|
8010
|
-
class
|
|
8029
|
+
class H0 {
|
|
8011
8030
|
constructor(t, n) {
|
|
8012
8031
|
this.elements = {}, this.listeners = {}, this.enabled = !0;
|
|
8013
8032
|
const i = Z(n);
|
|
@@ -8085,8 +8104,8 @@ class O0 {
|
|
|
8085
8104
|
(t = this.source) == null || t.remove();
|
|
8086
8105
|
}
|
|
8087
8106
|
}
|
|
8088
|
-
const
|
|
8089
|
-
class
|
|
8107
|
+
const X0 = (e, t) => new H0(e, t);
|
|
8108
|
+
class mf {
|
|
8090
8109
|
/**
|
|
8091
8110
|
* Interface to control layers, reference system, axis and overlay. overlay is created on instantiation, does not currently support opt-out.
|
|
8092
8111
|
* @param options
|
|
@@ -8101,7 +8120,7 @@ class ff {
|
|
|
8101
8120
|
*/
|
|
8102
8121
|
constructor(t) {
|
|
8103
8122
|
const { container: n, axisOptions: i, scaleOptions: r, referenceSystem: s, layers: o, path: a } = t;
|
|
8104
|
-
this._referenceSystem = s || a && new Qt(a), this._overlay =
|
|
8123
|
+
this._referenceSystem = s || a && new Qt(a), this._overlay = X0(this, n), this.layerManager = new B0(this._overlay.elm.node(), r, i), o && (this.layerManager.addLayers(o), this.setOverlayZIndex(o));
|
|
8105
8124
|
}
|
|
8106
8125
|
/**
|
|
8107
8126
|
* Sets reference system, overrides any existing reference systems in place
|
|
@@ -8295,25 +8314,25 @@ class ff {
|
|
|
8295
8314
|
}
|
|
8296
8315
|
export {
|
|
8297
8316
|
Ro as Axis,
|
|
8298
|
-
|
|
8317
|
+
Q0 as CalloutCanvasLayer,
|
|
8299
8318
|
Lt as CanvasLayer,
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8319
|
+
mf as Controller,
|
|
8320
|
+
J0 as GeomodelCanvasLayer,
|
|
8321
|
+
hf as GeomodelLabelsLayer,
|
|
8322
|
+
lf as GeomodelLayerV2,
|
|
8304
8323
|
Je as GridLayer,
|
|
8305
|
-
|
|
8306
|
-
|
|
8324
|
+
V0 as HTMLLayer,
|
|
8325
|
+
uf as ImageLayer,
|
|
8307
8326
|
Qt as IntersectionReferenceSystem,
|
|
8308
8327
|
Ie as Layer,
|
|
8309
|
-
|
|
8328
|
+
B0 as LayerManager,
|
|
8310
8329
|
Ir as PixiLayer,
|
|
8311
|
-
|
|
8312
|
-
|
|
8330
|
+
W0 as PixiRenderApplication,
|
|
8331
|
+
gf as ReferenceLineLayer,
|
|
8313
8332
|
xl as SVGLayer,
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8333
|
+
ff as SchematicLayer,
|
|
8334
|
+
df as SeismicCanvasLayer,
|
|
8335
|
+
pf as WellborepathLayer,
|
|
8317
8336
|
fl as ZoomPanHandler,
|
|
8318
8337
|
Oe as assertNever,
|
|
8319
8338
|
wn as calcSize,
|
|
@@ -8330,32 +8349,32 @@ export {
|
|
|
8330
8349
|
bt as findSampleAtPos,
|
|
8331
8350
|
Tl as foldCompletion,
|
|
8332
8351
|
J as foldPerforationSubKind,
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8352
|
+
cf as generateProjectedTrajectory,
|
|
8353
|
+
af as generateProjectedWellborePath,
|
|
8354
|
+
sf as generateSeismicSliceImage,
|
|
8355
|
+
of as generateSurfaceData,
|
|
8356
|
+
K0 as getOverlap,
|
|
8338
8357
|
Di as getOverlapOffset,
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8358
|
+
tf as getPicksData,
|
|
8359
|
+
rf as getSeismicInfo,
|
|
8360
|
+
nf as getSeismicOptions,
|
|
8342
8361
|
Ml as hasFracLines,
|
|
8343
8362
|
Sl as hasPacking,
|
|
8344
8363
|
Al as hasSpikes,
|
|
8345
8364
|
kl as intersect,
|
|
8346
8365
|
bl as isCementPlug,
|
|
8347
8366
|
wl as isCementSqueeze,
|
|
8348
|
-
|
|
8367
|
+
j0 as isOpenHoleFracPack,
|
|
8349
8368
|
Hl as isOverlapping,
|
|
8350
|
-
|
|
8369
|
+
Z0 as isOverlappingHorizontally,
|
|
8351
8370
|
vl as isPAndASymbol,
|
|
8352
8371
|
Cl as isSubKindCasedHoleFracPack,
|
|
8353
8372
|
Ll as isSubKindCasedHoleFracturation,
|
|
8354
|
-
|
|
8373
|
+
q0 as isSubKindPerforation,
|
|
8355
8374
|
Pl as isSubkindCasedHoleGravelPack,
|
|
8356
8375
|
Bl as pixelsPerUnit,
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8376
|
+
G0 as shouldPerforationStartAtCasingDiameter,
|
|
8377
|
+
Y0 as shouldPerforationStartAtHoleDiameter,
|
|
8378
|
+
ef as transformFormationData
|
|
8360
8379
|
};
|
|
8361
8380
|
//# sourceMappingURL=index.mjs.map
|