@platforma-sdk/model 1.30.11 → 1.30.24

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,67 +1,67 @@
1
- var Me = Object.defineProperty;
2
- var We = (t, e, n) => e in t ? Me(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var T = (t, e, n) => We(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { isPColumn as me, mapPObjectData as ye, isDataInfoEntries as _e, isDataInfo as ve, dataInfoToEntries as Ge, resolveAnchors as He, isPColumnSpec as Q, isPartitionedDataInfoEntries as qe, getAxisId as E, entriesToDataInfo as ze, selectorsToPredicate as ce, canonicalizeAxisId as Ye, withEnrichments as be, AnchoredIdDeriver as we, isPlRef as Xe, mapValueInVOE as Qe, ensurePColumn as Ze, extractAllColumns as et, mapPTableDef as tt, mapDataInfo as nt, canonicalizeJson as ee, matchAxisId as R, getColumnIdAndSpec as Ie, getPColumnSpecId as Ae } from "@milaboratories/pl-model-common";
1
+ var We = Object.defineProperty;
2
+ var Ge = (t, e, n) => e in t ? We(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var T = (t, e, n) => Ge(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { isPColumn as me, mapPObjectData as ye, isDataInfoEntries as _e, isDataInfo as ve, dataInfoToEntries as He, resolveAnchors as qe, deriveNativeId as ze, isPColumnSpec as Z, isPartitionedDataInfoEntries as Ye, getAxisId as E, entriesToDataInfo as Xe, selectorsToPredicate as ce, canonicalizeAxisId as Qe, withEnrichments as be, AnchoredIdDeriver as we, isPlRef as Ze, mapValueInVOE as et, ensurePColumn as tt, extractAllColumns as nt, mapPTableDef as rt, mapDataInfo as it, canonicalizeJson as te, matchAxisId as j, getColumnIdAndSpec as Ie, getPColumnSpecId as Ae } from "@milaboratories/pl-model-common";
5
5
  export * from "@milaboratories/pl-model-common";
6
6
  import Le from "canonicalize";
7
- import { z as K } from "zod";
7
+ import { z as J } from "zod";
8
8
  export * from "@milaboratories/pl-error-like";
9
- class rt extends Error {
9
+ class st extends Error {
10
10
  constructor(e, n) {
11
11
  super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0].message), this.errors = e, this.moreErrors = n;
12
12
  }
13
13
  }
14
- function it(t) {
15
- if (!t.ok) throw new rt(t.errors, t.moreErrors);
14
+ function ot(t) {
15
+ if (!t.ok) throw new st(t.errors, t.moreErrors);
16
16
  return t.value;
17
17
  }
18
- function Wt(t) {
18
+ function Gt(t) {
19
19
  return new Proxy(t, {
20
20
  get(e, n) {
21
- return it(e[n]);
21
+ return ot(e[n]);
22
22
  }
23
23
  });
24
24
  }
25
- function C(t) {
26
- return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? Z(t) : t;
25
+ function x(t) {
26
+ return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? ee(t) : t;
27
27
  }
28
- function H(t) {
28
+ function q(t) {
29
29
  return { type: "GetFromCtx", variable: t };
30
30
  }
31
- function Gt(t) {
31
+ function Ht(t) {
32
32
  return {
33
33
  type: "Isolate",
34
34
  cfg: t
35
35
  };
36
36
  }
37
- const Ht = H("$args"), qt = H("$it"), zt = H("$prod"), Yt = H("$staging"), Xt = H("$ui");
38
- function Z(t) {
37
+ const qt = q("$args"), zt = q("$it"), Yt = q("$prod"), Xt = q("$staging"), Qt = q("$ui");
38
+ function ee(t) {
39
39
  return { type: "Immediate", value: t };
40
40
  }
41
41
  function Te(t) {
42
42
  const e = {};
43
- for (const [n, r] of Object.entries(t)) e[n] = C(r);
43
+ for (const [n, r] of Object.entries(t)) e[n] = x(r);
44
44
  return {
45
45
  type: "MakeObject",
46
46
  template: e
47
47
  };
48
48
  }
49
- function Qt(...t) {
49
+ function Zt(...t) {
50
50
  const e = [];
51
- for (const n of t) e.push(C(n));
51
+ for (const n of t) e.push(x(n));
52
52
  return {
53
53
  type: "MakeArray",
54
54
  template: e
55
55
  };
56
56
  }
57
- function te(t, e) {
57
+ function ne(t, e) {
58
58
  return {
59
59
  type: "GetJsonField",
60
- source: C(t),
61
- field: C(e)
60
+ source: x(t),
61
+ field: x(e)
62
62
  };
63
63
  }
64
- function Zt(t, e, n = "$it") {
64
+ function en(t, e, n = "$it") {
65
65
  return {
66
66
  type: "MapRecordValues",
67
67
  source: t,
@@ -69,7 +69,7 @@ function Zt(t, e, n = "$it") {
69
69
  itVar: n
70
70
  };
71
71
  }
72
- function en(t, e, n = "$it") {
72
+ function tn(t, e, n = "$it") {
73
73
  return {
74
74
  type: "MapArrayValues",
75
75
  source: t,
@@ -77,54 +77,54 @@ function en(t, e, n = "$it") {
77
77
  itVar: n
78
78
  };
79
79
  }
80
- function tn(t) {
80
+ function nn(t) {
81
81
  return {
82
82
  type: "Flatten",
83
83
  source: t
84
84
  };
85
85
  }
86
- function nn(t) {
86
+ function rn(t) {
87
87
  return {
88
88
  type: "IsEmpty",
89
89
  arg: t
90
90
  };
91
91
  }
92
- function rn(t) {
92
+ function sn(t) {
93
93
  return {
94
94
  type: "Not",
95
95
  operand: t
96
96
  };
97
97
  }
98
- function sn(t, e) {
98
+ function on(t, e) {
99
99
  return {
100
100
  type: "And",
101
101
  operand1: t,
102
102
  operand2: e
103
103
  };
104
104
  }
105
- function on(t, e) {
105
+ function an(t, e) {
106
106
  return {
107
107
  type: "Or",
108
108
  operand1: t,
109
109
  operand2: e
110
110
  };
111
111
  }
112
- function an(t, e) {
112
+ function ln(t, e) {
113
113
  return {
114
114
  type: "GetResourceField",
115
- source: C(t),
116
- field: C(e)
115
+ source: x(t),
116
+ field: x(e)
117
117
  };
118
118
  }
119
- function ln() {
119
+ function un() {
120
120
  return function(t) {
121
121
  return {
122
122
  type: "GetResourceValueAsJson",
123
- source: C(t)
123
+ source: x(t)
124
124
  };
125
125
  };
126
126
  }
127
- function un(t, e, n = "$it") {
127
+ function cn(t, e, n = "$it") {
128
128
  return {
129
129
  type: "MapResourceFields",
130
130
  source: t,
@@ -132,79 +132,79 @@ function un(t, e, n = "$it") {
132
132
  itVar: n
133
133
  };
134
134
  }
135
- function cn(t) {
135
+ function pn(t) {
136
136
  return {
137
137
  type: "GetBlobContent",
138
- source: C(t)
138
+ source: x(t)
139
139
  };
140
140
  }
141
- function pn(t) {
141
+ function dn(t) {
142
142
  return {
143
143
  type: "GetBlobContentAsString",
144
- source: C(t)
144
+ source: x(t)
145
145
  };
146
146
  }
147
- function dn() {
147
+ function fn() {
148
148
  return function(t) {
149
149
  return {
150
150
  type: "GetBlobContentAsJson",
151
- source: C(t)
151
+ source: x(t)
152
152
  };
153
153
  };
154
154
  }
155
- function fn(t) {
155
+ function hn(t) {
156
156
  return {
157
157
  type: "GetDownloadedBlobContent",
158
- source: C(t)
158
+ source: x(t)
159
159
  };
160
160
  }
161
- function hn(t) {
161
+ function gn(t) {
162
162
  return {
163
163
  type: "GetOnDemandBlobContent",
164
- source: C(t)
164
+ source: x(t)
165
165
  };
166
166
  }
167
- function gn(t, e) {
167
+ function mn(t, e) {
168
168
  return {
169
169
  type: "ExtractArchiveAndGetURL",
170
170
  format: e,
171
- source: C(t)
171
+ source: x(t)
172
172
  };
173
173
  }
174
- function mn(t) {
174
+ function yn(t) {
175
175
  return {
176
176
  type: "GetImportProgress",
177
- source: C(t)
177
+ source: x(t)
178
178
  };
179
179
  }
180
- function yn(t, e) {
180
+ function vn(t, e) {
181
181
  return {
182
182
  type: "GetLastLogs",
183
- source: C(t),
183
+ source: x(t),
184
184
  lines: e
185
185
  };
186
186
  }
187
- function vn(t, e) {
187
+ function bn(t, e) {
188
188
  return {
189
189
  type: "GetProgressLog",
190
- source: C(t),
190
+ source: x(t),
191
191
  patternToSearch: e
192
192
  };
193
193
  }
194
- function bn(t, e) {
194
+ function wn(t, e) {
195
195
  return {
196
196
  type: "GetProgressLogWithInfo",
197
- source: C(t),
197
+ source: x(t),
198
198
  patternToSearch: e
199
199
  };
200
200
  }
201
- function wn(t) {
201
+ function An(t) {
202
202
  return {
203
203
  type: "GetLogHandle",
204
- source: C(t)
204
+ source: x(t)
205
205
  };
206
206
  }
207
- function st() {
207
+ function at() {
208
208
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
209
209
  }
210
210
  function Ee(t) {
@@ -213,39 +213,39 @@ function Ee(t) {
213
213
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
214
214
  throw new Error("Can't get platforma instance.");
215
215
  }
216
- function ot() {
216
+ function lt() {
217
217
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
218
218
  }
219
219
  function y() {
220
220
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
221
221
  throw new Error("Not in config rendering context");
222
222
  }
223
- function B(t, e) {
224
- const n = ot();
223
+ function M(t, e) {
224
+ const n = lt();
225
225
  if (n === void 0) return !1;
226
226
  if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
227
227
  return n.callbackRegistry[t] = e, !0;
228
228
  }
229
229
  const ae = /* @__PURE__ */ new Map();
230
- function at(t, e) {
230
+ function ut(t, e) {
231
231
  t in y().callbackRegistry || (y().callbackRegistry[t] = (n) => {
232
232
  for (const r of ae.get(t))
233
233
  r(n);
234
234
  }, ae.set(t, [])), ae.get(t).push(e);
235
235
  }
236
- class S {
236
+ class _ {
237
237
  constructor(e, n = (r) => r) {
238
238
  T(this, "isResolved", !1);
239
239
  T(this, "resolvedValue");
240
- this.handle = e, this.postProcess = n, at(e, (r) => {
240
+ this.handle = e, this.postProcess = n, ut(e, (r) => {
241
241
  this.resolvedValue = n(r), this.isResolved = !0;
242
242
  });
243
243
  }
244
244
  map(e) {
245
- return new S(this.handle, (n) => e(this.postProcess(n)));
245
+ return new _(this.handle, (n) => e(this.postProcess(n)));
246
246
  }
247
247
  mapDefined(e) {
248
- return new S(this.handle, (n) => {
248
+ return new _(this.handle, (n) => {
249
249
  const r = this.postProcess(n);
250
250
  return r ? e(r) : void 0;
251
251
  });
@@ -257,7 +257,7 @@ class S {
257
257
  function pe(t, e) {
258
258
  return t === void 0 ? void 0 : e(t);
259
259
  }
260
- class I {
260
+ class L {
261
261
  constructor(e, n) {
262
262
  this.handle = e, this.resolvePath = n;
263
263
  }
@@ -298,7 +298,7 @@ class I {
298
298
  ];
299
299
  return pe(
300
300
  y().resolveWithCommon(this.handle, e, ...n),
301
- (i) => new I(i, r)
301
+ (i) => new L(i, r)
302
302
  );
303
303
  }
304
304
  get resourceType() {
@@ -320,7 +320,7 @@ class I {
320
320
  const e = [...this.resolvePath, "error"];
321
321
  return pe(
322
322
  y().getError(this.handle),
323
- (n) => new I(n, e)
323
+ (n) => new L(n, e)
324
324
  );
325
325
  }
326
326
  listInputFields() {
@@ -378,18 +378,18 @@ class I {
378
378
  const i = {};
379
379
  for (const [s, o] of Object.entries(r)) {
380
380
  const a = [...this.resolvePath, s];
381
- i[s] = ye(o, (l) => new I(l, a));
381
+ i[s] = ye(o, (l) => new L(l, a));
382
382
  }
383
383
  return i;
384
384
  }
385
385
  getFileContentAsBase64() {
386
- return new S(y().getBlobContentAsBase64(this.handle));
386
+ return new _(y().getBlobContentAsBase64(this.handle));
387
387
  }
388
388
  getFileContentAsString() {
389
- return new S(y().getBlobContentAsString(this.handle));
389
+ return new _(y().getBlobContentAsString(this.handle));
390
390
  }
391
391
  getFileContentAsJson() {
392
- return new S(
392
+ return new _(
393
393
  y().getBlobContentAsString(this.handle)
394
394
  ).mapDefined((e) => JSON.parse(e));
395
395
  }
@@ -409,7 +409,7 @@ class I {
409
409
  * @returns downloaded file handle
410
410
  */
411
411
  getFileHandle() {
412
- return new S(y().getDownloadedBlobContentHandle(this.handle));
412
+ return new _(y().getDownloadedBlobContentHandle(this.handle));
413
413
  }
414
414
  /**
415
415
  * @deprecated use getFileHandle
@@ -421,7 +421,7 @@ class I {
421
421
  * @returns downloaded file handle
422
422
  */
423
423
  getRemoteFileHandle() {
424
- return new S(y().getOnDemandBlobContentHandle(this.handle));
424
+ return new _(y().getOnDemandBlobContentHandle(this.handle));
425
425
  }
426
426
  /**
427
427
  * @deprecated use getRemoteFileHandle
@@ -433,22 +433,22 @@ class I {
433
433
  * @returns the url to the extracted folder
434
434
  */
435
435
  extractArchiveAndGetURL(e) {
436
- return new S(y().extractArchiveAndGetURL(this.handle, e));
436
+ return new _(y().extractArchiveAndGetURL(this.handle, e));
437
437
  }
438
438
  getImportProgress() {
439
- return new S(y().getImportProgress(this.handle));
439
+ return new _(y().getImportProgress(this.handle));
440
440
  }
441
441
  getLastLogs(e) {
442
- return new S(y().getLastLogs(this.handle, e));
442
+ return new _(y().getLastLogs(this.handle, e));
443
443
  }
444
444
  getProgressLog(e) {
445
- return new S(y().getProgressLog(this.handle, e));
445
+ return new _(y().getProgressLog(this.handle, e));
446
446
  }
447
447
  getProgressLogWithInfo(e) {
448
- return new S(y().getProgressLogWithInfo(this.handle, e));
448
+ return new _(y().getProgressLogWithInfo(this.handle, e));
449
449
  }
450
450
  getLogHandle() {
451
- return new S(y().getLogHandle(this.handle));
451
+ return new _(y().getLogHandle(this.handle));
452
452
  }
453
453
  allFieldsResolved(e = "Input") {
454
454
  switch (e) {
@@ -474,121 +474,122 @@ class I {
474
474
  let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
475
475
  (u) => [u, this.resolve({ field: u, assertFieldType: r })]
476
476
  );
477
- return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, p]) => o(u, p));
477
+ return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, d]) => o(u, d));
478
478
  }
479
479
  }
480
- const Fe = "staging", De = "main", lt = {
480
+ const Fe = "staging", Oe = "main", ct = {
481
481
  explicitColumnsSupport: !0,
482
482
  inlineColumnsSupport: !0,
483
483
  activeArgs: !0
484
484
  };
485
- function Oe(t) {
485
+ function De(t) {
486
486
  return typeof t == "object" && t !== null && "__awaited_futures__" in t;
487
487
  }
488
488
  function de(t, e, n) {
489
489
  if (e.has(n)) return;
490
490
  if (e.add(n), typeof n === "object")
491
- if (Oe(n)) n.__awaited_futures__.forEach((i) => t.add(i));
491
+ if (De(n)) n.__awaited_futures__.forEach((i) => t.add(i));
492
492
  else if (Array.isArray(n))
493
493
  for (const i of n) de(t, e, i);
494
494
  else
495
495
  for (const [, i] of Object.entries(n))
496
496
  i !== n && de(t, e, i);
497
497
  }
498
- function ut(t) {
498
+ function pt(t) {
499
499
  const e = /* @__PURE__ */ new Set();
500
500
  return de(e, /* @__PURE__ */ new Set(), t), e;
501
501
  }
502
- const An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
502
+ const xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
503
503
  __proto__: null,
504
- GlobalCfgRenderCtxFeatureFlags: lt,
505
- MainAccessorName: De,
504
+ GlobalCfgRenderCtxFeatureFlags: ct,
505
+ MainAccessorName: Oe,
506
506
  StagingAccessorName: Fe,
507
- getAllFutureAwaits: ut,
508
- isFutureAwait: Oe
509
- }, Symbol.toStringTag, { value: "Module" })), ct = "pl7.app/label", pt = "pl7.app/trace", dt = K.object({
510
- type: K.string(),
511
- importance: K.number().optional(),
512
- id: K.string().optional(),
513
- label: K.string()
514
- }), ft = K.array(dt), ht = 1e-3, gt = "__LABEL__", xe = "__LABEL__@1";
507
+ getAllFutureAwaits: pt,
508
+ isFutureAwait: De
509
+ }, Symbol.toStringTag, { value: "Module" })), dt = "pl7.app/label", ft = "pl7.app/trace", ht = J.object({
510
+ type: J.string(),
511
+ importance: J.number().optional(),
512
+ id: J.string().optional(),
513
+ label: J.string()
514
+ }), gt = J.array(ht), mt = 1e-3, yt = "__LABEL__", xe = "__LABEL__@1";
515
515
  function Re(t, e, n = {}) {
516
- const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((f) => {
517
- var z, F;
518
- const g = e(f);
519
- let h, P, c;
520
- "spec" in g && typeof g.spec == "object" ? (h = g.spec, P = g.prefixTrace, c = g.suffixTrace) : h = g;
521
- const b = (z = h.annotations) == null ? void 0 : z[ct], m = (F = h.annotations) == null ? void 0 : F[pt], w = (m ? ft.safeParse(JSON.parse(m)).data : void 0) ?? [], A = [
522
- ...P ?? [],
516
+ const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((h) => {
517
+ var O, U;
518
+ const c = e(h);
519
+ let m, b, A;
520
+ "spec" in c && typeof c.spec == "object" ? (m = c.spec, b = c.prefixTrace, A = c.suffixTrace) : m = c;
521
+ const p = (O = m.annotations) == null ? void 0 : O[dt], g = (U = m.annotations) == null ? void 0 : U[ft], w = (g ? gt.safeParse(JSON.parse(g)).data : void 0) ?? [], f = [
522
+ ...b ?? [],
523
523
  ...w,
524
- ...c ?? []
524
+ ...A ?? []
525
525
  ];
526
- if (b) {
527
- const L = { label: b, type: gt, importance: -2 };
528
- n.addLabelAsSuffix ? A.push(L) : A.splice(0, 0, L);
526
+ if (p !== void 0) {
527
+ const F = { label: p, type: yt, importance: -2 };
528
+ n.addLabelAsSuffix ? f.push(F) : f.splice(0, 0, F);
529
529
  }
530
- const D = [], J = /* @__PURE__ */ new Map();
531
- for (let L = A.length - 1; L >= 0; --L) {
532
- const { type: k } = A[L], se = A[L].importance ?? 0, N = (J.get(k) ?? 0) + 1;
533
- J.set(k, N);
534
- const x = `${k}@${N}`;
535
- i.set(x, (i.get(x) ?? 0) + 1), r.set(
536
- x,
530
+ const C = [], P = /* @__PURE__ */ new Map();
531
+ for (let F = f.length - 1; F >= 0; --F) {
532
+ const { type: D } = f[F], Y = f[F].importance ?? 0, V = (P.get(D) ?? 0) + 1;
533
+ P.set(D, V);
534
+ const R = `${D}@${V}`;
535
+ i.set(R, (i.get(R) ?? 0) + 1), r.set(
536
+ R,
537
537
  Math.max(
538
- r.get(x) ?? Number.NEGATIVE_INFINITY,
539
- se - (A.length - L) * ht
538
+ r.get(R) ?? Number.NEGATIVE_INFINITY,
539
+ Y - (f.length - F) * mt
540
540
  )
541
- ), D.push({ ...A[L], fullType: x, occurenceIndex: N });
541
+ ), C.push({ ...f[F], fullType: R, occurrenceIndex: V });
542
542
  }
543
- return D.reverse(), {
544
- value: f,
545
- spec: h,
546
- label: b,
547
- fullTrace: D
543
+ return C.reverse(), {
544
+ value: h,
545
+ spec: m,
546
+ label: p,
547
+ fullTrace: C
548
548
  };
549
549
  }), o = [], a = [], l = [...r];
550
- l.sort(([, f], [, g]) => g - f);
551
- for (const [f] of l)
552
- f.endsWith("@1") || i.get(f) === t.length ? o.push(f) : a.push(f);
553
- const u = (f) => {
554
- const g = [];
555
- for (let h = 0; h < s.length; h++) {
556
- const P = s[h], c = P.fullTrace.filter((w) => f.has(w.fullType));
557
- if (c.length === 0)
558
- return;
559
- const b = c.map((w) => w.label), m = n.separator ?? " / ";
560
- g.push({
561
- label: b.join(m),
562
- value: P.value
550
+ l.sort(([, h], [, c]) => c - h);
551
+ for (const [h] of l)
552
+ h.endsWith("@1") || i.get(h) === t.length ? o.push(h) : a.push(h);
553
+ const u = (h, c = !1) => {
554
+ const m = [];
555
+ for (let b = 0; b < s.length; b++) {
556
+ const A = s[b], p = A.fullTrace.filter((f) => h.has(f.fullType));
557
+ if (p.length === 0)
558
+ if (c)
559
+ m.push({
560
+ label: "Unlabeled",
561
+ value: A.value
562
+ });
563
+ else return;
564
+ const g = p.map((f) => f.label), w = n.separator ?? " / ";
565
+ m.push({
566
+ label: g.join(w),
567
+ value: A.value
563
568
  });
564
569
  }
565
- return g;
570
+ return m;
566
571
  };
567
572
  if (o.length === 0) {
568
- if (a.length !== 0) throw new Error("Assertion error.");
569
- const f = u(new Set(xe));
570
- if (f === void 0) throw new Error("Assertion error.");
571
- return f;
572
- }
573
- let p = 0, v = 0;
574
- for (; p < o.length; ) {
575
- const f = /* @__PURE__ */ new Set();
576
- n.includeNativeLabel && f.add(xe);
577
- for (let h = 0; h < p; ++h) f.add(o[h]);
578
- f.add(o[v]);
579
- const g = u(f);
580
- if (g !== void 0 && new Set(g.map((h) => h.label)).size === t.length) return g;
581
- v++, v >= o.length && (p++, v = p);
582
- }
583
- const d = u(/* @__PURE__ */ new Set([...o, ...a]));
584
- if (d === void 0) throw new Error("Assertion error.");
585
- return d;
586
- }
587
- const q = "PColumnData/", ne = q + "ResourceMap", re = q + "Partitioned/ResourceMap", M = q + "JsonPartitioned", $ = q + "BinaryPartitioned", ke = q + "Partitioned/", ie = ke + "JsonPartitioned", W = ke + "BinaryPartitioned";
573
+ if (a.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
574
+ return u(new Set(xe), !0);
575
+ }
576
+ let d = 0, v = -1;
577
+ for (; d < o.length; ) {
578
+ const h = /* @__PURE__ */ new Set();
579
+ n.includeNativeLabel && h.add(xe);
580
+ for (let m = 0; m < d; ++m) h.add(o[m]);
581
+ v >= 0 && h.add(o[v]);
582
+ const c = u(h);
583
+ if (c !== void 0 && new Set(c.map((m) => m.label)).size === t.length) return c;
584
+ v++, v >= o.length && (d++, v = d);
585
+ }
586
+ return u(/* @__PURE__ */ new Set([...o, ...a]), !0);
587
+ }
588
+ const z = "PColumnData/", re = z + "ResourceMap", ie = z + "Partitioned/ResourceMap", W = z + "JsonPartitioned", N = z + "BinaryPartitioned", ke = z + "Partitioned/", se = ke + "JsonPartitioned", G = ke + "BinaryPartitioned";
588
589
  function je(t, e, n, r = [], i) {
589
590
  if (t === void 0) return !1;
590
591
  switch (t.resourceType.name) {
591
- case ne: {
592
+ case re: {
592
593
  let s = t.getInputsLocked();
593
594
  for (const o of t.listInputFields()) {
594
595
  const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], u = a === void 0 ? void 0 : e(a);
@@ -596,7 +597,7 @@ function je(t, e, n, r = [], i) {
596
597
  }
597
598
  return s;
598
599
  }
599
- case re: {
600
+ case ie: {
600
601
  let s = t.getInputsLocked();
601
602
  for (const o of t.listInputFields()) {
602
603
  const a = t.resolve({ field: o, assertFieldType: "Input" });
@@ -618,7 +619,7 @@ function je(t, e, n, r = [], i) {
618
619
  throw new Error(`Unknown resource type: ${t.resourceType.name}`);
619
620
  }
620
621
  }
621
- function xn(t, e, n = !1) {
622
+ function Pn(t, e, n = !1) {
622
623
  const r = [];
623
624
  return { isComplete: je(t, e, r, [], n), data: r };
624
625
  }
@@ -629,44 +630,44 @@ const fe = (t) => {
629
630
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
630
631
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
631
632
  };
632
- function mt(t) {
633
+ function vt(t) {
633
634
  if (!t) return;
634
635
  const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
635
636
  let i = 0;
636
637
  switch (e) {
637
- case ne:
638
+ case re:
638
639
  i = n.keyLength;
639
640
  break;
640
- case re:
641
+ case ie:
641
642
  i = n.partitionKeyLength + n.keyLength;
642
643
  break;
643
- case M:
644
- case $:
644
+ case W:
645
+ case N:
645
646
  i = n.partitionKeyLength;
646
647
  break;
647
- case W:
648
- case ie:
648
+ case G:
649
+ case se:
649
650
  i = n.superPartitionKeyLength + n.partitionKeyLength;
650
651
  break;
651
652
  }
652
653
  switch (e) {
653
- case ne:
654
- case M:
655
- case $:
654
+ case re:
655
+ case W:
656
+ case N:
656
657
  for (let s of t.listInputFields()) {
657
- e === $ && (s = fe(s).baseKey);
658
+ e === N && (s = fe(s).baseKey);
658
659
  const o = [...JSON.parse(s)];
659
660
  r.push(o);
660
661
  }
661
662
  break;
662
- case re:
663
- case W:
664
663
  case ie:
664
+ case G:
665
+ case se:
665
666
  for (const s of t.listInputFields()) {
666
667
  const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
667
668
  if (a !== void 0)
668
669
  for (let l of a.listInputFields()) {
669
- e === W && (l = fe(l).baseKey);
670
+ e === G && (l = fe(l).baseKey);
670
671
  const u = [...o, ...JSON.parse(l)];
671
672
  r.push(u);
672
673
  }
@@ -675,7 +676,7 @@ function mt(t) {
675
676
  }
676
677
  return { data: r, keyLength: i };
677
678
  }
678
- function yt(t) {
679
+ function bt(t) {
679
680
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
680
681
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
681
682
  const { parts: e, partitionKeyLength: n } = t, r = [];
@@ -694,11 +695,11 @@ function yt(t) {
694
695
  }
695
696
  return r.map((i) => Array.from(i.values()));
696
697
  }
697
- function vt(t) {
698
+ function wt(t) {
698
699
  if (t === void 0) return;
699
700
  if (_e(t))
700
- return yt(t);
701
- const e = mt(t);
701
+ return bt(t);
702
+ const e = vt(t);
702
703
  if (!e) return;
703
704
  const { data: n, keyLength: r } = e, i = [];
704
705
  for (let s = 0; s < r; ++s)
@@ -714,13 +715,13 @@ function vt(t) {
714
715
  function he(t, e = []) {
715
716
  if (t === void 0 || !t.getIsReadyOrError()) return;
716
717
  const n = t.resourceType.name, r = t.getDataAsJson();
717
- if (e.length > 0 && (n === ie || n === W))
718
+ if (e.length > 0 && (n === se || n === G))
718
719
  throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
719
720
  switch (n) {
720
- case ne:
721
721
  case re:
722
+ case ie:
722
723
  throw new Error(`Only data columns are supported, got: ${n}`);
723
- case M: {
724
+ case W: {
724
725
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
725
726
  throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
726
727
  const i = [];
@@ -736,7 +737,7 @@ function he(t, e = []) {
736
737
  parts: i
737
738
  };
738
739
  }
739
- case $: {
740
+ case N: {
740
741
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
741
742
  throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
742
743
  const i = [], s = /* @__PURE__ */ new Map();
@@ -763,15 +764,15 @@ function he(t, e = []) {
763
764
  parts: i
764
765
  };
765
766
  }
766
- case ie: {
767
+ case se: {
767
768
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
768
769
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
769
770
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
770
771
  for (const o of t.listInputFields()) {
771
772
  const a = t.resolve({ field: o, assertFieldType: "Input" });
772
773
  if (a === void 0) return;
773
- if (a.resourceType.name !== M)
774
- throw new Error(`Expected ${M} inside ${n}, but got ${a.resourceType.name}`);
774
+ if (a.resourceType.name !== W)
775
+ throw new Error(`Expected ${W} inside ${n}, but got ${a.resourceType.name}`);
775
776
  const l = he(a, JSON.parse(o));
776
777
  if (l === void 0) return;
777
778
  if (l.type !== "JsonPartitioned")
@@ -784,15 +785,15 @@ function he(t, e = []) {
784
785
  parts: s
785
786
  };
786
787
  }
787
- case W: {
788
+ case G: {
788
789
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
789
790
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
790
791
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
791
792
  for (const o of t.listInputFields()) {
792
793
  const a = t.resolve({ field: o, assertFieldType: "Input" });
793
794
  if (a === void 0) return;
794
- if (a.resourceType.name !== $)
795
- throw new Error(`Expected ${$} inside ${n}, but got ${a.resourceType.name}`);
795
+ if (a.resourceType.name !== N)
796
+ throw new Error(`Expected ${N} inside ${n}, but got ${a.resourceType.name}`);
796
797
  const l = he(a, JSON.parse(o));
797
798
  if (l === void 0) return;
798
799
  if (l.type !== "BinaryPartitioned")
@@ -809,15 +810,15 @@ function he(t, e = []) {
809
810
  throw new Error(`Unknown resource type: ${n}`);
810
811
  }
811
812
  }
812
- function bt(t) {
813
+ function At(t) {
813
814
  if (t !== void 0) {
814
815
  if (_e(t)) return t;
815
- if (ve(t)) return Ge(t);
816
- if (t instanceof I) return he(t);
816
+ if (ve(t)) return He(t);
817
+ if (t instanceof L) return he(t);
817
818
  throw new Error(`Unexpected input type: ${typeof t}`);
818
819
  }
819
820
  }
820
- function wt(t, e) {
821
+ function xt(t, e) {
821
822
  const n = [...e].sort((s, o) => o[0] - s[0]);
822
823
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
823
824
  const { partitionKeyLength: s } = t;
@@ -877,7 +878,7 @@ function wt(t, e) {
877
878
  }
878
879
  }
879
880
  }
880
- class At {
881
+ class Pt {
881
882
  constructor(e) {
882
883
  this.columns = e;
883
884
  }
@@ -886,30 +887,30 @@ class At {
886
887
  return this.columns.filter((r) => n(r.spec));
887
888
  }
888
889
  }
889
- function xt(t) {
890
+ function Ct(t) {
890
891
  if (t)
891
892
  return t.map((e) => ({
892
- type: `split:${Ye(e.axisId)}`,
893
+ type: `split:${Qe(e.axisId)}`,
893
894
  label: e.label,
894
895
  importance: 1e6
895
896
  // High importance for split filters in labels
896
897
  }));
897
898
  }
898
- function Pt(t) {
899
+ function St(t) {
899
900
  if (t)
900
901
  return t.map((e) => [e.axisIdx, e.value]);
901
902
  }
902
- function Ct(t, e) {
903
+ function _t(t, e) {
903
904
  if (!e || e.length === 0) return t;
904
905
  const n = [...e].sort((r, i) => r[0] - i[0]);
905
906
  return Le({ id: t, axisFilters: n });
906
907
  }
907
- function St(t) {
908
+ function It(t) {
908
909
  if (!t || typeof t != "object") return !1;
909
910
  const e = t, n = 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);
910
911
  return !!e.domainAnchor || n || r;
911
912
  }
912
- function _t(t) {
913
+ function Lt(t) {
913
914
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
914
915
  return [];
915
916
  const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
@@ -920,7 +921,7 @@ function _t(t) {
920
921
  class ge {
921
922
  constructor() {
922
923
  T(this, "defaultProviderStore", []);
923
- T(this, "providers", [new At(this.defaultProviderStore)]);
924
+ T(this, "providers", [new Pt(this.defaultProviderStore)]);
924
925
  T(this, "axisLabelProviders", []);
925
926
  }
926
927
  addColumnProvider(e) {
@@ -946,114 +947,116 @@ class ge {
946
947
  const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1 } = n ?? {}, a = {
947
948
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
948
949
  ...i ?? {}
949
- }, l = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u = [];
950
- for (const d of l) {
951
- const f = St(d);
952
- let g;
953
- if (f) {
950
+ }, l = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u = [], d = /* @__PURE__ */ new Set();
951
+ for (const c of l) {
952
+ const m = It(c);
953
+ let b;
954
+ if (m) {
954
955
  if (!r)
955
956
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
956
- g = He(r.anchors, d, n);
957
+ b = qe(r.anchors, c, n);
957
958
  } else
958
- g = d;
959
- const h = /* @__PURE__ */ new Set(), P = [];
960
- for (const m of this.providers) {
961
- const w = m.selectColumns(g);
962
- for (const A of w) {
963
- if (h.has(A.id)) throw new Error(`Duplicate column id ${A.id} in provider ${m.constructor.name}`);
964
- h.add(A.id), P.push(A);
959
+ b = c;
960
+ const A = /* @__PURE__ */ new Set(), p = [];
961
+ for (const f of this.providers) {
962
+ const C = f.selectColumns(b);
963
+ for (const P of C) {
964
+ if (A.has(P.id))
965
+ throw new Error(`Duplicate column id ${P.id} in provider ${f.constructor.name}`);
966
+ const O = ze(P.spec);
967
+ d.has(O) || (A.add(P.id), d.add(O), p.push(P));
965
968
  }
966
969
  }
967
- if (P.length === 0) continue;
968
- const c = _t(d), b = c.length > 0;
969
- for (const m of P) {
970
- if (!Q(m.spec)) continue;
971
- const w = m.spec;
972
- if (b) {
973
- const A = bt(m.data);
974
- if (!A) {
970
+ if (p.length === 0) continue;
971
+ const g = Lt(c), w = g.length > 0;
972
+ for (const f of p) {
973
+ if (!Z(f.spec)) continue;
974
+ const C = f.spec;
975
+ if (w) {
976
+ const P = At(f.data);
977
+ if (!P) {
975
978
  if (s) continue;
976
979
  return;
977
980
  }
978
- if (!qe(A))
979
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A.type} for column ${m.id}`);
980
- const D = vt(A), J = c[c.length - 1];
981
- if (J >= A.partitionKeyLength)
982
- throw new Error(`Not enough partition keys (${A.partitionKeyLength}) for requested split axes (max index ${J}) in column ${w.name}`);
983
- const z = c.map((x) => this.findLabels(E(w.axesSpec[x]))), F = [], L = (x, U) => {
984
- if (U >= c.length) {
985
- if (F.push([...x]), F.length > 1e4)
981
+ if (!Ye(P))
982
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${P.type} for column ${f.id}`);
983
+ const O = wt(P), U = g[g.length - 1];
984
+ if (U >= P.partitionKeyLength)
985
+ throw new Error(`Not enough partition keys (${P.partitionKeyLength}) for requested split axes (max index ${U}) in column ${C.name}`);
986
+ const F = g.map((S) => this.findLabels(E(C.axesSpec[S]))), D = [], Y = (S, B) => {
987
+ if (B >= g.length) {
988
+ if (D.push([...S]), D.length > 1e4)
986
989
  throw new Error("Too many key combinations, aborting.");
987
990
  return;
988
991
  }
989
- const O = c[U];
990
- if (O >= D.length)
991
- throw new Error(`Axis index ${O} out of bounds for unique keys array (length ${D.length}) during split key generation for column ${m.id}`);
992
- const j = D[O];
993
- if (!j || j.length === 0) {
994
- F.length = 0;
992
+ const k = g[B];
993
+ if (k >= O.length)
994
+ throw new Error(`Axis index ${k} out of bounds for unique keys array (length ${O.length}) during split key generation for column ${f.id}`);
995
+ const K = O[k];
996
+ if (!K || K.length === 0) {
997
+ D.length = 0;
995
998
  return;
996
999
  }
997
- for (const Y of j)
998
- x.push(Y), L(x, U + 1), x.pop();
1000
+ for (const X of K)
1001
+ S.push(X), Y(S, B + 1), S.pop();
999
1002
  };
1000
- if (L([], 0), F.length === 0)
1003
+ if (Y([], 0), D.length === 0)
1001
1004
  continue;
1002
- const k = [...w.axesSpec], se = c.map((x) => x);
1003
- for (let x = c.length - 1; x >= 0; x--)
1004
- k.splice(c[x], 1);
1005
- const N = { ...w, axesSpec: k };
1006
- for (const x of F) {
1007
- const U = x.map((O, j) => {
1008
- const Y = se[j], Ue = E(w.axesSpec[Y]), oe = z[j], Be = (oe == null ? void 0 : oe[O]) ?? String(O);
1009
- return { axisIdx: Y, axisId: Ue, value: O, label: Be };
1005
+ const V = [...C.axesSpec], R = g.map((S) => S);
1006
+ for (let S = g.length - 1; S >= 0; S--)
1007
+ V.splice(g[S], 1);
1008
+ const Ue = { ...C, axesSpec: V };
1009
+ for (const S of D) {
1010
+ const B = S.map((k, K) => {
1011
+ const X = R[K], Be = E(C.axesSpec[X]), oe = F[K], Me = (oe == null ? void 0 : oe[k]) ?? String(k);
1012
+ return { axisIdx: X, axisId: Be, value: k, label: Me };
1010
1013
  });
1011
1014
  u.push({
1012
1015
  type: "split",
1013
- originalColumn: m,
1014
- spec: w,
1015
- adjustedSpec: N,
1016
- dataEntries: A,
1017
- axisFilters: U
1016
+ originalColumn: f,
1017
+ spec: C,
1018
+ adjustedSpec: Ue,
1019
+ dataEntries: P,
1020
+ axisFilters: B
1018
1021
  });
1019
1022
  }
1020
1023
  } else
1021
1024
  u.push({
1022
1025
  type: "direct",
1023
- originalColumn: m,
1024
- spec: w,
1025
- adjustedSpec: w
1026
+ originalColumn: f,
1027
+ spec: C,
1028
+ adjustedSpec: C
1026
1029
  });
1027
1030
  }
1028
1031
  }
1029
1032
  if (u.length === 0) return [];
1030
- const p = Re(
1033
+ const v = Re(
1031
1034
  u,
1032
- (d) => ({
1033
- spec: d.spec,
1034
- suffixTrace: d.type === "split" ? xt(d.axisFilters) : void 0
1035
+ (c) => ({
1036
+ spec: c.spec,
1037
+ suffixTrace: c.type === "split" ? Ct(c.axisFilters) : void 0
1035
1038
  }),
1036
1039
  a
1037
- ), v = [];
1038
- for (const { value: d, label: f } of p) {
1039
- const { originalColumn: g, spec: h } = d, P = d.type === "split" ? d.axisFilters : void 0, c = Pt(P);
1040
- let b;
1041
- r ? b = r.deriveS(h, c) : b = Ct(g.id, c);
1042
- let m = { ...d.adjustedSpec };
1043
- o && (m = {
1044
- ...m,
1040
+ ), h = [];
1041
+ for (const { value: c, label: m } of v) {
1042
+ const { originalColumn: b, spec: A } = c, p = c.type === "split" ? c.axisFilters : void 0, g = St(p);
1043
+ let w;
1044
+ r ? w = r.deriveS(A, g) : w = _t(b.id, g);
1045
+ let f = { ...c.adjustedSpec };
1046
+ o && (f = {
1047
+ ...f,
1045
1048
  annotations: {
1046
- ...m.annotations ?? {},
1047
- "pl7.app/label": f
1049
+ ...f.annotations ?? {},
1050
+ "pl7.app/label": m
1048
1051
  }
1049
- }), v.push({
1050
- id: b,
1051
- spec: m,
1052
- data: () => d.type === "split" ? ze(wt(d.dataEntries, c)) : d.originalColumn.data,
1053
- label: f
1052
+ }), h.push({
1053
+ id: w,
1054
+ spec: f,
1055
+ data: () => c.type === "split" ? Xe(xt(c.dataEntries, g)) : c.originalColumn.data,
1056
+ label: m
1054
1057
  });
1055
1058
  }
1056
- return v;
1059
+ return h;
1057
1060
  }
1058
1061
  getColumns(e, n) {
1059
1062
  const r = this.getUniversalEntries(e, {
@@ -1086,9 +1089,9 @@ function le(t, e) {
1086
1089
  return !0;
1087
1090
  }
1088
1091
  function Pe(t) {
1089
- return ye(t, (e) => e instanceof I ? e.handle : ve(e) ? nt(e, (n) => n.handle) : e);
1092
+ return ye(t, (e) => e instanceof L ? e.handle : ve(e) ? it(e, (n) => n.handle) : e);
1090
1093
  }
1091
- class It {
1094
+ class Tt {
1092
1095
  constructor() {
1093
1096
  T(this, "ctx", y());
1094
1097
  }
@@ -1113,7 +1116,7 @@ class It {
1113
1116
  if (e instanceof we) return e;
1114
1117
  const n = {};
1115
1118
  for (const [r, i] of Object.entries(e))
1116
- if (Xe(i)) {
1119
+ if (Ze(i)) {
1117
1120
  const s = this.getPColumnSpecByRef(i);
1118
1121
  if (!s)
1119
1122
  return;
@@ -1194,7 +1197,7 @@ class It {
1194
1197
  ref: n.ref,
1195
1198
  obj: {
1196
1199
  ...n.obj,
1197
- data: new I(n.obj.data, [n.ref.blockId, n.ref.name])
1200
+ data: new L(n.obj.data, [n.ref.blockId, n.ref.name])
1198
1201
  }
1199
1202
  }))
1200
1203
  };
@@ -1213,9 +1216,9 @@ class It {
1213
1216
  ref: n.ref,
1214
1217
  obj: {
1215
1218
  ...n.obj,
1216
- data: Qe(
1219
+ data: et(
1217
1220
  n.obj.data,
1218
- (r) => new I(r, [n.ref.blockId, n.ref.name])
1221
+ (r) => new L(r, [n.ref.blockId, n.ref.name])
1219
1222
  )
1220
1223
  }
1221
1224
  }))
@@ -1244,7 +1247,7 @@ class It {
1244
1247
  if (n)
1245
1248
  return ye(
1246
1249
  n,
1247
- (i) => new I(i, [e.blockId, e.name])
1250
+ (i) => new L(i, [e.blockId, e.name])
1248
1251
  );
1249
1252
  }
1250
1253
  /**
@@ -1255,7 +1258,7 @@ class It {
1255
1258
  getPColumnByRef(e) {
1256
1259
  const n = this.getDataByRef(e);
1257
1260
  if (n)
1258
- return Ze(n);
1261
+ return tt(n);
1259
1262
  }
1260
1263
  /**
1261
1264
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -1265,7 +1268,7 @@ class It {
1265
1268
  getPColumnSpecByRef(e) {
1266
1269
  const n = this.getSpecByRef(e);
1267
1270
  if (n) {
1268
- if (!Q(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
1271
+ if (!Z(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
1269
1272
  return n;
1270
1273
  }
1271
1274
  }
@@ -1284,7 +1287,7 @@ class It {
1284
1287
  findDataWithCompatibleSpec(e) {
1285
1288
  const n = [];
1286
1289
  e: for (const r of this.getData().entries) {
1287
- if (!Q(r.obj.spec))
1290
+ if (!Z(r.obj.spec))
1288
1291
  continue;
1289
1292
  const i = r.obj.spec;
1290
1293
  if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && le(e.domain, i.domain)) {
@@ -1327,7 +1330,7 @@ class It {
1327
1330
  */
1328
1331
  selectColumns(e) {
1329
1332
  const n = typeof e == "function" ? e : ce(e);
1330
- return this.getSpecs().entries.filter(({ obj: i }) => Q(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
1333
+ return this.getSpecs().entries.filter(({ obj: i }) => Z(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
1331
1334
  const o = s;
1332
1335
  let a = null;
1333
1336
  const l = this;
@@ -1357,14 +1360,14 @@ class It {
1357
1360
  return r;
1358
1361
  }
1359
1362
  }
1360
- class X {
1363
+ class Q {
1361
1364
  constructor() {
1362
1365
  T(this, "ctx");
1363
1366
  T(this, "args");
1364
1367
  T(this, "uiState");
1365
1368
  // lazy rendering because this feature is rarely used
1366
1369
  T(this, "_activeArgsCache");
1367
- T(this, "resultPool", new It());
1370
+ T(this, "resultPool", new Tt());
1368
1371
  this.ctx = y(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
1369
1372
  }
1370
1373
  /**
@@ -1383,14 +1386,14 @@ class X {
1383
1386
  getNamedAccessor(e) {
1384
1387
  return pe(
1385
1388
  this.ctx.getAccessorHandleByName(e),
1386
- (n) => new I(n, [e])
1389
+ (n) => new L(n, [e])
1387
1390
  );
1388
1391
  }
1389
1392
  get prerun() {
1390
1393
  return this.getNamedAccessor(Fe);
1391
1394
  }
1392
1395
  get outputs() {
1393
- return this.getNamedAccessor(De);
1396
+ return this.getNamedAccessor(Oe);
1394
1397
  }
1395
1398
  /**
1396
1399
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -1402,7 +1405,7 @@ class X {
1402
1405
  }
1403
1406
  verifyInlineAndExplicitColumnsSupport(e) {
1404
1407
  var i;
1405
- const n = e.some((s) => !(s.data instanceof I) || ve(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
1408
+ const n = e.some((s) => !(s.data instanceof L) || ve(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
1406
1409
  if (n && !r) throw Error("Inline or explicit columns not supported");
1407
1410
  }
1408
1411
  // TODO remove all non-PColumn fields
@@ -1420,8 +1423,8 @@ class X {
1420
1423
  },
1421
1424
  filters: e.filters ?? [],
1422
1425
  sorting: e.sorting ?? []
1423
- } : n = e, this.verifyInlineAndExplicitColumnsSupport(et(n.src)), this.ctx.createPTable(
1424
- tt(n, (r) => Pe(r))
1426
+ } : n = e, this.verifyInlineAndExplicitColumnsSupport(nt(n.src)), this.ctx.createPTable(
1427
+ rt(n, (r) => Pe(r))
1425
1428
  );
1426
1429
  }
1427
1430
  /** @deprecated scheduled for removal from SDK */
@@ -1432,19 +1435,19 @@ class X {
1432
1435
  return this.ctx.getCurrentUnstableMarker();
1433
1436
  }
1434
1437
  }
1435
- const G = "1.30.11";
1436
- function Lt(t) {
1438
+ const H = "1.30.24";
1439
+ function Et(t) {
1437
1440
  return t.__renderLambda === !0;
1438
1441
  }
1439
1442
  function ue(t) {
1440
1443
  if (t !== void 0)
1441
- return Lt(t) ? t.handle : t;
1444
+ return Et(t) ? t.handle : t;
1442
1445
  }
1443
- function V(t) {
1446
+ function $(t) {
1444
1447
  if (t !== void 0)
1445
1448
  return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
1446
1449
  }
1447
- function Pn(t) {
1450
+ function Cn(t) {
1448
1451
  if (t.v3 !== void 0) {
1449
1452
  const {
1450
1453
  initialArgs: e,
@@ -1456,7 +1459,7 @@ function Pn(t) {
1456
1459
  sections: a,
1457
1460
  title: l,
1458
1461
  enrichmentTargets: u
1459
- } = t.v3, { code: p } = t;
1462
+ } = t.v3, { code: d } = t;
1460
1463
  return {
1461
1464
  initialArgs: e,
1462
1465
  initialUiState: n,
@@ -1466,7 +1469,7 @@ function Pn(t) {
1466
1469
  sdkVersion: o,
1467
1470
  sections: a,
1468
1471
  title: l,
1469
- code: p,
1472
+ code: d,
1470
1473
  enrichmentTargets: u
1471
1474
  };
1472
1475
  } else if (t.inputsValid !== void 0) {
@@ -1480,10 +1483,10 @@ function Pn(t) {
1480
1483
  renderingMode: n,
1481
1484
  initialArgs: o,
1482
1485
  outputs: Object.fromEntries(
1483
- Object.entries(r).map(([u, p]) => [u, V(p)])
1486
+ Object.entries(r).map(([u, d]) => [u, $(d)])
1484
1487
  ),
1485
- inputsValid: V(i),
1486
- sections: V(s),
1488
+ inputsValid: $(i),
1489
+ sections: $(s),
1487
1490
  initialUiState: void 0,
1488
1491
  code: a
1489
1492
  };
@@ -1498,10 +1501,10 @@ function Pn(t) {
1498
1501
  renderingMode: r,
1499
1502
  initialArgs: o,
1500
1503
  outputs: Object.fromEntries(
1501
- Object.entries(i).map(([u, p]) => [u, V(p)])
1504
+ Object.entries(i).map(([u, d]) => [u, $(d)])
1502
1505
  ),
1503
- inputsValid: V(n),
1504
- sections: V(s),
1506
+ inputsValid: $(n),
1507
+ sections: $(s),
1505
1508
  initialUiState: void 0,
1506
1509
  code: a
1507
1510
  };
@@ -1512,18 +1515,18 @@ function Pn(t) {
1512
1515
  );
1513
1516
  }
1514
1517
  }
1515
- class _ {
1518
+ class I {
1516
1519
  constructor(e, n, r, i, s, o, a, l) {
1517
1520
  this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l;
1518
1521
  }
1519
1522
  static create(e = "Heavy") {
1520
- return new _(
1523
+ return new I(
1521
1524
  e,
1522
1525
  void 0,
1523
1526
  {},
1524
1527
  {},
1525
- Z(!0),
1526
- Z([]),
1528
+ ee(!0),
1529
+ ee([]),
1527
1530
  void 0,
1528
1531
  void 0
1529
1532
  );
@@ -1531,7 +1534,7 @@ class _ {
1531
1534
  output(e, n, r = {}) {
1532
1535
  if (typeof n == "function") {
1533
1536
  const i = `output#${e}`;
1534
- return B(i, () => n(new X())), new _(
1537
+ return M(i, () => n(new Q())), new I(
1535
1538
  this._renderingMode,
1536
1539
  this._initialArgs,
1537
1540
  this._initialUiState,
@@ -1549,7 +1552,7 @@ class _ {
1549
1552
  this._enrichmentTargets
1550
1553
  );
1551
1554
  } else
1552
- return new _(
1555
+ return new I(
1553
1556
  this._renderingMode,
1554
1557
  this._initialArgs,
1555
1558
  this._initialUiState,
@@ -1568,7 +1571,7 @@ class _ {
1568
1571
  return this.output(e, n, { retentive: !0 });
1569
1572
  }
1570
1573
  argsValid(e) {
1571
- return typeof e == "function" ? (B("inputsValid", () => e(new X())), new _(
1574
+ return typeof e == "function" ? (M("inputsValid", () => e(new Q())), new I(
1572
1575
  this._renderingMode,
1573
1576
  this._initialArgs,
1574
1577
  this._initialUiState,
@@ -1580,7 +1583,7 @@ class _ {
1580
1583
  this._sections,
1581
1584
  this._title,
1582
1585
  this._enrichmentTargets
1583
- )) : new _(
1586
+ )) : new I(
1584
1587
  this._renderingMode,
1585
1588
  this._initialArgs,
1586
1589
  this._initialUiState,
@@ -1592,7 +1595,7 @@ class _ {
1592
1595
  );
1593
1596
  }
1594
1597
  sections(e) {
1595
- return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (B("sections", () => e(new X())), new _(
1598
+ return Array.isArray(e) ? this.sections(ee(e)) : typeof e == "function" ? (M("sections", () => e(new Q())), new I(
1596
1599
  this._renderingMode,
1597
1600
  this._initialArgs,
1598
1601
  this._initialUiState,
@@ -1601,7 +1604,7 @@ class _ {
1601
1604
  { __renderLambda: !0, handle: "sections" },
1602
1605
  this._title,
1603
1606
  this._enrichmentTargets
1604
- )) : new _(
1607
+ )) : new I(
1605
1608
  this._renderingMode,
1606
1609
  this._initialArgs,
1607
1610
  this._initialUiState,
@@ -1614,7 +1617,7 @@ class _ {
1614
1617
  }
1615
1618
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
1616
1619
  title(e) {
1617
- return B("title", () => e(new X())), new _(
1620
+ return M("title", () => e(new Q())), new I(
1618
1621
  this._renderingMode,
1619
1622
  this._initialArgs,
1620
1623
  this._initialUiState,
@@ -1630,7 +1633,7 @@ class _ {
1630
1633
  * @deprecated use {@link withArgs}
1631
1634
  * */
1632
1635
  initialArgs(e) {
1633
- return new _(
1636
+ return new I(
1634
1637
  this._renderingMode,
1635
1638
  e,
1636
1639
  this._initialUiState,
@@ -1643,7 +1646,7 @@ class _ {
1643
1646
  }
1644
1647
  /** Sets initial args for the block, this value must be specified. */
1645
1648
  withArgs(e) {
1646
- return new _(
1649
+ return new I(
1647
1650
  this._renderingMode,
1648
1651
  e,
1649
1652
  this._initialUiState,
@@ -1656,7 +1659,7 @@ class _ {
1656
1659
  }
1657
1660
  /** Defines type and sets initial value for block UiState. */
1658
1661
  withUiState(e) {
1659
- return new _(
1662
+ return new I(
1660
1663
  this._renderingMode,
1661
1664
  this._initialArgs,
1662
1665
  e,
@@ -1672,7 +1675,7 @@ class _ {
1672
1675
  * Influences dependency graph construction.
1673
1676
  */
1674
1677
  enriches(e) {
1675
- return B("enrichmentTargets", e), new _(
1678
+ return M("enrichmentTargets", e), new I(
1676
1679
  this._renderingMode,
1677
1680
  this._initialArgs,
1678
1681
  this._initialUiState,
@@ -1690,7 +1693,7 @@ class _ {
1690
1693
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
1691
1694
  const e = {
1692
1695
  v3: {
1693
- sdkVersion: G,
1696
+ sdkVersion: H,
1694
1697
  renderingMode: this._renderingMode,
1695
1698
  initialArgs: this._initialArgs,
1696
1699
  initialUiState: this._initialUiState,
@@ -1701,7 +1704,7 @@ class _ {
1701
1704
  enrichmentTargets: this._enrichmentTargets
1702
1705
  },
1703
1706
  // fields below are added to allow previous desktop versions read generated configs
1704
- sdkVersion: G,
1707
+ sdkVersion: H,
1705
1708
  renderingMode: this._renderingMode,
1706
1709
  initialArgs: this._initialArgs,
1707
1710
  inputsValid: ue(this._inputsValid),
@@ -1710,24 +1713,24 @@ class _ {
1710
1713
  Object.entries(this._outputs).map(([n, r]) => [n, ue(r)])
1711
1714
  )
1712
1715
  };
1713
- return st() ? Ee({ sdkVersion: G }) : { config: e };
1716
+ return at() ? Ee({ sdkVersion: H }) : { config: e };
1714
1717
  }
1715
1718
  }
1716
- function Cn(t) {
1719
+ function Sn(t) {
1717
1720
  const e = t.type;
1718
1721
  switch (e) {
1719
1722
  case "axis":
1720
- return ee(t);
1723
+ return te(t);
1721
1724
  case "column":
1722
- return ee(t);
1725
+ return te(t);
1723
1726
  default:
1724
1727
  throw Error(`unsupported column type: ${e}`);
1725
1728
  }
1726
1729
  }
1727
- function Tt(t) {
1730
+ function Ft(t) {
1728
1731
  return JSON.parse(t);
1729
1732
  }
1730
- function Et(t) {
1733
+ function Ot(t) {
1731
1734
  return t.axesSpec.length === 1 && t.name === "pl7.app/label";
1732
1735
  }
1733
1736
  function Ve(t) {
@@ -1740,42 +1743,42 @@ function Ve(t) {
1740
1743
  function Ke(t, e) {
1741
1744
  const n = [], r = [];
1742
1745
  for (const a of t)
1743
- Et(a.spec) ? n.push(a) : r.push(a);
1746
+ Ot(a.spec) ? n.push(a) : r.push(a);
1744
1747
  const i = [];
1745
1748
  for (const a of r)
1746
1749
  for (const l of a.spec.axesSpec) {
1747
1750
  const u = E(l);
1748
- i.some((p) => R(p, u)) || i.push(u);
1751
+ i.some((d) => j(d, u)) || i.push(u);
1749
1752
  }
1750
1753
  for (const a of n) {
1751
- const l = E(a.spec.axesSpec[0]), u = i.findIndex((p) => R(p, l));
1754
+ const l = E(a.spec.axesSpec[0]), u = i.findIndex((d) => j(d, l));
1752
1755
  u !== -1 && i.splice(u, 1);
1753
1756
  }
1754
1757
  const s = (a, l) => {
1755
1758
  let u = a.toString();
1756
1759
  if (l)
1757
- for (const p in l)
1758
- u += p, u += l[p];
1760
+ for (const d in l)
1761
+ u += d, u += l[d];
1759
1762
  return u;
1760
1763
  }, o = [];
1761
1764
  for (const a of e) {
1762
- const l = a.spec.axesSpec[0], u = E(l), p = i.findIndex((v) => R(v, u));
1763
- if (p !== -1) {
1764
- const v = i[p], d = Object.keys(v.domain ?? {}).length, f = Object.keys(l.domain ?? {}).length;
1765
- d > f ? o.push({
1765
+ const l = a.spec.axesSpec[0], u = E(l), d = i.findIndex((v) => j(v, u));
1766
+ if (d !== -1) {
1767
+ const v = i[d], h = Object.keys(v.domain ?? {}).length, c = Object.keys(l.domain ?? {}).length;
1768
+ h > c ? o.push({
1766
1769
  id: s(a.id, v.domain),
1767
1770
  spec: {
1768
1771
  ...a.spec,
1769
1772
  axesSpec: [{ ...v, annotations: l.annotations }]
1770
1773
  },
1771
1774
  data: a.data
1772
- }) : o.push(a), i.splice(p, 1);
1775
+ }) : o.push(a), i.splice(d, 1);
1773
1776
  }
1774
1777
  }
1775
1778
  return o;
1776
1779
  }
1777
1780
  function $e(t) {
1778
- const e = (i) => Array.isArray(i), n = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
1781
+ const e = (i) => Array.isArray(i), n = (i) => i instanceof L, r = (i) => typeof i == "object" && "type" in i;
1779
1782
  return t.map((i) => i.data).every((i) => {
1780
1783
  if (e(i))
1781
1784
  return !0;
@@ -1815,10 +1818,10 @@ function Je(t, e, n, r, i, s) {
1815
1818
  sorting: i
1816
1819
  };
1817
1820
  }
1818
- function Sn(t, e, n, r) {
1819
- var u, p;
1821
+ function _n(t, e, n, r) {
1822
+ var u, d;
1820
1823
  Array.isArray(r) && (r = { filters: r });
1821
- const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((p = n == null ? void 0 : n.pTableParams) == null ? void 0 : p.sorting) ?? [], a = Ve(t.resultPool);
1824
+ const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting) ?? [], a = Ve(t.resultPool);
1822
1825
  if (!a) return;
1823
1826
  const l = Ke(e.map(Ie), a);
1824
1827
  if ($e([...e, ...l]))
@@ -1826,45 +1829,45 @@ function Sn(t, e, n, r) {
1826
1829
  Je(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
1827
1830
  );
1828
1831
  }
1829
- function Ft(t) {
1832
+ function Dt(t) {
1830
1833
  var e;
1831
1834
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
1832
1835
  }
1833
- function _n(t, e, n, r, i) {
1834
- var h, P;
1835
- const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((h = r == null ? void 0 : r.pTableParams) == null ? void 0 : h.filters) ?? []], a = ((P = r == null ? void 0 : r.pTableParams) == null ? void 0 : P.sorting) ?? [], l = e.find((c) => n(c.spec));
1836
+ function In(t, e, n, r, i) {
1837
+ var b, A;
1838
+ const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.filters) ?? []], a = ((A = r == null ? void 0 : r.pTableParams) == null ? void 0 : A.sorting) ?? [], l = e.find((p) => n(p.spec));
1836
1839
  if (!l) return;
1837
1840
  const u = Ve(t.resultPool);
1838
1841
  if (!u) return;
1839
- const p = new Set((() => {
1840
- var b, m;
1842
+ const d = new Set((() => {
1843
+ var g, w;
1841
1844
  if (s === "inner") return [];
1842
- const c = (m = (b = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : b.hiddenColIds) == null ? void 0 : m.map(Tt).filter((w) => w.type === "column").map((w) => w.id);
1843
- return c || e.filter((w) => Ft(w.spec)).map((w) => w.id);
1845
+ const p = (w = (g = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : g.hiddenColIds) == null ? void 0 : w.map(Ft).filter((f) => f.type === "column").map((f) => f.id);
1846
+ return p || e.filter((f) => Dt(f.spec)).map((f) => f.id);
1844
1847
  })());
1845
- p.delete(l.id), [...o.map((c) => c.column), ...a.map((c) => c.column)].filter((c) => c.type === "column").map((c) => p.delete(c.id));
1846
- const v = e.filter((c) => !p.has(c.id)), d = Ke(v.map(Ie), u), f = [
1847
- ...l.spec.axesSpec.map((c) => ({
1848
+ d.delete(l.id), [...o.map((p) => p.column), ...a.map((p) => p.column)].filter((p) => p.type === "column").map((p) => d.delete(p.id));
1849
+ const v = e.filter((p) => !d.has(p.id)), h = Ke(v.map(Ie), u), c = [
1850
+ ...l.spec.axesSpec.map((p) => ({
1848
1851
  type: "axis",
1849
- id: E(c),
1850
- spec: c
1852
+ id: E(p),
1853
+ spec: p
1851
1854
  })),
1852
- ...[...e, ...d].map((c) => ({
1855
+ ...[...e, ...h].map((p) => ({
1853
1856
  type: "column",
1854
- id: c.id,
1855
- spec: c.spec
1857
+ id: p.id,
1858
+ spec: p.spec
1856
1859
  }))
1857
1860
  ];
1858
- if (!$e([...v, ...d])) return;
1859
- const g = t.createPTable(
1860
- Je(e, d, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
1861
+ if (!$e([...v, ...h])) return;
1862
+ const m = t.createPTable(
1863
+ Je(e, h, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
1861
1864
  );
1862
1865
  return {
1863
- tableSpec: f,
1864
- tableHandle: g
1866
+ tableSpec: c,
1867
+ tableHandle: m
1865
1868
  };
1866
1869
  }
1867
- function In(t, e, n) {
1870
+ function Ln(t, e, n) {
1868
1871
  const r = t.resultPool.findLabels(e);
1869
1872
  return {
1870
1873
  axis: e,
@@ -1875,7 +1878,7 @@ function In(t, e, n) {
1875
1878
  defaultValue: n[0]
1876
1879
  };
1877
1880
  }
1878
- const Dt = (t, e) => {
1881
+ const Rt = (t, e) => {
1879
1882
  let n = t.toString();
1880
1883
  return e == null || e.forEach((r) => {
1881
1884
  if (r)
@@ -1883,7 +1886,7 @@ const Dt = (t, e) => {
1883
1886
  n += i, n += s;
1884
1887
  }), n;
1885
1888
  };
1886
- function Ot(t) {
1889
+ function kt(t) {
1887
1890
  if (!t.length)
1888
1891
  return [];
1889
1892
  let e = [[]];
@@ -1894,62 +1897,62 @@ function Ot(t) {
1894
1897
  }), e = r;
1895
1898
  }), e;
1896
1899
  }
1897
- function Rt(t, e) {
1898
- const n = t.spec.axesSpec.map(E);
1899
- return e.spec.axesSpec.map(E).every((i) => n.some((s) => R(s, i) && R(i, s)));
1900
+ function jt(t, e) {
1901
+ const n = t.axesSpec.map(E);
1902
+ return e.axesSpec.map(E).every((i) => n.some((s) => j(s, i) && j(i, s)));
1900
1903
  }
1901
1904
  function Ne(t, e) {
1902
- const n = t.spec.axesSpec.map(E);
1903
- return e.spec.axesSpec.map(E).every((i) => n.some((s) => R(s, i)));
1905
+ const n = t.axesSpec.map(E);
1906
+ return e.axesSpec.map(E).every((i) => n.some((s) => j(s, i)));
1904
1907
  }
1905
- const kt = "pl7.app/graph/isVirtual", Ce = "pl7.app/label";
1908
+ const Vt = "pl7.app/graph/isVirtual", Ce = "pl7.app/label";
1906
1909
  function Se(t, e) {
1907
1910
  const n = t.spec.axesSpec.map(E), r = e.spec.axesSpec.map(E);
1908
- if (Rt(t, e))
1911
+ if (jt(t.spec, e.spec))
1909
1912
  return [];
1910
- if (!Ne(t, e))
1913
+ if (!Ne(t.spec, e.spec))
1911
1914
  return [];
1912
- const o = r.map((v) => n.filter((d) => R(d, v))), a = Ot(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), p = a.map((v) => {
1913
- const d = /* @__PURE__ */ new Set();
1914
- return v.map((f, g) => {
1915
- const h = e.spec.axesSpec[g].domain, P = f.domain;
1916
- return Object.entries(P ?? {}).forEach(([c, b]) => {
1917
- if ((h == null ? void 0 : h[c]) === void 0) {
1918
- const m = JSON.stringify([c, b]);
1919
- d.add(m), l.add(m);
1915
+ const o = r.map((v) => n.filter((h) => j(h, v))), a = kt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = a.map((v) => {
1916
+ const h = /* @__PURE__ */ new Set();
1917
+ return v.map((c, m) => {
1918
+ const b = e.spec.axesSpec[m].domain, A = c.domain;
1919
+ return Object.entries(A ?? {}).forEach(([p, g]) => {
1920
+ if ((b == null ? void 0 : b[p]) === void 0) {
1921
+ const w = JSON.stringify([p, g]);
1922
+ h.add(w), l.add(w);
1920
1923
  }
1921
1924
  }), {
1922
- ...f,
1923
- annotations: e.spec.axesSpec[g].annotations
1925
+ ...c,
1926
+ annotations: e.spec.axesSpec[m].annotations
1924
1927
  };
1925
- }), d;
1928
+ }), h;
1926
1929
  });
1927
1930
  return [...l].forEach((v) => {
1928
- p.some((d) => !d.has(v)) && u.add(v);
1929
- }), a.map((v, d) => {
1930
- var c;
1931
- const f = Dt(e.id, v.map((b) => b.domain)), g = ((c = e.spec.annotations) == null ? void 0 : c[Ce]) ?? "", h = [...p[d]].filter((b) => u.has(b)).sort().map((b) => {
1932
- var m;
1933
- return (m = JSON.parse(b)) == null ? void 0 : m[1];
1934
- }).join(" / "), P = {
1931
+ d.some((h) => !h.has(v)) && u.add(v);
1932
+ }), a.map((v, h) => {
1933
+ var p;
1934
+ const c = Rt(e.id, v.map((g) => g.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ce]) ?? "", b = [...d[h]].filter((g) => u.has(g)).sort().map((g) => {
1935
+ var w;
1936
+ return (w = JSON.parse(g)) == null ? void 0 : w[1];
1937
+ }).join(" / "), A = {
1935
1938
  ...e.spec.annotations,
1936
- [kt]: "true"
1939
+ [Vt]: "true"
1937
1940
  };
1938
- return (g || h) && (P[Ce] = g && h ? g + " / " + h : g + h), {
1939
- id: f,
1941
+ return (m || b) && (A[Ce] = m && b ? m + " / " + b : m + b), {
1942
+ id: c,
1940
1943
  spec: {
1941
1944
  ...e.spec,
1942
- axesSpec: v.map((b, m) => ({
1943
- ...b,
1944
- annotations: e.spec.axesSpec[m].annotations
1945
+ axesSpec: v.map((g, w) => ({
1946
+ ...g,
1947
+ annotations: e.spec.axesSpec[w].annotations
1945
1948
  })),
1946
- annotations: P
1949
+ annotations: A
1947
1950
  },
1948
1951
  data: e.data
1949
1952
  };
1950
1953
  });
1951
1954
  }
1952
- function jt(t) {
1955
+ function Kt(t) {
1953
1956
  const e = [];
1954
1957
  for (let n = 0; n < t.length; n++)
1955
1958
  for (let r = n + 1; r < t.length; r++) {
@@ -1961,18 +1964,18 @@ function jt(t) {
1961
1964
  }
1962
1965
  return e;
1963
1966
  }
1964
- function Vt(t, e) {
1967
+ function $t(t, e) {
1965
1968
  const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
1966
1969
  t.forEach((s) => {
1967
- n.add(s.id), r.set(ee(Ae(s.spec)), s);
1970
+ n.add(s.id), r.set(te(Ae(s.spec)), s);
1968
1971
  });
1969
1972
  const i = /* @__PURE__ */ new Map();
1970
1973
  for (const s of e) {
1971
1974
  if (n.has(s.id)) continue;
1972
- const o = ee(Ae(s.spec));
1975
+ const o = te(Ae(s.spec));
1973
1976
  if (!r.has(o)) {
1974
1977
  for (const a of r.values())
1975
- if (Ne(a, s)) {
1978
+ if (Ne(a.spec, s.spec)) {
1976
1979
  i.set(o, s);
1977
1980
  break;
1978
1981
  }
@@ -1980,23 +1983,15 @@ function Vt(t, e) {
1980
1983
  }
1981
1984
  return [...r.values(), ...i.values()];
1982
1985
  }
1983
- const Kt = [
1984
- "Int",
1985
- "Long",
1986
- "Float",
1987
- "Double",
1988
- "String",
1989
- "Bytes"
1990
- ];
1991
- function Ln(t, e) {
1992
- if (e === void 0) return;
1993
- const n = t.resultPool.getData().entries.map((s) => s.obj).filter(me).filter((s) => Kt.includes(s.spec.valueType)), r = Vt(e, n), i = [...r, ...jt(r)];
1986
+ function Tn(t, e) {
1987
+ if (!e) return;
1988
+ const n = t.resultPool.getData().entries.map((s) => s.obj).filter(me), r = $t(e, n), i = [...r, ...Kt(r)];
1994
1989
  if (!i.some(
1995
- (s) => s.data instanceof I && !s.data.getIsReadyOrError()
1990
+ (s) => s.data instanceof L && !s.data.getIsReadyOrError()
1996
1991
  ))
1997
1992
  return t.createPFrame(i);
1998
1993
  }
1999
- class Tn {
1994
+ class En {
2000
1995
  constructor(e) {
2001
1996
  this.handle = e;
2002
1997
  }
@@ -2016,121 +2011,121 @@ class Tn {
2016
2011
  return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
2017
2012
  }
2018
2013
  }
2019
- function $t(t) {
2014
+ function Jt(t) {
2020
2015
  return Te({
2021
2016
  __isRef: !0,
2022
- blockId: te(t, "blockId"),
2023
- name: te(t, "name")
2017
+ blockId: ne(t, "blockId"),
2018
+ name: ne(t, "name")
2024
2019
  });
2025
2020
  }
2026
- function En(t) {
2021
+ function Fn(t) {
2027
2022
  return Te({
2028
- ref: $t(te(t, "ref")),
2029
- label: te(t, "label")
2023
+ ref: Jt(ne(t, "ref")),
2024
+ label: ne(t, "label")
2030
2025
  });
2031
2026
  }
2032
- const Fn = {
2033
- sdkVersion: G
2027
+ const On = {
2028
+ sdkVersion: H
2034
2029
  };
2035
- function Jt() {
2036
- return Ee({ sdkVersion: G });
2030
+ function Nt() {
2031
+ return Ee({ sdkVersion: H });
2037
2032
  }
2038
2033
  function Dn(t) {
2039
2034
  try {
2040
- return Jt();
2035
+ return Nt();
2041
2036
  } catch {
2042
2037
  return t;
2043
2038
  }
2044
2039
  }
2045
- function On(t) {
2040
+ function Rn(t) {
2046
2041
  if (typeof globalThis.getEnvironmentValue == "function")
2047
2042
  return globalThis.getEnvironmentValue(t);
2048
2043
  }
2049
2044
  export {
2050
- Ht as Args,
2051
- _ as BlockModel,
2052
- Fn as CurrentSdkInfo,
2053
- S as FutureRef,
2054
- kt as IS_VIRTUAL_COLUMN,
2055
- qt as It,
2056
- An as JsRenderInternal,
2045
+ qt as Args,
2046
+ I as BlockModel,
2047
+ On as CurrentSdkInfo,
2048
+ _ as FutureRef,
2049
+ Vt as IS_VIRTUAL_COLUMN,
2050
+ zt as It,
2051
+ xn as JsRenderInternal,
2057
2052
  Ce as LABEL_ANNOTATION,
2058
- zt as MainOutputs,
2059
- rt as OutputError,
2060
- ct as PAnnotationLabel,
2061
- pt as PAnnotationTrace,
2053
+ Yt as MainOutputs,
2054
+ st as OutputError,
2055
+ dt as PAnnotationLabel,
2056
+ ft as PAnnotationTrace,
2062
2057
  ge as PColumnCollection,
2063
- Tn as PFrameImpl,
2064
- $ as RT_BINARY_PARTITIONED,
2065
- W as RT_BINARY_SUPER_PARTITIONED,
2066
- M as RT_JSON_PARTITIONED,
2067
- ie as RT_JSON_SUPER_PARTITIONED,
2068
- ne as RT_RESOURCE_MAP,
2069
- re as RT_RESOURCE_MAP_PARTITIONED,
2070
- X as RenderCtx,
2071
- It as ResultPool,
2072
- Yt as StagingOutputs,
2073
- ft as Trace,
2074
- dt as TraceEntry,
2075
- I as TreeNodeAccessor,
2076
- Xt as UiState,
2058
+ En as PFrameImpl,
2059
+ N as RT_BINARY_PARTITIONED,
2060
+ G as RT_BINARY_SUPER_PARTITIONED,
2061
+ W as RT_JSON_PARTITIONED,
2062
+ se as RT_JSON_SUPER_PARTITIONED,
2063
+ re as RT_RESOURCE_MAP,
2064
+ ie as RT_RESOURCE_MAP_PARTITIONED,
2065
+ Q as RenderCtx,
2066
+ Tt as ResultPool,
2067
+ Xt as StagingOutputs,
2068
+ gt as Trace,
2069
+ ht as TraceEntry,
2070
+ L as TreeNodeAccessor,
2071
+ Qt as UiState,
2077
2072
  $e as allColumnsComputed,
2078
- sn as and,
2079
- bt as convertOrParsePColumnData,
2080
- Ln as createPFrameForGraphs,
2081
- Sn as createPlDataTable,
2082
- In as createPlDataTableSheet,
2083
- _n as createPlDataTableV2,
2073
+ on as and,
2074
+ At as convertOrParsePColumnData,
2075
+ Tn as createPFrameForGraphs,
2076
+ _n as createPlDataTable,
2077
+ Ln as createPlDataTableSheet,
2078
+ In as createPlDataTableV2,
2084
2079
  Re as deriveLabels,
2085
2080
  ue as downgradeCfgOrLambda,
2086
- Vt as enrichColumnsWithCompatible,
2087
- gn as extractArchiveAndGetURL,
2088
- Pn as extractConfig,
2089
- wt as filterDataInfoEntries,
2090
- tn as flatten,
2091
- En as fromPlOption,
2092
- $t as fromPlRef,
2093
- jt as getAdditionalColumns,
2081
+ $t as enrichColumnsWithCompatible,
2082
+ mn as extractArchiveAndGetURL,
2083
+ Cn as extractConfig,
2084
+ xt as filterDataInfoEntries,
2085
+ nn as flatten,
2086
+ Fn as fromPlOption,
2087
+ Jt as fromPlRef,
2088
+ Kt as getAdditionalColumns,
2094
2089
  Ve as getAllLabelColumns,
2095
- cn as getBlobContent,
2096
- dn as getBlobContentAsJson,
2097
- pn as getBlobContentAsString,
2098
- fn as getDownloadedBlobContent,
2099
- On as getEnvironmentValue,
2100
- H as getFromCfg,
2101
- Z as getImmediate,
2102
- mn as getImportProgress,
2103
- te as getJsonField,
2104
- yn as getLastLogs,
2105
- wn as getLogHandle,
2090
+ pn as getBlobContent,
2091
+ fn as getBlobContentAsJson,
2092
+ dn as getBlobContentAsString,
2093
+ hn as getDownloadedBlobContent,
2094
+ Rn as getEnvironmentValue,
2095
+ q as getFromCfg,
2096
+ ee as getImmediate,
2097
+ yn as getImportProgress,
2098
+ ne as getJsonField,
2099
+ vn as getLastLogs,
2100
+ An as getLogHandle,
2106
2101
  Ke as getMatchingLabelColumns,
2107
- hn as getOnDemandBlobContent,
2108
- mt as getPartitionKeysList,
2102
+ gn as getOnDemandBlobContent,
2103
+ vt as getPartitionKeysList,
2109
2104
  Dn as getPlatformaOrDefault,
2110
- vn as getProgressLog,
2111
- bn as getProgressLogWithInfo,
2112
- Jt as getRawPlatformaInstance,
2113
- an as getResourceField,
2114
- ln as getResourceValueAsJson,
2115
- vt as getUniquePartitionKeys,
2105
+ bn as getProgressLog,
2106
+ wn as getProgressLogWithInfo,
2107
+ Nt as getRawPlatformaInstance,
2108
+ ln as getResourceField,
2109
+ un as getResourceValueAsJson,
2110
+ wt as getUniquePartitionKeys,
2116
2111
  pe as ifDef,
2117
- Ft as isColumnOptional,
2118
- Lt as isConfigLambda,
2119
- nn as isEmpty,
2120
- Et as isLabelColumn,
2121
- Gt as isolate,
2122
- Qt as makeArray,
2112
+ Dt as isColumnOptional,
2113
+ Et as isConfigLambda,
2114
+ rn as isEmpty,
2115
+ Ot as isLabelColumn,
2116
+ Ht as isolate,
2117
+ Zt as makeArray,
2123
2118
  Te as makeObject,
2124
- en as mapArrayValues,
2125
- Zt as mapRecordValues,
2126
- un as mapResourceFields,
2127
- rn as not,
2128
- on as or,
2119
+ tn as mapArrayValues,
2120
+ en as mapRecordValues,
2121
+ cn as mapResourceFields,
2122
+ sn as not,
2123
+ an as or,
2129
2124
  he as parsePColumnData,
2130
- Tt as parsePTableColumnId,
2131
- xn as parseResourceMap,
2132
- it as readOutput,
2133
- Cn as stringifyPTableColumnId,
2134
- Wt as wrapOutputs
2125
+ Ft as parsePTableColumnId,
2126
+ Pn as parseResourceMap,
2127
+ ot as readOutput,
2128
+ Sn as stringifyPTableColumnId,
2129
+ Gt as wrapOutputs
2135
2130
  };
2136
2131
  //# sourceMappingURL=index.mjs.map