@feedmepos/mf-menu 0.18.19 → 0.18.21
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.
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Blq1Wcce.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DSFDSUvb.js} +2 -2
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-C9eW7gA0.js → ApplyProducts.vue_vue_type_script_setup_true_lang-DI_PhR42.js} +2 -2
- package/dist/{Catalog-5UUYQGN3.js → Catalog-CaM_5R77.js} +3 -3
- package/dist/{Category-CY5zij1L.js → Category-B-kIrd8C.js} +6 -6
- package/dist/{CookingGuide-BEpRnqVu.js → CookingGuide-CMXjCwQT.js} +3 -3
- package/dist/{Group-D2IqNbUl.js → Group-DBBgXA7F.js} +1 -1
- package/dist/{Group-Dp6izKh0.js → Group-oDkAN8J0.js} +4 -4
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DQnPQCoj.js → Group.vue_vue_type_script_setup_true_lang-BGQhYk1f.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DNsUu1s3.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DnfBxzkk.js} +2 -2
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-mJqfuWtp.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BPVg0NTc.js} +11 -10
- package/dist/{Ingredient-CJ1EDqau.js → Ingredient-CpvOLWA8.js} +4 -4
- package/dist/{LinkProductSideSheet-BvmPJbp1.js → LinkProductSideSheet-C4ED9sl0.js} +2 -2
- package/dist/{PrintRoute-VJRQzPlS.js → PrintRoute-D9V7QXJO.js} +3 -3
- package/dist/{Product-CeSZ9KS8.js → Product-Z2x-lpvH.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-vbGNrXpQ.js → Product.vue_vue_type_script_setup_true_lang-By2Vvtnn.js} +11 -11
- package/dist/{Products-BMaV7rxl.js → Products-Dy7ONyGA.js} +8 -8
- package/dist/{Publish-BPrsjg7b.js → Publish-B1qXMu4W.js} +2 -2
- package/dist/{Recipe-DeDmIe9B.js → Recipe-C0aUiekG.js} +4 -4
- package/dist/{Scheduler-GetngKLu.js → Scheduler-C40YEI9y.js} +2 -2
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-q59UdamH.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-2-3qNEGM.js} +1 -1
- package/dist/ServingSequence-BJLvVrTe.js +4 -0
- package/dist/{Setting-VDVSrmi0.js → Setting-6eknZiY3.js} +1 -1
- package/dist/{Setting.vue_vue_type_script_setup_true_lang-BWo8uBUj.js → Setting.vue_vue_type_script_setup_true_lang-BMqID8rl.js} +3 -3
- package/dist/{Takeaway-B6EuB1tA.js → Takeaway-CNxVMBHC.js} +1 -1
- package/dist/{Takeaway-DZB0loKR.js → Takeaway-Dx8RDCaU.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Bw3h1bkU.js → Takeaway.vue_vue_type_script_setup_true_lang-D0kLvpqR.js} +4 -4
- package/dist/{TaxSetting-BfkV5fHL.js → TaxSetting-dQ6ix6kd.js} +4 -4
- package/dist/{Unit-CSTbSkti.js → Unit-BlXKlyMB.js} +2 -2
- package/dist/{Variant-Hb3gKr7r.js → Variant-cCL49NBX.js} +2 -2
- package/dist/{_id_-C3qsfMX1.js → _id_-C-_zTwAl.js} +6 -6
- package/dist/{app-BLTyh0iD.js → app-FOXuayWL.js} +29 -29
- package/dist/app.js +2 -2
- package/dist/assets/{linked-status-CRQjBwuT.js → linked-status-BisJAY0d.js} +3 -3
- package/dist/assets/{validate-menu-dFFWieMK.js → validate-menu-DZR3d8vc.js} +3 -3
- package/dist/{catalog-DIYRqUdX.js → catalog-xZ4Zh3-I.js} +1 -1
- package/dist/{category-DNwmfAb2.js → category-03p5jhQt.js} +1 -1
- package/dist/{currency-fYwCa7bU.js → currency-DLOoXVep.js} +1 -1
- package/dist/{index-4eGz0rSN.js → index-63yKC7hE.js} +2 -2
- package/dist/{index-CYSErdx2.js → index-Dk_b__kc.js} +3 -3
- package/dist/{item-DC8IV5gR.js → item-h_ANn5os.js} +120 -120
- package/dist/{lodash-6XdBdXdB.js → lodash-Dex-Q5EP.js} +1 -1
- package/dist/{menu-BHEF1SjZ.js → menu-M3PtUzNP.js} +1 -1
- package/dist/{object-CpJk3Lzx.js → object-DXFEQapv.js} +1 -1
- package/dist/{scheduler-BADsYdu6.js → scheduler-BJhiLh_G.js} +4 -4
- package/dist/{takeaway-a1G901rX.js → takeaway-CdCfX0H3.js} +4 -4
- package/dist/{toExcel-_-3e_tF2.js → toExcel-DnXJvZ1x.js} +2 -2
- package/dist/{unit-DDLaebAu.js → unit-C3_1ZS4O.js} +2 -2
- package/package.json +1 -1
- package/dist/ServingSequence-CtL1bfoc.js +0 -4
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { defineStore as Fi } from "pinia";
|
|
2
|
-
import { b as N, h as fe, B as vn, H as gn, I as bn, d as oe, m as ve, c as ge, J as Di, u as ue, K as bi, L as yn, y as Ti, M as Fe, N as rt, a as We, i as Ke, O as Zt, P as It, g as st, e as Vt, n as wn, Q as _n, S as Ui, z as Cn, F as Sn, l as An, T as yi, U as Rn } from "./app-
|
|
3
|
-
import { useDialog as Re, useSnackbar as $e, components as Ae, useDialogChild as
|
|
4
|
-
import { C as ze } from "./catalog-
|
|
5
|
-
import { openBlock as z, createElementBlock as q, createElementVNode as E, defineComponent as re, computed as F, resolveComponent as V, createVNode as A, createBlock as L, renderSlot as ce, withCtx as $, Fragment as _e, renderList as Ne, resolveDynamicComponent as bt, withDirectives as je, vShow as wt, mergeProps as Vi, withModifiers as _t, createCommentVNode as
|
|
6
|
-
import { u as Fn } from "./category-
|
|
2
|
+
import { b as N, h as fe, B as vn, H as gn, I as bn, d as oe, m as ve, c as ge, J as Di, u as ue, K as bi, L as yn, y as Ti, M as Fe, N as rt, a as We, i as Ke, O as Zt, P as It, g as st, e as Vt, n as wn, Q as _n, S as Ui, z as Cn, F as Sn, l as An, T as yi, U as Rn } from "./app-FOXuayWL.js";
|
|
3
|
+
import { useDialog as Re, useSnackbar as $e, components as Ae, useDialogChild as Jt, FmButtonVariant as Ve, FmButtonColorThemeVariant as De, useBreakpoints as $i } from "@feedmepos/ui-library";
|
|
4
|
+
import { C as ze } from "./catalog-xZ4Zh3-I.js";
|
|
5
|
+
import { openBlock as z, createElementBlock as q, createElementVNode as E, defineComponent as re, computed as F, resolveComponent as V, createVNode as A, createBlock as L, renderSlot as ce, withCtx as $, Fragment as _e, renderList as Ne, resolveDynamicComponent as bt, withDirectives as je, vShow as wt, mergeProps as Vi, withModifiers as _t, createCommentVNode as Q, ref as H, createTextVNode as yt, unref as Y, normalizeClass as Oe, onMounted as ft, resolveDirective as Nt, h as se, toDisplayString as Ye, toRaw as Ni, watch as ye, Transition as kn, onBeforeUnmount as Mn, normalizeProps as xn, guardReactiveProps as In, normalizeStyle as On, nextTick as Pn, getCurrentInstance as zn, render as En } from "vue";
|
|
6
|
+
import { u as Fn } from "./category-03p5jhQt.js";
|
|
7
7
|
import { a as Bi, _ as wi } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
|
|
8
8
|
import { _ as Be, a as Dn } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
|
|
9
9
|
import { _ as Ze } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
|
|
10
|
-
import { f as nt } from "./currency-
|
|
10
|
+
import { f as nt } from "./currency-DLOoXVep.js";
|
|
11
11
|
import { useCoreStore as Ct } from "@feedmepos/mf-common";
|
|
12
|
-
import { _ as qe, T as Tn, l as Bt } from "./takeaway-
|
|
12
|
+
import { _ as qe, T as Tn, l as Bt } from "./takeaway-CdCfX0H3.js";
|
|
13
13
|
import { V as Li } from "./vuedraggable-WU01qJgi.js";
|
|
14
|
-
import { l as Ue, u as Un } from "./lodash-
|
|
14
|
+
import { l as Ue, u as Un } from "./lodash-Dex-Q5EP.js";
|
|
15
15
|
import "vue-router";
|
|
16
|
-
import { V as _i } from "./index-
|
|
17
|
-
import { s as Lt, F as $n } from "./object-
|
|
18
|
-
import { L as Vn } from "./LinkProductSideSheet-
|
|
19
|
-
import { _ as Nn } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
16
|
+
import { V as _i } from "./index-Dk_b__kc.js";
|
|
17
|
+
import { s as Lt, F as $n } from "./object-DXFEQapv.js";
|
|
18
|
+
import { L as Vn } from "./LinkProductSideSheet-C4ED9sl0.js";
|
|
19
|
+
import { _ as Nn } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DSFDSUvb.js";
|
|
20
20
|
const Bn = {
|
|
21
21
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
22
|
width: "24",
|
|
@@ -308,7 +308,7 @@ function Yn(e) {
|
|
|
308
308
|
}, t;
|
|
309
309
|
}, {});
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Qt(e) {
|
|
312
312
|
const i = Object.values(e.items).reduce((t, n) => (t.push({
|
|
313
313
|
_id: n._id,
|
|
314
314
|
name: n.name,
|
|
@@ -324,7 +324,7 @@ function Jt(e) {
|
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
326
|
function Gi(e) {
|
|
327
|
-
const i =
|
|
327
|
+
const i = Qt(e), t = (o) => ["product", "item", "addonGroup", "group"].some((s) => o._id.startsWith(s)), n = i.items.filter((o) => t(o)), a = i.items.filter((o) => !t(o)).map((o) => ({
|
|
328
328
|
...ve.generator.initMenuV4Item(),
|
|
329
329
|
...o,
|
|
330
330
|
code: o.code ?? "",
|
|
@@ -510,7 +510,7 @@ class Wi {
|
|
|
510
510
|
return !!this.menuStore.state.currentCatalogId || !!this.menuStore.state.currentSchedulerId;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
const Hn = "/assets/linked-status-
|
|
513
|
+
const Hn = "/assets/linked-status-BisJAY0d.js";
|
|
514
514
|
function Xn(e) {
|
|
515
515
|
var n;
|
|
516
516
|
const i = oe(e), t = (n = i.variant) == null ? void 0 : n.variantCombinations;
|
|
@@ -625,7 +625,7 @@ function Gt(e, i) {
|
|
|
625
625
|
}), a;
|
|
626
626
|
}), t;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Jn(e, i) {
|
|
629
629
|
const t = e.items[i._id];
|
|
630
630
|
i.variant && (i.variant = {
|
|
631
631
|
...i.variant,
|
|
@@ -656,7 +656,7 @@ function Qn(e, i) {
|
|
|
656
656
|
price: (n == null ? void 0 : n.price) || i.price
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
async function
|
|
659
|
+
async function Qn(e, i, t, n, a, o = !0) {
|
|
660
660
|
const s = oe(t), l = o ? qn(i, s, n, a) : s, r = i.reduce((c, d) => (c[d._id] = l.modules.item.find((h) => h._id === d._id), c), {}), u = i.reduce((c, d) => {
|
|
661
661
|
const h = d._id;
|
|
662
662
|
return c[h] = Zn(r[h], e), c;
|
|
@@ -669,7 +669,7 @@ async function Jn(e, i, t, n, a, o = !0) {
|
|
|
669
669
|
return i.map((c) => {
|
|
670
670
|
const d = c._id, h = r[d];
|
|
671
671
|
return {
|
|
672
|
-
...
|
|
672
|
+
...Jn(m, h),
|
|
673
673
|
category: n || a ? h == null ? void 0 : h.category : null
|
|
674
674
|
};
|
|
675
675
|
});
|
|
@@ -1089,7 +1089,7 @@ function Mi(e, i, t) {
|
|
|
1089
1089
|
function Ie(e) {
|
|
1090
1090
|
return { left: e.left, top: e.top, right: e.left + e.width, bottom: e.top + e.height };
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Je(e, i) {
|
|
1093
1093
|
return { left: e.left - i.left, top: e.top - i.top };
|
|
1094
1094
|
}
|
|
1095
1095
|
function he(e) {
|
|
@@ -1124,7 +1124,7 @@ function Se(e, i, t, n) {
|
|
|
1124
1124
|
function ne(e) {
|
|
1125
1125
|
return e.width / e.height;
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function Qe(e, i) {
|
|
1128
1128
|
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);
|
|
1129
1129
|
}
|
|
1130
1130
|
function et(e, i) {
|
|
@@ -1135,11 +1135,11 @@ function Et(e, i) {
|
|
|
1135
1135
|
var t;
|
|
1136
1136
|
return i.minimum && e < i.minimum ? t = i.minimum : i.maximum && e > i.maximum && (t = i.maximum), t;
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function Ji(e, i) {
|
|
1139
1139
|
var t = ne(e), n = ne(i);
|
|
1140
1140
|
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;
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function Qi(e, i) {
|
|
1143
1143
|
var t = i * Math.PI / 180;
|
|
1144
1144
|
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)) };
|
|
1145
1145
|
}
|
|
@@ -1149,7 +1149,7 @@ function Te(e, i) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
function Rt(e, i) {
|
|
1151
1151
|
var t = ot(pe(e, i), i);
|
|
1152
|
-
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,
|
|
1152
|
+
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, Qe(e, i)) : Math.min((e.height + t.top + t.bottom) / e.height, Qe(e, i)) : 1;
|
|
1153
1153
|
}
|
|
1154
1154
|
function pe(e, i, t) {
|
|
1155
1155
|
t === void 0 && (t = !1);
|
|
@@ -1219,7 +1219,7 @@ function po(e) {
|
|
|
1219
1219
|
var r, u, m, c = j({}, n), d = j({}, a), h = j({}, o);
|
|
1220
1220
|
r = ne(h), u = ne(c), m === void 0 && (m = 1e-3), (r === 0 || u === 0 ? Math.abs(u - r) < m : Math.abs(u / r) < 1 + m && Math.abs(u / r) > 1 - m) || (c = j(j({}, c), Ee({ sizeRestrictions: s, width: c.width, height: c.height, aspectRatio: { minimum: ne(h), maximum: ne(h) } })));
|
|
1221
1221
|
var b = Rt(d = Se(d, c.width * t.width / (d.width * h.width)), i({ visibleArea: d, type: "resize" }));
|
|
1222
|
-
return b !== 1 && (d = Se(d, b), c = Se(c, b)), d = pe(d = we(d,
|
|
1222
|
+
return b !== 1 && (d = Se(d, b), c = Se(c, b)), d = pe(d = we(d, Je(he(c), he(d))), i({ visibleArea: d, type: "move" })), { coordinates: c = pe(c, kt(Ie(d), l)), visibleArea: d };
|
|
1223
1223
|
}
|
|
1224
1224
|
function fo(e) {
|
|
1225
1225
|
var i = e.event, t = e.getAreaRestrictions, n = e.boundaries, a = e.coordinates, o = e.visibleArea;
|
|
@@ -1231,7 +1231,7 @@ function fo(e) {
|
|
|
1231
1231
|
var u = { width: 0, height: 0 };
|
|
1232
1232
|
r.width, n.width, ne(n) > ne(l) ? (u.height = 0.8 * n.height, u.width = u.height * ne(l)) : (u.width = 0.8 * n.width, u.height = u.width * ne(l));
|
|
1233
1233
|
var m = Rt(r = Se(r, l.width * n.width / (r.width * u.width)), t({ visibleArea: r, type: "resize" }));
|
|
1234
|
-
r = Se(r, m), m !== 1 && (u.height /= m, u.width /= m), r = pe(r = we(r,
|
|
1234
|
+
r = Se(r, m), m !== 1 && (u.height /= m, u.width /= m), r = pe(r = we(r, Je(he(l), he(r))), t({ visibleArea: r, type: "move" })), l = pe(l, kt(Ie(r), s));
|
|
1235
1235
|
}
|
|
1236
1236
|
return { coordinates: l, visibleArea: r };
|
|
1237
1237
|
}
|
|
@@ -1239,7 +1239,7 @@ function vo(e) {
|
|
|
1239
1239
|
var i = e.event, t = e.coordinates, n = e.visibleArea, a = e.getAreaRestrictions, o = j({}, n), s = j({}, t);
|
|
1240
1240
|
if (i.type === "setCoordinates") {
|
|
1241
1241
|
var l = Math.max(0, s.width - o.width), r = Math.max(0, s.height - o.height);
|
|
1242
|
-
l > r ? o = Se(o, Math.min(s.width / o.width,
|
|
1242
|
+
l > r ? o = Se(o, Math.min(s.width / o.width, Qe(o, a({ visibleArea: o, type: "resize" })))) : r > l && (o = Se(o, Math.min(s.height / o.height, Qe(o, a({ visibleArea: o, type: "resize" }))))), o = pe(o = we(o, At(et(s, Ie(o)))), a({ visibleArea: o, type: "move" }));
|
|
1243
1243
|
}
|
|
1244
1244
|
return { visibleArea: o, coordinates: s };
|
|
1245
1245
|
}
|
|
@@ -1258,7 +1258,7 @@ function yo(e) {
|
|
|
1258
1258
|
function wo(e) {
|
|
1259
1259
|
var i = e.getAreaRestrictions, t = e.coordinates, n = e.imageSize, a = ne(e.boundaries);
|
|
1260
1260
|
if (t) {
|
|
1261
|
-
var o = { height: Math.max(t.height, n.height), width: Math.max(t.width, n.width) }, s =
|
|
1261
|
+
var o = { height: Math.max(t.height, n.height), width: Math.max(t.width, n.width) }, s = Ji({ width: ne(o) > a ? o.width : o.height * a, height: ne(o) > a ? o.width / a : o.height }, Yt(i())), l = { left: t.left + t.width / 2 - s.width / 2, top: t.top + t.height / 2 - s.height / 2, width: s.width, height: s.height }, r = ot(t, Ie(j({ left: 0, top: 0 }, n))), u = {};
|
|
1262
1262
|
return !r.left && !r.right && l.width <= n.width && (u.left = 0, u.right = n.width), !r.top && !r.bottom && l.height <= n.height && (u.top = 0, u.bottom = n.height), pe(l, u);
|
|
1263
1263
|
}
|
|
1264
1264
|
var m = ne(n);
|
|
@@ -1270,20 +1270,20 @@ function mt(e, i) {
|
|
|
1270
1270
|
function _o(e) {
|
|
1271
1271
|
var i = e.event, t = e.coordinates, n = e.visibleArea, a = e.sizeRestrictions, o = e.getAreaRestrictions, s = e.positionRestrictions, l = e.adjustStencil, r = i.scale, u = i.move, m = j({}, n), c = j({}, t), d = 1, h = 1, b = r.factor && Math.abs(r.factor - 1) > 1e-3;
|
|
1272
1272
|
m = we(m, { left: u.left || 0, top: u.top || 0 });
|
|
1273
|
-
var f = { stencil: { minimum: Math.max(a.minWidth ? a.minWidth / c.width : 0, a.minHeight ? a.minHeight / c.height : 0), maximum: Math.min(a.maxWidth ? a.maxWidth / c.width : 1 / 0, a.maxHeight ? a.maxHeight / c.height : 1 / 0,
|
|
1273
|
+
var f = { stencil: { minimum: Math.max(a.minWidth ? a.minWidth / c.width : 0, a.minHeight ? a.minHeight / c.height : 0), maximum: Math.min(a.maxWidth ? a.maxWidth / c.width : 1 / 0, a.maxHeight ? a.maxHeight / c.height : 1 / 0, Qe(c, s)) }, area: { maximum: Qe(m, o({ visibleArea: m, type: "resize" })) } };
|
|
1274
1274
|
r.factor && b && (r.factor < 1 ? (h = Math.max(r.factor, f.stencil.minimum)) > 1 && (h = 1) : r.factor > 1 && (h = Math.min(r.factor, Math.min(f.area.maximum, f.stencil.maximum))) < 1 && (h = 1)), h && (m = Se(m, h, r.center));
|
|
1275
1275
|
var g = t.left - n.left, x = n.width + n.left - (t.width + t.left), P = t.top - n.top, w = n.height + n.top - (t.height + t.top);
|
|
1276
1276
|
return m = pe(m = we(m, et(m, { left: s.left !== void 0 ? s.left - g * h : void 0, top: s.top !== void 0 ? s.top - P * h : void 0, bottom: s.bottom !== void 0 ? s.bottom + w * h : void 0, right: s.right !== void 0 ? s.right + x * h : void 0 })), o({ visibleArea: m, type: "move" })), c.width = c.width * h, c.height = c.height * h, c.left = m.left + g * h, c.top = m.top + P * h, c = pe(c, kt(Ie(m), s)), r.factor && b && l && (r.factor > 1 ? d = Math.min(f.area.maximum, r.factor) / h : r.factor < 1 && (d = Math.max(c.height / m.height, c.width / m.width, r.factor / h)), d !== 1 && (m = we(m = pe(m = Se(m, d, r.factor > 1 ? r.center : he(c)), o({ visibleArea: m, type: "move" })), At(et(c, Ie(m)))))), { coordinates: c, visibleArea: m };
|
|
1277
1277
|
}
|
|
1278
1278
|
function Co(e) {
|
|
1279
1279
|
var i = e.aspectRatio, t = e.getAreaRestrictions, n = e.coordinates, a = e.visibleArea, o = e.sizeRestrictions, s = e.positionRestrictions, l = e.imageSize, r = e.previousImageSize, u = e.angle, m = j({}, n), c = j({}, a), d = Te(he(j({ left: 0, top: 0 }, r)), u);
|
|
1280
|
-
return (m = j(j({}, Ee({ sizeRestrictions: o, aspectRatio: i, width: m.width, height: m.height })), Te(he(m), u))).left -= d.left - l.width / 2 + m.width / 2, m.top -= d.top - l.height / 2 + m.height / 2, c = Se(c, Rt(c, t({ visibleArea: c, type: "resize" }))), { coordinates: m = pe(m, s), visibleArea: c = pe(c = we(c,
|
|
1280
|
+
return (m = j(j({}, Ee({ sizeRestrictions: o, aspectRatio: i, width: m.width, height: m.height })), Te(he(m), u))).left -= d.left - l.width / 2 + m.width / 2, m.top -= d.top - l.height / 2 + m.height / 2, c = Se(c, Rt(c, t({ visibleArea: c, type: "resize" }))), { coordinates: m = pe(m, s), visibleArea: c = pe(c = we(c, Je(he(m), he(n))), t({ visibleArea: c, type: "move" })) };
|
|
1281
1281
|
}
|
|
1282
1282
|
function So(e) {
|
|
1283
1283
|
var i = e.flip, t = e.previousFlip, n = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, s = e.visibleArea, l = e.imageSize, r = j({}, o), u = j({}, s), m = t.horizontal !== i.horizontal, c = t.vertical !== i.vertical;
|
|
1284
1284
|
if (m || c) {
|
|
1285
1285
|
var d = Te({ left: l.width / 2, top: l.height / 2 }, -n), h = Te(he(r), -n), b = Te({ left: m ? d.left - (h.left - d.left) : h.left, top: c ? d.top - (h.top - d.top) : h.top }, n);
|
|
1286
|
-
r = we(r,
|
|
1286
|
+
r = we(r, Je(b, he(r))), h = Te(he(u), -n), u = pe(u = we(u, Je(b = Te({ left: m ? d.left - (h.left - d.left) : h.left, top: c ? d.top - (h.top - d.top) : h.top }, n), he(u))), a({ visibleArea: u, type: "move" }));
|
|
1287
1287
|
}
|
|
1288
1288
|
return { coordinates: r, visibleArea: u };
|
|
1289
1289
|
}
|
|
@@ -1653,7 +1653,7 @@ var pt = ke("vue-preview"), rn = { props: { coordinates: { type: Object }, trans
|
|
|
1653
1653
|
return this.transitions && this.transitions.enabled && (e.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), e;
|
|
1654
1654
|
}, imageStyle: function() {
|
|
1655
1655
|
if (this.coordinates && this.image) {
|
|
1656
|
-
var e = this.coordinates.width / this.size.width, i = ie(ie({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / e, scaleY: 1 / e }), t = this.imageSize.width, n = this.imageSize.height, a =
|
|
1656
|
+
var e = this.coordinates.width / this.size.width, i = ie(ie({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / e, scaleY: 1 / e }), t = this.imageSize.width, n = this.imageSize.height, a = Qi({ width: t, height: n }, i.rotate), o = { width: "".concat(t, "px"), height: "".concat(n, "px"), left: "0px", top: "0px" }, s = { 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 } };
|
|
1657
1657
|
return o.transform = `translate(
|
|
1658
1658
|
`.concat(-this.coordinates.left / e - s.rotate.left - s.scale.left, "px,").concat(-this.coordinates.top / e - s.rotate.top - s.scale.top, "px) ") + on(i), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
|
|
1659
1659
|
}
|
|
@@ -1768,7 +1768,7 @@ var Eo = ["transitions"], Pe = ke("vue-advanced-cropper"), un = { name: "Cropper
|
|
|
1768
1768
|
i.style.width = t.width + "px", i.style.height = i.clientWidth / n + "px", i.style.width = i.clientWidth + "px";
|
|
1769
1769
|
} }, fitCoordinates: { type: Function, default: function(e) {
|
|
1770
1770
|
var i = e.visibleArea, t = e.coordinates, n = e.aspectRatio, a = e.sizeRestrictions, o = e.positionRestrictions, s = j(j({}, t), Ee({ 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) } }));
|
|
1771
|
-
return s = pe(s = we(s,
|
|
1771
|
+
return s = pe(s = we(s, Je(he(t), he(s))), kt(Ie(i), o));
|
|
1772
1772
|
} }, fitVisibleArea: { type: Function, default: function(e) {
|
|
1773
1773
|
var i = e.visibleArea, t = e.boundaries, n = e.getAreaRestrictions, a = e.coordinates, o = j({}, i);
|
|
1774
1774
|
o.height = o.width / ne(t), o.top += (i.height - o.height) / 2, (a.height - o.height > 0 || a.width - o.width > 0) && (o = Se(o, Math.max(a.height / o.height, a.width / o.width)));
|
|
@@ -1810,7 +1810,7 @@ var Eo = ["transitions"], Pe = ke("vue-advanced-cropper"), un = { name: "Cropper
|
|
|
1810
1810
|
if (e = function(n) {
|
|
1811
1811
|
var a = n.areaRestrictions, o = n.sizeRestrictions, s = n.boundaries, l = n.positionRestrictions, r = j(j({}, 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 });
|
|
1812
1812
|
l.left !== void 0 && l.right !== void 0 && (r.maxWidth = Math.min(r.maxWidth, l.right - l.left)), l.bottom !== void 0 && l.top !== void 0 && (r.maxHeight = Math.min(r.maxHeight, l.bottom - l.top));
|
|
1813
|
-
var u = Yt(a), m =
|
|
1813
|
+
var u = Yt(a), m = Ji(s, u);
|
|
1814
1814
|
return u.width < 1 / 0 && (!r.maxWidth || r.maxWidth > m.width) && (r.maxWidth = Math.min(r.maxWidth, m.width)), u.height < 1 / 0 && (!r.maxHeight || r.maxHeight > m.height) && (r.maxHeight = Math.min(r.maxHeight, m.height)), r.minWidth > r.maxWidth && (r.minWidth = r.maxWidth, r.widthFrozen = !0), r.minHeight > r.maxHeight && (r.minHeight = r.maxHeight, r.heightFrozen = !0), r;
|
|
1815
1815
|
}({ 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) {
|
|
1816
1816
|
var i = this.getStencilSize(), t = Yt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
|
|
@@ -1933,7 +1933,7 @@ var Eo = ["transitions"], Pe = ke("vue-advanced-cropper"), un = { name: "Cropper
|
|
|
1933
1933
|
}, getCanvas: function() {
|
|
1934
1934
|
if (this.$refs.canvas) {
|
|
1935
1935
|
var e = this.$refs.canvas, i = this.$refs.image, t = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(l, r, u) {
|
|
1936
|
-
var m = u.rotate, c = u.flip, d = { width: r.naturalWidth, height: r.naturalHeight }, h =
|
|
1936
|
+
var m = u.rotate, c = u.flip, d = { width: r.naturalWidth, height: r.naturalHeight }, h = Qi(d, m), b = l.getContext("2d");
|
|
1937
1937
|
l.height = h.height, l.width = h.width, b.save();
|
|
1938
1938
|
var f = Te(he(j({ left: 0, top: 0 }, d)), m);
|
|
1939
1939
|
return b.translate(-(f.left - h.width / 2), -(f.top - h.height / 2)), b.rotate(m * Math.PI / 180), b.translate(c.horizontal ? d.width : 0, c.vertical ? d.height : 0), b.scale(c.horizontal ? -1 : 1, c.vertical ? -1 : 1), b.drawImage(r, 0, 0, d.width, d.height), b.restore(), l;
|
|
@@ -2156,7 +2156,7 @@ var Eo = ["transitions"], Pe = ke("vue-advanced-cropper"), un = { name: "Cropper
|
|
|
2156
2156
|
un.render = function(e, i, t, n, a, o) {
|
|
2157
2157
|
return z(), L("div", { ref: "cropper", class: o.classes.cropper }, [A("div", { ref: "stretcher", class: o.classes.stretcher }, null, 2), A("div", { class: o.classes.boundaries, style: o.boundariesStyle }, [(z(), L(bt(t.backgroundWrapperComponent), { class: o.classes.cropperWrapper, "wheel-resize": o.settings.resizeImage.wheel, "touch-resize": o.settings.resizeImage.touch, "touch-move": o.settings.moveImage.touch, "mouse-move": o.settings.moveImage.mouse, onMove: o.onManipulateImage, onResize: o.onManipulateImage }, { default: $(function() {
|
|
2158
2158
|
return [A("div", { class: o.classes.background, style: o.boundariesStyle }, null, 6), A("div", { class: o.classes.imageWrapper }, [A("img", { ref: "image", crossorigin: a.imageAttributes.crossOrigin, src: a.imageAttributes.src, class: o.classes.image, style: o.imageStyle, onMousedown: i[1] || (i[1] = _t(function() {
|
|
2159
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), A("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), je((z(), L(bt(t.stencilComponent), Vi({ 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 ? (z(), L("canvas", Fo, null, 512)) :
|
|
2159
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), A("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), je((z(), L(bt(t.stencilComponent), Vi({ 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 ? (z(), L("canvas", Fo, null, 512)) : Q("", !0), t.canvas ? (z(), L("canvas", Do, null, 512)) : Q("", !0)];
|
|
2160
2160
|
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
2161
2161
|
};
|
|
2162
2162
|
const To = {
|
|
@@ -2296,7 +2296,7 @@ const To = {
|
|
|
2296
2296
|
(...a) => i.onClick && i.onClick(...a))
|
|
2297
2297
|
}, [
|
|
2298
2298
|
Y(Fe).isDialogOpened.value ? (z(), L(Y(jn), { key: 1 })) : (z(), L(Y(Gn), { key: 0 }))
|
|
2299
|
-
], 2)) :
|
|
2299
|
+
], 2)) : Q("", !0);
|
|
2300
2300
|
};
|
|
2301
2301
|
}
|
|
2302
2302
|
}), Bo = {}, Lo = { class: "pl-32" };
|
|
@@ -2319,9 +2319,9 @@ const Wo = /* @__PURE__ */ rt(Bo, [["render", Go]]), Ko = {
|
|
|
2319
2319
|
class: "relative"
|
|
2320
2320
|
}, Zo = {
|
|
2321
2321
|
class: "flex flex-col gap-16"
|
|
2322
|
-
}, Qo = {
|
|
2323
|
-
class: "space-y-8"
|
|
2324
2322
|
}, Jo = {
|
|
2323
|
+
class: "space-y-8"
|
|
2324
|
+
}, Qo = {
|
|
2325
2325
|
key: 0,
|
|
2326
2326
|
class: "flex items-center gap-8"
|
|
2327
2327
|
};
|
|
@@ -2424,7 +2424,7 @@ const ea = /* @__PURE__ */ re({
|
|
|
2424
2424
|
title: "Product detail"
|
|
2425
2425
|
}, {
|
|
2426
2426
|
default: $(() => {
|
|
2427
|
-
var K,
|
|
2427
|
+
var K, J;
|
|
2428
2428
|
return [E("div", Ko, [E("div", jo, [E("div", Yo, [E("div", Ho, [A(y, {
|
|
2429
2429
|
"model-value": O.form.code,
|
|
2430
2430
|
placeholder: ((K = O.fallback) == null ? void 0 : K.code) || "No code",
|
|
@@ -2435,7 +2435,7 @@ const ea = /* @__PURE__ */ re({
|
|
|
2435
2435
|
disabled: !c.value.name,
|
|
2436
2436
|
"helper-text": x.value > 0 ? `This product shares the same name as ${x.value} other items. They will be grouped as one product in reports.` : void 0,
|
|
2437
2437
|
"model-value": O.form.name,
|
|
2438
|
-
placeholder: (
|
|
2438
|
+
placeholder: (J = O.fallback) == null ? void 0 : J.name,
|
|
2439
2439
|
rules: c.value.name ? [(I) => !!I || "Name is required"] : void 0,
|
|
2440
2440
|
"label-mark": "required",
|
|
2441
2441
|
autofocus: "",
|
|
@@ -2470,7 +2470,7 @@ const ea = /* @__PURE__ */ re({
|
|
|
2470
2470
|
"model-value": O.isAddon ? Ge.ADD_ON : Ge.PRODUCT,
|
|
2471
2471
|
"onUpdate:modelValue": _[5] || (_[5] = (I) => P(I))
|
|
2472
2472
|
}, {
|
|
2473
|
-
default: $(() => [E("div", Zo, [E("div",
|
|
2473
|
+
default: $(() => [E("div", Zo, [E("div", Jo, [A(p, {
|
|
2474
2474
|
disabled: f.value,
|
|
2475
2475
|
value: Ge.PRODUCT,
|
|
2476
2476
|
label: "Sell as product with add on",
|
|
@@ -2478,9 +2478,9 @@ const ea = /* @__PURE__ */ re({
|
|
|
2478
2478
|
}, null, 8, ["disabled", "value"]), A(Wo, null, {
|
|
2479
2479
|
default: $(() => [Y(n).isV4 ? (z(), L(g, {
|
|
2480
2480
|
key: 0
|
|
2481
|
-
})) :
|
|
2481
|
+
})) : Q("", !0)]),
|
|
2482
2482
|
_: 1
|
|
2483
|
-
})]), f.value ? (z(), q("div",
|
|
2483
|
+
})]), f.value ? (z(), q("div", Qo, [A(v, {
|
|
2484
2484
|
title: "Please add a product category first",
|
|
2485
2485
|
variant: "info"
|
|
2486
2486
|
}), A(R, {
|
|
@@ -2488,13 +2488,13 @@ const ea = /* @__PURE__ */ re({
|
|
|
2488
2488
|
"prepend-icon": "add",
|
|
2489
2489
|
variant: "secondary",
|
|
2490
2490
|
onClick: Y(r).create
|
|
2491
|
-
}, null, 8, ["onClick"])])) :
|
|
2491
|
+
}, null, 8, ["onClick"])])) : Q("", !0), A(p, {
|
|
2492
2492
|
value: Ge.ADD_ON,
|
|
2493
2493
|
label: "Sell as add-on only",
|
|
2494
2494
|
sublabel: "Product will appear as add-on only"
|
|
2495
2495
|
}, null, 8, ["value"])])]),
|
|
2496
2496
|
_: 1
|
|
2497
|
-
}, 8, ["disabled", "model-value"])) :
|
|
2497
|
+
}, 8, ["disabled", "model-value"])) : Q("", !0), Y(n).isV4 ? Q("", !0) : (z(), L(S, {
|
|
2498
2498
|
key: 1,
|
|
2499
2499
|
modelValue: O.form.category,
|
|
2500
2500
|
"onUpdate:modelValue": _[6] || (_[6] = (I) => O.form.category = I),
|
|
@@ -2691,7 +2691,7 @@ const ea = /* @__PURE__ */ re({
|
|
|
2691
2691
|
"onUpdate:modelValue": g[3] || (g[3] = (y) => o("update:form", "unit", y))
|
|
2692
2692
|
}, null, 8, ["model-value", "rules"])
|
|
2693
2693
|
])
|
|
2694
|
-
])) :
|
|
2694
|
+
])) : Q("", !0)
|
|
2695
2695
|
]),
|
|
2696
2696
|
s.value.costing ? (z(), q("div", sa, [
|
|
2697
2697
|
A(P, {
|
|
@@ -2711,8 +2711,8 @@ const ea = /* @__PURE__ */ re({
|
|
|
2711
2711
|
"onUpdate:modelValue": g[5] || (g[5] = (y) => o("update:form", "costing", y ?? Y(ge.Dinero).zero().toObject()))
|
|
2712
2712
|
}, null, 8, ["model-value"])
|
|
2713
2713
|
])
|
|
2714
|
-
])) :
|
|
2715
|
-
])) :
|
|
2714
|
+
])) : Q("", !0)
|
|
2715
|
+
])) : Q("", !0),
|
|
2716
2716
|
s.value.minPrice ? (z(), q("div", ca, [
|
|
2717
2717
|
A(P, {
|
|
2718
2718
|
disabled: !s.value.minPrice,
|
|
@@ -2731,10 +2731,10 @@ const ea = /* @__PURE__ */ re({
|
|
|
2731
2731
|
class: "flex-1",
|
|
2732
2732
|
"show-currency": "",
|
|
2733
2733
|
"onUpdate:modelValue": g[7] || (g[7] = (y) => o("update:form", "minPrice", y ?? Y(ge.Dinero).zero().toObject()))
|
|
2734
|
-
}, null, 8, ["max", "model-value"])) :
|
|
2734
|
+
}, null, 8, ["max", "model-value"])) : Q("", !0)
|
|
2735
2735
|
])
|
|
2736
2736
|
])
|
|
2737
|
-
])) :
|
|
2737
|
+
])) : Q("", !0)
|
|
2738
2738
|
])
|
|
2739
2739
|
];
|
|
2740
2740
|
}),
|
|
@@ -2758,7 +2758,7 @@ const ea = /* @__PURE__ */ re({
|
|
|
2758
2758
|
selectedVariants: {}
|
|
2759
2759
|
},
|
|
2760
2760
|
setup(e) {
|
|
2761
|
-
const i = Re(), { emitData: t, emitAction: n } =
|
|
2761
|
+
const i = Re(), { emitData: t, emitAction: n } = Jt(), a = ue(), o = e, s = F(() => a.variants.map((m) => ({
|
|
2762
2762
|
label: m.name,
|
|
2763
2763
|
value: m._id,
|
|
2764
2764
|
disabled: !1
|
|
@@ -2803,7 +2803,7 @@ const ea = /* @__PURE__ */ re({
|
|
|
2803
2803
|
variant: "tertiary",
|
|
2804
2804
|
"text-color": "primary",
|
|
2805
2805
|
onClick: (g) => f()
|
|
2806
|
-
}, null, 8, ["onClick"])) :
|
|
2806
|
+
}, null, 8, ["onClick"])) : Q("", !0)
|
|
2807
2807
|
]),
|
|
2808
2808
|
_: 1
|
|
2809
2809
|
}),
|
|
@@ -2900,7 +2900,7 @@ const dn = /* @__PURE__ */ rt(wa, [["render", Sa]]), Aa = { class: "space-y-16"
|
|
|
2900
2900
|
}
|
|
2901
2901
|
function f(y) {
|
|
2902
2902
|
var S, B;
|
|
2903
|
-
const k = ((S = t.form.variant) == null ? void 0 : S.variantGroupIds) || [], p = (B = t.form.variant) == null ? void 0 : B.variantCombinations, M = y.split(/(?=variant)/g).map((K) => K.replace(/\/*$/, "")).filter((K) => k.some((
|
|
2903
|
+
const k = ((S = t.form.variant) == null ? void 0 : S.variantGroupIds) || [], p = (B = t.form.variant) == null ? void 0 : B.variantCombinations, M = y.split(/(?=variant)/g).map((K) => K.replace(/\/*$/, "")).filter((K) => k.some((J) => K.includes(J))).join("/");
|
|
2904
2904
|
return p == null ? void 0 : p.find((K) => K.combinationKey === M);
|
|
2905
2905
|
}
|
|
2906
2906
|
const g = (y) => {
|
|
@@ -2932,8 +2932,8 @@ const dn = /* @__PURE__ */ rt(wa, [["render", Sa]]), Aa = { class: "space-y-16"
|
|
|
2932
2932
|
const M = p.map(
|
|
2933
2933
|
(B) => n.variants.find((K) => K._id === B)
|
|
2934
2934
|
), S = ve.fullVariantCombination(M).map(({ combinationKey: B }) => {
|
|
2935
|
-
var
|
|
2936
|
-
const K = (
|
|
2935
|
+
var J;
|
|
2936
|
+
const K = (J = t.form.variant) == null ? void 0 : J.variantCombinations.find(
|
|
2937
2937
|
(I) => I.combinationKey === B
|
|
2938
2938
|
);
|
|
2939
2939
|
return k(K || { _id: t.form._id, combinationKey: B });
|
|
@@ -3083,7 +3083,7 @@ const dn = /* @__PURE__ */ rt(wa, [["render", Sa]]), Aa = { class: "space-y-16"
|
|
|
3083
3083
|
variant: "secondary",
|
|
3084
3084
|
"prepend-icon": "add",
|
|
3085
3085
|
onClick: b
|
|
3086
|
-
})) :
|
|
3086
|
+
})) : Q("", !0)
|
|
3087
3087
|
]),
|
|
3088
3088
|
default: $(() => {
|
|
3089
3089
|
var S;
|
|
@@ -3105,7 +3105,7 @@ const dn = /* @__PURE__ */ rt(wa, [["render", Sa]]), Aa = { class: "space-y-16"
|
|
|
3105
3105
|
"onUpdate:modelValue": g
|
|
3106
3106
|
}, {
|
|
3107
3107
|
item: $(({ element: K }) => {
|
|
3108
|
-
var
|
|
3108
|
+
var J;
|
|
3109
3109
|
return [
|
|
3110
3110
|
E("div", Ra, [
|
|
3111
3111
|
A(p, {
|
|
@@ -3114,7 +3114,7 @@ const dn = /* @__PURE__ */ rt(wa, [["render", Sa]]), Aa = { class: "space-y-16"
|
|
|
3114
3114
|
"prepend-icon": "drag_handle"
|
|
3115
3115
|
}, null, 8, ["variant"]),
|
|
3116
3116
|
E("div", ka, [
|
|
3117
|
-
E("p", Ma, Ye((
|
|
3117
|
+
E("p", Ma, Ye((J = m.value[K]) == null ? void 0 : J.name), 1),
|
|
3118
3118
|
A(v, {
|
|
3119
3119
|
class: "cursor-pointer",
|
|
3120
3120
|
name: "close",
|
|
@@ -3144,7 +3144,7 @@ const dn = /* @__PURE__ */ rt(wa, [["render", Sa]]), Aa = { class: "space-y-16"
|
|
|
3144
3144
|
"row-data": x.value ?? [],
|
|
3145
3145
|
"hide-footer": "",
|
|
3146
3146
|
"shrink-at": !1
|
|
3147
|
-
}, null, 8, ["column-defs", "column-visibility", "page-size", "row-data"])) :
|
|
3147
|
+
}, null, 8, ["column-defs", "column-visibility", "page-size", "row-data"])) : Q("", !0)
|
|
3148
3148
|
]),
|
|
3149
3149
|
_: 1
|
|
3150
3150
|
})
|
|
@@ -3199,7 +3199,7 @@ const dn = /* @__PURE__ */ rt(wa, [["render", Sa]]), Aa = { class: "space-y-16"
|
|
|
3199
3199
|
ce(l.$slots, "default", { trigger: u })
|
|
3200
3200
|
]),
|
|
3201
3201
|
_: 3
|
|
3202
|
-
}, 8, ["categorized-items", "config", "group"])) :
|
|
3202
|
+
}, 8, ["categorized-items", "config", "group"])) : Q("", !0);
|
|
3203
3203
|
}
|
|
3204
3204
|
});
|
|
3205
3205
|
async function ai() {
|
|
@@ -3434,7 +3434,7 @@ const Va = /* @__PURE__ */ re({
|
|
|
3434
3434
|
console.error(r);
|
|
3435
3435
|
}
|
|
3436
3436
|
}
|
|
3437
|
-
const { emitData: s, emitAction: l } =
|
|
3437
|
+
const { emitData: s, emitAction: l } = Jt();
|
|
3438
3438
|
return (r, u) => (z(), q("div", {
|
|
3439
3439
|
ref_key: "inventoryPickerIframe",
|
|
3440
3440
|
ref: n,
|
|
@@ -3858,7 +3858,7 @@ const Ba = { class: "fm-typo-en-title-md-600 mr-auto" }, La = { class: "space-y-
|
|
|
3858
3858
|
} : T;
|
|
3859
3859
|
return Z == null ? void 0 : Z.name;
|
|
3860
3860
|
}, M = async (I) => {
|
|
3861
|
-
let D =
|
|
3861
|
+
let D = Qt(t.group);
|
|
3862
3862
|
D = {
|
|
3863
3863
|
...D,
|
|
3864
3864
|
items: I.map((T) => {
|
|
@@ -3879,7 +3879,7 @@ const Ba = { class: "fm-typo-en-title-md-600 mr-auto" }, La = { class: "space-y-
|
|
|
3879
3879
|
[Z._id]: Z
|
|
3880
3880
|
}), {}), n("update:group", D);
|
|
3881
3881
|
}
|
|
3882
|
-
const K = $i(),
|
|
3882
|
+
const K = $i(), J = F(() => K.breakpoints.value.xs);
|
|
3883
3883
|
return (I, D) => {
|
|
3884
3884
|
const T = V("fm-button"), Z = V("fm-table");
|
|
3885
3885
|
return z(), L(Be, {
|
|
@@ -3913,11 +3913,11 @@ const Ba = { class: "fm-typo-en-title-md-600 mr-auto" }, La = { class: "space-y-
|
|
|
3913
3913
|
label: "Add option",
|
|
3914
3914
|
"prepend-icon": "add",
|
|
3915
3915
|
onClick: O
|
|
3916
|
-
}, null, 8, ["text-color", "border-color"])]))], 64)) :
|
|
3916
|
+
}, null, 8, ["text-color", "border-color"])]))], 64)) : Q("", !0)]),
|
|
3917
3917
|
default: $(() => [E("div", Ya, [E("div", Ha, [A(Z, {
|
|
3918
3918
|
"column-defs": w.value,
|
|
3919
3919
|
"column-visibility": C.value,
|
|
3920
|
-
draggable: !
|
|
3920
|
+
draggable: !J.value && h(null).name,
|
|
3921
3921
|
"expanded-state": l.value ? {} : P.value,
|
|
3922
3922
|
"get-sub-row": S,
|
|
3923
3923
|
"page-size": 999,
|
|
@@ -3934,12 +3934,12 @@ const Ba = { class: "fm-typo-en-title-md-600 mr-auto" }, La = { class: "space-y-
|
|
|
3934
3934
|
};
|
|
3935
3935
|
}
|
|
3936
3936
|
}), qa = {}, Za = { class: "flex gap-16" };
|
|
3937
|
-
function
|
|
3937
|
+
function Ja(e, i) {
|
|
3938
3938
|
return z(), q("div", Za, [
|
|
3939
3939
|
ce(e.$slots, "default")
|
|
3940
3940
|
]);
|
|
3941
3941
|
}
|
|
3942
|
-
const
|
|
3942
|
+
const Qa = /* @__PURE__ */ rt(qa, [["render", Ja]]), er = { class: "fm-typo-en-title-md-600" }, tr = {
|
|
3943
3943
|
key: 0,
|
|
3944
3944
|
class: "pt-8 space-y-32"
|
|
3945
3945
|
}, ir = { class: "flex gap-8 items-center justify-start" }, mn = /* @__PURE__ */ re({
|
|
@@ -4092,7 +4092,7 @@ const Ja = /* @__PURE__ */ rt(qa, [["render", Qa]]), er = { class: "fm-typo-en-t
|
|
|
4092
4092
|
]
|
|
4093
4093
|
}, {
|
|
4094
4094
|
default: $(() => [
|
|
4095
|
-
A(
|
|
4095
|
+
A(Qa, null, {
|
|
4096
4096
|
default: $(() => [
|
|
4097
4097
|
A(_, {
|
|
4098
4098
|
modelValue: w.group.min,
|
|
@@ -4137,7 +4137,7 @@ const Ja = /* @__PURE__ */ rt(qa, [["render", Qa]]), er = { class: "fm-typo-en-t
|
|
|
4137
4137
|
}, 8, ["disabled", "model-value"])
|
|
4138
4138
|
]),
|
|
4139
4139
|
_: 1
|
|
4140
|
-
})) :
|
|
4140
|
+
})) : Q("", !0),
|
|
4141
4141
|
A(Ze, { label: "Configuration" }, {
|
|
4142
4142
|
default: $(() => [
|
|
4143
4143
|
A(v, {
|
|
@@ -4162,7 +4162,7 @@ const Ja = /* @__PURE__ */ rt(qa, [["render", Qa]]), er = { class: "fm-typo-en-t
|
|
|
4162
4162
|
"onUpdate:group": C[5] || (C[5] = (S) => h(S)),
|
|
4163
4163
|
"onUpdate:unmapGroup": C[6] || (C[6] = (S) => h(f(S)))
|
|
4164
4164
|
}, null, 8, ["allow-refund-inventory", "categorized-items", "config", "group"])
|
|
4165
|
-
])) :
|
|
4165
|
+
])) : Q("", !0)
|
|
4166
4166
|
]),
|
|
4167
4167
|
_: 3
|
|
4168
4168
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])
|
|
@@ -4215,7 +4215,7 @@ const Ja = /* @__PURE__ */ rt(qa, [["render", Qa]]), er = { class: "fm-typo-en-t
|
|
|
4215
4215
|
var p, v;
|
|
4216
4216
|
const _ = (p = r.value[m.value].groups) == null ? void 0 : p.findIndex(
|
|
4217
4217
|
(R) => R._id === n.groupId
|
|
4218
|
-
), y = oe(r.value), k = { ...
|
|
4218
|
+
), y = oe(r.value), k = { ...Qt(O), _id: n.groupId, groupKey: "" };
|
|
4219
4219
|
(_ ?? -1) < 0 ? y[m.value] = {
|
|
4220
4220
|
...y[m.value],
|
|
4221
4221
|
groups: [...((v = y[m.value]) == null ? void 0 : v.groups) || [], k]
|
|
@@ -4307,7 +4307,7 @@ const Ja = /* @__PURE__ */ rt(qa, [["render", Qa]]), er = { class: "fm-typo-en-t
|
|
|
4307
4307
|
])
|
|
4308
4308
|
]),
|
|
4309
4309
|
_: 1
|
|
4310
|
-
})) :
|
|
4310
|
+
})) : Q("", !0)
|
|
4311
4311
|
]),
|
|
4312
4312
|
_: 3
|
|
4313
4313
|
}, 8, ["categorized-items", "group"]);
|
|
@@ -4325,7 +4325,7 @@ const Ja = /* @__PURE__ */ rt(qa, [["render", Qa]]), er = { class: "fm-typo-en-t
|
|
|
4325
4325
|
groupIds: {}
|
|
4326
4326
|
},
|
|
4327
4327
|
setup(e) {
|
|
4328
|
-
const i = e, t = Re(), { emitData: n, emitAction: a } =
|
|
4328
|
+
const i = e, t = Re(), { emitData: n, emitAction: a } = Jt(), o = ue(), s = F(() => o.rules.group), l = F(() => o.groups);
|
|
4329
4329
|
function r(x) {
|
|
4330
4330
|
return oe(x ?? []).sort((w, C) => w.position - C.position);
|
|
4331
4331
|
}
|
|
@@ -4609,12 +4609,12 @@ const Ja = /* @__PURE__ */ rt(qa, [["render", Qa]]), er = { class: "fm-typo-en-t
|
|
|
4609
4609
|
const p = !n.state.currentSchedulerId, v = n.rules.group.type, R = n.version == N.F_MENU_VERSION.enum.v3, M = n.rules.item.orderFromActiveOnly, S = n.rules.item.bindToVariant;
|
|
4610
4610
|
return function(K) {
|
|
4611
4611
|
return {
|
|
4612
|
-
link: (
|
|
4613
|
-
name: (
|
|
4612
|
+
link: (J) => !_.value && (!J || S),
|
|
4613
|
+
name: (J) => !_.value && !J,
|
|
4614
4614
|
type: v && !K._id && !_.value,
|
|
4615
4615
|
price: K.type != N.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
4616
4616
|
inventory: p ? R ? !_.value && K.type == N.F_ADDON_GROUP_TYPE.enum.NORMAL : !_.value : !1,
|
|
4617
|
-
orderFrom: (
|
|
4617
|
+
orderFrom: (J) => p ? R ? K.type == N.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? _.value : !!_.value == !J : _.value : !1,
|
|
4618
4618
|
orderFromActiveOnly: M,
|
|
4619
4619
|
showOrderFrom: p ? R ? _.value ? !0 : K.type == N.F_ADDON_GROUP_TYPE.enum.PRODUCT : _.value : !1,
|
|
4620
4620
|
bindToVariant: S,
|
|
@@ -4659,7 +4659,7 @@ const Ja = /* @__PURE__ */ rt(qa, [["render", Qa]]), er = { class: "fm-typo-en-t
|
|
|
4659
4659
|
"hide-footer": "",
|
|
4660
4660
|
"pin-header-row": "",
|
|
4661
4661
|
"shrink-at": !1
|
|
4662
|
-
}, null, 8, ["column-defs", "row-data"])) :
|
|
4662
|
+
}, null, 8, ["column-defs", "row-data"])) : Q("", !0)];
|
|
4663
4663
|
}),
|
|
4664
4664
|
_: 1
|
|
4665
4665
|
})]),
|
|
@@ -5071,7 +5071,7 @@ const vr = {
|
|
|
5071
5071
|
editable: "",
|
|
5072
5072
|
title: "Applied product",
|
|
5073
5073
|
"onUpdate:overrides": c[1] || (c[1] = (f) => o.value.usedBy = f)
|
|
5074
|
-
}, null, 8, ["overrides"])) :
|
|
5074
|
+
}, null, 8, ["overrides"])) : Q("", !0)
|
|
5075
5075
|
])
|
|
5076
5076
|
]),
|
|
5077
5077
|
_: 1
|
|
@@ -5179,7 +5179,7 @@ const vr = {
|
|
|
5179
5179
|
];
|
|
5180
5180
|
}),
|
|
5181
5181
|
_: 1
|
|
5182
|
-
})) :
|
|
5182
|
+
})) : Q("", !0),
|
|
5183
5183
|
A(C, {
|
|
5184
5184
|
label: "KDS configuration",
|
|
5185
5185
|
"model-value": ((y = g.form.print) == null ? void 0 : y.sequential) ?? !1,
|
|
@@ -5220,7 +5220,7 @@ const vr = {
|
|
|
5220
5220
|
variant: "tertiary",
|
|
5221
5221
|
onClick: x[2] || (x[2] = _t(() => {
|
|
5222
5222
|
}, ["stop"]))
|
|
5223
|
-
}, null, 8, ["disabled"])) :
|
|
5223
|
+
}, null, 8, ["disabled"])) : Q("", !0)
|
|
5224
5224
|
]),
|
|
5225
5225
|
A(_, {
|
|
5226
5226
|
id: k,
|
|
@@ -5235,7 +5235,7 @@ const vr = {
|
|
|
5235
5235
|
];
|
|
5236
5236
|
}),
|
|
5237
5237
|
_: 1
|
|
5238
|
-
}, 8, ["item-key", "model-value"])) :
|
|
5238
|
+
}, 8, ["item-key", "model-value"])) : Q("", !0),
|
|
5239
5239
|
A(Y(Ar), { "apply-product": !1 }, {
|
|
5240
5240
|
default: $(({ trigger: k }) => [
|
|
5241
5241
|
E("div", xr, [
|
|
@@ -5283,7 +5283,7 @@ const vr = {
|
|
|
5283
5283
|
E("div", Or, [
|
|
5284
5284
|
E("div", Pr, [
|
|
5285
5285
|
E("p", zr, Ye(n.title), 1),
|
|
5286
|
-
n.description ? (z(), q("p", Er, Ye(n.description), 1)) :
|
|
5286
|
+
n.description ? (z(), q("p", Er, Ye(n.description), 1)) : Q("", !0)
|
|
5287
5287
|
]),
|
|
5288
5288
|
A(o, {
|
|
5289
5289
|
"model-value": n.toggle,
|
|
@@ -5294,7 +5294,7 @@ const vr = {
|
|
|
5294
5294
|
default: $(() => [
|
|
5295
5295
|
n.toggle ? (z(), q("div", Fr, [
|
|
5296
5296
|
ce(n.$slots, "default", {}, void 0, !0)
|
|
5297
|
-
])) :
|
|
5297
|
+
])) : Q("", !0)
|
|
5298
5298
|
]),
|
|
5299
5299
|
_: 3
|
|
5300
5300
|
})
|
|
@@ -5447,10 +5447,10 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5447
5447
|
}, Zr = {
|
|
5448
5448
|
key: 4,
|
|
5449
5449
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5450
|
-
},
|
|
5450
|
+
}, Jr = {
|
|
5451
5451
|
key: 5,
|
|
5452
5452
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5453
|
-
},
|
|
5453
|
+
}, Qr = {
|
|
5454
5454
|
key: 7,
|
|
5455
5455
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5456
5456
|
}, es = {
|
|
@@ -5530,7 +5530,7 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5530
5530
|
};
|
|
5531
5531
|
async function w() {
|
|
5532
5532
|
var G, U;
|
|
5533
|
-
c.value = d.value._id ? (await
|
|
5533
|
+
c.value = d.value._id ? (await Qn(
|
|
5534
5534
|
a.mergedMenu,
|
|
5535
5535
|
[d.value],
|
|
5536
5536
|
a.state.menu,
|
|
@@ -5631,7 +5631,7 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5631
5631
|
const K = H(
|
|
5632
5632
|
!!d.value.inventoryBindings || (((ci = d.value.variant) == null ? void 0 : ci.variantCombinations) || []).some((G) => !!G.inventoryBindings) || !1
|
|
5633
5633
|
);
|
|
5634
|
-
function
|
|
5634
|
+
function J(G) {
|
|
5635
5635
|
var U, ae, de;
|
|
5636
5636
|
G || (d.value = {
|
|
5637
5637
|
...d.value,
|
|
@@ -5763,12 +5763,12 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5763
5763
|
variant: "dialog",
|
|
5764
5764
|
title: k.value.title,
|
|
5765
5765
|
items: k.value.items
|
|
5766
|
-
}, null, 8, ["title", "items"])) :
|
|
5766
|
+
}, null, 8, ["title", "items"])) : Q("", !0)
|
|
5767
5767
|
]),
|
|
5768
5768
|
default: $(() => {
|
|
5769
5769
|
var ae, de;
|
|
5770
5770
|
return [
|
|
5771
|
-
Y(xt)("sm") ?
|
|
5771
|
+
Y(xt)("sm") ? Q("", !0) : (z(), L(Ei, {
|
|
5772
5772
|
key: 0,
|
|
5773
5773
|
class: "fixed",
|
|
5774
5774
|
style: On({
|
|
@@ -5789,7 +5789,7 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5789
5789
|
key: 0,
|
|
5790
5790
|
"linked-status": h.value,
|
|
5791
5791
|
"onUpdate:catalogAndScheduler": f
|
|
5792
|
-
}, null, 8, ["linked-status"])) :
|
|
5792
|
+
}, null, 8, ["linked-status"])) : Q("", !0),
|
|
5793
5793
|
A(Le, {
|
|
5794
5794
|
toggle: p.value,
|
|
5795
5795
|
"onUpdate:toggle": [
|
|
@@ -5815,7 +5815,7 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5815
5815
|
]),
|
|
5816
5816
|
_: 1
|
|
5817
5817
|
}, 8, ["toggle", "disabled"]),
|
|
5818
|
-
C.value ?
|
|
5818
|
+
C.value ? Q("", !0) : (z(), q("div", Xr)),
|
|
5819
5819
|
A(Le, {
|
|
5820
5820
|
toggle: R.value,
|
|
5821
5821
|
"onUpdate:toggle": [
|
|
@@ -5837,7 +5837,7 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5837
5837
|
]),
|
|
5838
5838
|
_: 1
|
|
5839
5839
|
}, 8, ["toggle", "disabled"]),
|
|
5840
|
-
l.value.print && !C.value ? (z(), q("div", qr)) :
|
|
5840
|
+
l.value.print && !C.value ? (z(), q("div", qr)) : Q("", !0),
|
|
5841
5841
|
l.value.print ? (z(), L(Le, {
|
|
5842
5842
|
key: 3,
|
|
5843
5843
|
toggle: T.value,
|
|
@@ -5861,8 +5861,8 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5861
5861
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
5862
5862
|
]),
|
|
5863
5863
|
_: 1
|
|
5864
|
-
}, 8, ["toggle"])) :
|
|
5865
|
-
C.value ?
|
|
5864
|
+
}, 8, ["toggle"])) : Q("", !0),
|
|
5865
|
+
C.value ? Q("", !0) : (z(), q("div", Zr)),
|
|
5866
5866
|
A(Le, {
|
|
5867
5867
|
toggle: S.value,
|
|
5868
5868
|
"onUpdate:toggle": [
|
|
@@ -5886,7 +5886,7 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5886
5886
|
]),
|
|
5887
5887
|
_: 1
|
|
5888
5888
|
}, 8, ["toggle", "disabled"]),
|
|
5889
|
-
l.value.group && !C.value ? (z(), q("div",
|
|
5889
|
+
l.value.group && !C.value ? (z(), q("div", Jr)) : Q("", !0),
|
|
5890
5890
|
l.value.group ? (z(), L(Le, {
|
|
5891
5891
|
key: 6,
|
|
5892
5892
|
toggle: W.value,
|
|
@@ -5910,14 +5910,14 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5910
5910
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
5911
5911
|
]),
|
|
5912
5912
|
_: 1
|
|
5913
|
-
}, 8, ["toggle", "disabled"])) :
|
|
5914
|
-
l.value.inventory && !C.value ? (z(), q("div",
|
|
5913
|
+
}, 8, ["toggle", "disabled"])) : Q("", !0),
|
|
5914
|
+
l.value.inventory && !C.value ? (z(), q("div", Qr)) : Q("", !0),
|
|
5915
5915
|
l.value.inventory ? (z(), L(Le, {
|
|
5916
5916
|
key: 8,
|
|
5917
5917
|
toggle: K.value,
|
|
5918
5918
|
"onUpdate:toggle": [
|
|
5919
5919
|
U[15] || (U[15] = (X) => K.value = X),
|
|
5920
|
-
U[16] || (U[16] = (X) =>
|
|
5920
|
+
U[16] || (U[16] = (X) => J(X))
|
|
5921
5921
|
],
|
|
5922
5922
|
disabled: !C.value,
|
|
5923
5923
|
description: "Use a different inventory setting",
|
|
@@ -5935,8 +5935,8 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5935
5935
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
5936
5936
|
]),
|
|
5937
5937
|
_: 1
|
|
5938
|
-
}, 8, ["toggle", "disabled"])) :
|
|
5939
|
-
l.value.takeaway(d.value.category ?? ((ae = c.value) == null ? void 0 : ae.category)) && !C.value ? (z(), q("div", es)) :
|
|
5938
|
+
}, 8, ["toggle", "disabled"])) : Q("", !0),
|
|
5939
|
+
l.value.takeaway(d.value.category ?? ((ae = c.value) == null ? void 0 : ae.category)) && !C.value ? (z(), q("div", es)) : Q("", !0),
|
|
5940
5940
|
l.value.takeaway(d.value.category ?? ((de = c.value) == null ? void 0 : de.category)) ? (z(), L(Le, {
|
|
5941
5941
|
key: 10,
|
|
5942
5942
|
toggle: I.value,
|
|
@@ -5960,7 +5960,7 @@ const Vr = /* @__PURE__ */ rt(Tr, [["render", $r]]), Nr = {
|
|
|
5960
5960
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
5961
5961
|
]),
|
|
5962
5962
|
_: 1
|
|
5963
|
-
}, 8, ["toggle", "disabled"])) :
|
|
5963
|
+
}, 8, ["toggle", "disabled"])) : Q("", !0)
|
|
5964
5964
|
], 512),
|
|
5965
5965
|
U[20] || (U[20] = E("div", { class: "w-[360px] xs:hidden xs:invisible" }, null, -1))
|
|
5966
5966
|
])
|
|
@@ -6032,7 +6032,7 @@ const si = Fi("item-manager", () => {
|
|
|
6032
6032
|
return delete v.variant, delete v.thumbnail, [v, ...R || []];
|
|
6033
6033
|
}
|
|
6034
6034
|
function r(p, v, R, M) {
|
|
6035
|
-
const S = oe(v), B = R ? S.modules.catalog.find((W) => W._id === R) : null, K = M ? S.modules.scheduler.find((W) => W._id === M) : null,
|
|
6035
|
+
const S = oe(v), B = R ? S.modules.catalog.find((W) => W._id === R) : null, K = M ? S.modules.scheduler.find((W) => W._id === M) : null, J = B ? oe(B) : void 0, I = R ? S.modules.catalog.filter((W) => W._id !== R) : [], D = K ? oe(K) : void 0, T = p.reduce((W, te) => (W[te._id] = l(te), W), {});
|
|
6036
6036
|
function Z(W = []) {
|
|
6037
6037
|
const te = p.map((ee) => ee._id);
|
|
6038
6038
|
return [
|
|
@@ -6040,20 +6040,20 @@ const si = Fi("item-manager", () => {
|
|
|
6040
6040
|
...Object.values(T).flatMap((ee) => ee)
|
|
6041
6041
|
];
|
|
6042
6042
|
}
|
|
6043
|
-
return
|
|
6044
|
-
...
|
|
6043
|
+
return J && M ? (J.override.scheduler = {
|
|
6044
|
+
...J.override.scheduler,
|
|
6045
6045
|
[M]: {
|
|
6046
|
-
...
|
|
6046
|
+
...J.override.scheduler[M],
|
|
6047
6047
|
_id: M,
|
|
6048
6048
|
items: Z(D == null ? void 0 : D.items).map((W) => ({
|
|
6049
6049
|
...W,
|
|
6050
6050
|
orderFrom: N.F_ORDER_FROM.enum.ALL
|
|
6051
6051
|
}))
|
|
6052
6052
|
}
|
|
6053
|
-
}, S.modules.catalog = [...I,
|
|
6054
|
-
...
|
|
6053
|
+
}, S.modules.catalog = [...I, J], S) : J ? (J.override.items = {
|
|
6054
|
+
...J.override.items,
|
|
6055
6055
|
...T
|
|
6056
|
-
}, S.modules.catalog = [...I,
|
|
6056
|
+
}, S.modules.catalog = [...I, J], S) : D ? (D.items = Z(D.items), S.modules.scheduler = [
|
|
6057
6057
|
...S.modules.scheduler.filter((W) => W._id !== M),
|
|
6058
6058
|
D
|
|
6059
6059
|
], S) : {
|
|
@@ -6113,10 +6113,10 @@ const si = Fi("item-manager", () => {
|
|
|
6113
6113
|
_id: R
|
|
6114
6114
|
}, S = (B = M == null ? void 0 : M.items) == null ? void 0 : B.filter((K) => K._id === p._id);
|
|
6115
6115
|
await c(p, S, async (K) => {
|
|
6116
|
-
const
|
|
6116
|
+
const J = K.modules.catalog.find(
|
|
6117
6117
|
(I) => I._id === v._id
|
|
6118
6118
|
);
|
|
6119
|
-
await new ze(
|
|
6119
|
+
await new ze(J, e, a.updateMenu, t).update();
|
|
6120
6120
|
});
|
|
6121
6121
|
}
|
|
6122
6122
|
async function h(p) {
|
|
@@ -6141,10 +6141,10 @@ const si = Fi("item-manager", () => {
|
|
|
6141
6141
|
}
|
|
6142
6142
|
async function f(p) {
|
|
6143
6143
|
var S, B;
|
|
6144
|
-
const v = e.state.currentSchedulerId, R = oe(e.currentCatalog), M = (B = ((S = R.override.scheduler[v]) == null ? void 0 : S.items) || []) == null ? void 0 : B.reduce((K,
|
|
6145
|
-
if (
|
|
6146
|
-
const I = p.find((D) => D._id ===
|
|
6147
|
-
return I ? [...K, { ...
|
|
6144
|
+
const v = e.state.currentSchedulerId, R = oe(e.currentCatalog), M = (B = ((S = R.override.scheduler[v]) == null ? void 0 : S.items) || []) == null ? void 0 : B.reduce((K, J) => {
|
|
6145
|
+
if (J.combinationKey) return [...K, J];
|
|
6146
|
+
const I = p.find((D) => D._id === J._id);
|
|
6147
|
+
return I ? [...K, { ...J, price: I.price }] : [...K, J];
|
|
6148
6148
|
}, []);
|
|
6149
6149
|
R.override.scheduler = {
|
|
6150
6150
|
...R.override.scheduler,
|
|
@@ -6158,13 +6158,13 @@ const si = Fi("item-manager", () => {
|
|
|
6158
6158
|
async function g(p) {
|
|
6159
6159
|
var S;
|
|
6160
6160
|
const v = oe(e.currentCatalog), R = (S = Object.entries(v.override.items)) == null ? void 0 : S.reduce(
|
|
6161
|
-
(B, [K,
|
|
6161
|
+
(B, [K, J]) => {
|
|
6162
6162
|
const I = p.find((T) => T._id === K);
|
|
6163
6163
|
if (!I)
|
|
6164
|
-
return B[K] =
|
|
6165
|
-
const D =
|
|
6164
|
+
return B[K] = J, B;
|
|
6165
|
+
const D = J.find((T) => !T.combinationKey);
|
|
6166
6166
|
return B[K] = [
|
|
6167
|
-
...
|
|
6167
|
+
...J.filter((T) => !!T.combinationKey),
|
|
6168
6168
|
{
|
|
6169
6169
|
...D,
|
|
6170
6170
|
code: I.code || void 0,
|
|
@@ -6319,7 +6319,7 @@ export {
|
|
|
6319
6319
|
vt as S,
|
|
6320
6320
|
mn as _,
|
|
6321
6321
|
Gi as a,
|
|
6322
|
-
|
|
6323
|
-
|
|
6322
|
+
Qt as e,
|
|
6323
|
+
Qn as m,
|
|
6324
6324
|
si as u
|
|
6325
6325
|
};
|