@milaboratories/uikit 2.3.1 → 2.3.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.
@@ -1,18 +1,18 @@
1
- import { isDataInfo as ae, extractAllColumns as Le, mapPTableDef as Ee, selectorsToPredicate as W, withEnrichments as ce, AnchoredIdDeriver as he, isPlRef as Te, mapValueInVOE as Fe, mapPObjectData as le, ensurePColumn as ke, isPColumnSpec as G, isPColumn as ve, resolveAnchors as de, deriveNativeId as Oe, isPartitionedDataInfoEntries as Re, getAxisId as pe, entriesToDataInfo as De, isDataInfoEntries as be, dataInfoToEntries as Ke, canonicalizeAxisId as $e, mapDataInfo as Ne } from "../../../lib/model/common/dist/index.js";
2
- import { PlIdLength as vt, getAxesId as bt, getFileNameFromHandle as _t, getFilePathFromHandle as wt, isImportFileHandleIndex as Pt, isImportFileHandleUpload as xt, mapJoinEntry as At, matchAxis as It, matchAxisId as St, matchPColumn as Ct, stringifyColumnId as Lt } from "../../../lib/model/common/dist/index.js";
3
- import _e from "../../../_virtual/canonicalize.js";
4
- import $ from "../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js";
5
- import { BasePlErrorLike as Tt, ErrorLike as Ft, PlErrorLike as kt, StandardErrorLike as Ot } from "../../../lib/model/pl-error-like/dist/index.js";
6
- var je = Object.defineProperty, Be = (r, e, t) => e in r ? je(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, I = (r, e, t) => Be(r, typeof e != "symbol" ? e + "" : e, t);
7
- function Q(r) {
8
- return { type: "Immediate", value: r };
1
+ import { isDataInfo as ae, extractAllColumns as Ee, mapPTableDef as Te, selectorsToPredicate as W, withEnrichments as ce, AnchoredIdDeriver as he, isPlRef as Fe, mapValueInVOE as Oe, mapPObjectData as le, ensurePColumn as ke, isPColumnSpec as G, isPColumn as be, resolveAnchors as de, deriveNativeId as Re, isPartitionedDataInfoEntries as De, getAxisId as pe, entriesToDataInfo as $e, isDataInfoEntries as _e, dataInfoToEntries as Ke, canonicalizeAxisId as Ne, mapDataInfo as je } from "../../../lib/model/common/dist/index.js";
2
+ import { PlIdLength as bt, getAxesId as _t, getFileNameFromHandle as wt, getFilePathFromHandle as Pt, isImportFileHandleIndex as At, isImportFileHandleUpload as xt, mapJoinEntry as It, matchAxis as St, matchAxisId as Ct, matchPColumn as Lt, stringifyColumnId as Et } from "../../../lib/model/common/dist/index.js";
3
+ import we from "../../../_virtual/canonicalize.js";
4
+ import K from "../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js";
5
+ import { BasePlErrorLike as Ft, ErrorLike as Ot, PlErrorLike as kt, StandardErrorLike as Rt } from "../../../lib/model/pl-error-like/dist/index.js";
6
+ var Be = Object.defineProperty, Je = (n, e, t) => e in n ? Be(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, I = (n, e, t) => Je(n, typeof e != "symbol" ? e + "" : e, t);
7
+ function Q(n) {
8
+ return { type: "Immediate", value: n };
9
9
  }
10
- function Je() {
10
+ function Ve() {
11
11
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
12
12
  }
13
- function we(r) {
14
- if (r && typeof globalThis.getPlatforma == "function")
15
- return globalThis.getPlatforma(r);
13
+ function Pe(n) {
14
+ if (n && typeof globalThis.getPlatforma == "function")
15
+ return globalThis.getPlatforma(n);
16
16
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
17
17
  throw new Error("Can't get platforma instance.");
18
18
  }
@@ -23,23 +23,23 @@ function c() {
23
23
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
24
24
  throw new Error("Not in config rendering context");
25
25
  }
26
- function U(r, e) {
26
+ function V(n, e) {
27
27
  const t = Ue();
28
28
  if (t === void 0) return !1;
29
- if (r in t.callbackRegistry) throw new Error(`Callback with key ${r} already registered.`);
30
- return t.callbackRegistry[r] = e, !0;
29
+ if (n in t.callbackRegistry) throw new Error(`Callback with key ${n} already registered.`);
30
+ return t.callbackRegistry[n] = e, !0;
31
31
  }
32
32
  const X = /* @__PURE__ */ new Map();
33
- function Ve(r, e) {
34
- r in c().callbackRegistry || (c().callbackRegistry[r] = (t) => {
35
- for (const n of X.get(r))
36
- n(t);
37
- }, X.set(r, [])), X.get(r).push(e);
33
+ function Me(n, e) {
34
+ n in c().callbackRegistry || (c().callbackRegistry[n] = (t) => {
35
+ for (const r of X.get(n))
36
+ r(t);
37
+ }, X.set(n, [])), X.get(n).push(e);
38
38
  }
39
39
  class w {
40
- constructor(e, t = (n) => n) {
41
- I(this, "isResolved", !1), I(this, "resolvedValue"), this.handle = e, this.postProcess = t, Ve(e, (n) => {
42
- this.resolvedValue = t(n), this.isResolved = !0;
40
+ constructor(e, t = (r) => r) {
41
+ I(this, "isResolved", !1), I(this, "resolvedValue"), this.handle = e, this.postProcess = t, Me(e, (r) => {
42
+ this.resolvedValue = t(r), this.isResolved = !0;
43
43
  });
44
44
  }
45
45
  map(e) {
@@ -47,16 +47,16 @@ class w {
47
47
  }
48
48
  mapDefined(e) {
49
49
  return new w(this.handle, (t) => {
50
- const n = this.postProcess(t);
51
- return n ? e(n) : void 0;
50
+ const r = this.postProcess(t);
51
+ return r ? e(r) : void 0;
52
52
  });
53
53
  }
54
54
  toJSON() {
55
55
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
56
56
  }
57
57
  }
58
- function ne(r, e) {
59
- return r === void 0 ? void 0 : e(r);
58
+ function re(n, e) {
59
+ return n === void 0 ? void 0 : e(n);
60
60
  }
61
61
  class S {
62
62
  constructor(e, t) {
@@ -64,27 +64,27 @@ class S {
64
64
  }
65
65
  resolve(...e) {
66
66
  const t = e.map(
67
- (n) => ({
67
+ (r) => ({
68
68
  assertFieldType: "Input",
69
- ...typeof n == "string" ? { field: n } : n
69
+ ...typeof r == "string" ? { field: r } : r
70
70
  })
71
71
  );
72
72
  return this.resolveWithCommon({}, ...t);
73
73
  }
74
74
  resolveOutput(...e) {
75
75
  const t = e.map(
76
- (n) => ({
76
+ (r) => ({
77
77
  assertFieldType: "Output",
78
- ...typeof n == "string" ? { field: n } : n
78
+ ...typeof r == "string" ? { field: r } : r
79
79
  })
80
80
  );
81
81
  return this.resolveWithCommon({}, ...t);
82
82
  }
83
83
  resolveInput(...e) {
84
84
  const t = e.map(
85
- (n) => ({
85
+ (r) => ({
86
86
  assertFieldType: "Input",
87
- ...typeof n == "string" ? { field: n } : n
87
+ ...typeof r == "string" ? { field: r } : r
88
88
  })
89
89
  );
90
90
  return this.resolveWithCommon({}, ...t);
@@ -93,13 +93,13 @@ class S {
93
93
  return this.resolveWithCommon({}, ...e);
94
94
  }
95
95
  resolveWithCommon(e, ...t) {
96
- const n = [
96
+ const r = [
97
97
  ...this.resolvePath,
98
98
  ...t.map((i) => typeof i == "string" ? i : i.field)
99
99
  ];
100
- return ne(
100
+ return re(
101
101
  c().resolveWithCommon(this.handle, e, ...t),
102
- (i) => new S(i, n)
102
+ (i) => new S(i, r)
103
103
  );
104
104
  }
105
105
  get resourceType() {
@@ -119,7 +119,7 @@ class S {
119
119
  }
120
120
  getError() {
121
121
  const e = [...this.resolvePath, "error"];
122
- return ne(
122
+ return re(
123
123
  c().getError(this.handle),
124
124
  (t) => new S(t, e)
125
125
  );
@@ -159,9 +159,9 @@ class S {
159
159
  *
160
160
  */
161
161
  getPColumns(e = !1, t = "") {
162
- const n = this.parsePObjectCollection(e, t);
163
- return n === void 0 ? void 0 : Object.entries(n).map(([, i]) => {
164
- if (!ve(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
162
+ const r = this.parsePObjectCollection(e, t);
163
+ return r === void 0 ? void 0 : Object.entries(r).map(([, i]) => {
164
+ if (!be(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
165
165
  return i;
166
166
  });
167
167
  }
@@ -169,15 +169,15 @@ class S {
169
169
  *
170
170
  */
171
171
  parsePObjectCollection(e = !1, t = "") {
172
- const n = c().parsePObjectCollection(
172
+ const r = c().parsePObjectCollection(
173
173
  this.handle,
174
174
  e,
175
175
  t,
176
176
  ...this.resolvePath
177
177
  );
178
- if (n === void 0) return;
178
+ if (r === void 0) return;
179
179
  const i = {};
180
- for (const [s, o] of Object.entries(n)) {
180
+ for (const [s, o] of Object.entries(r)) {
181
181
  const a = [...this.resolvePath, s];
182
182
  i[s] = le(o, (l) => new S(l, a));
183
183
  }
@@ -264,53 +264,53 @@ class S {
264
264
  }
265
265
  }
266
266
  mapFields(e, t) {
267
- const { fieldType: n, requireLocked: i, skipUnresolved: s } = {
267
+ const { fieldType: r, requireLocked: i, skipUnresolved: s } = {
268
268
  fieldType: "Input",
269
269
  requireLocked: !0,
270
270
  skipUnresolved: !1,
271
271
  ...t
272
272
  }, o = e;
273
- if (i && (n === "Input" && !this.getInputsLocked() || n === "Output" && !this.getOutputsLocked()))
273
+ if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
274
274
  return;
275
- let a = (n === "Input" ? this.listInputFields() : n === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
276
- (l) => [l, this.resolve({ field: l, assertFieldType: n })]
275
+ let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
276
+ (l) => [l, this.resolve({ field: l, assertFieldType: r })]
277
277
  );
278
278
  return s && (a = a.filter((l) => l[1] !== void 0)), a.map(([l, y]) => o(l, y));
279
279
  }
280
280
  }
281
- const Me = "staging", We = "main", He = "pl7.app/label", qe = "pl7.app/trace", ze = $.object({
282
- type: $.string(),
283
- importance: $.number().optional(),
284
- id: $.string().optional(),
285
- label: $.string()
286
- }), Ge = $.array(ze), Ye = 1e-3, Ze = "__LABEL__", fe = "__LABEL__@1";
287
- function Pe(r, e, t = {}) {
288
- const n = /* @__PURE__ */ new Map(), i = t.forceTraceElements !== void 0 && t.forceTraceElements.length > 0 ? new Set(t.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = r.map((f) => {
281
+ const We = "staging", He = "main", qe = "pl7.app/label", ze = "pl7.app/trace", Ge = K.object({
282
+ type: K.string(),
283
+ importance: K.number().optional(),
284
+ id: K.string().optional(),
285
+ label: K.string()
286
+ }), Ye = K.array(Ge), Ze = 1e-3, Qe = "__LABEL__", fe = "__LABEL__@1";
287
+ function Ae(n, e, t = {}) {
288
+ const r = /* @__PURE__ */ new Map(), i = t.forceTraceElements !== void 0 && t.forceTraceElements.length > 0 ? new Set(t.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = n.map((f) => {
289
289
  var P, u;
290
290
  const h = e(f);
291
291
  let v, C, L;
292
292
  "spec" in h && typeof h.spec == "object" ? (v = h.spec, C = h.prefixTrace, L = h.suffixTrace) : v = h;
293
- const d = (P = v.annotations) == null ? void 0 : P[He], x = (u = v.annotations) == null ? void 0 : u[qe], p = (x ? Ge.safeParse(JSON.parse(x)).data : void 0) ?? [], g = [
293
+ const d = (P = v.annotations) == null ? void 0 : P[qe], A = (u = v.annotations) == null ? void 0 : u[ze], p = (A ? Ye.safeParse(JSON.parse(A)).data : void 0) ?? [], g = [
294
294
  ...C ?? [],
295
295
  ...p,
296
296
  ...L ?? []
297
297
  ];
298
298
  if (d !== void 0) {
299
- const A = { label: d, type: Ze, importance: -2 };
300
- t.addLabelAsSuffix ? g.push(A) : g.splice(0, 0, A);
299
+ const x = { label: d, type: Qe, importance: -2 };
300
+ t.addLabelAsSuffix ? g.push(x) : g.splice(0, 0, x);
301
301
  }
302
302
  const m = [], T = /* @__PURE__ */ new Map();
303
- for (let A = g.length - 1; A >= 0; --A) {
304
- const { type: B } = g[A], O = g[A].importance ?? 0, D = (T.get(B) ?? 0) + 1;
303
+ for (let x = g.length - 1; x >= 0; --x) {
304
+ const { type: B } = g[x], k = g[x].importance ?? 0, D = (T.get(B) ?? 0) + 1;
305
305
  T.set(B, D);
306
- const k = `${B}@${D}`;
307
- s.set(k, (s.get(k) ?? 0) + 1), n.set(
308
- k,
306
+ const O = `${B}@${D}`;
307
+ s.set(O, (s.get(O) ?? 0) + 1), r.set(
308
+ O,
309
309
  Math.max(
310
- n.get(k) ?? Number.NEGATIVE_INFINITY,
311
- O - (g.length - A) * Ye
310
+ r.get(O) ?? Number.NEGATIVE_INFINITY,
311
+ k - (g.length - x) * Ze
312
312
  )
313
- ), m.push({ ...g[A], fullType: k, occurrenceIndex: D });
313
+ ), m.push({ ...g[x], fullType: O, occurrenceIndex: D });
314
314
  }
315
315
  return m.reverse(), {
316
316
  value: f,
@@ -318,14 +318,14 @@ function Pe(r, e, t = {}) {
318
318
  label: d,
319
319
  fullTrace: m
320
320
  };
321
- }), a = [], l = [], y = [...n];
321
+ }), a = [], l = [], y = [...r];
322
322
  y.sort(([, f], [, P]) => P - f);
323
323
  for (const [f] of y)
324
- f.endsWith("@1") || s.get(f) === r.length ? a.push(f) : l.push(f);
324
+ f.endsWith("@1") || s.get(f) === n.length ? a.push(f) : l.push(f);
325
325
  const j = (f, P = !1) => {
326
326
  const u = [];
327
327
  for (let h = 0; h < o.length; h++) {
328
- const v = o[h], C = v.fullTrace.filter((x) => f.has(x.fullType) || i && i.has(x.type));
328
+ const v = o[h], C = v.fullTrace.filter((A) => f.has(A.fullType) || i && i.has(A.type));
329
329
  if (C.length === 0)
330
330
  if (P)
331
331
  u.push({
@@ -333,7 +333,7 @@ function Pe(r, e, t = {}) {
333
333
  value: v.value
334
334
  });
335
335
  else return;
336
- const L = C.map((x) => x.label), d = t.separator ?? " / ";
336
+ const L = C.map((A) => A.label), d = t.separator ?? " / ";
337
337
  u.push({
338
338
  label: L.join(d),
339
339
  value: v.value
@@ -352,30 +352,30 @@ function Pe(r, e, t = {}) {
352
352
  for (let u = 0; u < E; ++u) f.add(a[u]);
353
353
  F >= 0 && f.add(a[F]);
354
354
  const P = j(f);
355
- if (P !== void 0 && new Set(P.map((u) => u.label)).size === r.length) return P;
355
+ if (P !== void 0 && new Set(P.map((u) => u.label)).size === n.length) return P;
356
356
  F++, F >= a.length && (E++, F = E);
357
357
  }
358
358
  return j(/* @__PURE__ */ new Set([...a, ...l]), !0);
359
359
  }
360
- const H = "PColumnData/", re = H + "ResourceMap", ie = H + "Partitioned/ResourceMap", V = H + "JsonPartitioned", N = H + "BinaryPartitioned", xe = H + "Partitioned/", Z = xe + "JsonPartitioned", M = xe + "BinaryPartitioned", se = (r) => {
361
- if (r.endsWith(".index"))
362
- return { baseKey: r.substring(0, r.length - 6), type: "index" };
363
- if (r.endsWith(".values"))
364
- return { baseKey: r.substring(0, r.length - 7), type: "values" };
365
- throw new Error(`key must ends on .index/.values for binary p-column, got: ${r}`);
360
+ const H = "PColumnData/", ne = H + "ResourceMap", ie = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", N = H + "BinaryPartitioned", xe = H + "Partitioned/", Z = xe + "JsonPartitioned", M = xe + "BinaryPartitioned", se = (n) => {
361
+ if (n.endsWith(".index"))
362
+ return { baseKey: n.substring(0, n.length - 6), type: "index" };
363
+ if (n.endsWith(".values"))
364
+ return { baseKey: n.substring(0, n.length - 7), type: "values" };
365
+ throw new Error(`key must ends on .index/.values for binary p-column, got: ${n}`);
366
366
  };
367
- function Qe(r) {
368
- if (!r) return;
369
- const e = r.resourceType.name, t = r.getDataAsJson(), n = [];
367
+ function Xe(n) {
368
+ if (!n) return;
369
+ const e = n.resourceType.name, t = n.getDataAsJson(), r = [];
370
370
  let i = 0;
371
371
  switch (e) {
372
- case re:
372
+ case ne:
373
373
  i = t.keyLength;
374
374
  break;
375
375
  case ie:
376
376
  i = t.partitionKeyLength + t.keyLength;
377
377
  break;
378
- case V:
378
+ case U:
379
379
  case N:
380
380
  i = t.partitionKeyLength;
381
381
  break;
@@ -385,37 +385,37 @@ function Qe(r) {
385
385
  break;
386
386
  }
387
387
  switch (e) {
388
- case re:
389
- case V:
388
+ case ne:
389
+ case U:
390
390
  case N:
391
- for (let s of r.listInputFields()) {
391
+ for (let s of n.listInputFields()) {
392
392
  e === N && (s = se(s).baseKey);
393
393
  const o = [...JSON.parse(s)];
394
- n.push(o);
394
+ r.push(o);
395
395
  }
396
396
  break;
397
397
  case ie:
398
398
  case M:
399
399
  case Z:
400
- for (const s of r.listInputFields()) {
401
- const o = [...JSON.parse(s)], a = r.resolve({ field: s, assertFieldType: "Input" });
400
+ for (const s of n.listInputFields()) {
401
+ const o = [...JSON.parse(s)], a = n.resolve({ field: s, assertFieldType: "Input" });
402
402
  if (a !== void 0)
403
403
  for (let l of a.listInputFields()) {
404
404
  e === M && (l = se(l).baseKey);
405
405
  const y = [...o, ...JSON.parse(l)];
406
- n.push(y);
406
+ r.push(y);
407
407
  }
408
408
  }
409
409
  break;
410
410
  }
411
- return { data: n, keyLength: i };
411
+ return { data: r, keyLength: i };
412
412
  }
413
- function Xe(r) {
414
- if (r.type !== "JsonPartitioned" && r.type !== "BinaryPartitioned")
415
- throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${r.type}`);
416
- const { parts: e, partitionKeyLength: t } = r, n = [];
413
+ function et(n) {
414
+ if (n.type !== "JsonPartitioned" && n.type !== "BinaryPartitioned")
415
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${n.type}`);
416
+ const { parts: e, partitionKeyLength: t } = n, r = [];
417
417
  for (let i = 0; i < t; ++i)
418
- n.push(/* @__PURE__ */ new Set());
418
+ r.push(/* @__PURE__ */ new Set());
419
419
  for (const i of e) {
420
420
  const s = i.key;
421
421
  if (s.length !== t)
@@ -425,58 +425,58 @@ function Xe(r) {
425
425
  )}`
426
426
  );
427
427
  for (let o = 0; o < t; ++o)
428
- n[o].add(s[o]);
428
+ r[o].add(s[o]);
429
429
  }
430
- return n.map((i) => Array.from(i.values()));
430
+ return r.map((i) => Array.from(i.values()));
431
431
  }
432
- function et(r) {
433
- if (r === void 0) return;
434
- if (be(r))
435
- return Xe(r);
436
- const e = Qe(r);
432
+ function tt(n) {
433
+ if (n === void 0) return;
434
+ if (_e(n))
435
+ return et(n);
436
+ const e = Xe(n);
437
437
  if (!e) return;
438
- const { data: t, keyLength: n } = e, i = [];
439
- for (let s = 0; s < n; ++s)
438
+ const { data: t, keyLength: r } = e, i = [];
439
+ for (let s = 0; s < r; ++s)
440
440
  i.push(/* @__PURE__ */ new Set());
441
441
  for (const s of t) {
442
- if (s.length !== n)
442
+ if (s.length !== r)
443
443
  throw new Error("key length does not match partition length");
444
- for (let o = 0; o < n; ++o)
444
+ for (let o = 0; o < r; ++o)
445
445
  i[o].add(s[o]);
446
446
  }
447
447
  return i.map((s) => Array.from(s.values()));
448
448
  }
449
- function oe(r, e = []) {
450
- if (r === void 0 || !r.getIsReadyOrError()) return;
451
- const t = r.resourceType.name, n = r.getDataAsJson();
449
+ function oe(n, e = []) {
450
+ if (n === void 0 || !n.getIsReadyOrError()) return;
451
+ const t = n.resourceType.name, r = n.getDataAsJson();
452
452
  if (e.length > 0 && (t === Z || t === M))
453
453
  throw new Error(`Unexpected nested super-partitioned resource: ${t}`);
454
454
  switch (t) {
455
- case re:
455
+ case ne:
456
456
  case ie:
457
457
  throw new Error(`Only data columns are supported, got: ${t}`);
458
- case V: {
459
- if (typeof (n == null ? void 0 : n.partitionKeyLength) != "number")
458
+ case U: {
459
+ if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
460
460
  throw new Error(`Missing partitionKeyLength in metadata for ${t}`);
461
461
  const i = [];
462
- for (const s of r.listInputFields()) {
463
- const o = r.resolve({ field: s, assertFieldType: "Input" });
462
+ for (const s of n.listInputFields()) {
463
+ const o = n.resolve({ field: s, assertFieldType: "Input" });
464
464
  if (o === void 0) return;
465
465
  const a = [...e, ...JSON.parse(s)];
466
466
  i.push({ key: a, value: o });
467
467
  }
468
468
  return {
469
469
  type: "JsonPartitioned",
470
- partitionKeyLength: n.partitionKeyLength,
470
+ partitionKeyLength: r.partitionKeyLength,
471
471
  parts: i
472
472
  };
473
473
  }
474
474
  case N: {
475
- if (typeof (n == null ? void 0 : n.partitionKeyLength) != "number")
475
+ if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
476
476
  throw new Error(`Missing partitionKeyLength in metadata for ${t}`);
477
477
  const i = [], s = /* @__PURE__ */ new Map();
478
- for (const o of r.listInputFields()) {
479
- const a = se(o), l = r.resolve({ field: o, assertFieldType: "Input" });
478
+ for (const o of n.listInputFields()) {
479
+ const a = se(o), l = n.resolve({ field: o, assertFieldType: "Input" });
480
480
  if (l === void 0) return;
481
481
  let y = s.get(a.baseKey);
482
482
  y || (y = {}, s.set(a.baseKey, y)), a.type === "index" ? y.index = l : y.values = l;
@@ -494,19 +494,19 @@ function oe(r, e = []) {
494
494
  }
495
495
  return {
496
496
  type: "BinaryPartitioned",
497
- partitionKeyLength: n.partitionKeyLength,
497
+ partitionKeyLength: r.partitionKeyLength,
498
498
  parts: i
499
499
  };
500
500
  }
501
501
  case Z: {
502
- if (typeof (n == null ? void 0 : n.superPartitionKeyLength) != "number" || typeof (n == null ? void 0 : n.partitionKeyLength) != "number")
502
+ if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
503
503
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);
504
- const i = n.superPartitionKeyLength + n.partitionKeyLength, s = [];
505
- for (const o of r.listInputFields()) {
506
- const a = r.resolve({ field: o, assertFieldType: "Input" });
504
+ const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
505
+ for (const o of n.listInputFields()) {
506
+ const a = n.resolve({ field: o, assertFieldType: "Input" });
507
507
  if (a === void 0) return;
508
- if (a.resourceType.name !== V)
509
- throw new Error(`Expected ${V} inside ${t}, but got ${a.resourceType.name}`);
508
+ if (a.resourceType.name !== U)
509
+ throw new Error(`Expected ${U} inside ${t}, but got ${a.resourceType.name}`);
510
510
  const l = oe(a, JSON.parse(o));
511
511
  if (l === void 0) return;
512
512
  if (l.type !== "JsonPartitioned")
@@ -520,11 +520,11 @@ function oe(r, e = []) {
520
520
  };
521
521
  }
522
522
  case M: {
523
- if (typeof (n == null ? void 0 : n.superPartitionKeyLength) != "number" || typeof (n == null ? void 0 : n.partitionKeyLength) != "number")
523
+ if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
524
524
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);
525
- const i = n.superPartitionKeyLength + n.partitionKeyLength, s = [];
526
- for (const o of r.listInputFields()) {
527
- const a = r.resolve({ field: o, assertFieldType: "Input" });
525
+ const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
526
+ for (const o of n.listInputFields()) {
527
+ const a = n.resolve({ field: o, assertFieldType: "Input" });
528
528
  if (a === void 0) return;
529
529
  if (a.resourceType.name !== N)
530
530
  throw new Error(`Expected ${N} inside ${t}, but got ${a.resourceType.name}`);
@@ -544,28 +544,28 @@ function oe(r, e = []) {
544
544
  throw new Error(`Unknown resource type: ${t}`);
545
545
  }
546
546
  }
547
- function tt(r) {
548
- if (r !== void 0) {
549
- if (be(r)) return r;
550
- if (ae(r)) return Ke(r);
551
- if (r instanceof S) return oe(r);
552
- throw new Error(`Unexpected input type: ${typeof r}`);
547
+ function rt(n) {
548
+ if (n !== void 0) {
549
+ if (_e(n)) return n;
550
+ if (ae(n)) return Ke(n);
551
+ if (n instanceof S) return oe(n);
552
+ throw new Error(`Unexpected input type: ${typeof n}`);
553
553
  }
554
554
  }
555
- function nt(r, e) {
555
+ function nt(n, e) {
556
556
  const t = [...e].sort((s, o) => o[0] - s[0]);
557
- if (r.type === "JsonPartitioned" || r.type === "BinaryPartitioned") {
558
- const { partitionKeyLength: s } = r;
557
+ if (n.type === "JsonPartitioned" || n.type === "BinaryPartitioned") {
558
+ const { partitionKeyLength: s } = n;
559
559
  for (const [o] of e)
560
560
  if (o >= s)
561
561
  throw new Error(`Can't filter on non-partitioned axis ${o}. Must be >= ${s}`);
562
- } else if (r.type === "Json") {
563
- const { keyLength: s } = r;
562
+ } else if (n.type === "Json") {
563
+ const { keyLength: s } = n;
564
564
  for (const [o] of e)
565
565
  if (o >= s)
566
566
  throw new Error(`Can't filter on non-data axis ${o}. Must be >= ${s}`);
567
567
  }
568
- const n = (s) => {
568
+ const r = (s) => {
569
569
  for (const [o, a] of t)
570
570
  if (s[o] !== a)
571
571
  return !1;
@@ -576,91 +576,91 @@ function nt(r, e) {
576
576
  o.splice(a, 1);
577
577
  return o;
578
578
  };
579
- switch (r.type) {
579
+ switch (n.type) {
580
580
  case "Json": {
581
- const s = r.data.filter((o) => n(o.key)).map((o) => ({
581
+ const s = n.data.filter((o) => r(o.key)).map((o) => ({
582
582
  key: i(o.key),
583
583
  value: o.value
584
584
  }));
585
585
  return {
586
586
  type: "Json",
587
- keyLength: r.keyLength - e.length,
587
+ keyLength: n.keyLength - e.length,
588
588
  data: s
589
589
  };
590
590
  }
591
591
  case "JsonPartitioned": {
592
- const s = r.parts.filter((o) => n(o.key)).map((o) => ({
592
+ const s = n.parts.filter((o) => r(o.key)).map((o) => ({
593
593
  key: i(o.key),
594
594
  value: o.value
595
595
  }));
596
596
  return {
597
597
  type: "JsonPartitioned",
598
- partitionKeyLength: r.partitionKeyLength - e.length,
598
+ partitionKeyLength: n.partitionKeyLength - e.length,
599
599
  parts: s
600
600
  };
601
601
  }
602
602
  case "BinaryPartitioned": {
603
- const s = r.parts.filter((o) => n(o.key)).map((o) => ({
603
+ const s = n.parts.filter((o) => r(o.key)).map((o) => ({
604
604
  key: i(o.key),
605
605
  value: o.value
606
606
  }));
607
607
  return {
608
608
  type: "BinaryPartitioned",
609
- partitionKeyLength: r.partitionKeyLength - e.length,
609
+ partitionKeyLength: n.partitionKeyLength - e.length,
610
610
  parts: s
611
611
  };
612
612
  }
613
613
  }
614
614
  }
615
- function rt(r) {
616
- if (!Array.isArray(r)) return !1;
617
- if (r.length === 0) return !0;
618
- const e = r[0];
615
+ function it(n) {
616
+ if (!Array.isArray(n)) return !1;
617
+ if (n.length === 0) return !0;
618
+ const e = n[0];
619
619
  return typeof e == "object" && e !== null && "key" in e && "val" in e;
620
620
  }
621
- class it {
621
+ class st {
622
622
  constructor(e) {
623
623
  this.columns = e;
624
624
  }
625
625
  selectColumns(e) {
626
626
  const t = typeof e == "function" ? e : W(e);
627
- return this.columns.filter((n) => t(n.spec));
627
+ return this.columns.filter((r) => t(r.spec));
628
628
  }
629
629
  }
630
- function st(r) {
631
- if (r)
632
- return r.map((e) => ({
633
- type: `split:${$e(e.axisId)}`,
630
+ function ot(n) {
631
+ if (n)
632
+ return n.map((e) => ({
633
+ type: `split:${Ne(e.axisId)}`,
634
634
  label: e.label,
635
635
  importance: 1e6
636
636
  // High importance for split filters in labels
637
637
  }));
638
638
  }
639
- function ot(r) {
640
- if (r)
641
- return r.map((e) => [e.axisIdx, e.value]);
639
+ function at(n) {
640
+ if (n)
641
+ return n.map((e) => [e.axisIdx, e.value]);
642
642
  }
643
- function at(r, e) {
644
- if (!e || e.length === 0) return r;
645
- const t = [...e].sort((n, i) => n[0] - i[0]);
646
- return _e({ id: r, axisFilters: t });
643
+ function lt(n, e) {
644
+ if (!e || e.length === 0) return n;
645
+ const t = [...e].sort((r, i) => r[0] - i[0]);
646
+ return we({ id: n, axisFilters: t });
647
647
  }
648
- function ge(r) {
649
- if (!r || typeof r != "object") return !1;
650
- const e = r, t = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), n = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
651
- return !!e.domainAnchor || t || n;
648
+ function ge(n) {
649
+ if (!n || typeof n != "object") return !1;
650
+ const e = n, t = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
651
+ return !!e.domainAnchor || t || r;
652
652
  }
653
- function lt(r) {
654
- if (typeof r != "object" || !("axes" in r) || r.axes === void 0)
653
+ function ut(n) {
654
+ if (typeof n != "object" || !("axes" in n) || n.axes === void 0)
655
655
  return [];
656
- const e = r.axes.map((t, n) => typeof t == "object" && "split" in t && t.split === !0 ? n : -1).filter((t) => t !== -1);
657
- if (e.length > 0 && r.partialAxesMatch !== void 0)
656
+ const e = n.axes.map((t, r) => typeof t == "object" && "split" in t && t.split === !0 ? r : -1).filter((t) => t !== -1);
657
+ if (e.length > 0 && n.partialAxesMatch !== void 0)
658
658
  throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
659
- return e.sort((t, n) => t - n), e;
659
+ return e.sort((t, r) => t - r), e;
660
660
  }
661
661
  class me {
662
662
  constructor() {
663
- I(this, "defaultProviderStore", []), I(this, "providers", [new it(this.defaultProviderStore)]), I(this, "axisLabelProviders", []);
663
+ I(this, "defaultProviderStore", []), I(this, "providers", [new st(this.defaultProviderStore)]), I(this, "axisLabelProviders", []);
664
664
  }
665
665
  addColumnProvider(e) {
666
666
  return this.providers.push(e), this;
@@ -677,12 +677,12 @@ class me {
677
677
  /** Fetches labels for a given axis from the registered providers */
678
678
  findLabels(e) {
679
679
  for (const t of this.axisLabelProviders) {
680
- const n = t.findLabels(e);
681
- if (n) return n;
680
+ const r = t.findLabels(e);
681
+ if (r) return r;
682
682
  }
683
683
  }
684
684
  getUniversalEntries(e, t) {
685
- const { anchorCtx: n, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1, exclude: a } = t ?? {}, l = {
685
+ const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1, exclude: a } = t ?? {}, l = {
686
686
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
687
687
  ...i ?? {}
688
688
  };
@@ -690,9 +690,9 @@ class me {
690
690
  if (a) {
691
691
  const u = (Array.isArray(a) ? a : [a]).map((h) => {
692
692
  if (ge(h)) {
693
- if (!n)
693
+ if (!r)
694
694
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
695
- return W(de(n.anchors, h, t));
695
+ return W(de(r.anchors, h, t));
696
696
  } else
697
697
  return W(h);
698
698
  });
@@ -703,9 +703,9 @@ class me {
703
703
  const h = ge(u);
704
704
  let v;
705
705
  if (h) {
706
- if (!n)
706
+ if (!r)
707
707
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
708
- v = de(n.anchors, u, t);
708
+ v = de(r.anchors, u, t);
709
709
  } else
710
710
  v = u;
711
711
  const C = /* @__PURE__ */ new Set(), L = [];
@@ -715,61 +715,61 @@ class me {
715
715
  if (y(m.spec)) continue;
716
716
  if (C.has(m.id))
717
717
  throw new Error(`Duplicate column id ${m.id} in provider ${p.constructor.name}`);
718
- const T = Oe(m.spec);
718
+ const T = Re(m.spec);
719
719
  F.has(T) || (C.add(m.id), F.add(T), L.push(m));
720
720
  }
721
721
  }
722
722
  if (L.length === 0) continue;
723
- const d = lt(u), x = d.length > 0;
723
+ const d = ut(u), A = d.length > 0;
724
724
  for (const p of L) {
725
725
  if (!G(p.spec)) continue;
726
726
  const g = p.spec;
727
- if (x) {
728
- if (rt(p.data))
727
+ if (A) {
728
+ if (it(p.data))
729
729
  throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${p.id}`);
730
- const m = tt(p.data);
730
+ const m = rt(p.data);
731
731
  if (!m) {
732
732
  if (s) continue;
733
733
  return;
734
734
  }
735
- if (!Re(m))
735
+ if (!De(m))
736
736
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${m.type} for column ${p.id}`);
737
- const T = et(m), A = d[d.length - 1];
738
- if (A >= m.partitionKeyLength)
739
- throw new Error(`Not enough partition keys (${m.partitionKeyLength}) for requested split axes (max index ${A}) in column ${g.name}`);
740
- const B = d.map((b) => this.findLabels(pe(g.axesSpec[b]))), O = [], D = (b, J) => {
737
+ const T = tt(m), x = d[d.length - 1];
738
+ if (x >= m.partitionKeyLength)
739
+ throw new Error(`Not enough partition keys (${m.partitionKeyLength}) for requested split axes (max index ${x}) in column ${g.name}`);
740
+ const B = d.map((b) => this.findLabels(pe(g.axesSpec[b]))), k = [], D = (b, J) => {
741
741
  if (J >= d.length) {
742
- if (O.push([...b]), O.length > 1e4)
742
+ if (k.push([...b]), k.length > 1e4)
743
743
  throw new Error("Too many key combinations, aborting.");
744
744
  return;
745
745
  }
746
746
  const R = d[J];
747
747
  if (R >= T.length)
748
748
  throw new Error(`Axis index ${R} out of bounds for unique keys array (length ${T.length}) during split key generation for column ${p.id}`);
749
- const K = T[R];
750
- if (!K || K.length === 0) {
751
- O.length = 0;
749
+ const $ = T[R];
750
+ if (!$ || $.length === 0) {
751
+ k.length = 0;
752
752
  return;
753
753
  }
754
- for (const q of K)
754
+ for (const q of $)
755
755
  b.push(q), D(b, J + 1), b.pop();
756
756
  };
757
- if (D([], 0), O.length === 0)
757
+ if (D([], 0), k.length === 0)
758
758
  continue;
759
- const k = [...g.axesSpec], Ae = d.map((b) => b);
759
+ const O = [...g.axesSpec], Ie = d.map((b) => b);
760
760
  for (let b = d.length - 1; b >= 0; b--)
761
- k.splice(d[b], 1);
762
- const Ie = { ...g, axesSpec: k };
763
- for (const b of O) {
764
- const J = b.map((R, K) => {
765
- const q = Ae[K], Se = pe(g.axesSpec[q]), ue = B[K], Ce = (ue == null ? void 0 : ue[R]) ?? String(R);
766
- return { axisIdx: q, axisId: Se, value: R, label: Ce };
761
+ O.splice(d[b], 1);
762
+ const Se = { ...g, axesSpec: O };
763
+ for (const b of k) {
764
+ const J = b.map((R, $) => {
765
+ const q = Ie[$], Ce = pe(g.axesSpec[q]), ue = B[$], Le = (ue == null ? void 0 : ue[R]) ?? String(R);
766
+ return { axisIdx: q, axisId: Ce, value: R, label: Le };
767
767
  });
768
768
  E.push({
769
769
  type: "split",
770
770
  originalColumn: p,
771
771
  spec: g,
772
- adjustedSpec: Ie,
772
+ adjustedSpec: Se,
773
773
  dataEntries: m,
774
774
  axisFilters: J
775
775
  });
@@ -784,18 +784,18 @@ class me {
784
784
  }
785
785
  }
786
786
  if (E.length === 0) return [];
787
- const f = Pe(
787
+ const f = Ae(
788
788
  E,
789
789
  (u) => ({
790
790
  spec: u.spec,
791
- suffixTrace: u.type === "split" ? st(u.axisFilters) : void 0
791
+ suffixTrace: u.type === "split" ? ot(u.axisFilters) : void 0
792
792
  }),
793
793
  l
794
794
  ), P = [];
795
795
  for (const { value: u, label: h } of f) {
796
- const { originalColumn: v, spec: C } = u, L = u.type === "split" ? u.axisFilters : void 0, d = ot(L);
797
- let x;
798
- n ? x = n.deriveS(C, d) : x = at(v.id, d);
796
+ const { originalColumn: v, spec: C } = u, L = u.type === "split" ? u.axisFilters : void 0, d = at(L);
797
+ let A;
798
+ r ? A = r.deriveS(C, d) : A = lt(v.id, d);
799
799
  let p = { ...u.adjustedSpec };
800
800
  o && (p = {
801
801
  ...p,
@@ -804,23 +804,23 @@ class me {
804
804
  "pl7.app/label": h
805
805
  }
806
806
  }), P.push({
807
- id: x,
807
+ id: A,
808
808
  spec: p,
809
- data: () => u.type === "split" ? De(nt(u.dataEntries, d)) : u.originalColumn.data,
809
+ data: () => u.type === "split" ? $e(nt(u.dataEntries, d)) : u.originalColumn.data,
810
810
  label: h
811
811
  });
812
812
  }
813
813
  return P;
814
814
  }
815
815
  getColumns(e, t) {
816
- const n = this.getUniversalEntries(e, {
816
+ const r = this.getUniversalEntries(e, {
817
817
  overrideLabelAnnotation: !0,
818
818
  // default for getColumns
819
819
  ...t ?? {}
820
820
  });
821
- if (!n) return;
821
+ if (!r) return;
822
822
  const i = [];
823
- for (const s of n) {
823
+ for (const s of r) {
824
824
  const o = s.data();
825
825
  if (!o) {
826
826
  if (t != null && t.dontWaitAllData) continue;
@@ -835,17 +835,50 @@ class me {
835
835
  return i;
836
836
  }
837
837
  }
838
- function ee(r, e) {
839
- if (r === void 0) return e === void 0;
838
+ function ye(n) {
839
+ const e = (i) => i.operator !== "InSet" ? i : {
840
+ operator: "Or",
841
+ operands: i.references.map((s) => ({
842
+ operator: "Equal",
843
+ reference: s
844
+ }))
845
+ }, t = (i, s) => {
846
+ switch (i.operator) {
847
+ case "And":
848
+ return {
849
+ ...i,
850
+ operands: i.operands.map((o) => t(o, s))
851
+ };
852
+ case "Or":
853
+ return {
854
+ ...i,
855
+ operands: i.operands.map((o) => t(o, s))
856
+ };
857
+ case "Not":
858
+ return {
859
+ ...i,
860
+ operand: t(i.operand, s)
861
+ };
862
+ default:
863
+ return s(i);
864
+ }
865
+ }, r = (i, s) => ({
866
+ ...i,
867
+ predicate: t(i.predicate, s)
868
+ });
869
+ return n.map((i) => r(i, e));
870
+ }
871
+ function ee(n, e) {
872
+ if (n === void 0) return e === void 0;
840
873
  if (e === void 0) return !0;
841
874
  for (const t in e)
842
- if (r[t] !== e[t]) return !1;
875
+ if (n[t] !== e[t]) return !1;
843
876
  return !0;
844
877
  }
845
- function ye(r) {
846
- return le(r, (e) => e instanceof S ? e.handle : ae(e) ? Ne(e, (t) => t.handle) : e);
878
+ function ve(n) {
879
+ return le(n, (e) => e instanceof S ? e.handle : ae(e) ? je(e, (t) => t.handle) : e);
847
880
  }
848
- class ut {
881
+ class ct {
849
882
  constructor() {
850
883
  I(this, "ctx", c());
851
884
  }
@@ -856,9 +889,9 @@ class ut {
856
889
  return this.ctx.calculateOptions(e);
857
890
  }
858
891
  getOptions(e, t) {
859
- const n = typeof e == "function" ? e : W(e), i = this.getSpecs().entries.filter((a) => n(a.obj));
892
+ const r = typeof e == "function" ? e : W(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
860
893
  let s = {}, o = !1;
861
- return typeof t < "u" && (typeof t == "function" ? s = t : typeof t == "object" && ("includeNativeLabel" in t || "separator" in t || "addLabelAsSuffix" in t ? s = t : (t = t, s = t.label ?? {}, o = t.refsWithEnrichments ?? !1))), typeof s == "object" ? Pe(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
894
+ return typeof t < "u" && (typeof t == "function" ? s = t : typeof t == "object" && ("includeNativeLabel" in t || "separator" in t || "addLabelAsSuffix" in t ? s = t : (t = t, s = t.label ?? {}, o = t.refsWithEnrichments ?? !1))), typeof s == "object" ? Ae(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
862
895
  ref: ce(a, o),
863
896
  label: l
864
897
  })) : i.map(({ ref: a, obj: l }) => ({
@@ -869,14 +902,14 @@ class ut {
869
902
  resolveAnchorCtx(e) {
870
903
  if (e instanceof he) return e;
871
904
  const t = {};
872
- for (const [n, i] of Object.entries(e))
873
- if (Te(i)) {
905
+ for (const [r, i] of Object.entries(e))
906
+ if (Fe(i)) {
874
907
  const s = this.getPColumnSpecByRef(i);
875
908
  if (!s)
876
909
  return;
877
- t[n] = s;
910
+ t[r] = s;
878
911
  } else
879
- t[n] = i;
912
+ t[r] = i;
880
913
  return new he(t);
881
914
  }
882
915
  /**
@@ -887,11 +920,11 @@ class ut {
887
920
  * @param opts - Optional configuration for label generation and data waiting
888
921
  * @returns A PFrameHandle for the created PFrame, or undefined if any required data is missing
889
922
  */
890
- getAnchoredPColumns(e, t, n) {
923
+ getAnchoredPColumns(e, t, r) {
891
924
  const i = this.resolveAnchorCtx(e);
892
925
  if (i)
893
926
  return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(t, {
894
- ...n,
927
+ ...r,
895
928
  anchorCtx: i
896
929
  });
897
930
  }
@@ -924,11 +957,11 @@ class ut {
924
957
  * @returns An array of objects with `label` (display text) and `value` (anchored ID string) properties,
925
958
  * or undefined if any PlRef resolution fails.
926
959
  */
927
- getCanonicalOptions(e, t, n) {
960
+ getCanonicalOptions(e, t, r) {
928
961
  const i = this.resolveAnchorCtx(e);
929
962
  if (!i) return;
930
963
  const s = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(t, {
931
- ...n,
964
+ ...r,
932
965
  anchorCtx: i
933
966
  });
934
967
  if (s)
@@ -970,9 +1003,9 @@ class ut {
970
1003
  ref: t.ref,
971
1004
  obj: {
972
1005
  ...t.obj,
973
- data: Fe(
1006
+ data: Oe(
974
1007
  t.obj.data,
975
- (n) => new S(n, [t.ref.blockId, t.ref.name])
1008
+ (r) => new S(r, [t.ref.blockId, t.ref.name])
976
1009
  )
977
1010
  }
978
1011
  }))
@@ -997,10 +1030,10 @@ class ut {
997
1030
  return (t = this.getData().entries.find(
998
1031
  (i) => i.ref.blockId === e.blockId && i.ref.name === e.name
999
1032
  )) == null ? void 0 : t.obj;
1000
- const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
1001
- if (n)
1033
+ const r = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
1034
+ if (r)
1002
1035
  return le(
1003
- n,
1036
+ r,
1004
1037
  (i) => new S(i, [e.blockId, e.name])
1005
1038
  );
1006
1039
  }
@@ -1040,17 +1073,17 @@ class ut {
1040
1073
  */
1041
1074
  findDataWithCompatibleSpec(e) {
1042
1075
  const t = [];
1043
- e: for (const n of this.getData().entries) {
1044
- if (!G(n.obj.spec))
1076
+ e: for (const r of this.getData().entries) {
1077
+ if (!G(r.obj.spec))
1045
1078
  continue;
1046
- const i = n.obj.spec;
1079
+ const i = r.obj.spec;
1047
1080
  if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ee(e.domain, i.domain)) {
1048
1081
  for (let s = 0; s < e.axesSpec.length; ++s) {
1049
1082
  const o = e.axesSpec[s], a = i.axesSpec[s];
1050
1083
  if (o.name !== a.name || o.type !== a.type || !ee(o.domain, a.domain))
1051
1084
  continue e;
1052
1085
  }
1053
- t.push(n.obj);
1086
+ t.push(r.obj);
1054
1087
  }
1055
1088
  }
1056
1089
  return t;
@@ -1061,15 +1094,15 @@ class ut {
1061
1094
  */
1062
1095
  findLabels(e) {
1063
1096
  const t = this.getData();
1064
- for (const n of t.entries) {
1065
- if (!ve(n.obj)) continue;
1066
- const i = n.obj.spec;
1097
+ for (const r of t.entries) {
1098
+ if (!be(r.obj)) continue;
1099
+ const i = r.obj.spec;
1067
1100
  if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ee(e.domain, i.axesSpec[0].domain)) {
1068
- if (n.obj.data.resourceType.name !== "PColumnData/Json")
1069
- throw Error(`Expected JSON column for labels, got: ${n.obj.data.resourceType.name}`);
1101
+ if (r.obj.data.resourceType.name !== "PColumnData/Json")
1102
+ throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
1070
1103
  return Object.fromEntries(
1071
1104
  Object.entries(
1072
- n.obj.data.getDataAsJson().data
1105
+ r.obj.data.getDataAsJson().data
1073
1106
  ).map((s) => [JSON.parse(s[0])[0], s[1]])
1074
1107
  );
1075
1108
  }
@@ -1084,16 +1117,16 @@ class ut {
1084
1117
  */
1085
1118
  selectColumns(e) {
1086
1119
  const t = typeof e == "function" ? e : W(e);
1087
- return this.getSpecs().entries.filter(({ obj: n }) => G(n) ? t(n) : !1).map(({ ref: n, obj: i }) => {
1120
+ return this.getSpecs().entries.filter(({ obj: r }) => G(r) ? t(r) : !1).map(({ ref: r, obj: i }) => {
1088
1121
  const s = i;
1089
1122
  let o = null;
1090
1123
  const a = this;
1091
1124
  return {
1092
- id: _e(n),
1125
+ id: we(r),
1093
1126
  spec: s,
1094
1127
  get data() {
1095
1128
  var l;
1096
- return o !== null || (o = (l = a.getPColumnByRef(n)) == null ? void 0 : l.data), o;
1129
+ return o !== null || (o = (l = a.getPColumnByRef(r)) == null ? void 0 : l.data), o;
1097
1130
  }
1098
1131
  };
1099
1132
  });
@@ -1103,10 +1136,10 @@ class ut {
1103
1136
  * @returns a map of axis value => label
1104
1137
  */
1105
1138
  findLabelsForColumnAxis(e, t) {
1106
- var n;
1139
+ var r;
1107
1140
  const i = this.findLabels(e.axesSpec[t]);
1108
1141
  if (!i) return;
1109
- const s = (n = e.annotations) == null ? void 0 : n["pl7.app/axisKeys/" + t];
1142
+ const s = (r = e.annotations) == null ? void 0 : r["pl7.app/axisKeys/" + t];
1110
1143
  if (s !== void 0) {
1111
1144
  const o = JSON.parse(s);
1112
1145
  return Object.fromEntries(o.map((a) => [a, i[a] ?? "Unlabelled"]));
@@ -1116,7 +1149,7 @@ class ut {
1116
1149
  }
1117
1150
  class z {
1118
1151
  constructor() {
1119
- I(this, "ctx"), I(this, "_argsCache"), I(this, "_uiStateCache"), I(this, "_activeArgsCache"), I(this, "resultPool", new ut()), this.ctx = c();
1152
+ I(this, "ctx"), I(this, "_argsCache"), I(this, "_uiStateCache"), I(this, "_activeArgsCache"), I(this, "resultPool", new ct()), this.ctx = c();
1120
1153
  }
1121
1154
  get args() {
1122
1155
  if (this._argsCache === void 0) {
@@ -1150,16 +1183,16 @@ class z {
1150
1183
  // return this.ctx.featureFlags;
1151
1184
  // }
1152
1185
  getNamedAccessor(e) {
1153
- return ne(
1186
+ return re(
1154
1187
  this.ctx.getAccessorHandleByName(e),
1155
1188
  (t) => new S(t, [e])
1156
1189
  );
1157
1190
  }
1158
1191
  get prerun() {
1159
- return this.getNamedAccessor(Me);
1192
+ return this.getNamedAccessor(We);
1160
1193
  }
1161
1194
  get outputs() {
1162
- return this.getNamedAccessor(We);
1195
+ return this.getNamedAccessor(He);
1163
1196
  }
1164
1197
  /**
1165
1198
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -1171,21 +1204,25 @@ class z {
1171
1204
  }
1172
1205
  verifyInlineAndExplicitColumnsSupport(e) {
1173
1206
  var t;
1174
- const n = e.some((s) => !(s.data instanceof S) || ae(s.data)), i = ((t = this.ctx.featureFlags) == null ? void 0 : t.inlineColumnsSupport) === !0;
1175
- if (n && !i) throw Error("Inline or explicit columns not supported");
1207
+ const r = e.some((s) => !(s.data instanceof S) || ae(s.data)), i = ((t = this.ctx.featureFlags) == null ? void 0 : t.inlineColumnsSupport) === !0;
1208
+ if (r && !i) throw Error("Inline or explicit columns not supported");
1176
1209
  }
1177
1210
  patchPTableDef(e) {
1178
- var t;
1179
- return (t = this.ctx.featureFlags) != null && t.pTablePartitionFiltersSupport ? e : {
1211
+ var t, r;
1212
+ return (t = this.ctx.featureFlags) != null && t.pTablePartitionFiltersSupport || (e = {
1180
1213
  ...e,
1181
1214
  partitionFilters: [],
1182
1215
  filters: [...e.partitionFilters, ...e.filters]
1183
- };
1216
+ }), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
1217
+ ...e,
1218
+ partitionFilters: ye(e.partitionFilters),
1219
+ filters: ye(e.filters)
1220
+ }), e;
1184
1221
  }
1185
1222
  // TODO remove all non-PColumn fields
1186
1223
  createPFrame(e) {
1187
1224
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
1188
- e.map((t) => ye(t))
1225
+ e.map((t) => ve(t))
1189
1226
  );
1190
1227
  }
1191
1228
  createPTable(e) {
@@ -1193,13 +1230,13 @@ class z {
1193
1230
  return "columns" in e ? t = this.patchPTableDef({
1194
1231
  src: {
1195
1232
  type: "full",
1196
- entries: e.columns.map((n) => ({ type: "column", column: n }))
1233
+ entries: e.columns.map((r) => ({ type: "column", column: r }))
1197
1234
  },
1198
1235
  partitionFilters: e.filters ?? [],
1199
1236
  filters: [],
1200
1237
  sorting: e.sorting ?? []
1201
- }) : t = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(Le(t.src)), this.ctx.createPTable(
1202
- Ee(t, (n) => ye(n))
1238
+ }) : t = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(Ee(t.src)), this.ctx.createPTable(
1239
+ Te(t, (r) => ve(r))
1203
1240
  );
1204
1241
  }
1205
1242
  /** @deprecated scheduled for removal from SDK */
@@ -1219,17 +1256,17 @@ class z {
1219
1256
  this.ctx.logError(e);
1220
1257
  }
1221
1258
  }
1222
- const Y = "1.39.0";
1223
- function ct(r) {
1224
- return r.__renderLambda === !0;
1259
+ const Y = "1.39.6";
1260
+ function ht(n) {
1261
+ return n.__renderLambda === !0;
1225
1262
  }
1226
- function te(r) {
1227
- if (r !== void 0)
1228
- return ct(r) ? r.handle : r;
1263
+ function te(n) {
1264
+ if (n !== void 0)
1265
+ return ht(n) ? n.handle : n;
1229
1266
  }
1230
- const ht = class _ {
1231
- constructor(e, t, n, i, s, o, a, l, y) {
1232
- this._renderingMode = e, this._initialArgs = t, this._initialUiState = n, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l, this._featureFlags = y;
1267
+ const dt = class _ {
1268
+ constructor(e, t, r, i, s, o, a, l, y) {
1269
+ this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l, this._featureFlags = y;
1233
1270
  }
1234
1271
  static create(e = "Heavy") {
1235
1272
  return new _(
@@ -1244,10 +1281,10 @@ const ht = class _ {
1244
1281
  { ..._.INITIAL_BLOCK_FEATURE_FLAGS }
1245
1282
  );
1246
1283
  }
1247
- output(e, t, n = {}) {
1284
+ output(e, t, r = {}) {
1248
1285
  if (typeof t == "function") {
1249
1286
  const i = `output#${e}`;
1250
- return U(i, () => t(new z())), new _(
1287
+ return V(i, () => t(new z())), new _(
1251
1288
  this._renderingMode,
1252
1289
  this._initialArgs,
1253
1290
  this._initialUiState,
@@ -1256,7 +1293,7 @@ const ht = class _ {
1256
1293
  [e]: {
1257
1294
  __renderLambda: !0,
1258
1295
  handle: i,
1259
- ...n
1296
+ ...r
1260
1297
  }
1261
1298
  },
1262
1299
  this._inputsValid,
@@ -1286,7 +1323,7 @@ const ht = class _ {
1286
1323
  return this.output(e, t, { retentive: !0 });
1287
1324
  }
1288
1325
  argsValid(e) {
1289
- return typeof e == "function" ? (U("inputsValid", () => e(new z())), new _(
1326
+ return typeof e == "function" ? (V("inputsValid", () => e(new z())), new _(
1290
1327
  this._renderingMode,
1291
1328
  this._initialArgs,
1292
1329
  this._initialUiState,
@@ -1312,7 +1349,7 @@ const ht = class _ {
1312
1349
  );
1313
1350
  }
1314
1351
  sections(e) {
1315
- return Array.isArray(e) ? this.sections(Q(e)) : typeof e == "function" ? (U("sections", () => e(new z())), new _(
1352
+ return Array.isArray(e) ? this.sections(Q(e)) : typeof e == "function" ? (V("sections", () => e(new z())), new _(
1316
1353
  this._renderingMode,
1317
1354
  this._initialArgs,
1318
1355
  this._initialUiState,
@@ -1336,7 +1373,7 @@ const ht = class _ {
1336
1373
  }
1337
1374
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
1338
1375
  title(e) {
1339
- return U("title", () => e(new z())), new _(
1376
+ return V("title", () => e(new z())), new _(
1340
1377
  this._renderingMode,
1341
1378
  this._initialArgs,
1342
1379
  this._initialUiState,
@@ -1398,7 +1435,7 @@ const ht = class _ {
1398
1435
  * Influences dependency graph construction.
1399
1436
  */
1400
1437
  enriches(e) {
1401
- return U("enrichmentTargets", e), new _(
1438
+ return V("enrichmentTargets", e), new _(
1402
1439
  this._renderingMode,
1403
1440
  this._initialArgs,
1404
1441
  this._initialUiState,
@@ -1435,82 +1472,82 @@ const ht = class _ {
1435
1472
  inputsValid: te(this._inputsValid),
1436
1473
  sections: te(this._sections),
1437
1474
  outputs: Object.fromEntries(
1438
- Object.entries(this._outputs).map(([t, n]) => [t, te(n)])
1475
+ Object.entries(this._outputs).map(([t, r]) => [t, te(r)])
1439
1476
  )
1440
1477
  };
1441
- return Je() ? we({ sdkVersion: Y }) : { config: e };
1478
+ return Ve() ? Pe({ sdkVersion: Y }) : { config: e };
1442
1479
  }
1443
1480
  };
1444
- I(ht, "INITIAL_BLOCK_FEATURE_FLAGS", {
1481
+ I(dt, "INITIAL_BLOCK_FEATURE_FLAGS", {
1445
1482
  supportsLazyState: !0,
1446
1483
  requiresUIAPIVersion: 1,
1447
1484
  requiresModelAPIVersion: 1
1448
1485
  });
1449
- function gt() {
1450
- return we({ sdkVersion: Y });
1486
+ function mt() {
1487
+ return Pe({ sdkVersion: Y });
1451
1488
  }
1452
1489
  export {
1453
1490
  he as AnchoredIdDeriver,
1454
- Tt as BasePlErrorLike,
1455
- Ft as ErrorLike,
1491
+ Ft as BasePlErrorLike,
1492
+ Ot as ErrorLike,
1456
1493
  w as FutureRef,
1457
- He as PAnnotationLabel,
1458
- qe as PAnnotationTrace,
1494
+ qe as PAnnotationLabel,
1495
+ ze as PAnnotationTrace,
1459
1496
  me as PColumnCollection,
1460
1497
  kt as PlErrorLike,
1461
- vt as PlIdLength,
1498
+ bt as PlIdLength,
1462
1499
  N as RT_BINARY_PARTITIONED,
1463
1500
  M as RT_BINARY_SUPER_PARTITIONED,
1464
- V as RT_JSON_PARTITIONED,
1501
+ U as RT_JSON_PARTITIONED,
1465
1502
  Z as RT_JSON_SUPER_PARTITIONED,
1466
- re as RT_RESOURCE_MAP,
1503
+ ne as RT_RESOURCE_MAP,
1467
1504
  ie as RT_RESOURCE_MAP_PARTITIONED,
1468
1505
  z as RenderCtx,
1469
- ut as ResultPool,
1470
- Ot as StandardErrorLike,
1471
- Ge as Trace,
1472
- ze as TraceEntry,
1506
+ ct as ResultPool,
1507
+ Rt as StandardErrorLike,
1508
+ Ye as Trace,
1509
+ Ge as TraceEntry,
1473
1510
  S as TreeNodeAccessor,
1474
- $e as canonicalizeAxisId,
1475
- tt as convertOrParsePColumnData,
1511
+ Ne as canonicalizeAxisId,
1512
+ rt as convertOrParsePColumnData,
1476
1513
  Ke as dataInfoToEntries,
1477
- Pe as deriveLabels,
1478
- Oe as deriveNativeId,
1514
+ Ae as deriveLabels,
1515
+ Re as deriveNativeId,
1479
1516
  te as downgradeCfgOrLambda,
1480
1517
  ke as ensurePColumn,
1481
- De as entriesToDataInfo,
1482
- Le as extractAllColumns,
1518
+ $e as entriesToDataInfo,
1519
+ Ee as extractAllColumns,
1483
1520
  nt as filterDataInfoEntries,
1484
- bt as getAxesId,
1521
+ _t as getAxesId,
1485
1522
  pe as getAxisId,
1486
- _t as getFileNameFromHandle,
1487
- wt as getFilePathFromHandle,
1523
+ wt as getFileNameFromHandle,
1524
+ Pt as getFilePathFromHandle,
1488
1525
  Q as getImmediate,
1489
- Qe as getPartitionKeysList,
1490
- gt as getRawPlatformaInstance,
1491
- et as getUniquePartitionKeys,
1492
- ne as ifDef,
1493
- ct as isConfigLambda,
1526
+ Xe as getPartitionKeysList,
1527
+ mt as getRawPlatformaInstance,
1528
+ tt as getUniquePartitionKeys,
1529
+ re as ifDef,
1530
+ ht as isConfigLambda,
1494
1531
  ae as isDataInfo,
1495
- be as isDataInfoEntries,
1496
- Pt as isImportFileHandleIndex,
1532
+ _e as isDataInfoEntries,
1533
+ At as isImportFileHandleIndex,
1497
1534
  xt as isImportFileHandleUpload,
1498
- ve as isPColumn,
1535
+ be as isPColumn,
1499
1536
  G as isPColumnSpec,
1500
- Re as isPartitionedDataInfoEntries,
1501
- Te as isPlRef,
1502
- Ne as mapDataInfo,
1503
- At as mapJoinEntry,
1537
+ De as isPartitionedDataInfoEntries,
1538
+ Fe as isPlRef,
1539
+ je as mapDataInfo,
1540
+ It as mapJoinEntry,
1504
1541
  le as mapPObjectData,
1505
- Ee as mapPTableDef,
1506
- Fe as mapValueInVOE,
1507
- It as matchAxis,
1508
- St as matchAxisId,
1509
- Ct as matchPColumn,
1542
+ Te as mapPTableDef,
1543
+ Oe as mapValueInVOE,
1544
+ St as matchAxis,
1545
+ Ct as matchAxisId,
1546
+ Lt as matchPColumn,
1510
1547
  oe as parsePColumnData,
1511
1548
  de as resolveAnchors,
1512
1549
  W as selectorsToPredicate,
1513
- Lt as stringifyColumnId,
1550
+ Et as stringifyColumnId,
1514
1551
  ce as withEnrichments
1515
1552
  };
1516
1553
  //# sourceMappingURL=index.js.map