@milaboratories/graph-maker 1.1.134 → 1.1.135
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/node_modules/@milaboratories/pf-plots/dist/index.js +1348 -1163
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/pl-model-common/dist/index.js +212 -208
- package/dist/node_modules/@milaboratories/pl-model-common/dist/index.js.map +1 -1
- package/dist/node_modules/@platforma-sdk/model/dist/index.js +242 -241
- package/dist/node_modules/@platforma-sdk/model/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,214 +1,214 @@
|
|
|
1
1
|
import u from "../../../zod/lib/index.js";
|
|
2
|
-
import
|
|
3
|
-
var k = Object.defineProperty, P = (
|
|
2
|
+
import l from "../../../canonicalize/lib/canonicalize.js";
|
|
3
|
+
var k = Object.defineProperty, P = (e, t, n) => t in e ? k(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, p = (e, t, n) => P(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
u.object({
|
|
5
5
|
/** Included left border. */
|
|
6
6
|
from: u.number(),
|
|
7
7
|
/** Excluded right border. */
|
|
8
8
|
to: u.number()
|
|
9
9
|
});
|
|
10
|
-
function w(
|
|
11
|
-
throw new Error("Unexpected object: " +
|
|
10
|
+
function w(e) {
|
|
11
|
+
throw new Error("Unexpected object: " + e);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
if (!
|
|
13
|
+
function K(e) {
|
|
14
|
+
if (!e || typeof e != "object")
|
|
15
15
|
return !1;
|
|
16
|
-
const
|
|
17
|
-
if (!("type" in
|
|
16
|
+
const t = e;
|
|
17
|
+
if (!("type" in t))
|
|
18
18
|
return !1;
|
|
19
|
-
switch (
|
|
19
|
+
switch (t.type) {
|
|
20
20
|
case "Json":
|
|
21
|
-
return typeof
|
|
21
|
+
return typeof t.keyLength == "number" && t.data !== void 0 && typeof t.data == "object";
|
|
22
22
|
case "JsonPartitioned":
|
|
23
|
-
return typeof
|
|
23
|
+
return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
|
|
24
24
|
case "BinaryPartitioned":
|
|
25
|
-
return typeof
|
|
25
|
+
return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
|
|
26
26
|
default:
|
|
27
27
|
return !1;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function T(
|
|
31
|
-
if (
|
|
32
|
-
switch (
|
|
30
|
+
function T(e, t) {
|
|
31
|
+
if (e !== void 0)
|
|
32
|
+
switch (e.type) {
|
|
33
33
|
case "Json":
|
|
34
|
-
return
|
|
34
|
+
return e;
|
|
35
35
|
case "JsonPartitioned": {
|
|
36
36
|
const n = {};
|
|
37
|
-
for (const [r, o] of Object.entries(
|
|
38
|
-
n[r] =
|
|
37
|
+
for (const [r, o] of Object.entries(e.parts))
|
|
38
|
+
n[r] = t(o);
|
|
39
39
|
return {
|
|
40
|
-
...
|
|
40
|
+
...e,
|
|
41
41
|
parts: n
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
case "BinaryPartitioned": {
|
|
45
45
|
const n = {};
|
|
46
|
-
for (const [r, o] of Object.entries(
|
|
46
|
+
for (const [r, o] of Object.entries(e.parts))
|
|
47
47
|
n[r] = {
|
|
48
|
-
index:
|
|
49
|
-
values:
|
|
48
|
+
index: t(o.index),
|
|
49
|
+
values: t(o.values)
|
|
50
50
|
};
|
|
51
51
|
return {
|
|
52
|
-
...
|
|
52
|
+
...e,
|
|
53
53
|
parts: n
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function A(
|
|
59
|
-
if (!
|
|
58
|
+
function A(e) {
|
|
59
|
+
if (!e || typeof e != "object")
|
|
60
60
|
return !1;
|
|
61
|
-
const
|
|
62
|
-
if (!("type" in
|
|
61
|
+
const t = e;
|
|
62
|
+
if (!("type" in t))
|
|
63
63
|
return !1;
|
|
64
|
-
switch (
|
|
64
|
+
switch (t.type) {
|
|
65
65
|
case "Json":
|
|
66
|
-
return typeof
|
|
66
|
+
return typeof t.keyLength == "number" && Array.isArray(t.data);
|
|
67
67
|
case "JsonPartitioned":
|
|
68
|
-
return typeof
|
|
68
|
+
return typeof t.partitionKeyLength == "number" && Array.isArray(t.parts);
|
|
69
69
|
case "BinaryPartitioned":
|
|
70
|
-
return typeof
|
|
70
|
+
return typeof t.partitionKeyLength == "number" && Array.isArray(t.parts);
|
|
71
71
|
default:
|
|
72
72
|
return !1;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function D(
|
|
76
|
-
return A(
|
|
75
|
+
function D(e) {
|
|
76
|
+
return A(e) ? e.type === "JsonPartitioned" || e.type === "BinaryPartitioned" : !1;
|
|
77
77
|
}
|
|
78
|
-
function B(
|
|
79
|
-
switch (
|
|
78
|
+
function B(e) {
|
|
79
|
+
switch (e.type) {
|
|
80
80
|
case "Json": {
|
|
81
|
-
const
|
|
81
|
+
const t = Object.entries(e.data).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
|
|
82
82
|
return {
|
|
83
83
|
type: "Json",
|
|
84
|
-
keyLength:
|
|
85
|
-
data:
|
|
84
|
+
keyLength: e.keyLength,
|
|
85
|
+
data: t
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
case "JsonPartitioned": {
|
|
89
|
-
const
|
|
89
|
+
const t = Object.entries(e.parts).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
|
|
90
90
|
return {
|
|
91
91
|
type: "JsonPartitioned",
|
|
92
|
-
partitionKeyLength:
|
|
93
|
-
parts:
|
|
92
|
+
partitionKeyLength: e.partitionKeyLength,
|
|
93
|
+
parts: t
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
case "BinaryPartitioned": {
|
|
97
|
-
const
|
|
97
|
+
const t = Object.entries(e.parts).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
|
|
98
98
|
return {
|
|
99
99
|
type: "BinaryPartitioned",
|
|
100
|
-
partitionKeyLength:
|
|
101
|
-
parts:
|
|
100
|
+
partitionKeyLength: e.partitionKeyLength,
|
|
101
|
+
parts: t
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function M(
|
|
107
|
-
switch (
|
|
106
|
+
function M(e) {
|
|
107
|
+
switch (e.type) {
|
|
108
108
|
case "Json": {
|
|
109
|
-
const
|
|
110
|
-
for (const n of
|
|
111
|
-
|
|
109
|
+
const t = {};
|
|
110
|
+
for (const n of e.data)
|
|
111
|
+
t[JSON.stringify(n.key)] = n.value;
|
|
112
112
|
return {
|
|
113
113
|
type: "Json",
|
|
114
|
-
keyLength:
|
|
115
|
-
data:
|
|
114
|
+
keyLength: e.keyLength,
|
|
115
|
+
data: t
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
case "JsonPartitioned": {
|
|
119
|
-
const
|
|
120
|
-
for (const n of
|
|
121
|
-
|
|
119
|
+
const t = {};
|
|
120
|
+
for (const n of e.parts)
|
|
121
|
+
t[JSON.stringify(n.key)] = n.value;
|
|
122
122
|
return {
|
|
123
123
|
type: "JsonPartitioned",
|
|
124
|
-
partitionKeyLength:
|
|
125
|
-
parts:
|
|
124
|
+
partitionKeyLength: e.partitionKeyLength,
|
|
125
|
+
parts: t
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
case "BinaryPartitioned": {
|
|
129
|
-
const
|
|
130
|
-
for (const n of
|
|
131
|
-
|
|
129
|
+
const t = {};
|
|
130
|
+
for (const n of e.parts)
|
|
131
|
+
t[JSON.stringify(n.key)] = n.value;
|
|
132
132
|
return {
|
|
133
133
|
type: "BinaryPartitioned",
|
|
134
|
-
partitionKeyLength:
|
|
135
|
-
parts:
|
|
134
|
+
partitionKeyLength: e.partitionKeyLength,
|
|
135
|
+
parts: t
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
function d(
|
|
141
|
-
const { type:
|
|
140
|
+
function d(e) {
|
|
141
|
+
const { type: t, name: n, domain: r } = e, o = { type: t, name: n };
|
|
142
142
|
return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
return
|
|
144
|
+
function j(e) {
|
|
145
|
+
return e.map(d);
|
|
146
146
|
}
|
|
147
|
-
function R(
|
|
148
|
-
return
|
|
147
|
+
function R(e) {
|
|
148
|
+
return l(d(e));
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
if (
|
|
152
|
-
if (
|
|
153
|
-
for (const n in
|
|
154
|
-
if (
|
|
150
|
+
function O(e, t) {
|
|
151
|
+
if (e === void 0) return t === void 0;
|
|
152
|
+
if (t === void 0) return !0;
|
|
153
|
+
for (const n in t)
|
|
154
|
+
if (e[n] !== t[n]) return !1;
|
|
155
155
|
return !0;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
157
|
+
function J(e, t) {
|
|
158
|
+
return e.name === t.name && O(e.domain, t.domain);
|
|
159
159
|
}
|
|
160
|
-
function _(
|
|
161
|
-
return { ...
|
|
160
|
+
function _(e, t) {
|
|
161
|
+
return { ...e, src: h(e.src, t) };
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
switch (
|
|
163
|
+
function h(e, t) {
|
|
164
|
+
switch (e.type) {
|
|
165
165
|
case "column":
|
|
166
166
|
return {
|
|
167
167
|
type: "column",
|
|
168
|
-
column: e
|
|
168
|
+
column: t(e.column)
|
|
169
169
|
};
|
|
170
170
|
case "slicedColumn":
|
|
171
171
|
return {
|
|
172
172
|
type: "slicedColumn",
|
|
173
|
-
column: e
|
|
174
|
-
newId:
|
|
175
|
-
axisFilters:
|
|
173
|
+
column: t(e.column),
|
|
174
|
+
newId: e.newId,
|
|
175
|
+
axisFilters: e.axisFilters
|
|
176
176
|
};
|
|
177
177
|
case "inlineColumn":
|
|
178
|
-
return
|
|
178
|
+
return e;
|
|
179
179
|
case "inner":
|
|
180
180
|
case "full":
|
|
181
181
|
return {
|
|
182
|
-
type:
|
|
183
|
-
entries:
|
|
182
|
+
type: e.type,
|
|
183
|
+
entries: e.entries.map((n) => h(n, t))
|
|
184
184
|
};
|
|
185
185
|
case "outer":
|
|
186
186
|
return {
|
|
187
187
|
type: "outer",
|
|
188
|
-
primary:
|
|
189
|
-
secondary:
|
|
188
|
+
primary: h(e.primary, t),
|
|
189
|
+
secondary: e.secondary.map((n) => h(n, t))
|
|
190
190
|
};
|
|
191
191
|
default:
|
|
192
|
-
w(
|
|
192
|
+
w(e);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
return
|
|
195
|
+
function S(e) {
|
|
196
|
+
return l(e);
|
|
197
197
|
}
|
|
198
|
-
function g(
|
|
199
|
-
return
|
|
198
|
+
function g(e) {
|
|
199
|
+
return l(d(e));
|
|
200
200
|
}
|
|
201
|
-
function b(
|
|
202
|
-
return JSON.stringify([
|
|
201
|
+
function b(e, t) {
|
|
202
|
+
return JSON.stringify([e, t]);
|
|
203
203
|
}
|
|
204
|
-
class
|
|
204
|
+
class F {
|
|
205
205
|
/**
|
|
206
206
|
* Creates a new anchor context from a set of anchor column specifications
|
|
207
207
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
208
208
|
*/
|
|
209
|
-
constructor(
|
|
210
|
-
|
|
211
|
-
const n = Object.entries(
|
|
209
|
+
constructor(t) {
|
|
210
|
+
p(this, "domains", /* @__PURE__ */ new Map()), p(this, "axes", /* @__PURE__ */ new Map()), p(this, "domainPacks", []), p(this, "domainPackToAnchor", /* @__PURE__ */ new Map()), this.anchors = t;
|
|
211
|
+
const n = Object.entries(t);
|
|
212
212
|
n.sort((r, o) => r[0].localeCompare(o[0]));
|
|
213
213
|
for (const [r, o] of n) {
|
|
214
214
|
for (let i = 0; i < o.axesSpec.length; i++) {
|
|
@@ -228,20 +228,20 @@ class q {
|
|
|
228
228
|
/**
|
|
229
229
|
* Implementation of derive method
|
|
230
230
|
*/
|
|
231
|
-
derive(
|
|
231
|
+
derive(t, n) {
|
|
232
232
|
const r = {
|
|
233
|
-
name:
|
|
233
|
+
name: t.name,
|
|
234
234
|
axes: []
|
|
235
235
|
};
|
|
236
236
|
let o;
|
|
237
|
-
if (
|
|
237
|
+
if (t.domain !== void 0)
|
|
238
238
|
e:
|
|
239
239
|
for (const a of this.domainPacks) {
|
|
240
240
|
const s = [];
|
|
241
241
|
for (const f of a) {
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
s.push([f,
|
|
242
|
+
const m = t.domain[f];
|
|
243
|
+
if (m !== void 0)
|
|
244
|
+
s.push([f, m]);
|
|
245
245
|
else
|
|
246
246
|
break e;
|
|
247
247
|
}
|
|
@@ -251,13 +251,13 @@ class q {
|
|
|
251
251
|
break;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
for (const [a, s] of Object.entries(
|
|
254
|
+
for (const [a, s] of Object.entries(t.domain ?? {})) {
|
|
255
255
|
if (o !== void 0 && o.has(a))
|
|
256
256
|
continue;
|
|
257
257
|
const c = b(a, s), f = this.domains.get(c);
|
|
258
258
|
r.domain ?? (r.domain = {}), r.domain[a] = f ? { anchor: f } : s;
|
|
259
259
|
}
|
|
260
|
-
if (r.axes =
|
|
260
|
+
if (r.axes = t.axesSpec.map((a) => {
|
|
261
261
|
const s = g(a), c = this.axes.get(s);
|
|
262
262
|
return c === void 0 ? d(a) : c;
|
|
263
263
|
}), !n || n.length === 0)
|
|
@@ -266,11 +266,11 @@ class q {
|
|
|
266
266
|
for (const a of n) {
|
|
267
267
|
const [s, c] = a;
|
|
268
268
|
if (typeof s == "number") {
|
|
269
|
-
if (s < 0 || s >=
|
|
270
|
-
throw new Error(`Axis index ${s} is out of bounds (0-${
|
|
269
|
+
if (s < 0 || s >= t.axesSpec.length)
|
|
270
|
+
throw new Error(`Axis index ${s} is out of bounds (0-${t.axesSpec.length - 1})`);
|
|
271
271
|
i.push([s, c]);
|
|
272
272
|
} else {
|
|
273
|
-
const f =
|
|
273
|
+
const f = t.axesSpec.findIndex((m) => m.name === s);
|
|
274
274
|
if (f === -1)
|
|
275
275
|
throw new Error(`Axis with name "${s}" not found in the column specification`);
|
|
276
276
|
i.push([f, c]);
|
|
@@ -287,14 +287,14 @@ class q {
|
|
|
287
287
|
* @param axisFilters Optional axis filters to apply to the column
|
|
288
288
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
289
289
|
*/
|
|
290
|
-
deriveS(
|
|
291
|
-
return
|
|
290
|
+
deriveS(t, n) {
|
|
291
|
+
return S(this.derive(t, n));
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
const r = { ...
|
|
294
|
+
function z(e, t, n) {
|
|
295
|
+
const r = { ...t }, o = (n == null ? void 0 : n.ignoreMissingDomains) ?? !1;
|
|
296
296
|
if (r.domainAnchor !== void 0) {
|
|
297
|
-
const i =
|
|
297
|
+
const i = e[r.domainAnchor];
|
|
298
298
|
if (!i)
|
|
299
299
|
throw new Error(`Anchor "${r.domainAnchor}" not found`);
|
|
300
300
|
const a = i.domain || {};
|
|
@@ -306,7 +306,7 @@ function F(t, e, n) {
|
|
|
306
306
|
if (typeof s == "string")
|
|
307
307
|
i[a] = s;
|
|
308
308
|
else {
|
|
309
|
-
const c =
|
|
309
|
+
const c = e[s.anchor];
|
|
310
310
|
if (!c)
|
|
311
311
|
throw new Error(`Anchor "${s.anchor}" not found for domain key "${a}"`);
|
|
312
312
|
if (!c.domain || c.domain[a] === void 0) {
|
|
@@ -318,27 +318,27 @@ function F(t, e, n) {
|
|
|
318
318
|
}
|
|
319
319
|
r.domain = i;
|
|
320
320
|
}
|
|
321
|
-
return r.axes && (r.axes = r.axes.map((i) =>
|
|
321
|
+
return r.axes && (r.axes = r.axes.map((i) => E(e, i))), r;
|
|
322
322
|
}
|
|
323
|
-
function
|
|
324
|
-
if (!I(
|
|
325
|
-
return
|
|
326
|
-
const n =
|
|
323
|
+
function E(e, t) {
|
|
324
|
+
if (!I(t))
|
|
325
|
+
return t;
|
|
326
|
+
const n = t.anchor, r = e[n];
|
|
327
327
|
if (!r)
|
|
328
328
|
throw new Error(`Anchor "${n}" not found for axis reference`);
|
|
329
|
-
if ("idx" in
|
|
330
|
-
if (
|
|
331
|
-
throw new Error(`Axis index ${
|
|
332
|
-
return r.axesSpec[
|
|
333
|
-
} else if ("name" in
|
|
334
|
-
const o = r.axesSpec.filter((i) => i.name ===
|
|
329
|
+
if ("idx" in t) {
|
|
330
|
+
if (t.idx < 0 || t.idx >= r.axesSpec.length)
|
|
331
|
+
throw new Error(`Axis index ${t.idx} out of bounds for anchor "${n}"`);
|
|
332
|
+
return r.axesSpec[t.idx];
|
|
333
|
+
} else if ("name" in t) {
|
|
334
|
+
const o = r.axesSpec.filter((i) => i.name === t.name);
|
|
335
335
|
if (o.length > 1)
|
|
336
|
-
throw new Error(`Multiple axes with name "${
|
|
336
|
+
throw new Error(`Multiple axes with name "${t.name}" found in anchor "${n}"`);
|
|
337
337
|
if (o.length === 0)
|
|
338
|
-
throw new Error(`Axis with name "${
|
|
338
|
+
throw new Error(`Axis with name "${t.name}" not found in anchor "${n}"`);
|
|
339
339
|
return o[0];
|
|
340
|
-
} else if ("id" in
|
|
341
|
-
const o = r.axesSpec.filter((i) =>
|
|
340
|
+
} else if ("id" in t) {
|
|
341
|
+
const o = r.axesSpec.filter((i) => J(t.id, d(i)));
|
|
342
342
|
if (o.length > 1)
|
|
343
343
|
throw new Error(`Multiple matching axes found for matcher in anchor "${n}"`);
|
|
344
344
|
if (o.length === 0)
|
|
@@ -347,33 +347,33 @@ function J(t, e) {
|
|
|
347
347
|
}
|
|
348
348
|
throw new Error("Unsupported axis reference type");
|
|
349
349
|
}
|
|
350
|
-
function I(
|
|
351
|
-
return typeof
|
|
350
|
+
function I(e) {
|
|
351
|
+
return typeof e == "object" && "anchor" in e;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
return
|
|
353
|
+
function y(e) {
|
|
354
|
+
return e.kind === "PColumn";
|
|
355
355
|
}
|
|
356
|
-
function L(
|
|
357
|
-
return
|
|
356
|
+
function L(e) {
|
|
357
|
+
return y(e.spec);
|
|
358
358
|
}
|
|
359
|
-
function U(
|
|
360
|
-
if (!L(
|
|
361
|
-
return
|
|
359
|
+
function U(e) {
|
|
360
|
+
if (!L(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
|
|
361
|
+
return e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
365
|
-
...
|
|
366
|
-
data: e
|
|
363
|
+
function q(e, t) {
|
|
364
|
+
return e === void 0 ? void 0 : {
|
|
365
|
+
...e,
|
|
366
|
+
data: t(e.data)
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
const
|
|
369
|
+
function V(e) {
|
|
370
|
+
const t = /* @__PURE__ */ new Map(), n = (r) => {
|
|
371
371
|
switch (r.type) {
|
|
372
372
|
case "column":
|
|
373
|
-
|
|
373
|
+
t.set(r.column.id, r.column);
|
|
374
374
|
return;
|
|
375
375
|
case "slicedColumn":
|
|
376
|
-
|
|
376
|
+
t.set(r.column.id, r.column);
|
|
377
377
|
return;
|
|
378
378
|
case "inlineColumn":
|
|
379
379
|
return;
|
|
@@ -389,65 +389,65 @@ function z(t) {
|
|
|
389
389
|
w(r);
|
|
390
390
|
}
|
|
391
391
|
};
|
|
392
|
-
return n(
|
|
392
|
+
return n(e), [...t.values()];
|
|
393
393
|
}
|
|
394
|
-
function x(
|
|
395
|
-
if (
|
|
394
|
+
function x(e, t) {
|
|
395
|
+
if (e.name !== void 0 && e.name !== t.name)
|
|
396
396
|
return !1;
|
|
397
|
-
if (
|
|
398
|
-
if (Array.isArray(
|
|
399
|
-
if (!
|
|
397
|
+
if (e.type !== void 0) {
|
|
398
|
+
if (Array.isArray(e.type)) {
|
|
399
|
+
if (!e.type.includes(t.type))
|
|
400
400
|
return !1;
|
|
401
|
-
} else if (
|
|
401
|
+
} else if (e.type !== t.type)
|
|
402
402
|
return !1;
|
|
403
403
|
}
|
|
404
|
-
if (
|
|
405
|
-
const n =
|
|
406
|
-
for (const [r, o] of Object.entries(
|
|
404
|
+
if (e.domain !== void 0) {
|
|
405
|
+
const n = t.domain || {};
|
|
406
|
+
for (const [r, o] of Object.entries(e.domain))
|
|
407
407
|
if (n[r] !== o)
|
|
408
408
|
return !1;
|
|
409
409
|
}
|
|
410
410
|
return !0;
|
|
411
411
|
}
|
|
412
|
-
function v(
|
|
413
|
-
if (
|
|
412
|
+
function v(e, t) {
|
|
413
|
+
if (t.name !== void 0 && e.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(e.name))
|
|
414
414
|
return !1;
|
|
415
|
-
if (
|
|
416
|
-
if (Array.isArray(
|
|
417
|
-
if (!
|
|
415
|
+
if (t.type !== void 0) {
|
|
416
|
+
if (Array.isArray(t.type)) {
|
|
417
|
+
if (!t.type.includes(e.valueType))
|
|
418
418
|
return !1;
|
|
419
|
-
} else if (
|
|
419
|
+
} else if (t.type !== e.valueType)
|
|
420
420
|
return !1;
|
|
421
421
|
}
|
|
422
|
-
if (
|
|
423
|
-
const n =
|
|
424
|
-
for (const [r, o] of Object.entries(
|
|
422
|
+
if (t.domain !== void 0) {
|
|
423
|
+
const n = e.domain || {};
|
|
424
|
+
for (const [r, o] of Object.entries(t.domain))
|
|
425
425
|
if (n[r] !== o)
|
|
426
426
|
return !1;
|
|
427
427
|
}
|
|
428
|
-
if (
|
|
429
|
-
const n =
|
|
430
|
-
if (
|
|
431
|
-
for (const r of
|
|
428
|
+
if (t.axes !== void 0) {
|
|
429
|
+
const n = e.axesSpec.map(d);
|
|
430
|
+
if (t.partialAxesMatch) {
|
|
431
|
+
for (const r of t.axes)
|
|
432
432
|
if (!n.some((o) => x(r, o)))
|
|
433
433
|
return !1;
|
|
434
434
|
} else {
|
|
435
|
-
if (n.length !==
|
|
435
|
+
if (n.length !== t.axes.length)
|
|
436
436
|
return !1;
|
|
437
|
-
for (let r = 0; r <
|
|
438
|
-
if (!x(
|
|
437
|
+
for (let r = 0; r < t.axes.length; r++)
|
|
438
|
+
if (!x(t.axes[r], n[r]))
|
|
439
439
|
return !1;
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
if (
|
|
443
|
-
const n =
|
|
444
|
-
for (const [r, o] of Object.entries(
|
|
442
|
+
if (t.annotations !== void 0) {
|
|
443
|
+
const n = e.annotations || {};
|
|
444
|
+
for (const [r, o] of Object.entries(t.annotations))
|
|
445
445
|
if (n[r] !== o)
|
|
446
446
|
return !1;
|
|
447
447
|
}
|
|
448
|
-
if (
|
|
449
|
-
const n =
|
|
450
|
-
for (const [r, o] of Object.entries(
|
|
448
|
+
if (t.annotationPatterns !== void 0) {
|
|
449
|
+
const n = e.annotations || {};
|
|
450
|
+
for (const [r, o] of Object.entries(t.annotationPatterns)) {
|
|
451
451
|
const i = n[r];
|
|
452
452
|
if (i === void 0 || !new RegExp(o).test(i))
|
|
453
453
|
return !1;
|
|
@@ -455,15 +455,15 @@ function v(t, e) {
|
|
|
455
455
|
}
|
|
456
456
|
return !0;
|
|
457
457
|
}
|
|
458
|
-
function G(
|
|
459
|
-
return Array.isArray(
|
|
458
|
+
function G(e) {
|
|
459
|
+
return Array.isArray(e) ? (t) => e.some((n) => y(t) && v(t, n)) : (t) => y(t) && v(t, e);
|
|
460
460
|
}
|
|
461
|
-
function
|
|
462
|
-
const
|
|
463
|
-
kind:
|
|
464
|
-
name:
|
|
461
|
+
function X(e) {
|
|
462
|
+
const t = {
|
|
463
|
+
kind: e.kind,
|
|
464
|
+
name: e.name
|
|
465
465
|
};
|
|
466
|
-
return
|
|
466
|
+
return e.domain !== void 0 && (t.domain = e.domain), y(e) && (t.axesSpec = j(e.axesSpec)), l(t);
|
|
467
467
|
}
|
|
468
468
|
u.object({
|
|
469
469
|
__isRef: u.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
@@ -473,53 +473,57 @@ u.object({
|
|
|
473
473
|
}).describe(
|
|
474
474
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
475
475
|
).readonly();
|
|
476
|
-
function
|
|
477
|
-
return typeof
|
|
476
|
+
function H(e) {
|
|
477
|
+
return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === !0 && "blockId" in e && "name" in e;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
if (
|
|
479
|
+
function Q(e, t = !0) {
|
|
480
|
+
if (t)
|
|
481
481
|
return {
|
|
482
|
-
...
|
|
482
|
+
...e,
|
|
483
483
|
requireEnrichments: !0
|
|
484
484
|
};
|
|
485
485
|
{
|
|
486
|
-
const { requireEnrichments: n, ...r } =
|
|
486
|
+
const { requireEnrichments: n, ...r } = e;
|
|
487
487
|
return r;
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
return
|
|
490
|
+
function W(e, t) {
|
|
491
|
+
return e.ok ? { ok: !0, value: t(e.value) } : e;
|
|
492
492
|
}
|
|
493
493
|
const C = 24;
|
|
494
494
|
u.string().length(C).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
495
|
+
function Y(e) {
|
|
496
|
+
return l(e);
|
|
497
|
+
}
|
|
495
498
|
export {
|
|
496
|
-
|
|
499
|
+
F as AnchoredIdDeriver,
|
|
497
500
|
C as PlIdLength,
|
|
498
501
|
R as canonicalizeAxisId,
|
|
502
|
+
Y as canonicalizeJson,
|
|
499
503
|
B as dataInfoToEntries,
|
|
500
|
-
|
|
504
|
+
X as deriveNativeId,
|
|
501
505
|
U as ensurePColumn,
|
|
502
506
|
M as entriesToDataInfo,
|
|
503
|
-
|
|
504
|
-
|
|
507
|
+
V as extractAllColumns,
|
|
508
|
+
j as getAxesId,
|
|
505
509
|
d as getAxisId,
|
|
506
|
-
|
|
510
|
+
K as isDataInfo,
|
|
507
511
|
A as isDataInfoEntries,
|
|
508
512
|
L as isPColumn,
|
|
509
|
-
|
|
513
|
+
y as isPColumnSpec,
|
|
510
514
|
D as isPartitionedDataInfoEntries,
|
|
511
|
-
|
|
515
|
+
H as isPlRef,
|
|
512
516
|
T as mapDataInfo,
|
|
513
|
-
|
|
514
|
-
|
|
517
|
+
h as mapJoinEntry,
|
|
518
|
+
q as mapPObjectData,
|
|
515
519
|
_ as mapPTableDef,
|
|
516
|
-
|
|
520
|
+
W as mapValueInVOE,
|
|
517
521
|
x as matchAxis,
|
|
518
|
-
|
|
522
|
+
J as matchAxisId,
|
|
519
523
|
v as matchPColumn,
|
|
520
|
-
|
|
524
|
+
z as resolveAnchors,
|
|
521
525
|
G as selectorsToPredicate,
|
|
522
|
-
|
|
523
|
-
|
|
526
|
+
S as stringifyColumnId,
|
|
527
|
+
Q as withEnrichments
|
|
524
528
|
};
|
|
525
529
|
//# sourceMappingURL=index.js.map
|