@feedmepos/mf-report 5.33.1 → 5.33.2-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 (34) hide show
  1. package/dist/{App-UhJDa13j.js → App-C9V0QnuM.js} +40 -40
  2. package/dist/{DateRangeSelect-B4-MgrD0.js → DateRangeSelect-CK-lr89g.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-GGtPfxs3.js → Default.vue_vue_type_script_setup_true_lang-CPUwwTWj.js} +1 -1
  4. package/dist/{DigestListView-BHz0b0o8.js → DigestListView-Bu5nfRiL.js} +3 -3
  5. package/dist/{DigestReaderView-j7SHeieI.js → DigestReaderView-JYQmxp2u.js} +4 -4
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CSQxSBH6.js → DynamicWidget.vue_vue_type_script_setup_true_lang-4kEtNYTy.js} +6 -6
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CsX4EOdl.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BK9Xq2MT.js} +281 -277
  8. package/dist/{InsightView-BPaOKk4B.js → InsightView-Byc-dqGF.js} +5 -5
  9. package/dist/{Integration-Bm8wMPWD.js → Integration-0XpM2hmH.js} +3 -3
  10. package/dist/{Integrations-CyLLU8W8.js → Integrations-BYVy38vR.js} +2 -2
  11. package/dist/{Layout-B0PqazFQ.js → Layout-Bn2hoFyC.js} +1 -1
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-h1xIY9i5.js → LocationSelect.vue_vue_type_script_setup_true_lang-D1JJ7P_T.js} +2 -2
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-gm7J8atP.js → MenuTab.vue_vue_type_script_setup_true_lang-CNlBxkYp.js} +5 -5
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-SuWL1ncK.js → NavigationTab.vue_vue_type_script_setup_true_lang-rAjBVVza.js} +5 -5
  15. package/dist/{OverviewView-qKzND69V.js → OverviewView-CDR97jeQ.js} +5 -5
  16. package/dist/{Report-Ct4JeUQk.js → Report-BisFT72V.js} +3 -3
  17. package/dist/{ReportCanvasView-ClGwud-9.js → ReportCanvasView-Cf7gDL8L.js} +5 -5
  18. package/dist/{ReportEditor-B3tGyl-5.js → ReportEditor-aUAEHtrt.js} +724 -728
  19. package/dist/{ReportView-C-cmm-Fd.js → ReportView-BAPF1jzN.js} +6 -6
  20. package/dist/{ReportViewRoute-DnNFoHOw.js → ReportViewRoute-BFEQkhiQ.js} +2 -2
  21. package/dist/{Setting-CASVb8Rm.js → Setting-6FKXAqjA.js} +3 -3
  22. package/dist/{Template-BBUxUTFy.js → Template-BIBtJ5HV.js} +3 -3
  23. package/dist/{TileEditor-De_F-7ds.js → TileEditor-CddUDxJK.js} +6 -6
  24. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-CdoiMoTQ.js → TilePageStack.vue_vue_type_script_setup_true_lang-BI89fGW4.js} +2 -2
  25. package/dist/{TransitionFade-TTr9MyTn.js → TransitionFade-tFbF4omJ.js} +5 -5
  26. package/dist/{app-hV8LtdmM.js → app-DEdFq5PZ.js} +16 -16
  27. package/dist/app.js +1 -1
  28. package/dist/{currency-NkW-Vt9H.js → currency-BY9-JUL6.js} +1 -1
  29. package/dist/{index-DT7UhcKk.js → index-C1QxNkqf.js} +1 -1
  30. package/dist/{report-Dxk_LHB_.js → report-CtINF6xC.js} +1 -1
  31. package/dist/{useDigestFont-lRnNGFKY.js → useDigestFont-cwSZsL1B.js} +1 -1
  32. package/dist/{useReportCanvasPanel-DEo12E93.js → useReportCanvasPanel-CbLaSlDa.js} +3 -3
  33. package/dist/{useRestaurantPermission-B22jfD3v.js → useRestaurantPermission-DTKnAUFJ.js} +1 -1
  34. package/package.json +1 -1
@@ -1,41 +1,41 @@
1
- import { defineComponent as he, mergeModels as Se, useModel as $e, ref as G, computed as b, resolveComponent as S, createBlock as C, openBlock as c, withCtx as V, createElementVNode as f, createVNode as d, unref as t, normalizeClass as Ae, createTextVNode as Je, toDisplayString as B, createElementBlock as R, Fragment as ye, renderSlot as bl, createCommentVNode as U, watch as ge, renderList as Le, onMounted as yl, onUnmounted as Ol, resolveDynamicComponent as Dl, isRef as hl, normalizeStyle as nl } from "vue";
2
- import { W as Il, g as Ul, _ as Nl, a as Bl, e as Be, S as je, d as wl, b as _l, T as Ml, c as Rl } from "./TransitionFade-TTr9MyTn.js";
3
- import { C as ke, D as ae, b as Pe, F as Ye, c as Me, u as sl, i as qe, d as fe, M as Fl, r as zl, e as ll, n as Pl, f as ql, g as El, h as Ll, j as Al, k as Gl, m as Wl, a as Hl, o as cl, p as tl, q as jl, Q as Xe, l as Jl, t as Ql } from "./report-Dxk_LHB_.js";
1
+ import { defineComponent as ye, mergeModels as Ce, useModel as Te, ref as G, computed as b, resolveComponent as T, createBlock as k, openBlock as p, withCtx as V, createElementVNode as f, createVNode as d, unref as t, normalizeClass as Ae, createTextVNode as Je, toDisplayString as B, createElementBlock as z, Fragment as ke, renderSlot as bl, createCommentVNode as U, watch as ge, renderList as Le, onMounted as yl, onUnmounted as Dl, resolveDynamicComponent as Ol, isRef as hl, normalizeStyle as nl } from "vue";
2
+ import { W as Il, g as Ul, _ as Nl, a as Bl, e as Ne, S as je, d as wl, b as _l, T as Ml, c as Rl } from "./TransitionFade-tFbF4omJ.js";
3
+ import { D as oe, b as ze, C as Pe, F as Ye, c as Be, u as sl, i as qe, d as fe, M as Fl, r as zl, e as ll, n as Pl, f as ql, g as El, h as Ll, j as Al, k as Gl, m as Wl, a as Hl, o as cl, p as tl, q as jl, Q as Xe, l as Jl, t as Ql } from "./report-CtINF6xC.js";
4
4
  import { storeToRefs as Ee } from "pinia";
5
5
  import { useRouter as ul, useRoute as dl } from "vue-router";
6
- import { useBreakpoints as Ze, useSnackbar as Vl, FmButtonColorThemeVariant as Te } from "@feedmepos/ui-library";
6
+ import { useBreakpoints as Ze, useSnackbar as Vl, FmButtonColorThemeVariant as xe } from "@feedmepos/ui-library";
7
7
  import { u as ml } from "./message-dialog-UoMWOnil.js";
8
8
  import { u as Kl } from "./global-loader-BuxFfehu.js";
9
9
  import { u as Ge } from "./_plugin-vue_export-helper-C6QDExPN.js";
10
10
  import { r as Qe } from "./i18n-DbyciK4x.js";
11
- import { _ as ol } from "./TilePageStack.vue_vue_type_script_setup_true_lang-CdoiMoTQ.js";
11
+ import { _ as ol } from "./TilePageStack.vue_vue_type_script_setup_true_lang-BI89fGW4.js";
12
12
  import { a as al, _ as rl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
13
- import { d as Yl, e as Xl, i as Zl } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-CSQxSBH6.js";
14
- import { g as et, d as lt, _ as pl } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CsX4EOdl.js";
13
+ import { d as Yl, e as Xl, i as Zl } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-4kEtNYTy.js";
14
+ import { g as et, d as lt, _ as pl } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BK9Xq2MT.js";
15
15
  import { useCoreStore as tt } from "@feedmepos/mf-common";
16
- import { u as ot, a as at } from "./app-hV8LtdmM.js";
17
- import { d as rt } from "./DateRangeSelect-B4-MgrD0.js";
18
- const nt = /* @__PURE__ */ he({
16
+ import { u as ot, a as at } from "./app-DEdFq5PZ.js";
17
+ import { d as rt } from "./DateRangeSelect-CK-lr89g.js";
18
+ const nt = /* @__PURE__ */ ye({
19
19
  __name: "WidgetDialog",
20
- props: /* @__PURE__ */ Se({
20
+ props: /* @__PURE__ */ Ce({
21
21
  isOpen: { type: Boolean }
22
22
  }, {
23
23
  modelValue: {},
24
24
  modelModifiers: {}
25
25
  }),
26
- emits: /* @__PURE__ */ Se(["update:isOpen"], ["update:modelValue"]),
27
- setup(q, { emit: v }) {
28
- const { t: m } = Ge(), { breakpoints: y } = Ze(), n = $e(q, "modelValue"), w = q, E = v;
29
- function Z() {
30
- E("update:isOpen", !1);
26
+ emits: /* @__PURE__ */ Ce(["update:isOpen"], ["update:modelValue"]),
27
+ setup(P, { emit: v }) {
28
+ const { t: m } = Ge(), { breakpoints: y } = Ze(), n = Te(P, "modelValue"), w = P, L = v;
29
+ function X() {
30
+ L("update:isOpen", !1);
31
31
  }
32
- function O() {
33
- F.value && (n.value = F.value, F.value = void 0, E("update:isOpen", !1));
32
+ function D() {
33
+ F.value && (n.value = F.value, F.value = void 0, L("update:isOpen", !1));
34
34
  }
35
35
  const F = G(), N = b(() => !F.value);
36
- return (le, L) => {
37
- const a = S("FmButton"), D = S("FmDialog");
38
- return c(), C(D, {
36
+ return (Z, A) => {
37
+ const a = T("FmButton"), O = T("FmDialog");
38
+ return p(), k(O, {
39
39
  "model-value": w.isOpen
40
40
  }, {
41
41
  "dialog-header": V(() => [
@@ -44,31 +44,31 @@ const nt = /* @__PURE__ */ he({
44
44
  default: V(() => [
45
45
  d(Il, {
46
46
  modelValue: F.value,
47
- "onUpdate:modelValue": L[0] || (L[0] = ($) => F.value = $),
47
+ "onUpdate:modelValue": A[0] || (A[0] = (S) => F.value = S),
48
48
  class: Ae(`grid ${t(y).lg || t(y).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
49
49
  "child-class": "p-[8px] flex flex-col"
50
50
  }, null, 8, ["modelValue", "class"])
51
51
  ]),
52
52
  "dialog-footer": V(() => [
53
- L[1] || (L[1] = f("div", { class: "grow" }, null, -1)),
53
+ A[1] || (A[1] = f("div", { class: "grow" }, null, -1)),
54
54
  d(a, {
55
55
  label: t(m)("report.common.cancel"),
56
56
  variant: "tertiary",
57
- onClick: Z
57
+ onClick: X
58
58
  }, null, 8, ["label"]),
59
59
  d(a, {
60
60
  label: t(m)("report.common.confirm"),
61
61
  disabled: N.value,
62
- onClick: O
62
+ onClick: D
63
63
  }, null, 8, ["label", "disabled"])
64
64
  ]),
65
65
  _: 1
66
66
  }, 8, ["model-value"]);
67
67
  };
68
68
  }
69
- }), it = { class: "fm-typo-en-body-lg-600" }, il = /* @__PURE__ */ he({
69
+ }), it = { class: "fm-typo-en-body-lg-600" }, il = /* @__PURE__ */ ye({
70
70
  __name: "ReportEditorTabHeader",
71
- props: /* @__PURE__ */ Se({
71
+ props: /* @__PURE__ */ Ce({
72
72
  icon: {
73
73
  type: String,
74
74
  required: !0
@@ -78,32 +78,32 @@ const nt = /* @__PURE__ */ he({
78
78
  modelModifiers: {}
79
79
  }),
80
80
  emits: ["update:modelValue"],
81
- setup(q) {
82
- const { t: v } = Ge(), m = $e(q, "modelValue"), y = q;
81
+ setup(P) {
82
+ const { t: v } = Ge(), m = Te(P, "modelValue"), y = P;
83
83
  return (n, w) => {
84
- const E = S("FmIcon");
85
- return c(), R("div", {
84
+ const L = T("FmIcon");
85
+ return p(), z("div", {
86
86
  class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
87
- onClick: w[0] || (w[0] = (Z) => m.value = !m.value)
87
+ onClick: w[0] || (w[0] = (X) => m.value = !m.value)
88
88
  }, [
89
89
  f("p", it, B(t(v)("report.editor.customizeReport")), 1),
90
90
  w[1] || (w[1] = f("div", { class: "grow" }, null, -1)),
91
- d(E, {
91
+ d(L, {
92
92
  name: y.icon
93
93
  }, null, 8, ["name"])
94
94
  ]);
95
95
  };
96
96
  }
97
- }), st = /* @__PURE__ */ he({
97
+ }), st = /* @__PURE__ */ ye({
98
98
  __name: "ReportEditorTabDesktop",
99
99
  props: {
100
100
  modelValue: { required: !0, default: !1 },
101
101
  modelModifiers: {}
102
102
  },
103
103
  emits: ["update:modelValue"],
104
- setup(q) {
105
- const v = $e(q, "modelValue");
106
- return (m, y) => (c(), R(ye, null, [
104
+ setup(P) {
105
+ const v = Te(P, "modelValue");
106
+ return (m, y) => (p(), z(ke, null, [
107
107
  d(il, {
108
108
  modelValue: v.value,
109
109
  "onUpdate:modelValue": y[0] || (y[0] = (n) => v.value = n),
@@ -112,33 +112,33 @@ const nt = /* @__PURE__ */ he({
112
112
  bl(m.$slots, "default")
113
113
  ], 64));
114
114
  }
115
- }), ut = /* @__PURE__ */ he({
115
+ }), ut = /* @__PURE__ */ ye({
116
116
  __name: "ReportEditorTabMobile",
117
117
  props: {
118
118
  modelValue: { required: !0, default: !1 },
119
119
  modelModifiers: {}
120
120
  },
121
121
  emits: ["update:modelValue"],
122
- setup(q) {
123
- const v = $e(q, "modelValue");
122
+ setup(P) {
123
+ const v = Te(P, "modelValue");
124
124
  return (m, y) => {
125
- const n = S("FmTopSheet"), w = S("FmCard");
126
- return c(), C(w, { class: "fixed bottom-0 w-full" }, {
125
+ const n = T("FmTopSheet"), w = T("FmCard");
126
+ return p(), k(w, { class: "fixed bottom-0 w-full" }, {
127
127
  default: V(() => [
128
128
  d(il, {
129
129
  modelValue: v.value,
130
- "onUpdate:modelValue": y[0] || (y[0] = (E) => v.value = E),
130
+ "onUpdate:modelValue": y[0] || (y[0] = (L) => v.value = L),
131
131
  icon: "keyboard_double_arrow_up"
132
132
  }, null, 8, ["modelValue"]),
133
133
  d(n, {
134
134
  modelValue: v.value,
135
- "onUpdate:modelValue": y[2] || (y[2] = (E) => v.value = E),
135
+ "onUpdate:modelValue": y[2] || (y[2] = (L) => v.value = L),
136
136
  "fullscreen-size": "sm"
137
137
  }, {
138
138
  default: V(() => [
139
139
  d(il, {
140
140
  modelValue: v.value,
141
- "onUpdate:modelValue": y[1] || (y[1] = (E) => v.value = E),
141
+ "onUpdate:modelValue": y[1] || (y[1] = (L) => v.value = L),
142
142
  icon: "keyboard_double_arrow_down"
143
143
  }, null, 8, ["modelValue"]),
144
144
  v.value ? bl(m.$slots, "default", { key: 0 }) : U("", !0)
@@ -156,18 +156,18 @@ const nt = /* @__PURE__ */ he({
156
156
  }, mt = { class: "grid grid-cols-1 gap-2 rounded-md border border-neutral-300 p-2 sm:grid-cols-[1.3fr_1fr_1fr_auto] sm:items-end" }, ct = {
157
157
  key: 0,
158
158
  class: "flex justify-end sm:pb-[2px]"
159
- }, pt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, vt = { class: "pl-1" }, ft = {
160
- key: 0,
159
+ }, pt = { class: "pl-1" }, vt = {
160
+ key: 1,
161
161
  class: "flex justify-end sm:pb-[2px]"
162
- }, gt = {
162
+ }, ft = {
163
163
  key: 3,
164
164
  class: "flex flex-col gap-1 mt-2"
165
- }, bt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, yt = {
165
+ }, gt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, bt = {
166
166
  key: 4,
167
167
  class: "flex flex-col gap-2"
168
- }, ht = /* @__PURE__ */ he({
168
+ }, yt = /* @__PURE__ */ ye({
169
169
  __name: "GlobalFilterDialog",
170
- props: /* @__PURE__ */ Se({
170
+ props: /* @__PURE__ */ Ce({
171
171
  schemas: {
172
172
  type: Array,
173
173
  default: () => []
@@ -185,215 +185,214 @@ const nt = /* @__PURE__ */ he({
185
185
  isOpenModifiers: {}
186
186
  }),
187
187
  emits: ["update:globalFilter", "update:isOpen"],
188
- setup(q) {
189
- const { t: v, te: m } = Ge(), y = $e(q, "globalFilter"), n = $e(q, "isOpen"), w = Vl(), E = q, Z = G(""), O = G(), F = G(), N = G(), le = G([]), L = G([]), a = G(!1), D = G([]), $ = G([]), K = G(ke.Equal), re = G(!1), me = b(
190
- () => !!F.value && F.value.type !== ae.Timestamp
188
+ setup(P) {
189
+ const { t: v, te: m } = Ge(), y = Te(P, "globalFilter"), n = Te(P, "isOpen"), w = Vl(), L = P, X = G(""), D = G(), F = G(), N = G(), Z = G([]), A = G([]), a = G(!1), O = G([]), S = G([]), ae = G(!1), ie = b(
190
+ () => !!F.value && F.value.type !== oe.Timestamp
191
191
  );
192
- function j(e) {
192
+ function de(e) {
193
193
  return JSON.parse(JSON.stringify(e));
194
194
  }
195
- function ie(e, l) {
195
+ function J(e, l) {
196
196
  return { hour: e, minute: l };
197
197
  }
198
- function x(e) {
198
+ function se(e) {
199
199
  return e ? `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}` : null;
200
200
  }
201
- function pe(e) {
201
+ function x(e) {
202
202
  if (!e) return null;
203
- const [l, p] = e.split(":").map(Number);
204
- return Number.isNaN(l) || Number.isNaN(p) ? null : { hour: l, minute: p };
203
+ const [l, c] = e.split(":").map(Number);
204
+ return Number.isNaN(l) || Number.isNaN(c) ? null : { hour: l, minute: c };
205
205
  }
206
- const se = b(() => F.value ? !(F.value.type === ae.Timestamp && N.value === Pe.DateTime) : !1), Y = b(
206
+ const ne = b(() => F.value ? !(F.value.type === oe.Timestamp && N.value === ze.DateTime) : !1), ee = b(
207
207
  () => {
208
208
  var e;
209
- return ((e = F.value) == null ? void 0 : e.type) === ae.Timestamp && N.value === Pe.TimeOfDay;
209
+ return ((e = F.value) == null ? void 0 : e.type) === oe.Timestamp && N.value === ze.TimeOfDay;
210
210
  }
211
- ), ue = b(() => {
211
+ ), re = b(() => {
212
212
  var e;
213
- return (((e = F.value) == null ? void 0 : e.filterOperators) ?? []).filter((l) => l !== ke.And && l !== ke.Or).map((l) => ({
213
+ return (((e = F.value) == null ? void 0 : e.filterOperators) ?? []).filter((l) => l !== Pe.And && l !== Pe.Or).map((l) => ({
214
214
  label: v(`report.section.comparisonOperator.${l}`),
215
215
  value: l
216
216
  }));
217
217
  });
218
- function ne() {
218
+ function me() {
219
219
  var l;
220
- const e = (l = ue.value[0]) == null ? void 0 : l.value;
221
- return e || (F.value ? oe(
220
+ const e = (l = re.value[0]) == null ? void 0 : l.value;
221
+ return e || (F.value ? te(
222
222
  F.value.type,
223
223
  N.value ?? null
224
- ) : ke.Equal);
224
+ ) : Pe.Equal);
225
225
  }
226
- function ce(e) {
226
+ function ue(e) {
227
227
  if (F.value)
228
228
  return et({
229
- operator: e ?? ne(),
229
+ operator: e ?? me(),
230
230
  dataType: F.value.type,
231
- dimensionOption: F.value.type === ae.Timestamp ? N.value ?? null : null,
231
+ dimensionOption: F.value.type === oe.Timestamp ? N.value ?? null : null,
232
232
  t: v
233
233
  });
234
234
  }
235
- function de(e, l) {
236
- if (typeof (l == null ? void 0 : l.default) == "boolean" || e.length > 0 && e.every((_) => typeof _ == "boolean")) {
237
- const _ = e.reduce((k, T) => (typeof T == "boolean" && k.push(T), k), []);
235
+ function ve(e, l) {
236
+ if (typeof (l == null ? void 0 : l.default) == "boolean" || e.length > 0 && e.every((h) => typeof h == "boolean")) {
237
+ const h = e.reduce(($, C) => (typeof C == "boolean" && $.push(C), $), []);
238
238
  if (l)
239
- for (l.fixed && _.splice(l.count); _.length < l.count; )
240
- _.push(typeof l.default == "boolean" ? l.default : !1);
241
- return _;
239
+ for (l.fixed && h.splice(l.count); h.length < l.count; )
240
+ h.push(typeof l.default == "boolean" ? l.default : !1);
241
+ return h;
242
242
  }
243
- const g = e.reduce((_, k) => (typeof k == "string" && _.push(k), _), []);
243
+ const g = e.reduce((h, $) => (typeof $ == "string" && h.push($), h), []);
244
244
  if (l)
245
245
  for (l.fixed && g.splice(l.count); g.length < l.count; )
246
246
  g.push(typeof l.default == "string" ? l.default : "");
247
247
  return g;
248
248
  }
249
- function z(e = K.value) {
250
- const l = ce(e), p = de(
249
+ function ce(e = me()) {
250
+ const l = ue(e), c = ve(
251
251
  l ? Array(l.count).fill(l.default) : [],
252
252
  l
253
253
  );
254
254
  return {
255
255
  label: "",
256
256
  operator: e,
257
- values: p
257
+ values: c
258
258
  };
259
259
  }
260
- function A() {
260
+ function q() {
261
261
  return {
262
262
  name: "",
263
- startTime: ie(0, 0),
264
- endTime: ie(23, 59)
263
+ startTime: J(0, 0),
264
+ endTime: J(23, 59)
265
265
  };
266
266
  }
267
- function H() {
268
- if (!(!se.value || !a.value)) {
269
- if (Y.value) {
270
- $.value.length === 0 && ($.value = [A()]);
267
+ function E() {
268
+ if (!(!ne.value || !a.value)) {
269
+ if (ee.value) {
270
+ S.value.length === 0 && (S.value = [q()]);
271
271
  return;
272
272
  }
273
- D.value.length === 0 && (D.value = [z()]);
273
+ O.value.length === 0 && (O.value = [ce()]);
274
274
  }
275
275
  }
276
- function ve() {
277
- var p, g, _;
278
- const e = j(((p = y.value) == null ? void 0 : p.customOptions) ?? []), l = j(((g = y.value) == null ? void 0 : g.customTimeRanges) ?? []);
279
- K.value = ((_ = e[0]) == null ? void 0 : _.operator) ?? ne(), a.value = e.length > 0 || l.length > 0, D.value = e, $.value = l, H();
276
+ function Q() {
277
+ var c, g;
278
+ const e = de(((c = y.value) == null ? void 0 : c.customOptions) ?? []), l = de(((g = y.value) == null ? void 0 : g.customTimeRanges) ?? []);
279
+ a.value = e.length > 0 || l.length > 0, O.value = e, S.value = l, E();
280
280
  }
281
- function we(e) {
282
- K.value = e, D.value = D.value.map((l, p) => {
283
- const g = D.value[p];
284
- if (!g)
285
- return z(e);
286
- const _ = ce(e), k = de(
287
- Array.isArray(g.values) ? [...g.values] : [],
288
- _
289
- );
290
- return {
291
- ...g,
292
- operator: e,
293
- values: k
294
- };
295
- });
281
+ function pe(e, l) {
282
+ const c = ve(
283
+ Array.isArray(e.values) ? [...e.values] : [],
284
+ ue(l)
285
+ );
286
+ return { ...e, operator: l, values: c };
296
287
  }
297
- function X() {
298
- D.value = [...D.value, z()];
288
+ function Se(e, l) {
289
+ O.value = O.value.map(
290
+ (c, g) => g === e ? pe(c, l) : c
291
+ );
292
+ }
293
+ function K() {
294
+ O.value = [...O.value, ce()];
299
295
  }
300
- function te(e) {
301
- D.value.length <= 1 || (D.value = D.value.filter((l, p) => p !== e));
296
+ function le(e) {
297
+ O.value.length <= 1 || (O.value = O.value.filter((l, c) => c !== e));
302
298
  }
303
- function Oe() {
304
- $.value = [...$.value, A()];
299
+ function $e() {
300
+ S.value = [...S.value, q()];
305
301
  }
306
- function Re(e) {
307
- $.value.length <= 1 || ($.value = $.value.filter(
308
- (l, p) => p !== e
302
+ function Me(e) {
303
+ S.value.length <= 1 || (S.value = S.value.filter(
304
+ (l, c) => c !== e
309
305
  ));
310
306
  }
311
- function De(e, l, p) {
312
- const g = $.value[e];
313
- g && ($.value[e] = {
307
+ function De(e, l, c) {
308
+ const g = S.value[e];
309
+ g && (S.value[e] = {
314
310
  ...g,
315
- [l]: pe(p)
311
+ [l]: x(c)
316
312
  });
317
313
  }
318
- function _e(e) {
314
+ function he(e) {
319
315
  return e.length === 0 || e.some((l) => l === "");
320
316
  }
321
- function Fe() {
317
+ function we() {
322
318
  if (!a.value) return !0;
323
- if (Y.value) {
324
- const p = $.value.map((_) => _.name.trim()).filter(Boolean);
325
- return $.value.some(
326
- (_) => !_.name.trim() || !_.startTime || !_.endTime
319
+ if (ee.value) {
320
+ const c = S.value.map((h) => h.name.trim()).filter(Boolean);
321
+ return S.value.some(
322
+ (h) => !h.name.trim() || !h.startTime || !h.endTime
327
323
  ) ? (w.open({
328
324
  message: v("report.section.filter.invalidCustomTimeRange"),
329
325
  type: "error"
330
- }), !1) : new Set(p).size !== p.length ? (w.open({
326
+ }), !1) : new Set(c).size !== c.length ? (w.open({
331
327
  message: v("report.section.filter.customTimeRangeNamesMustBeUnique"),
332
328
  type: "error"
333
329
  }), !1) : !0;
334
330
  }
335
- const e = D.value.map((p) => p.label.trim()).filter(Boolean);
336
- return D.value.some(
337
- (p) => !p.label.trim() || _e(p.values)
331
+ const e = O.value.map((c) => c.label.trim()).filter(Boolean);
332
+ return O.value.some(
333
+ (c) => !c.label.trim() || he(c.values)
338
334
  ) ? (w.open({ message: v("report.section.filter.invalidCustomOption"), type: "error" }), !1) : new Set(e).size !== e.length ? (w.open({
339
335
  message: v("report.section.filter.customOptionLabelsMustBeUnique"),
340
336
  type: "error"
341
337
  }), !1) : !0;
342
338
  }
343
339
  ge(n, (e) => {
344
- var l, p, g, _, k, T;
345
- e && (Z.value = ((l = y.value) == null ? void 0 : l.label) || "", O.value = E.schemas.find(
340
+ var l, c, g, h, $, C;
341
+ e && (X.value = ((l = y.value) == null ? void 0 : l.label) || "", D.value = L.schemas.find(
346
342
  (W) => {
347
- var P;
348
- return W.name === ((P = y.value) == null ? void 0 : P.schemaName);
343
+ var R;
344
+ return W.name === ((R = y.value) == null ? void 0 : R.schemaName);
349
345
  }
350
- ), F.value = (p = Ue.value.find(
346
+ ), F.value = (c = Ie.value.find(
351
347
  (W) => {
352
- var P;
353
- return W.value.name === ((P = y.value) == null ? void 0 : P.name);
348
+ var R;
349
+ return W.value.name === ((R = y.value) == null ? void 0 : R.name);
354
350
  }
355
- )) == null ? void 0 : p.value, N.value = (g = y.value) == null ? void 0 : g.option, le.value = ((_ = y.value) == null ? void 0 : _.tileIds) || [], L.value = ((k = y.value) == null ? void 0 : k.filters) || [], re.value = ((T = y.value) == null ? void 0 : T.beforeAggregation) === !0, ve());
351
+ )) == null ? void 0 : c.value, N.value = (g = y.value) == null ? void 0 : g.option, Z.value = ((h = y.value) == null ? void 0 : h.tileIds) || [], A.value = (($ = y.value) == null ? void 0 : $.filters) || [], ae.value = ((C = y.value) == null ? void 0 : C.beforeAggregation) === !0, Q());
356
352
  }), ge(a, (e) => {
357
- var l;
358
- e && (K.value = ((l = D.value[0]) == null ? void 0 : l.operator) ?? ne(), H());
359
- }), ge(se, (e) => {
353
+ e && E();
354
+ }), ge(ne, (e) => {
360
355
  if (!e) {
361
- a.value = !1, D.value = [], $.value = [];
356
+ a.value = !1, O.value = [], S.value = [];
362
357
  return;
363
358
  }
364
- H();
365
- }), ge(Y, () => {
366
- H();
367
- }), ge(ue, (e) => {
368
- var p;
369
- const l = (p = e[0]) == null ? void 0 : p.value;
370
- l && (e.some((g) => g.value === K.value) || we(l));
359
+ E();
360
+ }), ge(ee, () => {
361
+ E();
362
+ }), ge(re, (e) => {
363
+ var g;
364
+ const l = (g = e[0]) == null ? void 0 : g.value;
365
+ if (!l) return;
366
+ const c = new Set(e.map((h) => h.value));
367
+ O.value = O.value.map(
368
+ (h) => c.has(h.operator) ? h : pe(h, l)
369
+ );
371
370
  });
372
- const Ie = b(
373
- () => E.schemas.map((e) => ({
371
+ const Oe = b(
372
+ () => L.schemas.map((e) => ({
374
373
  label: e.label || e.name,
375
374
  value: e
376
375
  }))
377
- ), Ue = b(() => {
376
+ ), Ie = b(() => {
378
377
  var e;
379
- return (((e = O.value) == null ? void 0 : e.fields) || []).filter((l) => l.type !== ae.Numeric).map((l) => ({
378
+ return (((e = D.value) == null ? void 0 : e.fields) || []).filter((l) => l.type !== oe.Numeric).map((l) => ({
380
379
  label: l.label || l.name,
381
380
  value: l
382
381
  }));
383
- }), ze = b(() => {
382
+ }), Re = b(() => {
384
383
  var e;
385
- return ((e = F.value) == null ? void 0 : e.type) !== ae.Timestamp ? [] : Ul(v);
386
- }), be = b(() => E.tiles.reduce((e, l, p) => {
387
- var k, T, W, P, u;
388
- const g = ((k = l.widget) == null ? void 0 : k.config.schemaNames) ?? [], _ = (((T = l.widget) == null ? void 0 : T.config.joinDatasources) ?? []).flatMap(
384
+ return ((e = F.value) == null ? void 0 : e.type) !== oe.Timestamp ? [] : Ul(v);
385
+ }), be = b(() => L.tiles.reduce((e, l, c) => {
386
+ var $, C, W, R, u;
387
+ const g = (($ = l.widget) == null ? void 0 : $.config.schemaNames) ?? [], h = (((C = l.widget) == null ? void 0 : C.config.joinDatasources) ?? []).flatMap(
389
388
  (s) => s.schemaNames ?? []
390
389
  );
391
- return [...g, ..._].includes(((W = O.value) == null ? void 0 : W.name) || "") && e.push({
392
- label: (u = (P = l.widget) == null ? void 0 : P.title) != null && u.trim() ? l.widget.title : `Widget ${p + 1}`,
390
+ return [...g, ...h].includes(((W = D.value) == null ? void 0 : W.name) || "") && e.push({
391
+ label: (u = (R = l.widget) == null ? void 0 : R.title) != null && u.trim() ? l.widget.title : `Widget ${c + 1}`,
393
392
  value: l.id
394
393
  }), e;
395
- }, [])), Ve = b(
396
- () => E.schemas.flatMap(
394
+ }, [])), _e = b(
395
+ () => L.schemas.flatMap(
397
396
  (e) => (e.fields ?? []).map((l) => ({
398
397
  ...l,
399
398
  labels: [
@@ -403,34 +402,34 @@ const nt = /* @__PURE__ */ he({
403
402
  }))
404
403
  )
405
404
  );
406
- function xe(e) {
405
+ function Fe(e) {
407
406
  var l;
408
- e.name !== ((l = O.value) == null ? void 0 : l.name) && (O.value = e, F.value = void 0, K.value = ke.Equal, a.value = !1, D.value = [], $.value = []);
407
+ e.name !== ((l = D.value) == null ? void 0 : l.name) && (D.value = e, F.value = void 0, a.value = !1, O.value = [], S.value = []);
409
408
  }
410
- function Ce(e) {
411
- F.value = e, N.value = e.type === ae.Timestamp ? Pe.DateTime : void 0, K.value = ne(), a.value = !1, D.value = [], $.value = [];
409
+ function Ve(e) {
410
+ F.value = e, N.value = e.type === oe.Timestamp ? ze.DateTime : void 0, a.value = !1, O.value = [], S.value = [];
412
411
  }
413
- function oe(e, l) {
412
+ function te(e, l) {
414
413
  switch (e) {
415
- case ae.Timestamp:
416
- return l === Pe.DateTime || l === Pe.TimeOfDay ? ke.Between : ke.Equal;
417
- case ae.Bool:
418
- case ae.String:
419
- case ae.Numeric:
420
- return ke.Equal;
414
+ case oe.Timestamp:
415
+ return l === ze.DateTime || l === ze.TimeOfDay ? Pe.Between : Pe.Equal;
416
+ case oe.Bool:
417
+ case oe.String:
418
+ case oe.Numeric:
419
+ return Pe.Equal;
421
420
  default:
422
421
  throw new Error(`Unsupported data type: ${e}`);
423
422
  }
424
423
  }
425
- function Ne(e) {
426
- var k, T, W, P;
424
+ function Ue(e) {
425
+ var $, C, W, R;
427
426
  const l = y.value;
428
- if (!((k = l == null ? void 0 : l.defaultValues) != null && k.length) || !(l.schemaName === ((T = O.value) == null ? void 0 : T.name) && l.name === ((W = F.value) == null ? void 0 : W.name)) || !!e != !!((P = l.customOptions) != null && P.length)) return;
429
- const g = new Set((e ?? []).map((u) => u.label)), _ = e ? l.defaultValues.filter((u) => g.has(String(u))) : l.defaultValues;
430
- return _.length ? { defaultValues: _ } : void 0;
427
+ if (!(($ = l == null ? void 0 : l.defaultValues) != null && $.length) || !(l.schemaName === ((C = D.value) == null ? void 0 : C.name) && l.name === ((W = F.value) == null ? void 0 : W.name)) || !!e != !!((R = l.customOptions) != null && R.length)) return;
428
+ const g = new Set((e ?? []).map((u) => u.label)), h = e ? l.defaultValues.filter((u) => g.has(String(u))) : l.defaultValues;
429
+ return h.length ? { defaultValues: h } : void 0;
431
430
  }
432
431
  function We() {
433
- if (!O.value) {
432
+ if (!D.value) {
434
433
  w.open({ message: v("report.section.filter.invalidSchema"), type: "error" });
435
434
  return;
436
435
  }
@@ -438,48 +437,48 @@ const nt = /* @__PURE__ */ he({
438
437
  w.open({ message: v("report.section.filter.invalidDimension"), type: "error" });
439
438
  return;
440
439
  }
441
- const e = L.value.filter((g) => g ? !Ie.value.some((k) => k.value.name === g.schemaName) : !0);
440
+ const e = A.value.filter((g) => g ? !Oe.value.some(($) => $.value.name === g.schemaName) : !0);
442
441
  if (e.length > 0) {
443
- const g = e.filter((k) => !!k).map((k) => k.schemaName), _ = e.some((k) => !k) ? `, ${v("report.section.filter.unknownFilters")}` : "";
442
+ const g = e.filter(($) => !!$).map(($) => $.schemaName), h = e.some(($) => !$) ? `, ${v("report.section.filter.unknownFilters")}` : "";
444
443
  w.open({
445
444
  message: v("report.section.filter.invalidFiltersSchemaNotFound", {
446
445
  schemas: g.join(", "),
447
- unknownFiltersSuffix: _
446
+ unknownFiltersSuffix: h
448
447
  }),
449
448
  type: "error"
450
449
  });
451
450
  return;
452
451
  }
453
- if (!Fe())
452
+ if (!we())
454
453
  return;
455
- const l = a.value && !Y.value ? D.value.map((g) => ({
454
+ const l = a.value && !ee.value ? O.value.map((g) => ({
456
455
  label: g.label.trim(),
457
- operator: g.operator ?? ne(),
458
- values: de(
456
+ operator: g.operator ?? me(),
457
+ values: ve(
459
458
  [...g.values],
460
- ce(g.operator)
459
+ ue(g.operator)
461
460
  )
462
- })) : void 0, p = a.value && Y.value ? $.value.map((g) => ({
461
+ })) : void 0, c = a.value && ee.value ? S.value.map((g) => ({
463
462
  name: g.name.trim(),
464
463
  startTime: g.startTime,
465
464
  endTime: g.endTime
466
465
  })) : void 0;
467
466
  y.value = {
468
- schemaName: O.value.name,
467
+ schemaName: D.value.name,
469
468
  name: F.value.name,
470
- label: Z.value,
471
- operator: oe(
469
+ label: X.value,
470
+ operator: te(
472
471
  F.value.type,
473
- F.value.type === ae.Timestamp ? N.value ?? Pe.DateTime : null
472
+ F.value.type === oe.Timestamp ? N.value ?? ze.DateTime : null
474
473
  ),
475
- option: F.value.type === ae.Timestamp ? N.value : null,
474
+ option: F.value.type === oe.Timestamp ? N.value : null,
476
475
  values: [],
477
- tileIds: [...le.value],
478
- filters: j(L.value),
476
+ tileIds: [...Z.value],
477
+ filters: de(A.value),
479
478
  customOptions: l,
480
- customTimeRanges: p,
481
- ...me.value && re.value ? { beforeAggregation: !0 } : {},
482
- ...Ne(l)
479
+ customTimeRanges: c,
480
+ ...ie.value && ae.value ? { beforeAggregation: !0 } : {},
481
+ ...Ue(l)
483
482
  }, n.value = !1;
484
483
  }
485
484
  function He() {
@@ -488,40 +487,40 @@ const nt = /* @__PURE__ */ he({
488
487
  const r = b(() => {
489
488
  var e;
490
489
  return [
491
- (e = O.value) == null ? void 0 : e.name,
492
- ...L.value.map((l) => l.schemaName)
490
+ (e = D.value) == null ? void 0 : e.name,
491
+ ...A.value.map((l) => l.schemaName)
493
492
  ];
494
493
  });
495
494
  function o(e) {
496
- var Q;
497
- const l = E.tiles.find((J) => J.id === e.value);
498
- if (!l || !O.value || !F.value) return null;
499
- const p = (Q = l == null ? void 0 : l.widget) == null ? void 0 : Q.config, g = (p == null ? void 0 : p.schemaNames) ?? [], _ = ((p == null ? void 0 : p.joinDatasources) ?? []).flatMap(
500
- (J) => J.schemaNames ?? []
501
- ), k = [...g, ..._], T = r.value.filter((J) => !!J).some((J) => !k.includes(J)), P = F.value.type === ae.Timestamp || me.value && re.value;
502
- if (T)
495
+ var H;
496
+ const l = L.tiles.find((j) => j.id === e.value);
497
+ if (!l || !D.value || !F.value) return null;
498
+ const c = (H = l == null ? void 0 : l.widget) == null ? void 0 : H.config, g = (c == null ? void 0 : c.schemaNames) ?? [], h = ((c == null ? void 0 : c.joinDatasources) ?? []).flatMap(
499
+ (j) => j.schemaNames ?? []
500
+ ), $ = [...g, ...h], C = r.value.filter((j) => !!j).some((j) => !$.includes(j)), R = F.value.type === oe.Timestamp || ie.value && ae.value;
501
+ if (C)
503
502
  return v(
504
- P ? "report.section.filter.missingFilterSchema" : "report.section.filter.missingFilterSchemaOrDimension"
503
+ R ? "report.section.filter.missingFilterSchema" : "report.section.filter.missingFilterSchemaOrDimension"
505
504
  );
506
- if (P) return null;
507
- const u = ((p == null ? void 0 : p.dimensions) ?? []).map((J) => ({
508
- schemaName: J.schemaName,
509
- name: J.name
510
- })), s = ((p == null ? void 0 : p.joinDatasources) ?? []).flatMap(
511
- (J) => (J.dimensions ?? []).map((Ke) => ({
505
+ if (R) return null;
506
+ const u = ((c == null ? void 0 : c.dimensions) ?? []).map((j) => ({
507
+ schemaName: j.schemaName,
508
+ name: j.name
509
+ })), s = ((c == null ? void 0 : c.joinDatasources) ?? []).flatMap(
510
+ (j) => (j.dimensions ?? []).map((Ke) => ({
512
511
  schemaName: Ke.schemaName,
513
512
  name: Ke.name
514
513
  }))
515
- ), i = [...u, ...s], I = O.value.name, h = F.value.name;
514
+ ), i = [...u, ...s], I = D.value.name, _ = F.value.name;
516
515
  return i.some(
517
- (J) => J.schemaName === I && J.name === h
516
+ (j) => j.schemaName === I && j.name === _
518
517
  ) ? null : v("report.section.filter.missingFilterSchemaOrDimension");
519
518
  }
520
519
  return (e, l) => {
521
- const p = S("FmTextField"), g = S("FmSelect"), _ = S("FmCheckbox"), k = S("FmTimePicker"), T = S("FmButton"), W = S("FmLabel"), P = S("FmIcon"), u = S("FmTooltip"), s = S("FmForm"), i = S("FmDialog");
522
- return c(), C(i, {
520
+ const c = T("FmTextField"), g = T("FmSelect"), h = T("FmCheckbox"), $ = T("FmTimePicker"), C = T("FmButton"), W = T("FmLabel"), R = T("FmIcon"), u = T("FmTooltip"), s = T("FmForm"), i = T("FmDialog");
521
+ return p(), k(i, {
523
522
  modelValue: n.value,
524
- "onUpdate:modelValue": l[10] || (l[10] = (I) => n.value = I),
523
+ "onUpdate:modelValue": l[9] || (l[9] = (I) => n.value = I),
525
524
  overlay: !0,
526
525
  "z-index": 10
527
526
  }, {
@@ -536,130 +535,127 @@ const nt = /* @__PURE__ */ he({
536
535
  default: V(() => {
537
536
  var I;
538
537
  return [
539
- d(p, {
540
- modelValue: Z.value,
541
- "onUpdate:modelValue": l[0] || (l[0] = (h) => Z.value = h),
538
+ d(c, {
539
+ modelValue: X.value,
540
+ "onUpdate:modelValue": l[0] || (l[0] = (_) => X.value = _),
542
541
  placeholder: t(v)("report.section.filter.displayName"),
543
542
  label: t(v)("report.section.filter.displayName"),
544
543
  class: "mb-2"
545
544
  }, null, 8, ["modelValue", "placeholder", "label"]),
546
545
  d(al, {
547
- "model-value": O.value,
548
- items: Ie.value,
546
+ "model-value": D.value,
547
+ items: Oe.value,
549
548
  placeholder: t(v)("report.section.schema.title"),
550
549
  label: t(v)("report.section.schema.title"),
551
- "onUpdate:modelValue": l[1] || (l[1] = (h) => xe(h))
550
+ "onUpdate:modelValue": l[1] || (l[1] = (_) => Fe(_))
552
551
  }, null, 8, ["model-value", "items", "placeholder", "label"]),
553
552
  d(al, {
554
553
  "model-value": F.value,
555
- items: Ue.value,
554
+ items: Ie.value,
556
555
  placeholder: t(v)("report.section.dimension.title"),
557
556
  label: t(v)("report.section.dimension.title"),
558
- "onUpdate:modelValue": l[2] || (l[2] = (h) => Ce(h))
557
+ "onUpdate:modelValue": l[2] || (l[2] = (_) => Ve(_))
559
558
  }, null, 8, ["model-value", "items", "placeholder", "label"]),
560
- ((I = F.value) == null ? void 0 : I.type) === t(ae).Timestamp ? (c(), C(g, {
559
+ ((I = F.value) == null ? void 0 : I.type) === t(oe).Timestamp ? (p(), k(g, {
561
560
  key: 0,
562
561
  modelValue: N.value,
563
- "onUpdate:modelValue": l[3] || (l[3] = (h) => N.value = h),
564
- items: ze.value,
562
+ "onUpdate:modelValue": l[3] || (l[3] = (_) => N.value = _),
563
+ items: Re.value,
565
564
  placeholder: t(v)("report.section.filter.timeFormatter"),
566
565
  label: t(v)("report.section.filter.timeFormatter")
567
566
  }, null, 8, ["modelValue", "items", "placeholder", "label"])) : U("", !0),
568
- se.value ? (c(), C(_, {
567
+ ne.value ? (p(), k(h, {
569
568
  key: 1,
570
569
  modelValue: a.value,
571
- "onUpdate:modelValue": l[4] || (l[4] = (h) => a.value = h),
570
+ "onUpdate:modelValue": l[4] || (l[4] = (_) => a.value = _),
572
571
  label: t(v)("report.section.filter.customOptions"),
573
572
  value: !0
574
573
  }, null, 8, ["modelValue", "label"])) : U("", !0),
575
- se.value && a.value ? (c(), R("div", dt, [
576
- Y.value ? (c(!0), R(ye, { key: 0 }, Le($.value, (h, ee) => (c(), R("div", {
577
- key: `custom-time-range-${ee}`,
574
+ ne.value && a.value ? (p(), z("div", dt, [
575
+ ee.value ? (p(!0), z(ke, { key: 0 }, Le(S.value, (_, Y) => (p(), z("div", {
576
+ key: `custom-time-range-${Y}`,
578
577
  class: "flex flex-col gap-2"
579
578
  }, [
580
579
  f("div", mt, [
581
- d(p, {
582
- modelValue: h.name,
583
- "onUpdate:modelValue": (Q) => h.name = Q,
580
+ d(c, {
581
+ modelValue: _.name,
582
+ "onUpdate:modelValue": (H) => _.name = H,
584
583
  label: t(v)("report.section.filter.label")
585
584
  }, null, 8, ["modelValue", "onUpdate:modelValue", "label"]),
586
- d(k, {
587
- "model-value": x(h.startTime),
585
+ d($, {
586
+ "model-value": se(_.startTime),
588
587
  label: t(v)("report.date.startingTime"),
589
- "onUpdate:modelValue": (Q) => De(ee, "startTime", Q)
588
+ "onUpdate:modelValue": (H) => De(Y, "startTime", H)
590
589
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
591
- d(k, {
592
- "model-value": x(h.endTime),
590
+ d($, {
591
+ "model-value": se(_.endTime),
593
592
  label: t(v)("report.date.endingTime"),
594
- "onUpdate:modelValue": (Q) => De(ee, "endTime", Q)
593
+ "onUpdate:modelValue": (H) => De(Y, "endTime", H)
595
594
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
596
- $.value.length > 1 ? (c(), R("div", ct, [
597
- d(T, {
595
+ S.value.length > 1 ? (p(), z("div", ct, [
596
+ d(C, {
598
597
  icon: "delete",
599
598
  variant: "tertiary",
600
- onClick: (Q) => Re(ee)
599
+ onClick: (H) => Me(Y)
601
600
  }, null, 8, ["onClick"])
602
601
  ])) : U("", !0)
603
602
  ])
604
- ]))), 128)) : (c(), R(ye, { key: 1 }, [
605
- f("p", pt, B(t(v)("report.section.filter.operator")), 1),
606
- ue.value.length > 0 ? (c(), C(al, {
607
- key: 0,
608
- "model-value": K.value,
609
- items: ue.value,
610
- placeholder: t(v)("report.section.filter.operator"),
611
- "onUpdate:modelValue": l[5] || (l[5] = (h) => we(h))
612
- }, null, 8, ["model-value", "items", "placeholder"])) : U("", !0),
613
- (c(!0), R(ye, null, Le(D.value, (h, ee) => (c(), R("div", {
614
- key: `custom-option-${ee}`,
615
- class: "flex flex-col gap-2"
603
+ ]))), 128)) : (p(!0), z(ke, { key: 1 }, Le(O.value, (_, Y) => (p(), z("div", {
604
+ key: `custom-option-${Y}`,
605
+ class: "flex flex-col gap-2"
606
+ }, [
607
+ f("div", {
608
+ class: Ae(["grid grid-cols-1 gap-2 p-2 sm:items-end text-fm-color-typo-primary fm-typo-en-body-lg-600 border-neutral-300 rounded-md border", "sm:grid-cols-[1fr_1.6fr_auto]"])
616
609
  }, [
617
- f("div", {
618
- class: Ae(["grid grid-cols-1 gap-2 p-2 sm:items-end text-fm-color-typo-primary fm-typo-en-body-lg-600 border-neutral-300 rounded-md border", "sm:grid-cols-[1fr_1.6fr_auto]"])
619
- }, [
620
- f("span", vt, B(t(v)("report.section.filter.label")), 1),
621
- d(p, {
622
- modelValue: h.label,
623
- "onUpdate:modelValue": (Q) => h.label = Q
624
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
625
- (c(), C(Nl, {
626
- key: `custom-option-value-${ee}-${h.operator ?? ""}-${N.value ?? ""}`,
627
- modelValue: h.values,
628
- "onUpdate:modelValue": (Q) => h.values = Q,
629
- config: ce(h.operator),
630
- option: N.value
631
- }, null, 8, ["modelValue", "onUpdate:modelValue", "config", "option"])),
632
- D.value.length > 1 ? (c(), R("div", ft, [
633
- d(T, {
634
- icon: "delete",
635
- variant: "tertiary",
636
- onClick: (Q) => te(ee)
637
- }, null, 8, ["onClick"])
638
- ])) : U("", !0)
639
- ])
640
- ]))), 128))
641
- ], 64)),
642
- d(T, {
610
+ f("span", pt, B(t(v)("report.section.filter.label")), 1),
611
+ d(c, {
612
+ modelValue: _.label,
613
+ "onUpdate:modelValue": (H) => _.label = H
614
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
615
+ re.value.length > 0 ? (p(), k(al, {
616
+ key: 0,
617
+ "model-value": _.operator,
618
+ items: re.value,
619
+ placeholder: t(v)("report.section.filter.operator"),
620
+ "onUpdate:modelValue": (H) => Se(Y, H)
621
+ }, null, 8, ["model-value", "items", "placeholder", "onUpdate:modelValue"])) : U("", !0),
622
+ (p(), k(Nl, {
623
+ key: `custom-option-value-${Y}-${_.operator ?? ""}-${N.value ?? ""}`,
624
+ modelValue: _.values,
625
+ "onUpdate:modelValue": (H) => _.values = H,
626
+ config: ue(_.operator),
627
+ option: N.value
628
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "config", "option"])),
629
+ O.value.length > 1 ? (p(), z("div", vt, [
630
+ d(C, {
631
+ icon: "delete",
632
+ variant: "tertiary",
633
+ onClick: (H) => le(Y)
634
+ }, null, 8, ["onClick"])
635
+ ])) : U("", !0)
636
+ ])
637
+ ]))), 128)),
638
+ d(C, {
643
639
  class: "w-full",
644
640
  variant: "primary",
645
641
  icon: "add",
646
642
  "icon-position": "prepend",
647
- onClick: l[6] || (l[6] = (h) => Y.value ? Oe() : X())
643
+ onClick: l[5] || (l[5] = (_) => ee.value ? $e() : K())
648
644
  })
649
645
  ])) : U("", !0),
650
646
  d(Bl, {
651
- modelValue: L.value,
652
- "onUpdate:modelValue": l[7] || (l[7] = (h) => L.value = h),
653
- options: Ve.value
647
+ modelValue: A.value,
648
+ "onUpdate:modelValue": l[6] || (l[6] = (_) => A.value = _),
649
+ options: _e.value
654
650
  }, null, 8, ["modelValue", "options"]),
655
- me.value ? (c(), R("div", gt, [
656
- d(_, {
657
- modelValue: re.value,
658
- "onUpdate:modelValue": l[8] || (l[8] = (h) => re.value = h),
651
+ ie.value ? (p(), z("div", ft, [
652
+ d(h, {
653
+ modelValue: ae.value,
654
+ "onUpdate:modelValue": l[7] || (l[7] = (_) => ae.value = _),
659
655
  label: t(v)("reportV5.globalFilter.beforeAggregation"),
660
656
  value: !0
661
657
  }, null, 8, ["modelValue", "label"]),
662
- f("p", bt, B(t(v)("reportV5.globalFilter.beforeAggregationHint")), 1)
658
+ f("p", gt, B(t(v)("reportV5.globalFilter.beforeAggregationHint")), 1)
663
659
  ])) : U("", !0),
664
660
  d(W, { class: "mt-2 fm-typo-en-body-lg-600" }, {
665
661
  default: V(() => [
@@ -667,25 +663,25 @@ const nt = /* @__PURE__ */ he({
667
663
  ]),
668
664
  _: 1
669
665
  }),
670
- q.tiles.length > 0 ? (c(), R("div", yt, [
671
- (c(!0), R(ye, null, Le(be.value, (h) => (c(), R("div", {
672
- key: h.value,
666
+ P.tiles.length > 0 ? (p(), z("div", bt, [
667
+ (p(!0), z(ke, null, Le(be.value, (_) => (p(), z("div", {
668
+ key: _.value,
673
669
  class: "flex items-center"
674
670
  }, [
675
- d(_, {
676
- modelValue: le.value,
677
- "onUpdate:modelValue": l[9] || (l[9] = (ee) => le.value = ee),
678
- label: h.label,
679
- value: h.value
671
+ d(h, {
672
+ modelValue: Z.value,
673
+ "onUpdate:modelValue": l[8] || (l[8] = (Y) => Z.value = Y),
674
+ label: _.label,
675
+ value: _.value
680
676
  }, null, 8, ["modelValue", "label", "value"]),
681
- o(h) ? (c(), C(u, {
677
+ o(_) ? (p(), k(u, {
682
678
  key: 0,
683
- content: o(h) ?? void 0,
679
+ content: o(_) ?? void 0,
684
680
  "z-index": 99,
685
681
  class: "ml-2"
686
682
  }, {
687
683
  default: V(() => [
688
- d(P, {
684
+ d(R, {
689
685
  name: "warning",
690
686
  class: "text-fm-color-system-error-300"
691
687
  })
@@ -693,7 +689,7 @@ const nt = /* @__PURE__ */ he({
693
689
  _: 2
694
690
  }, 1032, ["content"])) : U("", !0)
695
691
  ]))), 128))
696
- ])) : (c(), C(W, {
692
+ ])) : (p(), k(W, {
697
693
  key: 5,
698
694
  class: "fm-typo-en-body-lg-400",
699
695
  label: t(v)("report.section.filter.noWidget")
@@ -704,13 +700,13 @@ const nt = /* @__PURE__ */ he({
704
700
  }, 512)
705
701
  ]),
706
702
  "dialog-footer": V(() => [
707
- l[11] || (l[11] = f("div", { class: "grow" }, null, -1)),
708
- d(T, {
703
+ l[10] || (l[10] = f("div", { class: "grow" }, null, -1)),
704
+ d(C, {
709
705
  label: t(v)("report.common.cancel"),
710
706
  variant: "tertiary",
711
707
  onClick: He
712
708
  }, null, 8, ["label"]),
713
- d(T, {
709
+ d(C, {
714
710
  label: t(v)("report.common.confirm"),
715
711
  onClick: We
716
712
  }, null, 8, ["label"])
@@ -719,14 +715,14 @@ const nt = /* @__PURE__ */ he({
719
715
  }, 8, ["modelValue"]);
720
716
  };
721
717
  }
722
- }), wt = 8.4375, _t = 1024 ** 4, Ft = {
718
+ }), ht = 8.4375, wt = 1024 ** 4, _t = {
723
719
  MY: { rate: 4, currency: "MYR", symbol: "RM" },
724
720
  TH: { rate: 33, currency: "THB", symbol: "฿" },
725
721
  SG: { rate: 1.29, currency: "SGD", symbol: "S$" },
726
722
  ID: { rate: 17900, currency: "IDR", symbol: "Rp" }
727
- }, Vt = { rate: 1, currency: "USD", symbol: "$" };
728
- function vl(q, v) {
729
- const m = q / _t * wt, { rate: y, currency: n, symbol: w } = Ft[v] ?? Vt;
723
+ }, Ft = { rate: 1, currency: "USD", symbol: "$" };
724
+ function vl(P, v) {
725
+ const m = P / wt * ht, { rate: y, currency: n, symbol: w } = _t[v] ?? Ft;
730
726
  return {
731
727
  amount: m * y,
732
728
  currency: n,
@@ -734,144 +730,144 @@ function vl(q, v) {
734
730
  costUsd: m
735
731
  };
736
732
  }
737
- function fl(q, v) {
738
- return q < 0.01 ? `< ${v}0.01` : `${v}${q.toFixed(2)}`;
733
+ function fl(P, v) {
734
+ return P < 0.01 ? `< ${v}0.01` : `${v}${P.toFixed(2)}`;
739
735
  }
740
- const xt = { class: "flex flex-col gap-16" }, Ct = {
736
+ const Vt = { class: "flex flex-col gap-16" }, xt = {
741
737
  key: 0,
742
738
  class: "flex flex-col gap-8"
743
- }, kt = { class: "flex items-center gap-4 pb-8 border-b border-neutral-300" }, Tt = ["title"], St = { class: "fm-typo-en-title-sm-600 pt-8" }, $t = { class: "mx-16 flex flex-col gap-12 py-4" }, Ot = { class: "fm-typo-en-body-lg-600" }, Dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, It = { class: "flex flex-col gap-12 border-t border-neutral-200 pt-12" }, Ut = { class: "fm-typo-en-body-lg-600" }, Nt = { class: "grid grid-cols-2 items-end gap-12" }, Bt = { class: "flex flex-col gap-8 min-w-0" }, Mt = { class: "fm-typo-en-body-sm-600 whitespace-nowrap" }, Rt = { class: "flex gap-8" }, zt = { class: "grid grid-cols-2 items-end gap-12" }, Pt = { class: "flex flex-col gap-8 min-w-0" }, qt = { class: "fm-typo-en-body-sm-600 whitespace-nowrap" }, Et = { class: "flex gap-8" }, Lt = {
739
+ }, kt = { class: "flex items-center gap-4 pb-8 border-b border-neutral-300" }, Ct = ["title"], Tt = { class: "fm-typo-en-title-sm-600 pt-8" }, St = { class: "mx-16 flex flex-col gap-12 py-4" }, $t = { class: "fm-typo-en-body-lg-600" }, Dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Ot = { class: "flex flex-col gap-12 border-t border-neutral-200 pt-12" }, It = { class: "fm-typo-en-body-lg-600" }, Ut = { class: "grid grid-cols-2 items-end gap-12" }, Nt = { class: "flex flex-col gap-8 min-w-0" }, Bt = { class: "fm-typo-en-body-sm-600 whitespace-nowrap" }, Mt = { class: "flex gap-8" }, Rt = { class: "grid grid-cols-2 items-end gap-12" }, zt = { class: "flex flex-col gap-8 min-w-0" }, Pt = { class: "fm-typo-en-body-sm-600 whitespace-nowrap" }, qt = { class: "flex gap-8" }, Et = {
744
740
  key: 1,
745
741
  class: "rounded-md border border-dashed border-neutral-300 p-12 text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
746
- }, At = ["onClick"], Gt = ["title"], Wt = {
742
+ }, Lt = ["onClick"], At = ["title"], Gt = {
747
743
  key: 0,
748
744
  class: "text-fm-color-typo-secondary"
749
- }, Ht = { class: "text-fm-color-system-error-300" }, jt = { class: "w-full text-left" }, Jt = /* @__PURE__ */ he({
745
+ }, Wt = { class: "text-fm-color-system-error-300" }, Ht = { class: "w-full text-left" }, jt = /* @__PURE__ */ ye({
750
746
  __name: "TileDrillPanel",
751
747
  props: {
752
748
  report: {}
753
749
  },
754
750
  emits: ["add-widget"],
755
- setup(q, { emit: v }) {
756
- const m = q, y = v, { t: n, te: w } = Ge(), E = [
751
+ setup(P, { emit: v }) {
752
+ const m = P, y = v, { t: n, te: w } = Ge(), L = [
757
753
  { label: n("report.tile.widget.icon.small"), value: Ye.Small },
758
754
  { label: n("report.tile.widget.icon.medium"), value: Ye.Medium },
759
755
  { label: n("report.tile.widget.icon.large"), value: Ye.Large },
760
756
  { label: n("report.tile.widget.icon.extraLarge"), value: Ye.ExtraLarge }
761
- ], Z = [
762
- { label: n("report.tile.widget.icon.material"), value: Me.Material },
763
- { label: n("report.tile.widget.icon.customSvg"), value: Me.Custom }
764
- ], O = ul(), F = dl(), { promptMessage: N } = ml(), le = sl(), L = b(() => {
757
+ ], X = [
758
+ { label: n("report.tile.widget.icon.material"), value: Be.Material },
759
+ { label: n("report.tile.widget.icon.customSvg"), value: Be.Custom }
760
+ ], D = ul(), F = dl(), { promptMessage: N } = ml(), Z = sl(), A = b(() => {
765
761
  const r = [];
766
762
  let o = m.report.tiles;
767
- for (const e of Be.value) {
768
- const l = o.find((p) => p.id === e);
763
+ for (const e of Ne.value) {
764
+ const l = o.find((c) => c.id === e);
769
765
  if (!l) break;
770
766
  r.push(l), o = l.tiles ?? [];
771
767
  }
772
768
  return r;
773
769
  });
774
- ge(L, (r) => {
775
- r.length !== Be.value.length && (Be.value = r.map((o) => o.id));
770
+ ge(A, (r) => {
771
+ r.length !== Ne.value.length && (Ne.value = r.map((o) => o.id));
776
772
  });
777
- const a = b(() => L.value[L.value.length - 1] ?? null), D = b(() => L.value[L.value.length - 2] ?? null), $ = b(
773
+ const a = b(() => A.value[A.value.length - 1] ?? null), O = b(() => A.value[A.value.length - 2] ?? null), S = b(
778
774
  () => a.value ? a.value.tiles ?? [] : m.report.tiles
779
- ), K = b(() => {
775
+ ), ae = b(() => {
780
776
  var r;
781
777
  return ((r = a.value) == null ? void 0 : r.id) ?? null;
782
- }), re = b(() => L.value.length === 0), me = b(() => a.value ? qe(a.value) : !1), j = b(
783
- () => D.value ? qe(D.value) : !1
784
- ), ie = b(() => a.value ? fe(a.value) : !1), x = b(
785
- () => L.value.reduce(
778
+ }), ie = b(() => A.value.length === 0), de = b(() => a.value ? qe(a.value) : !1), J = b(
779
+ () => O.value ? qe(O.value) : !1
780
+ ), se = b(() => a.value ? fe(a.value) : !1), x = b(
781
+ () => A.value.reduce(
786
782
  (r, o) => qe(o) ? r : fe(o) ? 1 : r + 1,
787
783
  1
788
784
  )
789
- ), pe = b(() => !me.value && x.value < Fl), se = b(() => re.value);
790
- function Y(r) {
791
- r.widget && !fe(r) || (Be.value = [...Be.value, r.id]);
785
+ ), ne = b(() => !de.value && x.value < Fl), ee = b(() => ie.value);
786
+ function re(r) {
787
+ r.widget && !fe(r) || (Ne.value = [...Ne.value, r.id]);
792
788
  }
793
- function ue() {
794
- Be.value = Be.value.slice(0, -1);
789
+ function me() {
790
+ Ne.value = Ne.value.slice(0, -1);
795
791
  }
796
- function ne(r) {
792
+ function ue(r) {
797
793
  if (!r) return "";
798
794
  const o = `report.widget.types.${r.toLowerCase()}`;
799
795
  return w(o) ? n(o) : Qe(n, w, r, "other");
800
796
  }
801
- function ce(r, o) {
797
+ function ve(r, o) {
802
798
  if (r.widget) {
803
- const e = r.widget.title ? ne(r.widget.title) : n("report.editor.widget", { index: o + 1 });
799
+ const e = r.widget.title ? ue(r.widget.title) : n("report.editor.widget", { index: o + 1 });
804
800
  return fe(r) ? `${e} · ${n("report.editor.page")}` : e;
805
801
  }
806
802
  return r.tabTitle !== void 0 ? r.tabTitle || n("report.editor.tab", { index: o + 1 }) : r.title ? r.title : qe(r) ? n("report.editor.tabGroup") : n("report.editor.group");
807
803
  }
808
- function de(r, o) {
809
- return !r.widget && me.value ? r.tabTitle || n("report.editor.tab", { index: o + 1 }) : ce(r, o);
804
+ function ce(r, o) {
805
+ return !r.widget && de.value ? r.tabTitle || n("report.editor.tab", { index: o + 1 }) : ve(r, o);
810
806
  }
811
- function z(r) {
807
+ function q(r) {
812
808
  var o;
813
809
  return ((o = r.tiles) == null ? void 0 : o.length) ?? 0;
814
810
  }
815
- const A = b(
816
- () => L.value.map((r, o) => ce(r, o)).join(" › ")
811
+ const E = b(
812
+ () => A.value.map((r, o) => ve(r, o)).join(" › ")
817
813
  );
818
- function H(r, o) {
819
- _l.value = K.value, le.editingTileIndex = o, le.editingTile = JSON.parse(JSON.stringify(r)), O.push({ name: "tileEditor", query: F.query });
814
+ function Q(r, o) {
815
+ _l.value = ae.value, Z.editingTileIndex = o, Z.editingTile = JSON.parse(JSON.stringify(r)), D.push({ name: "tileEditor", query: F.query });
820
816
  }
821
- function ve(r, o) {
822
- $.value.splice(o + 1, 0, zl(r));
817
+ function pe(r, o) {
818
+ S.value.splice(o + 1, 0, zl(r));
823
819
  }
824
- async function we(r, o) {
825
- var p;
820
+ async function Se(r, o) {
821
+ var c;
826
822
  if (!await N({
827
823
  title: n("report.editor.deleteWidget"),
828
- message: n("report.editor.deleteWidgetConfirm", { title: de(r, o) })
824
+ message: n("report.editor.deleteWidgetConfirm", { title: ce(r, o) })
829
825
  })) return;
830
826
  const l = ll(r);
831
- $.value.splice(o, 1), (p = m.report.globalFilters) == null || p.forEach((g) => {
832
- var _;
833
- g.tileIds = (_ = g.tileIds) == null ? void 0 : _.filter((k) => !l.includes(k));
827
+ S.value.splice(o, 1), (c = m.report.globalFilters) == null || c.forEach((g) => {
828
+ var h;
829
+ g.tileIds = (h = g.tileIds) == null ? void 0 : h.filter(($) => !l.includes($));
834
830
  });
835
831
  }
836
- function X() {
832
+ function K() {
837
833
  a.value && (a.value.tiles || (a.value.tiles = []), a.value.tiles.push(Pl(a.value.tiles.length + 1)));
838
834
  }
839
- function te(r) {
835
+ function le(r) {
840
836
  ql(r);
841
837
  }
842
- async function Oe(r, o) {
843
- var p;
838
+ async function $e(r, o) {
839
+ var c;
844
840
  if (!await N({
845
841
  title: n("report.editor.removePage"),
846
- message: n("report.editor.removePageConfirm", { title: de(r, o) })
842
+ message: n("report.editor.removePageConfirm", { title: ce(r, o) })
847
843
  })) return;
848
844
  const l = ll(r).filter((g) => g !== r.id);
849
- (p = m.report.globalFilters) == null || p.forEach((g) => {
850
- var _;
851
- g.tileIds = (_ = g.tileIds) == null ? void 0 : _.filter((k) => !l.includes(k));
845
+ (c = m.report.globalFilters) == null || c.forEach((g) => {
846
+ var h;
847
+ g.tileIds = (h = g.tileIds) == null ? void 0 : h.filter(($) => !l.includes($));
852
848
  }), El(r);
853
849
  }
854
- function Re() {
855
- $.value.push(Ll());
850
+ function Me() {
851
+ S.value.push(Ll());
856
852
  }
857
853
  function De() {
858
- $.value.push(Al());
854
+ S.value.push(Al());
859
855
  }
860
- function _e(r) {
856
+ function he(r) {
861
857
  var e;
862
858
  const o = Number((e = r.size) == null ? void 0 : e.width);
863
859
  r.size || (r.size = { width: 12, height: 12 }), !Number.isFinite(o) || o < 1 ? r.size.width = 1 : o > 12 && (r.size.width = 12);
864
860
  }
865
- function Fe(r) {
861
+ function we(r) {
866
862
  var e;
867
863
  const o = Number((e = r.size) == null ? void 0 : e.height);
868
864
  r.size || (r.size = { width: 12, height: 12 }), !Number.isFinite(o) || o < 1 ? r.size.height = 1 : o > 12 && (r.size.height = 12);
869
865
  }
870
- function Ie(r, o) {
866
+ function Oe(r, o) {
871
867
  const e = Number(r[o]);
872
868
  !Number.isFinite(e) || e < 1 ? r[o] = 1 : e > 24 && (r[o] = 24);
873
869
  }
874
- const Ue = b({
870
+ const Ie = b({
875
871
  get: () => {
876
872
  var r;
877
873
  return ((r = a.value) == null ? void 0 : r.titleFontSize) ?? 16;
@@ -879,7 +875,7 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
879
875
  set: (r) => {
880
876
  a.value && (a.value.titleFontSize = r ?? void 0);
881
877
  }
882
- }), ze = b({
878
+ }), Re = b({
883
879
  get: () => {
884
880
  var r;
885
881
  return ((r = a.value) == null ? void 0 : r.descriptionFontSize) ?? 14;
@@ -890,129 +886,129 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
890
886
  }), be = b({
891
887
  get: () => {
892
888
  var r, o, e;
893
- return ((r = a.value) == null ? void 0 : r.tabIconType) ?? ((e = (o = a.value) == null ? void 0 : o.tabIcon) != null && e.trim().startsWith("<svg") ? Me.Custom : Me.Material);
889
+ return ((r = a.value) == null ? void 0 : r.tabIconType) ?? ((e = (o = a.value) == null ? void 0 : o.tabIcon) != null && e.trim().startsWith("<svg") ? Be.Custom : Be.Material);
894
890
  },
895
891
  set: (r) => {
896
892
  a.value && (a.value.tabIconType = r);
897
893
  }
898
- }), Ve = b({
894
+ }), _e = b({
899
895
  get: () => {
900
896
  var r, o;
901
- return be.value === Me.Custom ? Yl(((r = a.value) == null ? void 0 : r.tabIcon) ?? "") : ((o = a.value) == null ? void 0 : o.tabIcon) ?? "";
897
+ return be.value === Be.Custom ? Yl(((r = a.value) == null ? void 0 : r.tabIcon) ?? "") : ((o = a.value) == null ? void 0 : o.tabIcon) ?? "";
902
898
  },
903
899
  set: (r) => {
904
- a.value && (a.value.tabIcon = be.value === Me.Custom ? Xl(r) : r.trim());
900
+ a.value && (a.value.tabIcon = be.value === Be.Custom ? Xl(r) : r.trim());
905
901
  }
906
- }), xe = G(!1), Ce = G(null), oe = G([]);
907
- function Ne(r) {
902
+ }), Fe = G(!1), Ve = G(null), te = G([]);
903
+ function Ue(r) {
908
904
  const o = [
909
905
  { parentId: null, label: n("report.editor.topLevel"), level: 1 }
910
- ], e = (p, g, _) => {
911
- let k = 0;
912
- p.forEach((T) => {
906
+ ], e = (c, g, h) => {
907
+ let $ = 0;
908
+ c.forEach((C) => {
913
909
  var W;
914
- if (T.widget) {
915
- if (fe(T)) {
916
- const P = `${_}${T.tabTitle || ne(T.widget.title)} · ${n("report.editor.page")}`;
917
- o.push({ parentId: T.id, label: P, level: 1 }), e(T.tiles ?? [], 1, `${P} › `);
910
+ if (C.widget) {
911
+ if (fe(C)) {
912
+ const R = `${h}${C.tabTitle || ue(C.widget.title)} · ${n("report.editor.page")}`;
913
+ o.push({ parentId: C.id, label: R, level: 1 }), e(C.tiles ?? [], 1, `${R} › `);
918
914
  }
919
915
  return;
920
916
  }
921
- if (qe(T)) {
922
- const P = `${_}${n("report.editor.tabGroup")}`;
923
- (W = T.tiles) == null || W.forEach((u, s) => {
924
- const i = `${P} › ${u.tabTitle || n("report.editor.tab", { index: s + 1 })}`;
917
+ if (qe(C)) {
918
+ const R = `${h}${n("report.editor.tabGroup")}`;
919
+ (W = C.tiles) == null || W.forEach((u, s) => {
920
+ const i = `${R} › ${u.tabTitle || n("report.editor.tab", { index: s + 1 })}`;
925
921
  o.push({ parentId: u.id, label: i, level: g + 1 }), e(u.tiles ?? [], g + 1, `${i} › `);
926
922
  });
927
923
  } else {
928
- k += 1;
929
- const P = `${_}${T.title || `${n("report.editor.group")} ${k}`}`;
930
- o.push({ parentId: T.id, label: P, level: g + 1 }), e(T.tiles ?? [], g + 1, `${P} › `);
924
+ $ += 1;
925
+ const R = `${h}${C.title || `${n("report.editor.group")} ${$}`}`;
926
+ o.push({ parentId: C.id, label: R, level: g + 1 }), e(C.tiles ?? [], g + 1, `${R} › `);
931
927
  }
932
928
  });
933
929
  };
934
930
  e(m.report.tiles, 1, "");
935
931
  const l = new Set(ll(r));
936
932
  return o.filter(
937
- (p) => p.parentId !== K.value && !(p.parentId && l.has(p.parentId)) && Wl(r, p.level)
933
+ (c) => c.parentId !== ae.value && !(c.parentId && l.has(c.parentId)) && Wl(r, c.level)
938
934
  );
939
935
  }
940
936
  function We(r) {
941
- Ce.value = r, oe.value = Ne(r), xe.value = !0;
937
+ Ve.value = r, te.value = Ue(r), Fe.value = !0;
942
938
  }
943
939
  function He(r) {
944
- const o = Ce.value;
940
+ const o = Ve.value;
945
941
  if (!o) return;
946
- const e = $.value.indexOf(o);
947
- e >= 0 && $.value.splice(e, 1), Gl(m.report.tiles, r.parentId).push(o), xe.value = !1, Ce.value = null;
942
+ const e = S.value.indexOf(o);
943
+ e >= 0 && S.value.splice(e, 1), Gl(m.report.tiles, r.parentId).push(o), Fe.value = !1, Ve.value = null;
948
944
  }
949
945
  return (r, o) => {
950
- const e = S("FmButton"), l = S("FmTextField"), p = S("FmSelect"), g = S("FmTextarea"), _ = S("FmStepperField"), k = S("FmIcon"), T = S("FmMenuItem"), W = S("FmMenu"), P = S("FmList"), u = S("FmListItem"), s = S("FmDialog");
951
- return c(), R("div", xt, [
952
- re.value ? U("", !0) : (c(), R("div", Ct, [
946
+ const e = T("FmButton"), l = T("FmTextField"), c = T("FmSelect"), g = T("FmTextarea"), h = T("FmStepperField"), $ = T("FmIcon"), C = T("FmMenuItem"), W = T("FmMenu"), R = T("FmList"), u = T("FmListItem"), s = T("FmDialog");
947
+ return p(), z("div", Vt, [
948
+ ie.value ? U("", !0) : (p(), z("div", xt, [
953
949
  f("div", kt, [
954
950
  d(e, {
955
951
  icon: "arrow_back",
956
952
  variant: "tertiary",
957
953
  class: "-ml-8",
958
- onClick: ue
954
+ onClick: me
959
955
  }),
960
956
  f("p", {
961
957
  class: "fm-typo-en-body-md-600 line-clamp-1 overflow-hidden break-all min-w-0 grow text-left",
962
- title: A.value
963
- }, B(A.value), 9, Tt)
958
+ title: E.value
959
+ }, B(E.value), 9, Ct)
964
960
  ]),
965
- ie.value && a.value ? (c(), C(l, {
961
+ se.value && a.value ? (p(), k(l, {
966
962
  key: 0,
967
963
  modelValue: a.value.tabTitle,
968
964
  "onUpdate:modelValue": o[0] || (o[0] = (i) => a.value.tabTitle = i),
969
965
  label: t(n)("report.editor.pageName"),
970
966
  placeholder: t(n)("report.editor.pageName")
971
967
  }, null, 8, ["modelValue", "label", "placeholder"])) : U("", !0),
972
- j.value && a.value ? (c(), C(l, {
968
+ J.value && a.value ? (p(), k(l, {
973
969
  key: 1,
974
970
  modelValue: a.value.tabTitle,
975
971
  "onUpdate:modelValue": o[1] || (o[1] = (i) => a.value.tabTitle = i),
976
972
  label: t(n)("report.editor.tabName"),
977
973
  placeholder: t(n)("report.editor.tabName")
978
974
  }, null, 8, ["modelValue", "label", "placeholder"])) : U("", !0),
979
- j.value && a.value ? (c(), C(p, {
975
+ J.value && a.value ? (p(), k(c, {
980
976
  key: 2,
981
977
  modelValue: be.value,
982
978
  "onUpdate:modelValue": o[2] || (o[2] = (i) => be.value = i),
983
979
  label: t(n)("report.tile.widget.icon.type"),
984
- items: Z
980
+ items: X
985
981
  }, null, 8, ["modelValue", "label"])) : U("", !0),
986
- j.value && a.value && be.value === t(Me).Material ? (c(), C(l, {
982
+ J.value && a.value && be.value === t(Be).Material ? (p(), k(l, {
987
983
  key: 3,
988
- modelValue: Ve.value,
989
- "onUpdate:modelValue": o[3] || (o[3] = (i) => Ve.value = i),
984
+ modelValue: _e.value,
985
+ "onUpdate:modelValue": o[3] || (o[3] = (i) => _e.value = i),
990
986
  label: t(n)("report.tile.widget.icon.materialName"),
991
987
  placeholder: t(n)("report.tile.widget.icon.materialPlaceholder")
992
- }, null, 8, ["modelValue", "label", "placeholder"])) : j.value && a.value ? (c(), C(g, {
988
+ }, null, 8, ["modelValue", "label", "placeholder"])) : J.value && a.value ? (p(), k(g, {
993
989
  key: 4,
994
- modelValue: Ve.value,
995
- "onUpdate:modelValue": o[4] || (o[4] = (i) => Ve.value = i),
990
+ modelValue: _e.value,
991
+ "onUpdate:modelValue": o[4] || (o[4] = (i) => _e.value = i),
996
992
  label: t(n)("report.tile.widget.icon.customSvg"),
997
993
  placeholder: t(n)("report.tile.widget.icon.customPlaceholder")
998
994
  }, null, 8, ["modelValue", "label", "placeholder"])) : U("", !0),
999
- j.value && a.value ? (c(), C(p, {
995
+ J.value && a.value ? (p(), k(c, {
1000
996
  key: 5,
1001
997
  modelValue: a.value.tabIconSize,
1002
998
  "onUpdate:modelValue": o[5] || (o[5] = (i) => a.value.tabIconSize = i),
1003
999
  label: t(n)("report.tile.widget.icon.size"),
1004
- items: E
1000
+ items: L
1005
1001
  }, null, 8, ["modelValue", "label"])) : U("", !0),
1006
- !j.value && !ie.value && a.value ? (c(), C(je, {
1002
+ !J.value && !se.value && a.value ? (p(), k(je, {
1007
1003
  key: 6,
1008
1004
  "is-open": !1
1009
1005
  }, {
1010
1006
  header: V(() => [
1011
- f("p", St, B(t(n)("report.editor.groupDetails")), 1),
1007
+ f("p", Tt, B(t(n)("report.editor.groupDetails")), 1),
1012
1008
  o[24] || (o[24] = f("div", { class: "grow" }, null, -1))
1013
1009
  ]),
1014
1010
  content: V(() => [
1015
- f("div", $t, [
1011
+ f("div", St, [
1016
1012
  d(l, {
1017
1013
  modelValue: a.value.title,
1018
1014
  "onUpdate:modelValue": o[6] || (o[6] = (i) => a.value.title = i),
@@ -1025,28 +1021,28 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1025
1021
  placeholder: t(n)("report.editor.groupDescriptionPlaceholder")
1026
1022
  }, {
1027
1023
  label: V(() => [
1028
- f("p", Ot, B(t(n)("report.editor.groupDescription")), 1),
1024
+ f("p", $t, B(t(n)("report.editor.groupDescription")), 1),
1029
1025
  f("p", Dt, " (" + B(t(n)("report.editor.optional")) + ") ", 1)
1030
1026
  ]),
1031
1027
  _: 1
1032
1028
  }, 8, ["modelValue", "placeholder"]),
1033
- f("div", It, [
1034
- f("p", Ut, B(t(n)("report.editor.typography")), 1),
1035
- f("div", Nt, [
1036
- d(_, {
1037
- modelValue: Ue.value,
1038
- "onUpdate:modelValue": o[8] || (o[8] = (i) => Ue.value = i),
1029
+ f("div", Ot, [
1030
+ f("p", It, B(t(n)("report.editor.typography")), 1),
1031
+ f("div", Ut, [
1032
+ d(h, {
1033
+ modelValue: Ie.value,
1034
+ "onUpdate:modelValue": o[8] || (o[8] = (i) => Ie.value = i),
1039
1035
  modelModifiers: { number: !0 },
1040
1036
  class: "w-full",
1041
1037
  label: t(n)("report.editor.titleSize"),
1042
1038
  max: 24,
1043
1039
  min: 1,
1044
1040
  type: "number",
1045
- onBlur: o[9] || (o[9] = (i) => Ie(a.value, "titleFontSize"))
1041
+ onBlur: o[9] || (o[9] = (i) => Oe(a.value, "titleFontSize"))
1046
1042
  }, null, 8, ["modelValue", "label"]),
1047
- f("div", Bt, [
1048
- f("p", Mt, B(t(n)("report.editor.titleFormatting")), 1),
1049
- f("div", Rt, [
1043
+ f("div", Nt, [
1044
+ f("p", Bt, B(t(n)("report.editor.titleFormatting")), 1),
1045
+ f("div", Mt, [
1050
1046
  d(e, {
1051
1047
  "append-icon": "format_bold",
1052
1048
  "model-value": a.value.titleBold ?? !0,
@@ -1080,21 +1076,21 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1080
1076
  ])
1081
1077
  ])
1082
1078
  ]),
1083
- f("div", zt, [
1084
- d(_, {
1085
- modelValue: ze.value,
1086
- "onUpdate:modelValue": o[13] || (o[13] = (i) => ze.value = i),
1079
+ f("div", Rt, [
1080
+ d(h, {
1081
+ modelValue: Re.value,
1082
+ "onUpdate:modelValue": o[13] || (o[13] = (i) => Re.value = i),
1087
1083
  modelModifiers: { number: !0 },
1088
1084
  class: "w-full",
1089
1085
  label: t(n)("report.editor.descriptionSize"),
1090
1086
  max: 24,
1091
1087
  min: 1,
1092
1088
  type: "number",
1093
- onBlur: o[14] || (o[14] = (i) => Ie(a.value, "descriptionFontSize"))
1089
+ onBlur: o[14] || (o[14] = (i) => Oe(a.value, "descriptionFontSize"))
1094
1090
  }, null, 8, ["modelValue", "label"]),
1095
- f("div", Pt, [
1096
- f("p", qt, B(t(n)("report.editor.descriptionFormatting")), 1),
1097
- f("div", Et, [
1091
+ f("div", zt, [
1092
+ f("p", Pt, B(t(n)("report.editor.descriptionFormatting")), 1),
1093
+ f("div", qt, [
1098
1094
  d(e, {
1099
1095
  "append-icon": "format_bold",
1100
1096
  "model-value": a.value.descriptionBold ?? !1,
@@ -1133,29 +1129,29 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1133
1129
  ]),
1134
1130
  _: 1
1135
1131
  })) : U("", !0),
1136
- !j.value && a.value ? (c(), C(l, {
1132
+ !J.value && a.value ? (p(), k(l, {
1137
1133
  key: 7,
1138
1134
  modelValue: a.value.size.width,
1139
1135
  "onUpdate:modelValue": o[18] || (o[18] = (i) => a.value.size.width = i),
1140
1136
  modelModifiers: { number: !0 },
1141
1137
  type: "number",
1142
1138
  label: t(n)("report.editor.width"),
1143
- onBlur: o[19] || (o[19] = (i) => _e(a.value))
1139
+ onBlur: o[19] || (o[19] = (i) => he(a.value))
1144
1140
  }, null, 8, ["modelValue", "label"])) : U("", !0),
1145
- !j.value && a.value ? (c(), C(l, {
1141
+ !J.value && a.value ? (p(), k(l, {
1146
1142
  key: 8,
1147
1143
  modelValue: a.value.size.height,
1148
1144
  "onUpdate:modelValue": o[20] || (o[20] = (i) => a.value.size.height = i),
1149
1145
  modelModifiers: { number: !0 },
1150
1146
  type: "number",
1151
1147
  label: t(n)("report.editor.height"),
1152
- onBlur: o[21] || (o[21] = (i) => Fe(a.value))
1148
+ onBlur: o[21] || (o[21] = (i) => we(a.value))
1153
1149
  }, null, 8, ["modelValue", "label"])) : U("", !0)
1154
1150
  ])),
1155
- $.value.length === 0 ? (c(), R("div", Lt, B(t(n)("report.editor.emptyLevel")), 1)) : (c(), C(P, { key: 2 }, {
1151
+ S.value.length === 0 ? (p(), z("div", Et, B(t(n)("report.editor.emptyLevel")), 1)) : (p(), k(R, { key: 2 }, {
1156
1152
  default: V(() => [
1157
1153
  d(t(wl), {
1158
- list: $.value,
1154
+ list: S.value,
1159
1155
  "item-key": "id",
1160
1156
  class: "flex flex-col gap-2 cursor-grab",
1161
1157
  handle: ".handle"
@@ -1163,20 +1159,20 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1163
1159
  item: V(({ element: i, index: I }) => [
1164
1160
  f("div", {
1165
1161
  class: Ae(["flex items-center gap-8 px-12 py-8 border rounded-md border-neutral-300 hover:bg-fm-color-opacity-sm", i.widget && !t(fe)(i) ? "cursor-grab" : "cursor-pointer"]),
1166
- onClick: (h) => Y(i)
1162
+ onClick: (_) => re(i)
1167
1163
  }, [
1168
- d(k, {
1164
+ d($, {
1169
1165
  name: "drag_handle",
1170
1166
  class: "handle shrink-0 !cursor-grab"
1171
1167
  }),
1172
1168
  f("p", {
1173
1169
  class: "flex-1 min-w-0 truncate text-left fm-typo-en-body-lg-400",
1174
- title: de(i, I)
1170
+ title: ce(i, I)
1175
1171
  }, [
1176
- Je(B(de(i, I)) + " ", 1),
1177
- !i.widget || t(fe)(i) ? (c(), R("span", Wt, " · " + B(z(i)), 1)) : U("", !0)
1178
- ], 8, Gt),
1179
- !i.widget || t(fe)(i) ? (c(), C(k, {
1172
+ Je(B(ce(i, I)) + " ", 1),
1173
+ !i.widget || t(fe)(i) ? (p(), z("span", Gt, " · " + B(q(i)), 1)) : U("", !0)
1174
+ ], 8, At),
1175
+ !i.widget || t(fe)(i) ? (p(), k($, {
1180
1176
  key: 0,
1181
1177
  name: "chevron_right",
1182
1178
  class: "shrink-0"
@@ -1194,58 +1190,58 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1194
1190
  })
1195
1191
  ]),
1196
1192
  default: V(() => [
1197
- i.widget ? (c(), C(T, {
1193
+ i.widget ? (p(), k(C, {
1198
1194
  key: 0,
1199
1195
  label: t(n)("report.common.edit"),
1200
- onClick: (h) => H(i, I)
1196
+ onClick: (_) => Q(i, I)
1201
1197
  }, null, 8, ["label", "onClick"])) : U("", !0),
1202
- i.widget && !t(fe)(i) ? (c(), C(T, {
1198
+ i.widget && !t(fe)(i) ? (p(), k(C, {
1203
1199
  key: 1,
1204
1200
  label: t(n)("report.editor.convertToPage"),
1205
- onClick: (h) => te(i)
1201
+ onClick: (_) => le(i)
1206
1202
  }, null, 8, ["label", "onClick"])) : U("", !0),
1207
- t(fe)(i) ? (c(), C(T, {
1203
+ t(fe)(i) ? (p(), k(C, {
1208
1204
  key: 2,
1209
1205
  label: t(n)("report.editor.removePage"),
1210
- onClick: (h) => Oe(i, I)
1206
+ onClick: (_) => $e(i, I)
1211
1207
  }, null, 8, ["label", "onClick"])) : U("", !0),
1212
- t(qe)(i) ? U("", !0) : (c(), C(T, {
1208
+ t(qe)(i) ? U("", !0) : (p(), k(C, {
1213
1209
  key: 3,
1214
1210
  label: t(n)("report.editor.moveTo"),
1215
- onClick: (h) => We(i)
1211
+ onClick: (_) => We(i)
1216
1212
  }, null, 8, ["label", "onClick"])),
1217
- d(T, {
1213
+ d(C, {
1218
1214
  label: t(n)("report.common.duplicate"),
1219
- onClick: (h) => ve(i, I)
1215
+ onClick: (_) => pe(i, I)
1220
1216
  }, null, 8, ["label", "onClick"]),
1221
- d(T, {
1222
- onClick: (h) => we(i, I)
1217
+ d(C, {
1218
+ onClick: (_) => Se(i, I)
1223
1219
  }, {
1224
1220
  label: V(() => [
1225
- f("p", Ht, B(t(n)("report.common.remove")), 1)
1221
+ f("p", Wt, B(t(n)("report.common.remove")), 1)
1226
1222
  ]),
1227
1223
  _: 2
1228
1224
  }, 1032, ["onClick"])
1229
1225
  ]),
1230
1226
  _: 2
1231
1227
  }, 1024)
1232
- ], 10, At)
1228
+ ], 10, Lt)
1233
1229
  ]),
1234
1230
  _: 1
1235
1231
  }, 8, ["list"])
1236
1232
  ]),
1237
1233
  _: 1
1238
1234
  })),
1239
- me.value ? (c(), C(e, {
1235
+ de.value ? (p(), k(e, {
1240
1236
  key: 3,
1241
1237
  label: t(n)("report.editor.addTab"),
1242
1238
  variant: "secondary",
1243
1239
  icon: "add",
1244
1240
  "icon-position": "prepend",
1245
- "border-color": t(Te).ColorPrimary,
1246
- "text-color": t(Te).ColorPrimary,
1247
- onClick: X
1248
- }, null, 8, ["label", "border-color", "text-color"])) : (c(), C(W, {
1241
+ "border-color": t(xe).ColorPrimary,
1242
+ "text-color": t(xe).ColorPrimary,
1243
+ onClick: K
1244
+ }, null, 8, ["label", "border-color", "text-color"])) : (p(), k(W, {
1249
1245
  key: 4,
1250
1246
  trigger: "click",
1251
1247
  shift: !0
@@ -1257,21 +1253,21 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1257
1253
  icon: "add",
1258
1254
  "icon-position": "prepend",
1259
1255
  class: "w-full",
1260
- "border-color": t(Te).ColorPrimary,
1261
- "text-color": t(Te).ColorPrimary
1256
+ "border-color": t(xe).ColorPrimary,
1257
+ "text-color": t(xe).ColorPrimary
1262
1258
  }, null, 8, ["label", "border-color", "text-color"])
1263
1259
  ]),
1264
1260
  default: V(() => [
1265
- d(T, {
1261
+ d(C, {
1266
1262
  label: t(n)("report.editor.addWidget"),
1267
- onClick: o[22] || (o[22] = (i) => y("add-widget", K.value))
1263
+ onClick: o[22] || (o[22] = (i) => y("add-widget", ae.value))
1268
1264
  }, null, 8, ["label"]),
1269
- pe.value ? (c(), C(T, {
1265
+ ne.value ? (p(), k(C, {
1270
1266
  key: 0,
1271
1267
  label: t(n)("report.editor.addGroup"),
1272
- onClick: Re
1268
+ onClick: Me
1273
1269
  }, null, 8, ["label"])) : U("", !0),
1274
- se.value ? (c(), C(T, {
1270
+ ee.value ? (p(), k(C, {
1275
1271
  key: 1,
1276
1272
  label: t(n)("report.editor.addTabGroup"),
1277
1273
  onClick: De
@@ -1280,8 +1276,8 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1280
1276
  _: 1
1281
1277
  })),
1282
1278
  d(s, {
1283
- modelValue: xe.value,
1284
- "onUpdate:modelValue": o[23] || (o[23] = (i) => xe.value = i),
1279
+ modelValue: Fe.value,
1280
+ "onUpdate:modelValue": o[23] || (o[23] = (i) => Fe.value = i),
1285
1281
  overlay: !0,
1286
1282
  "z-index": 10
1287
1283
  }, {
@@ -1289,14 +1285,14 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1289
1285
  Je(B(t(n)("report.editor.moveTo")), 1)
1290
1286
  ]),
1291
1287
  default: V(() => [
1292
- d(P, null, {
1288
+ d(R, null, {
1293
1289
  default: V(() => [
1294
- (c(!0), R(ye, null, Le(oe.value, (i) => (c(), C(u, {
1290
+ (p(!0), z(ke, null, Le(te.value, (i) => (p(), k(u, {
1295
1291
  key: i.parentId ?? "root",
1296
1292
  onClick: (I) => He(i)
1297
1293
  }, {
1298
1294
  default: V(() => [
1299
- f("p", jt, B(i.label), 1)
1295
+ f("p", Ht, B(i.label), 1)
1300
1296
  ]),
1301
1297
  _: 2
1302
1298
  }, 1032, ["onClick"]))), 128))
@@ -1309,12 +1305,12 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1309
1305
  ]);
1310
1306
  };
1311
1307
  }
1312
- }), Qt = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Kt = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Yt = { class: "flex items-center gap-8" }, Xt = {
1308
+ }), Jt = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Qt = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Kt = { class: "flex items-center gap-8" }, Yt = {
1313
1309
  key: 2,
1314
1310
  class: "flex flex-col gap-8 rounded-md border border-fm-color-border px-16 py-12"
1315
- }, Zt = { class: "fm-typo-en-body-sm-400" }, eo = { class: "fm-typo-en-body-sm-400 font-bold" }, lo = { class: "space-y-1 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, to = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, oo = { class: "flex items-center gap-1 max-w-[195px] w-[195px]" }, ao = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, gl = /* @__PURE__ */ he({
1311
+ }, Xt = { class: "fm-typo-en-body-sm-400" }, Zt = { class: "fm-typo-en-body-sm-400 font-bold" }, eo = { class: "space-y-1 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, lo = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, to = { class: "flex items-center gap-1 max-w-[195px] w-[195px]" }, oo = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, gl = /* @__PURE__ */ ye({
1316
1312
  __name: "ReportEditorTab",
1317
- props: /* @__PURE__ */ Se({
1313
+ props: /* @__PURE__ */ Ce({
1318
1314
  hideConfiguration: {
1319
1315
  type: Boolean,
1320
1316
  default: !1
@@ -1328,35 +1324,35 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1328
1324
  modelValue: { required: !0 },
1329
1325
  modelModifiers: {}
1330
1326
  }),
1331
- emits: /* @__PURE__ */ Se(["hideConfiguration"], ["update:modelValue"]),
1332
- setup(q, { emit: v }) {
1333
- const m = $e(q, "modelValue"), { breakpoints: y } = Ze(), n = q, w = v, E = ul(), Z = dl(), O = G(), {
1327
+ emits: /* @__PURE__ */ Ce(["hideConfiguration"], ["update:modelValue"]),
1328
+ setup(P, { emit: v }) {
1329
+ const m = Te(P, "modelValue"), { breakpoints: y } = Ze(), n = P, w = v, L = ul(), X = dl(), D = G(), {
1334
1330
  currentSelectWidgetType: F,
1335
1331
  categories: N,
1336
- editingTile: le,
1337
- editingTileIndex: L,
1332
+ editingTile: Z,
1333
+ editingTileIndex: A,
1338
1334
  editingGlobalFilter: a,
1339
- editingGlobalFilterIndex: D
1340
- } = Ee(sl()), { schemas: $ } = Ee(Hl()), { globalFilters: K } = Ee(cl()), { getGlobalFilterLabel: re } = cl(), { promptMessage: me } = ml(), j = G(!1), ie = G(!1), { t: x, te: pe, locale: se } = Ge(), Y = G(void 0), ue = b(() => {
1335
+ editingGlobalFilterIndex: O
1336
+ } = Ee(sl()), { schemas: S } = Ee(Hl()), { globalFilters: ae } = Ee(cl()), { getGlobalFilterLabel: ie } = cl(), { promptMessage: de } = ml(), J = G(!1), se = G(!1), { t: x, te: ne, locale: ee } = Ge(), re = G(void 0), me = b(() => {
1341
1337
  const u = tl(m.value.tiles).flatMap((s) => {
1342
- var h;
1343
- const i = s.widget.config.schemaNames ?? [], I = ((h = s.widget.config.joinDatasources) == null ? void 0 : h.flatMap((ee) => ee.schemaNames ?? [])) ?? [];
1338
+ var _;
1339
+ const i = s.widget.config.schemaNames ?? [], I = ((_ = s.widget.config.joinDatasources) == null ? void 0 : _.flatMap((Y) => Y.schemaNames ?? [])) ?? [];
1344
1340
  return [...i, ...I];
1345
1341
  });
1346
1342
  return [...new Set(u)].reduce((s, i) => {
1347
- const I = $.value.find((h) => h.name === i);
1343
+ const I = S.value.find((_) => _.name === i);
1348
1344
  return I && s.push(I), s;
1349
1345
  }, []);
1350
- }), ne = G(null);
1351
- function ce(u) {
1352
- ne.value = u, ie.value = !0;
1346
+ }), ue = G(null);
1347
+ function ve(u) {
1348
+ ue.value = u, se.value = !0;
1353
1349
  }
1354
1350
  ge(
1355
1351
  () => F.value,
1356
1352
  () => {
1357
- F.value !== void 0 && (Y.value = Zl(F.value), le.value = Y.value, L.value = -1, _l.value = ne.value, E.push({
1353
+ F.value !== void 0 && (re.value = Zl(F.value), Z.value = re.value, A.value = -1, _l.value = ue.value, L.push({
1358
1354
  name: "tileEditor",
1359
- query: Z.query
1355
+ query: X.query
1360
1356
  }));
1361
1357
  },
1362
1358
  { immediate: !0 }
@@ -1367,14 +1363,14 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1367
1363
  },
1368
1364
  { immediate: !0, deep: !0 }
1369
1365
  );
1370
- const de = [
1366
+ const ce = [
1371
1367
  {
1372
1368
  label: "report.common.edit",
1373
1369
  selected: !1,
1374
1370
  variant: "tertiary",
1375
1371
  onClick: (u) => {
1376
1372
  var s;
1377
- D.value = u, a.value = JSON.parse(JSON.stringify((s = m.value.globalFilters) == null ? void 0 : s[u])), j.value = !0;
1373
+ O.value = u, a.value = JSON.parse(JSON.stringify((s = m.value.globalFilters) == null ? void 0 : s[u])), J.value = !0;
1378
1374
  }
1379
1375
  },
1380
1376
  {
@@ -1394,38 +1390,38 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1394
1390
  selected: !1,
1395
1391
  variant: "destructive",
1396
1392
  onClick: async (u) => {
1397
- var I, h;
1393
+ var I, _;
1398
1394
  const s = (I = m.value.globalFilters) == null ? void 0 : I[u];
1399
1395
  if (!s) return;
1400
- await me({
1396
+ await de({
1401
1397
  title: x("report.editor.deleteWidget"),
1402
1398
  message: x("report.editor.deleteWidgetConfirm", {
1403
- title: re(s)
1399
+ title: ie(s)
1404
1400
  })
1405
- }) && ((h = m.value.globalFilters) == null || h.splice(u, 1));
1401
+ }) && ((_ = m.value.globalFilters) == null || _.splice(u, 1));
1406
1402
  }
1407
1403
  }
1408
- ], z = b(() => N.value.map((u) => ({
1404
+ ], q = b(() => N.value.map((u) => ({
1409
1405
  label: x(`report.category.${u.name}`),
1410
1406
  value: u.id
1411
- }))), { sessionUser: A } = tt(), H = b(
1407
+ }))), { sessionUser: E } = tt(), Q = b(
1412
1408
  () => {
1413
1409
  var u, s, i, I;
1414
- return ((s = (u = A.value) == null ? void 0 : u.role) == null ? void 0 : s.isAdmin) === !0 || ((I = (i = A.value) == null ? void 0 : i.role) == null ? void 0 : I.isStaff) === !0;
1410
+ return ((s = (u = E.value) == null ? void 0 : u.role) == null ? void 0 : s.isAdmin) === !0 || ((I = (i = E.value) == null ? void 0 : i.role) == null ? void 0 : I.isStaff) === !0;
1415
1411
  }
1416
- ), ve = b({
1412
+ ), pe = b({
1417
1413
  get: () => m.value.queryVersion === "v2",
1418
1414
  set: (u) => {
1419
1415
  m.value.queryVersion = u ? "v2" : "v1", u ? m.value.queryDatasource = m.value.queryDatasource ?? Xe.Postgres : m.value.queryDatasource = void 0;
1420
1416
  }
1421
- }), we = [
1417
+ }), Se = [
1422
1418
  { label: x("report.common.postgresql"), value: Xe.Postgres },
1423
1419
  { label: x("report.common.bigquery"), value: Xe.BigQuery }
1424
- ], X = [
1420
+ ], K = [
1425
1421
  { label: x("report.common.noBatch"), value: "none" },
1426
1422
  { label: x("report.common.days"), value: "days" },
1427
1423
  { label: x("report.common.locations"), value: "locations" }
1428
- ], te = b({
1424
+ ], le = b({
1429
1425
  get: () => {
1430
1426
  var u, s;
1431
1427
  return (u = m.value.batch) != null && u.days ? "days" : (s = m.value.batch) != null && s.locations ? "locations" : "none";
@@ -1434,63 +1430,63 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1434
1430
  var s, i;
1435
1431
  u === "none" ? m.value.batch = n.readOnly ? null : void 0 : u === "days" ? m.value.batch = { days: ((s = m.value.batch) == null ? void 0 : s.days) || 1 } : u === "locations" && (m.value.batch = { locations: ((i = m.value.batch) == null ? void 0 : i.locations) || 10 });
1436
1432
  }
1437
- }), Oe = b({
1433
+ }), $e = b({
1438
1434
  get: () => {
1439
1435
  var u, s;
1440
- if (te.value === "days") return ((u = m.value.batch) == null ? void 0 : u.days) ?? 1;
1441
- if (te.value === "locations") return ((s = m.value.batch) == null ? void 0 : s.locations) ?? 1;
1436
+ if (le.value === "days") return ((u = m.value.batch) == null ? void 0 : u.days) ?? 1;
1437
+ if (le.value === "locations") return ((s = m.value.batch) == null ? void 0 : s.locations) ?? 1;
1442
1438
  },
1443
1439
  set: (u) => {
1444
- u && (te.value === "days" ? m.value.batch = { days: u } : te.value === "locations" && (m.value.batch = { locations: u }));
1440
+ u && (le.value === "days" ? m.value.batch = { days: u } : le.value === "locations" && (m.value.batch = { locations: u }));
1445
1441
  }
1446
- }), Re = b({
1447
- get: () => Qe(x, pe, m.value.name, "other"),
1442
+ }), Me = b({
1443
+ get: () => Qe(x, ne, m.value.name, "other"),
1448
1444
  set: (u) => {
1449
1445
  m.value.name = u;
1450
1446
  }
1451
1447
  }), { country: De } = Ee(ot()), {
1452
- dateRange: _e,
1453
- compareDateRange: Fe,
1454
- timeRange: Ie,
1455
- selectedLocationIds: Ue,
1456
- businessDataVersion: ze,
1448
+ dateRange: he,
1449
+ compareDateRange: we,
1450
+ timeRange: Oe,
1451
+ selectedLocationIds: Ie,
1452
+ businessDataVersion: Re,
1457
1453
  restaurants: be,
1458
- warehouses: Ve
1459
- } = Ee(at()), xe = b(
1454
+ warehouses: _e
1455
+ } = Ee(at()), Fe = b(
1460
1456
  () => m.value.queryVersion === "v2" && m.value.queryDatasource === Xe.BigQuery
1461
- ), Ce = b(() => xe.value && H.value), oe = G(null), Ne = G(!1), We = b(() => {
1462
- const u = _e.value.startDate ?? _e.value.endDate;
1457
+ ), Ve = b(() => Fe.value && Q.value), te = G(null), Ue = G(!1), We = b(() => {
1458
+ const u = he.value.startDate ?? he.value.endDate;
1463
1459
  return u ? {
1464
1460
  startDate: u,
1465
1461
  endDate: u
1466
- } : _e.value;
1462
+ } : he.value;
1467
1463
  }), He = b(() => {
1468
- const u = Fe.value.startDate ?? Fe.value.endDate;
1464
+ const u = we.value.startDate ?? we.value.endDate;
1469
1465
  return u ? {
1470
1466
  startDate: u,
1471
1467
  endDate: u
1472
- } : Fe.value;
1468
+ } : we.value;
1473
1469
  }), r = b(() => {
1474
1470
  const u = m.value.batch;
1475
1471
  if (!u) return 1;
1476
1472
  if (u.locations) {
1477
- const s = be.value.length + Ve.value.length;
1473
+ const s = be.value.length + _e.value.length;
1478
1474
  return Math.max(1, Math.ceil(s / u.locations));
1479
1475
  }
1480
1476
  return 1;
1481
1477
  }), o = b(() => {
1482
- if (oe.value == null || oe.value === 0) return null;
1483
- const u = oe.value * r.value;
1478
+ if (te.value == null || te.value === 0) return null;
1479
+ const u = te.value * r.value;
1484
1480
  return vl(u, De.value);
1485
- }), e = b(() => oe.value == null || oe.value === 0 ? null : vl(oe.value, De.value)), l = b(() => o.value ? fl(o.value.amount, o.value.symbol) : ""), p = b(() => e.value ? fl(e.value.amount, e.value.symbol) : ""), g = b(() => r.value === 1 ? x("report.common.estimatedCostBatchSingular") : x("report.common.estimatedCostBatchPlural")), _ = b(() => Ne.value ? "..." : !l.value || !p.value ? "--" : x("report.common.estimatedCostFormula", {
1481
+ }), e = b(() => te.value == null || te.value === 0 ? null : vl(te.value, De.value)), l = b(() => o.value ? fl(o.value.amount, o.value.symbol) : ""), c = b(() => e.value ? fl(e.value.amount, e.value.symbol) : ""), g = b(() => r.value === 1 ? x("report.common.estimatedCostBatchSingular") : x("report.common.estimatedCostBatchPlural")), h = b(() => Ue.value ? "..." : !l.value || !c.value ? "--" : x("report.common.estimatedCostFormula", {
1486
1482
  batchCount: r.value,
1487
1483
  batchLabel: g.value,
1488
- baseCost: p.value,
1484
+ baseCost: c.value,
1489
1485
  totalCost: l.value
1490
1486
  }));
1491
- let k = [];
1492
- const T = rt(async () => {
1493
- if (!Ce.value) return;
1487
+ let $ = [];
1488
+ const C = rt(async () => {
1489
+ if (!Ve.value) return;
1494
1490
  const u = tl(m.value.tiles).filter(
1495
1491
  (s) => {
1496
1492
  var i;
@@ -1498,15 +1494,15 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1498
1494
  }
1499
1495
  );
1500
1496
  if (u.length === 0) {
1501
- oe.value = null;
1497
+ te.value = null;
1502
1498
  return;
1503
1499
  }
1504
- Ne.value = !0, k.forEach((s) => s.abort()), k = [];
1500
+ Ue.value = !0, $.forEach((s) => s.abort()), $ = [];
1505
1501
  try {
1506
1502
  const s = await Promise.all(
1507
1503
  u.map((i) => {
1508
1504
  const I = new AbortController();
1509
- return k.push(I), lt({
1505
+ return $.push(I), lt({
1510
1506
  widget: i.widget,
1511
1507
  signal: I.signal,
1512
1508
  tileId: i.id,
@@ -1515,11 +1511,11 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1515
1511
  });
1516
1512
  })
1517
1513
  );
1518
- oe.value = s.reduce((i, I) => i + (I.totalBytesProcessed ?? 0), 0);
1514
+ te.value = s.reduce((i, I) => i + (I.totalBytesProcessed ?? 0), 0);
1519
1515
  } catch (s) {
1520
- s.code !== "ERR_CANCELED" && (oe.value = null);
1516
+ s.code !== "ERR_CANCELED" && (te.value = null);
1521
1517
  } finally {
1522
- Ne.value = !1;
1518
+ Ue.value = !1;
1523
1519
  }
1524
1520
  }, 1e3);
1525
1521
  ge(
@@ -1528,60 +1524,60 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1528
1524
  () => m.value.queryVersion,
1529
1525
  () => m.value.queryDatasource,
1530
1526
  () => m.value.batch,
1531
- () => _e.value,
1527
+ () => he.value,
1528
+ () => Oe.value,
1529
+ () => we.value,
1532
1530
  () => Ie.value,
1533
- () => Fe.value,
1534
- () => Ue.value,
1535
- () => ze.value
1531
+ () => Re.value
1536
1532
  ],
1537
1533
  () => {
1538
- T();
1534
+ C();
1539
1535
  },
1540
1536
  { deep: !0 }
1541
1537
  ), yl(() => {
1542
- T();
1543
- }), Ol(() => {
1544
- k.forEach((u) => u.abort());
1538
+ C();
1539
+ }), Dl(() => {
1540
+ $.forEach((u) => u.abort());
1545
1541
  });
1546
1542
  function W(u) {
1547
1543
  var s;
1548
1544
  return !((s = u.tileIds) != null && s.length);
1549
1545
  }
1550
- function P(u) {
1551
- return !ue.value.find((s) => s.name === u.schemaName);
1546
+ function R(u) {
1547
+ return !me.value.find((s) => s.name === u.schemaName);
1552
1548
  }
1553
1549
  return ge(
1554
1550
  () => m.value.globalFilters,
1555
1551
  (u) => {
1556
- K.value = JSON.parse(JSON.stringify(u || []));
1552
+ ae.value = JSON.parse(JSON.stringify(u || []));
1557
1553
  },
1558
1554
  { deep: !0, immediate: !0 }
1559
1555
  ), (u, s) => {
1560
- const i = S("FmTextField"), I = S("FmSelect"), h = S("FmSwitch"), ee = S("FmButton"), Q = S("FmIcon"), J = S("FmTooltip"), Ke = S("FmMenuItem"), xl = S("FmMenu"), Cl = S("FmListItem"), kl = S("FmList"), Tl = S("FmForm");
1561
- return c(), C(Dl(t(y).lg || t(y).md ? st : ut), {
1556
+ const i = T("FmTextField"), I = T("FmSelect"), _ = T("FmSwitch"), Y = T("FmButton"), H = T("FmIcon"), j = T("FmTooltip"), Ke = T("FmMenuItem"), xl = T("FmMenu"), kl = T("FmListItem"), Cl = T("FmList"), Tl = T("FmForm");
1557
+ return p(), k(Ol(t(y).lg || t(y).md ? st : ut), {
1562
1558
  "model-value": n.hideConfiguration,
1563
1559
  "onUpdate:modelValue": s[12] || (s[12] = (M) => w("hideConfiguration", M))
1564
1560
  }, {
1565
1561
  default: V(() => [
1566
- d(ht, {
1567
- "is-open": j.value,
1568
- "onUpdate:isOpen": s[0] || (s[0] = (M) => j.value = M),
1562
+ d(yt, {
1563
+ "is-open": J.value,
1564
+ "onUpdate:isOpen": s[0] || (s[0] = (M) => J.value = M),
1569
1565
  "global-filter": t(a),
1570
1566
  tiles: t(tl)(m.value.tiles),
1571
- schemas: ue.value,
1567
+ schemas: me.value,
1572
1568
  "onUpdate:globalFilter": s[1] || (s[1] = (M) => {
1573
- M && (m.value.globalFilters || (m.value.globalFilters = []), typeof t(D) == "number" && t(D) >= 0 ? m.value.globalFilters[t(D)] = M : m.value.globalFilters.push(M));
1569
+ M && (m.value.globalFilters || (m.value.globalFilters = []), typeof t(O) == "number" && t(O) >= 0 ? m.value.globalFilters[t(O)] = M : m.value.globalFilters.push(M));
1574
1570
  })
1575
1571
  }, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
1576
1572
  d(nt, {
1577
1573
  modelValue: t(F),
1578
1574
  "onUpdate:modelValue": s[2] || (s[2] = (M) => hl(F) ? F.value = M : null),
1579
- "is-open": ie.value,
1580
- "onUpdate:isOpen": s[3] || (s[3] = (M) => ie.value = M)
1575
+ "is-open": se.value,
1576
+ "onUpdate:isOpen": s[3] || (s[3] = (M) => se.value = M)
1581
1577
  }, null, 8, ["modelValue", "is-open"]),
1582
1578
  d(Tl, {
1583
1579
  ref_key: "form",
1584
- ref: O,
1580
+ ref: D,
1585
1581
  class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
1586
1582
  }, {
1587
1583
  default: V(() => [
@@ -1591,20 +1587,20 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1591
1587
  s[13] || (s[13] = f("div", { class: "grow" }, null, -1))
1592
1588
  ]),
1593
1589
  content: V(() => [
1594
- f("div", Qt, [
1590
+ f("div", Jt, [
1595
1591
  d(i, {
1596
- modelValue: Re.value,
1597
- "onUpdate:modelValue": s[4] || (s[4] = (M) => Re.value = M),
1592
+ modelValue: Me.value,
1593
+ "onUpdate:modelValue": s[4] || (s[4] = (M) => Me.value = M),
1598
1594
  label: t(x)("report.common.name"),
1599
1595
  placeholder: t(x)("report.common.name"),
1600
1596
  disabled: n.readOnly
1601
1597
  }, null, 8, ["modelValue", "label", "placeholder", "disabled"]),
1602
- (c(), C(I, {
1603
- key: `category-${t(se)}`,
1598
+ (p(), k(I, {
1599
+ key: `category-${t(ee)}`,
1604
1600
  modelValue: m.value.category,
1605
1601
  "onUpdate:modelValue": s[5] || (s[5] = (M) => m.value.category = M),
1606
1602
  label: t(x)("report.common.category"),
1607
- items: z.value,
1603
+ items: q.value,
1608
1604
  disabled: n.readOnly
1609
1605
  }, null, 8, ["modelValue", "label", "items", "disabled"])),
1610
1606
  d(i, {
@@ -1627,39 +1623,39 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1627
1623
  s[14] || (s[14] = f("div", { class: "grow" }, null, -1))
1628
1624
  ]),
1629
1625
  content: V(() => [
1630
- f("div", Kt, [
1631
- f("div", Yt, [
1626
+ f("div", Qt, [
1627
+ f("div", Kt, [
1632
1628
  s[15] || (s[15] = f("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, "V2", -1)),
1633
- d(h, {
1634
- modelValue: ve.value,
1635
- "onUpdate:modelValue": s[7] || (s[7] = (M) => ve.value = M)
1629
+ d(_, {
1630
+ modelValue: pe.value,
1631
+ "onUpdate:modelValue": s[7] || (s[7] = (M) => pe.value = M)
1636
1632
  }, null, 8, ["modelValue"])
1637
1633
  ]),
1638
- ve.value && H.value ? (c(), C(I, {
1634
+ pe.value && Q.value ? (p(), k(I, {
1639
1635
  key: 0,
1640
1636
  modelValue: m.value.queryDatasource,
1641
1637
  "onUpdate:modelValue": s[8] || (s[8] = (M) => m.value.queryDatasource = M),
1642
1638
  label: t(x)("report.common.queryDatasource"),
1643
- items: we
1639
+ items: Se
1644
1640
  }, null, 8, ["modelValue", "label"])) : U("", !0),
1645
1641
  d(I, {
1646
- modelValue: te.value,
1647
- "onUpdate:modelValue": s[9] || (s[9] = (M) => te.value = M),
1642
+ modelValue: le.value,
1643
+ "onUpdate:modelValue": s[9] || (s[9] = (M) => le.value = M),
1648
1644
  label: t(x)("report.common.batch"),
1649
- items: X
1645
+ items: K
1650
1646
  }, null, 8, ["modelValue", "label"]),
1651
- te.value !== "none" ? (c(), C(i, {
1647
+ le.value !== "none" ? (p(), k(i, {
1652
1648
  key: 1,
1653
- modelValue: Oe.value,
1654
- "onUpdate:modelValue": s[10] || (s[10] = (M) => Oe.value = M),
1649
+ modelValue: $e.value,
1650
+ "onUpdate:modelValue": s[10] || (s[10] = (M) => $e.value = M),
1655
1651
  modelModifiers: { number: !0 },
1656
- label: te.value === "days" ? t(x)("report.common.days") : t(x)("report.common.locations"),
1652
+ label: le.value === "days" ? t(x)("report.common.days") : t(x)("report.common.locations"),
1657
1653
  type: "number"
1658
1654
  }, null, 8, ["modelValue", "label"])) : U("", !0),
1659
- Ce.value ? (c(), R("div", Xt, [
1660
- f("span", Zt, B(t(x)("report.common.estimatedBqCost")), 1),
1661
- f("p", eo, B(_.value), 1),
1662
- f("div", lo, [
1655
+ Ve.value ? (p(), z("div", Yt, [
1656
+ f("span", Xt, B(t(x)("report.common.estimatedBqCost")), 1),
1657
+ f("p", Zt, B(h.value), 1),
1658
+ f("div", eo, [
1663
1659
  f("div", null, "* " + B(t(x)("report.common.estimatedCostGuidelineBigQuery")), 1),
1664
1660
  f("div", null, "* " + B(t(x)("report.common.estimatedCostGuidelineDateRange")), 1),
1665
1661
  f("div", null, "* " + B(t(x)("report.common.estimatedCostGuidelineLocationBatch")), 1)
@@ -1669,7 +1665,7 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1669
1665
  ]),
1670
1666
  _: 1
1671
1667
  }),
1672
- n.readOnly ? U("", !0) : (c(), C(je, {
1668
+ n.readOnly ? U("", !0) : (p(), k(je, {
1673
1669
  key: 0,
1674
1670
  class: "border-solid",
1675
1671
  "is-open": !1
@@ -1679,19 +1675,19 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1679
1675
  s[16] || (s[16] = f("div", { class: "grow" }, null, -1))
1680
1676
  ]),
1681
1677
  content: V(() => [
1682
- f("div", to, [
1683
- d(ee, {
1678
+ f("div", lo, [
1679
+ d(Y, {
1684
1680
  label: t(x)("report.section.filter.addGlobalFilter"),
1685
1681
  variant: "secondary",
1686
1682
  icon: "add",
1687
1683
  "icon-position": "prepend",
1688
- "border-color": t(Te).ColorPrimary,
1689
- "text-color": t(Te).ColorPrimary,
1684
+ "border-color": t(xe).ColorPrimary,
1685
+ "text-color": t(xe).ColorPrimary,
1690
1686
  onClick: s[11] || (s[11] = () => {
1691
- D.value = null, a.value = null, j.value = !0;
1687
+ O.value = null, a.value = null, J.value = !0;
1692
1688
  })
1693
1689
  }, null, 8, ["label", "border-color", "text-color"]),
1694
- d(kl, null, {
1690
+ d(Cl, null, {
1695
1691
  default: V(() => [
1696
1692
  d(t(wl), {
1697
1693
  list: m.value.globalFilters,
@@ -1700,42 +1696,42 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1700
1696
  handle: ".handle"
1701
1697
  }, {
1702
1698
  item: V(({ element: M, index: Sl }) => [
1703
- d(Cl, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
1699
+ d(kl, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
1704
1700
  default: V(() => [
1705
- d(Q, {
1701
+ d(H, {
1706
1702
  name: "drag_handle",
1707
1703
  class: "handle"
1708
1704
  }),
1709
- f("div", oo, [
1710
- d(J, {
1705
+ f("div", to, [
1706
+ d(j, {
1711
1707
  "z-index": 99,
1712
- content: t(re)(M),
1708
+ content: t(ie)(M),
1713
1709
  class: "handle"
1714
1710
  }, {
1715
1711
  default: V(() => [
1716
- f("p", ao, B(t(re)(M)), 1)
1712
+ f("p", oo, B(t(ie)(M)), 1)
1717
1713
  ]),
1718
1714
  _: 2
1719
1715
  }, 1032, ["content"]),
1720
- P(M) ? (c(), C(J, {
1716
+ R(M) ? (p(), k(j, {
1721
1717
  key: 0,
1722
1718
  content: t(x)("report.section.filter.missingSchema"),
1723
1719
  "z-index": 99
1724
1720
  }, {
1725
1721
  default: V(() => [
1726
- d(Q, {
1722
+ d(H, {
1727
1723
  name: "warning",
1728
1724
  class: "text-fm-color-system-error-300"
1729
1725
  })
1730
1726
  ]),
1731
1727
  _: 1
1732
- }, 8, ["content"])) : W(M) ? (c(), C(J, {
1728
+ }, 8, ["content"])) : W(M) ? (p(), k(j, {
1733
1729
  key: 1,
1734
1730
  content: t(x)("report.section.filter.missingTileIds"),
1735
1731
  "z-index": 99
1736
1732
  }, {
1737
1733
  default: V(() => [
1738
- d(Q, {
1734
+ d(H, {
1739
1735
  name: "warning",
1740
1736
  class: "text-fm-color-system-warning-300"
1741
1737
  })
@@ -1750,15 +1746,15 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1750
1746
  "stop-click-propagation": !0
1751
1747
  }, {
1752
1748
  "menu-button": V(() => [
1753
- d(ee, {
1749
+ d(Y, {
1754
1750
  "append-icon": "more_vert",
1755
1751
  variant: "tertiary"
1756
1752
  })
1757
1753
  ]),
1758
1754
  default: V(() => [
1759
- (c(), R(ye, null, Le(de, (el, $l) => d(Ke, {
1755
+ (p(), z(ke, null, Le(ce, (el, $l) => d(Ke, {
1760
1756
  key: $l,
1761
- onClick: (_o) => el.onClick(Sl)
1757
+ onClick: (wo) => el.onClick(Sl)
1762
1758
  }, {
1763
1759
  label: V(() => [
1764
1760
  f("p", {
@@ -1785,7 +1781,7 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1785
1781
  ]),
1786
1782
  _: 1
1787
1783
  })),
1788
- n.readOnly ? U("", !0) : (c(), C(je, {
1784
+ n.readOnly ? U("", !0) : (p(), k(je, {
1789
1785
  key: 1,
1790
1786
  class: "border-solid"
1791
1787
  }, {
@@ -1794,9 +1790,9 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1794
1790
  s[18] || (s[18] = f("div", { class: "grow" }, null, -1))
1795
1791
  ]),
1796
1792
  content: V(() => [
1797
- d(Jt, {
1793
+ d(jt, {
1798
1794
  report: m.value,
1799
- onAddWidget: ce
1795
+ onAddWidget: ve
1800
1796
  }, null, 8, ["report"])
1801
1797
  ]),
1802
1798
  _: 1
@@ -1809,22 +1805,22 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1809
1805
  }, 8, ["model-value"]);
1810
1806
  };
1811
1807
  }
1812
- }), ro = { class: "h-full w-full overflow-x-hidden" }, no = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, io = { class: "flex bg-fm-color-neutral-white w-[88px]" }, so = {
1808
+ }), ao = { class: "h-full w-full overflow-x-hidden" }, ro = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, no = { class: "flex bg-fm-color-neutral-white w-[88px]" }, io = {
1813
1809
  key: 1,
1814
1810
  class: "w-full overflow-y-auto"
1815
- }, uo = {
1811
+ }, so = {
1816
1812
  key: 0,
1817
1813
  class: "w-full p-24"
1818
- }, mo = { class: "mb-4 flex flex-wrap gap-2 pb-2" }, co = { key: 2 }, po = { key: 0 }, vo = { class: "mb-4 flex flex-wrap gap-2 pb-2" }, fo = {
1814
+ }, uo = { class: "mb-4 flex flex-wrap gap-2 pb-2" }, mo = { key: 2 }, co = { key: 0 }, po = { class: "mb-4 flex flex-wrap gap-2 pb-2" }, vo = {
1819
1815
  key: 3,
1820
1816
  class: "h-full w-full flex items-start justify-center bg-fm-color-neutral-white py-24",
1821
1817
  style: { backgroundColor: "#F6F8FC" }
1822
- }, go = {
1818
+ }, fo = {
1823
1819
  key: 0,
1824
1820
  class: "w-full"
1825
- }, bo = /* @__PURE__ */ he({
1821
+ }, go = /* @__PURE__ */ ye({
1826
1822
  __name: "ReportEditorViewport",
1827
- props: /* @__PURE__ */ Se({
1823
+ props: /* @__PURE__ */ Ce({
1828
1824
  hideConfiguration: { type: Boolean, required: !1, default: !1 },
1829
1825
  readOnly: { type: Boolean, required: !1, default: !1 },
1830
1826
  previewWidth: { type: Number, required: !0 },
@@ -1835,42 +1831,42 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1835
1831
  } },
1836
1832
  modelModifiers: {}
1837
1833
  }),
1838
- emits: /* @__PURE__ */ Se(["hideConfiguration"], ["update:modelValue"]),
1839
- setup(q, { emit: v }) {
1840
- const { breakpoints: m } = Ze(), y = $e(q, "modelValue"), n = b(() => {
1834
+ emits: /* @__PURE__ */ Ce(["hideConfiguration"], ["update:modelValue"]),
1835
+ setup(P, { emit: v }) {
1836
+ const { breakpoints: m } = Ze(), y = Te(P, "modelValue"), n = b(() => {
1841
1837
  var F;
1842
1838
  return Jl((F = y.value) == null ? void 0 : F.tiles);
1843
- }), w = q, E = b(() => w.previewWidth > 0 && w.previewHeight > 0), Z = b(() => m.value.sm || m.value.xs), O = v;
1839
+ }), w = P, L = b(() => w.previewWidth > 0 && w.previewHeight > 0), X = b(() => m.value.sm || m.value.xs), D = v;
1844
1840
  return (F, N) => {
1845
- const le = S("FmCircularProgress"), L = S("FmButton"), a = S("FmMenuDivider"), D = S("FmCard");
1846
- return c(), R("div", ro, [
1847
- y.value ? (c(), R(ye, { key: 1 }, [
1848
- E.value ? U("", !0) : (c(), C(Ml, {
1841
+ const Z = T("FmCircularProgress"), A = T("FmButton"), a = T("FmMenuDivider"), O = T("FmCard");
1842
+ return p(), z("div", ao, [
1843
+ y.value ? (p(), z(ke, { key: 1 }, [
1844
+ L.value ? U("", !0) : (p(), k(Ml, {
1849
1845
  key: 0,
1850
1846
  "model-value": !w.hideConfiguration
1851
1847
  }, {
1852
1848
  right: V(() => [
1853
- f("div", no, [
1854
- y.value ? (c(), C(gl, {
1849
+ f("div", ro, [
1850
+ y.value ? (p(), k(gl, {
1855
1851
  key: 0,
1856
1852
  modelValue: y.value,
1857
- "onUpdate:modelValue": N[0] || (N[0] = ($) => y.value = $),
1853
+ "onUpdate:modelValue": N[0] || (N[0] = (S) => y.value = S),
1858
1854
  "hide-configuration": w.hideConfiguration,
1859
1855
  "read-only": w.readOnly,
1860
- onHideConfiguration: N[1] || (N[1] = ($) => O("hideConfiguration", $))
1856
+ onHideConfiguration: N[1] || (N[1] = (S) => D("hideConfiguration", S))
1861
1857
  }, null, 8, ["modelValue", "hide-configuration", "read-only"])) : U("", !0)
1862
1858
  ])
1863
1859
  ]),
1864
1860
  left: V(() => [
1865
- f("div", io, [
1866
- d(L, {
1861
+ f("div", no, [
1862
+ d(A, {
1867
1863
  variant: "secondary",
1868
1864
  icon: "keyboard_double_arrow_right",
1869
- "border-color": t(Te).ColorPrimary,
1870
- "text-color": t(Te).ColorPrimary,
1865
+ "border-color": t(xe).ColorPrimary,
1866
+ "text-color": t(xe).ColorPrimary,
1871
1867
  class: "m-24 my-16",
1872
1868
  size: "md",
1873
- onClick: N[2] || (N[2] = ($) => O("hideConfiguration", !w.hideConfiguration))
1869
+ onClick: N[2] || (N[2] = (S) => D("hideConfiguration", !w.hideConfiguration))
1874
1870
  }, null, 8, ["border-color", "text-color"])
1875
1871
  ])
1876
1872
  ]),
@@ -1880,9 +1876,9 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1880
1876
  vertical: "",
1881
1877
  style: { margin: "0px" }
1882
1878
  }),
1883
- !Z.value && !E.value ? (c(), R("div", so, [
1884
- y.value.tiles.length > 0 ? (c(), R("div", uo, [
1885
- f("div", mo, [
1879
+ !X.value && !L.value ? (p(), z("div", io, [
1880
+ y.value.tiles.length > 0 ? (p(), z("div", so, [
1881
+ f("div", uo, [
1886
1882
  d(pl)
1887
1883
  ]),
1888
1884
  d(ol, {
@@ -1892,12 +1888,12 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1892
1888
  "hide-export": !0,
1893
1889
  "grid-class": "gap-[24px]"
1894
1890
  }, null, 8, ["tiles", "report-id", "leaf-index-by-id"])
1895
- ])) : (c(), C(rl, { key: 1 }))
1896
- ])) : Z.value && !E.value ? (c(), R("div", co, [
1897
- d(D, { class: "px-5 pb-28" }, {
1891
+ ])) : (p(), k(rl, { key: 1 }))
1892
+ ])) : X.value && !L.value ? (p(), z("div", mo, [
1893
+ d(O, { class: "px-5 pb-28" }, {
1898
1894
  default: V(() => [
1899
- y.value.tiles.length > 0 ? (c(), R("div", po, [
1900
- f("div", vo, [
1895
+ y.value.tiles.length > 0 ? (p(), z("div", co, [
1896
+ f("div", po, [
1901
1897
  d(pl)
1902
1898
  ]),
1903
1899
  d(ol, {
@@ -1907,21 +1903,21 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1907
1903
  "hide-export": !0,
1908
1904
  "grid-class": "gap-[16px]"
1909
1905
  }, null, 8, ["tiles", "report-id", "leaf-index-by-id"])
1910
- ])) : (c(), C(rl, { key: 1 }))
1906
+ ])) : (p(), k(rl, { key: 1 }))
1911
1907
  ]),
1912
1908
  _: 1
1913
1909
  }),
1914
- y.value ? (c(), C(gl, {
1910
+ y.value ? (p(), k(gl, {
1915
1911
  key: 0,
1916
1912
  modelValue: y.value,
1917
- "onUpdate:modelValue": N[3] || (N[3] = ($) => y.value = $),
1913
+ "onUpdate:modelValue": N[3] || (N[3] = (S) => y.value = S),
1918
1914
  "hide-configuration": w.hideConfiguration,
1919
1915
  "read-only": w.readOnly,
1920
- onHideConfiguration: N[4] || (N[4] = ($) => {
1921
- O("hideConfiguration", $);
1916
+ onHideConfiguration: N[4] || (N[4] = (S) => {
1917
+ D("hideConfiguration", S);
1922
1918
  })
1923
1919
  }, null, 8, ["modelValue", "hide-configuration", "read-only"])) : U("", !0)
1924
- ])) : (c(), R("div", fo, [
1920
+ ])) : (p(), z("div", vo, [
1925
1921
  f("div", {
1926
1922
  style: nl({
1927
1923
  transformOrigin: "top center",
@@ -1935,7 +1931,7 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1935
1931
  height: w.previewHeight + "px"
1936
1932
  })
1937
1933
  }, [
1938
- y.value.tiles.length > 0 ? (c(), R("div", go, [
1934
+ y.value.tiles.length > 0 ? (p(), z("div", fo, [
1939
1935
  d(ol, {
1940
1936
  tiles: y.value.tiles,
1941
1937
  "report-id": y.value.id || "editing",
@@ -1944,75 +1940,75 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
1944
1940
  "custom-screen-width": w.previewWidth,
1945
1941
  "grid-class": "gap-[24px] p-24"
1946
1942
  }, null, 8, ["tiles", "report-id", "leaf-index-by-id", "custom-screen-width"])
1947
- ])) : (c(), C(rl, { key: 1 }))
1943
+ ])) : (p(), k(rl, { key: 1 }))
1948
1944
  ], 4)
1949
1945
  ], 4)
1950
1946
  ]))
1951
- ], 64)) : (c(), C(le, { key: 0 }))
1947
+ ], 64)) : (p(), k(Z, { key: 0 }))
1952
1948
  ]);
1953
1949
  };
1954
1950
  }
1955
- }), yo = { class: "flex items-center gap-4" }, ho = { class: "flex justify-center items-center gap-2 w-full" }, wo = { class: "flex gap-4" }, Po = /* @__PURE__ */ he({
1951
+ }), bo = { class: "flex items-center gap-4" }, yo = { class: "flex justify-center items-center gap-2 w-full" }, ho = { class: "flex gap-4" }, zo = /* @__PURE__ */ ye({
1956
1952
  __name: "ReportEditor",
1957
- setup(q) {
1958
- const v = ul(), m = dl(), y = sl(), { promptLoader: n } = Kl(), { t: w, te: E } = Ge(), { currentReport: Z, editingReport: O } = Ee(y), { breakpoints: F } = Ze(), N = b(() => {
1959
- var z;
1960
- return !((z = O.value) != null && z.editable);
1961
- }), le = b(() => {
1962
- var z, A;
1963
- return !((z = O.value) != null && z.editable) && !((A = O.value) != null && A.isDefault);
1964
- }), L = b(() => {
1965
- var z;
1966
- return ((z = O.value) == null ? void 0 : z.name) ?? w("report.editor.newReport");
1967
- }), a = b(() => Qe(w, E, L.value, "other")), D = Vl(), { promptMessage: $ } = ml(), K = G(!1), re = b(() => [
1953
+ setup(P) {
1954
+ const v = ul(), m = dl(), y = sl(), { promptLoader: n } = Kl(), { t: w, te: L } = Ge(), { currentReport: X, editingReport: D } = Ee(y), { breakpoints: F } = Ze(), N = b(() => {
1955
+ var q;
1956
+ return !((q = D.value) != null && q.editable);
1957
+ }), Z = b(() => {
1958
+ var q, E;
1959
+ return !((q = D.value) != null && q.editable) && !((E = D.value) != null && E.isDefault);
1960
+ }), A = b(() => {
1961
+ var q;
1962
+ return ((q = D.value) == null ? void 0 : q.name) ?? w("report.editor.newReport");
1963
+ }), a = b(() => Qe(w, L, A.value, "other")), O = Vl(), { promptMessage: S } = ml(), ae = G(!1), ie = b(() => [
1968
1964
  { label: w("report.common.cancel"), value: "cancel", isPrimary: !1 },
1969
1965
  { label: w("report.common.save"), value: "save", isPrimary: !0, prependIcon: "download" }
1970
1966
  ]);
1971
- async function me() {
1972
- if (!O.value || O.value.tiles.length === 0) {
1973
- D.open({ message: w("report.messages.noWidget"), type: "error" });
1967
+ async function de() {
1968
+ if (!D.value || D.value.tiles.length === 0) {
1969
+ O.open({ message: w("report.messages.noWidget"), type: "error" });
1974
1970
  return;
1975
1971
  }
1976
- if (Ql(O.value.tiles) > Fl) {
1977
- D.open({ message: w("report.messages.tooDeepNesting"), type: "error" });
1972
+ if (Ql(D.value.tiles) > Fl) {
1973
+ O.open({ message: w("report.messages.tooDeepNesting"), type: "error" });
1978
1974
  return;
1979
1975
  }
1980
- const z = le.value ? w("report.common.clone") : w("report.common.save");
1981
- if (await $({
1976
+ const q = Z.value ? w("report.common.clone") : w("report.common.save");
1977
+ if (await S({
1982
1978
  title: `${w("report.messages.saveReport")}`,
1983
- message: w("report.messages.confirmAction", { action: z, name: a.value })
1979
+ message: w("report.messages.confirmAction", { action: q, name: a.value })
1984
1980
  }))
1985
1981
  try {
1986
1982
  await n(async () => {
1987
- if (le.value) {
1988
- const H = JSON.parse(JSON.stringify(O.value));
1989
- H.editable = !0, H.id = "", H.name = `${H.name} ${w("report.common.duplicate")}`, H.isDefault = !1, await y.createOrUpdateReport(H);
1983
+ if (Z.value) {
1984
+ const Q = JSON.parse(JSON.stringify(D.value));
1985
+ Q.editable = !0, Q.id = "", Q.name = `${Q.name} ${w("report.common.duplicate")}`, Q.isDefault = !1, await y.createOrUpdateReport(Q);
1990
1986
  } else
1991
- O.value && await y.createOrUpdateReport(O.value);
1987
+ D.value && await y.createOrUpdateReport(D.value);
1992
1988
  v.push({
1993
1989
  name: "reportView",
1994
1990
  query: m.query
1995
1991
  });
1996
1992
  });
1997
- } catch (H) {
1998
- console.log(H), D.open({
1999
- message: w("report.messages.failedToAction", { action: z }),
1993
+ } catch (Q) {
1994
+ console.log(Q), O.open({
1995
+ message: w("report.messages.failedToAction", { action: q }),
2000
1996
  type: "error"
2001
1997
  });
2002
1998
  }
2003
1999
  }
2004
- async function j() {
2005
- var A;
2006
- if (!O.value) return;
2007
- await $({
2000
+ async function J() {
2001
+ var E;
2002
+ if (!D.value) return;
2003
+ await S({
2008
2004
  title: w("report.common.report", 1),
2009
- message: w("report.editor.notSaved", { name: (A = O.value) == null ? void 0 : A.name })
2010
- }) && (O.value = JSON.parse(JSON.stringify(Z.value)), v.back());
2005
+ message: w("report.editor.notSaved", { name: (E = D.value) == null ? void 0 : E.name })
2006
+ }) && (D.value = JSON.parse(JSON.stringify(X.value)), v.back());
2011
2007
  }
2012
2008
  yl(() => {
2013
- O.value || v.push({ name: "reports" });
2009
+ D.value || v.push({ name: "reports" });
2014
2010
  });
2015
- const ie = [
2011
+ const se = [
2016
2012
  {
2017
2013
  labelKey: "report.common.default",
2018
2014
  width: void 0,
@@ -2033,31 +2029,31 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
2033
2029
  width: 390,
2034
2030
  height: 859
2035
2031
  }
2036
- ], x = G(ie[0]), pe = G(!1), se = b(() => pe.value ? Math.max(x.value.width || 0, x.value.height || 0) : Math.min(x.value.width || 0, x.value.height || 0)), Y = b(() => pe.value ? Math.min(x.value.width || 0, x.value.height || 0) : Math.max(x.value.width || 0, x.value.height || 0)), ue = b(() => window.innerHeight - 72 - 56), ne = b(() => {
2037
- if (!se.value) return 1;
2038
- let z = (ue.value - 48) / se.value, A = Y.value * z;
2039
- return A > window.innerWidth && (z = window.innerWidth / Y.value, A = Y.value * z), z > 1 ? 1 : z;
2032
+ ], x = G(se[0]), ne = G(!1), ee = b(() => ne.value ? Math.max(x.value.width || 0, x.value.height || 0) : Math.min(x.value.width || 0, x.value.height || 0)), re = b(() => ne.value ? Math.min(x.value.width || 0, x.value.height || 0) : Math.max(x.value.width || 0, x.value.height || 0)), me = b(() => window.innerHeight - 72 - 56), ue = b(() => {
2033
+ if (!ee.value) return 1;
2034
+ let q = (me.value - 48) / ee.value, E = re.value * q;
2035
+ return E > window.innerWidth && (q = window.innerWidth / re.value, E = re.value * q), q > 1 ? 1 : q;
2040
2036
  });
2041
- function ce(z) {
2042
- x.value = z;
2037
+ function ve(q) {
2038
+ x.value = q;
2043
2039
  }
2044
- function de() {
2045
- pe.value = !pe.value;
2040
+ function ce() {
2041
+ ne.value = !ne.value;
2046
2042
  }
2047
- return (z, A) => {
2048
- const H = S("FmTooltip"), ve = S("FmButton"), we = S("FmPageHead");
2049
- return c(), C(Rl, null, {
2043
+ return (q, E) => {
2044
+ const Q = T("FmTooltip"), pe = T("FmButton"), Se = T("FmPageHead");
2045
+ return p(), k(Rl, null, {
2050
2046
  default: V(() => [
2051
- d(we, {
2047
+ d(Se, {
2052
2048
  "data-editor-header": "true",
2053
- actions: re.value,
2054
- "onClick:action": A[0] || (A[0] = (X) => {
2055
- X === "cancel" && j(), X === "save" && me();
2049
+ actions: ie.value,
2050
+ "onClick:action": E[0] || (E[0] = (K) => {
2051
+ K === "cancel" && J(), K === "save" && de();
2056
2052
  })
2057
2053
  }, {
2058
2054
  title: V(() => [
2059
- f("div", yo, [
2060
- d(H, {
2055
+ f("div", bo, [
2056
+ d(Q, {
2061
2057
  content: a.value,
2062
2058
  placement: "bottom"
2063
2059
  }, {
@@ -2068,43 +2064,43 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
2068
2064
  ]),
2069
2065
  _: 1
2070
2066
  }, 8, ["content"]),
2071
- f("div", ho, [
2072
- f("div", wo, [
2073
- (c(), R(ye, null, Le(ie, (X) => {
2074
- var te;
2075
- return d(ve, {
2076
- key: X.labelKey,
2077
- label: t(w)(X.labelKey),
2078
- variant: ((te = x.value) == null ? void 0 : te.labelKey) === X.labelKey ? "primary" : "secondary",
2067
+ f("div", yo, [
2068
+ f("div", ho, [
2069
+ (p(), z(ke, null, Le(se, (K) => {
2070
+ var le;
2071
+ return d(pe, {
2072
+ key: K.labelKey,
2073
+ label: t(w)(K.labelKey),
2074
+ variant: ((le = x.value) == null ? void 0 : le.labelKey) === K.labelKey ? "primary" : "secondary",
2079
2075
  size: "md",
2080
- onClick: (Oe) => ce(X)
2076
+ onClick: ($e) => ve(K)
2081
2077
  }, null, 8, ["label", "variant", "onClick"]);
2082
2078
  }), 64))
2083
2079
  ]),
2084
- d(ve, {
2080
+ d(pe, {
2085
2081
  icon: "screen_rotation",
2086
2082
  variant: "tertiary",
2087
2083
  size: "md",
2088
2084
  class: "text-fm-color-typo-primary",
2089
- onClick: de
2085
+ onClick: ce
2090
2086
  })
2091
2087
  ])
2092
2088
  ])
2093
2089
  ]),
2094
2090
  _: 1
2095
2091
  }, 8, ["actions"]),
2096
- t(O) ? (c(), C(bo, {
2092
+ t(D) ? (p(), k(go, {
2097
2093
  key: 0,
2098
- modelValue: t(O),
2099
- "onUpdate:modelValue": A[1] || (A[1] = (X) => hl(O) ? O.value = X : null),
2094
+ modelValue: t(D),
2095
+ "onUpdate:modelValue": E[1] || (E[1] = (K) => hl(D) ? D.value = K : null),
2100
2096
  "read-only": N.value,
2101
- style: nl({ height: ue.value + "px" }),
2097
+ style: nl({ height: me.value + "px" }),
2102
2098
  class: Ae(t(F).lg || t(F).md ? "flex" : ""),
2103
- "hide-configuration": K.value,
2104
- "preview-width": Y.value,
2105
- "preview-height": se.value,
2106
- "preview-scale": ne.value,
2107
- onHideConfiguration: A[2] || (A[2] = (X) => K.value = X)
2099
+ "hide-configuration": ae.value,
2100
+ "preview-width": re.value,
2101
+ "preview-height": ee.value,
2102
+ "preview-scale": ue.value,
2103
+ onHideConfiguration: E[2] || (E[2] = (K) => ae.value = K)
2108
2104
  }, null, 8, ["modelValue", "read-only", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : U("", !0)
2109
2105
  ]),
2110
2106
  _: 1
@@ -2113,5 +2109,5 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
2113
2109
  }
2114
2110
  });
2115
2111
  export {
2116
- Po as default
2112
+ zo as default
2117
2113
  };