@milaboratories/pl-model-common 1.19.0 → 1.19.2

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