@milaboratories/pl-model-common 1.15.8 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{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 +10 -1
- package/dist/drivers/pframe/table_calculate.d.ts.map +1 -1
- package/dist/drivers/pframe/table_common.d.ts +1 -0
- package/dist/drivers/pframe/table_common.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 +742 -572
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- 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 +13 -1
- package/src/drivers/pframe/table_common.ts +15 -0
- 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,95 +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);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function Te(e) {
|
|
488
|
+
switch (e.type) {
|
|
489
|
+
case "axis":
|
|
490
|
+
return {
|
|
491
|
+
type: "axis",
|
|
492
|
+
id: e.id
|
|
493
|
+
};
|
|
494
|
+
case "column":
|
|
495
|
+
return {
|
|
496
|
+
type: "column",
|
|
497
|
+
id: e.id
|
|
498
|
+
};
|
|
403
499
|
}
|
|
404
500
|
}
|
|
405
|
-
function
|
|
406
|
-
return
|
|
501
|
+
function te(e) {
|
|
502
|
+
return h(e);
|
|
407
503
|
}
|
|
408
|
-
function
|
|
409
|
-
return JSON.parse(
|
|
504
|
+
function ze(e) {
|
|
505
|
+
return JSON.parse(e);
|
|
410
506
|
}
|
|
411
|
-
function P(
|
|
412
|
-
return y(
|
|
507
|
+
function P(e) {
|
|
508
|
+
return h(y(e));
|
|
413
509
|
}
|
|
414
|
-
function
|
|
415
|
-
return JSON.stringify([
|
|
510
|
+
function E(e, n) {
|
|
511
|
+
return JSON.stringify([e, n]);
|
|
416
512
|
}
|
|
417
|
-
class
|
|
513
|
+
class He {
|
|
418
514
|
/**
|
|
419
515
|
* Creates a new anchor context from a set of anchor column specifications
|
|
420
516
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
421
517
|
*/
|
|
422
|
-
constructor(
|
|
518
|
+
constructor(n) {
|
|
423
519
|
l(this, "domains", /* @__PURE__ */ new Map());
|
|
424
520
|
l(this, "axes", /* @__PURE__ */ new Map());
|
|
425
521
|
/**
|
|
@@ -431,19 +527,19 @@ class _n {
|
|
|
431
527
|
* Maps domain packs to anchors
|
|
432
528
|
*/
|
|
433
529
|
l(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
|
|
434
|
-
this.anchors =
|
|
435
|
-
const t = Object.entries(
|
|
530
|
+
this.anchors = n;
|
|
531
|
+
const t = Object.entries(n);
|
|
436
532
|
t.sort((r, o) => r[0].localeCompare(o[0]));
|
|
437
533
|
for (const [r, o] of t) {
|
|
438
|
-
for (let
|
|
439
|
-
const a = o.axesSpec[
|
|
440
|
-
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 });
|
|
441
537
|
}
|
|
442
538
|
if (o.domain !== void 0) {
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
for (const [a,
|
|
446
|
-
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);
|
|
447
543
|
this.domains.set(u, r);
|
|
448
544
|
}
|
|
449
545
|
}
|
|
@@ -452,57 +548,57 @@ class _n {
|
|
|
452
548
|
/**
|
|
453
549
|
* Implementation of derive method
|
|
454
550
|
*/
|
|
455
|
-
derive(
|
|
551
|
+
derive(n, t) {
|
|
456
552
|
const r = {
|
|
457
|
-
name:
|
|
553
|
+
name: n.name,
|
|
458
554
|
axes: []
|
|
459
555
|
};
|
|
460
556
|
let o;
|
|
461
|
-
if (
|
|
462
|
-
|
|
557
|
+
if (n.domain !== void 0)
|
|
558
|
+
e:
|
|
463
559
|
for (const a of this.domainPacks) {
|
|
464
|
-
const
|
|
560
|
+
const s = [];
|
|
465
561
|
for (const c of a) {
|
|
466
|
-
const
|
|
467
|
-
if (
|
|
468
|
-
|
|
562
|
+
const f = n.domain[c];
|
|
563
|
+
if (f !== void 0)
|
|
564
|
+
s.push([c, f]);
|
|
469
565
|
else
|
|
470
|
-
break
|
|
566
|
+
break e;
|
|
471
567
|
}
|
|
472
|
-
const u = this.domainPackToAnchor.get(JSON.stringify(
|
|
568
|
+
const u = this.domainPackToAnchor.get(JSON.stringify(s));
|
|
473
569
|
if (u !== void 0) {
|
|
474
570
|
r.domainAnchor = u, o = new Set(a);
|
|
475
571
|
break;
|
|
476
572
|
}
|
|
477
573
|
}
|
|
478
|
-
for (const [a,
|
|
574
|
+
for (const [a, s] of Object.entries(n.domain ?? {})) {
|
|
479
575
|
if (o !== void 0 && o.has(a))
|
|
480
576
|
continue;
|
|
481
|
-
const u =
|
|
482
|
-
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;
|
|
483
579
|
}
|
|
484
|
-
if (r.axes =
|
|
485
|
-
const
|
|
486
|
-
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;
|
|
487
583
|
}), !t || t.length === 0)
|
|
488
584
|
return r;
|
|
489
|
-
const
|
|
585
|
+
const i = [];
|
|
490
586
|
for (const a of t) {
|
|
491
|
-
const [
|
|
492
|
-
if (typeof
|
|
493
|
-
if (
|
|
494
|
-
throw new Error(`Axis index ${
|
|
495
|
-
|
|
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]);
|
|
496
592
|
} else {
|
|
497
|
-
const c =
|
|
593
|
+
const c = n.axesSpec.findIndex((f) => f.name === s);
|
|
498
594
|
if (c === -1)
|
|
499
|
-
throw new Error(`Axis with name "${
|
|
500
|
-
|
|
595
|
+
throw new Error(`Axis with name "${s}" not found in the column specification`);
|
|
596
|
+
i.push([c, u]);
|
|
501
597
|
}
|
|
502
598
|
}
|
|
503
|
-
return
|
|
599
|
+
return i.sort((a, s) => a[0] - s[0]), {
|
|
504
600
|
source: r,
|
|
505
|
-
axisFilters:
|
|
601
|
+
axisFilters: i
|
|
506
602
|
};
|
|
507
603
|
}
|
|
508
604
|
/**
|
|
@@ -511,58 +607,58 @@ class _n {
|
|
|
511
607
|
* @param axisFilters Optional axis filters to apply to the column
|
|
512
608
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
513
609
|
*/
|
|
514
|
-
deriveS(
|
|
515
|
-
return
|
|
610
|
+
deriveS(n, t) {
|
|
611
|
+
return te(this.derive(n, t));
|
|
516
612
|
}
|
|
517
613
|
}
|
|
518
|
-
function
|
|
519
|
-
const r = { ...
|
|
614
|
+
function We(e, n, t) {
|
|
615
|
+
const r = { ...n }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? !1;
|
|
520
616
|
if (r.domainAnchor !== void 0) {
|
|
521
|
-
const
|
|
522
|
-
if (!
|
|
617
|
+
const i = e[r.domainAnchor];
|
|
618
|
+
if (!i)
|
|
523
619
|
throw new Error(`Anchor "${r.domainAnchor}" not found`);
|
|
524
|
-
const a =
|
|
620
|
+
const a = i.domain || {};
|
|
525
621
|
r.domain = { ...a, ...r.domain }, delete r.domainAnchor;
|
|
526
622
|
}
|
|
527
623
|
if (r.domain) {
|
|
528
|
-
const
|
|
529
|
-
for (const [a,
|
|
530
|
-
if (typeof
|
|
531
|
-
|
|
624
|
+
const i = {};
|
|
625
|
+
for (const [a, s] of Object.entries(r.domain))
|
|
626
|
+
if (typeof s == "string")
|
|
627
|
+
i[a] = s;
|
|
532
628
|
else {
|
|
533
|
-
const u =
|
|
629
|
+
const u = e[s.anchor];
|
|
534
630
|
if (!u)
|
|
535
|
-
throw new Error(`Anchor "${
|
|
631
|
+
throw new Error(`Anchor "${s.anchor}" not found for domain key "${a}"`);
|
|
536
632
|
if (!u.domain || u.domain[a] === void 0) {
|
|
537
633
|
if (!o)
|
|
538
|
-
throw new Error(`Domain key "${a}" not found in anchor "${
|
|
634
|
+
throw new Error(`Domain key "${a}" not found in anchor "${s.anchor}"`);
|
|
539
635
|
continue;
|
|
540
636
|
}
|
|
541
|
-
|
|
637
|
+
i[a] = u.domain[a];
|
|
542
638
|
}
|
|
543
|
-
r.domain =
|
|
639
|
+
r.domain = i;
|
|
544
640
|
}
|
|
545
|
-
return r.axes && (r.axes = r.axes.map((
|
|
641
|
+
return r.axes && (r.axes = r.axes.map((i) => re(e, i))), r;
|
|
546
642
|
}
|
|
547
|
-
function
|
|
548
|
-
if (!
|
|
549
|
-
return
|
|
550
|
-
const t =
|
|
643
|
+
function re(e, n) {
|
|
644
|
+
if (!oe(n))
|
|
645
|
+
return n;
|
|
646
|
+
const t = n.anchor, r = e[t];
|
|
551
647
|
if (!r)
|
|
552
648
|
throw new Error(`Anchor "${t}" not found for axis reference`);
|
|
553
|
-
if ("idx" in
|
|
554
|
-
if (
|
|
555
|
-
throw new Error(`Axis index ${
|
|
556
|
-
return r.axesSpec[
|
|
557
|
-
} else if ("name" in
|
|
558
|
-
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);
|
|
559
655
|
if (o.length > 1)
|
|
560
|
-
throw new Error(`Multiple axes with name "${
|
|
656
|
+
throw new Error(`Multiple axes with name "${n.name}" found in anchor "${t}"`);
|
|
561
657
|
if (o.length === 0)
|
|
562
|
-
throw new Error(`Axis with name "${
|
|
658
|
+
throw new Error(`Axis with name "${n.name}" not found in anchor "${t}"`);
|
|
563
659
|
return o[0];
|
|
564
|
-
} else if ("id" in
|
|
565
|
-
const o = r.axesSpec.filter((
|
|
660
|
+
} else if ("id" in n) {
|
|
661
|
+
const o = r.axesSpec.filter((i) => ne(n.id, y(i)));
|
|
566
662
|
if (o.length > 1)
|
|
567
663
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
568
664
|
if (o.length === 0)
|
|
@@ -571,42 +667,42 @@ function en(n, e) {
|
|
|
571
667
|
}
|
|
572
668
|
throw new Error("Unsupported axis reference type");
|
|
573
669
|
}
|
|
574
|
-
function
|
|
575
|
-
return typeof
|
|
670
|
+
function oe(e) {
|
|
671
|
+
return typeof e == "object" && "anchor" in e;
|
|
576
672
|
}
|
|
577
|
-
function
|
|
578
|
-
return typeof
|
|
673
|
+
function Ge(e) {
|
|
674
|
+
return typeof e == "object" && e !== null && "source" in e && "axisFilters" in e;
|
|
579
675
|
}
|
|
580
|
-
function
|
|
581
|
-
return
|
|
676
|
+
function d(e) {
|
|
677
|
+
return e.kind === "PColumn";
|
|
582
678
|
}
|
|
583
|
-
function
|
|
584
|
-
return
|
|
679
|
+
function ie(e) {
|
|
680
|
+
return d(e.spec);
|
|
585
681
|
}
|
|
586
|
-
function
|
|
587
|
-
return
|
|
682
|
+
function Xe(e) {
|
|
683
|
+
return d(e.obj);
|
|
588
684
|
}
|
|
589
|
-
function
|
|
590
|
-
return
|
|
685
|
+
function Qe(e) {
|
|
686
|
+
return d(e.obj.spec);
|
|
591
687
|
}
|
|
592
|
-
function
|
|
593
|
-
if (!
|
|
594
|
-
return
|
|
688
|
+
function Ye(e) {
|
|
689
|
+
if (!ie(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
|
|
690
|
+
return e;
|
|
595
691
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
598
|
-
...
|
|
599
|
-
data: e
|
|
692
|
+
function Ze(e, n) {
|
|
693
|
+
return e === void 0 ? void 0 : {
|
|
694
|
+
...e,
|
|
695
|
+
data: n(e.data)
|
|
600
696
|
};
|
|
601
697
|
}
|
|
602
|
-
function
|
|
603
|
-
const
|
|
698
|
+
function en(e) {
|
|
699
|
+
const n = /* @__PURE__ */ new Map(), t = (r) => {
|
|
604
700
|
switch (r.type) {
|
|
605
701
|
case "column":
|
|
606
|
-
|
|
702
|
+
n.set(r.column.id, r.column);
|
|
607
703
|
return;
|
|
608
704
|
case "slicedColumn":
|
|
609
|
-
|
|
705
|
+
n.set(r.column.id, r.column);
|
|
610
706
|
return;
|
|
611
707
|
case "inlineColumn":
|
|
612
708
|
return;
|
|
@@ -619,389 +715,463 @@ function Xn(n) {
|
|
|
619
715
|
for (const o of r.secondary) t(o);
|
|
620
716
|
return;
|
|
621
717
|
default:
|
|
622
|
-
|
|
718
|
+
A(r);
|
|
623
719
|
}
|
|
624
720
|
};
|
|
625
|
-
return t(
|
|
721
|
+
return t(e), [...n.values()];
|
|
626
722
|
}
|
|
627
|
-
function
|
|
628
|
-
throw new Error("Unexpected object: " +
|
|
723
|
+
function se(e) {
|
|
724
|
+
throw new Error("Unexpected object: " + e);
|
|
629
725
|
}
|
|
630
|
-
function
|
|
631
|
-
switch (
|
|
726
|
+
function w(e, n) {
|
|
727
|
+
switch (e.type) {
|
|
632
728
|
case "and":
|
|
633
|
-
for (const t of
|
|
634
|
-
if (!
|
|
729
|
+
for (const t of e.operands)
|
|
730
|
+
if (!w(t, n)) return !1;
|
|
635
731
|
return !0;
|
|
636
732
|
case "or":
|
|
637
|
-
for (const t of
|
|
638
|
-
if (
|
|
733
|
+
for (const t of e.operands)
|
|
734
|
+
if (w(t, n)) return !0;
|
|
639
735
|
return !1;
|
|
640
736
|
case "not":
|
|
641
|
-
return !
|
|
737
|
+
return !w(e.operand, n);
|
|
642
738
|
case "name":
|
|
643
|
-
return
|
|
739
|
+
return d(n) && n.name === e.name;
|
|
644
740
|
case "name_pattern":
|
|
645
|
-
return
|
|
741
|
+
return d(n) && !!n.name.match(e.pattern);
|
|
646
742
|
case "annotation":
|
|
647
|
-
return
|
|
743
|
+
return d(n) && n.annotations !== void 0 && n.annotations[e.annotation] === e.value;
|
|
648
744
|
case "annotation_pattern":
|
|
649
|
-
return
|
|
745
|
+
return d(n) && n.annotations !== void 0 && n.annotations[e.annotation] !== void 0 && !!n.annotations[e.annotation].match(e.pattern);
|
|
650
746
|
case "has_axes":
|
|
651
|
-
return
|
|
652
|
-
(t) =>
|
|
747
|
+
return d(n) && e.axes.every(
|
|
748
|
+
(t) => n.axesSpec.some(
|
|
653
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(
|
|
654
|
-
([o,
|
|
750
|
+
([o, i]) => r.domain[o] === i
|
|
655
751
|
))
|
|
656
752
|
)
|
|
657
753
|
);
|
|
658
754
|
default:
|
|
659
|
-
|
|
755
|
+
se(e);
|
|
660
756
|
}
|
|
661
757
|
}
|
|
662
|
-
function
|
|
663
|
-
if (
|
|
758
|
+
function S(e, n) {
|
|
759
|
+
if (e.name !== void 0 && e.name !== n.name)
|
|
664
760
|
return !1;
|
|
665
|
-
if (
|
|
666
|
-
if (Array.isArray(
|
|
667
|
-
if (!
|
|
761
|
+
if (e.type !== void 0) {
|
|
762
|
+
if (Array.isArray(e.type)) {
|
|
763
|
+
if (!e.type.includes(n.type))
|
|
668
764
|
return !1;
|
|
669
|
-
} else if (
|
|
765
|
+
} else if (e.type !== n.type)
|
|
670
766
|
return !1;
|
|
671
767
|
}
|
|
672
|
-
if (
|
|
673
|
-
const t =
|
|
674
|
-
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))
|
|
675
771
|
if (t[r] !== o)
|
|
676
772
|
return !1;
|
|
677
773
|
}
|
|
678
774
|
return !0;
|
|
679
775
|
}
|
|
680
|
-
function
|
|
681
|
-
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))
|
|
682
778
|
return !1;
|
|
683
|
-
if (
|
|
684
|
-
if (Array.isArray(
|
|
685
|
-
if (!
|
|
779
|
+
if (n.type !== void 0) {
|
|
780
|
+
if (Array.isArray(n.type)) {
|
|
781
|
+
if (!n.type.includes(e.valueType))
|
|
686
782
|
return !1;
|
|
687
|
-
} else if (
|
|
783
|
+
} else if (n.type !== e.valueType)
|
|
688
784
|
return !1;
|
|
689
785
|
}
|
|
690
|
-
if (
|
|
691
|
-
const t =
|
|
692
|
-
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))
|
|
693
789
|
if (t[r] !== o)
|
|
694
790
|
return !1;
|
|
695
791
|
}
|
|
696
|
-
if (
|
|
697
|
-
const t =
|
|
698
|
-
if (
|
|
699
|
-
for (const r of
|
|
700
|
-
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)))
|
|
701
797
|
return !1;
|
|
702
798
|
} else {
|
|
703
|
-
if (t.length !==
|
|
799
|
+
if (t.length !== n.axes.length)
|
|
704
800
|
return !1;
|
|
705
|
-
for (let r = 0; r <
|
|
706
|
-
if (!
|
|
801
|
+
for (let r = 0; r < n.axes.length; r++)
|
|
802
|
+
if (!S(n.axes[r], t[r]))
|
|
707
803
|
return !1;
|
|
708
804
|
}
|
|
709
805
|
}
|
|
710
|
-
if (
|
|
711
|
-
const t =
|
|
712
|
-
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))
|
|
713
809
|
if (t[r] !== o)
|
|
714
810
|
return !1;
|
|
715
811
|
}
|
|
716
|
-
if (
|
|
717
|
-
const t =
|
|
718
|
-
for (const [r, o] of Object.entries(
|
|
719
|
-
const
|
|
720
|
-
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))
|
|
721
817
|
return !1;
|
|
722
818
|
}
|
|
723
819
|
}
|
|
724
820
|
return !0;
|
|
725
821
|
}
|
|
726
|
-
function
|
|
727
|
-
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);
|
|
728
824
|
}
|
|
729
|
-
function
|
|
730
|
-
const
|
|
731
|
-
kind:
|
|
732
|
-
name:
|
|
825
|
+
function tn(e) {
|
|
826
|
+
const n = {
|
|
827
|
+
kind: e.kind,
|
|
828
|
+
name: e.name
|
|
733
829
|
};
|
|
734
|
-
return
|
|
830
|
+
return e.domain !== void 0 && (n.domain = e.domain), d(e) && (n.axesSpec = C(e.axesSpec)), h(n);
|
|
735
831
|
}
|
|
736
|
-
const
|
|
737
|
-
__isRef:
|
|
738
|
-
blockId:
|
|
739
|
-
name:
|
|
740
|
-
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")
|
|
741
837
|
}).describe(
|
|
742
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."
|
|
743
839
|
).readonly();
|
|
744
|
-
function
|
|
745
|
-
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;
|
|
746
842
|
}
|
|
747
|
-
function
|
|
843
|
+
function an(e, n, t = !1) {
|
|
748
844
|
return t ? {
|
|
749
845
|
__isRef: !0,
|
|
750
|
-
blockId:
|
|
751
|
-
name:
|
|
846
|
+
blockId: e,
|
|
847
|
+
name: n,
|
|
752
848
|
requireEnrichments: !0
|
|
753
849
|
} : {
|
|
754
850
|
__isRef: !0,
|
|
755
|
-
blockId:
|
|
756
|
-
name:
|
|
851
|
+
blockId: e,
|
|
852
|
+
name: n
|
|
757
853
|
};
|
|
758
854
|
}
|
|
759
|
-
function
|
|
760
|
-
if (
|
|
855
|
+
function un(e, n = !0) {
|
|
856
|
+
if (n)
|
|
761
857
|
return {
|
|
762
|
-
...
|
|
858
|
+
...e,
|
|
763
859
|
requireEnrichments: !0
|
|
764
860
|
};
|
|
765
861
|
{
|
|
766
|
-
const { requireEnrichments: t, ...r } =
|
|
862
|
+
const { requireEnrichments: t, ...r } = e;
|
|
767
863
|
return r;
|
|
768
864
|
}
|
|
769
865
|
}
|
|
770
|
-
function
|
|
771
|
-
return
|
|
866
|
+
function cn(e, n, t = !1) {
|
|
867
|
+
return e.blockId === n.blockId && e.name === n.name && (t || e.requireEnrichments === n.requireEnrichments);
|
|
772
868
|
}
|
|
773
|
-
function
|
|
774
|
-
return
|
|
869
|
+
function fn(e, n) {
|
|
870
|
+
return e.ok ? { ok: !0, value: n(e.value) } : e;
|
|
775
871
|
}
|
|
776
|
-
function
|
|
777
|
-
if (
|
|
778
|
-
return new DataView(
|
|
779
|
-
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);
|
|
780
876
|
throw new TypeError(
|
|
781
877
|
"Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray"
|
|
782
878
|
);
|
|
783
879
|
}
|
|
784
|
-
const
|
|
785
|
-
function
|
|
880
|
+
const ue = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", ce = "0123456789ABCDEFGHIJKLMNOPQRSTUV", fe = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
881
|
+
function $(e, n, t) {
|
|
786
882
|
t = t || {};
|
|
787
883
|
let r, o;
|
|
788
|
-
switch (
|
|
884
|
+
switch (n) {
|
|
789
885
|
case "RFC3548":
|
|
790
886
|
case "RFC4648":
|
|
791
|
-
r =
|
|
887
|
+
r = ue, o = !0;
|
|
792
888
|
break;
|
|
793
889
|
case "RFC4648-HEX":
|
|
794
|
-
r =
|
|
890
|
+
r = ce, o = !0;
|
|
795
891
|
break;
|
|
796
892
|
case "Crockford":
|
|
797
|
-
r =
|
|
893
|
+
r = fe, o = !1;
|
|
798
894
|
break;
|
|
799
895
|
default:
|
|
800
|
-
throw new Error("Unknown base32 variant: " + String(
|
|
801
|
-
}
|
|
802
|
-
const
|
|
803
|
-
let
|
|
804
|
-
for (let
|
|
805
|
-
for (u = u << 8 | a.getUint8(
|
|
806
|
-
c += r[u >>>
|
|
807
|
-
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)
|
|
808
904
|
for (; c.length % 8 !== 0; )
|
|
809
905
|
c += "=";
|
|
810
906
|
return c;
|
|
811
907
|
}
|
|
812
|
-
const
|
|
813
|
-
function
|
|
814
|
-
const
|
|
815
|
-
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"));
|
|
816
912
|
}
|
|
817
|
-
function
|
|
818
|
-
if (
|
|
819
|
-
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"));
|
|
820
916
|
}
|
|
821
|
-
async function
|
|
822
|
-
const
|
|
823
|
-
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)));
|
|
824
920
|
}
|
|
825
|
-
function
|
|
826
|
-
return JSON.stringify(
|
|
921
|
+
function pn(e) {
|
|
922
|
+
return JSON.stringify(e);
|
|
827
923
|
}
|
|
828
|
-
function
|
|
829
|
-
return
|
|
924
|
+
function mn(e) {
|
|
925
|
+
return h(e);
|
|
830
926
|
}
|
|
831
|
-
function
|
|
832
|
-
return JSON.parse(
|
|
927
|
+
function yn(e) {
|
|
928
|
+
return JSON.parse(e);
|
|
833
929
|
}
|
|
834
|
-
class
|
|
930
|
+
class hn extends Error {
|
|
835
931
|
constructor() {
|
|
836
932
|
super(...arguments);
|
|
837
933
|
l(this, "name", "AbortError");
|
|
838
934
|
}
|
|
839
935
|
}
|
|
840
|
-
class
|
|
936
|
+
class gn extends Error {
|
|
841
937
|
constructor() {
|
|
842
938
|
super(...arguments);
|
|
843
939
|
l(this, "name", "UiError");
|
|
844
940
|
}
|
|
845
941
|
}
|
|
846
|
-
function
|
|
847
|
-
return
|
|
942
|
+
function bn(e) {
|
|
943
|
+
return e instanceof Error && e.name === "AbortError";
|
|
848
944
|
}
|
|
849
|
-
function
|
|
850
|
-
return
|
|
945
|
+
function pe(e) {
|
|
946
|
+
return e instanceof Error ? e.name === "AbortError" || pe(e.cause) : !1;
|
|
851
947
|
}
|
|
852
|
-
function
|
|
853
|
-
return
|
|
948
|
+
function wn(e) {
|
|
949
|
+
return e instanceof Error && e.name === "AggregateError";
|
|
854
950
|
}
|
|
855
|
-
function
|
|
856
|
-
if (typeof
|
|
857
|
-
return `String value was thrown: ${
|
|
858
|
-
if (
|
|
951
|
+
function me(e) {
|
|
952
|
+
if (typeof e == "string")
|
|
953
|
+
return `String value was thrown: ${e}`;
|
|
954
|
+
if (e && typeof e == "object")
|
|
859
955
|
try {
|
|
860
|
-
return `Plain object was thrown: ${JSON.stringify(
|
|
861
|
-
} catch (
|
|
862
|
-
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)}`;
|
|
863
959
|
}
|
|
864
|
-
return `Non-Error value (${typeof
|
|
960
|
+
return `Non-Error value (${typeof e}) was thrown: ${e}`;
|
|
865
961
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
962
|
+
function k(e) {
|
|
963
|
+
return e instanceof Error ? e : new Error(me(e));
|
|
868
964
|
}
|
|
869
|
-
function
|
|
870
|
-
const
|
|
871
|
-
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;
|
|
872
968
|
}
|
|
873
|
-
function
|
|
874
|
-
const
|
|
969
|
+
function F(e) {
|
|
970
|
+
const n = k(e), t = n.cause ? F(n.cause) : void 0;
|
|
875
971
|
return {
|
|
876
|
-
name:
|
|
877
|
-
message:
|
|
878
|
-
stack:
|
|
879
|
-
...
|
|
972
|
+
name: n.name,
|
|
973
|
+
message: n.message,
|
|
974
|
+
stack: n.stack,
|
|
975
|
+
...n.cause !== void 0 && { cause: t }
|
|
880
976
|
};
|
|
881
977
|
}
|
|
882
|
-
function
|
|
883
|
-
if (
|
|
884
|
-
throw
|
|
885
|
-
return
|
|
978
|
+
function An(e) {
|
|
979
|
+
if (e.error)
|
|
980
|
+
throw e.error;
|
|
981
|
+
return e.value;
|
|
886
982
|
}
|
|
887
|
-
function
|
|
888
|
-
return
|
|
983
|
+
function J(e) {
|
|
984
|
+
return e.error ? { error: F(e.error) } : { value: e.value };
|
|
889
985
|
}
|
|
890
|
-
function
|
|
891
|
-
return
|
|
986
|
+
function kn(e) {
|
|
987
|
+
return e.error ? { error: j(e.error) } : { value: e.value };
|
|
892
988
|
}
|
|
893
|
-
function
|
|
989
|
+
function ye(e) {
|
|
894
990
|
try {
|
|
895
|
-
return { value:
|
|
896
|
-
} catch (
|
|
897
|
-
return { error:
|
|
991
|
+
return { value: e() };
|
|
992
|
+
} catch (n) {
|
|
993
|
+
return { error: k(n) };
|
|
898
994
|
}
|
|
899
995
|
}
|
|
900
|
-
async function
|
|
996
|
+
async function he(e) {
|
|
901
997
|
try {
|
|
902
|
-
return { value: await
|
|
903
|
-
} catch (
|
|
904
|
-
return { error:
|
|
998
|
+
return { value: await e() };
|
|
999
|
+
} catch (n) {
|
|
1000
|
+
return { error: k(n) };
|
|
905
1001
|
}
|
|
906
1002
|
}
|
|
907
|
-
function
|
|
908
|
-
const
|
|
909
|
-
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;
|
|
1014
|
+
}
|
|
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));
|
|
910
1020
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
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
|
+
}
|
|
914
1074
|
}
|
|
915
1075
|
export {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
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,
|
|
925
1088
|
x as PValueLongNA,
|
|
926
|
-
|
|
1089
|
+
T as PValueStringNA,
|
|
927
1090
|
I as PlId,
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
K as
|
|
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
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
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
|
|
1006
1176
|
};
|
|
1007
1177
|
//# sourceMappingURL=index.mjs.map
|