@feedmepos/mf-menu 0.20.1 → 0.20.2

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 (53) hide show
  1. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CYQnhiBN.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Ds2qfY_X.js} +2 -2
  2. package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-DKlRd-kN.js → ApplyProducts.vue_vue_type_script_setup_true_lang-BRepaPR3.js} +2 -2
  3. package/dist/{Catalog-C_MjlkAH.js → Catalog-S5KDEWzG.js} +3 -3
  4. package/dist/{Category-hDpbuKdl.js → Category-DLaNEtA5.js} +6 -6
  5. package/dist/{CookingGuide-DoTQcfZo.js → CookingGuide-DSGZapxz.js} +4 -4
  6. package/dist/{Group-CnbKRGYg.js → Group-B0VQ-64x.js} +4 -4
  7. package/dist/{Group-CIwshUNs.js → Group-CBMSkmwQ.js} +1 -1
  8. package/dist/{Group.vue_vue_type_script_setup_true_lang-BmqRBXoX.js → Group.vue_vue_type_script_setup_true_lang-DKzrhXtM.js} +43 -43
  9. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BKuXmC_M.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BV-FC8tM.js} +2 -2
  10. package/dist/{Ingredient-E4dxFuRx.js → Ingredient-CnPQ0kiR.js} +5 -5
  11. package/dist/{LinkProductSideSheet-CN4VpQoC.js → LinkProductSideSheet-A26Otbdm.js} +9 -9
  12. package/dist/{PrintRoute-Cp9qAt37.js → PrintRoute-BlJMdPP0.js} +3 -3
  13. package/dist/{Product-CukHHpY7.js → Product-BvD813LL.js} +1 -1
  14. package/dist/{Product.vue_vue_type_script_setup_true_lang-Bwlojikf.js → Product.vue_vue_type_script_setup_true_lang-D_oKtXbh.js} +251 -247
  15. package/dist/{Products----2Vzee.js → Products-B8Ok-bkN.js} +8 -8
  16. package/dist/{Publish-CTL7_VDW.js → Publish-qBiJUQ4X.js} +33 -33
  17. package/dist/{Recipe-C71_p_4o.js → Recipe-CJxJJAUV.js} +34 -34
  18. package/dist/{Scheduler-CMY10OCN.js → Scheduler-DfAMwXCu.js} +2 -2
  19. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-DIyqCShi.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-CArE_Hua.js} +1 -1
  20. package/dist/ServingSequence-DxDMeto7.js +4 -0
  21. package/dist/{Setting-N_IomrUQ.js → Setting-BbgJcWsN.js} +1 -1
  22. package/dist/{Setting.vue_vue_type_script_setup_true_lang-BTiZlc2E.js → Setting.vue_vue_type_script_setup_true_lang-BbVEzNve.js} +3 -3
  23. package/dist/{Takeaway-C6wwnu5v.js → Takeaway-CMDFYeUw.js} +1 -1
  24. package/dist/{Takeaway-DThy6R7w.js → Takeaway-wAXsZQN2.js} +4 -4
  25. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CrIDoLuT.js → Takeaway.vue_vue_type_script_setup_true_lang-DSphRs_i.js} +4 -4
  26. package/dist/{TaxSetting-f09g9uzO.js → TaxSetting-C1XOTv-9.js} +4 -4
  27. package/dist/{Unit-DpN-cIoI.js → Unit-BW3iqgp8.js} +2 -2
  28. package/dist/{Variant-DVj3Rl1M.js → Variant-BJIxp9PJ.js} +2 -2
  29. package/dist/{_id_-D_LlvKj8.js → _id_-B25OxuPV.js} +6 -6
  30. package/dist/{app-Cn8ejMq2.js → app-BFJlAowN.js} +63563 -80078
  31. package/dist/app.js +2 -2
  32. package/dist/assets/linked-status-4i88AmvK.js +24 -0
  33. package/dist/assets/validate-menu-CTKwgXfw.js +24 -0
  34. package/dist/{catalog-DYe86x7O.js → catalog-B-Z6lEFK.js} +1 -1
  35. package/dist/{catalog-B4hTLUkg.js → catalog-Do7RfIKm.js} +22510 -22511
  36. package/dist/{category-Cn9bav8Y.js → category-DEWEor3m.js} +14 -14
  37. package/dist/{currency-ak89ne8W.js → currency-33gUke3q.js} +1 -1
  38. package/dist/{index-B-PHXxgb.js → index-BEdHzZvu.js} +44 -44
  39. package/dist/index-BXl09ebx.js +21908 -0
  40. package/dist/{item-CtPBj2_Y.js → item-BooojPpg.js} +930 -930
  41. package/dist/{lodash-QRXx-M3X.js → lodash-247YxYiQ.js} +439 -439
  42. package/dist/{menu-DyHXKzGq.js → menu-DCnWrgH7.js} +1 -1
  43. package/dist/{object-DrR2KRA7.js → object-B2cP_UeG.js} +19 -19
  44. package/dist/{scheduler-C8HLf4JH.js → scheduler-0cChIv2I.js} +4 -4
  45. package/dist/{takeaway-D1YMjOoE.js → takeaway-mwqVQ1ij.js} +4 -4
  46. package/dist/{toExcel-CeOvEnsu.js → toExcel-Dha8Vf3u.js} +237 -237
  47. package/dist/{unit-DJPAcXZf.js → unit-BgfdgXAu.js} +3 -3
  48. package/dist/{vuedraggable-WU01qJgi.js → vuedraggable-BEszc36M.js} +110 -110
  49. package/package.json +3 -3
  50. package/dist/ServingSequence-C6L1_ijp.js +0 -4
  51. package/dist/assets/linked-status-CcasRdDR.js +0 -24
  52. package/dist/assets/validate-menu-Dsx_6ljN.js +0 -24
  53. package/dist/index-D1sxBB7B.js +0 -7392
@@ -1,32 +1,32 @@
1
- import { defineStore as zi } from "pinia";
2
- import { b as L, h as be, G as dn, H as mn, I as hn, d as ae, m as ye, c as _e, J as Fi, u as me, K as pi, L as pn, M as Te, N as lt, a as Ye, i as He, O as Ht, P as Ot, g as ut, n as fn, y as gn, Q as vn, z as bn, F as yn, l as _n, S as fi, T as wn } from "./app-Cn8ejMq2.js";
3
- import { useDialog as Ue, useSnackbar as Le, components as ke, useDialogChild as Ei, FmButtonVariant as Be, FmButtonColorThemeVariant as $e, useBreakpoints as Ii } from "@feedmepos/ui-library";
4
- import { C as Pe } from "./catalog-DYe86x7O.js";
5
- import { openBlock as F, createElementBlock as Z, createElementVNode as D, defineComponent as le, computed as T, resolveComponent as B, createVNode as C, unref as p, createBlock as G, renderSlot as he, withCtx as N, Fragment as Re, renderList as Ke, resolveDynamicComponent as yt, withDirectives as Xe, vShow as wt, mergeProps as Pi, withModifiers as St, createCommentVNode as ee, ref as q, createTextVNode as _t, toDisplayString as se, normalizeClass as Ee, onMounted as Qe, resolveDirective as Ut, h as ue, watch as Ce, Transition as Sn, onBeforeUnmount as Cn, normalizeProps as Rn, guardReactiveProps as An, normalizeStyle as xn, nextTick as kn, getCurrentInstance as Mn, render as On } from "vue";
1
+ import { defineStore as Fn } from "pinia";
2
+ import { b as L, h as be, G as di, H as mi, I as hi, d as ae, m as ye, c as _e, J as En, u as me, K as fn, L as pi, M as Te, N as lt, a as Ye, i as He, O as Ht, P as Ot, g as ut, n as fi, x as gi, Q as vi, y as bi, F as yi, l as _i, S as gn, T as wi } from "./app-BFJlAowN.js";
3
+ import { useDialog as Ue, useSnackbar as Le, components as ke, useDialogChild as In, FmButtonVariant as Be, FmButtonColorThemeVariant as $e, useBreakpoints as Pn } from "@feedmepos/ui-library";
4
+ import { C as Pe } from "./catalog-B-Z6lEFK.js";
5
+ import { openBlock as F, createElementBlock as Z, createElementVNode as D, defineComponent as le, computed as T, resolveComponent as B, createVNode as C, unref as p, createBlock as G, renderSlot as he, withCtx as N, Fragment as Re, renderList as Ke, resolveDynamicComponent as yt, withDirectives as Xe, vShow as wt, mergeProps as Dn, withModifiers as St, createCommentVNode as ee, ref as q, createTextVNode as _t, toDisplayString as se, normalizeClass as Ee, onMounted as Qe, resolveDirective as Ut, h as ue, watch as Ce, Transition as Si, onBeforeUnmount as Ci, normalizeProps as Ri, guardReactiveProps as Ai, normalizeStyle as xi, nextTick as ki, getCurrentInstance as Mi, render as Oi } from "vue";
6
6
  import { useI18n as ce, useCoreStore as Xt } from "@feedmepos/mf-common";
7
- import { u as zn } from "./category-Cn9bav8Y.js";
8
- import { a as Di, _ as gi } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
9
- import { _ as Ge, a as Fn } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
7
+ import { u as zi } from "./category-DEWEor3m.js";
8
+ import { a as Tn, _ as vn } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
9
+ import { _ as Ge, a as Fi } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
10
10
  import { _ as et } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
11
- import { f as rt } from "./currency-ak89ne8W.js";
12
- import { _ as Je, T as En, l as $t } from "./takeaway-D1YMjOoE.js";
13
- import { V as Ti } from "./vuedraggable-WU01qJgi.js";
14
- import { l as Ne, u as In } from "./lodash-QRXx-M3X.js";
11
+ import { f as rt } from "./currency-33gUke3q.js";
12
+ import { _ as Je, T as Ei, l as $t } from "./takeaway-mwqVQ1ij.js";
13
+ import { d as Un } from "./vuedraggable-BEszc36M.js";
14
+ import { l as Ne, u as Ii } from "./lodash-247YxYiQ.js";
15
15
  import "vue-router";
16
- import { V as vi } from "./index-B-PHXxgb.js";
17
- import { s as Vt, F as Pn } from "./object-DrR2KRA7.js";
18
- import { L as Dn } from "./LinkProductSideSheet-CN4VpQoC.js";
19
- import { useInventoryStore as Ui, InventoryBindingForm as Tn, InventoryBindingSummary as Un } from "@feedmepos/mf-inventory-portal";
20
- import { c as $n } from "./string-DpfFixWH.js";
21
- import { _ as Vn } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CYQnhiBN.js";
22
- const Nn = {
16
+ import { V as bn } from "./index-BEdHzZvu.js";
17
+ import { s as Vt, F as Pi } from "./object-B2cP_UeG.js";
18
+ import { L as Di } from "./LinkProductSideSheet-A26Otbdm.js";
19
+ import { useInventoryStore as $n, InventoryBindingForm as Ti, InventoryBindingSummary as Ui } from "@feedmepos/mf-inventory-portal";
20
+ import { c as $i } from "./string-DpfFixWH.js";
21
+ import { _ as Vi } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Ds2qfY_X.js";
22
+ const Ni = {
23
23
  xmlns: "http://www.w3.org/2000/svg",
24
24
  width: "24",
25
25
  height: "24",
26
26
  fill: "none"
27
27
  };
28
- function Ln(e, i) {
29
- return F(), Z("svg", Nn, i[0] || (i[0] = [
28
+ function Li(e, n) {
29
+ return F(), Z("svg", Ni, n[0] || (n[0] = [
30
30
  D("g", {
31
31
  stroke: "#1C1C1E",
32
32
  "stroke-linecap": "round",
@@ -37,14 +37,14 @@ function Ln(e, i) {
37
37
  ], -1)
38
38
  ]));
39
39
  }
40
- const Bn = { render: Ln }, Kn = {
40
+ const Bi = { render: Li }, Ki = {
41
41
  xmlns: "http://www.w3.org/2000/svg",
42
42
  width: "24",
43
43
  height: "24",
44
44
  fill: "none"
45
45
  };
46
- function Gn(e, i) {
47
- return F(), Z("svg", Kn, i[0] || (i[0] = [
46
+ function Gi(e, n) {
47
+ return F(), Z("svg", Ki, n[0] || (n[0] = [
48
48
  D("path", {
49
49
  fill: "#1C1C1E",
50
50
  d: "M7.6 7.6c.57-.658.9-2.1.9-2.1s.314 1.374.857 2c.572.66 2.143 1 2.143 1s-1.57.198-2.143.857C8.814 9.984 8.5 11.5 8.5 11.5s-.18-1.311-.75-1.91C7.149 8.962 5.5 8.5 5.5 8.5s1.5-.207 2.1-.9M12.2 12.2C13.342 10.885 14 8 14 8s.627 2.747 1.714 4C16.86 13.32 20 14 20 14s-3.141.395-4.286 1.714C14.627 16.967 14 20 14 20s-.358-2.622-1.5-3.818C11.298 14.922 8 14 8 14s2.998-.415 4.2-1.8"
@@ -58,20 +58,20 @@ function Gn(e, i) {
58
58
  }, null, -1)
59
59
  ]));
60
60
  }
61
- const Wn = { render: Gn };
61
+ const Wi = { render: Gi };
62
62
  class vt {
63
- constructor(i, t, n, a) {
64
- this.scheduler = i, this.menuStore = t, this.updateMenu = n, this.dialog = a;
63
+ constructor(n, t, i, a) {
64
+ this.scheduler = n, this.menuStore = t, this.updateMenu = i, this.dialog = a;
65
65
  }
66
66
  async create() {
67
- this.promptDialog().onPrimary(async (i) => {
67
+ this.promptDialog().onPrimary(async (n) => {
68
68
  await this.updateMenu(
69
69
  {
70
70
  module: L.F_MENU_MODULE_V4_KEY.enum.scheduler,
71
71
  operation: be.F_OPERATION_TYPE.create,
72
- data: i
72
+ data: n
73
73
  },
74
- i.name
74
+ n.name
75
75
  );
76
76
  });
77
77
  }
@@ -89,10 +89,10 @@ class vt {
89
89
  );
90
90
  }
91
91
  delete() {
92
- const i = this.scheduler;
93
- i && this.dialog.open({
92
+ const n = this.scheduler;
93
+ n && this.dialog.open({
94
94
  title: "Remove scheduler",
95
- message: `Are you sure to remove ${i.name}?`,
95
+ message: `Are you sure to remove ${n.name}?`,
96
96
  primaryActions: {
97
97
  text: "Remove",
98
98
  close: !0
@@ -106,24 +106,24 @@ class vt {
106
106
  {
107
107
  module: L.F_MENU_MODULE_V4_KEY.enum.scheduler,
108
108
  operation: be.F_OPERATION_TYPE.delete,
109
- data: i._id
109
+ data: n._id
110
110
  },
111
- i.name,
111
+ n.name,
112
112
  !0
113
113
  );
114
114
  });
115
115
  }
116
- getSchedulerGroup(i) {
117
- return this.scheduler ? this.scheduler.groups.find((t) => t._id === i) ?? {
118
- _id: i,
116
+ getSchedulerGroup(n) {
117
+ return this.scheduler ? this.scheduler.groups.find((t) => t._id === n) ?? {
118
+ _id: n,
119
119
  groupKey: ""
120
120
  } : null;
121
121
  }
122
- overrideSchedulerGroups(i) {
122
+ overrideSchedulerGroups(n) {
123
123
  if (!this.scheduler) return null;
124
- const t = this.scheduler.groups, n = i.map((o) => o._id), a = [
125
- ...t.filter((o) => !n.includes(o._id)),
126
- ...i.map((o) => ({
124
+ const t = this.scheduler.groups, i = n.map((o) => o._id), a = [
125
+ ...t.filter((o) => !i.includes(o._id)),
126
+ ...n.map((o) => ({
127
127
  _id: o._id,
128
128
  groupKey: "",
129
129
  items: o.items
@@ -132,14 +132,14 @@ class vt {
132
132
  this.scheduler = { ...this.scheduler, groups: a };
133
133
  }
134
134
  injectSchedulerToMenu() {
135
- const i = this.scheduler;
136
- if (!i) return null;
137
- const t = this.menuStore.state.menu, n = t.modules.scheduler.map((a) => a._id === i._id ? i : a);
135
+ const n = this.scheduler;
136
+ if (!n) return null;
137
+ const t = this.menuStore.state.menu, i = t.modules.scheduler.map((a) => a._id === n._id ? n : a);
138
138
  return {
139
139
  ...t,
140
140
  modules: {
141
141
  ...t.modules,
142
- scheduler: n
142
+ scheduler: i
143
143
  }
144
144
  };
145
145
  }
@@ -161,31 +161,31 @@ class vt {
161
161
  text: "Cancel",
162
162
  close: !0
163
163
  }
164
- }).onPrimary(async (n) => {
165
- this.updateItemAvailable(n.map((a) => a._id));
164
+ }).onPrimary(async (i) => {
165
+ this.updateItemAvailable(i.map((a) => a._id));
166
166
  });
167
167
  }
168
- async unlinkProduct(i) {
168
+ async unlinkProduct(n) {
169
169
  if (!this.scheduler) return;
170
- const n = this.getItemAvailable();
171
- if (!n) return;
172
- const a = n.filter((o) => !i.includes(o));
170
+ const i = this.getItemAvailable();
171
+ if (!i) return;
172
+ const a = i.filter((o) => !n.includes(o));
173
173
  this.updateItemAvailable(a);
174
174
  }
175
175
  async updateScheduler() {
176
- const i = this.scheduler;
177
- i && this.promptDialog(i).onPrimary(async (t) => {
178
- const n = {
176
+ const n = this.scheduler;
177
+ n && this.promptDialog(n).onPrimary(async (t) => {
178
+ const i = {
179
179
  ...t,
180
- items: i.items
180
+ items: n.items
181
181
  };
182
- this.scheduler = n, this.updateItemAvailable(t.items.map((a) => a._id));
182
+ this.scheduler = i, this.updateItemAvailable(t.items.map((a) => a._id));
183
183
  });
184
184
  }
185
- async overrideScheduler(i) {
185
+ async overrideScheduler(n) {
186
186
  const t = this.scheduler;
187
187
  if (!t) return;
188
- const n = this.menuStore.catalogs.find((l) => l._id === i), a = new Pe(n, this.menuStore, this.updateMenu, this.dialog), o = a.getCatalogScheduler(t._id);
188
+ const i = this.menuStore.catalogs.find((l) => l._id === n), a = new Pe(i, this.menuStore, this.updateMenu, this.dialog), o = a.getCatalogScheduler(t._id);
189
189
  if (!o) return;
190
190
  const r = this.menuStore.state.menu.modules.scheduler.find(
191
191
  (l) => l._id === t._id
@@ -193,12 +193,12 @@ class vt {
193
193
  this.promptDialog(
194
194
  o,
195
195
  r,
196
- n == null ? void 0 : n.name
196
+ i == null ? void 0 : i.name
197
197
  ).onPrimary(async (l) => {
198
198
  a.overrideCatalogScheduler(l), await a.update();
199
199
  });
200
200
  }
201
- promptDialog(i, t, n) {
201
+ promptDialog(n, t, i) {
202
202
  return this.menuStore.rules.item.multiScheduler, this.dialog.open({
203
203
  // component: SchedulerDialog,
204
204
  // componentProps: {
@@ -220,30 +220,30 @@ class vt {
220
220
  });
221
221
  }
222
222
  getItemAvailable() {
223
- var n;
223
+ var i;
224
224
  if (!this.scheduler) return null;
225
- const i = this.menuStore.currentCatalog, t = i ? ((n = i.override.scheduler[this.scheduler._id]) == null ? void 0 : n.items) ?? [] : this.scheduler.items;
225
+ const n = this.menuStore.currentCatalog, t = n ? ((i = n.override.scheduler[this.scheduler._id]) == null ? void 0 : i.items) ?? [] : this.scheduler.items;
226
226
  return [
227
227
  ...new Set(t.filter((a) => a.orderFrom != L.F_ORDER_FROM.enum.NONE).map((a) => a._id))
228
228
  ];
229
229
  }
230
- async updateItemAvailable(i) {
230
+ async updateItemAvailable(n) {
231
231
  const t = this.scheduler;
232
232
  if (!t) return;
233
- const n = this.menuStore.currentCatalog;
234
- if (n && this.menuStore.rules.scheduler.override) {
233
+ const i = this.menuStore.currentCatalog;
234
+ if (i && this.menuStore.rules.scheduler.override) {
235
235
  const a = new Pe(
236
- n,
236
+ i,
237
237
  this.menuStore,
238
238
  this.updateMenu,
239
239
  this.dialog
240
240
  );
241
- a.overrideCatalogSchedulerItems(i, t._id), await a.update();
241
+ a.overrideCatalogSchedulerItems(n, t._id), await a.update();
242
242
  } else {
243
- const a = i.reduce((r, l) => {
243
+ const a = n.reduce((r, l) => {
244
244
  const s = t.items.filter((u) => u._id == l) ?? [];
245
245
  return r = r.concat(
246
- dn(l, s, (u) => ({
246
+ di(l, s, (u) => ({
247
247
  ...u,
248
248
  orderFrom: null
249
249
  }))
@@ -256,30 +256,30 @@ class vt {
256
256
  }
257
257
  }
258
258
  getAvailableItemForLink() {
259
- const i = mn(
259
+ const n = mi(
260
260
  this.menuStore.variants,
261
261
  this.menuStore.categories,
262
- hn(this.menuStore.state.menu.modules.item, (a) => a.code || a.name)
262
+ hi(this.menuStore.state.menu.modules.item, (a) => a.code || a.name)
263
263
  ), t = new Set(
264
264
  this.menuStore.currentCatalog ? Pe.getItemAvailable(this.menuStore.currentCatalog) : this.menuStore.state.menu.modules.item.map((a) => a._id)
265
265
  );
266
- return i.map((a) => ({
266
+ return n.map((a) => ({
267
267
  ...a,
268
268
  items: a.items.filter((o) => t.has(o._id))
269
269
  })).filter((a) => a.items.length > 0);
270
270
  }
271
271
  }
272
- function Ct(e, i) {
273
- for (const t of i) {
274
- const n = e.find((a) => a._id === t._id);
275
- if (n != null && n.isDynamicAddon || t.isDynamicAddon) return L.F_ADDON_GROUP_TYPE.enum.DYNAMIC;
276
- if (n != null && n.category) return L.F_ADDON_GROUP_TYPE.enum.PRODUCT;
272
+ function Ct(e, n) {
273
+ for (const t of n) {
274
+ const i = e.find((a) => a._id === t._id);
275
+ if (i != null && i.isDynamicAddon || t.isDynamicAddon) return L.F_ADDON_GROUP_TYPE.enum.DYNAMIC;
276
+ if (i != null && i.category) return L.F_ADDON_GROUP_TYPE.enum.PRODUCT;
277
277
  }
278
278
  return L.F_ADDON_GROUP_TYPE.enum.NORMAL;
279
279
  }
280
- function jn(e) {
281
- return [...new Set(e.map((t) => t._id))].reduce((t, n) => {
282
- const a = e.filter((l) => l._id === n), { base: o, variants: r } = a.reduce(
280
+ function ji(e) {
281
+ return [...new Set(e.map((t) => t._id))].reduce((t, i) => {
282
+ const a = e.filter((l) => l._id === i), { base: o, variants: r } = a.reduce(
283
283
  (l, s) => {
284
284
  if (!s.combinationKey)
285
285
  l.base = s;
@@ -294,8 +294,8 @@ function jn(e) {
294
294
  variants: []
295
295
  }
296
296
  );
297
- return t[n] = {
298
- _id: n,
297
+ return t[i] = {
298
+ _id: i,
299
299
  code: o.code,
300
300
  name: o.name,
301
301
  price: o.price,
@@ -311,22 +311,22 @@ function jn(e) {
311
311
  }, {});
312
312
  }
313
313
  function qt(e) {
314
- const i = Object.values(e.items).reduce((t, n) => (t.push({
315
- _id: n._id,
316
- name: n.name,
317
- price: n.price,
318
- orderFrom: n.orderFrom,
319
- selection: n.selection,
320
- inventoryBindings: n.inventoryBindings,
321
- isDynamicAddon: n.isDynamicAddon
322
- }), t = t.concat((n == null ? void 0 : n.items) || []), t), []);
314
+ const n = Object.values(e.items).reduce((t, i) => (t.push({
315
+ _id: i._id,
316
+ name: i.name,
317
+ price: i.price,
318
+ orderFrom: i.orderFrom,
319
+ selection: i.selection,
320
+ inventoryBindings: i.inventoryBindings,
321
+ isDynamicAddon: i.isDynamicAddon
322
+ }), t = t.concat((i == null ? void 0 : i.items) || []), t), []);
323
323
  return {
324
324
  ...e,
325
- items: i
325
+ items: n
326
326
  };
327
327
  }
328
- function $i(e) {
329
- 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) => ({
328
+ function Vn(e) {
329
+ const n = qt(e), t = (o) => ["product", "item", "addonGroup", "group"].some((r) => o._id.startsWith(r)), i = n.items.filter((o) => t(o)), a = n.items.filter((o) => !t(o)).map((o) => ({
330
330
  ...ye.generator.initMenuV4Item(),
331
331
  ...o,
332
332
  code: o.code ?? "",
@@ -338,35 +338,35 @@ function $i(e) {
338
338
  }));
339
339
  return {
340
340
  group: {
341
- ...i,
342
- items: n
341
+ ...n,
342
+ items: i
343
343
  },
344
344
  linkItems: a
345
345
  };
346
346
  }
347
- class Vi {
348
- constructor(i, t, n) {
349
- this.menuStore = i, this.updateMenu = t, this.dialog = n;
347
+ class Nn {
348
+ constructor(n, t, i) {
349
+ this.menuStore = n, this.updateMenu = t, this.dialog = i;
350
350
  }
351
- getFallbackPrices(i) {
352
- const t = this.menuStore.currentCatalog, n = this.menuStore.currentScheduler, a = new Pe(t, this.menuStore, this.updateMenu, this.dialog), o = new vt(
353
- n,
351
+ getFallbackPrices(n) {
352
+ const t = this.menuStore.currentCatalog, i = this.menuStore.currentScheduler, a = new Pe(t, this.menuStore, this.updateMenu, this.dialog), o = new vt(
353
+ i,
354
354
  this.menuStore,
355
355
  this.updateMenu,
356
356
  this.dialog
357
357
  );
358
358
  let r = ae(this.menuStore.state.menu);
359
359
  if (t)
360
- n ? a.overrideCatalogSchedulerGroups(i, n._id) : a.overrideCatalogGroups(i), r = a.injectCatalogToMenu();
361
- else if (n)
362
- o.overrideSchedulerGroups(i), r = o.injectSchedulerToMenu();
360
+ i ? a.overrideCatalogSchedulerGroups(n, i._id) : a.overrideCatalogGroups(n), r = a.injectCatalogToMenu();
361
+ else if (i)
362
+ o.overrideSchedulerGroups(n), r = o.injectSchedulerToMenu();
363
363
  else {
364
364
  r = {
365
365
  ...r,
366
366
  modules: {
367
367
  ...r.modules,
368
368
  group: r == null ? void 0 : r.modules.group.reduce((s, u) => {
369
- const d = i.find((m) => m._id === u._id);
369
+ const d = n.find((m) => m._id === u._id);
370
370
  if (!d)
371
371
  return s = [...s, u], s;
372
372
  const h = d.items.filter(
@@ -384,8 +384,8 @@ class Vi {
384
384
  }, [])
385
385
  }
386
386
  };
387
- for (let s = 0; s < i.length; s++) {
388
- const u = i[s];
387
+ for (let s = 0; s < n.length; s++) {
388
+ const u = n[s];
389
389
  !(r == null ? void 0 : r.modules.group.find((h) => {
390
390
  h._id, u._id;
391
391
  })) && !u._id && r.modules.group.push(u);
@@ -393,13 +393,13 @@ class Vi {
393
393
  }
394
394
  return r ? ye.getFallbackPrices({
395
395
  catalogId: t == null ? void 0 : t._id,
396
- schedulerId: n == null ? void 0 : n._id,
396
+ schedulerId: i == null ? void 0 : i._id,
397
397
  rawMenu: r,
398
- groups: i.reduce((s, u) => (s[u._id] = { ...u, groupKey: "" }, s), {})
398
+ groups: n.reduce((s, u) => (s[u._id] = { ...u, groupKey: "" }, s), {})
399
399
  }).groups : {};
400
400
  }
401
- mapGroups(i, t) {
402
- const n = this.getFallbackPrices(i), a = this.menuStore.state.menu.modules.item, o = this.menuStore.state.menu.modules.group, r = this.menuStore.items;
401
+ mapGroups(n, t) {
402
+ const i = this.getFallbackPrices(n), a = this.menuStore.state.menu.modules.item, o = this.menuStore.state.menu.modules.group, r = this.menuStore.items;
403
403
  function l(s, u) {
404
404
  const d = s.items.reduce((m, c) => {
405
405
  var E, P, A, _;
@@ -409,7 +409,7 @@ class Vi {
409
409
  ...(E = y == null ? void 0 : y.variant) == null ? void 0 : E.variantCombinations.find(
410
410
  (R) => R.combinationKey === c.combinationKey
411
411
  ),
412
- name: Fi(me().variants, ((P = y == null ? void 0 : y.variant) == null ? void 0 : P.variantGroupIds) || [])[c.combinationKey]
412
+ name: En(me().variants, ((P = y == null ? void 0 : y.variant) == null ? void 0 : P.variantGroupIds) || [])[c.combinationKey]
413
413
  } : y, g = (A = o.find((R) => R._id === s._id)) == null ? void 0 : A.items.find((R) => R._id === c._id && R.combinationKey === c.combinationKey), w = !t && !c.combinationKey, z = (_ = u.find(
414
414
  (R) => R._id == c._id && R.combinationKey == c.combinationKey
415
415
  )) == null ? void 0 : _.price, O = c.name ?? (g == null ? void 0 : g.name) ?? (v == null ? void 0 : v.name) ?? "", I = {
@@ -427,35 +427,35 @@ class Vi {
427
427
  return {
428
428
  ...s,
429
429
  type: h,
430
- items: jn(d),
430
+ items: ji(d),
431
431
  itemsLinked: r.filter((m) => m.groups.some(({ _id: c }) => c === s._id)).map((m) => m._id)
432
432
  };
433
433
  }
434
- return i.map((s) => {
434
+ return n.map((s) => {
435
435
  var u;
436
- return l(s, ((u = n[s._id]) == null ? void 0 : u.items) ?? []);
436
+ return l(s, ((u = i[s._id]) == null ? void 0 : u.items) ?? []);
437
437
  });
438
438
  }
439
- async sortGroups(i) {
439
+ async sortGroups(n) {
440
440
  const t = {
441
441
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
442
442
  operation: be.F_OPERATION_TYPE.rearrange,
443
- data: i.map((n) => n._id)
443
+ data: n.map((i) => i._id)
444
444
  };
445
445
  await this.updateMenu(t, "Groups");
446
446
  }
447
- async duplicateGroup(i) {
448
- const t = ae(i);
449
- i.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT || (t.items = Object.entries(t.items).reduce((r, [l, s]) => (r[l] = {
447
+ async duplicateGroup(n) {
448
+ const t = ae(n);
449
+ n.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT || (t.items = Object.entries(t.items).reduce((r, [l, s]) => (r[l] = {
450
450
  ...s,
451
451
  items: (s.items ?? []).map((u) => ({ ...u, _id: "" }))
452
452
  }, r), {}));
453
- const a = $i(t), o = {
453
+ const a = Vn(t), o = {
454
454
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
455
455
  operation: be.F_OPERATION_TYPE.create,
456
456
  data: {
457
457
  ...a.group,
458
- name: `${i.name} clone`
458
+ name: `${n.name} clone`
459
459
  },
460
460
  link: [
461
461
  {
@@ -467,26 +467,26 @@ class Vi {
467
467
  };
468
468
  await this.updateMenu(o, a.group.name);
469
469
  }
470
- async deleteGroup(i) {
470
+ async deleteGroup(n) {
471
471
  const t = {
472
472
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
473
473
  operation: be.F_OPERATION_TYPE.delete,
474
- data: i._id
474
+ data: n._id
475
475
  };
476
- await this.updateMenu(t, i.name);
476
+ await this.updateMenu(t, n.name);
477
477
  }
478
- async applyItems(i, t) {
479
- function n(s, u) {
480
- const d = s.filter((m) => m._id === i._id), h = s.filter((m) => m._id !== i._id);
481
- return u ? h : [...h, ...d.length ? d : [{ _id: i._id, groupKey: "" }]];
478
+ async applyItems(n, t) {
479
+ function i(s, u) {
480
+ const d = s.filter((m) => m._id === n._id), h = s.filter((m) => m._id !== n._id);
481
+ return u ? h : [...h, ...d.length ? d : [{ _id: n._id, groupKey: "" }]];
482
482
  }
483
483
  function a(s, u, d) {
484
484
  var c;
485
- const h = n(u.groups, d), m = (((c = u.variant) == null ? void 0 : c.variantCombinations) ?? []).map((y) => {
486
- const v = n(y.groups ?? [], d);
485
+ const h = i(u.groups, d), m = (((c = u.variant) == null ? void 0 : c.variantCombinations) ?? []).map((y) => {
486
+ const v = i(y.groups ?? [], d);
487
487
  return { ...y, groups: v };
488
488
  });
489
- return un(s, {
489
+ return ui(s, {
490
490
  ...u,
491
491
  groups: h,
492
492
  variant: u.variant ? {
@@ -495,7 +495,7 @@ class Vi {
495
495
  } : null
496
496
  });
497
497
  }
498
- const o = i.itemsLinked, l = [.../* @__PURE__ */ new Set([...t, ...o])].map((s) => {
498
+ const o = n.itemsLinked, l = [.../* @__PURE__ */ new Set([...t, ...o])].map((s) => {
499
499
  const u = this.menuStore.state.menu.modules.item.find(
500
500
  (d) => d._id === s
501
501
  );
@@ -506,20 +506,20 @@ class Vi {
506
506
  data: a(this.menuStore, u, !t.includes(s))
507
507
  };
508
508
  });
509
- await this.updateMenu(l, i.name);
509
+ await this.updateMenu(l, n.name);
510
510
  }
511
511
  isOverride() {
512
512
  return !!this.menuStore.state.currentCatalogId || !!this.menuStore.state.currentSchedulerId;
513
513
  }
514
514
  }
515
- const Yn = "/assets/linked-status-CcasRdDR.js";
516
- function Hn(e) {
517
- var n;
518
- const i = ae(e), t = (n = i.variant) == null ? void 0 : n.variantCombinations;
519
- return delete i.variant, delete i.thumbnail, [i, ...t || []];
515
+ const Yi = "/assets/linked-status-4i88AmvK.js";
516
+ function Hi(e) {
517
+ var i;
518
+ const n = ae(e), t = (i = n.variant) == null ? void 0 : i.variantCombinations;
519
+ return delete n.variant, delete n.thumbnail, [n, ...t || []];
520
520
  }
521
- function Xn(e, i, t, n) {
522
- const a = ae(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 ? ae(o) : void 0, s = t ? a.modules.catalog.filter((m) => m._id !== t) : [], u = r ? ae(r) : void 0, d = e.reduce((m, c) => (m[c._id] = Hn(c), m), {});
521
+ function Xi(e, n, t, i) {
522
+ const a = ae(n), o = t ? a.modules.catalog.find((m) => m._id === t) : null, r = i ? a.modules.scheduler.find((m) => m._id === i) : null, l = o ? ae(o) : void 0, s = t ? a.modules.catalog.filter((m) => m._id !== t) : [], u = r ? ae(r) : void 0, d = e.reduce((m, c) => (m[c._id] = Hi(c), m), {});
523
523
  function h(m = []) {
524
524
  const c = e.map((y) => y._id);
525
525
  return [
@@ -527,11 +527,11 @@ function Xn(e, i, t, n) {
527
527
  ...Object.values(d).flatMap((y) => y)
528
528
  ];
529
529
  }
530
- return l && n ? (l.override.scheduler = {
530
+ return l && i ? (l.override.scheduler = {
531
531
  ...l.override.scheduler,
532
- [n]: {
533
- ...l.override.scheduler[n],
534
- _id: n,
532
+ [i]: {
533
+ ...l.override.scheduler[i],
534
+ _id: i,
535
535
  items: h(u == null ? void 0 : u.items).map((m) => ({
536
536
  ...m,
537
537
  orderFrom: L.F_ORDER_FROM.enum.ALL
@@ -541,12 +541,12 @@ function Xn(e, i, t, n) {
541
541
  ...l.override.items,
542
542
  ...d
543
543
  }, a.modules.catalog = [...s, l], a) : u ? (u.items = h(u.items), a.modules.scheduler = [
544
- ...a.modules.scheduler.filter((m) => m._id !== n),
544
+ ...a.modules.scheduler.filter((m) => m._id !== i),
545
545
  u
546
546
  ], a) : {
547
- ...pi(),
547
+ ...fn(),
548
548
  modules: {
549
- ...pi().modules,
549
+ ...fn().modules,
550
550
  catalog: a.modules.catalog,
551
551
  item: a.modules.item,
552
552
  group: a.modules.group,
@@ -555,13 +555,13 @@ function Xn(e, i, t, n) {
555
555
  _id: a._id
556
556
  };
557
557
  }
558
- function ot(e, i, t) {
558
+ function ot(e, n, t) {
559
559
  var o;
560
560
  if (t >= 3) return e;
561
- const n = i.modules.item.find((r) => r._id === e._id);
562
- if (!n)
561
+ const i = n.modules.item.find((r) => r._id === e._id);
562
+ if (!i)
563
563
  throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
564
- const a = (o = n.groups) == null ? void 0 : o.map((r) => {
564
+ const a = (o = i.groups) == null ? void 0 : o.map((r) => {
565
565
  var u, d, h;
566
566
  const l = (u = e == null ? void 0 : e.groups) == null ? void 0 : u.find((m) => m._id === r._id);
567
567
  let s;
@@ -570,54 +570,54 @@ function ot(e, i, t) {
570
570
  const c = (y = l.items) == null ? void 0 : y.find(
571
571
  (v) => v._id === m._id && v.combinationKey === m.combinationKey
572
572
  );
573
- return ot(c || m, i, t + 1);
574
- })) ?? [] : s = ((h = r.items) == null ? void 0 : h.map((m) => ot(m, i, t + 1))) ?? [], {
573
+ return ot(c || m, n, t + 1);
574
+ })) ?? [] : s = ((h = r.items) == null ? void 0 : h.map((m) => ot(m, n, t + 1))) ?? [], {
575
575
  ...r,
576
576
  items: s
577
577
  };
578
578
  });
579
579
  return {
580
- _id: n._id,
581
- name: e.name || n.name,
582
- code: e.code || n.code,
580
+ _id: i._id,
581
+ name: e.name || i.name,
582
+ code: e.code || i.code,
583
583
  combinationKey: e.combinationKey,
584
584
  groups: a
585
585
  };
586
586
  }
587
- function qn(e, i) {
587
+ function qi(e, n) {
588
588
  const t = e.groups.map((o) => {
589
- const r = i.modules.group.find((s) => s._id === o._id), l = ((r == null ? void 0 : r.items) || []).map((s) => {
589
+ const r = n.modules.group.find((s) => s._id === o._id), l = ((r == null ? void 0 : r.items) || []).map((s) => {
590
590
  var h;
591
591
  const u = (h = o.items) == null ? void 0 : h.find(
592
592
  (m) => m._id === s._id && m.combinationKey === s.combinationKey
593
593
  );
594
594
  if (u)
595
- return ot(u, i, 1);
595
+ return ot(u, n, 1);
596
596
  const d = {
597
597
  ...ye.generator.initMenuV4ItemOverrider(),
598
598
  _id: s._id,
599
599
  combinationKey: s.combinationKey
600
600
  };
601
- return ot(d, i, 1);
601
+ return ot(d, n, 1);
602
602
  });
603
603
  return { ...o, items: l };
604
- }), n = e.variant ? e.variant.variantCombinations.map((o) => ot(o, i, 1)) : [], a = {
604
+ }), i = e.variant ? e.variant.variantCombinations.map((o) => ot(o, n, 1)) : [], a = {
605
605
  ...ye.generator.initMenuV4ItemOverrider(),
606
606
  _id: e._id,
607
607
  name: e.name,
608
608
  code: e.code,
609
609
  groups: t
610
610
  };
611
- return [...n, a];
611
+ return [...i, a];
612
612
  }
613
- function Nt(e, i) {
614
- var n;
615
- if (!i)
613
+ function Nt(e, n) {
614
+ var i;
615
+ if (!n)
616
616
  return e;
617
- const t = { ...e, code: i.code };
618
- return t.groups = (n = t.groups) == null ? void 0 : n.map((a) => {
617
+ const t = { ...e, code: n.code };
618
+ return t.groups = (i = t.groups) == null ? void 0 : i.map((a) => {
619
619
  var r, l;
620
- const o = (r = i.groups) == null ? void 0 : r.find((s) => s._id === a._id);
620
+ const o = (r = n.groups) == null ? void 0 : r.find((s) => s._id === a._id);
621
621
  return a.items = (l = a.items) == null ? void 0 : l.map((s) => {
622
622
  var d;
623
623
  const u = (d = o == null ? void 0 : o.items) == null ? void 0 : d.find(
@@ -627,11 +627,11 @@ function Nt(e, i) {
627
627
  }), a;
628
628
  }), t;
629
629
  }
630
- function Zn(e, i) {
631
- const t = e.items[i._id];
632
- i.variant && (i.variant = {
633
- ...i.variant,
634
- variantCombinations: i.variant.variantCombinations.map((a) => {
630
+ function Zi(e, n) {
631
+ const t = e.items[n._id];
632
+ n.variant && (n.variant = {
633
+ ...n.variant,
634
+ variantCombinations: n.variant.variantCombinations.map((a) => {
635
635
  const o = t.find(
636
636
  (r) => r._id === a._id && r.combinationKey === a.combinationKey
637
637
  );
@@ -640,12 +640,12 @@ function Zn(e, i) {
640
640
  return Nt(o, a);
641
641
  })
642
642
  });
643
- const n = t.find((a) => !a.combinationKey);
644
- if (!n)
645
- throw new Error(`Base item overrider not found - ${i._id}`);
646
- return i.groups = (n.groups || []).map((a) => {
643
+ const i = t.find((a) => !a.combinationKey);
644
+ if (!i)
645
+ throw new Error(`Base item overrider not found - ${n._id}`);
646
+ return n.groups = (i.groups || []).map((a) => {
647
647
  var r;
648
- const o = i.groups.find((l) => l._id === a._id);
648
+ const o = n.groups.find((l) => l._id === a._id);
649
649
  return a.items = (r = a.items) == null ? void 0 : r.map((l) => {
650
650
  var u;
651
651
  const s = (u = o == null ? void 0 : o.items) == null ? void 0 : u.find(
@@ -654,34 +654,34 @@ function Zn(e, i) {
654
654
  return Nt(l, s);
655
655
  }), a;
656
656
  }), {
657
- ...i,
658
- price: (n == null ? void 0 : n.price) || i.price
657
+ ...n,
658
+ price: (i == null ? void 0 : i.price) || n.price
659
659
  };
660
660
  }
661
- async function Qn(e, i, t, n, a, o = !0) {
662
- const r = ae(t), l = o ? Xn(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) => {
661
+ async function Qi(e, n, t, i, a, o = !0) {
662
+ const r = ae(t), l = o ? Xi(n, r, i, a) : r, s = n.reduce((h, m) => (h[m._id] = l.modules.item.find((c) => c._id === m._id), h), {}), u = n.reduce((h, m) => {
663
663
  const c = m._id;
664
- return h[c] = qn(s[c], e), h;
664
+ return h[c] = qi(s[c], e), h;
665
665
  }, {}), d = ye.getFallbackPrices({
666
666
  rawMenu: l,
667
667
  items: u,
668
- catalogId: n || void 0,
668
+ catalogId: i || void 0,
669
669
  schedulerId: a
670
670
  });
671
- return i.map((h) => {
671
+ return n.map((h) => {
672
672
  const m = h._id, c = s[m];
673
673
  return {
674
- ...Zn(d, c),
675
- category: n || a ? c == null ? void 0 : c.category : null
674
+ ...Zi(d, c),
675
+ category: i || a ? c == null ? void 0 : c.category : null
676
676
  };
677
677
  });
678
678
  }
679
- function Ni(e, i) {
679
+ function Ln(e, n) {
680
680
  if (e.length === 0) return "";
681
681
  const t = e == null ? void 0 : e.split("variant");
682
682
  return ((t == null ? void 0 : t.reduce((a, o) => {
683
683
  if (o && o.length > 0) {
684
- const r = `variant${o.split("/")[0]}`, l = o.split("/")[1], u = i.find(
684
+ const r = `variant${o.split("/")[0]}`, l = o.split("/")[1], u = n.find(
685
685
  ({ _id: d }) => d === r
686
686
  ).options.find(({ _id: d }) => d === l);
687
687
  a.push(((u == null ? void 0 : u.name) || "").trim());
@@ -690,18 +690,18 @@ function Ni(e, i) {
690
690
  }, [])) || []).join(" / ");
691
691
  }
692
692
  const zt = /* @__PURE__ */ new Map();
693
- async function Jn(e, i) {
694
- const t = `${e._id}-${e.updatedAt}-${i}`;
693
+ async function Ji(e, n) {
694
+ const t = `${e._id}-${e.updatedAt}-${n}`;
695
695
  if (zt.has(t))
696
696
  return zt.get(t);
697
- const n = await pn(
698
- Yn,
697
+ const i = await pi(
698
+ Yi,
699
699
  JSON.stringify({
700
700
  menu: e,
701
- itemId: i
701
+ itemId: n
702
702
  })
703
703
  );
704
- return zt.set(t, n), n;
704
+ return zt.set(t, i), i;
705
705
  }
706
706
  const Zt = /* @__PURE__ */ le({
707
707
  __name: "OrderFrom",
@@ -744,18 +744,18 @@ const Zt = /* @__PURE__ */ le({
744
744
  }
745
745
  },
746
746
  emits: ["update:model-value"],
747
- setup(e, { emit: i }) {
748
- const t = e, { t: n } = ce(), a = i, o = T(() => ({
747
+ setup(e, { emit: n }) {
748
+ const t = e, { t: i } = ce(), a = n, o = T(() => ({
749
749
  ALL: {
750
- label: n("menu.order.from.options.all"),
750
+ label: i("menu.order.from.options.all"),
751
751
  value: L.F_ORDER_FROM.enum.ALL
752
752
  },
753
753
  POS_ONLY: {
754
- label: n("menu.order.from.options.pos_only"),
754
+ label: i("menu.order.from.options.pos_only"),
755
755
  value: L.F_ORDER_FROM.enum.POS_ONLY
756
756
  },
757
757
  NONE: {
758
- label: n("menu.order.from.options.none"),
758
+ label: i("menu.order.from.options.none"),
759
759
  value: L.F_ORDER_FROM.enum.NONE
760
760
  }
761
761
  })), r = T(() => {
@@ -785,10 +785,10 @@ const Zt = /* @__PURE__ */ le({
785
785
  C(h, {
786
786
  disabled: e.disable,
787
787
  items: r.value,
788
- label: e.label ?? p(n)("menu.common.labels.order_from"),
788
+ label: e.label ?? p(i)("menu.common.labels.order_from"),
789
789
  "menu-z-index": e.menuZIndex,
790
790
  "model-value": s.value,
791
- rules: e.required ? [(m) => !!m || p(n)("menu.common.validation.required_field")] : [],
791
+ rules: e.required ? [(m) => !!m || p(i)("menu.common.validation.required_field")] : [],
792
792
  "shift-menu": "",
793
793
  "onUpdate:modelValue": d[0] || (d[0] = (m) => a("update:model-value", m ?? null))
794
794
  }, null, 8, ["disabled", "items", "label", "menu-z-index", "model-value", "rules"])
@@ -796,134 +796,134 @@ const Zt = /* @__PURE__ */ le({
796
796
  };
797
797
  }
798
798
  });
799
- var eo = function(e, i) {
800
- return Object.assign(document.createElement("canvas"), { width: e, height: i });
799
+ var eo = function(e, n) {
800
+ return Object.assign(document.createElement("canvas"), { width: e, height: n });
801
801
  };
802
- function bi(e, i) {
802
+ function yn(e, n) {
803
803
  var t = Object.keys(e);
804
804
  if (Object.getOwnPropertySymbols) {
805
- var n = Object.getOwnPropertySymbols(e);
806
- i && (n = n.filter(function(a) {
805
+ var i = Object.getOwnPropertySymbols(e);
806
+ n && (i = i.filter(function(a) {
807
807
  return Object.getOwnPropertyDescriptor(e, a).enumerable;
808
- })), t.push.apply(t, n);
808
+ })), t.push.apply(t, i);
809
809
  }
810
810
  return t;
811
811
  }
812
- function ne(e) {
813
- for (var i = 1; i < arguments.length; i++) {
814
- var t = arguments[i] != null ? arguments[i] : {};
815
- i % 2 ? bi(Object(t), !0).forEach(function(n) {
816
- Ae(e, n, t[n]);
817
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : bi(Object(t)).forEach(function(n) {
818
- Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
812
+ function ie(e) {
813
+ for (var n = 1; n < arguments.length; n++) {
814
+ var t = arguments[n] != null ? arguments[n] : {};
815
+ n % 2 ? yn(Object(t), !0).forEach(function(i) {
816
+ Ae(e, i, t[i]);
817
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : yn(Object(t)).forEach(function(i) {
818
+ Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
819
819
  });
820
820
  }
821
821
  return e;
822
822
  }
823
- function Ae(e, i, t) {
824
- return i in e ? Object.defineProperty(e, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[i] = t, e;
823
+ function Ae(e, n, t) {
824
+ return n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
825
825
  }
826
- function to(e, i) {
826
+ function to(e, n) {
827
827
  if (e == null) return {};
828
- var t, n, a = function(r, l) {
828
+ var t, i, a = function(r, l) {
829
829
  if (r == null) return {};
830
830
  var s, u, d = {}, h = Object.keys(r);
831
831
  for (u = 0; u < h.length; u++) s = h[u], l.indexOf(s) >= 0 || (d[s] = r[s]);
832
832
  return d;
833
- }(e, i);
833
+ }(e, n);
834
834
  if (Object.getOwnPropertySymbols) {
835
835
  var o = Object.getOwnPropertySymbols(e);
836
- for (n = 0; n < o.length; n++) t = o[n], i.indexOf(t) >= 0 || Object.prototype.propertyIsEnumerable.call(e, t) && (a[t] = e[t]);
836
+ for (i = 0; i < o.length; i++) t = o[i], n.indexOf(t) >= 0 || Object.prototype.propertyIsEnumerable.call(e, t) && (a[t] = e[t]);
837
837
  }
838
838
  return a;
839
839
  }
840
840
  function qe(e) {
841
- return function(i) {
842
- if (Array.isArray(i)) return Ft(i);
843
- }(e) || function(i) {
844
- if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i);
845
- }(e) || function(i, t) {
846
- if (i) {
847
- if (typeof i == "string") return Ft(i, t);
848
- var n = Object.prototype.toString.call(i).slice(8, -1);
849
- if (n === "Object" && i.constructor && (n = i.constructor.name), n === "Map" || n === "Set") return Array.from(i);
850
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Ft(i, t);
841
+ return function(n) {
842
+ if (Array.isArray(n)) return Ft(n);
843
+ }(e) || function(n) {
844
+ if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
845
+ }(e) || function(n, t) {
846
+ if (n) {
847
+ if (typeof n == "string") return Ft(n, t);
848
+ var i = Object.prototype.toString.call(n).slice(8, -1);
849
+ if (i === "Object" && n.constructor && (i = n.constructor.name), i === "Map" || i === "Set") return Array.from(n);
850
+ if (i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return Ft(n, t);
851
851
  }
852
852
  }(e) || function() {
853
853
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
854
854
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
855
855
  }();
856
856
  }
857
- function Ft(e, i) {
858
- (i == null || i > e.length) && (i = e.length);
859
- for (var t = 0, n = new Array(i); t < i; t++) n[t] = e[t];
860
- return n;
857
+ function Ft(e, n) {
858
+ (n == null || n > e.length) && (n = e.length);
859
+ for (var t = 0, i = new Array(n); t < n; t++) i[t] = e[t];
860
+ return i;
861
861
  }
862
- var yi, io, mt, de = (yi = function(e) {
862
+ var _n, no, mt, de = (_n = function(e) {
863
863
  /*!
864
864
  Copyright (c) 2018 Jed Watson.
865
865
  Licensed under the MIT License (MIT), see
866
866
  http://jedwatson.github.io/classnames
867
867
  */
868
868
  (function() {
869
- var i = {}.hasOwnProperty;
869
+ var n = {}.hasOwnProperty;
870
870
  function t() {
871
- for (var n = [], a = 0; a < arguments.length; a++) {
871
+ for (var i = [], a = 0; a < arguments.length; a++) {
872
872
  var o = arguments[a];
873
873
  if (o) {
874
874
  var r = typeof o;
875
- if (r === "string" || r === "number") n.push(o);
875
+ if (r === "string" || r === "number") i.push(o);
876
876
  else if (Array.isArray(o)) {
877
877
  if (o.length) {
878
878
  var l = t.apply(null, o);
879
- l && n.push(l);
879
+ l && i.push(l);
880
880
  }
881
- } else if (r === "object") if (o.toString === Object.prototype.toString) for (var s in o) i.call(o, s) && o[s] && n.push(s);
882
- else n.push(o.toString());
881
+ } else if (r === "object") if (o.toString === Object.prototype.toString) for (var s in o) n.call(o, s) && o[s] && i.push(s);
882
+ else i.push(o.toString());
883
883
  }
884
884
  }
885
- return n.join(" ");
885
+ return i.join(" ");
886
886
  }
887
887
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
888
888
  })();
889
- }, yi(mt = { path: io, exports: {}, require: function(e, i) {
889
+ }, _n(mt = { path: no, exports: {}, require: function(e, n) {
890
890
  return function() {
891
891
  throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
892
- }(i == null && mt.path);
892
+ }(n == null && mt.path);
893
893
  } }, mt.exports), mt.exports), Me = function(e) {
894
- return function(i, t) {
895
- if (!i) return e;
896
- var n;
897
- typeof i == "string" ? n = i : t = i;
894
+ return function(n, t) {
895
+ if (!n) return e;
896
+ var i;
897
+ typeof n == "string" ? i = n : t = n;
898
898
  var a = e;
899
- return n && (a += "__" + n), a + (t ? Object.keys(t).reduce(function(o, r) {
899
+ return i && (a += "__" + i), a + (t ? Object.keys(t).reduce(function(o, r) {
900
900
  var l = t[r];
901
901
  return l && (o += " " + (typeof l == "boolean" ? a + "--" + r : a + "--" + r + "_" + l)), o;
902
902
  }, "") : "");
903
903
  };
904
904
  };
905
- function Lt(e, i, t) {
906
- var n, a, o, r, l;
905
+ function Lt(e, n, t) {
906
+ var i, a, o, r, l;
907
907
  function s() {
908
908
  var d = Date.now() - r;
909
- d < i && d >= 0 ? n = setTimeout(s, i - d) : (n = null, t || (l = e.apply(o, a), o = a = null));
909
+ d < n && d >= 0 ? i = setTimeout(s, n - d) : (i = null, t || (l = e.apply(o, a), o = a = null));
910
910
  }
911
- i == null && (i = 100);
911
+ n == null && (n = 100);
912
912
  var u = function() {
913
913
  o = this, a = arguments, r = Date.now();
914
- var d = t && !n;
915
- return n || (n = setTimeout(s, i)), d && (l = e.apply(o, a), o = a = null), l;
914
+ var d = t && !i;
915
+ return i || (i = setTimeout(s, n)), d && (l = e.apply(o, a), o = a = null), l;
916
916
  };
917
917
  return u.clear = function() {
918
- n && (clearTimeout(n), n = null);
918
+ i && (clearTimeout(i), i = null);
919
919
  }, u.flush = function() {
920
- n && (l = e.apply(o, a), o = a = null, clearTimeout(n), n = null);
920
+ i && (l = e.apply(o, a), o = a = null, clearTimeout(i), i = null);
921
921
  }, u;
922
922
  }
923
923
  Lt.debounce = Lt;
924
924
  var Bt = Lt, H = function() {
925
925
  return H = Object.assign || function(e) {
926
- for (var i, t = 1, n = arguments.length; t < n; t++) for (var a in i = arguments[t]) Object.prototype.hasOwnProperty.call(i, a) && (e[a] = i[a]);
926
+ for (var n, t = 1, i = arguments.length; t < i; t++) for (var a in n = arguments[t]) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
927
927
  return e;
928
928
  }, H.apply(this, arguments);
929
929
  };
@@ -941,16 +941,16 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
941
941
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
942
942
  PERFORMANCE OF THIS SOFTWARE.
943
943
  ***************************************************************************** */
944
- function Li(e, i) {
945
- var t, n;
946
- return e && i ? (t = "" + e + i[0].toUpperCase() + i.slice(1), n = e + "-" + i) : (t = e || i, n = e || i), { name: t, classname: n };
944
+ function Bn(e, n) {
945
+ var t, i;
946
+ return e && n ? (t = "" + e + n[0].toUpperCase() + n.slice(1), i = e + "-" + n) : (t = e || n, i = e || n), { name: t, classname: i };
947
947
  }
948
- function Bi(e) {
948
+ function Kn(e) {
949
949
  return /^blob:/.test(e);
950
950
  }
951
- function _i(e) {
952
- return Bi(e) || function(i) {
953
- return /^data:/.test(i);
951
+ function wn(e) {
952
+ return Kn(e) || function(n) {
953
+ return /^data:/.test(n);
954
954
  }(e);
955
955
  }
956
956
  function Ze(e) {
@@ -962,42 +962,42 @@ function fe(e) {
962
962
  function bt(e) {
963
963
  return typeof e == "object" && e !== null;
964
964
  }
965
- function Kt(e, i, t) {
966
- var n = {};
967
- return bt(e) ? (Object.keys(i).forEach(function(a) {
968
- fe(e[a]) ? n[a] = i[a] : bt(i[a]) ? bt(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];
969
- }), n) : e ? i : t;
965
+ function Kt(e, n, t) {
966
+ var i = {};
967
+ return bt(e) ? (Object.keys(n).forEach(function(a) {
968
+ fe(e[a]) ? i[a] = n[a] : bt(n[a]) ? bt(e[a]) ? i[a] = Kt(e[a], n[a], t[a]) : i[a] = e[a] ? n[a] : t[a] : n[a] === !0 || n[a] === !1 ? i[a] = !!e[a] : i[a] = e[a];
969
+ }), i) : e ? n : t;
970
970
  }
971
971
  function ht(e) {
972
- var i = Number(e);
973
- return Number.isNaN(i) ? e : i;
972
+ var n = Number(e);
973
+ return Number.isNaN(n) ? e : n;
974
974
  }
975
- function wi(e) {
976
- return typeof (e == "number" || /* @__PURE__ */ function(i) {
977
- return typeof i == "object" && i !== null;
978
- }(e) && toString.call(e) == "[object Number]") && !Ki(e);
975
+ function Sn(e) {
976
+ return typeof (e == "number" || /* @__PURE__ */ function(n) {
977
+ return typeof n == "object" && n !== null;
978
+ }(e) && toString.call(e) == "[object Number]") && !Gn(e);
979
979
  }
980
- function Ki(e) {
980
+ function Gn(e) {
981
981
  return e != e;
982
982
  }
983
- function Gi(e, i) {
984
- return Math.sqrt(Math.pow(e.x - i.x, 2) + Math.pow(e.y - i.y, 2));
983
+ function Wn(e, n) {
984
+ return Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2));
985
985
  }
986
- var at = function(e, i) {
987
- e === void 0 && (e = {}), i === void 0 && (i = {}), this.type = "manipulateImage", this.move = e, this.scale = i;
988
- }, no = function(e, i) {
989
- i === void 0 && (i = {}), this.type = "resize", this.directions = e, this.params = i;
986
+ var at = function(e, n) {
987
+ e === void 0 && (e = {}), n === void 0 && (n = {}), this.type = "manipulateImage", this.move = e, this.scale = n;
988
+ }, io = function(e, n) {
989
+ n === void 0 && (n = {}), this.type = "resize", this.directions = e, this.params = n;
990
990
  }, Qt = function(e) {
991
991
  this.type = "move", this.directions = e;
992
992
  }, oo = function() {
993
- function e(i, t, n, a, o) {
994
- this.type = "drag", this.nativeEvent = i, this.position = n, this.previousPosition = a, this.element = t, this.anchor = o;
993
+ function e(n, t, i, a, o) {
994
+ this.type = "drag", this.nativeEvent = n, this.position = i, this.previousPosition = a, this.element = t, this.anchor = o;
995
995
  }
996
996
  return e.prototype.shift = function() {
997
- var i = this, t = i.element, n = i.anchor, a = i.position;
997
+ var n = this, t = n.element, i = n.anchor, a = n.position;
998
998
  if (t) {
999
999
  var o = t.getBoundingClientRect(), r = o.left, l = o.top;
1000
- return { left: a.left - r - n.left, top: a.top - l - n.top };
1000
+ return { left: a.left - r - i.left, top: a.top - l - i.top };
1001
1001
  }
1002
1002
  return { left: 0, top: 0 };
1003
1003
  }, e;
@@ -1013,8 +1013,8 @@ var at = function(e, i) {
1013
1013
  }, onMouseLeave: function() {
1014
1014
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
1015
1015
  }, onTouchStart: function(e) {
1016
- e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = qe(e.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), e.touches.length && this.initAnchor(this.touches.reduce(function(i, t) {
1017
- return { clientX: i.clientX + t.clientX / e.touches.length, clientY: i.clientY + t.clientY / e.touches.length };
1016
+ e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = qe(e.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), e.touches.length && this.initAnchor(this.touches.reduce(function(n, t) {
1017
+ return { clientX: n.clientX + t.clientX / e.touches.length, clientY: n.clientY + t.clientY / e.touches.length };
1018
1018
  }, { clientX: 0, clientY: 0 })), e.preventDefault && e.preventDefault(), e.stopPropagation());
1019
1019
  }, onTouchEnd: function() {
1020
1020
  this.processEnd();
@@ -1022,204 +1022,204 @@ var at = function(e, i) {
1022
1022
  this.touches.length && (this.processMove(e, e.touches), e.preventDefault && e.preventDefault(), e.stopPropagation && e.stopPropagation());
1023
1023
  }, onMouseDown: function(e) {
1024
1024
  if (!this.disabled) {
1025
- var i = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1026
- this.touches = [i], this.initAnchor(i), e.stopPropagation();
1025
+ var n = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1026
+ this.touches = [n], this.initAnchor(n), e.stopPropagation();
1027
1027
  }
1028
1028
  }, onMouseMove: function(e) {
1029
1029
  this.touches.length && (this.processMove(e, [{ fake: !0, clientX: e.clientX, clientY: e.clientY }]), e.preventDefault && e.preventDefault());
1030
1030
  }, onMouseUp: function() {
1031
1031
  this.processEnd();
1032
1032
  }, initAnchor: function(e) {
1033
- var i = this.$refs.draggable.getBoundingClientRect(), t = i.left, n = i.right, a = i.bottom, o = i.top;
1034
- this.anchor = { left: e.clientX - t, top: e.clientY - o, bottom: a - e.clientY, right: n - e.clientX };
1035
- }, processMove: function(e, i) {
1036
- var t = qe(i);
1033
+ var n = this.$refs.draggable.getBoundingClientRect(), t = n.left, i = n.right, a = n.bottom, o = n.top;
1034
+ this.anchor = { left: e.clientX - t, top: e.clientY - o, bottom: a - e.clientY, right: i - e.clientX };
1035
+ }, processMove: function(e, n) {
1036
+ var t = qe(n);
1037
1037
  if (this.touches.length) {
1038
1038
  if (this.touches.length === 1 && t.length === 1) {
1039
- var n = this.$refs.draggable;
1040
- this.$emit("drag", new oo(e, n, { left: t[0].clientX, top: t[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
1039
+ var i = this.$refs.draggable;
1040
+ this.$emit("drag", new oo(e, i, { left: t[0].clientX, top: t[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
1041
1041
  }
1042
1042
  this.touches = t;
1043
1043
  }
1044
1044
  }, processEnd: function() {
1045
1045
  this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = !1), this.touches = [];
1046
1046
  } }, emits: ["drag", "drag-end", "leave", "enter"] };
1047
- Jt.render = function(e, i, t, n, a, o) {
1048
- return F(), G("div", { ref: "draggable", class: t.classname, onTouchstart: i[1] || (i[1] = function() {
1047
+ Jt.render = function(e, n, t, i, a, o) {
1048
+ return F(), G("div", { ref: "draggable", class: t.classname, onTouchstart: n[1] || (n[1] = function() {
1049
1049
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1050
- }), onMousedown: i[2] || (i[2] = function() {
1050
+ }), onMousedown: n[2] || (n[2] = function() {
1051
1051
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
1052
- }), onMouseover: i[3] || (i[3] = function() {
1052
+ }), onMouseover: n[3] || (n[3] = function() {
1053
1053
  return o.onMouseOver && o.onMouseOver.apply(o, arguments);
1054
- }), onMouseleave: i[4] || (i[4] = function() {
1054
+ }), onMouseleave: n[4] || (n[4] = function() {
1055
1055
  return o.onMouseLeave && o.onMouseLeave.apply(o, arguments);
1056
1056
  }) }, [he(e.$slots, "default")], 34);
1057
1057
  };
1058
- var Et = Me("vue-handler-wrapper"), Wi = { name: "HandlerWrapper", components: { DraggableElement: Jt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
1058
+ var Et = Me("vue-handler-wrapper"), jn = { name: "HandlerWrapper", components: { DraggableElement: Jt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
1059
1059
  var e;
1060
1060
  if (this.horizontalPosition || this.verticalPosition) {
1061
- var i, t = Li(this.horizontalPosition, this.verticalPosition);
1062
- e = Et((Ae(i = {}, t.classname, !0), Ae(i, "disabled", this.disabled), i));
1061
+ var n, t = Bn(this.horizontalPosition, this.verticalPosition);
1062
+ e = Et((Ae(n = {}, t.classname, !0), Ae(n, "disabled", this.disabled), n));
1063
1063
  } else e = Et({ disabled: this.disabled });
1064
1064
  return { root: e, draggable: Et("draggable") };
1065
1065
  } }, emits: ["leave", "enter", "drag", "drag-end"] };
1066
- Wi.render = function(e, i, t, n, a, o) {
1066
+ jn.render = function(e, n, t, i, a, o) {
1067
1067
  var r = B("DraggableElement");
1068
- return F(), G("div", { class: o.classes.root }, [C(r, { class: o.classes.draggable, onDrag: i[1] || (i[1] = function(l) {
1068
+ return F(), G("div", { class: o.classes.root }, [C(r, { class: o.classes.draggable, onDrag: n[1] || (n[1] = function(l) {
1069
1069
  return e.$emit("drag", l);
1070
- }), onDragEnd: i[2] || (i[2] = function(l) {
1070
+ }), onDragEnd: n[2] || (n[2] = function(l) {
1071
1071
  return e.$emit("drag-end");
1072
- }), onLeave: i[3] || (i[3] = function(l) {
1072
+ }), onLeave: n[3] || (n[3] = function(l) {
1073
1073
  return e.$emit("leave");
1074
- }), onEnter: i[4] || (i[4] = function(l) {
1074
+ }), onEnter: n[4] || (n[4] = function(l) {
1075
1075
  return e.$emit("enter");
1076
1076
  }) }, { default: N(function() {
1077
1077
  return [he(e.$slots, "default")];
1078
1078
  }), _: 3 }, 8, ["class"])], 2);
1079
1079
  };
1080
- var ao = Me("vue-line-wrapper"), ji = { name: "LineWrapper", components: { DraggableElement: Jt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
1080
+ var ao = Me("vue-line-wrapper"), Yn = { name: "LineWrapper", components: { DraggableElement: Jt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
1081
1081
  var e;
1082
1082
  return ao((Ae(e = {}, this.position, !0), Ae(e, "disabled", this.disabled), e));
1083
1083
  } }, emits: ["leave", "enter", "drag", "drag-end"] };
1084
- ji.render = function(e, i, t, n, a, o) {
1084
+ Yn.render = function(e, n, t, i, a, o) {
1085
1085
  var r = B("DraggableElement");
1086
- return F(), G(r, { class: o.classname, onDrag: i[1] || (i[1] = function(l) {
1086
+ return F(), G(r, { class: o.classname, onDrag: n[1] || (n[1] = function(l) {
1087
1087
  return e.$emit("drag", l);
1088
- }), onDragEnd: i[2] || (i[2] = function(l) {
1088
+ }), onDragEnd: n[2] || (n[2] = function(l) {
1089
1089
  return e.$emit("drag-end");
1090
- }), onLeave: i[3] || (i[3] = function(l) {
1090
+ }), onLeave: n[3] || (n[3] = function(l) {
1091
1091
  return e.$emit("leave");
1092
- }), onEnter: i[4] || (i[4] = function(l) {
1092
+ }), onEnter: n[4] || (n[4] = function(l) {
1093
1093
  return e.$emit("enter");
1094
1094
  }) }, { default: N(function() {
1095
1095
  return [he(e.$slots, "default")];
1096
1096
  }), _: 3 }, 8, ["class"]);
1097
1097
  };
1098
- var ze = ["left", "right", "top", "bottom"], ro = ["left", "right"], so = ["top", "bottom"], lo = ["left", "top"], uo = ["fill-area", "fit-area", "stencil", "none"], Si = { left: 0, top: 0, width: 0, height: 0 };
1099
- function Ci(e, i, t) {
1100
- return !(t = t || ["width", "height", "left", "top"]).some(function(n) {
1101
- return e[n] !== i[n];
1098
+ var ze = ["left", "right", "top", "bottom"], ro = ["left", "right"], so = ["top", "bottom"], lo = ["left", "top"], uo = ["fill-area", "fit-area", "stencil", "none"], Cn = { left: 0, top: 0, width: 0, height: 0 };
1099
+ function Rn(e, n, t) {
1100
+ return !(t = t || ["width", "height", "left", "top"]).some(function(i) {
1101
+ return e[i] !== n[i];
1102
1102
  });
1103
1103
  }
1104
1104
  function Fe(e) {
1105
1105
  return { left: e.left, top: e.top, right: e.left + e.width, bottom: e.top + e.height };
1106
1106
  }
1107
- function tt(e, i) {
1108
- return { left: e.left - i.left, top: e.top - i.top };
1107
+ function tt(e, n) {
1108
+ return { left: e.left - n.left, top: e.top - n.top };
1109
1109
  }
1110
1110
  function ge(e) {
1111
1111
  return { left: e.left + e.width / 2, top: e.top + e.height / 2 };
1112
1112
  }
1113
- function st(e, i) {
1113
+ function st(e, n) {
1114
1114
  var t = { left: 0, top: 0, right: 0, bottom: 0 };
1115
- return ze.forEach(function(n) {
1116
- var a = i[n], o = Fe(e)[n];
1117
- t[n] = a !== void 0 && o !== void 0 ? n === "left" || n === "top" ? Math.max(0, a - o) : Math.max(0, o - a) : 0;
1115
+ return ze.forEach(function(i) {
1116
+ var a = n[i], o = Fe(e)[i];
1117
+ t[i] = a !== void 0 && o !== void 0 ? i === "left" || i === "top" ? Math.max(0, a - o) : Math.max(0, o - a) : 0;
1118
1118
  }), t;
1119
1119
  }
1120
- function Oe(e, i) {
1121
- return { left: e.left - i.left, top: e.top - i.top, width: e.width + i.left + i.right, height: e.height + i.top + i.bottom };
1120
+ function Oe(e, n) {
1121
+ return { left: e.left - n.left, top: e.top - n.top, width: e.width + n.left + n.right, height: e.height + n.top + n.bottom };
1122
1122
  }
1123
1123
  function Rt(e) {
1124
1124
  return { left: -e.left, top: -e.top };
1125
1125
  }
1126
- function Se(e, i) {
1127
- return H(H({}, e), { left: e.left + i.left, top: e.top + i.top });
1126
+ function Se(e, n) {
1127
+ return H(H({}, e), { left: e.left + n.left, top: e.top + n.top });
1128
1128
  }
1129
- function xe(e, i, t, n) {
1130
- if (i !== 1) {
1129
+ function xe(e, n, t, i) {
1130
+ if (n !== 1) {
1131
1131
  if (t) {
1132
1132
  var a = ge(e);
1133
- return { width: e.width * i, height: e.height * i, left: e.left + e.width * (1 - i) / 2 + (t.left - a.left) * (1 - i), top: e.top + e.height * (1 - i) / 2 + (t.top - a.top) * (1 - i) };
1133
+ return { width: e.width * n, height: e.height * n, left: e.left + e.width * (1 - n) / 2 + (t.left - a.left) * (1 - n), top: e.top + e.height * (1 - n) / 2 + (t.top - a.top) * (1 - n) };
1134
1134
  }
1135
- return { width: e.width * i, height: e.height * i, left: e.left + e.width * (1 - i) / 2, top: e.top + e.height * (1 - i) / 2 };
1135
+ return { width: e.width * n, height: e.height * n, left: e.left + e.width * (1 - n) / 2, top: e.top + e.height * (1 - n) / 2 };
1136
1136
  }
1137
1137
  return e;
1138
1138
  }
1139
1139
  function oe(e) {
1140
1140
  return e.width / e.height;
1141
1141
  }
1142
- function it(e, i) {
1143
- 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);
1142
+ function nt(e, n) {
1143
+ return Math.min(n.right !== void 0 && n.left !== void 0 ? (n.right - n.left) / e.width : 1 / 0, n.bottom !== void 0 && n.top !== void 0 ? (n.bottom - n.top) / e.height : 1 / 0);
1144
1144
  }
1145
- function nt(e, i) {
1146
- var t = { left: 0, top: 0 }, n = st(e, i);
1147
- 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;
1145
+ function it(e, n) {
1146
+ var t = { left: 0, top: 0 }, i = st(e, n);
1147
+ return i.left && i.left > 0 ? t.left = i.left : i.right && i.right > 0 && (t.left = -i.right), i.top && i.top > 0 ? t.top = i.top : i.bottom && i.bottom > 0 && (t.top = -i.bottom), t;
1148
1148
  }
1149
- function It(e, i) {
1149
+ function It(e, n) {
1150
1150
  var t;
1151
- return i.minimum && e < i.minimum ? t = i.minimum : i.maximum && e > i.maximum && (t = i.maximum), t;
1151
+ return n.minimum && e < n.minimum ? t = n.minimum : n.maximum && e > n.maximum && (t = n.maximum), t;
1152
1152
  }
1153
- function Yi(e, i) {
1154
- var t = oe(e), n = oe(i);
1155
- 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;
1153
+ function Hn(e, n) {
1154
+ var t = oe(e), i = oe(n);
1155
+ return n.width < 1 / 0 && n.height < 1 / 0 ? t > i ? { width: n.width, height: n.width / t } : { width: n.height * t, height: n.height } : n.width < 1 / 0 ? { width: n.width, height: n.width / t } : n.height < 1 / 0 ? { width: n.height * t, height: n.height } : e;
1156
1156
  }
1157
- function Hi(e, i) {
1158
- var t = i * Math.PI / 180;
1157
+ function Xn(e, n) {
1158
+ var t = n * Math.PI / 180;
1159
1159
  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)) };
1160
1160
  }
1161
- function Ve(e, i) {
1162
- var t = i * Math.PI / 180;
1161
+ function Ve(e, n) {
1162
+ var t = n * Math.PI / 180;
1163
1163
  return { left: e.left * Math.cos(t) - e.top * Math.sin(t), top: e.left * Math.sin(t) + e.top * Math.cos(t) };
1164
1164
  }
1165
- function At(e, i) {
1166
- var t = st(ve(e, i), i);
1167
- 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;
1165
+ function At(e, n) {
1166
+ var t = st(ve(e, n), n);
1167
+ 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, nt(e, n)) : Math.min((e.height + t.top + t.bottom) / e.height, nt(e, n)) : 1;
1168
1168
  }
1169
- function ve(e, i, t) {
1169
+ function ve(e, n, t) {
1170
1170
  t === void 0 && (t = !1);
1171
- var n = nt(e, i);
1172
- return Se(e, t ? Rt(n) : n);
1171
+ var i = it(e, n);
1172
+ return Se(e, t ? Rt(i) : i);
1173
1173
  }
1174
1174
  function Gt(e) {
1175
1175
  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 };
1176
1176
  }
1177
- function co(e, i) {
1178
- return H(H({}, 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) });
1177
+ function co(e, n) {
1178
+ return H(H({}, e), { minWidth: Math.min(n.width, e.minWidth), minHeight: Math.min(n.height, e.minHeight), maxWidth: Math.min(n.width, e.maxWidth), maxHeight: Math.min(n.height, e.maxHeight) });
1179
1179
  }
1180
- function Xi(e, i, t) {
1180
+ function qn(e, n, t) {
1181
1181
  t === void 0 && (t = !0);
1182
- var n = {};
1182
+ var i = {};
1183
1183
  return ze.forEach(function(a) {
1184
- var o = e[a], r = i[a];
1185
- 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);
1186
- }), n;
1184
+ var o = e[a], r = n[a];
1185
+ o !== void 0 && r !== void 0 ? i[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 ? i[a] = r : o !== void 0 && (i[a] = o);
1186
+ }), i;
1187
1187
  }
1188
- function xt(e, i) {
1189
- return Xi(e, i, !0);
1188
+ function xt(e, n) {
1189
+ return qn(e, n, !0);
1190
1190
  }
1191
- function Ri(e) {
1192
- var i = e.size, t = e.aspectRatio, n = e.ignoreMinimum, a = e.sizeRestrictions;
1193
- return !!((i.correctRatio || oe(i) >= t.minimum && oe(i) <= t.maximum) && i.height <= a.maxHeight && i.width <= a.maxWidth && i.width && i.height && (n || i.height >= a.minHeight && i.width >= a.minWidth));
1191
+ function An(e) {
1192
+ var n = e.size, t = e.aspectRatio, i = e.ignoreMinimum, a = e.sizeRestrictions;
1193
+ return !!((n.correctRatio || oe(n) >= t.minimum && oe(n) <= t.maximum) && n.height <= a.maxHeight && n.width <= a.maxWidth && n.width && n.height && (i || n.height >= a.minHeight && n.width >= a.minWidth));
1194
1194
  }
1195
- function Ai(e, i) {
1196
- return Math.pow(e.width - i.width, 2) + Math.pow(e.height - i.height, 2);
1195
+ function xn(e, n) {
1196
+ return Math.pow(e.width - n.width, 2) + Math.pow(e.height - n.height, 2);
1197
1197
  }
1198
1198
  function De(e) {
1199
- 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)) };
1199
+ var n = e.width, t = e.height, i = e.sizeRestrictions, a = { minimum: e.aspectRatio && e.aspectRatio.minimum || 0, maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0 }, o = { width: Math.max(i.minWidth, Math.min(i.maxWidth, n)), height: Math.max(i.minHeight, Math.min(i.maxHeight, t)) };
1200
1200
  function r(u, d) {
1201
1201
  return d === void 0 && (d = !1), u.reduce(function(h, m) {
1202
- return Ri({ size: m, aspectRatio: a, sizeRestrictions: n, ignoreMinimum: d }) && (!h || Ai(m, { width: i, height: t }) < Ai(h, { width: i, height: t })) ? m : h;
1202
+ return An({ size: m, aspectRatio: a, sizeRestrictions: i, ignoreMinimum: d }) && (!h || xn(m, { width: n, height: t }) < xn(h, { width: n, height: t })) ? m : h;
1203
1203
  }, null);
1204
1204
  }
1205
1205
  var l = [];
1206
- a && [a.minimum, a.maximum].forEach(function(u) {
1206
+ [a.minimum, a.maximum].forEach(function(u) {
1207
1207
  u && l.push({ width: o.width, height: o.width / u, correctRatio: !0 }, { width: o.height * u, height: o.height, correctRatio: !0 });
1208
- }), Ri({ size: o, aspectRatio: a, sizeRestrictions: n }) && l.push(o);
1208
+ }), An({ size: o, aspectRatio: a, sizeRestrictions: i }) && l.push(o);
1209
1209
  var s = r(l) || r(l, !0);
1210
1210
  return s && { width: s.width, height: s.height };
1211
1211
  }
1212
1212
  function Wt(e) {
1213
- var i = e.event, t = e.coordinates, n = e.positionRestrictions, a = n === void 0 ? {} : n, o = Se(t, i.directions);
1214
- return Se(o, nt(o, a));
1213
+ var n = e.event, t = e.coordinates, i = e.positionRestrictions, a = i === void 0 ? {} : i, o = Se(t, n.directions);
1214
+ return Se(o, it(o, a));
1215
1215
  }
1216
1216
  function mo(e) {
1217
- 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) {
1217
+ var n = e.coordinates, t = e.transform, i = e.imageSize, a = e.sizeRestrictions, o = e.positionRestrictions, r = e.aspectRatio, l = e.visibleArea, s = function(d, h) {
1218
1218
  return Wt({ coordinates: d, positionRestrictions: o, event: new Qt({ left: h.left - d.left, top: h.top - d.top }) });
1219
- }, u = H({}, i);
1219
+ }, u = H({}, n);
1220
1220
  return (Array.isArray(t) ? t : [t]).forEach(function(d) {
1221
1221
  var h = {};
1222
- fe((h = typeof d == "function" ? d({ coordinates: u, imageSize: n, visibleArea: l }) : d).width) && fe(h.height) || (u = function(m, c) {
1222
+ fe((h = typeof d == "function" ? d({ coordinates: u, imageSize: i, visibleArea: l }) : d).width) && fe(h.height) || (u = function(m, c) {
1223
1223
  var y = H(H(H({}, m), De({ width: c.width, height: c.height, sizeRestrictions: a, aspectRatio: r })), { left: 0, top: 0 });
1224
1224
  return s(y, { left: m.left, top: m.top });
1225
1225
  }(u, H(H({}, u), h))), fe(h.left) && fe(h.top) || (u = s(u, H(H({}, u), h)));
@@ -1227,83 +1227,83 @@ function mo(e) {
1227
1227
  }
1228
1228
  function ho(e) {
1229
1229
  e.event;
1230
- var i = e.getAreaRestrictions, t = e.boundaries, n = e.coordinates, a = e.visibleArea;
1230
+ var n = e.getAreaRestrictions, t = e.boundaries, i = e.coordinates, a = e.visibleArea;
1231
1231
  e.aspectRatio;
1232
1232
  var o = e.stencilSize, r = e.sizeRestrictions, l = e.positionRestrictions;
1233
1233
  e.stencilReference;
1234
- var s, u, d, h = H({}, n), m = H({}, a), c = H({}, o);
1234
+ var s, u, d, h = H({}, i), m = H({}, a), c = H({}, o);
1235
1235
  s = oe(c), u = oe(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 = H(H({}, h), De({ sizeRestrictions: r, width: h.width, height: h.height, aspectRatio: { minimum: oe(c), maximum: oe(c) } })));
1236
- var y = At(m = xe(m, h.width * t.width / (m.width * c.width)), i({ visibleArea: m, type: "resize" }));
1237
- return y !== 1 && (m = xe(m, y), h = xe(h, y)), m = ve(m = Se(m, tt(ge(h), ge(m))), i({ visibleArea: m, type: "move" })), { coordinates: h = ve(h, xt(Fe(m), l)), visibleArea: m };
1236
+ var y = At(m = xe(m, h.width * t.width / (m.width * c.width)), n({ visibleArea: m, type: "resize" }));
1237
+ return y !== 1 && (m = xe(m, y), h = xe(h, y)), m = ve(m = Se(m, tt(ge(h), ge(m))), n({ visibleArea: m, type: "move" })), { coordinates: h = ve(h, xt(Fe(m), l)), visibleArea: m };
1238
1238
  }
1239
1239
  function po(e) {
1240
- var i = e.event, t = e.getAreaRestrictions, n = e.boundaries, a = e.coordinates, o = e.visibleArea;
1240
+ var n = e.event, t = e.getAreaRestrictions, i = e.boundaries, a = e.coordinates, o = e.visibleArea;
1241
1241
  e.aspectRatio, e.stencilSize, e.sizeRestrictions;
1242
1242
  var r = e.positionRestrictions;
1243
1243
  e.stencilReference;
1244
1244
  var l = H({}, a), s = H({}, o);
1245
- if (a && o && i.type !== "manipulateImage") {
1245
+ if (a && o && n.type !== "manipulateImage") {
1246
1246
  var u = { width: 0, height: 0 };
1247
- s.width, n.width, oe(n) > oe(l) ? (u.height = 0.8 * n.height, u.width = u.height * oe(l)) : (u.width = 0.8 * n.width, u.height = u.width * oe(l));
1248
- var d = At(s = xe(s, l.width * n.width / (s.width * u.width)), t({ visibleArea: s, type: "resize" }));
1247
+ s.width, i.width, oe(i) > oe(l) ? (u.height = 0.8 * i.height, u.width = u.height * oe(l)) : (u.width = 0.8 * i.width, u.height = u.width * oe(l));
1248
+ var d = At(s = xe(s, l.width * i.width / (s.width * u.width)), t({ visibleArea: s, type: "resize" }));
1249
1249
  s = xe(s, d), d !== 1 && (u.height /= d, u.width /= d), s = ve(s = Se(s, tt(ge(l), ge(s))), t({ visibleArea: s, type: "move" })), l = ve(l, xt(Fe(s), r));
1250
1250
  }
1251
1251
  return { coordinates: l, visibleArea: s };
1252
1252
  }
1253
1253
  function fo(e) {
1254
- var i = e.event, t = e.coordinates, n = e.visibleArea, a = e.getAreaRestrictions, o = H({}, n), r = H({}, t);
1255
- if (i.type === "setCoordinates") {
1254
+ var n = e.event, t = e.coordinates, i = e.visibleArea, a = e.getAreaRestrictions, o = H({}, i), r = H({}, t);
1255
+ if (n.type === "setCoordinates") {
1256
1256
  var l = Math.max(0, r.width - o.width), s = Math.max(0, r.height - o.height);
1257
- 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 = ve(o = Se(o, Rt(nt(r, Fe(o)))), a({ visibleArea: o, type: "move" }));
1257
+ l > s ? o = xe(o, Math.min(r.width / o.width, nt(o, a({ visibleArea: o, type: "resize" })))) : s > l && (o = xe(o, Math.min(r.height / o.height, nt(o, a({ visibleArea: o, type: "resize" }))))), o = ve(o = Se(o, Rt(it(r, Fe(o)))), a({ visibleArea: o, type: "move" }));
1258
1258
  }
1259
1259
  return { visibleArea: o, coordinates: r };
1260
1260
  }
1261
1261
  function go(e) {
1262
- var i = e.imageSize, t = e.visibleArea, n = e.coordinates, a = t || i;
1263
- return { left: (t ? t.left : 0) + a.width / 2 - n.width / 2, top: (t ? t.top : 0) + a.height / 2 - n.height / 2 };
1262
+ var n = e.imageSize, t = e.visibleArea, i = e.coordinates, a = t || n;
1263
+ return { left: (t ? t.left : 0) + a.width / 2 - i.width / 2, top: (t ? t.top : 0) + a.height / 2 - i.height / 2 };
1264
1264
  }
1265
1265
  function vo(e) {
1266
- var i = e.imageSize, t = e.visibleArea, n = e.aspectRatio, a = e.sizeRestrictions, o = t || i, r = Math.min(n.maximum || 1 / 0, Math.max(n.minimum || 0, oe(o))), l = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / r } : { height: 0.8 * o.height, width: 0.8 * o.height * r };
1267
- return De(H(H({}, l), { aspectRatio: n, sizeRestrictions: a }));
1266
+ var n = e.imageSize, t = e.visibleArea, i = e.aspectRatio, a = e.sizeRestrictions, o = t || n, r = Math.min(i.maximum || 1 / 0, Math.max(i.minimum || 0, oe(o))), l = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / r } : { height: 0.8 * o.height, width: 0.8 * o.height * r };
1267
+ return De(H(H({}, l), { aspectRatio: i, sizeRestrictions: a }));
1268
1268
  }
1269
1269
  function bo(e) {
1270
- var i, t, n = e.imageSize, a = e.visibleArea, o = e.boundaries, r = e.aspectRatio, l = e.sizeRestrictions, s = e.stencilSize, u = a || n;
1271
- return oe(u) > oe(o) ? t = (i = s.height * u.height / o.height) * oe(s) : i = (t = s.width * u.width / o.width) / oe(s), De({ width: t, height: i, aspectRatio: r, sizeRestrictions: l });
1270
+ var n, t, i = e.imageSize, a = e.visibleArea, o = e.boundaries, r = e.aspectRatio, l = e.sizeRestrictions, s = e.stencilSize, u = a || i;
1271
+ return oe(u) > oe(o) ? t = (n = s.height * u.height / o.height) * oe(s) : n = (t = s.width * u.width / o.width) / oe(s), De({ width: t, height: n, aspectRatio: r, sizeRestrictions: l });
1272
1272
  }
1273
1273
  function yo(e) {
1274
- var i = e.getAreaRestrictions, t = e.coordinates, n = e.imageSize, a = oe(e.boundaries);
1274
+ var n = e.getAreaRestrictions, t = e.coordinates, i = e.imageSize, a = oe(e.boundaries);
1275
1275
  if (t) {
1276
- var o = { height: Math.max(t.height, n.height), width: Math.max(t.width, n.width) }, r = Yi({ width: oe(o) > a ? o.width : o.height * a, height: oe(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 = st(t, Fe(H({ left: 0, top: 0 }, n))), u = {};
1277
- 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), ve(l, u);
1276
+ var o = { height: Math.max(t.height, i.height), width: Math.max(t.width, i.width) }, r = Hn({ width: oe(o) > a ? o.width : o.height * a, height: oe(o) > a ? o.width / a : o.height }, Gt(n())), 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 = st(t, Fe(H({ left: 0, top: 0 }, i))), u = {};
1277
+ return !s.left && !s.right && l.width <= i.width && (u.left = 0, u.right = i.width), !s.top && !s.bottom && l.height <= i.height && (u.top = 0, u.bottom = i.height), ve(l, u);
1278
1278
  }
1279
- var d = oe(n);
1280
- 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 };
1279
+ var d = oe(i);
1280
+ return r = { height: d > a ? i.height : i.width / a, width: d > a ? i.height * a : i.width }, { left: i.width / 2 - r.width / 2, top: i.height / 2 - r.height / 2, width: r.width, height: r.height };
1281
1281
  }
1282
- function pt(e, i) {
1283
- return Xi(e, Fe(i));
1282
+ function pt(e, n) {
1283
+ return qn(e, Fe(n));
1284
1284
  }
1285
1285
  function _o(e) {
1286
- 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 = H({}, n), h = H({}, t), m = 1, c = 1, y = s.factor && Math.abs(s.factor - 1) > 1e-3;
1286
+ var n = e.event, t = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.getAreaRestrictions, r = e.positionRestrictions, l = e.adjustStencil, s = n.scale, u = n.move, d = H({}, i), h = H({}, t), m = 1, c = 1, y = s.factor && Math.abs(s.factor - 1) > 1e-3;
1287
1287
  d = Se(d, { left: u.left || 0, top: u.top || 0 });
1288
- var v = { 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" })) } };
1288
+ var v = { 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, nt(h, r)) }, area: { maximum: nt(d, o({ visibleArea: d, type: "resize" })) } };
1289
1289
  s.factor && y && (s.factor < 1 ? (c = Math.max(s.factor, v.stencil.minimum)) > 1 && (c = 1) : s.factor > 1 && (c = Math.min(s.factor, Math.min(v.area.maximum, v.stencil.maximum))) < 1 && (c = 1)), c && (d = xe(d, c, s.center));
1290
- var g = t.left - n.left, w = n.width + n.left - (t.width + t.left), z = t.top - n.top, O = n.height + n.top - (t.height + t.top);
1291
- return d = ve(d = Se(d, nt(d, { left: r.left !== void 0 ? r.left - g * c : void 0, top: r.top !== void 0 ? r.top - z * c : void 0, bottom: r.bottom !== void 0 ? r.bottom + O * 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 + z * c, h = ve(h, xt(Fe(d), r)), s.factor && y && l && (s.factor > 1 ? m = Math.min(v.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 = ve(d = xe(d, m, s.factor > 1 ? s.center : ge(h)), o({ visibleArea: d, type: "move" })), Rt(nt(h, Fe(d)))))), { coordinates: h, visibleArea: d };
1290
+ var g = t.left - i.left, w = i.width + i.left - (t.width + t.left), z = t.top - i.top, O = i.height + i.top - (t.height + t.top);
1291
+ return d = ve(d = Se(d, it(d, { left: r.left !== void 0 ? r.left - g * c : void 0, top: r.top !== void 0 ? r.top - z * c : void 0, bottom: r.bottom !== void 0 ? r.bottom + O * 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 + z * c, h = ve(h, xt(Fe(d), r)), s.factor && y && l && (s.factor > 1 ? m = Math.min(v.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 = ve(d = xe(d, m, s.factor > 1 ? s.center : ge(h)), o({ visibleArea: d, type: "move" })), Rt(it(h, Fe(d)))))), { coordinates: h, visibleArea: d };
1292
1292
  }
1293
1293
  function wo(e) {
1294
- 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 = H({}, n), h = H({}, a), m = Ve(ge(H({ left: 0, top: 0 }, s)), u);
1295
- return (d = H(H({}, De({ sizeRestrictions: o, aspectRatio: i, width: d.width, height: d.height })), Ve(ge(d), u))).left -= m.left - l.width / 2 + d.width / 2, d.top -= m.top - l.height / 2 + d.height / 2, h = xe(h, At(h, t({ visibleArea: h, type: "resize" }))), { coordinates: d = ve(d, r), visibleArea: h = ve(h = Se(h, tt(ge(d), ge(n))), t({ visibleArea: h, type: "move" })) };
1294
+ var n = e.aspectRatio, t = e.getAreaRestrictions, i = e.coordinates, a = e.visibleArea, o = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, d = H({}, i), h = H({}, a), m = Ve(ge(H({ left: 0, top: 0 }, s)), u);
1295
+ return (d = H(H({}, De({ sizeRestrictions: o, aspectRatio: n, width: d.width, height: d.height })), Ve(ge(d), u))).left -= m.left - l.width / 2 + d.width / 2, d.top -= m.top - l.height / 2 + d.height / 2, h = xe(h, At(h, t({ visibleArea: h, type: "resize" }))), { coordinates: d = ve(d, r), visibleArea: h = ve(h = Se(h, tt(ge(d), ge(i))), t({ visibleArea: h, type: "move" })) };
1296
1296
  }
1297
1297
  function So(e) {
1298
- var i = e.flip, t = e.previousFlip, n = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, r = e.visibleArea, l = e.imageSize, s = H({}, o), u = H({}, r), d = t.horizontal !== i.horizontal, h = t.vertical !== i.vertical;
1298
+ var n = e.flip, t = e.previousFlip, i = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, r = e.visibleArea, l = e.imageSize, s = H({}, o), u = H({}, r), d = t.horizontal !== n.horizontal, h = t.vertical !== n.vertical;
1299
1299
  if (d || h) {
1300
- var m = Ve({ left: l.width / 2, top: l.height / 2 }, -n), c = Ve(ge(s), -n), y = Ve({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, n);
1301
- s = Se(s, tt(y, ge(s))), c = Ve(ge(u), -n), u = ve(u = Se(u, tt(y = Ve({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, n), ge(u))), a({ visibleArea: u, type: "move" }));
1300
+ var m = Ve({ left: l.width / 2, top: l.height / 2 }, -i), c = Ve(ge(s), -i), y = Ve({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, i);
1301
+ s = Se(s, tt(y, ge(s))), c = Ve(ge(u), -i), u = ve(u = Se(u, tt(y = Ve({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, i), ge(u))), a({ visibleArea: u, type: "move" }));
1302
1302
  }
1303
1303
  return { coordinates: s, visibleArea: u };
1304
1304
  }
1305
- function xi(e) {
1306
- 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 = H({}, i), u = Oe(t, s).width, d = Oe(t, s).height;
1305
+ function kn(e) {
1306
+ var n = e.directions, t = e.coordinates, i = e.positionRestrictions, a = i === void 0 ? {} : i, o = e.sizeRestrictions, r = e.preserveRatio, l = e.compensate, s = H({}, n), u = Oe(t, s).width, d = Oe(t, s).height;
1307
1307
  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)));
1308
1308
  var h = st(Oe(t, s), a);
1309
1309
  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 = st(Oe(t, s), a));
@@ -1333,14 +1333,14 @@ function xi(e) {
1333
1333
  });
1334
1334
  return s;
1335
1335
  }
1336
- function ft(e, i, t) {
1337
- return i == 0 && t == 0 ? e / 2 : i == 0 ? 0 : t == 0 ? e : e * Math.abs(i / (i + t));
1336
+ function ft(e, n, t) {
1337
+ return n == 0 && t == 0 ? e / 2 : n == 0 ? 0 : t == 0 ? e : e * Math.abs(n / (n + t));
1338
1338
  }
1339
- var Co = Me("vue-simple-handler"), Ro = Me("vue-simple-handler-wrapper"), ei = { name: "SimpleHandler", components: { HandlerWrapper: Wi }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1339
+ var Co = Me("vue-simple-handler"), Ro = Me("vue-simple-handler-wrapper"), en = { name: "SimpleHandler", components: { HandlerWrapper: jn }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1340
1340
  return { hover: !1 };
1341
1341
  }, computed: { classes: function() {
1342
- 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);
1343
- return { default: de(Co(i), this.defaultClass, this.hover && this.hoverClass), wrapper: de(Ro(i), this.wrapperClass) };
1342
+ var e, n = (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);
1343
+ return { default: de(Co(n), this.defaultClass, this.hover && this.hoverClass), wrapper: de(Ro(n), this.wrapperClass) };
1344
1344
  } }, methods: { onDrag: function(e) {
1345
1345
  this.$emit("drag", e);
1346
1346
  }, onEnter: function() {
@@ -1350,13 +1350,13 @@ var Co = Me("vue-simple-handler"), Ro = Me("vue-simple-handler-wrapper"), ei = {
1350
1350
  }, onDragEnd: function() {
1351
1351
  this.$emit("drag-end");
1352
1352
  } }, emits: ["drag", "drag-end"] };
1353
- ei.render = function(e, i, t, n, a, o) {
1353
+ en.render = function(e, n, t, i, a, o) {
1354
1354
  var r = B("HandlerWrapper");
1355
1355
  return F(), 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() {
1356
1356
  return [C("div", { class: o.classes.default }, null, 2)];
1357
1357
  }), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
1358
1358
  };
1359
- var Ao = Me("vue-simple-line"), xo = Me("vue-simple-line-wrapper"), ti = { name: "SimpleLine", components: { LineWrapper: ji }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1359
+ var Ao = Me("vue-simple-line"), xo = Me("vue-simple-line-wrapper"), tn = { name: "SimpleLine", components: { LineWrapper: Yn }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1360
1360
  return { hover: !1 };
1361
1361
  }, computed: { classes: function() {
1362
1362
  return { root: de(Ao(Ae({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: de(xo(Ae({}, this.position, !0)), this.wrapperClass) };
@@ -1369,16 +1369,16 @@ var Ao = Me("vue-simple-line"), xo = Me("vue-simple-line-wrapper"), ti = { name:
1369
1369
  }, onDragEnd: function() {
1370
1370
  this.$emit("drag-end");
1371
1371
  } }, emits: ["drag", "drag-end"] };
1372
- ti.render = function(e, i, t, n, a, o) {
1372
+ tn.render = function(e, n, t, i, a, o) {
1373
1373
  var r = B("LineWrapper");
1374
1374
  return F(), 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() {
1375
1375
  return [C("div", { class: o.classes.root }, null, 2)];
1376
1376
  }), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
1377
1377
  };
1378
- var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "north", null], qi = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
1378
+ var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "north", null], Zn = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
1379
1379
  return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
1380
1380
  } }, handlersComponent: { type: [Object, String], default: function() {
1381
- return ei;
1381
+ return en;
1382
1382
  } }, handlersClasses: { type: Object, default: function() {
1383
1383
  return {};
1384
1384
  } }, handlersWrappersClasses: { type: Object, default: function() {
@@ -1386,18 +1386,18 @@ var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "no
1386
1386
  } }, lines: { type: Object, default: function() {
1387
1387
  return { west: !0, north: !0, east: !0, south: !0 };
1388
1388
  } }, linesComponent: { type: [Object, String], default: function() {
1389
- return ti;
1389
+ return tn;
1390
1390
  } }, linesClasses: { type: Object, default: function() {
1391
1391
  return {};
1392
1392
  } }, linesWrappersClasses: { type: Object, default: function() {
1393
1393
  return {};
1394
1394
  } }, resizable: { type: Boolean, default: !0 } }, data: function() {
1395
1395
  var e = [];
1396
- return ko.forEach(function(i) {
1396
+ return ko.forEach(function(n) {
1397
1397
  Mo.forEach(function(t) {
1398
- if (i !== t) {
1399
- var n = Li(i, t), a = n.name, o = n.classname;
1400
- e.push({ name: a, classname: o, verticalDirection: t, horizontalDirection: i });
1398
+ if (n !== t) {
1399
+ var i = Bn(n, t), a = i.name, o = i.classname;
1400
+ e.push({ name: a, classname: o, verticalDirection: t, horizontalDirection: n });
1401
1401
  }
1402
1402
  });
1403
1403
  }), { points: e };
@@ -1405,25 +1405,25 @@ var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "no
1405
1405
  var e = {};
1406
1406
  return this.width && this.height && (e.width = "".concat(this.width, "px"), e.height = "".concat(this.height, "px"), this.transitions && this.transitions.enabled && (e.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction))), e;
1407
1407
  }, classes: function() {
1408
- var e = this.handlersClasses, i = this.handlersWrappersClasses, t = this.linesClasses, n = this.linesWrappersClasses;
1409
- return { root: Pt(), handlers: e, handlersWrappers: i, lines: t, linesWrappers: n };
1408
+ var e = this.handlersClasses, n = this.handlersWrappersClasses, t = this.linesClasses, i = this.linesWrappersClasses;
1409
+ return { root: Pt(), handlers: e, handlersWrappers: n, lines: t, linesWrappers: i };
1410
1410
  }, lineNodes: function() {
1411
- var e = this, i = [];
1411
+ var e = this, n = [];
1412
1412
  return this.points.forEach(function(t) {
1413
- t.horizontalDirection && t.verticalDirection || !e.lines[t.name] || i.push({ name: t.name, component: e.linesComponent, class: de(e.classes.lines.default, e.classes.lines[t.name], !e.resizable && e.classes.lines.disabled), wrapperClass: de(e.classes.linesWrappers.default, e.classes.linesWrappers[t.name], !e.resizable && e.classes.linesWrappers.disabled), hoverClass: e.classes.lines.hover, verticalDirection: t.verticalDirection, horizontalDirection: t.horizontalDirection, disabled: !e.resizable });
1414
- }), i;
1413
+ t.horizontalDirection && t.verticalDirection || !e.lines[t.name] || n.push({ name: t.name, component: e.linesComponent, class: de(e.classes.lines.default, e.classes.lines[t.name], !e.resizable && e.classes.lines.disabled), wrapperClass: de(e.classes.linesWrappers.default, e.classes.linesWrappers[t.name], !e.resizable && e.classes.linesWrappers.disabled), hoverClass: e.classes.lines.hover, verticalDirection: t.verticalDirection, horizontalDirection: t.horizontalDirection, disabled: !e.resizable });
1414
+ }), n;
1415
1415
  }, handlerNodes: function() {
1416
- var e = this, i = [], t = this.width, n = this.height;
1416
+ var e = this, n = [], t = this.width, i = this.height;
1417
1417
  return this.points.forEach(function(a) {
1418
1418
  if (e.handlers[a.name]) {
1419
1419
  var o = { name: a.name, component: e.handlersComponent, class: de(e.classes.handlers.default, e.classes.handlers[a.name]), wrapperClass: de(e.classes.handlersWrappers.default, e.classes.handlersWrappers[a.name]), hoverClass: e.classes.handlers.hover, verticalDirection: a.verticalDirection, horizontalDirection: a.horizontalDirection, disabled: !e.resizable };
1420
- if (t && n) {
1421
- 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;
1420
+ if (t && i) {
1421
+ var r = a.horizontalDirection, l = a.verticalDirection, s = r === "east" ? t : r === "west" ? 0 : t / 2, u = l === "south" ? i : l === "north" ? 0 : i / 2;
1422
1422
  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));
1423
1423
  } else o.wrapperClass = Pt("handler", Ae({}, a.classname, !0));
1424
- i.push(o);
1424
+ n.push(o);
1425
1425
  }
1426
- }), i;
1426
+ }), n;
1427
1427
  } }, beforeMount: function() {
1428
1428
  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 });
1429
1429
  }, beforeUnmount: function() {
@@ -1432,26 +1432,26 @@ var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "no
1432
1432
  this.touches = [];
1433
1433
  }, methods: { onEnd: function() {
1434
1434
  this.$emit("resize-end");
1435
- }, onHandlerDrag: function(e, i, t) {
1436
- var n, a = e.shift(), o = a.left, r = a.top, l = { left: 0, right: 0, top: 0, bottom: 0 };
1437
- 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 no(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 }));
1435
+ }, onHandlerDrag: function(e, n, t) {
1436
+ var i, a = e.shift(), o = a.left, r = a.top, l = { left: 0, right: 0, top: 0, bottom: 0 };
1437
+ n === "west" ? l.left -= o : n === "east" && (l.right += o), t === "north" ? l.top -= r : t === "south" && (l.bottom += r), !t && n ? i = "width" : t && !n && (i = "height"), this.resizable && this.$emit("resize", new io(l, { allowedDirections: { left: n === "west" || !n, right: n === "east" || !n, bottom: t === "south" || !t, top: t === "north" || !t }, preserveAspectRatio: e.nativeEvent && e.nativeEvent.shiftKey, respectDirection: i }));
1438
1438
  } }, emits: ["resize", "resize-end"] };
1439
- qi.render = function(e, i, t, n, a, o) {
1439
+ Zn.render = function(e, n, t, i, a, o) {
1440
1440
  return F(), G("div", { ref: "box", class: o.classes.root, style: o.style }, [he(e.$slots, "default"), C("div", null, [(F(!0), G(Re, null, Ke(o.lineNodes, function(r) {
1441
1441
  return F(), G(yt(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) {
1442
1442
  return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
1443
- }, onDragEnd: i[1] || (i[1] = function(l) {
1443
+ }, onDragEnd: n[1] || (n[1] = function(l) {
1444
1444
  return o.onEnd();
1445
1445
  }) }, null, 8, ["default-class", "hover-class", "wrapper-class", "position", "disabled", "onDrag"]);
1446
1446
  }), 128))]), (F(!0), G(Re, null, Ke(o.handlerNodes, function(r) {
1447
1447
  return F(), G("div", { key: r.name, style: r.wrapperStyle, class: r.wrapperClass }, [(F(), G(yt(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) {
1448
1448
  return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
1449
- }, onDragEnd: i[2] || (i[2] = function(l) {
1449
+ }, onDragEnd: n[2] || (n[2] = function(l) {
1450
1450
  return o.onEnd();
1451
1451
  }) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
1452
1452
  }), 128))], 6);
1453
1453
  };
1454
- var Oo = Me("vue-draggable-area"), Zi = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
1454
+ var Oo = Me("vue-draggable-area"), Qn = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
1455
1455
  return { default: Oo() };
1456
1456
  } }, beforeMount: function() {
1457
1457
  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 });
@@ -1461,66 +1461,66 @@ var Oo = Me("vue-draggable-area"), Zi = { name: "DraggableArea", props: { movabl
1461
1461
  this.touches = [], this.touchStarted = !1;
1462
1462
  }, methods: { onTouchStart: function(e) {
1463
1463
  if (e.cancelable) {
1464
- var i = this.movable && e.touches.length === 1;
1465
- i && (this.touches = qe(e.touches)), (this.touchStarted || i) && (e.preventDefault(), e.stopPropagation());
1464
+ var n = this.movable && e.touches.length === 1;
1465
+ n && (this.touches = qe(e.touches)), (this.touchStarted || n) && (e.preventDefault(), e.stopPropagation());
1466
1466
  }
1467
1467
  }, onTouchEnd: function() {
1468
1468
  this.touchStarted = !1, this.processEnd();
1469
1469
  }, onTouchMove: function(e) {
1470
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Gi({ 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));
1470
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Wn({ 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));
1471
1471
  }, onMouseDown: function(e) {
1472
1472
  if (this.movable && e.button === 0) {
1473
- var i = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1474
- this.touches = [i], this.initAnchor(i), e.stopPropagation();
1473
+ var n = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1474
+ this.touches = [n], this.initAnchor(n), e.stopPropagation();
1475
1475
  }
1476
1476
  }, onMouseMove: function(e) {
1477
1477
  this.touches.length && (this.processMove(e, [{ fake: !0, clientX: e.clientX, clientY: e.clientY }]), e.preventDefault && e.cancelable && e.preventDefault(), e.stopPropagation());
1478
1478
  }, onMouseUp: function() {
1479
1479
  this.processEnd();
1480
1480
  }, initAnchor: function(e) {
1481
- var i = this.$refs.container.getBoundingClientRect(), t = i.left, n = i.top;
1482
- this.anchor = { x: e.clientX - t, y: e.clientY - n };
1483
- }, processMove: function(e, i) {
1484
- var t = qe(i);
1481
+ var n = this.$refs.container.getBoundingClientRect(), t = n.left, i = n.top;
1482
+ this.anchor = { x: e.clientX - t, y: e.clientY - i };
1483
+ }, processMove: function(e, n) {
1484
+ var t = qe(n);
1485
1485
  if (this.touches.length) {
1486
- var n = this.$refs.container.getBoundingClientRect(), a = n.left, o = n.top;
1486
+ var i = this.$refs.container.getBoundingClientRect(), a = i.left, o = i.top;
1487
1487
  this.touches.length === 1 && t.length === 1 && this.$emit("move", new Qt({ left: t[0].clientX - (a + this.anchor.x), top: t[0].clientY - (o + this.anchor.y) }));
1488
1488
  }
1489
1489
  }, processEnd: function() {
1490
1490
  this.touches.length && this.$emit("move-end"), this.touches = [];
1491
1491
  } }, emits: ["move", "move-end"] };
1492
- Zi.render = function(e, i, t, n, a, o) {
1493
- return F(), G("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
1492
+ Qn.render = function(e, n, t, i, a, o) {
1493
+ return F(), G("div", { ref: "container", onTouchstart: n[1] || (n[1] = function() {
1494
1494
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1495
- }), onMousedown: i[2] || (i[2] = function() {
1495
+ }), onMousedown: n[2] || (n[2] = function() {
1496
1496
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
1497
1497
  }) }, [he(e.$slots, "default")], 544);
1498
1498
  };
1499
1499
  function Dt(e) {
1500
- var i, t;
1501
- return { rotate: e.rotate || 0, flip: { horizontal: ((i = e == null ? void 0 : e.flip) === null || i === void 0 ? void 0 : i.horizontal) || !1, vertical: ((t = e == null ? void 0 : e.flip) === null || t === void 0 ? void 0 : t.vertical) || !1 } };
1500
+ var n, t;
1501
+ return { rotate: e.rotate || 0, flip: { horizontal: ((n = e == null ? void 0 : e.flip) === null || n === void 0 ? void 0 : n.horizontal) || !1, vertical: ((t = e == null ? void 0 : e.flip) === null || t === void 0 ? void 0 : t.vertical) || !1 } };
1502
1502
  }
1503
1503
  function zo(e) {
1504
- return new Promise(function(i, t) {
1504
+ return new Promise(function(n, t) {
1505
1505
  try {
1506
- if (e) if (/^data:/i.test(e)) i(function(s) {
1506
+ if (e) if (/^data:/i.test(e)) n(function(s) {
1507
1507
  s = s.replace(/^data:([^;]+);base64,/gim, "");
1508
1508
  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);
1509
1509
  return h;
1510
1510
  }(e));
1511
1511
  else if (/^blob:/i.test(e)) {
1512
- var n = new FileReader();
1513
- n.onload = function(s) {
1514
- i(s.target.result);
1512
+ var i = new FileReader();
1513
+ i.onload = function(s) {
1514
+ n(s.target.result);
1515
1515
  }, o = e, r = function(s) {
1516
- n.readAsArrayBuffer(s);
1516
+ i.readAsArrayBuffer(s);
1517
1517
  }, (l = new XMLHttpRequest()).open("GET", o, !0), l.responseType = "blob", l.onload = function() {
1518
1518
  this.status != 200 && this.status !== 0 || r(this.response);
1519
1519
  }, l.send();
1520
1520
  } else {
1521
1521
  var a = new XMLHttpRequest();
1522
1522
  a.onreadystatechange = function() {
1523
- a.readyState === 4 && (a.status === 200 || a.status === 0 ? i(a.response) : t("Warning: could not load an image to parse its orientation"), a = null);
1523
+ a.readyState === 4 && (a.status === 200 || a.status === 0 ? n(a.response) : t("Warning: could not load an image to parse its orientation"), a = null);
1524
1524
  }, a.onprogress = function() {
1525
1525
  a.getResponseHeader("content-type") !== "image/jpeg" && a.abort();
1526
1526
  }, a.withCredentials = !1, a.open("GET", e, !0), a.responseType = "arraybuffer", a.send(null);
@@ -1532,13 +1532,13 @@ function zo(e) {
1532
1532
  var o, r, l;
1533
1533
  });
1534
1534
  }
1535
- function Qi(e) {
1536
- var i = e.rotate, t = e.flip, n = e.scaleX, a = e.scaleY, o = "";
1537
- return o += " rotate(" + i + "deg) ", o += " scaleX(" + n * (t.horizontal ? -1 : 1) + ") ", o += " scaleY(" + a * (t.vertical ? -1 : 1) + ") ";
1535
+ function Jn(e) {
1536
+ var n = e.rotate, t = e.flip, i = e.scaleX, a = e.scaleY, o = "";
1537
+ return o += " rotate(" + n + "deg) ", o += " scaleX(" + i * (t.horizontal ? -1 : 1) + ") ", o += " scaleY(" + a * (t.vertical ? -1 : 1) + ") ";
1538
1538
  }
1539
1539
  function Fo(e) {
1540
1540
  try {
1541
- var i, t = new DataView(e), n = void 0, a = void 0, o = void 0, r = void 0;
1541
+ var n, t = new DataView(e), i = void 0, a = void 0, o = void 0, r = void 0;
1542
1542
  if (t.getUint8(0) === 255 && t.getUint8(1) === 216) for (var l = t.byteLength, s = 2; s + 1 < l; ) {
1543
1543
  if (t.getUint8(s) === 255 && t.getUint8(s + 1) === 225) {
1544
1544
  o = s;
@@ -1546,51 +1546,51 @@ function Fo(e) {
1546
1546
  }
1547
1547
  s++;
1548
1548
  }
1549
- if (o && (n = o + 10, function(c, y, v) {
1549
+ if (o && (i = o + 10, function(c, y, v) {
1550
1550
  var g, w = "";
1551
1551
  for (g = y, v += y; g < v; g++) w += String.fromCharCode(c.getUint8(g));
1552
1552
  return w;
1553
1553
  }(t, o + 4, 4) === "Exif")) {
1554
- var u = t.getUint16(n);
1555
- if (((a = u === 18761) || u === 19789) && t.getUint16(n + 2, a) === 42) {
1556
- var d = t.getUint32(n + 4, a);
1557
- d >= 8 && (r = n + d);
1554
+ var u = t.getUint16(i);
1555
+ if (((a = u === 18761) || u === 19789) && t.getUint16(i + 2, a) === 42) {
1556
+ var d = t.getUint32(i + 4, a);
1557
+ d >= 8 && (r = i + d);
1558
1558
  }
1559
1559
  }
1560
1560
  if (r) {
1561
1561
  for (var h = t.getUint16(r, a), m = 0; m < h; m++)
1562
1562
  if (s = r + 12 * m + 2, t.getUint16(s, a) === 274) {
1563
- s += 8, i = t.getUint16(s, a), t.setUint16(s, 1, a);
1563
+ s += 8, n = t.getUint16(s, a), t.setUint16(s, 1, a);
1564
1564
  break;
1565
1565
  }
1566
1566
  }
1567
- return i;
1567
+ return n;
1568
1568
  } catch {
1569
1569
  return null;
1570
1570
  }
1571
1571
  }
1572
- function ki(e, i) {
1573
- var t = i.getBoundingClientRect(), n = t.left, a = t.top, o = { left: 0, top: 0 }, r = 0;
1572
+ function Mn(e, n) {
1573
+ var t = n.getBoundingClientRect(), i = t.left, a = t.top, o = { left: 0, top: 0 }, r = 0;
1574
1574
  return e.forEach(function(l) {
1575
- o.left += (l.clientX - n) / e.length, o.top += (l.clientY - a) / e.length;
1575
+ o.left += (l.clientX - i) / e.length, o.top += (l.clientY - a) / e.length;
1576
1576
  }), e.forEach(function(l) {
1577
- r += Gi({ x: o.left, y: o.top }, { x: l.clientX - n, y: l.clientY - a });
1577
+ r += Wn({ x: o.left, y: o.top }, { x: l.clientX - i, y: l.clientY - a });
1578
1578
  }), { centerMass: o, spread: r, count: e.length };
1579
1579
  }
1580
- var Ji = { 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() {
1580
+ var ei = { 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() {
1581
1581
  window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
1582
1582
  }, beforeUnmount: function() {
1583
1583
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
1584
1584
  }, created: function() {
1585
1585
  this.transforming = !1, this.debouncedProcessEnd = Bt(this.processEnd), this.touches = [];
1586
- }, methods: { processMove: function(e, i) {
1586
+ }, methods: { processMove: function(e, n) {
1587
1587
  if (this.touches.length) {
1588
- if (this.touches.length === 1 && i.length === 1) this.$emit("move", new at({ left: this.touches[0].clientX - i[0].clientX, top: this.touches[0].clientY - i[0].clientY }));
1588
+ if (this.touches.length === 1 && n.length === 1) this.$emit("move", new at({ left: this.touches[0].clientX - n[0].clientX, top: this.touches[0].clientY - n[0].clientY }));
1589
1589
  else if (this.touches.length > 1 && this.touchResize) {
1590
- var t = ki(i, this.$refs.container), n = this.oldGeometricProperties;
1591
- n.count === t.count && n.count > 1 && this.$emit("resize", new at({ left: n.centerMass.left - t.centerMass.left, top: n.centerMass.top - t.centerMass.top }, { factor: n.spread / t.spread, center: t.centerMass })), this.oldGeometricProperties = t;
1590
+ var t = Mn(n, this.$refs.container), i = this.oldGeometricProperties;
1591
+ i.count === t.count && i.count > 1 && this.$emit("resize", new at({ left: i.centerMass.left - t.centerMass.left, top: i.centerMass.top - t.centerMass.top }, { factor: i.spread / t.spread, center: t.centerMass })), this.oldGeometricProperties = t;
1592
1592
  }
1593
- this.touches = i;
1593
+ this.touches = n;
1594
1594
  }
1595
1595
  }, processEnd: function() {
1596
1596
  this.transforming && (this.transforming = !1, this.$emit("transform-end"));
@@ -1600,27 +1600,27 @@ var Ji = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
1600
1600
  return this.eventsFilter ? this.eventsFilter(e, this.transforming) !== !1 : (e.preventDefault(), e.stopPropagation(), !0);
1601
1601
  }, onTouchStart: function(e) {
1602
1602
  if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
1603
- var i = this.$refs.container, t = i.getBoundingClientRect(), n = t.left, a = t.top, o = t.bottom, r = t.right;
1603
+ var n = this.$refs.container, t = n.getBoundingClientRect(), i = t.left, a = t.top, o = t.bottom, r = t.right;
1604
1604
  this.touches = qe(e.touches).filter(function(l) {
1605
- return l.clientX > n && l.clientX < r && l.clientY > a && l.clientY < o;
1606
- }), this.oldGeometricProperties = ki(this.touches, i);
1605
+ return l.clientX > i && l.clientX < r && l.clientY > a && l.clientY < o;
1606
+ }), this.oldGeometricProperties = Mn(this.touches, n);
1607
1607
  }
1608
1608
  }, onTouchEnd: function(e) {
1609
1609
  e.touches.length === 0 && (this.touches = [], this.processEnd());
1610
1610
  }, onTouchMove: function(e) {
1611
- var i = this;
1611
+ var n = this;
1612
1612
  if (this.touches.length) {
1613
- var t = qe(e.touches).filter(function(n) {
1614
- return !n.identifier || i.touches.find(function(a) {
1615
- return a.identifier === n.identifier;
1613
+ var t = qe(e.touches).filter(function(i) {
1614
+ return !i.identifier || n.touches.find(function(a) {
1615
+ return a.identifier === i.identifier;
1616
1616
  });
1617
1617
  });
1618
1618
  this.processEvent(e) && (this.processMove(e, t), this.processStart());
1619
1619
  }
1620
1620
  }, onMouseDown: function(e) {
1621
1621
  if (this.mouseMove && "buttons" in e && e.buttons === 1 && this.processEvent(e)) {
1622
- var i = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1623
- this.touches = [i], this.processStart();
1622
+ var n = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1623
+ this.touches = [n], this.processStart();
1624
1624
  }
1625
1625
  }, onMouseMove: function(e) {
1626
1626
  this.touches.length && this.processEvent(e) && this.processMove(e, [{ clientX: e.clientX, clientY: e.clientY }]);
@@ -1628,32 +1628,32 @@ var Ji = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
1628
1628
  this.touches = [], this.processEnd();
1629
1629
  }, onWheel: function(e) {
1630
1630
  if (this.wheelResize && this.processEvent(e)) {
1631
- 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 };
1631
+ var n = this.$refs.container.getBoundingClientRect(), t = n.left, i = n.top, a = 1 + this.wheelResize.ratio * (r = e.deltaY || e.detail || e.wheelDelta, (l = +r) == 0 || Gn(l) ? l : l > 0 ? 1 : -1), o = { left: e.clientX - t, top: e.clientY - i };
1632
1632
  this.$emit("resize", new at({}, { factor: a, center: o })), this.touches.length || this.debouncedProcessEnd();
1633
1633
  }
1634
1634
  var r, l;
1635
1635
  } }, emits: ["resize", "move", "transform-end"] };
1636
- Ji.render = function(e, i, t, n, a, o) {
1637
- return F(), G("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
1636
+ ei.render = function(e, n, t, i, a, o) {
1637
+ return F(), G("div", { ref: "container", onTouchstart: n[1] || (n[1] = function() {
1638
1638
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1639
- }), onMousedown: i[2] || (i[2] = function() {
1639
+ }), onMousedown: n[2] || (n[2] = function() {
1640
1640
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
1641
- }), onWheel: i[3] || (i[3] = function() {
1641
+ }), onWheel: n[3] || (n[3] = function() {
1642
1642
  return o.onWheel && o.onWheel.apply(o, arguments);
1643
1643
  }) }, [he(e.$slots, "default")], 544);
1644
1644
  };
1645
- var jt = { components: { TransformableImage: Ji }, 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"] };
1646
- jt.render = function(e, i, t, n, a, o) {
1645
+ var jt = { components: { TransformableImage: ei }, 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"] };
1646
+ jt.render = function(e, n, t, i, a, o) {
1647
1647
  var r = B("transformable-image");
1648
- return F(), 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) {
1648
+ return F(), G(r, { "touch-move": t.touchMove, "touch-resize": t.touchResize, "mouse-move": t.mouseMove, "wheel-resize": t.wheelResize, onMove: n[1] || (n[1] = function(l) {
1649
1649
  return e.$emit("move", l);
1650
- }), onResize: i[2] || (i[2] = function(l) {
1650
+ }), onResize: n[2] || (n[2] = function(l) {
1651
1651
  return e.$emit("resize", l);
1652
1652
  }) }, { default: N(function() {
1653
1653
  return [he(e.$slots, "default")];
1654
1654
  }), _: 3 }, 8, ["touch-move", "touch-resize", "mouse-move", "wheel-resize"]);
1655
1655
  };
1656
- var gt = Me("vue-preview"), en = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
1656
+ var gt = Me("vue-preview"), ti = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
1657
1657
  return {};
1658
1658
  } }, imageClass: { type: String }, width: { type: Number }, height: { type: Number }, fill: { type: Boolean } }, data: function() {
1659
1659
  return { calculatedImageSize: { width: 0, height: 0 }, calculatedSize: { width: 0, height: 0 } };
@@ -1668,9 +1668,9 @@ var gt = Me("vue-preview"), en = { props: { coordinates: { type: Object }, trans
1668
1668
  return this.transitions && this.transitions.enabled && (e.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), e;
1669
1669
  }, imageStyle: function() {
1670
1670
  if (this.coordinates && this.image) {
1671
- var e = this.coordinates.width / this.size.width, i = ne(ne({ 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 = Hi({ 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 } };
1671
+ var e = this.coordinates.width / this.size.width, n = ie(ie({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / e, scaleY: 1 / e }), t = this.imageSize.width, i = this.imageSize.height, a = Xn({ width: t, height: i }, n.rotate), o = { width: "".concat(t, "px"), height: "".concat(i, "px"), left: "0px", top: "0px" }, r = { rotate: { left: (t - a.width) * n.scaleX / 2, top: (i - a.height) * n.scaleY / 2 }, scale: { left: (1 - n.scaleX) * t / 2, top: (1 - n.scaleY) * i / 2 } };
1672
1672
  return o.transform = `translate(
1673
- `.concat(-this.coordinates.left / e - r.rotate.left - r.scale.left, "px,").concat(-this.coordinates.top / e - r.rotate.top - r.scale.top, "px) ") + Qi(i), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
1673
+ `.concat(-this.coordinates.left / e - r.rotate.left - r.scale.left, "px,").concat(-this.coordinates.top / e - r.rotate.top - r.scale.top, "px) ") + Jn(n), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
1674
1674
  }
1675
1675
  return {};
1676
1676
  }, size: function() {
@@ -1696,18 +1696,18 @@ var gt = Me("vue-preview"), en = { props: { coordinates: { type: Object }, trans
1696
1696
  var e = this.$refs.image;
1697
1697
  e && e.complete && this.refreshImage(), this.refresh();
1698
1698
  } } };
1699
- en.render = function(e, i, t, n, a, o) {
1699
+ ti.render = function(e, n, t, i, a, o) {
1700
1700
  return F(), 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"]), [[wt, t.image && t.image.src]])], 6)], 6);
1701
1701
  };
1702
- var tn = { components: { Preview: en }, inheritAttrs: !1 };
1703
- tn.render = function(e, i, t, n, a, o) {
1702
+ var ni = { components: { Preview: ti }, inheritAttrs: !1 };
1703
+ ni.render = function(e, n, t, i, a, o) {
1704
1704
  var r = B("preview");
1705
- return F(), G(r, Pi(e.$attrs, { fill: !0 }), null, 16);
1705
+ return F(), G(r, Dn(e.$attrs, { fill: !0 }), null, 16);
1706
1706
  };
1707
- var Tt = Me("vue-rectangle-stencil"), nn = { name: "RectangleStencil", components: { StencilPreview: tn, BoundingBox: qi, DraggableArea: Zi }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
1708
- return ei;
1707
+ var Tt = Me("vue-rectangle-stencil"), ii = { name: "RectangleStencil", components: { StencilPreview: ni, BoundingBox: Zn, DraggableArea: Qn }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
1708
+ return en;
1709
1709
  } }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
1710
- return ti;
1710
+ return tn;
1711
1711
  } }, aspectRatio: { type: [Number, String] }, minAspectRatio: { type: [Number, String] }, maxAspectRatio: { type: [Number, String] }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String }, linesClasses: { type: Object, default: function() {
1712
1712
  return {};
1713
1713
  } }, linesWrappersClasses: { type: Object, default: function() {
@@ -1721,7 +1721,7 @@ var Tt = Me("vue-rectangle-stencil"), nn = { name: "RectangleStencil", component
1721
1721
  }, computed: { classes: function() {
1722
1722
  return { stencil: de(Tt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: de(Tt("preview"), this.previewClass), boundingBox: de(Tt("bounding-box"), this.boundingBoxClass) };
1723
1723
  }, style: function() {
1724
- var e = this.stencilCoordinates, i = e.height, t = e.width, n = e.left, a = e.top, o = { width: "".concat(t, "px"), height: "".concat(i, "px"), transform: "translate(".concat(n, "px, ").concat(a, "px)") };
1724
+ var e = this.stencilCoordinates, n = e.height, t = e.width, i = e.left, a = e.top, o = { width: "".concat(t, "px"), height: "".concat(n, "px"), transform: "translate(".concat(i, "px, ").concat(a, "px)") };
1725
1725
  return this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
1726
1726
  } }, methods: { onMove: function(e) {
1727
1727
  this.$emit("move", e), this.moving = !0;
@@ -1734,7 +1734,7 @@ var Tt = Me("vue-rectangle-stencil"), nn = { name: "RectangleStencil", component
1734
1734
  }, aspectRatios: function() {
1735
1735
  return { minimum: this.aspectRatio || this.minAspectRatio, maximum: this.aspectRatio || this.maxAspectRatio };
1736
1736
  } }, emits: ["resize", "resize-end", "move", "move-end"] };
1737
- nn.render = function(e, i, t, n, a, o) {
1737
+ ii.render = function(e, n, t, i, a, o) {
1738
1738
  var r = B("stencil-preview"), l = B("draggable-area"), s = B("bounding-box");
1739
1739
  return F(), 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() {
1740
1740
  return [C(l, { movable: t.movable, onMove: o.onMove, onMoveEnd: o.onMoveEnd }, { default: N(function() {
@@ -1742,8 +1742,8 @@ nn.render = function(e, i, t, n, a, o) {
1742
1742
  }), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
1743
1743
  }), _: 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);
1744
1744
  };
1745
- var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper", components: { BackgroundWrapper: jt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
1746
- return nn;
1745
+ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper", components: { BackgroundWrapper: jt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
1746
+ return ii;
1747
1747
  } }, backgroundWrapperComponent: { type: [Object, String], default: function() {
1748
1748
  return jt;
1749
1749
  } }, stencilProps: { type: Object, default: function() {
@@ -1753,11 +1753,11 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1753
1753
  } }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(e) {
1754
1754
  return !(typeof e == "string" && e !== "fill" && e !== "fit");
1755
1755
  } }, priority: { type: String, default: "coordinates" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(e) {
1756
- var i = e.event, t = e.coordinates, n = e.aspectRatio, a = e.positionRestrictions, o = e.sizeRestrictions, r = H(H({}, t), { right: t.left + t.width, bottom: t.top + t.height }), l = i.params || {}, s = H({}, i.directions), u = l.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
1756
+ var n = e.event, t = e.coordinates, i = e.aspectRatio, a = e.positionRestrictions, o = e.sizeRestrictions, r = H(H({}, t), { right: t.left + t.width, bottom: t.top + t.height }), l = n.params || {}, s = H({}, n.directions), u = l.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
1757
1757
  o.widthFrozen && (s.left = 0, s.right = 0), o.heightFrozen && (s.top = 0, s.bottom = 0), ze.forEach(function(I) {
1758
1758
  u[I] || (s[I] = 0);
1759
1759
  });
1760
- var d = Oe(r, s = xi({ coordinates: r, directions: s, sizeRestrictions: o, positionRestrictions: a })).width, h = Oe(r, s).height, m = l.preserveRatio ? oe(r) : It(d / h, n);
1760
+ var d = Oe(r, s = kn({ coordinates: r, directions: s, sizeRestrictions: o, positionRestrictions: a })).width, h = Oe(r, s).height, m = l.preserveRatio ? oe(r) : It(d / h, i);
1761
1761
  if (m) {
1762
1762
  var c = l.respectDirection;
1763
1763
  if (c || (c = r.width >= r.height || m === 1 ? "width" : "height"), c === "width") {
@@ -1773,39 +1773,39 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1773
1773
  s.left = -ft(w, z, O), s.right = -ft(w, O, z);
1774
1774
  } else u.left ? s.left = -w : u.right ? s.right = -w : u.top ? s.top = 0 : u.bottom && (s.bottom = 0);
1775
1775
  }
1776
- s = xi({ directions: s, coordinates: r, sizeRestrictions: o, positionRestrictions: a, preserveRatio: !0, compensate: l.compensate });
1776
+ s = kn({ directions: s, coordinates: r, sizeRestrictions: o, positionRestrictions: a, preserveRatio: !0, compensate: l.compensate });
1777
1777
  }
1778
- return d = Oe(r, s).width, h = Oe(r, s).height, (m = l.preserveRatio ? oe(r) : It(d / h, n)) && Math.abs(m - d / h) > 1e-3 && ze.forEach(function(I) {
1778
+ return d = Oe(r, s).width, h = Oe(r, s).height, (m = l.preserveRatio ? oe(r) : It(d / h, i)) && Math.abs(m - d / h) > 1e-3 && ze.forEach(function(I) {
1779
1779
  u[I] || (s[I] = 0);
1780
1780
  }), 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 });
1781
1781
  } }, moveAlgorithm: { type: Function, default: Wt }, initStretcher: { type: Function, default: function(e) {
1782
- var i = e.stretcher, t = e.imageSize, n = oe(t);
1783
- i.style.width = t.width + "px", i.style.height = i.clientWidth / n + "px", i.style.width = i.clientWidth + "px";
1782
+ var n = e.stretcher, t = e.imageSize, i = oe(t);
1783
+ n.style.width = t.width + "px", n.style.height = n.clientWidth / i + "px", n.style.width = n.clientWidth + "px";
1784
1784
  } }, fitCoordinates: { type: Function, default: function(e) {
1785
- var i = e.visibleArea, t = e.coordinates, n = e.aspectRatio, a = e.sizeRestrictions, o = e.positionRestrictions, r = H(H({}, 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) } }));
1786
- return r = ve(r = Se(r, tt(ge(t), ge(r))), xt(Fe(i), o));
1785
+ var n = e.visibleArea, t = e.coordinates, i = e.aspectRatio, a = e.sizeRestrictions, o = e.positionRestrictions, r = H(H({}, t), De({ width: t.width, height: t.height, aspectRatio: i, sizeRestrictions: { maxWidth: n.width, maxHeight: n.height, minHeight: Math.min(n.height, a.minHeight), minWidth: Math.min(n.width, a.minWidth) } }));
1786
+ return r = ve(r = Se(r, tt(ge(t), ge(r))), xt(Fe(n), o));
1787
1787
  } }, fitVisibleArea: { type: Function, default: function(e) {
1788
- var i = e.visibleArea, t = e.boundaries, n = e.getAreaRestrictions, a = e.coordinates, o = H({}, i);
1789
- o.height = o.width / oe(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)));
1790
- var r = Rt(nt(a, Fe(o = xe(o, At(o, n({ visibleArea: o, type: "resize" }))))));
1791
- return o.width < a.width && (r.left = 0), o.height < a.height && (r.top = 0), o = ve(o = Se(o, r), n({ visibleArea: o, type: "move" }));
1788
+ var n = e.visibleArea, t = e.boundaries, i = e.getAreaRestrictions, a = e.coordinates, o = H({}, n);
1789
+ o.height = o.width / oe(t), o.top += (n.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)));
1790
+ var r = Rt(it(a, Fe(o = xe(o, At(o, i({ visibleArea: o, type: "resize" }))))));
1791
+ return o.width < a.width && (r.left = 0), o.height < a.height && (r.top = 0), o = ve(o = Se(o, r), i({ visibleArea: o, type: "move" }));
1792
1792
  } }, areaRestrictionsAlgorithm: { type: Function, default: function(e) {
1793
- var i = e.visibleArea, t = e.boundaries, n = e.imageSize, a = e.imageRestriction, o = e.type, r = {};
1794
- return a === "fill-area" ? r = { left: 0, top: 0, right: n.width, bottom: n.height } : a === "fit-area" && (oe(t) > oe(n) ? (r = { top: 0, bottom: n.height }, i && o === "move" && (i.width > n.width ? (r.left = -(i.width - n.width) / 2, r.right = n.width - r.left) : (r.left = 0, r.right = n.width))) : (r = { left: 0, right: n.width }, i && o === "move" && (i.height > n.height ? (r.top = -(i.height - n.height) / 2, r.bottom = n.height - r.top) : (r.top = 0, r.bottom = n.height)))), r;
1793
+ var n = e.visibleArea, t = e.boundaries, i = e.imageSize, a = e.imageRestriction, o = e.type, r = {};
1794
+ return a === "fill-area" ? r = { left: 0, top: 0, right: i.width, bottom: i.height } : a === "fit-area" && (oe(t) > oe(i) ? (r = { top: 0, bottom: i.height }, n && o === "move" && (n.width > i.width ? (r.left = -(n.width - i.width) / 2, r.right = i.width - r.left) : (r.left = 0, r.right = i.width))) : (r = { left: 0, right: i.width }, n && o === "move" && (n.height > i.height ? (r.top = -(n.height - i.height) / 2, r.bottom = i.height - r.top) : (r.top = 0, r.bottom = i.height)))), r;
1795
1795
  } }, sizeRestrictionsAlgorithm: { type: Function, default: function(e) {
1796
1796
  return { minWidth: e.minWidth, minHeight: e.minHeight, maxWidth: e.maxWidth, maxHeight: e.maxHeight };
1797
1797
  } }, positionRestrictionsAlgorithm: { type: Function, default: function(e) {
1798
- var i = e.imageSize, t = {};
1799
- return e.imageRestriction !== "none" && (t = { left: 0, top: 0, right: i.width, bottom: i.height }), t;
1798
+ var n = e.imageSize, t = {};
1799
+ return e.imageRestriction !== "none" && (t = { left: 0, top: 0, right: n.width, bottom: n.height }), t;
1800
1800
  } } }, data: function() {
1801
- return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: ne({}, Si) };
1801
+ return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: ie({}, Cn) };
1802
1802
  }, computed: { image: function() {
1803
1803
  return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };
1804
1804
  }, imageTransforms: function() {
1805
1805
  return { rotate: this.appliedImageTransforms.rotate, flip: { horizontal: this.appliedImageTransforms.flip.horizontal, vertical: this.appliedImageTransforms.flip.vertical }, translateX: this.visibleArea ? this.visibleArea.left / this.coefficient : 0, translateY: this.visibleArea ? this.visibleArea.top / this.coefficient : 0, scaleX: 1 / this.coefficient, scaleY: 1 / this.coefficient };
1806
1806
  }, imageSize: function() {
1807
- var e = function(i) {
1808
- return i * Math.PI / 180;
1807
+ var e = function(n) {
1808
+ return n * Math.PI / 180;
1809
1809
  }(this.imageTransforms.rotate);
1810
1810
  return { width: Math.abs(this.imageAttributes.width * Math.cos(e)) + Math.abs(this.imageAttributes.height * Math.sin(e)), height: Math.abs(this.imageAttributes.width * Math.sin(e)) + Math.abs(this.imageAttributes.height * Math.cos(e)) };
1811
1811
  }, initialized: function() {
@@ -1822,14 +1822,14 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1822
1822
  }, sizeRestrictions: function() {
1823
1823
  if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
1824
1824
  var e = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: fe(this.minWidth) ? 0 : ht(this.minWidth), minHeight: fe(this.minHeight) ? 0 : ht(this.minHeight), maxWidth: fe(this.maxWidth) ? 1 / 0 : ht(this.maxWidth), maxHeight: fe(this.maxHeight) ? 1 / 0 : ht(this.maxHeight) });
1825
- if (e = function(n) {
1826
- var a = n.areaRestrictions, o = n.sizeRestrictions, r = n.boundaries, l = n.positionRestrictions, s = H(H({}, 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 });
1825
+ if (e = function(i) {
1826
+ var a = i.areaRestrictions, o = i.sizeRestrictions, r = i.boundaries, l = i.positionRestrictions, s = H(H({}, 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 });
1827
1827
  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));
1828
- var u = Gt(a), d = Yi(r, u);
1828
+ var u = Gt(a), d = Hn(r, u);
1829
1829
  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;
1830
1830
  }({ 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) {
1831
- var i = this.getStencilSize(), t = Gt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
1832
- 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);
1831
+ var n = this.getStencilSize(), t = Gt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
1832
+ e.maxWidth = Math.min(e.maxWidth, t.width * n.width / this.boundaries.width), e.maxHeight = Math.min(e.maxHeight, t.height * n.height / this.boundaries.height), e.maxWidth < e.minWidth && (e.minWidth = e.maxWidth), e.maxHeight < e.minHeight && (e.minHeight = e.maxHeight);
1833
1833
  }
1834
1834
  return e;
1835
1835
  }
@@ -1840,15 +1840,15 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1840
1840
  return { cropper: Ie(), image: de(Ie("image"), this.imageClass), stencil: Ie("stencil"), boundaries: de(Ie("boundaries"), this.boundariesClass), stretcher: de(Ie("stretcher")), background: de(Ie("background"), this.backgroundClass), foreground: de(Ie("foreground"), this.foregroundClass), imageWrapper: de(Ie("image-wrapper")), cropperWrapper: de(Ie("cropper-wrapper")) };
1841
1841
  }, stencilCoordinates: function() {
1842
1842
  if (this.initialized) {
1843
- var e = this.coordinates, i = e.width, t = e.height, n = e.left, a = e.top;
1844
- return { width: i / this.coefficient, height: t / this.coefficient, left: (n - this.visibleArea.left) / this.coefficient, top: (a - this.visibleArea.top) / this.coefficient };
1843
+ var e = this.coordinates, n = e.width, t = e.height, i = e.left, a = e.top;
1844
+ return { width: n / this.coefficient, height: t / this.coefficient, left: (i - this.visibleArea.left) / this.coefficient, top: (a - this.visibleArea.top) / this.coefficient };
1845
1845
  }
1846
1846
  return this.defaultCoordinates();
1847
1847
  }, boundariesStyle: function() {
1848
1848
  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" };
1849
1849
  return this.imageLoaded || (e.opacity = "0"), e;
1850
1850
  }, imageStyle: function() {
1851
- 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 = ne(ne({}, 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)") + Qi(n) };
1851
+ 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) }, n = { 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 }, i = 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(-n.left - t.left - this.imageTransforms.translateX, "px, ").concat(-n.top - t.top - this.imageTransforms.translateY, "px)") + Jn(i) };
1852
1852
  return this.transitionsOptions.enabled && (a.transition = "".concat(this.transitionsOptions.time, "ms ").concat(this.transitionsOptions.timingFunction)), a;
1853
1853
  } }, watch: { src: function() {
1854
1854
  this.onChangeImage();
@@ -1867,9 +1867,9 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1867
1867
  this.onPropsChange();
1868
1868
  }, imageRestriction: function() {
1869
1869
  this.reset();
1870
- }, stencilProps: function(e, i) {
1870
+ }, stencilProps: function(e, n) {
1871
1871
  ["aspectRatio", "minAspectRatio", "maxAspectRatio"].find(function(t) {
1872
- return e[t] !== i[t];
1872
+ return e[t] !== n[t];
1873
1873
  }) && this.$nextTick(this.onPropsChange);
1874
1874
  } }, created: function() {
1875
1875
  this.debouncedUpdate = Bt(this.update, this.debounce), this.debouncedDisableTransitions = Bt(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
@@ -1878,28 +1878,28 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1878
1878
  }, unmounted: function() {
1879
1879
  window.removeEventListener("resize", this.refresh), window.removeEventListener("orientationchange", this.refresh), this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.debouncedUpdate.clear(), this.debouncedDisableTransitions.clear();
1880
1880
  }, methods: { getResult: function() {
1881
- var e = this.initialized ? this.prepareResult(ne({}, this.coordinates)) : this.defaultCoordinates(), i = { rotate: this.imageTransforms.rotate % 360, flip: ne({}, this.imageTransforms.flip) };
1881
+ var e = this.initialized ? this.prepareResult(ie({}, this.coordinates)) : this.defaultCoordinates(), n = { rotate: this.imageTransforms.rotate % 360, flip: ie({}, this.imageTransforms.flip) };
1882
1882
  if (this.src && this.imageLoaded) {
1883
1883
  var t = this;
1884
- return { image: this.image, coordinates: e, visibleArea: this.visibleArea ? ne({}, this.visibleArea) : null, imageTransforms: i, get canvas() {
1884
+ return { image: this.image, coordinates: e, visibleArea: this.visibleArea ? ie({}, this.visibleArea) : null, imageTransforms: n, get canvas() {
1885
1885
  return t.canvas ? t.getCanvas() : void 0;
1886
1886
  } };
1887
1887
  }
1888
- return { image: this.image, coordinates: e, visibleArea: this.visibleArea ? ne({}, this.visibleArea) : null, canvas: void 0, imageTransforms: i };
1889
- }, zoom: function(e, i) {
1890
- var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.transitions, a = n === void 0 || n;
1891
- this.onManipulateImage(new at({}, { factor: 1 / e, center: i }), { normalize: !1, transitions: a });
1892
- }, move: function(e, i) {
1893
- var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.transitions, a = n === void 0 || n;
1894
- this.onManipulateImage(new at({ left: e || 0, top: i || 0 }), { normalize: !1, transitions: a });
1888
+ return { image: this.image, coordinates: e, visibleArea: this.visibleArea ? ie({}, this.visibleArea) : null, canvas: void 0, imageTransforms: n };
1889
+ }, zoom: function(e, n) {
1890
+ var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.transitions, a = i === void 0 || i;
1891
+ this.onManipulateImage(new at({}, { factor: 1 / e, center: n }), { normalize: !1, transitions: a });
1892
+ }, move: function(e, n) {
1893
+ var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.transitions, a = i === void 0 || i;
1894
+ this.onManipulateImage(new at({ left: e || 0, top: n || 0 }), { normalize: !1, transitions: a });
1895
1895
  }, setCoordinates: function(e) {
1896
- var i = this, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.autoZoom, a = n === void 0 || n, o = t.transitions, r = o === void 0 || o;
1896
+ var n = this, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = t.autoZoom, a = i === void 0 || i, o = t.transitions, r = o === void 0 || o;
1897
1897
  this.$nextTick(function() {
1898
- i.imageLoaded ? (i.transitionsActive || (r && i.enableTransitions(), i.coordinates = i.applyTransform(e), a && i.runAutoZoom("setCoordinates"), r && i.debouncedDisableTransitions()), i.onChange()) : i.delayedTransforms = e;
1898
+ n.imageLoaded ? (n.transitionsActive || (r && n.enableTransitions(), n.coordinates = n.applyTransform(e), a && n.runAutoZoom("setCoordinates"), r && n.debouncedDisableTransitions()), n.onChange()) : n.delayedTransforms = e;
1899
1899
  });
1900
1900
  }, refresh: function() {
1901
- var e = this, i = this.$refs.image;
1902
- if (this.src && i) return this.initialized ? this.updateVisibleArea().then(function() {
1901
+ var e = this, n = this.$refs.image;
1902
+ if (this.src && n) return this.initialized ? this.updateVisibleArea().then(function() {
1903
1903
  e.onChange();
1904
1904
  }) : this.resetVisibleArea().then(function() {
1905
1905
  e.onChange();
@@ -1910,27 +1910,27 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1910
1910
  e.onChange(!1);
1911
1911
  });
1912
1912
  }, awaitRender: function(e) {
1913
- var i = this;
1913
+ var n = this;
1914
1914
  this.awaiting || (this.awaiting = !0, this.$nextTick(function() {
1915
- e(), i.awaiting = !1;
1915
+ e(), n.awaiting = !1;
1916
1916
  }));
1917
1917
  }, prepareResult: function(e) {
1918
- return this.roundResult ? function(i) {
1919
- var t = i.coordinates, n = i.sizeRestrictions, a = i.positionRestrictions, o = { width: Math.round(t.width), height: Math.round(t.height), left: Math.round(t.left), top: Math.round(t.top) };
1920
- return o.width > n.maxWidth ? o.width = Math.floor(t.width) : o.width < n.minWidth && (o.width = Math.ceil(t.width)), o.height > n.maxHeight ? o.height = Math.floor(t.height) : o.height < n.minHeight && (o.height = Math.ceil(t.height)), ve(o, a);
1921
- }(ne(ne({}, this.getPublicProperties()), {}, { positionRestrictions: pt(this.positionRestrictions, this.visibleArea), coordinates: e })) : e;
1922
- }, processAutoZoom: function(e, i, t, n) {
1918
+ return this.roundResult ? function(n) {
1919
+ var t = n.coordinates, i = n.sizeRestrictions, a = n.positionRestrictions, o = { width: Math.round(t.width), height: Math.round(t.height), left: Math.round(t.left), top: Math.round(t.top) };
1920
+ return o.width > i.maxWidth ? o.width = Math.floor(t.width) : o.width < i.minWidth && (o.width = Math.ceil(t.width)), o.height > i.maxHeight ? o.height = Math.floor(t.height) : o.height < i.minHeight && (o.height = Math.ceil(t.height)), ve(o, a);
1921
+ }(ie(ie({}, this.getPublicProperties()), {}, { positionRestrictions: pt(this.positionRestrictions, this.visibleArea), coordinates: e })) : e;
1922
+ }, processAutoZoom: function(e, n, t, i) {
1923
1923
  var a = this.autoZoomAlgorithm;
1924
1924
  a || (a = this.stencilSize ? ho : this.autoZoom ? po : fo);
1925
- 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() });
1926
- return ne(ne({}, o), {}, { changed: !Ci(o.visibleArea, i) || !Ci(o.coordinates, t) });
1925
+ var o = a({ event: { type: e, params: i }, visibleArea: n, coordinates: t, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
1926
+ return ie(ie({}, o), {}, { changed: !Rn(o.visibleArea, n) || !Rn(o.coordinates, t) });
1927
1927
  }, runAutoZoom: function(e) {
1928
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = i.transitions, n = t !== void 0 && t, a = to(i, Eo), o = this.processAutoZoom(e, this.visibleArea, this.coordinates, a), r = o.visibleArea, l = o.coordinates, s = o.changed;
1929
- n && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, n && s && this.debouncedDisableTransitions();
1928
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.transitions, i = t !== void 0 && t, a = to(n, Eo), o = this.processAutoZoom(e, this.visibleArea, this.coordinates, a), r = o.visibleArea, l = o.coordinates, s = o.changed;
1929
+ i && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, i && s && this.debouncedDisableTransitions();
1930
1930
  }, normalizeEvent: function(e) {
1931
- return function(i) {
1932
- var t = i.event, n = i.visibleArea, a = i.coefficient;
1933
- if (t.type === "manipulateImage") return H(H({}, t), { move: { left: t.move && t.move.left ? a * t.move.left : 0, top: t.move && t.move.top ? a * t.move.top : 0 }, scale: { factor: t.scale && t.scale.factor ? t.scale.factor : 1, center: t.scale && t.scale.center ? { left: t.scale.center.left * a + n.left, top: t.scale.center.top * a + n.top } : null } });
1931
+ return function(n) {
1932
+ var t = n.event, i = n.visibleArea, a = n.coefficient;
1933
+ if (t.type === "manipulateImage") return H(H({}, t), { move: { left: t.move && t.move.left ? a * t.move.left : 0, top: t.move && t.move.top ? a * t.move.top : 0 }, scale: { factor: t.scale && t.scale.factor ? t.scale.factor : 1, center: t.scale && t.scale.center ? { left: t.scale.center.left * a + i.left, top: t.scale.center.top * a + i.top } : null } });
1934
1934
  if (t.type === "resize") {
1935
1935
  var o = H(H({}, t), { directions: H({}, t.directions) });
1936
1936
  return ze.forEach(function(l) {
@@ -1944,22 +1944,22 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1944
1944
  }), r;
1945
1945
  }
1946
1946
  return t;
1947
- }(ne(ne({}, this.getPublicProperties()), {}, { event: e }));
1947
+ }(ie(ie({}, this.getPublicProperties()), {}, { event: e }));
1948
1948
  }, getCanvas: function() {
1949
1949
  if (this.$refs.canvas) {
1950
- 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) {
1951
- var d = u.rotate, h = u.flip, m = { width: s.naturalWidth, height: s.naturalHeight }, c = Hi(m, d), y = l.getContext("2d");
1950
+ var e = this.$refs.canvas, n = this.$refs.image, t = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(l, s, u) {
1951
+ var d = u.rotate, h = u.flip, m = { width: s.naturalWidth, height: s.naturalHeight }, c = Xn(m, d), y = l.getContext("2d");
1952
1952
  l.height = c.height, l.width = c.width, y.save();
1953
1953
  var v = Ve(ge(H({ left: 0, top: 0 }, m)), d);
1954
1954
  return y.translate(-(v.left - c.width / 2), -(v.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;
1955
- }(this.$refs.sourceCanvas, i, this.imageTransforms) : i, n = ne({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), a = function(l) {
1955
+ }(this.$refs.sourceCanvas, n, this.imageTransforms) : n, i = 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) {
1956
1956
  return l.find(function(s) {
1957
1957
  return u = s, !Number.isNaN(parseFloat(u)) && isFinite(u);
1958
1958
  var u;
1959
1959
  });
1960
- }, o = De({ sizeRestrictions: { minWidth: a([n.width, n.minWidth]) || 0, minHeight: a([n.height, n.minHeight]) || 0, maxWidth: a([n.width, n.maxWidth]) || 1 / 0, maxHeight: a([n.height, n.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });
1961
- if (n.maxArea && o.width * o.height > n.maxArea) {
1962
- var r = Math.sqrt(n.maxArea / (o.width * o.height));
1960
+ }, o = De({ sizeRestrictions: { minWidth: a([i.width, i.minWidth]) || 0, minHeight: a([i.height, i.minHeight]) || 0, maxWidth: a([i.width, i.maxWidth]) || 1 / 0, maxHeight: a([i.height, i.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });
1961
+ if (i.maxArea && o.width * o.height > i.maxArea) {
1962
+ var r = Math.sqrt(i.maxArea / (o.width * o.height));
1963
1963
  o = { width: Math.round(r * o.width), height: Math.round(r * o.height) };
1964
1964
  }
1965
1965
  return function(l, s, u, d, h) {
@@ -1968,55 +1968,55 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
1968
1968
  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()));
1969
1969
  var c = u.left < 0 ? -u.left : 0, y = u.top < 0 ? -u.top : 0;
1970
1970
  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);
1971
- }(e, t, this.coordinates, o, n), e;
1971
+ }(e, t, this.coordinates, o, i), e;
1972
1972
  }
1973
1973
  }, update: function() {
1974
1974
  this.$emit("change", this.getResult());
1975
1975
  }, applyTransform: function(e) {
1976
- var i = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], t = this.visibleArea && i ? co(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, n = this.visibleArea && i ? pt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
1977
- return mo({ transform: e, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: t, positionRestrictions: n, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });
1976
+ var n = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], t = this.visibleArea && n ? co(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, i = this.visibleArea && n ? pt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
1977
+ return mo({ transform: e, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: t, positionRestrictions: i, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });
1978
1978
  }, resetCoordinates: function() {
1979
1979
  var e = this;
1980
1980
  if (this.$refs.image) {
1981
1981
  this.$refs.cropper, this.$refs.image;
1982
- var i = this.defaultSize;
1983
- i || (i = this.stencilSize ? bo : vo);
1982
+ var n = this.defaultSize;
1983
+ n || (n = this.stencilSize ? bo : vo);
1984
1984
  var t = this.sizeRestrictions;
1985
1985
  t.minWidth, t.minHeight, t.maxWidth, t.maxHeight;
1986
- var n = Ze(i) ? i({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : i, a = this.defaultPosition || go, o = [n, function(r) {
1986
+ var i = Ze(n) ? n({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : n, a = this.defaultPosition || go, o = [i, function(r) {
1987
1987
  var l = r.coordinates;
1988
- return ne({}, Ze(a) ? a({ coordinates: l, imageSize: e.imageSize, visibleArea: e.visibleArea }) : e.defaultPosition);
1988
+ return ie({}, Ze(a) ? a({ coordinates: l, imageSize: e.imageSize, visibleArea: e.visibleArea }) : e.defaultPosition);
1989
1989
  }];
1990
1990
  this.delayedTransforms && o.push.apply(o, qe(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(o, !0), this.delayedTransforms = null;
1991
1991
  }
1992
1992
  }, clearImage: function() {
1993
1993
  var e = this;
1994
1994
  this.imageLoaded = !1, setTimeout(function() {
1995
- var i = e.$refs.stretcher;
1996
- i && (i.style.height = "auto", i.style.width = "auto"), e.coordinates = e.defaultCoordinates(), e.boundaries = { width: 0, height: 0 };
1995
+ var n = e.$refs.stretcher;
1996
+ n && (n.style.height = "auto", n.style.width = "auto"), e.coordinates = e.defaultCoordinates(), e.boundaries = { width: 0, height: 0 };
1997
1997
  }, this.transitionTime);
1998
1998
  }, enableTransitions: function() {
1999
1999
  this.transitions && (this.transitionsActive = !0);
2000
2000
  }, disableTransitions: function() {
2001
2001
  this.transitionsActive = !1;
2002
2002
  }, updateBoundaries: function() {
2003
- var e = this, i = this.$refs.stretcher, t = this.$refs.cropper;
2004
- return this.initStretcher({ cropper: t, stretcher: i, imageSize: this.imageSize }), this.$nextTick().then(function() {
2005
- var n = { cropper: t, imageSize: e.imageSize };
2006
- if (Ze(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(n) : e.defaultBoundaries === "fit" ? e.boundaries = function(a) {
2003
+ var e = this, n = this.$refs.stretcher, t = this.$refs.cropper;
2004
+ return this.initStretcher({ cropper: t, stretcher: n, imageSize: this.imageSize }), this.$nextTick().then(function() {
2005
+ var i = { cropper: t, imageSize: e.imageSize };
2006
+ if (Ze(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(i) : e.defaultBoundaries === "fit" ? e.boundaries = function(a) {
2007
2007
  var o = a.cropper, r = a.imageSize, l = o.clientHeight, s = o.clientWidth, u = l, d = r.width * l / r.height;
2008
2008
  return d > s && (d = s, u = r.height * s / r.width), { width: d, height: u };
2009
- }(n) : e.boundaries = function(a) {
2009
+ }(i) : e.boundaries = function(a) {
2010
2010
  var o = a.cropper;
2011
2011
  return { width: o.clientWidth, height: o.clientHeight };
2012
- }(n), !e.boundaries.width || !e.boundaries.height) throw new Error("It's impossible to fit the cropper in the current container");
2012
+ }(i), !e.boundaries.width || !e.boundaries.height) throw new Error("It's impossible to fit the cropper in the current container");
2013
2013
  });
2014
2014
  }, resetVisibleArea: function() {
2015
2015
  var e = this;
2016
- return this.appliedImageTransforms = ne(ne({}, this.defaultImageTransforms), {}, { flip: ne({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
2016
+ return this.appliedImageTransforms = ie(ie({}, this.defaultImageTransforms), {}, { flip: ie({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
2017
2017
  e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
2018
- var i, t, n, a, o, r, l = e.defaultVisibleArea || yo;
2019
- e.visibleArea = Ze(l) ? l({ imageSize: e.imageSize, boundaries: e.boundaries, coordinates: e.priority !== "visible-area" ? e.coordinates : null, getAreaRestrictions: e.getAreaRestrictions, stencilSize: e.getStencilSize() }) : e.defaultVisibleArea, e.visibleArea = (i = { visibleArea: e.visibleArea, boundaries: e.boundaries, getAreaRestrictions: e.getAreaRestrictions }, t = i.visibleArea, n = i.boundaries, a = i.getAreaRestrictions, o = H({}, t), r = oe(n), o.width / o.height !== r && (o.height = o.width / r), ve(o, a({ visibleArea: o, type: "move" }))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({ visibleArea: e.visibleArea, coordinates: e.coordinates, aspectRatio: e.getAspectRatio(), positionRestrictions: e.positionRestrictions, sizeRestrictions: e.sizeRestrictions }), e.runAutoZoom("resetVisibleArea");
2018
+ var n, t, i, a, o, r, l = e.defaultVisibleArea || yo;
2019
+ e.visibleArea = Ze(l) ? l({ imageSize: e.imageSize, boundaries: e.boundaries, coordinates: e.priority !== "visible-area" ? e.coordinates : null, getAreaRestrictions: e.getAreaRestrictions, stencilSize: e.getStencilSize() }) : e.defaultVisibleArea, e.visibleArea = (n = { visibleArea: e.visibleArea, boundaries: e.boundaries, getAreaRestrictions: e.getAreaRestrictions }, t = n.visibleArea, i = n.boundaries, a = n.getAreaRestrictions, o = H({}, t), r = oe(i), o.width / o.height !== r && (o.height = o.width / r), ve(o, a({ visibleArea: o, type: "move" }))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({ visibleArea: e.visibleArea, coordinates: e.coordinates, aspectRatio: e.getAspectRatio(), positionRestrictions: e.positionRestrictions, sizeRestrictions: e.sizeRestrictions }), e.runAutoZoom("resetVisibleArea");
2020
2020
  }).catch(function() {
2021
2021
  e.visibleArea = null;
2022
2022
  });
@@ -2031,10 +2031,10 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
2031
2031
  var e = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
2032
2032
  e && this.debounce ? this.debouncedUpdate() : this.update();
2033
2033
  }, onChangeImage: function() {
2034
- var e, i = this;
2034
+ var e, n = this;
2035
2035
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
2036
2036
  if (function(a) {
2037
- if (_i(a)) return !1;
2037
+ if (wn(a)) return !1;
2038
2038
  var o = window.location, r = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(a) || [], l = { protocol: r[1] || "", host: r[2] || "", port: r[3] || "" }, s = function(u) {
2039
2039
  return u.port || ((u.protocol || o.protocol) === "http" ? 80 : 433);
2040
2040
  };
@@ -2044,7 +2044,7 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
2044
2044
  t === !0 && (t = "anonymous"), this.imageAttributes.crossOrigin = t || null;
2045
2045
  }
2046
2046
  if (this.checkOrientation) {
2047
- var n = (e = this.src, new Promise(function(a) {
2047
+ var i = (e = this.src, new Promise(function(a) {
2048
2048
  zo(e).then(function(o) {
2049
2049
  var r = Fo(o);
2050
2050
  a(o ? { source: e, arrayBuffer: o, orientation: r } : { source: e, arrayBuffer: null, orientation: null });
@@ -2053,28 +2053,28 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
2053
2053
  });
2054
2054
  }));
2055
2055
  setTimeout(function() {
2056
- n.then(i.onParseImage);
2056
+ i.then(n.onParseImage);
2057
2057
  }, this.transitionTime);
2058
2058
  } else setTimeout(function() {
2059
- i.onParseImage({ source: i.src });
2059
+ n.onParseImage({ source: n.src });
2060
2060
  }, this.transitionTime);
2061
2061
  } else this.clearImage();
2062
2062
  }, onFailLoadImage: function() {
2063
2063
  this.imageAttributes.src && (this.clearImage(), this.$emit("error"));
2064
2064
  }, onSuccessLoadImage: function() {
2065
- var e = this, i = this.$refs.image;
2066
- i && !this.imageLoaded && (this.imageAttributes.height = i.naturalHeight, this.imageAttributes.width = i.naturalWidth, this.imageLoaded = !0, this.resetVisibleArea().then(function() {
2065
+ var e = this, n = this.$refs.image;
2066
+ n && !this.imageLoaded && (this.imageAttributes.height = n.naturalHeight, this.imageAttributes.width = n.naturalWidth, this.imageLoaded = !0, this.resetVisibleArea().then(function() {
2067
2067
  e.$emit("ready"), e.onChange(!1);
2068
2068
  }));
2069
2069
  }, onParseImage: function(e) {
2070
- var i = this, t = e.source, n = e.arrayBuffer, a = e.orientation;
2071
- this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, n && a && a > 1 ? Bi(t) || !_i(t) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([n])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(o) {
2070
+ var n = this, t = e.source, i = e.arrayBuffer, a = e.orientation;
2071
+ this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, i && a && a > 1 ? Kn(t) || !wn(t) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([i])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(o) {
2072
2072
  for (var r = [], l = new Uint8Array(o); l.length > 0; ) {
2073
2073
  var s = l.subarray(0, 8192);
2074
2074
  r.push(String.fromCharCode.apply(null, Array.from ? Array.from(s) : s.slice())), l = l.subarray(8192);
2075
2075
  }
2076
2076
  return "data:image/jpeg;base64," + btoa(r.join(""));
2077
- }(n) : this.imageAttributes.src = t, Ze(this.defaultTransforms) ? this.appliedImageTransforms = Dt(this.defaultTransforms()) : bt(this.defaultTransforms) ? this.appliedImageTransforms = Dt(this.defaultTransforms) : this.appliedImageTransforms = function(o) {
2077
+ }(i) : this.imageAttributes.src = t, Ze(this.defaultTransforms) ? this.appliedImageTransforms = Dt(this.defaultTransforms()) : bt(this.defaultTransforms) ? this.appliedImageTransforms = Dt(this.defaultTransforms) : this.appliedImageTransforms = function(o) {
2078
2078
  var r = Dt({});
2079
2079
  if (o) switch (o) {
2080
2080
  case 2:
@@ -2099,79 +2099,79 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper
2099
2099
  r.rotate = -90;
2100
2100
  }
2101
2101
  return r;
2102
- }(a), this.defaultImageTransforms = ne(ne({}, this.appliedImageTransforms), {}, { flip: ne({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
2103
- var o = i.$refs.image;
2102
+ }(a), this.defaultImageTransforms = ie(ie({}, this.appliedImageTransforms), {}, { flip: ie({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
2103
+ var o = n.$refs.image;
2104
2104
  o && o.complete && (function(r) {
2105
2105
  return !!r.naturalWidth;
2106
- }(o) ? i.onSuccessLoadImage() : i.onFailLoadImage());
2106
+ }(o) ? n.onSuccessLoadImage() : n.onFailLoadImage());
2107
2107
  });
2108
2108
  }, onResizeEnd: function() {
2109
2109
  this.runAutoZoom("resize", { transitions: !0 });
2110
2110
  }, onMoveEnd: function() {
2111
2111
  this.runAutoZoom("move", { transitions: !0 });
2112
2112
  }, onMove: function(e) {
2113
- var i = this;
2113
+ var n = this;
2114
2114
  this.transitionsOptions.enabled || this.awaitRender(function() {
2115
- i.coordinates = i.moveAlgorithm(ne(ne({}, i.getPublicProperties()), {}, { positionRestrictions: pt(i.positionRestrictions, i.visibleArea), coordinates: i.coordinates, event: i.normalizeEvent(e) })), i.onChange();
2115
+ n.coordinates = n.moveAlgorithm(ie(ie({}, n.getPublicProperties()), {}, { positionRestrictions: pt(n.positionRestrictions, n.visibleArea), coordinates: n.coordinates, event: n.normalizeEvent(e) })), n.onChange();
2116
2116
  });
2117
2117
  }, onResize: function(e) {
2118
- var i = this;
2118
+ var n = this;
2119
2119
  this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender(function() {
2120
- var t = i.sizeRestrictions, n = Math.min(i.coordinates.width, i.coordinates.height, 20 * i.coefficient);
2121
- i.coordinates = i.resizeAlgorithm(ne(ne({}, i.getPublicProperties()), {}, { positionRestrictions: pt(i.positionRestrictions, i.visibleArea), sizeRestrictions: { maxWidth: Math.min(t.maxWidth, i.visibleArea.width), maxHeight: Math.min(t.maxHeight, i.visibleArea.height), minWidth: Math.max(t.minWidth, n), minHeight: Math.max(t.minHeight, n) }, event: i.normalizeEvent(e) })), i.onChange(), i.ticking = !1;
2120
+ var t = n.sizeRestrictions, i = Math.min(n.coordinates.width, n.coordinates.height, 20 * n.coefficient);
2121
+ n.coordinates = n.resizeAlgorithm(ie(ie({}, n.getPublicProperties()), {}, { positionRestrictions: pt(n.positionRestrictions, n.visibleArea), sizeRestrictions: { maxWidth: Math.min(t.maxWidth, n.visibleArea.width), maxHeight: Math.min(t.maxHeight, n.visibleArea.height), minWidth: Math.max(t.minWidth, i), minHeight: Math.max(t.minHeight, i) }, event: n.normalizeEvent(e) })), n.onChange(), n.ticking = !1;
2122
2122
  });
2123
2123
  }, onManipulateImage: function(e) {
2124
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2124
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2125
2125
  if (!this.transitionsOptions.enabled) {
2126
- var t = i.transitions, n = t !== void 0 && t, a = i.normalize, o = a === void 0 || a;
2127
- n && this.enableTransitions();
2128
- var r = _o(ne(ne({}, this.getPublicProperties()), {}, { event: o ? this.normalizeEvent(e) : e, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), l = r.visibleArea, s = r.coordinates;
2129
- this.visibleArea = l, this.coordinates = s, this.runAutoZoom("manipulateImage"), this.onChange(), n && this.debouncedDisableTransitions();
2126
+ var t = n.transitions, i = t !== void 0 && t, a = n.normalize, o = a === void 0 || a;
2127
+ i && this.enableTransitions();
2128
+ var r = _o(ie(ie({}, this.getPublicProperties()), {}, { event: o ? this.normalizeEvent(e) : e, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), l = r.visibleArea, s = r.coordinates;
2129
+ this.visibleArea = l, this.coordinates = s, this.runAutoZoom("manipulateImage"), this.onChange(), i && this.debouncedDisableTransitions();
2130
2130
  }
2131
2131
  }, onPropsChange: function() {
2132
2132
  this.coordinates = this.applyTransform(this.coordinates, !0), this.onChange(!1);
2133
2133
  }, getAreaRestrictions: function() {
2134
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = e.visibleArea, t = e.type, n = t === void 0 ? "move" : t;
2135
- return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: i, type: n });
2134
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = e.visibleArea, t = e.type, i = t === void 0 ? "move" : t;
2135
+ return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: n, type: i });
2136
2136
  }, getAspectRatio: function(e) {
2137
- var i, t, n = this.stencilProps, a = n.aspectRatio, o = n.minAspectRatio, r = n.maxAspectRatio;
2137
+ var n, t, i = this.stencilProps, a = i.aspectRatio, o = i.minAspectRatio, r = i.maxAspectRatio;
2138
2138
  if (this.$refs.stencil && this.$refs.stencil.aspectRatios) {
2139
2139
  var l = this.$refs.stencil.aspectRatios();
2140
- i = l.minimum, t = l.maximum;
2140
+ n = l.minimum, t = l.maximum;
2141
2141
  }
2142
- if (fe(i) && (i = fe(a) ? o : a), fe(t) && (t = fe(a) ? r : a), !e && (fe(i) || fe(t))) {
2142
+ if (fe(n) && (n = fe(a) ? o : a), fe(t) && (t = fe(a) ? r : a), !e && (fe(n) || fe(t))) {
2143
2143
  var s = this.getStencilSize(), u = s ? oe(s) : null;
2144
- fe(i) && (i = wi(u) ? u : void 0), fe(t) && (t = wi(u) ? u : void 0);
2144
+ fe(n) && (n = Sn(u) ? u : void 0), fe(t) && (t = Sn(u) ? u : void 0);
2145
2145
  }
2146
- return { minimum: i, maximum: t };
2146
+ return { minimum: n, maximum: t };
2147
2147
  }, getStencilSize: function() {
2148
- if (this.stencilSize) return e = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, i = e.boundaries, t = e.stencilSize, n = e.aspectRatio, It(oe(a = Ze(t) ? t({ boundaries: i, aspectRatio: n }) : t), n) && (a = De({ sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: n.minimum, maximum: n.maximum } })), (a.width > i.width || a.height > i.height) && (a = De({ sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: oe(a), maximum: oe(a) } })), a;
2149
- var e, i, t, n, a;
2148
+ if (this.stencilSize) return e = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, n = e.boundaries, t = e.stencilSize, i = e.aspectRatio, It(oe(a = Ze(t) ? t({ boundaries: n, aspectRatio: i }) : t), i) && (a = De({ sizeRestrictions: { maxWidth: n.width, maxHeight: n.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: i.minimum, maximum: i.maximum } })), (a.width > n.width || a.height > n.height) && (a = De({ sizeRestrictions: { maxWidth: n.width, maxHeight: n.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: oe(a), maximum: oe(a) } })), a;
2149
+ var e, n, t, i, a;
2150
2150
  }, getPublicProperties: function() {
2151
2151
  return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };
2152
2152
  }, defaultCoordinates: function() {
2153
- return ne({}, Si);
2154
- }, flip: function(e, i) {
2155
- var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.transitions, a = n === void 0 || n;
2153
+ return ie({}, Cn);
2154
+ }, flip: function(e, n) {
2155
+ var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.transitions, a = i === void 0 || i;
2156
2156
  if (!this.transitionsActive) {
2157
2157
  a && this.enableTransitions();
2158
- var o = ne({}, this.imageTransforms.flip), r = So({ 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;
2159
- 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();
2158
+ var o = ie({}, this.imageTransforms.flip), r = So({ flip: { horizontal: e ? !o.horizontal : o.horizontal, vertical: n ? !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;
2159
+ e && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), n && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = l, this.coordinates = s, this.onChange(), a && this.debouncedDisableTransitions();
2160
2160
  }
2161
2161
  }, rotate: function(e) {
2162
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = i.transitions, n = t === void 0 || t;
2162
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.transitions, i = t === void 0 || t;
2163
2163
  if (!this.transitionsActive) {
2164
- n && this.enableTransitions();
2165
- var a = ne({}, this.imageSize);
2164
+ i && this.enableTransitions();
2165
+ var a = ie({}, this.imageSize);
2166
2166
  this.appliedImageTransforms.rotate += e;
2167
2167
  var o = wo({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: a, imageSize: this.imageSize, angle: e, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), r = o.visibleArea, l = o.coordinates, s = this.processAutoZoom("rotateImage", r, l);
2168
- r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), n && this.debouncedDisableTransitions();
2168
+ r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), i && this.debouncedDisableTransitions();
2169
2169
  }
2170
2170
  } }, emits: ["change", "error", "ready"] }, Io = { key: 0, ref: "canvas", style: { display: "none" } }, Po = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
2171
- on.render = function(e, i, t, n, a, o) {
2171
+ oi.render = function(e, n, t, i, a, o) {
2172
2172
  return F(), 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 }, [(F(), G(yt(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() {
2173
- 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] = St(function() {
2174
- }, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), C("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((F(), G(yt(t.stencilComponent), Pi({ 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"])), [[wt, a.imageLoaded]]), t.canvas ? (F(), G("canvas", Io, null, 512)) : ee("", !0), t.canvas ? (F(), G("canvas", Po, null, 512)) : ee("", !0)];
2173
+ 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: n[1] || (n[1] = St(function() {
2174
+ }, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), C("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((F(), G(yt(t.stencilComponent), Dn({ 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"])), [[wt, a.imageLoaded]]), t.canvas ? (F(), G("canvas", Io, null, 512)) : ee("", !0), t.canvas ? (F(), G("canvas", Po, null, 512)) : ee("", !0)];
2175
2175
  }), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
2176
2176
  };
2177
2177
  const Do = {
@@ -2193,8 +2193,8 @@ const Do = {
2193
2193
  modelValue: {}
2194
2194
  },
2195
2195
  emits: ["update:model-value", "reset:model-value"],
2196
- setup(e, { emit: i }) {
2197
- const t = e, { t: n } = ce(), a = i, o = T(() => t.modelValue ? URL.createObjectURL(t.modelValue) : ""), r = q();
2196
+ setup(e, { emit: n }) {
2197
+ const t = e, { t: i } = ce(), a = n, o = T(() => t.modelValue ? URL.createObjectURL(t.modelValue) : ""), r = q();
2198
2198
  function l(y, v) {
2199
2199
  const w = 2e3 / y;
2200
2200
  return {
@@ -2240,13 +2240,13 @@ const Do = {
2240
2240
  const g = B("fm-icon"), w = B("fm-drop-field");
2241
2241
  return r.value || o.value ? (F(), Z("div", Do, [
2242
2242
  D("p", To, [
2243
- _t(se(p(n)("menu.common.labels.product_image")) + " ", 1),
2244
- D("span", Uo, se(p(n)("menu.common.labels.optional")), 1)
2243
+ _t(se(p(i)("menu.common.labels.product_image")) + " ", 1),
2244
+ D("span", Uo, se(p(i)("menu.common.labels.optional")), 1)
2245
2245
  ]),
2246
2246
  D("div", $o, [
2247
2247
  D("div", Vo, [
2248
2248
  D("div", No, [
2249
- C(p(on), {
2249
+ C(p(oi), {
2250
2250
  class: "cropper h-[150px] w-[200px]",
2251
2251
  src: r.value || o.value,
2252
2252
  "stencil-props": {
@@ -2283,45 +2283,45 @@ const Do = {
2283
2283
  }, {
2284
2284
  label: N(() => [
2285
2285
  D("p", Lo, [
2286
- _t(se(p(n)("menu.common.labels.product_image")) + " ", 1),
2287
- D("span", Bo, se(p(n)("menu.common.labels.optional")), 1)
2286
+ _t(se(p(i)("menu.common.labels.product_image")) + " ", 1),
2287
+ D("span", Bo, se(p(i)("menu.common.labels.optional")), 1)
2288
2288
  ])
2289
2289
  ]),
2290
2290
  "accept-text": N(() => [
2291
- D("p", Ko, se(p(n)("menu.common.file.accepts")), 1)
2291
+ D("p", Ko, se(p(i)("menu.common.file.accepts")), 1)
2292
2292
  ]),
2293
2293
  _: 1
2294
2294
  }));
2295
2295
  };
2296
2296
  }
2297
- }), an = /* @__PURE__ */ le({
2297
+ }), ai = /* @__PURE__ */ le({
2298
2298
  __name: "RemyButton",
2299
2299
  props: {
2300
2300
  onClick: { type: Function },
2301
2301
  pureStyling: { type: Boolean }
2302
2302
  },
2303
2303
  setup(e) {
2304
- return (i, t) => {
2305
- var n;
2306
- return (n = p(Te)) != null && n.enable.value ? (F(), Z("button", {
2304
+ return (n, t) => {
2305
+ var i;
2306
+ return (i = p(Te)) != null && i.enable.value ? (F(), Z("button", {
2307
2307
  key: 0,
2308
- class: Ee([!i.pureStyling && "bg-fm-color-neutral-gray-100 rounded-lg p-[6px]"]),
2308
+ class: Ee([!n.pureStyling && "bg-fm-color-neutral-gray-100 rounded-lg p-[6px]"]),
2309
2309
  type: "button",
2310
2310
  onClick: t[0] || (t[0] = //@ts-ignore
2311
- (...a) => i.onClick && i.onClick(...a))
2311
+ (...a) => n.onClick && n.onClick(...a))
2312
2312
  }, [
2313
- p(Te).isDialogOpened.value ? (F(), G(p(Wn), { key: 1 })) : (F(), G(p(Bn), { key: 0 }))
2313
+ p(Te).isDialogOpened.value ? (F(), G(p(Wi), { key: 1 })) : (F(), G(p(Bi), { key: 0 }))
2314
2314
  ], 2)) : ee("", !0);
2315
2315
  };
2316
2316
  }
2317
2317
  }), Wo = {}, jo = { class: "pl-32" };
2318
- function Yo(e, i) {
2318
+ function Yo(e, n) {
2319
2319
  return F(), Z("div", jo, [
2320
2320
  he(e.$slots, "default")
2321
2321
  ]);
2322
2322
  }
2323
2323
  const Ho = /* @__PURE__ */ lt(Wo, [["render", Yo]]);
2324
- function rn(e) {
2324
+ function ri(e) {
2325
2325
  return e || null;
2326
2326
  }
2327
2327
  const Xo = {
@@ -2338,9 +2338,9 @@ const Xo = {
2338
2338
  class: "relative"
2339
2339
  }, ta = {
2340
2340
  class: "fm-typo-en-body-lg-600"
2341
- }, ia = {
2342
- class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
2343
2341
  }, na = {
2342
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
2343
+ }, ia = {
2344
2344
  class: "flex flex-col gap-16"
2345
2345
  }, oa = {
2346
2346
  class: "space-y-8"
@@ -2369,14 +2369,14 @@ const ra = /* @__PURE__ */ le({
2369
2369
  },
2370
2370
  emits: ["update:form", "update:thumbnail", "reset:thumbnail"],
2371
2371
  setup(e, {
2372
- emit: i
2372
+ emit: n
2373
2373
  }) {
2374
- const t = e, n = me(), a = Ue(), o = Le(), r = Ye(o), l = He(r), s = zn({
2374
+ const t = e, i = me(), a = Ue(), o = Le(), r = Ye(o), l = He(r), s = zi({
2375
2375
  dialog: a,
2376
2376
  menuLoader: l
2377
2377
  }), {
2378
2378
  checkMenuIsLoading: u
2379
- } = He(Ye(Le())), d = i, h = T(() => n.rules.item), m = T(() => n.categorizedItems), c = T(() => {
2379
+ } = He(Ye(Le())), d = n, h = T(() => i.rules.item), m = T(() => i.categorizedItems), c = T(() => {
2380
2380
  const P = m.value.map((A) => ({
2381
2381
  label: A.name,
2382
2382
  value: A.id
@@ -2410,7 +2410,7 @@ const ra = /* @__PURE__ */ le({
2410
2410
  const w = T(() => {
2411
2411
  var A;
2412
2412
  const P = t.form.name || ((A = t.fallback) == null ? void 0 : A.name);
2413
- return P ? n.items.filter((_) => !!_.category && _._id !== t.form._id && _.name === P).length : 0;
2413
+ return P ? i.items.filter((_) => !!_.category && _._id !== t.form._id && _.name === P).length : 0;
2414
2414
  });
2415
2415
  function z(P) {
2416
2416
  var _, R, f;
@@ -2455,7 +2455,7 @@ const ra = /* @__PURE__ */ le({
2455
2455
  "model-value": P.form.code,
2456
2456
  placeholder: ((Y = P.fallback) == null ? void 0 : Y.code) || p(E)("menu.product.form.detail.fields.code.placeholder"),
2457
2457
  label: p(E)("menu.product.form.detail.fields.code.label"),
2458
- "onUpdate:modelValue": A[0] || (A[0] = (M) => d("update:form", "code", p(rn)(M)))
2458
+ "onUpdate:modelValue": A[0] || (A[0] = (M) => d("update:form", "code", p(ri)(M)))
2459
2459
  }, null, 8, ["model-value", "placeholder", "label"])]), D("div", Jo, [C(_, {
2460
2460
  id: "product-name",
2461
2461
  disabled: !h.value.name,
@@ -2475,12 +2475,12 @@ const ra = /* @__PURE__ */ le({
2475
2475
  placeholder: p(E)("menu.product.form.detail.fields.description.placeholder"),
2476
2476
  "onUpdate:modelValue": A[2] || (A[2] = (M) => d("update:form", "description", M.trim()))
2477
2477
  }, {
2478
- label: N(() => [D("p", ta, [_t(se(p(E)("menu.product.form.detail.fields.description.label")) + " ", 1), D("span", ia, se(p(E)("menu.product.form.detail.fields.description.optional")), 1)])]),
2478
+ label: N(() => [D("p", ta, [_t(se(p(E)("menu.product.form.detail.fields.description.label")) + " ", 1), D("span", na, se(p(E)("menu.product.form.detail.fields.description.optional")), 1)])]),
2479
2479
  _: 1
2480
- }, 8, ["disabled", "model-value", "placeholder"]), Xe(C(an, {
2480
+ }, 8, ["disabled", "model-value", "placeholder"]), Xe(C(ai, {
2481
2481
  class: Ee(["absolute top-[100px] left-8"]),
2482
2482
  onClick: I
2483
- }, null, 512), [[K, p(Di)("Suggest description")]])])]), C(Go, {
2483
+ }, null, 512), [[K, p(Tn)("Suggest description")]])])]), C(Go, {
2484
2484
  disabled: !h.value.thumbnail,
2485
2485
  "model-value": P.thumbnail,
2486
2486
  "onUpdate:modelValue": A[3] || (A[3] = (M) => d("update:thumbnail", M)),
@@ -2494,13 +2494,13 @@ const ra = /* @__PURE__ */ le({
2494
2494
  "model-value": P.isAddon ? je.ADD_ON : je.PRODUCT,
2495
2495
  "onUpdate:modelValue": A[5] || (A[5] = (M) => z(M))
2496
2496
  }, {
2497
- default: N(() => [D("div", na, [D("div", oa, [C(f, {
2497
+ default: N(() => [D("div", ia, [D("div", oa, [C(f, {
2498
2498
  disabled: v.value,
2499
2499
  value: je.PRODUCT,
2500
2500
  label: p(E)("menu.product.form.detail.category.options.product.label"),
2501
2501
  sublabel: p(E)("menu.product.form.detail.category.options.product.sublabel")
2502
2502
  }, null, 8, ["disabled", "value", "label", "sublabel"]), C(Ho, null, {
2503
- default: N(() => [p(n).isV4 ? (F(), G(g, {
2503
+ default: N(() => [p(i).isV4 ? (F(), G(g, {
2504
2504
  key: 0
2505
2505
  })) : ee("", !0)]),
2506
2506
  _: 1
@@ -2518,7 +2518,7 @@ const ra = /* @__PURE__ */ le({
2518
2518
  sublabel: p(E)("menu.product.form.detail.category.options.addon.sublabel")
2519
2519
  }, null, 8, ["value", "label", "sublabel"])])]),
2520
2520
  _: 1
2521
- }, 8, ["disabled", "model-value"])) : ee("", !0), p(n).isV4 ? ee("", !0) : (F(), G(S, {
2521
+ }, 8, ["disabled", "model-value"])) : ee("", !0), p(i).isV4 ? ee("", !0) : (F(), G(S, {
2522
2522
  key: 1,
2523
2523
  modelValue: P.form.category,
2524
2524
  "onUpdate:modelValue": A[6] || (A[6] = (M) => P.form.category = M),
@@ -2565,14 +2565,14 @@ const ra = /* @__PURE__ */ le({
2565
2565
  fallback: {}
2566
2566
  },
2567
2567
  emits: ["update:form"],
2568
- setup(e, { emit: i }) {
2569
- const t = e, n = Xt(), a = me(), { t: o } = ce(), r = i, l = T(() => a.rules.item), s = T(() => {
2568
+ setup(e, { emit: n }) {
2569
+ const t = e, i = Xt(), a = me(), { t: o } = ce(), r = n, l = T(() => a.rules.item), s = T(() => {
2570
2570
  var z, O;
2571
2571
  const g = t.isOverride ? ((z = t.fallback) == null ? void 0 : z.unit) ?? ((O = t.fallback) == null ? void 0 : O.perXUnit) : void 0, w = t.form.unit ?? t.form.perXUnit ?? g;
2572
2572
  return w != null;
2573
2573
  }), u = (g) => {
2574
2574
  r("update:form", "unit", g ? "" : void 0), r("update:form", "perXUnit", g ? 0 : void 0);
2575
- }, d = T(() => Ot.setCoreStore(n).taxSetting()), h = T(() => {
2575
+ }, d = T(() => Ot.setCoreStore(i).taxSetting()), h = T(() => {
2576
2576
  var g;
2577
2577
  return Ot.getSelectedTax(
2578
2578
  t.form.taxes,
@@ -2619,8 +2619,8 @@ const ra = /* @__PURE__ */ le({
2619
2619
  A,
2620
2620
  {
2621
2621
  name: t.form.name || "",
2622
- lat: (O = (z = (w = n.currentRestaurant) == null ? void 0 : w.value) == null ? void 0 : z.profile.address.coordinates) == null ? void 0 : O[1],
2623
- lon: (P = (E = (I = n.currentRestaurant) == null ? void 0 : I.value) == null ? void 0 : E.profile.address.coordinates) == null ? void 0 : P[0]
2622
+ lat: (O = (z = (w = i.currentRestaurant) == null ? void 0 : w.value) == null ? void 0 : z.profile.address.coordinates) == null ? void 0 : O[1],
2623
+ lon: (P = (E = (I = i.currentRestaurant) == null ? void 0 : I.value) == null ? void 0 : E.profile.address.coordinates) == null ? void 0 : P[0]
2624
2624
  },
2625
2625
  !0
2626
2626
  ));
@@ -2650,11 +2650,11 @@ const ra = /* @__PURE__ */ le({
2650
2650
  "onUpdate:modelValue": w[0] || (w[0] = (A) => A && r("update:form", "price", A))
2651
2651
  }, {
2652
2652
  append: N(() => [
2653
- Xe(C(an, {
2653
+ Xe(C(ai, {
2654
2654
  "pure-styling": "",
2655
2655
  onClick: v
2656
2656
  }, null, 512), [
2657
- [E, p(Di)("Suggest pricing")]
2657
+ [E, p(Tn)("Suggest pricing")]
2658
2658
  ])
2659
2659
  ]),
2660
2660
  _: 1
@@ -2790,12 +2790,12 @@ const ra = /* @__PURE__ */ le({
2790
2790
  selectedVariants: {}
2791
2791
  },
2792
2792
  setup(e) {
2793
- const i = Ue(), { emitData: t, emitAction: n } = Ei(), a = me(), { t: o } = ce(), r = e, l = T(() => a.variants.map((h) => ({
2793
+ const n = Ue(), { emitData: t, emitAction: i } = In(), a = me(), { t: o } = ce(), r = e, l = T(() => a.variants.map((h) => ({
2794
2794
  label: h.name,
2795
2795
  value: h._id,
2796
2796
  disabled: !1
2797
2797
  }))), s = q(ae(r.selectedVariants)), u = q(""), d = () => {
2798
- t(s.value), n("primary"), i.close();
2798
+ t(s.value), i("primary"), n.close();
2799
2799
  };
2800
2800
  return (h, m) => {
2801
2801
  const c = B("FmSearch"), y = B("FmCheckbox"), v = B("FmButton");
@@ -2828,7 +2828,7 @@ const ra = /* @__PURE__ */ le({
2828
2828
  ])
2829
2829
  ]),
2830
2830
  D("div", Ca, [
2831
- C(p(vi), null, {
2831
+ C(p(bn), null, {
2832
2832
  default: N(({ trigger: g }) => [
2833
2833
  p(a).rules.item.variant ? (F(), G(v, {
2834
2834
  key: 0,
@@ -2844,7 +2844,7 @@ const ra = /* @__PURE__ */ le({
2844
2844
  C(v, {
2845
2845
  label: p(o)("menu.common.actions.cancel"),
2846
2846
  variant: "tertiary",
2847
- onClick: m[3] || (m[3] = (g) => p(i).close())
2847
+ onClick: m[3] || (m[3] = (g) => p(n).close())
2848
2848
  }, null, 8, ["label"]),
2849
2849
  C(v, {
2850
2850
  label: p(o)("menu.common.actions.confirm"),
@@ -2857,7 +2857,7 @@ const ra = /* @__PURE__ */ le({
2857
2857
  D("p", ka, se(p(o)("menu.common.empty.no_variant.title")), 1),
2858
2858
  D("p", Ma, se(p(o)("menu.common.empty.no_variant.subtitle")), 1)
2859
2859
  ]),
2860
- C(p(vi), null, {
2860
+ C(p(bn), null, {
2861
2861
  default: N(({ trigger: g }) => [
2862
2862
  C(v, {
2863
2863
  label: p(o)("menu.variant.add"),
@@ -2871,14 +2871,14 @@ const ra = /* @__PURE__ */ le({
2871
2871
  };
2872
2872
  }
2873
2873
  }), za = {}, Fa = { class: "overflow-x-auto" }, Ea = { class: "xs:w-[600px]" };
2874
- function Ia(e, i) {
2874
+ function Ia(e, n) {
2875
2875
  return F(), Z("div", Fa, [
2876
2876
  D("div", Ea, [
2877
2877
  he(e.$slots, "default")
2878
2878
  ])
2879
2879
  ]);
2880
2880
  }
2881
- const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2881
+ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2882
2882
  class: "space-y-16"
2883
2883
  }, Da = {
2884
2884
  class: "flex items-center space-x-8"
@@ -2901,13 +2901,13 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2901
2901
  },
2902
2902
  emits: ["update:form", "replace:form"],
2903
2903
  setup(e, {
2904
- emit: i
2904
+ emit: n
2905
2905
  }) {
2906
- const t = e, n = me(), a = ii(), o = Le(), r = Ue(), {
2906
+ const t = e, i = me(), a = nn(), o = Le(), r = Ue(), {
2907
2907
  t: l
2908
- } = ce(), s = T(() => n.rules.item), u = T(() => s.value.minPrice && !!t.form.minPrice), d = T(() => !n.state.currentCatalogId), h = T(() => n.variants.reduce((_, R) => (_[R._id] = R, _), {}));
2908
+ } = ce(), s = T(() => i.rules.item), u = T(() => s.value.minPrice && !!t.form.minPrice), d = T(() => !i.state.currentCatalogId), h = T(() => i.variants.reduce((_, R) => (_[R._id] = R, _), {}));
2909
2909
  q(!1);
2910
- const m = i;
2910
+ const m = n;
2911
2911
  function c(_) {
2912
2912
  const R = Ne.clone(t.form);
2913
2913
  for (const {
@@ -2917,7 +2917,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2917
2917
  R[f] = b;
2918
2918
  m("replace:form", R);
2919
2919
  }
2920
- T(() => n.variants.map((_) => ({
2920
+ T(() => i.variants.map((_) => ({
2921
2921
  label: _.name,
2922
2922
  value: _._id,
2923
2923
  disabled: !1
@@ -2979,7 +2979,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2979
2979
  const f = _.filter((k) => !!k);
2980
2980
  let b;
2981
2981
  if (f.length) {
2982
- const k = f.map((K) => n.variants.find((Y) => Y._id === K)), S = ye.fullVariantCombination(k).map(({
2982
+ const k = f.map((K) => i.variants.find((Y) => Y._id === K)), S = ye.fullVariantCombination(k).map(({
2983
2983
  combinationKey: K
2984
2984
  }) => {
2985
2985
  var J;
@@ -3044,7 +3044,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3044
3044
  modelValue: R,
3045
3045
  placeholder: x || l("menu.product.form.variant.placeholders.no_code"),
3046
3046
  "onUpdate:modelValue": (K) => {
3047
- I(_.row.index, "code", rn(K));
3047
+ I(_.row.index, "code", ri(K));
3048
3048
  }
3049
3049
  });
3050
3050
  }
@@ -3108,8 +3108,8 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3108
3108
  minPrice: u.value
3109
3109
  }));
3110
3110
  function A(_) {
3111
- return _ != null && _.length && _.length > n.rules.item.maxVariant ? l("menu.product.form.variant.validation.max_variants", {
3112
- max: n.rules.item.maxVariant
3111
+ return _ != null && _.length && _.length > i.rules.item.maxVariant ? l("menu.product.form.variant.validation.max_variants", {
3112
+ max: i.rules.item.maxVariant
3113
3113
  }) : !0;
3114
3114
  }
3115
3115
  return (_, R) => {
@@ -3118,7 +3118,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3118
3118
  title: p(l)("menu.product.form.variant.title"),
3119
3119
  "sub-title": p(l)("menu.product.form.variant.subtitle")
3120
3120
  }, {
3121
- "append-title": N(() => [p(n).rules.item.variant ? (F(), G(f, {
3121
+ "append-title": N(() => [p(i).rules.item.variant ? (F(), G(f, {
3122
3122
  key: 0,
3123
3123
  label: p(l)("menu.product.form.variant.add"),
3124
3124
  variant: "secondary",
@@ -3133,7 +3133,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3133
3133
  }, {
3134
3134
  default: N(() => {
3135
3135
  var K;
3136
- return [C(p(Ti), {
3136
+ return [C(p(Un), {
3137
3137
  "model-value": ((K = _.form.variant) == null ? void 0 : K.variantGroupIds) ?? [],
3138
3138
  class: "space-y-16",
3139
3139
  group: "variants",
@@ -3162,7 +3162,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3162
3162
  }, 8, ["model-value"])];
3163
3163
  }),
3164
3164
  _: 1
3165
- }, 8, ["model-value", "rules"]), C(sn, null, {
3165
+ }, 8, ["model-value", "rules"]), C(si, null, {
3166
3166
  default: N(() => [z.value.length ? (F(), G(k, {
3167
3167
  key: 0,
3168
3168
  class: "w-full",
@@ -3183,34 +3183,34 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3183
3183
  }), Va = /* @__PURE__ */ le({
3184
3184
  __name: "AddForm",
3185
3185
  setup(e) {
3186
- const i = me(), t = T(() => i.rules.group), n = T(() => !!i.state.currentCatalogId || !!i.state.currentSchedulerId), a = T(() => {
3187
- 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;
3186
+ const n = me(), t = T(() => n.rules.group), i = T(() => !!n.state.currentCatalogId || !!n.state.currentSchedulerId), a = T(() => {
3187
+ const s = !n.state.currentSchedulerId, u = n.rules.group.type, d = n.version === L.F_MENU_VERSION.enum.v3, h = n.rules.item.orderFromActiveOnly, m = n.rules.item.bindToVariant;
3188
3188
  return function(y) {
3189
3189
  return {
3190
- link: (v) => !n.value && (!v || m),
3191
- name: (v) => !n.value && !v,
3192
- type: u && !y._id && !n.value,
3190
+ link: (v) => !i.value && (!v || m),
3191
+ name: (v) => !i.value && !v,
3192
+ type: u && !y._id && !i.value,
3193
3193
  price: y.type !== L.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
3194
- inventory: s ? d ? !n.value && y.type === L.F_ADDON_GROUP_TYPE.enum.NORMAL : !n.value : !1,
3195
- orderFrom: (v) => s ? d ? y.type === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? n.value : !!n.value == !v : n.value : !1,
3194
+ inventory: s ? d ? !i.value && y.type === L.F_ADDON_GROUP_TYPE.enum.NORMAL : !i.value : !1,
3195
+ orderFrom: (v) => s ? d ? y.type === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? i.value : !!i.value == !v : i.value : !1,
3196
3196
  orderFromActiveOnly: h,
3197
- showOrderFrom: s ? d ? n.value ? !0 : y.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT : n.value : !1,
3197
+ showOrderFrom: s ? d ? i.value ? !0 : y.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT : i.value : !1,
3198
3198
  bindToVariant: m,
3199
- isOverride: n.value,
3199
+ isOverride: i.value,
3200
3200
  isItemGroup: !1,
3201
3201
  isV4: !d
3202
3202
  };
3203
3203
  };
3204
3204
  }), o = () => ({
3205
3205
  ...ye.generator.initMenuV4Group(),
3206
- type: i.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
3206
+ type: n.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
3207
3207
  items: {},
3208
- position: i.groups.length - 1,
3208
+ position: n.groups.length - 1,
3209
3209
  itemsLinked: []
3210
3210
  }), r = q(o()), { t: l } = ce();
3211
3211
  return (s, u) => t.value.create ? (F(), G(p(rr), {
3212
3212
  key: 0,
3213
- "categorized-items": p(i).categorizedItems,
3213
+ "categorized-items": p(n).categorizedItems,
3214
3214
  config: a.value,
3215
3215
  group: r.value,
3216
3216
  "onUpdate:group": u[0] || (u[0] = (d) => r.value = d),
@@ -3236,8 +3236,8 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3236
3236
  allowRefund: { type: Boolean }
3237
3237
  },
3238
3238
  emits: ["update:inventory"],
3239
- setup(e, { expose: i, emit: t }) {
3240
- const n = e, a = q(!1), o = (m) => {
3239
+ setup(e, { expose: n, emit: t }) {
3240
+ const i = e, a = q(!1), o = (m) => {
3241
3241
  ut.isBoolean(m) ? a.value = m : a.value = !a.value;
3242
3242
  }, r = q([]), l = t;
3243
3243
  function s() {
@@ -3249,10 +3249,10 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3249
3249
  Ce(
3250
3250
  () => a.value,
3251
3251
  (m) => {
3252
- m && (r.value = ae(n.initialValue));
3252
+ m && (r.value = ae(i.initialValue));
3253
3253
  }
3254
- ), i({ getKey: () => n.bindingKey, trigger: o });
3255
- const { t: d } = ce(), h = Ui();
3254
+ ), n({ getKey: () => i.bindingKey, trigger: o });
3255
+ const { t: d } = ce(), h = $n();
3256
3256
  return Qe(() => {
3257
3257
  h.readInventory();
3258
3258
  }), (m, c) => {
@@ -3302,7 +3302,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3302
3302
  variant: "outlined"
3303
3303
  }, {
3304
3304
  default: N(() => [
3305
- C(p(Tn), {
3305
+ C(p(Ti), {
3306
3306
  modelValue: r.value,
3307
3307
  "onUpdate:modelValue": c[0] || (c[0] = (z) => r.value = z)
3308
3308
  }, null, 8, ["modelValue"])
@@ -3336,9 +3336,9 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3336
3336
  },
3337
3337
  emits: ["update:group", "update:unmap-group"],
3338
3338
  setup(e, {
3339
- emit: i
3339
+ emit: n
3340
3340
  }) {
3341
- const t = e, n = i, a = Xt(), o = me(), r = T(() => _e.Country.getCountry(a.currentCountry.value)), l = q(!1), s = T(() => t.config.isV4 || t.group.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT), u = T(() => Object.values(t.group.items).flatMap((M) => [{
3341
+ const t = e, i = n, a = Xt(), o = me(), r = T(() => _e.Country.getCountry(a.currentCountry.value)), l = q(!1), s = T(() => t.config.isV4 || t.group.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT), u = T(() => Object.values(t.group.items).flatMap((M) => [{
3342
3342
  _id: M._id,
3343
3343
  combinationKey: void 0
3344
3344
  }, ...(M.items ?? []).map((U) => ({
@@ -3347,7 +3347,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3347
3347
  }))])), {
3348
3348
  searchKey: d,
3349
3349
  filter: h
3350
- } = fn(), m = T(() => {
3350
+ } = fi(), m = T(() => {
3351
3351
  const M = Object.entries(t.group.items).filter(([, U]) => h([U.code || "", U.name || U.fallbackName, v(U.price ?? U.fallbackPrice), g(U.orderFrom || U.fallbackOrder), ...(U.items || []).map(($) => [$.code || "", $.name || $.fallbackName, v($.price ?? $.fallbackPrice), g($.orderFrom || $.fallbackOrder)].join(""))]));
3352
3352
  return Object.fromEntries(M);
3353
3353
  }), c = (M) => ({
@@ -3357,7 +3357,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3357
3357
  orderFrom: t.config.orderFrom(M)
3358
3358
  }), y = T(() => t.config.isItemGroup), v = (M) => M ? rt(M, !1) : "", g = (M) => {
3359
3359
  var U;
3360
- return M == null ? "" : (U = gn()[M]) == null ? void 0 : U.label;
3360
+ return M == null ? "" : (U = gi()[M]) == null ? void 0 : U.label;
3361
3361
  }, w = T(() => Object.values(m.value)), z = q({}), {
3362
3362
  t: O
3363
3363
  } = ce(), I = q([{
@@ -3365,26 +3365,26 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3365
3365
  header: () => O("menu.group.option.product_title"),
3366
3366
  enableSorting: !1,
3367
3367
  cell: (M) => {
3368
- const U = M.getValue(), $ = M.row.original, Q = M.row.depth > 0, j = $.combinationKey ? Ni($.combinationKey, me().variants) : null;
3368
+ const U = M.getValue(), $ = M.row.original, Q = M.row.depth > 0, j = $.combinationKey ? Ln($.combinationKey, me().variants) : null;
3369
3369
  return ue("div", ue(ke.FmTextField, {
3370
3370
  modelValue: U,
3371
3371
  placeholder: j ?? "",
3372
3372
  disabled: !c($.combinationKey).name,
3373
- rules: j ? void 0 : [(ie) => ie.length > 0 || O("menu.group.option.product_title_required")],
3374
- "onUpdate:modelValue": (ie) => {
3373
+ rules: j ? void 0 : [(ne) => ne.length > 0 || O("menu.group.option.product_title_required")],
3374
+ "onUpdate:modelValue": (ne) => {
3375
3375
  var te;
3376
3376
  if (Q) {
3377
3377
  const we = (te = M.row.getParentRow()) == null ? void 0 : te.original;
3378
3378
  if (!we) return;
3379
- _(we._id, $.combinationKey ?? "", "name", ie);
3379
+ _(we._id, $.combinationKey ?? "", "name", ne);
3380
3380
  } else
3381
- A($._id, "name", ie);
3381
+ A($._id, "name", ne);
3382
3382
  },
3383
3383
  class: "min-w-[300px]"
3384
3384
  }, {
3385
3385
  append: () => {
3386
- var ie, te;
3387
- return (te = (ie = M.row.original) == null ? void 0 : ie.items) != null && te.length ? ue(ke.FmIcon, {
3386
+ var ne, te;
3387
+ return (te = (ne = M.row.original) == null ? void 0 : ne.items) != null && te.length ? ue(ke.FmIcon, {
3388
3388
  name: "keyboard_arrow_up",
3389
3389
  onClick: M.row.getToggleExpandedHandler(),
3390
3390
  class: ["cursor-pointer", "transition-transform", M.row.getIsExpanded() ? "transform rotate-180" : ""],
@@ -3410,7 +3410,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3410
3410
  required: !Q,
3411
3411
  nullable: !!Q,
3412
3412
  min: y ? void 0 : 0,
3413
- "onUpdate:modelValue": (ie) => {
3413
+ "onUpdate:modelValue": (ne) => {
3414
3414
  var te;
3415
3415
  if (j) {
3416
3416
  const we = (te = M.row.getParentRow()) == null ? void 0 : te.original;
@@ -3420,10 +3420,10 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3420
3420
  $.combinationKey ?? "",
3421
3421
  // @ts-ignore
3422
3422
  "price",
3423
- ie
3423
+ ne
3424
3424
  );
3425
3425
  } else
3426
- A($._id, "price", ie);
3426
+ A($._id, "price", ne);
3427
3427
  },
3428
3428
  showCurrency: !1,
3429
3429
  class: "min-w-[88px]"
@@ -3441,7 +3441,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3441
3441
  disable: !c($.combinationKey).orderFrom,
3442
3442
  required: !0,
3443
3443
  editActiveOnly: c($.combinationKey).orderFromActiveOnly,
3444
- "onUpdate:modelValue": (ie) => {
3444
+ "onUpdate:modelValue": (ne) => {
3445
3445
  var te;
3446
3446
  if (j) {
3447
3447
  const we = (te = M.row.getParentRow()) == null ? void 0 : te.original;
@@ -3451,10 +3451,10 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3451
3451
  $.combinationKey ?? "",
3452
3452
  // @ts-ignore
3453
3453
  "orderFrom",
3454
- ie
3454
+ ne
3455
3455
  );
3456
3456
  } else
3457
- A($._id, "orderFrom", ie);
3457
+ A($._id, "orderFrom", ne);
3458
3458
  },
3459
3459
  label: "",
3460
3460
  menuZIndex: 101
@@ -3480,10 +3480,10 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3480
3480
  "onUpdate:inventory": (Q) => {
3481
3481
  var j;
3482
3482
  if ($) {
3483
- const ie = (j = M.row.getParentRow()) == null ? void 0 : j.original;
3484
- if (!ie) return;
3483
+ const ne = (j = M.row.getParentRow()) == null ? void 0 : j.original;
3484
+ if (!ne) return;
3485
3485
  _(
3486
- ie._id,
3486
+ ne._id,
3487
3487
  U.combinationKey ?? "",
3488
3488
  // @ts-ignore
3489
3489
  "inventoryBindings",
@@ -3533,7 +3533,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3533
3533
  }));
3534
3534
  async function P() {
3535
3535
  const M = (/* @__PURE__ */ new Date()).toISOString();
3536
- n("update:group", {
3536
+ i("update:group", {
3537
3537
  ...t.group,
3538
3538
  items: {
3539
3539
  ...t.group.items,
@@ -3555,7 +3555,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3555
3555
  const j = {
3556
3556
  ...Q
3557
3557
  };
3558
- U === "price" ? j[U] = !$ && !Q.fallbackPrice ? _e.Dinero.zero().toObject() : $ : j[U] = $, n("update:group", {
3558
+ U === "price" ? j[U] = !$ && !Q.fallbackPrice ? _e.Dinero.zero().toObject() : $ : j[U] = $, i("update:group", {
3559
3559
  ...t.group,
3560
3560
  items: {
3561
3561
  ...t.group.items,
@@ -3565,33 +3565,33 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3565
3565
  }
3566
3566
  function _(M, U, $, Q) {
3567
3567
  var we, ct;
3568
- const j = ae(t.group), ie = (we = j.items[M].items) == null ? void 0 : we.findIndex((dt) => dt.combinationKey === U);
3569
- if (!ut.isSet(ie)) return;
3570
- let te = (ct = j.items[M].items) == null ? void 0 : ct[ie];
3568
+ const j = ae(t.group), ne = (we = j.items[M].items) == null ? void 0 : we.findIndex((dt) => dt.combinationKey === U);
3569
+ if (!ut.isSet(ne)) return;
3570
+ let te = (ct = j.items[M].items) == null ? void 0 : ct[ne];
3571
3571
  te && (te = {
3572
3572
  ...te,
3573
3573
  [$]: Q
3574
- }, j.items[M].items[ie] = te, n("update:group", j));
3574
+ }, j.items[M].items[ne] = te, i("update:group", j));
3575
3575
  }
3576
3576
  function R(M) {
3577
3577
  const U = ae(t.group);
3578
- delete U.items[M], n("update:group", U);
3578
+ delete U.items[M], i("update:group", U);
3579
3579
  }
3580
3580
  function f(M, U) {
3581
3581
  const $ = ae(t.group), Q = $.items[M];
3582
- Q && (Q.items = (Q.items || []).filter((j) => j.combinationKey !== U), $.items[M] = Q, n("update:group", $));
3582
+ Q && (Q.items = (Q.items || []).filter((j) => j.combinationKey !== U), $.items[M] = Q, i("update:group", $));
3583
3583
  }
3584
3584
  const b = T(() => t.categorizedItems.flatMap((M) => M.items).reduce((M, U) => {
3585
3585
  var $;
3586
3586
  return M[U._id] = {
3587
3587
  price: U.price,
3588
- variants: vn((($ = U.variant) == null ? void 0 : $.variantCombinations) || [], "combinationKey")
3588
+ variants: vi((($ = U.variant) == null ? void 0 : $.variantCombinations) || [], "combinationKey")
3589
3589
  }, M;
3590
3590
  }, {})), x = (M) => {
3591
- var j, ie;
3591
+ var j, ne;
3592
3592
  const $ = o.state.menu.modules.item.find((te) => te._id === M._id), Q = M.combinationKey ? {
3593
3593
  ...(j = $ == null ? void 0 : $.variant) == null ? void 0 : j.variantCombinations.find((te) => te.combinationKey === M.combinationKey),
3594
- name: Fi(me().variants, ((ie = $ == null ? void 0 : $.variant) == null ? void 0 : ie.variantGroupIds) || [])[M.combinationKey]
3594
+ name: En(me().variants, ((ne = $ == null ? void 0 : $.variant) == null ? void 0 : ne.variantGroupIds) || [])[M.combinationKey]
3595
3595
  } : $;
3596
3596
  return Q == null ? void 0 : Q.name;
3597
3597
  }, k = async (M) => {
@@ -3599,7 +3599,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3599
3599
  U = {
3600
3600
  ...U,
3601
3601
  items: M.map(($) => {
3602
- const Q = U.items.find((ie) => ie._id == $._id && ie.combinationKey == $.combinationKey), j = b.value[$._id];
3602
+ const Q = U.items.find((ne) => ne._id == $._id && ne.combinationKey == $.combinationKey), j = b.value[$._id];
3603
3603
  return Q || {
3604
3604
  ...$,
3605
3605
  name: x($),
@@ -3607,16 +3607,16 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3607
3607
  orderFrom: L.F_ORDER_FROM.enum.ALL
3608
3608
  };
3609
3609
  })
3610
- }, n("update:unmap-group", U);
3610
+ }, i("update:unmap-group", U);
3611
3611
  }, S = (M) => M.items;
3612
3612
  function K(M) {
3613
3613
  const U = ae(t.group);
3614
3614
  U.items = M.reduce(($, Q) => ({
3615
3615
  ...$,
3616
3616
  [Q._id]: Q
3617
- }), {}), n("update:group", U);
3617
+ }), {}), i("update:group", U);
3618
3618
  }
3619
- const Y = Ii(), J = T(() => Y.breakpoints.value.xs);
3619
+ const Y = Pn(), J = T(() => Y.breakpoints.value.xs);
3620
3620
  return (M, U) => {
3621
3621
  const $ = B("fm-button"), Q = B("fm-table");
3622
3622
  return F(), G(Ge, {
@@ -3624,7 +3624,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3624
3624
  }, {
3625
3625
  "append-title": N(() => [M.config.link() ? (F(), Z(Re, {
3626
3626
  key: 0
3627
- }, [s.value ? (F(), Z("div", Ga, [C(Dn, {
3627
+ }, [s.value ? (F(), Z("div", Ga, [C(Di, {
3628
3628
  "categorized-items": M.categorizedItems,
3629
3629
  "initial-value": u.value,
3630
3630
  "show-variant": M.config.bindToVariant,
@@ -3671,7 +3671,7 @@ const sn = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3671
3671
  };
3672
3672
  }
3673
3673
  }), Xa = {}, qa = { class: "flex gap-16" };
3674
- function Za(e, i) {
3674
+ function Za(e, n) {
3675
3675
  return F(), Z("div", qa, [
3676
3676
  he(e.$slots, "default")
3677
3677
  ]);
@@ -3679,7 +3679,7 @@ function Za(e, i) {
3679
3679
  const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-title-md-600" }, er = {
3680
3680
  key: 0,
3681
3681
  class: "pt-8 space-y-32"
3682
- }, tr = { class: "flex gap-8 items-center justify-start" }, ln = /* @__PURE__ */ le({
3682
+ }, tr = { class: "flex gap-8 items-center justify-start" }, li = /* @__PURE__ */ le({
3683
3683
  __name: "Form",
3684
3684
  props: {
3685
3685
  title: {},
@@ -3690,11 +3690,11 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3690
3690
  allowRefundInventory: { type: Boolean }
3691
3691
  },
3692
3692
  emits: ["update:group", "submit:group", "status:show"],
3693
- setup(e, { expose: i, emit: t }) {
3694
- let n = e;
3693
+ setup(e, { expose: n, emit: t }) {
3694
+ let i = e;
3695
3695
  const a = t, o = me(), r = Ue(), l = He(Ye(Le())), s = q(!1), u = q(!1), d = (I) => {
3696
3696
  ut.isBoolean(I) ? u.value = I : u.value = !u.value;
3697
- }, h = T(() => n.config(n.group)), m = T(() => [
3697
+ }, h = T(() => i.config(i.group)), m = T(() => [
3698
3698
  {
3699
3699
  label: "Normal",
3700
3700
  value: L.F_ADDON_GROUP_TYPE.enum.NORMAL
@@ -3714,12 +3714,12 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3714
3714
  function y(I) {
3715
3715
  function E() {
3716
3716
  c({
3717
- ...n.group,
3717
+ ...i.group,
3718
3718
  items: {},
3719
3719
  type: I
3720
3720
  });
3721
3721
  }
3722
- Object.keys(n.group.items).length > 0 ? r.open({
3722
+ Object.keys(i.group.items).length > 0 ? r.open({
3723
3723
  title: "Change addon group type",
3724
3724
  message: "Change addon group type will clear all products. Are you sure to proceed?",
3725
3725
  primaryActions: {
@@ -3733,20 +3733,20 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3733
3733
  }).onPrimary(E) : E();
3734
3734
  }
3735
3735
  function v(I) {
3736
- return new Vi(o, l.updateMenu, r).mapGroups(
3736
+ return new Nn(o, l.updateMenu, r).mapGroups(
3737
3737
  [I],
3738
3738
  h.value.isOverride
3739
3739
  )[0];
3740
3740
  }
3741
- const g = q(Ne.clone(n.group)), w = In(
3742
- () => !Ne.isEqual(n.group, g.value),
3741
+ const g = q(Ne.clone(i.group)), w = Ii(
3742
+ () => !Ne.isEqual(i.group, g.value),
3743
3743
  () => {
3744
3744
  u.value = !1;
3745
3745
  }
3746
3746
  );
3747
3747
  async function z() {
3748
- if (n.action === "add") {
3749
- const { group: I, linkItems: E } = $i(n.group), P = {
3748
+ if (i.action === "add") {
3749
+ const { group: I, linkItems: E } = Vn(i.group), P = {
3750
3750
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
3751
3751
  operation: be.F_OPERATION_TYPE.create,
3752
3752
  data: I,
@@ -3758,16 +3758,16 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3758
3758
  }
3759
3759
  ]
3760
3760
  };
3761
- await l.updateMenu(P, I.name), a("submit:group", n.group);
3762
- } else n.action === "update" && a("submit:group", n.group);
3761
+ await l.updateMenu(P, I.name), a("submit:group", i.group);
3762
+ } else i.action === "update" && a("submit:group", i.group);
3763
3763
  d(!1);
3764
3764
  }
3765
3765
  Ce(
3766
3766
  () => u.value,
3767
3767
  (I) => {
3768
- a("status:show", I), I && (g.value = Ne.clone(n.group));
3768
+ a("status:show", I), I && (g.value = Ne.clone(i.group));
3769
3769
  }
3770
- ), i({
3770
+ ), n({
3771
3771
  trigger: d,
3772
3772
  show: u
3773
3773
  });
@@ -3794,7 +3794,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3794
3794
  "side-sheet-footer": N(() => [
3795
3795
  D("div", tr, [
3796
3796
  C(x, {
3797
- label: p($n)(I.action),
3797
+ label: p($i)(I.action),
3798
3798
  loading: s.value,
3799
3799
  size: "lg",
3800
3800
  type: "submit",
@@ -3811,7 +3811,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3811
3811
  default: N(() => [
3812
3812
  I.group ? (F(), Z("div", er, [
3813
3813
  he(I.$slots, "variant-section"),
3814
- C(Fn, null, {
3814
+ C(Fi, null, {
3815
3815
  default: N(() => [
3816
3816
  D("div", null, [
3817
3817
  C(P, {
@@ -3909,7 +3909,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3909
3909
  ], 64);
3910
3910
  };
3911
3911
  }
3912
- }), ir = { class: "fm-typo-en-title-sm-600" }, nr = { class: "flex items-end space-x-24" }, or = { class: "flex" }, ar = /* @__PURE__ */ le({
3912
+ }), nr = { class: "fm-typo-en-title-sm-600" }, ir = { class: "flex items-end space-x-24" }, or = { class: "flex" }, ar = /* @__PURE__ */ le({
3913
3913
  __name: "UpdateForm",
3914
3914
  props: {
3915
3915
  combinations: {},
@@ -3917,23 +3917,23 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3917
3917
  fullCombinations: {}
3918
3918
  },
3919
3919
  emits: ["update:combinations"],
3920
- setup(e, { expose: i, emit: t }) {
3920
+ setup(e, { expose: n, emit: t }) {
3921
3921
  var I, E;
3922
- const n = e, a = t, o = me(), r = Ue(), l = He(Ye(Le())), s = q([]), u = q(n.combinations[0].combinationKey || ""), d = T(
3922
+ const i = e, a = t, o = me(), r = Ue(), l = He(Ye(Le())), s = q([]), u = q(i.combinations[0].combinationKey || ""), d = T(
3923
3923
  () => s.value.findIndex((P) => P.combinationKey == u.value)
3924
3924
  ), h = T(
3925
- () => n.combinations.map((P) => ({
3926
- label: n.fullCombinations[P.combinationKey || ""],
3925
+ () => i.combinations.map((P) => ({
3926
+ label: i.fullCombinations[P.combinationKey || ""],
3927
3927
  value: P.combinationKey || ""
3928
3928
  }))
3929
3929
  ), m = T(() => {
3930
3930
  var b, x;
3931
3931
  const P = ((x = (b = s.value[d.value]) == null ? void 0 : b.groups) == null ? void 0 : x.find(
3932
- (k) => k._id === n.groupId
3932
+ (k) => k._id === i.groupId
3933
3933
  )) || {
3934
- _id: n.groupId,
3934
+ _id: i.groupId,
3935
3935
  groupKey: ""
3936
- }, _ = o.state.menu.modules.group.find((k) => k._id === n.groupId), R = Object.entries({ ...P, items: void 0 }).filter(([, k]) => !!k), f = {
3936
+ }, _ = o.state.menu.modules.group.find((k) => k._id === i.groupId), R = Object.entries({ ...P, items: void 0 }).filter(([, k]) => !!k), f = {
3937
3937
  ..._,
3938
3938
  ...Object.fromEntries(R),
3939
3939
  items: _.items.map((k) => {
@@ -3949,13 +3949,13 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3949
3949
  };
3950
3950
  })
3951
3951
  };
3952
- return new Vi(o, l.updateMenu, r).mapGroups([f], !0)[0];
3952
+ return new Nn(o, l.updateMenu, r).mapGroups([f], !0)[0];
3953
3953
  });
3954
3954
  function c(P) {
3955
3955
  var f, b;
3956
3956
  const A = (f = s.value[d.value].groups) == null ? void 0 : f.findIndex(
3957
- (x) => x._id === n.groupId
3958
- ), _ = ae(s.value), R = { ...qt(P), _id: n.groupId, groupKey: "" };
3957
+ (x) => x._id === i.groupId
3958
+ ), _ = ae(s.value), R = { ...qt(P), _id: i.groupId, groupKey: "" };
3959
3959
  (A ?? -1) < 0 ? _[d.value] = {
3960
3960
  ..._[d.value],
3961
3961
  groups: [...((b = _[d.value]) == null ? void 0 : b.groups) || [], R]
@@ -3989,18 +3989,18 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3989
3989
  Ce(
3990
3990
  () => w.value,
3991
3991
  (P) => {
3992
- P && (s.value = ae(n.combinations), u.value = n.combinations[0].combinationKey || "");
3992
+ P && (s.value = ae(i.combinations), u.value = i.combinations[0].combinationKey || "");
3993
3993
  }
3994
3994
  );
3995
3995
  const z = q();
3996
- i({
3996
+ n({
3997
3997
  show: (I = z.value) == null ? void 0 : I.show,
3998
3998
  trigger: (E = z.value) == null ? void 0 : E.trigger
3999
3999
  });
4000
4000
  const { t: O } = ce();
4001
4001
  return (P, A) => {
4002
4002
  const _ = B("fm-select"), R = B("fm-button"), f = B("fm-card");
4003
- return F(), G(ln, {
4003
+ return F(), G(li, {
4004
4004
  ref_key: "sheet",
4005
4005
  ref: z,
4006
4006
  "allow-refund-inventory": !0,
@@ -4023,8 +4023,8 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4023
4023
  variant: "outlined"
4024
4024
  }, {
4025
4025
  default: N(() => [
4026
- D("p", ir, se(p(O)("menu.group.option.variant")), 1),
4027
- D("div", nr, [
4026
+ D("p", nr, se(p(O)("menu.group.option.variant")), 1),
4027
+ D("div", ir, [
4028
4028
  C(_, {
4029
4029
  modelValue: u.value,
4030
4030
  "onUpdate:modelValue": A[0] || (A[0] = (b) => u.value = b),
@@ -4055,7 +4055,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4055
4055
  }, 8, ["categorized-items", "group", "title"]);
4056
4056
  };
4057
4057
  }
4058
- }), rr = ln, Mi = Va, sr = ar, lr = {
4058
+ }), rr = li, On = Va, sr = ar, lr = {
4059
4059
  key: 0,
4060
4060
  class: "flex flex-col space-y-16 h-[440px]"
4061
4061
  }, ur = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, cr = { class: "flex justify-between pb-16" }, dr = { class: "flex gap-8" }, mr = {
@@ -4067,7 +4067,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4067
4067
  groupIds: {}
4068
4068
  },
4069
4069
  setup(e) {
4070
- const i = e, t = Ue(), { emitData: n, emitAction: a } = Ei(), o = me(), r = T(() => o.rules.group), l = T(() => o.groups);
4070
+ const n = e, t = Ue(), { emitData: i, emitAction: a } = In(), o = me(), r = T(() => o.rules.group), l = T(() => o.groups);
4071
4071
  function s(z) {
4072
4072
  return ae(z ?? []).sort((I, E) => I.position - E.position);
4073
4073
  }
@@ -4103,8 +4103,8 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4103
4103
  items: {},
4104
4104
  position: o.groups.length - 1,
4105
4105
  itemsLinked: []
4106
- })), y = q(ae(i.groupIds || [])), v = q(""), { t: g } = ce(), w = () => {
4107
- n(y.value), a("primary"), t.close();
4106
+ })), y = q(ae(n.groupIds || [])), v = q(""), { t: g } = ce(), w = () => {
4107
+ i(y.value), a("primary"), t.close();
4108
4108
  };
4109
4109
  return (z, O) => {
4110
4110
  const I = B("FmSearch"), E = B("FmCheckbox"), P = B("FmButton");
@@ -4126,7 +4126,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4126
4126
  modelValue: y.value,
4127
4127
  "onUpdate:modelValue": [
4128
4128
  O[1] || (O[1] = (_) => y.value = _),
4129
- O[2] || (O[2] = (_) => p(n)(y.value))
4129
+ O[2] || (O[2] = (_) => p(i)(y.value))
4130
4130
  ],
4131
4131
  label: A.label,
4132
4132
  value: A.value
@@ -4137,7 +4137,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4137
4137
  ])
4138
4138
  ]),
4139
4139
  D("div", cr, [
4140
- C(p(Mi), null, {
4140
+ C(p(On), null, {
4141
4141
  default: N(({ trigger: A }) => [
4142
4142
  C(P, {
4143
4143
  label: p(g)("menu.common.actions.add_group"),
@@ -4165,7 +4165,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4165
4165
  D("p", pr, se(p(g)("menu.common.empty.no_group.title")), 1),
4166
4166
  D("p", fr, se(p(g)("menu.common.empty.no_group.subtitle")), 1)
4167
4167
  ]),
4168
- C(p(Mi), {
4168
+ C(p(On), {
4169
4169
  "categorized-items": p(o).categorizedItems,
4170
4170
  config: m.value,
4171
4171
  group: c.value,
@@ -4199,14 +4199,14 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4199
4199
  },
4200
4200
  emits: ["update:form", "replace:form"],
4201
4201
  setup(e, {
4202
- emit: i
4202
+ emit: n
4203
4203
  }) {
4204
- const t = e, n = me(), a = ii(), o = Ue(), {
4204
+ const t = e, i = me(), a = nn(), o = Ue(), {
4205
4205
  t: r
4206
- } = ce(), l = i, s = T(() => n.rules.group), u = T(() => n.rules.item), d = T(() => n.groups);
4206
+ } = ce(), l = n, s = T(() => i.rules.group), u = T(() => i.rules.item), d = T(() => i.groups);
4207
4207
  q(!1);
4208
4208
  function h(f, b) {
4209
- return ae(b ?? []).map((k) => {
4209
+ return ae(b).map((k) => {
4210
4210
  const S = f.find((K) => K._id === k._id);
4211
4211
  return {
4212
4212
  name: (S == null ? void 0 : S.name) ?? "",
@@ -4224,7 +4224,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4224
4224
  }
4225
4225
  const y = T(() => c(d.value).reduce((f, b) => (f[b._id] = {
4226
4226
  name: b.name,
4227
- type: Ct(n.items, b.items)
4227
+ type: Ct(i.items, b.items)
4228
4228
  }, f), {})), v = T(() => [...Object.entries(y.value).map(([f, {
4229
4229
  name: b,
4230
4230
  type: x
@@ -4346,14 +4346,14 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4346
4346
  }
4347
4347
  Ce(() => d.value.length, () => z([...m.value, d.value[d.value.length - 1]._id])), T(() => ({
4348
4348
  ...ye.generator.initMenuV4Group(),
4349
- type: n.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
4349
+ type: i.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
4350
4350
  items: {},
4351
- position: n.groups.length - 1,
4351
+ position: i.groups.length - 1,
4352
4352
  itemsLinked: []
4353
4353
  }));
4354
- const A = T(() => !!n.state.currentCatalogId || !!n.state.currentSchedulerId);
4354
+ const A = T(() => !!i.state.currentCatalogId || !!i.state.currentSchedulerId);
4355
4355
  T(() => {
4356
- const f = !n.state.currentSchedulerId, b = n.rules.group.type, x = n.version == L.F_MENU_VERSION.enum.v3, k = n.rules.item.orderFromActiveOnly, S = n.rules.item.bindToVariant;
4356
+ const f = !i.state.currentSchedulerId, b = i.rules.group.type, x = i.version == L.F_MENU_VERSION.enum.v3, k = i.rules.item.orderFromActiveOnly, S = i.rules.item.bindToVariant;
4357
4357
  return function(Y) {
4358
4358
  return {
4359
4359
  link: (J) => !A.value && (!J || S),
@@ -4394,7 +4394,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4394
4394
  variant: "secondary",
4395
4395
  onClick: w
4396
4396
  }, null, 8, ["label"])]),
4397
- default: N(() => [C(sn, null, {
4397
+ default: N(() => [C(si, null, {
4398
4398
  default: N(() => {
4399
4399
  var S;
4400
4400
  return [((S = m.value) == null ? void 0 : S.length) > 0 ? (F(), G(k, {
@@ -4433,32 +4433,32 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4433
4433
  },
4434
4434
  emits: ["update:form", "replace:form"],
4435
4435
  setup(e, {
4436
- emit: i
4436
+ emit: n
4437
4437
  }) {
4438
4438
  const {
4439
4439
  t
4440
- } = ce(), n = e, a = i, o = me(), r = T(() => o.rules.item), l = T(() => r.value.inventory);
4440
+ } = ce(), i = e, a = n, o = me(), r = T(() => o.rules.item), l = T(() => r.value.inventory);
4441
4441
  function s(v, g, w, z) {
4442
- return !g || g && g.length === 0 ? [{
4442
+ return !g || g.length === 0 ? [{
4443
4443
  _id: "",
4444
4444
  name: w,
4445
4445
  binding: v || []
4446
4446
  }] : g.map((O) => ({
4447
4447
  _id: O.combinationKey || "",
4448
- name: Ni(O.combinationKey || "", z),
4448
+ name: Ln(O.combinationKey || "", z),
4449
4449
  binding: O.inventoryBindings || []
4450
4450
  }));
4451
4451
  }
4452
4452
  const u = T(() => {
4453
4453
  var v;
4454
- return n.form.name || ((v = n.fallback) == null ? void 0 : v.name) || "";
4454
+ return i.form.name || ((v = i.fallback) == null ? void 0 : v.name) || "";
4455
4455
  }), d = T(() => {
4456
4456
  var v;
4457
- return s(n.form.inventoryBindings || [], ((v = n.form.variant) == null ? void 0 : v.variantCombinations) || [], u.value, o.variants);
4457
+ return s(i.form.inventoryBindings || [], ((v = i.form.variant) == null ? void 0 : v.variantCombinations) || [], u.value, o.variants);
4458
4458
  });
4459
4459
  function h(v, g) {
4460
4460
  var I, E;
4461
- let w = Ne.clone(n.form);
4461
+ let w = Ne.clone(i.form);
4462
4462
  const z = w.variant;
4463
4463
  if ((((I = z == null ? void 0 : z.variantCombinations) == null ? void 0 : I.length) ?? 0) > 0 && z) {
4464
4464
  const P = z.variantCombinations.findIndex((_) => _.combinationKey === v);
@@ -4538,7 +4538,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4538
4538
  for (const g of m.value)
4539
4539
  g.getKey() === v && g.trigger(!0);
4540
4540
  }
4541
- const y = Ui();
4541
+ const y = $n();
4542
4542
  return Qe(() => {
4543
4543
  y.readInventory();
4544
4544
  }), (v, g) => (F(), G(Ge, {
@@ -4558,7 +4558,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4558
4558
  "onUpdate:inventory": (z) => {
4559
4559
  h(w._id, z);
4560
4560
  }
4561
- }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 256)), C(p(Un), {
4561
+ }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 256)), C(p(Ui), {
4562
4562
  "row-data": d.value,
4563
4563
  onRowClick: c
4564
4564
  }, null, 8, ["row-data"])])])]),
@@ -4580,11 +4580,11 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4580
4580
  },
4581
4581
  emits: ["update:form", "replace:form"],
4582
4582
  setup(e, {
4583
- emit: i
4583
+ emit: n
4584
4584
  }) {
4585
- const t = e, n = me(), a = T(() => n.rules.item), o = He(Ye(Le())), {
4585
+ const t = e, i = me(), a = T(() => i.rules.item), o = He(Ye(Le())), {
4586
4586
  t: r
4587
- } = ce(), l = i, s = T(() => {
4587
+ } = ce(), l = n, s = T(() => {
4588
4588
  var y, v;
4589
4589
  return !!((v = (y = t.form.variant) == null ? void 0 : y.variantCombinations) != null && v.length);
4590
4590
  }), u = T(() => {
@@ -4616,7 +4616,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4616
4616
  } : {
4617
4617
  label: r("menu.product.form.takeaway.options.no_preset"),
4618
4618
  value: null
4619
- }, ...n.takeaways.map((y) => ({
4619
+ }, ...i.takeaways.map((y) => ({
4620
4620
  label: y.name,
4621
4621
  value: y._id
4622
4622
  }))]), c = q([{
@@ -4629,10 +4629,10 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4629
4629
  header: () => r("menu.product.form.takeaway.columns.takeaway"),
4630
4630
  cell: (y) => {
4631
4631
  const v = y.getValue(), g = y.row.original;
4632
- return ue(En, {
4632
+ return ue(Ei, {
4633
4633
  action: "add",
4634
4634
  applyProduct: !1,
4635
- bindToVariant: n.rules.item.bindToVariant,
4635
+ bindToVariant: i.rules.item.bindToVariant,
4636
4636
  "onUpdate:takeaway": async (w) => {
4637
4637
  await o.updateMenu({
4638
4638
  module: L.F_MENU_MODULE_V4_KEY.enum.takeaway,
@@ -4653,7 +4653,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4653
4653
  g.onUpdate(z || "");
4654
4654
  }
4655
4655
  }, {
4656
- "append-menu": () => n.rules.takeaway.create ? ue("button", {
4656
+ "append-menu": () => i.rules.takeaway.create ? ue("button", {
4657
4657
  class: "flex items-center py-8 px-16 space-x-8",
4658
4658
  type: "button",
4659
4659
  onClick: w
@@ -4691,10 +4691,10 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4691
4691
  applyProduct: { type: Boolean }
4692
4692
  },
4693
4693
  setup(e) {
4694
- const { t: i } = ce(), t = e, n = He(Ye(Le())), a = T(
4695
- () => t.initialValue ? i("menu.print_dept.update") : i("menu.print_dept.add")
4694
+ const { t: n } = ce(), t = e, i = He(Ye(Le())), a = T(
4695
+ () => t.initialValue ? n("menu.print_dept.update") : n("menu.print_dept.add")
4696
4696
  ), o = T(
4697
- () => t.initialValue ? i("menu.common.actions.update") : i("menu.common.actions.add")
4697
+ () => t.initialValue ? n("menu.common.actions.update") : n("menu.common.actions.add")
4698
4698
  ), r = q(
4699
4699
  t.initialValue ? ae(t.initialValue) : { ...ye.generator.initMenuV4PrintDepartment(), usedBy: [] }
4700
4700
  ), l = q(!1), s = q(!1), u = (h) => {
@@ -4703,7 +4703,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4703
4703
  async function d() {
4704
4704
  var h, m;
4705
4705
  try {
4706
- l.value = !0, t.initialValue ? await n.updateMenu(
4706
+ l.value = !0, t.initialValue ? await i.updateMenu(
4707
4707
  {
4708
4708
  module: L.F_MENU_MODULE_V4_KEY.enum.printDepartment,
4709
4709
  operation: be.F_OPERATION_TYPE.update,
@@ -4711,7 +4711,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4711
4711
  link: $t(((h = r.value) == null ? void 0 : h.usedBy) || [])
4712
4712
  },
4713
4713
  r.value.name
4714
- ) : await n.updateMenu(
4714
+ ) : await i.updateMenu(
4715
4715
  {
4716
4716
  module: L.F_MENU_MODULE_V4_KEY.enum.printDepartment,
4717
4717
  operation: be.F_OPERATION_TYPE.create,
@@ -4761,7 +4761,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4761
4761
  variant: "primary"
4762
4762
  }, null, 8, ["label", "loading"]),
4763
4763
  C(y, {
4764
- label: p(i)("menu.common.actions.cancel"),
4764
+ label: p(n)("menu.common.actions.cancel"),
4765
4765
  size: "lg",
4766
4766
  variant: "tertiary",
4767
4767
  onClick: m[2] || (m[2] = () => s.value = !1)
@@ -4774,19 +4774,19 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4774
4774
  modelValue: r.value.name,
4775
4775
  "onUpdate:modelValue": m[0] || (m[0] = (g) => r.value.name = g),
4776
4776
  rules: [
4777
- (g) => g ? !0 : p(i)("menu.common.validation.required", {
4778
- field: p(i)("menu.print_dept.columns.name").toLowerCase()
4777
+ (g) => g ? !0 : p(n)("menu.common.validation.required", {
4778
+ field: p(n)("menu.print_dept.columns.name").toLowerCase()
4779
4779
  })
4780
4780
  ],
4781
4781
  autofocus: "",
4782
- label: p(i)("menu.print_dept.columns.name")
4782
+ label: p(n)("menu.print_dept.columns.name")
4783
4783
  }, null, 8, ["modelValue", "rules", "label"]),
4784
- h.applyProduct ? (F(), G(Vn, {
4784
+ h.applyProduct ? (F(), G(Vi, {
4785
4785
  key: 0,
4786
4786
  overrides: r.value.usedBy || [],
4787
4787
  "select-variant": !1,
4788
4788
  editable: "",
4789
- title: p(i)("menu.print_dept.columns.products"),
4789
+ title: p(n)("menu.print_dept.columns.products"),
4790
4790
  "onUpdate:overrides": m[1] || (m[1] = (g) => r.value.usedBy = g)
4791
4791
  }, null, 8, ["overrides", "title"])) : ee("", !0)
4792
4792
  ])
@@ -4806,8 +4806,8 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4806
4806
  fullCombinations: {}
4807
4807
  },
4808
4808
  emits: ["update:form", "replace:form"],
4809
- setup(e, { emit: i }) {
4810
- const t = e, n = me(), { t: a } = ce(), o = i;
4809
+ setup(e, { emit: n }) {
4810
+ const t = e, i = me(), { t: a } = ce(), o = n;
4811
4811
  function r() {
4812
4812
  return {
4813
4813
  ...ye.generator.initMenuV4PrintSetting(),
@@ -4815,7 +4815,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4815
4815
  toRoot: !1
4816
4816
  };
4817
4817
  }
4818
- const l = T(() => n.rules.item), s = T(() => n.printDepartments), u = T(() => {
4818
+ const l = T(() => i.rules.item), s = T(() => i.printDepartments), u = T(() => {
4819
4819
  var w;
4820
4820
  return ((w = t.form.print) == null ? void 0 : w.sequential) ?? !1;
4821
4821
  }), d = T(() => {
@@ -4920,7 +4920,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4920
4920
  label: p(a)("menu.product.form.print.routes.label")
4921
4921
  }, {
4922
4922
  default: N(() => [
4923
- d.value.length ? (F(), G(p(Ti), {
4923
+ d.value.length ? (F(), G(p(Un), {
4924
4924
  key: 0,
4925
4925
  "item-key": (R) => R,
4926
4926
  "model-value": d.value,
@@ -4991,11 +4991,11 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4991
4991
  disabled: { type: Boolean }
4992
4992
  },
4993
4993
  emits: ["update:toggle"],
4994
- setup(e, { emit: i }) {
4995
- const t = i;
4996
- return (n, a) => {
4994
+ setup(e, { emit: n }) {
4995
+ const t = n;
4996
+ return (i, a) => {
4997
4997
  const o = B("fm-switch"), r = B("fm-card");
4998
- return n.disabled ? he(n.$slots, "default", { key: 0 }, void 0, !0) : (F(), G(r, {
4998
+ return i.disabled ? he(i.$slots, "default", { key: 0 }, void 0, !0) : (F(), G(r, {
4999
4999
  key: 1,
5000
5000
  class: "p-16 space-y-24",
5001
5001
  variant: "outlined"
@@ -5003,18 +5003,18 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
5003
5003
  default: N(() => [
5004
5004
  D("div", Er, [
5005
5005
  D("div", Ir, [
5006
- D("p", Pr, se(n.title), 1),
5007
- n.description ? (F(), Z("p", Dr, se(n.description), 1)) : ee("", !0)
5006
+ D("p", Pr, se(i.title), 1),
5007
+ i.description ? (F(), Z("p", Dr, se(i.description), 1)) : ee("", !0)
5008
5008
  ]),
5009
5009
  C(o, {
5010
- "model-value": n.toggle,
5010
+ "model-value": i.toggle,
5011
5011
  "onUpdate:modelValue": a[0] || (a[0] = (l) => t("update:toggle", l))
5012
5012
  }, null, 8, ["model-value"])
5013
5013
  ]),
5014
- C(Sn, { name: "expand" }, {
5014
+ C(Si, { name: "expand" }, {
5015
5015
  default: N(() => [
5016
- n.toggle ? (F(), Z("div", Tr, [
5017
- he(n.$slots, "default", {}, void 0, !0)
5016
+ i.toggle ? (F(), Z("div", Tr, [
5017
+ he(i.$slots, "default", {}, void 0, !0)
5018
5018
  ])) : ee("", !0)
5019
5019
  ]),
5020
5020
  _: 3
@@ -5025,15 +5025,15 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
5025
5025
  };
5026
5026
  }
5027
5027
  }), We = /* @__PURE__ */ lt(Ur, [["__scopeId", "data-v-e920f110"]]), $r = {};
5028
- function Vr(e, i) {
5029
- return F(), Z("div", null, i[0] || (i[0] = [
5028
+ function Vr(e, n) {
5029
+ return F(), Z("div", null, n[0] || (n[0] = [
5030
5030
  D("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
5031
5031
  ]));
5032
5032
  }
5033
5033
  const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5034
5034
  key: 0,
5035
5035
  class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
5036
- }, Br = { class: "fm-typo-en-title-sm-600" }, Oi = /* @__PURE__ */ le({
5036
+ }, Br = { class: "fm-typo-en-title-sm-600" }, zn = /* @__PURE__ */ le({
5037
5037
  __name: "Summary",
5038
5038
  props: {
5039
5039
  title: {},
@@ -5041,13 +5041,13 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5041
5041
  items: {}
5042
5042
  },
5043
5043
  setup(e) {
5044
- const i = e, t = Ue();
5045
- function n() {
5044
+ const n = e, t = Ue();
5045
+ function i() {
5046
5046
  t.open({
5047
- title: i.title,
5047
+ title: n.title,
5048
5048
  contentComponent: ue("div", { class: "space-y-4" }, [
5049
- ...i.items.map(
5050
- (a) => ue(gi, {
5049
+ ...n.items.map(
5050
+ (a) => ue(vn, {
5051
5051
  name: a.name,
5052
5052
  value: a.value || "--"
5053
5053
  })
@@ -5057,10 +5057,10 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5057
5057
  }
5058
5058
  return (a, o) => {
5059
5059
  const r = B("FmButton");
5060
- return i.variant === "full" ? (F(), Z("div", Lr, [
5060
+ return n.variant === "full" ? (F(), Z("div", Lr, [
5061
5061
  D("div", Br, se(a.title), 1),
5062
5062
  C(Nr),
5063
- (F(!0), Z(Re, null, Ke(a.items, (l) => (F(), G(gi, {
5063
+ (F(!0), Z(Re, null, Ke(a.items, (l) => (F(), G(vn, {
5064
5064
  key: l.name,
5065
5065
  name: l.name,
5066
5066
  value: l.value || "--"
@@ -5069,7 +5069,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5069
5069
  key: 1,
5070
5070
  icon: "info",
5071
5071
  variant: "tertiary",
5072
- onClick: n
5072
+ onClick: i
5073
5073
  }));
5074
5074
  };
5075
5075
  }
@@ -5079,8 +5079,8 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5079
5079
  linkedStatus: {}
5080
5080
  },
5081
5081
  emits: ["update:catalogAndScheduler"],
5082
- setup(e, { emit: i }) {
5083
- const t = e, n = i, { t: a } = ce(), o = me(), r = q(o.state.currentCatalogId || null), l = T(() => {
5082
+ setup(e, { emit: n }) {
5083
+ const t = e, i = n, { t: a } = ce(), o = me(), r = q(o.state.currentCatalogId || null), l = T(() => {
5084
5084
  const m = Object.keys(t.linkedStatus.catalogs).map((c) => {
5085
5085
  var y;
5086
5086
  return {
@@ -5115,7 +5115,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5115
5115
  [null, ...u()].includes(s.value) || (s.value = null);
5116
5116
  });
5117
5117
  const h = Ne.debounce(() => {
5118
- n("update:catalogAndScheduler", [r.value, s.value]);
5118
+ i("update:catalogAndScheduler", [r.value, s.value]);
5119
5119
  }, 100);
5120
5120
  return Ce(
5121
5121
  () => `${r.value}-${s.value}`,
@@ -5150,7 +5150,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5150
5150
  ]);
5151
5151
  };
5152
5152
  }
5153
- }), Zr = zi("menu-edit-state", {
5153
+ }), Zr = Fn("menu-edit-state", {
5154
5154
  state: () => ({
5155
5155
  isUpdatingItem: !1,
5156
5156
  storedCatalogId: null,
@@ -5167,10 +5167,10 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5167
5167
  }, ts = {
5168
5168
  key: 4,
5169
5169
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
5170
- }, is = {
5170
+ }, ns = {
5171
5171
  key: 5,
5172
5172
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
5173
- }, ns = {
5173
+ }, is = {
5174
5174
  key: 7,
5175
5175
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
5176
5176
  }, os = {
@@ -5185,9 +5185,9 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5185
5185
  action: {}
5186
5186
  },
5187
5187
  emits: ["update:show", "submit:form"],
5188
- setup(e, { emit: i }) {
5189
- var oi, ai, ri, si, li;
5190
- const t = e, n = i, a = me(), o = Xt(), { t: r } = ce(), l = T(() => t.action === "add" ? r("menu.product.form.title.add") : r("menu.product.form.title.update")), s = T(() => a.rules.item), u = (W) => new Promise((V) => setTimeout(V, W));
5188
+ setup(e, { emit: n }) {
5189
+ var an, rn, sn, ln, un;
5190
+ const t = e, i = n, a = me(), o = Xt(), { t: r } = ce(), l = T(() => t.action === "add" ? r("menu.product.form.title.add") : r("menu.product.form.title.update")), s = T(() => a.rules.item), u = (W) => new Promise((V) => setTimeout(V, W));
5191
5191
  Qe(async () => {
5192
5192
  t.autoShow && (await u(100), h());
5193
5193
  });
@@ -5195,7 +5195,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5195
5195
  Ce(
5196
5196
  () => d.value,
5197
5197
  async (W) => {
5198
- await u(500), n("update:show", W);
5198
+ await u(500), i("update:show", W);
5199
5199
  }
5200
5200
  );
5201
5201
  const h = () => {
@@ -5210,7 +5210,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5210
5210
  () => t.initialForm,
5211
5211
  async () => {
5212
5212
  if (t.initialForm)
5213
- y.value = await Jn(
5213
+ y.value = await Ji(
5214
5214
  a.state.menu,
5215
5215
  t.initialForm._id
5216
5216
  );
@@ -5221,9 +5221,9 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5221
5221
  immediate: !0
5222
5222
  }
5223
5223
  );
5224
- const v = ii(), g = async ([W, V]) => {
5225
- a.selectCatalog(W), a.selectScheduler(V), await kn(), v.update(c.value._id), setTimeout(() => {
5226
- n("update:show", !1);
5224
+ const v = nn(), g = async ([W, V]) => {
5225
+ a.selectCatalog(W), a.selectScheduler(V), await ki(), v.update(c.value._id), setTimeout(() => {
5226
+ i("update:show", !1);
5227
5227
  }, 100);
5228
5228
  }, w = T(() => {
5229
5229
  var W;
@@ -5250,7 +5250,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5250
5250
  };
5251
5251
  async function I() {
5252
5252
  var W, V;
5253
- m.value = c.value._id ? (await Qn(
5253
+ m.value = c.value._id ? (await Qi(
5254
5254
  a.mergedMenu,
5255
5255
  [c.value],
5256
5256
  a.state.menu,
@@ -5271,13 +5271,13 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5271
5271
  (pe = m.value) == null ? void 0 : pe.taxes,
5272
5272
  a.taxSetting.countryTaxOptions
5273
5273
  ), re = a.taxSetting.countryTaxOptions.find((X) => X.value === W);
5274
- return re ? yn(re.meta.rate) : "-";
5274
+ return re ? yi(re.meta.rate) : "-";
5275
5275
  }
5276
5276
  function _() {
5277
5277
  z.value = null, c.value.thumbnail = null;
5278
5278
  }
5279
5279
  const R = T(() => {
5280
- var W, V, re, pe, X, ui, ci, di, mi;
5280
+ var W, V, re, pe, X, cn, dn, mn, hn;
5281
5281
  return {
5282
5282
  title: r("menu.product.form.summary.title"),
5283
5283
  items: [
@@ -5307,16 +5307,16 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5307
5307
  },
5308
5308
  {
5309
5309
  name: r("menu.product.form.summary.fields.inventory"),
5310
- value: (ui = c.value.inventoryBindings) != null && ui.length ? String(c.value.inventoryBindings.length) : (di = (ci = m.value) == null ? void 0 : ci.inventoryBindings) != null && di.length ? String(m.value.inventoryBindings.length) : "-"
5310
+ value: (cn = c.value.inventoryBindings) != null && cn.length ? String(c.value.inventoryBindings.length) : (mn = (dn = m.value) == null ? void 0 : dn.inventoryBindings) != null && mn.length ? String(m.value.inventoryBindings.length) : "-"
5311
5311
  },
5312
5312
  {
5313
5313
  name: r("menu.product.form.summary.fields.takeaway"),
5314
- value: ((mi = a.state.menu.modules.takeaway.find(
5314
+ value: ((hn = a.state.menu.modules.takeaway.find(
5315
5315
  (Mt) => {
5316
- var hi;
5317
- return Mt._id === (c.value.takeawayUsed || ((hi = m.value) == null ? void 0 : hi.takeawayUsed));
5316
+ var pn;
5317
+ return Mt._id === (c.value.takeawayUsed || ((pn = m.value) == null ? void 0 : pn.takeawayUsed));
5318
5318
  }
5319
- )) == null ? void 0 : mi.name) || "-"
5319
+ )) == null ? void 0 : hn.name) || "-"
5320
5320
  }
5321
5321
  ]
5322
5322
  };
@@ -5341,7 +5341,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5341
5341
  });
5342
5342
  }
5343
5343
  const S = q(
5344
- (((oi = c.value.variant) == null ? void 0 : oi.variantCombinations) || []).some(
5344
+ (((an = c.value.variant) == null ? void 0 : an.variantCombinations) || []).some(
5345
5345
  (W) => !!W.price || !!W.orderFrom || !!W.code
5346
5346
  )
5347
5347
  );
@@ -5361,7 +5361,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5361
5361
  });
5362
5362
  }
5363
5363
  const Y = q(
5364
- !!c.value.inventoryBindings || (((ai = c.value.variant) == null ? void 0 : ai.variantCombinations) || []).some((W) => !!W.inventoryBindings) || !1
5364
+ !!c.value.inventoryBindings || (((rn = c.value.variant) == null ? void 0 : rn.variantCombinations) || []).some((W) => !!W.inventoryBindings) || !1
5365
5365
  );
5366
5366
  function J(W) {
5367
5367
  var V, re, pe;
@@ -5378,7 +5378,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5378
5378
  });
5379
5379
  }
5380
5380
  const M = q(
5381
- c.value.takeawayUsed != null || (((ri = c.value.variant) == null ? void 0 : ri.variantCombinations) || []).some((W) => W.takeawayUsed != null) || !1
5381
+ c.value.takeawayUsed != null || (((sn = c.value.variant) == null ? void 0 : sn.variantCombinations) || []).some((W) => W.takeawayUsed != null) || !1
5382
5382
  );
5383
5383
  function U(W) {
5384
5384
  var V, re;
@@ -5399,12 +5399,12 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5399
5399
  W || (c.value = { ...c.value, print: void 0 });
5400
5400
  }
5401
5401
  const j = q(
5402
- !!((si = c.value.groups) != null && si.length) != null || (((li = c.value.variant) == null ? void 0 : li.variantCombinations) || []).some((W) => {
5402
+ !!((ln = c.value.groups) != null && ln.length) != null || (((un = c.value.variant) == null ? void 0 : un.variantCombinations) || []).some((W) => {
5403
5403
  var V;
5404
5404
  return !!((V = W.groups) != null && V.length);
5405
5405
  }) || !1
5406
5406
  );
5407
- function ie(W) {
5407
+ function ne(W) {
5408
5408
  var V, re;
5409
5409
  W || (c.value = {
5410
5410
  ...c.value,
@@ -5447,7 +5447,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5447
5447
  } catch (re) {
5448
5448
  console.log(re);
5449
5449
  }
5450
- }), Cn(() => {
5450
+ }), Ci(() => {
5451
5451
  try {
5452
5452
  Te.closeSession();
5453
5453
  } catch (W) {
@@ -5462,19 +5462,19 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5462
5462
  te.isUpdatingItem = !1, a.selectCatalog(te.storedCatalogId), a.selectScheduler(te.storedSchedulerId);
5463
5463
  }
5464
5464
  function ct() {
5465
- n("submit:form", c.value, z.value), h(), we();
5465
+ i("submit:form", c.value, z.value), h(), we();
5466
5466
  }
5467
5467
  function dt() {
5468
5468
  h(), we();
5469
5469
  }
5470
- const { isAtMost: kt } = Ii();
5470
+ const { isAtMost: kt } = Pn();
5471
5471
  T(() => kt("sm"));
5472
- const ni = q(null), cn = bn(ni);
5472
+ const on = q(null), ci = bi(on);
5473
5473
  return (W, V) => (F(), Z(Re, null, [
5474
- he(W.$slots, "trigger", Rn(An({
5474
+ he(W.$slots, "trigger", Ri(Ai({
5475
5475
  trigger: h
5476
5476
  }))),
5477
- C(Pn, {
5477
+ C(Pi, {
5478
5478
  title: l.value,
5479
5479
  show: d.value,
5480
5480
  "primary-action": {
@@ -5490,7 +5490,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5490
5490
  onOnCancel: dt
5491
5491
  }, {
5492
5492
  "append-title": N(() => [
5493
- p(kt)("sm") ? (F(), G(Oi, {
5493
+ p(kt)("sm") ? (F(), G(zn, {
5494
5494
  key: 0,
5495
5495
  variant: "dialog",
5496
5496
  title: R.value.title,
@@ -5500,12 +5500,12 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5500
5500
  default: N(() => {
5501
5501
  var re, pe;
5502
5502
  return [
5503
- p(kt)("sm") ? ee("", !0) : (F(), G(Oi, {
5503
+ p(kt)("sm") ? ee("", !0) : (F(), G(zn, {
5504
5504
  key: 0,
5505
5505
  class: "fixed",
5506
- style: xn({
5506
+ style: xi({
5507
5507
  top: "85px",
5508
- left: p(cn).right + "px"
5508
+ left: p(ci).right + "px"
5509
5509
  }),
5510
5510
  variant: "full",
5511
5511
  title: R.value.title,
@@ -5514,7 +5514,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5514
5514
  D("div", Qr, [
5515
5515
  D("div", {
5516
5516
  ref_key: "formWrapper",
5517
- ref: ni,
5517
+ ref: on,
5518
5518
  class: Ee(["flex-1 py-24 space-y-24", "xs:w-full"])
5519
5519
  }, [
5520
5520
  y.value && (Object.keys(y.value.catalogs || {}).length > 0 || y.value.schedulers.length > 0) ? (F(), G(qr, {
@@ -5618,13 +5618,13 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5618
5618
  ]),
5619
5619
  _: 1
5620
5620
  }, 8, ["toggle", "disabled"]),
5621
- s.value.group && !E.value ? (F(), Z("div", is)) : ee("", !0),
5621
+ s.value.group && !E.value ? (F(), Z("div", ns)) : ee("", !0),
5622
5622
  s.value.group ? (F(), G(We, {
5623
5623
  key: 6,
5624
5624
  toggle: j.value,
5625
5625
  "onUpdate:toggle": [
5626
5626
  V[12] || (V[12] = (X) => j.value = X),
5627
- V[13] || (V[13] = (X) => ie(X))
5627
+ V[13] || (V[13] = (X) => ne(X))
5628
5628
  ],
5629
5629
  disabled: !E.value,
5630
5630
  description: "Use a different group setting",
@@ -5643,7 +5643,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5643
5643
  ]),
5644
5644
  _: 1
5645
5645
  }, 8, ["toggle", "disabled"])) : ee("", !0),
5646
- s.value.inventory && !E.value ? (F(), Z("div", ns)) : ee("", !0),
5646
+ s.value.inventory && !E.value ? (F(), Z("div", is)) : ee("", !0),
5647
5647
  s.value.inventory ? (F(), G(We, {
5648
5648
  key: 8,
5649
5649
  toggle: Y.value,
@@ -5703,14 +5703,14 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5703
5703
  ], 64));
5704
5704
  }
5705
5705
  }), rs = as;
5706
- function un(e, i) {
5706
+ function ui(e, n) {
5707
5707
  var o, r, l, s;
5708
- const t = (o = i.groups) == null ? void 0 : o.reduce((u, d) => {
5708
+ const t = (o = n.groups) == null ? void 0 : o.reduce((u, d) => {
5709
5709
  const h = e.groups.find((c) => c._id === d._id);
5710
5710
  return Ct(e.items, h.items) === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC && u.push(h), u;
5711
5711
  }, []);
5712
- if (!(t != null && t.length)) return i;
5713
- const n = t.map((u) => u._id);
5712
+ if (!(t != null && t.length)) return n;
5713
+ const i = t.map((u) => u._id);
5714
5714
  function a(u) {
5715
5715
  const d = t.map((h) => {
5716
5716
  var y;
@@ -5733,28 +5733,28 @@ function un(e, i) {
5733
5733
  items: c
5734
5734
  };
5735
5735
  });
5736
- return [...u.filter((h) => !n.includes(h._id)), ...d];
5736
+ return [...u.filter((h) => !i.includes(h._id)), ...d];
5737
5737
  }
5738
- if ((r = i.variant) != null && r.variantCombinations.length) {
5739
- const u = (l = i.variant) == null ? void 0 : l.variantCombinations.map((d) => ({ ...d, groups: a(d.groups || []) }));
5738
+ if ((r = n.variant) != null && r.variantCombinations.length) {
5739
+ const u = (l = n.variant) == null ? void 0 : l.variantCombinations.map((d) => ({ ...d, groups: a(d.groups || []) }));
5740
5740
  return {
5741
- ...i,
5741
+ ...n,
5742
5742
  variant: {
5743
- variantGroupIds: ((s = i.variant) == null ? void 0 : s.variantGroupIds) || [],
5743
+ variantGroupIds: ((s = n.variant) == null ? void 0 : s.variantGroupIds) || [],
5744
5744
  variantCombinations: u || []
5745
5745
  }
5746
5746
  };
5747
5747
  }
5748
- return { ...i, groups: a(i.groups || []) };
5748
+ return { ...n, groups: a(n.groups || []) };
5749
5749
  }
5750
- const ii = zi("item-manager", () => {
5751
- const e = me(), i = Le(), t = Ue(), n = Ye(i), a = He(n), o = Mn(), { t: r } = ce(), l = (f) => {
5750
+ const nn = Fn("item-manager", () => {
5751
+ const e = me(), n = Le(), t = Ue(), i = Ye(n), a = He(i), o = Mi(), { t: r } = ce(), l = (f) => {
5752
5752
  if (!o) throw new Error("No current instance found");
5753
- const { container: b } = _n(rs, o, {
5753
+ const { container: b } = _i(rs, o, {
5754
5754
  ...f,
5755
5755
  autoShow: !0,
5756
5756
  "onUpdate:show": async (x) => {
5757
- x || (On(null, b), b.remove());
5757
+ x || (Oi(null, b), b.remove());
5758
5758
  }
5759
5759
  });
5760
5760
  };
@@ -5764,11 +5764,11 @@ const ii = zi("item-manager", () => {
5764
5764
  return delete b.variant, delete b.thumbnail, [b, ...x || []];
5765
5765
  }
5766
5766
  function u(f, b, x, k) {
5767
- const S = ae(b), K = x ? S.modules.catalog.find((j) => j._id === x) : null, Y = k ? S.modules.scheduler.find((j) => j._id === k) : null, J = K ? ae(K) : void 0, M = x ? S.modules.catalog.filter((j) => j._id !== x) : [], U = Y ? ae(Y) : void 0, $ = f.reduce((j, ie) => (j[ie._id] = s(ie), j), {});
5767
+ const S = ae(b), K = x ? S.modules.catalog.find((j) => j._id === x) : null, Y = k ? S.modules.scheduler.find((j) => j._id === k) : null, J = K ? ae(K) : void 0, M = x ? S.modules.catalog.filter((j) => j._id !== x) : [], U = Y ? ae(Y) : void 0, $ = f.reduce((j, ne) => (j[ne._id] = s(ne), j), {});
5768
5768
  function Q(j = []) {
5769
- const ie = f.map((te) => te._id);
5769
+ const ne = f.map((te) => te._id);
5770
5770
  return [
5771
- ...j.filter((te) => !ie.includes(te._id)),
5771
+ ...j.filter((te) => !ne.includes(te._id)),
5772
5772
  ...Object.values($).flatMap((te) => te)
5773
5773
  ];
5774
5774
  }
@@ -5807,7 +5807,7 @@ const ii = zi("item-manager", () => {
5807
5807
  categoryId: f,
5808
5808
  "onSubmit:form": async (x, k) => {
5809
5809
  x.inventoryBindings ?? (x.inventoryBindings = []), x.inventoryBindings.length === 0 && (x.inventoryBindings = null);
5810
- const S = fi();
5810
+ const S = gn();
5811
5811
  await b(x, be.F_OPERATION_TYPE.create, S, k);
5812
5812
  }
5813
5813
  });
@@ -5965,7 +5965,7 @@ const ii = zi("item-manager", () => {
5965
5965
  initialForm: f,
5966
5966
  action: "update",
5967
5967
  "onSubmit:form": async (x, k) => {
5968
- const S = fi(f._id);
5968
+ const S = gn(f._id);
5969
5969
  x.inventoryBindings ?? (x.inventoryBindings = []), x.inventoryBindings.length === 0 && (x.inventoryBindings = null), await b(x, be.F_OPERATION_TYPE.update, S, k);
5970
5970
  }
5971
5971
  });
@@ -6005,8 +6005,8 @@ const ii = zi("item-manager", () => {
6005
6005
  !0
6006
6006
  );
6007
6007
  for (const k of f)
6008
- k.thumbnail && await wn.delete(k.thumbnail);
6009
- i.open({
6008
+ k.thumbnail && await wi.delete(k.thumbnail);
6009
+ n.open({
6010
6010
  message: r("menu.common.dialog.remove.product.success"),
6011
6011
  type: "success"
6012
6012
  });
@@ -6037,7 +6037,7 @@ const ii = zi("item-manager", () => {
6037
6037
  );
6038
6038
  }
6039
6039
  return {
6040
- initDynamicGroupItem: (f) => un(e, f),
6040
+ initDynamicGroupItem: (f) => ui(e, f),
6041
6041
  create: d,
6042
6042
  update: E,
6043
6043
  updateMany: P,
@@ -6046,12 +6046,12 @@ const ii = zi("item-manager", () => {
6046
6046
  };
6047
6047
  });
6048
6048
  export {
6049
- Mi as A,
6050
- Vi as M,
6049
+ On as A,
6050
+ Nn as M,
6051
6051
  vt as S,
6052
- ln as _,
6053
- $i as a,
6052
+ li as _,
6053
+ Vn as a,
6054
6054
  qt as e,
6055
- Qn as m,
6056
- ii as u
6055
+ Qi as m,
6056
+ nn as u
6057
6057
  };