@feedmepos/mf-menu 0.31.18-prod → 0.31.19-beta

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 (68) hide show
  1. package/dist/{App-CA9Sl2_e.js → App-y2Q2D6AO.js} +2400 -1296
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DXC06G_p.js → ApplyProduct.vue_vue_type_script_setup_true_lang-XV96dt6h.js} +2 -2
  3. package/dist/{Catalog-DO0Z3SSz.js → Catalog-Di-YSP-w.js} +5 -5
  4. package/dist/{Category-B1kXrXpy.js → Category-BzydRf7k.js} +21 -21
  5. package/dist/{Category-DTh_5WI5.js → Category-CAccN9m6.js} +8 -8
  6. package/dist/{CookingGuide-eHhSbisd.js → CookingGuide-BQcVxx1R.js} +66 -66
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DKGEMS0s.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BjUqhzCZ.js} +1 -1
  8. package/dist/{Group-Bd61FXOa.js → Group-B8TuooWf.js} +3 -3
  9. package/dist/{Group-Dh5RNyxf.js → Group-CAV74Npz.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-p3ZeU8Ad.js → Group.vue_vue_type_script_setup_true_lang-ClnFek9W.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CuR3HOn4.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DsC5e95X.js} +3 -3
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BjwTTR43.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DV0-XcfW.js} +3078 -3074
  13. package/dist/{Ingredient-BLfFgX0g.js → Ingredient-DMLmjp-1.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-C2f4oQV_.js → InventoryBinding.vue_vue_type_script_setup_true_lang-C0tjGp89.js} +2 -2
  15. package/dist/{LinkProductSideSheet-DPIxXikN.js → LinkProductSideSheet-DIvOzMB8.js} +1 -1
  16. package/dist/{MenuSetting-UVUYswl1.js → MenuSetting-C5sIpDMN.js} +16 -16
  17. package/dist/{PrintRoute-B4WpCa5j.js → PrintRoute-NHoHTnMc.js} +26 -26
  18. package/dist/{Product-DMqUEuUP.js → Product-C2SOvPy4.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-DvqDdaNh.js → Product.vue_vue_type_script_setup_true_lang-BEHnUKcc.js} +62 -59
  20. package/dist/{ProductInternalTools-BjQILwqA.js → ProductInternalTools-eXFZoo1G.js} +14 -14
  21. package/dist/{Products-BR612MbF.js → Products-3J5DcGEc.js} +15 -15
  22. package/dist/{Publish-HQprte7i.js → Publish-BdWd54a5.js} +32 -32
  23. package/dist/{Recipe-CW8DpUib.js → Recipe-DrNJifKH.js} +9 -9
  24. package/dist/{Scheduler-jwxuWWBc.js → Scheduler-OLKgjhjM.js} +3 -3
  25. package/dist/{ServingSequence-DILOiy8d.js → ServingSequence-DZ-eaRkW.js} +25 -25
  26. package/dist/{Setting-DtHcu5eE.js → Setting-t5Edfa6F.js} +10 -10
  27. package/dist/{Subcategory-BuBhmpHK.js → Subcategory-B1BeXahn.js} +18 -18
  28. package/dist/{Takeaway-CFH-2jGX.js → Takeaway-CS31a0G6.js} +1 -1
  29. package/dist/{Takeaway-Dadg_p4p.js → Takeaway-q69U7AjK.js} +10 -10
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Ccm340Do.js → Takeaway.vue_vue_type_script_setup_true_lang-CNheVEqy.js} +17 -17
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BO_RY7Nb.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-0kXXOsyC.js} +356 -352
  32. package/dist/{Unit-BhC7HKdj.js → Unit-R0fBKDBQ.js} +8 -8
  33. package/dist/{Variant-op1jI8lu.js → Variant-DdIfbckf.js} +8 -8
  34. package/dist/{_id_-C8aH00wO.js → _id_-Cpxz3UoN.js} +17 -17
  35. package/dist/{app-CgdrcHjA.js → app-CMGlnsG5.js} +24 -24
  36. package/dist/{app-DTuhoxK_.js → app-DRorRq_c.js} +1 -1
  37. package/dist/app.js +1 -1
  38. package/dist/apps/mf-menu/src/components/Announcements.vue.d.ts +19 -0
  39. package/dist/apps/mf-menu/src/components/feature/Fields/OrderFrom.vue.d.ts +1 -1
  40. package/dist/apps/mf-menu/src/helper/menu.d.ts +1 -1
  41. package/dist/apps/mf-menu/src/stores/announcement/announcement.d.ts +11 -0
  42. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/assets/linked-status-CdVNB55V.js +24 -0
  44. package/dist/assets/override-menu-CjvOi-J-.js +24 -0
  45. package/dist/assets/validate-menu-BU_-Jge5.js +24 -0
  46. package/dist/{catalog-C_ivwYaQ.js → catalog-BXSv7rZo.js} +1 -1
  47. package/dist/{catalogSetting-DZueIrzX.js → catalogSetting-DhXLcwI_.js} +1 -1
  48. package/dist/{category-B3iKQFQ-.js → category-LHZTSH3_.js} +1 -1
  49. package/dist/{currency-CA5FQbXi.js → currency-C05JOYSJ.js} +1 -1
  50. package/dist/{dayjs.min-B5JdMy-O.js → dayjs.min-OqJAuW-9.js} +1 -1
  51. package/dist/{index-g0Su2v11.js → index-BgrBG_Iz.js} +11 -11
  52. package/dist/{index-jZfKRlag.js → index-CxytOxGX.js} +1 -1
  53. package/dist/{index-BFdAL_N3.js → index-kz099Vvw.js} +6 -6
  54. package/dist/{item-SVoStXDW.js → item-vz-nrIWG.js} +694 -691
  55. package/dist/{jszip.min-DYjqumCW.js → jszip.min-C2aY4t8L.js} +2 -2
  56. package/dist/menu-CAVt_lFp.js +107896 -0
  57. package/dist/{menu-CTQtotYO.js → menu-DJkyk-fC.js} +1 -1
  58. package/dist/mf-menu.css +1 -1
  59. package/dist/{priceTier-D7hqwCP7.js → priceTier-xvRS9QN2.js} +1 -1
  60. package/dist/{scheduler-sOWjTP9q.js → scheduler-Du42t5zf.js} +3 -3
  61. package/dist/{subcategory-DzOnwchb.js → subcategory-CqKHknsQ.js} +219 -219
  62. package/dist/{toExcel-CXiBEHW2.js → toExcel-BvBlj-X5.js} +2 -2
  63. package/dist/{unit-CejxJLsQ.js → unit-DENherye.js} +1 -1
  64. package/package.json +3 -2
  65. package/dist/assets/linked-status-DjuegQzl.js +0 -24
  66. package/dist/assets/override-menu-SwLrxhgz.js +0 -24
  67. package/dist/assets/validate-menu-kf0hkaus.js +0 -24
  68. package/dist/menu-GZ7mL7Mu.js +0 -132202
@@ -1,31 +1,31 @@
1
- import { computed as S, shallowRef as Yt, ref as q, watch as ye, nextTick as st, getCurrentInstance as In, onMounted as $e, defineComponent as ie, resolveComponent as H, createElementBlock as J, openBlock as D, createBlock as Q, normalizeClass as fe, createElementVNode as L, createVNode as C, unref as r, withCtx as B, toDisplayString as ge, mergeModels as zt, useModel as jt, createCommentVNode as X, resolveDirective as Wt, withDirectives as ut, createTextVNode as kn, renderSlot as Me, h as ve, Fragment as xe, renderList as Ue, vShow as Ht, withModifiers as ze, createSlots as En, onBeforeUnmount as Ft, watchEffect as Tn, onUnmounted as xn, normalizeStyle as at, mergeProps as Fn, normalizeProps as Sn, guardReactiveProps as On, Teleport as Dn, Transition as Vn, withKeys as Pn } from "vue";
2
- import { g as Mn, o as $n, f as Un, a as Rn, n as qt, _ as Xt, I as An, S as Nn, b as St, C as Ln, R as Ge, c as Jt, d as Ct, e as Qt, m as Gn, F as Kn, M as Zt, h as Bn, r as Yn, j as en, k as Ut, l as tn, p as zn, P as jn, q as Wn, s as nn, u as Hn, T as Ne } from "./item-SVoStXDW.js";
3
- import { _ as qn, T as Xn } from "./app-CgdrcHjA.js";
4
- import { z as be, J as pe, G as Z, B as qe, K as Jn, M as Qn, N as Zn, O as dt, P as eo, A as Re, Q as to, H as me, R as no, T as Ot, I as Ce, U as mt, V as oo, W as ro, X as ao, Y as pt, Z as Rt, $ as lo, u as on, a0 as io } from "./menu-GZ7mL7Mu.js";
1
+ import { shallowRef as Yt, ref as q, computed as S, nextTick as st, watch as ye, getCurrentInstance as In, onMounted as $e, defineComponent as ie, resolveComponent as H, createElementBlock as J, openBlock as D, createBlock as Q, normalizeClass as fe, createElementVNode as L, createVNode as C, unref as r, withCtx as B, toDisplayString as ge, mergeModels as zt, useModel as jt, createCommentVNode as X, resolveDirective as Wt, withDirectives as ut, createTextVNode as kn, renderSlot as Me, h as ve, Fragment as xe, renderList as Ue, vShow as Ht, withModifiers as ze, createSlots as En, onBeforeUnmount as Ft, watchEffect as Tn, onUnmounted as xn, normalizeStyle as at, mergeProps as Fn, normalizeProps as Sn, guardReactiveProps as On, Teleport as Dn, Transition as Vn, withKeys as Pn } from "vue";
2
+ import { g as Mn, o as $n, f as Un, a as Rn, n as qt, _ as Xt, I as An, S as Nn, b as St, C as Ln, R as Ge, c as Jt, d as Ct, e as Qt, m as Gn, F as Kn, M as Zt, h as Bn, r as Yn, j as en, k as Ut, l as tn, p as zn, P as jn, q as Wn, s as nn, u as Hn, T as Ne } from "./item-vz-nrIWG.js";
3
+ import { _ as qn, T as Xn } from "./app-CMGlnsG5.js";
4
+ import { A as be, J as pe, G as Z, D as qe, K as Jn, M as Qn, N as Zn, O as dt, P as eo, B as Re, Q as to, H as me, R as no, T as Ot, I as Ce, U as mt, V as oo, W as ro, X as ao, Y as pt, Z as Rt, $ as lo, u as on, a0 as io } from "./menu-CAVt_lFp.js";
5
5
  import { useI18n as ce, useCoreStore as Ze, CustomAttributesForm as rn } from "@feedmepos/mf-common";
6
6
  import { useDialog as Pe, useDialogChild as Dt, useSnackbar as Fe, FmButtonColorThemeVariant as Te, components as we, FmButtonVariant as Ke, useBreakpoints as so } from "@feedmepos/ui-library";
7
7
  import { u as Vt } from "./discardConfirm-BHni0LNu.js";
8
8
  import { defineStore as uo } from "pinia";
9
9
  import { _ as Se, a as co } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
10
- import { u as se, g as an, m as mo } from "./subcategory-DzOnwchb.js";
11
- import { s as It, _ as po } from "./index-jZfKRlag.js";
10
+ import { u as se, g as an, m as mo } from "./subcategory-CqKHknsQ.js";
11
+ import { s as It, _ as po } from "./index-CxytOxGX.js";
12
12
  import { _ as Ve } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
13
- import { _ as At } from "./category-B3iKQFQ-.js";
13
+ import { _ as At } from "./category-LHZTSH3_.js";
14
14
  import { _ as fo } from "./Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js";
15
- import { _ as Xe, L as kt } from "./LinkProductSideSheet-DPIxXikN.js";
15
+ import { _ as Xe, L as kt } from "./LinkProductSideSheet-DIvOzMB8.js";
16
16
  import { _ as ln } from "./tooltip-B5BiPMx9.js";
17
- import { _ as je, T as go, l as vo } from "./index-BFdAL_N3.js";
17
+ import { _ as je, T as go, l as vo } from "./index-kz099Vvw.js";
18
18
  import { u as _o } from "./search-BAPEUu1R.js";
19
19
  import { c as Pt } from "./check-C9mY6LiX.js";
20
- import { f as Qe } from "./currency-CA5FQbXi.js";
20
+ import { f as Qe } from "./currency-C05JOYSJ.js";
21
21
  import { c as bo } from "./string-DpfFixWH.js";
22
22
  import { useInventoryStore as yo, InventoryBindingSummary as ho } from "@feedmepos/mf-inventory-portal";
23
- import { u as wo } from "./priceTier-D7hqwCP7.js";
23
+ import { u as wo } from "./priceTier-xvRS9QN2.js";
24
24
  import { d as Mt } from "./vuedraggable-CK8z7qA8.js";
25
- import { _ as Co } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DXC06G_p.js";
25
+ import { _ as Co } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-XV96dt6h.js";
26
26
  /* empty css */
27
27
  import { i as Io, t as $t, w as ko, a as sn, b as un, n as Eo, c as To, u as xo, r as Fo } from "./index-Ce4v8o7D.js";
28
- import { C as Et } from "./catalog-C_ivwYaQ.js";
28
+ import { C as Et } from "./catalog-BXSv7rZo.js";
29
29
  import { c as lt } from "./object-DVUNCr7w.js";
30
30
  import { _ as So } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
31
31
  import { _ as Nt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
@@ -40,12 +40,12 @@ function Lt(...t) {
40
40
  if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([e, n, f] = t, o = We) : [o, e, n, f] = t, !o)
41
41
  return Eo;
42
42
  Array.isArray(e) || (e = [e]), Array.isArray(n) || (n = [n]);
43
- const s = [], m = () => {
43
+ const s = [], p = () => {
44
44
  s.forEach((c) => c()), s.length = 0;
45
45
  }, u = (c, v, _, a) => (c.addEventListener(v, _, a), () => c.removeEventListener(v, _, a)), b = ye(
46
46
  () => [Le(o), $t(f)],
47
47
  ([c, v]) => {
48
- if (m(), !c)
48
+ if (p(), !c)
49
49
  return;
50
50
  const _ = To(v) ? { ...v } : v;
51
51
  s.push(
@@ -54,7 +54,7 @@ function Lt(...t) {
54
54
  },
55
55
  { immediate: !0, flush: "post" }
56
56
  ), h = () => {
57
- b(), m();
57
+ b(), p();
58
58
  };
59
59
  return un(h), h;
60
60
  }
@@ -116,7 +116,7 @@ function Ro(t, o, e, n = {}) {
116
116
  var f;
117
117
  const {
118
118
  flush: s = "pre",
119
- deep: m = !0,
119
+ deep: p = !0,
120
120
  listenToStorageChanges: u = !0,
121
121
  writeDefaults: b = !0,
122
122
  mergeDefaults: h = !1,
@@ -139,10 +139,10 @@ function Ro(t, o, e, n = {}) {
139
139
  }
140
140
  if (!e)
141
141
  return T;
142
- const x = $t(o), w = $o(x), p = (f = n.serializer) != null ? f : Uo[w], { pause: F, resume: $ } = ko(
142
+ const x = $t(o), w = $o(x), m = (f = n.serializer) != null ? f : Uo[w], { pause: F, resume: $ } = ko(
143
143
  T,
144
144
  () => V(T.value),
145
- { flush: s, deep: m, eventFilter: _ }
145
+ { flush: s, deep: p, eventFilter: _ }
146
146
  );
147
147
  v && u && sn(() => {
148
148
  Lt(v, "storage", k), Lt(v, Gt, d), E && k();
@@ -163,7 +163,7 @@ function Ro(t, o, e, n = {}) {
163
163
  if (l == null)
164
164
  R(i, null), e.removeItem(t);
165
165
  else {
166
- const g = p.write(l);
166
+ const g = m.write(l);
167
167
  i !== g && (e.setItem(t, g), R(i, g));
168
168
  }
169
169
  } catch (i) {
@@ -173,11 +173,11 @@ function Ro(t, o, e, n = {}) {
173
173
  function A(l) {
174
174
  const i = l ? l.newValue : e.getItem(t);
175
175
  if (i == null)
176
- return b && x != null && e.setItem(t, p.write(x)), x;
176
+ return b && x != null && e.setItem(t, m.write(x)), x;
177
177
  if (!l && h) {
178
- const g = p.read(i);
178
+ const g = m.read(i);
179
179
  return typeof h == "function" ? h(g, x) : w === "object" && !Array.isArray(g) ? { ...x, ...g } : g;
180
- } else return typeof i != "string" ? i : p.read(i);
180
+ } else return typeof i != "string" ? i : m.read(i);
181
181
  }
182
182
  function k(l) {
183
183
  if (!(l && l.storageArea !== e)) {
@@ -188,7 +188,7 @@ function Ro(t, o, e, n = {}) {
188
188
  if (!(l && l.key !== t)) {
189
189
  F();
190
190
  try {
191
- (l == null ? void 0 : l.newValue) !== p.write(T.value) && (T.value = A(l));
191
+ (l == null ? void 0 : l.newValue) !== m.write(T.value) && (T.value = A(l));
192
192
  } catch (i) {
193
193
  a(i);
194
194
  } finally {
@@ -205,12 +205,12 @@ function Ro(t, o, e, n = {}) {
205
205
  function Ao(t, o, e = {}) {
206
206
  const { window: n = We, ...f } = e;
207
207
  let s;
208
- const m = Do(() => n && "ResizeObserver" in n), u = () => {
208
+ const p = Do(() => n && "ResizeObserver" in n), u = () => {
209
209
  s && (s.disconnect(), s = void 0);
210
210
  }, b = S(() => Array.isArray(t) ? t.map((v) => Le(v)) : [Le(t)]), h = ye(
211
211
  b,
212
212
  (v) => {
213
- if (u(), m.value && n) {
213
+ if (u(), p.value && n) {
214
214
  s = new ResizeObserver(o);
215
215
  for (const _ of v)
216
216
  _ && s.observe(_, f);
@@ -221,7 +221,7 @@ function Ao(t, o, e = {}) {
221
221
  u(), h();
222
222
  };
223
223
  return un(c), {
224
- isSupported: m,
224
+ isSupported: p,
225
225
  stop: c
226
226
  };
227
227
  }
@@ -229,7 +229,7 @@ function No(t, o = { width: 0, height: 0 }, e = {}) {
229
229
  const { window: n = We, box: f = "content-box" } = e, s = S(() => {
230
230
  var v, _;
231
231
  return (_ = (v = Le(t)) == null ? void 0 : v.namespaceURI) == null ? void 0 : _.includes("svg");
232
- }), m = q(o.width), u = q(o.height), { stop: b } = Ao(
232
+ }), p = q(o.width), u = q(o.height), { stop: b } = Ao(
233
233
  t,
234
234
  ([v]) => {
235
235
  const _ = f === "border-box" ? v.borderBoxSize : f === "content-box" ? v.contentBoxSize : v.devicePixelContentBoxSize;
@@ -237,31 +237,31 @@ function No(t, o = { width: 0, height: 0 }, e = {}) {
237
237
  const a = Le(t);
238
238
  if (a) {
239
239
  const E = a.getBoundingClientRect();
240
- m.value = E.width, u.value = E.height;
240
+ p.value = E.width, u.value = E.height;
241
241
  }
242
242
  } else if (_) {
243
243
  const a = Array.isArray(_) ? _ : [_];
244
- m.value = a.reduce((E, { inlineSize: T }) => E + T, 0), u.value = a.reduce((E, { blockSize: T }) => E + T, 0);
244
+ p.value = a.reduce((E, { inlineSize: T }) => E + T, 0), u.value = a.reduce((E, { blockSize: T }) => E + T, 0);
245
245
  } else
246
- m.value = v.contentRect.width, u.value = v.contentRect.height;
246
+ p.value = v.contentRect.width, u.value = v.contentRect.height;
247
247
  },
248
248
  e
249
249
  );
250
250
  sn(() => {
251
251
  const v = Le(t);
252
- v && (m.value = "offsetWidth" in v ? v.offsetWidth : o.width, u.value = "offsetHeight" in v ? v.offsetHeight : o.height);
252
+ v && (p.value = "offsetWidth" in v ? v.offsetWidth : o.width, u.value = "offsetHeight" in v ? v.offsetHeight : o.height);
253
253
  });
254
254
  const h = ye(
255
255
  () => Le(t),
256
256
  (v) => {
257
- m.value = v ? o.width : 0, u.value = v ? o.height : 0;
257
+ p.value = v ? o.width : 0, u.value = v ? o.height : 0;
258
258
  }
259
259
  );
260
260
  function c() {
261
261
  b(), h();
262
262
  }
263
263
  return {
264
- width: m,
264
+ width: p,
265
265
  height: u,
266
266
  stop: c
267
267
  };
@@ -271,9 +271,9 @@ function Lo(t, o, e = {}) {
271
271
  return Ro(t, o, n == null ? void 0 : n.localStorage, e);
272
272
  }
273
273
  function Go(t, o) {
274
- const { containerStyle: e, wrapperProps: n, scrollTo: f, calculateRange: s, currentList: m, containerRef: u } = "itemHeight" in o ? Yo(o, t) : Bo(o, t);
274
+ const { containerStyle: e, wrapperProps: n, scrollTo: f, calculateRange: s, currentList: p, containerRef: u } = "itemHeight" in o ? Yo(o, t) : Bo(o, t);
275
275
  return {
276
- list: m,
276
+ list: p,
277
277
  scrollTo: f,
278
278
  containerProps: {
279
279
  ref: u,
@@ -294,13 +294,13 @@ function cn(t, o, e) {
294
294
  if (typeof e == "number")
295
295
  return Math.ceil(n / e);
296
296
  const { start: f = 0 } = t.value;
297
- let s = 0, m = 0;
297
+ let s = 0, p = 0;
298
298
  for (let u = f; u < o.value.length; u++) {
299
299
  const b = e(u);
300
- if (s += b, m = u, s > n)
300
+ if (s += b, p = u, s > n)
301
301
  break;
302
302
  }
303
- return m - f;
303
+ return p - f;
304
304
  };
305
305
  }
306
306
  function mn(t, o) {
@@ -309,8 +309,8 @@ function mn(t, o) {
309
309
  return Math.floor(e / o) + 1;
310
310
  let n = 0, f = 0;
311
311
  for (let s = 0; s < t.value.length; s++) {
312
- const m = o(s);
313
- if (n += m, n >= e) {
312
+ const p = o(s);
313
+ if (n += p, n >= e) {
314
314
  f = s;
315
315
  break;
316
316
  }
@@ -318,7 +318,7 @@ function mn(t, o) {
318
318
  return f + 1;
319
319
  };
320
320
  }
321
- function pn(t, o, e, n, { containerRef: f, state: s, currentList: m, source: u }) {
321
+ function pn(t, o, e, n, { containerRef: f, state: s, currentList: p, source: u }) {
322
322
  return () => {
323
323
  const b = f.value;
324
324
  if (b) {
@@ -326,7 +326,7 @@ function pn(t, o, e, n, { containerRef: f, state: s, currentList: m, source: u }
326
326
  s.value = {
327
327
  start: v < 0 ? 0 : v,
328
328
  end: _ > u.value.length ? u.value.length : _
329
- }, m.value = u.value.slice(s.value.start, s.value.end).map((a, E) => ({
329
+ }, p.value = u.value.slice(s.value.start, s.value.end).map((a, E) => ({
330
330
  data: a,
331
331
  index: E + s.value.start
332
332
  }));
@@ -334,7 +334,7 @@ function pn(t, o, e, n, { containerRef: f, state: s, currentList: m, source: u }
334
334
  };
335
335
  }
336
336
  function fn(t, o) {
337
- return (e) => typeof t == "number" ? e * t : o.value.slice(0, e).reduce((f, s, m) => f + t(m), 0);
337
+ return (e) => typeof t == "number" ? e * t : o.value.slice(0, e).reduce((f, s, p) => f + t(p), 0);
338
338
  }
339
339
  function gn(t, o, e, n) {
340
340
  ye([t.width, t.height, o, e], () => {
@@ -354,9 +354,9 @@ function _n(t, o, e, n) {
354
354
  };
355
355
  }
356
356
  function Bo(t, o) {
357
- const e = dn(o), { state: n, source: f, currentList: s, size: m, containerRef: u } = e, b = { overflowX: "auto" }, { itemWidth: h, overscan: c = 5 } = t, v = cn(n, f, h), _ = mn(f, h), a = pn("horizontal", c, _, v, e), E = fn(h, f), T = S(() => E(n.value.start)), x = vn(h, f);
358
- gn(m, o, u, a);
359
- const w = _n("horizontal", a, E, u), p = S(() => ({
357
+ const e = dn(o), { state: n, source: f, currentList: s, size: p, containerRef: u } = e, b = { overflowX: "auto" }, { itemWidth: h, overscan: c = 5 } = t, v = cn(n, f, h), _ = mn(f, h), a = pn("horizontal", c, _, v, e), E = fn(h, f), T = S(() => E(n.value.start)), x = vn(h, f);
358
+ gn(p, o, u, a);
359
+ const w = _n("horizontal", a, E, u), m = S(() => ({
360
360
  style: {
361
361
  height: "100%",
362
362
  width: `${x.value - T.value}px`,
@@ -367,16 +367,16 @@ function Bo(t, o) {
367
367
  return {
368
368
  scrollTo: w,
369
369
  calculateRange: a,
370
- wrapperProps: p,
370
+ wrapperProps: m,
371
371
  containerStyle: b,
372
372
  currentList: s,
373
373
  containerRef: u
374
374
  };
375
375
  }
376
376
  function Yo(t, o) {
377
- const e = dn(o), { state: n, source: f, currentList: s, size: m, containerRef: u } = e, b = { overflowY: "auto" }, { itemHeight: h, overscan: c = 5 } = t, v = cn(n, f, h), _ = mn(f, h), a = pn("vertical", c, _, v, e), E = fn(h, f), T = S(() => E(n.value.start)), x = vn(h, f);
378
- gn(m, o, u, a);
379
- const w = _n("vertical", a, E, u), p = S(() => ({
377
+ const e = dn(o), { state: n, source: f, currentList: s, size: p, containerRef: u } = e, b = { overflowY: "auto" }, { itemHeight: h, overscan: c = 5 } = t, v = cn(n, f, h), _ = mn(f, h), a = pn("vertical", c, _, v, e), E = fn(h, f), T = S(() => E(n.value.start)), x = vn(h, f);
378
+ gn(p, o, u, a);
379
+ const w = _n("vertical", a, E, u), m = S(() => ({
380
380
  style: {
381
381
  width: "100%",
382
382
  height: `${x.value - T.value}px`,
@@ -387,7 +387,7 @@ function Yo(t, o) {
387
387
  calculateRange: a,
388
388
  scrollTo: w,
389
389
  containerStyle: b,
390
- wrapperProps: p,
390
+ wrapperProps: m,
391
391
  currentList: s,
392
392
  containerRef: u
393
393
  };
@@ -421,32 +421,32 @@ function zo(t, o) {
421
421
  function jo(t, o) {
422
422
  const e = /* @__PURE__ */ new Set();
423
423
  function n(s) {
424
- let m = s;
425
- for (; m.parent; )
426
- e.add(m.parent.id), m = m.parent;
424
+ let p = s;
425
+ for (; p.parent; )
426
+ e.add(p.parent.id), p = p.parent;
427
427
  }
428
- function f(s, m) {
428
+ function f(s, p) {
429
429
  var v, _;
430
- if (m.length === 0 || !s)
430
+ if (p.length === 0 || !s)
431
431
  return s;
432
432
  const u = [
433
433
  s.label.toLowerCase(),
434
434
  (v = s.rightLabel) == null ? void 0 : v.label.toLowerCase(),
435
435
  ...((_ = s.chips) == null ? void 0 : _.map((a) => a.label.toLowerCase())) ?? []
436
- ].join(" "), b = m[0].query.every((a) => u.includes(a.toLowerCase()));
437
- b && m.slice(1).length === 0 && n(s);
436
+ ].join(" "), b = p[0].query.every((a) => u.includes(a.toLowerCase()));
437
+ b && p.slice(1).length === 0 && n(s);
438
438
  const h = b ? {
439
439
  ...s,
440
- highlightedStrings: m[0].query
440
+ highlightedStrings: p[0].query
441
441
  } : s;
442
442
  if (s.children && s.children.length > 0) {
443
- const a = s.children.map((E) => f(E, b ? m.slice(1) : m)).filter((E) => !!E);
443
+ const a = s.children.map((E) => f(E, b ? p.slice(1) : p)).filter((E) => !!E);
444
444
  return a.length > 0 ? {
445
445
  ...h,
446
446
  children: a
447
447
  } : null;
448
448
  }
449
- return b && m.slice(1).length === 0 ? h : null;
449
+ return b && p.slice(1).length === 0 ? h : null;
450
450
  }
451
451
  return {
452
452
  // @ts-ignore
@@ -501,7 +501,7 @@ const et = uo("mf-menu-tree", () => {
501
501
  function s(_) {
502
502
  e.value = _;
503
503
  }
504
- function m(_) {
504
+ function p(_) {
505
505
  n.value = _;
506
506
  }
507
507
  function u(_) {
@@ -536,7 +536,7 @@ const et = uo("mf-menu-tree", () => {
536
536
  setTreeNodes: f,
537
537
  setSelectedNodeId: s,
538
538
  setSelectedNodeByItemId: u,
539
- setExpandedNodeIds: m,
539
+ setExpandedNodeIds: p,
540
540
  collapseAllNodes: b,
541
541
  expandAllNodes: h,
542
542
  getNodeById: v
@@ -556,7 +556,7 @@ function Jo(t, o) {
556
556
  u.inventoryBindings ?? (u.inventoryBindings = []), u.inventoryBindings.length === 0 && (u.inventoryBindings = null);
557
557
  }
558
558
  function f(u) {
559
- return !o.state.currentCatalogId && !o.state.currentSchedulerId ? (s(u), !0) : m(u);
559
+ return !o.state.currentCatalogId && !o.state.currentSchedulerId ? (s(u), !0) : p(u);
560
560
  }
561
561
  function s(u) {
562
562
  o.updateMenu({
@@ -565,7 +565,7 @@ function Jo(t, o) {
565
565
  data: u
566
566
  });
567
567
  }
568
- function m(u) {
568
+ function p(u) {
569
569
  const b = Mn(
570
570
  [u],
571
571
  o.state.menu,
@@ -614,13 +614,13 @@ function Zo({
614
614
  schedulerId: e,
615
615
  itemId: n
616
616
  }) {
617
- var f, s, m, u;
617
+ var f, s, p, u;
618
618
  if (!o && !e)
619
619
  throw new Error("catalogId or schedulerId are required");
620
620
  if (o && !e)
621
621
  return (f = t.modules.catalog.find((b) => b._id === o)) == null ? void 0 : f.override.items[n];
622
622
  if (!o && e)
623
- return (m = (s = t.modules.scheduler.find((b) => b._id === e)) == null ? void 0 : s.items) == null ? void 0 : m.filter((b) => b._id === n);
623
+ return (p = (s = t.modules.scheduler.find((b) => b._id === e)) == null ? void 0 : s.items) == null ? void 0 : p.filter((b) => b._id === n);
624
624
  {
625
625
  const b = t.modules.catalog.find((c) => c._id === o), h = b == null ? void 0 : b.override.scheduler[e];
626
626
  return (u = h == null ? void 0 : h.items) == null ? void 0 : u.filter((c) => c._id === n);
@@ -630,7 +630,7 @@ function er(t, o, e, n) {
630
630
  const f = Zo({ menu: t, catalogId: o, schedulerId: e, itemId: n });
631
631
  if (!f)
632
632
  throw new Error(`Item overrider ${n} not found`);
633
- const s = t.modules.item.find((m) => m._id === n);
633
+ const s = t.modules.item.find((p) => p._id === n);
634
634
  if (!s)
635
635
  throw new Error(`Item ${n} not found in merged menu`);
636
636
  return $n(s, f);
@@ -712,7 +712,7 @@ const ct = () => {
712
712
  !0
713
713
  ), o.close();
714
714
  }
715
- async function m(u) {
715
+ async function p(u) {
716
716
  await e.updateMenu({
717
717
  module: Z.F_MENU_MODULE_V4_KEY.enum.category,
718
718
  operation: pe.F_OPERATION_TYPE.rearrange,
@@ -723,7 +723,7 @@ const ct = () => {
723
723
  create: n,
724
724
  update: f,
725
725
  deleteCategory: s,
726
- rearrange: m
726
+ rearrange: p
727
727
  };
728
728
  }, nr = { class: "flex flex-col items-center" }, or = {
729
729
  key: 0,
@@ -756,13 +756,13 @@ const ct = () => {
756
756
  }
757
757
  const s = (h) => {
758
758
  f([h]);
759
- }, { emitData: m } = Dt();
759
+ }, { emitData: p } = Dt();
760
760
  async function u(h) {
761
761
  const { canvas: c } = h, v = c.toDataURL("image/jpeg", 0.75), _ = await (await fetch(v)).blob(), a = new File([_], "img.jpeg", { type: "image/jpeg" });
762
- m(a);
762
+ p(a);
763
763
  }
764
764
  function b() {
765
- e.value = void 0, m(null);
765
+ e.value = void 0, p(null);
766
766
  }
767
767
  return (h, c) => {
768
768
  const v = H("fm-icon"), _ = H("fm-drop-field");
@@ -813,7 +813,7 @@ const ct = () => {
813
813
  };
814
814
  }
815
815
  });
816
- var sr = { firebase: { storageBucket: "image.feedme.cc" } };
816
+ var sr = { firebase: { storageBucket: "image.feedmedev.cc" } };
817
817
  const ur = {
818
818
  key: 0,
819
819
  class: "absolute inset-0 flex items-center justify-center image-action-overlay"
@@ -841,7 +841,7 @@ const ur = {
841
841
  q(!1);
842
842
  const f = Pe(), s = () => {
843
843
  n.value = null;
844
- }, m = () => {
844
+ }, p = () => {
845
845
  f.open({
846
846
  title: "Delete image",
847
847
  message: "Are you sure you want to delete this image?",
@@ -913,7 +913,7 @@ const ur = {
913
913
  "text-color": r(Te).NeutralGray400,
914
914
  variant: "secondary",
915
915
  class: "bg-white",
916
- onClick: m
916
+ onClick: p
917
917
  }, null, 8, ["text-color"])) : X("", !0)])]))], 2)]),
918
918
  _: 1
919
919
  }, 8, ["model-value", "label"]);
@@ -969,7 +969,7 @@ const Er = /* @__PURE__ */ ie({
969
969
  }) {
970
970
  const e = t, n = se(), f = ct(), {
971
971
  checkMenuIsLoading: s
972
- } = dt(qe(Fe())), m = Ze(), u = o, b = S(() => n.rules.item), h = S(() => n.categorizedItems), c = S(() => {
972
+ } = dt(qe(Fe())), p = Ze(), u = o, b = S(() => n.rules.item), h = S(() => n.categorizedItems), c = S(() => {
973
973
  const i = h.value.map((g) => ({
974
974
  label: g.name,
975
975
  value: g.id
@@ -1019,7 +1019,7 @@ const Er = /* @__PURE__ */ ie({
1019
1019
  $e(() => {
1020
1020
  !_.value && e.form.category === void 0 && e.isCreate && $(De.PRODUCT);
1021
1021
  });
1022
- const p = S(() => {
1022
+ const m = S(() => {
1023
1023
  var g;
1024
1024
  const i = e.form.name || ((g = e.fallback) == null ? void 0 : g.name);
1025
1025
  return i ? n.items.filter((y) => !!y.category && y._id !== e.form._id && y.name === i).length : 0;
@@ -1043,7 +1043,7 @@ const Er = /* @__PURE__ */ ie({
1043
1043
  }
1044
1044
  if (!R.value)
1045
1045
  try {
1046
- R.value = !0, m.pushDataLayer({
1046
+ R.value = !0, p.pushDataLayer({
1047
1047
  event: "menu_catalog_item_general_remy_suggest_description"
1048
1048
  }), Ge.toggleDialog(!0);
1049
1049
  const I = await ((g = (i = Ge).getItemDescription) == null ? void 0 : g.call(i, {
@@ -1082,8 +1082,8 @@ const Er = /* @__PURE__ */ ie({
1082
1082
  }, null, 8, ["model-value", "placeholder", "label"])]), L("div", _r, [C(y, {
1083
1083
  id: "product-name",
1084
1084
  disabled: !b.value.name,
1085
- "helper-text": p.value > 0 ? r(l)("menu.product.form.detail.fields.name.duplicate_warning", {
1086
- count: p.value
1085
+ "helper-text": m.value > 0 ? r(l)("menu.product.form.detail.fields.name.duplicate_warning", {
1086
+ count: m.value
1087
1087
  }) : void 0,
1088
1088
  "model-value": i.form.name,
1089
1089
  placeholder: (U = i.fallback) == null ? void 0 : U.name,
@@ -1207,15 +1207,15 @@ const Er = /* @__PURE__ */ ie({
1207
1207
  items: {},
1208
1208
  position: o.groups.length - 1,
1209
1209
  itemsLinked: []
1210
- }), m = q(s()), { t: u } = ce();
1210
+ }), p = q(s()), { t: u } = ce();
1211
1211
  return (b, h) => e.value.create ? (D(), Q(r(Lr), {
1212
1212
  key: 0,
1213
1213
  "categorized-items": r(o).categorizedItems,
1214
1214
  config: f.value,
1215
- group: m.value,
1216
- "onUpdate:group": h[0] || (h[0] = (c) => m.value = c),
1215
+ group: p.value,
1216
+ "onUpdate:group": h[0] || (h[0] = (c) => p.value = c),
1217
1217
  "onStatus:show": h[1] || (h[1] = (c) => {
1218
- c || (m.value = s());
1218
+ c || (p.value = s());
1219
1219
  }),
1220
1220
  action: "add",
1221
1221
  title: r(u)("menu.group.add")
@@ -1248,7 +1248,7 @@ const Er = /* @__PURE__ */ ie({
1248
1248
  setup(t, {
1249
1249
  emit: o
1250
1250
  }) {
1251
- const e = t, n = o, f = Fe(), s = Ze(), m = se(), u = S(() => be.Country.getCountry(s.currentCountry.value)), b = q(!1), h = S(() => e.config.isV4 || e.group.type === Z.F_ADDON_GROUP_TYPE.enum.PRODUCT), c = S(() => h.value), v = S(() => h.value), _ = S(() => Object.values(e.group.items).flatMap((O) => [{
1251
+ const e = t, n = o, f = Fe(), s = Ze(), p = se(), u = S(() => be.Country.getCountry(s.currentCountry.value)), b = q(!1), h = S(() => e.config.isV4 || e.group.type === Z.F_ADDON_GROUP_TYPE.enum.PRODUCT), c = S(() => h.value), v = S(() => h.value), _ = S(() => Object.values(e.group.items).flatMap((O) => [{
1252
1252
  _id: O._id,
1253
1253
  combinationKey: void 0
1254
1254
  }, ...(O.items ?? []).map((U) => ({
@@ -1258,7 +1258,7 @@ const Er = /* @__PURE__ */ ie({
1258
1258
  searchKey: a,
1259
1259
  filter: E
1260
1260
  } = _o(), T = S(() => {
1261
- const O = Object.entries(e.group.items).filter(([, U]) => E([U.code || "", U.name || U.fallbackName, p(U.price ?? U.fallbackPrice), F(U.orderFrom || U.fallbackOrder), ...(U.items || []).map((M) => [M.code || "", M.name || M.fallbackName, p(M.price ?? M.fallbackPrice), F(M.orderFrom || M.fallbackOrder)].join(""))]));
1261
+ const O = Object.entries(e.group.items).filter(([, U]) => E([U.code || "", U.name || U.fallbackName, m(U.price ?? U.fallbackPrice), F(U.orderFrom || U.fallbackOrder), ...(U.items || []).map((M) => [M.code || "", M.name || M.fallbackName, m(M.price ?? M.fallbackPrice), F(M.orderFrom || M.fallbackOrder)].join(""))]));
1262
1262
  return Object.fromEntries(O);
1263
1263
  }), x = (O) => ({
1264
1264
  ...e.config,
@@ -1266,7 +1266,7 @@ const Er = /* @__PURE__ */ ie({
1266
1266
  link: e.config.link(O),
1267
1267
  name: e.config.name(O),
1268
1268
  orderFrom: e.config.orderFrom(O)
1269
- }), w = S(() => !0), p = (O) => O ? Qe(O, !1) : "", F = (O) => {
1269
+ }), w = S(() => !0), m = (O) => O ? Qe(O, !1) : "", F = (O) => {
1270
1270
  var U;
1271
1271
  return O == null ? "" : (U = to()[O]) == null ? void 0 : U.label;
1272
1272
  }, $ = S(() => Object.values(T.value)), R = q({}), {
@@ -1429,7 +1429,7 @@ const Er = /* @__PURE__ */ ie({
1429
1429
  return C("div", {
1430
1430
  class: "flex items-center justify-end"
1431
1431
  }, [x(null).priceTier && C(Jt, {
1432
- menuStore: m,
1432
+ menuStore: p,
1433
1433
  priceTiers: U.priceTiers,
1434
1434
  "onUpdate:priceTiers": (N) => {
1435
1435
  var Y;
@@ -1573,7 +1573,7 @@ const Er = /* @__PURE__ */ ie({
1573
1573
  }, O;
1574
1574
  }, {})), G = (O) => {
1575
1575
  var Y, j;
1576
- const M = m.state.menu.modules.item.find((oe) => oe._id === O._id), N = O.combinationKey ? {
1576
+ const M = p.state.menu.modules.item.find((oe) => oe._id === O._id), N = O.combinationKey ? {
1577
1577
  ...(Y = M == null ? void 0 : M.variant) == null ? void 0 : Y.variantCombinations.find((oe) => oe.combinationKey === O.combinationKey),
1578
1578
  name: Ot(se().variants, ((j = M == null ? void 0 : M.variant) == null ? void 0 : j.variantGroupIds) || [])[O.combinationKey]
1579
1579
  } : M;
@@ -1670,7 +1670,7 @@ const Er = /* @__PURE__ */ ie({
1670
1670
  emits: ["update:group", "submit:group", "status:show"],
1671
1671
  setup(t, { expose: o, emit: e }) {
1672
1672
  let n = t;
1673
- const f = e, s = se(), m = Ze(), u = Pe(), b = dt(qe(Fe())), h = q(!1), c = q(!1), v = (y) => {
1673
+ const f = e, s = se(), p = Ze(), u = Pe(), b = dt(qe(Fe())), h = q(!1), c = q(!1), v = (y) => {
1674
1674
  Pt.isBoolean(y) ? c.value = y : c.value = !c.value;
1675
1675
  }, _ = S(() => n.group ? n.config(n.group) : null), a = S(() => Gn(_.value)), E = (y) => a.value.includes(y), T = S(() => [
1676
1676
  {
@@ -1710,7 +1710,7 @@ const Er = /* @__PURE__ */ ie({
1710
1710
  }
1711
1711
  }).onPrimary(I) : I();
1712
1712
  }
1713
- function p(y) {
1713
+ function m(y) {
1714
1714
  return new Zt(s, b.updateMenu, u).mapGroups(
1715
1715
  [y],
1716
1716
  _.value.isOverride
@@ -1760,7 +1760,7 @@ const Er = /* @__PURE__ */ ie({
1760
1760
  );
1761
1761
  const d = S(() => {
1762
1762
  var y;
1763
- return ((y = m.groupAttributeSettings) == null ? void 0 : y.value.length) > 0 && !_.value.isOverride;
1763
+ return ((y = p.groupAttributeSettings) == null ? void 0 : y.value.length) > 0 && !_.value.isOverride;
1764
1764
  }), l = S(() => {
1765
1765
  const y = {};
1766
1766
  return s.state.menu.modules.group.forEach((I) => {
@@ -1932,7 +1932,7 @@ const Er = /* @__PURE__ */ ie({
1932
1932
  config: _.value,
1933
1933
  group: y.group,
1934
1934
  "onUpdate:group": I[5] || (I[5] = (N) => x(N)),
1935
- "onUpdate:unmapGroup": I[6] || (I[6] = (N) => x(p(N)))
1935
+ "onUpdate:unmapGroup": I[6] || (I[6] = (N) => x(m(N)))
1936
1936
  }, null, 8, ["allow-refund-inventory", "categorized-items", "config", "group"])
1937
1937
  ]),
1938
1938
  _: 1
@@ -1954,7 +1954,7 @@ const Er = /* @__PURE__ */ ie({
1954
1954
  emits: ["update:combinations"],
1955
1955
  setup(t, { expose: o, emit: e }) {
1956
1956
  var $, R;
1957
- const n = t, f = e, s = se(), m = Pe(), u = dt(qe(Fe())), b = q([]), h = q(n.combinations[0].combinationKey || ""), c = S(
1957
+ const n = t, f = e, s = se(), p = Pe(), u = dt(qe(Fe())), b = q([]), h = q(n.combinations[0].combinationKey || ""), c = S(
1958
1958
  () => b.value.findIndex((V) => V.combinationKey == h.value)
1959
1959
  ), v = S(
1960
1960
  () => n.combinations.map((V) => ({
@@ -1984,7 +1984,7 @@ const Er = /* @__PURE__ */ ie({
1984
1984
  };
1985
1985
  })
1986
1986
  };
1987
- return new Zt(s, u.updateMenu, m).mapGroups([l], !0)[0];
1987
+ return new Zt(s, u.updateMenu, p).mapGroups([l], !0)[0];
1988
1988
  });
1989
1989
  function a(V) {
1990
1990
  var l, i;
@@ -2039,17 +2039,17 @@ const Er = /* @__PURE__ */ ie({
2039
2039
  V && (b.value = me(n.combinations), h.value = n.combinations[0].combinationKey || "");
2040
2040
  }
2041
2041
  );
2042
- const p = q();
2042
+ const m = q();
2043
2043
  o({
2044
- show: ($ = p.value) == null ? void 0 : $.show,
2045
- trigger: (R = p.value) == null ? void 0 : R.trigger
2044
+ show: ($ = m.value) == null ? void 0 : $.show,
2045
+ trigger: (R = m.value) == null ? void 0 : R.trigger
2046
2046
  });
2047
2047
  const { t: F } = ce();
2048
2048
  return (V, A) => {
2049
2049
  const k = H("fm-select"), d = H("fm-button"), l = H("fm-card");
2050
2050
  return D(), Q(yn, {
2051
2051
  ref_key: "baseFormRef",
2052
- ref: p,
2052
+ ref: m,
2053
2053
  "allow-refund-inventory": !0,
2054
2054
  "categorized-items": r(s).categorizedItems,
2055
2055
  config: T,
@@ -2113,21 +2113,21 @@ const Er = /* @__PURE__ */ ie({
2113
2113
  groupIds: {}
2114
2114
  },
2115
2115
  setup(t) {
2116
- const o = t, e = Pe(), { emitData: n, emitAction: f } = Dt(), s = se(), m = S(() => s.rules.group), u = S(() => s.groups);
2116
+ const o = t, e = Pe(), { emitData: n, emitAction: f } = Dt(), s = se(), p = S(() => s.rules.group), u = S(() => s.groups);
2117
2117
  function b(x) {
2118
- return me(x ?? []).sort((p, F) => p.position - F.position);
2118
+ return me(x ?? []).sort((m, F) => m.position - F.position);
2119
2119
  }
2120
2120
  const h = S(() => b(u.value).reduce((x, w) => (x[w._id] = {
2121
2121
  name: w.name,
2122
2122
  type: en(s.items, w.items)
2123
2123
  }, x), {})), c = S(() => [
2124
- ...Object.entries(h.value).map(([x, { name: w, type: p }]) => ({
2125
- label: `${w} ${m.value.type ? `(${It(p)})` : ""}`.trim(),
2124
+ ...Object.entries(h.value).map(([x, { name: w, type: m }]) => ({
2125
+ label: `${w} ${p.value.type ? `(${It(m)})` : ""}`.trim(),
2126
2126
  value: x
2127
2127
  }))
2128
2128
  ]), v = S(() => !!s.state.currentCatalogId || !!s.state.currentSchedulerId);
2129
2129
  S(() => {
2130
- const x = !s.state.currentSchedulerId, w = s.rules.group.type, p = s.version == Z.F_MENU_VERSION.enum.v3, F = s.rules.item.orderFromActiveOnly, $ = s.rules.item.bindToVariant;
2130
+ const x = !s.state.currentSchedulerId, w = s.rules.group.type, m = s.version == Z.F_MENU_VERSION.enum.v3, F = s.rules.item.orderFromActiveOnly, $ = s.rules.item.bindToVariant;
2131
2131
  return function(V) {
2132
2132
  return {
2133
2133
  isDefault: (A) => !v.value && !A,
@@ -2137,14 +2137,14 @@ const Er = /* @__PURE__ */ ie({
2137
2137
  price: V.type != Z.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
2138
2138
  priceEdit: !0,
2139
2139
  priceTier: s.isV4,
2140
- inventory: x ? p ? !v.value && V.type == Z.F_ADDON_GROUP_TYPE.enum.NORMAL : !v.value : !1,
2141
- orderFrom: (A) => x ? p ? V.type == Z.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? v.value : !!v.value == !A : v.value : !1,
2140
+ inventory: x ? m ? !v.value && V.type == Z.F_ADDON_GROUP_TYPE.enum.NORMAL : !v.value : !1,
2141
+ orderFrom: (A) => x ? m ? V.type == Z.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? v.value : !!v.value == !A : v.value : !1,
2142
2142
  orderFromActiveOnly: F,
2143
- showOrderFrom: x ? p ? v.value ? !0 : V.type == Z.F_ADDON_GROUP_TYPE.enum.PRODUCT : v.value : !1,
2143
+ showOrderFrom: x ? m ? v.value ? !0 : V.type == Z.F_ADDON_GROUP_TYPE.enum.PRODUCT : v.value : !1,
2144
2144
  bindToVariant: $,
2145
2145
  isOverride: v.value,
2146
2146
  isItemGroup: !1,
2147
- isV4: !p
2147
+ isV4: !m
2148
2148
  };
2149
2149
  };
2150
2150
  }), S(() => ({
@@ -2158,10 +2158,10 @@ const Er = /* @__PURE__ */ ie({
2158
2158
  n(_.value), f("primary"), e.close();
2159
2159
  };
2160
2160
  return (x, w) => {
2161
- const p = H("FmSearch"), F = H("FmCheckbox"), $ = H("FmButton");
2161
+ const m = H("FmSearch"), F = H("FmCheckbox"), $ = H("FmButton");
2162
2162
  return c.value.length > 0 ? (D(), J("div", Kr, [
2163
2163
  L("div", null, [
2164
- C(p, {
2164
+ C(m, {
2165
2165
  autofocus: "",
2166
2166
  modelValue: a.value,
2167
2167
  "onUpdate:modelValue": w[0] || (w[0] = (R) => a.value = R),
@@ -2248,7 +2248,7 @@ const Er = /* @__PURE__ */ ie({
2248
2248
  }) {
2249
2249
  const e = t, n = se(), f = Pe(), {
2250
2250
  t: s
2251
- } = ce(), m = o, u = S(() => n.rules.group), b = S(() => n.rules.item), h = S(() => n.groups);
2251
+ } = ce(), p = o, u = S(() => n.rules.group), b = S(() => n.rules.item), h = S(() => n.groups);
2252
2252
  function c(l, i) {
2253
2253
  return me(i ?? []).map((y) => {
2254
2254
  const I = l.find((G) => G._id === y._id);
@@ -2378,7 +2378,7 @@ const Er = /* @__PURE__ */ ie({
2378
2378
  }]), w = S(() => ({
2379
2379
  type: n.version !== Z.F_MENU_VERSION.enum.v4
2380
2380
  }));
2381
- function p() {
2381
+ function m() {
2382
2382
  f.open({
2383
2383
  title: s("menu.product.form.group.add"),
2384
2384
  contentComponent: Xr,
@@ -2398,7 +2398,7 @@ const Er = /* @__PURE__ */ ie({
2398
2398
  };
2399
2399
  return g.push(I), g;
2400
2400
  }, []);
2401
- m("replace:form", Ut(n, {
2401
+ p("replace:form", Ut(n, {
2402
2402
  ...e.form,
2403
2403
  groups: i
2404
2404
  }));
@@ -2411,7 +2411,7 @@ const Er = /* @__PURE__ */ ie({
2411
2411
  i.splice(i.findIndex((G) => G._id === l), 1);
2412
2412
  for (const G of ((g = e.form.variant) == null ? void 0 : g.variantCombinations) || [])
2413
2413
  (I = G.groups) == null || I.splice((y = G.groups) == null ? void 0 : y.findIndex((W) => W._id === l), 1);
2414
- m("replace:form", Ut(n, {
2414
+ p("replace:form", Ut(n, {
2415
2415
  ...e.form,
2416
2416
  groups: i
2417
2417
  }));
@@ -2448,10 +2448,10 @@ const Er = /* @__PURE__ */ ie({
2448
2448
  return (i = T.value.find((g) => g.value === l)) == null ? void 0 : i.label;
2449
2449
  }, d = (l) => {
2450
2450
  var i;
2451
- R.value ? m("update:form", "variant", {
2451
+ R.value ? p("update:form", "variant", {
2452
2452
  variantGroupIds: ((i = e.form.variant) == null ? void 0 : i.variantGroupIds) || [],
2453
2453
  variantCombinations: l
2454
- }) : m("update:form", "groups", l[0].groups || []);
2454
+ }) : p("update:form", "groups", l[0].groups || []);
2455
2455
  };
2456
2456
  return (l, i) => {
2457
2457
  const g = H("FmButton"), y = H("FmTable");
@@ -2465,7 +2465,7 @@ const Er = /* @__PURE__ */ ie({
2465
2465
  label: r(s)("menu.product.form.group.add"),
2466
2466
  "prepend-icon": "add",
2467
2467
  variant: "secondary",
2468
- onClick: p
2468
+ onClick: m
2469
2469
  }, null, 8, ["label"])]),
2470
2470
  default: B(() => [C(tn, null, {
2471
2471
  default: B(() => {
@@ -2512,15 +2512,15 @@ const Er = /* @__PURE__ */ ie({
2512
2512
  }) {
2513
2513
  const {
2514
2514
  t: e
2515
- } = ce(), n = t, f = o, s = se(), m = S(() => s.rules.item), u = S(() => m.value.inventory);
2516
- function b(T, x, w, p) {
2515
+ } = ce(), n = t, f = o, s = se(), p = S(() => s.rules.item), u = S(() => p.value.inventory);
2516
+ function b(T, x, w, m) {
2517
2517
  return !x || x && x.length === 0 ? [{
2518
2518
  _id: "",
2519
2519
  name: w || "",
2520
2520
  binding: T || []
2521
2521
  }] : x.map((F) => ({
2522
2522
  _id: F.combinationKey || "",
2523
- name: an(F.combinationKey || "", p),
2523
+ name: an(F.combinationKey || "", m),
2524
2524
  binding: F.inventoryBindings || []
2525
2525
  }));
2526
2526
  }
@@ -2534,11 +2534,11 @@ const Er = /* @__PURE__ */ ie({
2534
2534
  function v(T, x) {
2535
2535
  var $, R;
2536
2536
  let w = Ce.clone(n.form);
2537
- const p = w.variant;
2538
- if (((($ = p == null ? void 0 : p.variantCombinations) == null ? void 0 : $.length) ?? 0) > 0 && p) {
2539
- const V = p.variantCombinations.findIndex((k) => k.combinationKey === T);
2537
+ const m = w.variant;
2538
+ if (((($ = m == null ? void 0 : m.variantCombinations) == null ? void 0 : $.length) ?? 0) > 0 && m) {
2539
+ const V = m.variantCombinations.findIndex((k) => k.combinationKey === T);
2540
2540
  if (V < 0) return;
2541
- const A = Ce.clone(p.variantCombinations);
2541
+ const A = Ce.clone(m.variantCombinations);
2542
2542
  A[V].inventoryBindings = x, w = {
2543
2543
  ...w,
2544
2544
  variant: {
@@ -2631,8 +2631,8 @@ const Er = /* @__PURE__ */ ie({
2631
2631
  name: w.name || "",
2632
2632
  bindingKey: w._id,
2633
2633
  initialValue: w.binding ?? [],
2634
- "onUpdate:inventory": (p) => {
2635
- v(w._id, p);
2634
+ "onUpdate:inventory": (m) => {
2635
+ v(w._id, m);
2636
2636
  }
2637
2637
  }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), C(r(ho), {
2638
2638
  "row-data": c.value,
@@ -2663,31 +2663,34 @@ const Er = /* @__PURE__ */ ie({
2663
2663
  },
2664
2664
  emits: ["update:form"],
2665
2665
  setup(t, { emit: o }) {
2666
- const e = t, n = Ze(), f = se(), { t: s } = ce(), m = o, u = S(() => f.rules.item), b = S(() => {
2666
+ const e = t, n = Ze(), f = se(), { t: s } = ce(), p = o, u = S(() => f.rules.item), b = S(() => {
2667
2667
  var $, R;
2668
- const p = e.isOverride ? (($ = e.fallback) == null ? void 0 : $.unit) ?? ((R = e.fallback) == null ? void 0 : R.perXUnit) : void 0, F = e.form.unit ?? e.form.perXUnit ?? p;
2668
+ const m = e.isOverride ? (($ = e.fallback) == null ? void 0 : $.unit) ?? ((R = e.fallback) == null ? void 0 : R.perXUnit) : void 0, F = e.form.unit ?? e.form.perXUnit ?? m;
2669
2669
  return F != null;
2670
- }), h = (p) => {
2671
- m("update:form", "unit", p ? "" : void 0), m("update:form", "perXUnit", p ? 0 : void 0);
2672
- }, c = S(() => mt.setCoreStore(n).taxSetting()), v = S(() => {
2673
- var p;
2670
+ }), h = (m) => {
2671
+ p("update:form", "unit", m ? "" : void 0), p("update:form", "perXUnit", m ? 0 : void 0);
2672
+ }, c = S(() => {
2673
+ const m = f.isV4;
2674
+ return mt.setCoreStore(n).taxSetting(m);
2675
+ }), v = S(() => {
2676
+ var m;
2674
2677
  return mt.getSelectedTax(
2675
2678
  e.form.taxes,
2676
- (p = e.fallback) == null ? void 0 : p.taxes,
2679
+ (m = e.fallback) == null ? void 0 : m.taxes,
2677
2680
  c.value.countryTaxOptions
2678
2681
  );
2679
2682
  });
2680
- function _(p) {
2681
- const F = p.replace(/[^0-9.]/g, "");
2682
- if (!p) return !1;
2683
- m("update:form", "perXUnit", parseFloat(F));
2683
+ function _(m) {
2684
+ const F = m.replace(/[^0-9.]/g, "");
2685
+ if (!m) return !1;
2686
+ p("update:form", "perXUnit", parseFloat(F));
2684
2687
  }
2685
- function a(p) {
2686
- if (!p && e.form.perXUnit) {
2688
+ function a(m) {
2689
+ if (!m && e.form.perXUnit) {
2687
2690
  const [F, $] = e.form.perXUnit.toString().split(".");
2688
2691
  if ($ && $.length > 4) {
2689
2692
  const V = (typeof e.form.perXUnit == "string" ? parseFloat(e.form.perXUnit) : e.form.perXUnit).toFixed(4);
2690
- m("update:form", "perXUnit", parseFloat(V));
2693
+ p("update:form", "perXUnit", parseFloat(V));
2691
2694
  }
2692
2695
  }
2693
2696
  }
@@ -2705,7 +2708,7 @@ const Er = /* @__PURE__ */ ie({
2705
2708
  if (!E.value)
2706
2709
  try {
2707
2710
  E.value = !0, n.pushDataLayer({ event: "menu_catalog_item_price_remy_suggest_pricing" }), Ge.toggleDialog(!0), Ge.registerOnSelect((i) => {
2708
- typeof i == "number" && m(
2711
+ typeof i == "number" && p(
2709
2712
  "update:form",
2710
2713
  "price",
2711
2714
  be.Dinero.fromNumber({
@@ -2726,10 +2729,10 @@ const Er = /* @__PURE__ */ ie({
2726
2729
  }
2727
2730
  }
2728
2731
  const x = wo(f), w = S(() => {
2729
- var p;
2730
- return ((p = f.currentCatalog) == null ? void 0 : p.usePriceTiers) ?? [];
2732
+ var m;
2733
+ return ((m = f.currentCatalog) == null ? void 0 : m.usePriceTiers) ?? [];
2731
2734
  });
2732
- return (p, F) => {
2735
+ return (m, F) => {
2733
2736
  const $ = H("fm-select"), R = H("FmButton"), V = H("fm-checkbox"), A = H("fm-text-field"), k = Wt("tooltip");
2734
2737
  return D(), Q(Se, {
2735
2738
  title: r(s)("menu.product.form.price.title")
@@ -2744,15 +2747,15 @@ const Er = /* @__PURE__ */ ie({
2744
2747
  C(je, {
2745
2748
  disable: w.value.length > 0 && r(f).currentCatalog && !r(f).currentScheduler,
2746
2749
  min: 0,
2747
- "model-value": p.form.price || null,
2748
- placeholder: (d = p.fallback) != null && d.price ? r(Qe)(p.fallback.price, !1) : void 0,
2750
+ "model-value": m.form.price || null,
2751
+ placeholder: (d = m.fallback) != null && d.price ? r(Qe)(m.fallback.price, !1) : void 0,
2749
2752
  rules: [
2750
2753
  u.value.price ? (l) => !!l || r(s)("menu.product.form.price.fields.selling_price.required") : void 0
2751
2754
  ].filter(r(Pt).isSet),
2752
2755
  class: "w-[258px] xs:w-full",
2753
2756
  label: r(s)("menu.product.form.price.fields.selling_price.label"),
2754
2757
  "show-currency": "",
2755
- "onUpdate:modelValue": F[0] || (F[0] = (l) => l && m("update:form", "price", l))
2758
+ "onUpdate:modelValue": F[0] || (F[0] = (l) => l && p("update:form", "price", l))
2756
2759
  }, {
2757
2760
  append: B(() => [
2758
2761
  ut(C(Xt, {
@@ -2774,10 +2777,10 @@ const Er = /* @__PURE__ */ ie({
2774
2777
  placeholder: "--",
2775
2778
  class: "flex-1",
2776
2779
  "shift-menu": "",
2777
- "onUpdate:modelValue": F[1] || (F[1] = (l) => m("update:form", "taxes", [r(mt).decodeTax(l)]))
2780
+ "onUpdate:modelValue": F[1] || (F[1] = (l) => p("update:form", "taxes", [r(mt).decodeTax(l)]))
2778
2781
  }, null, 8, ["disabled", "items", "label", "model-value"])
2779
2782
  ], 8, ta),
2780
- !p.isOverride && r(f).isV4 ? (D(), Q(Ve, {
2783
+ !m.isOverride && r(f).isV4 ? (D(), Q(Ve, {
2781
2784
  key: 0,
2782
2785
  label: r(s)("menu.price_tier.price_group"),
2783
2786
  description: r(s)("menu.price_tier.description")
@@ -2793,12 +2796,12 @@ const Er = /* @__PURE__ */ ie({
2793
2796
  default: B(() => {
2794
2797
  var l;
2795
2798
  return [
2796
- p.isOverride ? X("", !0) : (D(), Q(zn, {
2799
+ m.isOverride ? X("", !0) : (D(), Q(zn, {
2797
2800
  key: 0,
2798
2801
  "price-tiers": r(x).priceTiers.value,
2799
- "model-value": p.form.priceTiers || ((l = p.fallback) == null ? void 0 : l.priceTiers) || {},
2802
+ "model-value": m.form.priceTiers || ((l = m.fallback) == null ? void 0 : l.priceTiers) || {},
2800
2803
  "allow-negative-price": !1,
2801
- "onUpdate:modelValue": F[2] || (F[2] = (i) => m("update:form", "priceTiers", i))
2804
+ "onUpdate:modelValue": F[2] || (F[2] = (i) => p("update:form", "priceTiers", i))
2802
2805
  }, null, 8, ["price-tiers", "model-value"]))
2803
2806
  ];
2804
2807
  }),
@@ -2812,16 +2815,16 @@ const Er = /* @__PURE__ */ ie({
2812
2815
  return [
2813
2816
  L("div", na, [
2814
2817
  C(V, {
2815
- disabled: !u.value.openPrice || p.isAddon,
2816
- "model-value": p.form.openPrice ?? ((l = p.fallback) == null ? void 0 : l.openPrice) ?? !1,
2817
- value: p.form.openPrice,
2818
+ disabled: !u.value.openPrice || m.isAddon,
2819
+ "model-value": m.form.openPrice ?? ((l = m.fallback) == null ? void 0 : l.openPrice) ?? !1,
2820
+ value: m.form.openPrice,
2818
2821
  label: r(s)("menu.product.form.price.settings.open_price.label"),
2819
2822
  sublabel: r(s)("menu.product.form.price.settings.open_price.sublabel"),
2820
- "onUpdate:modelValue": F[3] || (F[3] = (y) => m("update:form", "openPrice", y))
2823
+ "onUpdate:modelValue": F[3] || (F[3] = (y) => p("update:form", "openPrice", y))
2821
2824
  }, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
2822
2825
  L("div", oa, [
2823
2826
  C(V, {
2824
- disabled: !u.value.unit || p.isAddon,
2827
+ disabled: !u.value.unit || m.isAddon,
2825
2828
  "model-value": b.value,
2826
2829
  value: b.value,
2827
2830
  label: r(s)("menu.product.form.price.settings.sell_by_unit.label"),
@@ -2833,7 +2836,7 @@ const Er = /* @__PURE__ */ ie({
2833
2836
  L("div", la, [
2834
2837
  C(A, {
2835
2838
  disabled: !u.value.unit,
2836
- "model-value": p.form.perXUnit || ((i = p.fallback) == null ? void 0 : i.perXUnit) || null,
2839
+ "model-value": m.form.perXUnit || ((i = m.fallback) == null ? void 0 : i.perXUnit) || null,
2837
2840
  rules: [
2838
2841
  (y) => !!y || r(s)("menu.product.form.price.settings.sell_by_unit.per_unit.required"),
2839
2842
  (y) => !y || y > 0 || r(s)("menu.product.form.price.settings.sell_by_unit.per_unit.min")
@@ -2848,54 +2851,54 @@ const Er = /* @__PURE__ */ ie({
2848
2851
  L("div", ia, [
2849
2852
  C(A, {
2850
2853
  disabled: !u.value.unit,
2851
- "model-value": p.form.unit || ((g = p.fallback) == null ? void 0 : g.unit) || null,
2854
+ "model-value": m.form.unit || ((g = m.fallback) == null ? void 0 : g.unit) || null,
2852
2855
  rules: [
2853
2856
  (y) => !!y || r(s)("menu.product.form.price.settings.sell_by_unit.unit.required")
2854
2857
  ],
2855
2858
  placeholder: r(s)("menu.product.form.price.settings.sell_by_unit.unit.placeholder"),
2856
- "onUpdate:modelValue": F[4] || (F[4] = (y) => m("update:form", "unit", y))
2859
+ "onUpdate:modelValue": F[4] || (F[4] = (y) => p("update:form", "unit", y))
2857
2860
  }, null, 8, ["disabled", "model-value", "rules", "placeholder"])
2858
2861
  ])
2859
2862
  ])) : X("", !0)
2860
2863
  ]),
2861
2864
  u.value.costing ? (D(), J("div", sa, [
2862
2865
  C(V, {
2863
- "model-value": !!p.form.costing,
2864
- value: !!p.form.costing,
2866
+ "model-value": !!m.form.costing,
2867
+ value: !!m.form.costing,
2865
2868
  label: r(s)("menu.product.form.price.settings.track_costing.label"),
2866
- "onUpdate:modelValue": F[5] || (F[5] = (y) => m("update:form", "costing", y ? r(be.Dinero).zero().toObject() : void 0))
2869
+ "onUpdate:modelValue": F[5] || (F[5] = (y) => p("update:form", "costing", y ? r(be.Dinero).zero().toObject() : void 0))
2867
2870
  }, null, 8, ["model-value", "value", "label"]),
2868
- p.form.costing ? (D(), J("div", ua, [
2871
+ m.form.costing ? (D(), J("div", ua, [
2869
2872
  L("div", da, [
2870
2873
  C(je, {
2871
2874
  class: "w-full",
2872
2875
  min: 0,
2873
- "model-value": p.form.costing || null,
2876
+ "model-value": m.form.costing || null,
2874
2877
  nullable: "",
2875
2878
  "show-currency": "",
2876
- "onUpdate:modelValue": F[6] || (F[6] = (y) => m("update:form", "costing", y ?? r(be.Dinero).zero().toObject()))
2879
+ "onUpdate:modelValue": F[6] || (F[6] = (y) => p("update:form", "costing", y ?? r(be.Dinero).zero().toObject()))
2877
2880
  }, null, 8, ["model-value"])
2878
2881
  ])
2879
2882
  ])) : X("", !0)
2880
2883
  ])) : X("", !0),
2881
2884
  u.value.minPrice ? (D(), J("div", ca, [
2882
2885
  C(V, {
2883
- disabled: !u.value.minPrice || p.isAddon,
2884
- "model-value": !!p.form.minPrice,
2885
- value: !!p.form.minPrice,
2886
+ disabled: !u.value.minPrice || m.isAddon,
2887
+ "model-value": !!m.form.minPrice,
2888
+ value: !!m.form.minPrice,
2886
2889
  label: r(s)("menu.product.form.price.settings.min_price.label"),
2887
- "onUpdate:modelValue": F[7] || (F[7] = (y) => m("update:form", "minPrice", y ? r(be.Dinero).zero().toObject() : void 0))
2890
+ "onUpdate:modelValue": F[7] || (F[7] = (y) => p("update:form", "minPrice", y ? r(be.Dinero).zero().toObject() : void 0))
2888
2891
  }, null, 8, ["disabled", "model-value", "value", "label"]),
2889
2892
  L("div", ma, [
2890
2893
  L("div", pa, [
2891
- p.form.minPrice ? (D(), Q(je, {
2894
+ m.form.minPrice ? (D(), Q(je, {
2892
2895
  key: 0,
2893
- max: r(be.Dinero).fromFdoDinero(p.form.price).toUnit(),
2896
+ max: r(be.Dinero).fromFdoDinero(m.form.price).toUnit(),
2894
2897
  min: 0,
2895
- "model-value": p.form.minPrice || null,
2898
+ "model-value": m.form.minPrice || null,
2896
2899
  class: "flex-1",
2897
2900
  "show-currency": "",
2898
- "onUpdate:modelValue": F[8] || (F[8] = (y) => m("update:form", "minPrice", y ?? r(be.Dinero).zero().toObject()))
2901
+ "onUpdate:modelValue": F[8] || (F[8] = (y) => p("update:form", "minPrice", y ?? r(be.Dinero).zero().toObject()))
2899
2902
  }, null, 8, ["max", "model-value"])) : X("", !0)
2900
2903
  ])
2901
2904
  ])
@@ -2923,7 +2926,7 @@ const Er = /* @__PURE__ */ ie({
2923
2926
  emits: ["update:form", "replace:form"],
2924
2927
  setup(t, { emit: o }) {
2925
2928
  const e = t, n = se(), { t: f } = ce(), s = o;
2926
- function m() {
2929
+ function p() {
2927
2930
  return {
2928
2931
  ...Re.generator.initMenuV4PrintSetting(),
2929
2932
  // make toRoot default to false
@@ -2936,39 +2939,39 @@ const Er = /* @__PURE__ */ ie({
2936
2939
  }), c = S(() => {
2937
2940
  var w;
2938
2941
  return h.value ? b.value.reduce(
2939
- (p, { _id: F }) => (p.includes(F) || (p = [...p, F]), p),
2942
+ (m, { _id: F }) => (m.includes(F) || (m = [...m, F]), m),
2940
2943
  [...((w = e.form.print) == null ? void 0 : w.department) ?? []]
2941
- ) : b.value.map(({ _id: p }) => p);
2942
- }), v = S(() => b.value.reduce((w, p) => (w[p._id] = p.name, w), {}));
2944
+ ) : b.value.map(({ _id: m }) => m);
2945
+ }), v = S(() => b.value.reduce((w, m) => (w[m._id] = m.name, w), {}));
2943
2946
  function _(w) {
2944
2947
  s("update:form", "print", {
2945
- ...m(),
2948
+ ...p(),
2946
2949
  ...e.form.print,
2947
2950
  toRoot: !w
2948
2951
  });
2949
2952
  }
2950
2953
  function a(w) {
2951
2954
  s("update:form", "print", {
2952
- ...m(),
2955
+ ...p(),
2953
2956
  ...e.form.print,
2954
2957
  sequential: w
2955
2958
  });
2956
2959
  }
2957
2960
  function E(w) {
2958
2961
  s("update:form", "print", {
2959
- ...m(),
2962
+ ...p(),
2960
2963
  ...e.form.print,
2961
- department: w.filter((p) => {
2964
+ department: w.filter((m) => {
2962
2965
  var F;
2963
- return (((F = e.form.print) == null ? void 0 : F.department) ?? []).includes(p);
2966
+ return (((F = e.form.print) == null ? void 0 : F.department) ?? []).includes(m);
2964
2967
  })
2965
2968
  });
2966
2969
  }
2967
- function T(w, p) {
2970
+ function T(w, m) {
2968
2971
  var $, R;
2969
2972
  let F = [...((R = ($ = e.form) == null ? void 0 : $.print) == null ? void 0 : R.department) ?? []];
2970
- p && !F.includes(w) ? F = [...F, w] : p || (F = F.filter((V) => V !== w)), s("update:form", "print", {
2971
- ...m(),
2973
+ m && !F.includes(w) ? F = [...F, w] : m || (F = F.filter((V) => V !== w)), s("update:form", "print", {
2974
+ ...p(),
2972
2975
  ...e.form.print,
2973
2976
  department: F
2974
2977
  });
@@ -2988,7 +2991,7 @@ const Er = /* @__PURE__ */ ie({
2988
2991
  return ye(
2989
2992
  () => b.value.length,
2990
2993
  () => T(b.value[b.value.length - 1]._id, !0)
2991
- ), (w, p) => {
2994
+ ), (w, m) => {
2992
2995
  const F = H("fm-switch"), $ = H("fm-radio"), R = H("fm-radio-group"), V = H("fm-button"), A = H("fm-checkbox");
2993
2996
  return D(), Q(Se, {
2994
2997
  title: r(f)("menu.product.form.print.title")
@@ -3008,7 +3011,7 @@ const Er = /* @__PURE__ */ ie({
3008
3011
  label: r(f)("menu.product.form.print.config.group_parent.label"),
3009
3012
  "label-placement": "right",
3010
3013
  sublabel: r(f)("menu.product.form.print.config.group_parent.sublabel"),
3011
- "onUpdate:modelValue": p[0] || (p[0] = (l) => _(l))
3014
+ "onUpdate:modelValue": m[0] || (m[0] = (l) => _(l))
3012
3015
  }, null, 8, ["model-value", "label", "sublabel"])
3013
3016
  ];
3014
3017
  }),
@@ -3017,7 +3020,7 @@ const Er = /* @__PURE__ */ ie({
3017
3020
  C(R, {
3018
3021
  label: r(f)("menu.product.form.print.kds.label"),
3019
3022
  "model-value": ((k = w.form.print) == null ? void 0 : k.sequential) ?? !1,
3020
- "onUpdate:modelValue": p[1] || (p[1] = (d) => a(d))
3023
+ "onUpdate:modelValue": m[1] || (m[1] = (d) => a(d))
3021
3024
  }, {
3022
3025
  default: B(() => [
3023
3026
  L("div", ga, [
@@ -3040,7 +3043,7 @@ const Er = /* @__PURE__ */ ie({
3040
3043
  "item-key": (d) => d,
3041
3044
  "model-value": c.value,
3042
3045
  handle: ".handle",
3043
- "onUpdate:modelValue": p[3] || (p[3] = (d) => E(d)),
3046
+ "onUpdate:modelValue": m[3] || (m[3] = (d) => E(d)),
3044
3047
  class: "space-y-16"
3045
3048
  }, {
3046
3049
  item: B(({ element: d }) => {
@@ -3054,7 +3057,7 @@ const Er = /* @__PURE__ */ ie({
3054
3057
  class: "handle",
3055
3058
  "prepend-icon": "drag_handle",
3056
3059
  variant: "tertiary",
3057
- onClick: p[2] || (p[2] = ze(() => {
3060
+ onClick: m[2] || (m[2] = ze(() => {
3058
3061
  }, ["stop"]))
3059
3062
  }, null, 8, ["disabled"])) : X("", !0)
3060
3063
  ]),
@@ -3113,10 +3116,10 @@ const Er = /* @__PURE__ */ ie({
3113
3116
  }) {
3114
3117
  const e = t, n = se(), f = S(() => n.rules.item), {
3115
3118
  t: s
3116
- } = ce(), m = o, {
3119
+ } = ce(), p = o, {
3117
3120
  hasVariant: u,
3118
3121
  takeaways: b
3119
- } = Wn(e, m, f), h = S(() => [e.isOverride ? {
3122
+ } = Wn(e, p, f), h = S(() => [e.isOverride ? {
3120
3123
  label: s("menu.product.form.takeaway.options.follows_main"),
3121
3124
  value: null
3122
3125
  } : {
@@ -3204,8 +3207,8 @@ const Er = /* @__PURE__ */ ie({
3204
3207
  setTimeout(() => {
3205
3208
  n("update:show", !1);
3206
3209
  }, 100);
3207
- }, s = se(), { t: m } = ce(), u = S(
3208
- () => e.initialValue ? m("menu.variant.form.title.edit") : m("menu.variant.form.title.add")
3210
+ }, s = se(), { t: p } = ce(), u = S(
3211
+ () => e.initialValue ? p("menu.variant.form.title.edit") : p("menu.variant.form.title.add")
3209
3212
  ), b = S(() => e.initialValue ? "Update" : "Add"), h = () => {
3210
3213
  if (e.initialValue) {
3211
3214
  const $ = me(e.initialValue);
@@ -3250,7 +3253,7 @@ const Er = /* @__PURE__ */ ie({
3250
3253
  const R = $.draggedContext.futureIndex, V = $.relatedContext.list;
3251
3254
  return R !== V.length - 1;
3252
3255
  }
3253
- const p = Vt(
3256
+ const m = Vt(
3254
3257
  () => {
3255
3258
  if (e.initialValue) {
3256
3259
  const $ = c.value.options.filter((R) => !!R.name.trim());
@@ -3297,7 +3300,7 @@ const Er = /* @__PURE__ */ ie({
3297
3300
  blameFormChildOnValidationFailed: !0
3298
3301
  },
3299
3302
  "max-width": 560,
3300
- "onOn:clickedAway": r(p)
3303
+ "onOn:clickedAway": r(m)
3301
3304
  }, {
3302
3305
  "side-sheet-header": B(() => [
3303
3306
  L("p", wa, ge(u.value), 1)
@@ -3312,7 +3315,7 @@ const Er = /* @__PURE__ */ ie({
3312
3315
  variant: "primary"
3313
3316
  }, null, 8, ["label", "loading"]),
3314
3317
  C(k, {
3315
- label: r(m)("menu.common.actions.cancel"),
3318
+ label: r(p)("menu.common.actions.cancel"),
3316
3319
  size: "lg",
3317
3320
  variant: "tertiary",
3318
3321
  onClick: R[1] || (R[1] = () => _.value = !1)
@@ -3324,20 +3327,20 @@ const Er = /* @__PURE__ */ ie({
3324
3327
  return [
3325
3328
  L("div", Ca, [
3326
3329
  C(Se, {
3327
- title: r(m)("menu.variant.form.detail")
3330
+ title: r(p)("menu.variant.form.detail")
3328
3331
  }, {
3329
3332
  default: B(() => [
3330
3333
  C(V, {
3331
3334
  autofocus: "",
3332
- label: r(m)("menu.variant.form.name.label"),
3333
- "helper-text": r(m)("menu.variant.form.name.helper"),
3335
+ label: r(p)("menu.variant.form.name.label"),
3336
+ "helper-text": r(p)("menu.variant.form.name.helper"),
3334
3337
  modelValue: c.value.name,
3335
3338
  "onUpdate:modelValue": R[0] || (R[0] = (i) => c.value.name = i),
3336
- rules: [(i) => !!i || r(m)("menu.variant.form.name.required")],
3337
- placeholder: r(m)("menu.variant.form.name.placeholder")
3339
+ rules: [(i) => !!i || r(p)("menu.variant.form.name.required")],
3340
+ placeholder: r(p)("menu.variant.form.name.placeholder")
3338
3341
  }, null, 8, ["label", "helper-text", "modelValue", "rules", "placeholder"]),
3339
3342
  C(Ve, {
3340
- label: r(m)("menu.variant.form.options.title")
3343
+ label: r(p)("menu.variant.form.options.title")
3341
3344
  }, {
3342
3345
  default: B(() => [
3343
3346
  L("div", null, [
@@ -3364,11 +3367,11 @@ const Er = /* @__PURE__ */ ie({
3364
3367
  C(V, {
3365
3368
  "model-value": i.name,
3366
3369
  rules: [
3367
- () => !!c.value.options.length || r(m)("menu.variant.form.options.min_required"),
3368
- (y) => g === c.value.options.length - 1 || y ? !0 : r(m)("menu.variant.form.options.name_required")
3370
+ () => !!c.value.options.length || r(p)("menu.variant.form.options.min_required"),
3371
+ (y) => g === c.value.options.length - 1 || y ? !0 : r(p)("menu.variant.form.options.name_required")
3369
3372
  ],
3370
3373
  class: "flex-1",
3371
- placeholder: r(m)("menu.variant.form.options.placeholder"),
3374
+ placeholder: r(p)("menu.variant.form.options.placeholder"),
3372
3375
  "onUpdate:modelValue": (y) => E(i._id, y)
3373
3376
  }, En({ _: 2 }, [
3374
3377
  g !== c.value.options.length - 1 ? {
@@ -3399,7 +3402,7 @@ const Er = /* @__PURE__ */ ie({
3399
3402
  editable: !1,
3400
3403
  overrides: c.value.usedBy || [],
3401
3404
  "select-variant": !1,
3402
- title: r(m)("menu.variant.form.applied_product")
3405
+ title: r(p)("menu.variant.form.applied_product")
3403
3406
  }, null, 8, ["overrides", "title"])) : X("", !0)
3404
3407
  ])
3405
3408
  ];
@@ -3435,11 +3438,11 @@ const Sa = {
3435
3438
  selectedVariants: {}
3436
3439
  },
3437
3440
  setup(t) {
3438
- const o = Pe(), { emitData: e, emitAction: n } = Dt(), f = se(), { t: s } = ce(), m = t, u = S(() => f.variants.map((_) => ({
3441
+ const o = Pe(), { emitData: e, emitAction: n } = Dt(), f = se(), { t: s } = ce(), p = t, u = S(() => f.variants.map((_) => ({
3439
3442
  label: _.name,
3440
3443
  value: _._id,
3441
3444
  disabled: !1
3442
- }))), b = q(me(m.selectedVariants)), h = q(""), { createVariant: c } = Fa(), v = () => {
3445
+ }))), b = q(me(p.selectedVariants)), h = q(""), { createVariant: c } = Fa(), v = () => {
3443
3446
  e(b.value), n("primary"), o.close();
3444
3447
  };
3445
3448
  return (_, a) => {
@@ -3461,8 +3464,8 @@ const Sa = {
3461
3464
  ut(C(T, {
3462
3465
  modelValue: b.value,
3463
3466
  "onUpdate:modelValue": [
3464
- a[1] || (a[1] = (p) => b.value = p),
3465
- a[2] || (a[2] = (p) => r(e)(b.value))
3467
+ a[1] || (a[1] = (m) => b.value = m),
3468
+ a[2] || (a[2] = (m) => r(e)(b.value))
3466
3469
  ],
3467
3470
  label: w.label,
3468
3471
  value: w.value
@@ -3530,7 +3533,7 @@ const Sa = {
3530
3533
  setup(t, {
3531
3534
  emit: o
3532
3535
  }) {
3533
- const e = t, n = se(), f = Hn(), s = Fe(), m = Pe(), {
3536
+ const e = t, n = se(), f = Hn(), s = Fe(), p = Pe(), {
3534
3537
  t: u
3535
3538
  } = ce(), b = S(() => n.rules.item), h = S(() => b.value.minPrice && !!e.form.minPrice), c = S(() => !n.state.currentCatalogId), v = S(() => n.variants.reduce((d, l) => (d[l._id] = l, d), {}));
3536
3539
  q(!1);
@@ -3565,7 +3568,7 @@ const Sa = {
3565
3568
  }
3566
3569
  function T() {
3567
3570
  var d;
3568
- m.open({
3571
+ p.open({
3569
3572
  title: "Add variant",
3570
3573
  contentComponent: Ra,
3571
3574
  contentComponentProps: {
@@ -3582,7 +3585,7 @@ const Sa = {
3582
3585
  }
3583
3586
  const w = (d) => {
3584
3587
  F(d);
3585
- }, p = S(() => {
3588
+ }, m = S(() => {
3586
3589
  var l;
3587
3590
  return (((l = e.form.variant) == null ? void 0 : l.variantCombinations) || []).map((i) => {
3588
3591
  var y, I;
@@ -3804,13 +3807,13 @@ const Sa = {
3804
3807
  }),
3805
3808
  _: 1
3806
3809
  }, 8, ["model-value", "rules"]), C(tn, null, {
3807
- default: B(() => [p.value.length ? (D(), Q(I, {
3810
+ default: B(() => [m.value.length ? (D(), Q(I, {
3808
3811
  key: 0,
3809
3812
  class: "w-full",
3810
3813
  "column-defs": V.value,
3811
3814
  "column-visibility": A.value,
3812
- "page-size": p.value.length ?? 0,
3813
- "row-data": p.value ?? [],
3815
+ "page-size": m.value.length ?? 0,
3816
+ "row-data": m.value ?? [],
3814
3817
  "hide-footer": "",
3815
3818
  "shrink-at": !1
3816
3819
  }, null, 8, ["column-defs", "column-visibility", "page-size", "row-data"])) : X("", !0)]),
@@ -3854,7 +3857,7 @@ const Sa = {
3854
3857
  emits: ["update:editingState"],
3855
3858
  setup(t, { expose: o, emit: e }) {
3856
3859
  var _e, Ee, Ae, Be, Ye;
3857
- const n = t, f = e, s = Ze(), m = se(), { t: u } = ce();
3860
+ const n = t, f = e, s = Ze(), p = se(), { t: u } = ce();
3858
3861
  S(() => {
3859
3862
  var K;
3860
3863
  return (K = n.initialForm) != null && K._id ? u("menu.product.form.title.update") : u("menu.product.form.title.add");
@@ -3877,7 +3880,7 @@ const Sa = {
3877
3880
  var K;
3878
3881
  (K = c.value) == null || K.setSelectedItemIndex(h.value.length - 1);
3879
3882
  });
3880
- const v = S(() => m.rules.item), _ = q(), a = q(
3883
+ const v = S(() => p.rules.item), _ = q(), a = q(
3881
3884
  n.initialForm ? me(n.initialForm) : {
3882
3885
  ...Re.generator.initMenuV4Item(),
3883
3886
  category: n.categoryId
@@ -3897,20 +3900,20 @@ const Sa = {
3897
3900
  a.value = K, U();
3898
3901
  };
3899
3902
  async function w() {
3900
- _.value = a.value._id && p.value ? (await mo(
3903
+ _.value = a.value._id && m.value ? (await mo(
3901
3904
  n.mergedMenu,
3902
3905
  [a.value],
3903
3906
  n.menu,
3904
- m.state.currentCatalogId,
3905
- m.state.currentSchedulerId || void 0
3907
+ p.state.currentCatalogId,
3908
+ p.state.currentSchedulerId || void 0
3906
3909
  ))[0] : void 0;
3907
3910
  }
3908
- const p = S(
3909
- () => !!m.state.currentCatalogId || !!m.state.currentSchedulerId
3911
+ const m = S(
3912
+ () => !!p.state.currentCatalogId || !!p.state.currentSchedulerId
3910
3913
  ), F = S(() => {
3911
3914
  var K;
3912
- return p.value ? a.value.category == "" || a.value.category == null && ((K = _.value) == null ? void 0 : K.category) == null : bn(n.menu) && a.value.category == null;
3913
- }), $ = S(() => s.itemAttributeSettings.value.length > 0 && !p.value), R = q(
3915
+ return m.value ? a.value.category == "" || a.value.category == null && ((K = _.value) == null ? void 0 : K.category) == null : bn(n.menu) && a.value.category == null;
3916
+ }), $ = S(() => s.itemAttributeSettings.value.length > 0 && !m.value), R = q(
3914
3917
  a.value.category != null || !!a.value.code || !!a.value.orderFrom
3915
3918
  );
3916
3919
  function V(K) {
@@ -4103,14 +4106,14 @@ const Sa = {
4103
4106
  ref: c,
4104
4107
  items: h.value
4105
4108
  }, null, 8, ["items"]),
4106
- C(po, { "menu-store": r(m) }, null, 8, ["menu-store"]),
4109
+ C(po, { "menu-store": r(p) }, null, 8, ["menu-store"]),
4107
4110
  C(Ne, {
4108
4111
  toggle: R.value,
4109
4112
  "onUpdate:toggle": [
4110
4113
  z[0] || (z[0] = (re) => R.value = re),
4111
4114
  z[1] || (z[1] = (re) => V(re))
4112
4115
  ],
4113
- disabled: !p.value,
4116
+ disabled: !m.value,
4114
4117
  description: r(u)("menu.product.form.sections.general.description"),
4115
4118
  title: r(u)("menu.product.form.sections.general.title")
4116
4119
  }, {
@@ -4121,7 +4124,7 @@ const Sa = {
4121
4124
  fallback: _.value,
4122
4125
  form: a.value,
4123
4126
  "is-addon": F.value,
4124
- "is-override": p.value,
4127
+ "is-override": m.value,
4125
4128
  "is-create": !((re = n.initialForm) != null && re._id),
4126
4129
  "onUpdate:form": T
4127
4130
  }, null, 8, ["fallback", "form", "is-addon", "is-override", "is-create"])
@@ -4129,7 +4132,7 @@ const Sa = {
4129
4132
  }),
4130
4133
  _: 1
4131
4134
  }, 8, ["toggle", "disabled", "description", "title"]),
4132
- p.value ? X("", !0) : (D(), J("div", Ba)),
4135
+ m.value ? X("", !0) : (D(), J("div", Ba)),
4133
4136
  $.value ? (D(), Q(Se, {
4134
4137
  key: 1,
4135
4138
  title: r(u)("menu.product.form.sections.tagging.title"),
@@ -4152,7 +4155,7 @@ const Sa = {
4152
4155
  z[3] || (z[3] = (re) => k.value = re),
4153
4156
  z[4] || (z[4] = (re) => d(re))
4154
4157
  ],
4155
- disabled: !p.value,
4158
+ disabled: !m.value,
4156
4159
  description: r(u)("menu.product.form.sections.price.description"),
4157
4160
  title: r(u)("menu.product.form.sections.price.title")
4158
4161
  }, {
@@ -4161,13 +4164,13 @@ const Sa = {
4161
4164
  fallback: _.value,
4162
4165
  form: a.value,
4163
4166
  "is-addon": F.value,
4164
- "is-override": p.value,
4167
+ "is-override": m.value,
4165
4168
  "onUpdate:form": T
4166
4169
  }, null, 8, ["fallback", "form", "is-addon", "is-override"])
4167
4170
  ]),
4168
4171
  _: 1
4169
4172
  }, 8, ["toggle", "disabled", "description", "title"]),
4170
- v.value.print && !p.value ? (D(), J("div", za)) : X("", !0),
4173
+ v.value.print && !m.value ? (D(), J("div", za)) : X("", !0),
4171
4174
  v.value.print ? (D(), Q(Ne, {
4172
4175
  key: 4,
4173
4176
  toggle: W.value,
@@ -4185,21 +4188,21 @@ const Sa = {
4185
4188
  form: a.value,
4186
4189
  "full-combinations": E.value,
4187
4190
  "is-addon": F.value,
4188
- "is-override": p.value,
4191
+ "is-override": m.value,
4189
4192
  "onUpdate:form": T,
4190
4193
  "onReplace:form": z[5] || (z[5] = (re) => x(re))
4191
4194
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4192
4195
  ]),
4193
4196
  _: 1
4194
4197
  }, 8, ["toggle"])) : X("", !0),
4195
- p.value ? X("", !0) : (D(), J("div", ja)),
4198
+ m.value ? X("", !0) : (D(), J("div", ja)),
4196
4199
  C(Ne, {
4197
4200
  toggle: l.value,
4198
4201
  "onUpdate:toggle": [
4199
4202
  z[9] || (z[9] = (re) => l.value = re),
4200
4203
  z[10] || (z[10] = (re) => i(re))
4201
4204
  ],
4202
- disabled: !p.value,
4205
+ disabled: !m.value,
4203
4206
  description: r(u)("menu.product.form.sections.variant.description"),
4204
4207
  title: r(u)("menu.product.form.sections.variant.title")
4205
4208
  }, {
@@ -4209,14 +4212,14 @@ const Sa = {
4209
4212
  form: a.value,
4210
4213
  "full-combinations": E.value,
4211
4214
  "is-addon": F.value,
4212
- "is-override": p.value,
4215
+ "is-override": m.value,
4213
4216
  "onUpdate:form": T,
4214
4217
  "onReplace:form": z[8] || (z[8] = (re) => x(re))
4215
4218
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4216
4219
  ]),
4217
4220
  _: 1
4218
4221
  }, 8, ["toggle", "disabled", "description", "title"]),
4219
- v.value.group && !p.value ? (D(), J("div", Wa)) : X("", !0),
4222
+ v.value.group && !m.value ? (D(), J("div", Wa)) : X("", !0),
4220
4223
  v.value.group ? (D(), Q(Ne, {
4221
4224
  key: 7,
4222
4225
  toggle: P.value,
@@ -4224,7 +4227,7 @@ const Sa = {
4224
4227
  z[12] || (z[12] = (re) => P.value = re),
4225
4228
  z[13] || (z[13] = (re) => ne(re))
4226
4229
  ],
4227
- disabled: !p.value,
4230
+ disabled: !m.value,
4228
4231
  description: "Use a different group setting",
4229
4232
  title: "Update group"
4230
4233
  }, {
@@ -4234,14 +4237,14 @@ const Sa = {
4234
4237
  form: a.value,
4235
4238
  "full-combinations": E.value,
4236
4239
  "is-addon": F.value,
4237
- "is-override": p.value,
4240
+ "is-override": m.value,
4238
4241
  "onUpdate:form": T,
4239
4242
  "onReplace:form": z[11] || (z[11] = (re) => x(re))
4240
4243
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4241
4244
  ]),
4242
4245
  _: 1
4243
4246
  }, 8, ["toggle", "disabled"])) : X("", !0),
4244
- v.value.inventory && !p.value ? (D(), J("div", Ha)) : X("", !0),
4247
+ v.value.inventory && !m.value ? (D(), J("div", Ha)) : X("", !0),
4245
4248
  v.value.inventory ? (D(), Q(Ne, {
4246
4249
  key: 9,
4247
4250
  toggle: g.value,
@@ -4249,7 +4252,7 @@ const Sa = {
4249
4252
  z[15] || (z[15] = (re) => g.value = re),
4250
4253
  z[16] || (z[16] = (re) => y(re))
4251
4254
  ],
4252
- disabled: !p.value,
4255
+ disabled: !m.value,
4253
4256
  description: r(u)("menu.product.form.sections.inventory.description"),
4254
4257
  title: r(u)("menu.product.form.sections.inventory.title")
4255
4258
  }, {
@@ -4259,14 +4262,14 @@ const Sa = {
4259
4262
  form: a.value,
4260
4263
  "full-combinations": E.value,
4261
4264
  "is-addon": F.value,
4262
- "is-override": p.value,
4265
+ "is-override": m.value,
4263
4266
  "onUpdate:form": T,
4264
4267
  "onReplace:form": z[14] || (z[14] = (re) => x(re))
4265
4268
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4266
4269
  ]),
4267
4270
  _: 1
4268
4271
  }, 8, ["toggle", "disabled", "description", "title"])) : X("", !0),
4269
- v.value.takeaway(a.value.category ?? ((le = _.value) == null ? void 0 : le.category)) && !p.value ? (D(), J("div", qa)) : X("", !0),
4272
+ v.value.takeaway(a.value.category ?? ((le = _.value) == null ? void 0 : le.category)) && !m.value ? (D(), J("div", qa)) : X("", !0),
4270
4273
  v.value.takeaway(a.value.category ?? ((Ie = _.value) == null ? void 0 : Ie.category)) ? (D(), Q(Ne, {
4271
4274
  key: 11,
4272
4275
  toggle: I.value,
@@ -4274,7 +4277,7 @@ const Sa = {
4274
4277
  z[18] || (z[18] = (re) => I.value = re),
4275
4278
  z[19] || (z[19] = (re) => G(re))
4276
4279
  ],
4277
- disabled: !p.value,
4280
+ disabled: !m.value,
4278
4281
  description: r(u)("menu.product.form.sections.takeaway.description"),
4279
4282
  title: r(u)("menu.product.form.sections.takeaway.title")
4280
4283
  }, {
@@ -4284,7 +4287,7 @@ const Sa = {
4284
4287
  form: a.value,
4285
4288
  "full-combinations": E.value,
4286
4289
  "is-addon": F.value,
4287
- "is-override": p.value,
4290
+ "is-override": m.value,
4288
4291
  "onUpdate:form": T,
4289
4292
  "onReplace:form": z[17] || (z[17] = (re) => x(re))
4290
4293
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
@@ -4299,24 +4302,24 @@ const Sa = {
4299
4302
  }
4300
4303
  });
4301
4304
  function Ja(t) {
4302
- const { storageKey: o, defaultWidth: e, minWidth: n, maxWidth: f } = t, s = Lo(o, e), m = q(!1), u = q(null);
4305
+ const { storageKey: o, defaultWidth: e, minWidth: n, maxWidth: f } = t, s = Lo(o, e), p = q(!1), u = q(null);
4303
4306
  function b(v) {
4304
- v.preventDefault(), m.value = !0, document.addEventListener("mousemove", h), document.addEventListener("mouseup", c), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
4307
+ v.preventDefault(), p.value = !0, document.addEventListener("mousemove", h), document.addEventListener("mouseup", c), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
4305
4308
  }
4306
4309
  function h(v) {
4307
- if (m.value && u.value) {
4310
+ if (p.value && u.value) {
4308
4311
  const _ = u.value.getBoundingClientRect(), a = v.clientX - _.left;
4309
4312
  a >= n && a <= f && (s.value = a);
4310
4313
  }
4311
4314
  }
4312
4315
  function c() {
4313
- m.value = !1, document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", c), document.body.style.cursor = "", document.body.style.userSelect = "";
4316
+ p.value = !1, document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", c), document.body.style.cursor = "", document.body.style.userSelect = "";
4314
4317
  }
4315
4318
  return xn(() => {
4316
4319
  document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", c);
4317
4320
  }), {
4318
4321
  panelWidth: s,
4319
- isDragging: m,
4322
+ isDragging: p,
4320
4323
  containerRef: u,
4321
4324
  startResize: b,
4322
4325
  stopResize: c
@@ -4356,7 +4359,7 @@ const Qa = {
4356
4359
  L("div", {
4357
4360
  class: "absolute left-[-3px] right-[-3px] top-0 bottom-0 resize-handle z-10",
4358
4361
  onMousedown: s[0] || (s[0] = //@ts-ignore
4359
- (...m) => r(n) && r(n)(...m))
4362
+ (...p) => r(n) && r(n)(...p))
4360
4363
  }, null, 32)
4361
4364
  ]),
4362
4365
  L("div", Za, [
@@ -4369,18 +4372,18 @@ const Qa = {
4369
4372
  }
4370
4373
  }), ll = /* @__PURE__ */ Xe(al, [["__scopeId", "data-v-570141b0"]]);
4371
4374
  function hn() {
4372
- const t = se(), o = S(() => t.categorizedRawMenuItems.filter((m) => m.items.length > 0)), e = S(() => {
4373
- const m = t.currentCatalog;
4374
- return m ? Et.getItemAvailable(m).map((u) => ({ _id: u })) : [];
4375
+ const t = se(), o = S(() => t.categorizedRawMenuItems.filter((p) => p.items.length > 0)), e = S(() => {
4376
+ const p = t.currentCatalog;
4377
+ return p ? Et.getItemAvailable(p).map((u) => ({ _id: u })) : [];
4375
4378
  });
4376
- async function n(m) {
4379
+ async function n(p) {
4377
4380
  const u = t.currentCatalog;
4378
4381
  if (!u) return;
4379
- const b = m.reduce(
4382
+ const b = p.reduce(
4380
4383
  (c, v) => (c[v] = bt(
4381
4384
  v,
4382
4385
  u.override.items[v],
4383
- m.includes(v),
4386
+ p.includes(v),
4384
4387
  t.version === Z.F_MENU_VERSION.enum.v3
4385
4388
  ), c),
4386
4389
  {}
@@ -4399,11 +4402,11 @@ function hn() {
4399
4402
  data: h
4400
4403
  });
4401
4404
  }
4402
- async function f(m) {
4405
+ async function f(p) {
4403
4406
  var c;
4404
4407
  const u = t.currentCatalog;
4405
4408
  if (!u) return;
4406
- const b = m.reduce(
4409
+ const b = p.reduce(
4407
4410
  (v, _) => {
4408
4411
  const a = u.override.items[_];
4409
4412
  return v[_] = bt(
@@ -4430,11 +4433,11 @@ function hn() {
4430
4433
  data: h
4431
4434
  });
4432
4435
  }
4433
- async function s(m) {
4436
+ async function s(p) {
4434
4437
  var c;
4435
4438
  const u = t.currentCatalog;
4436
4439
  if (!u) return;
4437
- const b = m.reduce(
4440
+ const b = p.reduce(
4438
4441
  (v, _) => {
4439
4442
  const a = u.override.items[_];
4440
4443
  return v[_] = bt(
@@ -4470,12 +4473,12 @@ function hn() {
4470
4473
  };
4471
4474
  }
4472
4475
  function bt(t, o, e, n) {
4473
- const f = o == null ? void 0 : o.find((u) => !u.combinationKey), s = e ? null : Z.F_ORDER_FROM.enum.NONE, m = n ? e ? null : "" : f == null ? void 0 : f.category;
4476
+ const f = o == null ? void 0 : o.find((u) => !u.combinationKey), s = e ? null : Z.F_ORDER_FROM.enum.NONE, p = n ? e ? null : "" : f == null ? void 0 : f.category;
4474
4477
  return [
4475
4478
  {
4476
4479
  ...f ?? {},
4477
4480
  orderFrom: s,
4478
- category: m,
4481
+ category: p,
4479
4482
  _id: t
4480
4483
  },
4481
4484
  ...(o == null ? void 0 : o.filter((u) => !!u.combinationKey)) ?? []
@@ -4490,7 +4493,7 @@ function il() {
4490
4493
  ...c,
4491
4494
  items: c.items.filter((v) => h.has(v._id))
4492
4495
  })).filter((c) => c.items.length > 0);
4493
- }), m = S(() => {
4496
+ }), p = S(() => {
4494
4497
  var v;
4495
4498
  const b = t.currentScheduler;
4496
4499
  if (!b) return [];
@@ -4540,7 +4543,7 @@ function il() {
4540
4543
  }
4541
4544
  return {
4542
4545
  linkableItems: s,
4543
- currentItems: m,
4546
+ currentItems: p,
4544
4547
  applyProduct: u
4545
4548
  };
4546
4549
  }
@@ -4551,8 +4554,8 @@ function sl(t, o, e) {
4551
4554
  subCategoryMeta: {}
4552
4555
  }), f = lt(t);
4553
4556
  let s = f;
4554
- for (const m of o)
4555
- s.subCategoryMeta = s.subCategoryMeta ?? {}, s.subCategoryMeta[m] = s.subCategoryMeta[m] ?? n(), s = s.subCategoryMeta[m];
4557
+ for (const p of o)
4558
+ s.subCategoryMeta = s.subCategoryMeta ?? {}, s.subCategoryMeta[p] = s.subCategoryMeta[p] ?? n(), s = s.subCategoryMeta[p];
4556
4559
  return Object.assign(s, e), f;
4557
4560
  }
4558
4561
  function wn() {
@@ -4596,14 +4599,14 @@ function wn() {
4596
4599
  if (T.type === "item") {
4597
4600
  const w = _.get(T.id);
4598
4601
  if (w) {
4599
- let p = null;
4600
- c && c._id !== b._id && (p = ro(
4602
+ let m = null;
4603
+ c && c._id !== b._id && (m = ro(
4601
4604
  w,
4602
4605
  c == null ? void 0 : c._id,
4603
4606
  b._id
4604
4607
  ));
4605
4608
  const F = ao(
4606
- p ?? w,
4609
+ m ?? w,
4607
4610
  b._id,
4608
4611
  x + 1
4609
4612
  );
@@ -4619,7 +4622,7 @@ function wn() {
4619
4622
  const E = a.modules.category.find((T) => T._id === (b == null ? void 0 : b._id) || null);
4620
4623
  E && (E.subCategoryMeta = v.subCategoryMeta), t.setMenu(a);
4621
4624
  }
4622
- async function m(u, b) {
4625
+ async function p(u, b) {
4623
4626
  await t.updateMenu({
4624
4627
  module: Z.F_MENU_MODULE_V4_KEY.enum.item,
4625
4628
  operation: pe.F_OPERATION_TYPE.update,
@@ -4632,7 +4635,7 @@ function wn() {
4632
4635
  deleteItem: n,
4633
4636
  rearrange: f,
4634
4637
  rearrangeWithSubCategory: s,
4635
- updateItem: m
4638
+ updateItem: p
4636
4639
  };
4637
4640
  }
4638
4641
  var Je = /* @__PURE__ */ ((t) => (t.CATEGORY = "category", t.ITEM = "item", t.SUB_CATEGORY = "subCategory", t))(Je || {});
@@ -4645,7 +4648,7 @@ function ul() {
4645
4648
  var E;
4646
4649
  return ((E = f.value[a]) == null ? void 0 : E.name) || a;
4647
4650
  }
4648
- function m(a) {
4651
+ function p(a) {
4649
4652
  function E(T) {
4650
4653
  if (T.children && T.children.length > 0)
4651
4654
  for (const x of T.children)
@@ -4657,7 +4660,7 @@ function ul() {
4657
4660
  }
4658
4661
  function u(a) {
4659
4662
  return a.map((E) => {
4660
- var x, w, p;
4663
+ var x, w, m;
4661
4664
  const T = {
4662
4665
  ...E,
4663
4666
  children: []
@@ -4667,7 +4670,7 @@ function ul() {
4667
4670
  continue;
4668
4671
  const $ = ot.get((w = F.meta) == null ? void 0 : w.rawId);
4669
4672
  if (!($ != null && $.subCategories) || !$.subCategories.length)
4670
- (p = T.children) == null || p.push(F);
4673
+ (m = T.children) == null || m.push(F);
4671
4674
  else {
4672
4675
  let R = T.children, V = "";
4673
4676
  for (const A of $.subCategories || []) {
@@ -4718,11 +4721,11 @@ function ul() {
4718
4721
  throw new Error("No parent category node found");
4719
4722
  }
4720
4723
  function c(a) {
4721
- var x, w, p, F;
4724
+ var x, w, m, F;
4722
4725
  if (!a.children)
4723
4726
  return a;
4724
4727
  const E = ((w = (x = h(a)) == null ? void 0 : x.meta) == null ? void 0 : w.rawId) ?? null, T = lo(E);
4725
- return ((p = a.meta) == null ? void 0 : p.nodeType) === "category" || ((F = a.meta) == null ? void 0 : F.nodeType) === "subCategory" ? (a.children = pt(
4728
+ return ((m = a.meta) == null ? void 0 : m.nodeType) === "category" || ((F = a.meta) == null ? void 0 : F.nodeType) === "subCategory" ? (a.children = pt(
4726
4729
  a.children,
4727
4730
  ($) => $.label,
4728
4731
  ($) => {
@@ -4740,11 +4743,11 @@ function ul() {
4740
4743
  }
4741
4744
  async function _({ eventEmitter: a }) {
4742
4745
  var W, ee;
4743
- const E = o.state.menu, T = !o.state.currentCatalogId, x = !o.state.currentSchedulerId, w = hn(), p = o.mergedMenu;
4746
+ const E = o.state.menu, T = !o.state.currentCatalogId, x = !o.state.currentSchedulerId, w = hn(), m = o.mergedMenu;
4744
4747
  ot.clear(), rt.clear();
4745
4748
  for (const P of E.modules.item)
4746
4749
  ot.set(P._id, P);
4747
- for (const P of p.modules.group)
4750
+ for (const P of m.modules.group)
4748
4751
  rt.set(P._id, P);
4749
4752
  function F(P, ne) {
4750
4753
  return {
@@ -4759,7 +4762,7 @@ function ul() {
4759
4762
  }
4760
4763
  function $(P, ne, ue) {
4761
4764
  var U;
4762
- const O = p.modules.group.find(
4765
+ const O = m.modules.group.find(
4763
4766
  (M) => M._id === ue._id
4764
4767
  );
4765
4768
  if (!O)
@@ -4807,7 +4810,7 @@ function ul() {
4807
4810
  function Ee() {
4808
4811
  if (M.name)
4809
4812
  return M.name;
4810
- const te = p.modules.item.find((le) => le._id === M._id);
4813
+ const te = m.modules.item.find((le) => le._id === M._id);
4811
4814
  return te ? te.name : t("menu.tree_editor.labels.unknown");
4812
4815
  }
4813
4816
  function Ae() {
@@ -4913,7 +4916,7 @@ function ul() {
4913
4916
  return ne;
4914
4917
  }
4915
4918
  const k = (P) => `category-${P}`, d = pt(
4916
- p.modules.category,
4919
+ m.modules.category,
4917
4920
  (P) => P.name
4918
4921
  ).map((P) => {
4919
4922
  const ne = [];
@@ -4955,7 +4958,7 @@ function ul() {
4955
4958
  rawObject: P
4956
4959
  }
4957
4960
  };
4958
- }), l = bn(p), g = {
4961
+ }), l = bn(m), g = {
4959
4962
  id: k("addon"),
4960
4963
  icon: Oe.CATEGORY,
4961
4964
  label: t("menu.tree_editor.labels.addon"),
@@ -4986,7 +4989,7 @@ function ul() {
4986
4989
  }
4987
4990
  }), d.push(g));
4988
4991
  const y = (P, ne) => `item-${ne ?? "addon"}-${P}`;
4989
- for (const P of p.modules.item)
4992
+ for (const P of m.modules.item)
4990
4993
  Rt(P).forEach(({ _id: ue }) => {
4991
4994
  var U, M, N, Y, j, oe, de, _e;
4992
4995
  const O = ue ? d.find((Ee) => Ee.id === k(ue)) : g;
@@ -5074,7 +5077,7 @@ function ul() {
5074
5077
  ne && (P.chips = vt(P.chips ?? [], ne));
5075
5078
  }
5076
5079
  const I = u(d);
5077
- return m(I), {
5080
+ return p(I), {
5078
5081
  tree: v(I)
5079
5082
  };
5080
5083
  }
@@ -5093,7 +5096,7 @@ function dl() {
5093
5096
  const s = (k) => {
5094
5097
  var d;
5095
5098
  return ((d = k.meta) == null ? void 0 : d.nodeType) === Je.CATEGORY;
5096
- }, m = (k) => {
5099
+ }, p = (k) => {
5097
5100
  var d;
5098
5101
  return ((d = k.meta) == null ? void 0 : d.nodeType) === Je.ITEM;
5099
5102
  }, u = (k) => {
@@ -5121,7 +5124,7 @@ function dl() {
5121
5124
  }
5122
5125
  function c(k) {
5123
5126
  return k.children ? k.children.map((d) => {
5124
- if (m(d))
5127
+ if (p(d))
5125
5128
  return {
5126
5129
  type: "item",
5127
5130
  id: d.meta.rawId
@@ -5144,7 +5147,7 @@ function dl() {
5144
5147
  let d = [];
5145
5148
  if (!(k != null && k.children)) return d;
5146
5149
  for (const l of k.children)
5147
- m(l) ? d.push(l) : d = d.concat(a(l));
5150
+ p(l) ? d.push(l) : d = d.concat(a(l));
5148
5151
  return d;
5149
5152
  }
5150
5153
  function E(k) {
@@ -5157,7 +5160,7 @@ function dl() {
5157
5160
  return null;
5158
5161
  }
5159
5162
  function T(k, d, l, i, g) {
5160
- if (m(d)) {
5163
+ if (p(d)) {
5161
5164
  const y = E(k), I = E(d);
5162
5165
  return (y == null ? void 0 : y.id) === (I == null ? void 0 : I.id) ? !0 : !((y == null ? void 0 : y.id) !== (I == null ? void 0 : I.id) && a(I).some(
5163
5166
  (G) => {
@@ -5169,11 +5172,11 @@ function dl() {
5169
5172
  return s(d) && i && d.id !== i.id && l === "inside" ? !a(d).some((I) => {
5170
5173
  var G, W;
5171
5174
  return ((G = I.meta) == null ? void 0 : G.rawId) === ((W = k.meta) == null ? void 0 : W.rawId);
5172
- }) : !!(m(d) && (g == null ? void 0 : g.id) !== (i == null ? void 0 : i.id) || u(d));
5175
+ }) : !!(p(d) && (g == null ? void 0 : g.id) !== (i == null ? void 0 : i.id) || u(d));
5173
5176
  }
5174
5177
  const x = (k, d, l) => {
5175
5178
  const i = n.getNodeById(k), g = n.getNodeById(d), y = i == null ? void 0 : i.parent, I = g == null ? void 0 : g.parent;
5176
- return !i || !g ? !1 : s(i) ? v(i, g) : u(i) ? _(i, g, l, y, I) : m(i) ? T(i, g, l, y, I) : !1;
5179
+ return !i || !g ? !1 : s(i) ? v(i, g) : u(i) ? _(i, g, l, y, I) : p(i) ? T(i, g, l, y, I) : !1;
5177
5180
  };
5178
5181
  async function w(k, d, l) {
5179
5182
  if (!v(k, d)) {
@@ -5189,11 +5192,11 @@ function dl() {
5189
5192
  }).filter(Boolean), G = _t(I, g, y);
5190
5193
  await e.rearrange(G);
5191
5194
  }
5192
- function p(k, d) {
5195
+ function m(k, d) {
5193
5196
  var l;
5194
5197
  if (s(k) && d === "inside")
5195
5198
  return { parent: k, index: 0 };
5196
- if (m(k)) {
5199
+ if (p(k)) {
5197
5200
  if (!k.parent) throw new Error("Target item's parent not found");
5198
5201
  let i = ((l = k.parent.children) == null ? void 0 : l.findIndex((g) => g.id === k.id)) ?? -1;
5199
5202
  if (i === -1) throw new Error("Target item not found in parent");
@@ -5243,7 +5246,7 @@ function dl() {
5243
5246
  f("Cannot drop item here");
5244
5247
  return;
5245
5248
  }
5246
- const g = p(d, l), y = b(d), I = k.meta;
5249
+ const g = m(d, l), y = b(d), I = k.meta;
5247
5250
  ((i = k.parent) == null ? void 0 : i.id) === g.parent.id ? await F(
5248
5251
  k,
5249
5252
  g.parent,
@@ -5283,11 +5286,11 @@ function dl() {
5283
5286
  }
5284
5287
  async function A(k) {
5285
5288
  const d = n.getNodeById(k.draggedNodeId), l = n.getNodeById(k.targetNodeId);
5286
- !d || !l || (s(d) ? await w(d, l, k.dragPosition) : m(d) ? await R(d, l, k.dragPosition) : u(d) ? await V(d, l, k.dragPosition) : f("Unsupported drag operation"));
5289
+ !d || !l || (s(d) ? await w(d, l, k.dragPosition) : p(d) ? await R(d, l, k.dragPosition) : u(d) ? await V(d, l, k.dragPosition) : f("Unsupported drag operation"));
5287
5290
  }
5288
5291
  return {
5289
5292
  isCategoryNode: s,
5290
- isItemNode: m,
5293
+ isItemNode: p,
5291
5294
  isSubCategoryNode: u,
5292
5295
  canDropFn: x,
5293
5296
  handleNodeDragDrop: A
@@ -5350,21 +5353,21 @@ const Tt = /* @__PURE__ */ ie({
5350
5353
  }
5351
5354
  }), Cn = 300;
5352
5355
  function cl(t) {
5353
- const { itemHeight: o, emit: e, getFlattenedItems: n, getContainerRef: f, canDropFn: s } = t, m = q(!1), u = q(null), b = q(null), h = q(null), c = q(0), v = q({ x: 0, y: 0 }), _ = q(/* @__PURE__ */ new Map());
5354
- function a(w, p) {
5355
- p.button === 0 && (v.value = { x: p.clientX, y: p.clientY }, u.value = w, c.value = p.clientY, _.value = Xo(n()), setTimeout(() => {
5356
- u.value === w && (m.value = !0, v.value = { x: p.clientX, y: p.clientY }, e("updateDragState", w, null, null), document.addEventListener("mousemove", E), document.addEventListener("mouseup", T));
5356
+ const { itemHeight: o, emit: e, getFlattenedItems: n, getContainerRef: f, canDropFn: s } = t, p = q(!1), u = q(null), b = q(null), h = q(null), c = q(0), v = q({ x: 0, y: 0 }), _ = q(/* @__PURE__ */ new Map());
5357
+ function a(w, m) {
5358
+ m.button === 0 && (v.value = { x: m.clientX, y: m.clientY }, u.value = w, c.value = m.clientY, _.value = Xo(n()), setTimeout(() => {
5359
+ u.value === w && (p.value = !0, v.value = { x: m.clientX, y: m.clientY }, e("updateDragState", w, null, null), document.addEventListener("mousemove", E), document.addEventListener("mouseup", T));
5357
5360
  }, Cn));
5358
5361
  }
5359
5362
  function E(w) {
5360
5363
  var k;
5361
- if (!m.value || !u.value) return;
5364
+ if (!p.value || !u.value) return;
5362
5365
  requestAnimationFrame(() => {
5363
5366
  v.value = { x: w.clientX, y: w.clientY };
5364
5367
  });
5365
- const p = f();
5366
- if (!p) return;
5367
- const F = p.getBoundingClientRect(), $ = w.clientY - F.top + p.scrollTop, R = Math.floor($ / o), V = n();
5368
+ const m = f();
5369
+ if (!m) return;
5370
+ const F = m.getBoundingClientRect(), $ = w.clientY - F.top + m.scrollTop, R = Math.floor($ / o), V = n();
5368
5371
  if (R >= 0 && R < V.length) {
5369
5372
  const l = V[R].id;
5370
5373
  if (l === u.value) {
@@ -5384,20 +5387,20 @@ function cl(t) {
5384
5387
  e("updateDragState", u.value, b.value, h.value);
5385
5388
  }
5386
5389
  const A = 50;
5387
- w.clientY - F.top < A ? p.scrollTop -= 10 : F.bottom - w.clientY < A && (p.scrollTop += 10);
5390
+ w.clientY - F.top < A ? m.scrollTop -= 10 : F.bottom - w.clientY < A && (m.scrollTop += 10);
5388
5391
  }
5389
5392
  function T() {
5390
- document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", T), m.value && u.value && b.value && h.value && e("nodeDragDrop", {
5393
+ document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", T), p.value && u.value && b.value && h.value && e("nodeDragDrop", {
5391
5394
  draggedNodeId: u.value,
5392
5395
  targetNodeId: b.value,
5393
5396
  dragPosition: h.value
5394
- }), m.value = !1, e("updateDragState", null, null, null), u.value = null, b.value = null, h.value = null, _.value.clear();
5397
+ }), p.value = !1, e("updateDragState", null, null, null), u.value = null, b.value = null, h.value = null, _.value.clear();
5395
5398
  }
5396
5399
  function x() {
5397
- document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", T), m.value = !1, e("updateDragState", null, null, null), u.value = null, b.value = null, h.value = null, _.value.clear();
5400
+ document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", T), p.value = !1, e("updateDragState", null, null, null), u.value = null, b.value = null, h.value = null, _.value.clear();
5398
5401
  }
5399
5402
  return {
5400
- isDragging: m,
5403
+ isDragging: p,
5401
5404
  draggedNodeId: u,
5402
5405
  dropTargetNodeId: b,
5403
5406
  dropPosition: h,
@@ -5417,13 +5420,13 @@ function ml(t, o) {
5417
5420
  function s() {
5418
5421
  e && (clearTimeout(e), e = null);
5419
5422
  }
5420
- function m() {
5423
+ function p() {
5421
5424
  e && (clearTimeout(e), e = null);
5422
5425
  }
5423
5426
  return {
5424
5427
  onMouseDown: f,
5425
5428
  onMouseMove: s,
5426
- onMouseUp: m
5429
+ onMouseUp: p
5427
5430
  };
5428
5431
  }
5429
5432
  const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
@@ -5499,7 +5502,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5499
5502
  setup(t, {
5500
5503
  emit: o
5501
5504
  }) {
5502
- const e = t, n = S(() => e.expanded ? "expand_more" : "chevron_right"), f = S(() => e.node.disabled ? "text-fm-color-neutral-gray-200" : ""), s = S(() => e.node.disabled ? "cursor-not-allowed" : e.node.onClick ? "cursor-pointer" : ""), m = S(() => e.selected ? "bg-fm-color-system-warning-100" : e.dropTarget && e.dropPosition === "inside" ? "bg-fm-color-primary-50" : ""), u = S(() => e.selected ? "text-fm-color-primary" : ""), b = o, {
5505
+ const e = t, n = S(() => e.expanded ? "expand_more" : "chevron_right"), f = S(() => e.node.disabled ? "text-fm-color-neutral-gray-200" : ""), s = S(() => e.node.disabled ? "cursor-not-allowed" : e.node.onClick ? "cursor-pointer" : ""), p = S(() => e.selected ? "bg-fm-color-system-warning-100" : e.dropTarget && e.dropPosition === "inside" ? "bg-fm-color-primary-50" : ""), u = S(() => e.selected ? "text-fm-color-primary" : ""), b = o, {
5503
5506
  onMouseDown: h,
5504
5507
  onMouseMove: c,
5505
5508
  onMouseUp: v
@@ -5511,10 +5514,10 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5511
5514
  return !!e.node.disabled || !((_ = e.node) != null && _.draggable);
5512
5515
  });
5513
5516
  return (_, a) => {
5514
- var x, w, p;
5517
+ var x, w, m;
5515
5518
  const E = H("FmIcon"), T = H("FmTooltip");
5516
5519
  return D(), J("div", {
5517
- class: fe(["tree-node", "max-w-full", "py-4 px-8 flex items-center justify-between gap-4", "fm-corner-radius-sm", "select-none", f.value, s.value, m.value, {
5520
+ class: fe(["tree-node", "max-w-full", "py-4 px-8 flex items-center justify-between gap-4", "fm-corner-radius-sm", "select-none", f.value, s.value, p.value, {
5518
5521
  "opacity-50": _.dragging
5519
5522
  }, "hover-effect"]),
5520
5523
  onClick: a[2] || (a[2] = ze(() => {
@@ -5581,7 +5584,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5581
5584
  }
5582
5585
  }, null, 8, ["name", "tooltip", "onClick"]))), 128))]), C(yt, {
5583
5586
  class: fe(["fm-typo-en-body-md-400", ((w = _.node.rightLabel) == null ? void 0 : w.variant) === r(He).PRIMARY ? "text-fm-color-primary" : "text-fm-color-typo-secondary"]),
5584
- text: (p = _.node.rightLabel) == null ? void 0 : p.label,
5587
+ text: (m = _.node.rightLabel) == null ? void 0 : m.label,
5585
5588
  highlightedStrings: _.highlightedStrings,
5586
5589
  onClick: a[1] || (a[1] = ze((F) => {
5587
5590
  var $, R;
@@ -5613,7 +5616,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5613
5616
  const {
5614
5617
  t: n
5615
5618
  } = ce(), f = t, s = e;
5616
- function m(V) {
5619
+ function p(V) {
5617
5620
  const A = f.expandedNodeIds;
5618
5621
  A != null && A.includes(V) ? s("updateExpandedNodeIds", A.filter((k) => k !== V)) : s("updateExpandedNodeIds", [...A || [], V]);
5619
5622
  }
@@ -5655,7 +5658,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5655
5658
  isDragging: T,
5656
5659
  draggedNodeId: x,
5657
5660
  dropTargetNodeId: w,
5658
- dropPosition: p,
5661
+ dropPosition: m,
5659
5662
  mousePosition: F,
5660
5663
  onDragStart: $,
5661
5664
  cancelDrag: R
@@ -5685,9 +5688,9 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5685
5688
  key: l.id,
5686
5689
  class: fe(["tree-node-wrapper", {
5687
5690
  "drop-target": r(w) === l.id,
5688
- "drop-before": r(w) === l.id && r(p) === "before",
5689
- "drop-after": r(w) === l.id && r(p) === "after",
5690
- "drop-inside": r(w) === l.id && r(p) === "inside",
5691
+ "drop-before": r(w) === l.id && r(m) === "before",
5692
+ "drop-after": r(w) === l.id && r(m) === "after",
5693
+ "drop-inside": r(w) === l.id && r(m) === "inside",
5691
5694
  "being-dragged": r(x) === l.id
5692
5695
  }]),
5693
5696
  id: `tree-node-${l.id}`
@@ -5700,8 +5703,8 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5700
5703
  highlightedStrings: l.node.highlightedStrings,
5701
5704
  dragging: r(T) && r(x) === l.id,
5702
5705
  dropTarget: r(w) === l.id,
5703
- dropPosition: r(w) === l.id ? r(p) : null,
5704
- onToggleExpand: (g) => m(l.id),
5706
+ dropPosition: r(w) === l.id ? r(m) : null,
5707
+ onToggleExpand: (g) => p(l.id),
5705
5708
  onDragStart: (g) => r($)(l.id, g),
5706
5709
  style: at({
5707
5710
  paddingLeft: `${l.level * 20}px`
@@ -5760,7 +5763,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5760
5763
  setup(t, {
5761
5764
  emit: o
5762
5765
  }) {
5763
- const e = t, n = o, f = et(), s = se(), m = ct(), u = hn(), b = il(), {
5766
+ const e = t, n = o, f = et(), s = se(), p = ct(), u = hn(), b = il(), {
5764
5767
  canDropFn: h,
5765
5768
  handleNodeDragDrop: c
5766
5769
  } = dl(), v = S(() => e.filterState.searchKey), _ = Fo(v, 300), {
@@ -5789,20 +5792,20 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5789
5792
  key: 0,
5790
5793
  label: r(T)("menu.tree_editor.actions.add_category"),
5791
5794
  icon: "add",
5792
- onClick: w[0] || (w[0] = (p) => r(m).create())
5795
+ onClick: w[0] || (w[0] = (m) => r(p).create())
5793
5796
  }, null, 8, ["label"])) : X("", !0), r(s).state.currentCatalogId && !r(s).state.currentSchedulerId ? (D(), Q(kt, {
5794
5797
  key: 1,
5795
5798
  "categorized-items": r(u).linkableItems.value,
5796
5799
  "initial-value": r(u).currentItems.value,
5797
5800
  "show-variant": !1,
5798
- onSubmit: w[1] || (w[1] = (p) => r(u).setProduct(p.map((F) => F._id)))
5801
+ onSubmit: w[1] || (w[1] = (m) => r(u).setProduct(m.map((F) => F._id)))
5799
5802
  }, {
5800
5803
  default: B(({
5801
- trigger: p
5804
+ trigger: m
5802
5805
  }) => [C(wt, {
5803
5806
  label: r(T)("menu.catalog.edit.link_product"),
5804
5807
  icon: "link",
5805
- onClick: p
5808
+ onClick: m
5806
5809
  }, null, 8, ["label", "onClick"])]),
5807
5810
  _: 1
5808
5811
  }, 8, ["categorized-items", "initial-value"])) : X("", !0), r(s).state.currentSchedulerId ? (D(), Q(kt, {
@@ -5810,34 +5813,34 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5810
5813
  "categorized-items": r(b).linkableItems.value,
5811
5814
  "initial-value": r(b).currentItems.value,
5812
5815
  "show-variant": !1,
5813
- onSubmit: w[2] || (w[2] = (p) => r(b).applyProduct(p.map((F) => F._id)))
5816
+ onSubmit: w[2] || (w[2] = (m) => r(b).applyProduct(m.map((F) => F._id)))
5814
5817
  }, {
5815
5818
  default: B(({
5816
- trigger: p
5819
+ trigger: m
5817
5820
  }) => [C(wt, {
5818
5821
  label: r(T)("menu.catalog.edit.apply_scheduler"),
5819
5822
  icon: "link",
5820
- onClick: p
5823
+ onClick: m
5821
5824
  }, null, 8, ["label", "onClick"])]),
5822
5825
  _: 1
5823
5826
  }, 8, ["categorized-items", "initial-value"])) : X("", !0), L("div", Ul, [C(xt, {
5824
5827
  name: "expand_all",
5825
5828
  tooltip: r(T)("menu.tree_editor.actions.expand_all"),
5826
5829
  visible: !0,
5827
- onClick: w[3] || (w[3] = (p) => r(f).expandAllNodes())
5830
+ onClick: w[3] || (w[3] = (m) => r(f).expandAllNodes())
5828
5831
  }, null, 8, ["tooltip"]), C(xt, {
5829
5832
  name: "collapse_all",
5830
5833
  tooltip: r(T)("menu.tree_editor.actions.collapse_all"),
5831
5834
  visible: !0,
5832
- onClick: w[4] || (w[4] = (p) => r(f).collapseAllNodes())
5835
+ onClick: w[4] || (w[4] = (m) => r(f).collapseAllNodes())
5833
5836
  }, null, 8, ["tooltip"])])]), C(qn, null, {
5834
5837
  default: B(() => [C(Dl, {
5835
5838
  nodes: r(f).treeNodes,
5836
5839
  selectedNodeId: r(f).selectedNodeId,
5837
5840
  expandedNodeIds: r(f).expandedNodeIds,
5838
5841
  canDropFn: r(h),
5839
- onUpdateExpandedNodeIds: w[5] || (w[5] = (p) => r(f).setExpandedNodeIds(p)),
5840
- onNodeDragDrop: w[6] || (w[6] = (p) => r(c)(p))
5842
+ onUpdateExpandedNodeIds: w[5] || (w[5] = (m) => r(f).setExpandedNodeIds(m)),
5843
+ onNodeDragDrop: w[6] || (w[6] = (m) => r(c)(m))
5841
5844
  }, null, 8, ["nodes", "selectedNodeId", "expandedNodeIds", "canDropFn"])]),
5842
5845
  _: 1
5843
5846
  })]));
@@ -5866,7 +5869,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5866
5869
  label: c.name,
5867
5870
  value: c._id
5868
5871
  }))
5869
- ]), m = S(() => {
5872
+ ]), p = S(() => {
5870
5873
  var _;
5871
5874
  const c = o("menu.common.labels.catalog"), v = ((_ = s.value.find((a) => a.value === f.value.catalogId)) == null ? void 0 : _.label) || o("menu.tree_editor.labels.main_catalog");
5872
5875
  return `${c}: ${v}`;
@@ -5894,7 +5897,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5894
5897
  items: s.value,
5895
5898
  placeholder: r(o)("menu.tree_editor.labels.main_catalog"),
5896
5899
  "search-placeholder": r(o)("common.search"),
5897
- "custom-label": m.value,
5900
+ "custom-label": p.value,
5898
5901
  "onUpdate:modelValue": v[0] || (v[0] = (a) => f.value.catalogId = a)
5899
5902
  }, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"])
5900
5903
  ]),
@@ -5937,14 +5940,14 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5937
5940
  }), f = se();
5938
5941
  return ye([() => n.value.catalogId, () => n.value.schedulerId], () => {
5939
5942
  f.selectCatalog(n.value.catalogId), f.selectScheduler(n.value.schedulerId);
5940
- }), (s, m) => {
5943
+ }), (s, p) => {
5941
5944
  const u = H("FmCircularProgress");
5942
5945
  return D(), J("div", Bl, [
5943
5946
  L("div", Yl, [
5944
5947
  C(Kl, {
5945
5948
  menu: s.menu,
5946
5949
  modelValue: n.value,
5947
- "onUpdate:modelValue": m[0] || (m[0] = (b) => n.value = b)
5950
+ "onUpdate:modelValue": p[0] || (p[0] = (b) => n.value = b)
5948
5951
  }, null, 8, ["menu", "modelValue"])
5949
5952
  ]),
5950
5953
  L("div", zl, [
@@ -5952,7 +5955,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5952
5955
  menu: s.menu,
5953
5956
  "overrided-menu": s.overridedMenu,
5954
5957
  "filter-state": n.value,
5955
- onTreeEvent: m[1] || (m[1] = (b) => e("tree-event", b))
5958
+ onTreeEvent: p[1] || (p[1] = (b) => e("tree-event", b))
5956
5959
  }, null, 8, ["menu", "overrided-menu", "filter-state"])
5957
5960
  ]),
5958
5961
  s.loading ? (D(), J("div", jl, [
@@ -5975,7 +5978,7 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5975
5978
  }), Ft(() => {
5976
5979
  n.clearHistory(), f.setExpandedNodeIds([]), f.setSelectedNodeId(null);
5977
5980
  });
5978
- const s = q(null), { currentItemId: m, initialForm: u, itemFormKey: b } = tr(n), { saveItemFormEditingState: h } = Jo(s, n), c = q(null);
5981
+ const s = q(null), { currentItemId: p, initialForm: u, itemFormKey: b } = tr(n), { saveItemFormEditingState: h } = Jo(s, n), c = q(null);
5979
5982
  async function v(a) {
5980
5983
  if (a.type === he.SELECT_ITEM || a.type === he.SELECT_PRICE || a.type === he.SELECT_GROUP || a.type === he.SELECT_VARIANT) {
5981
5984
  if (!_(a.itemId))
@@ -5997,12 +6000,12 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
5997
6000
  var E, T, x;
5998
6001
  if (((E = u.value) == null ? void 0 : E._id) === a)
5999
6002
  return !0;
6000
- if (m.value && m.value !== a && ((T = s.value) != null && T.hasUnsavedChanges())) {
6003
+ if (p.value && p.value !== a && ((T = s.value) != null && T.hasUnsavedChanges())) {
6001
6004
  const w = (x = s.value) == null ? void 0 : x.validate();
6002
6005
  if (!w || w.length > 0)
6003
6006
  return !1;
6004
6007
  }
6005
- return a && (m.value = a, f.setSelectedNodeByItemId(a)), !0;
6008
+ return a && (p.value = a, f.setSelectedNodeByItemId(a)), !0;
6006
6009
  }
6007
6010
  return (a, E) => (D(), Q(ll, null, {
6008
6011
  "left-panel": B(() => [
@@ -6050,8 +6053,8 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
6050
6053
  },
6051
6054
  emits: ["update:show", "submit"],
6052
6055
  setup(t, { emit: o }) {
6053
- const e = t, n = Fe(), { minor: f } = qe(n), { t: s } = ce(), m = o, u = () => {
6054
- m("update:show", !1);
6056
+ const e = t, n = Fe(), { minor: f } = qe(n), { t: s } = ce(), p = o, u = () => {
6057
+ p("update:show", !1);
6055
6058
  }, b = on(), h = se();
6056
6059
  h.selectCatalog(null), h.selectScheduler(null);
6057
6060
  const c = q(!1), v = () => {
@@ -6139,16 +6142,17 @@ const pl = { key: 0 }, fl = ["innerHTML"], gl = /* @__PURE__ */ ie({
6139
6142
  props: { menu: o.state.menu }
6140
6143
  });
6141
6144
  };
6142
- function s(m) {
6143
- m.data.type === Xn && f();
6145
+ function s(p) {
6146
+ p.data.type === Xn && f();
6144
6147
  }
6145
6148
  return $e(() => {
6146
6149
  window.addEventListener("message", s);
6147
6150
  }), Ft(() => {
6148
6151
  window.removeEventListener("message", s);
6149
- }), (m, u) => Me(m.$slots, "default", { trigger: n });
6152
+ }), (p, u) => Me(p.$slots, "default", { trigger: n });
6150
6153
  }
6151
6154
  });
6152
6155
  export {
6153
- Ui as _
6156
+ Ui as _,
6157
+ Lo as u
6154
6158
  };