@feedmepos/mf-menu 0.21.8-prod → 0.21.10-prod

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 (55) hide show
  1. package/dist/{App-BY_QjRIC.js → App-Cqqr1FMN.js} +4 -4
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DtpXBarK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-B7LFtSd0.js} +2 -2
  3. package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-C2u8bQp3.js → ApplyProducts.vue_vue_type_script_setup_true_lang-CA48nytX.js} +2 -2
  4. package/dist/{Catalog-C251QPaW.js → Catalog-CFaEPRa5.js} +4 -4
  5. package/dist/{Category-BJV13A6K.js → Category-XHuzfuRY.js} +6 -6
  6. package/dist/{CookingGuide-C-8hQkAU.js → CookingGuide-C2R19-x4.js} +4 -4
  7. package/dist/{Group-CM00N4hu.js → Group-BycuVQ_g.js} +1 -1
  8. package/dist/{Group-DE1nxY1R.js → Group-CKm6d6aa.js} +3 -3
  9. package/dist/{Group.vue_vue_type_script_setup_true_lang-COEvYdPZ.js → Group.vue_vue_type_script_setup_true_lang-ChaxUtGu.js} +7 -7
  10. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BGOmM4TR.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-wIM5whvh.js} +2 -2
  11. package/dist/{Ingredient-C-O2DHOL.js → Ingredient-LWHZ0pws.js} +4 -4
  12. package/dist/{LinkProductBlock.vue_vue_type_script_setup_true_lang-ZD7-iUDR.js → LinkProductBlock.vue_vue_type_script_setup_true_lang-C-tdT1tM.js} +1 -1
  13. package/dist/{LinkProductSideSheet-pDrPZtug.js → LinkProductSideSheet-DHo_GMdp.js} +3 -3
  14. package/dist/{PrintRoute-B7iYq5SX.js → PrintRoute-5XkqWBcb.js} +4 -4
  15. package/dist/{Product-BUzljZI1.js → Product-BEG1iolC.js} +1 -1
  16. package/dist/{Product.vue_vue_type_script_setup_true_lang-CP1pGBh7.js → Product.vue_vue_type_script_setup_true_lang-B0y6FKvn.js} +11 -11
  17. package/dist/{Products-DY5e-9_I.js → Products-Bz9QEQpq.js} +8 -8
  18. package/dist/{Publish-DaTktE2a.js → Publish-ncV6kyRx.js} +5 -5
  19. package/dist/{Recipe-PUX6HThW.js → Recipe-CbQvc935.js} +5 -5
  20. package/dist/{Scheduler-DwAtkTX9.js → Scheduler-C80c53g5.js} +3 -3
  21. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-Dp0LMTj9.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-BpYeMaaD.js} +1 -1
  22. package/dist/{ServingSequence-CkrgFbYt.js → ServingSequence-DeogC-9n.js} +4 -4
  23. package/dist/{Setting-CajXYT-7.js → Setting-DkoDij9h.js} +1 -1
  24. package/dist/{Setting.vue_vue_type_script_setup_true_lang-jhPndTMM.js → Setting.vue_vue_type_script_setup_true_lang-DaAIQGK3.js} +3 -3
  25. package/dist/{Takeaway-FefaJWQO.js → Takeaway-D58tzZRv.js} +1 -1
  26. package/dist/{Takeaway-CN9iB5tR.js → Takeaway-D5hW9DnW.js} +4 -4
  27. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-ClJ4u9y9.js → Takeaway.vue_vue_type_script_setup_true_lang-DrTVsPRy.js} +5 -5
  28. package/dist/{TaxSetting-C-DZ79iY.js → TaxSetting-RjBy9ZCd.js} +4 -4
  29. package/dist/{Unit-BJ4klCAx.js → Unit-DwqcfeO2.js} +2 -2
  30. package/dist/{Variant-Cnv1MrZ6.js → Variant-wF38aSNq.js} +3 -3
  31. package/dist/{_id_-Dpgw2PYp.js → _id_-_HTVqRmi.js} +7 -7
  32. package/dist/{app-CInsqjGW.js → app-BM0bhnK6.js} +1 -1
  33. package/dist/{app-DTFGvl7U.js → app-DJmcz41f.js} +46 -46
  34. package/dist/app.js +1 -1
  35. package/dist/assets/linked-status-BHs3UqFv.js +24 -0
  36. package/dist/assets/validate-menu-BhsS44Sc.js +24 -0
  37. package/dist/{catalog-voWywvfj.js → catalog-BNaRJpDP.js} +1 -1
  38. package/dist/{catalog-DNGvDMHq.js → catalog-W6P2mgrN.js} +500 -500
  39. package/dist/{category-DMA9ib69.js → category-5RCQ5UCy.js} +1 -1
  40. package/dist/{currency-D7-UhwVA.js → currency-BfrIopKS.js} +1 -1
  41. package/dist/{index-C1UuVEBs.js → index-BATGE1Al.js} +3 -3
  42. package/dist/{index-BSoi7PXv.js → index-C2aWSNeO.js} +2 -2
  43. package/dist/{item-DdMIqCSm.js → item-DqSRqmWK.js} +972 -968
  44. package/dist/{lodash-CSGQuCRQ.js → lodash-BVnOtv5E.js} +1 -1
  45. package/dist/{menu-BuM-nSQQ.js → menu-C3kUJE5T.js} +21792 -22808
  46. package/dist/{menu-Dx83P9he.js → menu-jEf53sVm.js} +1 -1
  47. package/dist/remy-CxcvWX4b.js +37 -0
  48. package/dist/{scheduler-DhAILNbI.js → scheduler-D-31Jasf.js} +4 -4
  49. package/dist/{takeaway-DIaInEwS.js → takeaway-DdLxTFoq.js} +4 -4
  50. package/dist/{toExcel-CfKFGOE1.js → toExcel-D3BkhEBi.js} +2 -2
  51. package/dist/{unit-BzXfYi29.js → unit-B6A684Kq.js} +2 -2
  52. package/package.json +2 -2
  53. package/dist/assets/linked-status-h_fQGeNW.js +0 -24
  54. package/dist/assets/validate-menu-CPaSkIKK.js +0 -24
  55. package/dist/remy-BI653xuL.js +0 -37
@@ -1,27 +1,27 @@
1
1
  import { defineStore as Fi } from "pinia";
2
- import { G as L, J as ye, $ as mn, a0 as hn, a1 as pn, H as oe, z as _e, B as we, a2 as Ei, x as he, a3 as fi, a4 as fn, A as Ye, K as He, V as Ot, U as gn, a5 as vn, W as bn, a6 as gi, a7 as yn } from "./menu-BuM-nSQQ.js";
3
- import { useDialog as Ue, useSnackbar as Be, components as ke, useDialogChild as Ii, FmButtonVariant as Ge, FmButtonColorThemeVariant as Ve, useBreakpoints as Pi } from "@feedmepos/ui-library";
4
- import { C as Pe } from "./catalog-voWywvfj.js";
5
- import { openBlock as z, createElementBlock as q, createElementVNode as T, defineComponent as le, computed as D, resolveComponent as G, createVNode as C, unref as p, createBlock as K, renderSlot as pe, withCtx as N, Fragment as Re, renderList as Ke, resolveDynamicComponent as bt, withDirectives as Xe, vShow as _t, mergeProps as Di, withModifiers as wt, createCommentVNode as ee, ref as Q, createTextVNode as yt, toDisplayString as se, normalizeClass as Ee, onMounted as Qe, resolveDirective as Ut, h as ue, watch as Ce, Transition as _n, onBeforeUnmount as wn, normalizeProps as Sn, guardReactiveProps as Cn, normalizeStyle as Rn, nextTick as An, getCurrentInstance as xn, render as kn } from "vue";
6
- import { p as Ht, u as Mn } from "./app-DTFGvl7U.js";
7
- import { useI18n as ce, useCoreStore as Xt, CustomAttributesForm as On } from "@feedmepos/mf-common";
8
- import { u as zn } from "./category-DMA9ib69.js";
9
- import { R as Te } from "./remy-BI653xuL.js";
2
+ import { G as L, J as ye, $ as hn, a0 as pn, a1 as fn, H as oe, z as _e, B as we, a2 as Ei, x as he, a3 as fi, a4 as gn, A as Ye, K as He, V as Ot, U as vn, a5 as bn, W as yn, a6 as gi, a7 as _n } from "./menu-C3kUJE5T.js";
3
+ import { useDialog as $e, useSnackbar as Be, components as ke, useDialogChild as Ii, FmButtonVariant as Ke, FmButtonColorThemeVariant as Ne, useBreakpoints as Pi } from "@feedmepos/ui-library";
4
+ import { C as Pe } from "./catalog-BNaRJpDP.js";
5
+ import { openBlock as z, createElementBlock as q, createElementVNode as T, defineComponent as le, computed as D, resolveComponent as K, createVNode as C, unref as p, createBlock as G, renderSlot as pe, withCtx as N, Fragment as Ae, renderList as Ge, resolveDynamicComponent as bt, withDirectives as Xe, vShow as _t, mergeProps as Di, withModifiers as wt, createCommentVNode as ee, ref as Q, createTextVNode as yt, toDisplayString as se, normalizeClass as Ee, onMounted as ot, resolveDirective as Ut, h as ue, watch as Ce, Transition as wn, onBeforeUnmount as Sn, normalizeProps as Cn, guardReactiveProps as An, normalizeStyle as Rn, nextTick as xn, getCurrentInstance as kn, render as Mn } from "vue";
6
+ import { p as Ht, u as On } from "./app-DJmcz41f.js";
7
+ import { useI18n as ce, useCoreStore as Xt, CustomAttributesForm as zn } from "@feedmepos/mf-common";
8
+ import { u as Fn } from "./category-5RCQ5UCy.js";
9
+ import { R as Te } from "./remy-CxcvWX4b.js";
10
10
  import { a as Ti, _ as vi } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
11
- import { _ as $e, a as Fn } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
11
+ import { _ as Ve, a as En } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
12
12
  import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- import { _ as et } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
14
- import { f as st } from "./currency-D7-UhwVA.js";
15
- import { c as ct, u as En } from "./search-CcGJKqRo.js";
16
- import { _ as Je, T as In, l as $t } from "./takeaway-DIaInEwS.js";
13
+ import { _ as Je } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
14
+ import { f as st } from "./currency-BfrIopKS.js";
15
+ import { c as ct, u as In } from "./search-CcGJKqRo.js";
16
+ import { _ as Qe, T as Pn, l as $t } from "./takeaway-DdLxTFoq.js";
17
17
  import { V as Ui } from "./vuedraggable-WU01qJgi.js";
18
- import { l as Le, u as Pn } from "./lodash-CSGQuCRQ.js";
19
- import { V as bi } from "./index-C1UuVEBs.js";
18
+ import { l as Ue, u as $i } from "./lodash-BVnOtv5E.js";
19
+ import { V as bi } from "./index-BATGE1Al.js";
20
20
  import { s as Vt, F as Dn } from "./object-BN9wCbKv.js";
21
- import { L as Tn } from "./LinkProductSideSheet-pDrPZtug.js";
22
- import { useInventoryStore as $i, InventoryBindingForm as Un, InventoryBindingSummary as $n } from "@feedmepos/mf-inventory-portal";
21
+ import { L as Tn } from "./LinkProductSideSheet-DHo_GMdp.js";
22
+ import { useInventoryStore as Vi, InventoryBindingForm as Un, InventoryBindingSummary as $n } from "@feedmepos/mf-inventory-portal";
23
23
  import { c as Vn } from "./string-DpfFixWH.js";
24
- import { _ as Nn } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DtpXBarK.js";
24
+ import { _ as Nn } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-B7LFtSd0.js";
25
25
  import { c as Ln } from "./createComponentProgrammatically-Bt2rn1IQ.js";
26
26
  const Bn = {
27
27
  xmlns: "http://www.w3.org/2000/svg",
@@ -29,7 +29,7 @@ const Bn = {
29
29
  height: "24",
30
30
  fill: "none"
31
31
  };
32
- function Gn(e, i) {
32
+ function Kn(e, i) {
33
33
  return z(), q("svg", Bn, i[0] || (i[0] = [
34
34
  T("g", {
35
35
  stroke: "#1C1C1E",
@@ -41,7 +41,7 @@ function Gn(e, i) {
41
41
  ], -1)
42
42
  ]));
43
43
  }
44
- const Kn = { render: Gn }, Wn = {
44
+ const Gn = { render: Kn }, Wn = {
45
45
  xmlns: "http://www.w3.org/2000/svg",
46
46
  width: "24",
47
47
  height: "24",
@@ -247,7 +247,7 @@ class gt {
247
247
  const a = i.reduce((r, l) => {
248
248
  const s = t.items.filter((u) => u._id == l) ?? [];
249
249
  return r = r.concat(
250
- mn(l, s, (u) => ({
250
+ hn(l, s, (u) => ({
251
251
  ...u,
252
252
  orderFrom: null
253
253
  }))
@@ -260,10 +260,10 @@ class gt {
260
260
  }
261
261
  }
262
262
  getAvailableItemForLink() {
263
- const i = hn(
263
+ const i = pn(
264
264
  this.menuStore.variants,
265
265
  this.menuStore.categories,
266
- pn(this.menuStore.state.menu.modules.item, (a) => a.code || a.name)
266
+ fn(this.menuStore.state.menu.modules.item, (a) => a.code || a.name)
267
267
  ), t = new Set(
268
268
  this.menuStore.currentCatalog ? Pe.getItemAvailable(this.menuStore.currentCatalog) : this.menuStore.state.menu.modules.item.map((a) => a._id)
269
269
  );
@@ -329,7 +329,7 @@ function qt(e) {
329
329
  items: i
330
330
  };
331
331
  }
332
- function Vi(e) {
332
+ function Ni(e) {
333
333
  const i = qt(e), t = (o) => ["product", "item", "addonGroup", "group"].some((r) => o._id.startsWith(r)), n = i.items.filter((o) => t(o)), a = i.items.filter((o) => !t(o)).map((o) => ({
334
334
  ..._e.generator.initMenuV4Item(),
335
335
  ...o,
@@ -348,7 +348,7 @@ function Vi(e) {
348
348
  linkItems: a
349
349
  };
350
350
  }
351
- class Ni {
351
+ class Li {
352
352
  constructor(i, t, n) {
353
353
  this.menuStore = i, this.updateMenu = t, this.dialog = n;
354
354
  }
@@ -370,19 +370,19 @@ class Ni {
370
370
  modules: {
371
371
  ...r.modules,
372
372
  group: r == null ? void 0 : r.modules.group.reduce((s, u) => {
373
- const d = i.find((m) => m._id === u._id);
373
+ const d = i.find((h) => h._id === u._id);
374
374
  if (!d)
375
375
  return s = [...s, u], s;
376
- const h = d.items.filter(
377
- (m) => !u.items.find(
378
- (c) => c._id === m._id && c.combinationKey === m.combinationKey
376
+ const m = d.items.filter(
377
+ (h) => !u.items.find(
378
+ (c) => c._id === h._id && c.combinationKey === h.combinationKey
379
379
  )
380
380
  );
381
381
  return s = [
382
382
  ...s,
383
383
  {
384
384
  ...u,
385
- items: [...u.items, ...h]
385
+ items: [...u.items, ...m]
386
386
  }
387
387
  ], s;
388
388
  }, [])
@@ -390,8 +390,8 @@ class Ni {
390
390
  };
391
391
  for (let s = 0; s < i.length; s++) {
392
392
  const u = i[s];
393
- !(r == null ? void 0 : r.modules.group.find((h) => {
394
- h._id, u._id;
393
+ !(r == null ? void 0 : r.modules.group.find((m) => {
394
+ m._id, u._id;
395
395
  })) && !u._id && r.modules.group.push(u);
396
396
  }
397
397
  }
@@ -405,34 +405,34 @@ class Ni {
405
405
  mapGroups(i, t) {
406
406
  const n = this.getFallbackPrices(i), a = this.menuStore.state.menu.modules.item, o = this.menuStore.state.menu.modules.group, r = this.menuStore.items;
407
407
  function l(s, u) {
408
- const d = s.items.reduce((m, c) => {
409
- var E, P, R, _;
410
- const y = a.find((A) => c._id === A._id);
411
- if (!y && t) return m;
408
+ const d = s.items.reduce((h, c) => {
409
+ var F, P, R, _;
410
+ const y = a.find((x) => c._id === x._id);
411
+ if (!y && t) return h;
412
412
  const b = c.combinationKey ? {
413
- ...(E = y == null ? void 0 : y.variant) == null ? void 0 : E.variantCombinations.find(
414
- (A) => A.combinationKey === c.combinationKey
413
+ ...(F = y == null ? void 0 : y.variant) == null ? void 0 : F.variantCombinations.find(
414
+ (x) => x.combinationKey === c.combinationKey
415
415
  ),
416
416
  name: Ei(he().variants, ((P = y == null ? void 0 : y.variant) == null ? void 0 : P.variantGroupIds) || [])[c.combinationKey]
417
- } : y, g = (R = o.find((A) => A._id === s._id)) == null ? void 0 : R.items.find((A) => A._id === c._id && A.combinationKey === c.combinationKey), w = !t && !c.combinationKey, F = (_ = u.find(
418
- (A) => A._id == c._id && A.combinationKey == c.combinationKey
419
- )) == null ? void 0 : _.price, M = c.name ?? (g == null ? void 0 : g.name) ?? (b == null ? void 0 : b.name) ?? "", I = {
417
+ } : y, g = (R = o.find((x) => x._id === s._id)) == null ? void 0 : R.items.find((x) => x._id === c._id && x.combinationKey === c.combinationKey), w = !t && !c.combinationKey, E = (_ = u.find(
418
+ (x) => x._id == c._id && x.combinationKey == c.combinationKey
419
+ )) == null ? void 0 : _.price, A = c.name ?? (g == null ? void 0 : g.name) ?? (b == null ? void 0 : b.name) ?? "", I = {
420
420
  ...c,
421
- name: M,
421
+ name: A,
422
422
  code: b == null ? void 0 : b.code,
423
- fallbackName: w ? null : M,
423
+ fallbackName: w ? null : A,
424
424
  price: c.price,
425
- fallbackPrice: w ? null : F,
425
+ fallbackPrice: w ? null : E,
426
426
  orderFrom: c.orderFrom,
427
427
  fallbackOrder: b == null ? void 0 : b.orderFrom
428
428
  };
429
- return [...m, I];
430
- }, []), h = St(a, s.items);
429
+ return [...h, I];
430
+ }, []), m = St(a, s.items);
431
431
  return {
432
432
  ...s,
433
- type: h,
433
+ type: m,
434
434
  items: Hn(d),
435
- itemsLinked: r.filter((m) => m.groups.some(({ _id: c }) => c === s._id)).map((m) => m._id)
435
+ itemsLinked: r.filter((h) => h.groups.some(({ _id: c }) => c === s._id)).map((h) => h._id)
436
436
  };
437
437
  }
438
438
  return i.map((s) => {
@@ -454,7 +454,7 @@ class Ni {
454
454
  ...s,
455
455
  items: (s.items ?? []).map((u) => ({ ...u, _id: "" }))
456
456
  }, r), {}));
457
- const a = Vi(t), o = {
457
+ const a = Ni(t), o = {
458
458
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
459
459
  operation: ye.F_OPERATION_TYPE.create,
460
460
  data: {
@@ -481,21 +481,21 @@ class Ni {
481
481
  }
482
482
  async applyItems(i, t) {
483
483
  function n(s, u) {
484
- const d = s.filter((m) => m._id === i._id), h = s.filter((m) => m._id !== i._id);
485
- return u ? h : [...h, ...d.length ? d : [{ _id: i._id, groupKey: "" }]];
484
+ const d = s.filter((h) => h._id === i._id), m = s.filter((h) => h._id !== i._id);
485
+ return u ? m : [...m, ...d.length ? d : [{ _id: i._id, groupKey: "" }]];
486
486
  }
487
487
  function a(s, u, d) {
488
488
  var c;
489
- const h = n(u.groups, d), m = (((c = u.variant) == null ? void 0 : c.variantCombinations) ?? []).map((y) => {
489
+ const m = n(u.groups, d), h = (((c = u.variant) == null ? void 0 : c.variantCombinations) ?? []).map((y) => {
490
490
  const b = n(y.groups ?? [], d);
491
491
  return { ...y, groups: b };
492
492
  });
493
- return cn(s, {
493
+ return dn(s, {
494
494
  ...u,
495
- groups: h,
495
+ groups: m,
496
496
  variant: u.variant ? {
497
497
  variantGroupIds: u.variant.variantGroupIds,
498
- variantCombinations: m
498
+ variantCombinations: h
499
499
  } : null
500
500
  });
501
501
  }
@@ -516,18 +516,18 @@ class Ni {
516
516
  return !!this.menuStore.state.currentCatalogId || !!this.menuStore.state.currentSchedulerId;
517
517
  }
518
518
  }
519
- const Xn = "/assets/linked-status-h_fQGeNW.js";
519
+ const Xn = "/assets/linked-status-BHs3UqFv.js";
520
520
  function qn(e) {
521
521
  var n;
522
522
  const i = oe(e), t = (n = i.variant) == null ? void 0 : n.variantCombinations;
523
523
  return delete i.variant, delete i.thumbnail, [i, ...t || []];
524
524
  }
525
525
  function Zn(e, i, t, n) {
526
- const a = oe(i), o = t ? a.modules.catalog.find((m) => m._id === t) : null, r = n ? a.modules.scheduler.find((m) => m._id === n) : null, l = o ? oe(o) : void 0, s = t ? a.modules.catalog.filter((m) => m._id !== t) : [], u = r ? oe(r) : void 0, d = e.reduce((m, c) => (m[c._id] = qn(c), m), {});
527
- function h(m = []) {
526
+ const a = oe(i), o = t ? a.modules.catalog.find((h) => h._id === t) : null, r = n ? a.modules.scheduler.find((h) => h._id === n) : null, l = o ? oe(o) : void 0, s = t ? a.modules.catalog.filter((h) => h._id !== t) : [], u = r ? oe(r) : void 0, d = e.reduce((h, c) => (h[c._id] = qn(c), h), {});
527
+ function m(h = []) {
528
528
  const c = e.map((y) => y._id);
529
529
  return [
530
- ...m.filter((y) => !c.includes(y._id)),
530
+ ...h.filter((y) => !c.includes(y._id)),
531
531
  ...Object.values(d).flatMap((y) => y)
532
532
  ];
533
533
  }
@@ -536,16 +536,16 @@ function Zn(e, i, t, n) {
536
536
  [n]: {
537
537
  ...l.override.scheduler[n],
538
538
  _id: n,
539
- items: h(u == null ? void 0 : u.items).map((m) => ({
540
- ...m,
539
+ items: m(u == null ? void 0 : u.items).map((h) => ({
540
+ ...h,
541
541
  orderFrom: L.F_ORDER_FROM.enum.ALL
542
542
  }))
543
543
  }
544
544
  }, a.modules.catalog = [...s, l], a) : l ? (l.override.items = {
545
545
  ...l.override.items,
546
546
  ...d
547
- }, a.modules.catalog = [...s, l], a) : u ? (u.items = h(u.items), a.modules.scheduler = [
548
- ...a.modules.scheduler.filter((m) => m._id !== n),
547
+ }, a.modules.catalog = [...s, l], a) : u ? (u.items = m(u.items), a.modules.scheduler = [
548
+ ...a.modules.scheduler.filter((h) => h._id !== n),
549
549
  u
550
550
  ], a) : {
551
551
  ...fi(),
@@ -566,16 +566,16 @@ function at(e, i, t) {
566
566
  if (!n)
567
567
  throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
568
568
  const a = (o = n.groups) == null ? void 0 : o.map((r) => {
569
- var u, d, h;
570
- const l = (u = e == null ? void 0 : e.groups) == null ? void 0 : u.find((m) => m._id === r._id);
569
+ var u, d, m;
570
+ const l = (u = e == null ? void 0 : e.groups) == null ? void 0 : u.find((h) => h._id === r._id);
571
571
  let s;
572
- return l ? s = ((d = r.items) == null ? void 0 : d.map((m) => {
572
+ return l ? s = ((d = r.items) == null ? void 0 : d.map((h) => {
573
573
  var y;
574
574
  const c = (y = l.items) == null ? void 0 : y.find(
575
- (b) => b._id === m._id && b.combinationKey === m.combinationKey
575
+ (b) => b._id === h._id && b.combinationKey === h.combinationKey
576
576
  );
577
- return at(c || m, i, t + 1);
578
- })) ?? [] : s = ((h = r.items) == null ? void 0 : h.map((m) => at(m, i, t + 1))) ?? [], {
577
+ return at(c || h, i, t + 1);
578
+ })) ?? [] : s = ((m = r.items) == null ? void 0 : m.map((h) => at(h, i, t + 1))) ?? [], {
579
579
  ...r,
580
580
  items: s
581
581
  };
@@ -591,9 +591,9 @@ function at(e, i, t) {
591
591
  function Qn(e, i) {
592
592
  const t = e.groups.map((o) => {
593
593
  const r = i.modules.group.find((s) => s._id === o._id), l = ((r == null ? void 0 : r.items) || []).map((s) => {
594
- var h;
595
- const u = (h = o.items) == null ? void 0 : h.find(
596
- (m) => m._id === s._id && m.combinationKey === s.combinationKey
594
+ var m;
595
+ const u = (m = o.items) == null ? void 0 : m.find(
596
+ (h) => h._id === s._id && h.combinationKey === s.combinationKey
597
597
  );
598
598
  if (u)
599
599
  return at(u, i, 1);
@@ -625,7 +625,7 @@ function Nt(e, i) {
625
625
  return a.items = (l = a.items) == null ? void 0 : l.map((s) => {
626
626
  var d;
627
627
  const u = (d = o == null ? void 0 : o.items) == null ? void 0 : d.find(
628
- (h) => h._id === s._id && h.combinationKey === s.combinationKey
628
+ (m) => m._id === s._id && m.combinationKey === s.combinationKey
629
629
  );
630
630
  return Nt(s, u);
631
631
  }), a;
@@ -663,24 +663,24 @@ function Jn(e, i) {
663
663
  };
664
664
  }
665
665
  async function eo(e, i, t, n, a, o = !0) {
666
- const r = oe(t), l = o ? Zn(i, r, n, a) : r, s = i.reduce((h, m) => (h[m._id] = l.modules.item.find((c) => c._id === m._id), h), {}), u = i.reduce((h, m) => {
667
- const c = m._id;
668
- return h[c] = Qn(s[c], e), h;
666
+ const r = oe(t), l = o ? Zn(i, r, n, a) : r, s = i.reduce((m, h) => (m[h._id] = l.modules.item.find((c) => c._id === h._id), m), {}), u = i.reduce((m, h) => {
667
+ const c = h._id;
668
+ return m[c] = Qn(s[c], e), m;
669
669
  }, {}), d = _e.getFallbackPrices({
670
670
  rawMenu: l,
671
671
  items: u,
672
672
  catalogId: n || void 0,
673
673
  schedulerId: a
674
674
  });
675
- return i.map((h) => {
676
- const m = h._id, c = s[m];
675
+ return i.map((m) => {
676
+ const h = m._id, c = s[h];
677
677
  return {
678
678
  ...Jn(d, c),
679
679
  category: n || a ? c == null ? void 0 : c.category : null
680
680
  };
681
681
  });
682
682
  }
683
- function Li(e, i) {
683
+ function Bi(e, i) {
684
684
  if (e.length === 0) return "";
685
685
  const t = e == null ? void 0 : e.split("variant");
686
686
  return ((t == null ? void 0 : t.reduce((a, o) => {
@@ -698,7 +698,7 @@ async function to(e, i) {
698
698
  const t = `${e._id}-${e.updatedAt}-${i}`;
699
699
  if (zt.has(t))
700
700
  return zt.get(t);
701
- const n = await fn(
701
+ const n = await gn(
702
702
  Xn,
703
703
  JSON.stringify({
704
704
  menu: e,
@@ -772,7 +772,7 @@ const Zt = /* @__PURE__ */ le({
772
772
  value: null
773
773
  },
774
774
  ...d
775
- ]), t.orderFromNone ? d : d.filter((h) => h.value !== L.F_ORDER_FROM.enum.NONE);
775
+ ]), t.orderFromNone ? d : d.filter((m) => m.value !== L.F_ORDER_FROM.enum.NONE);
776
776
  });
777
777
  function l(u) {
778
778
  let d = u;
@@ -780,21 +780,21 @@ const Zt = /* @__PURE__ */ le({
780
780
  }
781
781
  const s = D(() => {
782
782
  if (t.modelValue) return t.modelValue;
783
- const u = t.editActiveOnly || t.required, d = r.value.some((m) => m.value === null), h = u && !d ? t.fallback ?? r.value[0].value : t.modelValue;
784
- return h ? l(h) : null;
783
+ const u = t.editActiveOnly || t.required, d = r.value.some((h) => h.value === null), m = u && !d ? t.fallback ?? r.value[0].value : t.modelValue;
784
+ return m ? l(m) : null;
785
785
  });
786
786
  return (u, d) => {
787
- const h = G("fm-select");
787
+ const m = K("fm-select");
788
788
  return z(), q("div", null, [
789
- C(h, {
789
+ C(m, {
790
790
  disabled: e.disable,
791
791
  items: r.value,
792
792
  label: e.label ?? p(n)("menu.common.labels.order_from"),
793
793
  "menu-z-index": e.menuZIndex,
794
794
  "model-value": s.value,
795
- rules: e.required ? [(m) => !!m || p(n)("menu.common.validation.required_field")] : [],
795
+ rules: e.required ? [(h) => !!h || p(n)("menu.common.validation.required_field")] : [],
796
796
  "shift-menu": "",
797
- "onUpdate:modelValue": d[0] || (d[0] = (m) => a("update:model-value", m ?? null))
797
+ "onUpdate:modelValue": d[0] || (d[0] = (h) => a("update:model-value", h ?? null))
798
798
  }, null, 8, ["disabled", "items", "label", "menu-z-index", "model-value", "rules"])
799
799
  ]);
800
800
  };
@@ -817,22 +817,22 @@ function ie(e) {
817
817
  for (var i = 1; i < arguments.length; i++) {
818
818
  var t = arguments[i] != null ? arguments[i] : {};
819
819
  i % 2 ? yi(Object(t), !0).forEach(function(n) {
820
- Ae(e, n, t[n]);
820
+ Re(e, n, t[n]);
821
821
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : yi(Object(t)).forEach(function(n) {
822
822
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
823
823
  });
824
824
  }
825
825
  return e;
826
826
  }
827
- function Ae(e, i, t) {
827
+ function Re(e, i, t) {
828
828
  return i in e ? Object.defineProperty(e, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[i] = t, e;
829
829
  }
830
830
  function no(e, i) {
831
831
  if (e == null) return {};
832
832
  var t, n, a = function(r, l) {
833
833
  if (r == null) return {};
834
- var s, u, d = {}, h = Object.keys(r);
835
- for (u = 0; u < h.length; u++) s = h[u], l.indexOf(s) >= 0 || (d[s] = r[s]);
834
+ var s, u, d = {}, m = Object.keys(r);
835
+ for (u = 0; u < m.length; u++) s = m[u], l.indexOf(s) >= 0 || (d[s] = r[s]);
836
836
  return d;
837
837
  }(e, i);
838
838
  if (Object.getOwnPropertySymbols) {
@@ -945,7 +945,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
945
945
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
946
946
  PERFORMANCE OF THIS SOFTWARE.
947
947
  ***************************************************************************** */
948
- function Bi(e, i) {
948
+ function Ki(e, i) {
949
949
  var t, n;
950
950
  return e && i ? (t = "" + e + i[0].toUpperCase() + i.slice(1), n = e + "-" + i) : (t = e || i, n = e || i), { name: t, classname: n };
951
951
  }
@@ -966,10 +966,10 @@ function ge(e) {
966
966
  function vt(e) {
967
967
  return typeof e == "object" && e !== null;
968
968
  }
969
- function Gt(e, i, t) {
969
+ function Kt(e, i, t) {
970
970
  var n = {};
971
971
  return vt(e) ? (Object.keys(i).forEach(function(a) {
972
- ge(e[a]) ? n[a] = i[a] : vt(i[a]) ? vt(e[a]) ? n[a] = Gt(e[a], i[a], t[a]) : n[a] = e[a] ? i[a] : t[a] : i[a] === !0 || i[a] === !1 ? n[a] = !!e[a] : n[a] = e[a];
972
+ ge(e[a]) ? n[a] = i[a] : vt(i[a]) ? vt(e[a]) ? n[a] = Kt(e[a], i[a], t[a]) : n[a] = e[a] ? i[a] : t[a] : i[a] === !0 || i[a] === !1 ? n[a] = !!e[a] : n[a] = e[a];
973
973
  }), n) : e ? i : t;
974
974
  }
975
975
  function mt(e) {
@@ -979,12 +979,12 @@ function mt(e) {
979
979
  function Si(e) {
980
980
  return typeof (e == "number" || /* @__PURE__ */ function(i) {
981
981
  return typeof i == "object" && i !== null;
982
- }(e) && toString.call(e) == "[object Number]") && !Ki(e);
982
+ }(e) && toString.call(e) == "[object Number]") && !Wi(e);
983
983
  }
984
- function Ki(e) {
984
+ function Wi(e) {
985
985
  return e != e;
986
986
  }
987
- function Wi(e, i) {
987
+ function ji(e, i) {
988
988
  return Math.sqrt(Math.pow(e.x - i.x, 2) + Math.pow(e.y - i.y, 2));
989
989
  }
990
990
  var rt = function(e, i) {
@@ -1049,7 +1049,7 @@ var rt = function(e, i) {
1049
1049
  this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = !1), this.touches = [];
1050
1050
  } }, emits: ["drag", "drag-end", "leave", "enter"] };
1051
1051
  Jt.render = function(e, i, t, n, a, o) {
1052
- return z(), K("div", { ref: "draggable", class: t.classname, onTouchstart: i[1] || (i[1] = function() {
1052
+ return z(), G("div", { ref: "draggable", class: t.classname, onTouchstart: i[1] || (i[1] = function() {
1053
1053
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1054
1054
  }), onMousedown: i[2] || (i[2] = function() {
1055
1055
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
@@ -1059,17 +1059,17 @@ Jt.render = function(e, i, t, n, a, o) {
1059
1059
  return o.onMouseLeave && o.onMouseLeave.apply(o, arguments);
1060
1060
  }) }, [pe(e.$slots, "default")], 34);
1061
1061
  };
1062
- var Et = Me("vue-handler-wrapper"), ji = { name: "HandlerWrapper", components: { DraggableElement: Jt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
1062
+ var Et = Me("vue-handler-wrapper"), Yi = { name: "HandlerWrapper", components: { DraggableElement: Jt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
1063
1063
  var e;
1064
1064
  if (this.horizontalPosition || this.verticalPosition) {
1065
- var i, t = Bi(this.horizontalPosition, this.verticalPosition);
1066
- e = Et((Ae(i = {}, t.classname, !0), Ae(i, "disabled", this.disabled), i));
1065
+ var i, t = Ki(this.horizontalPosition, this.verticalPosition);
1066
+ e = Et((Re(i = {}, t.classname, !0), Re(i, "disabled", this.disabled), i));
1067
1067
  } else e = Et({ disabled: this.disabled });
1068
1068
  return { root: e, draggable: Et("draggable") };
1069
1069
  } }, emits: ["leave", "enter", "drag", "drag-end"] };
1070
- ji.render = function(e, i, t, n, a, o) {
1071
- var r = G("DraggableElement");
1072
- return z(), K("div", { class: o.classes.root }, [C(r, { class: o.classes.draggable, onDrag: i[1] || (i[1] = function(l) {
1070
+ Yi.render = function(e, i, t, n, a, o) {
1071
+ var r = K("DraggableElement");
1072
+ return z(), G("div", { class: o.classes.root }, [C(r, { class: o.classes.draggable, onDrag: i[1] || (i[1] = function(l) {
1073
1073
  return e.$emit("drag", l);
1074
1074
  }), onDragEnd: i[2] || (i[2] = function(l) {
1075
1075
  return e.$emit("drag-end");
@@ -1081,13 +1081,13 @@ ji.render = function(e, i, t, n, a, o) {
1081
1081
  return [pe(e.$slots, "default")];
1082
1082
  }), _: 3 }, 8, ["class"])], 2);
1083
1083
  };
1084
- var so = Me("vue-line-wrapper"), Yi = { name: "LineWrapper", components: { DraggableElement: Jt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
1084
+ var so = Me("vue-line-wrapper"), Hi = { name: "LineWrapper", components: { DraggableElement: Jt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
1085
1085
  var e;
1086
- return so((Ae(e = {}, this.position, !0), Ae(e, "disabled", this.disabled), e));
1086
+ return so((Re(e = {}, this.position, !0), Re(e, "disabled", this.disabled), e));
1087
1087
  } }, emits: ["leave", "enter", "drag", "drag-end"] };
1088
- Yi.render = function(e, i, t, n, a, o) {
1089
- var r = G("DraggableElement");
1090
- return z(), K(r, { class: o.classname, onDrag: i[1] || (i[1] = function(l) {
1088
+ Hi.render = function(e, i, t, n, a, o) {
1089
+ var r = K("DraggableElement");
1090
+ return z(), G(r, { class: o.classname, onDrag: i[1] || (i[1] = function(l) {
1091
1091
  return e.$emit("drag", l);
1092
1092
  }), onDragEnd: i[2] || (i[2] = function(l) {
1093
1093
  return e.$emit("drag-end");
@@ -1100,7 +1100,7 @@ Yi.render = function(e, i, t, n, a, o) {
1100
1100
  }), _: 3 }, 8, ["class"]);
1101
1101
  };
1102
1102
  var ze = ["left", "right", "top", "bottom"], lo = ["left", "right"], uo = ["top", "bottom"], co = ["left", "top"], mo = ["fill-area", "fit-area", "stencil", "none"], Ci = { left: 0, top: 0, width: 0, height: 0 };
1103
- function Ri(e, i, t) {
1103
+ function Ai(e, i, t) {
1104
1104
  return !(t = t || ["width", "height", "left", "top"]).some(function(n) {
1105
1105
  return e[n] !== i[n];
1106
1106
  });
@@ -1108,7 +1108,7 @@ function Ri(e, i, t) {
1108
1108
  function Fe(e) {
1109
1109
  return { left: e.left, top: e.top, right: e.left + e.width, bottom: e.top + e.height };
1110
1110
  }
1111
- function tt(e, i) {
1111
+ function et(e, i) {
1112
1112
  return { left: e.left - i.left, top: e.top - i.top };
1113
1113
  }
1114
1114
  function ve(e) {
@@ -1143,10 +1143,10 @@ function xe(e, i, t, n) {
1143
1143
  function ne(e) {
1144
1144
  return e.width / e.height;
1145
1145
  }
1146
- function it(e, i) {
1146
+ function tt(e, i) {
1147
1147
  return Math.min(i.right !== void 0 && i.left !== void 0 ? (i.right - i.left) / e.width : 1 / 0, i.bottom !== void 0 && i.top !== void 0 ? (i.bottom - i.top) / e.height : 1 / 0);
1148
1148
  }
1149
- function nt(e, i) {
1149
+ function it(e, i) {
1150
1150
  var t = { left: 0, top: 0 }, n = lt(e, i);
1151
1151
  return n.left && n.left > 0 ? t.left = n.left : n.right && n.right > 0 && (t.left = -n.right), n.top && n.top > 0 ? t.top = n.top : n.bottom && n.bottom > 0 && (t.top = -n.bottom), t;
1152
1152
  }
@@ -1154,34 +1154,34 @@ function It(e, i) {
1154
1154
  var t;
1155
1155
  return i.minimum && e < i.minimum ? t = i.minimum : i.maximum && e > i.maximum && (t = i.maximum), t;
1156
1156
  }
1157
- function Hi(e, i) {
1157
+ function Xi(e, i) {
1158
1158
  var t = ne(e), n = ne(i);
1159
1159
  return i.width < 1 / 0 && i.height < 1 / 0 ? t > n ? { width: i.width, height: i.width / t } : { width: i.height * t, height: i.height } : i.width < 1 / 0 ? { width: i.width, height: i.width / t } : i.height < 1 / 0 ? { width: i.height * t, height: i.height } : e;
1160
1160
  }
1161
- function Xi(e, i) {
1161
+ function qi(e, i) {
1162
1162
  var t = i * Math.PI / 180;
1163
1163
  return { width: Math.abs(e.width * Math.cos(t)) + Math.abs(e.height * Math.sin(t)), height: Math.abs(e.width * Math.sin(t)) + Math.abs(e.height * Math.cos(t)) };
1164
1164
  }
1165
- function Ne(e, i) {
1165
+ function Le(e, i) {
1166
1166
  var t = i * Math.PI / 180;
1167
1167
  return { left: e.left * Math.cos(t) - e.top * Math.sin(t), top: e.left * Math.sin(t) + e.top * Math.cos(t) };
1168
1168
  }
1169
- function Rt(e, i) {
1169
+ function At(e, i) {
1170
1170
  var t = lt(be(e, i), i);
1171
- return t.left + t.right + t.top + t.bottom ? t.left + t.right > t.top + t.bottom ? Math.min((e.width + t.left + t.right) / e.width, it(e, i)) : Math.min((e.height + t.top + t.bottom) / e.height, it(e, i)) : 1;
1171
+ return t.left + t.right + t.top + t.bottom ? t.left + t.right > t.top + t.bottom ? Math.min((e.width + t.left + t.right) / e.width, tt(e, i)) : Math.min((e.height + t.top + t.bottom) / e.height, tt(e, i)) : 1;
1172
1172
  }
1173
1173
  function be(e, i, t) {
1174
1174
  t === void 0 && (t = !1);
1175
- var n = nt(e, i);
1175
+ var n = it(e, i);
1176
1176
  return Se(e, t ? Ct(n) : n);
1177
1177
  }
1178
- function Kt(e) {
1178
+ function Gt(e) {
1179
1179
  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 };
1180
1180
  }
1181
1181
  function ho(e, i) {
1182
1182
  return Y(Y({}, e), { minWidth: Math.min(i.width, e.minWidth), minHeight: Math.min(i.height, e.minHeight), maxWidth: Math.min(i.width, e.maxWidth), maxHeight: Math.min(i.height, e.maxHeight) });
1183
1183
  }
1184
- function qi(e, i, t) {
1184
+ function Zi(e, i, t) {
1185
1185
  t === void 0 && (t = !0);
1186
1186
  var n = {};
1187
1187
  return ze.forEach(function(a) {
@@ -1189,10 +1189,10 @@ function qi(e, i, t) {
1189
1189
  o !== void 0 && r !== void 0 ? n[a] = a === "left" || a === "top" ? t ? Math.max(o, r) : Math.min(o, r) : t ? Math.min(o, r) : Math.max(o, r) : r !== void 0 ? n[a] = r : o !== void 0 && (n[a] = o);
1190
1190
  }), n;
1191
1191
  }
1192
- function At(e, i) {
1193
- return qi(e, i, !0);
1192
+ function Rt(e, i) {
1193
+ return Zi(e, i, !0);
1194
1194
  }
1195
- function Ai(e) {
1195
+ function Ri(e) {
1196
1196
  var i = e.size, t = e.aspectRatio, n = e.ignoreMinimum, a = e.sizeRestrictions;
1197
1197
  return !!((i.correctRatio || ne(i) >= t.minimum && ne(i) <= t.maximum) && i.height <= a.maxHeight && i.width <= a.maxWidth && i.width && i.height && (n || i.height >= a.minHeight && i.width >= a.minWidth));
1198
1198
  }
@@ -1202,31 +1202,31 @@ function xi(e, i) {
1202
1202
  function De(e) {
1203
1203
  var i = e.width, t = e.height, n = e.sizeRestrictions, a = { minimum: e.aspectRatio && e.aspectRatio.minimum || 0, maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0 }, o = { width: Math.max(n.minWidth, Math.min(n.maxWidth, i)), height: Math.max(n.minHeight, Math.min(n.maxHeight, t)) };
1204
1204
  function r(u, d) {
1205
- return d === void 0 && (d = !1), u.reduce(function(h, m) {
1206
- return Ai({ size: m, aspectRatio: a, sizeRestrictions: n, ignoreMinimum: d }) && (!h || xi(m, { width: i, height: t }) < xi(h, { width: i, height: t })) ? m : h;
1205
+ return d === void 0 && (d = !1), u.reduce(function(m, h) {
1206
+ return Ri({ size: h, aspectRatio: a, sizeRestrictions: n, ignoreMinimum: d }) && (!m || xi(h, { width: i, height: t }) < xi(m, { width: i, height: t })) ? h : m;
1207
1207
  }, null);
1208
1208
  }
1209
1209
  var l = [];
1210
1210
  a && [a.minimum, a.maximum].forEach(function(u) {
1211
1211
  u && l.push({ width: o.width, height: o.width / u, correctRatio: !0 }, { width: o.height * u, height: o.height, correctRatio: !0 });
1212
- }), Ai({ size: o, aspectRatio: a, sizeRestrictions: n }) && l.push(o);
1212
+ }), Ri({ size: o, aspectRatio: a, sizeRestrictions: n }) && l.push(o);
1213
1213
  var s = r(l) || r(l, !0);
1214
1214
  return s && { width: s.width, height: s.height };
1215
1215
  }
1216
1216
  function Wt(e) {
1217
1217
  var i = e.event, t = e.coordinates, n = e.positionRestrictions, a = n === void 0 ? {} : n, o = Se(t, i.directions);
1218
- return Se(o, nt(o, a));
1218
+ return Se(o, it(o, a));
1219
1219
  }
1220
1220
  function po(e) {
1221
- var i = e.coordinates, t = e.transform, n = e.imageSize, a = e.sizeRestrictions, o = e.positionRestrictions, r = e.aspectRatio, l = e.visibleArea, s = function(d, h) {
1222
- return Wt({ coordinates: d, positionRestrictions: o, event: new Qt({ left: h.left - d.left, top: h.top - d.top }) });
1221
+ var i = e.coordinates, t = e.transform, n = e.imageSize, a = e.sizeRestrictions, o = e.positionRestrictions, r = e.aspectRatio, l = e.visibleArea, s = function(d, m) {
1222
+ return Wt({ coordinates: d, positionRestrictions: o, event: new Qt({ left: m.left - d.left, top: m.top - d.top }) });
1223
1223
  }, u = Y({}, i);
1224
1224
  return (Array.isArray(t) ? t : [t]).forEach(function(d) {
1225
- var h = {};
1226
- ge((h = typeof d == "function" ? d({ coordinates: u, imageSize: n, visibleArea: l }) : d).width) && ge(h.height) || (u = function(m, c) {
1227
- var y = Y(Y(Y({}, m), De({ width: c.width, height: c.height, sizeRestrictions: a, aspectRatio: r })), { left: 0, top: 0 });
1228
- return s(y, { left: m.left, top: m.top });
1229
- }(u, Y(Y({}, u), h))), ge(h.left) && ge(h.top) || (u = s(u, Y(Y({}, u), h)));
1225
+ var m = {};
1226
+ ge((m = typeof d == "function" ? d({ coordinates: u, imageSize: n, visibleArea: l }) : d).width) && ge(m.height) || (u = function(h, c) {
1227
+ var y = Y(Y(Y({}, h), De({ width: c.width, height: c.height, sizeRestrictions: a, aspectRatio: r })), { left: 0, top: 0 });
1228
+ return s(y, { left: h.left, top: h.top });
1229
+ }(u, Y(Y({}, u), m))), ge(m.left) && ge(m.top) || (u = s(u, Y(Y({}, u), m)));
1230
1230
  }), u;
1231
1231
  }
1232
1232
  function fo(e) {
@@ -1235,10 +1235,10 @@ function fo(e) {
1235
1235
  e.aspectRatio;
1236
1236
  var o = e.stencilSize, r = e.sizeRestrictions, l = e.positionRestrictions;
1237
1237
  e.stencilReference;
1238
- var s, u, d, h = Y({}, n), m = Y({}, a), c = Y({}, o);
1239
- s = ne(c), u = ne(h), d === void 0 && (d = 1e-3), (s === 0 || u === 0 ? Math.abs(u - s) < d : Math.abs(u / s) < 1 + d && Math.abs(u / s) > 1 - d) || (h = Y(Y({}, h), De({ sizeRestrictions: r, width: h.width, height: h.height, aspectRatio: { minimum: ne(c), maximum: ne(c) } })));
1240
- var y = Rt(m = xe(m, h.width * t.width / (m.width * c.width)), i({ visibleArea: m, type: "resize" }));
1241
- return y !== 1 && (m = xe(m, y), h = xe(h, y)), m = be(m = Se(m, tt(ve(h), ve(m))), i({ visibleArea: m, type: "move" })), { coordinates: h = be(h, At(Fe(m), l)), visibleArea: m };
1238
+ var s, u, d, m = Y({}, n), h = Y({}, a), c = Y({}, o);
1239
+ s = ne(c), u = ne(m), d === void 0 && (d = 1e-3), (s === 0 || u === 0 ? Math.abs(u - s) < d : Math.abs(u / s) < 1 + d && Math.abs(u / s) > 1 - d) || (m = Y(Y({}, m), De({ sizeRestrictions: r, width: m.width, height: m.height, aspectRatio: { minimum: ne(c), maximum: ne(c) } })));
1240
+ var y = At(h = xe(h, m.width * t.width / (h.width * c.width)), i({ visibleArea: h, type: "resize" }));
1241
+ return y !== 1 && (h = xe(h, y), m = xe(m, y)), h = be(h = Se(h, et(ve(m), ve(h))), i({ visibleArea: h, type: "move" })), { coordinates: m = be(m, Rt(Fe(h), l)), visibleArea: h };
1242
1242
  }
1243
1243
  function go(e) {
1244
1244
  var i = e.event, t = e.getAreaRestrictions, n = e.boundaries, a = e.coordinates, o = e.visibleArea;
@@ -1249,8 +1249,8 @@ function go(e) {
1249
1249
  if (a && o && i.type !== "manipulateImage") {
1250
1250
  var u = { width: 0, height: 0 };
1251
1251
  s.width, n.width, ne(n) > ne(l) ? (u.height = 0.8 * n.height, u.width = u.height * ne(l)) : (u.width = 0.8 * n.width, u.height = u.width * ne(l));
1252
- var d = Rt(s = xe(s, l.width * n.width / (s.width * u.width)), t({ visibleArea: s, type: "resize" }));
1253
- s = xe(s, d), d !== 1 && (u.height /= d, u.width /= d), s = be(s = Se(s, tt(ve(l), ve(s))), t({ visibleArea: s, type: "move" })), l = be(l, At(Fe(s), r));
1252
+ var d = At(s = xe(s, l.width * n.width / (s.width * u.width)), t({ visibleArea: s, type: "resize" }));
1253
+ s = xe(s, d), d !== 1 && (u.height /= d, u.width /= d), s = be(s = Se(s, et(ve(l), ve(s))), t({ visibleArea: s, type: "move" })), l = be(l, Rt(Fe(s), r));
1254
1254
  }
1255
1255
  return { coordinates: l, visibleArea: s };
1256
1256
  }
@@ -1258,7 +1258,7 @@ function vo(e) {
1258
1258
  var i = e.event, t = e.coordinates, n = e.visibleArea, a = e.getAreaRestrictions, o = Y({}, n), r = Y({}, t);
1259
1259
  if (i.type === "setCoordinates") {
1260
1260
  var l = Math.max(0, r.width - o.width), s = Math.max(0, r.height - o.height);
1261
- l > s ? o = xe(o, Math.min(r.width / o.width, it(o, a({ visibleArea: o, type: "resize" })))) : s > l && (o = xe(o, Math.min(r.height / o.height, it(o, a({ visibleArea: o, type: "resize" }))))), o = be(o = Se(o, Ct(nt(r, Fe(o)))), a({ visibleArea: o, type: "move" }));
1261
+ l > s ? o = xe(o, Math.min(r.width / o.width, tt(o, a({ visibleArea: o, type: "resize" })))) : s > l && (o = xe(o, Math.min(r.height / o.height, tt(o, a({ visibleArea: o, type: "resize" }))))), o = be(o = Se(o, Ct(it(r, Fe(o)))), a({ visibleArea: o, type: "move" }));
1262
1262
  }
1263
1263
  return { visibleArea: o, coordinates: r };
1264
1264
  }
@@ -1277,74 +1277,74 @@ function _o(e) {
1277
1277
  function wo(e) {
1278
1278
  var i = e.getAreaRestrictions, t = e.coordinates, n = e.imageSize, a = ne(e.boundaries);
1279
1279
  if (t) {
1280
- var o = { height: Math.max(t.height, n.height), width: Math.max(t.width, n.width) }, r = Hi({ width: ne(o) > a ? o.width : o.height * a, height: ne(o) > a ? o.width / a : o.height }, Kt(i())), l = { left: t.left + t.width / 2 - r.width / 2, top: t.top + t.height / 2 - r.height / 2, width: r.width, height: r.height }, s = lt(t, Fe(Y({ left: 0, top: 0 }, n))), u = {};
1280
+ var o = { height: Math.max(t.height, n.height), width: Math.max(t.width, n.width) }, r = Xi({ width: ne(o) > a ? o.width : o.height * a, height: ne(o) > a ? o.width / a : o.height }, Gt(i())), l = { left: t.left + t.width / 2 - r.width / 2, top: t.top + t.height / 2 - r.height / 2, width: r.width, height: r.height }, s = lt(t, Fe(Y({ left: 0, top: 0 }, n))), u = {};
1281
1281
  return !s.left && !s.right && l.width <= n.width && (u.left = 0, u.right = n.width), !s.top && !s.bottom && l.height <= n.height && (u.top = 0, u.bottom = n.height), be(l, u);
1282
1282
  }
1283
1283
  var d = ne(n);
1284
1284
  return r = { height: d > a ? n.height : n.width / a, width: d > a ? n.height * a : n.width }, { left: n.width / 2 - r.width / 2, top: n.height / 2 - r.height / 2, width: r.width, height: r.height };
1285
1285
  }
1286
1286
  function ht(e, i) {
1287
- return qi(e, Fe(i));
1287
+ return Zi(e, Fe(i));
1288
1288
  }
1289
1289
  function So(e) {
1290
- var i = e.event, t = e.coordinates, n = e.visibleArea, a = e.sizeRestrictions, o = e.getAreaRestrictions, r = e.positionRestrictions, l = e.adjustStencil, s = i.scale, u = i.move, d = Y({}, n), h = Y({}, t), m = 1, c = 1, y = s.factor && Math.abs(s.factor - 1) > 1e-3;
1290
+ var i = e.event, t = e.coordinates, n = e.visibleArea, a = e.sizeRestrictions, o = e.getAreaRestrictions, r = e.positionRestrictions, l = e.adjustStencil, s = i.scale, u = i.move, d = Y({}, n), m = Y({}, t), h = 1, c = 1, y = s.factor && Math.abs(s.factor - 1) > 1e-3;
1291
1291
  d = Se(d, { left: u.left || 0, top: u.top || 0 });
1292
- var b = { stencil: { minimum: Math.max(a.minWidth ? a.minWidth / h.width : 0, a.minHeight ? a.minHeight / h.height : 0), maximum: Math.min(a.maxWidth ? a.maxWidth / h.width : 1 / 0, a.maxHeight ? a.maxHeight / h.height : 1 / 0, it(h, r)) }, area: { maximum: it(d, o({ visibleArea: d, type: "resize" })) } };
1292
+ var b = { stencil: { minimum: Math.max(a.minWidth ? a.minWidth / m.width : 0, a.minHeight ? a.minHeight / m.height : 0), maximum: Math.min(a.maxWidth ? a.maxWidth / m.width : 1 / 0, a.maxHeight ? a.maxHeight / m.height : 1 / 0, tt(m, r)) }, area: { maximum: tt(d, o({ visibleArea: d, type: "resize" })) } };
1293
1293
  s.factor && y && (s.factor < 1 ? (c = Math.max(s.factor, b.stencil.minimum)) > 1 && (c = 1) : s.factor > 1 && (c = Math.min(s.factor, Math.min(b.area.maximum, b.stencil.maximum))) < 1 && (c = 1)), c && (d = xe(d, c, s.center));
1294
- var g = t.left - n.left, w = n.width + n.left - (t.width + t.left), F = t.top - n.top, M = n.height + n.top - (t.height + t.top);
1295
- return d = be(d = Se(d, nt(d, { left: r.left !== void 0 ? r.left - g * c : void 0, top: r.top !== void 0 ? r.top - F * c : void 0, bottom: r.bottom !== void 0 ? r.bottom + M * c : void 0, right: r.right !== void 0 ? r.right + w * c : void 0 })), o({ visibleArea: d, type: "move" })), h.width = h.width * c, h.height = h.height * c, h.left = d.left + g * c, h.top = d.top + F * c, h = be(h, At(Fe(d), r)), s.factor && y && l && (s.factor > 1 ? m = Math.min(b.area.maximum, s.factor) / c : s.factor < 1 && (m = Math.max(h.height / d.height, h.width / d.width, s.factor / c)), m !== 1 && (d = Se(d = be(d = xe(d, m, s.factor > 1 ? s.center : ve(h)), o({ visibleArea: d, type: "move" })), Ct(nt(h, Fe(d)))))), { coordinates: h, visibleArea: d };
1294
+ var g = t.left - n.left, w = n.width + n.left - (t.width + t.left), E = t.top - n.top, A = n.height + n.top - (t.height + t.top);
1295
+ return d = be(d = Se(d, it(d, { left: r.left !== void 0 ? r.left - g * c : void 0, top: r.top !== void 0 ? r.top - E * c : void 0, bottom: r.bottom !== void 0 ? r.bottom + A * c : void 0, right: r.right !== void 0 ? r.right + w * c : void 0 })), o({ visibleArea: d, type: "move" })), m.width = m.width * c, m.height = m.height * c, m.left = d.left + g * c, m.top = d.top + E * c, m = be(m, Rt(Fe(d), r)), s.factor && y && l && (s.factor > 1 ? h = Math.min(b.area.maximum, s.factor) / c : s.factor < 1 && (h = Math.max(m.height / d.height, m.width / d.width, s.factor / c)), h !== 1 && (d = Se(d = be(d = xe(d, h, s.factor > 1 ? s.center : ve(m)), o({ visibleArea: d, type: "move" })), Ct(it(m, Fe(d)))))), { coordinates: m, visibleArea: d };
1296
1296
  }
1297
1297
  function Co(e) {
1298
- var i = e.aspectRatio, t = e.getAreaRestrictions, n = e.coordinates, a = e.visibleArea, o = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, d = Y({}, n), h = Y({}, a), m = Ne(ve(Y({ left: 0, top: 0 }, s)), u);
1299
- return (d = Y(Y({}, De({ sizeRestrictions: o, aspectRatio: i, width: d.width, height: d.height })), Ne(ve(d), u))).left -= m.left - l.width / 2 + d.width / 2, d.top -= m.top - l.height / 2 + d.height / 2, h = xe(h, Rt(h, t({ visibleArea: h, type: "resize" }))), { coordinates: d = be(d, r), visibleArea: h = be(h = Se(h, tt(ve(d), ve(n))), t({ visibleArea: h, type: "move" })) };
1298
+ var i = e.aspectRatio, t = e.getAreaRestrictions, n = e.coordinates, a = e.visibleArea, o = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, d = Y({}, n), m = Y({}, a), h = Le(ve(Y({ left: 0, top: 0 }, s)), u);
1299
+ return (d = Y(Y({}, De({ sizeRestrictions: o, aspectRatio: i, width: d.width, height: d.height })), Le(ve(d), u))).left -= h.left - l.width / 2 + d.width / 2, d.top -= h.top - l.height / 2 + d.height / 2, m = xe(m, At(m, t({ visibleArea: m, type: "resize" }))), { coordinates: d = be(d, r), visibleArea: m = be(m = Se(m, et(ve(d), ve(n))), t({ visibleArea: m, type: "move" })) };
1300
1300
  }
1301
- function Ro(e) {
1302
- var i = e.flip, t = e.previousFlip, n = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, r = e.visibleArea, l = e.imageSize, s = Y({}, o), u = Y({}, r), d = t.horizontal !== i.horizontal, h = t.vertical !== i.vertical;
1303
- if (d || h) {
1304
- var m = Ne({ left: l.width / 2, top: l.height / 2 }, -n), c = Ne(ve(s), -n), y = Ne({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, n);
1305
- s = Se(s, tt(y, ve(s))), c = Ne(ve(u), -n), u = be(u = Se(u, tt(y = Ne({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, n), ve(u))), a({ visibleArea: u, type: "move" }));
1301
+ function Ao(e) {
1302
+ var i = e.flip, t = e.previousFlip, n = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, r = e.visibleArea, l = e.imageSize, s = Y({}, o), u = Y({}, r), d = t.horizontal !== i.horizontal, m = t.vertical !== i.vertical;
1303
+ if (d || m) {
1304
+ var h = Le({ left: l.width / 2, top: l.height / 2 }, -n), c = Le(ve(s), -n), y = Le({ left: d ? h.left - (c.left - h.left) : c.left, top: m ? h.top - (c.top - h.top) : c.top }, n);
1305
+ s = Se(s, et(y, ve(s))), c = Le(ve(u), -n), u = be(u = Se(u, et(y = Le({ left: d ? h.left - (c.left - h.left) : c.left, top: m ? h.top - (c.top - h.top) : c.top }, n), ve(u))), a({ visibleArea: u, type: "move" }));
1306
1306
  }
1307
1307
  return { coordinates: s, visibleArea: u };
1308
1308
  }
1309
1309
  function ki(e) {
1310
1310
  var i = e.directions, t = e.coordinates, n = e.positionRestrictions, a = n === void 0 ? {} : n, o = e.sizeRestrictions, r = e.preserveRatio, l = e.compensate, s = Y({}, i), u = Oe(t, s).width, d = Oe(t, s).height;
1311
1311
  u < 0 && (s.left < 0 && s.right < 0 ? (s.left = -(t.width - o.minWidth) / (s.left / s.right), s.right = -(t.width - o.minWidth) / (s.right / s.left)) : s.left < 0 ? s.left = -(t.width - o.minWidth) : s.right < 0 && (s.right = -(t.width - o.minWidth))), d < 0 && (s.top < 0 && s.bottom < 0 ? (s.top = -(t.height - o.minHeight) / (s.top / s.bottom), s.bottom = -(t.height - o.minHeight) / (s.bottom / s.top)) : s.top < 0 ? s.top = -(t.height - o.minHeight) : s.bottom < 0 && (s.bottom = -(t.height - o.minHeight)));
1312
- var h = lt(Oe(t, s), a);
1313
- l && (h.left && h.left > 0 && h.right === 0 ? (s.right += h.left, s.left -= h.left) : h.right && h.right > 0 && h.left === 0 && (s.left += h.right, s.right -= h.right), h.top && h.top > 0 && h.bottom === 0 ? (s.bottom += h.top, s.top -= h.top) : h.bottom && h.bottom > 0 && h.top === 0 && (s.top += h.bottom, s.bottom -= h.bottom), h = lt(Oe(t, s), a));
1314
- var m = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };
1312
+ var m = lt(Oe(t, s), a);
1313
+ l && (m.left && m.left > 0 && m.right === 0 ? (s.right += m.left, s.left -= m.left) : m.right && m.right > 0 && m.left === 0 && (s.left += m.right, s.right -= m.right), m.top && m.top > 0 && m.bottom === 0 ? (s.bottom += m.top, s.top -= m.top) : m.bottom && m.bottom > 0 && m.top === 0 && (s.top += m.bottom, s.bottom -= m.bottom), m = lt(Oe(t, s), a));
1314
+ var h = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };
1315
1315
  if (ze.forEach(function(b) {
1316
- var g = h[b];
1317
- g && s[b] && (m[b] = Math.max(0, 1 - g / s[b]));
1316
+ var g = m[b];
1317
+ g && s[b] && (h[b] = Math.max(0, 1 - g / s[b]));
1318
1318
  }), r) {
1319
1319
  var c = Math.min.apply(null, ze.map(function(b) {
1320
- return m[b];
1320
+ return h[b];
1321
1321
  }));
1322
1322
  c !== 1 / 0 && ze.forEach(function(b) {
1323
1323
  s[b] *= c;
1324
1324
  });
1325
1325
  } else ze.forEach(function(b) {
1326
- m[b] !== 1 / 0 && (s[b] *= m[b]);
1326
+ h[b] !== 1 / 0 && (s[b] *= h[b]);
1327
1327
  });
1328
- if (u = Oe(t, s).width, d = Oe(t, s).height, s.right + s.left && (u > o.maxWidth ? m.width = (o.maxWidth - t.width) / (s.right + s.left) : u < o.minWidth && (m.width = (o.minWidth - t.width) / (s.right + s.left))), s.bottom + s.top && (d > o.maxHeight ? m.height = (o.maxHeight - t.height) / (s.bottom + s.top) : d < o.minHeight && (m.height = (o.minHeight - t.height) / (s.bottom + s.top))), r) {
1329
- var y = Math.min(m.width, m.height);
1328
+ if (u = Oe(t, s).width, d = Oe(t, s).height, s.right + s.left && (u > o.maxWidth ? h.width = (o.maxWidth - t.width) / (s.right + s.left) : u < o.minWidth && (h.width = (o.minWidth - t.width) / (s.right + s.left))), s.bottom + s.top && (d > o.maxHeight ? h.height = (o.maxHeight - t.height) / (s.bottom + s.top) : d < o.minHeight && (h.height = (o.minHeight - t.height) / (s.bottom + s.top))), r) {
1329
+ var y = Math.min(h.width, h.height);
1330
1330
  y !== 1 / 0 && ze.forEach(function(b) {
1331
1331
  s[b] *= y;
1332
1332
  });
1333
- } else m.width !== 1 / 0 && lo.forEach(function(b) {
1334
- s[b] *= m.width;
1335
- }), m.height !== 1 / 0 && uo.forEach(function(b) {
1336
- s[b] *= m.height;
1333
+ } else h.width !== 1 / 0 && lo.forEach(function(b) {
1334
+ s[b] *= h.width;
1335
+ }), h.height !== 1 / 0 && uo.forEach(function(b) {
1336
+ s[b] *= h.height;
1337
1337
  });
1338
1338
  return s;
1339
1339
  }
1340
1340
  function pt(e, i, t) {
1341
1341
  return i == 0 && t == 0 ? e / 2 : i == 0 ? 0 : t == 0 ? e : e * Math.abs(i / (i + t));
1342
1342
  }
1343
- var Ao = Me("vue-simple-handler"), xo = Me("vue-simple-handler-wrapper"), ei = { name: "SimpleHandler", components: { HandlerWrapper: ji }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1343
+ var Ro = Me("vue-simple-handler"), xo = Me("vue-simple-handler-wrapper"), ei = { name: "SimpleHandler", components: { HandlerWrapper: Yi }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1344
1344
  return { hover: !1 };
1345
1345
  }, computed: { classes: function() {
1346
- var e, i = (Ae(e = {}, this.horizontalPosition, !!this.horizontalPosition), Ae(e, this.verticalPosition, !!this.verticalPosition), Ae(e, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), Ae(e, "hover", this.hover), e);
1347
- return { default: me(Ao(i), this.defaultClass, this.hover && this.hoverClass), wrapper: me(xo(i), this.wrapperClass) };
1346
+ var e, i = (Re(e = {}, this.horizontalPosition, !!this.horizontalPosition), Re(e, this.verticalPosition, !!this.verticalPosition), Re(e, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), Re(e, "hover", this.hover), e);
1347
+ return { default: me(Ro(i), this.defaultClass, this.hover && this.hoverClass), wrapper: me(xo(i), this.wrapperClass) };
1348
1348
  } }, methods: { onDrag: function(e) {
1349
1349
  this.$emit("drag", e);
1350
1350
  }, onEnter: function() {
@@ -1355,15 +1355,15 @@ var Ao = Me("vue-simple-handler"), xo = Me("vue-simple-handler-wrapper"), ei = {
1355
1355
  this.$emit("drag-end");
1356
1356
  } }, emits: ["drag", "drag-end"] };
1357
1357
  ei.render = function(e, i, t, n, a, o) {
1358
- var r = G("HandlerWrapper");
1359
- return z(), K(r, { class: o.classes.wrapper, "vertical-position": t.verticalPosition, "horizontal-position": t.horizontalPosition, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: N(function() {
1358
+ var r = K("HandlerWrapper");
1359
+ return z(), G(r, { class: o.classes.wrapper, "vertical-position": t.verticalPosition, "horizontal-position": t.horizontalPosition, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: N(function() {
1360
1360
  return [C("div", { class: o.classes.default }, null, 2)];
1361
1361
  }), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
1362
1362
  };
1363
- var ko = Me("vue-simple-line"), Mo = Me("vue-simple-line-wrapper"), ti = { name: "SimpleLine", components: { LineWrapper: Yi }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1363
+ var ko = Me("vue-simple-line"), Mo = Me("vue-simple-line-wrapper"), ti = { name: "SimpleLine", components: { LineWrapper: Hi }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1364
1364
  return { hover: !1 };
1365
1365
  }, computed: { classes: function() {
1366
- return { root: me(ko(Ae({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: me(Mo(Ae({}, this.position, !0)), this.wrapperClass) };
1366
+ return { root: me(ko(Re({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: me(Mo(Re({}, this.position, !0)), this.wrapperClass) };
1367
1367
  } }, methods: { onDrag: function(e) {
1368
1368
  this.$emit("drag", e);
1369
1369
  }, onEnter: function() {
@@ -1374,12 +1374,12 @@ var ko = Me("vue-simple-line"), Mo = Me("vue-simple-line-wrapper"), ti = { name:
1374
1374
  this.$emit("drag-end");
1375
1375
  } }, emits: ["drag", "drag-end"] };
1376
1376
  ti.render = function(e, i, t, n, a, o) {
1377
- var r = G("LineWrapper");
1378
- return z(), K(r, { class: o.classes.wrapper, position: t.position, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: N(function() {
1377
+ var r = K("LineWrapper");
1378
+ return z(), G(r, { class: o.classes.wrapper, position: t.position, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: N(function() {
1379
1379
  return [C("div", { class: o.classes.root }, null, 2)];
1380
1380
  }), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
1381
1381
  };
1382
- var Pt = Me("vue-bounding-box"), Oo = ["east", "west", null], zo = ["south", "north", null], Zi = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
1382
+ var Pt = Me("vue-bounding-box"), Oo = ["east", "west", null], zo = ["south", "north", null], Qi = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
1383
1383
  return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
1384
1384
  } }, handlersComponent: { type: [Object, String], default: function() {
1385
1385
  return ei;
@@ -1400,7 +1400,7 @@ var Pt = Me("vue-bounding-box"), Oo = ["east", "west", null], zo = ["south", "no
1400
1400
  return Oo.forEach(function(i) {
1401
1401
  zo.forEach(function(t) {
1402
1402
  if (i !== t) {
1403
- var n = Bi(i, t), a = n.name, o = n.classname;
1403
+ var n = Ki(i, t), a = n.name, o = n.classname;
1404
1404
  e.push({ name: a, classname: o, verticalDirection: t, horizontalDirection: i });
1405
1405
  }
1406
1406
  });
@@ -1424,7 +1424,7 @@ var Pt = Me("vue-bounding-box"), Oo = ["east", "west", null], zo = ["south", "no
1424
1424
  if (t && n) {
1425
1425
  var r = a.horizontalDirection, l = a.verticalDirection, s = r === "east" ? t : r === "west" ? 0 : t / 2, u = l === "south" ? n : l === "north" ? 0 : n / 2;
1426
1426
  o.wrapperClass = Pt("handler"), o.wrapperStyle = { transform: "translate(".concat(s, "px, ").concat(u, "px)") }, e.transitions && e.transitions.enabled && (o.wrapperStyle.transition = "".concat(e.transitions.time, "ms ").concat(e.transitions.timingFunction));
1427
- } else o.wrapperClass = Pt("handler", Ae({}, a.classname, !0));
1427
+ } else o.wrapperClass = Pt("handler", Re({}, a.classname, !0));
1428
1428
  i.push(o);
1429
1429
  }
1430
1430
  }), i;
@@ -1440,22 +1440,22 @@ var Pt = Me("vue-bounding-box"), Oo = ["east", "west", null], zo = ["south", "no
1440
1440
  var n, a = e.shift(), o = a.left, r = a.top, l = { left: 0, right: 0, top: 0, bottom: 0 };
1441
1441
  i === "west" ? l.left -= o : i === "east" && (l.right += o), t === "north" ? l.top -= r : t === "south" && (l.bottom += r), !t && i ? n = "width" : t && !i && (n = "height"), this.resizable && this.$emit("resize", new ao(l, { allowedDirections: { left: i === "west" || !i, right: i === "east" || !i, bottom: t === "south" || !t, top: t === "north" || !t }, preserveAspectRatio: e.nativeEvent && e.nativeEvent.shiftKey, respectDirection: n }));
1442
1442
  } }, emits: ["resize", "resize-end"] };
1443
- Zi.render = function(e, i, t, n, a, o) {
1444
- return z(), K("div", { ref: "box", class: o.classes.root, style: o.style }, [pe(e.$slots, "default"), C("div", null, [(z(!0), K(Re, null, Ke(o.lineNodes, function(r) {
1445
- return z(), K(bt(r.component), { key: r.name, "default-class": r.class, "hover-class": r.hoverClass, "wrapper-class": r.wrapperClass, position: r.name, disabled: r.disabled, onDrag: function(l) {
1443
+ Qi.render = function(e, i, t, n, a, o) {
1444
+ return z(), G("div", { ref: "box", class: o.classes.root, style: o.style }, [pe(e.$slots, "default"), C("div", null, [(z(!0), G(Ae, null, Ge(o.lineNodes, function(r) {
1445
+ return z(), G(bt(r.component), { key: r.name, "default-class": r.class, "hover-class": r.hoverClass, "wrapper-class": r.wrapperClass, position: r.name, disabled: r.disabled, onDrag: function(l) {
1446
1446
  return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
1447
1447
  }, onDragEnd: i[1] || (i[1] = function(l) {
1448
1448
  return o.onEnd();
1449
1449
  }) }, null, 8, ["default-class", "hover-class", "wrapper-class", "position", "disabled", "onDrag"]);
1450
- }), 128))]), (z(!0), K(Re, null, Ke(o.handlerNodes, function(r) {
1451
- return z(), K("div", { key: r.name, style: r.wrapperStyle, class: r.wrapperClass }, [(z(), K(bt(r.component), { "default-class": r.class, "hover-class": r.hoverClass, "wrapper-class": r.wrapperClass, "horizontal-position": r.horizontalDirection, "vertical-position": r.verticalDirection, disabled: r.disabled, onDrag: function(l) {
1450
+ }), 128))]), (z(!0), G(Ae, null, Ge(o.handlerNodes, function(r) {
1451
+ return z(), G("div", { key: r.name, style: r.wrapperStyle, class: r.wrapperClass }, [(z(), G(bt(r.component), { "default-class": r.class, "hover-class": r.hoverClass, "wrapper-class": r.wrapperClass, "horizontal-position": r.horizontalDirection, "vertical-position": r.verticalDirection, disabled: r.disabled, onDrag: function(l) {
1452
1452
  return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
1453
1453
  }, onDragEnd: i[2] || (i[2] = function(l) {
1454
1454
  return o.onEnd();
1455
1455
  }) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
1456
1456
  }), 128))], 6);
1457
1457
  };
1458
- var Fo = Me("vue-draggable-area"), Qi = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
1458
+ var Fo = Me("vue-draggable-area"), Ji = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
1459
1459
  return { default: Fo() };
1460
1460
  } }, beforeMount: function() {
1461
1461
  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 });
@@ -1471,7 +1471,7 @@ var Fo = Me("vue-draggable-area"), Qi = { name: "DraggableArea", props: { movabl
1471
1471
  }, onTouchEnd: function() {
1472
1472
  this.touchStarted = !1, this.processEnd();
1473
1473
  }, onTouchMove: function(e) {
1474
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Wi({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: e.touches[0].clientX, y: e.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: e.touches[0].clientX, clientY: e.touches[0].clientY }), this.touchStarted = !0));
1474
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : ji({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: e.touches[0].clientX, y: e.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: e.touches[0].clientX, clientY: e.touches[0].clientY }), this.touchStarted = !0));
1475
1475
  }, onMouseDown: function(e) {
1476
1476
  if (this.movable && e.button === 0) {
1477
1477
  var i = { fake: !0, clientX: e.clientX, clientY: e.clientY };
@@ -1493,8 +1493,8 @@ var Fo = Me("vue-draggable-area"), Qi = { name: "DraggableArea", props: { movabl
1493
1493
  }, processEnd: function() {
1494
1494
  this.touches.length && this.$emit("move-end"), this.touches = [];
1495
1495
  } }, emits: ["move", "move-end"] };
1496
- Qi.render = function(e, i, t, n, a, o) {
1497
- return z(), K("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
1496
+ Ji.render = function(e, i, t, n, a, o) {
1497
+ return z(), G("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
1498
1498
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1499
1499
  }), onMousedown: i[2] || (i[2] = function() {
1500
1500
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
@@ -1509,8 +1509,8 @@ function Eo(e) {
1509
1509
  try {
1510
1510
  if (e) if (/^data:/i.test(e)) i(function(s) {
1511
1511
  s = s.replace(/^data:([^;]+);base64,/gim, "");
1512
- for (var u = atob(s), d = u.length, h = new ArrayBuffer(d), m = new Uint8Array(h), c = 0; c < d; c++) m[c] = u.charCodeAt(c);
1513
- return h;
1512
+ for (var u = atob(s), d = u.length, m = new ArrayBuffer(d), h = new Uint8Array(m), c = 0; c < d; c++) h[c] = u.charCodeAt(c);
1513
+ return m;
1514
1514
  }(e));
1515
1515
  else if (/^blob:/i.test(e)) {
1516
1516
  var n = new FileReader();
@@ -1536,7 +1536,7 @@ function Eo(e) {
1536
1536
  var o, r, l;
1537
1537
  });
1538
1538
  }
1539
- function Ji(e) {
1539
+ function en(e) {
1540
1540
  var i = e.rotate, t = e.flip, n = e.scaleX, a = e.scaleY, o = "";
1541
1541
  return o += " rotate(" + i + "deg) ", o += " scaleX(" + n * (t.horizontal ? -1 : 1) + ") ", o += " scaleY(" + a * (t.vertical ? -1 : 1) + ") ";
1542
1542
  }
@@ -1562,8 +1562,8 @@ function Io(e) {
1562
1562
  }
1563
1563
  }
1564
1564
  if (r) {
1565
- for (var h = t.getUint16(r, a), m = 0; m < h; m++)
1566
- if (s = r + 12 * m + 2, t.getUint16(s, a) === 274) {
1565
+ for (var m = t.getUint16(r, a), h = 0; h < m; h++)
1566
+ if (s = r + 12 * h + 2, t.getUint16(s, a) === 274) {
1567
1567
  s += 8, i = t.getUint16(s, a), t.setUint16(s, 1, a);
1568
1568
  break;
1569
1569
  }
@@ -1578,10 +1578,10 @@ function Mi(e, i) {
1578
1578
  return e.forEach(function(l) {
1579
1579
  o.left += (l.clientX - n) / e.length, o.top += (l.clientY - a) / e.length;
1580
1580
  }), e.forEach(function(l) {
1581
- r += Wi({ x: o.left, y: o.top }, { x: l.clientX - n, y: l.clientY - a });
1581
+ r += ji({ x: o.left, y: o.top }, { x: l.clientX - n, y: l.clientY - a });
1582
1582
  }), { centerMass: o, spread: r, count: e.length };
1583
1583
  }
1584
- var en = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 }, eventsFilter: { type: Function, required: !1 } }, beforeMount: function() {
1584
+ var tn = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 }, eventsFilter: { type: Function, required: !1 } }, beforeMount: function() {
1585
1585
  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 });
1586
1586
  }, beforeUnmount: function() {
1587
1587
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
@@ -1632,13 +1632,13 @@ var en = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
1632
1632
  this.touches = [], this.processEnd();
1633
1633
  }, onWheel: function(e) {
1634
1634
  if (this.wheelResize && this.processEvent(e)) {
1635
- var i = this.$refs.container.getBoundingClientRect(), t = i.left, n = i.top, a = 1 + this.wheelResize.ratio * (r = e.deltaY || e.detail || e.wheelDelta, (l = +r) == 0 || Ki(l) ? l : l > 0 ? 1 : -1), o = { left: e.clientX - t, top: e.clientY - n };
1635
+ var i = this.$refs.container.getBoundingClientRect(), t = i.left, n = i.top, a = 1 + this.wheelResize.ratio * (r = e.deltaY || e.detail || e.wheelDelta, (l = +r) == 0 || Wi(l) ? l : l > 0 ? 1 : -1), o = { left: e.clientX - t, top: e.clientY - n };
1636
1636
  this.$emit("resize", new rt({}, { factor: a, center: o })), this.touches.length || this.debouncedProcessEnd();
1637
1637
  }
1638
1638
  var r, l;
1639
1639
  } }, emits: ["resize", "move", "transform-end"] };
1640
- en.render = function(e, i, t, n, a, o) {
1641
- return z(), K("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
1640
+ tn.render = function(e, i, t, n, a, o) {
1641
+ return z(), G("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
1642
1642
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1643
1643
  }), onMousedown: i[2] || (i[2] = function() {
1644
1644
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
@@ -1646,10 +1646,10 @@ en.render = function(e, i, t, n, a, o) {
1646
1646
  return o.onWheel && o.onWheel.apply(o, arguments);
1647
1647
  }) }, [pe(e.$slots, "default")], 544);
1648
1648
  };
1649
- var jt = { components: { TransformableImage: en }, 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"] };
1649
+ var jt = { components: { TransformableImage: tn }, 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"] };
1650
1650
  jt.render = function(e, i, t, n, a, o) {
1651
- var r = G("transformable-image");
1652
- return z(), K(r, { "touch-move": t.touchMove, "touch-resize": t.touchResize, "mouse-move": t.mouseMove, "wheel-resize": t.wheelResize, onMove: i[1] || (i[1] = function(l) {
1651
+ var r = K("transformable-image");
1652
+ return z(), G(r, { "touch-move": t.touchMove, "touch-resize": t.touchResize, "mouse-move": t.mouseMove, "wheel-resize": t.wheelResize, onMove: i[1] || (i[1] = function(l) {
1653
1653
  return e.$emit("move", l);
1654
1654
  }), onResize: i[2] || (i[2] = function(l) {
1655
1655
  return e.$emit("resize", l);
@@ -1657,7 +1657,7 @@ jt.render = function(e, i, t, n, a, o) {
1657
1657
  return [pe(e.$slots, "default")];
1658
1658
  }), _: 3 }, 8, ["touch-move", "touch-resize", "mouse-move", "wheel-resize"]);
1659
1659
  };
1660
- var ft = Me("vue-preview"), tn = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
1660
+ var ft = Me("vue-preview"), nn = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
1661
1661
  return {};
1662
1662
  } }, imageClass: { type: String }, width: { type: Number }, height: { type: Number }, fill: { type: Boolean } }, data: function() {
1663
1663
  return { calculatedImageSize: { width: 0, height: 0 }, calculatedSize: { width: 0, height: 0 } };
@@ -1672,9 +1672,9 @@ var ft = Me("vue-preview"), tn = { props: { coordinates: { type: Object }, trans
1672
1672
  return this.transitions && this.transitions.enabled && (e.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), e;
1673
1673
  }, imageStyle: function() {
1674
1674
  if (this.coordinates && this.image) {
1675
- var e = this.coordinates.width / this.size.width, i = ie(ie({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / e, scaleY: 1 / e }), t = this.imageSize.width, n = this.imageSize.height, a = Xi({ width: t, height: n }, i.rotate), o = { width: "".concat(t, "px"), height: "".concat(n, "px"), left: "0px", top: "0px" }, r = { rotate: { left: (t - a.width) * i.scaleX / 2, top: (n - a.height) * i.scaleY / 2 }, scale: { left: (1 - i.scaleX) * t / 2, top: (1 - i.scaleY) * n / 2 } };
1675
+ var e = this.coordinates.width / this.size.width, i = ie(ie({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / e, scaleY: 1 / e }), t = this.imageSize.width, n = this.imageSize.height, a = qi({ width: t, height: n }, i.rotate), o = { width: "".concat(t, "px"), height: "".concat(n, "px"), left: "0px", top: "0px" }, r = { rotate: { left: (t - a.width) * i.scaleX / 2, top: (n - a.height) * i.scaleY / 2 }, scale: { left: (1 - i.scaleX) * t / 2, top: (1 - i.scaleY) * n / 2 } };
1676
1676
  return o.transform = `translate(
1677
- `.concat(-this.coordinates.left / e - r.rotate.left - r.scale.left, "px,").concat(-this.coordinates.top / e - r.rotate.top - r.scale.top, "px) ") + Ji(i), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
1677
+ `.concat(-this.coordinates.left / e - r.rotate.left - r.scale.left, "px,").concat(-this.coordinates.top / e - r.rotate.top - r.scale.top, "px) ") + en(i), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
1678
1678
  }
1679
1679
  return {};
1680
1680
  }, size: function() {
@@ -1700,15 +1700,15 @@ var ft = Me("vue-preview"), tn = { props: { coordinates: { type: Object }, trans
1700
1700
  var e = this.$refs.image;
1701
1701
  e && e.complete && this.refreshImage(), this.refresh();
1702
1702
  } } };
1703
- tn.render = function(e, i, t, n, a, o) {
1704
- return z(), K("div", { ref: "root", class: o.classes.root, style: o.style }, [C("div", { ref: "wrapper", class: o.classes.wrapper, style: o.wrapperStyle }, [Xe(C("img", { ref: "image", src: t.image && t.image.src, class: o.classes.image, style: o.imageStyle }, null, 14, ["src"]), [[_t, t.image && t.image.src]])], 6)], 6);
1705
- };
1706
- var nn = { components: { Preview: tn }, inheritAttrs: !1 };
1707
1703
  nn.render = function(e, i, t, n, a, o) {
1708
- var r = G("preview");
1709
- return z(), K(r, Di(e.$attrs, { fill: !0 }), null, 16);
1704
+ return z(), G("div", { ref: "root", class: o.classes.root, style: o.style }, [C("div", { ref: "wrapper", class: o.classes.wrapper, style: o.wrapperStyle }, [Xe(C("img", { ref: "image", src: t.image && t.image.src, class: o.classes.image, style: o.imageStyle }, null, 14, ["src"]), [[_t, t.image && t.image.src]])], 6)], 6);
1710
1705
  };
1711
- var Tt = Me("vue-rectangle-stencil"), on = { name: "RectangleStencil", components: { StencilPreview: nn, BoundingBox: Zi, DraggableArea: Qi }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
1706
+ var on = { components: { Preview: nn }, inheritAttrs: !1 };
1707
+ on.render = function(e, i, t, n, a, o) {
1708
+ var r = K("preview");
1709
+ return z(), G(r, Di(e.$attrs, { fill: !0 }), null, 16);
1710
+ };
1711
+ var Tt = Me("vue-rectangle-stencil"), an = { name: "RectangleStencil", components: { StencilPreview: on, BoundingBox: Qi, DraggableArea: Ji }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
1712
1712
  return ei;
1713
1713
  } }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
1714
1714
  return ti;
@@ -1738,16 +1738,16 @@ var Tt = Me("vue-rectangle-stencil"), on = { name: "RectangleStencil", component
1738
1738
  }, aspectRatios: function() {
1739
1739
  return { minimum: this.aspectRatio || this.minAspectRatio, maximum: this.aspectRatio || this.maxAspectRatio };
1740
1740
  } }, emits: ["resize", "resize-end", "move", "move-end"] };
1741
- on.render = function(e, i, t, n, a, o) {
1742
- var r = G("stencil-preview"), l = G("draggable-area"), s = G("bounding-box");
1743
- return z(), K("div", { class: o.classes.stencil, style: o.style }, [C(s, { width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, transitions: t.transitions, class: o.classes.boundingBox, handlers: t.handlers, "handlers-component": t.handlersComponent, "handlers-classes": t.handlersClasses, "handlers-wrappers-classes": t.handlersWrappersClasses, lines: t.lines, "lines-component": t.linesComponent, "lines-classes": t.linesClasses, "lines-wrappers-classes": t.linesWrappersClasses, resizable: t.resizable, onResize: o.onResize, onResizeEnd: o.onResizeEnd }, { default: N(function() {
1741
+ an.render = function(e, i, t, n, a, o) {
1742
+ var r = K("stencil-preview"), l = K("draggable-area"), s = K("bounding-box");
1743
+ return z(), G("div", { class: o.classes.stencil, style: o.style }, [C(s, { width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, transitions: t.transitions, class: o.classes.boundingBox, handlers: t.handlers, "handlers-component": t.handlersComponent, "handlers-classes": t.handlersClasses, "handlers-wrappers-classes": t.handlersWrappersClasses, lines: t.lines, "lines-component": t.linesComponent, "lines-classes": t.linesClasses, "lines-wrappers-classes": t.linesWrappersClasses, resizable: t.resizable, onResize: o.onResize, onResizeEnd: o.onResizeEnd }, { default: N(function() {
1744
1744
  return [C(l, { movable: t.movable, onMove: o.onMove, onMoveEnd: o.onMoveEnd }, { default: N(function() {
1745
1745
  return [C(r, { image: t.image, coordinates: t.coordinates, width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, class: o.classes.preview, transitions: t.transitions }, null, 8, ["image", "coordinates", "width", "height", "class", "transitions"])];
1746
1746
  }), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
1747
1747
  }), _: 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);
1748
1748
  };
1749
- var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper", components: { BackgroundWrapper: jt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
1750
- return on;
1749
+ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), rn = { name: "Cropper", components: { BackgroundWrapper: jt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
1750
+ return an;
1751
1751
  } }, backgroundWrapperComponent: { type: [Object, String], default: function() {
1752
1752
  return jt;
1753
1753
  } }, stencilProps: { type: Object, default: function() {
@@ -1761,25 +1761,25 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
1761
1761
  o.widthFrozen && (s.left = 0, s.right = 0), o.heightFrozen && (s.top = 0, s.bottom = 0), ze.forEach(function(I) {
1762
1762
  u[I] || (s[I] = 0);
1763
1763
  });
1764
- var d = Oe(r, s = ki({ coordinates: r, directions: s, sizeRestrictions: o, positionRestrictions: a })).width, h = Oe(r, s).height, m = l.preserveRatio ? ne(r) : It(d / h, n);
1765
- if (m) {
1764
+ var d = Oe(r, s = ki({ coordinates: r, directions: s, sizeRestrictions: o, positionRestrictions: a })).width, m = Oe(r, s).height, h = l.preserveRatio ? ne(r) : It(d / m, n);
1765
+ if (h) {
1766
1766
  var c = l.respectDirection;
1767
- if (c || (c = r.width >= r.height || m === 1 ? "width" : "height"), c === "width") {
1768
- var y = d / m - r.height;
1767
+ if (c || (c = r.width >= r.height || h === 1 ? "width" : "height"), c === "width") {
1768
+ var y = d / h - r.height;
1769
1769
  if (u.top && u.bottom) {
1770
1770
  var b = s.top, g = s.bottom;
1771
1771
  s.bottom = pt(y, g, b), s.top = pt(y, b, g);
1772
1772
  } else u.bottom ? s.bottom = y : u.top ? s.top = y : u.right ? s.right = 0 : u.left && (s.left = 0);
1773
1773
  } else if (c === "height") {
1774
- var w = r.width - h * m;
1774
+ var w = r.width - m * h;
1775
1775
  if (u.left && u.right) {
1776
- var F = s.left, M = s.right;
1777
- s.left = -pt(w, F, M), s.right = -pt(w, M, F);
1776
+ var E = s.left, A = s.right;
1777
+ s.left = -pt(w, E, A), s.right = -pt(w, A, E);
1778
1778
  } else u.left ? s.left = -w : u.right ? s.right = -w : u.top ? s.top = 0 : u.bottom && (s.bottom = 0);
1779
1779
  }
1780
1780
  s = ki({ directions: s, coordinates: r, sizeRestrictions: o, positionRestrictions: a, preserveRatio: !0, compensate: l.compensate });
1781
1781
  }
1782
- return d = Oe(r, s).width, h = Oe(r, s).height, (m = l.preserveRatio ? ne(r) : It(d / h, n)) && Math.abs(m - d / h) > 1e-3 && ze.forEach(function(I) {
1782
+ return d = Oe(r, s).width, m = Oe(r, s).height, (h = l.preserveRatio ? ne(r) : It(d / m, n)) && Math.abs(h - d / m) > 1e-3 && ze.forEach(function(I) {
1783
1783
  u[I] || (s[I] = 0);
1784
1784
  }), Wt({ event: new Qt({ left: -s.left, top: -s.top }), coordinates: { width: t.width + s.right + s.left, height: t.height + s.top + s.bottom, left: t.left, top: t.top }, positionRestrictions: a });
1785
1785
  } }, moveAlgorithm: { type: Function, default: Wt }, initStretcher: { type: Function, default: function(e) {
@@ -1787,11 +1787,11 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
1787
1787
  i.style.width = t.width + "px", i.style.height = i.clientWidth / n + "px", i.style.width = i.clientWidth + "px";
1788
1788
  } }, fitCoordinates: { type: Function, default: function(e) {
1789
1789
  var i = e.visibleArea, t = e.coordinates, n = e.aspectRatio, a = e.sizeRestrictions, o = e.positionRestrictions, r = Y(Y({}, t), De({ width: t.width, height: t.height, aspectRatio: n, sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minHeight: Math.min(i.height, a.minHeight), minWidth: Math.min(i.width, a.minWidth) } }));
1790
- return r = be(r = Se(r, tt(ve(t), ve(r))), At(Fe(i), o));
1790
+ return r = be(r = Se(r, et(ve(t), ve(r))), Rt(Fe(i), o));
1791
1791
  } }, fitVisibleArea: { type: Function, default: function(e) {
1792
1792
  var i = e.visibleArea, t = e.boundaries, n = e.getAreaRestrictions, a = e.coordinates, o = Y({}, i);
1793
1793
  o.height = o.width / ne(t), o.top += (i.height - o.height) / 2, (a.height - o.height > 0 || a.width - o.width > 0) && (o = xe(o, Math.max(a.height / o.height, a.width / o.width)));
1794
- var r = Ct(nt(a, Fe(o = xe(o, Rt(o, n({ visibleArea: o, type: "resize" }))))));
1794
+ var r = Ct(it(a, Fe(o = xe(o, At(o, n({ visibleArea: o, type: "resize" }))))));
1795
1795
  return o.width < a.width && (r.left = 0), o.height < a.height && (r.top = 0), o = be(o = Se(o, r), n({ visibleArea: o, type: "move" }));
1796
1796
  } }, areaRestrictionsAlgorithm: { type: Function, default: function(e) {
1797
1797
  var i = e.visibleArea, t = e.boundaries, n = e.imageSize, a = e.imageRestriction, o = e.type, r = {};
@@ -1815,8 +1815,8 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
1815
1815
  }, initialized: function() {
1816
1816
  return !!(this.visibleArea && this.imageLoaded);
1817
1817
  }, settings: function() {
1818
- var e = Gt(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });
1819
- return { moveImage: Gt(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: e };
1818
+ var e = Kt(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });
1819
+ return { moveImage: Kt(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: e };
1820
1820
  }, coefficient: function() {
1821
1821
  return this.visibleArea ? this.visibleArea.width / this.boundaries.width : 0;
1822
1822
  }, areaRestrictions: function() {
@@ -1829,10 +1829,10 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
1829
1829
  if (e = function(n) {
1830
1830
  var a = n.areaRestrictions, o = n.sizeRestrictions, r = n.boundaries, l = n.positionRestrictions, s = Y(Y({}, o), { minWidth: o.minWidth !== void 0 ? o.minWidth : 0, minHeight: o.minHeight !== void 0 ? o.minHeight : 0, maxWidth: o.maxWidth !== void 0 ? o.maxWidth : 1 / 0, maxHeight: o.maxHeight !== void 0 ? o.maxHeight : 1 / 0 });
1831
1831
  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));
1832
- var u = Kt(a), d = Hi(r, u);
1832
+ var u = Gt(a), d = Xi(r, u);
1833
1833
  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;
1834
1834
  }({ 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) {
1835
- var i = this.getStencilSize(), t = Kt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
1835
+ var i = this.getStencilSize(), t = Gt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
1836
1836
  e.maxWidth = Math.min(e.maxWidth, t.width * i.width / this.boundaries.width), e.maxHeight = Math.min(e.maxHeight, t.height * i.height / this.boundaries.height), e.maxWidth < e.minWidth && (e.minWidth = e.maxWidth), e.maxHeight < e.minHeight && (e.minHeight = e.maxHeight);
1837
1837
  }
1838
1838
  return e;
@@ -1852,7 +1852,7 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
1852
1852
  var e = { width: this.boundaries.width ? "".concat(Math.round(this.boundaries.width), "px") : "auto", height: this.boundaries.height ? "".concat(Math.round(this.boundaries.height), "px") : "auto", transition: "opacity ".concat(this.transitionTime, "ms"), pointerEvents: this.imageLoaded ? "all" : "none" };
1853
1853
  return this.imageLoaded || (e.opacity = "0"), e;
1854
1854
  }, imageStyle: function() {
1855
- var e = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, i = { left: (e.width - this.imageSize.width) / (2 * this.coefficient), top: (e.height - this.imageSize.height) / (2 * this.coefficient) }, t = { left: (1 - 1 / this.coefficient) * e.width / 2, top: (1 - 1 / this.coefficient) * e.height / 2 }, n = ie(ie({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height) }), a = { width: "".concat(e.width, "px"), height: "".concat(e.height, "px"), left: "0px", top: "0px", transform: "translate(".concat(-i.left - t.left - this.imageTransforms.translateX, "px, ").concat(-i.top - t.top - this.imageTransforms.translateY, "px)") + Ji(n) };
1855
+ var e = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, i = { left: (e.width - this.imageSize.width) / (2 * this.coefficient), top: (e.height - this.imageSize.height) / (2 * this.coefficient) }, t = { left: (1 - 1 / this.coefficient) * e.width / 2, top: (1 - 1 / this.coefficient) * e.height / 2 }, n = ie(ie({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height) }), a = { width: "".concat(e.width, "px"), height: "".concat(e.height, "px"), left: "0px", top: "0px", transform: "translate(".concat(-i.left - t.left - this.imageTransforms.translateX, "px, ").concat(-i.top - t.top - this.imageTransforms.translateY, "px)") + en(n) };
1856
1856
  return this.transitionsOptions.enabled && (a.transition = "".concat(this.transitionsOptions.time, "ms ").concat(this.transitionsOptions.timingFunction)), a;
1857
1857
  } }, watch: { src: function() {
1858
1858
  this.onChangeImage();
@@ -1927,7 +1927,7 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
1927
1927
  var a = this.autoZoomAlgorithm;
1928
1928
  a || (a = this.stencilSize ? fo : this.autoZoom ? go : vo);
1929
1929
  var o = a({ event: { type: e, params: n }, visibleArea: i, coordinates: t, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
1930
- return ie(ie({}, o), {}, { changed: !Ri(o.visibleArea, i) || !Ri(o.coordinates, t) });
1930
+ return ie(ie({}, o), {}, { changed: !Ai(o.visibleArea, i) || !Ai(o.coordinates, t) });
1931
1931
  }, runAutoZoom: function(e) {
1932
1932
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = i.transitions, n = t !== void 0 && t, a = no(i, Po), o = this.processAutoZoom(e, this.visibleArea, this.coordinates, a), r = o.visibleArea, l = o.coordinates, s = o.changed;
1933
1933
  n && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, n && s && this.debouncedDisableTransitions();
@@ -1952,10 +1952,10 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
1952
1952
  }, getCanvas: function() {
1953
1953
  if (this.$refs.canvas) {
1954
1954
  var e = this.$refs.canvas, i = this.$refs.image, t = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(l, s, u) {
1955
- var d = u.rotate, h = u.flip, m = { width: s.naturalWidth, height: s.naturalHeight }, c = Xi(m, d), y = l.getContext("2d");
1955
+ var d = u.rotate, m = u.flip, h = { width: s.naturalWidth, height: s.naturalHeight }, c = qi(h, d), y = l.getContext("2d");
1956
1956
  l.height = c.height, l.width = c.width, y.save();
1957
- var b = Ne(ve(Y({ left: 0, top: 0 }, m)), d);
1958
- return y.translate(-(b.left - c.width / 2), -(b.top - c.height / 2)), y.rotate(d * Math.PI / 180), y.translate(h.horizontal ? m.width : 0, h.vertical ? m.height : 0), y.scale(h.horizontal ? -1 : 1, h.vertical ? -1 : 1), y.drawImage(s, 0, 0, m.width, m.height), y.restore(), l;
1957
+ var b = Le(ve(Y({ left: 0, top: 0 }, h)), d);
1958
+ return y.translate(-(b.left - c.width / 2), -(b.top - c.height / 2)), y.rotate(d * Math.PI / 180), y.translate(m.horizontal ? h.width : 0, m.vertical ? h.height : 0), y.scale(m.horizontal ? -1 : 1, m.vertical ? -1 : 1), y.drawImage(s, 0, 0, h.width, h.height), y.restore(), l;
1959
1959
  }(this.$refs.sourceCanvas, i, this.imageTransforms) : i, n = ie({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), a = function(l) {
1960
1960
  return l.find(function(s) {
1961
1961
  return u = s, !Number.isNaN(parseFloat(u)) && isFinite(u);
@@ -1966,12 +1966,12 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
1966
1966
  var r = Math.sqrt(n.maxArea / (o.width * o.height));
1967
1967
  o = { width: Math.round(r * o.width), height: Math.round(r * o.height) };
1968
1968
  }
1969
- return function(l, s, u, d, h) {
1969
+ return function(l, s, u, d, m) {
1970
1970
  l.width = d ? d.width : u.width, l.height = d ? d.height : u.height;
1971
- var m = l.getContext("2d");
1972
- m.clearRect(0, 0, l.width, l.height), h && (h.imageSmoothingEnabled && (m.imageSmoothingEnabled = h.imageSmoothingEnabled), h.imageSmoothingQuality && (m.imageSmoothingQuality = h.imageSmoothingQuality), h.fillColor && (m.fillStyle = h.fillColor, m.fillRect(0, 0, l.width, l.height), m.save()));
1971
+ var h = l.getContext("2d");
1972
+ h.clearRect(0, 0, l.width, l.height), m && (m.imageSmoothingEnabled && (h.imageSmoothingEnabled = m.imageSmoothingEnabled), m.imageSmoothingQuality && (h.imageSmoothingQuality = m.imageSmoothingQuality), m.fillColor && (h.fillStyle = m.fillColor, h.fillRect(0, 0, l.width, l.height), h.save()));
1973
1973
  var c = u.left < 0 ? -u.left : 0, y = u.top < 0 ? -u.top : 0;
1974
- m.drawImage(s, u.left + c, u.top + y, u.width, u.height, c * (l.width / u.width), y * (l.height / u.height), l.width, l.height);
1974
+ h.drawImage(s, u.left + c, u.top + y, u.width, u.height, c * (l.width / u.width), y * (l.height / u.height), l.width, l.height);
1975
1975
  }(e, t, this.coordinates, o, n), e;
1976
1976
  }
1977
1977
  }, update: function() {
@@ -2159,7 +2159,7 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
2159
2159
  var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.transitions, a = n === void 0 || n;
2160
2160
  if (!this.transitionsActive) {
2161
2161
  a && this.enableTransitions();
2162
- var o = ie({}, this.imageTransforms.flip), r = Ro({ flip: { horizontal: e ? !o.horizontal : o.horizontal, vertical: i ? !o.vertical : o.vertical }, previousFlip: o, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), l = r.visibleArea, s = r.coordinates;
2162
+ var o = ie({}, this.imageTransforms.flip), r = Ao({ flip: { horizontal: e ? !o.horizontal : o.horizontal, vertical: i ? !o.vertical : o.vertical }, previousFlip: o, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), l = r.visibleArea, s = r.coordinates;
2163
2163
  e && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), i && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = l, this.coordinates = s, this.onChange(), a && this.debouncedDisableTransitions();
2164
2164
  }
2165
2165
  }, rotate: function(e) {
@@ -2172,10 +2172,10 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), an = { name: "Cropper
2172
2172
  r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), n && this.debouncedDisableTransitions();
2173
2173
  }
2174
2174
  } }, emits: ["change", "error", "ready"] }, Do = { key: 0, ref: "canvas", style: { display: "none" } }, To = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
2175
- an.render = function(e, i, t, n, a, o) {
2176
- return z(), K("div", { ref: "cropper", class: o.classes.cropper }, [C("div", { ref: "stretcher", class: o.classes.stretcher }, null, 2), C("div", { class: o.classes.boundaries, style: o.boundariesStyle }, [(z(), K(bt(t.backgroundWrapperComponent), { class: o.classes.cropperWrapper, "wheel-resize": o.settings.resizeImage.wheel, "touch-resize": o.settings.resizeImage.touch, "touch-move": o.settings.moveImage.touch, "mouse-move": o.settings.moveImage.mouse, onMove: o.onManipulateImage, onResize: o.onManipulateImage }, { default: N(function() {
2175
+ rn.render = function(e, i, t, n, a, o) {
2176
+ return z(), G("div", { ref: "cropper", class: o.classes.cropper }, [C("div", { ref: "stretcher", class: o.classes.stretcher }, null, 2), C("div", { class: o.classes.boundaries, style: o.boundariesStyle }, [(z(), G(bt(t.backgroundWrapperComponent), { class: o.classes.cropperWrapper, "wheel-resize": o.settings.resizeImage.wheel, "touch-resize": o.settings.resizeImage.touch, "touch-move": o.settings.moveImage.touch, "mouse-move": o.settings.moveImage.mouse, onMove: o.onManipulateImage, onResize: o.onManipulateImage }, { default: N(function() {
2177
2177
  return [C("div", { class: o.classes.background, style: o.boundariesStyle }, null, 6), C("div", { class: o.classes.imageWrapper }, [C("img", { ref: "image", crossorigin: a.imageAttributes.crossOrigin, src: a.imageAttributes.src, class: o.classes.image, style: o.imageStyle, onMousedown: i[1] || (i[1] = wt(function() {
2178
- }, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), C("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((z(), K(bt(t.stencilComponent), Di({ ref: "stencil", image: o.image, coordinates: a.coordinates, "stencil-coordinates": o.stencilCoordinates, transitions: o.transitionsOptions }, t.stencilProps, { onResize: o.onResize, onResizeEnd: o.onResizeEnd, onMove: o.onMove, onMoveEnd: o.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[_t, a.imageLoaded]]), t.canvas ? (z(), K("canvas", Do, null, 512)) : ee("", !0), t.canvas ? (z(), K("canvas", To, null, 512)) : ee("", !0)];
2178
+ }, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), C("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((z(), G(bt(t.stencilComponent), Di({ ref: "stencil", image: o.image, coordinates: a.coordinates, "stencil-coordinates": o.stencilCoordinates, transitions: o.transitionsOptions }, t.stencilProps, { onResize: o.onResize, onResizeEnd: o.onResizeEnd, onMove: o.onMove, onMoveEnd: o.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[_t, a.imageLoaded]]), t.canvas ? (z(), G("canvas", Do, null, 512)) : ee("", !0), t.canvas ? (z(), G("canvas", To, null, 512)) : ee("", !0)];
2179
2179
  }), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
2180
2180
  };
2181
2181
  const Uo = {
@@ -2191,7 +2191,7 @@ const Uo = {
2191
2191
  class: /* @__PURE__ */ Ee(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
2192
2192
  }, Bo = {
2193
2193
  class: /* @__PURE__ */ Ee(["relative z-0", "w-full h-full", "overflow-hidden"])
2194
- }, Go = { class: "fm-typo-en-body-lg-600 pb-4" }, Ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jo = /* @__PURE__ */ le({
2194
+ }, Ko = { class: "fm-typo-en-body-lg-600 pb-4" }, Go = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jo = /* @__PURE__ */ le({
2195
2195
  __name: "ImageDropField",
2196
2196
  props: {
2197
2197
  modelValue: {}
@@ -2208,11 +2208,11 @@ const Uo = {
2208
2208
  };
2209
2209
  }
2210
2210
  function s(y) {
2211
- const { width: b, height: g } = y, w = 16 / 9, F = b / g;
2212
- let M = b, I = g;
2213
- F > w ? I = M / w : M = I * w;
2214
- const E = l(M, I), P = io(E.width, E.height), R = M > b ? (M - b) / 2 * E.ratio : 0, _ = I > g ? (I - g) / 2 * E.ratio : 0, A = P.getContext("2d");
2215
- return A.fillStyle = "white", A.fillRect(0, 0, E.width, E.height), A.drawImage(y, 0, 0, M, I, R, _, E.width, E.height), P.toDataURL();
2211
+ const { width: b, height: g } = y, w = 16 / 9, E = b / g;
2212
+ let A = b, I = g;
2213
+ E > w ? I = A / w : A = I * w;
2214
+ const F = l(A, I), P = io(F.width, F.height), R = A > b ? (A - b) / 2 * F.ratio : 0, _ = I > g ? (I - g) / 2 * F.ratio : 0, x = P.getContext("2d");
2215
+ return x.fillStyle = "white", x.fillRect(0, 0, F.width, F.height), x.drawImage(y, 0, 0, A, I, R, _, F.width, F.height), P.toDataURL();
2216
2216
  }
2217
2217
  const u = Q(!1);
2218
2218
  async function d([y]) {
@@ -2229,19 +2229,19 @@ const Uo = {
2229
2229
  };
2230
2230
  }, b.readAsDataURL(y);
2231
2231
  }
2232
- const h = (y) => {
2232
+ const m = (y) => {
2233
2233
  d([y]);
2234
2234
  };
2235
- async function m(y) {
2235
+ async function h(y) {
2236
2236
  !r.value && o.value && (r.value = o.value);
2237
- const { canvas: b } = y, g = b.toDataURL("image/jpeg", 0.75), w = await (await fetch(g)).blob(), F = new File([w], "img.jpeg", { type: "image/jpeg" });
2238
- a("update:model-value", F);
2237
+ const { canvas: b } = y, g = b.toDataURL("image/jpeg", 0.75), w = await (await fetch(g)).blob(), E = new File([w], "img.jpeg", { type: "image/jpeg" });
2238
+ a("update:model-value", E);
2239
2239
  }
2240
2240
  function c() {
2241
2241
  r.value = void 0, a("reset:model-value");
2242
2242
  }
2243
2243
  return (y, b) => {
2244
- const g = G("fm-icon"), w = G("fm-drop-field");
2244
+ const g = K("fm-icon"), w = K("fm-drop-field");
2245
2245
  return r.value || o.value ? (z(), q("div", Uo, [
2246
2246
  T("p", $o, [
2247
2247
  yt(se(p(n)("menu.common.labels.product_image")) + " ", 1),
@@ -2250,7 +2250,7 @@ const Uo = {
2250
2250
  T("div", No, [
2251
2251
  T("div", Lo, [
2252
2252
  T("div", Bo, [
2253
- C(p(an), {
2253
+ C(p(rn), {
2254
2254
  class: "cropper h-[150px] w-[200px]",
2255
2255
  src: r.value || o.value,
2256
2256
  "stencil-props": {
@@ -2263,7 +2263,7 @@ const Uo = {
2263
2263
  height: 150
2264
2264
  },
2265
2265
  "image-restriction": "stencil",
2266
- onChange: m
2266
+ onChange: h
2267
2267
  }, null, 8, ["src"])
2268
2268
  ]),
2269
2269
  T("button", {
@@ -2279,16 +2279,16 @@ const Uo = {
2279
2279
  ])
2280
2280
  ])
2281
2281
  ])
2282
- ])) : (z(), K(w, {
2282
+ ])) : (z(), G(w, {
2283
2283
  key: 1,
2284
2284
  accept: ".jpg, .jpeg, .png, .gif",
2285
2285
  "content-class": "h-[150px] w-[200px]",
2286
- onFileUpload: h
2286
+ onFileUpload: m
2287
2287
  }, {
2288
2288
  label: N(() => [
2289
- T("p", Go, [
2289
+ T("p", Ko, [
2290
2290
  yt(se(p(n)("menu.common.labels.product_image")) + " ", 1),
2291
- T("span", Ko, se(p(n)("menu.common.labels.optional")), 1)
2291
+ T("span", Go, se(p(n)("menu.common.labels.optional")), 1)
2292
2292
  ])
2293
2293
  ]),
2294
2294
  "accept-text": N(() => [
@@ -2298,7 +2298,7 @@ const Uo = {
2298
2298
  }));
2299
2299
  };
2300
2300
  }
2301
- }), rn = /* @__PURE__ */ le({
2301
+ }), sn = /* @__PURE__ */ le({
2302
2302
  __name: "RemyButton",
2303
2303
  props: {
2304
2304
  onClick: { type: Function },
@@ -2314,7 +2314,7 @@ const Uo = {
2314
2314
  onClick: t[0] || (t[0] = //@ts-ignore
2315
2315
  (...a) => i.onClick && i.onClick(...a))
2316
2316
  }, [
2317
- p(Te).isDialogOpened.value ? (z(), K(p(Yn), { key: 1 })) : (z(), K(p(Kn), { key: 0 }))
2317
+ p(Te).isDialogOpened.value ? (z(), G(p(Yn), { key: 1 })) : (z(), G(p(Gn), { key: 0 }))
2318
2318
  ], 2)) : ee("", !0);
2319
2319
  };
2320
2320
  }
@@ -2325,8 +2325,8 @@ function Xo(e, i) {
2325
2325
  ]);
2326
2326
  }
2327
2327
  const qo = /* @__PURE__ */ ut(Yo, [["render", Xo]]);
2328
- function sn(e) {
2329
- return e || null;
2328
+ function ln(e) {
2329
+ return e || "";
2330
2330
  }
2331
2331
  const Zo = {
2332
2332
  class: "flex flex-row xs:flex-col gap-24"
@@ -2375,21 +2375,21 @@ const la = /* @__PURE__ */ le({
2375
2375
  setup(e, {
2376
2376
  emit: i
2377
2377
  }) {
2378
- const t = e, n = he(), a = Ue(), o = Be(), r = Ye(o), l = He(r), s = zn({
2378
+ const t = e, n = he(), a = $e(), o = Be(), r = Ye(o), l = He(r), s = Fn({
2379
2379
  dialog: a,
2380
2380
  menuLoader: l
2381
2381
  }), {
2382
2382
  checkMenuIsLoading: u
2383
- } = He(Ye(Be())), d = i, h = D(() => n.rules.item), m = D(() => n.categorizedItems), c = D(() => {
2384
- const P = m.value.map((R) => ({
2383
+ } = He(Ye(Be())), d = i, m = D(() => n.rules.item), h = D(() => n.categorizedItems), c = D(() => {
2384
+ const P = h.value.map((R) => ({
2385
2385
  label: R.name,
2386
2386
  value: R.id
2387
2387
  }));
2388
2388
  return t.isAddon ? P : P.filter((R) => !!R.value);
2389
- }), y = D(() => h.value.addon), b = D(() => !c.value.find((P) => !!P.value)), g = () => {
2389
+ }), y = D(() => m.value.addon), b = D(() => !c.value.find((P) => !!P.value)), g = () => {
2390
2390
  var P;
2391
2391
  return t.isAddon ? null : Xe(C(ke.FmSelect, {
2392
- disabled: !h.value.category || t.isAddon || u(),
2392
+ disabled: !m.value.category || t.isAddon || u(),
2393
2393
  items: c.value,
2394
2394
  modelValue: t.form.category ?? ((P = t.fallback) == null ? void 0 : P.category),
2395
2395
  shiftMenu: !0,
@@ -2408,121 +2408,121 @@ const la = /* @__PURE__ */ le({
2408
2408
  }, [yt("Add new Category")])])
2409
2409
  }), [[Ut("if"), !t.isAddon]]);
2410
2410
  };
2411
- Qe(() => {
2412
- !b.value && t.form.category === void 0 && t.isCreate && F(je.PRODUCT);
2411
+ ot(() => {
2412
+ !b.value && t.form.category === void 0 && t.isCreate && E(je.PRODUCT);
2413
2413
  });
2414
2414
  const w = D(() => {
2415
2415
  var R;
2416
2416
  const P = t.form.name || ((R = t.fallback) == null ? void 0 : R.name);
2417
2417
  return P ? n.items.filter((_) => !!_.category && _._id !== t.form._id && _.name === P).length : 0;
2418
2418
  });
2419
- function F(P) {
2420
- var _, A, f;
2419
+ function E(P) {
2420
+ var _, x, f;
2421
2421
  const R = P == je.ADD_ON;
2422
- d("update:form", "category", t.isOverride ? R ? "" : ((_ = t.fallback) == null ? void 0 : _.category) ?? ((A = c.value.find((v) => !!v.value)) == null ? void 0 : A.value) : R ? null : (f = c.value.find((v) => !!v.value)) == null ? void 0 : f.value);
2422
+ d("update:form", "category", t.isOverride ? R ? "" : ((_ = t.fallback) == null ? void 0 : _.category) ?? ((x = c.value.find((v) => !!v.value)) == null ? void 0 : x.value) : R ? null : (f = c.value.find((v) => !!v.value)) == null ? void 0 : f.value);
2423
2423
  }
2424
- const M = Q(!1);
2424
+ const A = Q(!1);
2425
2425
  async function I() {
2426
2426
  var P, R, _;
2427
2427
  if (!t.form.name) {
2428
- const A = document.getElementById("product-name");
2429
- if (A) {
2430
- A.focus();
2428
+ const x = document.getElementById("product-name");
2429
+ if (x) {
2430
+ x.focus();
2431
2431
  return;
2432
2432
  } else
2433
2433
  return;
2434
2434
  }
2435
- if (!M.value)
2435
+ if (!A.value)
2436
2436
  try {
2437
- M.value = !0, Ht({
2437
+ A.value = !0, Ht({
2438
2438
  event: "menu_catalog_item_general_remy_suggest_description"
2439
2439
  }), Te.toggleDialog(!0);
2440
- const A = await ((R = (P = Te).getItemDescription) == null ? void 0 : R.call(P, {
2440
+ const x = await ((R = (P = Te).getItemDescription) == null ? void 0 : R.call(P, {
2441
2441
  name: t.form.name || ""
2442
- }, !0)), f = (_ = A == null ? void 0 : A.data) == null ? void 0 : _.value;
2442
+ }, !0)), f = (_ = x == null ? void 0 : x.data) == null ? void 0 : _.value;
2443
2443
  d("update:form", "description", f);
2444
2444
  } finally {
2445
- M.value = !1;
2445
+ A.value = !1;
2446
2446
  }
2447
2447
  }
2448
2448
  const {
2449
- t: E
2449
+ t: F
2450
2450
  } = ce();
2451
2451
  return (P, R) => {
2452
- const _ = G("fm-text-field"), A = G("fm-textarea"), f = G("fm-radio"), v = G("FmSnackbar"), x = G("FmButton"), k = G("fm-radio-group"), S = G("FmFormGroup"), B = Ut("tooltip");
2453
- return z(), K($e, {
2454
- title: p(E)("menu.product.form.detail.title")
2452
+ const _ = K("fm-text-field"), x = K("fm-textarea"), f = K("fm-radio"), v = K("FmSnackbar"), k = K("FmButton"), M = K("fm-radio-group"), S = K("FmFormGroup"), B = Ut("tooltip");
2453
+ return z(), G(Ve, {
2454
+ title: p(F)("menu.product.form.detail.title")
2455
2455
  }, {
2456
2456
  default: N(() => {
2457
2457
  var H, J;
2458
2458
  return [T("div", Zo, [T("div", Qo, [T("div", Jo, [T("div", ea, [C(_, {
2459
2459
  "model-value": P.form.code,
2460
- placeholder: ((H = P.fallback) == null ? void 0 : H.code) || p(E)("menu.product.form.detail.fields.code.placeholder"),
2461
- label: p(E)("menu.product.form.detail.fields.code.label"),
2462
- "onUpdate:modelValue": R[0] || (R[0] = (O) => d("update:form", "code", p(sn)(O)))
2460
+ placeholder: ((H = P.fallback) == null ? void 0 : H.code) || p(F)("menu.product.form.detail.fields.code.placeholder"),
2461
+ label: p(F)("menu.product.form.detail.fields.code.label"),
2462
+ "onUpdate:modelValue": R[0] || (R[0] = (O) => d("update:form", "code", p(ln)(O)))
2463
2463
  }, null, 8, ["model-value", "placeholder", "label"])]), T("div", ta, [C(_, {
2464
2464
  id: "product-name",
2465
- disabled: !h.value.name,
2466
- "helper-text": w.value > 0 ? p(E)("menu.product.form.detail.fields.name.duplicate_warning", {
2465
+ disabled: !m.value.name,
2466
+ "helper-text": w.value > 0 ? p(F)("menu.product.form.detail.fields.name.duplicate_warning", {
2467
2467
  count: w.value
2468
2468
  }) : void 0,
2469
2469
  "model-value": P.form.name,
2470
2470
  placeholder: (J = P.fallback) == null ? void 0 : J.name,
2471
- rules: h.value.name ? [(O) => !!O || p(E)("menu.product.form.detail.fields.name.required")] : void 0,
2471
+ rules: m.value.name ? [(O) => !!O || p(F)("menu.product.form.detail.fields.name.required")] : void 0,
2472
2472
  "label-mark": "required",
2473
2473
  autofocus: "",
2474
- label: p(E)("menu.product.form.detail.fields.name.label"),
2474
+ label: p(F)("menu.product.form.detail.fields.name.label"),
2475
2475
  "onUpdate:modelValue": R[1] || (R[1] = (O) => d("update:form", "name", O))
2476
- }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), T("div", ia, [C(A, {
2477
- disabled: !h.value.description,
2476
+ }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), T("div", ia, [C(x, {
2477
+ disabled: !m.value.description,
2478
2478
  "model-value": P.form.description,
2479
- placeholder: p(E)("menu.product.form.detail.fields.description.placeholder"),
2479
+ placeholder: p(F)("menu.product.form.detail.fields.description.placeholder"),
2480
2480
  "onUpdate:modelValue": R[2] || (R[2] = (O) => d("update:form", "description", O.trim()))
2481
2481
  }, {
2482
- label: N(() => [T("p", na, [yt(se(p(E)("menu.product.form.detail.fields.description.label")) + " ", 1), T("span", oa, se(p(E)("menu.product.form.detail.fields.description.optional")), 1)])]),
2482
+ label: N(() => [T("p", na, [yt(se(p(F)("menu.product.form.detail.fields.description.label")) + " ", 1), T("span", oa, se(p(F)("menu.product.form.detail.fields.description.optional")), 1)])]),
2483
2483
  _: 1
2484
- }, 8, ["disabled", "model-value", "placeholder"]), Xe(C(rn, {
2484
+ }, 8, ["disabled", "model-value", "placeholder"]), Xe(C(sn, {
2485
2485
  class: Ee(["absolute top-[100px] left-8"]),
2486
2486
  onClick: I
2487
2487
  }, null, 512), [[B, p(Ti)("Suggest description")]])])]), C(jo, {
2488
- disabled: !h.value.thumbnail,
2488
+ disabled: !m.value.thumbnail,
2489
2489
  "model-value": P.thumbnail,
2490
2490
  "onUpdate:modelValue": R[3] || (R[3] = (O) => d("update:thumbnail", O)),
2491
2491
  "onReset:modelValue": R[4] || (R[4] = (O) => d("reset:thumbnail"))
2492
- }, null, 8, ["disabled", "model-value"])]), C(et, {
2493
- label: p(E)("menu.product.form.detail.category.label")
2492
+ }, null, 8, ["disabled", "model-value"])]), C(Je, {
2493
+ label: p(F)("menu.product.form.detail.category.label")
2494
2494
  }, {
2495
- default: N(() => [y.value ? (z(), K(k, {
2495
+ default: N(() => [y.value ? (z(), G(M, {
2496
2496
  key: 0,
2497
- disabled: !h.value.category,
2497
+ disabled: !m.value.category,
2498
2498
  "model-value": P.isAddon ? je.ADD_ON : je.PRODUCT,
2499
- "onUpdate:modelValue": R[5] || (R[5] = (O) => F(O))
2499
+ "onUpdate:modelValue": R[5] || (R[5] = (O) => E(O))
2500
2500
  }, {
2501
2501
  default: N(() => [T("div", aa, [T("div", ra, [C(f, {
2502
2502
  disabled: b.value,
2503
2503
  value: je.PRODUCT,
2504
- label: p(E)("menu.product.form.detail.category.options.product.label"),
2505
- sublabel: p(E)("menu.product.form.detail.category.options.product.sublabel")
2504
+ label: p(F)("menu.product.form.detail.category.options.product.label"),
2505
+ sublabel: p(F)("menu.product.form.detail.category.options.product.sublabel")
2506
2506
  }, null, 8, ["disabled", "value", "label", "sublabel"]), C(qo, null, {
2507
- default: N(() => [p(n).isV4 ? (z(), K(g, {
2507
+ default: N(() => [p(n).isV4 ? (z(), G(g, {
2508
2508
  key: 0
2509
2509
  })) : ee("", !0)]),
2510
2510
  _: 1
2511
2511
  })]), b.value ? (z(), q("div", sa, [C(v, {
2512
- title: p(E)("menu.product.form.detail.category.add_first"),
2512
+ title: p(F)("menu.product.form.detail.category.add_first"),
2513
2513
  variant: "info"
2514
- }, null, 8, ["title"]), C(x, {
2515
- label: p(E)("menu.common.actions.add"),
2514
+ }, null, 8, ["title"]), C(k, {
2515
+ label: p(F)("menu.common.actions.add"),
2516
2516
  "prepend-icon": "add",
2517
2517
  variant: "secondary",
2518
2518
  onClick: p(s).create
2519
2519
  }, null, 8, ["label", "onClick"])])) : ee("", !0), C(f, {
2520
2520
  value: je.ADD_ON,
2521
- label: p(E)("menu.product.form.detail.category.options.addon.label"),
2522
- sublabel: p(E)("menu.product.form.detail.category.options.addon.sublabel")
2521
+ label: p(F)("menu.product.form.detail.category.options.addon.label"),
2522
+ sublabel: p(F)("menu.product.form.detail.category.options.addon.sublabel")
2523
2523
  }, null, 8, ["value", "label", "sublabel"])])]),
2524
2524
  _: 1
2525
- }, 8, ["disabled", "model-value"])) : ee("", !0), p(n).isV4 ? ee("", !0) : (z(), K(S, {
2525
+ }, 8, ["disabled", "model-value"])) : ee("", !0), p(n).isV4 ? ee("", !0) : (z(), G(S, {
2526
2526
  key: 1,
2527
2527
  modelValue: P.form.category,
2528
2528
  "onUpdate:modelValue": R[6] || (R[6] = (O) => P.form.category = O),
@@ -2533,12 +2533,12 @@ const la = /* @__PURE__ */ le({
2533
2533
  }, 8, ["modelValue", "rules"]))]),
2534
2534
  _: 1
2535
2535
  }, 8, ["label"]), C(Zt, {
2536
- disabled: !h.value.orderFrom,
2536
+ disabled: !m.value.orderFrom,
2537
2537
  "model-value": P.form.orderFrom,
2538
- "order-from-none": h.value.orderFromNone,
2539
- required: h.value.orderFrom,
2540
- "default-label": p(E)("menu.product.form.detail.order_from.default"),
2541
- label: p(E)("menu.product.form.detail.order_from.label"),
2538
+ "order-from-none": m.value.orderFromNone,
2539
+ required: m.value.orderFrom,
2540
+ "default-label": p(F)("menu.product.form.detail.order_from.default"),
2541
+ label: p(F)("menu.product.form.detail.order_from.label"),
2542
2542
  "onUpdate:modelValue": R[7] || (R[7] = (O) => O && d("update:form", "orderFrom", O))
2543
2543
  }, null, 8, ["disabled", "model-value", "order-from-none", "required", "default-label", "label"])];
2544
2544
  }),
@@ -2571,12 +2571,12 @@ const la = /* @__PURE__ */ le({
2571
2571
  emits: ["update:form"],
2572
2572
  setup(e, { emit: i }) {
2573
2573
  const t = e, n = Xt(), a = he(), { t: o } = ce(), r = i, l = D(() => a.rules.item), s = D(() => {
2574
- var F, M;
2575
- const g = t.isOverride ? ((F = t.fallback) == null ? void 0 : F.unit) ?? ((M = t.fallback) == null ? void 0 : M.perXUnit) : void 0, w = t.form.unit ?? t.form.perXUnit ?? g;
2574
+ var E, A;
2575
+ const g = t.isOverride ? ((E = t.fallback) == null ? void 0 : E.unit) ?? ((A = t.fallback) == null ? void 0 : A.perXUnit) : void 0, w = t.form.unit ?? t.form.perXUnit ?? g;
2576
2576
  return w != null;
2577
2577
  }), u = (g) => {
2578
2578
  r("update:form", "unit", g ? "" : void 0), r("update:form", "perXUnit", g ? 0 : void 0);
2579
- }, d = D(() => Ot.setCoreStore(n).taxSetting()), h = D(() => {
2579
+ }, d = D(() => Ot.setCoreStore(n).taxSetting()), m = D(() => {
2580
2580
  var g;
2581
2581
  return Ot.getSelectedTax(
2582
2582
  t.form.taxes,
@@ -2584,15 +2584,15 @@ const la = /* @__PURE__ */ le({
2584
2584
  d.value.countryTaxOptions
2585
2585
  );
2586
2586
  });
2587
- function m(g) {
2587
+ function h(g) {
2588
2588
  const w = g.replace(/[^0-9.]/g, "");
2589
2589
  if (!g) return !1;
2590
2590
  r("update:form", "perXUnit", parseFloat(w));
2591
2591
  }
2592
2592
  function c(g) {
2593
2593
  if (!g && t.form.perXUnit) {
2594
- const [w, F] = t.form.perXUnit.toString().split(".");
2595
- if (F && F.length > 4) {
2594
+ const [w, E] = t.form.perXUnit.toString().split(".");
2595
+ if (E && E.length > 4) {
2596
2596
  const I = (typeof t.form.perXUnit == "string" ? parseFloat(t.form.perXUnit) : t.form.perXUnit).toFixed(4);
2597
2597
  r("update:form", "perXUnit", parseFloat(I));
2598
2598
  }
@@ -2600,31 +2600,31 @@ const la = /* @__PURE__ */ le({
2600
2600
  }
2601
2601
  const y = Q(!1);
2602
2602
  async function b() {
2603
- var w, F, M, I, E, P, R, _;
2603
+ var w, E, A, I, F, P, R, _;
2604
2604
  if (!(t.form.name || "")) {
2605
- const A = document.getElementById("product-name");
2606
- if (A) {
2607
- A.focus();
2605
+ const x = document.getElementById("product-name");
2606
+ if (x) {
2607
+ x.focus();
2608
2608
  return;
2609
2609
  } else
2610
2610
  return;
2611
2611
  }
2612
2612
  if (!y.value)
2613
2613
  try {
2614
- y.value = !0, Ht({ event: "menu_catalog_item_price_remy_suggest_pricing" }), Te.toggleDialog(!0), Te.registerOnSelect((A) => {
2614
+ y.value = !0, Ht({ event: "menu_catalog_item_price_remy_suggest_pricing" }), Te.toggleDialog(!0), Te.registerOnSelect((x) => {
2615
2615
  r(
2616
2616
  "update:form",
2617
2617
  "price",
2618
2618
  we.Dinero.fromNumber({
2619
- number: A
2619
+ number: x
2620
2620
  }).toObject()
2621
2621
  );
2622
2622
  }), await ((_ = (R = Te).getItemPricing) == null ? void 0 : _.call(
2623
2623
  R,
2624
2624
  {
2625
2625
  name: t.form.name || "",
2626
- lat: (M = (F = (w = n.currentRestaurant) == null ? void 0 : w.value) == null ? void 0 : F.profile.address.coordinates) == null ? void 0 : M[1],
2627
- lon: (P = (E = (I = n.currentRestaurant) == null ? void 0 : I.value) == null ? void 0 : E.profile.address.coordinates) == null ? void 0 : P[0]
2626
+ lat: (A = (E = (w = n.currentRestaurant) == null ? void 0 : w.value) == null ? void 0 : E.profile.address.coordinates) == null ? void 0 : A[1],
2627
+ lon: (P = (F = (I = n.currentRestaurant) == null ? void 0 : I.value) == null ? void 0 : F.profile.address.coordinates) == null ? void 0 : P[0]
2628
2628
  },
2629
2629
  !0
2630
2630
  ));
@@ -2633,15 +2633,15 @@ const la = /* @__PURE__ */ le({
2633
2633
  }
2634
2634
  }
2635
2635
  return (g, w) => {
2636
- const F = G("fm-select"), M = G("fm-checkbox"), I = G("fm-text-field"), E = Ut("tooltip");
2637
- return z(), K($e, {
2636
+ const E = K("fm-select"), A = K("fm-checkbox"), I = K("fm-text-field"), F = Ut("tooltip");
2637
+ return z(), G(Ve, {
2638
2638
  title: p(o)("menu.product.form.price.title")
2639
2639
  }, {
2640
2640
  default: N(() => {
2641
2641
  var P;
2642
2642
  return [
2643
2643
  T("div", ua, [
2644
- C(Je, {
2644
+ C(Qe, {
2645
2645
  min: 0,
2646
2646
  "model-value": g.form.price || null,
2647
2647
  placeholder: (P = g.fallback) != null && P.price ? p(st)(g.fallback.price, !1) : void 0,
@@ -2654,36 +2654,36 @@ const la = /* @__PURE__ */ le({
2654
2654
  "onUpdate:modelValue": w[0] || (w[0] = (R) => R && r("update:form", "price", R))
2655
2655
  }, {
2656
2656
  append: N(() => [
2657
- Xe(C(rn, {
2657
+ Xe(C(sn, {
2658
2658
  "pure-styling": "",
2659
2659
  onClick: b
2660
2660
  }, null, 512), [
2661
- [E, p(Ti)("Suggest pricing")]
2661
+ [F, p(Ti)("Suggest pricing")]
2662
2662
  ])
2663
2663
  ]),
2664
2664
  _: 1
2665
2665
  }, 8, ["model-value", "placeholder", "rules", "label"]),
2666
- C(F, {
2666
+ C(E, {
2667
2667
  disabled: !l.value.tax || !d.value.systemCode,
2668
2668
  items: d.value.countryTaxOptions,
2669
2669
  label: d.value.systemCode ? p(o)("menu.product.form.price.fields.tax.label_with_code", {
2670
2670
  code: d.value.systemCode
2671
2671
  }) : p(o)("menu.product.form.price.fields.tax.label"),
2672
- "model-value": h.value,
2672
+ "model-value": m.value,
2673
2673
  placeholder: "--",
2674
2674
  class: "flex-1",
2675
2675
  "shift-menu": "",
2676
2676
  "onUpdate:modelValue": w[1] || (w[1] = (R) => r("update:form", "taxes", [p(Ot).decodeTax(R)]))
2677
2677
  }, null, 8, ["disabled", "items", "label", "model-value"])
2678
2678
  ]),
2679
- C(et, {
2679
+ C(Je, {
2680
2680
  label: p(o)("menu.product.form.price.settings.title")
2681
2681
  }, {
2682
2682
  default: N(() => {
2683
2683
  var R;
2684
2684
  return [
2685
2685
  T("div", ca, [
2686
- C(M, {
2686
+ C(A, {
2687
2687
  disabled: !l.value.openPrice,
2688
2688
  "model-value": g.form.openPrice ?? ((R = g.fallback) == null ? void 0 : R.openPrice) ?? !1,
2689
2689
  value: g.form.openPrice,
@@ -2692,7 +2692,7 @@ const la = /* @__PURE__ */ le({
2692
2692
  "onUpdate:modelValue": w[2] || (w[2] = (_) => r("update:form", "openPrice", _))
2693
2693
  }, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
2694
2694
  T("div", da, [
2695
- C(M, {
2695
+ C(A, {
2696
2696
  disabled: !l.value.unit,
2697
2697
  "model-value": s.value,
2698
2698
  value: s.value,
@@ -2714,7 +2714,7 @@ const la = /* @__PURE__ */ le({
2714
2714
  placeholder: p(o)("menu.product.form.price.settings.sell_by_unit.per_unit.placeholder"),
2715
2715
  type: "number",
2716
2716
  onFocusChanged: c,
2717
- "onUpdate:modelValue": m
2717
+ "onUpdate:modelValue": h
2718
2718
  }, null, 8, ["disabled", "model-value", "rules", "placeholder"])
2719
2719
  ]),
2720
2720
  T("div", fa, [
@@ -2730,7 +2730,7 @@ const la = /* @__PURE__ */ le({
2730
2730
  ])) : ee("", !0)
2731
2731
  ]),
2732
2732
  l.value.costing ? (z(), q("div", ga, [
2733
- C(M, {
2733
+ C(A, {
2734
2734
  "model-value": !!g.form.costing,
2735
2735
  value: !!g.form.costing,
2736
2736
  label: p(o)("menu.product.form.price.settings.track_costing.label"),
@@ -2738,7 +2738,7 @@ const la = /* @__PURE__ */ le({
2738
2738
  }, null, 8, ["model-value", "value", "label"]),
2739
2739
  g.form.costing ? (z(), q("div", va, [
2740
2740
  T("div", ba, [
2741
- C(Je, {
2741
+ C(Qe, {
2742
2742
  class: "w-full",
2743
2743
  min: 0,
2744
2744
  "model-value": g.form.costing || null,
@@ -2750,7 +2750,7 @@ const la = /* @__PURE__ */ le({
2750
2750
  ])) : ee("", !0)
2751
2751
  ])) : ee("", !0),
2752
2752
  l.value.minPrice ? (z(), q("div", ya, [
2753
- C(M, {
2753
+ C(A, {
2754
2754
  disabled: !l.value.minPrice,
2755
2755
  "model-value": !!g.form.minPrice,
2756
2756
  value: !!g.form.minPrice,
@@ -2759,7 +2759,7 @@ const la = /* @__PURE__ */ le({
2759
2759
  }, null, 8, ["disabled", "model-value", "value", "label"]),
2760
2760
  T("div", _a, [
2761
2761
  T("div", wa, [
2762
- g.form.minPrice ? (z(), K(Je, {
2762
+ g.form.minPrice ? (z(), G(Qe, {
2763
2763
  key: 0,
2764
2764
  max: p(we.Dinero).fromFdoDinero(g.form.price).toUnit(),
2765
2765
  min: 0,
@@ -2785,7 +2785,7 @@ const la = /* @__PURE__ */ le({
2785
2785
  }), Ca = {
2786
2786
  key: 0,
2787
2787
  class: "flex flex-col space-y-16 h-[440px]"
2788
- }, Ra = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Aa = { class: "flex justify-between pb-16" }, xa = { class: "flex gap-8" }, ka = {
2788
+ }, Aa = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Ra = { class: "flex justify-between pb-16" }, xa = { class: "flex gap-8" }, ka = {
2789
2789
  key: 1,
2790
2790
  class: "flex flex-col items-center space-y-16"
2791
2791
  }, Ma = { class: "flex flex-col items-center space-y-4 w-full" }, Oa = { class: "fm-typo-en-title-sm-600" }, za = { class: "text-fm-color-typo-secondary" }, Fa = /* @__PURE__ */ le({
@@ -2794,34 +2794,34 @@ const la = /* @__PURE__ */ le({
2794
2794
  selectedVariants: {}
2795
2795
  },
2796
2796
  setup(e) {
2797
- const i = Ue(), { emitData: t, emitAction: n } = Ii(), a = he(), { t: o } = ce(), r = e, l = D(() => a.variants.map((h) => ({
2798
- label: h.name,
2799
- value: h._id,
2797
+ const i = $e(), { emitData: t, emitAction: n } = Ii(), a = he(), { t: o } = ce(), r = e, l = D(() => a.variants.map((m) => ({
2798
+ label: m.name,
2799
+ value: m._id,
2800
2800
  disabled: !1
2801
2801
  }))), s = Q(oe(r.selectedVariants)), u = Q(""), d = () => {
2802
2802
  t(s.value), n("primary"), i.close();
2803
2803
  };
2804
- return (h, m) => {
2805
- const c = G("FmSearch"), y = G("FmCheckbox"), b = G("FmButton");
2804
+ return (m, h) => {
2805
+ const c = K("FmSearch"), y = K("FmCheckbox"), b = K("FmButton");
2806
2806
  return l.value.length > 0 ? (z(), q("div", Ca, [
2807
2807
  T("div", null, [
2808
2808
  C(c, {
2809
2809
  autofocus: "",
2810
2810
  modelValue: u.value,
2811
- "onUpdate:modelValue": m[0] || (m[0] = (g) => u.value = g),
2811
+ "onUpdate:modelValue": h[0] || (h[0] = (g) => u.value = g),
2812
2812
  placeholder: p(o)("menu.common.labels.search_variants")
2813
2813
  }, null, 8, ["modelValue", "placeholder"])
2814
2814
  ]),
2815
- T("div", Ra, [
2815
+ T("div", Aa, [
2816
2816
  T("div", null, [
2817
- (z(!0), q(Re, null, Ke(l.value, (g) => (z(), q("div", {
2817
+ (z(!0), q(Ae, null, Ge(l.value, (g) => (z(), q("div", {
2818
2818
  key: g.value
2819
2819
  }, [
2820
2820
  Xe(C(y, {
2821
2821
  modelValue: s.value,
2822
2822
  "onUpdate:modelValue": [
2823
- m[1] || (m[1] = (w) => s.value = w),
2824
- m[2] || (m[2] = (w) => p(t)(s.value))
2823
+ h[1] || (h[1] = (w) => s.value = w),
2824
+ h[2] || (h[2] = (w) => p(t)(s.value))
2825
2825
  ],
2826
2826
  label: g.label,
2827
2827
  value: g.value
@@ -2831,10 +2831,10 @@ const la = /* @__PURE__ */ le({
2831
2831
  ]))), 128))
2832
2832
  ])
2833
2833
  ]),
2834
- T("div", Aa, [
2834
+ T("div", Ra, [
2835
2835
  C(p(bi), null, {
2836
2836
  default: N(({ trigger: g }) => [
2837
- p(a).rules.item.variant ? (z(), K(b, {
2837
+ p(a).rules.item.variant ? (z(), G(b, {
2838
2838
  key: 0,
2839
2839
  label: p(o)("menu.common.actions.add_new_variant"),
2840
2840
  variant: "tertiary",
@@ -2848,11 +2848,11 @@ const la = /* @__PURE__ */ le({
2848
2848
  C(b, {
2849
2849
  label: p(o)("menu.common.actions.cancel"),
2850
2850
  variant: "tertiary",
2851
- onClick: m[3] || (m[3] = (g) => p(i).close())
2851
+ onClick: h[3] || (h[3] = (g) => p(i).close())
2852
2852
  }, null, 8, ["label"]),
2853
2853
  C(b, {
2854
2854
  label: p(o)("menu.common.actions.confirm"),
2855
- onClick: m[4] || (m[4] = (g) => d())
2855
+ onClick: h[4] || (h[4] = (g) => d())
2856
2856
  }, null, 8, ["label"])
2857
2857
  ])
2858
2858
  ])
@@ -2882,7 +2882,7 @@ function Da(e, i) {
2882
2882
  ])
2883
2883
  ]);
2884
2884
  }
2885
- const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
2885
+ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
2886
2886
  class: "space-y-16"
2887
2887
  }, Ua = {
2888
2888
  class: "flex items-center space-x-8"
@@ -2907,19 +2907,19 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
2907
2907
  setup(e, {
2908
2908
  emit: i
2909
2909
  }) {
2910
- const t = e, n = he(), a = ii(), o = Be(), r = Ue(), {
2910
+ const t = e, n = he(), a = ii(), o = Be(), r = $e(), {
2911
2911
  t: l
2912
- } = ce(), s = D(() => n.rules.item), u = D(() => s.value.minPrice && !!t.form.minPrice), d = D(() => !n.state.currentCatalogId), h = D(() => n.variants.reduce((_, A) => (_[A._id] = A, _), {}));
2912
+ } = ce(), s = D(() => n.rules.item), u = D(() => s.value.minPrice && !!t.form.minPrice), d = D(() => !n.state.currentCatalogId), m = D(() => n.variants.reduce((_, x) => (_[x._id] = x, _), {}));
2913
2913
  Q(!1);
2914
- const m = i;
2914
+ const h = i;
2915
2915
  function c(_) {
2916
- const A = Le.clone(t.form);
2916
+ const x = Ue.clone(t.form);
2917
2917
  for (const {
2918
2918
  key: f,
2919
2919
  value: v
2920
2920
  } of _)
2921
- A[f] = v;
2922
- m("replace:form", A);
2921
+ x[f] = v;
2922
+ h("replace:form", x);
2923
2923
  }
2924
2924
  D(() => n.variants.map((_) => ({
2925
2925
  label: _.name,
@@ -2928,13 +2928,13 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
2928
2928
  })));
2929
2929
  function y(_) {
2930
2930
  var f;
2931
- const A = g(_.combinationKey || "");
2931
+ const x = g(_.combinationKey || "");
2932
2932
  return {
2933
2933
  ..._,
2934
- price: A == null ? void 0 : A.price,
2935
- inventoryBindings: (A == null ? void 0 : A.inventoryBindings) || t.form.inventoryBindings,
2936
- takeawayUsed: (A == null ? void 0 : A.takeawayUsed) || t.form.takeawayUsed,
2937
- groups: (A == null ? void 0 : A.groups) || ((f = t.form.groups) == null ? void 0 : f.map((v) => ({
2934
+ price: x == null ? void 0 : x.price,
2935
+ inventoryBindings: (x == null ? void 0 : x.inventoryBindings) || t.form.inventoryBindings,
2936
+ takeawayUsed: (x == null ? void 0 : x.takeawayUsed) || t.form.takeawayUsed,
2937
+ groups: (x == null ? void 0 : x.groups) || ((f = t.form.groups) == null ? void 0 : f.map((v) => ({
2938
2938
  ...v,
2939
2939
  groupKey: ""
2940
2940
  })))
@@ -2948,22 +2948,22 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
2948
2948
  contentComponentProps: {
2949
2949
  selectedVariants: ((_ = t.form.variant) == null ? void 0 : _.variantGroupIds) ?? []
2950
2950
  }
2951
- }).onPrimary(async (A) => {
2952
- M(A, y);
2951
+ }).onPrimary(async (x) => {
2952
+ A(x, y);
2953
2953
  });
2954
2954
  }
2955
2955
  function g(_) {
2956
2956
  var S, B;
2957
- const A = ((S = t.form.variant) == null ? void 0 : S.variantGroupIds) || [], f = (B = t.form.variant) == null ? void 0 : B.variantCombinations, k = _.split(/(?=variant)/g).map((H) => H.replace(/\/*$/, "")).filter((H) => A.some((J) => H.includes(J))).join("/");
2958
- return f == null ? void 0 : f.find((H) => H.combinationKey === k);
2957
+ const x = ((S = t.form.variant) == null ? void 0 : S.variantGroupIds) || [], f = (B = t.form.variant) == null ? void 0 : B.variantCombinations, M = _.split(/(?=variant)/g).map((H) => H.replace(/\/*$/, "")).filter((H) => x.some((J) => H.includes(J))).join("/");
2958
+ return f == null ? void 0 : f.find((H) => H.combinationKey === M);
2959
2959
  }
2960
2960
  const w = (_) => {
2961
- M(_);
2962
- }, F = D(() => {
2963
- var A;
2964
- return (((A = t.form.variant) == null ? void 0 : A.variantCombinations) || []).map((f) => {
2965
- var x, k;
2966
- const v = (k = (x = t.fallback) == null ? void 0 : x.variant) == null ? void 0 : k.variantCombinations.find(({
2961
+ A(_);
2962
+ }, E = D(() => {
2963
+ var x;
2964
+ return (((x = t.form.variant) == null ? void 0 : x.variantCombinations) || []).map((f) => {
2965
+ var k, M;
2966
+ const v = (M = (k = t.fallback) == null ? void 0 : k.variant) == null ? void 0 : M.variantCombinations.find(({
2967
2967
  combinationKey: S
2968
2968
  }) => S === f.combinationKey);
2969
2969
  return {
@@ -2978,17 +2978,17 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
2978
2978
  };
2979
2979
  });
2980
2980
  });
2981
- function M(_, A = (f) => f) {
2982
- var x;
2983
- const f = _.filter((k) => !!k);
2981
+ function A(_, x = (f) => f) {
2982
+ var k;
2983
+ const f = _.filter((M) => !!M);
2984
2984
  let v;
2985
2985
  if (f.length) {
2986
- const k = f.map((B) => n.variants.find((H) => H._id === B)), S = _e.fullVariantCombination(k).map(({
2986
+ const M = f.map((B) => n.variants.find((H) => H._id === B)), S = _e.fullVariantCombination(M).map(({
2987
2987
  combinationKey: B
2988
2988
  }) => {
2989
2989
  var J;
2990
2990
  const H = (J = t.form.variant) == null ? void 0 : J.variantCombinations.find((O) => O.combinationKey === B);
2991
- return A(H || {
2991
+ return x(H || {
2992
2992
  _id: t.form._id,
2993
2993
  combinationKey: B
2994
2994
  });
@@ -3010,7 +3010,7 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3010
3010
  takeawayUsed: null
3011
3011
  };
3012
3012
  } else {
3013
- const k = (x = t.form.variant) == null ? void 0 : x.variantCombinations.map((B) => B.takeawayUsed), S = [...new Set(k)];
3013
+ const M = (k = t.form.variant) == null ? void 0 : k.variantCombinations.map((B) => B.takeawayUsed), S = [...new Set(M)];
3014
3014
  c([{
3015
3015
  key: "variant",
3016
3016
  value: void 0
@@ -3023,16 +3023,16 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3023
3023
  takeawayUsed: S.length === 1 ? S[0] : null
3024
3024
  };
3025
3025
  }
3026
- m("replace:form", a.initDynamicGroupItem(v));
3026
+ h("replace:form", a.initDynamicGroupItem(v));
3027
3027
  }
3028
- async function I(_, A, f) {
3029
- const v = Le.clone(t.form);
3030
- v.variant.variantCombinations[_][A] = f, c([{
3028
+ async function I(_, x, f) {
3029
+ const v = Ue.clone(t.form);
3030
+ v.variant.variantCombinations[_][x] = f, c([{
3031
3031
  key: "variant",
3032
3032
  value: v.variant
3033
3033
  }]);
3034
3034
  }
3035
- const E = D(() => [{
3035
+ const F = D(() => [{
3036
3036
  accessorKey: "combinationKey",
3037
3037
  header: () => l("menu.product.form.variant.columns.variant"),
3038
3038
  enableSorting: !1,
@@ -3042,13 +3042,13 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3042
3042
  header: () => l("menu.product.form.variant.columns.code"),
3043
3043
  enableSorting: !1,
3044
3044
  cell: (_) => {
3045
- var k, S;
3046
- const A = _.getValue(), x = ((k = _.row.original.fallback) == null ? void 0 : k.code) ?? t.form.code ?? ((S = t.fallback) == null ? void 0 : S.code);
3045
+ var M, S;
3046
+ const x = _.getValue(), k = ((M = _.row.original.fallback) == null ? void 0 : M.code) ?? t.form.code ?? ((S = t.fallback) == null ? void 0 : S.code);
3047
3047
  return ue(ke.FmTextField, {
3048
- modelValue: A,
3049
- placeholder: x || l("menu.product.form.variant.placeholders.no_code"),
3048
+ modelValue: x,
3049
+ placeholder: k || l("menu.product.form.variant.placeholders.no_code"),
3050
3050
  "onUpdate:modelValue": (B) => {
3051
- I(_.row.index, "code", sn(B));
3051
+ I(_.row.index, "code", ln(B));
3052
3052
  }
3053
3053
  });
3054
3054
  }
@@ -3057,11 +3057,11 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3057
3057
  header: () => l("menu.product.form.variant.columns.order_from"),
3058
3058
  enableSorting: !1,
3059
3059
  cell: (_) => {
3060
- var x, k;
3061
- const A = _.getValue(), v = (x = _.row.original.fallback) == null ? void 0 : x.orderFrom;
3060
+ var k, M;
3061
+ const x = _.getValue(), v = (k = _.row.original.fallback) == null ? void 0 : k.orderFrom;
3062
3062
  return ue(Zt, {
3063
- modelValue: A ?? null,
3064
- fallback: t.form.orderFrom ?? v ?? ((k = t.fallback) == null ? void 0 : k.orderFrom),
3063
+ modelValue: x ?? null,
3064
+ fallback: t.form.orderFrom ?? v ?? ((M = t.fallback) == null ? void 0 : M.orderFrom),
3065
3065
  disable: !s.value.orderFrom,
3066
3066
  required: s.value.orderFrom && s.value.orderFromActiveOnly,
3067
3067
  editActiveOnly: s.value.orderFromActiveOnly || !1,
@@ -3077,11 +3077,11 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3077
3077
  header: () => l("menu.product.form.variant.columns.price"),
3078
3078
  enableSorting: !1,
3079
3079
  cell: (_) => {
3080
- var k, S;
3081
- const A = _.getValue(), x = ((k = _.row.original.fallback) == null ? void 0 : k.price) ?? t.form.price ?? ((S = t.fallback) == null ? void 0 : S.price);
3082
- return ue(Je, {
3083
- placeholder: x ? st(x) : void 0,
3084
- modelValue: A,
3080
+ var M, S;
3081
+ const x = _.getValue(), k = ((M = _.row.original.fallback) == null ? void 0 : M.price) ?? t.form.price ?? ((S = t.fallback) == null ? void 0 : S.price);
3082
+ return ue(Qe, {
3083
+ placeholder: k ? st(k) : void 0,
3084
+ modelValue: x,
3085
3085
  min: 0,
3086
3086
  "onUpdate:modelValue": (B) => {
3087
3087
  I(_.row.index, "price", B);
@@ -3095,11 +3095,11 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3095
3095
  header: () => l("menu.product.form.variant.columns.min_price"),
3096
3096
  enableSorting: !1,
3097
3097
  cell: (_) => {
3098
- var k, S, B;
3099
- const A = _.getValue(), f = _.row.original, x = ((k = f.fallback) == null ? void 0 : k.minPrice) ?? t.form.minPrice ?? ((S = t.fallback) == null ? void 0 : S.minPrice);
3100
- return ue(Je, {
3101
- placeholder: x ? st(x) : void 0,
3102
- modelValue: A,
3098
+ var M, S, B;
3099
+ const x = _.getValue(), f = _.row.original, k = ((M = f.fallback) == null ? void 0 : M.minPrice) ?? t.form.minPrice ?? ((S = t.fallback) == null ? void 0 : S.minPrice);
3100
+ return ue(Qe, {
3101
+ placeholder: k ? st(k) : void 0,
3102
+ modelValue: x,
3103
3103
  max: we.Dinero.fromFdoDinero(f.price ?? ((B = f.fallback) == null ? void 0 : B.price) ?? we.Dinero.zero().toObject()).toUnit(),
3104
3104
  "onUpdate:modelValue": (H) => {
3105
3105
  I(_.row.index, "minPrice", H);
@@ -3116,13 +3116,13 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3116
3116
  max: n.rules.item.maxVariant
3117
3117
  }) : !0;
3118
3118
  }
3119
- return (_, A) => {
3120
- const f = G("fm-button"), v = G("fm-icon"), x = G("FmFormGroup"), k = G("fm-table");
3121
- return z(), K($e, {
3119
+ return (_, x) => {
3120
+ const f = K("fm-button"), v = K("fm-icon"), k = K("FmFormGroup"), M = K("fm-table");
3121
+ return z(), G(Ve, {
3122
3122
  title: p(l)("menu.product.form.variant.title"),
3123
3123
  "sub-title": p(l)("menu.product.form.variant.subtitle")
3124
3124
  }, {
3125
- "append-title": N(() => [p(n).rules.item.variant ? (z(), K(f, {
3125
+ "append-title": N(() => [p(n).rules.item.variant ? (z(), G(f, {
3126
3126
  key: 0,
3127
3127
  label: p(l)("menu.product.form.variant.add"),
3128
3128
  variant: "secondary",
@@ -3131,7 +3131,7 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3131
3131
  }, null, 8, ["label"])) : ee("", !0)]),
3132
3132
  default: N(() => {
3133
3133
  var S;
3134
- return [T("div", Ta, [C(x, {
3134
+ return [T("div", Ta, [C(k, {
3135
3135
  "model-value": (S = _.form.variant) == null ? void 0 : S.variantGroupIds,
3136
3136
  rules: [R]
3137
3137
  }, {
@@ -3150,15 +3150,15 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3150
3150
  }) => {
3151
3151
  var J;
3152
3152
  return [T("div", Ua, [C(f, {
3153
- variant: p(Ge).Tertiary,
3153
+ variant: p(Ke).Tertiary,
3154
3154
  class: "handle",
3155
3155
  "prepend-icon": "drag_handle"
3156
- }, null, 8, ["variant"]), T("div", $a, [T("p", Va, se((J = h.value[H]) == null ? void 0 : J.name), 1), C(v, {
3156
+ }, null, 8, ["variant"]), T("div", $a, [T("p", Va, se((J = m.value[H]) == null ? void 0 : J.name), 1), C(v, {
3157
3157
  class: "cursor-pointer",
3158
3158
  name: "close",
3159
3159
  onClick: wt((O) => {
3160
3160
  var U;
3161
- return M(((U = _.form.variant) == null ? void 0 : U.variantGroupIds.filter((V) => V !== H)) ?? []);
3161
+ return A(((U = _.form.variant) == null ? void 0 : U.variantGroupIds.filter((V) => V !== H)) ?? []);
3162
3162
  }, ["stop"])
3163
3163
  }, null, 8, ["onClick"])])])];
3164
3164
  }),
@@ -3166,14 +3166,14 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3166
3166
  }, 8, ["model-value"])];
3167
3167
  }),
3168
3168
  _: 1
3169
- }, 8, ["model-value", "rules"]), C(ln, null, {
3170
- default: N(() => [F.value.length ? (z(), K(k, {
3169
+ }, 8, ["model-value", "rules"]), C(un, null, {
3170
+ default: N(() => [E.value.length ? (z(), G(M, {
3171
3171
  key: 0,
3172
3172
  class: "w-full",
3173
- "column-defs": E.value,
3173
+ "column-defs": F.value,
3174
3174
  "column-visibility": P.value,
3175
- "page-size": F.value.length ?? 0,
3176
- "row-data": F.value ?? [],
3175
+ "page-size": E.value.length ?? 0,
3176
+ "row-data": E.value ?? [],
3177
3177
  "hide-footer": "",
3178
3178
  "shrink-at": !1
3179
3179
  }, null, 8, ["column-defs", "column-visibility", "page-size", "row-data"])) : ee("", !0)]),
@@ -3188,18 +3188,18 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3188
3188
  __name: "AddForm",
3189
3189
  setup(e) {
3190
3190
  const i = he(), t = D(() => i.rules.group), n = D(() => !!i.state.currentCatalogId || !!i.state.currentSchedulerId), a = D(() => {
3191
- const s = !i.state.currentSchedulerId, u = i.rules.group.type, d = i.version === L.F_MENU_VERSION.enum.v3, h = i.rules.item.orderFromActiveOnly, m = i.rules.item.bindToVariant;
3191
+ const s = !i.state.currentSchedulerId, u = i.rules.group.type, d = i.version === L.F_MENU_VERSION.enum.v3, m = i.rules.item.orderFromActiveOnly, h = i.rules.item.bindToVariant;
3192
3192
  return function(y) {
3193
3193
  return {
3194
- link: (b) => !n.value && (!b || m),
3194
+ link: (b) => !n.value && (!b || h),
3195
3195
  name: (b) => !n.value && !b,
3196
3196
  type: u && !y._id && !n.value,
3197
3197
  price: y.type !== L.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
3198
3198
  inventory: s ? d ? !n.value && y.type === L.F_ADDON_GROUP_TYPE.enum.NORMAL : !n.value : !1,
3199
3199
  orderFrom: (b) => s ? d ? y.type === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? n.value : !!n.value == !b : n.value : !1,
3200
- orderFromActiveOnly: h,
3200
+ orderFromActiveOnly: m,
3201
3201
  showOrderFrom: s ? d ? n.value ? !0 : y.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT : n.value : !1,
3202
- bindToVariant: m,
3202
+ bindToVariant: h,
3203
3203
  isOverride: n.value,
3204
3204
  isItemGroup: !1,
3205
3205
  isV4: !d
@@ -3212,7 +3212,7 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3212
3212
  position: i.groups.length - 1,
3213
3213
  itemsLinked: []
3214
3214
  }), r = Q(o()), { t: l } = ce();
3215
- return (s, u) => t.value.create ? (z(), K(p(lr), {
3215
+ return (s, u) => t.value.create ? (z(), G(p(lr), {
3216
3216
  key: 0,
3217
3217
  "categorized-items": p(i).categorizedItems,
3218
3218
  config: a.value,
@@ -3230,7 +3230,7 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3230
3230
  _: 3
3231
3231
  }, 8, ["categorized-items", "config", "group", "title"])) : ee("", !0);
3232
3232
  }
3233
- }), Ba = { class: "fm-typo-en-title-md-600 mr-auto" }, Ga = { class: "space-y-40" }, Ka = { class: "flex gap-8 items-center justify-start" }, Wa = /* @__PURE__ */ le({
3233
+ }), Ba = { class: "fm-typo-en-title-md-600 mr-auto" }, Ka = { class: "space-y-40" }, Ga = { class: "flex gap-8 items-center justify-start" }, Wa = /* @__PURE__ */ le({
3234
3234
  __name: "Form",
3235
3235
  props: {
3236
3236
  bindingKey: {},
@@ -3241,74 +3241,78 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3241
3241
  },
3242
3242
  emits: ["update:inventory"],
3243
3243
  setup(e, { expose: i, emit: t }) {
3244
- const n = e, a = Q(!1), o = (m) => {
3245
- ct.isBoolean(m) ? a.value = m : a.value = !a.value;
3246
- }, r = Q([]), l = t;
3247
- function s() {
3248
- for (const m of r.value)
3249
- if (m.amount.amount <= 0)
3244
+ const n = e, a = Q(!1), o = (c) => {
3245
+ ct.isBoolean(c) ? a.value = c : a.value = !a.value;
3246
+ }, r = Q([]), l = t, s = $i(
3247
+ () => !Ue.isEqual(r.value, n.initialValue),
3248
+ () => {
3249
+ a.value = !1;
3250
+ }
3251
+ );
3252
+ function u() {
3253
+ for (const c of r.value)
3254
+ if (c.amount.amount <= 0)
3250
3255
  return;
3251
3256
  l("update:inventory", r.value), o(!1);
3252
3257
  }
3253
3258
  Ce(
3254
3259
  () => a.value,
3255
- (m) => {
3256
- m && (r.value = oe(n.initialValue));
3260
+ (c) => {
3261
+ c && (r.value = oe(n.initialValue), h.readInventory());
3257
3262
  }
3258
3263
  ), i({ getKey: () => n.bindingKey, trigger: o });
3259
- const { t: d } = ce(), h = $i();
3260
- return Qe(() => {
3261
- h.readInventory();
3262
- }), (m, c) => {
3263
- const y = G("fm-text-field"), b = G("fm-card"), g = G("fm-button"), w = G("fm-side-sheet");
3264
- return z(), q(Re, null, [
3265
- pe(m.$slots, "default", { trigger: o }),
3266
- C(w, {
3264
+ const { t: m } = ce(), h = Vi();
3265
+ return (c, y) => {
3266
+ const b = K("fm-text-field"), g = K("fm-card"), w = K("fm-button"), E = K("fm-side-sheet");
3267
+ return z(), q(Ae, null, [
3268
+ pe(c.$slots, "default", { trigger: o }),
3269
+ C(E, {
3267
3270
  id: "inventory-form",
3268
3271
  modelValue: a.value,
3269
- "onUpdate:modelValue": c[2] || (c[2] = (F) => a.value = F),
3272
+ "onUpdate:modelValue": y[2] || (y[2] = (A) => a.value = A),
3270
3273
  "close-button": !1,
3271
3274
  "is-container": p(ke).FmForm,
3272
3275
  "is-container-props": {
3273
- onValidationSuccess: s,
3276
+ onValidationSuccess: u,
3274
3277
  blameFormChildOnValidationFailed: !0
3275
3278
  },
3276
- "max-width": 560
3279
+ "max-width": 560,
3280
+ "onOn:clickedAway": p(s)
3277
3281
  }, {
3278
3282
  "side-sheet-header": N(() => [
3279
- T("p", Ba, se(m.title || p(d)("menu.inventory.form.title")), 1)
3283
+ T("p", Ba, se(c.title || p(m)("menu.inventory.form.title")), 1)
3280
3284
  ]),
3281
3285
  "side-sheet-footer": N(() => [
3282
- T("div", Ka, [
3283
- C(g, {
3284
- label: p(d)("menu.common.actions.add"),
3286
+ T("div", Ga, [
3287
+ C(w, {
3288
+ label: p(m)("menu.common.actions.add"),
3285
3289
  size: "lg",
3286
3290
  type: "submit",
3287
3291
  variant: "primary"
3288
3292
  }, null, 8, ["label"]),
3289
- C(g, {
3290
- label: p(d)("menu.common.actions.cancel"),
3293
+ C(w, {
3294
+ label: p(m)("menu.common.actions.cancel"),
3291
3295
  size: "lg",
3292
3296
  variant: "tertiary",
3293
- onClick: c[1] || (c[1] = () => a.value = !1)
3297
+ onClick: y[1] || (y[1] = () => a.value = !1)
3294
3298
  }, null, 8, ["label"])
3295
3299
  ])
3296
3300
  ]),
3297
3301
  default: N(() => [
3298
- T("div", Ga, [
3299
- C(y, {
3300
- "model-value": m.name,
3302
+ T("div", Ka, [
3303
+ C(b, {
3304
+ "model-value": c.name,
3301
3305
  disabled: "",
3302
- label: p(d)("menu.inventory.form.product_name")
3306
+ label: p(m)("menu.inventory.form.product_name")
3303
3307
  }, null, 8, ["model-value", "label"]),
3304
- C(b, {
3308
+ C(g, {
3305
3309
  class: "p-16 space-y-24",
3306
3310
  variant: "outlined"
3307
3311
  }, {
3308
3312
  default: N(() => [
3309
3313
  C(p(Un), {
3310
3314
  modelValue: r.value,
3311
- "onUpdate:modelValue": c[0] || (c[0] = (F) => r.value = F)
3315
+ "onUpdate:modelValue": y[0] || (y[0] = (A) => r.value = A)
3312
3316
  }, null, 8, ["modelValue"])
3313
3317
  ]),
3314
3318
  _: 1
@@ -3316,7 +3320,7 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3316
3320
  ])
3317
3321
  ]),
3318
3322
  _: 1
3319
- }, 8, ["modelValue", "is-container", "is-container-props"])
3323
+ }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])
3320
3324
  ], 64);
3321
3325
  };
3322
3326
  }
@@ -3350,9 +3354,9 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3350
3354
  combinationKey: U.combinationKey
3351
3355
  }))])), {
3352
3356
  searchKey: d,
3353
- filter: h
3354
- } = En(), m = D(() => {
3355
- const O = Object.entries(t.group.items).filter(([, U]) => h([U.code || "", U.name || U.fallbackName, b(U.price ?? U.fallbackPrice), g(U.orderFrom || U.fallbackOrder), ...(U.items || []).map((V) => [V.code || "", V.name || V.fallbackName, b(V.price ?? V.fallbackPrice), g(V.orderFrom || V.fallbackOrder)].join(""))]));
3357
+ filter: m
3358
+ } = In(), h = D(() => {
3359
+ const O = Object.entries(t.group.items).filter(([, U]) => m([U.code || "", U.name || U.fallbackName, b(U.price ?? U.fallbackPrice), g(U.orderFrom || U.fallbackOrder), ...(U.items || []).map((V) => [V.code || "", V.name || V.fallbackName, b(V.price ?? V.fallbackPrice), g(V.orderFrom || V.fallbackOrder)].join(""))]));
3356
3360
  return Object.fromEntries(O);
3357
3361
  }), c = (O) => ({
3358
3362
  ...t.config,
@@ -3361,20 +3365,20 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3361
3365
  orderFrom: t.config.orderFrom(O)
3362
3366
  }), y = D(() => t.config.isItemGroup), b = (O) => O ? st(O, !1) : "", g = (O) => {
3363
3367
  var U;
3364
- return O == null ? "" : (U = gn()[O]) == null ? void 0 : U.label;
3365
- }, w = D(() => Object.values(m.value)), F = Q({}), {
3366
- t: M
3368
+ return O == null ? "" : (U = vn()[O]) == null ? void 0 : U.label;
3369
+ }, w = D(() => Object.values(h.value)), E = Q({}), {
3370
+ t: A
3367
3371
  } = ce(), I = Q([{
3368
3372
  accessorKey: "name",
3369
- header: () => M("menu.group.option.product_title"),
3373
+ header: () => A("menu.group.option.product_title"),
3370
3374
  enableSorting: !1,
3371
3375
  cell: (O) => {
3372
- const U = O.getValue(), V = O.row.original, Z = O.row.depth > 0, j = V.combinationKey ? Li(V.combinationKey, he().variants) : null;
3376
+ const U = O.getValue(), V = O.row.original, Z = O.row.depth > 0, j = V.combinationKey ? Bi(V.combinationKey, he().variants) : null;
3373
3377
  return ue("div", ue(ke.FmTextField, {
3374
3378
  modelValue: U,
3375
3379
  placeholder: j ?? "",
3376
3380
  disabled: !c(V.combinationKey).name,
3377
- rules: j ? void 0 : [(te) => te.length > 0 || M("menu.group.option.product_title_required")],
3381
+ rules: j ? void 0 : [(te) => te.length > 0 || A("menu.group.option.product_title_required")],
3378
3382
  "onUpdate:modelValue": (te) => {
3379
3383
  var ae;
3380
3384
  if (Z) {
@@ -3392,7 +3396,7 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3392
3396
  name: "keyboard_arrow_up",
3393
3397
  onClick: O.row.getToggleExpandedHandler(),
3394
3398
  class: ["cursor-pointer", "transition-transform", O.row.getIsExpanded() ? "transform rotate-180" : ""],
3395
- color: c(V.combinationKey).name ? void 0 : Ve.NeutralGray200
3399
+ color: c(V.combinationKey).name ? void 0 : Ne.NeutralGray200
3396
3400
  }) : void 0;
3397
3401
  }
3398
3402
  }));
@@ -3402,13 +3406,13 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3402
3406
  enableSorting: !1,
3403
3407
  header: () => {
3404
3408
  var O;
3405
- return M("menu.group.option.price", {
3409
+ return A("menu.group.option.price", {
3406
3410
  symbol: (O = r.value) == null ? void 0 : O.currency.symbol
3407
3411
  });
3408
3412
  },
3409
3413
  cell: (O) => {
3410
3414
  const U = O.getValue(), V = O.row.original, Z = V.fallbackPrice, j = O.row.depth > 0;
3411
- return ue(Je, {
3415
+ return ue(Qe, {
3412
3416
  placeholder: Z ? st(Z) : void 0,
3413
3417
  modelValue: U,
3414
3418
  required: !Z,
@@ -3435,7 +3439,7 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3435
3439
  }
3436
3440
  }, {
3437
3441
  accessorKey: "orderFrom",
3438
- header: () => M("menu.common.labels.order_from"),
3442
+ header: () => A("menu.common.labels.order_from"),
3439
3443
  enableSorting: !1,
3440
3444
  cell: (O) => {
3441
3445
  const U = O.getValue(), V = O.row.original, Z = V.fallbackOrder, j = O.row.depth > 0;
@@ -3499,25 +3503,25 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3499
3503
  }, {
3500
3504
  default: ({
3501
3505
  trigger: Z
3502
- }) => C(G("fm-tooltip"), {
3506
+ }) => C(K("fm-tooltip"), {
3503
3507
  content: "Inventory",
3504
3508
  zIndex: 110
3505
3509
  }, {
3506
3510
  default: () => {
3507
3511
  var j;
3508
- return [C(G("fm-button"), {
3509
- variant: Ge.Tertiary,
3512
+ return [C(K("fm-button"), {
3513
+ variant: Ke.Tertiary,
3510
3514
  prependIcon: "inventory_2",
3511
3515
  overwriteIconOutline: (j = U.inventoryBindings) != null && j.length ? "filled" : "outline",
3512
- textColor: Ve.NeutralGray400,
3516
+ textColor: Ne.NeutralGray400,
3513
3517
  onClick: Z
3514
3518
  }, null)];
3515
3519
  }
3516
3520
  })
3517
- }), c(U.combinationKey).link && C(G("fm-button"), {
3518
- variant: Ge.Tertiary,
3521
+ }), c(U.combinationKey).link && C(K("fm-button"), {
3522
+ variant: Ke.Tertiary,
3519
3523
  prependIcon: "delete",
3520
- textColor: Ve.NeutralGray400,
3524
+ textColor: Ne.NeutralGray400,
3521
3525
  onClick: () => {
3522
3526
  var Z;
3523
3527
  if (V) {
@@ -3525,11 +3529,11 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3525
3529
  if (!j) return;
3526
3530
  f(j._id, U.combinationKey ?? "");
3527
3531
  } else
3528
- A(U._id);
3532
+ x(U._id);
3529
3533
  }
3530
3534
  }, null)]);
3531
3535
  }
3532
- }]), E = D(() => ({
3536
+ }]), F = D(() => ({
3533
3537
  name: !0,
3534
3538
  price: c(null).price,
3535
3539
  orderFrom: c(null).showOrderFrom,
@@ -3568,16 +3572,16 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3568
3572
  });
3569
3573
  }
3570
3574
  function _(O, U, V, Z) {
3571
- var de, ot;
3575
+ var de, nt;
3572
3576
  const j = oe(t.group), te = (de = j.items[O].items) == null ? void 0 : de.findIndex((xt) => xt.combinationKey === U);
3573
3577
  if (!ct.isSet(te)) return;
3574
- let ae = (ot = j.items[O].items) == null ? void 0 : ot[te];
3578
+ let ae = (nt = j.items[O].items) == null ? void 0 : nt[te];
3575
3579
  ae && (ae = {
3576
3580
  ...ae,
3577
3581
  [V]: Z
3578
3582
  }, j.items[O].items[te] = ae, n("update:group", j));
3579
3583
  }
3580
- function A(O) {
3584
+ function x(O) {
3581
3585
  const U = oe(t.group);
3582
3586
  delete U.items[O], n("update:group", U);
3583
3587
  }
@@ -3589,16 +3593,16 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3589
3593
  var V;
3590
3594
  return O[U._id] = {
3591
3595
  price: U.price,
3592
- variants: vn(((V = U.variant) == null ? void 0 : V.variantCombinations) || [], "combinationKey")
3596
+ variants: bn(((V = U.variant) == null ? void 0 : V.variantCombinations) || [], "combinationKey")
3593
3597
  }, O;
3594
- }, {})), x = (O) => {
3598
+ }, {})), k = (O) => {
3595
3599
  var j, te;
3596
3600
  const V = o.state.menu.modules.item.find((ae) => ae._id === O._id), Z = O.combinationKey ? {
3597
3601
  ...(j = V == null ? void 0 : V.variant) == null ? void 0 : j.variantCombinations.find((ae) => ae.combinationKey === O.combinationKey),
3598
3602
  name: Ei(he().variants, ((te = V == null ? void 0 : V.variant) == null ? void 0 : te.variantGroupIds) || [])[O.combinationKey]
3599
3603
  } : V;
3600
3604
  return Z == null ? void 0 : Z.name;
3601
- }, k = async (O) => {
3605
+ }, M = async (O) => {
3602
3606
  let U = qt(t.group);
3603
3607
  U = {
3604
3608
  ...U,
@@ -3606,7 +3610,7 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3606
3610
  const Z = U.items.find((te) => te._id == V._id && te.combinationKey == V.combinationKey), j = v.value[V._id];
3607
3611
  return Z || {
3608
3612
  ...V,
3609
- name: x(V),
3613
+ name: k(V),
3610
3614
  price: V.combinationKey ? j.variants[V.combinationKey || ""].price : j.price,
3611
3615
  orderFrom: L.F_ORDER_FROM.enum.ALL
3612
3616
  };
@@ -3622,51 +3626,51 @@ const ln = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
3622
3626
  }
3623
3627
  const H = Pi(), J = D(() => H.breakpoints.value.xs);
3624
3628
  return (O, U) => {
3625
- const V = G("fm-button"), Z = G("fm-table");
3626
- return z(), K($e, {
3627
- title: p(M)("menu.group.option.title")
3629
+ const V = K("fm-button"), Z = K("fm-table");
3630
+ return z(), G(Ve, {
3631
+ title: p(A)("menu.group.option.title")
3628
3632
  }, {
3629
- "append-title": N(() => [O.config.link() ? (z(), q(Re, {
3633
+ "append-title": N(() => [O.config.link() ? (z(), q(Ae, {
3630
3634
  key: 0
3631
3635
  }, [s.value ? (z(), q("div", ja, [C(Tn, {
3632
3636
  "categorized-items": O.categorizedItems,
3633
3637
  "initial-value": u.value,
3634
3638
  "show-variant": O.config.bindToVariant,
3635
3639
  "select-variant": "",
3636
- title: p(M)("menu.group.option.link_products"),
3637
- onSubmit: k
3640
+ title: p(A)("menu.group.option.link_products"),
3641
+ onSubmit: M
3638
3642
  }, {
3639
3643
  default: N(({
3640
3644
  trigger: j
3641
3645
  }) => [C(V, {
3642
- "text-color": p(Ve).ColorPrimary,
3643
- "border-color": p(Ve).ColorPrimary,
3646
+ "text-color": p(Ne).ColorPrimary,
3647
+ "border-color": p(Ne).ColorPrimary,
3644
3648
  variant: "secondary",
3645
- label: p(M)("menu.group.option.link_products"),
3649
+ label: p(A)("menu.group.option.link_products"),
3646
3650
  "prepend-icon": "link",
3647
3651
  onClick: j
3648
3652
  }, null, 8, ["text-color", "border-color", "label", "onClick"])]),
3649
3653
  _: 1
3650
3654
  }, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : (z(), q("div", Ya, [C(V, {
3651
- "text-color": p(Ve).ColorPrimary,
3652
- "border-color": p(Ve).ColorPrimary,
3655
+ "text-color": p(Ne).ColorPrimary,
3656
+ "border-color": p(Ne).ColorPrimary,
3653
3657
  variant: "secondary",
3654
- label: p(M)("menu.group.option.add_option"),
3658
+ label: p(A)("menu.group.option.add_option"),
3655
3659
  "prepend-icon": "add",
3656
3660
  onClick: P
3657
3661
  }, null, 8, ["text-color", "border-color", "label"])]))], 64)) : ee("", !0)]),
3658
3662
  default: N(() => [T("div", Ha, [T("div", Xa, [C(Z, {
3659
3663
  "column-defs": I.value,
3660
- "column-visibility": E.value,
3664
+ "column-visibility": F.value,
3661
3665
  draggable: !J.value && c(null).name,
3662
- "expanded-state": l.value ? {} : F.value,
3666
+ "expanded-state": l.value ? {} : E.value,
3663
3667
  "get-sub-row": S,
3664
3668
  "page-size": 999,
3665
3669
  "row-data": w.value,
3666
3670
  "search-value": p(d),
3667
3671
  "shrink-at": !1,
3668
3672
  "hide-footer": "",
3669
- "onUpdate:expandedState": U[0] || (U[0] = (j) => F.value = j),
3673
+ "onUpdate:expandedState": U[0] || (U[0] = (j) => E.value = j),
3670
3674
  onDndChanged: U[1] || (U[1] = (j) => B(j)),
3671
3675
  "onUpdate:dragging": U[2] || (U[2] = (j) => l.value = j)
3672
3676
  }, null, 8, ["column-defs", "column-visibility", "draggable", "expanded-state", "row-data", "search-value"])])])]),
@@ -3683,7 +3687,7 @@ function Ja(e, i) {
3683
3687
  const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-title-md-600" }, ir = {
3684
3688
  key: 0,
3685
3689
  class: "pt-8 space-y-32"
3686
- }, nr = { class: "flex gap-8 items-center justify-start" }, un = /* @__PURE__ */ le({
3690
+ }, nr = { class: "flex gap-8 items-center justify-start" }, cn = /* @__PURE__ */ le({
3687
3691
  __name: "Form",
3688
3692
  props: {
3689
3693
  title: {},
@@ -3696,9 +3700,9 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3696
3700
  emits: ["update:group", "submit:group", "status:show"],
3697
3701
  setup(e, { expose: i, emit: t }) {
3698
3702
  let n = e;
3699
- const a = t, o = he(), r = Ue(), l = He(Ye(Be())), s = Q(!1), u = Q(!1), d = (I) => {
3703
+ const a = t, o = he(), r = $e(), l = He(Ye(Be())), s = Q(!1), u = Q(!1), d = (I) => {
3700
3704
  ct.isBoolean(I) ? u.value = I : u.value = !u.value;
3701
- }, h = D(() => n.config(n.group)), m = D(() => [
3705
+ }, m = D(() => n.config(n.group)), h = D(() => [
3702
3706
  {
3703
3707
  label: "Normal",
3704
3708
  value: L.F_ADDON_GROUP_TYPE.enum.NORMAL
@@ -3716,7 +3720,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3716
3720
  a("update:group", I);
3717
3721
  }
3718
3722
  function y(I) {
3719
- function E() {
3723
+ function F() {
3720
3724
  c({
3721
3725
  ...n.group,
3722
3726
  items: {},
@@ -3734,23 +3738,23 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3734
3738
  text: "No",
3735
3739
  close: !0
3736
3740
  }
3737
- }).onPrimary(E) : E();
3741
+ }).onPrimary(F) : F();
3738
3742
  }
3739
3743
  function b(I) {
3740
- return new Ni(o, l.updateMenu, r).mapGroups(
3744
+ return new Li(o, l.updateMenu, r).mapGroups(
3741
3745
  [I],
3742
- h.value.isOverride
3746
+ m.value.isOverride
3743
3747
  )[0];
3744
3748
  }
3745
- const g = Q(Le.clone(n.group)), w = Pn(
3746
- () => !Le.isEqual(n.group, g.value),
3749
+ const g = Q(Ue.clone(n.group)), w = $i(
3750
+ () => !Ue.isEqual(n.group, g.value),
3747
3751
  () => {
3748
3752
  u.value = !1;
3749
3753
  }
3750
3754
  );
3751
- async function F() {
3755
+ async function E() {
3752
3756
  if (n.action === "add") {
3753
- const { group: I, linkItems: E } = Vi(n.group), P = {
3757
+ const { group: I, linkItems: F } = Ni(n.group), P = {
3754
3758
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
3755
3759
  operation: ye.F_OPERATION_TYPE.create,
3756
3760
  data: I,
@@ -3758,7 +3762,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3758
3762
  {
3759
3763
  module: L.F_MENU_MODULE_V4_KEY.enum.item,
3760
3764
  id: "",
3761
- data: E
3765
+ data: F
3762
3766
  }
3763
3767
  ]
3764
3768
  };
@@ -3769,24 +3773,24 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3769
3773
  Ce(
3770
3774
  () => u.value,
3771
3775
  (I) => {
3772
- a("status:show", I), I && (g.value = Le.clone(n.group));
3776
+ a("status:show", I), I && (g.value = Ue.clone(n.group));
3773
3777
  }
3774
3778
  ), i({
3775
3779
  trigger: d,
3776
3780
  show: u
3777
3781
  });
3778
- const { t: M } = ce();
3779
- return (I, E) => {
3780
- const P = G("fm-text-field"), R = G("fm-stepper-field"), _ = G("FmFormGroup"), A = G("fm-radio"), f = G("fm-radio-group"), v = G("fm-switch"), x = G("fm-button"), k = G("fm-side-sheet");
3781
- return z(), q(Re, null, [
3782
+ const { t: A } = ce();
3783
+ return (I, F) => {
3784
+ const P = K("fm-text-field"), R = K("fm-stepper-field"), _ = K("FmFormGroup"), x = K("fm-radio"), f = K("fm-radio-group"), v = K("fm-switch"), k = K("fm-button"), M = K("fm-side-sheet");
3785
+ return z(), q(Ae, null, [
3782
3786
  pe(I.$slots, "default", { trigger: d }),
3783
- C(k, {
3787
+ C(M, {
3784
3788
  id: "group-form",
3785
3789
  modelValue: u.value,
3786
- "onUpdate:modelValue": E[8] || (E[8] = (S) => u.value = S),
3790
+ "onUpdate:modelValue": F[8] || (F[8] = (S) => u.value = S),
3787
3791
  "is-container": p(ke).FmForm,
3788
3792
  "is-container-props": {
3789
- onValidationSuccess: F,
3793
+ onValidationSuccess: E,
3790
3794
  blameFormChildOnValidationFailed: !0
3791
3795
  },
3792
3796
  "max-width": 560,
@@ -3797,60 +3801,60 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3797
3801
  ]),
3798
3802
  "side-sheet-footer": N(() => [
3799
3803
  T("div", nr, [
3800
- C(x, {
3804
+ C(k, {
3801
3805
  label: p(Vn)(I.action),
3802
3806
  loading: s.value,
3803
3807
  size: "lg",
3804
3808
  type: "submit",
3805
3809
  variant: "primary"
3806
3810
  }, null, 8, ["label", "loading"]),
3807
- C(x, {
3808
- label: p(M)("menu.common.actions.cancel"),
3811
+ C(k, {
3812
+ label: p(A)("menu.common.actions.cancel"),
3809
3813
  size: "lg",
3810
3814
  variant: "tertiary",
3811
- onClick: E[7] || (E[7] = () => u.value = !1)
3815
+ onClick: F[7] || (F[7] = () => u.value = !1)
3812
3816
  }, null, 8, ["label"])
3813
3817
  ])
3814
3818
  ]),
3815
3819
  default: N(() => [
3816
3820
  I.group ? (z(), q("div", ir, [
3817
3821
  pe(I.$slots, "variant-section"),
3818
- C(Fn, null, {
3822
+ C(En, null, {
3819
3823
  default: N(() => [
3820
3824
  T("div", null, [
3821
3825
  C(P, {
3822
3826
  modelValue: I.group.name,
3823
- "onUpdate:modelValue": E[0] || (E[0] = (S) => I.group.name = S),
3824
- disabled: !h.value.link(),
3827
+ "onUpdate:modelValue": F[0] || (F[0] = (S) => I.group.name = S),
3828
+ disabled: !m.value.link(),
3825
3829
  rules: [
3826
- (S) => !!S || p(M)("menu.common.validation.required", { field: p(M)("menu.common.labels.group_name") })
3830
+ (S) => !!S || p(A)("menu.common.validation.required", { field: p(A)("menu.common.labels.group_name") })
3827
3831
  ],
3828
3832
  autofocus: "",
3829
- label: p(M)("menu.common.labels.group_name")
3833
+ label: p(A)("menu.common.labels.group_name")
3830
3834
  }, null, 8, ["modelValue", "disabled", "rules", "label"])
3831
3835
  ]),
3832
3836
  C(_, {
3833
3837
  "model-value": I.group,
3834
- rules: [() => I.group.min <= I.group.max || p(M)("menu.common.validation.min_max")]
3838
+ rules: [() => I.group.min <= I.group.max || p(A)("menu.common.validation.min_max")]
3835
3839
  }, {
3836
3840
  default: N(() => [
3837
3841
  C(er, null, {
3838
3842
  default: N(() => [
3839
3843
  C(R, {
3840
3844
  modelValue: I.group.min,
3841
- "onUpdate:modelValue": E[1] || (E[1] = (S) => I.group.min = S),
3842
- disabled: !h.value.link(),
3845
+ "onUpdate:modelValue": F[1] || (F[1] = (S) => I.group.min = S),
3846
+ disabled: !m.value.link(),
3843
3847
  min: 0,
3844
3848
  class: "flex-1",
3845
- label: p(M)("menu.common.labels.min_select")
3849
+ label: p(A)("menu.common.labels.min_select")
3846
3850
  }, null, 8, ["modelValue", "disabled", "label"]),
3847
3851
  C(R, {
3848
3852
  modelValue: I.group.max,
3849
- "onUpdate:modelValue": E[2] || (E[2] = (S) => I.group.max = S),
3850
- disabled: !h.value.link(),
3853
+ "onUpdate:modelValue": F[2] || (F[2] = (S) => I.group.max = S),
3854
+ disabled: !m.value.link(),
3851
3855
  min: I.group.min,
3852
3856
  class: "flex-1",
3853
- label: p(M)("menu.common.labels.max_select")
3857
+ label: p(A)("menu.common.labels.max_select")
3854
3858
  }, null, 8, ["modelValue", "disabled", "min", "label"])
3855
3859
  ]),
3856
3860
  _: 1
@@ -3858,20 +3862,20 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3858
3862
  ]),
3859
3863
  _: 1
3860
3864
  }, 8, ["model-value", "rules"]),
3861
- h.value.type ? (z(), K(et, {
3865
+ m.value.type ? (z(), G(Je, {
3862
3866
  key: 0,
3863
- label: p(M)("menu.common.labels.group_type")
3867
+ label: p(A)("menu.common.labels.group_type")
3864
3868
  }, {
3865
3869
  default: N(() => [
3866
3870
  C(f, {
3867
- disabled: !h.value.type,
3871
+ disabled: !m.value.type,
3868
3872
  "model-value": I.group.type,
3869
- "onUpdate:modelValue": E[3] || (E[3] = (S) => y(S))
3873
+ "onUpdate:modelValue": F[3] || (F[3] = (S) => y(S))
3870
3874
  }, {
3871
3875
  default: N(() => [
3872
- (z(!0), q(Re, null, Ke(m.value, (S) => (z(), K(A, {
3876
+ (z(!0), q(Ae, null, Ge(h.value, (S) => (z(), G(x, {
3873
3877
  key: S.value,
3874
- label: p(M)(`menu.group.types.${S.label.toLowerCase()}`),
3878
+ label: p(A)(`menu.group.types.${S.label.toLowerCase()}`),
3875
3879
  value: S.value
3876
3880
  }, null, 8, ["label", "value"]))), 128))
3877
3881
  ]),
@@ -3880,17 +3884,17 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3880
3884
  ]),
3881
3885
  _: 1
3882
3886
  }, 8, ["label"])) : ee("", !0),
3883
- C(et, {
3884
- label: p(M)("menu.common.labels.configuration")
3887
+ C(Je, {
3888
+ label: p(A)("menu.common.labels.configuration")
3885
3889
  }, {
3886
3890
  default: N(() => [
3887
3891
  C(v, {
3888
3892
  modelValue: I.group.stackable,
3889
- "onUpdate:modelValue": E[4] || (E[4] = (S) => I.group.stackable = S),
3890
- disabled: !h.value.link(),
3891
- label: p(M)("menu.common.labels.stackable"),
3893
+ "onUpdate:modelValue": F[4] || (F[4] = (S) => I.group.stackable = S),
3894
+ disabled: !m.value.link(),
3895
+ label: p(A)("menu.common.labels.stackable"),
3892
3896
  "label-placement": "right",
3893
- sublabel: p(M)("menu.common.labels.stackable_sublabel")
3897
+ sublabel: p(A)("menu.common.labels.stackable_sublabel")
3894
3898
  }, null, 8, ["modelValue", "disabled", "label", "sublabel"])
3895
3899
  ]),
3896
3900
  _: 1
@@ -3901,10 +3905,10 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3901
3905
  C(qa, {
3902
3906
  "allow-refund-inventory": I.allowRefundInventory ?? !1,
3903
3907
  "categorized-items": I.categorizedItems,
3904
- config: h.value,
3908
+ config: m.value,
3905
3909
  group: I.group,
3906
- "onUpdate:group": E[5] || (E[5] = (S) => c(S)),
3907
- "onUpdate:unmapGroup": E[6] || (E[6] = (S) => c(b(S)))
3910
+ "onUpdate:group": F[5] || (F[5] = (S) => c(S)),
3911
+ "onUpdate:unmapGroup": F[6] || (F[6] = (S) => c(b(S)))
3908
3912
  }, null, 8, ["allow-refund-inventory", "categorized-items", "config", "group"])
3909
3913
  ])) : ee("", !0)
3910
3914
  ]),
@@ -3922,53 +3926,53 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3922
3926
  },
3923
3927
  emits: ["update:combinations"],
3924
3928
  setup(e, { expose: i, emit: t }) {
3925
- var I, E;
3926
- const n = e, a = t, o = he(), r = Ue(), l = He(Ye(Be())), s = Q([]), u = Q(n.combinations[0].combinationKey || ""), d = D(
3929
+ var I, F;
3930
+ const n = e, a = t, o = he(), r = $e(), l = He(Ye(Be())), s = Q([]), u = Q(n.combinations[0].combinationKey || ""), d = D(
3927
3931
  () => s.value.findIndex((P) => P.combinationKey == u.value)
3928
- ), h = D(
3932
+ ), m = D(
3929
3933
  () => n.combinations.map((P) => ({
3930
3934
  label: n.fullCombinations[P.combinationKey || ""],
3931
3935
  value: P.combinationKey || ""
3932
3936
  }))
3933
- ), m = D(() => {
3934
- var v, x;
3935
- const P = ((x = (v = s.value[d.value]) == null ? void 0 : v.groups) == null ? void 0 : x.find(
3936
- (k) => k._id === n.groupId
3937
+ ), h = D(() => {
3938
+ var v, k;
3939
+ const P = ((k = (v = s.value[d.value]) == null ? void 0 : v.groups) == null ? void 0 : k.find(
3940
+ (M) => M._id === n.groupId
3937
3941
  )) || {
3938
3942
  _id: n.groupId,
3939
3943
  groupKey: ""
3940
- }, _ = o.state.menu.modules.group.find((k) => k._id === n.groupId), A = Object.entries({ ...P, items: void 0 }).filter(([, k]) => !!k), f = {
3944
+ }, _ = o.state.menu.modules.group.find((M) => M._id === n.groupId), x = Object.entries({ ...P, items: void 0 }).filter(([, M]) => !!M), f = {
3941
3945
  ..._,
3942
- ...Object.fromEntries(A),
3943
- items: _.items.map((k) => {
3946
+ ...Object.fromEntries(x),
3947
+ items: _.items.map((M) => {
3944
3948
  var B;
3945
3949
  const S = (B = P.items) == null ? void 0 : B.find(
3946
- (H) => H._id == k._id && H.combinationKey == k.combinationKey
3950
+ (H) => H._id == M._id && H.combinationKey == M.combinationKey
3947
3951
  );
3948
3952
  return {
3949
- ...k,
3953
+ ...M,
3950
3954
  ...S ?? {},
3951
3955
  price: (S == null ? void 0 : S.price) || null,
3952
3956
  inventoryBindings: (S == null ? void 0 : S.inventoryBindings) || null
3953
3957
  };
3954
3958
  })
3955
3959
  };
3956
- return new Ni(o, l.updateMenu, r).mapGroups([f], !0)[0];
3960
+ return new Li(o, l.updateMenu, r).mapGroups([f], !0)[0];
3957
3961
  });
3958
3962
  function c(P) {
3959
3963
  var f, v;
3960
3964
  const R = (f = s.value[d.value].groups) == null ? void 0 : f.findIndex(
3961
- (x) => x._id === n.groupId
3962
- ), _ = oe(s.value), A = { ...qt(P), _id: n.groupId, groupKey: "" };
3965
+ (k) => k._id === n.groupId
3966
+ ), _ = oe(s.value), x = { ...qt(P), _id: n.groupId, groupKey: "" };
3963
3967
  (R ?? -1) < 0 ? _[d.value] = {
3964
3968
  ..._[d.value],
3965
- groups: [...((v = _[d.value]) == null ? void 0 : v.groups) || [], A]
3966
- } : _[d.value].groups[R] = A, s.value = _;
3969
+ groups: [...((v = _[d.value]) == null ? void 0 : v.groups) || [], x]
3970
+ } : _[d.value].groups[R] = x, s.value = _;
3967
3971
  }
3968
3972
  function y(P) {
3969
- const R = h.value.length;
3973
+ const R = m.value.length;
3970
3974
  let _ = d.value;
3971
- P === "left" ? _ = _ === 0 ? R - 1 : _ - 1 : _ = _ === R - 1 ? 0 : _ + 1, u.value = h.value[_].value;
3975
+ P === "left" ? _ = _ === 0 ? R - 1 : _ - 1 : _ = _ === R - 1 ? 0 : _ + 1, u.value = m.value[_].value;
3972
3976
  }
3973
3977
  function b(P) {
3974
3978
  return {
@@ -3996,23 +4000,23 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
3996
4000
  P && (s.value = oe(n.combinations), u.value = n.combinations[0].combinationKey || "");
3997
4001
  }
3998
4002
  );
3999
- const F = Q();
4003
+ const E = Q();
4000
4004
  i({
4001
- show: (I = F.value) == null ? void 0 : I.show,
4002
- trigger: (E = F.value) == null ? void 0 : E.trigger
4005
+ show: (I = E.value) == null ? void 0 : I.show,
4006
+ trigger: (F = E.value) == null ? void 0 : F.trigger
4003
4007
  });
4004
- const { t: M } = ce();
4008
+ const { t: A } = ce();
4005
4009
  return (P, R) => {
4006
- const _ = G("fm-select"), A = G("fm-button"), f = G("fm-card");
4007
- return z(), K(un, {
4010
+ const _ = K("fm-select"), x = K("fm-button"), f = K("fm-card");
4011
+ return z(), G(cn, {
4008
4012
  ref_key: "sheet",
4009
- ref: F,
4013
+ ref: E,
4010
4014
  "allow-refund-inventory": !0,
4011
4015
  "categorized-items": p(o).categorizedItems,
4012
4016
  config: b,
4013
- group: m.value,
4017
+ group: h.value,
4014
4018
  action: "update",
4015
- title: p(M)("menu.group.update"),
4019
+ title: p(A)("menu.group.update"),
4016
4020
  "onUpdate:group": R[3] || (R[3] = (v) => c(v)),
4017
4021
  "onSubmit:group": R[4] || (R[4] = (v) => g()),
4018
4022
  "onStatus:show": R[5] || (R[5] = (v) => w.value = v)
@@ -4021,30 +4025,30 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4021
4025
  pe(P.$slots, "default", { trigger: v })
4022
4026
  ]),
4023
4027
  "variant-section": N(() => [
4024
- u.value ? (z(), K(f, {
4028
+ u.value ? (z(), G(f, {
4025
4029
  key: 0,
4026
4030
  class: "p-16 bg-fm-color-neutral-gray-100 space-y-24",
4027
4031
  variant: "outlined"
4028
4032
  }, {
4029
4033
  default: N(() => [
4030
- T("p", or, se(p(M)("menu.group.option.variant")), 1),
4034
+ T("p", or, se(p(A)("menu.group.option.variant")), 1),
4031
4035
  T("div", ar, [
4032
4036
  C(_, {
4033
4037
  modelValue: u.value,
4034
4038
  "onUpdate:modelValue": R[0] || (R[0] = (v) => u.value = v),
4035
- items: h.value,
4039
+ items: m.value,
4036
4040
  "menu-z-index": 103,
4037
4041
  class: "flex-1"
4038
4042
  }, null, 8, ["modelValue", "items"]),
4039
4043
  T("div", rr, [
4040
- C(A, {
4041
- variant: p(Ge).Tertiary,
4044
+ C(x, {
4045
+ variant: p(Ke).Tertiary,
4042
4046
  "prepend-icon": "keyboard_arrow_left",
4043
4047
  size: "lg",
4044
4048
  onClick: R[1] || (R[1] = (v) => y("left"))
4045
4049
  }, null, 8, ["variant"]),
4046
- C(A, {
4047
- variant: p(Ge).Tertiary,
4050
+ C(x, {
4051
+ variant: p(Ke).Tertiary,
4048
4052
  "prepend-icon": "keyboard_arrow_right",
4049
4053
  size: "lg",
4050
4054
  onClick: R[2] || (R[2] = (v) => y("right"))
@@ -4059,7 +4063,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4059
4063
  }, 8, ["categorized-items", "group", "title"]);
4060
4064
  };
4061
4065
  }
4062
- }), lr = un, Oi = La, ur = sr, cr = {
4066
+ }), lr = cn, Oi = La, ur = sr, cr = {
4063
4067
  key: 0,
4064
4068
  class: "flex flex-col space-y-16 h-[440px]"
4065
4069
  }, dr = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, mr = { class: "flex justify-between pb-16" }, hr = { class: "flex gap-8" }, pr = {
@@ -4071,32 +4075,32 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4071
4075
  groupIds: {}
4072
4076
  },
4073
4077
  setup(e) {
4074
- const i = e, t = Ue(), { emitData: n, emitAction: a } = Ii(), o = he(), r = D(() => o.rules.group), l = D(() => o.groups);
4075
- function s(F) {
4076
- return oe(F ?? []).sort((I, E) => I.position - E.position);
4078
+ const i = e, t = $e(), { emitData: n, emitAction: a } = Ii(), o = he(), r = D(() => o.rules.group), l = D(() => o.groups);
4079
+ function s(E) {
4080
+ return oe(E ?? []).sort((I, F) => I.position - F.position);
4077
4081
  }
4078
- const u = D(() => s(l.value).reduce((F, M) => (F[M._id] = {
4079
- name: M.name,
4080
- type: St(o.items, M.items)
4081
- }, F), {})), d = D(() => [
4082
- ...Object.entries(u.value).map(([F, { name: M, type: I }]) => ({
4083
- label: `${M} ${r.value.type ? `(${Vt(I)})` : ""}`.trim(),
4084
- value: F
4082
+ const u = D(() => s(l.value).reduce((E, A) => (E[A._id] = {
4083
+ name: A.name,
4084
+ type: St(o.items, A.items)
4085
+ }, E), {})), d = D(() => [
4086
+ ...Object.entries(u.value).map(([E, { name: A, type: I }]) => ({
4087
+ label: `${A} ${r.value.type ? `(${Vt(I)})` : ""}`.trim(),
4088
+ value: E
4085
4089
  }))
4086
- ]), h = D(() => !!o.state.currentCatalogId || !!o.state.currentSchedulerId), m = D(() => {
4087
- const F = !o.state.currentSchedulerId, M = o.rules.group.type, I = o.version == L.F_MENU_VERSION.enum.v3, E = o.rules.item.orderFromActiveOnly, P = o.rules.item.bindToVariant;
4090
+ ]), m = D(() => !!o.state.currentCatalogId || !!o.state.currentSchedulerId), h = D(() => {
4091
+ const E = !o.state.currentSchedulerId, A = o.rules.group.type, I = o.version == L.F_MENU_VERSION.enum.v3, F = o.rules.item.orderFromActiveOnly, P = o.rules.item.bindToVariant;
4088
4092
  return function(_) {
4089
4093
  return {
4090
- link: (A) => !h.value && (!A || P),
4091
- name: (A) => !h.value && !A,
4092
- type: M && !_._id && !h.value,
4094
+ link: (x) => !m.value && (!x || P),
4095
+ name: (x) => !m.value && !x,
4096
+ type: A && !_._id && !m.value,
4093
4097
  price: _.type != L.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
4094
- inventory: F ? I ? !h.value && _.type == L.F_ADDON_GROUP_TYPE.enum.NORMAL : !h.value : !1,
4095
- orderFrom: (A) => F ? I ? _.type == L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? h.value : !!h.value == !A : h.value : !1,
4096
- orderFromActiveOnly: E,
4097
- showOrderFrom: F ? I ? h.value ? !0 : _.type == L.F_ADDON_GROUP_TYPE.enum.PRODUCT : h.value : !1,
4098
+ inventory: E ? I ? !m.value && _.type == L.F_ADDON_GROUP_TYPE.enum.NORMAL : !m.value : !1,
4099
+ orderFrom: (x) => E ? I ? _.type == L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? m.value : !!m.value == !x : m.value : !1,
4100
+ orderFromActiveOnly: F,
4101
+ showOrderFrom: E ? I ? m.value ? !0 : _.type == L.F_ADDON_GROUP_TYPE.enum.PRODUCT : m.value : !1,
4098
4102
  bindToVariant: P,
4099
- isOverride: h.value,
4103
+ isOverride: m.value,
4100
4104
  isItemGroup: !1,
4101
4105
  isV4: !I
4102
4106
  };
@@ -4110,27 +4114,27 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4110
4114
  })), y = Q(oe(i.groupIds || [])), b = Q(""), { t: g } = ce(), w = () => {
4111
4115
  n(y.value), a("primary"), t.close();
4112
4116
  };
4113
- return (F, M) => {
4114
- const I = G("FmSearch"), E = G("FmCheckbox"), P = G("FmButton");
4117
+ return (E, A) => {
4118
+ const I = K("FmSearch"), F = K("FmCheckbox"), P = K("FmButton");
4115
4119
  return d.value.length > 0 ? (z(), q("div", cr, [
4116
4120
  T("div", null, [
4117
4121
  C(I, {
4118
4122
  autofocus: "",
4119
4123
  modelValue: b.value,
4120
- "onUpdate:modelValue": M[0] || (M[0] = (R) => b.value = R),
4124
+ "onUpdate:modelValue": A[0] || (A[0] = (R) => b.value = R),
4121
4125
  placeholder: p(g)("menu.common.labels.search_groups")
4122
4126
  }, null, 8, ["modelValue", "placeholder"])
4123
4127
  ]),
4124
4128
  T("div", dr, [
4125
4129
  T("div", null, [
4126
- (z(!0), q(Re, null, Ke(d.value, (R) => (z(), q("div", {
4130
+ (z(!0), q(Ae, null, Ge(d.value, (R) => (z(), q("div", {
4127
4131
  key: R.value
4128
4132
  }, [
4129
- Xe(C(E, {
4133
+ Xe(C(F, {
4130
4134
  modelValue: y.value,
4131
4135
  "onUpdate:modelValue": [
4132
- M[1] || (M[1] = (_) => y.value = _),
4133
- M[2] || (M[2] = (_) => p(n)(y.value))
4136
+ A[1] || (A[1] = (_) => y.value = _),
4137
+ A[2] || (A[2] = (_) => p(n)(y.value))
4134
4138
  ],
4135
4139
  label: R.label,
4136
4140
  value: R.value
@@ -4156,11 +4160,11 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4156
4160
  C(P, {
4157
4161
  label: p(g)("menu.common.actions.cancel"),
4158
4162
  variant: "tertiary",
4159
- onClick: M[3] || (M[3] = (R) => p(t).close())
4163
+ onClick: A[3] || (A[3] = (R) => p(t).close())
4160
4164
  }, null, 8, ["label"]),
4161
4165
  C(P, {
4162
4166
  label: p(g)("menu.common.actions.confirm"),
4163
- onClick: M[4] || (M[4] = (R) => w())
4167
+ onClick: A[4] || (A[4] = (R) => w())
4164
4168
  }, null, 8, ["label"])
4165
4169
  ])
4166
4170
  ])
@@ -4171,7 +4175,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4171
4175
  ]),
4172
4176
  C(p(Oi), {
4173
4177
  "categorized-items": p(o).categorizedItems,
4174
- config: m.value,
4178
+ config: h.value,
4175
4179
  group: c.value,
4176
4180
  action: "add",
4177
4181
  title: p(g)("menu.group.add")
@@ -4205,35 +4209,35 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4205
4209
  setup(e, {
4206
4210
  emit: i
4207
4211
  }) {
4208
- const t = e, n = he(), a = ii(), o = Ue(), {
4212
+ const t = e, n = he(), a = ii(), o = $e(), {
4209
4213
  t: r
4210
4214
  } = ce(), l = i, s = D(() => n.rules.group), u = D(() => n.rules.item), d = D(() => n.groups);
4211
4215
  Q(!1);
4212
- function h(f, v) {
4213
- return oe(v ?? []).map((k) => {
4214
- const S = f.find((B) => B._id === k._id);
4216
+ function m(f, v) {
4217
+ return oe(v ?? []).map((M) => {
4218
+ const S = f.find((B) => B._id === M._id);
4215
4219
  return {
4216
4220
  name: (S == null ? void 0 : S.name) ?? "",
4217
- ...k,
4221
+ ...M,
4218
4222
  position: S == null ? void 0 : S.position
4219
4223
  };
4220
4224
  });
4221
4225
  }
4222
- const m = D(() => {
4226
+ const h = D(() => {
4223
4227
  var v;
4224
- return [...c(h(d.value, t.form.groups || ((v = t.fallback) == null ? void 0 : v.groups) || [])).map((x) => x._id)];
4228
+ return [...c(m(d.value, t.form.groups || ((v = t.fallback) == null ? void 0 : v.groups) || [])).map((k) => k._id)];
4225
4229
  });
4226
4230
  function c(f) {
4227
- return oe(f ?? []).sort((x, k) => x.position - k.position);
4231
+ return oe(f ?? []).sort((k, M) => k.position - M.position);
4228
4232
  }
4229
4233
  const y = D(() => c(d.value).reduce((f, v) => (f[v._id] = {
4230
4234
  name: v.name,
4231
4235
  type: St(n.items, v.items)
4232
4236
  }, f), {})), b = D(() => [...Object.entries(y.value).map(([f, {
4233
4237
  name: v,
4234
- type: x
4238
+ type: k
4235
4239
  }]) => ({
4236
- label: `${v} ${s.value.type ? `(${Vt(x)})` : ""}`.trim(),
4240
+ label: `${v} ${s.value.type ? `(${Vt(k)})` : ""}`.trim(),
4237
4241
  value: f
4238
4242
  }))]), g = D(() => [{
4239
4243
  accessorKey: "name",
@@ -4248,9 +4252,9 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4248
4252
  header: () => r("menu.product.form.group.columns.type"),
4249
4253
  enableSorting: !1,
4250
4254
  cell: (f) => {
4251
- var x;
4255
+ var k;
4252
4256
  const v = f.row.original._id;
4253
- return Vt((x = y.value[v]) == null ? void 0 : x.type);
4257
+ return Vt((k = y.value[v]) == null ? void 0 : k.type);
4254
4258
  }
4255
4259
  }, {
4256
4260
  accessorKey: "_id",
@@ -4266,22 +4270,22 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4266
4270
  variant: "tertiary",
4267
4271
  textColor: "neutral-gray-400",
4268
4272
  onClick: wt(async () => {
4269
- M(v);
4273
+ A(v);
4270
4274
  }, ["stop", "prevent"])
4271
4275
  }), ue(ur, {
4272
- combinations: E.value ?? [],
4276
+ combinations: F.value ?? [],
4273
4277
  fullCombinations: t.fullCombinations,
4274
4278
  groupId: v,
4275
- "onUpdate:combinations": A
4279
+ "onUpdate:combinations": x
4276
4280
  }, {
4277
4281
  default: ({
4278
- trigger: x
4282
+ trigger: k
4279
4283
  }) => ue(ke.FmButton, {
4280
4284
  icon: "edit",
4281
4285
  variant: "tertiary",
4282
4286
  disabled: !P(v),
4283
4287
  textColor: "neutral-gray-400",
4284
- onClick: x
4288
+ onClick: k
4285
4289
  })
4286
4290
  })]);
4287
4291
  },
@@ -4294,29 +4298,29 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4294
4298
  title: "Add group",
4295
4299
  contentComponent: br,
4296
4300
  contentComponentProps: {
4297
- groupIds: m.value
4301
+ groupIds: h.value
4298
4302
  }
4299
4303
  }).onPrimary((f) => {
4300
- F(f);
4304
+ E(f);
4301
4305
  });
4302
4306
  }
4303
- function F(f) {
4304
- const v = f.reduce((x, k) => {
4307
+ function E(f) {
4308
+ const v = f.reduce((k, M) => {
4305
4309
  var B;
4306
- const S = ((B = t.form.groups) == null ? void 0 : B.find((H) => H._id === k)) || {
4307
- _id: k,
4310
+ const S = ((B = t.form.groups) == null ? void 0 : B.find((H) => H._id === M)) || {
4311
+ _id: M,
4308
4312
  groupKey: ""
4309
4313
  };
4310
- return x.push(S), x;
4314
+ return k.push(S), k;
4311
4315
  }, []);
4312
4316
  l("replace:form", a.initDynamicGroupItem({
4313
4317
  ...t.form,
4314
4318
  groups: v
4315
4319
  }));
4316
4320
  }
4317
- function M(f) {
4318
- var x;
4319
- const v = ((x = t.form.groups) == null ? void 0 : x.filter((k) => k._id !== f)) || [];
4321
+ function A(f) {
4322
+ var k;
4323
+ const v = ((k = t.form.groups) == null ? void 0 : k.filter((M) => M._id !== f)) || [];
4320
4324
  l("replace:form", a.initDynamicGroupItem({
4321
4325
  ...t.form,
4322
4326
  groups: v
@@ -4325,7 +4329,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4325
4329
  const I = D(() => {
4326
4330
  var f;
4327
4331
  return !!((f = t.form.variant) != null && f.variantGroupIds.length);
4328
- }), E = D(() => {
4332
+ }), F = D(() => {
4329
4333
  var f;
4330
4334
  return I.value ? (f = t.form.variant) == null ? void 0 : f.variantCombinations : [{
4331
4335
  _id: t.form._id,
@@ -4334,10 +4338,10 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4334
4338
  }];
4335
4339
  });
4336
4340
  function P(f) {
4337
- var x;
4341
+ var k;
4338
4342
  if (!f) return !1;
4339
4343
  if (u.value.overrideProductGroup) return !0;
4340
- switch ((x = y.value[f]) == null ? void 0 : x.type) {
4344
+ switch ((k = y.value[f]) == null ? void 0 : k.type) {
4341
4345
  case L.F_ADDON_GROUP_TYPE.enum.DYNAMIC:
4342
4346
  return !0;
4343
4347
  case L.F_ADDON_GROUP_TYPE.enum.PRODUCT:
@@ -4348,7 +4352,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4348
4352
  return !1;
4349
4353
  }
4350
4354
  }
4351
- Ce(() => d.value.length, () => F([...m.value, d.value[d.value.length - 1]._id])), D(() => ({
4355
+ Ce(() => d.value.length, () => E([...h.value, d.value[d.value.length - 1]._id])), D(() => ({
4352
4356
  ..._e.generator.initMenuV4Group(),
4353
4357
  type: n.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
4354
4358
  items: {},
@@ -4357,28 +4361,28 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4357
4361
  }));
4358
4362
  const R = D(() => !!n.state.currentCatalogId || !!n.state.currentSchedulerId);
4359
4363
  D(() => {
4360
- const f = !n.state.currentSchedulerId, v = n.rules.group.type, x = n.version == L.F_MENU_VERSION.enum.v3, k = n.rules.item.orderFromActiveOnly, S = n.rules.item.bindToVariant;
4364
+ const f = !n.state.currentSchedulerId, v = n.rules.group.type, k = n.version == L.F_MENU_VERSION.enum.v3, M = n.rules.item.orderFromActiveOnly, S = n.rules.item.bindToVariant;
4361
4365
  return function(H) {
4362
4366
  return {
4363
4367
  link: (J) => !R.value && (!J || S),
4364
4368
  name: (J) => !R.value && !J,
4365
4369
  type: v && !H._id && !R.value,
4366
4370
  price: H.type != L.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
4367
- inventory: f ? x ? !R.value && H.type == L.F_ADDON_GROUP_TYPE.enum.NORMAL : !R.value : !1,
4368
- orderFrom: (J) => f ? x ? H.type == L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? R.value : !!R.value == !J : R.value : !1,
4369
- orderFromActiveOnly: k,
4370
- showOrderFrom: f ? x ? R.value ? !0 : H.type == L.F_ADDON_GROUP_TYPE.enum.PRODUCT : R.value : !1,
4371
+ inventory: f ? k ? !R.value && H.type == L.F_ADDON_GROUP_TYPE.enum.NORMAL : !R.value : !1,
4372
+ orderFrom: (J) => f ? k ? H.type == L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? R.value : !!R.value == !J : R.value : !1,
4373
+ orderFromActiveOnly: M,
4374
+ showOrderFrom: f ? k ? R.value ? !0 : H.type == L.F_ADDON_GROUP_TYPE.enum.PRODUCT : R.value : !1,
4371
4375
  bindToVariant: S,
4372
4376
  isOverride: R.value,
4373
4377
  isItemGroup: !1,
4374
- isV4: !x
4378
+ isV4: !k
4375
4379
  };
4376
4380
  };
4377
4381
  });
4378
4382
  const _ = (f) => {
4379
4383
  var v;
4380
- return (v = b.value.find((x) => x.value === f)) == null ? void 0 : v.label;
4381
- }, A = (f) => {
4384
+ return (v = b.value.find((k) => k.value === f)) == null ? void 0 : v.label;
4385
+ }, x = (f) => {
4382
4386
  var v;
4383
4387
  I.value ? l("update:form", "variant", {
4384
4388
  variantGroupIds: ((v = t.form.variant) == null ? void 0 : v.variantGroupIds) || [],
@@ -4386,28 +4390,28 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4386
4390
  }) : l("update:form", "groups", f[0].groups || []);
4387
4391
  };
4388
4392
  return (f, v) => {
4389
- const x = G("FmButton"), k = G("FmTable");
4390
- return z(), K($e, {
4393
+ const k = K("FmButton"), M = K("FmTable");
4394
+ return z(), G(Ve, {
4391
4395
  title: p(r)("menu.product.form.group.title"),
4392
4396
  "sub-title": p(r)("menu.product.form.group.subtitle")
4393
4397
  }, {
4394
- "append-title": N(() => [C(x, {
4398
+ "append-title": N(() => [C(k, {
4395
4399
  class: "flex-shrink-0",
4396
4400
  label: p(r)("menu.product.form.group.add"),
4397
4401
  "prepend-icon": "add",
4398
4402
  variant: "secondary",
4399
4403
  onClick: w
4400
4404
  }, null, 8, ["label"])]),
4401
- default: N(() => [C(ln, null, {
4405
+ default: N(() => [C(un, null, {
4402
4406
  default: N(() => {
4403
4407
  var S;
4404
- return [((S = m.value) == null ? void 0 : S.length) > 0 ? (z(), K(k, {
4408
+ return [((S = h.value) == null ? void 0 : S.length) > 0 ? (z(), G(M, {
4405
4409
  key: 0,
4406
4410
  "column-defs": g.value,
4407
- "row-data": m.value.map((B) => ({
4411
+ "row-data": h.value.map((B) => ({
4408
4412
  _id: B
4409
4413
  })),
4410
- "page-size": m.value.length,
4414
+ "page-size": h.value.length,
4411
4415
  "hide-footer": "",
4412
4416
  "pin-header-row": "",
4413
4417
  "shrink-at": !1
@@ -4443,15 +4447,15 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4443
4447
  const {
4444
4448
  t
4445
4449
  } = ce(), n = e, a = i, o = he(), r = D(() => o.rules.item), l = D(() => r.value.inventory);
4446
- function s(b, g, w, F) {
4450
+ function s(b, g, w, E) {
4447
4451
  return !g || g && g.length === 0 ? [{
4448
4452
  _id: "",
4449
4453
  name: w,
4450
4454
  binding: b || []
4451
- }] : g.map((M) => ({
4452
- _id: M.combinationKey || "",
4453
- name: Li(M.combinationKey || "", F),
4454
- binding: M.inventoryBindings || []
4455
+ }] : g.map((A) => ({
4456
+ _id: A.combinationKey || "",
4457
+ name: Bi(A.combinationKey || "", E),
4458
+ binding: A.inventoryBindings || []
4455
4459
  }));
4456
4460
  }
4457
4461
  const u = D(() => {
@@ -4461,18 +4465,18 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4461
4465
  var b;
4462
4466
  return s(n.form.inventoryBindings || [], ((b = n.form.variant) == null ? void 0 : b.variantCombinations) || [], u.value, o.variants);
4463
4467
  });
4464
- function h(b, g) {
4465
- var I, E;
4466
- let w = Le.clone(n.form);
4467
- const F = w.variant;
4468
- if ((((I = F == null ? void 0 : F.variantCombinations) == null ? void 0 : I.length) ?? 0) > 0 && F) {
4469
- const P = F.variantCombinations.findIndex((_) => _.combinationKey === b);
4468
+ function m(b, g) {
4469
+ var I, F;
4470
+ let w = Ue.clone(n.form);
4471
+ const E = w.variant;
4472
+ if ((((I = E == null ? void 0 : E.variantCombinations) == null ? void 0 : I.length) ?? 0) > 0 && E) {
4473
+ const P = E.variantCombinations.findIndex((_) => _.combinationKey === b);
4470
4474
  if (P < 0) return;
4471
- const R = Le.clone(F.variantCombinations);
4475
+ const R = Ue.clone(E.variantCombinations);
4472
4476
  R[P].inventoryBindings = g, w = {
4473
4477
  ...w,
4474
4478
  variant: {
4475
- variantGroupIds: ((E = w.variant) == null ? void 0 : E.variantGroupIds) || [],
4479
+ variantGroupIds: ((F = w.variant) == null ? void 0 : F.variantGroupIds) || [],
4476
4480
  variantCombinations: R
4477
4481
  }
4478
4482
  };
@@ -4522,46 +4526,46 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4522
4526
  name: u.value
4523
4527
  }),
4524
4528
  "onUpdate:inventory": (w) => {
4525
- h(g.key, w);
4529
+ m(g.key, w);
4526
4530
  }
4527
4531
  }, {
4528
4532
  default: ({
4529
4533
  trigger: w
4530
- }) => C(G("fm-button"), {
4531
- variant: Ge.Tertiary,
4534
+ }) => C(K("fm-button"), {
4535
+ variant: Ke.Tertiary,
4532
4536
  prependIcon: "edit",
4533
- textColor: Ve.NeutralGray400,
4537
+ textColor: Ne.NeutralGray400,
4534
4538
  onClick: w
4535
4539
  }, null)
4536
4540
  })]) : null;
4537
4541
  }
4538
4542
  }]);
4539
- const m = Q([]);
4543
+ const h = Q([]);
4540
4544
  async function c({
4541
4545
  _id: b
4542
4546
  }) {
4543
- for (const g of m.value)
4547
+ for (const g of h.value)
4544
4548
  g.getKey() === b && g.trigger(!0);
4545
4549
  }
4546
- const y = $i();
4547
- return Qe(() => {
4550
+ const y = Vi();
4551
+ return ot(() => {
4548
4552
  y.readInventory();
4549
- }), (b, g) => (z(), K($e, {
4553
+ }), (b, g) => (z(), G(Ve, {
4550
4554
  title: p(t)("menu.inventory.title"),
4551
4555
  subTitle: p(t)("menu.inventory.subtitle")
4552
4556
  }, {
4553
- default: N(() => [T("div", _r, [T("div", wr, [(z(!0), q(Re, null, Ke(d.value, (w) => (z(), K(p(Yt), {
4557
+ default: N(() => [T("div", _r, [T("div", wr, [(z(!0), q(Ae, null, Ge(d.value, (w) => (z(), G(p(Yt), {
4554
4558
  ref_for: !0,
4555
4559
  ref_key: "inventoryManagerForms",
4556
- ref: m,
4560
+ ref: h,
4557
4561
  title: p(t)("menu.inventory.dialog.title", {
4558
4562
  name: u.value
4559
4563
  }),
4560
4564
  name: w.name,
4561
4565
  bindingKey: w._id,
4562
4566
  initialValue: w.binding ?? [],
4563
- "onUpdate:inventory": (F) => {
4564
- h(w._id, F);
4567
+ "onUpdate:inventory": (E) => {
4568
+ m(w._id, E);
4565
4569
  }
4566
4570
  }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 256)), C(p($n), {
4567
4571
  "row-data": d.value,
@@ -4607,15 +4611,15 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4607
4611
  name: t.fullCombinations[b.combinationKey || ""],
4608
4612
  takeaway: b.takeawayUsed,
4609
4613
  onUpdate: (w) => {
4610
- var M, I;
4611
- const F = oe(((M = t.form.variant) == null ? void 0 : M.variantCombinations) || []);
4612
- F[g].takeawayUsed = w, l("update:form", "variant", {
4614
+ var A, I;
4615
+ const E = oe(((A = t.form.variant) == null ? void 0 : A.variantCombinations) || []);
4616
+ E[g].takeawayUsed = w, l("update:form", "variant", {
4613
4617
  variantGroupIds: ((I = t.form.variant) == null ? void 0 : I.variantGroupIds) || [],
4614
- variantCombinations: F
4618
+ variantCombinations: E
4615
4619
  });
4616
4620
  }
4617
4621
  }));
4618
- }), h = D(() => s.value && a.value.bindToVariant ? d.value : u.value), m = D(() => [t.isOverride ? {
4622
+ }), m = D(() => s.value && a.value.bindToVariant ? d.value : u.value), h = D(() => [t.isOverride ? {
4619
4623
  label: r("menu.product.form.takeaway.options.follows_main"),
4620
4624
  value: null
4621
4625
  } : {
@@ -4634,7 +4638,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4634
4638
  header: () => r("menu.product.form.takeaway.columns.takeaway"),
4635
4639
  cell: (y) => {
4636
4640
  const b = y.getValue(), g = y.row.original;
4637
- return ue(In, {
4641
+ return ue(Pn, {
4638
4642
  action: "add",
4639
4643
  applyProduct: !1,
4640
4644
  bindToVariant: n.rules.item.bindToVariant,
@@ -4652,10 +4656,10 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4652
4656
  }) => ue(ke.FmSelect, {
4653
4657
  modelValue: b || null,
4654
4658
  menuZIndex: 103,
4655
- items: m.value,
4659
+ items: h.value,
4656
4660
  shiftMenu: !0,
4657
- "onUpdate:modelValue": (F) => {
4658
- g.onUpdate(F || "");
4661
+ "onUpdate:modelValue": (E) => {
4662
+ g.onUpdate(E || "");
4659
4663
  }
4660
4664
  }, {
4661
4665
  "append-menu": () => n.rules.takeaway.create ? ue("button", {
@@ -4674,22 +4678,22 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4674
4678
  }
4675
4679
  }]);
4676
4680
  return (y, b) => {
4677
- const g = G("fm-table");
4678
- return z(), K($e, {
4681
+ const g = K("fm-table");
4682
+ return z(), G(Ve, {
4679
4683
  title: p(r)("menu.product.form.takeaway.title"),
4680
4684
  "sub-title": p(r)("menu.product.form.takeaway.subtitle")
4681
4685
  }, {
4682
4686
  default: N(() => [C(g, {
4683
4687
  columnDefs: c.value,
4684
- "page-size": h.value.length,
4685
- "row-data": h.value,
4688
+ "page-size": m.value.length,
4689
+ "row-data": m.value,
4686
4690
  "hide-footer": ""
4687
4691
  }, null, 8, ["columnDefs", "page-size", "row-data"])]),
4688
4692
  _: 1
4689
4693
  }, 8, ["title", "sub-title"]);
4690
4694
  };
4691
4695
  }
4692
- }), Rr = { class: "fm-typo-en-title-md-600" }, Ar = { class: "pt-8 space-y-24" }, xr = { class: "flex gap-8 items-center justify-start" }, kr = /* @__PURE__ */ le({
4696
+ }), Ar = { class: "fm-typo-en-title-md-600" }, Rr = { class: "pt-8 space-y-24" }, xr = { class: "flex gap-8 items-center justify-start" }, kr = /* @__PURE__ */ le({
4693
4697
  __name: "Form",
4694
4698
  props: {
4695
4699
  initialValue: {},
@@ -4702,18 +4706,18 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4702
4706
  () => t.initialValue ? i("menu.common.actions.update") : i("menu.common.actions.add")
4703
4707
  ), r = Q(
4704
4708
  t.initialValue ? oe(t.initialValue) : { ..._e.generator.initMenuV4PrintDepartment(), usedBy: [] }
4705
- ), l = Q(!1), s = Q(!1), u = (h) => {
4706
- ct.isBoolean(h) ? s.value = h : s.value = !s.value;
4709
+ ), l = Q(!1), s = Q(!1), u = (m) => {
4710
+ ct.isBoolean(m) ? s.value = m : s.value = !s.value;
4707
4711
  };
4708
4712
  async function d() {
4709
- var h, m;
4713
+ var m, h;
4710
4714
  try {
4711
4715
  l.value = !0, t.initialValue ? await n.updateMenu(
4712
4716
  {
4713
4717
  module: L.F_MENU_MODULE_V4_KEY.enum.printDepartment,
4714
4718
  operation: ye.F_OPERATION_TYPE.update,
4715
4719
  data: r.value,
4716
- link: $t(((h = r.value) == null ? void 0 : h.usedBy) || [])
4720
+ link: $t(((m = r.value) == null ? void 0 : m.usedBy) || [])
4717
4721
  },
4718
4722
  r.value.name
4719
4723
  ) : await n.updateMenu(
@@ -4721,7 +4725,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4721
4725
  module: L.F_MENU_MODULE_V4_KEY.enum.printDepartment,
4722
4726
  operation: ye.F_OPERATION_TYPE.create,
4723
4727
  data: r.value,
4724
- link: $t(((m = r.value) == null ? void 0 : m.usedBy) || [])
4728
+ link: $t(((h = r.value) == null ? void 0 : h.usedBy) || [])
4725
4729
  },
4726
4730
  r.value.name
4727
4731
  ), u(!1);
@@ -4733,17 +4737,17 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4733
4737
  }
4734
4738
  return Ce(
4735
4739
  () => s.value,
4736
- (h) => {
4737
- h && (r.value = t.initialValue ? oe(t.initialValue) : { ..._e.generator.initMenuV4PrintDepartment(), usedBy: [] });
4740
+ (m) => {
4741
+ m && (r.value = t.initialValue ? oe(t.initialValue) : { ..._e.generator.initMenuV4PrintDepartment(), usedBy: [] });
4738
4742
  }
4739
- ), (h, m) => {
4740
- const c = G("fm-text-field"), y = G("fm-button"), b = G("fm-side-sheet");
4741
- return z(), q(Re, null, [
4742
- pe(h.$slots, "default", { trigger: u }),
4743
+ ), (m, h) => {
4744
+ const c = K("fm-text-field"), y = K("fm-button"), b = K("fm-side-sheet");
4745
+ return z(), q(Ae, null, [
4746
+ pe(m.$slots, "default", { trigger: u }),
4743
4747
  C(b, {
4744
4748
  id: "variant-form",
4745
4749
  modelValue: s.value,
4746
- "onUpdate:modelValue": m[3] || (m[3] = (g) => s.value = g),
4750
+ "onUpdate:modelValue": h[3] || (h[3] = (g) => s.value = g),
4747
4751
  "is-container": p(ke).FmForm,
4748
4752
  "is-container-props": {
4749
4753
  onValidationSuccess: d,
@@ -4754,7 +4758,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4754
4758
  "dismiss-away": ""
4755
4759
  }, {
4756
4760
  "side-sheet-header": N(() => [
4757
- T("p", Rr, se(a.value), 1)
4761
+ T("p", Ar, se(a.value), 1)
4758
4762
  ]),
4759
4763
  "side-sheet-footer": N(() => [
4760
4764
  T("div", xr, [
@@ -4769,15 +4773,15 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4769
4773
  label: p(i)("menu.common.actions.cancel"),
4770
4774
  size: "lg",
4771
4775
  variant: "tertiary",
4772
- onClick: m[2] || (m[2] = () => s.value = !1)
4776
+ onClick: h[2] || (h[2] = () => s.value = !1)
4773
4777
  }, null, 8, ["label"])
4774
4778
  ])
4775
4779
  ]),
4776
4780
  default: N(() => [
4777
- T("div", Ar, [
4781
+ T("div", Rr, [
4778
4782
  C(c, {
4779
4783
  modelValue: r.value.name,
4780
- "onUpdate:modelValue": m[0] || (m[0] = (g) => r.value.name = g),
4784
+ "onUpdate:modelValue": h[0] || (h[0] = (g) => r.value.name = g),
4781
4785
  rules: [
4782
4786
  (g) => g ? !0 : p(i)("menu.common.validation.required", {
4783
4787
  field: p(i)("menu.print_dept.columns.name").toLowerCase()
@@ -4786,13 +4790,13 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4786
4790
  autofocus: "",
4787
4791
  label: p(i)("menu.print_dept.columns.name")
4788
4792
  }, null, 8, ["modelValue", "rules", "label"]),
4789
- h.applyProduct ? (z(), K(Nn, {
4793
+ m.applyProduct ? (z(), G(Nn, {
4790
4794
  key: 0,
4791
4795
  overrides: r.value.usedBy || [],
4792
4796
  "select-variant": !1,
4793
4797
  editable: "",
4794
4798
  title: p(i)("menu.print_dept.columns.products"),
4795
- "onUpdate:overrides": m[1] || (m[1] = (g) => r.value.usedBy = g)
4799
+ "onUpdate:overrides": h[1] || (h[1] = (g) => r.value.usedBy = g)
4796
4800
  }, null, 8, ["overrides", "title"])) : ee("", !0)
4797
4801
  ])
4798
4802
  ]),
@@ -4826,11 +4830,11 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4826
4830
  }), d = D(() => {
4827
4831
  var w;
4828
4832
  return u.value ? s.value.reduce(
4829
- (F, { _id: M }) => (F.includes(M) || (F = [...F, M]), F),
4833
+ (E, { _id: A }) => (E.includes(A) || (E = [...E, A]), E),
4830
4834
  [...((w = t.form.print) == null ? void 0 : w.department) ?? []]
4831
- ) : s.value.map(({ _id: F }) => F);
4832
- }), h = D(() => s.value.reduce((w, F) => (w[F._id] = F.name, w), {}));
4833
- function m(w) {
4835
+ ) : s.value.map(({ _id: E }) => E);
4836
+ }), m = D(() => s.value.reduce((w, E) => (w[E._id] = E.name, w), {}));
4837
+ function h(w) {
4834
4838
  o("update:form", "print", {
4835
4839
  ...r(),
4836
4840
  ...t.form.print,
@@ -4848,19 +4852,19 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4848
4852
  o("update:form", "print", {
4849
4853
  ...r(),
4850
4854
  ...t.form.print,
4851
- department: w.filter((F) => {
4852
- var M;
4853
- return (((M = t.form.print) == null ? void 0 : M.department) ?? []).includes(F);
4855
+ department: w.filter((E) => {
4856
+ var A;
4857
+ return (((A = t.form.print) == null ? void 0 : A.department) ?? []).includes(E);
4854
4858
  })
4855
4859
  });
4856
4860
  }
4857
- function b(w, F) {
4858
- var I, E;
4859
- let M = [...((E = (I = t.form) == null ? void 0 : I.print) == null ? void 0 : E.department) ?? []];
4860
- F && !M.includes(w) ? M = [...M, w] : F || (M = M.filter((P) => P !== w)), o("update:form", "print", {
4861
+ function b(w, E) {
4862
+ var I, F;
4863
+ let A = [...((F = (I = t.form) == null ? void 0 : I.print) == null ? void 0 : F.department) ?? []];
4864
+ E && !A.includes(w) ? A = [...A, w] : E || (A = A.filter((P) => P !== w)), o("update:form", "print", {
4861
4865
  ...r(),
4862
4866
  ...t.form.print,
4863
- department: M
4867
+ department: A
4864
4868
  });
4865
4869
  }
4866
4870
  const g = D(() => [
@@ -4878,84 +4882,84 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4878
4882
  return Ce(
4879
4883
  () => s.value.length,
4880
4884
  () => b(s.value[s.value.length - 1]._id, !0)
4881
- ), (w, F) => {
4882
- const M = G("fm-switch"), I = G("fm-radio"), E = G("fm-radio-group"), P = G("fm-button"), R = G("fm-checkbox");
4883
- return z(), K($e, {
4885
+ ), (w, E) => {
4886
+ const A = K("fm-switch"), I = K("fm-radio"), F = K("fm-radio-group"), P = K("fm-button"), R = K("fm-checkbox");
4887
+ return z(), G(Ve, {
4884
4888
  title: p(a)("menu.product.form.print.title")
4885
4889
  }, {
4886
4890
  default: N(() => {
4887
4891
  var _;
4888
4892
  return [
4889
- l.value.printConfig ? (z(), K(et, {
4893
+ l.value.printConfig ? (z(), G(Je, {
4890
4894
  key: 0,
4891
4895
  label: p(a)("menu.product.form.print.config.label")
4892
4896
  }, {
4893
4897
  default: N(() => {
4894
- var A;
4898
+ var x;
4895
4899
  return [
4896
- C(M, {
4897
- "model-value": !((A = w.form.print) != null && A.toRoot),
4900
+ C(A, {
4901
+ "model-value": !((x = w.form.print) != null && x.toRoot),
4898
4902
  label: p(a)("menu.product.form.print.config.group_parent.label"),
4899
4903
  "label-placement": "right",
4900
4904
  sublabel: p(a)("menu.product.form.print.config.group_parent.sublabel"),
4901
- "onUpdate:modelValue": F[0] || (F[0] = (f) => m(f))
4905
+ "onUpdate:modelValue": E[0] || (E[0] = (f) => h(f))
4902
4906
  }, null, 8, ["model-value", "label", "sublabel"])
4903
4907
  ];
4904
4908
  }),
4905
4909
  _: 1
4906
4910
  }, 8, ["label"])) : ee("", !0),
4907
- C(E, {
4911
+ C(F, {
4908
4912
  label: p(a)("menu.product.form.print.kds.label"),
4909
4913
  "model-value": ((_ = w.form.print) == null ? void 0 : _.sequential) ?? !1,
4910
- "onUpdate:modelValue": F[1] || (F[1] = (A) => c(A))
4914
+ "onUpdate:modelValue": E[1] || (E[1] = (x) => c(x))
4911
4915
  }, {
4912
4916
  default: N(() => [
4913
4917
  T("div", Or, [
4914
- (z(!0), q(Re, null, Ke(g.value, (A, f) => (z(), K(I, {
4918
+ (z(!0), q(Ae, null, Ge(g.value, (x, f) => (z(), G(I, {
4915
4919
  key: f,
4916
- label: A.label,
4917
- sublabel: A.description,
4918
- value: A.value
4920
+ label: x.label,
4921
+ sublabel: x.description,
4922
+ value: x.value
4919
4923
  }, null, 8, ["label", "sublabel", "value"]))), 128))
4920
4924
  ])
4921
4925
  ]),
4922
4926
  _: 1
4923
4927
  }, 8, ["label", "model-value"]),
4924
- C(et, {
4928
+ C(Je, {
4925
4929
  label: p(a)("menu.product.form.print.routes.label")
4926
4930
  }, {
4927
4931
  default: N(() => [
4928
- d.value.length ? (z(), K(p(Ui), {
4932
+ d.value.length ? (z(), G(p(Ui), {
4929
4933
  key: 0,
4930
- "item-key": (A) => A,
4934
+ "item-key": (x) => x,
4931
4935
  "model-value": d.value,
4932
4936
  handle: ".handle",
4933
- "onUpdate:modelValue": F[3] || (F[3] = (A) => y(A)),
4937
+ "onUpdate:modelValue": E[3] || (E[3] = (x) => y(x)),
4934
4938
  class: "space-y-16"
4935
4939
  }, {
4936
- item: N(({ element: A }) => {
4937
- var f, v, x, k, S;
4940
+ item: N(({ element: x }) => {
4941
+ var f, v, k, M, S;
4938
4942
  return [
4939
4943
  T("div", zr, [
4940
4944
  T("div", Fr, [
4941
- u.value ? (z(), K(P, {
4945
+ u.value ? (z(), G(P, {
4942
4946
  key: 0,
4943
- disabled: !((v = (f = t.form.print) == null ? void 0 : f.department) != null && v.includes(A)),
4947
+ disabled: !((v = (f = t.form.print) == null ? void 0 : f.department) != null && v.includes(x)),
4944
4948
  class: "handle",
4945
4949
  "prepend-icon": "drag_handle",
4946
4950
  variant: "tertiary",
4947
- onClick: F[2] || (F[2] = wt(() => {
4951
+ onClick: E[2] || (E[2] = wt(() => {
4948
4952
  }, ["stop"]))
4949
4953
  }, null, 8, ["disabled"])) : ee("", !0)
4950
4954
  ]),
4951
4955
  C(R, {
4952
- id: A,
4953
- "data-checked": (k = (x = t.form.print) == null ? void 0 : x.department) == null ? void 0 : k.includes(A),
4954
- label: h.value[A],
4955
- "model-value": (((S = t.form.print) == null ? void 0 : S.department) ?? []).includes(A),
4956
- value: A,
4956
+ id: x,
4957
+ "data-checked": (M = (k = t.form.print) == null ? void 0 : k.department) == null ? void 0 : M.includes(x),
4958
+ label: m.value[x],
4959
+ "model-value": (((S = t.form.print) == null ? void 0 : S.department) ?? []).includes(x),
4960
+ value: x,
4957
4961
  class: "flex-1",
4958
- "onUpdate:modelValue": (B) => b(A, B)
4962
+ "onUpdate:modelValue": (B) => b(x, B)
4959
4963
  }, null, 8, ["id", "data-checked", "label", "model-value", "value", "onUpdate:modelValue"])
4960
4964
  ])
4961
4965
  ];
@@ -4963,13 +4967,13 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4963
4967
  _: 1
4964
4968
  }, 8, ["item-key", "model-value"])) : ee("", !0),
4965
4969
  C(p(Mr), { "apply-product": !1 }, {
4966
- default: N(({ trigger: A }) => [
4970
+ default: N(({ trigger: x }) => [
4967
4971
  T("div", Er, [
4968
4972
  C(P, {
4969
- variant: p(Ge).Secondary,
4973
+ variant: p(Ke).Secondary,
4970
4974
  label: p(a)("menu.product.form.print.routes.add"),
4971
4975
  "prepend-icon": "add",
4972
- onClick: A
4976
+ onClick: x
4973
4977
  }, null, 8, ["variant", "label", "onClick"])
4974
4978
  ])
4975
4979
  ]),
@@ -4999,8 +5003,8 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
4999
5003
  setup(e, { emit: i }) {
5000
5004
  const t = i;
5001
5005
  return (n, a) => {
5002
- const o = G("fm-switch"), r = G("fm-card");
5003
- return n.disabled ? pe(n.$slots, "default", { key: 0 }, void 0, !0) : (z(), K(r, {
5006
+ const o = K("fm-switch"), r = K("fm-card");
5007
+ return n.disabled ? pe(n.$slots, "default", { key: 0 }, void 0, !0) : (z(), G(r, {
5004
5008
  key: 1,
5005
5009
  class: "p-16 space-y-24",
5006
5010
  variant: "outlined"
@@ -5016,7 +5020,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
5016
5020
  "onUpdate:modelValue": a[0] || (a[0] = (l) => t("update:toggle", l))
5017
5021
  }, null, 8, ["model-value"])
5018
5022
  ]),
5019
- C(_n, { name: "expand" }, {
5023
+ C(wn, { name: "expand" }, {
5020
5024
  default: N(() => [
5021
5025
  n.toggle ? (z(), q("div", $r, [
5022
5026
  pe(n.$slots, "default", {}, void 0, !0)
@@ -5035,10 +5039,10 @@ function Lr(e, i) {
5035
5039
  T("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
5036
5040
  ]));
5037
5041
  }
5038
- const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5042
+ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
5039
5043
  key: 0,
5040
5044
  class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
5041
- }, Kr = { class: "fm-typo-en-title-sm-600" }, zi = /* @__PURE__ */ le({
5045
+ }, Gr = { class: "fm-typo-en-title-sm-600" }, zi = /* @__PURE__ */ le({
5042
5046
  __name: "Summary",
5043
5047
  props: {
5044
5048
  title: {},
@@ -5046,7 +5050,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5046
5050
  items: {}
5047
5051
  },
5048
5052
  setup(e) {
5049
- const i = e, t = Ue();
5053
+ const i = e, t = $e();
5050
5054
  function n() {
5051
5055
  t.open({
5052
5056
  title: i.title,
@@ -5061,16 +5065,16 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5061
5065
  });
5062
5066
  }
5063
5067
  return (a, o) => {
5064
- const r = G("FmButton");
5065
- return i.variant === "full" ? (z(), q("div", Gr, [
5066
- T("div", Kr, se(a.title), 1),
5068
+ const r = K("FmButton");
5069
+ return i.variant === "full" ? (z(), q("div", Kr, [
5070
+ T("div", Gr, se(a.title), 1),
5067
5071
  C(Br),
5068
- (z(!0), q(Re, null, Ke(a.items, (l) => (z(), K(vi, {
5072
+ (z(!0), q(Ae, null, Ge(a.items, (l) => (z(), G(vi, {
5069
5073
  key: l.name,
5070
5074
  name: l.name,
5071
5075
  value: l.value || "--"
5072
5076
  }, null, 8, ["name", "value"]))), 128))
5073
- ])) : (z(), K(r, {
5077
+ ])) : (z(), G(r, {
5074
5078
  key: 1,
5075
5079
  icon: "info",
5076
5080
  variant: "tertiary",
@@ -5086,7 +5090,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5086
5090
  emits: ["update:catalogAndScheduler"],
5087
5091
  setup(e, { emit: i }) {
5088
5092
  const t = e, n = i, { t: a } = ce(), o = he(), r = Q(o.state.currentCatalogId || null), l = D(() => {
5089
- const m = Object.keys(t.linkedStatus.catalogs).map((c) => {
5093
+ const h = Object.keys(t.linkedStatus.catalogs).map((c) => {
5090
5094
  var y;
5091
5095
  return {
5092
5096
  label: ((y = o.state.menu.modules.catalog.find((b) => b._id === c)) == null ? void 0 : y.name) || "Unknown",
@@ -5098,7 +5102,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5098
5102
  label: "Main",
5099
5103
  value: null
5100
5104
  },
5101
- ...m
5105
+ ...h
5102
5106
  ];
5103
5107
  }), s = Q(o.state.currentSchedulerId || null), u = () => r.value ? t.linkedStatus.catalogs[r.value].schedulers : t.linkedStatus.schedulers, d = D(() => {
5104
5108
  const c = u().map((y) => {
@@ -5116,19 +5120,19 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5116
5120
  ...c
5117
5121
  ];
5118
5122
  });
5119
- Ce(r, (m) => {
5123
+ Ce(r, (h) => {
5120
5124
  [null, ...u()].includes(s.value) || (s.value = null);
5121
5125
  });
5122
- const h = Le.debounce(() => {
5126
+ const m = Ue.debounce(() => {
5123
5127
  n("update:catalogAndScheduler", [r.value, s.value]);
5124
5128
  }, 100);
5125
5129
  return Ce(
5126
5130
  () => `${r.value}-${s.value}`,
5127
5131
  () => {
5128
- h();
5132
+ m();
5129
5133
  }
5130
- ), (m, c) => {
5131
- const y = G("FmSelect");
5134
+ ), (h, c) => {
5135
+ const y = K("FmSelect");
5132
5136
  return z(), q("div", Wr, [
5133
5137
  T("div", jr, [
5134
5138
  T("div", Yr, se(p(a)("menu.catalog_scheduler.title")), 1),
@@ -5199,8 +5203,8 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5199
5203
  setup(e, { emit: i }) {
5200
5204
  var ai, ri, si, li, ui;
5201
5205
  const t = e, n = i, a = he(), o = Xt(), { t: r } = ce(), l = D(() => t.action === "add" ? r("menu.product.form.title.add") : r("menu.product.form.title.update")), s = D(() => a.rules.item), u = (W) => new Promise(($) => setTimeout($, W));
5202
- Qe(async () => {
5203
- t.autoShow && (await u(100), h());
5206
+ ot(async () => {
5207
+ t.autoShow && (await u(100), m());
5204
5208
  });
5205
5209
  const d = Q(!1);
5206
5210
  Ce(
@@ -5209,9 +5213,9 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5209
5213
  await u(500), n("update:show", W);
5210
5214
  }
5211
5215
  );
5212
- const h = () => {
5216
+ const m = () => {
5213
5217
  d.value = !d.value;
5214
- }, m = Q(), c = Q(
5218
+ }, h = Q(), c = Q(
5215
5219
  t.initialForm ? oe(t.initialForm) : {
5216
5220
  ..._e.generator.initMenuV4Item(),
5217
5221
  category: t.categoryId
@@ -5233,19 +5237,19 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5233
5237
  }
5234
5238
  );
5235
5239
  const b = ii(), g = async ([W, $]) => {
5236
- a.selectCatalog(W), a.selectScheduler($), await An(), b.update(c.value._id), setTimeout(() => {
5240
+ a.selectCatalog(W), a.selectScheduler($), await xn(), b.update(c.value._id), setTimeout(() => {
5237
5241
  n("update:show", !1);
5238
5242
  }, 100);
5239
5243
  }, w = D(() => {
5240
5244
  var W;
5241
5245
  return a.mapVariant((W = c.value.variant) == null ? void 0 : W.variantGroupIds);
5242
- }), F = Q(null);
5246
+ }), E = Q(null);
5243
5247
  Ce(
5244
5248
  () => c.value.thumbnail,
5245
5249
  async (W) => {
5246
5250
  if (!W) return;
5247
5251
  const re = await (await fetch(W)).blob();
5248
- F.value = new File([re], "thumbnail.jpg", {
5252
+ E.value = new File([re], "thumbnail.jpg", {
5249
5253
  type: "image/jpeg"
5250
5254
  });
5251
5255
  },
@@ -5253,7 +5257,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5253
5257
  immediate: !0
5254
5258
  }
5255
5259
  );
5256
- const M = (W, $) => {
5260
+ const A = (W, $) => {
5257
5261
  c.value = {
5258
5262
  ...oe(c.value),
5259
5263
  [W]: $
@@ -5261,7 +5265,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5261
5265
  };
5262
5266
  async function I() {
5263
5267
  var W, $;
5264
- m.value = c.value._id ? (await eo(
5268
+ h.value = c.value._id ? (await eo(
5265
5269
  a.mergedMenu,
5266
5270
  [c.value],
5267
5271
  a.state.menu,
@@ -5269,23 +5273,23 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5269
5273
  ($ = a.currentScheduler) == null ? void 0 : $._id
5270
5274
  ))[0] : void 0;
5271
5275
  }
5272
- const E = D(
5276
+ const F = D(
5273
5277
  () => !!a.currentCatalog || !!a.state.currentSchedulerId
5274
5278
  ), P = D(() => {
5275
5279
  var W;
5276
- return E.value ? c.value.category == "" || c.value.category == null && ((W = m.value) == null ? void 0 : W.category) == null : a.version === L.F_MENU_VERSION.enum.v4 && c.value.category == null;
5277
- }), R = D(() => o.itemAttributeSettings.value.length > 0 && !E.value);
5280
+ return F.value ? c.value.category == "" || c.value.category == null && ((W = h.value) == null ? void 0 : W.category) == null : a.version === L.F_MENU_VERSION.enum.v4 && c.value.category == null;
5281
+ }), R = D(() => o.itemAttributeSettings.value.length > 0 && !F.value);
5278
5282
  function _() {
5279
5283
  var fe;
5280
5284
  const W = a.getSelectedTax(
5281
5285
  c.value.taxes,
5282
- (fe = m.value) == null ? void 0 : fe.taxes,
5286
+ (fe = h.value) == null ? void 0 : fe.taxes,
5283
5287
  a.taxSetting.countryTaxOptions
5284
5288
  ), re = a.taxSetting.countryTaxOptions.find((X) => X.value === W);
5285
- return re ? bn(re.meta.rate) : "-";
5289
+ return re ? yn(re.meta.rate) : "-";
5286
5290
  }
5287
- function A() {
5288
- F.value = null, c.value.thumbnail = null;
5291
+ function x() {
5292
+ E.value = null, c.value.thumbnail = null;
5289
5293
  }
5290
5294
  const f = D(() => {
5291
5295
  var W, $, re, fe, X, ci, di, mi, hi;
@@ -5294,11 +5298,11 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5294
5298
  items: [
5295
5299
  {
5296
5300
  name: r("menu.product.form.summary.fields.code"),
5297
- value: c.value.code || ((W = m.value) == null ? void 0 : W.code) || "-"
5301
+ value: c.value.code || ((W = h.value) == null ? void 0 : W.code) || "-"
5298
5302
  },
5299
5303
  {
5300
5304
  name: r("menu.product.form.summary.fields.name"),
5301
- value: c.value.name || (($ = m.value) == null ? void 0 : $.name) || "-"
5305
+ value: c.value.name || (($ = h.value) == null ? void 0 : $.name) || "-"
5302
5306
  },
5303
5307
  {
5304
5308
  name: r("menu.product.form.summary.fields.category"),
@@ -5306,11 +5310,11 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5306
5310
  },
5307
5311
  {
5308
5312
  name: r("menu.product.form.summary.fields.order_from"),
5309
- value: c.value.orderFrom || ((fe = m.value) == null ? void 0 : fe.orderFrom) || "-"
5313
+ value: c.value.orderFrom || ((fe = h.value) == null ? void 0 : fe.orderFrom) || "-"
5310
5314
  },
5311
5315
  {
5312
5316
  name: r("menu.product.form.summary.fields.selling_price"),
5313
- value: c.value.price ? we.Dinero.fromFdoDinero(c.value.price).toFormat() : (X = m.value) != null && X.price ? we.Dinero.fromFdoDinero(m.value.price).toFormat() : "-"
5317
+ value: c.value.price ? we.Dinero.fromFdoDinero(c.value.price).toFormat() : (X = h.value) != null && X.price ? we.Dinero.fromFdoDinero(h.value.price).toFormat() : "-"
5314
5318
  },
5315
5319
  {
5316
5320
  name: r("menu.product.form.summary.fields.tax"),
@@ -5318,14 +5322,14 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5318
5322
  },
5319
5323
  {
5320
5324
  name: r("menu.product.form.summary.fields.inventory"),
5321
- value: (ci = c.value.inventoryBindings) != null && ci.length ? String(c.value.inventoryBindings.length) : (mi = (di = m.value) == null ? void 0 : di.inventoryBindings) != null && mi.length ? String(m.value.inventoryBindings.length) : "-"
5325
+ value: (ci = c.value.inventoryBindings) != null && ci.length ? String(c.value.inventoryBindings.length) : (mi = (di = h.value) == null ? void 0 : di.inventoryBindings) != null && mi.length ? String(h.value.inventoryBindings.length) : "-"
5322
5326
  },
5323
5327
  {
5324
5328
  name: r("menu.product.form.summary.fields.takeaway"),
5325
5329
  value: ((hi = a.state.menu.modules.takeaway.find(
5326
5330
  (Mt) => {
5327
5331
  var pi;
5328
- return Mt._id === (c.value.takeawayUsed || ((pi = m.value) == null ? void 0 : pi.takeawayUsed));
5332
+ return Mt._id === (c.value.takeawayUsed || ((pi = h.value) == null ? void 0 : pi.takeawayUsed));
5329
5333
  }
5330
5334
  )) == null ? void 0 : hi.name) || "-"
5331
5335
  }
@@ -5334,7 +5338,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5334
5338
  }), v = Q(
5335
5339
  c.value.category != null || !!c.value.code || !!c.value.orderFrom
5336
5340
  );
5337
- function x(W) {
5341
+ function k(W) {
5338
5342
  W || (c.value = {
5339
5343
  ...c.value,
5340
5344
  category: void 0,
@@ -5342,7 +5346,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5342
5346
  orderFrom: void 0
5343
5347
  });
5344
5348
  }
5345
- const k = Q(!!c.value.price || !!c.value.minPrice || !!c.value.costing);
5349
+ const M = Q(!!c.value.price || !!c.value.minPrice || !!c.value.costing);
5346
5350
  function S(W) {
5347
5351
  W || (c.value = {
5348
5352
  ...c.value,
@@ -5440,7 +5444,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5440
5444
  category: t.categoryId
5441
5445
  });
5442
5446
  }
5443
- ), Qe(() => {
5447
+ ), ot(() => {
5444
5448
  var W, $;
5445
5449
  I();
5446
5450
  try {
@@ -5458,7 +5462,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5458
5462
  } catch (re) {
5459
5463
  console.log(re);
5460
5464
  }
5461
- }), wn(() => {
5465
+ }), Sn(() => {
5462
5466
  try {
5463
5467
  Te.closeSession();
5464
5468
  } catch (W) {
@@ -5466,24 +5470,24 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5466
5470
  }
5467
5471
  });
5468
5472
  const de = Jr();
5469
- Qe(() => {
5473
+ ot(() => {
5470
5474
  de.isUpdatingItem || (de.isUpdatingItem = !0, de.storedCatalogId = a.state.currentCatalogId, de.storedSchedulerId = a.state.currentSchedulerId);
5471
5475
  });
5472
- function ot() {
5476
+ function nt() {
5473
5477
  de.isUpdatingItem = !1, a.selectCatalog(de.storedCatalogId), a.selectScheduler(de.storedSchedulerId);
5474
5478
  }
5475
5479
  function xt() {
5476
- n("submit:form", c.value, F.value), h(), ot();
5480
+ n("submit:form", c.value, E.value), m(), nt();
5477
5481
  }
5478
5482
  function ni() {
5479
- h(), ot();
5483
+ m(), nt();
5480
5484
  }
5481
5485
  const { isAtMost: kt } = Pi();
5482
5486
  D(() => kt("sm"));
5483
- const oi = Q(null), dn = Mn(oi);
5484
- return (W, $) => (z(), q(Re, null, [
5485
- pe(W.$slots, "trigger", Sn(Cn({
5486
- trigger: h
5487
+ const oi = Q(null), mn = On(oi);
5488
+ return (W, $) => (z(), q(Ae, null, [
5489
+ pe(W.$slots, "trigger", Cn(An({
5490
+ trigger: m
5487
5491
  }))),
5488
5492
  C(Dn, {
5489
5493
  title: l.value,
@@ -5501,7 +5505,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5501
5505
  onOnCancel: ni
5502
5506
  }, {
5503
5507
  "append-title": N(() => [
5504
- p(kt)("sm") ? (z(), K(zi, {
5508
+ p(kt)("sm") ? (z(), G(zi, {
5505
5509
  key: 0,
5506
5510
  variant: "dialog",
5507
5511
  title: f.value.title,
@@ -5511,12 +5515,12 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5511
5515
  default: N(() => {
5512
5516
  var re, fe;
5513
5517
  return [
5514
- p(kt)("sm") ? ee("", !0) : (z(), K(zi, {
5518
+ p(kt)("sm") ? ee("", !0) : (z(), G(zi, {
5515
5519
  key: 0,
5516
5520
  class: "fixed",
5517
5521
  style: Rn({
5518
5522
  top: "85px",
5519
- left: p(dn).right + "px"
5523
+ left: p(mn).right + "px"
5520
5524
  }),
5521
5525
  variant: "full",
5522
5526
  title: f.value.title,
@@ -5528,7 +5532,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5528
5532
  ref: oi,
5529
5533
  class: Ee(["flex-1 py-24 space-y-24", "xs:w-full"])
5530
5534
  }, [
5531
- y.value && (Object.keys(y.value.catalogs || {}).length > 0 || y.value.schedulers.length > 0) ? (z(), K(Qr, {
5535
+ y.value && (Object.keys(y.value.catalogs || {}).length > 0 || y.value.schedulers.length > 0) ? (z(), G(Qr, {
5532
5536
  key: 0,
5533
5537
  "linked-status": y.value,
5534
5538
  "onUpdate:catalogAndScheduler": g
@@ -5537,67 +5541,67 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5537
5541
  toggle: v.value,
5538
5542
  "onUpdate:toggle": [
5539
5543
  $[1] || ($[1] = (X) => v.value = X),
5540
- $[2] || ($[2] = (X) => x(X))
5544
+ $[2] || ($[2] = (X) => k(X))
5541
5545
  ],
5542
- disabled: !E.value,
5546
+ disabled: !F.value,
5543
5547
  description: p(r)("menu.product.form.sections.general.description"),
5544
5548
  title: p(r)("menu.product.form.sections.general.title")
5545
5549
  }, {
5546
5550
  default: N(() => [
5547
5551
  C(la, {
5548
- fallback: m.value,
5552
+ fallback: h.value,
5549
5553
  form: c.value,
5550
5554
  "is-addon": P.value,
5551
- "is-override": E.value,
5555
+ "is-override": F.value,
5552
5556
  "is-create": t.action === "add",
5553
- thumbnail: F.value,
5554
- "onUpdate:form": M,
5555
- "onUpdate:thumbnail": $[0] || ($[0] = (X) => F.value = X),
5556
- "onReset:thumbnail": A
5557
+ thumbnail: E.value,
5558
+ "onUpdate:form": A,
5559
+ "onUpdate:thumbnail": $[0] || ($[0] = (X) => E.value = X),
5560
+ "onReset:thumbnail": x
5557
5561
  }, null, 8, ["fallback", "form", "is-addon", "is-override", "is-create", "thumbnail"])
5558
5562
  ]),
5559
5563
  _: 1
5560
5564
  }, 8, ["toggle", "disabled", "description", "title"]),
5561
- E.value ? ee("", !0) : (z(), q("div", ts)),
5562
- R.value ? (z(), K($e, {
5565
+ F.value ? ee("", !0) : (z(), q("div", ts)),
5566
+ R.value ? (z(), G(Ve, {
5563
5567
  key: 2,
5564
5568
  title: p(r)("menu.product.form.sections.tagging.title"),
5565
5569
  "sub-title": p(r)("menu.product.form.sections.tagging.subtitle")
5566
5570
  }, {
5567
5571
  default: N(() => [
5568
- C(p(On), {
5572
+ C(p(zn), {
5569
5573
  entity: "item",
5570
5574
  "model-value": c.value.customAttributes || {},
5571
- "onUpdate:modelValue": $[3] || ($[3] = (X) => M("customAttributes", X))
5575
+ "onUpdate:modelValue": $[3] || ($[3] = (X) => A("customAttributes", X))
5572
5576
  }, null, 8, ["model-value"])
5573
5577
  ]),
5574
5578
  _: 1
5575
5579
  }, 8, ["title", "sub-title"])) : ee("", !0),
5576
5580
  R.value ? (z(), q("div", is)) : ee("", !0),
5577
- E.value ? ee("", !0) : (z(), q("div", ns)),
5581
+ F.value ? ee("", !0) : (z(), q("div", ns)),
5578
5582
  C(We, {
5579
- toggle: k.value,
5583
+ toggle: M.value,
5580
5584
  "onUpdate:toggle": [
5581
- $[4] || ($[4] = (X) => k.value = X),
5585
+ $[4] || ($[4] = (X) => M.value = X),
5582
5586
  $[5] || ($[5] = (X) => S(X))
5583
5587
  ],
5584
- disabled: !E.value,
5588
+ disabled: !F.value,
5585
5589
  description: p(r)("menu.product.form.sections.price.description"),
5586
5590
  title: p(r)("menu.product.form.sections.price.title")
5587
5591
  }, {
5588
5592
  default: N(() => [
5589
5593
  C(Sa, {
5590
- fallback: m.value,
5594
+ fallback: h.value,
5591
5595
  form: c.value,
5592
5596
  "is-addon": P.value,
5593
- "is-override": E.value,
5594
- "onUpdate:form": M
5597
+ "is-override": F.value,
5598
+ "onUpdate:form": A
5595
5599
  }, null, 8, ["fallback", "form", "is-addon", "is-override"])
5596
5600
  ]),
5597
5601
  _: 1
5598
5602
  }, 8, ["toggle", "disabled", "description", "title"]),
5599
- s.value.print && !E.value ? (z(), q("div", os)) : ee("", !0),
5600
- s.value.print ? (z(), K(We, {
5603
+ s.value.print && !F.value ? (z(), q("div", os)) : ee("", !0),
5604
+ s.value.print ? (z(), G(We, {
5601
5605
  key: 6,
5602
5606
  toggle: Z.value,
5603
5607
  "onUpdate:toggle": [
@@ -5610,111 +5614,111 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5610
5614
  }, {
5611
5615
  default: N(() => [
5612
5616
  C(Ir, {
5613
- fallback: m.value,
5617
+ fallback: h.value,
5614
5618
  form: c.value,
5615
5619
  "full-combinations": w.value,
5616
5620
  "is-addon": P.value,
5617
- "is-override": E.value,
5618
- "onUpdate:form": M,
5621
+ "is-override": F.value,
5622
+ "onUpdate:form": A,
5619
5623
  "onReplace:form": $[6] || ($[6] = (X) => c.value = X)
5620
5624
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
5621
5625
  ]),
5622
5626
  _: 1
5623
5627
  }, 8, ["toggle"])) : ee("", !0),
5624
- E.value ? ee("", !0) : (z(), q("div", as)),
5628
+ F.value ? ee("", !0) : (z(), q("div", as)),
5625
5629
  C(We, {
5626
5630
  toggle: B.value,
5627
5631
  "onUpdate:toggle": [
5628
5632
  $[10] || ($[10] = (X) => B.value = X),
5629
5633
  $[11] || ($[11] = (X) => H(X))
5630
5634
  ],
5631
- disabled: !E.value,
5635
+ disabled: !F.value,
5632
5636
  description: "Use a different variant setting",
5633
5637
  title: "Update variant"
5634
5638
  }, {
5635
5639
  default: N(() => [
5636
5640
  C(Na, {
5637
- fallback: m.value,
5641
+ fallback: h.value,
5638
5642
  form: c.value,
5639
5643
  "full-combinations": w.value,
5640
5644
  "is-addon": P.value,
5641
- "is-override": E.value,
5642
- "onUpdate:form": M,
5645
+ "is-override": F.value,
5646
+ "onUpdate:form": A,
5643
5647
  "onReplace:form": $[9] || ($[9] = (X) => c.value = X)
5644
5648
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
5645
5649
  ]),
5646
5650
  _: 1
5647
5651
  }, 8, ["toggle", "disabled"]),
5648
- s.value.group && !E.value ? (z(), q("div", rs)) : ee("", !0),
5649
- s.value.group ? (z(), K(We, {
5652
+ s.value.group && !F.value ? (z(), q("div", rs)) : ee("", !0),
5653
+ s.value.group ? (z(), G(We, {
5650
5654
  key: 9,
5651
5655
  toggle: te.value,
5652
5656
  "onUpdate:toggle": [
5653
5657
  $[13] || ($[13] = (X) => te.value = X),
5654
5658
  $[14] || ($[14] = (X) => ae(X))
5655
5659
  ],
5656
- disabled: !E.value,
5660
+ disabled: !F.value,
5657
5661
  description: "Use a different group setting",
5658
5662
  title: "Update group"
5659
5663
  }, {
5660
5664
  default: N(() => [
5661
5665
  C(yr, {
5662
- fallback: m.value,
5666
+ fallback: h.value,
5663
5667
  form: c.value,
5664
5668
  "full-combinations": w.value,
5665
5669
  "is-addon": P.value,
5666
- "is-override": E.value,
5667
- "onUpdate:form": M,
5670
+ "is-override": F.value,
5671
+ "onUpdate:form": A,
5668
5672
  "onReplace:form": $[12] || ($[12] = (X) => c.value = X)
5669
5673
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
5670
5674
  ]),
5671
5675
  _: 1
5672
5676
  }, 8, ["toggle", "disabled"])) : ee("", !0),
5673
- s.value.inventory && !E.value ? (z(), q("div", ss)) : ee("", !0),
5674
- s.value.inventory ? (z(), K(We, {
5677
+ s.value.inventory && !F.value ? (z(), q("div", ss)) : ee("", !0),
5678
+ s.value.inventory ? (z(), G(We, {
5675
5679
  key: 11,
5676
5680
  toggle: J.value,
5677
5681
  "onUpdate:toggle": [
5678
5682
  $[16] || ($[16] = (X) => J.value = X),
5679
5683
  $[17] || ($[17] = (X) => O(X))
5680
5684
  ],
5681
- disabled: !E.value,
5685
+ disabled: !F.value,
5682
5686
  description: "Use a different inventory setting",
5683
5687
  title: "Update inventory"
5684
5688
  }, {
5685
5689
  default: N(() => [
5686
5690
  C(Sr, {
5687
- fallback: m.value,
5691
+ fallback: h.value,
5688
5692
  form: c.value,
5689
5693
  "full-combinations": w.value,
5690
5694
  "is-addon": P.value,
5691
- "is-override": E.value,
5692
- "onUpdate:form": M,
5695
+ "is-override": F.value,
5696
+ "onUpdate:form": A,
5693
5697
  "onReplace:form": $[15] || ($[15] = (X) => c.value = X)
5694
5698
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
5695
5699
  ]),
5696
5700
  _: 1
5697
5701
  }, 8, ["toggle", "disabled"])) : ee("", !0),
5698
- s.value.takeaway(c.value.category ?? ((re = m.value) == null ? void 0 : re.category)) && !E.value ? (z(), q("div", ls)) : ee("", !0),
5699
- s.value.takeaway(c.value.category ?? ((fe = m.value) == null ? void 0 : fe.category)) ? (z(), K(We, {
5702
+ s.value.takeaway(c.value.category ?? ((re = h.value) == null ? void 0 : re.category)) && !F.value ? (z(), q("div", ls)) : ee("", !0),
5703
+ s.value.takeaway(c.value.category ?? ((fe = h.value) == null ? void 0 : fe.category)) ? (z(), G(We, {
5700
5704
  key: 13,
5701
5705
  toggle: U.value,
5702
5706
  "onUpdate:toggle": [
5703
5707
  $[19] || ($[19] = (X) => U.value = X),
5704
5708
  $[20] || ($[20] = (X) => V(X))
5705
5709
  ],
5706
- disabled: !E.value,
5710
+ disabled: !F.value,
5707
5711
  description: "Use a different takeaway setting",
5708
5712
  title: "Update takeaway"
5709
5713
  }, {
5710
5714
  default: N(() => [
5711
5715
  C(Cr, {
5712
- fallback: m.value,
5716
+ fallback: h.value,
5713
5717
  form: c.value,
5714
5718
  "full-combinations": w.value,
5715
5719
  "is-addon": P.value,
5716
- "is-override": E.value,
5717
- "onUpdate:form": M,
5720
+ "is-override": F.value,
5721
+ "onUpdate:form": A,
5718
5722
  "onReplace:form": $[18] || ($[18] = (X) => c.value = X)
5719
5723
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
5720
5724
  ]),
@@ -5730,21 +5734,21 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Gr = {
5730
5734
  ], 64));
5731
5735
  }
5732
5736
  }), cs = us;
5733
- function cn(e, i) {
5737
+ function dn(e, i) {
5734
5738
  var o, r, l, s;
5735
5739
  const t = (o = i.groups) == null ? void 0 : o.reduce((u, d) => {
5736
- const h = e.groups.find((c) => c._id === d._id);
5737
- return St(e.items, h.items) === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC && u.push(h), u;
5740
+ const m = e.groups.find((c) => c._id === d._id);
5741
+ return St(e.items, m.items) === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC && u.push(m), u;
5738
5742
  }, []);
5739
5743
  if (!(t != null && t.length)) return i;
5740
5744
  const n = t.map((u) => u._id);
5741
5745
  function a(u) {
5742
- const d = t.map((h) => {
5746
+ const d = t.map((m) => {
5743
5747
  var y;
5744
- const m = u.find((b) => b._id === h._id), c = (y = h.items) == null ? void 0 : y.map((b) => {
5748
+ const h = u.find((b) => b._id === m._id), c = (y = m.items) == null ? void 0 : y.map((b) => {
5745
5749
  var w;
5746
- const g = (w = m == null ? void 0 : m.items) == null ? void 0 : w.find(
5747
- (F) => F._id === b._id && F.combinationKey == b.combinationKey
5750
+ const g = (w = h == null ? void 0 : h.items) == null ? void 0 : w.find(
5751
+ (E) => E._id === b._id && E.combinationKey == b.combinationKey
5748
5752
  );
5749
5753
  return {
5750
5754
  ...g || {},
@@ -5755,12 +5759,12 @@ function cn(e, i) {
5755
5759
  };
5756
5760
  });
5757
5761
  return {
5758
- _id: h._id,
5759
- groupKey: (m == null ? void 0 : m.groupKey) ?? "",
5762
+ _id: m._id,
5763
+ groupKey: (h == null ? void 0 : h.groupKey) ?? "",
5760
5764
  items: c
5761
5765
  };
5762
5766
  });
5763
- return [...u.filter((h) => !n.includes(h._id)), ...d];
5767
+ return [...u.filter((m) => !n.includes(m._id)), ...d];
5764
5768
  }
5765
5769
  if ((r = i.variant) != null && r.variantCombinations.length) {
5766
5770
  const u = (l = i.variant) == null ? void 0 : l.variantCombinations.map((d) => ({ ...d, groups: a(d.groups || []) }));
@@ -5775,23 +5779,23 @@ function cn(e, i) {
5775
5779
  return { ...i, groups: a(i.groups || []) };
5776
5780
  }
5777
5781
  const ii = Fi("item-manager", () => {
5778
- const e = he(), i = Be(), t = Ue(), n = Ye(i), a = He(n), o = xn(), { t: r } = ce(), l = (f) => {
5782
+ const e = he(), i = Be(), t = $e(), n = Ye(i), a = He(n), o = kn(), { t: r } = ce(), l = (f) => {
5779
5783
  if (!o) throw new Error("No current instance found");
5780
5784
  const { container: v } = Ln(cs, o, {
5781
5785
  ...f,
5782
5786
  autoShow: !0,
5783
- "onUpdate:show": async (x) => {
5784
- x || (kn(null, v), v.remove());
5787
+ "onUpdate:show": async (k) => {
5788
+ k || (Mn(null, v), v.remove());
5785
5789
  }
5786
5790
  });
5787
5791
  };
5788
5792
  function s(f) {
5789
- var k;
5790
- const v = oe(f), x = (k = v.variant) == null ? void 0 : k.variantCombinations;
5791
- return delete v.variant, delete v.thumbnail, [v, ...x || []];
5793
+ var M;
5794
+ const v = oe(f), k = (M = v.variant) == null ? void 0 : M.variantCombinations;
5795
+ return delete v.variant, delete v.thumbnail, [v, ...k || []];
5792
5796
  }
5793
- function u(f, v, x, k) {
5794
- const S = oe(v), B = x ? S.modules.catalog.find((j) => j._id === x) : null, H = k ? S.modules.scheduler.find((j) => j._id === k) : null, J = B ? oe(B) : void 0, O = x ? S.modules.catalog.filter((j) => j._id !== x) : [], U = H ? oe(H) : void 0, V = f.reduce((j, te) => (j[te._id] = s(te), j), {});
5797
+ function u(f, v, k, M) {
5798
+ const S = oe(v), B = k ? S.modules.catalog.find((j) => j._id === k) : null, H = M ? S.modules.scheduler.find((j) => j._id === M) : null, J = B ? oe(B) : void 0, O = k ? S.modules.catalog.filter((j) => j._id !== k) : [], U = H ? oe(H) : void 0, V = f.reduce((j, te) => (j[te._id] = s(te), j), {});
5795
5799
  function Z(j = []) {
5796
5800
  const te = f.map((ae) => ae._id);
5797
5801
  return [
@@ -5799,11 +5803,11 @@ const ii = Fi("item-manager", () => {
5799
5803
  ...Object.values(V).flatMap((ae) => ae)
5800
5804
  ];
5801
5805
  }
5802
- return J && k ? (J.override.scheduler = {
5806
+ return J && M ? (J.override.scheduler = {
5803
5807
  ...J.override.scheduler,
5804
- [k]: {
5805
- ...J.override.scheduler[k],
5806
- _id: k,
5808
+ [M]: {
5809
+ ...J.override.scheduler[M],
5810
+ _id: M,
5807
5811
  items: Z(U == null ? void 0 : U.items).map((j) => ({
5808
5812
  ...j,
5809
5813
  orderFrom: L.F_ORDER_FROM.enum.ALL
@@ -5813,7 +5817,7 @@ const ii = Fi("item-manager", () => {
5813
5817
  ...J.override.items,
5814
5818
  ...V
5815
5819
  }, S.modules.catalog = [...O, J], S) : U ? (U.items = Z(U.items), S.modules.scheduler = [
5816
- ...S.modules.scheduler.filter((j) => j._id !== k),
5820
+ ...S.modules.scheduler.filter((j) => j._id !== M),
5817
5821
  U
5818
5822
  ], S) : {
5819
5823
  ..._e.generator.initMenuV4(),
@@ -5832,32 +5836,32 @@ const ii = Fi("item-manager", () => {
5832
5836
  l({
5833
5837
  action: "add",
5834
5838
  categoryId: f,
5835
- "onSubmit:form": async (x, k) => {
5836
- x.inventoryBindings ?? (x.inventoryBindings = []), x.inventoryBindings.length === 0 && (x.inventoryBindings = null);
5839
+ "onSubmit:form": async (k, M) => {
5840
+ k.inventoryBindings ?? (k.inventoryBindings = []), k.inventoryBindings.length === 0 && (k.inventoryBindings = null);
5837
5841
  const S = gi();
5838
- await v(x, ye.F_OPERATION_TYPE.create, S, k);
5842
+ await v(k, ye.F_OPERATION_TYPE.create, S, M);
5839
5843
  }
5840
5844
  });
5841
5845
  }
5842
- function h(f, v) {
5843
- var k;
5846
+ function m(f, v) {
5847
+ var M;
5844
5848
  return {
5845
5849
  ...v.find((S) => !S.combinationKey),
5846
5850
  variant: {
5847
5851
  ...f.variant,
5848
- variantCombinations: (k = f.variant) == null ? void 0 : k.variantCombinations.map((S) => v.find((H) => H.combinationKey === S.combinationKey) || { _id: f._id, combinationKey: S.combinationKey })
5852
+ variantCombinations: (M = f.variant) == null ? void 0 : M.variantCombinations.map((S) => v.find((H) => H.combinationKey === S.combinationKey) || { _id: f._id, combinationKey: S.combinationKey })
5849
5853
  },
5850
5854
  _id: f._id
5851
5855
  };
5852
5856
  }
5853
- async function m(f, v, x) {
5857
+ async function h(f, v, k) {
5854
5858
  l({
5855
- initialForm: h(f, v || []),
5859
+ initialForm: m(f, v || []),
5856
5860
  action: "update",
5857
- "onSubmit:form": async (k) => {
5858
- k.inventoryBindings ?? (k.inventoryBindings = []), k.inventoryBindings.length === 0 && (k.inventoryBindings = null), await x(
5861
+ "onSubmit:form": async (M) => {
5862
+ M.inventoryBindings ?? (M.inventoryBindings = []), M.inventoryBindings.length === 0 && (M.inventoryBindings = null), await k(
5859
5863
  u(
5860
- [k],
5864
+ [M],
5861
5865
  e.state.menu,
5862
5866
  e.state.currentCatalogId,
5863
5867
  e.state.currentSchedulerId
@@ -5868,10 +5872,10 @@ const ii = Fi("item-manager", () => {
5868
5872
  }
5869
5873
  async function c(f) {
5870
5874
  var B;
5871
- const v = e.currentCatalog, x = e.state.currentSchedulerId, k = v.override.scheduler[x] ?? {
5872
- _id: x
5873
- }, S = (B = k == null ? void 0 : k.items) == null ? void 0 : B.filter((H) => H._id === f._id);
5874
- await m(f, S, async (H) => {
5875
+ const v = e.currentCatalog, k = e.state.currentSchedulerId, M = v.override.scheduler[k] ?? {
5876
+ _id: k
5877
+ }, S = (B = M == null ? void 0 : M.items) == null ? void 0 : B.filter((H) => H._id === f._id);
5878
+ await h(f, S, async (H) => {
5875
5879
  const J = H.modules.catalog.find(
5876
5880
  (O) => O._id === v._id
5877
5881
  );
@@ -5880,19 +5884,19 @@ const ii = Fi("item-manager", () => {
5880
5884
  }
5881
5885
  async function y(f) {
5882
5886
  const v = e.currentCatalog;
5883
- await m(f, v.override.items[f._id], async (x) => {
5884
- const k = x.modules.catalog.find(
5887
+ await h(f, v.override.items[f._id], async (k) => {
5888
+ const M = k.modules.catalog.find(
5885
5889
  (S) => S._id === v._id
5886
5890
  );
5887
- await new Pe(k, e, a.updateMenu, t).update();
5891
+ await new Pe(M, e, a.updateMenu, t).update();
5888
5892
  });
5889
5893
  }
5890
5894
  async function b(f) {
5891
5895
  const v = e.schedulers.find(
5892
- (k) => k._id === e.state.currentSchedulerId
5893
- ), x = v.items.filter((k) => k._id === f._id);
5894
- await m(f, x, async (k) => {
5895
- const S = k.modules.scheduler.find(
5896
+ (M) => M._id === e.state.currentSchedulerId
5897
+ ), k = v.items.filter((M) => M._id === f._id);
5898
+ await h(f, k, async (M) => {
5899
+ const S = M.modules.scheduler.find(
5896
5900
  (B) => B._id === v._id
5897
5901
  );
5898
5902
  await new gt(S, e, a.updateMenu, t).update();
@@ -5900,23 +5904,23 @@ const ii = Fi("item-manager", () => {
5900
5904
  }
5901
5905
  async function g(f) {
5902
5906
  var S, B;
5903
- const v = e.state.currentSchedulerId, x = oe(e.currentCatalog), k = (B = ((S = x.override.scheduler[v]) == null ? void 0 : S.items) || []) == null ? void 0 : B.reduce((H, J) => {
5907
+ const v = e.state.currentSchedulerId, k = oe(e.currentCatalog), M = (B = ((S = k.override.scheduler[v]) == null ? void 0 : S.items) || []) == null ? void 0 : B.reduce((H, J) => {
5904
5908
  if (J.combinationKey) return [...H, J];
5905
5909
  const O = f.find((U) => U._id === J._id);
5906
5910
  return O ? [...H, { ...J, price: O.price }] : [...H, J];
5907
5911
  }, []);
5908
- x.override.scheduler = {
5909
- ...x.override.scheduler,
5912
+ k.override.scheduler = {
5913
+ ...k.override.scheduler,
5910
5914
  [v]: {
5911
- ...x.override.scheduler[v],
5915
+ ...k.override.scheduler[v],
5912
5916
  _id: v,
5913
- items: k
5917
+ items: M
5914
5918
  }
5915
- }, await new Pe(x, e, a.updateMenu, t).update();
5919
+ }, await new Pe(k, e, a.updateMenu, t).update();
5916
5920
  }
5917
5921
  async function w(f) {
5918
5922
  var S;
5919
- const v = oe(e.currentCatalog), x = (S = Object.entries(v.override.items)) == null ? void 0 : S.reduce(
5923
+ const v = oe(e.currentCatalog), k = (S = Object.entries(v.override.items)) == null ? void 0 : S.reduce(
5920
5924
  (B, [H, J]) => {
5921
5925
  const O = f.find((V) => V._id === H);
5922
5926
  if (!O)
@@ -5934,40 +5938,40 @@ const ii = Fi("item-manager", () => {
5934
5938
  ], B;
5935
5939
  },
5936
5940
  {}
5937
- ), { updateMenu: k } = a;
5941
+ ), { updateMenu: M } = a;
5938
5942
  await new Pe(
5939
5943
  {
5940
5944
  ...v,
5941
5945
  override: {
5942
5946
  ...v.override,
5943
- items: x
5947
+ items: k
5944
5948
  }
5945
5949
  },
5946
5950
  e,
5947
- k,
5951
+ M,
5948
5952
  t
5949
5953
  ).update();
5950
5954
  }
5951
- async function F(f) {
5952
- const v = oe(e.currentScheduler), x = v.items.reduce((k, S) => {
5953
- if (S.combinationKey) return [...k, S];
5955
+ async function E(f) {
5956
+ const v = oe(e.currentScheduler), k = v.items.reduce((M, S) => {
5957
+ if (S.combinationKey) return [...M, S];
5954
5958
  const B = f.find((H) => H._id === S._id);
5955
- return B ? [...k, { ...S, price: B.price }] : [...k, S];
5959
+ return B ? [...M, { ...S, price: B.price }] : [...M, S];
5956
5960
  }, []);
5957
5961
  await new gt(
5958
5962
  {
5959
5963
  ...v,
5960
- items: x
5964
+ items: k
5961
5965
  },
5962
5966
  e,
5963
5967
  a.updateMenu,
5964
5968
  t
5965
5969
  ).update();
5966
5970
  }
5967
- async function M(f) {
5968
- const v = f.reduce((k, S) => {
5971
+ async function A(f) {
5972
+ const v = f.reduce((M, S) => {
5969
5973
  const B = e.items.find((H) => H._id === S._id);
5970
- return B && k.push({
5974
+ return B && M.push({
5971
5975
  ...B,
5972
5976
  code: S.code ?? B.code,
5973
5977
  name: S.name || B.name,
@@ -5975,13 +5979,13 @@ const ii = Fi("item-manager", () => {
5975
5979
  orderFrom: S.orderFrom ?? B.orderFrom,
5976
5980
  taxes: S.taxes ?? B.taxes,
5977
5981
  category: S.category === void 0 ? B.category : S.category
5978
- }), k;
5979
- }, []), { updateMenu: x } = a;
5980
- await x(
5981
- v.map((k) => ({
5982
+ }), M;
5983
+ }, []), { updateMenu: k } = a;
5984
+ await k(
5985
+ v.map((M) => ({
5982
5986
  module: L.F_MENU_MODULE_V4_KEY.enum.item,
5983
5987
  operation: ye.F_OPERATION_TYPE.update,
5984
- data: k
5988
+ data: M
5985
5989
  })),
5986
5990
  `${v.length} products`
5987
5991
  );
@@ -5991,31 +5995,31 @@ const ii = Fi("item-manager", () => {
5991
5995
  l({
5992
5996
  initialForm: f,
5993
5997
  action: "update",
5994
- "onSubmit:form": async (x, k) => {
5998
+ "onSubmit:form": async (k, M) => {
5995
5999
  const S = gi(f._id);
5996
- x.inventoryBindings ?? (x.inventoryBindings = []), x.inventoryBindings.length === 0 && (x.inventoryBindings = null), await v(x, ye.F_OPERATION_TYPE.update, S, k);
6000
+ k.inventoryBindings ?? (k.inventoryBindings = []), k.inventoryBindings.length === 0 && (k.inventoryBindings = null), await v(k, ye.F_OPERATION_TYPE.update, S, M);
5997
6001
  }
5998
6002
  });
5999
6003
  }
6000
- async function E(f) {
6001
- const v = e.state.menu.modules.item.find((x) => x._id === f);
6004
+ async function F(f) {
6005
+ const v = e.state.menu.modules.item.find((k) => k._id === f);
6002
6006
  e.currentCatalog ? e.state.currentSchedulerId ? await c(v) : await y(v) : e.state.currentSchedulerId ? await b(v) : I(v);
6003
6007
  }
6004
6008
  async function P(f) {
6005
6009
  e.currentCatalog ? e.currentScheduler ? await g(f) : await w(f) : (
6006
6010
  // If Main
6007
- e.currentScheduler ? await F(f) : await M(f)
6011
+ e.currentScheduler ? await E(f) : await A(f)
6008
6012
  );
6009
6013
  }
6010
6014
  function R(f) {
6011
- const { updateMenu: v } = a, x = f.length > 1 ? `${f.length} products` : f[0].name;
6015
+ const { updateMenu: v } = a, k = f.length > 1 ? `${f.length} products` : f[0].name;
6012
6016
  t.open({
6013
6017
  title: r("menu.common.dialog.remove.product.title"),
6014
- message: r("menu.common.dialog.remove.product.message", { name: x }),
6018
+ message: r("menu.common.dialog.remove.product.message", { name: k }),
6015
6019
  primaryActions: {
6016
6020
  text: r("menu.common.actions.remove"),
6017
6021
  close: !0,
6018
- variant: Ge.Destructive
6022
+ variant: Ke.Destructive
6019
6023
  },
6020
6024
  secondaryActions: {
6021
6025
  text: r("menu.common.actions.cancel"),
@@ -6023,16 +6027,16 @@ const ii = Fi("item-manager", () => {
6023
6027
  }
6024
6028
  }).onPrimary(async () => {
6025
6029
  await v(
6026
- f.map(({ _id: k }) => ({
6030
+ f.map(({ _id: M }) => ({
6027
6031
  module: L.F_MENU_MODULE_V4_KEY.enum.item,
6028
6032
  operation: ye.F_OPERATION_TYPE.delete,
6029
- data: k
6033
+ data: M
6030
6034
  })),
6031
- x,
6035
+ k,
6032
6036
  !0
6033
6037
  );
6034
- for (const k of f)
6035
- k.thumbnail && await yn.delete(k.thumbnail);
6038
+ for (const M of f)
6039
+ M.thumbnail && await _n.delete(M.thumbnail);
6036
6040
  i.open({
6037
6041
  message: r("menu.common.dialog.remove.product.success"),
6038
6042
  type: "success"
@@ -6052,7 +6056,7 @@ const ii = Fi("item-manager", () => {
6052
6056
  t
6053
6057
  ).unlinkProduct(f.map((v) => v._id)) : R(f);
6054
6058
  }
6055
- async function A(f) {
6059
+ async function x(f) {
6056
6060
  const { updateMenu: v } = a;
6057
6061
  await v(
6058
6062
  {
@@ -6064,20 +6068,20 @@ const ii = Fi("item-manager", () => {
6064
6068
  );
6065
6069
  }
6066
6070
  return {
6067
- initDynamicGroupItem: (f) => cn(e, f),
6071
+ initDynamicGroupItem: (f) => dn(e, f),
6068
6072
  create: d,
6069
- update: E,
6073
+ update: F,
6070
6074
  updateMany: P,
6071
6075
  deleteItem: _,
6072
- rearrange: A
6076
+ rearrange: x
6073
6077
  };
6074
6078
  });
6075
6079
  export {
6076
6080
  Oi as A,
6077
- Ni as M,
6081
+ Li as M,
6078
6082
  gt as S,
6079
- un as _,
6080
- Vi as a,
6083
+ cn as _,
6084
+ Ni as a,
6081
6085
  qt as e,
6082
6086
  eo as m,
6083
6087
  ii as u