@milaboratories/pl-model-common 1.19.6 → 1.19.7
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/drivers/pframe/linker_columns.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +158 -153
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/drivers/pframe/linker_columns.test.ts +48 -0
- package/src/drivers/pframe/linker_columns.ts +14 -7
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ var re = (e, n, t) => n in e ? te(e, n, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var b = (e, n, t) => re(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
4
|
import { z as l } from "zod";
|
|
5
5
|
import F from "canonicalize";
|
|
6
|
-
function
|
|
6
|
+
function Me(e) {
|
|
7
7
|
if (e.code !== void 0)
|
|
8
8
|
return {
|
|
9
9
|
code: e.code,
|
|
@@ -15,7 +15,7 @@ function x(e) {
|
|
|
15
15
|
if (e !== void 0)
|
|
16
16
|
return typeof e == "string" ? { __renderLambda: !0, handle: e, retentive: !1 } : e;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Be(e) {
|
|
19
19
|
if (e.v3 !== void 0) {
|
|
20
20
|
const {
|
|
21
21
|
initialArgs: n,
|
|
@@ -23,8 +23,8 @@ function Me(e) {
|
|
|
23
23
|
inputsValid: r,
|
|
24
24
|
outputs: o,
|
|
25
25
|
renderingMode: i,
|
|
26
|
-
sdkVersion:
|
|
27
|
-
featureFlags:
|
|
26
|
+
sdkVersion: s,
|
|
27
|
+
featureFlags: a,
|
|
28
28
|
sections: u,
|
|
29
29
|
title: c,
|
|
30
30
|
enrichmentTargets: d
|
|
@@ -35,48 +35,48 @@ function Me(e) {
|
|
|
35
35
|
inputsValid: r,
|
|
36
36
|
outputs: o,
|
|
37
37
|
renderingMode: i,
|
|
38
|
-
sdkVersion:
|
|
39
|
-
featureFlags:
|
|
38
|
+
sdkVersion: s,
|
|
39
|
+
featureFlags: a,
|
|
40
40
|
sections: u,
|
|
41
41
|
title: c,
|
|
42
42
|
code: f,
|
|
43
43
|
enrichmentTargets: d
|
|
44
44
|
};
|
|
45
45
|
} else if (e.inputsValid !== void 0) {
|
|
46
|
-
const { sdkVersion: n, renderingMode: t, outputs: r, inputsValid: o, sections: i, initialArgs:
|
|
47
|
-
if (n === void 0 || t === void 0 || r === void 0 || o === void 0 || i === void 0 ||
|
|
46
|
+
const { sdkVersion: n, renderingMode: t, outputs: r, inputsValid: o, sections: i, initialArgs: s, code: a } = e, u = Object.keys(e);
|
|
47
|
+
if (n === void 0 || t === void 0 || r === void 0 || o === void 0 || i === void 0 || s === void 0)
|
|
48
48
|
throw new Error(
|
|
49
49
|
`Malformed config v2. SDK version ${n}; Fields = ${u.join(", ")}`
|
|
50
50
|
);
|
|
51
51
|
return {
|
|
52
52
|
sdkVersion: n,
|
|
53
53
|
renderingMode: t,
|
|
54
|
-
initialArgs:
|
|
54
|
+
initialArgs: s,
|
|
55
55
|
outputs: Object.fromEntries(
|
|
56
56
|
Object.entries(r).map(([c, d]) => [c, x(d)])
|
|
57
57
|
),
|
|
58
58
|
inputsValid: x(o),
|
|
59
59
|
sections: x(i),
|
|
60
60
|
initialUiState: void 0,
|
|
61
|
-
code:
|
|
61
|
+
code: a
|
|
62
62
|
};
|
|
63
63
|
} else if (e.renderingMode !== void 0) {
|
|
64
|
-
const { sdkVersion: n, canRun: t, renderingMode: r, outputs: o, sections: i, initialArgs:
|
|
65
|
-
if (r === void 0 || o === void 0 || t === void 0 || i === void 0 ||
|
|
64
|
+
const { sdkVersion: n, canRun: t, renderingMode: r, outputs: o, sections: i, initialArgs: s, code: a } = e, u = Object.keys(e);
|
|
65
|
+
if (r === void 0 || o === void 0 || t === void 0 || i === void 0 || s === void 0)
|
|
66
66
|
throw new Error(
|
|
67
67
|
`Malformed config v1. SDK version ${n}; Fields = ${u.join(", ")}`
|
|
68
68
|
);
|
|
69
69
|
return {
|
|
70
70
|
sdkVersion: n ?? "unknown",
|
|
71
71
|
renderingMode: r,
|
|
72
|
-
initialArgs:
|
|
72
|
+
initialArgs: s,
|
|
73
73
|
outputs: Object.fromEntries(
|
|
74
74
|
Object.entries(o).map(([c, d]) => [c, x(d)])
|
|
75
75
|
),
|
|
76
76
|
inputsValid: x(t),
|
|
77
77
|
sections: x(i),
|
|
78
78
|
initialUiState: void 0,
|
|
79
|
-
code:
|
|
79
|
+
code: a
|
|
80
80
|
};
|
|
81
81
|
} else {
|
|
82
82
|
const { sdkVersion: n } = e, t = Object.keys(e);
|
|
@@ -105,10 +105,10 @@ function He(e, n) {
|
|
|
105
105
|
if (e.from < 0 || e.to < 0 || e.from >= e.to)
|
|
106
106
|
throw new Error(`${n}: invalid bytes range: ${e}`);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function _e(e) {
|
|
109
109
|
return e !== void 0 && e.startsWith("log+live://log/");
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function S(e) {
|
|
112
112
|
throw new Error("Unexpected object: " + e);
|
|
113
113
|
}
|
|
114
114
|
const K = "upload://upload/", V = "index://index/";
|
|
@@ -126,12 +126,12 @@ function ae(e) {
|
|
|
126
126
|
const n = e.slice(K.length);
|
|
127
127
|
return JSON.parse(decodeURIComponent(n)).localPath;
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
S(e);
|
|
130
130
|
}
|
|
131
131
|
function se(e) {
|
|
132
132
|
return e.replace(/^.*[\\/]/, "");
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Ge(e) {
|
|
135
135
|
return se(ae(e));
|
|
136
136
|
}
|
|
137
137
|
function Qe(e) {
|
|
@@ -263,7 +263,7 @@ function en(e) {
|
|
|
263
263
|
parts: Object.entries(e.parts).map(([n, t]) => ({ key: JSON.parse(n), value: t }))
|
|
264
264
|
};
|
|
265
265
|
default:
|
|
266
|
-
|
|
266
|
+
S(e);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
function nn(e) {
|
|
@@ -301,7 +301,7 @@ function nn(e) {
|
|
|
301
301
|
)
|
|
302
302
|
};
|
|
303
303
|
default:
|
|
304
|
-
|
|
304
|
+
S(e);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
function tn(e, n) {
|
|
@@ -395,8 +395,8 @@ function J(e) {
|
|
|
395
395
|
const n = e.cause ? J(e.cause) : void 0, t = new Error(e.message, n !== void 0 ? { cause: n } : void 0);
|
|
396
396
|
return t.name = e.name || "Error", t.stack = e.stack, t;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
const n = C(e), t = n.cause ?
|
|
398
|
+
function M(e) {
|
|
399
|
+
const n = C(e), t = n.cause ? M(n.cause) : void 0;
|
|
400
400
|
return {
|
|
401
401
|
name: n.name,
|
|
402
402
|
message: n.message,
|
|
@@ -409,8 +409,8 @@ function dn(e) {
|
|
|
409
409
|
throw e.error instanceof Error ? e.error : J(e.error);
|
|
410
410
|
return e.value;
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
return e.error ? { error:
|
|
412
|
+
function B(e) {
|
|
413
|
+
return e.error ? { error: M(e.error) } : { value: e.value };
|
|
414
414
|
}
|
|
415
415
|
function fn(e) {
|
|
416
416
|
return e.error ? { error: J(e.error) } : { value: e.value };
|
|
@@ -431,11 +431,11 @@ async function pe(e) {
|
|
|
431
431
|
}
|
|
432
432
|
function pn(e) {
|
|
433
433
|
const n = fe(e);
|
|
434
|
-
return
|
|
434
|
+
return B(n);
|
|
435
435
|
}
|
|
436
436
|
async function mn(e) {
|
|
437
437
|
const n = await pe(e);
|
|
438
|
-
return
|
|
438
|
+
return B(n);
|
|
439
439
|
}
|
|
440
440
|
function hn(e) {
|
|
441
441
|
return JSON.stringify(e);
|
|
@@ -462,11 +462,11 @@ function j(e, n, t, r = "readMetadataJsonOrThrow") {
|
|
|
462
462
|
if (o === void 0) return;
|
|
463
463
|
const i = n[t];
|
|
464
464
|
try {
|
|
465
|
-
const
|
|
466
|
-
return i.parse(
|
|
467
|
-
} catch (
|
|
465
|
+
const s = JSON.parse(o);
|
|
466
|
+
return i.parse(s);
|
|
467
|
+
} catch (s) {
|
|
468
468
|
throw new Error(
|
|
469
|
-
`${r} failed, key: ${String(t)}, value: ${o}, error: ${C(
|
|
469
|
+
`${r} failed, key: ${String(t)}, value: ${o}, error: ${C(s)}`
|
|
470
470
|
);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
@@ -487,7 +487,7 @@ function gn(e, n) {
|
|
|
487
487
|
function bn(e, n) {
|
|
488
488
|
return j(e == null ? void 0 : e.domain, q, n, "readDomainJsonOrThrow");
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function wn(e, n) {
|
|
491
491
|
return U(e == null ? void 0 : e.domain, q, n);
|
|
492
492
|
}
|
|
493
493
|
const y = {
|
|
@@ -534,7 +534,7 @@ const y = {
|
|
|
534
534
|
[y.Table.OrderPriority]: l.number(),
|
|
535
535
|
[y.Trace]: l.record(l.string(), l.unknown())
|
|
536
536
|
};
|
|
537
|
-
function
|
|
537
|
+
function An(e, n) {
|
|
538
538
|
return I(e == null ? void 0 : e.annotations, n);
|
|
539
539
|
}
|
|
540
540
|
function vn(e, n) {
|
|
@@ -546,7 +546,7 @@ function z(e, n) {
|
|
|
546
546
|
function O(e) {
|
|
547
547
|
return { axis: e, children: [] };
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function k(e) {
|
|
550
550
|
const n = O(e);
|
|
551
551
|
let t = [n];
|
|
552
552
|
for (; t.length; ) {
|
|
@@ -569,7 +569,7 @@ function xn(e) {
|
|
|
569
569
|
}
|
|
570
570
|
return n;
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function P(e) {
|
|
573
573
|
const n = [e.axis];
|
|
574
574
|
let t = [e];
|
|
575
575
|
for (; t.length; ) {
|
|
@@ -582,7 +582,7 @@ function S(e) {
|
|
|
582
582
|
return n;
|
|
583
583
|
}
|
|
584
584
|
function D(e) {
|
|
585
|
-
return m(
|
|
585
|
+
return m(P(k(e)).map(p));
|
|
586
586
|
}
|
|
587
587
|
function ye(e, n) {
|
|
588
588
|
if (e.name !== n.name)
|
|
@@ -595,8 +595,8 @@ function ye(e, n) {
|
|
|
595
595
|
const o = D(e), i = D(n);
|
|
596
596
|
if (o !== i)
|
|
597
597
|
return o < i ? 1 : -1;
|
|
598
|
-
const
|
|
599
|
-
return
|
|
598
|
+
const s = m(e.annotations ?? {}), a = m(n.annotations ?? {});
|
|
599
|
+
return s !== a ? s < a ? 1 : -1 : 0;
|
|
600
600
|
}
|
|
601
601
|
function ge(e) {
|
|
602
602
|
const n = z(e, y.Parents);
|
|
@@ -610,12 +610,12 @@ function be(e) {
|
|
|
610
610
|
const r = new Set(m(p(e)));
|
|
611
611
|
for (; t.length; ) {
|
|
612
612
|
const o = [], i = /* @__PURE__ */ new Set();
|
|
613
|
-
for (const
|
|
614
|
-
|
|
615
|
-
for (const
|
|
616
|
-
const u = m(p(
|
|
613
|
+
for (const s of t) {
|
|
614
|
+
s.children = s.axis.parentAxesSpec.map(O);
|
|
615
|
+
for (const a of s.children) {
|
|
616
|
+
const u = m(p(a.axis));
|
|
617
617
|
if (!i.has(u)) {
|
|
618
|
-
if (o.push(
|
|
618
|
+
if (o.push(a), i.add(u), r.has(u))
|
|
619
619
|
return !0;
|
|
620
620
|
r.add(u);
|
|
621
621
|
}
|
|
@@ -625,7 +625,7 @@ function be(e) {
|
|
|
625
625
|
}
|
|
626
626
|
return !1;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function _(e) {
|
|
629
629
|
if (!e.length)
|
|
630
630
|
return [];
|
|
631
631
|
const n = e.map((t) => {
|
|
@@ -635,7 +635,7 @@ function G(e) {
|
|
|
635
635
|
return e.forEach((t, r) => {
|
|
636
636
|
var i;
|
|
637
637
|
const o = n[r];
|
|
638
|
-
t.parentAxes ? o.parentAxesSpec = t.parentAxes.map((
|
|
638
|
+
t.parentAxes ? o.parentAxesSpec = t.parentAxes.map((s) => n[s]) : (o.parentAxesSpec = _(ge(t)), (i = o.annotations) == null || delete i[y.Parents]);
|
|
639
639
|
}), n.some(be) ? n.forEach((t) => {
|
|
640
640
|
t.parentAxesSpec = [];
|
|
641
641
|
}) : n.forEach((t) => {
|
|
@@ -645,8 +645,8 @@ function G(e) {
|
|
|
645
645
|
function kn(e) {
|
|
646
646
|
const n = e.map((t) => m(p(t)));
|
|
647
647
|
return e.map((t) => {
|
|
648
|
-
const o = t.parentAxesSpec.map((
|
|
649
|
-
return o.length ? { ...
|
|
648
|
+
const o = t.parentAxesSpec.map((a) => m(p(a))).map((a) => n.indexOf(a)), { parentAxesSpec: i, ...s } = t;
|
|
649
|
+
return o.length ? { ...s, parentAxes: o } : s;
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
652
|
const Pn = {
|
|
@@ -662,7 +662,7 @@ function Sn(e) {
|
|
|
662
662
|
name: e.name,
|
|
663
663
|
domain: e.domain,
|
|
664
664
|
parentAxes: e.parentAxes,
|
|
665
|
-
axesId:
|
|
665
|
+
axesId: G(e.axesSpec)
|
|
666
666
|
};
|
|
667
667
|
}
|
|
668
668
|
function En(e) {
|
|
@@ -675,21 +675,21 @@ function p(e) {
|
|
|
675
675
|
const { type: n, name: t, domain: r } = e, o = { type: n, name: t };
|
|
676
676
|
return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function G(e) {
|
|
679
679
|
return e.map(p);
|
|
680
680
|
}
|
|
681
681
|
function On(e) {
|
|
682
682
|
return m(p(e));
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function we(e, n) {
|
|
685
685
|
if (e === void 0) return n === void 0;
|
|
686
686
|
if (n === void 0) return !0;
|
|
687
687
|
for (const t in n)
|
|
688
688
|
if (e[t] !== n[t]) return !1;
|
|
689
689
|
return !0;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
return e.name === n.name &&
|
|
691
|
+
function Ae(e, n) {
|
|
692
|
+
return e.name === n.name && we(e.domain, n.domain);
|
|
693
693
|
}
|
|
694
694
|
function Q(e, n) {
|
|
695
695
|
const t = Math.floor(n / 8), r = 1 << 7 - n % 8;
|
|
@@ -791,7 +791,7 @@ function E(e, n) {
|
|
|
791
791
|
secondary: e.secondary.map((t) => E(t, n))
|
|
792
792
|
};
|
|
793
793
|
default:
|
|
794
|
-
|
|
794
|
+
S(e);
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
797
|
function jn(e) {
|
|
@@ -842,14 +842,14 @@ class Nn {
|
|
|
842
842
|
t.sort((r, o) => r[0].localeCompare(o[0]));
|
|
843
843
|
for (const [r, o] of t) {
|
|
844
844
|
for (let i = 0; i < o.axesSpec.length; i++) {
|
|
845
|
-
const
|
|
846
|
-
this.axes.set(
|
|
845
|
+
const s = o.axesSpec[i], a = N(s);
|
|
846
|
+
this.axes.set(a, { anchor: r, idx: i });
|
|
847
847
|
}
|
|
848
848
|
if (o.domain !== void 0) {
|
|
849
849
|
const i = Object.entries(o.domain);
|
|
850
|
-
i.sort((
|
|
851
|
-
for (const [
|
|
852
|
-
const u = R(
|
|
850
|
+
i.sort((s, a) => s[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([s]) => s));
|
|
851
|
+
for (const [s, a] of i) {
|
|
852
|
+
const u = R(s, a);
|
|
853
853
|
this.domains.set(u, r);
|
|
854
854
|
}
|
|
855
855
|
}
|
|
@@ -866,47 +866,47 @@ class Nn {
|
|
|
866
866
|
let o;
|
|
867
867
|
if (n.domain !== void 0)
|
|
868
868
|
e:
|
|
869
|
-
for (const
|
|
870
|
-
const
|
|
871
|
-
for (const c of
|
|
869
|
+
for (const s of this.domainPacks) {
|
|
870
|
+
const a = [];
|
|
871
|
+
for (const c of s) {
|
|
872
872
|
const d = n.domain[c];
|
|
873
873
|
if (d !== void 0)
|
|
874
|
-
|
|
874
|
+
a.push([c, d]);
|
|
875
875
|
else
|
|
876
876
|
break e;
|
|
877
877
|
}
|
|
878
|
-
const u = this.domainPackToAnchor.get(JSON.stringify(
|
|
878
|
+
const u = this.domainPackToAnchor.get(JSON.stringify(a));
|
|
879
879
|
if (u !== void 0) {
|
|
880
|
-
r.domainAnchor = u, o = new Set(
|
|
880
|
+
r.domainAnchor = u, o = new Set(s);
|
|
881
881
|
break;
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
for (const [
|
|
885
|
-
if (o !== void 0 && o.has(
|
|
884
|
+
for (const [s, a] of Object.entries(n.domain ?? {})) {
|
|
885
|
+
if (o !== void 0 && o.has(s))
|
|
886
886
|
continue;
|
|
887
|
-
const u = R(
|
|
888
|
-
r.domain ?? (r.domain = {}), r.domain[
|
|
887
|
+
const u = R(s, a), c = this.domains.get(u);
|
|
888
|
+
r.domain ?? (r.domain = {}), r.domain[s] = c ? { anchor: c } : a;
|
|
889
889
|
}
|
|
890
|
-
if (r.axes = n.axesSpec.map((
|
|
891
|
-
const
|
|
892
|
-
return u === void 0 ? p(
|
|
890
|
+
if (r.axes = n.axesSpec.map((s) => {
|
|
891
|
+
const a = N(s), u = this.axes.get(a);
|
|
892
|
+
return u === void 0 ? p(s) : u;
|
|
893
893
|
}), !t || t.length === 0)
|
|
894
894
|
return r;
|
|
895
895
|
const i = [];
|
|
896
|
-
for (const
|
|
897
|
-
const [
|
|
898
|
-
if (typeof
|
|
899
|
-
if (
|
|
900
|
-
throw new Error(`Axis index ${
|
|
901
|
-
i.push([
|
|
896
|
+
for (const s of t) {
|
|
897
|
+
const [a, u] = s;
|
|
898
|
+
if (typeof a == "number") {
|
|
899
|
+
if (a < 0 || a >= n.axesSpec.length)
|
|
900
|
+
throw new Error(`Axis index ${a} is out of bounds (0-${n.axesSpec.length - 1})`);
|
|
901
|
+
i.push([a, u]);
|
|
902
902
|
} else {
|
|
903
|
-
const c = n.axesSpec.findIndex((d) => d.name ===
|
|
903
|
+
const c = n.axesSpec.findIndex((d) => d.name === a);
|
|
904
904
|
if (c === -1)
|
|
905
|
-
throw new Error(`Axis with name "${
|
|
905
|
+
throw new Error(`Axis with name "${a}" not found in the column specification`);
|
|
906
906
|
i.push([c, u]);
|
|
907
907
|
}
|
|
908
908
|
}
|
|
909
|
-
return i.sort((
|
|
909
|
+
return i.sort((s, a) => s[0] - a[0]), {
|
|
910
910
|
source: r,
|
|
911
911
|
axisFilters: i
|
|
912
912
|
};
|
|
@@ -927,24 +927,24 @@ function Rn(e, n, t) {
|
|
|
927
927
|
const i = e[r.domainAnchor];
|
|
928
928
|
if (!i)
|
|
929
929
|
throw new Error(`Anchor "${r.domainAnchor}" not found`);
|
|
930
|
-
const
|
|
931
|
-
r.domain = { ...
|
|
930
|
+
const s = i.domain || {};
|
|
931
|
+
r.domain = { ...s, ...r.domain }, delete r.domainAnchor;
|
|
932
932
|
}
|
|
933
933
|
if (r.domain) {
|
|
934
934
|
const i = {};
|
|
935
|
-
for (const [
|
|
936
|
-
if (typeof
|
|
937
|
-
i[
|
|
935
|
+
for (const [s, a] of Object.entries(r.domain))
|
|
936
|
+
if (typeof a == "string")
|
|
937
|
+
i[s] = a;
|
|
938
938
|
else {
|
|
939
|
-
const u = e[
|
|
939
|
+
const u = e[a.anchor];
|
|
940
940
|
if (!u)
|
|
941
|
-
throw new Error(`Anchor "${
|
|
942
|
-
if (!u.domain || u.domain[
|
|
941
|
+
throw new Error(`Anchor "${a.anchor}" not found for domain key "${s}"`);
|
|
942
|
+
if (!u.domain || u.domain[s] === void 0) {
|
|
943
943
|
if (!o)
|
|
944
|
-
throw new Error(`Domain key "${
|
|
944
|
+
throw new Error(`Domain key "${s}" not found in anchor "${a.anchor}"`);
|
|
945
945
|
continue;
|
|
946
946
|
}
|
|
947
|
-
i[
|
|
947
|
+
i[s] = u.domain[s];
|
|
948
948
|
}
|
|
949
949
|
r.domain = i;
|
|
950
950
|
}
|
|
@@ -968,7 +968,7 @@ function Ee(e, n) {
|
|
|
968
968
|
throw new Error(`Axis with name "${n.name}" not found in anchor "${t}"`);
|
|
969
969
|
return o[0];
|
|
970
970
|
} else if ("id" in n) {
|
|
971
|
-
const o = r.axesSpec.filter((i) =>
|
|
971
|
+
const o = r.axesSpec.filter((i) => Ae(n.id, p(i)));
|
|
972
972
|
if (o.length > 1)
|
|
973
973
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
974
974
|
if (o.length === 0)
|
|
@@ -999,13 +999,13 @@ function Vn(e) {
|
|
|
999
999
|
if (!Fe(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
|
|
1000
1000
|
return e;
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function Mn(e, n) {
|
|
1003
1003
|
return e === void 0 ? void 0 : {
|
|
1004
1004
|
...e,
|
|
1005
1005
|
data: n(e.data)
|
|
1006
1006
|
};
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function Bn(e) {
|
|
1009
1009
|
const n = /* @__PURE__ */ new Map(), t = (r) => {
|
|
1010
1010
|
switch (r.type) {
|
|
1011
1011
|
case "column":
|
|
@@ -1025,7 +1025,7 @@ function Mn(e) {
|
|
|
1025
1025
|
for (const o of r.secondary) t(o);
|
|
1026
1026
|
return;
|
|
1027
1027
|
default:
|
|
1028
|
-
|
|
1028
|
+
S(r);
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
1031
|
return t(e), [...n.values()];
|
|
@@ -1137,7 +1137,7 @@ function qn(e) {
|
|
|
1137
1137
|
kind: e.kind,
|
|
1138
1138
|
name: e.name
|
|
1139
1139
|
};
|
|
1140
|
-
return e.domain !== void 0 && (n.domain = e.domain), w(e) && (n.axesSpec =
|
|
1140
|
+
return e.domain !== void 0 && (n.domain = e.domain), w(e) && (n.axesSpec = G(e.axesSpec)), F(n);
|
|
1141
1141
|
}
|
|
1142
1142
|
class A {
|
|
1143
1143
|
constructor(n) {
|
|
@@ -1154,15 +1154,15 @@ class A {
|
|
|
1154
1154
|
static fromColumns(n) {
|
|
1155
1155
|
var r, o;
|
|
1156
1156
|
const t = /* @__PURE__ */ new Map();
|
|
1157
|
-
for (const i of n.filter((
|
|
1158
|
-
const
|
|
1159
|
-
if (
|
|
1157
|
+
for (const i of n.filter((s) => !!z(s.spec, y.IsLinkerColumn))) {
|
|
1158
|
+
const s = A.getAxesGroups(_(i.spec.axesSpec));
|
|
1159
|
+
if (s.length !== 2)
|
|
1160
1160
|
continue;
|
|
1161
|
-
const [
|
|
1162
|
-
const h =
|
|
1161
|
+
const [a, u] = s, c = A.getAxesRoots(a).map((f) => {
|
|
1162
|
+
const h = P(k(f));
|
|
1163
1163
|
return [m(h.map(p)), h];
|
|
1164
1164
|
}), d = A.getAxesRoots(u).map((f) => {
|
|
1165
|
-
const h =
|
|
1165
|
+
const h = P(k(f));
|
|
1166
1166
|
return [m(h.map(p)), h];
|
|
1167
1167
|
});
|
|
1168
1168
|
for (const [f, h] of c)
|
|
@@ -1181,10 +1181,10 @@ class A {
|
|
|
1181
1181
|
let o = n;
|
|
1182
1182
|
for (; o.length; ) {
|
|
1183
1183
|
const i = [];
|
|
1184
|
-
for (const
|
|
1185
|
-
const
|
|
1186
|
-
if (
|
|
1187
|
-
for (const u of
|
|
1184
|
+
for (const s of o) {
|
|
1185
|
+
const a = this.data.get(s);
|
|
1186
|
+
if (a)
|
|
1187
|
+
for (const u of a.linkWith.keys())
|
|
1188
1188
|
!r.has(u) && !t.has(u) && (i.push(u), r.add(u));
|
|
1189
1189
|
}
|
|
1190
1190
|
o = i;
|
|
@@ -1197,20 +1197,20 @@ class A {
|
|
|
1197
1197
|
let o = /* @__PURE__ */ new Set([n]);
|
|
1198
1198
|
const i = /* @__PURE__ */ new Set([n]);
|
|
1199
1199
|
for (; o.size; ) {
|
|
1200
|
-
const
|
|
1201
|
-
for (const
|
|
1202
|
-
const u = this.data.get(
|
|
1200
|
+
const s = /* @__PURE__ */ new Set();
|
|
1201
|
+
for (const a of o) {
|
|
1202
|
+
const u = this.data.get(a);
|
|
1203
1203
|
if (u)
|
|
1204
1204
|
for (const c of u.linkWith.keys())
|
|
1205
|
-
if (r[c] =
|
|
1205
|
+
if (r[c] = a, c === t) {
|
|
1206
1206
|
const d = [];
|
|
1207
1207
|
let f = t;
|
|
1208
1208
|
for (; r[f] !== n; )
|
|
1209
1209
|
d.push(f), f = r[f];
|
|
1210
1210
|
return d.push(f), d.map((h) => this.data.get(h).linkWith.get(r[h]));
|
|
1211
|
-
} else i.has(c) || (
|
|
1211
|
+
} else i.has(c) || (s.add(c), i.add(c));
|
|
1212
1212
|
}
|
|
1213
|
-
o =
|
|
1213
|
+
o = s;
|
|
1214
1214
|
}
|
|
1215
1215
|
return [];
|
|
1216
1216
|
}
|
|
@@ -1223,13 +1223,13 @@ class A {
|
|
|
1223
1223
|
return Array.from(
|
|
1224
1224
|
new Map(
|
|
1225
1225
|
A.getAxesRoots(t).map(A.getLinkerKeyFromAxisSpec).flatMap((i) => {
|
|
1226
|
-
const
|
|
1227
|
-
(
|
|
1226
|
+
const s = o.map((a) => this.searchLinkerPath(a, i)).reduce(
|
|
1227
|
+
(a, u) => a.length && a.length < u.length || !u.length ? a : u,
|
|
1228
1228
|
[]
|
|
1229
|
-
).map((
|
|
1230
|
-
if (!
|
|
1229
|
+
).map((a) => [a.columnId, a]);
|
|
1230
|
+
if (!s.length && r)
|
|
1231
1231
|
throw Error(`Unable to find linker column for ${i}`);
|
|
1232
|
-
return
|
|
1232
|
+
return s;
|
|
1233
1233
|
})
|
|
1234
1234
|
).values()
|
|
1235
1235
|
);
|
|
@@ -1247,10 +1247,15 @@ class A {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
/** Get axes of target axes that are impossible to be linked to source axes with current linker map */
|
|
1249
1249
|
getNonLinkableAxes(n, t) {
|
|
1250
|
-
const r = n.map(A.getLinkerKeyFromAxisSpec), o =
|
|
1251
|
-
|
|
1250
|
+
const r = n.map(A.getLinkerKeyFromAxisSpec), o = t.map(A.getLinkerKeyFromAxisSpec);
|
|
1251
|
+
return Array.from(
|
|
1252
|
+
new Map(
|
|
1253
|
+
t.filter((s, a) => {
|
|
1254
|
+
const u = o[a];
|
|
1255
|
+
return !r.some((c) => this.searchLinkerPath(c, u).length);
|
|
1256
|
+
}).flatMap((s) => P(k(s)).map((a) => [m(p(a)), a]))
|
|
1257
|
+
).values()
|
|
1252
1258
|
);
|
|
1253
|
-
return this.getAxesListFromKeysList(o);
|
|
1254
1259
|
}
|
|
1255
1260
|
/** Get all axes that can be connected to sourceAxes by linkers */
|
|
1256
1261
|
getReachableByLinkersAxesFromAxes(n) {
|
|
@@ -1258,7 +1263,7 @@ class A {
|
|
|
1258
1263
|
return this.getAxesListFromKeysList([...r]);
|
|
1259
1264
|
}
|
|
1260
1265
|
static getLinkerKeyFromAxisSpec(n) {
|
|
1261
|
-
return m(
|
|
1266
|
+
return m(P(k(n)).map(p));
|
|
1262
1267
|
}
|
|
1263
1268
|
/** Split array of axes into several arrays by parents: axes of one group are parents for each other.
|
|
1264
1269
|
There are no order inside every group. */
|
|
@@ -1278,25 +1283,25 @@ class A {
|
|
|
1278
1283
|
return d;
|
|
1279
1284
|
})
|
|
1280
1285
|
)
|
|
1281
|
-
), o = [...n.keys()], i = [],
|
|
1282
|
-
let
|
|
1283
|
-
for (;
|
|
1284
|
-
const u = [
|
|
1285
|
-
|
|
1286
|
-
let c = [
|
|
1286
|
+
), o = [...n.keys()], i = [], s = /* @__PURE__ */ new Set();
|
|
1287
|
+
let a = o.find((u) => !s.has(u));
|
|
1288
|
+
for (; a !== void 0; ) {
|
|
1289
|
+
const u = [a];
|
|
1290
|
+
s.add(a);
|
|
1291
|
+
let c = [a];
|
|
1287
1292
|
for (; c.length; ) {
|
|
1288
1293
|
const d = /* @__PURE__ */ new Set();
|
|
1289
1294
|
for (const f of c) {
|
|
1290
1295
|
const h = r[f];
|
|
1291
1296
|
o.forEach((v) => {
|
|
1292
|
-
if (v === f ||
|
|
1297
|
+
if (v === f || s.has(v))
|
|
1293
1298
|
return;
|
|
1294
|
-
(r[v].has(f) || h.has(v)) && (u.push(v), d.add(v),
|
|
1299
|
+
(r[v].has(f) || h.has(v)) && (u.push(v), d.add(v), s.add(v));
|
|
1295
1300
|
});
|
|
1296
1301
|
}
|
|
1297
1302
|
c = [...d];
|
|
1298
1303
|
}
|
|
1299
|
-
i.push([...u]),
|
|
1304
|
+
i.push([...u]), a = o.find((d) => !s.has(d));
|
|
1300
1305
|
}
|
|
1301
1306
|
return i.map((u) => u.map((c) => n[c]));
|
|
1302
1307
|
}
|
|
@@ -1317,7 +1322,7 @@ const Wn = { href: "/" }, zn = l.object({
|
|
|
1317
1322
|
function Hn(e) {
|
|
1318
1323
|
return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === !0 && "blockId" in e && "name" in e;
|
|
1319
1324
|
}
|
|
1320
|
-
function
|
|
1325
|
+
function _n(e, n, t = !1) {
|
|
1321
1326
|
return t ? {
|
|
1322
1327
|
__isRef: !0,
|
|
1323
1328
|
blockId: e,
|
|
@@ -1329,7 +1334,7 @@ function Gn(e, n, t = !1) {
|
|
|
1329
1334
|
name: n
|
|
1330
1335
|
};
|
|
1331
1336
|
}
|
|
1332
|
-
function
|
|
1337
|
+
function Gn(e, n = !0) {
|
|
1333
1338
|
if (n)
|
|
1334
1339
|
return {
|
|
1335
1340
|
...e,
|
|
@@ -1372,12 +1377,12 @@ function Z(e, n, t) {
|
|
|
1372
1377
|
default:
|
|
1373
1378
|
throw new Error("Unknown base32 variant: " + String(n));
|
|
1374
1379
|
}
|
|
1375
|
-
const i = t.padding !== void 0 ? t.padding : o,
|
|
1376
|
-
let
|
|
1377
|
-
for (let d = 0; d <
|
|
1378
|
-
for (u = u << 8 |
|
|
1379
|
-
c += r[u >>>
|
|
1380
|
-
if (
|
|
1380
|
+
const i = t.padding !== void 0 ? t.padding : o, s = Le(e);
|
|
1381
|
+
let a = 0, u = 0, c = "";
|
|
1382
|
+
for (let d = 0; d < s.byteLength; d++)
|
|
1383
|
+
for (u = u << 8 | s.getUint8(d), a += 8; a >= 5; )
|
|
1384
|
+
c += r[u >>> a - 5 & 31], a -= 5;
|
|
1385
|
+
if (a > 0 && (c += r[u << 5 - a & 31]), i)
|
|
1381
1386
|
for (; c.length % 8 !== 0; )
|
|
1382
1387
|
c += "=";
|
|
1383
1388
|
return c;
|
|
@@ -1489,7 +1494,7 @@ export {
|
|
|
1489
1494
|
D as canonicalizeAxisWithParents,
|
|
1490
1495
|
m as canonicalizeJson,
|
|
1491
1496
|
tt as checkBlockFlag,
|
|
1492
|
-
|
|
1497
|
+
_n as createPlRef,
|
|
1493
1498
|
en as dataInfoToEntries,
|
|
1494
1499
|
qn as deriveNativeId,
|
|
1495
1500
|
J as deserializeError,
|
|
@@ -1499,20 +1504,20 @@ export {
|
|
|
1499
1504
|
Vn as ensurePColumn,
|
|
1500
1505
|
nn as entriesToDataInfo,
|
|
1501
1506
|
L as executePSpecPredicate,
|
|
1502
|
-
|
|
1507
|
+
Bn as extractAllColumns,
|
|
1503
1508
|
rt as extractAllRequirements,
|
|
1504
1509
|
ot as extractAllSupports,
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
+
Me as extractCodeWithInfo,
|
|
1511
|
+
Be as extractConfigGeneric,
|
|
1512
|
+
P as getArrayFromAxisTree,
|
|
1513
|
+
G as getAxesId,
|
|
1514
|
+
k as getAxesTree,
|
|
1510
1515
|
p as getAxisId,
|
|
1511
1516
|
En as getColumnIdAndSpec,
|
|
1512
1517
|
kn as getDenormalizedAxesList,
|
|
1513
|
-
|
|
1518
|
+
Ge as getFileNameFromHandle,
|
|
1514
1519
|
ae as getFilePathFromHandle,
|
|
1515
|
-
|
|
1520
|
+
_ as getNormalizedAxesList,
|
|
1516
1521
|
Sn as getPColumnSpecId,
|
|
1517
1522
|
jn as getPTableColumnId,
|
|
1518
1523
|
xn as getSetFromAxisTree,
|
|
@@ -1526,7 +1531,7 @@ export {
|
|
|
1526
1531
|
Ue as isFolderURL,
|
|
1527
1532
|
ie as isImportFileHandleIndex,
|
|
1528
1533
|
oe as isImportFileHandleUpload,
|
|
1529
|
-
|
|
1534
|
+
_e as isLiveLog,
|
|
1530
1535
|
Fe as isPColumn,
|
|
1531
1536
|
Kn as isPColumnResult,
|
|
1532
1537
|
w as isPColumnSpec,
|
|
@@ -1541,11 +1546,11 @@ export {
|
|
|
1541
1546
|
Xe as mapDataInfo,
|
|
1542
1547
|
tn as mapDataInfoEntries,
|
|
1543
1548
|
E as mapJoinEntry,
|
|
1544
|
-
|
|
1549
|
+
Mn as mapPObjectData,
|
|
1545
1550
|
In as mapPTableDef,
|
|
1546
1551
|
Xn as mapValueInVOE,
|
|
1547
1552
|
T as matchAxis,
|
|
1548
|
-
|
|
1553
|
+
Ae as matchAxisId,
|
|
1549
1554
|
$ as matchPColumn,
|
|
1550
1555
|
ze as newRangeBytesOpt,
|
|
1551
1556
|
Ln as pTableValue,
|
|
@@ -1554,26 +1559,26 @@ export {
|
|
|
1554
1559
|
me as parseJson,
|
|
1555
1560
|
Ne as plId,
|
|
1556
1561
|
Qn as plRefsEqual,
|
|
1557
|
-
|
|
1562
|
+
An as readAnnotation,
|
|
1558
1563
|
z as readAnnotationJson,
|
|
1559
1564
|
vn as readAnnotationJsonOrThrow,
|
|
1560
1565
|
gn as readDomain,
|
|
1561
|
-
|
|
1566
|
+
wn as readDomainJson,
|
|
1562
1567
|
bn as readDomainJsonOrThrow,
|
|
1563
1568
|
I as readMetadata,
|
|
1564
1569
|
U as readMetadataJson,
|
|
1565
1570
|
j as readMetadataJsonOrThrow,
|
|
1566
1571
|
Rn as resolveAnchors,
|
|
1567
1572
|
Un as selectorsToPredicate,
|
|
1568
|
-
|
|
1569
|
-
|
|
1573
|
+
M as serializeError,
|
|
1574
|
+
B as serializeResult,
|
|
1570
1575
|
Se as stringifyColumnId,
|
|
1571
1576
|
hn as stringifyJson,
|
|
1572
1577
|
Yn as uniquePlId,
|
|
1573
1578
|
dn as unwrapResult,
|
|
1574
1579
|
He as validateRangeBytes,
|
|
1575
1580
|
Ye as visitDataInfo,
|
|
1576
|
-
|
|
1581
|
+
Gn as withEnrichments,
|
|
1577
1582
|
pn as wrapAndSerialize,
|
|
1578
1583
|
mn as wrapAndSerializeAsync,
|
|
1579
1584
|
pe as wrapAsyncCallback,
|