@feedmepos/mf-menu 0.32.35-dev.1 → 0.32.35-dev.3

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 (70) hide show
  1. package/dist/{App-BzWe8Uvj.js → App-C6c0q66Y.js} +5 -5
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DYjlqbN7.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Bfjp18UF.js} +3 -3
  3. package/dist/{Catalog-ChIGeMmh.js → Catalog-CYDzH1SY.js} +6 -6
  4. package/dist/{Category-BhiVre7E.js → Category-8lLNfsd8.js} +4 -4
  5. package/dist/{Category-DJYFyAlr.js → Category-BiWXNjhu.js} +6 -6
  6. package/dist/{CookingGuide-DiQjDEx1.js → CookingGuide-CWiUtVy3.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CxP3kwuG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-C4DUgTIj.js} +1 -1
  8. package/dist/{Group-CIjmKw5F.js → Group-cn9ZBUtD.js} +1 -1
  9. package/dist/{Group-C8KVjOuR.js → Group-dkIIcfAu.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-C0biXtU9.js → Group.vue_vue_type_script_setup_true_lang-CXnqaOhB.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CN6QzNEo.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CdWjthaH.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C-vMDcb_.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CRJo3baN.js} +503 -503
  13. package/dist/{Ingredient-DjQB-NOL.js → Ingredient-BTreZ3t_.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DB5cUv7Z.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DJ86IPiW.js} +2 -2
  15. package/dist/{LinkProductSideSheet-DUW50WjI.js → LinkProductSideSheet-BxRBvPgo.js} +3 -3
  16. package/dist/{MenuSetting-BWAZj7dX.js → MenuSetting-CLTYbAhq.js} +5 -5
  17. package/dist/{PrintRoute-ByelSlIG.js → PrintRoute-D84ivR5v.js} +4 -4
  18. package/dist/{Product-BFu79kGM.js → Product-D2klIZ4Z.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-x0bVhfT4.js → Product.vue_vue_type_script_setup_true_lang-22sHquTq.js} +12 -12
  20. package/dist/{ProductInternalTools-dSPhGflJ.js → ProductInternalTools-C8kVl3DU.js} +5 -5
  21. package/dist/{Products-CUd7XXNE.js → Products-GFTOBVe4.js} +51 -51
  22. package/dist/{Publish-BvWptcq3.js → Publish-DoYvbcML.js} +3 -3
  23. package/dist/{Recipe-3GkzuHsP.js → Recipe-DHRib-WR.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-BVwkpEAd.js → RuleView.vue_vue_type_script_setup_true_lang-D3xdiLyn.js} +207 -207
  25. package/dist/{Scheduler-Ddmi0jwf.js → Scheduler-aNG6AwGF.js} +3 -3
  26. package/dist/{ServingSequence-BXf7ufLp.js → ServingSequence-dsu0dTxN.js} +3 -3
  27. package/dist/{Setting-O91sZmgt.js → Setting-CEt_cruE.js} +5 -5
  28. package/dist/{Subcategory-ivvKI-XS.js → Subcategory-eqT29eSo.js} +4 -4
  29. package/dist/{Takeaway-CdteaHZP.js → Takeaway-B4ybUpNn.js} +4 -4
  30. package/dist/{Takeaway-AqKbd_C1.js → Takeaway-BecC62KL.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CH1LceVZ.js → Takeaway.vue_vue_type_script_setup_true_lang-D2pFaJad.js} +5 -5
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-6qa3uXk9.js → Thumbnail.vue_vue_type_script_setup_true_lang-Cund4YhY.js} +4 -4
  33. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CQRhrt55.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Bqt4D49X.js} +14 -14
  34. package/dist/{Unit-BUutOvsG.js → Unit-Dg0C1MNz.js} +2 -2
  35. package/dist/{Variant-CYvVGbpw.js → Variant-BczMAHfC.js} +3 -3
  36. package/dist/{_id_-FI4ZSVya.js → _id_-CqLikKDW.js} +9 -9
  37. package/dist/{app-DiL-mEcK.js → app-CS8sxrCm.js} +1 -1
  38. package/dist/{app-0KQiKdHm.js → app-fcJDbW6R.js} +26 -26
  39. package/dist/app.js +1 -1
  40. package/dist/apps/mf-menu/src/api/menu.d.ts +7 -3
  41. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -2
  42. package/dist/apps/mf-menu/src/helper/menu.d.ts +8197 -1
  43. package/dist/apps/mf-menu/src/manager/menu/priceTier.d.ts +1 -2
  44. package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -2
  45. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  46. package/dist/assets/{linked-status-DOg4o4dy.js → linked-status-DYGs2IRB.js} +2 -2
  47. package/dist/assets/{menu-export-DNLxPVYW.js → menu-export-tp-e3hN_.js} +2 -2
  48. package/dist/assets/{override-menu-BxYqRdeo.js → override-menu-lcDyrVhB.js} +2 -2
  49. package/dist/assets/{validate-menu-pI-32809.js → validate-menu-CubcMAjN.js} +2 -2
  50. package/dist/{catalog-D6_MOMZf.js → catalog-C1m61CRK.js} +1 -1
  51. package/dist/{catalogSetting-B7DuLcvA.js → catalogSetting-Bm40q-Gc.js} +1 -1
  52. package/dist/{category-DqcrBtmK.js → category-Baqh5CL-.js} +1 -1
  53. package/dist/{currency-B_wCUg8j.js → currency-D2fa3ERg.js} +1 -1
  54. package/dist/{dayjs.min-NI4A7SJa.js → dayjs.min-DvMxjMCb.js} +1 -1
  55. package/dist/{index-RgbcePnc.js → index-BMeOJk5M.js} +4 -4
  56. package/dist/{index-BNiYICU6.js → index-CXEIHsJW.js} +3 -3
  57. package/dist/{index-C1i4JAw4.js → index-DGm-8nbU.js} +1 -1
  58. package/dist/{index.vue_vue_type_script_setup_true_lang-Poy5TrUi.js → index.vue_vue_type_script_setup_true_lang-CNDgm-I2.js} +5454 -5502
  59. package/dist/{item-CmIhsq0_.js → item-C16ck6da.js} +168 -172
  60. package/dist/{jszip.min-BwMoN80b.js → jszip.min-BC_Gr2sa.js} +2 -2
  61. package/dist/{menu-DhKwMbK-.js → menu-DUGAQ62C.js} +1 -1
  62. package/dist/{menuV2-DUxGxTq5.js → menuV2-D-Vf5_GY.js} +24 -24
  63. package/dist/mf-menu.css +1 -1
  64. package/dist/{priceTier-ByAHwVfm.js → priceTier-wT1ehdfT.js} +1 -1
  65. package/dist/{scheduler-DX3aEiWA.js → scheduler-Cw_dGKHv.js} +4 -4
  66. package/dist/{subcategory-BztIbm_U.js → subcategory-CAvVELou.js} +2 -2
  67. package/dist/{toExcel-VkCBaA8O.js → toExcel-Cdxr1InP.js} +2 -2
  68. package/dist/{unit-DUDI_t_A.js → unit--vHcoDUA.js} +2 -2
  69. package/package.json +1 -1
  70. package/dist/apps/mf-menu/src/helper/menuSanitizer.d.ts +0 -8205
@@ -1,33 +1,33 @@
1
1
  import { defineStore as Oi } from "pinia";
2
2
  import { defineComponent as de, resolveComponent as L, createElementBlock as ne, createBlock as H, openBlock as O, createElementVNode as $, createVNode as g, toDisplayString as ce, Fragment as Se, renderList as $e, h as Ce, ref as ie, computed as M, watch as Ae, unref as h, renderSlot as fe, withCtx as N, createCommentVNode as te, Transition as gn, normalizeClass as Fe, resolveDynamicComponent as St, withDirectives as ut, vShow as Ct, mergeProps as Fi, withModifiers as kt, onMounted as ot, onUnmounted as bn, createTextVNode as Vt, resolveDirective as zi, getCurrentInstance as Ii, markRaw as yn, render as Ut, mergeModels as _n, useModel as wn, nextTick as Ei, normalizeProps as Sn, guardReactiveProps as Cn, normalizeStyle as kn } from "vue";
3
- import { M as ke, A as Y, am as xn, ao as Rn, $ as An, I as ue, D as Ee, B as Re, W as Mn, u as ye, J as Te, G as Xe, Q as qe, R as On, T as Fn, U as zn, V as Ft, ag as In, X as En, O as Tn, N as hi } from "./index.vue_vue_type_script_setup_true_lang-Poy5TrUi.js";
3
+ import { M as ke, A as Y, am as xn, ao as Rn, $ as An, I as ue, D as Ee, B as Re, W as Mn, u as ye, J as Te, G as Xe, Q as qe, R as On, T as Fn, U as zn, V as Ft, ag as In, X as En, O as Tn, N as hi } from "./index.vue_vue_type_script_setup_true_lang-CNDgm-I2.js";
4
4
  import { useI18n as pe, useCoreStore as pt, CustomAttributesForm as Ti } from "@feedmepos/mf-common";
5
5
  import { useDialog as Le, useSnackbar as Ne, components as Me, FmButtonColorThemeVariant as je, FmButtonVariant as Ze, useBreakpoints as Di, useDialogChild as Pi } from "@feedmepos/ui-library";
6
- import { C as Ke } from "./catalog-D6_MOMZf.js";
6
+ import { C as Ke } from "./catalog-C1m61CRK.js";
7
7
  import { c as Dn } from "./createComponentProgrammatically-Bt2rn1IQ.js";
8
8
  import { a as fi, _ as Vi } from "./tooltip-B5BiPMx9.js";
9
- import { H as Pn, L as Vn } from "./LinkProductSideSheet-DUW50WjI.js";
10
- import { e as Un, _ as De, a as $n } from "./RuleView.vue_vue_type_script_setup_true_lang-BVwkpEAd.js";
9
+ import { H as Pn, L as Vn } from "./LinkProductSideSheet-BxRBvPgo.js";
10
+ import { e as Un, _ as De, a as $n } from "./RuleView.vue_vue_type_script_setup_true_lang-D3xdiLyn.js";
11
11
  import { s as $t, F as Nn, _ as Bn } from "./index-CisutoS9.js";
12
- import { a as Ln } from "./app-0KQiKdHm.js";
12
+ import { a as Ln } from "./app-fcJDbW6R.js";
13
13
  import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- import { g as Ui, b as Gn, c as jn, a as Kn, m as Wn } from "./menuV2-DUxGxTq5.js";
14
+ import { g as Ui, b as Gn, c as jn, a as Kn, m as Wn } from "./menuV2-D-Vf5_GY.js";
15
15
  import { useAppStore as Ht, RemyButton as $i } from "@feedmepos/mf-remy-panel";
16
16
  import { _ as Ye } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
17
- import { u as Yn } from "./subcategory-BztIbm_U.js";
18
- import { u as Hn } from "./category-DqcrBtmK.js";
17
+ import { u as Yn } from "./subcategory-CAvVELou.js";
18
+ import { u as Hn } from "./category-Baqh5CL-.js";
19
19
  import { u as Xt } from "./discardConfirm-BHni0LNu.js";
20
- import { _ as et, l as Nt, T as Xn } from "./index-RgbcePnc.js";
20
+ import { _ as et, l as Nt, T as Xn } from "./index-BMeOJk5M.js";
21
21
  import { useInventoryStore as Ni, InventoryBindingForm as qn, InventoryBindingSummary as Zn } from "@feedmepos/mf-inventory-portal";
22
22
  import { c as ht } from "./check-C9mY6LiX.js";
23
23
  import { c as Qn } from "./object-DVUNCr7w.js";
24
- import { f as at } from "./currency-B_wCUg8j.js";
25
- import { u as Bi } from "./priceTier-ByAHwVfm.js";
24
+ import { f as at } from "./currency-D2fa3ERg.js";
25
+ import { u as Bi } from "./priceTier-wT1ehdfT.js";
26
26
  import { u as Jn } from "./search-BAPEUu1R.js";
27
27
  import { c as eo } from "./string-DpfFixWH.js";
28
28
  import { d as Li } from "./vuedraggable-CK8z7qA8.js";
29
- import { _ as to } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DYjlqbN7.js";
30
- import { V as vi } from "./index-BNiYICU6.js";
29
+ import { _ as to } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Bfjp18UF.js";
30
+ import { V as vi } from "./index-CXEIHsJW.js";
31
31
  class _t {
32
32
  constructor(i, t, n, a) {
33
33
  this.scheduler = i, this.menuStore = t, this.updateMenu = n, this.dialog = a;
@@ -382,11 +382,11 @@ class ji {
382
382
  const a = this.menuStore.state.menu.modules.item, o = this.menuStore.state.menu.modules.group, r = this.menuStore.items, l = this.menuStore.rules.group.linkAddonName;
383
383
  function s(u, c) {
384
384
  const d = u.items.reduce((p, v) => {
385
- var V, I, D, C;
385
+ var U, I, D, C;
386
386
  const y = a.find((_) => v._id === _._id);
387
387
  if (!y && t) return p;
388
388
  const b = v.combinationKey ? {
389
- ...(V = y == null ? void 0 : y.variant) == null ? void 0 : V.variantCombinations.find(
389
+ ...(U = y == null ? void 0 : y.variant) == null ? void 0 : U.variantCombinations.find(
390
390
  (_) => _.combinationKey === v.combinationKey
391
391
  ),
392
392
  name: Mn(ye().variants, ((I = y == null ? void 0 : y.variant) == null ? void 0 : I.variantGroupIds) || [])[v.combinationKey]
@@ -864,8 +864,8 @@ const Oo = /* @__PURE__ */ it(Ro, [["render", Mo]]), Fo = { class: "flex flex-co
864
864
  disabled: A.disabled,
865
865
  "has-checkbox": !0,
866
866
  label: A.label,
867
- "model-value": r.value.some((V) => V.value === A.value),
868
- "onUpdate:modelValue": (V) => l(V, A)
867
+ "model-value": r.value.some((U) => U.value === A.value),
868
+ "onUpdate:modelValue": (U) => l(U, A)
869
869
  }, null, 8, ["disabled", "label", "model-value", "onUpdate:modelValue"]))), 128)),
870
870
  fe(v.$slots, "append-menu", {}, void 0, !0)
871
871
  ])
@@ -2558,9 +2558,9 @@ const va = {
2558
2558
  },
2559
2559
  { immediate: !0 }
2560
2560
  ), (f, w) => {
2561
- const T = L("FmIcon"), z = L("FmField"), G = L("FmMenuItem"), A = L("FmMenu"), V = L("FmFormGroup"), I = L("FmChipGroup");
2561
+ const T = L("FmIcon"), z = L("FmField"), G = L("FmMenuItem"), A = L("FmMenu"), U = L("FmFormGroup"), I = L("FmChipGroup");
2562
2562
  return O(), ne("div", Aa, [
2563
- g(V, {
2563
+ g(U, {
2564
2564
  "model-value": f.modelValue,
2565
2565
  disabled: f.disabled,
2566
2566
  focused: k.value,
@@ -2700,17 +2700,17 @@ const Wa = /* @__PURE__ */ de({
2700
2700
  }), {
2701
2701
  checkMenuIsLoading: c
2702
2702
  } = qe(Xe(Ne())), d = i, m = M(() => n.rules.item), p = M(() => n.categorizedItems), v = M(() => {
2703
- const U = p.value.map((B) => ({
2703
+ const V = p.value.map((B) => ({
2704
2704
  label: B.name,
2705
2705
  value: B.id
2706
2706
  }));
2707
- return t.isAddon ? U : U.filter((B) => !!B.value);
2708
- }), y = M(() => m.value.addon), b = M(() => !v.value.find((U) => !!U.value)), k = M(() => On(t.form.category ? t.form : t.fallback) || []), f = M(() => k.value.reduce((U, B) => (U[B._id] = B, U), {})), w = M({
2707
+ return t.isAddon ? V : V.filter((B) => !!B.value);
2708
+ }), y = M(() => m.value.addon), b = M(() => !v.value.find((V) => !!V.value)), k = M(() => On(t.form.category ? t.form : t.fallback) || []), f = M(() => k.value.reduce((V, B) => (V[B._id] = B, V), {})), w = M({
2709
2709
  get() {
2710
- return k.value.map((U) => U._id);
2710
+ return k.value.map((V) => V._id);
2711
2711
  },
2712
- set(U = []) {
2713
- const [B, ...R] = U.map((E) => {
2712
+ set(V = []) {
2713
+ const [B, ...R] = V.map((E) => {
2714
2714
  const K = f.value[E];
2715
2715
  return K || {
2716
2716
  _id: E,
@@ -2724,7 +2724,7 @@ const Wa = /* @__PURE__ */ de({
2724
2724
  d("update:form", "category", B._id), d("update:form", "additionalCategories", R);
2725
2725
  }
2726
2726
  }), T = ie(), z = ({
2727
- multiple: U = !0
2727
+ multiple: V = !0
2728
2728
  } = {}) => t.isAddon ? null : g(To, {
2729
2729
  ref: T,
2730
2730
  disabled: !m.value.category || t.isAddon || c(),
@@ -2732,7 +2732,7 @@ const Wa = /* @__PURE__ */ de({
2732
2732
  modelValue: w.value,
2733
2733
  "onUpdate:model-value": (B) => w.value = B,
2734
2734
  placeholder: F("menu.product.form.detail.category.placeholder"),
2735
- multiple: U
2735
+ multiple: V
2736
2736
  }, {
2737
2737
  "append-menu": () => g("button", {
2738
2738
  class: "flex items-center py-8 px-16 space-x-8",
@@ -2754,34 +2754,34 @@ const Wa = /* @__PURE__ */ de({
2754
2754
  });
2755
2755
  const G = M(() => {
2756
2756
  var B;
2757
- const U = t.form.name || ((B = t.fallback) == null ? void 0 : B.name);
2758
- return U ? n.items.filter((R) => !!R.category && R._id !== t.form._id && R.name === U).length : 0;
2757
+ const V = t.form.name || ((B = t.fallback) == null ? void 0 : B.name);
2758
+ return V ? n.items.filter((R) => !!R.category && R._id !== t.form._id && R.name === V).length : 0;
2759
2759
  }), A = M(() => {
2760
2760
  var E, K, q;
2761
2761
  if (!n.state.featureFlags.uniqueProductCode) return 0;
2762
- const U = t.form.code || ((E = t.fallback) == null ? void 0 : E.code);
2763
- if (!U) return 0;
2764
- let B = n.itemCodeMap.get(U) || 0;
2762
+ const V = t.form.code || ((E = t.fallback) == null ? void 0 : E.code);
2763
+ if (!V) return 0;
2764
+ let B = n.itemCodeMap.get(V) || 0;
2765
2765
  const R = n.items.find((Z) => Z._id === t.form._id);
2766
- return (R == null ? void 0 : R.code) === U && (B -= 1), (q = (K = R == null ? void 0 : R.variant) == null ? void 0 : K.variantCombinations) == null || q.forEach((Z) => {
2767
- Z.code === U && (B -= 1);
2766
+ return (R == null ? void 0 : R.code) === V && (B -= 1), (q = (K = R == null ? void 0 : R.variant) == null ? void 0 : K.variantCombinations) == null || q.forEach((Z) => {
2767
+ Z.code === V && (B -= 1);
2768
2768
  }), B;
2769
- }), V = M(() => t.isAddon ? Je.ADD_ON : Je.PRODUCT);
2770
- function I(U) {
2769
+ }), U = M(() => t.isAddon ? Je.ADD_ON : Je.PRODUCT);
2770
+ function I(V) {
2771
2771
  var R, E, K;
2772
- if (V.value === U) return;
2773
- const B = U == Je.ADD_ON;
2772
+ if (U.value === V) return;
2773
+ const B = V == Je.ADD_ON;
2774
2774
  d("update:form", "category", t.isOverride ? B ? "" : ((R = t.fallback) == null ? void 0 : R.category) ?? ((E = v.value.find((q) => !!q.value)) == null ? void 0 : E.value) : B ? null : (K = v.value.find((q) => !!q.value)) == null ? void 0 : K.value), B && d("update:form", "additionalCategories", []);
2775
2775
  }
2776
2776
  const D = Ht();
2777
- ti("apply-description", (U) => {
2778
- d("update:form", "description", U || "");
2777
+ ti("apply-description", (V) => {
2778
+ d("update:form", "description", V || "");
2779
2779
  });
2780
2780
  async function C() {
2781
2781
  if (!t.form.name) {
2782
- const U = document.getElementById("product-name");
2783
- if (U) {
2784
- U.focus();
2782
+ const V = document.getElementById("product-name");
2783
+ if (V) {
2784
+ V.focus();
2785
2785
  return;
2786
2786
  } else
2787
2787
  return;
@@ -2793,24 +2793,24 @@ const Wa = /* @__PURE__ */ de({
2793
2793
  command: "suggestDescription"
2794
2794
  });
2795
2795
  }
2796
- const _ = M(() => n.subcategories), S = M(() => _.value.map((U) => ({
2797
- label: U.name,
2798
- value: U._id
2796
+ const _ = M(() => n.subcategories), S = M(() => _.value.map((V) => ({
2797
+ label: V.name,
2798
+ value: V._id
2799
2799
  }))), P = M({
2800
2800
  get() {
2801
2801
  return t.form.subCategories || [];
2802
2802
  },
2803
- set(U) {
2804
- d("update:form", "subCategories", U);
2803
+ set(V) {
2804
+ d("update:form", "subCategories", V);
2805
2805
  }
2806
2806
  }), j = M(() => t.isOverride ? t.form.minimumOrderQuantity ?? null : t.form.minimumOrderQuantity ?? 0);
2807
- function x(U) {
2808
- d("update:form", "minimumOrderQuantity", t.isOverride ? U : U ?? 0);
2807
+ function x(V) {
2808
+ d("update:form", "minimumOrderQuantity", t.isOverride ? V : V ?? 0);
2809
2809
  }
2810
2810
  const {
2811
2811
  t: F
2812
2812
  } = pe();
2813
- return (U, B) => {
2813
+ return (V, B) => {
2814
2814
  const R = L("fm-text-field"), E = L("fm-textarea"), K = L("fm-radio"), q = L("FmSnackbar"), Z = L("FmButton"), ae = L("fm-radio-group"), Q = L("FmFormGroup"), re = L("FmStepperField"), ve = zi("tooltip");
2815
2815
  return O(), H(De, {
2816
2816
  title: h(F)("menu.product.form.detail.title")
@@ -2818,21 +2818,21 @@ const Wa = /* @__PURE__ */ de({
2818
2818
  default: N(() => {
2819
2819
  var xe, ct;
2820
2820
  return [$("div", Ea, [$("div", Ta, [$("div", Da, [$("div", Pa, [g(R, {
2821
- "model-value": U.form.code,
2822
- placeholder: ((xe = U.fallback) == null ? void 0 : xe.code) || h(F)("menu.product.form.detail.fields.code.placeholder"),
2821
+ "model-value": V.form.code,
2822
+ placeholder: ((xe = V.fallback) == null ? void 0 : xe.code) || h(F)("menu.product.form.detail.fields.code.placeholder"),
2823
2823
  label: h(F)("menu.product.form.detail.fields.code.label"),
2824
2824
  rules: [(oe) => A.value === 0 || h(F)("menu.product.form.detail.fields.code.duplicate_warning", {
2825
2825
  count: A.value
2826
2826
  })],
2827
- "onUpdate:modelValue": B[0] || (B[0] = (oe) => d("update:form", "code", h(cn)(oe, U.isOverride)))
2827
+ "onUpdate:modelValue": B[0] || (B[0] = (oe) => d("update:form", "code", h(cn)(oe, V.isOverride)))
2828
2828
  }, null, 8, ["model-value", "placeholder", "label", "rules"])]), $("div", Va, [g(R, {
2829
2829
  id: "product-name",
2830
2830
  disabled: !m.value.name,
2831
2831
  "helper-text": G.value > 0 ? h(F)("menu.product.form.detail.fields.name.duplicate_warning", {
2832
2832
  count: G.value
2833
2833
  }) : void 0,
2834
- "model-value": U.form.name,
2835
- placeholder: (ct = U.fallback) == null ? void 0 : ct.name,
2834
+ "model-value": V.form.name,
2835
+ placeholder: (ct = V.fallback) == null ? void 0 : ct.name,
2836
2836
  rules: m.value.name ? [(oe) => !!oe || h(F)("menu.product.form.detail.fields.name.required")] : void 0,
2837
2837
  "label-mark": "required",
2838
2838
  autofocus: "",
@@ -2840,7 +2840,7 @@ const Wa = /* @__PURE__ */ de({
2840
2840
  "onUpdate:modelValue": B[1] || (B[1] = (oe) => d("update:form", "name", oe))
2841
2841
  }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), $("div", Ua, [g(E, {
2842
2842
  disabled: !m.value.description,
2843
- "model-value": U.form.description || void 0,
2843
+ "model-value": V.form.description || void 0,
2844
2844
  placeholder: h(F)("menu.product.form.detail.fields.description.placeholder"),
2845
2845
  "onUpdate:modelValue": B[2] || (B[2] = (oe) => d("update:form", "description", oe.trim())),
2846
2846
  class: "description"
@@ -2852,7 +2852,7 @@ const Wa = /* @__PURE__ */ de({
2852
2852
  onClick: C
2853
2853
  }, null, 512), [[ve, h(Vi)("Suggest description")]])])]), g(Ra, {
2854
2854
  disabled: !m.value.thumbnail,
2855
- "model-value": U.thumbnail,
2855
+ "model-value": V.thumbnail,
2856
2856
  "onUpdate:modelValue": B[3] || (B[3] = (oe) => d("update:thumbnail", oe)),
2857
2857
  "onReset:modelValue": B[4] || (B[4] = (oe) => d("reset:thumbnail")),
2858
2858
  "onUpdate:trackingId": B[5] || (B[5] = (oe) => d("update:form", "_thumbnailTrackingId", oe))
@@ -2862,7 +2862,7 @@ const Wa = /* @__PURE__ */ de({
2862
2862
  default: N(() => [y.value ? (O(), H(ae, {
2863
2863
  key: 0,
2864
2864
  disabled: !m.value.category,
2865
- "model-value": V.value,
2865
+ "model-value": U.value,
2866
2866
  "onUpdate:modelValue": B[6] || (B[6] = (oe) => I(oe))
2867
2867
  }, {
2868
2868
  default: N(() => [$("div", Ba, [$("div", La, [g(K, {
@@ -2891,8 +2891,8 @@ const Wa = /* @__PURE__ */ de({
2891
2891
  _: 1
2892
2892
  }, 8, ["disabled", "model-value"])) : te("", !0), h(n).isV4 ? te("", !0) : (O(), H(Q, {
2893
2893
  key: 1,
2894
- "model-value": U.form.category,
2895
- rules: [(oe) => !oe && !U.isOverride ? "Category is required" : !0],
2894
+ "model-value": V.form.category,
2895
+ rules: [(oe) => !oe && !V.isOverride ? "Category is required" : !0],
2896
2896
  "onUpdate:modelValue": B[7] || (B[7] = (oe) => d("update:form", "category", oe))
2897
2897
  }, {
2898
2898
  default: N(() => [g(z, {
@@ -2901,7 +2901,7 @@ const Wa = /* @__PURE__ */ de({
2901
2901
  _: 1
2902
2902
  }, 8, ["model-value", "rules"]))]),
2903
2903
  _: 1
2904
- }, 8, ["label"]), h(n).isV4 && !U.isAddon ? (O(), H(Ye, {
2904
+ }, 8, ["label"]), h(n).isV4 && !V.isAddon ? (O(), H(Ye, {
2905
2905
  key: 0,
2906
2906
  label: h(F)("menu.product.form.detail.path.label")
2907
2907
  }, {
@@ -2916,7 +2916,7 @@ const Wa = /* @__PURE__ */ de({
2916
2916
  _: 1
2917
2917
  }, 8, ["label"])) : te("", !0), $("div", Ka, [g(re, {
2918
2918
  label: "Shelf Life (mins)",
2919
- "model-value": U.form.shelfLife ?? null,
2919
+ "model-value": V.form.shelfLife ?? null,
2920
2920
  rules: [(oe) => oe == null || oe > 0 || h(F)("menu.common.validation.min_value", {
2921
2921
  value: 1
2922
2922
  })],
@@ -2931,7 +2931,7 @@ const Wa = /* @__PURE__ */ de({
2931
2931
  "onUpdate:modelValue": x
2932
2932
  }, null, 8, ["label", "model-value"])]), g(ii, {
2933
2933
  disabled: !m.value.orderFrom,
2934
- "model-value": U.form.orderFrom,
2934
+ "model-value": V.form.orderFrom,
2935
2935
  "order-from-none": m.value.orderFromNone,
2936
2936
  required: m.value.orderFrom,
2937
2937
  "default-label": h(F)("menu.product.form.detail.order_from.default"),
@@ -3602,7 +3602,7 @@ const mn = /* @__PURE__ */ de({
3602
3602
  orderFrom: y(null).showOrderFrom
3603
3603
  // action: rules(null).inventory || rules(null).link
3604
3604
  }));
3605
- async function V() {
3605
+ async function U() {
3606
3606
  const R = (/* @__PURE__ */ new Date()).toISOString();
3607
3607
  n("update:group", {
3608
3608
  ...t.group,
@@ -3701,7 +3701,7 @@ const mn = /* @__PURE__ */ de({
3701
3701
  [q._id]: q
3702
3702
  }), {}), n("update:group", E);
3703
3703
  }
3704
- const U = Di(), B = M(() => U.breakpoints.value.xs);
3704
+ const V = Di(), B = M(() => V.breakpoints.value.xs);
3705
3705
  return (R, E) => {
3706
3706
  const K = L("fm-button"), q = L("fm-table");
3707
3707
  return O(), H(De, {
@@ -3737,7 +3737,7 @@ const mn = /* @__PURE__ */ de({
3737
3737
  variant: "secondary",
3738
3738
  label: h(z)("menu.group.option.add_option"),
3739
3739
  "prepend-icon": "add",
3740
- onClick: V
3740
+ onClick: U
3741
3741
  }, null, 8, ["text-color", "border-color", "label"])]))], 64)) : te("", !0)]),
3742
3742
  default: N(() => [$("div", hr, [$("div", fr, [g(q, {
3743
3743
  "column-defs": G.value,
@@ -3882,7 +3882,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
3882
3882
  b.value.isOverride
3883
3883
  )[0];
3884
3884
  }
3885
- const A = ie(Te.clone(n.group)), V = Xt(
3885
+ const A = ie(Te.clone(n.group)), U = Xt(
3886
3886
  () => !Te.isEqual(n.group, A.value),
3887
3887
  () => {
3888
3888
  v.value = !1;
@@ -3891,7 +3891,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
3891
3891
  async function D() {
3892
3892
  var x;
3893
3893
  if (n.action === "add") {
3894
- const { group: F, linkItems: U } = Gi(n.group), B = {
3894
+ const { group: F, linkItems: V } = Gi(n.group), B = {
3895
3895
  module: Y.F_MENU_MODULE_V4_KEY.enum.group,
3896
3896
  operation: ke.F_OPERATION_TYPE.create,
3897
3897
  data: F,
@@ -3899,7 +3899,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
3899
3899
  {
3900
3900
  module: Y.F_MENU_MODULE_V4_KEY.enum.item,
3901
3901
  id: "",
3902
- data: U
3902
+ data: V
3903
3903
  }
3904
3904
  ]
3905
3905
  };
@@ -3932,9 +3932,9 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
3932
3932
  }), _ = M(() => {
3933
3933
  const x = {};
3934
3934
  return o.state.menu.modules.group.forEach((F) => {
3935
- var U;
3935
+ var V;
3936
3936
  for (const [B, R] of Object.entries(F.customAttributes || {}))
3937
- typeof R == "string" && R && !((U = x[B]) != null && U.includes(R)) && (x[B] = [...x[B] || [], R]);
3937
+ typeof R == "string" && R && !((V = x[B]) != null && V.includes(R)) && (x[B] = [...x[B] || [], R]);
3938
3938
  }), x;
3939
3939
  }), S = (x) => {
3940
3940
  n.group && T({
@@ -3945,7 +3945,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
3945
3945
  // Required validation
3946
3946
  (x) => !!x || j("menu.common.validation.required", { field: j("menu.common.labels.group_name") }),
3947
3947
  // Duplicate name validation
3948
- (x) => n.action === "add" ? !o.groups.find((U) => U.name === x) || j("menu.group.validation.name_duplicate") : n.action === "update" ? !o.groups.find((U) => U.name === x && U._id !== n.group._id) || j("menu.group.validation.name_duplicate") : !0
3948
+ (x) => n.action === "add" ? !o.groups.find((V) => V.name === x) || j("menu.group.validation.name_duplicate") : n.action === "update" ? !o.groups.find((V) => V.name === x && V._id !== n.group._id) || j("menu.group.validation.name_duplicate") : !0
3949
3949
  ]);
3950
3950
  i({
3951
3951
  trigger: y,
@@ -3953,7 +3953,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
3953
3953
  });
3954
3954
  const { t: j } = pe();
3955
3955
  return (x, F) => {
3956
- const U = L("fm-text-field"), B = L("fm-stepper-field"), R = L("FmFormGroup"), E = L("fm-radio"), K = L("fm-radio-group"), q = L("fm-switch"), Z = L("fm-button"), ae = L("fm-side-sheet");
3956
+ const V = L("fm-text-field"), B = L("fm-stepper-field"), R = L("FmFormGroup"), E = L("fm-radio"), K = L("fm-radio-group"), q = L("fm-switch"), Z = L("fm-button"), ae = L("fm-side-sheet");
3957
3957
  return O(), ne(Se, null, [
3958
3958
  fe(x.$slots, "default", { trigger: y }),
3959
3959
  g(ae, {
@@ -3966,7 +3966,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
3966
3966
  blameFormChildOnValidationFailed: !0
3967
3967
  },
3968
3968
  "max-width": 720,
3969
- "onOn:clickedAway": h(V)
3969
+ "onOn:clickedAway": h(U)
3970
3970
  }, {
3971
3971
  "side-sheet-header": N(() => [
3972
3972
  $("p", br, ce(x.title), 1)
@@ -3994,7 +3994,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
3994
3994
  g($n, null, {
3995
3995
  default: N(() => [
3996
3996
  $("div", null, [
3997
- g(U, {
3997
+ g(V, {
3998
3998
  modelValue: x.group.name,
3999
3999
  "onUpdate:modelValue": F[0] || (F[0] = (Q) => x.group.name = Q),
4000
4000
  disabled: f("name"),
@@ -4138,10 +4138,10 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4138
4138
  const G = ((_ = (C = s.value[c.value]) == null ? void 0 : C.groups) == null ? void 0 : _.find((S) => S._id === n.groupId)) || {
4139
4139
  _id: n.groupId,
4140
4140
  groupKey: ""
4141
- }, V = o.state.menu.modules.group.find((S) => S._id === n.groupId), I = Object.entries({ ...G, items: void 0 }).filter(([, S]) => !!S), D = {
4142
- ...V,
4141
+ }, U = o.state.menu.modules.group.find((S) => S._id === n.groupId), I = Object.entries({ ...G, items: void 0 }).filter(([, S]) => !!S), D = {
4142
+ ...U,
4143
4143
  ...Object.fromEntries(I),
4144
- items: V.items.map((S) => {
4144
+ items: U.items.map((S) => {
4145
4145
  var j;
4146
4146
  const P = (j = G.items) == null ? void 0 : j.find(
4147
4147
  (x) => x._id == S._id && x.combinationKey == S.combinationKey
@@ -4161,16 +4161,16 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4161
4161
  var D, C;
4162
4162
  const A = (D = s.value[c.value].groups) == null ? void 0 : D.findIndex(
4163
4163
  (_) => _._id === n.groupId
4164
- ), V = ue(s.value), I = { ...qt(G), _id: n.groupId, groupKey: "" };
4165
- (A ?? -1) < 0 ? V[c.value] = {
4166
- ...V[c.value],
4167
- groups: [...((C = V[c.value]) == null ? void 0 : C.groups) || [], I]
4168
- } : V[c.value].groups[A] = I, s.value = V;
4164
+ ), U = ue(s.value), I = { ...qt(G), _id: n.groupId, groupKey: "" };
4165
+ (A ?? -1) < 0 ? U[c.value] = {
4166
+ ...U[c.value],
4167
+ groups: [...((C = U[c.value]) == null ? void 0 : C.groups) || [], I]
4168
+ } : U[c.value].groups[A] = I, s.value = U;
4169
4169
  }
4170
4170
  function v(G) {
4171
4171
  const A = d.value.length;
4172
- let V = c.value;
4173
- G === "left" ? V = V === 0 ? A - 1 : V - 1 : V = V === A - 1 ? 0 : V + 1, u.value = d.value[V].value;
4172
+ let U = c.value;
4173
+ G === "left" ? U = U === 0 ? A - 1 : U - 1 : U = U === A - 1 ? 0 : U + 1, u.value = d.value[U].value;
4174
4174
  }
4175
4175
  function y(G) {
4176
4176
  return {
@@ -4193,10 +4193,10 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4193
4193
  }
4194
4194
  function b() {
4195
4195
  const G = s.value.map((A) => {
4196
- var V;
4196
+ var U;
4197
4197
  return {
4198
4198
  ...A,
4199
- groups: (V = A.groups) == null ? void 0 : V.map((I) => ({
4199
+ groups: (U = A.groups) == null ? void 0 : U.map((I) => ({
4200
4200
  ...oo(I, y())
4201
4201
  }))
4202
4202
  };
@@ -4217,7 +4217,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4217
4217
  });
4218
4218
  const { t: w } = pe();
4219
4219
  return (G, A) => {
4220
- const V = L("fm-select"), I = L("fm-button"), D = L("fm-card");
4220
+ const U = L("fm-select"), I = L("fm-button"), D = L("fm-card");
4221
4221
  return O(), H(hn, {
4222
4222
  ref_key: "baseFormRef",
4223
4223
  ref: f,
@@ -4243,7 +4243,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4243
4243
  default: N(() => [
4244
4244
  $("p", wr, ce(h(w)("menu.group.option.variant")), 1),
4245
4245
  $("div", Sr, [
4246
- g(V, {
4246
+ g(U, {
4247
4247
  modelValue: u.value,
4248
4248
  "onUpdate:modelValue": A[0] || (A[0] = (C) => u.value = C),
4249
4249
  items: d.value,
@@ -4445,11 +4445,11 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4445
4445
  return S.items.forEach((x) => {
4446
4446
  if (x.combinationKey)
4447
4447
  return;
4448
- const F = a.items.find((B) => B._id === x._id), U = S.items.filter((B) => B._id === x._id && B.combinationKey).length;
4448
+ const F = a.items.find((B) => B._id === x._id), V = S.items.filter((B) => B._id === x._id && B.combinationKey).length;
4449
4449
  P.push({
4450
4450
  code: x.code || (F == null ? void 0 : F.code),
4451
4451
  name: x.name || (F == null ? void 0 : F.name),
4452
- variantCount: U
4452
+ variantCount: V
4453
4453
  });
4454
4454
  }), P.map((x) => {
4455
4455
  const F = [(x == null ? void 0 : x.code) || "", (x == null ? void 0 : x.name) || ""].join(" ").trim();
@@ -4528,7 +4528,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4528
4528
  }, ["stop", "prevent"])
4529
4529
  }), Ce(Rr, {
4530
4530
  // variant items
4531
- combinations: V.value ?? [],
4531
+ combinations: U.value ?? [],
4532
4532
  // combinationKey: varaintName
4533
4533
  fullCombinations: t.fullCombinations,
4534
4534
  groupId: S,
@@ -4575,7 +4575,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4575
4575
  function z(_) {
4576
4576
  const S = _.reduce((P, j) => {
4577
4577
  var F;
4578
- const x = ((F = t.form.groups) == null ? void 0 : F.find((U) => U._id === j)) || {
4578
+ const x = ((F = t.form.groups) == null ? void 0 : F.find((V) => V._id === j)) || {
4579
4579
  _id: j,
4580
4580
  groupKey: ""
4581
4581
  };
@@ -4593,7 +4593,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4593
4593
  const S = ue(t.form.groups);
4594
4594
  S.splice(S.findIndex((F) => F._id === _), 1);
4595
4595
  for (const F of ((P = t.form.variant) == null ? void 0 : P.variantCombinations) || [])
4596
- (x = F.groups) == null || x.splice((j = F.groups) == null ? void 0 : j.findIndex((U) => U._id === _), 1);
4596
+ (x = F.groups) == null || x.splice((j = F.groups) == null ? void 0 : j.findIndex((V) => V._id === _), 1);
4597
4597
  s("replace:form", o.initDynamicGroupItem({
4598
4598
  ...t.form,
4599
4599
  groups: S
@@ -4602,7 +4602,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4602
4602
  const A = M(() => {
4603
4603
  var _;
4604
4604
  return !!((_ = t.form.variant) != null && _.variantGroupIds.length);
4605
- }), V = M(() => {
4605
+ }), U = M(() => {
4606
4606
  var _;
4607
4607
  return A.value ? (_ = t.form.variant) == null ? void 0 : _.variantCombinations : [{
4608
4608
  _id: t.form._id,
@@ -4718,10 +4718,10 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4718
4718
  return m(n.form.inventoryBindings || [], ((w = n.form.variant) == null ? void 0 : w.variantCombinations) || [], p.value, o.variants);
4719
4719
  });
4720
4720
  function y(w, T) {
4721
- var V, I;
4721
+ var U, I;
4722
4722
  let z = Te.clone(n.form);
4723
4723
  const G = z.variant;
4724
- if ((((V = G == null ? void 0 : G.variantCombinations) == null ? void 0 : V.length) ?? 0) > 0 && G) {
4724
+ if ((((U = G == null ? void 0 : G.variantCombinations) == null ? void 0 : U.length) ?? 0) > 0 && G) {
4725
4725
  const D = G.variantCombinations.findIndex((_) => _.combinationKey === w);
4726
4726
  if (D < 0) return;
4727
4727
  const C = Te.clone(G.variantCombinations);
@@ -4926,7 +4926,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4926
4926
  return ((f = a.currentCatalog) == null ? void 0 : f.priceTierRules) ?? ((w = a.currentCatalog) == null ? void 0 : w.usePriceTiers) ?? [];
4927
4927
  });
4928
4928
  return (f, w) => {
4929
- const T = L("fm-select"), z = L("FmButton"), G = L("fm-checkbox"), A = L("fm-text-field"), V = zi("tooltip");
4929
+ const T = L("fm-select"), z = L("FmButton"), G = L("fm-checkbox"), A = L("fm-text-field"), U = zi("tooltip");
4930
4930
  return O(), H(De, {
4931
4931
  title: h(r)("menu.product.form.price.title")
4932
4932
  }, {
@@ -4953,7 +4953,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
4953
4953
  class: "shrink-0 scale-75",
4954
4954
  onClick: b
4955
4955
  }, null, 512), [
4956
- [V, h(Vi)("Suggest pricing")]
4956
+ [U, h(Vi)("Suggest pricing")]
4957
4957
  ])
4958
4958
  ]),
4959
4959
  _: 1
@@ -5299,7 +5299,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
5299
5299
  title: h(a)("menu.product.form.print.title")
5300
5300
  }, {
5301
5301
  default: N(() => {
5302
- var V;
5302
+ var U;
5303
5303
  return [
5304
5304
  l.value.printConfig ? (O(), H(Ye, {
5305
5305
  key: 0,
@@ -5321,7 +5321,7 @@ const br = { class: "fm-typo-en-title-md-600" }, yr = {
5321
5321
  }, 8, ["label"])) : te("", !0),
5322
5322
  g(z, {
5323
5323
  label: h(a)("menu.product.form.print.kds.label"),
5324
- "model-value": ((V = k.form.print) == null ? void 0 : V.sequential) ?? !1,
5324
+ "model-value": ((U = k.form.print) == null ? void 0 : U.sequential) ?? !1,
5325
5325
  "onUpdate:modelValue": f[1] || (f[1] = (I) => p(I))
5326
5326
  }, {
5327
5327
  default: N(() => [
@@ -5746,8 +5746,8 @@ const ds = {
5746
5746
  });
5747
5747
  }
5748
5748
  function k(C) {
5749
- var F, U;
5750
- const _ = ((F = t.form.variant) == null ? void 0 : F.variantGroupIds) || [], S = (U = t.form.variant) == null ? void 0 : U.variantCombinations, x = C.split(/(?=variant)/g).map((B) => B.replace(/\/*$/, "")).filter((B) => _.some((R) => B.includes(R))).join("/");
5749
+ var F, V;
5750
+ const _ = ((F = t.form.variant) == null ? void 0 : F.variantGroupIds) || [], S = (V = t.form.variant) == null ? void 0 : V.variantCombinations, x = C.split(/(?=variant)/g).map((B) => B.replace(/\/*$/, "")).filter((B) => _.some((R) => B.includes(R))).join("/");
5751
5751
  return S == null ? void 0 : S.find((B) => B.combinationKey === x);
5752
5752
  }
5753
5753
  const f = (C) => {
@@ -5755,22 +5755,18 @@ const ds = {
5755
5755
  }, w = M(() => {
5756
5756
  var _;
5757
5757
  return (((_ = t.form.variant) == null ? void 0 : _.variantCombinations) || []).map((S) => {
5758
- var j, x;
5759
- const P = (x = (j = t.fallback) == null ? void 0 : j.variant) == null ? void 0 : x.variantCombinations.find(({
5760
- combinationKey: F
5761
- }) => F === S.combinationKey);
5758
+ var x, F;
5759
+ const P = (F = (x = t.fallback) == null ? void 0 : x.variant) == null ? void 0 : F.variantCombinations.find(({
5760
+ combinationKey: V
5761
+ }) => V === S.combinationKey), j = A.value ? null : S.price;
5762
5762
  return {
5763
5763
  ...S,
5764
- // If price is disabled, we should not show the price from variant combination, but fallback to product price or price group's price.
5765
- // So we set price to null to make it clear that price is disabled for this variant combination.
5766
- ...A.value && {
5767
- price: null
5768
- },
5764
+ price: j,
5769
5765
  fallback: {
5770
5766
  ...P,
5771
5767
  _id: S._id,
5772
5768
  combinationKey: S.combinationKey,
5773
- price: d.value ? t.form.price ?? (P == null ? void 0 : P.price) : A.value ? P == null ? void 0 : P.price : S.price,
5769
+ price: d.value ? t.form.price ?? (P == null ? void 0 : P.price) : j ?? (P == null ? void 0 : P.price),
5774
5770
  minPrice: t.form.minPrice ?? (P == null ? void 0 : P.minPrice),
5775
5771
  priceTiers: t.form.priceTiers
5776
5772
  }
@@ -5782,14 +5778,14 @@ const ds = {
5782
5778
  const S = C.filter((x) => !!x);
5783
5779
  let P;
5784
5780
  if (S.length) {
5785
- const x = S.map((U) => n.variants.find((B) => B._id === U)), F = Ee.fullVariantCombination(x).map(({
5786
- combinationKey: U
5781
+ const x = S.map((V) => n.variants.find((B) => B._id === V)), F = Ee.fullVariantCombination(x).map(({
5782
+ combinationKey: V
5787
5783
  }) => {
5788
5784
  var R;
5789
- const B = (R = t.form.variant) == null ? void 0 : R.variantCombinations.find((E) => E.combinationKey === U);
5785
+ const B = (R = t.form.variant) == null ? void 0 : R.variantCombinations.find((E) => E.combinationKey === V);
5790
5786
  return _(B || {
5791
5787
  _id: t.form._id,
5792
- combinationKey: U
5788
+ combinationKey: V
5793
5789
  });
5794
5790
  });
5795
5791
  if (F.length > 100) {
@@ -5809,7 +5805,7 @@ const ds = {
5809
5805
  takeawayUsed: null
5810
5806
  };
5811
5807
  } else {
5812
- const x = (j = t.form.variant) == null ? void 0 : j.variantCombinations.map((U) => U.takeawayUsed), F = [...new Set(x)];
5808
+ const x = (j = t.form.variant) == null ? void 0 : j.variantCombinations.map((V) => V.takeawayUsed), F = [...new Set(x)];
5813
5809
  v([{
5814
5810
  key: "variant",
5815
5811
  value: void 0
@@ -5834,7 +5830,7 @@ const ds = {
5834
5830
  const G = M(() => {
5835
5831
  var C, _;
5836
5832
  return ((C = n.currentCatalog) == null ? void 0 : C.priceTierRules) ?? ((_ = n.currentCatalog) == null ? void 0 : _.usePriceTiers) ?? [];
5837
- }), A = M(() => G.value.length > 0 && n.currentCatalog && !n.currentScheduler), V = M(() => [{
5833
+ }), A = M(() => G.value.length > 0 && n.currentCatalog && !n.currentScheduler), U = M(() => [{
5838
5834
  accessorKey: "combinationKey",
5839
5835
  header: () => l("menu.product.form.variant.columns.variant"),
5840
5836
  enableSorting: !1,
@@ -5849,8 +5845,8 @@ const ds = {
5849
5845
  return g(Me.FmTextField, {
5850
5846
  modelValue: _,
5851
5847
  placeholder: j || l("menu.product.form.variant.placeholders.no_code"),
5852
- rules: [(U) => {
5853
- const B = U, R = M(() => {
5848
+ rules: [(V) => {
5849
+ const B = V, R = M(() => {
5854
5850
  var K;
5855
5851
  if (!n.state.featureFlags.uniqueProductCode || !B) return 0;
5856
5852
  let E = n.itemCodeMap.get(B) || 0;
@@ -5862,8 +5858,8 @@ const ds = {
5862
5858
  count: R.value
5863
5859
  }) : !0;
5864
5860
  }],
5865
- "onUpdate:model-value": (U) => {
5866
- z(C.row.index, "code", cn(U, !0));
5861
+ "onUpdate:model-value": (V) => {
5862
+ z(C.row.index, "code", cn(V, !0));
5867
5863
  }
5868
5864
  }, null);
5869
5865
  }
@@ -5893,7 +5889,7 @@ const ds = {
5893
5889
  size: 200,
5894
5890
  enableSorting: !1,
5895
5891
  cell: (C) => {
5896
- var x, F, U;
5892
+ var x, F, V;
5897
5893
  const _ = C.getValue(), S = C.row.original, j = ((x = S.fallback) == null ? void 0 : x.price) ?? t.form.price ?? ((F = t.fallback) == null ? void 0 : F.price);
5898
5894
  return g("div", {
5899
5895
  class: "flex items-center gap-8"
@@ -5909,7 +5905,7 @@ const ds = {
5909
5905
  showCurrency: !1
5910
5906
  }, null), n.isV4 && !t.isOverride && g(pn, {
5911
5907
  "price-tiers": S.priceTiers,
5912
- fallback: (U = S.fallback) == null ? void 0 : U.priceTiers,
5908
+ fallback: (V = S.fallback) == null ? void 0 : V.priceTiers,
5913
5909
  "onUpdate:price-tiers": (B) => z(C.row.index, "priceTiers", B)
5914
5910
  }, null)]);
5915
5911
  }
@@ -5918,12 +5914,12 @@ const ds = {
5918
5914
  header: () => l("menu.product.form.variant.columns.min_price"),
5919
5915
  enableSorting: !1,
5920
5916
  cell: (C) => {
5921
- var x, F, U;
5917
+ var x, F, V;
5922
5918
  const _ = C.getValue(), S = C.row.original, j = ((x = S.fallback) == null ? void 0 : x.minPrice) ?? t.form.minPrice ?? ((F = t.fallback) == null ? void 0 : F.minPrice);
5923
5919
  return g(et, {
5924
5920
  placeholder: j ? at(j) : void 0,
5925
5921
  modelValue: _,
5926
- max: Re.Dinero.fromFdoDinero(S.price ?? ((U = S.fallback) == null ? void 0 : U.price) ?? Re.Dinero.zero().toObject()).toUnit(),
5922
+ max: Re.Dinero.fromFdoDinero(S.price ?? ((V = S.fallback) == null ? void 0 : V.price) ?? Re.Dinero.zero().toObject()).toUnit(),
5927
5923
  "onUpdate:model-value": (B) => {
5928
5924
  z(C.row.index, "minPrice", B);
5929
5925
  },
@@ -5959,9 +5955,9 @@ const ds = {
5959
5955
  rules: [D]
5960
5956
  }, {
5961
5957
  default: N(() => {
5962
- var U;
5958
+ var V;
5963
5959
  return [g(h(Li), {
5964
- "model-value": ((U = C.form.variant) == null ? void 0 : U.variantGroupIds) ?? [],
5960
+ "model-value": ((V = C.form.variant) == null ? void 0 : V.variantGroupIds) ?? [],
5965
5961
  class: "space-y-16",
5966
5962
  group: "variants",
5967
5963
  handle: ".handle",
@@ -5993,7 +5989,7 @@ const ds = {
5993
5989
  default: N(() => [w.value.length ? (O(), H(x, {
5994
5990
  key: 0,
5995
5991
  class: "w-full",
5996
- "column-defs": V.value,
5992
+ "column-defs": U.value,
5997
5993
  "column-visibility": I.value,
5998
5994
  "page-size": w.value.length ?? 0,
5999
5995
  "row-data": w.value ?? [],
@@ -6114,7 +6110,7 @@ const ds = {
6114
6110
  var X;
6115
6111
  return z.value ? p.value.category == "" || p.value.category == null && ((X = m.value) == null ? void 0 : X.category) == null : a.version === Y.F_MENU_VERSION.enum.v4 && p.value.category == null;
6116
6112
  }), A = M(() => o.itemAttributeSettings.value.length > 0 && !z.value);
6117
- function V() {
6113
+ function U() {
6118
6114
  var he;
6119
6115
  const X = a.getSelectedTax(
6120
6116
  p.value.taxes,
@@ -6153,7 +6149,7 @@ const ds = {
6153
6149
  },
6154
6150
  {
6155
6151
  name: r("menu.product.form.summary.fields.tax"),
6156
- value: V()
6152
+ value: U()
6157
6153
  },
6158
6154
  {
6159
6155
  name: r("menu.product.form.summary.fields.inventory"),
@@ -6218,7 +6214,7 @@ const ds = {
6218
6214
  }
6219
6215
  });
6220
6216
  }
6221
- const U = ie(
6217
+ const V = ie(
6222
6218
  !!p.value.inventoryBindings || (((ai = p.value.variant) == null ? void 0 : ai.variantCombinations) || []).some((X) => !!X.inventoryBindings) || !1
6223
6219
  );
6224
6220
  function B(X) {
@@ -6517,9 +6513,9 @@ const ds = {
6517
6513
  s.value.inventory && !z.value ? (O(), ne("div", Es)) : te("", !0),
6518
6514
  s.value.inventory ? (O(), H(Qe, {
6519
6515
  key: 10,
6520
- toggle: U.value,
6516
+ toggle: V.value,
6521
6517
  "onUpdate:toggle": [
6522
- W[16] || (W[16] = (J) => U.value = J),
6518
+ W[16] || (W[16] = (J) => V.value = J),
6523
6519
  W[17] || (W[17] = (J) => B(J))
6524
6520
  ],
6525
6521
  disabled: !z.value,
@@ -6674,29 +6670,29 @@ function $s(e, i) {
6674
6670
  const ni = Oi("item-manager", () => {
6675
6671
  const e = ye(), i = Ne(), t = Le(), n = Xe(i), a = qe(n), o = Ii(), { t: r } = pe(), l = (A) => {
6676
6672
  if (!o) throw new Error("No current instance found");
6677
- const { container: V } = Dn(Ps, o, {
6673
+ const { container: U } = Dn(Ps, o, {
6678
6674
  ...A,
6679
6675
  autoShow: !0,
6680
6676
  "onUpdate:show": async (I) => {
6681
- I || (Ut(null, V), V.remove());
6677
+ I || (Ut(null, U), U.remove());
6682
6678
  }
6683
6679
  });
6684
6680
  };
6685
6681
  function s(A) {
6686
- const { saveMenuWithThumbnail: V } = a;
6682
+ const { saveMenuWithThumbnail: U } = a;
6687
6683
  l({
6688
6684
  action: "add",
6689
6685
  categoryId: A,
6690
6686
  "onSubmit:form": async (I, D) => {
6691
6687
  I.inventoryBindings ?? (I.inventoryBindings = []), I.inventoryBindings.length === 0 && (I.inventoryBindings = null);
6692
6688
  const C = hi();
6693
- await V(I, ke.F_OPERATION_TYPE.create, C, D);
6689
+ await U(I, ke.F_OPERATION_TYPE.create, C, D);
6694
6690
  }
6695
6691
  });
6696
6692
  }
6697
- async function u(A, V, I) {
6693
+ async function u(A, U, I) {
6698
6694
  l({
6699
- initialForm: $s(A, V || []),
6695
+ initialForm: $s(A, U || []),
6700
6696
  action: "update",
6701
6697
  "onSubmit:form": async (D) => {
6702
6698
  D.inventoryBindings ?? (D.inventoryBindings = []), D.inventoryBindings.length === 0 && (D.inventoryBindings = null), await I(
@@ -6712,53 +6708,53 @@ const ni = Oi("item-manager", () => {
6712
6708
  }
6713
6709
  async function c(A) {
6714
6710
  var _;
6715
- const V = e.currentCatalog, I = e.state.currentSchedulerId, D = V.override.scheduler[I] ?? {}, C = (_ = D == null ? void 0 : D.items) == null ? void 0 : _.filter((S) => S._id === A._id);
6711
+ const U = e.currentCatalog, I = e.state.currentSchedulerId, D = U.override.scheduler[I] ?? {}, C = (_ = D == null ? void 0 : D.items) == null ? void 0 : _.filter((S) => S._id === A._id);
6716
6712
  await u(A, C, async (S) => {
6717
6713
  const P = S.modules.catalog.find(
6718
- (j) => j._id === V._id
6714
+ (j) => j._id === U._id
6719
6715
  );
6720
6716
  await new Ke(P, e, a.updateMenu, t).update();
6721
6717
  });
6722
6718
  }
6723
6719
  async function d(A) {
6724
- const V = e.currentCatalog;
6725
- await u(A, V.override.items[A._id], async (I) => {
6720
+ const U = e.currentCatalog;
6721
+ await u(A, U.override.items[A._id], async (I) => {
6726
6722
  const D = I.modules.catalog.find(
6727
- (C) => C._id === V._id
6723
+ (C) => C._id === U._id
6728
6724
  );
6729
6725
  await new Ke(D, e, a.updateMenu, t).update();
6730
6726
  });
6731
6727
  }
6732
6728
  async function m(A) {
6733
- const V = e.schedulers.find(
6729
+ const U = e.schedulers.find(
6734
6730
  (D) => D._id === e.state.currentSchedulerId
6735
- ), I = V.items.filter((D) => D._id === A._id);
6731
+ ), I = U.items.filter((D) => D._id === A._id);
6736
6732
  await u(A, I, async (D) => {
6737
6733
  const C = D.modules.scheduler.find(
6738
- (_) => _._id === V._id
6734
+ (_) => _._id === U._id
6739
6735
  );
6740
6736
  await new _t(C, e, a.updateMenu, t).update();
6741
6737
  });
6742
6738
  }
6743
6739
  async function p(A) {
6744
6740
  var C, _;
6745
- const V = e.state.currentSchedulerId, I = ue(e.currentCatalog), D = (_ = ((C = I.override.scheduler[V]) == null ? void 0 : C.items) || []) == null ? void 0 : _.reduce((S, P) => {
6741
+ const U = e.state.currentSchedulerId, I = ue(e.currentCatalog), D = (_ = ((C = I.override.scheduler[U]) == null ? void 0 : C.items) || []) == null ? void 0 : _.reduce((S, P) => {
6746
6742
  if (P.combinationKey) return [...S, P];
6747
6743
  const j = A.find((x) => x._id === P._id);
6748
6744
  return j ? [...S, { ...P, price: j.price }] : [...S, P];
6749
6745
  }, []);
6750
6746
  I.override.scheduler = {
6751
6747
  ...I.override.scheduler,
6752
- [V]: {
6753
- ...I.override.scheduler[V],
6754
- _id: V,
6748
+ [U]: {
6749
+ ...I.override.scheduler[U],
6750
+ _id: U,
6755
6751
  items: D
6756
6752
  }
6757
6753
  }, await new Ke(I, e, a.updateMenu, t).update();
6758
6754
  }
6759
6755
  async function v(A) {
6760
6756
  var C;
6761
- const V = ue(e.currentCatalog), I = (C = Object.entries(V.override.items)) == null ? void 0 : C.reduce(
6757
+ const U = ue(e.currentCatalog), I = (C = Object.entries(U.override.items)) == null ? void 0 : C.reduce(
6762
6758
  (_, [S, P]) => {
6763
6759
  const j = A.find((F) => F._id === S);
6764
6760
  if (!j)
@@ -6779,9 +6775,9 @@ const ni = Oi("item-manager", () => {
6779
6775
  ), { updateMenu: D } = a;
6780
6776
  await new Ke(
6781
6777
  {
6782
- ...V,
6778
+ ...U,
6783
6779
  override: {
6784
- ...V.override,
6780
+ ...U.override,
6785
6781
  items: I
6786
6782
  }
6787
6783
  },
@@ -6791,14 +6787,14 @@ const ni = Oi("item-manager", () => {
6791
6787
  ).update();
6792
6788
  }
6793
6789
  async function y(A) {
6794
- const V = ue(e.currentScheduler), I = V.items.reduce((D, C) => {
6790
+ const U = ue(e.currentScheduler), I = U.items.reduce((D, C) => {
6795
6791
  if (C.combinationKey) return [...D, C];
6796
6792
  const _ = A.find((S) => S._id === C._id);
6797
6793
  return _ ? [...D, { ...C, price: _.price }] : [...D, C];
6798
6794
  }, []);
6799
6795
  await new _t(
6800
6796
  {
6801
- ...V,
6797
+ ...U,
6802
6798
  items: I
6803
6799
  },
6804
6800
  e,
@@ -6807,7 +6803,7 @@ const ni = Oi("item-manager", () => {
6807
6803
  ).update();
6808
6804
  }
6809
6805
  async function b(A) {
6810
- const V = A.reduce((D, C) => {
6806
+ const U = A.reduce((D, C) => {
6811
6807
  const _ = e.items.find((S) => S._id === C._id);
6812
6808
  return _ && D.push({
6813
6809
  ..._,
@@ -6822,28 +6818,28 @@ const ni = Oi("item-manager", () => {
6822
6818
  }), D;
6823
6819
  }, []), { updateMenu: I } = a;
6824
6820
  await I(
6825
- V.map((D) => ({
6821
+ U.map((D) => ({
6826
6822
  module: Y.F_MENU_MODULE_V4_KEY.enum.item,
6827
6823
  operation: ke.F_OPERATION_TYPE.update,
6828
6824
  data: D
6829
6825
  })),
6830
- `${V.length} products`
6826
+ `${U.length} products`
6831
6827
  );
6832
6828
  }
6833
6829
  function k(A) {
6834
- const { saveMenuWithThumbnail: V } = a;
6830
+ const { saveMenuWithThumbnail: U } = a;
6835
6831
  l({
6836
6832
  initialForm: A,
6837
6833
  action: "update",
6838
6834
  "onSubmit:form": async (I, D) => {
6839
6835
  const C = hi(A._id);
6840
- I.inventoryBindings ?? (I.inventoryBindings = []), I.inventoryBindings.length === 0 && (I.inventoryBindings = null), await V(I, ke.F_OPERATION_TYPE.update, C, D);
6836
+ I.inventoryBindings ?? (I.inventoryBindings = []), I.inventoryBindings.length === 0 && (I.inventoryBindings = null), await U(I, ke.F_OPERATION_TYPE.update, C, D);
6841
6837
  }
6842
6838
  });
6843
6839
  }
6844
6840
  async function f(A) {
6845
- const V = e.state.menu.modules.item.find((I) => I._id === A);
6846
- e.currentCatalog ? e.state.currentSchedulerId ? await c(V) : await d(V) : e.state.currentSchedulerId ? await m(V) : k(V);
6841
+ const U = e.state.menu.modules.item.find((I) => I._id === A);
6842
+ e.currentCatalog ? e.state.currentSchedulerId ? await c(U) : await d(U) : e.state.currentSchedulerId ? await m(U) : k(U);
6847
6843
  }
6848
6844
  async function w(A) {
6849
6845
  e.currentCatalog ? e.currentScheduler ? await p(A) : await v(A) : (
@@ -6852,7 +6848,7 @@ const ni = Oi("item-manager", () => {
6852
6848
  );
6853
6849
  }
6854
6850
  function T(A) {
6855
- const { updateMenu: V } = a, I = A.length > 1 ? `${A.length} products` : A[0].name;
6851
+ const { updateMenu: U } = a, I = A.length > 1 ? `${A.length} products` : A[0].name;
6856
6852
  t.open({
6857
6853
  title: r("menu.common.dialog.remove.product.title"),
6858
6854
  message: r("menu.common.dialog.remove.product.message", { name: I }),
@@ -6866,7 +6862,7 @@ const ni = Oi("item-manager", () => {
6866
6862
  close: !0
6867
6863
  }
6868
6864
  }).onPrimary(async () => {
6869
- await V(
6865
+ await U(
6870
6866
  A.map(({ _id: D }) => ({
6871
6867
  module: Y.F_MENU_MODULE_V4_KEY.enum.item,
6872
6868
  operation: ke.F_OPERATION_TYPE.delete,
@@ -6889,16 +6885,16 @@ const ni = Oi("item-manager", () => {
6889
6885
  e,
6890
6886
  a.updateMenu,
6891
6887
  t
6892
- ).unlinkProduct(A.map((V) => V._id)) : e.currentCatalog ? await new Ke(
6888
+ ).unlinkProduct(A.map((U) => U._id)) : e.currentCatalog ? await new Ke(
6893
6889
  e.currentCatalog,
6894
6890
  e,
6895
6891
  a.updateMenu,
6896
6892
  t
6897
- ).unlinkProduct(A.map((V) => V._id)) : T(A);
6893
+ ).unlinkProduct(A.map((U) => U._id)) : T(A);
6898
6894
  }
6899
6895
  async function G(A) {
6900
- const { updateMenu: V } = a;
6901
- await V(
6896
+ const { updateMenu: U } = a;
6897
+ await U(
6902
6898
  {
6903
6899
  module: Y.F_MENU_MODULE_V4_KEY.enum.item,
6904
6900
  operation: ke.F_OPERATION_TYPE.rearrange,