@sisense/sdk-ui-preact 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ai.js CHANGED
@@ -1,21 +1,21 @@
1
- import { P as Le, ff as Ft, fg as Vt, W as se, af as we, ae as $t, cK as Jt, aW as fe, fh as Xt, bK as Kt, bo as Xe, fi as de, a as gt, cE as je, b2 as er, c7 as tr, fj as rr, fk as ar, fl as ir, fm as or, cI as ut, s as ht, aj as mt, aU as ve, r as nr, d as Me, fn as lr, fo as dr, C as ee, z as V, fp as bt, e as b, y as ft, i as k, G as i, a2 as v, ai as O, fq as sr, aI as cr, ar as pr, q as N, bs as te, j as _, aF as Ze, f as S, _ as re, at as xt, a7 as gr, bx as ur, au as hr, F as $, fr as mr, u as ne, Z as Te, fs as br, ac as fr, ft as xr, ag as le, ds as kt, av as We, h as kr, fu as ce, a6 as u, cW as T, J as h, c6 as wr, fv as yr, A as ye, fw as _r, fx as Cr, fy as wt, fz as vr, fA as Mr, ck as Sr, cl as Dr, fB as Ir, fC as Ar, fD as Lr, eq as Tr, cj as Nr, fE as jr, cV as yt, fF as Or, dj as Er, fG as zr, aX as _t, aY as Ct, fH as Rr, cB as Zr, fI as Wr, cS as qr, fJ as Gr } from "./use-common-filters-CJNwlbbh-ce34ca79.js";
2
- var Pr = Object.defineProperty, Hr = Object.defineProperties, Yr = Object.getOwnPropertyDescriptors, Ke = Object.getOwnPropertySymbols, Br = Object.prototype.hasOwnProperty, Qr = Object.prototype.propertyIsEnumerable, et = (e, t, r) => t in e ? Pr(e, t, {
1
+ import { P as Le, fl as Bt, fm as Ut, W as se, ag as we, af as Ft, cK as Vt, aW as fe, fn as $t, bK as Jt, bo as Xe, fo as de, E as gt, cE as je, b2 as Xt, c7 as Kt, fp as er, H as tr, fq as rr, fr as ar, fs as ir, cI as ut, l as ht, ak as mt, ab as ve, o as or, d as Me, ft as nr, fu as lr, C as ee, z as V, fv as bt, c as b, y as ft, w as k, G as i, a2 as v, aj as O, fw as dr, aJ as sr, as as cr, q as N, bs as te, h as _, aG as Ze, e as S, _ as re, au as xt, a7 as pr, bx as gr, av as ur, F as $, fx as hr, u as ne, Z as Te, fy as mr, ad as br, fz as fr, ah as le, ds as kt, aw as We, f as xr, fA as ce, a6 as u, cW as T, J as h, c6 as kr, fB as wr, A as ye, fC as yr, fD as _r, fE as wt, fF as Cr, fG as vr, ck as Mr, cl as Sr, fH as Dr, fI as Ir, fJ as Ar, et as Lr, cj as Tr, fK as Nr, cV as yt, fL as jr, dj as Or, ew as Er, ee as pe, aX as _t, fM as zr, cB as Rr, aY as Zr, fN as Wr, ed as qr, cS as Gr, fO as Pr, ef as Yr } from "./use-common-filters-DkwU7HJ3-5a1008fb.js";
2
+ var Hr = Object.defineProperty, Qr = Object.defineProperties, Br = Object.getOwnPropertyDescriptors, Ke = Object.getOwnPropertySymbols, Ur = Object.prototype.hasOwnProperty, Fr = Object.prototype.propertyIsEnumerable, et = (e, t, r) => t in e ? Hr(e, t, {
3
3
  enumerable: !0,
4
4
  configurable: !0,
5
5
  writable: !0,
6
6
  value: r
7
7
  }) : e[t] = r, A = (e, t) => {
8
8
  for (var r in t || (t = {}))
9
- Br.call(t, r) && et(e, r, t[r]);
9
+ Ur.call(t, r) && et(e, r, t[r]);
10
10
  if (Ke)
11
11
  for (var r of Ke(t))
12
- Qr.call(t, r) && et(e, r, t[r]);
12
+ Fr.call(t, r) && et(e, r, t[r]);
13
13
  return e;
14
- }, B = (e, t) => Hr(e, Yr(t));
15
- class vt extends gt {
14
+ }, Q = (e, t) => Qr(e, Br(t));
15
+ class Ct extends gt {
16
16
  constructor(t, r) {
17
17
  var a;
18
- super((a = t.jaql.title) !== null && a !== void 0 ? a : "", r), this.expression = t.jaql.dim || t.jaql.formula, this.metadataItem = t, t.jaql.agg ? this.aggregation = t.jaql.agg : delete this.aggregation, t.jaql.formula ? this.formula = t.jaql.formula : delete this.formula, t.jaql.sort ? this.sortType = tr(t.jaql.sort) : delete this.sortType, this.skipValidation = !0;
18
+ super((a = t.jaql.title) !== null && a !== void 0 ? a : "", r), this.expression = t.jaql.dim || t.jaql.formula, this.metadataItem = t, t.jaql.agg ? this.aggregation = t.jaql.agg : delete this.aggregation, t.jaql.formula ? this.formula = t.jaql.formula : delete this.formula, t.jaql.sort ? this.sortType = Kt(t.jaql.sort) : delete this.sortType, this.skipValidation = !0;
19
19
  }
20
20
  get id() {
21
21
  return this.expression;
@@ -31,52 +31,55 @@ class vt extends gt {
31
31
  return t.__serializable = "JaqlElement", t.metadataItem = this.metadataItem, t.type = this.type, t;
32
32
  }
33
33
  }
34
- const Ur = {
34
+ const Vr = {
35
35
  text: Le.TextAttribute,
36
36
  numeric: Le.NumericAttribute,
37
37
  datetime: Le.DateLevel
38
38
  };
39
- function Fr(e) {
39
+ function $r(e) {
40
40
  var t;
41
- return new vt(e, (t = Ur[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
41
+ return new Ct(e, (t = Vr[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
42
42
  }
43
- function Mt(e) {
43
+ function vt(e) {
44
44
  const {
45
45
  jaql: t
46
46
  } = e;
47
- return t.formula ? rr(t) : "agg" in t && t.dim && t.datatype ? ar({
47
+ if (t.formula)
48
+ return er(t);
49
+ const r = tr.translateJaqlToGranularity(t);
50
+ return "agg" in t && t.dim && t.datatype ? rr({
48
51
  expression: t.dim,
49
52
  dataType: t.datatype,
50
53
  agg: t.agg || "",
51
- granularity: t.level,
54
+ granularity: r,
52
55
  format: void 0,
53
56
  sort: t.sort,
54
57
  title: t.title,
55
58
  dataSource: t.datasource
56
- }) : t.dim && t.datatype ? ir({
59
+ }) : t.dim && t.datatype ? ar({
57
60
  expression: t.dim,
58
61
  dataType: t.datatype,
59
- granularity: t.level,
62
+ granularity: r,
60
63
  sort: t.sort,
61
64
  title: t.title,
62
65
  panel: e.panel,
63
66
  dataSource: t.datasource
64
- }) : Fr(e);
67
+ }) : $r(e);
65
68
  }
66
- const Vr = (e) => "dashboardOid" in e && "widgetOid" in e;
67
- function $r(e) {
69
+ const Jr = (e) => "dashboardOid" in e && "widgetOid" in e;
70
+ function Xr(e) {
68
71
  return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
69
72
  }
70
- function Jr(e) {
73
+ function Kr(e) {
71
74
  return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
72
75
  }
73
- function St(e) {
74
- if (![...Vt, "pivot", "pivot2"].includes(e))
76
+ function Mt(e) {
77
+ if (![...Ut, "pivot", "pivot2"].includes(e))
75
78
  throw new se("errors.chartTypeNotSupported", {
76
79
  chartType: e
77
80
  });
78
81
  }
79
- function Xr(e) {
82
+ function ea(e) {
80
83
  return "widgetType" in e && e.widgetType === "pivot";
81
84
  }
82
85
  function K(e) {
@@ -85,12 +88,12 @@ function K(e) {
85
88
  }
86
89
  function tt(e) {
87
90
  const t = "measures" in e && R(e.measures) || "values" in e && R(e.values);
88
- return Xr(e) ? "values" in e.dataOptions && R(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && R(e.dataOptions.value) || "secondary" in e.dataOptions && R(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !R(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => K(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && K(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && K(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && K(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && K(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && K(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && R(e.dataOptions.geo) && "color" in e.dataOptions && R(e.dataOptions.color) : "value" in e.dataOptions && R(e.dataOptions.value) : t;
91
+ return ea(e) ? "values" in e.dataOptions && R(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && R(e.dataOptions.value) || "secondary" in e.dataOptions && R(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !R(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => K(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && K(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && K(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && K(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && K(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && K(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && R(e.dataOptions.geo) && "color" in e.dataOptions && R(e.dataOptions.color) : "value" in e.dataOptions && R(e.dataOptions.value) : t;
89
92
  }
90
93
  function R(e) {
91
94
  return Array.isArray(e) && e.length > 0;
92
95
  }
93
- function Kr(e) {
96
+ function ta(e) {
94
97
  const t = e.split(`
95
98
  `);
96
99
  for (let r = 0; r < t.length - 1; r++)
@@ -104,7 +107,7 @@ function Kr(e) {
104
107
  return t.join(`
105
108
  `);
106
109
  }
107
- const ea = {
110
+ const ra = {
108
111
  react: {
109
112
  baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
110
113
  {{extraImportsString}}
@@ -563,10 +566,10 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
563
566
  </template>`,
564
567
  dashboardTmpl: "/** COMING SOON */"
565
568
  }
566
- }, Dt = (e, t) => ea[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => Dt(`${a}Tmpl`, t)), ta = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), Oe = (e, t, r = "react") => {
567
- const a = Dt(e, r);
568
- return Kr(ta(a, t));
569
- }, ra = () => Object.values(or).map((e) => ut.aggregationToJAQL(e)).join("|"), It = (e) => {
569
+ }, St = (e, t) => ra[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => St(`${a}Tmpl`, t)), aa = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), Oe = (e, t, r = "react") => {
570
+ const a = St(e, r);
571
+ return ta(aa(a, t));
572
+ }, ia = () => Object.values(ir).map((e) => ut.aggregationToJAQL(e)).join("|"), Dt = (e) => {
570
573
  const {
571
574
  formula: t,
572
575
  context: r,
@@ -580,7 +583,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
580
583
  const n = o[0];
581
584
  if (typeof n != "string")
582
585
  return e;
583
- const l = r[`${n}`], s = ra(), d = new RegExp(`^\\s*(${s})\\(\\[\\w+\\]\\)$`), c = t.match(d);
586
+ const l = r[`${n}`], s = ia(), d = new RegExp(`^\\s*(${s})\\(\\[\\w+\\]\\)$`), c = t.match(d);
584
587
  if (c && t.includes(n)) {
585
588
  const g = c[1];
586
589
  return A({
@@ -597,14 +600,14 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
597
600
  return e;
598
601
  }, xe = (e) => {
599
602
  let t = e;
600
- if ("formula" in e && (t = It(e)), "context" in t) {
603
+ if ("formula" in e && (t = Dt(e)), "context" in t) {
601
604
  const r = A({}, t.context);
602
605
  Object.keys(r).forEach((a) => {
603
606
  r[`${a}`] = xe(r[`${a}`]);
604
607
  }), t.context = r;
605
608
  }
606
609
  return t;
607
- }, aa = (e) => {
610
+ }, oa = (e) => {
608
611
  var t;
609
612
  const r = e;
610
613
  if (r.panel !== "scope")
@@ -612,18 +615,18 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
612
615
  const {
613
616
  jaql: a
614
617
  } = r;
615
- return (t = a.filter) != null && t.by && (a.filter.by = It(a.filter.by)), B(A({}, r), {
618
+ return (t = a.filter) != null && t.by && (a.filter.by = Dt(a.filter.by)), Q(A({}, r), {
616
619
  jaql: a
617
620
  });
618
- }, ia = (e) => {
621
+ }, na = (e) => {
619
622
  let t = e;
620
- t = aa(t);
623
+ t = oa(t);
621
624
  const {
622
625
  jaql: r,
623
626
  measure: a,
624
627
  by: o
625
628
  } = t;
626
- return A(A(B(A({}, t), {
629
+ return A(A(Q(A({}, t), {
627
630
  jaql: xe(r)
628
631
  }), o ? {
629
632
  by: xe(o)
@@ -631,7 +634,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
631
634
  measure: xe(a)
632
635
  } : {});
633
636
  }, ke = 6, me = `
634
- `, Ee = "UNKNOWN", oa = (e, t) => {
637
+ `, Ee = "UNKNOWN", la = (e, t) => {
635
638
  let r = "";
636
639
  return r += `measureFactory.customFormula(
637
640
  `, r += " ".repeat(t), r += ` '${de(e.title)}',
@@ -643,7 +646,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
643
646
  `;
644
647
  }), r += " ".repeat(t), r += ` }
645
648
  `, r += " ".repeat(t), r += ")", r;
646
- }, na = (e) => {
649
+ }, da = (e) => {
647
650
  const {
648
651
  level: t,
649
652
  table: r,
@@ -653,16 +656,16 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
653
656
  } = e;
654
657
  let l;
655
658
  return r && a && (l = ht(r, a, t, "DM")), o && r && a && n && (l = `measureFactory.${ut.aggregationFromJAQL(o)}(${l}, '${de(n)}')`), l || Ee;
656
- }, la = (e, t) => {
659
+ }, sa = (e, t) => {
657
660
  const r = e.jaql(!1).jaql;
658
- return "formula" in r ? oa(r, t) : na(r);
661
+ return "formula" in r ? la(r, t) : da(r);
659
662
  }, G = (e, t = 0, r = !1) => {
660
663
  if (!e)
661
664
  return "";
662
665
  if (typeof e == "string")
663
666
  return `'${de(e)}'`;
664
- if (e instanceof vt)
665
- return la(e, t);
667
+ if (e instanceof Ct)
668
+ return sa(e, t);
666
669
  if (e instanceof gt)
667
670
  return e.composeCode || "";
668
671
  let a = "";
@@ -670,54 +673,54 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
670
673
  r && typeof o == "string" && (o = `'${de(o)}'`), a += " ".repeat(t + 2), Array.isArray(n) ? a += `${o}: [${n.map((l) => G(l, t + 4, r))}${n.length ? me + " ".repeat(t + 2) : ""}]` : typeof n == "object" && n !== null ? a += `${o}: ${G(n, t + 2, r)}` : ["number", "boolean", "undefined"].includes(typeof n) || n === null ? a += `${o}: ${n}` : typeof n == "string" ? a += `${o}: '${de(n)}'` : a += `${o}: ${n}`, a += `,${me}`;
671
674
  }), a += " ".repeat(t), a += "}"), a;
672
675
  };
673
- function da(e) {
676
+ function ca(e) {
674
677
  return G(e, ke);
675
678
  }
676
679
  function rt(e, t = "data-source-placeholder") {
677
680
  if (!e)
678
681
  return t;
679
682
  const r = typeof e == "object" && "title" in e ? e.title : e;
680
- return $r(r);
683
+ return Xr(r);
681
684
  }
682
685
  function at(e, t = !0) {
683
686
  const r = [];
684
687
  return t && r.push("measureFactory"), R(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
685
688
  }
686
689
  const it = `
687
- `, sa = (e, t) => {
690
+ `, pa = (e, t) => {
688
691
  if (e.composeCode)
689
692
  return `${it}${" ".repeat(t)}${e.composeCode}`;
690
693
  const r = e.jaql().jaql;
691
694
  return `${it}${" ".repeat(t)}filterFactory.customFilter(${G(r, t, !0)})`;
692
- }, ca = (e, t = 0) => {
695
+ }, ga = (e, t = 0) => {
693
696
  if (!e)
694
697
  return "";
695
698
  let r = "";
696
- return r += `[${e.map((a) => sa(a, t + 2))}${e.length ? `
699
+ return r += `[${e.map((a) => pa(a, t + 2))}${e.length ? `
697
700
  ` + " ".repeat(t + 2) : ""}]`, r;
698
- }, ot = (e) => e ? Array.isArray(e) ? ca(e, 6) : "/** Filter relations not supported yet */" : "[]", pa = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], ga = "chartWidgetTmpl", ua = "pivotTableWidgetTmpl", ha = (e) => e, ma = ({
701
+ }, ot = (e) => e ? Array.isArray(e) ? ga(e, 6) : "/** Filter relations not supported yet */" : "[]", ua = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], ha = "chartWidgetTmpl", ma = "pivotTableWidgetTmpl", ba = (e) => e, fa = ({
699
702
  dashboardOid: e,
700
703
  widgetOid: t,
701
704
  uiFramework: r = "react",
702
705
  chartType: a = "table",
703
706
  includeChart: o = !0
704
707
  }) => {
705
- St(a);
708
+ Mt(a);
706
709
  const n = {
707
710
  dashboardOid: e,
708
711
  widgetOid: t
709
- }, l = pa[Number(o)];
712
+ }, l = ua[Number(o)];
710
713
  return Oe(l, n, r);
711
- }, ba = (e, t, r) => {
714
+ }, xa = (e, t, r) => {
712
715
  if (we(e)) {
713
- St(e.chartType);
716
+ Mt(e.chartType);
714
717
  const a = tt(e), o = {
715
718
  idString: e.id,
716
719
  widgetTypeString: "chart",
717
720
  titleString: e.title,
718
721
  dataSourceString: rt(e.dataSource),
719
- chartTypeString: ha(e.chartType),
720
- dataOptionsString: da(e.dataOptions),
722
+ chartTypeString: ba(e.chartType),
723
+ dataOptionsString: ca(e.dataOptions),
721
724
  filtersString: ot(e.filters),
722
725
  componentString: "ChartWidget",
723
726
  extraImportsString: at(e.filters || [], a),
@@ -726,7 +729,7 @@ const it = `
726
729
  };
727
730
  return Oe(r.chart, o, t);
728
731
  }
729
- if ($t(e)) {
732
+ if (Ft(e)) {
730
733
  const a = tt(e), o = {
731
734
  idString: e.id,
732
735
  widgetTypeString: "pivot",
@@ -740,20 +743,20 @@ const it = `
740
743
  };
741
744
  return Oe(r.pivot, o, t);
742
745
  }
743
- if (Jt(e))
746
+ if (Vt(e))
744
747
  return "/** Plugin widget code not supported yet */";
745
748
  throw new se("errors.otherWidgetTypesNotSupported");
746
- }, fa = ({
749
+ }, ka = ({
747
750
  widgetProps: e,
748
751
  uiFramework: t = "react"
749
- }) => ba(e, t, {
750
- chart: ga,
751
- pivot: ua
752
- }), xa = (e) => ({
752
+ }) => xa(e, t, {
753
+ chart: ha,
754
+ pivot: ma
755
+ }), wa = (e) => ({
753
756
  dataOptions: {
754
- columns: e.map(Mt)
757
+ columns: e.map(vt)
755
758
  }
756
- }), ka = Object.freeze({
759
+ }), ya = Object.freeze({
757
760
  convolution: {
758
761
  enabled: !0,
759
762
  selectedConvolutionType: "bySlicesCount",
@@ -779,7 +782,7 @@ const it = `
779
782
  pie: "pie/donut",
780
783
  bar: "bar/stacked",
781
784
  column: "column/stackedcolumn"
782
- }), wa = (e, t, r) => {
785
+ }), _a = (e, t, r) => {
783
786
  const a = e.reduce((n, l) => (n[l.jaql.title] = l, n), {}), o = Object.entries(r).reduce((n, l) => {
784
787
  const [s, d] = l;
785
788
  return n[`${s}`] = Array.isArray(d) ? d.map((c) => {
@@ -794,20 +797,20 @@ const it = `
794
797
  name: m.column.name
795
798
  }
796
799
  };
797
- const w = Mt(f);
800
+ const w = vt(f);
798
801
  if (f.panel === "measures")
799
- return B(A({}, m), {
802
+ return Q(A({}, m), {
800
803
  column: w
801
804
  });
802
- if (er(w.type)) {
805
+ if (Xt(w.type)) {
803
806
  const x = (p = (g = f.format) == null ? void 0 : g.mask) == null ? void 0 : p[f.jaql.level];
804
807
  if (x)
805
- return B(A({}, m), {
808
+ return Q(A({}, m), {
806
809
  column: w,
807
810
  dateFormat: x
808
811
  });
809
812
  }
810
- return B(A({}, m), {
813
+ return Q(A({}, m), {
811
814
  column: w
812
815
  });
813
816
  }) : d, n;
@@ -833,7 +836,7 @@ const it = `
833
836
  n !== "geo" && (o[`${n}`] = o[`${n}`][0]);
834
837
  }), o;
835
838
  case "table":
836
- return Object.keys(o).length === 0 ? xa(e).dataOptions : o;
839
+ return Object.keys(o).length === 0 ? wa(e).dataOptions : o;
837
840
  case "boxplot":
838
841
  case "areamap":
839
842
  case "indicator":
@@ -843,14 +846,14 @@ const it = `
843
846
  }, lt = (e, t) => {
844
847
  var r, a, o, n;
845
848
  return t === "x" ? (a = (r = e.axesMapping.category) != null ? r : e.axesMapping.x) == null ? void 0 : a.map((l) => je(l).column.name).join(", ") : (n = (o = e.axesMapping.value) != null ? o : e.axesMapping.y) == null ? void 0 : n.map((l) => je(l).column.name).join(", ");
846
- }, ya = (e, t, r = !0) => {
849
+ }, Ca = (e, t, r = !0) => {
847
850
  const {
848
851
  chartFamily: a,
849
852
  axesMapping: o = {},
850
853
  styleOptions: n = {}
851
- } = t, l = wa(e, a, o);
854
+ } = t, l = _a(e, a, o);
852
855
  let s;
853
- return r && t.chartType in nt ? s = fe(fe(ka, {
856
+ return r && t.chartType in nt ? s = fe(fe(ya, {
854
857
  subtype: nt[t.chartType]
855
858
  }), {
856
859
  legend: {
@@ -869,15 +872,15 @@ const it = `
869
872
  text: lt(t, "x")
870
873
  }
871
874
  }
872
- }, n) : s = fe(Xt(), n), {
875
+ }, n) : s = fe($t(), n), {
873
876
  dataOptions: l,
874
877
  chartStyleOptions: s
875
878
  };
876
- }, _a = (e) => "chartType" in e ? e : {
879
+ }, va = (e) => "chartType" in e ? e : {
877
880
  chartType: "table",
878
881
  chartFamily: "table",
879
882
  axesMapping: {}
880
- }, Ca = (e) => e.map((t) => Kt(t.jaql)), va = (e) => e.reduce((t, r) => {
883
+ }, Ma = (e) => e.map((t) => Jt(t.jaql)), Sa = (e) => e.reduce((t, r) => {
881
884
  if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(Xe(r)), r.panel !== "scope") {
882
885
  const a = Xe(r);
883
886
  delete a.jaql.filter, t.metadataColumns.push(a);
@@ -886,8 +889,8 @@ const it = `
886
889
  }, {
887
890
  metadataColumns: [],
888
891
  metadataFilters: []
889
- }), Ma = (e, t) => {
890
- if (!Jr(e))
892
+ }), Da = (e, t) => {
893
+ if (!Kr(e))
891
894
  try {
892
895
  const {
893
896
  useCustomizedStyleOptions: r = !1
@@ -898,13 +901,13 @@ const it = `
898
901
  } = e, {
899
902
  metadata: l,
900
903
  datasource: s
901
- } = a, d = B(A({}, s), {
904
+ } = a, d = Q(A({}, s), {
902
905
  type: s.type || "elasticube"
903
- }), c = Ft(d), g = l.map((j) => ia(j)).map((j) => B(A({}, j), {
904
- jaql: B(A({}, j.jaql), {
906
+ }), c = Bt(d), g = l.map((j) => na(j)).map((j) => Q(A({}, j), {
907
+ jaql: Q(A({}, j.jaql), {
905
908
  datasource: c
906
909
  })
907
- })), p = _a(o), m = p.chartType.toLowerCase(), f = {
910
+ })), p = va(o), m = p.chartType.toLowerCase(), f = {
908
911
  cornerRadius: "Small",
909
912
  header: {
910
913
  // remove info button and render empty toolbar instead
@@ -913,10 +916,10 @@ const it = `
913
916
  }, {
914
917
  metadataColumns: w,
915
918
  metadataFilters: x
916
- } = va(g), D = Ca(x), {
919
+ } = Sa(g), D = Ma(x), {
917
920
  dataOptions: I,
918
921
  chartStyleOptions: z
919
- } = ya(w, p, r), y = A(A({}, z), f);
922
+ } = Ca(w, p, r), y = A(A({}, z), f);
920
923
  return {
921
924
  widgetType: "chart",
922
925
  id: n,
@@ -931,32 +934,32 @@ const it = `
931
934
  console.error(r);
932
935
  return;
933
936
  }
934
- }, pe = (e, t) => Ma(e, t), Sa = (e) => Vr(e) ? ma(e) : fa(e), tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
937
+ }, ge = (e, t) => Da(e, t), Ia = (e) => Jr(e) ? fa(e) : ka(e), tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
935
938
  __proto__: null,
936
- toWidgetCode: Sa,
937
- toWidgetProps: pe
939
+ toWidgetCode: Ia,
940
+ toWidgetProps: ge
938
941
  }, Symbol.toStringTag, {
939
942
  value: "Module"
940
943
  }));
941
- var Da = Object.defineProperty, Ia = Object.defineProperties, Aa = Object.getOwnPropertyDescriptors, _e = Object.getOwnPropertySymbols, At = Object.prototype.hasOwnProperty, Lt = Object.prototype.propertyIsEnumerable, dt = (e, t, r) => t in e ? Da(e, t, {
944
+ var Aa = Object.defineProperty, La = Object.defineProperties, Ta = Object.getOwnPropertyDescriptors, _e = Object.getOwnPropertySymbols, It = Object.prototype.hasOwnProperty, At = Object.prototype.propertyIsEnumerable, dt = (e, t, r) => t in e ? Aa(e, t, {
942
945
  enumerable: !0,
943
946
  configurable: !0,
944
947
  writable: !0,
945
948
  value: r
946
949
  }) : e[t] = r, C = (e, t) => {
947
950
  for (var r in t || (t = {}))
948
- At.call(t, r) && dt(e, r, t[r]);
951
+ It.call(t, r) && dt(e, r, t[r]);
949
952
  if (_e)
950
953
  for (var r of _e(t))
951
- Lt.call(t, r) && dt(e, r, t[r]);
954
+ At.call(t, r) && dt(e, r, t[r]);
952
955
  return e;
953
- }, M = (e, t) => Ia(e, Aa(t)), La = (e, t) => {
956
+ }, M = (e, t) => La(e, Ta(t)), Na = (e, t) => {
954
957
  var r = {};
955
958
  for (var a in e)
956
- At.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
959
+ It.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
957
960
  if (e != null && _e)
958
961
  for (var a of _e(e))
959
- t.indexOf(a) < 0 && Lt.call(e, a) && (r[a] = e[a]);
962
+ t.indexOf(a) < 0 && At.call(e, a) && (r[a] = e[a]);
960
963
  return r;
961
964
  }, J = (e, t, r) => new Promise((a, o) => {
962
965
  var n = (d) => {
@@ -974,7 +977,7 @@ var Da = Object.defineProperty, Ia = Object.defineProperties, Aa = Object.getOwn
974
977
  }, s = (d) => d.done ? a(d.value) : Promise.resolve(d.value).then(n, l);
975
978
  s((r = r.apply(e, t)).next());
976
979
  });
977
- class Ta extends Ir {
980
+ class ja extends Dr {
978
981
  constructor(t, r) {
979
982
  super(), this.client = t, this.setOptions(r), this.bindMethods(), this.updateResult();
980
983
  }
@@ -984,7 +987,7 @@ class Ta extends Ir {
984
987
  setOptions(t) {
985
988
  var r;
986
989
  const a = this.options;
987
- this.options = this.client.defaultMutationOptions(t), Ar(a, this.options) || this.client.getMutationCache().notify({
990
+ this.options = this.client.defaultMutationOptions(t), Ir(a, this.options) || this.client.getMutationCache().notify({
988
991
  type: "observerOptionsUpdated",
989
992
  mutation: this.currentMutation,
990
993
  observer: this
@@ -1017,7 +1020,7 @@ class Ta extends Ir {
1017
1020
  })), this.currentMutation.addObserver(this), this.currentMutation.execute();
1018
1021
  }
1019
1022
  updateResult() {
1020
- const t = this.currentMutation ? this.currentMutation.state : Lr(), r = M(C({}, t), {
1023
+ const t = this.currentMutation ? this.currentMutation.state : Ar(), r = M(C({}, t), {
1021
1024
  isLoading: t.status === "loading",
1022
1025
  isSuccess: t.status === "success",
1023
1026
  isError: t.status === "error",
@@ -1047,25 +1050,25 @@ class Ta extends Ir {
1047
1050
  }
1048
1051
  }
1049
1052
  function qe(e, t, r) {
1050
- const a = _r(e, t), o = ce({
1053
+ const a = yr(e, t), o = ce({
1051
1054
  context: a.context
1052
- }), [n] = S(() => new Ta(o, a));
1055
+ }), [n] = S(() => new ja(o, a));
1053
1056
  re(() => {
1054
1057
  n.setOptions(a);
1055
1058
  }, [n, a]);
1056
- const l = Cr(_((d) => n.subscribe(wt.batchCalls(d)), [n]), () => n.getCurrentResult(), () => n.getCurrentResult()), s = _((d, c) => {
1057
- n.mutate(d, c).catch(Na);
1059
+ const l = _r(_((d) => n.subscribe(wt.batchCalls(d)), [n]), () => n.getCurrentResult(), () => n.getCurrentResult()), s = _((d, c) => {
1060
+ n.mutate(d, c).catch(Oa);
1058
1061
  }, [n]);
1059
- if (l.error && vr(n.options.useErrorBoundary, [l.error]))
1062
+ if (l.error && Cr(n.options.useErrorBoundary, [l.error]))
1060
1063
  throw l.error;
1061
1064
  return M(C({}, l), {
1062
1065
  mutate: s,
1063
1066
  mutateAsync: l.mutate
1064
1067
  });
1065
1068
  }
1066
- function Na() {
1069
+ function Oa() {
1067
1070
  }
1068
- class ja {
1071
+ class Ea {
1069
1072
  constructor(t, r = !1) {
1070
1073
  this.volatile = r, this.getChatContexts = () => J(this, null, function* () {
1071
1074
  return (yield this.httpClient.get("api/datasources//")) || [];
@@ -1093,28 +1096,28 @@ class ja {
1093
1096
  }, this.httpClient = t;
1094
1097
  }
1095
1098
  }
1096
- const Oa = new mt({
1099
+ const za = new mt({
1097
1100
  defaultOptions: {
1098
1101
  queries: {
1099
1102
  refetchOnWindowFocus: !1,
1100
1103
  refetchOnMount: !1
1101
1104
  }
1102
1105
  }
1103
- }), Ge = /* @__PURE__ */ ve(void 0), Z = () => We(Ge), Ea = ({
1106
+ }), Ge = /* @__PURE__ */ ve(void 0), Z = () => We(Ge), Ra = ({
1104
1107
  children: e,
1105
1108
  volatile: t
1106
1109
  }) => {
1107
1110
  const {
1108
1111
  app: r
1109
- } = kr(), a = N(() => r ? new ja(r.httpClient, t) : void 0, [r, t]);
1112
+ } = xr(), a = N(() => r ? new Ea(r.httpClient, t) : void 0, [r, t]);
1110
1113
  return /* @__PURE__ */ i(Ge.Provider, {
1111
1114
  value: a,
1112
1115
  children: /* @__PURE__ */ i(kt, {
1113
- client: Oa,
1116
+ client: za,
1114
1117
  children: e
1115
1118
  })
1116
1119
  });
1117
- }, Tt = /* @__PURE__ */ ve({}), za = () => We(Tt), Nt = ({
1120
+ }, Lt = /* @__PURE__ */ ve({}), Za = () => We(Lt), Tt = ({
1118
1121
  children: e
1119
1122
  }) => {
1120
1123
  const [t, r] = S({}), a = _((l, s) => {
@@ -1125,7 +1128,7 @@ const Oa = new mt({
1125
1128
  [a(s, d)]: l
1126
1129
  }));
1127
1130
  }, [a]), n = _((l, s) => t[a(l, s)], [t, a]);
1128
- return /* @__PURE__ */ i(Tt.Provider, {
1131
+ return /* @__PURE__ */ i(Lt.Provider, {
1129
1132
  value: {
1130
1133
  saveChatId: o,
1131
1134
  getChatId: n
@@ -1137,25 +1140,25 @@ function rn({
1137
1140
  children: e,
1138
1141
  volatile: t
1139
1142
  }) {
1140
- return /* @__PURE__ */ i(Nt, {
1141
- children: /* @__PURE__ */ i(Ea, {
1143
+ return /* @__PURE__ */ i(Tt, {
1144
+ children: /* @__PURE__ */ i(Ra, {
1142
1145
  volatile: t,
1143
1146
  children: e
1144
1147
  })
1145
1148
  });
1146
1149
  }
1147
- function Ra(e) {
1150
+ function Wa(e) {
1148
1151
  var t, r;
1149
1152
  if ("jaql" in e)
1150
1153
  return e;
1151
1154
  {
1152
- const a = sr(e.dataSource), {
1155
+ const a = dr(e.dataSource), {
1153
1156
  filters: o = [],
1154
1157
  relations: n
1155
- } = cr(e.filters), {
1158
+ } = sr(e.filters), {
1156
1159
  metadata: l,
1157
1160
  filterRelations: s
1158
- } = pr({
1161
+ } = cr({
1159
1162
  dataSource: e.dataSource,
1160
1163
  attributes: (t = e.dimensions) != null ? t : [],
1161
1164
  measures: (r = e.measures) != null ? r : [],
@@ -1173,7 +1176,7 @@ function Ra(e) {
1173
1176
  }
1174
1177
  }
1175
1178
  const Se = (e, t = !0) => {
1176
- const r = N(() => Ra(e), [e]), a = Z(), {
1179
+ const r = N(() => Wa(e), [e]), a = Z(), {
1177
1180
  data: o,
1178
1181
  error: n,
1179
1182
  isError: l,
@@ -1199,13 +1202,13 @@ const Se = (e, t = !0) => {
1199
1202
  c();
1200
1203
  }, [c])
1201
1204
  };
1202
- }, Za = (e) => {
1205
+ }, qa = (e) => {
1203
1206
  const t = e, {
1204
1207
  enabled: r
1205
- } = t, a = La(t, ["enabled"]);
1208
+ } = t, a = Na(t, ["enabled"]);
1206
1209
  return Se(a, r);
1207
- }, an = Ze("useGetNlgInsights")(Za), Wa = ["indicator", "column", "line", "table", "pie", "bar"];
1208
- function qa(e) {
1210
+ }, an = Ze("useGetNlgInsights")(qa), Ga = ["indicator", "column", "line", "table", "pie", "bar"];
1211
+ function Pa(e) {
1209
1212
  const {
1210
1213
  dataSource: t,
1211
1214
  query: r,
@@ -1217,15 +1220,15 @@ function qa(e) {
1217
1220
  text: r,
1218
1221
  // Timezone is not used by AI API, but it is currently required by the endpoint
1219
1222
  timezone: "UTC",
1220
- chartTypes: a ?? [...Wa]
1223
+ chartTypes: a ?? [...Ga]
1221
1224
  }
1222
1225
  };
1223
1226
  }
1224
- const Ga = (e) => {
1227
+ const Ya = (e) => {
1225
1228
  const {
1226
1229
  contextTitle: t,
1227
1230
  request: r
1228
- } = qa(e), a = Z(), {
1231
+ } = Pa(e), a = Z(), {
1229
1232
  isLoading: o,
1230
1233
  isError: n,
1231
1234
  isSuccess: l,
@@ -1236,7 +1239,7 @@ const Ga = (e) => {
1236
1239
  queryKey: ["getNlqResult", t, r, a],
1237
1240
  queryFn: () => a == null ? void 0 : a.ai.getNlqResult(t, r),
1238
1241
  enabled: !!a && e.enabled
1239
- }), g = s ? pe(s, {
1242
+ }), g = s ? ge(s, {
1240
1243
  useCustomizedStyleOptions: e.enableAxisTitlesInWidgetProps || !1
1241
1244
  }) : void 0;
1242
1245
  return {
@@ -1249,13 +1252,13 @@ const Ga = (e) => {
1249
1252
  c();
1250
1253
  }, [c])
1251
1254
  };
1252
- }, on = Ze("useGetNlqResult")(Ga), Pa = 4, jt = (e) => {
1255
+ }, on = Ze("useGetNlqResult")(Ya), Ha = 4, Nt = (e) => {
1253
1256
  const {
1254
1257
  contextTitle: t,
1255
1258
  count: r,
1256
1259
  enableAxisTitlesInWidgetProps: a,
1257
1260
  enabled: o
1258
- } = e, n = Z(), l = r ?? Pa, s = (o === void 0 || o === !0) && l > 0, {
1261
+ } = e, n = Z(), l = r ?? Ha, s = (o === void 0 || o === !0) && l > 0, {
1259
1262
  isLoading: d,
1260
1263
  isError: c,
1261
1264
  isSuccess: g,
@@ -1269,7 +1272,7 @@ const Ga = (e) => {
1269
1272
  }),
1270
1273
  enabled: !!n && s
1271
1274
  }), w = N(() => p == null ? void 0 : p.map((x) => M(C({}, x), {
1272
- widgetProps: x.jaql ? pe(x, {
1275
+ widgetProps: x.jaql ? ge(x, {
1273
1276
  useCustomizedStyleOptions: a
1274
1277
  }) : void 0
1275
1278
  })), [p, a]);
@@ -1283,28 +1286,28 @@ const Ga = (e) => {
1283
1286
  f();
1284
1287
  }, [f])
1285
1288
  };
1286
- }, nn = Ze("useGetQueryRecommendations")(jt), Ot = Object.freeze({
1289
+ }, nn = Ze("useGetQueryRecommendations")(Nt), jt = Object.freeze({
1287
1290
  enableFollowupQuestions: !1,
1288
1291
  enableHeader: !0,
1289
1292
  enableInsights: !0,
1290
1293
  numOfRecommendations: 4,
1291
1294
  numOfRecentPrompts: 5
1292
- }), Et = /* @__PURE__ */ ve(C({}, Ot)), P = () => We(Et), Ha = ({
1295
+ }), Ot = /* @__PURE__ */ ve(C({}, jt)), P = () => We(Ot), Qa = ({
1293
1296
  children: e,
1294
1297
  value: t
1295
1298
  }) => {
1296
1299
  const {
1297
1300
  t: r
1298
- } = v(), a = Object.entries(t).reduce((o, [n, l]) => (l !== void 0 && (o[n] = l), o), M(C({}, Ot), {
1301
+ } = v(), a = Object.entries(t).reduce((o, [n, l]) => (l !== void 0 && (o[n] = l), o), M(C({}, jt), {
1299
1302
  inputPromptText: r("ai.config.inputPromptText"),
1300
1303
  welcomeText: r("ai.config.welcomeText"),
1301
1304
  suggestionsWelcomeText: r("ai.config.suggestionsWelcomeText")
1302
1305
  }));
1303
- return /* @__PURE__ */ i(Et.Provider, {
1306
+ return /* @__PURE__ */ i(Ot.Provider, {
1304
1307
  value: a,
1305
1308
  children: e
1306
1309
  });
1307
- }, Pe = "chatHistory", Ya = (e) => {
1310
+ }, Pe = "chatHistory", Ba = (e) => {
1308
1311
  const t = Z(), {
1309
1312
  hideHistory: r
1310
1313
  } = P();
@@ -1320,7 +1323,7 @@ const Ga = (e) => {
1320
1323
  }),
1321
1324
  enabled: !!t && !!e
1322
1325
  });
1323
- }, zt = (e) => {
1326
+ }, Et = (e) => {
1324
1327
  const t = Z(), r = ce();
1325
1328
  return qe({
1326
1329
  mutationFn: () => J(void 0, null, function* () {
@@ -1334,14 +1337,14 @@ const Ga = (e) => {
1334
1337
  e && r.setQueriesData([Pe, e], []);
1335
1338
  }
1336
1339
  });
1337
- }, He = (e) => {
1340
+ }, Ye = (e) => {
1338
1341
  const {
1339
1342
  data: t,
1340
1343
  isLoading: r,
1341
1344
  isError: a
1342
- } = Ya(e), {
1345
+ } = Ba(e), {
1343
1346
  mutate: o
1344
- } = zt(e);
1347
+ } = Et(e);
1345
1348
  return re(() => {
1346
1349
  a && o();
1347
1350
  }, [a, o]), {
@@ -1349,7 +1352,7 @@ const Ga = (e) => {
1349
1352
  isLoading: r,
1350
1353
  isError: a
1351
1354
  };
1352
- }, Ba = () => {
1355
+ }, Ua = () => {
1353
1356
  const e = Z(), {
1354
1357
  data: t,
1355
1358
  isLoading: r,
@@ -1367,7 +1370,7 @@ const Ga = (e) => {
1367
1370
  isLoading: r,
1368
1371
  fetchStatus: a
1369
1372
  };
1370
- }, Qa = () => {
1373
+ }, Fa = () => {
1371
1374
  const e = Z(), {
1372
1375
  data: t,
1373
1376
  isLoading: r
@@ -1380,7 +1383,7 @@ const Ga = (e) => {
1380
1383
  data: t ?? [],
1381
1384
  isLoading: r
1382
1385
  };
1383
- }, Ua = (e, t, r) => {
1386
+ }, Va = (e, t, r) => {
1384
1387
  const a = ce(), o = Z(), n = qe({
1385
1388
  mutationFn: () => J(void 0, null, function* () {
1386
1389
  if (!(!o || !e))
@@ -1391,7 +1394,7 @@ const Ga = (e) => {
1391
1394
  return re(() => {
1392
1395
  t && n.isIdle && n.mutate();
1393
1396
  }, [t, n]), n;
1394
- }, Fa = (e, t) => {
1397
+ }, $a = (e, t) => {
1395
1398
  switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
1396
1399
  case "nlq":
1397
1400
  return {
@@ -1408,7 +1411,7 @@ const Ga = (e) => {
1408
1411
  default:
1409
1412
  throw Error(`${t}${JSON.stringify(e)}`);
1410
1413
  }
1411
- }, Va = (e, t) => {
1414
+ }, Ja = (e, t) => {
1412
1415
  const r = ce(), a = _((d) => {
1413
1416
  e && r.setQueriesData([Pe, e], (c) => c && [...c, d]);
1414
1417
  }, [r, e]), {
@@ -1444,26 +1447,26 @@ const Ga = (e) => {
1444
1447
  if (!d)
1445
1448
  return;
1446
1449
  const c = o("ai.errors.unknownResponse");
1447
- a(Fa(d, c));
1450
+ a($a(d, c));
1448
1451
  }
1449
1452
  });
1450
1453
  return {
1451
1454
  mutate: l,
1452
1455
  isLoading: s
1453
1456
  };
1454
- }, Ye = (e, t, r = !1) => {
1457
+ }, He = (e, t, r = !1) => {
1455
1458
  var a;
1456
1459
  const {
1457
1460
  data: o,
1458
1461
  isLoading: n
1459
- } = Qa(), l = za(), s = l.getChatId(e, t) || ((a = o.find((p) => {
1462
+ } = Fa(), l = Za(), s = l.getChatId(e, t) || ((a = o.find((p) => {
1460
1463
  var m;
1461
1464
  return p.contextTitle === e && ((m = p.contextDetails) == null ? void 0 : m.dashboardId) === (t == null ? void 0 : t.dashboardId);
1462
1465
  })) == null ? void 0 : a.chatId), {
1463
1466
  isError: d,
1464
1467
  data: c,
1465
1468
  isSuccess: g
1466
- } = Ua(e, r && !n && !s, t);
1469
+ } = Va(e, r && !n && !s, t);
1467
1470
  return re(() => {
1468
1471
  g && c && !s && l.saveChatId(c.chatId, e, t);
1469
1472
  }, [c, g, e, t, s, l]), {
@@ -1471,14 +1474,14 @@ const Ga = (e) => {
1471
1474
  isLoading: n,
1472
1475
  isError: d
1473
1476
  };
1474
- }, Rt = (e) => N(() => {
1477
+ }, zt = (e) => N(() => {
1475
1478
  if (e != null && e.length) {
1476
1479
  const t = e[e.length - 1];
1477
- if (Be(t))
1480
+ if (Qe(t))
1478
1481
  return JSON.parse(t.content);
1479
1482
  }
1480
1483
  return null;
1481
- }, [e]), Be = (e) => !!e && "type" in e && e.type === "nlq", $a = (e) => !!e && "type" in e && e.type === "text", Ja = (e, t) => {
1484
+ }, [e]), Qe = (e) => !!e && "type" in e && e.type === "nlq", Xa = (e) => !!e && "type" in e && e.type === "text", Ka = (e, t) => {
1482
1485
  const {
1483
1486
  t: r
1484
1487
  } = v(), {
@@ -1486,18 +1489,18 @@ const Ga = (e) => {
1486
1489
  } = P(), {
1487
1490
  chatId: o,
1488
1491
  isError: n
1489
- } = Ye(e, t, !0), [l, s] = S(null), {
1492
+ } = He(e, t, !0), [l, s] = S(null), {
1490
1493
  history: d,
1491
1494
  isLoading: c,
1492
1495
  isError: g
1493
- } = He(o);
1496
+ } = Ye(o);
1494
1497
  re(() => {
1495
1498
  n ? s(new se("ai.errors.chatUnavailable")) : g && s(new se("ai.errors.fetchHistory"));
1496
1499
  }, [n, g, r]);
1497
1500
  const {
1498
1501
  mutate: p,
1499
1502
  isLoading: m
1500
- } = Va(o, a), f = Rt(d);
1503
+ } = Ja(o, a), f = zt(d);
1501
1504
  return {
1502
1505
  chatId: o,
1503
1506
  history: d ?? [],
@@ -1513,39 +1516,39 @@ const Ga = (e) => {
1513
1516
  }) => {
1514
1517
  const {
1515
1518
  chatId: r
1516
- } = Ye(e, t), {
1519
+ } = He(e, t), {
1517
1520
  history: a
1518
- } = He(r);
1519
- return Rt(a);
1521
+ } = Ye(r);
1522
+ return zt(a);
1520
1523
  }, dn = ({
1521
1524
  contextTitle: e,
1522
1525
  contextDetails: t
1523
1526
  }) => {
1524
1527
  const {
1525
1528
  chatId: r
1526
- } = Ye(e, t), {
1529
+ } = He(e, t), {
1527
1530
  history: a
1528
- } = He(r);
1531
+ } = Ye(r);
1529
1532
  return N(() => {
1530
1533
  if (a != null && a.length) {
1531
- const o = a.slice().reverse().find(Be);
1534
+ const o = a.slice().reverse().find(Qe);
1532
1535
  if (o)
1533
1536
  return JSON.parse(o.content);
1534
1537
  }
1535
1538
  return null;
1536
1539
  }, [a]);
1537
- }, Xa = 500, Ka = 500, ei = 500, ti = 900, ri = /* @__PURE__ */ u("div", {
1540
+ }, ei = 500, ti = 500, ri = 500, ai = 900, ii = /* @__PURE__ */ u("div", {
1538
1541
  target: "e1ldv6710",
1539
1542
  label: "ChatFrame"
1540
1543
  })("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:", ({
1541
1544
  theme: e
1542
1545
  }) => e.aiChat.borderRadius, ";background-color:", ({
1543
1546
  theme: e
1544
- }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", Xa, "px;min-height:", Ka, "px;width:", ({
1547
+ }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", ei, "px;min-height:", ti, "px;width:", ({
1545
1548
  width: e
1546
- }) => e ? st(e) : `${ei}px`, ";height:", ({
1549
+ }) => e ? st(e) : `${ri}px`, ";height:", ({
1547
1550
  height: e
1548
- }) => e ? st(e) : `${ti}px`, ";", ({
1551
+ }) => e ? st(e) : `${ai}px`, ";", ({
1549
1552
  theme: e
1550
1553
  }) => T`
1551
1554
  font-size: ${e.aiChat.primaryFontSize[0]};
@@ -1556,7 +1559,7 @@ const Ga = (e) => {
1556
1559
  function st(e) {
1557
1560
  return typeof e == "number" ? `${e}px` : e;
1558
1561
  }
1559
- function ai({
1562
+ function oi({
1560
1563
  spin: e
1561
1564
  }) {
1562
1565
  return /* @__PURE__ */ h("svg", {
@@ -1584,12 +1587,12 @@ function De() {
1584
1587
  return /* @__PURE__ */ i("div", {
1585
1588
  className: "csdk-m-auto",
1586
1589
  "aria-label": "loading spinner",
1587
- children: /* @__PURE__ */ i(ai, {
1590
+ children: /* @__PURE__ */ i(oi, {
1588
1591
  spin: !0
1589
1592
  })
1590
1593
  });
1591
1594
  }
1592
- function ii({
1595
+ function ni({
1593
1596
  theme: e
1594
1597
  }) {
1595
1598
  return /* @__PURE__ */ i("svg", {
@@ -1604,7 +1607,7 @@ function ii({
1604
1607
  })
1605
1608
  });
1606
1609
  }
1607
- function oi({
1610
+ function li({
1608
1611
  theme: e
1609
1612
  }) {
1610
1613
  const t = e.aiChat.icons.color;
@@ -1626,17 +1629,17 @@ function oi({
1626
1629
  })]
1627
1630
  });
1628
1631
  }
1629
- const ni = /* @__PURE__ */ u("div", {
1632
+ const di = /* @__PURE__ */ u("div", {
1630
1633
  target: "e1q6h1ze0",
1631
1634
  label: "Section"
1632
- })("display:flex;flex-direction:column;row-gap:4px;"), li = /* @__PURE__ */ u("div", {
1635
+ })("display:flex;flex-direction:column;row-gap:4px;"), si = /* @__PURE__ */ u("div", {
1633
1636
  target: "e1q6h1ze1",
1634
1637
  label: "SectionHeader"
1635
1638
  })("font-size:11px;line-height:18px;font-weight:300;color:", ({
1636
1639
  theme: e
1637
1640
  }) => e.aiChat.dropup.headers.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
1638
1641
  theme: e
1639
- }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), di = /* @__PURE__ */ u("div", {
1642
+ }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), ci = /* @__PURE__ */ u("div", {
1640
1643
  target: "e1q6h1ze2",
1641
1644
  label: "DropupItem"
1642
1645
  })("font-size:", ({
@@ -1648,7 +1651,7 @@ const ni = /* @__PURE__ */ u("div", {
1648
1651
  }) => e.aiChat.dropup.items.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
1649
1652
  theme: e
1650
1653
  }) => e.aiChat.dropup.items.hover.backgroundColor, ";}");
1651
- function si({
1654
+ function pi({
1652
1655
  title: e,
1653
1656
  items: t,
1654
1657
  onSelect: r,
@@ -1657,19 +1660,19 @@ function si({
1657
1660
  const [o, n] = S(!1), {
1658
1661
  themeSettings: l
1659
1662
  } = k();
1660
- return /* @__PURE__ */ h(ni, {
1661
- children: [/* @__PURE__ */ i(li, {
1663
+ return /* @__PURE__ */ h(di, {
1664
+ children: [/* @__PURE__ */ i(si, {
1662
1665
  onClick: () => n((s) => !s),
1663
1666
  theme: l,
1664
1667
  children: e.toUpperCase()
1665
- }), (o || a) && t.map((s, d) => /* @__PURE__ */ i(di, {
1668
+ }), (o || a) && t.map((s, d) => /* @__PURE__ */ i(ci, {
1666
1669
  onClick: () => r(s),
1667
1670
  theme: l,
1668
1671
  children: s
1669
1672
  }, d))]
1670
1673
  });
1671
1674
  }
1672
- const ci = /* @__PURE__ */ u("div", {
1675
+ const gi = /* @__PURE__ */ u("div", {
1673
1676
  target: "e10x5x4a0",
1674
1677
  label: "PopupContent"
1675
1678
  })("font-family:", ({
@@ -1684,7 +1687,7 @@ const ci = /* @__PURE__ */ u("div", {
1684
1687
  theme: e
1685
1688
  }) => e.aiChat.dropup.borderRadius, ";box-shadow:", ({
1686
1689
  theme: e
1687
- }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), pi = /* @__PURE__ */ u("div", {
1690
+ }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), ui = /* @__PURE__ */ u("div", {
1688
1691
  target: "e10x5x4a1",
1689
1692
  label: "ErrorMessage"
1690
1693
  })("font-size:", ({
@@ -1694,7 +1697,7 @@ const ci = /* @__PURE__ */ u("div", {
1694
1697
  }) => e.aiChat.primaryFontSize[1], ";color:", ({
1695
1698
  theme: e
1696
1699
  }) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"), ze = (e) => e.startsWith("/");
1697
- function gi({
1700
+ function hi({
1698
1701
  recentPrompts: e,
1699
1702
  suggestions: t,
1700
1703
  isLoading: r,
@@ -1729,21 +1732,21 @@ function gi({
1729
1732
  sx: {
1730
1733
  zIndex: 3
1731
1734
  },
1732
- children: /* @__PURE__ */ h(ci, {
1735
+ children: /* @__PURE__ */ h(gi, {
1733
1736
  style: {
1734
1737
  width: o == null ? void 0 : o.offsetWidth
1735
1738
  },
1736
1739
  theme: d,
1737
- children: [r && /* @__PURE__ */ i(De, {}), !r && !l && s.map((p) => /* @__PURE__ */ i(si, M(C({}, p), {
1740
+ children: [r && /* @__PURE__ */ i(De, {}), !r && !l && s.map((p) => /* @__PURE__ */ i(pi, M(C({}, p), {
1738
1741
  alwaysExpanded: g
1739
- }), p.title)), l && /* @__PURE__ */ i(pi, {
1742
+ }), p.title)), l && /* @__PURE__ */ i(ui, {
1740
1743
  theme: d,
1741
1744
  children: c("ai.errors.recommendationsNotAvailable")
1742
1745
  })]
1743
1746
  })
1744
1747
  });
1745
1748
  }
1746
- function ge({
1749
+ function ue({
1747
1750
  title: e,
1748
1751
  placement: t = "top",
1749
1752
  children: r
@@ -1751,7 +1754,7 @@ function ge({
1751
1754
  const {
1752
1755
  themeSettings: a
1753
1756
  } = k();
1754
- return /* @__PURE__ */ i(Er, {
1757
+ return /* @__PURE__ */ i(Or, {
1755
1758
  title: e,
1756
1759
  placement: t,
1757
1760
  disableInteractive: !0,
@@ -1779,15 +1782,15 @@ function ge({
1779
1782
  children: r
1780
1783
  });
1781
1784
  }
1782
- const ui = 500, hi = /* @__PURE__ */ u("div", {
1785
+ const mi = 500, bi = /* @__PURE__ */ u("div", {
1783
1786
  target: "e6iwkw10",
1784
1787
  label: "ChatInputContainer"
1785
1788
  })("display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;background-color:", ({
1786
1789
  theme: e
1787
- }) => e.aiChat.backgroundColor, ";"), mi = /* @__PURE__ */ u("button", {
1790
+ }) => e.aiChat.backgroundColor, ";"), fi = /* @__PURE__ */ u("button", {
1788
1791
  target: "e6iwkw11",
1789
1792
  label: "ClearHistoryButton"
1790
- })("height:34px;background-color:inherit;cursor:pointer;border:none;"), bi = /* @__PURE__ */ u("textarea", {
1793
+ })("height:34px;background-color:inherit;cursor:pointer;border:none;"), xi = /* @__PURE__ */ u("textarea", {
1791
1794
  target: "e6iwkw12",
1792
1795
  label: "TextInput"
1793
1796
  })("font-size:inherit;line-height:inherit;resize:none;overflow-y:auto;box-sizing:border-box;max-height:88px;width:100%;padding-top:7px;padding-bottom:7px;padding-left:16px;padding-right:16px;margin-left:10px;margin-right:10px;border-width:1px;border-color:rgb(38 46 61 / 0.15);border-radius:0.5rem;&:focus{outline:1px solid ", ({
@@ -1796,7 +1799,7 @@ const ui = 500, hi = /* @__PURE__ */ u("div", {
1796
1799
  theme: e
1797
1800
  }) => e.aiChat.primaryTextColor, ";background-color:", ({
1798
1801
  theme: e
1799
- }) => e.aiChat.input.backgroundColor, ";"), fi = /* @__PURE__ */ u("button", {
1802
+ }) => e.aiChat.input.backgroundColor, ";"), ki = /* @__PURE__ */ u("button", {
1800
1803
  target: "e6iwkw13",
1801
1804
  label: "SendMessageButton"
1802
1805
  })("height:34px;background-color:inherit;border-style:none;color:", ({
@@ -1809,8 +1812,8 @@ const ui = 500, hi = /* @__PURE__ */ u("div", {
1809
1812
  ` : T`
1810
1813
  opacity: 1;
1811
1814
  cursor: pointer;
1812
- `), xi = 34;
1813
- function ki({
1815
+ `), wi = 34;
1816
+ function yi({
1814
1817
  onSendMessage: e,
1815
1818
  onClearHistoryClick: t,
1816
1819
  disabled: r,
@@ -1839,7 +1842,7 @@ function ki({
1839
1842
  s == null || s(y.target.value), c(y.target.value);
1840
1843
  }, [s]), x = $(null);
1841
1844
  ye(() => {
1842
- x.current && (x.current.style.height = "inherit", x.current.style.height = `${Math.max(x.current.scrollHeight + 2, xi)}px`);
1845
+ x.current && (x.current.style.height = "inherit", x.current.style.height = `${Math.max(x.current.scrollHeight + 2, wi)}px`);
1843
1846
  }, [d]), ye(() => {
1844
1847
  x.current && x.current.focus({
1845
1848
  preventScroll: !0
@@ -1852,18 +1855,18 @@ function ki({
1852
1855
  } = v(), z = _((y) => {
1853
1856
  var j;
1854
1857
  if ((j = document.getElementById("csdk-chatbot-frame")) != null && j.contains(y.relatedTarget)) {
1855
- const H = (W) => {
1858
+ const Y = (W) => {
1856
1859
  var U;
1857
- document.removeEventListener("mouseup", H), document.removeEventListener("keyup", H), W.type === "mouseup" && ((U = document.getSelection()) == null ? void 0 : U.type) !== "Range" && y.target.focus({
1860
+ document.removeEventListener("mouseup", Y), document.removeEventListener("keyup", Y), W.type === "mouseup" && ((U = document.getSelection()) == null ? void 0 : U.type) !== "Range" && y.target.focus({
1858
1861
  preventScroll: !0
1859
1862
  });
1860
1863
  };
1861
- document.addEventListener("mouseup", H), document.addEventListener("keyup", H);
1864
+ document.addEventListener("mouseup", Y), document.addEventListener("keyup", Y);
1862
1865
  }
1863
1866
  }, []);
1864
- return /* @__PURE__ */ h(hi, {
1867
+ return /* @__PURE__ */ h(bi, {
1865
1868
  theme: D,
1866
- children: [/* @__PURE__ */ i(gi, {
1869
+ children: [/* @__PURE__ */ i(hi, {
1867
1870
  recentPrompts: a,
1868
1871
  suggestions: o,
1869
1872
  isLoading: n,
@@ -1871,20 +1874,20 @@ function ki({
1871
1874
  anchorEl: x.current,
1872
1875
  text: d,
1873
1876
  recommendationsError: l
1874
- }), t && /* @__PURE__ */ i(ge, {
1877
+ }), t && /* @__PURE__ */ i(ue, {
1875
1878
  title: I("ai.buttons.clearChat"),
1876
1879
  placement: "bottom-start",
1877
- children: /* @__PURE__ */ i(mi, {
1880
+ children: /* @__PURE__ */ i(fi, {
1878
1881
  "aria-label": "clear history",
1879
1882
  onClick: t,
1880
- children: /* @__PURE__ */ i(oi, {
1883
+ children: /* @__PURE__ */ i(li, {
1881
1884
  theme: D
1882
1885
  })
1883
1886
  })
1884
- }), /* @__PURE__ */ i(bi, {
1887
+ }), /* @__PURE__ */ i(xi, {
1885
1888
  "aria-label": "chat input",
1886
1889
  onBlur: z,
1887
- maxLength: ui,
1890
+ maxLength: mi,
1888
1891
  ref: x,
1889
1892
  rows: 1,
1890
1893
  onChange: w,
@@ -1893,21 +1896,21 @@ function ki({
1893
1896
  value: d,
1894
1897
  onKeyDown: f,
1895
1898
  theme: D
1896
- }), /* @__PURE__ */ i(fi, {
1899
+ }), /* @__PURE__ */ i(ki, {
1897
1900
  "aria-label": "send chat message",
1898
1901
  disabled: r || d.length === 0,
1899
1902
  onClick: p,
1900
1903
  theme: D,
1901
1904
  children: /* @__PURE__ */ i("span", {
1902
1905
  "data-state": "closed",
1903
- children: /* @__PURE__ */ i(ii, {
1906
+ children: /* @__PURE__ */ i(ni, {
1904
1907
  theme: D
1905
1908
  })
1906
1909
  })
1907
1910
  })]
1908
1911
  });
1909
1912
  }
1910
- const wi = /* @__PURE__ */ u("div", {
1913
+ const _i = /* @__PURE__ */ u("div", {
1911
1914
  target: "er3yjg60",
1912
1915
  label: "FlexContainer"
1913
1916
  })("display:flex;", ({
@@ -1916,7 +1919,7 @@ const wi = /* @__PURE__ */ u("div", {
1916
1919
  justify-content: flex-end;
1917
1920
  ` : T`
1918
1921
  justify-content: flex-start;
1919
- `), Zt = /* @__PURE__ */ u("div", {
1922
+ `), Rt = /* @__PURE__ */ u("div", {
1920
1923
  target: "er3yjg61",
1921
1924
  label: "MessageContainer"
1922
1925
  })("font-size:inherit;line-height:inherit;padding-top:8.5px;padding-bottom:8.5px;padding-left:0.5rem;padding-right:0.5rem;white-space:pre-wrap;overflow-wrap:break-word;box-sizing:border-box;", ({
@@ -1936,56 +1939,56 @@ const wi = /* @__PURE__ */ u("div", {
1936
1939
  }) => e.aiChat.primaryTextColor, ";background-color:", ({
1937
1940
  theme: e,
1938
1941
  align: t
1939
- }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), Q = ({
1942
+ }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), B = ({
1940
1943
  align: e,
1941
1944
  children: t
1942
1945
  }) => {
1943
1946
  const {
1944
1947
  themeSettings: r
1945
1948
  } = k();
1946
- return /* @__PURE__ */ i(wi, {
1949
+ return /* @__PURE__ */ i(_i, {
1947
1950
  theme: r,
1948
1951
  align: e,
1949
- children: /* @__PURE__ */ i(Zt, {
1952
+ children: /* @__PURE__ */ i(Rt, {
1950
1953
  theme: r,
1951
1954
  align: e,
1952
1955
  children: t
1953
1956
  })
1954
1957
  });
1955
1958
  };
1956
- function yi() {
1959
+ function Ci() {
1957
1960
  const {
1958
1961
  welcomeText: e
1959
1962
  } = P();
1960
- return e === !1 ? null : /* @__PURE__ */ i(Q, {
1963
+ return e === !1 ? null : /* @__PURE__ */ i(B, {
1961
1964
  align: "left",
1962
1965
  children: e
1963
1966
  });
1964
1967
  }
1965
- const _i = /* @__PURE__ */ u("div", {
1968
+ const vi = /* @__PURE__ */ u("div", {
1966
1969
  target: "e1r5p4wy0",
1967
1970
  label: "Container"
1968
- })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), Ci = /* @__PURE__ */ u("div", {
1971
+ })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), Mi = /* @__PURE__ */ u("div", {
1969
1972
  target: "e1r5p4wy1",
1970
1973
  label: "Title"
1971
1974
  })("color:", ({
1972
1975
  theme: e
1973
- }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), vi = /* @__PURE__ */ u("div", {
1976
+ }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), Si = /* @__PURE__ */ u("div", {
1974
1977
  target: "e1r5p4wy2",
1975
1978
  label: "ActionButton"
1976
1979
  })("color:rgba(54,163,217,1);cursor:pointer;");
1977
- function Wt({
1980
+ function Zt({
1978
1981
  text: e,
1979
1982
  action: t
1980
1983
  }) {
1981
1984
  const {
1982
1985
  themeSettings: r
1983
1986
  } = k();
1984
- return /* @__PURE__ */ h(_i, {
1985
- children: [/* @__PURE__ */ i(Ci, {
1987
+ return /* @__PURE__ */ h(vi, {
1988
+ children: [/* @__PURE__ */ i(Mi, {
1986
1989
  theme: r,
1987
1990
  children: e
1988
- }), /* @__PURE__ */ i(Mr, {}), t && /* @__PURE__ */ i(vi, {
1991
+ }), /* @__PURE__ */ i(vr, {}), t && /* @__PURE__ */ i(Si, {
1989
1992
  onClick: t.onClick,
1990
1993
  children: t.text
1991
1994
  })]
@@ -1995,7 +1998,7 @@ const be = /* @__PURE__ */ u("div", {
1995
1998
  target: "e3ryei50",
1996
1999
  label: "Dot"
1997
2000
  })("width:5px;height:5px;border-radius:50%;background-color:", (e) => e.color, ";animation:hop 0.9s ease-out infinite;&:nth-of-type(2){animation-delay:0.1s;}&:nth-of-type(3){animation-delay:0.2s;}&:nth-of-type(4){animation-delay:0.3s;}@keyframes hop{0%,40%{transform:translateY(0);}20%{transform:translateY(-100%);}}");
1998
- function Qe() {
2001
+ function Be() {
1999
2002
  const {
2000
2003
  themeSettings: e
2001
2004
  } = k(), t = e.aiChat.icons.color;
@@ -2013,7 +2016,7 @@ function Qe() {
2013
2016
  })]
2014
2017
  });
2015
2018
  }
2016
- const Mi = /* @__PURE__ */ u("div", {
2019
+ const Di = /* @__PURE__ */ u("div", {
2017
2020
  target: "ed5z2fc0",
2018
2021
  label: "FlexContainer"
2019
2022
  })("display:flex;", ({
@@ -2022,7 +2025,7 @@ const Mi = /* @__PURE__ */ u("div", {
2022
2025
  justify-content: flex-end;
2023
2026
  ` : T`
2024
2027
  justify-content: flex-start;
2025
- `), Si = /* @__PURE__ */ u("button", {
2028
+ `), Ii = /* @__PURE__ */ u("button", {
2026
2029
  target: "ed5z2fc1",
2027
2030
  label: "MessageButton"
2028
2031
  })("font-family:inherit;font-size:inherit;line-height:inherit;border:", ({
@@ -2087,9 +2090,9 @@ function Ce({
2087
2090
  const {
2088
2091
  themeSettings: l
2089
2092
  } = k();
2090
- return /* @__PURE__ */ i(Mi, {
2093
+ return /* @__PURE__ */ i(Di, {
2091
2094
  align: t,
2092
- children: /* @__PURE__ */ i(Si, {
2095
+ children: /* @__PURE__ */ i(Ii, {
2093
2096
  "aria-label": n,
2094
2097
  theme: l,
2095
2098
  onClick: r,
@@ -2100,7 +2103,7 @@ function Ce({
2100
2103
  })
2101
2104
  });
2102
2105
  }
2103
- function Di({
2106
+ function Ai({
2104
2107
  onCancel: e,
2105
2108
  onConfirm: t
2106
2109
  }) {
@@ -2108,7 +2111,7 @@ function Di({
2108
2111
  t: r
2109
2112
  } = v();
2110
2113
  return /* @__PURE__ */ h(O, {
2111
- children: [/* @__PURE__ */ i(Q, {
2114
+ children: [/* @__PURE__ */ i(B, {
2112
2115
  align: "left",
2113
2116
  children: r("ai.clearHistoryPrompt")
2114
2117
  }), /* @__PURE__ */ h("div", {
@@ -2133,19 +2136,19 @@ function Di({
2133
2136
  })]
2134
2137
  });
2135
2138
  }
2136
- function Ii(e) {
2137
- return Tr("MuiDialog", e);
2139
+ function Li(e) {
2140
+ return Lr("MuiDialog", e);
2138
2141
  }
2139
- const Ne = nr("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), qt = /* @__PURE__ */ ve({});
2140
- process.env.NODE_ENV !== "production" && (qt.displayName = "DialogContext");
2141
- const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"], Li = Me(lr, {
2142
+ const Ne = or("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Wt = /* @__PURE__ */ ve({});
2143
+ process.env.NODE_ENV !== "production" && (Wt.displayName = "DialogContext");
2144
+ const Ti = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"], Ni = Me(nr, {
2142
2145
  name: "MuiDialog",
2143
2146
  slot: "Backdrop",
2144
2147
  overrides: (e, t) => t.backdrop
2145
2148
  })({
2146
2149
  // Improve scrollable dialog support.
2147
2150
  zIndex: -1
2148
- }), Ti = (e) => {
2151
+ }), ji = (e) => {
2149
2152
  const {
2150
2153
  classes: t,
2151
2154
  scroll: r,
@@ -2157,8 +2160,8 @@ const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2157
2160
  container: ["container", `scroll${ee(r)}`],
2158
2161
  paper: ["paper", `paperScroll${ee(r)}`, `paperWidth${ee(String(a))}`, o && "paperFullWidth", n && "paperFullScreen"]
2159
2162
  };
2160
- return wr(l, Ii, t);
2161
- }, Ni = Me(dr, {
2163
+ return kr(l, Li, t);
2164
+ }, Oi = Me(lr, {
2162
2165
  name: "MuiDialog",
2163
2166
  slot: "Root",
2164
2167
  overridesResolver: (e, t) => t.root
@@ -2167,7 +2170,7 @@ const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2167
2170
  // Use !important to override the Modal inline-style.
2168
2171
  position: "absolute !important"
2169
2172
  }
2170
- }), ji = Me("div", {
2173
+ }), Ei = Me("div", {
2171
2174
  name: "MuiDialog",
2172
2175
  slot: "Container",
2173
2176
  overridesResolver: (e, t) => {
@@ -2200,7 +2203,7 @@ const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2200
2203
  height: "100%",
2201
2204
  width: "0"
2202
2205
  }
2203
- })), Oi = Me(bt, {
2206
+ })), zi = Me(bt, {
2204
2207
  name: "MuiDialog",
2205
2208
  slot: "Paper",
2206
2209
  overridesResolver: (e, t) => {
@@ -2259,11 +2262,11 @@ const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2259
2262
  margin: 0,
2260
2263
  maxWidth: "100%"
2261
2264
  }
2262
- })), Gt = /* @__PURE__ */ xt(function(e, t) {
2263
- const r = gr({
2265
+ })), qt = /* @__PURE__ */ xt(function(e, t) {
2266
+ const r = pr({
2264
2267
  props: e,
2265
2268
  name: "MuiDialog"
2266
- }), a = ur(), o = {
2269
+ }), a = gr(), o = {
2267
2270
  enter: a.transitions.duration.enteringScreen,
2268
2271
  exit: a.transitions.duration.leavingScreen
2269
2272
  }, {
@@ -2283,28 +2286,28 @@ const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2283
2286
  open: z,
2284
2287
  PaperComponent: y = bt,
2285
2288
  PaperProps: j = {},
2286
- scroll: H = "paper",
2287
- TransitionComponent: W = yr,
2289
+ scroll: Y = "paper",
2290
+ TransitionComponent: W = wr,
2288
2291
  transitionDuration: U = o,
2289
2292
  TransitionProps: Ie
2290
- } = r, he = hr(r, Ai), F = V({}, r, {
2293
+ } = r, he = ur(r, Ti), F = V({}, r, {
2291
2294
  disableEscapeKeyDown: p,
2292
2295
  fullScreen: m,
2293
2296
  fullWidth: f,
2294
2297
  maxWidth: w,
2295
- scroll: H
2296
- }), X = Ti(F), ae = $(), Ae = (q) => {
2298
+ scroll: Y
2299
+ }), X = ji(F), ae = $(), Ae = (q) => {
2297
2300
  ae.current = q.target === q.currentTarget;
2298
2301
  }, ie = (q) => {
2299
2302
  D && D(q), ae.current && (ae.current = null, x && x(q), I && I(q, "backdropClick"));
2300
- }, oe = mr(l), E = N(() => ({
2303
+ }, oe = hr(l), E = N(() => ({
2301
2304
  titleId: oe
2302
2305
  }), [oe]);
2303
- return /* @__PURE__ */ ne(Ni, V({
2306
+ return /* @__PURE__ */ ne(Oi, V({
2304
2307
  className: Te(X.root, g),
2305
2308
  closeAfterTransition: !0,
2306
2309
  components: {
2307
- Backdrop: Li
2310
+ Backdrop: Ni
2308
2311
  },
2309
2312
  componentsProps: {
2310
2313
  backdrop: V({
@@ -2325,11 +2328,11 @@ const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2325
2328
  timeout: U,
2326
2329
  role: "presentation"
2327
2330
  }, Ie, {
2328
- children: /* @__PURE__ */ ne(ji, {
2331
+ children: /* @__PURE__ */ ne(Ei, {
2329
2332
  className: Te(X.container),
2330
2333
  onMouseDown: Ae,
2331
2334
  ownerState: F,
2332
- children: /* @__PURE__ */ ne(Oi, V({
2335
+ children: /* @__PURE__ */ ne(zi, V({
2333
2336
  as: y,
2334
2337
  elevation: 24,
2335
2338
  role: "dialog",
@@ -2338,7 +2341,7 @@ const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2338
2341
  }, j, {
2339
2342
  className: Te(X.paper, j.className),
2340
2343
  ownerState: F,
2341
- children: /* @__PURE__ */ ne(qt.Provider, {
2344
+ children: /* @__PURE__ */ ne(Wt.Provider, {
2342
2345
  value: E,
2343
2346
  children: c
2344
2347
  })
@@ -2347,7 +2350,7 @@ const Ai = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
2347
2350
  }))
2348
2351
  }));
2349
2352
  });
2350
- process.env.NODE_ENV !== "production" && (Gt.propTypes = {
2353
+ process.env.NODE_ENV !== "production" && (qt.propTypes = {
2351
2354
  // ┌────────────────────────────── Warning ──────────────────────────────┐
2352
2355
  // │ These PropTypes are generated from the TypeScript type definitions. │
2353
2356
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -2479,7 +2482,7 @@ process.env.NODE_ENV !== "production" && (Gt.propTypes = {
2479
2482
  */
2480
2483
  TransitionProps: b.object
2481
2484
  });
2482
- function Ei({
2485
+ function Ri({
2483
2486
  fillColor: e = "#262E3D"
2484
2487
  }) {
2485
2488
  return /* @__PURE__ */ h("svg", {
@@ -2503,105 +2506,7 @@ function Ei({
2503
2506
  })]
2504
2507
  });
2505
2508
  }
2506
- const Pt = {
2507
- row: {
2508
- hover: "rgba(224, 224, 224, 0.3)"
2509
- },
2510
- secondary: {
2511
- default: "rgba(38, 46, 61, 0.1)",
2512
- hover: "rgba(38, 46, 61, 0.17)"
2513
- },
2514
- text: {
2515
- active: "rgba(38, 46, 61, 1)",
2516
- content: "rgba(38, 46, 61, 0.8)",
2517
- secondary: "rgba(38, 46, 61, 0.55)",
2518
- disabled: "rgba(38, 46, 61, 0.3)",
2519
- link: "rgba(54, 163, 217, 1)",
2520
- accented: "rgba(12, 14, 18, 1)",
2521
- linkButton: "#1eaff3",
2522
- primary: "#262E3D"
2523
- },
2524
- UI: {
2525
- default: "#6e737d",
2526
- additional: "rgba(38, 46, 61, 0.4)",
2527
- guiding: "rgba(38, 46, 61, 0.1)"
2528
- },
2529
- background: {
2530
- workspace: "rgba(255, 255, 255, 1)",
2531
- supporting: "rgba(249, 249, 251, 1)",
2532
- priority: "rgba(244, 244, 248, 1)"
2533
- },
2534
- primary: {
2535
- primary: "rgba(255, 203, 5, 1)",
2536
- default: "#FFC805",
2537
- hover: "#F2B900"
2538
- },
2539
- interaction: {
2540
- defaultHover: "rgba(12, 14, 18, 0.07)",
2541
- guidingHover: "rgba(38, 46, 61, 0.17)",
2542
- linkHovered: "rgba(50, 147, 197, 1)",
2543
- primaryHovered: "rgba(242, 185, 0, 1)"
2544
- },
2545
- semantic: {
2546
- info: "rgba(52, 150, 200, 1)",
2547
- success: "rgba(34, 195, 195, 1)",
2548
- warning: "rgba(242, 185, 0, 1)",
2549
- error: "rgba(231, 71, 39, 1)",
2550
- infoBG: "rgba(52, 150, 200, 0.1)",
2551
- successBG: "rgba(34, 195, 195, 0.1)",
2552
- warningBG: "rgba(242, 185, 0, 0.1)",
2553
- errorBG: "rgba(231, 71, 39, 0.1)"
2554
- },
2555
- sisenseDark: {
2556
- text: {
2557
- active: "rgba(235, 239, 247, 1)",
2558
- content: "rgba(235, 239, 247, 0.8)",
2559
- secondary: "rgba(235, 239, 247, 0.55)",
2560
- disabled: "rgba(235, 239, 247, 0.3)",
2561
- link: "rgba(50, 147, 197, 1)",
2562
- accented: "rgba(12, 14, 18, 1)"
2563
- },
2564
- ui: {
2565
- default: "rgba(235, 239, 247, 0.67)",
2566
- additional: "rgba(235, 239, 247, 0.4)",
2567
- guiding: "rgba(235, 239, 247, 0.1)"
2568
- },
2569
- background: {
2570
- workspace: "rgba(12, 14, 18, 1)",
2571
- supporting: "rgba(249, 249, 251, 1)",
2572
- priority: "rgba(244, 244, 248, 1)"
2573
- },
2574
- interaction: {
2575
- defaultHover: "rgba(12, 14, 18, 0.07)",
2576
- guidingHover: "rgba(235, 239, 247, 0.17)",
2577
- linkHovered: "rgba(50, 147, 197, 1)",
2578
- primaryHovered: "rgba(242, 185, 0, 1)"
2579
- },
2580
- semantic: {
2581
- info: "rgba(52, 150, 200, 1)",
2582
- success: "rgba(34, 195, 195, 1)",
2583
- warning: "rgba(242, 185, 0, 1)",
2584
- error: "rgba(231, 71, 39, 1)",
2585
- infoBG: "rgba(52, 150, 200, 0.1)",
2586
- successBG: "rgba(34, 195, 195, 0.1)",
2587
- warningBG: "rgba(242, 185, 0, 0.1)",
2588
- errorBG: "rgba(231, 71, 39, 0.1)"
2589
- }
2590
- }
2591
- }, zi = {
2592
- shouldForwardProp: (e) => !e.startsWith("$")
2593
- }, ue = /* @__PURE__ */ u(Ct, zi, {
2594
- target: "e869yoj0",
2595
- label: "IconButton"
2596
- })(({
2597
- $hoverColor: e
2598
- }) => ({
2599
- padding: 2,
2600
- "&.MuiIconButton-root:hover": {
2601
- backgroundColor: e ?? Pt.interaction.defaultHover
2602
- }
2603
- }));
2604
- function Ri({
2509
+ function Zi({
2605
2510
  fill: e = "rgba(38, 46, 61, 0.67)"
2606
2511
  }) {
2607
2512
  return /* @__PURE__ */ i("svg", {
@@ -2618,7 +2523,7 @@ function Ri({
2618
2523
  })
2619
2524
  });
2620
2525
  }
2621
- function Zi({
2526
+ function Wi({
2622
2527
  fill: e = "rgba(38, 46, 61, 0.67)"
2623
2528
  }) {
2624
2529
  return /* @__PURE__ */ i("svg", {
@@ -2635,7 +2540,7 @@ function Zi({
2635
2540
  })
2636
2541
  });
2637
2542
  }
2638
- function Wi() {
2543
+ function qi() {
2639
2544
  return /* @__PURE__ */ i("svg", {
2640
2545
  xmlns: "http://www.w3.org/2000/svg",
2641
2546
  width: "24",
@@ -2651,35 +2556,18 @@ function Wi() {
2651
2556
  })
2652
2557
  });
2653
2558
  }
2654
- function qi({
2655
- fill: e = "rgba(38, 46, 61, 0.67)"
2656
- }) {
2657
- return /* @__PURE__ */ i("svg", {
2658
- xmlns: "http://www.w3.org/2000/svg",
2659
- width: "24",
2660
- height: "24",
2661
- viewBox: "0 0 24 24",
2662
- fill: "none",
2663
- children: /* @__PURE__ */ i("path", {
2664
- fillRule: "evenodd",
2665
- clipRule: "evenodd",
2666
- d: "M11 7C11 6.44772 11.4477 6 12 6C12.5523 6 13 6.44772 13 7C13 7.55228 12.5523 8 12 8C11.4477 8 11 7.55228 11 7ZM11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12ZM12 16C11.4477 16 11 16.4477 11 17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17C13 16.4477 12.5523 16 12 16Z",
2667
- fill: e
2668
- })
2669
- });
2670
- }
2671
2559
  const Ue = (e) => _t(e.chart.backgroundColor), Gi = ({
2672
2560
  title: e
2673
2561
  }) => {
2674
2562
  const {
2675
2563
  themeSettings: t
2676
2564
  } = k();
2677
- return /* @__PURE__ */ i(ge, {
2565
+ return /* @__PURE__ */ i(ue, {
2678
2566
  title: e,
2679
- children: /* @__PURE__ */ i(ue, {
2567
+ children: /* @__PURE__ */ i(pe, {
2680
2568
  disableTouchRipple: !0,
2681
2569
  $hoverColor: Ue(t),
2682
- children: /* @__PURE__ */ i(Zi, {
2570
+ children: /* @__PURE__ */ i(Wi, {
2683
2571
  fill: t.chart.textColor
2684
2572
  })
2685
2573
  })
@@ -2695,14 +2583,14 @@ const Ue = (e) => _t(e.chart.backgroundColor), Gi = ({
2695
2583
  themeSettings: n
2696
2584
  } = k();
2697
2585
  return /* @__PURE__ */ h(O, {
2698
- children: [/* @__PURE__ */ i(ue, {
2586
+ children: [/* @__PURE__ */ i(pe, {
2699
2587
  onClick: a,
2700
2588
  $hoverColor: Ue(n),
2701
2589
  "aria-label": "three dots button",
2702
- children: /* @__PURE__ */ i(qi, {
2590
+ children: /* @__PURE__ */ i(qr, {
2703
2591
  fill: n.chart.textColor
2704
2592
  })
2705
- }), /* @__PURE__ */ i(Gr, {
2593
+ }), /* @__PURE__ */ i(Yr, {
2706
2594
  anchorEl: t,
2707
2595
  anchorOrigin: {
2708
2596
  vertical: "bottom",
@@ -2714,14 +2602,14 @@ const Ue = (e) => _t(e.chart.backgroundColor), Gi = ({
2714
2602
  },
2715
2603
  open: !!t,
2716
2604
  onClose: o,
2717
- children: e.map((l) => /* @__PURE__ */ h(qr, {
2605
+ children: e.map((l) => /* @__PURE__ */ h(Gr, {
2718
2606
  onClick: () => {
2719
2607
  l.onClick(), o();
2720
2608
  },
2721
2609
  sx: {
2722
2610
  fontSize: "13px",
2723
2611
  fontFamily: n.typography.fontFamily,
2724
- color: Pt.text.content
2612
+ color: Pr.text.content
2725
2613
  },
2726
2614
  disableRipple: !0,
2727
2615
  children: [l.icon, /* @__PURE__ */ i("div", {
@@ -2731,7 +2619,7 @@ const Ue = (e) => _t(e.chart.backgroundColor), Gi = ({
2731
2619
  }, l.title))
2732
2620
  })]
2733
2621
  });
2734
- }, Hi = ({
2622
+ }, Yi = ({
2735
2623
  onClick: e
2736
2624
  }) => {
2737
2625
  const {
@@ -2739,21 +2627,21 @@ const Ue = (e) => _t(e.chart.backgroundColor), Gi = ({
2739
2627
  } = k(), {
2740
2628
  t: r
2741
2629
  } = v();
2742
- return /* @__PURE__ */ i(ge, {
2630
+ return /* @__PURE__ */ i(ue, {
2743
2631
  title: r("ai.preview"),
2744
- children: /* @__PURE__ */ i(ue, {
2632
+ children: /* @__PURE__ */ i(pe, {
2745
2633
  onClick: e,
2746
2634
  $hoverColor: Ue(t),
2747
- children: /* @__PURE__ */ i(Ri, {
2635
+ children: /* @__PURE__ */ i(Zi, {
2748
2636
  fill: t.chart.textColor
2749
2637
  })
2750
2638
  })
2751
2639
  });
2752
- }, Yi = /* @__PURE__ */ u("div", {
2640
+ }, Hi = /* @__PURE__ */ u("div", {
2753
2641
  target: "e1cseu7j0",
2754
2642
  label: "ToolbarContainer"
2755
2643
  })("display:flex;padding-top:6px;padding-bottom:6px;");
2756
- function Bi({
2644
+ function Qi({
2757
2645
  infoTooltipText: e,
2758
2646
  onRefresh: t,
2759
2647
  onExpand: r
@@ -2761,20 +2649,20 @@ function Bi({
2761
2649
  const a = N(() => [{
2762
2650
  title: "Refresh",
2763
2651
  onClick: t,
2764
- icon: /* @__PURE__ */ i(Wi, {})
2652
+ icon: /* @__PURE__ */ i(qi, {})
2765
2653
  }], [t]);
2766
- return /* @__PURE__ */ h(Yi, {
2654
+ return /* @__PURE__ */ h(Hi, {
2767
2655
  "aria-label": "chatbot chart toolbar",
2768
2656
  children: [/* @__PURE__ */ i(Gi, {
2769
2657
  title: e ?? ""
2770
2658
  }), /* @__PURE__ */ i(Pi, {
2771
2659
  items: a
2772
- }), /* @__PURE__ */ i(Hi, {
2660
+ }), /* @__PURE__ */ i(Yi, {
2773
2661
  onClick: r
2774
2662
  })]
2775
2663
  });
2776
2664
  }
2777
- function Qi({
2665
+ function Bi({
2778
2666
  content: e
2779
2667
  }) {
2780
2668
  const [t, r] = S(!1), {
@@ -2783,7 +2671,7 @@ function Qi({
2783
2671
  inlineElement: o,
2784
2672
  expandedElement: n
2785
2673
  } = N(() => {
2786
- const l = pe(e, {
2674
+ const l = ge(e, {
2787
2675
  useCustomizedStyleOptions: !0
2788
2676
  });
2789
2677
  if (l === void 0 || !we(l))
@@ -2795,7 +2683,7 @@ function Qi({
2795
2683
  } = l, c = {
2796
2684
  cornerRadius: "Small",
2797
2685
  header: {
2798
- renderToolbar: (m) => /* @__PURE__ */ i(Bi, {
2686
+ renderToolbar: (m) => /* @__PURE__ */ i(Qi, {
2799
2687
  infoTooltipText: s,
2800
2688
  onRefresh: m,
2801
2689
  onExpand: () => r(!0)
@@ -2803,7 +2691,7 @@ function Qi({
2803
2691
  }
2804
2692
  };
2805
2693
  let g, p;
2806
- if (Zr(l.chartType))
2694
+ if (Rr(l.chartType))
2807
2695
  g = /* @__PURE__ */ i("div", {
2808
2696
  className: "csdk-h-[245px]",
2809
2697
  children: /* @__PURE__ */ i(le, M(C({}, l), {
@@ -2842,7 +2730,7 @@ function Qi({
2842
2730
  };
2843
2731
  }, [e]);
2844
2732
  return /* @__PURE__ */ h(O, {
2845
- children: [o, /* @__PURE__ */ h(Gt, {
2733
+ children: [o, /* @__PURE__ */ h(qt, {
2846
2734
  open: t,
2847
2735
  onClose: () => r(!1),
2848
2736
  maxWidth: "xl",
@@ -2858,10 +2746,10 @@ function Qi({
2858
2746
  children: [/* @__PURE__ */ i("div", {
2859
2747
  className: "csdk-text-ai-lg csdk-semibold",
2860
2748
  children: e.queryTitle
2861
- }), /* @__PURE__ */ i(Ct, {
2749
+ }), /* @__PURE__ */ i(Zr, {
2862
2750
  onClick: () => r(!1),
2863
2751
  "aria-label": "close expanded chart",
2864
- children: /* @__PURE__ */ i(Ei, {
2752
+ children: /* @__PURE__ */ i(Ri, {
2865
2753
  fillColor: a.aiChat.primaryTextColor
2866
2754
  })
2867
2755
  })]
@@ -2898,9 +2786,9 @@ function Fi({
2898
2786
  } = k(), {
2899
2787
  t: a
2900
2788
  } = v();
2901
- return /* @__PURE__ */ i(ge, {
2789
+ return /* @__PURE__ */ i(ue, {
2902
2790
  title: a("ai.buttons.incorrectResponse"),
2903
- children: /* @__PURE__ */ i(ue, {
2791
+ children: /* @__PURE__ */ i(pe, {
2904
2792
  "aria-label": "thumbs-down",
2905
2793
  onClick: e,
2906
2794
  $hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
@@ -2937,9 +2825,9 @@ function $i({
2937
2825
  } = k(), {
2938
2826
  t: a
2939
2827
  } = v();
2940
- return /* @__PURE__ */ i(ge, {
2828
+ return /* @__PURE__ */ i(ue, {
2941
2829
  title: a("ai.buttons.correctResponse"),
2942
- children: /* @__PURE__ */ i(ue, {
2830
+ children: /* @__PURE__ */ i(pe, {
2943
2831
  "aria-label": "thumbs-up",
2944
2832
  onClick: e,
2945
2833
  $hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
@@ -2991,7 +2879,7 @@ function Re({
2991
2879
  buttonVisibility: a = "onHover",
2992
2880
  renderContent: o
2993
2881
  }) {
2994
- const n = Z(), l = Nr(_((p) => {
2882
+ const n = Z(), l = Tr(_((p) => {
2995
2883
  n && n.ai.sendFeedback({
2996
2884
  sourceId: e,
2997
2885
  type: r,
@@ -3044,10 +2932,10 @@ function to({
3044
2932
  } = Se(e), {
3045
2933
  t: o
3046
2934
  } = v();
3047
- return r ? /* @__PURE__ */ i(Qe, {}) : a ? /* @__PURE__ */ i(Q, {
2935
+ return r ? /* @__PURE__ */ i(Be, {}) : a ? /* @__PURE__ */ i(B, {
3048
2936
  align: "left",
3049
2937
  children: o("ai.errors.unexpected")
3050
- }) : /* @__PURE__ */ i(Q, {
2938
+ }) : /* @__PURE__ */ i(B, {
3051
2939
  align: "full",
3052
2940
  children: /* @__PURE__ */ i(Fe, {
3053
2941
  text: t ?? o("ai.errors.insightsNotAvailable")
@@ -3127,12 +3015,12 @@ function no({
3127
3015
  buttonVisibility: t ? "always" : "onHover",
3128
3016
  renderContent: (I) => /* @__PURE__ */ h(O, {
3129
3017
  children: [/* @__PURE__ */ h(ct, {
3130
- children: [/* @__PURE__ */ i(Zt, {
3018
+ children: [/* @__PURE__ */ i(Rt, {
3131
3019
  align: "left",
3132
3020
  theme: o,
3133
3021
  children: d || `Here's ${g} showing ${io(n)}.`
3134
3022
  }), I]
3135
- }), D && /* @__PURE__ */ i(Qi, {
3023
+ }), D && /* @__PURE__ */ i(Bi, {
3136
3024
  content: e
3137
3025
  })]
3138
3026
  })
@@ -3157,23 +3045,23 @@ function lo({
3157
3045
  message: e,
3158
3046
  isLastMessage: t
3159
3047
  }) {
3160
- if (Be(e)) {
3048
+ if (Qe(e)) {
3161
3049
  const a = JSON.parse(e.content);
3162
3050
  return /* @__PURE__ */ i(no, {
3163
3051
  data: a,
3164
3052
  alwaysShowFeedback: t
3165
3053
  });
3166
3054
  }
3167
- const r = $a(e) ? JSON.parse(e.content).answer : e.content;
3168
- return /* @__PURE__ */ i(Q, {
3055
+ const r = Xa(e) ? JSON.parse(e.content).answer : e.content;
3056
+ return /* @__PURE__ */ i(B, {
3169
3057
  align: e.role === "user" ? "right" : "left",
3170
3058
  children: r
3171
3059
  });
3172
3060
  }
3173
- const so = /* @__PURE__ */ zr(lo), co = ({
3061
+ const so = /* @__PURE__ */ Er(lo), co = ({
3174
3062
  error: e,
3175
3063
  displayMessage: t
3176
- }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ i(Q, {
3064
+ }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ i(B, {
3177
3065
  align: "left",
3178
3066
  children: t
3179
3067
  }));
@@ -3184,7 +3072,7 @@ function po({
3184
3072
  t
3185
3073
  } = v();
3186
3074
  return /* @__PURE__ */ i(O, {
3187
- children: e.map((r, a) => /* @__PURE__ */ i(jr, {
3075
+ children: e.map((r, a) => /* @__PURE__ */ i(Nr, {
3188
3076
  fallbackRender: (o) => co(M(C({}, o), {
3189
3077
  displayMessage: t("ai.errors.unexpected")
3190
3078
  })),
@@ -3195,7 +3083,7 @@ function po({
3195
3083
  }, a))
3196
3084
  });
3197
3085
  }
3198
- function Ht({
3086
+ function Gt({
3199
3087
  color: e
3200
3088
  }) {
3201
3089
  return /* @__PURE__ */ i("svg", {
@@ -3218,7 +3106,7 @@ function go({
3218
3106
  "aria-label": "go back",
3219
3107
  className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
3220
3108
  onClick: e,
3221
- children: /* @__PURE__ */ i(Ht, {
3109
+ children: /* @__PURE__ */ i(Gt, {
3222
3110
  color: t
3223
3111
  })
3224
3112
  });
@@ -3349,7 +3237,7 @@ function ko({
3349
3237
  suggestionsWelcomeText: o
3350
3238
  } = P();
3351
3239
  return t ? /* @__PURE__ */ i(xo, {}) : a ? /* @__PURE__ */ h(O, {
3352
- children: [o && /* @__PURE__ */ i(Q, {
3240
+ children: [o && /* @__PURE__ */ i(B, {
3353
3241
  align: "left",
3354
3242
  children: o
3355
3243
  }), /* @__PURE__ */ i(mo, {
@@ -3368,7 +3256,7 @@ const wo = /* @__PURE__ */ u("div", {
3368
3256
  label: "ToolbarTitle"
3369
3257
  })("font-size:18px;line-height:22px;font-weight:600;margin-left:20px;color:", ({
3370
3258
  style: e
3371
- }) => e.textColor, ";"), Yt = /* @__PURE__ */ xt(function({
3259
+ }) => e.textColor, ";"), Pt = /* @__PURE__ */ xt(function({
3372
3260
  title: e,
3373
3261
  leftNav: t,
3374
3262
  rightNav: r,
@@ -3425,7 +3313,7 @@ function vo() {
3425
3313
  });
3426
3314
  }
3427
3315
  const Mo = (e, t) => {
3428
- const r = new Rr(e);
3316
+ const r = new zr(e);
3429
3317
  return r.alpha = t, r;
3430
3318
  }, So = /* @__PURE__ */ u("div", {
3431
3319
  target: "e1rxvpki0",
@@ -3514,7 +3402,7 @@ function No({
3514
3402
  data: m,
3515
3403
  isLoading: f,
3516
3404
  isError: w
3517
- } = jt({
3405
+ } = Nt({
3518
3406
  contextTitle: e,
3519
3407
  count: g
3520
3408
  }), x = N(() => m == null ? void 0 : m.map((L) => L.nlqPrompt), [m]), {
@@ -3523,69 +3411,69 @@ function No({
3523
3411
  isAwaitingResponse: z,
3524
3412
  sendMessage: y,
3525
3413
  isLoading: j,
3526
- chatId: H,
3414
+ chatId: Y,
3527
3415
  lastError: W
3528
- } = Ja(e, r), {
3416
+ } = Ka(e, r), {
3529
3417
  mutate: U,
3530
3418
  isLoading: Ie
3531
- } = zt(H), [he, F] = S(!1), [X, ae] = S(!1), Ae = () => F(!0), ie = () => F(!1), oe = () => {
3419
+ } = Et(Y), [he, F] = S(!1), [X, ae] = S(!1), Ae = () => F(!0), ie = () => F(!1), oe = () => {
3532
3420
  U(), ie();
3533
- }, E = $(null), q = $(null), Bt = () => {
3421
+ }, E = $(null), q = $(null), Yt = () => {
3534
3422
  if (!(E != null && E.current))
3535
3423
  return;
3536
3424
  const {
3537
3425
  scrollTop: L,
3538
- clientHeight: Y,
3426
+ clientHeight: H,
3539
3427
  scrollHeight: $e
3540
3428
  } = E.current;
3541
- if (L === void 0 || Y === void 0 || $e === void 0)
3429
+ if (L === void 0 || H === void 0 || $e === void 0)
3542
3430
  return;
3543
- const Je = $e - L - Y > Y / 2;
3431
+ const Je = $e - L - H > H / 2;
3544
3432
  X !== Je && ae(Je);
3545
3433
  };
3546
3434
  ye(() => {
3547
3435
  E.current && (E.current.scrollTop = E.current.scrollHeight);
3548
3436
  }, [D, he, z]);
3549
- const Qt = $(null), Ve = d ? /* @__PURE__ */ i(Yt, {
3550
- ref: Qt,
3437
+ const Ht = $(null), Ve = d ? /* @__PURE__ */ i(Pt, {
3438
+ ref: Ht,
3551
3439
  title: e,
3552
3440
  leftNav: t && /* @__PURE__ */ i(go, {
3553
3441
  onClick: t,
3554
3442
  color: p.aiChat.header.textColor
3555
3443
  }),
3556
3444
  style: p.aiChat.header
3557
- }) : null, Ut = N(() => [...new Set(D.filter((L) => L.role === "user").filter((L) => !(x != null && x.includes(L.content))).map((L) => L.content).reverse())].slice(0, c), [D, c, x]);
3445
+ }) : null, Qt = N(() => [...new Set(D.filter((L) => L.role === "user").filter((L) => !(x != null && x.includes(L.content))).map((L) => L.content).reverse())].slice(0, c), [D, c, x]);
3558
3446
  return (W == null ? void 0 : W.message) === l("ai.errors.chatUnavailable") ? /* @__PURE__ */ h(O, {
3559
- children: [d && Ve, /* @__PURE__ */ i(Wt, {
3447
+ children: [d && Ve, /* @__PURE__ */ i(Zt, {
3560
3448
  text: W.message
3561
3449
  })]
3562
3450
  }) : /* @__PURE__ */ h(O, {
3563
3451
  children: [Ve, /* @__PURE__ */ h(Ao, {
3564
3452
  ref: E,
3565
3453
  theme: p,
3566
- onScroll: Bt,
3454
+ onScroll: Yt,
3567
3455
  children: [/* @__PURE__ */ i(Io, {
3568
3456
  isVisible: X,
3569
3457
  anchorElement: q.current,
3570
3458
  onClick: () => {
3571
- var L, Y;
3572
- (Y = E.current) == null || Y.scroll({
3459
+ var L, H;
3460
+ (H = E.current) == null || H.scroll({
3573
3461
  top: (L = E.current) == null ? void 0 : L.scrollHeight,
3574
3462
  behavior: "smooth"
3575
3463
  });
3576
3464
  }
3577
- }), /* @__PURE__ */ i(yi, {}), /* @__PURE__ */ i(ko, {
3465
+ }), /* @__PURE__ */ i(Ci, {}), /* @__PURE__ */ i(ko, {
3578
3466
  questions: x || [],
3579
3467
  isLoading: f,
3580
3468
  onSelection: y
3581
- }), W && /* @__PURE__ */ i(Q, {
3469
+ }), W && /* @__PURE__ */ i(B, {
3582
3470
  align: "left",
3583
3471
  children: W.message
3584
3472
  }), j ? /* @__PURE__ */ i(De, {}) : /* @__PURE__ */ i(po, {
3585
3473
  messages: D
3586
3474
  }), s && I && ((o = (a = I.followupQuestions) == null ? void 0 : a.length) != null ? o : 0) > 0 && /* @__PURE__ */ i(To, {
3587
3475
  theme: p,
3588
- children: (n = I.followupQuestions) == null ? void 0 : n.slice(0, 2).map((L, Y) => /* @__PURE__ */ i(Ce, {
3476
+ children: (n = I.followupQuestions) == null ? void 0 : n.slice(0, 2).map((L, H) => /* @__PURE__ */ i(Ce, {
3589
3477
  align: "left",
3590
3478
  onClick: () => {
3591
3479
  y(L);
@@ -3594,20 +3482,20 @@ function No({
3594
3482
  className: "csdk-py-[7px] csdk-px-4",
3595
3483
  children: L
3596
3484
  })
3597
- }, Y))
3598
- }), (z || Ie) && /* @__PURE__ */ i(Qe, {}), he && /* @__PURE__ */ i(Di, {
3485
+ }, H))
3486
+ }), (z || Ie) && /* @__PURE__ */ i(Be, {}), he && /* @__PURE__ */ i(Ai, {
3599
3487
  onCancel: ie,
3600
3488
  onConfirm: oe
3601
3489
  })]
3602
3490
  }), /* @__PURE__ */ h(Lo, {
3603
3491
  ref: q,
3604
3492
  theme: p,
3605
- children: [/* @__PURE__ */ i(ki, {
3493
+ children: [/* @__PURE__ */ i(yi, {
3606
3494
  onSendMessage: y,
3607
3495
  disabled: z || j,
3608
3496
  onClearHistoryClick: Ae,
3609
3497
  suggestions: x || [],
3610
- recentPrompts: Ut,
3498
+ recentPrompts: Qt,
3611
3499
  isLoading: f || j,
3612
3500
  recommendationsError: w,
3613
3501
  onChange: ie
@@ -3662,7 +3550,7 @@ function Ro(e) {
3662
3550
  children: r
3663
3551
  })]
3664
3552
  }), /* @__PURE__ */ i(zo, {
3665
- children: /* @__PURE__ */ i(Ht, {
3553
+ children: /* @__PURE__ */ i(Gt, {
3666
3554
  color: o.aiChat.icons.color
3667
3555
  })
3668
3556
  })]
@@ -3697,16 +3585,16 @@ function Go(e) {
3697
3585
  }), /* @__PURE__ */ h(qo, {
3698
3586
  theme: r,
3699
3587
  children: [a("ai.chatbotDescription"), /* @__PURE__ */ i("br", {}), /* @__PURE__ */ i("br", {}), a("ai.topicSelectPrompt")]
3700
- }), t.map((o) => /* @__PURE__ */ Or(Ro, M(C({}, o), {
3588
+ }), t.map((o) => /* @__PURE__ */ jr(Ro, M(C({}, o), {
3701
3589
  key: o.title
3702
3590
  })))]
3703
3591
  });
3704
3592
  }
3705
- const Po = "#000000", Ho = "#FFFFFF";
3706
- function Yo({
3593
+ const Po = "#000000", Yo = "#FFFFFF";
3594
+ function Ho({
3707
3595
  isDarkBackground: e = !1
3708
3596
  }) {
3709
- const t = e ? Ho : Po;
3597
+ const t = e ? Yo : Po;
3710
3598
  return /* @__PURE__ */ h("svg", {
3711
3599
  width: "32",
3712
3600
  height: "32",
@@ -3764,10 +3652,10 @@ function Yo({
3764
3652
  })]
3765
3653
  });
3766
3654
  }
3767
- const Bo = /* @__PURE__ */ u("div", {
3655
+ const Qo = /* @__PURE__ */ u("div", {
3768
3656
  target: "ealudtn0",
3769
3657
  label: "LogoContainer"
3770
- })("margin-left:14px;margin-top:3px;"), Qo = /* @__PURE__ */ u("div", {
3658
+ })("margin-left:14px;margin-top:3px;"), Bo = /* @__PURE__ */ u("div", {
3771
3659
  target: "ealudtn1",
3772
3660
  label: "DataTopicsContainer"
3773
3661
  })("display:flex;flex-direction:column;justify-content:top;overflow:hidden;height:100%;background-color:", ({
@@ -3786,17 +3674,17 @@ function Uo({
3786
3674
  } = v(), n = N(() => e == null ? void 0 : e.map((s) => ({
3787
3675
  title: s,
3788
3676
  onClick: () => t(s)
3789
- })), [e, t]), l = Sr(Dr(a.aiChat.header.backgroundColor)) > 0.5;
3677
+ })), [e, t]), l = Mr(Sr(a.aiChat.header.backgroundColor)) > 0.5;
3790
3678
  return /* @__PURE__ */ h(O, {
3791
- children: [r ? /* @__PURE__ */ i(Yt, {
3679
+ children: [r ? /* @__PURE__ */ i(Pt, {
3792
3680
  title: o("ai.analyticsChatbot"),
3793
- leftNav: /* @__PURE__ */ i(Bo, {
3794
- children: /* @__PURE__ */ i(Yo, {
3681
+ leftNav: /* @__PURE__ */ i(Qo, {
3682
+ children: /* @__PURE__ */ i(Ho, {
3795
3683
  isDarkBackground: l
3796
3684
  })
3797
3685
  }),
3798
3686
  style: a.aiChat.header
3799
- }) : null, /* @__PURE__ */ h(Qo, {
3687
+ }) : null, /* @__PURE__ */ h(Bo, {
3800
3688
  theme: a,
3801
3689
  children: [!n && /* @__PURE__ */ i(De, {}), n && /* @__PURE__ */ i(Go, {
3802
3690
  dataTopics: n
@@ -3808,7 +3696,7 @@ function Fo() {
3808
3696
  const [e, t] = S(), [r, a] = S(), {
3809
3697
  data: o,
3810
3698
  fetchStatus: n
3811
- } = Ba(), {
3699
+ } = Ua(), {
3812
3700
  dataTopicsList: l,
3813
3701
  contextDetails: s
3814
3702
  } = P(), {
@@ -3824,7 +3712,7 @@ function Fo() {
3824
3712
  }, [o, n, l, g]), m = ce(), f = _(() => {
3825
3713
  a(void 0), m.invalidateQueries(["getDataTopics"]);
3826
3714
  }, [m]);
3827
- return r ? /* @__PURE__ */ i(Wt, {
3715
+ return r ? /* @__PURE__ */ i(Zt, {
3828
3716
  text: r,
3829
3717
  action: {
3830
3718
  text: d("ai.buttons.refresh"),
@@ -3849,9 +3737,9 @@ const sn = ft({
3849
3737
  } = e, {
3850
3738
  themeSettings: o
3851
3739
  } = k();
3852
- return /* @__PURE__ */ i(Ha, {
3740
+ return /* @__PURE__ */ i(Qa, {
3853
3741
  value: a ?? {},
3854
- children: /* @__PURE__ */ i(ri, {
3742
+ children: /* @__PURE__ */ i(ii, {
3855
3743
  id: "csdk-chatbot-frame",
3856
3744
  width: t,
3857
3745
  height: r,
@@ -3947,14 +3835,14 @@ const $o = /* @__PURE__ */ u("div", {
3947
3835
  styleOptions: r,
3948
3836
  filters: a = []
3949
3837
  }) => {
3950
- e.queryTitle = br(e.queryTitle);
3838
+ e.queryTitle = mr(e.queryTitle);
3951
3839
  const {
3952
3840
  connectToWidgetProps: o
3953
- } = fr({
3841
+ } = br({
3954
3842
  initialFilters: a
3955
3843
  }), [n, l] = S(null);
3956
3844
  re(() => {
3957
- const p = pe(e, {
3845
+ const p = ge(e, {
3958
3846
  useCustomizedStyleOptions: !0
3959
3847
  });
3960
3848
  if (!p)
@@ -3969,7 +3857,7 @@ const $o = /* @__PURE__ */ u("div", {
3969
3857
  }
3970
3858
  }, [e, o, r]);
3971
3859
  const s = N(() => {
3972
- const p = n && we(n) ? xr(n == null ? void 0 : n.filters) : [], m = e.jaql.metadata.filter((f) => !f.jaql.filter).concat(p.filter((f) => !f.config.disabled).map((f) => f.jaql()));
3860
+ const p = n && we(n) ? fr(n == null ? void 0 : n.filters) : [], m = e.jaql.metadata.filter((f) => !f.jaql.filter).concat(p.filter((f) => !f.config.disabled).map((f) => f.jaql()));
3973
3861
  return M(C({}, e), {
3974
3862
  jaql: M(C({}, e.jaql), {
3975
3863
  metadata: m
@@ -3981,7 +3869,7 @@ const $o = /* @__PURE__ */ u("div", {
3981
3869
  isLoading: c,
3982
3870
  isError: g
3983
3871
  } = Se(s);
3984
- return c || !n ? /* @__PURE__ */ i(Qe, {}) : we(n) ? /* @__PURE__ */ i(le, M(C({}, n), {
3872
+ return c || !n ? /* @__PURE__ */ i(Be, {}) : we(n) ? /* @__PURE__ */ i(le, M(C({}, n), {
3985
3873
  highlightSelectionDisabled: !0,
3986
3874
  onDataReady: t,
3987
3875
  topSlot: d && !g && /* @__PURE__ */ i(Xo, {
@@ -4001,7 +3889,7 @@ function gn({
4001
3889
  children: e,
4002
3890
  context: t
4003
3891
  }) {
4004
- return /* @__PURE__ */ i(Nt, {
3892
+ return /* @__PURE__ */ i(Tt, {
4005
3893
  children: /* @__PURE__ */ i(Ge.Provider, {
4006
3894
  value: t == null ? void 0 : t.api,
4007
3895
  children: /* @__PURE__ */ i(kt, {
@@ -4024,16 +3912,16 @@ function gn({
4024
3912
  })();
4025
3913
  export {
4026
3914
  rn as AiContextProvider,
4027
- ja as ChatRestApi,
3915
+ Ea as ChatRestApi,
4028
3916
  sn as Chatbot,
4029
3917
  gn as CustomAiContextProvider,
4030
- Pa as DEFAULT_RECOMMENDATIONS_COUNT,
3918
+ Ha as DEFAULT_RECOMMENDATIONS_COUNT,
4031
3919
  cn as GetNlgInsights,
4032
- Wa as NLQ_RESULT_CHART_TYPES,
3920
+ Ga as NLQ_RESULT_CHART_TYPES,
4033
3921
  pn as NlqChartWidget,
4034
- Ra as prepareGetNlgInsightsPayload,
4035
- qa as prepareGetNlqResultPayload,
4036
- Ja as useChatSession,
3922
+ Wa as prepareGetNlgInsightsPayload,
3923
+ Pa as prepareGetNlqResultPayload,
3924
+ Ka as useChatSession,
4037
3925
  dn as useFinalNlqResponse,
4038
3926
  an as useGetNlgInsights,
4039
3927
  on as useGetNlqResult,