@feedmepos/mf-menu 0.31.72 → 0.31.73

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 (87) hide show
  1. package/dist/{App-CvauiBxh.js → App-C9BJVGXE.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BK9XcgvQ.js → ApplyProduct.vue_vue_type_script_setup_true_lang-D5ZzRvQv.js} +3 -3
  3. package/dist/{Catalog-CBdU6H-7.js → Catalog--QgvDSuo.js} +6 -6
  4. package/dist/{Category-DkKEXvEF.js → Category-nx2UEJ-W.js} +4 -4
  5. package/dist/{Category-BFO9_FCp.js → Category-oTrXvIjH.js} +6 -6
  6. package/dist/{CookingGuide-E34vwLgw.js → CookingGuide-BwBvwfQh.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DlnAxQwE.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-C2sGhPv3.js} +1 -1
  8. package/dist/{Group-CpSycfFA.js → Group-CDZenzP_.js} +3 -3
  9. package/dist/{Group-Bcc1Z7D-.js → Group-i-0yKTGl.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-CWIHfDqh.js → Group.vue_vue_type_script_setup_true_lang-BPzuT1Vb.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B8tJzkEO.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B7Ec95lc.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BGWmkL9R.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CA1541eR.js} +7 -7
  13. package/dist/{Ingredient-0Cg2IcHV.js → Ingredient-DxllB9CA.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Dztd7mAs.js → InventoryBinding.vue_vue_type_script_setup_true_lang-D70_L5Si.js} +2 -2
  15. package/dist/{LinkProductSideSheet-CiRZO3uN.js → LinkProductSideSheet-B5Di8NBz.js} +3 -3
  16. package/dist/{MenuSetting-Bv4sWdlj.js → MenuSetting-DNeQl0Ix.js} +5 -5
  17. package/dist/{PrintRoute-DP-fjMrF.js → PrintRoute-BDpqZ5NG.js} +4 -4
  18. package/dist/{Product-DgZcdRkv.js → Product-l0NtL-4b.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CpthNypU.js → Product.vue_vue_type_script_setup_true_lang-BGurqd5j.js} +13 -13
  20. package/dist/{ProductInternalTools-CLmYNGLn.js → ProductInternalTools-BX3wloTv.js} +5 -5
  21. package/dist/{Products-KrRu9cnx.js → Products-BnSzKAnH.js} +11 -11
  22. package/dist/{Publish-C9Wi7dG1.js → Publish-FteASYtL.js} +3 -3
  23. package/dist/{Recipe-BPdgYfvy.js → Recipe-B0Rtfsr1.js} +4 -4
  24. package/dist/{Scheduler-C9LCR2Oj.js → Scheduler-B6H7c0ys.js} +3 -3
  25. package/dist/{ServingSequence-D-OBo-oY.js → ServingSequence-CNM2jHUA.js} +3 -3
  26. package/dist/{Setting-qITT89Lg.js → Setting-CRd5MJU8.js} +5 -5
  27. package/dist/{Subcategory-kl6ncKqB.js → Subcategory-WiWFVaSW.js} +4 -4
  28. package/dist/{Takeaway-BOxto2HZ.js → Takeaway-D4QFumZG.js} +1 -1
  29. package/dist/{Takeaway-D9GOXVdh.js → Takeaway-Dz3W_LuO.js} +4 -4
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CbhZLN-r.js → Takeaway.vue_vue_type_script_setup_true_lang-z81IGPlP.js} +5 -5
  31. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CH9jzjP0.js → Thumbnail.vue_vue_type_script_setup_true_lang-Cd0HrXWO.js} +4 -4
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C0NgcFQK.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CEh7j-rN.js} +1020 -1015
  33. package/dist/{Unit-Dr0n8Nl-.js → Unit-Bj-W5RXm.js} +2 -2
  34. package/dist/{Variant-BVvjuGqK.js → Variant-BFn2aZeF.js} +3 -3
  35. package/dist/{_id_-DqqSN5Lt.js → _id_-AT7jxwVE.js} +10 -10
  36. package/dist/{app-DJ-rQRBU.js → app-DNxrzHiq.js} +471 -468
  37. package/dist/{app-B3_2cau3.js → app-Dd_KnIqm.js} +1 -1
  38. package/dist/app.js +1 -1
  39. package/dist/apps/mf-menu/src/app.d.ts +1626 -0
  40. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +4 -4
  41. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +4 -4
  42. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +4 -4
  43. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +4 -4
  44. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +2 -2
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +2 -2
  46. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +6 -6
  47. package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +2 -2
  48. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +6 -6
  49. package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +4 -4
  50. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +2 -2
  51. package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +2 -2
  52. package/dist/apps/mf-menu/src/helper/menu.d.ts +8 -8
  53. package/dist/apps/mf-menu/src/helper/menuImport.d.ts +6 -6
  54. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +6 -6
  55. package/dist/apps/mf-menu/src/stores/manager/item.d.ts +6 -6
  56. package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +2 -2
  57. package/dist/apps/mf-menu/src/stores/menu.d.ts +6 -6
  58. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +4 -4
  59. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  60. package/dist/assets/linked-status-Be2uepOA.js +13 -0
  61. package/dist/assets/override-menu-BNzx1e7q.js +13 -0
  62. package/dist/assets/validate-menu-1m_f_apm.js +13 -0
  63. package/dist/{catalog-DeBJkQdk.js → catalog-V8dAzNBn.js} +1 -1
  64. package/dist/{catalogSetting-CkZSHD-W.js → catalogSetting-BC5IqMYN.js} +1 -1
  65. package/dist/{category-CJKIi291.js → category-CGuw37sm.js} +1 -1
  66. package/dist/{currency-NcUCHGGN.js → currency-DoEQzitl.js} +1 -1
  67. package/dist/{customAttributes-Cf1e7I1m.js → customAttributes-DY9pRcZS.js} +1 -1
  68. package/dist/{index-B7ZCIQp2.js → index-Bq48jgnb.js} +4 -4
  69. package/dist/{index-EBL2mPva.js → index-CM4lBQ4G.js} +1 -1
  70. package/dist/{index-DQqxmq0e.js → index-VYtnXWAq.js} +3 -3
  71. package/dist/{index-BaeTP7Ku.js → index-mYGDBSp_.js} +1 -1
  72. package/dist/{item-BsvsZcce.js → item-D2a5PW0Z.js} +653 -648
  73. package/dist/{iteration-CxQwvFbX.js → iteration-wWK05uZ1.js} +1 -1
  74. package/dist/{jszip.min-DoZyvEEd.js → jszip.min-DTbH9ENd.js} +353 -353
  75. package/dist/{menu-Dlsf52hs.js → menu-C3-r6tS_.js} +19707 -19420
  76. package/dist/{menu-zMO5M1Ur.js → menu-DNF8Rgvf.js} +1 -1
  77. package/dist/{menuV2-Ss7NpjF_.js → menuV2-MHU8jzzp.js} +138 -138
  78. package/dist/mf-menu.css +1 -1
  79. package/dist/{priceTier-Dhh2TKAL.js → priceTier-BvAoerIZ.js} +1 -1
  80. package/dist/{scheduler-CA9RiMAg.js → scheduler-CmTQ9EiI.js} +4 -4
  81. package/dist/{subcategory-tJjY3seO.js → subcategory-BIk6KNy_.js} +2 -2
  82. package/dist/{toExcel-C6zcyUsq.js → toExcel-DGXNf3fi.js} +2 -2
  83. package/dist/{unit-D4M4cm2W.js → unit-zFDBsOyu.js} +2 -2
  84. package/package.json +4 -4
  85. package/dist/assets/linked-status-qkReSi42.js +0 -13
  86. package/dist/assets/override-menu-Dyv1SsFk.js +0 -13
  87. package/dist/assets/validate-menu-DpF5os-S.js +0 -13
@@ -1,30 +1,30 @@
1
- import { computed as D, shallowRef as Wt, ref as q, watch as ye, nextTick as nt, getCurrentInstance as xn, onMounted as Ae, defineComponent as ae, resolveComponent as W, createElementBlock as J, openBlock as $, createBlock as H, normalizeClass as fe, createElementVNode as A, createVNode as C, unref as o, withCtx as B, toDisplayString as ge, mergeModels as qt, useModel as Ht, createCommentVNode as X, resolveDirective as Xt, withDirectives as ft, createTextVNode as Fn, renderSlot as Me, h as ve, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as He, createSlots as Sn, onBeforeUnmount as Ot, watchEffect as On, onUnmounted as Dn, normalizeStyle as ct, mergeProps as Vn, normalizeProps as $n, guardReactiveProps as Pn, Teleport as Rn, Transition as Un, withKeys as Mn } from "vue";
2
- import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, _ as Zt, I as Kn, S as Bn, b as Dt, C as zn, R as We, c as en, d as Et, e as tn, h as Yn, m as jn, F as Wn, M as nn, j as qn, r as Hn, k as on, l as Nt, p as rn, q as Xn, P as Jn, s as Qn, t as an, u as Zn, T as Be } from "./item-BsvsZcce.js";
3
- import { _ as eo, T as to } from "./app-DJ-rQRBU.js";
4
- import { A as be, J as _e, z as te, D as ot, K as no, M as oo, N as ro, O as Vt, P as ao, B as Le, Q as lo, H as me, R as io, T as $t, I as ke, U as vt, V as so, W as uo, X as bt, Y as Lt, Z as co, u as ln, $ as mo } from "./menu-Dlsf52hs.js";
1
+ import { computed as D, shallowRef as Wt, ref as q, watch as ye, nextTick as nt, getCurrentInstance as xn, onMounted as Ae, defineComponent as ae, resolveComponent as j, createElementBlock as J, openBlock as $, createBlock as H, normalizeClass as fe, createElementVNode as N, createVNode as C, unref as o, withCtx as K, toDisplayString as ge, mergeModels as qt, useModel as Ht, createCommentVNode as X, resolveDirective as Xt, withDirectives as ft, createTextVNode as Fn, renderSlot as Me, h as ve, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as He, createSlots as Sn, onBeforeUnmount as Ot, watchEffect as On, onUnmounted as Dn, normalizeStyle as ct, mergeProps as Vn, normalizeProps as $n, guardReactiveProps as Pn, Teleport as Rn, Transition as Un, withKeys as Mn } from "vue";
2
+ import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, _ as Zt, I as Kn, S as Bn, b as Dt, C as zn, R as We, c as en, d as Et, e as tn, h as Yn, m as jn, F as Wn, M as nn, j as qn, r as Hn, k as on, l as Nt, p as rn, q as Xn, P as Jn, s as Qn, t as an, u as Zn, T as Be } from "./item-D2a5PW0Z.js";
3
+ import { _ as eo, T as to } from "./app-DNxrzHiq.js";
4
+ import { A as be, J as _e, z as te, D as ot, K as no, M as oo, N as ro, O as Vt, P as ao, B as Le, Q as lo, H as me, R as io, T as $t, I as ke, U as vt, V as so, W as uo, X as bt, Y as Lt, Z as co, u as ln, $ as mo } from "./menu-C3-r6tS_.js";
5
5
  import { useI18n as ce, useCoreStore as rt, CustomAttributesForm as sn } from "@feedmepos/mf-common";
6
6
  import { useDialog as Ge, useDialogChild as Pt, useSnackbar as Ue, FmButtonColorThemeVariant as Se, components as Ie, FmButtonVariant as qe, useBreakpoints as po } from "@feedmepos/ui-library";
7
7
  import { u as Rt } from "./discardConfirm-BHni0LNu.js";
8
8
  import { defineStore as fo } from "pinia";
9
- import { _ as De, a as Re, b as go } from "./customAttributes-Cf1e7I1m.js";
10
- import { u as se, g as un, m as vo } from "./menuV2-Ss7NpjF_.js";
11
- import { s as Tt, _ as bo } from "./index-EBL2mPva.js";
12
- import { _ as Gt } from "./category-CJKIi291.js";
13
- import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CH9jzjP0.js";
14
- import { _ as Ze, L as xt } from "./LinkProductSideSheet-CiRZO3uN.js";
9
+ import { _ as De, a as Re, b as go } from "./customAttributes-DY9pRcZS.js";
10
+ import { u as se, g as un, m as vo } from "./menuV2-MHU8jzzp.js";
11
+ import { s as Tt, _ as bo } from "./index-CM4lBQ4G.js";
12
+ import { _ as Gt } from "./category-CGuw37sm.js";
13
+ import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-Cd0HrXWO.js";
14
+ import { _ as Ze, L as xt } from "./LinkProductSideSheet-B5Di8NBz.js";
15
15
  import { _ as dn } from "./tooltip-CQW9YRO5.js";
16
- import { _ as Xe, T as wo, l as Co } from "./index-B7ZCIQp2.js";
16
+ import { _ as Xe, T as wo, l as Co } from "./index-Bq48jgnb.js";
17
17
  import { u as Io } from "./search-BAPEUu1R.js";
18
18
  import { c as Ut } from "./check-C9mY6LiX.js";
19
- import { f as tt } from "./currency-NcUCHGGN.js";
19
+ import { f as tt } from "./currency-DoEQzitl.js";
20
20
  import { c as ko } from "./string-DpfFixWH.js";
21
21
  import { useInventoryStore as Eo, InventoryBindingSummary as To } from "@feedmepos/mf-inventory-portal";
22
- import { u as xo } from "./priceTier-Dhh2TKAL.js";
22
+ import { u as xo } from "./priceTier-BvAoerIZ.js";
23
23
  import { d as Mt } from "./vuedraggable-CK8z7qA8.js";
24
- import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BK9XcgvQ.js";
24
+ import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-D5ZzRvQv.js";
25
25
  import "./app-5fxKLAzS.js";
26
26
  /* empty css */
27
- import { i as So, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as $o, _ as Po } from "./index-BaeTP7Ku.js";
27
+ import { i as So, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as $o, _ as Po } from "./index-mYGDBSp_.js";
28
28
  import { c as mt } from "./object-DVUNCr7w.js";
29
29
  import { _ as Ro } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
30
30
  import { _ as Kt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
@@ -35,14 +35,14 @@ function ze(n) {
35
35
  }
36
36
  const Je = So ? window : void 0;
37
37
  function Bt(...n) {
38
- let r, e, t, m;
39
- if (typeof n[0] == "string" || Array.isArray(n[0]) ? ([e, t, m] = n, r = Je) : [r, e, t, m] = n, !r)
38
+ let r, e, t, c;
39
+ if (typeof n[0] == "string" || Array.isArray(n[0]) ? ([e, t, c] = n, r = Je) : [r, e, t, c] = n, !r)
40
40
  return Do;
41
41
  Array.isArray(e) || (e = [e]), Array.isArray(t) || (t = [t]);
42
42
  const s = [], g = () => {
43
43
  s.forEach((_) => _()), s.length = 0;
44
44
  }, d = (_, b, f, a) => (_.addEventListener(b, f, a), () => _.removeEventListener(b, f, a)), h = ye(
45
- () => [ze(r), At(m)],
45
+ () => [ze(r), At(c)],
46
46
  ([_, b]) => {
47
47
  if (g(), !_)
48
48
  return;
@@ -112,7 +112,7 @@ const Ko = {
112
112
  }
113
113
  }, zt = "vueuse-storage";
114
114
  function Bo(n, r, e, t = {}) {
115
- var m;
115
+ var c;
116
116
  const {
117
117
  flush: s = "pre",
118
118
  deep: g = !0,
@@ -138,7 +138,7 @@ function Bo(n, r, e, t = {}) {
138
138
  }
139
139
  if (!e)
140
140
  return F;
141
- const O = At(r), k = Go(O), p = (m = t.serializer) != null ? m : Ko[k], { pause: T, resume: R } = Oo(
141
+ const O = At(r), k = Go(O), p = (c = t.serializer) != null ? c : Ko[k], { pause: T, resume: R } = Oo(
142
142
  F,
143
143
  () => S(F.value),
144
144
  { flush: s, deep: g, eventFilter: f }
@@ -146,7 +146,7 @@ function Bo(n, r, e, t = {}) {
146
146
  b && d && cn(() => {
147
147
  Bt(b, "storage", E), Bt(b, zt, u), I && E();
148
148
  }), I || E();
149
- function M(l, i) {
149
+ function A(l, i) {
150
150
  b && b.dispatchEvent(new CustomEvent(zt, {
151
151
  detail: {
152
152
  key: n,
@@ -160,10 +160,10 @@ function Bo(n, r, e, t = {}) {
160
160
  try {
161
161
  const i = e.getItem(n);
162
162
  if (l == null)
163
- M(i, null), e.removeItem(n);
163
+ A(i, null), e.removeItem(n);
164
164
  else {
165
165
  const v = p.write(l);
166
- i !== v && (e.setItem(n, v), M(i, v));
166
+ i !== v && (e.setItem(n, v), A(i, v));
167
167
  }
168
168
  } catch (i) {
169
169
  a(i);
@@ -202,7 +202,7 @@ function Bo(n, r, e, t = {}) {
202
202
  return F;
203
203
  }
204
204
  function zo(n, r, e = {}) {
205
- const { window: t = Je, ...m } = e;
205
+ const { window: t = Je, ...c } = e;
206
206
  let s;
207
207
  const g = Mo(() => t && "ResizeObserver" in t), d = () => {
208
208
  s && (s.disconnect(), s = void 0);
@@ -212,7 +212,7 @@ function zo(n, r, e = {}) {
212
212
  if (d(), g.value && t) {
213
213
  s = new ResizeObserver(r);
214
214
  for (const f of b)
215
- f && s.observe(f, m);
215
+ f && s.observe(f, c);
216
216
  }
217
217
  },
218
218
  { immediate: !0, flush: "post" }
@@ -225,13 +225,13 @@ function zo(n, r, e = {}) {
225
225
  };
226
226
  }
227
227
  function Yo(n, r = { width: 0, height: 0 }, e = {}) {
228
- const { window: t = Je, box: m = "content-box" } = e, s = D(() => {
228
+ const { window: t = Je, box: c = "content-box" } = e, s = D(() => {
229
229
  var b, f;
230
230
  return (f = (b = ze(n)) == null ? void 0 : b.namespaceURI) == null ? void 0 : f.includes("svg");
231
231
  }), g = q(r.width), d = q(r.height), { stop: h } = zo(
232
232
  n,
233
233
  ([b]) => {
234
- const f = m === "border-box" ? b.borderBoxSize : m === "content-box" ? b.contentBoxSize : b.devicePixelContentBoxSize;
234
+ const f = c === "border-box" ? b.borderBoxSize : c === "content-box" ? b.contentBoxSize : b.devicePixelContentBoxSize;
235
235
  if (t && s.value) {
236
236
  const a = ze(n);
237
237
  if (a) {
@@ -270,10 +270,10 @@ function jo(n, r, e = {}) {
270
270
  return Bo(n, r, t == null ? void 0 : t.localStorage, e);
271
271
  }
272
272
  function Wo(n, r) {
273
- const { containerStyle: e, wrapperProps: t, scrollTo: m, calculateRange: s, currentList: g, containerRef: d } = "itemHeight" in r ? Xo(r, n) : Ho(r, n);
273
+ const { containerStyle: e, wrapperProps: t, scrollTo: c, calculateRange: s, currentList: g, containerRef: d } = "itemHeight" in r ? Xo(r, n) : Ho(r, n);
274
274
  return {
275
275
  list: g,
276
- scrollTo: m,
276
+ scrollTo: c,
277
277
  containerProps: {
278
278
  ref: d,
279
279
  onScroll: () => {
@@ -285,41 +285,41 @@ function Wo(n, r) {
285
285
  };
286
286
  }
287
287
  function pn(n) {
288
- const r = q(null), e = Yo(r), t = q([]), m = Wt(n);
289
- return { state: q({ start: 0, end: 10 }), source: m, currentList: t, size: e, containerRef: r };
288
+ const r = q(null), e = Yo(r), t = q([]), c = Wt(n);
289
+ return { state: q({ start: 0, end: 10 }), source: c, currentList: t, size: e, containerRef: r };
290
290
  }
291
291
  function fn(n, r, e) {
292
292
  return (t) => {
293
293
  if (typeof e == "number")
294
294
  return Math.ceil(t / e);
295
- const { start: m = 0 } = n.value;
295
+ const { start: c = 0 } = n.value;
296
296
  let s = 0, g = 0;
297
- for (let d = m; d < r.value.length; d++) {
297
+ for (let d = c; d < r.value.length; d++) {
298
298
  const h = e(d);
299
299
  if (s += h, g = d, s > t)
300
300
  break;
301
301
  }
302
- return g - m;
302
+ return g - c;
303
303
  };
304
304
  }
305
305
  function gn(n, r) {
306
306
  return (e) => {
307
307
  if (typeof r == "number")
308
308
  return Math.floor(e / r) + 1;
309
- let t = 0, m = 0;
309
+ let t = 0, c = 0;
310
310
  for (let s = 0; s < n.value.length; s++) {
311
311
  const g = r(s);
312
312
  if (t += g, t >= e) {
313
- m = s;
313
+ c = s;
314
314
  break;
315
315
  }
316
316
  }
317
- return m + 1;
317
+ return c + 1;
318
318
  };
319
319
  }
320
- function vn(n, r, e, t, { containerRef: m, state: s, currentList: g, source: d }) {
320
+ function vn(n, r, e, t, { containerRef: c, state: s, currentList: g, source: d }) {
321
321
  return () => {
322
- const h = m.value;
322
+ const h = c.value;
323
323
  if (h) {
324
324
  const w = e(n === "vertical" ? h.scrollTop : h.scrollLeft), _ = t(n === "vertical" ? h.clientHeight : h.clientWidth), b = w - r, f = w + _ + r;
325
325
  s.value = {
@@ -333,7 +333,7 @@ function vn(n, r, e, t, { containerRef: m, state: s, currentList: g, source: d }
333
333
  };
334
334
  }
335
335
  function bn(n, r) {
336
- return (e) => typeof n == "number" ? e * n : r.value.slice(0, e).reduce((m, s, g) => m + n(g), 0);
336
+ return (e) => typeof n == "number" ? e * n : r.value.slice(0, e).reduce((c, s, g) => c + n(g), 0);
337
337
  }
338
338
  function _n(n, r, e, t) {
339
339
  ye([n.width, n.height, r, e], () => {
@@ -341,19 +341,19 @@ function _n(n, r, e, t) {
341
341
  });
342
342
  }
343
343
  function yn(n, r) {
344
- return D(() => typeof n == "number" ? r.value.length * n : r.value.reduce((e, t, m) => e + n(m), 0));
344
+ return D(() => typeof n == "number" ? r.value.length * n : r.value.reduce((e, t, c) => e + n(c), 0));
345
345
  }
346
346
  const qo = {
347
347
  horizontal: "scrollLeft",
348
348
  vertical: "scrollTop"
349
349
  };
350
350
  function hn(n, r, e, t) {
351
- return (m) => {
352
- t.value && (t.value[qo[n]] = e(m), r());
351
+ return (c) => {
352
+ t.value && (t.value[qo[n]] = e(c), r());
353
353
  };
354
354
  }
355
355
  function Ho(n, r) {
356
- const e = pn(r), { state: t, source: m, currentList: s, size: g, containerRef: d } = e, h = { overflowX: "auto" }, { itemWidth: w, overscan: _ = 5 } = n, b = fn(t, m, w), f = gn(m, w), a = vn("horizontal", _, f, b, e), I = bn(w, m), F = D(() => I(t.value.start)), O = yn(w, m);
356
+ const e = pn(r), { state: t, source: c, currentList: s, size: g, containerRef: d } = e, h = { overflowX: "auto" }, { itemWidth: w, overscan: _ = 5 } = n, b = fn(t, c, w), f = gn(c, w), a = vn("horizontal", _, f, b, e), I = bn(w, c), F = D(() => I(t.value.start)), O = yn(w, c);
357
357
  _n(g, r, d, a);
358
358
  const k = hn("horizontal", a, I, d), p = D(() => ({
359
359
  style: {
@@ -373,7 +373,7 @@ function Ho(n, r) {
373
373
  };
374
374
  }
375
375
  function Xo(n, r) {
376
- const e = pn(r), { state: t, source: m, currentList: s, size: g, containerRef: d } = e, h = { overflowY: "auto" }, { itemHeight: w, overscan: _ = 5 } = n, b = fn(t, m, w), f = gn(m, w), a = vn("vertical", _, f, b, e), I = bn(w, m), F = D(() => I(t.value.start)), O = yn(w, m);
376
+ const e = pn(r), { state: t, source: c, currentList: s, size: g, containerRef: d } = e, h = { overflowY: "auto" }, { itemHeight: w, overscan: _ = 5 } = n, b = fn(t, c, w), f = gn(c, w), a = vn("vertical", _, f, b, e), I = bn(w, c), F = D(() => I(t.value.start)), O = yn(w, c);
377
377
  _n(g, r, d, a);
378
378
  const k = hn("vertical", a, I, d), p = D(() => ({
379
379
  style: {
@@ -424,7 +424,7 @@ function Qo(n, r) {
424
424
  for (; g.parent; )
425
425
  e.add(g.parent.id), g = g.parent;
426
426
  }
427
- function m(s, g) {
427
+ function c(s, g) {
428
428
  var b, f;
429
429
  if (g.length === 0 || !s)
430
430
  return s;
@@ -439,7 +439,7 @@ function Qo(n, r) {
439
439
  highlightedStrings: g[0].query
440
440
  } : s;
441
441
  if (s.children && s.children.length > 0) {
442
- const a = s.children.map((I) => m(I, h ? g.slice(1) : g)).filter((I) => !!I);
442
+ const a = s.children.map((I) => c(I, h ? g.slice(1) : g)).filter((I) => !!I);
443
443
  return a.length > 0 ? {
444
444
  ...w,
445
445
  children: a
@@ -449,7 +449,7 @@ function Qo(n, r) {
449
449
  }
450
450
  return {
451
451
  // @ts-ignore
452
- subTree: n.map((s) => m(s, r.levels)).filter((s) => !!s),
452
+ subTree: n.map((s) => c(s, r.levels)).filter((s) => !!s),
453
453
  shouldExpandNodeIds: Array.from(e)
454
454
  };
455
455
  }
@@ -470,10 +470,10 @@ function er(n, r) {
470
470
  return Qo(n, e);
471
471
  }
472
472
  function wt(n, r, e) {
473
- const t = [...n], m = t[r];
473
+ const t = [...n], c = t[r];
474
474
  t.splice(r, 1);
475
475
  let s = e;
476
- return r < e && s--, t.splice(s, 0, m), t;
476
+ return r < e && s--, t.splice(s, 0, c), t;
477
477
  }
478
478
  function Yt(n, r) {
479
479
  return r ? `${r}, ${n}` : n;
@@ -481,8 +481,8 @@ function Yt(n, r) {
481
481
  function tr(n) {
482
482
  const r = /* @__PURE__ */ new Map();
483
483
  function e(t) {
484
- var m;
485
- r.set(t.id, t), (m = t.meta) != null && m.rawId && r.set(t.meta.rawId, t), t.children && t.children.forEach(e);
484
+ var c;
485
+ r.set(t.id, t), (c = t.meta) != null && c.rawId && r.set(t.meta.rawId, t), t.children && t.children.forEach(e);
486
486
  }
487
487
  return n.forEach(e), r;
488
488
  }
@@ -494,7 +494,7 @@ function nr(n) {
494
494
  }
495
495
  const at = fo("mf-menu-tree", () => {
496
496
  const n = q(), r = q([]), e = q(null), t = q([]);
497
- function m(f) {
497
+ function c(f) {
498
498
  r.value = f, _.value = tr(f);
499
499
  }
500
500
  function s(f) {
@@ -532,7 +532,7 @@ const at = fo("mf-menu-tree", () => {
532
532
  treeNodes: r,
533
533
  selectedNodeId: e,
534
534
  expandedNodeIds: t,
535
- setTreeNodes: m,
535
+ setTreeNodes: c,
536
536
  setSelectedNodeId: s,
537
537
  setSelectedNodeByItemId: d,
538
538
  setExpandedNodeIds: g,
@@ -546,7 +546,7 @@ function wn() {
546
546
  return Ye && (clearTimeout(Ye), Ye = null), je ? (je(), je = null, !0) : !1;
547
547
  }
548
548
  function or(n, r, e) {
549
- function m(w) {
549
+ function c(w) {
550
550
  if (!n.value) return !1;
551
551
  const _ = n.value.validate();
552
552
  if (_ != null && _.length && _.length > 0)
@@ -601,7 +601,7 @@ function or(n, r, e) {
601
601
  return !1;
602
602
  }
603
603
  return {
604
- saveItemFormEditingStateDebounced: m
604
+ saveItemFormEditingStateDebounced: c
605
605
  };
606
606
  }
607
607
  function rr(n, r) {
@@ -620,11 +620,11 @@ function ar({
620
620
  schedulerId: e,
621
621
  itemId: t
622
622
  }) {
623
- var m, s, g, d;
623
+ var c, s, g, d;
624
624
  if (!r && !e)
625
625
  throw new Error("catalogId or schedulerId are required");
626
626
  if (r && !e)
627
- return (m = n.modules.catalog.find((h) => h._id === r)) == null ? void 0 : m.override.items[t];
627
+ return (c = n.modules.catalog.find((h) => h._id === r)) == null ? void 0 : c.override.items[t];
628
628
  if (!r && e)
629
629
  return (g = (s = n.modules.scheduler.find((h) => h._id === e)) == null ? void 0 : s.items) == null ? void 0 : g.filter((h) => h._id === t);
630
630
  {
@@ -633,17 +633,17 @@ function ar({
633
633
  }
634
634
  }
635
635
  function lr(n, r, e, t) {
636
- const m = ar({ menu: n, catalogId: r, schedulerId: e, itemId: t });
637
- if (!m)
636
+ const c = ar({ menu: n, catalogId: r, schedulerId: e, itemId: t });
637
+ if (!c)
638
638
  throw new Error(`Item overrider ${t} not found`);
639
639
  const s = n.modules.item.find((g) => g._id === t);
640
640
  if (!s)
641
641
  throw new Error(`Item ${t} not found in merged menu`);
642
- return Nn(s, m);
642
+ return Nn(s, c);
643
643
  }
644
644
  function ir(n) {
645
645
  const r = q(null), e = D(() => r.value ? !n.state.currentCatalogId && !n.state.currentSchedulerId ? n.state.menu.modules.item.find(
646
- (m) => m._id === r.value
646
+ (c) => c._id === r.value
647
647
  ) : lr(
648
648
  n.state.menu,
649
649
  n.state.currentCatalogId,
@@ -685,7 +685,7 @@ const gt = () => {
685
685
  }), r.close());
686
686
  });
687
687
  }
688
- function m(d) {
688
+ function c(d) {
689
689
  r.open({
690
690
  title: n("menu.category.manager.dialog.update.title"),
691
691
  contentComponent: Gt,
@@ -727,7 +727,7 @@ const gt = () => {
727
727
  }
728
728
  return {
729
729
  create: t,
730
- update: m,
730
+ update: c,
731
731
  deleteCategory: s,
732
732
  rearrange: g
733
733
  };
@@ -746,7 +746,7 @@ const gt = () => {
746
746
  __name: "ImageUploadDialog",
747
747
  setup(n) {
748
748
  const { t: r } = ce(), e = q(), t = q(!1);
749
- async function m([w]) {
749
+ async function c([w]) {
750
750
  if (!w) return;
751
751
  t.value = !0;
752
752
  const _ = new FileReader();
@@ -761,7 +761,7 @@ const gt = () => {
761
761
  }, _.readAsDataURL(w);
762
762
  }
763
763
  const s = (w) => {
764
- m([w]);
764
+ c([w]);
765
765
  }, { emitData: g } = Pt();
766
766
  async function d(w) {
767
767
  const { canvas: _ } = w, b = _.toDataURL("image/jpeg", 0.75), f = await (await fetch(b)).blob(), a = new File([f], "img.jpeg", { type: "image/jpeg" });
@@ -771,11 +771,11 @@ const gt = () => {
771
771
  e.value = void 0, g(null);
772
772
  }
773
773
  return (w, _) => {
774
- const b = W("fm-icon"), f = W("fm-drop-field");
774
+ const b = j("fm-icon"), f = j("fm-drop-field");
775
775
  return $(), J("div", sr, [
776
776
  e.value ? ($(), J("div", ur, [
777
- A("div", dr, [
778
- A("div", cr, [
777
+ N("div", dr, [
778
+ N("div", cr, [
779
779
  C(o(Ln), {
780
780
  class: "cropper",
781
781
  src: e.value,
@@ -792,7 +792,7 @@ const gt = () => {
792
792
  onChange: d
793
793
  }, null, 8, ["src"])
794
794
  ]),
795
- A("button", {
795
+ N("button", {
796
796
  class: fe([
797
797
  "absolute top-12 right-12 z-10",
798
798
  "w-24 h-24 rounded-[50%]",
@@ -810,8 +810,8 @@ const gt = () => {
810
810
  "content-class": "h-[300px] w-[400px]",
811
811
  onFileUpload: s
812
812
  }, {
813
- "accept-text": B(() => [
814
- A("p", mr, ge(o(r)("menu.common.file.accepts")), 1)
813
+ "accept-text": K(() => [
814
+ N("p", mr, ge(o(r)("menu.common.file.accepts")), 1)
815
815
  ]),
816
816
  _: 1
817
817
  }))
@@ -845,10 +845,10 @@ const gr = {
845
845
  t: r
846
846
  } = ce(), e = n, t = Ht(n, "modelValue");
847
847
  q(!1);
848
- const m = Ge(), s = () => {
848
+ const c = Ge(), s = () => {
849
849
  t.value = null;
850
850
  }, g = () => {
851
- m.open({
851
+ c.open({
852
852
  title: "Delete image",
853
853
  message: "Are you sure you want to delete this image?",
854
854
  primaryActions: {
@@ -863,7 +863,7 @@ const gr = {
863
863
  s();
864
864
  });
865
865
  }, d = Ue(), h = ot(d), w = () => {
866
- m.open({
866
+ c.open({
867
867
  title: "Upload image",
868
868
  message: "Please upload an image for your product.",
869
869
  contentComponent: pr,
@@ -891,14 +891,14 @@ const gr = {
891
891
  });
892
892
  };
893
893
  return (_, b) => {
894
- const f = W("FmButton"), a = W("FmFormGroup");
894
+ const f = j("FmButton"), a = j("FmFormGroup");
895
895
  return $(), H(a, {
896
896
  tag: "div",
897
897
  "model-value": t.value,
898
898
  label: o(r)("menu.common.labels.product_image"),
899
899
  "label-mark": "optional"
900
900
  }, {
901
- default: B(() => [A("div", {
901
+ default: K(() => [N("div", {
902
902
  class: fe(`relative container ${_.disabled ? "cursor-not-allowed" : ""}`)
903
903
  }, [C(_o, {
904
904
  size: {
@@ -907,7 +907,7 @@ const gr = {
907
907
  },
908
908
  src: t.value,
909
909
  alt: "Product image"
910
- }, null, 8, ["src"]), _.disabled ? X("", !0) : ($(), J("div", gr, [A("div", vr, [C(f, {
910
+ }, null, 8, ["src"]), _.disabled ? X("", !0) : ($(), J("div", gr, [N("div", vr, [C(f, {
911
911
  icon: t.value ? "edit" : "add",
912
912
  variant: "secondary",
913
913
  "text-color": o(Se).NeutralGray400,
@@ -950,11 +950,13 @@ const gr = {
950
950
  class: "flex items-center gap-8"
951
951
  }, Or = {
952
952
  class: "flex flex-col gap-16"
953
+ }, Dr = {
954
+ class: "flex flex-col gap-16"
953
955
  };
954
956
  var Pe = /* @__PURE__ */ function(n) {
955
957
  return n.ADD_ON = "ADD_ON", n.PRODUCT = "PRODUCT", n;
956
958
  }(Pe || {});
957
- const Dr = /* @__PURE__ */ ae({
959
+ const Vr = /* @__PURE__ */ ae({
958
960
  __name: "ProductDetail",
959
961
  props: {
960
962
  isOverride: {
@@ -973,7 +975,7 @@ const Dr = /* @__PURE__ */ ae({
973
975
  setup(n, {
974
976
  emit: r
975
977
  }) {
976
- const e = n, t = se(), m = gt(), {
978
+ const e = n, t = se(), c = gt(), {
977
979
  checkMenuIsLoading: s
978
980
  } = Vt(ot(Ue())), g = rt(), d = r, h = D(() => t.rules.item), w = D(() => t.categorizedItems), _ = D(() => {
979
981
  const i = w.value.map((v) => ({
@@ -1015,7 +1017,7 @@ const Dr = /* @__PURE__ */ ae({
1015
1017
  type: "button",
1016
1018
  onClick: () => {
1017
1019
  var v;
1018
- (v = O.value) == null || v.hideMenu(), m.create();
1020
+ (v = O.value) == null || v.hideMenu(), c.create();
1019
1021
  }
1020
1022
  }, [C(Ie.FmIcon, {
1021
1023
  color: "primary",
@@ -1037,9 +1039,9 @@ const Dr = /* @__PURE__ */ ae({
1037
1039
  var x, y, P;
1038
1040
  if (T.value === i) return;
1039
1041
  const v = i == Pe.ADD_ON;
1040
- d("update:form", "category", e.isOverride ? v ? "" : ((x = e.fallback) == null ? void 0 : x.category) ?? ((y = _.value.find((j) => !!j.value)) == null ? void 0 : y.value) : v ? null : (P = _.value.find((j) => !!j.value)) == null ? void 0 : P.value), v && d("update:form", "additionalCategories", []);
1042
+ d("update:form", "category", e.isOverride ? v ? "" : ((x = e.fallback) == null ? void 0 : x.category) ?? ((y = _.value.find((Y) => !!Y.value)) == null ? void 0 : y.value) : v ? null : (P = _.value.find((Y) => !!Y.value)) == null ? void 0 : P.value), v && d("update:form", "additionalCategories", []);
1041
1043
  }
1042
- const M = q(!1);
1044
+ const A = q(!1);
1043
1045
  async function S() {
1044
1046
  var i, v, x;
1045
1047
  if (!e.form.name) {
@@ -1050,9 +1052,9 @@ const Dr = /* @__PURE__ */ ae({
1050
1052
  } else
1051
1053
  return;
1052
1054
  }
1053
- if (!M.value)
1055
+ if (!A.value)
1054
1056
  try {
1055
- M.value = !0, g.pushDataLayer({
1057
+ A.value = !0, g.pushDataLayer({
1056
1058
  event: "menu_catalog_item_general_remy_suggest_description"
1057
1059
  }), We.toggleDialog(!0);
1058
1060
  const y = await ((v = (i = We).getItemDescription) == null ? void 0 : v.call(i, {
@@ -1060,7 +1062,7 @@ const Dr = /* @__PURE__ */ ae({
1060
1062
  }, !0)), P = (x = y == null ? void 0 : y.data) == null ? void 0 : x.value;
1061
1063
  typeof P == "string" && d("update:form", "description", P);
1062
1064
  } finally {
1063
- M.value = !1;
1065
+ A.value = !1;
1064
1066
  }
1065
1067
  }
1066
1068
  const U = D(() => t.subcategories), E = D(() => U.value.map((i) => ({
@@ -1077,73 +1079,73 @@ const Dr = /* @__PURE__ */ ae({
1077
1079
  t: l
1078
1080
  } = ce();
1079
1081
  return (i, v) => {
1080
- const x = W("fm-text-field"), y = W("fm-textarea"), P = W("fm-radio"), j = W("FmSnackbar"), Q = W("FmButton"), le = W("fm-radio-group"), Ce = W("FmFormGroup"), he = Xt("tooltip");
1082
+ const x = j("fm-text-field"), y = j("fm-textarea"), P = j("fm-radio"), Y = j("FmSnackbar"), Q = j("FmButton"), le = j("fm-radio-group"), Ce = j("FmFormGroup"), he = j("fm-stepper-field"), m = Xt("tooltip");
1081
1083
  return $(), H(De, {
1082
1084
  title: o(l)("menu.product.form.detail.title")
1083
1085
  }, {
1084
- default: B(() => {
1085
- var c, V, N;
1086
- return [A("div", yr, [A("div", hr, [A("div", wr, [A("div", Cr, [C(x, {
1086
+ default: K(() => {
1087
+ var V, L, W;
1088
+ return [N("div", yr, [N("div", hr, [N("div", wr, [N("div", Cr, [C(x, {
1087
1089
  "model-value": i.form.code,
1088
- placeholder: ((c = i.fallback) == null ? void 0 : c.code) || o(l)("menu.product.form.detail.fields.code.placeholder"),
1090
+ placeholder: ((V = i.fallback) == null ? void 0 : V.code) || o(l)("menu.product.form.detail.fields.code.placeholder"),
1089
1091
  label: o(l)("menu.product.form.detail.fields.code.label"),
1090
- "onUpdate:modelValue": v[0] || (v[0] = (G) => d("update:form", "code", o(Qt)(G, i.isOverride)))
1091
- }, null, 8, ["model-value", "placeholder", "label"])]), A("div", Ir, [C(x, {
1092
+ "onUpdate:modelValue": v[0] || (v[0] = (M) => d("update:form", "code", o(Qt)(M, i.isOverride)))
1093
+ }, null, 8, ["model-value", "placeholder", "label"])]), N("div", Ir, [C(x, {
1092
1094
  id: "product-name",
1093
1095
  disabled: !h.value.name,
1094
1096
  "helper-text": p.value > 0 ? o(l)("menu.product.form.detail.fields.name.duplicate_warning", {
1095
1097
  count: p.value
1096
1098
  }) : void 0,
1097
1099
  "model-value": i.form.name,
1098
- placeholder: (V = i.fallback) == null ? void 0 : V.name,
1099
- rules: h.value.name ? [(G) => !!G || o(l)("menu.product.form.detail.fields.name.required")] : void 0,
1100
+ placeholder: (L = i.fallback) == null ? void 0 : L.name,
1101
+ rules: h.value.name ? [(M) => !!M || o(l)("menu.product.form.detail.fields.name.required")] : void 0,
1100
1102
  "label-mark": "required",
1101
1103
  label: o(l)("menu.product.form.detail.fields.name.label"),
1102
- "onUpdate:modelValue": v[1] || (v[1] = (G) => d("update:form", "name", G))
1103
- }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), A("div", kr, [C(y, {
1104
+ "onUpdate:modelValue": v[1] || (v[1] = (M) => d("update:form", "name", M))
1105
+ }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), N("div", kr, [C(y, {
1104
1106
  disabled: !h.value.description,
1105
1107
  "model-value": i.form.description || "",
1106
1108
  placeholder: o(l)("menu.product.form.detail.fields.description.placeholder"),
1107
- "onUpdate:modelValue": v[2] || (v[2] = (G) => d("update:form", "description", G.trim())),
1109
+ "onUpdate:modelValue": v[2] || (v[2] = (M) => d("update:form", "description", M.trim())),
1108
1110
  class: "description"
1109
1111
  }, {
1110
- label: B(() => [A("p", Er, [Fn(ge(o(l)("menu.product.form.detail.fields.description.label")) + " ", 1), A("span", Tr, ge(o(l)("menu.product.form.detail.fields.description.optional")), 1)])]),
1112
+ label: K(() => [N("p", Er, [Fn(ge(o(l)("menu.product.form.detail.fields.description.label")) + " ", 1), N("span", Tr, ge(o(l)("menu.product.form.detail.fields.description.optional")), 1)])]),
1111
1113
  _: 1
1112
1114
  }, 8, ["disabled", "model-value", "placeholder"]), ft(C(Zt, {
1113
1115
  class: "absolute top-32 right-4 cursor-pointer",
1114
1116
  onClick: S
1115
- }, null, 512), [[he, o(dn)("Suggest description")]])])]), C(_r, {
1117
+ }, null, 512), [[m, o(dn)("Suggest description")]])])]), C(_r, {
1116
1118
  disabled: !h.value.thumbnail,
1117
1119
  "item-id": i.form._id || "",
1118
- "model-value": i.form.thumbnail || ((N = i.fallback) == null ? void 0 : N.thumbnail) || null,
1119
- "onUpdate:modelValue": v[3] || (v[3] = (G) => d("update:form", "thumbnail", G))
1120
+ "model-value": i.form.thumbnail || ((W = i.fallback) == null ? void 0 : W.thumbnail) || null,
1121
+ "onUpdate:modelValue": v[3] || (v[3] = (M) => d("update:form", "thumbnail", M))
1120
1122
  }, null, 8, ["disabled", "item-id", "model-value"])]), C(Re, {
1121
1123
  label: o(t).isV4 ? o(l)("menu.product.form.detail.category.label") : o(l)("menu.product.form.detail.category.label_singular")
1122
1124
  }, {
1123
- default: B(() => [b.value ? ($(), H(le, {
1125
+ default: K(() => [b.value ? ($(), H(le, {
1124
1126
  key: 0,
1125
1127
  disabled: !h.value.category,
1126
1128
  "model-value": i.isAddon ? Pe.ADD_ON : Pe.PRODUCT,
1127
- "onUpdate:modelValue": v[4] || (v[4] = (G) => R(G))
1129
+ "onUpdate:modelValue": v[4] || (v[4] = (M) => R(M))
1128
1130
  }, {
1129
- default: B(() => [A("div", xr, [A("div", Fr, [C(P, {
1131
+ default: K(() => [N("div", xr, [N("div", Fr, [C(P, {
1130
1132
  disabled: f.value,
1131
1133
  value: Pe.PRODUCT,
1132
1134
  label: o(l)("menu.product.form.detail.category.options.product.label"),
1133
1135
  sublabel: o(l)("menu.product.form.detail.category.options.product.sublabel")
1134
1136
  }, null, 8, ["disabled", "value", "label", "sublabel"]), C(Kn, null, {
1135
- default: B(() => [o(t).isV4 ? ($(), H(k, {
1137
+ default: K(() => [o(t).isV4 ? ($(), H(k, {
1136
1138
  key: 0
1137
1139
  })) : X("", !0)]),
1138
1140
  _: 1
1139
- })]), f.value ? ($(), J("div", Sr, [C(j, {
1141
+ })]), f.value ? ($(), J("div", Sr, [C(Y, {
1140
1142
  title: o(l)("menu.product.form.detail.category.add_first"),
1141
1143
  variant: "info"
1142
1144
  }, null, 8, ["title"]), C(Q, {
1143
1145
  label: o(l)("menu.common.actions.add"),
1144
1146
  "prepend-icon": "add",
1145
1147
  variant: "secondary",
1146
- onClick: o(m).create
1148
+ onClick: o(c).create
1147
1149
  }, null, 8, ["label", "onClick"])])) : X("", !0), C(P, {
1148
1150
  value: Pe.ADD_ON,
1149
1151
  disabled: !1,
@@ -1154,9 +1156,9 @@ const Dr = /* @__PURE__ */ ae({
1154
1156
  }, 8, ["disabled", "model-value"])) : X("", !0), o(t).isV4 ? X("", !0) : ($(), H(Ce, {
1155
1157
  key: 1,
1156
1158
  "model-value": i.form.category,
1157
- rules: [(G) => !G && !i.isOverride ? "Category is required" : !0]
1159
+ rules: [(M) => !M && !i.isOverride ? "Category is required" : !0]
1158
1160
  }, {
1159
- default: B(() => [C(k, {
1161
+ default: K(() => [C(k, {
1160
1162
  multiple: !1
1161
1163
  })]),
1162
1164
  _: 1
@@ -1166,33 +1168,36 @@ const Dr = /* @__PURE__ */ ae({
1166
1168
  key: 0,
1167
1169
  label: o(l)("menu.product.form.detail.path.label")
1168
1170
  }, {
1169
- default: B(() => [A("div", Or, [C(Bn, {
1171
+ default: K(() => [N("div", Or, [C(Bn, {
1170
1172
  modelValue: u.value,
1171
- "onUpdate:modelValue": v[5] || (v[5] = (G) => u.value = G),
1173
+ "onUpdate:modelValue": v[5] || (v[5] = (M) => u.value = M),
1172
1174
  items: E.value,
1173
1175
  placeholder: o(l)("menu.product.form.detail.path.placeholder"),
1174
1176
  disabled: !h.value.category,
1175
1177
  "is-local-only": !0
1176
1178
  }, null, 8, ["modelValue", "items", "placeholder", "disabled"])])]),
1177
1179
  _: 1
1178
- }, 8, ["label"])) : X("", !0), C(Dt, {
1180
+ }, 8, ["label"])) : X("", !0), N("div", Dr, [C(he, {
1181
+ label: "Shelf Life (mins)",
1182
+ "model-value": i.form.shelfLife
1183
+ }, null, 8, ["model-value"])]), C(Dt, {
1179
1184
  disabled: !h.value.orderFrom,
1180
1185
  "model-value": i.form.orderFrom,
1181
1186
  "order-from-none": h.value.orderFromNone,
1182
1187
  required: h.value.orderFrom,
1183
1188
  "default-label": o(l)("menu.product.form.detail.order_from.default"),
1184
1189
  label: o(l)("menu.product.form.detail.order_from.label"),
1185
- "onUpdate:modelValue": v[6] || (v[6] = (G) => G && d("update:form", "orderFrom", G))
1190
+ "onUpdate:modelValue": v[6] || (v[6] = (M) => M && d("update:form", "orderFrom", M))
1186
1191
  }, null, 8, ["disabled", "model-value", "order-from-none", "required", "default-label", "label"])];
1187
1192
  }),
1188
1193
  _: 1
1189
1194
  }, 8, ["title"]);
1190
1195
  };
1191
1196
  }
1192
- }), Vr = /* @__PURE__ */ Ze(Dr, [["__scopeId", "data-v-b3e84ff5"]]), $r = /* @__PURE__ */ ae({
1197
+ }), $r = /* @__PURE__ */ Ze(Vr, [["__scopeId", "data-v-dccb443f"]]), Pr = /* @__PURE__ */ ae({
1193
1198
  __name: "AddForm",
1194
1199
  setup(n) {
1195
- const r = se(), e = D(() => r.rules.group), t = D(() => !!r.state.currentCatalogId || !!r.state.currentSchedulerId), m = D(() => {
1200
+ const r = se(), e = D(() => r.rules.group), t = D(() => !!r.state.currentCatalogId || !!r.state.currentSchedulerId), c = D(() => {
1196
1201
  const h = !r.state.currentSchedulerId, w = r.rules.group.type, _ = r.version === te.F_MENU_VERSION.enum.v3, b = r.rules.item.orderFromActiveOnly, f = r.rules.item.bindToVariant;
1197
1202
  return function(I) {
1198
1203
  return {
@@ -1220,10 +1225,10 @@ const Dr = /* @__PURE__ */ ae({
1220
1225
  position: r.groups.length - 1,
1221
1226
  itemsLinked: []
1222
1227
  }), g = q(s()), { t: d } = ce();
1223
- return (h, w) => e.value.create ? ($(), H(o(jr), {
1228
+ return (h, w) => e.value.create ? ($(), H(o(Wr), {
1224
1229
  key: 0,
1225
1230
  "categorized-items": o(r).categorizedItems,
1226
- config: m.value,
1231
+ config: c.value,
1227
1232
  group: g.value,
1228
1233
  "onUpdate:group": w[0] || (w[0] = (_) => g.value = _),
1229
1234
  "onStatus:show": w[1] || (w[1] = (_) => {
@@ -1232,21 +1237,21 @@ const Dr = /* @__PURE__ */ ae({
1232
1237
  action: "add",
1233
1238
  title: o(d)("menu.group.add")
1234
1239
  }, {
1235
- default: B(({ trigger: _ }) => [
1240
+ default: K(({ trigger: _ }) => [
1236
1241
  Me(h.$slots, "default", { trigger: _ })
1237
1242
  ]),
1238
1243
  _: 3
1239
1244
  }, 8, ["categorized-items", "config", "group", "title"])) : X("", !0);
1240
1245
  }
1241
- }), Pr = {
1246
+ }), Rr = {
1242
1247
  key: 0
1243
- }, Rr = {
1244
- key: 1
1245
1248
  }, Ur = {
1246
- class: "xs:overflow-x-scroll"
1249
+ key: 1
1247
1250
  }, Mr = {
1251
+ class: "xs:overflow-x-scroll"
1252
+ }, Ar = {
1248
1253
  class: "xs:min-w-[640px]"
1249
- }, Ar = /* @__PURE__ */ ae({
1254
+ }, Nr = /* @__PURE__ */ ae({
1250
1255
  __name: "OptionTable",
1251
1256
  props: {
1252
1257
  config: {},
@@ -1260,51 +1265,51 @@ const Dr = /* @__PURE__ */ ae({
1260
1265
  setup(n, {
1261
1266
  emit: r
1262
1267
  }) {
1263
- const e = n, t = r, m = Ue(), s = rt(), g = se(), d = D(() => be.Country.getCountry(s.currentCountry.value)), h = q(!1), w = D(() => e.config.isV4 || e.group.type === te.F_ADDON_GROUP_TYPE.enum.PRODUCT), _ = D(() => w.value), b = D(() => w.value), f = D(() => Object.values(e.group.items).flatMap((c) => [{
1264
- _id: c._id,
1268
+ const e = n, t = r, c = Ue(), s = rt(), g = se(), d = D(() => be.Country.getCountry(s.currentCountry.value)), h = q(!1), w = D(() => e.config.isV4 || e.group.type === te.F_ADDON_GROUP_TYPE.enum.PRODUCT), _ = D(() => w.value), b = D(() => w.value), f = D(() => Object.values(e.group.items).flatMap((m) => [{
1269
+ _id: m._id,
1265
1270
  combinationKey: void 0
1266
- }, ...(c.items ?? []).map((V) => ({
1271
+ }, ...(m.items ?? []).map((V) => ({
1267
1272
  _id: V._id,
1268
1273
  combinationKey: V.combinationKey
1269
1274
  }))])), {
1270
1275
  searchKey: a,
1271
1276
  filter: I
1272
1277
  } = Io(), F = D(() => {
1273
- const c = Object.entries(e.group.items).filter(([, V]) => I([V.code || "", V.name || V.fallbackName, p(V.price ?? V.fallbackPrice), T(V.orderFrom || V.fallbackOrder), ...(V.items || []).map((N) => [N.code || "", N.name || N.fallbackName, p(N.price ?? N.fallbackPrice), T(N.orderFrom || N.fallbackOrder)].join(""))]));
1274
- return Object.fromEntries(c);
1275
- }), O = (c) => ({
1278
+ const m = Object.entries(e.group.items).filter(([, V]) => I([V.code || "", V.name || V.fallbackName, p(V.price ?? V.fallbackPrice), T(V.orderFrom || V.fallbackOrder), ...(V.items || []).map((L) => [L.code || "", L.name || L.fallbackName, p(L.price ?? L.fallbackPrice), T(L.orderFrom || L.fallbackOrder)].join(""))]));
1279
+ return Object.fromEntries(m);
1280
+ }), O = (m) => ({
1276
1281
  ...e.config,
1277
- isDefault: e.config.isDefault(c),
1278
- link: e.config.link(c),
1279
- name: e.config.name(c),
1280
- orderFrom: e.config.orderFrom(c)
1281
- }), k = D(() => !0), p = (c) => c ? tt(c, !1) : "", T = (c) => {
1282
+ isDefault: e.config.isDefault(m),
1283
+ link: e.config.link(m),
1284
+ name: e.config.name(m),
1285
+ orderFrom: e.config.orderFrom(m)
1286
+ }), k = D(() => !0), p = (m) => m ? tt(m, !1) : "", T = (m) => {
1282
1287
  var V;
1283
- return c == null ? "" : (V = lo()[c]) == null ? void 0 : V.label;
1284
- }, R = D(() => Object.values(F.value)), M = q({}), {
1288
+ return m == null ? "" : (V = lo()[m]) == null ? void 0 : V.label;
1289
+ }, R = D(() => Object.values(F.value)), A = q({}), {
1285
1290
  t: S
1286
1291
  } = ce(), U = q([{
1287
1292
  accessorKey: "isDefault",
1288
1293
  header: () => S("menu.group.option.is_default"),
1289
1294
  enableSorting: !1,
1290
1295
  size: 75,
1291
- cell: (c) => {
1292
- var L, z;
1293
- if ((z = (L = c.row.original) == null ? void 0 : L.items) != null && z.length)
1296
+ cell: (m) => {
1297
+ var M, B;
1298
+ if ((B = (M = m.row.original) == null ? void 0 : M.items) != null && B.length)
1294
1299
  return null;
1295
- const V = c.row.depth > 0, N = c.row.original, G = !!c.getValue();
1300
+ const V = m.row.depth > 0, L = m.row.original, W = !!m.getValue();
1296
1301
  return C(Ie.FmCheckbox, {
1297
1302
  value: "default",
1298
- modelValue: G,
1299
- disabled: !O(N.combinationKey).isDefault,
1303
+ modelValue: W,
1304
+ disabled: !O(L.combinationKey).isDefault,
1300
1305
  "onUpdate:modelValue": (oe) => {
1301
1306
  var ne;
1302
1307
  if (V) {
1303
- const ee = (ne = c.row.getParentRow()) == null ? void 0 : ne.original;
1308
+ const ee = (ne = m.row.getParentRow()) == null ? void 0 : ne.original;
1304
1309
  if (!ee) return;
1305
- i(ee._id, N.combinationKey ?? "", "isDefault", oe);
1310
+ i(ee._id, L.combinationKey ?? "", "isDefault", oe);
1306
1311
  } else
1307
- l(N._id, "isDefault", oe);
1312
+ l(L._id, "isDefault", oe);
1308
1313
  }
1309
1314
  }, null);
1310
1315
  }
@@ -1313,8 +1318,8 @@ const Dr = /* @__PURE__ */ ae({
1313
1318
  header: () => S("menu.group.option.code"),
1314
1319
  enableSorting: !1,
1315
1320
  size: 100,
1316
- cell: (c) => {
1317
- const V = c.getValue();
1321
+ cell: (m) => {
1322
+ const V = m.getValue();
1318
1323
  return C(Ie.FmTooltip, {
1319
1324
  class: "flex",
1320
1325
  content: V,
@@ -1329,31 +1334,31 @@ const Dr = /* @__PURE__ */ ae({
1329
1334
  accessorKey: "name",
1330
1335
  header: () => S("menu.group.option.product_title"),
1331
1336
  enableSorting: !1,
1332
- cell: (c) => {
1333
- const V = c.getValue(), N = c.row.original, G = c.row.depth > 0, L = N.combinationKey ? un(N.combinationKey, se().variants) : null;
1337
+ cell: (m) => {
1338
+ const V = m.getValue(), L = m.row.original, W = m.row.depth > 0, M = L.combinationKey ? un(L.combinationKey, se().variants) : null;
1334
1339
  return ve("div", ve(Ie.FmTextField, {
1335
1340
  modelValue: V,
1336
- placeholder: L ?? "",
1337
- disabled: !O(N.combinationKey).name,
1338
- rules: L ? void 0 : [(z) => z.length > 0 || S("menu.group.option.product_title_required")],
1339
- "onUpdate:modelValue": (z) => {
1341
+ placeholder: M ?? "",
1342
+ disabled: !O(L.combinationKey).name,
1343
+ rules: M ? void 0 : [(B) => B.length > 0 || S("menu.group.option.product_title_required")],
1344
+ "onUpdate:modelValue": (B) => {
1340
1345
  var oe;
1341
- if (G) {
1342
- const ne = (oe = c.row.getParentRow()) == null ? void 0 : oe.original;
1346
+ if (W) {
1347
+ const ne = (oe = m.row.getParentRow()) == null ? void 0 : oe.original;
1343
1348
  if (!ne) return;
1344
- i(ne._id, N.combinationKey ?? "", "name", z);
1349
+ i(ne._id, L.combinationKey ?? "", "name", B);
1345
1350
  } else
1346
- l(N._id, "name", z);
1351
+ l(L._id, "name", B);
1347
1352
  },
1348
1353
  class: "min-w-[300px]"
1349
1354
  }, {
1350
1355
  append: () => {
1351
- var z, oe;
1352
- return (oe = (z = c.row.original) == null ? void 0 : z.items) != null && oe.length ? ve(Ie.FmIcon, {
1356
+ var B, oe;
1357
+ return (oe = (B = m.row.original) == null ? void 0 : B.items) != null && oe.length ? ve(Ie.FmIcon, {
1353
1358
  name: "keyboard_arrow_up",
1354
- onClick: c.row.getToggleExpandedHandler(),
1355
- class: ["cursor-pointer", "transition-transform", c.row.getIsExpanded() ? "transform rotate-180" : ""],
1356
- color: O(N.combinationKey).name ? void 0 : Se.NeutralGray200
1359
+ onClick: m.row.getToggleExpandedHandler(),
1360
+ class: ["cursor-pointer", "transition-transform", m.row.getIsExpanded() ? "transform rotate-180" : ""],
1361
+ color: O(L.combinationKey).name ? void 0 : Se.NeutralGray200
1357
1362
  }) : void 0;
1358
1363
  }
1359
1364
  }));
@@ -1362,35 +1367,35 @@ const Dr = /* @__PURE__ */ ae({
1362
1367
  accessorKey: "price",
1363
1368
  enableSorting: !1,
1364
1369
  header: () => {
1365
- var c;
1370
+ var m;
1366
1371
  return S("menu.group.option.price", {
1367
- symbol: (c = d.value) == null ? void 0 : c.currency.symbol
1372
+ symbol: (m = d.value) == null ? void 0 : m.currency.symbol
1368
1373
  });
1369
1374
  },
1370
1375
  size: 100,
1371
- cell: (c) => {
1372
- const V = c.getValue(), N = c.row.original, G = !O(null).priceEdit || N.orderFrom === te.F_ORDER_FROM.enum.NONE, L = N.fallbackPrice, z = c.row.depth > 0;
1376
+ cell: (m) => {
1377
+ const V = m.getValue(), L = m.row.original, W = !O(null).priceEdit || L.orderFrom === te.F_ORDER_FROM.enum.NONE, M = L.fallbackPrice, B = m.row.depth > 0;
1373
1378
  return ve(Xe, {
1374
- disable: G,
1375
- placeholder: L ? tt(L) : void 0,
1379
+ disable: W,
1380
+ placeholder: M ? tt(M) : void 0,
1376
1381
  modelValue: V,
1377
- required: !L && !G,
1378
- nullable: !!L,
1382
+ required: !M && !W,
1383
+ nullable: !!M,
1379
1384
  min: k.value ? void 0 : 0,
1380
1385
  "onUpdate:modelValue": (oe) => {
1381
1386
  var ne;
1382
- if (z) {
1383
- const ee = (ne = c.row.getParentRow()) == null ? void 0 : ne.original;
1387
+ if (B) {
1388
+ const ee = (ne = m.row.getParentRow()) == null ? void 0 : ne.original;
1384
1389
  if (!ee) return;
1385
1390
  i(
1386
1391
  ee._id,
1387
- N.combinationKey ?? "",
1392
+ L.combinationKey ?? "",
1388
1393
  // @ts-ignore
1389
1394
  "price",
1390
1395
  oe
1391
1396
  );
1392
1397
  } else
1393
- l(N._id, "price", oe);
1398
+ l(L._id, "price", oe);
1394
1399
  },
1395
1400
  showCurrency: !1,
1396
1401
  class: "min-w-[88px]"
@@ -1401,28 +1406,28 @@ const Dr = /* @__PURE__ */ ae({
1401
1406
  header: () => S("menu.common.labels.order_from"),
1402
1407
  size: 100,
1403
1408
  enableSorting: !1,
1404
- cell: (c) => {
1405
- const V = c.getValue(), N = c.row.original, G = N.fallbackOrder, L = c.row.depth > 0;
1409
+ cell: (m) => {
1410
+ const V = m.getValue(), L = m.row.original, W = L.fallbackOrder, M = m.row.depth > 0;
1406
1411
  return ve(Dt, {
1407
1412
  modelValue: V,
1408
- fallback: G,
1409
- disable: !O(N.combinationKey).orderFrom,
1413
+ fallback: W,
1414
+ disable: !O(L.combinationKey).orderFrom,
1410
1415
  required: !0,
1411
- editActiveOnly: O(N.combinationKey).orderFromActiveOnly,
1412
- "onUpdate:modelValue": (z) => {
1416
+ editActiveOnly: O(L.combinationKey).orderFromActiveOnly,
1417
+ "onUpdate:modelValue": (B) => {
1413
1418
  var oe;
1414
- if (L) {
1415
- const ne = (oe = c.row.getParentRow()) == null ? void 0 : oe.original;
1419
+ if (M) {
1420
+ const ne = (oe = m.row.getParentRow()) == null ? void 0 : oe.original;
1416
1421
  if (!ne) return;
1417
1422
  i(
1418
1423
  ne._id,
1419
- N.combinationKey ?? "",
1424
+ L.combinationKey ?? "",
1420
1425
  // @ts-ignore
1421
1426
  "orderFrom",
1422
- z
1427
+ B
1423
1428
  );
1424
1429
  } else
1425
- l(N._id, "orderFrom", z);
1430
+ l(L._id, "orderFrom", B);
1426
1431
  },
1427
1432
  label: "",
1428
1433
  menuZIndex: 101
@@ -1436,85 +1441,85 @@ const Dr = /* @__PURE__ */ ae({
1436
1441
  enableSorting: !1,
1437
1442
  // size: rules.value.inventory && rules.value.link ? 80 : 40,
1438
1443
  size: 80,
1439
- cell: (c) => {
1440
- const V = c.row.original, N = c.row.depth > 0;
1444
+ cell: (m) => {
1445
+ const V = m.row.original, L = m.row.depth > 0;
1441
1446
  return C("div", {
1442
1447
  class: "flex items-center justify-end"
1443
1448
  }, [O(null).priceTier && C(en, {
1444
1449
  menuStore: g,
1445
1450
  priceTiers: V.priceTiers,
1446
- "onUpdate:priceTiers": (G) => {
1447
- var L;
1448
- if (N) {
1449
- const z = (L = c.row.getParentRow()) == null ? void 0 : L.original;
1450
- if (!z) return;
1451
+ "onUpdate:priceTiers": (W) => {
1452
+ var M;
1453
+ if (L) {
1454
+ const B = (M = m.row.getParentRow()) == null ? void 0 : M.original;
1455
+ if (!B) return;
1451
1456
  i(
1452
- z._id,
1457
+ B._id,
1453
1458
  V.combinationKey ?? "",
1454
1459
  // @ts-ignore
1455
1460
  "priceTiers",
1456
- G
1461
+ W
1457
1462
  );
1458
1463
  } else
1459
- l(V._id, "priceTiers", G);
1464
+ l(V._id, "priceTiers", W);
1460
1465
  }
1461
1466
  }, null), O(V.combinationKey).inventory && C(Et, {
1462
1467
  title: "Inventory",
1463
1468
  initialValue: V.inventoryBindings ?? [],
1464
1469
  name: V.name ?? V.fallbackName ?? "",
1465
1470
  allowRefund: e.allowRefundInventory,
1466
- "onUpdate:inventory": (G) => {
1467
- var L;
1468
- if (N) {
1469
- const z = (L = c.row.getParentRow()) == null ? void 0 : L.original;
1470
- if (!z) return;
1471
+ "onUpdate:inventory": (W) => {
1472
+ var M;
1473
+ if (L) {
1474
+ const B = (M = m.row.getParentRow()) == null ? void 0 : M.original;
1475
+ if (!B) return;
1471
1476
  i(
1472
- z._id,
1477
+ B._id,
1473
1478
  V.combinationKey ?? "",
1474
1479
  // @ts-ignore
1475
1480
  "inventoryBindings",
1476
- G
1481
+ W
1477
1482
  );
1478
1483
  } else
1479
- l(V._id, "inventoryBindings", G);
1484
+ l(V._id, "inventoryBindings", W);
1480
1485
  }
1481
1486
  }, {
1482
1487
  default: ({
1483
- trigger: G
1484
- }) => C(W("fm-tooltip"), {
1488
+ trigger: W
1489
+ }) => C(j("fm-tooltip"), {
1485
1490
  content: "Inventory",
1486
1491
  zIndex: 110
1487
1492
  }, {
1488
1493
  default: () => {
1489
- var L;
1490
- return [C(W("fm-button"), {
1494
+ var M;
1495
+ return [C(j("fm-button"), {
1491
1496
  variant: qe.Tertiary,
1492
1497
  prependIcon: "inventory_2",
1493
- overwriteIconOutline: (L = V.inventoryBindings) != null && L.length ? "filled" : "outline",
1498
+ overwriteIconOutline: (M = V.inventoryBindings) != null && M.length ? "filled" : "outline",
1494
1499
  textColor: Se.NeutralGray400,
1495
- onClick: G
1500
+ onClick: W
1496
1501
  }, null)];
1497
1502
  }
1498
1503
  })
1499
- }), O(V.combinationKey).link && C(W("fm-button"), {
1504
+ }), O(V.combinationKey).link && C(j("fm-button"), {
1500
1505
  variant: qe.Tertiary,
1501
1506
  prependIcon: "delete",
1502
1507
  textColor: Se.NeutralGray400,
1503
1508
  onClick: () => {
1504
- var G, L;
1505
- if (N) {
1506
- const z = (G = c.row.getParentRow()) == null ? void 0 : G.original;
1507
- if (!z) return;
1508
- if ((((L = e.group.items[z._id].items) == null ? void 0 : L.length) || 0) <= 1) {
1509
- m.open({
1509
+ var W, M;
1510
+ if (L) {
1511
+ const B = (W = m.row.getParentRow()) == null ? void 0 : W.original;
1512
+ if (!B) return;
1513
+ if ((((M = e.group.items[B._id].items) == null ? void 0 : M.length) || 0) <= 1) {
1514
+ c.open({
1510
1515
  title: S("menu.group.option.should_link_at_least_one_variant", {
1511
- name: z.name
1516
+ name: B.name
1512
1517
  }),
1513
1518
  type: "error"
1514
1519
  });
1515
1520
  return;
1516
1521
  }
1517
- x(z._id, V.combinationKey ?? "");
1522
+ x(B._id, V.combinationKey ?? "");
1518
1523
  } else
1519
1524
  v(V._id);
1520
1525
  }
@@ -1528,13 +1533,13 @@ const Dr = /* @__PURE__ */ ae({
1528
1533
  action: O(null).inventory || O(null).link
1529
1534
  }));
1530
1535
  async function u() {
1531
- const c = (/* @__PURE__ */ new Date()).toISOString();
1536
+ const m = (/* @__PURE__ */ new Date()).toISOString();
1532
1537
  t("update:group", {
1533
1538
  ...e.group,
1534
1539
  items: {
1535
1540
  ...e.group.items,
1536
- [c]: {
1537
- _id: c,
1541
+ [m]: {
1542
+ _id: m,
1538
1543
  name: "",
1539
1544
  inventoryBindings: [],
1540
1545
  price: be.Dinero.zero().toObject(),
@@ -1545,104 +1550,104 @@ const Dr = /* @__PURE__ */ ae({
1545
1550
  }
1546
1551
  });
1547
1552
  }
1548
- function l(c, V, N) {
1549
- const G = e.group.items[c];
1550
- if (!G) return;
1551
- const L = {
1552
- ...G
1553
+ function l(m, V, L) {
1554
+ const W = e.group.items[m];
1555
+ if (!W) return;
1556
+ const M = {
1557
+ ...W
1553
1558
  };
1554
- V === "price" ? L[V] = !N && !G.fallbackPrice ? be.Dinero.zero().toObject() : N : L[V] = N, t("update:group", {
1559
+ V === "price" ? M[V] = !L && !W.fallbackPrice ? be.Dinero.zero().toObject() : L : M[V] = L, t("update:group", {
1555
1560
  ...e.group,
1556
1561
  items: {
1557
1562
  ...e.group.items,
1558
- [c]: L
1563
+ [m]: M
1559
1564
  }
1560
1565
  });
1561
1566
  }
1562
- function i(c, V, N, G) {
1567
+ function i(m, V, L, W) {
1563
1568
  var ne, ee;
1564
- const L = me(e.group), z = (ne = L.items[c].items) == null ? void 0 : ne.findIndex((pe) => pe.combinationKey === V);
1565
- if (!Ut.isSet(z)) return;
1566
- let oe = (ee = L.items[c].items) == null ? void 0 : ee[z];
1569
+ const M = me(e.group), B = (ne = M.items[m].items) == null ? void 0 : ne.findIndex((pe) => pe.combinationKey === V);
1570
+ if (!Ut.isSet(B)) return;
1571
+ let oe = (ee = M.items[m].items) == null ? void 0 : ee[B];
1567
1572
  oe && (oe = {
1568
1573
  ...oe,
1569
- [N]: G
1570
- }, L.items[c].items[z] = oe, t("update:group", L));
1574
+ [L]: W
1575
+ }, M.items[m].items[B] = oe, t("update:group", M));
1571
1576
  }
1572
- function v(c) {
1577
+ function v(m) {
1573
1578
  const V = me(e.group);
1574
- delete V.items[c], t("update:group", V);
1579
+ delete V.items[m], t("update:group", V);
1575
1580
  }
1576
- function x(c, V) {
1577
- const N = me(e.group), G = N.items[c];
1578
- G && (G.items = (G.items || []).filter((L) => L.combinationKey !== V), N.items[c] = G, t("update:group", N));
1581
+ function x(m, V) {
1582
+ const L = me(e.group), W = L.items[m];
1583
+ W && (W.items = (W.items || []).filter((M) => M.combinationKey !== V), L.items[m] = W, t("update:group", L));
1579
1584
  }
1580
- const y = D(() => e.categorizedItems.flatMap((c) => c.items).reduce((c, V) => {
1581
- var N;
1582
- return c[V._id] = {
1585
+ const y = D(() => e.categorizedItems.flatMap((m) => m.items).reduce((m, V) => {
1586
+ var L;
1587
+ return m[V._id] = {
1583
1588
  price: V.price,
1584
- variants: io(((N = V.variant) == null ? void 0 : N.variantCombinations) || [], "combinationKey")
1585
- }, c;
1586
- }, {})), P = (c) => {
1587
- var L, z;
1588
- const N = g.state.menu.modules.item.find((oe) => oe._id === c._id), G = c.combinationKey ? {
1589
- ...(L = N == null ? void 0 : N.variant) == null ? void 0 : L.variantCombinations.find((oe) => oe.combinationKey === c.combinationKey),
1590
- name: $t(se().variants, ((z = N == null ? void 0 : N.variant) == null ? void 0 : z.variantGroupIds) || [])[c.combinationKey]
1591
- } : N;
1592
- return G == null ? void 0 : G.name;
1593
- }, j = async (c) => {
1589
+ variants: io(((L = V.variant) == null ? void 0 : L.variantCombinations) || [], "combinationKey")
1590
+ }, m;
1591
+ }, {})), P = (m) => {
1592
+ var M, B;
1593
+ const L = g.state.menu.modules.item.find((oe) => oe._id === m._id), W = m.combinationKey ? {
1594
+ ...(M = L == null ? void 0 : L.variant) == null ? void 0 : M.variantCombinations.find((oe) => oe.combinationKey === m.combinationKey),
1595
+ name: $t(se().variants, ((B = L == null ? void 0 : L.variant) == null ? void 0 : B.variantGroupIds) || [])[m.combinationKey]
1596
+ } : L;
1597
+ return W == null ? void 0 : W.name;
1598
+ }, Y = async (m) => {
1594
1599
  let V = tn(e.group);
1595
1600
  V = {
1596
1601
  ...V,
1597
- items: c.map((N) => {
1598
- const G = V.items.find((z) => z._id == N._id && z.combinationKey == N.combinationKey), L = y.value[N._id];
1599
- return G || {
1600
- ...N,
1601
- name: P(N),
1602
- price: N.combinationKey ? L.variants[N.combinationKey || ""].price : L.price,
1602
+ items: m.map((L) => {
1603
+ const W = V.items.find((B) => B._id == L._id && B.combinationKey == L.combinationKey), M = y.value[L._id];
1604
+ return W || {
1605
+ ...L,
1606
+ name: P(L),
1607
+ price: L.combinationKey ? M.variants[L.combinationKey || ""].price : M.price,
1603
1608
  orderFrom: te.F_ORDER_FROM.enum.ALL
1604
1609
  };
1605
1610
  })
1606
1611
  }, t("update:unmap-group", V);
1607
- }, Q = (c) => c.items;
1608
- function le(c) {
1612
+ }, Q = (m) => m.items;
1613
+ function le(m) {
1609
1614
  const V = me(e.group);
1610
- V.items = c.reduce((N, G) => ({
1611
- ...N,
1612
- [G._id]: G
1615
+ V.items = m.reduce((L, W) => ({
1616
+ ...L,
1617
+ [W._id]: W
1613
1618
  }), {}), t("update:group", V);
1614
1619
  }
1615
1620
  const Ce = po(), he = D(() => Ce.breakpoints.value.xs);
1616
- return (c, V) => {
1617
- const N = W("fm-button"), G = W("fm-table");
1621
+ return (m, V) => {
1622
+ const L = j("fm-button"), W = j("fm-table");
1618
1623
  return $(), H(De, {
1619
1624
  title: o(S)("menu.group.option.title")
1620
1625
  }, {
1621
- "append-title": B(() => [c.config.link() ? ($(), J(Oe, {
1626
+ "append-title": K(() => [m.config.link() ? ($(), J(Oe, {
1622
1627
  key: 0
1623
- }, [_.value ? ($(), J("div", Pr, [C(xt, {
1624
- "categorized-items": c.categorizedItems,
1628
+ }, [_.value ? ($(), J("div", Rr, [C(xt, {
1629
+ "categorized-items": m.categorizedItems,
1625
1630
  "initial-value": f.value,
1626
- "show-variant": c.config.bindToVariant,
1631
+ "show-variant": m.config.bindToVariant,
1627
1632
  "select-variant": "",
1628
1633
  title: o(S)("menu.group.option.link_products"),
1629
1634
  "is-local-only": !0,
1630
1635
  onSubmit: V[0] || (V[0] = ({
1631
- items: L
1632
- }) => j(L))
1636
+ items: M
1637
+ }) => Y(M))
1633
1638
  }, {
1634
- default: B(({
1635
- trigger: L
1636
- }) => [C(N, {
1639
+ default: K(({
1640
+ trigger: M
1641
+ }) => [C(L, {
1637
1642
  "text-color": o(Se).ColorPrimary,
1638
1643
  "border-color": o(Se).ColorPrimary,
1639
1644
  variant: "secondary",
1640
1645
  label: o(S)("menu.group.option.link_products"),
1641
1646
  "prepend-icon": "link",
1642
- onClick: L
1647
+ onClick: M
1643
1648
  }, null, 8, ["text-color", "border-color", "label", "onClick"])]),
1644
1649
  _: 1
1645
- }, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : ($(), J("div", Rr, [C(N, {
1650
+ }, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : ($(), J("div", Ur, [C(L, {
1646
1651
  "text-color": o(Se).ColorPrimary,
1647
1652
  "border-color": o(Se).ColorPrimary,
1648
1653
  variant: "secondary",
@@ -1650,29 +1655,29 @@ const Dr = /* @__PURE__ */ ae({
1650
1655
  "prepend-icon": "add",
1651
1656
  onClick: u
1652
1657
  }, null, 8, ["text-color", "border-color", "label"])]))], 64)) : X("", !0)]),
1653
- default: B(() => [A("div", Ur, [A("div", Mr, [C(G, {
1658
+ default: K(() => [N("div", Mr, [N("div", Ar, [C(W, {
1654
1659
  "column-defs": U.value,
1655
1660
  "column-visibility": E.value,
1656
1661
  draggable: !he.value && O(null).name,
1657
- "expanded-state": h.value ? {} : M.value,
1662
+ "expanded-state": h.value ? {} : A.value,
1658
1663
  "get-sub-row": Q,
1659
1664
  "page-size": 999,
1660
1665
  "row-data": R.value,
1661
1666
  "search-value": o(a),
1662
1667
  "shrink-at": !1,
1663
1668
  "hide-footer": "",
1664
- "onUpdate:expandedState": V[1] || (V[1] = (L) => M.value = L),
1665
- onDndChanged: V[2] || (V[2] = (L) => le(L)),
1666
- "onUpdate:dragging": V[3] || (V[3] = (L) => h.value = L)
1669
+ "onUpdate:expandedState": V[1] || (V[1] = (M) => A.value = M),
1670
+ onDndChanged: V[2] || (V[2] = (M) => le(M)),
1671
+ "onUpdate:dragging": V[3] || (V[3] = (M) => h.value = M)
1667
1672
  }, null, 8, ["column-defs", "column-visibility", "draggable", "expanded-state", "row-data", "search-value"])])])]),
1668
1673
  _: 1
1669
1674
  }, 8, ["title"]);
1670
1675
  };
1671
1676
  }
1672
- }), Nr = { class: "fm-typo-en-title-md-600" }, Lr = {
1677
+ }), Lr = { class: "fm-typo-en-title-md-600" }, Gr = {
1673
1678
  key: 0,
1674
1679
  class: "pt-8 space-y-32"
1675
- }, Gr = { class: "flex gap-8 items-center justify-start" }, In = /* @__PURE__ */ ae({
1680
+ }, Kr = { class: "flex gap-8 items-center justify-start" }, In = /* @__PURE__ */ ae({
1676
1681
  __name: "BaseForm",
1677
1682
  props: {
1678
1683
  title: {},
@@ -1685,7 +1690,7 @@ const Dr = /* @__PURE__ */ ae({
1685
1690
  emits: ["update:group", "submit:group", "status:show"],
1686
1691
  setup(n, { expose: r, emit: e }) {
1687
1692
  let t = n;
1688
- const m = e, s = se(), g = rt(), d = Ge(), h = Vt(ot(Ue())), { countDefaultItems: w, validateGroupItems: _, minMaxValidationRules: b } = Yn(
1693
+ const c = e, s = se(), g = rt(), d = Ge(), h = Vt(ot(Ue())), { countDefaultItems: w, validateGroupItems: _, minMaxValidationRules: b } = Yn(
1689
1694
  () => t.group
1690
1695
  ), f = q(!1), a = q(!1), I = (y) => {
1691
1696
  Ut.isBoolean(y) ? a.value = y : a.value = !a.value;
@@ -1704,7 +1709,7 @@ const Dr = /* @__PURE__ */ ae({
1704
1709
  }
1705
1710
  ]);
1706
1711
  function T(y) {
1707
- m("update:group", y);
1712
+ c("update:group", y);
1708
1713
  }
1709
1714
  function R(y) {
1710
1715
  function P() {
@@ -1727,7 +1732,7 @@ const Dr = /* @__PURE__ */ ae({
1727
1732
  }
1728
1733
  }).onPrimary(P) : P();
1729
1734
  }
1730
- function M(y) {
1735
+ function A(y) {
1731
1736
  return new nn(s, h.updateMenu, d).mapGroups(
1732
1737
  [y],
1733
1738
  F.value.isOverride
@@ -1741,7 +1746,7 @@ const Dr = /* @__PURE__ */ ae({
1741
1746
  ), E = D(() => t.action === "add" ? x("common.add") : x("common.update"));
1742
1747
  async function u() {
1743
1748
  if (t.action === "add") {
1744
- const { group: y, linkItems: P } = qn(t.group), j = {
1749
+ const { group: y, linkItems: P } = qn(t.group), Y = {
1745
1750
  module: te.F_MENU_MODULE_V4_KEY.enum.group,
1746
1751
  operation: _e.F_OPERATION_TYPE.create,
1747
1752
  data: y,
@@ -1753,14 +1758,14 @@ const Dr = /* @__PURE__ */ ae({
1753
1758
  }
1754
1759
  ]
1755
1760
  };
1756
- await s.updateMenu(j), m("submit:group", t.group);
1757
- } else t.action === "update" && m("submit:group", t.group);
1761
+ await s.updateMenu(Y), c("submit:group", t.group);
1762
+ } else t.action === "update" && c("submit:group", t.group);
1758
1763
  I(!1);
1759
1764
  }
1760
1765
  ye(
1761
1766
  () => a.value,
1762
1767
  async (y) => {
1763
- m("status:show", y), y && (await nt(), S.value = ke.clone(t.group));
1768
+ c("status:show", y), y && (await nt(), S.value = ke.clone(t.group));
1764
1769
  }
1765
1770
  );
1766
1771
  const l = D(() => {
@@ -1769,9 +1774,9 @@ const Dr = /* @__PURE__ */ ae({
1769
1774
  }), i = D(() => {
1770
1775
  const y = {};
1771
1776
  return s.state.menu.modules.group.forEach((P) => {
1772
- var j;
1777
+ var Y;
1773
1778
  for (const [Q, le] of Object.entries(P.customAttributes || {}))
1774
- typeof le == "string" && le && !((j = y[Q]) != null && j.includes(le)) && (y[Q] = [...y[Q] || [], le]);
1779
+ typeof le == "string" && le && !((Y = y[Q]) != null && Y.includes(le)) && (y[Q] = [...y[Q] || [], le]);
1775
1780
  }), y;
1776
1781
  }), v = (y) => {
1777
1782
  t.group && T({
@@ -1785,13 +1790,13 @@ const Dr = /* @__PURE__ */ ae({
1785
1790
  });
1786
1791
  const { t: x } = ce();
1787
1792
  return (y, P) => {
1788
- const j = W("fm-text-field"), Q = W("fm-stepper-field"), le = W("FmFormGroup"), Ce = W("fm-radio"), he = W("fm-radio-group"), c = W("fm-switch"), V = W("FormSection"), N = W("fm-button"), G = W("fm-side-sheet");
1793
+ const Y = j("fm-text-field"), Q = j("fm-stepper-field"), le = j("FmFormGroup"), Ce = j("fm-radio"), he = j("fm-radio-group"), m = j("fm-switch"), V = j("FormSection"), L = j("fm-button"), W = j("fm-side-sheet");
1789
1794
  return $(), J(Oe, null, [
1790
1795
  Me(y.$slots, "default", { trigger: I }),
1791
- C(G, {
1796
+ C(W, {
1792
1797
  id: "group-form",
1793
1798
  modelValue: a.value,
1794
- "onUpdate:modelValue": P[8] || (P[8] = (L) => a.value = L),
1799
+ "onUpdate:modelValue": P[8] || (P[8] = (M) => a.value = M),
1795
1800
  "is-container": o(Ie).FmForm,
1796
1801
  "is-container-props": {
1797
1802
  onValidationSuccess: u,
@@ -1800,19 +1805,19 @@ const Dr = /* @__PURE__ */ ae({
1800
1805
  "max-width": 720,
1801
1806
  "onOn:clickedAway": o(U)
1802
1807
  }, {
1803
- "side-sheet-header": B(() => [
1804
- A("p", Nr, ge(y.title), 1)
1808
+ "side-sheet-header": K(() => [
1809
+ N("p", Lr, ge(y.title), 1)
1805
1810
  ]),
1806
- "side-sheet-footer": B(() => [
1807
- A("div", Gr, [
1808
- C(N, {
1811
+ "side-sheet-footer": K(() => [
1812
+ N("div", Kr, [
1813
+ C(L, {
1809
1814
  label: o(ko)(E.value),
1810
1815
  loading: f.value,
1811
1816
  size: "lg",
1812
1817
  type: "submit",
1813
1818
  variant: "primary"
1814
1819
  }, null, 8, ["label", "loading"]),
1815
- C(N, {
1820
+ C(L, {
1816
1821
  label: o(x)("menu.common.actions.cancel"),
1817
1822
  size: "lg",
1818
1823
  variant: "tertiary",
@@ -1820,18 +1825,18 @@ const Dr = /* @__PURE__ */ ae({
1820
1825
  }, null, 8, ["label"])
1821
1826
  ])
1822
1827
  ]),
1823
- default: B(() => [
1824
- y.group ? ($(), J("div", Lr, [
1828
+ default: K(() => [
1829
+ y.group ? ($(), J("div", Gr, [
1825
1830
  Me(y.$slots, "variant-section"),
1826
1831
  C(go, null, {
1827
- default: B(() => [
1828
- A("div", null, [
1829
- C(j, {
1832
+ default: K(() => [
1833
+ N("div", null, [
1834
+ C(Y, {
1830
1835
  modelValue: y.group.name,
1831
- "onUpdate:modelValue": P[0] || (P[0] = (L) => y.group.name = L),
1836
+ "onUpdate:modelValue": P[0] || (P[0] = (M) => y.group.name = M),
1832
1837
  disabled: k("name"),
1833
1838
  rules: [
1834
- (L) => !!L || o(x)("menu.common.validation.required", { field: o(x)("menu.common.labels.group_name") })
1839
+ (M) => !!M || o(x)("menu.common.validation.required", { field: o(x)("menu.common.labels.group_name") })
1835
1840
  ],
1836
1841
  autofocus: "",
1837
1842
  label: o(x)("menu.common.labels.group_name")
@@ -1841,12 +1846,12 @@ const Dr = /* @__PURE__ */ ae({
1841
1846
  "model-value": y.group,
1842
1847
  rules: o(b)
1843
1848
  }, {
1844
- default: B(() => [
1849
+ default: K(() => [
1845
1850
  C(Wn, null, {
1846
- default: B(() => [
1851
+ default: K(() => [
1847
1852
  C(Q, {
1848
1853
  modelValue: y.group.min,
1849
- "onUpdate:modelValue": P[1] || (P[1] = (L) => y.group.min = L),
1854
+ "onUpdate:modelValue": P[1] || (P[1] = (M) => y.group.min = M),
1850
1855
  disabled: k("min"),
1851
1856
  min: 0,
1852
1857
  class: "flex-1",
@@ -1854,7 +1859,7 @@ const Dr = /* @__PURE__ */ ae({
1854
1859
  }, null, 8, ["modelValue", "disabled", "label"]),
1855
1860
  C(Q, {
1856
1861
  modelValue: y.group.max,
1857
- "onUpdate:modelValue": P[2] || (P[2] = (L) => y.group.max = L),
1862
+ "onUpdate:modelValue": P[2] || (P[2] = (M) => y.group.max = M),
1858
1863
  disabled: k("max"),
1859
1864
  min: y.group.min,
1860
1865
  class: "flex-1",
@@ -1870,17 +1875,17 @@ const Dr = /* @__PURE__ */ ae({
1870
1875
  key: 0,
1871
1876
  label: o(x)("menu.common.labels.group_type")
1872
1877
  }, {
1873
- default: B(() => [
1878
+ default: K(() => [
1874
1879
  C(he, {
1875
1880
  disabled: k("type"),
1876
1881
  "model-value": y.group.type,
1877
- "onUpdate:modelValue": P[3] || (P[3] = (L) => R(L))
1882
+ "onUpdate:modelValue": P[3] || (P[3] = (M) => R(M))
1878
1883
  }, {
1879
- default: B(() => [
1880
- ($(!0), J(Oe, null, Ne(p.value, (L) => ($(), H(Ce, {
1881
- key: L.value,
1882
- label: o(x)(`menu.group.types.${L.label.toLowerCase()}`),
1883
- value: L.value
1884
+ default: K(() => [
1885
+ ($(!0), J(Oe, null, Ne(p.value, (M) => ($(), H(Ce, {
1886
+ key: M.value,
1887
+ label: o(x)(`menu.group.types.${M.label.toLowerCase()}`),
1888
+ value: M.value
1884
1889
  }, null, 8, ["label", "value"]))), 128))
1885
1890
  ]),
1886
1891
  _: 1
@@ -1891,10 +1896,10 @@ const Dr = /* @__PURE__ */ ae({
1891
1896
  C(Re, {
1892
1897
  label: o(x)("menu.common.labels.configuration")
1893
1898
  }, {
1894
- default: B(() => [
1895
- C(c, {
1899
+ default: K(() => [
1900
+ C(m, {
1896
1901
  modelValue: y.group.stackable,
1897
- "onUpdate:modelValue": P[4] || (P[4] = (L) => y.group.stackable = L),
1902
+ "onUpdate:modelValue": P[4] || (P[4] = (M) => y.group.stackable = M),
1898
1903
  disabled: k("stackable"),
1899
1904
  label: o(x)("menu.common.labels.stackable"),
1900
1905
  "label-placement": "right",
@@ -1908,7 +1913,7 @@ const Dr = /* @__PURE__ */ ae({
1908
1913
  title: o(x)("menu.group.form.tagging.title"),
1909
1914
  "sub-title": o(x)("menu.group.form.tagging.subtitle")
1910
1915
  }, {
1911
- default: B(() => [
1916
+ default: K(() => [
1912
1917
  C(o(sn), {
1913
1918
  entity: "group",
1914
1919
  "model-value": y.group.customAttributes || {},
@@ -1930,14 +1935,14 @@ const Dr = /* @__PURE__ */ ae({
1930
1935
  max: y.group.max
1931
1936
  })
1932
1937
  }, {
1933
- default: B(() => [
1934
- C(Ar, {
1938
+ default: K(() => [
1939
+ C(Nr, {
1935
1940
  "allow-refund-inventory": y.allowRefundInventory ?? !1,
1936
1941
  "categorized-items": y.categorizedItems,
1937
1942
  config: F.value,
1938
1943
  group: y.group,
1939
- "onUpdate:group": P[5] || (P[5] = (L) => T(L)),
1940
- "onUpdate:unmapGroup": P[6] || (P[6] = (L) => T(M(L)))
1944
+ "onUpdate:group": P[5] || (P[5] = (M) => T(M)),
1945
+ "onUpdate:unmapGroup": P[6] || (P[6] = (M) => T(A(M)))
1941
1946
  }, null, 8, ["allow-refund-inventory", "categorized-items", "config", "group"])
1942
1947
  ]),
1943
1948
  _: 1
@@ -1949,7 +1954,7 @@ const Dr = /* @__PURE__ */ ae({
1949
1954
  ], 64);
1950
1955
  };
1951
1956
  }
1952
- }), Kr = { class: "fm-typo-en-title-sm-600" }, Br = { class: "flex items-end space-x-24" }, zr = { class: "flex" }, Yr = /* @__PURE__ */ ae({
1957
+ }), Br = { class: "fm-typo-en-title-sm-600" }, zr = { class: "flex items-end space-x-24" }, Yr = { class: "flex" }, jr = /* @__PURE__ */ ae({
1953
1958
  __name: "UpdateForm",
1954
1959
  props: {
1955
1960
  combinations: {},
@@ -1958,8 +1963,8 @@ const Dr = /* @__PURE__ */ ae({
1958
1963
  },
1959
1964
  emits: ["update:combinations"],
1960
1965
  setup(n, { expose: r, emit: e }) {
1961
- var R, M;
1962
- const t = n, m = e, s = se(), g = Ge(), d = Vt(ot(Ue())), h = q([]), w = q(t.combinations[0].combinationKey || ""), _ = D(
1966
+ var R, A;
1967
+ const t = n, c = e, s = se(), g = Ge(), d = Vt(ot(Ue())), h = q([]), w = q(t.combinations[0].combinationKey || ""), _ = D(
1963
1968
  () => h.value.findIndex((S) => S.combinationKey == w.value)
1964
1969
  ), b = D(
1965
1970
  () => t.combinations.map((S) => ({
@@ -1978,7 +1983,7 @@ const Dr = /* @__PURE__ */ ae({
1978
1983
  items: E.items.map((x) => {
1979
1984
  var P;
1980
1985
  const y = (P = S.items) == null ? void 0 : P.find(
1981
- (j) => j._id == x._id && j.combinationKey == x.combinationKey
1986
+ (Y) => Y._id == x._id && Y.combinationKey == x.combinationKey
1982
1987
  );
1983
1988
  return {
1984
1989
  ...x,
@@ -2035,7 +2040,7 @@ const Dr = /* @__PURE__ */ ae({
2035
2040
  }))
2036
2041
  };
2037
2042
  });
2038
- m("update:combinations", S);
2043
+ c("update:combinations", S);
2039
2044
  }
2040
2045
  const k = q(!1);
2041
2046
  ye(
@@ -2047,11 +2052,11 @@ const Dr = /* @__PURE__ */ ae({
2047
2052
  const p = q();
2048
2053
  r({
2049
2054
  show: (R = p.value) == null ? void 0 : R.show,
2050
- trigger: (M = p.value) == null ? void 0 : M.trigger
2055
+ trigger: (A = p.value) == null ? void 0 : A.trigger
2051
2056
  });
2052
2057
  const { t: T } = ce();
2053
2058
  return (S, U) => {
2054
- const E = W("fm-select"), u = W("fm-button"), l = W("fm-card");
2059
+ const E = j("fm-select"), u = j("fm-button"), l = j("fm-card");
2055
2060
  return $(), H(In, {
2056
2061
  ref_key: "baseFormRef",
2057
2062
  ref: p,
@@ -2065,25 +2070,25 @@ const Dr = /* @__PURE__ */ ae({
2065
2070
  "onSubmit:group": U[4] || (U[4] = (i) => O()),
2066
2071
  "onStatus:show": U[5] || (U[5] = (i) => k.value = i)
2067
2072
  }, {
2068
- default: B(({ trigger: i }) => [
2073
+ default: K(({ trigger: i }) => [
2069
2074
  Me(S.$slots, "default", { trigger: i })
2070
2075
  ]),
2071
- "variant-section": B(() => [
2076
+ "variant-section": K(() => [
2072
2077
  w.value ? ($(), H(l, {
2073
2078
  key: 0,
2074
2079
  class: "p-16 bg-fm-color-neutral-gray-100 space-y-24",
2075
2080
  variant: "outlined"
2076
2081
  }, {
2077
- default: B(() => [
2078
- A("p", Kr, ge(o(T)("menu.group.option.variant")), 1),
2079
- A("div", Br, [
2082
+ default: K(() => [
2083
+ N("p", Br, ge(o(T)("menu.group.option.variant")), 1),
2084
+ N("div", zr, [
2080
2085
  C(E, {
2081
2086
  modelValue: w.value,
2082
2087
  "onUpdate:modelValue": U[0] || (U[0] = (i) => w.value = i),
2083
2088
  items: b.value,
2084
2089
  class: "flex-1"
2085
2090
  }, null, 8, ["modelValue", "items"]),
2086
- A("div", zr, [
2091
+ N("div", Yr, [
2087
2092
  C(u, {
2088
2093
  variant: o(qe).Tertiary,
2089
2094
  "prepend-icon": "keyboard_arrow_left",
@@ -2106,19 +2111,19 @@ const Dr = /* @__PURE__ */ ae({
2106
2111
  }, 8, ["categorized-items", "group", "title"]);
2107
2112
  };
2108
2113
  }
2109
- }), jr = In, jt = $r, Wr = Yr, qr = {
2114
+ }), Wr = In, jt = Pr, qr = jr, Hr = {
2110
2115
  key: 0,
2111
2116
  class: "flex flex-col space-y-16 h-[440px]"
2112
- }, Hr = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Xr = { class: "flex justify-between pb-16" }, Jr = { class: "flex gap-8" }, Qr = {
2117
+ }, Xr = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Jr = { class: "flex justify-between pb-16" }, Qr = { class: "flex gap-8" }, Zr = {
2113
2118
  key: 1,
2114
2119
  class: "flex flex-col items-center space-y-16"
2115
- }, Zr = { class: "flex flex-col items-center space-y-4 w-full" }, ea = { class: "fm-typo-en-title-sm-600" }, ta = { class: "text-fm-color-typo-secondary" }, na = /* @__PURE__ */ ae({
2120
+ }, ea = { class: "flex flex-col items-center space-y-4 w-full" }, ta = { class: "fm-typo-en-title-sm-600" }, na = { class: "text-fm-color-typo-secondary" }, oa = /* @__PURE__ */ ae({
2116
2121
  __name: "SelectGroupDialog",
2117
2122
  props: {
2118
2123
  groupIds: {}
2119
2124
  },
2120
2125
  setup(n) {
2121
- const r = n, e = Ge(), { emitData: t, emitAction: m } = Pt(), s = se(), g = D(() => s.rules.group), d = D(() => s.groups);
2126
+ const r = n, e = Ge(), { emitData: t, emitAction: c } = Pt(), s = se(), g = D(() => s.rules.group), d = D(() => s.groups);
2122
2127
  function h(O) {
2123
2128
  return me(O ?? []).sort((p, T) => p.position - T.position);
2124
2129
  }
@@ -2160,23 +2165,23 @@ const Dr = /* @__PURE__ */ ae({
2160
2165
  itemsLinked: []
2161
2166
  }));
2162
2167
  const f = q(me(r.groupIds || [])), a = q(""), { t: I } = ce(), F = () => {
2163
- t(f.value), m("primary"), e.close();
2168
+ t(f.value), c("primary"), e.close();
2164
2169
  };
2165
2170
  return (O, k) => {
2166
- const p = W("FmSearch"), T = W("FmCheckbox"), R = W("FmButton");
2167
- return _.value.length > 0 ? ($(), J("div", qr, [
2168
- A("div", null, [
2171
+ const p = j("FmSearch"), T = j("FmCheckbox"), R = j("FmButton");
2172
+ return _.value.length > 0 ? ($(), J("div", Hr, [
2173
+ N("div", null, [
2169
2174
  C(p, {
2170
2175
  autofocus: "",
2171
2176
  modelValue: a.value,
2172
- "onUpdate:modelValue": k[0] || (k[0] = (M) => a.value = M),
2177
+ "onUpdate:modelValue": k[0] || (k[0] = (A) => a.value = A),
2173
2178
  placeholder: o(I)("menu.common.labels.search_groups")
2174
2179
  }, null, 8, ["modelValue", "placeholder"])
2175
2180
  ]),
2176
- A("div", Hr, [
2177
- A("div", null, [
2178
- ($(!0), J(Oe, null, Ne(_.value, (M) => ($(), J("div", {
2179
- key: M.value
2181
+ N("div", Xr, [
2182
+ N("div", null, [
2183
+ ($(!0), J(Oe, null, Ne(_.value, (A) => ($(), J("div", {
2184
+ key: A.value
2180
2185
  }, [
2181
2186
  ft(C(T, {
2182
2187
  modelValue: f.value,
@@ -2184,49 +2189,49 @@ const Dr = /* @__PURE__ */ ae({
2184
2189
  k[1] || (k[1] = (S) => f.value = S),
2185
2190
  k[2] || (k[2] = (S) => o(t)(f.value))
2186
2191
  ],
2187
- label: M.label,
2188
- value: M.value
2192
+ label: A.label,
2193
+ value: A.value
2189
2194
  }, null, 8, ["modelValue", "label", "value"]), [
2190
- [Jt, M.label.toLowerCase().includes(a.value.toLowerCase())]
2195
+ [Jt, A.label.toLowerCase().includes(a.value.toLowerCase())]
2191
2196
  ])
2192
2197
  ]))), 128))
2193
2198
  ])
2194
2199
  ]),
2195
- A("div", Xr, [
2200
+ N("div", Jr, [
2196
2201
  C(o(jt), null, {
2197
- default: B(({ trigger: M }) => [
2202
+ default: K(({ trigger: A }) => [
2198
2203
  C(R, {
2199
2204
  label: o(I)("menu.common.actions.add_group"),
2200
2205
  variant: "tertiary",
2201
2206
  "text-color": "primary",
2202
- onClick: (S) => M()
2207
+ onClick: (S) => A()
2203
2208
  }, null, 8, ["label", "onClick"])
2204
2209
  ]),
2205
2210
  _: 1
2206
2211
  }),
2207
- A("div", Jr, [
2212
+ N("div", Qr, [
2208
2213
  C(R, {
2209
2214
  label: o(I)("menu.common.actions.cancel"),
2210
2215
  variant: "tertiary",
2211
- onClick: k[3] || (k[3] = (M) => o(e).close())
2216
+ onClick: k[3] || (k[3] = (A) => o(e).close())
2212
2217
  }, null, 8, ["label"]),
2213
2218
  C(R, {
2214
2219
  label: o(I)("menu.common.actions.confirm"),
2215
- onClick: k[4] || (k[4] = (M) => F())
2220
+ onClick: k[4] || (k[4] = (A) => F())
2216
2221
  }, null, 8, ["label"])
2217
2222
  ])
2218
2223
  ])
2219
- ])) : ($(), J("div", Qr, [
2220
- A("div", Zr, [
2221
- A("p", ea, ge(o(I)("menu.common.empty.no_group.title")), 1),
2222
- A("p", ta, ge(o(I)("menu.common.empty.no_group.subtitle")), 1)
2224
+ ])) : ($(), J("div", Zr, [
2225
+ N("div", ea, [
2226
+ N("p", ta, ge(o(I)("menu.common.empty.no_group.title")), 1),
2227
+ N("p", na, ge(o(I)("menu.common.empty.no_group.subtitle")), 1)
2223
2228
  ]),
2224
2229
  C(o(jt), null, {
2225
- default: B(({ trigger: M }) => [
2230
+ default: K(({ trigger: A }) => [
2226
2231
  C(R, {
2227
2232
  label: o(I)("menu.common.actions.add_group"),
2228
2233
  icon: "add",
2229
- onClick: (S) => M()
2234
+ onClick: (S) => A()
2230
2235
  }, null, 8, ["label", "onClick"])
2231
2236
  ]),
2232
2237
  _: 1
@@ -2234,7 +2239,7 @@ const Dr = /* @__PURE__ */ ae({
2234
2239
  ]));
2235
2240
  };
2236
2241
  }
2237
- }), oa = /* @__PURE__ */ ae({
2242
+ }), ra = /* @__PURE__ */ ae({
2238
2243
  __name: "ProductGroup",
2239
2244
  props: {
2240
2245
  isOverride: {
@@ -2251,7 +2256,7 @@ const Dr = /* @__PURE__ */ ae({
2251
2256
  setup(n, {
2252
2257
  emit: r
2253
2258
  }) {
2254
- const e = n, t = se(), m = Ge(), {
2259
+ const e = n, t = se(), c = Ge(), {
2255
2260
  t: s
2256
2261
  } = ce(), g = r, d = D(() => t.rules.group), h = D(() => t.rules.item), w = D(() => t.groups);
2257
2262
  function _(l, i) {
@@ -2279,11 +2284,11 @@ const Dr = /* @__PURE__ */ ae({
2279
2284
  return i.items.forEach((y) => {
2280
2285
  if (y.combinationKey)
2281
2286
  return;
2282
- const P = t.items.find((Q) => Q._id === y._id), j = i.items.filter((Q) => Q._id === y._id && Q.combinationKey).length;
2287
+ const P = t.items.find((Q) => Q._id === y._id), Y = i.items.filter((Q) => Q._id === y._id && Q.combinationKey).length;
2283
2288
  v.push({
2284
2289
  code: y.code || (P == null ? void 0 : P.code),
2285
2290
  name: y.name || (P == null ? void 0 : P.name),
2286
- variantCount: j
2291
+ variantCount: Y
2287
2292
  });
2288
2293
  }), v.map((y) => {
2289
2294
  const P = [(y == null ? void 0 : y.code) || "", (y == null ? void 0 : y.name) || ""].join(" ").trim();
@@ -2360,7 +2365,7 @@ const Dr = /* @__PURE__ */ ae({
2360
2365
  onClick: He(async () => {
2361
2366
  R(i);
2362
2367
  }, ["stop", "prevent"])
2363
- }), ve(Wr, {
2368
+ }), ve(qr, {
2364
2369
  // variant items
2365
2370
  combinations: S.value ?? [],
2366
2371
  // combinationKey: varaintName
@@ -2384,9 +2389,9 @@ const Dr = /* @__PURE__ */ ae({
2384
2389
  type: t.version !== te.F_MENU_VERSION.enum.v4
2385
2390
  }));
2386
2391
  function p() {
2387
- m.open({
2392
+ c.open({
2388
2393
  title: s("menu.product.form.group.add"),
2389
- contentComponent: na,
2394
+ contentComponent: oa,
2390
2395
  contentComponentProps: {
2391
2396
  groupIds: b.value
2392
2397
  }
@@ -2397,7 +2402,7 @@ const Dr = /* @__PURE__ */ ae({
2397
2402
  function T(l) {
2398
2403
  const i = l.reduce((v, x) => {
2399
2404
  var P;
2400
- const y = ((P = e.form.groups) == null ? void 0 : P.find((j) => j._id === x)) || {
2405
+ const y = ((P = e.form.groups) == null ? void 0 : P.find((Y) => Y._id === x)) || {
2401
2406
  _id: x,
2402
2407
  groupKey: ""
2403
2408
  };
@@ -2415,18 +2420,18 @@ const Dr = /* @__PURE__ */ ae({
2415
2420
  const i = me(e.form.groups);
2416
2421
  i.splice(i.findIndex((P) => P._id === l), 1);
2417
2422
  for (const P of ((v = e.form.variant) == null ? void 0 : v.variantCombinations) || [])
2418
- (y = P.groups) == null || y.splice((x = P.groups) == null ? void 0 : x.findIndex((j) => j._id === l), 1);
2423
+ (y = P.groups) == null || y.splice((x = P.groups) == null ? void 0 : x.findIndex((Y) => Y._id === l), 1);
2419
2424
  g("replace:form", Nt(t, {
2420
2425
  ...e.form,
2421
2426
  groups: i
2422
2427
  }));
2423
2428
  }
2424
- const M = D(() => {
2429
+ const A = D(() => {
2425
2430
  var l;
2426
2431
  return !!((l = e.form.variant) != null && l.variantGroupIds.length);
2427
2432
  }), S = D(() => {
2428
2433
  var l;
2429
- return M.value ? (l = e.form.variant) == null ? void 0 : l.variantCombinations : [{
2434
+ return A.value ? (l = e.form.variant) == null ? void 0 : l.variantCombinations : [{
2430
2435
  _id: e.form._id,
2431
2436
  combinationKey: "",
2432
2437
  groups: e.form.groups || []
@@ -2453,27 +2458,27 @@ const Dr = /* @__PURE__ */ ae({
2453
2458
  return (i = F.value.find((v) => v.value === l)) == null ? void 0 : i.label;
2454
2459
  }, u = (l) => {
2455
2460
  var i;
2456
- M.value ? g("update:form", "variant", {
2461
+ A.value ? g("update:form", "variant", {
2457
2462
  variantGroupIds: ((i = e.form.variant) == null ? void 0 : i.variantGroupIds) || [],
2458
2463
  variantCombinations: l
2459
2464
  }) : g("update:form", "groups", l[0].groups || []);
2460
2465
  };
2461
2466
  return (l, i) => {
2462
- const v = W("FmButton"), x = W("FmTable");
2467
+ const v = j("FmButton"), x = j("FmTable");
2463
2468
  return $(), H(De, {
2464
2469
  title: o(s)("menu.product.form.group.title"),
2465
2470
  "sub-title": o(s)("menu.product.form.group.subtitle"),
2466
2471
  id: o(Fe).GROUP
2467
2472
  }, {
2468
- "append-title": B(() => [C(v, {
2473
+ "append-title": K(() => [C(v, {
2469
2474
  class: "flex-shrink-0",
2470
2475
  label: o(s)("menu.product.form.group.add"),
2471
2476
  "prepend-icon": "add",
2472
2477
  variant: "secondary",
2473
2478
  onClick: p
2474
2479
  }, null, 8, ["label"])]),
2475
- default: B(() => [C(rn, null, {
2476
- default: B(() => {
2480
+ default: K(() => [C(rn, null, {
2481
+ default: K(() => {
2477
2482
  var y;
2478
2483
  return [((y = b.value) == null ? void 0 : y.length) > 0 ? ($(), H(x, {
2479
2484
  key: 0,
@@ -2494,11 +2499,11 @@ const Dr = /* @__PURE__ */ ae({
2494
2499
  }, 8, ["title", "sub-title", "id"]);
2495
2500
  };
2496
2501
  }
2497
- }), ra = {
2502
+ }), aa = {
2498
2503
  class: "xs:overflow-x-scroll"
2499
- }, aa = {
2504
+ }, la = {
2500
2505
  class: "xs:min-w-[640px]"
2501
- }, la = /* @__PURE__ */ ae({
2506
+ }, ia = /* @__PURE__ */ ae({
2502
2507
  __name: "ProductInventory",
2503
2508
  props: {
2504
2509
  isOverride: {
@@ -2517,7 +2522,7 @@ const Dr = /* @__PURE__ */ ae({
2517
2522
  }) {
2518
2523
  const {
2519
2524
  t: e
2520
- } = ce(), t = n, m = r, s = se(), g = D(() => s.rules.item), d = D(() => g.value.inventory);
2525
+ } = ce(), t = n, c = r, s = se(), g = D(() => s.rules.item), d = D(() => g.value.inventory);
2521
2526
  function h(F, O, k, p) {
2522
2527
  return !O || O && O.length === 0 ? [{
2523
2528
  _id: "",
@@ -2537,7 +2542,7 @@ const Dr = /* @__PURE__ */ ae({
2537
2542
  return h(t.form.inventoryBindings || [], ((F = t.form.variant) == null ? void 0 : F.variantCombinations) || [], w.value, s.variants);
2538
2543
  });
2539
2544
  function b(F, O) {
2540
- var R, M;
2545
+ var R, A;
2541
2546
  let k = ke.clone(t.form);
2542
2547
  const p = k.variant;
2543
2548
  if ((((R = p == null ? void 0 : p.variantCombinations) == null ? void 0 : R.length) ?? 0) > 0 && p) {
@@ -2547,7 +2552,7 @@ const Dr = /* @__PURE__ */ ae({
2547
2552
  U[S].inventoryBindings = O, k = {
2548
2553
  ...k,
2549
2554
  variant: {
2550
- variantGroupIds: ((M = k.variant) == null ? void 0 : M.variantGroupIds) || [],
2555
+ variantGroupIds: ((A = k.variant) == null ? void 0 : A.variantGroupIds) || [],
2551
2556
  variantCombinations: U
2552
2557
  }
2553
2558
  };
@@ -2556,7 +2561,7 @@ const Dr = /* @__PURE__ */ ae({
2556
2561
  ...k,
2557
2562
  inventoryBindings: O
2558
2563
  };
2559
- m("replace:form", k);
2564
+ c("replace:form", k);
2560
2565
  }
2561
2566
  q([{
2562
2567
  accessorKey: "name",
@@ -2602,7 +2607,7 @@ const Dr = /* @__PURE__ */ ae({
2602
2607
  }, {
2603
2608
  default: ({
2604
2609
  trigger: k
2605
- }) => C(W("fm-button"), {
2610
+ }) => C(j("fm-button"), {
2606
2611
  variant: qe.Tertiary,
2607
2612
  prependIcon: "edit",
2608
2613
  textColor: Se.NeutralGray400,
@@ -2625,7 +2630,7 @@ const Dr = /* @__PURE__ */ ae({
2625
2630
  title: o(e)("menu.inventory.title"),
2626
2631
  subTitle: o(e)("menu.inventory.subtitle")
2627
2632
  }, {
2628
- default: B(() => [A("div", ra, [A("div", aa, [($(!0), J(Oe, null, Ne(_.value, (k) => ($(), H(o(Et), {
2633
+ default: K(() => [N("div", aa, [N("div", la, [($(!0), J(Oe, null, Ne(_.value, (k) => ($(), H(o(Et), {
2629
2634
  key: k._id,
2630
2635
  ref_for: !0,
2631
2636
  ref_key: "inventoryManagerForms",
@@ -2646,19 +2651,19 @@ const Dr = /* @__PURE__ */ ae({
2646
2651
  _: 1
2647
2652
  }, 8, ["title", "subTitle"]));
2648
2653
  }
2649
- }), ia = ["id"], sa = { class: "space-y-16" }, ua = { class: "space-y-8" }, da = {
2654
+ }), sa = ["id"], ua = { class: "space-y-16" }, da = { class: "space-y-8" }, ca = {
2650
2655
  key: 0,
2651
2656
  class: "pl-32 pb-4 space-x-16 flex items-center"
2652
- }, ca = { class: "fm-typo-en-body-lg-400" }, ma = { class: "w-[258px]" }, pa = { class: "w-[117px]" }, fa = {
2657
+ }, ma = { class: "fm-typo-en-body-lg-400" }, pa = { class: "w-[258px]" }, fa = { class: "w-[117px]" }, ga = {
2653
2658
  key: 0,
2654
2659
  class: "space-y-8"
2655
- }, ga = {
2660
+ }, va = {
2656
2661
  key: 0,
2657
2662
  class: "pl-32 pb-4 flex space-x-16"
2658
- }, va = { class: "w-[258px] xs:w-full" }, ba = {
2663
+ }, ba = { class: "w-[258px] xs:w-full" }, _a = {
2659
2664
  key: 1,
2660
2665
  class: "space-y-8"
2661
- }, _a = { class: "pl-32 pb-4 flex space-x-16" }, ya = { class: "w-[258px] xs:w-full" }, ha = /* @__PURE__ */ ae({
2666
+ }, ya = { class: "pl-32 pb-4 flex space-x-16" }, ha = { class: "w-[258px] xs:w-full" }, wa = /* @__PURE__ */ ae({
2662
2667
  __name: "ProductPrice",
2663
2668
  props: {
2664
2669
  isOverride: { type: Boolean },
@@ -2668,14 +2673,14 @@ const Dr = /* @__PURE__ */ ae({
2668
2673
  },
2669
2674
  emits: ["update:form"],
2670
2675
  setup(n, { emit: r }) {
2671
- const e = n, t = rt(), m = se(), { t: s } = ce(), g = r, d = D(() => m.rules.item), h = D(() => {
2672
- var R, M;
2673
- const p = e.isOverride ? ((R = e.fallback) == null ? void 0 : R.unit) ?? ((M = e.fallback) == null ? void 0 : M.perXUnit) : void 0, T = e.form.unit ?? e.form.perXUnit ?? p;
2676
+ const e = n, t = rt(), c = se(), { t: s } = ce(), g = r, d = D(() => c.rules.item), h = D(() => {
2677
+ var R, A;
2678
+ const p = e.isOverride ? ((R = e.fallback) == null ? void 0 : R.unit) ?? ((A = e.fallback) == null ? void 0 : A.perXUnit) : void 0, T = e.form.unit ?? e.form.perXUnit ?? p;
2674
2679
  return T != null;
2675
2680
  }), w = (p) => {
2676
2681
  g("update:form", "unit", p ? "" : void 0), g("update:form", "perXUnit", p ? 0 : void 0);
2677
2682
  }, _ = D(() => {
2678
- const p = m.isV4;
2683
+ const p = c.isV4;
2679
2684
  return vt.setCoreStore(t).taxSetting(p);
2680
2685
  }), b = D(() => {
2681
2686
  var p;
@@ -2701,7 +2706,7 @@ const Dr = /* @__PURE__ */ ae({
2701
2706
  }
2702
2707
  const I = q(!1);
2703
2708
  async function F() {
2704
- var T, R, M, S, U, E, u, l;
2709
+ var T, R, A, S, U, E, u, l;
2705
2710
  if (!(e.form.name || "")) {
2706
2711
  const i = document.getElementById("product-name");
2707
2712
  if (i) {
@@ -2724,7 +2729,7 @@ const Dr = /* @__PURE__ */ ae({
2724
2729
  u,
2725
2730
  {
2726
2731
  name: e.form.name || "",
2727
- lat: (M = (R = (T = t.currentRestaurant) == null ? void 0 : T.value) == null ? void 0 : R.profile.address.coordinates) == null ? void 0 : M[1],
2732
+ lat: (A = (R = (T = t.currentRestaurant) == null ? void 0 : T.value) == null ? void 0 : R.profile.address.coordinates) == null ? void 0 : A[1],
2728
2733
  lon: (E = (U = (S = t.currentRestaurant) == null ? void 0 : S.value) == null ? void 0 : U.profile.address.coordinates) == null ? void 0 : E[0]
2729
2734
  },
2730
2735
  !0
@@ -2733,24 +2738,24 @@ const Dr = /* @__PURE__ */ ae({
2733
2738
  I.value = !1;
2734
2739
  }
2735
2740
  }
2736
- const O = xo(m), k = D(() => {
2741
+ const O = xo(c), k = D(() => {
2737
2742
  var p, T;
2738
- return ((p = m.currentCatalog) == null ? void 0 : p.priceTierRules) ?? ((T = m.currentCatalog) == null ? void 0 : T.usePriceTiers) ?? [];
2743
+ return ((p = c.currentCatalog) == null ? void 0 : p.priceTierRules) ?? ((T = c.currentCatalog) == null ? void 0 : T.usePriceTiers) ?? [];
2739
2744
  });
2740
2745
  return (p, T) => {
2741
- const R = W("fm-select"), M = W("FmButton"), S = W("fm-checkbox"), U = W("fm-text-field"), E = Xt("tooltip");
2746
+ const R = j("fm-select"), A = j("FmButton"), S = j("fm-checkbox"), U = j("fm-text-field"), E = Xt("tooltip");
2742
2747
  return $(), H(De, {
2743
2748
  title: o(s)("menu.product.form.price.title")
2744
2749
  }, {
2745
- default: B(() => {
2750
+ default: K(() => {
2746
2751
  var u;
2747
2752
  return [
2748
- A("div", {
2753
+ N("div", {
2749
2754
  id: o(Fe).PRICE,
2750
2755
  class: fe(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
2751
2756
  }, [
2752
2757
  C(Xe, {
2753
- disable: k.value.length > 0 && o(m).currentCatalog && !o(m).currentScheduler,
2758
+ disable: k.value.length > 0 && o(c).currentCatalog && !o(c).currentScheduler,
2754
2759
  min: 0,
2755
2760
  "model-value": p.form.price || null,
2756
2761
  placeholder: (u = p.fallback) != null && u.price ? o(tt)(p.fallback.price, !1) : void 0,
@@ -2762,7 +2767,7 @@ const Dr = /* @__PURE__ */ ae({
2762
2767
  "show-currency": "",
2763
2768
  "onUpdate:modelValue": T[0] || (T[0] = (l) => l && g("update:form", "price", l))
2764
2769
  }, {
2765
- append: B(() => [
2770
+ append: K(() => [
2766
2771
  ft(C(Zt, {
2767
2772
  "pure-styling": "",
2768
2773
  onClick: F
@@ -2784,21 +2789,21 @@ const Dr = /* @__PURE__ */ ae({
2784
2789
  "shift-menu": "",
2785
2790
  "onUpdate:modelValue": T[1] || (T[1] = (l) => g("update:form", "taxes", [o(vt).decodeTax(l)]))
2786
2791
  }, null, 8, ["disabled", "items", "label", "model-value"])
2787
- ], 8, ia),
2788
- !p.isOverride && o(m).isV4 ? ($(), H(Re, {
2792
+ ], 8, sa),
2793
+ !p.isOverride && o(c).isV4 ? ($(), H(Re, {
2789
2794
  key: 0,
2790
2795
  label: o(s)("menu.price_tier.price_group"),
2791
2796
  description: o(s)("menu.price_tier.description")
2792
2797
  }, {
2793
- append: B(() => [
2794
- C(M, {
2798
+ append: K(() => [
2799
+ C(A, {
2795
2800
  label: o(s)("menu.price_tier.add_price_group"),
2796
2801
  icon: "add",
2797
2802
  variant: "secondary",
2798
2803
  onClick: o(O).create
2799
2804
  }, null, 8, ["label", "onClick"])
2800
2805
  ]),
2801
- default: B(() => {
2806
+ default: K(() => {
2802
2807
  var l;
2803
2808
  return [
2804
2809
  p.isOverride ? X("", !0) : ($(), H(Xn, {
@@ -2815,10 +2820,10 @@ const Dr = /* @__PURE__ */ ae({
2815
2820
  C(Re, {
2816
2821
  label: o(s)("menu.product.form.price.settings.title")
2817
2822
  }, {
2818
- default: B(() => {
2823
+ default: K(() => {
2819
2824
  var l, i, v;
2820
2825
  return [
2821
- A("div", sa, [
2826
+ N("div", ua, [
2822
2827
  C(S, {
2823
2828
  disabled: !d.value.openPrice || p.isAddon,
2824
2829
  "model-value": p.form.openPrice ?? ((l = p.fallback) == null ? void 0 : l.openPrice) ?? !1,
@@ -2827,7 +2832,7 @@ const Dr = /* @__PURE__ */ ae({
2827
2832
  sublabel: o(s)("menu.product.form.price.settings.open_price.sublabel"),
2828
2833
  "onUpdate:modelValue": T[3] || (T[3] = (x) => g("update:form", "openPrice", x))
2829
2834
  }, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
2830
- A("div", ua, [
2835
+ N("div", da, [
2831
2836
  C(S, {
2832
2837
  disabled: !d.value.unit || p.isAddon,
2833
2838
  "model-value": h.value,
@@ -2836,9 +2841,9 @@ const Dr = /* @__PURE__ */ ae({
2836
2841
  sublabel: o(s)("menu.product.form.price.settings.sell_by_unit.sublabel"),
2837
2842
  "onUpdate:modelValue": w
2838
2843
  }, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
2839
- h.value ? ($(), J("div", da, [
2840
- A("p", ca, ge(o(s)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
2841
- A("div", ma, [
2844
+ h.value ? ($(), J("div", ca, [
2845
+ N("p", ma, ge(o(s)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
2846
+ N("div", pa, [
2842
2847
  C(U, {
2843
2848
  disabled: !d.value.unit,
2844
2849
  "model-value": p.form.perXUnit || ((i = p.fallback) == null ? void 0 : i.perXUnit) || null,
@@ -2853,7 +2858,7 @@ const Dr = /* @__PURE__ */ ae({
2853
2858
  "onUpdate:modelValue": f
2854
2859
  }, null, 8, ["disabled", "model-value", "rules", "placeholder"])
2855
2860
  ]),
2856
- A("div", pa, [
2861
+ N("div", fa, [
2857
2862
  C(U, {
2858
2863
  disabled: !d.value.unit,
2859
2864
  "model-value": p.form.unit || ((v = p.fallback) == null ? void 0 : v.unit) || null,
@@ -2866,15 +2871,15 @@ const Dr = /* @__PURE__ */ ae({
2866
2871
  ])
2867
2872
  ])) : X("", !0)
2868
2873
  ]),
2869
- d.value.costing ? ($(), J("div", fa, [
2874
+ d.value.costing ? ($(), J("div", ga, [
2870
2875
  C(S, {
2871
2876
  "model-value": !!p.form.costing,
2872
2877
  value: !!p.form.costing,
2873
2878
  label: o(s)("menu.product.form.price.settings.track_costing.label"),
2874
2879
  "onUpdate:modelValue": T[5] || (T[5] = (x) => g("update:form", "costing", x ? o(be.Dinero).zero().toObject() : void 0))
2875
2880
  }, null, 8, ["model-value", "value", "label"]),
2876
- p.form.costing ? ($(), J("div", ga, [
2877
- A("div", va, [
2881
+ p.form.costing ? ($(), J("div", va, [
2882
+ N("div", ba, [
2878
2883
  C(Xe, {
2879
2884
  class: "w-full",
2880
2885
  min: 0,
@@ -2886,7 +2891,7 @@ const Dr = /* @__PURE__ */ ae({
2886
2891
  ])
2887
2892
  ])) : X("", !0)
2888
2893
  ])) : X("", !0),
2889
- d.value.minPrice ? ($(), J("div", ba, [
2894
+ d.value.minPrice ? ($(), J("div", _a, [
2890
2895
  C(S, {
2891
2896
  disabled: !d.value.minPrice || p.isAddon,
2892
2897
  "model-value": !!p.form.minPrice,
@@ -2894,8 +2899,8 @@ const Dr = /* @__PURE__ */ ae({
2894
2899
  label: o(s)("menu.product.form.price.settings.min_price.label"),
2895
2900
  "onUpdate:modelValue": T[7] || (T[7] = (x) => g("update:form", "minPrice", x ? o(be.Dinero).zero().toObject() : void 0))
2896
2901
  }, null, 8, ["disabled", "model-value", "value", "label"]),
2897
- A("div", _a, [
2898
- A("div", ya, [
2902
+ N("div", ya, [
2903
+ N("div", ha, [
2899
2904
  p.form.minPrice ? ($(), H(Xe, {
2900
2905
  key: 0,
2901
2906
  max: o(be.Dinero).fromFdoDinero(p.form.price).toUnit(),
@@ -2919,7 +2924,7 @@ const Dr = /* @__PURE__ */ ae({
2919
2924
  }, 8, ["title"]);
2920
2925
  };
2921
2926
  }
2922
- }), wa = { class: "space-y-16" }, Ca = { class: "flex items-center space-x-4" }, Ia = { class: "handle" }, ka = { class: "pt-16" }, Ea = /* @__PURE__ */ ae({
2927
+ }), Ca = { class: "space-y-16" }, Ia = { class: "flex items-center space-x-4" }, ka = { class: "handle" }, Ea = { class: "pt-16" }, Ta = /* @__PURE__ */ ae({
2923
2928
  __name: "ProductPrint",
2924
2929
  props: {
2925
2930
  isOverride: { type: Boolean },
@@ -2930,7 +2935,7 @@ const Dr = /* @__PURE__ */ ae({
2930
2935
  },
2931
2936
  emits: ["update:form", "replace:form"],
2932
2937
  setup(n, { emit: r }) {
2933
- const e = n, t = se(), { t: m } = ce(), s = r;
2938
+ const e = n, t = se(), { t: c } = ce(), s = r;
2934
2939
  function g() {
2935
2940
  return {
2936
2941
  ...Le.generator.initMenuV4PrintSetting(),
@@ -2973,8 +2978,8 @@ const Dr = /* @__PURE__ */ ae({
2973
2978
  });
2974
2979
  }
2975
2980
  function F(k, p) {
2976
- var R, M;
2977
- let T = [...((M = (R = e.form) == null ? void 0 : R.print) == null ? void 0 : M.department) ?? []];
2981
+ var R, A;
2982
+ let T = [...((A = (R = e.form) == null ? void 0 : R.print) == null ? void 0 : A.department) ?? []];
2978
2983
  p && !T.includes(k) ? T = [...T, k] : p || (T = T.filter((S) => S !== k)), s("update:form", "print", {
2979
2984
  ...g(),
2980
2985
  ...e.form.print,
@@ -2983,52 +2988,52 @@ const Dr = /* @__PURE__ */ ae({
2983
2988
  }
2984
2989
  const O = D(() => [
2985
2990
  {
2986
- label: m("menu.product.form.print.kds.options.all.label"),
2991
+ label: c("menu.product.form.print.kds.options.all.label"),
2987
2992
  value: !1,
2988
- description: m("menu.product.form.print.kds.options.all.description")
2993
+ description: c("menu.product.form.print.kds.options.all.description")
2989
2994
  },
2990
2995
  {
2991
- label: m("menu.product.form.print.kds.options.sequential.label"),
2996
+ label: c("menu.product.form.print.kds.options.sequential.label"),
2992
2997
  value: !0,
2993
- description: m("menu.product.form.print.kds.options.sequential.description")
2998
+ description: c("menu.product.form.print.kds.options.sequential.description")
2994
2999
  }
2995
3000
  ]);
2996
3001
  return ye(
2997
3002
  () => h.value.length,
2998
3003
  () => F(h.value[h.value.length - 1]._id, !0)
2999
3004
  ), (k, p) => {
3000
- const T = W("fm-switch"), R = W("fm-radio"), M = W("fm-radio-group"), S = W("fm-button"), U = W("fm-checkbox");
3005
+ const T = j("fm-switch"), R = j("fm-radio"), A = j("fm-radio-group"), S = j("fm-button"), U = j("fm-checkbox");
3001
3006
  return $(), H(De, {
3002
- title: o(m)("menu.product.form.print.title")
3007
+ title: o(c)("menu.product.form.print.title")
3003
3008
  }, {
3004
- default: B(() => {
3009
+ default: K(() => {
3005
3010
  var E;
3006
3011
  return [
3007
3012
  d.value.printConfig ? ($(), H(Re, {
3008
3013
  key: 0,
3009
- label: o(m)("menu.product.form.print.config.label")
3014
+ label: o(c)("menu.product.form.print.config.label")
3010
3015
  }, {
3011
- default: B(() => {
3016
+ default: K(() => {
3012
3017
  var u;
3013
3018
  return [
3014
3019
  C(T, {
3015
3020
  "model-value": !((u = k.form.print) != null && u.toRoot),
3016
- label: o(m)("menu.product.form.print.config.group_parent.label"),
3021
+ label: o(c)("menu.product.form.print.config.group_parent.label"),
3017
3022
  "label-placement": "right",
3018
- sublabel: o(m)("menu.product.form.print.config.group_parent.sublabel"),
3023
+ sublabel: o(c)("menu.product.form.print.config.group_parent.sublabel"),
3019
3024
  "onUpdate:modelValue": p[0] || (p[0] = (l) => f(l))
3020
3025
  }, null, 8, ["model-value", "label", "sublabel"])
3021
3026
  ];
3022
3027
  }),
3023
3028
  _: 1
3024
3029
  }, 8, ["label"])) : X("", !0),
3025
- C(M, {
3026
- label: o(m)("menu.product.form.print.kds.label"),
3030
+ C(A, {
3031
+ label: o(c)("menu.product.form.print.kds.label"),
3027
3032
  "model-value": ((E = k.form.print) == null ? void 0 : E.sequential) ?? !1,
3028
3033
  "onUpdate:modelValue": p[1] || (p[1] = (u) => a(u))
3029
3034
  }, {
3030
- default: B(() => [
3031
- A("div", wa, [
3035
+ default: K(() => [
3036
+ N("div", Ca, [
3032
3037
  ($(!0), J(Oe, null, Ne(O.value, (u, l) => ($(), H(R, {
3033
3038
  key: l,
3034
3039
  label: u.label,
@@ -3040,9 +3045,9 @@ const Dr = /* @__PURE__ */ ae({
3040
3045
  _: 1
3041
3046
  }, 8, ["label", "model-value"]),
3042
3047
  C(Re, {
3043
- label: o(m)("menu.product.form.print.routes.label")
3048
+ label: o(c)("menu.product.form.print.routes.label")
3044
3049
  }, {
3045
- default: B(() => [
3050
+ default: K(() => [
3046
3051
  _.value.length ? ($(), H(o(Mt), {
3047
3052
  key: 0,
3048
3053
  "item-key": (u) => u,
@@ -3051,11 +3056,11 @@ const Dr = /* @__PURE__ */ ae({
3051
3056
  "onUpdate:modelValue": p[3] || (p[3] = (u) => I(u)),
3052
3057
  class: "space-y-16"
3053
3058
  }, {
3054
- item: B(({ element: u }) => {
3059
+ item: K(({ element: u }) => {
3055
3060
  var l, i, v, x, y;
3056
3061
  return [
3057
- A("div", Ca, [
3058
- A("div", Ia, [
3062
+ N("div", Ia, [
3063
+ N("div", ka, [
3059
3064
  w.value ? ($(), H(S, {
3060
3065
  key: 0,
3061
3066
  disabled: !((i = (l = e.form.print) == null ? void 0 : l.department) != null && i.includes(u)),
@@ -3081,11 +3086,11 @@ const Dr = /* @__PURE__ */ ae({
3081
3086
  _: 1
3082
3087
  }, 8, ["item-key", "model-value"])) : X("", !0),
3083
3088
  C(o(Jn), { "apply-product": !1 }, {
3084
- default: B(({ trigger: u }) => [
3085
- A("div", ka, [
3089
+ default: K(({ trigger: u }) => [
3090
+ N("div", Ea, [
3086
3091
  C(S, {
3087
3092
  variant: o(qe).Secondary,
3088
- label: o(m)("menu.product.form.print.routes.add"),
3093
+ label: o(c)("menu.product.form.print.routes.add"),
3089
3094
  "prepend-icon": "add",
3090
3095
  onClick: u
3091
3096
  }, null, 8, ["variant", "label", "onClick"])
@@ -3102,7 +3107,7 @@ const Dr = /* @__PURE__ */ ae({
3102
3107
  }, 8, ["title"]);
3103
3108
  };
3104
3109
  }
3105
- }), Ta = /* @__PURE__ */ ae({
3110
+ }), xa = /* @__PURE__ */ ae({
3106
3111
  __name: "ProductTakeaway",
3107
3112
  props: {
3108
3113
  isOverride: {
@@ -3119,12 +3124,12 @@ const Dr = /* @__PURE__ */ ae({
3119
3124
  setup(n, {
3120
3125
  emit: r
3121
3126
  }) {
3122
- const e = n, t = se(), m = D(() => t.rules.item), {
3127
+ const e = n, t = se(), c = D(() => t.rules.item), {
3123
3128
  t: s
3124
3129
  } = ce(), g = r, {
3125
3130
  hasVariant: d,
3126
3131
  takeaways: h
3127
- } = Qn(e, g, m), w = D(() => [e.isOverride ? {
3132
+ } = Qn(e, g, c), w = D(() => [e.isOverride ? {
3128
3133
  label: s("menu.product.form.takeaway.options.follows_main"),
3129
3134
  value: null
3130
3135
  } : {
@@ -3183,12 +3188,12 @@ const Dr = /* @__PURE__ */ ae({
3183
3188
  }
3184
3189
  }]);
3185
3190
  return (b, f) => {
3186
- const a = W("fm-table");
3191
+ const a = j("fm-table");
3187
3192
  return $(), H(De, {
3188
3193
  title: o(s)("menu.product.form.takeaway.title"),
3189
3194
  "sub-title": o(s)("menu.product.form.takeaway.subtitle")
3190
3195
  }, {
3191
- default: B(() => [C(a, {
3196
+ default: K(() => [C(a, {
3192
3197
  columnDefs: _.value,
3193
3198
  "page-size": o(h).length,
3194
3199
  "row-data": o(h),
@@ -3198,17 +3203,17 @@ const Dr = /* @__PURE__ */ ae({
3198
3203
  }, 8, ["title", "sub-title"]);
3199
3204
  };
3200
3205
  }
3201
- }), xa = { class: "fm-typo-en-title-md-600" }, Fa = { class: "py-16 space-y-32" }, Sa = ["data-not-allow-sort"], Oa = {
3206
+ }), Fa = { class: "fm-typo-en-title-md-600" }, Sa = { class: "py-16 space-y-32" }, Oa = ["data-not-allow-sort"], Da = {
3202
3207
  key: 1,
3203
3208
  class: "w-24"
3204
- }, Da = { class: "flex-1" }, Va = { class: "flex gap-8 items-center justify-start" }, $a = /* @__PURE__ */ ae({
3209
+ }, Va = { class: "flex-1" }, $a = { class: "flex gap-8 items-center justify-start" }, Pa = /* @__PURE__ */ ae({
3205
3210
  __name: "VariantManagerForm",
3206
3211
  props: {
3207
3212
  initialValue: {}
3208
3213
  },
3209
3214
  emits: ["update:show", "submit"],
3210
3215
  setup(n, { emit: r }) {
3211
- const e = n, t = r, m = () => {
3216
+ const e = n, t = r, c = () => {
3212
3217
  setTimeout(() => {
3213
3218
  t("update:show", !1);
3214
3219
  }, 100);
@@ -3227,9 +3232,9 @@ const Dr = /* @__PURE__ */ ae({
3227
3232
  function a(R) {
3228
3233
  _.value.options = R;
3229
3234
  }
3230
- function I(R, M) {
3235
+ function I(R, A) {
3231
3236
  const S = me(_.value.options), U = S.findIndex((E) => E._id == R);
3232
- S[U].name = M, _.value.options = S, U === _.value.options.length - 1 && F();
3237
+ S[U].name = A, _.value.options = S, U === _.value.options.length - 1 && F();
3233
3238
  }
3234
3239
  function F() {
3235
3240
  const R = me(_.value.options);
@@ -3242,8 +3247,8 @@ const Dr = /* @__PURE__ */ ae({
3242
3247
  ];
3243
3248
  }
3244
3249
  function O(R) {
3245
- const M = me(_.value.options);
3246
- _.value.options = M.filter((S) => S._id !== R);
3250
+ const A = me(_.value.options);
3251
+ _.value.options = A.filter((S) => S._id !== R);
3247
3252
  }
3248
3253
  ye(
3249
3254
  () => _.value.options,
@@ -3255,13 +3260,13 @@ const Dr = /* @__PURE__ */ ae({
3255
3260
  }
3256
3261
  );
3257
3262
  function k(R) {
3258
- const M = R.draggedContext.futureIndex, S = R.relatedContext.list;
3259
- return M !== S.length - 1;
3263
+ const A = R.draggedContext.futureIndex, S = R.relatedContext.list;
3264
+ return A !== S.length - 1;
3260
3265
  }
3261
3266
  const p = Rt(
3262
3267
  () => {
3263
3268
  if (e.initialValue) {
3264
- const R = _.value.options.filter((M) => !!M.name.trim());
3269
+ const R = _.value.options.filter((A) => !!A.name.trim());
3265
3270
  return !ke.isEqual({ ..._.value, options: R }, e.initialValue);
3266
3271
  } else
3267
3272
  return !!(_.value.options.length > 1 || _.value.name.trim());
@@ -3273,7 +3278,7 @@ const Dr = /* @__PURE__ */ ae({
3273
3278
  try {
3274
3279
  b.value = !0;
3275
3280
  const R = me(_.value);
3276
- R.options = R.options.filter((M) => !!M.name.trim()), e.initialValue ? await s.updateMenu({
3281
+ R.options = R.options.filter((A) => !!A.name.trim()), e.initialValue ? await s.updateMenu({
3277
3282
  module: te.F_MENU_MODULE_V4_KEY.enum.variant,
3278
3283
  operation: _e.F_OPERATION_TYPE.update,
3279
3284
  data: R
@@ -3281,7 +3286,7 @@ const Dr = /* @__PURE__ */ ae({
3281
3286
  module: te.F_MENU_MODULE_V4_KEY.enum.variant,
3282
3287
  operation: _e.F_OPERATION_TYPE.create,
3283
3288
  data: R
3284
- }), m();
3289
+ }), c();
3285
3290
  } finally {
3286
3291
  b.value = !1;
3287
3292
  }
@@ -3289,16 +3294,16 @@ const Dr = /* @__PURE__ */ ae({
3289
3294
  return ye(
3290
3295
  () => f.value,
3291
3296
  (R) => {
3292
- R ? _.value = w() : m();
3297
+ R ? _.value = w() : c();
3293
3298
  }
3294
3299
  ), Ae(() => {
3295
3300
  f.value = !0;
3296
- }), (R, M) => {
3297
- const S = W("fm-text-field"), U = W("fm-icon"), E = W("fm-button"), u = W("fm-side-sheet");
3301
+ }), (R, A) => {
3302
+ const S = j("fm-text-field"), U = j("fm-icon"), E = j("fm-button"), u = j("fm-side-sheet");
3298
3303
  return $(), H(u, {
3299
3304
  id: "variant-form",
3300
3305
  modelValue: f.value,
3301
- "onUpdate:modelValue": M[2] || (M[2] = (l) => f.value = l),
3306
+ "onUpdate:modelValue": A[2] || (A[2] = (l) => f.value = l),
3302
3307
  "is-container": o(Ie).FmForm,
3303
3308
  "is-container-props": {
3304
3309
  onValidationSuccess: T,
@@ -3307,11 +3312,11 @@ const Dr = /* @__PURE__ */ ae({
3307
3312
  "max-width": 560,
3308
3313
  "onOn:clickedAway": o(p)
3309
3314
  }, {
3310
- "side-sheet-header": B(() => [
3311
- A("p", xa, ge(d.value), 1)
3315
+ "side-sheet-header": K(() => [
3316
+ N("p", Fa, ge(d.value), 1)
3312
3317
  ]),
3313
- "side-sheet-footer": B(() => [
3314
- A("div", Va, [
3318
+ "side-sheet-footer": K(() => [
3319
+ N("div", $a, [
3315
3320
  C(E, {
3316
3321
  label: h.value,
3317
3322
  loading: b.value,
@@ -3323,32 +3328,32 @@ const Dr = /* @__PURE__ */ ae({
3323
3328
  label: o(g)("menu.common.actions.cancel"),
3324
3329
  size: "lg",
3325
3330
  variant: "tertiary",
3326
- onClick: M[1] || (M[1] = () => f.value = !1)
3331
+ onClick: A[1] || (A[1] = () => f.value = !1)
3327
3332
  }, null, 8, ["label"])
3328
3333
  ])
3329
3334
  ]),
3330
- default: B(() => {
3335
+ default: K(() => {
3331
3336
  var l;
3332
3337
  return [
3333
- A("div", Fa, [
3338
+ N("div", Sa, [
3334
3339
  C(De, {
3335
3340
  title: o(g)("menu.variant.form.detail")
3336
3341
  }, {
3337
- default: B(() => [
3342
+ default: K(() => [
3338
3343
  C(S, {
3339
3344
  autofocus: "",
3340
3345
  label: o(g)("menu.variant.form.name.label"),
3341
3346
  "helper-text": o(g)("menu.variant.form.name.helper"),
3342
3347
  modelValue: _.value.name,
3343
- "onUpdate:modelValue": M[0] || (M[0] = (i) => _.value.name = i),
3348
+ "onUpdate:modelValue": A[0] || (A[0] = (i) => _.value.name = i),
3344
3349
  rules: [(i) => !!i || o(g)("menu.variant.form.name.required")],
3345
3350
  placeholder: o(g)("menu.variant.form.name.placeholder")
3346
3351
  }, null, 8, ["label", "helper-text", "modelValue", "rules", "placeholder"]),
3347
3352
  C(Re, {
3348
3353
  label: o(g)("menu.variant.form.options.title")
3349
3354
  }, {
3350
- default: B(() => [
3351
- A("div", null, [
3355
+ default: K(() => [
3356
+ N("div", null, [
3352
3357
  C(o(Mt), {
3353
3358
  "model-value": _.value.options,
3354
3359
  move: k,
@@ -3358,8 +3363,8 @@ const Dr = /* @__PURE__ */ ae({
3358
3363
  "item-key": "_id",
3359
3364
  "onUpdate:modelValue": a
3360
3365
  }, {
3361
- item: B(({ element: i, index: v }) => [
3362
- A("div", {
3366
+ item: K(({ element: i, index: v }) => [
3367
+ N("div", {
3363
3368
  class: fe(["flex items-center", "space-x-8"]),
3364
3369
  "data-not-allow-sort": v === _.value.options.length - 1
3365
3370
  }, [
@@ -3367,8 +3372,8 @@ const Dr = /* @__PURE__ */ ae({
3367
3372
  key: 0,
3368
3373
  class: "handle",
3369
3374
  name: "drag_handle"
3370
- })) : v > 0 ? ($(), J("div", Oa)) : X("", !0),
3371
- A("div", Da, [
3375
+ })) : v > 0 ? ($(), J("div", Da)) : X("", !0),
3376
+ N("div", Va, [
3372
3377
  C(S, {
3373
3378
  "model-value": i.name,
3374
3379
  rules: [
@@ -3381,7 +3386,7 @@ const Dr = /* @__PURE__ */ ae({
3381
3386
  }, Sn({ _: 2 }, [
3382
3387
  v !== _.value.options.length - 1 ? {
3383
3388
  name: "append",
3384
- fn: B(() => [
3389
+ fn: K(() => [
3385
3390
  C(U, {
3386
3391
  name: "close",
3387
3392
  onClick: (x) => O(i._id)
@@ -3391,7 +3396,7 @@ const Dr = /* @__PURE__ */ ae({
3391
3396
  } : void 0
3392
3397
  ]), 1032, ["model-value", "rules", "placeholder", "onUpdate:modelValue"])
3393
3398
  ])
3394
- ], 8, Sa)
3399
+ ], 8, Oa)
3395
3400
  ]),
3396
3401
  _: 1
3397
3402
  }, 8, ["model-value"])
@@ -3417,11 +3422,11 @@ const Dr = /* @__PURE__ */ ae({
3417
3422
  };
3418
3423
  }
3419
3424
  });
3420
- function Pa() {
3425
+ function Ra() {
3421
3426
  const n = an();
3422
3427
  function r() {
3423
3428
  n.open({
3424
- component: $a,
3429
+ component: Pa,
3425
3430
  props: {
3426
3431
  initialValue: void 0
3427
3432
  }
@@ -3431,29 +3436,29 @@ function Pa() {
3431
3436
  createVariant: r
3432
3437
  };
3433
3438
  }
3434
- const Ra = {
3439
+ const Ua = {
3435
3440
  key: 0,
3436
3441
  class: "flex flex-col space-y-16 h-[440px]"
3437
- }, Ua = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Ma = { class: "flex justify-between pb-16" }, Aa = { class: "flex gap-8" }, Na = {
3442
+ }, Ma = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Aa = { class: "flex justify-between pb-16" }, Na = { class: "flex gap-8" }, La = {
3438
3443
  key: 1,
3439
3444
  class: "flex flex-col items-center space-y-16"
3440
- }, La = { class: "flex flex-col items-center space-y-4 w-full" }, Ga = { class: "fm-typo-en-title-sm-600" }, Ka = { class: "text-fm-color-typo-secondary" }, Ba = /* @__PURE__ */ ae({
3445
+ }, Ga = { class: "flex flex-col items-center space-y-4 w-full" }, Ka = { class: "fm-typo-en-title-sm-600" }, Ba = { class: "text-fm-color-typo-secondary" }, za = /* @__PURE__ */ ae({
3441
3446
  __name: "SelectVariantDialog",
3442
3447
  props: {
3443
3448
  selectedVariants: {}
3444
3449
  },
3445
3450
  setup(n) {
3446
- const r = Ge(), { emitData: e, emitAction: t } = Pt(), m = se(), { t: s } = ce(), g = n, d = D(() => m.variants.map((f) => ({
3451
+ const r = Ge(), { emitData: e, emitAction: t } = Pt(), c = se(), { t: s } = ce(), g = n, d = D(() => c.variants.map((f) => ({
3447
3452
  label: f.name,
3448
3453
  value: f._id,
3449
3454
  disabled: !1
3450
- }))), h = q(me(g.selectedVariants)), w = q(""), { createVariant: _ } = Pa(), b = () => {
3455
+ }))), h = q(me(g.selectedVariants)), w = q(""), { createVariant: _ } = Ra(), b = () => {
3451
3456
  e(h.value), t("primary"), r.close();
3452
3457
  };
3453
3458
  return (f, a) => {
3454
- const I = W("FmSearch"), F = W("FmCheckbox"), O = W("FmButton");
3455
- return d.value.length > 0 ? ($(), J("div", Ra, [
3456
- A("div", null, [
3459
+ const I = j("FmSearch"), F = j("FmCheckbox"), O = j("FmButton");
3460
+ return d.value.length > 0 ? ($(), J("div", Ua, [
3461
+ N("div", null, [
3457
3462
  C(I, {
3458
3463
  autofocus: "",
3459
3464
  modelValue: w.value,
@@ -3461,8 +3466,8 @@ const Ra = {
3461
3466
  placeholder: o(s)("menu.common.labels.search_variants")
3462
3467
  }, null, 8, ["modelValue", "placeholder"])
3463
3468
  ]),
3464
- A("div", Ua, [
3465
- A("div", null, [
3469
+ N("div", Ma, [
3470
+ N("div", null, [
3466
3471
  ($(!0), J(Oe, null, Ne(d.value, (k) => ($(), J("div", {
3467
3472
  key: k.value
3468
3473
  }, [
@@ -3480,15 +3485,15 @@ const Ra = {
3480
3485
  ]))), 128))
3481
3486
  ])
3482
3487
  ]),
3483
- A("div", Ma, [
3484
- o(m).rules.item.variant ? ($(), H(O, {
3488
+ N("div", Aa, [
3489
+ o(c).rules.item.variant ? ($(), H(O, {
3485
3490
  key: 0,
3486
3491
  label: o(s)("menu.common.actions.add_new_variant"),
3487
3492
  variant: "tertiary",
3488
3493
  "text-color": "primary",
3489
3494
  onClick: a[3] || (a[3] = (k) => o(_)())
3490
3495
  }, null, 8, ["label"])) : X("", !0),
3491
- A("div", Aa, [
3496
+ N("div", Na, [
3492
3497
  C(O, {
3493
3498
  label: o(s)("menu.common.actions.cancel"),
3494
3499
  variant: "tertiary",
@@ -3500,10 +3505,10 @@ const Ra = {
3500
3505
  }, null, 8, ["label"])
3501
3506
  ])
3502
3507
  ])
3503
- ])) : ($(), J("div", Na, [
3504
- A("div", La, [
3505
- A("p", Ga, ge(o(s)("menu.common.empty.no_variant.title")), 1),
3506
- A("p", Ka, ge(o(s)("menu.common.empty.no_variant.subtitle")), 1)
3508
+ ])) : ($(), J("div", La, [
3509
+ N("div", Ga, [
3510
+ N("p", Ka, ge(o(s)("menu.common.empty.no_variant.title")), 1),
3511
+ N("p", Ba, ge(o(s)("menu.common.empty.no_variant.subtitle")), 1)
3507
3512
  ]),
3508
3513
  C(O, {
3509
3514
  label: o(s)("menu.variant.add"),
@@ -3513,15 +3518,15 @@ const Ra = {
3513
3518
  ]));
3514
3519
  };
3515
3520
  }
3516
- }), za = {
3521
+ }), Ya = {
3517
3522
  class: "space-y-16"
3518
- }, Ya = {
3519
- class: "flex items-center space-x-8"
3520
3523
  }, ja = {
3521
- class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white"
3524
+ class: "flex items-center space-x-8"
3522
3525
  }, Wa = {
3526
+ class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white"
3527
+ }, qa = {
3523
3528
  class: "flex-1 fm-typo-en-body-lg-400"
3524
- }, qa = /* @__PURE__ */ ae({
3529
+ }, Ha = /* @__PURE__ */ ae({
3525
3530
  __name: "ProductVariants",
3526
3531
  props: {
3527
3532
  isOverride: {
@@ -3538,7 +3543,7 @@ const Ra = {
3538
3543
  setup(n, {
3539
3544
  emit: r
3540
3545
  }) {
3541
- const e = n, t = se(), m = Zn(), s = Ue(), g = Ge(), {
3546
+ const e = n, t = se(), c = Zn(), s = Ue(), g = Ge(), {
3542
3547
  t: d
3543
3548
  } = ce(), h = D(() => t.rules.item), w = D(() => h.value.minPrice && !!e.form.minPrice), _ = D(() => !t.state.currentCatalogId), b = D(() => t.variants.reduce((u, l) => (u[l._id] = l, u), {}));
3544
3549
  q(!1);
@@ -3575,7 +3580,7 @@ const Ra = {
3575
3580
  var u;
3576
3581
  g.open({
3577
3582
  title: "Add variant",
3578
- contentComponent: Ba,
3583
+ contentComponent: za,
3579
3584
  contentComponentProps: {
3580
3585
  selectedVariants: ((u = e.form.variant) == null ? void 0 : u.variantGroupIds) ?? []
3581
3586
  }
@@ -3584,8 +3589,8 @@ const Ra = {
3584
3589
  });
3585
3590
  }
3586
3591
  function O(u) {
3587
- var P, j;
3588
- const l = ((P = e.form.variant) == null ? void 0 : P.variantGroupIds) || [], i = (j = e.form.variant) == null ? void 0 : j.variantCombinations, y = u.split(/(?=variant)/g).map((Q) => Q.replace(/\/*$/, "")).filter((Q) => l.some((le) => Q.includes(le))).join("/");
3592
+ var P, Y;
3593
+ const l = ((P = e.form.variant) == null ? void 0 : P.variantGroupIds) || [], i = (Y = e.form.variant) == null ? void 0 : Y.variantCombinations, y = u.split(/(?=variant)/g).map((Q) => Q.replace(/\/*$/, "")).filter((Q) => l.some((le) => Q.includes(le))).join("/");
3589
3594
  return i == null ? void 0 : i.find((Q) => Q.combinationKey === y);
3590
3595
  }
3591
3596
  const k = (u) => {
@@ -3615,14 +3620,14 @@ const Ra = {
3615
3620
  const i = u.filter((y) => !!y);
3616
3621
  let v;
3617
3622
  if (i.length) {
3618
- const y = i.map((j) => t.variants.find((Q) => Q._id === j)), P = Le.fullVariantCombination(y).map(({
3619
- combinationKey: j
3623
+ const y = i.map((Y) => t.variants.find((Q) => Q._id === Y)), P = Le.fullVariantCombination(y).map(({
3624
+ combinationKey: Y
3620
3625
  }) => {
3621
3626
  var le;
3622
- const Q = (le = e.form.variant) == null ? void 0 : le.variantCombinations.find((Ce) => Ce.combinationKey === j);
3627
+ const Q = (le = e.form.variant) == null ? void 0 : le.variantCombinations.find((Ce) => Ce.combinationKey === Y);
3623
3628
  return l(Q || {
3624
3629
  _id: e.form._id,
3625
- combinationKey: j
3630
+ combinationKey: Y
3626
3631
  });
3627
3632
  });
3628
3633
  if (P.length > 100) {
@@ -3642,7 +3647,7 @@ const Ra = {
3642
3647
  takeawayUsed: null
3643
3648
  };
3644
3649
  } else {
3645
- const y = (x = e.form.variant) == null ? void 0 : x.variantCombinations.map((j) => j.takeawayUsed), P = [...new Set(y)];
3650
+ const y = (x = e.form.variant) == null ? void 0 : x.variantCombinations.map((Y) => Y.takeawayUsed), P = [...new Set(y)];
3646
3651
  a([{
3647
3652
  key: "variant",
3648
3653
  value: void 0
@@ -3655,7 +3660,7 @@ const Ra = {
3655
3660
  takeawayUsed: P.length === 1 ? P[0] : null
3656
3661
  };
3657
3662
  }
3658
- f("replace:form", m.initDynamicGroupItem(v));
3663
+ f("replace:form", c.initDynamicGroupItem(v));
3659
3664
  }
3660
3665
  async function R(u, l, i) {
3661
3666
  const v = ke.clone(e.form);
@@ -3664,7 +3669,7 @@ const Ra = {
3664
3669
  value: v.variant
3665
3670
  }]);
3666
3671
  }
3667
- const M = D(() => {
3672
+ const A = D(() => {
3668
3673
  var u, l;
3669
3674
  return ((u = t.currentCatalog) == null ? void 0 : u.priceTierRules) ?? ((l = t.currentCatalog) == null ? void 0 : l.usePriceTiers) ?? [];
3670
3675
  }), S = D(() => [{
@@ -3682,8 +3687,8 @@ const Ra = {
3682
3687
  return ve(Ie.FmTextField, {
3683
3688
  modelValue: l,
3684
3689
  placeholder: x || d("menu.product.form.variant.placeholders.no_code"),
3685
- "onUpdate:modelValue": (j) => {
3686
- R(u.row.index, "code", Qt(j, !0));
3690
+ "onUpdate:modelValue": (Y) => {
3691
+ R(u.row.index, "code", Qt(Y, !0));
3687
3692
  }
3688
3693
  });
3689
3694
  }
@@ -3712,13 +3717,13 @@ const Ra = {
3712
3717
  header: () => d("menu.product.form.variant.columns.price"),
3713
3718
  enableSorting: !1,
3714
3719
  cell: (u) => {
3715
- var y, P, j;
3720
+ var y, P, Y;
3716
3721
  const l = u.getValue(), i = u.row.original, x = ((y = i.fallback) == null ? void 0 : y.price) ?? e.form.price ?? ((P = e.fallback) == null ? void 0 : P.price);
3717
3722
  return C("div", {
3718
3723
  id: pt(Fe.VARIANT, i.combinationKey ?? ""),
3719
3724
  class: "flex items-center gap-8"
3720
3725
  }, [C(Xe, {
3721
- disable: M.value.length > 0 && t.currentCatalog && !t.currentScheduler,
3726
+ disable: A.value.length > 0 && t.currentCatalog && !t.currentScheduler,
3722
3727
  placeholder: x ? tt(x) : void 0,
3723
3728
  modelValue: l,
3724
3729
  min: 0,
@@ -3730,7 +3735,7 @@ const Ra = {
3730
3735
  }, null), t.isV4 && !e.isOverride && C(en, {
3731
3736
  "menu-store": t,
3732
3737
  "price-tiers": i.priceTiers,
3733
- fallback: (j = i.fallback) == null ? void 0 : j.priceTiers,
3738
+ fallback: (Y = i.fallback) == null ? void 0 : Y.priceTiers,
3734
3739
  "onUpdate:price-tiers": (Q) => R(u.row.index, "priceTiers", Q)
3735
3740
  }, null)]);
3736
3741
  }
@@ -3739,12 +3744,12 @@ const Ra = {
3739
3744
  header: () => d("menu.product.form.variant.columns.min_price"),
3740
3745
  enableSorting: !1,
3741
3746
  cell: (u) => {
3742
- var y, P, j;
3747
+ var y, P, Y;
3743
3748
  const l = u.getValue(), i = u.row.original, x = ((y = i.fallback) == null ? void 0 : y.minPrice) ?? e.form.minPrice ?? ((P = e.fallback) == null ? void 0 : P.minPrice);
3744
3749
  return ve(Xe, {
3745
3750
  placeholder: x ? tt(x) : void 0,
3746
3751
  modelValue: l,
3747
- max: be.Dinero.fromFdoDinero(i.price ?? ((j = i.fallback) == null ? void 0 : j.price) ?? be.Dinero.zero().toObject()).toUnit(),
3752
+ max: be.Dinero.fromFdoDinero(i.price ?? ((Y = i.fallback) == null ? void 0 : Y.price) ?? be.Dinero.zero().toObject()).toUnit(),
3748
3753
  "onUpdate:modelValue": (Q) => {
3749
3754
  R(u.row.index, "minPrice", Q);
3750
3755
  },
@@ -3761,49 +3766,49 @@ const Ra = {
3761
3766
  }) : !0;
3762
3767
  }
3763
3768
  return (u, l) => {
3764
- const i = W("fm-button"), v = W("fm-icon"), x = W("FmFormGroup"), y = W("fm-table");
3769
+ const i = j("fm-button"), v = j("fm-icon"), x = j("FmFormGroup"), y = j("fm-table");
3765
3770
  return $(), H(De, {
3766
3771
  id: o(Fe).VARIANT,
3767
3772
  title: o(d)("menu.product.form.variant.title"),
3768
3773
  "sub-title": o(d)("menu.product.form.variant.subtitle")
3769
3774
  }, {
3770
- "append-title": B(() => [o(t).rules.item.variant ? ($(), H(i, {
3775
+ "append-title": K(() => [o(t).rules.item.variant ? ($(), H(i, {
3771
3776
  key: 0,
3772
3777
  label: o(d)("menu.product.form.variant.add"),
3773
3778
  variant: "secondary",
3774
3779
  "prepend-icon": "add",
3775
3780
  onClick: F
3776
3781
  }, null, 8, ["label"])) : X("", !0)]),
3777
- default: B(() => {
3782
+ default: K(() => {
3778
3783
  var P;
3779
- return [A("div", za, [C(x, {
3784
+ return [N("div", Ya, [C(x, {
3780
3785
  "model-value": (P = u.form.variant) == null ? void 0 : P.variantGroupIds,
3781
3786
  rules: [E]
3782
3787
  }, {
3783
- default: B(() => {
3784
- var j;
3788
+ default: K(() => {
3789
+ var Y;
3785
3790
  return [C(o(Mt), {
3786
- "model-value": ((j = u.form.variant) == null ? void 0 : j.variantGroupIds) ?? [],
3791
+ "model-value": ((Y = u.form.variant) == null ? void 0 : Y.variantGroupIds) ?? [],
3787
3792
  class: "space-y-16",
3788
3793
  group: "variants",
3789
3794
  handle: ".handle",
3790
3795
  "item-key": "id",
3791
3796
  "onUpdate:modelValue": k
3792
3797
  }, {
3793
- item: B(({
3798
+ item: K(({
3794
3799
  element: Q
3795
3800
  }) => {
3796
3801
  var le;
3797
- return [A("div", Ya, [C(i, {
3802
+ return [N("div", ja, [C(i, {
3798
3803
  variant: o(qe).Tertiary,
3799
3804
  class: "handle",
3800
3805
  "prepend-icon": "drag_handle"
3801
- }, null, 8, ["variant"]), A("div", ja, [A("p", Wa, ge((le = b.value[Q]) == null ? void 0 : le.name), 1), C(v, {
3806
+ }, null, 8, ["variant"]), N("div", Wa, [N("p", qa, ge((le = b.value[Q]) == null ? void 0 : le.name), 1), C(v, {
3802
3807
  class: "cursor-pointer",
3803
3808
  name: "close",
3804
3809
  onClick: He((Ce) => {
3805
3810
  var he;
3806
- return T(((he = u.form.variant) == null ? void 0 : he.variantGroupIds.filter((c) => c !== Q)) ?? []);
3811
+ return T(((he = u.form.variant) == null ? void 0 : he.variantGroupIds.filter((m) => m !== Q)) ?? []);
3807
3812
  }, ["stop"])
3808
3813
  }, null, 8, ["onClick"])])])];
3809
3814
  }),
@@ -3812,7 +3817,7 @@ const Ra = {
3812
3817
  }),
3813
3818
  _: 1
3814
3819
  }, 8, ["model-value", "rules"]), C(rn, null, {
3815
- default: B(() => [p.value.length ? ($(), H(y, {
3820
+ default: K(() => [p.value.length ? ($(), H(y, {
3816
3821
  key: 0,
3817
3822
  class: "w-full",
3818
3823
  "column-defs": S.value,
@@ -3829,28 +3834,28 @@ const Ra = {
3829
3834
  }, 8, ["id", "title", "sub-title"]);
3830
3835
  };
3831
3836
  }
3832
- }), Ha = {
3837
+ }), Xa = {
3833
3838
  key: 0,
3834
3839
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3835
- }, Xa = {
3840
+ }, Ja = {
3836
3841
  key: 2,
3837
3842
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3838
- }, Ja = {
3843
+ }, Qa = {
3839
3844
  key: 3,
3840
3845
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3841
- }, Qa = {
3846
+ }, Za = {
3842
3847
  key: 5,
3843
3848
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3844
- }, Za = {
3849
+ }, el = {
3845
3850
  key: 6,
3846
3851
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3847
- }, el = {
3852
+ }, tl = {
3848
3853
  key: 8,
3849
3854
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3850
- }, tl = {
3855
+ }, nl = {
3851
3856
  key: 10,
3852
3857
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3853
- }, nl = /* @__PURE__ */ ae({
3858
+ }, ol = /* @__PURE__ */ ae({
3854
3859
  __name: "ItemForm",
3855
3860
  props: {
3856
3861
  initialForm: {},
@@ -3862,28 +3867,28 @@ const Ra = {
3862
3867
  emits: ["update:editingState"],
3863
3868
  setup(n, { expose: r, emit: e }) {
3864
3869
  var ne, ee, pe, Ee, Ve;
3865
- const t = n, m = e, s = rt(), g = se(), { t: d } = ce();
3870
+ const t = n, c = e, s = rt(), g = se(), { t: d } = ce();
3866
3871
  D(() => {
3867
- var K;
3868
- return (K = t.initialForm) != null && K._id ? d("menu.product.form.title.update") : d("menu.product.form.title.add");
3872
+ var G;
3873
+ return (G = t.initialForm) != null && G._id ? d("menu.product.form.title.update") : d("menu.product.form.title.add");
3869
3874
  });
3870
3875
  const h = at(), w = D(() => {
3871
3876
  var ue, ie;
3872
- const K = (ue = t.initialForm) != null && ue._id ? h.getNodeById((ie = t.initialForm) == null ? void 0 : ie._id) : null;
3873
- if (!K)
3877
+ const G = (ue = t.initialForm) != null && ue._id ? h.getNodeById((ie = t.initialForm) == null ? void 0 : ie._id) : null;
3878
+ if (!G)
3874
3879
  return [];
3875
- const Y = [];
3876
- let re = K;
3880
+ const z = [];
3881
+ let re = G;
3877
3882
  for (; re; )
3878
- Y.push({
3883
+ z.push({
3879
3884
  label: re.label,
3880
3885
  route: ""
3881
3886
  }), re = re.parent;
3882
- return Y.reverse();
3887
+ return z.reverse();
3883
3888
  }), _ = q(null);
3884
3889
  Ae(() => {
3885
- var K;
3886
- (K = _.value) == null || K.setSelectedItemIndex(w.value.length - 1);
3890
+ var G;
3891
+ (G = _.value) == null || G.setSelectedItemIndex(w.value.length - 1);
3887
3892
  });
3888
3893
  const b = D(() => g.rules.item), f = q(), a = q(
3889
3894
  t.initialForm ? me(t.initialForm) : {
@@ -3892,17 +3897,17 @@ const Ra = {
3892
3897
  }
3893
3898
  ), I = D(
3894
3899
  () => {
3895
- var K;
3896
- return $t(t.menu.modules.variant, (K = a.value.variant) == null ? void 0 : K.variantGroupIds);
3900
+ var G;
3901
+ return $t(t.menu.modules.variant, (G = a.value.variant) == null ? void 0 : G.variantGroupIds);
3897
3902
  }
3898
- ), F = (K, Y) => {
3903
+ ), F = (G, z) => {
3899
3904
  var re;
3900
- ke.isEqual(((re = a.value) == null ? void 0 : re[K]) || {}, Y) || (a.value = {
3905
+ ke.isEqual(((re = a.value) == null ? void 0 : re[G]) || {}, z) || (a.value = {
3901
3906
  ...me(a.value),
3902
- [K]: Y
3903
- }, c());
3904
- }, O = (K) => {
3905
- a.value = K, c();
3907
+ [G]: z
3908
+ }, m());
3909
+ }, O = (G) => {
3910
+ a.value = G, m();
3906
3911
  };
3907
3912
  async function k() {
3908
3913
  f.value = a.value._id && p.value ? (await vo(
@@ -3916,47 +3921,47 @@ const Ra = {
3916
3921
  const p = D(
3917
3922
  () => !!g.state.currentCatalogId || !!g.state.currentSchedulerId
3918
3923
  ), T = D(() => {
3919
- var K;
3920
- return p.value ? a.value.category == "" || a.value.category == null && ((K = f.value) == null ? void 0 : K.category) == null : Cn(t.menu) && a.value.category == null;
3921
- }), R = D(() => s.itemAttributeSettings.value.length > 0 && !p.value), M = q(
3924
+ var G;
3925
+ return p.value ? a.value.category == "" || a.value.category == null && ((G = f.value) == null ? void 0 : G.category) == null : Cn(t.menu) && a.value.category == null;
3926
+ }), R = D(() => s.itemAttributeSettings.value.length > 0 && !p.value), A = q(
3922
3927
  a.value.category != null || !!a.value.code || !!a.value.orderFrom
3923
3928
  );
3924
- function S(K) {
3925
- K || (a.value = {
3929
+ function S(G) {
3930
+ G || (a.value = {
3926
3931
  ...a.value,
3927
3932
  name: void 0,
3928
3933
  category: void 0,
3929
3934
  code: void 0,
3930
3935
  orderFrom: void 0
3931
- }, c());
3936
+ }, m());
3932
3937
  }
3933
3938
  const U = D(() => {
3934
- const K = {};
3935
- return t.menu.modules.item.forEach((Y) => {
3939
+ const G = {};
3940
+ return t.menu.modules.item.forEach((z) => {
3936
3941
  var re;
3937
- for (const [ue, ie] of Object.entries(Y.customAttributes || {}))
3938
- typeof ie == "string" && ie && !((re = K[ue]) != null && re.includes(ie)) && (K[ue] = [...K[ue] || [], ie]);
3939
- }), K;
3942
+ for (const [ue, ie] of Object.entries(z.customAttributes || {}))
3943
+ typeof ie == "string" && ie && !((re = G[ue]) != null && re.includes(ie)) && (G[ue] = [...G[ue] || [], ie]);
3944
+ }), G;
3940
3945
  }), E = q(!!a.value.price || !!a.value.minPrice || !!a.value.costing);
3941
- function u(K) {
3942
- K || (a.value = {
3946
+ function u(G) {
3947
+ G || (a.value = {
3943
3948
  ...a.value,
3944
3949
  costing: void 0,
3945
3950
  minPrice: void 0,
3946
3951
  price: void 0
3947
- }, c());
3952
+ }, m());
3948
3953
  }
3949
3954
  const l = q(
3950
3955
  (((ne = a.value.variant) == null ? void 0 : ne.variantCombinations) || []).some(
3951
- (K) => !!K.price || !!K.orderFrom || !!K.code
3956
+ (G) => !!G.price || !!G.orderFrom || !!G.code
3952
3957
  )
3953
3958
  );
3954
- function i(K) {
3955
- var Y, re, ue;
3956
- K || (a.value = {
3959
+ function i(G) {
3960
+ var z, re, ue;
3961
+ G || (a.value = {
3957
3962
  ...a.value,
3958
3963
  variant: {
3959
- variantGroupIds: ((Y = a.value.variant) == null ? void 0 : Y.variantGroupIds) || [],
3964
+ variantGroupIds: ((z = a.value.variant) == null ? void 0 : z.variantGroupIds) || [],
3960
3965
  variantCombinations: ((ue = (re = a.value.variant) == null ? void 0 : re.variantCombinations) == null ? void 0 : ue.map((ie) => ({
3961
3966
  ...ie,
3962
3967
  price: void 0,
@@ -3964,69 +3969,69 @@ const Ra = {
3964
3969
  code: void 0
3965
3970
  }))) || []
3966
3971
  }
3967
- }, c());
3972
+ }, m());
3968
3973
  }
3969
3974
  const v = q(
3970
- !!a.value.inventoryBindings || (((ee = a.value.variant) == null ? void 0 : ee.variantCombinations) || []).some((K) => !!K.inventoryBindings) || !1
3975
+ !!a.value.inventoryBindings || (((ee = a.value.variant) == null ? void 0 : ee.variantCombinations) || []).some((G) => !!G.inventoryBindings) || !1
3971
3976
  );
3972
- function x(K) {
3973
- var Y, re, ue;
3974
- K || (a.value = {
3977
+ function x(G) {
3978
+ var z, re, ue;
3979
+ G || (a.value = {
3975
3980
  ...a.value,
3976
3981
  inventoryBindings: void 0,
3977
3982
  variant: a.value.variant ? {
3978
- variantGroupIds: ((Y = a.value.variant) == null ? void 0 : Y.variantGroupIds) || [],
3983
+ variantGroupIds: ((z = a.value.variant) == null ? void 0 : z.variantGroupIds) || [],
3979
3984
  variantCombinations: ((ue = (re = a.value.variant) == null ? void 0 : re.variantCombinations) == null ? void 0 : ue.map((ie) => ({
3980
3985
  ...ie,
3981
3986
  inventoryBindings: void 0
3982
3987
  }))) || []
3983
3988
  } : void 0
3984
- }, c());
3989
+ }, m());
3985
3990
  }
3986
3991
  const y = q(
3987
- a.value.takeawayUsed != null || (((pe = a.value.variant) == null ? void 0 : pe.variantCombinations) || []).some((K) => K.takeawayUsed != null) || !1
3992
+ a.value.takeawayUsed != null || (((pe = a.value.variant) == null ? void 0 : pe.variantCombinations) || []).some((G) => G.takeawayUsed != null) || !1
3988
3993
  );
3989
- function P(K) {
3990
- var Y, re;
3991
- K || (a.value = {
3994
+ function P(G) {
3995
+ var z, re;
3996
+ G || (a.value = {
3992
3997
  ...a.value,
3993
3998
  takeawayUsed: void 0,
3994
3999
  variant: {
3995
- variantGroupIds: ((Y = a.value.variant) == null ? void 0 : Y.variantGroupIds) || [],
4000
+ variantGroupIds: ((z = a.value.variant) == null ? void 0 : z.variantGroupIds) || [],
3996
4001
  variantCombinations: ((re = a.value.variant) == null ? void 0 : re.variantCombinations.map((ue) => ({
3997
4002
  ...ue,
3998
4003
  takeawayUsed: void 0
3999
4004
  }))) || []
4000
4005
  }
4001
- }, c());
4006
+ }, m());
4002
4007
  }
4003
- const j = q(!!a.value.print);
4004
- function Q(K) {
4005
- K || (a.value = { ...a.value, print: void 0 }, c());
4008
+ const Y = q(!!a.value.print);
4009
+ function Q(G) {
4010
+ G || (a.value = { ...a.value, print: void 0 }, m());
4006
4011
  }
4007
4012
  const le = q(
4008
- !!((Ee = a.value.groups) != null && Ee.length) != null || (((Ve = a.value.variant) == null ? void 0 : Ve.variantCombinations) || []).some((K) => {
4009
- var Y;
4010
- return !!((Y = K.groups) != null && Y.length);
4013
+ !!((Ee = a.value.groups) != null && Ee.length) != null || (((Ve = a.value.variant) == null ? void 0 : Ve.variantCombinations) || []).some((G) => {
4014
+ var z;
4015
+ return !!((z = G.groups) != null && z.length);
4011
4016
  }) || !1
4012
4017
  );
4013
- function Ce(K) {
4014
- var Y, re;
4015
- K || (a.value = {
4018
+ function Ce(G) {
4019
+ var z, re;
4020
+ G || (a.value = {
4016
4021
  ...a.value,
4017
4022
  groups: [],
4018
4023
  variant: {
4019
- variantGroupIds: ((Y = a.value.variant) == null ? void 0 : Y.variantGroupIds) || [],
4024
+ variantGroupIds: ((z = a.value.variant) == null ? void 0 : z.variantGroupIds) || [],
4020
4025
  variantCombinations: ((re = a.value.variant) == null ? void 0 : re.variantCombinations.map((ue) => ({
4021
4026
  ...ue,
4022
4027
  groups: []
4023
4028
  }))) || []
4024
4029
  }
4025
- }, c());
4030
+ }, m());
4026
4031
  }
4027
4032
  ye(() => {
4028
- var K;
4029
- return (K = a.value.price) == null ? void 0 : K.amount;
4033
+ var G;
4034
+ return (G = a.value.price) == null ? void 0 : G.amount;
4030
4035
  }, k, { deep: !0 });
4031
4036
  function he() {
4032
4037
  a.value = t.initialForm ? me(t.initialForm) : {
@@ -4040,10 +4045,10 @@ const Ra = {
4040
4045
  t.initialForm && he();
4041
4046
  }
4042
4047
  ), Ae(() => {
4043
- var K, Y;
4048
+ var G, z;
4044
4049
  he(), k(), We.startSession({
4045
- userId: ((K = s.sessionUser.value) == null ? void 0 : K.id) || "",
4046
- businessId: (Y = s.currentBusiness.value) == null ? void 0 : Y.id,
4050
+ userId: ((G = s.sessionUser.value) == null ? void 0 : G.id) || "",
4051
+ businessId: (z = s.currentBusiness.value) == null ? void 0 : z.id,
4047
4052
  input: a.value
4048
4053
  }), s.pushDataLayer(
4049
4054
  {
@@ -4055,47 +4060,47 @@ const Ra = {
4055
4060
  }), Ot(() => {
4056
4061
  try {
4057
4062
  wn(), We.closeSession();
4058
- } catch (K) {
4059
- console.log(K);
4063
+ } catch (G) {
4064
+ console.log(G);
4060
4065
  }
4061
4066
  });
4062
- function c() {
4063
- m("update:editingState", ke.cloneDeep(a.value));
4067
+ function m() {
4068
+ c("update:editingState", ke.cloneDeep(a.value));
4064
4069
  }
4065
4070
  const V = q(null);
4066
- function N() {
4071
+ function L() {
4067
4072
  return !ke.isEqual(a.value, t.initialForm);
4068
4073
  }
4069
- function G() {
4070
- var K;
4071
- return (K = V.value) == null ? void 0 : K.validateInputsWithoutSubmit();
4074
+ function W() {
4075
+ var G;
4076
+ return (G = V.value) == null ? void 0 : G.validateInputsWithoutSubmit();
4072
4077
  }
4073
- function L() {
4078
+ function M() {
4074
4079
  return a.value;
4075
4080
  }
4076
- async function z(K, Y = !1) {
4077
- const re = document.getElementById(K);
4081
+ async function B(G, z = !1) {
4082
+ const re = document.getElementById(G);
4078
4083
  if (re) {
4079
- if (re.scrollIntoView({ behavior: "smooth" }), Y) {
4084
+ if (re.scrollIntoView({ behavior: "smooth" }), z) {
4080
4085
  const ue = re.tagName === "INPUT" || re.tagName === "BUTTON" || re.tagName === "TEXTAREA";
4081
4086
  await new Promise((Te) => setTimeout(Te, 500));
4082
4087
  const ie = ue ? re : re.querySelector("input, button, textarea");
4083
4088
  ie && (ie == null || ie.focus());
4084
4089
  }
4085
4090
  } else
4086
- console.warn(`Element with id ${K} not found`);
4091
+ console.warn(`Element with id ${G} not found`);
4087
4092
  }
4088
- function oe(K) {
4089
- K.type === "general" ? z(Fe.GENERAL) : K.type === "price" ? z(Fe.PRICE, !0) : K.type === "variant" ? z(pt(Fe.VARIANT, K.id), !0) : K.type === "group" && z(pt(Fe.GROUP, K.id), !0);
4093
+ function oe(G) {
4094
+ G.type === "general" ? B(Fe.GENERAL) : G.type === "price" ? B(Fe.PRICE, !0) : G.type === "variant" ? B(pt(Fe.VARIANT, G.id), !0) : G.type === "group" && B(pt(Fe.GROUP, G.id), !0);
4090
4095
  }
4091
4096
  return On(() => {
4092
4097
  t.focused && oe(t.focused);
4093
4098
  }), r({
4094
- validate: G,
4095
- getData: L,
4096
- hasUnsavedChanges: N
4097
- }), (K, Y) => {
4098
- const re = W("FmBreadcrumb"), ue = W("FmForm");
4099
+ validate: W,
4100
+ getData: M,
4101
+ hasUnsavedChanges: L
4102
+ }), (G, z) => {
4103
+ const re = j("FmBreadcrumb"), ue = j("FmForm");
4099
4104
  return $(), H(ue, {
4100
4105
  id: o(Fe).GENERAL,
4101
4106
  class: fe(["tree-item-form", ["flex-1 py-24 space-y-24", "xs:w-full"]]),
@@ -4103,7 +4108,7 @@ const Ra = {
4103
4108
  ref: V,
4104
4109
  "blame-form-child-on-validation-failed": !0
4105
4110
  }, {
4106
- default: B(() => {
4111
+ default: K(() => {
4107
4112
  var ie, Te;
4108
4113
  return [
4109
4114
  C(re, {
@@ -4113,19 +4118,19 @@ const Ra = {
4113
4118
  }, null, 8, ["items"]),
4114
4119
  C(bo, { "menu-store": o(g) }, null, 8, ["menu-store"]),
4115
4120
  C(Be, {
4116
- toggle: M.value,
4121
+ toggle: A.value,
4117
4122
  "onUpdate:toggle": [
4118
- Y[0] || (Y[0] = (Z) => M.value = Z),
4119
- Y[1] || (Y[1] = (Z) => S(Z))
4123
+ z[0] || (z[0] = (Z) => A.value = Z),
4124
+ z[1] || (z[1] = (Z) => S(Z))
4120
4125
  ],
4121
4126
  disabled: !p.value,
4122
4127
  description: o(d)("menu.product.form.sections.general.description"),
4123
4128
  title: o(d)("menu.product.form.sections.general.title")
4124
4129
  }, {
4125
- default: B(() => {
4130
+ default: K(() => {
4126
4131
  var Z;
4127
4132
  return [
4128
- C(Vr, {
4133
+ C($r, {
4129
4134
  fallback: f.value,
4130
4135
  form: a.value,
4131
4136
  "is-addon": T.value,
@@ -4137,35 +4142,35 @@ const Ra = {
4137
4142
  }),
4138
4143
  _: 1
4139
4144
  }, 8, ["toggle", "disabled", "description", "title"]),
4140
- p.value ? X("", !0) : ($(), J("div", Ha)),
4145
+ p.value ? X("", !0) : ($(), J("div", Xa)),
4141
4146
  R.value ? ($(), H(De, {
4142
4147
  key: 1,
4143
4148
  title: o(d)("menu.product.form.sections.tagging.title"),
4144
4149
  "sub-title": o(d)("menu.product.form.sections.tagging.subtitle")
4145
4150
  }, {
4146
- default: B(() => [
4151
+ default: K(() => [
4147
4152
  C(o(sn), {
4148
4153
  entity: "item",
4149
4154
  "model-value": a.value.customAttributes || {},
4150
- "onUpdate:modelValue": Y[2] || (Y[2] = (Z) => F("customAttributes", Z)),
4155
+ "onUpdate:modelValue": z[2] || (z[2] = (Z) => F("customAttributes", Z)),
4151
4156
  "value-options": U.value
4152
4157
  }, null, 8, ["model-value", "value-options"])
4153
4158
  ]),
4154
4159
  _: 1
4155
4160
  }, 8, ["title", "sub-title"])) : X("", !0),
4156
- R.value ? ($(), J("div", Xa)) : X("", !0),
4161
+ R.value ? ($(), J("div", Ja)) : X("", !0),
4157
4162
  C(Be, {
4158
4163
  toggle: E.value,
4159
4164
  "onUpdate:toggle": [
4160
- Y[3] || (Y[3] = (Z) => E.value = Z),
4161
- Y[4] || (Y[4] = (Z) => u(Z))
4165
+ z[3] || (z[3] = (Z) => E.value = Z),
4166
+ z[4] || (z[4] = (Z) => u(Z))
4162
4167
  ],
4163
4168
  disabled: !p.value,
4164
4169
  description: o(d)("menu.product.form.sections.price.description"),
4165
4170
  title: o(d)("menu.product.form.sections.price.title")
4166
4171
  }, {
4167
- default: B(() => [
4168
- C(ha, {
4172
+ default: K(() => [
4173
+ C(wa, {
4169
4174
  fallback: f.value,
4170
4175
  form: a.value,
4171
4176
  "is-addon": T.value,
@@ -4175,126 +4180,126 @@ const Ra = {
4175
4180
  ]),
4176
4181
  _: 1
4177
4182
  }, 8, ["toggle", "disabled", "description", "title"]),
4178
- b.value.print && !p.value ? ($(), J("div", Ja)) : X("", !0),
4183
+ b.value.print && !p.value ? ($(), J("div", Qa)) : X("", !0),
4179
4184
  b.value.print ? ($(), H(Be, {
4180
4185
  key: 4,
4181
- toggle: j.value,
4186
+ toggle: Y.value,
4182
4187
  "onUpdate:toggle": [
4183
- Y[6] || (Y[6] = (Z) => j.value = Z),
4184
- Y[7] || (Y[7] = (Z) => Q(Z))
4188
+ z[6] || (z[6] = (Z) => Y.value = Z),
4189
+ z[7] || (z[7] = (Z) => Q(Z))
4185
4190
  ],
4186
4191
  description: "Use a different print setting",
4187
4192
  disabled: "",
4188
4193
  title: "Update print"
4189
4194
  }, {
4190
- default: B(() => [
4191
- C(Ea, {
4195
+ default: K(() => [
4196
+ C(Ta, {
4192
4197
  fallback: f.value,
4193
4198
  form: a.value,
4194
4199
  "full-combinations": I.value,
4195
4200
  "is-addon": T.value,
4196
4201
  "is-override": p.value,
4197
4202
  "onUpdate:form": F,
4198
- "onReplace:form": Y[5] || (Y[5] = (Z) => O(Z))
4203
+ "onReplace:form": z[5] || (z[5] = (Z) => O(Z))
4199
4204
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4200
4205
  ]),
4201
4206
  _: 1
4202
4207
  }, 8, ["toggle"])) : X("", !0),
4203
- p.value ? X("", !0) : ($(), J("div", Qa)),
4208
+ p.value ? X("", !0) : ($(), J("div", Za)),
4204
4209
  C(Be, {
4205
4210
  toggle: l.value,
4206
4211
  "onUpdate:toggle": [
4207
- Y[9] || (Y[9] = (Z) => l.value = Z),
4208
- Y[10] || (Y[10] = (Z) => i(Z))
4212
+ z[9] || (z[9] = (Z) => l.value = Z),
4213
+ z[10] || (z[10] = (Z) => i(Z))
4209
4214
  ],
4210
4215
  disabled: !p.value,
4211
4216
  description: o(d)("menu.product.form.sections.variant.description"),
4212
4217
  title: o(d)("menu.product.form.sections.variant.title")
4213
4218
  }, {
4214
- default: B(() => [
4215
- C(qa, {
4219
+ default: K(() => [
4220
+ C(Ha, {
4216
4221
  fallback: f.value,
4217
4222
  form: a.value,
4218
4223
  "full-combinations": I.value,
4219
4224
  "is-addon": T.value,
4220
4225
  "is-override": p.value,
4221
4226
  "onUpdate:form": F,
4222
- "onReplace:form": Y[8] || (Y[8] = (Z) => O(Z))
4227
+ "onReplace:form": z[8] || (z[8] = (Z) => O(Z))
4223
4228
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4224
4229
  ]),
4225
4230
  _: 1
4226
4231
  }, 8, ["toggle", "disabled", "description", "title"]),
4227
- b.value.group && !p.value ? ($(), J("div", Za)) : X("", !0),
4232
+ b.value.group && !p.value ? ($(), J("div", el)) : X("", !0),
4228
4233
  b.value.group ? ($(), H(Be, {
4229
4234
  key: 7,
4230
4235
  toggle: le.value,
4231
4236
  "onUpdate:toggle": [
4232
- Y[12] || (Y[12] = (Z) => le.value = Z),
4233
- Y[13] || (Y[13] = (Z) => Ce(Z))
4237
+ z[12] || (z[12] = (Z) => le.value = Z),
4238
+ z[13] || (z[13] = (Z) => Ce(Z))
4234
4239
  ],
4235
4240
  disabled: !p.value,
4236
4241
  description: "Use a different group setting",
4237
4242
  title: "Update group"
4238
4243
  }, {
4239
- default: B(() => [
4240
- C(oa, {
4244
+ default: K(() => [
4245
+ C(ra, {
4241
4246
  fallback: f.value,
4242
4247
  form: a.value,
4243
4248
  "full-combinations": I.value,
4244
4249
  "is-addon": T.value,
4245
4250
  "is-override": p.value,
4246
4251
  "onUpdate:form": F,
4247
- "onReplace:form": Y[11] || (Y[11] = (Z) => O(Z))
4252
+ "onReplace:form": z[11] || (z[11] = (Z) => O(Z))
4248
4253
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4249
4254
  ]),
4250
4255
  _: 1
4251
4256
  }, 8, ["toggle", "disabled"])) : X("", !0),
4252
- b.value.inventory && !p.value ? ($(), J("div", el)) : X("", !0),
4257
+ b.value.inventory && !p.value ? ($(), J("div", tl)) : X("", !0),
4253
4258
  b.value.inventory ? ($(), H(Be, {
4254
4259
  key: 9,
4255
4260
  toggle: v.value,
4256
4261
  "onUpdate:toggle": [
4257
- Y[15] || (Y[15] = (Z) => v.value = Z),
4258
- Y[16] || (Y[16] = (Z) => x(Z))
4262
+ z[15] || (z[15] = (Z) => v.value = Z),
4263
+ z[16] || (z[16] = (Z) => x(Z))
4259
4264
  ],
4260
4265
  disabled: !p.value,
4261
4266
  description: o(d)("menu.product.form.sections.inventory.description"),
4262
4267
  title: o(d)("menu.product.form.sections.inventory.title")
4263
4268
  }, {
4264
- default: B(() => [
4265
- C(la, {
4269
+ default: K(() => [
4270
+ C(ia, {
4266
4271
  fallback: f.value,
4267
4272
  form: a.value,
4268
4273
  "full-combinations": I.value,
4269
4274
  "is-addon": T.value,
4270
4275
  "is-override": p.value,
4271
4276
  "onUpdate:form": F,
4272
- "onReplace:form": Y[14] || (Y[14] = (Z) => O(Z))
4277
+ "onReplace:form": z[14] || (z[14] = (Z) => O(Z))
4273
4278
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4274
4279
  ]),
4275
4280
  _: 1
4276
4281
  }, 8, ["toggle", "disabled", "description", "title"])) : X("", !0),
4277
- b.value.takeaway(a.value.category ?? ((ie = f.value) == null ? void 0 : ie.category)) && !p.value ? ($(), J("div", tl)) : X("", !0),
4282
+ b.value.takeaway(a.value.category ?? ((ie = f.value) == null ? void 0 : ie.category)) && !p.value ? ($(), J("div", nl)) : X("", !0),
4278
4283
  b.value.takeaway(a.value.category ?? ((Te = f.value) == null ? void 0 : Te.category)) ? ($(), H(Be, {
4279
4284
  key: 11,
4280
4285
  toggle: y.value,
4281
4286
  "onUpdate:toggle": [
4282
- Y[18] || (Y[18] = (Z) => y.value = Z),
4283
- Y[19] || (Y[19] = (Z) => P(Z))
4287
+ z[18] || (z[18] = (Z) => y.value = Z),
4288
+ z[19] || (z[19] = (Z) => P(Z))
4284
4289
  ],
4285
4290
  disabled: !p.value,
4286
4291
  description: o(d)("menu.product.form.sections.takeaway.description"),
4287
4292
  title: o(d)("menu.product.form.sections.takeaway.title")
4288
4293
  }, {
4289
- default: B(() => [
4290
- C(Ta, {
4294
+ default: K(() => [
4295
+ C(xa, {
4291
4296
  fallback: f.value,
4292
4297
  form: a.value,
4293
4298
  "full-combinations": I.value,
4294
4299
  "is-addon": T.value,
4295
4300
  "is-override": p.value,
4296
4301
  "onUpdate:form": F,
4297
- "onReplace:form": Y[17] || (Y[17] = (Z) => O(Z))
4302
+ "onReplace:form": z[17] || (z[17] = (Z) => O(Z))
4298
4303
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4299
4304
  ]),
4300
4305
  _: 1
@@ -4306,15 +4311,15 @@ const Ra = {
4306
4311
  };
4307
4312
  }
4308
4313
  });
4309
- function ol(n) {
4310
- const { storageKey: r, defaultWidth: e, minWidth: t, maxWidth: m } = n, s = jo(r, e), g = q(!1), d = q(null);
4314
+ function rl(n) {
4315
+ const { storageKey: r, defaultWidth: e, minWidth: t, maxWidth: c } = n, s = jo(r, e), g = q(!1), d = q(null);
4311
4316
  function h(b) {
4312
4317
  b.preventDefault(), g.value = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", _), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
4313
4318
  }
4314
4319
  function w(b) {
4315
4320
  if (g.value && d.value) {
4316
4321
  const f = d.value.getBoundingClientRect(), a = b.clientX - f.left;
4317
- a >= t && a <= m && (s.value = a);
4322
+ a >= t && a <= c && (s.value = a);
4318
4323
  }
4319
4324
  }
4320
4325
  function _() {
@@ -4330,62 +4335,62 @@ function ol(n) {
4330
4335
  stopResize: _
4331
4336
  };
4332
4337
  }
4333
- const rl = {
4338
+ const al = {
4334
4339
  class: "h-full relative bg-fm-color-neutral-gray-100",
4335
4340
  style: { width: "1px" }
4336
- }, al = { class: "flex-1 pr-24" }, ll = {
4341
+ }, ll = { class: "flex-1 pr-24" }, il = {
4337
4342
  key: 0,
4338
4343
  class: "absolute inset-0 flex items-center justify-center bg-white bg-opacity-70"
4339
- }, il = "tree-editor-left-panel-width", sl = 300, ul = 600, dl = 300, cl = /* @__PURE__ */ ae({
4344
+ }, sl = "tree-editor-left-panel-width", ul = 300, dl = 600, cl = 300, ml = /* @__PURE__ */ ae({
4340
4345
  __name: "TreeEditorLayout",
4341
4346
  setup(n) {
4342
4347
  const {
4343
4348
  panelWidth: r,
4344
4349
  containerRef: e,
4345
4350
  startResize: t
4346
- } = ol({
4347
- storageKey: il,
4348
- defaultWidth: dl,
4349
- minWidth: sl,
4350
- maxWidth: ul
4351
+ } = rl({
4352
+ storageKey: sl,
4353
+ defaultWidth: cl,
4354
+ minWidth: ul,
4355
+ maxWidth: dl
4351
4356
  });
4352
- return (m, s) => ($(), J("div", {
4357
+ return (c, s) => ($(), J("div", {
4353
4358
  ref_key: "containerRef",
4354
4359
  ref: e,
4355
4360
  class: "flex h-full relative"
4356
4361
  }, [
4357
- A("div", {
4362
+ N("div", {
4358
4363
  style: ct({ width: `${o(r)}px`, backgroundColor: "#FDFDFE" }),
4359
4364
  class: "flex-shrink-0 pl-24"
4360
4365
  }, [
4361
- Me(m.$slots, "left-panel", {}, void 0, !0)
4366
+ Me(c.$slots, "left-panel", {}, void 0, !0)
4362
4367
  ], 4),
4363
- A("div", rl, [
4364
- A("div", {
4368
+ N("div", al, [
4369
+ N("div", {
4365
4370
  class: "absolute left-[-3px] right-[-3px] top-0 bottom-0 resize-handle z-10",
4366
4371
  onMousedown: s[0] || (s[0] = //@ts-ignore
4367
4372
  (...g) => o(t) && o(t)(...g))
4368
4373
  }, null, 32)
4369
4374
  ]),
4370
- A("div", al, [
4371
- Me(m.$slots, "right-panel", {}, void 0, !0)
4375
+ N("div", ll, [
4376
+ Me(c.$slots, "right-panel", {}, void 0, !0)
4372
4377
  ]),
4373
- m.$slots.overlay ? ($(), J("div", ll, [
4374
- Me(m.$slots, "overlay", {}, void 0, !0)
4378
+ c.$slots.overlay ? ($(), J("div", il, [
4379
+ Me(c.$slots, "overlay", {}, void 0, !0)
4375
4380
  ])) : X("", !0)
4376
4381
  ], 512));
4377
4382
  }
4378
- }), ml = /* @__PURE__ */ Ze(cl, [["__scopeId", "data-v-570141b0"]]);
4383
+ }), pl = /* @__PURE__ */ Ze(ml, [["__scopeId", "data-v-570141b0"]]);
4379
4384
  var we = /* @__PURE__ */ ((n) => (n.SELECT_CATEGORY = "SELECT_CATEGORY", n.CREATE_CATEGORY = "CREATE_CATEGORY", n.UPDATE_CATEGORY = "UPDATE_CATEGORY", n.DELETE_CATEGORY = "DELETE_CATEGORY", n.SELECT_ITEM = "SELECT_ITEM", n.CREATE_ITEM = "CREATE_ITEM", n.UPDATE_ITEM = "UPDATE_ITEM", n.DELETE_ITEM = "DELETE_ITEM", n.SELECT_PRICE = "SELECT_PRICE", n.SELECT_VARIANT = "SELECT_VARIANT", n.SELECT_GROUP = "SELECT_GROUP", n.EDIT_GROUP = "EDIT_GROUP", n))(we || {});
4380
- function pl(n, r, e) {
4385
+ function fl(n, r, e) {
4381
4386
  const t = () => ({
4382
4387
  position: 0,
4383
4388
  subCategoryMeta: {}
4384
- }), m = mt(n);
4385
- let s = m;
4389
+ }), c = mt(n);
4390
+ let s = c;
4386
4391
  for (const g of r)
4387
4392
  s.subCategoryMeta = s.subCategoryMeta ?? {}, s.subCategoryMeta[g] = s.subCategoryMeta[g] ?? t(), s = s.subCategoryMeta[g];
4388
- return Object.assign(s, e), m;
4393
+ return Object.assign(s, e), c;
4389
4394
  }
4390
4395
  function kn() {
4391
4396
  const n = se(), r = Ue();
@@ -4412,7 +4417,7 @@ function kn() {
4412
4417
  data: d._id
4413
4418
  });
4414
4419
  }
4415
- async function m(d) {
4420
+ async function c(d) {
4416
4421
  await n.updateMenu({
4417
4422
  module: te.F_MENU_MODULE_V4_KEY.enum.item,
4418
4423
  operation: _e.F_OPERATION_TYPE.rearrange,
@@ -4442,7 +4447,7 @@ function kn() {
4442
4447
  Object.assign(k, T);
4443
4448
  }
4444
4449
  } else if (F.type === "subCategory")
4445
- b = pl(b, [...w, F.id], {
4450
+ b = fl(b, [...w, F.id], {
4446
4451
  position: O
4447
4452
  });
4448
4453
  else
@@ -4462,20 +4467,20 @@ function kn() {
4462
4467
  return {
4463
4468
  createItem: e,
4464
4469
  deleteItem: t,
4465
- rearrange: m,
4470
+ rearrange: c,
4466
4471
  rearrangeWithSubCategory: s,
4467
4472
  updateItem: g
4468
4473
  };
4469
4474
  }
4470
4475
  var et = /* @__PURE__ */ ((n) => (n.CATEGORY = "category", n.ITEM = "item", n.SUB_CATEGORY = "subCategory", n))(et || {});
4471
4476
  const ut = /* @__PURE__ */ new Map(), dt = /* @__PURE__ */ new Map();
4472
- function fl() {
4473
- const { t: n } = ce(), r = se(), e = gt(), t = kn(), m = D(
4477
+ function gl() {
4478
+ const { t: n } = ce(), r = se(), e = gt(), t = kn(), c = D(
4474
4479
  () => r.subcategories.reduce((a, I) => (a[I._id] = I, a), {})
4475
4480
  );
4476
4481
  function s(a) {
4477
4482
  var I;
4478
- return ((I = m.value[a]) == null ? void 0 : I.name) || a;
4483
+ return ((I = c.value[a]) == null ? void 0 : I.name) || a;
4479
4484
  }
4480
4485
  function g(a) {
4481
4486
  function I(F) {
@@ -4501,17 +4506,17 @@ function fl() {
4501
4506
  if (!(R != null && R.subCategories) || !R.subCategories.length)
4502
4507
  (p = F.children) == null || p.push(T);
4503
4508
  else {
4504
- let M = F.children, S = "";
4509
+ let A = F.children, S = "";
4505
4510
  for (const U of R.subCategories || []) {
4506
4511
  S += U;
4507
- const E = M.find(
4512
+ const E = A.find(
4508
4513
  (u) => {
4509
4514
  var l, i;
4510
4515
  return ((l = u.meta) == null ? void 0 : l.nodeType) === "subCategory" && ((i = u.meta) == null ? void 0 : i.rawId) === U;
4511
4516
  }
4512
4517
  );
4513
4518
  if (E)
4514
- E.children = E.children || [], M = E.children;
4519
+ E.children = E.children || [], A = E.children;
4515
4520
  else {
4516
4521
  const u = {
4517
4522
  id: `category-${I.label}-sub-category-${S}`,
@@ -4524,10 +4529,10 @@ function fl() {
4524
4529
  rawId: U
4525
4530
  }
4526
4531
  };
4527
- M.push(u), M = u.children;
4532
+ A.push(u), A = u.children;
4528
4533
  }
4529
4534
  }
4530
- M.push(T);
4535
+ A.push(T);
4531
4536
  }
4532
4537
  }
4533
4538
  return F;
@@ -4558,8 +4563,8 @@ function fl() {
4558
4563
  a.children,
4559
4564
  (R) => R.label,
4560
4565
  (R) => {
4561
- var M, S;
4562
- if (((M = R.meta) == null ? void 0 : M.nodeType) === "subCategory")
4566
+ var A, S;
4567
+ if (((A = R.meta) == null ? void 0 : A.nodeType) === "subCategory")
4563
4568
  return h(R);
4564
4569
  if (((S = R.meta) == null ? void 0 : S.nodeType) === "item")
4565
4570
  return F(R.meta.rawObject);
@@ -4574,34 +4579,34 @@ function fl() {
4574
4579
  var Q, le, Ce, he;
4575
4580
  const I = r.state.menu, F = !r.state.currentCatalogId, O = !r.state.currentSchedulerId, k = (((le = (Q = r.currentCatalog) == null ? void 0 : Q.linkItemRules) == null ? void 0 : le.length) ?? 0) > 0, p = yo(), T = r.mergedMenu;
4576
4581
  ut.clear(), dt.clear();
4577
- for (const c of I.modules.item)
4578
- ut.set(c._id, c);
4579
- for (const c of T.modules.group)
4580
- dt.set(c._id, c);
4581
- function R(c, V) {
4582
+ for (const m of I.modules.item)
4583
+ ut.set(m._id, m);
4584
+ for (const m of T.modules.group)
4585
+ dt.set(m._id, m);
4586
+ function R(m, V) {
4582
4587
  return {
4583
- id: `add-item-${c}`,
4588
+ id: `add-item-${m}`,
4584
4589
  icon: "add",
4585
4590
  showOnHover: !0,
4586
4591
  tooltip: n("menu.tree_editor.actions.add_product"),
4587
4592
  onClick: () => {
4588
- V.createItem(c);
4593
+ V.createItem(m);
4589
4594
  }
4590
4595
  };
4591
4596
  }
4592
- function M(c, V, N) {
4593
- var L;
4594
- const G = T.modules.group.find(
4595
- (z) => z._id === N._id
4597
+ function A(m, V, L) {
4598
+ var M;
4599
+ const W = T.modules.group.find(
4600
+ (B) => B._id === L._id
4596
4601
  );
4597
- if (!G)
4598
- throw new Error(`Item ${c._id} has unknown group ${N._id}`);
4599
- return (L = G.items) == null ? void 0 : L.map((z, oe) => {
4602
+ if (!W)
4603
+ throw new Error(`Item ${m._id} has unknown group ${L._id}`);
4604
+ return (M = W.items) == null ? void 0 : M.map((B, oe) => {
4600
4605
  var Te, Z;
4601
- const ne = !!z.combinationKey, ee = (Te = N.items) == null ? void 0 : Te.find(
4602
- (de) => de._id === z._id && de.combinationKey === z.combinationKey
4603
- ), pe = (Z = N.items) == null ? void 0 : Z.find(
4604
- (de) => de._id === z._id && !de.combinationKey
4606
+ const ne = !!B.combinationKey, ee = (Te = L.items) == null ? void 0 : Te.find(
4607
+ (de) => de._id === B._id && de.combinationKey === B.combinationKey
4608
+ ), pe = (Z = L.items) == null ? void 0 : Z.find(
4609
+ (de) => de._id === B._id && !de.combinationKey
4605
4610
  );
4606
4611
  function Ee() {
4607
4612
  var de;
@@ -4615,11 +4620,11 @@ function fl() {
4615
4620
  price: pe.price,
4616
4621
  overrided: !0
4617
4622
  };
4618
- if (z.price)
4619
- return { price: z.price, overrided: !1 };
4620
- if (!z.price) {
4621
- const xe = (de = G == null ? void 0 : G.items) == null ? void 0 : de.find(
4622
- (Ke) => Ke._id === z._id && !Ke.combinationKey
4623
+ if (B.price)
4624
+ return { price: B.price, overrided: !1 };
4625
+ if (!B.price) {
4626
+ const xe = (de = W == null ? void 0 : W.items) == null ? void 0 : de.find(
4627
+ (Ke) => Ke._id === B._id && !Ke.combinationKey
4623
4628
  );
4624
4629
  if (xe != null && xe.price)
4625
4630
  return { price: xe.price, overrided: !1 };
@@ -4628,22 +4633,22 @@ function fl() {
4628
4633
  }
4629
4634
  function Ve() {
4630
4635
  var xe, Ke;
4631
- if (z.code)
4632
- return z.code;
4633
- const de = ut.get(z._id);
4636
+ if (B.code)
4637
+ return B.code;
4638
+ const de = ut.get(B._id);
4634
4639
  if (de)
4635
4640
  return ne ? (Ke = (xe = de.variant) == null ? void 0 : xe.variantCombinations.find(
4636
- (Tn) => Tn.combinationKey === z.combinationKey
4641
+ (Tn) => Tn.combinationKey === B.combinationKey
4637
4642
  )) == null ? void 0 : Ke.code : de.code;
4638
4643
  }
4639
- function K() {
4640
- if (z.name)
4641
- return z.name;
4642
- const de = T.modules.item.find((xe) => xe._id === z._id);
4644
+ function G() {
4645
+ if (B.name)
4646
+ return B.name;
4647
+ const de = T.modules.item.find((xe) => xe._id === B._id);
4643
4648
  return de ? de.name : n("menu.tree_editor.labels.unknown");
4644
4649
  }
4645
- function Y() {
4646
- const de = (ee == null ? void 0 : ee.orderFrom) || z.orderFrom;
4650
+ function z() {
4651
+ const de = (ee == null ? void 0 : ee.orderFrom) || B.orderFrom;
4647
4652
  return de ? yt(de) : null;
4648
4653
  }
4649
4654
  const { price: re, overrided: ue } = Ee(), ie = {
@@ -4651,30 +4656,30 @@ function fl() {
4651
4656
  variant: ue ? Qe.PRIMARY : Qe.PLAIN
4652
4657
  };
4653
4658
  return {
4654
- id: `item-${c._id}-variant-${V == null ? void 0 : V.combinationKey}-group-${N._id}-${z._id}-${z.combinationKey}-${oe}`,
4655
- icon: z.combinationKey ? $e.VARIANT : $e.ITEM,
4656
- label: Yt(K(), Ve()),
4659
+ id: `item-${m._id}-variant-${V == null ? void 0 : V.combinationKey}-group-${L._id}-${B._id}-${B.combinationKey}-${oe}`,
4660
+ icon: B.combinationKey ? $e.VARIANT : $e.ITEM,
4661
+ label: Yt(G(), Ve()),
4657
4662
  rightLabel: ie,
4658
- chips: Y() ? [Y()] : void 0
4663
+ chips: z() ? [z()] : void 0
4659
4664
  };
4660
4665
  });
4661
4666
  }
4662
- function S(c, V) {
4663
- const N = (ne) => V ? `item-${c._id}-variant-${V.combinationKey}-group-${ne}` : `item-${c._id}-group-${ne}`, G = [];
4664
- function L() {
4667
+ function S(m, V) {
4668
+ const L = (ne) => V ? `item-${m._id}-variant-${V.combinationKey}-group-${ne}` : `item-${m._id}-group-${ne}`, W = [];
4669
+ function M() {
4665
4670
  var ee;
4666
4671
  const ne = [];
4667
4672
  if (V)
4668
- for (const pe of c.groups || []) {
4673
+ for (const pe of m.groups || []) {
4669
4674
  const Ee = (ee = V.groups) == null ? void 0 : ee.find((Ve) => Ve._id === pe._id);
4670
4675
  Ee ? ne.push(Ee) : ne.push(pe);
4671
4676
  }
4672
4677
  else
4673
- ne.push(...c.groups || []);
4678
+ ne.push(...m.groups || []);
4674
4679
  return ne;
4675
4680
  }
4676
- const z = L(), oe = bt(
4677
- z.map((ne) => {
4681
+ const B = M(), oe = bt(
4682
+ B.map((ne) => {
4678
4683
  const ee = dt.get(ne._id);
4679
4684
  return { ...ne, position: ee == null ? void 0 : ee.position, name: (ee == null ? void 0 : ee.name) || "" };
4680
4685
  }),
@@ -4684,56 +4689,56 @@ function fl() {
4684
4689
  for (const ne of oe) {
4685
4690
  const ee = dt.get(ne._id);
4686
4691
  if (!ee)
4687
- throw new Error(`Item ${c._id} has unknown group ${ne._id}`);
4688
- G.push({
4689
- id: N(ee._id),
4692
+ throw new Error(`Item ${m._id} has unknown group ${ne._id}`);
4693
+ W.push({
4694
+ id: L(ee._id),
4690
4695
  icon: $e.GROUP,
4691
4696
  label: ee.name,
4692
- children: M(c, V, ne),
4697
+ children: A(m, V, ne),
4693
4698
  onClick: () => {
4694
4699
  a({
4695
4700
  type: we.SELECT_GROUP,
4696
- itemId: c._id,
4701
+ itemId: m._id,
4697
4702
  groupId: ne._id
4698
4703
  });
4699
4704
  }
4700
4705
  });
4701
4706
  }
4702
- return G;
4707
+ return W;
4703
4708
  }
4704
- function U(c, V) {
4705
- return S(c, V);
4709
+ function U(m, V) {
4710
+ return S(m, V);
4706
4711
  }
4707
- function E(c) {
4708
- var L;
4709
- const V = [], N = c.groups && c.groups.length > 0, G = ((L = c.variant) == null ? void 0 : L.variantGroupIds) && c.variant.variantGroupIds.length > 0;
4710
- if (N && !G) {
4711
- const z = S(c);
4712
- V.push(...z);
4712
+ function E(m) {
4713
+ var M;
4714
+ const V = [], L = m.groups && m.groups.length > 0, W = ((M = m.variant) == null ? void 0 : M.variantGroupIds) && m.variant.variantGroupIds.length > 0;
4715
+ if (L && !W) {
4716
+ const B = S(m);
4717
+ V.push(...B);
4713
4718
  }
4714
- if (G) {
4715
- const z = (ee, pe) => `item-${ee}-variant-${pe}`, oe = $t(
4719
+ if (W) {
4720
+ const B = (ee, pe) => `item-${ee}-variant-${pe}`, oe = $t(
4716
4721
  I.modules.variant,
4717
- c.variant.variantGroupIds
4718
- ), ne = c.variant.variantCombinations.map(
4722
+ m.variant.variantGroupIds
4723
+ ), ne = m.variant.variantCombinations.map(
4719
4724
  (ee) => {
4720
4725
  const pe = yt(
4721
- ee.orderFrom || c.orderFrom
4726
+ ee.orderFrom || m.orderFrom
4722
4727
  ), Ee = ht([], pe);
4723
4728
  return {
4724
- id: z(c._id, ee.combinationKey),
4729
+ id: B(m._id, ee.combinationKey),
4725
4730
  icon: $e.VARIANT,
4726
4731
  label: Yt(
4727
4732
  rr(oe, ee.combinationKey),
4728
4733
  ee.code
4729
4734
  ),
4730
- children: U(c, ee),
4731
- rightLabel: Jo(c, ee),
4735
+ children: U(m, ee),
4736
+ rightLabel: Jo(m, ee),
4732
4737
  chips: Ee,
4733
4738
  onClick: () => {
4734
4739
  a({
4735
4740
  type: we.SELECT_VARIANT,
4736
- itemId: c._id,
4741
+ itemId: m._id,
4737
4742
  combinationKey: ee.combinationKey
4738
4743
  });
4739
4744
  }
@@ -4744,47 +4749,47 @@ function fl() {
4744
4749
  }
4745
4750
  return V;
4746
4751
  }
4747
- const u = (c) => `category-${c}`, l = bt(
4752
+ const u = (m) => `category-${m}`, l = bt(
4748
4753
  T.modules.category,
4749
- (c) => c.name
4750
- ).map((c) => {
4754
+ (m) => m.name
4755
+ ).map((m) => {
4751
4756
  const V = [];
4752
- return r.rules.category.create && V.push(R(c._id, t)), r.rules.category.edit && V.push({
4753
- id: `update-category-${c._id}`,
4757
+ return r.rules.category.create && V.push(R(m._id, t)), r.rules.category.edit && V.push({
4758
+ id: `update-category-${m._id}`,
4754
4759
  icon: "edit",
4755
4760
  showOnHover: !0,
4756
4761
  tooltip: n("menu.tree_editor.actions.edit_category"),
4757
4762
  onClick: () => {
4758
- e.update(c);
4763
+ e.update(m);
4759
4764
  }
4760
4765
  }), r.rules.category.delete && V.push({
4761
- id: `delete-category-${c._id}`,
4766
+ id: `delete-category-${m._id}`,
4762
4767
  icon: "delete",
4763
4768
  showOnHover: !0,
4764
4769
  tooltip: n("menu.tree_editor.actions.delete_category"),
4765
4770
  onClick: () => {
4766
- e.deleteCategory(c);
4771
+ e.deleteCategory(m);
4767
4772
  }
4768
4773
  }), !F && O && !k && V.push({
4769
- id: `apply-to-catalog-${c._id}`,
4774
+ id: `apply-to-catalog-${m._id}`,
4770
4775
  icon: "add_link",
4771
4776
  showOnHover: !0,
4772
4777
  tooltip: n("menu.tree_editor.actions.link_category_to_catalog"),
4773
4778
  onClick: () => {
4774
- const N = r.state.menu.modules.item.filter((G) => Lt(G).some(({ _id: z }) => z === c._id));
4775
- p.addProduct(N.map((G) => G._id));
4779
+ const L = r.state.menu.modules.item.filter((W) => Lt(W).some(({ _id: B }) => B === m._id));
4780
+ p.addProduct(L.map((W) => W._id));
4776
4781
  }
4777
4782
  }), {
4778
- id: u(c._id),
4783
+ id: u(m._id),
4779
4784
  icon: $e.CATEGORY,
4780
- label: c.name,
4785
+ label: m.name,
4781
4786
  children: [],
4782
4787
  actions: V,
4783
4788
  draggable: r.rules.category.sort,
4784
4789
  meta: {
4785
4790
  nodeType: "category",
4786
- rawId: c._id,
4787
- rawObject: c
4791
+ rawId: m._id,
4792
+ rawObject: m
4788
4793
  }
4789
4794
  };
4790
4795
  }), i = Cn(T), x = {
@@ -4813,75 +4818,75 @@ function fl() {
4813
4818
  showOnHover: !0,
4814
4819
  tooltip: n("menu.tree_editor.actions.link_category_to_catalog"),
4815
4820
  onClick: () => {
4816
- const c = r.state.menu.modules.item.filter((V) => !V.category);
4817
- p.addProduct(c.map((V) => V._id));
4821
+ const m = r.state.menu.modules.item.filter((V) => !V.category);
4822
+ p.addProduct(m.map((V) => V._id));
4818
4823
  }
4819
4824
  }), l.push(x));
4820
- const y = (c, V) => `item-${V ?? "addon"}-${c}`;
4821
- for (const c of T.modules.item)
4822
- Lt(c).forEach(({ _id: N }) => {
4823
- var L, z, oe, ne, ee, pe, Ee, Ve;
4824
- const G = N ? l.find((K) => K.id === u(N)) : x;
4825
- if (G) {
4826
- const K = _t(
4827
- ((L = c.groups) == null ? void 0 : L.length) ?? 0,
4828
- n("menu.tree_editor.labels.groups", { count: (z = c.groups) == null ? void 0 : z.length })
4829
- ), Y = _t(
4830
- ((ne = (oe = c.variant) == null ? void 0 : oe.variantCombinations) == null ? void 0 : ne.length) ?? 0,
4825
+ const y = (m, V) => `item-${V ?? "addon"}-${m}`;
4826
+ for (const m of T.modules.item)
4827
+ Lt(m).forEach(({ _id: L }) => {
4828
+ var M, B, oe, ne, ee, pe, Ee, Ve;
4829
+ const W = L ? l.find((G) => G.id === u(L)) : x;
4830
+ if (W) {
4831
+ const G = _t(
4832
+ ((M = m.groups) == null ? void 0 : M.length) ?? 0,
4833
+ n("menu.tree_editor.labels.groups", { count: (B = m.groups) == null ? void 0 : B.length })
4834
+ ), z = _t(
4835
+ ((ne = (oe = m.variant) == null ? void 0 : oe.variantCombinations) == null ? void 0 : ne.length) ?? 0,
4831
4836
  n("menu.tree_editor.labels.variants", {
4832
- count: (pe = (ee = c.variant) == null ? void 0 : ee.variantCombinations) == null ? void 0 : pe.length
4837
+ count: (pe = (ee = m.variant) == null ? void 0 : ee.variantCombinations) == null ? void 0 : pe.length
4833
4838
  })
4834
- ), re = yt(c.orderFrom), ue = ht([], K, Y, re), ie = [];
4839
+ ), re = yt(m.orderFrom), ue = ht([], G, z, re), ie = [];
4835
4840
  r.rules.item.delete && ie.push({
4836
- id: `delete-item-${c._id}`,
4841
+ id: `delete-item-${m._id}`,
4837
4842
  icon: "delete",
4838
4843
  showOnHover: !0,
4839
4844
  tooltip: n("menu.tree_editor.actions.delete_product"),
4840
4845
  onClick: () => {
4841
- t.deleteItem(c);
4846
+ t.deleteItem(m);
4842
4847
  }
4843
4848
  });
4844
- const Te = (Ee = r.currentCatalog) == null ? void 0 : Ee.override.items, Z = (Ve = Te == null ? void 0 : Te[c._id]) == null ? void 0 : Ve.find(
4849
+ const Te = (Ee = r.currentCatalog) == null ? void 0 : Ee.override.items, Z = (Ve = Te == null ? void 0 : Te[m._id]) == null ? void 0 : Ve.find(
4845
4850
  (Ke) => !Ke.combinationKey
4846
4851
  ), de = (Z == null ? void 0 : Z.orderFrom) === te.F_ORDER_FROM.enum.NONE;
4847
4852
  !F && O && !k && (de ? ie.push({
4848
- id: `apply-to-catalog-${c._id}`,
4853
+ id: `apply-to-catalog-${m._id}`,
4849
4854
  icon: "add_link",
4850
4855
  showOnHover: !0,
4851
4856
  tooltip: n("menu.tree_editor.actions.link_product_to_catalog"),
4852
4857
  onClick: () => {
4853
- p.addProduct([c._id]);
4858
+ p.addProduct([m._id]);
4854
4859
  }
4855
4860
  }) : ie.push({
4856
- id: `remove-from-catalog-${c._id}`,
4861
+ id: `remove-from-catalog-${m._id}`,
4857
4862
  icon: "link_off",
4858
4863
  showOnHover: !0,
4859
4864
  tooltip: n("menu.tree_editor.actions.unlink_product_from_catalog"),
4860
4865
  onClick: () => {
4861
- p.removeProduct([c._id]);
4866
+ p.removeProduct([m._id]);
4862
4867
  }
4863
4868
  }));
4864
- const xe = c.code ? `${c.code}, ${c.name}` : c.name;
4865
- G.children.push({
4866
- id: y(c._id, N),
4869
+ const xe = m.code ? `${m.code}, ${m.name}` : m.name;
4870
+ W.children.push({
4871
+ id: y(m._id, L),
4867
4872
  disabled: de,
4868
4873
  draggable: r.rules.item.sort,
4869
4874
  meta: {
4870
- rawId: c._id,
4871
- rawObject: c,
4875
+ rawId: m._id,
4876
+ rawObject: m,
4872
4877
  nodeType: "item"
4873
4878
  /* ITEM */
4874
4879
  },
4875
4880
  icon: $e.ITEM,
4876
4881
  label: xe,
4877
- children: de ? void 0 : E(c),
4882
+ children: de ? void 0 : E(m),
4878
4883
  chips: de ? void 0 : ue,
4879
4884
  rightLabel: de ? void 0 : {
4880
- label: be.Dinero.fromFdoDinero(c.price).toFormat(!0),
4885
+ label: be.Dinero.fromFdoDinero(m.price).toFormat(!0),
4881
4886
  onClick: () => {
4882
4887
  a({
4883
4888
  type: we.SELECT_PRICE,
4884
- itemId: c._id
4889
+ itemId: m._id
4885
4890
  });
4886
4891
  }
4887
4892
  },
@@ -4889,21 +4894,21 @@ function fl() {
4889
4894
  onClick: () => {
4890
4895
  a({
4891
4896
  type: we.SELECT_ITEM,
4892
- itemId: c._id
4897
+ itemId: m._id
4893
4898
  });
4894
4899
  }
4895
4900
  });
4896
4901
  } else
4897
- throw new Error(`Item ${c._id} has unknown category ${c.category}`);
4902
+ throw new Error(`Item ${m._id} has unknown category ${m.category}`);
4898
4903
  });
4899
- for (const c of l) {
4904
+ for (const m of l) {
4900
4905
  const V = _t(
4901
- ((Ce = c.children) == null ? void 0 : Ce.length) ?? 0,
4906
+ ((Ce = m.children) == null ? void 0 : Ce.length) ?? 0,
4902
4907
  n("menu.tree_editor.labels.products", {
4903
- count: (he = c.children) == null ? void 0 : he.length
4908
+ count: (he = m.children) == null ? void 0 : he.length
4904
4909
  })
4905
4910
  );
4906
- V && (c.chips = ht(c.chips ?? [], V));
4911
+ V && (m.chips = ht(m.chips ?? [], V));
4907
4912
  }
4908
4913
  const P = d(l);
4909
4914
  return g(P), {
@@ -4914,9 +4919,9 @@ function fl() {
4914
4919
  generateTreeFromMenu: f
4915
4920
  };
4916
4921
  }
4917
- function gl() {
4922
+ function vl() {
4918
4923
  const n = Ue(), r = kn(), e = gt(), t = at();
4919
- function m(E) {
4924
+ function c(E) {
4920
4925
  n.open({
4921
4926
  message: E,
4922
4927
  type: "warning"
@@ -4993,14 +4998,14 @@ function gl() {
4993
4998
  const x = I(E), y = I(u);
4994
4999
  return (x == null ? void 0 : x.id) === (y == null ? void 0 : y.id) ? !0 : !((x == null ? void 0 : x.id) !== (y == null ? void 0 : y.id) && a(y).some(
4995
5000
  (P) => {
4996
- var j, Q;
4997
- return ((j = P.meta) == null ? void 0 : j.rawId) === ((Q = E.meta) == null ? void 0 : Q.rawId);
5001
+ var Y, Q;
5002
+ return ((Y = P.meta) == null ? void 0 : Y.rawId) === ((Q = E.meta) == null ? void 0 : Q.rawId);
4998
5003
  }
4999
5004
  ));
5000
5005
  }
5001
5006
  return s(u) && i && u.id !== i.id && l === "inside" ? !a(u).some((y) => {
5002
- var P, j;
5003
- return ((P = y.meta) == null ? void 0 : P.rawId) === ((j = E.meta) == null ? void 0 : j.rawId);
5007
+ var P, Y;
5008
+ return ((P = y.meta) == null ? void 0 : P.rawId) === ((Y = E.meta) == null ? void 0 : Y.rawId);
5004
5009
  }) : !!(g(u) && (v == null ? void 0 : v.id) !== (i == null ? void 0 : i.id) || d(u));
5005
5010
  }
5006
5011
  const O = (E, u, l) => {
@@ -5009,15 +5014,15 @@ function gl() {
5009
5014
  };
5010
5015
  async function k(E, u, l) {
5011
5016
  if (!b(E, u)) {
5012
- m("Can't drag category here");
5017
+ c("Can't drag category here");
5013
5018
  return;
5014
5019
  }
5015
- const i = t.treeNodes, v = i.findIndex((j) => j.id === E.id);
5016
- let x = i.findIndex((j) => j.id === u.id);
5020
+ const i = t.treeNodes, v = i.findIndex((Y) => Y.id === E.id);
5021
+ let x = i.findIndex((Y) => Y.id === u.id);
5017
5022
  l === "after" && x++;
5018
- const y = i.map((j) => {
5023
+ const y = i.map((Y) => {
5019
5024
  var Q;
5020
- return (Q = j.meta) == null ? void 0 : Q.rawId;
5025
+ return (Q = Y.meta) == null ? void 0 : Q.rawId;
5021
5026
  }).filter(Boolean), P = wt(y, v, x);
5022
5027
  await e.rearrange(P);
5023
5028
  }
@@ -5042,21 +5047,21 @@ function gl() {
5042
5047
  throw new Error("Invalid target node for item drop");
5043
5048
  }
5044
5049
  async function T(E, u, l, i) {
5045
- var j;
5046
- const v = _(u), x = ((j = u.children) == null ? void 0 : j.findIndex((Q) => Q.id === E.id)) ?? -1;
5050
+ var Y;
5051
+ const v = _(u), x = ((Y = u.children) == null ? void 0 : Y.findIndex((Q) => Q.id === E.id)) ?? -1;
5047
5052
  if (x === -1) throw new Error("Source index not found");
5048
5053
  const y = wt(v, x, l), P = w(u);
5049
5054
  await r.rearrangeWithSubCategory(y, i, P);
5050
5055
  }
5051
5056
  async function R(E, u, l, i) {
5052
- var j;
5057
+ var Y;
5053
5058
  const v = _(u);
5054
5059
  v.splice(l, 0, {
5055
5060
  type: "item",
5056
5061
  id: E.meta.rawId
5057
5062
  });
5058
5063
  const x = w(u);
5059
- if (((j = E.meta) == null ? void 0 : j.nodeType) !== et.ITEM)
5064
+ if (((Y = E.meta) == null ? void 0 : Y.nodeType) !== et.ITEM)
5060
5065
  throw new Error("Expected dragged node to be an item");
5061
5066
  const y = mt(E.meta.rawObject);
5062
5067
  y.category = i._id, y.subCategories = x;
@@ -5068,11 +5073,11 @@ function gl() {
5068
5073
  P
5069
5074
  );
5070
5075
  }
5071
- async function M(E, u, l) {
5076
+ async function A(E, u, l) {
5072
5077
  var i;
5073
5078
  try {
5074
5079
  if (!F(E, u, l, E.parent, u.parent)) {
5075
- m("Cannot drop item here");
5080
+ c("Cannot drop item here");
5076
5081
  return;
5077
5082
  }
5078
5083
  const v = p(u, l), x = h(u), y = E.meta;
@@ -5088,7 +5093,7 @@ function gl() {
5088
5093
  x
5089
5094
  );
5090
5095
  } catch (v) {
5091
- m(v.message || "Failed to move item");
5096
+ c(v.message || "Failed to move item");
5092
5097
  }
5093
5098
  }
5094
5099
  async function S(E, u, l) {
@@ -5099,7 +5104,7 @@ function gl() {
5099
5104
  E.parent,
5100
5105
  u.parent
5101
5106
  )) {
5102
- m("Can't drag sub-category here");
5107
+ c("Can't drag sub-category here");
5103
5108
  return;
5104
5109
  }
5105
5110
  const i = E.parent;
@@ -5110,12 +5115,12 @@ function gl() {
5110
5115
  if (x === -1 || y === -1)
5111
5116
  throw new Error("Source or target index not found");
5112
5117
  l === "after" && y++;
5113
- const P = wt(v, x, y), j = h(i), Q = w(i);
5114
- await r.rearrangeWithSubCategory(P, j, Q);
5118
+ const P = wt(v, x, y), Y = h(i), Q = w(i);
5119
+ await r.rearrangeWithSubCategory(P, Y, Q);
5115
5120
  }
5116
5121
  async function U(E) {
5117
5122
  const u = t.getNodeById(E.draggedNodeId), l = t.getNodeById(E.targetNodeId);
5118
- !u || !l || (s(u) ? await k(u, l, E.dragPosition) : g(u) ? await M(u, l, E.dragPosition) : d(u) ? await S(u, l, E.dragPosition) : m("Unsupported drag operation"));
5123
+ !u || !l || (s(u) ? await k(u, l, E.dragPosition) : g(u) ? await A(u, l, E.dragPosition) : d(u) ? await S(u, l, E.dragPosition) : c("Unsupported drag operation"));
5119
5124
  }
5120
5125
  return {
5121
5126
  isCategoryNode: s,
@@ -5134,17 +5139,17 @@ const Ft = /* @__PURE__ */ ae({
5134
5139
  setup(n) {
5135
5140
  const r = n;
5136
5141
  return (e, t) => {
5137
- const m = W("FmIcon");
5142
+ const c = j("FmIcon");
5138
5143
  return $(), J("div", {
5139
5144
  class: fe(`p-4 relative flex items-center justify-center ${r.visible ? "" : "invisible"}`)
5140
5145
  }, [
5141
- C(m, {
5146
+ C(c, {
5142
5147
  name: r.name,
5143
5148
  size: "sm",
5144
5149
  outline: "",
5145
5150
  class: "cursor-pointer text-fm-color-neutral-gray-400 flex-shrink-0"
5146
5151
  }, null, 8, ["name"]),
5147
- t[0] || (t[0] = A("div", { class: "absolute top-0 left-0 w-full h-full fm-corner-radius-sm hover:bg-fm-color-opacity-sm" }, null, -1))
5152
+ t[0] || (t[0] = N("div", { class: "absolute top-0 left-0 w-full h-full fm-corner-radius-sm hover:bg-fm-color-opacity-sm" }, null, -1))
5148
5153
  ], 2);
5149
5154
  };
5150
5155
  }
@@ -5158,13 +5163,13 @@ const Ft = /* @__PURE__ */ ae({
5158
5163
  },
5159
5164
  setup(n) {
5160
5165
  return (r, e) => {
5161
- const t = W("FmTooltip");
5166
+ const t = j("FmTooltip");
5162
5167
  return r.tooltip ? ($(), H(t, {
5163
5168
  key: 0,
5164
5169
  content: r.tooltip,
5165
5170
  "z-index": 50
5166
5171
  }, {
5167
- default: B(() => [
5172
+ default: K(() => [
5168
5173
  C(Ft, {
5169
5174
  name: r.name,
5170
5175
  visible: r.visible,
@@ -5181,8 +5186,8 @@ const Ft = /* @__PURE__ */ ae({
5181
5186
  };
5182
5187
  }
5183
5188
  }), En = 300;
5184
- function vl(n) {
5185
- const { itemHeight: r, emit: e, getFlattenedItems: t, getContainerRef: m, canDropFn: s } = n, g = q(!1), d = q(null), h = q(null), w = q(null), _ = q(0), b = q({ x: 0, y: 0 }), f = q(/* @__PURE__ */ new Map());
5189
+ function bl(n) {
5190
+ const { itemHeight: r, emit: e, getFlattenedItems: t, getContainerRef: c, canDropFn: s } = n, g = q(!1), d = q(null), h = q(null), w = q(null), _ = q(0), b = q({ x: 0, y: 0 }), f = q(/* @__PURE__ */ new Map());
5186
5191
  function a(k, p) {
5187
5192
  p.button === 0 && (b.value = { x: p.clientX, y: p.clientY }, d.value = k, _.value = p.clientY, f.value = nr(t()), setTimeout(() => {
5188
5193
  d.value === k && (g.value = !0, b.value = { x: p.clientX, y: p.clientY }, e("updateDragState", k, null, null), document.addEventListener("mousemove", I), document.addEventListener("mouseup", F));
@@ -5194,11 +5199,11 @@ function vl(n) {
5194
5199
  requestAnimationFrame(() => {
5195
5200
  b.value = { x: k.clientX, y: k.clientY };
5196
5201
  });
5197
- const p = m();
5202
+ const p = c();
5198
5203
  if (!p) return;
5199
- const T = p.getBoundingClientRect(), R = k.clientY - T.top + p.scrollTop, M = Math.floor(R / r), S = t();
5200
- if (M >= 0 && M < S.length) {
5201
- const l = S[M].id;
5204
+ const T = p.getBoundingClientRect(), R = k.clientY - T.top + p.scrollTop, A = Math.floor(R / r), S = t();
5205
+ if (A >= 0 && A < S.length) {
5206
+ const l = S[A].id;
5202
5207
  if (l === d.value) {
5203
5208
  h.value = null, w.value = null, e("updateDragState", d.value, null, null);
5204
5209
  return;
@@ -5238,10 +5243,10 @@ function vl(n) {
5238
5243
  cancelDrag: O
5239
5244
  };
5240
5245
  }
5241
- function bl(n, r) {
5246
+ function _l(n, r) {
5242
5247
  let e = null;
5243
5248
  const t = typeof r == "function" ? r : () => r.value;
5244
- function m(d) {
5249
+ function c(d) {
5245
5250
  t() || (e = setTimeout(() => {
5246
5251
  n(d);
5247
5252
  }, En));
@@ -5253,12 +5258,12 @@ function bl(n, r) {
5253
5258
  e && (clearTimeout(e), e = null);
5254
5259
  }
5255
5260
  return {
5256
- onMouseDown: m,
5261
+ onMouseDown: c,
5257
5262
  onMouseMove: s,
5258
5263
  onMouseUp: g
5259
5264
  };
5260
5265
  }
5261
- const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5266
+ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ ae({
5262
5267
  __name: "HighlightableSpan",
5263
5268
  props: {
5264
5269
  text: {},
@@ -5268,38 +5273,38 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5268
5273
  const r = n, e = D(() => {
5269
5274
  if (!r.highlightedStrings || r.highlightedStrings.length === 0 || !r.text)
5270
5275
  return r.text;
5271
- const t = r.highlightedStrings.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), m = new RegExp(`(${t})`, "gi");
5272
- return r.text.replace(m, '<span class="highlighted-span">$1</span>');
5276
+ const t = r.highlightedStrings.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), c = new RegExp(`(${t})`, "gi");
5277
+ return r.text.replace(c, '<span class="highlighted-span">$1</span>');
5273
5278
  });
5274
- return (t, m) => !t.highlightedStrings || t.highlightedStrings.length === 0 ? ($(), J("span", _l, ge(t.text), 1)) : ($(), J("span", {
5279
+ return (t, c) => !t.highlightedStrings || t.highlightedStrings.length === 0 ? ($(), J("span", yl, ge(t.text), 1)) : ($(), J("span", {
5275
5280
  key: 1,
5276
5281
  innerHTML: e.value
5277
- }, null, 8, yl));
5282
+ }, null, 8, hl));
5278
5283
  }
5279
- }), Ct = /* @__PURE__ */ Ze(hl, [["__scopeId", "data-v-f6f1080b"]]), wl = {
5284
+ }), Ct = /* @__PURE__ */ Ze(wl, [["__scopeId", "data-v-f6f1080b"]]), Cl = {
5280
5285
  class: "flex-1 min-w-0 flex items-center gap-4 relative pl-12"
5281
- }, Cl = {
5282
- class: "flex items-center gap-4 min-w-0"
5283
5286
  }, Il = {
5284
- class: "min-w-0 flex-1"
5287
+ class: "flex items-center gap-4 min-w-0"
5285
5288
  }, kl = {
5286
- class: "py-4 px-8 space-y-12 fm-typo-en-body-md-400"
5289
+ class: "min-w-0 flex-1"
5287
5290
  }, El = {
5288
- class: "flex-shrink-0 flex items-center gap-4"
5291
+ class: "py-4 px-8 space-y-12 fm-typo-en-body-md-400"
5289
5292
  }, Tl = {
5290
- class: "right-area flex items-center gap-4"
5293
+ class: "flex-shrink-0 flex items-center gap-4"
5291
5294
  }, xl = {
5292
- class: "flex flex-nowrap items-center show-on-hover"
5295
+ class: "right-area flex items-center gap-4"
5293
5296
  }, Fl = {
5297
+ class: "flex flex-nowrap items-center show-on-hover"
5298
+ }, Sl = {
5294
5299
  key: 0,
5295
5300
  class: "drop-indicator-before"
5296
- }, Sl = {
5301
+ }, Ol = {
5297
5302
  key: 1,
5298
5303
  class: "drop-indicator-after"
5299
- }, Ol = {
5304
+ }, Dl = {
5300
5305
  key: 2,
5301
5306
  class: "drop-indicator-inside"
5302
- }, Dl = /* @__PURE__ */ ae({
5307
+ }, Vl = /* @__PURE__ */ ae({
5303
5308
  __name: "FmTreeNode",
5304
5309
  props: {
5305
5310
  node: {},
@@ -5331,11 +5336,11 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5331
5336
  setup(n, {
5332
5337
  emit: r
5333
5338
  }) {
5334
- const e = n, t = D(() => e.expanded ? "expand_more" : "chevron_right"), m = D(() => e.node.disabled ? "text-fm-color-neutral-gray-200" : ""), s = D(() => e.node.disabled ? "cursor-not-allowed" : e.node.onClick ? "cursor-pointer" : ""), g = D(() => e.selected ? "bg-fm-color-system-warning-100" : e.dropTarget && e.dropPosition === "inside" ? "bg-fm-color-primary-50" : ""), d = D(() => e.selected ? "text-fm-color-primary" : ""), h = r, {
5339
+ const e = n, t = D(() => e.expanded ? "expand_more" : "chevron_right"), c = D(() => e.node.disabled ? "text-fm-color-neutral-gray-200" : ""), s = D(() => e.node.disabled ? "cursor-not-allowed" : e.node.onClick ? "cursor-pointer" : ""), g = D(() => e.selected ? "bg-fm-color-system-warning-100" : e.dropTarget && e.dropPosition === "inside" ? "bg-fm-color-primary-50" : ""), d = D(() => e.selected ? "text-fm-color-primary" : ""), h = r, {
5335
5340
  onMouseDown: w,
5336
5341
  onMouseMove: _,
5337
5342
  onMouseUp: b
5338
- } = bl((f) => {
5343
+ } = _l((f) => {
5339
5344
  var a;
5340
5345
  (a = e.node) != null && a.draggable && h("dragStart", f);
5341
5346
  }, () => {
@@ -5344,9 +5349,9 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5344
5349
  });
5345
5350
  return (f, a) => {
5346
5351
  var O, k, p;
5347
- const I = W("FmIcon"), F = W("FmTooltip");
5352
+ const I = j("FmIcon"), F = j("FmTooltip");
5348
5353
  return $(), J("div", {
5349
- class: fe(["tree-node", "max-w-full", "py-4 px-8 flex items-center justify-between gap-4", "fm-corner-radius-sm", "select-none", m.value, s.value, g.value, {
5354
+ class: fe(["tree-node", "max-w-full", "py-4 px-8 flex items-center justify-between gap-4", "fm-corner-radius-sm", "select-none", c.value, s.value, g.value, {
5350
5355
  "opacity-50": f.dragging
5351
5356
  }, "hover-effect"]),
5352
5357
  onClick: a[2] || (a[2] = He(() => {
@@ -5361,7 +5366,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5361
5366
  (...T) => o(b) && o(b)(...T)),
5362
5367
  onMouseleave: a[6] || (a[6] = //@ts-ignore
5363
5368
  (...T) => o(b) && o(b)(...T))
5364
- }, [A("div", wl, [A("div", Cl, [(O = f.node) != null && O.draggable && !f.node.disabled ? ($(), H(I, {
5369
+ }, [N("div", Cl, [N("div", Il, [(O = f.node) != null && O.draggable && !f.node.disabled ? ($(), H(I, {
5365
5370
  key: 0,
5366
5371
  name: "drag_indicator",
5367
5372
  size: "sm",
@@ -5379,55 +5384,55 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5379
5384
  outline: "",
5380
5385
  name: f.node.icon,
5381
5386
  class: "text-fm-color-neutral-gray-400 flex-shrink-0"
5382
- }, null, 8, ["name"])) : X("", !0), A("div", Il, [C(F, {
5387
+ }, null, 8, ["name"])) : X("", !0), N("div", kl, [C(F, {
5383
5388
  content: f.node.label,
5384
5389
  variant: "rich",
5385
5390
  placement: "top",
5386
5391
  "z-index": 50
5387
5392
  }, {
5388
- content: B(() => [A("div", kl, [C(Ct, {
5393
+ content: K(() => [N("div", El, [C(Ct, {
5389
5394
  class: fe(`${d.value} block`),
5390
5395
  text: f.node.label,
5391
5396
  highlightedStrings: f.highlightedStrings
5392
5397
  }, null, 8, ["class", "text", "highlightedStrings"])])]),
5393
- default: B(() => [C(Ct, {
5398
+ default: K(() => [C(Ct, {
5394
5399
  class: fe(`${d.value} truncate block fm-typo-en-body-md-400`),
5395
5400
  text: f.node.label,
5396
5401
  highlightedStrings: f.highlightedStrings
5397
5402
  }, null, 8, ["class", "text", "highlightedStrings"])]),
5398
5403
  _: 1
5399
- }, 8, ["content"])])]), A("div", El, [($(!0), J(Oe, null, Ne(f.node.chips, (T) => ($(), H(Ro, {
5404
+ }, 8, ["content"])])]), N("div", Tl, [($(!0), J(Oe, null, Ne(f.node.chips, (T) => ($(), H(Ro, {
5400
5405
  key: T.label,
5401
5406
  size: T.size || "xs",
5402
5407
  label: T.label,
5403
5408
  variant: T.variant || "neutral",
5404
5409
  border: T.border
5405
- }, null, 8, ["size", "label", "variant", "border"]))), 128))])]), A("div", Tl, [A("div", xl, [($(!0), J(Oe, null, Ne(f.node.actions, (T) => ($(), H(St, {
5410
+ }, null, 8, ["size", "label", "variant", "border"]))), 128))])]), N("div", xl, [N("div", Fl, [($(!0), J(Oe, null, Ne(f.node.actions, (T) => ($(), H(St, {
5406
5411
  key: T.id,
5407
5412
  name: T.icon,
5408
5413
  tooltip: T.tooltip,
5409
5414
  visible: !0,
5410
5415
  onClick: (R) => {
5411
- var M;
5412
- return (M = T.onClick) == null ? void 0 : M.call(T);
5416
+ var A;
5417
+ return (A = T.onClick) == null ? void 0 : A.call(T);
5413
5418
  }
5414
5419
  }, null, 8, ["name", "tooltip", "onClick"]))), 128))]), C(Ct, {
5415
5420
  class: fe(["fm-typo-en-body-md-400", ((k = f.node.rightLabel) == null ? void 0 : k.variant) === o(Qe).PRIMARY ? "text-fm-color-primary" : "text-fm-color-typo-secondary"]),
5416
5421
  text: (p = f.node.rightLabel) == null ? void 0 : p.label,
5417
5422
  highlightedStrings: f.highlightedStrings,
5418
5423
  onClick: a[1] || (a[1] = He((T) => {
5419
- var R, M;
5420
- return (M = (R = f.node.rightLabel) == null ? void 0 : R.onClick) == null ? void 0 : M.call(R);
5424
+ var R, A;
5425
+ return (A = (R = f.node.rightLabel) == null ? void 0 : R.onClick) == null ? void 0 : A.call(R);
5421
5426
  }, ["stop"]))
5422
- }, null, 8, ["class", "text", "highlightedStrings"])]), f.dropTarget && f.dropPosition === "before" ? ($(), J("div", Fl)) : X("", !0), f.dropTarget && f.dropPosition === "after" ? ($(), J("div", Sl)) : X("", !0), f.dropTarget && f.dropPosition === "inside" ? ($(), J("div", Ol)) : X("", !0)], 34);
5427
+ }, null, 8, ["class", "text", "highlightedStrings"])]), f.dropTarget && f.dropPosition === "before" ? ($(), J("div", Sl)) : X("", !0), f.dropTarget && f.dropPosition === "after" ? ($(), J("div", Ol)) : X("", !0), f.dropTarget && f.dropPosition === "inside" ? ($(), J("div", Dl)) : X("", !0)], 34);
5423
5428
  };
5424
5429
  }
5425
- }), Vl = ["id"], $l = {
5430
+ }), $l = ["id"], Pl = {
5426
5431
  class: "flex items-center gap-4 min-w-fit px-8"
5427
- }, Pl = {
5432
+ }, Rl = {
5428
5433
  key: 1,
5429
5434
  class: "empty-tree-message"
5430
- }, It = 32, Rl = /* @__PURE__ */ ae({
5435
+ }, It = 32, Ul = /* @__PURE__ */ ae({
5431
5436
  __name: "FmTree",
5432
5437
  props: {
5433
5438
  nodes: {},
@@ -5444,12 +5449,12 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5444
5449
  }) {
5445
5450
  const {
5446
5451
  t
5447
- } = ce(), m = n, s = e;
5452
+ } = ce(), c = n, s = e;
5448
5453
  function g(S) {
5449
- const U = m.expandedNodeIds;
5454
+ const U = c.expandedNodeIds;
5450
5455
  U != null && U.includes(S) ? s("updateExpandedNodeIds", U.filter((E) => E !== S)) : s("updateExpandedNodeIds", [...U || [], S]);
5451
5456
  }
5452
- const d = D(() => new Set(m.expandedNodeIds)), h = D(() => {
5457
+ const d = D(() => new Set(c.expandedNodeIds)), h = D(() => {
5453
5458
  const S = [];
5454
5459
  function U(E, u = 0) {
5455
5460
  if (E)
@@ -5460,7 +5465,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5460
5465
  node: l
5461
5466
  }), d.value.has(l.id) && l.children && l.children.length > 0 && U(l.children, u + 1);
5462
5467
  }
5463
- return U(m.nodes), S;
5468
+ return U(c.nodes), S;
5464
5469
  });
5465
5470
  q(null);
5466
5471
  const {
@@ -5490,26 +5495,26 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5490
5495
  dropPosition: p,
5491
5496
  mousePosition: T,
5492
5497
  onDragStart: R,
5493
- cancelDrag: M
5494
- } = vl({
5498
+ cancelDrag: A
5499
+ } = bl({
5495
5500
  itemHeight: It,
5496
5501
  emit: (S, ...U) => {
5497
5502
  S === "updateDragState" ? s("updateDragState", ...U) : S === "nodeDragDrop" && s("nodeDragDrop", U[0]);
5498
5503
  },
5499
5504
  getFlattenedItems: () => h.value,
5500
5505
  getContainerRef: () => b.ref.value,
5501
- canDropFn: m.canDropFn
5506
+ canDropFn: c.canDropFn
5502
5507
  });
5503
5508
  return r({
5504
5509
  scrollToTop: a,
5505
5510
  scrollToNode: I,
5506
- cancelDrag: M
5511
+ cancelDrag: A
5507
5512
  }), (S, U) => {
5508
5513
  var u;
5509
- const E = W("FmIcon");
5514
+ const E = j("FmIcon");
5510
5515
  return $(), J("div", Vn({
5511
5516
  class: "tree-container"
5512
- }, o(b)), [A("div", $n(Pn(o(f))), [($(!0), J(Oe, null, Ne(o(w), ({
5517
+ }, o(b)), [N("div", $n(Pn(o(f))), [($(!0), J(Oe, null, Ne(o(w), ({
5513
5518
  data: l
5514
5519
  }) => {
5515
5520
  var i;
@@ -5523,10 +5528,10 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5523
5528
  "being-dragged": o(O) === l.id
5524
5529
  }]),
5525
5530
  id: `tree-node-${l.id}`
5526
- }, [($(), H(Dl, {
5531
+ }, [($(), H(Vl, {
5527
5532
  key: l.id,
5528
5533
  node: l.node,
5529
- selected: m.selectedNodeId === l.id,
5534
+ selected: c.selectedNodeId === l.id,
5530
5535
  expandable: !!((i = l.node.children) != null && i.length && l.node.children.length > 0),
5531
5536
  expanded: d.value.has(l.id),
5532
5537
  highlightedStrings: l.node.highlightedStrings,
@@ -5538,7 +5543,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5538
5543
  style: ct({
5539
5544
  paddingLeft: `${l.level * 20}px`
5540
5545
  })
5541
- }, null, 8, ["node", "selected", "expandable", "expanded", "highlightedStrings", "dragging", "dropTarget", "dropPosition", "onToggleExpand", "onDragStart", "style"]))], 10, Vl);
5546
+ }, null, 8, ["node", "selected", "expandable", "expanded", "highlightedStrings", "dragging", "dropTarget", "dropPosition", "onToggleExpand", "onDragStart", "style"]))], 10, $l);
5542
5547
  }), 128))], 16), o(F) && o(O) ? ($(), J("div", {
5543
5548
  key: 0,
5544
5549
  class: "drag-overlay",
@@ -5548,12 +5553,12 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5548
5553
  transform: "translate3d(0,0,0)"
5549
5554
  // Force hardware acceleration
5550
5555
  })
5551
- }, [A("div", $l, [C(E, {
5556
+ }, [N("div", Pl, [C(E, {
5552
5557
  name: "drag_indicator"
5553
- }), A("span", null, ge((u = h.value.find((l) => l.id === o(O))) == null ? void 0 : u.node.label), 1)])], 4)) : X("", !0), h.value.length === 0 ? ($(), J("div", Pl, ge(o(t)("menu.tree_editor.labels.no_items")), 1)) : X("", !0)], 16);
5558
+ }), N("span", null, ge((u = h.value.find((l) => l.id === o(O))) == null ? void 0 : u.node.label), 1)])], 4)) : X("", !0), h.value.length === 0 ? ($(), J("div", Rl, ge(o(t)("menu.tree_editor.labels.no_items")), 1)) : X("", !0)], 16);
5554
5559
  };
5555
5560
  }
5556
- }), Ul = /* @__PURE__ */ Ze(Rl, [["__scopeId", "data-v-9244f342"]]), Ml = { class: "py-4 px-8 flex items-center gap-4 text-fm-color-primary cursor-pointer relative" }, Al = {
5561
+ }), Ml = /* @__PURE__ */ Ze(Ul, [["__scopeId", "data-v-9244f342"]]), Al = { class: "py-4 px-8 flex items-center gap-4 text-fm-color-primary cursor-pointer relative" }, Nl = {
5557
5562
  key: 1,
5558
5563
  class: "fm-typo-en-body-md-400"
5559
5564
  }, kt = /* @__PURE__ */ ae({
@@ -5564,24 +5569,24 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5564
5569
  },
5565
5570
  setup(n) {
5566
5571
  return (r, e) => {
5567
- const t = W("FmIcon");
5568
- return $(), J("div", Ml, [
5572
+ const t = j("FmIcon");
5573
+ return $(), J("div", Al, [
5569
5574
  r.icon ? ($(), H(t, {
5570
5575
  key: 0,
5571
5576
  name: r.icon
5572
5577
  }, null, 8, ["name"])) : X("", !0),
5573
- r.label ? ($(), J("span", Al, ge(r.label), 1)) : X("", !0),
5574
- e[0] || (e[0] = A("div", { class: "absolute inset-0 fm-corner-radius-md hover:bg-fm-color-opacity-sm" }, null, -1))
5578
+ r.label ? ($(), J("span", Nl, ge(r.label), 1)) : X("", !0),
5579
+ e[0] || (e[0] = N("div", { class: "absolute inset-0 fm-corner-radius-md hover:bg-fm-color-opacity-sm" }, null, -1))
5575
5580
  ]);
5576
5581
  };
5577
5582
  }
5578
- }), Nl = {
5583
+ }), Ll = {
5579
5584
  class: "flex flex-col gap-4"
5580
- }, Ll = {
5581
- class: "flex items-center justify-between"
5582
5585
  }, Gl = {
5586
+ class: "flex items-center justify-between"
5587
+ }, Kl = {
5583
5588
  class: "flex items-center"
5584
- }, Kl = /* @__PURE__ */ ae({
5589
+ }, Bl = /* @__PURE__ */ ae({
5585
5590
  __name: "ProductsTree",
5586
5591
  props: {
5587
5592
  menu: {},
@@ -5592,27 +5597,27 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5592
5597
  setup(n, {
5593
5598
  emit: r
5594
5599
  }) {
5595
- const e = n, t = r, m = at(), s = se(), g = gt(), {
5600
+ const e = n, t = r, c = at(), s = se(), g = gt(), {
5596
5601
  canDropFn: d,
5597
5602
  handleNodeDragDrop: h
5598
- } = gl(), w = D(() => e.filterState.searchKey), _ = $o(w, 300), {
5603
+ } = vl(), w = D(() => e.filterState.searchKey), _ = $o(w, 300), {
5599
5604
  generateTreeFromMenu: b
5600
- } = fl();
5605
+ } = gl();
5601
5606
  async function f() {
5602
5607
  return await b({
5603
5608
  filterState: e.filterState,
5604
- eventEmitter: (M) => {
5605
- t("tree-event", M);
5609
+ eventEmitter: (A) => {
5610
+ t("tree-event", A);
5606
5611
  }
5607
5612
  });
5608
5613
  }
5609
5614
  ye([() => e.overridedMenu, () => _.value], async () => {
5610
- const M = await f();
5615
+ const A = await f();
5611
5616
  if (e.filterState.searchKey) {
5612
- const S = er(M.tree, e.filterState.searchKey);
5613
- m.setTreeNodes(S.subTree), m.setExpandedNodeIds(S.shouldExpandNodeIds);
5617
+ const S = er(A.tree, e.filterState.searchKey);
5618
+ c.setTreeNodes(S.subTree), c.setExpandedNodeIds(S.shouldExpandNodeIds);
5614
5619
  } else
5615
- m.setTreeNodes(M.tree);
5620
+ c.setTreeNodes(A.tree);
5616
5621
  });
5617
5622
  const {
5618
5623
  t: a
@@ -5625,7 +5630,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5625
5630
  schedulerManager: T,
5626
5631
  noScheduler: R
5627
5632
  } = ho(!0);
5628
- return (M, S) => ($(), J("div", Nl, [A("div", Ll, [o(s).rules.category.create ? ($(), H(kt, {
5633
+ return (A, S) => ($(), J("div", Ll, [N("div", Gl, [o(s).rules.category.create ? ($(), H(kt, {
5629
5634
  key: 0,
5630
5635
  label: o(a)("menu.tree_editor.actions.add_category"),
5631
5636
  icon: "add",
@@ -5642,7 +5647,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5642
5647
  "is-local-only": !0,
5643
5648
  onSubmit: o(k)
5644
5649
  }, {
5645
- default: B(({
5650
+ default: K(({
5646
5651
  trigger: U
5647
5652
  }) => [C(kt, {
5648
5653
  label: o(a)("menu.catalog.edit.link_product"),
@@ -5662,7 +5667,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5662
5667
  "is-local-only": !0,
5663
5668
  onSubmit: o(k)
5664
5669
  }, {
5665
- default: B(({
5670
+ default: K(({
5666
5671
  trigger: U
5667
5672
  }) => [C(kt, {
5668
5673
  label: o(a)("menu.catalog.edit.apply_scheduler"),
@@ -5670,29 +5675,29 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5670
5675
  onClick: U
5671
5676
  }, null, 8, ["label", "onClick"])]),
5672
5677
  _: 1
5673
- }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : X("", !0), A("div", Gl, [C(St, {
5678
+ }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : X("", !0), N("div", Kl, [C(St, {
5674
5679
  name: "expand_all",
5675
5680
  tooltip: o(a)("menu.tree_editor.actions.expand_all"),
5676
5681
  visible: !0,
5677
- onClick: S[1] || (S[1] = (U) => o(m).expandAllNodes())
5682
+ onClick: S[1] || (S[1] = (U) => o(c).expandAllNodes())
5678
5683
  }, null, 8, ["tooltip"]), C(St, {
5679
5684
  name: "collapse_all",
5680
5685
  tooltip: o(a)("menu.tree_editor.actions.collapse_all"),
5681
5686
  visible: !0,
5682
- onClick: S[2] || (S[2] = (U) => o(m).collapseAllNodes())
5687
+ onClick: S[2] || (S[2] = (U) => o(c).collapseAllNodes())
5683
5688
  }, null, 8, ["tooltip"])])]), C(eo, null, {
5684
- default: B(() => [C(Ul, {
5685
- nodes: o(m).treeNodes,
5686
- selectedNodeId: o(m).selectedNodeId,
5687
- expandedNodeIds: o(m).expandedNodeIds,
5689
+ default: K(() => [C(Ml, {
5690
+ nodes: o(c).treeNodes,
5691
+ selectedNodeId: o(c).selectedNodeId,
5692
+ expandedNodeIds: o(c).expandedNodeIds,
5688
5693
  canDropFn: o(d),
5689
- onUpdateExpandedNodeIds: S[3] || (S[3] = (U) => o(m).setExpandedNodeIds(U)),
5694
+ onUpdateExpandedNodeIds: S[3] || (S[3] = (U) => o(c).setExpandedNodeIds(U)),
5690
5695
  onNodeDragDrop: S[4] || (S[4] = (U) => o(h)(U))
5691
5696
  }, null, 8, ["nodes", "selectedNodeId", "expandedNodeIds", "canDropFn"])]),
5692
5697
  _: 1
5693
5698
  })]));
5694
5699
  }
5695
- }), Bl = { class: "space-y-8" }, zl = /* @__PURE__ */ ae({
5700
+ }), zl = { class: "space-y-8" }, Yl = /* @__PURE__ */ ae({
5696
5701
  __name: "TreeFilter",
5697
5702
  props: /* @__PURE__ */ qt({
5698
5703
  menu: {}
@@ -5704,7 +5709,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5704
5709
  setup(n) {
5705
5710
  const { t: r } = ce(), e = n, t = se();
5706
5711
  at();
5707
- const m = Ht(n, "modelValue"), s = D(() => [
5712
+ const c = Ht(n, "modelValue"), s = D(() => [
5708
5713
  {
5709
5714
  label: r("menu.tree_editor.labels.main_catalog"),
5710
5715
  value: null
@@ -5715,11 +5720,11 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5715
5720
  }))
5716
5721
  ]), g = D(() => {
5717
5722
  var a;
5718
- const b = r("menu.common.labels.catalog"), f = ((a = s.value.find((I) => I.value === m.value.catalogId)) == null ? void 0 : a.label) || r("menu.tree_editor.labels.main_catalog");
5723
+ const b = r("menu.common.labels.catalog"), f = ((a = s.value.find((I) => I.value === c.value.catalogId)) == null ? void 0 : a.label) || r("menu.tree_editor.labels.main_catalog");
5719
5724
  return `${b}: ${f}`;
5720
5725
  }), d = D(() => {
5721
5726
  var a;
5722
- const b = r("menu.common.labels.scheduler"), f = ((a = w.value.find((I) => I.value === m.value.schedulerId)) == null ? void 0 : a.label) || r("menu.tree_editor.labels.all_time");
5727
+ const b = r("menu.common.labels.scheduler"), f = ((a = w.value.find((I) => I.value === c.value.schedulerId)) == null ? void 0 : a.label) || r("menu.tree_editor.labels.all_time");
5723
5728
  return `${b}: ${f}`;
5724
5729
  }), h = D(() => t.isV4), w = D(() => [
5725
5730
  {
@@ -5735,24 +5740,24 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5735
5740
  return (f = (b = t.currentCatalog) == null ? void 0 : b.linkItemRules) == null ? void 0 : f.length;
5736
5741
  });
5737
5742
  return (b, f) => {
5738
- const a = W("FmSearch");
5739
- return $(), J("div", Bl, [
5743
+ const a = j("FmSearch");
5744
+ return $(), J("div", zl, [
5740
5745
  C(Kt, {
5741
- "model-value": m.value.catalogId || "",
5746
+ "model-value": c.value.catalogId || "",
5742
5747
  items: s.value,
5743
5748
  placeholder: o(r)("menu.tree_editor.labels.main_catalog"),
5744
5749
  "search-placeholder": o(r)("common.search"),
5745
5750
  "custom-label": g.value,
5746
- "onUpdate:modelValue": f[0] || (f[0] = (I) => m.value.catalogId = I)
5751
+ "onUpdate:modelValue": f[0] || (f[0] = (I) => c.value.catalogId = I)
5747
5752
  }, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"]),
5748
5753
  h.value ? ($(), H(Kt, {
5749
5754
  key: 0,
5750
- "model-value": m.value.schedulerId || "",
5755
+ "model-value": c.value.schedulerId || "",
5751
5756
  items: w.value,
5752
5757
  placeholder: o(r)("menu.tree_editor.labels.all_time"),
5753
5758
  "search-placeholder": o(r)("common.search"),
5754
5759
  "custom-label": d.value,
5755
- "onUpdate:modelValue": f[1] || (f[1] = (I) => m.value.schedulerId = I)
5760
+ "onUpdate:modelValue": f[1] || (f[1] = (I) => c.value.schedulerId = I)
5756
5761
  }, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"])) : X("", !0),
5757
5762
  _.value ? ($(), H(Po, {
5758
5763
  key: 1,
@@ -5760,19 +5765,19 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5760
5765
  onConfirm: f[2] || (f[2] = (I) => o(t).setRestaurantAttrParams(I)),
5761
5766
  fullWidth: !0
5762
5767
  }, null, 8, ["current-restaurant-attr-params"])) : X("", !0),
5763
- f[4] || (f[4] = A("div", { class: "h-[1px] bg-fm-color-neutral-gray-100" }, null, -1)),
5768
+ f[4] || (f[4] = N("div", { class: "h-[1px] bg-fm-color-neutral-gray-100" }, null, -1)),
5764
5769
  C(a, {
5765
- "model-value": m.value.searchKey || "",
5766
- "onUpdate:modelValue": f[3] || (f[3] = (I) => m.value.searchKey = I),
5770
+ "model-value": c.value.searchKey || "",
5771
+ "onUpdate:modelValue": f[3] || (f[3] = (I) => c.value.searchKey = I),
5767
5772
  placeholder: o(r)("common.search")
5768
5773
  }, null, 8, ["model-value", "placeholder"])
5769
5774
  ]);
5770
5775
  };
5771
5776
  }
5772
- }), Yl = { class: "h-full flex flex-col relative" }, jl = { class: "p-8" }, Wl = { class: "flex-1 p-8" }, ql = {
5777
+ }), jl = { class: "h-full flex flex-col relative" }, Wl = { class: "p-8" }, ql = { class: "flex-1 p-8" }, Hl = {
5773
5778
  key: 0,
5774
5779
  class: "absolute inset-0 flex items-center justify-center tree-overlay"
5775
- }, Hl = { class: "flex items-center justify-center gap-16" }, Xl = /* @__PURE__ */ ae({
5780
+ }, Xl = { class: "flex items-center justify-center gap-16" }, Jl = /* @__PURE__ */ ae({
5776
5781
  __name: "TreePanel",
5777
5782
  props: {
5778
5783
  menu: {},
@@ -5785,46 +5790,46 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5785
5790
  catalogId: null,
5786
5791
  schedulerId: null,
5787
5792
  searchKey: ""
5788
- }), m = se();
5793
+ }), c = se();
5789
5794
  return ye([() => t.value.catalogId, () => t.value.schedulerId], () => {
5790
- m.selectCatalog(t.value.catalogId), m.selectScheduler(t.value.schedulerId);
5795
+ c.selectCatalog(t.value.catalogId), c.selectScheduler(t.value.schedulerId);
5791
5796
  }), (s, g) => {
5792
- const d = W("FmCircularProgress");
5793
- return $(), J("div", Yl, [
5794
- A("div", jl, [
5795
- C(zl, {
5797
+ const d = j("FmCircularProgress");
5798
+ return $(), J("div", jl, [
5799
+ N("div", Wl, [
5800
+ C(Yl, {
5796
5801
  menu: s.menu,
5797
5802
  modelValue: t.value,
5798
5803
  "onUpdate:modelValue": g[0] || (g[0] = (h) => t.value = h)
5799
5804
  }, null, 8, ["menu", "modelValue"])
5800
5805
  ]),
5801
- A("div", Wl, [
5802
- C(Kl, {
5806
+ N("div", ql, [
5807
+ C(Bl, {
5803
5808
  menu: s.menu,
5804
5809
  "overrided-menu": s.overridedMenu,
5805
5810
  "filter-state": t.value,
5806
5811
  onTreeEvent: g[1] || (g[1] = (h) => e("tree-event", h))
5807
5812
  }, null, 8, ["menu", "overrided-menu", "filter-state"])
5808
5813
  ]),
5809
- s.loading ? ($(), J("div", ql, [
5810
- A("div", Hl, [
5814
+ s.loading ? ($(), J("div", Hl, [
5815
+ N("div", Xl, [
5811
5816
  C(d, { size: "lg" })
5812
5817
  ])
5813
5818
  ])) : X("", !0)
5814
5819
  ]);
5815
5820
  };
5816
5821
  }
5817
- }), Jl = { class: "pl-24 scroll-y-auto h-full overflow-y-auto relative" }, Ql = { key: 1 }, Zl = { class: "text-center text-sm text-gray-500 p-16" }, ei = /* @__PURE__ */ ae({
5822
+ }), Ql = { class: "pl-24 scroll-y-auto h-full overflow-y-auto relative" }, Zl = { key: 1 }, ei = { class: "text-center text-sm text-gray-500 p-16" }, ti = /* @__PURE__ */ ae({
5818
5823
  __name: "TreeEditor",
5819
5824
  props: {
5820
5825
  menu: {}
5821
5826
  },
5822
5827
  setup(n) {
5823
- const { t: r } = ce(), e = n, t = se(), m = at();
5828
+ const { t: r } = ce(), e = n, t = se(), c = at();
5824
5829
  Ae(() => {
5825
5830
  t.$reinitialize(), t.setMenu(ke.cloneDeep(e.menu)), t.computeMergedMenu();
5826
5831
  }), Ot(() => {
5827
- t.$dispose(), m.setExpandedNodeIds([]), m.setSelectedNodeId(null);
5832
+ t.$dispose(), c.setExpandedNodeIds([]), c.setSelectedNodeId(null);
5828
5833
  });
5829
5834
  const s = q(null), { currentItemId: g, initialForm: d, itemFormKey: h } = ir(t), { saveItemFormEditingStateDebounced: w } = or(s, t), _ = q(null);
5830
5835
  async function b(a) {
@@ -5853,20 +5858,20 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5853
5858
  if (!k || k.length > 0)
5854
5859
  return !1;
5855
5860
  }
5856
- return a && (g.value = a, m.setSelectedNodeByItemId(a)), !0;
5861
+ return a && (g.value = a, c.setSelectedNodeByItemId(a)), !0;
5857
5862
  }
5858
- return (a, I) => ($(), H(ml, null, {
5859
- "left-panel": B(() => [
5860
- C(Xl, {
5863
+ return (a, I) => ($(), H(pl, null, {
5864
+ "left-panel": K(() => [
5865
+ C(Jl, {
5861
5866
  menu: a.menu,
5862
5867
  "overrided-menu": o(t).mergedMenu,
5863
5868
  loading: o(t).workerIsComputing,
5864
5869
  onTreeEvent: b
5865
5870
  }, null, 8, ["menu", "overrided-menu", "loading"])
5866
5871
  ]),
5867
- "right-panel": B(() => [
5868
- A("div", Jl, [
5869
- o(d) ? ($(), H(nl, {
5872
+ "right-panel": K(() => [
5873
+ N("div", Ql, [
5874
+ o(d) ? ($(), H(ol, {
5870
5875
  ref_key: "itemFormRef",
5871
5876
  ref: s,
5872
5877
  key: o(h),
@@ -5876,24 +5881,24 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5876
5881
  "category-id": null,
5877
5882
  focused: _.value,
5878
5883
  "onUpdate:editingState": o(w)
5879
- }, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : ($(), J("div", Ql, [
5880
- A("div", Zl, ge(o(r)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)
5884
+ }, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : ($(), J("div", Zl, [
5885
+ N("div", ei, ge(o(r)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)
5881
5886
  ]))
5882
5887
  ])
5883
5888
  ]),
5884
5889
  _: 1
5885
5890
  }));
5886
5891
  }
5887
- }), ti = {
5892
+ }), ni = {
5888
5893
  class: /* @__PURE__ */ fe([
5889
5894
  "flex items-center",
5890
5895
  "px-24 pt-16 pb-8",
5891
5896
  "border-b border-fm-color-neutral-gray-100",
5892
5897
  "space-x-4"
5893
5898
  ])
5894
- }, ni = { class: "fm-typo-en-title-sm-600 mr-auto" }, oi = { class: "flex items-center gap-8" }, ri = {
5899
+ }, oi = { class: "fm-typo-en-title-sm-600 mr-auto" }, ri = { class: "flex items-center gap-8" }, ai = {
5895
5900
  class: /* @__PURE__ */ fe(["flex flex-col", "flex-1 overflow-scroll", "w-full"])
5896
- }, ai = /* @__PURE__ */ ae({
5901
+ }, li = /* @__PURE__ */ ae({
5897
5902
  __name: "TreeEditorForm",
5898
5903
  props: {
5899
5904
  menu: {},
@@ -5901,12 +5906,12 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5901
5906
  },
5902
5907
  emits: ["update:show", "submit"],
5903
5908
  setup(n, { emit: r }) {
5904
- const e = n, t = Ue(), { minor: m } = ot(t), { t: s } = ce(), g = r, d = () => {
5909
+ const e = n, t = Ue(), { minor: c } = ot(t), { t: s } = ce(), g = r, d = () => {
5905
5910
  g("update:show", !1);
5906
5911
  }, h = ln(), w = se();
5907
5912
  w.selectCatalog(null), w.selectScheduler(null);
5908
5913
  const _ = q(!1), b = () => {
5909
- m(
5914
+ c(
5910
5915
  async () => {
5911
5916
  wn(), await nt();
5912
5917
  const a = w.state.menu, I = mo(a);
@@ -5925,10 +5930,10 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5925
5930
  }
5926
5931
  );
5927
5932
  return (a, I) => {
5928
- const F = W("fm-button"), O = W("fm-form");
5933
+ const F = j("fm-button"), O = j("fm-form");
5929
5934
  return $(), H(Rn, { to: "body" }, [
5930
5935
  C(Un, { name: "fade" }, {
5931
- default: B(() => [
5936
+ default: K(() => [
5932
5937
  C(O, {
5933
5938
  "blame-form-child-on-validation-failed": "",
5934
5939
  class: fe(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
@@ -5937,10 +5942,10 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5937
5942
  onValidationSuccess: b,
5938
5943
  onKeyup: Mn(o(f), ["esc"])
5939
5944
  }, {
5940
- default: B(() => [
5941
- A("div", ti, [
5942
- A("p", ni, ge(o(s)("menu.tree_editor.title")), 1),
5943
- A("div", oi, [
5945
+ default: K(() => [
5946
+ N("div", ni, [
5947
+ N("p", oi, ge(o(s)("menu.tree_editor.title")), 1),
5948
+ N("div", ri, [
5944
5949
  C(F, {
5945
5950
  icon: "undo",
5946
5951
  disabled: !o(w).canUndoHistory,
@@ -5966,8 +5971,8 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5966
5971
  }, null, 8, ["label", "loading"])
5967
5972
  ])
5968
5973
  ]),
5969
- A("div", ri, [
5970
- C(ei, { menu: a.menu }, null, 8, ["menu"])
5974
+ N("div", ai, [
5975
+ C(ti, { menu: a.menu }, null, 8, ["menu"])
5971
5976
  ])
5972
5977
  ]),
5973
5978
  _: 1
@@ -5978,21 +5983,21 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5978
5983
  ]);
5979
5984
  };
5980
5985
  }
5981
- }), li = /* @__PURE__ */ Ze(ai, [["__scopeId", "data-v-6c3052b3"]]), Mi = /* @__PURE__ */ ae({
5986
+ }), ii = /* @__PURE__ */ Ze(li, [["__scopeId", "data-v-6c3052b3"]]), Ai = /* @__PURE__ */ ae({
5982
5987
  __name: "TreeEditorOpenner",
5983
5988
  setup(n) {
5984
5989
  const r = ln(), e = an();
5985
5990
  function t() {
5986
- m();
5991
+ c();
5987
5992
  }
5988
- const m = () => {
5993
+ const c = () => {
5989
5994
  e.open({
5990
- component: li,
5995
+ component: ii,
5991
5996
  props: { menu: r.state.menu }
5992
5997
  });
5993
5998
  };
5994
5999
  function s(g) {
5995
- g.data.type === to && m();
6000
+ g.data.type === to && c();
5996
6001
  }
5997
6002
  return Ae(() => {
5998
6003
  window.addEventListener("message", s);
@@ -6002,5 +6007,5 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
6002
6007
  }
6003
6008
  });
6004
6009
  export {
6005
- Mi as _
6010
+ Ai as _
6006
6011
  };