@feedmepos/mf-report 5.32.3 → 5.33.0-beta.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.
Files changed (40) hide show
  1. package/dist/App-ZE1kA1jU.js +358 -0
  2. package/dist/{DateRangeSelect-6ojNsYQf.js → DateRangeSelect-B10B3ZaN.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-DinIx-4F.js → Default.vue_vue_type_script_setup_true_lang-dtu8Gum_.js} +1 -1
  4. package/dist/{DigestListView-Rv4nvsme.js → DigestListView-CqyxDNR_.js} +3 -3
  5. package/dist/{DigestReaderView-Cy5rWEDn.js → DigestReaderView-ILhtZ6ke.js} +4 -4
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CrRev99v.js → DynamicWidget.vue_vue_type_script_setup_true_lang-Dk6NA-nL.js} +7 -7
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CaFtkGgu.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Do8UrF5k.js} +753 -753
  8. package/dist/{InsightView-SOS32a9h.js → InsightView-cZx4gAxG.js} +5 -5
  9. package/dist/{Integration-CWo6GL7F.js → Integration-CgEy3mhX.js} +3 -3
  10. package/dist/{Integrations-T1M6Fbke.js → Integrations-BTy2r5Au.js} +2 -2
  11. package/dist/{Layout-CNhJDEmI.js → Layout-B3MnHb6_.js} +1 -1
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DgFWhBfv.js → LocationSelect.vue_vue_type_script_setup_true_lang-DqPi50ty.js} +1752 -1743
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BltVG4Ta.js → MenuTab.vue_vue_type_script_setup_true_lang-DGMEWWMl.js} +5 -5
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-B70bamMw.js → NavigationTab.vue_vue_type_script_setup_true_lang-CS-gvEAf.js} +3187 -3187
  15. package/dist/{OverviewView-DM_qaGcz.js → OverviewView-CnsSS3dA.js} +5 -5
  16. package/dist/Report-aCXfcgbD.js +722 -0
  17. package/dist/{ReportCanvasView-0680UK2i.js → ReportCanvasView-DJiD7cHf.js} +5 -5
  18. package/dist/{ReportEditor-9gIhhaWp.js → ReportEditor-D6VOw4xg.js} +7 -7
  19. package/dist/{ReportView-B1a3q6Ea.js → ReportView-DHxQQHdv.js} +64 -62
  20. package/dist/{ReportViewRoute-DW-K8Abr.js → ReportViewRoute-R7QAQx-y.js} +2 -2
  21. package/dist/{Setting-BikzZySl.js → Setting-C3q0gsVs.js} +3 -3
  22. package/dist/Template-DulgV4HH.js +557 -0
  23. package/dist/{TileEditor-B21SIE0n.js → TileEditor-B04Vkqd4.js} +6 -6
  24. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-BH2WdtF-.js → TilePageStack.vue_vue_type_script_setup_true_lang-Cn6yji3z.js} +2 -2
  25. package/dist/{TransitionFade-DNtxHJq8.js → TransitionFade-B0IFIQeH.js} +6 -6
  26. package/dist/{app-DSxKqUxD.js → app-60Wbr-Yr.js} +2517 -2449
  27. package/dist/app.js +2 -2
  28. package/dist/assets/{formatChartData.worker-McooHFG-.js → formatChartData.worker-o6kHvamD.js} +4 -4
  29. package/dist/assets/{processTableData.worker-B6m0dNAb.js → processTableData.worker-B7UZDrcg.js} +4 -4
  30. package/dist/{currency-BJiFhFc7.js → currency-JlsW9tkr.js} +1 -1
  31. package/dist/{index-BdZ-RSDt.js → index-BcttP7wp.js} +15 -15
  32. package/dist/{report-DcuMyUEc.js → report-CN9S4Zga.js} +132 -132
  33. package/dist/style.css +1 -1
  34. package/dist/{useDigestFont-DYDD96g_.js → useDigestFont-CyF_Sl2L.js} +1 -1
  35. package/dist/{useReportCanvasPanel-6D4KNid_.js → useReportCanvasPanel-DHUVpFYD.js} +3 -3
  36. package/dist/{useRestaurantPermission-5C-J7LtV.js → useRestaurantPermission-BjxYCII1.js} +1 -1
  37. package/package.json +2 -2
  38. package/dist/App-Ct4zKRmu.js +0 -339
  39. package/dist/Report-BpCqn_xs.js +0 -712
  40. package/dist/Template-DKUNK3A7.js +0 -522
@@ -1,14 +1,14 @@
1
- import { ref as ve, computed as ge, defineComponent as yt, mergeModels as lt, useModel as ft, watch as Ie, resolveComponent as ee, createElementBlock as fe, openBlock as J, createVNode as P, withCtx as ue, createElementVNode as Q, createCommentVNode as bt, Fragment as Le, renderList as ht, createBlock as we, unref as D, createTextVNode as nt, withDirectives as xl, toDisplayString as he, vShow as Al, renderSlot as qt, normalizeStyle as Gl, normalizeClass as Et, withModifiers as dt } from "vue";
2
- import { c as Qt, _ as Kt, D as El, e as Ll } from "./DateRangeSelect-6ojNsYQf.js";
3
- import { e as gt } from "./index-BdZ-RSDt.js";
4
- import { d as E, u as ke, c as je, a as Me, F as Oe, ag as St, v as Ae, h as Ml, j as Pl, z as Bl, i as zl, t as Lt } from "./app-DSxKqUxD.js";
5
- import { b as B, C as W, Q as tt, u as Pe, o as Ge, p as Ue, D as be, a as Wl, x as Mt, W as Pt, A as Ul, S as Bt } from "./report-DcuMyUEc.js";
6
- import { defineStore as Ft, storeToRefs as re } from "pinia";
1
+ import { ref as ye, computed as ge, defineComponent as yt, mergeModels as nt, useModel as ft, watch as Ie, resolveComponent as te, createElementBlock as he, openBlock as X, createVNode as M, withCtx as ie, createElementVNode as Y, createCommentVNode as ht, Fragment as Le, renderList as bt, createBlock as De, unref as D, createTextVNode as at, withDirectives as xl, toDisplayString as ve, vShow as Al, renderSlot as jt, normalizeStyle as Gl, normalizeClass as Et, withModifiers as dt } from "vue";
2
+ import { c as Qt, _ as Kt, D as El, e as Ll } from "./DateRangeSelect-B10B3ZaN.js";
3
+ import { e as St } from "./index-BcttP7wp.js";
4
+ import { d as G, u as ke, c as je, a as Pe, F as Oe, ah as gt, w as Ae, h as Pl, j as Ml, z as Bl, i as zl, t as Lt } from "./app-60Wbr-Yr.js";
5
+ import { b as B, C as j, Q as lt, u as Me, o as Ge, p as Ue, D as be, a as ql, x as Pt, W as Mt, A as Wl, S as Bt } from "./report-CN9S4Zga.js";
6
+ import { defineStore as Ft, storeToRefs as oe } from "pinia";
7
7
  import { detectLocale as xe } from "@feedmepos/mf-common";
8
8
  import { u as Jt } from "./_plugin-vue_export-helper-C6QDExPN.js";
9
- import { _ as jl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
9
+ import { _ as Ul } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
10
10
  var Yt = /* @__PURE__ */ ((l) => (l.generating = "GENERATING", l.completed = "COMPLETED", l.failed = "FAILED", l.canceled = "CANCELLED", l))(Yt || {});
11
- const ql = "/assets/formatChartData.worker-McooHFG-.js", mt = /* @__PURE__ */ new Map();
11
+ const jl = "/assets/formatChartData.worker-o6kHvamD.js", mt = /* @__PURE__ */ new Map();
12
12
  function zt(l) {
13
13
  return new Worker(l, { type: "module" });
14
14
  }
@@ -17,7 +17,7 @@ async function Ql(l) {
17
17
  return zt(mt.get(l));
18
18
  let n = l;
19
19
  if (location.hostname !== new URL(import.meta.url).hostname) {
20
- const d = new URL(l.replace(/^\//, ""), import.meta.url).href, p = await fetch(d).then((S) => S.text()), f = new Blob([p], { type: "application/javascript" });
20
+ const d = new URL(l.replace(/^\//, ""), import.meta.url).href, p = await fetch(d).then((F) => F.text()), f = new Blob([p], { type: "application/javascript" });
21
21
  n = URL.createObjectURL(f);
22
22
  }
23
23
  const r = zt(n);
@@ -33,11 +33,11 @@ async function Kl(l, n) {
33
33
  });
34
34
  }
35
35
  const Jl = "mf-reportreport-sort-store", Ht = Ft(Jl, () => {
36
- const l = ve([]);
36
+ const l = ye([]);
37
37
  function n(d, p) {
38
38
  if (d == null) return;
39
- const f = Array.isArray(p) ? p.filter((i) => i && i.key) : [], S = l.value.findIndex((i) => i.tileIndex === d), v = { tileIndex: d, sorts: f };
40
- S !== -1 ? l.value.splice(S, 1, v) : l.value.push(v);
39
+ const f = Array.isArray(p) ? p.filter((u) => u && u.key) : [], F = l.value.findIndex((u) => u.tileIndex === d), v = { tileIndex: d, sorts: f };
40
+ F !== -1 ? l.value.splice(F, 1, v) : l.value.push(v);
41
41
  }
42
42
  function s(d) {
43
43
  var p;
@@ -48,7 +48,7 @@ const Jl = "mf-reportreport-sort-store", Ht = Ft(Jl, () => {
48
48
  }
49
49
  return { tileSort: l, setTileSorts: n, getTileSorts: s, clearTileSorts: r };
50
50
  }), Yl = "mf-reportreport-search-store", Hl = Ft(Yl, () => {
51
- const l = ve({});
51
+ const l = ye({});
52
52
  function n(r, d) {
53
53
  r != null && (d ? l.value[r] = d : delete l.value[r]);
54
54
  }
@@ -71,7 +71,7 @@ function Zl(l) {
71
71
  ].join(":");
72
72
  }
73
73
  function Xl(l) {
74
- const n = (s, r) => E().set("hour", s).set("minute", r).set("second", 0).set("millisecond", 0).toISOString();
74
+ const n = (s, r) => G().set("hour", s).set("minute", r).set("second", 0).set("millisecond", 0).toISOString();
75
75
  return !l.startTime || !l.endTime ? [] : [
76
76
  n(l.startTime.hour, l.startTime.minute),
77
77
  n(l.endTime.hour, l.endTime.minute)
@@ -93,7 +93,7 @@ function tn(l, n) {
93
93
  return s.length !== 2 ? null : {
94
94
  schemaName: l.schemaName,
95
95
  name: l.name,
96
- operator: W.Between,
96
+ operator: j.Between,
97
97
  option: l.option ?? B.TimeOfDay,
98
98
  values: s,
99
99
  dataFormula: l.dataFormula,
@@ -101,7 +101,7 @@ function tn(l, n) {
101
101
  };
102
102
  }
103
103
  function ln(l) {
104
- var d, p, f, S;
104
+ var d, p, f, F;
105
105
  const n = (l.filters ?? []).map((v) => ({
106
106
  ...v,
107
107
  isGlobalFilter: !0
@@ -109,38 +109,38 @@ function ln(l) {
109
109
  if (s.length === 1 && String(s[0]) === "EMPTY_GLOBAL_FILTER_VALUE") {
110
110
  const v = Object.values(B).includes(
111
111
  String(l.option ?? "")
112
- ), i = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [v ? "-1" : Zt];
112
+ ), u = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [v ? "-1" : Zt];
113
113
  return [
114
114
  ...n,
115
115
  {
116
116
  schemaName: l.schemaName,
117
117
  name: l.name,
118
- operator: W.Equal,
118
+ operator: j.Equal,
119
119
  option: l.option ?? null,
120
- values: i,
120
+ values: u,
121
121
  dataFormula: l.dataFormula,
122
122
  isGlobalFilter: !0
123
123
  }
124
124
  ];
125
125
  }
126
126
  if ((((d = l.customTimeRanges) == null ? void 0 : d.length) ?? 0) > 0) {
127
- const v = new Set(s.map((i) => String(i)));
127
+ const v = new Set(s.map((u) => String(u)));
128
128
  return [
129
129
  ...n,
130
- ...((p = l.customTimeRanges) == null ? void 0 : p.filter((i) => {
131
- const w = String(i.name ?? "");
132
- return v.has(w);
133
- }).map((i) => tn(l, i)).filter((i) => !!i)) ?? []
130
+ ...((p = l.customTimeRanges) == null ? void 0 : p.filter((u) => {
131
+ const E = String(u.name ?? "");
132
+ return v.has(E);
133
+ }).map((u) => tn(l, u)).filter((u) => !!u)) ?? []
134
134
  ];
135
135
  }
136
136
  if ((((f = l.customOptions) == null ? void 0 : f.length) ?? 0) > 0) {
137
- const v = new Set(s.map((i) => String(i)));
137
+ const v = new Set(s.map((u) => String(u)));
138
138
  return [
139
139
  ...n,
140
- ...((S = l.customOptions) == null ? void 0 : S.filter((i) => {
141
- const w = String(i.label ?? "");
142
- return v.has(w);
143
- }).map((i) => en(l, i)).filter((i) => Array.isArray(i.values) && i.values.length > 0)) ?? []
140
+ ...((F = l.customOptions) == null ? void 0 : F.filter((u) => {
141
+ const E = String(u.label ?? "");
142
+ return v.has(E);
143
+ }).map((u) => en(l, u)).filter((u) => Array.isArray(u.values) && u.values.length > 0)) ?? []
144
144
  ];
145
145
  }
146
146
  return s.length === 0 ? n : [
@@ -148,7 +148,7 @@ function ln(l) {
148
148
  {
149
149
  schemaName: l.schemaName,
150
150
  name: l.name,
151
- operator: W.Equal,
151
+ operator: j.Equal,
152
152
  option: l.option ?? null,
153
153
  values: s,
154
154
  dataFormula: l.dataFormula,
@@ -156,112 +156,112 @@ function ln(l) {
156
156
  }
157
157
  ];
158
158
  }
159
- function Wt({
159
+ function qt({
160
160
  originalFilters: l,
161
161
  globalFilters: n,
162
162
  schemaNames: s
163
163
  }) {
164
- const r = /* @__PURE__ */ new Map(), d = [], p = new Set((s ?? []).map((u) => String(u))), f = (u) => p.has(u.schemaName ?? ""), S = n.filter(f);
165
- function v(u) {
164
+ const r = /* @__PURE__ */ new Map(), d = [], p = new Set((s ?? []).map((c) => String(c))), f = (c) => p.has(c.schemaName ?? ""), F = n.filter(f);
165
+ function v(c) {
166
166
  const m = Object.values(B).includes(
167
- String(u.option ?? "")
167
+ String(c.option ?? "")
168
168
  );
169
- return u.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [m ? "-1" : Zt];
169
+ return c.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [m ? "-1" : Zt];
170
170
  }
171
- function i(u, m) {
172
- const h = typeof u == "number" ? u : Number(u), N = typeof m == "number" ? m : Number(m);
173
- return Number.isFinite(h) && Number.isFinite(N) ? h - N : typeof u == "string" && typeof m == "string" ? u.localeCompare(m) : null;
171
+ function u(c, m) {
172
+ const b = typeof c == "number" ? c : Number(c), y = typeof m == "number" ? m : Number(m);
173
+ return Number.isFinite(b) && Number.isFinite(y) ? b - y : typeof c == "string" && typeof m == "string" ? c.localeCompare(m) : null;
174
174
  }
175
- function w(u, m) {
176
- if (u.length === 0 || m.length === 0) return null;
177
- const h = i(u[0], m[0]);
178
- return h == null ? null : [h >= 0 ? u[0] : m[0]];
175
+ function E(c, m) {
176
+ if (c.length === 0 || m.length === 0) return null;
177
+ const b = u(c[0], m[0]);
178
+ return b == null ? null : [b >= 0 ? c[0] : m[0]];
179
179
  }
180
- function k(u, m) {
181
- if (u.length === 0 || m.length === 0) return null;
182
- const h = i(u[0], m[0]);
183
- return h == null ? null : [h <= 0 ? u[0] : m[0]];
180
+ function Q(c, m) {
181
+ if (c.length === 0 || m.length === 0) return null;
182
+ const b = u(c[0], m[0]);
183
+ return b == null ? null : [b <= 0 ? c[0] : m[0]];
184
184
  }
185
- function te(u, m) {
186
- if (u.length < 2 || m.length < 2) return null;
187
- const h = i(u[0], m[0]), N = i(u[1], m[1]);
188
- if (h == null || N == null) return null;
189
- const I = h >= 0 ? u[0] : m[0], O = N <= 0 ? u[1] : m[1];
190
- return i(I, O) == null ? null : [I, O];
185
+ function _(c, m) {
186
+ if (c.length < 2 || m.length < 2) return null;
187
+ const b = u(c[0], m[0]), y = u(c[1], m[1]);
188
+ if (b == null || y == null) return null;
189
+ const C = b >= 0 ? c[0] : m[0], R = y <= 0 ? c[1] : m[1];
190
+ return u(C, R) == null ? null : [C, R];
191
191
  }
192
- function x(u, m) {
193
- const h = We(u.values), N = We(m.values);
192
+ function O(c, m) {
193
+ const b = We(c.values), y = We(m.values);
194
194
  switch (m.operator) {
195
- case W.Equal: {
196
- const I = new Set(N), O = h.filter((L) => I.has(L));
197
- return O.length ? O : v(u);
195
+ case j.Equal: {
196
+ const C = new Set(y), R = b.filter((H) => C.has(H));
197
+ return R.length ? R : v(c);
198
198
  }
199
- case W.NotEqual:
200
- case W.NotLike:
199
+ case j.NotEqual:
200
+ case j.NotLike:
201
201
  return We([
202
- ...h,
203
- ...N
202
+ ...b,
203
+ ...y
204
204
  ]);
205
- case W.GreaterThan:
206
- case W.GreaterThanOrEqual:
207
- return w(h, N);
208
- case W.LessThan:
209
- case W.LessThanOrEqual:
210
- return k(h, N);
211
- case W.Between:
212
- return te(h, N);
205
+ case j.GreaterThan:
206
+ case j.GreaterThanOrEqual:
207
+ return E(b, y);
208
+ case j.LessThan:
209
+ case j.LessThanOrEqual:
210
+ return Q(b, y);
211
+ case j.Between:
212
+ return _(b, y);
213
213
  default:
214
214
  return null;
215
215
  }
216
216
  }
217
- const g = (u) => {
218
- if (!u || !f(u) || !Array.isArray(u.values) || u.values.length === 0)
217
+ const g = (c) => {
218
+ if (!c || !f(c) || !Array.isArray(c.values) || c.values.length === 0)
219
219
  return;
220
220
  const m = {
221
- ...u,
222
- values: We(u.values)
221
+ ...c,
222
+ values: We(c.values)
223
223
  };
224
- if (m.option === B.TimeOfDay && m.operator === W.Between) {
224
+ if (m.option === B.TimeOfDay && m.operator === j.Between) {
225
225
  d.push(m);
226
226
  return;
227
227
  }
228
- const N = Zl(m), I = r.get(N);
229
- if (!I) {
230
- r.set(N, m);
228
+ const y = Zl(m), C = r.get(y);
229
+ if (!C) {
230
+ r.set(y, m);
231
231
  return;
232
232
  }
233
- const O = x(I, m);
234
- if (O == null) {
233
+ const R = O(C, m);
234
+ if (R == null) {
235
235
  d.push(m);
236
236
  return;
237
237
  }
238
- I.values = O, r.set(N, I);
238
+ C.values = R, r.set(y, C);
239
239
  };
240
- return l.forEach(g), S.forEach(g), [...Array.from(r.values()), ...d];
240
+ return l.forEach(g), F.forEach(g), [...Array.from(r.values()), ...d];
241
241
  }
242
- function qe(l, n, s) {
242
+ function Qe(l, n, s) {
243
243
  var p;
244
244
  const r = JSON.parse(JSON.stringify(l)), d = n.filter((f) => {
245
- var S;
246
- return (S = f.tileIds) == null ? void 0 : S.includes(s);
245
+ var F;
246
+ return (F = f.tileIds) == null ? void 0 : F.includes(s);
247
247
  }).flatMap((f) => ln(f));
248
248
  return {
249
249
  ...r,
250
250
  config: {
251
251
  ...r.config,
252
- filters: Wt({
252
+ filters: qt({
253
253
  originalFilters: r.config.filters ?? [],
254
254
  globalFilters: d ?? [],
255
255
  schemaNames: r.config.schemaNames
256
256
  }),
257
- joinDatasources: ((p = r.config.joinDatasources) == null ? void 0 : p.map((f, S) => {
257
+ joinDatasources: ((p = r.config.joinDatasources) == null ? void 0 : p.map((f, F) => {
258
258
  var v;
259
259
  return {
260
260
  ...f,
261
- filters: Wt({
261
+ filters: qt({
262
262
  originalFilters: f.filters ?? [],
263
263
  globalFilters: d ?? [],
264
- schemaNames: (v = r.config.joinDatasources) == null ? void 0 : v[S].schemaNames
264
+ schemaNames: (v = r.config.joinDatasources) == null ? void 0 : v[F].schemaNames
265
265
  })
266
266
  };
267
267
  })) ?? []
@@ -269,7 +269,7 @@ function qe(l, n, s) {
269
269
  };
270
270
  }
271
271
  function nn(l) {
272
- return (l == null ? void 0 : l.queryDatasource) === tt.BigQuery ? tt.BigQuery : tt.Postgres;
272
+ return (l == null ? void 0 : l.queryDatasource) === lt.BigQuery ? lt.BigQuery : lt.Postgres;
273
273
  }
274
274
  const an = [
275
275
  "schemaNames",
@@ -308,19 +308,19 @@ function Xt(l) {
308
308
  function vt(l) {
309
309
  return (l == null ? void 0 : l.queryVersion) === "v2";
310
310
  }
311
- function Qe({
311
+ function Ke({
312
312
  report: l,
313
313
  pageSubject: n,
314
314
  dateRange: s,
315
315
  compareDateRange: r,
316
316
  timezone: d
317
317
  }) {
318
- const { canReadReportDateRange: p, canReadPageDateRange: f } = Pl(), S = (i) => n ? f(n, i, d) : l ? p(l, i, d) : !0, v = !!(r != null && r.startDate && (r != null && r.endDate));
319
- return S(s) && (!v || S(r));
318
+ const { canReadReportDateRange: p, canReadPageDateRange: f } = Ml(), F = (u) => n ? f(n, u, d) : l ? p(l, u, d) : !0, v = !!(r != null && r.startDate && (r != null && r.endDate));
319
+ return F(s) && (!v || F(r));
320
320
  }
321
- function Ke(l) {
321
+ function Je(l) {
322
322
  if (l === "overview")
323
- return Ml.report_accessOverview;
323
+ return Pl.report_accessOverview;
324
324
  }
325
325
  function wt({
326
326
  selectedNavigationTab: l,
@@ -349,60 +349,60 @@ const sn = async ({
349
349
  scopedTimeRange: d,
350
350
  scopedDateRange: p,
351
351
  scopedGlobalFilters: f,
352
- page: S,
352
+ page: F,
353
353
  pageRead: v,
354
- search: i
354
+ search: u
355
355
  }) => {
356
- var me, Se, ye, ce;
357
- const { businessId: w } = re(ke()), { currentReport: k, editingReport: te, overviewReport: x } = Pe(), { selectedNavigationTab: g, isEditorRoute: u } = je(), m = wt({
358
- selectedNavigationTab: g,
359
- isEditorRoute: u,
360
- overviewReport: x,
361
- editingReport: te,
362
- currentReport: k
363
- }), h = Ke(g), {
364
- selectedRestaurantIds: N,
365
- selectedWarehouseIds: I,
366
- selectedLocationIds: O,
367
- dateRange: L,
368
- compareDateRange: U,
369
- timeRange: j,
356
+ var re, Fe, de, Se;
357
+ const { scopePath: E, requestBusinessIds: Q } = oe(ke()), { currentReport: _, editingReport: O, overviewReport: g } = Me(), { selectedNavigationTab: c, isEditorRoute: m } = je(), b = wt({
358
+ selectedNavigationTab: c,
359
+ isEditorRoute: m,
360
+ overviewReport: g,
361
+ editingReport: O,
362
+ currentReport: _
363
+ }), y = Je(c), {
364
+ selectedRestaurantIds: C,
365
+ selectedWarehouseIds: R,
366
+ selectedLocationIds: H,
367
+ dateRange: z,
368
+ compareDateRange: q,
369
+ timeRange: ee,
370
370
  timezone: le,
371
- restaurants: X,
372
- warehouses: ne
373
- } = Me(), { globalFilters: C } = Ge();
374
- if (O.length === 0)
371
+ restaurants: Z,
372
+ warehouses: N
373
+ } = Pe(), { globalFilters: W } = Ge();
374
+ if (H.length === 0)
375
375
  return null;
376
- const _ = p ?? L, K = d ?? j, Y = f ?? C;
377
- if (!Qe({
378
- report: m,
379
- pageSubject: h,
380
- dateRange: _,
381
- compareDateRange: U,
376
+ const ae = p ?? z, U = d ?? ee, K = f ?? W;
377
+ if (!Ke({
378
+ report: b,
379
+ pageSubject: y,
380
+ dateRange: ae,
381
+ compareDateRange: q,
382
382
  timezone: le
383
383
  }))
384
384
  return null;
385
- const H = (r == null ? void 0 : r.filter((ie) => X.some((se) => se.id === ie))) ?? N, ae = (r == null ? void 0 : r.filter((ie) => ne.some((se) => se.id === ie))) ?? I, z = qe(l, Y, s ?? ""), R = {
385
+ const se = (r == null ? void 0 : r.filter((ne) => Z.some((L) => L.id === ne))) ?? C, $ = (r == null ? void 0 : r.filter((ne) => N.some((L) => L.id === ne))) ?? R, k = Qe(l, K, s ?? ""), ce = {
386
386
  fetchType: Oe.Post,
387
- url: v ? `/${w.value}/v2/query/page` : `/${w.value}/v2/query`,
387
+ url: v ? `/${E.value}/v2/query/page` : `/${E.value}/v2/query`,
388
388
  data: {
389
- ...S ? { page: S } : {},
389
+ ...F ? { page: F } : {},
390
390
  ...v ?? {},
391
- ...i ? { search: i } : {},
392
- widget: z,
393
- dateRange: [_.startDate, _.endDate],
394
- compareDateRange: U.startDate && U.endDate ? [U.startDate, U.endDate] : void 0,
391
+ ...u ? { search: u } : {},
392
+ widget: k,
393
+ dateRange: [ae.startDate, ae.endDate],
394
+ compareDateRange: q.startDate && q.endDate ? [q.startDate, q.endDate] : void 0,
395
395
  timeRange: [
396
- E().tz(le).hour(Number((me = K.start) == null ? void 0 : me.hour)).minute(Number((Se = K.start) == null ? void 0 : Se.minute)).toISOString(),
397
- E().tz(le).hour(Number((ye = K.end) == null ? void 0 : ye.hour)).minute(Number((ce = K.end) == null ? void 0 : ce.minute)).endOf("minutes").toISOString()
396
+ G().tz(le).hour(Number((re = U.start) == null ? void 0 : re.hour)).minute(Number((Fe = U.start) == null ? void 0 : Fe.minute)).toISOString(),
397
+ G().tz(le).hour(Number((de = U.end) == null ? void 0 : de.hour)).minute(Number((Se = U.end) == null ? void 0 : Se.minute)).endOf("minutes").toISOString()
398
398
  ],
399
- businessIds: w.value ? [w.value] : [],
400
- restaurantIds: H,
401
- warehouseIds: ae,
399
+ businessIds: Q.value,
400
+ restaurantIds: se,
401
+ warehouseIds: $,
402
402
  timezone: le,
403
- skipStringSpaceGrouping: !!(m != null && m.batch) || vt(m),
404
- reportId: m == null ? void 0 : m.id,
405
- queryDatasource: nn(m)
403
+ skipStringSpaceGrouping: !!(b != null && b.batch) || vt(b),
404
+ reportId: b == null ? void 0 : b.id,
405
+ queryDatasource: nn(b)
406
406
  },
407
407
  requestConfig: {
408
408
  timeout: 1e3 * 60 * 5,
@@ -411,58 +411,58 @@ const sn = async ({
411
411
  // A query is a read: a 502/503/504 from the gateway is safe to re-send.
412
412
  retry: 2
413
413
  };
414
- return await el([() => Ae.fetch(R)], 2e3);
415
- }, Un = async ({
414
+ return await el([() => Ae.fetch(ce)], 2e3);
415
+ }, Wn = async ({
416
416
  widget: l,
417
417
  signal: n,
418
418
  tileId: s,
419
419
  scopedDateRange: r,
420
420
  scopedCompareDateRange: d
421
421
  }) => {
422
- var ne, C, _, K;
423
- const { businessId: p } = re(ke()), { currentReport: f, editingReport: S, overviewReport: v } = Pe(), { selectedNavigationTab: i, isEditorRoute: w } = je(), k = wt({
424
- selectedNavigationTab: i,
425
- isEditorRoute: w,
426
- overviewReport: v,
427
- editingReport: S,
428
- currentReport: f
429
- }), te = Ke(i), { restaurants: x, warehouses: g, dateRange: u, compareDateRange: m, timeRange: h, timezone: N } = Me(), { globalFilters: I } = Ge();
430
- if (x.length === 0 && g.length === 0)
422
+ var N, W, ae, U;
423
+ const { scopePath: p, requestBusinessIds: f } = oe(ke()), { currentReport: F, editingReport: v, overviewReport: u } = Me(), { selectedNavigationTab: E, isEditorRoute: Q } = je(), _ = wt({
424
+ selectedNavigationTab: E,
425
+ isEditorRoute: Q,
426
+ overviewReport: u,
427
+ editingReport: v,
428
+ currentReport: F
429
+ }), O = Je(E), { restaurants: g, warehouses: c, dateRange: m, compareDateRange: b, timeRange: y, timezone: C } = Pe(), { globalFilters: R } = Ge();
430
+ if (g.length === 0 && c.length === 0)
431
431
  return { totalBytesProcessed: 0 };
432
- const O = r ?? u, L = d ?? m;
433
- if (!Qe({
434
- report: k,
435
- pageSubject: te,
436
- dateRange: O,
437
- compareDateRange: L,
438
- timezone: N
432
+ const H = r ?? m, z = d ?? b;
433
+ if (!Ke({
434
+ report: _,
435
+ pageSubject: O,
436
+ dateRange: H,
437
+ compareDateRange: z,
438
+ timezone: C
439
439
  }))
440
440
  return { totalBytesProcessed: 0 };
441
- const U = x.map((Y) => Y.id), j = g.map((Y) => Y.id), le = qe(l, I, s ?? ""), X = {
441
+ const q = g.map((K) => K.id), ee = c.map((K) => K.id), le = Qe(l, R, s ?? ""), Z = {
442
442
  fetchType: Oe.Post,
443
443
  url: `/${p.value}/v2/query/dry-run`,
444
444
  data: {
445
445
  widget: le,
446
- dateRange: [O.startDate, O.endDate],
447
- compareDateRange: L.startDate && L.endDate ? [L.startDate, L.endDate] : void 0,
446
+ dateRange: [H.startDate, H.endDate],
447
+ compareDateRange: z.startDate && z.endDate ? [z.startDate, z.endDate] : void 0,
448
448
  timeRange: [
449
- E().tz(N).hour(Number((ne = h.start) == null ? void 0 : ne.hour)).minute(Number((C = h.start) == null ? void 0 : C.minute)).toISOString(),
450
- E().tz(N).hour(Number((_ = h.end) == null ? void 0 : _.hour)).minute(Number((K = h.end) == null ? void 0 : K.minute)).endOf("minutes").toISOString()
449
+ G().tz(C).hour(Number((N = y.start) == null ? void 0 : N.hour)).minute(Number((W = y.start) == null ? void 0 : W.minute)).toISOString(),
450
+ G().tz(C).hour(Number((ae = y.end) == null ? void 0 : ae.hour)).minute(Number((U = y.end) == null ? void 0 : U.minute)).endOf("minutes").toISOString()
451
451
  ],
452
- businessIds: p.value ? [p.value] : [],
453
- restaurantIds: U,
454
- warehouseIds: j,
455
- timezone: N,
452
+ businessIds: f.value,
453
+ restaurantIds: q,
454
+ warehouseIds: ee,
455
+ timezone: C,
456
456
  skipStringSpaceGrouping: !1,
457
- reportId: k == null ? void 0 : k.id,
458
- queryDatasource: tt.BigQuery
457
+ reportId: _ == null ? void 0 : _.id,
458
+ queryDatasource: lt.BigQuery
459
459
  },
460
460
  requestConfig: {
461
461
  timeout: 1e3 * 60,
462
462
  signal: n
463
463
  }
464
464
  };
465
- return Ae.fetch(X);
465
+ return Ae.fetch(Z);
466
466
  }, rn = async ({
467
467
  widget: l,
468
468
  signal: n,
@@ -471,19 +471,19 @@ const sn = async ({
471
471
  scopedTimeRange: d,
472
472
  scopedDateRange: p,
473
473
  scopedGlobalFilters: f,
474
- page: S,
474
+ page: F,
475
475
  pageRead: v,
476
- search: i
476
+ search: u
477
477
  }) => {
478
- var ye, ce, ie, se;
479
- const { businessId: w, country: k } = re(ke()), { currentReport: te, editingReport: x, overviewReport: g } = Pe(), { selectedNavigationTab: u, isEditorRoute: m } = je(), h = wt({
480
- selectedNavigationTab: u,
481
- isEditorRoute: m,
482
- overviewReport: g,
483
- editingReport: x,
484
- currentReport: te
485
- }), N = Ke(u);
486
- if (vt(h))
478
+ var de, Se, ne, L;
479
+ const { scopePath: E, requestBusinessIds: Q, country: _ } = oe(ke()), { currentReport: O, editingReport: g, overviewReport: c } = Me(), { selectedNavigationTab: m, isEditorRoute: b } = je(), y = wt({
480
+ selectedNavigationTab: m,
481
+ isEditorRoute: b,
482
+ overviewReport: c,
483
+ editingReport: g,
484
+ currentReport: O
485
+ }), C = Je(m);
486
+ if (vt(y))
487
487
  return sn({
488
488
  widget: l,
489
489
  signal: n,
@@ -492,70 +492,70 @@ const sn = async ({
492
492
  scopedTimeRange: d,
493
493
  scopedDateRange: p,
494
494
  scopedGlobalFilters: f,
495
- page: S,
495
+ page: F,
496
496
  pageRead: v,
497
- search: i
497
+ search: u
498
498
  });
499
499
  const {
500
- selectedRestaurantIds: I,
501
- selectedWarehouseIds: O,
502
- selectedLocationIds: L,
503
- dateRange: U,
504
- compareDateRange: j,
500
+ selectedRestaurantIds: R,
501
+ selectedWarehouseIds: H,
502
+ selectedLocationIds: z,
503
+ dateRange: q,
504
+ compareDateRange: ee,
505
505
  timeRange: le,
506
- timezone: X,
507
- restaurants: ne,
508
- warehouses: C
509
- } = Me(), { globalFilters: _ } = Ge();
510
- if (L.length === 0)
506
+ timezone: Z,
507
+ restaurants: N,
508
+ warehouses: W
509
+ } = Pe(), { globalFilters: ae } = Ge();
510
+ if (z.length === 0)
511
511
  return null;
512
- const K = p ?? U, Y = d ?? le, H = f ?? _;
513
- if (!Qe({
514
- report: h,
515
- pageSubject: N,
516
- dateRange: K,
517
- compareDateRange: j,
518
- timezone: X
512
+ const U = p ?? q, K = d ?? le, se = f ?? ae;
513
+ if (!Ke({
514
+ report: y,
515
+ pageSubject: C,
516
+ dateRange: U,
517
+ compareDateRange: ee,
518
+ timezone: Z
519
519
  }))
520
520
  return null;
521
- const ae = (r == null ? void 0 : r.filter((Z) => ne.some((De) => De.id === Z))) ?? I, z = (r == null ? void 0 : r.filter((Z) => C.some((De) => De.id === Z))) ?? O, R = qe(l, H, s ?? ""), oe = {
521
+ const $ = (r == null ? void 0 : r.filter((Te) => N.some((me) => me.id === Te))) ?? R, k = (r == null ? void 0 : r.filter((Te) => W.some((me) => me.id === Te))) ?? H, ce = Qe(l, se, s ?? ""), ue = {
522
522
  fetchType: Oe.Post,
523
- url: `/${w.value}/postgres-query`,
524
- data: gt.getQueryRequests({
525
- widget: R,
526
- dateRange: [K.startDate, K.endDate],
527
- compareDateRange: j.startDate && j.endDate ? [j.startDate, j.endDate] : void 0,
523
+ url: `/${E.value}/postgres-query`,
524
+ data: St.getQueryRequests({
525
+ widget: ce,
526
+ dateRange: [U.startDate, U.endDate],
527
+ compareDateRange: ee.startDate && ee.endDate ? [ee.startDate, ee.endDate] : void 0,
528
528
  timeRange: [
529
- E().tz(X).hour(Number((ye = Y.start) == null ? void 0 : ye.hour)).minute(Number((ce = Y.start) == null ? void 0 : ce.minute)).toISOString(),
530
- E().tz(X).hour(Number((ie = Y.end) == null ? void 0 : ie.hour)).minute(Number((se = Y.end) == null ? void 0 : se.minute)).endOf("minutes").toISOString()
529
+ G().tz(Z).hour(Number((de = K.start) == null ? void 0 : de.hour)).minute(Number((Se = K.start) == null ? void 0 : Se.minute)).toISOString(),
530
+ G().tz(Z).hour(Number((ne = K.end) == null ? void 0 : ne.hour)).minute(Number((L = K.end) == null ? void 0 : L.minute)).endOf("minutes").toISOString()
531
531
  ],
532
- businessIds: w.value ? [w.value] : [],
533
- restaurantIds: ae,
534
- warehouseIds: z,
535
- timezone: X
536
- }).map((Z, De) => {
537
- const Te = De === 0 ? 3e3 : 12e3;
532
+ businessIds: Q.value,
533
+ restaurantIds: $,
534
+ warehouseIds: k,
535
+ timezone: Z
536
+ }).map((Te, me) => {
537
+ const Be = me === 0 ? 3e3 : 12e3;
538
538
  return {
539
- ...Z,
540
- limit: ae.length > 50 ? l.config.limit || Te : l.config.limit,
541
- skipStringSpaceGrouping: !!(h != null && h.batch) || vt(h),
542
- reportId: h == null ? void 0 : h.id
539
+ ...Te,
540
+ limit: $.length > 50 ? l.config.limit || Be : l.config.limit,
541
+ skipStringSpaceGrouping: !!(y != null && y.batch) || vt(y),
542
+ reportId: y == null ? void 0 : y.id
543
543
  };
544
544
  }),
545
545
  requestConfig: {
546
546
  timeout: 1e3 * 60 * 5,
547
547
  signal: n
548
548
  }
549
- }, me = [() => Ae.fetch(oe)];
550
- I.length < 50 && me.push(() => Ae.fetch(oe)), me.push(() => Ae.fetch(oe));
551
- const Se = await el(me, 2e3);
552
- return (await Kl(ql, {
553
- responses: Se,
549
+ }, re = [() => Ae.fetch(ue)];
550
+ R.length < 50 && re.push(() => Ae.fetch(ue)), re.push(() => Ae.fetch(ue));
551
+ const Fe = await el(re, 2e3);
552
+ return (await Kl(jl, {
553
+ responses: Fe,
554
554
  widget: JSON.parse(JSON.stringify(l)),
555
- country: k.value,
556
- timezone: X
555
+ country: _.value,
556
+ timezone: Z
557
557
  })).data;
558
- }, jn = async ({
558
+ }, Un = async ({
559
559
  fileType: l,
560
560
  index: n,
561
561
  orientationTypes: s,
@@ -563,55 +563,55 @@ const sn = async ({
563
563
  locationIds: d,
564
564
  timeRange: p,
565
565
  dateRange: f,
566
- globalFilters: S
566
+ globalFilters: F
567
567
  }) => {
568
- const { businessId: v } = re(ke()), i = Me(), { compareDateRange: w } = re(i), { restaurants: k, warehouses: te, timezone: x } = i, { globalFilters: g } = Ge(), { currentReport: u, overviewReport: m } = Pe(), { selectedNavigationTab: h } = je(), { getTileSorts: N } = Ht(), { getTileSearch: I } = Hl();
569
- let O = u == null ? void 0 : u.id, L = Ue(u == null ? void 0 : u.tiles);
570
- h === "overview" && m && (O = m == null ? void 0 : m.id, L = Ue(m == null ? void 0 : m.tiles));
571
- const U = h === "overview" && m ? m : u, j = Ke(h);
572
- if (!Qe({
573
- report: U,
574
- pageSubject: j,
568
+ const { scopePath: v, requestBusinessIds: u } = oe(ke()), E = Pe(), { compareDateRange: Q } = oe(E), { restaurants: _, warehouses: O, timezone: g } = E, { globalFilters: c } = Ge(), { currentReport: m, overviewReport: b } = Me(), { selectedNavigationTab: y } = je(), { getTileSorts: C } = Ht(), { getTileSearch: R } = Hl();
569
+ let H = m == null ? void 0 : m.id, z = Ue(m == null ? void 0 : m.tiles);
570
+ y === "overview" && b && (H = b == null ? void 0 : b.id, z = Ue(b == null ? void 0 : b.tiles));
571
+ const q = y === "overview" && b ? b : m, ee = Je(y);
572
+ if (!Ke({
573
+ report: q,
574
+ pageSubject: ee,
575
575
  dateRange: f,
576
- compareDateRange: w.value,
577
- timezone: x
576
+ compareDateRange: Q.value,
577
+ timezone: g
578
578
  }))
579
579
  return;
580
- const le = S ?? g, X = L.filter((ae, z) => typeof n == "number" ? z === n : !0).map((ae) => qe(ae.widget, le, ae.id)), ne = {
580
+ const le = F ?? c, Z = z.filter(($, k) => typeof n == "number" ? k === n : !0).map(($) => Qe($.widget, le, $.id)), N = {
581
581
  fetchType: Oe.Post,
582
582
  url: `/${v.value}/file?lang=${xe()}`,
583
583
  data: {
584
584
  configs: [
585
- ...X.map((ae, z) => {
586
- var me, Se, ye, ce;
587
- const R = I(n ?? z), oe = gt.getQueryRequests({
588
- widget: ae,
585
+ ...Z.map(($, k) => {
586
+ var re, Fe, de, Se;
587
+ const ce = R(n ?? k), ue = St.getQueryRequests({
588
+ widget: $,
589
589
  dateRange: [f.startDate, f.endDate],
590
- compareDateRange: w.value.startDate && w.value.endDate ? [w.value.startDate, w.value.endDate] : void 0,
590
+ compareDateRange: Q.value.startDate && Q.value.endDate ? [Q.value.startDate, Q.value.endDate] : void 0,
591
591
  timeRange: [
592
- E().tz(x).set("hour", Number((me = p.start) == null ? void 0 : me.hour)).set("minute", Number((Se = p.start) == null ? void 0 : Se.minute)).toISOString(),
593
- E().tz(x).set("hour", Number((ye = p.end) == null ? void 0 : ye.hour)).set("minute", Number((ce = p.end) == null ? void 0 : ce.minute)).toISOString()
592
+ G().tz(g).set("hour", Number((re = p.start) == null ? void 0 : re.hour)).set("minute", Number((Fe = p.start) == null ? void 0 : Fe.minute)).toISOString(),
593
+ G().tz(g).set("hour", Number((de = p.end) == null ? void 0 : de.hour)).set("minute", Number((Se = p.end) == null ? void 0 : Se.minute)).toISOString()
594
594
  ],
595
- businessIds: v ? [v.value] : [],
595
+ businessIds: u.value,
596
596
  restaurantIds: d.filter(
597
- (ie) => k.find((se) => se.id === ie)
597
+ (ne) => _.find((L) => L.id === ne)
598
598
  ),
599
599
  warehouseIds: d.filter(
600
- (ie) => te.find((se) => se.id === ie)
600
+ (ne) => O.find((L) => L.id === ne)
601
601
  ),
602
- timezone: x
602
+ timezone: g
603
603
  });
604
604
  return {
605
605
  // Every request, like the query API's search; the file service filters it in memory.
606
- requests: R ? oe.map((ie) => ({ ...ie, search: R })) : oe,
607
- index: n || z,
606
+ requests: ce ? ue.map((ne) => ({ ...ne, search: ce })) : ue,
607
+ index: n || k,
608
608
  drillDimension: null,
609
- ...Xt(ae),
610
- globalSorts: N(n ?? z)
609
+ ...Xt($),
610
+ globalSorts: C(n ?? k)
611
611
  };
612
612
  })
613
613
  ],
614
- reportId: O,
614
+ reportId: H,
615
615
  type: l,
616
616
  orientationTypes: s,
617
617
  isCombinedLocationLayout: r
@@ -620,9 +620,9 @@ const sn = async ({
620
620
  responseType: "arraybuffer",
621
621
  timeout: 1e3 * 60 * 60 * 24
622
622
  }
623
- }, { headers: C, data: _ } = await St.rawFetch(ne), K = C["content-disposition"].split("filename=")[1].replaceAll('"', ""), Y = window.URL.createObjectURL(new Blob([new Uint8Array(_).buffer])), H = document.createElement("a");
624
- H.href = Y, H.setAttribute("download", decodeURIComponent(K)), document.body.appendChild(H), H.click(), H.remove();
625
- }, qn = async ({
623
+ }, { headers: W, data: ae } = await gt.rawFetch(N), U = W["content-disposition"].split("filename=")[1].replaceAll('"', ""), K = window.URL.createObjectURL(new Blob([new Uint8Array(ae).buffer])), se = document.createElement("a");
624
+ se.href = K, se.setAttribute("download", decodeURIComponent(U)), document.body.appendChild(se), se.click(), se.remove();
625
+ }, jn = async ({
626
626
  emails: l,
627
627
  types: n,
628
628
  dateRange: s,
@@ -630,114 +630,114 @@ const sn = async ({
630
630
  locationIds: d,
631
631
  orientationTypes: p,
632
632
  isCombinedLocationLayout: f,
633
- attachFiles: S,
633
+ attachFiles: F,
634
634
  globalFilters: v
635
635
  }) => {
636
- const { businessId: i } = re(ke()), { currentReport: w, overviewReport: k } = Pe(), { selectedNavigationTab: te } = je(), x = Me(), { compareDateRange: g } = re(x), { restaurants: u, warehouses: m, timezone: h } = x, { globalFilters: N } = Ge(), { getTileSorts: I } = Ht();
636
+ const { businessId: u, scopePath: E, requestBusinessIds: Q } = oe(ke()), { currentReport: _, overviewReport: O } = Me(), { selectedNavigationTab: g } = je(), c = Pe(), { compareDateRange: m } = oe(c), { restaurants: b, warehouses: y, timezone: C } = c, { globalFilters: R } = Ge(), { getTileSorts: H } = Ht();
637
637
  if (l.length === 0) {
638
638
  console.error("No email addresses provided.");
639
639
  return;
640
640
  }
641
- let O = (w == null ? void 0 : w.id) || "", L = (w == null ? void 0 : w.name) || "", U = Ue(w == null ? void 0 : w.tiles);
642
- te === "overview" && k && (O = k == null ? void 0 : k.id, L = k.name, U = Ue(k == null ? void 0 : k.tiles));
643
- const j = te === "overview" && k ? k : w, le = Ke(te);
644
- if (!Qe({
645
- report: j,
646
- pageSubject: le,
641
+ let z = (_ == null ? void 0 : _.id) || "", q = (_ == null ? void 0 : _.name) || "", ee = Ue(_ == null ? void 0 : _.tiles);
642
+ g === "overview" && O && (z = O == null ? void 0 : O.id, q = O.name, ee = Ue(O == null ? void 0 : O.tiles));
643
+ const le = g === "overview" && O ? O : _, Z = Je(g);
644
+ if (!Ke({
645
+ report: le,
646
+ pageSubject: Z,
647
647
  dateRange: s,
648
- compareDateRange: g.value,
649
- timezone: h
648
+ compareDateRange: m.value,
649
+ timezone: C
650
650
  }))
651
651
  return;
652
- const X = v ?? N, ne = U.map((_) => qe(_.widget, X, _.id)), C = {
653
- businessId: i.value,
652
+ const N = v ?? R, W = ee.map((U) => Qe(U.widget, N, U.id)), ae = {
653
+ businessId: u.value || void 0,
654
654
  status: Yt.generating,
655
655
  dateRange: {
656
656
  start: s.startDate,
657
657
  end: s.endDate
658
658
  },
659
- reportName: L,
659
+ reportName: q,
660
660
  emails: l,
661
- configs: ne.map((_, K) => {
662
- var Y, H, ae, z;
661
+ configs: W.map((U, K) => {
662
+ var se, $, k, ce;
663
663
  return {
664
- requests: gt.getQueryRequests({
665
- widget: _,
664
+ requests: St.getQueryRequests({
665
+ widget: U,
666
666
  dateRange: [s.startDate, s.endDate],
667
- compareDateRange: g.value.startDate && g.value.endDate ? [g.value.startDate, g.value.endDate] : void 0,
667
+ compareDateRange: m.value.startDate && m.value.endDate ? [m.value.startDate, m.value.endDate] : void 0,
668
668
  timeRange: [
669
- E().tz(h).hour(Number((Y = r.start) == null ? void 0 : Y.hour)).minute(Number((H = r.start) == null ? void 0 : H.minute)).toISOString(),
670
- E().tz(h).hour(Number((ae = r.end) == null ? void 0 : ae.hour)).minute(Number((z = r.end) == null ? void 0 : z.minute)).endOf("minutes").toISOString()
669
+ G().tz(C).hour(Number((se = r.start) == null ? void 0 : se.hour)).minute(Number(($ = r.start) == null ? void 0 : $.minute)).toISOString(),
670
+ G().tz(C).hour(Number((k = r.end) == null ? void 0 : k.hour)).minute(Number((ce = r.end) == null ? void 0 : ce.minute)).endOf("minutes").toISOString()
671
671
  ],
672
- businessIds: i ? [i.value] : [],
672
+ businessIds: Q.value,
673
673
  restaurantIds: d.filter(
674
- (R) => u.find((oe) => oe.id === R)
674
+ (ue) => b.find((re) => re.id === ue)
675
675
  ),
676
676
  warehouseIds: d.filter(
677
- (R) => m.find((oe) => oe.id === R)
677
+ (ue) => y.find((re) => re.id === ue)
678
678
  ),
679
- timezone: h
679
+ timezone: C
680
680
  }),
681
681
  index: K,
682
682
  drillDimension: null,
683
- ...Xt(_),
684
- globalSorts: I(K)
683
+ ...Xt(U),
684
+ globalSorts: H(K)
685
685
  };
686
686
  }),
687
- reportId: O,
687
+ reportId: z,
688
688
  type: n,
689
689
  orientationTypes: p,
690
690
  isCombinedLocationLayout: f,
691
- attachFiles: S
691
+ attachFiles: F
692
692
  };
693
- await St.fetch({
693
+ await gt.fetch({
694
694
  fetchType: Oe.Post,
695
- url: `/${i.value}/reports/email?lang=${xe()}`,
696
- data: C,
695
+ url: `/${E.value}/reports/email?lang=${xe()}`,
696
+ data: ae,
697
697
  requestConfig: { timeout: 1e3 * 60 * 3 }
698
698
  });
699
699
  }, Qn = async (l) => {
700
- const { businessId: n } = re(ke());
701
- await St.fetch({
700
+ const { scopePath: n } = oe(ke());
701
+ await gt.fetch({
702
702
  fetchType: Oe.Post,
703
703
  url: `/${n.value}/reports/resend-email?lang=${xe()}`,
704
704
  data: { jobId: l },
705
705
  requestConfig: { timeout: 1e3 * 60 * 3 }
706
706
  });
707
707
  }, Kn = async () => {
708
- const { businessId: l } = re(ke());
708
+ const { scopePath: l } = oe(ke());
709
709
  return await Ae.fetch({
710
710
  fetchType: Oe.Get,
711
711
  url: `/${l.value}/reports/email-recipients`
712
712
  });
713
713
  }, Jn = async (l) => {
714
- const { businessId: n } = re(ke());
714
+ const { scopePath: n } = oe(ke());
715
715
  await Ae.fetch({
716
716
  fetchType: Oe.Post,
717
717
  url: `/${n.value}/reports/email-recipient/delete`,
718
718
  data: { email: l }
719
719
  });
720
720
  }, on = "mf-reportwidget-result-store", un = Ft(on, () => {
721
- const l = ve({}), n = ve(0), s = ge(() => n.value === 0);
721
+ const l = ye({}), n = ye(0), s = ge(() => n.value === 0);
722
722
  function r() {
723
723
  n.value += 1;
724
724
  }
725
725
  function d() {
726
726
  n.value = Math.max(0, n.value - 1);
727
727
  }
728
- function p(v, i) {
728
+ function p(v, u) {
729
729
  if (v)
730
- if (i === null)
730
+ if (u === null)
731
731
  l.value[v] = [];
732
732
  else {
733
- const w = l.value[v] ?? [];
734
- l.value[v] = Array.from(/* @__PURE__ */ new Set([...w, ...i]));
733
+ const E = l.value[v] ?? [];
734
+ l.value[v] = Array.from(/* @__PURE__ */ new Set([...E, ...u]));
735
735
  }
736
736
  }
737
737
  function f(v) {
738
738
  return v ? l.value[v] ?? [] : [];
739
739
  }
740
- function S() {
740
+ function F() {
741
741
  l.value = {};
742
742
  }
743
743
  return {
@@ -748,18 +748,18 @@ const sn = async ({
748
748
  finishWidgetResultLoading: d,
749
749
  setWidgetResult: p,
750
750
  getWidgetResult: f,
751
- clearAllWidgetResults: S
751
+ clearAllWidgetResults: F
752
752
  };
753
- }), Ut = (l, n = "en") => E().set("hour", l.hour).set("minute", l.minute).locale(n).format("h:mm A"), cn = (l, n) => {
754
- const s = E().set("hour", l.hour).set("minute", l.minute);
755
- return E().set("hour", n.hour).set("minute", n.minute) < s ? "+1" : "";
753
+ }), Wt = (l, n = "en") => G().set("hour", l.hour).set("minute", l.minute).locale(n).format("h:mm A"), cn = (l, n) => {
754
+ const s = G().set("hour", l.hour).set("minute", l.minute);
755
+ return G().set("hour", n.hour).set("minute", n.minute) < s ? "+1" : "";
756
756
  };
757
- function jt(l, n) {
757
+ function Ut(l, n) {
758
758
  return l.isSystem ? n("reportV5.reportHour.fullDay") : l.name;
759
759
  }
760
- const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "text-fm-color-typo-primary" }, pn = { class: "text-fm-color-typo-secondary" }, fn = { class: "fm-typo-en-body-lg-600 mb-8" }, bn = { class: "flex items-center justify-center w-full" }, hn = { class: "fm-typo-en-body-lg-600 mb-8" }, vn = { class: "flex items-center justify-center" }, yn = { class: "flex flex-row mb-4 px-4 gap-2" }, gn = /* @__PURE__ */ yt({
760
+ const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "text-fm-color-typo-primary" }, pn = { class: "text-fm-color-typo-secondary" }, fn = { class: "fm-typo-en-body-lg-600 mb-8" }, hn = { class: "flex items-center justify-center w-full" }, bn = { class: "fm-typo-en-body-lg-600 mb-8" }, vn = { class: "flex items-center justify-center" }, yn = { class: "flex flex-row mb-4 px-4 gap-2" }, Sn = /* @__PURE__ */ yt({
761
761
  __name: "TimeRangeSelect",
762
- props: /* @__PURE__ */ lt({
762
+ props: /* @__PURE__ */ nt({
763
763
  defaultDateRange: {
764
764
  type: Array,
765
765
  default: () => [
@@ -797,32 +797,32 @@ const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "
797
797
  },
798
798
  selectTimeDefaultModifiers: {}
799
799
  }),
800
- emits: /* @__PURE__ */ lt(["update", "chip-closed"], ["update:timeRange", "update:selectTimeDefault"]),
800
+ emits: /* @__PURE__ */ nt(["update", "chip-closed"], ["update:timeRange", "update:selectTimeDefault"]),
801
801
  setup(l, { emit: n }) {
802
802
  const { t: s, locale: r } = Jt(), d = ft(l, "timeRange"), p = n, f = ft(l, "selectTimeDefault");
803
- function S(g) {
804
- g && (d.value = g, p("update", d.value)), k.value = !1;
803
+ function F(g) {
804
+ g && (d.value = g, p("update", d.value)), Q.value = !1;
805
805
  }
806
806
  function v(g) {
807
- const u = g.split(":"), m = E().set("hour", Number(u[0])).set("minute", Number(u[1]));
807
+ const c = g.split(":"), m = G().set("hour", Number(c[0])).set("minute", Number(c[1]));
808
808
  return {
809
809
  hours: Number(m.format("h")),
810
810
  minutes: Number(m.format("m")),
811
811
  period: m.format("A")
812
812
  };
813
813
  }
814
- const i = ve(JSON.parse(JSON.stringify(d.value)));
815
- function w(g, u) {
816
- i.value.start = JSON.parse(JSON.stringify(g)), i.value.end = JSON.parse(JSON.stringify(u));
814
+ const u = ye(JSON.parse(JSON.stringify(d.value)));
815
+ function E(g, c) {
816
+ u.value.start = JSON.parse(JSON.stringify(g)), u.value.end = JSON.parse(JSON.stringify(c));
817
817
  }
818
818
  Ie(
819
819
  () => [d.value, l.defaultDateRange],
820
820
  () => {
821
821
  if (d.value) {
822
822
  const g = l.defaultDateRange.findIndex(
823
- (u) => {
824
- var m, h, N, I;
825
- return u.startTime.hour === ((m = d.value.start) == null ? void 0 : m.hour) && u.startTime.minute === ((h = d.value.start) == null ? void 0 : h.minute) && u.endTime.hour === ((N = d.value.end) == null ? void 0 : N.hour) && u.endTime.minute === ((I = d.value.end) == null ? void 0 : I.minute);
823
+ (c) => {
824
+ var m, b, y, C;
825
+ return c.startTime.hour === ((m = d.value.start) == null ? void 0 : m.hour) && c.startTime.minute === ((b = d.value.start) == null ? void 0 : b.minute) && c.endTime.hour === ((y = d.value.end) == null ? void 0 : y.hour) && c.endTime.minute === ((C = d.value.end) == null ? void 0 : C.minute);
826
826
  }
827
827
  ) + 1;
828
828
  g !== 0 ? f.value = g : f.value = l.defaultDateRange.length + 1;
@@ -830,63 +830,63 @@ const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "
830
830
  },
831
831
  { deep: !0, immediate: !0 }
832
832
  );
833
- const k = ve(!1);
834
- function te(g) {
833
+ const Q = ye(!1);
834
+ function _(g) {
835
835
  p("chip-closed", g);
836
836
  }
837
- const x = ge(() => l.label ? l.label : Qt({
837
+ const O = ge(() => l.label ? l.label : Qt({
838
838
  startTime: d.value.start,
839
839
  endTime: d.value.end,
840
840
  locale: r.value
841
841
  }));
842
- return (g, u) => {
843
- const m = ee("FmChip"), h = ee("FmRadio"), N = ee("FmMenuDivider"), I = ee("FmRadioGroup"), O = ee("FmTimeInput"), L = ee("FmButton"), U = ee("FmPopover");
844
- return J(), fe("div", null, [
845
- P(U, {
846
- "show-popover": k.value,
842
+ return (g, c) => {
843
+ const m = te("FmChip"), b = te("FmRadio"), y = te("FmMenuDivider"), C = te("FmRadioGroup"), R = te("FmTimeInput"), H = te("FmButton"), z = te("FmPopover");
844
+ return X(), he("div", null, [
845
+ M(z, {
846
+ "show-popover": Q.value,
847
847
  placement: "bottom",
848
- onPopoverChanged: u[6] || (u[6] = (j) => k.value = j)
848
+ onPopoverChanged: c[6] || (c[6] = (q) => Q.value = q)
849
849
  }, {
850
- "popover-button": ue(() => [
851
- P(Kt, {
850
+ "popover-button": ie(() => [
851
+ M(Kt, {
852
852
  "left-icon": l.label ? "filter_alt" : "schedule",
853
- label: x.value,
853
+ label: O.value,
854
854
  removable: l.removable,
855
- onChipClosed: u[0] || (u[0] = (j) => te(!0))
855
+ onChipClosed: c[0] || (c[0] = (q) => _(!0))
856
856
  }, null, 8, ["left-icon", "label", "removable"])
857
857
  ]),
858
- default: ue(() => {
859
- var j, le, X, ne;
858
+ default: ie(() => {
859
+ var q, ee, le, Z;
860
860
  return [
861
- Q("div", dn, [
862
- P(I, {
861
+ Y("div", dn, [
862
+ M(C, {
863
863
  modelValue: f.value,
864
- "onUpdate:modelValue": u[1] || (u[1] = (C) => f.value = C)
864
+ "onUpdate:modelValue": c[1] || (c[1] = (N) => f.value = N)
865
865
  }, {
866
- default: ue(() => [
867
- (J(!0), fe(Le, null, ht(l.defaultDateRange, (C, _) => (J(), we(h, {
868
- key: `range_${_}`,
869
- value: _ + 1,
870
- label: D(jt)(C, D(s)),
871
- onClick: (K) => w(C.startTime, C.endTime)
866
+ default: ie(() => [
867
+ (X(!0), he(Le, null, bt(l.defaultDateRange, (N, W) => (X(), De(b, {
868
+ key: `range_${W}`,
869
+ value: W + 1,
870
+ label: D(Ut)(N, D(s)),
871
+ onClick: (ae) => E(N.startTime, N.endTime)
872
872
  }, {
873
- label: ue(() => [
874
- Q("p", mn, [
875
- nt(he(D(jt)(C, D(s))) + " ", 1),
876
- xl(P(m, {
873
+ label: ie(() => [
874
+ Y("p", mn, [
875
+ at(ve(D(Ut)(N, D(s))) + " ", 1),
876
+ xl(M(m, {
877
877
  label: D(s)("report.common.default"),
878
878
  class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
879
879
  compact: ""
880
880
  }, null, 8, ["label"]), [
881
- [Al, C.isDefault]
881
+ [Al, N.isDefault]
882
882
  ])
883
883
  ]),
884
- Q("p", pn, he(D(Ut)(C.startTime, D(xe)())) + " - " + he(D(Ut)(C.endTime, D(xe)())) + " " + he(D(cn)(C.startTime, C.endTime)), 1)
884
+ Y("p", pn, ve(D(Wt)(N.startTime, D(xe)())) + " - " + ve(D(Wt)(N.endTime, D(xe)())) + " " + ve(D(cn)(N.startTime, N.endTime)), 1)
885
885
  ]),
886
886
  _: 2
887
887
  }, 1032, ["value", "label", "onClick"]))), 128)),
888
- P(N),
889
- P(h, {
888
+ M(y),
889
+ M(b, {
890
890
  key: "range_custom",
891
891
  label: D(s)("report.common.custom"),
892
892
  value: l.defaultDateRange.length + 1
@@ -894,46 +894,46 @@ const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "
894
894
  ]),
895
895
  _: 1
896
896
  }, 8, ["modelValue"]),
897
- f.value === l.defaultDateRange.length + 1 ? (J(), fe(Le, { key: 0 }, [
898
- Q("p", fn, he(D(s)("report.date.startingTime")), 1),
899
- Q("div", bn, [
900
- P(O, {
901
- "model-value": v(`${(j = i.value.start) == null ? void 0 : j.hour}:${(le = i.value.start) == null ? void 0 : le.minute}`),
902
- "onUpdate:modelValue": u[2] || (u[2] = (C) => {
903
- if (i.value.start) {
904
- const _ = D(E)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
897
+ f.value === l.defaultDateRange.length + 1 ? (X(), he(Le, { key: 0 }, [
898
+ Y("p", fn, ve(D(s)("report.date.startingTime")), 1),
899
+ Y("div", hn, [
900
+ M(R, {
901
+ "model-value": v(`${(q = u.value.start) == null ? void 0 : q.hour}:${(ee = u.value.start) == null ? void 0 : ee.minute}`),
902
+ "onUpdate:modelValue": c[2] || (c[2] = (N) => {
903
+ if (u.value.start) {
904
+ const W = D(G)(`${N.hours}:${N.minutes} ${N.period}`, "h:m A").locale(
905
905
  D(xe)()
906
906
  );
907
- i.value.start.hour = _.get("hour"), i.value.start.minute = _.get("minute");
907
+ u.value.start.hour = W.get("hour"), u.value.start.minute = W.get("minute");
908
908
  }
909
909
  })
910
910
  }, null, 8, ["model-value"])
911
911
  ]),
912
- Q("p", hn, he(D(s)("report.date.endingTime")), 1),
913
- Q("div", vn, [
914
- P(O, {
915
- "model-value": v(`${(X = i.value.end) == null ? void 0 : X.hour}:${(ne = i.value.end) == null ? void 0 : ne.minute}`),
916
- "onUpdate:modelValue": u[3] || (u[3] = (C) => {
917
- if (i.value.end) {
918
- const _ = D(E)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
912
+ Y("p", bn, ve(D(s)("report.date.endingTime")), 1),
913
+ Y("div", vn, [
914
+ M(R, {
915
+ "model-value": v(`${(le = u.value.end) == null ? void 0 : le.hour}:${(Z = u.value.end) == null ? void 0 : Z.minute}`),
916
+ "onUpdate:modelValue": c[3] || (c[3] = (N) => {
917
+ if (u.value.end) {
918
+ const W = D(G)(`${N.hours}:${N.minutes} ${N.period}`, "h:m A").locale(
919
919
  D(xe)()
920
920
  );
921
- i.value.end.hour = _.get("hour"), i.value.end.minute = _.get("minute");
921
+ u.value.end.hour = W.get("hour"), u.value.end.minute = W.get("minute");
922
922
  }
923
923
  })
924
924
  }, null, 8, ["model-value"])
925
925
  ])
926
- ], 64)) : bt("", !0),
927
- Q("div", yn, [
928
- u[7] || (u[7] = Q("div", { class: "grow" }, null, -1)),
929
- P(L, {
926
+ ], 64)) : ht("", !0),
927
+ Y("div", yn, [
928
+ c[7] || (c[7] = Y("div", { class: "grow" }, null, -1)),
929
+ M(H, {
930
930
  label: D(s)("report.common.cancel"),
931
931
  variant: "tertiary",
932
- onClick: u[4] || (u[4] = (C) => k.value = !1)
932
+ onClick: c[4] || (c[4] = (N) => Q.value = !1)
933
933
  }, null, 8, ["label"]),
934
- P(L, {
934
+ M(H, {
935
935
  label: D(s)("report.common.apply"),
936
- onClick: u[5] || (u[5] = () => S(JSON.parse(JSON.stringify(i.value))))
936
+ onClick: c[5] || (c[5] = () => F(JSON.parse(JSON.stringify(u.value))))
937
937
  }, null, 8, ["label"])
938
938
  ])
939
939
  ])
@@ -946,7 +946,7 @@ const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "
946
946
  }
947
947
  }), Yn = /* @__PURE__ */ yt({
948
948
  __name: "BaseDialog",
949
- props: /* @__PURE__ */ lt({
949
+ props: /* @__PURE__ */ nt({
950
950
  title: {
951
951
  type: String,
952
952
  default: "Title"
@@ -963,35 +963,35 @@ const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "
963
963
  modelValue: { type: Boolean, required: !0 },
964
964
  modelModifiers: {}
965
965
  }),
966
- emits: /* @__PURE__ */ lt(["confirm"], ["update:modelValue"]),
966
+ emits: /* @__PURE__ */ nt(["confirm"], ["update:modelValue"]),
967
967
  setup(l, { emit: n }) {
968
968
  const s = ft(l, "modelValue"), r = l, d = n;
969
969
  return Ie(s, () => {
970
970
  s.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
971
971
  }), (p, f) => {
972
- const S = ee("FmButton"), v = ee("FmDialog");
973
- return J(), we(v, {
972
+ const F = te("FmButton"), v = te("FmDialog");
973
+ return X(), De(v, {
974
974
  modelValue: s.value,
975
- "onUpdate:modelValue": f[2] || (f[2] = (i) => s.value = i),
975
+ "onUpdate:modelValue": f[2] || (f[2] = (u) => s.value = u),
976
976
  overlay: ""
977
977
  }, {
978
- "dialog-header": ue(() => [
979
- nt(he(r.title), 1)
978
+ "dialog-header": ie(() => [
979
+ at(ve(r.title), 1)
980
980
  ]),
981
- default: ue(() => [
982
- qt(p.$slots, "content")
981
+ default: ie(() => [
982
+ jt(p.$slots, "content")
983
983
  ]),
984
- "dialog-footer": ue(() => [
985
- f[3] || (f[3] = Q("div", { class: "grow" }, null, -1)),
986
- P(S, {
984
+ "dialog-footer": ie(() => [
985
+ f[3] || (f[3] = Y("div", { class: "grow" }, null, -1)),
986
+ M(F, {
987
987
  label: r.secondaryButtonLabel,
988
988
  variant: "tertiary",
989
- onClick: f[0] || (f[0] = (i) => s.value = !1)
989
+ onClick: f[0] || (f[0] = (u) => s.value = !1)
990
990
  }, null, 8, ["label"]),
991
- P(S, {
991
+ M(F, {
992
992
  label: r.primaryButtonLabel,
993
993
  variant: "primary",
994
- onClick: f[1] || (f[1] = (i) => d("confirm"))
994
+ onClick: f[1] || (f[1] = (u) => d("confirm"))
995
995
  }, null, 8, ["label"])
996
996
  ]),
997
997
  _: 3
@@ -1000,22 +1000,22 @@ const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "
1000
1000
  }
1001
1001
  });
1002
1002
  var $e = /* @__PURE__ */ ((l) => (l.Select = "Select", l.TextField = "TextField", l.Timestamp = "Timestamp", l))($e || {});
1003
- function Sn(l) {
1003
+ function gn(l) {
1004
1004
  let n = !1, s = 1;
1005
1005
  switch (l) {
1006
- case W.Equal:
1007
- case W.NotEqual:
1008
- case W.Like:
1009
- case W.NotLike:
1006
+ case j.Equal:
1007
+ case j.NotEqual:
1008
+ case j.Like:
1009
+ case j.NotLike:
1010
1010
  n = !1, s = 1;
1011
1011
  break;
1012
- case W.GreaterThan:
1013
- case W.GreaterThanOrEqual:
1014
- case W.LessThan:
1015
- case W.LessThanOrEqual:
1012
+ case j.GreaterThan:
1013
+ case j.GreaterThanOrEqual:
1014
+ case j.LessThan:
1015
+ case j.LessThanOrEqual:
1016
1016
  n = !0, s = 1;
1017
1017
  break;
1018
- case W.Between:
1018
+ case j.Between:
1019
1019
  n = !0, s = 2;
1020
1020
  break;
1021
1021
  }
@@ -1030,7 +1030,7 @@ function Hn({
1030
1030
  dataType: s,
1031
1031
  t: r
1032
1032
  }) {
1033
- const { fixed: d, count: p } = Sn(l);
1033
+ const { fixed: d, count: p } = gn(l);
1034
1034
  switch (s) {
1035
1035
  case be.String:
1036
1036
  return {
@@ -1185,7 +1185,7 @@ function pt({
1185
1185
  const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-flex max-w-[460px]" }, Dn = {
1186
1186
  key: 0,
1187
1187
  class: "flex justify-center my-2"
1188
- }, Tn = { class: "px-2 pb-8" }, Vn = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Nn = { class: "px-2 pb-8" }, Cn = { class: "flex items-start w-full" }, kn = ["onClick"], On = { class: "fm-typo-en-body-md-400" }, _n = { key: 0 }, Rn = { class: "px-12 py-3" }, In = { class: "flex items-center justify-between" }, $n = { class: "text-xs max-w-[200px]" }, xn = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Ce = "__EMPTY__", Fe = "__NO_SELECTION__", ea = /* @__PURE__ */ yt({
1188
+ }, Tn = { class: "px-2 pb-8" }, Vn = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Nn = { class: "px-2 pb-8" }, Cn = { class: "flex items-start w-full" }, kn = ["onClick"], On = { class: "fm-typo-en-body-md-400" }, _n = { key: 0 }, Rn = { class: "px-12 py-3" }, In = { class: "flex items-center justify-between" }, $n = { class: "text-xs max-w-[200px]" }, xn = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Ce = "__EMPTY__", we = "__NO_SELECTION__", ea = /* @__PURE__ */ yt({
1189
1189
  __name: "GlobalFilterSelect",
1190
1190
  props: {
1191
1191
  globalFilterId: {},
@@ -1197,144 +1197,144 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1197
1197
  isDialogGlobalFilter: { type: Boolean }
1198
1198
  },
1199
1199
  setup(l) {
1200
- const n = l, { t: s, locale: r } = Jt(), { currentReport: d, editingTile: p } = re(Pe());
1201
- let { timeRange: f, dateRange: S, selectedLocationIds: v, timezone: i } = re(Me()), { globalFilters: w } = re(Ge()), { schemas: k } = re(Wl()), {
1202
- showMore: te,
1203
- getGlobalFilter: x,
1200
+ const n = l, { t: s, locale: r } = Jt(), { currentReport: d, editingTile: p } = oe(Me());
1201
+ let { timeRange: f, dateRange: F, selectedLocationIds: v, timezone: u } = oe(Pe()), { globalFilters: E } = oe(Ge()), { schemas: Q } = oe(ql()), {
1202
+ showMore: _,
1203
+ getGlobalFilter: O,
1204
1204
  setGlobalFilter: g,
1205
- setIncludeUnavailable: u,
1205
+ setIncludeUnavailable: c,
1206
1206
  getGlobalFilterKey: m,
1207
- isMenuOpen: h,
1208
- getGlobalFilterLabel: N,
1209
- incrementAppliedTilesFiltersVersion: I
1207
+ isMenuOpen: b,
1208
+ getGlobalFilterLabel: y,
1209
+ incrementAppliedTilesFiltersVersion: C
1210
1210
  } = Ge();
1211
- const O = ge(() => s("report.input.empty")), L = ["NULL", "", " "];
1212
- let U;
1213
- const j = un(), { getWidgetResult: le } = j, { widgetResults: X, isAllWidgetResultLoaded: ne } = re(j), C = ve(!1), _ = ve(!1), K = ve(""), Y = ve({}), H = ge(() => {
1211
+ const R = ge(() => s("report.input.empty")), H = ["NULL", "", " "];
1212
+ let z;
1213
+ const q = un(), { getWidgetResult: ee } = q, { widgetResults: le, isAllWidgetResultLoaded: Z } = oe(q), N = ye(!1), W = ye(!1), ae = ye(""), U = ye({}), K = ge(() => {
1214
1214
  var e;
1215
1215
  return n.globalFilterId ?? ((e = d.value) == null ? void 0 : e.id) ?? "";
1216
- }), ae = ge(() => n.report ?? d.value), z = ve([]);
1217
- function R(e) {
1218
- return `${H.value}|instance:${e}`;
1216
+ }), se = ge(() => n.report ?? d.value), $ = ye([]);
1217
+ function k(e) {
1218
+ return `${K.value}|instance:${e}`;
1219
1219
  }
1220
- function oe(e) {
1221
- return ct(e) ? !1 : C.value ? !0 : n.isDialogGlobalFilter ? _.value : !ne.value && e.options.length === 0;
1220
+ function ce(e) {
1221
+ return ct(e) ? !1 : N.value ? !0 : n.isDialogGlobalFilter ? W.value : !Z.value && e.options.length === 0;
1222
1222
  }
1223
- function me(e, t) {
1223
+ function ue(e, t) {
1224
1224
  return (e == null ? void 0 : e.startDate) === (t == null ? void 0 : t.startDate) && (e == null ? void 0 : e.endDate) === (t == null ? void 0 : t.endDate);
1225
1225
  }
1226
- function Se(e, t) {
1227
- var o, a, b, T, y, A, M, $;
1228
- return ((o = e == null ? void 0 : e.start) == null ? void 0 : o.hour) === ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) && ((b = e == null ? void 0 : e.start) == null ? void 0 : b.minute) === ((T = t == null ? void 0 : t.start) == null ? void 0 : T.minute) && ((y = e == null ? void 0 : e.end) == null ? void 0 : y.hour) === ((A = t == null ? void 0 : t.end) == null ? void 0 : A.hour) && ((M = e == null ? void 0 : e.end) == null ? void 0 : M.minute) === (($ = t == null ? void 0 : t.end) == null ? void 0 : $.minute);
1226
+ function re(e, t) {
1227
+ var o, a, h, T, S, x, P, I;
1228
+ return ((o = e == null ? void 0 : e.start) == null ? void 0 : o.hour) === ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) && ((h = e == null ? void 0 : e.start) == null ? void 0 : h.minute) === ((T = t == null ? void 0 : t.start) == null ? void 0 : T.minute) && ((S = e == null ? void 0 : e.end) == null ? void 0 : S.hour) === ((x = t == null ? void 0 : t.end) == null ? void 0 : x.hour) && ((P = e == null ? void 0 : e.end) == null ? void 0 : P.minute) === ((I = t == null ? void 0 : t.end) == null ? void 0 : I.minute);
1229
1229
  }
1230
- function ye(e, t) {
1230
+ function Fe(e, t) {
1231
1231
  return !e || !t ? e === t : e.length === t.length && e.every((o, a) => o === t[a]);
1232
1232
  }
1233
- const ce = ge(() => {
1233
+ const de = ge(() => {
1234
1234
  if (!(n.isDialogGlobalFilter || !!p.value))
1235
1235
  return !1;
1236
- const t = n.dateRange ?? S.value, o = n.timeRange ?? f.value, a = n.locationIds ?? v.value;
1237
- return me(t, S.value) && Se(o, f.value) && ye(a, v.value);
1236
+ const t = n.dateRange ?? F.value, o = n.timeRange ?? f.value, a = n.locationIds ?? v.value;
1237
+ return ue(t, F.value) && re(o, f.value) && Fe(a, v.value);
1238
1238
  });
1239
- function ie(e) {
1240
- return e ? [...e.tileIds ?? []] : Array.from(new Set(He.value.flatMap((t) => t.tileIds ?? [])));
1239
+ function Se(e) {
1240
+ return e ? [...e.tileIds ?? []] : Array.from(new Set(Ze.value.flatMap((t) => t.tileIds ?? [])));
1241
1241
  }
1242
- function se(e) {
1243
- n.isDialogGlobalFilter || I(ie(e));
1242
+ function ne(e) {
1243
+ n.isDialogGlobalFilter || C(Se(e));
1244
1244
  }
1245
- function Z(e) {
1246
- return e.filter((t) => t !== Fe);
1245
+ function L(e) {
1246
+ return e.filter((t) => t !== we);
1247
1247
  }
1248
- function De(e) {
1248
+ function Te(e) {
1249
1249
  const t = e.some(
1250
1250
  (a) => a === Ce || a === "NULL" || typeof a == "string" && (a === "" || a === " ")
1251
1251
  ), o = e.flatMap(
1252
- (a) => a === Ce ? [...L] : [a]
1252
+ (a) => a === Ce ? [...H] : [a]
1253
1253
  );
1254
- return t ? Array.from(/* @__PURE__ */ new Set([...o, ...L])) : Array.from(new Set(o));
1254
+ return t ? Array.from(/* @__PURE__ */ new Set([...o, ...H])) : Array.from(new Set(o));
1255
1255
  }
1256
- function Te(e) {
1257
- const t = x(
1256
+ function me(e) {
1257
+ const t = O(
1258
1258
  e.globalFilter,
1259
- R(e.id)
1259
+ k(e.id)
1260
1260
  ).selectedValues;
1261
1261
  return t != null && t.length ? t : e.selectedValues || [];
1262
1262
  }
1263
- function at(e) {
1264
- e.selectedValues = [], e.globalFilter.values = [], g(e.globalFilter, R(e.id), { selectedValues: [] });
1263
+ function Be(e) {
1264
+ e.selectedValues = [], e.globalFilter.values = [], g(e.globalFilter, k(e.id), { selectedValues: [] });
1265
1265
  }
1266
1266
  function st(e) {
1267
- const t = Je(e);
1268
- e.selectedValues = [...t], e.globalFilter.values = ul(e), g(e.globalFilter, R(e.id), {
1267
+ const t = Ye(e);
1268
+ e.selectedValues = [...t], e.globalFilter.values = ul(e), g(e.globalFilter, k(e.id), {
1269
1269
  selectedValues: t
1270
1270
  });
1271
1271
  }
1272
1272
  function ll(e) {
1273
- e.options = [], at(e);
1273
+ e.options = [], Be(e);
1274
1274
  }
1275
1275
  function Dt(e) {
1276
- e.keepSelection || at(e);
1276
+ e.keepSelection || Be(e);
1277
1277
  }
1278
1278
  function nl(e) {
1279
- const t = Z(Te(e));
1280
- Y.value[e.id] = [...t], at(e);
1279
+ const t = L(me(e));
1280
+ U.value[e.id] = [...t], Be(e);
1281
1281
  }
1282
1282
  function al() {
1283
- var a, b, T, y;
1284
- const e = S.value, t = f.value, o = v.value || [];
1283
+ var a, h, T, S;
1284
+ const e = F.value, t = f.value, o = v.value || [];
1285
1285
  return JSON.stringify({
1286
- globalFilterId: H.value,
1286
+ globalFilterId: K.value,
1287
1287
  startDate: (e == null ? void 0 : e.startDate) ?? null,
1288
1288
  endDate: (e == null ? void 0 : e.endDate) ?? null,
1289
1289
  startHour: ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) ?? null,
1290
- startMinute: ((b = t == null ? void 0 : t.start) == null ? void 0 : b.minute) ?? null,
1290
+ startMinute: ((h = t == null ? void 0 : t.start) == null ? void 0 : h.minute) ?? null,
1291
1291
  endHour: ((T = t == null ? void 0 : t.end) == null ? void 0 : T.hour) ?? null,
1292
- endMinute: ((y = t == null ? void 0 : t.end) == null ? void 0 : y.minute) ?? null,
1292
+ endMinute: ((S = t == null ? void 0 : t.end) == null ? void 0 : S.minute) ?? null,
1293
1293
  locationIds: o
1294
1294
  });
1295
1295
  }
1296
- function Je(e) {
1296
+ function Ye(e) {
1297
1297
  const t = e.selectedValues || [];
1298
- return Ve(t) ? [Fe] : e.keepSelection ? Z(t) : t;
1298
+ return Ve(t) ? [we] : e.keepSelection ? L(t) : t;
1299
1299
  }
1300
- function pe(e) {
1301
- const t = Z(e.selectedValues || []);
1300
+ function fe(e) {
1301
+ const t = L(e.selectedValues || []);
1302
1302
  if (t.length)
1303
1303
  return t.map((a) => String(a));
1304
- const o = Z(
1305
- x(e.globalFilter, R(e.id)).selectedValues
1304
+ const o = L(
1305
+ O(e.globalFilter, k(e.id)).selectedValues
1306
1306
  );
1307
1307
  return o.length ? o.map((a) => String(a)) : (e.globalFilter.values ?? []).map((a) => String(a));
1308
1308
  }
1309
1309
  function sl(e) {
1310
1310
  if (Ve(e.selectedValues || []))
1311
- return [Fe];
1312
- const t = Z(e.selectedValues || []);
1311
+ return [we];
1312
+ const t = L(e.selectedValues || []);
1313
1313
  if (t.length)
1314
1314
  return t;
1315
- const o = x(
1315
+ const o = O(
1316
1316
  e.globalFilter,
1317
- R(e.id)
1317
+ k(e.id)
1318
1318
  ).selectedValues;
1319
- return Ve(o || []) ? [Fe] : Z(o);
1319
+ return Ve(o || []) ? [we] : L(o);
1320
1320
  }
1321
1321
  function Ve(e) {
1322
- return e.includes(Fe);
1322
+ return e.includes(we);
1323
1323
  }
1324
1324
  function Tt(e) {
1325
1325
  return e === Ce || String(e ?? "").trim() === "";
1326
1326
  }
1327
1327
  function rt(e) {
1328
1328
  return [...e].sort((t, o) => {
1329
- const a = Tt(t.value), b = Tt(o.value);
1330
- return a !== b ? a ? -1 : 1 : t.label.localeCompare(o.label, r.value, {
1329
+ const a = Tt(t.value), h = Tt(o.value);
1330
+ return a !== h ? a ? -1 : 1 : t.label.localeCompare(o.label, r.value, {
1331
1331
  numeric: !0,
1332
1332
  sensitivity: "base"
1333
1333
  });
1334
1334
  });
1335
1335
  }
1336
1336
  function Vt(e) {
1337
- return e.type === be.String && !Be(e.globalFilter);
1337
+ return e.type === be.String && !ze(e.globalFilter);
1338
1338
  }
1339
1339
  function ot(e) {
1340
1340
  return (e.options || []).map((t) => t.value);
@@ -1343,19 +1343,19 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1343
1343
  return ot(e).length > 0;
1344
1344
  }
1345
1345
  function Ee(e) {
1346
- const t = Z(e.selectedValues || []);
1346
+ const t = L(e.selectedValues || []);
1347
1347
  return t.length ? t : Ve(e.selectedValues || []) ? [] : it(e) ? ot(e) : [];
1348
1348
  }
1349
1349
  function ut(e, t) {
1350
1350
  const o = new Set((e.options || []).map((a) => a.value));
1351
- return Z(t).filter((a) => o.has(a));
1351
+ return L(t).filter((a) => o.has(a));
1352
1352
  }
1353
1353
  function rl(e) {
1354
- const o = x(e.globalFilter, R(e.id)).selectedValues, a = n.isDialogGlobalFilter ? sl(e) : [];
1354
+ const o = O(e.globalFilter, k(e.id)).selectedValues, a = n.isDialogGlobalFilter ? sl(e) : [];
1355
1355
  if (Ve(e.selectedValues || []))
1356
- return [Fe];
1356
+ return [we];
1357
1357
  if (Ve(o || []))
1358
- return [Fe];
1358
+ return [we];
1359
1359
  if ((e.options || []).map((T) => T.value).length > 0) {
1360
1360
  const T = ut(
1361
1361
  e,
@@ -1363,72 +1363,72 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1363
1363
  );
1364
1364
  if (T.length)
1365
1365
  return T;
1366
- const y = ut(e, o);
1367
- if (y.length)
1368
- return y;
1366
+ const S = ut(e, o);
1367
+ if (S.length)
1368
+ return S;
1369
1369
  if (e.keepSelection) {
1370
- const A = ut(
1370
+ const x = ut(
1371
1371
  e,
1372
- Te(e)
1372
+ me(e)
1373
1373
  );
1374
- if (A.length)
1375
- return A;
1374
+ if (x.length)
1375
+ return x;
1376
1376
  }
1377
1377
  return [];
1378
1378
  }
1379
- return a.length ? [...a] : o.length ? [...o] : e.keepSelection ? Te(e) : [];
1379
+ return a.length ? [...a] : o.length ? [...o] : e.keepSelection ? me(e) : [];
1380
1380
  }
1381
1381
  function ol(e, t) {
1382
- const o = new Set(Z(t));
1382
+ const o = new Set(L(t));
1383
1383
  if (!o.size) return !1;
1384
- const a = (e.options || []).map((b) => b.value);
1385
- return a.length ? a.every((b) => o.has(b)) : !1;
1384
+ const a = (e.options || []).map((h) => h.value);
1385
+ return a.length ? a.every((h) => o.has(h)) : !1;
1386
1386
  }
1387
1387
  function il(e) {
1388
1388
  const t = e.selectedValues || [];
1389
- return Ve(t) || !it(e) ? !1 : Z(t).length === 0;
1389
+ return Ve(t) || !it(e) ? !1 : L(t).length === 0;
1390
1390
  }
1391
1391
  function ul(e) {
1392
- const t = Je(e), o = Z(t), a = De(o), b = Ve(t);
1392
+ const t = Ye(e), o = L(t), a = Te(o), h = Ve(t);
1393
1393
  if (il(e))
1394
1394
  return [];
1395
1395
  if (ol(e, t))
1396
1396
  return [];
1397
1397
  if (!e.keepSelection || n.isDialogGlobalFilter)
1398
- return a.length ? a : b ? [Ce] : [];
1398
+ return a.length ? a : h ? [Ce] : [];
1399
1399
  if (!it(e))
1400
- return a.length ? a : b ? [Ce] : [];
1400
+ return a.length ? a : h ? [Ce] : [];
1401
1401
  const T = new Set(
1402
- (e.options || []).filter((M) => M.available !== !1).map((M) => M.value)
1403
- ), y = o.filter(
1404
- (M) => T.has(M)
1405
- ), A = De(y);
1406
- return A.length ? A : b ? [Ce] : [];
1407
- }
1408
- function Ye(e) {
1409
- const t = Y.value[e.id];
1402
+ (e.options || []).filter((P) => P.available !== !1).map((P) => P.value)
1403
+ ), S = o.filter(
1404
+ (P) => T.has(P)
1405
+ ), x = Te(S);
1406
+ return x.length ? x : h ? [Ce] : [];
1407
+ }
1408
+ function He(e) {
1409
+ const t = U.value[e.id];
1410
1410
  if (t) {
1411
- e.selectedValues = [...t], st(e), delete Y.value[e.id];
1411
+ e.selectedValues = [...t], st(e), delete U.value[e.id];
1412
1412
  return;
1413
1413
  }
1414
1414
  e.selectedValues = rl(e), st(e);
1415
1415
  }
1416
1416
  function cl() {
1417
- z.value.forEach((e) => {
1418
- ce.value || Dt(e);
1417
+ $.value.forEach((e) => {
1418
+ de.value || Dt(e);
1419
1419
  });
1420
1420
  }
1421
1421
  function dl() {
1422
1422
  const e = al();
1423
- K.value !== e && z.value.forEach((o) => {
1423
+ ae.value !== e && $.value.forEach((o) => {
1424
1424
  if (o.keepSelection) {
1425
1425
  nl(o);
1426
1426
  return;
1427
1427
  }
1428
1428
  Dt(o);
1429
- }), K.value = e;
1429
+ }), ae.value = e;
1430
1430
  }
1431
- const He = ge(() => n.globalFilters ?? w.value);
1431
+ const Ze = ge(() => n.globalFilters ?? E.value);
1432
1432
  function ml(e) {
1433
1433
  return {
1434
1434
  schemaName: e.schemaName,
@@ -1446,74 +1446,74 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1446
1446
  return e.map((t) => ml(t));
1447
1447
  }
1448
1448
  function fl(e, t) {
1449
- const o = `${m(e, H.value)}|${t}`, a = x(e, R(o)), b = a.selectedValues.length ? [...a.selectedValues] : [...e.values ?? []];
1449
+ const o = `${m(e, K.value)}|${t}`, a = O(e, k(o)), h = a.selectedValues.length ? [...a.selectedValues] : [...e.values ?? []];
1450
1450
  return {
1451
1451
  id: o,
1452
1452
  globalFilter: e,
1453
1453
  search: a.search,
1454
1454
  options: a.options,
1455
1455
  type: Ct(e),
1456
- selectedValues: b,
1456
+ selectedValues: h,
1457
1457
  visibleCount: a.visibleCount,
1458
1458
  keepSelection: a.keepSelection,
1459
1459
  showAdvanced: a.showAdvanced
1460
1460
  };
1461
1461
  }
1462
- function bl() {
1463
- z.value = He.value.map(
1462
+ function hl() {
1463
+ $.value = Ze.value.map(
1464
1464
  (e, t) => fl(e, t)
1465
1465
  );
1466
1466
  }
1467
- const hl = ge(
1468
- () => JSON.stringify(pl(He.value))
1467
+ const bl = ge(
1468
+ () => JSON.stringify(pl(Ze.value))
1469
1469
  ), vl = ge(() => {
1470
- const e = He.value.map(
1471
- (t) => Mt(t, It())
1470
+ const e = Ze.value.map(
1471
+ (t) => Pt(t, It())
1472
1472
  );
1473
1473
  return JSON.stringify(
1474
1474
  e.map((t) => ({
1475
1475
  key: t,
1476
- values: X.value[t] ?? []
1476
+ values: le.value[t] ?? []
1477
1477
  }))
1478
1478
  );
1479
1479
  });
1480
1480
  Ie(
1481
1481
  () => ({
1482
- globalFilterId: H.value,
1483
- globalFiltersConfigSignature: hl.value
1482
+ globalFilterId: K.value,
1483
+ globalFiltersConfigSignature: bl.value
1484
1484
  }),
1485
1485
  (e, t) => {
1486
- t && t.globalFilterId !== e.globalFilterId && z.value.forEach((o) => {
1486
+ t && t.globalFilterId !== e.globalFilterId && $.value.forEach((o) => {
1487
1487
  o.options = [];
1488
- }), bl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && se(), ne.value && Xe();
1488
+ }), hl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && ne(), Z.value && et();
1489
1489
  },
1490
1490
  { immediate: !0 }
1491
1491
  ), Ie(
1492
1492
  [
1493
- ne,
1493
+ Z,
1494
1494
  f,
1495
- S,
1495
+ F,
1496
1496
  v,
1497
1497
  () => n.timeRange,
1498
1498
  () => n.dateRange,
1499
1499
  () => n.locationIds
1500
1500
  ],
1501
1501
  async () => {
1502
- n.isDialogGlobalFilter ? cl() : dl(), await Xe();
1502
+ n.isDialogGlobalFilter ? cl() : dl(), await et();
1503
1503
  },
1504
1504
  { immediate: !0 }
1505
1505
  ), Ie(
1506
1506
  [() => p.value],
1507
1507
  async () => {
1508
- z.value.forEach((e) => {
1508
+ $.value.forEach((e) => {
1509
1509
  e.options = [];
1510
- }), await Xe();
1510
+ }), await et();
1511
1511
  },
1512
1512
  { deep: !0 }
1513
1513
  ), Ie(
1514
1514
  () => vl.value,
1515
1515
  async (e, t) => {
1516
- e !== t && t && (n.isDialogGlobalFilter || Rt() || await Xe());
1516
+ e !== t && t && (n.isDialogGlobalFilter || Rt() || await et());
1517
1517
  }
1518
1518
  ), Ie(
1519
1519
  () => r.value,
@@ -1523,13 +1523,13 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1523
1523
  );
1524
1524
  function Nt(e, t) {
1525
1525
  var o;
1526
- return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ce ? O.value : e.type === be.Timestamp && e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay ? ((o = pt({
1526
+ return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ce ? R.value : e.type === be.Timestamp && e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay ? ((o = pt({
1527
1527
  dimensionOption: e.globalFilter.option,
1528
1528
  t: s
1529
- }).find((b) => String(b.value) === String(t))) == null ? void 0 : o.label) ?? String(t) : String(t);
1529
+ }).find((h) => String(h.value) === String(t))) == null ? void 0 : o.label) ?? String(t) : String(t);
1530
1530
  }
1531
1531
  function yl() {
1532
- z.value.forEach((e) => {
1532
+ $.value.forEach((e) => {
1533
1533
  if (!e.options.length) return;
1534
1534
  const t = e.options.map((o) => ({
1535
1535
  ...o,
@@ -1540,77 +1540,77 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1540
1540
  }
1541
1541
  function Ct(e) {
1542
1542
  var o;
1543
- const t = (o = k.value.find((a) => a.name === e.schemaName)) == null ? void 0 : o.fields.find((a) => a.name === e.name);
1543
+ const t = (o = Q.value.find((a) => a.name === e.schemaName)) == null ? void 0 : o.fields.find((a) => a.name === e.name);
1544
1544
  return t == null ? void 0 : t.type;
1545
1545
  }
1546
- function gl(e) {
1547
- var A, M;
1548
- if (!ae.value && !p.value) return [];
1549
- if (!((A = e.tileIds) != null && A.length)) return [];
1550
- const t = p.value ? [p.value] : Ue((M = ae.value) == null ? void 0 : M.tiles), { name: o = "", schemaName: a = "" } = e, b = t.filter(($) => {
1551
- var de, F;
1552
- const G = (de = $ == null ? void 0 : $.widget) == null ? void 0 : de.config;
1553
- if (!G || (F = e.tileIds) != null && F.length && !e.tileIds.includes($.id)) return !1;
1554
- const c = (G.dimensions ?? []).some(
1546
+ function Sl(e) {
1547
+ var x, P;
1548
+ if (!se.value && !p.value) return [];
1549
+ if (!((x = e.tileIds) != null && x.length)) return [];
1550
+ const t = p.value ? [p.value] : Ue((P = se.value) == null ? void 0 : P.tiles), { name: o = "", schemaName: a = "" } = e, h = t.filter((I) => {
1551
+ var pe, w;
1552
+ const A = (pe = I == null ? void 0 : I.widget) == null ? void 0 : pe.config;
1553
+ if (!A || (w = e.tileIds) != null && w.length && !e.tileIds.includes(I.id)) return !1;
1554
+ const i = (A.dimensions ?? []).some(
1555
1555
  (_e) => _e.schemaName === a && _e.name === o
1556
- ), q = (G.joinDatasources ?? []).some(
1557
- (_e) => (_e.dimensions ?? []).some((ze) => ze.schemaName === a && ze.name === o)
1558
- ), V = (G.schemaNames ?? []).includes(a);
1559
- return c || q || V;
1556
+ ), J = (A.joinDatasources ?? []).some(
1557
+ (_e) => (_e.dimensions ?? []).some((qe) => qe.schemaName === a && qe.name === o)
1558
+ ), V = (A.schemaNames ?? []).includes(a);
1559
+ return i || J || V;
1560
1560
  });
1561
- if (!b.length) return [];
1562
- const T = ($, G) => {
1563
- const c = /* @__PURE__ */ new Map(), q = (V) => {
1564
- const de = `${V.schemaName}:${V.name}:${V.operator}:${V.option ?? ""}:${V.dataFormula ?? ""}`, F = c.get(de);
1565
- F ? [W.Like, W.NotLike].includes(V.operator) ? F.values = Array.from(/* @__PURE__ */ new Set([...F.values ?? [], ...V.values ?? []])) : c.set(de, { ...V }) : c.set(de, { ...V });
1561
+ if (!h.length) return [];
1562
+ const T = (I, A) => {
1563
+ const i = /* @__PURE__ */ new Map(), J = (V) => {
1564
+ const pe = `${V.schemaName}:${V.name}:${V.operator}:${V.option ?? ""}:${V.dataFormula ?? ""}`, w = i.get(pe);
1565
+ w ? [j.Like, j.NotLike].includes(V.operator) ? w.values = Array.from(/* @__PURE__ */ new Set([...w.values ?? [], ...V.values ?? []])) : i.set(pe, { ...V }) : i.set(pe, { ...V });
1566
1566
  };
1567
- return $.forEach(q), G.forEach(q), Array.from(c.values());
1568
- }, y = ($) => {
1569
- var c;
1570
- const G = (c = $.dimensions) == null ? void 0 : c.find(
1571
- (q) => q.schemaName === a && q.name === o
1567
+ return I.forEach(J), A.forEach(J), Array.from(i.values());
1568
+ }, S = (I) => {
1569
+ var i;
1570
+ const A = (i = I.dimensions) == null ? void 0 : i.find(
1571
+ (J) => J.schemaName === a && J.name === o
1572
1572
  );
1573
1573
  return {
1574
1574
  name: o,
1575
1575
  schemaName: a,
1576
- label: (G == null ? void 0 : G.label) ?? o,
1576
+ label: (A == null ? void 0 : A.label) ?? o,
1577
1577
  hide: !1,
1578
1578
  option: e.option ?? null,
1579
- dataFormula: G == null ? void 0 : G.dataFormula
1579
+ dataFormula: A == null ? void 0 : A.dataFormula
1580
1580
  };
1581
1581
  };
1582
- return b.reduce(($, G) => {
1583
- var ze, Gt;
1584
- const c = (ze = G == null ? void 0 : G.widget) == null ? void 0 : ze.config;
1585
- if (!c) return $;
1586
- const q = y(c), V = (c.dimensions ?? []).some((Ne) => Ne.schemaName === a) || (c.schemaNames ?? []).includes(a), de = T(
1587
- c.filters ?? [],
1582
+ return h.reduce((I, A) => {
1583
+ var qe, Gt;
1584
+ const i = (qe = A == null ? void 0 : A.widget) == null ? void 0 : qe.config;
1585
+ if (!i) return I;
1586
+ const J = S(i), V = (i.dimensions ?? []).some((Ne) => Ne.schemaName === a) || (i.schemaNames ?? []).includes(a), pe = T(
1587
+ i.filters ?? [],
1588
1588
  (e.filters ?? []).filter((Ne) => {
1589
1589
  var Re;
1590
- return (Re = c.schemaNames) == null ? void 0 : Re.includes(Ne.schemaName);
1590
+ return (Re = i.schemaNames) == null ? void 0 : Re.includes(Ne.schemaName);
1591
1591
  })
1592
- ), F = (Gt = c.joinDatasources) == null ? void 0 : Gt.find(
1592
+ ), w = (Gt = i.joinDatasources) == null ? void 0 : Gt.find(
1593
1593
  (Ne) => (Ne.schemaNames ?? []).includes(a) || (Ne.dimensions ?? []).some((Re) => Re.schemaName === a)
1594
1594
  ), _e = T(
1595
- (F == null ? void 0 : F.filters) ?? [],
1595
+ (w == null ? void 0 : w.filters) ?? [],
1596
1596
  (e.filters ?? []).filter((Ne) => {
1597
1597
  var Re;
1598
- return (Re = F == null ? void 0 : F.schemaNames) == null ? void 0 : Re.includes(Ne.schemaName);
1598
+ return (Re = w == null ? void 0 : w.schemaNames) == null ? void 0 : Re.includes(Ne.schemaName);
1599
1599
  })
1600
1600
  );
1601
- return $.push({
1602
- type: Pt.Table,
1601
+ return I.push({
1602
+ type: Mt.Table,
1603
1603
  title: "Global Filter",
1604
1604
  config: {
1605
- schemaNames: c.schemaNames,
1606
- schemas: c.schemas,
1607
- dimensions: V ? [q] : [],
1608
- filters: de,
1605
+ schemaNames: i.schemaNames,
1606
+ schemas: i.schemas,
1607
+ dimensions: V ? [J] : [],
1608
+ filters: pe,
1609
1609
  sorts: V ? [{ name: o, schemaName: a, type: Bt.Asc, aggregation: null, dimensionOption: null }] : [],
1610
- joinDatasources: !V && F ? [
1610
+ joinDatasources: !V && w ? [
1611
1611
  {
1612
- ...F,
1613
- dimensions: [q],
1612
+ ...w,
1613
+ dimensions: [J],
1614
1614
  sorts: [
1615
1615
  {
1616
1616
  name: o,
@@ -1637,34 +1637,34 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1637
1637
  colWidths: null,
1638
1638
  isBlend: !1
1639
1639
  }
1640
- }), $;
1640
+ }), I;
1641
1641
  }, []);
1642
1642
  }
1643
1643
  function kt(e) {
1644
1644
  const t = new Set(Ee(e));
1645
1645
  return e.options.every((o) => t.has(o.value));
1646
1646
  }
1647
- function Sl(e) {
1648
- kt(e) ? e.selectedValues = [Fe] : e.selectedValues = [];
1647
+ function gl(e) {
1648
+ kt(e) ? e.selectedValues = [we] : e.selectedValues = [];
1649
1649
  }
1650
1650
  function Ot(e, t) {
1651
1651
  return Ee(e).includes(t);
1652
1652
  }
1653
1653
  const _t = ge(
1654
- () => z.value.map((e) => {
1654
+ () => $.value.map((e) => {
1655
1655
  const t = e.options, o = e.search.toLowerCase() ?? "";
1656
1656
  return t.filter(
1657
- (b) => b.label.toLowerCase().includes(o.toLowerCase())
1657
+ (h) => h.label.toLowerCase().includes(o.toLowerCase())
1658
1658
  ).slice(0, e.visibleCount);
1659
1659
  })
1660
1660
  );
1661
1661
  function Fl(e) {
1662
- e.visibleCount += 50, te(e.globalFilter, R(e.id), 50);
1662
+ e.visibleCount += 50, _(e.globalFilter, k(e.id), 50);
1663
1663
  }
1664
1664
  function wl(e, t) {
1665
- g(e.globalFilter, R(e.id), { search: t });
1665
+ g(e.globalFilter, k(e.id), { search: t });
1666
1666
  }
1667
- function Be(e) {
1667
+ function ze(e) {
1668
1668
  var t, o;
1669
1669
  return (((t = e.customOptions) == null ? void 0 : t.length) ?? 0) > 0 || (((o = e.customTimeRanges) == null ? void 0 : o.length) ?? 0) > 0;
1670
1670
  }
@@ -1673,55 +1673,55 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1673
1673
  return !((t = e.globalFilter.tileIds) != null && t.length);
1674
1674
  }
1675
1675
  function Rt() {
1676
- return (n.isDialogGlobalFilter || !!p.value) && !ce.value;
1676
+ return (n.isDialogGlobalFilter || !!p.value) && !de.value;
1677
1677
  }
1678
1678
  function It() {
1679
1679
  var e;
1680
- return n.isDialogGlobalFilter && ce.value && ((e = d.value) != null && e.id) ? d.value.id : H.value;
1680
+ return n.isDialogGlobalFilter && de.value && ((e = d.value) != null && e.id) ? d.value.id : K.value;
1681
1681
  }
1682
- function Ze(e) {
1682
+ function Xe(e) {
1683
1683
  return String(e ?? "").trim() === "" ? Ce : String(e);
1684
1684
  }
1685
1685
  function Dl(e) {
1686
1686
  var t, o;
1687
1687
  return (((t = e.customTimeRanges) == null ? void 0 : t.length) ?? 0) > 0 ? e.customTimeRanges.map((a) => ({
1688
- label: Ze(a.name),
1689
- value: Ze(a.name),
1688
+ label: Xe(a.name),
1689
+ value: Xe(a.name),
1690
1690
  available: !0
1691
1691
  })) : (((o = e.customOptions) == null ? void 0 : o.length) ?? 0) > 0 ? e.customOptions.map((a) => ({
1692
- label: Ze(a.label),
1693
- value: Ze(a.label),
1692
+ label: Xe(a.label),
1693
+ value: Xe(a.label),
1694
1694
  available: !0
1695
1695
  })) : [];
1696
1696
  }
1697
1697
  function Tl(e) {
1698
- const t = Z(e.selectedValues || []);
1698
+ const t = L(e.selectedValues || []);
1699
1699
  if (!t.length) return;
1700
- const o = new Set(e.options.map((b) => b.value)), a = t.filter((b) => !o.has(b)).map((b) => ({
1701
- value: b,
1702
- label: Nt(e, b),
1700
+ const o = new Set(e.options.map((h) => h.value)), a = t.filter((h) => !o.has(h)).map((h) => ({
1701
+ value: h,
1702
+ label: Nt(e, h),
1703
1703
  available: !1
1704
1704
  }));
1705
1705
  if (a.length) {
1706
- const b = [...e.options, ...a];
1707
- e.options = Vt(e) ? rt(b) : b;
1706
+ const h = [...e.options, ...a];
1707
+ e.options = Vt(e) ? rt(h) : h;
1708
1708
  }
1709
1709
  }
1710
1710
  function Vl(e) {
1711
1711
  if (e.keepSelection) {
1712
1712
  Tl(e);
1713
- const o = Te(e);
1713
+ const o = me(e);
1714
1714
  e.selectedValues = o.length ? [...o] : [...e.selectedValues || []];
1715
1715
  } else {
1716
- const o = Z(Te(e));
1716
+ const o = L(me(e));
1717
1717
  e.options = e.options.filter((T) => T.available !== !1);
1718
- const a = new Set(e.options.map((T) => T.value)), b = o.filter(
1718
+ const a = new Set(e.options.map((T) => T.value)), h = o.filter(
1719
1719
  (T) => a.has(T)
1720
1720
  );
1721
- e.selectedValues = b;
1721
+ e.selectedValues = h;
1722
1722
  }
1723
- const t = Je(e);
1724
- e.selectedValues = [...t], g(e.globalFilter, R(e.id), {
1723
+ const t = Ye(e);
1724
+ e.selectedValues = [...t], g(e.globalFilter, k(e.id), {
1725
1725
  selectedValues: t
1726
1726
  });
1727
1727
  }
@@ -1732,48 +1732,48 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1732
1732
  return;
1733
1733
  }
1734
1734
  if (!(!e.type && (e.type = Ct(e.globalFilter), !e.type))) {
1735
- if (Be(e.globalFilter)) {
1736
- e.options = Dl(e.globalFilter), Ye(e);
1735
+ if (ze(e.globalFilter)) {
1736
+ e.options = Dl(e.globalFilter), He(e);
1737
1737
  return;
1738
1738
  }
1739
1739
  switch (e.type) {
1740
1740
  case be.String:
1741
1741
  try {
1742
- const a = gl(e.globalFilter);
1742
+ const a = Sl(e.globalFilter);
1743
1743
  if (!a.length) {
1744
1744
  e.options = [];
1745
1745
  return;
1746
1746
  }
1747
- const b = Rt(), T = [];
1748
- for (const c of a) {
1747
+ const h = Rt(), T = [];
1748
+ for (const i of a) {
1749
1749
  if (t.aborted) return;
1750
- if (b) {
1750
+ if (h) {
1751
1751
  const V = await rn({
1752
- widget: c,
1752
+ widget: i,
1753
1753
  signal: t,
1754
1754
  scopedLocationIds: n.locationIds,
1755
1755
  scopedTimeRange: n.timeRange,
1756
1756
  scopedDateRange: n.dateRange,
1757
1757
  scopedGlobalFilters: n.globalFilters
1758
1758
  });
1759
- (V == null ? void 0 : V.type) === Pt.Table && T.push(...V.rows.map((de) => {
1760
- var F;
1761
- return ((F = de.cells) == null ? void 0 : F[0]) ?? " ";
1759
+ (V == null ? void 0 : V.type) === Mt.Table && T.push(...V.rows.map((pe) => {
1760
+ var w;
1761
+ return ((w = pe.cells) == null ? void 0 : w[0]) ?? " ";
1762
1762
  }));
1763
1763
  continue;
1764
1764
  }
1765
- const q = le(
1766
- Mt(e.globalFilter, It())
1765
+ const J = ee(
1766
+ Pt(e.globalFilter, It())
1767
1767
  );
1768
- T.push(...q);
1768
+ T.push(...J);
1769
1769
  }
1770
- const y = Array.from(new Set(T)), A = Te(e), M = e.keepSelection ? Array.from(/* @__PURE__ */ new Set([...y, ...A])) : y, $ = new Set(T), G = new Set(y);
1770
+ const S = Array.from(new Set(T)), x = me(e), P = e.keepSelection ? Array.from(/* @__PURE__ */ new Set([...S, ...x])) : S, I = new Set(T), A = new Set(S);
1771
1771
  e.options = rt(
1772
- Ul(M, {
1773
- unknownLabel: O.value,
1774
- getAvailable: (c) => e.keepSelection ? $.has(c) : G.has(c)
1772
+ Wl(P, {
1773
+ unknownLabel: R.value,
1774
+ getAvailable: (i) => e.keepSelection ? I.has(i) : A.has(i)
1775
1775
  })
1776
- ), Ye(e);
1776
+ ), He(e);
1777
1777
  } catch (a) {
1778
1778
  if ((a == null ? void 0 : a.code) === "ERR_CANCELED" || (a == null ? void 0 : a.name) === "CanceledError")
1779
1779
  return;
@@ -1784,59 +1784,59 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1784
1784
  e.options = [
1785
1785
  { label: s("report.common.yes"), value: !0 },
1786
1786
  { label: s("report.common.no"), value: !1 }
1787
- ], Ye(e);
1787
+ ], He(e);
1788
1788
  break;
1789
1789
  }
1790
1790
  case be.Timestamp:
1791
1791
  if (e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay) {
1792
1792
  const a = e.globalFilter.option;
1793
- e.options = pt({ dimensionOption: a, t: s }), e.globalFilter.values = e.options.length ? e.options.map((b) => b.value) : ["NULL"];
1793
+ e.options = pt({ dimensionOption: a, t: s }), e.globalFilter.values = e.options.length ? e.options.map((h) => h.value) : ["NULL"];
1794
1794
  }
1795
- Ye(e);
1795
+ He(e);
1796
1796
  break;
1797
1797
  case be.Numeric:
1798
1798
  break;
1799
1799
  }
1800
1800
  }
1801
1801
  }
1802
- async function Xe() {
1803
- if (!H.value || !z.value.length) return;
1804
- U && U.abort();
1802
+ async function et() {
1803
+ if (!K.value || !$.value.length) return;
1804
+ z && z.abort();
1805
1805
  const e = new AbortController();
1806
- U = e, C.value = !0, n.isDialogGlobalFilter && (_.value = !0);
1806
+ z = e, N.value = !0, n.isDialogGlobalFilter && (W.value = !0);
1807
1807
  try {
1808
1808
  await Promise.all(
1809
- z.value.map(
1809
+ $.value.map(
1810
1810
  (t) => Nl(t, e.signal)
1811
1811
  )
1812
1812
  );
1813
1813
  } finally {
1814
- U === e && (C.value = !1), n.isDialogGlobalFilter && U === e && (_.value = !1);
1814
+ z === e && (N.value = !1), n.isDialogGlobalFilter && z === e && (W.value = !1);
1815
1815
  }
1816
1816
  }
1817
1817
  function $t(e, t) {
1818
1818
  const o = ot(e), a = Ee(e);
1819
1819
  if (a.includes(t)) {
1820
- const y = a.filter((A) => A !== t);
1821
- e.selectedValues = y.length > 0 ? y : [Fe];
1820
+ const S = a.filter((x) => x !== t);
1821
+ e.selectedValues = S.length > 0 ? S : [we];
1822
1822
  } else {
1823
- const y = [...a, t], A = o.length > 0 && o.every((M) => y.includes(M));
1824
- e.selectedValues = A ? [] : y;
1823
+ const S = [...a, t], x = o.length > 0 && o.every((P) => S.includes(P));
1824
+ e.selectedValues = x ? [] : S;
1825
1825
  }
1826
- const T = Je(e);
1827
- e.selectedValues = [...T], g(e.globalFilter, R(e.id), {
1826
+ const T = Ye(e);
1827
+ e.selectedValues = [...T], g(e.globalFilter, k(e.id), {
1828
1828
  selectedValues: T
1829
1829
  });
1830
1830
  }
1831
1831
  function xt(e, t) {
1832
1832
  const o = e.globalFilter, a = t ? [
1833
- Bl(Lt(t.startDate, i.value), i.value),
1834
- zl(Lt(t.endDate, i.value), i.value)
1833
+ Bl(Lt(t.startDate, u.value), u.value),
1834
+ zl(Lt(t.endDate, u.value), u.value)
1835
1835
  ] : [];
1836
- t === null ? o.values = [] : o.values = a, e.selectedValues = [...a], e.keepSelection = t !== null, g(e.globalFilter, R(e.id), {
1836
+ t === null ? o.values = [] : o.values = a, e.selectedValues = [...a], e.keepSelection = t !== null, g(e.globalFilter, k(e.id), {
1837
1837
  keepSelection: e.keepSelection,
1838
1838
  selectedValues: [...a]
1839
- }), se(e.globalFilter);
1839
+ }), ne(e.globalFilter);
1840
1840
  }
1841
1841
  function Cl(e) {
1842
1842
  const t = Ee(e);
@@ -1845,240 +1845,240 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
1845
1845
  function kl() {
1846
1846
  return s("report.section.filter.search");
1847
1847
  }
1848
- function et(e) {
1849
- const t = N(e.globalFilter), o = e.options.length > 0 ? "(0 selected)" : "";
1850
- if (e.type === be.Timestamp && !Be(e.globalFilter)) {
1851
- const y = pe(e), A = y.length === 2;
1848
+ function tt(e) {
1849
+ const t = y(e.globalFilter), o = e.options.length > 0 ? "(0 selected)" : "";
1850
+ if (e.type === be.Timestamp && !ze(e.globalFilter)) {
1851
+ const S = fe(e), x = S.length === 2;
1852
1852
  if (e.globalFilter.option === B.DateTime)
1853
- return { preview: A ? `${t} is between ${Ll({
1854
- startDate: y[0] || null,
1855
- endDate: y[1] || null,
1853
+ return { preview: x ? `${t} is between ${Ll({
1854
+ startDate: S[0] || null,
1855
+ endDate: S[1] || null,
1856
1856
  locale: r.value,
1857
- timezone: i.value
1857
+ timezone: u.value
1858
1858
  })}` : t, suffix: "" };
1859
1859
  if (e.globalFilter.option === B.TimeOfDay) {
1860
- const M = y[0] ? E(y[0]).tz(i.value) : null, $ = y[1] ? E(y[1]).tz(i.value) : null, G = (q) => q && q.isValid() ? { hour: q.hour(), minute: q.minute() } : null;
1861
- return { preview: A ? `${t} is between ${Qt({
1862
- startTime: G(M),
1863
- endTime: G($),
1860
+ const P = S[0] ? G(S[0]).tz(u.value) : null, I = S[1] ? G(S[1]).tz(u.value) : null, A = (J) => J && J.isValid() ? { hour: J.hour(), minute: J.minute() } : null;
1861
+ return { preview: x ? `${t} is between ${Qt({
1862
+ startTime: A(P),
1863
+ endTime: A(I),
1864
1864
  locale: r.value
1865
1865
  })}` : t, suffix: "" };
1866
1866
  }
1867
1867
  if (e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay) {
1868
- const M = pt({
1868
+ const P = pt({
1869
1869
  dimensionOption: e.globalFilter.option,
1870
1870
  t: s
1871
- }), $ = new Map(M.map((V) => [String(V.value), V.label])), c = Ee(e).map((V) => $.get(String(V)) ?? String(V)), q = c.map((V) => V.length > 20 ? `${V.slice(0, 20)}…` : V).join(", ");
1872
- return c.length ? {
1873
- preview: `${t}: ${q}`,
1874
- suffix: `(${c.length} selected)`
1871
+ }), I = new Map(P.map((V) => [String(V.value), V.label])), i = Ee(e).map((V) => I.get(String(V)) ?? String(V)), J = i.map((V) => V.length > 20 ? `${V.slice(0, 20)}…` : V).join(", ");
1872
+ return i.length ? {
1873
+ preview: `${t}: ${J}`,
1874
+ suffix: `(${i.length} selected)`
1875
1875
  } : { preview: t, suffix: o };
1876
1876
  }
1877
1877
  }
1878
- const b = Ee(e).map((y) => y === !0 ? s("report.common.yes") || "Yes" : y === !1 ? s("report.common.no") || "No" : String(y).trim() === "" ? O.value : String(y)), T = b.map((y) => y.length > 20 ? `${y.slice(0, 20)}…` : y).join(", ");
1879
- return b.length ? {
1878
+ const h = Ee(e).map((S) => S === !0 ? s("report.common.yes") || "Yes" : S === !1 ? s("report.common.no") || "No" : String(S).trim() === "" ? R.value : String(S)), T = h.map((S) => S.length > 20 ? `${S.slice(0, 20)}…` : S).join(", ");
1879
+ return h.length ? {
1880
1880
  preview: `${t}: ${T}`,
1881
- suffix: `(${b.length} selected)`
1881
+ suffix: `(${h.length} selected)`
1882
1882
  } : { preview: t, suffix: o };
1883
1883
  }
1884
1884
  function Ol(e) {
1885
- st(e), se(e.globalFilter), document.body.click();
1885
+ st(e), ne(e.globalFilter), document.body.click();
1886
1886
  }
1887
1887
  function _l(e) {
1888
- const t = x(
1888
+ const t = O(
1889
1889
  e.globalFilter,
1890
- R(e.id)
1890
+ k(e.id)
1891
1891
  ).selectedValues;
1892
- e.selectedValues = t.length ? [...t] : [...e.globalFilter.values || []], g(e.globalFilter, R(e.id), {
1892
+ e.selectedValues = t.length ? [...t] : [...e.globalFilter.values || []], g(e.globalFilter, k(e.id), {
1893
1893
  selectedValues: e.selectedValues
1894
1894
  }), document.body.click();
1895
1895
  }
1896
1896
  function Rl(e) {
1897
- e.showAdvanced = !e.showAdvanced, g(e.globalFilter, R(e.id), {
1897
+ e.showAdvanced = !e.showAdvanced, g(e.globalFilter, k(e.id), {
1898
1898
  showAdvanced: e.showAdvanced
1899
1899
  });
1900
1900
  }
1901
1901
  function Il(e) {
1902
- e.keepSelection = !e.keepSelection, u(e.keepSelection), g(e.globalFilter, R(e.id), {
1902
+ e.keepSelection = !e.keepSelection, c(e.keepSelection), g(e.globalFilter, k(e.id), {
1903
1903
  keepSelection: e.keepSelection
1904
1904
  }), Vl(e);
1905
1905
  }
1906
1906
  function $l(e, t) {
1907
- return e ? e.length > t ? `${e.slice(0, t)}…` : e : O.value;
1907
+ return e ? e.length > t ? `${e.slice(0, t)}…` : e : R.value;
1908
1908
  }
1909
1909
  function At(e, t) {
1910
- var b, T, y, A;
1910
+ var h, T, S, x;
1911
1911
  const o = e.globalFilter;
1912
1912
  let a = [];
1913
1913
  if (t === null)
1914
1914
  o.values = [];
1915
1915
  else {
1916
- const M = E().tz(i.value).set("hour", Number((b = t.start) == null ? void 0 : b.hour)).set("minute", Number((T = t.start) == null ? void 0 : T.minute)).toISOString(), $ = E().tz(i.value).set("hour", Number((y = t.end) == null ? void 0 : y.hour)).set("minute", Number((A = t.end) == null ? void 0 : A.minute)).toISOString();
1917
- a = [M, $], o.values = a;
1916
+ const P = G().tz(u.value).set("hour", Number((h = t.start) == null ? void 0 : h.hour)).set("minute", Number((T = t.start) == null ? void 0 : T.minute)).toISOString(), I = G().tz(u.value).set("hour", Number((S = t.end) == null ? void 0 : S.hour)).set("minute", Number((x = t.end) == null ? void 0 : x.minute)).toISOString();
1917
+ a = [P, I], o.values = a;
1918
1918
  }
1919
- e.selectedValues = [...a], e.keepSelection = t !== null, g(e.globalFilter, R(e.id), {
1919
+ e.selectedValues = [...a], e.keepSelection = t !== null, g(e.globalFilter, k(e.id), {
1920
1920
  keepSelection: e.keepSelection,
1921
1921
  selectedValues: [...a]
1922
- }), se(e.globalFilter);
1922
+ }), ne(e.globalFilter);
1923
1923
  }
1924
1924
  return (e, t) => {
1925
- const o = ee("FmCircularProgress"), a = ee("FmTextField"), b = ee("FmMenuItem"), T = ee("FmTooltip"), y = ee("FmIcon"), A = ee("FmMenuDivider"), M = ee("FmSwitch"), $ = ee("FmButton"), G = ee("FmMenu");
1926
- return J(), fe("div", Fn, [
1927
- (J(!0), fe(Le, null, ht(z.value, (c, q) => (J(), fe("div", {
1928
- key: c.id
1925
+ const o = te("FmCircularProgress"), a = te("FmTextField"), h = te("FmMenuItem"), T = te("FmTooltip"), S = te("FmIcon"), x = te("FmMenuDivider"), P = te("FmSwitch"), I = te("FmButton"), A = te("FmMenu");
1926
+ return X(), he("div", Fn, [
1927
+ (X(!0), he(Le, null, bt($.value, (i, J) => (X(), he("div", {
1928
+ key: i.id
1929
1929
  }, [
1930
- c.globalFilter.option === D(B).DateTime && !Be(c.globalFilter) ? (J(), we(El, {
1930
+ i.globalFilter.option === D(B).DateTime && !ze(i.globalFilter) ? (X(), De(El, {
1931
1931
  key: 0,
1932
1932
  "date-range": {
1933
- startDate: pe(c)[0],
1934
- endDate: pe(c)[1]
1933
+ startDate: fe(i)[0],
1934
+ endDate: fe(i)[1]
1935
1935
  },
1936
1936
  class: "w-full",
1937
- label: et(c).preview,
1938
- removable: pe(c).length === 2,
1939
- onUpdate: (V) => xt(c, V),
1940
- onChipClosed: () => xt(c, null)
1941
- }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : c.globalFilter.option === D(B).TimeOfDay && !Be(c.globalFilter) ? (J(), we(gn, {
1937
+ label: tt(i).preview,
1938
+ removable: fe(i).length === 2,
1939
+ onUpdate: (V) => xt(i, V),
1940
+ onChipClosed: () => xt(i, null)
1941
+ }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : i.globalFilter.option === D(B).TimeOfDay && !ze(i.globalFilter) ? (X(), De(Sn, {
1942
1942
  key: 1,
1943
1943
  "time-range": {
1944
- start: pe(c)[0] ? {
1945
- hour: D(E)(pe(c)[0]).tz(D(i)).hour(),
1946
- minute: D(E)(pe(c)[0]).tz(D(i)).minute()
1944
+ start: fe(i)[0] ? {
1945
+ hour: D(G)(fe(i)[0]).tz(D(u)).hour(),
1946
+ minute: D(G)(fe(i)[0]).tz(D(u)).minute()
1947
1947
  } : null,
1948
- end: pe(c)[1] ? {
1949
- hour: D(E)(pe(c)[1]).tz(D(i)).hour(),
1950
- minute: D(E)(pe(c)[1]).tz(D(i)).minute()
1948
+ end: fe(i)[1] ? {
1949
+ hour: D(G)(fe(i)[1]).tz(D(u)).hour(),
1950
+ minute: D(G)(fe(i)[1]).tz(D(u)).minute()
1951
1951
  } : null
1952
1952
  },
1953
1953
  class: "w-full",
1954
- label: et(c).preview,
1955
- removable: pe(c).length === 2,
1956
- onUpdate: (V) => At(c, V),
1957
- onChipClosed: () => At(c, null)
1958
- }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (J(), we(G, {
1954
+ label: tt(i).preview,
1955
+ removable: fe(i).length === 2,
1956
+ onUpdate: (V) => At(i, V),
1957
+ onChipClosed: () => At(i, null)
1958
+ }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (X(), De(A, {
1959
1959
  key: 2,
1960
1960
  "close-on-click": !1,
1961
1961
  shift: !0,
1962
- open: D(h)(c.id)
1962
+ open: D(b)(i.id)
1963
1963
  }, {
1964
- "menu-button": ue(() => [
1965
- Q("div", wn, [
1966
- P(Kt, {
1964
+ "menu-button": ie(() => [
1965
+ Y("div", wn, [
1966
+ M(Kt, {
1967
1967
  "left-icon": "filter_alt",
1968
1968
  "trailing-icon": "expand_more",
1969
- loading: oe(c),
1970
- label: et(c).preview,
1969
+ loading: ce(i),
1970
+ label: tt(i).preview,
1971
1971
  class: "w-full"
1972
1972
  }, {
1973
- default: ue(() => [
1974
- nt(he(et(c).suffix), 1)
1973
+ default: ie(() => [
1974
+ at(ve(tt(i).suffix), 1)
1975
1975
  ]),
1976
1976
  _: 2
1977
1977
  }, 1032, ["loading", "label"])
1978
1978
  ])
1979
1979
  ]),
1980
- "menu-wrapper": ue(({ maxHeight: V, width: de }) => [
1981
- Q("div", {
1980
+ "menu-wrapper": ie(({ maxHeight: V, width: pe }) => [
1981
+ Y("div", {
1982
1982
  class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
1983
- style: Gl({ maxHeight: `${V}px`, width: de })
1983
+ style: Gl({ maxHeight: `${V}px`, width: pe })
1984
1984
  }, [
1985
- oe(c) ? (J(), fe("div", Dn, [
1986
- P(o)
1987
- ])) : c.options.length > 0 ? (J(), fe(Le, { key: 1 }, [
1988
- Q("div", Tn, [
1989
- P(a, {
1990
- modelValue: c.search,
1991
- "onUpdate:modelValue": [(F) => c.search = F, (F) => wl(c, F)],
1985
+ ce(i) ? (X(), he("div", Dn, [
1986
+ M(o)
1987
+ ])) : i.options.length > 0 ? (X(), he(Le, { key: 1 }, [
1988
+ Y("div", Tn, [
1989
+ M(a, {
1990
+ modelValue: i.search,
1991
+ "onUpdate:modelValue": [(w) => i.search = w, (w) => wl(i, w)],
1992
1992
  type: "text",
1993
1993
  "prepend-icon": "search",
1994
1994
  placeholder: kl(),
1995
1995
  class: "border px-2 pb-8 text-sm mb-1 rounded"
1996
1996
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
1997
1997
  ]),
1998
- Q("div", Vn, [
1999
- Q("div", Nn, [
2000
- P(b, {
2001
- label: Cl(c),
1998
+ Y("div", Vn, [
1999
+ Y("div", Nn, [
2000
+ M(h, {
2001
+ label: Cl(i),
2002
2002
  "has-checkbox": !0,
2003
- "model-value": kt(c),
2003
+ "model-value": kt(i),
2004
2004
  indeterminate: !0,
2005
- onClick: (F) => Sl(c)
2005
+ onClick: (w) => gl(i)
2006
2006
  }, null, 8, ["label", "model-value", "onClick"]),
2007
- (J(!0), fe(Le, null, ht(_t.value[q], (F) => (J(), fe(Le, {
2008
- key: F.value
2007
+ (X(!0), he(Le, null, bt(_t.value[J], (w) => (X(), he(Le, {
2008
+ key: w.value
2009
2009
  }, [
2010
- F.label && F.label.length > 110 ? (J(), we(T, {
2010
+ w.label && w.label.length > 110 ? (X(), De(T, {
2011
2011
  key: 0,
2012
2012
  placement: "right",
2013
2013
  "hide-arrow": !0,
2014
2014
  "z-index": 2e3
2015
2015
  }, {
2016
- content: ue(() => [
2017
- nt(he(F.label), 1)
2016
+ content: ie(() => [
2017
+ at(ve(w.label), 1)
2018
2018
  ]),
2019
- default: ue(() => [
2020
- Q("div", Cn, [
2021
- P(b, {
2022
- label: $l(F.label, 110),
2019
+ default: ie(() => [
2020
+ Y("div", Cn, [
2021
+ M(h, {
2022
+ label: $l(w.label, 110),
2023
2023
  "has-checkbox": !0,
2024
- "model-value": Ot(c, F.value),
2024
+ "model-value": Ot(i, w.value),
2025
2025
  class: Et([
2026
2026
  "flex-1 text-left",
2027
- { "bg-gray-200": F.available === !1 }
2027
+ { "bg-gray-200": w.available === !1 }
2028
2028
  ]),
2029
- onClick: () => $t(c, F.value)
2029
+ onClick: () => $t(i, w.value)
2030
2030
  }, null, 8, ["label", "model-value", "class", "onClick"])
2031
2031
  ])
2032
2032
  ]),
2033
2033
  _: 2
2034
- }, 1024)) : (J(), we(b, {
2034
+ }, 1024)) : (X(), De(h, {
2035
2035
  key: 1,
2036
- label: F.label,
2036
+ label: w.label,
2037
2037
  "has-checkbox": !0,
2038
- "model-value": Ot(c, F.value),
2039
- class: Et(["flex-1 text-left", { "bg-gray-100": F.available === !1 }]),
2040
- onClick: () => $t(c, F.value)
2038
+ "model-value": Ot(i, w.value),
2039
+ class: Et(["flex-1 text-left", { "bg-gray-100": w.available === !1 }]),
2040
+ onClick: () => $t(i, w.value)
2041
2041
  }, null, 8, ["label", "model-value", "class", "onClick"]))
2042
2042
  ], 64))), 128)),
2043
- _t.value[q].length < c.options.length && !c.search ? (J(), we(b, {
2043
+ _t.value[J].length < i.options.length && !i.search ? (X(), De(h, {
2044
2044
  key: 0,
2045
2045
  class: "fm-typo-en-body-md-400 -ml-2",
2046
2046
  label: D(s)("report.section.filter.loadMore"),
2047
- onClick: dt((F) => Fl(c), ["stop"]),
2047
+ onClick: dt((w) => Fl(i), ["stop"]),
2048
2048
  icon: "autorenew"
2049
- }, null, 8, ["label", "onClick"])) : bt("", !0)
2049
+ }, null, 8, ["label", "onClick"])) : ht("", !0)
2050
2050
  ])
2051
2051
  ]),
2052
- Q("div", {
2052
+ Y("div", {
2053
2053
  class: "px-12 py-2 flex items-center gap-2 cursor-pointer hover:bg-fm-color-neutral-50 transition-colors",
2054
- onClick: (F) => Rl(c)
2054
+ onClick: (w) => Rl(i)
2055
2055
  }, [
2056
- P(y, {
2057
- name: c.showAdvanced ? "keyboard_arrow_up" : "keyboard_arrow_down",
2056
+ M(S, {
2057
+ name: i.showAdvanced ? "keyboard_arrow_up" : "keyboard_arrow_down",
2058
2058
  size: "md",
2059
2059
  class: ""
2060
2060
  }, null, 8, ["name"]),
2061
- Q("span", On, he(D(s)("report.section.filter.advanced")), 1)
2061
+ Y("span", On, ve(D(s)("report.section.filter.advanced")), 1)
2062
2062
  ], 8, kn),
2063
- P(A),
2064
- c.showAdvanced ? (J(), fe("div", _n, [
2065
- Q("div", Rn, [
2066
- Q("div", In, [
2067
- P(M, {
2068
- "model-value": c.keepSelection,
2063
+ M(x),
2064
+ i.showAdvanced ? (X(), he("div", _n, [
2065
+ Y("div", Rn, [
2066
+ Y("div", In, [
2067
+ M(P, {
2068
+ "model-value": i.keepSelection,
2069
2069
  label: D(s)("report.section.filter.keepSelection"),
2070
2070
  labelPlacement: "right",
2071
- "onUpdate:modelValue": () => Il(c)
2071
+ "onUpdate:modelValue": () => Il(i)
2072
2072
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
2073
- P(T, {
2073
+ M(T, {
2074
2074
  placement: "top",
2075
2075
  "z-index": 2e3
2076
2076
  }, {
2077
- content: ue(() => [
2078
- Q("div", $n, he(D(s)("report.section.filter.keepSelectionTooltip")), 1)
2077
+ content: ie(() => [
2078
+ Y("div", $n, ve(D(s)("report.section.filter.keepSelectionTooltip")), 1)
2079
2079
  ]),
2080
- default: ue(() => [
2081
- P(y, {
2080
+ default: ie(() => [
2081
+ M(S, {
2082
2082
  name: "info",
2083
2083
  size: "md",
2084
2084
  class: "text-fm-color-primary"
@@ -2088,30 +2088,30 @@ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-fle
2088
2088
  })
2089
2089
  ])
2090
2090
  ])
2091
- ])) : bt("", !0),
2092
- Q("div", xn, [
2093
- P($, {
2091
+ ])) : ht("", !0),
2092
+ Y("div", xn, [
2093
+ M(I, {
2094
2094
  variant: "tertiary",
2095
2095
  label: D(s)("report.common.cancel"),
2096
- onClick: dt((F) => _l(c), ["stop"])
2096
+ onClick: dt((w) => _l(i), ["stop"])
2097
2097
  }, null, 8, ["label", "onClick"]),
2098
- P($, {
2098
+ M(I, {
2099
2099
  color: "primary",
2100
- onClick: dt((F) => Ol(c), ["stop"]),
2100
+ onClick: dt((w) => Ol(i), ["stop"]),
2101
2101
  label: D(s)("report.common.apply")
2102
2102
  }, null, 8, ["onClick", "label"])
2103
2103
  ])
2104
- ], 64)) : (J(), we(jl, {
2104
+ ], 64)) : (X(), De(Ul, {
2105
2105
  key: 2,
2106
- title: ct(c) ? D(s)("report.messages.noWidgetsApplied") : void 0,
2107
- "sub-title": ct(c) ? D(s)("report.messages.assignWidgetsToUseThisFilter") : void 0
2106
+ title: ct(i) ? D(s)("report.messages.noWidgetsApplied") : void 0,
2107
+ "sub-title": ct(i) ? D(s)("report.messages.assignWidgetsToUseThisFilter") : void 0
2108
2108
  }, null, 8, ["title", "sub-title"]))
2109
2109
  ], 4)
2110
2110
  ]),
2111
2111
  _: 2
2112
2112
  }, 1032, ["open"]))
2113
2113
  ]))), 128)),
2114
- qt(e.$slots, "default")
2114
+ jt(e.$slots, "default")
2115
2115
  ]);
2116
2116
  };
2117
2117
  }
@@ -2123,20 +2123,20 @@ export {
2123
2123
  Yn as a,
2124
2124
  Zn as b,
2125
2125
  Xn as c,
2126
- Un as d,
2127
- jt as e,
2128
- gn as f,
2126
+ Wn as d,
2127
+ Ut as e,
2128
+ Sn as f,
2129
2129
  Hn as g,
2130
2130
  Kl as h,
2131
- jn as i,
2131
+ Un as i,
2132
2132
  un as j,
2133
2133
  Hl as k,
2134
2134
  Jn as l,
2135
2135
  Kn as m,
2136
- qn as n,
2136
+ jn as n,
2137
2137
  rn as q,
2138
2138
  Qn as r,
2139
2139
  cn as s,
2140
- Ut as t,
2140
+ Wt as t,
2141
2141
  Ht as u
2142
2142
  };