@sisense/sdk-ui-vue 2.15.0 → 2.16.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,9 +1,9 @@
1
- import { aF as Xt, aG as Ye, aH as ha, aI as Qe, aJ as ma, aK as ba, aL as be, aM as Kt, aN as fa, aO as b, aP as er, aQ as L, aR as n, aS as E, aT as Q, aU as $e, aV as U, aW as De, aX as N, aY as tr, aZ as xa, a_ as ka, a$ as de, b0 as ya, b1 as ye, b2 as Je, b3 as we, b4 as pt, b5 as wa, b6 as _a, b7 as Ca, b8 as C, b9 as P, ba as va, bb as It, bc as Z, bd as qe, be as v, bf as Ae, bg as Sa, bh as Ma, bi as Ia, bj as Da, bk as Le, bl as Me, bm as Aa, bn as La, bo as rr, bp as Ta, bq as Na, br as ja, bs as Oa, bt as ar, bu as Ea, bv as za, bw as Ra, bx as Za, by as Wa, bz as ir, bA as Pa, bB as qa, bC as Ga, bD as q, bE as Ha, bF as Ba, bG as Ya, bH as Qa, bI as or, bJ as Se, bK as nr, bL as ut, bM as it, bN as Ua, bO as Xe, bP as Fa, bQ as Va, bR as $a, bS as Ja, bT as Xa, bU as Ka, bV as ei, bW as ti, bX as ri, aq as Ee, bY as lr, bZ as ai, b_ as ii, b$ as sr, c0 as oi, c1 as ni, c2 as cr, c3 as li, c4 as si, c5 as ci, D as di, c6 as pi, a as dr, c7 as pr, G as gt, C as ht, J as mt, K as fe, a6 as bt } from "./use-tracking-efb607bb.js";
2
- import { inject as ui, ref as ur, defineComponent as ft, watchEffect as gr, provide as gi, watch as xt, toRefs as kt } from "vue";
3
- let hr = class extends nr {
1
+ import { aG as Ye, aH as Kt, aI as _, aJ as P, aK as er, aL as ma, aM as Ue, aN as ba, aO as fa, aP as fe, aQ as tr, aR as xa, aS as b, aT as rr, aU as ka, aV as ar, aW as ir, aX as L, aY as n, aZ as E, a_ as U, a$ as Q, b0 as Ae, b1 as N, b2 as v, b3 as ya, b4 as wa, b5 as pe, b6 as _a, b7 as we, b8 as Je, b9 as _e, ba as Ca, bb as Xe, bc as gt, bd as va, be as Sa, bf as Ma, bg as Ia, bh as At, bi as Z, bj as qe, bk as Le, bl as Da, bm as Aa, bn as La, bo as Ta, bp as Te, bq as Ie, br as Na, bs as ja, bt as Oa, bu as or, bv as Ea, ar as ze, bw as za, bx as Ra, by as nr, bz as Za, bA as Wa, bB as Pa, bC as Ga, bD as lr, bE as qa, bF as $a, bG as Ha, bH as Ba, bI as Ya, bJ as Ua, bK as Qa, bL as G, bM as Fa, bN as Va, bO as Ja, bP as Me, bQ as sr, bR as ht, bS as ot, bT as Xa, bU as Ke, bV as Ka, bW as ei, bX as ti, bY as ri, bZ as ai, b_ as ii, b$ as oi, c0 as ni, c1 as li, c2 as si, c3 as cr, c4 as ci, c5 as di, c6 as dr, G as pi, c7 as ui, a as pr, c8 as ur, J as mt, D as bt, K as ft, M as xe, a7 as xt } from "./use-tracking-becee384.js";
2
+ import { inject as gi, ref as gr, defineComponent as kt, watchEffect as hr, provide as hi, watch as yt, toRefs as wt } from "vue";
3
+ let mr = class extends sr {
4
4
  constructor(e, t) {
5
5
  var r;
6
- super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType = $a(e.jaql.sort) : delete this.sortType, this.skipValidation = !0;
6
+ super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType = ai(e.jaql.sort) : delete this.sortType, this.skipValidation = !0;
7
7
  }
8
8
  get id() {
9
9
  return this.expression;
@@ -19,23 +19,23 @@ let hr = class extends nr {
19
19
  return e.metadataItem = this.metadataItem, e.type = this.type, e;
20
20
  }
21
21
  };
22
- const hi = {
23
- text: $e.TextAttribute,
24
- numeric: $e.NumericAttribute,
25
- datetime: $e.DateLevel
22
+ const mi = {
23
+ text: Xe.TextAttribute,
24
+ numeric: Xe.NumericAttribute,
25
+ datetime: Xe.DateLevel
26
26
  };
27
- function mi(e) {
27
+ function bi(e) {
28
28
  var t;
29
- return new hr(e, (t = hi[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
29
+ return new mr(e, (t = mi[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
30
30
  }
31
- function mr(e) {
31
+ function br(e) {
32
32
  const {
33
33
  jaql: t
34
34
  } = e;
35
35
  if (t.formula)
36
- return Ja(t);
37
- const r = Xa(t);
38
- return "agg" in t && t.dim && t.datatype ? Ka({
36
+ return ii(t);
37
+ const r = oi(t);
38
+ return "agg" in t && t.dim && t.datatype ? ni({
39
39
  expression: t.dim,
40
40
  dataType: t.datatype,
41
41
  agg: t.agg || "",
@@ -44,7 +44,7 @@ function mr(e) {
44
44
  sort: t.sort,
45
45
  title: t.title,
46
46
  dataSource: t.datasource
47
- }) : t.dim && t.datatype ? ei({
47
+ }) : t.dim && t.datatype ? li({
48
48
  expression: t.dim,
49
49
  dataType: t.datatype,
50
50
  granularity: r,
@@ -52,57 +52,57 @@ function mr(e) {
52
52
  title: t.title,
53
53
  panel: e.panel,
54
54
  dataSource: t.datasource
55
- }) : mi(e);
55
+ }) : bi(e);
56
56
  }
57
- const bi = (e) => "dashboardOid" in e && "widgetOid" in e;
58
- var fi = Object.defineProperty, xi = Object.defineProperties, ki = Object.getOwnPropertyDescriptors, Ge = Object.getOwnPropertySymbols, br = Object.prototype.hasOwnProperty, fr = Object.prototype.propertyIsEnumerable, Dt = (e, t, r) => t in e ? fi(e, t, {
57
+ const fi = (e) => "dashboardOid" in e && "widgetOid" in e;
58
+ var xi = Object.defineProperty, ki = Object.defineProperties, yi = Object.getOwnPropertyDescriptors, $e = Object.getOwnPropertySymbols, fr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable, Lt = (e, t, r) => t in e ? xi(e, t, {
59
59
  enumerable: !0,
60
60
  configurable: !0,
61
61
  writable: !0,
62
62
  value: r
63
63
  }) : e[t] = r, O = (e, t) => {
64
64
  for (var r in t || (t = {}))
65
- br.call(t, r) && Dt(e, r, t[r]);
66
- if (Ge)
67
- for (var r of Ge(t))
68
- fr.call(t, r) && Dt(e, r, t[r]);
65
+ fr.call(t, r) && Lt(e, r, t[r]);
66
+ if ($e)
67
+ for (var r of $e(t))
68
+ xr.call(t, r) && Lt(e, r, t[r]);
69
69
  return e;
70
- }, ee = (e, t) => xi(e, ki(t)), yi = (e, t) => {
70
+ }, te = (e, t) => ki(e, yi(t)), wi = (e, t) => {
71
71
  var r = {};
72
72
  for (var a in e)
73
- br.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
74
- if (e != null && Ge)
75
- for (var a of Ge(e))
76
- t.indexOf(a) < 0 && fr.call(e, a) && (r[a] = e[a]);
73
+ fr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
74
+ if (e != null && $e)
75
+ for (var a of $e(e))
76
+ t.indexOf(a) < 0 && xr.call(e, a) && (r[a] = e[a]);
77
77
  return r;
78
78
  };
79
- function wi(e) {
79
+ function _i(e) {
80
80
  return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
81
81
  }
82
- function _i(e) {
82
+ function Ci(e) {
83
83
  return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
84
84
  }
85
- function xr(e) {
86
- if (![...Wa, "pivot", "pivot2"].includes(e))
87
- throw new Me("errors.chartTypeNotSupported", {
85
+ function kr(e) {
86
+ if (![...Ba, "pivot", "pivot2"].includes(e))
87
+ throw new Ie("errors.chartTypeNotSupported", {
88
88
  chartType: e
89
89
  });
90
90
  }
91
- function Ci(e) {
91
+ function vi(e) {
92
92
  return "widgetType" in e && e.widgetType === "pivot";
93
93
  }
94
- function me(e) {
94
+ function be(e) {
95
95
  var t;
96
96
  return "column" in e && ((t = e.column) == null ? void 0 : t.expression) && /\(.*\)/.test(e.column.expression);
97
97
  }
98
- function At(e) {
99
- const t = "measures" in e && K(e.measures) || "values" in e && K(e.values);
100
- return Ci(e) ? "values" in e.dataOptions && K(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && K(e.dataOptions.value) || "secondary" in e.dataOptions && K(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !K(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => me(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && me(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && me(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && me(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && me(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && me(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && K(e.dataOptions.geo) && "color" in e.dataOptions && K(e.dataOptions.color) : "value" in e.dataOptions && K(e.dataOptions.value) : t;
98
+ function Tt(e) {
99
+ const t = "measures" in e && ee(e.measures) || "values" in e && ee(e.values);
100
+ return vi(e) ? "values" in e.dataOptions && ee(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && ee(e.dataOptions.value) || "secondary" in e.dataOptions && ee(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !ee(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => be(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && be(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && be(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && be(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && be(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && be(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && ee(e.dataOptions.geo) && "color" in e.dataOptions && ee(e.dataOptions.color) : "value" in e.dataOptions && ee(e.dataOptions.value) : t;
101
101
  }
102
- function K(e) {
102
+ function ee(e) {
103
103
  return Array.isArray(e) && e.length > 0;
104
104
  }
105
- function vi(e) {
105
+ function Si(e) {
106
106
  const t = e.split(`
107
107
  `);
108
108
  for (let r = 0; r < t.length - 1; r++)
@@ -116,7 +116,7 @@ function vi(e) {
116
116
  return t.join(`
117
117
  `);
118
118
  }
119
- function Si(e) {
119
+ function Mi(e) {
120
120
  const t = (a) => /^[$A-Z_][0-9A-Z_$]*$/i.test(a);
121
121
  if ("composeCode" in e)
122
122
  return e;
@@ -127,7 +127,7 @@ function Si(e) {
127
127
  }
128
128
  return r;
129
129
  }
130
- const Mi = {
130
+ const Ii = {
131
131
  react: {
132
132
  baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
133
133
  {{extraImportsString}}
@@ -582,10 +582,10 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
582
582
  </template>`,
583
583
  dashboardTmpl: "/** COMING SOON */"
584
584
  }
585
- }, kr = (e, t) => Mi[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => kr(`${a}Tmpl`, t)), Ii = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), ot = (e, t, r = "react") => {
586
- const a = kr(e, r);
587
- return vi(Ii(a, t));
588
- }, Di = () => Object.values(ii).map((e) => sr.aggregationToJAQL(e)).join("|"), yr = (e) => {
585
+ }, yr = (e, t) => Ii[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => yr(`${a}Tmpl`, t)), Di = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), nt = (e, t, r = "react") => {
586
+ const a = yr(e, r);
587
+ return Si(Di(a, t));
588
+ }, Ai = () => Object.values(si).map((e) => cr.aggregationToJAQL(e)).join("|"), wr = (e) => {
589
589
  const {
590
590
  formula: t,
591
591
  context: r,
@@ -599,7 +599,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
599
599
  const l = i[0];
600
600
  if (typeof l != "string")
601
601
  return e;
602
- const s = r[`${l}`], p = Di(), d = new RegExp(`^\\s*(${p})\\(\\[\\w+\\]\\)$`), g = t.match(d);
602
+ const s = r[`${l}`], p = Ai(), d = new RegExp(`^\\s*(${p})\\(\\[\\w+\\]\\)$`), g = t.match(d);
603
603
  if (g && t.includes(l)) {
604
604
  const f = g[1];
605
605
  return O({
@@ -614,16 +614,16 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
614
614
  } : {});
615
615
  }
616
616
  return e;
617
- }, Ze = (e) => {
617
+ }, We = (e) => {
618
618
  let t = e;
619
- if ("formula" in e && (t = yr(e)), "context" in t) {
619
+ if ("formula" in e && (t = wr(e)), "context" in t) {
620
620
  const r = O({}, t.context);
621
621
  Object.keys(r).forEach((a) => {
622
- r[`${a}`] = Ze(r[`${a}`]);
622
+ r[`${a}`] = We(r[`${a}`]);
623
623
  }), t.context = r;
624
624
  }
625
625
  return t;
626
- }, Ai = (e) => {
626
+ }, Li = (e) => {
627
627
  var t;
628
628
  const r = e;
629
629
  if (r.panel !== "scope")
@@ -631,26 +631,26 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
631
631
  const {
632
632
  jaql: a
633
633
  } = r;
634
- return (t = a.filter) != null && t.by && (a.filter.by = yr(a.filter.by)), ee(O({}, r), {
634
+ return (t = a.filter) != null && t.by && (a.filter.by = wr(a.filter.by)), te(O({}, r), {
635
635
  jaql: a
636
636
  });
637
- }, Li = (e) => {
637
+ }, Ti = (e) => {
638
638
  let t = e;
639
- t = Ai(t);
639
+ t = Li(t);
640
640
  const {
641
641
  jaql: r,
642
642
  measure: a,
643
643
  by: i
644
644
  } = t;
645
- return O(O(ee(O({}, t), {
646
- jaql: Ze(r)
645
+ return O(O(te(O({}, t), {
646
+ jaql: We(r)
647
647
  }), i ? {
648
- by: Ze(i)
648
+ by: We(i)
649
649
  } : {}), a ? {
650
- measure: Ze(a)
650
+ measure: We(a)
651
651
  } : {});
652
- }, We = 6;
653
- function Ti(e) {
652
+ }, Pe = 6;
653
+ function Ni(e) {
654
654
  switch (e) {
655
655
  case "line":
656
656
  case "area":
@@ -700,7 +700,7 @@ function Ti(e) {
700
700
  return {};
701
701
  }
702
702
  }
703
- const Ni = {
703
+ const ji = {
704
704
  subtype: "indicator/numeric",
705
705
  numericSubtype: "numericSimple",
706
706
  skin: "vertical",
@@ -719,7 +719,7 @@ const Ni = {
719
719
  shouldBeShown: !1
720
720
  }
721
721
  }
722
- }, ji = {
722
+ }, Oi = {
723
723
  legend: {
724
724
  enabled: !0,
725
725
  position: "bottom"
@@ -785,7 +785,7 @@ const Ni = {
785
785
  navigator: {
786
786
  enabled: !0
787
787
  }
788
- }, Oi = {
788
+ }, Ei = {
789
789
  subtype: "line/basic",
790
790
  lineWidth: {
791
791
  width: "bold"
@@ -795,7 +795,7 @@ const Ni = {
795
795
  size: "small",
796
796
  fill: "filled"
797
797
  }
798
- }, Ei = {
798
+ }, zi = {
799
799
  subtype: "area/basic",
800
800
  lineWidth: {
801
801
  width: "bold"
@@ -805,11 +805,11 @@ const Ni = {
805
805
  size: "small",
806
806
  fill: "filled"
807
807
  }
808
- }, zi = {
809
- subtype: "bar/classic"
810
808
  }, Ri = {
811
- subtype: "column/classic"
809
+ subtype: "bar/classic"
812
810
  }, Zi = {
811
+ subtype: "column/classic"
812
+ }, Wi = {
813
813
  subtype: "polar/column",
814
814
  yAxis: {
815
815
  enabled: !0,
@@ -831,10 +831,10 @@ const Ni = {
831
831
  categoriesCapacity: 200
832
832
  }
833
833
  };
834
- function _e(e) {
835
- return oi({}, ji, e);
834
+ function Ce(e) {
835
+ return ci({}, Oi, e);
836
836
  }
837
- const Wi = {
837
+ const Pi = {
838
838
  subtype: "pie/classic",
839
839
  legend: {
840
840
  enabled: !1,
@@ -857,7 +857,7 @@ const Wi = {
857
857
  minimalIndependentSlicePercentage: 3,
858
858
  selectedConvolutionType: "byPercentage"
859
859
  }
860
- }, Pi = {
860
+ }, Gi = {
861
861
  legend: {
862
862
  enabled: !1,
863
863
  position: "left"
@@ -881,7 +881,7 @@ const Wi = {
881
881
  headersColor: !1,
882
882
  membersColor: !1,
883
883
  totalsColor: !1
884
- }, Gi = {
884
+ }, $i = {
885
885
  labels: {
886
886
  category: [{
887
887
  enabled: !0
@@ -895,7 +895,7 @@ const Wi = {
895
895
  mode: "value"
896
896
  }
897
897
  }, Hi = {
898
- subtype: ni.SUBTYPE,
898
+ subtype: di.SUBTYPE,
899
899
  viewType: "month",
900
900
  startOfWeek: "sunday",
901
901
  cellLabels: {
@@ -972,7 +972,7 @@ const Wi = {
972
972
  scatterBubbleMinSize: 10,
973
973
  scatterBubbleMaxSize: 10
974
974
  }
975
- }, Qi = {
975
+ }, Ui = {
976
976
  header: {
977
977
  color: {
978
978
  enabled: !1
@@ -988,7 +988,7 @@ const Wi = {
988
988
  enabled: !1
989
989
  }
990
990
  }
991
- }, Ui = {
991
+ }, Qi = {
992
992
  subtype: "scattermap",
993
993
  markers: {
994
994
  fill: "filled",
@@ -1052,42 +1052,42 @@ const Wi = {
1052
1052
  enabled: !0
1053
1053
  }
1054
1054
  };
1055
- function $i(e) {
1055
+ function Ji(e) {
1056
1056
  switch (e) {
1057
1057
  case "indicator":
1058
- return q(Ni);
1058
+ return G(ji);
1059
1059
  case "line":
1060
- return _e(Oi);
1060
+ return Ce(Ei);
1061
1061
  case "area":
1062
- return _e(Ei);
1062
+ return Ce(zi);
1063
1063
  case "bar":
1064
- return _e(zi);
1064
+ return Ce(Ri);
1065
1065
  case "column":
1066
- return _e(Ri);
1066
+ return Ce(Zi);
1067
1067
  case "polar":
1068
- return _e(Zi);
1068
+ return Ce(Wi);
1069
1069
  case "pie":
1070
- return q(Wi);
1070
+ return G(Pi);
1071
1071
  case "funnel":
1072
- return q(Pi);
1072
+ return G(Gi);
1073
1073
  case "treemap":
1074
- return q(Gi);
1074
+ return G($i);
1075
1075
  case "calendar-heatmap":
1076
- return q(Hi);
1076
+ return G(Hi);
1077
1077
  case "sunburst":
1078
- return q(Bi);
1078
+ return G(Bi);
1079
1079
  case "scatter":
1080
- return q(Yi);
1080
+ return G(Yi);
1081
1081
  case "scattermap":
1082
- return q(Ui);
1082
+ return G(Qi);
1083
1083
  case "areamap":
1084
- return q(Fi);
1084
+ return G(Fi);
1085
1085
  case "boxplot":
1086
- return q(Vi);
1086
+ return G(Vi);
1087
1087
  case "table":
1088
- return q(Qi);
1088
+ return G(Ui);
1089
1089
  case "pivot":
1090
- return q(qi);
1090
+ return G(qi);
1091
1091
  case "pivot2":
1092
1092
  return {};
1093
1093
  case "image":
@@ -1096,20 +1096,20 @@ function $i(e) {
1096
1096
  return {};
1097
1097
  }
1098
1098
  }
1099
- const ze = `
1100
- `, nt = "UNKNOWN", Ji = (e, t) => {
1099
+ const Re = `
1100
+ `, lt = "UNKNOWN", Xi = (e, t) => {
1101
1101
  let r = "";
1102
1102
  return r += `measureFactory.customFormula(
1103
- `, r += " ".repeat(t), r += ` '${Se(e.title)}',
1103
+ `, r += " ".repeat(t), r += ` '${Me(e.title)}',
1104
1104
  `, r += " ".repeat(t), r += ` '${e.formula}',
1105
1105
  `, r += " ".repeat(t), r += ` {
1106
1106
  `, Object.entries(e.context).forEach(([a, i]) => {
1107
- const l = cr(i.table || nt, i.column || nt, void 0, "DM");
1107
+ const l = dr(i.table || lt, i.column || lt, void 0, "DM");
1108
1108
  r += " ".repeat(t), r += ` '${a.slice(1, -1)}': ${l},
1109
1109
  `;
1110
1110
  }), r += " ".repeat(t), r += ` }
1111
1111
  `, r += " ".repeat(t), r += ")", r;
1112
- }, Xi = (e) => {
1112
+ }, Ki = (e) => {
1113
1113
  const {
1114
1114
  level: t,
1115
1115
  table: r,
@@ -1118,39 +1118,39 @@ const ze = `
1118
1118
  title: l
1119
1119
  } = e;
1120
1120
  let s;
1121
- return r && a && (s = cr(r, a, t, "DM")), i && r && a && l && (s = `measureFactory.${sr.aggregationFromJAQL(i)}(${s}, '${Se(l)}')`), s || nt;
1122
- }, Ki = (e, t) => {
1121
+ return r && a && (s = dr(r, a, t, "DM")), i && r && a && l && (s = `measureFactory.${cr.aggregationFromJAQL(i)}(${s}, '${Me(l)}')`), s || lt;
1122
+ }, eo = (e, t) => {
1123
1123
  const r = e.jaql(!1).jaql;
1124
- return "formula" in r ? Ji(r, t) : Xi(r);
1125
- }, re = (e, t = 0, r = !1) => {
1124
+ return "formula" in r ? Xi(r, t) : Ki(r);
1125
+ }, ae = (e, t = 0, r = !1) => {
1126
1126
  if (!e)
1127
1127
  return "";
1128
1128
  if (typeof e == "string")
1129
- return `'${Se(e)}'`;
1130
- if (e instanceof hr)
1131
- return Ki(e, t);
1132
- if (e instanceof nr)
1129
+ return `'${Me(e)}'`;
1130
+ if (e instanceof mr)
1131
+ return eo(e, t);
1132
+ if (e instanceof sr)
1133
1133
  return e.composeCode || "";
1134
1134
  let a = "";
1135
- return Array.isArray(e) ? a += `[${e.map((i) => re(i, t + 2))}${e.length ? ze + " ".repeat(t + 2) : ""}]` : (a += `{${ze}`, Object.entries(e).forEach(([i, l]) => {
1136
- if (r && typeof i == "string" && (i = `'${Se(i)}'`), a += " ".repeat(t + 2), Array.isArray(l))
1137
- a += `${i}: [${l.map((s) => re(s, t + 4, r))}${l.length ? ze + " ".repeat(t + 2) : ""}]`;
1135
+ return Array.isArray(e) ? a += `[${e.map((i) => ae(i, t + 2))}${e.length ? Re + " ".repeat(t + 2) : ""}]` : (a += `{${Re}`, Object.entries(e).forEach(([i, l]) => {
1136
+ if (r && typeof i == "string" && (i = `'${Me(i)}'`), a += " ".repeat(t + 2), Array.isArray(l))
1137
+ a += `${i}: [${l.map((s) => ae(s, t + 4, r))}${l.length ? Re + " ".repeat(t + 2) : ""}]`;
1138
1138
  else if (typeof l == "object" && l !== null) {
1139
- const s = Array.isArray(l) ? l : Si(l);
1140
- a += `${i}: ${re(s, t + 2, r)}`;
1139
+ const s = Array.isArray(l) ? l : Mi(l);
1140
+ a += `${i}: ${ae(s, t + 2, r)}`;
1141
1141
  } else
1142
- ["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${Se(l)}'` : a += `${i}: ${l}`;
1143
- a += `,${ze}`;
1142
+ ["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${Me(l)}'` : a += `${i}: ${l}`;
1143
+ a += `,${Re}`;
1144
1144
  }), a += " ".repeat(t), a += "}"), a;
1145
1145
  };
1146
- function yt(e, t) {
1146
+ function _t(e, t) {
1147
1147
  if (t === void 0 || t && typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0)
1148
1148
  return e;
1149
- if (!ut(e, t)) {
1149
+ if (!ht(e, t)) {
1150
1150
  if (e && typeof e == "object" && !Array.isArray(e)) {
1151
1151
  const r = {};
1152
1152
  for (const a of Object.keys(e)) {
1153
- const i = yt(e[a], t == null ? void 0 : t[a]), l = t && Object.prototype.hasOwnProperty.call(t, a), s = l ? t[a] : void 0;
1153
+ const i = _t(e[a], t == null ? void 0 : t[a]), l = t && Object.prototype.hasOwnProperty.call(t, a), s = l ? t[a] : void 0;
1154
1154
  (i !== void 0 || !l || e[a] === void 0 && s !== void 0) && (r[a] = i);
1155
1155
  }
1156
1156
  return Object.keys(r).length ? r : void 0;
@@ -1158,113 +1158,113 @@ function yt(e, t) {
1158
1158
  return e;
1159
1159
  }
1160
1160
  }
1161
- function Lt(e, t) {
1161
+ function Nt(e, t) {
1162
1162
  if (!e || Object.keys(e).length === 0)
1163
1163
  return {};
1164
- const r = $i(t);
1165
- return ut(e, r) ? {} : yt(e, r) ?? {};
1164
+ const r = Ji(t);
1165
+ return ht(e, r) ? {} : _t(e, r) ?? {};
1166
1166
  }
1167
- function Tt(e, t) {
1168
- const r = Ti(t);
1169
- return ut(e, r) ? e : yt(e, r) ?? {};
1167
+ function jt(e, t) {
1168
+ const r = Ni(t);
1169
+ return ht(e, r) ? e : _t(e, r) ?? {};
1170
1170
  }
1171
- function eo(e) {
1172
- return re(e, We);
1171
+ function to(e) {
1172
+ return ae(e, Pe);
1173
1173
  }
1174
- function Nt(e, t = "data-source-placeholder") {
1174
+ function Ot(e, t = "data-source-placeholder") {
1175
1175
  if (!e)
1176
1176
  return t;
1177
1177
  const r = typeof e == "object" && "title" in e ? e.title : e;
1178
- return wi(r);
1178
+ return _i(r);
1179
1179
  }
1180
- function jt(e, t = !0) {
1180
+ function Et(e, t = !0) {
1181
1181
  const r = [];
1182
- return t && r.push("measureFactory"), K(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
1182
+ return t && r.push("measureFactory"), ee(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
1183
1183
  }
1184
- const Ot = `
1185
- `, to = (e, t) => {
1184
+ const zt = `
1185
+ `, ro = (e, t) => {
1186
1186
  if (e.composeCode)
1187
- return `${Ot}${" ".repeat(t)}${e.composeCode}`;
1187
+ return `${zt}${" ".repeat(t)}${e.composeCode}`;
1188
1188
  const r = e.jaql().jaql;
1189
- return `${Ot}${" ".repeat(t)}filterFactory.customFilter(${re(r, t, !0)})`;
1190
- }, ro = (e, t = 0) => {
1189
+ return `${zt}${" ".repeat(t)}filterFactory.customFilter(${ae(r, t, !0)})`;
1190
+ }, ao = (e, t = 0) => {
1191
1191
  if (!e)
1192
1192
  return "";
1193
1193
  let r = "";
1194
- return r += `[${e.map((a) => to(a, t + 2))}${e.length ? `
1194
+ return r += `[${e.map((a) => ro(a, t + 2))}${e.length ? `
1195
1195
  ` + " ".repeat(t + 2) : ""}]`, r;
1196
- }, Et = (e) => e ? Array.isArray(e) ? ro(e, 6) : "/** Filter relations not supported yet */" : "[]", ao = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], io = "chartWidgetTmpl", oo = "pivotTableWidgetTmpl", no = (e) => e, lo = ({
1196
+ }, Rt = (e) => e ? Array.isArray(e) ? ao(e, 6) : "/** Filter relations not supported yet */" : "[]", io = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], oo = "chartWidgetTmpl", no = "pivotTableWidgetTmpl", lo = (e) => e, so = ({
1197
1197
  dashboardOid: e,
1198
1198
  widgetOid: t,
1199
1199
  uiFramework: r = "react",
1200
1200
  chartType: a = "table",
1201
1201
  includeChart: i = !0
1202
1202
  }) => {
1203
- xr(a);
1203
+ kr(a);
1204
1204
  const l = {
1205
1205
  dashboardOid: e,
1206
1206
  widgetOid: t
1207
- }, s = ao[Number(i)];
1208
- return ot(s, l, r);
1209
- }, so = (e, t, r, a) => {
1210
- if (ir(e)) {
1211
- xr(e.chartType);
1212
- const i = At(e), l = {
1207
+ }, s = io[Number(i)];
1208
+ return nt(s, l, r);
1209
+ }, co = (e, t, r, a) => {
1210
+ if (or(e)) {
1211
+ kr(e.chartType);
1212
+ const i = Tt(e), l = {
1213
1213
  idString: e.id,
1214
1214
  widgetTypeString: "chart",
1215
1215
  titleString: e.title,
1216
- dataSourceString: Nt(e.dataSource),
1217
- chartTypeString: no(e.chartType),
1218
- dataOptionsString: eo(a ? Tt(e.dataOptions, e.chartType) : e.dataOptions),
1219
- filtersString: Et(e.filters),
1216
+ dataSourceString: Ot(e.dataSource),
1217
+ chartTypeString: lo(e.chartType),
1218
+ dataOptionsString: to(a ? jt(e.dataOptions, e.chartType) : e.dataOptions),
1219
+ filtersString: Rt(e.filters),
1220
1220
  componentString: "ChartWidget",
1221
- extraImportsString: jt(e.filters || [], i),
1222
- styleOptionsString: re(a ? Lt(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, We),
1223
- drilldownOptionsString: re(e.drilldownOptions || {}, We)
1221
+ extraImportsString: Et(e.filters || [], i),
1222
+ styleOptionsString: ae(a ? Nt(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, Pe),
1223
+ drilldownOptionsString: ae(e.drilldownOptions || {}, Pe)
1224
1224
  };
1225
- return ot(r.chart, l, t);
1225
+ return nt(r.chart, l, t);
1226
1226
  }
1227
- if (Pa(e)) {
1228
- const i = At(e), l = {
1227
+ if (Ya(e)) {
1228
+ const i = Tt(e), l = {
1229
1229
  idString: e.id,
1230
1230
  widgetTypeString: "pivot",
1231
1231
  titleString: e.title,
1232
- dataSourceString: Nt(e.dataSource),
1233
- dataOptionsString: re(a ? Tt(e.dataOptions, e.widgetType) : e.dataOptions),
1234
- filtersString: Et(e.filters),
1232
+ dataSourceString: Ot(e.dataSource),
1233
+ dataOptionsString: ae(a ? jt(e.dataOptions, e.widgetType) : e.dataOptions),
1234
+ filtersString: Rt(e.filters),
1235
1235
  componentString: "PivotTableWidget",
1236
- extraImportsString: jt(e.filters || [], i),
1237
- styleOptionsString: re(a ? Lt(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, We)
1236
+ extraImportsString: Et(e.filters || [], i),
1237
+ styleOptionsString: ae(a ? Nt(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, Pe)
1238
1238
  };
1239
- return ot(r.pivot, l, t);
1239
+ return nt(r.pivot, l, t);
1240
1240
  }
1241
- if (qa(e))
1241
+ if (Ua(e))
1242
1242
  return "/** Custom widget code not supported yet */";
1243
- throw new Me("errors.otherWidgetTypesNotSupported");
1244
- }, co = ({
1243
+ throw new Ie("errors.otherWidgetTypesNotSupported");
1244
+ }, po = ({
1245
1245
  widgetProps: e,
1246
1246
  uiFramework: t = "react",
1247
1247
  removeDefaultProps: r = !1
1248
- }) => so(e, t, {
1249
- chart: io,
1250
- pivot: oo
1248
+ }) => co(e, t, {
1249
+ chart: oo,
1250
+ pivot: no
1251
1251
  }, r);
1252
- function po(e) {
1252
+ function uo(e) {
1253
1253
  return !!(e && (e.top !== void 0 || e.bottom !== void 0));
1254
1254
  }
1255
- const uo = (e) => {
1255
+ const go = (e) => {
1256
1256
  const t = e.find((r) => r.panel === "rows");
1257
1257
  return t ? e.map((r) => {
1258
1258
  const a = r.jaql.filter;
1259
- if (!(r.panel === "scope" && po(a) && a.by === void 0))
1259
+ if (!(r.panel === "scope" && uo(a) && a.by === void 0))
1260
1260
  return r;
1261
1261
  const i = r.jaql, {
1262
1262
  type: l,
1263
1263
  context: s,
1264
1264
  formula: p,
1265
1265
  filter: d
1266
- } = i, g = yi(i, ["type", "context", "formula", "filter"]);
1267
- return ee(O({}, r), {
1266
+ } = i, g = wi(i, ["type", "context", "formula", "filter"]);
1267
+ return te(O({}, r), {
1268
1268
  jaql: O({
1269
1269
  // Copy dimension properties from rows dimension
1270
1270
  dim: t.jaql.dim,
@@ -1272,7 +1272,7 @@ const uo = (e) => {
1272
1272
  column: t.jaql.column,
1273
1273
  datatype: t.jaql.datatype,
1274
1274
  // Keep the filter but add the by clause
1275
- filter: ee(O({}, d), {
1275
+ filter: te(O({}, d), {
1276
1276
  by: {
1277
1277
  type: l,
1278
1278
  context: s,
@@ -1282,11 +1282,11 @@ const uo = (e) => {
1282
1282
  }, g)
1283
1283
  });
1284
1284
  }) : e;
1285
- }, go = (e) => ({
1285
+ }, ho = (e) => ({
1286
1286
  dataOptions: {
1287
- columns: e.map(mr)
1287
+ columns: e.map(br)
1288
1288
  }
1289
- }), ho = Object.freeze({
1289
+ }), mo = Object.freeze({
1290
1290
  convolution: {
1291
1291
  enabled: !0,
1292
1292
  selectedConvolutionType: "bySlicesCount",
@@ -1307,17 +1307,17 @@ const uo = (e) => {
1307
1307
  xAxis: {
1308
1308
  gridLines: !1
1309
1309
  }
1310
- }), zt = Object.freeze({
1310
+ }), Zt = Object.freeze({
1311
1311
  line: "line/spline",
1312
1312
  pie: "pie/donut",
1313
1313
  bar: "bar/stacked",
1314
1314
  column: "column/stackedcolumn"
1315
- }), mo = (e, t, r) => {
1315
+ }), bo = (e, t, r) => {
1316
1316
  const a = e.reduce((l, s) => (l[s.jaql.title] = s, l), {}), i = Object.entries(r).reduce((l, s) => {
1317
1317
  const [p, d] = s;
1318
1318
  return l[`${p}`] = Array.isArray(d) ? d.map((g) => {
1319
1319
  var f, x;
1320
- const o = it(g);
1320
+ const o = ot(g);
1321
1321
  delete o.enabled;
1322
1322
  const u = a[o.column.name];
1323
1323
  if (!u)
@@ -1327,20 +1327,20 @@ const uo = (e) => {
1327
1327
  name: o.column.name
1328
1328
  }
1329
1329
  };
1330
- const c = mr(u);
1330
+ const c = br(u);
1331
1331
  if (u.panel === "measures")
1332
- return ee(O({}, o), {
1332
+ return te(O({}, o), {
1333
1333
  column: c
1334
1334
  });
1335
- if (Ua(c.type)) {
1335
+ if (Xa(c.type)) {
1336
1336
  const m = (x = (f = u.format) == null ? void 0 : f.mask) == null ? void 0 : x[u.jaql.level];
1337
1337
  if (m)
1338
- return ee(O({}, o), {
1338
+ return te(O({}, o), {
1339
1339
  column: c,
1340
1340
  dateFormat: m
1341
1341
  });
1342
1342
  }
1343
- return ee(O({}, o), {
1343
+ return te(O({}, o), {
1344
1344
  column: c
1345
1345
  });
1346
1346
  }) : d, l;
@@ -1366,20 +1366,20 @@ const uo = (e) => {
1366
1366
  l !== "geo" && (i[`${l}`] = i[`${l}`][0]);
1367
1367
  }), i;
1368
1368
  case "table":
1369
- return Object.keys(i).length === 0 ? go(e).dataOptions : i;
1369
+ return Object.keys(i).length === 0 ? ho(e).dataOptions : i;
1370
1370
  case "boxplot":
1371
1371
  case "areamap":
1372
1372
  case "indicator":
1373
1373
  default:
1374
1374
  return i;
1375
1375
  }
1376
- }, Rt = (e, t) => {
1376
+ }, Wt = (e, t) => {
1377
1377
  var r, a, i, l;
1378
- return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => it(s).column.name).join(", ") : (l = (i = e.value) != null ? i : e.y) == null ? void 0 : l.map((s) => it(s).column.name).join(", ");
1379
- }, bo = (e, t, r, a) => {
1378
+ return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => ot(s).column.name).join(", ") : (l = (i = e.value) != null ? i : e.y) == null ? void 0 : l.map((s) => ot(s).column.name).join(", ");
1379
+ }, fo = (e, t, r, a) => {
1380
1380
  let i;
1381
- return a && e in zt ? i = Xe(Xe(ho, {
1382
- subtype: zt[`${e}`]
1381
+ return a && e in Zt ? i = Ke(Ke(mo, {
1382
+ subtype: Zt[`${e}`]
1383
1383
  }), {
1384
1384
  legend: {
1385
1385
  enabled: !0,
@@ -1388,42 +1388,42 @@ const uo = (e) => {
1388
1388
  yAxis: {
1389
1389
  title: {
1390
1390
  enabled: !0,
1391
- text: Rt(t, "y")
1391
+ text: Wt(t, "y")
1392
1392
  }
1393
1393
  },
1394
1394
  xAxis: {
1395
1395
  title: {
1396
1396
  enabled: !0,
1397
- text: Rt(t, "x")
1397
+ text: Wt(t, "x")
1398
1398
  }
1399
1399
  }
1400
- }, r) : i = Xe(Fa(), r), i;
1401
- }, fo = (e, t, r = !0) => {
1400
+ }, r) : i = Ke(Ka(), r), i;
1401
+ }, xo = (e, t, r = !0) => {
1402
1402
  const {
1403
1403
  chartFamily: a,
1404
1404
  chartType: i,
1405
1405
  axesMapping: l = {},
1406
1406
  styleOptions: s = {}
1407
- } = t, p = mo(e, a, l), d = bo(i, l, s, r);
1407
+ } = t, p = bo(e, a, l), d = fo(i, l, s, r);
1408
1408
  return {
1409
1409
  dataOptions: p,
1410
1410
  chartStyleOptions: d
1411
1411
  };
1412
- }, xo = (e) => "chartType" in e ? e : {
1412
+ }, ko = (e) => "chartType" in e ? e : {
1413
1413
  chartType: "table",
1414
1414
  chartFamily: "table",
1415
1415
  axesMapping: {}
1416
- }, ko = (e) => e.map((t) => Ga(t.jaql)), yo = (e) => e.reduce((t, r) => {
1417
- if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(q(r)), r.panel !== "scope") {
1418
- const a = q(r);
1416
+ }, yo = (e) => e.map((t) => Qa(t.jaql)), wo = (e) => e.reduce((t, r) => {
1417
+ if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(G(r)), r.panel !== "scope") {
1418
+ const a = G(r);
1419
1419
  delete a.jaql.filter, t.metadataColumns.push(a);
1420
1420
  }
1421
1421
  return t;
1422
1422
  }, {
1423
1423
  metadataColumns: [],
1424
1424
  metadataFilters: []
1425
- }), wo = (e, t) => {
1426
- if (!_i(e))
1425
+ }), _o = (e, t) => {
1426
+ if (!Ci(e))
1427
1427
  try {
1428
1428
  const {
1429
1429
  useCustomizedStyleOptions: r = !1
@@ -1434,13 +1434,13 @@ const uo = (e) => {
1434
1434
  } = e, {
1435
1435
  metadata: s,
1436
1436
  datasource: p
1437
- } = a, d = ee(O({}, p), {
1437
+ } = a, d = te(O({}, p), {
1438
1438
  type: p.type || "elasticube"
1439
- }), g = Na(d), f = uo(s).map((M) => Li(M)).map((M) => ee(O({}, M), {
1440
- jaql: ee(O({}, M.jaql), {
1439
+ }), g = Wa(d), f = go(s).map((M) => Ti(M)).map((M) => te(O({}, M), {
1440
+ jaql: te(O({}, M.jaql), {
1441
1441
  datasource: g
1442
1442
  })
1443
- })), x = xo(i), o = x.chartType.toLowerCase(), u = {
1443
+ })), x = ko(i), o = x.chartType.toLowerCase(), u = {
1444
1444
  cornerRadius: "Small",
1445
1445
  header: {
1446
1446
  // remove info button and render empty toolbar instead
@@ -1449,10 +1449,10 @@ const uo = (e) => {
1449
1449
  }, {
1450
1450
  metadataColumns: c,
1451
1451
  metadataFilters: m
1452
- } = yo(f), h = ko(m), {
1452
+ } = wo(f), h = yo(m), {
1453
1453
  dataOptions: w,
1454
- chartStyleOptions: _
1455
- } = fo(c, x, r), y = O(O({}, _), u);
1454
+ chartStyleOptions: C
1455
+ } = xo(c, x, r), y = O(O({}, C), u);
1456
1456
  return {
1457
1457
  widgetType: "chart",
1458
1458
  id: l,
@@ -1467,34 +1467,34 @@ const uo = (e) => {
1467
1467
  console.error(r);
1468
1468
  return;
1469
1469
  }
1470
- }, wt = (e, t) => wo(e, t), _o = (e) => bi(e) ? lo(e) : co(e), wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1470
+ }, Ct = (e, t) => _o(e, t), Co = (e) => fi(e) ? so(e) : po(e), _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1471
1471
  __proto__: null,
1472
- toWidgetCode: _o,
1473
- toWidgetProps: wt
1472
+ toWidgetCode: Co,
1473
+ toWidgetProps: Ct
1474
1474
  }, Symbol.toStringTag, {
1475
1475
  value: "Module"
1476
1476
  }));
1477
- var Co = Object.defineProperty, vo = Object.defineProperties, So = Object.getOwnPropertyDescriptors, He = Object.getOwnPropertySymbols, _r = Object.prototype.hasOwnProperty, Cr = Object.prototype.propertyIsEnumerable, Zt = (e, t, r) => t in e ? Co(e, t, {
1477
+ var vo = Object.defineProperty, So = Object.defineProperties, Mo = Object.getOwnPropertyDescriptors, He = Object.getOwnPropertySymbols, Cr = Object.prototype.hasOwnProperty, vr = Object.prototype.propertyIsEnumerable, st = (e, t, r) => t in e ? vo(e, t, {
1478
1478
  enumerable: !0,
1479
1479
  configurable: !0,
1480
1480
  writable: !0,
1481
1481
  value: r
1482
1482
  }) : e[t] = r, I = (e, t) => {
1483
1483
  for (var r in t || (t = {}))
1484
- _r.call(t, r) && Zt(e, r, t[r]);
1484
+ Cr.call(t, r) && st(e, r, t[r]);
1485
1485
  if (He)
1486
1486
  for (var r of He(t))
1487
- Cr.call(t, r) && Zt(e, r, t[r]);
1487
+ vr.call(t, r) && st(e, r, t[r]);
1488
1488
  return e;
1489
- }, j = (e, t) => vo(e, So(t)), Mo = (e, t) => {
1489
+ }, j = (e, t) => So(e, Mo(t)), Io = (e, t) => {
1490
1490
  var r = {};
1491
1491
  for (var a in e)
1492
- _r.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
1492
+ Cr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
1493
1493
  if (e != null && He)
1494
1494
  for (var a of He(e))
1495
- t.indexOf(a) < 0 && Cr.call(e, a) && (r[a] = e[a]);
1495
+ t.indexOf(a) < 0 && vr.call(e, a) && (r[a] = e[a]);
1496
1496
  return r;
1497
- }, pe = (e, t, r) => new Promise((a, i) => {
1497
+ }, H = (e, t, r) => st(e, typeof t != "symbol" ? t + "" : t, r), ue = (e, t, r) => new Promise((a, i) => {
1498
1498
  var l = (d) => {
1499
1499
  try {
1500
1500
  p(r.next(d));
@@ -1510,7 +1510,7 @@ var Co = Object.defineProperty, vo = Object.defineProperties, So = Object.getOwn
1510
1510
  }, p = (d) => d.done ? a(d.value) : Promise.resolve(d.value).then(l, s);
1511
1511
  p((r = r.apply(e, t)).next());
1512
1512
  });
1513
- class Io extends Ha {
1513
+ class Do extends Fa {
1514
1514
  constructor(t, r) {
1515
1515
  super(), this.client = t, this.setOptions(r), this.bindMethods(), this.updateResult();
1516
1516
  }
@@ -1520,7 +1520,7 @@ class Io extends Ha {
1520
1520
  setOptions(t) {
1521
1521
  var r;
1522
1522
  const a = this.options;
1523
- this.options = this.client.defaultMutationOptions(t), Ba(a, this.options) || this.client.getMutationCache().notify({
1523
+ this.options = this.client.defaultMutationOptions(t), Va(a, this.options) || this.client.getMutationCache().notify({
1524
1524
  type: "observerOptionsUpdated",
1525
1525
  mutation: this.currentMutation,
1526
1526
  observer: this
@@ -1553,7 +1553,7 @@ class Io extends Ha {
1553
1553
  })), this.currentMutation.addObserver(this), this.currentMutation.execute();
1554
1554
  }
1555
1555
  updateResult() {
1556
- const t = this.currentMutation ? this.currentMutation.state : Ya(), r = t.status === "loading", a = j(I({}, t), {
1556
+ const t = this.currentMutation ? this.currentMutation.state : Ja(), r = t.status === "loading", a = j(I({}, t), {
1557
1557
  isLoading: r,
1558
1558
  isPending: r,
1559
1559
  isSuccess: t.status === "success",
@@ -1565,7 +1565,7 @@ class Io extends Ha {
1565
1565
  this.currentResult = a;
1566
1566
  }
1567
1567
  notify(t) {
1568
- ar.batch(() => {
1568
+ lr.batch(() => {
1569
1569
  if (this.mutateOptions && this.hasListeners()) {
1570
1570
  if (t.onSuccess) {
1571
1571
  var r, a, i, l;
@@ -1583,26 +1583,26 @@ class Io extends Ha {
1583
1583
  });
1584
1584
  }
1585
1585
  }
1586
- function _t(e, t, r) {
1587
- const a = ja(e, t), i = Ae({
1586
+ function vt(e, t, r) {
1587
+ const a = Pa(e, t), i = Le({
1588
1588
  context: a.context
1589
- }), [l] = Z(() => new Io(i, a));
1590
- Le(() => {
1589
+ }), [l] = Z(() => new Do(i, a));
1590
+ Te(() => {
1591
1591
  l.setOptions(a);
1592
1592
  }, [l, a]);
1593
- const s = Oa(N((d) => l.subscribe(ar.batchCalls(d)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), p = N((d, g) => {
1594
- l.mutate(d, g).catch(Do);
1593
+ const s = Ga(N((d) => l.subscribe(lr.batchCalls(d)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), p = N((d, g) => {
1594
+ l.mutate(d, g).catch(Ao);
1595
1595
  }, [l]);
1596
- if (s.error && Ea(l.options.useErrorBoundary, [s.error]))
1596
+ if (s.error && qa(l.options.useErrorBoundary, [s.error]))
1597
1597
  throw s.error;
1598
1598
  return j(I({}, s), {
1599
1599
  mutate: p,
1600
1600
  mutateAsync: s.mutate
1601
1601
  });
1602
1602
  }
1603
- function Do() {
1603
+ function Ao() {
1604
1604
  }
1605
- const vr = /* @__PURE__ */ Ye({}), Ao = () => pt(vr), Lo = ({
1605
+ const Sr = Ye({}), Lo = () => gt(Sr), To = ({
1606
1606
  children: e
1607
1607
  }) => {
1608
1608
  const [t, r] = Z({}), a = N((s, p) => {
@@ -1613,7 +1613,7 @@ const vr = /* @__PURE__ */ Ye({}), Ao = () => pt(vr), Lo = ({
1613
1613
  [a(p, d)]: s
1614
1614
  }));
1615
1615
  }, [a]), l = N((s, p) => t[a(s, p)], [t, a]);
1616
- return /* @__PURE__ */ n(vr.Provider, {
1616
+ return /* @__PURE__ */ n(Sr.Provider, {
1617
1617
  value: {
1618
1618
  saveChatId: i,
1619
1619
  getChatId: l
@@ -1621,19 +1621,19 @@ const vr = /* @__PURE__ */ Ye({}), Ao = () => pt(vr), Lo = ({
1621
1621
  children: e
1622
1622
  });
1623
1623
  };
1624
- class Wt {
1624
+ class Pt {
1625
1625
  constructor(t, r = !1) {
1626
- this.volatile = r, this.getChatContexts = () => pe(this, null, function* () {
1626
+ H(this, "httpClient"), H(this, "getChatContexts", () => ue(this, null, function* () {
1627
1627
  return (yield this.httpClient.get("api/datasources//")) || [];
1628
- }), this.getNlgInsights = (a) => this.httpClient.post("api/v2/ai/nlg/queryResult", a), this.getQueryRecommendations = (a, i) => this.httpClient.get(`api/v2/ai/recommendations/query/${a}/${i.numOfRecommendations}${i.userPrompt ? "?userPrompt=" + encodeURIComponent(i.userPrompt) : ""}`), this.getNlqResult = (a, i) => this.httpClient.post(`api/v2/ai/nlq/query/${a}`, i), this.setLlmConfig = (a) => this.httpClient.post("api/v2/settings/ai/llmProvider", a).catch((i) => {
1628
+ })), H(this, "getNlgInsights", (a) => this.httpClient.post("api/v2/ai/nlg/queryResult", a)), H(this, "getQueryRecommendations", (a, i) => this.httpClient.get(`api/v2/ai/recommendations/query/${a}/${i.numOfRecommendations}${i.userPrompt ? "?userPrompt=" + encodeURIComponent(i.userPrompt) : ""}`)), H(this, "getNlqResult", (a, i) => this.httpClient.post(`api/v2/ai/nlq/query/${a}`, i)), H(this, "setLlmConfig", (a) => this.httpClient.post("api/v2/settings/ai/llmProvider", a).catch((i) => {
1629
1629
  console.error("Unable to set llm config", i);
1630
- }), this.getAllChats = () => pe(this, null, function* () {
1630
+ })), H(this, "getAllChats", () => ue(this, null, function* () {
1631
1631
  return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
1632
- }), this.getChatById = (a) => this.httpClient.get(`api/v2/ai/chats/${a}`), this.createChat = (a, i) => this.httpClient.post("api/v2/ai/chats", {
1632
+ })), H(this, "getChatById", (a) => this.httpClient.get(`api/v2/ai/chats/${a}`)), H(this, "createChat", (a, i) => this.httpClient.post("api/v2/ai/chats", {
1633
1633
  sourceId: a,
1634
1634
  volatile: this.volatile,
1635
1635
  contextDetails: i
1636
- }), this.postChat = (a, i) => this.httpClient.post(`api/v2/ai/chats/${a}`, i), this.deleteChatHistory = (a) => this.httpClient.delete(`api/v2/ai/chats/${a}/history`), this.sendFeedback = (a) => this.httpClient.post("api/v2/ai/feedback", a), this.ai = {
1636
+ })), H(this, "postChat", (a, i) => this.httpClient.post(`api/v2/ai/chats/${a}`, i)), H(this, "deleteChatHistory", (a) => this.httpClient.delete(`api/v2/ai/chats/${a}/history`)), H(this, "sendFeedback", (a) => this.httpClient.post("api/v2/ai/feedback", a)), H(this, "ai", {
1637
1637
  getNlgInsights: this.getNlgInsights,
1638
1638
  getNlqResult: this.getNlqResult,
1639
1639
  getQueryRecommendations: this.getQueryRecommendations,
@@ -1646,10 +1646,10 @@ class Wt {
1646
1646
  post: this.postChat,
1647
1647
  clearHistory: this.deleteChatHistory
1648
1648
  }
1649
- }, this.httpClient = t;
1649
+ }), this.volatile = r, this.httpClient = t;
1650
1650
  }
1651
1651
  }
1652
- new Xt({
1652
+ new Kt({
1653
1653
  defaultOptions: {
1654
1654
  queries: {
1655
1655
  refetchOnWindowFocus: !1,
@@ -1657,19 +1657,19 @@ new Xt({
1657
1657
  }
1658
1658
  }
1659
1659
  });
1660
- const Sr = /* @__PURE__ */ Ye(void 0), ae = () => pt(Sr);
1661
- function Mr(e) {
1660
+ const Mr = Ye(void 0), ie = () => gt(Mr);
1661
+ function Ir(e) {
1662
1662
  var t, r;
1663
1663
  if ("jaql" in e)
1664
1664
  return e;
1665
1665
  {
1666
- const a = wa(e.dataSource), {
1666
+ const a = va(e.dataSource), {
1667
1667
  filters: i = [],
1668
1668
  relations: l
1669
- } = _a(e.filters), {
1669
+ } = Sa(e.filters), {
1670
1670
  metadata: s,
1671
1671
  filterRelations: p
1672
- } = Ca({
1672
+ } = Ma({
1673
1673
  dataSource: e.dataSource,
1674
1674
  attributes: (t = e.dimensions) != null ? t : [],
1675
1675
  measures: (r = e.measures) != null ? r : [],
@@ -1686,15 +1686,15 @@ function Mr(e) {
1686
1686
  return e.verbosity && (d.verbosity = e.verbosity), d;
1687
1687
  }
1688
1688
  }
1689
- const Ir = (e, t = !0) => {
1690
- const r = U(() => Mr(e), [e]), a = ae(), {
1689
+ const Dr = (e, t = !0) => {
1690
+ const r = Q(() => Ir(e), [e]), a = ie(), {
1691
1691
  data: i,
1692
1692
  error: l,
1693
1693
  isError: s,
1694
1694
  isLoading: p,
1695
1695
  isSuccess: d,
1696
1696
  refetch: g
1697
- } = De({
1697
+ } = Ae({
1698
1698
  queryKey: ["getNlgInsights", r, a],
1699
1699
  queryFn: () => a == null ? void 0 : a.ai.getNlgInsights(r),
1700
1700
  select: (f) => {
@@ -1713,8 +1713,8 @@ const Ir = (e, t = !0) => {
1713
1713
  g();
1714
1714
  }, [g])
1715
1715
  };
1716
- }, To = ["indicator", "column", "line", "table", "pie", "bar"];
1717
- function No(e) {
1716
+ }, No = ["indicator", "column", "line", "table", "pie", "bar"];
1717
+ function jo(e) {
1718
1718
  const {
1719
1719
  dataSource: t,
1720
1720
  query: r,
@@ -1726,25 +1726,25 @@ function No(e) {
1726
1726
  text: r,
1727
1727
  // Timezone is not used by AI API, but it is currently required by the endpoint
1728
1728
  timezone: "UTC",
1729
- chartTypes: a ?? [...To]
1729
+ chartTypes: a ?? [...No]
1730
1730
  }
1731
1731
  };
1732
1732
  }
1733
- const lt = 4, jo = (e) => {
1733
+ const ct = 4, Oo = (e) => {
1734
1734
  const {
1735
1735
  contextTitle: t,
1736
1736
  count: r,
1737
1737
  enableAxisTitlesInWidgetProps: a,
1738
1738
  enabled: i,
1739
1739
  customPrompt: l
1740
- } = e, s = ae(), p = r ?? lt, d = (i === void 0 || i === !0) && p > 0, {
1740
+ } = e, s = ie(), p = r ?? ct, d = (i === void 0 || i === !0) && p > 0, {
1741
1741
  isLoading: g,
1742
1742
  isError: f,
1743
1743
  isSuccess: x,
1744
1744
  data: o,
1745
1745
  error: u,
1746
1746
  refetch: c
1747
- } = De({
1747
+ } = Ae({
1748
1748
  queryKey: ["getQueryRecommendations", t, p, s],
1749
1749
  queryFn: () => s == null ? void 0 : s.ai.getQueryRecommendations(t, I({
1750
1750
  numOfRecommendations: p
@@ -1752,8 +1752,8 @@ const lt = 4, jo = (e) => {
1752
1752
  userPrompt: l
1753
1753
  } : null)),
1754
1754
  enabled: !!s && d
1755
- }), m = U(() => o == null ? void 0 : o.map((h) => j(I({}, h), {
1756
- widgetProps: h.jaql ? wt(h, {
1755
+ }), m = Q(() => o == null ? void 0 : o.map((h) => j(I({}, h), {
1756
+ widgetProps: h.jaql ? Ct(h, {
1757
1757
  useCustomizedStyleOptions: a
1758
1758
  }) : void 0
1759
1759
  })), [o, a]);
@@ -1767,34 +1767,34 @@ const lt = 4, jo = (e) => {
1767
1767
  c();
1768
1768
  }, [c])
1769
1769
  };
1770
- }, Dr = Object.freeze({
1770
+ }, Ar = Object.freeze({
1771
1771
  enableFollowupQuestions: !1,
1772
1772
  enableHeader: !0,
1773
1773
  enableInsights: !0,
1774
1774
  numOfRecommendations: 4,
1775
1775
  numOfRecentPrompts: 5
1776
- }), Ar = /* @__PURE__ */ Ye(I({}, Dr)), ie = () => pt(Ar), Oo = ({
1776
+ }), Lr = Ye(I({}, Ar)), oe = () => gt(Lr), Eo = ({
1777
1777
  children: e,
1778
1778
  value: t
1779
1779
  }) => {
1780
1780
  const {
1781
1781
  t: r
1782
- } = E(), a = Object.entries(t).reduce((i, [l, s]) => (s !== void 0 && (i[l] = s), i), j(I({}, Dr), {
1782
+ } = E(), a = Object.entries(t).reduce((i, [l, s]) => (s !== void 0 && (i[l] = s), i), j(I({}, Ar), {
1783
1783
  inputPromptText: r("ai.config.inputPromptText"),
1784
1784
  welcomeText: r("ai.config.welcomeText"),
1785
1785
  suggestionsWelcomeText: r("ai.config.suggestionsWelcomeText")
1786
1786
  }));
1787
- return /* @__PURE__ */ n(Ar.Provider, {
1787
+ return /* @__PURE__ */ n(Lr.Provider, {
1788
1788
  value: a,
1789
1789
  children: e
1790
1790
  });
1791
- }, Ct = "chatHistory", Eo = (e) => {
1792
- const t = ae(), {
1791
+ }, St = "chatHistory", zo = (e) => {
1792
+ const t = ie(), {
1793
1793
  hideHistory: r
1794
- } = ie();
1795
- return De({
1796
- queryKey: [Ct, e, t],
1797
- queryFn: () => pe(void 0, null, function* () {
1794
+ } = oe();
1795
+ return Ae({
1796
+ queryKey: [St, e, t],
1797
+ queryFn: () => ue(void 0, null, function* () {
1798
1798
  if (!t || !e)
1799
1799
  return;
1800
1800
  if (r)
@@ -1804,10 +1804,10 @@ const lt = 4, jo = (e) => {
1804
1804
  }),
1805
1805
  enabled: !!t && !!e
1806
1806
  });
1807
- }, Lr = (e) => {
1808
- const t = ae(), r = Ae();
1809
- return _t({
1810
- mutationFn: () => pe(void 0, null, function* () {
1807
+ }, Tr = (e) => {
1808
+ const t = ie(), r = Le();
1809
+ return vt({
1810
+ mutationFn: () => ue(void 0, null, function* () {
1811
1811
  if (!(!t || !e))
1812
1812
  return t.ai.chat.clearHistory(e);
1813
1813
  }),
@@ -1815,32 +1815,32 @@ const lt = 4, jo = (e) => {
1815
1815
  console.error("Error when clearing history:", a);
1816
1816
  },
1817
1817
  onSettled: () => {
1818
- e && r.setQueriesData([Ct, e], []);
1818
+ e && r.setQueriesData([St, e], []);
1819
1819
  }
1820
1820
  });
1821
- }, zo = (e) => {
1821
+ }, Ro = (e) => {
1822
1822
  const {
1823
1823
  data: t,
1824
1824
  isLoading: r,
1825
1825
  isError: a
1826
- } = Eo(e), {
1826
+ } = zo(e), {
1827
1827
  mutate: i
1828
- } = Lr(e);
1829
- return Le(() => {
1828
+ } = Tr(e);
1829
+ return Te(() => {
1830
1830
  a && i();
1831
1831
  }, [a, i]), {
1832
1832
  history: t,
1833
1833
  isLoading: r,
1834
1834
  isError: a
1835
1835
  };
1836
- }, Ro = () => {
1837
- const e = ae(), {
1836
+ }, Zo = () => {
1837
+ const e = ie(), {
1838
1838
  data: t,
1839
1839
  isLoading: r,
1840
1840
  fetchStatus: a
1841
- } = De({
1841
+ } = Ae({
1842
1842
  queryKey: ["getDataTopics", e],
1843
- queryFn: () => pe(void 0, null, function* () {
1843
+ queryFn: () => ue(void 0, null, function* () {
1844
1844
  if (e)
1845
1845
  return e.getChatContexts();
1846
1846
  }),
@@ -1851,11 +1851,11 @@ const lt = 4, jo = (e) => {
1851
1851
  isLoading: r,
1852
1852
  fetchStatus: a
1853
1853
  };
1854
- }, Zo = () => {
1855
- const e = ae(), {
1854
+ }, Wo = () => {
1855
+ const e = ie(), {
1856
1856
  data: t,
1857
1857
  isLoading: r
1858
- } = De({
1858
+ } = Ae({
1859
1859
  queryKey: ["getAllChats", e],
1860
1860
  queryFn: () => e == null ? void 0 : e.ai.chat.getAll(),
1861
1861
  enabled: !!e
@@ -1864,18 +1864,18 @@ const lt = 4, jo = (e) => {
1864
1864
  data: t ?? [],
1865
1865
  isLoading: r
1866
1866
  };
1867
- }, Wo = (e, t, r) => {
1868
- const a = Ae(), i = ae(), l = _t({
1869
- mutationFn: () => pe(void 0, null, function* () {
1867
+ }, Po = (e, t, r) => {
1868
+ const a = Le(), i = ie(), l = vt({
1869
+ mutationFn: () => ue(void 0, null, function* () {
1870
1870
  if (!(!i || !e))
1871
1871
  return i.ai.chat.create(e, r);
1872
1872
  }),
1873
1873
  onSuccess: () => a.invalidateQueries(["getAllChats"])
1874
1874
  });
1875
- return Le(() => {
1875
+ return Te(() => {
1876
1876
  t && l.isIdle && l.mutate();
1877
1877
  }, [t, l]), l;
1878
- }, Po = (e, t) => {
1878
+ }, Go = (e, t) => {
1879
1879
  switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
1880
1880
  case "nlq":
1881
1881
  return {
@@ -1893,15 +1893,15 @@ const lt = 4, jo = (e) => {
1893
1893
  throw Error(`${t}${JSON.stringify(e)}`);
1894
1894
  }
1895
1895
  }, qo = (e, t) => {
1896
- const r = Ae(), a = N((d) => {
1897
- e && r.setQueriesData([Ct, e], (g) => g && [...g, d]);
1896
+ const r = Le(), a = N((d) => {
1897
+ e && r.setQueriesData([St, e], (g) => g && [...g, d]);
1898
1898
  }, [r, e]), {
1899
1899
  t: i
1900
- } = E(), l = ae(), {
1900
+ } = E(), l = ie(), {
1901
1901
  mutate: s,
1902
1902
  isLoading: p
1903
- } = _t({
1904
- mutationFn: (d) => pe(void 0, null, function* () {
1903
+ } = vt({
1904
+ mutationFn: (d) => ue(void 0, null, function* () {
1905
1905
  if (!(!l || !e))
1906
1906
  return l.ai.chat.post(e, {
1907
1907
  text: d,
@@ -1928,55 +1928,55 @@ const lt = 4, jo = (e) => {
1928
1928
  if (!d)
1929
1929
  return;
1930
1930
  const g = i("ai.errors.unknownResponse");
1931
- a(Po(d, g));
1931
+ a(Go(d, g));
1932
1932
  }
1933
1933
  });
1934
1934
  return {
1935
1935
  mutate: s,
1936
1936
  isLoading: p
1937
1937
  };
1938
- }, Go = (e, t, r = !1) => {
1938
+ }, $o = (e, t, r = !1) => {
1939
1939
  var a;
1940
1940
  const {
1941
1941
  data: i,
1942
1942
  isLoading: l
1943
- } = Zo(), s = Ao(), p = s.getChatId(e, t) || ((a = i.find((x) => {
1943
+ } = Wo(), s = Lo(), p = s.getChatId(e, t) || ((a = i.find((x) => {
1944
1944
  var o;
1945
1945
  return x.contextTitle === e && ((o = x.contextDetails) == null ? void 0 : o.dashboardId) === (t == null ? void 0 : t.dashboardId);
1946
1946
  })) == null ? void 0 : a.chatId), {
1947
1947
  isError: d,
1948
1948
  data: g,
1949
1949
  isSuccess: f
1950
- } = Wo(e, r && !l && !p, t);
1951
- return Le(() => {
1950
+ } = Po(e, r && !l && !p, t);
1951
+ return Te(() => {
1952
1952
  f && g && !p && s.saveChatId(g.chatId, e, t);
1953
1953
  }, [g, f, e, t, p, s]), {
1954
1954
  chatId: p,
1955
1955
  isLoading: l,
1956
1956
  isError: d
1957
1957
  };
1958
- }, Ho = (e) => U(() => {
1958
+ }, Ho = (e) => Q(() => {
1959
1959
  if (e != null && e.length) {
1960
1960
  const t = e[e.length - 1];
1961
- if (Tr(t))
1961
+ if (Nr(t))
1962
1962
  return JSON.parse(t.content);
1963
1963
  }
1964
1964
  return null;
1965
- }, [e]), Tr = (e) => !!e && "type" in e && e.type === "nlq", Bo = (e) => !!e && "type" in e && e.type === "text", Yo = (e, t) => {
1965
+ }, [e]), Nr = (e) => !!e && "type" in e && e.type === "nlq", Bo = (e) => !!e && "type" in e && e.type === "text", Yo = (e, t) => {
1966
1966
  const {
1967
1967
  t: r
1968
1968
  } = E(), {
1969
1969
  enableFollowupQuestions: a
1970
- } = ie(), {
1970
+ } = oe(), {
1971
1971
  chatId: i,
1972
1972
  isError: l
1973
- } = Go(e, t, !0), [s, p] = Z(null), {
1973
+ } = $o(e, t, !0), [s, p] = Z(null), {
1974
1974
  history: d,
1975
1975
  isLoading: g,
1976
1976
  isError: f
1977
- } = zo(i);
1978
- Le(() => {
1979
- l ? p(new Me("ai.errors.chatUnavailable")) : f && p(new Me("ai.errors.fetchHistory"));
1977
+ } = Ro(i);
1978
+ Te(() => {
1979
+ l ? p(new Ie("ai.errors.chatUnavailable")) : f && p(new Ie("ai.errors.fetchHistory"));
1980
1980
  }, [l, f, r]);
1981
1981
  const {
1982
1982
  mutate: x,
@@ -1991,29 +1991,43 @@ const lt = 4, jo = (e) => {
1991
1991
  isLoading: g,
1992
1992
  lastError: s
1993
1993
  };
1994
- }, Qo = 500, Uo = 500, Fo = 500, Vo = 900, $o = /* @__PURE__ */ C("div", {
1995
- target: "e1toc89x0",
1996
- label: "ChatFrame"
1997
- })("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:", ({
1994
+ }, Uo = 500, Qo = 500, Fo = 500, Vo = 900, Jo = _.div`
1995
+ box-sizing: border-box;
1996
+ position: relative;
1997
+ display: flex;
1998
+ flex-direction: column;
1999
+ border: 1px solid #c6c9ce;
2000
+ border-radius: ${({
1998
2001
  theme: e
1999
- }) => e.aiChat.borderRadius, ";background-color:", ({
2002
+ }) => e.aiChat.borderRadius};
2003
+ background-color: ${({
2000
2004
  theme: e
2001
- }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", Qo, "px;min-height:", Uo, "px;width:", ({
2005
+ }) => e.aiChat.backgroundColor};
2006
+ overflow: hidden;
2007
+
2008
+ min-width: ${Uo}px;
2009
+ min-height: ${Qo}px;
2010
+ width: ${({
2002
2011
  width: e
2003
- }) => e ? Pt(e) : `${Fo}px`, ";height:", ({
2012
+ }) => e ? Gt(e) : `${Fo}px`};
2013
+ height: ${({
2004
2014
  height: e
2005
- }) => e ? Pt(e) : `${Vo}px`, ";", ({
2015
+ }) => e ? Gt(e) : `${Vo}px`};
2016
+
2017
+ ${({
2006
2018
  theme: e
2007
2019
  }) => P`
2008
2020
  font-size: ${e.aiChat.primaryFontSize[0]};
2009
2021
  line-height: ${e.aiChat.primaryFontSize[1]};
2010
- `, " border:", ({
2022
+ `}
2023
+ border: ${({
2011
2024
  theme: e
2012
- }) => e.aiChat.border === !1 ? "none" : e.aiChat.border, ";");
2013
- function Pt(e) {
2025
+ }) => e.aiChat.border === !1 ? "none" : e.aiChat.border};
2026
+ `;
2027
+ function Gt(e) {
2014
2028
  return typeof e == "number" ? `${e}px` : e;
2015
2029
  }
2016
- function Jo({
2030
+ function Xo({
2017
2031
  spin: e
2018
2032
  }) {
2019
2033
  return /* @__PURE__ */ v("svg", {
@@ -2037,28 +2051,38 @@ function Jo({
2037
2051
  })]
2038
2052
  });
2039
2053
  }
2040
- function Ue() {
2054
+ function Qe() {
2041
2055
  return /* @__PURE__ */ n("div", {
2042
2056
  className: "csdk-m-auto",
2043
2057
  "aria-label": "loading spinner",
2044
- children: /* @__PURE__ */ n(Jo, {
2058
+ children: /* @__PURE__ */ n(Xo, {
2045
2059
  spin: !0
2046
2060
  })
2047
2061
  });
2048
2062
  }
2049
- const Xo = /* @__PURE__ */ C("div", {
2050
- target: "e176zu9j0",
2051
- label: "AiDisclaimerContainer"
2052
- })("text-align:center;font-size:11px;line-height:18px;white-space:pre-wrap;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;color:", ({
2063
+ const Ko = _.div`
2064
+ text-align: center;
2065
+ font-size: 11px;
2066
+ line-height: 18px;
2067
+ white-space: pre-wrap;
2068
+
2069
+ display: flex;
2070
+ flex-wrap: wrap;
2071
+ align-items: center;
2072
+ justify-content: center;
2073
+ box-sizing: border-box;
2074
+
2075
+ color: ${({
2053
2076
  theme: e
2054
- }) => e.aiChat.secondaryTextColor, ";");
2055
- function Ko({
2077
+ }) => e.aiChat.secondaryTextColor};
2078
+ `;
2079
+ function en({
2056
2080
  theme: e
2057
2081
  }) {
2058
2082
  const {
2059
2083
  t
2060
2084
  } = E();
2061
- return /* @__PURE__ */ v(Xo, {
2085
+ return /* @__PURE__ */ v(Ko, {
2062
2086
  theme: e,
2063
2087
  children: [/* @__PURE__ */ n("div", {
2064
2088
  children: t("ai.disclaimer.poweredByAi")
@@ -2067,29 +2091,43 @@ function Ko({
2067
2091
  })]
2068
2092
  });
2069
2093
  }
2070
- const en = /* @__PURE__ */ C("div", {
2071
- target: "e1vujcck0",
2072
- label: "Section"
2073
- })("display:flex;flex-direction:column;row-gap:4px;"), tn = /* @__PURE__ */ C("div", {
2074
- target: "e1vujcck1",
2075
- label: "SectionHeader"
2076
- })("font-size:11px;line-height:18px;font-weight:300;color:", ({
2094
+ const tn = _.div`
2095
+ display: flex;
2096
+ flex-direction: column;
2097
+ row-gap: 4px;
2098
+ `, rn = _.div`
2099
+ font-size: 11px;
2100
+ line-height: 18px;
2101
+ font-weight: 300;
2102
+ color: ${({
2077
2103
  theme: e
2078
- }) => e.aiChat.dropup.headers.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
2104
+ }) => e.aiChat.dropup.headers.textColor};
2105
+ cursor: pointer;
2106
+ padding: 4px 12px;
2107
+ &:hover {
2108
+ background-color: ${({
2079
2109
  theme: e
2080
- }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), rn = /* @__PURE__ */ C("div", {
2081
- target: "e1vujcck2",
2082
- label: "DropupItem"
2083
- })("font-size:", ({
2110
+ }) => e.aiChat.dropup.headers.hover.backgroundColor};
2111
+ }
2112
+ `, an = _.div`
2113
+ font-size: ${({
2084
2114
  theme: e
2085
- }) => e.aiChat.primaryFontSize[0], ";line-height:", ({
2115
+ }) => e.aiChat.primaryFontSize[0]};
2116
+ line-height: ${({
2086
2117
  theme: e
2087
- }) => e.aiChat.primaryFontSize[1], ";color:", ({
2118
+ }) => e.aiChat.primaryFontSize[1]};
2119
+ color: ${({
2088
2120
  theme: e
2089
- }) => e.aiChat.dropup.items.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
2121
+ }) => e.aiChat.dropup.items.textColor};
2122
+ cursor: pointer;
2123
+ padding: 4px 12px;
2124
+ &:hover {
2125
+ background-color: ${({
2090
2126
  theme: e
2091
- }) => e.aiChat.dropup.items.hover.backgroundColor, ";}");
2092
- function an({
2127
+ }) => e.aiChat.dropup.items.hover.backgroundColor};
2128
+ }
2129
+ `;
2130
+ function on({
2093
2131
  title: e,
2094
2132
  items: t,
2095
2133
  onSelect: r,
@@ -2098,44 +2136,55 @@ function an({
2098
2136
  const [i, l] = Z(!1), {
2099
2137
  themeSettings: s
2100
2138
  } = L();
2101
- return /* @__PURE__ */ v(en, {
2102
- children: [/* @__PURE__ */ n(tn, {
2139
+ return /* @__PURE__ */ v(tn, {
2140
+ children: [/* @__PURE__ */ n(rn, {
2103
2141
  onClick: () => l((p) => !p),
2104
2142
  theme: s,
2105
2143
  children: e.toUpperCase()
2106
- }), (i || a) && t.map((p, d) => /* @__PURE__ */ n(rn, {
2144
+ }), (i || a) && t.map((p, d) => /* @__PURE__ */ n(an, {
2107
2145
  onClick: () => r(p),
2108
2146
  theme: s,
2109
2147
  children: p
2110
2148
  }, d))]
2111
2149
  });
2112
2150
  }
2113
- const on = /* @__PURE__ */ C("div", {
2114
- target: "e1nxw6f60",
2115
- label: "PopupContent"
2116
- })("font-family:", ({
2151
+ const nn = _.div`
2152
+ font-family: ${({
2117
2153
  theme: e
2118
- }) => e.typography.fontFamily, ";font-size:", ({
2154
+ }) => e.typography.fontFamily};
2155
+ font-size: ${({
2119
2156
  theme: e
2120
- }) => e.aiChat.primaryFontSize[0], ";line-height:", ({
2157
+ }) => e.aiChat.primaryFontSize[0]};
2158
+ line-height: ${({
2121
2159
  theme: e
2122
- }) => e.aiChat.primaryFontSize[1], ";background-color:", ({
2160
+ }) => e.aiChat.primaryFontSize[1]};
2161
+ background-color: ${({
2123
2162
  theme: e
2124
- }) => e.aiChat.dropup.backgroundColor, ";border-radius:", ({
2163
+ }) => e.aiChat.dropup.backgroundColor};
2164
+ border-radius: ${({
2125
2165
  theme: e
2126
- }) => e.aiChat.dropup.borderRadius, ";box-shadow:", ({
2166
+ }) => e.aiChat.dropup.borderRadius};
2167
+ box-shadow: ${({
2127
2168
  theme: e
2128
- }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), nn = /* @__PURE__ */ C("div", {
2129
- target: "e1nxw6f61",
2130
- label: "ErrorMessage"
2131
- })("font-size:", ({
2169
+ }) => e.aiChat.dropup.boxShadow};
2170
+ padding-top: 8px;
2171
+ padding-bottom: 8px;
2172
+ display: flex;
2173
+ flex-direction: column;
2174
+ row-gap: 4px;
2175
+ `, ln = _.div`
2176
+ font-size: ${({
2132
2177
  theme: e
2133
- }) => e.aiChat.primaryFontSize[0], ";line-height:", ({
2178
+ }) => e.aiChat.primaryFontSize[0]};
2179
+ line-height: ${({
2134
2180
  theme: e
2135
- }) => e.aiChat.primaryFontSize[1], ";color:", ({
2181
+ }) => e.aiChat.primaryFontSize[1]};
2182
+ color: ${({
2136
2183
  theme: e
2137
- }) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"), st = (e) => e.startsWith("/");
2138
- function ln({
2184
+ }) => e.aiChat.dropup.items.textColor};
2185
+ padding: 4px 12px;
2186
+ `, dt = (e) => e.startsWith("/");
2187
+ function sn({
2139
2188
  recentPrompts: e,
2140
2189
  suggestions: t,
2141
2190
  isLoading: r,
@@ -2157,8 +2206,8 @@ function ln({
2157
2206
  } = L(), {
2158
2207
  t: g
2159
2208
  } = E(), f = p.length === 1;
2160
- return /* @__PURE__ */ n(rr, {
2161
- open: st(l) && p.length > 0,
2209
+ return /* @__PURE__ */ n(nr, {
2210
+ open: dt(l) && p.length > 0,
2162
2211
  anchorEl: i,
2163
2212
  placement: "top-start",
2164
2213
  modifiers: [{
@@ -2170,22 +2219,22 @@ function ln({
2170
2219
  sx: {
2171
2220
  zIndex: 3
2172
2221
  },
2173
- children: /* @__PURE__ */ v(on, {
2222
+ children: /* @__PURE__ */ v(nn, {
2174
2223
  style: {
2175
2224
  width: i == null ? void 0 : i.offsetWidth
2176
2225
  },
2177
2226
  theme: d,
2178
- children: [r && /* @__PURE__ */ n(Ue, {}), !r && !s && p.map((x) => /* @__PURE__ */ n(an, j(I({}, x), {
2227
+ children: [r && /* @__PURE__ */ n(Qe, {}), !r && !s && p.map((x) => /* @__PURE__ */ n(on, j(I({}, x), {
2179
2228
  alwaysExpanded: f
2180
- }), x.title)), s && /* @__PURE__ */ n(nn, {
2229
+ }), x.title)), s && /* @__PURE__ */ n(ln, {
2181
2230
  theme: d,
2182
2231
  children: g("ai.errors.recommendationsNotAvailable")
2183
2232
  })]
2184
2233
  })
2185
2234
  });
2186
2235
  }
2187
- const sn = 500;
2188
- function Te({
2236
+ const cn = 500;
2237
+ function Ne({
2189
2238
  title: e,
2190
2239
  placement: t = "top",
2191
2240
  children: r
@@ -2193,7 +2242,7 @@ function Te({
2193
2242
  const {
2194
2243
  themeSettings: a
2195
2244
  } = L();
2196
- return /* @__PURE__ */ n(za, {
2245
+ return /* @__PURE__ */ n($a, {
2197
2246
  title: e,
2198
2247
  placement: t,
2199
2248
  disableInteractive: !0,
@@ -2221,7 +2270,7 @@ function Te({
2221
2270
  children: r
2222
2271
  });
2223
2272
  }
2224
- function cn({
2273
+ function dn({
2225
2274
  theme: e
2226
2275
  }) {
2227
2276
  const t = e.aiChat.icons.color;
@@ -2243,7 +2292,7 @@ function cn({
2243
2292
  })]
2244
2293
  });
2245
2294
  }
2246
- function dn({
2295
+ function pn({
2247
2296
  theme: e
2248
2297
  }) {
2249
2298
  return /* @__PURE__ */ n("svg", {
@@ -2258,29 +2307,64 @@ function dn({
2258
2307
  })
2259
2308
  });
2260
2309
  }
2261
- const pn = /* @__PURE__ */ C("div", {
2262
- target: "e1ssacaw0",
2263
- label: "ChatInputContainer"
2264
- })("display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;background-color:", ({
2310
+ const un = _.div`
2311
+ display: flex;
2312
+ flex-direction: row;
2313
+ align-items: flex-end;
2314
+ justify-content: space-between;
2315
+
2316
+ background-color: ${({
2265
2317
  theme: e
2266
- }) => e.aiChat.backgroundColor, ";"), un = /* @__PURE__ */ C("button", {
2267
- target: "e1ssacaw1",
2268
- label: "ClearHistoryButton"
2269
- })("height:34px;background-color:inherit;cursor:pointer;border:none;"), gn = /* @__PURE__ */ C("textarea", {
2270
- target: "e1ssacaw2",
2271
- label: "TextInput"
2272
- })("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 ", ({
2318
+ }) => e.aiChat.backgroundColor};
2319
+ `, gn = _.button`
2320
+ height: 34px;
2321
+ background-color: inherit;
2322
+ cursor: pointer;
2323
+ border: none;
2324
+ `, hn = _.textarea`
2325
+ font-size: inherit;
2326
+ line-height: inherit;
2327
+ resize: none;
2328
+ overflow-y: auto;
2329
+ box-sizing: border-box;
2330
+ // size style
2331
+ max-height: 88px;
2332
+ width: 100%;
2333
+ // spacing style
2334
+ padding-top: 7px;
2335
+ padding-bottom: 7px;
2336
+ padding-left: 16px;
2337
+ padding-right: 16px;
2338
+ margin-left: 10px;
2339
+ margin-right: 10px;
2340
+ // border style
2341
+ border-width: 1px;
2342
+ border-color: rgb(38 46 61 / 0.15);
2343
+ border-radius: 0.5rem;
2344
+ &:focus {
2345
+ outline: 1px solid ${({
2273
2346
  theme: e
2274
- }) => e.aiChat.input.focus.outlineColor, ";}font-family:inherit;color:", ({
2347
+ }) => e.aiChat.input.focus.outlineColor};
2348
+ }
2349
+ font-family: inherit;
2350
+
2351
+ color: ${({
2275
2352
  theme: e
2276
- }) => e.aiChat.primaryTextColor, ";background-color:", ({
2353
+ }) => e.aiChat.primaryTextColor};
2354
+
2355
+ background-color: ${({
2277
2356
  theme: e
2278
- }) => e.aiChat.input.backgroundColor, ";"), hn = /* @__PURE__ */ C("button", {
2279
- target: "e1ssacaw3",
2280
- label: "SendMessageButton"
2281
- })("height:34px;background-color:inherit;border-style:none;color:", ({
2357
+ }) => e.aiChat.input.backgroundColor};
2358
+ `, mn = _.button`
2359
+ height: 34px;
2360
+ background-color: inherit;
2361
+ border-style: none;
2362
+
2363
+ color: ${({
2282
2364
  theme: e
2283
- }) => e.aiChat.primaryTextColor, ";", ({
2365
+ }) => e.aiChat.primaryTextColor};
2366
+
2367
+ ${({
2284
2368
  disabled: e
2285
2369
  }) => e ? P`
2286
2370
  opacity: 0.3;
@@ -2288,8 +2372,9 @@ const pn = /* @__PURE__ */ C("div", {
2288
2372
  ` : P`
2289
2373
  opacity: 1;
2290
2374
  cursor: pointer;
2291
- `), mn = 34;
2292
- function bn({
2375
+ `}
2376
+ `, bn = 34;
2377
+ function fn({
2293
2378
  onSendMessage: e,
2294
2379
  onClearHistoryClick: t,
2295
2380
  disabled: r,
@@ -2301,10 +2386,10 @@ function bn({
2301
2386
  }) {
2302
2387
  const [d, g] = Z(""), {
2303
2388
  inputPromptText: f
2304
- } = ie(), x = N(() => {
2389
+ } = oe(), x = N(() => {
2305
2390
  if (r)
2306
2391
  return;
2307
- if (st(d)) {
2392
+ if (dt(d)) {
2308
2393
  g("");
2309
2394
  return;
2310
2395
  }
@@ -2313,12 +2398,16 @@ function bn({
2313
2398
  }, [r, e, d]), o = N((y) => {
2314
2399
  e(y), g("");
2315
2400
  }, [e]), u = N((y) => {
2316
- y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" && st(d) && g("");
2401
+ y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" && dt(d) && g("");
2317
2402
  }, [x, d]), c = N((y) => {
2318
2403
  p == null || p(y.target.value), g(y.target.value);
2319
- }, [p]), m = de(null);
2404
+ }, [p]), m = pe(null);
2320
2405
  qe(() => {
2321
- m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(m.current.scrollHeight + 2, mn)}px`);
2406
+ m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(
2407
+ m.current.scrollHeight + 2,
2408
+ // account for 1px top/bottom border
2409
+ bn
2410
+ )}px`);
2322
2411
  }, [d]), qe(() => {
2323
2412
  m.current && m.current.focus({
2324
2413
  preventScroll: !0
@@ -2328,7 +2417,7 @@ function bn({
2328
2417
  themeSettings: h
2329
2418
  } = L(), {
2330
2419
  t: w
2331
- } = E(), _ = N((y) => {
2420
+ } = E(), C = N((y) => {
2332
2421
  var M;
2333
2422
  if ((M = document.getElementById("csdk-chatbot-frame")) != null && M.contains(y.relatedTarget)) {
2334
2423
  const D = (S) => {
@@ -2340,9 +2429,9 @@ function bn({
2340
2429
  document.addEventListener("mouseup", D), document.addEventListener("keyup", D);
2341
2430
  }
2342
2431
  }, []);
2343
- return /* @__PURE__ */ v(pn, {
2432
+ return /* @__PURE__ */ v(un, {
2344
2433
  theme: h,
2345
- children: [/* @__PURE__ */ n(ln, {
2434
+ children: [/* @__PURE__ */ n(sn, {
2346
2435
  recentPrompts: a,
2347
2436
  suggestions: i,
2348
2437
  isLoading: l,
@@ -2350,20 +2439,20 @@ function bn({
2350
2439
  anchorEl: m.current,
2351
2440
  text: d,
2352
2441
  recommendationsError: s
2353
- }), t && /* @__PURE__ */ n(Te, {
2442
+ }), t && /* @__PURE__ */ n(Ne, {
2354
2443
  title: w("ai.buttons.clearChat"),
2355
2444
  placement: "bottom-start",
2356
- children: /* @__PURE__ */ n(un, {
2445
+ children: /* @__PURE__ */ n(gn, {
2357
2446
  "aria-label": "clear history",
2358
2447
  onClick: t,
2359
- children: /* @__PURE__ */ n(cn, {
2448
+ children: /* @__PURE__ */ n(dn, {
2360
2449
  theme: h
2361
2450
  })
2362
2451
  })
2363
- }), /* @__PURE__ */ n(gn, {
2452
+ }), /* @__PURE__ */ n(hn, {
2364
2453
  "aria-label": "chat input",
2365
- onBlur: _,
2366
- maxLength: sn,
2454
+ onBlur: C,
2455
+ maxLength: cn,
2367
2456
  ref: m,
2368
2457
  rows: 1,
2369
2458
  onChange: c,
@@ -2372,69 +2461,83 @@ function bn({
2372
2461
  value: d,
2373
2462
  onKeyDown: u,
2374
2463
  theme: h
2375
- }), /* @__PURE__ */ n(hn, {
2464
+ }), /* @__PURE__ */ n(mn, {
2376
2465
  "aria-label": "send chat message",
2377
2466
  disabled: r || d.length === 0,
2378
2467
  onClick: x,
2379
2468
  theme: h,
2380
2469
  children: /* @__PURE__ */ n("span", {
2381
2470
  "data-state": "closed",
2382
- children: /* @__PURE__ */ n(dn, {
2471
+ children: /* @__PURE__ */ n(pn, {
2383
2472
  theme: h
2384
2473
  })
2385
2474
  })
2386
2475
  })]
2387
2476
  });
2388
2477
  }
2389
- const fn = /* @__PURE__ */ C("div", {
2390
- target: "en1tixw0",
2391
- label: "Container"
2392
- })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), xn = /* @__PURE__ */ C("div", {
2393
- target: "en1tixw1",
2394
- label: "Title"
2395
- })("color:", ({
2478
+ const xn = _.div`
2479
+ margin: auto;
2480
+ display: flex;
2481
+ flex-direction: column;
2482
+ align-items: center;
2483
+ row-gap: 21px;
2484
+ `, kn = _.div`
2485
+ color: ${({
2396
2486
  theme: e
2397
- }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), kn = /* @__PURE__ */ C("div", {
2398
- target: "en1tixw2",
2399
- label: "ActionButton"
2400
- })("color:rgba(54,163,217,1);cursor:pointer;");
2401
- function Nr({
2487
+ }) => e.aiChat.primaryTextColor};
2488
+ text-align: center;
2489
+ font-weight: 600;
2490
+ `, yn = _.div`
2491
+ color: rgba(54, 163, 217, 1);
2492
+ cursor: pointer;
2493
+ `;
2494
+ function jr({
2402
2495
  text: e,
2403
2496
  action: t
2404
2497
  }) {
2405
2498
  const {
2406
2499
  themeSettings: r
2407
2500
  } = L();
2408
- return /* @__PURE__ */ v(fn, {
2409
- children: [/* @__PURE__ */ n(xn, {
2501
+ return /* @__PURE__ */ v(xn, {
2502
+ children: [/* @__PURE__ */ n(kn, {
2410
2503
  theme: r,
2411
2504
  children: e
2412
- }), /* @__PURE__ */ n(Ma, {}), t && /* @__PURE__ */ n(kn, {
2505
+ }), /* @__PURE__ */ n(Aa, {}), t && /* @__PURE__ */ n(yn, {
2413
2506
  onClick: t.onClick,
2414
2507
  children: t.text
2415
2508
  })]
2416
2509
  });
2417
2510
  }
2418
- const yn = /* @__PURE__ */ C("div", {
2419
- target: "e14i1z190",
2420
- label: "ToolbarContainer"
2421
- })("flex:0 0 80px;padding-left:14px;padding-right:14px;display:flex;align-items:center;position:relative;background-color:", ({
2511
+ const wn = _.div`
2512
+ flex: 0 0 80px;
2513
+ padding-left: 14px;
2514
+ padding-right: 14px;
2515
+ display: flex;
2516
+ align-items: center;
2517
+ position: relative;
2518
+
2519
+ background-color: ${({
2422
2520
  style: e
2423
- }) => e.backgroundColor, ";"), wn = /* @__PURE__ */ C("div", {
2424
- target: "e14i1z191",
2425
- label: "ToolbarTitle"
2426
- })("font-size:18px;line-height:22px;font-weight:600;margin-left:20px;color:", ({
2521
+ }) => e.backgroundColor};
2522
+ `, _n = _.div`
2523
+ font-size: 18px;
2524
+ line-height: 22px;
2525
+ font-weight: 600;
2526
+ margin-left: 20px;
2527
+
2528
+ color: ${({
2427
2529
  style: e
2428
- }) => e.textColor, ";"), jr = /* @__PURE__ */ tr(function({
2530
+ }) => e.textColor};
2531
+ `, Or = er(function({
2429
2532
  title: e,
2430
2533
  leftNav: t,
2431
2534
  rightNav: r,
2432
2535
  style: a
2433
2536
  }, i) {
2434
- return /* @__PURE__ */ v(yn, {
2537
+ return /* @__PURE__ */ v(wn, {
2435
2538
  ref: i,
2436
2539
  style: a,
2437
- children: [t, /* @__PURE__ */ n(wn, {
2540
+ children: [t, /* @__PURE__ */ n(_n, {
2438
2541
  style: a,
2439
2542
  children: e
2440
2543
  }), r && /* @__PURE__ */ n("div", {
@@ -2442,39 +2545,64 @@ const yn = /* @__PURE__ */ C("div", {
2442
2545
  children: r
2443
2546
  })]
2444
2547
  });
2445
- }), Re = /* @__PURE__ */ C("div", {
2446
- target: "e6bmai50",
2447
- label: "Dot"
2448
- })("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%);}}");
2449
- function Or() {
2548
+ }), Ze = _.div`
2549
+ width: 5px;
2550
+ height: 5px;
2551
+ border-radius: 50%;
2552
+ background-color: ${(e) => e.color};
2553
+ animation: hop 0.9s ease-out infinite;
2554
+
2555
+ &:nth-of-type(2) {
2556
+ animation-delay: 0.1s;
2557
+ }
2558
+
2559
+ &:nth-of-type(3) {
2560
+ animation-delay: 0.2s;
2561
+ }
2562
+
2563
+ &:nth-of-type(4) {
2564
+ animation-delay: 0.3s;
2565
+ }
2566
+
2567
+ @keyframes hop {
2568
+ 0%,
2569
+ 40% {
2570
+ transform: translateY(0);
2571
+ }
2572
+ 20% {
2573
+ transform: translateY(-100%);
2574
+ }
2575
+ }
2576
+ `;
2577
+ function Er() {
2450
2578
  const {
2451
2579
  themeSettings: e
2452
2580
  } = L(), t = e.aiChat.icons.color;
2453
2581
  return /* @__PURE__ */ v("div", {
2454
2582
  className: "csdk-flex csdk-justify-between csdk-w-[28px] csdk-py-[14.5px]",
2455
2583
  "aria-label": "loading dots",
2456
- children: [/* @__PURE__ */ n(Re, {
2584
+ children: [/* @__PURE__ */ n(Ze, {
2457
2585
  color: t
2458
- }), /* @__PURE__ */ n(Re, {
2586
+ }), /* @__PURE__ */ n(Ze, {
2459
2587
  color: t
2460
- }), /* @__PURE__ */ n(Re, {
2588
+ }), /* @__PURE__ */ n(Ze, {
2461
2589
  color: t
2462
- }), /* @__PURE__ */ n(Re, {
2590
+ }), /* @__PURE__ */ n(Ze, {
2463
2591
  color: t
2464
2592
  })]
2465
2593
  });
2466
2594
  }
2467
- function ce() {
2468
- return ce = Object.assign ? Object.assign.bind() : function(e) {
2595
+ function de() {
2596
+ return de = Object.assign ? Object.assign.bind() : function(e) {
2469
2597
  for (var t = 1; t < arguments.length; t++) {
2470
2598
  var r = arguments[t];
2471
2599
  for (var a in r)
2472
2600
  Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
2473
2601
  }
2474
2602
  return e;
2475
- }, ce.apply(this, arguments);
2603
+ }, de.apply(this, arguments);
2476
2604
  }
2477
- const _n = ["children", "options"], k = {
2605
+ const Cn = ["children", "options"], k = {
2478
2606
  blockQuote: "0",
2479
2607
  breakLine: "1",
2480
2608
  breakThematic: "2",
@@ -2514,7 +2642,7 @@ var qt;
2514
2642
  (function(e) {
2515
2643
  e[e.MAX = 0] = "MAX", e[e.HIGH = 1] = "HIGH", e[e.MED = 2] = "MED", e[e.LOW = 3] = "LOW", e[e.MIN = 4] = "MIN";
2516
2644
  })(qt || (qt = {}));
2517
- const Gt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), {
2645
+ const $t = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), {
2518
2646
  class: "className",
2519
2647
  for: "htmlFor"
2520
2648
  }), Ht = {
@@ -2524,47 +2652,47 @@ const Gt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus",
2524
2652
  lt: "<",
2525
2653
  nbsp: " ",
2526
2654
  quot: "“"
2527
- }, Cn = ["style", "script"], vn = ["src", "href", "data", "formAction", "srcDoc", "action"], Sn = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Mn = /mailto:/i, In = /\n{2,}$/, Er = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Dn = /^ *> ?/gm, An = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Ln = /^ {2,}\n/, Tn = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, zr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Rr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Nn = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, jn = /^(?:\n *)*\n/, On = /\r\n?/g, En = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, zn = /^\[\^([^\]]+)]/, Rn = /\f/g, Zn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Wn = /^\s*?\[(x|\s)\]/, Zr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Wr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Pr = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ct = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Pn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, qr = /^<!--[\s\S]*?(?:-->)/, qn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, dt = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Gn = /^\{.*\}$/, Hn = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Bn = /^<([^ >]+@[^ >]+)>/, Yn = /^<([^ >]+:\/[^ >]+)>/, Qn = /-([a-z])?/gi, Gr = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Un = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Fn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Vn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, $n = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Jn = /\t/g, Xn = /(^ *\||\| *$)/g, Kn = /^ *:-+: *$/, el = /^ *:-+ *$/, tl = /^ *-+: *$/, Fe = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", rl = new RegExp(`^([*_])\\1${Fe}\\1\\1(?!\\1)`), al = new RegExp(`^([*_])${Fe}\\1(?!\\1)`), il = new RegExp(`^(==)${Fe}\\1`), ol = new RegExp(`^(~~)${Fe}\\1`), nl = /^\\([^0-9A-Za-z\s])/, Bt = /\\([^0-9A-Za-z\s])/g, ll = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, sl = /^\n+/, cl = /^([ \t]*)/, dl = /\\([^\\])/g, pl = /(?:^|\n)( *)$/, vt = "(?:\\d+\\.)", St = "(?:[*+-])";
2655
+ }, vn = ["style", "script"], Sn = ["src", "href", "data", "formAction", "srcDoc", "action"], Mn = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, In = /mailto:/i, Dn = /\n{2,}$/, zr = /^(\s*>[\s\S]*?)(?=\n\n|$)/, An = /^ *> ?/gm, Ln = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Tn = /^ {2,}\n/, Nn = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Rr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Zr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, jn = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, On = /^(?:\n *)*\n/, En = /\r\n?/g, zn = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Rn = /^\[\^([^\]]+)]/, Zn = /\f/g, Wn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Pn = /^\s*?\[(x|\s)\]/, Wr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Pr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Gr = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, pt = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Gn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, qr = /^<!--[\s\S]*?(?:-->)/, qn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, ut = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, $n = /^\{.*\}$/, Hn = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Bn = /^<([^ >]+@[^ >]+)>/, Yn = /^<([^ >]+:\/[^ >]+)>/, Un = /-([a-z])?/gi, $r = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Qn = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Fn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Vn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Jn = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Xn = /\t/g, Kn = /(^ *\||\| *$)/g, el = /^ *:-+: *$/, tl = /^ *:-+ *$/, rl = /^ *-+: *$/, Fe = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", al = new RegExp(`^([*_])\\1${Fe}\\1\\1(?!\\1)`), il = new RegExp(`^([*_])${Fe}\\1(?!\\1)`), ol = new RegExp(`^(==)${Fe}\\1`), nl = new RegExp(`^(~~)${Fe}\\1`), ll = /^\\([^0-9A-Za-z\s])/, Bt = /\\([^0-9A-Za-z\s])/g, sl = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, cl = /^\n+/, dl = /^([ \t]*)/, pl = /\\([^\\])/g, ul = /(?:^|\n)( *)$/, Mt = "(?:\\d+\\.)", It = "(?:[*+-])";
2528
2656
  function Hr(e) {
2529
- return "( *)(" + (e === 1 ? vt : St) + ") +";
2657
+ return "( *)(" + (e === 1 ? Mt : It) + ") +";
2530
2658
  }
2531
2659
  const Br = Hr(1), Yr = Hr(2);
2532
- function Qr(e) {
2660
+ function Ur(e) {
2533
2661
  return new RegExp("^" + (e === 1 ? Br : Yr));
2534
2662
  }
2535
- const ul = Qr(1), gl = Qr(2);
2536
- function Ur(e) {
2537
- return new RegExp("^" + (e === 1 ? Br : Yr) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? vt : St) + " )[^\\n]*)*(\\n|$)", "gm");
2663
+ const gl = Ur(1), hl = Ur(2);
2664
+ function Qr(e) {
2665
+ return new RegExp("^" + (e === 1 ? Br : Yr) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Mt : It) + " )[^\\n]*)*(\\n|$)", "gm");
2538
2666
  }
2539
- const hl = Ur(1), ml = Ur(2);
2667
+ const ml = Qr(1), bl = Qr(2);
2540
2668
  function Fr(e) {
2541
- const t = e === 1 ? vt : St;
2669
+ const t = e === 1 ? Mt : It;
2542
2670
  return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
2543
2671
  }
2544
- const Vr = Fr(1), $r = Fr(2);
2672
+ const Vr = Fr(1), Jr = Fr(2);
2545
2673
  function Yt(e, t) {
2546
- const r = t === 1, a = r ? Vr : $r, i = r ? hl : ml, l = r ? ul : gl;
2674
+ const r = t === 1, a = r ? Vr : Jr, i = r ? ml : bl, l = r ? gl : hl;
2547
2675
  return {
2548
- match: xe(function(s, p) {
2549
- const d = pl.exec(p.prevCapture);
2676
+ match: ke(function(s, p) {
2677
+ const d = ul.exec(p.prevCapture);
2550
2678
  return d && (p.list || !p.inline && !p.simple) ? a.exec(s = d[1] + s) : null;
2551
2679
  }),
2552
2680
  order: 1,
2553
2681
  parse(s, p, d) {
2554
- const g = r ? +s[2] : void 0, f = s[0].replace(In, `
2682
+ const g = r ? +s[2] : void 0, f = s[0].replace(Dn, `
2555
2683
  `).match(i);
2556
2684
  let x = !1;
2557
2685
  return {
2558
2686
  items: f.map(function(o, u) {
2559
- const c = l.exec(o)[0].length, m = new RegExp("^ {1," + c + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = u === f.length - 1, _ = h.indexOf(`
2687
+ const c = l.exec(o)[0].length, m = new RegExp("^ {1," + c + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = u === f.length - 1, C = h.indexOf(`
2560
2688
 
2561
2689
  `) !== -1 || w && x;
2562
- x = _;
2690
+ x = C;
2563
2691
  const y = d.inline, M = d.list;
2564
2692
  let D;
2565
- d.list = !0, _ ? (d.inline = !1, D = Ie(h) + `
2693
+ d.list = !0, C ? (d.inline = !1, D = De(h) + `
2566
2694
 
2567
- `) : (d.inline = !0, D = Ie(h));
2695
+ `) : (d.inline = !0, D = De(h));
2568
2696
  const S = p(D, d);
2569
2697
  return d.inline = y, d.list = M, S;
2570
2698
  }),
@@ -2582,20 +2710,20 @@ function Yt(e, t) {
2582
2710
  }))
2583
2711
  };
2584
2712
  }
2585
- const bl = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), fl = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Jr = [Er, zr, Rr, Zr, Pr, Wr, Gr, Vr, $r], xl = [...Jr, /^[^\n]+(?: \n|\n{2,})/, ct, qr, dt];
2586
- function Ie(e) {
2713
+ const fl = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), xl = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Xr = [zr, Rr, Zr, Wr, Gr, Pr, $r, Vr, Jr], kl = [...Xr, /^[^\n]+(?: \n|\n{2,})/, pt, qr, ut];
2714
+ function De(e) {
2587
2715
  let t = e.length;
2588
2716
  for (; t > 0 && e[t - 1] <= " "; )
2589
2717
  t--;
2590
2718
  return e.slice(0, t);
2591
2719
  }
2592
- function Ce(e) {
2720
+ function ve(e) {
2593
2721
  return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
2594
2722
  }
2595
- function kl(e) {
2596
- return tl.test(e) ? "right" : Kn.test(e) ? "center" : el.test(e) ? "left" : null;
2723
+ function yl(e) {
2724
+ return rl.test(e) ? "right" : el.test(e) ? "center" : tl.test(e) ? "left" : null;
2597
2725
  }
2598
- function Qt(e, t, r, a) {
2726
+ function Ut(e, t, r, a) {
2599
2727
  const i = r.inTable;
2600
2728
  r.inTable = !0;
2601
2729
  let l = [[]], s = "";
@@ -2609,14 +2737,14 @@ function Qt(e, t, r, a) {
2609
2737
  d.trim() === "|" && (p(), a) ? g !== 0 && g !== f.length - 1 && l.push([]) : s += d;
2610
2738
  }), p(), r.inTable = i, l;
2611
2739
  }
2612
- function yl(e, t, r) {
2740
+ function wl(e, t, r) {
2613
2741
  r.inline = !0;
2614
- const a = e[2] ? e[2].replace(Xn, "").split("|").map(kl) : [], i = e[3] ? function(s, p, d) {
2742
+ const a = e[2] ? e[2].replace(Kn, "").split("|").map(yl) : [], i = e[3] ? function(s, p, d) {
2615
2743
  return s.trim().split(`
2616
2744
  `).map(function(g) {
2617
- return Qt(g, p, d, !0);
2745
+ return Ut(g, p, d, !0);
2618
2746
  });
2619
- }(e[3], t, r) : [], l = Qt(e[1], t, r, !!i.length);
2747
+ }(e[3], t, r) : [], l = Ut(e[1], t, r, !!i.length);
2620
2748
  return r.inline = !1, i.length ? {
2621
2749
  align: a,
2622
2750
  cells: i,
@@ -2627,49 +2755,49 @@ function yl(e, t, r) {
2627
2755
  type: k.paragraph
2628
2756
  };
2629
2757
  }
2630
- function Ut(e, t) {
2758
+ function Qt(e, t) {
2631
2759
  return e.align[t] == null ? {} : {
2632
2760
  textAlign: e.align[t]
2633
2761
  };
2634
2762
  }
2635
- function xe(e) {
2763
+ function ke(e) {
2636
2764
  return e.inline = 1, e;
2637
2765
  }
2638
- function oe(e) {
2639
- return xe(function(t, r) {
2766
+ function ne(e) {
2767
+ return ke(function(t, r) {
2640
2768
  return r.inline ? e.exec(t) : null;
2641
2769
  });
2642
2770
  }
2643
- function ne(e) {
2644
- return xe(function(t, r) {
2771
+ function le(e) {
2772
+ return ke(function(t, r) {
2645
2773
  return r.inline || r.simple ? e.exec(t) : null;
2646
2774
  });
2647
2775
  }
2648
- function te(e) {
2776
+ function re(e) {
2649
2777
  return function(t, r) {
2650
2778
  return r.inline || r.simple ? null : e.exec(t);
2651
2779
  };
2652
2780
  }
2653
- function ve(e) {
2654
- return xe(function(t) {
2781
+ function Se(e) {
2782
+ return ke(function(t) {
2655
2783
  return e.exec(t);
2656
2784
  });
2657
2785
  }
2658
- function wl(e, t) {
2786
+ function _l(e, t) {
2659
2787
  if (t.inline || t.simple)
2660
2788
  return null;
2661
2789
  let r = "";
2662
2790
  e.split(`
2663
2791
  `).every((i) => (i += `
2664
- `, !Jr.some((l) => l.test(i)) && (r += i, !!i.trim())));
2665
- const a = Ie(r);
2792
+ `, !Xr.some((l) => l.test(i)) && (r += i, !!i.trim())));
2793
+ const a = De(r);
2666
2794
  return a == "" ? null : [r, , a];
2667
2795
  }
2668
- const _l = /(javascript|vbscript|data(?!:image)):/i;
2669
- function Cl(e) {
2796
+ const Cl = /(javascript|vbscript|data(?!:image)):/i;
2797
+ function vl(e) {
2670
2798
  try {
2671
2799
  const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
2672
- if (_l.test(t))
2800
+ if (Cl.test(t))
2673
2801
  return null;
2674
2802
  } catch {
2675
2803
  return null;
@@ -2677,60 +2805,60 @@ function Cl(e) {
2677
2805
  return e;
2678
2806
  }
2679
2807
  function Ft(e) {
2680
- return e.replace(dl, "$1");
2808
+ return e.replace(pl, "$1");
2681
2809
  }
2682
- function Pe(e, t, r) {
2810
+ function Ge(e, t, r) {
2683
2811
  const a = r.inline || !1, i = r.simple || !1;
2684
2812
  r.inline = !0, r.simple = !0;
2685
2813
  const l = e(t, r);
2686
2814
  return r.inline = a, r.simple = i, l;
2687
2815
  }
2688
- function vl(e, t, r) {
2816
+ function Sl(e, t, r) {
2689
2817
  const a = r.inline || !1, i = r.simple || !1;
2690
2818
  r.inline = !1, r.simple = !0;
2691
2819
  const l = e(t, r);
2692
2820
  return r.inline = a, r.simple = i, l;
2693
2821
  }
2694
- function Sl(e, t, r) {
2822
+ function Ml(e, t, r) {
2695
2823
  const a = r.inline || !1;
2696
2824
  r.inline = !1;
2697
2825
  const i = e(t, r);
2698
2826
  return r.inline = a, i;
2699
2827
  }
2700
- const Ke = (e, t, r) => ({
2701
- children: Pe(t, e[2], r)
2828
+ const et = (e, t, r) => ({
2829
+ children: Ge(t, e[2], r)
2702
2830
  });
2703
- function et() {
2831
+ function tt() {
2704
2832
  return {};
2705
2833
  }
2706
- function tt() {
2834
+ function rt() {
2707
2835
  return null;
2708
2836
  }
2709
- function Ml(...e) {
2837
+ function Il(...e) {
2710
2838
  return e.filter(Boolean).join(" ");
2711
2839
  }
2712
- function rt(e, t, r) {
2840
+ function at(e, t, r) {
2713
2841
  let a = e;
2714
2842
  const i = t.split(".");
2715
2843
  for (; i.length && (a = a[i[0]], a !== void 0); )
2716
2844
  i.shift();
2717
2845
  return a || r;
2718
2846
  }
2719
- function Il(e = "", t = {}) {
2847
+ function Dl(e = "", t = {}) {
2720
2848
  function r(o, u, ...c) {
2721
- const m = rt(t.overrides, `${o}.props`, {});
2849
+ const m = at(t.overrides, `${o}.props`, {});
2722
2850
  return t.createElement(function(h, w) {
2723
- const _ = rt(w, h);
2724
- return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : rt(w, `${h}.component`, h) : h;
2725
- }(o, t.overrides), ce({}, u, m, {
2726
- className: Ml(u == null ? void 0 : u.className, m.className) || void 0
2851
+ const C = at(w, h);
2852
+ return C ? typeof C == "function" || typeof C == "object" && "render" in C ? C : at(w, `${h}.component`, h) : h;
2853
+ }(o, t.overrides), de({}, u, m, {
2854
+ className: Il(u == null ? void 0 : u.className, m.className) || void 0
2727
2855
  }), ...c);
2728
2856
  }
2729
2857
  function a(o) {
2730
- o = o.replace(Zn, "");
2858
+ o = o.replace(Wn, "");
2731
2859
  let u = !1;
2732
- t.forceInline ? u = !0 : t.forceBlock || (u = $n.test(o) === !1);
2733
- const c = g(d(u ? o : `${Ie(o).replace(sl, "")}
2860
+ t.forceInline ? u = !0 : t.forceBlock || (u = Jn.test(o) === !1);
2861
+ const c = g(d(u ? o : `${De(o).replace(cl, "")}
2734
2862
 
2735
2863
  `, {
2736
2864
  inline: u
@@ -2755,68 +2883,68 @@ function Il(e = "", t = {}) {
2755
2883
  }, h);
2756
2884
  }
2757
2885
  function i(o, u) {
2758
- const c = u.match(Sn);
2886
+ const c = u.match(Mn);
2759
2887
  return c ? c.reduce(function(m, h) {
2760
2888
  const w = h.indexOf("=");
2761
2889
  if (w !== -1) {
2762
- const _ = function(S) {
2763
- return S.indexOf("-") !== -1 && S.match(qn) === null && (S = S.replace(Qn, function(A, R) {
2890
+ const C = function(S) {
2891
+ return S.indexOf("-") !== -1 && S.match(qn) === null && (S = S.replace(Un, function(A, R) {
2764
2892
  return R.toUpperCase();
2765
2893
  })), S;
2766
2894
  }(h.slice(0, w)).trim(), y = function(S) {
2767
2895
  const A = S[0];
2768
2896
  return (A === '"' || A === "'") && S.length >= 2 && S[S.length - 1] === A ? S.slice(1, -1) : S;
2769
- }(h.slice(w + 1).trim()), M = Gt[_] || _;
2897
+ }(h.slice(w + 1).trim()), M = $t[C] || C;
2770
2898
  if (M === "ref")
2771
2899
  return m;
2772
- const D = m[M] = function(S, A, R, ue) {
2900
+ const D = m[M] = function(S, A, R, ge) {
2773
2901
  return A === "style" ? function(F) {
2774
- const G = [];
2775
- let B = "", V = !1, H = !1, $ = "";
2902
+ const q = [];
2903
+ let B = "", V = !1, $ = !1, J = "";
2776
2904
  if (!F)
2777
- return G;
2905
+ return q;
2778
2906
  for (let z = 0; z < F.length; z++) {
2779
2907
  const W = F[z];
2780
- if (W !== '"' && W !== "'" || V || (H ? W === $ && (H = !1, $ = "") : (H = !0, $ = W)), W === "(" && B.endsWith("url") ? V = !0 : W === ")" && V && (V = !1), W !== ";" || H || V)
2908
+ if (W !== '"' && W !== "'" || V || ($ ? W === J && ($ = !1, J = "") : ($ = !0, J = W)), W === "(" && B.endsWith("url") ? V = !0 : W === ")" && V && (V = !1), W !== ";" || $ || V)
2781
2909
  B += W;
2782
2910
  else {
2783
2911
  const Y = B.trim();
2784
2912
  if (Y) {
2785
- const se = Y.indexOf(":");
2786
- if (se > 0) {
2787
- const ge = Y.slice(0, se).trim(), ke = Y.slice(se + 1).trim();
2788
- G.push([ge, ke]);
2913
+ const ce = Y.indexOf(":");
2914
+ if (ce > 0) {
2915
+ const he = Y.slice(0, ce).trim(), ye = Y.slice(ce + 1).trim();
2916
+ q.push([he, ye]);
2789
2917
  }
2790
2918
  }
2791
2919
  B = "";
2792
2920
  }
2793
2921
  }
2794
- const J = B.trim();
2795
- if (J) {
2796
- const z = J.indexOf(":");
2922
+ const X = B.trim();
2923
+ if (X) {
2924
+ const z = X.indexOf(":");
2797
2925
  if (z > 0) {
2798
- const W = J.slice(0, z).trim(), Y = J.slice(z + 1).trim();
2799
- G.push([W, Y]);
2926
+ const W = X.slice(0, z).trim(), Y = X.slice(z + 1).trim();
2927
+ q.push([W, Y]);
2800
2928
  }
2801
2929
  }
2802
- return G;
2803
- }(R).reduce(function(F, [G, B]) {
2804
- return F[G.replace(/(-[a-z])/g, (V) => V[1].toUpperCase())] = ue(B, S, G), F;
2805
- }, {}) : vn.indexOf(A) !== -1 ? ue(R, S, A) : (R.match(Gn) && (R = R.slice(1, R.length - 1)), R === "true" || R !== "false" && R);
2806
- }(o, _, y, t.sanitizer);
2807
- typeof D == "string" && (ct.test(D) || dt.test(D)) && (m[M] = a(D.trim()));
2930
+ return q;
2931
+ }(R).reduce(function(F, [q, B]) {
2932
+ return F[q.replace(/(-[a-z])/g, (V) => V[1].toUpperCase())] = ge(B, S, q), F;
2933
+ }, {}) : Sn.indexOf(A) !== -1 ? ge(R, S, A) : (R.match($n) && (R = R.slice(1, R.length - 1)), R === "true" || R !== "false" && R);
2934
+ }(o, C, y, t.sanitizer);
2935
+ typeof D == "string" && (pt.test(D) || ut.test(D)) && (m[M] = a(D.trim()));
2808
2936
  } else
2809
- h !== "style" && (m[Gt[h] || h] = !0);
2937
+ h !== "style" && (m[$t[h] || h] = !0);
2810
2938
  return m;
2811
2939
  }, {}) : null;
2812
2940
  }
2813
- t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || Cl, t.slugify = t.slugify || Ce, t.namedCodesToUnicode = t.namedCodesToUnicode ? ce({}, Ht, t.namedCodesToUnicode) : Ht, t.createElement = t.createElement || Qa;
2941
+ t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || vl, t.slugify = t.slugify || ve, t.namedCodesToUnicode = t.namedCodesToUnicode ? de({}, Ht, t.namedCodesToUnicode) : Ht, t.createElement = t.createElement || Ha;
2814
2942
  const l = [], s = {}, p = {
2815
2943
  [k.blockQuote]: {
2816
- match: te(Er),
2944
+ match: re(zr),
2817
2945
  order: 1,
2818
2946
  parse(o, u, c) {
2819
- const [, m, h] = o[0].replace(Dn, "").match(An);
2947
+ const [, m, h] = o[0].replace(An, "").match(Ln);
2820
2948
  return {
2821
2949
  alert: m,
2822
2950
  children: u(h, c)
@@ -2826,7 +2954,7 @@ function Il(e = "", t = {}) {
2826
2954
  const m = {
2827
2955
  key: c.key
2828
2956
  };
2829
- return o.alert && (m.className = "markdown-alert-" + t.slugify(o.alert.toLowerCase(), Ce), o.children.unshift({
2957
+ return o.alert && (m.className = "markdown-alert-" + t.slugify(o.alert.toLowerCase(), ve), o.children.unshift({
2830
2958
  attrs: {},
2831
2959
  children: [{
2832
2960
  type: k.text,
@@ -2839,36 +2967,36 @@ function Il(e = "", t = {}) {
2839
2967
  }
2840
2968
  },
2841
2969
  [k.breakLine]: {
2842
- match: ve(Ln),
2970
+ match: Se(Tn),
2843
2971
  order: 1,
2844
- parse: et,
2972
+ parse: tt,
2845
2973
  render: (o, u, c) => r("br", {
2846
2974
  key: c.key
2847
2975
  })
2848
2976
  },
2849
2977
  [k.breakThematic]: {
2850
- match: te(Tn),
2978
+ match: re(Nn),
2851
2979
  order: 1,
2852
- parse: et,
2980
+ parse: tt,
2853
2981
  render: (o, u, c) => r("hr", {
2854
2982
  key: c.key
2855
2983
  })
2856
2984
  },
2857
2985
  [k.codeBlock]: {
2858
- match: te(Rr),
2986
+ match: re(Zr),
2859
2987
  order: 0,
2860
2988
  parse: (o) => ({
2861
2989
  lang: void 0,
2862
- text: Ie(o[0].replace(/^ {4}/gm, "")).replace(Bt, "$1")
2990
+ text: De(o[0].replace(/^ {4}/gm, "")).replace(Bt, "$1")
2863
2991
  }),
2864
2992
  render: (o, u, c) => r("pre", {
2865
2993
  key: c.key
2866
- }, r("code", ce({}, o.attrs, {
2994
+ }, r("code", de({}, o.attrs, {
2867
2995
  className: o.lang ? `lang-${o.lang}` : ""
2868
2996
  }), o.text))
2869
2997
  },
2870
2998
  [k.codeFenced]: {
2871
- match: te(zr),
2999
+ match: re(Rr),
2872
3000
  order: 0,
2873
3001
  parse: (o) => ({
2874
3002
  attrs: i("code", o[3] || ""),
@@ -2878,7 +3006,7 @@ function Il(e = "", t = {}) {
2878
3006
  })
2879
3007
  },
2880
3008
  [k.codeInline]: {
2881
- match: ne(Nn),
3009
+ match: le(jn),
2882
3010
  order: 3,
2883
3011
  parse: (o) => ({
2884
3012
  text: o[2].replace(Bt, "$1")
@@ -2888,19 +3016,19 @@ function Il(e = "", t = {}) {
2888
3016
  }, o.text)
2889
3017
  },
2890
3018
  [k.footnote]: {
2891
- match: te(En),
3019
+ match: re(zn),
2892
3020
  order: 0,
2893
3021
  parse: (o) => (l.push({
2894
3022
  footnote: o[2],
2895
3023
  identifier: o[1]
2896
3024
  }), {}),
2897
- render: tt
3025
+ render: rt
2898
3026
  },
2899
3027
  [k.footnoteReference]: {
2900
- match: oe(zn),
3028
+ match: ne(Rn),
2901
3029
  order: 1,
2902
3030
  parse: (o) => ({
2903
- target: `#${t.slugify(o[1], Ce)}`,
3031
+ target: `#${t.slugify(o[1], ve)}`,
2904
3032
  text: o[1]
2905
3033
  }),
2906
3034
  render: (o, u, c) => r("a", {
@@ -2911,7 +3039,7 @@ function Il(e = "", t = {}) {
2911
3039
  }, o.text))
2912
3040
  },
2913
3041
  [k.gfmTask]: {
2914
- match: oe(Wn),
3042
+ match: ne(Pn),
2915
3043
  order: 1,
2916
3044
  parse: (o) => ({
2917
3045
  completed: o[1].toLowerCase() === "x"
@@ -2924,11 +3052,11 @@ function Il(e = "", t = {}) {
2924
3052
  })
2925
3053
  },
2926
3054
  [k.heading]: {
2927
- match: te(t.enforceAtxHeadings ? Wr : Zr),
3055
+ match: re(t.enforceAtxHeadings ? Pr : Wr),
2928
3056
  order: 1,
2929
3057
  parse: (o, u, c) => ({
2930
- children: Pe(u, o[2], c),
2931
- id: t.slugify(o[2], Ce),
3058
+ children: Ge(u, o[2], c),
3059
+ id: t.slugify(o[2], ve),
2932
3060
  level: o[1].length
2933
3061
  }),
2934
3062
  render: (o, u, c) => r(`h${o.level}`, {
@@ -2937,33 +3065,33 @@ function Il(e = "", t = {}) {
2937
3065
  }, u(o.children, c))
2938
3066
  },
2939
3067
  [k.headingSetext]: {
2940
- match: te(Pr),
3068
+ match: re(Gr),
2941
3069
  order: 0,
2942
3070
  parse: (o, u, c) => ({
2943
- children: Pe(u, o[1], c),
3071
+ children: Ge(u, o[1], c),
2944
3072
  level: o[2] === "=" ? 1 : 2,
2945
3073
  type: k.heading
2946
3074
  })
2947
3075
  },
2948
3076
  [k.htmlBlock]: {
2949
- match: ve(ct),
3077
+ match: Se(pt),
2950
3078
  order: 1,
2951
3079
  parse(o, u, c) {
2952
- const [, m] = o[3].match(cl), h = new RegExp(`^${m}`, "gm"), w = o[3].replace(h, ""), _ = (y = w, xl.some((R) => R.test(y)) ? Sl : Pe);
3080
+ const [, m] = o[3].match(dl), h = new RegExp(`^${m}`, "gm"), w = o[3].replace(h, ""), C = (y = w, kl.some((R) => R.test(y)) ? Ml : Ge);
2953
3081
  var y;
2954
- const M = o[1].toLowerCase(), D = Cn.indexOf(M) !== -1, S = (D ? M : o[1]).trim(), A = {
3082
+ const M = o[1].toLowerCase(), D = vn.indexOf(M) !== -1, S = (D ? M : o[1]).trim(), A = {
2955
3083
  attrs: i(S, o[2]),
2956
3084
  noInnerParse: D,
2957
3085
  tag: S
2958
3086
  };
2959
- return c.inAnchor = c.inAnchor || M === "a", D ? A.text = o[3] : A.children = _(u, w, c), c.inAnchor = !1, A;
3087
+ return c.inAnchor = c.inAnchor || M === "a", D ? A.text = o[3] : A.children = C(u, w, c), c.inAnchor = !1, A;
2960
3088
  },
2961
- render: (o, u, c) => r(o.tag, ce({
3089
+ render: (o, u, c) => r(o.tag, de({
2962
3090
  key: c.key
2963
3091
  }, o.attrs), o.text || (o.children ? u(o.children, c) : ""))
2964
3092
  },
2965
3093
  [k.htmlSelfClosing]: {
2966
- match: ve(dt),
3094
+ match: Se(ut),
2967
3095
  order: 1,
2968
3096
  parse(o) {
2969
3097
  const u = o[1].trim();
@@ -2972,18 +3100,18 @@ function Il(e = "", t = {}) {
2972
3100
  tag: u
2973
3101
  };
2974
3102
  },
2975
- render: (o, u, c) => r(o.tag, ce({}, o.attrs, {
3103
+ render: (o, u, c) => r(o.tag, de({}, o.attrs, {
2976
3104
  key: c.key
2977
3105
  }))
2978
3106
  },
2979
3107
  [k.htmlComment]: {
2980
- match: ve(qr),
3108
+ match: Se(qr),
2981
3109
  order: 1,
2982
3110
  parse: () => ({}),
2983
- render: tt
3111
+ render: rt
2984
3112
  },
2985
3113
  [k.image]: {
2986
- match: ne(fl),
3114
+ match: le(xl),
2987
3115
  order: 1,
2988
3116
  parse: (o) => ({
2989
3117
  alt: o[1],
@@ -2998,10 +3126,10 @@ function Il(e = "", t = {}) {
2998
3126
  })
2999
3127
  },
3000
3128
  [k.link]: {
3001
- match: oe(bl),
3129
+ match: ne(fl),
3002
3130
  order: 3,
3003
3131
  parse: (o, u, c) => ({
3004
- children: vl(u, o[1], c),
3132
+ children: Sl(u, o[1], c),
3005
3133
  target: Ft(o[2]),
3006
3134
  title: o[3]
3007
3135
  }),
@@ -3012,7 +3140,7 @@ function Il(e = "", t = {}) {
3012
3140
  }, u(o.children, c))
3013
3141
  },
3014
3142
  [k.linkAngleBraceStyleDetector]: {
3015
- match: oe(Yn),
3143
+ match: ne(Yn),
3016
3144
  order: 0,
3017
3145
  parse: (o) => ({
3018
3146
  children: [{
@@ -3024,7 +3152,7 @@ function Il(e = "", t = {}) {
3024
3152
  })
3025
3153
  },
3026
3154
  [k.linkBareUrlDetector]: {
3027
- match: xe((o, u) => u.inAnchor || t.disableAutoLink ? null : oe(Hn)(o, u)),
3155
+ match: ke((o, u) => u.inAnchor || t.disableAutoLink ? null : ne(Hn)(o, u)),
3028
3156
  order: 0,
3029
3157
  parse: (o) => ({
3030
3158
  children: [{
@@ -3037,11 +3165,11 @@ function Il(e = "", t = {}) {
3037
3165
  })
3038
3166
  },
3039
3167
  [k.linkMailtoDetector]: {
3040
- match: oe(Bn),
3168
+ match: ne(Bn),
3041
3169
  order: 0,
3042
3170
  parse(o) {
3043
3171
  let u = o[1], c = o[1];
3044
- return Mn.test(c) || (c = "mailto:" + c), {
3172
+ return In.test(c) || (c = "mailto:" + c), {
3045
3173
  children: [{
3046
3174
  text: u.replace("mailto:", ""),
3047
3175
  type: k.text
@@ -3054,31 +3182,31 @@ function Il(e = "", t = {}) {
3054
3182
  [k.orderedList]: Yt(r, 1),
3055
3183
  [k.unorderedList]: Yt(r, 2),
3056
3184
  [k.newlineCoalescer]: {
3057
- match: te(jn),
3185
+ match: re(On),
3058
3186
  order: 3,
3059
- parse: et,
3187
+ parse: tt,
3060
3188
  render: () => `
3061
3189
  `
3062
3190
  },
3063
3191
  [k.paragraph]: {
3064
- match: xe(wl),
3192
+ match: ke(_l),
3065
3193
  order: 3,
3066
- parse: Ke,
3194
+ parse: et,
3067
3195
  render: (o, u, c) => r("p", {
3068
3196
  key: c.key
3069
3197
  }, u(o.children, c))
3070
3198
  },
3071
3199
  [k.ref]: {
3072
- match: oe(Un),
3200
+ match: ne(Qn),
3073
3201
  order: 0,
3074
3202
  parse: (o) => (s[o[1]] = {
3075
3203
  target: o[2],
3076
3204
  title: o[4]
3077
3205
  }, {}),
3078
- render: tt
3206
+ render: rt
3079
3207
  },
3080
3208
  [k.refImage]: {
3081
- match: ne(Fn),
3209
+ match: le(Fn),
3082
3210
  order: 0,
3083
3211
  parse: (o) => ({
3084
3212
  alt: o[1] || void 0,
@@ -3092,7 +3220,7 @@ function Il(e = "", t = {}) {
3092
3220
  }) : null
3093
3221
  },
3094
3222
  [k.refLink]: {
3095
- match: oe(Vn),
3223
+ match: ne(Vn),
3096
3224
  order: 0,
3097
3225
  parse: (o, u, c) => ({
3098
3226
  children: u(o[1], c),
@@ -3108,9 +3236,9 @@ function Il(e = "", t = {}) {
3108
3236
  }, o.fallbackChildren)
3109
3237
  },
3110
3238
  [k.table]: {
3111
- match: te(Gr),
3239
+ match: re($r),
3112
3240
  order: 1,
3113
- parse: yl,
3241
+ parse: wl,
3114
3242
  render(o, u, c) {
3115
3243
  const m = o;
3116
3244
  return r("table", {
@@ -3118,30 +3246,30 @@ function Il(e = "", t = {}) {
3118
3246
  }, r("thead", null, r("tr", null, m.header.map(function(h, w) {
3119
3247
  return r("th", {
3120
3248
  key: w,
3121
- style: Ut(m, w)
3249
+ style: Qt(m, w)
3122
3250
  }, u(h, c));
3123
3251
  }))), r("tbody", null, m.cells.map(function(h, w) {
3124
3252
  return r("tr", {
3125
3253
  key: w
3126
- }, h.map(function(_, y) {
3254
+ }, h.map(function(C, y) {
3127
3255
  return r("td", {
3128
3256
  key: y,
3129
- style: Ut(m, y)
3130
- }, u(_, c));
3257
+ style: Qt(m, y)
3258
+ }, u(C, c));
3131
3259
  }));
3132
3260
  })));
3133
3261
  }
3134
3262
  },
3135
3263
  [k.text]: {
3136
- match: ve(ll),
3264
+ match: Se(sl),
3137
3265
  order: 4,
3138
3266
  parse: (o) => ({
3139
- text: o[0].replace(Pn, (u, c) => t.namedCodesToUnicode[c] ? t.namedCodesToUnicode[c] : u)
3267
+ text: o[0].replace(Gn, (u, c) => t.namedCodesToUnicode[c] ? t.namedCodesToUnicode[c] : u)
3140
3268
  }),
3141
3269
  render: (o) => o.text
3142
3270
  },
3143
3271
  [k.textBolded]: {
3144
- match: ne(rl),
3272
+ match: le(al),
3145
3273
  order: 2,
3146
3274
  parse: (o, u, c) => ({
3147
3275
  children: u(o[2], c)
@@ -3151,7 +3279,7 @@ function Il(e = "", t = {}) {
3151
3279
  }, u(o.children, c))
3152
3280
  },
3153
3281
  [k.textEmphasized]: {
3154
- match: ne(al),
3282
+ match: le(il),
3155
3283
  order: 3,
3156
3284
  parse: (o, u, c) => ({
3157
3285
  children: u(o[2], c)
@@ -3161,7 +3289,7 @@ function Il(e = "", t = {}) {
3161
3289
  }, u(o.children, c))
3162
3290
  },
3163
3291
  [k.textEscaped]: {
3164
- match: ne(nl),
3292
+ match: le(ll),
3165
3293
  order: 1,
3166
3294
  parse: (o) => ({
3167
3295
  text: o[1],
@@ -3169,17 +3297,17 @@ function Il(e = "", t = {}) {
3169
3297
  })
3170
3298
  },
3171
3299
  [k.textMarked]: {
3172
- match: ne(il),
3300
+ match: le(ol),
3173
3301
  order: 3,
3174
- parse: Ke,
3302
+ parse: et,
3175
3303
  render: (o, u, c) => r("mark", {
3176
3304
  key: c.key
3177
3305
  }, u(o.children, c))
3178
3306
  },
3179
3307
  [k.textStrikethroughed]: {
3180
- match: ne(ol),
3308
+ match: le(nl),
3181
3309
  order: 3,
3182
- parse: Ke,
3310
+ parse: et,
3183
3311
  render: (o, u, c) => r("del", {
3184
3312
  key: c.key
3185
3313
  }, u(o.children, c))
@@ -3189,7 +3317,7 @@ function Il(e = "", t = {}) {
3189
3317
  const d = function(o) {
3190
3318
  let u = Object.keys(o);
3191
3319
  function c(m, h) {
3192
- let w, _, y = [], M = "", D = "";
3320
+ let w, C, y = [], M = "", D = "";
3193
3321
  for (h.prevCapture = h.prevCapture || ""; m; ) {
3194
3322
  let S = 0;
3195
3323
  for (; S < u.length; ) {
@@ -3199,7 +3327,7 @@ function Il(e = "", t = {}) {
3199
3327
  }
3200
3328
  const A = w.match(m, h);
3201
3329
  if (A) {
3202
- D = A[0], h.prevCapture += D, m = m.substring(D.length), _ = w.parse(A, c, h), _.type == null && (_.type = M), y.push(_);
3330
+ D = A[0], h.prevCapture += D, m = m.substring(D.length), C = w.parse(A, c, h), C.type == null && (C.type = M), y.push(C);
3203
3331
  break;
3204
3332
  }
3205
3333
  S++;
@@ -3208,12 +3336,12 @@ function Il(e = "", t = {}) {
3208
3336
  return h.prevCapture = "", y;
3209
3337
  }
3210
3338
  return u.sort(function(m, h) {
3211
- let w = o[m].order, _ = o[h].order;
3212
- return w !== _ ? w - _ : m < h ? -1 : 1;
3339
+ let w = o[m].order, C = o[h].order;
3340
+ return w !== C ? w - C : m < h ? -1 : 1;
3213
3341
  }), function(m, h) {
3214
3342
  return c(function(w) {
3215
- return w.replace(On, `
3216
- `).replace(Rn, "").replace(Jn, " ");
3343
+ return w.replace(En, `
3344
+ `).replace(Zn, "").replace(Xn, " ");
3217
3345
  }(m), h);
3218
3346
  };
3219
3347
  }(p), g = (f = /* @__PURE__ */ function(o, u) {
@@ -3225,9 +3353,9 @@ function Il(e = "", t = {}) {
3225
3353
  if (Array.isArray(u)) {
3226
3354
  const m = c.key, h = [];
3227
3355
  let w = !1;
3228
- for (let _ = 0; _ < u.length; _++) {
3229
- c.key = _;
3230
- const y = o(u[_], c), M = typeof y == "string";
3356
+ for (let C = 0; C < u.length; C++) {
3357
+ c.key = C;
3358
+ const y = o(u[C], c), M = typeof y == "string";
3231
3359
  M && w ? h[h.length - 1] += y : y !== null && h.push(y), w = M;
3232
3360
  }
3233
3361
  return c.key = m, h;
@@ -3240,14 +3368,14 @@ function Il(e = "", t = {}) {
3240
3368
  key: "footer"
3241
3369
  }, l.map(function(o) {
3242
3370
  return r("div", {
3243
- id: t.slugify(o.identifier, Ce),
3371
+ id: t.slugify(o.identifier, ve),
3244
3372
  key: o.identifier
3245
3373
  }, o.identifier, g(d(o.footnote, {
3246
3374
  inline: !0
3247
3375
  })));
3248
3376
  }))) : x;
3249
3377
  }
3250
- const Dl = (e) => {
3378
+ const Al = (e) => {
3251
3379
  let {
3252
3380
  children: t = "",
3253
3381
  options: r
@@ -3258,21 +3386,30 @@ const Dl = (e) => {
3258
3386
  for (p = 0; p < g.length; p++)
3259
3387
  l.indexOf(s = g[p]) >= 0 || (d[s] = i[s]);
3260
3388
  return d;
3261
- }(e, _n);
3262
- return Ra(Il(t, r), a);
3263
- }, Al = /* @__PURE__ */ C("div", {
3264
- target: "e197bd6i0",
3265
- label: "FlexContainer"
3266
- })("display:flex;", ({
3389
+ }(e, Cn);
3390
+ return Na(Dl(t, r), a);
3391
+ }, Ll = _.div`
3392
+ display: flex;
3393
+
3394
+ ${({
3267
3395
  align: e
3268
3396
  }) => e === "right" ? P`
3269
3397
  justify-content: flex-end;
3270
3398
  ` : P`
3271
3399
  justify-content: flex-start;
3272
- `), Xr = /* @__PURE__ */ C("div", {
3273
- target: "e197bd6i1",
3274
- label: "MessageContainer"
3275
- })("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;", ({
3400
+ `}
3401
+ `, Kr = _.div`
3402
+ font-size: inherit;
3403
+ line-height: inherit;
3404
+ padding-top: 8.5px;
3405
+ padding-bottom: 8.5px;
3406
+ padding-left: 0.5rem;
3407
+ padding-right: 0.5rem;
3408
+ white-space: pre-wrap;
3409
+ overflow-wrap: break-word;
3410
+ box-sizing: border-box;
3411
+
3412
+ ${({
3276
3413
  align: e
3277
3414
  }) => e === "right" ? P`
3278
3415
  text-align: right;
@@ -3280,76 +3417,100 @@ const Dl = (e) => {
3280
3417
  ` : P`
3281
3418
  text-align: left;
3282
3419
  border-radius: 10px 10px 10px 0px;
3283
- `, " ", ({
3420
+ `}
3421
+
3422
+ ${({
3284
3423
  align: e
3285
3424
  }) => e !== "full" ? P`
3286
3425
  max-width: 85%;
3287
- ` : "", " color:", ({
3426
+ ` : ""}
3427
+
3428
+ color: ${({
3288
3429
  theme: e
3289
- }) => e.aiChat.primaryTextColor, ";background-color:", ({
3430
+ }) => e.aiChat.primaryTextColor};
3431
+ background-color: ${({
3290
3432
  theme: e,
3291
3433
  align: t
3292
- }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), le = ({
3434
+ }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor};
3435
+ `, se = ({
3293
3436
  align: e,
3294
3437
  children: t
3295
3438
  }) => {
3296
3439
  const {
3297
3440
  themeSettings: r
3298
3441
  } = L();
3299
- return /* @__PURE__ */ n(Al, {
3442
+ return /* @__PURE__ */ n(Ll, {
3300
3443
  theme: r,
3301
3444
  align: e,
3302
- children: /* @__PURE__ */ n(Xr, {
3445
+ children: /* @__PURE__ */ n(Kr, {
3303
3446
  theme: r,
3304
3447
  align: e,
3305
- children: typeof t == "string" ? /* @__PURE__ */ n(Dl, {
3448
+ children: typeof t == "string" ? /* @__PURE__ */ n(Al, {
3306
3449
  children: t
3307
3450
  }) : t
3308
3451
  })
3309
3452
  });
3310
3453
  };
3311
- function Ll() {
3454
+ function Tl() {
3312
3455
  const {
3313
3456
  welcomeText: e
3314
- } = ie();
3315
- return e === !1 ? null : /* @__PURE__ */ n(le, {
3457
+ } = oe();
3458
+ return e === !1 ? null : /* @__PURE__ */ n(se, {
3316
3459
  align: "left",
3317
3460
  children: e
3318
3461
  });
3319
3462
  }
3320
- const Tl = /* @__PURE__ */ C("div", {
3321
- target: "ewt6vnj0",
3322
- label: "FlexContainer"
3323
- })("display:flex;", ({
3463
+ const Nl = _.div`
3464
+ display: flex;
3465
+
3466
+ ${({
3324
3467
  align: e
3325
3468
  }) => e === "right" ? P`
3326
3469
  justify-content: flex-end;
3327
3470
  ` : P`
3328
3471
  justify-content: flex-start;
3329
- `), Nl = /* @__PURE__ */ C("button", {
3330
- target: "ewt6vnj1",
3331
- label: "MessageButton"
3332
- })("font-family:inherit;font-size:inherit;line-height:inherit;border:", ({
3472
+ `}
3473
+ `, jl = _.button`
3474
+ font-family: inherit;
3475
+ font-size: inherit;
3476
+ line-height: inherit;
3477
+ border: ${({
3333
3478
  theme: e
3334
- }) => e.aiChat.clickableMessages.border, ";padding:0;cursor:pointer;color:", ({
3479
+ }) => e.aiChat.clickableMessages.border};
3480
+ padding: 0;
3481
+ cursor: pointer;
3482
+
3483
+ color: ${({
3335
3484
  theme: e
3336
- }) => e.aiChat.clickableMessages.textColor, ";background-color:", ({
3485
+ }) => e.aiChat.clickableMessages.textColor};
3486
+ background-color: ${({
3337
3487
  theme: e
3338
- }) => e.aiChat.clickableMessages.backgroundColor, ";&:hover{color:", ({
3488
+ }) => e.aiChat.clickableMessages.backgroundColor};
3489
+ &:hover {
3490
+ color: ${({
3339
3491
  theme: e
3340
- }) => e.aiChat.clickableMessages.hover.textColor, ";background-color:", ({
3492
+ }) => e.aiChat.clickableMessages.hover.textColor};
3493
+ background-color: ${({
3341
3494
  theme: e
3342
- }) => e.aiChat.clickableMessages.hover.backgroundColor, ";}border-radius:20px;", ({
3495
+ }) => e.aiChat.clickableMessages.hover.backgroundColor};
3496
+ }
3497
+ border-radius: 20px;
3498
+
3499
+ ${({
3343
3500
  align: e
3344
3501
  }) => e === "right" ? P`
3345
3502
  text-align: right;
3346
3503
  ` : P`
3347
3504
  text-align: left;
3348
- `, " ", ({
3505
+ `}
3506
+
3507
+ ${({
3349
3508
  align: e
3350
3509
  }) => e !== "full" ? P`
3351
3510
  max-width: 382px;
3352
- ` : "", " ", ({
3511
+ ` : ""}
3512
+
3513
+ ${({
3353
3514
  theme: e
3354
3515
  }) => {
3355
3516
  const {
@@ -3379,7 +3540,8 @@ const Tl = /* @__PURE__ */ C("div", {
3379
3540
  `;
3380
3541
  }
3381
3542
  return "";
3382
- });
3543
+ }}
3544
+ `;
3383
3545
  function Be({
3384
3546
  children: e,
3385
3547
  align: t,
@@ -3391,9 +3553,9 @@ function Be({
3391
3553
  const {
3392
3554
  themeSettings: s
3393
3555
  } = L();
3394
- return /* @__PURE__ */ n(Tl, {
3556
+ return /* @__PURE__ */ n(Nl, {
3395
3557
  align: t,
3396
- children: /* @__PURE__ */ n(Nl, {
3558
+ children: /* @__PURE__ */ n(jl, {
3397
3559
  "aria-label": l,
3398
3560
  theme: s,
3399
3561
  onClick: r,
@@ -3404,15 +3566,15 @@ function Be({
3404
3566
  })
3405
3567
  });
3406
3568
  }
3407
- function jl({
3569
+ function Ol({
3408
3570
  onCancel: e,
3409
3571
  onConfirm: t
3410
3572
  }) {
3411
3573
  const {
3412
3574
  t: r
3413
3575
  } = E();
3414
- return /* @__PURE__ */ v(Q, {
3415
- children: [/* @__PURE__ */ n(le, {
3576
+ return /* @__PURE__ */ v(U, {
3577
+ children: [/* @__PURE__ */ n(se, {
3416
3578
  align: "left",
3417
3579
  children: r("ai.clearHistoryPrompt")
3418
3580
  }), /* @__PURE__ */ v("div", {
@@ -3437,8 +3599,8 @@ function jl({
3437
3599
  })]
3438
3600
  });
3439
3601
  }
3440
- var Ol = ti("toLowerCase");
3441
- function El() {
3602
+ var El = ja("toLowerCase");
3603
+ function zl() {
3442
3604
  const {
3443
3605
  themeSettings: e
3444
3606
  } = L();
@@ -3456,7 +3618,7 @@ function El() {
3456
3618
  })
3457
3619
  });
3458
3620
  }
3459
- function zl({
3621
+ function Rl({
3460
3622
  onClick: e
3461
3623
  }) {
3462
3624
  const {
@@ -3467,23 +3629,23 @@ function zl({
3467
3629
  onClick: e,
3468
3630
  children: /* @__PURE__ */ v("div", {
3469
3631
  className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
3470
- children: [/* @__PURE__ */ n(El, {}), t("ai.buttons.insights")]
3632
+ children: [/* @__PURE__ */ n(zl, {}), t("ai.buttons.insights")]
3471
3633
  })
3472
3634
  });
3473
3635
  }
3474
- function Rl(e) {
3475
- return Aa("MuiDialog", e);
3636
+ function Zl(e) {
3637
+ return Oa("MuiDialog", e);
3476
3638
  }
3477
- const at = ha("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Kr = /* @__PURE__ */ Ye({});
3478
- process.env.NODE_ENV !== "production" && (Kr.displayName = "DialogContext");
3479
- const Zl = Qe(ma, {
3639
+ const it = ma("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), ea = /* @__PURE__ */ Ye({});
3640
+ process.env.NODE_ENV !== "production" && (ea.displayName = "DialogContext");
3641
+ const Wl = Ue(ba, {
3480
3642
  name: "MuiDialog",
3481
3643
  slot: "Backdrop",
3482
3644
  overrides: (e, t) => t.backdrop
3483
3645
  })({
3484
3646
  // Improve scrollable dialog support.
3485
3647
  zIndex: -1
3486
- }), Wl = (e) => {
3648
+ }), Pl = (e) => {
3487
3649
  const {
3488
3650
  classes: t,
3489
3651
  scroll: r,
@@ -3492,11 +3654,11 @@ const Zl = Qe(ma, {
3492
3654
  fullScreen: l
3493
3655
  } = e, s = {
3494
3656
  root: ["root"],
3495
- container: ["container", `scroll${be(r)}`],
3496
- paper: ["paper", `paperScroll${be(r)}`, `paperWidth${be(String(a))}`, i && "paperFullWidth", l && "paperFullScreen"]
3657
+ container: ["container", `scroll${fe(r)}`],
3658
+ paper: ["paper", `paperScroll${fe(r)}`, `paperWidth${fe(String(a))}`, i && "paperFullWidth", l && "paperFullScreen"]
3497
3659
  };
3498
- return va(s, Rl, t);
3499
- }, Pl = Qe(ba, {
3660
+ return Ia(s, Zl, t);
3661
+ }, Gl = Ue(fa, {
3500
3662
  name: "MuiDialog",
3501
3663
  slot: "Root",
3502
3664
  overridesResolver: (e, t) => t.root
@@ -3505,14 +3667,14 @@ const Zl = Qe(ma, {
3505
3667
  // Use !important to override the Modal inline-style.
3506
3668
  position: "absolute !important"
3507
3669
  }
3508
- }), ql = Qe("div", {
3670
+ }), ql = Ue("div", {
3509
3671
  name: "MuiDialog",
3510
3672
  slot: "Container",
3511
3673
  overridesResolver: (e, t) => {
3512
3674
  const {
3513
3675
  ownerState: r
3514
3676
  } = e;
3515
- return [t.container, t[`scroll${be(r.scroll)}`]];
3677
+ return [t.container, t[`scroll${fe(r.scroll)}`]];
3516
3678
  }
3517
3679
  })({
3518
3680
  height: "100%",
@@ -3547,16 +3709,16 @@ const Zl = Qe(ma, {
3547
3709
  }
3548
3710
  }
3549
3711
  }]
3550
- }), Gl = Qe(Kt, {
3712
+ }), $l = Ue(tr, {
3551
3713
  name: "MuiDialog",
3552
3714
  slot: "Paper",
3553
3715
  overridesResolver: (e, t) => {
3554
3716
  const {
3555
3717
  ownerState: r
3556
3718
  } = e;
3557
- return [t.paper, t[`scrollPaper${be(r.scroll)}`], t[`paperWidth${be(String(r.maxWidth))}`], r.fullWidth && t.paperFullWidth, r.fullScreen && t.paperFullScreen];
3719
+ return [t.paper, t[`scrollPaper${fe(r.scroll)}`], t[`paperWidth${fe(String(r.maxWidth))}`], r.fullWidth && t.paperFullWidth, r.fullScreen && t.paperFullScreen];
3558
3720
  }
3559
- })(fa(({
3721
+ })(xa(({
3560
3722
  theme: e
3561
3723
  }) => ({
3562
3724
  margin: 32,
@@ -3597,7 +3759,7 @@ const Zl = Qe(ma, {
3597
3759
  },
3598
3760
  style: {
3599
3761
  maxWidth: e.breakpoints.unit === "px" ? Math.max(e.breakpoints.values.xs, 444) : `max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,
3600
- [`&.${at.paperScrollBody}`]: {
3762
+ [`&.${it.paperScrollBody}`]: {
3601
3763
  [e.breakpoints.down(Math.max(e.breakpoints.values.xs, 444) + 32 * 2)]: {
3602
3764
  maxWidth: "calc(100% - 64px)"
3603
3765
  }
@@ -3609,7 +3771,7 @@ const Zl = Qe(ma, {
3609
3771
  },
3610
3772
  style: {
3611
3773
  maxWidth: `${e.breakpoints.values[t]}${e.breakpoints.unit}`,
3612
- [`&.${at.paperScrollBody}`]: {
3774
+ [`&.${it.paperScrollBody}`]: {
3613
3775
  [e.breakpoints.down(e.breakpoints.values[t] + 32 * 2)]: {
3614
3776
  maxWidth: "calc(100% - 64px)"
3615
3777
  }
@@ -3633,17 +3795,17 @@ const Zl = Qe(ma, {
3633
3795
  height: "100%",
3634
3796
  maxHeight: "none",
3635
3797
  borderRadius: 0,
3636
- [`&.${at.paperScrollBody}`]: {
3798
+ [`&.${it.paperScrollBody}`]: {
3637
3799
  margin: 0,
3638
3800
  maxWidth: "100%"
3639
3801
  }
3640
3802
  }
3641
3803
  }]
3642
- }))), ea = /* @__PURE__ */ tr(function(e, t) {
3643
- const r = xa({
3804
+ }))), ta = /* @__PURE__ */ er(function(e, t) {
3805
+ const r = ya({
3644
3806
  props: e,
3645
3807
  name: "MuiDialog"
3646
- }), a = ka(), i = {
3808
+ }), a = wa(), i = {
3647
3809
  enter: a.transitions.duration.enteringScreen,
3648
3810
  exit: a.transitions.duration.leavingScreen
3649
3811
  }, l = r, {
@@ -3659,102 +3821,102 @@ const Zl = Qe(ma, {
3659
3821
  fullWidth: m = !1,
3660
3822
  maxWidth: h = "sm",
3661
3823
  onBackdropClick: w,
3662
- onClick: _,
3824
+ onClick: C,
3663
3825
  onClose: y,
3664
3826
  open: M,
3665
- PaperComponent: D = Kt,
3827
+ PaperComponent: D = tr,
3666
3828
  PaperProps: S = {},
3667
3829
  scroll: A = "paper",
3668
3830
  slots: R = {},
3669
- slotProps: ue = {},
3670
- TransitionComponent: F = It,
3671
- transitionDuration: G = i,
3831
+ slotProps: ge = {},
3832
+ TransitionComponent: F = At,
3833
+ transitionDuration: q = i,
3672
3834
  TransitionProps: B
3673
- } = l, V = Mo(l, ["aria-describedby", "aria-labelledby", "aria-modal", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "slots", "slotProps", "TransitionComponent", "transitionDuration", "TransitionProps"]), H = j(I({}, r), {
3835
+ } = l, V = Io(l, ["aria-describedby", "aria-labelledby", "aria-modal", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "slots", "slotProps", "TransitionComponent", "transitionDuration", "TransitionProps"]), $ = j(I({}, r), {
3674
3836
  disableEscapeKeyDown: u,
3675
3837
  fullScreen: c,
3676
3838
  fullWidth: m,
3677
3839
  maxWidth: h,
3678
3840
  scroll: A
3679
- }), $ = Wl(H), J = de(), z = (he) => {
3680
- J.current = he.target === he.currentTarget;
3681
- }, W = (he) => {
3682
- _ && _(he), J.current && (J.current = null, w && w(he), y && y(he, "backdropClick"));
3683
- }, Y = ya(p), se = U(() => ({
3841
+ }), J = Pl($), X = pe(), z = (me) => {
3842
+ X.current = me.target === me.currentTarget;
3843
+ }, W = (me) => {
3844
+ C && C(me), X.current && (X.current = null, w && w(me), y && y(me, "backdropClick"));
3845
+ }, Y = _a(p), ce = Q(() => ({
3684
3846
  titleId: Y
3685
- }), [Y]), ge = I({
3847
+ }), [Y]), he = I({
3686
3848
  transition: F
3687
- }, R), ke = I({
3849
+ }, R), ye = I({
3688
3850
  transition: B,
3689
3851
  paper: S,
3690
3852
  backdrop: f
3691
- }, ue), T = {
3692
- slots: ge,
3693
- slotProps: ke
3694
- }, [X, je] = ye("root", {
3695
- elementType: Pl,
3853
+ }, ge), T = {
3854
+ slots: he,
3855
+ slotProps: ye
3856
+ }, [K, Oe] = we("root", {
3857
+ elementType: Gl,
3696
3858
  shouldForwardComponentProp: !0,
3697
3859
  externalForwardedProps: T,
3698
- ownerState: H,
3699
- className: Je($.root, o),
3860
+ ownerState: $,
3861
+ className: Je(J.root, o),
3700
3862
  ref: t
3701
- }), [Oe, la] = ye("backdrop", {
3702
- elementType: Zl,
3863
+ }), [Ee, sa] = we("backdrop", {
3864
+ elementType: Wl,
3703
3865
  shouldForwardComponentProp: !0,
3704
3866
  externalForwardedProps: T,
3705
- ownerState: H
3706
- }), [sa, ca] = ye("paper", {
3707
- elementType: Gl,
3867
+ ownerState: $
3868
+ }), [ca, da] = we("paper", {
3869
+ elementType: $l,
3708
3870
  shouldForwardComponentProp: !0,
3709
3871
  externalForwardedProps: T,
3710
- ownerState: H,
3711
- className: Je($.paper, S.className)
3712
- }), [da, pa] = ye("container", {
3872
+ ownerState: $,
3873
+ className: Je(J.paper, S.className)
3874
+ }), [pa, ua] = we("container", {
3713
3875
  elementType: ql,
3714
3876
  externalForwardedProps: T,
3715
- ownerState: H,
3716
- className: Je($.container)
3717
- }), [ua, ga] = ye("transition", {
3718
- elementType: It,
3877
+ ownerState: $,
3878
+ className: Je(J.container)
3879
+ }), [ga, ha] = we("transition", {
3880
+ elementType: At,
3719
3881
  externalForwardedProps: T,
3720
- ownerState: H,
3882
+ ownerState: $,
3721
3883
  additionalProps: {
3722
3884
  appear: !0,
3723
3885
  in: M,
3724
- timeout: G,
3886
+ timeout: q,
3725
3887
  role: "presentation"
3726
3888
  }
3727
3889
  });
3728
- return /* @__PURE__ */ we(X, j(I(I({
3890
+ return /* @__PURE__ */ _e(K, j(I(I({
3729
3891
  closeAfterTransition: !0,
3730
3892
  slots: {
3731
- backdrop: Oe
3893
+ backdrop: Ee
3732
3894
  },
3733
3895
  slotProps: {
3734
3896
  backdrop: I({
3735
- transitionDuration: G,
3897
+ transitionDuration: q,
3736
3898
  as: g
3737
- }, la)
3899
+ }, sa)
3738
3900
  },
3739
3901
  disableEscapeKeyDown: u,
3740
3902
  onClose: y,
3741
3903
  open: M,
3742
3904
  onClick: W
3743
- }, je), V), {
3744
- children: /* @__PURE__ */ we(ua, j(I({}, ga), {
3745
- children: /* @__PURE__ */ we(da, j(I({
3905
+ }, Oe), V), {
3906
+ children: /* @__PURE__ */ _e(ga, j(I({}, ha), {
3907
+ children: /* @__PURE__ */ _e(pa, j(I({
3746
3908
  onMouseDown: z
3747
- }, pa), {
3748
- children: /* @__PURE__ */ we(sa, j(I({
3909
+ }, ua), {
3910
+ children: /* @__PURE__ */ _e(ca, j(I({
3749
3911
  as: D,
3750
3912
  elevation: 24,
3751
3913
  role: "dialog",
3752
3914
  "aria-describedby": s,
3753
3915
  "aria-labelledby": Y,
3754
3916
  "aria-modal": d
3755
- }, ca), {
3756
- children: /* @__PURE__ */ we(Kr.Provider, {
3757
- value: se,
3917
+ }, da), {
3918
+ children: /* @__PURE__ */ _e(ea.Provider, {
3919
+ value: ce,
3758
3920
  children: x
3759
3921
  })
3760
3922
  }))
@@ -3762,7 +3924,7 @@ const Zl = Qe(ma, {
3762
3924
  }))
3763
3925
  }));
3764
3926
  });
3765
- process.env.NODE_ENV !== "production" && (ea.propTypes = {
3927
+ process.env.NODE_ENV !== "production" && (ta.propTypes = {
3766
3928
  // ┌────────────────────────────── Warning ──────────────────────────────┐
3767
3929
  // │ These PropTypes are generated from the TypeScript type definitions. │
3768
3930
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -3949,7 +4111,7 @@ function Hl({
3949
4111
  })]
3950
4112
  });
3951
4113
  }
3952
- const ta = {
4114
+ const ra = {
3953
4115
  row: {
3954
4116
  hover: "rgba(224, 224, 224, 0.3)"
3955
4117
  },
@@ -4036,15 +4198,12 @@ const ta = {
4036
4198
  }
4037
4199
  }, Bl = {
4038
4200
  shouldForwardProp: (e) => !e.startsWith("$")
4039
- }, Ne = /* @__PURE__ */ C(lr, Bl, {
4040
- target: "e869yoj0",
4041
- label: "IconButton"
4042
- })(({
4201
+ }, je = _(rr, Bl)(({
4043
4202
  $hoverColor: e
4044
4203
  }) => ({
4045
4204
  padding: 2,
4046
4205
  "&.MuiIconButton-root:hover": {
4047
- backgroundColor: e ?? ta.interaction.defaultHover
4206
+ backgroundColor: e ?? ra.interaction.defaultHover
4048
4207
  }
4049
4208
  }));
4050
4209
  function Yl({
@@ -4064,7 +4223,7 @@ function Yl({
4064
4223
  })
4065
4224
  });
4066
4225
  }
4067
- function Ql({
4226
+ function Ul({
4068
4227
  fill: e = "rgba(38, 46, 61, 0.67)"
4069
4228
  }) {
4070
4229
  return /* @__PURE__ */ n("svg", {
@@ -4081,7 +4240,7 @@ function Ql({
4081
4240
  })
4082
4241
  });
4083
4242
  }
4084
- function Ul() {
4243
+ function Ql() {
4085
4244
  return /* @__PURE__ */ n("svg", {
4086
4245
  xmlns: "http://www.w3.org/2000/svg",
4087
4246
  width: "24",
@@ -4097,18 +4256,18 @@ function Ul() {
4097
4256
  })
4098
4257
  });
4099
4258
  }
4100
- const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
4259
+ const Dt = (e) => ar(e.chart.backgroundColor), Fl = ({
4101
4260
  title: e
4102
4261
  }) => {
4103
4262
  const {
4104
4263
  themeSettings: t
4105
4264
  } = L();
4106
- return /* @__PURE__ */ n(Te, {
4265
+ return /* @__PURE__ */ n(Ne, {
4107
4266
  title: e,
4108
- children: /* @__PURE__ */ n(Ne, {
4267
+ children: /* @__PURE__ */ n(je, {
4109
4268
  disableTouchRipple: !0,
4110
- $hoverColor: Mt(t),
4111
- children: /* @__PURE__ */ n(Ql, {
4269
+ $hoverColor: Dt(t),
4270
+ children: /* @__PURE__ */ n(Ul, {
4112
4271
  fill: t.chart.textColor
4113
4272
  })
4114
4273
  })
@@ -4123,15 +4282,15 @@ const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
4123
4282
  }, {
4124
4283
  themeSettings: l
4125
4284
  } = L();
4126
- return /* @__PURE__ */ v(Q, {
4127
- children: [/* @__PURE__ */ n(Ne, {
4285
+ return /* @__PURE__ */ v(U, {
4286
+ children: [/* @__PURE__ */ n(je, {
4128
4287
  onClick: a,
4129
- $hoverColor: Mt(l),
4288
+ $hoverColor: Dt(l),
4130
4289
  "aria-label": "three dots button",
4131
- children: /* @__PURE__ */ n(li, {
4290
+ children: /* @__PURE__ */ n(ei, {
4132
4291
  fill: l.chart.textColor
4133
4292
  })
4134
- }), /* @__PURE__ */ n(ci, {
4293
+ }), /* @__PURE__ */ n(ri, {
4135
4294
  anchorEl: t,
4136
4295
  anchorOrigin: {
4137
4296
  vertical: "bottom",
@@ -4143,14 +4302,14 @@ const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
4143
4302
  },
4144
4303
  open: !!t,
4145
4304
  onClose: i,
4146
- children: e.map((s) => /* @__PURE__ */ v(si, {
4305
+ children: e.map((s) => /* @__PURE__ */ v(ti, {
4147
4306
  onClick: () => {
4148
4307
  s.onClick(), i();
4149
4308
  },
4150
4309
  sx: {
4151
4310
  fontSize: "13px",
4152
4311
  fontFamily: l.typography.fontFamily,
4153
- color: ta.text.content
4312
+ color: ra.text.content
4154
4313
  },
4155
4314
  disableRipple: !0,
4156
4315
  children: [s.icon, /* @__PURE__ */ n("div", {
@@ -4160,7 +4319,7 @@ const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
4160
4319
  }, s.title))
4161
4320
  })]
4162
4321
  });
4163
- }, $l = ({
4322
+ }, Jl = ({
4164
4323
  onClick: e
4165
4324
  }) => {
4166
4325
  const {
@@ -4168,42 +4327,43 @@ const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
4168
4327
  } = L(), {
4169
4328
  t: r
4170
4329
  } = E();
4171
- return /* @__PURE__ */ n(Te, {
4330
+ return /* @__PURE__ */ n(Ne, {
4172
4331
  title: r("ai.preview"),
4173
- children: /* @__PURE__ */ n(Ne, {
4332
+ children: /* @__PURE__ */ n(je, {
4174
4333
  onClick: e,
4175
- $hoverColor: Mt(t),
4334
+ $hoverColor: Dt(t),
4176
4335
  children: /* @__PURE__ */ n(Yl, {
4177
4336
  fill: t.chart.textColor
4178
4337
  })
4179
4338
  })
4180
4339
  });
4181
- }, Jl = /* @__PURE__ */ C("div", {
4182
- target: "esuuigp0",
4183
- label: "ToolbarContainer"
4184
- })("display:flex;padding-top:6px;padding-bottom:6px;");
4185
- function Xl({
4340
+ }, Xl = _.div`
4341
+ display: flex;
4342
+ padding-top: 6px;
4343
+ padding-bottom: 6px;
4344
+ `;
4345
+ function Kl({
4186
4346
  infoTooltipText: e,
4187
4347
  onRefresh: t,
4188
4348
  onExpand: r
4189
4349
  }) {
4190
- const a = U(() => [{
4350
+ const a = Q(() => [{
4191
4351
  title: "Refresh",
4192
4352
  onClick: t,
4193
- icon: /* @__PURE__ */ n(Ul, {})
4353
+ icon: /* @__PURE__ */ n(Ql, {})
4194
4354
  }], [t]);
4195
- return /* @__PURE__ */ v(Jl, {
4355
+ return /* @__PURE__ */ v(Xl, {
4196
4356
  "aria-label": "chatbot chart toolbar",
4197
4357
  children: [/* @__PURE__ */ n(Fl, {
4198
4358
  title: e ?? ""
4199
4359
  }), /* @__PURE__ */ n(Vl, {
4200
4360
  items: a
4201
- }), /* @__PURE__ */ n($l, {
4361
+ }), /* @__PURE__ */ n(Jl, {
4202
4362
  onClick: r
4203
4363
  })]
4204
4364
  });
4205
4365
  }
4206
- function Kl({
4366
+ function es({
4207
4367
  content: e
4208
4368
  }) {
4209
4369
  const [t, r] = Z(!1), {
@@ -4211,12 +4371,12 @@ function Kl({
4211
4371
  } = L(), {
4212
4372
  inlineElement: i,
4213
4373
  expandedElement: l
4214
- } = U(() => {
4215
- const s = wt(e, {
4374
+ } = Q(() => {
4375
+ const s = Ct(e, {
4216
4376
  useCustomizedStyleOptions: !0
4217
4377
  });
4218
- if (s === void 0 || !ir(s))
4219
- throw new Me("errors.otherWidgetTypesNotSupported");
4378
+ if (s === void 0 || !or(s))
4379
+ throw new Ie("errors.otherWidgetTypesNotSupported");
4220
4380
  const {
4221
4381
  detailedDescription: p
4222
4382
  } = e, {
@@ -4224,7 +4384,7 @@ function Kl({
4224
4384
  } = s, g = {
4225
4385
  cornerRadius: "Small",
4226
4386
  header: {
4227
- renderToolbar: (o) => /* @__PURE__ */ n(Xl, {
4387
+ renderToolbar: (o) => /* @__PURE__ */ n(Kl, {
4228
4388
  infoTooltipText: p,
4229
4389
  onRefresh: o,
4230
4390
  onExpand: () => r(!0)
@@ -4232,13 +4392,13 @@ function Kl({
4232
4392
  }
4233
4393
  };
4234
4394
  let f, x;
4235
- if (ri(s.chartType))
4395
+ if (Ea(s.chartType))
4236
4396
  f = /* @__PURE__ */ n("div", {
4237
4397
  className: "csdk-h-[245px]",
4238
- children: /* @__PURE__ */ n(Ee, j(I({}, s), {
4398
+ children: /* @__PURE__ */ n(ze, j(I({}, s), {
4239
4399
  styleOptions: g
4240
4400
  }))
4241
- }), x = /* @__PURE__ */ n(Ee, j(I({}, s), {
4401
+ }), x = /* @__PURE__ */ n(ze, j(I({}, s), {
4242
4402
  styleOptions: {
4243
4403
  header: {
4244
4404
  hidden: !0
@@ -4256,10 +4416,10 @@ function Kl({
4256
4416
  yAxis: void 0
4257
4417
  }), g);
4258
4418
  delete u.legend, delete u.xAxis, delete u.yAxis, f = /* @__PURE__ */ n("div", {
4259
- children: /* @__PURE__ */ n(Ee, j(I({}, s), {
4419
+ children: /* @__PURE__ */ n(ze, j(I({}, s), {
4260
4420
  styleOptions: u
4261
4421
  }))
4262
- }), x = /* @__PURE__ */ n(Ee, j(I({}, s), {
4422
+ }), x = /* @__PURE__ */ n(ze, j(I({}, s), {
4263
4423
  styleOptions: I({
4264
4424
  cornerRadius: "None"
4265
4425
  }, o)
@@ -4270,8 +4430,8 @@ function Kl({
4270
4430
  expandedElement: x
4271
4431
  };
4272
4432
  }, [e]);
4273
- return /* @__PURE__ */ v(Q, {
4274
- children: [i, /* @__PURE__ */ v(ea, {
4433
+ return /* @__PURE__ */ v(U, {
4434
+ children: [i, /* @__PURE__ */ v(ta, {
4275
4435
  open: t,
4276
4436
  onClose: () => r(!1),
4277
4437
  maxWidth: "xl",
@@ -4287,7 +4447,7 @@ function Kl({
4287
4447
  children: [/* @__PURE__ */ n("div", {
4288
4448
  className: "csdk-text-ai-lg csdk-semibold",
4289
4449
  children: e.queryTitle
4290
- }), /* @__PURE__ */ n(lr, {
4450
+ }), /* @__PURE__ */ n(rr, {
4291
4451
  onClick: () => r(!1),
4292
4452
  "aria-label": "close expanded chart",
4293
4453
  children: /* @__PURE__ */ n(Hl, {
@@ -4301,7 +4461,7 @@ function Kl({
4301
4461
  })]
4302
4462
  });
4303
4463
  }
4304
- function es({
4464
+ function ts({
4305
4465
  theme: e
4306
4466
  }) {
4307
4467
  return /* @__PURE__ */ n("svg", {
@@ -4318,7 +4478,7 @@ function es({
4318
4478
  })
4319
4479
  });
4320
4480
  }
4321
- function ts({
4481
+ function rs({
4322
4482
  onClick: e,
4323
4483
  disabled: t
4324
4484
  }) {
@@ -4327,20 +4487,20 @@ function ts({
4327
4487
  } = L(), {
4328
4488
  t: a
4329
4489
  } = E();
4330
- return /* @__PURE__ */ n(Te, {
4490
+ return /* @__PURE__ */ n(Ne, {
4331
4491
  title: a("ai.buttons.incorrectResponse"),
4332
- children: /* @__PURE__ */ n(Ne, {
4492
+ children: /* @__PURE__ */ n(je, {
4333
4493
  "aria-label": "thumbs-down",
4334
4494
  onClick: e,
4335
4495
  $hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
4336
4496
  disabled: t,
4337
- children: /* @__PURE__ */ n(es, {
4497
+ children: /* @__PURE__ */ n(ts, {
4338
4498
  theme: r
4339
4499
  })
4340
4500
  })
4341
4501
  });
4342
4502
  }
4343
- function rs({
4503
+ function as({
4344
4504
  theme: e
4345
4505
  }) {
4346
4506
  return /* @__PURE__ */ n("svg", {
@@ -4357,7 +4517,7 @@ function rs({
4357
4517
  })
4358
4518
  });
4359
4519
  }
4360
- function as({
4520
+ function is({
4361
4521
  onClick: e,
4362
4522
  disabled: t
4363
4523
  }) {
@@ -4366,21 +4526,21 @@ function as({
4366
4526
  } = L(), {
4367
4527
  t: a
4368
4528
  } = E();
4369
- return /* @__PURE__ */ n(Te, {
4529
+ return /* @__PURE__ */ n(Ne, {
4370
4530
  title: a("ai.buttons.correctResponse"),
4371
- children: /* @__PURE__ */ n(Ne, {
4531
+ children: /* @__PURE__ */ n(je, {
4372
4532
  "aria-label": "thumbs-up",
4373
4533
  onClick: e,
4374
4534
  $hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
4375
4535
  disabled: t,
4376
- children: /* @__PURE__ */ n(rs, {
4536
+ children: /* @__PURE__ */ n(as, {
4377
4537
  theme: r
4378
4538
  })
4379
4539
  })
4380
4540
  });
4381
4541
  }
4382
- const is = () => {
4383
- const [e, t] = Z(!1), r = de(null), a = N(() => {
4542
+ const os = () => {
4543
+ const [e, t] = Z(!1), r = pe(null), a = N(() => {
4384
4544
  t(!0);
4385
4545
  }, []), i = N(() => {
4386
4546
  t(!1);
@@ -4389,13 +4549,14 @@ const is = () => {
4389
4549
  var s;
4390
4550
  ((s = r.current) == null ? void 0 : s.nodeType) === Node.ELEMENT_NODE && (r.current.removeEventListener("mouseenter", a), r.current.removeEventListener("mouseleave", i)), (l == null ? void 0 : l.nodeType) === Node.ELEMENT_NODE && (l.addEventListener("mouseenter", a), l.addEventListener("mouseleave", i)), r.current = l;
4391
4551
  }, [a, i]), e];
4392
- }, os = /* @__PURE__ */ C("div", {
4393
- target: "esagoru0",
4394
- label: "Container"
4395
- })("display:flex;flex-direction:column;row-gap:", ({
4552
+ }, ns = _.div`
4553
+ display: flex;
4554
+ flex-direction: column;
4555
+ row-gap: ${({
4396
4556
  theme: e
4397
- }) => e.aiChat.body.gapBetweenMessages, ";");
4398
- function ns({
4557
+ }) => e.aiChat.body.gapBetweenMessages};
4558
+ `;
4559
+ function ls({
4399
4560
  visible: e,
4400
4561
  onSend: t
4401
4562
  }) {
@@ -4404,10 +4565,10 @@ function ns({
4404
4565
  }, [t]);
4405
4566
  return e ? /* @__PURE__ */ v("div", {
4406
4567
  className: `csdk-flex csdk-items-center ${`csdk-transition-opacity csdk-delay-150 csdk-duration-500 ${r ? "csdk-opacity-0" : "csdk-opacity-100"}`}`,
4407
- children: [/* @__PURE__ */ n(as, {
4568
+ children: [/* @__PURE__ */ n(is, {
4408
4569
  onClick: () => i("up"),
4409
4570
  disabled: r
4410
- }), /* @__PURE__ */ n(ts, {
4571
+ }), /* @__PURE__ */ n(rs, {
4411
4572
  onClick: () => i("down"),
4412
4573
  disabled: r
4413
4574
  })]
@@ -4420,34 +4581,34 @@ function Vt({
4420
4581
  buttonVisibility: a = "onHover",
4421
4582
  renderContent: i
4422
4583
  }) {
4423
- const l = ae(), s = ai(N((x) => {
4584
+ const l = ie(), s = za(N((x) => {
4424
4585
  l && l.ai.sendFeedback({
4425
4586
  sourceId: e,
4426
4587
  type: r,
4427
4588
  data: t,
4428
4589
  rating: x
4429
4590
  });
4430
- }, [l, e, t, r]), 200), [p, d] = is(), g = U(() => a === "onHover" ? d : a !== "never", [d, a]), {
4591
+ }, [l, e, t, r]), 200), [p, d] = os(), g = Q(() => a === "onHover" ? d : a !== "never", [d, a]), {
4431
4592
  themeSettings: f
4432
4593
  } = L();
4433
- return /* @__PURE__ */ n(os, {
4594
+ return /* @__PURE__ */ n(ns, {
4434
4595
  ref: p,
4435
4596
  theme: f,
4436
- children: i(/* @__PURE__ */ n(ns, {
4597
+ children: i(/* @__PURE__ */ n(ls, {
4437
4598
  onSend: s,
4438
4599
  visible: g
4439
4600
  }))
4440
4601
  });
4441
4602
  }
4442
- const ls = 18 * 5;
4443
- function ra({
4603
+ const ss = 18 * 5;
4604
+ function aa({
4444
4605
  text: e
4445
4606
  }) {
4446
4607
  const [t, r] = Z(!0), [a, i] = Z(!1), {
4447
4608
  t: l
4448
- } = E(), s = de(null);
4609
+ } = E(), s = pe(null);
4449
4610
  return qe(() => {
4450
- s.current && s.current.scrollHeight > ls && i(!0);
4611
+ s.current && s.current.scrollHeight > ss && i(!0);
4451
4612
  }, [e]), /* @__PURE__ */ v("div", {
4452
4613
  children: [/* @__PURE__ */ n("div", {
4453
4614
  ref: s,
@@ -4463,38 +4624,39 @@ function ra({
4463
4624
  })]
4464
4625
  });
4465
4626
  }
4466
- function ss({
4627
+ function cs({
4467
4628
  nlgRequest: e
4468
4629
  }) {
4469
4630
  const {
4470
4631
  data: t,
4471
4632
  isLoading: r,
4472
4633
  isError: a
4473
- } = Ir(e), {
4634
+ } = Dr(e), {
4474
4635
  t: i
4475
4636
  } = E();
4476
- return r ? /* @__PURE__ */ n(Or, {}) : a ? /* @__PURE__ */ n(le, {
4637
+ return r ? /* @__PURE__ */ n(Er, {}) : a ? /* @__PURE__ */ n(se, {
4477
4638
  align: "left",
4478
4639
  children: i("ai.errors.unexpected")
4479
- }) : /* @__PURE__ */ n(le, {
4640
+ }) : /* @__PURE__ */ n(se, {
4480
4641
  align: "full",
4481
- children: /* @__PURE__ */ n(ra, {
4642
+ children: /* @__PURE__ */ n(aa, {
4482
4643
  text: t ?? i("ai.errors.insightsNotAvailable")
4483
4644
  })
4484
4645
  });
4485
4646
  }
4486
- const $t = /* @__PURE__ */ C("div", {
4487
- target: "e1kvvygt0",
4488
- label: "FlexRow"
4489
- })("display:flex;align-items:center;column-gap:10px;"), cs = (e) => !!e && "aeiou".includes(e[0]);
4490
- function ds({
4647
+ const Jt = _.div`
4648
+ display: flex;
4649
+ align-items: center;
4650
+ column-gap: 10px;
4651
+ `, ds = (e) => !!e && "aeiou".includes(e[0]);
4652
+ function ps({
4491
4653
  data: e,
4492
4654
  alwaysShowFeedback: t
4493
4655
  }) {
4494
4656
  const {
4495
4657
  chatMode: r = "analyze",
4496
4658
  enableInsights: a
4497
- } = ie(), {
4659
+ } = oe(), {
4498
4660
  themeSettings: i
4499
4661
  } = L(), {
4500
4662
  queryTitle: l,
@@ -4506,7 +4668,7 @@ function ds({
4506
4668
  console.debug(`JAQL for ${l}`, p), console.debug(`chart recommendations for ${l}`, s);
4507
4669
  const f = "chartType" in s ? s.chartType : "table";
4508
4670
  let x;
4509
- cs(f) ? x = `an ${f}` : x = `a ${f}`, f !== "table" && (x += " chart");
4671
+ ds(f) ? x = `an ${f}` : x = `a ${f}`, f !== "table" && (x += " chart");
4510
4672
  const o = p.datasource.title, [u, c] = Z(!1), m = N(() => {
4511
4673
  c((y) => !y);
4512
4674
  }, []), h = {
@@ -4514,22 +4676,22 @@ function ds({
4514
4676
  datasource: p.datasource,
4515
4677
  metadata: p.metadata
4516
4678
  }
4517
- }, w = r === "analyze", _ = `${d}${d && g ? `
4679
+ }, w = r === "analyze", C = `${d}${d && g ? `
4518
4680
  ` : ""}${g}`;
4519
- return /* @__PURE__ */ v(Q, {
4681
+ return /* @__PURE__ */ v(U, {
4520
4682
  children: [/* @__PURE__ */ n(Vt, {
4521
4683
  sourceId: o,
4522
4684
  data: e,
4523
4685
  type: "chats/nlq",
4524
4686
  buttonVisibility: t ? "always" : "onHover",
4525
- renderContent: (y) => /* @__PURE__ */ v(Q, {
4526
- children: [/* @__PURE__ */ v($t, {
4527
- children: [/* @__PURE__ */ n(Xr, {
4687
+ renderContent: (y) => /* @__PURE__ */ v(U, {
4688
+ children: [/* @__PURE__ */ v(Jt, {
4689
+ children: [/* @__PURE__ */ n(Kr, {
4528
4690
  align: "left",
4529
4691
  theme: i,
4530
- children: _ || `Here's ${x} showing ${Ol(l)}.`
4692
+ children: C || `Here's ${x} showing ${El(l)}.`
4531
4693
  }), y]
4532
- }), w && /* @__PURE__ */ n(Kl, {
4694
+ }), w && /* @__PURE__ */ n(es, {
4533
4695
  content: e
4534
4696
  })]
4535
4697
  })
@@ -4538,61 +4700,61 @@ function ds({
4538
4700
  data: h,
4539
4701
  type: "nlg/queryResult",
4540
4702
  buttonVisibility: u ? "onHover" : "never",
4541
- renderContent: (y) => /* @__PURE__ */ v(Q, {
4542
- children: [/* @__PURE__ */ v($t, {
4543
- children: [/* @__PURE__ */ n(zl, {
4703
+ renderContent: (y) => /* @__PURE__ */ v(U, {
4704
+ children: [/* @__PURE__ */ v(Jt, {
4705
+ children: [/* @__PURE__ */ n(Rl, {
4544
4706
  onClick: m
4545
4707
  }), y]
4546
- }), u && /* @__PURE__ */ n(ss, {
4708
+ }), u && /* @__PURE__ */ n(cs, {
4547
4709
  nlgRequest: h
4548
4710
  })]
4549
4711
  })
4550
4712
  })]
4551
4713
  });
4552
4714
  }
4553
- function ps({
4715
+ function us({
4554
4716
  message: e,
4555
4717
  isLastMessage: t
4556
4718
  }) {
4557
- if (Tr(e)) {
4719
+ if (Nr(e)) {
4558
4720
  const a = JSON.parse(e.content);
4559
- return /* @__PURE__ */ n(ds, {
4721
+ return /* @__PURE__ */ n(ps, {
4560
4722
  data: a,
4561
4723
  alwaysShowFeedback: t
4562
4724
  });
4563
4725
  }
4564
4726
  const r = Bo(e) ? JSON.parse(e.content).answer : e.content;
4565
- return /* @__PURE__ */ n(le, {
4727
+ return /* @__PURE__ */ n(se, {
4566
4728
  align: e.role === "user" ? "right" : "left",
4567
4729
  children: r
4568
4730
  });
4569
4731
  }
4570
- const us = /* @__PURE__ */ Za(ps), gs = ({
4732
+ const gs = ka(us), hs = ({
4571
4733
  error: e,
4572
4734
  displayMessage: t
4573
- }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(le, {
4735
+ }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(se, {
4574
4736
  align: "left",
4575
4737
  children: t
4576
4738
  }));
4577
- function hs({
4739
+ function ms({
4578
4740
  messages: e
4579
4741
  }) {
4580
4742
  const {
4581
4743
  t
4582
4744
  } = E();
4583
- return /* @__PURE__ */ n(Q, {
4584
- children: e.map((r, a) => /* @__PURE__ */ n(La, {
4585
- fallbackRender: (i) => gs(j(I({}, i), {
4745
+ return /* @__PURE__ */ n(U, {
4746
+ children: e.map((r, a) => /* @__PURE__ */ n(Ra, {
4747
+ fallbackRender: (i) => hs(j(I({}, i), {
4586
4748
  displayMessage: t("ai.errors.unexpected")
4587
4749
  })),
4588
- children: /* @__PURE__ */ n(us, {
4750
+ children: /* @__PURE__ */ n(gs, {
4589
4751
  message: r,
4590
4752
  isLastMessage: a === e.length - 1
4591
4753
  }, a)
4592
4754
  }, a))
4593
4755
  });
4594
4756
  }
4595
- function aa({
4757
+ function ia({
4596
4758
  color: e
4597
4759
  }) {
4598
4760
  return /* @__PURE__ */ n("svg", {
@@ -4607,7 +4769,7 @@ function aa({
4607
4769
  })
4608
4770
  });
4609
4771
  }
4610
- function ms({
4772
+ function bs({
4611
4773
  onClick: e,
4612
4774
  color: t
4613
4775
  }) {
@@ -4615,12 +4777,12 @@ function ms({
4615
4777
  "aria-label": "go back",
4616
4778
  className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
4617
4779
  onClick: e,
4618
- children: /* @__PURE__ */ n(aa, {
4780
+ children: /* @__PURE__ */ n(ia, {
4619
4781
  color: t
4620
4782
  })
4621
4783
  });
4622
4784
  }
4623
- function bs() {
4785
+ function fs() {
4624
4786
  const {
4625
4787
  themeSettings: e
4626
4788
  } = L();
@@ -4638,65 +4800,99 @@ function bs() {
4638
4800
  })
4639
4801
  });
4640
4802
  }
4641
- const fs = (e, t) => {
4642
- const r = new Va(e);
4803
+ const xs = (e, t) => {
4804
+ const r = new Ca(e);
4643
4805
  return r.alpha = t, r;
4644
- }, xs = /* @__PURE__ */ C("div", {
4645
- target: "ehfkql80",
4646
- label: "Container"
4647
- })("font-size:inherit;line-height:inherit;padding-left:8px;padding-right:8px;padding-top:4px;border-radius:16px;margin-bottom:4px;box-shadow:", ({
4806
+ }, ks = _.div`
4807
+ font-size: inherit;
4808
+ line-height: inherit;
4809
+ padding-left: 8px;
4810
+ padding-right: 8px;
4811
+ padding-top: 4px;
4812
+ border-radius: 16px;
4813
+ margin-bottom: 4px;
4814
+ box-shadow: ${({
4648
4815
  theme: e
4649
- }) => `0 4px 8px 0 ${fs(e.aiChat.primaryTextColor, 0.2)}`, ";cursor:pointer;color:", ({
4816
+ }) => `0 4px 8px 0 ${xs(e.aiChat.primaryTextColor, 0.2)}`};
4817
+ cursor: pointer;
4818
+ color: ${({
4650
4819
  theme: e
4651
- }) => e.aiChat.clickableMessages.textColor, ";background-color:", ({
4820
+ }) => e.aiChat.clickableMessages.textColor};
4821
+ background-color: ${({
4652
4822
  theme: e
4653
- }) => e.aiChat.clickableMessages.backgroundColor, ";&:hover{color:", ({
4823
+ }) => e.aiChat.clickableMessages.backgroundColor};
4824
+
4825
+ &:hover {
4826
+ color: ${({
4654
4827
  theme: e
4655
- }) => e.aiChat.clickableMessages.hover.textColor, ";background-color:", ({
4828
+ }) => e.aiChat.clickableMessages.hover.textColor};
4829
+ background-color: ${({
4656
4830
  theme: e
4657
- }) => e.aiChat.clickableMessages.hover.backgroundColor, ";box-shadow:none;"), ks = ({
4831
+ }) => e.aiChat.clickableMessages.hover.backgroundColor};
4832
+ box-shadow: none;
4833
+ `, ys = ({
4658
4834
  onClick: e
4659
4835
  }) => {
4660
4836
  const {
4661
4837
  themeSettings: t
4662
4838
  } = L();
4663
- return /* @__PURE__ */ n(xs, {
4839
+ return /* @__PURE__ */ n(ks, {
4664
4840
  theme: t,
4665
4841
  onClick: e,
4666
- children: /* @__PURE__ */ n(bs, {})
4842
+ children: /* @__PURE__ */ n(fs, {})
4667
4843
  });
4668
- }, ys = ({
4844
+ }, ws = ({
4669
4845
  isVisible: e,
4670
4846
  onClick: t,
4671
4847
  anchorElement: r
4672
- }) => /* @__PURE__ */ n(rr, {
4848
+ }) => /* @__PURE__ */ n(nr, {
4673
4849
  anchorEl: r,
4674
4850
  open: e,
4675
4851
  placement: "top",
4676
4852
  sx: {
4677
4853
  zIndex: 2
4678
4854
  },
4679
- children: /* @__PURE__ */ n(ks, {
4855
+ children: /* @__PURE__ */ n(ys, {
4680
4856
  onClick: t
4681
4857
  })
4682
- }), ws = /* @__PURE__ */ C("button", {
4683
- target: "e9ck5hw0",
4684
- label: "Button"
4685
- })("font-size:inherit;line-height:inherit;box-sizing:border-box;border-width:1px;padding-left:1rem;padding-right:1rem;padding-top:0.5rem;padding-bottom:0.5rem;cursor:pointer;text-align:left;max-width:85%;font-family:", ({
4858
+ }), _s = _.button`
4859
+ font-size: inherit;
4860
+ line-height: inherit;
4861
+ box-sizing: border-box;
4862
+ border-width: 1px;
4863
+ padding-left: 1rem;
4864
+ padding-right: 1rem;
4865
+ padding-top: 0.5rem;
4866
+ padding-bottom: 0.5rem;
4867
+ cursor: pointer;
4868
+ text-align: left;
4869
+ max-width: 85%;
4870
+
4871
+ font-family: ${({
4686
4872
  theme: e
4687
- }) => e.typography.fontFamily, ";color:", ({
4873
+ }) => e.typography.fontFamily};
4874
+ color: ${({
4688
4875
  theme: e
4689
- }) => e.aiChat.suggestions.textColor, ";background-color:", ({
4876
+ }) => e.aiChat.suggestions.textColor};
4877
+ background-color: ${({
4690
4878
  theme: e
4691
- }) => e.aiChat.suggestions.backgroundColor, ";border:", ({
4879
+ }) => e.aiChat.suggestions.backgroundColor};
4880
+ border: ${({
4692
4881
  theme: e
4693
- }) => e.aiChat.suggestions.border, ";border-radius:", ({
4882
+ }) => e.aiChat.suggestions.border};
4883
+ border-radius: ${({
4694
4884
  theme: e
4695
- }) => e.aiChat.suggestions.borderRadius, ";&:hover{background-color:", ({
4885
+ }) => e.aiChat.suggestions.borderRadius};
4886
+ &:hover {
4887
+ background-color: ${({
4696
4888
  theme: e
4697
- }) => e.aiChat.suggestions.hover.backgroundColor, ";color:", ({
4889
+ }) => e.aiChat.suggestions.hover.backgroundColor};
4890
+ color: ${({
4698
4891
  theme: e
4699
- }) => e.aiChat.suggestions.hover.textColor, ";}", ({
4892
+ }) => e.aiChat.suggestions.hover.textColor};
4893
+ }
4894
+
4895
+ ${({
4700
4896
  theme: e
4701
4897
  }) => {
4702
4898
  const {
@@ -4726,51 +4922,55 @@ const fs = (e, t) => {
4726
4922
  `;
4727
4923
  }
4728
4924
  return "";
4729
- });
4730
- function Jt({
4925
+ }}
4926
+ `;
4927
+ function Xt({
4731
4928
  question: e,
4732
4929
  onClick: t
4733
4930
  }) {
4734
4931
  const {
4735
4932
  themeSettings: r
4736
4933
  } = L();
4737
- return /* @__PURE__ */ n(ws, {
4934
+ return /* @__PURE__ */ n(_s, {
4738
4935
  onClick: t,
4739
4936
  theme: r,
4740
4937
  children: e
4741
4938
  });
4742
4939
  }
4743
- const _s = /* @__PURE__ */ C("div", {
4744
- target: "e1wvyac80",
4745
- label: "ListContainer"
4746
- })("display:flex;flex-direction:column;align-items:flex-start;row-gap:", ({
4940
+ const Cs = _.div`
4941
+ display: flex;
4942
+ flex-direction: column;
4943
+ align-items: flex-start;
4944
+ row-gap: ${({
4747
4945
  theme: e
4748
- }) => e.aiChat.suggestions.gap, ";");
4749
- function Cs({
4946
+ }) => e.aiChat.suggestions.gap};
4947
+ `;
4948
+ function vs({
4750
4949
  questions: e,
4751
4950
  onSelection: t
4752
4951
  }) {
4753
4952
  const {
4754
4953
  t: r
4755
- } = E(), [a, i] = Z(!0), l = U(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
4954
+ } = E(), [a, i] = Z(!0), l = Q(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
4756
4955
  themeSettings: s
4757
4956
  } = L();
4758
- return /* @__PURE__ */ v(_s, {
4957
+ return /* @__PURE__ */ v(Cs, {
4759
4958
  "aria-label": "list of suggested questions",
4760
4959
  theme: s,
4761
- children: [l.map((p) => /* @__PURE__ */ n(Jt, {
4960
+ children: [l.map((p) => /* @__PURE__ */ n(Xt, {
4762
4961
  question: p,
4763
4962
  onClick: () => t(p)
4764
- }, p)), l.length < e.length && /* @__PURE__ */ n(Jt, {
4963
+ }, p)), l.length < e.length && /* @__PURE__ */ n(Xt, {
4765
4964
  question: r("ai.buttons.seeMore"),
4766
4965
  onClick: () => i(!1)
4767
4966
  })]
4768
4967
  });
4769
4968
  }
4770
- const vs = /* @__PURE__ */ C("div", {
4771
- target: "e1v0x5940",
4772
- label: "Row"
4773
- })("width:283px;height:32px;border-radius:10px;background:", ({
4969
+ const Ss = _.div`
4970
+ width: 283px;
4971
+ height: 32px;
4972
+ border-radius: 10px;
4973
+ background: ${({
4774
4974
  theme: e
4775
4975
  }) => {
4776
4976
  const [t, r] = e.aiChat.suggestions.loadingGradient;
@@ -4780,71 +4980,98 @@ const vs = /* @__PURE__ */ C("div", {
4780
4980
  ${r} 50%,
4781
4981
  ${t} 100%
4782
4982
  )`;
4783
- }, ";background-size:200% auto;animation:gradient 2s linear infinite;@keyframes gradient{0%{background-position:0 0;}100%{background-position:-200% 0;}}"), Ss = /* @__PURE__ */ C("div", {
4784
- target: "e1v0x5941",
4785
- label: "SkeletonContainer"
4786
- })("display:flex;flex-direction:column;row-gap:1rem;");
4787
- function Ms() {
4983
+ }};
4984
+ background-size: 200% auto;
4985
+ animation: gradient 2s linear infinite;
4986
+
4987
+ @keyframes gradient {
4988
+ 0% {
4989
+ background-position: 0 0;
4990
+ }
4991
+ 100% {
4992
+ background-position: -200% 0;
4993
+ }
4994
+ }
4995
+ `, Ms = _.div`
4996
+ display: flex;
4997
+ flex-direction: column;
4998
+ row-gap: 1rem;
4999
+ `;
5000
+ function Is() {
4788
5001
  const {
4789
5002
  themeSettings: e
4790
5003
  } = L();
4791
- return /* @__PURE__ */ n(Ss, {
5004
+ return /* @__PURE__ */ n(Ms, {
4792
5005
  children: Array.from({
4793
5006
  length: 3
4794
- }, (t, r) => /* @__PURE__ */ n(vs, {
5007
+ }, (t, r) => /* @__PURE__ */ n(Ss, {
4795
5008
  theme: e
4796
5009
  }, r))
4797
5010
  });
4798
5011
  }
4799
- function Is({
5012
+ function Ds({
4800
5013
  questions: e,
4801
5014
  isLoading: t,
4802
5015
  onSelection: r
4803
5016
  }) {
4804
5017
  const a = e.length > 0, {
4805
5018
  suggestionsWelcomeText: i
4806
- } = ie();
4807
- return t ? /* @__PURE__ */ n(Ms, {}) : a ? /* @__PURE__ */ v(Q, {
4808
- children: [i && /* @__PURE__ */ n(le, {
5019
+ } = oe();
5020
+ return t ? /* @__PURE__ */ n(Is, {}) : a ? /* @__PURE__ */ v(U, {
5021
+ children: [i && /* @__PURE__ */ n(se, {
4809
5022
  align: "left",
4810
5023
  children: i
4811
- }), /* @__PURE__ */ n(Cs, {
5024
+ }), /* @__PURE__ */ n(vs, {
4812
5025
  onSelection: r,
4813
5026
  questions: e
4814
5027
  })]
4815
5028
  }) : null;
4816
5029
  }
4817
- const Ds = /* @__PURE__ */ C("div", {
4818
- target: "eqnclj50",
4819
- label: "ChatBody"
4820
- })("display:flex;flex-direction:column;row-gap:", ({
5030
+ const As = _.div`
5031
+ display: flex;
5032
+ flex-direction: column;
5033
+ row-gap: ${({
4821
5034
  theme: e
4822
- }) => e.aiChat.body.gapBetweenMessages, ";overflow-y:scroll;padding-left:", ({
5035
+ }) => e.aiChat.body.gapBetweenMessages};
5036
+ overflow-y: scroll;
5037
+ padding-left: ${({
4823
5038
  theme: e
4824
- }) => e.aiChat.body.paddingLeft, ";padding-right:", ({
5039
+ }) => e.aiChat.body.paddingLeft};
5040
+ padding-right: ${({
4825
5041
  theme: e
4826
- }) => e.aiChat.body.paddingRight, ";padding-top:", ({
5042
+ }) => e.aiChat.body.paddingRight};
5043
+ padding-top: ${({
4827
5044
  theme: e
4828
- }) => e.aiChat.body.paddingTop, ";padding-bottom:", ({
5045
+ }) => e.aiChat.body.paddingTop};
5046
+ padding-bottom: ${({
4829
5047
  theme: e
4830
- }) => e.aiChat.body.paddingBottom, ";flex:initial;height:100%;"), As = /* @__PURE__ */ C("div", {
4831
- target: "eqnclj51",
4832
- label: "ChatFooter"
4833
- })("padding-left:", ({
5048
+ }) => e.aiChat.body.paddingBottom};
5049
+ flex: initial;
5050
+ height: 100%;
5051
+ `, Ls = _.div`
5052
+ padding-left: ${({
4834
5053
  theme: e
4835
- }) => e.aiChat.footer.paddingLeft, ";padding-right:", ({
5054
+ }) => e.aiChat.footer.paddingLeft};
5055
+ padding-right: ${({
4836
5056
  theme: e
4837
- }) => e.aiChat.footer.paddingRight, ";padding-top:", ({
5057
+ }) => e.aiChat.footer.paddingRight};
5058
+ padding-top: ${({
4838
5059
  theme: e
4839
- }) => e.aiChat.footer.paddingTop, ";padding-bottom:", ({
5060
+ }) => e.aiChat.footer.paddingTop};
5061
+ padding-bottom: ${({
4840
5062
  theme: e
4841
- }) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), Ls = /* @__PURE__ */ C("div", {
4842
- target: "eqnclj52",
4843
- label: "FollowupQuestionsContainer"
4844
- })("display:flex;flex-direction:column;row-gap:", ({
5063
+ }) => e.aiChat.footer.paddingBottom};
5064
+ display: flex;
5065
+ flex-direction: column;
5066
+ row-gap: 6px;
5067
+ `, Ts = _.div`
5068
+ display: flex;
5069
+ flex-direction: column;
5070
+ row-gap: ${({
4845
5071
  theme: e
4846
- }) => e.aiChat.suggestions.gap, ";");
4847
- function Ts({
5072
+ }) => e.aiChat.suggestions.gap};
5073
+ `;
5074
+ function Ns({
4848
5075
  contextTitle: e,
4849
5076
  onGoBack: t,
4850
5077
  contextDetails: r
@@ -4858,19 +5085,19 @@ function Ts({
4858
5085
  numOfRecentPrompts: g,
4859
5086
  numOfRecommendations: f,
4860
5087
  customPrompt: x
4861
- } = ie(), {
5088
+ } = oe(), {
4862
5089
  themeSettings: o
4863
5090
  } = L(), {
4864
5091
  data: u,
4865
5092
  isLoading: c,
4866
5093
  isError: m
4867
- } = jo({
5094
+ } = Oo({
4868
5095
  contextTitle: e,
4869
5096
  count: f,
4870
5097
  customPrompt: x
4871
- }), h = U(() => u == null ? void 0 : u.map((T) => T.nlqPrompt), [u]), {
5098
+ }), h = Q(() => u == null ? void 0 : u.map((T) => T.nlqPrompt), [u]), {
4872
5099
  history: w,
4873
- lastNlqResponse: _,
5100
+ lastNlqResponse: C,
4874
5101
  isAwaitingResponse: y,
4875
5102
  sendMessage: M,
4876
5103
  isLoading: D,
@@ -4878,65 +5105,65 @@ function Ts({
4878
5105
  lastError: A
4879
5106
  } = Yo(e, r), {
4880
5107
  mutate: R,
4881
- isLoading: ue
4882
- } = Lr(S), [F, G] = Z(!1), [B, V] = Z(!1), H = () => G(!0), $ = () => G(!1), J = () => {
4883
- R(), $();
4884
- }, z = de(null), W = de(null), Y = () => {
5108
+ isLoading: ge
5109
+ } = Tr(S), [F, q] = Z(!1), [B, V] = Z(!1), $ = () => q(!0), J = () => q(!1), X = () => {
5110
+ R(), J();
5111
+ }, z = pe(null), W = pe(null), Y = () => {
4885
5112
  if (!(z != null && z.current))
4886
5113
  return;
4887
5114
  const {
4888
5115
  scrollTop: T,
4889
- clientHeight: X,
4890
- scrollHeight: je
5116
+ clientHeight: K,
5117
+ scrollHeight: Oe
4891
5118
  } = z.current;
4892
- if (T === void 0 || X === void 0 || je === void 0)
5119
+ if (T === void 0 || K === void 0 || Oe === void 0)
4893
5120
  return;
4894
- const Oe = je - T - X > X / 2;
4895
- B !== Oe && V(Oe);
5121
+ const Ee = Oe - T - K > K / 2;
5122
+ B !== Ee && V(Ee);
4896
5123
  };
4897
5124
  qe(() => {
4898
5125
  z.current && (z.current.scrollTop = z.current.scrollHeight);
4899
5126
  }, [w, F, y]);
4900
- const se = de(null), ge = d ? /* @__PURE__ */ n(jr, {
4901
- ref: se,
5127
+ const ce = pe(null), he = d ? /* @__PURE__ */ n(Or, {
5128
+ ref: ce,
4902
5129
  title: e,
4903
- leftNav: t && /* @__PURE__ */ n(ms, {
5130
+ leftNav: t && /* @__PURE__ */ n(bs, {
4904
5131
  onClick: t,
4905
5132
  color: o.aiChat.header.textColor
4906
5133
  }),
4907
5134
  style: o.aiChat.header
4908
- }) : null, ke = U(() => [...new Set(w.filter((T) => T.role === "user").filter((T) => !(h != null && h.includes(T.content))).map((T) => T.content).reverse())].slice(0, g), [w, g, h]);
4909
- return (A == null ? void 0 : A.message) === s("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(Q, {
4910
- children: [d && ge, /* @__PURE__ */ n(Nr, {
5135
+ }) : null, ye = Q(() => [...new Set(w.filter((T) => T.role === "user").filter((T) => !(h != null && h.includes(T.content))).map((T) => T.content).reverse())].slice(0, g), [w, g, h]);
5136
+ return (A == null ? void 0 : A.message) === s("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(U, {
5137
+ children: [d && he, /* @__PURE__ */ n(jr, {
4911
5138
  text: A.message
4912
5139
  })]
4913
- }) : /* @__PURE__ */ v(Q, {
4914
- children: [ge, /* @__PURE__ */ v(Ds, {
5140
+ }) : /* @__PURE__ */ v(U, {
5141
+ children: [he, /* @__PURE__ */ v(As, {
4915
5142
  ref: z,
4916
5143
  theme: o,
4917
5144
  onScroll: Y,
4918
- children: [/* @__PURE__ */ n(ys, {
5145
+ children: [/* @__PURE__ */ n(ws, {
4919
5146
  isVisible: B,
4920
5147
  anchorElement: W.current,
4921
5148
  onClick: () => {
4922
- var T, X;
4923
- (X = z.current) == null || X.scroll({
5149
+ var T, K;
5150
+ (K = z.current) == null || K.scroll({
4924
5151
  top: (T = z.current) == null ? void 0 : T.scrollHeight,
4925
5152
  behavior: "smooth"
4926
5153
  });
4927
5154
  }
4928
- }), /* @__PURE__ */ n(Ll, {}), /* @__PURE__ */ n(Is, {
5155
+ }), /* @__PURE__ */ n(Tl, {}), /* @__PURE__ */ n(Ds, {
4929
5156
  questions: h || [],
4930
5157
  isLoading: c,
4931
5158
  onSelection: M
4932
- }), A && /* @__PURE__ */ n(le, {
5159
+ }), A && /* @__PURE__ */ n(se, {
4933
5160
  align: "left",
4934
5161
  children: A.message
4935
- }), D ? /* @__PURE__ */ n(Ue, {}) : /* @__PURE__ */ n(hs, {
5162
+ }), D ? /* @__PURE__ */ n(Qe, {}) : /* @__PURE__ */ n(ms, {
4936
5163
  messages: w
4937
- }), p && _ && ((i = (a = _.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(Ls, {
5164
+ }), p && C && ((i = (a = C.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(Ts, {
4938
5165
  theme: o,
4939
- children: (l = _.followupQuestions) == null ? void 0 : l.slice(0, 2).map((T, X) => /* @__PURE__ */ n(Be, {
5166
+ children: (l = C.followupQuestions) == null ? void 0 : l.slice(0, 2).map((T, K) => /* @__PURE__ */ n(Be, {
4940
5167
  align: "left",
4941
5168
  onClick: () => {
4942
5169
  M(T);
@@ -4945,55 +5172,70 @@ function Ts({
4945
5172
  className: "csdk-py-[7px] csdk-px-4",
4946
5173
  children: T
4947
5174
  })
4948
- }, X))
4949
- }), (y || ue) && /* @__PURE__ */ n(Or, {}), F && /* @__PURE__ */ n(jl, {
4950
- onCancel: $,
4951
- onConfirm: J
5175
+ }, K))
5176
+ }), (y || ge) && /* @__PURE__ */ n(Er, {}), F && /* @__PURE__ */ n(Ol, {
5177
+ onCancel: J,
5178
+ onConfirm: X
4952
5179
  })]
4953
- }), /* @__PURE__ */ v(As, {
5180
+ }), /* @__PURE__ */ v(Ls, {
4954
5181
  ref: W,
4955
5182
  theme: o,
4956
- children: [/* @__PURE__ */ n(bn, {
5183
+ children: [/* @__PURE__ */ n(fn, {
4957
5184
  onSendMessage: M,
4958
5185
  disabled: y || D,
4959
- onClearHistoryClick: H,
5186
+ onClearHistoryClick: $,
4960
5187
  suggestions: h || [],
4961
- recentPrompts: ke,
5188
+ recentPrompts: ye,
4962
5189
  isLoading: c || D,
4963
5190
  recommendationsError: m,
4964
- onChange: $
4965
- }), /* @__PURE__ */ n(Ko, {
5191
+ onChange: J
5192
+ }), /* @__PURE__ */ n(en, {
4966
5193
  theme: o
4967
5194
  })]
4968
5195
  })]
4969
5196
  });
4970
5197
  }
4971
- const Ns = /* @__PURE__ */ C("button", {
4972
- target: "eaokl8t0",
4973
- label: "Container"
4974
- })("font-family:", ({
5198
+ const js = _.button`
5199
+ font-family: ${({
4975
5200
  theme: e
4976
- }) => e.typography.fontFamily, ";padding:20px;border:none;display:flex;align-items:center;justify-content:space-between;text-align:left;border-radius:15px;box-shadow:0px 1px 2px rgba(9,9,10,0.1),0px 2px 4px rgba(9,9,10,0.1);cursor:pointer;background-color:", ({
5201
+ }) => e.typography.fontFamily};
5202
+ padding: 20px;
5203
+ border: none;
5204
+ display: flex;
5205
+ align-items: center;
5206
+ justify-content: space-between;
5207
+ text-align: left;
5208
+ border-radius: 15px;
5209
+ box-shadow: 0px 1px 2px rgba(9, 9, 10, 0.1), 0px 2px 4px rgba(9, 9, 10, 0.1);
5210
+ cursor: pointer;
5211
+
5212
+ background-color: ${({
4977
5213
  theme: e
4978
- }) => e.aiChat.dataTopics.items.backgroundColor, ";"), js = /* @__PURE__ */ C("div", {
4979
- target: "eaokl8t1",
4980
- label: "Title"
4981
- })("font-size:1.05rem;line-height:28px;color:", ({
5214
+ }) => e.aiChat.dataTopics.items.backgroundColor};
5215
+ `, Os = _.div`
5216
+ font-size: 1.05rem;
5217
+ line-height: 28px;
5218
+
5219
+ color: ${({
4982
5220
  theme: e
4983
- }) => e.aiChat.dataTopics.items.textColor, ";"), Os = /* @__PURE__ */ C("div", {
4984
- target: "eaokl8t2",
4985
- label: "Description"
4986
- })("font-size:", ({
5221
+ }) => e.aiChat.dataTopics.items.textColor};
5222
+ `, Es = _.div`
5223
+ font-size: ${({
4987
5224
  theme: e
4988
- }) => e.aiChat.primaryFontSize[0], ";line-height:", ({
5225
+ }) => e.aiChat.primaryFontSize[0]};
5226
+ line-height: ${({
4989
5227
  theme: e
4990
- }) => e.aiChat.primaryFontSize[1], ";color:", ({
5228
+ }) => e.aiChat.primaryFontSize[1]};
5229
+
5230
+ color: ${({
4991
5231
  theme: e
4992
- }) => or(e.aiChat.dataTopics.items.textColor, 0, 0.5), ";"), Es = /* @__PURE__ */ C("div", {
4993
- target: "eaokl8t3",
4994
- label: "IconContainer"
4995
- })("width:16px;height:16px;transform:rotate(180deg);");
4996
- function zs(e) {
5232
+ }) => ar(e.aiChat.dataTopics.items.textColor, 0, 0.5)};
5233
+ `, zs = _.div`
5234
+ width: 16px;
5235
+ height: 16px;
5236
+ transform: rotate(180deg);
5237
+ `;
5238
+ function Rs(e) {
4997
5239
  const {
4998
5240
  title: t,
4999
5241
  description: r,
@@ -5001,39 +5243,49 @@ function zs(e) {
5001
5243
  } = e, {
5002
5244
  themeSettings: i
5003
5245
  } = L();
5004
- return /* @__PURE__ */ v(Ns, {
5246
+ return /* @__PURE__ */ v(js, {
5005
5247
  onClick: a,
5006
5248
  theme: i,
5007
5249
  children: [/* @__PURE__ */ v("div", {
5008
- children: [/* @__PURE__ */ n(js, {
5250
+ children: [/* @__PURE__ */ n(Os, {
5009
5251
  theme: i,
5010
5252
  children: t
5011
- }), /* @__PURE__ */ n(Os, {
5253
+ }), /* @__PURE__ */ n(Es, {
5012
5254
  theme: i,
5013
5255
  children: r
5014
5256
  })]
5015
- }), /* @__PURE__ */ n(Es, {
5016
- children: /* @__PURE__ */ n(aa, {
5257
+ }), /* @__PURE__ */ n(zs, {
5258
+ children: /* @__PURE__ */ n(ia, {
5017
5259
  color: i.aiChat.icons.color
5018
5260
  })
5019
5261
  })]
5020
5262
  });
5021
5263
  }
5022
- const Rs = /* @__PURE__ */ C("div", {
5023
- target: "evdxtuj0",
5024
- label: "FlexContainer"
5025
- })("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"), Zs = /* @__PURE__ */ C("div", {
5026
- target: "evdxtuj1",
5027
- label: "Title"
5028
- })("font-size:24px;line-height:32px;font-weight:600;text-align:center;padding-bottom:4px;color:", ({
5264
+ const Zs = _.div`
5265
+ padding: 20px;
5266
+ display: flex;
5267
+ flex-direction: column;
5268
+ gap: 20px;
5269
+ overflow: auto;
5270
+ `, Ws = _.div`
5271
+ font-size: 24px;
5272
+ line-height: 32px;
5273
+ font-weight: 600;
5274
+ text-align: center;
5275
+ padding-bottom: 4px;
5276
+
5277
+ color: ${({
5029
5278
  theme: e
5030
- }) => e.aiChat.primaryTextColor, ";"), Ws = /* @__PURE__ */ C("div", {
5031
- target: "evdxtuj2",
5032
- label: "Subtitle"
5033
- })("font-size:15px;line-height:22px;color:", ({
5279
+ }) => e.aiChat.primaryTextColor};
5280
+ `, Ps = _.div`
5281
+ font-size: 15px;
5282
+ line-height: 22px;
5283
+
5284
+ color: ${({
5034
5285
  theme: e
5035
- }) => e.aiChat.primaryTextColor, ";");
5036
- function Ps(e) {
5286
+ }) => e.aiChat.primaryTextColor};
5287
+ `;
5288
+ function Gs(e) {
5037
5289
  const {
5038
5290
  dataTopics: t
5039
5291
  } = e, {
@@ -5041,23 +5293,23 @@ function Ps(e) {
5041
5293
  } = L(), {
5042
5294
  t: a
5043
5295
  } = E();
5044
- return /* @__PURE__ */ v(Rs, {
5045
- children: [/* @__PURE__ */ n(Zs, {
5296
+ return /* @__PURE__ */ v(Zs, {
5297
+ children: [/* @__PURE__ */ n(Ws, {
5046
5298
  theme: r,
5047
5299
  children: a("ai.dataTopics")
5048
- }), /* @__PURE__ */ v(Ws, {
5300
+ }), /* @__PURE__ */ v(Ps, {
5049
5301
  theme: r,
5050
5302
  children: [a("ai.chatbotDescription"), /* @__PURE__ */ n("br", {}), /* @__PURE__ */ n("br", {}), a("ai.topicSelectPrompt")]
5051
- }), t.map((i) => /* @__PURE__ */ Ta(zs, j(I({}, i), {
5303
+ }), t.map((i) => /* @__PURE__ */ Za(Rs, j(I({}, i), {
5052
5304
  key: i.title
5053
5305
  })))]
5054
5306
  });
5055
5307
  }
5056
- const qs = "#000000", Gs = "#FFFFFF";
5308
+ const qs = "#000000", $s = "#FFFFFF";
5057
5309
  function Hs({
5058
5310
  isDarkBackground: e = !1
5059
5311
  }) {
5060
- const t = e ? Gs : qs;
5312
+ const t = e ? $s : qs;
5061
5313
  return /* @__PURE__ */ v("svg", {
5062
5314
  width: "32",
5063
5315
  height: "32",
@@ -5115,31 +5367,36 @@ function Hs({
5115
5367
  })]
5116
5368
  });
5117
5369
  }
5118
- const Bs = /* @__PURE__ */ C("div", {
5119
- target: "eqdfbpm0",
5120
- label: "LogoContainer"
5121
- })("margin-left:14px;margin-top:3px;"), Ys = /* @__PURE__ */ C("div", {
5122
- target: "eqdfbpm1",
5123
- label: "DataTopicsContainer"
5124
- })("display:flex;flex-direction:column;justify-content:top;overflow:hidden;height:100%;background-color:", ({
5370
+ const Bs = _.div`
5371
+ margin-left: 14px;
5372
+ margin-top: 3px;
5373
+ `, Ys = _.div`
5374
+ display: flex;
5375
+ flex-direction: column;
5376
+ justify-content: top;
5377
+ overflow: hidden;
5378
+ height: 100%;
5379
+
5380
+ background-color: ${({
5125
5381
  theme: e
5126
- }) => e.aiChat.dataTopics.backgroundColor, ";");
5127
- function Qs({
5382
+ }) => e.aiChat.dataTopics.backgroundColor};
5383
+ `;
5384
+ function Us({
5128
5385
  dataTopicsList: e,
5129
5386
  onDataTopicClick: t
5130
5387
  }) {
5131
5388
  const {
5132
5389
  enableHeader: r
5133
- } = ie(), {
5390
+ } = oe(), {
5134
5391
  themeSettings: a
5135
5392
  } = L(), {
5136
5393
  t: i
5137
- } = E(), l = U(() => e == null ? void 0 : e.map((p) => ({
5394
+ } = E(), l = Q(() => e == null ? void 0 : e.map((p) => ({
5138
5395
  title: p,
5139
5396
  onClick: () => t(p)
5140
- })), [e, t]), s = Ia(Da(a.aiChat.header.backgroundColor)) > 0.5;
5141
- return /* @__PURE__ */ v(Q, {
5142
- children: [r ? /* @__PURE__ */ n(jr, {
5397
+ })), [e, t]), s = La(Ta(a.aiChat.header.backgroundColor)) > 0.5;
5398
+ return /* @__PURE__ */ v(U, {
5399
+ children: [r ? /* @__PURE__ */ n(Or, {
5143
5400
  title: i("ai.analyticsChatbot"),
5144
5401
  leftNav: /* @__PURE__ */ n(Bs, {
5145
5402
  children: /* @__PURE__ */ n(Hs, {
@@ -5149,48 +5406,48 @@ function Qs({
5149
5406
  style: a.aiChat.header
5150
5407
  }) : null, /* @__PURE__ */ v(Ys, {
5151
5408
  theme: a,
5152
- children: [!l && /* @__PURE__ */ n(Ue, {}), l && /* @__PURE__ */ n(Ps, {
5409
+ children: [!l && /* @__PURE__ */ n(Qe, {}), l && /* @__PURE__ */ n(Gs, {
5153
5410
  dataTopics: l
5154
5411
  })]
5155
5412
  })]
5156
5413
  });
5157
5414
  }
5158
- function Us() {
5415
+ function Qs() {
5159
5416
  const [e, t] = Z(), [r, a] = Z(), {
5160
5417
  data: i,
5161
5418
  fetchStatus: l
5162
- } = Ro(), {
5419
+ } = Zo(), {
5163
5420
  dataTopicsList: s,
5164
5421
  contextDetails: p
5165
- } = ie(), {
5422
+ } = oe(), {
5166
5423
  t: d
5167
5424
  } = E(), g = d("ai.errors.noAvailableDataTopics"), f = N((c) => {
5168
5425
  c.length ? c.length === 1 && (a(void 0), t(c[0])) : a(g);
5169
- }, [g]), x = U(() => {
5426
+ }, [g]), x = Q(() => {
5170
5427
  if (i && l === "idle") {
5171
5428
  const c = (s != null && s.length ? i == null ? void 0 : i.filter((m) => s == null ? void 0 : s.includes(m.title)) : i).map((m) => m.title);
5172
5429
  return f(c), c;
5173
5430
  }
5174
5431
  return [];
5175
- }, [i, l, s, f]), o = Ae(), u = N(() => {
5432
+ }, [i, l, s, f]), o = Le(), u = N(() => {
5176
5433
  a(void 0), o.invalidateQueries(["getDataTopics"]);
5177
5434
  }, [o]);
5178
- return r ? /* @__PURE__ */ n(Nr, {
5435
+ return r ? /* @__PURE__ */ n(jr, {
5179
5436
  text: r,
5180
5437
  action: {
5181
5438
  text: d("ai.buttons.refresh"),
5182
5439
  onClick: u
5183
5440
  }
5184
- }) : x.length === 1 && !e ? /* @__PURE__ */ n(Ue, {}) : e ? /* @__PURE__ */ n(Ts, {
5441
+ }) : x.length === 1 && !e ? /* @__PURE__ */ n(Qe, {}) : e ? /* @__PURE__ */ n(Ns, {
5185
5442
  contextTitle: e,
5186
5443
  contextDetails: p,
5187
5444
  onGoBack: x.length === 1 ? void 0 : () => t(void 0)
5188
- }) : /* @__PURE__ */ n(Qs, {
5445
+ }) : /* @__PURE__ */ n(Us, {
5189
5446
  dataTopicsList: x,
5190
5447
  onDataTopicClick: (c) => t(c)
5191
5448
  });
5192
5449
  }
5193
- const Fs = er({
5450
+ const Fs = ir({
5194
5451
  componentName: "Chatbot"
5195
5452
  })((e) => {
5196
5453
  const {
@@ -5200,36 +5457,54 @@ const Fs = er({
5200
5457
  } = e, {
5201
5458
  themeSettings: i
5202
5459
  } = L();
5203
- return /* @__PURE__ */ n(Oo, {
5460
+ return /* @__PURE__ */ n(Eo, {
5204
5461
  value: a ?? {},
5205
- children: /* @__PURE__ */ n($o, {
5462
+ children: /* @__PURE__ */ n(Jo, {
5206
5463
  id: "csdk-chatbot-frame",
5207
5464
  width: t,
5208
5465
  height: r,
5209
5466
  theme: i,
5210
5467
  tabIndex: 0,
5211
- children: /* @__PURE__ */ n(Us, {})
5468
+ children: /* @__PURE__ */ n(Qs, {})
5212
5469
  })
5213
5470
  });
5214
- }), Vs = er({
5471
+ }), Vs = ir({
5215
5472
  componentName: "GetNlgInsights"
5216
5473
  })(function(e) {
5217
5474
  const {
5218
5475
  data: t,
5219
5476
  isLoading: r,
5220
5477
  isError: a
5221
- } = Ir(e), {
5478
+ } = Dr(e), {
5222
5479
  t: i
5223
5480
  } = E();
5224
5481
  if (a)
5225
- return /* @__PURE__ */ n(Q, {
5482
+ return /* @__PURE__ */ n(U, {
5226
5483
  children: i("ai.errors.unexpected")
5227
5484
  });
5228
5485
  const l = t ?? i("ai.errors.insightsNotAvailable");
5229
- return /* @__PURE__ */ n(ra, {
5486
+ return /* @__PURE__ */ n(aa, {
5230
5487
  text: r ? "Loading..." : l
5231
5488
  });
5232
- }), $s = new Xt({
5489
+ });
5490
+ _.div`
5491
+ display: flex;
5492
+ flex-direction: row;
5493
+ align-items: center;
5494
+ gap: 10px;
5495
+ margin: 24px 0;
5496
+ max-width: 640px;
5497
+ color: ${({
5498
+ theme: e
5499
+ }) => e.chart.textColor};
5500
+ background-color: ${({
5501
+ theme: e
5502
+ }) => e.chart.backgroundColor};
5503
+ `;
5504
+ _.div`
5505
+ align-self: flex-start;
5506
+ `;
5507
+ const Js = new Kt({
5233
5508
  defaultOptions: {
5234
5509
  queries: {
5235
5510
  refetchOnWindowFocus: !1,
@@ -5237,15 +5512,15 @@ const Fs = er({
5237
5512
  }
5238
5513
  }
5239
5514
  });
5240
- function Js({
5515
+ function Xs({
5241
5516
  children: e,
5242
5517
  context: t
5243
5518
  }) {
5244
- return /* @__PURE__ */ n(Lo, {
5245
- children: /* @__PURE__ */ n(Sr.Provider, {
5519
+ return /* @__PURE__ */ n(To, {
5520
+ children: /* @__PURE__ */ n(Mr.Provider, {
5246
5521
  value: t == null ? void 0 : t.api,
5247
- children: /* @__PURE__ */ n(Sa, {
5248
- client: $s,
5522
+ children: /* @__PURE__ */ n(Da, {
5523
+ client: Js,
5249
5524
  children: e
5250
5525
  })
5251
5526
  })
@@ -5262,13 +5537,13 @@ function Js({
5262
5537
  console.error("vite-plugin-css-injected-by-js", r);
5263
5538
  }
5264
5539
  })();
5265
- const ia = {
5540
+ const oa = {
5266
5541
  api: void 0
5267
- }, oa = Symbol("aiContextKey"), Ve = () => ui(
5268
- oa,
5269
- () => ur(ia),
5542
+ }, na = Symbol("aiContextKey"), Ve = () => gi(
5543
+ na,
5544
+ () => gr(oa),
5270
5545
  !0
5271
- ), ec = ft({
5546
+ ), tc = kt({
5272
5547
  props: {
5273
5548
  /**
5274
5549
  * {@inheritDoc @sisense/sdk-ui!AiContextProviderProps.volatile}
@@ -5276,32 +5551,32 @@ const ia = {
5276
5551
  volatile: Boolean
5277
5552
  },
5278
5553
  setup(e, { slots: t }) {
5279
- const r = di(), a = ur(ia), { app: i } = r.value;
5554
+ const r = pi(), a = gr(oa), { app: i } = r.value;
5280
5555
  return i && (a.value = {
5281
- api: new Wt(i.httpClient, e.volatile)
5282
- }), gr(async () => {
5556
+ api: new Pt(i.httpClient, e.volatile)
5557
+ }), hr(async () => {
5283
5558
  const { app: l } = r.value;
5284
5559
  l && (a.value = {
5285
- api: new Wt(l.httpClient, e.volatile)
5560
+ api: new Pt(l.httpClient, e.volatile)
5286
5561
  });
5287
- }), gi(oa, a), () => {
5562
+ }), hi(na, a), () => {
5288
5563
  var l;
5289
5564
  return (l = t.default) == null ? void 0 : l.call(t);
5290
5565
  };
5291
5566
  }
5292
- }), na = () => {
5293
- const e = Ve(), t = new pi({
5567
+ }), la = () => {
5568
+ const e = Ve(), t = new ui({
5294
5569
  context: e.value
5295
5570
  });
5296
- return gr(() => {
5571
+ return hr(() => {
5297
5572
  t.setValue({
5298
5573
  context: e.value
5299
5574
  });
5300
5575
  }), {
5301
5576
  propsObserver: t,
5302
- providerComponent: Js
5577
+ providerComponent: Xs
5303
5578
  };
5304
- }, tc = ft({
5579
+ }, rc = kt({
5305
5580
  props: {
5306
5581
  /**
5307
5582
  * {@inheritDoc @sisense/sdk-ui!ChatbotProps.width}
@@ -5316,11 +5591,11 @@ const ia = {
5316
5591
  */
5317
5592
  config: Object
5318
5593
  },
5319
- setup: (e) => dr(Fs, e, [
5320
- ...pr(),
5321
- na()
5594
+ setup: (e) => pr(Fs, e, [
5595
+ ...ur(),
5596
+ la()
5322
5597
  ])
5323
- }), rc = ft({
5598
+ }), ac = kt({
5324
5599
  props: {
5325
5600
  /**
5326
5601
  * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dataSource}
@@ -5346,13 +5621,13 @@ const ia = {
5346
5621
  */
5347
5622
  verbosity: String
5348
5623
  },
5349
- setup: (e) => dr(Vs, e, [
5350
- ...pr(),
5351
- na()
5624
+ setup: (e) => pr(Vs, e, [
5625
+ ...ur(),
5626
+ la()
5352
5627
  ])
5353
- }), ac = (e) => {
5354
- gt("useGetNlgInsights");
5355
- const [t, r] = ht(bt, {
5628
+ }), ic = (e) => {
5629
+ mt("useGetNlgInsights");
5630
+ const [t, r] = bt(xt, {
5356
5631
  isLoading: !0,
5357
5632
  isError: !1,
5358
5633
  isSuccess: !1,
@@ -5363,16 +5638,16 @@ const ia = {
5363
5638
  var p;
5364
5639
  try {
5365
5640
  r({ type: "loading" });
5366
- const d = Mr(fe(e)), g = await (s == null ? void 0 : s.ai.getNlgInsights(d));
5641
+ const d = Ir(xe(e)), g = await (s == null ? void 0 : s.ai.getNlgInsights(d));
5367
5642
  r({ type: "success", data: (p = g == null ? void 0 : g.data) == null ? void 0 : p.answer });
5368
5643
  } catch (d) {
5369
5644
  r({ type: "error", error: d });
5370
5645
  }
5371
5646
  };
5372
- xt(
5373
- [...mt(e), a],
5647
+ yt(
5648
+ [...ft(e), a],
5374
5649
  () => {
5375
- const { api: s } = a.value, { enabled: p } = fe(e);
5650
+ const { api: s } = a.value, { enabled: p } = xe(e);
5376
5651
  !s || !(p === void 0 || p === !0) || i(s);
5377
5652
  },
5378
5653
  { immediate: !0 }
@@ -5381,12 +5656,12 @@ const ia = {
5381
5656
  a.value.api && i(a.value.api);
5382
5657
  };
5383
5658
  return {
5384
- ...kt(t.value),
5659
+ ...wt(t.value),
5385
5660
  refetch: l
5386
5661
  };
5387
- }, ic = (e) => {
5388
- gt("useGetQueryRecommendations");
5389
- const [t, r] = ht(bt, {
5662
+ }, oc = (e) => {
5663
+ mt("useGetQueryRecommendations");
5664
+ const [t, r] = bt(xt, {
5390
5665
  isLoading: !0,
5391
5666
  isError: !1,
5392
5667
  isSuccess: !1,
@@ -5396,12 +5671,12 @@ const ia = {
5396
5671
  }), a = Ve(), i = async (s) => {
5397
5672
  try {
5398
5673
  r({ type: "loading" });
5399
- const { contextTitle: p, count: d, enableAxisTitlesInWidgetProps: g, customPrompt: f } = fe(e), x = d ?? lt, o = await (s == null ? void 0 : s.ai.getQueryRecommendations(p, {
5674
+ const { contextTitle: p, count: d, enableAxisTitlesInWidgetProps: g, customPrompt: f } = xe(e), x = d ?? ct, o = await (s == null ? void 0 : s.ai.getQueryRecommendations(p, {
5400
5675
  numOfRecommendations: x,
5401
5676
  ...f ? { userPrompt: f } : void 0
5402
5677
  })), u = (o == null ? void 0 : o.map((c) => ({
5403
5678
  ...c,
5404
- widgetProps: wr.toWidgetProps(c, {
5679
+ widgetProps: _r.toWidgetProps(c, {
5405
5680
  useCustomizedStyleOptions: g
5406
5681
  })
5407
5682
  }))) || [];
@@ -5410,10 +5685,10 @@ const ia = {
5410
5685
  r({ type: "error", error: p });
5411
5686
  }
5412
5687
  };
5413
- xt(
5414
- [...mt(e), a],
5688
+ yt(
5689
+ [...ft(e), a],
5415
5690
  () => {
5416
- const { api: s } = a.value, { enabled: p, count: d } = fe(e), f = (p === void 0 || p === !0) && (d ?? lt) > 0;
5691
+ const { api: s } = a.value, { enabled: p, count: d } = xe(e), f = (p === void 0 || p === !0) && (d ?? ct) > 0;
5417
5692
  !s || !f || i(s);
5418
5693
  },
5419
5694
  { immediate: !0 }
@@ -5422,12 +5697,12 @@ const ia = {
5422
5697
  a.value.api && i(a.value.api);
5423
5698
  };
5424
5699
  return {
5425
- ...kt(t.value),
5700
+ ...wt(t.value),
5426
5701
  refetch: l
5427
5702
  };
5428
- }, oc = (e) => {
5429
- gt("useGetNlqResult");
5430
- const [t, r] = ht(bt, {
5703
+ }, nc = (e) => {
5704
+ mt("useGetNlqResult");
5705
+ const [t, r] = bt(xt, {
5431
5706
  isLoading: !0,
5432
5707
  isError: !1,
5433
5708
  isSuccess: !1,
@@ -5437,7 +5712,7 @@ const ia = {
5437
5712
  }), a = Ve(), i = async (s) => {
5438
5713
  try {
5439
5714
  r({ type: "loading" });
5440
- const p = fe(e), { enableAxisTitlesInWidgetProps: d } = p, { contextTitle: g, request: f } = No(p), x = await (s == null ? void 0 : s.ai.getNlqResult(g, f)), o = x ? wr.toWidgetProps(x, {
5715
+ const p = xe(e), { enableAxisTitlesInWidgetProps: d } = p, { contextTitle: g, request: f } = jo(p), x = await (s == null ? void 0 : s.ai.getNlqResult(g, f)), o = x ? _r.toWidgetProps(x, {
5441
5716
  useCustomizedStyleOptions: d || !1
5442
5717
  }) : void 0;
5443
5718
  r({ type: "success", data: o });
@@ -5445,10 +5720,10 @@ const ia = {
5445
5720
  r({ type: "error", error: p });
5446
5721
  }
5447
5722
  };
5448
- xt(
5449
- [...mt(e), a],
5723
+ yt(
5724
+ [...ft(e), a],
5450
5725
  () => {
5451
- const { api: s } = a.value, { enabled: p } = fe(e);
5726
+ const { api: s } = a.value, { enabled: p } = xe(e);
5452
5727
  !s || !(p === void 0 || p === !0) || i(s);
5453
5728
  },
5454
5729
  { immediate: !0 }
@@ -5457,15 +5732,15 @@ const ia = {
5457
5732
  a.value.api && i(a.value.api);
5458
5733
  };
5459
5734
  return {
5460
- ...kt(t.value),
5735
+ ...wt(t.value),
5461
5736
  refetch: l
5462
5737
  };
5463
5738
  };
5464
5739
  export {
5465
- ec as AiContextProvider,
5466
- tc as Chatbot,
5467
- rc as GetNlgInsights,
5468
- ac as useGetNlgInsights,
5469
- oc as useGetNlqResult,
5470
- ic as useGetQueryRecommendations
5740
+ tc as AiContextProvider,
5741
+ rc as Chatbot,
5742
+ ac as GetNlgInsights,
5743
+ ic as useGetNlgInsights,
5744
+ nc as useGetNlqResult,
5745
+ oc as useGetQueryRecommendations
5471
5746
  };