@feedmepos/mf-menu 0.32.7-beta.2 → 0.32.7-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BIQ0CTci.js → App-DCkQc7e4.js} +98 -98
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-uzmq3vwy.js +161 -0
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +74 -0
- package/dist/{Catalog-D2wc24o8.js → Catalog-CUPoRid3.js} +9 -9
- package/dist/{Category-DA5-55d2.js → Category-BkvhZ57Y.js} +7 -7
- package/dist/{Category-BPufryqK.js → Category-Cdw0ikhP.js} +4 -4
- package/dist/{CookingGuide-DKvou40e.js → CookingGuide-BZ-4oULM.js} +6 -6
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DHoAYdGI.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJvVFWdR.js} +3 -3
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +26 -0
- package/dist/{Group-D60oAvmM.js → Group-C1FaXdUb.js} +1 -1
- package/dist/{Group-Bgpc6qE1.js → Group-Cec83DWm.js} +4 -4
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BXn3--BL.js → Group.vue_vue_type_script_setup_true_lang-2_lLBdX2.js} +128 -128
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BD9IZkwW.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BEDyKWhK.js} +91 -91
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BE3LdBYY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BteTvMnx.js} +3225 -3225
- package/dist/{Ingredient-Brv4hml-.js → Ingredient-DulL8h2B.js} +29 -29
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIOX-pq1.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DoBx7Dal.js} +104 -104
- package/dist/{LinkProductSideSheet-BDMbKJ8o.js → LinkProductSideSheet-Br2eE8pC.js} +251 -251
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +69 -0
- package/dist/{MenuSetting-DvCu23my.js → MenuSetting-DxW4LCW4.js} +77 -77
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js → PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js} +8 -8
- package/dist/{PrintRoute-DwgLKDUV.js → PrintRoute-Da6Zkx-0.js} +5 -5
- package/dist/{Product-EmoWM778.js → Product-Cs76t18_.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-5HyO_RYw.js → Product.vue_vue_type_script_setup_true_lang-C6SOu4Vv.js} +606 -606
- package/dist/{ProductInternalTools-PqzouaF2.js → ProductInternalTools-DPbeRvTM.js} +10 -10
- package/dist/{Products-ZgfTT9dI.js → Products--7dGfuuT.js} +52 -52
- package/dist/{Publish-CUdRwmN1.js → Publish-COmZtiyX.js} +5 -5
- package/dist/{Recipe-BRUxyire.js → Recipe-BaN_1zrP.js} +5 -5
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CPFGkaTr.js → RuleView.vue_vue_type_script_setup_true_lang-DputprQj.js} +451 -448
- package/dist/{Scheduler-BXdZh-xC.js → Scheduler-BSUpIAaK.js} +4 -4
- package/dist/{ServingSequence-EAZHOHiy.js → ServingSequence-dXBb7e5d.js} +4 -4
- package/dist/{Setting-BRut_Xj0.js → Setting-CalEQW0n.js} +6 -6
- package/dist/{Subcategory-D6Yrs-vO.js → Subcategory-zPHtX7Vc.js} +5 -5
- package/dist/{Takeaway-Bi8JfDWa.js → Takeaway-CRDj2Bpe.js} +5 -5
- package/dist/{Takeaway-CRdlNTu7.js → Takeaway-CcnmeTmu.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DKQZ9J8Z.js → Takeaway.vue_vue_type_script_setup_true_lang-Cj7vyOaP.js} +5 -5
- package/dist/{TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js → TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DDWk-WUW.js → Thumbnail.vue_vue_type_script_setup_true_lang-B0552qsN.js} +74 -74
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BwnyIDNH.js +6038 -0
- package/dist/{Unit-Ccs_k5IS.js → Unit-C7-Oj5S3.js} +3 -3
- package/dist/{Variant-BHmgMXq7.js → Variant-CYiMkE0q.js} +4 -4
- package/dist/{_id_-DSSoi4Gy.js → _id_-D75ZcNlf.js} +11 -11
- package/dist/{app-CzXxFrl1.js → app-5fxKLAzS.js} +447 -447
- package/dist/{app-C8Dm2-h4.js → app-BhLVpUSl.js} +35 -35
- package/dist/{app-B9seAt5l.js → app-DzVMOviz.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/MenuSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +2 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-BoIPm5hC.js +13 -0
- package/dist/assets/override-menu-DfTrwWpR.js +13 -0
- package/dist/assets/validate-menu-BhWvQ3T9.js +13 -0
- package/dist/{catalog-CD-fdGdY.js → catalog-CudNSsIP.js} +1 -1
- package/dist/{catalogSetting-Ci85lXor.js → catalogSetting-BVHO9tK3.js} +1 -1
- package/dist/{category-6NAH0dUF.js → category-BQpgz1lk.js} +1 -1
- package/dist/{currency-BP_z7R5d.js → currency-BfS7H2KE.js} +1 -1
- package/dist/{index-BLMijxTj.js → index-BHdPJta4.js} +91 -91
- package/dist/{index-C1XCbqC-.js → index-DmGJvREM.js} +56 -56
- package/dist/{index-Cftm4-G_.js → index-DuLXS699.js} +5 -5
- package/dist/{index-DgDQzkPR.js → index-aaoziUNI.js} +30 -30
- package/dist/{index.vue_vue_type_script_setup_true_lang-D-k9WcQV.js → index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js} +40026 -40153
- package/dist/item-BtKW0wdj.js +7685 -0
- package/dist/{iteration-ZG64Re91.js → iteration-CaliNodx.js} +1 -1
- package/dist/{jszip.min-BETdv0rh.js → jszip.min-DXbkmgRD.js} +102 -102
- package/dist/{menu-COMXycAe.js → menu-D-lUEuvX.js} +1 -1
- package/dist/{menuV2-CeRS0Jw3.js → menuV2-D-6O36DO.js} +357 -348
- package/dist/mf-menu.css +1 -1
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
- package/dist/{priceTier-t2T3Q87F.js → priceTier-DKnYaOA9.js} +1 -1
- package/dist/{scheduler-BbJUVuiK.js → scheduler-DEwfbYPL.js} +7 -7
- package/dist/{subcategory-61kOQh4g.js → subcategory-CQKklgcd.js} +2 -2
- package/dist/{toExcel-DIYaK18-.js → toExcel-CRwL-QqF.js} +2 -2
- package/dist/{unit-B6StucsI.js → unit-BzM1rmN7.js} +151 -151
- package/dist/{vuedraggable-DnBIRDMr.js → vuedraggable-CK8z7qA8.js} +2 -2
- package/package.json +3 -2
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-BpEjqhAC.js +0 -161
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +0 -74
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-B3Ixruh-.js +0 -26
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +0 -69
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-JdHaBpaX.js +0 -5997
- package/dist/assets/linked-status-Cuf8X8_g.js +0 -13
- package/dist/assets/override-menu-yxQLf82k.js +0 -13
- package/dist/assets/validate-menu-BwbenBs6.js +0 -13
- package/dist/item-ByEPWjef.js +0 -6819
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ne = (e, t, n) =>
|
|
4
|
-
import { ao as
|
|
1
|
+
var We = Object.defineProperty;
|
|
2
|
+
var Le = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ne = (e, t, n) => Le(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ao as ae, H as C, B as T, z as ue, ap as re, J as B, I as ie, ac as x, c as L, X as V, am as oe, aq as qe, ar as ze, A as Be, ae as Ge, as as He, at as Je, ab as Ye } from "./index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js";
|
|
5
5
|
import { defineStore as Xe } from "pinia";
|
|
6
|
-
import { shallowRef as j, ref as
|
|
6
|
+
import { shallowRef as j, ref as G, computed as S, shallowReactive as Qe, effectScope as Ze, watch as et } from "vue";
|
|
7
7
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
8
|
-
import { useSnackbar as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
8
|
+
import { useSnackbar as tt } from "@feedmepos/ui-library";
|
|
9
|
+
const nt = "/assets/linked-status-BoIPm5hC.js", rt = "/assets/override-menu-DfTrwWpR.js";
|
|
10
|
+
function ot(e) {
|
|
11
11
|
var o;
|
|
12
12
|
const t = C(e), n = (o = t.variant) == null ? void 0 : o.variantCombinations;
|
|
13
13
|
return delete t.variant, delete t.thumbnail, [t, ...n || []];
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const r = C(t),
|
|
17
|
-
function
|
|
18
|
-
const
|
|
15
|
+
function st(e, t, n, o) {
|
|
16
|
+
const r = C(t), u = n ? r.modules.catalog.find((v) => v._id === n) : null, l = o ? r.modules.scheduler.find((v) => v._id === o) : null, a = u ? C(u) : void 0, c = n ? r.modules.catalog.filter((v) => v._id !== n) : [], i = l ? C(l) : void 0, f = e.reduce((v, y) => (v[y._id] = ot(y), v), {});
|
|
17
|
+
function p(v = []) {
|
|
18
|
+
const y = e.map((h) => h._id);
|
|
19
19
|
return [
|
|
20
|
-
...
|
|
21
|
-
...Object.values(f).flatMap((
|
|
20
|
+
...v.filter((h) => !y.includes(h._id)),
|
|
21
|
+
...Object.values(f).flatMap((h) => h)
|
|
22
22
|
];
|
|
23
23
|
}
|
|
24
|
-
return
|
|
25
|
-
...
|
|
24
|
+
return a && o ? (a.override.scheduler = {
|
|
25
|
+
...a.override.scheduler,
|
|
26
26
|
[o]: {
|
|
27
|
-
...
|
|
27
|
+
...a.override.scheduler[o],
|
|
28
28
|
_id: o,
|
|
29
|
-
items:
|
|
30
|
-
...
|
|
31
|
-
orderFrom:
|
|
29
|
+
items: p(i == null ? void 0 : i.items).map((v) => ({
|
|
30
|
+
...v,
|
|
31
|
+
orderFrom: ue.F_ORDER_FROM.enum.ALL
|
|
32
32
|
}))
|
|
33
33
|
}
|
|
34
|
-
}, r.modules.catalog = [...c,
|
|
35
|
-
...
|
|
34
|
+
}, r.modules.catalog = [...c, a], r) : a ? (a.override.items = {
|
|
35
|
+
...a.override.items,
|
|
36
36
|
...f
|
|
37
|
-
}, r.modules.catalog = [...c,
|
|
38
|
-
...r.modules.scheduler.filter((
|
|
37
|
+
}, r.modules.catalog = [...c, a], r) : i ? (i.items = p(i.items), r.modules.scheduler = [
|
|
38
|
+
...r.modules.scheduler.filter((v) => v._id !== o),
|
|
39
39
|
i
|
|
40
40
|
], r) : {
|
|
41
41
|
...re(),
|
|
@@ -50,22 +50,22 @@ function ot(e, t, n, o) {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
function $(e, t, n) {
|
|
53
|
-
var
|
|
53
|
+
var u;
|
|
54
54
|
if (n >= 3) return e;
|
|
55
55
|
const o = t.modules.item.find((l) => l._id === e._id);
|
|
56
56
|
if (!o)
|
|
57
57
|
throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
|
|
58
|
-
const r = (
|
|
59
|
-
var i, f,
|
|
60
|
-
const
|
|
58
|
+
const r = (u = o.groups) == null ? void 0 : u.map((l) => {
|
|
59
|
+
var i, f, p;
|
|
60
|
+
const a = (i = e == null ? void 0 : e.groups) == null ? void 0 : i.find((v) => v._id === l._id);
|
|
61
61
|
let c;
|
|
62
|
-
return
|
|
63
|
-
var
|
|
64
|
-
const
|
|
65
|
-
(b) => b._id ===
|
|
62
|
+
return a ? c = ((f = l.items) == null ? void 0 : f.map((v) => {
|
|
63
|
+
var h;
|
|
64
|
+
const y = (h = a.items) == null ? void 0 : h.find(
|
|
65
|
+
(b) => b._id === v._id && b.combinationKey === v.combinationKey
|
|
66
66
|
);
|
|
67
|
-
return $(
|
|
68
|
-
})) ?? [] : c = ((
|
|
67
|
+
return $(y || v, t, n + 1);
|
|
68
|
+
})) ?? [] : c = ((p = l.items) == null ? void 0 : p.map((v) => $(v, t, n + 1))) ?? [], {
|
|
69
69
|
...l,
|
|
70
70
|
items: c
|
|
71
71
|
};
|
|
@@ -78,12 +78,12 @@ function $(e, t, n) {
|
|
|
78
78
|
groups: r
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
const n = e.groups.map((
|
|
83
|
-
const l = t.modules.group.find((c) => c._id ===
|
|
84
|
-
var
|
|
85
|
-
const i = (
|
|
86
|
-
(
|
|
81
|
+
function at(e, t) {
|
|
82
|
+
const n = e.groups.map((u) => {
|
|
83
|
+
const l = t.modules.group.find((c) => c._id === u._id), a = ((l == null ? void 0 : l.items) || []).map((c) => {
|
|
84
|
+
var p;
|
|
85
|
+
const i = (p = u.items) == null ? void 0 : p.find(
|
|
86
|
+
(v) => v._id === c._id && v.combinationKey === c.combinationKey
|
|
87
87
|
);
|
|
88
88
|
if (i)
|
|
89
89
|
return $(i, t, 1);
|
|
@@ -94,8 +94,8 @@ function st(e, t) {
|
|
|
94
94
|
};
|
|
95
95
|
return $(f, t, 1);
|
|
96
96
|
});
|
|
97
|
-
return { ...
|
|
98
|
-
}), o = e.variant ? e.variant.variantCombinations.map((
|
|
97
|
+
return { ...u, items: a };
|
|
98
|
+
}), o = e.variant ? e.variant.variantCombinations.map((u) => $(u, t, 1)) : [], r = {
|
|
99
99
|
...T.generator.initMenuV4ItemOverrider(),
|
|
100
100
|
_id: e._id,
|
|
101
101
|
name: e.name,
|
|
@@ -104,20 +104,20 @@ function st(e, t) {
|
|
|
104
104
|
};
|
|
105
105
|
return [...o, r];
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function H(e, t) {
|
|
108
108
|
var o;
|
|
109
109
|
if (!t)
|
|
110
110
|
return e;
|
|
111
111
|
const n = { ...e, code: t.code };
|
|
112
112
|
return n.groups = (o = n.groups) == null ? void 0 : o.map((r) => {
|
|
113
|
-
var l,
|
|
114
|
-
const
|
|
115
|
-
return r.items = (
|
|
113
|
+
var l, a;
|
|
114
|
+
const u = (l = t.groups) == null ? void 0 : l.find((c) => c._id === r._id);
|
|
115
|
+
return r.items = (a = r.items) == null ? void 0 : a.map((c) => {
|
|
116
116
|
var f;
|
|
117
|
-
const i = (f =
|
|
118
|
-
(
|
|
117
|
+
const i = (f = u == null ? void 0 : u.items) == null ? void 0 : f.find(
|
|
118
|
+
(p) => p._id === c._id && p.combinationKey === c.combinationKey
|
|
119
119
|
);
|
|
120
|
-
return
|
|
120
|
+
return H(c, i);
|
|
121
121
|
}), r;
|
|
122
122
|
}), n;
|
|
123
123
|
}
|
|
@@ -126,12 +126,12 @@ function ut(e, t) {
|
|
|
126
126
|
t.variant && (t.variant = {
|
|
127
127
|
...t.variant,
|
|
128
128
|
variantCombinations: t.variant.variantCombinations.map((r) => {
|
|
129
|
-
const
|
|
129
|
+
const u = n.find(
|
|
130
130
|
(l) => l._id === r._id && l.combinationKey === r.combinationKey
|
|
131
131
|
);
|
|
132
|
-
if (!
|
|
132
|
+
if (!u)
|
|
133
133
|
throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
|
|
134
|
-
return
|
|
134
|
+
return H(u, r);
|
|
135
135
|
})
|
|
136
136
|
});
|
|
137
137
|
const o = n.find((r) => !r.combinationKey);
|
|
@@ -139,57 +139,57 @@ function ut(e, t) {
|
|
|
139
139
|
throw new Error(`Base item overrider not found - ${t._id}`);
|
|
140
140
|
return t.groups = (o.groups || []).map((r) => {
|
|
141
141
|
var l;
|
|
142
|
-
const
|
|
143
|
-
return r.items = (l = r.items) == null ? void 0 : l.map((
|
|
142
|
+
const u = t.groups.find((a) => a._id === r._id);
|
|
143
|
+
return r.items = (l = r.items) == null ? void 0 : l.map((a) => {
|
|
144
144
|
var i;
|
|
145
|
-
const c = (i =
|
|
146
|
-
(f) => f._id ===
|
|
145
|
+
const c = (i = u == null ? void 0 : u.items) == null ? void 0 : i.find(
|
|
146
|
+
(f) => f._id === a._id && f.combinationKey === a.combinationKey
|
|
147
147
|
);
|
|
148
|
-
return
|
|
148
|
+
return H(a, c);
|
|
149
149
|
}), r;
|
|
150
150
|
}), {
|
|
151
151
|
...t,
|
|
152
152
|
price: (o == null ? void 0 : o.price) || t.price
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
async function
|
|
156
|
-
const l = C(n),
|
|
157
|
-
const
|
|
158
|
-
return
|
|
155
|
+
async function Dt(e, t, n, o, r, u = !0) {
|
|
156
|
+
const l = C(n), a = u ? st(t, l, o, r) : l, c = t.reduce((p, v) => (p[v._id] = a.modules.item.find((y) => y._id === v._id), p), {}), i = t.reduce((p, v) => {
|
|
157
|
+
const y = v._id;
|
|
158
|
+
return p[y] = at(c[y], e), p;
|
|
159
159
|
}, {}), f = T.getFallbackPrices({
|
|
160
|
-
rawMenu:
|
|
160
|
+
rawMenu: a,
|
|
161
161
|
items: i,
|
|
162
162
|
catalogId: o || void 0,
|
|
163
163
|
schedulerId: r
|
|
164
164
|
});
|
|
165
|
-
return t.map((
|
|
166
|
-
const
|
|
165
|
+
return t.map((p) => {
|
|
166
|
+
const v = p._id, y = c[v];
|
|
167
167
|
return {
|
|
168
|
-
...ut(f,
|
|
169
|
-
category: o || r ?
|
|
168
|
+
...ut(f, y),
|
|
169
|
+
category: o || r ? y == null ? void 0 : y.category : null
|
|
170
170
|
};
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
function Vt(e, t) {
|
|
174
174
|
if (e.length === 0) return "";
|
|
175
175
|
const n = e == null ? void 0 : e.split("variant");
|
|
176
|
-
return ((n == null ? void 0 : n.reduce((r,
|
|
177
|
-
if (
|
|
178
|
-
const l = `variant${
|
|
176
|
+
return ((n == null ? void 0 : n.reduce((r, u) => {
|
|
177
|
+
if (u && u.length > 0) {
|
|
178
|
+
const l = `variant${u.split("/")[0]}`, a = u.split("/")[1], i = t.find(
|
|
179
179
|
({ _id: f }) => f === l
|
|
180
|
-
).options.find(({ _id: f }) => f ===
|
|
180
|
+
).options.find(({ _id: f }) => f === a);
|
|
181
181
|
r.push(((i == null ? void 0 : i.name) || "").trim());
|
|
182
182
|
}
|
|
183
183
|
return r;
|
|
184
184
|
}, [])) || []).join(" / ");
|
|
185
185
|
}
|
|
186
186
|
const q = /* @__PURE__ */ new Map();
|
|
187
|
-
async function
|
|
187
|
+
async function Tt(e, t) {
|
|
188
188
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
189
189
|
if (q.has(n))
|
|
190
190
|
return q.get(n);
|
|
191
|
-
const o = await
|
|
192
|
-
|
|
191
|
+
const o = await ae(
|
|
192
|
+
nt,
|
|
193
193
|
JSON.stringify({
|
|
194
194
|
menu: e,
|
|
195
195
|
itemId: t
|
|
@@ -198,22 +198,22 @@ async function Dt(e, t) {
|
|
|
198
198
|
return q.set(n, o), o;
|
|
199
199
|
}
|
|
200
200
|
async function ce(e, t, n) {
|
|
201
|
-
return await
|
|
201
|
+
return await ae(rt, {
|
|
202
202
|
menu: e,
|
|
203
203
|
catalogId: t,
|
|
204
204
|
schedulerId: n
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function Pt(e, t, n) {
|
|
208
208
|
const o = /* @__PURE__ */ new Set();
|
|
209
|
-
function r(
|
|
210
|
-
if (!e || !
|
|
209
|
+
function r(u, l) {
|
|
210
|
+
if (!e || !u || !l || o.has(l)) return !1;
|
|
211
211
|
o.add(l);
|
|
212
|
-
const
|
|
213
|
-
return !
|
|
212
|
+
const a = e.modules.item.find((c) => c._id === l);
|
|
213
|
+
return !a || !a.groups ? !1 : a.groups.some((c) => c._id === u) ? !0 : a.groups.some((c) => {
|
|
214
214
|
const i = e.modules.group.find((f) => f._id === c._id);
|
|
215
215
|
for (const f of (i == null ? void 0 : i.items) || [])
|
|
216
|
-
if (r(
|
|
216
|
+
if (r(u, f._id)) return !0;
|
|
217
217
|
return !1;
|
|
218
218
|
});
|
|
219
219
|
}
|
|
@@ -221,11 +221,11 @@ function Tt(e, t, n) {
|
|
|
221
221
|
}
|
|
222
222
|
function Ft(e, t, n) {
|
|
223
223
|
const o = /* @__PURE__ */ new Set();
|
|
224
|
-
function r(
|
|
225
|
-
if (!e || !
|
|
226
|
-
o.add(
|
|
227
|
-
const
|
|
228
|
-
return !
|
|
224
|
+
function r(u, l) {
|
|
225
|
+
if (!e || !u || !l || o.has(u)) return !1;
|
|
226
|
+
o.add(u);
|
|
227
|
+
const a = e.modules.group.find((c) => c._id === u);
|
|
228
|
+
return !a || !a.items ? !1 : a.items.some((c) => c._id === l) ? !0 : a.items.some((c) => {
|
|
229
229
|
const i = e.modules.item.find((f) => f._id === c._id);
|
|
230
230
|
for (const f of (i == null ? void 0 : i.groups) || [])
|
|
231
231
|
if (r(f._id, l)) return !0;
|
|
@@ -235,7 +235,7 @@ function Ft(e, t, n) {
|
|
|
235
235
|
return r(t, n);
|
|
236
236
|
}
|
|
237
237
|
const z = /* @__PURE__ */ new Map();
|
|
238
|
-
async function
|
|
238
|
+
async function it(e, t, n) {
|
|
239
239
|
const o = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
|
|
240
240
|
if (z.has(o))
|
|
241
241
|
return z.get(o);
|
|
@@ -243,33 +243,33 @@ async function at(e, t, n) {
|
|
|
243
243
|
return z.set(o, r), r;
|
|
244
244
|
}
|
|
245
245
|
async function Kt(e, t, n) {
|
|
246
|
-
var l,
|
|
247
|
-
const o = await
|
|
246
|
+
var l, a;
|
|
247
|
+
const o = await it(e, t, null), r = [], u = (c, i) => {
|
|
248
248
|
const f = C(c);
|
|
249
|
-
for (const
|
|
250
|
-
i[
|
|
249
|
+
for (const p in i)
|
|
250
|
+
i[p] && (f[p] = i[p]);
|
|
251
251
|
return f;
|
|
252
252
|
};
|
|
253
253
|
for (const c of o.modules.group) {
|
|
254
|
-
const i = (l = c.items) == null ? void 0 : l.find((
|
|
254
|
+
const i = (l = c.items) == null ? void 0 : l.find((p) => p._id === n && !p.combinationKey), f = e.modules.item.find((p) => p._id === n);
|
|
255
255
|
if (i) {
|
|
256
|
-
const
|
|
256
|
+
const p = (a = c.items) == null ? void 0 : a.filter((y) => y._id === n && y.combinationKey), v = [i, ...p].map((y) => {
|
|
257
257
|
var w, I;
|
|
258
|
-
const
|
|
259
|
-
(
|
|
260
|
-
) : f, b =
|
|
261
|
-
return
|
|
258
|
+
const h = y.combinationKey ? (I = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : I.find(
|
|
259
|
+
(E) => E.combinationKey === y.combinationKey
|
|
260
|
+
) : f, b = h && f ? u(f, h) : y;
|
|
261
|
+
return u(b, y);
|
|
262
262
|
});
|
|
263
263
|
r.push({
|
|
264
264
|
group: c,
|
|
265
|
-
items:
|
|
265
|
+
items: v
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
return r;
|
|
270
270
|
}
|
|
271
|
-
const M = 0,
|
|
272
|
-
function
|
|
271
|
+
const M = 0, P = 3;
|
|
272
|
+
function ct(e) {
|
|
273
273
|
const t = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
274
274
|
if (!t)
|
|
275
275
|
throw new Error("Invalid RegExp");
|
|
@@ -285,19 +285,19 @@ function O(e) {
|
|
|
285
285
|
if (e instanceof Date)
|
|
286
286
|
return new Date(e.getTime());
|
|
287
287
|
if (e instanceof RegExp)
|
|
288
|
-
return
|
|
288
|
+
return ct(e);
|
|
289
289
|
const t = {};
|
|
290
290
|
for (const n in e)
|
|
291
291
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = O(e[n]));
|
|
292
292
|
return t;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function K(e) {
|
|
295
295
|
return e instanceof RegExp ? e.toString() : e;
|
|
296
296
|
}
|
|
297
297
|
function R(e) {
|
|
298
298
|
return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function F(e, t) {
|
|
301
301
|
if (e === t) return !0;
|
|
302
302
|
if (typeof e != typeof t) return !1;
|
|
303
303
|
if (e instanceof Date && t instanceof Date)
|
|
@@ -307,157 +307,157 @@ function K(e, t) {
|
|
|
307
307
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
308
308
|
if (e.length !== t.length) return !1;
|
|
309
309
|
for (let n = 0; n < e.length; n++)
|
|
310
|
-
if (!
|
|
310
|
+
if (!F(e[n], t[n])) return !1;
|
|
311
311
|
return !0;
|
|
312
312
|
}
|
|
313
313
|
if (R(e) && R(t)) {
|
|
314
314
|
const n = Object.keys(e), o = Object.keys(t);
|
|
315
315
|
if (n.length !== o.length) return !1;
|
|
316
316
|
for (const r of n)
|
|
317
|
-
if (!Object.prototype.hasOwnProperty.call(t, r) || !
|
|
317
|
+
if (!Object.prototype.hasOwnProperty.call(t, r) || !F(e[r], t[r])) return !1;
|
|
318
318
|
return !0;
|
|
319
319
|
}
|
|
320
320
|
return !1;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
const o = e.length, r = t.length,
|
|
322
|
+
function lt(e, t, n) {
|
|
323
|
+
const o = e.length, r = t.length, u = /* @__PURE__ */ new Map();
|
|
324
324
|
for (let c = 0; c < r; c++) {
|
|
325
325
|
const i = n ? n(t[c]) : JSON.stringify(t[c]);
|
|
326
|
-
|
|
326
|
+
u.has(i) || u.set(i, []), u.get(i).push(c);
|
|
327
327
|
}
|
|
328
|
-
const l = [],
|
|
328
|
+
const l = [], a = /* @__PURE__ */ new Set();
|
|
329
329
|
for (let c = 0; c < o; c++) {
|
|
330
|
-
const i = e[c], f = n ? n(i) : JSON.stringify(i),
|
|
331
|
-
if (
|
|
332
|
-
for (const
|
|
333
|
-
if (!
|
|
334
|
-
l.push({ leftIndex: c, rightIndex:
|
|
330
|
+
const i = e[c], f = n ? n(i) : JSON.stringify(i), p = u.get(f);
|
|
331
|
+
if (p) {
|
|
332
|
+
for (const v of p)
|
|
333
|
+
if (!a.has(v) && F(i, t[v])) {
|
|
334
|
+
l.push({ leftIndex: c, rightIndex: v }), a.add(v);
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
return l;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
342
|
-
var
|
|
343
|
-
if (
|
|
344
|
-
const o = { _t: "a" }, r = ((
|
|
345
|
-
let
|
|
346
|
-
if (!l && e.length === t.length && e.length > 0 &&
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
349
|
-
|
|
341
|
+
function dt(e, t, n) {
|
|
342
|
+
var v, y;
|
|
343
|
+
if (F(e, t)) return;
|
|
344
|
+
const o = { _t: "a" }, r = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.detectMove) !== !1, u = ((y = n == null ? void 0 : n.arrays) == null ? void 0 : y.includeValueOnMove) === !0, l = n == null ? void 0 : n.objectHash;
|
|
345
|
+
let a = r ? lt(e, t, l) : [];
|
|
346
|
+
if (!l && e.length === t.length && e.length > 0 && a.length < e.length) {
|
|
347
|
+
const h = R(e[0]) || Array.isArray(e[0]), b = a.length > 0;
|
|
348
|
+
if (h || b) {
|
|
349
|
+
a = [];
|
|
350
350
|
for (let w = 0; w < e.length; w++)
|
|
351
|
-
|
|
351
|
+
a.push({ leftIndex: w, rightIndex: w });
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
new Set(
|
|
355
|
-
const c = new Set(
|
|
356
|
-
for (const
|
|
357
|
-
i.set(
|
|
358
|
-
for (let
|
|
359
|
-
const b = i.get(
|
|
354
|
+
new Set(a.map((h) => h.leftIndex));
|
|
355
|
+
const c = new Set(a.map((h) => h.rightIndex)), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
|
|
356
|
+
for (const h of a)
|
|
357
|
+
i.set(h.leftIndex, h.rightIndex), f.set(h.rightIndex, h.leftIndex);
|
|
358
|
+
for (let h = 0; h < e.length; h++) {
|
|
359
|
+
const b = i.get(h);
|
|
360
360
|
if (b !== void 0) {
|
|
361
|
-
const w = J(e[
|
|
362
|
-
if (w !== void 0 && (o[b] = w), r && b !==
|
|
363
|
-
const I = `_${
|
|
364
|
-
o[I] =
|
|
361
|
+
const w = J(e[h], t[b], n);
|
|
362
|
+
if (w !== void 0 && (o[b] = w), r && b !== h) {
|
|
363
|
+
const I = `_${h}`, E = u ? [e[h], b, P] : ["", b, P];
|
|
364
|
+
o[I] = E;
|
|
365
365
|
}
|
|
366
366
|
} else {
|
|
367
|
-
const w = `_${
|
|
368
|
-
o[w] = [e[
|
|
367
|
+
const w = `_${h}`;
|
|
368
|
+
o[w] = [e[h], M, M];
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
for (let
|
|
372
|
-
c.has(
|
|
373
|
-
const
|
|
374
|
-
if (!(
|
|
371
|
+
for (let h = 0; h < t.length; h++)
|
|
372
|
+
c.has(h) || (o[h] = [t[h]]);
|
|
373
|
+
const p = Object.keys(o);
|
|
374
|
+
if (!(p.length === 1 && p[0] === "_t"))
|
|
375
375
|
return o;
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
379
|
-
const o = {}, r = Object.keys(e),
|
|
380
|
-
for (const
|
|
381
|
-
if (n != null && n.propertyFilter && !n.propertyFilter(
|
|
377
|
+
function ft(e, t, n) {
|
|
378
|
+
if (F(e, t)) return;
|
|
379
|
+
const o = {}, r = Object.keys(e), u = Object.keys(t), l = /* @__PURE__ */ new Set([...r, ...u]);
|
|
380
|
+
for (const a of l) {
|
|
381
|
+
if (n != null && n.propertyFilter && !n.propertyFilter(a, { left: e, right: t }))
|
|
382
382
|
continue;
|
|
383
|
-
const c = Object.prototype.hasOwnProperty.call(e,
|
|
383
|
+
const c = Object.prototype.hasOwnProperty.call(e, a), i = Object.prototype.hasOwnProperty.call(t, a);
|
|
384
384
|
if (c && i) {
|
|
385
|
-
const f = J(e[
|
|
386
|
-
f !== void 0 && (o[
|
|
385
|
+
const f = J(e[a], t[a], n);
|
|
386
|
+
f !== void 0 && (o[a] = f);
|
|
387
387
|
} else if (c && !i) {
|
|
388
|
-
const f = n != null && n.omitRemovedValues ? 0 : e[
|
|
389
|
-
o[
|
|
390
|
-
} else !c && i && (o[
|
|
388
|
+
const f = n != null && n.omitRemovedValues ? 0 : e[a];
|
|
389
|
+
o[a] = [f, M, M];
|
|
390
|
+
} else !c && i && (o[a] = [t[a]]);
|
|
391
391
|
}
|
|
392
392
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
393
393
|
}
|
|
394
394
|
function J(e, t, n) {
|
|
395
|
-
if (
|
|
395
|
+
if (F(e, t)) return;
|
|
396
396
|
if (e === void 0 && t !== void 0) {
|
|
397
|
-
const
|
|
398
|
-
return [
|
|
397
|
+
const a = n != null && n.cloneDiffValues ? O(t) : t;
|
|
398
|
+
return [K(a)];
|
|
399
399
|
}
|
|
400
400
|
if (typeof e !== typeof t || e instanceof Date != t instanceof Date || e instanceof RegExp != t instanceof RegExp || Array.isArray(e) !== Array.isArray(t)) {
|
|
401
|
-
const
|
|
402
|
-
return [
|
|
401
|
+
const a = n != null && n.cloneDiffValues ? O(e) : e, c = n != null && n.cloneDiffValues ? O(t) : t;
|
|
402
|
+
return [K(a), K(c)];
|
|
403
403
|
}
|
|
404
404
|
if (Array.isArray(e) && Array.isArray(t))
|
|
405
|
-
return lt(e, t, n);
|
|
406
|
-
if (R(e) && R(t))
|
|
407
405
|
return dt(e, t, n);
|
|
408
|
-
|
|
409
|
-
|
|
406
|
+
if (R(e) && R(t))
|
|
407
|
+
return ft(e, t, n);
|
|
408
|
+
const u = n != null && n.cloneDiffValues ? O(e) : e, l = n != null && n.cloneDiffValues ? O(t) : t;
|
|
409
|
+
return [K(u), K(l)];
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function mt(e, t, n) {
|
|
412
412
|
return J(e, t, n);
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function vt(e, t, n) {
|
|
415
415
|
const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
416
|
-
for (const
|
|
417
|
-
if (
|
|
418
|
-
const c = parseInt(
|
|
419
|
-
Array.isArray(i) && (i.length === 3 && i[2] === M ? o.add(c) : i.length === 3 && i[2] ===
|
|
416
|
+
for (const a in t) {
|
|
417
|
+
if (a === "_t" || !a.startsWith("_")) continue;
|
|
418
|
+
const c = parseInt(a.slice(1)), i = t[a];
|
|
419
|
+
Array.isArray(i) && (i.length === 3 && i[2] === M ? o.add(c) : i.length === 3 && i[2] === P && r.set(c, i[1]));
|
|
420
420
|
}
|
|
421
|
-
const
|
|
421
|
+
const u = [];
|
|
422
422
|
let l = 0;
|
|
423
|
-
for (let
|
|
424
|
-
const c =
|
|
423
|
+
for (let a = 0; ; a++) {
|
|
424
|
+
const c = a.toString(), i = t[c];
|
|
425
425
|
if (i !== void 0)
|
|
426
426
|
if (Array.isArray(i) && i.length === 1)
|
|
427
|
-
|
|
427
|
+
u.push(i[0]);
|
|
428
428
|
else {
|
|
429
429
|
for (; l < e.length && o.has(l); )
|
|
430
430
|
l++;
|
|
431
|
-
l < e.length && (
|
|
431
|
+
l < e.length && (u.push(Y(e[l], i)), l++);
|
|
432
432
|
}
|
|
433
433
|
else {
|
|
434
434
|
let f = !1;
|
|
435
|
-
for (const [
|
|
436
|
-
if (
|
|
437
|
-
|
|
435
|
+
for (const [p, v] of r.entries())
|
|
436
|
+
if (v === a) {
|
|
437
|
+
u.push(e[p]), f = !0;
|
|
438
438
|
break;
|
|
439
439
|
}
|
|
440
440
|
if (!f) {
|
|
441
441
|
for (; l < e.length && (o.has(l) || r.has(l)); )
|
|
442
442
|
l++;
|
|
443
443
|
if (l < e.length)
|
|
444
|
-
|
|
444
|
+
u.push(e[l]), l++;
|
|
445
445
|
else
|
|
446
446
|
break;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return u;
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function yt(e, t, n) {
|
|
453
453
|
const o = { ...e };
|
|
454
454
|
for (const r in t) {
|
|
455
|
-
const
|
|
456
|
-
Array.isArray(
|
|
455
|
+
const u = t[r];
|
|
456
|
+
Array.isArray(u) ? u.length === 1 ? o[r] = u[0] : u.length === 3 && u[2] === M ? delete o[r] : u.length === 2 && (o[r] = u[1]) : o[r] = Y(o[r], u);
|
|
457
457
|
}
|
|
458
458
|
return o;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Y(e, t, n) {
|
|
461
461
|
if (t === void 0) return e;
|
|
462
462
|
if (Array.isArray(t)) {
|
|
463
463
|
if (t.length === 1)
|
|
@@ -467,12 +467,12 @@ function X(e, t, n) {
|
|
|
467
467
|
if (t.length === 3 && t[2] === M)
|
|
468
468
|
return;
|
|
469
469
|
}
|
|
470
|
-
return R(t) && t._t === "a" ?
|
|
470
|
+
return R(t) && t._t === "a" ? vt(e, t) : R(t) && R(e) ? yt(e, t) : e;
|
|
471
471
|
}
|
|
472
472
|
function le(e, t, n) {
|
|
473
|
-
return
|
|
473
|
+
return Y(e, t);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function pt(e) {
|
|
476
476
|
const t = { _t: "a" };
|
|
477
477
|
for (const n in e)
|
|
478
478
|
if (n !== "_t")
|
|
@@ -481,9 +481,9 @@ function yt(e) {
|
|
|
481
481
|
if (Array.isArray(r)) {
|
|
482
482
|
if (r.length === 3 && r[2] === M)
|
|
483
483
|
t[o] = [r[0]];
|
|
484
|
-
else if (r.length === 3 && r[2] ===
|
|
485
|
-
const
|
|
486
|
-
t[`_${
|
|
484
|
+
else if (r.length === 3 && r[2] === P) {
|
|
485
|
+
const u = r[1];
|
|
486
|
+
t[`_${u}`] = [r[0], o, P];
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
} else {
|
|
@@ -491,8 +491,8 @@ function yt(e) {
|
|
|
491
491
|
if (Array.isArray(r) && r.length === 1)
|
|
492
492
|
t[`_${o}`] = [r[0], M, M];
|
|
493
493
|
else {
|
|
494
|
-
const
|
|
495
|
-
|
|
494
|
+
const u = X(r);
|
|
495
|
+
u !== void 0 && (t[n] = u);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
return t;
|
|
@@ -504,13 +504,13 @@ function ht(e) {
|
|
|
504
504
|
if (Array.isArray(o))
|
|
505
505
|
o.length === 1 ? t[n] = [o[0], M, M] : o.length === 3 && o[2] === M ? t[n] = [o[0]] : o.length === 2 && (t[n] = [o[1], o[0]]);
|
|
506
506
|
else {
|
|
507
|
-
const r =
|
|
507
|
+
const r = X(o);
|
|
508
508
|
r !== void 0 && (t[n] = r);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
return t;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function X(e) {
|
|
514
514
|
if (e !== void 0) {
|
|
515
515
|
if (Array.isArray(e)) {
|
|
516
516
|
if (e.length === 1)
|
|
@@ -519,26 +519,26 @@ function Y(e) {
|
|
|
519
519
|
return [e[1], e[0]];
|
|
520
520
|
if (e.length === 3 && e[2] === M)
|
|
521
521
|
return [e[0]];
|
|
522
|
-
if (e.length === 3 && e[2] ===
|
|
522
|
+
if (e.length === 3 && e[2] === P)
|
|
523
523
|
return e;
|
|
524
524
|
}
|
|
525
|
-
return R(e) && e._t === "a" ?
|
|
525
|
+
return R(e) && e._t === "a" ? pt(e) : R(e) ? ht(e) : e;
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
function de(e) {
|
|
529
|
-
return
|
|
529
|
+
return X(e);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function gt(e, t, n) {
|
|
532
532
|
const o = de(t);
|
|
533
533
|
return le(e, o);
|
|
534
534
|
}
|
|
535
|
-
class
|
|
535
|
+
class _t {
|
|
536
536
|
constructor(t) {
|
|
537
537
|
ne(this, "options");
|
|
538
538
|
this.options = t || {};
|
|
539
539
|
}
|
|
540
540
|
diff(t, n) {
|
|
541
|
-
return
|
|
541
|
+
return mt(t, n, this.options);
|
|
542
542
|
}
|
|
543
543
|
patch(t, n) {
|
|
544
544
|
return le(t, n, this.options);
|
|
@@ -547,76 +547,76 @@ class gt {
|
|
|
547
547
|
return de(t);
|
|
548
548
|
}
|
|
549
549
|
unpatch(t, n) {
|
|
550
|
-
return
|
|
550
|
+
return gt(t, n, this.options);
|
|
551
551
|
}
|
|
552
552
|
clone(t) {
|
|
553
553
|
return O(t);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
function
|
|
557
|
-
return new
|
|
556
|
+
function St(e) {
|
|
557
|
+
return new _t(e);
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function bt({
|
|
560
560
|
maxHistorySize: e = 10
|
|
561
561
|
}) {
|
|
562
|
-
const t =
|
|
563
|
-
objectHash: (
|
|
562
|
+
const t = St({
|
|
563
|
+
objectHash: (y) => y._id || y.id,
|
|
564
564
|
arrays: {
|
|
565
565
|
detectMove: !0,
|
|
566
566
|
includeValueOnMove: !1
|
|
567
567
|
},
|
|
568
568
|
cloneDiffValues: !1
|
|
569
|
-
}), n = j(null), o = j([]), r =
|
|
570
|
-
function c(
|
|
569
|
+
}), n = j(null), o = j([]), r = G(-1), u = j(null), l = S(() => r.value > 0), a = S(() => r.value < o.value.length - 1);
|
|
570
|
+
function c(y) {
|
|
571
571
|
if (n.value === null) {
|
|
572
|
-
n.value = C(
|
|
572
|
+
n.value = C(y), u.value = C(y), o.value = [{ delta: null }], r.value = 0;
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
575
|
-
const
|
|
576
|
-
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta:
|
|
575
|
+
const h = t.diff(u.value, y);
|
|
576
|
+
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: h }), r.value++, u.value = C(y), o.value.length > e) {
|
|
577
577
|
const b = o.value[1].delta;
|
|
578
578
|
b && n.value && (n.value = t.patch(C(n.value), b)), o.value.shift(), r.value--;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
function i(
|
|
582
|
-
if (!n.value ||
|
|
581
|
+
function i(y) {
|
|
582
|
+
if (!n.value || y < 0 || y >= o.value.length)
|
|
583
583
|
return;
|
|
584
|
-
let
|
|
585
|
-
for (let b = 1; b <=
|
|
584
|
+
let h = C(n.value);
|
|
585
|
+
for (let b = 1; b <= y; b++) {
|
|
586
586
|
const w = o.value[b];
|
|
587
|
-
w.delta && (
|
|
587
|
+
w.delta && (h = t.patch(h, w.delta));
|
|
588
588
|
}
|
|
589
|
-
return
|
|
589
|
+
return h;
|
|
590
590
|
}
|
|
591
591
|
function f() {
|
|
592
592
|
if (l.value) {
|
|
593
593
|
r.value--;
|
|
594
|
-
const
|
|
595
|
-
return
|
|
594
|
+
const y = i(r.value);
|
|
595
|
+
return y && (u.value = C(y)), y;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
if (
|
|
598
|
+
function p() {
|
|
599
|
+
if (a.value) {
|
|
600
600
|
r.value++;
|
|
601
|
-
const
|
|
602
|
-
return
|
|
601
|
+
const y = i(r.value);
|
|
602
|
+
return y && (u.value = C(y)), y;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
n.value = null,
|
|
605
|
+
function v() {
|
|
606
|
+
n.value = null, u.value = null, o.value = [], r.value = -1;
|
|
607
607
|
}
|
|
608
608
|
return {
|
|
609
609
|
push: c,
|
|
610
610
|
canUndo: l,
|
|
611
|
-
canRedo:
|
|
611
|
+
canRedo: a,
|
|
612
612
|
undo: f,
|
|
613
|
-
redo:
|
|
614
|
-
clear:
|
|
613
|
+
redo: p,
|
|
614
|
+
clear: v
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
|
-
const
|
|
617
|
+
const wt = {
|
|
618
618
|
async updateMenuModule(e, t) {
|
|
619
|
-
const n =
|
|
619
|
+
const n = B.RequestRunner.operation(t, e.modules);
|
|
620
620
|
if (n.validateError.length > 0)
|
|
621
621
|
throw new Error(n.validateError.join(`
|
|
622
622
|
`));
|
|
@@ -651,7 +651,7 @@ function fe() {
|
|
|
651
651
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function Mt() {
|
|
655
655
|
return {
|
|
656
656
|
restaurants: [],
|
|
657
657
|
menu: { ...fe(), _rev: "" },
|
|
@@ -664,21 +664,21 @@ function wt() {
|
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
const
|
|
667
|
+
const $t = Xe(
|
|
668
668
|
"mf-menu-store-v2",
|
|
669
669
|
() => {
|
|
670
|
-
const e =
|
|
670
|
+
const e = Qe(Mt()), t = se(), n = tt(), o = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
|
|
671
671
|
selector: "position"
|
|
672
672
|
}) : []), r = S(() => {
|
|
673
673
|
var s;
|
|
674
674
|
return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) || L.F_MENU_VERSION.v3;
|
|
675
|
-
}),
|
|
675
|
+
}), u = S(() => r.value === L.F_MENU_VERSION.v4), l = S(() => {
|
|
676
676
|
const s = e.menu.modules.catalog;
|
|
677
677
|
return x(s, { selector: "name" });
|
|
678
|
-
}),
|
|
678
|
+
}), a = S(() => {
|
|
679
679
|
var d;
|
|
680
680
|
let s = e.menu.modules.catalog.find(
|
|
681
|
-
(
|
|
681
|
+
(m) => m._id === e.currentCatalogId
|
|
682
682
|
);
|
|
683
683
|
return s && ((d = s.linkItemRules) != null && d.length) && (s = T.populateCatalog({
|
|
684
684
|
catalog: s,
|
|
@@ -686,20 +686,20 @@ const Pt = Xe(
|
|
|
686
686
|
items: e.menu.modules.item,
|
|
687
687
|
...e.currentRestaurantAttrParams ?? {}
|
|
688
688
|
})), s;
|
|
689
|
-
}), c = S(() => x(
|
|
689
|
+
}), c = S(() => x(p.value.modules.scheduler, { selector: "name" })), i = S(() => e.menu.modules.scheduler.find(
|
|
690
690
|
(s) => s._id === e.currentSchedulerId
|
|
691
691
|
));
|
|
692
692
|
function f(s, d = !0) {
|
|
693
|
-
e.menu = { ...s, _rev: e.menu._rev }, d &&
|
|
693
|
+
e.menu = { ...s, _rev: e.menu._rev }, d && D.push(e.menu);
|
|
694
694
|
}
|
|
695
|
-
const
|
|
696
|
-
async function
|
|
697
|
-
var
|
|
698
|
-
|
|
695
|
+
const p = j(fe()), v = G(!1), y = G(1);
|
|
696
|
+
async function h() {
|
|
697
|
+
var m;
|
|
698
|
+
v.value = !0;
|
|
699
699
|
let s = e.menu.modules.catalog;
|
|
700
|
-
if (
|
|
700
|
+
if (a.value && ((m = a.value.linkItemRules) != null && m.length)) {
|
|
701
701
|
const g = T.populateCatalog({
|
|
702
|
-
catalog:
|
|
702
|
+
catalog: a.value,
|
|
703
703
|
ruleGroupSettings: e.menu.ruleGroupSettings,
|
|
704
704
|
items: e.menu.modules.item,
|
|
705
705
|
...e.currentRestaurantAttrParams ?? {}
|
|
@@ -719,21 +719,21 @@ const Pt = Xe(
|
|
|
719
719
|
);
|
|
720
720
|
if (e.currentSchedulerId != null) {
|
|
721
721
|
const g = e.menu.modules.catalog.find(
|
|
722
|
-
(
|
|
722
|
+
(k) => k._id === e.currentCatalogId
|
|
723
723
|
), _ = g ? g.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
|
|
724
|
-
(
|
|
725
|
-
), A = new Set(((_ == null ? void 0 : _.items) || []).map((
|
|
726
|
-
d.modules.item = d.modules.item.filter((
|
|
724
|
+
(k) => k._id === e.currentSchedulerId
|
|
725
|
+
), A = new Set(((_ == null ? void 0 : _.items) || []).map((k) => k._id));
|
|
726
|
+
d.modules.item = d.modules.item.filter((k) => A.has(k._id));
|
|
727
727
|
}
|
|
728
|
-
return
|
|
728
|
+
return p.value = d, v.value = !1, y.value = y.value + 1, d;
|
|
729
729
|
}
|
|
730
|
-
const w = ie.debounce(
|
|
731
|
-
let I = null,
|
|
730
|
+
const w = ie.debounce(h, 200);
|
|
731
|
+
let I = null, E = null;
|
|
732
732
|
function Q() {
|
|
733
|
-
|
|
733
|
+
E && (E(), E = null), I && I.stop(), I = Ze(!0), E = I.run(() => et(
|
|
734
734
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
735
735
|
() => {
|
|
736
|
-
|
|
736
|
+
v.value || w();
|
|
737
737
|
}
|
|
738
738
|
)) || null;
|
|
739
739
|
}
|
|
@@ -748,7 +748,7 @@ const Pt = Xe(
|
|
|
748
748
|
value: s._id
|
|
749
749
|
}))
|
|
750
750
|
]), Z = S(() => {
|
|
751
|
-
const s =
|
|
751
|
+
const s = p.value.modules.category;
|
|
752
752
|
return [
|
|
753
753
|
...U.value.item.addon ? [
|
|
754
754
|
{
|
|
@@ -757,35 +757,35 @@ const Pt = Xe(
|
|
|
757
757
|
position: 0
|
|
758
758
|
}
|
|
759
759
|
] : [],
|
|
760
|
-
...
|
|
760
|
+
...V(s, (d) => d.name)
|
|
761
761
|
];
|
|
762
762
|
}), ve = S(() => {
|
|
763
|
-
const s =
|
|
764
|
-
return
|
|
763
|
+
const s = p.value.modules.subCategory || [];
|
|
764
|
+
return V(s, (d) => d.name);
|
|
765
765
|
}), ee = S(() => {
|
|
766
766
|
var d;
|
|
767
|
-
let s =
|
|
768
|
-
if (
|
|
769
|
-
const
|
|
767
|
+
let s = p.value.modules.item;
|
|
768
|
+
if (a.value) {
|
|
769
|
+
const m = (d = a.value) == null ? void 0 : d.override.items;
|
|
770
770
|
s = s.filter((g) => {
|
|
771
771
|
var A;
|
|
772
|
-
const _ = (A =
|
|
773
|
-
(
|
|
772
|
+
const _ = (A = m == null ? void 0 : m[g._id]) == null ? void 0 : A.find(
|
|
773
|
+
(k) => !k.combinationKey
|
|
774
774
|
);
|
|
775
|
-
return (_ == null ? void 0 : _.orderFrom) !==
|
|
775
|
+
return (_ == null ? void 0 : _.orderFrom) !== ue.F_ORDER_FROM.enum.NONE;
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
|
-
return
|
|
778
|
+
return V(s, (m) => m.code || m.name);
|
|
779
779
|
}), ye = S(() => {
|
|
780
|
-
const s = e.menu.modules.category, d =
|
|
780
|
+
const s = e.menu.modules.category, d = V(s, (g) => g.name).reduce(
|
|
781
781
|
(g, _, A) => (g[_._id] = A, g),
|
|
782
782
|
{ "": 0 }
|
|
783
|
-
),
|
|
784
|
-
return
|
|
785
|
-
|
|
783
|
+
), m = e.menu.modules.item;
|
|
784
|
+
return V(
|
|
785
|
+
m,
|
|
786
786
|
(g) => g.code || g.name
|
|
787
787
|
).reduce((g, _, A) => (g[_._id] = A + d[_.category || ""], g), {});
|
|
788
|
-
}),
|
|
788
|
+
}), pe = S(() => oe(N.value, Z.value, ee.value)), he = S(() => {
|
|
789
789
|
const s = U.value.item.addon ? [
|
|
790
790
|
{
|
|
791
791
|
_id: e.currentCatalogId ? "" : null,
|
|
@@ -800,56 +800,64 @@ const Pt = Xe(
|
|
|
800
800
|
e.menu.modules.item
|
|
801
801
|
);
|
|
802
802
|
}), N = S(() => {
|
|
803
|
-
const s =
|
|
803
|
+
const s = p.value.modules.variant;
|
|
804
804
|
return x(s, { selector: "name" });
|
|
805
805
|
});
|
|
806
806
|
function ge(s = []) {
|
|
807
807
|
const d = s.map((g) => N.value.find((_) => _._id === g)).filter((g) => !!g);
|
|
808
808
|
return T.fullVariantCombination(d).reduce((g, _) => (g[_.combinationKey] = _.selectionName.join(" / "), g), {});
|
|
809
809
|
}
|
|
810
|
-
const _e = S(() =>
|
|
810
|
+
const _e = S(() => V(p.value.modules.group, (s) => s.name)), Se = S(() => x(p.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
|
|
811
811
|
selector: "name"
|
|
812
|
-
})), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(
|
|
812
|
+
})), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(qe(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
813
813
|
selector: "name"
|
|
814
814
|
})), Ae = S(() => e.menu.modules.cookingGuide), Ce = S(() => {
|
|
815
|
-
const s =
|
|
815
|
+
const s = ze(e.menu.modules.sku);
|
|
816
816
|
return x(s, { selector: "code" });
|
|
817
|
+
}), Ie = S(() => {
|
|
818
|
+
const s = /* @__PURE__ */ new Map();
|
|
819
|
+
return e.menu.modules.item.forEach((d) => {
|
|
820
|
+
var m, g;
|
|
821
|
+
d.code && s.set(d.code, (s.get(d.code) || 0) + 1), (g = (m = d.variant) == null ? void 0 : m.variantCombinations) == null || g.forEach((_) => {
|
|
822
|
+
_.code && s.set(_.code, (s.get(_.code) || 0) + 1);
|
|
823
|
+
});
|
|
824
|
+
}), s;
|
|
817
825
|
}), U = S(() => {
|
|
818
|
-
const s = !e.currentCatalogId, d = r.value === L.F_MENU_VERSION.v4,
|
|
819
|
-
create: s &&
|
|
820
|
-
edit: s &&
|
|
821
|
-
delete: s &&
|
|
826
|
+
const s = !e.currentCatalogId, d = r.value === L.F_MENU_VERSION.v4, m = !e.currentSchedulerId, g = {
|
|
827
|
+
create: s && m,
|
|
828
|
+
edit: s && m,
|
|
829
|
+
delete: s && m
|
|
822
830
|
};
|
|
823
831
|
return {
|
|
824
832
|
item: {
|
|
825
833
|
...g,
|
|
826
|
-
edit: d ||
|
|
827
|
-
sort: d && s &&
|
|
834
|
+
edit: d || m,
|
|
835
|
+
sort: d && s && m,
|
|
828
836
|
addon: d,
|
|
829
|
-
code:
|
|
830
|
-
name: s &&
|
|
831
|
-
description: s &&
|
|
832
|
-
category:
|
|
833
|
-
thumbnail: s &&
|
|
834
|
-
orderFrom: (d || s) &&
|
|
837
|
+
code: m,
|
|
838
|
+
name: s && m,
|
|
839
|
+
description: s && m,
|
|
840
|
+
category: m,
|
|
841
|
+
thumbnail: s && m,
|
|
842
|
+
orderFrom: (d || s) && m,
|
|
835
843
|
orderFromNone: s,
|
|
836
844
|
orderFromActiveOnly: !d,
|
|
837
|
-
openPrice: s &&
|
|
838
|
-
unit: s &&
|
|
845
|
+
openPrice: s && m,
|
|
846
|
+
unit: s && m,
|
|
839
847
|
price: s,
|
|
840
848
|
editPrice: s,
|
|
841
|
-
minPrice: d &&
|
|
842
|
-
costing: d && s &&
|
|
843
|
-
tax: s &&
|
|
844
|
-
variant: s &&
|
|
849
|
+
minPrice: d && m,
|
|
850
|
+
costing: d && s && m,
|
|
851
|
+
tax: s && m,
|
|
852
|
+
variant: s && m,
|
|
845
853
|
maxVariant: d ? 4 : 2,
|
|
846
|
-
group: s &&
|
|
847
|
-
overrideProductGroup: d &&
|
|
848
|
-
inventory: (d || s) &&
|
|
854
|
+
group: s && m,
|
|
855
|
+
overrideProductGroup: d && m,
|
|
856
|
+
inventory: (d || s) && m,
|
|
849
857
|
bindToVariant: d,
|
|
850
|
-
print: s &&
|
|
851
|
-
toRoot: d &&
|
|
852
|
-
takeaway: (_) => !!_ && (d || s) &&
|
|
858
|
+
print: s && m,
|
|
859
|
+
toRoot: d && m,
|
|
860
|
+
takeaway: (_) => !!_ && (d || s) && m,
|
|
853
861
|
multiScheduler: d,
|
|
854
862
|
canRearrange: d,
|
|
855
863
|
printConfig: d
|
|
@@ -861,10 +869,10 @@ const Pt = Xe(
|
|
|
861
869
|
},
|
|
862
870
|
group: {
|
|
863
871
|
...g,
|
|
864
|
-
edit: d ||
|
|
872
|
+
edit: d || m,
|
|
865
873
|
sort: s,
|
|
866
874
|
applyProduct: s,
|
|
867
|
-
showAppliedProduct:
|
|
875
|
+
showAppliedProduct: m,
|
|
868
876
|
type: !d,
|
|
869
877
|
insertRawItems: !d,
|
|
870
878
|
multiScheduler: d
|
|
@@ -874,7 +882,7 @@ const Pt = Xe(
|
|
|
874
882
|
},
|
|
875
883
|
takeaway: {
|
|
876
884
|
...g,
|
|
877
|
-
edit: (d || s) &&
|
|
885
|
+
edit: (d || s) && m,
|
|
878
886
|
name: s
|
|
879
887
|
},
|
|
880
888
|
catalog: {
|
|
@@ -887,33 +895,33 @@ const Pt = Xe(
|
|
|
887
895
|
function W(s) {
|
|
888
896
|
return `${s.systemCode}/${s.taxCode}`;
|
|
889
897
|
}
|
|
890
|
-
function
|
|
891
|
-
const [d,
|
|
892
|
-
return { systemCode: d, taxCode:
|
|
898
|
+
function Ee(s) {
|
|
899
|
+
const [d, m] = s.split("/");
|
|
900
|
+
return { systemCode: d, taxCode: m };
|
|
893
901
|
}
|
|
894
|
-
function
|
|
895
|
-
return (s ?? d ?? []).map((g) => W(g)).find((g) =>
|
|
902
|
+
function Re(s, d, m) {
|
|
903
|
+
return (s ?? d ?? []).map((g) => W(g)).find((g) => m.some((_) => _.value === g));
|
|
896
904
|
}
|
|
897
|
-
const
|
|
905
|
+
const ke = S(() => {
|
|
898
906
|
var g;
|
|
899
|
-
const s = ["SV5", "SV10"], d =
|
|
907
|
+
const s = ["SV5", "SV10"], d = Be.Country.getCountryFlattenTaxes(
|
|
900
908
|
se().currentCountry.value
|
|
901
|
-
),
|
|
909
|
+
), m = d.filter((_) => u.value || !s.includes(_.taxCode)).map((_) => ({
|
|
902
910
|
label: `${_.name} (${Ge(_.rate)}%)`,
|
|
903
911
|
value: W(_),
|
|
904
912
|
meta: {
|
|
905
913
|
rate: _.rate
|
|
906
914
|
}
|
|
907
915
|
}));
|
|
908
|
-
return
|
|
916
|
+
return m.sort((_, A) => _.label.localeCompare(A.label, void 0, { numeric: !0 })), {
|
|
909
917
|
systemCode: (g = d[0]) == null ? void 0 : g.systemCode,
|
|
910
|
-
countryTaxOptions:
|
|
918
|
+
countryTaxOptions: m
|
|
911
919
|
};
|
|
912
|
-
}),
|
|
913
|
-
const s = await
|
|
920
|
+
}), xe = async () => {
|
|
921
|
+
const s = await Ye.readMenu();
|
|
914
922
|
e.menu = s ?? e.menu, te(null);
|
|
915
|
-
},
|
|
916
|
-
const { fetchAllRestaurants: s } =
|
|
923
|
+
}, Oe = async () => {
|
|
924
|
+
const { fetchAllRestaurants: s } = Je();
|
|
917
925
|
await s({
|
|
918
926
|
onBatchEnd: (d) => {
|
|
919
927
|
e.restaurants = d;
|
|
@@ -921,28 +929,28 @@ const Pt = Xe(
|
|
|
921
929
|
});
|
|
922
930
|
}, te = (s) => {
|
|
923
931
|
e.currentCatalogId = s;
|
|
924
|
-
},
|
|
932
|
+
}, De = (s) => {
|
|
925
933
|
e.currentSchedulerId = s;
|
|
926
934
|
}, Ve = (s) => {
|
|
927
935
|
e.currentCategoryIds = s;
|
|
928
|
-
},
|
|
936
|
+
}, Te = (s) => {
|
|
929
937
|
e.currentRestaurantAttrParams = s;
|
|
930
|
-
},
|
|
931
|
-
const
|
|
932
|
-
if (!
|
|
933
|
-
const g =
|
|
938
|
+
}, Pe = async (s, d) => {
|
|
939
|
+
const m = Array.isArray(s) ? s : [s];
|
|
940
|
+
if (!m.length) return;
|
|
941
|
+
const g = m.map((_) => ({
|
|
934
942
|
..._,
|
|
935
943
|
_id: e.menu._id,
|
|
936
944
|
_rev: e.menu._rev
|
|
937
945
|
}));
|
|
938
946
|
try {
|
|
939
947
|
if (d || g.some(
|
|
940
|
-
(A) => [
|
|
948
|
+
(A) => [B.F_OPERATION_TYPE.delete, B.F_OPERATION_TYPE.deleteMany].includes(A.operation)
|
|
941
949
|
)) {
|
|
942
950
|
const A = await He(g, e.menu.modules);
|
|
943
951
|
if (A !== !0) throw new Error(A);
|
|
944
952
|
}
|
|
945
|
-
const _ = await
|
|
953
|
+
const _ = await wt.updateMenuModule(e.menu, g);
|
|
946
954
|
return f(_.menu), _;
|
|
947
955
|
} catch (_) {
|
|
948
956
|
n.open({
|
|
@@ -959,28 +967,28 @@ const Pt = Xe(
|
|
|
959
967
|
priceTierSettings: s.priceTierSettings
|
|
960
968
|
};
|
|
961
969
|
return f(d), d;
|
|
962
|
-
},
|
|
963
|
-
const s =
|
|
964
|
-
s && f(s, !1);
|
|
965
|
-
}, je = () => {
|
|
966
|
-
const s = V.redo();
|
|
970
|
+
}, D = bt({ maxHistorySize: 50 }), Ke = S(() => D.canUndo.value), $e = S(() => D.canRedo.value), je = () => {
|
|
971
|
+
const s = D.undo();
|
|
967
972
|
s && f(s, !1);
|
|
968
973
|
}, Ne = () => {
|
|
969
|
-
|
|
974
|
+
const s = D.redo();
|
|
975
|
+
s && f(s, !1);
|
|
976
|
+
}, Ue = () => {
|
|
977
|
+
D.clear();
|
|
970
978
|
};
|
|
971
979
|
return {
|
|
972
980
|
state: e,
|
|
973
981
|
// loading state
|
|
974
|
-
workerIsComputing:
|
|
975
|
-
mergedMenuChangeId:
|
|
982
|
+
workerIsComputing: v,
|
|
983
|
+
mergedMenuChangeId: y,
|
|
976
984
|
// async computed state
|
|
977
|
-
mergedMenu:
|
|
985
|
+
mergedMenu: p,
|
|
978
986
|
// Computed
|
|
979
987
|
version: r,
|
|
980
|
-
isV4:
|
|
988
|
+
isV4: u,
|
|
981
989
|
serveSequence: o,
|
|
982
990
|
catalogs: l,
|
|
983
|
-
currentCatalog:
|
|
991
|
+
currentCatalog: a,
|
|
984
992
|
schedulers: c,
|
|
985
993
|
currentScheduler: i,
|
|
986
994
|
catalogOptions: me,
|
|
@@ -988,8 +996,9 @@ const Pt = Xe(
|
|
|
988
996
|
subcategories: ve,
|
|
989
997
|
items: ee,
|
|
990
998
|
sortedItems: ye,
|
|
991
|
-
|
|
992
|
-
|
|
999
|
+
itemCodeMap: Ie,
|
|
1000
|
+
categorizedItems: pe,
|
|
1001
|
+
categorizedRawMenuItems: he,
|
|
993
1002
|
variants: N,
|
|
994
1003
|
groups: _e,
|
|
995
1004
|
takeaways: Se,
|
|
@@ -999,31 +1008,31 @@ const Pt = Xe(
|
|
|
999
1008
|
cookingGuide: Ae,
|
|
1000
1009
|
skus: Ce,
|
|
1001
1010
|
rules: U,
|
|
1002
|
-
taxSetting:
|
|
1011
|
+
taxSetting: ke,
|
|
1003
1012
|
// Action
|
|
1004
1013
|
setMenu: f,
|
|
1005
|
-
readMenu:
|
|
1006
|
-
readRestaurants:
|
|
1014
|
+
readMenu: xe,
|
|
1015
|
+
readRestaurants: Oe,
|
|
1007
1016
|
selectCatalog: te,
|
|
1008
|
-
selectScheduler:
|
|
1017
|
+
selectScheduler: De,
|
|
1009
1018
|
selectCategory: Ve,
|
|
1010
|
-
setRestaurantAttrParams:
|
|
1011
|
-
updateMenu:
|
|
1019
|
+
setRestaurantAttrParams: Te,
|
|
1020
|
+
updateMenu: Pe,
|
|
1012
1021
|
updateMenuSetting: Fe,
|
|
1013
|
-
computeMergedMenu:
|
|
1022
|
+
computeMergedMenu: h,
|
|
1014
1023
|
// helper
|
|
1015
1024
|
encodeTax: W,
|
|
1016
|
-
decodeTax:
|
|
1017
|
-
getSelectedTax:
|
|
1025
|
+
decodeTax: Ee,
|
|
1026
|
+
getSelectedTax: Re,
|
|
1018
1027
|
mapVariant: ge,
|
|
1019
1028
|
// history
|
|
1020
1029
|
canUndoHistory: Ke,
|
|
1021
|
-
canRedoHistory:
|
|
1022
|
-
undoHistory:
|
|
1023
|
-
redoHistory:
|
|
1030
|
+
canRedoHistory: $e,
|
|
1031
|
+
undoHistory: je,
|
|
1032
|
+
redoHistory: Ne,
|
|
1024
1033
|
// cleanup
|
|
1025
1034
|
$dispose: () => {
|
|
1026
|
-
w.cancel(),
|
|
1035
|
+
w.cancel(), E && (E(), E = null), I && (I.stop(), I = null), Ue();
|
|
1027
1036
|
},
|
|
1028
1037
|
$reinitialize: () => {
|
|
1029
1038
|
Q();
|
|
@@ -1032,12 +1041,12 @@ const Pt = Xe(
|
|
|
1032
1041
|
}
|
|
1033
1042
|
);
|
|
1034
1043
|
export {
|
|
1035
|
-
|
|
1036
|
-
|
|
1044
|
+
Tt as a,
|
|
1045
|
+
Pt as b,
|
|
1037
1046
|
Ft as c,
|
|
1038
1047
|
Kt as f,
|
|
1039
1048
|
Vt as g,
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1049
|
+
Dt as m,
|
|
1050
|
+
it as o,
|
|
1051
|
+
$t as u
|
|
1043
1052
|
};
|