@astrato-io/visualizations 0.9.0 → 0.10.1

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.
Files changed (144) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +7 -3
  3. package/THIRD_PARTY_NOTICES.md +163 -14
  4. package/VISUALIZATION_DEFINITIONS.md +376 -36
  5. package/chunks/{Button-5CxPEACP.js → Button-Dn3rJrYf.js} +4 -4
  6. package/chunks/{CircularProgress-DFS-LQb7.js → CircularProgress-BFeu06Yb.js} +39 -39
  7. package/chunks/FieldTypeIcon-DrMoGpHJ.js +22 -0
  8. package/chunks/{LinearProgress-CjIQfkNA.js → LinearProgress-ClO6GUjN.js} +9 -9
  9. package/chunks/{MenuOption-Cb7B7x6z.js → MenuOption-Czc34u4q.js} +143 -142
  10. package/chunks/{Title-CtFw1bVg.js → Title-BgYnaVTR.js} +22 -22
  11. package/chunks/_createAggregator-BMu9uRax.js +50 -0
  12. package/chunks/{app-filter-bar.compiler-B9775gLJ.js → app-filter-bar.compiler-CVir0wkl.js} +10 -10
  13. package/chunks/bar-layout-C_UgRlVl.js +9 -0
  14. package/chunks/{bar.compiler-B7wlH_Ro.js → bar.compiler-DYuFdi9J.js} +100 -82
  15. package/chunks/{builder-Dxo7D7c6.js → builder-C-TKA-My.js} +70 -37
  16. package/chunks/color-rules-DYJL4fIW.js +15 -0
  17. package/chunks/color-settings-DJFoFTip.js +5 -0
  18. package/chunks/{coloring-B-Wa8D5P.js → coloring-BtnPiQ_o.js} +37 -37
  19. package/chunks/createSimplePaletteValueFilter--zrZxRV9.js +2005 -0
  20. package/chunks/defaults-Dtk7fg3C.js +3 -0
  21. package/chunks/{definitions-DNpzD9tY.js → definitions-CT304NDn.js} +655 -417
  22. package/chunks/{escobar-C4Nm3eJ7.js → escobar-CvEV2ES1.js} +7441 -7127
  23. package/chunks/{extend-preset-BVKFtoe-.js → extend-preset-D9-JP92b.js} +998 -933
  24. package/chunks/{filter.compiler-BlS3zoy_.js → filter.compiler-CXeZznks.js} +7 -7
  25. package/chunks/{filtering-CGuLpg7u.js → filtering-8_bFv-jb.js} +333 -377
  26. package/chunks/handlers-C6CZ0XJA.js +15399 -0
  27. package/chunks/{icon-picker-styles-DYQgVEKG.js → icon-picker-styles-BXiJ1SZS.js} +11 -11
  28. package/chunks/isEqual-D8Ay63xR.js +16 -0
  29. package/chunks/{isFocusVisible-B1_z03UT.js → isFocusVisible-Bu8gGZu5.js} +1 -1
  30. package/chunks/label-format-type-C46pzgx7.js +17 -0
  31. package/chunks/{line.compiler-Bo9i9qag.js → line.compiler-DmHpmQCC.js} +9 -9
  32. package/chunks/{logger-3lng-wOw.js → logger-DdZpR7xZ.js} +79 -72
  33. package/chunks/map.compiler-Q_Y1Pvat.js +343 -0
  34. package/chunks/{metadata-Fmx1swpK.js → metadata-BQm_TXI1.js} +1 -1
  35. package/chunks/{number.compiler-CdLd5aGW.js → number.compiler-DQdg6zTy.js} +7 -7
  36. package/chunks/operations-DKQWuLL7.js +31315 -0
  37. package/chunks/{range-CzO4isKK.js → range-BdhzvYQ_.js} +2 -2
  38. package/chunks/{react-dom-BwZT0N3F.js → react-dom-BGP4tbXV.js} +70 -70
  39. package/chunks/{render-wrappers-CAuvgMxi.js → render-wrappers-BZpyDnJy.js} +1 -1
  40. package/chunks/{requirements-CYpVh65U.js → requirements-e8Fe96ag.js} +60 -58
  41. package/chunks/shared-C_2F90xq.js +1337 -0
  42. package/chunks/standalone-4MsKiqs0.js +355 -0
  43. package/chunks/standalone-B794g9pE.js +1012 -0
  44. package/chunks/{standalone-C6XDHYAM.js → standalone-B8ZSqauS.js} +110 -110
  45. package/chunks/{standalone-5DnapeHH.js → standalone-BA2YXyJS.js} +126 -124
  46. package/chunks/{standalone-CXniic5x.js → standalone-BDrXVxlP.js} +6 -5
  47. package/chunks/{standalone-B6s_xG2u.js → standalone-BE_ONgiG.js} +116 -116
  48. package/chunks/{standalone-CPUiiWNP.js → standalone-BTY3w_JA.js} +37 -37
  49. package/chunks/standalone-BgumbdaJ2.js +357 -0
  50. package/chunks/{standalone-DWPfdP0A.js → standalone-BkbiH-o8.js} +482 -482
  51. package/chunks/standalone-Blh4qejk.js +689 -0
  52. package/chunks/standalone-CXY4FpF7.js +773 -0
  53. package/chunks/{standalone-BvWdpUL3.js → standalone-CY_kjarf.js} +34 -31
  54. package/chunks/{standalone-DuwTOBXH.js → standalone-CaTxAydz.js} +587 -587
  55. package/chunks/{standalone-BDrQMxLi.js → standalone-Cc98Pdr6.js} +1799 -1015
  56. package/chunks/{standalone-DMCwtebn.js → standalone-Cl0TSfqC.js} +125 -125
  57. package/chunks/{standalone-CoQxJ6ov.js → standalone-CsoMmE9T.js} +778 -778
  58. package/chunks/standalone-DH0xTEes.js +2 -0
  59. package/chunks/{standalone-LFVgLhia.js → standalone-DHRalbVO.js} +311 -303
  60. package/chunks/standalone-DNh9NcMa.js +580 -0
  61. package/chunks/standalone-DcnHjNnC.js +2 -0
  62. package/chunks/{standalone-r4ObFvys.js → standalone-DflyWtuR.js} +217 -215
  63. package/chunks/standalone-DrHdGkY7.js +762 -0
  64. package/chunks/standalone-c_rROMtx.js +287 -0
  65. package/chunks/standalone-drcFLeN6.js +6 -0
  66. package/chunks/{standalone-CNkHsynO.js → standalone-wOWRCpdn.js} +54 -56
  67. package/chunks/{standalone-Cu73fzSr.js → standalone-z0o52o5t.js} +5128 -4908
  68. package/chunks/{table.compiler-C1qjqXaT.js → table.compiler-COaHE9VD.js} +18 -18
  69. package/chunks/{useFieldName-mWrD_uk_.js → useFieldName-CdnCWzhd.js} +1 -1
  70. package/chunks/{utils-DYYD4Zzf.js → utils-DganVptf.js} +4758 -4747
  71. package/chunks/{view-7fH6mGmY.js → view-Bzlros43.js} +2021 -1665
  72. package/chunks/{visualization-filters-mVnsnvLP.js → visualization-filters-D7i6oh1Z.js} +3177 -2425
  73. package/chunks/{with-html-element-B0Clt4jY.js → with-html-element-CiIhFEa5.js} +3740 -3547
  74. package/definitions.js +2 -2
  75. package/docs/operations/astrato-app-filter-bar.md +1 -1
  76. package/docs/operations/bar.md +303 -2
  77. package/docs/operations/combo.md +262 -1
  78. package/docs/operations/date-picker.md +1 -1
  79. package/docs/operations/distribution-gauge.md +1 -1
  80. package/docs/operations/dot.md +148 -1
  81. package/docs/operations/filter.md +1 -1
  82. package/docs/operations/gauge.md +1 -1
  83. package/docs/operations/heatMap.md +1 -1
  84. package/docs/operations/histogram.md +262 -1
  85. package/docs/operations/iframe.md +1 -1
  86. package/docs/operations/image.md +1 -1
  87. package/docs/operations/index.md +7 -7
  88. package/docs/operations/line.md +280 -1
  89. package/docs/operations/number.md +1 -1
  90. package/docs/operations/pie.md +1 -1
  91. package/docs/operations/radar.md +1 -1
  92. package/docs/operations/sankey.md +1 -1
  93. package/docs/operations/scatter.md +148 -1
  94. package/docs/operations/shape.md +1 -1
  95. package/docs/operations/simpleTextObject.md +1 -1
  96. package/docs/operations/slider.md +1 -1
  97. package/docs/operations/table.md +374 -157
  98. package/docs/operations/tree.md +1 -1
  99. package/docs/operations/treemap.md +1 -1
  100. package/docs/operations/waterfall.md +1 -1
  101. package/docs/operations/word-cloud.md +1 -1
  102. package/getters.js +2 -2
  103. package/index.js +482 -434
  104. package/metadata.js +2 -2
  105. package/operations.js +5 -5
  106. package/package.json +72 -67
  107. package/src/definitions/index.d.ts +7 -1
  108. package/src/definitions/model/definitions/available-fields.d.ts +2 -2
  109. package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
  110. package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
  111. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +219 -7
  112. package/src/definitions/model/definitions/index.d.ts +2 -1
  113. package/src/definitions/model/definitions/schema-registry.d.ts +305 -0
  114. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +2 -0
  115. package/src/definitions/model/definitions/schemas/common.schema.d.ts +4 -3
  116. package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
  117. package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
  118. package/src/definitions/model/definitions/types/compilation.types.d.ts +9 -1
  119. package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
  120. package/src/definitions/model/definitions/types/index.d.ts +1 -1
  121. package/src/index.d.ts +1 -1
  122. package/src/operations/index.d.ts +1 -1
  123. package/src/types.d.ts +17 -13
  124. package/chunks/FieldTypeIcon-pSVQFemC.js +0 -22
  125. package/chunks/ToggleButton-Br9HCPCv.js +0 -150
  126. package/chunks/color-rules-CN7TcGrC.js +0 -6
  127. package/chunks/color-settings-3VRlf_Vw.js +0 -6
  128. package/chunks/handlers-CMbyj5y1.js +0 -12930
  129. package/chunks/isEqual-DBg_b35N.js +0 -12
  130. package/chunks/label-format-type-weq1XfcX.js +0 -8
  131. package/chunks/operations-HSqnCRvv.js +0 -26324
  132. package/chunks/shared-DFoJxjVN.js +0 -1218
  133. package/chunks/standalone-530a5lvf.js +0 -1003
  134. package/chunks/standalone-B4jrf4KE.js +0 -354
  135. package/chunks/standalone-BMoJXGYe.js +0 -2
  136. package/chunks/standalone-BfvGggeM2.js +0 -355
  137. package/chunks/standalone-CMJJIi9v.js +0 -2
  138. package/chunks/standalone-C_Jd4gkj.js +0 -6
  139. package/chunks/standalone-CiaaibTa.js +0 -518
  140. package/chunks/standalone-DBeXQrwH.js +0 -468
  141. package/chunks/standalone-DpSRmAWx.js +0 -287
  142. package/chunks/standalone-kzAhwH19.js +0 -689
  143. package/chunks/standalone-mb7LwEiq.js +0 -3874
  144. /package/chunks/{src-BOS6SqkZ2.js → src-BOS6SqkZ.js} +0 -0
@@ -1,33 +1,41 @@
1
1
  import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Ca as t, Ds as n, Gn as r, Hi as i, Kt as a, Ta as o, Us as s, Xa as c, _c as l, hi as u, ws as d, zi as f, zr as p } from "./visualization-filters-mVnsnvLP.js";
3
- import { F as m, N as h, Ot as g, ei as _, jr as v, s as y } from "./utils-DYYD4Zzf.js";
4
- import "./logger-3lng-wOw.js";
5
- import { F as b, Ht as x, Kt as S, Tt as C, Vt as w, _n as T, cn as E, dn as D, en as O, et as k, gn as A, hn as j, i as ee, ln as M, mn as N, n as te, rn as ne, st as re, tn as ie, tt as ae, un as P, wt as oe } from "./escobar-C4Nm3eJ7.js";
6
- import { _ as F } from "./MenuOption-Cb7B7x6z.js";
7
- import { a as se, r as ce, t as le } from "./coloring-B-Wa8D5P.js";
8
- import { f as I, r as L, t as ue, u as de } from "./src-D9XogOrc.js";
9
- var fe = /* @__PURE__ */ e(_()), R = /* @__PURE__ */ function(e) {
10
- return e.sankey = "key-sankey", e.labels = "key-labels", e.columnLabels = "key-column-labels", e;
11
- }({}), z = /* @__PURE__ */ function(e) {
12
- return e.NodeFlow = "flow", e.NodeColor = "color", e;
13
- }({}), B = /* @__PURE__ */ function(e) {
14
- return e.ColumnTitleLeft = "columnTitleLeft", e.ColumnTitleCenter = "columnTitleCenter", e.ColumnTitleRight = "columnTitleRight", e.NodeLabelLeft = "nodeLabelLeft", e.NodeLabelCenter = "nodeLabelCenter", e.NodeLabelRight = "nodeLabelRight", e;
15
- }({}), pe = class extends le {
2
+ import { Fc as t, Io as n, Oa as r, Qr as i, do as a, gc as o, in as s, ki as c, ll as l, lo as u, rr as d, sa as f, ws as p, yc as m } from "./visualization-filters-D7i6oh1Z.js";
3
+ import { F as h, N as g, ci as _, jt as v, s as y, zr as b } from "./utils-DganVptf.js";
4
+ import "./logger-DdZpR7xZ.js";
5
+ import { Dt as x, Gt as S, L as C, Ot as w, R as T, Wt as E, Yt as D, _ as O, _n as k, bn as A, dn as j, fn as M, i as ee, in as te, mn as N, n as ne, on as re, pn as P, rn as ie, ut as ae, vn as F, yn as I } from "./escobar-CvEV2ES1.js";
6
+ import { _ as L } from "./MenuOption-Czc34u4q.js";
7
+ import { a as oe, r as se, t as ce } from "./coloring-BtnPiQ_o.js";
8
+ import { f as R, r as z, t as le, u as ue } from "./src-D9XogOrc.js";
9
+ var de = /* @__PURE__ */ e(_()), B = {
10
+ sankey: "key-sankey",
11
+ labels: "key-labels",
12
+ columnLabels: "key-column-labels"
13
+ }, V = {
14
+ NodeFlow: "flow",
15
+ NodeColor: "color"
16
+ }, H = {
17
+ ColumnTitleLeft: "columnTitleLeft",
18
+ ColumnTitleCenter: "columnTitleCenter",
19
+ ColumnTitleRight: "columnTitleRight",
20
+ NodeLabelLeft: "nodeLabelLeft",
21
+ NodeLabelCenter: "nodeLabelCenter",
22
+ NodeLabelRight: "nodeLabelRight"
23
+ }, fe = class extends ce {
16
24
  dimensionIds = [];
17
25
  dimensionColoring = {};
18
- constructor(e, t, n) {
19
- super(e, t, n), this.dimensionIds = [], this.vSpec.dimensions.filter((e) => p(e)).forEach((e) => {
20
- let t = s(e.dataItem);
21
- this.dimensionColoring[t] = e.coloring, this.dimensionIds.push(t);
26
+ constructor(e, n, r) {
27
+ super(e, n, r), this.dimensionIds = [], this.vSpec.dimensions.filter((e) => i(e)).forEach((e) => {
28
+ let n = t(e.dataItem);
29
+ this.dimensionColoring[n] = e.coloring, this.dimensionIds.push(n);
22
30
  });
23
31
  }
24
32
  getColorByScale(e, t = {}) {
25
- let { ref: r } = t, i = this.getDatumFromProp(e, r, "color"), a = i?.value, o = e.resources.scale(i.source?.field ?? i.label), s = i.source?.field, c = s ? this.dimensionColoring[s] : void 0;
26
- if (c?.type === n.Categorical && c.persistentColors === !0) {
27
- let e = o.range();
28
- return e[this.getHash(a) % e.length];
33
+ let { ref: n } = t, r = this.getDatumFromProp(e, n, "color"), i = r?.value, a = e.resources.scale(r.source?.field ?? r.label), o = r.source?.field, s = o ? this.dimensionColoring[o] : void 0;
34
+ if (s?.type === m.Categorical && s.persistentColors === !0) {
35
+ let e = a.range();
36
+ return e[this.getHash(i) % e.length];
29
37
  }
30
- return o(a);
38
+ return a(i);
31
39
  }
32
40
  getDatumFromProp(e, t, n) {
33
41
  return t === this.MAIN_FIELD ? e.datum : e.datum[t || n];
@@ -39,7 +47,7 @@ var fe = /* @__PURE__ */ e(_()), R = /* @__PURE__ */ function(e) {
39
47
  if ([i, ...Object.keys(i).filter((e) => {
40
48
  let t = i[e]?.source?.field;
41
49
  return t !== void 0 && this.dimensionIds.includes(t);
42
- }).map((e) => i[e])].find((e) => e.source?.field === r?.dataItemId ? a === "equals" ? r.value === e.value || r.value === String(e.value) : ce(r, e.value) : !1)) return r.color;
50
+ }).map((e) => i[e])].find((e) => e.source?.field === r?.dataItemId ? a === "equals" ? r.value === e.value || r.value === String(e.value) : se(r, e.value) : !1)) return r.color;
43
51
  }
44
52
  }
45
53
  getFilteredColor() {
@@ -48,7 +56,7 @@ var fe = /* @__PURE__ */ e(_()), R = /* @__PURE__ */ function(e) {
48
56
  getLinkColorDefinition() {
49
57
  return (e) => {
50
58
  if (this.notAffectedItems?.pattern?.length && this.vSpec.staticFilters.ignoreGlobalFilters && this.vSpec.staticFilters.showGlobalFiltersEffect) {
51
- let t = se(e, this.notAffectedItems);
59
+ let t = oe(e, this.notAffectedItems);
52
60
  if (t) return t;
53
61
  }
54
62
  if (this.isColorOverwriteActive()) {
@@ -61,38 +69,38 @@ var fe = /* @__PURE__ */ e(_()), R = /* @__PURE__ */ function(e) {
61
69
  }
62
70
  };
63
71
  }
64
- }, me = (e, t) => e.data.value === t.data.value ? 0 : e.data.value < t.data.value ? 1 : -1, he = (e, t) => e.data.value === t.data.value ? 0 : e.data.value < t.data.value ? -1 : 1, ge = (e, t) => e.data.flow.value === t.data.flow.value ? 0 : e.data.flow.value < t.data.flow.value ? 1 : -1, _e = (e, t) => e.data.flow.value === t.data.flow.value ? 0 : e.data.flow.value < t.data.flow.value ? -1 : 1;
65
- function ve(e, t) {
66
- let n = e.dimensions.filter((e) => p(e)), i = (e.querySettings?.sortingOrder ?? []).map((e) => ({
67
- id: s(e.dataItem),
72
+ }, pe = (e, t) => e.data.value === t.data.value ? 0 : e.data.value < t.data.value ? 1 : -1, me = (e, t) => e.data.value === t.data.value ? 0 : e.data.value < t.data.value ? -1 : 1, he = (e, t) => e.data.flow.value === t.data.flow.value ? 0 : e.data.flow.value < t.data.flow.value ? 1 : -1, ge = (e, t) => e.data.flow.value === t.data.flow.value ? 0 : e.data.flow.value < t.data.flow.value ? -1 : 1;
73
+ function _e(e, n) {
74
+ let r = e.dimensions.filter((e) => i(e)), a = (e.querySettings?.sortingOrder ?? []).map((e) => ({
75
+ id: t(e.dataItem),
68
76
  direction: e.sortDirection,
69
77
  type: e.fieldType
70
- })), a = i.find((e) => e.type === "measure"), o = a ? i.indexOf(a) : -1;
71
- return n.map((n) => {
72
- let c = s(n.dataItem), l;
78
+ })), o = a.find((e) => e.type === "measure"), s = o ? a.indexOf(o) : -1;
79
+ return r.map((r) => {
80
+ let i = t(r.dataItem), c;
73
81
  if (e.sankeySettings.applyDataSortOnNodeColumns) {
74
- let e = i.find((e) => e.id === c), t = e ? i.indexOf(e) : -1;
75
- e && t < o ? l = e.direction === "desc" ? me : he : a && (l = a.direction === "desc" ? ge : _e);
82
+ let e = a.find((e) => e.id === i), t = e ? a.indexOf(e) : -1;
83
+ e && t < s ? c = e.direction === "desc" ? pe : me : o && (c = o.direction === "desc" ? he : ge);
76
84
  }
77
85
  return {
78
- id: c,
79
- sort: l,
80
- isGrouped: r(e.dimensions, e.enableAlternate, t)
86
+ id: i,
87
+ sort: c,
88
+ isGrouped: d(e.dimensions, e.enableAlternate, n)
81
89
  };
82
90
  });
83
91
  }
84
- var ye = (e, t) => {
85
- let n = e.sankeySettings.linkColoring?.opacity ?? .3, r = t.valuePickerMode ?? !1, a = r ? t.valuePickerTargetDataItemId : "";
92
+ var ve = (e, t) => {
93
+ let n = e.sankeySettings.linkColoring?.opacity ?? .3, i = t.valuePickerMode ?? !1, a = i ? t.valuePickerTargetDataItemId : "";
86
94
  return {
87
95
  trigger: [{
88
- on: j.Tap,
89
- action: N.Toggle,
96
+ on: F.Tap,
97
+ action: k.Toggle,
90
98
  globalPropagation: "stop",
91
99
  data: ["", "linkTarget"],
92
100
  contexts: [P.Selection]
93
101
  }, {
94
- on: j.Over,
95
- action: N.Set,
102
+ on: F.Over,
103
+ action: k.Set,
96
104
  globalPropagation: "stop",
97
105
  data: ["", "linkTarget"],
98
106
  contexts: [P.Highlight]
@@ -102,20 +110,20 @@ var ye = (e, t) => {
102
110
  context: P.Selection,
103
111
  data: ["", "linkTarget"],
104
112
  filter: (e) => e.data?.type?.value === "link",
105
- mode: A.Or,
113
+ mode: I.Or,
106
114
  style: { inactive: { opacity: n * .25 } }
107
115
  },
108
116
  {
109
117
  context: P.Selection,
110
118
  data: [""],
111
119
  filter: (e) => e.data?.type?.value === "node",
112
- mode: A.Or,
120
+ mode: I.Or,
113
121
  style: { inactive: { fill: (e) => {
114
122
  let t = e, n = !t.fill || t.fill === "none" || t.fill === "transparent";
115
123
  switch (!0) {
116
124
  case n:
117
- case r && t.data.source.field === a: return t.fill;
118
- default: return O(ie(t.fill), .25);
125
+ case i && t.data.source.field === a: return t.fill;
126
+ default: return ie(te(t.fill), .25);
119
127
  }
120
128
  } } }
121
129
  },
@@ -123,24 +131,24 @@ var ye = (e, t) => {
123
131
  context: P.Highlight,
124
132
  data: [""],
125
133
  filter: (e) => e.data?.type?.value === "node",
126
- mode: A.Or,
134
+ mode: I.Or,
127
135
  style: { active: {
128
- strokeWidth: (e) => r && e.data.source.field !== a ? 0 : 1,
129
- stroke: i.mainDarkNavy
136
+ strokeWidth: (e) => i && e.data.source.field !== a ? 0 : 1,
137
+ stroke: r.mainDarkNavy
130
138
  } }
131
139
  }
132
140
  ]
133
141
  };
134
- }, be = (e, t, n, r, i, a) => {
135
- if (!a) throw Error("Missing Sankey visualization properties");
136
- let o = e.sankeySettings.nodeLabels.placements;
137
- if (!o) throw Error("Missing Sankey node label placements");
138
- let c = e.dimensions.filter((e) => p(e)), l = new pe(e, t, i?.[0]?.itemsNotAffectedByFiltering), u = e.sankeySettings.linkColoring?.opacity ?? .3, d = e.sankeySettings.linkColoring, f = c.map((e) => s(e.dataItem)), m = f.map((e, t) => `dim${t}`), h = e.sankeySettings.showNullNodes ? (e, t) => m[f.indexOf(t) + 1] : (e, t) => {
139
- let n = f.indexOf(t), r = f.slice(n + 1).find((t) => e[m[f.indexOf(t)]].value !== null), i = r === void 0 ? -1 : f.indexOf(r);
140
- return m[i];
141
- }, g = {
142
- key: R.sankey,
143
- type: T.Sankey,
142
+ }, ye = (e, n, r, a, o, s) => {
143
+ if (!s) throw Error("Missing Sankey visualization properties");
144
+ let c = e.sankeySettings.nodeLabels.placements;
145
+ if (!c) throw Error("Missing Sankey node label placements");
146
+ let l = e.dimensions.filter((e) => i(e)), u = new fe(e, n, o?.[0]?.itemsNotAffectedByFiltering), d = e.sankeySettings.linkColoring?.opacity ?? .3, f = e.sankeySettings.linkColoring, m = l.map((e) => t(e.dataItem)), h = m.map((e, t) => `dim${t}`), g = e.sankeySettings.showNullNodes ? (e, t) => h[m.indexOf(t) + 1] : (e, t) => {
147
+ let n = m.indexOf(t), r = m.slice(n + 1).find((t) => e[h[m.indexOf(t)]].value !== null), i = r === void 0 ? -1 : m.indexOf(r);
148
+ return h[i];
149
+ }, _ = {
150
+ key: B.sankey,
151
+ type: A.Sankey,
144
152
  data: { collection: "coll" },
145
153
  settings: {
146
154
  showNullNodes: e.sankeySettings.showNullNodes,
@@ -149,21 +157,21 @@ var ye = (e, t) => {
149
157
  linkMargin: e.sankeySettings.linkMargin,
150
158
  showColumnHeaderLabels: e.sankeySettings.showColumnHeaderLabels,
151
159
  linkFillStrategy: e.sankeySettings.linkColoring.type,
152
- nodeFillOverride: e.sankeySettings.nodeColoring.override ? e.sankeySettings.nodeColoring.color || t.colors.brandColors[0] : void 0,
153
- showNodeDimensionLabel: e.sankeySettings.nodeLabels.enabled && e.sankeySettings.nodeLabels.showDimensionValue,
154
- showNodeFlowLabel: e.sankeySettings.nodeLabels.enabled && e.sankeySettings.nodeLabels.showFlowValue,
160
+ ...p({ nodeFillOverride: e.sankeySettings.nodeColoring.override ? e.sankeySettings.nodeColoring.color || n.colors.brandColors[0] : void 0 }),
161
+ ...p({ showNodeDimensionLabel: e.sankeySettings.nodeLabels.enabled && e.sankeySettings.nodeLabels.showDimensionValue }),
162
+ ...p({ showNodeFlowLabel: e.sankeySettings.nodeLabels.enabled && e.sankeySettings.nodeLabels.showFlowValue }),
155
163
  showNodeLabelBackdrop: e.sankeySettings.nodeLabels.showBackdrop !== !1,
156
- nodeLabelBackdropColor: e.sankeySettings.nodeLabels.backdropColor,
157
- columnFields: ve(e, a.isPrintMode ?? !1),
158
- nodeLabelPlacements: o.filter((e) => e.enabled).map((e) => e.placement),
164
+ ...p({ nodeLabelBackdropColor: e.sankeySettings.nodeLabels.backdropColor }),
165
+ columnFields: _e(e, s.isPrintMode ?? !1),
166
+ nodeLabelPlacements: c.filter((e) => e.enabled).map((e) => e.placement),
159
167
  node: {
160
168
  id: (e) => {
161
169
  let t = e.datum;
162
170
  return `${t.source.field}::${t.value}`;
163
171
  },
164
- fill: l.getColorDefinition({
165
- ref: z.NodeColor,
166
- overwriteSources: [l.MAIN_FIELD, "color"]
172
+ fill: u.getColorDefinition({
173
+ ref: V.NodeColor,
174
+ overwriteSources: [u.MAIN_FIELD, "color"]
167
175
  })
168
176
  },
169
177
  link: {
@@ -172,74 +180,74 @@ var ye = (e, t) => {
172
180
  return `${t.source.field}::${t.value}`;
173
181
  },
174
182
  linkTarget: (e) => {
175
- let t = e.datum, n = h(t, t.source.field);
183
+ let t = e.datum, n = g(t, t.source.field);
176
184
  if (!n) return null;
177
185
  t.linkTarget = t[n];
178
186
  let r = t[n];
179
187
  return `${r.source.field}::${r.value}`;
180
188
  },
181
189
  value: { ref: "flow" },
182
- dataFill: l.getLinkColorDefinition(),
183
- fill: () => d.override ? d.color || t.colors.brandColors[0] : void 0,
184
- opacity: u
190
+ dataFill: u.getLinkColorDefinition(),
191
+ fill: () => f.override ? f.color || n.colors.brandColors[0] : void 0,
192
+ opacity: d
185
193
  }
186
194
  },
187
- brush: a.disable?.brushing === !0 ? void 0 : ye(e, a),
195
+ brush: s.disable?.brushing === !0 ? void 0 : ve(e, s),
188
196
  animations: {
189
197
  presetId: "simple-opacity",
190
198
  enabled: !0
191
199
  }
192
200
  };
193
201
  return {
194
- ...n,
195
- components: [...n.components, g]
202
+ ...r,
203
+ components: [...r.components, _]
196
204
  };
197
- }, xe = (e, t, n) => {
198
- let r = e.measures.filter((e) => p(e)), i = e.dimensions.filter((e) => p(e)), a = s(r[0].dataItem), o = i.map((e) => s(e.dataItem)), c = o.map((e) => ({
205
+ }, be = (e, n, r) => {
206
+ let a = e.measures.filter((e) => i(e)), o = e.dimensions.filter((e) => i(e)), s = t(a[0].dataItem), c = o.map((e) => t(e.dataItem)), l = c.map((e) => ({
199
207
  field: e,
200
208
  trackBy: (e) => e,
201
209
  reduce: "first",
202
210
  props: {
203
- [z.NodeFlow]: {
204
- field: a,
211
+ [V.NodeFlow]: {
212
+ field: s,
205
213
  reduce: "sum"
206
214
  },
207
- [a]: {
208
- field: a,
215
+ [s]: {
216
+ field: s,
209
217
  reduce: "sum"
210
218
  },
211
- [z.NodeColor]: { field: e },
219
+ [V.NodeColor]: { field: e },
212
220
  type: "node"
213
221
  }
214
- })), l = o.slice(0, o.length - 1).map((e, t) => {
222
+ })), u = c.slice(0, c.length - 1).map((e, t) => {
215
223
  let n = {
216
- field: o[t],
224
+ field: c[t],
217
225
  props: {
218
- flow: { field: a },
219
- [a]: { field: a },
226
+ flow: { field: s },
227
+ [s]: { field: s },
220
228
  type: "link"
221
229
  }
222
230
  };
223
- return o.forEach((e, t) => {
231
+ return c.forEach((e, t) => {
224
232
  n.field !== e && (n.props[`dim${t}`] = { field: e });
225
233
  }), n;
226
- }), u = [{
234
+ }), d = [{
227
235
  key: "coll",
228
236
  data: {
229
- extract: [...c, ...l],
237
+ extract: [...l, ...u],
230
238
  filter: e.sankeySettings.showNullNodes ? void 0 : (e) => e.value !== null
231
239
  }
232
240
  }];
233
241
  return {
234
- ...n,
235
- collections: u,
242
+ ...r,
243
+ collections: d,
236
244
  formatters: { flow: {
237
245
  type: "excel-format",
238
- format: r[0].formatter?.format
246
+ format: a[0].formatter?.format
239
247
  } }
240
248
  };
241
- }, V = (e, t) => ({
242
- component: R.sankey,
249
+ }, U = (e, t) => ({
250
+ component: B.sankey,
243
251
  selector: e,
244
252
  strategy: {
245
253
  type: "rows",
@@ -252,15 +260,15 @@ var ye = (e, t) => {
252
260
  },
253
261
  label({ node: e }) {
254
262
  let t = e.desc, n = t.label;
255
- return t.isGrouped ? S(n) : n;
263
+ return t.isGrouped ? D(n) : n;
256
264
  }
257
265
  }]
258
266
  }
259
267
  }
260
- }), H = 64, Se = new F(E.fontLight), Ce = new F(E.fontDark), U = (e, t, n) => {
261
- let r = new F(n.fonts.general.color);
268
+ }), W = 64, xe = new L(j.fontLight), Se = new L(j.fontDark), G = (e, t, n) => {
269
+ let r = new L(n.fonts.general.color);
262
270
  return {
263
- component: R.sankey,
271
+ component: B.sankey,
264
272
  selector: e,
265
273
  strategy: {
266
274
  type: "rows",
@@ -279,75 +287,75 @@ var ye = (e, t) => {
279
287
  if (!t.backdrop && !t.background) return r.rgb();
280
288
  let n = t.backdrop?.fill || t.background;
281
289
  if (n === void 0) throw Error("Color: Unknown color parameter");
282
- return new F(n).betterContrast(r, Se, Ce).rgb();
290
+ return new L(n).betterContrast(r, xe, Se).rgb();
283
291
  },
284
292
  linkData({ node: e }) {
285
293
  return e.desc?.data;
286
294
  },
287
295
  label({ node: e, formatter: t }) {
288
- let n = e.desc, r = n.showFlow ? t("flow")(n.data?.[z.NodeFlow]?.value) : void 0, i = n.label?.length > H - 1 ? `${n.label?.substring(0, H - 1).replace(/\s+$/, "")}…` : n.label;
296
+ let n = e.desc, r = n.showFlow ? t("flow")(n.data?.[V.NodeFlow]?.value) : void 0, i = n.label?.length > W - 1 ? `${n.label?.substring(0, W - 1).replace(/\s+$/, "")}…` : n.label;
289
297
  return [n.showDimension ? i : void 0, r].filter(Boolean).join(": ");
290
298
  }
291
299
  }]
292
300
  }
293
301
  }
294
302
  };
295
- }, we = (e, t, n, i, o, u, d, f) => {
303
+ }, Ce = (e, r, a, o, c, u, f, p) => {
296
304
  if (!u) throw Error("Missing Sankey visualization properties");
297
305
  let m = [];
298
- f && m.push(x(R.columnLabels, R.columnLabels, f));
306
+ p && m.push(S(B.columnLabels, B.columnLabels, p));
299
307
  let h = {
300
- type: T.Labels,
301
- key: R.columnLabels,
308
+ type: A.Labels,
309
+ key: B.columnLabels,
302
310
  layout: { displayOrder: 2 },
303
311
  settings: { sources: [
304
- V(`.${B.ColumnTitleLeft}`, 0),
305
- V(`.${B.ColumnTitleCenter}`, .5),
306
- V(`.${B.ColumnTitleRight}`, 1)
312
+ U(`.${H.ColumnTitleLeft}`, 0),
313
+ U(`.${H.ColumnTitleCenter}`, .5),
314
+ U(`.${H.ColumnTitleRight}`, 1)
307
315
  ] },
308
316
  style: { label: "$title" },
309
317
  animations: {
310
318
  presetId: "simple-opacity",
311
319
  enabled: !0
312
320
  }
313
- }, g = e?.measures.find(p), _ = g ? s(g.dataItem) : void 0;
314
- f && g && e.measures.length > 1 && m.push(w(T.Text, f));
321
+ }, g = e?.measures.find(i), _ = g ? t(g.dataItem) : void 0;
322
+ p && g && e.measures.length > 1 && m.push(E(A.Text, p));
315
323
  let v;
316
324
  if (g && e.measures.length > 1) {
317
- let n = a(g) || g.label || g.dataItem?.name || "Measure";
325
+ let t = s(g) || g.label || g.dataItem?.name || "Measure";
318
326
  v = {
319
- type: T.Text,
327
+ type: A.Text,
320
328
  key: `text-${_}`,
321
329
  dataItemType: l.Measure,
322
330
  dataItemRole: g.role,
323
- text: r(e.measures, e.enableAlternate, u.isPrintMode) ? S(n) : n,
331
+ text: d(e.measures, e.enableAlternate, u.isPrintMode) ? D(t) : t,
324
332
  layout: {
325
- dock: c.Bottom,
333
+ dock: n.Bottom,
326
334
  color: "red"
327
335
  },
328
336
  style: { text: {
329
- fontFamily: t.fonts.general.fontFamily,
330
- fontSize: `${E.fieldTitle.fontSize}px`,
337
+ fontFamily: r.fonts.general.fontFamily,
338
+ fontSize: `${j.fieldTitle.fontSize}px`,
331
339
  fontStyle: "normal",
332
- fill: t.fonts.general.color
340
+ fill: r.fonts.general.color
333
341
  } },
334
- anchor: c.Center
342
+ anchor: n.Center
335
343
  };
336
344
  }
337
345
  let y = {
338
- type: T.Labels,
339
- key: R.labels,
346
+ type: A.Labels,
347
+ key: B.labels,
340
348
  layout: { displayOrder: 2 },
341
349
  settings: { sources: [
342
- U(`.${B.NodeLabelLeft}`, 0, t),
343
- U(`.${B.NodeLabelCenter}`, .5, t),
344
- U(`.${B.NodeLabelRight}`, 1, t)
350
+ G(`.${H.NodeLabelLeft}`, 0, r),
351
+ G(`.${H.NodeLabelCenter}`, .5, r),
352
+ G(`.${H.NodeLabelRight}`, 1, r)
345
353
  ] },
346
354
  style: { label: "$label" },
347
355
  brush: u.disable?.brushing === !0 ? void 0 : {
348
356
  trigger: [{
349
- on: j.Tap,
350
- action: N.Toggle,
357
+ on: F.Tap,
358
+ action: k.Toggle,
351
359
  globalPropagation: "stop",
352
360
  data: [""],
353
361
  contexts: [P.Selection]
@@ -364,62 +372,62 @@ var ye = (e, t) => {
364
372
  }
365
373
  };
366
374
  return {
367
- ...n,
375
+ ...a,
368
376
  components: [
369
- ...n.components,
377
+ ...a.components,
370
378
  h,
371
379
  ...v ? [v] : [],
372
380
  y
373
381
  ],
374
- interactions: n.interactions ? [...n.interactions, ...m] : [...m]
382
+ interactions: a.interactions ? [...a.interactions, ...m] : [...m]
375
383
  };
376
- }, Te = (e, t, r, i, a) => {
377
- if (r.type !== n.PerEachDimension) {
378
- let e = r.color || t?.colors?.brandColors?.[0] || "#aaa";
384
+ }, we = (e, n, r, i, a) => {
385
+ if (r.type !== m.PerEachDimension) {
386
+ let e = r.color || n?.colors?.brandColors?.[0] || "#aaa";
379
387
  return {
380
- type: D.CategoricalColor,
388
+ type: N.CategoricalColor,
381
389
  data: [],
382
390
  range: [e],
383
391
  unknown: e
384
392
  };
385
393
  }
386
394
  let o = i.coloring || {};
387
- if (o.type !== n.Categorical) {
388
- let n = a[e.dimensions.indexOf(i) % a.length], r = o.color || n || t?.colors?.brandColors?.[0] || "#aaa";
395
+ if (o.type !== m.Categorical) {
396
+ let t = a[e.dimensions.indexOf(i) % a.length], r = o.color || t || n?.colors?.brandColors?.[0] || "#aaa";
389
397
  return {
390
- type: D.CategoricalColor,
398
+ type: N.CategoricalColor,
391
399
  data: [],
392
400
  range: [r],
393
401
  unknown: r
394
402
  };
395
403
  }
396
- return C(e, t, s(i.dataItem), {
397
- customPalette: o.customPalette ?? u.customPalette,
404
+ return w(e, n, t(i.dataItem), {
405
+ customPalette: o.customPalette ?? c.customPalette,
398
406
  palette: o.palette
399
407
  });
400
- }, Ee = (e, t, n) => {
401
- let r = e.dimensions.filter((e) => p(e));
402
- if (!r[0]) return n;
403
- let i = e.coloring;
404
- if (!i) throw Error("Missing Sankey coloring settings");
405
- let a = {}, o = oe({
406
- palette: i.palette,
407
- customPalette: i.customPalette ?? u.customPalette
408
- }, t);
409
- return r.forEach((n) => {
410
- let r = s(n.dataItem);
411
- a[r] = Te(e, t, i, n, o);
408
+ }, Te = (e, n, r) => {
409
+ let a = e.dimensions.filter((e) => i(e));
410
+ if (!a[0]) return r;
411
+ let o = e.coloring;
412
+ if (!o) throw Error("Missing Sankey coloring settings");
413
+ let s = {}, l = x({
414
+ palette: o.palette,
415
+ customPalette: o.customPalette ?? c.customPalette
416
+ }, n);
417
+ return a.forEach((r) => {
418
+ let i = t(r.dataItem);
419
+ s[i] = we(e, n, o, r, l);
412
420
  }), {
413
- ...n,
414
- scales: a
421
+ ...r,
422
+ scales: s
415
423
  };
416
- }, De = (e, t, n) => {
417
- let r = e.dimensions.filter((e) => p(e)), i = e.measures.filter((e) => p(e));
418
- if (!r[0] || !i[0]) return n;
419
- let a = {
424
+ }, Ee = (e, t, n) => {
425
+ let r = e.dimensions.filter((e) => i(e)), a = e.measures.filter((e) => i(e));
426
+ if (!r[0] || !a[0]) return n;
427
+ let o = {
420
428
  "$font-family": t.fonts.general.fontFamily,
421
429
  "$font-color": t.fonts.general.color,
422
- "$font-size": `${ne(e.sankeySettings?.nodeLabels?.fontSize)}px`,
430
+ "$font-size": `${re(e.sankeySettings?.nodeLabels?.fontSize)}px`,
423
431
  $label: {
424
432
  fontSize: "$font-size",
425
433
  fontFamily: "$font-family",
@@ -428,62 +436,62 @@ var ye = (e, t) => {
428
436
  },
429
437
  $title: {
430
438
  "@extend": "$label",
431
- fontSize: `${E.fieldTitle.fontSize}px`,
439
+ fontSize: `${j.fieldTitle.fontSize}px`,
432
440
  padding: 4
433
441
  }
434
442
  };
435
443
  return {
436
444
  ...n,
437
- style: a
445
+ style: o
438
446
  };
439
- }, Oe = (e, t) => t?.data?.type?.value === "link" ? `${t.data.label} - ${t.data.linkTarget.label}` : t.data.label, ke = (e, t, n, r, i, o, s) => {
440
- let c = [], l = a(e[0]) || e[0].label || e[0].dataItem.name || "", u = e.length ? l : "Count", d = t.desc?.flow ?? t.data?.flow.value, f = s ? n.formatter(re())(d) : n.formatter("flow")(d);
447
+ }, De = (e, t) => t?.data?.type?.value === "link" ? `${t.data.label} - ${t.data.linkTarget.label}` : t.data.label, Oe = (e, t, n, r, i, a, o) => {
448
+ let c = [], l = s(e[0]) || e[0].label || e[0].dataItem.name || "", u = e.length ? l : "Count", d = t.desc?.flow ?? t.data?.flow.value, f = o ? n.formatter(ae())(d) : n.formatter("flow")(d);
441
449
  return c.push({
442
450
  label: u,
443
451
  value: f
444
452
  }), c;
445
- }, Ae = (e, t, n, r, i) => {
453
+ }, ke = (e, t, n, r, i) => {
446
454
  let a = { placement: ({ nodes: e }) => ({
447
455
  area: "target",
448
456
  type: e[0]?.data?.type?.value === "link" ? "pointer" : "bounds"
449
457
  }) };
450
- return a.extract = ae(e, t, ke, Oe), k(e, t, n, a, "tooltip", i);
451
- }, je = class extends b {
458
+ return a.extract = T(e, t, Oe, De), C(e, t, n, a, "tooltip", i);
459
+ }, Ae = class extends O {
452
460
  constructor() {
453
461
  super([
454
- xe,
455
- Ee,
456
462
  be,
457
- we,
458
- De,
459
- Ae
463
+ Te,
464
+ ye,
465
+ Ce,
466
+ Ee,
467
+ ke
460
468
  ]);
461
469
  }
462
- preCompile(e, t) {
463
- let n = e.measures.filter((e) => p(e)), r = e.dimensions.filter((e) => p(e)), i = n[0];
464
- if (!i) return;
465
- let a = s(i.dataItem), o = r.map((e) => s(e.dataItem));
466
- t.forEach((t) => {
470
+ preCompile(e, n) {
471
+ let r = e.measures.filter((e) => i(e)), a = e.dimensions.filter((e) => i(e)), o = r[0];
472
+ if (!o) return;
473
+ let s = t(o.dataItem), c = a.map((e) => t(e.dataItem));
474
+ n.forEach((t) => {
467
475
  if (t.items?.length) {
468
- if (t.items = t.items.filter((e) => e[a] > 0), !t.items.length) throw Error("Current data query resulted in only negative and/or null values which can not be displayed in this chart.");
469
- if (!e.sankeySettings.showNullNodes && !t.items.find((e) => o.find((t) => e[t] !== null))) throw Error("Current dataset contains only non-null dimension values and can not be displayed in the current configuration of this chart.");
476
+ if (t.items = t.items.filter((e) => e[s] > 0), !t.items.length) throw Error("Current data query resulted in only negative and/or null values which can not be displayed in this chart.");
477
+ if (!e.sankeySettings.showNullNodes && !t.items.find((e) => c.find((t) => e[t] !== null))) throw Error("Current dataset contains only non-null dimension values and can not be displayed in the current configuration of this chart.");
470
478
  }
471
479
  });
472
480
  }
473
- }, W = {
481
+ }, K = {
474
482
  showNullNodes: !1,
475
483
  nodePadding: .2,
476
484
  nodeWidth: .2,
477
485
  linkMargin: 0,
478
486
  showColumnHeaderLabels: !1,
479
- linkFillStrategy: t.Interpolated,
487
+ linkFillStrategy: u.Interpolated,
480
488
  nodeFillOverride: null,
481
489
  showNodeFlowLabel: !0,
482
490
  showNodeDimensionLabel: !0,
483
491
  showNodeLabelBackdrop: !0,
484
492
  nodeLabelBackdropColor: null,
485
493
  columnFields: [],
486
- nodeLabelPlacements: [o.Beside],
494
+ nodeLabelPlacements: [a.Beside],
487
495
  node: {
488
496
  id: "",
489
497
  fill: "#333333"
@@ -495,10 +503,10 @@ var ye = (e, t) => {
495
503
  value: 1
496
504
  }
497
505
  };
498
- function G(e, t) {
506
+ function q(e, t) {
499
507
  return e.dataFill === t.dataFill ? 0 : e.dataFill !== void 0 && t.dataFill !== void 0 && e.dataFill < t.dataFill ? -1 : 1;
500
508
  }
501
- function Me(e) {
509
+ function je(e) {
502
510
  let t = e.target.x0 - e.source.x1, n = e.y0 - e.y1, r = Math.abs(n) < .1 ? 0 : .5;
503
511
  return [
504
512
  `M${e.source.x1},${e.y0}`,
@@ -507,12 +515,12 @@ function Me(e) {
507
515
  `${e.target.x0},${e.y1}`
508
516
  ].join(" ");
509
517
  }
510
- function Ne(e) {
518
+ function Me(e) {
511
519
  return e.map((e) => ({
512
520
  type: M.Path,
513
521
  data: e.data,
514
522
  desc: { flow: e.value },
515
- d: Me(e),
523
+ d: je(e),
516
524
  fill: "none",
517
525
  strokeWidth: Math.max(.5, e.width),
518
526
  stroke: e.fill,
@@ -522,45 +530,45 @@ function Ne(e) {
522
530
  collider: { visual: !0 }
523
531
  }));
524
532
  }
525
- function Pe(e) {
526
- let { data: n, resolver: r, settings: i, resolvedNodes: a } = e, o = {};
527
- a.forEach((e) => {
528
- o[e.id] = e;
533
+ function Ne(e) {
534
+ let { data: t, resolver: n, settings: r, resolvedNodes: i } = e, a = {};
535
+ i.forEach((e) => {
536
+ a[e.id] = e;
529
537
  });
530
- let s = n.items.filter((e) => e.type.value === "link"), { items: c } = r.resolve({
531
- data: { items: s },
532
- defaults: { ...W.link },
533
- settings: i.link
534
- }), l = {};
535
- return c.filter((e) => !!e.linkTarget).forEach((e) => {
536
- let n = o[e.linkSource], r = o[e.linkTarget], a;
537
- if (!e.fill && !e.dataFill) switch (i.linkFillStrategy) {
538
- case t.Source:
539
- e.fill = n.fill;
538
+ let o = t.items.filter((e) => e.type.value === "link"), { items: s } = n.resolve({
539
+ data: { items: o },
540
+ defaults: { ...K.link },
541
+ settings: r.link
542
+ }), c = {};
543
+ return s.filter((e) => !!e.linkTarget).forEach((e) => {
544
+ let t = a[e.linkSource], n = a[e.linkTarget], i;
545
+ if (!e.fill && !e.dataFill) switch (r.linkFillStrategy) {
546
+ case u.Source:
547
+ e.fill = t.fill;
540
548
  break;
541
- case t.Target:
542
- e.fill = r.fill;
549
+ case u.Target:
550
+ e.fill = n.fill;
543
551
  break;
544
- case t.Interpolated:
552
+ case u.Interpolated:
545
553
  e.fill = {
546
554
  type: "gradient",
547
555
  orientation: "linear",
548
556
  degree: -180,
549
557
  stops: [{
550
- color: n.fill,
558
+ color: t.fill,
551
559
  offset: 0
552
560
  }, {
553
- color: r.fill,
561
+ color: n.fill,
554
562
  offset: 1
555
563
  }]
556
- }, a = `${n.fill}::${r.fill}`;
564
+ }, i = `${t.fill}::${n.fill}`;
557
565
  break;
558
566
  }
559
567
  else e.dataFill && (e.fill = e.dataFill);
560
- a ||= e.fill, e.fillId = a;
561
- let s = `${e.linkSource}::${e.linkTarget}`;
562
- l[s] && l[s].fillId !== e.fillId && (s += `::${e.fillId}`), l[s] ? l[s].value += e.value : (l[s] = e, e.id = s);
563
- }), Object.values(l).map((e) => ({
568
+ i ||= e.fill, e.fillId = i;
569
+ let o = `${e.linkSource}::${e.linkTarget}`;
570
+ c[o] && c[o].fillId !== e.fillId && (o += `::${e.fillId}`), c[o] ? c[o].value += e.value : (c[o] = e, e.id = o);
571
+ }), Object.values(c).map((e) => ({
564
572
  source: e.linkSource,
565
573
  target: e.linkTarget,
566
574
  id: e.id,
@@ -571,10 +579,10 @@ function Pe(e) {
571
579
  opacity: e.opacity
572
580
  }));
573
581
  }
574
- function Fe(e) {
582
+ function Pe(e) {
575
583
  let { data: t, resolver: n, settings: r } = e, i = t.items.filter((e) => e.type.value === "node"), { items: a } = n.resolve({
576
584
  data: { items: i },
577
- defaults: { ...W.node },
585
+ defaults: { ...K.node },
578
586
  settings: {
579
587
  ...r.node,
580
588
  fixedValue: ({ datum: e }) => e.flow.value
@@ -582,7 +590,7 @@ function Fe(e) {
582
590
  });
583
591
  return a;
584
592
  }
585
- function Ie(e, t) {
593
+ function Fe(e, t) {
586
594
  let n = [];
587
595
  return e.map((e) => {
588
596
  let r = e.data, i = {};
@@ -600,7 +608,7 @@ function Ie(e, t) {
600
608
  }), i[e.dataFill].targetSum += e.value);
601
609
  });
602
610
  let a = Object.values(i);
603
- a.sort(G);
611
+ a.sort(q);
604
612
  let o = a.reduce(([e, t], n) => [e + n.sourceSum, t + n.targetSum], [0, 0]), s = 1 - Math.max(...o) / e.value, c = e.y1 - e.y0, l = e.y0;
605
613
  n.push({
606
614
  id: e.id,
@@ -638,7 +646,7 @@ function Ie(e, t) {
638
646
  });
639
647
  }), n;
640
648
  }
641
- var K = (e, t, n = !1, r = [4, 2]) => ({
649
+ var J = (e, t, n = !1, r = [4, 2]) => ({
642
650
  data: e.data,
643
651
  background: n ? e.fill : void 0,
644
652
  label: e.data.label,
@@ -649,10 +657,10 @@ var K = (e, t, n = !1, r = [4, 2]) => ({
649
657
  opacity: t.backdropColor ? 1 : .8,
650
658
  padding: r
651
659
  } : void 0
652
- }), Le = (e, t, n, r) => {
660
+ }), Ie = (e, t, n, r) => {
653
661
  let { nodeLabelHeight: i, nodePadding: a } = r;
654
662
  return a < i ? [] : e.map((e) => {
655
- let t = n[e.layer], a = K(e, r, !1, [4, 0]), o = a.backdrop?.padding ?? [0, 0], s = t.align < .5 ? B.NodeLabelLeft : t.align > .5 ? B.NodeLabelRight : B.NodeLabelCenter;
663
+ let t = n[e.layer], a = J(e, r, !1, [4, 0]), o = a.backdrop?.padding ?? [0, 0], s = t.align < .5 ? H.NodeLabelLeft : t.align > .5 ? H.NodeLabelRight : H.NodeLabelCenter;
656
664
  return {
657
665
  type: M.Rect,
658
666
  id: `${e.id}::labelTarget`,
@@ -665,10 +673,10 @@ var K = (e, t, n = !1, r = [4, 2]) => ({
665
673
  fill: "none"
666
674
  };
667
675
  });
668
- }, Re = (e) => e.canShowNodeLabelAboveNode, ze = (e, t, n, r) => {
676
+ }, Le = (e) => e.canShowNodeLabelAboveNode, Re = (e, t, n, r) => {
669
677
  let { nodePadding: i } = r;
670
678
  return e.filter((e) => e.y1 - e.y0 + i >= r.nodeLabelHeight).map((e) => {
671
- let t = n[e.layer], a = t.align <= .5 ? B.NodeLabelLeft : B.NodeLabelRight, o = K(e, r, !1, [4, 2]), s = o.backdrop?.padding ?? [0, 0], c = [2, 2], l = [s[0] + c[0], s[1] + c[1]], u = {
679
+ let t = n[e.layer], a = t.align <= .5 ? H.NodeLabelLeft : H.NodeLabelRight, o = J(e, r, !1, [4, 2]), s = o.backdrop?.padding ?? [0, 0], c = [2, 2], l = [s[0] + c[0], s[1] + c[1]], u = {
672
680
  type: M.Rect,
673
681
  id: `${e.id}::labelTarget`,
674
682
  x: t.gapX + l[0],
@@ -679,10 +687,10 @@ var K = (e, t, n = !1, r = [4, 2]) => ({
679
687
  tag: a,
680
688
  fill: "none"
681
689
  };
682
- return t.nodeWidth === 0 && (u.x = t.fullX + s[0], u.width = t.fullWidth - 2 * s[1], u.tag = t.align < .5 ? B.NodeLabelLeft : t.align > .5 ? B.NodeLabelRight : B.NodeLabelCenter), u;
690
+ return t.nodeWidth === 0 && (u.x = t.fullX + s[0], u.width = t.fullWidth - 2 * s[1], u.tag = t.align < .5 ? H.NodeLabelLeft : t.align > .5 ? H.NodeLabelRight : H.NodeLabelCenter), u;
683
691
  });
684
- }, Be = (e) => e.columnGap >= 20, Ve = (e, t, n, r) => e.filter((e) => e.y1 - e.y0 >= r.nodeLabelHeight).map((e) => {
685
- let t = K(e, r, !0, [4, 2]);
692
+ }, ze = (e) => e.columnGap >= 20, Be = (e, t, n, r) => e.filter((e) => e.y1 - e.y0 >= r.nodeLabelHeight).map((e) => {
693
+ let t = J(e, r, !0, [4, 2]);
686
694
  return {
687
695
  type: M.Rect,
688
696
  id: `${e.id}::labelTarget`,
@@ -691,37 +699,37 @@ var K = (e, t, n = !1, r = [4, 2]) => ({
691
699
  y: e.y0,
692
700
  height: e.y1 - e.y0,
693
701
  desc: t,
694
- tag: B.NodeLabelCenter,
702
+ tag: H.NodeLabelCenter,
695
703
  fill: "none"
696
704
  };
697
- }), He = (e) => e.columnWidth >= 80, q = {
698
- [o.Above]: {
699
- condition: Re,
700
- create: Le
705
+ }), Ve = (e) => e.columnWidth >= 80, Y = {
706
+ [a.Above]: {
707
+ condition: Le,
708
+ create: Ie
701
709
  },
702
- [o.Beside]: {
703
- condition: Be,
704
- create: ze
710
+ [a.Beside]: {
711
+ condition: ze,
712
+ create: Re
705
713
  },
706
- [o.Inside]: {
707
- condition: He,
708
- create: Ve
714
+ [a.Inside]: {
715
+ condition: Ve,
716
+ create: Be
709
717
  }
710
- }, Ue = (e) => e.priority.find((t) => q[t]?.condition(e)), We = (e, t, n, r) => {
718
+ }, He = (e) => e.priority.find((t) => Y[t]?.condition(e)), Ue = (e, t, n, r) => {
711
719
  let i = [], a = n[0];
712
720
  if (!r.showDimensionLabel && !r.showFlowLabel) return [];
713
- let o = r.priority.find((e) => q[e]?.condition({
721
+ let o = r.priority.find((e) => Y[e]?.condition({
714
722
  canShowNodeLabelAboveNode: r.canShowNodeLabelAboveNode,
715
723
  columnGap: a.gapWidth,
716
724
  columnWidth: a.nodeWidth,
717
725
  priority: r.priority
718
726
  }));
719
- return o && i.push(...q[o].create(e, t, n, r)), i;
727
+ return o && i.push(...Y[o].create(e, t, n, r)), i;
720
728
  };
721
- function Ge(e, t) {
729
+ function We(e, t) {
722
730
  let { headerHeight: n } = t;
723
731
  return e.map((e) => {
724
- let t = e.align < .5 ? B.ColumnTitleLeft : e.align > .5 ? B.ColumnTitleRight : B.ColumnTitleCenter;
732
+ let t = e.align < .5 ? H.ColumnTitleLeft : e.align > .5 ? H.ColumnTitleRight : H.ColumnTitleCenter;
725
733
  return {
726
734
  type: M.Rect,
727
735
  id: `column::${e.field}::labelTarget`,
@@ -740,7 +748,7 @@ function Ge(e, t) {
740
748
  };
741
749
  });
742
750
  }
743
- function Ke(e, t, n, r) {
751
+ function Ge(e, t, n, r) {
744
752
  let i = {};
745
753
  e.columnFields.forEach((e) => {
746
754
  i[e.id] = {
@@ -758,9 +766,9 @@ function Ke(e, t, n, r) {
758
766
  field: e.id,
759
767
  sort: e.sort
760
768
  }));
761
- return qe(a, t, n, e.showNullNodes), a;
769
+ return Ke(a, t, n, e.showNullNodes), a;
762
770
  }
763
- function qe(e, t, n, r = !1) {
771
+ function Ke(e, t, n, r = !1) {
764
772
  (e.find((e) => !e.count) || !r) && e.forEach((r, i) => {
765
773
  let a = `dummy-${i}`, o = `dummy-${i + 1}`;
766
774
  t.unshift({
@@ -787,13 +795,13 @@ function qe(e, t, n, r = !1) {
787
795
  });
788
796
  });
789
797
  }
790
- function Je(e, t) {
798
+ function qe(e, t) {
791
799
  return {
792
800
  nodes: e.filter((e) => !e.id.startsWith("dummy-")),
793
801
  links: t.filter((e) => !e.source.id.startsWith("dummy-"))
794
802
  };
795
803
  }
796
- function Ye(e, t, n) {
804
+ function Je(e, t, n) {
797
805
  let r = n[1][1] - n[0][1], i = e.reduce(([e, t], n) => [Math.min(e, n.y0), Math.max(t, n.y1)], [e[0].y0, e[0].y1]), a = i[0] - n[0][1], o = n[1][1] - i[1], s = 0;
798
806
  a > o && r / a > .1 ? s = -a / 2 : o > a && r / o > .1 && (s = o / 2), s !== 0 && (e.forEach((e) => {
799
807
  e.y0 += s, e.y1 += s;
@@ -801,7 +809,7 @@ function Ye(e, t, n) {
801
809
  e.y0 += s, e.y1 += s;
802
810
  }));
803
811
  }
804
- function Xe(e, t, n) {
812
+ function Ye(e, t, n) {
805
813
  return e.map((r) => {
806
814
  let i = t.find((e) => e.data.source.field === r.field);
807
815
  if (!i) throw Error(`Missing Sankey node for column ${r.field}`);
@@ -818,18 +826,18 @@ function Xe(e, t, n) {
818
826
  };
819
827
  });
820
828
  }
821
- function Ze(e, t, n, r, i) {
822
- let a = Math.max(0, n.width / (e.length * 2) * t.nodeWidth), s = a > 0 ? t.linkMargin * .5 * Math.min(24, (n.width - a * e.length) / (e.length - 1) / 2) : 0;
823
- a += s * 2;
824
- let c = (n.width - a * e.length) / (e.length - 1), l = Math.max(...e.map((e) => e.count)), u = r.measureText(i.title).height + 2 * i.title.padding, d = 8 + u, f = t.showColumnHeaderLabels && n.height - 8 - d > 0, p = r.measureText(i.label).height + 2 * i.label.padding, m = f ? d : 0, h = n.height - m, g = h / l / 2 * t.nodePadding, _ = (t.showNodeDimensionLabel || t.showNodeFlowLabel) && p * l < h / 2, v = g, y = Ue({
829
+ function Xe(e, t, n, r, i) {
830
+ let o = Math.max(0, n.width / (e.length * 2) * t.nodeWidth), s = o > 0 ? t.linkMargin * .5 * Math.min(24, (n.width - o * e.length) / (e.length - 1) / 2) : 0;
831
+ o += s * 2;
832
+ let c = (n.width - o * e.length) / (e.length - 1), l = Math.max(...e.map((e) => e.count)), u = r.measureText(i.title).height + 2 * i.title.padding, d = 8 + u, f = t.showColumnHeaderLabels && n.height - 8 - d > 0, p = r.measureText(i.label).height + 2 * i.label.padding, m = f ? d : 0, h = n.height - m, g = h / l / 2 * t.nodePadding, _ = (t.showNodeDimensionLabel || t.showNodeFlowLabel) && p * l < h / 2, v = g, y = He({
825
833
  canShowNodeLabelAboveNode: _,
826
834
  columnGap: c,
827
- columnWidth: a,
835
+ columnWidth: o,
828
836
  priority: t.nodeLabelPlacements
829
837
  });
830
- return _ && y === o.Above && (m += p, v = Math.max(p, g)), {
838
+ return _ && y === a.Above && (m += p, v = Math.max(p, g)), {
831
839
  columnGap: c,
832
- columnWidth: a,
840
+ columnWidth: o,
833
841
  nodePadding: v,
834
842
  availableHeight: h,
835
843
  nodeLabelHeight: p,
@@ -840,19 +848,19 @@ function Ze(e, t, n, r, i) {
840
848
  canShowNodeLabelAboveNode: _
841
849
  };
842
850
  }
843
- function Qe(e, t) {
851
+ function Ze(e, t) {
844
852
  return e.sourceLinks.length ? e.depth : t - 1;
845
853
  }
846
- function J(e) {
854
+ function X(e) {
847
855
  return function() {
848
856
  return e;
849
857
  };
850
858
  }
851
- ue();
852
- function Y(e, t) {
859
+ le();
860
+ function Qe(e, t) {
853
861
  return Z(e.source, t.source) || e.index - t.index;
854
862
  }
855
- function X(e, t) {
863
+ function $e(e, t) {
856
864
  return Z(e.target, t.target) || e.index - t.index;
857
865
  }
858
866
  function Z(e, t) {
@@ -861,42 +869,42 @@ function Z(e, t) {
861
869
  function Q(e) {
862
870
  return e.value;
863
871
  }
864
- function $e(e) {
872
+ function et(e) {
865
873
  return e.index;
866
874
  }
867
- function et(e) {
875
+ function tt(e) {
868
876
  return e.nodes;
869
877
  }
870
- function tt(e) {
878
+ function nt(e) {
871
879
  return e.links;
872
880
  }
873
- function nt(e, t) {
881
+ function rt(e, t) {
874
882
  let n = e.get(t);
875
883
  if (!n) throw Error("missing: " + t);
876
884
  return n;
877
885
  }
878
- function rt({ nodes: e }) {
886
+ function it({ nodes: e }) {
879
887
  for (let t of e) {
880
888
  let e = t.y0, n = e;
881
889
  for (let n of t.sourceLinks) n.y0 = e + n.width / 2, e += n.width;
882
890
  for (let e of t.targetLinks) e.y1 = n + e.width / 2, n += e.width;
883
891
  }
884
892
  }
885
- function it() {
886
- let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = $e, c = Qe, l, u, d = et, f = tt, p = 6;
893
+ function at() {
894
+ let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = et, c = Ze, l, u, d = tt, f = nt, p = 6;
887
895
  function m() {
888
896
  let e = {
889
897
  nodes: d.apply(null, arguments),
890
898
  links: f.apply(null, arguments)
891
899
  };
892
- return h(e), g(e), _(e), v(e), x(e), rt(e), e;
900
+ return h(e), g(e), _(e), v(e), x(e), it(e), e;
893
901
  }
894
902
  m.update = function(e) {
895
- return rt(e), e;
903
+ return it(e), e;
896
904
  }, m.nodeId = function(e) {
897
- return arguments.length ? (s = typeof e == "function" ? e : J(e), m) : s;
905
+ return arguments.length ? (s = typeof e == "function" ? e : X(e), m) : s;
898
906
  }, m.nodeAlign = function(e) {
899
- return arguments.length ? (c = typeof e == "function" ? e : J(e), m) : c;
907
+ return arguments.length ? (c = typeof e == "function" ? e : X(e), m) : c;
900
908
  }, m.nodeSort = function(e) {
901
909
  return arguments.length ? (l = e, m) : l;
902
910
  }, m.nodeWidth = function(e) {
@@ -904,9 +912,9 @@ function it() {
904
912
  }, m.nodePadding = function(e) {
905
913
  return arguments.length ? (a = o = +e, m) : a;
906
914
  }, m.nodes = function(e) {
907
- return arguments.length ? (d = typeof e == "function" ? e : J(e), m) : d;
915
+ return arguments.length ? (d = typeof e == "function" ? e : X(e), m) : d;
908
916
  }, m.links = function(e) {
909
- return arguments.length ? (f = typeof e == "function" ? e : J(e), m) : f;
917
+ return arguments.length ? (f = typeof e == "function" ? e : X(e), m) : f;
910
918
  }, m.linkSort = function(e) {
911
919
  return arguments.length ? (u = e, m) : u;
912
920
  }, m.size = function(i) {
@@ -922,12 +930,12 @@ function it() {
922
930
  for (let [e, r] of t.entries()) {
923
931
  r.index = e;
924
932
  let { source: t, target: i } = r;
925
- typeof t != "object" && (t = r.source = nt(n, t)), typeof i != "object" && (i = r.target = nt(n, i)), t.sourceLinks.push(r), i.targetLinks.push(r);
933
+ typeof t != "object" && (t = r.source = rt(n, t)), typeof i != "object" && (i = r.target = rt(n, i)), t.sourceLinks.push(r), i.targetLinks.push(r);
926
934
  }
927
935
  if (u != null) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(u), n.sort(u);
928
936
  }
929
937
  function g({ nodes: e }) {
930
- for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(L(t.sourceLinks, Q), L(t.targetLinks, Q)) : t.fixedValue;
938
+ for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(z(t.sourceLinks, Q), z(t.targetLinks, Q)) : t.fixedValue;
931
939
  }
932
940
  function _({ nodes: e }) {
933
941
  let t = e.length, n = new Set(e), r = /* @__PURE__ */ new Set(), i = 0;
@@ -952,7 +960,7 @@ function it() {
952
960
  }
953
961
  }
954
962
  function y({ nodes: t }) {
955
- let r = I(t, (e) => e.depth) + 1, a = (n - e - i) / (r - 1), o = Array(r);
963
+ let r = R(t, (e) => e.depth) + 1, a = (n - e - i) / (r - 1), o = Array(r);
956
964
  for (let n of t) {
957
965
  let t = Math.max(0, Math.min(r - 1, Math.floor(c.call(null, n, r))));
958
966
  n.layer = t, n.x0 = e + t * a, n.x1 = n.x0 + i, o[t] ? o[t].push(n) : o[t] = [n];
@@ -961,7 +969,7 @@ function it() {
961
969
  return o;
962
970
  }
963
971
  function b(e) {
964
- let n = de(e, (e) => (r - t - (e.length - 1) * o) / L(e, Q));
972
+ let n = ue(e, (e) => (r - t - (e.length - 1) * o) / z(e, Q));
965
973
  for (let i of e) {
966
974
  let e = t;
967
975
  for (let t of i) {
@@ -978,7 +986,7 @@ function it() {
978
986
  }
979
987
  function x(e) {
980
988
  let n = y(e);
981
- o = Math.min(a, (r - t) / (I(n, (e) => e.length) - 1)), b(n);
989
+ o = Math.min(a, (r - t) / (R(n, (e) => e.length) - 1)), b(n);
982
990
  for (let e = 0; e < p; ++e) {
983
991
  let t = .99 ** e, r = Math.max(1 - t, (e + 1) / p);
984
992
  C(n, t, r), S(n, t, r);
@@ -1034,12 +1042,12 @@ function it() {
1034
1042
  }
1035
1043
  function D({ sourceLinks: e, targetLinks: t }) {
1036
1044
  if (u === void 0) {
1037
- for (let { source: { sourceLinks: e } } of t) e.sort(X);
1038
- for (let { target: { targetLinks: t } } of e) t.sort(Y);
1045
+ for (let { source: { sourceLinks: e } } of t) e.sort($e);
1046
+ for (let { target: { targetLinks: t } } of e) t.sort(Qe);
1039
1047
  }
1040
1048
  }
1041
1049
  function O(e) {
1042
- if (u === void 0) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(X), n.sort(Y);
1050
+ if (u === void 0) for (let { sourceLinks: t, targetLinks: n } of e) t.sort($e), n.sort(Qe);
1043
1051
  }
1044
1052
  function k(e, t) {
1045
1053
  let n = e.y0 - (e.sourceLinks.length - 1) * o / 2;
@@ -1068,47 +1076,47 @@ function it() {
1068
1076
  return m;
1069
1077
  }
1070
1078
  var $ = 4;
1071
- function at(e) {
1079
+ function ot(e) {
1072
1080
  let { columns: t, sankeyNodes: n, sankeyLinks: r, columnWidth: i, columnGap: a, nodePadding: o, top: s, rect: c } = e, l = t.map((e) => e.field), u = (e) => l.indexOf(e.data.source.field), d = t.find((e) => !!e.sort) ? (e, n) => {
1073
1081
  if (e.layer === void 0) throw Error("Missing Sankey node layer before sorting");
1074
1082
  let r = t[e.layer].sort;
1075
1083
  return r?.(e, n) ?? 0;
1076
- } : void 0, f = [[0, s + $], [c.width, c.height - 2 * $]], p = it().nodeId((e) => e.id).nodePadding(o).nodeWidth(i).linkSort((e, t) => e.dataFill && t.dataFill ? G(e, t) : e.dataFill ? 1 : -1).nodeSort(d).nodeAlign(u).extent(f).iterations(6)({
1084
+ } : void 0, f = [[0, s + $], [c.width, c.height - 2 * $]], p = at().nodeId((e) => e.id).nodePadding(o).nodeWidth(i).linkSort((e, t) => e.dataFill && t.dataFill ? q(e, t) : e.dataFill ? 1 : -1).nodeSort(d).nodeAlign(u).extent(f).iterations(6)({
1077
1085
  nodes: n,
1078
1086
  links: r
1079
- }), m = Xe(t, p.nodes, a), { nodes: h, links: g } = Je(p.nodes, p.links);
1080
- return Ye(h, g, f), {
1087
+ }), m = Ye(t, p.nodes, a), { nodes: h, links: g } = qe(p.nodes, p.links);
1088
+ return Je(h, g, f), {
1081
1089
  nodes: h,
1082
1090
  links: g,
1083
1091
  columns: m
1084
1092
  };
1085
1093
  }
1086
- var ot = {
1094
+ var st = {
1087
1095
  require: [
1088
1096
  "resolver",
1089
1097
  "chart",
1090
1098
  "renderer"
1091
1099
  ],
1092
1100
  defaultSettings: {
1093
- settings: W,
1101
+ settings: K,
1094
1102
  style: {
1095
1103
  title: "$title",
1096
1104
  label: "$label"
1097
1105
  }
1098
1106
  },
1099
1107
  render({ data: e }) {
1100
- let { settings: t } = this.settings, n = Fe({
1108
+ let { settings: t } = this.settings, n = Pe({
1101
1109
  data: e,
1102
1110
  resolver: this.resolver,
1103
1111
  settings: t
1104
- }), r = Pe({
1112
+ }), r = Ne({
1105
1113
  data: e,
1106
1114
  resolver: this.resolver,
1107
1115
  settings: t,
1108
1116
  resolvedNodes: n
1109
- }), i = Ke(t, n, r, this.chart.dataset()), { columnGap: a, columnWidth: o, nodePadding: s, availableHeight: c, nodeLabelHeight: l, nodeMargin: u, top: d, showHeader: f, headerTitleHeight: p, canShowNodeLabelAboveNode: m } = Ze(i, t, this.rect, this.renderer, this.style);
1117
+ }), i = Ge(t, n, r, this.chart.dataset()), { columnGap: a, columnWidth: o, nodePadding: s, availableHeight: c, nodeLabelHeight: l, nodeMargin: u, top: d, showHeader: f, headerTitleHeight: p, canShowNodeLabelAboveNode: m } = Xe(i, t, this.rect, this.renderer, this.style);
1110
1118
  if (c < 8) return [];
1111
- let { nodes: h, links: g, columns: _ } = at({
1119
+ let { nodes: h, links: g, columns: _ } = ot({
1112
1120
  columns: i,
1113
1121
  sankeyNodes: n,
1114
1122
  sankeyLinks: r,
@@ -1117,7 +1125,7 @@ var ot = {
1117
1125
  nodePadding: s,
1118
1126
  top: d,
1119
1127
  rect: this.rect
1120
- }), v = Ie(h, { nodeMargin: u }), y = We(h, v, _, {
1128
+ }), v = Fe(h, { nodeMargin: u }), y = Ue(h, v, _, {
1121
1129
  nodeLabelHeight: l,
1122
1130
  canShowNodeLabelAboveNode: m,
1123
1131
  nodePadding: s,
@@ -1129,35 +1137,35 @@ var ot = {
1129
1137
  priority: t.nodeLabelPlacements
1130
1138
  });
1131
1139
  return [
1132
- ...Ne(g),
1140
+ ...Me(g),
1133
1141
  ...v,
1134
- ...f ? Ge(_, { headerHeight: p }) : [],
1142
+ ...f ? We(_, { headerHeight: p }) : [],
1135
1143
  ...y
1136
1144
  ];
1137
1145
  }
1138
1146
  };
1139
- function st(e) {
1140
- e.component(T.Sankey, ot);
1147
+ function ct(e) {
1148
+ e.component(A.Sankey, st);
1141
1149
  }
1142
- var ct = v(), lt = g(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
1143
- let a = h(), [o] = (0, fe.useState)(() => new je()), c = t || f, l = y(), u = m(), p = te();
1150
+ var lt = b(), ut = v(({ vSpec: e, vTheme: n, data: r, elementSize: i, vizProperties: a }) => {
1151
+ let s = g(), [c] = (0, de.useState)(() => new Ae()), l = n || f, u = y(), d = h(), p = ne();
1144
1152
  if (!e) return null;
1145
- let g = l.targetDataItemId;
1146
- if (!g && l.targetInternalKey) {
1147
- let t = e.dimensions.find((e) => e.dataItem.internalKey === l.targetInternalKey);
1148
- t && (g = s(t.dataItem));
1153
+ let m = u.targetDataItemId;
1154
+ if (!m && u.targetInternalKey) {
1155
+ let n = e.dimensions.find((e) => e.dataItem.internalKey === u.targetInternalKey);
1156
+ n && (m = t(n.dataItem));
1149
1157
  }
1150
1158
  let _ = {
1151
- ...i,
1152
- valuePickerMode: !!l.activeKey,
1153
- valuePickerTargetDataItemId: g ?? void 0
1154
- }, v = o.compile(e, c, n, r, _, d.Sankey, a, u, p);
1155
- return v ? /* @__PURE__ */ (0, ct.jsx)(ee, {
1156
- config: i,
1159
+ ...a,
1160
+ valuePickerMode: !!u.activeKey,
1161
+ valuePickerTargetDataItemId: m ?? void 0
1162
+ }, v = c.compile(e, l, r, i, _, o.Sankey, s, d, p);
1163
+ return v ? /* @__PURE__ */ (0, lt.jsx)(ee, {
1164
+ config: a,
1157
1165
  definition: v,
1158
- size: r,
1166
+ size: i,
1159
1167
  vSpec: e,
1160
- escobarPlugins: [st]
1168
+ escobarPlugins: [ct]
1161
1169
  }) : null;
1162
1170
  });
1163
- export { lt as Sankey };
1171
+ export { ut as Sankey };