@feedmepos/mf-report 5.19.22 → 5.19.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { computed as C, defineComponent as Ee, mergeModels as Ue, useModel as Oe, ref as p, onMounted as Je, nextTick as ke, watch as fe, resolveComponent as q, createElementBlock as ee, openBlock as E, Fragment as Ce, renderSlot as Ye, createVNode as O, normalizeStyle as He, unref as s, createElementVNode as U, toDisplayString as ze, withCtx as ae, createBlock as ie, createCommentVNode as Ae, normalizeClass as Xe, h as xt, renderList as Ct, toRaw as va, markRaw as ga, createTextVNode as Rt, onUnmounted as ya, resolveDynamicComponent as ba, withDirectives as wa, vShow as Sa, withModifiers as Tt, isRef as xa } from "vue";
2
- import { W as M, e as dt, f as Ca, S as lt, v as ut, g as ka, h as Ft, i as Kt, q as Zt, R as et, j as _a, D as Pe, c as he, C as Fe, a as Ta, b as Fa, _ as Da } from "./BaseDialog.vue_vue_type_script_setup_true_lang-g-uxOKsk.js";
3
- import { u as mt, b as ct, a as It, d as tt, i as La } from "./vue-i18n-BQN8HgvD.js";
1
+ import { computed as C, defineComponent as Ee, mergeModels as Ue, useModel as Oe, ref as p, onMounted as Ke, nextTick as ke, watch as fe, resolveComponent as q, createElementBlock as ee, openBlock as E, Fragment as Ce, renderSlot as Ye, createVNode as O, normalizeStyle as He, unref as s, createElementVNode as U, toDisplayString as ze, withCtx as ae, createBlock as ie, createCommentVNode as Ae, normalizeClass as Je, h as xt, renderList as Ct, toRaw as va, markRaw as ga, createTextVNode as Rt, onUnmounted as ya, resolveDynamicComponent as ba, withDirectives as wa, vShow as Sa, withModifiers as Tt, isRef as xa } from "vue";
2
+ import { W as M, e as dt, f as Ca, S as st, v as ut, g as ka, h as Ft, i as Kt, q as Zt, R as tt, j as _a, D as Pe, c as he, C as Fe, a as Ta, b as Fa, _ as Da } from "./BaseDialog.vue_vue_type_script_setup_true_lang-g-uxOKsk.js";
3
+ import { u as mt, b as ct, a as It, d as at, i as La } from "./vue-i18n-BQN8HgvD.js";
4
4
  import { d as Yt, _ as Ra, a as Va, b as za, c as Aa } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-cfshXMB2.js";
5
5
  import { storeToRefs as $e, defineStore as Qt } from "pinia";
6
6
  import { useBreakpoints as ea, useSnackbar as Wt, components as $a } from "@feedmepos/ui-library";
7
7
  import { a as Ea } from "./SelectComponent.vue_vue_type_script_setup_true_lang-B2oCOTUH.js";
8
- import { r as st } from "./i18n-Cif1I9J2.js";
8
+ import { r as Ge } from "./i18n-DQxDgiLO.js";
9
9
  import { _ as Vt } from "./NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js";
10
10
  import "@feedmepos/mf-common";
11
11
  var zt = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(zt || {}), je = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(je || {}), At = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(At || {}), $t = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))($t || {}), Et = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(Et || {}), Mt = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(Mt || {}), Nt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(Nt || {});
@@ -119,16 +119,16 @@ const jt = [
119
119
  function Be({
120
120
  index: e,
121
121
  isCompare: l,
122
- opacity: u
122
+ opacity: i
123
123
  }) {
124
- let a = typeof u == "number" ? u : 1;
124
+ let a = typeof i == "number" ? i : 1;
125
125
  return l && (a = a * 0.6), `rgba(${jt[e % jt.length]}, ${a})`;
126
126
  }
127
- function ta(e, l, u) {
127
+ function ta(e, l, i) {
128
128
  if (e === "" || l === "")
129
129
  return null;
130
130
  let a = (z) => z == null ? void 0 : z.replace(/,/g, "");
131
- u === "ID" && (a = (z) => z == null ? void 0 : z.replace(/\./g, "").replace(/,/g, "."));
131
+ i === "ID" && (a = (z) => z == null ? void 0 : z.replace(/\./g, "").replace(/,/g, "."));
132
132
  const w = Number(a(e)), x = Number(a(l));
133
133
  if (isNaN(w) || isNaN(x))
134
134
  return null;
@@ -156,17 +156,17 @@ function Ia(e) {
156
156
  };
157
157
  }
158
158
  function pt(e) {
159
- function l(d, m, i) {
160
- if (d.measureText(m).width <= i) return m;
159
+ function l(d, m, u) {
160
+ if (d.measureText(m).width <= u) return m;
161
161
  const c = "…";
162
162
  let S = 0, y = m.length;
163
163
  for (; S < y; ) {
164
164
  const T = Math.floor((S + y) / 2), v = m.slice(0, T) + c;
165
- d.measureText(v).width <= i ? S = T + 1 : y = T;
165
+ d.measureText(v).width <= u ? S = T + 1 : y = T;
166
166
  }
167
167
  return m.slice(0, S - 1) + c;
168
168
  }
169
- const u = C(() => ({
169
+ const i = C(() => ({
170
170
  display: e.showLabel,
171
171
  align: e.labelAlign,
172
172
  anchor: e.labelAnchor,
@@ -190,16 +190,16 @@ function pt(e) {
190
190
  display: e.showXTick,
191
191
  callback: function(d) {
192
192
  if ((e == null ? void 0 : e.isTransposed) === !0) return String(d);
193
- let i = String(d);
193
+ let u = String(d);
194
194
  const c = this;
195
- c && typeof c.getLabelForValue == "function" && (i = c.getLabelForValue(d));
195
+ c && typeof c.getLabelForValue == "function" && (u = c.getLabelForValue(d));
196
196
  const S = c == null ? void 0 : c.chart, y = c == null ? void 0 : c.ctx, T = S.height * 0.25;
197
197
  if (y && T > 0) {
198
198
  y.save();
199
- const I = y.measureText(i).width > T ? l(y, i, T) : i;
199
+ const I = y.measureText(u).width > T ? l(y, u, T) : u;
200
200
  return y.restore(), I;
201
201
  }
202
- return i;
202
+ return u;
203
203
  },
204
204
  font: {
205
205
  size: e.xTickFontSize
@@ -215,7 +215,7 @@ function pt(e) {
215
215
  afterBuildTicks: (d) => {
216
216
  const m = Array.isArray(d == null ? void 0 : d.ticks) ? d.ticks : [];
217
217
  if (m.length === 0) return;
218
- const i = d.getLabelForValue(m[0].value), c = !isNaN(Number(i));
218
+ const u = d.getLabelForValue(m[0].value), c = !isNaN(Number(u));
219
219
  d.options.ticks.minRotation = c || m.length < 10 ? 0 : 90;
220
220
  },
221
221
  afterFit: (d) => {
@@ -237,16 +237,16 @@ function pt(e) {
237
237
  },
238
238
  callback: function(d) {
239
239
  if (!((e == null ? void 0 : e.isTransposed) === !0)) return String(d);
240
- let i = String(d);
240
+ let u = String(d);
241
241
  const c = this;
242
- c && typeof c.getLabelForValue == "function" && (i = c.getLabelForValue(d));
242
+ c && typeof c.getLabelForValue == "function" && (u = c.getLabelForValue(d));
243
243
  const S = c == null ? void 0 : c.chart, y = c == null ? void 0 : c.ctx, T = S.width * 0.4;
244
244
  if (y && T > 0) {
245
245
  y.save();
246
- const I = y.measureText(i).width > T ? l(y, i, T) : i;
246
+ const I = y.measureText(u).width > T ? l(y, u, T) : u;
247
247
  return y.restore(), I;
248
248
  }
249
- return i;
249
+ return u;
250
250
  }
251
251
  },
252
252
  title: {
@@ -265,8 +265,8 @@ function pt(e) {
265
265
  labels: {
266
266
  usePointStyle: e.usePointStyle ?? !0,
267
267
  generateLabels: (d) => {
268
- var i;
269
- const m = ((i = d == null ? void 0 : d.data) == null ? void 0 : i.datasets) || [];
268
+ var u;
269
+ const m = ((u = d == null ? void 0 : d.data) == null ? void 0 : u.datasets) || [];
270
270
  if (m.length === 0) return [];
271
271
  if (m.length === 1 && Array.isArray(m[0].backgroundColor) && m[0].backgroundColor.length > 1 && Array.isArray(m[0].data)) {
272
272
  const c = m[0];
@@ -297,7 +297,7 @@ function pt(e) {
297
297
  }
298
298
  }
299
299
  })), R = C(() => e.isTransposed), L = C(() => e.chartWidth), z = C(() => e.chartHeight);
300
- return { datalabels: u, xCfg: a, yCfg: w, isTransposed: R, legend: x, chartWidth: L, chartHeight: z };
300
+ return { datalabels: i, xCfg: a, yCfg: w, isTransposed: R, legend: x, chartWidth: L, chartHeight: z };
301
301
  }
302
302
  const Wa = /* @__PURE__ */ Ee({
303
303
  __name: "WidgetBarchart",
@@ -309,14 +309,14 @@ const Wa = /* @__PURE__ */ Ee({
309
309
  }),
310
310
  emits: ["update:modelValue"],
311
311
  setup(e) {
312
- const l = e, u = Oe(e, "modelValue"), a = p(null), w = C(() => {
312
+ const l = e, i = Oe(e, "modelValue"), a = p(null), w = C(() => {
313
313
  var v;
314
- return ((v = u.value.data) == null ? void 0 : v.xAxis) ?? [];
314
+ return ((v = i.value.data) == null ? void 0 : v.xAxis) ?? [];
315
315
  }), x = C(() => {
316
316
  var v;
317
- return ((v = u.value.data) == null ? void 0 : v.datasets) ?? [];
318
- }), { datalabels: R, xCfg: L, yCfg: z, isTransposed: d, legend: m, chartWidth: i, chartHeight: c } = pt(
319
- u.value
317
+ return ((v = i.value.data) == null ? void 0 : v.datasets) ?? [];
318
+ }), { datalabels: R, xCfg: L, yCfg: z, isTransposed: d, legend: m, chartWidth: u, chartHeight: c } = pt(
319
+ i.value
320
320
  ), S = C(() => x.value.length > 0 ? [
321
321
  ...x.value.map((v, I) => ({
322
322
  label: v.name,
@@ -328,7 +328,7 @@ const Wa = /* @__PURE__ */ Ee({
328
328
  function T() {
329
329
  return y.extractChartSize(a.value, l.tileIndex) || { width: 0, height: 0 };
330
330
  }
331
- return Je(() => {
331
+ return Ke(() => {
332
332
  ke(() => {
333
333
  T();
334
334
  });
@@ -357,7 +357,7 @@ const Wa = /* @__PURE__ */ Ee({
357
357
  datalabels: s(R),
358
358
  "maintain-aspect-ratio": !1,
359
359
  style: He({
360
- "--chart-width": s(i) !== void 0 ? s(i) + "px" : "100%",
360
+ "--chart-width": s(u) !== void 0 ? s(u) + "px" : "100%",
361
361
  "--chart-height": s(c) !== void 0 ? s(c) + "px" : "calc(100% - 36px)"
362
362
  })
363
363
  }, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
@@ -374,25 +374,25 @@ const Wa = /* @__PURE__ */ Ee({
374
374
  }),
375
375
  emits: ["update:modelValue"],
376
376
  setup(e) {
377
- const l = e, u = Oe(e, "modelValue"), { breakpoints: a } = ea(), w = p(null), { datalabels: x, legend: R, chartWidth: L, chartHeight: z } = pt(u.value), d = C(() => {
377
+ const l = e, i = Oe(e, "modelValue"), { breakpoints: a } = ea(), w = p(null), { datalabels: x, legend: R, chartWidth: L, chartHeight: z } = pt(i.value), d = C(() => {
378
378
  let S = [];
379
- return u.value.data.datasets && u.value.data.metrics && u.value.data.datasets.length > 0 && u.value.data.metrics.length > 0 && (S = [
379
+ return i.value.data.datasets && i.value.data.metrics && i.value.data.datasets.length > 0 && i.value.data.metrics.length > 0 && (S = [
380
380
  {
381
- label: u.value.data.metrics[0],
382
- data: u.value.data.datasets.map((y) => y.value),
383
- backgroundColor: u.value.data.datasets.map((y, T) => Be({ index: T }))
381
+ label: i.value.data.metrics[0],
382
+ data: i.value.data.datasets.map((y) => y.value),
383
+ backgroundColor: i.value.data.datasets.map((y, T) => Be({ index: T }))
384
384
  }
385
385
  ]), S;
386
386
  }), m = dt();
387
- function i() {
387
+ function u() {
388
388
  return m.extractChartSize(w.value, l.tileIndex) || { width: 0, height: 0 };
389
389
  }
390
- Je(() => {
390
+ Ke(() => {
391
391
  ke(() => {
392
- i();
392
+ u();
393
393
  });
394
394
  }), fe([d], () => {
395
- ke(() => i());
395
+ ke(() => u());
396
396
  });
397
397
  const c = C(() => a.value.lg ? 12 : 8);
398
398
  return (S, y) => {
@@ -405,7 +405,7 @@ const Wa = /* @__PURE__ */ Ee({
405
405
  class: "circular",
406
406
  percentage: "70%",
407
407
  datasets: d.value,
408
- metrics: u.value.data.datasets.map((v) => v.name),
408
+ metrics: i.value.data.datasets.map((v) => v.name),
409
409
  variant: "doughnut",
410
410
  legend: {
411
411
  display: s(R).display ?? !0,
@@ -437,15 +437,15 @@ const Wa = /* @__PURE__ */ Ee({
437
437
  },
438
438
  emits: ["update:modelValue"],
439
439
  setup(e) {
440
- const l = Oe(e, "modelValue"), { t: u } = mt(), { compareDateRange: a, defaultDateSetting: w } = $e(ct()), { country: x } = It(), R = C(() => {
441
- var i;
442
- return ((i = l.value.data) == null ? void 0 : i.value) || "";
440
+ const l = Oe(e, "modelValue"), { t: i } = mt(), { compareDateRange: a, defaultDateSetting: w } = $e(ct()), { country: x } = It(), R = C(() => {
441
+ var u;
442
+ return ((u = l.value.data) == null ? void 0 : u.value) || "";
443
443
  }), L = C(() => {
444
- const { data: i } = l.value;
445
- return i != null && i.comparison ? ta(R.value, i.comparison, x) : null;
444
+ const { data: u } = l.value;
445
+ return u != null && u.comparison ? ta(R.value, u.comparison, x) : null;
446
446
  });
447
- function z(i) {
448
- switch (i) {
447
+ function z(u) {
448
+ switch (u) {
449
449
  case zt.bar:
450
450
  return "bar";
451
451
  case zt.line:
@@ -455,19 +455,19 @@ const Wa = /* @__PURE__ */ Ee({
455
455
  }
456
456
  }
457
457
  const d = C(() => {
458
- var i;
459
- return (i = l.value.data) == null ? void 0 : i.sparkline;
460
- }), m = C(() => d.value.datasets.map((i) => ({
461
- label: i.name,
462
- data: i.values,
458
+ var u;
459
+ return (u = l.value.data) == null ? void 0 : u.sparkline;
460
+ }), m = C(() => d.value.datasets.map((u) => ({
461
+ label: u.name,
462
+ data: u.values,
463
463
  fill: !0,
464
464
  color: "#36a2eb"
465
465
  })));
466
- return (i, c) => {
466
+ return (u, c) => {
467
467
  var I;
468
468
  const S = q("FmIcon"), y = q("FmChip"), T = q("FmTooltip"), v = q("FmLineChart");
469
469
  return E(), ee("div", Ba, [
470
- Ye(i.$slots, "menu"),
470
+ Ye(u.$slots, "menu"),
471
471
  U("p", Ha, ze(R.value), 1),
472
472
  U("div", Oa, [
473
473
  O(T, {
@@ -480,7 +480,7 @@ const Wa = /* @__PURE__ */ Ee({
480
480
  L.value ? (E(), ie(y, {
481
481
  key: 0,
482
482
  icon: L.value.icon.name,
483
- class: Xe(`bg-${L.value.icon.tailwind}`),
483
+ class: Je(`bg-${L.value.icon.tailwind}`),
484
484
  compact: ""
485
485
  }, {
486
486
  default: ae(() => [
@@ -540,11 +540,11 @@ const Wa = /* @__PURE__ */ Ee({
540
540
  }
541
541
  }), ja = {};
542
542
  function Ga(e, l) {
543
- const u = q("FmMenuDivider");
544
- return E(), ie(u);
543
+ const i = q("FmMenuDivider");
544
+ return E(), ie(i);
545
545
  }
546
546
  const Xa = /* @__PURE__ */ Ea(ja, [["render", Ga]]), Ja = "mf-reporttable-dimension", Gt = Qt(Ja, () => {
547
- const e = p(0), l = p([]), u = p(!1), a = (h, n) => {
547
+ const e = p(0), l = p([]), i = p(!1), a = (h, n) => {
548
548
  e.value = h, x(h, n);
549
549
  }, w = (h, n, k, F) => {
550
550
  l[h] = n, l.value = [...l.value], R(h, n, k, F);
@@ -565,10 +565,10 @@ const Xa = /* @__PURE__ */ Ea(ja, [["render", Ga]]), Ja = "mf-reporttable-dimens
565
565
  F ? requestAnimationFrame(X) : X();
566
566
  }, L = () => {
567
567
  const h = document.querySelectorAll("th"), n = document.querySelectorAll("td"), k = document.querySelector("table");
568
- k == null || k.classList.add("table-fixed"), h.forEach((F) => F.classList.add("toggleEditResize")), n.forEach((F) => F.classList.add("toggleEditResize")), u.value = !0;
568
+ k == null || k.classList.add("table-fixed"), h.forEach((F) => F.classList.add("toggleEditResize")), n.forEach((F) => F.classList.add("toggleEditResize")), i.value = !0;
569
569
  }, z = () => {
570
570
  const h = document.querySelectorAll("th"), n = document.querySelectorAll("td"), k = document.querySelectorAll(".col-resize-handle"), F = document.querySelectorAll(".row-resize-handle");
571
- h.forEach((A) => A.classList.remove("toggleEditResize")), n.forEach((A) => A.classList.remove("toggleEditResize")), k.forEach((A) => A.remove()), F.forEach((A) => A.remove()), u.value = !1;
571
+ h.forEach((A) => A.classList.remove("toggleEditResize")), n.forEach((A) => A.classList.remove("toggleEditResize")), k.forEach((A) => A.remove()), F.forEach((A) => A.remove()), i.value = !1;
572
572
  }, d = () => {
573
573
  e.value = 0, l.value = [];
574
574
  }, m = (h, n) => {
@@ -581,7 +581,7 @@ const Xa = /* @__PURE__ */ Ea(ja, [["render", Ga]]), Ja = "mf-reporttable-dimens
581
581
  document.querySelectorAll(
582
582
  `thead th:nth-child(${h + 1}), tbody td:nth-child(${h + 1})`
583
583
  ).forEach((k) => k.classList.add("highlight-col"));
584
- }, i = (h) => {
584
+ }, u = (h) => {
585
585
  const n = document.querySelectorAll("thead tr"), k = document.querySelectorAll("tbody tr"), F = [...n, ...k];
586
586
  for (const A of F)
587
587
  h ? A.classList.add("highlight-hover-row") : A.classList.add("highlight-row");
@@ -625,7 +625,7 @@ const Xa = /* @__PURE__ */ Ea(ja, [["render", Ga]]), Ja = "mf-reporttable-dimens
625
625
  document.addEventListener("mousemove", N), document.addEventListener("mouseup", ue);
626
626
  }, T = (h) => {
627
627
  const n = h.clientY, k = h.target.closest("table"), F = e.value || 48;
628
- i(!1);
628
+ u(!1);
629
629
  const A = (G) => {
630
630
  const X = Math.max(30, F + (G.clientY - n));
631
631
  k && a(X, k);
@@ -637,7 +637,7 @@ const Xa = /* @__PURE__ */ Ea(ja, [["render", Ga]]), Ja = "mf-reporttable-dimens
637
637
  return {
638
638
  rowHeight: e,
639
639
  colWidths: l,
640
- isEditing: u,
640
+ isEditing: i,
641
641
  updateRowHeight: a,
642
642
  updateColWidth: w,
643
643
  setRowHeights: x,
@@ -646,7 +646,7 @@ const Xa = /* @__PURE__ */ Ea(ja, [["render", Ga]]), Ja = "mf-reporttable-dimens
646
646
  disableEditMode: z,
647
647
  resetStore: d,
648
648
  highlightCol: m,
649
- highlightRows: i,
649
+ highlightRows: u,
650
650
  removeRowHighlight: c,
651
651
  removeColHighlight: S,
652
652
  resizeCol: y,
@@ -658,7 +658,7 @@ const Xa = /* @__PURE__ */ Ea(ja, [["render", Ga]]), Ja = "mf-reporttable-dimens
658
658
  const X = document.createElement("div");
659
659
  return X.className = `${B}-resize-handle`, B === "col" ? (X.addEventListener("mouseenter", () => m(G, !0)), X.addEventListener("mouseleave", () => S(!0)), X.addEventListener("mousedown", (le) => {
660
660
  le.stopPropagation(), y(le, G);
661
- })) : (X.addEventListener("mouseenter", () => i(!0)), X.addEventListener("mouseleave", () => c(!0)), X.addEventListener("mousedown", (le) => {
661
+ })) : (X.addEventListener("mouseenter", () => u(!0)), X.addEventListener("mouseleave", () => c(!0)), X.addEventListener("mousedown", (le) => {
662
662
  le.stopPropagation(), T(le);
663
663
  })), X;
664
664
  };
@@ -678,8 +678,8 @@ const Xa = /* @__PURE__ */ Ea(ja, [["render", Ga]]), Ja = "mf-reporttable-dimens
678
678
  function Lt(e) {
679
679
  if (e == null || e === "")
680
680
  return "";
681
- const l = String(e), u = Number(l);
682
- if (isNaN(u)) return l;
681
+ const l = String(e), i = Number(l);
682
+ if (isNaN(i)) return l;
683
683
  const [a, w] = l.split("."), x = new Intl.NumberFormat("en-US").format(Number(a));
684
684
  return w !== void 0 ? `${x}.${w}` : x;
685
685
  }
@@ -696,7 +696,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
696
696
  }),
697
697
  emits: ["update:modelValue"],
698
698
  setup(e) {
699
- const { t: l, te: u } = mt(), a = Oe(e, "modelValue"), { country: w } = It(), { clearTileSorts: x, setTileSorts: R } = Ca(), L = Wt(), z = e, d = p([]), { isEditing: m, colWidths: i, rowHeight: c } = $e(Gt()), { setColWidths: S, setRowHeights: y, enableCellResizing: T } = Gt(), v = p(null), I = C(() => {
699
+ const { t: l, te: i } = mt(), a = Oe(e, "modelValue"), { country: w } = It(), { clearTileSorts: x, setTileSorts: R } = Ca(), L = Wt(), z = e, d = p([]), { isEditing: m, colWidths: u, rowHeight: c } = $e(Gt()), { setColWidths: S, setRowHeights: y, enableCellResizing: T } = Gt(), v = p(null), I = C(() => {
700
700
  var b;
701
701
  return ((b = a.value.data) == null ? void 0 : b.columns) || [{ label: "", key: "" }];
702
702
  }), h = C(() => {
@@ -738,7 +738,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
738
738
  });
739
739
  break;
740
740
  }
741
- return b.length > 0 && b[0].main === "" && (b[0].main = "Grand total"), b;
741
+ return b.length > 0 && b[0].main === "" && (b[0].main = Ge(l, i, "Grand Total", "other")), b;
742
742
  });
743
743
  function B(b) {
744
744
  let $ = (b == null ? void 0 : b.main) || "";
@@ -750,7 +750,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
750
750
  difference: ta(b.main, b.comparison, w)
751
751
  };
752
752
  }
753
- Je(() => {
753
+ Ke(() => {
754
754
  x();
755
755
  });
756
756
  const G = p([]);
@@ -813,20 +813,20 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
813
813
  function De(b) {
814
814
  const $ = d.value.find((j) => j.key === b);
815
815
  if (!$) {
816
- d.value.push({ key: b, type: lt.Asc });
816
+ d.value.push({ key: b, type: st.Asc });
817
817
  return;
818
818
  }
819
- $.type === lt.Asc ? $.type = lt.Desc : $.type === lt.Desc && (d.value = d.value.filter((j) => j.key !== b));
819
+ $.type === st.Asc ? $.type = st.Desc : $.type === st.Desc && (d.value = d.value.filter((j) => j.key !== b));
820
820
  }
821
821
  const Le = C(
822
822
  () => {
823
823
  var b;
824
- return (((b = a.value.colWidths) == null ? void 0 : b.length) ?? 0) > 0 || i.value.length > 0;
824
+ return (((b = a.value.colWidths) == null ? void 0 : b.length) ?? 0) > 0 || u.value.length > 0;
825
825
  }
826
826
  ), _e = C(() => {
827
827
  var b;
828
828
  return (b = a.value.data) != null && b.columns ? a.value.data.columns.map(($) => {
829
- const j = st(l, u, $.label, "other"), W = d.value.find((ue) => ue.key === $.key), H = !!W, N = H ? W.type === lt.Asc ? "arrow_upward" : "arrow_downward" : "unfold_more";
829
+ const j = Ge(l, i, $.label, "other"), W = d.value.find((ue) => ue.key === $.key), H = !!W, N = H ? W.type === st.Asc ? "arrow_upward" : "arrow_downward" : "unfold_more";
830
830
  return {
831
831
  accessorKey: $.key,
832
832
  header: () => {
@@ -874,7 +874,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
874
874
  }) : [];
875
875
  });
876
876
  return fe(
877
- () => i.value.length > 0,
877
+ () => u.value.length > 0,
878
878
  async (b) => {
879
879
  b && m.value && (await ke(), T());
880
880
  }
@@ -889,7 +889,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
889
889
  if (!$) return;
890
890
  $.classList.add(Le.value ? "table-fixed" : "table-auto");
891
891
  let j, W;
892
- m.value ? (T(), j = i.value, W = c.value) : (W = a.value.rowHeight, j = a.value.colWidths), typeof W == "number" && y(W, b), j == null || j.forEach((N, ue) => {
892
+ m.value ? (T(), j = u.value, W = c.value) : (W = a.value.rowHeight, j = a.value.colWidths), typeof W == "number" && y(W, b), j == null || j.forEach((N, ue) => {
893
893
  S(ue, N, b);
894
894
  });
895
895
  },
@@ -919,7 +919,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
919
919
  class: "h-[48px] text-fm-color-typo-primary px-16"
920
920
  }, [
921
921
  U("span", {
922
- class: Xe([
922
+ class: Je([
923
923
  "items-center text-fm-color-typo-secondary gap-2",
924
924
  W.rowType === "NUMERIC" ? "text-right" : "",
925
925
  Le.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
@@ -947,14 +947,14 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
947
947
  }),
948
948
  emits: ["update:modelValue"],
949
949
  setup(e) {
950
- const l = e, u = Oe(e, "modelValue"), a = p(null), w = C(() => {
950
+ const l = e, i = Oe(e, "modelValue"), a = p(null), w = C(() => {
951
951
  var I;
952
- return ((I = u.value.data) == null ? void 0 : I.xAxis) || [];
952
+ return ((I = i.value.data) == null ? void 0 : I.xAxis) || [];
953
953
  }), x = C(() => {
954
954
  var v;
955
- return ((v = u.value.data) == null ? void 0 : v.datasets) ?? [];
956
- }), { datalabels: R, xCfg: L, yCfg: z, isTransposed: d, legend: m, chartWidth: i, chartHeight: c } = pt(
957
- u.value
955
+ return ((v = i.value.data) == null ? void 0 : v.datasets) ?? [];
956
+ }), { datalabels: R, xCfg: L, yCfg: z, isTransposed: d, legend: m, chartWidth: u, chartHeight: c } = pt(
957
+ i.value
958
958
  ), S = C(() => x.value.length > 0 ? [
959
959
  ...x.value.map((v, I) => {
960
960
  let h = v.values;
@@ -969,7 +969,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
969
969
  function T() {
970
970
  return y.extractChartSize(a.value, l.tileIndex) || { width: 0, height: 0 };
971
971
  }
972
- return Je(() => {
972
+ return Ke(() => {
973
973
  ke(() => {
974
974
  T();
975
975
  });
@@ -999,7 +999,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
999
999
  datalabels: s(R),
1000
1000
  "maintain-aspect-ratio": !1,
1001
1001
  style: He({
1002
- "--chart-width": s(i) !== void 0 ? s(i) + "px" : "100%",
1002
+ "--chart-width": s(u) !== void 0 ? s(u) + "px" : "100%",
1003
1003
  "--chart-height": s(c) !== void 0 ? s(c) + "px" : "calc(100% - 36px)"
1004
1004
  })
1005
1005
  }, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
@@ -1017,13 +1017,13 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
1017
1017
  emits: ["update:modelValue"],
1018
1018
  setup(e) {
1019
1019
  var h;
1020
- const l = e, u = Oe(e, "modelValue"), a = ((h = u.value.data) == null ? void 0 : h.xAxis) ?? [], w = C(
1020
+ const l = e, i = Oe(e, "modelValue"), a = ((h = i.value.data) == null ? void 0 : h.xAxis) ?? [], w = C(
1021
1021
  () => a.length === 1 && L.value.length > 0 && L.value.every((n) => n.values.length === 1)
1022
1022
  ), x = C(() => w.value ? ["", a[0], ""] : a), R = p(null), L = C(() => {
1023
1023
  var n;
1024
- return ((n = u.value.data) == null ? void 0 : n.datasets) ?? [];
1025
- }), { datalabels: z, xCfg: d, yCfg: m, isTransposed: i, legend: c, chartWidth: S, chartHeight: y } = pt(
1026
- u.value
1024
+ return ((n = i.value.data) == null ? void 0 : n.datasets) ?? [];
1025
+ }), { datalabels: z, xCfg: d, yCfg: m, isTransposed: u, legend: c, chartWidth: S, chartHeight: y } = pt(
1026
+ i.value
1027
1027
  ), T = C(() => L.value.length > 0 ? [
1028
1028
  ...L.value.map((n, k) => {
1029
1029
  let F = n.values;
@@ -1044,7 +1044,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
1044
1044
  function I() {
1045
1045
  return v.extractChartSize(R.value, l.tileIndex) || { width: 0, height: 0 };
1046
1046
  }
1047
- return Je(() => {
1047
+ return Ke(() => {
1048
1048
  ke(() => {
1049
1049
  I();
1050
1050
  });
@@ -1062,7 +1062,7 @@ const Ka = "/assets/processTableData.worker-DS6uNX_h.js", Za = { class: "my-4" }
1062
1062
  "x-axis": { categories: x.value },
1063
1063
  "x-cfg": s(d),
1064
1064
  "y-cfg": s(m),
1065
- transpose: s(i),
1065
+ transpose: s(u),
1066
1066
  legend: {
1067
1067
  display: s(c).display ?? !1,
1068
1068
  position: s(c).position,
@@ -1115,13 +1115,13 @@ const il = /* @__PURE__ */ Ee({
1115
1115
  emits: ["update:modelValue"],
1116
1116
  setup(e) {
1117
1117
  var h;
1118
- const l = e, u = Oe(e, "modelValue"), a = ((h = u.value.data) == null ? void 0 : h.xAxis) ?? [], w = C(
1118
+ const l = e, i = Oe(e, "modelValue"), a = ((h = i.value.data) == null ? void 0 : h.xAxis) ?? [], w = C(
1119
1119
  () => a.length === 1 && L.value.length > 0 && L.value.every((n) => n.values.length === 1)
1120
1120
  ), x = C(() => w.value ? ["", a[0], ""] : a), R = p(null), L = C(() => {
1121
1121
  var n;
1122
- return ((n = u.value.data) == null ? void 0 : n.datasets) ?? [];
1123
- }), { datalabels: z, xCfg: d, yCfg: m, isTransposed: i, legend: c, chartWidth: S, chartHeight: y } = pt(
1124
- u.value
1122
+ return ((n = i.value.data) == null ? void 0 : n.datasets) ?? [];
1123
+ }), { datalabels: z, xCfg: d, yCfg: m, isTransposed: u, legend: c, chartWidth: S, chartHeight: y } = pt(
1124
+ i.value
1125
1125
  ), T = C(() => L.value.length > 0 ? [
1126
1126
  ...L.value.map((n, k) => {
1127
1127
  let F = n.values;
@@ -1142,7 +1142,7 @@ const il = /* @__PURE__ */ Ee({
1142
1142
  function I() {
1143
1143
  return v.extractChartSize(R.value, l.tileIndex) || { width: 0, height: 0 };
1144
1144
  }
1145
- return Je(() => {
1145
+ return Ke(() => {
1146
1146
  ke(() => {
1147
1147
  I();
1148
1148
  });
@@ -1160,7 +1160,7 @@ const il = /* @__PURE__ */ Ee({
1160
1160
  "x-axis": { categories: x.value },
1161
1161
  "x-cfg": s(d),
1162
1162
  "y-cfg": s(m),
1163
- transpose: s(i),
1163
+ transpose: s(u),
1164
1164
  legend: {
1165
1165
  display: s(c).display ?? !1,
1166
1166
  position: s(c).position,
@@ -1189,7 +1189,7 @@ const il = /* @__PURE__ */ Ee({
1189
1189
  }),
1190
1190
  emits: ["update:modelValue"],
1191
1191
  setup(e) {
1192
- const { t: l } = mt(), { FmForm: u } = $a, a = e, w = p(), x = Oe(e, "modelValue"), R = p(!0), L = p(!1), z = Wt(), { selectedLocationIds: d, dateRange: m, timeRange: i } = $e(ct()), c = p(Ft.PORTRAIT);
1192
+ const { t: l } = mt(), { FmForm: i } = $a, a = e, w = p(), x = Oe(e, "modelValue"), R = p(!0), L = p(!1), z = Wt(), { selectedLocationIds: d, dateRange: m, timeRange: u } = $e(ct()), c = p(Ft.PORTRAIT);
1193
1193
  function S() {
1194
1194
  var T;
1195
1195
  (T = w.value) == null || T.validateInputs();
@@ -1202,7 +1202,7 @@ const il = /* @__PURE__ */ Ee({
1202
1202
  index: a.index,
1203
1203
  orientationTypes: [c.value],
1204
1204
  isCombinedLocationLayout: R.value,
1205
- timeRange: i.value,
1205
+ timeRange: u.value,
1206
1206
  dateRange: m.value,
1207
1207
  locationIds: d.value
1208
1208
  });
@@ -1224,7 +1224,7 @@ const il = /* @__PURE__ */ Ee({
1224
1224
  Rt("Select Orientation")
1225
1225
  ])),
1226
1226
  default: ae(() => [
1227
- O(s(u), {
1227
+ O(s(i), {
1228
1228
  ref_key: "form",
1229
1229
  ref: w,
1230
1230
  onValidationSuccess: y
@@ -1300,7 +1300,7 @@ const il = /* @__PURE__ */ Ee({
1300
1300
  }),
1301
1301
  emits: ["update:modelValue"],
1302
1302
  setup(e) {
1303
- const l = p(!0), u = Oe(e, "modelValue"), a = u.value.widget.config, { t: w, te: x } = mt(), R = e, L = p(null), z = p(a.rollup), d = p(ut()), m = p(a.drillDimension), i = C(() => {
1303
+ const l = p(!0), i = Oe(e, "modelValue"), a = i.value.widget.config, { t: w, te: x } = mt(), R = e, L = p(null), z = p(a.rollup), d = p(ut()), m = p(a.drillDimension), u = C(() => {
1304
1304
  if (xe.value.length > 0) {
1305
1305
  const r = xe.value.findIndex(
1306
1306
  (Z) => Z.value === m.value
@@ -1308,8 +1308,8 @@ const il = /* @__PURE__ */ Ee({
1308
1308
  return r >= 0 ? r : 0;
1309
1309
  } else
1310
1310
  return -1;
1311
- }), c = C(() => i.value !== 0), S = C(
1312
- () => i.value != xe.value.length - 1
1311
+ }), c = C(() => u.value !== 0), S = C(
1312
+ () => u.value != xe.value.length - 1
1313
1313
  ), y = p(a.showTitle ?? !0), T = p(a.titleFontSize ?? 14), v = p(a.titleBold ?? !1), I = p(a.titleItalic ?? !1), h = p(a.titleUnderline ?? !1), n = p(a.chartWidth ?? void 0), k = p(a.chartHeight ?? void 0), F = p(a.showLabel ?? !1), A = p(a.labelAlign ?? $t.center), B = p(a.labelAnchor ?? At.center), G = p(a.labelRotation ?? 0), X = p(a.labelOffset ?? 0), le = p(a.labelFontSize ?? 12), ve = C(() => a.showSearchBar), we = p(a.showX ?? !0), De = p(a.xPosition ?? Et.bottom), Le = p(a.showXGrid ?? !1), _e = p(a.showXTick ?? !0), b = p(a.xTickFontSize ?? 12), $ = p(a.showXTitle ?? !1), j = p(a.xTitle ?? ""), W = p(a.xTitleFontSize ?? 12), H = p(a.showY ?? !0), N = p(a.yPosition ?? Mt.left), ue = p(a.showYGrid ?? !1), Te = p(a.showYTick ?? !0), ge = p(a.yTickFontSize ?? 12), Se = p(a.showYTitle ?? !1), ye = p(a.yTitle ?? ""), qe = p(a.yTitleFontSize ?? 12), Re = p(a.showLegend ?? void 0), Ve = p(a.legendPosition ?? Nt.top), t = p(a.usePointStyle ?? !0), f = p(a.legendMaxHeight), g = p(a.legendMaxWidth), _ = p(a.rowHeight ?? 0), D = p(a.colWidths ?? []), Q = p(!1), te = p(""), { breakpoints: se, getBreakpointsBoundary: Y } = ea(), V = p(), o = C(
1314
1314
  () => R.customScreenWidth === void 0 ? window.innerWidth : R.customScreenWidth
1315
1315
  ), me = C(
@@ -1317,16 +1317,16 @@ const il = /* @__PURE__ */ Ee({
1317
1317
  ), pe = C(
1318
1318
  () => (o == null ? void 0 : o.value) > Y("sm")[1] && (o == null ? void 0 : o.value) <= Y("md")[1]
1319
1319
  ), be = C(() => (o == null ? void 0 : o.value) > Y("md")[1]), ce = C(() => {
1320
- const r = u.value.size.width;
1320
+ const r = i.value.size.width;
1321
1321
  return be.value || pe.value ? ol(r) : me.value ? nl(r) : rl(r);
1322
1322
  }), ne = C(
1323
- () => Ma.find((r) => r.type === u.value.widget.type)
1323
+ () => Ma.find((r) => r.type === i.value.widget.type)
1324
1324
  ), J = Yt(() => {
1325
1325
  var r;
1326
1326
  V.value = la((r = L.value) == null ? void 0 : r.$el.offsetWidth), d.value = ut();
1327
1327
  }), Me = C(() => {
1328
1328
  if (Na(oe.value.type, de.value))
1329
- switch (u.value.widget.type) {
1329
+ switch (i.value.widget.type) {
1330
1330
  case M.BarChart:
1331
1331
  return Wa;
1332
1332
  case M.StackBarChart:
@@ -1355,10 +1355,10 @@ const il = /* @__PURE__ */ Ee({
1355
1355
  timeRange: nt,
1356
1356
  globalFilters: ht,
1357
1357
  isGlobalFiltersLoading: rt
1358
- } = $e(ct()), { businessId: ft } = $e(It()), { businessLoadedId: vt, businessDataVersion: Ke } = $e(ct());
1358
+ } = $e(ct()), { businessId: ft } = $e(It()), { businessLoadedId: vt, businessDataVersion: Ze } = $e(ct());
1359
1359
  C(() => vt.value === ft.value && Ne.value.length > 0 && !rt.value);
1360
1360
  const gt = p(!0), oe = C(() => {
1361
- const r = JSON.parse(JSON.stringify(u.value.widget));
1361
+ const r = JSON.parse(JSON.stringify(i.value.widget));
1362
1362
  return {
1363
1363
  ...r,
1364
1364
  config: {
@@ -1432,16 +1432,16 @@ const il = /* @__PURE__ */ Ee({
1432
1432
  return { data: de.value };
1433
1433
  }
1434
1434
  }), re = C(() => {
1435
- const { config: r } = u.value.widget;
1435
+ const { config: r } = i.value.widget;
1436
1436
  if (r.rollup != null) {
1437
1437
  const Z = [...r.dimensions].filter((Ie) => !Ie.hide);
1438
1438
  return Z.sort(
1439
1439
  (Ie, it) => (r.rowIds || []).indexOf(Dt(Ie)) - (r.rowIds || []).indexOf(Dt(it))
1440
1440
  ), [
1441
- { label: st(w, x, "None", "other"), value: "none" },
1442
- { label: st(w, x, "Grand Total", "other"), value: 0 },
1441
+ { label: Ge(w, x, "None", "other"), value: "none" },
1442
+ { label: Ge(w, x, "Grand Total", "other"), value: 0 },
1443
1443
  ...[...Z].slice(0, Z.length - 1).map((Ie, it) => ({
1444
- label: st(w, x, Ie.label, "other"),
1444
+ label: Ge(w, x, Ie.label, "other"),
1445
1445
  value: it + 1
1446
1446
  }))
1447
1447
  ];
@@ -1450,23 +1450,23 @@ const il = /* @__PURE__ */ Ee({
1450
1450
  }), xe = C(() => {
1451
1451
  const { config: r } = oe.value;
1452
1452
  return r.isDrillable ? r.dimensions.map((Z) => ({
1453
- label: st(w, x, Z.label, "other"),
1453
+ label: Ge(w, x, Z.label, "other"),
1454
1454
  value: Dt(Z)
1455
1455
  })) : [];
1456
1456
  }), wt = C(() => {
1457
- const r = u.value.id;
1457
+ const r = i.value.id;
1458
1458
  return (ht.value || []).filter(
1459
1459
  (Z) => Array.isArray(Z.tileIds) && Z.tileIds.includes(r)
1460
1460
  );
1461
1461
  });
1462
1462
  fe(
1463
- () => u.value.widget.config,
1463
+ () => i.value.widget.config,
1464
1464
  (r) => {
1465
1465
  z.value = r.rollup, y.value = r.showTitle ?? !0, T.value = r.titleFontSize ?? 14, v.value = r.titleBold ?? !1, I.value = r.titleItalic ?? !1, h.value = r.titleUnderline ?? !1, k.value = r.chartHeight ?? void 0, n.value = r.chartWidth ?? void 0, F.value = r.showLabel ?? !1, A.value = r.labelAlign ?? $t.center, B.value = r.labelAnchor ?? At.center, G.value = r.labelRotation ?? 0, X.value = r.labelOffset ?? 0, le.value = r.labelFontSize ?? 12, we.value = r.showX ?? !0, De.value = r.xPosition ?? Et.bottom, Le.value = r.showXGrid ?? !1, _e.value = r.showXTick ?? !0, b.value = r.xTickFontSize ?? 12, $.value = r.showXTitle ?? !1, j.value = r.xTitle ?? "", W.value = r.xTitleFontSize ?? 12, H.value = r.showY ?? !0, N.value = r.yPosition ?? Mt.left, ue.value = r.showYGrid ?? !1, Te.value = r.showYTick ?? !0, ge.value = r.yTickFontSize ?? 12, Se.value = r.showYTitle ?? !1, ye.value = r.yTitle ?? "", qe.value = r.yTitleFontSize ?? 12, Re.value = r.showLegend ?? void 0, Ve.value = r.legendPosition ?? Nt.top, t.value = r.usePointStyle ?? !0, f.value = r.legendMaxHeight, g.value = r.legendMaxWidth, _.value = r.rowHeight ?? 0, D.value = r.colWidths ?? [];
1466
1466
  },
1467
1467
  { deep: !0 }
1468
1468
  ), fe([() => z.value], () => {
1469
- z.value !== null && (u.value.widget.config.rollup = z.value);
1469
+ z.value !== null && (i.value.widget.config.rollup = z.value);
1470
1470
  }), fe(
1471
1471
  [
1472
1472
  () => oe.value,
@@ -1475,25 +1475,25 @@ const il = /* @__PURE__ */ Ee({
1475
1475
  () => kt.value,
1476
1476
  () => Ne.value,
1477
1477
  () => wt.value,
1478
- () => Ke.value
1478
+ () => Ze.value
1479
1479
  ],
1480
1480
  () => {
1481
1481
  Pt();
1482
1482
  },
1483
1483
  { deep: !0 }
1484
1484
  ), fe(
1485
- [() => u.value.size],
1485
+ [() => i.value.size],
1486
1486
  () => {
1487
1487
  J();
1488
1488
  },
1489
1489
  { deep: !0 }
1490
- ), Je(() => {
1490
+ ), Ke(() => {
1491
1491
  J(), se.value.sm || se.value.md || se.value.xs ? (console.log("Ignoring resize event due to keyboard"), addEventListener("change", J)) : addEventListener("resize", J), Pt();
1492
1492
  }), ya(() => {
1493
1493
  se.value.sm || se.value.md || se.value.xs ? (console.log("Ignoring resize event due to keyboard"), removeEventListener("change", J)) : removeEventListener("resize", J);
1494
1494
  });
1495
1495
  const St = Wt();
1496
- let Ze;
1496
+ let Qe;
1497
1497
  async function Pt() {
1498
1498
  if (oe.value.config.schemaNames.length <= 0 && !(oe.value.config.dimensions.length <= 0 || oe.value.config.metrics.length <= 0)) {
1499
1499
  St.open({
@@ -1503,44 +1503,44 @@ const il = /* @__PURE__ */ Ee({
1503
1503
  return;
1504
1504
  }
1505
1505
  try {
1506
- l.value = !0, Ze && Ze.abort(), Ze = new AbortController();
1507
- const r = Ze.signal, Z = Ke.value, Ie = await Yt(Zt, 500)(oe.value, r, u.value.id);
1508
- Ke.value === Z && (de.value = Ie, d.value = ut()), l.value = !1;
1506
+ l.value = !0, Qe && Qe.abort(), Qe = new AbortController();
1507
+ const r = Qe.signal, Z = Ze.value, Ie = await Yt(Zt, 500)(oe.value, r, i.value.id);
1508
+ Ze.value === Z && (de.value = Ie, d.value = ut()), l.value = !1;
1509
1509
  } catch (r) {
1510
1510
  r.code !== "ERR_CANCELED" && (de.value = null, St.open({ message: `Invalid chart ${oe.value.type}`, type: "error" }), console.log(r), l.value = !1);
1511
1511
  }
1512
1512
  }
1513
1513
  function la(r) {
1514
- switch (u.value.widget.type) {
1514
+ switch (i.value.widget.type) {
1515
1515
  case "SPACER":
1516
1516
  return;
1517
1517
  case "SCORECARD":
1518
1518
  return;
1519
1519
  case "TABLE":
1520
- return `${u.value.size.height * 100 + (ve.value ? 72 : 0) + 96.5}px`;
1520
+ return `${i.value.size.height * 100 + (ve.value ? 72 : 0) + 96.5}px`;
1521
1521
  }
1522
- return `${Math.max(r / u.value.size.width, 90) * u.value.size.height}px`;
1522
+ return `${Math.max(r / i.value.size.width, 90) * i.value.size.height}px`;
1523
1523
  }
1524
1524
  function sa() {
1525
- const r = i.value - 1;
1525
+ const r = u.value - 1;
1526
1526
  r >= 0 && (m.value = xe.value[r].value);
1527
1527
  }
1528
1528
  function oa() {
1529
- const r = i.value + 1;
1529
+ const r = u.value + 1;
1530
1530
  r >= 0 && r < xe.value.length && (m.value = xe.value[r].value);
1531
1531
  }
1532
- const Bt = p(et.EXCEL), Ht = p(), na = Object.values(et).map((r) => ({
1532
+ const Bt = p(tt.EXCEL), Ht = p(), na = Object.values(tt).map((r) => ({
1533
1533
  label: _a(r),
1534
1534
  value: r,
1535
1535
  onClick: async () => {
1536
- r === et.EXCEL || r === et.PDFFULLSIZE || r === et.PDFRECEIPT ? await Kt({
1536
+ r === tt.EXCEL || r === tt.PDFFULLSIZE || r === tt.PDFRECEIPT ? await Kt({
1537
1537
  reportType: r,
1538
1538
  index: R.index,
1539
1539
  isCombinedLocationLayout: gt.value,
1540
1540
  timeRange: nt.value,
1541
1541
  dateRange: K.value,
1542
1542
  locationIds: Ne.value
1543
- }) : r === et.PDF && (Bt.value = r, Ht.value = R.index, Q.value = !0);
1543
+ }) : r === tt.PDF && (Bt.value = r, Ht.value = R.index, Q.value = !0);
1544
1544
  }
1545
1545
  })), ra = oe.value.type === M.Spacer ? "flat" : "outlined", ia = oe.value.type === M.Spacer ? "p-0" : "p-16";
1546
1546
  return (r, Z) => {
@@ -1548,13 +1548,13 @@ const il = /* @__PURE__ */ Ee({
1548
1548
  return E(), ie(fa, {
1549
1549
  ref_key: "tileCard",
1550
1550
  ref: L,
1551
- class: Xe(`${ce.value} ${s(ia)}`),
1551
+ class: Je(`${ce.value} ${s(ia)}`),
1552
1552
  variant: s(ra)
1553
1553
  }, {
1554
1554
  default: ae(() => [
1555
1555
  O(dl, {
1556
1556
  modelValue: Q.value,
1557
- "onUpdate:modelValue": Z[0] || (Z[0] = (Qe) => Q.value = Qe),
1557
+ "onUpdate:modelValue": Z[0] || (Z[0] = (et) => Q.value = et),
1558
1558
  "report-type": Bt.value,
1559
1559
  index: Ht.value
1560
1560
  }, null, 8, ["modelValue", "report-type", "index"]),
@@ -1565,13 +1565,13 @@ const il = /* @__PURE__ */ Ee({
1565
1565
  (E(), ie(ba(Me.value), {
1566
1566
  key: d.value,
1567
1567
  modelValue: P.value,
1568
- "onUpdate:modelValue": Z[4] || (Z[4] = (Qe) => P.value = Qe),
1568
+ "onUpdate:modelValue": Z[4] || (Z[4] = (et) => P.value = et),
1569
1569
  "tile-index": R.index
1570
1570
  }, {
1571
1571
  menu: ae(() => [
1572
1572
  O(pa, { class: "flex items-center gap-2" }, {
1573
1573
  default: ae(() => {
1574
- var Qe, Ot, qt, Ut;
1574
+ var et, Ot, qt, Ut;
1575
1575
  return [
1576
1576
  O(Ie, {
1577
1577
  variant: "plain",
@@ -1589,15 +1589,15 @@ const il = /* @__PURE__ */ Ee({
1589
1589
  fontStyle: I.value ? "italic" : "normal",
1590
1590
  textDecoration: h.value ? "underline" : "none"
1591
1591
  }),
1592
- class: Xe(["text-fm-color-typo-secondary line-clamp-1", [
1592
+ class: Je(["text-fm-color-typo-secondary line-clamp-1", [
1593
1593
  T.value <= 18 ? "fm-typo-en-body-md-400" : "",
1594
1594
  oe.value.description ? "border-b-2 border-dashed border-gray-300" : ""
1595
1595
  ]])
1596
- }, ze(s(st)(s(w), s(x), oe.value.title, "other")), 7)) : Ae("", !0)
1596
+ }, ze(s(Ge)(s(w), s(x), oe.value.title, "other")), 7)) : Ae("", !0)
1597
1597
  ]),
1598
1598
  _: 1
1599
1599
  }, 8, ["content", "disabled"]),
1600
- (Qe = ne.value) != null && Qe.showSearchBar ? (E(), ie(it, {
1600
+ (et = ne.value) != null && et.showSearchBar ? (E(), ie(it, {
1601
1601
  key: 0,
1602
1602
  modelValue: te.value,
1603
1603
  "onUpdate:modelValue": Z[1] || (Z[1] = (We) => te.value = We),
@@ -1665,39 +1665,39 @@ const il = /* @__PURE__ */ Ee({
1665
1665
  };
1666
1666
  }
1667
1667
  });
1668
- var Ge = /* @__PURE__ */ ((e) => (e.Select = "Select", e.TextField = "TextField", e.Timestamp = "Timestamp", e))(Ge || {});
1668
+ var Xe = /* @__PURE__ */ ((e) => (e.Select = "Select", e.TextField = "TextField", e.Timestamp = "Timestamp", e))(Xe || {});
1669
1669
  function hl(e) {
1670
- let l = !1, u = 1;
1670
+ let l = !1, i = 1;
1671
1671
  switch (e) {
1672
1672
  case Fe.Equal:
1673
1673
  case Fe.NotEqual:
1674
1674
  case Fe.Like:
1675
1675
  case Fe.NotLike:
1676
- l = !1, u = 1;
1676
+ l = !1, i = 1;
1677
1677
  break;
1678
1678
  case Fe.GreaterThan:
1679
1679
  case Fe.GreaterThanOrEqual:
1680
1680
  case Fe.LessThan:
1681
1681
  case Fe.LessThanOrEqual:
1682
- l = !0, u = 1;
1682
+ l = !0, i = 1;
1683
1683
  break;
1684
1684
  case Fe.Between:
1685
- l = !0, u = 2;
1685
+ l = !0, i = 2;
1686
1686
  break;
1687
1687
  }
1688
1688
  return {
1689
1689
  fixed: l,
1690
- count: u
1690
+ count: i
1691
1691
  };
1692
1692
  }
1693
1693
  function Ol({
1694
1694
  operator: e,
1695
1695
  dimensionOption: l,
1696
- dataType: u,
1696
+ dataType: i,
1697
1697
  t: a
1698
1698
  }) {
1699
1699
  const { fixed: w, count: x } = hl(e);
1700
- switch (u) {
1700
+ switch (i) {
1701
1701
  case Pe.String:
1702
1702
  return {
1703
1703
  type: "TextField",
@@ -1764,15 +1764,15 @@ function Ul(e) {
1764
1764
  function aa({
1765
1765
  dimensionOption: e,
1766
1766
  fixed: l,
1767
- count: u,
1767
+ count: i,
1768
1768
  t: a
1769
1769
  }) {
1770
1770
  switch (e) {
1771
1771
  case he.HourOfDay:
1772
1772
  return {
1773
- type: Ge.Select,
1773
+ type: Xe.Select,
1774
1774
  fixed: l,
1775
- count: u,
1775
+ count: i,
1776
1776
  options: Array.from({ length: 24 }, (w, x) => ({
1777
1777
  label: x.toString().padStart(2, "0"),
1778
1778
  value: x.toString()
@@ -1781,9 +1781,9 @@ function aa({
1781
1781
  };
1782
1782
  case he.DayOfWeek:
1783
1783
  return {
1784
- type: Ge.Select,
1784
+ type: Xe.Select,
1785
1785
  fixed: l,
1786
- count: u,
1786
+ count: i,
1787
1787
  options: [
1788
1788
  { label: a("report.days.sunday"), value: "1" },
1789
1789
  { label: a("report.days.monday"), value: "2" },
@@ -1797,9 +1797,9 @@ function aa({
1797
1797
  };
1798
1798
  case he.DayOfMonth:
1799
1799
  return {
1800
- type: Ge.Select,
1800
+ type: Xe.Select,
1801
1801
  fixed: l,
1802
- count: u,
1802
+ count: i,
1803
1803
  options: Array.from({ length: 31 }, (w, x) => ({
1804
1804
  label: (x + 1).toString(),
1805
1805
  value: (x + 1).toString()
@@ -1808,9 +1808,9 @@ function aa({
1808
1808
  };
1809
1809
  case he.MonthOfYear:
1810
1810
  return {
1811
- type: Ge.Select,
1811
+ type: Xe.Select,
1812
1812
  fixed: l,
1813
- count: u,
1813
+ count: i,
1814
1814
  options: [
1815
1815
  { label: a("report.months.january"), value: "1" },
1816
1816
  { label: a("report.months.february"), value: "2" },
@@ -1829,9 +1829,9 @@ function aa({
1829
1829
  };
1830
1830
  default:
1831
1831
  return {
1832
- type: Ge.Timestamp,
1832
+ type: Xe.Timestamp,
1833
1833
  fixed: l,
1834
- count: u,
1834
+ count: i,
1835
1835
  default: (/* @__PURE__ */ new Date()).toISOString()
1836
1836
  };
1837
1837
  }
@@ -1840,51 +1840,51 @@ function Xt({
1840
1840
  dimensionOption: e,
1841
1841
  t: l
1842
1842
  }) {
1843
- const u = aa({
1843
+ const i = aa({
1844
1844
  dimensionOption: e,
1845
1845
  fixed: !1,
1846
1846
  count: 1,
1847
1847
  t: l
1848
1848
  });
1849
- return u.type === Ge.Select ? u.options : [];
1849
+ return i.type === Xe.Select ? i.options : [];
1850
1850
  }
1851
1851
  const fl = "mf-reportglobalFilter";
1852
- function at(e) {
1852
+ function lt(e) {
1853
1853
  return `${e.schemaName}:${e.name}:${e.operator}`;
1854
1854
  }
1855
1855
  const Jt = Qt(fl, () => {
1856
- const e = p({}), l = p(!1), u = () => ({
1856
+ const e = p({}), l = p(!1), i = () => ({
1857
1857
  search: "",
1858
1858
  selectedValues: [],
1859
1859
  keepSelection: !1,
1860
1860
  showAdvanced: !1,
1861
1861
  visibleCount: 50
1862
1862
  });
1863
- function a(i) {
1864
- return e.value[i] || (e.value[i] = u()), e.value[i];
1863
+ function a(u) {
1864
+ return e.value[u] || (e.value[u] = i()), e.value[u];
1865
1865
  }
1866
- function w(i) {
1867
- const c = at(i);
1866
+ function w(u) {
1867
+ const c = lt(u);
1868
1868
  return a(c);
1869
1869
  }
1870
- function x(i, c) {
1871
- const S = at(i), y = a(S);
1870
+ function x(u, c) {
1871
+ const S = lt(u), y = a(S);
1872
1872
  y.selectedValues = [...c];
1873
1873
  }
1874
- function R(i, c) {
1875
- const S = at(i), y = a(S);
1874
+ function R(u, c) {
1875
+ const S = lt(u), y = a(S);
1876
1876
  y.search = c;
1877
1877
  }
1878
- function L(i, c) {
1879
- const S = at(i), y = a(S);
1878
+ function L(u, c) {
1879
+ const S = lt(u), y = a(S);
1880
1880
  y.keepSelection = c;
1881
1881
  }
1882
- function z(i, c) {
1883
- const S = at(i), y = a(S);
1882
+ function z(u, c) {
1883
+ const S = lt(u), y = a(S);
1884
1884
  y.showAdvanced = c;
1885
1885
  }
1886
- function d(i, c = 50) {
1887
- const S = at(i), y = a(S);
1886
+ function d(u, c = 50) {
1887
+ const S = lt(u), y = a(S);
1888
1888
  y.visibleCount += c;
1889
1889
  }
1890
1890
  return {
@@ -1903,8 +1903,8 @@ const Jt = Qt(fl, () => {
1903
1903
  }, bl = { class: "px-2 pb-8" }, wl = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Sl = { class: "px-2 pb-8" }, xl = { class: "flex items-start w-full" }, Cl = ["onClick"], kl = { class: "fm-typo-en-body-md-400" }, _l = { key: 0 }, Tl = { class: "px-12 py-3" }, Fl = { class: "flex items-center justify-between" }, Dl = ["onClick"], Ll = { class: "fm-typo-en-body-md-400" }, Rl = { class: "text-xs max-w-[200px]" }, Vl = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Yl = /* @__PURE__ */ Ee({
1904
1904
  __name: "FilterSelector",
1905
1905
  setup(e) {
1906
- const { t: l, locale: u } = mt(), { currentReport: a, editingReport: w, editingTile: x } = $e(Ta());
1907
- let { globalFilters: R, isGlobalFiltersLoading: L, timeRange: z, dateRange: d, selectedLocationIds: m } = $e(ct()), { schemas: i } = $e(Fa()), {
1906
+ const { t: l, locale: i } = mt(), { currentReport: a, editingReport: w, editingTile: x } = $e(Ta());
1907
+ let { globalFilters: R, isGlobalFiltersLoading: L, timeRange: z, dateRange: d, selectedLocationIds: m } = $e(ct()), { schemas: u } = $e(Fa()), {
1908
1908
  increaseVisibleCount: c,
1909
1909
  setSelectedValues: S,
1910
1910
  setKeepSelection: y,
@@ -1983,7 +1983,7 @@ const Jt = Qt(fl, () => {
1983
1983
  var ve = void 0;
1984
1984
  function we(t) {
1985
1985
  var g;
1986
- const f = (g = i.value.find((_) => _.name === t.schemaName)) == null ? void 0 : g.fields.find((_) => _.name === t.name);
1986
+ const f = (g = u.value.find((_) => _.name === t.schemaName)) == null ? void 0 : g.fields.find((_) => _.name === t.name);
1987
1987
  return f == null ? void 0 : f.type;
1988
1988
  }
1989
1989
  function De(t) {
@@ -2002,7 +2002,7 @@ const Jt = Qt(fl, () => {
2002
2002
  return o || me || pe;
2003
2003
  });
2004
2004
  return Q.length === 0 ? [] : (Q.forEach((Y) => {
2005
- var nt, ht, rt, ft, vt, Ke, gt, oe, yt, bt;
2005
+ var nt, ht, rt, ft, vt, Ze, gt, oe, yt, bt;
2006
2006
  const V = (nt = Y == null ? void 0 : Y.widget) == null ? void 0 : nt.config;
2007
2007
  if (!V) return;
2008
2008
  const o = {
@@ -2019,16 +2019,16 @@ const Jt = Qt(fl, () => {
2019
2019
  }, me = {
2020
2020
  name: _,
2021
2021
  schemaName: D,
2022
- type: lt.Asc,
2022
+ type: st.Asc,
2023
2023
  aggregation: null,
2024
2024
  dimensionOption: null
2025
2025
  }, pe = ((V == null ? void 0 : V.dimensions) ?? []).some((P) => P.schemaName === D) || ((V == null ? void 0 : V.schemaNames) ?? []).some((P) => P === D), be = ((V == null ? void 0 : V.joinDatasources) ?? []).find(
2026
2026
  (P) => (P.schemaNames ?? []).some((re) => re === D) || (P.dimensions ?? []).some((re) => re.schemaName === D)
2027
- ), ce = pe ? [o] : [], ne = ((gt = (Ke = Y == null ? void 0 : Y.widget) == null ? void 0 : Ke.config) == null ? void 0 : gt.filters) ?? [], J = /* @__PURE__ */ new Map(), Me = (P, re) => {
2027
+ ), ce = pe ? [o] : [], ne = ((gt = (Ze = Y == null ? void 0 : Y.widget) == null ? void 0 : Ze.config) == null ? void 0 : gt.filters) ?? [], J = /* @__PURE__ */ new Map(), Me = (P, re) => {
2028
2028
  const xe = `${re.schemaName}:${re.name}:${re.operator}`;
2029
2029
  if (P.has(xe)) {
2030
- const wt = P.get(xe), St = re.operator === Fe.Like, Ze = re.operator === Fe.NotLike;
2031
- St || Ze ? wt.values = Array.from(/* @__PURE__ */ new Set([...wt.values ?? [], ...re.values ?? []])) : P.set(xe, { ...re });
2030
+ const wt = P.get(xe), St = re.operator === Fe.Like, Qe = re.operator === Fe.NotLike;
2031
+ St || Qe ? wt.values = Array.from(/* @__PURE__ */ new Set([...wt.values ?? [], ...re.values ?? []])) : P.set(xe, { ...re });
2032
2032
  } else
2033
2033
  P.set(xe, { ...re });
2034
2034
  };
@@ -2172,7 +2172,7 @@ const Jt = Qt(fl, () => {
2172
2172
  if (f === null)
2173
2173
  t.values = [];
2174
2174
  else {
2175
- const _ = tt(f.startDate).startOf("day").utc().toISOString(), D = tt(f.endDate).endOf("day").utc().toISOString();
2175
+ const _ = at(f.startDate).startOf("day").utc().toISOString(), D = at(f.endDate).endOf("day").utc().toISOString();
2176
2176
  t.values = [_, D];
2177
2177
  }
2178
2178
  const g = B.value.find((_) => _.filter === t);
@@ -2195,14 +2195,14 @@ const Jt = Qt(fl, () => {
2195
2195
  return { preview: o ? `${f} is between ${za({
2196
2196
  startDate: ((te = t.filter.values) == null ? void 0 : te[0]) || null,
2197
2197
  endDate: ((se = t.filter.values) == null ? void 0 : se[1]) || null,
2198
- locale: u.value
2198
+ locale: i.value
2199
2199
  })}` : f, suffix: "" };
2200
2200
  if (t.filter.option === he.TimeOfDay) {
2201
- const me = (Y = t.filter.values) != null && Y[0] ? tt(t.filter.values[0]) : null, pe = (V = t.filter.values) != null && V[1] ? tt(t.filter.values[1]) : null, be = (ne) => ne && ne.isValid() ? { hour: ne.hour(), minute: ne.minute() } : null;
2201
+ const me = (Y = t.filter.values) != null && Y[0] ? at(t.filter.values[0]) : null, pe = (V = t.filter.values) != null && V[1] ? at(t.filter.values[1]) : null, be = (ne) => ne && ne.isValid() ? { hour: ne.hour(), minute: ne.minute() } : null;
2202
2202
  return { preview: o ? `${f} is between ${Aa({
2203
2203
  startTime: be(me),
2204
2204
  endTime: be(pe),
2205
- locale: u.value
2205
+ locale: i.value
2206
2206
  })}` : f, suffix: "" };
2207
2207
  }
2208
2208
  if (t.filter.option !== he.DateTime && t.filter.option !== he.TimeOfDay) {
@@ -2240,7 +2240,7 @@ const Jt = Qt(fl, () => {
2240
2240
  if (f === null)
2241
2241
  t.values = [];
2242
2242
  else {
2243
- const se = tt().set("hour", Number((_ = f.start) == null ? void 0 : _.hour)).set("minute", Number((D = f.start) == null ? void 0 : D.minute)).toISOString(), Y = tt().set("hour", Number((Q = f.end) == null ? void 0 : Q.hour)).set("minute", Number((te = f.end) == null ? void 0 : te.minute)).toISOString();
2243
+ const se = at().set("hour", Number((_ = f.start) == null ? void 0 : _.hour)).set("minute", Number((D = f.start) == null ? void 0 : D.minute)).toISOString(), Y = at().set("hour", Number((Q = f.end) == null ? void 0 : Q.hour)).set("minute", Number((te = f.end) == null ? void 0 : te.minute)).toISOString();
2244
2244
  t.values = [se, Y];
2245
2245
  }
2246
2246
  const g = B.value.find((se) => se.filter === t);
@@ -2338,7 +2338,7 @@ const Jt = Qt(fl, () => {
2338
2338
  label: Re(K.label, 110),
2339
2339
  "has-checkbox": !0,
2340
2340
  "model-value": o.selectedValues.includes(K.value),
2341
- class: Xe([
2341
+ class: Je([
2342
2342
  "flex-1 text-left",
2343
2343
  { "bg-gray-200": K.available === !1 }
2344
2344
  ]),
@@ -2352,7 +2352,7 @@ const Jt = Qt(fl, () => {
2352
2352
  label: K.label,
2353
2353
  "has-checkbox": !0,
2354
2354
  "model-value": o.selectedValues.includes(K.value),
2355
- class: Xe(["flex-1 text-left", { "bg-gray-100": K.available === !1 }]),
2355
+ class: Je(["flex-1 text-left", { "bg-gray-100": K.available === !1 }]),
2356
2356
  onClick: () => H(o, K.value)
2357
2357
  }, null, 8, ["label", "model-value", "class", "onClick"]))
2358
2358
  ], 64))), 128)),
@@ -2391,7 +2391,7 @@ const Jt = Qt(fl, () => {
2391
2391
  O(te, {
2392
2392
  name: o.keepSelection ? "check_box" : "check_box_outline_blank",
2393
2393
  size: "md",
2394
- class: Xe(
2394
+ class: Je(
2395
2395
  o.keepSelection ? "text-fm-color-primary" : "text-fm-color-neutral-gray-400"
2396
2396
  )
2397
2397
  }, null, 8, ["name", "class"]),
@@ -2441,7 +2441,7 @@ const Jt = Qt(fl, () => {
2441
2441
  }
2442
2442
  });
2443
2443
  export {
2444
- Ge as I,
2444
+ Xe as I,
2445
2445
  $t as L,
2446
2446
  je as R,
2447
2447
  Hl as _,