@feedmepos/mf-menu 0.32.53 → 0.32.54-dev

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 (74) hide show
  1. package/dist/{App-opl8VW_R.js → App-_uZ_L5Bj.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CI685o_y.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Dli8SXgX.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-BE37wS9F.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-U6Aa4RBu.js} +2 -2
  4. package/dist/{Catalog-CFgFi7F4.js → Catalog-rve2AyBy.js} +6 -6
  5. package/dist/{Category-C-QIBnv4.js → Category-Di_80MXe.js} +4 -4
  6. package/dist/{Category-C9D0g8il.js → Category-Dx6Iv5dA.js} +4 -4
  7. package/dist/{CookingGuide-miSijISx.js → CookingGuide-03JjR4b3.js} +4 -4
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CNXLlPC4.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BkpSzeX7.js} +1 -1
  9. package/dist/{Group-DetasO-_.js → Group-Bf0jRPu1.js} +1 -1
  10. package/dist/{Group-C1sw05Nm.js → Group-DOYvyvNP.js} +3 -3
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-DiKZMMau.js → Group.vue_vue_type_script_setup_true_lang-D13BHYJ8.js} +7 -7
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BY1jcgZ2.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BHbSityl.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Bjk8zzYz.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CfWxf1OZ.js} +7 -7
  14. package/dist/{Ingredient-CyZHvNUy.js → Ingredient-woydsWk1.js} +3 -3
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-5YtnqTmW.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Bzgn6e5M.js} +2 -2
  16. package/dist/{LinkProductSideSheet-CwW76B20.js → LinkProductSideSheet-BtBCL69w.js} +3 -3
  17. package/dist/{MenuSetting-DAchuXJ6.js → MenuSetting-CbQ91-NJ.js} +6 -6
  18. package/dist/{OrderPacing-BVIQnDTl.js → OrderPacing-CLzZpgsR.js} +5 -5
  19. package/dist/{PrintRoute-70IyWjgJ.js → PrintRoute-KRiyp9Kl.js} +4 -4
  20. package/dist/{Product-DctvRQlQ.js → Product-D3UzjY9t.js} +1 -1
  21. package/dist/Product.vue_vue_type_script_setup_true_lang-DqCAzLTO.js +1640 -0
  22. package/dist/{ProductInternalTools-D_iKLDbw.js → ProductInternalTools-Q_KUcji3.js} +6 -6
  23. package/dist/{Products-B0DlF5sy.js → Products-DEb5wblc.js} +28 -28
  24. package/dist/{Publish-DGsHCtxz.js → Publish-CknToYHP.js} +263 -265
  25. package/dist/{Recipe-Cu8NbZR7.js → Recipe-C_b8VZgp.js} +4 -4
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DO8Z3QJ3.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-_aZHbTtg.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-avzZyXl2.js → RuleView.vue_vue_type_script_setup_true_lang-CyTH_at9.js} +302 -302
  28. package/dist/{Scheduler-CY8eSvsu.js → Scheduler-PzqfgLBJ.js} +3 -3
  29. package/dist/{ServingSequence-C4gh5jvR.js → ServingSequence-Bxk1S39y.js} +3 -3
  30. package/dist/{Setting-CwCP1uIf.js → Setting-CO2sP1z2.js} +5 -5
  31. package/dist/{Subcategory-Chcr9PWi.js → Subcategory-5MLdVGr-.js} +5 -5
  32. package/dist/{Takeaway-C6vyEwBR.js → Takeaway-CflkNfbT.js} +4 -4
  33. package/dist/{Takeaway-C8ohkkYR.js → Takeaway-Ctbpomn2.js} +1 -1
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BqKRwZNT.js → Takeaway.vue_vue_type_script_setup_true_lang-BH-1yxKn.js} +5 -5
  35. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-_dnxm97U.js → Thumbnail.vue_vue_type_script_setup_true_lang-B7Nq3IJ1.js} +4 -4
  36. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-Bm4W6NHD.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-C_xhyVnX.js} +1 -1
  37. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DD-vqSBo.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-B5-Ab7yn.js} +2 -2
  38. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DXhITV7s.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dm_wi_uJ.js} +14 -14
  39. package/dist/{Unit-BJOTS840.js → Unit-BO-xI_h8.js} +2 -2
  40. package/dist/{Variant-1yx-tba5.js → Variant-D8CO6krd.js} +3 -3
  41. package/dist/{_id_-Bli_eaaw.js → _id_-C6UOR3cy.js} +9 -9
  42. package/dist/{app-Df2OaMeW.js → app-BNSww5M4.js} +37 -37
  43. package/dist/{app-CEjAGMYK.js → app-CfxU4t_L.js} +1 -1
  44. package/dist/app.js +1 -1
  45. package/dist/apps/mf-menu/src/app.d.ts +9 -0
  46. package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +5 -0
  47. package/dist/apps/mf-menu/src/helper/item.d.ts +1 -0
  48. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1 -0
  49. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  50. package/dist/assets/{linked-status-gnRlCKBX.js → linked-status-CddGEfc5.js} +12 -12
  51. package/dist/assets/{menu-export-DVgG2q3T.js → menu-export-DN0u3z_7.js} +2 -2
  52. package/dist/assets/{override-menu-B5Xlrlwf.js → override-menu-DG2Z1XPH.js} +2 -2
  53. package/dist/assets/{validate-menu-Ce8h_1g0.js → validate-menu-DDEraWh4.js} +2 -2
  54. package/dist/{catalog-CKUQEphe.js → catalog-B8cFusU-.js} +1 -1
  55. package/dist/{catalogSetting-D1cRj-bD.js → catalogSetting-hSXLLFjE.js} +1 -1
  56. package/dist/{currency-BVe0-Ftm.js → currency-evm4Kufz.js} +1 -1
  57. package/dist/{dayjs.min-Cky8XfOQ.js → dayjs.min-DKkIcWKQ.js} +2 -2
  58. package/dist/{index-DLC-j2RG.js → index-DF-RLnW4.js} +5 -5
  59. package/dist/{index-CGHFswp3.js → index-r-T_x-og.js} +4 -4
  60. package/dist/{index.vue_vue_type_script_setup_true_lang-D8icZ01s.js → index.vue_vue_type_script_setup_true_lang-H0pKxrKD.js} +397 -390
  61. package/dist/{item-C2zRGcji.js → item-CiGZwVCJ.js} +221 -219
  62. package/dist/{jszip.min-Cw0XEEly.js → jszip.min-CTld7lET.js} +175 -175
  63. package/dist/{memberPricing-vGotpgxh.js → memberPricing-Bh1SOfnP.js} +1 -1
  64. package/dist/{menu-33fQZyJt.js → menu-l0HseABF.js} +1 -1
  65. package/dist/{menuV2-BolaQLav.js → menuV2-CmL0MaZU.js} +85 -85
  66. package/dist/mf-menu.css +1 -1
  67. package/dist/{order_pacing-By6jv8HG.js → order_pacing-BP0_MGpd.js} +5 -5
  68. package/dist/{priceTier-DhA6Ve0R.js → priceTier-W5k8zWVc.js} +1 -1
  69. package/dist/{rules-glZCxFHS.js → rules-D2vbYzGl.js} +3 -3
  70. package/dist/{scheduler-Cnzgnk6d.js → scheduler-6526OHxm.js} +4 -4
  71. package/dist/{toExcel-Bym1fMDm.js → toExcel-DCUF2hIQ.js} +2 -2
  72. package/dist/{unit-BWwoKT39.js → unit-CA0Ctbtn.js} +2 -2
  73. package/package.json +1 -1
  74. package/dist/Product.vue_vue_type_script_setup_true_lang-mJYcstbm.js +0 -1606
@@ -1,38 +1,38 @@
1
1
  import { defineStore as oi } from "pinia";
2
2
  import { defineComponent as pe, resolveComponent as L, createElementBlock as H, createBlock as q, openBlock as k, createElementVNode as M, createVNode as h, toDisplayString as ae, Fragment as ve, renderList as Re, h as Me, ref as W, computed as F, watch as Se, unref as m, renderSlot as Ve, withCtx as R, createCommentVNode as ne, Transition as Gi, normalizeClass as Le, resolveDynamicComponent as Lt, withDirectives as st, vShow as Zt, mergeProps as ai, withModifiers as Ft, onMounted as yt, onUnmounted as Ki, createTextVNode as Nt, getCurrentInstance as Tn, render as Bt, resolveDirective as jt, markRaw as Wi, mergeModels as Nn, useModel as Hi, nextTick as ri, normalizeProps as Yi, guardReactiveProps as qi, normalizeStyle as Xi } from "vue";
3
- import { J as Ie, K as Pe, U as Te, as as Zi, au as Qi, a0 as si, G as we, A as We, R as Ce, z as Ue, X as Ji, u as Fe, H as ze, B as et, P as tt, a2 as eo, y as dt, av as to, M as Gt, N as gn, O as Bn, Q as no, T as io, V as oo, W as cn, am as ao, Y as ro } from "./index.vue_vue_type_script_setup_true_lang-D8icZ01s.js";
3
+ import { J as Ie, K as Pe, U as Te, as as Zi, au as Qi, a0 as si, G as we, A as We, R as Ce, z as Ue, X as Ji, u as Fe, H as ze, B as et, P as tt, a2 as eo, y as dt, av as to, M as Gt, N as gn, O as Bn, Q as no, T as io, V as oo, W as cn, am as ao, Y as ro } from "./index.vue_vue_type_script_setup_true_lang-H0pKxrKD.js";
4
4
  import { useI18n as fe, useCoreStore as Ct, CustomAttributesForm as li } from "@feedmepos/mf-common";
5
5
  import { useDialog as qe, useSnackbar as He, components as Ae, useDialogChild as Qt, FmButtonVariant as Be, FmButtonColorThemeVariant as Ze, useBreakpoints as ui } from "@feedmepos/ui-library";
6
- import { C as ot } from "./catalog-CKUQEphe.js";
6
+ import { C as ot } from "./catalog-B8cFusU-.js";
7
7
  import { c as ci } from "./createComponentProgrammatically-Bt2rn1IQ.js";
8
8
  import { a as jn, _ as Vt } from "./tooltip-B5BiPMx9.js";
9
- import { H as so, L as lo } from "./LinkProductSideSheet-CwW76B20.js";
10
- import { u as uo, _ as Ne, a as co } from "./RuleView.vue_vue_type_script_setup_true_lang-avzZyXl2.js";
9
+ import { H as so, L as lo } from "./LinkProductSideSheet-BtBCL69w.js";
10
+ import { u as uo, _ as Ne, a as co } from "./RuleView.vue_vue_type_script_setup_true_lang-CyTH_at9.js";
11
11
  import { s as bn, F as mo, _ as po } from "./index-CisutoS9.js";
12
- import { e as fo } from "./app-Df2OaMeW.js";
12
+ import { e as fo } from "./app-BNSww5M4.js";
13
13
  import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- import { g as di, b as ho, c as vo, a as go, m as bo } from "./menuV2-BolaQLav.js";
14
+ import { g as di, b as ho, c as vo, a as go, m as bo } from "./menuV2-CmL0MaZU.js";
15
15
  import { useAppStore as Jt, RemyButton as Kt } from "@feedmepos/mf-remy-panel";
16
16
  import { _ as lt } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
17
- import { u as yo, r as _o } from "./rules-glZCxFHS.js";
17
+ import { u as yo, r as _o } from "./rules-D2vbYzGl.js";
18
18
  import { u as St } from "./discardConfirm-BHni0LNu.js";
19
- import { _ as mi, a as Wt, b as Ht, c as Yt } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-Bm4W6NHD.js";
19
+ import { _ as mi, a as Wt, b as Ht, c as Yt } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-C_xhyVnX.js";
20
20
  import { a as yn, g as ct } from "./translation-fNx6yEpy.js";
21
21
  import { c as qt } from "./object-DVUNCr7w.js";
22
- import { _ as Fn } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-DD-vqSBo.js";
23
- import { u as wo } from "./menu-33fQZyJt.js";
22
+ import { _ as Fn } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B5-Ab7yn.js";
23
+ import { u as wo } from "./menu-l0HseABF.js";
24
24
  import { c as gt } from "./check-C9mY6LiX.js";
25
- import { _ as rt, l as _n, T as ko } from "./index-DLC-j2RG.js";
25
+ import { _ as rt, l as _n, T as ko } from "./index-DF-RLnW4.js";
26
26
  import { useInventoryStore as pi, InventoryBindingForm as Co, InventoryBindingSummary as So } from "@feedmepos/mf-inventory-portal";
27
- import { f as Ye } from "./currency-BVe0-Ftm.js";
28
- import { u as en } from "./memberPricing-vGotpgxh.js";
29
- import { u as fi } from "./priceTier-DhA6Ve0R.js";
27
+ import { f as Ye } from "./currency-evm4Kufz.js";
28
+ import { u as en } from "./memberPricing-Bh1SOfnP.js";
29
+ import { u as fi } from "./priceTier-W5k8zWVc.js";
30
30
  import { u as xo } from "./search-BAPEUu1R.js";
31
31
  import { c as Ao } from "./string-DpfFixWH.js";
32
32
  import { d as hi } from "./vuedraggable-CK8z7qA8.js";
33
- import { _ as Vo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CI685o_y.js";
34
- import { u as To, a as Fo } from "./order_pacing-By6jv8HG.js";
35
- import { V as Gn } from "./index-CGHFswp3.js";
33
+ import { _ as Vo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Dli8SXgX.js";
34
+ import { u as To, a as Fo } from "./order_pacing-BP0_MGpd.js";
35
+ import { V as Gn } from "./index-r-T_x-og.js";
36
36
  class Et {
37
37
  constructor(n, t, i, a) {
38
38
  this.scheduler = n, this.menuStore = t, this.updateMenu = i, this.dialog = a;
@@ -394,7 +394,7 @@ class gi {
394
394
  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;
395
395
  function s(u, d) {
396
396
  const c = u.items.reduce((f, v) => {
397
- var P, E, D, y;
397
+ var P, E, $, y;
398
398
  const S = a.find((z) => v._id === z._id);
399
399
  if (!S && t) return f;
400
400
  const g = v.combinationKey ? {
@@ -402,7 +402,7 @@ class gi {
402
402
  (z) => z.combinationKey === v.combinationKey
403
403
  ),
404
404
  name: Ji(Fe().variants, ((E = S == null ? void 0 : S.variant) == null ? void 0 : E.variantGroupIds) || [])[v.combinationKey]
405
- } : S, b = (D = o.find((z) => z._id === u._id)) == null ? void 0 : D.items.find((z) => z._id === v._id && z.combinationKey === v.combinationKey), A = !t && !v.combinationKey, V = (y = d.find(
405
+ } : S, b = ($ = o.find((z) => z._id === u._id)) == null ? void 0 : $.items.find((z) => z._id === v._id && z.combinationKey === v.combinationKey), A = !t && !v.combinationKey, V = (y = d.find(
406
406
  (z) => z._id == v._id && z.combinationKey == v.combinationKey
407
407
  )) == null ? void 0 : y.price, N = l ? null : g == null ? void 0 : g.name, x = v.name || (b == null ? void 0 : b.name) || N || null, C = (g == null ? void 0 : g.name) || null, _ = v.name_locale ?? (b == null ? void 0 : b.name_locale) ?? (g == null ? void 0 : g.name_locale) ?? null, O = {
408
408
  ...v,
@@ -2542,7 +2542,8 @@ const Ba = {
2542
2542
  isLocalOnly: { type: Boolean },
2543
2543
  rules: { default: () => [] },
2544
2544
  helperText: { default: "" },
2545
- helperState: { default: "none" }
2545
+ helperState: { default: "none" },
2546
+ shouldShowChips: { type: Boolean, default: !0 }
2546
2547
  },
2547
2548
  emits: ["update:modelValue"],
2548
2549
  setup(e, { emit: n }) {
@@ -2590,7 +2591,7 @@ const Ba = {
2590
2591
  ref_key: "fmMenuRef",
2591
2592
  ref: u,
2592
2593
  "close-on-click": !1,
2593
- onMenuChanged: V[1] || (V[1] = (D) => b.value = D)
2594
+ onMenuChanged: V[1] || (V[1] = ($) => b.value = $)
2594
2595
  }, {
2595
2596
  "menu-button": R(() => [
2596
2597
  h(x, {
@@ -2617,18 +2618,18 @@ const Ba = {
2617
2618
  ]),
2618
2619
  default: R(() => [
2619
2620
  M("div", Ja, [
2620
- (k(!0), H(ve, null, Re(A.items, (D) => (k(), q(C, {
2621
- key: D.value,
2622
- disabled: D.disabled,
2621
+ (k(!0), H(ve, null, Re(A.items, ($) => (k(), q(C, {
2622
+ key: $.value,
2623
+ disabled: $.disabled,
2623
2624
  "has-checkbox": !0,
2624
- label: D.label,
2625
- "model-value": d.value.some((y) => y.value === D.value),
2626
- "onUpdate:modelValue": (y) => p(y, D)
2625
+ label: $.label,
2626
+ "model-value": d.value.some((y) => y.value === $.value),
2627
+ "onUpdate:modelValue": (y) => p(y, $)
2627
2628
  }, null, 8, ["disabled", "label", "model-value", "onUpdate:modelValue"]))), 128)),
2628
2629
  M("button", {
2629
2630
  class: "flex items-center py-8 px-16 space-x-8",
2630
2631
  type: "button",
2631
- onClick: V[0] || (V[0] = (D) => v())
2632
+ onClick: V[0] || (V[0] = ($) => v())
2632
2633
  }, [
2633
2634
  h(N, {
2634
2635
  color: "primary",
@@ -2644,7 +2645,7 @@ const Ba = {
2644
2645
  ]),
2645
2646
  _: 1
2646
2647
  }, 8, ["model-value", "disabled", "focused", "helper-state", "helper-text", "rules"]),
2647
- d.value.length > 0 ? (k(), H("div", tr, [
2648
+ A.shouldShowChips && d.value.length > 0 ? (k(), H("div", tr, [
2648
2649
  h(P, {
2649
2650
  disabled: A.disabled,
2650
2651
  items: d.value.map((E) => ({ label: E.label })),
@@ -2655,7 +2656,7 @@ const Ba = {
2655
2656
  ]);
2656
2657
  };
2657
2658
  }
2658
- }), ir = /* @__PURE__ */ vt(nr, [["__scopeId", "data-v-ca5e943c"]]), or = { class: "fm-typo-en-title-md-600" }, ar = { class: "pt-8 space-y-24" }, rr = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, sr = { class: "fm-typo-en-body-lg-600" }, lr = {
2659
+ }), ir = /* @__PURE__ */ vt(nr, [["__scopeId", "data-v-5eb2466b"]]), or = { class: "fm-typo-en-title-md-600" }, ar = { class: "pt-8 space-y-24" }, rr = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, sr = { class: "fm-typo-en-body-lg-600" }, lr = {
2659
2660
  key: 0,
2660
2661
  class: "flex flex-col gap-32 pl-32"
2661
2662
  }, ur = {
@@ -2720,11 +2721,11 @@ const Ba = {
2720
2721
  }
2721
2722
  function b() {
2722
2723
  i("update:name", l.value.trim()), i("update:description", s.value.trim());
2723
- const _ = o.value.filter((D) => D.nameValue.trim()), O = _.length === 0 ? void 0 : _.reduce(
2724
- (D, y) => (D[y.localeCode] = y.nameValue.trim(), D),
2724
+ const _ = o.value.filter(($) => $.nameValue.trim()), O = _.length === 0 ? void 0 : _.reduce(
2725
+ ($, y) => ($[y.localeCode] = y.nameValue.trim(), $),
2725
2726
  {}
2726
- ), P = o.value.filter((D) => D.descriptionValue.trim()), E = P.length === 0 ? void 0 : P.reduce(
2727
- (D, y) => (D[y.localeCode] = y.descriptionValue.trim(), D),
2727
+ ), P = o.value.filter(($) => $.descriptionValue.trim()), E = P.length === 0 ? void 0 : P.reduce(
2728
+ ($, y) => ($[y.localeCode] = y.descriptionValue.trim(), $),
2728
2729
  {}
2729
2730
  );
2730
2731
  i("update:nameLocale", O), i("update:descriptionLocale", E), i("update:modelValue", !1);
@@ -2743,8 +2744,8 @@ const Ba = {
2743
2744
  p.value = !p.value;
2744
2745
  }
2745
2746
  return (_, O) => {
2746
- const P = L("FmIcon"), E = L("fm-button"), D = L("fm-dialog");
2747
- return k(), q(D, {
2747
+ const P = L("FmIcon"), E = L("fm-button"), $ = L("fm-dialog");
2748
+ return k(), q($, {
2748
2749
  modelValue: N.value,
2749
2750
  "onUpdate:modelValue": O[2] || (O[2] = (y) => N.value = y),
2750
2751
  "max-width": 800,
@@ -2852,7 +2853,7 @@ const Ba = {
2852
2853
  };
2853
2854
  }
2854
2855
  });
2855
- var ni = { firebase: { storageBucket: "image.feedme.cc" } };
2856
+ var ni = { firebase: { storageBucket: "image.feedmedev.cc" } };
2856
2857
  const gr = {
2857
2858
  class: "fm-typo-en-title-md-600"
2858
2859
  }, br = {
@@ -2936,7 +2937,7 @@ const gr = {
2936
2937
  const X = to(T, b.value.id);
2937
2938
  await l.updateMany(X);
2938
2939
  }
2939
- const E = F(() => [_o]), D = F(() => !!b.value.name), y = F(() => {
2940
+ const E = F(() => [_o]), $ = F(() => !!b.value.name), y = F(() => {
2940
2941
  var Q;
2941
2942
  const T = [], X = "en-US", te = (Q = f.value) == null ? void 0 : Q[X];
2942
2943
  return b.value.name && !te && T.push({
@@ -2954,7 +2955,7 @@ const gr = {
2954
2955
  function z(T) {
2955
2956
  f.value = T;
2956
2957
  }
2957
- function $(T) {
2958
+ function D(T) {
2958
2959
  b.value.name = T;
2959
2960
  }
2960
2961
  const B = St(() => {
@@ -3072,7 +3073,7 @@ const gr = {
3072
3073
  variant: "tertiary",
3073
3074
  icon: "g_translate",
3074
3075
  onClick: X[0] || (X[0] = (J) => p.value = !0),
3075
- disabled: !D.value || g.value
3076
+ disabled: !$.value || g.value
3076
3077
  }, null, 8, ["disabled"])]),
3077
3078
  _: 1
3078
3079
  })]),
@@ -3142,7 +3143,7 @@ const gr = {
3142
3143
  title: m(u)("menu.category.title"),
3143
3144
  name: b.value.name,
3144
3145
  "name-locale": f.value,
3145
- "onUpdate:name": $,
3146
+ "onUpdate:name": D,
3146
3147
  "onUpdate:nameLocale": z
3147
3148
  }, null, 8, ["modelValue", "title", "name", "name-locale"])], 64);
3148
3149
  };
@@ -3459,7 +3460,7 @@ const Kr = /* @__PURE__ */ pe({
3459
3460
  Rn("apply-description", (U) => {
3460
3461
  c("update:form", "description", U || "");
3461
3462
  });
3462
- async function D() {
3463
+ async function $() {
3463
3464
  if (!t.form.name) {
3464
3465
  const U = document.getElementById("product-name");
3465
3466
  if (U) {
@@ -3478,7 +3479,7 @@ const Kr = /* @__PURE__ */ pe({
3478
3479
  const y = F(() => i.subcategories), z = F(() => y.value.map((U) => ({
3479
3480
  label: U.name,
3480
3481
  value: U._id
3481
- }))), $ = F({
3482
+ }))), D = F({
3482
3483
  get() {
3483
3484
  return t.form.subCategories || [];
3484
3485
  },
@@ -3619,7 +3620,7 @@ const Kr = /* @__PURE__ */ pe({
3619
3620
  _: 1
3620
3621
  }), st(h(m(Kt), {
3621
3622
  class: "cursor-pointer",
3622
- onClick: D
3623
+ onClick: $
3623
3624
  }, null, 512), [[Y, m(Vt)("Suggest description")]])])])]), h(Di, {
3624
3625
  disabled: !p.value.thumbnail,
3625
3626
  title: m(T)("menu.common.labels.product_image"),
@@ -3677,8 +3678,8 @@ const Kr = /* @__PURE__ */ pe({
3677
3678
  label: m(T)("menu.product.form.detail.path.label")
3678
3679
  }, {
3679
3680
  default: R(() => [M("div", jr, [h(ir, {
3680
- modelValue: $.value,
3681
- "onUpdate:modelValue": j[8] || (j[8] = (se) => $.value = se),
3681
+ modelValue: D.value,
3682
+ "onUpdate:modelValue": j[8] || (j[8] = (se) => D.value = se),
3682
3683
  items: z.value,
3683
3684
  placeholder: m(T)("menu.product.form.detail.path.placeholder"),
3684
3685
  disabled: !p.value.category,
@@ -3820,14 +3821,14 @@ const ts = /* @__PURE__ */ vt(Qr, [["render", es]]), ns = { class: "fm-typo-en-t
3820
3821
  function S() {
3821
3822
  const C = /* @__PURE__ */ new Set();
3822
3823
  Object.values(t.group.items).forEach((E) => {
3823
- E.name_locale && Object.keys(E.name_locale).forEach((D) => C.add(D));
3824
+ E.name_locale && Object.keys(E.name_locale).forEach(($) => C.add($));
3824
3825
  }), C.size === 0 && t.group.name_locale && Object.keys(t.group.name_locale).forEach((E) => C.add(E));
3825
3826
  const _ = Array.from(C);
3826
3827
  l.value = _;
3827
3828
  const O = {}, P = {};
3828
3829
  Object.values(t.group.items).forEach((E) => {
3829
- O[E._id] = {}, E.name_locale && Object.entries(E.name_locale).forEach(([D, y]) => {
3830
- O[E._id][D] = y;
3830
+ O[E._id] = {}, E.name_locale && Object.entries(E.name_locale).forEach(([$, y]) => {
3831
+ O[E._id][$] = y;
3831
3832
  }), P[E._id] = E.name || E.fallbackName || "";
3832
3833
  }), u.value = O, c.value = P;
3833
3834
  }
@@ -3861,8 +3862,8 @@ const ts = /* @__PURE__ */ vt(Qr, [["render", es]]), ns = { class: "fm-typo-en-t
3861
3862
  const P = u.value[_];
3862
3863
  if (P && Object.keys(P).length > 0) {
3863
3864
  const E = {};
3864
- Object.entries(P).forEach(([D, y]) => {
3865
- y && y.trim() && (E[D] = y.trim());
3865
+ Object.entries(P).forEach(([$, y]) => {
3866
+ y && y.trim() && (E[$] = y.trim());
3866
3867
  }), Object.keys(E).length > 0 ? C.items[_].name_locale = E : delete C.items[_].name_locale;
3867
3868
  } else
3868
3869
  delete C.items[_].name_locale;
@@ -3879,7 +3880,7 @@ const ts = /* @__PURE__ */ vt(Qr, [["render", es]]), ns = { class: "fm-typo-en-t
3879
3880
  const O = L("FmIcon"), P = L("fm-button"), E = L("fm-side-sheet");
3880
3881
  return k(), q(E, {
3881
3882
  modelValue: x.value,
3882
- "onUpdate:modelValue": _[2] || (_[2] = (D) => x.value = D),
3883
+ "onUpdate:modelValue": _[2] || (_[2] = ($) => x.value = $),
3883
3884
  "max-width": 720,
3884
3885
  "onOn:clickedAway": m(N)
3885
3886
  }, {
@@ -3912,7 +3913,7 @@ const ts = /* @__PURE__ */ vt(Qr, [["render", es]]), ns = { class: "fm-typo-en-t
3912
3913
  M("div", os, [
3913
3914
  M("div", {
3914
3915
  class: "flex items-center gap-16 cursor-pointer",
3915
- onClick: _[0] || (_[0] = (D) => o.value = !o.value)
3916
+ onClick: _[0] || (_[0] = ($) => o.value = !o.value)
3916
3917
  }, [
3917
3918
  h(O, {
3918
3919
  name: "keyboard_arrow_down",
@@ -3930,10 +3931,10 @@ const ts = /* @__PURE__ */ vt(Qr, [["render", es]]), ns = { class: "fm-typo-en-t
3930
3931
  h(Ht, {
3931
3932
  label: m(a)("menu.group.translation.translation")
3932
3933
  }, null, 8, ["label"]),
3933
- (k(!0), H(ve, null, Re(f.value, (D) => (k(), q(Yt, {
3934
- key: D.localeCode,
3935
- "locale-code": D.localeCode,
3936
- "model-value": D.value,
3934
+ (k(!0), H(ve, null, Re(f.value, ($) => (k(), q(Yt, {
3935
+ key: $.localeCode,
3936
+ "locale-code": $.localeCode,
3937
+ "model-value": $.value,
3937
3938
  readonly: ""
3938
3939
  }, null, 8, ["locale-code", "model-value"]))), 128))
3939
3940
  ])) : ne("", !0)
@@ -3942,7 +3943,7 @@ const ts = /* @__PURE__ */ vt(Qr, [["render", es]]), ns = { class: "fm-typo-en-t
3942
3943
  M("div", ls, [
3943
3944
  M("div", {
3944
3945
  class: "flex items-center gap-16 cursor-pointer",
3945
- onClick: _[1] || (_[1] = (D) => r.value = !r.value)
3946
+ onClick: _[1] || (_[1] = ($) => r.value = !r.value)
3946
3947
  }, [
3947
3948
  h(O, {
3948
3949
  name: "keyboard_arrow_down",
@@ -3951,17 +3952,17 @@ const ts = /* @__PURE__ */ vt(Qr, [["render", es]]), ns = { class: "fm-typo-en-t
3951
3952
  M("p", us, ae(m(a)("menu.group.translation.product_name")), 1)
3952
3953
  ]),
3953
3954
  r.value ? (k(), H("div", cs, [
3954
- (k(!0), H(ve, null, Re(v.value, (D) => (k(), H("div", {
3955
- key: D._id,
3955
+ (k(!0), H(ve, null, Re(v.value, ($) => (k(), H("div", {
3956
+ key: $._id,
3956
3957
  class: "space-y-8"
3957
3958
  }, [
3958
- M("p", ds, ae(m(a)("menu.group.translation.option", { number: D.optionIndex })), 1),
3959
+ M("p", ds, ae(m(a)("menu.group.translation.option", { number: $.optionIndex })), 1),
3959
3960
  M("div", ms, [
3960
3961
  h(Wt, {
3961
3962
  label: m(a)("menu.group.translation.default"),
3962
- "model-value": c.value[D._id] || "",
3963
- "onUpdate:modelValue": (y) => c.value[D._id] = y,
3964
- placeholder: D.fallbackName || "",
3963
+ "model-value": c.value[$._id] || "",
3964
+ "onUpdate:modelValue": (y) => c.value[$._id] = y,
3965
+ placeholder: $.fallbackName || "",
3965
3966
  spacing: "sm"
3966
3967
  }, null, 8, ["label", "model-value", "onUpdate:modelValue", "placeholder"]),
3967
3968
  l.value.length > 0 ? (k(), H("div", ps, [
@@ -3972,9 +3973,9 @@ const ts = /* @__PURE__ */ vt(Qr, [["render", es]]), ns = { class: "fm-typo-en-t
3972
3973
  (k(!0), H(ve, null, Re(l.value, (y) => (k(), q(Yt, {
3973
3974
  key: y,
3974
3975
  "locale-code": y,
3975
- modelValue: u.value[D._id][y],
3976
- "onUpdate:modelValue": (z) => u.value[D._id][y] = z,
3977
- placeholder: D.name || D.fallbackName || ""
3976
+ modelValue: u.value[$._id][y],
3977
+ "onUpdate:modelValue": (z) => u.value[$._id][y] = z,
3978
+ placeholder: $.name || $.fallbackName || ""
3978
3979
  }, null, 8, ["locale-code", "modelValue", "onUpdate:modelValue", "placeholder"]))), 128))
3979
3980
  ])) : ne("", !0)
3980
3981
  ])
@@ -4660,7 +4661,7 @@ const Ns = {
4660
4661
  if (!de) return;
4661
4662
  y(de._id, G.combinationKey ?? "", "isDefault", j);
4662
4663
  } else
4663
- D(G._id, "isDefault", j);
4664
+ $(G._id, "isDefault", j);
4664
4665
  }
4665
4666
  }, null);
4666
4667
  }
@@ -4710,7 +4711,7 @@ const Ns = {
4710
4711
  if (!de) return;
4711
4712
  y(de._id, G.combinationKey ?? "", "name", j || null);
4712
4713
  } else
4713
- D(G._id, "name", j || null);
4714
+ $(G._id, "name", j || null);
4714
4715
  },
4715
4716
  class: "min-w-[300px]"
4716
4717
  }, {
@@ -4759,7 +4760,7 @@ const Ns = {
4759
4760
  oe
4760
4761
  );
4761
4762
  } else
4762
- D(G._id, "price", oe);
4763
+ $(G._id, "price", oe);
4763
4764
  },
4764
4765
  showCurrency: !1,
4765
4766
  class: "min-w-[88px]"
@@ -4783,7 +4784,7 @@ const Ns = {
4783
4784
  if (!xe) return;
4784
4785
  y(xe._id, G.combinationKey ?? "", de);
4785
4786
  } else
4786
- D(G._id, de);
4787
+ $(G._id, de);
4787
4788
  }
4788
4789
  }, {
4789
4790
  default: ({
@@ -4830,7 +4831,7 @@ const Ns = {
4830
4831
  ue
4831
4832
  );
4832
4833
  } else
4833
- D(G._id, "orderFrom", ue);
4834
+ $(G._id, "orderFrom", ue);
4834
4835
  },
4835
4836
  label: "",
4836
4837
  menuZIndex: 101
@@ -4863,7 +4864,7 @@ const Ns = {
4863
4864
  if (!j) return;
4864
4865
  y(j._id, I.combinationKey ?? "", ue);
4865
4866
  } else
4866
- D(I._id, ue);
4867
+ $(I._id, ue);
4867
4868
  }
4868
4869
  }, null), g(I.combinationKey).inventory && h(Vn, {
4869
4870
  title: "Inventory",
@@ -4883,7 +4884,7 @@ const Ns = {
4883
4884
  ee
4884
4885
  );
4885
4886
  } else
4886
- D(I._id, "inventoryBindings", ee);
4887
+ $(I._id, "inventoryBindings", ee);
4887
4888
  }
4888
4889
  }, {
4889
4890
  default: ({
@@ -4939,7 +4940,7 @@ const Ns = {
4939
4940
  }
4940
4941
  });
4941
4942
  }
4942
- function D(w, I, G) {
4943
+ function $(w, I, G) {
4943
4944
  const J = t.group.items[w];
4944
4945
  if (!J) return;
4945
4946
  const ee = {
@@ -4976,7 +4977,7 @@ const Ns = {
4976
4977
  const I = we(t.group);
4977
4978
  delete I.items[w], i("update:group", I);
4978
4979
  }
4979
- function $(w) {
4980
+ function D(w) {
4980
4981
  t.config.isV4 ? i("update:group", w) : i("update:unmap-group", Xt(w));
4981
4982
  }
4982
4983
  const B = F(() => t.categorizedItems.flatMap((w) => w.items).reduce((w, I) => {
@@ -5090,7 +5091,7 @@ const Ns = {
5090
5091
  modelValue: s.value,
5091
5092
  "onUpdate:modelValue": I[4] || (I[4] = (ee) => s.value = ee),
5092
5093
  group: w.group,
5093
- "onUpdate:group": $
5094
+ "onUpdate:group": D
5094
5095
  }, null, 8, ["modelValue", "group"])], 64);
5095
5096
  };
5096
5097
  }
@@ -5232,13 +5233,13 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5232
5233
  b.value.isOverride
5233
5234
  )[0];
5234
5235
  }
5235
- const D = W(ze.clone(i.group)), y = St(
5236
- () => !ze.isEqual(i.group, D.value),
5236
+ const $ = W(ze.clone(i.group)), y = St(
5237
+ () => !ze.isEqual(i.group, $.value),
5237
5238
  () => {
5238
5239
  v.value = !1;
5239
5240
  }
5240
5241
  ), z = F(() => i.action === "add" ? Q("common.add") : Q("common.update"));
5241
- async function $() {
5242
+ async function D() {
5242
5243
  var w;
5243
5244
  if (i.action === "add") {
5244
5245
  if (o.groups.find((G) => G.name === _.value)) {
@@ -5299,7 +5300,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5299
5300
  Se(
5300
5301
  () => v.value,
5301
5302
  async (w) => {
5302
- a("status:show", w), w && (await ri(), D.value = ze.clone(i.group));
5303
+ a("status:show", w), w && (await ri(), $.value = ze.clone(i.group));
5303
5304
  }
5304
5305
  );
5305
5306
  const B = F(() => {
@@ -5353,7 +5354,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5353
5354
  "onUpdate:modelValue": I[9] || (I[9] = (_e) => v.value = _e),
5354
5355
  "is-container": m(Ae).FmForm,
5355
5356
  "is-container-props": {
5356
- onValidationSuccess: $,
5357
+ onValidationSuccess: D,
5357
5358
  blameFormChildOnValidationFailed: !0
5358
5359
  },
5359
5360
  "max-width": 800,
@@ -5389,7 +5390,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5389
5390
  h(ee, {
5390
5391
  modelValue: _.value,
5391
5392
  "onUpdate:modelValue": I[1] || (I[1] = (me) => _.value = me),
5392
- placeholder: (_e = D.value) == null ? void 0 : _e.name,
5393
+ placeholder: (_e = $.value) == null ? void 0 : _e.name,
5393
5394
  disabled: V("name"),
5394
5395
  rules: V("name") ? [] : X.value,
5395
5396
  autofocus: "",
@@ -5536,7 +5537,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5536
5537
  modelValue: S.value,
5537
5538
  "onUpdate:modelValue": I[10] || (I[10] = (_e) => S.value = _e),
5538
5539
  title: m(Q)("menu.group.title"),
5539
- name: _.value ?? ((xe = D.value) == null ? void 0 : xe.name) ?? "",
5540
+ name: _.value ?? ((xe = $.value) == null ? void 0 : xe.name) ?? "",
5540
5541
  "name-locale": w.group.name_locale,
5541
5542
  "onUpdate:name": O,
5542
5543
  "onUpdate:nameLocale": C
@@ -5564,19 +5565,19 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5564
5565
  ), p = F(() => {
5565
5566
  var y, z;
5566
5567
  if (!b.value) return null;
5567
- const C = ((z = (y = s.value[d.value]) == null ? void 0 : y.groups) == null ? void 0 : z.find(($) => $._id === i.groupId)) || {
5568
+ const C = ((z = (y = s.value[d.value]) == null ? void 0 : y.groups) == null ? void 0 : z.find((D) => D._id === i.groupId)) || {
5568
5569
  _id: i.groupId,
5569
5570
  groupKey: ""
5570
- }, O = o.state.menu.modules.group.find(($) => $._id === i.groupId), P = Object.entries({ ...C, items: void 0 }).filter(([, $]) => !!$), E = {
5571
+ }, O = o.state.menu.modules.group.find((D) => D._id === i.groupId), P = Object.entries({ ...C, items: void 0 }).filter(([, D]) => !!D), E = {
5571
5572
  ...O,
5572
5573
  ...Object.fromEntries(P),
5573
- items: O.items.map(($) => {
5574
+ items: O.items.map((D) => {
5574
5575
  var Z;
5575
5576
  const B = (Z = C.items) == null ? void 0 : Z.find(
5576
- (T) => T._id == $._id && T.combinationKey == $.combinationKey
5577
+ (T) => T._id == D._id && T.combinationKey == D.combinationKey
5577
5578
  );
5578
5579
  return {
5579
- ...$,
5580
+ ...D,
5580
5581
  ...B ?? {},
5581
5582
  price: (B == null ? void 0 : B.price) || null,
5582
5583
  price_variant: (B == null ? void 0 : B.price_variant) || null,
@@ -5592,13 +5593,13 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5592
5593
  )[0];
5593
5594
  });
5594
5595
  function f(C) {
5595
- var E, D;
5596
+ var E, $;
5596
5597
  const _ = (E = s.value[d.value].groups) == null ? void 0 : E.findIndex(
5597
5598
  (y) => y._id === i.groupId
5598
5599
  ), O = we(s.value), P = { ...Xt(C), _id: i.groupId, groupKey: "" };
5599
5600
  (_ ?? -1) < 0 ? O[d.value] = {
5600
5601
  ...O[d.value],
5601
- groups: [...((D = O[d.value]) == null ? void 0 : D.groups) || [], P]
5602
+ groups: [...(($ = O[d.value]) == null ? void 0 : $.groups) || [], P]
5602
5603
  } : O[d.value].groups[_] = P, s.value = O;
5603
5604
  }
5604
5605
  function v(C) {
@@ -5661,12 +5662,12 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5661
5662
  group: p.value,
5662
5663
  action: "update",
5663
5664
  title: m(V)("menu.group.update"),
5664
- "onUpdate:group": _[3] || (_[3] = (D) => f(D)),
5665
- "onSubmit:group": _[4] || (_[4] = (D) => g()),
5666
- "onStatus:show": _[5] || (_[5] = (D) => b.value = D)
5665
+ "onUpdate:group": _[3] || (_[3] = ($) => f($)),
5666
+ "onSubmit:group": _[4] || (_[4] = ($) => g()),
5667
+ "onStatus:show": _[5] || (_[5] = ($) => b.value = $)
5667
5668
  }, {
5668
- default: R(({ trigger: D }) => [
5669
- Ve(C.$slots, "default", { trigger: D })
5669
+ default: R(({ trigger: $ }) => [
5670
+ Ve(C.$slots, "default", { trigger: $ })
5670
5671
  ]),
5671
5672
  "variant-section": R(() => [
5672
5673
  u.value ? (k(), q(E, {
@@ -5679,7 +5680,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5679
5680
  M("div", Qs, [
5680
5681
  h(O, {
5681
5682
  modelValue: u.value,
5682
- "onUpdate:modelValue": _[0] || (_[0] = (D) => u.value = D),
5683
+ "onUpdate:modelValue": _[0] || (_[0] = ($) => u.value = $),
5683
5684
  items: c.value,
5684
5685
  class: "flex-1"
5685
5686
  }, null, 8, ["modelValue", "items"]),
@@ -5688,13 +5689,13 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5688
5689
  variant: m(Be).Tertiary,
5689
5690
  "prepend-icon": "keyboard_arrow_left",
5690
5691
  size: "lg",
5691
- onClick: _[1] || (_[1] = (D) => v("left"))
5692
+ onClick: _[1] || (_[1] = ($) => v("left"))
5692
5693
  }, null, 8, ["variant"]),
5693
5694
  h(P, {
5694
5695
  variant: m(Be).Tertiary,
5695
5696
  "prepend-icon": "keyboard_arrow_right",
5696
5697
  size: "lg",
5697
- onClick: _[2] || (_[2] = (D) => v("right"))
5698
+ onClick: _[2] || (_[2] = ($) => v("right"))
5698
5699
  }, null, 8, ["variant"])
5699
5700
  ])
5700
5701
  ])
@@ -5866,26 +5867,26 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5866
5867
  }
5867
5868
  const f = F(() => {
5868
5869
  var z;
5869
- return [...v(p(c.value, t.form.groups || ((z = t.fallback) == null ? void 0 : z.groups) || [])).map(($) => $._id)];
5870
+ return [...v(p(c.value, t.form.groups || ((z = t.fallback) == null ? void 0 : z.groups) || [])).map((D) => D._id)];
5870
5871
  });
5871
5872
  function v(y) {
5872
- return we(y ?? []).sort(($, B) => $.position - B.position);
5873
+ return we(y ?? []).sort((D, B) => D.position - B.position);
5873
5874
  }
5874
5875
  function S(y) {
5875
5876
  const z = c.value.find((Z) => Z._id === y);
5876
5877
  if (!z)
5877
5878
  return [];
5878
- const $ = [];
5879
+ const D = [];
5879
5880
  return z.items.forEach((Z) => {
5880
5881
  if (Z.combinationKey)
5881
5882
  return;
5882
5883
  const T = a.items.find((te) => te._id === Z._id), X = z.items.filter((te) => te._id === Z._id && te.combinationKey).length;
5883
- $.push({
5884
+ D.push({
5884
5885
  code: Z.code || (T == null ? void 0 : T.code),
5885
5886
  name: Z.name || (T == null ? void 0 : T.name),
5886
5887
  variantCount: X
5887
5888
  });
5888
- }), $.map((Z) => {
5889
+ }), D.map((Z) => {
5889
5890
  const T = [(Z == null ? void 0 : Z.code) || "", (Z == null ? void 0 : Z.name) || ""].join(" ").trim();
5890
5891
  return (Z.variantCount || 0) > 1 ? `${T} (${l("menu.group.list.variants", {
5891
5892
  count: Z.variantCount
@@ -5897,9 +5898,9 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5897
5898
  type: tn(a.items, z.items)
5898
5899
  }, y), {})), b = F(() => [...Object.entries(g.value).map(([y, {
5899
5900
  name: z,
5900
- type: $
5901
+ type: D
5901
5902
  }]) => ({
5902
- label: `${z} ${u.value.type ? `(${bn($)})` : ""}`.trim(),
5903
+ label: `${z} ${u.value.type ? `(${bn(D)})` : ""}`.trim(),
5903
5904
  value: y
5904
5905
  }))]), A = F(() => [{
5905
5906
  accessorKey: "name",
@@ -5915,9 +5916,9 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5915
5916
  header: () => l("menu.product.form.group.columns.type"),
5916
5917
  enableSorting: !1,
5917
5918
  cell: (y) => {
5918
- var $;
5919
+ var D;
5919
5920
  const z = y.row.original._id;
5920
- return bn(($ = g.value[z]) == null ? void 0 : $.type);
5921
+ return bn((D = g.value[z]) == null ? void 0 : D.type);
5921
5922
  }
5922
5923
  }, {
5923
5924
  accessorKey: "items",
@@ -5966,16 +5967,16 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5966
5967
  // combinationKey: varaintName
5967
5968
  fullCombinations: t.fullCombinations,
5968
5969
  groupId: z,
5969
- "onUpdate:combinations": D
5970
+ "onUpdate:combinations": $
5970
5971
  }, {
5971
5972
  default: ({
5972
- trigger: $
5973
+ trigger: D
5973
5974
  }) => Me(Ae.FmButton, {
5974
5975
  icon: "edit",
5975
5976
  variant: "tertiary",
5976
5977
  disabled: !P(z),
5977
5978
  textColor: "neutral-gray-400",
5978
- onClick: $
5979
+ onClick: D
5979
5980
  })
5980
5981
  })]);
5981
5982
  }
@@ -5991,9 +5992,9 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
5991
5992
  }
5992
5993
  }).onPrimary((y) => {
5993
5994
  var z;
5994
- for (const $ of y)
5995
- if (vo(a.state.menu, $, t.form._id)) {
5996
- const B = (z = g.value[$]) == null ? void 0 : z.name;
5995
+ for (const D of y)
5996
+ if (vo(a.state.menu, D, t.form._id)) {
5997
+ const B = (z = g.value[D]) == null ? void 0 : z.name;
5997
5998
  i.open({
5998
5999
  type: "error",
5999
6000
  message: l("menu.product.form.group.circularError", {
@@ -6007,13 +6008,13 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6007
6008
  });
6008
6009
  }
6009
6010
  function x(y) {
6010
- const z = y.reduce(($, B) => {
6011
+ const z = y.reduce((D, B) => {
6011
6012
  var T;
6012
6013
  const Z = ((T = t.form.groups) == null ? void 0 : T.find((X) => X._id === B)) || {
6013
6014
  _id: B,
6014
6015
  groupKey: ""
6015
6016
  };
6016
- return $.push(Z), $;
6017
+ return D.push(Z), D;
6017
6018
  }, []);
6018
6019
  s("replace:form", o.initDynamicGroupItem({
6019
6020
  ...t.form,
@@ -6021,12 +6022,12 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6021
6022
  }));
6022
6023
  }
6023
6024
  function C(y) {
6024
- var $, B, Z;
6025
+ var D, B, Z;
6025
6026
  if (!t.form.groups)
6026
6027
  return;
6027
6028
  const z = we(t.form.groups);
6028
6029
  z.splice(z.findIndex((T) => T._id === y), 1);
6029
- for (const T of (($ = t.form.variant) == null ? void 0 : $.variantCombinations) || [])
6030
+ for (const T of ((D = t.form.variant) == null ? void 0 : D.variantCombinations) || [])
6030
6031
  (Z = T.groups) == null || Z.splice((B = T.groups) == null ? void 0 : B.findIndex((X) => X._id === y), 1);
6031
6032
  s("replace:form", o.initDynamicGroupItem({
6032
6033
  ...t.form,
@@ -6045,10 +6046,10 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6045
6046
  }];
6046
6047
  });
6047
6048
  function P(y) {
6048
- var $;
6049
+ var D;
6049
6050
  if (!y) return !1;
6050
6051
  if (d.value.overrideProductGroup) return !0;
6051
- switch (($ = g.value[y]) == null ? void 0 : $.type) {
6052
+ switch ((D = g.value[y]) == null ? void 0 : D.type) {
6052
6053
  case Ce.enum.DYNAMIC:
6053
6054
  return !0;
6054
6055
  case Ce.enum.PRODUCT:
@@ -6062,8 +6063,8 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6062
6063
  Se(() => c.value.length, () => x([...f.value, c.value[c.value.length - 1]._id]));
6063
6064
  const E = (y) => {
6064
6065
  var z;
6065
- return (z = b.value.find(($) => $.value === y)) == null ? void 0 : z.label;
6066
- }, D = (y) => {
6066
+ return (z = b.value.find((D) => D.value === y)) == null ? void 0 : z.label;
6067
+ }, $ = (y) => {
6067
6068
  var z;
6068
6069
  _.value ? s("update:form", "variant", {
6069
6070
  variantGroupIds: ((z = t.form.variant) == null ? void 0 : z.variantGroupIds) || [],
@@ -6071,12 +6072,12 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6071
6072
  }) : s("update:form", "groups", y[0].groups || []);
6072
6073
  };
6073
6074
  return (y, z) => {
6074
- const $ = L("FmButton"), B = L("FmTable");
6075
+ const D = L("FmButton"), B = L("FmTable");
6075
6076
  return k(), q(Ne, {
6076
6077
  title: m(l)("menu.product.form.group.title"),
6077
6078
  "sub-title": m(l)("menu.product.form.group.subtitle")
6078
6079
  }, {
6079
- "append-title": R(() => [h($, {
6080
+ "append-title": R(() => [h(D, {
6080
6081
  class: "flex-shrink-0",
6081
6082
  label: m(l)("menu.product.form.group.add"),
6082
6083
  "prepend-icon": "add",
@@ -6158,12 +6159,12 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6158
6159
  if ((((O = C == null ? void 0 : C.variantCombinations) == null ? void 0 : O.length) ?? 0) > 0 && C) {
6159
6160
  const E = C.variantCombinations.findIndex((y) => y.combinationKey === V);
6160
6161
  if (E < 0) return;
6161
- const D = ze.clone(C.variantCombinations);
6162
- D[E].inventoryBindings = N, x = {
6162
+ const $ = ze.clone(C.variantCombinations);
6163
+ $[E].inventoryBindings = N, x = {
6163
6164
  ...x,
6164
6165
  variant: {
6165
6166
  variantGroupIds: ((P = x.variant) == null ? void 0 : P.variantGroupIds) || [],
6166
- variantCombinations: D
6167
+ variantCombinations: $
6167
6168
  }
6168
6169
  };
6169
6170
  } else
@@ -6366,7 +6367,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6366
6367
  C ? l("update:form", "priceTiers_variant", $n(x)) : l("update:form", "price_variant", Dn(x));
6367
6368
  }
6368
6369
  return (x, C) => {
6369
- const _ = L("fm-select"), O = L("FmButton"), P = L("fm-checkbox"), E = L("fm-text-field"), D = jt("tooltip");
6370
+ const _ = L("fm-select"), O = L("FmButton"), P = L("fm-checkbox"), E = L("fm-text-field"), $ = jt("tooltip");
6370
6371
  return k(), q(Ne, {
6371
6372
  title: m(r)("menu.product.form.price.title")
6372
6373
  }, {
@@ -6380,12 +6381,12 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6380
6381
  "model-value": x.form.price || null,
6381
6382
  placeholder: (y = x.fallback) != null && y.price ? m(Ye)(x.fallback.price, !1) : void 0,
6382
6383
  rules: [
6383
- s.value.price ? ($) => !!$ || m(r)("menu.product.form.price.fields.selling_price.required") : void 0
6384
+ s.value.price ? (D) => !!D || m(r)("menu.product.form.price.fields.selling_price.required") : void 0
6384
6385
  ].filter(m(gt).isSet),
6385
6386
  class: "w-[258px] xs:w-full",
6386
6387
  label: m(r)("menu.product.form.price.fields.selling_price.label"),
6387
6388
  "show-currency": "",
6388
- "onUpdate:modelValue": C[0] || (C[0] = ($) => $ && l("update:form", "price", $))
6389
+ "onUpdate:modelValue": C[0] || (C[0] = (D) => D && l("update:form", "price", D))
6389
6390
  }, {
6390
6391
  append: R(() => [
6391
6392
  st(h(m(Kt), {
@@ -6393,7 +6394,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6393
6394
  class: "shrink-0 scale-75",
6394
6395
  onClick: g
6395
6396
  }, null, 512), [
6396
- [D, m(Vt)("Suggest pricing")]
6397
+ [$, m(Vt)("Suggest pricing")]
6397
6398
  ])
6398
6399
  ]),
6399
6400
  _: 1
@@ -6408,7 +6409,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6408
6409
  placeholder: "--",
6409
6410
  class: "flex-1",
6410
6411
  "shift-menu": "",
6411
- "onUpdate:modelValue": C[1] || (C[1] = ($) => l("update:form", "taxes", [m(cn).decodeTax($)]))
6412
+ "onUpdate:modelValue": C[1] || (C[1] = (D) => l("update:form", "taxes", [m(cn).decodeTax(D)]))
6412
6413
  }, null, 8, ["disabled", "items", "label", "model-value"])
6413
6414
  ]),
6414
6415
  m(a).isV4 ? (k(), H("div", gl, [
@@ -6425,14 +6426,14 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6425
6426
  "base-price-fallback": (z = x.fallback) != null && z.price ? m(Ye)(x.fallback.price, !1) : void 0,
6426
6427
  "price-variants": V.value,
6427
6428
  "show-remy": !0,
6428
- "onUpdate:basePrice": C[2] || (C[2] = ($) => l("update:form", "price", $)),
6429
- "onUpdate:priceVariants": C[3] || (C[3] = ($) => N($))
6429
+ "onUpdate:basePrice": C[2] || (C[2] = (D) => l("update:form", "price", D)),
6430
+ "onUpdate:priceVariants": C[3] || (C[3] = (D) => N(D))
6430
6431
  }, {
6431
- default: R(({ trigger: $ }) => [
6432
+ default: R(({ trigger: D }) => [
6432
6433
  h(O, {
6433
6434
  variant: m(Be).Secondary,
6434
6435
  label: m(r)("menu.product.form.member_price.configure.title"),
6435
- onClick: (B) => $()
6436
+ onClick: (B) => D()
6436
6437
  }, null, 8, ["variant", "label", "onClick"])
6437
6438
  ]),
6438
6439
  _: 1
@@ -6454,12 +6455,12 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6454
6455
  }, null, 8, ["label", "onClick"])
6455
6456
  ]),
6456
6457
  default: R(() => {
6457
- var $;
6458
+ var D;
6458
6459
  return [
6459
6460
  x.isOverride ? ne("", !0) : (k(), q(Li, {
6460
6461
  key: 0,
6461
6462
  "price-tiers": m(o).priceTiers.value,
6462
- "model-value": x.form.priceTiers || (($ = x.fallback) == null ? void 0 : $.priceTiers) || {},
6463
+ "model-value": x.form.priceTiers || ((D = x.fallback) == null ? void 0 : D.priceTiers) || {},
6463
6464
  "allow-negative-price": !1,
6464
6465
  "price-variant": x.form.priceTiers_variant,
6465
6466
  "onUpdate:modelValue": C[4] || (C[4] = (B) => l("update:form", "priceTiers", B)),
@@ -6473,12 +6474,12 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6473
6474
  label: m(r)("menu.product.form.price.settings.title")
6474
6475
  }, {
6475
6476
  default: R(() => {
6476
- var $, B, Z;
6477
+ var D, B, Z;
6477
6478
  return [
6478
6479
  M("div", kl, [
6479
6480
  h(P, {
6480
6481
  disabled: !s.value.openPrice || x.isAddon,
6481
- "model-value": x.form.openPrice ?? (($ = x.fallback) == null ? void 0 : $.openPrice) ?? !1,
6482
+ "model-value": x.form.openPrice ?? ((D = x.fallback) == null ? void 0 : D.openPrice) ?? !1,
6482
6483
  value: x.form.openPrice,
6483
6484
  label: m(r)("menu.product.form.price.settings.open_price.label"),
6484
6485
  sublabel: m(r)("menu.product.form.price.settings.open_price.sublabel"),
@@ -6820,13 +6821,13 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6820
6821
  class: "space-y-16"
6821
6822
  }, {
6822
6823
  item: R(({ element: P }) => {
6823
- var E, D, y, z, $;
6824
+ var E, $, y, z, D;
6824
6825
  return [
6825
6826
  M("div", Nl, [
6826
6827
  M("div", Bl, [
6827
6828
  u.value ? (k(), q(C, {
6828
6829
  key: 0,
6829
- disabled: !((D = (E = t.form.print) == null ? void 0 : E.department) != null && D.includes(P)),
6830
+ disabled: !(($ = (E = t.form.print) == null ? void 0 : E.department) != null && $.includes(P)),
6830
6831
  class: "handle",
6831
6832
  "prepend-icon": "drag_handle",
6832
6833
  variant: "tertiary",
@@ -6838,7 +6839,7 @@ const Hs = { class: "fm-typo-en-title-md-600" }, Ys = {
6838
6839
  id: P,
6839
6840
  "data-checked": (z = (y = t.form.print) == null ? void 0 : y.department) == null ? void 0 : z.includes(P),
6840
6841
  label: c.value[P],
6841
- "model-value": ((($ = t.form.print) == null ? void 0 : $.department) ?? []).includes(P),
6842
+ "model-value": (((D = t.form.print) == null ? void 0 : D.department) ?? []).includes(P),
6842
6843
  value: P,
6843
6844
  class: "flex-1",
6844
6845
  "onUpdate:modelValue": (B) => S(P, B)
@@ -7381,21 +7382,21 @@ const Ql = {
7381
7382
  function v(y) {
7382
7383
  const z = ze.clone(t.form);
7383
7384
  for (const {
7384
- key: $,
7385
+ key: D,
7385
7386
  value: B
7386
7387
  } of y)
7387
- z[$] = B;
7388
+ z[D] = B;
7388
7389
  f("replace:form", z);
7389
7390
  }
7390
7391
  function S(y) {
7391
- var $;
7392
+ var D;
7392
7393
  const z = b(y.combinationKey || "");
7393
7394
  return {
7394
7395
  ...y,
7395
7396
  price: z == null ? void 0 : z.price,
7396
7397
  inventoryBindings: (z == null ? void 0 : z.inventoryBindings) || t.form.inventoryBindings,
7397
7398
  takeawayUsed: (z == null ? void 0 : z.takeawayUsed) || t.form.takeawayUsed,
7398
- groups: (z == null ? void 0 : z.groups) || (($ = t.form.groups) == null ? void 0 : $.map((B) => ({
7399
+ groups: (z == null ? void 0 : z.groups) || ((D = t.form.groups) == null ? void 0 : D.map((B) => ({
7399
7400
  ...B,
7400
7401
  groupKey: ""
7401
7402
  })))
@@ -7415,25 +7416,25 @@ const Ql = {
7415
7416
  }
7416
7417
  function b(y) {
7417
7418
  var X, te;
7418
- const z = ((X = t.form.variant) == null ? void 0 : X.variantGroupIds) || [], $ = (te = t.form.variant) == null ? void 0 : te.variantCombinations, T = y.split(/(?=variant)/g).map((Q) => Q.replace(/\/*$/, "")).filter((Q) => z.some((ce) => Q.includes(ce))).join("/");
7419
- return $ == null ? void 0 : $.find((Q) => Q.combinationKey === T);
7419
+ const z = ((X = t.form.variant) == null ? void 0 : X.variantGroupIds) || [], D = (te = t.form.variant) == null ? void 0 : te.variantCombinations, T = y.split(/(?=variant)/g).map((Q) => Q.replace(/\/*$/, "")).filter((Q) => z.some((ce) => Q.includes(ce))).join("/");
7420
+ return D == null ? void 0 : D.find((Q) => Q.combinationKey === T);
7420
7421
  }
7421
7422
  const A = (y) => {
7422
7423
  N(y);
7423
7424
  }, V = F(() => {
7424
7425
  var z;
7425
- return (((z = t.form.variant) == null ? void 0 : z.variantCombinations) || []).map(($) => {
7426
+ return (((z = t.form.variant) == null ? void 0 : z.variantCombinations) || []).map((D) => {
7426
7427
  var T, X;
7427
7428
  const B = (X = (T = t.fallback) == null ? void 0 : T.variant) == null ? void 0 : X.variantCombinations.find(({
7428
7429
  combinationKey: te
7429
- }) => te === $.combinationKey), Z = _.value ? null : $.price;
7430
+ }) => te === D.combinationKey), Z = _.value ? null : D.price;
7430
7431
  return {
7431
- ...$,
7432
+ ...D,
7432
7433
  price: Z,
7433
7434
  fallback: {
7434
7435
  ...B,
7435
- _id: $._id,
7436
- combinationKey: $.combinationKey,
7436
+ _id: D._id,
7437
+ combinationKey: D.combinationKey,
7437
7438
  price: c.value ? t.form.price ?? (B == null ? void 0 : B.price) : Z ?? (B == null ? void 0 : B.price),
7438
7439
  minPrice: t.form.minPrice ?? (B == null ? void 0 : B.minPrice),
7439
7440
  priceTiers: t.form.priceTiers
@@ -7441,12 +7442,12 @@ const Ql = {
7441
7442
  };
7442
7443
  });
7443
7444
  });
7444
- function N(y, z = ($) => $) {
7445
+ function N(y, z = (D) => D) {
7445
7446
  var Z;
7446
- const $ = y.filter((T) => !!T);
7447
+ const D = y.filter((T) => !!T);
7447
7448
  let B;
7448
- if ($.length) {
7449
- const T = $.map((te) => i.variants.find((Q) => Q._id === te)), X = We.fullVariantCombination(T).map(({
7449
+ if (D.length) {
7450
+ const T = D.map((te) => i.variants.find((Q) => Q._id === te)), X = We.fullVariantCombination(T).map(({
7450
7451
  combinationKey: te
7451
7452
  }) => {
7452
7453
  var ce;
@@ -7466,7 +7467,7 @@ const Ql = {
7466
7467
  B = {
7467
7468
  ...t.form,
7468
7469
  variant: {
7469
- variantGroupIds: $,
7470
+ variantGroupIds: D,
7470
7471
  variantCombinations: X
7471
7472
  },
7472
7473
  inventoryBindings: null,
@@ -7488,9 +7489,9 @@ const Ql = {
7488
7489
  }
7489
7490
  f("replace:form", a.initDynamicGroupItem(B));
7490
7491
  }
7491
- async function x(y, z, $) {
7492
+ async function x(y, z, D) {
7492
7493
  const B = ze.clone(t.form);
7493
- B.variant.variantCombinations[y][z] = $, v([{
7494
+ B.variant.variantCombinations[y][z] = D, v([{
7494
7495
  key: "variant",
7495
7496
  value: B.variant
7496
7497
  }]);
@@ -7509,7 +7510,7 @@ const Ql = {
7509
7510
  enableSorting: !1,
7510
7511
  cell: (y) => {
7511
7512
  var T, X;
7512
- const z = y.getValue(), $ = y.row.original, Z = ((T = $.fallback) == null ? void 0 : T.code) ?? t.form.code ?? ((X = t.fallback) == null ? void 0 : X.code);
7513
+ const z = y.getValue(), D = y.row.original, Z = ((T = D.fallback) == null ? void 0 : T.code) ?? t.form.code ?? ((X = t.fallback) == null ? void 0 : X.code);
7513
7514
  return h(Ae.FmTextField, {
7514
7515
  modelValue: z,
7515
7516
  placeholder: Z || l("menu.product.form.variant.placeholders.no_code"),
@@ -7518,8 +7519,8 @@ const Ql = {
7518
7519
  var w;
7519
7520
  if (!i.state.featureFlags.uniqueProductCode || !Q) return 0;
7520
7521
  let le = i.itemCodeMap.get(Q) || 0;
7521
- return $.code === Q && le > 0 && (le -= 1), Q === Z && (le += 1), (w = t.form.variant) == null || w.variantCombinations.forEach((I) => {
7522
- I.combinationKey !== $.combinationKey && I.code === Q && (le += 1);
7522
+ return D.code === Q && le > 0 && (le -= 1), Q === Z && (le += 1), (w = t.form.variant) == null || w.variantCombinations.forEach((I) => {
7523
+ I.combinationKey !== D.combinationKey && I.code === Q && (le += 1);
7523
7524
  }), le;
7524
7525
  });
7525
7526
  return s.value && ce.value > 0 ? l("menu.product.form.detail.fields.code.duplicate_warning", {
@@ -7558,7 +7559,7 @@ const Ql = {
7558
7559
  enableSorting: !1,
7559
7560
  cell: (y) => {
7560
7561
  var te, Q, ce;
7561
- const z = y.getValue(), $ = y.row.original, Z = ((te = $.fallback) == null ? void 0 : te.price) ?? t.form.price ?? ((Q = t.fallback) == null ? void 0 : Q.price), T = O.getMemberPricingPriceVariant($.price_variant), X = Object.values(T).every((le) => le === null);
7562
+ const z = y.getValue(), D = y.row.original, Z = ((te = D.fallback) == null ? void 0 : te.price) ?? t.form.price ?? ((Q = t.fallback) == null ? void 0 : Q.price), T = O.getMemberPricingPriceVariant(D.price_variant), X = Object.values(T).every((le) => le === null);
7562
7563
  return h("div", {
7563
7564
  class: "flex items-center gap-8"
7564
7565
  }, [h(rt, {
@@ -7603,9 +7604,9 @@ const Ql = {
7603
7604
  }), h(sn, {
7604
7605
  priceVariants: T
7605
7606
  }, null)]), i.isV4 && !t.isOverride && h(Ni, {
7606
- "price-tiers": $.priceTiers,
7607
- "price-tiers-variant": $.priceTiers_variant,
7608
- fallback: (ce = $.fallback) == null ? void 0 : ce.priceTiers,
7607
+ "price-tiers": D.priceTiers,
7608
+ "price-tiers-variant": D.priceTiers_variant,
7609
+ fallback: (ce = D.fallback) == null ? void 0 : ce.priceTiers,
7609
7610
  "onUpdate:value": (le) => {
7610
7611
  x(y.row.index, "priceTiers", le.priceTiers), x(y.row.index, "priceTiers_variant", $n(le.priceTiersVariant));
7611
7612
  }
@@ -7617,11 +7618,11 @@ const Ql = {
7617
7618
  enableSorting: !1,
7618
7619
  cell: (y) => {
7619
7620
  var T, X, te;
7620
- const z = y.getValue(), $ = y.row.original, Z = ((T = $.fallback) == null ? void 0 : T.minPrice) ?? t.form.minPrice ?? ((X = t.fallback) == null ? void 0 : X.minPrice);
7621
+ const z = y.getValue(), D = y.row.original, Z = ((T = D.fallback) == null ? void 0 : T.minPrice) ?? t.form.minPrice ?? ((X = t.fallback) == null ? void 0 : X.minPrice);
7621
7622
  return h(rt, {
7622
7623
  placeholder: Z ? Ye(Z) : void 0,
7623
7624
  modelValue: z,
7624
- max: Ue.Dinero.fromFdoDinero($.price ?? ((te = $.fallback) == null ? void 0 : te.price) ?? Ue.Dinero.zero().toObject()).toUnit(),
7625
+ max: Ue.Dinero.fromFdoDinero(D.price ?? ((te = D.fallback) == null ? void 0 : te.price) ?? Ue.Dinero.zero().toObject()).toUnit(),
7625
7626
  "onUpdate:model-value": (Q) => {
7626
7627
  x(y.row.index, "minPrice", Q);
7627
7628
  },
@@ -7632,18 +7633,18 @@ const Ql = {
7632
7633
  }]), E = F(() => ({
7633
7634
  minPrice: d.value
7634
7635
  }));
7635
- function D(y) {
7636
+ function $(y) {
7636
7637
  return y != null && y.length && y.length > i.rules.item.maxVariant ? l("menu.product.form.variant.validation.max_variants", {
7637
7638
  max: i.rules.item.maxVariant
7638
7639
  }) : !0;
7639
7640
  }
7640
7641
  return (y, z) => {
7641
- const $ = L("fm-button"), B = L("fm-icon"), Z = L("FmFormGroup"), T = L("fm-table");
7642
+ const D = L("fm-button"), B = L("fm-icon"), Z = L("FmFormGroup"), T = L("fm-table");
7642
7643
  return k(), q(Ne, {
7643
7644
  title: m(l)("menu.product.form.variant.title"),
7644
7645
  "sub-title": m(l)("menu.product.form.variant.subtitle")
7645
7646
  }, {
7646
- "append-title": R(() => [m(i).rules.item.variant ? (k(), q($, {
7647
+ "append-title": R(() => [m(i).rules.item.variant ? (k(), q(D, {
7647
7648
  key: 0,
7648
7649
  label: m(l)("menu.variant.add"),
7649
7650
  variant: "secondary",
@@ -7654,7 +7655,7 @@ const Ql = {
7654
7655
  var X;
7655
7656
  return [M("div", uu, [h(Z, {
7656
7657
  "model-value": (X = y.form.variant) == null ? void 0 : X.variantGroupIds,
7657
- rules: [D]
7658
+ rules: [$]
7658
7659
  }, {
7659
7660
  default: R(() => {
7660
7661
  var te;
@@ -7670,7 +7671,7 @@ const Ql = {
7670
7671
  element: Q
7671
7672
  }) => {
7672
7673
  var ce;
7673
- return [M("div", cu, [h($, {
7674
+ return [M("div", cu, [h(D, {
7674
7675
  variant: m(Be).Tertiary,
7675
7676
  class: "handle",
7676
7677
  "prepend-icon": "drag_handle"
@@ -7871,7 +7872,7 @@ const Ql = {
7871
7872
  }
7872
7873
  ]
7873
7874
  };
7874
- }), D = W(
7875
+ }), $ = W(
7875
7876
  f.value.category != null || !!f.value.code || !!f.value.orderFrom
7876
7877
  );
7877
7878
  function y(Y) {
@@ -7890,7 +7891,7 @@ const Ql = {
7890
7891
  for (const [ge, ie] of Object.entries(K.customAttributes || {}))
7891
7892
  typeof ie == "string" && ie && !((he = Y[ge]) != null && he.includes(ie)) && (Y[ge] = [...Y[ge] || [], ie]);
7892
7893
  }), Y;
7893
- }), $ = W(!!f.value.price || !!f.value.minPrice || !!f.value.costing);
7894
+ }), D = W(!!f.value.price || !!f.value.minPrice || !!f.value.costing);
7894
7895
  function B(Y) {
7895
7896
  Y || (f.value = {
7896
7897
  ...f.value,
@@ -8047,8 +8048,8 @@ const Ql = {
8047
8048
  }
8048
8049
  function oe() {
8049
8050
  x.value && [
8050
- [D.value, y],
8051
- [$.value, B]
8051
+ [$.value, y],
8052
+ [D.value, B]
8052
8053
  ].forEach(([K, he]) => {
8053
8054
  K || he(!1);
8054
8055
  }), i(
@@ -8115,9 +8116,9 @@ const Ql = {
8115
8116
  }, null, 8, ["linked-status"])) : ne("", !0),
8116
8117
  h(po, { "menu-store": m(a) }, null, 8, ["menu-store"]),
8117
8118
  h(pt, {
8118
- toggle: D.value,
8119
+ toggle: $.value,
8119
8120
  "onUpdate:toggle": [
8120
- K[1] || (K[1] = (ie) => D.value = ie),
8121
+ K[1] || (K[1] = (ie) => $.value = ie),
8121
8122
  K[2] || (K[2] = (ie) => y(ie))
8122
8123
  ],
8123
8124
  disabled: !x.value,
@@ -8157,9 +8158,9 @@ const Ql = {
8157
8158
  }, 8, ["title", "sub-title"])) : ne("", !0),
8158
8159
  _.value ? (k(), H("div", vu)) : ne("", !0),
8159
8160
  h(pt, {
8160
- toggle: $.value,
8161
+ toggle: D.value,
8161
8162
  "onUpdate:toggle": [
8162
- K[4] || (K[4] = (ie) => $.value = ie),
8163
+ K[4] || (K[4] = (ie) => D.value = ie),
8163
8164
  K[5] || (K[5] = (ie) => B(ie))
8164
8165
  ],
8165
8166
  disabled: !x.value,
@@ -8434,8 +8435,8 @@ const ln = oi("item-manager", () => {
8434
8435
  categoryId: _,
8435
8436
  "onSubmit:form": async (P, E) => {
8436
8437
  P.inventoryBindings ?? (P.inventoryBindings = []), P.inventoryBindings.length === 0 && (P.inventoryBindings = null);
8437
- const D = Gt();
8438
- await O(P, Ie.F_OPERATION_TYPE.create, D, E);
8438
+ const $ = Gt();
8439
+ await O(P, Ie.F_OPERATION_TYPE.create, $, E);
8439
8440
  }
8440
8441
  });
8441
8442
  }
@@ -8457,19 +8458,19 @@ const ln = oi("item-manager", () => {
8457
8458
  }
8458
8459
  async function d(_) {
8459
8460
  var y;
8460
- const O = e.currentCatalog, P = e.state.currentSchedulerId, E = O.override.scheduler[P] ?? {}, D = (y = E == null ? void 0 : E.items) == null ? void 0 : y.filter((z) => z._id === _._id);
8461
- await u(_, D, async (z) => {
8462
- const $ = z.modules.catalog.find(
8461
+ const O = e.currentCatalog, P = e.state.currentSchedulerId, E = O.override.scheduler[P] ?? {}, $ = (y = E == null ? void 0 : E.items) == null ? void 0 : y.filter((z) => z._id === _._id);
8462
+ await u(_, $, async (z) => {
8463
+ const D = z.modules.catalog.find(
8463
8464
  (B) => B._id === O._id
8464
8465
  );
8465
- await new ot($, e, a.updateMenu, t).update();
8466
+ await new ot(D, e, a.updateMenu, t).update();
8466
8467
  });
8467
8468
  }
8468
8469
  async function c(_) {
8469
8470
  const O = e.currentCatalog;
8470
8471
  await u(_, O.override.items[_._id], async (P) => {
8471
8472
  const E = P.modules.catalog.find(
8472
- (D) => D._id === O._id
8473
+ ($) => $._id === O._id
8473
8474
  );
8474
8475
  await new ot(E, e, a.updateMenu, t).update();
8475
8476
  });
@@ -8479,18 +8480,18 @@ const ln = oi("item-manager", () => {
8479
8480
  (E) => E._id === e.state.currentSchedulerId
8480
8481
  ), P = O.items.filter((E) => E._id === _._id);
8481
8482
  await u(_, P, async (E) => {
8482
- const D = E.modules.scheduler.find(
8483
+ const $ = E.modules.scheduler.find(
8483
8484
  (y) => y._id === O._id
8484
8485
  );
8485
- await new Et(D, e, a.updateMenu, t).update();
8486
+ await new Et($, e, a.updateMenu, t).update();
8486
8487
  });
8487
8488
  }
8488
8489
  async function f(_) {
8489
- var D, y;
8490
- const O = e.state.currentSchedulerId, P = we(e.currentCatalog), E = (y = ((D = P.override.scheduler[O]) == null ? void 0 : D.items) || []) == null ? void 0 : y.reduce((z, $) => {
8491
- if ($.combinationKey) return [...z, $];
8492
- const B = _.find((Z) => Z._id === $._id);
8493
- return B ? [...z, { ...$, price: B.price }] : [...z, $];
8490
+ var $, y;
8491
+ const O = e.state.currentSchedulerId, P = we(e.currentCatalog), E = (y = (($ = P.override.scheduler[O]) == null ? void 0 : $.items) || []) == null ? void 0 : y.reduce((z, D) => {
8492
+ if (D.combinationKey) return [...z, D];
8493
+ const B = _.find((Z) => Z._id === D._id);
8494
+ return B ? [...z, { ...D, price: B.price }] : [...z, D];
8494
8495
  }, []);
8495
8496
  P.override.scheduler = {
8496
8497
  ...P.override.scheduler,
@@ -8502,15 +8503,15 @@ const ln = oi("item-manager", () => {
8502
8503
  }, await new ot(P, e, a.updateMenu, t).update();
8503
8504
  }
8504
8505
  async function v(_) {
8505
- var D;
8506
- const O = we(e.currentCatalog), P = (D = Object.entries(O.override.items)) == null ? void 0 : D.reduce(
8507
- (y, [z, $]) => {
8506
+ var $;
8507
+ const O = we(e.currentCatalog), P = ($ = Object.entries(O.override.items)) == null ? void 0 : $.reduce(
8508
+ (y, [z, D]) => {
8508
8509
  const B = _.find((T) => T._id === z);
8509
8510
  if (!B)
8510
- return y[z] = $, y;
8511
- const Z = $.find((T) => !T.combinationKey);
8511
+ return y[z] = D, y;
8512
+ const Z = D.find((T) => !T.combinationKey);
8512
8513
  return y[z] = [
8513
- ...$.filter((T) => !!T.combinationKey),
8514
+ ...D.filter((T) => !!T.combinationKey),
8514
8515
  {
8515
8516
  ...Z,
8516
8517
  code: B.code || void 0,
@@ -8536,10 +8537,10 @@ const ln = oi("item-manager", () => {
8536
8537
  ).update();
8537
8538
  }
8538
8539
  async function S(_) {
8539
- const O = we(e.currentScheduler), P = O.items.reduce((E, D) => {
8540
- if (D.combinationKey) return [...E, D];
8541
- const y = _.find((z) => z._id === D._id);
8542
- return y ? [...E, { ...D, price: y.price }] : [...E, D];
8540
+ const O = we(e.currentScheduler), P = O.items.reduce((E, $) => {
8541
+ if ($.combinationKey) return [...E, $];
8542
+ const y = _.find((z) => z._id === $._id);
8543
+ return y ? [...E, { ...$, price: y.price }] : [...E, $];
8543
8544
  }, []);
8544
8545
  await new Et(
8545
8546
  {
@@ -8552,18 +8553,19 @@ const ln = oi("item-manager", () => {
8552
8553
  ).update();
8553
8554
  }
8554
8555
  async function g(_) {
8555
- const O = _.reduce((E, D) => {
8556
- const y = e.items.find((z) => z._id === D._id);
8556
+ const O = _.reduce((E, $) => {
8557
+ const y = e.items.find((z) => z._id === $._id);
8557
8558
  return y && E.push({
8558
8559
  ...y,
8559
- code: D.code ?? y.code,
8560
- name: D.name || y.name,
8561
- price: D.price ?? y.price,
8562
- orderFrom: D.orderFrom ?? y.orderFrom,
8563
- taxes: D.taxes ?? y.taxes,
8564
- category: D.category === void 0 ? y.category : D.category,
8565
- position: D.position ?? y.position,
8566
- additionalCategories: D.additionalCategories ?? y.additionalCategories
8560
+ code: $.code ?? y.code,
8561
+ name: $.name || y.name,
8562
+ price: $.price ?? y.price,
8563
+ orderFrom: $.orderFrom ?? y.orderFrom,
8564
+ taxes: $.taxes ?? y.taxes,
8565
+ category: $.category === void 0 ? y.category : $.category,
8566
+ position: $.position ?? y.position,
8567
+ additionalCategories: $.additionalCategories ?? y.additionalCategories,
8568
+ subCategories: $.subCategories ?? y.subCategories
8567
8569
  }), E;
8568
8570
  }, []), { updateMenu: P } = a;
8569
8571
  await P(
@@ -8581,8 +8583,8 @@ const ln = oi("item-manager", () => {
8581
8583
  initialForm: _,
8582
8584
  action: "update",
8583
8585
  "onSubmit:form": async (P, E) => {
8584
- const D = Gt(_._id);
8585
- P.inventoryBindings ?? (P.inventoryBindings = []), P.inventoryBindings.length === 0 && (P.inventoryBindings = null), await O(P, Ie.F_OPERATION_TYPE.update, D, E);
8586
+ const $ = Gt(_._id);
8587
+ P.inventoryBindings ?? (P.inventoryBindings = []), P.inventoryBindings.length === 0 && (P.inventoryBindings = null), await O(P, Ie.F_OPERATION_TYPE.update, $, E);
8586
8588
  }
8587
8589
  });
8588
8590
  }