@feedmepos/mf-menu 0.32.13 → 0.32.14

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 (66) hide show
  1. package/dist/{App-D70-FH5L.js → App-BFBPwGfb.js} +14 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BJdja2N0.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BDPEBgIX.js} +3 -3
  3. package/dist/{Catalog-WMpN3a0p.js → Catalog-CEUlUbTo.js} +6 -6
  4. package/dist/{Category-C_VsQIHU.js → Category-GK_sF5cc.js} +4 -4
  5. package/dist/{Category-BwHhFTZ-.js → Category-oxm_RKMU.js} +6 -6
  6. package/dist/{CookingGuide-D9RNkYDL.js → CookingGuide-BIqPXo2F.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DtmrxDZm.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-_LjfOdmQ.js} +1 -1
  8. package/dist/{Group-DexONgr2.js → Group-G3Zm4zVj.js} +1 -1
  9. package/dist/{Group-qRZlg5ST.js → Group-bW-m1xOv.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-DtPY9uUt.js → Group.vue_vue_type_script_setup_true_lang-DN7BsgdL.js} +42 -42
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B5Qpmj2f.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BBcZxmMz.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BqhNkaw_.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BpYIAC6_.js} +6 -6
  13. package/dist/{Ingredient-BuOS_Wvm.js → Ingredient-D0S3lRbC.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DFvXklj9.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BYAInJ7N.js} +2 -2
  15. package/dist/{LinkProductSideSheet-DJj8Nn4X.js → LinkProductSideSheet-DduICm_3.js} +3 -3
  16. package/dist/{MenuSetting-D6B0gCGV.js → MenuSetting-Ddpakood.js} +5 -5
  17. package/dist/{PrintRoute-B7G8f1iC.js → PrintRoute-CxDRBk-Z.js} +4 -4
  18. package/dist/{Product-DpS5EepJ.js → Product-DAwEX6dW.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CdIukLqA.js → Product.vue_vue_type_script_setup_true_lang-BH7BRpJ2.js} +12 -12
  20. package/dist/{ProductInternalTools-CBCyWHOS.js → ProductInternalTools--i0xQb6O.js} +5 -5
  21. package/dist/{Products-CcyGNlUl.js → Products-DHP2P67R.js} +11 -11
  22. package/dist/{Publish-rZLHFaJ5.js → Publish-BwI7NOud.js} +3 -3
  23. package/dist/{Recipe-D14rkATU.js → Recipe-DIfPG7dG.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CdH2ius3.js → RuleView.vue_vue_type_script_setup_true_lang-DiutI4rb.js} +2 -2
  25. package/dist/{Scheduler-DWZqa-jf.js → Scheduler-D-qRoZEk.js} +3 -3
  26. package/dist/{ServingSequence-Mx7ovvJ1.js → ServingSequence-DdGQTO5m.js} +3 -3
  27. package/dist/{Setting-DmHuVXVn.js → Setting-Cy3lcj6b.js} +5 -5
  28. package/dist/{Subcategory-DixZPdnT.js → Subcategory-bX7uTJKn.js} +4 -4
  29. package/dist/{Takeaway-BVIymFV_.js → Takeaway-DoTobUpw.js} +4 -4
  30. package/dist/{Takeaway-DDKeDEbV.js → Takeaway-Dt4W1Tmn.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CTaCQgRv.js → Takeaway.vue_vue_type_script_setup_true_lang-Ccqd0SSb.js} +5 -5
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DveI9xvU.js → Thumbnail.vue_vue_type_script_setup_true_lang-Bxd5sGBt.js} +4 -4
  33. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-2nBbq_Yk.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BTny5xEr.js} +756 -763
  34. package/dist/{Unit-utuaNZBw.js → Unit-li0qBwz-.js} +2 -2
  35. package/dist/{Variant-CzuJNwen.js → Variant-CGcJ_TZj.js} +3 -3
  36. package/dist/{_id_-DMDhPQCr.js → _id_-BWdsDm62.js} +9 -9
  37. package/dist/{app-Bqj3cAPJ.js → app-4fAuR8EW.js} +1 -1
  38. package/dist/{app-BQUkvrAS.js → app-M9IH0JfT.js} +26 -26
  39. package/dist/app.js +1 -1
  40. package/dist/apps/mf-menu/src/Entry.vue.d.ts +1 -0
  41. package/dist/apps/mf-menu/src/components/feature/Fields/ImageDropField.vue.d.ts +0 -2
  42. package/dist/apps/mf-menu/src/composable/useClientEvent.d.ts +14 -0
  43. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/assets/{linked-status-ILQVL8r9.js → linked-status-3-xHTXMe.js} +2 -2
  45. package/dist/assets/{override-menu-DVkGhbA9.js → override-menu-9sR4Y3Xg.js} +2 -2
  46. package/dist/assets/{validate-menu-y_NQUL02.js → validate-menu-BmHir2_T.js} +2 -2
  47. package/dist/{catalog-BYzITAmC.js → catalog-DFja-c1u.js} +1 -1
  48. package/dist/{catalogSetting-DAo5tN3P.js → catalogSetting-CcpYLKqf.js} +1 -1
  49. package/dist/{category-D4x8r_lY.js → category-DpZwNc4t.js} +1 -1
  50. package/dist/{currency-CvoBdMM2.js → currency-BAE6MewY.js} +1 -1
  51. package/dist/{dayjs.min-C6xioui7.js → dayjs.min-Bbp8wB12.js} +1 -1
  52. package/dist/{index-BLUIaanj.js → index-CKinAgXM.js} +1 -1
  53. package/dist/{index-LuH6PJzW.js → index-CVzNrW67.js} +4 -4
  54. package/dist/{index-6lju0f3r.js → index-vusQqUrf.js} +3 -3
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-DxF14kn9.js → index.vue_vue_type_script_setup_true_lang-BdR9Cau8.js} +429 -429
  56. package/dist/{item-lXMLaKOb.js → item-CwwbAMhc.js} +943 -945
  57. package/dist/{jszip.min-CdZ-wY5m.js → jszip.min-DYs79nMN.js} +353 -353
  58. package/dist/{menu-PJc2dQHQ.js → menu-BaIAvmpZ.js} +1 -1
  59. package/dist/{menuV2-DinFmdTL.js → menuV2-B2fEnjKF.js} +161 -161
  60. package/dist/mf-menu.css +1 -1
  61. package/dist/{priceTier-CzKIo11g.js → priceTier-BSQ1vmHy.js} +1 -1
  62. package/dist/{scheduler-DQjxnoCk.js → scheduler-C7lp1B_N.js} +4 -4
  63. package/dist/{subcategory-CLkDImEU.js → subcategory-DUGbyIKt.js} +2 -2
  64. package/dist/{toExcel-DPh8DaM0.js → toExcel-CnvNPzQj.js} +2 -2
  65. package/dist/{unit-QYkVoC6_.js → unit-gzTDfacM.js} +2 -2
  66. package/package.json +2 -2
@@ -1,46 +1,46 @@
1
- import { computed as V, shallowRef as Wt, ref as q, watch as we, nextTick as tt, getCurrentInstance as xn, onMounted as Ae, defineComponent as le, resolveComponent as j, createElementBlock as Z, openBlock as $, createBlock as J, normalizeClass as ve, createElementVNode as A, createVNode as C, unref as n, withCtx as B, toDisplayString as be, mergeModels as qt, useModel as Ht, createCommentVNode as Q, resolveDirective as Xt, withDirectives as pt, createTextVNode as Sn, renderSlot as Me, h as _e, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as qe, createSlots as Fn, onBeforeUnmount as Ot, watchEffect as On, onUnmounted as Dn, normalizeStyle as dt, mergeProps as Vn, normalizeProps as Pn, guardReactiveProps as $n, Teleport as Un, Transition as Rn, withKeys as Mn } from "vue";
2
- import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, I as Kn, S as Bn, _ as Dt, C as zn, b as Zt, c as Et, e as en, d as Yn, m as jn, F as Wn, M as tn, h as qn, r as Hn, i as nn, j as Nt, k as on, l as Xn, P as Jn, p as Qn, q as rn, u as Zn, T as Be } from "./item-lXMLaKOb.js";
3
- import { _ as eo, T as to } from "./app-BQUkvrAS.js";
4
- import { B as ye, K as he, A as oe, G as nt, M as no, N as oo, O as ro, u as ft, P as Vt, Q as ao, D as Le, R as lo, I as fe, T as io, U as Pt, J as Ie, V as vt, W as so, X as uo, Y as bt, Z as Lt, $ as co, a0 as mo } from "./index.vue_vue_type_script_setup_true_lang-DxF14kn9.js";
5
- import { useI18n as me, useCoreStore as ot, CustomAttributesForm as an } from "@feedmepos/mf-common";
6
- import { useDialog as Ge, useDialogChild as $t, useSnackbar as Re, FmButtonColorThemeVariant as Fe, components as ke, FmButtonVariant as We, useBreakpoints as po } from "@feedmepos/ui-library";
1
+ import { computed as V, shallowRef as Wt, ref as q, watch as we, nextTick as tt, getCurrentInstance as Sn, onMounted as Ae, defineComponent as le, resolveComponent as j, createElementBlock as Z, openBlock as P, createBlock as J, normalizeClass as ve, createElementVNode as A, createVNode as C, unref as n, withCtx as B, toDisplayString as be, mergeModels as qt, useModel as Ht, createCommentVNode as Q, resolveDirective as Xt, withDirectives as pt, createTextVNode as Fn, renderSlot as Re, h as _e, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as qe, createSlots as On, onBeforeUnmount as Ot, watchEffect as Dn, onUnmounted as Vn, normalizeStyle as dt, mergeProps as $n, normalizeProps as Pn, guardReactiveProps as Un, Teleport as Mn, Transition as Rn, withKeys as An } from "vue";
2
+ import { g as Nn, o as Ln, f as Gn, a as Kn, b as Qt, n as Zt, I as Bn, S as zn, _ as Dt, C as Yn, c as en, d as Et, e as tn, h as jn, m as Wn, F as qn, M as nn, i as Hn, r as Xn, j as on, k as Nt, l as rn, p as Jn, P as Qn, q as Zn, s as an, u as eo, T as Be } from "./item-CwwbAMhc.js";
3
+ import { _ as to, T as no } from "./app-M9IH0JfT.js";
4
+ import { B as ye, K as he, A as oe, G as nt, M as oo, N as ro, O as ao, u as ft, P as Vt, Q as lo, D as Le, R as io, I as fe, T as so, U as $t, J as Ie, V as vt, W as uo, X as co, Y as bt, Z as Lt, $ as mo, a0 as po } from "./index.vue_vue_type_script_setup_true_lang-BdR9Cau8.js";
5
+ import { useI18n as me, useCoreStore as ot, CustomAttributesForm as ln } from "@feedmepos/mf-common";
6
+ import { useDialog as Ge, useDialogChild as Pt, useSnackbar as Me, FmButtonColorThemeVariant as Fe, components as ke, FmButtonVariant as We, useBreakpoints as fo } from "@feedmepos/ui-library";
7
7
  import { u as Ut } from "./discardConfirm-BHni0LNu.js";
8
- import { defineStore as fo } from "pinia";
9
- import { _ as De, a as go } from "./RuleView.vue_vue_type_script_setup_true_lang-CdH2ius3.js";
10
- import { u as ue, g as ln, m as vo } from "./menuV2-DinFmdTL.js";
11
- import { s as Tt, _ as bo } from "./index-CisutoS9.js";
12
- import { useRemyStore as sn, RemyButton as un } from "@feedmepos/mf-remy-panel";
8
+ import { defineStore as go } from "pinia";
9
+ import { _ as De, a as vo } from "./RuleView.vue_vue_type_script_setup_true_lang-DiutI4rb.js";
10
+ import { u as ue, g as sn, m as bo } from "./menuV2-B2fEnjKF.js";
11
+ import { s as Tt, _ as _o } from "./index-CisutoS9.js";
12
+ import { useAppStore as un, RemyButton as dn } from "@feedmepos/mf-remy-panel";
13
13
  import { _ as Ue } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
14
- import { _ as Gt } from "./category-D4x8r_lY.js";
15
- import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-DveI9xvU.js";
14
+ import { _ as Gt } from "./category-DpZwNc4t.js";
15
+ import { _ as yo, a as ho, u as wo } from "./Thumbnail.vue_vue_type_script_setup_true_lang-Bxd5sGBt.js";
16
16
  import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
- import { _ as dn } from "./tooltip-B5BiPMx9.js";
18
- import { _ as He, T as wo, l as Co } from "./index-LuH6PJzW.js";
19
- import { L as xt } from "./LinkProductSideSheet-DJj8Nn4X.js";
20
- import { u as ko } from "./search-BAPEUu1R.js";
21
- import { c as Rt } from "./check-C9mY6LiX.js";
22
- import { f as et } from "./currency-CvoBdMM2.js";
23
- import { c as Io } from "./string-DpfFixWH.js";
24
- import { useInventoryStore as Eo, InventoryBindingSummary as To } from "@feedmepos/mf-inventory-portal";
25
- import { u as xo } from "./priceTier-CzKIo11g.js";
26
- import { d as Mt } from "./vuedraggable-CK8z7qA8.js";
27
- import { _ as So } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BJdja2N0.js";
17
+ import { _ as cn } from "./tooltip-B5BiPMx9.js";
18
+ import { _ as He, T as Co, l as ko } from "./index-CVzNrW67.js";
19
+ import { L as xt } from "./LinkProductSideSheet-DduICm_3.js";
20
+ import { u as Io } from "./search-BAPEUu1R.js";
21
+ import { c as Mt } from "./check-C9mY6LiX.js";
22
+ import { f as et } from "./currency-BAE6MewY.js";
23
+ import { c as Eo } from "./string-DpfFixWH.js";
24
+ import { useInventoryStore as To, InventoryBindingSummary as xo } from "@feedmepos/mf-inventory-portal";
25
+ import { u as So } from "./priceTier-BSQ1vmHy.js";
26
+ import { d as Rt } from "./vuedraggable-CK8z7qA8.js";
27
+ import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BDPEBgIX.js";
28
28
  import "./app-5fxKLAzS.js";
29
29
  /* empty css */
30
- import { i as Fo, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as Po, _ as $o } from "./index-BLUIaanj.js";
30
+ import { i as Oo, t as At, w as Do, a as mn, b as pn, n as Vo, c as $o, r as Po, _ as Uo } from "./index-CKinAgXM.js";
31
31
  import { c as ct } from "./object-DVUNCr7w.js";
32
- import { _ as Uo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
32
+ import { _ as Mo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
33
33
  import { _ as Kt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
34
34
  function ze(t) {
35
35
  var r;
36
36
  const e = At(t);
37
37
  return (r = e == null ? void 0 : e.$el) != null ? r : e;
38
38
  }
39
- const Xe = Fo ? window : void 0;
39
+ const Xe = Oo ? window : void 0;
40
40
  function Bt(...t) {
41
41
  let r, e, o, s;
42
42
  if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([e, o, s] = t, r = Xe) : [r, e, o, s] = t, !r)
43
- return Do;
43
+ return Vo;
44
44
  Array.isArray(e) || (e = [e]), Array.isArray(o) || (o = [o]);
45
45
  const i = [], p = () => {
46
46
  i.forEach((w) => w()), i.length = 0;
@@ -49,7 +49,7 @@ function Bt(...t) {
49
49
  ([w, v]) => {
50
50
  if (p(), !w)
51
51
  return;
52
- const g = Vo(v) ? { ...v } : v;
52
+ const g = $o(v) ? { ...v } : v;
53
53
  i.push(
54
54
  ...e.flatMap((a) => o.map((I) => h(w, a, I, g)))
55
55
  );
@@ -58,29 +58,29 @@ function Bt(...t) {
58
58
  ), _ = () => {
59
59
  b(), p();
60
60
  };
61
- return mn(_), _;
61
+ return pn(_), _;
62
62
  }
63
63
  function Ro() {
64
- const t = q(!1), r = xn();
64
+ const t = q(!1), r = Sn();
65
65
  return r && Ae(() => {
66
66
  t.value = !0;
67
67
  }, r), t;
68
68
  }
69
- function Mo(t) {
69
+ function Ao(t) {
70
70
  const r = Ro();
71
71
  return V(() => (r.value, !!t()));
72
72
  }
73
- const at = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, lt = "__vueuse_ssr_handlers__", Ao = /* @__PURE__ */ No();
74
- function No() {
73
+ const at = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, lt = "__vueuse_ssr_handlers__", No = /* @__PURE__ */ Lo();
74
+ function Lo() {
75
75
  return lt in at || (at[lt] = at[lt] || {}), at[lt];
76
76
  }
77
- function Lo(t, r) {
78
- return Ao[t] || r;
77
+ function Go(t, r) {
78
+ return No[t] || r;
79
79
  }
80
- function Go(t) {
80
+ function Ko(t) {
81
81
  return t == null ? "any" : t instanceof Set ? "set" : t instanceof Map ? "map" : t instanceof Date ? "date" : typeof t == "boolean" ? "boolean" : typeof t == "string" ? "string" : typeof t == "object" ? "object" : Number.isNaN(t) ? "any" : "number";
82
82
  }
83
- const Ko = {
83
+ const Bo = {
84
84
  boolean: {
85
85
  read: (t) => t === "true",
86
86
  write: (t) => String(t)
@@ -114,7 +114,7 @@ const Ko = {
114
114
  write: (t) => t.toISOString()
115
115
  }
116
116
  }, zt = "vueuse-storage";
117
- function Bo(t, r, e, o = {}) {
117
+ function zo(t, r, e, o = {}) {
118
118
  var s;
119
119
  const {
120
120
  flush: i = "pre",
@@ -132,7 +132,7 @@ function Bo(t, r, e, o = {}) {
132
132
  } = o, S = (w ? Wt : q)(typeof r == "function" ? r() : r);
133
133
  if (!e)
134
134
  try {
135
- e = Lo("getDefaultStorage", () => {
135
+ e = Go("getDefaultStorage", () => {
136
136
  var l;
137
137
  return (l = Xe) == null ? void 0 : l.localStorage;
138
138
  })();
@@ -141,15 +141,15 @@ function Bo(t, r, e, o = {}) {
141
141
  }
142
142
  if (!e)
143
143
  return S;
144
- const F = At(r), E = Go(F), m = (s = o.serializer) != null ? s : Ko[E], { pause: T, resume: U } = Oo(
144
+ const F = At(r), E = Ko(F), m = (s = o.serializer) != null ? s : Bo[E], { pause: T, resume: U } = Do(
145
145
  S,
146
146
  () => O(S.value),
147
147
  { flush: i, deep: p, eventFilter: g }
148
148
  );
149
- v && h && cn(() => {
149
+ v && h && mn(() => {
150
150
  Bt(v, "storage", x), Bt(v, zt, k), I && x();
151
151
  }), I || x();
152
- function M(l, u) {
152
+ function R(l, u) {
153
153
  v && v.dispatchEvent(new CustomEvent(zt, {
154
154
  detail: {
155
155
  key: t,
@@ -163,16 +163,16 @@ function Bo(t, r, e, o = {}) {
163
163
  try {
164
164
  const u = e.getItem(t);
165
165
  if (l == null)
166
- M(u, null), e.removeItem(t);
166
+ R(u, null), e.removeItem(t);
167
167
  else {
168
168
  const y = m.write(l);
169
- u !== y && (e.setItem(t, y), M(u, y));
169
+ u !== y && (e.setItem(t, y), R(u, y));
170
170
  }
171
171
  } catch (u) {
172
172
  a(u);
173
173
  }
174
174
  }
175
- function R(l) {
175
+ function M(l) {
176
176
  const u = l ? l.newValue : e.getItem(t);
177
177
  if (u == null)
178
178
  return b && F != null && e.setItem(t, m.write(F)), F;
@@ -190,7 +190,7 @@ function Bo(t, r, e, o = {}) {
190
190
  if (!(l && l.key !== t)) {
191
191
  T();
192
192
  try {
193
- (l == null ? void 0 : l.newValue) !== m.write(S.value) && (S.value = R(l));
193
+ (l == null ? void 0 : l.newValue) !== m.write(S.value) && (S.value = M(l));
194
194
  } catch (u) {
195
195
  a(u);
196
196
  } finally {
@@ -204,10 +204,10 @@ function Bo(t, r, e, o = {}) {
204
204
  }
205
205
  return S;
206
206
  }
207
- function zo(t, r, e = {}) {
207
+ function Yo(t, r, e = {}) {
208
208
  const { window: o = Xe, ...s } = e;
209
209
  let i;
210
- const p = Mo(() => o && "ResizeObserver" in o), h = () => {
210
+ const p = Ao(() => o && "ResizeObserver" in o), h = () => {
211
211
  i && (i.disconnect(), i = void 0);
212
212
  }, b = V(() => Array.isArray(t) ? t.map((v) => ze(v)) : [ze(t)]), _ = we(
213
213
  b,
@@ -222,16 +222,16 @@ function zo(t, r, e = {}) {
222
222
  ), w = () => {
223
223
  h(), _();
224
224
  };
225
- return mn(w), {
225
+ return pn(w), {
226
226
  isSupported: p,
227
227
  stop: w
228
228
  };
229
229
  }
230
- function Yo(t, r = { width: 0, height: 0 }, e = {}) {
230
+ function jo(t, r = { width: 0, height: 0 }, e = {}) {
231
231
  const { window: o = Xe, box: s = "content-box" } = e, i = V(() => {
232
232
  var v, g;
233
233
  return (g = (v = ze(t)) == null ? void 0 : v.namespaceURI) == null ? void 0 : g.includes("svg");
234
- }), p = q(r.width), h = q(r.height), { stop: b } = zo(
234
+ }), p = q(r.width), h = q(r.height), { stop: b } = Yo(
235
235
  t,
236
236
  ([v]) => {
237
237
  const g = s === "border-box" ? v.borderBoxSize : s === "content-box" ? v.contentBoxSize : v.devicePixelContentBoxSize;
@@ -249,7 +249,7 @@ function Yo(t, r = { width: 0, height: 0 }, e = {}) {
249
249
  },
250
250
  e
251
251
  );
252
- cn(() => {
252
+ mn(() => {
253
253
  const v = ze(t);
254
254
  v && (p.value = "offsetWidth" in v ? v.offsetWidth : r.width, h.value = "offsetHeight" in v ? v.offsetHeight : r.height);
255
255
  });
@@ -268,12 +268,12 @@ function Yo(t, r = { width: 0, height: 0 }, e = {}) {
268
268
  stop: w
269
269
  };
270
270
  }
271
- function jo(t, r, e = {}) {
271
+ function Wo(t, r, e = {}) {
272
272
  const { window: o = Xe } = e;
273
- return Bo(t, r, o == null ? void 0 : o.localStorage, e);
273
+ return zo(t, r, o == null ? void 0 : o.localStorage, e);
274
274
  }
275
- function Wo(t, r) {
276
- const { containerStyle: e, wrapperProps: o, scrollTo: s, calculateRange: i, currentList: p, containerRef: h } = "itemHeight" in r ? Xo(r, t) : Ho(r, t);
275
+ function qo(t, r) {
276
+ const { containerStyle: e, wrapperProps: o, scrollTo: s, calculateRange: i, currentList: p, containerRef: h } = "itemHeight" in r ? Jo(r, t) : Xo(r, t);
277
277
  return {
278
278
  list: p,
279
279
  scrollTo: s,
@@ -287,11 +287,11 @@ function Wo(t, r) {
287
287
  wrapperProps: o
288
288
  };
289
289
  }
290
- function pn(t) {
291
- const r = q(null), e = Yo(r), o = q([]), s = Wt(t);
290
+ function fn(t) {
291
+ const r = q(null), e = jo(r), o = q([]), s = Wt(t);
292
292
  return { state: q({ start: 0, end: 10 }), source: s, currentList: o, size: e, containerRef: r };
293
293
  }
294
- function fn(t, r, e) {
294
+ function gn(t, r, e) {
295
295
  return (o) => {
296
296
  if (typeof e == "number")
297
297
  return Math.ceil(o / e);
@@ -305,7 +305,7 @@ function fn(t, r, e) {
305
305
  return p - s;
306
306
  };
307
307
  }
308
- function gn(t, r) {
308
+ function vn(t, r) {
309
309
  return (e) => {
310
310
  if (typeof r == "number")
311
311
  return Math.floor(e / r) + 1;
@@ -320,7 +320,7 @@ function gn(t, r) {
320
320
  return s + 1;
321
321
  };
322
322
  }
323
- function vn(t, r, e, o, { containerRef: s, state: i, currentList: p, source: h }) {
323
+ function bn(t, r, e, o, { containerRef: s, state: i, currentList: p, source: h }) {
324
324
  return () => {
325
325
  const b = s.value;
326
326
  if (b) {
@@ -335,30 +335,30 @@ function vn(t, r, e, o, { containerRef: s, state: i, currentList: p, source: h }
335
335
  }
336
336
  };
337
337
  }
338
- function bn(t, r) {
338
+ function _n(t, r) {
339
339
  return (e) => typeof t == "number" ? e * t : r.value.slice(0, e).reduce((s, i, p) => s + t(p), 0);
340
340
  }
341
- function _n(t, r, e, o) {
341
+ function yn(t, r, e, o) {
342
342
  we([t.width, t.height, r, e], () => {
343
343
  o();
344
344
  });
345
345
  }
346
- function yn(t, r) {
346
+ function hn(t, r) {
347
347
  return V(() => typeof t == "number" ? r.value.length * t : r.value.reduce((e, o, s) => e + t(s), 0));
348
348
  }
349
- const qo = {
349
+ const Ho = {
350
350
  horizontal: "scrollLeft",
351
351
  vertical: "scrollTop"
352
352
  };
353
- function hn(t, r, e, o) {
353
+ function wn(t, r, e, o) {
354
354
  return (s) => {
355
- o.value && (o.value[qo[t]] = e(s), r());
355
+ o.value && (o.value[Ho[t]] = e(s), r());
356
356
  };
357
357
  }
358
- function Ho(t, r) {
359
- const e = pn(r), { state: o, source: s, currentList: i, size: p, containerRef: h } = e, b = { overflowX: "auto" }, { itemWidth: _, overscan: w = 5 } = t, v = fn(o, s, _), g = gn(s, _), a = vn("horizontal", w, g, v, e), I = bn(_, s), S = V(() => I(o.value.start)), F = yn(_, s);
360
- _n(p, r, h, a);
361
- const E = hn("horizontal", a, I, h), m = V(() => ({
358
+ function Xo(t, r) {
359
+ const e = fn(r), { state: o, source: s, currentList: i, size: p, containerRef: h } = e, b = { overflowX: "auto" }, { itemWidth: _, overscan: w = 5 } = t, v = gn(o, s, _), g = vn(s, _), a = bn("horizontal", w, g, v, e), I = _n(_, s), S = V(() => I(o.value.start)), F = hn(_, s);
360
+ yn(p, r, h, a);
361
+ const E = wn("horizontal", a, I, h), m = V(() => ({
362
362
  style: {
363
363
  height: "100%",
364
364
  width: `${F.value - S.value}px`,
@@ -375,10 +375,10 @@ function Ho(t, r) {
375
375
  containerRef: h
376
376
  };
377
377
  }
378
- function Xo(t, r) {
379
- const e = pn(r), { state: o, source: s, currentList: i, size: p, containerRef: h } = e, b = { overflowY: "auto" }, { itemHeight: _, overscan: w = 5 } = t, v = fn(o, s, _), g = gn(s, _), a = vn("vertical", w, g, v, e), I = bn(_, s), S = V(() => I(o.value.start)), F = yn(_, s);
380
- _n(p, r, h, a);
381
- const E = hn("vertical", a, I, h), m = V(() => ({
378
+ function Jo(t, r) {
379
+ const e = fn(r), { state: o, source: s, currentList: i, size: p, containerRef: h } = e, b = { overflowY: "auto" }, { itemHeight: _, overscan: w = 5 } = t, v = gn(o, s, _), g = vn(s, _), a = bn("vertical", w, g, v, e), I = _n(_, s), S = V(() => I(o.value.start)), F = hn(_, s);
380
+ yn(p, r, h, a);
381
+ const E = wn("vertical", a, I, h), m = V(() => ({
382
382
  style: {
383
383
  width: "100%",
384
384
  height: `${F.value - S.value}px`,
@@ -394,7 +394,7 @@ function Xo(t, r) {
394
394
  containerRef: h
395
395
  };
396
396
  }
397
- var Je = /* @__PURE__ */ ((t) => (t.PRIMARY = "primary", t.PLAIN = "plain", t))(Je || {}), Pe = /* @__PURE__ */ ((t) => (t.CATEGORY = "view_list", t.ITEM = "fastfood", t.VARIANT = "lunch_dining", t.GROUP = "database", t.FOLDER = "folder", t))(Pe || {});
397
+ var Je = /* @__PURE__ */ ((t) => (t.PRIMARY = "primary", t.PLAIN = "plain", t))(Je || {}), $e = /* @__PURE__ */ ((t) => (t.CATEGORY = "view_list", t.ITEM = "fastfood", t.VARIANT = "lunch_dining", t.GROUP = "database", t.FOLDER = "folder", t))($e || {});
398
398
  function _t(t, r) {
399
399
  return t <= 0 ? null : { label: r };
400
400
  }
@@ -413,14 +413,14 @@ function yt(t) {
413
413
  function ht(t, ...r) {
414
414
  return [...t, ...r.filter((e) => e !== null)];
415
415
  }
416
- function Jo(t, r) {
416
+ function Qo(t, r) {
417
417
  const e = !!r.price;
418
418
  return {
419
419
  label: e ? ye.Dinero.fromFdoDinero(r.price).toFormat(!0) : ye.Dinero.fromFdoDinero(t.price).toFormat(!0),
420
420
  variant: e ? Je.PRIMARY : Je.PLAIN
421
421
  };
422
422
  }
423
- function Qo(t, r) {
423
+ function Zo(t, r) {
424
424
  const e = /* @__PURE__ */ new Set();
425
425
  function o(i) {
426
426
  let p = i;
@@ -456,21 +456,21 @@ function Qo(t, r) {
456
456
  shouldExpandNodeIds: Array.from(e)
457
457
  };
458
458
  }
459
- function Zo(t) {
459
+ function er(t) {
460
460
  return {
461
461
  levels: t.split(/[>,]/).map((e) => e.trim()).filter((e) => e !== "").map((e) => ({
462
462
  query: e.split(" ").filter((o) => o.trim() !== "").map((o) => o.trim())
463
463
  }))
464
464
  };
465
465
  }
466
- function er(t, r) {
466
+ function tr(t, r) {
467
467
  if (!r || r.trim() === "")
468
468
  return {
469
469
  subTree: t,
470
470
  shouldExpandNodeIds: []
471
471
  };
472
- const e = Zo(r);
473
- return Qo(t, e);
472
+ const e = er(r);
473
+ return Zo(t, e);
474
474
  }
475
475
  function wt(t, r, e) {
476
476
  const o = [...t], s = o[r];
@@ -481,7 +481,7 @@ function wt(t, r, e) {
481
481
  function Yt(t, r) {
482
482
  return r ? `${r}, ${t}` : t;
483
483
  }
484
- function tr(t) {
484
+ function nr(t) {
485
485
  const r = /* @__PURE__ */ new Map();
486
486
  function e(o) {
487
487
  var s;
@@ -489,16 +489,16 @@ function tr(t) {
489
489
  }
490
490
  return t.forEach(e), r;
491
491
  }
492
- function nr(t) {
492
+ function or(t) {
493
493
  const r = /* @__PURE__ */ new Map();
494
494
  return t.forEach((e, o) => {
495
495
  r.set(e.id, o);
496
496
  }), r;
497
497
  }
498
- const rt = fo("mf-menu-tree", () => {
498
+ const rt = go("mf-menu-tree", () => {
499
499
  const t = q(), r = q([]), e = q(null), o = q([]);
500
500
  function s(g) {
501
- r.value = g, w.value = tr(g);
501
+ r.value = g, w.value = nr(g);
502
502
  }
503
503
  function i(g) {
504
504
  e.value = g;
@@ -545,10 +545,10 @@ const rt = fo("mf-menu-tree", () => {
545
545
  };
546
546
  });
547
547
  let it = null, Ye = null, je = null;
548
- function wn() {
548
+ function Cn() {
549
549
  return Ye && (clearTimeout(Ye), Ye = null), je ? (je(), je = null, !0) : !1;
550
550
  }
551
- function or(t, r, e) {
551
+ function rr(t, r, e) {
552
552
  function s(_) {
553
553
  if (!t.value) return !1;
554
554
  const w = t.value.validate();
@@ -575,7 +575,7 @@ function or(t, r, e) {
575
575
  });
576
576
  }
577
577
  function b(_) {
578
- const w = An(
578
+ const w = Nn(
579
579
  [_],
580
580
  r.state.menu,
581
581
  r.state.currentCatalogId,
@@ -607,17 +607,17 @@ function or(t, r, e) {
607
607
  saveItemFormEditingStateDebounced: s
608
608
  };
609
609
  }
610
- function rr(t, r) {
610
+ function ar(t, r) {
611
611
  if (!r)
612
612
  throw new Error("combinationKey is required");
613
613
  if (!t[r])
614
614
  throw new Error(`variant mapping for ${r} is not found`);
615
615
  return t[r];
616
616
  }
617
- function Cn(t) {
617
+ function kn(t) {
618
618
  return t._id.startsWith("mMenuV4");
619
619
  }
620
- function ar({
620
+ function lr({
621
621
  menu: t,
622
622
  catalogId: r,
623
623
  schedulerId: e,
@@ -635,19 +635,19 @@ function ar({
635
635
  return (h = _ == null ? void 0 : _.items) == null ? void 0 : h.filter((w) => w._id === o);
636
636
  }
637
637
  }
638
- function lr(t, r, e, o) {
639
- const s = ar({ menu: t, catalogId: r, schedulerId: e, itemId: o });
638
+ function ir(t, r, e, o) {
639
+ const s = lr({ menu: t, catalogId: r, schedulerId: e, itemId: o });
640
640
  if (!s)
641
641
  throw new Error(`Item overrider ${o} not found`);
642
642
  const i = t.modules.item.find((p) => p._id === o);
643
643
  if (!i)
644
644
  throw new Error(`Item ${o} not found in merged menu`);
645
- return Nn(i, s);
645
+ return Ln(i, s);
646
646
  }
647
- function ir(t) {
647
+ function sr(t) {
648
648
  const r = q(null), e = V(() => r.value ? !t.state.currentCatalogId && !t.state.currentSchedulerId ? t.state.menu.modules.item.find(
649
649
  (s) => s._id === r.value
650
- ) : lr(
650
+ ) : ir(
651
651
  t.state.menu,
652
652
  t.state.currentCatalogId,
653
653
  t.state.currentSchedulerId,
@@ -734,18 +734,18 @@ const gt = () => {
734
734
  deleteCategory: i,
735
735
  rearrange: p
736
736
  };
737
- }, sr = { class: "flex flex-col items-center" }, ur = {
737
+ }, ur = { class: "flex flex-col items-center" }, dr = {
738
738
  key: 0,
739
739
  class: /* @__PURE__ */ ve([
740
740
  "relative",
741
741
  "h-[300px] w-[400px]",
742
742
  "border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md"
743
743
  ])
744
- }, dr = {
745
- class: /* @__PURE__ */ ve(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
746
744
  }, cr = {
745
+ class: /* @__PURE__ */ ve(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
746
+ }, mr = {
747
747
  class: /* @__PURE__ */ ve(["relative z-0", "w-full h-full", "overflow-hidden"])
748
- }, mr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pr = /* @__PURE__ */ le({
748
+ }, pr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fr = /* @__PURE__ */ le({
749
749
  __name: "ImageUploadDialog",
750
750
  setup(t) {
751
751
  const { t: r } = me(), e = q(), o = q(!1);
@@ -756,7 +756,7 @@ const gt = () => {
756
756
  w.onload = () => {
757
757
  const v = new Image();
758
758
  v.src = w.result, v.onload = () => {
759
- const g = Gn(v, 1.3333333333333333);
759
+ const g = Kn(v, 1.3333333333333333);
760
760
  e.value = g, o.value = !1;
761
761
  }, v.onerror = () => {
762
762
  o.value = !1;
@@ -765,7 +765,7 @@ const gt = () => {
765
765
  }
766
766
  const i = (_) => {
767
767
  s([_]);
768
- }, { emitData: p } = $t();
768
+ }, { emitData: p } = Pt();
769
769
  async function h(_) {
770
770
  const { canvas: w } = _, v = w.toDataURL("image/jpeg", 0.75), g = await (await fetch(v)).blob(), a = new File([g], "img.jpeg", { type: "image/jpeg" });
771
771
  p(a);
@@ -775,11 +775,11 @@ const gt = () => {
775
775
  }
776
776
  return (_, w) => {
777
777
  const v = j("fm-icon"), g = j("fm-drop-field");
778
- return $(), Z("div", sr, [
779
- e.value ? ($(), Z("div", ur, [
780
- A("div", dr, [
781
- A("div", cr, [
782
- C(n(Ln), {
778
+ return P(), Z("div", ur, [
779
+ e.value ? (P(), Z("div", dr, [
780
+ A("div", cr, [
781
+ A("div", mr, [
782
+ C(n(Gn), {
783
783
  class: "cropper",
784
784
  src: e.value,
785
785
  "stencil-props": {
@@ -807,14 +807,14 @@ const gt = () => {
807
807
  C(v, { name: "close" })
808
808
  ])
809
809
  ])
810
- ])) : ($(), J(g, {
810
+ ])) : (P(), J(g, {
811
811
  key: 1,
812
812
  accept: ".jpg, .JPG, .jpeg, .JPEG, .png, .PNG, .gif, .GIF",
813
813
  "content-class": "h-[300px] w-[400px]",
814
814
  onFileUpload: i
815
815
  }, {
816
816
  "accept-text": B(() => [
817
- A("p", mr, be(n(r)("menu.common.file.accepts")), 1)
817
+ A("p", pr, be(n(r)("menu.common.file.accepts")), 1)
818
818
  ]),
819
819
  _: 1
820
820
  }))
@@ -822,13 +822,13 @@ const gt = () => {
822
822
  };
823
823
  }
824
824
  });
825
- var fr = { firebase: { storageBucket: "image.feedme.cc" } };
826
- const gr = {
825
+ var gr = { firebase: { storageBucket: "image.feedme.cc" } };
826
+ const vr = {
827
827
  key: 0,
828
828
  class: "absolute inset-0 flex items-center justify-center image-action-overlay"
829
- }, vr = {
829
+ }, br = {
830
830
  class: "flex gap-8"
831
- }, br = /* @__PURE__ */ le({
831
+ }, _r = /* @__PURE__ */ le({
832
832
  __name: "ImageUploadForm",
833
833
  props: /* @__PURE__ */ qt({
834
834
  itemId: {},
@@ -865,11 +865,11 @@ const gr = {
865
865
  }).onPrimary(() => {
866
866
  i();
867
867
  });
868
- }, h = Re(), b = nt(h), _ = () => {
868
+ }, h = Me(), b = nt(h), _ = () => {
869
869
  s.open({
870
870
  title: "Upload image",
871
871
  message: "Please upload an image for your product.",
872
- contentComponent: pr,
872
+ contentComponent: fr,
873
873
  primaryActions: {
874
874
  text: "Upload",
875
875
  close: !0
@@ -884,8 +884,8 @@ const gr = {
884
884
  throw new Error("No image selected");
885
885
  if (!e.itemId)
886
886
  throw new Error("Item ID is required when uploading image");
887
- const v = no(e.itemId);
888
- await oo.update(v, w, fr.firebase.storageBucket), o.value = ro(v);
887
+ const v = oo(e.itemId);
888
+ await ro.update(v, w, gr.firebase.storageBucket), o.value = ao(v);
889
889
  }, {
890
890
  message: "Uploading image...",
891
891
  successMessage: "Image uploaded successfully",
@@ -895,7 +895,7 @@ const gr = {
895
895
  };
896
896
  return (w, v) => {
897
897
  const g = j("FmButton"), a = j("FmFormGroup");
898
- return $(), J(a, {
898
+ return P(), J(a, {
899
899
  tag: "div",
900
900
  "model-value": o.value,
901
901
  label: n(r)("menu.common.labels.product_image"),
@@ -903,20 +903,20 @@ const gr = {
903
903
  }, {
904
904
  default: B(() => [A("div", {
905
905
  class: ve(`relative container ${w.disabled ? "cursor-not-allowed" : ""}`)
906
- }, [C(_o, {
906
+ }, [C(yo, {
907
907
  size: {
908
908
  width: 200,
909
909
  height: 150
910
910
  },
911
911
  src: o.value,
912
912
  alt: "Product image"
913
- }, null, 8, ["src"]), w.disabled ? Q("", !0) : ($(), Z("div", gr, [A("div", vr, [C(g, {
913
+ }, null, 8, ["src"]), w.disabled ? Q("", !0) : (P(), Z("div", vr, [A("div", br, [C(g, {
914
914
  icon: o.value ? "edit" : "add",
915
915
  variant: "secondary",
916
916
  "text-color": n(Fe).NeutralGray400,
917
917
  class: "bg-white",
918
918
  onClick: _
919
- }, null, 8, ["icon", "text-color"]), o.value ? ($(), J(g, {
919
+ }, null, 8, ["icon", "text-color"]), o.value ? (P(), J(g, {
920
920
  key: 0,
921
921
  icon: "delete",
922
922
  "text-color": n(Fe).NeutralGray400,
@@ -928,38 +928,38 @@ const gr = {
928
928
  }, 8, ["model-value", "label"]);
929
929
  };
930
930
  }
931
- }), _r = /* @__PURE__ */ Qe(br, [["__scopeId", "data-v-946af9b7"]]), yr = {
931
+ }), yr = /* @__PURE__ */ Qe(_r, [["__scopeId", "data-v-946af9b7"]]), hr = {
932
932
  class: "flex flex-row xs:flex-col gap-24"
933
- }, hr = {
934
- class: "flex-1 flex flex-col gap-24"
935
933
  }, wr = {
936
- class: /* @__PURE__ */ ve(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
934
+ class: "flex-1 flex flex-col gap-24"
937
935
  }, Cr = {
938
- class: "w-[160px] xs:w-full"
936
+ class: /* @__PURE__ */ ve(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
939
937
  }, kr = {
940
- class: "flex-1"
938
+ class: "w-[160px] xs:w-full"
941
939
  }, Ir = {
942
- class: "relative"
940
+ class: "flex-1"
943
941
  }, Er = {
944
- class: "fm-typo-en-body-lg-600"
942
+ class: "relative"
945
943
  }, Tr = {
946
- class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
944
+ class: "fm-typo-en-body-lg-600"
947
945
  }, xr = {
948
- class: "flex flex-col gap-16"
946
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
949
947
  }, Sr = {
950
- class: "space-y-8"
948
+ class: "flex flex-col gap-16"
951
949
  }, Fr = {
950
+ class: "space-y-8"
951
+ }, Or = {
952
952
  key: 0,
953
953
  class: "flex items-center gap-8"
954
- }, Or = {
955
- class: "flex flex-col gap-16"
956
954
  }, Dr = {
957
955
  class: "flex flex-col gap-16"
956
+ }, Vr = {
957
+ class: "flex flex-col gap-16"
958
958
  };
959
- var $e = /* @__PURE__ */ function(t) {
959
+ var Pe = /* @__PURE__ */ function(t) {
960
960
  return t.ADD_ON = "ADD_ON", t.PRODUCT = "PRODUCT", t;
961
- }($e || {});
962
- const Vr = /* @__PURE__ */ le({
961
+ }(Pe || {});
962
+ const $r = /* @__PURE__ */ le({
963
963
  __name: "ProductDetail",
964
964
  props: {
965
965
  isOverride: {
@@ -980,18 +980,18 @@ const Vr = /* @__PURE__ */ le({
980
980
  }) {
981
981
  const e = t, o = ft(), s = ue(), i = gt(), {
982
982
  checkMenuIsLoading: p
983
- } = Vt(nt(Re())), h = ot(), b = r, _ = V(() => s.rules.item), w = V(() => s.categorizedItems), v = V(() => {
983
+ } = Vt(nt(Me())), h = ot(), b = r, _ = V(() => s.rules.item), w = V(() => s.categorizedItems), v = V(() => {
984
984
  const f = w.value.map((c) => ({
985
985
  label: c.name,
986
986
  value: c.id
987
987
  }));
988
988
  return e.isAddon ? f : f.filter((c) => !!c.value);
989
- }), g = V(() => _.value.addon), a = V(() => !v.value.find((f) => !!f.value)), I = V(() => ao(e.form.category ? e.form : e.fallback) || []), S = V(() => I.value.reduce((f, c) => (f[c._id] = c, f), {})), F = V({
989
+ }), g = V(() => _.value.addon), a = V(() => !v.value.find((f) => !!f.value)), I = V(() => lo(e.form.category ? e.form : e.fallback) || []), S = V(() => I.value.reduce((f, c) => (f[c._id] = c, f), {})), F = V({
990
990
  get() {
991
991
  return I.value.map((f) => f._id);
992
992
  },
993
993
  set(f = []) {
994
- const [c, ...P] = f.map((G) => {
994
+ const [c, ...$] = f.map((G) => {
995
995
  const H = S.value[G];
996
996
  return H || {
997
997
  _id: G,
@@ -1002,11 +1002,11 @@ const Vr = /* @__PURE__ */ le({
1002
1002
  b("update:form", "category", null), b("update:form", "additionalCategories", []);
1003
1003
  return;
1004
1004
  }
1005
- b("update:form", "category", c._id), b("update:form", "additionalCategories", P);
1005
+ b("update:form", "category", c._id), b("update:form", "additionalCategories", $);
1006
1006
  }
1007
1007
  }), E = q(), m = ({
1008
1008
  multiple: f = !0
1009
- } = {}) => e.isAddon ? null : C(zn, {
1009
+ } = {}) => e.isAddon ? null : C(Yn, {
1010
1010
  ref: E,
1011
1011
  disabled: !_.value.category || p(),
1012
1012
  items: v.value,
@@ -1031,30 +1031,33 @@ const Vr = /* @__PURE__ */ le({
1031
1031
  }, [y("menu.product.form.detail.category.add_new")])])
1032
1032
  });
1033
1033
  Ae(async () => {
1034
- !a.value && e.form.category === void 0 && e.isCreate && O($e.PRODUCT);
1034
+ !a.value && e.form.category === void 0 && e.isCreate && O(Pe.PRODUCT);
1035
1035
  });
1036
1036
  const T = V(() => {
1037
1037
  var c;
1038
1038
  const f = e.form.name || ((c = e.fallback) == null ? void 0 : c.name);
1039
- return f ? s.items.filter((P) => !!P.category && P._id !== e.form._id && P.name === f).length : 0;
1039
+ return f ? s.items.filter(($) => !!$.category && $._id !== e.form._id && $.name === f).length : 0;
1040
1040
  }), U = V(() => {
1041
1041
  var H, ee, ie;
1042
1042
  if (!o.state.featureFlags.uniqueProductCode) return 0;
1043
1043
  const c = e.form.code || ((H = e.fallback) == null ? void 0 : H.code);
1044
1044
  if (!c) return 0;
1045
- let P = s.itemCodeMap.get(c) || 0;
1045
+ let $ = s.itemCodeMap.get(c) || 0;
1046
1046
  const G = s.items.find((pe) => pe._id === e.form._id);
1047
- return (G == null ? void 0 : G.code) === c && (P -= 1), (ie = (ee = G == null ? void 0 : G.variant) == null ? void 0 : ee.variantCombinations) == null || ie.forEach((pe) => {
1048
- pe.code === c && (P -= 1);
1049
- }), P;
1050
- }), M = V(() => e.isAddon ? $e.ADD_ON : $e.PRODUCT);
1047
+ return (G == null ? void 0 : G.code) === c && ($ -= 1), (ie = (ee = G == null ? void 0 : G.variant) == null ? void 0 : ee.variantCombinations) == null || ie.forEach((pe) => {
1048
+ pe.code === c && ($ -= 1);
1049
+ }), $;
1050
+ }), R = V(() => e.isAddon ? Pe.ADD_ON : Pe.PRODUCT);
1051
1051
  function O(f) {
1052
- var P, G, H;
1053
- if (M.value === f) return;
1054
- const c = f == $e.ADD_ON;
1055
- b("update:form", "category", e.isOverride ? c ? "" : ((P = e.fallback) == null ? void 0 : P.category) ?? ((G = v.value.find((ee) => !!ee.value)) == null ? void 0 : G.value) : c ? null : (H = v.value.find((ee) => !!ee.value)) == null ? void 0 : H.value), c && b("update:form", "additionalCategories", []);
1052
+ var $, G, H;
1053
+ if (R.value === f) return;
1054
+ const c = f == Pe.ADD_ON;
1055
+ b("update:form", "category", e.isOverride ? c ? "" : (($ = e.fallback) == null ? void 0 : $.category) ?? ((G = v.value.find((ee) => !!ee.value)) == null ? void 0 : G.value) : c ? null : (H = v.value.find((ee) => !!ee.value)) == null ? void 0 : H.value), c && b("update:form", "additionalCategories", []);
1056
1056
  }
1057
- const R = sn();
1057
+ const M = un();
1058
+ Qt("apply-description", (f) => {
1059
+ b("update:form", "description", f || "");
1060
+ });
1058
1061
  async function x() {
1059
1062
  if (!e.form.name) {
1060
1063
  const f = document.getElementById("product-name");
@@ -1066,14 +1069,9 @@ const Vr = /* @__PURE__ */ le({
1066
1069
  }
1067
1070
  h.pushDataLayer({
1068
1071
  event: "menu_catalog_item_general_remy_suggest_description"
1069
- }), R.activate({
1070
- command: "suggestDescription",
1071
- context: {
1072
- itemName: e.form.name || ""
1073
- },
1074
- onResult: (f) => {
1075
- console.log("Remy suggest description result:", f), b("update:form", "description", f.description || ""), b("update:form", "_descriptionTrackingId", f.trackingId);
1076
- }
1072
+ }), M.activate({
1073
+ prompt: `Suggest a menu description for ${e.form.name}`,
1074
+ command: "suggestDescription"
1077
1075
  });
1078
1076
  }
1079
1077
  const k = V(() => s.subcategories), l = V(() => k.value.map((f) => ({
@@ -1090,21 +1088,21 @@ const Vr = /* @__PURE__ */ le({
1090
1088
  t: y
1091
1089
  } = me();
1092
1090
  return (f, c) => {
1093
- const P = j("fm-text-field"), G = j("fm-textarea"), H = j("fm-radio"), ee = j("FmSnackbar"), ie = j("FmButton"), pe = j("fm-radio-group"), d = j("FmFormGroup"), D = j("fm-stepper-field"), N = Xt("tooltip");
1094
- return $(), J(De, {
1091
+ const $ = j("fm-text-field"), G = j("fm-textarea"), H = j("fm-radio"), ee = j("FmSnackbar"), ie = j("FmButton"), pe = j("fm-radio-group"), d = j("FmFormGroup"), D = j("fm-stepper-field"), N = Xt("tooltip");
1092
+ return P(), J(De, {
1095
1093
  title: n(y)("menu.product.form.detail.title")
1096
1094
  }, {
1097
1095
  default: B(() => {
1098
1096
  var W, L, K;
1099
- return [A("div", yr, [A("div", hr, [A("div", wr, [A("div", Cr, [C(P, {
1097
+ return [A("div", hr, [A("div", wr, [A("div", Cr, [A("div", kr, [C($, {
1100
1098
  "model-value": f.form.code,
1101
1099
  placeholder: ((W = f.fallback) == null ? void 0 : W.code) || n(y)("menu.product.form.detail.fields.code.placeholder"),
1102
1100
  label: n(y)("menu.product.form.detail.fields.code.label"),
1103
1101
  rules: [(X) => U.value === 0 || n(y)("menu.product.form.detail.fields.code.duplicate_warning", {
1104
1102
  count: U.value
1105
1103
  })],
1106
- "onUpdate:modelValue": c[0] || (c[0] = (X) => b("update:form", "code", n(Qt)(X, f.isOverride)))
1107
- }, null, 8, ["model-value", "placeholder", "label", "rules"])]), A("div", kr, [C(P, {
1104
+ "onUpdate:modelValue": c[0] || (c[0] = (X) => b("update:form", "code", n(Zt)(X, f.isOverride)))
1105
+ }, null, 8, ["model-value", "placeholder", "label", "rules"])]), A("div", Ir, [C($, {
1108
1106
  id: "product-name",
1109
1107
  disabled: !_.value.name,
1110
1108
  "helper-text": T.value > 0 ? n(y)("menu.product.form.detail.fields.name.duplicate_warning", {
@@ -1116,19 +1114,19 @@ const Vr = /* @__PURE__ */ le({
1116
1114
  "label-mark": "required",
1117
1115
  label: n(y)("menu.product.form.detail.fields.name.label"),
1118
1116
  "onUpdate:modelValue": c[1] || (c[1] = (X) => b("update:form", "name", X))
1119
- }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), A("div", Ir, [C(G, {
1117
+ }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), A("div", Er, [C(G, {
1120
1118
  disabled: !_.value.description,
1121
1119
  "model-value": f.form.description || "",
1122
1120
  placeholder: n(y)("menu.product.form.detail.fields.description.placeholder"),
1123
1121
  "onUpdate:modelValue": c[2] || (c[2] = (X) => b("update:form", "description", X.trim())),
1124
1122
  class: "description"
1125
1123
  }, {
1126
- label: B(() => [A("p", Er, [Sn(be(n(y)("menu.product.form.detail.fields.description.label")) + " ", 1), A("span", Tr, be(n(y)("menu.product.form.detail.fields.description.optional")), 1)])]),
1124
+ label: B(() => [A("p", Tr, [Fn(be(n(y)("menu.product.form.detail.fields.description.label")) + " ", 1), A("span", xr, be(n(y)("menu.product.form.detail.fields.description.optional")), 1)])]),
1127
1125
  _: 1
1128
- }, 8, ["disabled", "model-value", "placeholder"]), pt(C(n(un), {
1126
+ }, 8, ["disabled", "model-value", "placeholder"]), pt(C(n(dn), {
1129
1127
  class: "absolute top-32 right-4 cursor-pointer",
1130
1128
  onClick: x
1131
- }, null, 512), [[N, n(dn)("Suggest description")]])])]), C(_r, {
1129
+ }, null, 512), [[N, n(cn)("Suggest description")]])])]), C(yr, {
1132
1130
  disabled: !_.value.thumbnail,
1133
1131
  "item-id": f.form._id || "",
1134
1132
  "model-value": f.form.thumbnail || ((K = f.fallback) == null ? void 0 : K.thumbnail) || null,
@@ -1136,23 +1134,23 @@ const Vr = /* @__PURE__ */ le({
1136
1134
  }, null, 8, ["disabled", "item-id", "model-value"])]), C(Ue, {
1137
1135
  label: n(s).isV4 ? n(y)("menu.product.form.detail.category.label") : n(y)("menu.product.form.detail.category.label_singular")
1138
1136
  }, {
1139
- default: B(() => [g.value ? ($(), J(pe, {
1137
+ default: B(() => [g.value ? (P(), J(pe, {
1140
1138
  key: 0,
1141
1139
  disabled: !_.value.category,
1142
- "model-value": f.isAddon ? $e.ADD_ON : $e.PRODUCT,
1140
+ "model-value": f.isAddon ? Pe.ADD_ON : Pe.PRODUCT,
1143
1141
  "onUpdate:modelValue": c[4] || (c[4] = (X) => O(X))
1144
1142
  }, {
1145
- default: B(() => [A("div", xr, [A("div", Sr, [C(H, {
1143
+ default: B(() => [A("div", Sr, [A("div", Fr, [C(H, {
1146
1144
  disabled: a.value,
1147
- value: $e.PRODUCT,
1145
+ value: Pe.PRODUCT,
1148
1146
  label: n(y)("menu.product.form.detail.category.options.product.label"),
1149
1147
  sublabel: n(y)("menu.product.form.detail.category.options.product.sublabel")
1150
- }, null, 8, ["disabled", "value", "label", "sublabel"]), C(Kn, null, {
1151
- default: B(() => [n(s).isV4 ? ($(), J(m, {
1148
+ }, null, 8, ["disabled", "value", "label", "sublabel"]), C(Bn, null, {
1149
+ default: B(() => [n(s).isV4 ? (P(), J(m, {
1152
1150
  key: 0
1153
1151
  })) : Q("", !0)]),
1154
1152
  _: 1
1155
- })]), a.value ? ($(), Z("div", Fr, [C(ee, {
1153
+ })]), a.value ? (P(), Z("div", Or, [C(ee, {
1156
1154
  title: n(y)("menu.product.form.detail.category.add_first"),
1157
1155
  variant: "info"
1158
1156
  }, null, 8, ["title"]), C(ie, {
@@ -1161,13 +1159,13 @@ const Vr = /* @__PURE__ */ le({
1161
1159
  variant: "secondary",
1162
1160
  onClick: n(i).create
1163
1161
  }, null, 8, ["label", "onClick"])])) : Q("", !0), C(H, {
1164
- value: $e.ADD_ON,
1162
+ value: Pe.ADD_ON,
1165
1163
  disabled: !1,
1166
1164
  label: n(y)("menu.product.form.detail.category.options.addon.label"),
1167
1165
  sublabel: n(y)("menu.product.form.detail.category.options.addon.sublabel")
1168
1166
  }, null, 8, ["value", "label", "sublabel"])])]),
1169
1167
  _: 1
1170
- }, 8, ["disabled", "model-value"])) : Q("", !0), n(s).isV4 ? Q("", !0) : ($(), J(d, {
1168
+ }, 8, ["disabled", "model-value"])) : Q("", !0), n(s).isV4 ? Q("", !0) : (P(), J(d, {
1171
1169
  key: 1,
1172
1170
  "model-value": f.form.category,
1173
1171
  rules: [(X) => !X && !f.isOverride ? "Category is required" : !0]
@@ -1178,11 +1176,11 @@ const Vr = /* @__PURE__ */ le({
1178
1176
  _: 1
1179
1177
  }, 8, ["model-value", "rules"]))]),
1180
1178
  _: 1
1181
- }, 8, ["label"]), n(s).isV4 && !f.isAddon ? ($(), J(Ue, {
1179
+ }, 8, ["label"]), n(s).isV4 && !f.isAddon ? (P(), J(Ue, {
1182
1180
  key: 0,
1183
1181
  label: n(y)("menu.product.form.detail.path.label")
1184
1182
  }, {
1185
- default: B(() => [A("div", Or, [C(Bn, {
1183
+ default: B(() => [A("div", Dr, [C(zn, {
1186
1184
  modelValue: u.value,
1187
1185
  "onUpdate:modelValue": c[5] || (c[5] = (X) => u.value = X),
1188
1186
  items: l.value,
@@ -1191,7 +1189,7 @@ const Vr = /* @__PURE__ */ le({
1191
1189
  "is-local-only": !0
1192
1190
  }, null, 8, ["modelValue", "items", "placeholder", "disabled"])])]),
1193
1191
  _: 1
1194
- }, 8, ["label"])) : Q("", !0), A("div", Dr, [C(D, {
1192
+ }, 8, ["label"])) : Q("", !0), A("div", Vr, [C(D, {
1195
1193
  label: "Shelf Life (mins)",
1196
1194
  "model-value": f.form.shelfLife ?? null,
1197
1195
  "onUpdate:modelValue": c[6] || (c[6] = (X) => X && b("update:form", "shelfLife", X))
@@ -1209,7 +1207,7 @@ const Vr = /* @__PURE__ */ le({
1209
1207
  }, 8, ["title"]);
1210
1208
  };
1211
1209
  }
1212
- }), Pr = /* @__PURE__ */ Qe(Vr, [["__scopeId", "data-v-d74e5a64"]]), $r = /* @__PURE__ */ le({
1210
+ }), Pr = /* @__PURE__ */ Qe($r, [["__scopeId", "data-v-5f4e20f6"]]), Ur = /* @__PURE__ */ le({
1213
1211
  __name: "AddForm",
1214
1212
  setup(t) {
1215
1213
  const r = ue(), e = V(() => r.rules.group), o = V(() => !!r.state.currentCatalogId || !!r.state.currentSchedulerId), s = V(() => {
@@ -1240,7 +1238,7 @@ const Vr = /* @__PURE__ */ le({
1240
1238
  position: r.groups.length - 1,
1241
1239
  itemsLinked: []
1242
1240
  }), p = q(i()), { t: h } = me();
1243
- return (b, _) => e.value.create ? ($(), J(n(Wr), {
1241
+ return (b, _) => e.value.create ? (P(), J(n(qr), {
1244
1242
  key: 0,
1245
1243
  "categorized-items": n(r).categorizedItems,
1246
1244
  config: s.value,
@@ -1253,20 +1251,20 @@ const Vr = /* @__PURE__ */ le({
1253
1251
  title: n(h)("menu.group.add")
1254
1252
  }, {
1255
1253
  default: B(({ trigger: w }) => [
1256
- Me(b.$slots, "default", { trigger: w })
1254
+ Re(b.$slots, "default", { trigger: w })
1257
1255
  ]),
1258
1256
  _: 3
1259
1257
  }, 8, ["categorized-items", "config", "group", "title"])) : Q("", !0);
1260
1258
  }
1261
- }), Ur = {
1259
+ }), Mr = {
1262
1260
  key: 0
1263
1261
  }, Rr = {
1264
1262
  key: 1
1265
- }, Mr = {
1266
- class: "xs:overflow-x-scroll"
1267
1263
  }, Ar = {
1264
+ class: "xs:overflow-x-scroll"
1265
+ }, Nr = {
1268
1266
  class: "xs:min-w-[640px]"
1269
- }, Nr = /* @__PURE__ */ le({
1267
+ }, Lr = /* @__PURE__ */ le({
1270
1268
  __name: "OptionTable",
1271
1269
  props: {
1272
1270
  config: {},
@@ -1280,7 +1278,7 @@ const Vr = /* @__PURE__ */ le({
1280
1278
  setup(t, {
1281
1279
  emit: r
1282
1280
  }) {
1283
- const e = t, o = r, s = Re(), i = ot(), p = ue(), h = V(() => ye.Country.getCountry(i.currentCountry.value)), b = q(!1), _ = V(() => e.config.isV4 || e.group.type === oe.F_ADDON_GROUP_TYPE.enum.PRODUCT), w = V(() => _.value), v = V(() => _.value), g = V(() => Object.values(e.group.items).flatMap((d) => [{
1281
+ const e = t, o = r, s = Me(), i = ot(), p = ue(), h = V(() => ye.Country.getCountry(i.currentCountry.value)), b = q(!1), _ = V(() => e.config.isV4 || e.group.type === oe.F_ADDON_GROUP_TYPE.enum.PRODUCT), w = V(() => _.value), v = V(() => _.value), g = V(() => Object.values(e.group.items).flatMap((d) => [{
1284
1282
  _id: d._id,
1285
1283
  combinationKey: void 0
1286
1284
  }, ...(d.items ?? []).map((D) => ({
@@ -1289,7 +1287,7 @@ const Vr = /* @__PURE__ */ le({
1289
1287
  }))])), {
1290
1288
  searchKey: a,
1291
1289
  filter: I
1292
- } = ko(), S = V(() => {
1290
+ } = Io(), S = V(() => {
1293
1291
  const d = Object.entries(e.group.items).filter(([, D]) => I([D.code || "", D.name || D.fallbackName, m(D.price ?? D.fallbackPrice), T(D.orderFrom || D.fallbackOrder), ...(D.items || []).map((N) => [N.code || "", N.name || N.fallbackName, m(N.price ?? N.fallbackPrice), T(N.orderFrom || N.fallbackOrder)].join(""))]));
1294
1292
  return Object.fromEntries(d);
1295
1293
  }), F = (d) => ({
@@ -1300,10 +1298,10 @@ const Vr = /* @__PURE__ */ le({
1300
1298
  orderFrom: e.config.orderFrom(d)
1301
1299
  }), E = V(() => !0), m = (d) => d ? et(d, !1) : "", T = (d) => {
1302
1300
  var D;
1303
- return d == null ? "" : (D = lo()[d]) == null ? void 0 : D.label;
1304
- }, U = V(() => Object.values(S.value)), M = q({}), {
1301
+ return d == null ? "" : (D = io()[d]) == null ? void 0 : D.label;
1302
+ }, U = V(() => Object.values(S.value)), R = q({}), {
1305
1303
  t: O
1306
- } = me(), R = q([{
1304
+ } = me(), M = q([{
1307
1305
  accessorKey: "isDefault",
1308
1306
  header: () => O("menu.group.option.is_default"),
1309
1307
  enableSorting: !1,
@@ -1350,7 +1348,7 @@ const Vr = /* @__PURE__ */ le({
1350
1348
  header: () => O("menu.group.option.product_title"),
1351
1349
  enableSorting: !1,
1352
1350
  cell: (d) => {
1353
- const D = d.getValue(), N = d.row.original, W = d.row.depth > 0, L = N.combinationKey ? ln(N.combinationKey, ue().variants) : null;
1351
+ const D = d.getValue(), N = d.row.original, W = d.row.depth > 0, L = N.combinationKey ? sn(N.combinationKey, ue().variants) : null;
1354
1352
  return _e("div", _e(ke.FmTextField, {
1355
1353
  modelValue: D,
1356
1354
  placeholder: L ?? "",
@@ -1460,7 +1458,7 @@ const Vr = /* @__PURE__ */ le({
1460
1458
  const D = d.row.original, N = d.row.depth > 0;
1461
1459
  return C("div", {
1462
1460
  class: "flex items-center justify-end"
1463
- }, [F(null).priceTier && C(Zt, {
1461
+ }, [F(null).priceTier && C(en, {
1464
1462
  menuStore: p,
1465
1463
  priceTiers: D.priceTiers,
1466
1464
  "onUpdate:priceTiers": (W) => {
@@ -1582,7 +1580,7 @@ const Vr = /* @__PURE__ */ le({
1582
1580
  function u(d, D, N, W) {
1583
1581
  var re, ne;
1584
1582
  const L = fe(e.group), K = (re = L.items[d].items) == null ? void 0 : re.findIndex((ge) => ge.combinationKey === D);
1585
- if (!Rt.isSet(K)) return;
1583
+ if (!Mt.isSet(K)) return;
1586
1584
  let X = (ne = L.items[d].items) == null ? void 0 : ne[K];
1587
1585
  X && (X = {
1588
1586
  ...X,
@@ -1601,24 +1599,24 @@ const Vr = /* @__PURE__ */ le({
1601
1599
  var N;
1602
1600
  return d[D._id] = {
1603
1601
  price: D.price,
1604
- variants: io(((N = D.variant) == null ? void 0 : N.variantCombinations) || [], "combinationKey")
1602
+ variants: so(((N = D.variant) == null ? void 0 : N.variantCombinations) || [], "combinationKey")
1605
1603
  }, d;
1606
- }, {})), P = (d) => {
1604
+ }, {})), $ = (d) => {
1607
1605
  var L, K;
1608
1606
  const N = p.state.menu.modules.item.find((X) => X._id === d._id), W = d.combinationKey ? {
1609
1607
  ...(L = N == null ? void 0 : N.variant) == null ? void 0 : L.variantCombinations.find((X) => X.combinationKey === d.combinationKey),
1610
- name: Pt(ue().variants, ((K = N == null ? void 0 : N.variant) == null ? void 0 : K.variantGroupIds) || [])[d.combinationKey]
1608
+ name: $t(ue().variants, ((K = N == null ? void 0 : N.variant) == null ? void 0 : K.variantGroupIds) || [])[d.combinationKey]
1611
1609
  } : N;
1612
1610
  return W == null ? void 0 : W.name;
1613
1611
  }, G = async (d) => {
1614
- let D = en(e.group);
1612
+ let D = tn(e.group);
1615
1613
  D = {
1616
1614
  ...D,
1617
1615
  items: d.map((N) => {
1618
1616
  const W = D.items.find((K) => K._id == N._id && K.combinationKey == N.combinationKey), L = c.value[N._id];
1619
1617
  return W || {
1620
1618
  ...N,
1621
- name: P(N),
1619
+ name: $(N),
1622
1620
  price: N.combinationKey ? L.variants[N.combinationKey || ""].price : L.price,
1623
1621
  orderFrom: oe.F_ORDER_FROM.enum.ALL
1624
1622
  };
@@ -1632,15 +1630,15 @@ const Vr = /* @__PURE__ */ le({
1632
1630
  [W._id]: W
1633
1631
  }), {}), o("update:group", D);
1634
1632
  }
1635
- const ie = po(), pe = V(() => ie.breakpoints.value.xs);
1633
+ const ie = fo(), pe = V(() => ie.breakpoints.value.xs);
1636
1634
  return (d, D) => {
1637
1635
  const N = j("fm-button"), W = j("fm-table");
1638
- return $(), J(De, {
1636
+ return P(), J(De, {
1639
1637
  title: n(O)("menu.group.option.title")
1640
1638
  }, {
1641
- "append-title": B(() => [d.config.link() ? ($(), Z(Oe, {
1639
+ "append-title": B(() => [d.config.link() ? (P(), Z(Oe, {
1642
1640
  key: 0
1643
- }, [w.value ? ($(), Z("div", Ur, [C(xt, {
1641
+ }, [w.value ? (P(), Z("div", Mr, [C(xt, {
1644
1642
  "categorized-items": d.categorizedItems,
1645
1643
  "initial-value": g.value,
1646
1644
  "show-variant": d.config.bindToVariant,
@@ -1662,7 +1660,7 @@ const Vr = /* @__PURE__ */ le({
1662
1660
  onClick: L
1663
1661
  }, null, 8, ["text-color", "border-color", "label", "onClick"])]),
1664
1662
  _: 1
1665
- }, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : ($(), Z("div", Rr, [C(N, {
1663
+ }, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : (P(), Z("div", Rr, [C(N, {
1666
1664
  "text-color": n(Fe).ColorPrimary,
1667
1665
  "border-color": n(Fe).ColorPrimary,
1668
1666
  variant: "secondary",
@@ -1670,18 +1668,18 @@ const Vr = /* @__PURE__ */ le({
1670
1668
  "prepend-icon": "add",
1671
1669
  onClick: k
1672
1670
  }, null, 8, ["text-color", "border-color", "label"])]))], 64)) : Q("", !0)]),
1673
- default: B(() => [A("div", Mr, [A("div", Ar, [C(W, {
1674
- "column-defs": R.value,
1671
+ default: B(() => [A("div", Ar, [A("div", Nr, [C(W, {
1672
+ "column-defs": M.value,
1675
1673
  "column-visibility": x.value,
1676
1674
  draggable: !pe.value && F(null).name,
1677
- "expanded-state": b.value ? {} : M.value,
1675
+ "expanded-state": b.value ? {} : R.value,
1678
1676
  "get-sub-row": H,
1679
1677
  "page-size": 999,
1680
1678
  "row-data": U.value,
1681
1679
  "search-value": n(a),
1682
1680
  "shrink-at": !1,
1683
1681
  "hide-footer": "",
1684
- "onUpdate:expandedState": D[1] || (D[1] = (L) => M.value = L),
1682
+ "onUpdate:expandedState": D[1] || (D[1] = (L) => R.value = L),
1685
1683
  onDndChanged: D[2] || (D[2] = (L) => ee(L)),
1686
1684
  "onUpdate:dragging": D[3] || (D[3] = (L) => b.value = L)
1687
1685
  }, null, 8, ["column-defs", "column-visibility", "draggable", "expanded-state", "row-data", "search-value"])])])]),
@@ -1689,10 +1687,10 @@ const Vr = /* @__PURE__ */ le({
1689
1687
  }, 8, ["title"]);
1690
1688
  };
1691
1689
  }
1692
- }), Lr = { class: "fm-typo-en-title-md-600" }, Gr = {
1690
+ }), Gr = { class: "fm-typo-en-title-md-600" }, Kr = {
1693
1691
  key: 0,
1694
1692
  class: "pt-8 space-y-32"
1695
- }, Kr = { class: "flex gap-8 items-center justify-start" }, kn = /* @__PURE__ */ le({
1693
+ }, Br = { class: "flex gap-8 items-center justify-start" }, In = /* @__PURE__ */ le({
1696
1694
  __name: "BaseForm",
1697
1695
  props: {
1698
1696
  title: {},
@@ -1705,11 +1703,11 @@ const Vr = /* @__PURE__ */ le({
1705
1703
  emits: ["update:group", "submit:group", "status:show"],
1706
1704
  setup(t, { expose: r, emit: e }) {
1707
1705
  let o = t;
1708
- const s = e, i = ue(), p = ot(), h = Ge(), b = Vt(nt(Re())), { countDefaultItems: _, validateGroupItems: w, minMaxValidationRules: v } = Yn(
1706
+ const s = e, i = ue(), p = ot(), h = Ge(), b = Vt(nt(Me())), { countDefaultItems: _, validateGroupItems: w, minMaxValidationRules: v } = jn(
1709
1707
  () => o.group
1710
1708
  ), g = q(!1), a = q(!1), I = (c) => {
1711
- Rt.isBoolean(c) ? a.value = c : a.value = !a.value;
1712
- }, S = V(() => o.group ? o.config(o.group) : null), F = V(() => jn(S.value)), E = (c) => F.value.includes(c), m = V(() => [
1709
+ Mt.isBoolean(c) ? a.value = c : a.value = !a.value;
1710
+ }, S = V(() => o.group ? o.config(o.group) : null), F = V(() => Wn(S.value)), E = (c) => F.value.includes(c), m = V(() => [
1713
1711
  {
1714
1712
  label: "Normal",
1715
1713
  value: oe.F_ADDON_GROUP_TYPE.enum.NORMAL
@@ -1727,7 +1725,7 @@ const Vr = /* @__PURE__ */ le({
1727
1725
  s("update:group", c);
1728
1726
  }
1729
1727
  function U(c) {
1730
- function P() {
1728
+ function $() {
1731
1729
  T({
1732
1730
  ...o.group,
1733
1731
  items: {},
@@ -1745,15 +1743,15 @@ const Vr = /* @__PURE__ */ le({
1745
1743
  text: "No",
1746
1744
  close: !0
1747
1745
  }
1748
- }).onPrimary(P) : P();
1746
+ }).onPrimary($) : $();
1749
1747
  }
1750
- function M(c) {
1751
- return new tn(i, b.updateMenu, h).mapGroups(
1748
+ function R(c) {
1749
+ return new nn(i, b.updateMenu, h).mapGroups(
1752
1750
  [c],
1753
1751
  S.value.isOverride
1754
1752
  )[0];
1755
1753
  }
1756
- const O = q(Ie.clone(o.group)), R = Ut(
1754
+ const O = q(Ie.clone(o.group)), M = Ut(
1757
1755
  () => !Ie.isEqual(o.group, O.value),
1758
1756
  () => {
1759
1757
  a.value = !1;
@@ -1761,7 +1759,7 @@ const Vr = /* @__PURE__ */ le({
1761
1759
  ), x = V(() => o.action === "add" ? f("common.add") : f("common.update"));
1762
1760
  async function k() {
1763
1761
  if (o.action === "add") {
1764
- const { group: c, linkItems: P } = qn(o.group), G = {
1762
+ const { group: c, linkItems: $ } = Hn(o.group), G = {
1765
1763
  module: oe.F_MENU_MODULE_V4_KEY.enum.group,
1766
1764
  operation: he.F_OPERATION_TYPE.create,
1767
1765
  data: c,
@@ -1769,7 +1767,7 @@ const Vr = /* @__PURE__ */ le({
1769
1767
  {
1770
1768
  module: oe.F_MENU_MODULE_V4_KEY.enum.item,
1771
1769
  id: "",
1772
- data: P
1770
+ data: $
1773
1771
  }
1774
1772
  ]
1775
1773
  };
@@ -1788,9 +1786,9 @@ const Vr = /* @__PURE__ */ le({
1788
1786
  return ((c = p.groupAttributeSettings) == null ? void 0 : c.value.length) > 0 && !S.value.isOverride;
1789
1787
  }), u = V(() => {
1790
1788
  const c = {};
1791
- return i.state.menu.modules.group.forEach((P) => {
1789
+ return i.state.menu.modules.group.forEach(($) => {
1792
1790
  var G;
1793
- for (const [H, ee] of Object.entries(P.customAttributes || {}))
1791
+ for (const [H, ee] of Object.entries($.customAttributes || {}))
1794
1792
  typeof ee == "string" && ee && !((G = c[H]) != null && G.includes(ee)) && (c[H] = [...c[H] || [], ee]);
1795
1793
  }), c;
1796
1794
  }), y = (c) => {
@@ -1804,29 +1802,29 @@ const Vr = /* @__PURE__ */ le({
1804
1802
  show: a
1805
1803
  });
1806
1804
  const { t: f } = me();
1807
- return (c, P) => {
1805
+ return (c, $) => {
1808
1806
  const G = j("fm-text-field"), H = j("fm-stepper-field"), ee = j("FmFormGroup"), ie = j("fm-radio"), pe = j("fm-radio-group"), d = j("fm-switch"), D = j("FormSection"), N = j("fm-button"), W = j("fm-side-sheet");
1809
- return $(), Z(Oe, null, [
1810
- Me(c.$slots, "default", { trigger: I }),
1807
+ return P(), Z(Oe, null, [
1808
+ Re(c.$slots, "default", { trigger: I }),
1811
1809
  C(W, {
1812
1810
  id: "group-form",
1813
1811
  modelValue: a.value,
1814
- "onUpdate:modelValue": P[8] || (P[8] = (L) => a.value = L),
1812
+ "onUpdate:modelValue": $[8] || ($[8] = (L) => a.value = L),
1815
1813
  "is-container": n(ke).FmForm,
1816
1814
  "is-container-props": {
1817
1815
  onValidationSuccess: k,
1818
1816
  blameFormChildOnValidationFailed: !0
1819
1817
  },
1820
1818
  "max-width": 720,
1821
- "onOn:clickedAway": n(R)
1819
+ "onOn:clickedAway": n(M)
1822
1820
  }, {
1823
1821
  "side-sheet-header": B(() => [
1824
- A("p", Lr, be(c.title), 1)
1822
+ A("p", Gr, be(c.title), 1)
1825
1823
  ]),
1826
1824
  "side-sheet-footer": B(() => [
1827
- A("div", Kr, [
1825
+ A("div", Br, [
1828
1826
  C(N, {
1829
- label: n(Io)(x.value),
1827
+ label: n(Eo)(x.value),
1830
1828
  loading: g.value,
1831
1829
  size: "lg",
1832
1830
  type: "submit",
@@ -1836,19 +1834,19 @@ const Vr = /* @__PURE__ */ le({
1836
1834
  label: n(f)("menu.common.actions.cancel"),
1837
1835
  size: "lg",
1838
1836
  variant: "tertiary",
1839
- onClick: P[7] || (P[7] = () => a.value = !1)
1837
+ onClick: $[7] || ($[7] = () => a.value = !1)
1840
1838
  }, null, 8, ["label"])
1841
1839
  ])
1842
1840
  ]),
1843
1841
  default: B(() => [
1844
- c.group ? ($(), Z("div", Gr, [
1845
- Me(c.$slots, "variant-section"),
1846
- C(go, null, {
1842
+ c.group ? (P(), Z("div", Kr, [
1843
+ Re(c.$slots, "variant-section"),
1844
+ C(vo, null, {
1847
1845
  default: B(() => [
1848
1846
  A("div", null, [
1849
1847
  C(G, {
1850
1848
  modelValue: c.group.name,
1851
- "onUpdate:modelValue": P[0] || (P[0] = (L) => c.group.name = L),
1849
+ "onUpdate:modelValue": $[0] || ($[0] = (L) => c.group.name = L),
1852
1850
  disabled: E("name"),
1853
1851
  rules: [
1854
1852
  (L) => !!L || n(f)("menu.common.validation.required", { field: n(f)("menu.common.labels.group_name") })
@@ -1862,11 +1860,11 @@ const Vr = /* @__PURE__ */ le({
1862
1860
  rules: n(v)
1863
1861
  }, {
1864
1862
  default: B(() => [
1865
- C(Wn, null, {
1863
+ C(qn, null, {
1866
1864
  default: B(() => [
1867
1865
  C(H, {
1868
1866
  modelValue: c.group.min,
1869
- "onUpdate:modelValue": P[1] || (P[1] = (L) => c.group.min = L),
1867
+ "onUpdate:modelValue": $[1] || ($[1] = (L) => c.group.min = L),
1870
1868
  disabled: E("min"),
1871
1869
  min: 0,
1872
1870
  class: "flex-1",
@@ -1874,7 +1872,7 @@ const Vr = /* @__PURE__ */ le({
1874
1872
  }, null, 8, ["modelValue", "disabled", "label"]),
1875
1873
  C(H, {
1876
1874
  modelValue: c.group.max,
1877
- "onUpdate:modelValue": P[2] || (P[2] = (L) => c.group.max = L),
1875
+ "onUpdate:modelValue": $[2] || ($[2] = (L) => c.group.max = L),
1878
1876
  disabled: E("max"),
1879
1877
  min: c.group.min,
1880
1878
  class: "flex-1",
@@ -1886,7 +1884,7 @@ const Vr = /* @__PURE__ */ le({
1886
1884
  ]),
1887
1885
  _: 1
1888
1886
  }, 8, ["model-value", "rules"]),
1889
- S.value.type ? ($(), J(Ue, {
1887
+ S.value.type ? (P(), J(Ue, {
1890
1888
  key: 0,
1891
1889
  label: n(f)("menu.common.labels.group_type")
1892
1890
  }, {
@@ -1894,10 +1892,10 @@ const Vr = /* @__PURE__ */ le({
1894
1892
  C(pe, {
1895
1893
  disabled: E("type"),
1896
1894
  "model-value": c.group.type,
1897
- "onUpdate:modelValue": P[3] || (P[3] = (L) => U(L))
1895
+ "onUpdate:modelValue": $[3] || ($[3] = (L) => U(L))
1898
1896
  }, {
1899
1897
  default: B(() => [
1900
- ($(!0), Z(Oe, null, Ne(m.value, (L) => ($(), J(ie, {
1898
+ (P(!0), Z(Oe, null, Ne(m.value, (L) => (P(), J(ie, {
1901
1899
  key: L.value,
1902
1900
  label: n(f)(`menu.group.types.${L.label.toLowerCase()}`),
1903
1901
  value: L.value
@@ -1914,7 +1912,7 @@ const Vr = /* @__PURE__ */ le({
1914
1912
  default: B(() => [
1915
1913
  C(d, {
1916
1914
  modelValue: c.group.stackable,
1917
- "onUpdate:modelValue": P[4] || (P[4] = (L) => c.group.stackable = L),
1915
+ "onUpdate:modelValue": $[4] || ($[4] = (L) => c.group.stackable = L),
1918
1916
  disabled: E("stackable"),
1919
1917
  label: n(f)("menu.common.labels.stackable"),
1920
1918
  "label-placement": "right",
@@ -1923,13 +1921,13 @@ const Vr = /* @__PURE__ */ le({
1923
1921
  ]),
1924
1922
  _: 1
1925
1923
  }, 8, ["label"]),
1926
- l.value ? ($(), J(D, {
1924
+ l.value ? (P(), J(D, {
1927
1925
  key: 1,
1928
1926
  title: n(f)("menu.group.form.tagging.title"),
1929
1927
  "sub-title": n(f)("menu.group.form.tagging.subtitle")
1930
1928
  }, {
1931
1929
  default: B(() => [
1932
- C(n(an), {
1930
+ C(n(ln), {
1933
1931
  entity: "group",
1934
1932
  "model-value": c.group.customAttributes || {},
1935
1933
  "onUpdate:modelValue": y,
@@ -1951,13 +1949,13 @@ const Vr = /* @__PURE__ */ le({
1951
1949
  })
1952
1950
  }, {
1953
1951
  default: B(() => [
1954
- C(Nr, {
1952
+ C(Lr, {
1955
1953
  "allow-refund-inventory": c.allowRefundInventory ?? !1,
1956
1954
  "categorized-items": c.categorizedItems,
1957
1955
  config: S.value,
1958
1956
  group: c.group,
1959
- "onUpdate:group": P[5] || (P[5] = (L) => T(L)),
1960
- "onUpdate:unmapGroup": P[6] || (P[6] = (L) => T(M(L)))
1957
+ "onUpdate:group": $[5] || ($[5] = (L) => T(L)),
1958
+ "onUpdate:unmapGroup": $[6] || ($[6] = (L) => T(R(L)))
1961
1959
  }, null, 8, ["allow-refund-inventory", "categorized-items", "config", "group"])
1962
1960
  ]),
1963
1961
  _: 1
@@ -1969,7 +1967,7 @@ const Vr = /* @__PURE__ */ le({
1969
1967
  ], 64);
1970
1968
  };
1971
1969
  }
1972
- }), Br = { class: "fm-typo-en-title-sm-600" }, zr = { class: "flex items-end space-x-24" }, Yr = { class: "flex" }, jr = /* @__PURE__ */ le({
1970
+ }), zr = { class: "fm-typo-en-title-sm-600" }, Yr = { class: "flex items-end space-x-24" }, jr = { class: "flex" }, Wr = /* @__PURE__ */ le({
1973
1971
  __name: "UpdateForm",
1974
1972
  props: {
1975
1973
  combinations: {},
@@ -1978,8 +1976,8 @@ const Vr = /* @__PURE__ */ le({
1978
1976
  },
1979
1977
  emits: ["update:combinations"],
1980
1978
  setup(t, { expose: r, emit: e }) {
1981
- var U, M;
1982
- const o = t, s = e, i = ue(), p = Ge(), h = Vt(nt(Re())), b = q([]), _ = q(o.combinations[0].combinationKey || ""), w = V(
1979
+ var U, R;
1980
+ const o = t, s = e, i = ue(), p = Ge(), h = Vt(nt(Me())), b = q([]), _ = q(o.combinations[0].combinationKey || ""), w = V(
1983
1981
  () => b.value.findIndex((O) => O.combinationKey == _.value)
1984
1982
  ), v = V(
1985
1983
  () => o.combinations.map((O) => ({
@@ -1996,8 +1994,8 @@ const Vr = /* @__PURE__ */ le({
1996
1994
  ...x,
1997
1995
  ...Object.fromEntries(k),
1998
1996
  items: x.items.map((f) => {
1999
- var P;
2000
- const c = (P = O.items) == null ? void 0 : P.find(
1997
+ var $;
1998
+ const c = ($ = O.items) == null ? void 0 : $.find(
2001
1999
  (G) => G._id == f._id && G.combinationKey == f.combinationKey
2002
2000
  );
2003
2001
  return {
@@ -2009,30 +2007,30 @@ const Vr = /* @__PURE__ */ le({
2009
2007
  };
2010
2008
  })
2011
2009
  };
2012
- return new tn(i, h.updateMenu, p).mapGroups([l], !0)[0];
2010
+ return new nn(i, h.updateMenu, p).mapGroups([l], !0)[0];
2013
2011
  });
2014
2012
  function a(O) {
2015
2013
  var l, u;
2016
- const R = (l = b.value[w.value].groups) == null ? void 0 : l.findIndex(
2014
+ const M = (l = b.value[w.value].groups) == null ? void 0 : l.findIndex(
2017
2015
  (y) => y._id === o.groupId
2018
- ), x = fe(b.value), k = { ...en(O), _id: o.groupId, groupKey: "" };
2019
- (R ?? -1) < 0 ? x[w.value] = {
2016
+ ), x = fe(b.value), k = { ...tn(O), _id: o.groupId, groupKey: "" };
2017
+ (M ?? -1) < 0 ? x[w.value] = {
2020
2018
  ...x[w.value],
2021
2019
  groups: [...((u = x[w.value]) == null ? void 0 : u.groups) || [], k]
2022
- } : x[w.value].groups[R] = k, b.value = x;
2020
+ } : x[w.value].groups[M] = k, b.value = x;
2023
2021
  }
2024
2022
  function I(O) {
2025
- const R = v.value.length;
2023
+ const M = v.value.length;
2026
2024
  let x = w.value;
2027
- O === "left" ? x = x === 0 ? R - 1 : x - 1 : x = x === R - 1 ? 0 : x + 1, _.value = v.value[x].value;
2025
+ O === "left" ? x = x === 0 ? M - 1 : x - 1 : x = x === M - 1 ? 0 : x + 1, _.value = v.value[x].value;
2028
2026
  }
2029
2027
  function S(O) {
2030
2028
  return {
2031
2029
  isV4: i.version === oe.F_MENU_VERSION.enum.v4,
2032
- isDefault: (R) => !1,
2033
- link: (R) => !1,
2034
- orderFrom: (R) => !0,
2035
- name: (R) => !1,
2030
+ isDefault: (M) => !1,
2031
+ link: (M) => !1,
2032
+ orderFrom: (M) => !0,
2033
+ name: (M) => !1,
2036
2034
  bindToVariant: !1,
2037
2035
  inventory: !0,
2038
2036
  orderFromActiveOnly: i.rules.item.orderFromActiveOnly,
@@ -2046,12 +2044,12 @@ const Vr = /* @__PURE__ */ le({
2046
2044
  };
2047
2045
  }
2048
2046
  function F() {
2049
- const O = b.value.map((R) => {
2047
+ const O = b.value.map((M) => {
2050
2048
  var x;
2051
2049
  return {
2052
- ...R,
2053
- groups: (x = R.groups) == null ? void 0 : x.map((k) => ({
2054
- ...Hn(k, S())
2050
+ ...M,
2051
+ groups: (x = M.groups) == null ? void 0 : x.map((k) => ({
2052
+ ...Xn(k, S())
2055
2053
  }))
2056
2054
  };
2057
2055
  });
@@ -2067,12 +2065,12 @@ const Vr = /* @__PURE__ */ le({
2067
2065
  const m = q();
2068
2066
  r({
2069
2067
  show: (U = m.value) == null ? void 0 : U.show,
2070
- trigger: (M = m.value) == null ? void 0 : M.trigger
2068
+ trigger: (R = m.value) == null ? void 0 : R.trigger
2071
2069
  });
2072
2070
  const { t: T } = me();
2073
- return (O, R) => {
2071
+ return (O, M) => {
2074
2072
  const x = j("fm-select"), k = j("fm-button"), l = j("fm-card");
2075
- return $(), J(kn, {
2073
+ return P(), J(In, {
2076
2074
  ref_key: "baseFormRef",
2077
2075
  ref: m,
2078
2076
  "allow-refund-inventory": !0,
@@ -2081,40 +2079,40 @@ const Vr = /* @__PURE__ */ le({
2081
2079
  group: g.value,
2082
2080
  action: "update",
2083
2081
  title: n(T)("menu.group.update"),
2084
- "onUpdate:group": R[3] || (R[3] = (u) => a(u)),
2085
- "onSubmit:group": R[4] || (R[4] = (u) => F()),
2086
- "onStatus:show": R[5] || (R[5] = (u) => E.value = u)
2082
+ "onUpdate:group": M[3] || (M[3] = (u) => a(u)),
2083
+ "onSubmit:group": M[4] || (M[4] = (u) => F()),
2084
+ "onStatus:show": M[5] || (M[5] = (u) => E.value = u)
2087
2085
  }, {
2088
2086
  default: B(({ trigger: u }) => [
2089
- Me(O.$slots, "default", { trigger: u })
2087
+ Re(O.$slots, "default", { trigger: u })
2090
2088
  ]),
2091
2089
  "variant-section": B(() => [
2092
- _.value ? ($(), J(l, {
2090
+ _.value ? (P(), J(l, {
2093
2091
  key: 0,
2094
2092
  class: "p-16 bg-fm-color-neutral-gray-100 space-y-24",
2095
2093
  variant: "outlined"
2096
2094
  }, {
2097
2095
  default: B(() => [
2098
- A("p", Br, be(n(T)("menu.group.option.variant")), 1),
2099
- A("div", zr, [
2096
+ A("p", zr, be(n(T)("menu.group.option.variant")), 1),
2097
+ A("div", Yr, [
2100
2098
  C(x, {
2101
2099
  modelValue: _.value,
2102
- "onUpdate:modelValue": R[0] || (R[0] = (u) => _.value = u),
2100
+ "onUpdate:modelValue": M[0] || (M[0] = (u) => _.value = u),
2103
2101
  items: v.value,
2104
2102
  class: "flex-1"
2105
2103
  }, null, 8, ["modelValue", "items"]),
2106
- A("div", Yr, [
2104
+ A("div", jr, [
2107
2105
  C(k, {
2108
2106
  variant: n(We).Tertiary,
2109
2107
  "prepend-icon": "keyboard_arrow_left",
2110
2108
  size: "lg",
2111
- onClick: R[1] || (R[1] = (u) => I("left"))
2109
+ onClick: M[1] || (M[1] = (u) => I("left"))
2112
2110
  }, null, 8, ["variant"]),
2113
2111
  C(k, {
2114
2112
  variant: n(We).Tertiary,
2115
2113
  "prepend-icon": "keyboard_arrow_right",
2116
2114
  size: "lg",
2117
- onClick: R[2] || (R[2] = (u) => I("right"))
2115
+ onClick: M[2] || (M[2] = (u) => I("right"))
2118
2116
  }, null, 8, ["variant"])
2119
2117
  ])
2120
2118
  ])
@@ -2126,25 +2124,25 @@ const Vr = /* @__PURE__ */ le({
2126
2124
  }, 8, ["categorized-items", "group", "title"]);
2127
2125
  };
2128
2126
  }
2129
- }), Wr = kn, jt = $r, qr = jr, Hr = {
2127
+ }), qr = In, jt = Ur, Hr = Wr, Xr = {
2130
2128
  key: 0,
2131
2129
  class: "flex flex-col space-y-16 h-[440px]"
2132
- }, Xr = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Jr = { class: "flex justify-between pb-16" }, Qr = { class: "flex gap-8" }, Zr = {
2130
+ }, Jr = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Qr = { class: "flex justify-between pb-16" }, Zr = { class: "flex gap-8" }, ea = {
2133
2131
  key: 1,
2134
2132
  class: "flex flex-col items-center space-y-16"
2135
- }, ea = { class: "flex flex-col items-center space-y-4 w-full" }, ta = { class: "fm-typo-en-title-sm-600" }, na = { class: "text-fm-color-typo-secondary" }, oa = /* @__PURE__ */ le({
2133
+ }, ta = { class: "flex flex-col items-center space-y-4 w-full" }, na = { class: "fm-typo-en-title-sm-600" }, oa = { class: "text-fm-color-typo-secondary" }, ra = /* @__PURE__ */ le({
2136
2134
  __name: "SelectGroupDialog",
2137
2135
  props: {
2138
2136
  groupIds: {}
2139
2137
  },
2140
2138
  setup(t) {
2141
- const r = t, e = Ge(), { emitData: o, emitAction: s } = $t(), i = ue(), p = V(() => i.rules.group), h = V(() => i.groups);
2139
+ const r = t, e = Ge(), { emitData: o, emitAction: s } = Pt(), i = ue(), p = V(() => i.rules.group), h = V(() => i.groups);
2142
2140
  function b(F) {
2143
2141
  return fe(F ?? []).sort((m, T) => m.position - T.position);
2144
2142
  }
2145
2143
  const _ = V(() => b(h.value).reduce((F, E) => (F[E._id] = {
2146
2144
  name: E.name,
2147
- type: nn(i.items, E.items)
2145
+ type: on(i.items, E.items)
2148
2146
  }, F), {})), w = V(() => [
2149
2147
  ...Object.entries(_.value).map(([F, { name: E, type: m }]) => ({
2150
2148
  label: `${E} ${p.value.type ? `(${Tt(m)})` : ""}`.trim(),
@@ -2155,15 +2153,15 @@ const Vr = /* @__PURE__ */ le({
2155
2153
  const F = !i.state.currentSchedulerId, E = i.rules.group.type, m = i.version == oe.F_MENU_VERSION.enum.v3, T = i.rules.item.orderFromActiveOnly, U = i.rules.item.bindToVariant;
2156
2154
  return function(O) {
2157
2155
  return {
2158
- isDefault: (R) => !v.value && !R,
2159
- link: (R) => !v.value && (!R || U),
2160
- name: (R) => !v.value && !R,
2156
+ isDefault: (M) => !v.value && !M,
2157
+ link: (M) => !v.value && (!M || U),
2158
+ name: (M) => !v.value && !M,
2161
2159
  type: E && !O._id && !v.value,
2162
2160
  price: O.type != oe.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
2163
2161
  priceEdit: !0,
2164
2162
  priceTier: i.isV4,
2165
2163
  inventory: F ? m ? !v.value && O.type == oe.F_ADDON_GROUP_TYPE.enum.NORMAL : !v.value : !1,
2166
- orderFrom: (R) => F ? m ? O.type == oe.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? v.value : !!v.value == !R : v.value : !1,
2164
+ orderFrom: (M) => F ? m ? O.type == oe.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? v.value : !!v.value == !M : v.value : !1,
2167
2165
  orderFromActiveOnly: T,
2168
2166
  showOrderFrom: F ? m ? v.value ? !0 : O.type == oe.F_ADDON_GROUP_TYPE.enum.PRODUCT : v.value : !1,
2169
2167
  bindToVariant: U,
@@ -2184,19 +2182,19 @@ const Vr = /* @__PURE__ */ le({
2184
2182
  };
2185
2183
  return (F, E) => {
2186
2184
  const m = j("FmSearch"), T = j("FmCheckbox"), U = j("FmButton");
2187
- return w.value.length > 0 ? ($(), Z("div", Hr, [
2185
+ return w.value.length > 0 ? (P(), Z("div", Xr, [
2188
2186
  A("div", null, [
2189
2187
  C(m, {
2190
2188
  autofocus: "",
2191
2189
  modelValue: a.value,
2192
- "onUpdate:modelValue": E[0] || (E[0] = (M) => a.value = M),
2190
+ "onUpdate:modelValue": E[0] || (E[0] = (R) => a.value = R),
2193
2191
  placeholder: n(I)("menu.common.labels.search_groups")
2194
2192
  }, null, 8, ["modelValue", "placeholder"])
2195
2193
  ]),
2196
- A("div", Xr, [
2194
+ A("div", Jr, [
2197
2195
  A("div", null, [
2198
- ($(!0), Z(Oe, null, Ne(w.value, (M) => ($(), Z("div", {
2199
- key: M.value
2196
+ (P(!0), Z(Oe, null, Ne(w.value, (R) => (P(), Z("div", {
2197
+ key: R.value
2200
2198
  }, [
2201
2199
  pt(C(T, {
2202
2200
  modelValue: g.value,
@@ -2204,49 +2202,49 @@ const Vr = /* @__PURE__ */ le({
2204
2202
  E[1] || (E[1] = (O) => g.value = O),
2205
2203
  E[2] || (E[2] = (O) => n(o)(g.value))
2206
2204
  ],
2207
- label: M.label,
2208
- value: M.value
2205
+ label: R.label,
2206
+ value: R.value
2209
2207
  }, null, 8, ["modelValue", "label", "value"]), [
2210
- [Jt, M.label.toLowerCase().includes(a.value.toLowerCase())]
2208
+ [Jt, R.label.toLowerCase().includes(a.value.toLowerCase())]
2211
2209
  ])
2212
2210
  ]))), 128))
2213
2211
  ])
2214
2212
  ]),
2215
- A("div", Jr, [
2213
+ A("div", Qr, [
2216
2214
  C(n(jt), null, {
2217
- default: B(({ trigger: M }) => [
2215
+ default: B(({ trigger: R }) => [
2218
2216
  C(U, {
2219
2217
  label: n(I)("menu.common.actions.add_group"),
2220
2218
  variant: "tertiary",
2221
2219
  "text-color": "primary",
2222
- onClick: (O) => M()
2220
+ onClick: (O) => R()
2223
2221
  }, null, 8, ["label", "onClick"])
2224
2222
  ]),
2225
2223
  _: 1
2226
2224
  }),
2227
- A("div", Qr, [
2225
+ A("div", Zr, [
2228
2226
  C(U, {
2229
2227
  label: n(I)("menu.common.actions.cancel"),
2230
2228
  variant: "tertiary",
2231
- onClick: E[3] || (E[3] = (M) => n(e).close())
2229
+ onClick: E[3] || (E[3] = (R) => n(e).close())
2232
2230
  }, null, 8, ["label"]),
2233
2231
  C(U, {
2234
2232
  label: n(I)("menu.common.actions.confirm"),
2235
- onClick: E[4] || (E[4] = (M) => S())
2233
+ onClick: E[4] || (E[4] = (R) => S())
2236
2234
  }, null, 8, ["label"])
2237
2235
  ])
2238
2236
  ])
2239
- ])) : ($(), Z("div", Zr, [
2240
- A("div", ea, [
2241
- A("p", ta, be(n(I)("menu.common.empty.no_group.title")), 1),
2242
- A("p", na, be(n(I)("menu.common.empty.no_group.subtitle")), 1)
2237
+ ])) : (P(), Z("div", ea, [
2238
+ A("div", ta, [
2239
+ A("p", na, be(n(I)("menu.common.empty.no_group.title")), 1),
2240
+ A("p", oa, be(n(I)("menu.common.empty.no_group.subtitle")), 1)
2243
2241
  ]),
2244
2242
  C(n(jt), null, {
2245
- default: B(({ trigger: M }) => [
2243
+ default: B(({ trigger: R }) => [
2246
2244
  C(U, {
2247
2245
  label: n(I)("menu.common.actions.add_group"),
2248
2246
  icon: "add",
2249
- onClick: (O) => M()
2247
+ onClick: (O) => R()
2250
2248
  }, null, 8, ["label", "onClick"])
2251
2249
  ]),
2252
2250
  _: 1
@@ -2254,7 +2252,7 @@ const Vr = /* @__PURE__ */ le({
2254
2252
  ]));
2255
2253
  };
2256
2254
  }
2257
- }), ra = /* @__PURE__ */ le({
2255
+ }), aa = /* @__PURE__ */ le({
2258
2256
  __name: "ProductGroup",
2259
2257
  props: {
2260
2258
  isOverride: {
@@ -2276,7 +2274,7 @@ const Vr = /* @__PURE__ */ le({
2276
2274
  } = me(), p = r, h = V(() => o.rules.group), b = V(() => o.rules.item), _ = V(() => o.groups);
2277
2275
  function w(l, u) {
2278
2276
  return fe(u ?? []).map((f) => {
2279
- const c = l.find((P) => P._id === f._id);
2277
+ const c = l.find(($) => $._id === f._id);
2280
2278
  return {
2281
2279
  name: (c == null ? void 0 : c.name) ?? "",
2282
2280
  ...f,
@@ -2299,22 +2297,22 @@ const Vr = /* @__PURE__ */ le({
2299
2297
  return u.items.forEach((c) => {
2300
2298
  if (c.combinationKey)
2301
2299
  return;
2302
- const P = o.items.find((H) => H._id === c._id), G = u.items.filter((H) => H._id === c._id && H.combinationKey).length;
2300
+ const $ = o.items.find((H) => H._id === c._id), G = u.items.filter((H) => H._id === c._id && H.combinationKey).length;
2303
2301
  y.push({
2304
- code: c.code || (P == null ? void 0 : P.code),
2305
- name: c.name || (P == null ? void 0 : P.name),
2302
+ code: c.code || ($ == null ? void 0 : $.code),
2303
+ name: c.name || ($ == null ? void 0 : $.name),
2306
2304
  variantCount: G
2307
2305
  });
2308
2306
  }), y.map((c) => {
2309
- const P = [(c == null ? void 0 : c.code) || "", (c == null ? void 0 : c.name) || ""].join(" ").trim();
2310
- return (c.variantCount || 0) > 1 ? `${P} (${i("menu.group.list.variants", {
2307
+ const $ = [(c == null ? void 0 : c.code) || "", (c == null ? void 0 : c.name) || ""].join(" ").trim();
2308
+ return (c.variantCount || 0) > 1 ? `${$} (${i("menu.group.list.variants", {
2311
2309
  count: c.variantCount
2312
- })})` : P;
2310
+ })})` : $;
2313
2311
  });
2314
2312
  }
2315
2313
  const I = V(() => g(_.value).reduce((l, u) => (l[u._id] = {
2316
2314
  name: u.name,
2317
- type: nn(o.items, u.items)
2315
+ type: on(o.items, u.items)
2318
2316
  }, l), {})), S = V(() => [...Object.entries(I.value).map(([l, {
2319
2317
  name: u,
2320
2318
  type: y
@@ -2380,7 +2378,7 @@ const Vr = /* @__PURE__ */ le({
2380
2378
  onClick: qe(async () => {
2381
2379
  U(u);
2382
2380
  }, ["stop", "prevent"])
2383
- }), _e(qr, {
2381
+ }), _e(Hr, {
2384
2382
  // variant items
2385
2383
  combinations: O.value ?? [],
2386
2384
  // combinationKey: varaintName
@@ -2394,7 +2392,7 @@ const Vr = /* @__PURE__ */ le({
2394
2392
  id: mt(Se.GROUP, u),
2395
2393
  icon: "edit",
2396
2394
  variant: "tertiary",
2397
- disabled: !R(u),
2395
+ disabled: !M(u),
2398
2396
  textColor: "neutral-gray-400",
2399
2397
  onClick: y
2400
2398
  })
@@ -2406,7 +2404,7 @@ const Vr = /* @__PURE__ */ le({
2406
2404
  function m() {
2407
2405
  s.open({
2408
2406
  title: i("menu.product.form.group.add"),
2409
- contentComponent: oa,
2407
+ contentComponent: ra,
2410
2408
  contentComponentProps: {
2411
2409
  groupIds: v.value
2412
2410
  }
@@ -2416,8 +2414,8 @@ const Vr = /* @__PURE__ */ le({
2416
2414
  }
2417
2415
  function T(l) {
2418
2416
  const u = l.reduce((y, f) => {
2419
- var P;
2420
- const c = ((P = e.form.groups) == null ? void 0 : P.find((G) => G._id === f)) || {
2417
+ var $;
2418
+ const c = (($ = e.form.groups) == null ? void 0 : $.find((G) => G._id === f)) || {
2421
2419
  _id: f,
2422
2420
  groupKey: ""
2423
2421
  };
@@ -2433,26 +2431,26 @@ const Vr = /* @__PURE__ */ le({
2433
2431
  if (!e.form.groups)
2434
2432
  return;
2435
2433
  const u = fe(e.form.groups);
2436
- u.splice(u.findIndex((P) => P._id === l), 1);
2437
- for (const P of ((y = e.form.variant) == null ? void 0 : y.variantCombinations) || [])
2438
- (c = P.groups) == null || c.splice((f = P.groups) == null ? void 0 : f.findIndex((G) => G._id === l), 1);
2434
+ u.splice(u.findIndex(($) => $._id === l), 1);
2435
+ for (const $ of ((y = e.form.variant) == null ? void 0 : y.variantCombinations) || [])
2436
+ (c = $.groups) == null || c.splice((f = $.groups) == null ? void 0 : f.findIndex((G) => G._id === l), 1);
2439
2437
  p("replace:form", Nt(o, {
2440
2438
  ...e.form,
2441
2439
  groups: u
2442
2440
  }));
2443
2441
  }
2444
- const M = V(() => {
2442
+ const R = V(() => {
2445
2443
  var l;
2446
2444
  return !!((l = e.form.variant) != null && l.variantGroupIds.length);
2447
2445
  }), O = V(() => {
2448
2446
  var l;
2449
- return M.value ? (l = e.form.variant) == null ? void 0 : l.variantCombinations : [{
2447
+ return R.value ? (l = e.form.variant) == null ? void 0 : l.variantCombinations : [{
2450
2448
  _id: e.form._id,
2451
2449
  combinationKey: "",
2452
2450
  groups: e.form.groups || []
2453
2451
  }];
2454
2452
  });
2455
- function R(l) {
2453
+ function M(l) {
2456
2454
  var y;
2457
2455
  if (!l) return !1;
2458
2456
  if (b.value.overrideProductGroup) return !0;
@@ -2473,14 +2471,14 @@ const Vr = /* @__PURE__ */ le({
2473
2471
  return (u = S.value.find((y) => y.value === l)) == null ? void 0 : u.label;
2474
2472
  }, k = (l) => {
2475
2473
  var u;
2476
- M.value ? p("update:form", "variant", {
2474
+ R.value ? p("update:form", "variant", {
2477
2475
  variantGroupIds: ((u = e.form.variant) == null ? void 0 : u.variantGroupIds) || [],
2478
2476
  variantCombinations: l
2479
2477
  }) : p("update:form", "groups", l[0].groups || []);
2480
2478
  };
2481
2479
  return (l, u) => {
2482
2480
  const y = j("FmButton"), f = j("FmTable");
2483
- return $(), J(De, {
2481
+ return P(), J(De, {
2484
2482
  title: n(i)("menu.product.form.group.title"),
2485
2483
  "sub-title": n(i)("menu.product.form.group.subtitle"),
2486
2484
  id: n(Se).GROUP
@@ -2492,15 +2490,15 @@ const Vr = /* @__PURE__ */ le({
2492
2490
  variant: "secondary",
2493
2491
  onClick: m
2494
2492
  }, null, 8, ["label"])]),
2495
- default: B(() => [C(on, null, {
2493
+ default: B(() => [C(rn, null, {
2496
2494
  default: B(() => {
2497
2495
  var c;
2498
- return [((c = v.value) == null ? void 0 : c.length) > 0 ? ($(), J(f, {
2496
+ return [((c = v.value) == null ? void 0 : c.length) > 0 ? (P(), J(f, {
2499
2497
  key: 0,
2500
2498
  "column-defs": F.value,
2501
2499
  "column-visibility": E.value,
2502
- "row-data": v.value.map((P) => ({
2503
- _id: P
2500
+ "row-data": v.value.map(($) => ({
2501
+ _id: $
2504
2502
  })),
2505
2503
  "page-size": v.value.length,
2506
2504
  "hide-footer": "",
@@ -2514,11 +2512,11 @@ const Vr = /* @__PURE__ */ le({
2514
2512
  }, 8, ["title", "sub-title", "id"]);
2515
2513
  };
2516
2514
  }
2517
- }), aa = {
2515
+ }), la = {
2518
2516
  class: "xs:overflow-x-scroll"
2519
- }, la = {
2517
+ }, ia = {
2520
2518
  class: "xs:min-w-[640px]"
2521
- }, ia = /* @__PURE__ */ le({
2519
+ }, sa = /* @__PURE__ */ le({
2522
2520
  __name: "ProductInventory",
2523
2521
  props: {
2524
2522
  isOverride: {
@@ -2545,7 +2543,7 @@ const Vr = /* @__PURE__ */ le({
2545
2543
  binding: S || []
2546
2544
  }] : F.map((T) => ({
2547
2545
  _id: T.combinationKey || "",
2548
- name: ln(T.combinationKey || "", m),
2546
+ name: sn(T.combinationKey || "", m),
2549
2547
  binding: T.inventoryBindings || []
2550
2548
  }));
2551
2549
  }
@@ -2557,18 +2555,18 @@ const Vr = /* @__PURE__ */ le({
2557
2555
  return b(o.form.inventoryBindings || [], ((S = o.form.variant) == null ? void 0 : S.variantCombinations) || [], _.value, i.variants);
2558
2556
  });
2559
2557
  function v(S, F) {
2560
- var U, M;
2558
+ var U, R;
2561
2559
  let E = Ie.clone(o.form);
2562
2560
  const m = E.variant;
2563
2561
  if ((((U = m == null ? void 0 : m.variantCombinations) == null ? void 0 : U.length) ?? 0) > 0 && m) {
2564
2562
  const O = m.variantCombinations.findIndex((x) => x.combinationKey === S);
2565
2563
  if (O < 0) return;
2566
- const R = Ie.clone(m.variantCombinations);
2567
- R[O].inventoryBindings = F, E = {
2564
+ const M = Ie.clone(m.variantCombinations);
2565
+ M[O].inventoryBindings = F, E = {
2568
2566
  ...E,
2569
2567
  variant: {
2570
- variantGroupIds: ((M = E.variant) == null ? void 0 : M.variantGroupIds) || [],
2571
- variantCombinations: R
2568
+ variantGroupIds: ((R = E.variant) == null ? void 0 : R.variantGroupIds) || [],
2569
+ variantCombinations: M
2572
2570
  }
2573
2571
  };
2574
2572
  } else
@@ -2638,14 +2636,14 @@ const Vr = /* @__PURE__ */ le({
2638
2636
  for (const F of g.value)
2639
2637
  F.getKey() === S && F.trigger(!0);
2640
2638
  }
2641
- const I = Eo();
2639
+ const I = To();
2642
2640
  return Ae(() => {
2643
2641
  I.readInventory();
2644
- }), (S, F) => ($(), J(De, {
2642
+ }), (S, F) => (P(), J(De, {
2645
2643
  title: n(e)("menu.inventory.title"),
2646
2644
  subTitle: n(e)("menu.inventory.subtitle")
2647
2645
  }, {
2648
- default: B(() => [A("div", aa, [A("div", la, [($(!0), Z(Oe, null, Ne(w.value, (E) => ($(), J(n(Et), {
2646
+ default: B(() => [A("div", la, [A("div", ia, [(P(!0), Z(Oe, null, Ne(w.value, (E) => (P(), J(n(Et), {
2649
2647
  key: E._id,
2650
2648
  ref_for: !0,
2651
2649
  ref_key: "inventoryManagerForms",
@@ -2659,26 +2657,26 @@ const Vr = /* @__PURE__ */ le({
2659
2657
  "onUpdate:inventory": (m) => {
2660
2658
  v(E._id, m);
2661
2659
  }
2662
- }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), C(n(To), {
2660
+ }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), C(n(xo), {
2663
2661
  "row-data": w.value,
2664
2662
  onRowClick: a
2665
2663
  }, null, 8, ["row-data"])])])]),
2666
2664
  _: 1
2667
2665
  }, 8, ["title", "subTitle"]));
2668
2666
  }
2669
- }), sa = ["id"], ua = { class: "space-y-16" }, da = { class: "space-y-8" }, ca = {
2667
+ }), ua = ["id"], da = { class: "space-y-16" }, ca = { class: "space-y-8" }, ma = {
2670
2668
  key: 0,
2671
2669
  class: "pl-32 pb-4 space-x-16 flex items-center"
2672
- }, ma = { class: "fm-typo-en-body-lg-400" }, pa = { class: "w-[258px]" }, fa = { class: "w-[117px]" }, ga = {
2670
+ }, pa = { class: "fm-typo-en-body-lg-400" }, fa = { class: "w-[258px]" }, ga = { class: "w-[117px]" }, va = {
2673
2671
  key: 0,
2674
2672
  class: "space-y-8"
2675
- }, va = {
2673
+ }, ba = {
2676
2674
  key: 0,
2677
2675
  class: "pl-32 pb-4 flex space-x-16"
2678
- }, ba = { class: "w-[258px] xs:w-full" }, _a = {
2676
+ }, _a = { class: "w-[258px] xs:w-full" }, ya = {
2679
2677
  key: 1,
2680
2678
  class: "space-y-8"
2681
- }, ya = { class: "pl-32 pb-4 flex space-x-16" }, ha = { class: "w-[258px] xs:w-full" }, wa = /* @__PURE__ */ le({
2679
+ }, ha = { class: "pl-32 pb-4 flex space-x-16" }, wa = { class: "w-[258px] xs:w-full" }, Ca = /* @__PURE__ */ le({
2682
2680
  __name: "ProductPrice",
2683
2681
  props: {
2684
2682
  isOverride: { type: Boolean },
@@ -2689,8 +2687,8 @@ const Vr = /* @__PURE__ */ le({
2689
2687
  emits: ["update:form"],
2690
2688
  setup(t, { emit: r }) {
2691
2689
  const e = t, o = ot(), s = ue(), { t: i } = me(), p = r, h = V(() => s.rules.item), b = V(() => {
2692
- var U, M;
2693
- const m = e.isOverride ? ((U = e.fallback) == null ? void 0 : U.unit) ?? ((M = e.fallback) == null ? void 0 : M.perXUnit) : void 0, T = e.form.unit ?? e.form.perXUnit ?? m;
2690
+ var U, R;
2691
+ const m = e.isOverride ? ((U = e.fallback) == null ? void 0 : U.unit) ?? ((R = e.fallback) == null ? void 0 : R.perXUnit) : void 0, T = e.form.unit ?? e.form.perXUnit ?? m;
2694
2692
  return T != null;
2695
2693
  }), _ = (m) => {
2696
2694
  p("update:form", "unit", m ? "" : void 0), p("update:form", "perXUnit", m ? 0 : void 0);
@@ -2719,9 +2717,13 @@ const Vr = /* @__PURE__ */ le({
2719
2717
  }
2720
2718
  }
2721
2719
  }
2722
- const I = sn();
2720
+ const I = un();
2721
+ Qt("apply-pricing", (m) => {
2722
+ p("update:form", "price", ye.Dinero.fromNumber({ number: m }).toObject());
2723
+ });
2723
2724
  async function S() {
2724
- if (!(e.form.name || "")) {
2725
+ const m = e.form.name || "";
2726
+ if (!m) {
2725
2727
  const T = document.getElementById("product-name");
2726
2728
  if (T) {
2727
2729
  T.focus();
@@ -2730,26 +2732,17 @@ const Vr = /* @__PURE__ */ le({
2730
2732
  return;
2731
2733
  }
2732
2734
  o.pushDataLayer({ event: "menu_catalog_item_price_remy_suggest_pricing" }), I.activate({
2733
- command: "suggestPrice",
2734
- context: { itemName: "ABC Soup" },
2735
- onResult: (T) => {
2736
- p(
2737
- "update:form",
2738
- "price",
2739
- ye.Dinero.fromNumber({
2740
- number: T.price
2741
- }).toObject()
2742
- ), p("update:form", "_priceTrackingId", T.trackingId);
2743
- }
2735
+ prompt: `Suggest a price for ${m}`,
2736
+ command: "suggestPrice"
2744
2737
  });
2745
2738
  }
2746
- const F = xo(s), E = V(() => {
2739
+ const F = So(s), E = V(() => {
2747
2740
  var m, T;
2748
2741
  return ((m = s.currentCatalog) == null ? void 0 : m.priceTierRules) ?? ((T = s.currentCatalog) == null ? void 0 : T.usePriceTiers) ?? [];
2749
2742
  });
2750
2743
  return (m, T) => {
2751
- const U = j("fm-select"), M = j("FmButton"), O = j("fm-checkbox"), R = j("fm-text-field"), x = Xt("tooltip");
2752
- return $(), J(De, {
2744
+ const U = j("fm-select"), R = j("FmButton"), O = j("fm-checkbox"), M = j("fm-text-field"), x = Xt("tooltip");
2745
+ return P(), J(De, {
2753
2746
  title: n(i)("menu.product.form.price.title")
2754
2747
  }, {
2755
2748
  default: B(() => {
@@ -2766,18 +2759,18 @@ const Vr = /* @__PURE__ */ le({
2766
2759
  placeholder: (k = m.fallback) != null && k.price ? n(et)(m.fallback.price, !1) : void 0,
2767
2760
  rules: [
2768
2761
  h.value.price ? (l) => !!l || n(i)("menu.product.form.price.fields.selling_price.required") : void 0
2769
- ].filter(n(Rt).isSet),
2762
+ ].filter(n(Mt).isSet),
2770
2763
  class: "w-[258px] xs:w-full",
2771
2764
  label: n(i)("menu.product.form.price.fields.selling_price.label"),
2772
2765
  "show-currency": "",
2773
2766
  "onUpdate:modelValue": T[0] || (T[0] = (l) => l && p("update:form", "price", l))
2774
2767
  }, {
2775
2768
  append: B(() => [
2776
- pt(C(n(un), {
2769
+ pt(C(n(dn), {
2777
2770
  "pure-styling": "",
2778
2771
  onClick: S
2779
2772
  }, null, 512), [
2780
- [x, n(dn)("Suggest pricing")]
2773
+ [x, n(cn)("Suggest pricing")]
2781
2774
  ])
2782
2775
  ]),
2783
2776
  _: 1
@@ -2794,14 +2787,14 @@ const Vr = /* @__PURE__ */ le({
2794
2787
  "shift-menu": "",
2795
2788
  "onUpdate:modelValue": T[1] || (T[1] = (l) => p("update:form", "taxes", [n(vt).decodeTax(l)]))
2796
2789
  }, null, 8, ["disabled", "items", "label", "model-value"])
2797
- ], 8, sa),
2798
- !m.isOverride && n(s).isV4 ? ($(), J(Ue, {
2790
+ ], 8, ua),
2791
+ !m.isOverride && n(s).isV4 ? (P(), J(Ue, {
2799
2792
  key: 0,
2800
2793
  label: n(i)("menu.price_tier.price_group"),
2801
2794
  description: n(i)("menu.price_tier.description")
2802
2795
  }, {
2803
2796
  append: B(() => [
2804
- C(M, {
2797
+ C(R, {
2805
2798
  label: n(i)("menu.price_tier.add_price_group"),
2806
2799
  icon: "add",
2807
2800
  variant: "secondary",
@@ -2811,7 +2804,7 @@ const Vr = /* @__PURE__ */ le({
2811
2804
  default: B(() => {
2812
2805
  var l;
2813
2806
  return [
2814
- m.isOverride ? Q("", !0) : ($(), J(Xn, {
2807
+ m.isOverride ? Q("", !0) : (P(), J(Jn, {
2815
2808
  key: 0,
2816
2809
  "price-tiers": n(F).priceTiers.value,
2817
2810
  "model-value": m.form.priceTiers || ((l = m.fallback) == null ? void 0 : l.priceTiers) || {},
@@ -2828,7 +2821,7 @@ const Vr = /* @__PURE__ */ le({
2828
2821
  default: B(() => {
2829
2822
  var l, u, y;
2830
2823
  return [
2831
- A("div", ua, [
2824
+ A("div", da, [
2832
2825
  C(O, {
2833
2826
  disabled: !h.value.openPrice || m.isAddon,
2834
2827
  "model-value": m.form.openPrice ?? ((l = m.fallback) == null ? void 0 : l.openPrice) ?? !1,
@@ -2837,7 +2830,7 @@ const Vr = /* @__PURE__ */ le({
2837
2830
  sublabel: n(i)("menu.product.form.price.settings.open_price.sublabel"),
2838
2831
  "onUpdate:modelValue": T[3] || (T[3] = (f) => p("update:form", "openPrice", f))
2839
2832
  }, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
2840
- A("div", da, [
2833
+ A("div", ca, [
2841
2834
  C(O, {
2842
2835
  disabled: !h.value.unit || m.isAddon,
2843
2836
  "model-value": b.value,
@@ -2846,10 +2839,10 @@ const Vr = /* @__PURE__ */ le({
2846
2839
  sublabel: n(i)("menu.product.form.price.settings.sell_by_unit.sublabel"),
2847
2840
  "onUpdate:modelValue": _
2848
2841
  }, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
2849
- b.value ? ($(), Z("div", ca, [
2850
- A("p", ma, be(n(i)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
2851
- A("div", pa, [
2852
- C(R, {
2842
+ b.value ? (P(), Z("div", ma, [
2843
+ A("p", pa, be(n(i)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
2844
+ A("div", fa, [
2845
+ C(M, {
2853
2846
  disabled: !h.value.unit,
2854
2847
  "model-value": m.form.perXUnit || ((u = m.fallback) == null ? void 0 : u.perXUnit) || null,
2855
2848
  rules: [
@@ -2863,8 +2856,8 @@ const Vr = /* @__PURE__ */ le({
2863
2856
  "onUpdate:modelValue": g
2864
2857
  }, null, 8, ["disabled", "model-value", "rules", "placeholder"])
2865
2858
  ]),
2866
- A("div", fa, [
2867
- C(R, {
2859
+ A("div", ga, [
2860
+ C(M, {
2868
2861
  disabled: !h.value.unit,
2869
2862
  "model-value": m.form.unit || ((y = m.fallback) == null ? void 0 : y.unit) || null,
2870
2863
  rules: [
@@ -2876,15 +2869,15 @@ const Vr = /* @__PURE__ */ le({
2876
2869
  ])
2877
2870
  ])) : Q("", !0)
2878
2871
  ]),
2879
- h.value.costing ? ($(), Z("div", ga, [
2872
+ h.value.costing ? (P(), Z("div", va, [
2880
2873
  C(O, {
2881
2874
  "model-value": !!m.form.costing,
2882
2875
  value: !!m.form.costing,
2883
2876
  label: n(i)("menu.product.form.price.settings.track_costing.label"),
2884
2877
  "onUpdate:modelValue": T[5] || (T[5] = (f) => p("update:form", "costing", f ? n(ye.Dinero).zero().toObject() : void 0))
2885
2878
  }, null, 8, ["model-value", "value", "label"]),
2886
- m.form.costing ? ($(), Z("div", va, [
2887
- A("div", ba, [
2879
+ m.form.costing ? (P(), Z("div", ba, [
2880
+ A("div", _a, [
2888
2881
  C(He, {
2889
2882
  class: "w-full",
2890
2883
  min: 0,
@@ -2896,7 +2889,7 @@ const Vr = /* @__PURE__ */ le({
2896
2889
  ])
2897
2890
  ])) : Q("", !0)
2898
2891
  ])) : Q("", !0),
2899
- h.value.minPrice ? ($(), Z("div", _a, [
2892
+ h.value.minPrice ? (P(), Z("div", ya, [
2900
2893
  C(O, {
2901
2894
  disabled: !h.value.minPrice || m.isAddon,
2902
2895
  "model-value": !!m.form.minPrice,
@@ -2904,9 +2897,9 @@ const Vr = /* @__PURE__ */ le({
2904
2897
  label: n(i)("menu.product.form.price.settings.min_price.label"),
2905
2898
  "onUpdate:modelValue": T[7] || (T[7] = (f) => p("update:form", "minPrice", f ? n(ye.Dinero).zero().toObject() : void 0))
2906
2899
  }, null, 8, ["disabled", "model-value", "value", "label"]),
2907
- A("div", ya, [
2908
- A("div", ha, [
2909
- m.form.minPrice ? ($(), J(He, {
2900
+ A("div", ha, [
2901
+ A("div", wa, [
2902
+ m.form.minPrice ? (P(), J(He, {
2910
2903
  key: 0,
2911
2904
  max: n(ye.Dinero).fromFdoDinero(m.form.price).toUnit(),
2912
2905
  min: 0,
@@ -2929,7 +2922,7 @@ const Vr = /* @__PURE__ */ le({
2929
2922
  }, 8, ["title"]);
2930
2923
  };
2931
2924
  }
2932
- }), Ca = { class: "space-y-16" }, ka = { class: "flex items-center space-x-4" }, Ia = { class: "handle" }, Ea = { class: "pt-16" }, Ta = /* @__PURE__ */ le({
2925
+ }), ka = { class: "space-y-16" }, Ia = { class: "flex items-center space-x-4" }, Ea = { class: "handle" }, Ta = { class: "pt-16" }, xa = /* @__PURE__ */ le({
2933
2926
  __name: "ProductPrint",
2934
2927
  props: {
2935
2928
  isOverride: { type: Boolean },
@@ -2983,8 +2976,8 @@ const Vr = /* @__PURE__ */ le({
2983
2976
  });
2984
2977
  }
2985
2978
  function S(E, m) {
2986
- var U, M;
2987
- let T = [...((M = (U = e.form) == null ? void 0 : U.print) == null ? void 0 : M.department) ?? []];
2979
+ var U, R;
2980
+ let T = [...((R = (U = e.form) == null ? void 0 : U.print) == null ? void 0 : R.department) ?? []];
2988
2981
  m && !T.includes(E) ? T = [...T, E] : m || (T = T.filter((O) => O !== E)), i("update:form", "print", {
2989
2982
  ...p(),
2990
2983
  ...e.form.print,
@@ -3007,14 +3000,14 @@ const Vr = /* @__PURE__ */ le({
3007
3000
  () => b.value.length,
3008
3001
  () => S(b.value[b.value.length - 1]._id, !0)
3009
3002
  ), (E, m) => {
3010
- const T = j("fm-switch"), U = j("fm-radio"), M = j("fm-radio-group"), O = j("fm-button"), R = j("fm-checkbox");
3011
- return $(), J(De, {
3003
+ const T = j("fm-switch"), U = j("fm-radio"), R = j("fm-radio-group"), O = j("fm-button"), M = j("fm-checkbox");
3004
+ return P(), J(De, {
3012
3005
  title: n(s)("menu.product.form.print.title")
3013
3006
  }, {
3014
3007
  default: B(() => {
3015
3008
  var x;
3016
3009
  return [
3017
- h.value.printConfig ? ($(), J(Ue, {
3010
+ h.value.printConfig ? (P(), J(Ue, {
3018
3011
  key: 0,
3019
3012
  label: n(s)("menu.product.form.print.config.label")
3020
3013
  }, {
@@ -3032,14 +3025,14 @@ const Vr = /* @__PURE__ */ le({
3032
3025
  }),
3033
3026
  _: 1
3034
3027
  }, 8, ["label"])) : Q("", !0),
3035
- C(M, {
3028
+ C(R, {
3036
3029
  label: n(s)("menu.product.form.print.kds.label"),
3037
3030
  "model-value": ((x = E.form.print) == null ? void 0 : x.sequential) ?? !1,
3038
3031
  "onUpdate:modelValue": m[1] || (m[1] = (k) => a(k))
3039
3032
  }, {
3040
3033
  default: B(() => [
3041
- A("div", Ca, [
3042
- ($(!0), Z(Oe, null, Ne(F.value, (k, l) => ($(), J(U, {
3034
+ A("div", ka, [
3035
+ (P(!0), Z(Oe, null, Ne(F.value, (k, l) => (P(), J(U, {
3043
3036
  key: l,
3044
3037
  label: k.label,
3045
3038
  sublabel: k.description,
@@ -3053,7 +3046,7 @@ const Vr = /* @__PURE__ */ le({
3053
3046
  label: n(s)("menu.product.form.print.routes.label")
3054
3047
  }, {
3055
3048
  default: B(() => [
3056
- w.value.length ? ($(), J(n(Mt), {
3049
+ w.value.length ? (P(), J(n(Rt), {
3057
3050
  key: 0,
3058
3051
  "item-key": (k) => k,
3059
3052
  "model-value": w.value,
@@ -3064,9 +3057,9 @@ const Vr = /* @__PURE__ */ le({
3064
3057
  item: B(({ element: k }) => {
3065
3058
  var l, u, y, f, c;
3066
3059
  return [
3067
- A("div", ka, [
3068
- A("div", Ia, [
3069
- _.value ? ($(), J(O, {
3060
+ A("div", Ia, [
3061
+ A("div", Ea, [
3062
+ _.value ? (P(), J(O, {
3070
3063
  key: 0,
3071
3064
  disabled: !((u = (l = e.form.print) == null ? void 0 : l.department) != null && u.includes(k)),
3072
3065
  class: "handle",
@@ -3076,23 +3069,23 @@ const Vr = /* @__PURE__ */ le({
3076
3069
  }, ["stop"]))
3077
3070
  }, null, 8, ["disabled"])) : Q("", !0)
3078
3071
  ]),
3079
- C(R, {
3072
+ C(M, {
3080
3073
  id: k,
3081
3074
  "data-checked": (f = (y = e.form.print) == null ? void 0 : y.department) == null ? void 0 : f.includes(k),
3082
3075
  label: v.value[k],
3083
3076
  "model-value": (((c = e.form.print) == null ? void 0 : c.department) ?? []).includes(k),
3084
3077
  value: k,
3085
3078
  class: "flex-1",
3086
- "onUpdate:modelValue": (P) => S(k, P)
3079
+ "onUpdate:modelValue": ($) => S(k, $)
3087
3080
  }, null, 8, ["id", "data-checked", "label", "model-value", "value", "onUpdate:modelValue"])
3088
3081
  ])
3089
3082
  ];
3090
3083
  }),
3091
3084
  _: 1
3092
3085
  }, 8, ["item-key", "model-value"])) : Q("", !0),
3093
- C(n(Jn), { "apply-product": !1 }, {
3086
+ C(n(Qn), { "apply-product": !1 }, {
3094
3087
  default: B(({ trigger: k }) => [
3095
- A("div", Ea, [
3088
+ A("div", Ta, [
3096
3089
  C(O, {
3097
3090
  variant: n(We).Secondary,
3098
3091
  label: n(s)("menu.product.form.print.routes.add"),
@@ -3112,7 +3105,7 @@ const Vr = /* @__PURE__ */ le({
3112
3105
  }, 8, ["title"]);
3113
3106
  };
3114
3107
  }
3115
- }), xa = /* @__PURE__ */ le({
3108
+ }), Sa = /* @__PURE__ */ le({
3116
3109
  __name: "ProductTakeaway",
3117
3110
  props: {
3118
3111
  isOverride: {
@@ -3134,7 +3127,7 @@ const Vr = /* @__PURE__ */ le({
3134
3127
  } = me(), p = r, {
3135
3128
  hasVariant: h,
3136
3129
  takeaways: b
3137
- } = Qn(e, p, s), _ = V(() => [e.isOverride ? {
3130
+ } = Zn(e, p, s), _ = V(() => [e.isOverride ? {
3138
3131
  label: i("menu.product.form.takeaway.options.follows_main"),
3139
3132
  value: null
3140
3133
  } : {
@@ -3153,7 +3146,7 @@ const Vr = /* @__PURE__ */ le({
3153
3146
  header: () => i("menu.product.form.takeaway.columns.takeaway"),
3154
3147
  cell: (v) => {
3155
3148
  const g = v.getValue(), a = v.row.original;
3156
- return _e(wo, {
3149
+ return _e(Co, {
3157
3150
  action: "add",
3158
3151
  applyProduct: !1,
3159
3152
  bindToVariant: o.rules.item.bindToVariant,
@@ -3162,7 +3155,7 @@ const Vr = /* @__PURE__ */ le({
3162
3155
  module: oe.F_MENU_MODULE_V4_KEY.enum.takeaway,
3163
3156
  operation: he.F_OPERATION_TYPE.create,
3164
3157
  data: I,
3165
- link: Co(I.usedBy || [])
3158
+ link: ko(I.usedBy || [])
3166
3159
  });
3167
3160
  }
3168
3161
  }, {
@@ -3194,7 +3187,7 @@ const Vr = /* @__PURE__ */ le({
3194
3187
  }]);
3195
3188
  return (v, g) => {
3196
3189
  const a = j("fm-table");
3197
- return $(), J(De, {
3190
+ return P(), J(De, {
3198
3191
  title: n(i)("menu.product.form.takeaway.title"),
3199
3192
  "sub-title": n(i)("menu.product.form.takeaway.subtitle")
3200
3193
  }, {
@@ -3208,10 +3201,10 @@ const Vr = /* @__PURE__ */ le({
3208
3201
  }, 8, ["title", "sub-title"]);
3209
3202
  };
3210
3203
  }
3211
- }), Sa = { class: "fm-typo-en-title-md-600" }, Fa = { class: "py-16 space-y-32" }, Oa = ["data-not-allow-sort"], Da = {
3204
+ }), Fa = { class: "fm-typo-en-title-md-600" }, Oa = { class: "py-16 space-y-32" }, Da = ["data-not-allow-sort"], Va = {
3212
3205
  key: 1,
3213
3206
  class: "w-24"
3214
- }, Va = { class: "flex-1" }, Pa = { class: "flex gap-8 items-center justify-start" }, $a = /* @__PURE__ */ le({
3207
+ }, $a = { class: "flex-1" }, Pa = { class: "flex gap-8 items-center justify-start" }, Ua = /* @__PURE__ */ le({
3215
3208
  __name: "VariantManagerForm",
3216
3209
  props: {
3217
3210
  initialValue: {}
@@ -3237,9 +3230,9 @@ const Vr = /* @__PURE__ */ le({
3237
3230
  function a(U) {
3238
3231
  w.value.options = U;
3239
3232
  }
3240
- function I(U, M) {
3241
- const O = fe(w.value.options), R = O.findIndex((x) => x._id == U);
3242
- O[R].name = M, w.value.options = O, R === w.value.options.length - 1 && S();
3233
+ function I(U, R) {
3234
+ const O = fe(w.value.options), M = O.findIndex((x) => x._id == U);
3235
+ O[M].name = R, w.value.options = O, M === w.value.options.length - 1 && S();
3243
3236
  }
3244
3237
  function S() {
3245
3238
  const U = fe(w.value.options);
@@ -3252,8 +3245,8 @@ const Vr = /* @__PURE__ */ le({
3252
3245
  ];
3253
3246
  }
3254
3247
  function F(U) {
3255
- const M = fe(w.value.options);
3256
- w.value.options = M.filter((O) => O._id !== U);
3248
+ const R = fe(w.value.options);
3249
+ w.value.options = R.filter((O) => O._id !== U);
3257
3250
  }
3258
3251
  we(
3259
3252
  () => w.value.options,
@@ -3265,13 +3258,13 @@ const Vr = /* @__PURE__ */ le({
3265
3258
  }
3266
3259
  );
3267
3260
  function E(U) {
3268
- const M = U.draggedContext.futureIndex, O = U.relatedContext.list;
3269
- return M !== O.length - 1;
3261
+ const R = U.draggedContext.futureIndex, O = U.relatedContext.list;
3262
+ return R !== O.length - 1;
3270
3263
  }
3271
3264
  const m = Ut(
3272
3265
  () => {
3273
3266
  if (e.initialValue) {
3274
- const U = w.value.options.filter((M) => !!M.name.trim());
3267
+ const U = w.value.options.filter((R) => !!R.name.trim());
3275
3268
  return !Ie.isEqual({ ...w.value, options: U }, e.initialValue);
3276
3269
  } else
3277
3270
  return !!(w.value.options.length > 1 || w.value.name.trim());
@@ -3283,7 +3276,7 @@ const Vr = /* @__PURE__ */ le({
3283
3276
  try {
3284
3277
  v.value = !0;
3285
3278
  const U = fe(w.value);
3286
- U.options = U.options.filter((M) => !!M.name.trim()), e.initialValue ? await i.updateMenu({
3279
+ U.options = U.options.filter((R) => !!R.name.trim()), e.initialValue ? await i.updateMenu({
3287
3280
  module: oe.F_MENU_MODULE_V4_KEY.enum.variant,
3288
3281
  operation: he.F_OPERATION_TYPE.update,
3289
3282
  data: U
@@ -3303,12 +3296,12 @@ const Vr = /* @__PURE__ */ le({
3303
3296
  }
3304
3297
  ), Ae(() => {
3305
3298
  g.value = !0;
3306
- }), (U, M) => {
3307
- const O = j("fm-text-field"), R = j("fm-icon"), x = j("fm-button"), k = j("fm-side-sheet");
3308
- return $(), J(k, {
3299
+ }), (U, R) => {
3300
+ const O = j("fm-text-field"), M = j("fm-icon"), x = j("fm-button"), k = j("fm-side-sheet");
3301
+ return P(), J(k, {
3309
3302
  id: "variant-form",
3310
3303
  modelValue: g.value,
3311
- "onUpdate:modelValue": M[2] || (M[2] = (l) => g.value = l),
3304
+ "onUpdate:modelValue": R[2] || (R[2] = (l) => g.value = l),
3312
3305
  "is-container": n(ke).FmForm,
3313
3306
  "is-container-props": {
3314
3307
  onValidationSuccess: T,
@@ -3318,7 +3311,7 @@ const Vr = /* @__PURE__ */ le({
3318
3311
  "onOn:clickedAway": n(m)
3319
3312
  }, {
3320
3313
  "side-sheet-header": B(() => [
3321
- A("p", Sa, be(h.value), 1)
3314
+ A("p", Fa, be(h.value), 1)
3322
3315
  ]),
3323
3316
  "side-sheet-footer": B(() => [
3324
3317
  A("div", Pa, [
@@ -3333,14 +3326,14 @@ const Vr = /* @__PURE__ */ le({
3333
3326
  label: n(p)("menu.common.actions.cancel"),
3334
3327
  size: "lg",
3335
3328
  variant: "tertiary",
3336
- onClick: M[1] || (M[1] = () => g.value = !1)
3329
+ onClick: R[1] || (R[1] = () => g.value = !1)
3337
3330
  }, null, 8, ["label"])
3338
3331
  ])
3339
3332
  ]),
3340
3333
  default: B(() => {
3341
3334
  var l;
3342
3335
  return [
3343
- A("div", Fa, [
3336
+ A("div", Oa, [
3344
3337
  C(De, {
3345
3338
  title: n(p)("menu.variant.form.detail")
3346
3339
  }, {
@@ -3350,7 +3343,7 @@ const Vr = /* @__PURE__ */ le({
3350
3343
  label: n(p)("menu.variant.form.name.label"),
3351
3344
  "helper-text": n(p)("menu.variant.form.name.helper"),
3352
3345
  modelValue: w.value.name,
3353
- "onUpdate:modelValue": M[0] || (M[0] = (u) => w.value.name = u),
3346
+ "onUpdate:modelValue": R[0] || (R[0] = (u) => w.value.name = u),
3354
3347
  rules: [(u) => !!u || n(p)("menu.variant.form.name.required")],
3355
3348
  placeholder: n(p)("menu.variant.form.name.placeholder")
3356
3349
  }, null, 8, ["label", "helper-text", "modelValue", "rules", "placeholder"]),
@@ -3359,7 +3352,7 @@ const Vr = /* @__PURE__ */ le({
3359
3352
  }, {
3360
3353
  default: B(() => [
3361
3354
  A("div", null, [
3362
- C(n(Mt), {
3355
+ C(n(Rt), {
3363
3356
  "model-value": w.value.options,
3364
3357
  move: E,
3365
3358
  class: "space-y-16",
@@ -3373,12 +3366,12 @@ const Vr = /* @__PURE__ */ le({
3373
3366
  class: ve(["flex items-center", "space-x-8"]),
3374
3367
  "data-not-allow-sort": y === w.value.options.length - 1
3375
3368
  }, [
3376
- y !== w.value.options.length - 1 ? ($(), J(R, {
3369
+ y !== w.value.options.length - 1 ? (P(), J(M, {
3377
3370
  key: 0,
3378
3371
  class: "handle",
3379
3372
  name: "drag_handle"
3380
- })) : y > 0 ? ($(), Z("div", Da)) : Q("", !0),
3381
- A("div", Va, [
3373
+ })) : y > 0 ? (P(), Z("div", Va)) : Q("", !0),
3374
+ A("div", $a, [
3382
3375
  C(O, {
3383
3376
  "model-value": u.name,
3384
3377
  rules: [
@@ -3388,11 +3381,11 @@ const Vr = /* @__PURE__ */ le({
3388
3381
  class: "flex-1",
3389
3382
  placeholder: n(p)("menu.variant.form.options.placeholder"),
3390
3383
  "onUpdate:modelValue": (f) => I(u._id, f)
3391
- }, Fn({ _: 2 }, [
3384
+ }, On({ _: 2 }, [
3392
3385
  y !== w.value.options.length - 1 ? {
3393
3386
  name: "append",
3394
3387
  fn: B(() => [
3395
- C(R, {
3388
+ C(M, {
3396
3389
  name: "close",
3397
3390
  onClick: (f) => F(u._id)
3398
3391
  }, null, 8, ["onClick"])
@@ -3401,7 +3394,7 @@ const Vr = /* @__PURE__ */ le({
3401
3394
  } : void 0
3402
3395
  ]), 1032, ["model-value", "rules", "placeholder", "onUpdate:modelValue"])
3403
3396
  ])
3404
- ], 8, Oa)
3397
+ ], 8, Da)
3405
3398
  ]),
3406
3399
  _: 1
3407
3400
  }, 8, ["model-value"])
@@ -3412,7 +3405,7 @@ const Vr = /* @__PURE__ */ le({
3412
3405
  ]),
3413
3406
  _: 1
3414
3407
  }, 8, ["title"]),
3415
- (l = w.value.usedBy) != null && l.length ? ($(), J(So, {
3408
+ (l = w.value.usedBy) != null && l.length ? (P(), J(Fo, {
3416
3409
  key: 0,
3417
3410
  editable: !1,
3418
3411
  overrides: w.value.usedBy || [],
@@ -3427,11 +3420,11 @@ const Vr = /* @__PURE__ */ le({
3427
3420
  };
3428
3421
  }
3429
3422
  });
3430
- function Ua() {
3431
- const t = rn();
3423
+ function Ma() {
3424
+ const t = an();
3432
3425
  function r() {
3433
3426
  t.open({
3434
- component: $a,
3427
+ component: Ua,
3435
3428
  props: {
3436
3429
  initialValue: void 0
3437
3430
  }
@@ -3444,25 +3437,25 @@ function Ua() {
3444
3437
  const Ra = {
3445
3438
  key: 0,
3446
3439
  class: "flex flex-col space-y-16 h-[440px]"
3447
- }, Ma = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Aa = { class: "flex justify-between pb-16" }, Na = { class: "flex gap-8" }, La = {
3440
+ }, Aa = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Na = { class: "flex justify-between pb-16" }, La = { class: "flex gap-8" }, Ga = {
3448
3441
  key: 1,
3449
3442
  class: "flex flex-col items-center space-y-16"
3450
- }, Ga = { class: "flex flex-col items-center space-y-4 w-full" }, Ka = { class: "fm-typo-en-title-sm-600" }, Ba = { class: "text-fm-color-typo-secondary" }, za = /* @__PURE__ */ le({
3443
+ }, Ka = { class: "flex flex-col items-center space-y-4 w-full" }, Ba = { class: "fm-typo-en-title-sm-600" }, za = { class: "text-fm-color-typo-secondary" }, Ya = /* @__PURE__ */ le({
3451
3444
  __name: "SelectVariantDialog",
3452
3445
  props: {
3453
3446
  selectedVariants: {}
3454
3447
  },
3455
3448
  setup(t) {
3456
- const r = Ge(), { emitData: e, emitAction: o } = $t(), s = ue(), { t: i } = me(), p = t, h = V(() => s.variants.map((g) => ({
3449
+ const r = Ge(), { emitData: e, emitAction: o } = Pt(), s = ue(), { t: i } = me(), p = t, h = V(() => s.variants.map((g) => ({
3457
3450
  label: g.name,
3458
3451
  value: g._id,
3459
3452
  disabled: !1
3460
- }))), b = q(fe(p.selectedVariants)), _ = q(""), { createVariant: w } = Ua(), v = () => {
3453
+ }))), b = q(fe(p.selectedVariants)), _ = q(""), { createVariant: w } = Ma(), v = () => {
3461
3454
  e(b.value), o("primary"), r.close();
3462
3455
  };
3463
3456
  return (g, a) => {
3464
3457
  const I = j("FmSearch"), S = j("FmCheckbox"), F = j("FmButton");
3465
- return h.value.length > 0 ? ($(), Z("div", Ra, [
3458
+ return h.value.length > 0 ? (P(), Z("div", Ra, [
3466
3459
  A("div", null, [
3467
3460
  C(I, {
3468
3461
  autofocus: "",
@@ -3471,9 +3464,9 @@ const Ra = {
3471
3464
  placeholder: n(i)("menu.common.labels.search_variants")
3472
3465
  }, null, 8, ["modelValue", "placeholder"])
3473
3466
  ]),
3474
- A("div", Ma, [
3467
+ A("div", Aa, [
3475
3468
  A("div", null, [
3476
- ($(!0), Z(Oe, null, Ne(h.value, (E) => ($(), Z("div", {
3469
+ (P(!0), Z(Oe, null, Ne(h.value, (E) => (P(), Z("div", {
3477
3470
  key: E.value
3478
3471
  }, [
3479
3472
  pt(C(S, {
@@ -3490,15 +3483,15 @@ const Ra = {
3490
3483
  ]))), 128))
3491
3484
  ])
3492
3485
  ]),
3493
- A("div", Aa, [
3494
- n(s).rules.item.variant ? ($(), J(F, {
3486
+ A("div", Na, [
3487
+ n(s).rules.item.variant ? (P(), J(F, {
3495
3488
  key: 0,
3496
3489
  label: n(i)("menu.common.actions.add_new_variant"),
3497
3490
  variant: "tertiary",
3498
3491
  "text-color": "primary",
3499
3492
  onClick: a[3] || (a[3] = (E) => n(w)())
3500
3493
  }, null, 8, ["label"])) : Q("", !0),
3501
- A("div", Na, [
3494
+ A("div", La, [
3502
3495
  C(F, {
3503
3496
  label: n(i)("menu.common.actions.cancel"),
3504
3497
  variant: "tertiary",
@@ -3510,10 +3503,10 @@ const Ra = {
3510
3503
  }, null, 8, ["label"])
3511
3504
  ])
3512
3505
  ])
3513
- ])) : ($(), Z("div", La, [
3514
- A("div", Ga, [
3515
- A("p", Ka, be(n(i)("menu.common.empty.no_variant.title")), 1),
3516
- A("p", Ba, be(n(i)("menu.common.empty.no_variant.subtitle")), 1)
3506
+ ])) : (P(), Z("div", Ga, [
3507
+ A("div", Ka, [
3508
+ A("p", Ba, be(n(i)("menu.common.empty.no_variant.title")), 1),
3509
+ A("p", za, be(n(i)("menu.common.empty.no_variant.subtitle")), 1)
3517
3510
  ]),
3518
3511
  C(F, {
3519
3512
  label: n(i)("menu.variant.add"),
@@ -3523,15 +3516,15 @@ const Ra = {
3523
3516
  ]));
3524
3517
  };
3525
3518
  }
3526
- }), Ya = {
3519
+ }), ja = {
3527
3520
  class: "space-y-16"
3528
- }, ja = {
3529
- class: "flex items-center space-x-8"
3530
3521
  }, Wa = {
3531
- class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white"
3522
+ class: "flex items-center space-x-8"
3532
3523
  }, qa = {
3524
+ class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white"
3525
+ }, Ha = {
3533
3526
  class: "flex-1 fm-typo-en-body-lg-400"
3534
- }, Ha = /* @__PURE__ */ le({
3527
+ }, Xa = /* @__PURE__ */ le({
3535
3528
  __name: "ProductVariants",
3536
3529
  props: {
3537
3530
  isOverride: {
@@ -3548,7 +3541,7 @@ const Ra = {
3548
3541
  setup(t, {
3549
3542
  emit: r
3550
3543
  }) {
3551
- const e = t, o = ft(), s = ue(), i = Zn(), p = Re(), h = Ge(), {
3544
+ const e = t, o = ft(), s = ue(), i = eo(), p = Me(), h = Ge(), {
3552
3545
  t: b
3553
3546
  } = me(), _ = V(() => s.rules.item), w = V(() => _.value.minPrice && !!e.form.minPrice), v = V(() => !s.state.currentCatalogId), g = V(() => s.variants.reduce((l, u) => (l[u._id] = u, l), {})), a = r;
3554
3547
  function I(l) {
@@ -3578,7 +3571,7 @@ const Ra = {
3578
3571
  var l;
3579
3572
  h.open({
3580
3573
  title: "Add variant",
3581
- contentComponent: za,
3574
+ contentComponent: Ya,
3582
3575
  contentComponentProps: {
3583
3576
  selectedVariants: ((l = e.form.variant) == null ? void 0 : l.variantGroupIds) ?? []
3584
3577
  }
@@ -3588,16 +3581,16 @@ const Ra = {
3588
3581
  }
3589
3582
  function E(l) {
3590
3583
  var G, H;
3591
- const u = ((G = e.form.variant) == null ? void 0 : G.variantGroupIds) || [], y = (H = e.form.variant) == null ? void 0 : H.variantCombinations, P = l.split(/(?=variant)/g).map((ee) => ee.replace(/\/*$/, "")).filter((ee) => u.some((ie) => ee.includes(ie))).join("/");
3592
- return y == null ? void 0 : y.find((ee) => ee.combinationKey === P);
3584
+ const u = ((G = e.form.variant) == null ? void 0 : G.variantGroupIds) || [], y = (H = e.form.variant) == null ? void 0 : H.variantCombinations, $ = l.split(/(?=variant)/g).map((ee) => ee.replace(/\/*$/, "")).filter((ee) => u.some((ie) => ee.includes(ie))).join("/");
3585
+ return y == null ? void 0 : y.find((ee) => ee.combinationKey === $);
3593
3586
  }
3594
3587
  const m = (l) => {
3595
3588
  U(l);
3596
3589
  }, T = V(() => {
3597
3590
  var u;
3598
3591
  return (((u = e.form.variant) == null ? void 0 : u.variantCombinations) || []).map((y) => {
3599
- var c, P;
3600
- const f = (P = (c = e.fallback) == null ? void 0 : c.variant) == null ? void 0 : P.variantCombinations.find(({
3592
+ var c, $;
3593
+ const f = ($ = (c = e.fallback) == null ? void 0 : c.variant) == null ? void 0 : $.variantCombinations.find(({
3601
3594
  combinationKey: G
3602
3595
  }) => G === y.combinationKey);
3603
3596
  return {
@@ -3615,10 +3608,10 @@ const Ra = {
3615
3608
  });
3616
3609
  function U(l, u = (y) => y) {
3617
3610
  var c;
3618
- const y = l.filter((P) => !!P);
3611
+ const y = l.filter(($) => !!$);
3619
3612
  let f;
3620
3613
  if (y.length) {
3621
- const P = y.map((H) => s.variants.find((ee) => ee._id === H)), G = Le.fullVariantCombination(P).map(({
3614
+ const $ = y.map((H) => s.variants.find((ee) => ee._id === H)), G = Le.fullVariantCombination($).map(({
3622
3615
  combinationKey: H
3623
3616
  }) => {
3624
3617
  var ie;
@@ -3645,7 +3638,7 @@ const Ra = {
3645
3638
  takeawayUsed: null
3646
3639
  };
3647
3640
  } else {
3648
- const P = (c = e.form.variant) == null ? void 0 : c.variantCombinations.map((H) => H.takeawayUsed), G = [...new Set(P)];
3641
+ const $ = (c = e.form.variant) == null ? void 0 : c.variantCombinations.map((H) => H.takeawayUsed), G = [...new Set($)];
3649
3642
  I([{
3650
3643
  key: "variant",
3651
3644
  value: void 0
@@ -3660,7 +3653,7 @@ const Ra = {
3660
3653
  }
3661
3654
  a("replace:form", i.initDynamicGroupItem(f));
3662
3655
  }
3663
- async function M(l, u, y) {
3656
+ async function R(l, u, y) {
3664
3657
  const f = Ie.clone(e.form);
3665
3658
  f.variant.variantCombinations[l][u] = y, I([{
3666
3659
  key: "variant",
@@ -3670,7 +3663,7 @@ const Ra = {
3670
3663
  const O = V(() => {
3671
3664
  var l, u;
3672
3665
  return ((l = s.currentCatalog) == null ? void 0 : l.priceTierRules) ?? ((u = s.currentCatalog) == null ? void 0 : u.usePriceTiers) ?? [];
3673
- }), R = V(() => [{
3666
+ }), M = V(() => [{
3674
3667
  accessorKey: "combinationKey",
3675
3668
  header: () => b("menu.product.form.variant.columns.variant"),
3676
3669
  enableSorting: !1,
@@ -3681,25 +3674,25 @@ const Ra = {
3681
3674
  enableSorting: !1,
3682
3675
  cell: (l) => {
3683
3676
  var G, H;
3684
- const u = l.getValue(), y = l.row.original, c = ((G = y.fallback) == null ? void 0 : G.code) ?? e.form.code ?? ((H = e.fallback) == null ? void 0 : H.code), P = o.state.featureFlags.uniqueProductCode;
3677
+ const u = l.getValue(), y = l.row.original, c = ((G = y.fallback) == null ? void 0 : G.code) ?? e.form.code ?? ((H = e.fallback) == null ? void 0 : H.code), $ = o.state.featureFlags.uniqueProductCode;
3685
3678
  return _e(ke.FmTextField, {
3686
3679
  modelValue: u,
3687
3680
  placeholder: c || b("menu.product.form.variant.placeholders.no_code"),
3688
3681
  rules: [(ee) => {
3689
3682
  const ie = ee, pe = V(() => {
3690
3683
  var D;
3691
- if (!P || !ie) return 0;
3684
+ if (!$ || !ie) return 0;
3692
3685
  let d = s.itemCodeMap.get(ie) || 0;
3693
3686
  return y.code === ie && d > 0 && (d -= 1), ie === c && (d += 1), (D = e.form.variant) == null || D.variantCombinations.forEach((N) => {
3694
3687
  N.combinationKey !== y.combinationKey && N.code === ie && (d += 1);
3695
3688
  }), d;
3696
3689
  });
3697
- return P && pe.value > 0 ? b("menu.product.form.detail.fields.code.duplicate_warning", {
3690
+ return $ && pe.value > 0 ? b("menu.product.form.detail.fields.code.duplicate_warning", {
3698
3691
  count: pe.value
3699
3692
  }) : !0;
3700
3693
  }],
3701
3694
  "onUpdate:modelValue": (ee) => {
3702
- M(l.row.index, "code", Qt(ee, !0));
3695
+ R(l.row.index, "code", Zt(ee, !0));
3703
3696
  }
3704
3697
  });
3705
3698
  }
@@ -3708,16 +3701,16 @@ const Ra = {
3708
3701
  header: () => b("menu.product.form.variant.columns.order_from"),
3709
3702
  enableSorting: !1,
3710
3703
  cell: (l) => {
3711
- var c, P;
3704
+ var c, $;
3712
3705
  const u = l.getValue(), f = (c = l.row.original.fallback) == null ? void 0 : c.orderFrom;
3713
3706
  return _e(Dt, {
3714
3707
  modelValue: u ?? null,
3715
- fallback: e.form.orderFrom ?? f ?? ((P = e.fallback) == null ? void 0 : P.orderFrom),
3708
+ fallback: e.form.orderFrom ?? f ?? (($ = e.fallback) == null ? void 0 : $.orderFrom),
3716
3709
  disable: !_.value.orderFrom,
3717
3710
  required: _.value.orderFrom && _.value.orderFromActiveOnly,
3718
3711
  editActiveOnly: _.value.orderFromActiveOnly || !1,
3719
3712
  "onUpdate:modelValue": (G) => {
3720
- M(l.row.index, "orderFrom", G);
3713
+ R(l.row.index, "orderFrom", G);
3721
3714
  },
3722
3715
  label: "",
3723
3716
  defaultLabel: "Follow general"
@@ -3728,8 +3721,8 @@ const Ra = {
3728
3721
  header: () => b("menu.product.form.variant.columns.price"),
3729
3722
  enableSorting: !1,
3730
3723
  cell: (l) => {
3731
- var P, G, H;
3732
- const u = l.getValue(), y = l.row.original, c = ((P = y.fallback) == null ? void 0 : P.price) ?? e.form.price ?? ((G = e.fallback) == null ? void 0 : G.price);
3724
+ var $, G, H;
3725
+ const u = l.getValue(), y = l.row.original, c = (($ = y.fallback) == null ? void 0 : $.price) ?? e.form.price ?? ((G = e.fallback) == null ? void 0 : G.price);
3733
3726
  return C("div", {
3734
3727
  id: mt(Se.VARIANT, y.combinationKey ?? ""),
3735
3728
  class: "flex items-center gap-8"
@@ -3739,15 +3732,15 @@ const Ra = {
3739
3732
  modelValue: u,
3740
3733
  min: 0,
3741
3734
  "onUpdate:model-value": (ee) => {
3742
- M(l.row.index, "price", ee);
3735
+ R(l.row.index, "price", ee);
3743
3736
  },
3744
3737
  nullable: !0,
3745
3738
  showCurrency: !1
3746
- }, null), s.isV4 && !e.isOverride && C(Zt, {
3739
+ }, null), s.isV4 && !e.isOverride && C(en, {
3747
3740
  "menu-store": s,
3748
3741
  "price-tiers": y.priceTiers,
3749
3742
  fallback: (H = y.fallback) == null ? void 0 : H.priceTiers,
3750
- "onUpdate:price-tiers": (ee) => M(l.row.index, "priceTiers", ee)
3743
+ "onUpdate:price-tiers": (ee) => R(l.row.index, "priceTiers", ee)
3751
3744
  }, null)]);
3752
3745
  }
3753
3746
  }, {
@@ -3755,14 +3748,14 @@ const Ra = {
3755
3748
  header: () => b("menu.product.form.variant.columns.min_price"),
3756
3749
  enableSorting: !1,
3757
3750
  cell: (l) => {
3758
- var P, G, H;
3759
- const u = l.getValue(), y = l.row.original, c = ((P = y.fallback) == null ? void 0 : P.minPrice) ?? e.form.minPrice ?? ((G = e.fallback) == null ? void 0 : G.minPrice);
3751
+ var $, G, H;
3752
+ const u = l.getValue(), y = l.row.original, c = (($ = y.fallback) == null ? void 0 : $.minPrice) ?? e.form.minPrice ?? ((G = e.fallback) == null ? void 0 : G.minPrice);
3760
3753
  return _e(He, {
3761
3754
  placeholder: c ? et(c) : void 0,
3762
3755
  modelValue: u,
3763
3756
  max: ye.Dinero.fromFdoDinero(y.price ?? ((H = y.fallback) == null ? void 0 : H.price) ?? ye.Dinero.zero().toObject()).toUnit(),
3764
3757
  "onUpdate:modelValue": (ee) => {
3765
- M(l.row.index, "minPrice", ee);
3758
+ R(l.row.index, "minPrice", ee);
3766
3759
  },
3767
3760
  nullable: !0,
3768
3761
  showCurrency: !1
@@ -3777,13 +3770,13 @@ const Ra = {
3777
3770
  }) : !0;
3778
3771
  }
3779
3772
  return (l, u) => {
3780
- const y = j("fm-button"), f = j("fm-icon"), c = j("FmFormGroup"), P = j("fm-table");
3781
- return $(), J(De, {
3773
+ const y = j("fm-button"), f = j("fm-icon"), c = j("FmFormGroup"), $ = j("fm-table");
3774
+ return P(), J(De, {
3782
3775
  id: n(Se).VARIANT,
3783
3776
  title: n(b)("menu.product.form.variant.title"),
3784
3777
  "sub-title": n(b)("menu.product.form.variant.subtitle")
3785
3778
  }, {
3786
- "append-title": B(() => [n(s).rules.item.variant ? ($(), J(y, {
3779
+ "append-title": B(() => [n(s).rules.item.variant ? (P(), J(y, {
3787
3780
  key: 0,
3788
3781
  label: n(b)("menu.product.form.variant.add"),
3789
3782
  variant: "secondary",
@@ -3792,13 +3785,13 @@ const Ra = {
3792
3785
  }, null, 8, ["label"])) : Q("", !0)]),
3793
3786
  default: B(() => {
3794
3787
  var G;
3795
- return [A("div", Ya, [C(c, {
3788
+ return [A("div", ja, [C(c, {
3796
3789
  "model-value": (G = l.form.variant) == null ? void 0 : G.variantGroupIds,
3797
3790
  rules: [k]
3798
3791
  }, {
3799
3792
  default: B(() => {
3800
3793
  var H;
3801
- return [C(n(Mt), {
3794
+ return [C(n(Rt), {
3802
3795
  "model-value": ((H = l.form.variant) == null ? void 0 : H.variantGroupIds) ?? [],
3803
3796
  class: "space-y-16",
3804
3797
  group: "variants",
@@ -3810,11 +3803,11 @@ const Ra = {
3810
3803
  element: ee
3811
3804
  }) => {
3812
3805
  var ie;
3813
- return [A("div", ja, [C(y, {
3806
+ return [A("div", Wa, [C(y, {
3814
3807
  variant: n(We).Tertiary,
3815
3808
  class: "handle",
3816
3809
  "prepend-icon": "drag_handle"
3817
- }, null, 8, ["variant"]), A("div", Wa, [A("p", qa, be((ie = g.value[ee]) == null ? void 0 : ie.name), 1), C(f, {
3810
+ }, null, 8, ["variant"]), A("div", qa, [A("p", Ha, be((ie = g.value[ee]) == null ? void 0 : ie.name), 1), C(f, {
3818
3811
  class: "cursor-pointer",
3819
3812
  name: "close",
3820
3813
  onClick: qe((pe) => {
@@ -3827,11 +3820,11 @@ const Ra = {
3827
3820
  }, 8, ["model-value"])];
3828
3821
  }),
3829
3822
  _: 1
3830
- }, 8, ["model-value", "rules"]), C(on, null, {
3831
- default: B(() => [T.value.length ? ($(), J(P, {
3823
+ }, 8, ["model-value", "rules"]), C(rn, null, {
3824
+ default: B(() => [T.value.length ? (P(), J($, {
3832
3825
  key: 0,
3833
3826
  class: "w-full",
3834
- "column-defs": R.value,
3827
+ "column-defs": M.value,
3835
3828
  "column-visibility": x.value,
3836
3829
  "page-size": T.value.length ?? 0,
3837
3830
  "row-data": T.value ?? [],
@@ -3845,28 +3838,28 @@ const Ra = {
3845
3838
  }, 8, ["id", "title", "sub-title"]);
3846
3839
  };
3847
3840
  }
3848
- }), Xa = {
3841
+ }), Ja = {
3849
3842
  key: 0,
3850
3843
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3851
- }, Ja = {
3844
+ }, Qa = {
3852
3845
  key: 2,
3853
3846
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3854
- }, Qa = {
3847
+ }, Za = {
3855
3848
  key: 3,
3856
3849
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3857
- }, Za = {
3850
+ }, el = {
3858
3851
  key: 5,
3859
3852
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3860
- }, el = {
3853
+ }, tl = {
3861
3854
  key: 6,
3862
3855
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3863
- }, tl = {
3856
+ }, nl = {
3864
3857
  key: 8,
3865
3858
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3866
- }, nl = {
3859
+ }, ol = {
3867
3860
  key: 10,
3868
3861
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3869
- }, ol = /* @__PURE__ */ le({
3862
+ }, rl = /* @__PURE__ */ le({
3870
3863
  __name: "ItemForm",
3871
3864
  props: {
3872
3865
  initialForm: {},
@@ -3909,7 +3902,7 @@ const Ra = {
3909
3902
  ), I = V(
3910
3903
  () => {
3911
3904
  var z;
3912
- return Pt(o.menu.modules.variant, (z = a.value.variant) == null ? void 0 : z.variantGroupIds);
3905
+ return $t(o.menu.modules.variant, (z = a.value.variant) == null ? void 0 : z.variantGroupIds);
3913
3906
  }
3914
3907
  ), S = (z, Y) => {
3915
3908
  var ae;
@@ -3921,7 +3914,7 @@ const Ra = {
3921
3914
  a.value = z, d();
3922
3915
  };
3923
3916
  async function E() {
3924
- g.value = a.value._id && m.value ? (await vo(
3917
+ g.value = a.value._id && m.value ? (await bo(
3925
3918
  o.mergedMenu,
3926
3919
  [a.value],
3927
3920
  o.menu,
@@ -3933,8 +3926,8 @@ const Ra = {
3933
3926
  () => !!p.state.currentCatalogId || !!p.state.currentSchedulerId
3934
3927
  ), T = V(() => {
3935
3928
  var z;
3936
- return m.value ? a.value.category == "" || a.value.category == null && ((z = g.value) == null ? void 0 : z.category) == null : Cn(o.menu) && a.value.category == null;
3937
- }), U = V(() => i.itemAttributeSettings.value.length > 0 && !m.value), M = q(
3929
+ return m.value ? a.value.category == "" || a.value.category == null && ((z = g.value) == null ? void 0 : z.category) == null : kn(o.menu) && a.value.category == null;
3930
+ }), U = V(() => i.itemAttributeSettings.value.length > 0 && !m.value), R = q(
3938
3931
  a.value.category != null || !!a.value.code || !!a.value.orderFrom
3939
3932
  );
3940
3933
  function O(z) {
@@ -3946,7 +3939,7 @@ const Ra = {
3946
3939
  orderFrom: void 0
3947
3940
  }, d());
3948
3941
  }
3949
- const R = V(() => {
3942
+ const M = V(() => {
3950
3943
  const z = {};
3951
3944
  return o.menu.modules.item.forEach((Y) => {
3952
3945
  var ae;
@@ -4002,7 +3995,7 @@ const Ra = {
4002
3995
  const c = q(
4003
3996
  a.value.takeawayUsed != null || (((ge = a.value.variant) == null ? void 0 : ge.variantCombinations) || []).some((z) => z.takeawayUsed != null) || !1
4004
3997
  );
4005
- function P(z) {
3998
+ function $(z) {
4006
3999
  var Y, ae;
4007
4000
  z || (a.value = {
4008
4001
  ...a.value,
@@ -4065,7 +4058,7 @@ const Ra = {
4065
4058
  );
4066
4059
  }), Ot(() => {
4067
4060
  try {
4068
- wn();
4061
+ Cn();
4069
4062
  } catch (z) {
4070
4063
  console.log(z);
4071
4064
  }
@@ -4099,7 +4092,7 @@ const Ra = {
4099
4092
  function X(z) {
4100
4093
  z.type === "general" ? K(Se.GENERAL) : z.type === "price" ? K(Se.PRICE, !0) : z.type === "variant" ? K(mt(Se.VARIANT, z.id), !0) : z.type === "group" && K(mt(Se.GROUP, z.id), !0);
4101
4094
  }
4102
- return On(() => {
4095
+ return Dn(() => {
4103
4096
  o.focused && X(o.focused);
4104
4097
  }), r({
4105
4098
  validate: W,
@@ -4107,7 +4100,7 @@ const Ra = {
4107
4100
  hasUnsavedChanges: N
4108
4101
  }), (z, Y) => {
4109
4102
  const ae = j("FmBreadcrumb"), de = j("FmForm");
4110
- return $(), J(de, {
4103
+ return P(), J(de, {
4111
4104
  id: n(Se).GENERAL,
4112
4105
  class: ve(["tree-item-form", ["flex-1 py-24 space-y-24", "xs:w-full"]]),
4113
4106
  ref_key: "formWrapper",
@@ -4122,11 +4115,11 @@ const Ra = {
4122
4115
  ref: w,
4123
4116
  items: _.value
4124
4117
  }, null, 8, ["items"]),
4125
- C(bo, { "menu-store": n(p) }, null, 8, ["menu-store"]),
4118
+ C(_o, { "menu-store": n(p) }, null, 8, ["menu-store"]),
4126
4119
  C(Be, {
4127
- toggle: M.value,
4120
+ toggle: R.value,
4128
4121
  "onUpdate:toggle": [
4129
- Y[0] || (Y[0] = (te) => M.value = te),
4122
+ Y[0] || (Y[0] = (te) => R.value = te),
4130
4123
  Y[1] || (Y[1] = (te) => O(te))
4131
4124
  ],
4132
4125
  disabled: !m.value,
@@ -4148,23 +4141,23 @@ const Ra = {
4148
4141
  }),
4149
4142
  _: 1
4150
4143
  }, 8, ["toggle", "disabled", "description", "title"]),
4151
- m.value ? Q("", !0) : ($(), Z("div", Xa)),
4152
- U.value ? ($(), J(De, {
4144
+ m.value ? Q("", !0) : (P(), Z("div", Ja)),
4145
+ U.value ? (P(), J(De, {
4153
4146
  key: 1,
4154
4147
  title: n(h)("menu.product.form.sections.tagging.title"),
4155
4148
  "sub-title": n(h)("menu.product.form.sections.tagging.subtitle")
4156
4149
  }, {
4157
4150
  default: B(() => [
4158
- C(n(an), {
4151
+ C(n(ln), {
4159
4152
  entity: "item",
4160
4153
  "model-value": a.value.customAttributes || {},
4161
4154
  "onUpdate:modelValue": Y[2] || (Y[2] = (te) => S("customAttributes", te)),
4162
- "value-options": R.value
4155
+ "value-options": M.value
4163
4156
  }, null, 8, ["model-value", "value-options"])
4164
4157
  ]),
4165
4158
  _: 1
4166
4159
  }, 8, ["title", "sub-title"])) : Q("", !0),
4167
- U.value ? ($(), Z("div", Ja)) : Q("", !0),
4160
+ U.value ? (P(), Z("div", Qa)) : Q("", !0),
4168
4161
  C(Be, {
4169
4162
  toggle: x.value,
4170
4163
  "onUpdate:toggle": [
@@ -4176,7 +4169,7 @@ const Ra = {
4176
4169
  title: n(h)("menu.product.form.sections.price.title")
4177
4170
  }, {
4178
4171
  default: B(() => [
4179
- C(wa, {
4172
+ C(Ca, {
4180
4173
  fallback: g.value,
4181
4174
  form: a.value,
4182
4175
  "is-addon": T.value,
@@ -4186,8 +4179,8 @@ const Ra = {
4186
4179
  ]),
4187
4180
  _: 1
4188
4181
  }, 8, ["toggle", "disabled", "description", "title"]),
4189
- v.value.print && !m.value ? ($(), Z("div", Qa)) : Q("", !0),
4190
- v.value.print ? ($(), J(Be, {
4182
+ v.value.print && !m.value ? (P(), Z("div", Za)) : Q("", !0),
4183
+ v.value.print ? (P(), J(Be, {
4191
4184
  key: 4,
4192
4185
  toggle: G.value,
4193
4186
  "onUpdate:toggle": [
@@ -4199,7 +4192,7 @@ const Ra = {
4199
4192
  title: "Update print"
4200
4193
  }, {
4201
4194
  default: B(() => [
4202
- C(Ta, {
4195
+ C(xa, {
4203
4196
  fallback: g.value,
4204
4197
  form: a.value,
4205
4198
  "full-combinations": I.value,
@@ -4211,7 +4204,7 @@ const Ra = {
4211
4204
  ]),
4212
4205
  _: 1
4213
4206
  }, 8, ["toggle"])) : Q("", !0),
4214
- m.value ? Q("", !0) : ($(), Z("div", Za)),
4207
+ m.value ? Q("", !0) : (P(), Z("div", el)),
4215
4208
  C(Be, {
4216
4209
  toggle: l.value,
4217
4210
  "onUpdate:toggle": [
@@ -4223,7 +4216,7 @@ const Ra = {
4223
4216
  title: n(h)("menu.product.form.sections.variant.title")
4224
4217
  }, {
4225
4218
  default: B(() => [
4226
- C(Ha, {
4219
+ C(Xa, {
4227
4220
  fallback: g.value,
4228
4221
  form: a.value,
4229
4222
  "full-combinations": I.value,
@@ -4235,8 +4228,8 @@ const Ra = {
4235
4228
  ]),
4236
4229
  _: 1
4237
4230
  }, 8, ["toggle", "disabled", "description", "title"]),
4238
- v.value.group && !m.value ? ($(), Z("div", el)) : Q("", !0),
4239
- v.value.group ? ($(), J(Be, {
4231
+ v.value.group && !m.value ? (P(), Z("div", tl)) : Q("", !0),
4232
+ v.value.group ? (P(), J(Be, {
4240
4233
  key: 7,
4241
4234
  toggle: ee.value,
4242
4235
  "onUpdate:toggle": [
@@ -4248,7 +4241,7 @@ const Ra = {
4248
4241
  title: "Update group"
4249
4242
  }, {
4250
4243
  default: B(() => [
4251
- C(ra, {
4244
+ C(aa, {
4252
4245
  fallback: g.value,
4253
4246
  form: a.value,
4254
4247
  "full-combinations": I.value,
@@ -4260,8 +4253,8 @@ const Ra = {
4260
4253
  ]),
4261
4254
  _: 1
4262
4255
  }, 8, ["toggle", "disabled"])) : Q("", !0),
4263
- v.value.inventory && !m.value ? ($(), Z("div", tl)) : Q("", !0),
4264
- v.value.inventory ? ($(), J(Be, {
4256
+ v.value.inventory && !m.value ? (P(), Z("div", nl)) : Q("", !0),
4257
+ v.value.inventory ? (P(), J(Be, {
4265
4258
  key: 9,
4266
4259
  toggle: y.value,
4267
4260
  "onUpdate:toggle": [
@@ -4273,7 +4266,7 @@ const Ra = {
4273
4266
  title: n(h)("menu.product.form.sections.inventory.title")
4274
4267
  }, {
4275
4268
  default: B(() => [
4276
- C(ia, {
4269
+ C(sa, {
4277
4270
  fallback: g.value,
4278
4271
  form: a.value,
4279
4272
  "full-combinations": I.value,
@@ -4285,20 +4278,20 @@ const Ra = {
4285
4278
  ]),
4286
4279
  _: 1
4287
4280
  }, 8, ["toggle", "disabled", "description", "title"])) : Q("", !0),
4288
- v.value.takeaway(a.value.category ?? ((se = g.value) == null ? void 0 : se.category)) && !m.value ? ($(), Z("div", nl)) : Q("", !0),
4289
- v.value.takeaway(a.value.category ?? ((Te = g.value) == null ? void 0 : Te.category)) ? ($(), J(Be, {
4281
+ v.value.takeaway(a.value.category ?? ((se = g.value) == null ? void 0 : se.category)) && !m.value ? (P(), Z("div", ol)) : Q("", !0),
4282
+ v.value.takeaway(a.value.category ?? ((Te = g.value) == null ? void 0 : Te.category)) ? (P(), J(Be, {
4290
4283
  key: 11,
4291
4284
  toggle: c.value,
4292
4285
  "onUpdate:toggle": [
4293
4286
  Y[18] || (Y[18] = (te) => c.value = te),
4294
- Y[19] || (Y[19] = (te) => P(te))
4287
+ Y[19] || (Y[19] = (te) => $(te))
4295
4288
  ],
4296
4289
  disabled: !m.value,
4297
4290
  description: n(h)("menu.product.form.sections.takeaway.description"),
4298
4291
  title: n(h)("menu.product.form.sections.takeaway.title")
4299
4292
  }, {
4300
4293
  default: B(() => [
4301
- C(xa, {
4294
+ C(Sa, {
4302
4295
  fallback: g.value,
4303
4296
  form: a.value,
4304
4297
  "full-combinations": I.value,
@@ -4317,8 +4310,8 @@ const Ra = {
4317
4310
  };
4318
4311
  }
4319
4312
  });
4320
- function rl(t) {
4321
- const { storageKey: r, defaultWidth: e, minWidth: o, maxWidth: s } = t, i = jo(r, e), p = q(!1), h = q(null);
4313
+ function al(t) {
4314
+ const { storageKey: r, defaultWidth: e, minWidth: o, maxWidth: s } = t, i = Wo(r, e), p = q(!1), h = q(null);
4322
4315
  function b(v) {
4323
4316
  v.preventDefault(), p.value = !0, document.addEventListener("mousemove", _), document.addEventListener("mouseup", w), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
4324
4317
  }
@@ -4331,7 +4324,7 @@ function rl(t) {
4331
4324
  function w() {
4332
4325
  p.value = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", w), document.body.style.cursor = "", document.body.style.userSelect = "";
4333
4326
  }
4334
- return Dn(() => {
4327
+ return Vn(() => {
4335
4328
  document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", w);
4336
4329
  }), {
4337
4330
  panelWidth: i,
@@ -4341,26 +4334,26 @@ function rl(t) {
4341
4334
  stopResize: w
4342
4335
  };
4343
4336
  }
4344
- const al = {
4337
+ const ll = {
4345
4338
  class: "h-full relative bg-fm-color-neutral-gray-100",
4346
4339
  style: { width: "1px" }
4347
- }, ll = { class: "flex-1 pr-24" }, il = {
4340
+ }, il = { class: "flex-1 pr-24" }, sl = {
4348
4341
  key: 0,
4349
4342
  class: "absolute inset-0 flex items-center justify-center bg-white bg-opacity-70"
4350
- }, sl = "tree-editor-left-panel-width", ul = 300, dl = 600, cl = 300, ml = /* @__PURE__ */ le({
4343
+ }, ul = "tree-editor-left-panel-width", dl = 300, cl = 600, ml = 300, pl = /* @__PURE__ */ le({
4351
4344
  __name: "TreeEditorLayout",
4352
4345
  setup(t) {
4353
4346
  const {
4354
4347
  panelWidth: r,
4355
4348
  containerRef: e,
4356
4349
  startResize: o
4357
- } = rl({
4358
- storageKey: sl,
4359
- defaultWidth: cl,
4360
- minWidth: ul,
4361
- maxWidth: dl
4350
+ } = al({
4351
+ storageKey: ul,
4352
+ defaultWidth: ml,
4353
+ minWidth: dl,
4354
+ maxWidth: cl
4362
4355
  });
4363
- return (s, i) => ($(), Z("div", {
4356
+ return (s, i) => (P(), Z("div", {
4364
4357
  ref_key: "containerRef",
4365
4358
  ref: e,
4366
4359
  class: "flex h-full relative"
@@ -4369,26 +4362,26 @@ const al = {
4369
4362
  style: dt({ width: `${n(r)}px`, backgroundColor: "#FDFDFE" }),
4370
4363
  class: "flex-shrink-0 pl-24"
4371
4364
  }, [
4372
- Me(s.$slots, "left-panel", {}, void 0, !0)
4365
+ Re(s.$slots, "left-panel", {}, void 0, !0)
4373
4366
  ], 4),
4374
- A("div", al, [
4367
+ A("div", ll, [
4375
4368
  A("div", {
4376
4369
  class: "absolute left-[-3px] right-[-3px] top-0 bottom-0 resize-handle z-10",
4377
4370
  onMousedown: i[0] || (i[0] = //@ts-ignore
4378
4371
  (...p) => n(o) && n(o)(...p))
4379
4372
  }, null, 32)
4380
4373
  ]),
4381
- A("div", ll, [
4382
- Me(s.$slots, "right-panel", {}, void 0, !0)
4374
+ A("div", il, [
4375
+ Re(s.$slots, "right-panel", {}, void 0, !0)
4383
4376
  ]),
4384
- s.$slots.overlay ? ($(), Z("div", il, [
4385
- Me(s.$slots, "overlay", {}, void 0, !0)
4377
+ s.$slots.overlay ? (P(), Z("div", sl, [
4378
+ Re(s.$slots, "overlay", {}, void 0, !0)
4386
4379
  ])) : Q("", !0)
4387
4380
  ], 512));
4388
4381
  }
4389
- }), pl = /* @__PURE__ */ Qe(ml, [["__scopeId", "data-v-570141b0"]]);
4382
+ }), fl = /* @__PURE__ */ Qe(pl, [["__scopeId", "data-v-570141b0"]]);
4390
4383
  var Ce = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "SELECT_CATEGORY", t.CREATE_CATEGORY = "CREATE_CATEGORY", t.UPDATE_CATEGORY = "UPDATE_CATEGORY", t.DELETE_CATEGORY = "DELETE_CATEGORY", t.SELECT_ITEM = "SELECT_ITEM", t.CREATE_ITEM = "CREATE_ITEM", t.UPDATE_ITEM = "UPDATE_ITEM", t.DELETE_ITEM = "DELETE_ITEM", t.SELECT_PRICE = "SELECT_PRICE", t.SELECT_VARIANT = "SELECT_VARIANT", t.SELECT_GROUP = "SELECT_GROUP", t.EDIT_GROUP = "EDIT_GROUP", t))(Ce || {});
4391
- function fl(t, r, e) {
4384
+ function gl(t, r, e) {
4392
4385
  const o = () => ({
4393
4386
  position: 0,
4394
4387
  subCategoryMeta: {}
@@ -4398,8 +4391,8 @@ function fl(t, r, e) {
4398
4391
  i.subCategoryMeta = i.subCategoryMeta ?? {}, i.subCategoryMeta[p] = i.subCategoryMeta[p] ?? o(), i = i.subCategoryMeta[p];
4399
4392
  return Object.assign(i, e), s;
4400
4393
  }
4401
- function In() {
4402
- const t = ue(), r = Re();
4394
+ function En() {
4395
+ const t = ue(), r = Me();
4403
4396
  async function e(h, b = "New product") {
4404
4397
  const _ = {
4405
4398
  ...Le.generator.initMenuV4Item(),
@@ -4440,12 +4433,12 @@ function In() {
4440
4433
  const E = g.get(S.id);
4441
4434
  if (E) {
4442
4435
  let m = null;
4443
- w && w._id !== b._id && (m = so(
4436
+ w && w._id !== b._id && (m = uo(
4444
4437
  E,
4445
4438
  w == null ? void 0 : w._id,
4446
4439
  b._id
4447
4440
  ));
4448
- const T = uo(
4441
+ const T = co(
4449
4442
  m ?? E,
4450
4443
  b._id,
4451
4444
  F + 1
@@ -4453,7 +4446,7 @@ function In() {
4453
4446
  Object.assign(E, T);
4454
4447
  }
4455
4448
  } else if (S.type === "subCategory")
4456
- v = fl(v, [..._, S.id], {
4449
+ v = gl(v, [..._, S.id], {
4457
4450
  position: F
4458
4451
  });
4459
4452
  else
@@ -4480,8 +4473,8 @@ function In() {
4480
4473
  }
4481
4474
  var Ze = /* @__PURE__ */ ((t) => (t.CATEGORY = "category", t.ITEM = "item", t.SUB_CATEGORY = "subCategory", t))(Ze || {});
4482
4475
  const st = /* @__PURE__ */ new Map(), ut = /* @__PURE__ */ new Map();
4483
- function gl() {
4484
- const { t } = me(), r = ue(), e = gt(), o = In(), s = V(
4476
+ function vl() {
4477
+ const { t } = me(), r = ue(), e = gt(), o = En(), s = V(
4485
4478
  () => r.subcategories.reduce((a, I) => (a[I._id] = I, a), {})
4486
4479
  );
4487
4480
  function i(a) {
@@ -4512,33 +4505,33 @@ function gl() {
4512
4505
  if (!(U != null && U.subCategories) || !U.subCategories.length)
4513
4506
  (m = S.children) == null || m.push(T);
4514
4507
  else {
4515
- let M = S.children, O = "";
4516
- for (const R of U.subCategories || []) {
4517
- O += R;
4518
- const x = M.find(
4508
+ let R = S.children, O = "";
4509
+ for (const M of U.subCategories || []) {
4510
+ O += M;
4511
+ const x = R.find(
4519
4512
  (k) => {
4520
4513
  var l, u;
4521
- return ((l = k.meta) == null ? void 0 : l.nodeType) === "subCategory" && ((u = k.meta) == null ? void 0 : u.rawId) === R;
4514
+ return ((l = k.meta) == null ? void 0 : l.nodeType) === "subCategory" && ((u = k.meta) == null ? void 0 : u.rawId) === M;
4522
4515
  }
4523
4516
  );
4524
4517
  if (x)
4525
- x.children = x.children || [], M = x.children;
4518
+ x.children = x.children || [], R = x.children;
4526
4519
  else {
4527
4520
  const k = {
4528
4521
  id: `category-${I.label}-sub-category-${O}`,
4529
- label: i(R),
4530
- icon: Pe.CATEGORY,
4522
+ label: i(M),
4523
+ icon: $e.CATEGORY,
4531
4524
  children: [],
4532
4525
  draggable: !0,
4533
4526
  meta: {
4534
4527
  nodeType: "subCategory",
4535
- rawId: R
4528
+ rawId: M
4536
4529
  }
4537
4530
  };
4538
- M.push(k), M = k.children;
4531
+ R.push(k), R = k.children;
4539
4532
  }
4540
4533
  }
4541
- M.push(T);
4534
+ R.push(T);
4542
4535
  }
4543
4536
  }
4544
4537
  return S;
@@ -4564,13 +4557,13 @@ function gl() {
4564
4557
  var F, E, m, T;
4565
4558
  if (!a.children)
4566
4559
  return a;
4567
- const I = ((E = (F = _(a)) == null ? void 0 : F.meta) == null ? void 0 : E.rawId) ?? null, S = co(I);
4560
+ const I = ((E = (F = _(a)) == null ? void 0 : F.meta) == null ? void 0 : E.rawId) ?? null, S = mo(I);
4568
4561
  return ((m = a.meta) == null ? void 0 : m.nodeType) === "category" || ((T = a.meta) == null ? void 0 : T.nodeType) === "subCategory" ? (a.children = bt(
4569
4562
  a.children,
4570
4563
  (U) => U.label,
4571
4564
  (U) => {
4572
- var M, O;
4573
- if (((M = U.meta) == null ? void 0 : M.nodeType) === "subCategory")
4565
+ var R, O;
4566
+ if (((R = U.meta) == null ? void 0 : R.nodeType) === "subCategory")
4574
4567
  return b(U);
4575
4568
  if (((O = U.meta) == null ? void 0 : O.nodeType) === "item")
4576
4569
  return S(U.meta.rawObject);
@@ -4583,7 +4576,7 @@ function gl() {
4583
4576
  }
4584
4577
  async function g({ eventEmitter: a }) {
4585
4578
  var H, ee, ie, pe;
4586
- const I = r.state.menu, S = !r.state.currentCatalogId, F = !r.state.currentSchedulerId, E = (((ee = (H = r.currentCatalog) == null ? void 0 : H.linkItemRules) == null ? void 0 : ee.length) ?? 0) > 0, m = yo(), T = r.mergedMenu;
4579
+ const I = r.state.menu, S = !r.state.currentCatalogId, F = !r.state.currentSchedulerId, E = (((ee = (H = r.currentCatalog) == null ? void 0 : H.linkItemRules) == null ? void 0 : ee.length) ?? 0) > 0, m = ho(), T = r.mergedMenu;
4587
4580
  st.clear(), ut.clear();
4588
4581
  for (const d of I.modules.item)
4589
4582
  st.set(d._id, d);
@@ -4600,7 +4593,7 @@ function gl() {
4600
4593
  }
4601
4594
  };
4602
4595
  }
4603
- function M(d, D, N) {
4596
+ function R(d, D, N) {
4604
4597
  var L;
4605
4598
  const W = T.modules.group.find(
4606
4599
  (K) => K._id === N._id
@@ -4644,7 +4637,7 @@ function gl() {
4644
4637
  const ce = st.get(K._id);
4645
4638
  if (ce)
4646
4639
  return re ? (Ke = (xe = ce.variant) == null ? void 0 : xe.variantCombinations.find(
4647
- (Tn) => Tn.combinationKey === K.combinationKey
4640
+ (xn) => xn.combinationKey === K.combinationKey
4648
4641
  )) == null ? void 0 : Ke.code : ce.code;
4649
4642
  }
4650
4643
  function z() {
@@ -4663,7 +4656,7 @@ function gl() {
4663
4656
  };
4664
4657
  return {
4665
4658
  id: `item-${d._id}-variant-${D == null ? void 0 : D.combinationKey}-group-${N._id}-${K._id}-${K.combinationKey}-${X}`,
4666
- icon: K.combinationKey ? Pe.VARIANT : Pe.ITEM,
4659
+ icon: K.combinationKey ? $e.VARIANT : $e.ITEM,
4667
4660
  label: Yt(z(), Ve()),
4668
4661
  rightLabel: se,
4669
4662
  chips: Y() ? [Y()] : void 0
@@ -4698,9 +4691,9 @@ function gl() {
4698
4691
  throw new Error(`Item ${d._id} has unknown group ${re._id}`);
4699
4692
  W.push({
4700
4693
  id: N(ne._id),
4701
- icon: Pe.GROUP,
4694
+ icon: $e.GROUP,
4702
4695
  label: ne.name,
4703
- children: M(d, D, re),
4696
+ children: R(d, D, re),
4704
4697
  onClick: () => {
4705
4698
  a({
4706
4699
  type: Ce.SELECT_GROUP,
@@ -4712,7 +4705,7 @@ function gl() {
4712
4705
  }
4713
4706
  return W;
4714
4707
  }
4715
- function R(d, D) {
4708
+ function M(d, D) {
4716
4709
  return O(d, D);
4717
4710
  }
4718
4711
  function x(d) {
@@ -4723,7 +4716,7 @@ function gl() {
4723
4716
  D.push(...K);
4724
4717
  }
4725
4718
  if (W) {
4726
- const K = (ne, ge) => `item-${ne}-variant-${ge}`, X = Pt(
4719
+ const K = (ne, ge) => `item-${ne}-variant-${ge}`, X = $t(
4727
4720
  I.modules.variant,
4728
4721
  d.variant.variantGroupIds
4729
4722
  ), re = d.variant.variantCombinations.map(
@@ -4733,13 +4726,13 @@ function gl() {
4733
4726
  ), Ee = ht([], ge);
4734
4727
  return {
4735
4728
  id: K(d._id, ne.combinationKey),
4736
- icon: Pe.VARIANT,
4729
+ icon: $e.VARIANT,
4737
4730
  label: Yt(
4738
- rr(X, ne.combinationKey),
4731
+ ar(X, ne.combinationKey),
4739
4732
  ne.code
4740
4733
  ),
4741
- children: R(d, ne),
4742
- rightLabel: Jo(d, ne),
4734
+ children: M(d, ne),
4735
+ rightLabel: Qo(d, ne),
4743
4736
  chips: Ee,
4744
4737
  onClick: () => {
4745
4738
  a({
@@ -4787,7 +4780,7 @@ function gl() {
4787
4780
  }
4788
4781
  }), {
4789
4782
  id: k(d._id),
4790
- icon: Pe.CATEGORY,
4783
+ icon: $e.CATEGORY,
4791
4784
  label: d.name,
4792
4785
  children: [],
4793
4786
  actions: D,
@@ -4798,9 +4791,9 @@ function gl() {
4798
4791
  rawObject: d
4799
4792
  }
4800
4793
  };
4801
- }), u = Cn(T), f = {
4794
+ }), u = kn(T), f = {
4802
4795
  id: k("addon"),
4803
- icon: Pe.CATEGORY,
4796
+ icon: $e.CATEGORY,
4804
4797
  label: t("menu.tree_editor.labels.addon"),
4805
4798
  children: [],
4806
4799
  // addon category is not draggable
@@ -4883,7 +4876,7 @@ function gl() {
4883
4876
  nodeType: "item"
4884
4877
  /* ITEM */
4885
4878
  },
4886
- icon: Pe.ITEM,
4879
+ icon: $e.ITEM,
4887
4880
  label: xe,
4888
4881
  children: ce ? void 0 : x(d),
4889
4882
  chips: ce ? void 0 : de,
@@ -4916,17 +4909,17 @@ function gl() {
4916
4909
  );
4917
4910
  D && (d.chips = ht(d.chips ?? [], D));
4918
4911
  }
4919
- const P = h(l);
4920
- return p(P), {
4921
- tree: v(P)
4912
+ const $ = h(l);
4913
+ return p($), {
4914
+ tree: v($)
4922
4915
  };
4923
4916
  }
4924
4917
  return {
4925
4918
  generateTreeFromMenu: g
4926
4919
  };
4927
4920
  }
4928
- function vl() {
4929
- const t = Re(), r = In(), e = gt(), o = rt();
4921
+ function bl() {
4922
+ const t = Me(), r = En(), e = gt(), o = rt();
4930
4923
  function s(x) {
4931
4924
  t.open({
4932
4925
  message: x,
@@ -5003,15 +4996,15 @@ function vl() {
5003
4996
  if (p(k)) {
5004
4997
  const f = I(x), c = I(k);
5005
4998
  return (f == null ? void 0 : f.id) === (c == null ? void 0 : c.id) ? !0 : !((f == null ? void 0 : f.id) !== (c == null ? void 0 : c.id) && a(c).some(
5006
- (P) => {
4999
+ ($) => {
5007
5000
  var G, H;
5008
- return ((G = P.meta) == null ? void 0 : G.rawId) === ((H = x.meta) == null ? void 0 : H.rawId);
5001
+ return ((G = $.meta) == null ? void 0 : G.rawId) === ((H = x.meta) == null ? void 0 : H.rawId);
5009
5002
  }
5010
5003
  ));
5011
5004
  }
5012
5005
  return i(k) && u && k.id !== u.id && l === "inside" ? !a(k).some((c) => {
5013
- var P, G;
5014
- return ((P = c.meta) == null ? void 0 : P.rawId) === ((G = x.meta) == null ? void 0 : G.rawId);
5006
+ var $, G;
5007
+ return (($ = c.meta) == null ? void 0 : $.rawId) === ((G = x.meta) == null ? void 0 : G.rawId);
5015
5008
  }) : !!(p(k) && (y == null ? void 0 : y.id) !== (u == null ? void 0 : u.id) || h(k));
5016
5009
  }
5017
5010
  const F = (x, k, l) => {
@@ -5029,8 +5022,8 @@ function vl() {
5029
5022
  const c = u.map((G) => {
5030
5023
  var H;
5031
5024
  return (H = G.meta) == null ? void 0 : H.rawId;
5032
- }).filter(Boolean), P = wt(c, y, f);
5033
- await e.rearrange(P);
5025
+ }).filter(Boolean), $ = wt(c, y, f);
5026
+ await e.rearrange($);
5034
5027
  }
5035
5028
  function m(x, k) {
5036
5029
  var l;
@@ -5056,8 +5049,8 @@ function vl() {
5056
5049
  var G;
5057
5050
  const y = w(k), f = ((G = k.children) == null ? void 0 : G.findIndex((H) => H.id === x.id)) ?? -1;
5058
5051
  if (f === -1) throw new Error("Source index not found");
5059
- const c = wt(y, f, l), P = _(k);
5060
- await r.rearrangeWithSubCategory(c, u, P);
5052
+ const c = wt(y, f, l), $ = _(k);
5053
+ await r.rearrangeWithSubCategory(c, u, $);
5061
5054
  }
5062
5055
  async function U(x, k, l, u) {
5063
5056
  var G;
@@ -5071,15 +5064,15 @@ function vl() {
5071
5064
  throw new Error("Expected dragged node to be an item");
5072
5065
  const c = ct(x.meta.rawObject);
5073
5066
  c.category = u._id, c.subCategories = f;
5074
- const P = b(x);
5067
+ const $ = b(x);
5075
5068
  await r.updateItem(c._id, c), await r.rearrangeWithSubCategory(
5076
5069
  y,
5077
5070
  u,
5078
5071
  f,
5079
- P
5072
+ $
5080
5073
  );
5081
5074
  }
5082
- async function M(x, k, l) {
5075
+ async function R(x, k, l) {
5083
5076
  var u;
5084
5077
  try {
5085
5078
  if (!S(x, k, l, x.parent, k.parent)) {
@@ -5121,19 +5114,19 @@ function vl() {
5121
5114
  if (f === -1 || c === -1)
5122
5115
  throw new Error("Source or target index not found");
5123
5116
  l === "after" && c++;
5124
- const P = wt(y, f, c), G = b(u), H = _(u);
5125
- await r.rearrangeWithSubCategory(P, G, H);
5117
+ const $ = wt(y, f, c), G = b(u), H = _(u);
5118
+ await r.rearrangeWithSubCategory($, G, H);
5126
5119
  }
5127
- async function R(x) {
5120
+ async function M(x) {
5128
5121
  const k = o.getNodeById(x.draggedNodeId), l = o.getNodeById(x.targetNodeId);
5129
- !k || !l || (i(k) ? await E(k, l, x.dragPosition) : p(k) ? await M(k, l, x.dragPosition) : h(k) ? await O(k, l, x.dragPosition) : s("Unsupported drag operation"));
5122
+ !k || !l || (i(k) ? await E(k, l, x.dragPosition) : p(k) ? await R(k, l, x.dragPosition) : h(k) ? await O(k, l, x.dragPosition) : s("Unsupported drag operation"));
5130
5123
  }
5131
5124
  return {
5132
5125
  isCategoryNode: i,
5133
5126
  isItemNode: p,
5134
5127
  isSubCategoryNode: h,
5135
5128
  canDropFn: F,
5136
- handleNodeDragDrop: R
5129
+ handleNodeDragDrop: M
5137
5130
  };
5138
5131
  }
5139
5132
  const St = /* @__PURE__ */ le({
@@ -5146,7 +5139,7 @@ const St = /* @__PURE__ */ le({
5146
5139
  const r = t;
5147
5140
  return (e, o) => {
5148
5141
  const s = j("FmIcon");
5149
- return $(), Z("div", {
5142
+ return P(), Z("div", {
5150
5143
  class: ve(`p-4 relative flex items-center justify-center ${r.visible ? "" : "invisible"}`)
5151
5144
  }, [
5152
5145
  C(s, {
@@ -5170,7 +5163,7 @@ const St = /* @__PURE__ */ le({
5170
5163
  setup(t) {
5171
5164
  return (r, e) => {
5172
5165
  const o = j("FmTooltip");
5173
- return r.tooltip ? ($(), J(o, {
5166
+ return r.tooltip ? (P(), J(o, {
5174
5167
  key: 0,
5175
5168
  content: r.tooltip,
5176
5169
  "z-index": 50
@@ -5183,7 +5176,7 @@ const St = /* @__PURE__ */ le({
5183
5176
  }, null, 8, ["name", "visible", "onClick"])
5184
5177
  ]),
5185
5178
  _: 1
5186
- }, 8, ["content"])) : ($(), J(St, {
5179
+ }, 8, ["content"])) : (P(), J(St, {
5187
5180
  key: 1,
5188
5181
  name: r.name,
5189
5182
  visible: r.visible,
@@ -5191,13 +5184,13 @@ const St = /* @__PURE__ */ le({
5191
5184
  }, null, 8, ["name", "visible", "onClick"]));
5192
5185
  };
5193
5186
  }
5194
- }), En = 300;
5195
- function bl(t) {
5187
+ }), Tn = 300;
5188
+ function _l(t) {
5196
5189
  const { itemHeight: r, emit: e, getFlattenedItems: o, getContainerRef: s, canDropFn: i } = t, p = q(!1), h = q(null), b = q(null), _ = q(null), w = q(0), v = q({ x: 0, y: 0 }), g = q(/* @__PURE__ */ new Map());
5197
5190
  function a(E, m) {
5198
- m.button === 0 && (v.value = { x: m.clientX, y: m.clientY }, h.value = E, w.value = m.clientY, g.value = nr(o()), setTimeout(() => {
5191
+ m.button === 0 && (v.value = { x: m.clientX, y: m.clientY }, h.value = E, w.value = m.clientY, g.value = or(o()), setTimeout(() => {
5199
5192
  h.value === E && (p.value = !0, v.value = { x: m.clientX, y: m.clientY }, e("updateDragState", E, null, null), document.addEventListener("mousemove", I), document.addEventListener("mouseup", S));
5200
- }, En));
5193
+ }, Tn));
5201
5194
  }
5202
5195
  function I(E) {
5203
5196
  var x;
@@ -5207,9 +5200,9 @@ function bl(t) {
5207
5200
  });
5208
5201
  const m = s();
5209
5202
  if (!m) return;
5210
- const T = m.getBoundingClientRect(), U = E.clientY - T.top + m.scrollTop, M = Math.floor(U / r), O = o();
5211
- if (M >= 0 && M < O.length) {
5212
- const l = O[M].id;
5203
+ const T = m.getBoundingClientRect(), U = E.clientY - T.top + m.scrollTop, R = Math.floor(U / r), O = o();
5204
+ if (R >= 0 && R < O.length) {
5205
+ const l = O[R].id;
5213
5206
  if (l === h.value) {
5214
5207
  b.value = null, _.value = null, e("updateDragState", h.value, null, null);
5215
5208
  return;
@@ -5226,8 +5219,8 @@ function bl(t) {
5226
5219
  }
5227
5220
  e("updateDragState", h.value, b.value, _.value);
5228
5221
  }
5229
- const R = 50;
5230
- E.clientY - T.top < R ? m.scrollTop -= 10 : T.bottom - E.clientY < R && (m.scrollTop += 10);
5222
+ const M = 50;
5223
+ E.clientY - T.top < M ? m.scrollTop -= 10 : T.bottom - E.clientY < M && (m.scrollTop += 10);
5231
5224
  }
5232
5225
  function S() {
5233
5226
  document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", S), p.value && h.value && b.value && _.value && e("nodeDragDrop", {
@@ -5249,13 +5242,13 @@ function bl(t) {
5249
5242
  cancelDrag: F
5250
5243
  };
5251
5244
  }
5252
- function _l(t, r) {
5245
+ function yl(t, r) {
5253
5246
  let e = null;
5254
5247
  const o = typeof r == "function" ? r : () => r.value;
5255
5248
  function s(h) {
5256
5249
  o() || (e = setTimeout(() => {
5257
5250
  t(h);
5258
- }, En));
5251
+ }, Tn));
5259
5252
  }
5260
5253
  function i() {
5261
5254
  e && (clearTimeout(e), e = null);
@@ -5269,7 +5262,7 @@ function _l(t, r) {
5269
5262
  onMouseUp: p
5270
5263
  };
5271
5264
  }
5272
- const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5265
+ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
5273
5266
  __name: "HighlightableSpan",
5274
5267
  props: {
5275
5268
  text: {},
@@ -5282,35 +5275,35 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5282
5275
  const o = r.highlightedStrings.map((i) => i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), s = new RegExp(`(${o})`, "gi");
5283
5276
  return r.text.replace(s, '<span class="highlighted-span">$1</span>');
5284
5277
  });
5285
- return (o, s) => !o.highlightedStrings || o.highlightedStrings.length === 0 ? ($(), Z("span", yl, be(o.text), 1)) : ($(), Z("span", {
5278
+ return (o, s) => !o.highlightedStrings || o.highlightedStrings.length === 0 ? (P(), Z("span", hl, be(o.text), 1)) : (P(), Z("span", {
5286
5279
  key: 1,
5287
5280
  innerHTML: e.value
5288
- }, null, 8, hl));
5281
+ }, null, 8, wl));
5289
5282
  }
5290
- }), Ct = /* @__PURE__ */ Qe(wl, [["__scopeId", "data-v-f6f1080b"]]), Cl = {
5283
+ }), Ct = /* @__PURE__ */ Qe(Cl, [["__scopeId", "data-v-f6f1080b"]]), kl = {
5291
5284
  class: "flex-1 min-w-0 flex items-center gap-4 relative pl-12"
5292
- }, kl = {
5293
- class: "flex items-center gap-4 min-w-0"
5294
5285
  }, Il = {
5295
- class: "min-w-0 flex-1"
5286
+ class: "flex items-center gap-4 min-w-0"
5296
5287
  }, El = {
5297
- class: "py-4 px-8 space-y-12 fm-typo-en-body-md-400"
5288
+ class: "min-w-0 flex-1"
5298
5289
  }, Tl = {
5299
- class: "flex-shrink-0 flex items-center gap-4"
5290
+ class: "py-4 px-8 space-y-12 fm-typo-en-body-md-400"
5300
5291
  }, xl = {
5301
- class: "right-area flex items-center gap-4"
5292
+ class: "flex-shrink-0 flex items-center gap-4"
5302
5293
  }, Sl = {
5303
- class: "flex flex-nowrap items-center show-on-hover"
5294
+ class: "right-area flex items-center gap-4"
5304
5295
  }, Fl = {
5296
+ class: "flex flex-nowrap items-center show-on-hover"
5297
+ }, Ol = {
5305
5298
  key: 0,
5306
5299
  class: "drop-indicator-before"
5307
- }, Ol = {
5300
+ }, Dl = {
5308
5301
  key: 1,
5309
5302
  class: "drop-indicator-after"
5310
- }, Dl = {
5303
+ }, Vl = {
5311
5304
  key: 2,
5312
5305
  class: "drop-indicator-inside"
5313
- }, Vl = /* @__PURE__ */ le({
5306
+ }, $l = /* @__PURE__ */ le({
5314
5307
  __name: "FmTreeNode",
5315
5308
  props: {
5316
5309
  node: {},
@@ -5346,7 +5339,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5346
5339
  onMouseDown: _,
5347
5340
  onMouseMove: w,
5348
5341
  onMouseUp: v
5349
- } = _l((g) => {
5342
+ } = yl((g) => {
5350
5343
  var a;
5351
5344
  (a = e.node) != null && a.draggable && b("dragStart", g);
5352
5345
  }, () => {
@@ -5356,7 +5349,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5356
5349
  return (g, a) => {
5357
5350
  var F, E, m;
5358
5351
  const I = j("FmIcon"), S = j("FmTooltip");
5359
- return $(), Z("div", {
5352
+ return P(), Z("div", {
5360
5353
  class: ve(["tree-node", "max-w-full", "py-4 px-8 flex items-center justify-between gap-4", "fm-corner-radius-sm", "select-none", s.value, i.value, p.value, {
5361
5354
  "opacity-50": g.dragging
5362
5355
  }, "hover-effect"]),
@@ -5372,7 +5365,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5372
5365
  (...T) => n(v) && n(v)(...T)),
5373
5366
  onMouseleave: a[6] || (a[6] = //@ts-ignore
5374
5367
  (...T) => n(v) && n(v)(...T))
5375
- }, [A("div", Cl, [A("div", kl, [(F = g.node) != null && F.draggable && !g.node.disabled ? ($(), J(I, {
5368
+ }, [A("div", kl, [A("div", Il, [(F = g.node) != null && F.draggable && !g.node.disabled ? (P(), J(I, {
5376
5369
  key: 0,
5377
5370
  name: "drag_indicator",
5378
5371
  size: "sm",
@@ -5384,19 +5377,19 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5384
5377
  onClick: a[0] || (a[0] = qe(() => {
5385
5378
  g.node.disabled || b("toggleExpand");
5386
5379
  }, ["stop"]))
5387
- }, null, 8, ["name", "visible"]), g.node.icon ? ($(), J(I, {
5380
+ }, null, 8, ["name", "visible"]), g.node.icon ? (P(), J(I, {
5388
5381
  key: 1,
5389
5382
  size: "sm",
5390
5383
  outline: "",
5391
5384
  name: g.node.icon,
5392
5385
  class: "text-fm-color-neutral-gray-400 flex-shrink-0"
5393
- }, null, 8, ["name"])) : Q("", !0), A("div", Il, [C(S, {
5386
+ }, null, 8, ["name"])) : Q("", !0), A("div", El, [C(S, {
5394
5387
  content: g.node.label,
5395
5388
  variant: "rich",
5396
5389
  placement: "top",
5397
5390
  "z-index": 50
5398
5391
  }, {
5399
- content: B(() => [A("div", El, [C(Ct, {
5392
+ content: B(() => [A("div", Tl, [C(Ct, {
5400
5393
  class: ve(`${h.value} block`),
5401
5394
  text: g.node.label,
5402
5395
  highlightedStrings: g.highlightedStrings
@@ -5407,35 +5400,35 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5407
5400
  highlightedStrings: g.highlightedStrings
5408
5401
  }, null, 8, ["class", "text", "highlightedStrings"])]),
5409
5402
  _: 1
5410
- }, 8, ["content"])])]), A("div", Tl, [($(!0), Z(Oe, null, Ne(g.node.chips, (T) => ($(), J(Uo, {
5403
+ }, 8, ["content"])])]), A("div", xl, [(P(!0), Z(Oe, null, Ne(g.node.chips, (T) => (P(), J(Mo, {
5411
5404
  key: T.label,
5412
5405
  size: T.size || "xs",
5413
5406
  label: T.label,
5414
5407
  variant: T.variant || "neutral",
5415
5408
  border: T.border
5416
- }, null, 8, ["size", "label", "variant", "border"]))), 128))])]), A("div", xl, [A("div", Sl, [($(!0), Z(Oe, null, Ne(g.node.actions, (T) => ($(), J(Ft, {
5409
+ }, null, 8, ["size", "label", "variant", "border"]))), 128))])]), A("div", Sl, [A("div", Fl, [(P(!0), Z(Oe, null, Ne(g.node.actions, (T) => (P(), J(Ft, {
5417
5410
  key: T.id,
5418
5411
  name: T.icon,
5419
5412
  tooltip: T.tooltip,
5420
5413
  visible: !0,
5421
5414
  onClick: (U) => {
5422
- var M;
5423
- return (M = T.onClick) == null ? void 0 : M.call(T);
5415
+ var R;
5416
+ return (R = T.onClick) == null ? void 0 : R.call(T);
5424
5417
  }
5425
5418
  }, null, 8, ["name", "tooltip", "onClick"]))), 128))]), C(Ct, {
5426
5419
  class: ve(["fm-typo-en-body-md-400", ((E = g.node.rightLabel) == null ? void 0 : E.variant) === n(Je).PRIMARY ? "text-fm-color-primary" : "text-fm-color-typo-secondary"]),
5427
5420
  text: (m = g.node.rightLabel) == null ? void 0 : m.label,
5428
5421
  highlightedStrings: g.highlightedStrings,
5429
5422
  onClick: a[1] || (a[1] = qe((T) => {
5430
- var U, M;
5431
- return (M = (U = g.node.rightLabel) == null ? void 0 : U.onClick) == null ? void 0 : M.call(U);
5423
+ var U, R;
5424
+ return (R = (U = g.node.rightLabel) == null ? void 0 : U.onClick) == null ? void 0 : R.call(U);
5432
5425
  }, ["stop"]))
5433
- }, null, 8, ["class", "text", "highlightedStrings"])]), g.dropTarget && g.dropPosition === "before" ? ($(), Z("div", Fl)) : Q("", !0), g.dropTarget && g.dropPosition === "after" ? ($(), Z("div", Ol)) : Q("", !0), g.dropTarget && g.dropPosition === "inside" ? ($(), Z("div", Dl)) : Q("", !0)], 34);
5426
+ }, null, 8, ["class", "text", "highlightedStrings"])]), g.dropTarget && g.dropPosition === "before" ? (P(), Z("div", Ol)) : Q("", !0), g.dropTarget && g.dropPosition === "after" ? (P(), Z("div", Dl)) : Q("", !0), g.dropTarget && g.dropPosition === "inside" ? (P(), Z("div", Vl)) : Q("", !0)], 34);
5434
5427
  };
5435
5428
  }
5436
- }), Pl = ["id"], $l = {
5429
+ }), Pl = ["id"], Ul = {
5437
5430
  class: "flex items-center gap-4 min-w-fit px-8"
5438
- }, Ul = {
5431
+ }, Ml = {
5439
5432
  key: 1,
5440
5433
  class: "empty-tree-message"
5441
5434
  }, kt = 32, Rl = /* @__PURE__ */ le({
@@ -5457,21 +5450,21 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5457
5450
  t: o
5458
5451
  } = me(), s = t, i = e;
5459
5452
  function p(O) {
5460
- const R = s.expandedNodeIds;
5461
- R != null && R.includes(O) ? i("updateExpandedNodeIds", R.filter((x) => x !== O)) : i("updateExpandedNodeIds", [...R || [], O]);
5453
+ const M = s.expandedNodeIds;
5454
+ M != null && M.includes(O) ? i("updateExpandedNodeIds", M.filter((x) => x !== O)) : i("updateExpandedNodeIds", [...M || [], O]);
5462
5455
  }
5463
5456
  const h = V(() => new Set(s.expandedNodeIds)), b = V(() => {
5464
5457
  const O = [];
5465
- function R(x, k = 0) {
5458
+ function M(x, k = 0) {
5466
5459
  if (x)
5467
5460
  for (const l of x)
5468
5461
  O.push({
5469
5462
  id: l.id,
5470
5463
  level: k,
5471
5464
  node: l
5472
- }), h.value.has(l.id) && l.children && l.children.length > 0 && R(l.children, k + 1);
5465
+ }), h.value.has(l.id) && l.children && l.children.length > 0 && M(l.children, k + 1);
5473
5466
  }
5474
- return R(s.nodes), O;
5467
+ return M(s.nodes), O;
5475
5468
  });
5476
5469
  q(null);
5477
5470
  const {
@@ -5479,20 +5472,20 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5479
5472
  scrollTo: w,
5480
5473
  containerProps: v,
5481
5474
  wrapperProps: g
5482
- } = Wo(b, {
5475
+ } = qo(b, {
5483
5476
  itemHeight: kt,
5484
5477
  overscan: 10
5485
5478
  });
5486
5479
  we(() => b.value.length, async (O) => {
5487
- const R = v.ref.value;
5488
- R && O * kt < R.scrollTop && (await tt(), w(0));
5480
+ const M = v.ref.value;
5481
+ M && O * kt < M.scrollTop && (await tt(), w(0));
5489
5482
  });
5490
5483
  function a() {
5491
5484
  w(0);
5492
5485
  }
5493
5486
  function I(O) {
5494
- const R = b.value.findIndex((x) => x.id === O);
5495
- R !== -1 && w(R);
5487
+ const M = b.value.findIndex((x) => x.id === O);
5488
+ M !== -1 && w(M);
5496
5489
  }
5497
5490
  const {
5498
5491
  isDragging: S,
@@ -5501,11 +5494,11 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5501
5494
  dropPosition: m,
5502
5495
  mousePosition: T,
5503
5496
  onDragStart: U,
5504
- cancelDrag: M
5505
- } = bl({
5497
+ cancelDrag: R
5498
+ } = _l({
5506
5499
  itemHeight: kt,
5507
- emit: (O, ...R) => {
5508
- O === "updateDragState" ? i("updateDragState", ...R) : O === "nodeDragDrop" && i("nodeDragDrop", R[0]);
5500
+ emit: (O, ...M) => {
5501
+ O === "updateDragState" ? i("updateDragState", ...M) : O === "nodeDragDrop" && i("nodeDragDrop", M[0]);
5509
5502
  },
5510
5503
  getFlattenedItems: () => b.value,
5511
5504
  getContainerRef: () => v.ref.value,
@@ -5514,17 +5507,17 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5514
5507
  return r({
5515
5508
  scrollToTop: a,
5516
5509
  scrollToNode: I,
5517
- cancelDrag: M
5518
- }), (O, R) => {
5510
+ cancelDrag: R
5511
+ }), (O, M) => {
5519
5512
  var k;
5520
5513
  const x = j("FmIcon");
5521
- return $(), Z("div", Vn({
5514
+ return P(), Z("div", $n({
5522
5515
  class: "tree-container"
5523
- }, n(v)), [A("div", Pn($n(n(g))), [($(!0), Z(Oe, null, Ne(n(_), ({
5516
+ }, n(v)), [A("div", Pn(Un(n(g))), [(P(!0), Z(Oe, null, Ne(n(_), ({
5524
5517
  data: l
5525
5518
  }) => {
5526
5519
  var u;
5527
- return $(), Z("div", {
5520
+ return P(), Z("div", {
5528
5521
  key: l.id,
5529
5522
  class: ve(["tree-node-wrapper", {
5530
5523
  "drop-target": n(E) === l.id,
@@ -5534,7 +5527,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5534
5527
  "being-dragged": n(F) === l.id
5535
5528
  }]),
5536
5529
  id: `tree-node-${l.id}`
5537
- }, [($(), J(Vl, {
5530
+ }, [(P(), J($l, {
5538
5531
  key: l.id,
5539
5532
  node: l.node,
5540
5533
  selected: s.selectedNodeId === l.id,
@@ -5550,7 +5543,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5550
5543
  paddingLeft: `${l.level * 20}px`
5551
5544
  })
5552
5545
  }, null, 8, ["node", "selected", "expandable", "expanded", "highlightedStrings", "dragging", "dropTarget", "dropPosition", "onToggleExpand", "onDragStart", "style"]))], 10, Pl);
5553
- }), 128))], 16), n(S) && n(F) ? ($(), Z("div", {
5546
+ }), 128))], 16), n(S) && n(F) ? (P(), Z("div", {
5554
5547
  key: 0,
5555
5548
  class: "drag-overlay",
5556
5549
  style: dt({
@@ -5559,12 +5552,12 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5559
5552
  transform: "translate3d(0,0,0)"
5560
5553
  // Force hardware acceleration
5561
5554
  })
5562
- }, [A("div", $l, [C(x, {
5555
+ }, [A("div", Ul, [C(x, {
5563
5556
  name: "drag_indicator"
5564
- }), A("span", null, be((k = b.value.find((l) => l.id === n(F))) == null ? void 0 : k.node.label), 1)])], 4)) : Q("", !0), b.value.length === 0 ? ($(), Z("div", Ul, be(n(o)("menu.tree_editor.labels.no_items")), 1)) : Q("", !0)], 16);
5557
+ }), A("span", null, be((k = b.value.find((l) => l.id === n(F))) == null ? void 0 : k.node.label), 1)])], 4)) : Q("", !0), b.value.length === 0 ? (P(), Z("div", Ml, be(n(o)("menu.tree_editor.labels.no_items")), 1)) : Q("", !0)], 16);
5565
5558
  };
5566
5559
  }
5567
- }), Ml = /* @__PURE__ */ Qe(Rl, [["__scopeId", "data-v-9244f342"]]), Al = { class: "py-4 px-8 flex items-center gap-4 text-fm-color-primary cursor-pointer relative" }, Nl = {
5560
+ }), Al = /* @__PURE__ */ Qe(Rl, [["__scopeId", "data-v-9244f342"]]), Nl = { class: "py-4 px-8 flex items-center gap-4 text-fm-color-primary cursor-pointer relative" }, Ll = {
5568
5561
  key: 1,
5569
5562
  class: "fm-typo-en-body-md-400"
5570
5563
  }, It = /* @__PURE__ */ le({
@@ -5576,23 +5569,23 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5576
5569
  setup(t) {
5577
5570
  return (r, e) => {
5578
5571
  const o = j("FmIcon");
5579
- return $(), Z("div", Al, [
5580
- r.icon ? ($(), J(o, {
5572
+ return P(), Z("div", Nl, [
5573
+ r.icon ? (P(), J(o, {
5581
5574
  key: 0,
5582
5575
  name: r.icon
5583
5576
  }, null, 8, ["name"])) : Q("", !0),
5584
- r.label ? ($(), Z("span", Nl, be(r.label), 1)) : Q("", !0),
5577
+ r.label ? (P(), Z("span", Ll, be(r.label), 1)) : Q("", !0),
5585
5578
  e[0] || (e[0] = A("div", { class: "absolute inset-0 fm-corner-radius-md hover:bg-fm-color-opacity-sm" }, null, -1))
5586
5579
  ]);
5587
5580
  };
5588
5581
  }
5589
- }), Ll = {
5582
+ }), Gl = {
5590
5583
  class: "flex flex-col gap-4"
5591
- }, Gl = {
5592
- class: "flex items-center justify-between"
5593
5584
  }, Kl = {
5585
+ class: "flex items-center justify-between"
5586
+ }, Bl = {
5594
5587
  class: "flex items-center"
5595
- }, Bl = /* @__PURE__ */ le({
5588
+ }, zl = /* @__PURE__ */ le({
5596
5589
  __name: "ProductsTree",
5597
5590
  props: {
5598
5591
  menu: {},
@@ -5606,24 +5599,24 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5606
5599
  const e = t, o = r, s = rt(), i = ue(), p = gt(), {
5607
5600
  canDropFn: h,
5608
5601
  handleNodeDragDrop: b
5609
- } = vl(), _ = V(() => e.filterState.searchKey), w = Po(_, 300), {
5602
+ } = bl(), _ = V(() => e.filterState.searchKey), w = Po(_, 300), {
5610
5603
  generateTreeFromMenu: v
5611
- } = gl();
5604
+ } = vl();
5612
5605
  async function g() {
5613
5606
  return await v({
5614
5607
  filterState: e.filterState,
5615
- eventEmitter: (M) => {
5616
- o("tree-event", M);
5608
+ eventEmitter: (R) => {
5609
+ o("tree-event", R);
5617
5610
  }
5618
5611
  });
5619
5612
  }
5620
5613
  we([() => e.overridedMenu, () => w.value], async () => {
5621
- const M = await g();
5614
+ const R = await g();
5622
5615
  if (e.filterState.searchKey) {
5623
- const O = er(M.tree, e.filterState.searchKey);
5616
+ const O = tr(R.tree, e.filterState.searchKey);
5624
5617
  s.setTreeNodes(O.subTree), s.setExpandedNodeIds(O.shouldExpandNodeIds);
5625
5618
  } else
5626
- s.setTreeNodes(M.tree);
5619
+ s.setTreeNodes(R.tree);
5627
5620
  });
5628
5621
  const {
5629
5622
  t: a
@@ -5635,13 +5628,13 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5635
5628
  catalogManager: m,
5636
5629
  schedulerManager: T,
5637
5630
  noScheduler: U
5638
- } = ho(!0);
5639
- return (M, O) => ($(), Z("div", Ll, [A("div", Gl, [n(i).rules.category.create ? ($(), J(It, {
5631
+ } = wo(!0);
5632
+ return (R, O) => (P(), Z("div", Gl, [A("div", Kl, [n(i).rules.category.create ? (P(), J(It, {
5640
5633
  key: 0,
5641
5634
  label: n(a)("menu.tree_editor.actions.add_category"),
5642
5635
  icon: "add",
5643
- onClick: O[0] || (O[0] = (R) => n(p).create())
5644
- }, null, 8, ["label"])) : Q("", !0), n(i).state.currentCatalogId && !n(i).state.currentSchedulerId ? ($(), J(xt, {
5636
+ onClick: O[0] || (O[0] = (M) => n(p).create())
5637
+ }, null, 8, ["label"])) : Q("", !0), n(i).state.currentCatalogId && !n(i).state.currentSchedulerId ? (P(), J(xt, {
5645
5638
  key: 1,
5646
5639
  "categorized-items": n(m).linkableItems.value,
5647
5640
  "initial-value": n(m).currentItems.value,
@@ -5654,14 +5647,14 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5654
5647
  onSubmit: n(E)
5655
5648
  }, {
5656
5649
  default: B(({
5657
- trigger: R
5650
+ trigger: M
5658
5651
  }) => [C(It, {
5659
5652
  label: n(a)("menu.catalog.edit.link_product"),
5660
5653
  icon: "link",
5661
- onClick: R
5654
+ onClick: M
5662
5655
  }, null, 8, ["label", "onClick"])]),
5663
5656
  _: 1
5664
- }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : Q("", !0), n(i).state.currentSchedulerId ? ($(), J(xt, {
5657
+ }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : Q("", !0), n(i).state.currentSchedulerId ? (P(), J(xt, {
5665
5658
  key: 2,
5666
5659
  "categorized-items": n(T).linkableItems.value,
5667
5660
  "initial-value": n(T).currentItems.value,
@@ -5674,36 +5667,36 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5674
5667
  onSubmit: n(E)
5675
5668
  }, {
5676
5669
  default: B(({
5677
- trigger: R
5670
+ trigger: M
5678
5671
  }) => [C(It, {
5679
5672
  label: n(a)("menu.catalog.edit.apply_scheduler"),
5680
5673
  icon: "link",
5681
- onClick: R
5674
+ onClick: M
5682
5675
  }, null, 8, ["label", "onClick"])]),
5683
5676
  _: 1
5684
- }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : Q("", !0), A("div", Kl, [C(Ft, {
5677
+ }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : Q("", !0), A("div", Bl, [C(Ft, {
5685
5678
  name: "expand_all",
5686
5679
  tooltip: n(a)("menu.tree_editor.actions.expand_all"),
5687
5680
  visible: !0,
5688
- onClick: O[1] || (O[1] = (R) => n(s).expandAllNodes())
5681
+ onClick: O[1] || (O[1] = (M) => n(s).expandAllNodes())
5689
5682
  }, null, 8, ["tooltip"]), C(Ft, {
5690
5683
  name: "collapse_all",
5691
5684
  tooltip: n(a)("menu.tree_editor.actions.collapse_all"),
5692
5685
  visible: !0,
5693
- onClick: O[2] || (O[2] = (R) => n(s).collapseAllNodes())
5694
- }, null, 8, ["tooltip"])])]), C(eo, null, {
5695
- default: B(() => [C(Ml, {
5686
+ onClick: O[2] || (O[2] = (M) => n(s).collapseAllNodes())
5687
+ }, null, 8, ["tooltip"])])]), C(to, null, {
5688
+ default: B(() => [C(Al, {
5696
5689
  nodes: n(s).treeNodes,
5697
5690
  selectedNodeId: n(s).selectedNodeId,
5698
5691
  expandedNodeIds: n(s).expandedNodeIds,
5699
5692
  canDropFn: n(h),
5700
- onUpdateExpandedNodeIds: O[3] || (O[3] = (R) => n(s).setExpandedNodeIds(R)),
5701
- onNodeDragDrop: O[4] || (O[4] = (R) => n(b)(R))
5693
+ onUpdateExpandedNodeIds: O[3] || (O[3] = (M) => n(s).setExpandedNodeIds(M)),
5694
+ onNodeDragDrop: O[4] || (O[4] = (M) => n(b)(M))
5702
5695
  }, null, 8, ["nodes", "selectedNodeId", "expandedNodeIds", "canDropFn"])]),
5703
5696
  _: 1
5704
5697
  })]));
5705
5698
  }
5706
- }), zl = { class: "space-y-8" }, Yl = /* @__PURE__ */ le({
5699
+ }), Yl = { class: "space-y-8" }, jl = /* @__PURE__ */ le({
5707
5700
  __name: "TreeFilter",
5708
5701
  props: /* @__PURE__ */ qt({
5709
5702
  menu: {}
@@ -5747,7 +5740,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5747
5740
  });
5748
5741
  return (v, g) => {
5749
5742
  const a = j("FmSearch");
5750
- return $(), Z("div", zl, [
5743
+ return P(), Z("div", Yl, [
5751
5744
  C(Kt, {
5752
5745
  "model-value": s.value.catalogId || "",
5753
5746
  items: i.value,
@@ -5756,7 +5749,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5756
5749
  "custom-label": p.value,
5757
5750
  "onUpdate:modelValue": g[0] || (g[0] = (I) => s.value.catalogId = I)
5758
5751
  }, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"]),
5759
- b.value ? ($(), J(Kt, {
5752
+ b.value ? (P(), J(Kt, {
5760
5753
  key: 0,
5761
5754
  "model-value": s.value.schedulerId || "",
5762
5755
  items: _.value,
@@ -5765,7 +5758,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5765
5758
  "custom-label": h.value,
5766
5759
  "onUpdate:modelValue": g[1] || (g[1] = (I) => s.value.schedulerId = I)
5767
5760
  }, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"])) : Q("", !0),
5768
- w.value ? ($(), J($o, {
5761
+ w.value ? (P(), J(Uo, {
5769
5762
  key: 1,
5770
5763
  "current-restaurant-attr-params": n(o).state.currentRestaurantAttrParams,
5771
5764
  onConfirm: g[2] || (g[2] = (I) => n(o).setRestaurantAttrParams(I)),
@@ -5780,10 +5773,10 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5780
5773
  ]);
5781
5774
  };
5782
5775
  }
5783
- }), jl = { class: "h-full flex flex-col relative" }, Wl = { class: "p-8" }, ql = { class: "flex-1 p-8" }, Hl = {
5776
+ }), Wl = { class: "h-full flex flex-col relative" }, ql = { class: "p-8" }, Hl = { class: "flex-1 p-8" }, Xl = {
5784
5777
  key: 0,
5785
5778
  class: "absolute inset-0 flex items-center justify-center tree-overlay"
5786
- }, Xl = { class: "flex items-center justify-center gap-16" }, Jl = /* @__PURE__ */ le({
5779
+ }, Jl = { class: "flex items-center justify-center gap-16" }, Ql = /* @__PURE__ */ le({
5787
5780
  __name: "TreePanel",
5788
5781
  props: {
5789
5782
  menu: {},
@@ -5801,31 +5794,31 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5801
5794
  s.selectCatalog(o.value.catalogId), s.selectScheduler(o.value.schedulerId);
5802
5795
  }), (i, p) => {
5803
5796
  const h = j("FmCircularProgress");
5804
- return $(), Z("div", jl, [
5805
- A("div", Wl, [
5806
- C(Yl, {
5797
+ return P(), Z("div", Wl, [
5798
+ A("div", ql, [
5799
+ C(jl, {
5807
5800
  menu: i.menu,
5808
5801
  modelValue: o.value,
5809
5802
  "onUpdate:modelValue": p[0] || (p[0] = (b) => o.value = b)
5810
5803
  }, null, 8, ["menu", "modelValue"])
5811
5804
  ]),
5812
- A("div", ql, [
5813
- C(Bl, {
5805
+ A("div", Hl, [
5806
+ C(zl, {
5814
5807
  menu: i.menu,
5815
5808
  "overrided-menu": i.overridedMenu,
5816
5809
  "filter-state": o.value,
5817
5810
  onTreeEvent: p[1] || (p[1] = (b) => e("tree-event", b))
5818
5811
  }, null, 8, ["menu", "overrided-menu", "filter-state"])
5819
5812
  ]),
5820
- i.loading ? ($(), Z("div", Hl, [
5821
- A("div", Xl, [
5813
+ i.loading ? (P(), Z("div", Xl, [
5814
+ A("div", Jl, [
5822
5815
  C(h, { size: "lg" })
5823
5816
  ])
5824
5817
  ])) : Q("", !0)
5825
5818
  ]);
5826
5819
  };
5827
5820
  }
5828
- }), Ql = { class: "pl-24 scroll-y-auto h-full overflow-y-auto relative" }, Zl = { key: 1 }, ei = { class: "text-center text-sm text-gray-500 p-16" }, ti = /* @__PURE__ */ le({
5821
+ }), Zl = { class: "pl-24 scroll-y-auto h-full overflow-y-auto relative" }, ei = { key: 1 }, ti = { class: "text-center text-sm text-gray-500 p-16" }, ni = /* @__PURE__ */ le({
5829
5822
  __name: "TreeEditor",
5830
5823
  props: {
5831
5824
  menu: {}
@@ -5837,7 +5830,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5837
5830
  }), Ot(() => {
5838
5831
  o.$dispose(), s.setExpandedNodeIds([]), s.setSelectedNodeId(null);
5839
5832
  });
5840
- const i = q(null), { currentItemId: p, initialForm: h, itemFormKey: b } = ir(o), { saveItemFormEditingStateDebounced: _ } = or(i, o), w = q(null);
5833
+ const i = q(null), { currentItemId: p, initialForm: h, itemFormKey: b } = sr(o), { saveItemFormEditingStateDebounced: _ } = rr(i, o), w = q(null);
5841
5834
  async function v(a) {
5842
5835
  if (a.type === Ce.SELECT_ITEM || a.type === Ce.SELECT_PRICE || a.type === Ce.SELECT_GROUP || a.type === Ce.SELECT_VARIANT) {
5843
5836
  if (!g(a.itemId))
@@ -5866,9 +5859,9 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5866
5859
  }
5867
5860
  return a && (p.value = a, s.setSelectedNodeByItemId(a)), !0;
5868
5861
  }
5869
- return (a, I) => ($(), J(pl, null, {
5862
+ return (a, I) => (P(), J(fl, null, {
5870
5863
  "left-panel": B(() => [
5871
- C(Jl, {
5864
+ C(Ql, {
5872
5865
  menu: a.menu,
5873
5866
  "overrided-menu": n(o).mergedMenu,
5874
5867
  loading: n(o).workerIsComputing,
@@ -5876,8 +5869,8 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5876
5869
  }, null, 8, ["menu", "overrided-menu", "loading"])
5877
5870
  ]),
5878
5871
  "right-panel": B(() => [
5879
- A("div", Ql, [
5880
- n(h) ? ($(), J(ol, {
5872
+ A("div", Zl, [
5873
+ n(h) ? (P(), J(rl, {
5881
5874
  ref_key: "itemFormRef",
5882
5875
  ref: i,
5883
5876
  key: n(b),
@@ -5887,24 +5880,24 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5887
5880
  "category-id": null,
5888
5881
  focused: w.value,
5889
5882
  "onUpdate:editingState": n(_)
5890
- }, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : ($(), Z("div", Zl, [
5891
- A("div", ei, be(n(r)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)
5883
+ }, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : (P(), Z("div", ei, [
5884
+ A("div", ti, be(n(r)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)
5892
5885
  ]))
5893
5886
  ])
5894
5887
  ]),
5895
5888
  _: 1
5896
5889
  }));
5897
5890
  }
5898
- }), ni = {
5891
+ }), oi = {
5899
5892
  class: /* @__PURE__ */ ve([
5900
5893
  "flex items-center",
5901
5894
  "px-24 pt-16 pb-8",
5902
5895
  "border-b border-fm-color-neutral-gray-100",
5903
5896
  "space-x-4"
5904
5897
  ])
5905
- }, oi = { class: "fm-typo-en-title-sm-600 mr-auto" }, ri = { class: "flex items-center gap-8" }, ai = {
5898
+ }, ri = { class: "fm-typo-en-title-sm-600 mr-auto" }, ai = { class: "flex items-center gap-8" }, li = {
5906
5899
  class: /* @__PURE__ */ ve(["flex flex-col", "flex-1 overflow-scroll", "w-full"])
5907
- }, li = /* @__PURE__ */ le({
5900
+ }, ii = /* @__PURE__ */ le({
5908
5901
  __name: "TreeEditorForm",
5909
5902
  props: {
5910
5903
  menu: {},
@@ -5912,15 +5905,15 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5912
5905
  },
5913
5906
  emits: ["update:show", "submit"],
5914
5907
  setup(t, { emit: r }) {
5915
- const e = t, o = Re(), { minor: s } = nt(o), { t: i } = me(), p = r, h = () => {
5908
+ const e = t, o = Me(), { minor: s } = nt(o), { t: i } = me(), p = r, h = () => {
5916
5909
  p("update:show", !1);
5917
5910
  }, b = ft(), _ = ue();
5918
5911
  _.selectCatalog(null), _.selectScheduler(null);
5919
5912
  const w = q(!1), v = () => {
5920
5913
  s(
5921
5914
  async () => {
5922
- wn(), await tt();
5923
- const a = _.state.menu, I = mo(a);
5915
+ Cn(), await tt();
5916
+ const a = _.state.menu, I = po(a);
5924
5917
  await b.updateMenuSetting(I), await b.importMenu(I), h();
5925
5918
  },
5926
5919
  {
@@ -5937,7 +5930,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5937
5930
  );
5938
5931
  return (a, I) => {
5939
5932
  const S = j("fm-button"), F = j("fm-form");
5940
- return $(), J(Un, { to: "body" }, [
5933
+ return P(), J(Mn, { to: "body" }, [
5941
5934
  C(Rn, { name: "fade" }, {
5942
5935
  default: B(() => [
5943
5936
  C(F, {
@@ -5946,12 +5939,12 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5946
5939
  style: dt({ zIndex: a.zIndex }),
5947
5940
  tabindex: "-1",
5948
5941
  onValidationSuccess: v,
5949
- onKeyup: Mn(n(g), ["esc"])
5942
+ onKeyup: An(n(g), ["esc"])
5950
5943
  }, {
5951
5944
  default: B(() => [
5952
- A("div", ni, [
5953
- A("p", oi, be(n(i)("menu.tree_editor.title")), 1),
5954
- A("div", ri, [
5945
+ A("div", oi, [
5946
+ A("p", ri, be(n(i)("menu.tree_editor.title")), 1),
5947
+ A("div", ai, [
5955
5948
  C(S, {
5956
5949
  icon: "undo",
5957
5950
  disabled: !n(_).canUndoHistory,
@@ -5977,8 +5970,8 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5977
5970
  }, null, 8, ["label", "loading"])
5978
5971
  ])
5979
5972
  ]),
5980
- A("div", ai, [
5981
- C(ti, { menu: a.menu }, null, 8, ["menu"])
5973
+ A("div", li, [
5974
+ C(ni, { menu: a.menu }, null, 8, ["menu"])
5982
5975
  ])
5983
5976
  ]),
5984
5977
  _: 1
@@ -5989,29 +5982,29 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ le({
5989
5982
  ]);
5990
5983
  };
5991
5984
  }
5992
- }), ii = /* @__PURE__ */ Qe(li, [["__scopeId", "data-v-6c3052b3"]]), Gi = /* @__PURE__ */ le({
5985
+ }), si = /* @__PURE__ */ Qe(ii, [["__scopeId", "data-v-6c3052b3"]]), Ki = /* @__PURE__ */ le({
5993
5986
  __name: "TreeEditorOpenner",
5994
5987
  setup(t) {
5995
- const r = ft(), e = rn();
5988
+ const r = ft(), e = an();
5996
5989
  function o() {
5997
5990
  s();
5998
5991
  }
5999
5992
  const s = () => {
6000
5993
  e.open({
6001
- component: ii,
5994
+ component: si,
6002
5995
  props: { menu: r.state.menu }
6003
5996
  });
6004
5997
  };
6005
5998
  function i(p) {
6006
- p.data.type === to && s();
5999
+ p.data.type === no && s();
6007
6000
  }
6008
6001
  return Ae(() => {
6009
6002
  window.addEventListener("message", i);
6010
6003
  }), Ot(() => {
6011
6004
  window.removeEventListener("message", i);
6012
- }), (p, h) => Me(p.$slots, "default", { trigger: o });
6005
+ }), (p, h) => Re(p.$slots, "default", { trigger: o });
6013
6006
  }
6014
6007
  });
6015
6008
  export {
6016
- Gi as _
6009
+ Ki as _
6017
6010
  };