@milaboratories/pl-model-common 1.15.9 → 1.16.1
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/{base32-encode.d.ts → base32_encode.d.ts} +1 -1
- package/dist/{base32-encode.d.ts.map → base32_encode.d.ts.map} +1 -1
- package/dist/bmodel/block_config.d.ts +42 -0
- package/dist/bmodel/block_config.d.ts.map +1 -0
- package/dist/bmodel/code.d.ts +11 -0
- package/dist/bmodel/code.d.ts.map +1 -0
- package/dist/bmodel/container.d.ts +46 -0
- package/dist/bmodel/container.d.ts.map +1 -0
- package/dist/bmodel/index.d.ts +6 -0
- package/dist/bmodel/index.d.ts.map +1 -0
- package/dist/bmodel/normalization.d.ts +10 -0
- package/dist/bmodel/normalization.d.ts.map +1 -0
- package/dist/{block.d.ts → bmodel/types.d.ts} +1 -1
- package/dist/bmodel/types.d.ts.map +1 -0
- package/dist/drivers/pframe/table_calculate.d.ts +8 -2
- package/dist/drivers/pframe/table_calculate.d.ts.map +1 -1
- package/dist/flags/block_flags.d.ts +20 -0
- package/dist/flags/block_flags.d.ts.map +1 -0
- package/dist/flags/flag_utils.d.ts +56 -0
- package/dist/flags/flag_utils.d.ts.map +1 -0
- package/dist/flags/index.d.ts +4 -0
- package/dist/flags/index.d.ts.map +1 -0
- package/dist/flags/type_utils.d.ts +35 -0
- package/dist/flags/type_utils.d.ts.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +732 -577
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/bmodel/block_config.ts +69 -0
- package/src/bmodel/code.ts +12 -0
- package/src/bmodel/container.ts +58 -0
- package/src/bmodel/index.ts +5 -0
- package/src/bmodel/normalization.ts +111 -0
- package/src/drivers/pframe/table_calculate.ts +10 -1
- package/src/flags/block_flags.ts +43 -0
- package/src/flags/flag_utils.test.ts +162 -0
- package/src/flags/flag_utils.ts +104 -0
- package/src/flags/index.ts +3 -0
- package/src/flags/type_utils.ts +43 -0
- package/src/index.ts +3 -1
- package/src/plid.ts +1 -1
- package/dist/block.d.ts.map +0 -1
- /package/src/{base32-encode.ts → base32_encode.ts} +0 -0
- /package/src/{block.ts → bmodel/types.ts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,319 +1,401 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (
|
|
4
|
-
import { z as
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
var D = Object.defineProperty;
|
|
2
|
+
var L = (e, n, t) => n in e ? D(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var l = (e, n, t) => L(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { z as p } from "zod";
|
|
5
|
+
import h from "canonicalize";
|
|
6
|
+
function ke(e) {
|
|
7
|
+
if (e.code !== void 0)
|
|
8
|
+
return {
|
|
9
|
+
code: e.code,
|
|
10
|
+
sdkVersion: e.sdkVersion,
|
|
11
|
+
featureFlags: e.featureFlags
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function m(e) {
|
|
15
|
+
if (e !== void 0)
|
|
16
|
+
return typeof e == "string" ? { __renderLambda: !0, handle: e, retentive: !1 } : e;
|
|
17
|
+
}
|
|
18
|
+
function xe(e) {
|
|
19
|
+
if (e.v3 !== void 0) {
|
|
20
|
+
const {
|
|
21
|
+
initialArgs: n,
|
|
22
|
+
initialUiState: t,
|
|
23
|
+
inputsValid: r,
|
|
24
|
+
outputs: o,
|
|
25
|
+
renderingMode: i,
|
|
26
|
+
sdkVersion: a,
|
|
27
|
+
featureFlags: s,
|
|
28
|
+
sections: u,
|
|
29
|
+
title: c,
|
|
30
|
+
enrichmentTargets: f
|
|
31
|
+
} = e.v3, { code: R } = e;
|
|
32
|
+
return {
|
|
33
|
+
initialArgs: n,
|
|
34
|
+
initialUiState: t,
|
|
35
|
+
inputsValid: r,
|
|
36
|
+
outputs: o,
|
|
37
|
+
renderingMode: i,
|
|
38
|
+
sdkVersion: a,
|
|
39
|
+
featureFlags: s,
|
|
40
|
+
sections: u,
|
|
41
|
+
title: c,
|
|
42
|
+
code: R,
|
|
43
|
+
enrichmentTargets: f
|
|
44
|
+
};
|
|
45
|
+
} else if (e.inputsValid !== void 0) {
|
|
46
|
+
const { sdkVersion: n, renderingMode: t, outputs: r, inputsValid: o, sections: i, initialArgs: a, code: s } = e, u = Object.keys(e);
|
|
47
|
+
if (n === void 0 || t === void 0 || r === void 0 || o === void 0 || i === void 0 || a === void 0)
|
|
48
|
+
throw new Error(
|
|
49
|
+
`Malformed config v2. SDK version ${n}; Fields = ${u.join(", ")}`
|
|
50
|
+
);
|
|
51
|
+
return {
|
|
52
|
+
sdkVersion: n,
|
|
53
|
+
renderingMode: t,
|
|
54
|
+
initialArgs: a,
|
|
55
|
+
outputs: Object.fromEntries(
|
|
56
|
+
Object.entries(r).map(([c, f]) => [c, m(f)])
|
|
57
|
+
),
|
|
58
|
+
inputsValid: m(o),
|
|
59
|
+
sections: m(i),
|
|
60
|
+
initialUiState: void 0,
|
|
61
|
+
code: s
|
|
62
|
+
};
|
|
63
|
+
} else if (e.renderingMode !== void 0) {
|
|
64
|
+
const { sdkVersion: n, canRun: t, renderingMode: r, outputs: o, sections: i, initialArgs: a, code: s } = e, u = Object.keys(e);
|
|
65
|
+
if (r === void 0 || o === void 0 || t === void 0 || i === void 0 || a === void 0)
|
|
66
|
+
throw new Error(
|
|
67
|
+
`Malformed config v1. SDK version ${n}; Fields = ${u.join(", ")}`
|
|
68
|
+
);
|
|
69
|
+
return {
|
|
70
|
+
sdkVersion: n ?? "unknown",
|
|
71
|
+
renderingMode: r,
|
|
72
|
+
initialArgs: a,
|
|
73
|
+
outputs: Object.fromEntries(
|
|
74
|
+
Object.entries(o).map(([c, f]) => [c, m(f)])
|
|
75
|
+
),
|
|
76
|
+
inputsValid: m(t),
|
|
77
|
+
sections: m(i),
|
|
78
|
+
initialUiState: void 0,
|
|
79
|
+
code: s
|
|
80
|
+
};
|
|
81
|
+
} else {
|
|
82
|
+
const { sdkVersion: n } = e, t = Object.keys(e);
|
|
83
|
+
throw new Error(
|
|
84
|
+
`Config format not supported: SDK = ${n}; Fields = ${t.join(", ")}`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const Pe = p.object({
|
|
7
89
|
/** Included left border. */
|
|
8
|
-
from:
|
|
90
|
+
from: p.number(),
|
|
9
91
|
/** Excluded right border. */
|
|
10
|
-
to:
|
|
92
|
+
to: p.number()
|
|
11
93
|
});
|
|
12
|
-
function
|
|
13
|
-
if (!(
|
|
14
|
-
return { from:
|
|
15
|
-
}
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
throw new Error(`${
|
|
19
|
-
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
function
|
|
24
|
-
throw new Error("Unexpected object: " +
|
|
25
|
-
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
32
|
-
}
|
|
33
|
-
function
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
36
|
-
return JSON.parse(decodeURIComponent(
|
|
37
|
-
} else if (
|
|
38
|
-
const
|
|
39
|
-
return JSON.parse(decodeURIComponent(
|
|
94
|
+
function Ee(e, n) {
|
|
95
|
+
if (!(e == null || n == null))
|
|
96
|
+
return { from: e, to: n };
|
|
97
|
+
}
|
|
98
|
+
function Se(e, n) {
|
|
99
|
+
if (e.from < 0 || e.to < 0 || e.from >= e.to)
|
|
100
|
+
throw new Error(`${n}: invalid bytes range: ${e}`);
|
|
101
|
+
}
|
|
102
|
+
function ve(e) {
|
|
103
|
+
return e !== void 0 && e.startsWith("log+live://log/");
|
|
104
|
+
}
|
|
105
|
+
function A(e) {
|
|
106
|
+
throw new Error("Unexpected object: " + e);
|
|
107
|
+
}
|
|
108
|
+
const N = "upload://upload/", O = "index://index/";
|
|
109
|
+
function B(e) {
|
|
110
|
+
return e.startsWith(N);
|
|
111
|
+
}
|
|
112
|
+
function U(e) {
|
|
113
|
+
return e.startsWith(O);
|
|
114
|
+
}
|
|
115
|
+
function K(e) {
|
|
116
|
+
if (U(e)) {
|
|
117
|
+
const n = e.slice(O.length);
|
|
118
|
+
return JSON.parse(decodeURIComponent(n)).path;
|
|
119
|
+
} else if (B(e)) {
|
|
120
|
+
const n = e.slice(N.length);
|
|
121
|
+
return JSON.parse(decodeURIComponent(n)).localPath;
|
|
40
122
|
}
|
|
41
|
-
|
|
123
|
+
A(e);
|
|
42
124
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
125
|
+
function M(e) {
|
|
126
|
+
return e.replace(/^.*[\\/]/, "");
|
|
45
127
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
128
|
+
function Ne(e) {
|
|
129
|
+
return M(K(e));
|
|
48
130
|
}
|
|
49
|
-
function
|
|
50
|
-
if (!
|
|
131
|
+
function Oe(e) {
|
|
132
|
+
if (!e || typeof e != "object")
|
|
51
133
|
return !1;
|
|
52
|
-
const
|
|
53
|
-
if (!("type" in
|
|
134
|
+
const n = e;
|
|
135
|
+
if (!("type" in n))
|
|
54
136
|
return !1;
|
|
55
|
-
switch (
|
|
137
|
+
switch (n.type) {
|
|
56
138
|
case "Json":
|
|
57
|
-
return typeof
|
|
139
|
+
return typeof n.keyLength == "number" && n.data !== void 0 && typeof n.data == "object";
|
|
58
140
|
case "JsonPartitioned":
|
|
59
|
-
return typeof
|
|
141
|
+
return typeof n.partitionKeyLength == "number" && n.parts !== void 0 && typeof n.parts == "object";
|
|
60
142
|
case "BinaryPartitioned":
|
|
61
|
-
return typeof
|
|
143
|
+
return typeof n.partitionKeyLength == "number" && n.parts !== void 0 && typeof n.parts == "object";
|
|
62
144
|
default:
|
|
63
145
|
return !1;
|
|
64
146
|
}
|
|
65
147
|
}
|
|
66
|
-
function
|
|
67
|
-
if (
|
|
68
|
-
switch (
|
|
148
|
+
function Ce(e, n) {
|
|
149
|
+
if (e !== void 0)
|
|
150
|
+
switch (e.type) {
|
|
69
151
|
case "Json":
|
|
70
|
-
return
|
|
152
|
+
return e;
|
|
71
153
|
case "JsonPartitioned": {
|
|
72
154
|
const t = {};
|
|
73
|
-
for (const [r, o] of Object.entries(
|
|
74
|
-
t[r] =
|
|
155
|
+
for (const [r, o] of Object.entries(e.parts))
|
|
156
|
+
t[r] = n(o);
|
|
75
157
|
return {
|
|
76
|
-
...
|
|
158
|
+
...e,
|
|
77
159
|
parts: t
|
|
78
160
|
};
|
|
79
161
|
}
|
|
80
162
|
case "BinaryPartitioned": {
|
|
81
163
|
const t = {};
|
|
82
|
-
for (const [r, o] of Object.entries(
|
|
164
|
+
for (const [r, o] of Object.entries(e.parts))
|
|
83
165
|
t[r] = {
|
|
84
|
-
index:
|
|
85
|
-
values:
|
|
166
|
+
index: n(o.index),
|
|
167
|
+
values: n(o.values)
|
|
86
168
|
};
|
|
87
169
|
return {
|
|
88
|
-
...
|
|
170
|
+
...e,
|
|
89
171
|
parts: t
|
|
90
172
|
};
|
|
91
173
|
}
|
|
92
174
|
}
|
|
93
175
|
}
|
|
94
|
-
function
|
|
95
|
-
if (!
|
|
176
|
+
function _(e) {
|
|
177
|
+
if (!e || typeof e != "object")
|
|
96
178
|
return !1;
|
|
97
|
-
const
|
|
98
|
-
if (!("type" in
|
|
179
|
+
const n = e;
|
|
180
|
+
if (!("type" in n))
|
|
99
181
|
return !1;
|
|
100
|
-
switch (
|
|
182
|
+
switch (n.type) {
|
|
101
183
|
case "Json":
|
|
102
|
-
return typeof
|
|
184
|
+
return typeof n.keyLength == "number" && Array.isArray(n.data);
|
|
103
185
|
case "JsonPartitioned":
|
|
104
|
-
return typeof
|
|
186
|
+
return typeof n.partitionKeyLength == "number" && Array.isArray(n.parts);
|
|
105
187
|
case "BinaryPartitioned":
|
|
106
|
-
return typeof
|
|
188
|
+
return typeof n.partitionKeyLength == "number" && Array.isArray(n.parts);
|
|
107
189
|
default:
|
|
108
190
|
return !1;
|
|
109
191
|
}
|
|
110
192
|
}
|
|
111
|
-
function
|
|
112
|
-
return
|
|
193
|
+
function $e(e) {
|
|
194
|
+
return _(e) ? e.type === "JsonPartitioned" || e.type === "BinaryPartitioned" : !1;
|
|
113
195
|
}
|
|
114
|
-
function
|
|
115
|
-
switch (
|
|
196
|
+
function Ve(e) {
|
|
197
|
+
switch (e.type) {
|
|
116
198
|
case "Json": {
|
|
117
|
-
const
|
|
199
|
+
const n = Object.entries(e.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
118
200
|
return {
|
|
119
201
|
type: "Json",
|
|
120
|
-
keyLength:
|
|
121
|
-
data:
|
|
202
|
+
keyLength: e.keyLength,
|
|
203
|
+
data: n
|
|
122
204
|
};
|
|
123
205
|
}
|
|
124
206
|
case "JsonPartitioned": {
|
|
125
|
-
const
|
|
207
|
+
const n = Object.entries(e.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
126
208
|
return {
|
|
127
209
|
type: "JsonPartitioned",
|
|
128
|
-
partitionKeyLength:
|
|
129
|
-
parts:
|
|
210
|
+
partitionKeyLength: e.partitionKeyLength,
|
|
211
|
+
parts: n
|
|
130
212
|
};
|
|
131
213
|
}
|
|
132
214
|
case "BinaryPartitioned": {
|
|
133
|
-
const
|
|
215
|
+
const n = Object.entries(e.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
134
216
|
return {
|
|
135
217
|
type: "BinaryPartitioned",
|
|
136
|
-
partitionKeyLength:
|
|
137
|
-
parts:
|
|
218
|
+
partitionKeyLength: e.partitionKeyLength,
|
|
219
|
+
parts: n
|
|
138
220
|
};
|
|
139
221
|
}
|
|
140
222
|
}
|
|
141
223
|
}
|
|
142
|
-
function
|
|
143
|
-
switch (
|
|
224
|
+
function Ie(e) {
|
|
225
|
+
switch (e.type) {
|
|
144
226
|
case "Json": {
|
|
145
|
-
const
|
|
146
|
-
for (const t of
|
|
147
|
-
|
|
227
|
+
const n = {};
|
|
228
|
+
for (const t of e.data)
|
|
229
|
+
n[JSON.stringify(t.key)] = t.value;
|
|
148
230
|
return {
|
|
149
231
|
type: "Json",
|
|
150
|
-
keyLength:
|
|
151
|
-
data:
|
|
232
|
+
keyLength: e.keyLength,
|
|
233
|
+
data: n
|
|
152
234
|
};
|
|
153
235
|
}
|
|
154
236
|
case "JsonPartitioned": {
|
|
155
|
-
const
|
|
156
|
-
for (const t of
|
|
157
|
-
|
|
237
|
+
const n = {};
|
|
238
|
+
for (const t of e.parts)
|
|
239
|
+
n[JSON.stringify(t.key)] = t.value;
|
|
158
240
|
return {
|
|
159
241
|
type: "JsonPartitioned",
|
|
160
|
-
partitionKeyLength:
|
|
161
|
-
parts:
|
|
242
|
+
partitionKeyLength: e.partitionKeyLength,
|
|
243
|
+
parts: n
|
|
162
244
|
};
|
|
163
245
|
}
|
|
164
246
|
case "BinaryPartitioned": {
|
|
165
|
-
const
|
|
166
|
-
for (const t of
|
|
167
|
-
|
|
247
|
+
const n = {};
|
|
248
|
+
for (const t of e.parts)
|
|
249
|
+
n[JSON.stringify(t.key)] = t.value;
|
|
168
250
|
return {
|
|
169
251
|
type: "BinaryPartitioned",
|
|
170
|
-
partitionKeyLength:
|
|
171
|
-
parts:
|
|
252
|
+
partitionKeyLength: e.partitionKeyLength,
|
|
253
|
+
parts: n
|
|
172
254
|
};
|
|
173
255
|
}
|
|
174
256
|
}
|
|
175
257
|
}
|
|
176
|
-
function
|
|
177
|
-
if (
|
|
178
|
-
switch (
|
|
258
|
+
function je(e, n) {
|
|
259
|
+
if (e !== void 0)
|
|
260
|
+
switch (e.type) {
|
|
179
261
|
case "Json":
|
|
180
|
-
return
|
|
262
|
+
return e;
|
|
181
263
|
case "JsonPartitioned": {
|
|
182
|
-
const t =
|
|
264
|
+
const t = e.parts.map((r) => ({
|
|
183
265
|
key: r.key,
|
|
184
|
-
value:
|
|
266
|
+
value: n(r.value)
|
|
185
267
|
}));
|
|
186
268
|
return {
|
|
187
|
-
...
|
|
269
|
+
...e,
|
|
188
270
|
parts: t
|
|
189
271
|
};
|
|
190
272
|
}
|
|
191
273
|
case "BinaryPartitioned": {
|
|
192
|
-
const t =
|
|
274
|
+
const t = e.parts.map((r) => ({
|
|
193
275
|
key: r.key,
|
|
194
276
|
value: {
|
|
195
|
-
index:
|
|
196
|
-
values:
|
|
277
|
+
index: n(r.value.index),
|
|
278
|
+
values: n(r.value.values)
|
|
197
279
|
}
|
|
198
280
|
}));
|
|
199
281
|
return {
|
|
200
|
-
...
|
|
282
|
+
...e,
|
|
201
283
|
parts: t
|
|
202
284
|
};
|
|
203
285
|
}
|
|
204
286
|
}
|
|
205
287
|
}
|
|
206
|
-
const
|
|
207
|
-
function
|
|
208
|
-
switch (
|
|
288
|
+
const q = -2147483648, x = -9007199254740991n, Fe = NaN, Je = NaN, T = null, z = null;
|
|
289
|
+
function b(e, n) {
|
|
290
|
+
switch (n) {
|
|
209
291
|
case "Int":
|
|
210
|
-
return
|
|
292
|
+
return e === q;
|
|
211
293
|
case "Long":
|
|
212
|
-
return
|
|
294
|
+
return e === Number(x) || e === x;
|
|
213
295
|
case "Float":
|
|
214
|
-
return Number.isNaN(
|
|
296
|
+
return Number.isNaN(e);
|
|
215
297
|
case "Double":
|
|
216
|
-
return Number.isNaN(
|
|
298
|
+
return Number.isNaN(e);
|
|
217
299
|
case "String":
|
|
218
|
-
return
|
|
300
|
+
return e === T;
|
|
219
301
|
case "Bytes":
|
|
220
|
-
return
|
|
302
|
+
return e === z;
|
|
221
303
|
default:
|
|
222
|
-
throw Error(`unsupported data type: ${
|
|
304
|
+
throw Error(`unsupported data type: ${n}`);
|
|
223
305
|
}
|
|
224
306
|
}
|
|
225
|
-
function
|
|
226
|
-
if (!
|
|
227
|
-
return
|
|
307
|
+
function Re(e) {
|
|
308
|
+
if (!H(e)) throw new Error(`Expected not-NA PValue, got ${e}`);
|
|
309
|
+
return e;
|
|
228
310
|
}
|
|
229
|
-
function
|
|
230
|
-
if (!
|
|
231
|
-
return typeof
|
|
232
|
-
if (
|
|
233
|
-
switch (
|
|
311
|
+
function H(e, n) {
|
|
312
|
+
if (!n)
|
|
313
|
+
return typeof e == "string" || typeof e == "number" && isFinite(e) || typeof e == "bigint";
|
|
314
|
+
if (b(e, n)) return !1;
|
|
315
|
+
switch (n) {
|
|
234
316
|
case "Int":
|
|
235
|
-
return typeof
|
|
317
|
+
return typeof e == "number";
|
|
236
318
|
case "Long":
|
|
237
|
-
return typeof
|
|
319
|
+
return typeof e == "number" || typeof e == "bigint";
|
|
238
320
|
case "Float":
|
|
239
|
-
return typeof
|
|
321
|
+
return typeof e == "number";
|
|
240
322
|
case "Double":
|
|
241
|
-
return typeof
|
|
323
|
+
return typeof e == "number";
|
|
242
324
|
case "String":
|
|
243
|
-
return typeof
|
|
325
|
+
return typeof e == "string";
|
|
244
326
|
case "Bytes":
|
|
245
327
|
throw Error("Bytes not yet supported");
|
|
246
328
|
default:
|
|
247
|
-
throw Error(`unsupported data type: ${
|
|
329
|
+
throw Error(`unsupported data type: ${n}`);
|
|
248
330
|
}
|
|
249
331
|
}
|
|
250
|
-
function
|
|
251
|
-
if (!
|
|
252
|
-
return
|
|
253
|
-
if (
|
|
254
|
-
switch (
|
|
332
|
+
function W(e, n) {
|
|
333
|
+
if (!n)
|
|
334
|
+
return e === null || typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
335
|
+
if (b(e, n)) return !0;
|
|
336
|
+
switch (n) {
|
|
255
337
|
case "Int":
|
|
256
|
-
return typeof
|
|
338
|
+
return typeof e == "number";
|
|
257
339
|
case "Long":
|
|
258
|
-
return typeof
|
|
340
|
+
return typeof e == "number" || typeof e == "bigint";
|
|
259
341
|
case "Float":
|
|
260
|
-
return typeof
|
|
342
|
+
return typeof e == "number";
|
|
261
343
|
case "Double":
|
|
262
|
-
return typeof
|
|
344
|
+
return typeof e == "number";
|
|
263
345
|
case "String":
|
|
264
|
-
return typeof
|
|
346
|
+
return typeof e == "string";
|
|
265
347
|
case "Bytes":
|
|
266
348
|
throw Error("Bytes not yet supported");
|
|
267
349
|
default:
|
|
268
|
-
throw Error(`unsupported data type: ${
|
|
350
|
+
throw Error(`unsupported data type: ${n}`);
|
|
269
351
|
}
|
|
270
352
|
}
|
|
271
|
-
function
|
|
272
|
-
if (
|
|
273
|
-
if (typeof
|
|
274
|
-
throw new Error(`Type ${typeof
|
|
353
|
+
function De(e) {
|
|
354
|
+
if (e === null || typeof e == "string" || typeof e == "number") return e;
|
|
355
|
+
if (typeof e == "bigint") return { bigint: e.toString() };
|
|
356
|
+
throw new Error(`Type ${typeof e} (value ${e}) not yet supported.`);
|
|
275
357
|
}
|
|
276
|
-
function
|
|
277
|
-
if (
|
|
278
|
-
if (
|
|
279
|
-
throw new Error(`Unexpected value type, got ${typeof
|
|
280
|
-
return
|
|
358
|
+
function G(e, n) {
|
|
359
|
+
if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "bigint") {
|
|
360
|
+
if (n && !b(e, n) && !W(e, n))
|
|
361
|
+
throw new Error(`Unexpected value type, got ${typeof e}, expected ${n}`);
|
|
362
|
+
return e;
|
|
281
363
|
}
|
|
282
|
-
if (typeof
|
|
283
|
-
if (
|
|
284
|
-
throw new Error(`Unexpected value type, got serialized bigint, expected ${
|
|
285
|
-
return BigInt(
|
|
364
|
+
if (typeof e == "object" && e !== null && "bigint" in e && typeof e.bigint == "string") {
|
|
365
|
+
if (n && n !== "Long")
|
|
366
|
+
throw new Error(`Unexpected value type, got serialized bigint, expected ${n}`);
|
|
367
|
+
return BigInt(e.bigint);
|
|
286
368
|
}
|
|
287
|
-
throw new Error(`Unsupported type ${typeof
|
|
369
|
+
throw new Error(`Unsupported type ${typeof e} (value ${e}).`);
|
|
288
370
|
}
|
|
289
|
-
function
|
|
290
|
-
if (
|
|
291
|
-
return
|
|
371
|
+
function Le(e) {
|
|
372
|
+
if (e = X(e), e === null) throw new Error("Value is null");
|
|
373
|
+
return e;
|
|
292
374
|
}
|
|
293
|
-
function
|
|
294
|
-
if (
|
|
295
|
-
if (typeof
|
|
296
|
-
if (typeof
|
|
297
|
-
if (!isFinite(
|
|
298
|
-
return
|
|
375
|
+
function X(e) {
|
|
376
|
+
if (e = G(e), e === null) return null;
|
|
377
|
+
if (typeof e == "string") return e;
|
|
378
|
+
if (typeof e == "number") {
|
|
379
|
+
if (!isFinite(e)) throw new Error(`Value is not finite (${e})`);
|
|
380
|
+
return e;
|
|
299
381
|
}
|
|
300
|
-
if (typeof
|
|
301
|
-
return Number(
|
|
302
|
-
throw new Error(`Unexpected value type: ${typeof
|
|
303
|
-
}
|
|
304
|
-
function
|
|
305
|
-
const t = Math.floor(
|
|
306
|
-
return (
|
|
307
|
-
}
|
|
308
|
-
const
|
|
309
|
-
function
|
|
310
|
-
return typeof
|
|
311
|
-
}
|
|
312
|
-
function
|
|
313
|
-
if (
|
|
314
|
-
return t.absent === void 0 ?
|
|
315
|
-
const r =
|
|
316
|
-
if (
|
|
382
|
+
if (typeof e == "bigint")
|
|
383
|
+
return Number(e);
|
|
384
|
+
throw new Error(`Unexpected value type: ${typeof e}`);
|
|
385
|
+
}
|
|
386
|
+
function Q(e, n) {
|
|
387
|
+
const t = Math.floor(n / 8), r = 1 << 7 - n % 8;
|
|
388
|
+
return (e[t] & r) > 0;
|
|
389
|
+
}
|
|
390
|
+
const Y = { type: "absent" }, Z = null;
|
|
391
|
+
function Be(e) {
|
|
392
|
+
return typeof e == "object" && e !== null && e.type === "absent";
|
|
393
|
+
}
|
|
394
|
+
function Ue(e, n, t = {}) {
|
|
395
|
+
if (Q(e.absent, n))
|
|
396
|
+
return t.absent === void 0 ? Y : t.absent;
|
|
397
|
+
const r = e.data[n], o = e.type;
|
|
398
|
+
if (b(r, o)) return t.na === void 0 ? Z : t.na;
|
|
317
399
|
switch (o) {
|
|
318
400
|
case "Int":
|
|
319
401
|
return r;
|
|
@@ -331,109 +413,109 @@ function jn(n, e, t = {}) {
|
|
|
331
413
|
throw Error(`unsupported data type: ${o}`);
|
|
332
414
|
}
|
|
333
415
|
}
|
|
334
|
-
function
|
|
416
|
+
function Ke(e) {
|
|
335
417
|
return {
|
|
336
|
-
kind:
|
|
337
|
-
valueType:
|
|
338
|
-
name:
|
|
339
|
-
domain:
|
|
340
|
-
parentAxes:
|
|
341
|
-
axesId:
|
|
418
|
+
kind: e.kind,
|
|
419
|
+
valueType: e.valueType,
|
|
420
|
+
name: e.name,
|
|
421
|
+
domain: e.domain,
|
|
422
|
+
parentAxes: e.parentAxes,
|
|
423
|
+
axesId: C(e.axesSpec)
|
|
342
424
|
};
|
|
343
425
|
}
|
|
344
|
-
function
|
|
426
|
+
function Me(e) {
|
|
345
427
|
return {
|
|
346
|
-
columnId:
|
|
347
|
-
spec:
|
|
428
|
+
columnId: e.id,
|
|
429
|
+
spec: e.spec
|
|
348
430
|
};
|
|
349
431
|
}
|
|
350
|
-
function
|
|
351
|
-
const { type:
|
|
432
|
+
function y(e) {
|
|
433
|
+
const { type: n, name: t, domain: r } = e, o = { type: n, name: t };
|
|
352
434
|
return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
|
|
353
435
|
}
|
|
354
|
-
function
|
|
355
|
-
return
|
|
436
|
+
function C(e) {
|
|
437
|
+
return e.map(y);
|
|
356
438
|
}
|
|
357
|
-
function
|
|
358
|
-
return y(
|
|
439
|
+
function _e(e) {
|
|
440
|
+
return h(y(e));
|
|
359
441
|
}
|
|
360
|
-
function
|
|
361
|
-
if (
|
|
362
|
-
if (
|
|
363
|
-
for (const t in
|
|
364
|
-
if (
|
|
442
|
+
function ee(e, n) {
|
|
443
|
+
if (e === void 0) return n === void 0;
|
|
444
|
+
if (n === void 0) return !0;
|
|
445
|
+
for (const t in n)
|
|
446
|
+
if (e[t] !== n[t]) return !1;
|
|
365
447
|
return !0;
|
|
366
448
|
}
|
|
367
|
-
function
|
|
368
|
-
return
|
|
449
|
+
function ne(e, n) {
|
|
450
|
+
return e.name === n.name && ee(e.domain, n.domain);
|
|
369
451
|
}
|
|
370
|
-
function
|
|
371
|
-
return { ...
|
|
452
|
+
function qe(e, n) {
|
|
453
|
+
return { ...e, src: g(e.src, n) };
|
|
372
454
|
}
|
|
373
|
-
function
|
|
374
|
-
switch (
|
|
455
|
+
function g(e, n) {
|
|
456
|
+
switch (e.type) {
|
|
375
457
|
case "column":
|
|
376
458
|
return {
|
|
377
459
|
type: "column",
|
|
378
|
-
column: e
|
|
460
|
+
column: n(e.column)
|
|
379
461
|
};
|
|
380
462
|
case "slicedColumn":
|
|
381
463
|
return {
|
|
382
464
|
type: "slicedColumn",
|
|
383
|
-
column: e
|
|
384
|
-
newId:
|
|
385
|
-
axisFilters:
|
|
465
|
+
column: n(e.column),
|
|
466
|
+
newId: e.newId,
|
|
467
|
+
axisFilters: e.axisFilters
|
|
386
468
|
};
|
|
387
469
|
case "inlineColumn":
|
|
388
|
-
return
|
|
470
|
+
return e;
|
|
389
471
|
case "inner":
|
|
390
472
|
case "full":
|
|
391
473
|
return {
|
|
392
|
-
type:
|
|
393
|
-
entries:
|
|
474
|
+
type: e.type,
|
|
475
|
+
entries: e.entries.map((t) => g(t, n))
|
|
394
476
|
};
|
|
395
477
|
case "outer":
|
|
396
478
|
return {
|
|
397
479
|
type: "outer",
|
|
398
|
-
primary:
|
|
399
|
-
secondary:
|
|
480
|
+
primary: g(e.primary, n),
|
|
481
|
+
secondary: e.secondary.map((t) => g(t, n))
|
|
400
482
|
};
|
|
401
483
|
default:
|
|
402
|
-
|
|
484
|
+
A(e);
|
|
403
485
|
}
|
|
404
486
|
}
|
|
405
|
-
function
|
|
406
|
-
switch (
|
|
487
|
+
function Te(e) {
|
|
488
|
+
switch (e.type) {
|
|
407
489
|
case "axis":
|
|
408
490
|
return {
|
|
409
491
|
type: "axis",
|
|
410
|
-
id:
|
|
492
|
+
id: e.id
|
|
411
493
|
};
|
|
412
494
|
case "column":
|
|
413
495
|
return {
|
|
414
496
|
type: "column",
|
|
415
|
-
id:
|
|
497
|
+
id: e.id
|
|
416
498
|
};
|
|
417
499
|
}
|
|
418
500
|
}
|
|
419
|
-
function
|
|
420
|
-
return
|
|
501
|
+
function te(e) {
|
|
502
|
+
return h(e);
|
|
421
503
|
}
|
|
422
|
-
function
|
|
423
|
-
return JSON.parse(
|
|
504
|
+
function ze(e) {
|
|
505
|
+
return JSON.parse(e);
|
|
424
506
|
}
|
|
425
|
-
function P(
|
|
426
|
-
return y(
|
|
507
|
+
function P(e) {
|
|
508
|
+
return h(y(e));
|
|
427
509
|
}
|
|
428
|
-
function
|
|
429
|
-
return JSON.stringify([
|
|
510
|
+
function E(e, n) {
|
|
511
|
+
return JSON.stringify([e, n]);
|
|
430
512
|
}
|
|
431
|
-
class
|
|
513
|
+
class He {
|
|
432
514
|
/**
|
|
433
515
|
* Creates a new anchor context from a set of anchor column specifications
|
|
434
516
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
435
517
|
*/
|
|
436
|
-
constructor(
|
|
518
|
+
constructor(n) {
|
|
437
519
|
l(this, "domains", /* @__PURE__ */ new Map());
|
|
438
520
|
l(this, "axes", /* @__PURE__ */ new Map());
|
|
439
521
|
/**
|
|
@@ -445,19 +527,19 @@ class Mn {
|
|
|
445
527
|
* Maps domain packs to anchors
|
|
446
528
|
*/
|
|
447
529
|
l(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
|
|
448
|
-
this.anchors =
|
|
449
|
-
const t = Object.entries(
|
|
530
|
+
this.anchors = n;
|
|
531
|
+
const t = Object.entries(n);
|
|
450
532
|
t.sort((r, o) => r[0].localeCompare(o[0]));
|
|
451
533
|
for (const [r, o] of t) {
|
|
452
|
-
for (let
|
|
453
|
-
const a = o.axesSpec[
|
|
454
|
-
this.axes.set(
|
|
534
|
+
for (let i = 0; i < o.axesSpec.length; i++) {
|
|
535
|
+
const a = o.axesSpec[i], s = P(a);
|
|
536
|
+
this.axes.set(s, { anchor: r, idx: i });
|
|
455
537
|
}
|
|
456
538
|
if (o.domain !== void 0) {
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
for (const [a,
|
|
460
|
-
const u =
|
|
539
|
+
const i = Object.entries(o.domain);
|
|
540
|
+
i.sort((a, s) => a[0].localeCompare(s[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([a]) => a));
|
|
541
|
+
for (const [a, s] of i) {
|
|
542
|
+
const u = E(a, s);
|
|
461
543
|
this.domains.set(u, r);
|
|
462
544
|
}
|
|
463
545
|
}
|
|
@@ -466,57 +548,57 @@ class Mn {
|
|
|
466
548
|
/**
|
|
467
549
|
* Implementation of derive method
|
|
468
550
|
*/
|
|
469
|
-
derive(
|
|
551
|
+
derive(n, t) {
|
|
470
552
|
const r = {
|
|
471
|
-
name:
|
|
553
|
+
name: n.name,
|
|
472
554
|
axes: []
|
|
473
555
|
};
|
|
474
556
|
let o;
|
|
475
|
-
if (
|
|
476
|
-
|
|
557
|
+
if (n.domain !== void 0)
|
|
558
|
+
e:
|
|
477
559
|
for (const a of this.domainPacks) {
|
|
478
|
-
const
|
|
560
|
+
const s = [];
|
|
479
561
|
for (const c of a) {
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
|
|
562
|
+
const f = n.domain[c];
|
|
563
|
+
if (f !== void 0)
|
|
564
|
+
s.push([c, f]);
|
|
483
565
|
else
|
|
484
|
-
break
|
|
566
|
+
break e;
|
|
485
567
|
}
|
|
486
|
-
const u = this.domainPackToAnchor.get(JSON.stringify(
|
|
568
|
+
const u = this.domainPackToAnchor.get(JSON.stringify(s));
|
|
487
569
|
if (u !== void 0) {
|
|
488
570
|
r.domainAnchor = u, o = new Set(a);
|
|
489
571
|
break;
|
|
490
572
|
}
|
|
491
573
|
}
|
|
492
|
-
for (const [a,
|
|
574
|
+
for (const [a, s] of Object.entries(n.domain ?? {})) {
|
|
493
575
|
if (o !== void 0 && o.has(a))
|
|
494
576
|
continue;
|
|
495
|
-
const u =
|
|
496
|
-
r.domain ?? (r.domain = {}), r.domain[a] = c ? { anchor: c } :
|
|
577
|
+
const u = E(a, s), c = this.domains.get(u);
|
|
578
|
+
r.domain ?? (r.domain = {}), r.domain[a] = c ? { anchor: c } : s;
|
|
497
579
|
}
|
|
498
|
-
if (r.axes =
|
|
499
|
-
const
|
|
500
|
-
return u === void 0 ?
|
|
580
|
+
if (r.axes = n.axesSpec.map((a) => {
|
|
581
|
+
const s = P(a), u = this.axes.get(s);
|
|
582
|
+
return u === void 0 ? y(a) : u;
|
|
501
583
|
}), !t || t.length === 0)
|
|
502
584
|
return r;
|
|
503
|
-
const
|
|
585
|
+
const i = [];
|
|
504
586
|
for (const a of t) {
|
|
505
|
-
const [
|
|
506
|
-
if (typeof
|
|
507
|
-
if (
|
|
508
|
-
throw new Error(`Axis index ${
|
|
509
|
-
|
|
587
|
+
const [s, u] = a;
|
|
588
|
+
if (typeof s == "number") {
|
|
589
|
+
if (s < 0 || s >= n.axesSpec.length)
|
|
590
|
+
throw new Error(`Axis index ${s} is out of bounds (0-${n.axesSpec.length - 1})`);
|
|
591
|
+
i.push([s, u]);
|
|
510
592
|
} else {
|
|
511
|
-
const c =
|
|
593
|
+
const c = n.axesSpec.findIndex((f) => f.name === s);
|
|
512
594
|
if (c === -1)
|
|
513
|
-
throw new Error(`Axis with name "${
|
|
514
|
-
|
|
595
|
+
throw new Error(`Axis with name "${s}" not found in the column specification`);
|
|
596
|
+
i.push([c, u]);
|
|
515
597
|
}
|
|
516
598
|
}
|
|
517
|
-
return
|
|
599
|
+
return i.sort((a, s) => a[0] - s[0]), {
|
|
518
600
|
source: r,
|
|
519
|
-
axisFilters:
|
|
601
|
+
axisFilters: i
|
|
520
602
|
};
|
|
521
603
|
}
|
|
522
604
|
/**
|
|
@@ -525,58 +607,58 @@ class Mn {
|
|
|
525
607
|
* @param axisFilters Optional axis filters to apply to the column
|
|
526
608
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
527
609
|
*/
|
|
528
|
-
deriveS(
|
|
529
|
-
return
|
|
610
|
+
deriveS(n, t) {
|
|
611
|
+
return te(this.derive(n, t));
|
|
530
612
|
}
|
|
531
613
|
}
|
|
532
|
-
function
|
|
533
|
-
const r = { ...
|
|
614
|
+
function We(e, n, t) {
|
|
615
|
+
const r = { ...n }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? !1;
|
|
534
616
|
if (r.domainAnchor !== void 0) {
|
|
535
|
-
const
|
|
536
|
-
if (!
|
|
617
|
+
const i = e[r.domainAnchor];
|
|
618
|
+
if (!i)
|
|
537
619
|
throw new Error(`Anchor "${r.domainAnchor}" not found`);
|
|
538
|
-
const a =
|
|
620
|
+
const a = i.domain || {};
|
|
539
621
|
r.domain = { ...a, ...r.domain }, delete r.domainAnchor;
|
|
540
622
|
}
|
|
541
623
|
if (r.domain) {
|
|
542
|
-
const
|
|
543
|
-
for (const [a,
|
|
544
|
-
if (typeof
|
|
545
|
-
|
|
624
|
+
const i = {};
|
|
625
|
+
for (const [a, s] of Object.entries(r.domain))
|
|
626
|
+
if (typeof s == "string")
|
|
627
|
+
i[a] = s;
|
|
546
628
|
else {
|
|
547
|
-
const u =
|
|
629
|
+
const u = e[s.anchor];
|
|
548
630
|
if (!u)
|
|
549
|
-
throw new Error(`Anchor "${
|
|
631
|
+
throw new Error(`Anchor "${s.anchor}" not found for domain key "${a}"`);
|
|
550
632
|
if (!u.domain || u.domain[a] === void 0) {
|
|
551
633
|
if (!o)
|
|
552
|
-
throw new Error(`Domain key "${a}" not found in anchor "${
|
|
634
|
+
throw new Error(`Domain key "${a}" not found in anchor "${s.anchor}"`);
|
|
553
635
|
continue;
|
|
554
636
|
}
|
|
555
|
-
|
|
637
|
+
i[a] = u.domain[a];
|
|
556
638
|
}
|
|
557
|
-
r.domain =
|
|
639
|
+
r.domain = i;
|
|
558
640
|
}
|
|
559
|
-
return r.axes && (r.axes = r.axes.map((
|
|
641
|
+
return r.axes && (r.axes = r.axes.map((i) => re(e, i))), r;
|
|
560
642
|
}
|
|
561
|
-
function
|
|
562
|
-
if (!
|
|
563
|
-
return
|
|
564
|
-
const t =
|
|
643
|
+
function re(e, n) {
|
|
644
|
+
if (!oe(n))
|
|
645
|
+
return n;
|
|
646
|
+
const t = n.anchor, r = e[t];
|
|
565
647
|
if (!r)
|
|
566
648
|
throw new Error(`Anchor "${t}" not found for axis reference`);
|
|
567
|
-
if ("idx" in
|
|
568
|
-
if (
|
|
569
|
-
throw new Error(`Axis index ${
|
|
570
|
-
return r.axesSpec[
|
|
571
|
-
} else if ("name" in
|
|
572
|
-
const o = r.axesSpec.filter((
|
|
649
|
+
if ("idx" in n) {
|
|
650
|
+
if (n.idx < 0 || n.idx >= r.axesSpec.length)
|
|
651
|
+
throw new Error(`Axis index ${n.idx} out of bounds for anchor "${t}"`);
|
|
652
|
+
return r.axesSpec[n.idx];
|
|
653
|
+
} else if ("name" in n) {
|
|
654
|
+
const o = r.axesSpec.filter((i) => i.name === n.name);
|
|
573
655
|
if (o.length > 1)
|
|
574
|
-
throw new Error(`Multiple axes with name "${
|
|
656
|
+
throw new Error(`Multiple axes with name "${n.name}" found in anchor "${t}"`);
|
|
575
657
|
if (o.length === 0)
|
|
576
|
-
throw new Error(`Axis with name "${
|
|
658
|
+
throw new Error(`Axis with name "${n.name}" not found in anchor "${t}"`);
|
|
577
659
|
return o[0];
|
|
578
|
-
} else if ("id" in
|
|
579
|
-
const o = r.axesSpec.filter((
|
|
660
|
+
} else if ("id" in n) {
|
|
661
|
+
const o = r.axesSpec.filter((i) => ne(n.id, y(i)));
|
|
580
662
|
if (o.length > 1)
|
|
581
663
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
582
664
|
if (o.length === 0)
|
|
@@ -585,42 +667,42 @@ function en(n, e) {
|
|
|
585
667
|
}
|
|
586
668
|
throw new Error("Unsupported axis reference type");
|
|
587
669
|
}
|
|
588
|
-
function
|
|
589
|
-
return typeof
|
|
670
|
+
function oe(e) {
|
|
671
|
+
return typeof e == "object" && "anchor" in e;
|
|
590
672
|
}
|
|
591
|
-
function
|
|
592
|
-
return typeof
|
|
673
|
+
function Ge(e) {
|
|
674
|
+
return typeof e == "object" && e !== null && "source" in e && "axisFilters" in e;
|
|
593
675
|
}
|
|
594
|
-
function
|
|
595
|
-
return
|
|
676
|
+
function d(e) {
|
|
677
|
+
return e.kind === "PColumn";
|
|
596
678
|
}
|
|
597
|
-
function
|
|
598
|
-
return
|
|
679
|
+
function ie(e) {
|
|
680
|
+
return d(e.spec);
|
|
599
681
|
}
|
|
600
|
-
function
|
|
601
|
-
return
|
|
682
|
+
function Xe(e) {
|
|
683
|
+
return d(e.obj);
|
|
602
684
|
}
|
|
603
|
-
function
|
|
604
|
-
return
|
|
685
|
+
function Qe(e) {
|
|
686
|
+
return d(e.obj.spec);
|
|
605
687
|
}
|
|
606
|
-
function
|
|
607
|
-
if (!
|
|
608
|
-
return
|
|
688
|
+
function Ye(e) {
|
|
689
|
+
if (!ie(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
|
|
690
|
+
return e;
|
|
609
691
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
612
|
-
...
|
|
613
|
-
data: e
|
|
692
|
+
function Ze(e, n) {
|
|
693
|
+
return e === void 0 ? void 0 : {
|
|
694
|
+
...e,
|
|
695
|
+
data: n(e.data)
|
|
614
696
|
};
|
|
615
697
|
}
|
|
616
|
-
function
|
|
617
|
-
const
|
|
698
|
+
function en(e) {
|
|
699
|
+
const n = /* @__PURE__ */ new Map(), t = (r) => {
|
|
618
700
|
switch (r.type) {
|
|
619
701
|
case "column":
|
|
620
|
-
|
|
702
|
+
n.set(r.column.id, r.column);
|
|
621
703
|
return;
|
|
622
704
|
case "slicedColumn":
|
|
623
|
-
|
|
705
|
+
n.set(r.column.id, r.column);
|
|
624
706
|
return;
|
|
625
707
|
case "inlineColumn":
|
|
626
708
|
return;
|
|
@@ -633,390 +715,463 @@ function Gn(n) {
|
|
|
633
715
|
for (const o of r.secondary) t(o);
|
|
634
716
|
return;
|
|
635
717
|
default:
|
|
636
|
-
|
|
718
|
+
A(r);
|
|
637
719
|
}
|
|
638
720
|
};
|
|
639
|
-
return t(
|
|
721
|
+
return t(e), [...n.values()];
|
|
640
722
|
}
|
|
641
|
-
function
|
|
642
|
-
throw new Error("Unexpected object: " +
|
|
723
|
+
function se(e) {
|
|
724
|
+
throw new Error("Unexpected object: " + e);
|
|
643
725
|
}
|
|
644
|
-
function
|
|
645
|
-
switch (
|
|
726
|
+
function w(e, n) {
|
|
727
|
+
switch (e.type) {
|
|
646
728
|
case "and":
|
|
647
|
-
for (const t of
|
|
648
|
-
if (!
|
|
729
|
+
for (const t of e.operands)
|
|
730
|
+
if (!w(t, n)) return !1;
|
|
649
731
|
return !0;
|
|
650
732
|
case "or":
|
|
651
|
-
for (const t of
|
|
652
|
-
if (
|
|
733
|
+
for (const t of e.operands)
|
|
734
|
+
if (w(t, n)) return !0;
|
|
653
735
|
return !1;
|
|
654
736
|
case "not":
|
|
655
|
-
return !
|
|
737
|
+
return !w(e.operand, n);
|
|
656
738
|
case "name":
|
|
657
|
-
return
|
|
739
|
+
return d(n) && n.name === e.name;
|
|
658
740
|
case "name_pattern":
|
|
659
|
-
return
|
|
741
|
+
return d(n) && !!n.name.match(e.pattern);
|
|
660
742
|
case "annotation":
|
|
661
|
-
return
|
|
743
|
+
return d(n) && n.annotations !== void 0 && n.annotations[e.annotation] === e.value;
|
|
662
744
|
case "annotation_pattern":
|
|
663
|
-
return
|
|
745
|
+
return d(n) && n.annotations !== void 0 && n.annotations[e.annotation] !== void 0 && !!n.annotations[e.annotation].match(e.pattern);
|
|
664
746
|
case "has_axes":
|
|
665
|
-
return
|
|
666
|
-
(t) =>
|
|
747
|
+
return d(n) && e.axes.every(
|
|
748
|
+
(t) => n.axesSpec.some(
|
|
667
749
|
(r) => (t.type === void 0 || t.type === r.type) && (t.name === void 0 || t.name === r.name) && (t.domain === void 0 || Object.keys(t.domain).length === 0 || r.domain !== void 0 && Object.entries(t.domain).every(
|
|
668
|
-
([o,
|
|
750
|
+
([o, i]) => r.domain[o] === i
|
|
669
751
|
))
|
|
670
752
|
)
|
|
671
753
|
);
|
|
672
754
|
default:
|
|
673
|
-
|
|
755
|
+
se(e);
|
|
674
756
|
}
|
|
675
757
|
}
|
|
676
|
-
function
|
|
677
|
-
if (
|
|
758
|
+
function S(e, n) {
|
|
759
|
+
if (e.name !== void 0 && e.name !== n.name)
|
|
678
760
|
return !1;
|
|
679
|
-
if (
|
|
680
|
-
if (Array.isArray(
|
|
681
|
-
if (!
|
|
761
|
+
if (e.type !== void 0) {
|
|
762
|
+
if (Array.isArray(e.type)) {
|
|
763
|
+
if (!e.type.includes(n.type))
|
|
682
764
|
return !1;
|
|
683
|
-
} else if (
|
|
765
|
+
} else if (e.type !== n.type)
|
|
684
766
|
return !1;
|
|
685
767
|
}
|
|
686
|
-
if (
|
|
687
|
-
const t =
|
|
688
|
-
for (const [r, o] of Object.entries(
|
|
768
|
+
if (e.domain !== void 0) {
|
|
769
|
+
const t = n.domain || {};
|
|
770
|
+
for (const [r, o] of Object.entries(e.domain))
|
|
689
771
|
if (t[r] !== o)
|
|
690
772
|
return !1;
|
|
691
773
|
}
|
|
692
774
|
return !0;
|
|
693
775
|
}
|
|
694
|
-
function
|
|
695
|
-
if (
|
|
776
|
+
function v(e, n) {
|
|
777
|
+
if (n.name !== void 0 && e.name !== n.name || n.namePattern !== void 0 && !new RegExp(n.namePattern).test(e.name))
|
|
696
778
|
return !1;
|
|
697
|
-
if (
|
|
698
|
-
if (Array.isArray(
|
|
699
|
-
if (!
|
|
779
|
+
if (n.type !== void 0) {
|
|
780
|
+
if (Array.isArray(n.type)) {
|
|
781
|
+
if (!n.type.includes(e.valueType))
|
|
700
782
|
return !1;
|
|
701
|
-
} else if (
|
|
783
|
+
} else if (n.type !== e.valueType)
|
|
702
784
|
return !1;
|
|
703
785
|
}
|
|
704
|
-
if (
|
|
705
|
-
const t =
|
|
706
|
-
for (const [r, o] of Object.entries(
|
|
786
|
+
if (n.domain !== void 0) {
|
|
787
|
+
const t = e.domain || {};
|
|
788
|
+
for (const [r, o] of Object.entries(n.domain))
|
|
707
789
|
if (t[r] !== o)
|
|
708
790
|
return !1;
|
|
709
791
|
}
|
|
710
|
-
if (
|
|
711
|
-
const t =
|
|
712
|
-
if (
|
|
713
|
-
for (const r of
|
|
714
|
-
if (!t.some((o) =>
|
|
792
|
+
if (n.axes !== void 0) {
|
|
793
|
+
const t = e.axesSpec.map(y);
|
|
794
|
+
if (n.partialAxesMatch) {
|
|
795
|
+
for (const r of n.axes)
|
|
796
|
+
if (!t.some((o) => S(r, o)))
|
|
715
797
|
return !1;
|
|
716
798
|
} else {
|
|
717
|
-
if (t.length !==
|
|
799
|
+
if (t.length !== n.axes.length)
|
|
718
800
|
return !1;
|
|
719
|
-
for (let r = 0; r <
|
|
720
|
-
if (!
|
|
801
|
+
for (let r = 0; r < n.axes.length; r++)
|
|
802
|
+
if (!S(n.axes[r], t[r]))
|
|
721
803
|
return !1;
|
|
722
804
|
}
|
|
723
805
|
}
|
|
724
|
-
if (
|
|
725
|
-
const t =
|
|
726
|
-
for (const [r, o] of Object.entries(
|
|
806
|
+
if (n.annotations !== void 0) {
|
|
807
|
+
const t = e.annotations || {};
|
|
808
|
+
for (const [r, o] of Object.entries(n.annotations))
|
|
727
809
|
if (t[r] !== o)
|
|
728
810
|
return !1;
|
|
729
811
|
}
|
|
730
|
-
if (
|
|
731
|
-
const t =
|
|
732
|
-
for (const [r, o] of Object.entries(
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
812
|
+
if (n.annotationPatterns !== void 0) {
|
|
813
|
+
const t = e.annotations || {};
|
|
814
|
+
for (const [r, o] of Object.entries(n.annotationPatterns)) {
|
|
815
|
+
const i = t[r];
|
|
816
|
+
if (i === void 0 || !new RegExp(o).test(i))
|
|
735
817
|
return !1;
|
|
736
818
|
}
|
|
737
819
|
}
|
|
738
820
|
return !0;
|
|
739
821
|
}
|
|
740
|
-
function
|
|
741
|
-
return Array.isArray(
|
|
822
|
+
function nn(e) {
|
|
823
|
+
return Array.isArray(e) ? (n) => e.some((t) => d(n) && v(n, t)) : (n) => d(n) && v(n, e);
|
|
742
824
|
}
|
|
743
|
-
function
|
|
744
|
-
const
|
|
745
|
-
kind:
|
|
746
|
-
name:
|
|
825
|
+
function tn(e) {
|
|
826
|
+
const n = {
|
|
827
|
+
kind: e.kind,
|
|
828
|
+
name: e.name
|
|
747
829
|
};
|
|
748
|
-
return
|
|
830
|
+
return e.domain !== void 0 && (n.domain = e.domain), d(e) && (n.axesSpec = C(e.axesSpec)), h(n);
|
|
749
831
|
}
|
|
750
|
-
const
|
|
751
|
-
__isRef:
|
|
752
|
-
blockId:
|
|
753
|
-
name:
|
|
754
|
-
requireEnrichments:
|
|
832
|
+
const rn = { href: "/" }, on = p.object({
|
|
833
|
+
__isRef: p.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
834
|
+
blockId: p.string().describe("Upstream block id"),
|
|
835
|
+
name: p.string().describe("Name of the output provided to the upstream block's output context"),
|
|
836
|
+
requireEnrichments: p.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")
|
|
755
837
|
}).describe(
|
|
756
838
|
"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."
|
|
757
839
|
).readonly();
|
|
758
|
-
function
|
|
759
|
-
return typeof
|
|
840
|
+
function sn(e) {
|
|
841
|
+
return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === !0 && "blockId" in e && "name" in e;
|
|
760
842
|
}
|
|
761
|
-
function
|
|
843
|
+
function an(e, n, t = !1) {
|
|
762
844
|
return t ? {
|
|
763
845
|
__isRef: !0,
|
|
764
|
-
blockId:
|
|
765
|
-
name:
|
|
846
|
+
blockId: e,
|
|
847
|
+
name: n,
|
|
766
848
|
requireEnrichments: !0
|
|
767
849
|
} : {
|
|
768
850
|
__isRef: !0,
|
|
769
|
-
blockId:
|
|
770
|
-
name:
|
|
851
|
+
blockId: e,
|
|
852
|
+
name: n
|
|
771
853
|
};
|
|
772
854
|
}
|
|
773
|
-
function
|
|
774
|
-
if (
|
|
855
|
+
function un(e, n = !0) {
|
|
856
|
+
if (n)
|
|
775
857
|
return {
|
|
776
|
-
...
|
|
858
|
+
...e,
|
|
777
859
|
requireEnrichments: !0
|
|
778
860
|
};
|
|
779
861
|
{
|
|
780
|
-
const { requireEnrichments: t, ...r } =
|
|
862
|
+
const { requireEnrichments: t, ...r } = e;
|
|
781
863
|
return r;
|
|
782
864
|
}
|
|
783
865
|
}
|
|
784
|
-
function
|
|
785
|
-
return
|
|
866
|
+
function cn(e, n, t = !1) {
|
|
867
|
+
return e.blockId === n.blockId && e.name === n.name && (t || e.requireEnrichments === n.requireEnrichments);
|
|
786
868
|
}
|
|
787
|
-
function
|
|
788
|
-
return
|
|
869
|
+
function fn(e, n) {
|
|
870
|
+
return e.ok ? { ok: !0, value: n(e.value) } : e;
|
|
789
871
|
}
|
|
790
|
-
function
|
|
791
|
-
if (
|
|
792
|
-
return new DataView(
|
|
793
|
-
if (
|
|
872
|
+
function ae(e) {
|
|
873
|
+
if (e instanceof Int8Array || e instanceof Uint8Array || e instanceof Uint8ClampedArray)
|
|
874
|
+
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
875
|
+
if (e instanceof ArrayBuffer) return new DataView(e);
|
|
794
876
|
throw new TypeError(
|
|
795
877
|
"Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray"
|
|
796
878
|
);
|
|
797
879
|
}
|
|
798
|
-
const
|
|
799
|
-
function
|
|
880
|
+
const ue = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", ce = "0123456789ABCDEFGHIJKLMNOPQRSTUV", fe = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
881
|
+
function $(e, n, t) {
|
|
800
882
|
t = t || {};
|
|
801
883
|
let r, o;
|
|
802
|
-
switch (
|
|
884
|
+
switch (n) {
|
|
803
885
|
case "RFC3548":
|
|
804
886
|
case "RFC4648":
|
|
805
|
-
r =
|
|
887
|
+
r = ue, o = !0;
|
|
806
888
|
break;
|
|
807
889
|
case "RFC4648-HEX":
|
|
808
|
-
r =
|
|
890
|
+
r = ce, o = !0;
|
|
809
891
|
break;
|
|
810
892
|
case "Crockford":
|
|
811
|
-
r =
|
|
893
|
+
r = fe, o = !1;
|
|
812
894
|
break;
|
|
813
895
|
default:
|
|
814
|
-
throw new Error("Unknown base32 variant: " + String(
|
|
815
|
-
}
|
|
816
|
-
const
|
|
817
|
-
let
|
|
818
|
-
for (let
|
|
819
|
-
for (u = u << 8 | a.getUint8(
|
|
820
|
-
c += r[u >>>
|
|
821
|
-
if (
|
|
896
|
+
throw new Error("Unknown base32 variant: " + String(n));
|
|
897
|
+
}
|
|
898
|
+
const i = t.padding !== void 0 ? t.padding : o, a = ae(e);
|
|
899
|
+
let s = 0, u = 0, c = "";
|
|
900
|
+
for (let f = 0; f < a.byteLength; f++)
|
|
901
|
+
for (u = u << 8 | a.getUint8(f), s += 8; s >= 5; )
|
|
902
|
+
c += r[u >>> s - 5 & 31], s -= 5;
|
|
903
|
+
if (s > 0 && (c += r[u << 5 - s & 31]), i)
|
|
822
904
|
for (; c.length % 8 !== 0; )
|
|
823
905
|
c += "=";
|
|
824
906
|
return c;
|
|
825
907
|
}
|
|
826
|
-
const
|
|
827
|
-
function
|
|
828
|
-
const
|
|
829
|
-
return crypto.getRandomValues(
|
|
908
|
+
const V = 15, de = 24, I = p.string().length(de).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
909
|
+
function dn() {
|
|
910
|
+
const e = new Uint8Array(V);
|
|
911
|
+
return crypto.getRandomValues(e), I.parse($(e, "RFC4648"));
|
|
830
912
|
}
|
|
831
|
-
function
|
|
832
|
-
if (
|
|
833
|
-
return I.parse(
|
|
913
|
+
function le(e) {
|
|
914
|
+
if (e.length !== V) throw new Error(`Wrong number of bytes: ${e.length}`);
|
|
915
|
+
return I.parse($(e, "RFC4648"));
|
|
834
916
|
}
|
|
835
|
-
async function
|
|
836
|
-
const
|
|
837
|
-
return
|
|
917
|
+
async function ln(e) {
|
|
918
|
+
const n = new TextEncoder(), t = await crypto.subtle.digest("SHA-256", n.encode(e));
|
|
919
|
+
return le(new Uint8Array(t.slice(0, 15)));
|
|
838
920
|
}
|
|
839
|
-
function
|
|
840
|
-
return JSON.stringify(
|
|
921
|
+
function pn(e) {
|
|
922
|
+
return JSON.stringify(e);
|
|
841
923
|
}
|
|
842
|
-
function
|
|
843
|
-
return
|
|
924
|
+
function mn(e) {
|
|
925
|
+
return h(e);
|
|
844
926
|
}
|
|
845
|
-
function
|
|
846
|
-
return JSON.parse(
|
|
927
|
+
function yn(e) {
|
|
928
|
+
return JSON.parse(e);
|
|
847
929
|
}
|
|
848
|
-
class
|
|
930
|
+
class hn extends Error {
|
|
849
931
|
constructor() {
|
|
850
932
|
super(...arguments);
|
|
851
933
|
l(this, "name", "AbortError");
|
|
852
934
|
}
|
|
853
935
|
}
|
|
854
|
-
class
|
|
936
|
+
class gn extends Error {
|
|
855
937
|
constructor() {
|
|
856
938
|
super(...arguments);
|
|
857
939
|
l(this, "name", "UiError");
|
|
858
940
|
}
|
|
859
941
|
}
|
|
860
|
-
function
|
|
861
|
-
return
|
|
942
|
+
function bn(e) {
|
|
943
|
+
return e instanceof Error && e.name === "AbortError";
|
|
862
944
|
}
|
|
863
|
-
function
|
|
864
|
-
return
|
|
945
|
+
function pe(e) {
|
|
946
|
+
return e instanceof Error ? e.name === "AbortError" || pe(e.cause) : !1;
|
|
865
947
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
948
|
+
function wn(e) {
|
|
949
|
+
return e instanceof Error && e.name === "AggregateError";
|
|
868
950
|
}
|
|
869
|
-
function
|
|
870
|
-
if (typeof
|
|
871
|
-
return `String value was thrown: ${
|
|
872
|
-
if (
|
|
951
|
+
function me(e) {
|
|
952
|
+
if (typeof e == "string")
|
|
953
|
+
return `String value was thrown: ${e}`;
|
|
954
|
+
if (e && typeof e == "object")
|
|
873
955
|
try {
|
|
874
|
-
return `Plain object was thrown: ${JSON.stringify(
|
|
875
|
-
} catch (
|
|
876
|
-
return `Non-serializable object was thrown (JSON.stringify failed: ${
|
|
956
|
+
return `Plain object was thrown: ${JSON.stringify(e)}`;
|
|
957
|
+
} catch (n) {
|
|
958
|
+
return `Non-serializable object was thrown (JSON.stringify failed: ${n instanceof Error ? n.message : String(n)}): ${String(e)}`;
|
|
877
959
|
}
|
|
878
|
-
return `Non-Error value (${typeof
|
|
960
|
+
return `Non-Error value (${typeof e}) was thrown: ${e}`;
|
|
879
961
|
}
|
|
880
|
-
function
|
|
881
|
-
return
|
|
962
|
+
function k(e) {
|
|
963
|
+
return e instanceof Error ? e : new Error(me(e));
|
|
882
964
|
}
|
|
883
|
-
function
|
|
884
|
-
const
|
|
885
|
-
return t.name =
|
|
965
|
+
function j(e) {
|
|
966
|
+
const n = e.cause ? j(e.cause) : void 0, t = new Error(e.message, n !== void 0 ? { cause: n } : void 0);
|
|
967
|
+
return t.name = e.name || "Error", t.stack = e.stack, t;
|
|
886
968
|
}
|
|
887
|
-
function
|
|
888
|
-
const
|
|
969
|
+
function F(e) {
|
|
970
|
+
const n = k(e), t = n.cause ? F(n.cause) : void 0;
|
|
889
971
|
return {
|
|
890
|
-
name:
|
|
891
|
-
message:
|
|
892
|
-
stack:
|
|
893
|
-
...
|
|
972
|
+
name: n.name,
|
|
973
|
+
message: n.message,
|
|
974
|
+
stack: n.stack,
|
|
975
|
+
...n.cause !== void 0 && { cause: t }
|
|
894
976
|
};
|
|
895
977
|
}
|
|
896
|
-
function
|
|
897
|
-
if (
|
|
898
|
-
throw
|
|
899
|
-
return
|
|
978
|
+
function An(e) {
|
|
979
|
+
if (e.error)
|
|
980
|
+
throw e.error;
|
|
981
|
+
return e.value;
|
|
900
982
|
}
|
|
901
|
-
function
|
|
902
|
-
return
|
|
983
|
+
function J(e) {
|
|
984
|
+
return e.error ? { error: F(e.error) } : { value: e.value };
|
|
903
985
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
986
|
+
function kn(e) {
|
|
987
|
+
return e.error ? { error: j(e.error) } : { value: e.value };
|
|
906
988
|
}
|
|
907
|
-
function
|
|
989
|
+
function ye(e) {
|
|
908
990
|
try {
|
|
909
|
-
return { value:
|
|
910
|
-
} catch (
|
|
911
|
-
return { error:
|
|
991
|
+
return { value: e() };
|
|
992
|
+
} catch (n) {
|
|
993
|
+
return { error: k(n) };
|
|
912
994
|
}
|
|
913
995
|
}
|
|
914
|
-
async function
|
|
996
|
+
async function he(e) {
|
|
915
997
|
try {
|
|
916
|
-
return { value: await
|
|
917
|
-
} catch (
|
|
918
|
-
return { error:
|
|
998
|
+
return { value: await e() };
|
|
999
|
+
} catch (n) {
|
|
1000
|
+
return { error: k(n) };
|
|
919
1001
|
}
|
|
920
1002
|
}
|
|
921
|
-
function
|
|
922
|
-
const
|
|
923
|
-
return
|
|
1003
|
+
function xn(e) {
|
|
1004
|
+
const n = ye(e);
|
|
1005
|
+
return J(n);
|
|
1006
|
+
}
|
|
1007
|
+
async function Pn(e) {
|
|
1008
|
+
const n = await he(e);
|
|
1009
|
+
return J(n);
|
|
1010
|
+
}
|
|
1011
|
+
const En = ["supportsLazyState"], Sn = ["requiresUIAPIVersion", "requiresModelAPIVersion"];
|
|
1012
|
+
function vn(e, n, t = !0) {
|
|
1013
|
+
return e === void 0 ? !1 : e[n] === t;
|
|
924
1014
|
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
1015
|
+
function Nn(e) {
|
|
1016
|
+
return e === void 0 ? /* @__PURE__ */ new Set() : new Set(Object.entries(e).filter(([n, t]) => n.startsWith("requires") && t === !0).map(([n]) => n));
|
|
1017
|
+
}
|
|
1018
|
+
function On(e) {
|
|
1019
|
+
return e === void 0 ? /* @__PURE__ */ new Set() : new Set(Object.entries(e).filter(([n, t]) => n.startsWith("supports") && t === !0).map(([n]) => n));
|
|
1020
|
+
}
|
|
1021
|
+
class ge extends Error {
|
|
1022
|
+
constructor(t) {
|
|
1023
|
+
super(`Some of the block requirements are not supported by the runtime: ${Array.from(t.entries()).map(([r, o]) => `${r}: ${o}`).join(", ")}`);
|
|
1024
|
+
l(this, "name", "IncompatibleFlagsError");
|
|
1025
|
+
this.incompatibleFlags = t;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
class Cn {
|
|
1029
|
+
constructor() {
|
|
1030
|
+
l(this, "supportedRequirements", /* @__PURE__ */ new Map());
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Adds a supported requirement to the runtime capabilities.
|
|
1034
|
+
* @param requirement - The requirement.
|
|
1035
|
+
* @param value - The value of the requirement. If not provided, defaults to true.
|
|
1036
|
+
*/
|
|
1037
|
+
addSupportedRequirement(n, t = !0) {
|
|
1038
|
+
return this.supportedRequirements.has(n) || this.supportedRequirements.set(n, /* @__PURE__ */ new Set()), this.supportedRequirements.get(n).add(t), this;
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Returns a map of incompatible flags. If the block flags are compatible, returns undefined.
|
|
1042
|
+
* @param blockFlags - The block flags.
|
|
1043
|
+
* @returns A map of incompatible flags, or undefined if the block flags are compatible.
|
|
1044
|
+
*/
|
|
1045
|
+
getIncompatibleFlags(n) {
|
|
1046
|
+
if (n === void 0) return;
|
|
1047
|
+
const t = /* @__PURE__ */ new Map();
|
|
1048
|
+
for (const [r, o] of Object.entries(n))
|
|
1049
|
+
if (r.startsWith("requires")) {
|
|
1050
|
+
if (o === void 0) continue;
|
|
1051
|
+
const i = this.supportedRequirements.get(r);
|
|
1052
|
+
(i === void 0 || !i.has(o)) && t.set(r, o);
|
|
1053
|
+
}
|
|
1054
|
+
return t.size === 0 ? void 0 : t;
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Checks if the block flags are compatible with the runtime capabilities.
|
|
1058
|
+
* @param blockFlags - The block flags.
|
|
1059
|
+
* @returns True if the block flags are compatible, false otherwise.
|
|
1060
|
+
*/
|
|
1061
|
+
checkCompatibility(n) {
|
|
1062
|
+
return this.getIncompatibleFlags(n) === void 0;
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* Throws an error if the block flags are incompatible with the runtime capabilities.
|
|
1066
|
+
* @param blockFlags - The block flags.
|
|
1067
|
+
* @throws IncompatibleFlagsError if the block flags are incompatible with the runtime capabilities.
|
|
1068
|
+
*/
|
|
1069
|
+
throwIfIncompatible(n) {
|
|
1070
|
+
const t = this.getIncompatibleFlags(n);
|
|
1071
|
+
if (t !== void 0)
|
|
1072
|
+
throw new ge(t);
|
|
1073
|
+
}
|
|
928
1074
|
}
|
|
929
1075
|
export {
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1076
|
+
hn as AbortError,
|
|
1077
|
+
Sn as AllRequiresFeatureFlags,
|
|
1078
|
+
En as AllSupportsFeatureFlags,
|
|
1079
|
+
He as AnchoredIdDeriver,
|
|
1080
|
+
rn as DefaultNavigationState,
|
|
1081
|
+
ge as IncompatibleFlagsError,
|
|
1082
|
+
Y as PTableAbsent,
|
|
1083
|
+
Z as PTableNA,
|
|
1084
|
+
z as PValueBytesNA,
|
|
1085
|
+
Je as PValueDoubleNA,
|
|
1086
|
+
Fe as PValueFloatNA,
|
|
1087
|
+
q as PValueIntNA,
|
|
939
1088
|
x as PValueLongNA,
|
|
940
|
-
|
|
1089
|
+
T as PValueStringNA,
|
|
941
1090
|
I as PlId,
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
H as
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1091
|
+
V as PlIdBytes,
|
|
1092
|
+
de as PlIdLength,
|
|
1093
|
+
on as PlRef,
|
|
1094
|
+
Pe as RangeBytes,
|
|
1095
|
+
Cn as RuntimeCapabilities,
|
|
1096
|
+
gn as UiError,
|
|
1097
|
+
_e as canonicalizeAxisId,
|
|
1098
|
+
mn as canonicalizeJson,
|
|
1099
|
+
vn as checkBlockFlag,
|
|
1100
|
+
an as createPlRef,
|
|
1101
|
+
Ve as dataInfoToEntries,
|
|
1102
|
+
tn as deriveNativeId,
|
|
1103
|
+
j as deserializeError,
|
|
1104
|
+
kn as deserializeResult,
|
|
1105
|
+
ln as digestPlId,
|
|
1106
|
+
k as ensureError,
|
|
1107
|
+
Re as ensureNotNAPValue,
|
|
1108
|
+
Ye as ensurePColumn,
|
|
1109
|
+
Ie as entriesToDataInfo,
|
|
1110
|
+
w as executePSpecPredicate,
|
|
1111
|
+
en as extractAllColumns,
|
|
1112
|
+
Nn as extractAllRequirements,
|
|
1113
|
+
On as extractAllSupports,
|
|
1114
|
+
ke as extractCodeWithInfo,
|
|
1115
|
+
xe as extractConfigGeneric,
|
|
1116
|
+
C as getAxesId,
|
|
1117
|
+
y as getAxisId,
|
|
1118
|
+
Me as getColumnIdAndSpec,
|
|
1119
|
+
Ne as getFileNameFromHandle,
|
|
1120
|
+
K as getFilePathFromHandle,
|
|
1121
|
+
Ke as getPColumnSpecId,
|
|
1122
|
+
Te as getPTableColumnId,
|
|
1123
|
+
pe as hasAbortError,
|
|
1124
|
+
bn as isAbortError,
|
|
1125
|
+
wn as isAggregateError,
|
|
1126
|
+
Oe as isDataInfo,
|
|
1127
|
+
_ as isDataInfoEntries,
|
|
1128
|
+
Ge as isFilteredPColumn,
|
|
1129
|
+
U as isImportFileHandleIndex,
|
|
1130
|
+
B as isImportFileHandleUpload,
|
|
1131
|
+
ve as isLiveLog,
|
|
1132
|
+
H as isNotNAPValue,
|
|
1133
|
+
ie as isPColumn,
|
|
1134
|
+
Qe as isPColumnResult,
|
|
1135
|
+
d as isPColumnSpec,
|
|
1136
|
+
Xe as isPColumnSpecResult,
|
|
1137
|
+
Be as isPTableAbsent,
|
|
1138
|
+
W as isPValue,
|
|
1139
|
+
$e as isPartitionedDataInfoEntries,
|
|
1140
|
+
sn as isPlRef,
|
|
1141
|
+
Q as isValueAbsent,
|
|
1142
|
+
b as isValueNA,
|
|
1143
|
+
Ce as mapDataInfo,
|
|
1144
|
+
je as mapDataInfoEntries,
|
|
1145
|
+
g as mapJoinEntry,
|
|
1146
|
+
Ze as mapPObjectData,
|
|
1147
|
+
qe as mapPTableDef,
|
|
1148
|
+
fn as mapValueInVOE,
|
|
1149
|
+
S as matchAxis,
|
|
1150
|
+
ne as matchAxisId,
|
|
1151
|
+
v as matchPColumn,
|
|
1152
|
+
Ee as newRangeBytesOpt,
|
|
1153
|
+
Ue as pTableValue,
|
|
1154
|
+
Le as pValueToStringOrNumber,
|
|
1155
|
+
X as pValueToStringOrNumberOrNull,
|
|
1156
|
+
ze as parseColumnId,
|
|
1157
|
+
yn as parseJson,
|
|
1158
|
+
le as plId,
|
|
1159
|
+
cn as plRefsEqual,
|
|
1160
|
+
We as resolveAnchors,
|
|
1161
|
+
G as safeConvertToPValue,
|
|
1162
|
+
nn as selectorsToPredicate,
|
|
1163
|
+
F as serializeError,
|
|
1164
|
+
J as serializeResult,
|
|
1165
|
+
te as stringifyColumnId,
|
|
1166
|
+
pn as stringifyJson,
|
|
1167
|
+
De as toJsonSafePValue,
|
|
1168
|
+
dn as uniquePlId,
|
|
1169
|
+
An as unwrapResult,
|
|
1170
|
+
Se as validateRangeBytes,
|
|
1171
|
+
un as withEnrichments,
|
|
1172
|
+
xn as wrapAndSerialize,
|
|
1173
|
+
Pn as wrapAndSerializeAsync,
|
|
1174
|
+
he as wrapAsyncCallback,
|
|
1175
|
+
ye as wrapCallback
|
|
1021
1176
|
};
|
|
1022
1177
|
//# sourceMappingURL=index.mjs.map
|