@feedmepos/mf-menu 0.32.70 → 0.32.71

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 (71) hide show
  1. package/dist/{App-D2qKBNOI.js → App-Bay6p3xd.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DpuE1Txi.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Je_NoQ3y.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CuhfoI6u.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-DBjYkJhB.js} +3 -3
  4. package/dist/{Catalog-B8DQ8HuW.js → Catalog-DfWHNm4n.js} +6 -6
  5. package/dist/{Category-BlfQyXMP.js → Category-51BrJsdv.js} +4 -4
  6. package/dist/{Category-DXRKc5oR.js → Category-m45WrP7O.js} +4 -4
  7. package/dist/{CookingGuide-jNeTimU7.js → CookingGuide-Dk-ibGYd.js} +5 -5
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BMKqOTc3.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CzpScELw.js} +1 -1
  9. package/dist/{Group-BmU0_HFA.js → Group-CZDoqPK7.js} +3 -3
  10. package/dist/{Group-BDS80Kj0.js → Group-NUWfR17j.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-hSxGRxop.js → Group.vue_vue_type_script_setup_true_lang-h8zygLBJ.js} +7 -7
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CUNcxRnJ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Dq5jMv3_.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DjLnCfC5.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-EsQKUSJa.js} +7 -7
  14. package/dist/{Ingredient-Czl2K5rQ.js → Ingredient-CcnUyiM5.js} +4 -4
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-M8HxDzxj.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BwxZEDVT.js} +2 -2
  16. package/dist/{LinkProductSideSheet-iwH-Ft7_.js → LinkProductSideSheet-ClMiajzX.js} +4 -4
  17. package/dist/{MenuSetting-D-PtnHh_.js → MenuSetting-Dw3lVHtp.js} +7 -7
  18. package/dist/{OrderPacing-DpajUDfR.js → OrderPacing-Dh8T7OKW.js} +5 -5
  19. package/dist/{PrintRoute-CWzUI3D1.js → PrintRoute-BrSaSZI3.js} +5 -5
  20. package/dist/{Product-C341g4w7.js → Product-CQ7AuhbY.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-BRLo39YE.js → Product.vue_vue_type_script_setup_true_lang-Bw6l2IEC.js} +14 -14
  22. package/dist/{ProductInternalTools-BUku68VS.js → ProductInternalTools-2rYX2GR0.js} +6 -6
  23. package/dist/{Products-Dco1XgQd.js → Products-CoL7S7-1.js} +64 -64
  24. package/dist/{Publish-sDveejeh.js → Publish-C_lOqrSX.js} +4 -4
  25. package/dist/{Recipe-MfXgmqtt.js → Recipe-Ce8qXnG5.js} +5 -5
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-vtJwWImA.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DMB9bFg9.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-ZnrzCXu3.js → RuleView.vue_vue_type_script_setup_true_lang-D9i9tMAj.js} +481 -481
  28. package/dist/{Scheduler-DKyhr6p8.js → Scheduler-B2ZtWIPp.js} +3 -3
  29. package/dist/{ServingSequence-nEoPok72.js → ServingSequence-BWZ1YpzI.js} +3 -3
  30. package/dist/{Setting-RWyx1jq2.js → Setting-CdxNVi7G.js} +5 -5
  31. package/dist/{Subcategory-B0smFoMD.js → Subcategory-Bn0O6i5t.js} +6 -6
  32. package/dist/{Takeaway-BpwBR54Y.js → Takeaway-luRkknPl.js} +1 -1
  33. package/dist/{Takeaway-BVMZewQ0.js → Takeaway-yE0GhL5I.js} +4 -4
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BTnFR11p.js → Takeaway.vue_vue_type_script_setup_true_lang-CnZTbF3e.js} +5 -5
  35. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-KNIxHJsf.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-B3N7_zfR.js} +1 -1
  36. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-Dznh3-H8.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BLzzBcqV.js} +2 -2
  37. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-k3m88FlR.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BvnoCeCw.js} +15 -15
  38. package/dist/{Unit-BzbHDW_L.js → Unit-JPFtrbuS.js} +2 -2
  39. package/dist/{Variant-BF_zXLDM.js → Variant-BGJ-aKF1.js} +3 -3
  40. package/dist/{_id_-BjGIzI2V.js → _id_-BUlkRwgU.js} +10 -10
  41. package/dist/{app-DDrm4hOt.js → app-2VeaJE9t.js} +37 -37
  42. package/dist/{app-qoGPYaSq.js → app-CMjz-bvL.js} +1 -1
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +29 -17
  45. package/dist/assets/{linked-status-CXL9skR7.js → linked-status-B9caUckb.js} +2 -2
  46. package/dist/assets/{menu-export-rYnoju7h.js → menu-export-DYfPYpgS.js} +3 -3
  47. package/dist/assets/{override-menu-D1btUpWP.js → override-menu-uNjUqcak.js} +2 -2
  48. package/dist/assets/{validate-menu-R6zi6RGb.js → validate-menu-BiXMOXpN.js} +2 -2
  49. package/dist/{catalog-ByfbV1WF.js → catalog--64fgdzd.js} +1 -1
  50. package/dist/{catalogSetting-qvKbsi8t.js → catalogSetting-CplTgRmk.js} +1 -1
  51. package/dist/{currency-C5kmu6Ku.js → currency-CjYkQ4FL.js} +1 -1
  52. package/dist/{dayjs.min-D3WVCWf8.js → dayjs.min-DCMtwvjf.js} +2 -2
  53. package/dist/{discardConfirm-rDbUqsKj.js → discardConfirm-DOc0ieeO.js} +1 -1
  54. package/dist/{index-B2Hnb8WK.js → index-BrtZ42qx.js} +6 -6
  55. package/dist/{index-COu9fsyr.js → index-CTA48kW2.js} +1 -1
  56. package/dist/{index-BoVuN9fk.js → index-Dw_Fw5ni.js} +5 -5
  57. package/dist/{index.vue_vue_type_script_setup_true_lang-Wm3L_CDm.js → index.vue_vue_type_script_setup_true_lang-BCZZq6zJ.js} +13621 -13616
  58. package/dist/{item-CcaqdD88.js → item-DL0lbXPC.js} +592 -586
  59. package/dist/{jszip.min-B-GfzNS3.js → jszip.min-CTn9qnAT.js} +384 -384
  60. package/dist/{linkProducts-DXSk9ntt.js → linkProducts-DNPyRjOC.js} +4 -4
  61. package/dist/{memberPricing-Bmv0qRtK.js → memberPricing-ByMD7Sun.js} +1 -1
  62. package/dist/{menu-BLbZDh7_.js → menu-C77otNXH.js} +1 -1
  63. package/dist/{menuV2-BSGYEEJI.js → menuV2-Bi_EMfOM.js} +44 -44
  64. package/dist/mf-menu.css +1 -1
  65. package/dist/{order_pacing-DLrwnijs.js → order_pacing-29v64nh0.js} +5 -5
  66. package/dist/{priceTier-Bw0-wJJ0.js → priceTier-BscL3YjX.js} +1 -1
  67. package/dist/{rules-Ciu45JMO.js → rules-BYL-otiB.js} +3 -3
  68. package/dist/{scheduler-DYZ2PnDh.js → scheduler-Cqvnr0u1.js} +5 -5
  69. package/dist/{toExcel-D6Rp5oOB.js → toExcel-421pbm-Z.js} +2 -2
  70. package/dist/{unit-BR60ZgDQ.js → unit-DDtyAbV0.js} +3 -3
  71. package/package.json +1 -1
@@ -1,38 +1,38 @@
1
- import { defineStore as Zi } from "pinia";
2
- import { defineComponent as ye, resolveComponent as z, createElementBlock as q, createBlock as ee, openBlock as y, createElementVNode as _, createVNode as h, toDisplayString as oe, Fragment as Ce, renderList as Ie, h as ze, ref as W, computed as R, watch as Ae, unref as m, renderSlot as $e, withCtx as M, createCommentVNode as te, Transition as hr, normalizeClass as Ge, resolveDynamicComponent as xn, withDirectives as qe, vShow as Vn, mergeProps as Qi, withModifiers as it, normalizeStyle as ho, onBeforeUnmount as Vo, resolveDirective as Vt, onMounted as Gt, onUnmounted as Mo, createTextVNode as Wt, getCurrentInstance as zo, render as An, useSlots as gr, markRaw as vr, mergeModels as ii, useModel as br, isVNode as yr, nextTick as Ji, normalizeProps as _r, guardReactiveProps as wr } from "vue";
3
- import { V as kr, W as Cr, g as Ne, h as Be, k as Pe, T as Sr, X as xr, s as ea, d as Te, m as st, j as Re, a as Ze, n as Ar, u as De, b as ut, i as ft, Y as ai, Z as ri, $ as Kn, a0 as ta, a1 as na, a2 as Tr, a3 as Rr, a4 as si, a5 as qn, a6 as Ot, a7 as Ir, a8 as Er, a9 as li, aa as Or, ab as $r, ac as ui, ad as Dr, ae as Pr, af as ci, ag as Fr, ah as Vr, ai as Mr, aj as di, ak as mi, al as zr, t as oa, am as Ur, F as It, x as pi, r as Nr, o as Br, l as Lr, I as Yn, an as jr, Q as Gr, w as fi, v as Wr, ao as Hr } from "./index.vue_vue_type_script_setup_true_lang-Wm3L_CDm.js";
1
+ import { defineStore as Qi } from "pinia";
2
+ import { defineComponent as ye, resolveComponent as z, createElementBlock as q, createBlock as ee, openBlock as y, createElementVNode as _, createVNode as h, toDisplayString as oe, Fragment as Ce, renderList as Ie, h as ze, ref as W, computed as R, watch as Ae, unref as m, renderSlot as $e, withCtx as M, createCommentVNode as te, Transition as hr, normalizeClass as Ge, resolveDynamicComponent as xn, withDirectives as qe, vShow as Vn, mergeProps as Ji, withModifiers as it, normalizeStyle as ho, onBeforeUnmount as zo, resolveDirective as Vt, onMounted as Gt, onUnmounted as Uo, createTextVNode as Wt, getCurrentInstance as No, render as An, useSlots as gr, markRaw as vr, mergeModels as ri, useModel as br, isVNode as yr, nextTick as ea, normalizeProps as _r, guardReactiveProps as wr } from "vue";
3
+ import { V as kr, W as Cr, g as Ne, h as Be, k as Pe, T as Sr, X as xr, s as ta, d as Te, m as st, j as Re, a as Ze, n as Ar, u as De, b as ut, i as ft, Y as si, Z as li, $ as Kn, a0 as na, a1 as go, a2 as vo, a3 as Tr, a4 as Rr, a5 as ui, a6 as qn, a7 as Ot, a8 as Ir, a9 as Er, aa as ci, ab as Or, ac as $r, ad as di, ae as Dr, af as Pr, ag as Fr, ah as Vr, ai as Mr, aj as mi, ak as pi, al as zr, t as oa, am as Ur, F as It, x as fi, r as Nr, o as Br, l as Lr, I as Yn, an as jr, Q as Gr, w as hi, v as Wr, ao as Hr } from "./index.vue_vue_type_script_setup_true_lang-BCZZq6zJ.js";
4
4
  import { useI18n as ke, useCoreStore as Ut, CustomAttributesForm as ia } from "@feedmepos/mf-common";
5
5
  import { useDialog as nt, useSnackbar as Je, useDialogChild as Nt, FmButtonVariant as Ue, components as Oe, FmButtonColorThemeVariant as ot, useBreakpoints as aa } from "@feedmepos/ui-library";
6
- import { g as Tn, f as tn, e as Kr, i as qr, s as go, F as Yr, _ as Xr, a as Zr } from "./index-COu9fsyr.js";
7
- import { C as vt } from "./catalog-ByfbV1WF.js";
8
- import { g as vo, a as Qr, m as Jr, i as es } from "./menuV2-BSGYEEJI.js";
6
+ import { g as Tn, f as tn, e as Kr, i as qr, s as bo, F as Yr, _ as Xr, a as Zr } from "./index-CTA48kW2.js";
7
+ import { C as vt } from "./catalog--64fgdzd.js";
8
+ import { g as yo, a as Qr, m as Jr, i as es } from "./menuV2-Bi_EMfOM.js";
9
9
  import { c as ra } from "./createComponentProgrammatically-Bt2rn1IQ.js";
10
- import { a as hi, _ as Ht } from "./tooltip-B5BiPMx9.js";
11
- import { H as ts, L as ns } from "./LinkProductSideSheet-iwH-Ft7_.js";
12
- import { _ as Ye, u as os, a as is } from "./RuleView.vue_vue_type_script_setup_true_lang-ZnrzCXu3.js";
13
- import { e as as } from "./app-DDrm4hOt.js";
14
- import { l as Fe, u as Xt } from "./discardConfirm-rDbUqsKj.js";
10
+ import { a as gi, _ as Ht } from "./tooltip-B5BiPMx9.js";
11
+ import { H as ts, L as ns } from "./LinkProductSideSheet-ClMiajzX.js";
12
+ import { _ as Ye, u as os, a as is } from "./RuleView.vue_vue_type_script_setup_true_lang-D9i9tMAj.js";
13
+ import { e as as } from "./app-2VeaJE9t.js";
14
+ import { l as Fe, u as Xt } from "./discardConfirm-DOc0ieeO.js";
15
15
  import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  import { useAppStore as mn, RemyButton as Rn } from "@feedmepos/mf-remy-panel";
17
17
  import { _ as _t } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
18
- import { u as rs, r as ss } from "./rules-Ciu45JMO.js";
19
- import { _ as sa, a as In, b as En, c as On } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-KNIxHJsf.js";
20
- import { a as bo, g as At } from "./translation-fNx6yEpy.js";
18
+ import { u as rs, r as ss } from "./rules-BYL-otiB.js";
19
+ import { _ as sa, a as In, b as En, c as On } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-B3N7_zfR.js";
20
+ import { a as _o, g as At } from "./translation-fNx6yEpy.js";
21
21
  import { c as $n } from "./object-DVUNCr7w.js";
22
- import { _ as Uo } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-Dznh3-H8.js";
23
- import { u as ls } from "./menu-BLbZDh7_.js";
22
+ import { _ as Bo } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BLzzBcqV.js";
23
+ import { u as ls } from "./menu-C77otNXH.js";
24
24
  import { c as Bt } from "./check-C9mY6LiX.js";
25
- import { _ as yt, l as yo, T as us } from "./index-B2Hnb8WK.js";
25
+ import { _ as yt, l as wo, T as us } from "./index-BrtZ42qx.js";
26
26
  import { useInventoryStore as la, InventoryBindingForm as cs, InventoryBindingSummary as ds } from "@feedmepos/mf-inventory-portal";
27
- import { f as lt } from "./currency-C5kmu6Ku.js";
28
- import { u as Mn } from "./memberPricing-Bmv0qRtK.js";
29
- import { u as ua } from "./priceTier-Bw0-wJJ0.js";
27
+ import { f as lt } from "./currency-CjYkQ4FL.js";
28
+ import { u as Mn } from "./memberPricing-ByMD7Sun.js";
29
+ import { u as ua } from "./priceTier-BscL3YjX.js";
30
30
  import { u as ms } from "./search-BAPEUu1R.js";
31
31
  import { c as ps } from "./string-DpfFixWH.js";
32
32
  import { d as ca } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
33
- import { _ as fs } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DpuE1Txi.js";
34
- import { u as hs, a as gs } from "./order_pacing-DLrwnijs.js";
35
- import { V as gi } from "./index-BoVuN9fk.js";
33
+ import { _ as fs } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Je_NoQ3y.js";
34
+ import { u as hs, a as gs } from "./order_pacing-29v64nh0.js";
35
+ import { V as vi } from "./index-Dw_Fw5ni.js";
36
36
  var Xn, fn, Zn = 0, Qn = 0;
37
37
  function vs(e, t, n) {
38
38
  var o = 0, i = new Array(16);
@@ -282,7 +282,7 @@ class kn {
282
282
  const t = xr(
283
283
  this.menuStore.variants,
284
284
  this.menuStore.categories,
285
- ea(this.menuStore.state.menu.modules.item, (i) => i.code || i.name)
285
+ ta(this.menuStore.state.menu.modules.item, (i) => i.code || i.name)
286
286
  ), n = new Set(
287
287
  this.menuStore.currentCatalog ? vt.getItemAvailable(this.menuStore.currentCatalog) : this.menuStore.state.menu.modules.item.map((i) => i._id)
288
288
  );
@@ -433,17 +433,17 @@ class ma {
433
433
  ($) => $.combinationKey === g.combinationKey
434
434
  ),
435
435
  name: Ar(De().variants, ((G = k == null ? void 0 : k.variant) == null ? void 0 : G.variantGroupIds) || [])[g.combinationKey]
436
- } : k, v = (H = a.find(($) => $._id === u._id)) == null ? void 0 : H.items.find(($) => $._id === g._id && $.combinationKey === g.combinationKey), A = !n && !g.combinationKey, S = (w = d.find(
436
+ } : k, v = (H = a.find(($) => $._id === u._id)) == null ? void 0 : H.items.find(($) => $._id === g._id && $.combinationKey === g.combinationKey), x = !n && !g.combinationKey, S = (w = d.find(
437
437
  ($) => $._id == g._id && $.combinationKey == g.combinationKey
438
- )) == null ? void 0 : w.price, j = l ? null : b == null ? void 0 : b.name, I = g.name || (v == null ? void 0 : v.name) || j || null, T = (b == null ? void 0 : b.name) || null, x = g.name_locale ?? (v == null ? void 0 : v.name_locale) ?? (b == null ? void 0 : b.name_locale) ?? null, U = {
438
+ )) == null ? void 0 : w.price, j = l ? null : b == null ? void 0 : b.name, I = g.name || (v == null ? void 0 : v.name) || j || null, T = (b == null ? void 0 : b.name) || null, A = g.name_locale ?? (v == null ? void 0 : v.name_locale) ?? (b == null ? void 0 : b.name_locale) ?? null, U = {
439
439
  ...g,
440
440
  name: I,
441
- name_locale: x,
441
+ name_locale: A,
442
442
  code: b == null ? void 0 : b.code,
443
- fallbackName: A ? T : I,
443
+ fallbackName: x ? T : I,
444
444
  price: g.price,
445
445
  price_variant: g.price_variant,
446
- fallbackPrice: A ? null : S,
446
+ fallbackPrice: x ? null : S,
447
447
  orderFrom: g.orderFrom,
448
448
  fallbackOrder: b == null ? void 0 : b.orderFrom,
449
449
  priceTiers: g.priceTiers,
@@ -563,7 +563,7 @@ function _s(e, t) {
563
563
  const ws = {
564
564
  key: 0,
565
565
  class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
566
- }, ks = { class: "fm-typo-en-title-sm-600" }, vi = /* @__PURE__ */ ye({
566
+ }, ks = { class: "fm-typo-en-title-sm-600" }, bi = /* @__PURE__ */ ye({
567
567
  __name: "Summary",
568
568
  props: {
569
569
  title: {},
@@ -577,7 +577,7 @@ const ws = {
577
577
  title: t.title,
578
578
  contentComponent: ze("div", { class: "space-y-4" }, [
579
579
  ...t.items.map(
580
- (i) => ze(hi, {
580
+ (i) => ze(gi, {
581
581
  name: i.name,
582
582
  value: i.value || "--"
583
583
  })
@@ -590,7 +590,7 @@ const ws = {
590
590
  return t.variant === "full" ? (y(), q("div", ws, [
591
591
  _("div", ks, oe(i.title), 1),
592
592
  h(ts),
593
- (y(!0), q(Ce, null, Ie(i.items, (l) => (y(), ee(hi, {
593
+ (y(!0), q(Ce, null, Ie(i.items, (l) => (y(), ee(gi, {
594
594
  key: l.name,
595
595
  name: l.name,
596
596
  value: l.value || "--"
@@ -726,7 +726,7 @@ const ws = {
726
726
  };
727
727
  }
728
728
  }), $t = /* @__PURE__ */ kt(Vs, [["__scopeId", "data-v-e920f110"]]);
729
- function bi(e, t) {
729
+ function yi(e, t) {
730
730
  var r;
731
731
  const n = e == null ? void 0 : e.replace(/[^a-zA-Z0-9]/g, "_"), i = (r = Ut().currentBusiness.value) == null ? void 0 : r.id;
732
732
  if (!i) throw new Error("Invalid businessId");
@@ -862,7 +862,7 @@ function Hs(e, t, n) {
862
862
  }
863
863
  return i(t, n);
864
864
  }
865
- const Ks = Zi("menu-edit-state", {
865
+ const Ks = Qi("menu-edit-state", {
866
866
  state: () => ({
867
867
  isUpdatingItem: !1,
868
868
  storedCatalogId: null,
@@ -902,7 +902,7 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
902
902
  r.value = [k];
903
903
  else {
904
904
  const v = r.value.filter(
905
- (A) => A.value !== "" && A.value !== null
905
+ (x) => x.value !== "" && x.value !== null
906
906
  );
907
907
  r.value = [...v, k];
908
908
  }
@@ -935,7 +935,7 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
935
935
  return t({
936
936
  hideMenu: u
937
937
  }), (g, k) => {
938
- const b = z("FmIcon"), v = z("FmField"), A = z("FmMenuItem"), S = z("FmMenu"), j = z("FmFormGroup"), I = z("FmChipGroup");
938
+ const b = z("FmIcon"), v = z("FmField"), x = z("FmMenuItem"), S = z("FmMenu"), j = z("FmFormGroup"), I = z("FmChipGroup");
939
939
  return y(), q("div", Qs, [
940
940
  h(j, {
941
941
  "model-value": g.modelValue,
@@ -951,7 +951,7 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
951
951
  ref_key: "fmMenuRef",
952
952
  ref: a,
953
953
  "close-on-click": !1,
954
- onMenuChanged: k[0] || (k[0] = (x) => c.value = x)
954
+ onMenuChanged: k[0] || (k[0] = (A) => c.value = A)
955
955
  }, {
956
956
  "menu-button": M(() => [
957
957
  h(v, {
@@ -978,13 +978,13 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
978
978
  ]),
979
979
  default: M(() => [
980
980
  _("div", Js, [
981
- (y(!0), q(Ce, null, Ie(g.items, (x) => (y(), ee(A, {
982
- key: x.value,
983
- disabled: x.disabled,
981
+ (y(!0), q(Ce, null, Ie(g.items, (A) => (y(), ee(x, {
982
+ key: A.value,
983
+ disabled: A.disabled,
984
984
  "has-checkbox": !0,
985
- label: x.label,
986
- "model-value": r.value.some((U) => U.value === x.value),
987
- "onUpdate:modelValue": (U) => l(U, x)
985
+ label: A.label,
986
+ "model-value": r.value.some((U) => U.value === A.value),
987
+ "onUpdate:modelValue": (U) => l(U, A)
988
988
  }, null, 8, ["disabled", "label", "model-value", "onUpdate:modelValue"]))), 128)),
989
989
  $e(g.$slots, "append-menu", {}, void 0, !0)
990
990
  ])
@@ -1005,7 +1005,7 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1005
1005
  ]);
1006
1006
  };
1007
1007
  }
1008
- }), nl = /* @__PURE__ */ kt(tl, [["__scopeId", "data-v-89b5becb"]]), No = /* @__PURE__ */ ye({
1008
+ }), nl = /* @__PURE__ */ kt(tl, [["__scopeId", "data-v-89b5becb"]]), Lo = /* @__PURE__ */ ye({
1009
1009
  __name: "OrderFrom",
1010
1010
  props: {
1011
1011
  modelValue: {
@@ -1097,7 +1097,7 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1097
1097
  ]);
1098
1098
  };
1099
1099
  }
1100
- }), ol = { class: "flex flex-col gap-8" }, il = { class: "flex items-center justify-between gap-16" }, al = { class: "fm-typo-en-body-lg-600" }, yi = /* @__PURE__ */ ye({
1100
+ }), ol = { class: "flex flex-col gap-8" }, il = { class: "flex items-center justify-between gap-16" }, al = { class: "fm-typo-en-body-lg-600" }, _i = /* @__PURE__ */ ye({
1101
1101
  __name: "ToggleableQuantityField",
1102
1102
  props: {
1103
1103
  label: {},
@@ -1180,14 +1180,14 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1180
1180
  ])
1181
1181
  ]),
1182
1182
  _("div", dl, [
1183
- h(yi, {
1183
+ h(_i, {
1184
1184
  label: m(i)("menu.product.form.item_quantity.fields.min.label"),
1185
1185
  "model-value": a.value,
1186
1186
  rules: s.value,
1187
1187
  disabled: d.disabled,
1188
1188
  "onUpdate:modelValue": c[0] || (c[0] = (f) => o("update:bound", "min", f))
1189
1189
  }, null, 8, ["label", "model-value", "rules", "disabled"]),
1190
- h(yi, {
1190
+ h(_i, {
1191
1191
  label: m(i)("menu.product.form.item_quantity.fields.max.label"),
1192
1192
  "model-value": r.value,
1193
1193
  rules: u.value,
@@ -1269,43 +1269,43 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1269
1269
  dialog: i,
1270
1270
  menuLoader: l,
1271
1271
  isLocalOnly: n.isLocalOnly
1272
- }), p = (A, S) => {
1273
- A ? d.value = [...d.value, S] : d.value = d.value.filter((j) => j.value !== S.value), o(
1272
+ }), p = (x, S) => {
1273
+ x ? d.value = [...d.value, S] : d.value = d.value.filter((j) => j.value !== S.value), o(
1274
1274
  "update:modelValue",
1275
1275
  d.value.map((j) => j.value)
1276
1276
  );
1277
- }, f = (A) => {
1278
- d.value = d.value.filter((S, j) => j !== A), o(
1277
+ }, f = (x) => {
1278
+ d.value = d.value.filter((S, j) => j !== x), o(
1279
1279
  "update:modelValue",
1280
1280
  d.value.map((S) => S.value)
1281
1281
  );
1282
1282
  }, g = () => {
1283
- var A;
1284
- (A = u.value) == null || A.toggleMenu(!1), c.create();
1283
+ var x;
1284
+ (x = u.value) == null || x.toggleMenu(!1), c.create();
1285
1285
  }, k = R(() => n.items.reduce(
1286
- (A, S) => (A[S.value] = S, A),
1286
+ (x, S) => (x[S.value] = S, x),
1287
1287
  {}
1288
- )), b = R(() => d.value.length > 0 ? d.value.map((A) => A.label).join("/") : n.placeholder), v = W(!1);
1288
+ )), b = R(() => d.value.length > 0 ? d.value.map((x) => x.label).join("/") : n.placeholder), v = W(!1);
1289
1289
  return Ae(
1290
1290
  () => n.modelValue,
1291
- (A) => {
1292
- A != null && A.length ? d.value = A.map((S) => k.value[S]).filter((S) => !!S) : d.value = [];
1291
+ (x) => {
1292
+ x != null && x.length ? d.value = x.map((S) => k.value[S]).filter((S) => !!S) : d.value = [];
1293
1293
  },
1294
1294
  { immediate: !0 }
1295
- ), (A, S) => {
1296
- const j = z("FmIcon"), I = z("FmField"), T = z("FmMenuItem"), x = z("FmMenu"), U = z("FmFormGroup"), F = z("FmChipGroup");
1295
+ ), (x, S) => {
1296
+ const j = z("FmIcon"), I = z("FmField"), T = z("FmMenuItem"), A = z("FmMenu"), U = z("FmFormGroup"), F = z("FmChipGroup");
1297
1297
  return y(), q("div", hl, [
1298
1298
  h(U, {
1299
- "model-value": A.modelValue,
1300
- disabled: A.disabled,
1299
+ "model-value": x.modelValue,
1300
+ disabled: x.disabled,
1301
1301
  focused: v.value,
1302
- "helper-state": A.helperState,
1303
- "helper-text": A.helperText,
1304
- rules: A.rules
1302
+ "helper-state": x.helperState,
1303
+ "helper-text": x.helperText,
1304
+ rules: x.rules
1305
1305
  }, {
1306
1306
  default: M(({ invalid: G }) => [
1307
- h(x, {
1308
- disabled: A.disabled,
1307
+ h(A, {
1308
+ disabled: x.disabled,
1309
1309
  ref_key: "fmMenuRef",
1310
1310
  ref: u,
1311
1311
  "close-on-click": !1,
@@ -1313,13 +1313,13 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1313
1313
  }, {
1314
1314
  "menu-button": M(() => [
1315
1315
  h(I, {
1316
- class: Ge(A.disabled ? "cursor-not-allowed" : "cursor-pointer"),
1316
+ class: Ge(x.disabled ? "cursor-not-allowed" : "cursor-pointer"),
1317
1317
  focused: v.value,
1318
1318
  invalid: G
1319
1319
  }, {
1320
1320
  append: M(() => [
1321
1321
  h(j, {
1322
- color: A.disabled ? "#C7C7CC" : "black",
1322
+ color: x.disabled ? "#C7C7CC" : "black",
1323
1323
  name: v.value ? "expand_less" : "expand_more",
1324
1324
  size: "md"
1325
1325
  }, null, 8, ["color", "name"])
@@ -1327,7 +1327,7 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1327
1327
  default: M(() => [
1328
1328
  _("div", {
1329
1329
  class: Ge([[
1330
- A.disabled ? "text-fm-color-typo-disabled" : d.value.length > 0 ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"
1330
+ x.disabled ? "text-fm-color-typo-disabled" : d.value.length > 0 ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"
1331
1331
  ], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
1332
1332
  }, oe(b.value), 3)
1333
1333
  ]),
@@ -1336,7 +1336,7 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1336
1336
  ]),
1337
1337
  default: M(() => [
1338
1338
  _("div", gl, [
1339
- (y(!0), q(Ce, null, Ie(A.items, (H) => (y(), ee(T, {
1339
+ (y(!0), q(Ce, null, Ie(x.items, (H) => (y(), ee(T, {
1340
1340
  key: H.value,
1341
1341
  disabled: H.disabled,
1342
1342
  "has-checkbox": !0,
@@ -1363,9 +1363,9 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1363
1363
  ]),
1364
1364
  _: 1
1365
1365
  }, 8, ["model-value", "disabled", "focused", "helper-state", "helper-text", "rules"]),
1366
- A.shouldShowChips && d.value.length > 0 ? (y(), q("div", bl, [
1366
+ x.shouldShowChips && d.value.length > 0 ? (y(), q("div", bl, [
1367
1367
  h(F, {
1368
- disabled: A.disabled,
1368
+ disabled: x.disabled,
1369
1369
  items: d.value.map((G) => ({ label: G.label })),
1370
1370
  removable: "",
1371
1371
  onChipClosed: f
@@ -1375,7 +1375,7 @@ const Zs = /* @__PURE__ */ kt(qs, [["render", Xs]]), Qs = { class: "flex flex-co
1375
1375
  };
1376
1376
  }
1377
1377
  }), _l = /* @__PURE__ */ kt(yl, [["__scopeId", "data-v-5eb2466b"]]);
1378
- function _i(e, t) {
1378
+ function wi(e, t) {
1379
1379
  var n = Object.keys(e);
1380
1380
  if (Object.getOwnPropertySymbols) {
1381
1381
  var o = Object.getOwnPropertySymbols(e);
@@ -1388,9 +1388,9 @@ function _i(e, t) {
1388
1388
  function Se(e) {
1389
1389
  for (var t = 1; t < arguments.length; t++) {
1390
1390
  var n = arguments[t] != null ? arguments[t] : {};
1391
- t % 2 ? _i(Object(n), !0).forEach(function(o) {
1391
+ t % 2 ? wi(Object(n), !0).forEach(function(o) {
1392
1392
  at(e, o, n[o]);
1393
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _i(Object(n)).forEach(function(o) {
1393
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : wi(Object(n)).forEach(function(o) {
1394
1394
  Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
1395
1395
  });
1396
1396
  }
@@ -1435,7 +1435,7 @@ function Jn(e, t) {
1435
1435
  for (var n = 0, o = new Array(t); n < t; n++) o[n] = e[n];
1436
1436
  return o;
1437
1437
  }
1438
- var wi, kl, hn, je = (wi = function(e) {
1438
+ var ki, kl, hn, je = (ki = function(e) {
1439
1439
  /*!
1440
1440
  Copyright (c) 2018 Jed Watson.
1441
1441
  Licensed under the MIT License (MIT), see
@@ -1462,7 +1462,7 @@ var wi, kl, hn, je = (wi = function(e) {
1462
1462
  }
1463
1463
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
1464
1464
  })();
1465
- }, wi(hn = { path: kl, exports: {}, require: function(e, t) {
1465
+ }, ki(hn = { path: kl, exports: {}, require: function(e, t) {
1466
1466
  return function() {
1467
1467
  throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
1468
1468
  }(t == null && hn.path);
@@ -1478,7 +1478,7 @@ var wi, kl, hn, je = (wi = function(e) {
1478
1478
  }, "") : "");
1479
1479
  };
1480
1480
  };
1481
- function _o(e, t, n) {
1481
+ function ko(e, t, n) {
1482
1482
  var o, i, a, r, l;
1483
1483
  function s() {
1484
1484
  var d = Date.now() - r;
@@ -1496,8 +1496,8 @@ function _o(e, t, n) {
1496
1496
  o && (l = e.apply(a, i), a = i = null, clearTimeout(o), o = null);
1497
1497
  }, u;
1498
1498
  }
1499
- _o.debounce = _o;
1500
- var wo = _o, ve = function() {
1499
+ ko.debounce = ko;
1500
+ var Co = ko, ve = function() {
1501
1501
  return ve = Object.assign || function(e) {
1502
1502
  for (var t, n = 1, o = arguments.length; n < o; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
1503
1503
  return e;
@@ -1524,7 +1524,7 @@ function va(e, t) {
1524
1524
  function ba(e) {
1525
1525
  return /^blob:/.test(e);
1526
1526
  }
1527
- function ki(e) {
1527
+ function Ci(e) {
1528
1528
  return ba(e) || function(t) {
1529
1529
  return /^data:/.test(t);
1530
1530
  }(e);
@@ -1538,17 +1538,17 @@ function We(e) {
1538
1538
  function Cn(e) {
1539
1539
  return typeof e == "object" && e !== null;
1540
1540
  }
1541
- function ko(e, t, n) {
1541
+ function So(e, t, n) {
1542
1542
  var o = {};
1543
1543
  return Cn(e) ? (Object.keys(t).forEach(function(i) {
1544
- We(e[i]) ? o[i] = t[i] : Cn(t[i]) ? Cn(e[i]) ? o[i] = ko(e[i], t[i], n[i]) : o[i] = e[i] ? t[i] : n[i] : t[i] === !0 || t[i] === !1 ? o[i] = !!e[i] : o[i] = e[i];
1544
+ We(e[i]) ? o[i] = t[i] : Cn(t[i]) ? Cn(e[i]) ? o[i] = So(e[i], t[i], n[i]) : o[i] = e[i] ? t[i] : n[i] : t[i] === !0 || t[i] === !1 ? o[i] = !!e[i] : o[i] = e[i];
1545
1545
  }), o) : e ? t : n;
1546
1546
  }
1547
1547
  function gn(e) {
1548
1548
  var t = Number(e);
1549
1549
  return Number.isNaN(t) ? e : t;
1550
1550
  }
1551
- function Ci(e) {
1551
+ function Si(e) {
1552
1552
  return typeof (e == "number" || /* @__PURE__ */ function(t) {
1553
1553
  return typeof t == "object" && t !== null;
1554
1554
  }(e) && toString.call(e) == "[object Number]") && !ya(e);
@@ -1563,7 +1563,7 @@ var nn = function(e, t) {
1563
1563
  e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
1564
1564
  }, Cl = function(e, t) {
1565
1565
  t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
1566
- }, Bo = function(e) {
1566
+ }, jo = function(e) {
1567
1567
  this.type = "move", this.directions = e;
1568
1568
  }, Sl = function() {
1569
1569
  function e(t, n, o, i, a) {
@@ -1577,7 +1577,7 @@ var nn = function(e, t) {
1577
1577
  }
1578
1578
  return { left: 0, top: 0 };
1579
1579
  }, e;
1580
- }(), Lo = { name: "DraggableElement", props: { classname: { type: String } }, beforeMount: function() {
1580
+ }(), Go = { name: "DraggableElement", props: { classname: { type: String } }, beforeMount: function() {
1581
1581
  window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
1582
1582
  }, beforeUnmount: function() {
1583
1583
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
@@ -1620,7 +1620,7 @@ var nn = function(e, t) {
1620
1620
  }, processEnd: function() {
1621
1621
  this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = !1), this.touches = [];
1622
1622
  } }, emits: ["drag", "drag-end", "leave", "enter"] };
1623
- Lo.render = function(e, t, n, o, i, a) {
1623
+ Go.render = function(e, t, n, o, i, a) {
1624
1624
  return y(), ee("div", { ref: "draggable", class: n.classname, onTouchstart: t[1] || (t[1] = function() {
1625
1625
  return a.onTouchStart && a.onTouchStart.apply(a, arguments);
1626
1626
  }), onMousedown: t[2] || (t[2] = function() {
@@ -1631,7 +1631,7 @@ Lo.render = function(e, t, n, o, i, a) {
1631
1631
  return a.onMouseLeave && a.onMouseLeave.apply(a, arguments);
1632
1632
  }) }, [$e(e.$slots, "default")], 34);
1633
1633
  };
1634
- var eo = ct("vue-handler-wrapper"), wa = { name: "HandlerWrapper", components: { DraggableElement: Lo }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
1634
+ var eo = ct("vue-handler-wrapper"), wa = { name: "HandlerWrapper", components: { DraggableElement: Go }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
1635
1635
  var e;
1636
1636
  if (this.horizontalPosition || this.verticalPosition) {
1637
1637
  var t, n = va(this.horizontalPosition, this.verticalPosition);
@@ -1653,7 +1653,7 @@ wa.render = function(e, t, n, o, i, a) {
1653
1653
  return [$e(e.$slots, "default")];
1654
1654
  }), _: 3 }, 8, ["class"])], 2);
1655
1655
  };
1656
- var xl = ct("vue-line-wrapper"), ka = { name: "LineWrapper", components: { DraggableElement: Lo }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
1656
+ var xl = ct("vue-line-wrapper"), ka = { name: "LineWrapper", components: { DraggableElement: Go }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
1657
1657
  var e;
1658
1658
  return xl((at(e = {}, this.position, !0), at(e, "disabled", this.disabled), e));
1659
1659
  } }, emits: ["leave", "enter", "drag", "drag-end"] };
@@ -1671,8 +1671,8 @@ ka.render = function(e, t, n, o, i, a) {
1671
1671
  return [$e(e.$slots, "default")];
1672
1672
  }), _: 3 }, 8, ["class"]);
1673
1673
  };
1674
- var mt = ["left", "right", "top", "bottom"], Al = ["left", "right"], Tl = ["top", "bottom"], Rl = ["left", "top"], Il = ["fill-area", "fit-area", "stencil", "none"], Si = { left: 0, top: 0, width: 0, height: 0 };
1675
- function xi(e, t, n) {
1674
+ var mt = ["left", "right", "top", "bottom"], Al = ["left", "right"], Tl = ["top", "bottom"], Rl = ["left", "top"], Il = ["fill-area", "fit-area", "stencil", "none"], xi = { left: 0, top: 0, width: 0, height: 0 };
1675
+ function Ai(e, t, n) {
1676
1676
  return !(n = n || ["width", "height", "left", "top"]).some(function(o) {
1677
1677
  return e[o] !== t[o];
1678
1678
  });
@@ -1747,7 +1747,7 @@ function Ke(e, t, n) {
1747
1747
  var o = Yt(e, t);
1748
1748
  return Qe(e, n ? Un(o) : o);
1749
1749
  }
1750
- function Co(e) {
1750
+ function xo(e) {
1751
1751
  return { width: e.right !== void 0 && e.left !== void 0 ? e.right - e.left : 1 / 0, height: e.bottom !== void 0 && e.top !== void 0 ? e.bottom - e.top : 1 / 0 };
1752
1752
  }
1753
1753
  function El(e, t) {
@@ -1764,34 +1764,34 @@ function xa(e, t, n) {
1764
1764
  function Bn(e, t) {
1765
1765
  return xa(e, t, !0);
1766
1766
  }
1767
- function Ai(e) {
1767
+ function Ti(e) {
1768
1768
  var t = e.size, n = e.aspectRatio, o = e.ignoreMinimum, i = e.sizeRestrictions;
1769
1769
  return !!((t.correctRatio || xe(t) >= n.minimum && xe(t) <= n.maximum) && t.height <= i.maxHeight && t.width <= i.maxWidth && t.width && t.height && (o || t.height >= i.minHeight && t.width >= i.minWidth));
1770
1770
  }
1771
- function Ti(e, t) {
1771
+ function Ri(e, t) {
1772
1772
  return Math.pow(e.width - t.width, 2) + Math.pow(e.height - t.height, 2);
1773
1773
  }
1774
1774
  function bt(e) {
1775
1775
  var t = e.width, n = e.height, o = e.sizeRestrictions, i = { minimum: e.aspectRatio && e.aspectRatio.minimum || 0, maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0 }, a = { width: Math.max(o.minWidth, Math.min(o.maxWidth, t)), height: Math.max(o.minHeight, Math.min(o.maxHeight, n)) };
1776
1776
  function r(u, d) {
1777
1777
  return d === void 0 && (d = !1), u.reduce(function(c, p) {
1778
- return Ai({ size: p, aspectRatio: i, sizeRestrictions: o, ignoreMinimum: d }) && (!c || Ti(p, { width: t, height: n }) < Ti(c, { width: t, height: n })) ? p : c;
1778
+ return Ti({ size: p, aspectRatio: i, sizeRestrictions: o, ignoreMinimum: d }) && (!c || Ri(p, { width: t, height: n }) < Ri(c, { width: t, height: n })) ? p : c;
1779
1779
  }, null);
1780
1780
  }
1781
1781
  var l = [];
1782
1782
  i && [i.minimum, i.maximum].forEach(function(u) {
1783
1783
  u && l.push({ width: a.width, height: a.width / u, correctRatio: !0 }, { width: a.height * u, height: a.height, correctRatio: !0 });
1784
- }), Ai({ size: a, aspectRatio: i, sizeRestrictions: o }) && l.push(a);
1784
+ }), Ti({ size: a, aspectRatio: i, sizeRestrictions: o }) && l.push(a);
1785
1785
  var s = r(l) || r(l, !0);
1786
1786
  return s && { width: s.width, height: s.height };
1787
1787
  }
1788
- function So(e) {
1788
+ function Ao(e) {
1789
1789
  var t = e.event, n = e.coordinates, o = e.positionRestrictions, i = o === void 0 ? {} : o, a = Qe(n, t.directions);
1790
1790
  return Qe(a, Yt(a, i));
1791
1791
  }
1792
1792
  function Ol(e) {
1793
1793
  var t = e.coordinates, n = e.transform, o = e.imageSize, i = e.sizeRestrictions, a = e.positionRestrictions, r = e.aspectRatio, l = e.visibleArea, s = function(d, c) {
1794
- return So({ coordinates: d, positionRestrictions: a, event: new Bo({ left: c.left - d.left, top: c.top - d.top }) });
1794
+ return Ao({ coordinates: d, positionRestrictions: a, event: new jo({ left: c.left - d.left, top: c.top - d.top }) });
1795
1795
  }, u = ve({}, t);
1796
1796
  return (Array.isArray(n) ? n : [n]).forEach(function(d) {
1797
1797
  var c = {};
@@ -1849,7 +1849,7 @@ function Ml(e) {
1849
1849
  function zl(e) {
1850
1850
  var t = e.getAreaRestrictions, n = e.coordinates, o = e.imageSize, i = xe(e.boundaries);
1851
1851
  if (n) {
1852
- var a = { height: Math.max(n.height, o.height), width: Math.max(n.width, o.width) }, r = Ca({ width: xe(a) > i ? a.width : a.height * i, height: xe(a) > i ? a.width / i : a.height }, Co(t())), l = { left: n.left + n.width / 2 - r.width / 2, top: n.top + n.height / 2 - r.height / 2, width: r.width, height: r.height }, s = sn(n, ht(ve({ left: 0, top: 0 }, o))), u = {};
1852
+ var a = { height: Math.max(n.height, o.height), width: Math.max(n.width, o.width) }, r = Ca({ width: xe(a) > i ? a.width : a.height * i, height: xe(a) > i ? a.width / i : a.height }, xo(t())), l = { left: n.left + n.width / 2 - r.width / 2, top: n.top + n.height / 2 - r.height / 2, width: r.width, height: r.height }, s = sn(n, ht(ve({ left: 0, top: 0 }, o))), u = {};
1853
1853
  return !s.left && !s.right && l.width <= o.width && (u.left = 0, u.right = o.width), !s.top && !s.bottom && l.height <= o.height && (u.top = 0, u.bottom = o.height), Ke(l, u);
1854
1854
  }
1855
1855
  var d = xe(o);
@@ -1863,8 +1863,8 @@ function Ul(e) {
1863
1863
  d = Qe(d, { left: u.left || 0, top: u.top || 0 });
1864
1864
  var k = { stencil: { minimum: Math.max(i.minWidth ? i.minWidth / c.width : 0, i.minHeight ? i.minHeight / c.height : 0), maximum: Math.min(i.maxWidth ? i.maxWidth / c.width : 1 / 0, i.maxHeight ? i.maxHeight / c.height : 1 / 0, qt(c, r)) }, area: { maximum: qt(d, a({ visibleArea: d, type: "resize" })) } };
1865
1865
  s.factor && g && (s.factor < 1 ? (f = Math.max(s.factor, k.stencil.minimum)) > 1 && (f = 1) : s.factor > 1 && (f = Math.min(s.factor, Math.min(k.area.maximum, k.stencil.maximum))) < 1 && (f = 1)), f && (d = rt(d, f, s.center));
1866
- var b = n.left - o.left, v = o.width + o.left - (n.width + n.left), A = n.top - o.top, S = o.height + o.top - (n.height + n.top);
1867
- return d = Ke(d = Qe(d, Yt(d, { left: r.left !== void 0 ? r.left - b * f : void 0, top: r.top !== void 0 ? r.top - A * f : void 0, bottom: r.bottom !== void 0 ? r.bottom + S * f : void 0, right: r.right !== void 0 ? r.right + v * f : void 0 })), a({ visibleArea: d, type: "move" })), c.width = c.width * f, c.height = c.height * f, c.left = d.left + b * f, c.top = d.top + A * f, c = Ke(c, Bn(ht(d), r)), s.factor && g && l && (s.factor > 1 ? p = Math.min(k.area.maximum, s.factor) / f : s.factor < 1 && (p = Math.max(c.height / d.height, c.width / d.width, s.factor / f)), p !== 1 && (d = Qe(d = Ke(d = rt(d, p, s.factor > 1 ? s.center : He(c)), a({ visibleArea: d, type: "move" })), Un(Yt(c, ht(d)))))), { coordinates: c, visibleArea: d };
1866
+ var b = n.left - o.left, v = o.width + o.left - (n.width + n.left), x = n.top - o.top, S = o.height + o.top - (n.height + n.top);
1867
+ return d = Ke(d = Qe(d, Yt(d, { left: r.left !== void 0 ? r.left - b * f : void 0, top: r.top !== void 0 ? r.top - x * f : void 0, bottom: r.bottom !== void 0 ? r.bottom + S * f : void 0, right: r.right !== void 0 ? r.right + v * f : void 0 })), a({ visibleArea: d, type: "move" })), c.width = c.width * f, c.height = c.height * f, c.left = d.left + b * f, c.top = d.top + x * f, c = Ke(c, Bn(ht(d), r)), s.factor && g && l && (s.factor > 1 ? p = Math.min(k.area.maximum, s.factor) / f : s.factor < 1 && (p = Math.max(c.height / d.height, c.width / d.width, s.factor / f)), p !== 1 && (d = Qe(d = Ke(d = rt(d, p, s.factor > 1 ? s.center : He(c)), a({ visibleArea: d, type: "move" })), Un(Yt(c, ht(d)))))), { coordinates: c, visibleArea: d };
1868
1868
  }
1869
1869
  function Nl(e) {
1870
1870
  var t = e.aspectRatio, n = e.getAreaRestrictions, o = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, d = ve({}, o), c = ve({}, i), p = St(He(ve({ left: 0, top: 0 }, s)), u);
@@ -1878,7 +1878,7 @@ function Bl(e) {
1878
1878
  }
1879
1879
  return { coordinates: s, visibleArea: u };
1880
1880
  }
1881
- function Ri(e) {
1881
+ function Ii(e) {
1882
1882
  var t = e.directions, n = e.coordinates, o = e.positionRestrictions, i = o === void 0 ? {} : o, a = e.sizeRestrictions, r = e.preserveRatio, l = e.compensate, s = ve({}, t), u = dt(n, s).width, d = dt(n, s).height;
1883
1883
  u < 0 && (s.left < 0 && s.right < 0 ? (s.left = -(n.width - a.minWidth) / (s.left / s.right), s.right = -(n.width - a.minWidth) / (s.right / s.left)) : s.left < 0 ? s.left = -(n.width - a.minWidth) : s.right < 0 && (s.right = -(n.width - a.minWidth))), d < 0 && (s.top < 0 && s.bottom < 0 ? (s.top = -(n.height - a.minHeight) / (s.top / s.bottom), s.bottom = -(n.height - a.minHeight) / (s.bottom / s.top)) : s.top < 0 ? s.top = -(n.height - a.minHeight) : s.bottom < 0 && (s.bottom = -(n.height - a.minHeight)));
1884
1884
  var c = sn(dt(n, s), i);
@@ -1912,7 +1912,7 @@ function Ri(e) {
1912
1912
  function bn(e, t, n) {
1913
1913
  return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
1914
1914
  }
1915
- var Ll = ct("vue-simple-handler"), jl = ct("vue-simple-handler-wrapper"), jo = { name: "SimpleHandler", components: { HandlerWrapper: wa }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1915
+ var Ll = ct("vue-simple-handler"), jl = ct("vue-simple-handler-wrapper"), Wo = { name: "SimpleHandler", components: { HandlerWrapper: wa }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1916
1916
  return { hover: !1 };
1917
1917
  }, computed: { classes: function() {
1918
1918
  var e, t = (at(e = {}, this.horizontalPosition, !!this.horizontalPosition), at(e, this.verticalPosition, !!this.verticalPosition), at(e, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), at(e, "hover", this.hover), e);
@@ -1926,13 +1926,13 @@ var Ll = ct("vue-simple-handler"), jl = ct("vue-simple-handler-wrapper"), jo = {
1926
1926
  }, onDragEnd: function() {
1927
1927
  this.$emit("drag-end");
1928
1928
  } }, emits: ["drag", "drag-end"] };
1929
- jo.render = function(e, t, n, o, i, a) {
1929
+ Wo.render = function(e, t, n, o, i, a) {
1930
1930
  var r = z("HandlerWrapper");
1931
1931
  return y(), ee(r, { class: a.classes.wrapper, "vertical-position": n.verticalPosition, "horizontal-position": n.horizontalPosition, disabled: n.disabled, onDrag: a.onDrag, onDragEnd: a.onDragEnd, onEnter: a.onEnter, onLeave: a.onLeave }, { default: M(function() {
1932
1932
  return [h("div", { class: a.classes.default }, null, 2)];
1933
1933
  }), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
1934
1934
  };
1935
- var Gl = ct("vue-simple-line"), Wl = ct("vue-simple-line-wrapper"), Go = { name: "SimpleLine", components: { LineWrapper: ka }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1935
+ var Gl = ct("vue-simple-line"), Wl = ct("vue-simple-line-wrapper"), Ho = { name: "SimpleLine", components: { LineWrapper: ka }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1936
1936
  return { hover: !1 };
1937
1937
  }, computed: { classes: function() {
1938
1938
  return { root: je(Gl(at({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: je(Wl(at({}, this.position, !0)), this.wrapperClass) };
@@ -1945,7 +1945,7 @@ var Gl = ct("vue-simple-line"), Wl = ct("vue-simple-line-wrapper"), Go = { name:
1945
1945
  }, onDragEnd: function() {
1946
1946
  this.$emit("drag-end");
1947
1947
  } }, emits: ["drag", "drag-end"] };
1948
- Go.render = function(e, t, n, o, i, a) {
1948
+ Ho.render = function(e, t, n, o, i, a) {
1949
1949
  var r = z("LineWrapper");
1950
1950
  return y(), ee(r, { class: a.classes.wrapper, position: n.position, disabled: n.disabled, onDrag: a.onDrag, onDragEnd: a.onDragEnd, onEnter: a.onEnter, onLeave: a.onLeave }, { default: M(function() {
1951
1951
  return [h("div", { class: a.classes.root }, null, 2)];
@@ -1954,7 +1954,7 @@ Go.render = function(e, t, n, o, i, a) {
1954
1954
  var no = ct("vue-bounding-box"), Hl = ["east", "west", null], Kl = ["south", "north", null], Aa = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
1955
1955
  return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
1956
1956
  } }, handlersComponent: { type: [Object, String], default: function() {
1957
- return jo;
1957
+ return Wo;
1958
1958
  } }, handlersClasses: { type: Object, default: function() {
1959
1959
  return {};
1960
1960
  } }, handlersWrappersClasses: { type: Object, default: function() {
@@ -1962,7 +1962,7 @@ var no = ct("vue-bounding-box"), Hl = ["east", "west", null], Kl = ["south", "no
1962
1962
  } }, lines: { type: Object, default: function() {
1963
1963
  return { west: !0, north: !0, east: !0, south: !0 };
1964
1964
  } }, linesComponent: { type: [Object, String], default: function() {
1965
- return Go;
1965
+ return Ho;
1966
1966
  } }, linesClasses: { type: Object, default: function() {
1967
1967
  return {};
1968
1968
  } }, linesWrappersClasses: { type: Object, default: function() {
@@ -2060,7 +2060,7 @@ var ql = ct("vue-draggable-area"), Ta = { name: "DraggableArea", props: { movabl
2060
2060
  var n = Mt(t);
2061
2061
  if (this.touches.length) {
2062
2062
  var o = this.$refs.container.getBoundingClientRect(), i = o.left, a = o.top;
2063
- this.touches.length === 1 && n.length === 1 && this.$emit("move", new Bo({ left: n[0].clientX - (i + this.anchor.x), top: n[0].clientY - (a + this.anchor.y) }));
2063
+ this.touches.length === 1 && n.length === 1 && this.$emit("move", new jo({ left: n[0].clientX - (i + this.anchor.x), top: n[0].clientY - (a + this.anchor.y) }));
2064
2064
  }
2065
2065
  }, processEnd: function() {
2066
2066
  this.touches.length && this.$emit("move-end"), this.touches = [];
@@ -2145,7 +2145,7 @@ function Xl(e) {
2145
2145
  return null;
2146
2146
  }
2147
2147
  }
2148
- function Ii(e, t) {
2148
+ function Ei(e, t) {
2149
2149
  var n = t.getBoundingClientRect(), o = n.left, i = n.top, a = { left: 0, top: 0 }, r = 0;
2150
2150
  return e.forEach(function(l) {
2151
2151
  a.left += (l.clientX - o) / e.length, a.top += (l.clientY - i) / e.length;
@@ -2158,12 +2158,12 @@ var Ia = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
2158
2158
  }, beforeUnmount: function() {
2159
2159
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
2160
2160
  }, created: function() {
2161
- this.transforming = !1, this.debouncedProcessEnd = wo(this.processEnd), this.touches = [];
2161
+ this.transforming = !1, this.debouncedProcessEnd = Co(this.processEnd), this.touches = [];
2162
2162
  }, methods: { processMove: function(e, t) {
2163
2163
  if (this.touches.length) {
2164
2164
  if (this.touches.length === 1 && t.length === 1) this.$emit("move", new nn({ left: this.touches[0].clientX - t[0].clientX, top: this.touches[0].clientY - t[0].clientY }));
2165
2165
  else if (this.touches.length > 1 && this.touchResize) {
2166
- var n = Ii(t, this.$refs.container), o = this.oldGeometricProperties;
2166
+ var n = Ei(t, this.$refs.container), o = this.oldGeometricProperties;
2167
2167
  o.count === n.count && o.count > 1 && this.$emit("resize", new nn({ left: o.centerMass.left - n.centerMass.left, top: o.centerMass.top - n.centerMass.top }, { factor: o.spread / n.spread, center: n.centerMass })), this.oldGeometricProperties = n;
2168
2168
  }
2169
2169
  this.touches = t;
@@ -2179,7 +2179,7 @@ var Ia = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
2179
2179
  var t = this.$refs.container, n = t.getBoundingClientRect(), o = n.left, i = n.top, a = n.bottom, r = n.right;
2180
2180
  this.touches = Mt(e.touches).filter(function(l) {
2181
2181
  return l.clientX > o && l.clientX < r && l.clientY > i && l.clientY < a;
2182
- }), this.oldGeometricProperties = Ii(this.touches, t);
2182
+ }), this.oldGeometricProperties = Ei(this.touches, t);
2183
2183
  }
2184
2184
  }, onTouchEnd: function(e) {
2185
2185
  e.touches.length === 0 && (this.touches = [], this.processEnd());
@@ -2218,8 +2218,8 @@ Ia.render = function(e, t, n, o, i, a) {
2218
2218
  return a.onWheel && a.onWheel.apply(a, arguments);
2219
2219
  }) }, [$e(e.$slots, "default")], 544);
2220
2220
  };
2221
- var xo = { components: { TransformableImage: Ia }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: ["resize", "move"] };
2222
- xo.render = function(e, t, n, o, i, a) {
2221
+ var To = { components: { TransformableImage: Ia }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: ["resize", "move"] };
2222
+ To.render = function(e, t, n, o, i, a) {
2223
2223
  var r = z("transformable-image");
2224
2224
  return y(), ee(r, { "touch-move": n.touchMove, "touch-resize": n.touchResize, "mouse-move": n.mouseMove, "wheel-resize": n.wheelResize, onMove: t[1] || (t[1] = function(l) {
2225
2225
  return e.$emit("move", l);
@@ -2278,12 +2278,12 @@ Ea.render = function(e, t, n, o, i, a) {
2278
2278
  var Oa = { components: { Preview: Ea }, inheritAttrs: !1 };
2279
2279
  Oa.render = function(e, t, n, o, i, a) {
2280
2280
  var r = z("preview");
2281
- return y(), ee(r, Qi(e.$attrs, { fill: !0 }), null, 16);
2281
+ return y(), ee(r, Ji(e.$attrs, { fill: !0 }), null, 16);
2282
2282
  };
2283
2283
  var io = ct("vue-rectangle-stencil"), $a = { name: "RectangleStencil", components: { StencilPreview: Oa, BoundingBox: Aa, DraggableArea: Ta }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
2284
- return jo;
2284
+ return Wo;
2285
2285
  } }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
2286
- return Go;
2286
+ return Ho;
2287
2287
  } }, aspectRatio: { type: [Number, String] }, minAspectRatio: { type: [Number, String] }, maxAspectRatio: { type: [Number, String] }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String }, linesClasses: { type: Object, default: function() {
2288
2288
  return {};
2289
2289
  } }, linesWrappersClasses: { type: Object, default: function() {
@@ -2318,10 +2318,10 @@ $a.render = function(e, t, n, o, i, a) {
2318
2318
  }), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
2319
2319
  }), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
2320
2320
  };
2321
- var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper", components: { BackgroundWrapper: xo }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
2321
+ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper", components: { BackgroundWrapper: To }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
2322
2322
  return $a;
2323
2323
  } }, backgroundWrapperComponent: { type: [Object, String], default: function() {
2324
- return xo;
2324
+ return To;
2325
2325
  } }, stencilProps: { type: Object, default: function() {
2326
2326
  return {};
2327
2327
  } }, autoZoom: { type: Boolean, default: !1 }, imageClass: { type: String }, boundariesClass: { type: String }, backgroundClass: { type: String }, foregroundClass: { type: String }, minWidth: { type: [Number, String] }, minHeight: { type: [Number, String] }, maxWidth: { type: [Number, String] }, maxHeight: { type: [Number, String] }, debounce: { type: [Boolean, Number], default: 500 }, transitions: { type: Boolean, default: !0 }, checkOrientation: { type: Boolean, default: !0 }, canvas: { type: [Object, Boolean], default: !0 }, crossOrigin: { type: [Boolean, String], default: void 0 }, transitionTime: { type: Number, default: 300 }, imageRestriction: { type: String, default: "fit-area", validator: function(e) {
@@ -2333,7 +2333,7 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2333
2333
  a.widthFrozen && (s.left = 0, s.right = 0), a.heightFrozen && (s.top = 0, s.bottom = 0), mt.forEach(function(j) {
2334
2334
  u[j] || (s[j] = 0);
2335
2335
  });
2336
- var d = dt(r, s = Ri({ coordinates: r, directions: s, sizeRestrictions: a, positionRestrictions: i })).width, c = dt(r, s).height, p = l.preserveRatio ? xe(r) : to(d / c, o);
2336
+ var d = dt(r, s = Ii({ coordinates: r, directions: s, sizeRestrictions: a, positionRestrictions: i })).width, c = dt(r, s).height, p = l.preserveRatio ? xe(r) : to(d / c, o);
2337
2337
  if (p) {
2338
2338
  var f = l.respectDirection;
2339
2339
  if (f || (f = r.width >= r.height || p === 1 ? "width" : "height"), f === "width") {
@@ -2345,16 +2345,16 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2345
2345
  } else if (f === "height") {
2346
2346
  var v = r.width - c * p;
2347
2347
  if (u.left && u.right) {
2348
- var A = s.left, S = s.right;
2349
- s.left = -bn(v, A, S), s.right = -bn(v, S, A);
2348
+ var x = s.left, S = s.right;
2349
+ s.left = -bn(v, x, S), s.right = -bn(v, S, x);
2350
2350
  } else u.left ? s.left = -v : u.right ? s.right = -v : u.top ? s.top = 0 : u.bottom && (s.bottom = 0);
2351
2351
  }
2352
- s = Ri({ directions: s, coordinates: r, sizeRestrictions: a, positionRestrictions: i, preserveRatio: !0, compensate: l.compensate });
2352
+ s = Ii({ directions: s, coordinates: r, sizeRestrictions: a, positionRestrictions: i, preserveRatio: !0, compensate: l.compensate });
2353
2353
  }
2354
2354
  return d = dt(r, s).width, c = dt(r, s).height, (p = l.preserveRatio ? xe(r) : to(d / c, o)) && Math.abs(p - d / c) > 1e-3 && mt.forEach(function(j) {
2355
2355
  u[j] || (s[j] = 0);
2356
- }), So({ event: new Bo({ left: -s.left, top: -s.top }), coordinates: { width: n.width + s.right + s.left, height: n.height + s.top + s.bottom, left: n.left, top: n.top }, positionRestrictions: i });
2357
- } }, moveAlgorithm: { type: Function, default: So }, initStretcher: { type: Function, default: function(e) {
2356
+ }), Ao({ event: new jo({ left: -s.left, top: -s.top }), coordinates: { width: n.width + s.right + s.left, height: n.height + s.top + s.bottom, left: n.left, top: n.top }, positionRestrictions: i });
2357
+ } }, moveAlgorithm: { type: Function, default: Ao }, initStretcher: { type: Function, default: function(e) {
2358
2358
  var t = e.stretcher, n = e.imageSize, o = xe(n);
2359
2359
  t.style.width = n.width + "px", t.style.height = t.clientWidth / o + "px", t.style.width = t.clientWidth + "px";
2360
2360
  } }, fitCoordinates: { type: Function, default: function(e) {
@@ -2374,7 +2374,7 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2374
2374
  var t = e.imageSize, n = {};
2375
2375
  return e.imageRestriction !== "none" && (n = { left: 0, top: 0, right: t.width, bottom: t.height }), n;
2376
2376
  } } }, data: function() {
2377
- return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: Se({}, Si) };
2377
+ return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: Se({}, xi) };
2378
2378
  }, computed: { image: function() {
2379
2379
  return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };
2380
2380
  }, imageTransforms: function() {
@@ -2387,8 +2387,8 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2387
2387
  }, initialized: function() {
2388
2388
  return !!(this.visibleArea && this.imageLoaded);
2389
2389
  }, settings: function() {
2390
- var e = ko(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });
2391
- return { moveImage: ko(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: e };
2390
+ var e = So(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });
2391
+ return { moveImage: So(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: e };
2392
2392
  }, coefficient: function() {
2393
2393
  return this.visibleArea ? this.visibleArea.width / this.boundaries.width : 0;
2394
2394
  }, areaRestrictions: function() {
@@ -2401,10 +2401,10 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2401
2401
  if (e = function(o) {
2402
2402
  var i = o.areaRestrictions, a = o.sizeRestrictions, r = o.boundaries, l = o.positionRestrictions, s = ve(ve({}, a), { minWidth: a.minWidth !== void 0 ? a.minWidth : 0, minHeight: a.minHeight !== void 0 ? a.minHeight : 0, maxWidth: a.maxWidth !== void 0 ? a.maxWidth : 1 / 0, maxHeight: a.maxHeight !== void 0 ? a.maxHeight : 1 / 0 });
2403
2403
  l.left !== void 0 && l.right !== void 0 && (s.maxWidth = Math.min(s.maxWidth, l.right - l.left)), l.bottom !== void 0 && l.top !== void 0 && (s.maxHeight = Math.min(s.maxHeight, l.bottom - l.top));
2404
- var u = Co(i), d = Ca(r, u);
2404
+ var u = xo(i), d = Ca(r, u);
2405
2405
  return u.width < 1 / 0 && (!s.maxWidth || s.maxWidth > d.width) && (s.maxWidth = Math.min(s.maxWidth, d.width)), u.height < 1 / 0 && (!s.maxHeight || s.maxHeight > d.height) && (s.maxHeight = Math.min(s.maxHeight, d.height)), s.minWidth > s.maxWidth && (s.minWidth = s.maxWidth, s.widthFrozen = !0), s.minHeight > s.maxHeight && (s.minHeight = s.maxHeight, s.heightFrozen = !0), s;
2406
2406
  }({ sizeRestrictions: e, areaRestrictions: this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }), imageSize: this.imageSize, boundaries: this.boundaries, positionRestrictions: this.positionRestrictions, imageRestriction: this.imageRestriction, visibleArea: this.visibleArea, stencilSize: this.getStencilSize() }), this.visibleArea && this.stencilSize) {
2407
- var t = this.getStencilSize(), n = Co(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
2407
+ var t = this.getStencilSize(), n = xo(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
2408
2408
  e.maxWidth = Math.min(e.maxWidth, n.width * t.width / this.boundaries.width), e.maxHeight = Math.min(e.maxHeight, n.height * t.height / this.boundaries.height), e.maxWidth < e.minWidth && (e.minWidth = e.maxWidth), e.maxHeight < e.minHeight && (e.minHeight = e.maxHeight);
2409
2409
  }
2410
2410
  return e;
@@ -2448,7 +2448,7 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2448
2448
  return e[n] !== t[n];
2449
2449
  }) && this.$nextTick(this.onPropsChange);
2450
2450
  } }, created: function() {
2451
- this.debouncedUpdate = wo(this.update, this.debounce), this.debouncedDisableTransitions = wo(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
2451
+ this.debouncedUpdate = Co(this.update, this.debounce), this.debouncedDisableTransitions = Co(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
2452
2452
  }, mounted: function() {
2453
2453
  this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
2454
2454
  }, unmounted: function() {
@@ -2499,7 +2499,7 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2499
2499
  var i = this.autoZoomAlgorithm;
2500
2500
  i || (i = this.stencilSize ? $l : this.autoZoom ? Dl : Pl);
2501
2501
  var a = i({ event: { type: e, params: o }, visibleArea: t, coordinates: n, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
2502
- return Se(Se({}, a), {}, { changed: !xi(a.visibleArea, t) || !xi(a.coordinates, n) });
2502
+ return Se(Se({}, a), {}, { changed: !Ai(a.visibleArea, t) || !Ai(a.coordinates, n) });
2503
2503
  }, runAutoZoom: function(e) {
2504
2504
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, o = n !== void 0 && n, i = wl(t, Zl), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), r = a.visibleArea, l = a.coordinates, s = a.changed;
2505
2505
  o && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, o && s && this.debouncedDisableTransitions();
@@ -2610,7 +2610,7 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2610
2610
  var e, t = this;
2611
2611
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
2612
2612
  if (function(i) {
2613
- if (ki(i)) return !1;
2613
+ if (Ci(i)) return !1;
2614
2614
  var a = window.location, r = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(i) || [], l = { protocol: r[1] || "", host: r[2] || "", port: r[3] || "" }, s = function(u) {
2615
2615
  return u.port || ((u.protocol || a.protocol) === "http" ? 80 : 433);
2616
2616
  };
@@ -2644,7 +2644,7 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2644
2644
  }));
2645
2645
  }, onParseImage: function(e) {
2646
2646
  var t = this, n = e.source, o = e.arrayBuffer, i = e.orientation;
2647
- this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, o && i && i > 1 ? ba(n) || !ki(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([o])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(a) {
2647
+ this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, o && i && i > 1 ? ba(n) || !Ci(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([o])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(a) {
2648
2648
  for (var r = [], l = new Uint8Array(a); l.length > 0; ) {
2649
2649
  var s = l.subarray(0, 8192);
2650
2650
  r.push(String.fromCharCode.apply(null, Array.from ? Array.from(s) : s.slice())), l = l.subarray(8192);
@@ -2717,7 +2717,7 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2717
2717
  }
2718
2718
  if (We(t) && (t = We(i) ? a : i), We(n) && (n = We(i) ? r : i), !e && (We(t) || We(n))) {
2719
2719
  var s = this.getStencilSize(), u = s ? xe(s) : null;
2720
- We(t) && (t = Ci(u) ? u : void 0), We(n) && (n = Ci(u) ? u : void 0);
2720
+ We(t) && (t = Si(u) ? u : void 0), We(n) && (n = Si(u) ? u : void 0);
2721
2721
  }
2722
2722
  return { minimum: t, maximum: n };
2723
2723
  }, getStencilSize: function() {
@@ -2726,7 +2726,7 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2726
2726
  }, getPublicProperties: function() {
2727
2727
  return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };
2728
2728
  }, defaultCoordinates: function() {
2729
- return Se({}, Si);
2729
+ return Se({}, xi);
2730
2730
  }, flip: function(e, t) {
2731
2731
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = n.transitions, i = o === void 0 || o;
2732
2732
  if (!this.transitionsActive) {
@@ -2744,10 +2744,10 @@ var Zl = ["transitions"], gt = ct("vue-advanced-cropper"), Wo = { name: "Cropper
2744
2744
  r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), o && this.debouncedDisableTransitions();
2745
2745
  }
2746
2746
  } }, emits: ["change", "error", "ready"] }, Ql = { key: 0, ref: "canvas", style: { display: "none" } }, Jl = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
2747
- Wo.render = function(e, t, n, o, i, a) {
2747
+ Ko.render = function(e, t, n, o, i, a) {
2748
2748
  return y(), ee("div", { ref: "cropper", class: a.classes.cropper }, [h("div", { ref: "stretcher", class: a.classes.stretcher }, null, 2), h("div", { class: a.classes.boundaries, style: a.boundariesStyle }, [(y(), ee(xn(n.backgroundWrapperComponent), { class: a.classes.cropperWrapper, "wheel-resize": a.settings.resizeImage.wheel, "touch-resize": a.settings.resizeImage.touch, "touch-move": a.settings.moveImage.touch, "mouse-move": a.settings.moveImage.mouse, onMove: a.onManipulateImage, onResize: a.onManipulateImage }, { default: M(function() {
2749
2749
  return [h("div", { class: a.classes.background, style: a.boundariesStyle }, null, 6), h("div", { class: a.classes.imageWrapper }, [h("img", { ref: "image", crossorigin: i.imageAttributes.crossOrigin, src: i.imageAttributes.src, class: a.classes.image, style: a.imageStyle, onMousedown: t[1] || (t[1] = it(function() {
2750
- }, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), h("div", { class: a.classes.foreground, style: a.boundariesStyle }, null, 6), qe((y(), ee(xn(n.stencilComponent), Qi({ ref: "stencil", image: a.image, coordinates: i.coordinates, "stencil-coordinates": a.stencilCoordinates, transitions: a.transitionsOptions }, n.stencilProps, { onResize: a.onResize, onResizeEnd: a.onResizeEnd, onMove: a.onMove, onMoveEnd: a.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[Vn, i.imageLoaded]]), n.canvas ? (y(), ee("canvas", Ql, null, 512)) : te("", !0), n.canvas ? (y(), ee("canvas", Jl, null, 512)) : te("", !0)];
2750
+ }, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), h("div", { class: a.classes.foreground, style: a.boundariesStyle }, null, 6), qe((y(), ee(xn(n.stencilComponent), Ji({ ref: "stencil", image: a.image, coordinates: i.coordinates, "stencil-coordinates": a.stencilCoordinates, transitions: a.transitionsOptions }, n.stencilProps, { onResize: a.onResize, onResizeEnd: a.onResizeEnd, onMove: a.onMove, onMoveEnd: a.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[Vn, i.imageLoaded]]), n.canvas ? (y(), ee("canvas", Ql, null, 512)) : te("", !0), n.canvas ? (y(), ee("canvas", Jl, null, 512)) : te("", !0)];
2751
2751
  }), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
2752
2752
  };
2753
2753
  const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-label", "disabled", "max", "min", "step", "value"], nu = /* @__PURE__ */ ye({
@@ -2840,10 +2840,12 @@ const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-lab
2840
2840
  derivedFormats: { default: 0 }
2841
2841
  },
2842
2842
  setup(e) {
2843
- const t = e, { t: n } = ke(), { emitData: o } = Nt(), i = ["free", "1x1", "16x9"], a = W(null), r = W(null), l = W(null), s = W(null), u = W("free"), d = W(!1), c = W(null), p = W(null), f = W(0), g = W(null), k = W(1), b = W(1), v = R(() => !!a.value && a.value.size > ai), A = R(() => {
2843
+ const t = e, { t: n } = ke(), { emitData: o } = Nt(), i = ["free", "1x1", "16x9"], a = W(null), r = W(null), l = W(null), s = W(null), u = W("free"), d = W(!1), c = W(null), p = W(null), f = W(0), g = W(null), k = W(1), b = W(1), v = R(() => !!a.value && a.value.size > si), x = R(() => {
2844
2844
  const O = p.value, J = c.value;
2845
2845
  return !O || !J ? !0 : f.value % 360 !== 0 ? !1 : O.width >= J.width - 1 && O.height >= J.height - 1;
2846
- }), S = R(() => A.value && !v.value);
2846
+ }), S = R(
2847
+ () => t.mode === "edit" && x.value && !v.value
2848
+ );
2847
2849
  function j({
2848
2850
  imageSize: O,
2849
2851
  visibleArea: J
@@ -2851,10 +2853,10 @@ const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-lab
2851
2853
  const me = J ?? O, pe = I.value ?? G(u.value);
2852
2854
  return pe ? me.width / me.height > pe ? { width: me.height * pe, height: me.height } : { width: me.width, height: me.width / pe } : { width: me.width, height: me.height };
2853
2855
  }
2854
- const I = R(() => t.ratio ? ri(t.ratio) : null), T = R(() => {
2856
+ const I = R(() => t.ratio ? li(t.ratio) : null), T = R(() => {
2855
2857
  const O = I.value ?? G(u.value);
2856
2858
  return O ? { aspectRatio: O } : {};
2857
- }), x = ta.join(","), U = R(
2859
+ }), A = na.join(","), U = R(
2858
2860
  () => {
2859
2861
  var O;
2860
2862
  return ((O = a.value) == null ? void 0 : O.type) === "image/png" ? "image/png" : "image/jpeg";
@@ -2864,7 +2866,7 @@ const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-lab
2864
2866
  return `${(O.name || "product-image").replace(/\.[^.]+$/, "")}.${U.value === "image/png" ? "png" : "jpg"}`;
2865
2867
  }
2866
2868
  function G(O) {
2867
- return O === "free" ? null : ri(O);
2869
+ return O === "free" ? null : li(O);
2868
2870
  }
2869
2871
  function H(O) {
2870
2872
  return O === "free" ? n("menu.product_image.editor.ratio_free") : O.replace("x", ":");
@@ -2893,7 +2895,7 @@ const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-lab
2893
2895
  return { width: Math.round(O.width * J), height: Math.round(O.height * J) };
2894
2896
  }
2895
2897
  function Q(O) {
2896
- const J = na(O);
2898
+ const J = go(O);
2897
2899
  if (J) {
2898
2900
  l.value = n(`menu.product_image.error.${J}`);
2899
2901
  return;
@@ -2947,10 +2949,12 @@ const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-lab
2947
2949
  const O = a.value;
2948
2950
  if (!O) return null;
2949
2951
  if (S.value) return O;
2952
+ if (x.value)
2953
+ return vo(O, n("menu.product_image.error.unreadable"));
2950
2954
  const J = (pe = (me = s.value) == null ? void 0 : me.getResult()) == null ? void 0 : pe.canvas;
2951
2955
  return J ? Tr(J, { fileName: F(O), mime: U.value }) : null;
2952
2956
  };
2953
- return Vo(() => {
2957
+ return zo(() => {
2954
2958
  r.value && URL.revokeObjectURL(r.value);
2955
2959
  }), Ae(a, (O) => o(O ? he : null), { immediate: !0 }), (O, J) => {
2956
2960
  var Y;
@@ -2962,7 +2966,7 @@ const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-lab
2962
2966
  onPointerdown: J[0] || (J[0] = (ne) => d.value = !0),
2963
2967
  onWheel: J[1] || (J[1] = (ne) => d.value = !0)
2964
2968
  }, [
2965
- h(m(Wo), {
2969
+ h(m(Ko), {
2966
2970
  ref_key: "cropperRef",
2967
2971
  ref: s,
2968
2972
  canvas: { maxWidth: 4096, maxHeight: 4096 },
@@ -3067,14 +3071,14 @@ const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-lab
3067
3071
  }),
3068
3072
  _("p", ku, oe(m(n)("menu.product_image.editor.oversized", {
3069
3073
  size: w(((Y = a.value) == null ? void 0 : Y.size) ?? 0),
3070
- limit: w(m(ai)),
3074
+ limit: w(m(si)),
3071
3075
  edge: m(Kn)
3072
3076
  })), 1)
3073
3077
  ])) : te("", !0),
3074
3078
  $.value ? (y(), q("p", Cu, oe($.value), 1)) : te("", !0)
3075
3079
  ], 64)) : (y(), ee(me, {
3076
3080
  key: 0,
3077
- accept: m(x),
3081
+ accept: m(A),
3078
3082
  "content-class": "h-[280px] w-full",
3079
3083
  onFileUpload: se
3080
3084
  }, {
@@ -3185,12 +3189,12 @@ const eu = { class: "range-slider relative flex items-center" }, tu = ["aria-lab
3185
3189
  ]);
3186
3190
  };
3187
3191
  }
3188
- }), Ao = W({});
3192
+ }), Ro = W({});
3189
3193
  function Fu(e) {
3190
- Ao.value = { ...Ao.value, [e]: Date.now() };
3194
+ Ro.value = { ...Ro.value, [e]: Date.now() };
3191
3195
  }
3192
3196
  function on(e, t) {
3193
- const n = Ao.value[t];
3197
+ const n = Ro.value[t];
3194
3198
  return !e || !n ? e : `${e}${e.includes("?") ? "&" : "?"}t=${n}`;
3195
3199
  }
3196
3200
  const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
@@ -3224,7 +3228,7 @@ const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
3224
3228
  const n = e, o = t, { t: i } = ke(), a = nt(), r = Je(), l = De(), s = R(() => l.state.featureFlags.autoGenerateImageAspectRatio), u = R({
3225
3229
  get: () => n.modelValue,
3226
3230
  set: (C) => o("update:modelValue", C)
3227
- }), d = R(() => n.disabled || n.coverOnly), c = W(null), p = W(null), f = W({}), g = W(!1), k = W({}), b = W(null), v = W({}), A = W({});
3231
+ }), d = R(() => n.disabled || n.coverOnly), c = W(null), p = W(null), f = W({}), g = W(!1), k = W({}), b = W(null), v = W({}), x = W({});
3228
3232
  let S = null;
3229
3233
  const j = {
3230
3234
  "1x1": "menu_grid",
@@ -3232,20 +3236,20 @@ const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
3232
3236
  };
3233
3237
  function I(C, E) {
3234
3238
  if (!c.value || E !== "active") return null;
3235
- const Y = si(c.value.url, C), ne = v.value[C];
3239
+ const Y = ui(c.value.url, C), ne = v.value[C];
3236
3240
  return ne ? `${Y}&t=${ne}` : Y;
3237
3241
  }
3238
- const T = W(!1), x = W(null), U = R(() => {
3242
+ const T = W(!1), A = W(null), U = R(() => {
3239
3243
  if (!c.value) return null;
3240
- const C = x.value;
3244
+ const C = A.value;
3241
3245
  if (!C) return on(c.value.url, c.value._id);
3242
- const E = si(c.value.url, C), Y = v.value[C];
3246
+ const E = ui(c.value.url, C), Y = v.value[C];
3243
3247
  return Y ? `${E}&t=${Y}` : E;
3244
3248
  }), F = R(
3245
- () => x.value ? qn(x.value) : i("menu.product_image.manage.original")
3249
+ () => A.value ? qn(A.value) : i("menu.product_image.manage.original")
3246
3250
  );
3247
3251
  function G(C) {
3248
- x.value = C, T.value = !0;
3252
+ A.value = C, T.value = !0;
3249
3253
  }
3250
3254
  function H(C) {
3251
3255
  const E = /* @__PURE__ */ new Set();
@@ -3266,7 +3270,7 @@ const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
3266
3270
  const C = Object.keys(((Y = c.value) == null ? void 0 : Y.imageSet) ?? {});
3267
3271
  return [...Ot.filter((ne) => C.includes(ne)), ...w.value].map((ne) => {
3268
3272
  var be;
3269
- const de = A.value[ne] ? "pending" : f.value[ne];
3273
+ const de = x.value[ne] ? "pending" : f.value[ne];
3270
3274
  return {
3271
3275
  ratio: ne,
3272
3276
  label: qn(ne),
@@ -3300,15 +3304,15 @@ const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
3300
3304
  f.value = Object.fromEntries(
3301
3305
  ((Y == null ? void 0 : Y.variants) ?? []).map((D) => [D.aspectRatio, D.status])
3302
3306
  ), g.value = !0;
3303
- const de = Date.now(), be = { ...A.value };
3307
+ const de = Date.now(), be = { ...x.value };
3304
3308
  Object.entries(be).forEach(([D, B]) => {
3305
3309
  const X = f.value[D] === "active" && ne[D] !== "active", ue = f.value[D] === "failed";
3306
3310
  !X && !ue && de < B || (delete be[D], v.value = { ...v.value, [D]: de });
3307
- }), A.value = be;
3311
+ }), x.value = be;
3308
3312
  } catch {
3309
3313
  return;
3310
3314
  }
3311
- Q(), (Object.values(f.value).some((E) => E === "pending") || Object.keys(A.value).length > 0) && n.modelValue && (S = setTimeout(se, 5e3));
3315
+ Q(), (Object.values(f.value).some((E) => E === "pending") || Object.keys(x.value).length > 0) && n.modelValue && (S = setTimeout(se, 5e3));
3312
3316
  }
3313
3317
  Ae(
3314
3318
  () => [n.modelValue, n.image],
@@ -3317,14 +3321,14 @@ const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
3317
3321
  Q(), T.value = !1;
3318
3322
  return;
3319
3323
  }
3320
- c.value = E ? { ...E, imageSet: { ...E.imageSet } } : null, p.value = c.value ? { ...c.value, imageSet: { ...c.value.imageSet } } : null, f.value = {}, g.value = !1, k.value = {}, v.value = {}, A.value = {}, b.value = null, se();
3324
+ c.value = E ? { ...E, imageSet: { ...E.imageSet } } : null, p.value = c.value ? { ...c.value, imageSet: { ...c.value.imageSet } } : null, f.value = {}, g.value = !1, k.value = {}, v.value = {}, x.value = {}, b.value = null, se();
3321
3325
  },
3322
3326
  { immediate: !0 }
3323
- ), Vo(Q);
3327
+ ), zo(Q);
3324
3328
  async function K(C) {
3325
3329
  if (!(!c.value || !C.length))
3326
3330
  try {
3327
- c.value = await li(n.itemId, c.value, C), se();
3331
+ c.value = await ci(n.itemId, c.value, C), se();
3328
3332
  } catch (E) {
3329
3333
  r.open({ message: `${E}`, type: "error" });
3330
3334
  }
@@ -3390,8 +3394,8 @@ const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
3390
3394
  ge(C.ratio, async () => {
3391
3395
  c.value = await Or(n.itemId, E, C.ratio, ne);
3392
3396
  const de = { ...k.value };
3393
- delete de[C.ratio], k.value = de, A.value = {
3394
- ...A.value,
3397
+ delete de[C.ratio], k.value = de, x.value = {
3398
+ ...x.value,
3395
3399
  [C.ratio]: Date.now() + ao
3396
3400
  }, r.open({ message: i("menu.product_image.replace.queued"), type: "success" }), se();
3397
3401
  });
@@ -3403,14 +3407,14 @@ const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
3403
3407
  const E = c.value;
3404
3408
  if (k.value[C.ratio] === !0 || g.value && !f.value[C.ratio]) {
3405
3409
  ge(C.ratio, async () => {
3406
- c.value = await li(n.itemId, E, [C.ratio], {
3410
+ c.value = await ci(n.itemId, E, [C.ratio], {
3407
3411
  // Add format adds the key to imageSet before this button is pressed. It is
3408
3412
  // local-only at that point, so it must still be sent to media-service.
3409
3413
  includeExisting: k.value[C.ratio] === !0
3410
3414
  });
3411
3415
  const ne = { ...k.value };
3412
- delete ne[C.ratio], k.value = ne, A.value = {
3413
- ...A.value,
3416
+ delete ne[C.ratio], k.value = ne, x.value = {
3417
+ ...x.value,
3414
3418
  [C.ratio]: Date.now() + ao
3415
3419
  }, r.open({ message: i("menu.product_image.regenerate.queued"), type: "success" }), se();
3416
3420
  });
@@ -3441,8 +3445,8 @@ const Vu = { class: "fm-typo-en-title-md-600 mr-auto" }, Mu = {
3441
3445
  de
3442
3446
  );
3443
3447
  const be = { ...k.value };
3444
- delete be[C.ratio], k.value = be, A.value = {
3445
- ...A.value,
3448
+ delete be[C.ratio], k.value = be, x.value = {
3449
+ ...x.value,
3446
3450
  [C.ratio]: Date.now() + ao
3447
3451
  }, r.open({ message: i("menu.product_image.regenerate.queued"), type: "success" }), se();
3448
3452
  });
@@ -3738,7 +3742,7 @@ const fc = 6, Ct = /* @__PURE__ */ new Map();
3738
3742
  function hc(e, t) {
3739
3743
  return on(e, t) ?? e;
3740
3744
  }
3741
- function Ei(e, t, n = "product-image") {
3745
+ function Oi(e, t, n = "product-image") {
3742
3746
  const o = hc(e, t), i = Ct.get(o);
3743
3747
  if (i)
3744
3748
  return Ct.delete(o), Ct.set(o, i), i;
@@ -3756,9 +3760,9 @@ function Ei(e, t, n = "product-image") {
3756
3760
  }
3757
3761
  return a;
3758
3762
  }
3759
- let ln = null, Oi = 0;
3763
+ let ln = null, $i = 0;
3760
3764
  function Pa(e) {
3761
- return Oi += 1, `${e}-${Oi}`;
3765
+ return $i += 1, `${e}-${$i}`;
3762
3766
  }
3763
3767
  function Fa(e) {
3764
3768
  ln = e;
@@ -3773,7 +3777,7 @@ function Ln(e, t) {
3773
3777
  function n(o) {
3774
3778
  t(o.detail);
3775
3779
  }
3776
- Gt(() => window.addEventListener(e, n)), Mo(() => window.removeEventListener(e, n));
3780
+ Gt(() => window.addEventListener(e, n)), Uo(() => window.removeEventListener(e, n));
3777
3781
  }
3778
3782
  const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12" }, vc = { class: "grid gap-16 [grid-template-columns:repeat(auto-fill,minmax(160px,1fr))]" }, bc = { class: "fm-typo-en-body-md-400 text-center px-16" }, yc = ["accept"], _c = ["disabled", "onClick"], wc = { class: "absolute top-8 left-8 right-8 flex items-center justify-end gap-4 pointer-events-none" }, kc = {
3779
3783
  key: 0,
@@ -3794,18 +3798,18 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
3794
3798
  },
3795
3799
  emits: ["update:modelValue", "update:staged"],
3796
3800
  setup(e, { emit: t }) {
3797
- const n = e, o = t, { t: i } = ke(), a = nt(), r = Je(), l = ut(r), s = De(), u = R(() => s.state.featureFlags.autoGenerateImageAspectRatio), d = W(null), c = W(!1), p = W(null), f = W(!1), g = mn(), k = R(() => !!g.showRemy), b = Pa("product-image-field"), v = W(null), A = W(!1);
3798
- Mo(() => Ma(b));
3799
- const S = R(() => n.modelValue ?? []), j = R(() => S.value.length > 0 ? S.value : n.legacyThumbnail ? [ui(n.legacyThumbnail)] : []), I = R(() => n.staged ?? []), T = R(() => n.staged !== null && n.staged !== void 0), x = R(
3801
+ const n = e, o = t, { t: i } = ke(), a = nt(), r = Je(), l = ut(r), s = De(), u = R(() => s.state.featureFlags.autoGenerateImageAspectRatio), d = W(null), c = W(!1), p = W(null), f = W(!1), g = mn(), k = R(() => !!g.showRemy), b = Pa("product-image-field"), v = W(null), x = W(!1);
3802
+ Uo(() => Ma(b));
3803
+ const S = R(() => n.modelValue ?? []), j = R(() => S.value.length > 0 ? S.value : n.legacyThumbnail ? [di(n.legacyThumbnail)] : []), I = R(() => n.staged ?? []), T = R(() => n.staged !== null && n.staged !== void 0), A = R(
3800
3804
  () => j.value.find((P) => P._id === p.value) ?? null
3801
3805
  );
3802
3806
  function U(P) {
3803
3807
  return f.value && p.value === P._id;
3804
3808
  }
3805
3809
  function F(P) {
3806
- return P._id === Vr;
3810
+ return P._id === Mr;
3807
3811
  }
3808
- const G = ta.join(",");
3812
+ const G = na.join(",");
3809
3813
  function H(P) {
3810
3814
  return Object.keys(P.imageSet ?? {}).length;
3811
3815
  }
@@ -3816,25 +3820,25 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
3816
3820
  });
3817
3821
  }
3818
3822
  async function $(P) {
3819
- const ae = await Ei(P.url, P._id);
3823
+ const ae = await Oi(P.url, P._id);
3820
3824
  if (!ae) throw new Error(i("menu.product_image.error.unreadable"));
3821
3825
  return ae;
3822
3826
  }
3823
3827
  function N(P) {
3824
- n.disabled || n.coverOnly || Ei(P.url, P._id);
3828
+ n.disabled || n.coverOnly || Oi(P.url, P._id);
3825
3829
  }
3826
3830
  async function Q(P, ae) {
3827
- if (!(n.disabled || n.coverOnly || A.value)) {
3828
- A.value = !0;
3831
+ if (!(n.disabled || n.coverOnly || x.value)) {
3832
+ x.value = !0;
3829
3833
  try {
3830
- const ie = await ae, V = ci(ie);
3834
+ const ie = await ae, V = Fr(ie);
3831
3835
  if (V) throw new Error(i(`menu.product_image.error.${V}`));
3832
- const L = await Fr(ie);
3836
+ const L = await Vr(ie);
3833
3837
  v.value = P, Fa(b), g.activate({ imageData: L, command: "modifyImage" });
3834
3838
  } catch (ie) {
3835
3839
  w(ie);
3836
3840
  } finally {
3837
- A.value = !1;
3841
+ x.value = !1;
3838
3842
  }
3839
3843
  }
3840
3844
  }
@@ -3855,9 +3859,9 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
3855
3859
  } catch {
3856
3860
  throw new Error(i("menu.product_image.error.unreadable"));
3857
3861
  }
3858
- const V = ci(ie);
3862
+ const V = go(ie);
3859
3863
  if (V) throw new Error(i(`menu.product_image.error.${V}`));
3860
- if (P.type === "staged") {
3864
+ if (ie = await vo(ie, i("menu.product_image.error.unreadable")), P.type === "staged") {
3861
3865
  const fe = I.value.find((_e) => _e._id === P.imageId);
3862
3866
  if (!fe) return;
3863
3867
  URL.revokeObjectURL(fe.previewUrl), o(
@@ -3878,8 +3882,8 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
3878
3882
  }
3879
3883
  async function ce(P, ae) {
3880
3884
  const ie = await l.minor(
3881
- async () => await di(n.itemId, ae, {
3882
- aspectRatios: mi(u.value),
3885
+ async () => await mi(n.itemId, ae, {
3886
+ aspectRatios: pi(u.value),
3883
3887
  unreadableMessage: i("menu.product_image.error.unreadable")
3884
3888
  }),
3885
3889
  {
@@ -3937,7 +3941,7 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
3937
3941
  async function O(P) {
3938
3942
  if (n.disabled || n.coverOnly || !P.length) return;
3939
3943
  const ae = P.filter((V) => {
3940
- const L = na(V);
3944
+ const L = go(V);
3941
3945
  return L && r.open({ message: i(`menu.product_image.error.${L}`), type: "error" }), !L;
3942
3946
  });
3943
3947
  if (!ae.length) return;
@@ -3951,7 +3955,9 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
3951
3955
  if (L.type === "rest") {
3952
3956
  for (const _e of ae.slice(V))
3953
3957
  try {
3954
- ie.push(await Mr(_e, i("menu.product_image.error.unreadable")));
3958
+ ie.push(
3959
+ await vo(_e, i("menu.product_image.error.unreadable"))
3960
+ );
3955
3961
  } catch (re) {
3956
3962
  w(re);
3957
3963
  }
@@ -3979,12 +3985,12 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
3979
3985
  }
3980
3986
  await l.minor(
3981
3987
  async () => {
3982
- let ie = S.value.length ? [...S.value] : n.legacyThumbnail ? [ui(n.legacyThumbnail)] : [];
3988
+ let ie = S.value.length ? [...S.value] : n.legacyThumbnail ? [di(n.legacyThumbnail)] : [];
3983
3989
  const V = [];
3984
3990
  try {
3985
3991
  for (const L of P) {
3986
- const fe = await di(n.itemId, L, {
3987
- aspectRatios: mi(u.value),
3992
+ const fe = await mi(n.itemId, L, {
3993
+ aspectRatios: pi(u.value),
3988
3994
  unreadableMessage: i("menu.product_image.error.unreadable")
3989
3995
  });
3990
3996
  V.push({ itemId: n.itemId, imageId: fe._id }), ie = [...ie, { ...fe, isDefault: ie.length === 0 }];
@@ -4243,7 +4249,7 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
4243
4249
  ], 40, Cc),
4244
4250
  k.value ? (y(), q("button", {
4245
4251
  key: 0,
4246
- disabled: A.value,
4252
+ disabled: x.value,
4247
4253
  title: m(i)("menu.remy.title"),
4248
4254
  class: "rounded-full bg-fm-color-neutral-white w-32 h-32 flex items-center justify-center shadow-sm",
4249
4255
  type: "button",
@@ -4302,7 +4308,7 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
4302
4308
  ], 8, Ic),
4303
4309
  k.value ? (y(), q("button", {
4304
4310
  key: 0,
4305
- disabled: A.value,
4311
+ disabled: x.value,
4306
4312
  title: m(i)("menu.remy.title"),
4307
4313
  class: "rounded-full bg-fm-color-neutral-white w-32 h-32 flex items-center justify-center shadow-sm",
4308
4314
  type: "button",
@@ -4336,7 +4342,7 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
4336
4342
  "can-clear-cover": P.coverOnly || S.value.length > 1,
4337
4343
  "cover-only": P.coverOnly,
4338
4344
  disabled: P.disabled,
4339
- image: x.value,
4345
+ image: A.value,
4340
4346
  "item-id": P.itemId,
4341
4347
  "menu-items": P.menuItems,
4342
4348
  "onUpdate:image": ue
@@ -4346,7 +4352,7 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
4346
4352
  }, 8, ["label", "model-value"]);
4347
4353
  };
4348
4354
  }
4349
- }), Dc = /* @__PURE__ */ kt($c, [["__scopeId", "data-v-cdeaaec7"]]), Pc = { class: "fm-typo-en-title-md-600" }, Fc = { class: "pt-8 space-y-24" }, Vc = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, Mc = { class: "fm-typo-en-body-lg-600" }, zc = {
4355
+ }), Dc = /* @__PURE__ */ kt($c, [["__scopeId", "data-v-8a54387d"]]), Pc = { class: "fm-typo-en-title-md-600" }, Fc = { class: "pt-8 space-y-24" }, Vc = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, Mc = { class: "fm-typo-en-body-lg-600" }, zc = {
4350
4356
  key: 0,
4351
4357
  class: "flex flex-col gap-32 pl-32"
4352
4358
  }, Uc = {
@@ -4372,11 +4378,11 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
4372
4378
  setup(e, { emit: t }) {
4373
4379
  const n = e, o = t, { t: i } = ke(), a = W([]), r = W([]), l = W(""), s = W(""), u = W(""), d = W(""), c = W(!0), p = W(!1);
4374
4380
  function f() {
4375
- const x = n.productNameLocale || {}, U = n.productDescriptionLocale || {}, F = /* @__PURE__ */ new Set([...Object.keys(x), ...Object.keys(U)]);
4381
+ const A = n.productNameLocale || {}, U = n.productDescriptionLocale || {}, F = /* @__PURE__ */ new Set([...Object.keys(A), ...Object.keys(U)]);
4376
4382
  return F.size === 0 ? [] : Array.from(F).map((G) => ({
4377
4383
  localeCode: G,
4378
- localeName: bo(G),
4379
- nameValue: x[G] || "",
4384
+ localeName: _o(G),
4385
+ nameValue: A[G] || "",
4380
4386
  descriptionValue: U[G] || ""
4381
4387
  }));
4382
4388
  }
@@ -4388,30 +4394,30 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
4388
4394
  n.productNameLocale,
4389
4395
  n.productDescriptionLocale
4390
4396
  ],
4391
- ([x]) => {
4392
- x && (a.value = f(), r.value = Fe.clone(a.value), l.value = n.productName, s.value = n.productDescription || "", u.value = n.productName, d.value = n.productDescription || "", n.initialSection === "name" ? (c.value = !0, p.value = !1) : (c.value = !1, p.value = !0));
4397
+ ([A]) => {
4398
+ A && (a.value = f(), r.value = Fe.clone(a.value), l.value = n.productName, s.value = n.productDescription || "", u.value = n.productName, d.value = n.productDescription || "", n.initialSection === "name" ? (c.value = !0, p.value = !1) : (c.value = !1, p.value = !0));
4393
4399
  },
4394
4400
  { immediate: !0 }
4395
4401
  );
4396
- const g = R(() => a.value.map((x) => x.localeCode));
4397
- function k(x) {
4398
- const U = new Set(g.value), F = new Set(x);
4399
- for (const G of x)
4402
+ const g = R(() => a.value.map((A) => A.localeCode));
4403
+ function k(A) {
4404
+ const U = new Set(g.value), F = new Set(A);
4405
+ for (const G of A)
4400
4406
  U.has(G) || a.value.push({
4401
4407
  localeCode: G,
4402
- localeName: bo(G),
4408
+ localeName: _o(G),
4403
4409
  nameValue: "",
4404
4410
  descriptionValue: ""
4405
4411
  });
4406
4412
  a.value = a.value.filter((G) => F.has(G.localeCode));
4407
4413
  }
4408
4414
  function b() {
4409
- const x = !Fe.isEqual(a.value, r.value), U = l.value !== u.value, F = s.value !== d.value;
4410
- return x || U || F;
4415
+ const A = !Fe.isEqual(a.value, r.value), U = l.value !== u.value, F = s.value !== d.value;
4416
+ return A || U || F;
4411
4417
  }
4412
4418
  function v() {
4413
4419
  o("update:name", l.value.trim()), o("update:description", s.value.trim());
4414
- const x = a.value.filter((H) => H.nameValue.trim()), U = x.length === 0 ? void 0 : x.reduce(
4420
+ const A = a.value.filter((H) => H.nameValue.trim()), U = A.length === 0 ? void 0 : A.reduce(
4415
4421
  (H, w) => (H[w.localeCode] = w.nameValue.trim(), H),
4416
4422
  {}
4417
4423
  ), F = a.value.filter((H) => H.descriptionValue.trim()), G = F.length === 0 ? void 0 : F.reduce(
@@ -4420,12 +4426,12 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
4420
4426
  );
4421
4427
  o("update:nameLocale", U), o("update:descriptionLocale", G), o("update:modelValue", !1);
4422
4428
  }
4423
- function A() {
4429
+ function x() {
4424
4430
  o("update:modelValue", !1);
4425
4431
  }
4426
- const S = Xt(b, A), j = R({
4432
+ const S = Xt(b, x), j = R({
4427
4433
  get: () => n.modelValue,
4428
- set: (x) => o("update:modelValue", x)
4434
+ set: (A) => o("update:modelValue", A)
4429
4435
  });
4430
4436
  function I() {
4431
4437
  c.value = !c.value;
@@ -4433,7 +4439,7 @@ const gc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
4433
4439
  function T() {
4434
4440
  p.value = !p.value;
4435
4441
  }
4436
- return (x, U) => {
4442
+ return (A, U) => {
4437
4443
  const F = z("FmIcon"), G = z("fm-button"), H = z("fm-dialog");
4438
4444
  return y(), ee(H, {
4439
4445
  modelValue: j.value,
@@ -4586,23 +4592,23 @@ const Yc = {
4586
4592
  async function u([v]) {
4587
4593
  if (!v) return;
4588
4594
  s.value = !0;
4589
- const A = new FileReader();
4590
- A.onload = () => {
4595
+ const x = new FileReader();
4596
+ x.onload = () => {
4591
4597
  const S = new Image();
4592
- S.src = A.result, l.value = A.result, S.onload = () => {
4598
+ S.src = x.result, l.value = x.result, S.onload = () => {
4593
4599
  const j = qc(S, 1.7777777777777777);
4594
4600
  r.value = j, s.value = !1;
4595
4601
  }, S.onerror = () => {
4596
4602
  s.value = !1;
4597
4603
  };
4598
- }, A.readAsDataURL(v);
4604
+ }, x.readAsDataURL(v);
4599
4605
  }
4600
4606
  const d = (v) => {
4601
4607
  u([v]);
4602
4608
  };
4603
4609
  async function c(v) {
4604
4610
  !r.value && a.value && (r.value = a.value);
4605
- const { canvas: A } = v, S = A.toDataURL("image/jpeg", 0.75);
4611
+ const { canvas: x } = v, S = x.toDataURL("image/jpeg", 0.75);
4606
4612
  l.value = S;
4607
4613
  const j = await (await fetch(S)).blob(), I = new File([j], "img.jpeg", { type: "image/jpeg" });
4608
4614
  i("update:model-value", I);
@@ -4611,7 +4617,7 @@ const Yc = {
4611
4617
  r.value = void 0, l.value = void 0, i("reset:model-value");
4612
4618
  }
4613
4619
  const f = mn(), g = R(() => !!f.showRemy), k = Pa("image-drop-field");
4614
- Mo(() => Ma(k)), Ln("apply-image", (v) => {
4620
+ Uo(() => Ma(k)), Ln("apply-image", (v) => {
4615
4621
  !(v != null && v.imageData) || !Va(k) || (r.value = v.imageData, l.value = v.imageData);
4616
4622
  });
4617
4623
  async function b() {
@@ -4619,14 +4625,14 @@ const Yc = {
4619
4625
  const v = new FileReader();
4620
4626
  v.onload = () => {
4621
4627
  l.value = v.result;
4622
- }, v.readAsDataURL(n.modelValue), await new Promise((A) => setTimeout(A, 100));
4628
+ }, v.readAsDataURL(n.modelValue), await new Promise((x) => setTimeout(x, 100));
4623
4629
  }
4624
4630
  Fa(k), f.activate({
4625
4631
  imageData: l.value,
4626
4632
  command: "modifyImage"
4627
4633
  });
4628
4634
  }
4629
- return (v, A) => {
4635
+ return (v, x) => {
4630
4636
  const S = z("fm-icon"), j = z("fm-drop-field");
4631
4637
  return r.value || a.value ? (y(), q("div", Yc, [
4632
4638
  _("p", Xc, [
@@ -4636,7 +4642,7 @@ const Yc = {
4636
4642
  _("div", Qc, [
4637
4643
  _("div", Jc, [
4638
4644
  _("div", ed, [
4639
- h(m(Wo), {
4645
+ h(m(Ko), {
4640
4646
  class: "cropper h-[150px] w-[200px]",
4641
4647
  src: r.value || a.value,
4642
4648
  "stencil-props": {
@@ -4955,7 +4961,7 @@ const dd = () => cd().__FIREBASE_DEFAULTS__, md = () => {
4955
4961
  }
4956
4962
  const t = e && ud(e[1]);
4957
4963
  return t && JSON.parse(t);
4958
- }, Ho = () => {
4964
+ }, qo = () => {
4959
4965
  try {
4960
4966
  return dd() || md() || pd();
4961
4967
  } catch (e) {
@@ -4964,7 +4970,7 @@ const dd = () => cd().__FIREBASE_DEFAULTS__, md = () => {
4964
4970
  }
4965
4971
  }, fd = (e) => {
4966
4972
  var t, n;
4967
- return (n = (t = Ho()) === null || t === void 0 ? void 0 : t.emulatorHosts) === null || n === void 0 ? void 0 : n[e];
4973
+ return (n = (t = qo()) === null || t === void 0 ? void 0 : t.emulatorHosts) === null || n === void 0 ? void 0 : n[e];
4968
4974
  }, hd = (e) => {
4969
4975
  const t = fd(e);
4970
4976
  if (!t)
@@ -4976,10 +4982,10 @@ const dd = () => cd().__FIREBASE_DEFAULTS__, md = () => {
4976
4982
  return t[0] === "[" ? [t.substring(1, n - 1), o] : [t.substring(0, n), o];
4977
4983
  }, Na = () => {
4978
4984
  var e;
4979
- return (e = Ho()) === null || e === void 0 ? void 0 : e.config;
4985
+ return (e = qo()) === null || e === void 0 ? void 0 : e.config;
4980
4986
  }, nb = (e) => {
4981
4987
  var t;
4982
- return (t = Ho()) === null || t === void 0 ? void 0 : t[`_${e}`];
4988
+ return (t = qo()) === null || t === void 0 ? void 0 : t[`_${e}`];
4983
4989
  };
4984
4990
  /**
4985
4991
  * @license
@@ -5169,7 +5175,7 @@ function lb(e) {
5169
5175
  return !1;
5170
5176
  return !0;
5171
5177
  }
5172
- function To(e, t) {
5178
+ function Io(e, t) {
5173
5179
  if (e === t)
5174
5180
  return !0;
5175
5181
  const n = Object.keys(e), o = Object.keys(t);
@@ -5177,8 +5183,8 @@ function To(e, t) {
5177
5183
  if (!o.includes(i))
5178
5184
  return !1;
5179
5185
  const a = e[i], r = t[i];
5180
- if ($i(a) && $i(r)) {
5181
- if (!To(a, r))
5186
+ if (Di(a) && Di(r)) {
5187
+ if (!Io(a, r))
5182
5188
  return !1;
5183
5189
  } else if (a !== r)
5184
5190
  return !1;
@@ -5188,7 +5194,7 @@ function To(e, t) {
5188
5194
  return !1;
5189
5195
  return !0;
5190
5196
  }
5191
- function $i(e) {
5197
+ function Di(e) {
5192
5198
  return e !== null && typeof e == "object";
5193
5199
  }
5194
5200
  /**
@@ -5701,9 +5707,9 @@ class Dd {
5701
5707
  }
5702
5708
  }
5703
5709
  const Pd = (e, t) => t.some((n) => e instanceof n);
5704
- let Di, Pi;
5710
+ let Pi, Fi;
5705
5711
  function Fd() {
5706
- return Di || (Di = [
5712
+ return Pi || (Pi = [
5707
5713
  IDBDatabase,
5708
5714
  IDBObjectStore,
5709
5715
  IDBIndex,
@@ -5712,13 +5718,13 @@ function Fd() {
5712
5718
  ]);
5713
5719
  }
5714
5720
  function Vd() {
5715
- return Pi || (Pi = [
5721
+ return Fi || (Fi = [
5716
5722
  IDBCursor.prototype.advance,
5717
5723
  IDBCursor.prototype.continue,
5718
5724
  IDBCursor.prototype.continuePrimaryKey
5719
5725
  ]);
5720
5726
  }
5721
- const ja = /* @__PURE__ */ new WeakMap(), Ro = /* @__PURE__ */ new WeakMap(), Ga = /* @__PURE__ */ new WeakMap(), lo = /* @__PURE__ */ new WeakMap(), Ko = /* @__PURE__ */ new WeakMap();
5727
+ const ja = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Ga = /* @__PURE__ */ new WeakMap(), lo = /* @__PURE__ */ new WeakMap(), Yo = /* @__PURE__ */ new WeakMap();
5722
5728
  function Md(e) {
5723
5729
  const t = new Promise((n, o) => {
5724
5730
  const i = () => {
@@ -5733,10 +5739,10 @@ function Md(e) {
5733
5739
  return t.then((n) => {
5734
5740
  n instanceof IDBCursor && ja.set(n, e);
5735
5741
  }).catch(() => {
5736
- }), Ko.set(t, e), t;
5742
+ }), Yo.set(t, e), t;
5737
5743
  }
5738
5744
  function zd(e) {
5739
- if (Ro.has(e))
5745
+ if (Eo.has(e))
5740
5746
  return;
5741
5747
  const t = new Promise((n, o) => {
5742
5748
  const i = () => {
@@ -5748,13 +5754,13 @@ function zd(e) {
5748
5754
  };
5749
5755
  e.addEventListener("complete", a), e.addEventListener("error", r), e.addEventListener("abort", r);
5750
5756
  });
5751
- Ro.set(e, t);
5757
+ Eo.set(e, t);
5752
5758
  }
5753
- let Io = {
5759
+ let Oo = {
5754
5760
  get(e, t, n) {
5755
5761
  if (e instanceof IDBTransaction) {
5756
5762
  if (t === "done")
5757
- return Ro.get(e);
5763
+ return Eo.get(e);
5758
5764
  if (t === "objectStoreNames")
5759
5765
  return e.objectStoreNames || Ga.get(e);
5760
5766
  if (t === "store")
@@ -5770,7 +5776,7 @@ let Io = {
5770
5776
  }
5771
5777
  };
5772
5778
  function Ud(e) {
5773
- Io = e(Io);
5779
+ Oo = e(Oo);
5774
5780
  }
5775
5781
  function Nd(e) {
5776
5782
  return e === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(t, ...n) {
@@ -5783,7 +5789,7 @@ function Nd(e) {
5783
5789
  };
5784
5790
  }
5785
5791
  function Bd(e) {
5786
- return typeof e == "function" ? Nd(e) : (e instanceof IDBTransaction && zd(e), Pd(e, Fd()) ? new Proxy(e, Io) : e);
5792
+ return typeof e == "function" ? Nd(e) : (e instanceof IDBTransaction && zd(e), Pd(e, Fd()) ? new Proxy(e, Oo) : e);
5787
5793
  }
5788
5794
  function Tt(e) {
5789
5795
  if (e instanceof IDBRequest)
@@ -5791,9 +5797,9 @@ function Tt(e) {
5791
5797
  if (lo.has(e))
5792
5798
  return lo.get(e);
5793
5799
  const t = Bd(e);
5794
- return t !== e && (lo.set(e, t), Ko.set(t, e)), t;
5800
+ return t !== e && (lo.set(e, t), Yo.set(t, e)), t;
5795
5801
  }
5796
- const uo = (e) => Ko.get(e);
5802
+ const uo = (e) => Yo.get(e);
5797
5803
  function Ld(e, t, { blocked: n, upgrade: o, blocking: i, terminated: a } = {}) {
5798
5804
  const r = indexedDB.open(e, t), l = Tt(r);
5799
5805
  return o && r.addEventListener("upgradeneeded", (s) => {
@@ -5809,7 +5815,7 @@ function Ld(e, t, { blocked: n, upgrade: o, blocking: i, terminated: a } = {}) {
5809
5815
  }), l;
5810
5816
  }
5811
5817
  const jd = ["get", "getKey", "getAll", "getAllKeys", "count"], Gd = ["put", "add", "delete", "clear"], co = /* @__PURE__ */ new Map();
5812
- function Fi(e, t) {
5818
+ function Vi(e, t) {
5813
5819
  if (!(e instanceof IDBDatabase && !(t in e) && typeof t == "string"))
5814
5820
  return;
5815
5821
  if (co.get(t))
@@ -5832,8 +5838,8 @@ function Fi(e, t) {
5832
5838
  }
5833
5839
  Ud((e) => ({
5834
5840
  ...e,
5835
- get: (t, n, o) => Fi(t, n) || e.get(t, n, o),
5836
- has: (t, n) => !!Fi(t, n) || e.has(t, n)
5841
+ get: (t, n, o) => Vi(t, n) || e.get(t, n, o),
5842
+ has: (t, n) => !!Vi(t, n) || e.has(t, n)
5837
5843
  }));
5838
5844
  /**
5839
5845
  * @license
@@ -5871,7 +5877,7 @@ function Hd(e) {
5871
5877
  const t = e.getComponent();
5872
5878
  return (t == null ? void 0 : t.type) === "VERSION";
5873
5879
  }
5874
- const Eo = "@firebase/app", Vi = "0.10.13";
5880
+ const $o = "@firebase/app", Mi = "0.10.13";
5875
5881
  /**
5876
5882
  * @license
5877
5883
  * Copyright 2019 Google LLC
@@ -5905,8 +5911,8 @@ const wt = new Dd("@firebase/app"), Kd = "@firebase/app-compat", qd = "@firebase
5905
5911
  * See the License for the specific language governing permissions and
5906
5912
  * limitations under the License.
5907
5913
  */
5908
- const Oo = "[DEFAULT]", _m = {
5909
- [Eo]: "fire-core",
5914
+ const Do = "[DEFAULT]", _m = {
5915
+ [$o]: "fire-core",
5910
5916
  [Kd]: "fire-core-compat",
5911
5917
  [Yd]: "fire-analytics",
5912
5918
  [qd]: "fire-analytics-compat",
@@ -5951,8 +5957,8 @@ const Oo = "[DEFAULT]", _m = {
5951
5957
  * See the License for the specific language governing permissions and
5952
5958
  * limitations under the License.
5953
5959
  */
5954
- const cn = /* @__PURE__ */ new Map(), wm = /* @__PURE__ */ new Map(), $o = /* @__PURE__ */ new Map();
5955
- function Mi(e, t) {
5960
+ const cn = /* @__PURE__ */ new Map(), wm = /* @__PURE__ */ new Map(), Po = /* @__PURE__ */ new Map();
5961
+ function zi(e, t) {
5956
5962
  try {
5957
5963
  e.container.addComponent(t);
5958
5964
  } catch (n) {
@@ -5961,13 +5967,13 @@ function Mi(e, t) {
5961
5967
  }
5962
5968
  function Fn(e) {
5963
5969
  const t = e.name;
5964
- if ($o.has(t))
5970
+ if (Po.has(t))
5965
5971
  return wt.debug(`There were multiple attempts to register component ${t}.`), !1;
5966
- $o.set(t, e);
5972
+ Po.set(t, e);
5967
5973
  for (const n of cn.values())
5968
- Mi(n, e);
5974
+ zi(n, e);
5969
5975
  for (const n of wm.values())
5970
- Mi(n, e);
5976
+ zi(n, e);
5971
5977
  return !0;
5972
5978
  }
5973
5979
  function km(e, t) {
@@ -6087,7 +6093,7 @@ const xm = ym;
6087
6093
  function Am(e, t = {}) {
6088
6094
  let n = e;
6089
6095
  typeof t != "object" && (t = { name: t });
6090
- const o = Object.assign({ name: Oo, automaticDataCollectionEnabled: !1 }, t), i = o.name;
6096
+ const o = Object.assign({ name: Do, automaticDataCollectionEnabled: !1 }, t), i = o.name;
6091
6097
  if (typeof i != "string" || !i)
6092
6098
  throw Rt.create("bad-app-name", {
6093
6099
  appName: String(i)
@@ -6099,19 +6105,19 @@ function Am(e, t = {}) {
6099
6105
  );
6100
6106
  const a = cn.get(i);
6101
6107
  if (a) {
6102
- if (To(n, a.options) && To(o, a.config))
6108
+ if (Io(n, a.options) && Io(o, a.config))
6103
6109
  return a;
6104
6110
  throw Rt.create("duplicate-app", { appName: i });
6105
6111
  }
6106
6112
  const r = new Rd(i);
6107
- for (const s of $o.values())
6113
+ for (const s of Po.values())
6108
6114
  r.addComponent(s);
6109
6115
  const l = new Sm(n, o, r);
6110
6116
  return cn.set(i, l), l;
6111
6117
  }
6112
- function Tm(e = Oo) {
6118
+ function Tm(e = Do) {
6113
6119
  const t = cn.get(e);
6114
- if (!t && e === Oo && Na())
6120
+ if (!t && e === Do && Na())
6115
6121
  return Am();
6116
6122
  if (!t)
6117
6123
  throw Rt.create("no-app", { appName: e });
@@ -6190,7 +6196,7 @@ async function Em(e) {
6190
6196
  }
6191
6197
  }
6192
6198
  }
6193
- async function zi(e, t) {
6199
+ async function Ui(e, t) {
6194
6200
  try {
6195
6201
  const o = (await Wa()).transaction(dn, "readwrite");
6196
6202
  await o.objectStore(dn).put(t, Ha(e)), await o.done;
@@ -6241,7 +6247,7 @@ class Dm {
6241
6247
  async triggerHeartbeat() {
6242
6248
  var t, n;
6243
6249
  try {
6244
- const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), a = Ui();
6250
+ const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), a = Ni();
6245
6251
  return ((t = this._heartbeatsCache) === null || t === void 0 ? void 0 : t.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, ((n = this._heartbeatsCache) === null || n === void 0 ? void 0 : n.heartbeats) == null) || this._heartbeatsCache.lastSentHeartbeatDate === a || this._heartbeatsCache.heartbeats.some((r) => r.date === a) ? void 0 : (this._heartbeatsCache.heartbeats.push({ date: a, agent: i }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((r) => {
6246
6252
  const l = new Date(r.date).valueOf();
6247
6253
  return Date.now() - l <= $m;
@@ -6262,14 +6268,14 @@ class Dm {
6262
6268
  try {
6263
6269
  if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((t = this._heartbeatsCache) === null || t === void 0 ? void 0 : t.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
6264
6270
  return "";
6265
- const n = Ui(), { heartbeatsToSend: o, unsentEntries: i } = Pm(this._heartbeatsCache.heartbeats), a = Pn(JSON.stringify({ version: 2, heartbeats: o }));
6271
+ const n = Ni(), { heartbeatsToSend: o, unsentEntries: i } = Pm(this._heartbeatsCache.heartbeats), a = Pn(JSON.stringify({ version: 2, heartbeats: o }));
6266
6272
  return this._heartbeatsCache.lastSentHeartbeatDate = n, i.length > 0 ? (this._heartbeatsCache.heartbeats = i, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), a;
6267
6273
  } catch (n) {
6268
6274
  return wt.warn(n), "";
6269
6275
  }
6270
6276
  }
6271
6277
  }
6272
- function Ui() {
6278
+ function Ni() {
6273
6279
  return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
6274
6280
  }
6275
6281
  function Pm(e, t = Om) {
@@ -6278,14 +6284,14 @@ function Pm(e, t = Om) {
6278
6284
  for (const i of e) {
6279
6285
  const a = n.find((r) => r.agent === i.agent);
6280
6286
  if (a) {
6281
- if (a.dates.push(i.date), Ni(n) > t) {
6287
+ if (a.dates.push(i.date), Bi(n) > t) {
6282
6288
  a.dates.pop();
6283
6289
  break;
6284
6290
  }
6285
6291
  } else if (n.push({
6286
6292
  agent: i.agent,
6287
6293
  dates: [i.date]
6288
- }), Ni(n) > t) {
6294
+ }), Bi(n) > t) {
6289
6295
  n.pop();
6290
6296
  break;
6291
6297
  }
@@ -6318,7 +6324,7 @@ class Fm {
6318
6324
  var n;
6319
6325
  if (await this._canUseIndexedDBPromise) {
6320
6326
  const i = await this.read();
6321
- return zi(this.app, {
6327
+ return Ui(this.app, {
6322
6328
  lastSentHeartbeatDate: (n = t.lastSentHeartbeatDate) !== null && n !== void 0 ? n : i.lastSentHeartbeatDate,
6323
6329
  heartbeats: t.heartbeats
6324
6330
  });
@@ -6330,7 +6336,7 @@ class Fm {
6330
6336
  var n;
6331
6337
  if (await this._canUseIndexedDBPromise) {
6332
6338
  const i = await this.read();
6333
- return zi(this.app, {
6339
+ return Ui(this.app, {
6334
6340
  lastSentHeartbeatDate: (n = t.lastSentHeartbeatDate) !== null && n !== void 0 ? n : i.lastSentHeartbeatDate,
6335
6341
  heartbeats: [
6336
6342
  ...i.heartbeats,
@@ -6341,7 +6347,7 @@ class Fm {
6341
6347
  return;
6342
6348
  }
6343
6349
  }
6344
- function Ni(e) {
6350
+ function Bi(e) {
6345
6351
  return Pn(
6346
6352
  // heartbeatsCache wrapper properties
6347
6353
  JSON.stringify({ version: 2, heartbeats: e })
@@ -6374,7 +6380,7 @@ function Vm(e) {
6374
6380
  (t) => new Dm(t),
6375
6381
  "PRIVATE"
6376
6382
  /* ComponentType.PRIVATE */
6377
- )), an(Eo, Vi, e), an(Eo, Vi, "esm2017"), an("fire-js", "");
6383
+ )), an($o, Mi, e), an($o, Mi, "esm2017"), an("fire-js", "");
6378
6384
  }
6379
6385
  Vm("");
6380
6386
  /**
@@ -6450,7 +6456,7 @@ var Ve;
6450
6456
  function po(e) {
6451
6457
  return "storage/" + e;
6452
6458
  }
6453
- function qo() {
6459
+ function Xo() {
6454
6460
  const e = "An unknown error occurred, please check the error payload for server response.";
6455
6461
  return new Me(Ve.UNKNOWN, e);
6456
6462
  }
@@ -6494,7 +6500,7 @@ function Xm() {
6494
6500
  function Zm(e) {
6495
6501
  return new Me(Ve.UNSUPPORTED_ENVIRONMENT, `${e} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);
6496
6502
  }
6497
- function Do(e) {
6503
+ function Fo(e) {
6498
6504
  return new Me(Ve.INVALID_ARGUMENT, e);
6499
6505
  }
6500
6506
  function Ya() {
@@ -6579,9 +6585,9 @@ class tt {
6579
6585
  for (let j = 0; j < S.length; j++) {
6580
6586
  const I = S[j], T = I.regex.exec(t);
6581
6587
  if (T) {
6582
- const x = T[I.indices.bucket];
6588
+ const A = T[I.indices.bucket];
6583
6589
  let U = T[I.indices.path];
6584
- U || (U = ""), o = new tt(x, U), I.postModify(o);
6590
+ U || (U = ""), o = new tt(A, U), I.postModify(o);
6585
6591
  break;
6586
6592
  }
6587
6593
  }
@@ -6685,20 +6691,20 @@ function np(e) {
6685
6691
  function op(e) {
6686
6692
  return typeof e == "object" && !Array.isArray(e);
6687
6693
  }
6688
- function Yo(e) {
6694
+ function Zo(e) {
6689
6695
  return typeof e == "string" || e instanceof String;
6690
6696
  }
6691
- function Bi(e) {
6692
- return Xo() && e instanceof Blob;
6697
+ function Li(e) {
6698
+ return Qo() && e instanceof Blob;
6693
6699
  }
6694
- function Xo() {
6700
+ function Qo() {
6695
6701
  return typeof Blob < "u";
6696
6702
  }
6697
- function Li(e, t, n, o) {
6703
+ function ji(e, t, n, o) {
6698
6704
  if (o < t)
6699
- throw Do(`Invalid value for '${e}'. Expected ${t} or greater.`);
6705
+ throw Fo(`Invalid value for '${e}'. Expected ${t} or greater.`);
6700
6706
  if (o > n)
6701
- throw Do(`Invalid value for '${e}'. Expected ${n} or less.`);
6707
+ throw Fo(`Invalid value for '${e}'. Expected ${n} or less.`);
6702
6708
  }
6703
6709
  /**
6704
6710
  * @license
@@ -6817,7 +6823,7 @@ class ap {
6817
6823
  r(s);
6818
6824
  }
6819
6825
  else if (l !== null) {
6820
- const s = qo();
6826
+ const s = Xo();
6821
6827
  s.serverResponse = l.getErrorText(), this.errorCallback_ ? r(this.errorCallback_(l, s)) : r(s);
6822
6828
  } else if (i.canceled) {
6823
6829
  const s = this.appDelete_ ? Ya() : Wm();
@@ -6886,7 +6892,7 @@ function mp(...e) {
6886
6892
  n.append(e[o]);
6887
6893
  return n.getBlob();
6888
6894
  } else {
6889
- if (Xo())
6895
+ if (Qo())
6890
6896
  return new Blob(e);
6891
6897
  throw new Me(Ve.UNSUPPORTED_ENVIRONMENT, "This browser doesn't seem to support creating Blobs");
6892
6898
  }
@@ -6980,7 +6986,7 @@ function hp(e, t) {
6980
6986
  case pt.DATA_URL:
6981
6987
  return new fo(vp(t), bp(t));
6982
6988
  }
6983
- throw qo();
6989
+ throw Xo();
6984
6990
  }
6985
6991
  function Za(e) {
6986
6992
  const t = [];
@@ -7077,7 +7083,7 @@ function yp(e, t) {
7077
7083
  class xt {
7078
7084
  constructor(t, n) {
7079
7085
  let o = 0, i = "";
7080
- Bi(t) ? (this.data_ = t, o = t.size, i = t.type) : t instanceof ArrayBuffer ? (n ? this.data_ = new Uint8Array(t) : (this.data_ = new Uint8Array(t.byteLength), this.data_.set(new Uint8Array(t))), o = this.data_.length) : t instanceof Uint8Array && (n ? this.data_ = t : (this.data_ = new Uint8Array(t.length), this.data_.set(t)), o = t.length), this.size_ = o, this.type_ = i;
7086
+ Li(t) ? (this.data_ = t, o = t.size, i = t.type) : t instanceof ArrayBuffer ? (n ? this.data_ = new Uint8Array(t) : (this.data_ = new Uint8Array(t.byteLength), this.data_.set(new Uint8Array(t))), o = this.data_.length) : t instanceof Uint8Array && (n ? this.data_ = t : (this.data_ = new Uint8Array(t.length), this.data_.set(t)), o = t.length), this.size_ = o, this.type_ = i;
7081
7087
  }
7082
7088
  size() {
7083
7089
  return this.size_;
@@ -7086,7 +7092,7 @@ class xt {
7086
7092
  return this.type_;
7087
7093
  }
7088
7094
  slice(t, n) {
7089
- if (Bi(this.data_)) {
7095
+ if (Li(this.data_)) {
7090
7096
  const o = this.data_, i = pp(o, t, n);
7091
7097
  return i === null ? null : new xt(i);
7092
7098
  } else {
@@ -7095,11 +7101,11 @@ class xt {
7095
7101
  }
7096
7102
  }
7097
7103
  static getBlob(...t) {
7098
- if (Xo()) {
7104
+ if (Qo()) {
7099
7105
  const n = t.map((o) => o instanceof xt ? o.data_ : o);
7100
7106
  return new xt(mp.apply(null, n));
7101
7107
  } else {
7102
- const n = t.map((r) => Yo(r) ? hp(pt.RAW, r).data : r.data_);
7108
+ const n = t.map((r) => Zo(r) ? hp(pt.RAW, r).data : r.data_);
7103
7109
  let o = 0;
7104
7110
  n.forEach((r) => {
7105
7111
  o += r.byteLength;
@@ -7197,7 +7203,7 @@ class Xe {
7197
7203
  }
7198
7204
  let wn = null;
7199
7205
  function Cp(e) {
7200
- return !Yo(e) || e.length < 2 ? e : tr(e);
7206
+ return !Zo(e) || e.length < 2 ? e : tr(e);
7201
7207
  }
7202
7208
  function nr() {
7203
7209
  if (wn)
@@ -7238,7 +7244,7 @@ function or(e, t, n) {
7238
7244
  }
7239
7245
  function Ap(e, t, n, o) {
7240
7246
  const i = er(t);
7241
- if (i === null || !Yo(i.downloadTokens))
7247
+ if (i === null || !Zo(i.downloadTokens))
7242
7248
  return null;
7243
7249
  const a = i.downloadTokens;
7244
7250
  if (a.length === 0)
@@ -7260,7 +7266,7 @@ function Tp(e, t) {
7260
7266
  }
7261
7267
  return JSON.stringify(n);
7262
7268
  }
7263
- class Zo {
7269
+ class Jo {
7264
7270
  constructor(t, n, o, i) {
7265
7271
  this.url = t, this.method = n, this.handler = o, this.timeout = i, this.urlParams = {}, this.headers = {}, this.body = null, this.errorHandler = null, this.progressCallback = null, this.successCodes = [200], this.additionalRetryCodes = [];
7266
7272
  }
@@ -7283,7 +7289,7 @@ class Zo {
7283
7289
  */
7284
7290
  function ir(e) {
7285
7291
  if (!e)
7286
- throw qo();
7292
+ throw Xo();
7287
7293
  }
7288
7294
  function Rp(e, t) {
7289
7295
  function n(o, i) {
@@ -7315,14 +7321,14 @@ function rr(e) {
7315
7321
  return n;
7316
7322
  }
7317
7323
  function Ep(e, t, n) {
7318
- const o = t.fullServerUrl(), i = jn(o, e.host, e._protocol), a = "GET", r = e.maxOperationRetryTime, l = new Zo(i, a, Ip(e, n), r);
7324
+ const o = t.fullServerUrl(), i = jn(o, e.host, e._protocol), a = "GET", r = e.maxOperationRetryTime, l = new Jo(i, a, Ip(e, n), r);
7319
7325
  return l.errorHandler = rr(t), l;
7320
7326
  }
7321
7327
  function Op(e, t) {
7322
7328
  const n = t.fullServerUrl(), o = jn(n, e.host, e._protocol), i = "DELETE", a = e.maxOperationRetryTime;
7323
7329
  function r(s, u) {
7324
7330
  }
7325
- const l = new Zo(o, i, r, a);
7331
+ const l = new Jo(o, i, r, a);
7326
7332
  return l.successCodes = [200, 204], l.errorHandler = rr(t), l;
7327
7333
  }
7328
7334
  function $p(e, t) {
@@ -7355,8 +7361,8 @@ Content-Type: ` + u.contentType + `\r
7355
7361
  --` + s + "--", f = xt.getBlob(c, o, p);
7356
7362
  if (f === null)
7357
7363
  throw Ym();
7358
- const g = { name: u.fullPath }, k = jn(a, e.host, e._protocol), b = "POST", v = e.maxUploadRetryTime, A = new Zo(k, b, Rp(e, n), v);
7359
- return A.urlParams = g, A.headers = r, A.body = f.uploadData(), A.errorHandler = ar(t), A;
7364
+ const g = { name: u.fullPath }, k = jn(a, e.host, e._protocol), b = "POST", v = e.maxUploadRetryTime, x = new Jo(k, b, Rp(e, n), v);
7365
+ return x.urlParams = g, x.headers = r, x.body = f.uploadData(), x.errorHandler = ar(t), x;
7360
7366
  }
7361
7367
  class Fp {
7362
7368
  constructor() {
@@ -7421,7 +7427,7 @@ class Vp extends Fp {
7421
7427
  this.xhr_.responseType = "text";
7422
7428
  }
7423
7429
  }
7424
- function Qo() {
7430
+ function ei() {
7425
7431
  return new Vp();
7426
7432
  }
7427
7433
  /**
@@ -7509,7 +7515,7 @@ class zt {
7509
7515
  function Mp(e, t, n) {
7510
7516
  e._throwIfRoot("uploadBytes");
7511
7517
  const o = Pp(e.storage, e._location, nr(), new xt(t, !0), n);
7512
- return e.storage.makeRequestWithTokens(o, Qo).then((i) => ({
7518
+ return e.storage.makeRequestWithTokens(o, ei).then((i) => ({
7513
7519
  metadata: i,
7514
7520
  ref: e
7515
7521
  }));
@@ -7517,7 +7523,7 @@ function Mp(e, t, n) {
7517
7523
  function zp(e) {
7518
7524
  e._throwIfRoot("getDownloadURL");
7519
7525
  const t = Ep(e.storage, e._location, nr());
7520
- return e.storage.makeRequestWithTokens(t, Qo).then((n) => {
7526
+ return e.storage.makeRequestWithTokens(t, ei).then((n) => {
7521
7527
  if (n === null)
7522
7528
  throw Xm();
7523
7529
  return n;
@@ -7526,7 +7532,7 @@ function zp(e) {
7526
7532
  function Up(e) {
7527
7533
  e._throwIfRoot("deleteObject");
7528
7534
  const t = Op(e.storage, e._location);
7529
- return e.storage.makeRequestWithTokens(t, Qo);
7535
+ return e.storage.makeRequestWithTokens(t, ei);
7530
7536
  }
7531
7537
  function Np(e, t) {
7532
7538
  const n = wp(e._location.path, t), o = new tt(e._location.bucket, n);
@@ -7555,7 +7561,7 @@ function Lp(e, t) {
7555
7561
  return new zt(e, t);
7556
7562
  }
7557
7563
  function sr(e, t) {
7558
- if (e instanceof Jo) {
7564
+ if (e instanceof ti) {
7559
7565
  const n = e;
7560
7566
  if (n._bucket == null)
7561
7567
  throw qm();
@@ -7566,13 +7572,13 @@ function sr(e, t) {
7566
7572
  }
7567
7573
  function jp(e, t) {
7568
7574
  if (t && Bp(t)) {
7569
- if (e instanceof Jo)
7575
+ if (e instanceof ti)
7570
7576
  return Lp(e, t);
7571
- throw Do("To use ref(service, url), the first argument must be a Storage instance.");
7577
+ throw Fo("To use ref(service, url), the first argument must be a Storage instance.");
7572
7578
  } else
7573
7579
  return sr(e, t);
7574
7580
  }
7575
- function ji(e, t) {
7581
+ function Gi(e, t) {
7576
7582
  const n = t == null ? void 0 : t[qa];
7577
7583
  return n == null ? null : tt.makeFromBucketSpec(n, e);
7578
7584
  }
@@ -7581,9 +7587,9 @@ function Gp(e, t, n, o = {}) {
7581
7587
  const { mockUserToken: i } = o;
7582
7588
  i && (e._overrideAuthToken = typeof i == "string" ? i : vd(i, e.app.options.projectId));
7583
7589
  }
7584
- class Jo {
7590
+ class ti {
7585
7591
  constructor(t, n, o, i, a) {
7586
- this.app = t, this._authProvider = n, this._appCheckProvider = o, this._url = i, this._firebaseVersion = a, this._bucket = null, this._host = Ka, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = Mm, this._maxUploadRetryTime = zm, this._requests = /* @__PURE__ */ new Set(), i != null ? this._bucket = tt.makeFromBucketSpec(i, this._host) : this._bucket = ji(this._host, this.app.options);
7592
+ this.app = t, this._authProvider = n, this._appCheckProvider = o, this._url = i, this._firebaseVersion = a, this._bucket = null, this._host = Ka, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = Mm, this._maxUploadRetryTime = zm, this._requests = /* @__PURE__ */ new Set(), i != null ? this._bucket = tt.makeFromBucketSpec(i, this._host) : this._bucket = Gi(this._host, this.app.options);
7587
7593
  }
7588
7594
  /**
7589
7595
  * The host string for this service, in the form of `host` or
@@ -7593,7 +7599,7 @@ class Jo {
7593
7599
  return this._host;
7594
7600
  }
7595
7601
  set host(t) {
7596
- this._host = t, this._url != null ? this._bucket = tt.makeFromBucketSpec(this._url, t) : this._bucket = ji(t, this.app.options);
7602
+ this._host = t, this._url != null ? this._bucket = tt.makeFromBucketSpec(this._url, t) : this._bucket = Gi(t, this.app.options);
7597
7603
  }
7598
7604
  /**
7599
7605
  * The maximum time to retry uploads in milliseconds.
@@ -7602,7 +7608,7 @@ class Jo {
7602
7608
  return this._maxUploadRetryTime;
7603
7609
  }
7604
7610
  set maxUploadRetryTime(t) {
7605
- Li(
7611
+ ji(
7606
7612
  "time",
7607
7613
  /* minValue=*/
7608
7614
  0,
@@ -7619,7 +7625,7 @@ class Jo {
7619
7625
  return this._maxOperationRetryTime;
7620
7626
  }
7621
7627
  set maxOperationRetryTime(t) {
7622
- Li(
7628
+ ji(
7623
7629
  "time",
7624
7630
  /* minValue=*/
7625
7631
  0,
@@ -7676,7 +7682,7 @@ class Jo {
7676
7682
  return this._makeRequest(t, n, o, i).getPromise();
7677
7683
  }
7678
7684
  }
7679
- const Gi = "@firebase/storage", Wi = "0.13.2";
7685
+ const Wi = "@firebase/storage", Hi = "0.13.2";
7680
7686
  /**
7681
7687
  * @license
7682
7688
  * Copyright 2020 Google LLC
@@ -7703,10 +7709,10 @@ function Hp(e) {
7703
7709
  function Kp(e) {
7704
7710
  return e = pn(e), Up(e);
7705
7711
  }
7706
- function Hi(e, t) {
7712
+ function Ki(e, t) {
7707
7713
  return e = pn(e), jp(e, t);
7708
7714
  }
7709
- function Ki(e = Tm(), t) {
7715
+ function qi(e = Tm(), t) {
7710
7716
  e = pn(e);
7711
7717
  const o = km(e, lr).getImmediate({
7712
7718
  identifier: t
@@ -7718,7 +7724,7 @@ function qp(e, t, n, o = {}) {
7718
7724
  }
7719
7725
  function Yp(e, { instanceIdentifier: t }) {
7720
7726
  const n = e.getProvider("app").getImmediate(), o = e.getProvider("auth-internal"), i = e.getProvider("app-check-internal");
7721
- return new Jo(n, o, i, t, xm);
7727
+ return new ti(n, o, i, t, xm);
7722
7728
  }
7723
7729
  function Xp() {
7724
7730
  Fn(new un(
@@ -7726,20 +7732,20 @@ function Xp() {
7726
7732
  Yp,
7727
7733
  "PUBLIC"
7728
7734
  /* ComponentType.PUBLIC */
7729
- ).setMultipleInstances(!0)), an(Gi, Wi, ""), an(Gi, Wi, "esm2017");
7735
+ ).setMultipleInstances(!0)), an(Wi, Hi, ""), an(Wi, Hi, "esm2017");
7730
7736
  }
7731
7737
  Xp();
7732
- const qi = {
7738
+ const Yi = {
7733
7739
  async update(e, t, n) {
7734
- const o = Ki(void 0, n), i = Hi(o, e);
7740
+ const o = qi(void 0, n), i = Ki(o, e);
7735
7741
  return await Wp(i, t), Hp(i);
7736
7742
  },
7737
7743
  async delete(e, t) {
7738
- const n = Ki(void 0, t), o = Hi(n, e);
7744
+ const n = qi(void 0, t), o = Ki(n, e);
7739
7745
  await Kp(o);
7740
7746
  }
7741
7747
  };
7742
- var Yi = { firebase: { storageBucket: "image.feedmedev.cc" } };
7748
+ var Xi = { firebase: { storageBucket: "image.feedmedev.cc" } };
7743
7749
  const Zp = {
7744
7750
  class: "fm-typo-en-title-md-600"
7745
7751
  }, Qp = {
@@ -7775,12 +7781,12 @@ const Zp = {
7775
7781
  t: u
7776
7782
  } = ke(), d = W(!1), c = W(!1), p = W(!1), f = W(void 0), g = W(null), k = (K) => {
7777
7783
  Bt.isBoolean(K) ? c.value = K : c.value = !c.value;
7778
- }, b = R(() => !n.initialValue.id && n.initialValue.name === "Addon"), v = W($n(n.initialValue)), A = R(() => !v.value.id && !b.value), S = W(""), j = R(() => {
7784
+ }, b = R(() => !n.initialValue.id && n.initialValue.name === "Addon"), v = W($n(n.initialValue)), x = R(() => !v.value.id && !b.value), S = W(""), j = R(() => {
7779
7785
  var ce;
7780
7786
  if (!v.value.id && !b.value)
7781
7787
  return [];
7782
7788
  const K = ((ce = s.value.find((Z) => Z.id === v.value.id)) == null ? void 0 : ce.items) || [], le = Kr(v.value.id);
7783
- return ea(K, (Z) => Z.code || Z.name, le);
7789
+ return ta(K, (Z) => Z.code || Z.name, le);
7784
7790
  }), I = [{
7785
7791
  accessorKey: "name",
7786
7792
  header: () => u("menu.category.products.columns.name"),
@@ -7807,16 +7813,16 @@ const Zp = {
7807
7813
  variant: "tertiary",
7808
7814
  textColor: "neutral-gray-400",
7809
7815
  onClick: it(async () => {
7810
- await x(le);
7816
+ await A(le);
7811
7817
  }, ["stop", "prevent"])
7812
7818
  })]);
7813
7819
  }
7814
7820
  }];
7815
7821
  async function T() {
7816
- A.value || await l.create(v.value.id);
7822
+ x.value || await l.create(v.value.id);
7817
7823
  }
7818
- async function x(K) {
7819
- A.value || await l.update(K._id);
7824
+ async function A(K) {
7825
+ x.value || await l.update(K._id);
7820
7826
  }
7821
7827
  const U = R(() => r.version === It.enum.v4);
7822
7828
  async function F(K) {
@@ -7845,7 +7851,7 @@ const Zp = {
7845
7851
  v.value.name = K;
7846
7852
  }
7847
7853
  const Q = Xt(() => {
7848
- if (A.value)
7854
+ if (x.value)
7849
7855
  return !!v.value.name || !!(f.value && Object.keys(f.value).length > 0);
7850
7856
  const K = r.categories.find((O) => O._id === v.value.id), le = v.value.name !== (K == null ? void 0 : K.name), ce = (K == null ? void 0 : K.name_locale) || {}, Z = f.value || {}, ge = JSON.stringify(ce) !== JSON.stringify(Z), he = !!g.value || g.value === null && !!(K != null && K.thumbnail);
7851
7857
  return le || ge || he;
@@ -7856,11 +7862,11 @@ const Zp = {
7856
7862
  const {
7857
7863
  updateMenu: K
7858
7864
  } = a, le = f.value;
7859
- if (A.value) {
7865
+ if (x.value) {
7860
7866
  let ce = "";
7861
7867
  if (g.value) {
7862
- const Z = `temp_${Date.now()}`, ge = bi(Z);
7863
- await qi.update(ge, g.value, Yi.firebase.storageBucket), ce = pi(ge);
7868
+ const Z = `temp_${Date.now()}`, ge = yi(Z);
7869
+ await Yi.update(ge, g.value, Xi.firebase.storageBucket), ce = fi(ge);
7864
7870
  }
7865
7871
  await K({
7866
7872
  module: Be.enum.category,
@@ -7878,8 +7884,8 @@ const Zp = {
7878
7884
  const ce = r.categories.find((ge) => ge._id === v.value.id);
7879
7885
  let Z = (ce == null ? void 0 : ce.thumbnail) || "";
7880
7886
  if (g.value) {
7881
- const ge = bi(v.value.id || void 0);
7882
- await qi.update(ge, g.value, Yi.firebase.storageBucket), Z = pi(ge);
7887
+ const ge = yi(v.value.id || void 0);
7888
+ await Yi.update(ge, g.value, Xi.firebase.storageBucket), Z = fi(ge);
7883
7889
  } else g.value === null && (ce != null && ce.thumbnail) && (Z = "");
7884
7890
  await K({
7885
7891
  module: Be.enum.category,
@@ -7923,10 +7929,10 @@ const Zp = {
7923
7929
  "max-width": 560,
7924
7930
  "onOn:clickedAway": m(Q)
7925
7931
  }, {
7926
- "side-sheet-header": M(() => [_("p", Zp, oe(A.value ? m(u)("menu.category.manager.dialog.add.title") : m(u)("menu.category.title")), 1)]),
7932
+ "side-sheet-header": M(() => [_("p", Zp, oe(x.value ? m(u)("menu.category.manager.dialog.add.title") : m(u)("menu.category.title")), 1)]),
7927
7933
  "side-sheet-footer": M(() => [_("div", rf, [b.value ? te("", !0) : (y(), ee(ce, {
7928
7934
  key: 0,
7929
- label: A.value ? m(u)("menu.category.manager.dialog.add.action") : m(u)("menu.common.actions.update"),
7935
+ label: x.value ? m(u)("menu.category.manager.dialog.add.action") : m(u)("menu.common.actions.update"),
7930
7936
  loading: d.value,
7931
7937
  size: "lg",
7932
7938
  type: "submit",
@@ -7977,7 +7983,7 @@ const Zp = {
7977
7983
  class: "flex-1 min-h-0",
7978
7984
  shrinkable: !0
7979
7985
  }, {
7980
- "append-title": M(() => [A.value ? (y(), ee(Z, {
7986
+ "append-title": M(() => [x.value ? (y(), ee(Z, {
7981
7987
  key: 0,
7982
7988
  placement: "top",
7983
7989
  "z-index": 999
@@ -8010,7 +8016,7 @@ const Zp = {
8010
8016
  "onUpdate:modelValue": le[4] || (le[4] = (pe) => S.value = pe)
8011
8017
  }, null, 8, ["placeholder", "modelValue"])])]), _("div", af, [h(J, {
8012
8018
  "column-defs": I,
8013
- draggable: U.value && !A.value,
8019
+ draggable: U.value && !x.value,
8014
8020
  "page-size": j.value.length,
8015
8021
  "row-data": j.value,
8016
8022
  "search-value": S.value,
@@ -8018,12 +8024,12 @@ const Zp = {
8018
8024
  "hide-footer": "",
8019
8025
  "pin-header-row": "",
8020
8026
  onDndChanged: F,
8021
- onRowClick: le[5] || (le[5] = (pe) => x(pe.original))
8027
+ onRowClick: le[5] || (le[5] = (pe) => A(pe.original))
8022
8028
  }, null, 8, ["draggable", "page-size", "row-data", "search-value"])])]),
8023
8029
  _: 1
8024
8030
  }, 8, ["title"])])]),
8025
8031
  _: 1
8026
- }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]), h(Uo, {
8032
+ }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]), h(Bo, {
8027
8033
  modelValue: p.value,
8028
8034
  "onUpdate:modelValue": le[8] || (le[8] = (pe) => p.value = pe),
8029
8035
  title: m(u)("menu.category.title"),
@@ -8067,9 +8073,9 @@ const Zp = {
8067
8073
  p(), l("primary");
8068
8074
  }
8069
8075
  return (g, k) => {
8070
- const b = z("fm-button"), v = z("fm-text-field"), A = z("FmForm");
8076
+ const b = z("fm-button"), v = z("fm-text-field"), x = z("FmForm");
8071
8077
  return y(), q(Ce, null, [
8072
- h(A, { onValidationSuccess: f }, {
8078
+ h(x, { onValidationSuccess: f }, {
8073
8079
  default: M(() => [
8074
8080
  h(v, {
8075
8081
  modelValue: i.value,
@@ -8092,7 +8098,7 @@ const Zp = {
8092
8098
  ]),
8093
8099
  _: 1
8094
8100
  }),
8095
- h(Uo, {
8101
+ h(Bo, {
8096
8102
  modelValue: o.value,
8097
8103
  "onUpdate:modelValue": k[2] || (k[2] = (S) => o.value = S),
8098
8104
  title: m(n)("menu.category.title"),
@@ -8108,7 +8114,7 @@ const Zp = {
8108
8114
  dialog: e,
8109
8115
  menuLoader: t
8110
8116
  }) => {
8111
- const { t: n } = ke(), o = zo();
8117
+ const { t: n } = ke(), o = No();
8112
8118
  function i() {
8113
8119
  var d, c, p;
8114
8120
  if (!o) throw new Error("No current instance found");
@@ -8202,7 +8208,7 @@ const Zp = {
8202
8208
  rearrange: l
8203
8209
  };
8204
8210
  };
8205
- function Po(e, t) {
8211
+ function Vo(e, t) {
8206
8212
  const n = t ? void 0 : "";
8207
8213
  return (e == null ? void 0 : e.trim()) || n;
8208
8214
  }
@@ -8288,7 +8294,7 @@ const xf = /* @__PURE__ */ ye({
8288
8294
  value: B.id
8289
8295
  }));
8290
8296
  return n.isAddon ? D : D.filter((B) => !!B.value);
8291
- }), A = R(() => p.value.addon), S = R(() => !v.value.find((D) => !!D.value)), j = R(() => Tn(n.form.category ? n.form : n.fallback) || []), I = R(() => j.value.reduce((D, B) => (D[B._id] = B, D), {})), T = R({
8297
+ }), x = R(() => p.value.addon), S = R(() => !v.value.find((D) => !!D.value)), j = R(() => Tn(n.form.category ? n.form : n.fallback) || []), I = R(() => j.value.reduce((D, B) => (D[B._id] = B, D), {})), T = R({
8292
8298
  get() {
8293
8299
  return j.value.map((D) => D._id);
8294
8300
  },
@@ -8306,10 +8312,10 @@ const xf = /* @__PURE__ */ ye({
8306
8312
  }
8307
8313
  c("update:form", "category", B._id), c("update:form", "additionalCategories", X);
8308
8314
  }
8309
- }), x = W(), U = ({
8315
+ }), A = W(), U = ({
8310
8316
  multiple: D = !0
8311
8317
  } = {}) => n.isAddon ? null : h(nl, {
8312
- ref: x,
8318
+ ref: A,
8313
8319
  disabled: !p.value.category || n.isAddon || d(),
8314
8320
  items: v.value,
8315
8321
  modelValue: T.value,
@@ -8322,7 +8328,7 @@ const xf = /* @__PURE__ */ ye({
8322
8328
  type: "button",
8323
8329
  onClick: () => {
8324
8330
  var B;
8325
- (B = x.value) == null || B.hideMenu(), u.create();
8331
+ (B = A.value) == null || B.hideMenu(), u.create();
8326
8332
  }
8327
8333
  }, [h(Oe.FmIcon, {
8328
8334
  color: "primary",
@@ -8458,7 +8464,7 @@ const xf = /* @__PURE__ */ ye({
8458
8464
  title: m(Z)("menu.product.form.detail.title")
8459
8465
  }, {
8460
8466
  default: M(() => {
8461
- var Et, Lt, Jt, ni, oi;
8467
+ var Et, Lt, Jt, ii, ai;
8462
8468
  return [_("div", cf, [_("div", df, [_("div", mf, [h(X, {
8463
8469
  "model-value": D.form.code,
8464
8470
  placeholder: ((Et = D.fallback) == null ? void 0 : Et.code) || m(Z)("menu.product.form.detail.fields.code.placeholder"),
@@ -8469,7 +8475,7 @@ const xf = /* @__PURE__ */ ye({
8469
8475
  rules: [(we) => !H.value || w.value === 0 || m(Z)("menu.product.form.detail.fields.code.duplicate_warning", {
8470
8476
  count: w.value
8471
8477
  })],
8472
- "onUpdate:modelValue": B[0] || (B[0] = (we) => c("update:form", "code", m(Po)(we, D.isOverride)))
8478
+ "onUpdate:modelValue": B[0] || (B[0] = (we) => c("update:form", "code", m(Vo)(we, D.isOverride)))
8473
8479
  }, null, 8, ["model-value", "placeholder", "helper-text", "label", "rules"])]), _("div", pf, [h(X, {
8474
8480
  id: "product-name",
8475
8481
  disabled: !p.value.name,
@@ -8510,11 +8516,11 @@ const xf = /* @__PURE__ */ ye({
8510
8516
  "model-value": D.form.name2,
8511
8517
  placeholder: ((Jt = D.fallback) == null ? void 0 : Jt.name2) || m(Z)("menu.product.form.detail.fields.name2.placeholder"),
8512
8518
  label: m(Z)("menu.product.form.detail.fields.name2.label"),
8513
- "onUpdate:modelValue": B[2] || (B[2] = (we) => c("update:form", "name2", m(Po)(we, D.isOverride)))
8519
+ "onUpdate:modelValue": B[2] || (B[2] = (we) => c("update:form", "name2", m(Vo)(we, D.isOverride)))
8514
8520
  }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "label"]), _("div", hf, [h(ae, {
8515
8521
  disabled: !p.value.description,
8516
8522
  "model-value": D.form.description || void 0,
8517
- placeholder: ((ni = D.fallback) == null ? void 0 : ni.description) || m(Z)("menu.product.form.detail.fields.description.placeholder"),
8523
+ placeholder: ((ii = D.fallback) == null ? void 0 : ii.description) || m(Z)("menu.product.form.detail.fields.description.placeholder"),
8518
8524
  "onUpdate:modelValue": B[3] || (B[3] = (we) => c("update:form", "description", we.trim())),
8519
8525
  class: "description"
8520
8526
  }, {
@@ -8546,7 +8552,7 @@ const xf = /* @__PURE__ */ ye({
8546
8552
  "cover-only": f.value,
8547
8553
  disabled: !p.value.images && !f.value,
8548
8554
  "item-id": D.form._id || "",
8549
- "legacy-thumbnail": D.form.thumbnail ?? ((oi = D.fallback) == null ? void 0 : oi.thumbnail) ?? null,
8555
+ "legacy-thumbnail": D.form.thumbnail ?? ((ai = D.fallback) == null ? void 0 : ai.thumbnail) ?? null,
8550
8556
  "menu-items": m(o).state.menu.modules.item,
8551
8557
  "model-value": g.value,
8552
8558
  staged: D.staged,
@@ -8555,7 +8561,7 @@ const xf = /* @__PURE__ */ ye({
8555
8561
  }, null, 8, ["cover-only", "disabled", "item-id", "legacy-thumbnail", "menu-items", "model-value", "staged"])]), h(_t, {
8556
8562
  label: m(o).isV4 ? m(Z)("menu.product.form.detail.category.label") : m(Z)("menu.product.form.detail.category.label_singular")
8557
8563
  }, {
8558
- default: M(() => [A.value ? (y(), ee(fe, {
8564
+ default: M(() => [x.value ? (y(), ee(fe, {
8559
8565
  key: 0,
8560
8566
  disabled: !p.value.category,
8561
8567
  "model-value": $.value,
@@ -8622,7 +8628,7 @@ const xf = /* @__PURE__ */ ye({
8622
8628
  }, null, 8, ["label", "model-value", "rules"]), h(fl, {
8623
8629
  form: D.form,
8624
8630
  "onUpdate:orderQuantity": B[9] || (B[9] = (we) => c("update:form", "orderQuantity", we))
8625
- }, null, 8, ["form"])])) : te("", !0), h(No, {
8631
+ }, null, 8, ["form"])])) : te("", !0), h(Lo, {
8626
8632
  disabled: !p.value.orderFrom,
8627
8633
  "model-value": D.form.orderFrom,
8628
8634
  "order-from-none": p.value.orderFromNone,
@@ -8731,21 +8737,21 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8731
8737
  },
8732
8738
  emits: ["update:modelValue", "update:group"],
8733
8739
  setup(e, { emit: t }) {
8734
- const n = e, o = t, { t: i } = ke(), a = W(!1), r = W(!0), l = W([]), s = W([]), u = W({}), d = W({}), c = W({}), p = W({}), f = R(() => n.group.name_locale ? Object.entries(n.group.name_locale).map(([T, x]) => ({
8740
+ const n = e, o = t, { t: i } = ke(), a = W(!1), r = W(!0), l = W([]), s = W([]), u = W({}), d = W({}), c = W({}), p = W({}), f = R(() => n.group.name_locale ? Object.entries(n.group.name_locale).map(([T, A]) => ({
8735
8741
  localeCode: T,
8736
- localeName: bo(T),
8737
- value: x
8738
- })) : []), g = R(() => Object.values(n.group.items).map((T, x) => ({
8742
+ localeName: _o(T),
8743
+ value: A
8744
+ })) : []), g = R(() => Object.values(n.group.items).map((T, A) => ({
8739
8745
  ...T,
8740
- optionIndex: x + 1
8746
+ optionIndex: A + 1
8741
8747
  })));
8742
8748
  function k() {
8743
8749
  const T = /* @__PURE__ */ new Set();
8744
8750
  Object.values(n.group.items).forEach((G) => {
8745
8751
  G.name_locale && Object.keys(G.name_locale).forEach((H) => T.add(H));
8746
8752
  }), T.size === 0 && n.group.name_locale && Object.keys(n.group.name_locale).forEach((G) => T.add(G));
8747
- const x = Array.from(T);
8748
- l.value = x;
8753
+ const A = Array.from(T);
8754
+ l.value = A;
8749
8755
  const U = {}, F = {};
8750
8756
  Object.values(n.group.items).forEach((G) => {
8751
8757
  U[G._id] = {}, G.name_locale && Object.entries(G.name_locale).forEach(([H, w]) => {
@@ -8761,12 +8767,12 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8761
8767
  { immediate: !0, deep: !0 }
8762
8768
  );
8763
8769
  function b(T) {
8764
- const x = new Set(l.value), U = new Set(T);
8770
+ const A = new Set(l.value), U = new Set(T);
8765
8771
  for (const F of T)
8766
- x.has(F) || Object.keys(u.value).forEach((G) => {
8772
+ A.has(F) || Object.keys(u.value).forEach((G) => {
8767
8773
  u.value[G][F] || (u.value[G][F] = "");
8768
8774
  });
8769
- for (const F of x)
8775
+ for (const F of A)
8770
8776
  U.has(F) || Object.keys(u.value).forEach((G) => {
8771
8777
  delete u.value[G][F];
8772
8778
  });
@@ -8775,19 +8781,19 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8775
8781
  function v() {
8776
8782
  return !Fe.isEqual(l.value, s.value) || !Fe.isEqual(u.value, d.value) || !Fe.isEqual(c.value, p.value);
8777
8783
  }
8778
- function A() {
8784
+ function x() {
8779
8785
  const T = Fe.clone(n.group);
8780
- Object.keys(T.items).forEach((x) => {
8781
- const U = c.value[x];
8782
- U !== void 0 && (T.items[x].name = U || null);
8783
- const F = u.value[x];
8786
+ Object.keys(T.items).forEach((A) => {
8787
+ const U = c.value[A];
8788
+ U !== void 0 && (T.items[A].name = U || null);
8789
+ const F = u.value[A];
8784
8790
  if (F && Object.keys(F).length > 0) {
8785
8791
  const G = {};
8786
8792
  Object.entries(F).forEach(([H, w]) => {
8787
8793
  w && w.trim() && (G[H] = w.trim());
8788
- }), Object.keys(G).length > 0 ? T.items[x].name_locale = G : delete T.items[x].name_locale;
8794
+ }), Object.keys(G).length > 0 ? T.items[A].name_locale = G : delete T.items[A].name_locale;
8789
8795
  } else
8790
- delete T.items[x].name_locale;
8796
+ delete T.items[A].name_locale;
8791
8797
  }), o("update:group", T), o("update:modelValue", !1);
8792
8798
  }
8793
8799
  function S() {
@@ -8797,11 +8803,11 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8797
8803
  get: () => n.modelValue,
8798
8804
  set: (T) => o("update:modelValue", T)
8799
8805
  });
8800
- return (T, x) => {
8806
+ return (T, A) => {
8801
8807
  const U = z("FmIcon"), F = z("fm-button"), G = z("fm-side-sheet");
8802
8808
  return y(), ee(G, {
8803
8809
  modelValue: I.value,
8804
- "onUpdate:modelValue": x[2] || (x[2] = (H) => I.value = H),
8810
+ "onUpdate:modelValue": A[2] || (A[2] = (H) => I.value = H),
8805
8811
  "max-width": 720,
8806
8812
  "onOn:clickedAway": m(j)
8807
8813
  }, {
@@ -8814,7 +8820,7 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8814
8820
  label: m(i)("common.save"),
8815
8821
  size: "lg",
8816
8822
  variant: "primary",
8817
- onClick: A
8823
+ onClick: x
8818
8824
  }, null, 8, ["label"]),
8819
8825
  h(F, {
8820
8826
  label: m(i)("common.cancel"),
@@ -8834,7 +8840,7 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8834
8840
  _("div", zf, [
8835
8841
  _("div", {
8836
8842
  class: "flex items-center gap-16 cursor-pointer",
8837
- onClick: x[0] || (x[0] = (H) => a.value = !a.value)
8843
+ onClick: A[0] || (A[0] = (H) => a.value = !a.value)
8838
8844
  }, [
8839
8845
  h(U, {
8840
8846
  name: "keyboard_arrow_down",
@@ -8864,7 +8870,7 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8864
8870
  _("div", Lf, [
8865
8871
  _("div", {
8866
8872
  class: "flex items-center gap-16 cursor-pointer",
8867
- onClick: x[1] || (x[1] = (H) => r.value = !r.value)
8873
+ onClick: A[1] || (A[1] = (H) => r.value = !r.value)
8868
8874
  }, [
8869
8875
  h(U, {
8870
8876
  name: "keyboard_arrow_down",
@@ -8959,26 +8965,26 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8959
8965
  });
8960
8966
  function f(T) {
8961
8967
  var G, H;
8962
- const x = (G = s.value[d.value].groups) == null ? void 0 : G.findIndex(
8968
+ const A = (G = s.value[d.value].groups) == null ? void 0 : G.findIndex(
8963
8969
  (w) => w._id === o.groupId
8964
8970
  ), U = Te(s.value), F = { ...Dn(T), _id: o.groupId, groupKey: "" };
8965
- (x ?? -1) < 0 ? U[d.value] = {
8971
+ (A ?? -1) < 0 ? U[d.value] = {
8966
8972
  ...U[d.value],
8967
8973
  groups: [...((H = U[d.value]) == null ? void 0 : H.groups) || [], F]
8968
- } : U[d.value].groups[x] = F, s.value = U;
8974
+ } : U[d.value].groups[A] = F, s.value = U;
8969
8975
  }
8970
8976
  function g(T) {
8971
- const x = c.value.length;
8977
+ const A = c.value.length;
8972
8978
  let U = d.value;
8973
- T === "left" ? U = U === 0 ? x - 1 : U - 1 : U = U === x - 1 ? 0 : U + 1, u.value = c.value[U].value;
8979
+ T === "left" ? U = U === 0 ? A - 1 : U - 1 : U = U === A - 1 ? 0 : U + 1, u.value = c.value[U].value;
8974
8980
  }
8975
8981
  function k(T) {
8976
8982
  return {
8977
8983
  isV4: a.version === It.enum.v4,
8978
- isDefault: (x) => !0,
8979
- link: (x) => !1,
8980
- orderFrom: (x) => !0,
8981
- name: (x) => !1,
8984
+ isDefault: (A) => !0,
8985
+ link: (A) => !1,
8986
+ orderFrom: (A) => !0,
8987
+ name: (A) => !1,
8982
8988
  bindToVariant: !1,
8983
8989
  inventory: !0,
8984
8990
  orderFromActiveOnly: a.rules.item.orderFromActiveOnly,
@@ -8992,11 +8998,11 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
8992
8998
  };
8993
8999
  }
8994
9000
  function b() {
8995
- const T = s.value.map((x) => {
9001
+ const T = s.value.map((A) => {
8996
9002
  var U;
8997
9003
  return {
8998
- ...x,
8999
- groups: (U = x.groups) == null ? void 0 : U.map((F) => ({
9004
+ ...A,
9005
+ groups: (U = A.groups) == null ? void 0 : U.map((F) => ({
9000
9006
  ..._s(F, k())
9001
9007
  }))
9002
9008
  };
@@ -9010,26 +9016,26 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
9010
9016
  T && (s.value = Te(o.combinations), u.value = o.combinations[0].combinationKey || "");
9011
9017
  }
9012
9018
  );
9013
- const A = W();
9019
+ const x = W();
9014
9020
  t({
9015
- show: (j = A.value) == null ? void 0 : j.show,
9016
- trigger: (I = A.value) == null ? void 0 : I.trigger
9021
+ show: (j = x.value) == null ? void 0 : j.show,
9022
+ trigger: (I = x.value) == null ? void 0 : I.trigger
9017
9023
  });
9018
9024
  const { t: S } = ke();
9019
- return (T, x) => {
9025
+ return (T, A) => {
9020
9026
  const U = z("fm-select"), F = z("fm-button"), G = z("fm-card");
9021
9027
  return y(), ee(pr, {
9022
9028
  ref_key: "baseFormRef",
9023
- ref: A,
9029
+ ref: x,
9024
9030
  "allow-refund-inventory": !0,
9025
9031
  "categorized-items": m(a).categorizedItems,
9026
9032
  config: k,
9027
9033
  group: p.value,
9028
9034
  action: "update",
9029
9035
  title: m(S)("menu.group.update"),
9030
- "onUpdate:group": x[3] || (x[3] = (H) => f(H)),
9031
- "onSubmit:group": x[4] || (x[4] = (H) => b()),
9032
- "onStatus:show": x[5] || (x[5] = (H) => v.value = H)
9036
+ "onUpdate:group": A[3] || (A[3] = (H) => f(H)),
9037
+ "onSubmit:group": A[4] || (A[4] = (H) => b()),
9038
+ "onStatus:show": A[5] || (A[5] = (H) => v.value = H)
9033
9039
  }, {
9034
9040
  default: M(({ trigger: H }) => [
9035
9041
  $e(T.$slots, "default", { trigger: H })
@@ -9045,7 +9051,7 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
9045
9051
  _("div", Zf, [
9046
9052
  h(U, {
9047
9053
  modelValue: u.value,
9048
- "onUpdate:modelValue": x[0] || (x[0] = (H) => u.value = H),
9054
+ "onUpdate:modelValue": A[0] || (A[0] = (H) => u.value = H),
9049
9055
  items: c.value,
9050
9056
  class: "flex-1"
9051
9057
  }, null, 8, ["modelValue", "items"]),
@@ -9054,13 +9060,13 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
9054
9060
  variant: m(Ue).Tertiary,
9055
9061
  "prepend-icon": "keyboard_arrow_left",
9056
9062
  size: "lg",
9057
- onClick: x[1] || (x[1] = (H) => g("left"))
9063
+ onClick: A[1] || (A[1] = (H) => g("left"))
9058
9064
  }, null, 8, ["variant"]),
9059
9065
  h(F, {
9060
9066
  variant: m(Ue).Tertiary,
9061
9067
  "prepend-icon": "keyboard_arrow_right",
9062
9068
  size: "lg",
9063
- onClick: x[2] || (x[2] = (H) => g("right"))
9069
+ onClick: A[2] || (A[2] = (H) => g("right"))
9064
9070
  }, null, 8, ["variant"])
9065
9071
  ])
9066
9072
  ])
@@ -9105,10 +9111,10 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
9105
9111
  ), t({ getKey: () => o.bindingKey, trigger: a });
9106
9112
  const { t: c } = ke(), p = la();
9107
9113
  return (f, g) => {
9108
- const k = z("fm-text-field"), b = z("fm-card"), v = z("fm-button"), A = z("fm-side-sheet");
9114
+ const k = z("fm-text-field"), b = z("fm-card"), v = z("fm-button"), x = z("fm-side-sheet");
9109
9115
  return y(), q(Ce, null, [
9110
9116
  $e(f.$slots, "default", { trigger: a }),
9111
- h(A, {
9117
+ h(x, {
9112
9118
  id: "inventory-form",
9113
9119
  modelValue: i.value,
9114
9120
  "onUpdate:modelValue": g[2] || (g[2] = (S) => i.value = S),
@@ -9166,7 +9172,7 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
9166
9172
  ], 64);
9167
9173
  };
9168
9174
  }
9169
- }), Fo = nh, oh = {
9175
+ }), Mo = nh, oh = {
9170
9176
  class: "flex items-center gap-8"
9171
9177
  }, ih = {
9172
9178
  class: "grow"
@@ -9269,7 +9275,7 @@ const Ff = /* @__PURE__ */ kt($f, [["render", Pf]]), Vf = { class: "fm-typo-en-t
9269
9275
  }
9270
9276
  });
9271
9277
  function ph() {
9272
- const e = zo();
9278
+ const e = No();
9273
9279
  function t({
9274
9280
  component: n,
9275
9281
  props: o
@@ -9416,7 +9422,7 @@ const fh = {
9416
9422
  }), r.value = !1;
9417
9423
  }
9418
9424
  return (b, v) => {
9419
- const A = z("FmTable"), S = z("FmButton"), j = z("FmSideSheet"), I = Vt("tooltip");
9425
+ const x = z("FmTable"), S = z("FmButton"), j = z("FmSideSheet"), I = Vt("tooltip");
9420
9426
  return y(), q(Ce, null, [$e(b.$slots, "default", {
9421
9427
  trigger: u
9422
9428
  }), h(j, {
@@ -9460,7 +9466,7 @@ const fh = {
9460
9466
  onClick: c
9461
9467
  }, null, 512)), [[I, m(Ht)("Suggest pricing")]]) : te("", !0)]),
9462
9468
  _: 1
9463
- }, 8, ["modelValue", "placeholder", "label", "rules"])]), _("div", kh, [_("div", Ch, [_("p", Sh, oe(m(a)("menu.product.form.member_price.configure.member_selling_price.label")), 1), _("p", xh, oe(m(a)("menu.product.form.member_price.configure.member_selling_price.sublabel")), 1)]), h(A, {
9469
+ }, 8, ["modelValue", "placeholder", "label", "rules"])]), _("div", kh, [_("div", Ch, [_("p", Sh, oe(m(a)("menu.product.form.member_price.configure.member_selling_price.label")), 1), _("p", xh, oe(m(a)("menu.product.form.member_price.configure.member_selling_price.sublabel")), 1)]), h(x, {
9464
9470
  "column-defs": f,
9465
9471
  "row-data": g.value,
9466
9472
  "hide-footer": ""
@@ -9509,7 +9515,7 @@ const fh = {
9509
9515
  }
9510
9516
  }), dr = /* @__PURE__ */ ye({
9511
9517
  __name: "PriceTierForm",
9512
- props: /* @__PURE__ */ ii({
9518
+ props: /* @__PURE__ */ ri({
9513
9519
  priceTiers: {
9514
9520
  default: () => []
9515
9521
  },
@@ -9525,7 +9531,7 @@ const fh = {
9525
9531
  },
9526
9532
  modelModifiers: {}
9527
9533
  }),
9528
- emits: /* @__PURE__ */ ii(["update:priceTiersVariant"], ["update:modelValue"]),
9534
+ emits: /* @__PURE__ */ ri(["update:priceTiersVariant"], ["update:modelValue"]),
9529
9535
  setup(e, {
9530
9536
  emit: t
9531
9537
  }) {
@@ -9596,7 +9602,7 @@ const fh = {
9596
9602
  default: () => h("span", {
9597
9603
  class: "underline line-clamp-2 break-all"
9598
9604
  }, [g ? n("menu.product.form.member_price.configure.title") : n("menu.product.form.member_price.configure.title_with_tier", {
9599
- num: Object.values(f).filter((A) => A !== null).length
9605
+ num: Object.values(f).filter((x) => x !== null).length
9600
9606
  })])
9601
9607
  })
9602
9608
  }), h(Wn, {
@@ -9643,8 +9649,8 @@ const fh = {
9643
9649
  o("submit", g), a();
9644
9650
  }
9645
9651
  return (g, k) => {
9646
- const b = z("FmButton"), v = z("fm-button"), A = z("FmSideSheet");
9647
- return y(), ee(A, {
9652
+ const b = z("FmButton"), v = z("fm-button"), x = z("FmSideSheet");
9653
+ return y(), ee(x, {
9648
9654
  id: "business-form",
9649
9655
  modelValue: i.value,
9650
9656
  "onUpdate:modelValue": k[2] || (k[2] = (S) => i.value = S),
@@ -9762,7 +9768,7 @@ const fh = {
9762
9768
  };
9763
9769
  }
9764
9770
  });
9765
- function ei(e) {
9771
+ function ni(e) {
9766
9772
  if (!e) return null;
9767
9773
  const t = {};
9768
9774
  for (const [n, o] of Object.entries(e)) {
@@ -9773,7 +9779,7 @@ function ei(e) {
9773
9779
  }
9774
9780
  return Object.keys(t).length > 0 ? t : null;
9775
9781
  }
9776
- function ti(e) {
9782
+ function oi(e) {
9777
9783
  if (!e) return null;
9778
9784
  const t = {};
9779
9785
  for (const [n, o] of Object.entries(e))
@@ -9828,7 +9834,7 @@ const Nh = /* @__PURE__ */ ye({
9828
9834
  searchKey: f,
9829
9835
  filter: g
9830
9836
  } = ms(), k = R(() => {
9831
- const C = Object.entries(n.group.items).filter(([, E]) => g([E.code || "", E.name || E.fallbackName, A(E.price ?? E.fallbackPrice), S(E.orderFrom || E.fallbackOrder), ...(E.items || []).map((Y) => [Y.code || "", Y.name || Y.fallbackName, A(Y.price ?? Y.fallbackPrice), S(Y.orderFrom || Y.fallbackOrder)].join(""))]));
9837
+ const C = Object.entries(n.group.items).filter(([, E]) => g([E.code || "", E.name || E.fallbackName, x(E.price ?? E.fallbackPrice), S(E.orderFrom || E.fallbackOrder), ...(E.items || []).map((Y) => [Y.code || "", Y.name || Y.fallbackName, x(Y.price ?? Y.fallbackPrice), S(Y.orderFrom || Y.fallbackOrder)].join(""))]));
9832
9838
  return Object.fromEntries(C);
9833
9839
  }), b = (C) => ({
9834
9840
  ...n.config,
@@ -9836,12 +9842,12 @@ const Nh = /* @__PURE__ */ ye({
9836
9842
  link: n.config.link(C),
9837
9843
  name: n.config.name(C),
9838
9844
  orderFrom: n.config.orderFrom(C)
9839
- }), v = R(() => !0), A = (C) => C ? lt(C, !1) : "", S = (C) => {
9845
+ }), v = R(() => !0), x = (C) => C ? lt(C, !1) : "", S = (C) => {
9840
9846
  var E;
9841
9847
  return C == null ? "" : (E = Br()[C]) == null ? void 0 : E.label;
9842
9848
  }, j = R(() => Object.values(k.value)), I = W({}), {
9843
9849
  t: T
9844
- } = ke(), x = Mn(), U = W([{
9850
+ } = ke(), A = Mn(), U = W([{
9845
9851
  accessorKey: "isDefault",
9846
9852
  header: () => T("menu.group.option.is_default"),
9847
9853
  enableSorting: !1,
@@ -9899,7 +9905,7 @@ const Nh = /* @__PURE__ */ ye({
9899
9905
  enableSorting: !1,
9900
9906
  cell: (C) => {
9901
9907
  var D;
9902
- const E = C.getValue(), Y = C.row.original, ne = !b(Y.combinationKey).name || Y.orderFrom === Pe.enum.NONE, de = C.row.depth > 0, be = Y.combinationKey ? vo(Y.combinationKey, De().variants) : a.rules.group.linkAddonName ? (D = se.value[Y._id]) == null ? void 0 : D.name : null;
9908
+ const E = C.getValue(), Y = C.row.original, ne = !b(Y.combinationKey).name || Y.orderFrom === Pe.enum.NONE, de = C.row.depth > 0, be = Y.combinationKey ? yo(Y.combinationKey, De().variants) : a.rules.group.linkAddonName ? (D = se.value[Y._id]) == null ? void 0 : D.name : null;
9903
9909
  return ze("div", ze(Oe.FmTextField, {
9904
9910
  modelValue: E,
9905
9911
  placeholder: be ?? "",
@@ -9938,7 +9944,7 @@ const Nh = /* @__PURE__ */ ye({
9938
9944
  },
9939
9945
  size: 400,
9940
9946
  cell: (C) => {
9941
- const E = C.getValue(), Y = C.row.original, ne = !b(null).priceEdit || Y.orderFrom === Pe.enum.NONE, de = Y.fallbackPrice, be = C.row.depth > 0, D = x.getMemberPricingPriceVariant(Y.price_variant), B = Object.values(D).every((X) => X === null);
9947
+ const E = C.getValue(), Y = C.row.original, ne = !b(null).priceEdit || Y.orderFrom === Pe.enum.NONE, de = Y.fallbackPrice, be = C.row.depth > 0, D = A.getMemberPricingPriceVariant(Y.price_variant), B = Object.values(D).every((X) => X === null);
9942
9948
  return h("div", {
9943
9949
  class: "flex items-center gap-8"
9944
9950
  }, [h(yt, {
@@ -9978,7 +9984,7 @@ const Nh = /* @__PURE__ */ ye({
9978
9984
  var P;
9979
9985
  const ue = {
9980
9986
  price: X.basePrice,
9981
- price_variant: ti(X.priceVariants)
9987
+ price_variant: oi(X.priceVariants)
9982
9988
  };
9983
9989
  if (be) {
9984
9990
  const ae = (P = C.row.getParentRow()) == null ? void 0 : P.original;
@@ -10013,7 +10019,7 @@ const Nh = /* @__PURE__ */ ye({
10013
10019
  enableSorting: !1,
10014
10020
  cell: (C) => {
10015
10021
  const E = C.getValue(), Y = C.row.original, ne = Y.fallbackOrder, de = C.row.depth > 0;
10016
- return ze(No, {
10022
+ return ze(Lo, {
10017
10023
  modelValue: E,
10018
10024
  fallback: ne,
10019
10025
  disable: !b(Y.combinationKey).orderFrom,
@@ -10077,7 +10083,7 @@ const Nh = /* @__PURE__ */ ye({
10077
10083
  var X;
10078
10084
  const B = {
10079
10085
  priceTiers: D.priceTiers,
10080
- priceTiers_variant: ei(D.priceTiersVariant)
10086
+ priceTiers_variant: ni(D.priceTiersVariant)
10081
10087
  };
10082
10088
  if (ne) {
10083
10089
  const ue = (X = C.row.getParentRow()) == null ? void 0 : X.original;
@@ -10086,7 +10092,7 @@ const Nh = /* @__PURE__ */ ye({
10086
10092
  } else
10087
10093
  H(E._id, B);
10088
10094
  }
10089
- }, null), b(E.combinationKey).inventory && h(Fo, {
10095
+ }, null), b(E.combinationKey).inventory && h(Mo, {
10090
10096
  title: "Inventory",
10091
10097
  initialValue: E.inventoryBindings ?? [],
10092
10098
  name: E.name ?? E.fallbackName ?? "",
@@ -10260,7 +10266,7 @@ const Nh = /* @__PURE__ */ ye({
10260
10266
  }
10261
10267
  function Z(C) {
10262
10268
  var Y;
10263
- const E = C.combinationKey ? vo(C.combinationKey, a.variants) : (Y = se.value[C._id]) == null ? void 0 : Y.name;
10269
+ const E = C.combinationKey ? yo(C.combinationKey, a.variants) : (Y = se.value[C._id]) == null ? void 0 : Y.name;
10264
10270
  return C.name || C.fallbackName || E || "";
10265
10271
  }
10266
10272
  function ge(C) {
@@ -10452,7 +10458,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10452
10458
  () => o.group
10453
10459
  ), f = W(!1), g = W(!1), k = W(!1), b = (O) => {
10454
10460
  Bt.isBoolean(O) ? g.value = O : g.value = !g.value;
10455
- }, v = R(() => o.group ? o.config(o.group) : null), A = R(() => pa(v.value)), S = (O) => A.value.includes(O), j = R(() => [
10461
+ }, v = R(() => o.group ? o.config(o.group) : null), x = R(() => pa(v.value)), S = (O) => x.value.includes(O), j = R(() => [
10456
10462
  {
10457
10463
  label: "Normal",
10458
10464
  value: Re.enum.NORMAL
@@ -10475,9 +10481,9 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10475
10481
  name_locale: O
10476
10482
  });
10477
10483
  }
10478
- const x = W((he = o.group) == null ? void 0 : he.name);
10484
+ const A = W((he = o.group) == null ? void 0 : he.name);
10479
10485
  function U(O) {
10480
- o.group && (x.value = O, I({
10486
+ o.group && (A.value = O, I({
10481
10487
  ...o.group,
10482
10488
  name: O
10483
10489
  }));
@@ -10518,7 +10524,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10518
10524
  async function N() {
10519
10525
  var O;
10520
10526
  if (o.action === "add") {
10521
- if (a.groups.find((me) => me.name === x.value)) {
10527
+ if (a.groups.find((me) => me.name === A.value)) {
10522
10528
  s.open({
10523
10529
  type: "error",
10524
10530
  message: Z("menu.group.validation.name_duplicate")
@@ -10526,7 +10532,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10526
10532
  return;
10527
10533
  }
10528
10534
  } else if (o.action === "update" && a.groups.find(
10529
- (me) => me.name === x.value && me._id !== o.group._id
10535
+ (me) => me.name === A.value && me._id !== o.group._id
10530
10536
  )) {
10531
10537
  s.open({
10532
10538
  type: "error",
@@ -10537,7 +10543,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10537
10543
  if (o.action === "add") {
10538
10544
  const J = {
10539
10545
  ...o.group,
10540
- name: x.value,
10546
+ name: A.value,
10541
10547
  ...o.group.name_locale && { name_locale: o.group.name_locale }
10542
10548
  }, { group: me, linkItems: pe } = da(J), C = {
10543
10549
  module: Be.enum.group,
@@ -10566,7 +10572,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10566
10572
  }
10567
10573
  const J = {
10568
10574
  ...o.group,
10569
- name: x.value,
10575
+ name: A.value,
10570
10576
  ...o.group.name_locale && { name_locale: o.group.name_locale }
10571
10577
  };
10572
10578
  i("submit:group", J);
@@ -10576,7 +10582,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10576
10582
  Ae(
10577
10583
  () => g.value,
10578
10584
  async (O) => {
10579
- i("status:show", O), O && (await Ji(), H.value = Fe.clone(o.group));
10585
+ i("status:show", O), O && (await ea(), H.value = Fe.clone(o.group));
10580
10586
  }
10581
10587
  );
10582
10588
  const Q = R(() => {
@@ -10599,7 +10605,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10599
10605
  (O) => !!O || Z("menu.common.validation.required", { field: Z("menu.common.labels.group_name") }),
10600
10606
  // Duplicate name validation
10601
10607
  (O) => o.action === "add" ? !a.groups.find((me) => me.name === O) || Z("menu.group.validation.name_duplicate") : o.action === "update" ? !a.groups.find((me) => me.name === O && me._id !== o.group._id) || Z("menu.group.validation.name_duplicate") : !0
10602
- ]), ce = R(() => x.value ? le.value.every((O) => O(x.value) === !0) : !1);
10608
+ ]), ce = R(() => A.value ? le.value.every((O) => O(A.value) === !0) : !1);
10603
10609
  t({
10604
10610
  trigger: b,
10605
10611
  show: g
@@ -10664,8 +10670,8 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10664
10670
  var X;
10665
10671
  return [
10666
10672
  h(C, {
10667
- modelValue: x.value,
10668
- "onUpdate:modelValue": J[1] || (J[1] = (ue) => x.value = ue),
10673
+ modelValue: A.value,
10674
+ "onUpdate:modelValue": J[1] || (J[1] = (ue) => A.value = ue),
10669
10675
  placeholder: (X = H.value) == null ? void 0 : X.name,
10670
10676
  disabled: S("name"),
10671
10677
  rules: S("name") ? [] : le.value,
@@ -10808,12 +10814,12 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10808
10814
  ]),
10809
10815
  _: 3
10810
10816
  }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]),
10811
- O.group ? (y(), ee(Uo, {
10817
+ O.group ? (y(), ee(Bo, {
10812
10818
  key: 0,
10813
10819
  modelValue: k.value,
10814
10820
  "onUpdate:modelValue": J[10] || (J[10] = (X) => k.value = X),
10815
10821
  title: m(Z)("menu.group.title"),
10816
- name: x.value ?? ((B = H.value) == null ? void 0 : B.name) ?? "",
10822
+ name: A.value ?? ((B = H.value) == null ? void 0 : B.name) ?? "",
10817
10823
  "name-locale": O.group.name_locale,
10818
10824
  "onUpdate:name": U,
10819
10825
  "onUpdate:nameLocale": T
@@ -10821,7 +10827,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10821
10827
  ], 64);
10822
10828
  };
10823
10829
  }
10824
- }), Hh = pr, Xi = Of, Kh = cr, qh = {
10830
+ }), Hh = pr, Zi = Of, Kh = cr, qh = {
10825
10831
  key: 0,
10826
10832
  class: "flex flex-col space-y-16 h-[440px]"
10827
10833
  }, Yh = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Xh = { class: "flex justify-between pb-16" }, Zh = { class: "flex gap-8" }, Qh = {
@@ -10835,36 +10841,36 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10835
10841
  setup(e) {
10836
10842
  const t = e, n = nt(), { emitData: o, emitAction: i } = Nt(), a = De(), r = R(() => a.rules.group), l = R(() => a.groups);
10837
10843
  function s(b) {
10838
- return Te(b ?? []).sort((A, S) => A.position - S.position);
10844
+ return Te(b ?? []).sort((x, S) => x.position - S.position);
10839
10845
  }
10840
10846
  const u = R(() => s(l.value).reduce((b, v) => (b[v._id] = {
10841
10847
  name: v.name,
10842
10848
  type: zn(a.items, v.items)
10843
10849
  }, b), {})), d = R(() => [
10844
- ...Object.entries(u.value).map(([b, { name: v, type: A }]) => ({
10845
- label: `${v} ${r.value.type ? `(${go(A)})` : ""}`.trim(),
10850
+ ...Object.entries(u.value).map(([b, { name: v, type: x }]) => ({
10851
+ label: `${v} ${r.value.type ? `(${bo(x)})` : ""}`.trim(),
10846
10852
  value: b
10847
10853
  }))
10848
10854
  ]), c = R(() => !!a.state.currentCatalogId || !!a.state.currentSchedulerId);
10849
10855
  R(() => {
10850
- const b = !a.state.currentSchedulerId, v = a.rules.group.type, A = a.version == It.enum.v3, S = a.rules.item.orderFromActiveOnly, j = a.rules.item.bindToVariant;
10856
+ const b = !a.state.currentSchedulerId, v = a.rules.group.type, x = a.version == It.enum.v3, S = a.rules.item.orderFromActiveOnly, j = a.rules.item.bindToVariant;
10851
10857
  return function(T) {
10852
10858
  return {
10853
- isDefault: (x) => !c.value && !x,
10854
- link: (x) => !c.value && (!x || j),
10855
- name: (x) => !c.value && !x,
10859
+ isDefault: (A) => !c.value && !A,
10860
+ link: (A) => !c.value && (!A || j),
10861
+ name: (A) => !c.value && !A,
10856
10862
  type: v && !T._id && !c.value,
10857
10863
  price: T.type != Re.enum.DYNAMIC,
10858
10864
  priceEdit: !0,
10859
10865
  priceTier: a.isV4,
10860
- inventory: b ? A ? !c.value && T.type == Re.enum.NORMAL : !c.value : !1,
10861
- orderFrom: (x) => b ? A ? T.type == Re.enum.DYNAMIC ? c.value : !!c.value == !x : c.value : !1,
10866
+ inventory: b ? x ? !c.value && T.type == Re.enum.NORMAL : !c.value : !1,
10867
+ orderFrom: (A) => b ? x ? T.type == Re.enum.DYNAMIC ? c.value : !!c.value == !A : c.value : !1,
10862
10868
  orderFromActiveOnly: S,
10863
- showOrderFrom: b ? A ? c.value ? !0 : T.type == Re.enum.PRODUCT : c.value : !1,
10869
+ showOrderFrom: b ? x ? c.value ? !0 : T.type == Re.enum.PRODUCT : c.value : !1,
10864
10870
  bindToVariant: j,
10865
10871
  isOverride: c.value,
10866
10872
  isItemGroup: !1,
10867
- isV4: !A
10873
+ isV4: !x
10868
10874
  };
10869
10875
  };
10870
10876
  }), R(() => ({
@@ -10878,10 +10884,10 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10878
10884
  o(p.value), i("primary"), n.close();
10879
10885
  };
10880
10886
  return (b, v) => {
10881
- const A = z("FmSearch"), S = z("FmCheckbox"), j = z("FmButton");
10887
+ const x = z("FmSearch"), S = z("FmCheckbox"), j = z("FmButton");
10882
10888
  return d.value.length > 0 ? (y(), q("div", qh, [
10883
10889
  _("div", null, [
10884
- h(A, {
10890
+ h(x, {
10885
10891
  autofocus: "",
10886
10892
  modelValue: f.value,
10887
10893
  "onUpdate:modelValue": v[0] || (v[0] = (I) => f.value = I),
@@ -10908,7 +10914,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10908
10914
  ])
10909
10915
  ]),
10910
10916
  _("div", Xh, [
10911
- h(m(Xi), null, {
10917
+ h(m(Zi), null, {
10912
10918
  default: M(({ trigger: I }) => [
10913
10919
  h(j, {
10914
10920
  label: m(g)("menu.common.actions.add_group"),
@@ -10936,7 +10942,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
10936
10942
  _("p", eg, oe(m(g)("menu.common.empty.no_group.title")), 1),
10937
10943
  _("p", tg, oe(m(g)("menu.common.empty.no_group.subtitle")), 1)
10938
10944
  ]),
10939
- h(m(Xi), null, {
10945
+ h(m(Zi), null, {
10940
10946
  default: M(({ trigger: I }) => [
10941
10947
  h(j, {
10942
10948
  label: m(g)("menu.common.actions.add_group"),
@@ -11014,9 +11020,9 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11014
11020
  name: $,
11015
11021
  type: N
11016
11022
  }]) => ({
11017
- label: `${$} ${u.value.type ? `(${go(N)})` : ""}`.trim(),
11023
+ label: `${$} ${u.value.type ? `(${bo(N)})` : ""}`.trim(),
11018
11024
  value: w
11019
- }))]), A = R(() => [{
11025
+ }))]), x = R(() => [{
11020
11026
  accessorKey: "name",
11021
11027
  header: () => l("menu.product.form.group.columns.title"),
11022
11028
  enableSorting: !1,
@@ -11032,7 +11038,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11032
11038
  cell: (w) => {
11033
11039
  var N;
11034
11040
  const $ = w.row.original._id;
11035
- return go((N = b.value[$]) == null ? void 0 : N.type);
11041
+ return bo((N = b.value[$]) == null ? void 0 : N.type);
11036
11042
  }
11037
11043
  }, {
11038
11044
  accessorKey: "items",
@@ -11148,12 +11154,12 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11148
11154
  groups: $
11149
11155
  }));
11150
11156
  }
11151
- const x = R(() => {
11157
+ const A = R(() => {
11152
11158
  var w;
11153
11159
  return !!((w = n.form.variant) != null && w.variantGroupIds.length);
11154
11160
  }), U = R(() => {
11155
11161
  var w;
11156
- return x.value ? (w = n.form.variant) == null ? void 0 : w.variantCombinations : [{
11162
+ return A.value ? (w = n.form.variant) == null ? void 0 : w.variantCombinations : [{
11157
11163
  _id: n.form._id,
11158
11164
  combinationKey: "",
11159
11165
  groups: n.form.groups || []
@@ -11180,7 +11186,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11180
11186
  return ($ = v.value.find((N) => N.value === w)) == null ? void 0 : $.label;
11181
11187
  }, H = (w) => {
11182
11188
  var $;
11183
- x.value ? s("update:form", "variant", {
11189
+ A.value ? s("update:form", "variant", {
11184
11190
  variantGroupIds: (($ = n.form.variant) == null ? void 0 : $.variantGroupIds) || [],
11185
11191
  variantCombinations: w
11186
11192
  }) : s("update:form", "groups", w[0].groups || []);
@@ -11203,7 +11209,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11203
11209
  var se;
11204
11210
  return [((se = f.value) == null ? void 0 : se.length) > 0 ? (y(), ee(Q, {
11205
11211
  key: 0,
11206
- "column-defs": A.value,
11212
+ "column-defs": x.value,
11207
11213
  "column-visibility": S.value,
11208
11214
  "row-data": f.value.map((K) => ({
11209
11215
  _id: K
@@ -11253,10 +11259,10 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11253
11259
  _id: "",
11254
11260
  name: I || "",
11255
11261
  binding: S || []
11256
- }] : j.map((x) => ({
11257
- _id: x.combinationKey || "",
11258
- name: vo(x.combinationKey || "", T),
11259
- binding: x.inventoryBindings || []
11262
+ }] : j.map((A) => ({
11263
+ _id: A.combinationKey || "",
11264
+ name: yo(A.combinationKey || "", T),
11265
+ binding: A.inventoryBindings || []
11260
11266
  }));
11261
11267
  }
11262
11268
  const f = R(() => {
@@ -11320,7 +11326,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11320
11326
  const j = S.row.original;
11321
11327
  return l.value ? h("div", {
11322
11328
  class: "flex items-center justify-end"
11323
- }, [h(Fo, {
11329
+ }, [h(Mo, {
11324
11330
  name: j.name,
11325
11331
  initialValue: j.bindings ?? [],
11326
11332
  title: n("menu.inventory.dialog.title", {
@@ -11348,16 +11354,16 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11348
11354
  for (const j of b.value)
11349
11355
  j.getKey() === S && j.trigger(!0);
11350
11356
  }
11351
- const A = la();
11357
+ const x = la();
11352
11358
  return Gt(() => {
11353
- A.readInventory();
11359
+ x.readInventory();
11354
11360
  }), (S, j) => {
11355
11361
  const I = z("FmStepperField");
11356
11362
  return y(), q(Ce, null, [h(Ye, {
11357
11363
  title: m(n)("menu.inventory.title"),
11358
11364
  subTitle: m(n)("menu.inventory.subtitle")
11359
11365
  }, {
11360
- default: M(() => [_("div", ig, [_("div", ag, [(y(!0), q(Ce, null, Ie(g.value, (T) => (y(), ee(m(Fo), {
11366
+ default: M(() => [_("div", ig, [_("div", ag, [(y(!0), q(Ce, null, Ie(g.value, (T) => (y(), ee(m(Mo), {
11361
11367
  key: T._id,
11362
11368
  ref_for: !0,
11363
11369
  ref_key: "inventoryManagerForms",
@@ -11368,8 +11374,8 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11368
11374
  name: T.name || "",
11369
11375
  bindingKey: T._id,
11370
11376
  initialValue: T.binding ?? [],
11371
- "onUpdate:inventory": (x) => {
11372
- k(T._id, x);
11377
+ "onUpdate:inventory": (A) => {
11378
+ k(T._id, A);
11373
11379
  }
11374
11380
  }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), h(m(ds), {
11375
11381
  "row-data": g.value,
@@ -11424,8 +11430,8 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11424
11430
  emits: ["update:form"],
11425
11431
  setup(e, { emit: t }) {
11426
11432
  const n = e, o = Ut(), i = De(), a = ua(), { t: r } = ke(), l = t, s = R(() => i.rules.item), u = R(() => {
11427
- var x, U;
11428
- const I = n.isOverride ? ((x = n.fallback) == null ? void 0 : x.unit) ?? ((U = n.fallback) == null ? void 0 : U.perXUnit) : void 0, T = n.form.unit ?? n.form.perXUnit ?? I;
11433
+ var A, U;
11434
+ const I = n.isOverride ? ((A = n.fallback) == null ? void 0 : A.unit) ?? ((U = n.fallback) == null ? void 0 : U.perXUnit) : void 0, T = n.form.unit ?? n.form.perXUnit ?? I;
11429
11435
  return T != null;
11430
11436
  }), d = (I) => {
11431
11437
  l("update:form", "unit", I ? "" : void 0), l("update:form", "perXUnit", I ? 0 : void 0);
@@ -11447,8 +11453,8 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11447
11453
  }
11448
11454
  function g(I) {
11449
11455
  if (!I && n.form.perXUnit) {
11450
- const [T, x] = n.form.perXUnit.toString().split(".");
11451
- if (x && x.length > 4) {
11456
+ const [T, A] = n.form.perXUnit.toString().split(".");
11457
+ if (A && A.length > 4) {
11452
11458
  const F = (typeof n.form.perXUnit == "string" ? parseFloat(n.form.perXUnit) : n.form.perXUnit).toFixed(4);
11453
11459
  l("update:form", "perXUnit", parseFloat(F));
11454
11460
  }
@@ -11476,12 +11482,12 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11476
11482
  const v = R(() => {
11477
11483
  var I, T;
11478
11484
  return ((I = i.currentCatalog) == null ? void 0 : I.priceTierRules) ?? ((T = i.currentCatalog) == null ? void 0 : T.usePriceTiers) ?? [];
11479
- }), A = Mn(), S = R(() => A.getMemberPricingPriceVariant(n.form.price_variant));
11485
+ }), x = Mn(), S = R(() => x.getMemberPricingPriceVariant(n.form.price_variant));
11480
11486
  function j(I, T) {
11481
- T ? l("update:form", "priceTiers_variant", ei(I)) : l("update:form", "price_variant", ti(I));
11487
+ T ? l("update:form", "priceTiers_variant", ni(I)) : l("update:form", "price_variant", oi(I));
11482
11488
  }
11483
11489
  return (I, T) => {
11484
- const x = z("fm-select"), U = z("FmButton"), F = z("fm-checkbox"), G = z("fm-text-field"), H = Vt("tooltip");
11490
+ const A = z("fm-select"), U = z("FmButton"), F = z("fm-checkbox"), G = z("fm-text-field"), H = Vt("tooltip");
11485
11491
  return y(), ee(Ye, {
11486
11492
  title: m(r)("menu.product.form.price.title")
11487
11493
  }, {
@@ -11513,7 +11519,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11513
11519
  ]),
11514
11520
  _: 1
11515
11521
  }, 8, ["disable", "model-value", "placeholder", "rules", "label"]),
11516
- h(x, {
11522
+ h(A, {
11517
11523
  disabled: !s.value.tax || !c.value.systemCode,
11518
11524
  items: c.value.countryTaxOptions,
11519
11525
  label: c.value.systemCode ? m(r)("menu.product.form.price.fields.tax.label_with_code", {
@@ -11715,7 +11721,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11715
11721
  module: Be.enum.printDepartment,
11716
11722
  operation: Ne.F_OPERATION_TYPE.update,
11717
11723
  data: r.value,
11718
- link: yo(((c = r.value) == null ? void 0 : c.usedBy) || [])
11724
+ link: wo(((c = r.value) == null ? void 0 : c.usedBy) || [])
11719
11725
  },
11720
11726
  r.value.name
11721
11727
  ) : await o.updateMenu(
@@ -11723,7 +11729,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11723
11729
  module: Be.enum.printDepartment,
11724
11730
  operation: Ne.F_OPERATION_TYPE.create,
11725
11731
  data: r.value,
11726
- link: yo(((p = r.value) == null ? void 0 : p.usedBy) || [])
11732
+ link: wo(((p = r.value) == null ? void 0 : p.usedBy) || [])
11727
11733
  },
11728
11734
  r.value.name
11729
11735
  ), u(!1);
@@ -11827,10 +11833,10 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11827
11833
  }), d = R(() => {
11828
11834
  var v;
11829
11835
  return u.value ? s.value.reduce(
11830
- (A, { _id: S }) => (A.includes(S) || (A = [...A, S]), A),
11836
+ (x, { _id: S }) => (x.includes(S) || (x = [...x, S]), x),
11831
11837
  [...((v = n.form.print) == null ? void 0 : v.department) ?? []]
11832
- ) : s.value.map(({ _id: A }) => A);
11833
- }), c = R(() => s.value.reduce((v, A) => (v[A._id] = A.name, v), {}));
11838
+ ) : s.value.map(({ _id: x }) => x);
11839
+ }), c = R(() => s.value.reduce((v, x) => (v[x._id] = x.name, v), {}));
11834
11840
  function p(v) {
11835
11841
  a("update:form", "print", {
11836
11842
  ...r(),
@@ -11849,16 +11855,16 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11849
11855
  a("update:form", "print", {
11850
11856
  ...r(),
11851
11857
  ...n.form.print,
11852
- department: v.filter((A) => {
11858
+ department: v.filter((x) => {
11853
11859
  var S;
11854
- return (((S = n.form.print) == null ? void 0 : S.department) ?? []).includes(A);
11860
+ return (((S = n.form.print) == null ? void 0 : S.department) ?? []).includes(x);
11855
11861
  })
11856
11862
  });
11857
11863
  }
11858
- function k(v, A) {
11864
+ function k(v, x) {
11859
11865
  var j, I;
11860
11866
  let S = [...((I = (j = n.form) == null ? void 0 : j.print) == null ? void 0 : I.department) ?? []];
11861
- A && !S.includes(v) ? S = [...S, v] : A || (S = S.filter((T) => T !== v)), a("update:form", "print", {
11867
+ x && !S.includes(v) ? S = [...S, v] : x || (S = S.filter((T) => T !== v)), a("update:form", "print", {
11862
11868
  ...r(),
11863
11869
  ...n.form.print,
11864
11870
  department: S
@@ -11879,8 +11885,8 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11879
11885
  return Ae(
11880
11886
  () => s.value.length,
11881
11887
  () => k(s.value[s.value.length - 1]._id, !0)
11882
- ), (v, A) => {
11883
- const S = z("fm-switch"), j = z("fm-radio"), I = z("fm-radio-group"), T = z("fm-button"), x = z("fm-checkbox");
11888
+ ), (v, x) => {
11889
+ const S = z("fm-switch"), j = z("fm-radio"), I = z("fm-radio-group"), T = z("fm-button"), A = z("fm-checkbox");
11884
11890
  return y(), ee(Ye, {
11885
11891
  title: m(i)("menu.product.form.print.title")
11886
11892
  }, {
@@ -11899,7 +11905,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11899
11905
  label: m(i)("menu.product.form.print.config.group_parent.label"),
11900
11906
  "label-placement": "right",
11901
11907
  sublabel: m(i)("menu.product.form.print.config.group_parent.sublabel"),
11902
- "onUpdate:modelValue": A[0] || (A[0] = (G) => p(G))
11908
+ "onUpdate:modelValue": x[0] || (x[0] = (G) => p(G))
11903
11909
  }, null, 8, ["model-value", "label", "sublabel"])
11904
11910
  ];
11905
11911
  }),
@@ -11908,7 +11914,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11908
11914
  h(I, {
11909
11915
  label: m(i)("menu.product.form.print.kds.label"),
11910
11916
  "model-value": ((U = v.form.print) == null ? void 0 : U.sequential) ?? !1,
11911
- "onUpdate:modelValue": A[1] || (A[1] = (F) => f(F))
11917
+ "onUpdate:modelValue": x[1] || (x[1] = (F) => f(F))
11912
11918
  }, {
11913
11919
  default: M(() => [
11914
11920
  _("div", Og, [
@@ -11931,7 +11937,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11931
11937
  "item-key": (F) => F,
11932
11938
  "model-value": d.value,
11933
11939
  handle: ".handle",
11934
- "onUpdate:modelValue": A[3] || (A[3] = (F) => g(F)),
11940
+ "onUpdate:modelValue": x[3] || (x[3] = (F) => g(F)),
11935
11941
  class: "space-y-16"
11936
11942
  }, {
11937
11943
  item: M(({ element: F }) => {
@@ -11945,11 +11951,11 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
11945
11951
  class: "handle",
11946
11952
  "prepend-icon": "drag_handle",
11947
11953
  variant: "tertiary",
11948
- onClick: A[2] || (A[2] = it(() => {
11954
+ onClick: x[2] || (x[2] = it(() => {
11949
11955
  }, ["stop"]))
11950
11956
  }, null, 8, ["disabled"])) : te("", !0)
11951
11957
  ]),
11952
- h(x, {
11958
+ h(A, {
11953
11959
  id: F,
11954
11960
  "data-checked": ($ = (w = n.form.print) == null ? void 0 : w.department) == null ? void 0 : $.includes(F),
11955
11961
  label: c.value[F],
@@ -12043,7 +12049,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
12043
12049
  dialog: a,
12044
12050
  menuLoader: s
12045
12051
  }), c = R(() => o.timePresets.map((b) => {
12046
- const v = u.orderPacings.find((A) => A._id === b.id);
12052
+ const v = u.orderPacings.find((x) => x._id === b.id);
12047
12053
  return {
12048
12054
  id: b.id,
12049
12055
  isDefault: b.isDefault ?? !1,
@@ -12059,7 +12065,7 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
12059
12065
  return ze(Oe.FmCheckbox, {
12060
12066
  modelValue: v,
12061
12067
  value: v,
12062
- "onUpdate:modelValue": (A) => g(A, b.row.original.id)
12068
+ "onUpdate:modelValue": (x) => g(x, b.row.original.id)
12063
12069
  });
12064
12070
  }
12065
12071
  }, {
@@ -12103,17 +12109,17 @@ const Lh = { class: "fm-typo-en-title-md-600" }, jh = {
12103
12109
  }).onPrimary((b) => {
12104
12110
  i("update:linkedOrderPacing", b);
12105
12111
  }).onTertiary(() => {
12106
- const b = u.items.find((A) => A._id === o.itemId), v = b ? [gs(b, u.orderPacings)] : [];
12112
+ const b = u.items.find((x) => x._id === o.itemId), v = b ? [gs(b, u.orderPacings)] : [];
12107
12113
  d.create(v);
12108
12114
  });
12109
12115
  }
12110
12116
  return (b, v) => {
12111
- const A = z("FmButton"), S = z("FmTable");
12117
+ const x = z("FmButton"), S = z("FmTable");
12112
12118
  return y(), q(Ce, null, [h(Ye, {
12113
12119
  title: m(n)("menu.product.form.order_pacing.time_presets.title"),
12114
12120
  "sub-title": m(n)("menu.product.form.order_pacing.time_presets.subtitle")
12115
12121
  }, {
12116
- "append-title": M(() => [h(A, {
12122
+ "append-title": M(() => [h(x, {
12117
12123
  class: "flex-shrink-0",
12118
12124
  label: m(n)("menu.product.form.order_pacing.time_presets.add"),
12119
12125
  "prepend-icon": "add",
@@ -12274,7 +12280,7 @@ const jg = {
12274
12280
  enableSorting: !1,
12275
12281
  header: () => r("menu.product.form.takeaway.columns.takeaway"),
12276
12282
  cell: (b) => {
12277
- const v = b.getValue(), A = b.row.original;
12283
+ const v = b.getValue(), x = b.row.original;
12278
12284
  return ze(us, {
12279
12285
  action: "add",
12280
12286
  applyProduct: !1,
@@ -12284,7 +12290,7 @@ const jg = {
12284
12290
  module: Be.enum.takeaway,
12285
12291
  operation: Ne.F_OPERATION_TYPE.create,
12286
12292
  data: S,
12287
- link: yo(S.usedBy || [])
12293
+ link: wo(S.usedBy || [])
12288
12294
  }, S.name);
12289
12295
  }
12290
12296
  }, {
@@ -12296,7 +12302,7 @@ const jg = {
12296
12302
  items: d.value,
12297
12303
  shiftMenu: !0,
12298
12304
  "onUpdate:modelValue": (j) => {
12299
- A.onUpdate(j || "");
12305
+ x.onUpdate(j || "");
12300
12306
  }
12301
12307
  }, {
12302
12308
  "append-menu": () => o.rules.takeaway.create ? ze("button", {
@@ -12322,9 +12328,9 @@ const jg = {
12322
12328
  });
12323
12329
  function f(b) {
12324
12330
  return (v) => {
12325
- const A = n.form.takeawayConfig, S = {
12326
- pos: (A == null ? void 0 : A.pos) ?? !0,
12327
- app: (A == null ? void 0 : A.app) ?? !0,
12331
+ const x = n.form.takeawayConfig, S = {
12332
+ pos: (x == null ? void 0 : x.pos) ?? !0,
12333
+ app: (x == null ? void 0 : x.app) ?? !0,
12328
12334
  [b]: v
12329
12335
  };
12330
12336
  l("update:form", "takeawayConfig", S);
@@ -12344,19 +12350,19 @@ const jg = {
12344
12350
  set: f("app")
12345
12351
  });
12346
12352
  return (b, v) => {
12347
- const A = z("FmCheckbox"), S = z("fm-table");
12353
+ const x = z("FmCheckbox"), S = z("fm-table");
12348
12354
  return y(), ee(Ye, {
12349
12355
  title: m(r)("menu.product.form.takeaway.title"),
12350
12356
  "sub-title": m(r)("menu.product.form.takeaway.subtitle")
12351
12357
  }, {
12352
- default: M(() => [_("div", jg, [p.value.pos ? (y(), ee(A, {
12358
+ default: M(() => [_("div", jg, [p.value.pos ? (y(), ee(x, {
12353
12359
  key: 0,
12354
12360
  modelValue: g.value,
12355
12361
  "onUpdate:modelValue": v[0] || (v[0] = (j) => g.value = j),
12356
12362
  label: m(r)("menu.product.form.takeaway.takeawayConfig.pos.label"),
12357
12363
  sublabel: m(r)("menu.product.form.takeaway.takeawayConfig.pos.sublabel"),
12358
12364
  value: !0
12359
- }, null, 8, ["modelValue", "label", "sublabel"])) : te("", !0), p.value.app ? (y(), ee(A, {
12365
+ }, null, 8, ["modelValue", "label", "sublabel"])) : te("", !0), p.value.app ? (y(), ee(x, {
12360
12366
  key: 1,
12361
12367
  modelValue: k.value,
12362
12368
  "onUpdate:modelValue": v[1] || (v[1] = (j) => k.value = j),
@@ -12423,7 +12429,7 @@ const jg = {
12423
12429
  ])
12424
12430
  ]),
12425
12431
  _("div", Kg, [
12426
- h(m(gi), null, {
12432
+ h(m(vi), null, {
12427
12433
  default: M(({ trigger: b }) => [
12428
12434
  m(i).rules.item.variant ? (y(), ee(k, {
12429
12435
  key: 0,
@@ -12452,7 +12458,7 @@ const jg = {
12452
12458
  _("p", Zg, oe(m(a)("menu.common.empty.no_variant.title")), 1),
12453
12459
  _("p", Qg, oe(m(a)("menu.common.empty.no_variant.subtitle")), 1)
12454
12460
  ]),
12455
- h(m(gi), null, {
12461
+ h(m(vi), null, {
12456
12462
  default: M(({ trigger: b }) => [
12457
12463
  h(k, {
12458
12464
  label: m(a)("menu.variant.add"),
@@ -12533,7 +12539,7 @@ const jg = {
12533
12539
  const $ = ((le = n.form.variant) == null ? void 0 : le.variantGroupIds) || [], N = (ce = n.form.variant) == null ? void 0 : ce.variantCombinations, K = w.split(/(?=variant)/g).map((Z) => Z.replace(/\/*$/, "")).filter((Z) => $.some((ge) => Z.includes(ge))).join("/");
12534
12540
  return N == null ? void 0 : N.find((Z) => Z.combinationKey === K);
12535
12541
  }
12536
- const A = (w) => {
12542
+ const x = (w) => {
12537
12543
  j(w);
12538
12544
  }, S = R(() => {
12539
12545
  var $;
@@ -12541,7 +12547,7 @@ const jg = {
12541
12547
  var K, le;
12542
12548
  const Q = (le = (K = n.fallback) == null ? void 0 : K.variant) == null ? void 0 : le.variantCombinations.find(({
12543
12549
  combinationKey: ce
12544
- }) => ce === N.combinationKey), se = x.value ? null : N.price;
12550
+ }) => ce === N.combinationKey), se = A.value ? null : N.price;
12545
12551
  return {
12546
12552
  ...N,
12547
12553
  price: se,
@@ -12613,7 +12619,7 @@ const jg = {
12613
12619
  const T = R(() => {
12614
12620
  var w, $;
12615
12621
  return ((w = o.currentCatalog) == null ? void 0 : w.priceTierRules) ?? (($ = o.currentCatalog) == null ? void 0 : $.usePriceTiers) ?? [];
12616
- }), x = R(() => T.value.length > 0 && o.currentCatalog && !o.currentScheduler), U = Mn(), F = R(() => [{
12622
+ }), A = R(() => T.value.length > 0 && o.currentCatalog && !o.currentScheduler), U = Mn(), F = R(() => [{
12617
12623
  accessorKey: "combinationKey",
12618
12624
  header: () => l("menu.product.form.variant.columns.variant"),
12619
12625
  enableSorting: !1,
@@ -12642,7 +12648,7 @@ const jg = {
12642
12648
  }) : !0;
12643
12649
  }],
12644
12650
  "onUpdate:model-value": (ce) => {
12645
- I(w.row.index, "code", Po(ce, !0));
12651
+ I(w.row.index, "code", Vo(ce, !0));
12646
12652
  }
12647
12653
  }, null);
12648
12654
  }
@@ -12653,7 +12659,7 @@ const jg = {
12653
12659
  cell: (w) => {
12654
12660
  var se, K;
12655
12661
  const $ = w.getValue(), Q = (se = w.row.original.fallback) == null ? void 0 : se.orderFrom;
12656
- return h(No, {
12662
+ return h(Lo, {
12657
12663
  modelValue: $,
12658
12664
  fallback: n.form.orderFrom ?? Q ?? ((K = n.fallback) == null ? void 0 : K.orderFrom),
12659
12665
  disable: !u.value.orderFrom,
@@ -12677,7 +12683,7 @@ const jg = {
12677
12683
  return h("div", {
12678
12684
  class: "flex items-center gap-8"
12679
12685
  }, [h(yt, {
12680
- disable: x.value,
12686
+ disable: A.value,
12681
12687
  placeholder: se ? lt(se) : void 0,
12682
12688
  modelValue: $,
12683
12689
  min: 0,
@@ -12699,7 +12705,7 @@ const jg = {
12699
12705
  I(w.row.index, "price", he);
12700
12706
  },
12701
12707
  "onUpdate:priceVariants": (he) => {
12702
- I(w.row.index, "price_variant", ti(he));
12708
+ I(w.row.index, "price_variant", oi(he));
12703
12709
  }
12704
12710
  }, {
12705
12711
  default: ({
@@ -12722,7 +12728,7 @@ const jg = {
12722
12728
  "price-tiers-variant": N.priceTiers_variant,
12723
12729
  fallback: (ge = N.fallback) == null ? void 0 : ge.priceTiers,
12724
12730
  "onUpdate:value": (he) => {
12725
- I(w.row.index, "priceTiers", he.priceTiers), I(w.row.index, "priceTiers_variant", ei(he.priceTiersVariant));
12731
+ I(w.row.index, "priceTiers", he.priceTiers), I(w.row.index, "priceTiers_variant", ni(he.priceTiersVariant));
12726
12732
  }
12727
12733
  }, null)]);
12728
12734
  }
@@ -12779,7 +12785,7 @@ const jg = {
12779
12785
  group: "variants",
12780
12786
  handle: ".handle",
12781
12787
  "item-key": "id",
12782
- "onUpdate:modelValue": A
12788
+ "onUpdate:modelValue": x
12783
12789
  }, {
12784
12790
  item: M(({
12785
12791
  element: Z
@@ -12892,14 +12898,14 @@ const jg = {
12892
12898
  }
12893
12899
  );
12894
12900
  const k = Hn(), b = async ([V, L]) => {
12895
- i.selectCatalog(V), i.selectScheduler(L), await Ji(), k.update(f.value._id), setTimeout(() => {
12901
+ i.selectCatalog(V), i.selectScheduler(L), await ea(), k.update(f.value._id), setTimeout(() => {
12896
12902
  o("update:show", !1);
12897
12903
  }, 100);
12898
12904
  }, v = R(() => {
12899
12905
  var V;
12900
12906
  return i.mapVariant((V = f.value.variant) == null ? void 0 : V.variantGroupIds);
12901
- }), A = W([]);
12902
- Vo(() => jr(A.value));
12907
+ }), x = W([]);
12908
+ zo(() => jr(x.value));
12903
12909
  const S = (V, L) => {
12904
12910
  f.value = {
12905
12911
  ...Te(f.value),
@@ -12921,7 +12927,7 @@ const jg = {
12921
12927
  ), T = R(() => {
12922
12928
  var V;
12923
12929
  return I.value ? f.value.category == "" || f.value.category == null && ((V = p.value) == null ? void 0 : V.category) == null : i.version === It.enum.v4 && f.value.category == null;
12924
- }), x = R(() => a.itemAttributeSettings.value.length > 0 && !I.value);
12930
+ }), A = R(() => a.itemAttributeSettings.value.length > 0 && !I.value);
12925
12931
  function U() {
12926
12932
  var _e;
12927
12933
  const V = i.getSelectedTax(
@@ -13147,17 +13153,17 @@ const jg = {
13147
13153
  E.isUpdatingItem = !1, i.selectCatalog(E.storedCatalogId), i.selectScheduler(E.storedSchedulerId);
13148
13154
  }
13149
13155
  async function ne() {
13150
- await fi(), I.value && [
13156
+ await hi(), I.value && [
13151
13157
  [G.value, H],
13152
13158
  [$.value, N]
13153
13159
  ].forEach(([L, fe]) => {
13154
13160
  L || fe(!1);
13155
- }), o("submit:form", Us(Te(f.value)), A.value), c(), Y();
13161
+ }), o("submit:form", Us(Te(f.value)), x.value), c(), Y();
13156
13162
  }
13157
13163
  async function de() {
13158
13164
  var V;
13159
13165
  if ((V = n.initialForm) != null && V._id) {
13160
- await fi();
13166
+ await hi();
13161
13167
  const L = Wr(
13162
13168
  [f.value],
13163
13169
  [n.initialForm]
@@ -13192,7 +13198,7 @@ const jg = {
13192
13198
  onOnCancel: de
13193
13199
  }, {
13194
13200
  "append-title": M(() => [
13195
- m(be)("sm") ? (y(), ee(vi, {
13201
+ m(be)("sm") ? (y(), ee(bi, {
13196
13202
  key: 0,
13197
13203
  variant: "dialog",
13198
13204
  title: F.value.title,
@@ -13202,7 +13208,7 @@ const jg = {
13202
13208
  default: M(() => {
13203
13209
  var fe, _e;
13204
13210
  return [
13205
- m(be)("sm") ? te("", !0) : (y(), ee(vi, {
13211
+ m(be)("sm") ? te("", !0) : (y(), ee(bi, {
13206
13212
  key: 0,
13207
13213
  class: "fixed",
13208
13214
  style: ho({
@@ -13242,15 +13248,15 @@ const jg = {
13242
13248
  "is-addon": T.value,
13243
13249
  "is-override": I.value,
13244
13250
  "is-create": n.action === "add",
13245
- staged: A.value,
13251
+ staged: x.value,
13246
13252
  "onUpdate:form": S,
13247
- "onUpdate:staged": L[0] || (L[0] = (re) => A.value = re)
13253
+ "onUpdate:staged": L[0] || (L[0] = (re) => x.value = re)
13248
13254
  }, null, 8, ["fallback", "form", "is-addon", "is-override", "is-create", "staged"])
13249
13255
  ]),
13250
13256
  _: 1
13251
13257
  }, 8, ["toggle", "disabled", "description", "title"]),
13252
13258
  I.value ? te("", !0) : (y(), q("div", rv)),
13253
- x.value ? (y(), ee(Ye, {
13259
+ A.value ? (y(), ee(Ye, {
13254
13260
  key: 2,
13255
13261
  title: m(r)("menu.product.form.sections.tagging.title"),
13256
13262
  "sub-title": m(r)("menu.product.form.sections.tagging.subtitle")
@@ -13265,7 +13271,7 @@ const jg = {
13265
13271
  ]),
13266
13272
  _: 1
13267
13273
  }, 8, ["title", "sub-title"])) : te("", !0),
13268
- x.value ? (y(), q("div", sv)) : te("", !0),
13274
+ A.value ? (y(), q("div", sv)) : te("", !0),
13269
13275
  h($t, {
13270
13276
  toggle: $.value,
13271
13277
  "onUpdate:toggle": [
@@ -13443,7 +13449,7 @@ function fr(e, t) {
13443
13449
  const p = u.find((k) => k._id === c._id), f = (g = c.items) == null ? void 0 : g.map((k) => {
13444
13450
  var v;
13445
13451
  const b = (v = p == null ? void 0 : p.items) == null ? void 0 : v.find(
13446
- (A) => A._id === k._id && A.combinationKey == k.combinationKey
13452
+ (x) => x._id === k._id && x.combinationKey == k.combinationKey
13447
13453
  );
13448
13454
  return {
13449
13455
  ...b || {},
@@ -13521,30 +13527,30 @@ function vv(e, t) {
13521
13527
  _id: e._id
13522
13528
  };
13523
13529
  }
13524
- const Hn = Zi("item-manager", () => {
13525
- const e = De(), t = Je(), n = nt(), o = ut(t), i = ft(o), a = zo(), { t: r } = ke(), l = (x) => {
13530
+ const Hn = Qi("item-manager", () => {
13531
+ const e = De(), t = Je(), n = nt(), o = ut(t), i = ft(o), a = No(), { t: r } = ke(), l = (A) => {
13526
13532
  if (!a) throw new Error("No current instance found");
13527
13533
  const { container: U } = ra(hv, a, {
13528
- ...x,
13534
+ ...A,
13529
13535
  autoShow: !0,
13530
13536
  "onUpdate:show": async (F) => {
13531
13537
  F || (An(null, U), U.remove());
13532
13538
  }
13533
13539
  });
13534
13540
  };
13535
- function s(x) {
13541
+ function s(A) {
13536
13542
  const { saveMenuWithImages: U } = i;
13537
13543
  l({
13538
13544
  action: "add",
13539
- categoryId: x,
13545
+ categoryId: A,
13540
13546
  "onSubmit:form": async (F, G) => {
13541
13547
  F.inventoryBindings ?? (F.inventoryBindings = []), F.inventoryBindings.length === 0 && (F.inventoryBindings = null), F.position = Zr(e.state.menu.modules.item), await U(F, Ne.F_OPERATION_TYPE.create, G);
13542
13548
  }
13543
13549
  });
13544
13550
  }
13545
- async function u(x, U, F) {
13551
+ async function u(A, U, F) {
13546
13552
  l({
13547
- initialForm: vv(x, U || []),
13553
+ initialForm: vv(A, U || []),
13548
13554
  action: "update",
13549
13555
  "onSubmit:form": async (G) => {
13550
13556
  G.inventoryBindings ?? (G.inventoryBindings = []), G.inventoryBindings.length === 0 && (G.inventoryBindings = null), await F(
@@ -13558,41 +13564,41 @@ const Hn = Zi("item-manager", () => {
13558
13564
  }
13559
13565
  });
13560
13566
  }
13561
- async function d(x) {
13567
+ async function d(A) {
13562
13568
  var w;
13563
- const U = e.currentCatalog, F = e.state.currentSchedulerId, G = U.override.scheduler[F] ?? {}, H = (w = G == null ? void 0 : G.items) == null ? void 0 : w.filter(($) => $._id === x._id);
13564
- await u(x, H, async ($) => {
13569
+ const U = e.currentCatalog, F = e.state.currentSchedulerId, G = U.override.scheduler[F] ?? {}, H = (w = G == null ? void 0 : G.items) == null ? void 0 : w.filter(($) => $._id === A._id);
13570
+ await u(A, H, async ($) => {
13565
13571
  const N = $.modules.catalog.find(
13566
13572
  (Q) => Q._id === U._id
13567
13573
  );
13568
13574
  await new vt(N, e, i.updateMenu, n).update();
13569
13575
  });
13570
13576
  }
13571
- async function c(x) {
13577
+ async function c(A) {
13572
13578
  const U = e.currentCatalog;
13573
- await u(x, U.override.items[x._id], async (F) => {
13579
+ await u(A, U.override.items[A._id], async (F) => {
13574
13580
  const G = F.modules.catalog.find(
13575
13581
  (H) => H._id === U._id
13576
13582
  );
13577
13583
  await new vt(G, e, i.updateMenu, n).update();
13578
13584
  });
13579
13585
  }
13580
- async function p(x) {
13586
+ async function p(A) {
13581
13587
  const U = e.schedulers.find(
13582
13588
  (G) => G._id === e.state.currentSchedulerId
13583
- ), F = U.items.filter((G) => G._id === x._id);
13584
- await u(x, F, async (G) => {
13589
+ ), F = U.items.filter((G) => G._id === A._id);
13590
+ await u(A, F, async (G) => {
13585
13591
  const H = G.modules.scheduler.find(
13586
13592
  (w) => w._id === U._id
13587
13593
  );
13588
13594
  await new kn(H, e, i.updateMenu, n).update();
13589
13595
  });
13590
13596
  }
13591
- async function f(x) {
13597
+ async function f(A) {
13592
13598
  var H, w;
13593
13599
  const U = e.state.currentSchedulerId, F = Te(e.currentCatalog), G = (w = ((H = F.override.scheduler[U]) == null ? void 0 : H.items) || []) == null ? void 0 : w.reduce(($, N) => {
13594
13600
  if (N.combinationKey) return [...$, N];
13595
- const Q = x.find((se) => se._id === N._id);
13601
+ const Q = A.find((se) => se._id === N._id);
13596
13602
  return Q ? [...$, { ...N, price: Q.price }] : [...$, N];
13597
13603
  }, []);
13598
13604
  F.override.scheduler = {
@@ -13604,11 +13610,11 @@ const Hn = Zi("item-manager", () => {
13604
13610
  }
13605
13611
  }, await new vt(F, e, i.updateMenu, n).update();
13606
13612
  }
13607
- async function g(x) {
13613
+ async function g(A) {
13608
13614
  var H;
13609
13615
  const U = Te(e.currentCatalog), F = (H = Object.entries(U.override.items)) == null ? void 0 : H.reduce(
13610
13616
  (w, [$, N]) => {
13611
- const Q = x.find((K) => K._id === $);
13617
+ const Q = A.find((K) => K._id === $);
13612
13618
  if (!Q)
13613
13619
  return w[$] = N, w;
13614
13620
  const se = N.find((K) => !K.combinationKey);
@@ -13638,10 +13644,10 @@ const Hn = Zi("item-manager", () => {
13638
13644
  n
13639
13645
  ).update();
13640
13646
  }
13641
- async function k(x) {
13647
+ async function k(A) {
13642
13648
  const U = Te(e.currentScheduler), F = U.items.reduce((G, H) => {
13643
13649
  if (H.combinationKey) return [...G, H];
13644
- const w = x.find(($) => $._id === H._id);
13650
+ const w = A.find(($) => $._id === H._id);
13645
13651
  return w ? [...G, { ...H, price: w.price }] : [...G, H];
13646
13652
  }, []);
13647
13653
  await new kn(
@@ -13654,8 +13660,8 @@ const Hn = Zi("item-manager", () => {
13654
13660
  n
13655
13661
  ).update();
13656
13662
  }
13657
- async function b(x) {
13658
- const U = new Map(e.state.menu.modules.item.map((H) => [H._id, H])), F = x.reduce((H, w) => {
13663
+ async function b(A) {
13664
+ const U = new Map(e.state.menu.modules.item.map((H) => [H._id, H])), F = A.reduce((H, w) => {
13659
13665
  const $ = U.get(w._id);
13660
13666
  return $ && H.push({
13661
13667
  ...$,
@@ -13679,28 +13685,28 @@ const Hn = Zi("item-manager", () => {
13679
13685
  `${F.length} products`
13680
13686
  );
13681
13687
  }
13682
- function v(x) {
13688
+ function v(A) {
13683
13689
  const { saveMenuWithImages: U } = i;
13684
13690
  l({
13685
- initialForm: x,
13691
+ initialForm: A,
13686
13692
  action: "update",
13687
13693
  "onSubmit:form": async (F, G) => {
13688
13694
  F.inventoryBindings ?? (F.inventoryBindings = []), F.inventoryBindings.length === 0 && (F.inventoryBindings = null), await U(F, Ne.F_OPERATION_TYPE.update, G);
13689
13695
  }
13690
13696
  });
13691
13697
  }
13692
- async function A(x) {
13693
- const U = e.state.menu.modules.item.find((F) => F._id === x);
13698
+ async function x(A) {
13699
+ const U = e.state.menu.modules.item.find((F) => F._id === A);
13694
13700
  e.currentCatalog ? e.state.currentSchedulerId ? await d(U) : await c(U) : e.state.currentSchedulerId ? await p(U) : v(U);
13695
13701
  }
13696
- async function S(x) {
13697
- e.currentCatalog ? e.currentScheduler ? await f(x) : await g(x) : (
13702
+ async function S(A) {
13703
+ e.currentCatalog ? e.currentScheduler ? await f(A) : await g(A) : (
13698
13704
  // If Main
13699
- e.currentScheduler ? await k(x) : await b(x)
13705
+ e.currentScheduler ? await k(A) : await b(A)
13700
13706
  );
13701
13707
  }
13702
- function j(x) {
13703
- const { updateMenu: U } = i, F = x.length > 1 ? `${x.length} products` : x[0].name;
13708
+ function j(A) {
13709
+ const { updateMenu: U } = i, F = A.length > 1 ? `${A.length} products` : A[0].name;
13704
13710
  n.open({
13705
13711
  title: r("menu.common.dialog.remove.product.title"),
13706
13712
  message: r("menu.common.dialog.remove.product.message", { name: F }),
@@ -13715,7 +13721,7 @@ const Hn = Zi("item-manager", () => {
13715
13721
  }
13716
13722
  }).onPrimary(async () => {
13717
13723
  await U(
13718
- x.map(({ _id: G }) => ({
13724
+ A.map(({ _id: G }) => ({
13719
13725
  module: Be.enum.item,
13720
13726
  operation: Ne.F_OPERATION_TYPE.delete,
13721
13727
  data: G
@@ -13724,7 +13730,7 @@ const Hn = Zi("item-manager", () => {
13724
13730
  !0
13725
13731
  );
13726
13732
  try {
13727
- await Hr(x.map(({ _id: G }) => G));
13733
+ await Hr(A.map(({ _id: G }) => G));
13728
13734
  } catch (G) {
13729
13735
  console.error("Failed to clean up deleted product images", G);
13730
13736
  }
@@ -13734,34 +13740,34 @@ const Hn = Zi("item-manager", () => {
13734
13740
  });
13735
13741
  });
13736
13742
  }
13737
- async function I(x) {
13743
+ async function I(A) {
13738
13744
  e.currentScheduler ? await new kn(
13739
13745
  e.currentScheduler,
13740
13746
  e,
13741
13747
  i.updateMenu,
13742
13748
  n
13743
- ).unlinkProduct(x.map((U) => U._id)) : e.currentCatalog ? await new vt(
13749
+ ).unlinkProduct(A.map((U) => U._id)) : e.currentCatalog ? await new vt(
13744
13750
  e.currentCatalog,
13745
13751
  e,
13746
13752
  i.updateMenu,
13747
13753
  n
13748
- ).unlinkProduct(x.map((U) => U._id)) : j(x);
13754
+ ).unlinkProduct(A.map((U) => U._id)) : j(A);
13749
13755
  }
13750
- async function T(x) {
13756
+ async function T(A) {
13751
13757
  const { updateMenu: U } = i;
13752
13758
  await U(
13753
13759
  {
13754
13760
  module: Be.enum.item,
13755
13761
  operation: Ne.F_OPERATION_TYPE.rearrange,
13756
- data: x
13762
+ data: A
13757
13763
  },
13758
13764
  "Products"
13759
13765
  );
13760
13766
  }
13761
13767
  return {
13762
- initDynamicGroupItem: (x) => fr(e, x),
13768
+ initDynamicGroupItem: (A) => fr(e, A),
13763
13769
  create: s,
13764
- update: A,
13770
+ update: x,
13765
13771
  updateMany: S,
13766
13772
  deleteItem: I,
13767
13773
  rearrange: T
@@ -13772,13 +13778,13 @@ export {
13772
13778
  sf as A,
13773
13779
  Ln as B,
13774
13780
  un as C,
13775
- Po as D,
13781
+ Vo as D,
13776
13782
  La as E,
13777
13783
  Zt as F,
13778
13784
  _l as G,
13779
13785
  fl as H,
13780
13786
  Zs as I,
13781
- No as J,
13787
+ Lo as J,
13782
13788
  Hc as K,
13783
13789
  Dd as L,
13784
13790
  nl as M,
@@ -13788,10 +13794,10 @@ export {
13788
13794
  _s as Q,
13789
13795
  Gn as R,
13790
13796
  xm as S,
13791
- ti as T,
13797
+ oi as T,
13792
13798
  Wn as U,
13793
13799
  mr as V,
13794
- Fo as W,
13800
+ Mo as W,
13795
13801
  mh as X,
13796
13802
  Ph as Y,
13797
13803
  Bh as Z,
@@ -13807,7 +13813,7 @@ export {
13807
13813
  Eg as a7,
13808
13814
  Lg as a8,
13809
13815
  ph as a9,
13810
- ei as aa,
13816
+ ni as aa,
13811
13817
  $t as ab,
13812
13818
  Bg as ac,
13813
13819
  Gs as ad,
@@ -13815,10 +13821,10 @@ export {
13815
13821
  tb as af,
13816
13822
  mc as ag,
13817
13823
  Da as ah,
13818
- bi as ai,
13819
- qi as aj,
13824
+ yi as ai,
13825
+ Yi as aj,
13820
13826
  uf as ak,
13821
- Xi as al,
13827
+ Zi as al,
13822
13828
  Jv as am,
13823
13829
  eb as an,
13824
13830
  ga as ao,
@@ -13826,7 +13832,7 @@ export {
13826
13832
  pr as aq,
13827
13833
  fd as b,
13828
13834
  db as c,
13829
- To as d,
13835
+ Io as d,
13830
13836
  pn as e,
13831
13837
  Ba as f,
13832
13838
  Tm as g,
@@ -13844,7 +13850,7 @@ export {
13844
13850
  cb as s,
13845
13851
  mb as t,
13846
13852
  Am as u,
13847
- Ki as v,
13853
+ qi as v,
13848
13854
  Hn as w,
13849
13855
  gv as x,
13850
13856
  vv as y,