@milaboratories/graph-maker 1.1.135 → 1.1.136

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,8 +1,8 @@
1
1
  import z from "../../../canonicalize/lib/canonicalize.js";
2
2
  import { deriveLabels as Oe, isLabelColumn as Fe } from "../../../@platforma-sdk/model/dist/index.js";
3
- import { canonicalizeJson as j } from "../../pl-model-common/dist/index.js";
3
+ import { canonicalizeJson as j, pTableValue as _e } from "../../pl-model-common/dist/index.js";
4
4
  import ie from "../../../lodash/lodash.js";
5
- var _e = "pl7.app/axisNature", he = "pl7.app/label", Le = "pl7.app/columnAsAxis/name", Te = "pl7.app/columnAsAxis/domain", J = "pl7.app/isSubset", ee = "pl7.app/isDiscreteFilter", ke = "pl7.app/discreteValues", Ee = "pl7.app/graph/axis/highCardinality", Ne = "pl7.app/graph/isVirtual", xe = "pl7.app/isLinkerColumn", _ = class se {
5
+ var Le = "pl7.app/axisNature", xe = "pl7.app/label", Te = "pl7.app/columnAsAxis/name", ke = "pl7.app/columnAsAxis/domain", $ = "pl7.app/isSubset", ee = "pl7.app/isDiscreteFilter", Ee = "pl7.app/discreteValues", Ne = "pl7.app/graph/axis/highCardinality", Ge = "pl7.app/graph/isVirtual", he = "pl7.app/isLinkerColumn", _ = class se {
6
6
  constructor({ type: e, name: o, domain: n }) {
7
7
  this.kind = "axis", this.type = e, this.name = o, this.domain = { ...n };
8
8
  }
@@ -57,7 +57,7 @@ var Se = "pl7.app/parents";
57
57
  function Ce(t) {
58
58
  return !t.annotations || !t.annotations[Se] ? [] : JSON.parse(t.annotations[Se]);
59
59
  }
60
- function Ge(t, e) {
60
+ function Me(t, e) {
61
61
  const o = j(t[e]);
62
62
  for (let n = 0; n < t.length; n++) {
63
63
  const l = t[n];
@@ -68,13 +68,13 @@ function Ge(t, e) {
68
68
  }
69
69
  return !0;
70
70
  }
71
- function Me(t) {
71
+ function qe(t) {
72
72
  for (let e = 0; e < t.length; e++)
73
- if (Ge(t, e))
73
+ if (Me(t, e))
74
74
  return t[e];
75
75
  return null;
76
76
  }
77
- function qe(t) {
77
+ function Ve(t) {
78
78
  const e = { axis: t, parents: [] };
79
79
  let o = [e];
80
80
  for (; o.length; ) {
@@ -87,7 +87,7 @@ function qe(t) {
87
87
  }
88
88
  return e;
89
89
  }
90
- function Ve(t) {
90
+ function je(t) {
91
91
  const e = /* @__PURE__ */ new Set([j(t.axis)]);
92
92
  let o = [t];
93
93
  for (; o.length; ) {
@@ -99,7 +99,7 @@ function Ve(t) {
99
99
  }
100
100
  return e;
101
101
  }
102
- function je(t) {
102
+ function ze(t) {
103
103
  const e = [t.axis];
104
104
  let o = [t];
105
105
  for (; o.length; ) {
@@ -117,18 +117,18 @@ function te(t) {
117
117
  let e = t;
118
118
  const o = [];
119
119
  for (; e.length; ) {
120
- const n = Me(e);
120
+ const n = qe(e);
121
121
  if (n === null)
122
122
  return null;
123
- const l = qe(n);
123
+ const l = Ve(n);
124
124
  if (l === null)
125
125
  return null;
126
- const s = Ve(l), r = je(l);
126
+ const s = je(l), r = ze(l);
127
127
  o.push(r), e = e.filter((c) => !s.has(j(c)));
128
128
  }
129
129
  return o;
130
130
  }
131
- function ze(t) {
131
+ function Ke(t) {
132
132
  var e, o;
133
133
  const n = /* @__PURE__ */ new Map();
134
134
  for (const l of t) {
@@ -140,20 +140,20 @@ function ze(t) {
140
140
  }
141
141
  return n;
142
142
  }
143
- async function Ke(t, e, o, n, l, s, r, c = !0, i) {
143
+ async function Ue(t, e, o, n, l, s, r, c = !0, i) {
144
144
  var p, u, m, d;
145
- const h = A(e);
146
- if (B(h)) {
147
- const g = await t.pFrameProvider.getColumnSpecById(h);
145
+ const x = A(e);
146
+ if (B(x)) {
147
+ const g = await t.pFrameProvider.getColumnSpecById(x);
148
148
  if (!g)
149
149
  return;
150
- const x = be(
150
+ const h = be(
151
151
  g,
152
152
  l,
153
153
  s,
154
154
  r,
155
155
  i
156
- ).map((a) => _.fromAxisSpec(a).toCanonicalString()), w = new Set(x), D = g.axesSpec.map((a) => _.fromAxisSpec(a).toCanonicalString()), b = {};
156
+ ).map((a) => _.fromAxisSpec(a).toCanonicalString()), w = new Set(h), D = g.axesSpec.map((a) => _.fromAxisSpec(a).toCanonicalString()), b = {};
157
157
  c && D.forEach((a, S) => {
158
158
  w.has(a) && (b[a] = S);
159
159
  });
@@ -164,12 +164,12 @@ async function Ke(t, e, o, n, l, s, r, c = !0, i) {
164
164
  type: g.valueType,
165
165
  spec: g,
166
166
  annotations: g.annotations,
167
- isSubsetFilter: ((p = g.annotations) == null ? void 0 : p[J]) === "true",
167
+ isSubsetFilter: ((p = g.annotations) == null ? void 0 : p[$]) === "true",
168
168
  isDiscreteFilter: g.valueType === "String" || ((u = g.annotations) == null ? void 0 : u[ee]) === "true",
169
- axesToBeFixed: x,
169
+ axesToBeFixed: h,
170
170
  axesToBeFixedIndexes: b
171
171
  };
172
- n.set(h.toCanonicalString(), C);
172
+ n.set(x.toCanonicalString(), C);
173
173
  for (const a of g.axesSpec) {
174
174
  const y = _.fromAxisSpec(a).toCanonicalString();
175
175
  if (n.has(y))
@@ -183,7 +183,7 @@ async function Ke(t, e, o, n, l, s, r, c = !0, i) {
183
183
  dividable: !1,
184
184
  spec: a,
185
185
  annotations: a.annotations,
186
- isSubsetFilter: ((m = a.annotations) == null ? void 0 : m[J]) === "true",
186
+ isSubsetFilter: ((m = a.annotations) == null ? void 0 : m[$]) === "true",
187
187
  isDiscreteFilter: a.type === "String" || ((d = a.annotations) == null ? void 0 : d[ee]) === "true",
188
188
  parentSources: [e]
189
189
  };
@@ -225,7 +225,7 @@ function ue(t) {
225
225
  dividedAxes: { ...t.dividedAxes }
226
226
  };
227
227
  }
228
- function Ue(t) {
228
+ function We(t) {
229
229
  const { selectedSource: e, type: o, selectedFilterRange: n, selectedFilterValue: l } = t, s = A(e);
230
230
  if (!s)
231
231
  throw Error("Empty source selected");
@@ -274,13 +274,13 @@ function Ue(t) {
274
274
  function Y(t) {
275
275
  const e = [];
276
276
  for (const o of t)
277
- e.push(...Ue(o));
277
+ e.push(...We(o));
278
278
  return e;
279
279
  }
280
280
  function fe(t) {
281
281
  var e, o, n, l;
282
282
  if ("kind" in t && t.kind === "PColumn") {
283
- const c = (o = t.name) != null ? o : (e = t.annotations) == null ? void 0 : e[Le], i = (l = t.domain) != null ? l : (n = t.annotations) == null ? void 0 : n[Te];
283
+ const c = (o = t.name) != null ? o : (e = t.annotations) == null ? void 0 : e[Te], i = (l = t.domain) != null ? l : (n = t.annotations) == null ? void 0 : n[ke];
284
284
  return z({ name: c, domain: i });
285
285
  }
286
286
  const s = t.name, r = t.domain;
@@ -300,7 +300,7 @@ async function ve(t, e, o) {
300
300
  }
301
301
  return null;
302
302
  }
303
- var We = "pl7.app/label";
303
+ var He = "pl7.app/label";
304
304
  async function k(t, e, o) {
305
305
  const n = A(e);
306
306
  if (B(n))
@@ -309,7 +309,7 @@ async function k(t, e, o) {
309
309
  const p = await ve(t, i, o);
310
310
  return p ? fe(p) : null;
311
311
  }
312
- const s = await t.pFrameProvider.getColumnsFull([], !1, void 0, [We]), r = await l(n), c = s.find(({ spec: i }) => i && i.axesSpec.length === 1 && fe(i.axesSpec[0]) === r);
312
+ const s = await t.pFrameProvider.getColumnsFull([], !1, void 0, [He]), r = await l(n), c = s.find(({ spec: i }) => i && i.axesSpec.length === 1 && fe(i.axesSpec[0]) === r);
313
313
  return c ? new W({ name: c.columnId, type: c.spec.valueType }) : void 0;
314
314
  }
315
315
  async function T(t, e, o) {
@@ -318,23 +318,23 @@ async function T(t, e, o) {
318
318
  let c;
319
319
  if (B(s) ? c = await t.pFrameProvider.getColumnSpecById(r ?? s) : c = r ? await t.pFrameProvider.getColumnSpecById(r) : await ve(t, s, o), !c)
320
320
  return "";
321
- const i = (l = (n = c.annotations) == null ? void 0 : n[he]) != null ? l : c.name;
321
+ const i = (l = (n = c.annotations) == null ? void 0 : n[xe]) != null ? l : c.name;
322
322
  return t.labelsModifier(c.name, i);
323
323
  }
324
324
  function Ae(t) {
325
325
  var e, o;
326
- const n = (o = (e = t.annotations) == null ? void 0 : e[_e]) == null ? void 0 : o.toLowerCase();
326
+ const n = (o = (e = t.annotations) == null ? void 0 : e[Le]) == null ? void 0 : o.toLowerCase();
327
327
  return !!n && n !== "homogenous" && n !== "homogeneous";
328
328
  }
329
329
  function R(t) {
330
330
  var e, o;
331
- return ((e = t.annotations) == null ? void 0 : e[J]) === "true" || ((o = t.annotations) == null ? void 0 : o[ee]) === "true", !0;
331
+ return ((e = t.annotations) == null ? void 0 : e[$]) === "true" || ((o = t.annotations) == null ? void 0 : o[ee]) === "true", !0;
332
332
  }
333
- function He(t) {
333
+ function Ye(t) {
334
334
  var e, o;
335
- return !t.name.includes("metadata") && ((e = t.annotations) == null ? void 0 : e[Ne]) !== "true" && ((o = t.annotations) == null ? void 0 : o[J]) !== "true";
335
+ return !t.name.includes("metadata") && ((e = t.annotations) == null ? void 0 : e[Ge]) !== "true" && ((o = t.annotations) == null ? void 0 : o[$]) !== "true";
336
336
  }
337
- function Ye(t) {
337
+ function Re(t) {
338
338
  var e;
339
339
  const o = {};
340
340
  for (const n of t.filter((l) => l.spec.axesSpec.length === 2)) {
@@ -346,7 +346,7 @@ function Ye(t) {
346
346
  }
347
347
  return o;
348
348
  }
349
- async function $(t, e) {
349
+ async function J(t, e) {
350
350
  const o = /* @__PURE__ */ new Set(), n = [];
351
351
  for (const l of e) {
352
352
  const s = A(l);
@@ -362,7 +362,7 @@ async function $(t, e) {
362
362
  }
363
363
  return n;
364
364
  }
365
- function Re(t, e, o) {
365
+ function Xe(t, e, o) {
366
366
  const n = {}, l = /* @__PURE__ */ new Set([e]);
367
367
  let s = [e];
368
368
  for (; s.length; ) {
@@ -383,8 +383,8 @@ function Re(t, e, o) {
383
383
  }
384
384
  return null;
385
385
  }
386
- function Xe(t, e, o) {
387
- const n = [...e].map((s) => Re(t, s, o)).filter((s) => s !== null);
386
+ function $e(t, e, o) {
387
+ const n = [...e].map((s) => Xe(t, s, o)).filter((s) => s !== null);
388
388
  if (n.length === 0)
389
389
  return [];
390
390
  let l = n[0];
@@ -398,8 +398,8 @@ async function X(t) {
398
398
  !1,
399
399
  void 0,
400
400
  void 0,
401
- { [xe]: "true" }
402
- ), o = Ye(e.filter((l) => l.spec.axesSpec.length === 2)), n = ze(e.filter((l) => l.spec.axesSpec.length > 2));
401
+ { [he]: "true" }
402
+ ), o = Re(e.filter((l) => l.spec.axesSpec.length === 2)), n = Ke(e.filter((l) => l.spec.axesSpec.length > 2));
403
403
  return { linkerColumnsMap: o, compositeLinkerMap: n };
404
404
  }
405
405
  async function V(t, e, o, n, l, s) {
@@ -410,12 +410,12 @@ async function V(t, e, o, n, l, s) {
410
410
  if (!c)
411
411
  return [];
412
412
  const i = c.axesSpec.filter(
413
- (x) => {
414
- const w = _.fromAxisSpec(x).toCanonicalString();
413
+ (h) => {
414
+ const w = _.fromAxisSpec(h).toCanonicalString();
415
415
  return !(s != null && s.some((D) => D.axisSource === w));
416
416
  }
417
- ), p = new Set(n.map((x) => _.fromAxisSpec(x).toCanonicalString())), u = i.filter((x) => {
418
- const w = _.fromAxisSpec(x).toCanonicalString();
417
+ ), p = new Set(n.map((h) => _.fromAxisSpec(h).toCanonicalString())), u = i.filter((h) => {
418
+ const w = _.fromAxisSpec(h).toCanonicalString();
419
419
  return !p.has(w);
420
420
  });
421
421
  if (!u.length)
@@ -423,23 +423,23 @@ async function V(t, e, o, n, l, s) {
423
423
  const m = te(n), d = te(u);
424
424
  if (!m || !d)
425
425
  throw Error(`Can't create axes tree for ${c.name}`);
426
- const h = new Set(m.map(j)), g = /* @__PURE__ */ new Set();
427
- return d.forEach((x) => {
426
+ const x = new Set(m.map(j)), g = /* @__PURE__ */ new Set();
427
+ return d.forEach((h) => {
428
428
  var w;
429
- const D = j(x);
429
+ const D = j(h);
430
430
  if (o.has(D)) {
431
- const b = o.get(D), a = (b ? [...b.keys()] : []).find((y) => h.has(y));
431
+ const b = o.get(D), a = (b ? [...b.keys()] : []).find((y) => x.has(y));
432
432
  if (!a)
433
433
  throw Error(`Can't find composite linker column for ${c.name}, ${D}`);
434
434
  const S = (w = o.get(D)) == null ? void 0 : w.get(a);
435
435
  g.add(S.toCanonicalString());
436
- } else if (x.length === 1) {
437
- const b = _.fromAxisSpec(x[0]).toCanonicalString();
438
- Xe(e, p, b).forEach((a) => {
436
+ } else if (h.length === 1) {
437
+ const b = _.fromAxisSpec(h[0]).toCanonicalString();
438
+ $e(e, p, b).forEach((a) => {
439
439
  g.add(a.toCanonicalString());
440
440
  });
441
441
  }
442
- }), [...g].map((x) => A(x));
442
+ }), [...g].map((h) => A(h));
443
443
  }
444
444
  function be(t, e, o, n, l) {
445
445
  const r = t.axesSpec.filter(
@@ -466,8 +466,8 @@ function Ie(t, e) {
466
466
  for (let r = 0; r < t.length; r++) {
467
467
  const { selectedSource: c, selectedFilterValue: i, selectedFilterRange: p, type: u } = t[r], m = A(c), d = (B(m) ? e.columnsData[c] : e.axesData[c])[l];
468
468
  if (i !== void 0 && (s = s || d === i), p !== void 0 && (p.min !== void 0 || p.max !== void 0) && typeof d == "number") {
469
- let h = !0;
470
- p.min !== void 0 && (h = h && d >= p.min), p.max !== void 0 && (h = h && d <= p.max), s = s || h;
469
+ let x = !0;
470
+ p.min !== void 0 && (x = x && d >= p.min), p.max !== void 0 && (x = x && d <= p.max), s = s || x;
471
471
  }
472
472
  u === "subset" && (s = s || d != null);
473
473
  }
@@ -547,12 +547,12 @@ var Q = class {
547
547
  const r = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), i = [];
548
548
  for (const m of this.dataInputs)
549
549
  for (const d of e.components[m].selectorStates) {
550
- const h = A(d.selectedSource);
551
- if (B(h)) {
552
- const g = await t.pFrameProvider.getColumnSpecById(h);
553
- g && g.axesSpec.forEach((x) => {
554
- const w = _.fromAxisSpec(x).toCanonicalString();
555
- c.has(w) || (c.add(w), i.push(x));
550
+ const x = A(d.selectedSource);
551
+ if (B(x)) {
552
+ const g = await t.pFrameProvider.getColumnSpecById(x);
553
+ g && g.axesSpec.forEach((h) => {
554
+ const w = _.fromAxisSpec(h).toCanonicalString();
555
+ c.has(w) || (c.add(w), i.push(h));
556
556
  });
557
557
  }
558
558
  }
@@ -562,19 +562,19 @@ var Q = class {
562
562
  const m = [];
563
563
  for (const d of u)
564
564
  if (n[d]) {
565
- const h = Object.keys(n[d]);
566
- for (const g of h)
565
+ const x = Object.keys(n[d]);
566
+ for (const g of x)
567
567
  !p.has(g) && !c.has(g) && (m.push(g), p.add(g));
568
568
  }
569
569
  u = m;
570
570
  }
571
571
  for (const [m, { selectorStates: d }] of Object.entries(e.components)) {
572
572
  const g = ((s = this.simpleComponentControllers[m]) != null ? s : this.filterComponentControllers[m]).settings.columnsWithExtraAxesAllowed;
573
- for (const { selectedSource: x } of d)
574
- await Ke(
573
+ for (const { selectedSource: h } of d)
574
+ await Ue(
575
575
  t,
576
- x,
577
- o[x],
576
+ h,
577
+ o[h],
578
578
  r,
579
579
  i,
580
580
  c,
@@ -616,10 +616,10 @@ var Q = class {
616
616
  return n[s] = l.label, n;
617
617
  }, {});
618
618
  }
619
- async calculateOptions(t, e, o = [], n = He) {
619
+ async calculateOptions(t, e, o = [], n = Ye) {
620
620
  var l, s;
621
- const r = this.createEmptyComponentsGuide(e), c = this.getConsumedOptionsSet(e), i = new Set(this.ignoredOptionIdNames), p = new Set(o), { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = await this.getLabelsMap(t, e), h = await this.getSelectedSourcesInfo(t, e, d, u, m), g = /* @__PURE__ */ new Map(), x = { ...this.simpleComponentControllers, ...this.filterComponentControllers }, w = /* @__PURE__ */ new Set();
622
- for (const [y, f] of Object.entries(x)) {
621
+ const r = this.createEmptyComponentsGuide(e), c = this.getConsumedOptionsSet(e), i = new Set(this.ignoredOptionIdNames), p = new Set(o), { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = await this.getLabelsMap(t, e), x = await this.getSelectedSourcesInfo(t, e, d, u, m), g = /* @__PURE__ */ new Map(), h = { ...this.simpleComponentControllers, ...this.filterComponentControllers }, w = /* @__PURE__ */ new Set();
622
+ for (const [y, f] of Object.entries(h)) {
623
623
  const v = await f.getOptions(
624
624
  t,
625
625
  e,
@@ -641,7 +641,7 @@ var Q = class {
641
641
  const D = (y) => {
642
642
  const f = g.get(y);
643
643
  f && f.kind === "axis" && (f.mustBeConsumed = !0);
644
- const v = h.get(y);
644
+ const v = x.get(y);
645
645
  v && v.kind === "axis" && (v.mustBeConsumed = !0);
646
646
  }, b = await this.getMustBeConsumedAxes(t, e);
647
647
  for (const y of b)
@@ -649,14 +649,14 @@ var Q = class {
649
649
  if (this.dontAllowUnfilteredHighCardinality) {
650
650
  const y = (v) => {
651
651
  var P;
652
- return ((P = v == null ? void 0 : v.annotations) == null ? void 0 : P[Ee]) === "true";
652
+ return ((P = v == null ? void 0 : v.annotations) == null ? void 0 : P[Ne]) === "true";
653
653
  }, f = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((v, P) => {
654
- const O = h.get(P.selectedSource);
654
+ const O = x.get(P.selectedSource);
655
655
  return (O == null ? void 0 : O.kind) === "column" && O.spec.axesSpec.filter(y).forEach((L) => v.add(_.fromAxisSpec(L).toCanonicalString())), (O == null ? void 0 : O.kind) === "axis" && y(O.spec) && v.add(_.fromAxisSpec(O.spec).toCanonicalString()), v;
656
656
  }, /* @__PURE__ */ new Set())) != null ? s : /* @__PURE__ */ new Set();
657
657
  this.dataInputs.forEach((v) => {
658
658
  for (const { selectedSource: P } of e.components[v].selectorStates) {
659
- const O = h.get(P);
659
+ const O = x.get(P);
660
660
  if ((O == null ? void 0 : O.kind) === "column" && O.spec.axesSpec.filter(y).forEach((L) => {
661
661
  const E = _.fromAxisSpec(L).toCanonicalString();
662
662
  !w.has(E) && !f.has(E) && w.add(E), f.has(E) || D(E);
@@ -670,7 +670,7 @@ var Q = class {
670
670
  const C = /* @__PURE__ */ new Set();
671
671
  for (const { selectorStates: y } of Object.values(e.components))
672
672
  for (const { selectedSource: f } of y) {
673
- const v = h.get(f);
673
+ const v = x.get(f);
674
674
  v && v.kind === "column" && v.axesToBeFixed.forEach((P) => {
675
675
  C.add(P);
676
676
  });
@@ -678,7 +678,7 @@ var Q = class {
678
678
  const a = await this.isConsistent(t, e, u, m), S = (y) => {
679
679
  var f, v, P;
680
680
  const O = (f = A(y).toCanonicalString()) != null ? f : y;
681
- return (P = (v = g.get(O)) != null ? v : h.get(O)) != null ? P : ye(y);
681
+ return (P = (v = g.get(O)) != null ? v : x.get(O)) != null ? P : ye(y);
682
682
  };
683
683
  return {
684
684
  components: r,
@@ -692,7 +692,7 @@ var Q = class {
692
692
  }
693
693
  async getUniqueSourceValuesWithLabels(t, e, o, n, l, s) {
694
694
  var r;
695
- const c = (u) => u.sort((m, d) => m.label.localeCompare(d.label, "en", { numeric: !0 })), i = e.getSourceInfo(o), p = (r = i.annotations) == null ? void 0 : r[ke];
695
+ const c = (u) => u.sort((m, d) => m.label.localeCompare(d.label, "en", { numeric: !0 })), i = e.getSourceInfo(o), p = (r = i.annotations) == null ? void 0 : r[Ee];
696
696
  try {
697
697
  const u = p ? JSON.parse(p).map((m) => String(m)) : null;
698
698
  if (u) {
@@ -704,9 +704,9 @@ var Q = class {
704
704
  }
705
705
  if (i.kind === "axis") {
706
706
  const u = A(o), m = i.parentSources.map(A), d = await k(t, o, i.parentSources);
707
- let h = [];
707
+ let x = [];
708
708
  if (d) {
709
- l && (h = [{
709
+ l && (x = [{
710
710
  type: "bySingleColumnV2",
711
711
  column: {
712
712
  type: "column",
@@ -716,7 +716,7 @@ var Q = class {
716
716
  operator: "StringIContains",
717
717
  substring: l
718
718
  }
719
- }]), s && (h = [{
719
+ }]), s && (x = [{
720
720
  type: "bySingleColumnV2",
721
721
  column: {
722
722
  type: "axis",
@@ -727,13 +727,13 @@ var Q = class {
727
727
  substring: s
728
728
  }
729
729
  }]);
730
- const { data: D, axesData: b } = await t.pFrameProvider.getSingleColumnData(d, h), C = b[u.toCanonicalString()], a = [];
730
+ const { data: D, axesData: b } = await t.pFrameProvider.getSingleColumnData(d, x), C = b[u.toCanonicalString()], a = [];
731
731
  for (let S = 0; S < Math.min(C.length, n ?? C.length); S++)
732
732
  a.push({ value: String(C[S]), label: String(D[S]) });
733
733
  return c(a), { values: a, overflow: !(n === void 0 || C.length < n) };
734
734
  }
735
735
  const g = l ?? s;
736
- g && (h = [{
736
+ g && (x = [{
737
737
  type: "bySingleColumnV2",
738
738
  column: {
739
739
  type: "axis",
@@ -744,8 +744,8 @@ var Q = class {
744
744
  substring: g
745
745
  }
746
746
  }]);
747
- const x = await t.pFrameProvider.getAxisUniqueValues(u, [m[0]], n, h), w = x.values.map((D) => ({ value: String(D), label: String(D) }));
748
- return c(w), { values: w, overflow: x.overflow };
747
+ const h = await t.pFrameProvider.getAxisUniqueValues(u, [m[0]], n, x), w = h.values.map((D) => ({ value: String(D), label: String(D) }));
748
+ return c(w), { values: w, overflow: h.overflow };
749
749
  }
750
750
  if (i.kind === "column") {
751
751
  const u = l ?? s, m = A(o), d = u ? [{
@@ -758,8 +758,8 @@ var Q = class {
758
758
  operator: "StringIContains",
759
759
  substring: u
760
760
  }
761
- }] : [], h = await t.pFrameProvider.getColumnUniqueValues(m, n, d), g = h.values.map((x) => ({ value: String(x), label: String(x) }));
762
- return c(g), { values: g, overflow: h.overflow };
761
+ }] : [], x = await t.pFrameProvider.getColumnUniqueValues(m, n, d), g = x.values.map((h) => ({ value: String(h), label: String(h) }));
762
+ return c(g), { values: g, overflow: x.overflow };
763
763
  }
764
764
  return { values: [], overflow: !1 };
765
765
  }
@@ -805,7 +805,7 @@ var Q = class {
805
805
  if (u && u.kind === "column" && u.axesToBeFixed.some(
806
806
  (m) => {
807
807
  var d;
808
- return ((d = (p ?? []).find((h) => h.axisSource === m)) == null ? void 0 : d.axisValue) === void 0;
808
+ return ((d = (p ?? []).find((x) => x.axisSource === m)) == null ? void 0 : d.axisValue) === void 0;
809
809
  }
810
810
  )) {
811
811
  r = !0;
@@ -825,7 +825,7 @@ var Q = class {
825
825
  }
826
826
  }, Je = (t) => {
827
827
  var e;
828
- return ((e = t == null ? void 0 : t.annotations) == null ? void 0 : e[xe]) === "true";
828
+ return ((e = t == null ? void 0 : t.annotations) == null ? void 0 : e[he]) === "true";
829
829
  }, De = class Be {
830
830
  constructor({
831
831
  componentName: e,
@@ -871,10 +871,10 @@ var Q = class {
871
871
  if (this.strictlyDependsOnParents && !this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent)
872
872
  return d.axesSpec.every((g) => i(g));
873
873
  if (this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent) {
874
- if (d.axesSpec.some((x) => i(x)))
874
+ if (d.axesSpec.some((h) => i(h)))
875
875
  return !0;
876
876
  const g = te(d.axesSpec);
877
- return g ? g.some((x) => l.has(j(x))) : !1;
877
+ return g ? g.some((h) => l.has(j(h))) : !1;
878
878
  } else
879
879
  return r.size === 0 || d.axesSpec.some((g) => i(g));
880
880
  }
@@ -919,7 +919,7 @@ var Q = class {
919
919
  }
920
920
  async getAllowedAxes(e, o, n) {
921
921
  var l, s, r, c, i, p, u;
922
- const m = this.getParentSelectedSources(e, o), d = /* @__PURE__ */ new Set(), h = [], g = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Map();
922
+ const m = this.getParentSelectedSources(e, o), d = /* @__PURE__ */ new Set(), x = [], g = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map();
923
923
  for (const D of m)
924
924
  if (B(D)) {
925
925
  const b = await e.pFrameProvider.getColumnSpecById(D);
@@ -927,9 +927,9 @@ var Q = class {
927
927
  const S = _.fromAxisSpec(C).toCanonicalString();
928
928
  if (d.has(S))
929
929
  continue;
930
- d.add(S), h.push(C);
930
+ d.add(S), x.push(C);
931
931
  const y = Ae(C);
932
- x.set(S, {
932
+ h.set(S, {
933
933
  kind: "axis",
934
934
  name: C.name,
935
935
  label: await T(e, S, [
@@ -940,7 +940,7 @@ var Q = class {
940
940
  dividable: !1,
941
941
  spec: C,
942
942
  annotations: C.annotations,
943
- isSubsetFilter: ((s = C.annotations) == null ? void 0 : s[J]) === "true",
943
+ isSubsetFilter: ((s = C.annotations) == null ? void 0 : s[$]) === "true",
944
944
  isDiscreteFilter: C.type === "String" || ((r = C.annotations) == null ? void 0 : r[ee]) === "true",
945
945
  parentSources: [D.toCanonicalString()]
946
946
  });
@@ -958,16 +958,16 @@ var Q = class {
958
958
  const { spec: S, id: y } = n[b][a];
959
959
  for (const f of S.axesSpec) {
960
960
  const v = _.fromAxisSpec(f).toCanonicalString();
961
- x.has(v) || x.set(v, {
961
+ h.has(v) || h.set(v, {
962
962
  kind: "axis",
963
963
  name: f.name,
964
- label: (i = (c = f.annotations) == null ? void 0 : c[he]) != null ? i : "",
964
+ label: (i = (c = f.annotations) == null ? void 0 : c[xe]) != null ? i : "",
965
965
  type: f.type,
966
966
  mustBeConsumed: !1,
967
967
  dividable: !1,
968
968
  spec: f,
969
969
  annotations: f.annotations,
970
- isSubsetFilter: ((p = f.annotations) == null ? void 0 : p[J]) === "true",
970
+ isSubsetFilter: ((p = f.annotations) == null ? void 0 : p[$]) === "true",
971
971
  isDiscreteFilter: f.type === "String" || ((u = f.annotations) == null ? void 0 : u[ee]) === "true",
972
972
  parentSources: [y.toCanonicalString()]
973
973
  });
@@ -976,15 +976,15 @@ var Q = class {
976
976
  }
977
977
  w = D;
978
978
  }
979
- return { parentAxes: d, parentAxesList: h, linkerAxes: g, optionsInfo: x };
979
+ return { parentAxes: d, parentAxesList: x, linkerAxes: g, optionsInfo: h };
980
980
  }
981
981
  async getOptions(e, o, n, l, s, r, c, i = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set()) {
982
- var u, m, d, h, g;
983
- const x = this.settings.multipleSelectors, w = this.settings.required, D = await this.checkStateConsistency(e, o, s, r);
982
+ var u, m, d, x, g;
983
+ const h = this.settings.multipleSelectors, w = this.settings.required, D = await this.checkStateConsistency(e, o, s, r);
984
984
  if (this.dependsOn.length && this.dependsOn.some((O) => o.components[O].selectorStates.length === 0))
985
- return { multipleSelectors: x, required: w, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
985
+ return { multipleSelectors: h, required: w, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
986
986
  if (this.strictlyDependsOnParents && !this.settings.isDataComponent && this.parentComponents.some((O) => o.components[O].selectorStates.length === 0))
987
- return { multipleSelectors: x, required: w, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
987
+ return { multipleSelectors: h, required: w, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
988
988
  const b = this.getParentSelectedSources(e, o), C = (await e.pFrameProvider.getColumns([], !1, this.allowedTypes, void 0, this.annotations)).filter((O) => !l.has(O.toCanonicalString())), { parentAxes: a, linkerAxes: S, parentAxesList: y, optionsInfo: f } = await this.getAllowedAxes(e, o, s), v = o.components[this.componentName], P = [];
989
989
  if (this.settings.axesAllowed)
990
990
  for (const O of a) {
@@ -1028,7 +1028,7 @@ var Q = class {
1028
1028
  type: F.valueType,
1029
1029
  spec: F,
1030
1030
  annotations: F.annotations,
1031
- isSubsetFilter: ((h = F.annotations) == null ? void 0 : h[J]) === "true",
1031
+ isSubsetFilter: ((x = F.annotations) == null ? void 0 : x[$]) === "true",
1032
1032
  isDiscreteFilter: F.valueType === "String" || ((g = F.annotations) == null ? void 0 : g[ee]) === "true",
1033
1033
  axesToBeFixed: G,
1034
1034
  axesToBeFixedIndexes: Z
@@ -1041,7 +1041,7 @@ var Q = class {
1041
1041
  !ne && !oe && P.push({ value: L });
1042
1042
  }
1043
1043
  }
1044
- return { multipleSelectors: x, required: w, stateConsistency: D, options: P, optionsInfo: f };
1044
+ return { multipleSelectors: h, required: w, stateConsistency: D, options: P, optionsInfo: f };
1045
1045
  }
1046
1046
  };
1047
1047
  De.DefaultSettings = {
@@ -1054,7 +1054,7 @@ De.DefaultSettings = {
1054
1054
  columnsWithExtraAxesAllowed: !0,
1055
1055
  dimensionConsumer: !1
1056
1056
  };
1057
- var I = De, $e = {
1057
+ var I = De, Qe = {
1058
1058
  type: "bubble",
1059
1059
  components: {
1060
1060
  valueSize: { type: "simple", selectorStates: [] },
@@ -1081,7 +1081,7 @@ function ae(t, e) {
1081
1081
  }
1082
1082
  return l;
1083
1083
  }
1084
- var Qe = class extends Q {
1084
+ var Ze = class extends Q {
1085
1085
  constructor() {
1086
1086
  super({
1087
1087
  valueSize: new I({
@@ -1204,12 +1204,12 @@ var Qe = class extends Q {
1204
1204
  }, { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = [
1205
1205
  ...e.components.filters.selectorStates,
1206
1206
  ...e.components.tabBy.selectorStates
1207
- ], h = Y(d), g = d.map((F) => A(F.selectedSource)).filter(B), x = [c, i].filter(B), w = x.map((F) => F.toCanonicalString()), D = await $(t, w), b = [
1207
+ ], x = Y(d), g = d.map((F) => A(F.selectedSource)).filter(B), h = [c, i].filter(B), w = h.map((F) => F.toCanonicalString()), D = await J(t, w), b = [
1208
1208
  e.components.facetBy,
1209
1209
  e.components.x,
1210
1210
  e.components.y,
1211
1211
  e.components.tooltipContent
1212
- ], C = [], a = x.map(() => []), S = [], y = [];
1212
+ ], C = [], a = h.map(() => []), S = [], y = [];
1213
1213
  for (const { selectedSource: F, fixedAxes: G } of d)
1214
1214
  y.push(...await V(
1215
1215
  t,
@@ -1237,9 +1237,9 @@ var Qe = class extends Q {
1237
1237
  K && C.push(K);
1238
1238
  }
1239
1239
  const f = await t.pFrameProvider.getTableOuterJoin(
1240
- [...x, ...y, ...g],
1240
+ [...h, ...y, ...g],
1241
1241
  C,
1242
- h,
1242
+ x,
1243
1243
  !0,
1244
1244
  a,
1245
1245
  S
@@ -1279,7 +1279,7 @@ var Qe = class extends Q {
1279
1279
  type: "column",
1280
1280
  value: s,
1281
1281
  label: await T(t, s, [])
1282
- }, d = e.components.x.selectorStates.map(({ selectedSource: C }) => C).join(", "), g = e.components.y.selectorStates.map(({ selectedSource: C }) => C).join(", "), x = await Promise.all(e.components.facetBy.selectorStates.map(async (C) => {
1282
+ }, d = e.components.x.selectorStates.map(({ selectedSource: C }) => C).join(", "), g = e.components.y.selectorStates.map(({ selectedSource: C }) => C).join(", "), h = await Promise.all(e.components.facetBy.selectorStates.map(async (C) => {
1283
1283
  var a, S;
1284
1284
  return {
1285
1285
  type: "column",
@@ -1313,14 +1313,14 @@ var Qe = class extends Q {
1313
1313
  label: D,
1314
1314
  valueLabels: "yLabels"
1315
1315
  },
1316
- facetBy: x,
1316
+ facetBy: h,
1317
1317
  tooltips: {
1318
1318
  show: !0,
1319
1319
  content: b
1320
1320
  }
1321
1321
  };
1322
1322
  }
1323
- }, Ze = {
1323
+ }, et = {
1324
1324
  type: "histogram",
1325
1325
  components: {
1326
1326
  value: { type: "simple", selectorStates: [] },
@@ -1330,7 +1330,7 @@ var Qe = class extends Q {
1330
1330
  facetBy: { type: "simple", selectorStates: [] }
1331
1331
  },
1332
1332
  dividedAxes: {}
1333
- }, et = class extends Q {
1333
+ }, tt = class extends Q {
1334
1334
  constructor() {
1335
1335
  super(
1336
1336
  {
@@ -1409,32 +1409,32 @@ var Qe = class extends Q {
1409
1409
  }, { linkerColumnsMap: c, compositeLinkerMap: i } = await X(t), p = [
1410
1410
  ...e.components.filters.selectorStates,
1411
1411
  ...e.components.tabBy.selectorStates
1412
- ], u = Y(p), m = p.map((a) => A(a.selectedSource)).filter(B), d = [l], h = await $(t, d), g = [e.components.facetBy, e.components.grouping], x = [], w = [[]], D = [], b = [];
1412
+ ], u = Y(p), m = p.map((a) => A(a.selectedSource)).filter(B), d = [l], x = await J(t, d), g = [e.components.facetBy, e.components.grouping], h = [], w = [[]], D = [], b = [];
1413
1413
  for (const { selectedSource: a, fixedAxes: S } of p)
1414
1414
  b.push(
1415
- ...await V(t, c, i, h, a, S)
1415
+ ...await V(t, c, i, x, a, S)
1416
1416
  ), w.push(
1417
1417
  (S ?? []).map(({ axisIdx: y, axisValue: f }) => ({ idx: y, value: f }))
1418
1418
  );
1419
1419
  for (const a of g)
1420
1420
  for (const { selectedSource: S, fixedAxes: y } of a.selectorStates) {
1421
- x.push(A(S)), D.push(
1421
+ h.push(A(S)), D.push(
1422
1422
  (y ?? []).map(({ axisIdx: v, axisValue: P }) => ({ idx: v, value: P }))
1423
1423
  ), b.push(
1424
- ...await V(t, c, i, h, S, y)
1424
+ ...await V(t, c, i, x, S, y)
1425
1425
  );
1426
1426
  const f = await k(t, S, d);
1427
- f && x.push(f);
1427
+ f && h.push(f);
1428
1428
  }
1429
1429
  const C = await t.pFrameProvider.getTableOuterJoin(
1430
1430
  [s, ...b, ...m],
1431
- x,
1431
+ h,
1432
1432
  u,
1433
1433
  !0,
1434
1434
  w,
1435
1435
  D
1436
1436
  );
1437
- return x.forEach((a) => {
1437
+ return h.forEach((a) => {
1438
1438
  const S = a.toCanonicalString();
1439
1439
  r.values[S] = B(a) ? C.columnsData[S] : C.axesData[S];
1440
1440
  }), r.values[s.toCanonicalString()] = C.columnsData[s.toCanonicalString()], { byColumns: r };
@@ -1477,7 +1477,7 @@ var Qe = class extends Q {
1477
1477
  grouping: p
1478
1478
  };
1479
1479
  }
1480
- }, tt = {
1480
+ }, nt = {
1481
1481
  type: "discrete",
1482
1482
  components: {
1483
1483
  y: { type: "simple", selectorStates: [] },
@@ -1488,7 +1488,7 @@ var Qe = class extends Q {
1488
1488
  secondaryGrouping: { type: "simple", selectorStates: [] }
1489
1489
  },
1490
1490
  dividedAxes: {}
1491
- }, nt = class extends Q {
1491
+ }, ot = class extends Q {
1492
1492
  constructor() {
1493
1493
  super(
1494
1494
  {
@@ -1572,7 +1572,7 @@ var Qe = class extends Q {
1572
1572
  }, { linkerColumnsMap: r, compositeLinkerMap: c } = await X(t), i = [
1573
1573
  ...e.components.filters.selectorStates,
1574
1574
  ...e.components.tabBy.selectorStates
1575
- ], p = Y(i), u = i.map((C) => A(C.selectedSource)).filter(B), m = [n], d = await $(t, m), h = [e.components.primaryGrouping, e.components.secondaryGrouping, e.components.facetBy], g = [], x = [[]], w = [], D = [];
1575
+ ], p = Y(i), u = i.map((C) => A(C.selectedSource)).filter(B), m = [n], d = await J(t, m), x = [e.components.primaryGrouping, e.components.secondaryGrouping, e.components.facetBy], g = [], h = [[]], w = [], D = [];
1576
1576
  for (const { selectedSource: C, fixedAxes: a } of i)
1577
1577
  D.push(...await V(
1578
1578
  t,
@@ -1581,10 +1581,10 @@ var Qe = class extends Q {
1581
1581
  d,
1582
1582
  C,
1583
1583
  a
1584
- )), x.push(
1584
+ )), h.push(
1585
1585
  (a ?? []).map(({ axisIdx: S, axisValue: y }) => ({ idx: S, value: y }))
1586
1586
  );
1587
- for (const C of h)
1587
+ for (const C of x)
1588
1588
  for (const { selectedSource: a, fixedAxes: S } of C.selectorStates) {
1589
1589
  g.push(A(a)), w.push(
1590
1590
  (S ?? []).map(({ axisIdx: f, axisValue: v }) => ({ idx: f, value: v }))
@@ -1604,7 +1604,7 @@ var Qe = class extends Q {
1604
1604
  g,
1605
1605
  p,
1606
1606
  !0,
1607
- x,
1607
+ h,
1608
1608
  w
1609
1609
  );
1610
1610
  return g.forEach((C) => {
@@ -1655,10 +1655,10 @@ var Qe = class extends Q {
1655
1655
  };
1656
1656
  }
1657
1657
  const u = await Promise.all(e.components.facetBy.selectorStates.map(async (m) => {
1658
- var d, h;
1658
+ var d, x;
1659
1659
  return {
1660
1660
  type: "column",
1661
- value: (h = (d = await k(t, m.selectedSource, c)) == null ? void 0 : d.toCanonicalString()) != null ? h : m.selectedSource,
1661
+ value: (x = (d = await k(t, m.selectedSource, c)) == null ? void 0 : d.toCanonicalString()) != null ? x : m.selectedSource,
1662
1662
  label: await T(t, m.selectedSource, c)
1663
1663
  };
1664
1664
  }));
@@ -1670,7 +1670,7 @@ var Qe = class extends Q {
1670
1670
  facetBy: u
1671
1671
  };
1672
1672
  }
1673
- }, ot = {
1673
+ }, st = {
1674
1674
  type: "heatmap",
1675
1675
  components: {
1676
1676
  value: { type: "simple", selectorStates: [] },
@@ -1703,7 +1703,7 @@ function re(t, e) {
1703
1703
  }
1704
1704
  return l;
1705
1705
  }
1706
- var st = class extends Q {
1706
+ var lt = class extends Q {
1707
1707
  constructor() {
1708
1708
  super(
1709
1709
  {
@@ -1901,7 +1901,7 @@ var st = class extends Q {
1901
1901
  }, { linkerColumnsMap: c, compositeLinkerMap: i } = await X(t), p = [
1902
1902
  ...e.components.filters.selectorStates,
1903
1903
  ...e.components.tabBy.selectorStates
1904
- ], u = Y(p), m = p.map((L) => A(L.selectedSource)).filter(B), d = [l], h = await $(t, d), g = [
1904
+ ], u = Y(p), m = p.map((L) => A(L.selectedSource)).filter(B), d = [l], x = await J(t, d), g = [
1905
1905
  e.components.facetBy,
1906
1906
  e.components.annotationsX,
1907
1907
  e.components.annotationsY,
@@ -1910,13 +1910,13 @@ var st = class extends Q {
1910
1910
  e.components.xGroupBy,
1911
1911
  e.components.yGroupBy,
1912
1912
  e.components.tooltipContent
1913
- ], x = [], w = [[]], D = [], b = [];
1913
+ ], h = [], w = [[]], D = [], b = [];
1914
1914
  for (const { selectedSource: L, fixedAxes: E } of p)
1915
1915
  b.push(...await V(
1916
1916
  t,
1917
1917
  c,
1918
1918
  i,
1919
- h,
1919
+ x,
1920
1920
  L,
1921
1921
  E
1922
1922
  )), w.push(
@@ -1924,28 +1924,28 @@ var st = class extends Q {
1924
1924
  );
1925
1925
  for (const L of g)
1926
1926
  for (const { selectedSource: E, fixedAxes: F } of L.selectorStates) {
1927
- x.push(A(E)), D.push(
1927
+ h.push(A(E)), D.push(
1928
1928
  (F ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
1929
1929
  ), b.push(...await V(
1930
1930
  t,
1931
1931
  c,
1932
1932
  i,
1933
- h,
1933
+ x,
1934
1934
  E,
1935
1935
  F
1936
1936
  ));
1937
1937
  const G = await k(t, E, d);
1938
- G && x.push(G);
1938
+ G && h.push(G);
1939
1939
  }
1940
1940
  const C = await t.pFrameProvider.getTableOuterJoin(
1941
1941
  [s, ...b, ...m],
1942
- x,
1942
+ h,
1943
1943
  u,
1944
1944
  !0,
1945
1945
  w,
1946
1946
  D
1947
1947
  );
1948
- x.forEach((L) => {
1948
+ h.forEach((L) => {
1949
1949
  const E = L.toCanonicalString();
1950
1950
  r.values[E] = B(L) ? C.columnsData[E] : C.axesData[E];
1951
1951
  }), r.values[s.toCanonicalString()] = C.columnsData[s.toCanonicalString()];
@@ -2002,7 +2002,7 @@ var st = class extends Q {
2002
2002
  valueLabels: (y = (S = await k(t, a.selectedSource, s)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
2003
2003
  };
2004
2004
  })
2005
- ), h = await Promise.all(
2005
+ ), x = await Promise.all(
2006
2006
  e.components.yGroupBy.selectorStates.map(async (a) => {
2007
2007
  var S, y;
2008
2008
  return {
@@ -2012,7 +2012,7 @@ var st = class extends Q {
2012
2012
  valueLabels: (y = (S = await k(t, a.selectedSource, s)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
2013
2013
  };
2014
2014
  })
2015
- ), g = await t.pFrameProvider.getColumnSpecById(l), x = await Promise.all(
2015
+ ), g = await t.pFrameProvider.getColumnSpecById(l), h = await Promise.all(
2016
2016
  e.components.annotationsX.selectorStates.map(async (a) => {
2017
2017
  var S, y;
2018
2018
  const f = a.selectedSource, v = A(f), P = B(v) ? await t.pFrameProvider.getColumnSpecById(v) : (y = (S = g == null ? void 0 : g.axesSpec) == null ? void 0 : S.find(
@@ -2082,15 +2082,15 @@ var st = class extends Q {
2082
2082
  },
2083
2083
  facetBy: m,
2084
2084
  xGroupBy: d,
2085
- yGroupBy: h,
2086
- annotations: [...x, ...w],
2085
+ yGroupBy: x,
2086
+ annotations: [...h, ...w],
2087
2087
  tooltips: {
2088
2088
  show: !0,
2089
2089
  content: C
2090
2090
  }
2091
2091
  };
2092
2092
  }
2093
- }, lt = {
2093
+ }, at = {
2094
2094
  type: "scatterplot",
2095
2095
  components: {
2096
2096
  x: { type: "simple", selectorStates: [] },
@@ -2106,7 +2106,7 @@ var st = class extends Q {
2106
2106
  tooltipContent: { type: "simple", selectorStates: [] }
2107
2107
  },
2108
2108
  dividedAxes: {}
2109
- }, at = class extends Q {
2109
+ }, rt = class extends Q {
2110
2110
  constructor() {
2111
2111
  super(
2112
2112
  {
@@ -2265,10 +2265,10 @@ var st = class extends Q {
2265
2265
  }, { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = [
2266
2266
  ...e.components.filters.selectorStates,
2267
2267
  ...e.components.tabBy.selectorStates
2268
- ], h = Y(d), g = d.map((v) => A(v.selectedSource)).filter(B), x = [c, i].filter(B).map((v) => v.toCanonicalString());
2269
- if (x.length === 0)
2268
+ ], x = Y(d), g = d.map((v) => A(v.selectedSource)).filter(B), h = [c, i].filter(B).map((v) => v.toCanonicalString());
2269
+ if (h.length === 0)
2270
2270
  throw Error("One of X and Y should be a column");
2271
- const w = await $(t, x), D = [c, i, ...g], b = [], C = [[], []], a = [], S = [];
2271
+ const w = await J(t, h), D = [c, i, ...g], b = [], C = [[], []], a = [], S = [];
2272
2272
  for (const { selectedSource: v, fixedAxes: P } of d)
2273
2273
  S.push(...await V(
2274
2274
  t,
@@ -2301,13 +2301,13 @@ var st = class extends Q {
2301
2301
  P,
2302
2302
  O
2303
2303
  ));
2304
- const N = await k(t, P, x);
2304
+ const N = await k(t, P, h);
2305
2305
  N && b.push(N);
2306
2306
  }
2307
2307
  const f = await t.pFrameProvider.getTableOuterJoin(
2308
2308
  [c, i, ...S, ...g],
2309
2309
  b,
2310
- h,
2310
+ x,
2311
2311
  !1,
2312
2312
  C,
2313
2313
  a
@@ -2330,7 +2330,7 @@ var st = class extends Q {
2330
2330
  type: "column",
2331
2331
  value: c,
2332
2332
  label: await T(t, c, u)
2333
- }, h = {
2333
+ }, x = {
2334
2334
  type: "column",
2335
2335
  value: "key"
2336
2336
  }, g = await Promise.all(
@@ -2341,12 +2341,12 @@ var st = class extends Q {
2341
2341
  value: (y = (S = await k(t, a.selectedSource, u)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
2342
2342
  };
2343
2343
  })
2344
- ), x = ie.uniq([
2344
+ ), h = ie.uniq([
2345
2345
  ...e.components.grouping.selectorStates.map((a) => a.selectedSource),
2346
2346
  ...e.components.size.selectorStates.map((a) => a.selectedSource),
2347
2347
  ...e.components.shape.selectorStates.map((a) => a.selectedSource)
2348
2348
  ]), w = await Promise.all(
2349
- x.map(async (a) => {
2349
+ h.map(async (a) => {
2350
2350
  var S, y;
2351
2351
  return {
2352
2352
  type: "column",
@@ -2385,7 +2385,7 @@ var st = class extends Q {
2385
2385
  type: "scatterplot",
2386
2386
  x: m,
2387
2387
  y: d,
2388
- keyColumn: h,
2388
+ keyColumn: x,
2389
2389
  facetBy: g,
2390
2390
  grouping: w,
2391
2391
  label: b,
@@ -2396,7 +2396,7 @@ var st = class extends Q {
2396
2396
  }
2397
2397
  };
2398
2398
  }
2399
- }, rt = {
2399
+ }, ct = {
2400
2400
  type: "scatterplot-umap",
2401
2401
  components: {
2402
2402
  x: { type: "simple", selectorStates: [] },
@@ -2411,7 +2411,7 @@ var st = class extends Q {
2411
2411
  size: { type: "simple", selectorStates: [] }
2412
2412
  },
2413
2413
  dividedAxes: {}
2414
- }, ct = class extends Q {
2414
+ }, it = class extends Q {
2415
2415
  constructor() {
2416
2416
  super(
2417
2417
  {
@@ -2562,10 +2562,10 @@ var st = class extends Q {
2562
2562
  }, { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = [
2563
2563
  ...e.components.filters.selectorStates,
2564
2564
  ...e.components.tabBy.selectorStates
2565
- ], h = Y(d), g = d.map((v) => A(v.selectedSource)).filter(B), x = [c, i].filter(B).map((v) => v.toCanonicalString());
2566
- if (x.length === 0)
2565
+ ], x = Y(d), g = d.map((v) => A(v.selectedSource)).filter(B), h = [c, i].filter(B).map((v) => v.toCanonicalString());
2566
+ if (h.length === 0)
2567
2567
  throw Error("One of X and Y should be a column");
2568
- const w = await $(t, x), D = [c, i, ...g], b = [], C = [[], []], a = [], S = [];
2568
+ const w = await J(t, h), D = [c, i, ...g], b = [], C = [[], []], a = [], S = [];
2569
2569
  for (const { selectedSource: v, fixedAxes: P } of d)
2570
2570
  S.push(...await V(
2571
2571
  t,
@@ -2597,13 +2597,13 @@ var st = class extends Q {
2597
2597
  P,
2598
2598
  O
2599
2599
  ));
2600
- const N = await k(t, P, x);
2600
+ const N = await k(t, P, h);
2601
2601
  N && b.push(N);
2602
2602
  }
2603
2603
  const f = await t.pFrameProvider.getTableOuterJoin(
2604
2604
  [c, i, ...S, ...g],
2605
2605
  b,
2606
- h,
2606
+ x,
2607
2607
  !1,
2608
2608
  C,
2609
2609
  a
@@ -2629,7 +2629,7 @@ var st = class extends Q {
2629
2629
  type: "column",
2630
2630
  value: c,
2631
2631
  label: await T(t, c, u)
2632
- }, h = {
2632
+ }, x = {
2633
2633
  type: "column",
2634
2634
  value: "key"
2635
2635
  }, g = await Promise.all(
@@ -2640,11 +2640,11 @@ var st = class extends Q {
2640
2640
  value: (y = (S = await k(t, a.selectedSource, u)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
2641
2641
  };
2642
2642
  })
2643
- ), x = ie.uniq([
2643
+ ), h = ie.uniq([
2644
2644
  ...e.components.grouping.selectorStates.map((a) => a.selectedSource),
2645
2645
  ...e.components.size.selectorStates.map((a) => a.selectedSource)
2646
2646
  ]), w = await Promise.all(
2647
- x.map(async (a) => {
2647
+ h.map(async (a) => {
2648
2648
  var S, y;
2649
2649
  return {
2650
2650
  type: "column",
@@ -2683,7 +2683,7 @@ var st = class extends Q {
2683
2683
  type: "scatterplot-umap",
2684
2684
  x: m,
2685
2685
  y: d,
2686
- keyColumn: h,
2686
+ keyColumn: x,
2687
2687
  facetBy: g,
2688
2688
  grouping: w,
2689
2689
  label: b,
@@ -2694,7 +2694,7 @@ var st = class extends Q {
2694
2694
  }
2695
2695
  };
2696
2696
  }
2697
- }, me = "pl7.app/dendrogram/nodeId", de = "id", it = {
2697
+ }, me = "pl7.app/dendrogram/nodeId", de = "id", ut = {
2698
2698
  type: "dendro",
2699
2699
  components: {
2700
2700
  value: { type: "simple", selectorStates: [] },
@@ -2714,7 +2714,7 @@ var st = class extends Q {
2714
2714
  heatmapGroup: { type: "simple", selectorStates: [] }
2715
2715
  },
2716
2716
  dividedAxes: {}
2717
- }, ut = class extends Q {
2717
+ }, pt = class extends Q {
2718
2718
  constructor() {
2719
2719
  super(
2720
2720
  {
@@ -2914,7 +2914,7 @@ var st = class extends Q {
2914
2914
  ]), p = [
2915
2915
  ...e.components.filters.selectorStates.map((a) => A(a.selectedSource)),
2916
2916
  ...e.components.tabBy.selectorStates.map((a) => A(a.selectedSource))
2917
- ].filter(B), u = [l], m = await $(t, u), d = [], h = [], g = [], x = [e.components.value], w = [
2917
+ ].filter(B), u = [l], m = await J(t, u), d = [], x = [], g = [], h = [e.components.value], w = [
2918
2918
  e.components.tableContent,
2919
2919
  // next components can content data mapped on tree
2920
2920
  e.components.labels,
@@ -2923,7 +2923,7 @@ var st = class extends Q {
2923
2923
  e.components.nodeShape,
2924
2924
  e.components.lineColor
2925
2925
  ], D = {};
2926
- for (const a of x)
2926
+ for (const a of h)
2927
2927
  for (const { selectedSource: S, fixedAxes: y } of a.selectorStates) {
2928
2928
  g.push(...await V(
2929
2929
  t,
@@ -2947,15 +2947,15 @@ var st = class extends Q {
2947
2947
  y
2948
2948
  ));
2949
2949
  const f = await k(t, S, u), v = f ?? A(S);
2950
- D[S] = v.toCanonicalString(), h.push(v);
2950
+ D[S] = v.toCanonicalString(), x.push(v);
2951
2951
  }
2952
2952
  const b = await t.pFrameProvider.getTableOuterJoin(
2953
2953
  [...d, ...p, ...g],
2954
- h,
2954
+ x,
2955
2955
  i,
2956
2956
  !1
2957
2957
  );
2958
- for (const a of [...d, ...h]) {
2958
+ for (const a of [...d, ...x]) {
2959
2959
  const S = a.toCanonicalString(), y = D[a.toCanonicalString()];
2960
2960
  n[y] = {
2961
2961
  data: B(a) ? b.columnsData[S] : b.axesData[S],
@@ -2987,7 +2987,7 @@ var st = class extends Q {
2987
2987
  }, u = [
2988
2988
  ...e.components.filters.selectorStates,
2989
2989
  ...e.components.tabBy.selectorStates
2990
- ], m = Y(u), d = u.map((y) => A(y.selectedSource)).filter(B), h = [c, i].filter(B).map((y) => y.toCanonicalString()), g = [], x = [], w = [], D = [], b = [
2990
+ ], m = Y(u), d = u.map((y) => A(y.selectedSource)).filter(B), x = [c, i].filter(B).map((y) => y.toCanonicalString()), g = [], h = [], w = [], D = [], b = [
2991
2991
  e.components.value,
2992
2992
  e.components.height,
2993
2993
  e.components.labels,
@@ -3008,7 +3008,7 @@ var st = class extends Q {
3008
3008
  g.push(A(f)), w.push(
3009
3009
  (v ?? []).map(({ axisIdx: O, axisValue: N }) => ({ idx: O, value: N }))
3010
3010
  );
3011
- const P = await k(t, f, h);
3011
+ const P = await k(t, f, x);
3012
3012
  P && g.push(P);
3013
3013
  }
3014
3014
  u.forEach(({ fixedAxes: y }) => {
@@ -3018,21 +3018,21 @@ var st = class extends Q {
3018
3018
  });
3019
3019
  for (const y of C)
3020
3020
  for (const { selectedSource: f, fixedAxes: v } of y.selectorStates) {
3021
- x.push(A(f)), D.push(
3021
+ h.push(A(f)), D.push(
3022
3022
  (v ?? []).map(({ axisIdx: O, axisValue: N }) => ({ idx: O, value: N }))
3023
3023
  );
3024
- const P = await k(t, f, h);
3025
- P && x.push(P);
3024
+ const P = await k(t, f, x);
3025
+ P && h.push(P);
3026
3026
  }
3027
3027
  const a = await t.pFrameProvider.getTableOuterJoin(
3028
3028
  [...g, ...d],
3029
- x,
3029
+ h,
3030
3030
  m,
3031
3031
  !1,
3032
3032
  w,
3033
3033
  D
3034
3034
  );
3035
- [...g, ...x].forEach((y) => {
3035
+ [...g, ...h].forEach((y) => {
3036
3036
  const f = y.toCanonicalString(), v = B(y) ? a.columnsData[f] : a.axesData[f];
3037
3037
  p.values[f] = [], p.values[f] = v;
3038
3038
  });
@@ -3090,10 +3090,10 @@ var st = class extends Q {
3090
3090
  }
3091
3091
  };
3092
3092
  }
3093
- let h, g, x;
3093
+ let x, g, h;
3094
3094
  if (e.components.heatmapAnnotation.selectorStates.length && e.components.heatmapAxis.selectorStates.length) {
3095
3095
  const w = e.components.heatmapAnnotation.selectorStates[0].selectedSource;
3096
- h = {
3096
+ x = {
3097
3097
  type: "column",
3098
3098
  value: w,
3099
3099
  label: await T(t, w, []),
@@ -3105,7 +3105,7 @@ var st = class extends Q {
3105
3105
  value: D,
3106
3106
  label: await T(t, D, [w]),
3107
3107
  valueLabels: (l = await k(t, D, [w])) == null ? void 0 : l.toCanonicalString()
3108
- }, x = await Promise.all(
3108
+ }, h = await Promise.all(
3109
3109
  e.components.heatmapGroup.selectorStates.map(async (b) => {
3110
3110
  var C;
3111
3111
  return {
@@ -3118,7 +3118,7 @@ var st = class extends Q {
3118
3118
  );
3119
3119
  } else if (e.components.heatmapForSequence.selectorStates.length) {
3120
3120
  const w = e.components.heatmapForSequence.selectorStates[0].selectedSource;
3121
- h = {
3121
+ x = {
3122
3122
  type: "column",
3123
3123
  value: w,
3124
3124
  label: await T(t, w, [])
@@ -3131,29 +3131,22 @@ var st = class extends Q {
3131
3131
  height: u,
3132
3132
  labels: m,
3133
3133
  aes: d,
3134
- heatmapAnnotation: h,
3134
+ heatmapAnnotation: x,
3135
3135
  heatmapAxis: g,
3136
- heatmapGroup: x
3136
+ heatmapGroup: h
3137
3137
  };
3138
3138
  }
3139
3139
  }, ge = 1e6;
3140
3140
  function ce(t, e) {
3141
3141
  if (t === "String")
3142
3142
  return e.data;
3143
- if (typeof e.data[0] == "bigint") {
3144
- const o = new Array(e.data.length);
3145
- for (let n = 0; n < e.data.length; n++)
3146
- o[n] = e.data[n] === BigInt(-9007199254740991) ? null : Number(e.data[n]);
3147
- return o;
3148
- }
3149
- for (let o = 0; o < e.data.length; o++) {
3150
- const n = e.data[o];
3151
- t === "Int" && n === -2147483648 || (t === "Double" || t === "Float") && isNaN(n) ? e.data[o] = null : e.data[o] = Number(e.data[o]);
3152
- }
3153
- return e.data;
3143
+ const o = new Array(e.data.length);
3144
+ for (let n = 0; n < e.data.length; n++)
3145
+ o[n] = _e(e, n, { absent: null, na: null });
3146
+ return o;
3154
3147
  }
3155
3148
  var H = !1;
3156
- var pt = class {
3149
+ var mt = class {
3157
3150
  constructor(t, e) {
3158
3151
  this.pframeHandle = t, this.pframeDriver = e;
3159
3152
  }
@@ -3244,11 +3237,11 @@ var pt = class {
3244
3237
  type: n ? "inner" : "full",
3245
3238
  entries: r.map((p, u) => {
3246
3239
  var m;
3247
- const d = (m = l[u]) == null ? void 0 : m.map((h) => ({
3240
+ const d = (m = l[u]) == null ? void 0 : m.map((x) => ({
3248
3241
  type: "constant",
3249
- axisIndex: h.idx,
3250
- constant: h.value
3251
- })).filter((h) => h.constant !== void 0);
3242
+ axisIndex: x.idx,
3243
+ constant: x.value
3244
+ })).filter((x) => x.constant !== void 0);
3252
3245
  return d != null && d.length ? {
3253
3246
  type: "slicedColumn",
3254
3247
  newId: p.name,
@@ -3262,11 +3255,11 @@ var pt = class {
3262
3255
  },
3263
3256
  secondary: c.map((p, u) => {
3264
3257
  var m;
3265
- const d = (m = s[u]) == null ? void 0 : m.map((h) => ({
3258
+ const d = (m = s[u]) == null ? void 0 : m.map((x) => ({
3266
3259
  type: "constant",
3267
- axisIndex: h.idx,
3268
- constant: h.value
3269
- })).filter((h) => h.constant !== void 0);
3260
+ axisIndex: x.idx,
3261
+ constant: x.value
3262
+ })).filter((x) => x.constant !== void 0);
3270
3263
  return d != null && d.length ? {
3271
3264
  type: "slicedColumn",
3272
3265
  newId: p.name,
@@ -3282,29 +3275,29 @@ var pt = class {
3282
3275
  sorting: []
3283
3276
  };
3284
3277
  try {
3285
- const p = Date.now(), u = await this.pframeDriver.calculateTableData(this.pframeHandle, i), m = u.filter((h) => h.spec.type === "axis"), d = u.filter((h) => h.spec.type === "column");
3278
+ const p = Date.now(), u = await this.pframeDriver.calculateTableData(this.pframeHandle, i), m = u.filter((x) => x.spec.type === "axis"), d = u.filter((x) => x.spec.type === "column");
3286
3279
  return {
3287
- axesData: m.reduce((h, g) => {
3288
- const x = _.fromAxisSpec(g.spec.spec);
3289
- return h[x.toCanonicalString()] = ce(x.type, g.data), h;
3280
+ axesData: m.reduce((x, g) => {
3281
+ const h = _.fromAxisSpec(g.spec.spec);
3282
+ return x[h.toCanonicalString()] = ce(h.type, g.data), x;
3290
3283
  }, {}),
3291
- columnsData: d.reduce((h, g) => {
3292
- const x = g.spec.spec, w = new W({
3284
+ columnsData: d.reduce((x, g) => {
3285
+ const h = g.spec.spec, w = new W({
3293
3286
  name: g.spec.id,
3294
- type: x.valueType
3287
+ type: h.valueType
3295
3288
  });
3296
- return h[w.toCanonicalString()] = ce(w.type, g.data), h;
3289
+ return x[w.toCanonicalString()] = ce(w.type, g.data), x;
3297
3290
  }, {}),
3298
- columnSpecs: d.reduce((h, g) => {
3299
- const x = g.spec.spec, w = new W({
3291
+ columnSpecs: d.reduce((x, g) => {
3292
+ const h = g.spec.spec, w = new W({
3300
3293
  name: g.spec.id,
3301
- type: x.valueType
3294
+ type: h.valueType
3302
3295
  });
3303
- return h[w.toCanonicalString()] = x, h;
3296
+ return x[w.toCanonicalString()] = h, x;
3304
3297
  }, {}),
3305
- axesSpecs: m.reduce((h, g) => {
3306
- const x = g.spec.spec, w = _.fromAxisSpec(x);
3307
- return h[w.toCanonicalString()] = x, h;
3298
+ axesSpecs: m.reduce((x, g) => {
3299
+ const h = g.spec.spec, w = _.fromAxisSpec(h);
3300
+ return x[w.toCanonicalString()] = h, x;
3308
3301
  }, {})
3309
3302
  };
3310
3303
  } catch (p) {
@@ -3382,31 +3375,31 @@ var pt = class {
3382
3375
  throw console.error("PFrame: findColumns error"), l;
3383
3376
  }
3384
3377
  }
3385
- }, ft = class {
3378
+ }, gt = class {
3386
3379
  constructor(t, e, o = (n, l) => l ?? n) {
3387
- this.labelsModifier = o, this.pFrameProvider = new pt(t, e);
3380
+ this.labelsModifier = o, this.pFrameProvider = new mt(t, e);
3388
3381
  }
3389
3382
  }, Pe = {
3390
3383
  controllers: {
3391
- discrete: new nt(),
3392
- scatterplot: new at(),
3393
- "scatterplot-umap": new ct(),
3394
- heatmap: new st(),
3395
- dendro: new ut(),
3396
- histogram: new et(),
3397
- bubble: new Qe()
3384
+ discrete: new ot(),
3385
+ scatterplot: new rt(),
3386
+ "scatterplot-umap": new it(),
3387
+ heatmap: new lt(),
3388
+ dendro: new pt(),
3389
+ histogram: new tt(),
3390
+ bubble: new Ze()
3398
3391
  },
3399
3392
  initialStates: {
3400
- discrete: tt,
3401
- scatterplot: lt,
3402
- "scatterplot-umap": rt,
3403
- heatmap: ot,
3404
- dendro: it,
3405
- histogram: Ze,
3406
- bubble: $e
3393
+ discrete: nt,
3394
+ scatterplot: at,
3395
+ "scatterplot-umap": ct,
3396
+ heatmap: st,
3397
+ dendro: ut,
3398
+ histogram: et,
3399
+ bubble: Qe
3407
3400
  }
3408
3401
  };
3409
- function gt(t) {
3402
+ function xt(t) {
3410
3403
  return Pe.controllers[t];
3411
3404
  }
3412
3405
  function ht(t) {
@@ -3414,15 +3407,15 @@ function ht(t) {
3414
3407
  }
3415
3408
  export {
3416
3409
  _ as AxisId,
3417
- Qe as BubbleStateController,
3410
+ Ze as BubbleStateController,
3418
3411
  W as ColumnId,
3419
- ft as DemoDataStore,
3420
- ut as DendroStateController,
3421
- nt as DiscreteStateController,
3422
- st as HeatmapStateController,
3423
- at as ScatterplotStateController,
3412
+ gt as DemoDataStore,
3413
+ pt as DendroStateController,
3414
+ ot as DiscreteStateController,
3415
+ lt as HeatmapStateController,
3416
+ rt as ScatterplotStateController,
3424
3417
  A as columnOrAxisIdFromString,
3425
- gt as getControllerByType,
3418
+ xt as getControllerByType,
3426
3419
  ht as getInitialStateByType,
3427
3420
  B as isColumnId
3428
3421
  };