@feedmepos/mf-menu 0.32.72 → 0.32.73
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-BqlWMfMd.js → App-Bf03MA88.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CGm_HCN-.js → ApplyProduct.vue_vue_type_script_setup_true_lang-B1ZOcPu1.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-DKwW-KuQ.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-D0L3H0ZG.js} +3 -3
- package/dist/{Catalog-DmSqkb83.js → Catalog-HrQFd5Gf.js} +6 -6
- package/dist/{Category-Dlj54Cvf.js → Category-8yNR-X1A.js} +4 -4
- package/dist/{Category-BViqkFeL.js → Category-FZsqkjjv.js} +4 -4
- package/dist/{CookingGuide-CTy27R3R.js → CookingGuide-DZ5w_9EC.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DnkFD9Qo.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DVlMrpkQ.js} +1 -1
- package/dist/{Group-CCHCA3-l.js → Group-CJm6hCWe.js} +3 -3
- package/dist/{Group-B_XL8419.js → Group-fJGTsqFa.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-D4UZ_9r_.js → Group.vue_vue_type_script_setup_true_lang-D0yWF7Xc.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Hq-gI8hs.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-K1e0N-Ww.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CMNiLTsy.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DxoxvqVs.js} +212 -212
- package/dist/{Ingredient-BKMpffiK.js → Ingredient-D0e2BNgG.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-B-A8Yae3.js → InventoryBinding.vue_vue_type_script_setup_true_lang-SvzuFZGG.js} +2 -2
- package/dist/{LinkProductSideSheet-C0OwARv3.js → LinkProductSideSheet-C5AKJHx9.js} +4 -4
- package/dist/{MenuSetting-t2SC98j8.js → MenuSetting-CkdHN5ky.js} +7 -7
- package/dist/{OrderPacing-BeOxlK5N.js → OrderPacing-AlI0t99w.js} +5 -5
- package/dist/{PrintRoute-BehVCEKW.js → PrintRoute-S7to_Ja9.js} +5 -5
- package/dist/{Product-JhmPZPy5.js → Product-D3YceYkb.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CaIdoW_3.js → Product.vue_vue_type_script_setup_true_lang-CdP5nFLm.js} +14 -14
- package/dist/{ProductInternalTools-BaOhffU-.js → ProductInternalTools-BXGilY2C.js} +6 -6
- package/dist/{Products-BEL7jDXA.js → Products-CcJUkcRW.js} +32 -32
- package/dist/{Publish-0paPWlI9.js → Publish-CKGNpAx3.js} +4 -4
- package/dist/{Recipe-C2EDxRF-.js → Recipe-mk8oA9m_.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BpGAz8tp.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-N3Un25EZ.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DP2Sx5Ik.js → RuleView.vue_vue_type_script_setup_true_lang-ozbcoSez.js} +362 -362
- package/dist/{Scheduler-Q5uM5gxh.js → Scheduler-DAM09LOX.js} +3 -3
- package/dist/{ServingSequence-T4C9GPzV.js → ServingSequence-CncpkznR.js} +3 -3
- package/dist/{Setting-Ck9fOSnA.js → Setting-ClaalU9t.js} +5 -5
- package/dist/{Subcategory-DA9P_jgR.js → Subcategory-BHAMGtWj.js} +6 -6
- package/dist/{Takeaway-BWHTHlyY.js → Takeaway-C8Xefobp.js} +1 -1
- package/dist/{Takeaway-BhBwxuQ1.js → Takeaway-DmS8tBJz.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CoW3ltrF.js → Takeaway.vue_vue_type_script_setup_true_lang-C8gPc9nk.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-B_NVIotA.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-BDmNmWb0.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DKAvaKvf.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CsxJPE5r.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-KLajCLq6.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Cf3Qcm8Q.js} +15 -15
- package/dist/{Unit-Cn8MfZ3t.js → Unit-Cd3vO-wC.js} +2 -2
- package/dist/{Variant-D8YObOjv.js → Variant-DBCavafw.js} +3 -3
- package/dist/{_id_-D3xdoF7g.js → _id_-DCQdbN9V.js} +10 -10
- package/dist/{app-DW6oW0Ma.js → app-CxvpA6tG.js} +57 -57
- package/dist/{app-CytlajzP.js → app-aZW57BZg.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/media.d.ts +11 -5
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +5 -15
- package/dist/assets/{linked-status-6NCMYr9j.js → linked-status-CTYst9BT.js} +2 -2
- package/dist/assets/{menu-export-B0G2UoQu.js → menu-export-SUAOyYoh.js} +34 -34
- package/dist/assets/{override-menu-BLTWWMwC.js → override-menu-_2UkxFjy.js} +2 -2
- package/dist/assets/{validate-menu-Bw1SjjTD.js → validate-menu-C4p2Q0tV.js} +2 -2
- package/dist/{catalog-D-eYUu3U.js → catalog-B28_brHj.js} +1 -1
- package/dist/{catalogSetting-DTuat7sH.js → catalogSetting-Cejyk6uH.js} +1 -1
- package/dist/{currency-Dj_Wt0Hv.js → currency-wNkc4Z0A.js} +1 -1
- package/dist/{dayjs.min-DEj15U1R.js → dayjs.min-Dlgh8coL.js} +2 -2
- package/dist/{discardConfirm-D8fV6Aag.js → discardConfirm-BbGmy3co.js} +1 -1
- package/dist/{index-DM0Bzsz_.js → index-0kpQfvHB.js} +1 -1
- package/dist/{index-Kuoa82jl.js → index-Cy8hTieX.js} +6 -6
- package/dist/{index--oIuzXeT.js → index-eQIHkX_i.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-COHdIM2S.js → index.vue_vue_type_script_setup_true_lang-Dn7y0J8m.js} +451 -445
- package/dist/{item-DY5crb6D.js → item-Pl488uTh.js} +679 -682
- package/dist/{jszip.min-BZ1Z78MP.js → jszip.min-CUmSTnh2.js} +3 -3
- package/dist/{linkProducts-96XgmBUL.js → linkProducts-BpMibpzz.js} +4 -4
- package/dist/{memberPricing-WDnr_fBu.js → memberPricing-DVBTtTAw.js} +1 -1
- package/dist/{menu-xKq7gpBv.js → menu-CLJze7N5.js} +1 -1
- package/dist/{menuV2-y6RgekH4.js → menuV2-CRioXM-a.js} +39 -39
- package/dist/{order_pacing-5FfwO1W8.js → order_pacing-tdC-Swwv.js} +5 -5
- package/dist/packages/shared/src/components/form/ImageDropField.vue.d.ts +5 -0
- package/dist/{priceTier-C-qqjKEP.js → priceTier-nCiHkoUd.js} +1 -1
- package/dist/{rules-BUN28pvZ.js → rules-B33FYEnp.js} +3 -3
- package/dist/{scheduler-CHwF5zGU.js → scheduler-BbZ2-af3.js} +5 -5
- package/dist/{toExcel-Doi2nxOH.js → toExcel-mFDQ3bjo.js} +2 -2
- package/dist/{unit-BnAly_uA.js → unit-DNJ6h92K.js} +3 -3
- package/package.json +2 -2
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { defineStore as Qi } from "pinia";
|
|
2
|
-
import { defineComponent as ye, resolveComponent as U, createElementBlock as q, createBlock as ee, openBlock as y, createElementVNode as _, createVNode as h, toDisplayString as oe, Fragment as Ce, renderList as Ie, h as Ue, ref as W, computed as R, watch as Ae, unref as m, renderSlot as $e, withCtx as M, createCommentVNode as te, Transition as hr, normalizeClass as Ge, resolveDynamicComponent as xn, withDirectives as qe, vShow as Vn, mergeProps as Ji, withModifiers as it, normalizeStyle as
|
|
3
|
-
import { W as kr, X as Cr, g as Ne, h as Be, k as Pe, U as Sr, Y as xr, s as ta, d as Te, m as st, j as Re, a as Ze, n as Ar, u as De, b as ut, i as ft, Z as
|
|
2
|
+
import { defineComponent as ye, resolveComponent as U, createElementBlock as q, createBlock as ee, openBlock as y, createElementVNode as _, createVNode as h, toDisplayString as oe, Fragment as Ce, renderList as Ie, h as Ue, ref as W, computed as R, watch as Ae, unref as m, renderSlot as $e, withCtx as M, createCommentVNode as te, Transition as hr, normalizeClass as Ge, resolveDynamicComponent as xn, withDirectives as qe, vShow as Vn, mergeProps as Ji, withModifiers as it, normalizeStyle as fo, onBeforeUnmount as Mo, resolveDirective as Vt, onMounted as Gt, onUnmounted as Uo, createTextVNode as Wt, getCurrentInstance as zo, render as An, useSlots as gr, markRaw as vr, mergeModels as ai, useModel as br, isVNode as yr, nextTick as ea, normalizeProps as _r, guardReactiveProps as wr } from "vue";
|
|
3
|
+
import { W as kr, X as Cr, g as Ne, h as Be, k as Pe, U as Sr, Y as xr, s as ta, d as Te, m as st, j as Re, a as Ze, n as Ar, u as De, b as ut, i as ft, Z as ri, $ as Tr, a0 as si, a1 as Kn, a2 as na, a3 as ho, x as go, a4 as Rr, a5 as Ir, a6 as li, a7 as qn, a8 as Ot, a9 as Er, aa as Or, ab as ui, ac as $r, ad as Dr, ae as ci, af as Pr, ag as Fr, ah as Vr, ai as Mr, aj as Ur, ak as di, al as mi, am as zr, t as oa, an as Nr, F as It, y as pi, r as Br, o as Lr, l as jr, I as Yn, ao as Gr, R as Wr, w as fi, v as Hr, ap as Kr } from "./index.vue_vue_type_script_setup_true_lang-Dn7y0J8m.js";
|
|
4
4
|
import { useI18n as ke, useCoreStore as zt, CustomAttributesForm as ia } from "@feedmepos/mf-common";
|
|
5
5
|
import { useDialog as nt, useSnackbar as Je, useDialogChild as Nt, FmButtonVariant as ze, components as Oe, FmButtonColorThemeVariant as ot, useBreakpoints as aa } from "@feedmepos/ui-library";
|
|
6
|
-
import { g as Tn, f as tn, e as qr, i as Yr, s as
|
|
7
|
-
import { C as vt } from "./catalog-
|
|
8
|
-
import { g as
|
|
6
|
+
import { g as Tn, f as tn, e as qr, i as Yr, s as vo, F as Xr, _ as Zr, a as Qr } from "./index-0kpQfvHB.js";
|
|
7
|
+
import { C as vt } from "./catalog-B28_brHj.js";
|
|
8
|
+
import { g as bo, a as Jr, m as es, i as ts } from "./menuV2-CRioXM-a.js";
|
|
9
9
|
import { c as ra } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
10
|
-
import { a as
|
|
11
|
-
import { H as ns, L as os } from "./LinkProductSideSheet-
|
|
12
|
-
import { _ as Ye, u as is, a as as } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import { e as rs } from "./app-
|
|
14
|
-
import { l as Fe, u as Xt } from "./discardConfirm-
|
|
10
|
+
import { a as hi, _ as Ht } from "./tooltip-B5BiPMx9.js";
|
|
11
|
+
import { H as ns, L as os } from "./LinkProductSideSheet-C5AKJHx9.js";
|
|
12
|
+
import { _ as Ye, u as is, a as as } from "./RuleView.vue_vue_type_script_setup_true_lang-ozbcoSez.js";
|
|
13
|
+
import { e as rs } from "./app-CxvpA6tG.js";
|
|
14
|
+
import { l as Fe, u as Xt } from "./discardConfirm-BbGmy3co.js";
|
|
15
15
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
import { useAppStore as mn, RemyButton as Rn } from "@feedmepos/mf-remy-panel";
|
|
17
17
|
import { _ as _t } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
18
|
-
import { u as ss, r as ls } from "./rules-
|
|
19
|
-
import { _ as sa, a as In, b as En, c as On } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-
|
|
20
|
-
import { a as
|
|
18
|
+
import { u as ss, r as ls } from "./rules-B33FYEnp.js";
|
|
19
|
+
import { _ as sa, a as In, b as En, c as On } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-BDmNmWb0.js";
|
|
20
|
+
import { a as yo, g as At } from "./translation-fNx6yEpy.js";
|
|
21
21
|
import { c as $n } from "./object-DVUNCr7w.js";
|
|
22
|
-
import { _ as
|
|
23
|
-
import { u as us } from "./menu-
|
|
22
|
+
import { _ as No } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-CsxJPE5r.js";
|
|
23
|
+
import { u as us } from "./menu-CLJze7N5.js";
|
|
24
24
|
import { c as Bt } from "./check-C9mY6LiX.js";
|
|
25
|
-
import { _ as yt, l as
|
|
25
|
+
import { _ as yt, l as _o, T as cs } from "./index-Cy8hTieX.js";
|
|
26
26
|
import { useInventoryStore as la, InventoryBindingForm as ds, InventoryBindingSummary as ms } from "@feedmepos/mf-inventory-portal";
|
|
27
|
-
import { f as lt } from "./currency-
|
|
28
|
-
import { u as Mn } from "./memberPricing-
|
|
29
|
-
import { u as ua } from "./priceTier-
|
|
27
|
+
import { f as lt } from "./currency-wNkc4Z0A.js";
|
|
28
|
+
import { u as Mn } from "./memberPricing-DVBTtTAw.js";
|
|
29
|
+
import { u as ua } from "./priceTier-nCiHkoUd.js";
|
|
30
30
|
import { u as ps } from "./search-BAPEUu1R.js";
|
|
31
31
|
import { c as fs } from "./string-DpfFixWH.js";
|
|
32
32
|
import { d as ca } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
33
|
-
import { _ as hs } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
34
|
-
import { u as gs, a as vs } from "./order_pacing-
|
|
35
|
-
import { V as
|
|
33
|
+
import { _ as hs } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-B1ZOcPu1.js";
|
|
34
|
+
import { u as gs, a as vs } from "./order_pacing-tdC-Swwv.js";
|
|
35
|
+
import { V as gi } from "./index-eQIHkX_i.js";
|
|
36
36
|
var Xn, fn, Zn = 0, Qn = 0;
|
|
37
37
|
function bs(e, t, n) {
|
|
38
38
|
var o = 0, i = new Array(16);
|
|
@@ -433,17 +433,17 @@ class ma {
|
|
|
433
433
|
($) => $.combinationKey === g.combinationKey
|
|
434
434
|
),
|
|
435
435
|
name: Ar(De().variants, ((G = k == null ? void 0 : k.variant) == null ? void 0 : G.variantGroupIds) || [])[g.combinationKey]
|
|
436
|
-
} : k, v = (H = a.find(($) => $._id === u._id)) == null ? void 0 : H.items.find(($) => $._id === g._id && $.combinationKey === g.combinationKey),
|
|
436
|
+
} : k, v = (H = a.find(($) => $._id === u._id)) == null ? void 0 : H.items.find(($) => $._id === g._id && $.combinationKey === g.combinationKey), T = !n && !g.combinationKey, S = (w = d.find(
|
|
437
437
|
($) => $._id == g._id && $.combinationKey == g.combinationKey
|
|
438
|
-
)) == null ? void 0 : w.price, j = l ? null : b == null ? void 0 : b.name, I = g.name || (v == null ? void 0 : v.name) || j || null,
|
|
438
|
+
)) == null ? void 0 : w.price, j = l ? null : b == null ? void 0 : b.name, I = g.name || (v == null ? void 0 : v.name) || j || null, A = (b == null ? void 0 : b.name) || null, x = g.name_locale ?? (v == null ? void 0 : v.name_locale) ?? (b == null ? void 0 : b.name_locale) ?? null, z = {
|
|
439
439
|
...g,
|
|
440
440
|
name: I,
|
|
441
|
-
name_locale:
|
|
441
|
+
name_locale: x,
|
|
442
442
|
code: b == null ? void 0 : b.code,
|
|
443
|
-
fallbackName:
|
|
443
|
+
fallbackName: T ? A : I,
|
|
444
444
|
price: g.price,
|
|
445
445
|
price_variant: g.price_variant,
|
|
446
|
-
fallbackPrice:
|
|
446
|
+
fallbackPrice: T ? null : S,
|
|
447
447
|
orderFrom: g.orderFrom,
|
|
448
448
|
fallbackOrder: b == null ? void 0 : b.orderFrom,
|
|
449
449
|
priceTiers: g.priceTiers,
|
|
@@ -563,7 +563,7 @@ function ws(e, t) {
|
|
|
563
563
|
const ks = {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
|
|
566
|
-
}, Cs = { class: "fm-typo-en-title-sm-600" },
|
|
566
|
+
}, Cs = { class: "fm-typo-en-title-sm-600" }, vi = /* @__PURE__ */ ye({
|
|
567
567
|
__name: "Summary",
|
|
568
568
|
props: {
|
|
569
569
|
title: {},
|
|
@@ -577,7 +577,7 @@ const ks = {
|
|
|
577
577
|
title: t.title,
|
|
578
578
|
contentComponent: Ue("div", { class: "space-y-4" }, [
|
|
579
579
|
...t.items.map(
|
|
580
|
-
(i) => Ue(
|
|
580
|
+
(i) => Ue(hi, {
|
|
581
581
|
name: i.name,
|
|
582
582
|
value: i.value || "--"
|
|
583
583
|
})
|
|
@@ -590,7 +590,7 @@ const ks = {
|
|
|
590
590
|
return t.variant === "full" ? (y(), q("div", ks, [
|
|
591
591
|
_("div", Cs, oe(i.title), 1),
|
|
592
592
|
h(ns),
|
|
593
|
-
(y(!0), q(Ce, null, Ie(i.items, (l) => (y(), ee(
|
|
593
|
+
(y(!0), q(Ce, null, Ie(i.items, (l) => (y(), ee(hi, {
|
|
594
594
|
key: l.name,
|
|
595
595
|
name: l.name,
|
|
596
596
|
value: l.value || "--"
|
|
@@ -726,7 +726,7 @@ const ks = {
|
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
728
|
}), $t = /* @__PURE__ */ kt(Ms, [["__scopeId", "data-v-e920f110"]]);
|
|
729
|
-
function
|
|
729
|
+
function bi(e, t) {
|
|
730
730
|
var r;
|
|
731
731
|
const n = e == null ? void 0 : e.replace(/[^a-zA-Z0-9]/g, "_"), i = (r = zt().currentBusiness.value) == null ? void 0 : r.id;
|
|
732
732
|
if (!i) throw new Error("Invalid businessId");
|
|
@@ -902,7 +902,7 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
902
902
|
r.value = [k];
|
|
903
903
|
else {
|
|
904
904
|
const v = r.value.filter(
|
|
905
|
-
(
|
|
905
|
+
(T) => T.value !== "" && T.value !== null
|
|
906
906
|
);
|
|
907
907
|
r.value = [...v, k];
|
|
908
908
|
}
|
|
@@ -935,7 +935,7 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
935
935
|
return t({
|
|
936
936
|
hideMenu: u
|
|
937
937
|
}), (g, k) => {
|
|
938
|
-
const b = U("FmIcon"), v = U("FmField"),
|
|
938
|
+
const b = U("FmIcon"), v = U("FmField"), T = U("FmMenuItem"), S = U("FmMenu"), j = U("FmFormGroup"), I = U("FmChipGroup");
|
|
939
939
|
return y(), q("div", Js, [
|
|
940
940
|
h(j, {
|
|
941
941
|
"model-value": g.modelValue,
|
|
@@ -945,19 +945,19 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
945
945
|
"helper-text": g.helperText,
|
|
946
946
|
rules: g.rules
|
|
947
947
|
}, {
|
|
948
|
-
default: M(({ invalid:
|
|
948
|
+
default: M(({ invalid: A }) => [
|
|
949
949
|
h(S, {
|
|
950
950
|
disabled: g.disabled,
|
|
951
951
|
ref_key: "fmMenuRef",
|
|
952
952
|
ref: a,
|
|
953
953
|
"close-on-click": !1,
|
|
954
|
-
onMenuChanged: k[0] || (k[0] = (
|
|
954
|
+
onMenuChanged: k[0] || (k[0] = (x) => c.value = x)
|
|
955
955
|
}, {
|
|
956
956
|
"menu-button": M(() => [
|
|
957
957
|
h(v, {
|
|
958
958
|
class: Ge(g.disabled ? "cursor-not-allowed" : "cursor-pointer"),
|
|
959
959
|
focused: c.value,
|
|
960
|
-
invalid:
|
|
960
|
+
invalid: A
|
|
961
961
|
}, {
|
|
962
962
|
append: M(() => [
|
|
963
963
|
h(b, {
|
|
@@ -978,13 +978,13 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
978
978
|
]),
|
|
979
979
|
default: M(() => [
|
|
980
980
|
_("div", el, [
|
|
981
|
-
(y(!0), q(Ce, null, Ie(g.items, (
|
|
982
|
-
key:
|
|
983
|
-
disabled:
|
|
981
|
+
(y(!0), q(Ce, null, Ie(g.items, (x) => (y(), ee(T, {
|
|
982
|
+
key: x.value,
|
|
983
|
+
disabled: x.disabled,
|
|
984
984
|
"has-checkbox": !0,
|
|
985
|
-
label:
|
|
986
|
-
"model-value": r.value.some((z) => z.value ===
|
|
987
|
-
"onUpdate:modelValue": (z) => l(z,
|
|
985
|
+
label: x.label,
|
|
986
|
+
"model-value": r.value.some((z) => z.value === x.value),
|
|
987
|
+
"onUpdate:modelValue": (z) => l(z, x)
|
|
988
988
|
}, null, 8, ["disabled", "label", "model-value", "onUpdate:modelValue"]))), 128)),
|
|
989
989
|
$e(g.$slots, "append-menu", {}, void 0, !0)
|
|
990
990
|
])
|
|
@@ -997,7 +997,7 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
997
997
|
g.shouldShowChips && r.value.length > 0 ? (y(), q("div", tl, [
|
|
998
998
|
h(I, {
|
|
999
999
|
disabled: g.disabled,
|
|
1000
|
-
items: r.value.map((
|
|
1000
|
+
items: r.value.map((A) => ({ label: A.label })),
|
|
1001
1001
|
removable: "",
|
|
1002
1002
|
onChipClosed: s
|
|
1003
1003
|
}, null, 8, ["disabled", "items"])
|
|
@@ -1005,7 +1005,7 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1005
1005
|
]);
|
|
1006
1006
|
};
|
|
1007
1007
|
}
|
|
1008
|
-
}), ol = /* @__PURE__ */ kt(nl, [["__scopeId", "data-v-89b5becb"]]),
|
|
1008
|
+
}), ol = /* @__PURE__ */ kt(nl, [["__scopeId", "data-v-89b5becb"]]), Bo = /* @__PURE__ */ ye({
|
|
1009
1009
|
__name: "OrderFrom",
|
|
1010
1010
|
props: {
|
|
1011
1011
|
modelValue: {
|
|
@@ -1097,7 +1097,7 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1097
1097
|
]);
|
|
1098
1098
|
};
|
|
1099
1099
|
}
|
|
1100
|
-
}), il = { class: "flex flex-col gap-8" }, al = { class: "flex items-center justify-between gap-16" }, rl = { class: "fm-typo-en-body-lg-600" },
|
|
1100
|
+
}), il = { class: "flex flex-col gap-8" }, al = { class: "flex items-center justify-between gap-16" }, rl = { class: "fm-typo-en-body-lg-600" }, yi = /* @__PURE__ */ ye({
|
|
1101
1101
|
__name: "ToggleableQuantityField",
|
|
1102
1102
|
props: {
|
|
1103
1103
|
label: {},
|
|
@@ -1180,14 +1180,14 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1180
1180
|
])
|
|
1181
1181
|
]),
|
|
1182
1182
|
_("div", ml, [
|
|
1183
|
-
h(
|
|
1183
|
+
h(yi, {
|
|
1184
1184
|
label: m(i)("menu.product.form.item_quantity.fields.min.label"),
|
|
1185
1185
|
"model-value": a.value,
|
|
1186
1186
|
rules: s.value,
|
|
1187
1187
|
disabled: d.disabled,
|
|
1188
1188
|
"onUpdate:modelValue": c[0] || (c[0] = (f) => o("update:bound", "min", f))
|
|
1189
1189
|
}, null, 8, ["label", "model-value", "rules", "disabled"]),
|
|
1190
|
-
h(
|
|
1190
|
+
h(yi, {
|
|
1191
1191
|
label: m(i)("menu.product.form.item_quantity.fields.max.label"),
|
|
1192
1192
|
"model-value": r.value,
|
|
1193
1193
|
rules: u.value,
|
|
@@ -1269,43 +1269,43 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1269
1269
|
dialog: i,
|
|
1270
1270
|
menuLoader: l,
|
|
1271
1271
|
isLocalOnly: n.isLocalOnly
|
|
1272
|
-
}), p = (
|
|
1273
|
-
|
|
1272
|
+
}), p = (T, S) => {
|
|
1273
|
+
T ? d.value = [...d.value, S] : d.value = d.value.filter((j) => j.value !== S.value), o(
|
|
1274
1274
|
"update:modelValue",
|
|
1275
1275
|
d.value.map((j) => j.value)
|
|
1276
1276
|
);
|
|
1277
|
-
}, f = (
|
|
1278
|
-
d.value = d.value.filter((S, j) => j !==
|
|
1277
|
+
}, f = (T) => {
|
|
1278
|
+
d.value = d.value.filter((S, j) => j !== T), o(
|
|
1279
1279
|
"update:modelValue",
|
|
1280
1280
|
d.value.map((S) => S.value)
|
|
1281
1281
|
);
|
|
1282
1282
|
}, g = () => {
|
|
1283
|
-
var
|
|
1284
|
-
(
|
|
1283
|
+
var T;
|
|
1284
|
+
(T = u.value) == null || T.toggleMenu(!1), c.create();
|
|
1285
1285
|
}, k = R(() => n.items.reduce(
|
|
1286
|
-
(
|
|
1286
|
+
(T, S) => (T[S.value] = S, T),
|
|
1287
1287
|
{}
|
|
1288
|
-
)), b = R(() => d.value.length > 0 ? d.value.map((
|
|
1288
|
+
)), b = R(() => d.value.length > 0 ? d.value.map((T) => T.label).join("/") : n.placeholder), v = W(!1);
|
|
1289
1289
|
return Ae(
|
|
1290
1290
|
() => n.modelValue,
|
|
1291
|
-
(
|
|
1292
|
-
|
|
1291
|
+
(T) => {
|
|
1292
|
+
T != null && T.length ? d.value = T.map((S) => k.value[S]).filter((S) => !!S) : d.value = [];
|
|
1293
1293
|
},
|
|
1294
1294
|
{ immediate: !0 }
|
|
1295
|
-
), (
|
|
1296
|
-
const j = U("FmIcon"), I = U("FmField"),
|
|
1295
|
+
), (T, S) => {
|
|
1296
|
+
const j = U("FmIcon"), I = U("FmField"), A = U("FmMenuItem"), x = U("FmMenu"), z = U("FmFormGroup"), F = U("FmChipGroup");
|
|
1297
1297
|
return y(), q("div", gl, [
|
|
1298
1298
|
h(z, {
|
|
1299
|
-
"model-value":
|
|
1300
|
-
disabled:
|
|
1299
|
+
"model-value": T.modelValue,
|
|
1300
|
+
disabled: T.disabled,
|
|
1301
1301
|
focused: v.value,
|
|
1302
|
-
"helper-state":
|
|
1303
|
-
"helper-text":
|
|
1304
|
-
rules:
|
|
1302
|
+
"helper-state": T.helperState,
|
|
1303
|
+
"helper-text": T.helperText,
|
|
1304
|
+
rules: T.rules
|
|
1305
1305
|
}, {
|
|
1306
1306
|
default: M(({ invalid: G }) => [
|
|
1307
|
-
h(
|
|
1308
|
-
disabled:
|
|
1307
|
+
h(x, {
|
|
1308
|
+
disabled: T.disabled,
|
|
1309
1309
|
ref_key: "fmMenuRef",
|
|
1310
1310
|
ref: u,
|
|
1311
1311
|
"close-on-click": !1,
|
|
@@ -1313,13 +1313,13 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1313
1313
|
}, {
|
|
1314
1314
|
"menu-button": M(() => [
|
|
1315
1315
|
h(I, {
|
|
1316
|
-
class: Ge(
|
|
1316
|
+
class: Ge(T.disabled ? "cursor-not-allowed" : "cursor-pointer"),
|
|
1317
1317
|
focused: v.value,
|
|
1318
1318
|
invalid: G
|
|
1319
1319
|
}, {
|
|
1320
1320
|
append: M(() => [
|
|
1321
1321
|
h(j, {
|
|
1322
|
-
color:
|
|
1322
|
+
color: T.disabled ? "#C7C7CC" : "black",
|
|
1323
1323
|
name: v.value ? "expand_less" : "expand_more",
|
|
1324
1324
|
size: "md"
|
|
1325
1325
|
}, null, 8, ["color", "name"])
|
|
@@ -1327,7 +1327,7 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1327
1327
|
default: M(() => [
|
|
1328
1328
|
_("div", {
|
|
1329
1329
|
class: Ge([[
|
|
1330
|
-
|
|
1330
|
+
T.disabled ? "text-fm-color-typo-disabled" : d.value.length > 0 ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"
|
|
1331
1331
|
], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
1332
1332
|
}, oe(b.value), 3)
|
|
1333
1333
|
]),
|
|
@@ -1336,7 +1336,7 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1336
1336
|
]),
|
|
1337
1337
|
default: M(() => [
|
|
1338
1338
|
_("div", vl, [
|
|
1339
|
-
(y(!0), q(Ce, null, Ie(
|
|
1339
|
+
(y(!0), q(Ce, null, Ie(T.items, (H) => (y(), ee(A, {
|
|
1340
1340
|
key: H.value,
|
|
1341
1341
|
disabled: H.disabled,
|
|
1342
1342
|
"has-checkbox": !0,
|
|
@@ -1363,9 +1363,9 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1363
1363
|
]),
|
|
1364
1364
|
_: 1
|
|
1365
1365
|
}, 8, ["model-value", "disabled", "focused", "helper-state", "helper-text", "rules"]),
|
|
1366
|
-
|
|
1366
|
+
T.shouldShowChips && d.value.length > 0 ? (y(), q("div", yl, [
|
|
1367
1367
|
h(F, {
|
|
1368
|
-
disabled:
|
|
1368
|
+
disabled: T.disabled,
|
|
1369
1369
|
items: d.value.map((G) => ({ label: G.label })),
|
|
1370
1370
|
removable: "",
|
|
1371
1371
|
onChipClosed: f
|
|
@@ -1375,7 +1375,7 @@ const Qs = /* @__PURE__ */ kt(Ys, [["render", Zs]]), Js = { class: "flex flex-co
|
|
|
1375
1375
|
};
|
|
1376
1376
|
}
|
|
1377
1377
|
}), wl = /* @__PURE__ */ kt(_l, [["__scopeId", "data-v-5eb2466b"]]);
|
|
1378
|
-
function
|
|
1378
|
+
function _i(e, t) {
|
|
1379
1379
|
var n = Object.keys(e);
|
|
1380
1380
|
if (Object.getOwnPropertySymbols) {
|
|
1381
1381
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -1388,9 +1388,9 @@ function wi(e, t) {
|
|
|
1388
1388
|
function Se(e) {
|
|
1389
1389
|
for (var t = 1; t < arguments.length; t++) {
|
|
1390
1390
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
1391
|
-
t % 2 ?
|
|
1391
|
+
t % 2 ? _i(Object(n), !0).forEach(function(o) {
|
|
1392
1392
|
at(e, o, n[o]);
|
|
1393
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1393
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _i(Object(n)).forEach(function(o) {
|
|
1394
1394
|
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
|
|
1395
1395
|
});
|
|
1396
1396
|
}
|
|
@@ -1435,7 +1435,7 @@ function Jn(e, t) {
|
|
|
1435
1435
|
for (var n = 0, o = new Array(t); n < t; n++) o[n] = e[n];
|
|
1436
1436
|
return o;
|
|
1437
1437
|
}
|
|
1438
|
-
var
|
|
1438
|
+
var wi, Cl, hn, je = (wi = function(e) {
|
|
1439
1439
|
/*!
|
|
1440
1440
|
Copyright (c) 2018 Jed Watson.
|
|
1441
1441
|
Licensed under the MIT License (MIT), see
|
|
@@ -1462,7 +1462,7 @@ var ki, Cl, hn, je = (ki = function(e) {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
1464
1464
|
})();
|
|
1465
|
-
},
|
|
1465
|
+
}, wi(hn = { path: Cl, exports: {}, require: function(e, t) {
|
|
1466
1466
|
return function() {
|
|
1467
1467
|
throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
1468
1468
|
}(t == null && hn.path);
|
|
@@ -1478,7 +1478,7 @@ var ki, Cl, hn, je = (ki = function(e) {
|
|
|
1478
1478
|
}, "") : "");
|
|
1479
1479
|
};
|
|
1480
1480
|
};
|
|
1481
|
-
function
|
|
1481
|
+
function wo(e, t, n) {
|
|
1482
1482
|
var o, i, a, r, l;
|
|
1483
1483
|
function s() {
|
|
1484
1484
|
var d = Date.now() - r;
|
|
@@ -1496,8 +1496,8 @@ function ko(e, t, n) {
|
|
|
1496
1496
|
o && (l = e.apply(a, i), a = i = null, clearTimeout(o), o = null);
|
|
1497
1497
|
}, u;
|
|
1498
1498
|
}
|
|
1499
|
-
|
|
1500
|
-
var
|
|
1499
|
+
wo.debounce = wo;
|
|
1500
|
+
var ko = wo, ve = function() {
|
|
1501
1501
|
return ve = Object.assign || function(e) {
|
|
1502
1502
|
for (var t, n = 1, o = arguments.length; n < o; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
1503
1503
|
return e;
|
|
@@ -1524,7 +1524,7 @@ function va(e, t) {
|
|
|
1524
1524
|
function ba(e) {
|
|
1525
1525
|
return /^blob:/.test(e);
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function ki(e) {
|
|
1528
1528
|
return ba(e) || function(t) {
|
|
1529
1529
|
return /^data:/.test(t);
|
|
1530
1530
|
}(e);
|
|
@@ -1538,17 +1538,17 @@ function We(e) {
|
|
|
1538
1538
|
function Cn(e) {
|
|
1539
1539
|
return typeof e == "object" && e !== null;
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function Co(e, t, n) {
|
|
1542
1542
|
var o = {};
|
|
1543
1543
|
return Cn(e) ? (Object.keys(t).forEach(function(i) {
|
|
1544
|
-
We(e[i]) ? o[i] = t[i] : Cn(t[i]) ? Cn(e[i]) ? o[i] =
|
|
1544
|
+
We(e[i]) ? o[i] = t[i] : Cn(t[i]) ? Cn(e[i]) ? o[i] = Co(e[i], t[i], n[i]) : o[i] = e[i] ? t[i] : n[i] : t[i] === !0 || t[i] === !1 ? o[i] = !!e[i] : o[i] = e[i];
|
|
1545
1545
|
}), o) : e ? t : n;
|
|
1546
1546
|
}
|
|
1547
1547
|
function gn(e) {
|
|
1548
1548
|
var t = Number(e);
|
|
1549
1549
|
return Number.isNaN(t) ? e : t;
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1551
|
+
function Ci(e) {
|
|
1552
1552
|
return typeof (e == "number" || /* @__PURE__ */ function(t) {
|
|
1553
1553
|
return typeof t == "object" && t !== null;
|
|
1554
1554
|
}(e) && toString.call(e) == "[object Number]") && !ya(e);
|
|
@@ -1563,7 +1563,7 @@ var nn = function(e, t) {
|
|
|
1563
1563
|
e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
|
|
1564
1564
|
}, Sl = function(e, t) {
|
|
1565
1565
|
t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
|
|
1566
|
-
},
|
|
1566
|
+
}, Lo = function(e) {
|
|
1567
1567
|
this.type = "move", this.directions = e;
|
|
1568
1568
|
}, xl = function() {
|
|
1569
1569
|
function e(t, n, o, i, a) {
|
|
@@ -1577,7 +1577,7 @@ var nn = function(e, t) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
return { left: 0, top: 0 };
|
|
1579
1579
|
}, e;
|
|
1580
|
-
}(),
|
|
1580
|
+
}(), jo = { name: "DraggableElement", props: { classname: { type: String } }, beforeMount: function() {
|
|
1581
1581
|
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
1582
1582
|
}, beforeUnmount: function() {
|
|
1583
1583
|
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
@@ -1620,7 +1620,7 @@ var nn = function(e, t) {
|
|
|
1620
1620
|
}, processEnd: function() {
|
|
1621
1621
|
this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = !1), this.touches = [];
|
|
1622
1622
|
} }, emits: ["drag", "drag-end", "leave", "enter"] };
|
|
1623
|
-
|
|
1623
|
+
jo.render = function(e, t, n, o, i, a) {
|
|
1624
1624
|
return y(), ee("div", { ref: "draggable", class: n.classname, onTouchstart: t[1] || (t[1] = function() {
|
|
1625
1625
|
return a.onTouchStart && a.onTouchStart.apply(a, arguments);
|
|
1626
1626
|
}), onMousedown: t[2] || (t[2] = function() {
|
|
@@ -1631,7 +1631,7 @@ Go.render = function(e, t, n, o, i, a) {
|
|
|
1631
1631
|
return a.onMouseLeave && a.onMouseLeave.apply(a, arguments);
|
|
1632
1632
|
}) }, [$e(e.$slots, "default")], 34);
|
|
1633
1633
|
};
|
|
1634
|
-
var eo = ct("vue-handler-wrapper"), wa = { name: "HandlerWrapper", components: { DraggableElement:
|
|
1634
|
+
var eo = ct("vue-handler-wrapper"), wa = { name: "HandlerWrapper", components: { DraggableElement: jo }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
|
|
1635
1635
|
var e;
|
|
1636
1636
|
if (this.horizontalPosition || this.verticalPosition) {
|
|
1637
1637
|
var t, n = va(this.horizontalPosition, this.verticalPosition);
|
|
@@ -1653,7 +1653,7 @@ wa.render = function(e, t, n, o, i, a) {
|
|
|
1653
1653
|
return [$e(e.$slots, "default")];
|
|
1654
1654
|
}), _: 3 }, 8, ["class"])], 2);
|
|
1655
1655
|
};
|
|
1656
|
-
var Al = ct("vue-line-wrapper"), ka = { name: "LineWrapper", components: { DraggableElement:
|
|
1656
|
+
var Al = ct("vue-line-wrapper"), ka = { name: "LineWrapper", components: { DraggableElement: jo }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
|
|
1657
1657
|
var e;
|
|
1658
1658
|
return Al((at(e = {}, this.position, !0), at(e, "disabled", this.disabled), e));
|
|
1659
1659
|
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
@@ -1671,8 +1671,8 @@ ka.render = function(e, t, n, o, i, a) {
|
|
|
1671
1671
|
return [$e(e.$slots, "default")];
|
|
1672
1672
|
}), _: 3 }, 8, ["class"]);
|
|
1673
1673
|
};
|
|
1674
|
-
var mt = ["left", "right", "top", "bottom"], Tl = ["left", "right"], Rl = ["top", "bottom"], Il = ["left", "top"], El = ["fill-area", "fit-area", "stencil", "none"],
|
|
1675
|
-
function
|
|
1674
|
+
var mt = ["left", "right", "top", "bottom"], Tl = ["left", "right"], Rl = ["top", "bottom"], Il = ["left", "top"], El = ["fill-area", "fit-area", "stencil", "none"], Si = { left: 0, top: 0, width: 0, height: 0 };
|
|
1675
|
+
function xi(e, t, n) {
|
|
1676
1676
|
return !(n = n || ["width", "height", "left", "top"]).some(function(o) {
|
|
1677
1677
|
return e[o] !== t[o];
|
|
1678
1678
|
});
|
|
@@ -1747,7 +1747,7 @@ function Ke(e, t, n) {
|
|
|
1747
1747
|
var o = Yt(e, t);
|
|
1748
1748
|
return Qe(e, n ? zn(o) : o);
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function So(e) {
|
|
1751
1751
|
return { width: e.right !== void 0 && e.left !== void 0 ? e.right - e.left : 1 / 0, height: e.bottom !== void 0 && e.top !== void 0 ? e.bottom - e.top : 1 / 0 };
|
|
1752
1752
|
}
|
|
1753
1753
|
function Ol(e, t) {
|
|
@@ -1764,34 +1764,34 @@ function xa(e, t, n) {
|
|
|
1764
1764
|
function Bn(e, t) {
|
|
1765
1765
|
return xa(e, t, !0);
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function Ai(e) {
|
|
1768
1768
|
var t = e.size, n = e.aspectRatio, o = e.ignoreMinimum, i = e.sizeRestrictions;
|
|
1769
1769
|
return !!((t.correctRatio || xe(t) >= n.minimum && xe(t) <= n.maximum) && t.height <= i.maxHeight && t.width <= i.maxWidth && t.width && t.height && (o || t.height >= i.minHeight && t.width >= i.minWidth));
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function Ti(e, t) {
|
|
1772
1772
|
return Math.pow(e.width - t.width, 2) + Math.pow(e.height - t.height, 2);
|
|
1773
1773
|
}
|
|
1774
1774
|
function bt(e) {
|
|
1775
1775
|
var t = e.width, n = e.height, o = e.sizeRestrictions, i = { minimum: e.aspectRatio && e.aspectRatio.minimum || 0, maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0 }, a = { width: Math.max(o.minWidth, Math.min(o.maxWidth, t)), height: Math.max(o.minHeight, Math.min(o.maxHeight, n)) };
|
|
1776
1776
|
function r(u, d) {
|
|
1777
1777
|
return d === void 0 && (d = !1), u.reduce(function(c, p) {
|
|
1778
|
-
return
|
|
1778
|
+
return Ai({ size: p, aspectRatio: i, sizeRestrictions: o, ignoreMinimum: d }) && (!c || Ti(p, { width: t, height: n }) < Ti(c, { width: t, height: n })) ? p : c;
|
|
1779
1779
|
}, null);
|
|
1780
1780
|
}
|
|
1781
1781
|
var l = [];
|
|
1782
1782
|
i && [i.minimum, i.maximum].forEach(function(u) {
|
|
1783
1783
|
u && l.push({ width: a.width, height: a.width / u, correctRatio: !0 }, { width: a.height * u, height: a.height, correctRatio: !0 });
|
|
1784
|
-
}),
|
|
1784
|
+
}), Ai({ size: a, aspectRatio: i, sizeRestrictions: o }) && l.push(a);
|
|
1785
1785
|
var s = r(l) || r(l, !0);
|
|
1786
1786
|
return s && { width: s.width, height: s.height };
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function xo(e) {
|
|
1789
1789
|
var t = e.event, n = e.coordinates, o = e.positionRestrictions, i = o === void 0 ? {} : o, a = Qe(n, t.directions);
|
|
1790
1790
|
return Qe(a, Yt(a, i));
|
|
1791
1791
|
}
|
|
1792
1792
|
function $l(e) {
|
|
1793
1793
|
var t = e.coordinates, n = e.transform, o = e.imageSize, i = e.sizeRestrictions, a = e.positionRestrictions, r = e.aspectRatio, l = e.visibleArea, s = function(d, c) {
|
|
1794
|
-
return
|
|
1794
|
+
return xo({ coordinates: d, positionRestrictions: a, event: new Lo({ left: c.left - d.left, top: c.top - d.top }) });
|
|
1795
1795
|
}, u = ve({}, t);
|
|
1796
1796
|
return (Array.isArray(n) ? n : [n]).forEach(function(d) {
|
|
1797
1797
|
var c = {};
|
|
@@ -1849,7 +1849,7 @@ function Ul(e) {
|
|
|
1849
1849
|
function zl(e) {
|
|
1850
1850
|
var t = e.getAreaRestrictions, n = e.coordinates, o = e.imageSize, i = xe(e.boundaries);
|
|
1851
1851
|
if (n) {
|
|
1852
|
-
var a = { height: Math.max(n.height, o.height), width: Math.max(n.width, o.width) }, r = Ca({ width: xe(a) > i ? a.width : a.height * i, height: xe(a) > i ? a.width / i : a.height },
|
|
1852
|
+
var a = { height: Math.max(n.height, o.height), width: Math.max(n.width, o.width) }, r = Ca({ width: xe(a) > i ? a.width : a.height * i, height: xe(a) > i ? a.width / i : a.height }, So(t())), l = { left: n.left + n.width / 2 - r.width / 2, top: n.top + n.height / 2 - r.height / 2, width: r.width, height: r.height }, s = sn(n, ht(ve({ left: 0, top: 0 }, o))), u = {};
|
|
1853
1853
|
return !s.left && !s.right && l.width <= o.width && (u.left = 0, u.right = o.width), !s.top && !s.bottom && l.height <= o.height && (u.top = 0, u.bottom = o.height), Ke(l, u);
|
|
1854
1854
|
}
|
|
1855
1855
|
var d = xe(o);
|
|
@@ -1863,8 +1863,8 @@ function Nl(e) {
|
|
|
1863
1863
|
d = Qe(d, { left: u.left || 0, top: u.top || 0 });
|
|
1864
1864
|
var k = { stencil: { minimum: Math.max(i.minWidth ? i.minWidth / c.width : 0, i.minHeight ? i.minHeight / c.height : 0), maximum: Math.min(i.maxWidth ? i.maxWidth / c.width : 1 / 0, i.maxHeight ? i.maxHeight / c.height : 1 / 0, qt(c, r)) }, area: { maximum: qt(d, a({ visibleArea: d, type: "resize" })) } };
|
|
1865
1865
|
s.factor && g && (s.factor < 1 ? (f = Math.max(s.factor, k.stencil.minimum)) > 1 && (f = 1) : s.factor > 1 && (f = Math.min(s.factor, Math.min(k.area.maximum, k.stencil.maximum))) < 1 && (f = 1)), f && (d = rt(d, f, s.center));
|
|
1866
|
-
var b = n.left - o.left, v = o.width + o.left - (n.width + n.left),
|
|
1867
|
-
return d = Ke(d = Qe(d, Yt(d, { left: r.left !== void 0 ? r.left - b * f : void 0, top: r.top !== void 0 ? r.top -
|
|
1866
|
+
var b = n.left - o.left, v = o.width + o.left - (n.width + n.left), T = n.top - o.top, S = o.height + o.top - (n.height + n.top);
|
|
1867
|
+
return d = Ke(d = Qe(d, Yt(d, { left: r.left !== void 0 ? r.left - b * f : void 0, top: r.top !== void 0 ? r.top - T * f : void 0, bottom: r.bottom !== void 0 ? r.bottom + S * f : void 0, right: r.right !== void 0 ? r.right + v * f : void 0 })), a({ visibleArea: d, type: "move" })), c.width = c.width * f, c.height = c.height * f, c.left = d.left + b * f, c.top = d.top + T * f, c = Ke(c, Bn(ht(d), r)), s.factor && g && l && (s.factor > 1 ? p = Math.min(k.area.maximum, s.factor) / f : s.factor < 1 && (p = Math.max(c.height / d.height, c.width / d.width, s.factor / f)), p !== 1 && (d = Qe(d = Ke(d = rt(d, p, s.factor > 1 ? s.center : He(c)), a({ visibleArea: d, type: "move" })), zn(Yt(c, ht(d)))))), { coordinates: c, visibleArea: d };
|
|
1868
1868
|
}
|
|
1869
1869
|
function Bl(e) {
|
|
1870
1870
|
var t = e.aspectRatio, n = e.getAreaRestrictions, o = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, d = ve({}, o), c = ve({}, i), p = St(He(ve({ left: 0, top: 0 }, s)), u);
|
|
@@ -1878,7 +1878,7 @@ function Ll(e) {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
return { coordinates: s, visibleArea: u };
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1881
|
+
function Ri(e) {
|
|
1882
1882
|
var t = e.directions, n = e.coordinates, o = e.positionRestrictions, i = o === void 0 ? {} : o, a = e.sizeRestrictions, r = e.preserveRatio, l = e.compensate, s = ve({}, t), u = dt(n, s).width, d = dt(n, s).height;
|
|
1883
1883
|
u < 0 && (s.left < 0 && s.right < 0 ? (s.left = -(n.width - a.minWidth) / (s.left / s.right), s.right = -(n.width - a.minWidth) / (s.right / s.left)) : s.left < 0 ? s.left = -(n.width - a.minWidth) : s.right < 0 && (s.right = -(n.width - a.minWidth))), d < 0 && (s.top < 0 && s.bottom < 0 ? (s.top = -(n.height - a.minHeight) / (s.top / s.bottom), s.bottom = -(n.height - a.minHeight) / (s.bottom / s.top)) : s.top < 0 ? s.top = -(n.height - a.minHeight) : s.bottom < 0 && (s.bottom = -(n.height - a.minHeight)));
|
|
1884
1884
|
var c = sn(dt(n, s), i);
|
|
@@ -1912,7 +1912,7 @@ function Ii(e) {
|
|
|
1912
1912
|
function bn(e, t, n) {
|
|
1913
1913
|
return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
|
|
1914
1914
|
}
|
|
1915
|
-
var jl = ct("vue-simple-handler"), Gl = ct("vue-simple-handler-wrapper"),
|
|
1915
|
+
var jl = ct("vue-simple-handler"), Gl = ct("vue-simple-handler-wrapper"), Go = { name: "SimpleHandler", components: { HandlerWrapper: wa }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
1916
1916
|
return { hover: !1 };
|
|
1917
1917
|
}, computed: { classes: function() {
|
|
1918
1918
|
var e, t = (at(e = {}, this.horizontalPosition, !!this.horizontalPosition), at(e, this.verticalPosition, !!this.verticalPosition), at(e, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), at(e, "hover", this.hover), e);
|
|
@@ -1926,13 +1926,13 @@ var jl = ct("vue-simple-handler"), Gl = ct("vue-simple-handler-wrapper"), Wo = {
|
|
|
1926
1926
|
}, onDragEnd: function() {
|
|
1927
1927
|
this.$emit("drag-end");
|
|
1928
1928
|
} }, emits: ["drag", "drag-end"] };
|
|
1929
|
-
|
|
1929
|
+
Go.render = function(e, t, n, o, i, a) {
|
|
1930
1930
|
var r = U("HandlerWrapper");
|
|
1931
1931
|
return y(), ee(r, { class: a.classes.wrapper, "vertical-position": n.verticalPosition, "horizontal-position": n.horizontalPosition, disabled: n.disabled, onDrag: a.onDrag, onDragEnd: a.onDragEnd, onEnter: a.onEnter, onLeave: a.onLeave }, { default: M(function() {
|
|
1932
1932
|
return [h("div", { class: a.classes.default }, null, 2)];
|
|
1933
1933
|
}), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
1934
1934
|
};
|
|
1935
|
-
var Wl = ct("vue-simple-line"), Hl = ct("vue-simple-line-wrapper"),
|
|
1935
|
+
var Wl = ct("vue-simple-line"), Hl = ct("vue-simple-line-wrapper"), Wo = { name: "SimpleLine", components: { LineWrapper: ka }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
1936
1936
|
return { hover: !1 };
|
|
1937
1937
|
}, computed: { classes: function() {
|
|
1938
1938
|
return { root: je(Wl(at({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: je(Hl(at({}, this.position, !0)), this.wrapperClass) };
|
|
@@ -1945,7 +1945,7 @@ var Wl = ct("vue-simple-line"), Hl = ct("vue-simple-line-wrapper"), Ho = { name:
|
|
|
1945
1945
|
}, onDragEnd: function() {
|
|
1946
1946
|
this.$emit("drag-end");
|
|
1947
1947
|
} }, emits: ["drag", "drag-end"] };
|
|
1948
|
-
|
|
1948
|
+
Wo.render = function(e, t, n, o, i, a) {
|
|
1949
1949
|
var r = U("LineWrapper");
|
|
1950
1950
|
return y(), ee(r, { class: a.classes.wrapper, position: n.position, disabled: n.disabled, onDrag: a.onDrag, onDragEnd: a.onDragEnd, onEnter: a.onEnter, onLeave: a.onLeave }, { default: M(function() {
|
|
1951
1951
|
return [h("div", { class: a.classes.root }, null, 2)];
|
|
@@ -1954,7 +1954,7 @@ Ho.render = function(e, t, n, o, i, a) {
|
|
|
1954
1954
|
var no = ct("vue-bounding-box"), Kl = ["east", "west", null], ql = ["south", "north", null], Aa = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
|
|
1955
1955
|
return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
|
|
1956
1956
|
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
1957
|
-
return
|
|
1957
|
+
return Go;
|
|
1958
1958
|
} }, handlersClasses: { type: Object, default: function() {
|
|
1959
1959
|
return {};
|
|
1960
1960
|
} }, handlersWrappersClasses: { type: Object, default: function() {
|
|
@@ -1962,7 +1962,7 @@ var no = ct("vue-bounding-box"), Kl = ["east", "west", null], ql = ["south", "no
|
|
|
1962
1962
|
} }, lines: { type: Object, default: function() {
|
|
1963
1963
|
return { west: !0, north: !0, east: !0, south: !0 };
|
|
1964
1964
|
} }, linesComponent: { type: [Object, String], default: function() {
|
|
1965
|
-
return
|
|
1965
|
+
return Wo;
|
|
1966
1966
|
} }, linesClasses: { type: Object, default: function() {
|
|
1967
1967
|
return {};
|
|
1968
1968
|
} }, linesWrappersClasses: { type: Object, default: function() {
|
|
@@ -2060,7 +2060,7 @@ var Yl = ct("vue-draggable-area"), Ta = { name: "DraggableArea", props: { movabl
|
|
|
2060
2060
|
var n = Mt(t);
|
|
2061
2061
|
if (this.touches.length) {
|
|
2062
2062
|
var o = this.$refs.container.getBoundingClientRect(), i = o.left, a = o.top;
|
|
2063
|
-
this.touches.length === 1 && n.length === 1 && this.$emit("move", new
|
|
2063
|
+
this.touches.length === 1 && n.length === 1 && this.$emit("move", new Lo({ left: n[0].clientX - (i + this.anchor.x), top: n[0].clientY - (a + this.anchor.y) }));
|
|
2064
2064
|
}
|
|
2065
2065
|
}, processEnd: function() {
|
|
2066
2066
|
this.touches.length && this.$emit("move-end"), this.touches = [];
|
|
@@ -2145,7 +2145,7 @@ function Zl(e) {
|
|
|
2145
2145
|
return null;
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2148
|
+
function Ii(e, t) {
|
|
2149
2149
|
var n = t.getBoundingClientRect(), o = n.left, i = n.top, a = { left: 0, top: 0 }, r = 0;
|
|
2150
2150
|
return e.forEach(function(l) {
|
|
2151
2151
|
a.left += (l.clientX - o) / e.length, a.top += (l.clientY - i) / e.length;
|
|
@@ -2158,12 +2158,12 @@ var Ia = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
|
|
|
2158
2158
|
}, beforeUnmount: function() {
|
|
2159
2159
|
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
2160
2160
|
}, created: function() {
|
|
2161
|
-
this.transforming = !1, this.debouncedProcessEnd =
|
|
2161
|
+
this.transforming = !1, this.debouncedProcessEnd = ko(this.processEnd), this.touches = [];
|
|
2162
2162
|
}, methods: { processMove: function(e, t) {
|
|
2163
2163
|
if (this.touches.length) {
|
|
2164
2164
|
if (this.touches.length === 1 && t.length === 1) this.$emit("move", new nn({ left: this.touches[0].clientX - t[0].clientX, top: this.touches[0].clientY - t[0].clientY }));
|
|
2165
2165
|
else if (this.touches.length > 1 && this.touchResize) {
|
|
2166
|
-
var n =
|
|
2166
|
+
var n = Ii(t, this.$refs.container), o = this.oldGeometricProperties;
|
|
2167
2167
|
o.count === n.count && o.count > 1 && this.$emit("resize", new nn({ left: o.centerMass.left - n.centerMass.left, top: o.centerMass.top - n.centerMass.top }, { factor: o.spread / n.spread, center: n.centerMass })), this.oldGeometricProperties = n;
|
|
2168
2168
|
}
|
|
2169
2169
|
this.touches = t;
|
|
@@ -2179,7 +2179,7 @@ var Ia = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
|
|
|
2179
2179
|
var t = this.$refs.container, n = t.getBoundingClientRect(), o = n.left, i = n.top, a = n.bottom, r = n.right;
|
|
2180
2180
|
this.touches = Mt(e.touches).filter(function(l) {
|
|
2181
2181
|
return l.clientX > o && l.clientX < r && l.clientY > i && l.clientY < a;
|
|
2182
|
-
}), this.oldGeometricProperties =
|
|
2182
|
+
}), this.oldGeometricProperties = Ii(this.touches, t);
|
|
2183
2183
|
}
|
|
2184
2184
|
}, onTouchEnd: function(e) {
|
|
2185
2185
|
e.touches.length === 0 && (this.touches = [], this.processEnd());
|
|
@@ -2218,8 +2218,8 @@ Ia.render = function(e, t, n, o, i, a) {
|
|
|
2218
2218
|
return a.onWheel && a.onWheel.apply(a, arguments);
|
|
2219
2219
|
}) }, [$e(e.$slots, "default")], 544);
|
|
2220
2220
|
};
|
|
2221
|
-
var
|
|
2222
|
-
|
|
2221
|
+
var Ao = { components: { TransformableImage: Ia }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: ["resize", "move"] };
|
|
2222
|
+
Ao.render = function(e, t, n, o, i, a) {
|
|
2223
2223
|
var r = U("transformable-image");
|
|
2224
2224
|
return y(), ee(r, { "touch-move": n.touchMove, "touch-resize": n.touchResize, "mouse-move": n.mouseMove, "wheel-resize": n.wheelResize, onMove: t[1] || (t[1] = function(l) {
|
|
2225
2225
|
return e.$emit("move", l);
|
|
@@ -2281,9 +2281,9 @@ Oa.render = function(e, t, n, o, i, a) {
|
|
|
2281
2281
|
return y(), ee(r, Ji(e.$attrs, { fill: !0 }), null, 16);
|
|
2282
2282
|
};
|
|
2283
2283
|
var io = ct("vue-rectangle-stencil"), $a = { name: "RectangleStencil", components: { StencilPreview: Oa, BoundingBox: Aa, DraggableArea: Ta }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
|
|
2284
|
-
return
|
|
2284
|
+
return Go;
|
|
2285
2285
|
} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
|
|
2286
|
-
return
|
|
2286
|
+
return Wo;
|
|
2287
2287
|
} }, aspectRatio: { type: [Number, String] }, minAspectRatio: { type: [Number, String] }, maxAspectRatio: { type: [Number, String] }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String }, linesClasses: { type: Object, default: function() {
|
|
2288
2288
|
return {};
|
|
2289
2289
|
} }, linesWrappersClasses: { type: Object, default: function() {
|
|
@@ -2318,10 +2318,10 @@ $a.render = function(e, t, n, o, i, a) {
|
|
|
2318
2318
|
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
2319
2319
|
}), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
|
|
2320
2320
|
};
|
|
2321
|
-
var Ql = ["transitions"], gt = ct("vue-advanced-cropper"),
|
|
2321
|
+
var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ho = { name: "Cropper", components: { BackgroundWrapper: Ao }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
|
|
2322
2322
|
return $a;
|
|
2323
2323
|
} }, backgroundWrapperComponent: { type: [Object, String], default: function() {
|
|
2324
|
-
return
|
|
2324
|
+
return Ao;
|
|
2325
2325
|
} }, stencilProps: { type: Object, default: function() {
|
|
2326
2326
|
return {};
|
|
2327
2327
|
} }, autoZoom: { type: Boolean, default: !1 }, imageClass: { type: String }, boundariesClass: { type: String }, backgroundClass: { type: String }, foregroundClass: { type: String }, minWidth: { type: [Number, String] }, minHeight: { type: [Number, String] }, maxWidth: { type: [Number, String] }, maxHeight: { type: [Number, String] }, debounce: { type: [Boolean, Number], default: 500 }, transitions: { type: Boolean, default: !0 }, checkOrientation: { type: Boolean, default: !0 }, canvas: { type: [Object, Boolean], default: !0 }, crossOrigin: { type: [Boolean, String], default: void 0 }, transitionTime: { type: Number, default: 300 }, imageRestriction: { type: String, default: "fit-area", validator: function(e) {
|
|
@@ -2333,7 +2333,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2333
2333
|
a.widthFrozen && (s.left = 0, s.right = 0), a.heightFrozen && (s.top = 0, s.bottom = 0), mt.forEach(function(j) {
|
|
2334
2334
|
u[j] || (s[j] = 0);
|
|
2335
2335
|
});
|
|
2336
|
-
var d = dt(r, s =
|
|
2336
|
+
var d = dt(r, s = Ri({ coordinates: r, directions: s, sizeRestrictions: a, positionRestrictions: i })).width, c = dt(r, s).height, p = l.preserveRatio ? xe(r) : to(d / c, o);
|
|
2337
2337
|
if (p) {
|
|
2338
2338
|
var f = l.respectDirection;
|
|
2339
2339
|
if (f || (f = r.width >= r.height || p === 1 ? "width" : "height"), f === "width") {
|
|
@@ -2345,16 +2345,16 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2345
2345
|
} else if (f === "height") {
|
|
2346
2346
|
var v = r.width - c * p;
|
|
2347
2347
|
if (u.left && u.right) {
|
|
2348
|
-
var
|
|
2349
|
-
s.left = -bn(v,
|
|
2348
|
+
var T = s.left, S = s.right;
|
|
2349
|
+
s.left = -bn(v, T, S), s.right = -bn(v, S, T);
|
|
2350
2350
|
} else u.left ? s.left = -v : u.right ? s.right = -v : u.top ? s.top = 0 : u.bottom && (s.bottom = 0);
|
|
2351
2351
|
}
|
|
2352
|
-
s =
|
|
2352
|
+
s = Ri({ directions: s, coordinates: r, sizeRestrictions: a, positionRestrictions: i, preserveRatio: !0, compensate: l.compensate });
|
|
2353
2353
|
}
|
|
2354
2354
|
return d = dt(r, s).width, c = dt(r, s).height, (p = l.preserveRatio ? xe(r) : to(d / c, o)) && Math.abs(p - d / c) > 1e-3 && mt.forEach(function(j) {
|
|
2355
2355
|
u[j] || (s[j] = 0);
|
|
2356
|
-
}),
|
|
2357
|
-
} }, moveAlgorithm: { type: Function, default:
|
|
2356
|
+
}), xo({ event: new Lo({ left: -s.left, top: -s.top }), coordinates: { width: n.width + s.right + s.left, height: n.height + s.top + s.bottom, left: n.left, top: n.top }, positionRestrictions: i });
|
|
2357
|
+
} }, moveAlgorithm: { type: Function, default: xo }, initStretcher: { type: Function, default: function(e) {
|
|
2358
2358
|
var t = e.stretcher, n = e.imageSize, o = xe(n);
|
|
2359
2359
|
t.style.width = n.width + "px", t.style.height = t.clientWidth / o + "px", t.style.width = t.clientWidth + "px";
|
|
2360
2360
|
} }, fitCoordinates: { type: Function, default: function(e) {
|
|
@@ -2374,7 +2374,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2374
2374
|
var t = e.imageSize, n = {};
|
|
2375
2375
|
return e.imageRestriction !== "none" && (n = { left: 0, top: 0, right: t.width, bottom: t.height }), n;
|
|
2376
2376
|
} } }, data: function() {
|
|
2377
|
-
return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: Se({},
|
|
2377
|
+
return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: Se({}, Si) };
|
|
2378
2378
|
}, computed: { image: function() {
|
|
2379
2379
|
return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };
|
|
2380
2380
|
}, imageTransforms: function() {
|
|
@@ -2387,8 +2387,8 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2387
2387
|
}, initialized: function() {
|
|
2388
2388
|
return !!(this.visibleArea && this.imageLoaded);
|
|
2389
2389
|
}, settings: function() {
|
|
2390
|
-
var e =
|
|
2391
|
-
return { moveImage:
|
|
2390
|
+
var e = Co(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });
|
|
2391
|
+
return { moveImage: Co(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: e };
|
|
2392
2392
|
}, coefficient: function() {
|
|
2393
2393
|
return this.visibleArea ? this.visibleArea.width / this.boundaries.width : 0;
|
|
2394
2394
|
}, areaRestrictions: function() {
|
|
@@ -2401,10 +2401,10 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2401
2401
|
if (e = function(o) {
|
|
2402
2402
|
var i = o.areaRestrictions, a = o.sizeRestrictions, r = o.boundaries, l = o.positionRestrictions, s = ve(ve({}, a), { minWidth: a.minWidth !== void 0 ? a.minWidth : 0, minHeight: a.minHeight !== void 0 ? a.minHeight : 0, maxWidth: a.maxWidth !== void 0 ? a.maxWidth : 1 / 0, maxHeight: a.maxHeight !== void 0 ? a.maxHeight : 1 / 0 });
|
|
2403
2403
|
l.left !== void 0 && l.right !== void 0 && (s.maxWidth = Math.min(s.maxWidth, l.right - l.left)), l.bottom !== void 0 && l.top !== void 0 && (s.maxHeight = Math.min(s.maxHeight, l.bottom - l.top));
|
|
2404
|
-
var u =
|
|
2404
|
+
var u = So(i), d = Ca(r, u);
|
|
2405
2405
|
return u.width < 1 / 0 && (!s.maxWidth || s.maxWidth > d.width) && (s.maxWidth = Math.min(s.maxWidth, d.width)), u.height < 1 / 0 && (!s.maxHeight || s.maxHeight > d.height) && (s.maxHeight = Math.min(s.maxHeight, d.height)), s.minWidth > s.maxWidth && (s.minWidth = s.maxWidth, s.widthFrozen = !0), s.minHeight > s.maxHeight && (s.minHeight = s.maxHeight, s.heightFrozen = !0), s;
|
|
2406
2406
|
}({ sizeRestrictions: e, areaRestrictions: this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }), imageSize: this.imageSize, boundaries: this.boundaries, positionRestrictions: this.positionRestrictions, imageRestriction: this.imageRestriction, visibleArea: this.visibleArea, stencilSize: this.getStencilSize() }), this.visibleArea && this.stencilSize) {
|
|
2407
|
-
var t = this.getStencilSize(), n =
|
|
2407
|
+
var t = this.getStencilSize(), n = So(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
|
|
2408
2408
|
e.maxWidth = Math.min(e.maxWidth, n.width * t.width / this.boundaries.width), e.maxHeight = Math.min(e.maxHeight, n.height * t.height / this.boundaries.height), e.maxWidth < e.minWidth && (e.minWidth = e.maxWidth), e.maxHeight < e.minHeight && (e.minHeight = e.maxHeight);
|
|
2409
2409
|
}
|
|
2410
2410
|
return e;
|
|
@@ -2448,7 +2448,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2448
2448
|
return e[n] !== t[n];
|
|
2449
2449
|
}) && this.$nextTick(this.onPropsChange);
|
|
2450
2450
|
} }, created: function() {
|
|
2451
|
-
this.debouncedUpdate =
|
|
2451
|
+
this.debouncedUpdate = ko(this.update, this.debounce), this.debouncedDisableTransitions = ko(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
|
|
2452
2452
|
}, mounted: function() {
|
|
2453
2453
|
this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
|
|
2454
2454
|
}, unmounted: function() {
|
|
@@ -2499,7 +2499,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2499
2499
|
var i = this.autoZoomAlgorithm;
|
|
2500
2500
|
i || (i = this.stencilSize ? Dl : this.autoZoom ? Pl : Fl);
|
|
2501
2501
|
var a = i({ event: { type: e, params: o }, visibleArea: t, coordinates: n, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
|
|
2502
|
-
return Se(Se({}, a), {}, { changed: !
|
|
2502
|
+
return Se(Se({}, a), {}, { changed: !xi(a.visibleArea, t) || !xi(a.coordinates, n) });
|
|
2503
2503
|
}, runAutoZoom: function(e) {
|
|
2504
2504
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, o = n !== void 0 && n, i = kl(t, Ql), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), r = a.visibleArea, l = a.coordinates, s = a.changed;
|
|
2505
2505
|
o && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, o && s && this.debouncedDisableTransitions();
|
|
@@ -2610,7 +2610,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2610
2610
|
var e, t = this;
|
|
2611
2611
|
if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
|
|
2612
2612
|
if (function(i) {
|
|
2613
|
-
if (
|
|
2613
|
+
if (ki(i)) return !1;
|
|
2614
2614
|
var a = window.location, r = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(i) || [], l = { protocol: r[1] || "", host: r[2] || "", port: r[3] || "" }, s = function(u) {
|
|
2615
2615
|
return u.port || ((u.protocol || a.protocol) === "http" ? 80 : 433);
|
|
2616
2616
|
};
|
|
@@ -2644,7 +2644,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2644
2644
|
}));
|
|
2645
2645
|
}, onParseImage: function(e) {
|
|
2646
2646
|
var t = this, n = e.source, o = e.arrayBuffer, i = e.orientation;
|
|
2647
|
-
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, o && i && i > 1 ? ba(n) || !
|
|
2647
|
+
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, o && i && i > 1 ? ba(n) || !ki(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([o])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(a) {
|
|
2648
2648
|
for (var r = [], l = new Uint8Array(a); l.length > 0; ) {
|
|
2649
2649
|
var s = l.subarray(0, 8192);
|
|
2650
2650
|
r.push(String.fromCharCode.apply(null, Array.from ? Array.from(s) : s.slice())), l = l.subarray(8192);
|
|
@@ -2717,7 +2717,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2717
2717
|
}
|
|
2718
2718
|
if (We(t) && (t = We(i) ? a : i), We(n) && (n = We(i) ? r : i), !e && (We(t) || We(n))) {
|
|
2719
2719
|
var s = this.getStencilSize(), u = s ? xe(s) : null;
|
|
2720
|
-
We(t) && (t =
|
|
2720
|
+
We(t) && (t = Ci(u) ? u : void 0), We(n) && (n = Ci(u) ? u : void 0);
|
|
2721
2721
|
}
|
|
2722
2722
|
return { minimum: t, maximum: n };
|
|
2723
2723
|
}, getStencilSize: function() {
|
|
@@ -2726,7 +2726,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2726
2726
|
}, getPublicProperties: function() {
|
|
2727
2727
|
return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };
|
|
2728
2728
|
}, defaultCoordinates: function() {
|
|
2729
|
-
return Se({},
|
|
2729
|
+
return Se({}, Si);
|
|
2730
2730
|
}, flip: function(e, t) {
|
|
2731
2731
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = n.transitions, i = o === void 0 || o;
|
|
2732
2732
|
if (!this.transitionsActive) {
|
|
@@ -2744,7 +2744,7 @@ var Ql = ["transitions"], gt = ct("vue-advanced-cropper"), Ko = { name: "Cropper
|
|
|
2744
2744
|
r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), o && this.debouncedDisableTransitions();
|
|
2745
2745
|
}
|
|
2746
2746
|
} }, emits: ["change", "error", "ready"] }, Jl = { key: 0, ref: "canvas", style: { display: "none" } }, eu = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
|
|
2747
|
-
|
|
2747
|
+
Ho.render = function(e, t, n, o, i, a) {
|
|
2748
2748
|
return y(), ee("div", { ref: "cropper", class: a.classes.cropper }, [h("div", { ref: "stretcher", class: a.classes.stretcher }, null, 2), h("div", { class: a.classes.boundaries, style: a.boundariesStyle }, [(y(), ee(xn(n.backgroundWrapperComponent), { class: a.classes.cropperWrapper, "wheel-resize": a.settings.resizeImage.wheel, "touch-resize": a.settings.resizeImage.touch, "touch-move": a.settings.moveImage.touch, "mouse-move": a.settings.moveImage.mouse, onMove: a.onManipulateImage, onResize: a.onManipulateImage }, { default: M(function() {
|
|
2749
2749
|
return [h("div", { class: a.classes.background, style: a.boundariesStyle }, null, 6), h("div", { class: a.classes.imageWrapper }, [h("img", { ref: "image", crossorigin: i.imageAttributes.crossOrigin, src: i.imageAttributes.src, class: a.classes.image, style: a.imageStyle, onMousedown: t[1] || (t[1] = it(function() {
|
|
2750
2750
|
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), h("div", { class: a.classes.foreground, style: a.boundariesStyle }, null, 6), qe((y(), ee(xn(n.stencilComponent), Ji({ ref: "stencil", image: a.image, coordinates: i.coordinates, "stencil-coordinates": a.stencilCoordinates, transitions: a.transitionsOptions }, n.stencilProps, { onResize: a.onResize, onResizeEnd: a.onResizeEnd, onMove: a.onMove, onMoveEnd: a.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[Vn, i.imageLoaded]]), n.canvas ? (y(), ee("canvas", Jl, null, 512)) : te("", !0), n.canvas ? (y(), ee("canvas", eu, null, 512)) : te("", !0)];
|
|
@@ -2790,7 +2790,7 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
2790
2790
|
i.value && s.value ? (y(), q("div", {
|
|
2791
2791
|
key: 0,
|
|
2792
2792
|
class: "range-slider__bubble fm-typo-en-body-sm-600",
|
|
2793
|
-
style:
|
|
2793
|
+
style: fo({ left: `${l.value}%` })
|
|
2794
2794
|
}, oe(s.value), 5)) : te("", !0),
|
|
2795
2795
|
_("input", {
|
|
2796
2796
|
"aria-label": d.ariaLabel,
|
|
@@ -2799,7 +2799,7 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
2799
2799
|
max: d.max,
|
|
2800
2800
|
min: d.min,
|
|
2801
2801
|
step: d.step,
|
|
2802
|
-
style:
|
|
2802
|
+
style: fo({ "--fill": `${l.value}%` }),
|
|
2803
2803
|
type: "range",
|
|
2804
2804
|
value: a.value,
|
|
2805
2805
|
onBlur: r,
|
|
@@ -2840,11 +2840,11 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
2840
2840
|
derivedFormats: { default: 0 }
|
|
2841
2841
|
},
|
|
2842
2842
|
setup(e) {
|
|
2843
|
-
const t = e, { t: n } = ke(), { emitData: o } = Nt(), i = ["free", "1x1", "16x9"], a = W(null), r = W(null), l = W(null), s = W(null), u = W("free"), d = W(!1), c = W(null), p = W(null), f = W(0), g = W(null), k = W(1), b = W(1), v = R(() => !!a.value && a.value.size >
|
|
2843
|
+
const t = e, { t: n } = ke(), { emitData: o } = Nt(), i = ["free", "1x1", "16x9"], a = W(null), r = W(null), l = W(null), s = W(null), u = W("free"), d = W(!1), c = W(null), p = W(null), f = W(0), g = W(null), k = W(1), b = W(1), v = R(() => !!a.value && a.value.size > ri), T = R(() => {
|
|
2844
2844
|
const O = p.value, J = c.value;
|
|
2845
2845
|
return !O || !J ? !0 : f.value % 360 !== 0 ? !1 : O.width >= J.width - 1 && O.height >= J.height - 1;
|
|
2846
2846
|
}), S = R(
|
|
2847
|
-
() => t.mode === "edit" &&
|
|
2847
|
+
() => t.mode === "edit" && T.value && !!a.value && !!c.value && Tr(a.value, c.value)
|
|
2848
2848
|
);
|
|
2849
2849
|
function j({
|
|
2850
2850
|
imageSize: O,
|
|
@@ -2853,15 +2853,15 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
2853
2853
|
const me = J ?? O, pe = I.value ?? G(u.value);
|
|
2854
2854
|
return pe ? me.width / me.height > pe ? { width: me.height * pe, height: me.height } : { width: me.width, height: me.width / pe } : { width: me.width, height: me.height };
|
|
2855
2855
|
}
|
|
2856
|
-
const I = R(() => t.ratio ?
|
|
2856
|
+
const I = R(() => t.ratio ? si(t.ratio) : null), A = R(() => {
|
|
2857
2857
|
const O = I.value ?? G(u.value);
|
|
2858
2858
|
return O ? { aspectRatio: O } : {};
|
|
2859
|
-
}),
|
|
2859
|
+
}), x = na.join(","), z = "image/jpeg";
|
|
2860
2860
|
function F(O) {
|
|
2861
2861
|
return `${(O.name || "product-image").replace(/\.[^.]+$/, "")}.jpg`;
|
|
2862
2862
|
}
|
|
2863
2863
|
function G(O) {
|
|
2864
|
-
return O === "free" ? null :
|
|
2864
|
+
return O === "free" ? null : si(O);
|
|
2865
2865
|
}
|
|
2866
2866
|
function H(O) {
|
|
2867
2867
|
return O === "free" ? n("menu.product_image.editor.ratio_free") : O.replace("x", ":");
|
|
@@ -2890,7 +2890,7 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
2890
2890
|
return { width: Math.round(O.width * J), height: Math.round(O.height * J) };
|
|
2891
2891
|
}
|
|
2892
2892
|
function Q(O) {
|
|
2893
|
-
const J =
|
|
2893
|
+
const J = ho(O);
|
|
2894
2894
|
if (J) {
|
|
2895
2895
|
l.value = n(`menu.product_image.error.${J}`);
|
|
2896
2896
|
return;
|
|
@@ -2944,12 +2944,12 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
2944
2944
|
const O = a.value;
|
|
2945
2945
|
if (!O) return null;
|
|
2946
2946
|
if (S.value) return O;
|
|
2947
|
-
if (
|
|
2948
|
-
return
|
|
2947
|
+
if (T.value)
|
|
2948
|
+
return go(O, n("menu.product_image.error.unreadable"));
|
|
2949
2949
|
const J = (pe = (me = s.value) == null ? void 0 : me.getResult()) == null ? void 0 : pe.canvas;
|
|
2950
2950
|
return J ? Rr(J, { fileName: F(O), mime: z }) : null;
|
|
2951
2951
|
};
|
|
2952
|
-
return
|
|
2952
|
+
return Mo(() => {
|
|
2953
2953
|
r.value && URL.revokeObjectURL(r.value);
|
|
2954
2954
|
}), Ae(a, (O) => o(O ? he : null), { immediate: !0 }), (O, J) => {
|
|
2955
2955
|
var Y;
|
|
@@ -2961,7 +2961,7 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
2961
2961
|
onPointerdown: J[0] || (J[0] = (ne) => d.value = !0),
|
|
2962
2962
|
onWheel: J[1] || (J[1] = (ne) => d.value = !0)
|
|
2963
2963
|
}, [
|
|
2964
|
-
h(m(
|
|
2964
|
+
h(m(Ho), {
|
|
2965
2965
|
ref_key: "cropperRef",
|
|
2966
2966
|
ref: s,
|
|
2967
2967
|
canvas: { maxWidth: 4096, maxHeight: 4096 },
|
|
@@ -2969,7 +2969,7 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
2969
2969
|
debounce: !1,
|
|
2970
2970
|
"default-size": j,
|
|
2971
2971
|
src: r.value,
|
|
2972
|
-
"stencil-props":
|
|
2972
|
+
"stencil-props": A.value,
|
|
2973
2973
|
transitions: !1,
|
|
2974
2974
|
onChange: K
|
|
2975
2975
|
}, null, 8, ["src", "stencil-props"])
|
|
@@ -3066,14 +3066,14 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
3066
3066
|
}),
|
|
3067
3067
|
_("p", Cu, oe(m(n)("menu.product_image.editor.oversized", {
|
|
3068
3068
|
size: w(((Y = a.value) == null ? void 0 : Y.size) ?? 0),
|
|
3069
|
-
limit: w(m(
|
|
3069
|
+
limit: w(m(ri)),
|
|
3070
3070
|
edge: m(Kn)
|
|
3071
3071
|
})), 1)
|
|
3072
3072
|
])) : te("", !0),
|
|
3073
3073
|
$.value ? (y(), q("p", Su, oe($.value), 1)) : te("", !0)
|
|
3074
3074
|
], 64)) : (y(), ee(me, {
|
|
3075
3075
|
key: 0,
|
|
3076
|
-
accept: m(
|
|
3076
|
+
accept: m(x),
|
|
3077
3077
|
"content-class": "h-[280px] w-full",
|
|
3078
3078
|
onFileUpload: se
|
|
3079
3079
|
}, {
|
|
@@ -3184,12 +3184,12 @@ const tu = { class: "range-slider relative flex items-center" }, nu = ["aria-lab
|
|
|
3184
3184
|
]);
|
|
3185
3185
|
};
|
|
3186
3186
|
}
|
|
3187
|
-
}),
|
|
3187
|
+
}), To = W({});
|
|
3188
3188
|
function Vu(e) {
|
|
3189
|
-
|
|
3189
|
+
To.value = { ...To.value, [e]: Date.now() };
|
|
3190
3190
|
}
|
|
3191
3191
|
function on(e, t) {
|
|
3192
|
-
const n =
|
|
3192
|
+
const n = To.value[t];
|
|
3193
3193
|
return !e || !n ? e : `${e}${e.includes("?") ? "&" : "?"}t=${n}`;
|
|
3194
3194
|
}
|
|
3195
3195
|
const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
@@ -3207,7 +3207,7 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3207
3207
|
}, tc = {
|
|
3208
3208
|
key: 1,
|
|
3209
3209
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
3210
|
-
}, nc = { class: "grid w-[144px] shrink-0 grid-cols-3" }, oc = { class: "space-y-8" }, ic = { class: "fm-typo-en-title-sm-600" }, ac = { class: "flex items-start gap-12" }, rc = { class: "fm-typo-en-body-lg-400" }, sc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lc = { class: "flex gap-8 items-center justify-start" }, uc = { class: "fm-typo-en-title-md-600" }, cc = { class: "flex h-[420px] items-center justify-center overflow-hidden rounded-md" }, dc = ["alt", "src"],
|
|
3210
|
+
}, nc = { class: "grid w-[144px] shrink-0 grid-cols-3" }, oc = { class: "space-y-8" }, ic = { class: "fm-typo-en-title-sm-600" }, ac = { class: "flex items-start gap-12" }, rc = { class: "fm-typo-en-body-lg-400" }, sc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lc = { class: "flex gap-8 items-center justify-start" }, uc = { class: "fm-typo-en-title-md-600" }, cc = { class: "flex h-[420px] items-center justify-center overflow-hidden rounded-md" }, dc = ["alt", "src"], Ei = 3 * 60 * 1e3, mc = /* @__PURE__ */ ye({
|
|
3211
3211
|
__name: "ManageImageDrawer",
|
|
3212
3212
|
props: {
|
|
3213
3213
|
modelValue: { type: Boolean },
|
|
@@ -3223,7 +3223,7 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3223
3223
|
const n = e, o = t, { t: i } = ke(), a = nt(), r = Je(), l = De(), s = R(() => l.state.featureFlags.autoGenerateImageAspectRatio), u = R({
|
|
3224
3224
|
get: () => n.modelValue,
|
|
3225
3225
|
set: (C) => o("update:modelValue", C)
|
|
3226
|
-
}), d = R(() => n.disabled || n.coverOnly), c = W(null), p = W(null), f = W({}), g = W(!1), k = W({}), b = W(null), v = W({}),
|
|
3226
|
+
}), d = R(() => n.disabled || n.coverOnly), c = W(null), p = W(null), f = W({}), g = W(!1), k = W({}), b = W(null), v = W({}), T = W({});
|
|
3227
3227
|
let S = null;
|
|
3228
3228
|
const j = {
|
|
3229
3229
|
"1x1": "menu_grid",
|
|
@@ -3231,20 +3231,20 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3231
3231
|
};
|
|
3232
3232
|
function I(C, E) {
|
|
3233
3233
|
if (!c.value || E !== "active") return null;
|
|
3234
|
-
const Y =
|
|
3234
|
+
const Y = li(c.value.url, C), ne = v.value[C];
|
|
3235
3235
|
return ne ? `${Y}&t=${ne}` : Y;
|
|
3236
3236
|
}
|
|
3237
|
-
const
|
|
3237
|
+
const A = W(!1), x = W(null), z = R(() => {
|
|
3238
3238
|
if (!c.value) return null;
|
|
3239
|
-
const C =
|
|
3239
|
+
const C = x.value;
|
|
3240
3240
|
if (!C) return on(c.value.url, c.value._id);
|
|
3241
|
-
const E =
|
|
3241
|
+
const E = li(c.value.url, C), Y = v.value[C];
|
|
3242
3242
|
return Y ? `${E}&t=${Y}` : E;
|
|
3243
3243
|
}), F = R(
|
|
3244
|
-
() =>
|
|
3244
|
+
() => x.value ? qn(x.value) : i("menu.product_image.manage.original")
|
|
3245
3245
|
);
|
|
3246
3246
|
function G(C) {
|
|
3247
|
-
|
|
3247
|
+
x.value = C, A.value = !0;
|
|
3248
3248
|
}
|
|
3249
3249
|
function H(C) {
|
|
3250
3250
|
const E = /* @__PURE__ */ new Set();
|
|
@@ -3265,7 +3265,7 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3265
3265
|
const C = Object.keys(((Y = c.value) == null ? void 0 : Y.imageSet) ?? {});
|
|
3266
3266
|
return [...Ot.filter((ne) => C.includes(ne)), ...w.value].map((ne) => {
|
|
3267
3267
|
var be;
|
|
3268
|
-
const de =
|
|
3268
|
+
const de = T.value[ne] ? "pending" : f.value[ne];
|
|
3269
3269
|
return {
|
|
3270
3270
|
ratio: ne,
|
|
3271
3271
|
label: qn(ne),
|
|
@@ -3299,31 +3299,31 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3299
3299
|
f.value = Object.fromEntries(
|
|
3300
3300
|
((Y == null ? void 0 : Y.variants) ?? []).map((D) => [D.aspectRatio, D.status])
|
|
3301
3301
|
), g.value = !0;
|
|
3302
|
-
const de = Date.now(), be = { ...
|
|
3302
|
+
const de = Date.now(), be = { ...T.value };
|
|
3303
3303
|
Object.entries(be).forEach(([D, B]) => {
|
|
3304
3304
|
const X = f.value[D] === "active" && ne[D] !== "active", ue = f.value[D] === "failed";
|
|
3305
3305
|
!X && !ue && de < B || (delete be[D], v.value = { ...v.value, [D]: de });
|
|
3306
|
-
}),
|
|
3306
|
+
}), T.value = be;
|
|
3307
3307
|
} catch {
|
|
3308
3308
|
return;
|
|
3309
3309
|
}
|
|
3310
|
-
Q(), (Object.values(f.value).some((E) => E === "pending") || Object.keys(
|
|
3310
|
+
Q(), (Object.values(f.value).some((E) => E === "pending") || Object.keys(T.value).length > 0) && n.modelValue && (S = setTimeout(se, 5e3));
|
|
3311
3311
|
}
|
|
3312
3312
|
Ae(
|
|
3313
3313
|
() => [n.modelValue, n.image],
|
|
3314
3314
|
([C, E]) => {
|
|
3315
3315
|
if (!C) {
|
|
3316
|
-
Q(),
|
|
3316
|
+
Q(), A.value = !1;
|
|
3317
3317
|
return;
|
|
3318
3318
|
}
|
|
3319
|
-
c.value = E ? { ...E, imageSet: { ...E.imageSet } } : null, p.value = c.value ? { ...c.value, imageSet: { ...c.value.imageSet } } : null, f.value = {}, g.value = !1, k.value = {}, v.value = {},
|
|
3319
|
+
c.value = E ? { ...E, imageSet: { ...E.imageSet } } : null, p.value = c.value ? { ...c.value, imageSet: { ...c.value.imageSet } } : null, f.value = {}, g.value = !1, k.value = {}, v.value = {}, T.value = {}, b.value = null, se();
|
|
3320
3320
|
},
|
|
3321
3321
|
{ immediate: !0 }
|
|
3322
|
-
),
|
|
3322
|
+
), Mo(Q);
|
|
3323
3323
|
async function K(C) {
|
|
3324
3324
|
if (!(!c.value || !C.length))
|
|
3325
3325
|
try {
|
|
3326
|
-
c.value = await
|
|
3326
|
+
c.value = await ui(n.itemId, c.value, C), se();
|
|
3327
3327
|
} catch (E) {
|
|
3328
3328
|
r.open({ message: `${E}`, type: "error" });
|
|
3329
3329
|
}
|
|
@@ -3389,10 +3389,7 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3389
3389
|
ge(C.ratio, async () => {
|
|
3390
3390
|
c.value = await $r(n.itemId, E, C.ratio, ne);
|
|
3391
3391
|
const de = { ...k.value };
|
|
3392
|
-
delete de[C.ratio], k.value = de,
|
|
3393
|
-
...x.value,
|
|
3394
|
-
[C.ratio]: Date.now() + ao
|
|
3395
|
-
}, r.open({ message: i("menu.product_image.replace.queued"), type: "success" }), se();
|
|
3392
|
+
delete de[C.ratio], k.value = de, v.value = { ...v.value, [C.ratio]: Date.now() }, r.open({ message: i("menu.product_image.replace.queued"), type: "success" }), se();
|
|
3396
3393
|
});
|
|
3397
3394
|
});
|
|
3398
3395
|
}
|
|
@@ -3402,15 +3399,15 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3402
3399
|
const E = c.value;
|
|
3403
3400
|
if (k.value[C.ratio] === !0 || g.value && !f.value[C.ratio]) {
|
|
3404
3401
|
ge(C.ratio, async () => {
|
|
3405
|
-
c.value = await
|
|
3402
|
+
c.value = await ui(n.itemId, E, [C.ratio], {
|
|
3406
3403
|
// Add format adds the key to imageSet before this button is pressed. It is
|
|
3407
3404
|
// local-only at that point, so it must still be sent to media-service.
|
|
3408
3405
|
includeExisting: k.value[C.ratio] === !0
|
|
3409
3406
|
});
|
|
3410
3407
|
const ne = { ...k.value };
|
|
3411
|
-
delete ne[C.ratio], k.value = ne,
|
|
3412
|
-
...
|
|
3413
|
-
[C.ratio]: Date.now() +
|
|
3408
|
+
delete ne[C.ratio], k.value = ne, T.value = {
|
|
3409
|
+
...T.value,
|
|
3410
|
+
[C.ratio]: Date.now() + Ei
|
|
3414
3411
|
}, r.open({ message: i("menu.product_image.regenerate.queued"), type: "success" }), se();
|
|
3415
3412
|
});
|
|
3416
3413
|
return;
|
|
@@ -3440,9 +3437,9 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3440
3437
|
de
|
|
3441
3438
|
);
|
|
3442
3439
|
const be = { ...k.value };
|
|
3443
|
-
delete be[C.ratio], k.value = be,
|
|
3444
|
-
...
|
|
3445
|
-
[C.ratio]: Date.now() +
|
|
3440
|
+
delete be[C.ratio], k.value = be, T.value = {
|
|
3441
|
+
...T.value,
|
|
3442
|
+
[C.ratio]: Date.now() + Ei
|
|
3446
3443
|
}, r.open({ message: i("menu.product_image.regenerate.queued"), type: "success" }), se();
|
|
3447
3444
|
});
|
|
3448
3445
|
}
|
|
@@ -3650,10 +3647,10 @@ const Mu = { class: "fm-typo-en-title-md-600 mr-auto" }, Uu = {
|
|
|
3650
3647
|
])
|
|
3651
3648
|
])) : te("", !0),
|
|
3652
3649
|
h(be, {
|
|
3653
|
-
modelValue:
|
|
3654
|
-
"onUpdate:modelValue": E[2] || (E[2] = (X) =>
|
|
3650
|
+
modelValue: A.value,
|
|
3651
|
+
"onUpdate:modelValue": E[2] || (E[2] = (X) => A.value = X),
|
|
3655
3652
|
"max-width": 560,
|
|
3656
|
-
"onOn:clickedAway": E[3] || (E[3] = (X) =>
|
|
3653
|
+
"onOn:clickedAway": E[3] || (E[3] = (X) => A.value = !1)
|
|
3657
3654
|
}, {
|
|
3658
3655
|
"dialog-header": M(() => [
|
|
3659
3656
|
_("p", uc, oe(F.value), 1)
|
|
@@ -3772,7 +3769,7 @@ function Ln(e, t) {
|
|
|
3772
3769
|
function n(o) {
|
|
3773
3770
|
t(o.detail);
|
|
3774
3771
|
}
|
|
3775
|
-
Gt(() => window.addEventListener(e, n)),
|
|
3772
|
+
Gt(() => window.addEventListener(e, n)), Uo(() => window.removeEventListener(e, n));
|
|
3776
3773
|
}
|
|
3777
3774
|
const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12" }, bc = { class: "grid gap-16 [grid-template-columns:repeat(auto-fill,minmax(160px,1fr))]" }, yc = { class: "fm-typo-en-body-md-400 text-center px-16" }, _c = ["accept"], wc = ["disabled", "onClick"], kc = { class: "absolute top-8 left-8 right-8 flex items-center justify-end gap-4 pointer-events-none" }, Cc = {
|
|
3778
3775
|
key: 0,
|
|
@@ -3793,9 +3790,9 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3793
3790
|
},
|
|
3794
3791
|
emits: ["update:modelValue", "update:staged"],
|
|
3795
3792
|
setup(e, { emit: t }) {
|
|
3796
|
-
const n = e, o = t, { t: i } = ke(), a = nt(), r = Je(), l = ut(r), s = De(), u = R(() => s.state.featureFlags.autoGenerateImageAspectRatio), d = W(null), c = W(!1), p = W(null), f = W(!1), g = mn(), k = R(() => !!g.showRemy), b = Pa("product-image-field"), v = W(null),
|
|
3797
|
-
|
|
3798
|
-
const S = R(() => n.modelValue ?? []), j = R(() => S.value.length > 0 ? S.value : n.legacyThumbnail ? [
|
|
3793
|
+
const n = e, o = t, { t: i } = ke(), a = nt(), r = Je(), l = ut(r), s = De(), u = R(() => s.state.featureFlags.autoGenerateImageAspectRatio), d = W(null), c = W(!1), p = W(null), f = W(!1), g = mn(), k = R(() => !!g.showRemy), b = Pa("product-image-field"), v = W(null), T = W(!1);
|
|
3794
|
+
Uo(() => Ma(b));
|
|
3795
|
+
const S = R(() => n.modelValue ?? []), j = R(() => S.value.length > 0 ? S.value : n.legacyThumbnail ? [ci(n.legacyThumbnail)] : []), I = R(() => n.staged ?? []), A = R(() => n.staged !== null && n.staged !== void 0), x = R(
|
|
3799
3796
|
() => j.value.find((P) => P._id === p.value) ?? null
|
|
3800
3797
|
);
|
|
3801
3798
|
function z(P) {
|
|
@@ -3823,8 +3820,8 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3823
3820
|
n.disabled || n.coverOnly || Oi(P.url, P._id);
|
|
3824
3821
|
}
|
|
3825
3822
|
async function Q(P, ae) {
|
|
3826
|
-
if (!(n.disabled || n.coverOnly ||
|
|
3827
|
-
|
|
3823
|
+
if (!(n.disabled || n.coverOnly || T.value)) {
|
|
3824
|
+
T.value = !0;
|
|
3828
3825
|
try {
|
|
3829
3826
|
const ie = await ae, V = Vr(ie);
|
|
3830
3827
|
if (V) throw new Error(i(`menu.product_image.error.${V}`));
|
|
@@ -3833,7 +3830,7 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3833
3830
|
} catch (ie) {
|
|
3834
3831
|
w(ie);
|
|
3835
3832
|
} finally {
|
|
3836
|
-
|
|
3833
|
+
T.value = !1;
|
|
3837
3834
|
}
|
|
3838
3835
|
}
|
|
3839
3836
|
}
|
|
@@ -3854,9 +3851,9 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3854
3851
|
} catch {
|
|
3855
3852
|
throw new Error(i("menu.product_image.error.unreadable"));
|
|
3856
3853
|
}
|
|
3857
|
-
const V =
|
|
3854
|
+
const V = ho(ie);
|
|
3858
3855
|
if (V) throw new Error(i(`menu.product_image.error.${V}`));
|
|
3859
|
-
if (ie = await
|
|
3856
|
+
if (ie = await go(ie, i("menu.product_image.error.unreadable")), P.type === "staged") {
|
|
3860
3857
|
const fe = I.value.find((_e) => _e._id === P.imageId);
|
|
3861
3858
|
if (!fe) return;
|
|
3862
3859
|
URL.revokeObjectURL(fe.previewUrl), o(
|
|
@@ -3877,8 +3874,8 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3877
3874
|
}
|
|
3878
3875
|
async function ce(P, ae) {
|
|
3879
3876
|
const ie = await l.minor(
|
|
3880
|
-
async () => await
|
|
3881
|
-
aspectRatios:
|
|
3877
|
+
async () => await di(n.itemId, ae, {
|
|
3878
|
+
aspectRatios: mi(u.value),
|
|
3882
3879
|
unreadableMessage: i("menu.product_image.error.unreadable")
|
|
3883
3880
|
}),
|
|
3884
3881
|
{
|
|
@@ -3936,7 +3933,7 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3936
3933
|
async function O(P) {
|
|
3937
3934
|
if (n.disabled || n.coverOnly || !P.length) return;
|
|
3938
3935
|
const ae = P.filter((V) => {
|
|
3939
|
-
const L =
|
|
3936
|
+
const L = ho(V);
|
|
3940
3937
|
return L && r.open({ message: i(`menu.product_image.error.${L}`), type: "error" }), !L;
|
|
3941
3938
|
});
|
|
3942
3939
|
if (!ae.length) return;
|
|
@@ -3951,7 +3948,7 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3951
3948
|
for (const _e of ae.slice(V))
|
|
3952
3949
|
try {
|
|
3953
3950
|
ie.push(
|
|
3954
|
-
await
|
|
3951
|
+
await go(_e, i("menu.product_image.error.unreadable"))
|
|
3955
3952
|
);
|
|
3956
3953
|
} catch (re) {
|
|
3957
3954
|
w(re);
|
|
@@ -3970,7 +3967,7 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3970
3967
|
async function J(P) {
|
|
3971
3968
|
const ae = !S.value.length && !I.value.length;
|
|
3972
3969
|
if (!n.itemId) {
|
|
3973
|
-
if (!
|
|
3970
|
+
if (!A.value) {
|
|
3974
3971
|
r.open({ message: i("menu.product_image.error.no_item"), type: "error" });
|
|
3975
3972
|
return;
|
|
3976
3973
|
}
|
|
@@ -3980,12 +3977,12 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3980
3977
|
}
|
|
3981
3978
|
await l.minor(
|
|
3982
3979
|
async () => {
|
|
3983
|
-
let ie = S.value.length ? [...S.value] : n.legacyThumbnail ? [
|
|
3980
|
+
let ie = S.value.length ? [...S.value] : n.legacyThumbnail ? [ci(n.legacyThumbnail)] : [];
|
|
3984
3981
|
const V = [];
|
|
3985
3982
|
try {
|
|
3986
3983
|
for (const L of P) {
|
|
3987
|
-
const fe = await
|
|
3988
|
-
aspectRatios:
|
|
3984
|
+
const fe = await di(n.itemId, L, {
|
|
3985
|
+
aspectRatios: mi(u.value),
|
|
3989
3986
|
unreadableMessage: i("menu.product_image.error.unreadable")
|
|
3990
3987
|
});
|
|
3991
3988
|
V.push({ itemId: n.itemId, imageId: fe._id }), ie = [...ie, { ...fe, isDefault: ie.length === 0 }];
|
|
@@ -4244,7 +4241,7 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
4244
4241
|
], 40, Sc),
|
|
4245
4242
|
k.value ? (y(), q("button", {
|
|
4246
4243
|
key: 0,
|
|
4247
|
-
disabled:
|
|
4244
|
+
disabled: T.value,
|
|
4248
4245
|
title: m(i)("menu.remy.title"),
|
|
4249
4246
|
class: "rounded-full bg-fm-color-neutral-white w-32 h-32 flex items-center justify-center shadow-sm",
|
|
4250
4247
|
type: "button",
|
|
@@ -4303,7 +4300,7 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
4303
4300
|
], 8, Ec),
|
|
4304
4301
|
k.value ? (y(), q("button", {
|
|
4305
4302
|
key: 0,
|
|
4306
|
-
disabled:
|
|
4303
|
+
disabled: T.value,
|
|
4307
4304
|
title: m(i)("menu.remy.title"),
|
|
4308
4305
|
class: "rounded-full bg-fm-color-neutral-white w-32 h-32 flex items-center justify-center shadow-sm",
|
|
4309
4306
|
type: "button",
|
|
@@ -4337,7 +4334,7 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
4337
4334
|
"can-clear-cover": P.coverOnly || S.value.length > 1,
|
|
4338
4335
|
"cover-only": P.coverOnly,
|
|
4339
4336
|
disabled: P.disabled,
|
|
4340
|
-
image:
|
|
4337
|
+
image: x.value,
|
|
4341
4338
|
"item-id": P.itemId,
|
|
4342
4339
|
"menu-items": P.menuItems,
|
|
4343
4340
|
"onUpdate:image": ue
|
|
@@ -4373,11 +4370,11 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
4373
4370
|
setup(e, { emit: t }) {
|
|
4374
4371
|
const n = e, o = t, { t: i } = ke(), a = W([]), r = W([]), l = W(""), s = W(""), u = W(""), d = W(""), c = W(!0), p = W(!1);
|
|
4375
4372
|
function f() {
|
|
4376
|
-
const
|
|
4373
|
+
const x = n.productNameLocale || {}, z = n.productDescriptionLocale || {}, F = /* @__PURE__ */ new Set([...Object.keys(x), ...Object.keys(z)]);
|
|
4377
4374
|
return F.size === 0 ? [] : Array.from(F).map((G) => ({
|
|
4378
4375
|
localeCode: G,
|
|
4379
|
-
localeName:
|
|
4380
|
-
nameValue:
|
|
4376
|
+
localeName: yo(G),
|
|
4377
|
+
nameValue: x[G] || "",
|
|
4381
4378
|
descriptionValue: z[G] || ""
|
|
4382
4379
|
}));
|
|
4383
4380
|
}
|
|
@@ -4389,30 +4386,30 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
4389
4386
|
n.productNameLocale,
|
|
4390
4387
|
n.productDescriptionLocale
|
|
4391
4388
|
],
|
|
4392
|
-
([
|
|
4393
|
-
|
|
4389
|
+
([x]) => {
|
|
4390
|
+
x && (a.value = f(), r.value = Fe.clone(a.value), l.value = n.productName, s.value = n.productDescription || "", u.value = n.productName, d.value = n.productDescription || "", n.initialSection === "name" ? (c.value = !0, p.value = !1) : (c.value = !1, p.value = !0));
|
|
4394
4391
|
},
|
|
4395
4392
|
{ immediate: !0 }
|
|
4396
4393
|
);
|
|
4397
|
-
const g = R(() => a.value.map((
|
|
4398
|
-
function k(
|
|
4399
|
-
const z = new Set(g.value), F = new Set(
|
|
4400
|
-
for (const G of
|
|
4394
|
+
const g = R(() => a.value.map((x) => x.localeCode));
|
|
4395
|
+
function k(x) {
|
|
4396
|
+
const z = new Set(g.value), F = new Set(x);
|
|
4397
|
+
for (const G of x)
|
|
4401
4398
|
z.has(G) || a.value.push({
|
|
4402
4399
|
localeCode: G,
|
|
4403
|
-
localeName:
|
|
4400
|
+
localeName: yo(G),
|
|
4404
4401
|
nameValue: "",
|
|
4405
4402
|
descriptionValue: ""
|
|
4406
4403
|
});
|
|
4407
4404
|
a.value = a.value.filter((G) => F.has(G.localeCode));
|
|
4408
4405
|
}
|
|
4409
4406
|
function b() {
|
|
4410
|
-
const
|
|
4411
|
-
return
|
|
4407
|
+
const x = !Fe.isEqual(a.value, r.value), z = l.value !== u.value, F = s.value !== d.value;
|
|
4408
|
+
return x || z || F;
|
|
4412
4409
|
}
|
|
4413
4410
|
function v() {
|
|
4414
4411
|
o("update:name", l.value.trim()), o("update:description", s.value.trim());
|
|
4415
|
-
const
|
|
4412
|
+
const x = a.value.filter((H) => H.nameValue.trim()), z = x.length === 0 ? void 0 : x.reduce(
|
|
4416
4413
|
(H, w) => (H[w.localeCode] = w.nameValue.trim(), H),
|
|
4417
4414
|
{}
|
|
4418
4415
|
), F = a.value.filter((H) => H.descriptionValue.trim()), G = F.length === 0 ? void 0 : F.reduce(
|
|
@@ -4421,20 +4418,20 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
4421
4418
|
);
|
|
4422
4419
|
o("update:nameLocale", z), o("update:descriptionLocale", G), o("update:modelValue", !1);
|
|
4423
4420
|
}
|
|
4424
|
-
function
|
|
4421
|
+
function T() {
|
|
4425
4422
|
o("update:modelValue", !1);
|
|
4426
4423
|
}
|
|
4427
|
-
const S = Xt(b,
|
|
4424
|
+
const S = Xt(b, T), j = R({
|
|
4428
4425
|
get: () => n.modelValue,
|
|
4429
|
-
set: (
|
|
4426
|
+
set: (x) => o("update:modelValue", x)
|
|
4430
4427
|
});
|
|
4431
4428
|
function I() {
|
|
4432
4429
|
c.value = !c.value;
|
|
4433
4430
|
}
|
|
4434
|
-
function
|
|
4431
|
+
function A() {
|
|
4435
4432
|
p.value = !p.value;
|
|
4436
4433
|
}
|
|
4437
|
-
return (
|
|
4434
|
+
return (x, z) => {
|
|
4438
4435
|
const F = U("FmIcon"), G = U("fm-button"), H = U("fm-dialog");
|
|
4439
4436
|
return y(), ee(H, {
|
|
4440
4437
|
modelValue: j.value,
|
|
@@ -4503,7 +4500,7 @@ const vc = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
4503
4500
|
_("div", Bc, [
|
|
4504
4501
|
_("div", {
|
|
4505
4502
|
class: "flex items-center gap-16 cursor-pointer",
|
|
4506
|
-
onClick:
|
|
4503
|
+
onClick: A
|
|
4507
4504
|
}, [
|
|
4508
4505
|
h(F, {
|
|
4509
4506
|
name: p.value ? "keyboard_arrow_down" : "keyboard_arrow_right"
|
|
@@ -4587,23 +4584,23 @@ const Xc = {
|
|
|
4587
4584
|
async function u([v]) {
|
|
4588
4585
|
if (!v) return;
|
|
4589
4586
|
s.value = !0;
|
|
4590
|
-
const
|
|
4591
|
-
|
|
4587
|
+
const T = new FileReader();
|
|
4588
|
+
T.onload = () => {
|
|
4592
4589
|
const S = new Image();
|
|
4593
|
-
S.src =
|
|
4590
|
+
S.src = T.result, l.value = T.result, S.onload = () => {
|
|
4594
4591
|
const j = Yc(S, 1.7777777777777777);
|
|
4595
4592
|
r.value = j, s.value = !1;
|
|
4596
4593
|
}, S.onerror = () => {
|
|
4597
4594
|
s.value = !1;
|
|
4598
4595
|
};
|
|
4599
|
-
},
|
|
4596
|
+
}, T.readAsDataURL(v);
|
|
4600
4597
|
}
|
|
4601
4598
|
const d = (v) => {
|
|
4602
4599
|
u([v]);
|
|
4603
4600
|
};
|
|
4604
4601
|
async function c(v) {
|
|
4605
4602
|
!r.value && a.value && (r.value = a.value);
|
|
4606
|
-
const { canvas:
|
|
4603
|
+
const { canvas: T } = v, S = T.toDataURL("image/jpeg", 0.75);
|
|
4607
4604
|
l.value = S;
|
|
4608
4605
|
const j = await (await fetch(S)).blob(), I = new File([j], "img.jpeg", { type: "image/jpeg" });
|
|
4609
4606
|
i("update:model-value", I);
|
|
@@ -4612,7 +4609,7 @@ const Xc = {
|
|
|
4612
4609
|
r.value = void 0, l.value = void 0, i("reset:model-value");
|
|
4613
4610
|
}
|
|
4614
4611
|
const f = mn(), g = R(() => !!f.showRemy), k = Pa("image-drop-field");
|
|
4615
|
-
|
|
4612
|
+
Uo(() => Ma(k)), Ln("apply-image", (v) => {
|
|
4616
4613
|
!(v != null && v.imageData) || !Va(k) || (r.value = v.imageData, l.value = v.imageData);
|
|
4617
4614
|
});
|
|
4618
4615
|
async function b() {
|
|
@@ -4620,14 +4617,14 @@ const Xc = {
|
|
|
4620
4617
|
const v = new FileReader();
|
|
4621
4618
|
v.onload = () => {
|
|
4622
4619
|
l.value = v.result;
|
|
4623
|
-
}, v.readAsDataURL(n.modelValue), await new Promise((
|
|
4620
|
+
}, v.readAsDataURL(n.modelValue), await new Promise((T) => setTimeout(T, 100));
|
|
4624
4621
|
}
|
|
4625
4622
|
Fa(k), f.activate({
|
|
4626
4623
|
imageData: l.value,
|
|
4627
4624
|
command: "modifyImage"
|
|
4628
4625
|
});
|
|
4629
4626
|
}
|
|
4630
|
-
return (v,
|
|
4627
|
+
return (v, T) => {
|
|
4631
4628
|
const S = U("fm-icon"), j = U("fm-drop-field");
|
|
4632
4629
|
return r.value || a.value ? (y(), q("div", Xc, [
|
|
4633
4630
|
_("p", Zc, [
|
|
@@ -4637,7 +4634,7 @@ const Xc = {
|
|
|
4637
4634
|
_("div", Jc, [
|
|
4638
4635
|
_("div", ed, [
|
|
4639
4636
|
_("div", td, [
|
|
4640
|
-
h(m(
|
|
4637
|
+
h(m(Ho), {
|
|
4641
4638
|
class: "cropper h-[150px] w-[200px]",
|
|
4642
4639
|
src: r.value || a.value,
|
|
4643
4640
|
"stencil-props": {
|
|
@@ -4699,7 +4696,7 @@ const Xc = {
|
|
|
4699
4696
|
};
|
|
4700
4697
|
}
|
|
4701
4698
|
});
|
|
4702
|
-
var
|
|
4699
|
+
var ao = { env: {} };
|
|
4703
4700
|
/**
|
|
4704
4701
|
* @license
|
|
4705
4702
|
* Copyright 2017 Google LLC
|
|
@@ -4940,9 +4937,9 @@ function dd() {
|
|
|
4940
4937
|
* limitations under the License.
|
|
4941
4938
|
*/
|
|
4942
4939
|
const md = () => dd().__FIREBASE_DEFAULTS__, pd = () => {
|
|
4943
|
-
if (typeof
|
|
4940
|
+
if (typeof ao > "u" || typeof ao.env > "u")
|
|
4944
4941
|
return;
|
|
4945
|
-
const e =
|
|
4942
|
+
const e = ao.env.__FIREBASE_DEFAULTS__;
|
|
4946
4943
|
if (e)
|
|
4947
4944
|
return JSON.parse(e);
|
|
4948
4945
|
}, fd = () => {
|
|
@@ -4956,7 +4953,7 @@ const md = () => dd().__FIREBASE_DEFAULTS__, pd = () => {
|
|
|
4956
4953
|
}
|
|
4957
4954
|
const t = e && cd(e[1]);
|
|
4958
4955
|
return t && JSON.parse(t);
|
|
4959
|
-
},
|
|
4956
|
+
}, Ko = () => {
|
|
4960
4957
|
try {
|
|
4961
4958
|
return md() || pd() || fd();
|
|
4962
4959
|
} catch (e) {
|
|
@@ -4965,7 +4962,7 @@ const md = () => dd().__FIREBASE_DEFAULTS__, pd = () => {
|
|
|
4965
4962
|
}
|
|
4966
4963
|
}, hd = (e) => {
|
|
4967
4964
|
var t, n;
|
|
4968
|
-
return (n = (t =
|
|
4965
|
+
return (n = (t = Ko()) === null || t === void 0 ? void 0 : t.emulatorHosts) === null || n === void 0 ? void 0 : n[e];
|
|
4969
4966
|
}, gd = (e) => {
|
|
4970
4967
|
const t = hd(e);
|
|
4971
4968
|
if (!t)
|
|
@@ -4977,10 +4974,10 @@ const md = () => dd().__FIREBASE_DEFAULTS__, pd = () => {
|
|
|
4977
4974
|
return t[0] === "[" ? [t.substring(1, n - 1), o] : [t.substring(0, n), o];
|
|
4978
4975
|
}, Na = () => {
|
|
4979
4976
|
var e;
|
|
4980
|
-
return (e =
|
|
4977
|
+
return (e = Ko()) === null || e === void 0 ? void 0 : e.config;
|
|
4981
4978
|
}, ob = (e) => {
|
|
4982
4979
|
var t;
|
|
4983
|
-
return (t =
|
|
4980
|
+
return (t = Ko()) === null || t === void 0 ? void 0 : t[`_${e}`];
|
|
4984
4981
|
};
|
|
4985
4982
|
/**
|
|
4986
4983
|
* @license
|
|
@@ -5170,7 +5167,7 @@ function ub(e) {
|
|
|
5170
5167
|
return !1;
|
|
5171
5168
|
return !0;
|
|
5172
5169
|
}
|
|
5173
|
-
function
|
|
5170
|
+
function Ro(e, t) {
|
|
5174
5171
|
if (e === t)
|
|
5175
5172
|
return !0;
|
|
5176
5173
|
const n = Object.keys(e), o = Object.keys(t);
|
|
@@ -5179,7 +5176,7 @@ function Io(e, t) {
|
|
|
5179
5176
|
return !1;
|
|
5180
5177
|
const a = e[i], r = t[i];
|
|
5181
5178
|
if (Di(a) && Di(r)) {
|
|
5182
|
-
if (!
|
|
5179
|
+
if (!Ro(a, r))
|
|
5183
5180
|
return !1;
|
|
5184
5181
|
} else if (a !== r)
|
|
5185
5182
|
return !1;
|
|
@@ -5266,7 +5263,7 @@ class Sd {
|
|
|
5266
5263
|
next: t,
|
|
5267
5264
|
error: n,
|
|
5268
5265
|
complete: o
|
|
5269
|
-
}, i.next === void 0 && (i.next =
|
|
5266
|
+
}, i.next === void 0 && (i.next = ro), i.error === void 0 && (i.error = ro), i.complete === void 0 && (i.complete = ro);
|
|
5270
5267
|
const a = this.unsubscribeOne.bind(this, this.observers.length);
|
|
5271
5268
|
return this.finalized && this.task.then(() => {
|
|
5272
5269
|
try {
|
|
@@ -5312,7 +5309,7 @@ function xd(e, t) {
|
|
|
5312
5309
|
return !0;
|
|
5313
5310
|
return !1;
|
|
5314
5311
|
}
|
|
5315
|
-
function
|
|
5312
|
+
function ro() {
|
|
5316
5313
|
}
|
|
5317
5314
|
/**
|
|
5318
5315
|
* @license
|
|
@@ -5719,7 +5716,7 @@ function Md() {
|
|
|
5719
5716
|
IDBCursor.prototype.continuePrimaryKey
|
|
5720
5717
|
]);
|
|
5721
5718
|
}
|
|
5722
|
-
const ja = /* @__PURE__ */ new WeakMap(),
|
|
5719
|
+
const ja = /* @__PURE__ */ new WeakMap(), Io = /* @__PURE__ */ new WeakMap(), Ga = /* @__PURE__ */ new WeakMap(), so = /* @__PURE__ */ new WeakMap(), qo = /* @__PURE__ */ new WeakMap();
|
|
5723
5720
|
function Ud(e) {
|
|
5724
5721
|
const t = new Promise((n, o) => {
|
|
5725
5722
|
const i = () => {
|
|
@@ -5734,10 +5731,10 @@ function Ud(e) {
|
|
|
5734
5731
|
return t.then((n) => {
|
|
5735
5732
|
n instanceof IDBCursor && ja.set(n, e);
|
|
5736
5733
|
}).catch(() => {
|
|
5737
|
-
}),
|
|
5734
|
+
}), qo.set(t, e), t;
|
|
5738
5735
|
}
|
|
5739
5736
|
function zd(e) {
|
|
5740
|
-
if (
|
|
5737
|
+
if (Io.has(e))
|
|
5741
5738
|
return;
|
|
5742
5739
|
const t = new Promise((n, o) => {
|
|
5743
5740
|
const i = () => {
|
|
@@ -5749,13 +5746,13 @@ function zd(e) {
|
|
|
5749
5746
|
};
|
|
5750
5747
|
e.addEventListener("complete", a), e.addEventListener("error", r), e.addEventListener("abort", r);
|
|
5751
5748
|
});
|
|
5752
|
-
|
|
5749
|
+
Io.set(e, t);
|
|
5753
5750
|
}
|
|
5754
|
-
let
|
|
5751
|
+
let Eo = {
|
|
5755
5752
|
get(e, t, n) {
|
|
5756
5753
|
if (e instanceof IDBTransaction) {
|
|
5757
5754
|
if (t === "done")
|
|
5758
|
-
return
|
|
5755
|
+
return Io.get(e);
|
|
5759
5756
|
if (t === "objectStoreNames")
|
|
5760
5757
|
return e.objectStoreNames || Ga.get(e);
|
|
5761
5758
|
if (t === "store")
|
|
@@ -5771,30 +5768,30 @@ let Oo = {
|
|
|
5771
5768
|
}
|
|
5772
5769
|
};
|
|
5773
5770
|
function Nd(e) {
|
|
5774
|
-
|
|
5771
|
+
Eo = e(Eo);
|
|
5775
5772
|
}
|
|
5776
5773
|
function Bd(e) {
|
|
5777
5774
|
return e === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(t, ...n) {
|
|
5778
|
-
const o = e.call(
|
|
5775
|
+
const o = e.call(lo(this), t, ...n);
|
|
5779
5776
|
return Ga.set(o, t.sort ? t.sort() : [t]), Tt(o);
|
|
5780
5777
|
} : Md().includes(e) ? function(...t) {
|
|
5781
|
-
return e.apply(
|
|
5778
|
+
return e.apply(lo(this), t), Tt(ja.get(this));
|
|
5782
5779
|
} : function(...t) {
|
|
5783
|
-
return Tt(e.apply(
|
|
5780
|
+
return Tt(e.apply(lo(this), t));
|
|
5784
5781
|
};
|
|
5785
5782
|
}
|
|
5786
5783
|
function Ld(e) {
|
|
5787
|
-
return typeof e == "function" ? Bd(e) : (e instanceof IDBTransaction && zd(e), Fd(e, Vd()) ? new Proxy(e,
|
|
5784
|
+
return typeof e == "function" ? Bd(e) : (e instanceof IDBTransaction && zd(e), Fd(e, Vd()) ? new Proxy(e, Eo) : e);
|
|
5788
5785
|
}
|
|
5789
5786
|
function Tt(e) {
|
|
5790
5787
|
if (e instanceof IDBRequest)
|
|
5791
5788
|
return Ud(e);
|
|
5792
|
-
if (
|
|
5793
|
-
return
|
|
5789
|
+
if (so.has(e))
|
|
5790
|
+
return so.get(e);
|
|
5794
5791
|
const t = Ld(e);
|
|
5795
|
-
return t !== e && (
|
|
5792
|
+
return t !== e && (so.set(e, t), qo.set(t, e)), t;
|
|
5796
5793
|
}
|
|
5797
|
-
const
|
|
5794
|
+
const lo = (e) => qo.get(e);
|
|
5798
5795
|
function jd(e, t, { blocked: n, upgrade: o, blocking: i, terminated: a } = {}) {
|
|
5799
5796
|
const r = indexedDB.open(e, t), l = Tt(r);
|
|
5800
5797
|
return o && r.addEventListener("upgradeneeded", (s) => {
|
|
@@ -5809,12 +5806,12 @@ function jd(e, t, { blocked: n, upgrade: o, blocking: i, terminated: a } = {}) {
|
|
|
5809
5806
|
}).catch(() => {
|
|
5810
5807
|
}), l;
|
|
5811
5808
|
}
|
|
5812
|
-
const Gd = ["get", "getKey", "getAll", "getAllKeys", "count"], Wd = ["put", "add", "delete", "clear"],
|
|
5809
|
+
const Gd = ["get", "getKey", "getAll", "getAllKeys", "count"], Wd = ["put", "add", "delete", "clear"], uo = /* @__PURE__ */ new Map();
|
|
5813
5810
|
function Vi(e, t) {
|
|
5814
5811
|
if (!(e instanceof IDBDatabase && !(t in e) && typeof t == "string"))
|
|
5815
5812
|
return;
|
|
5816
|
-
if (
|
|
5817
|
-
return
|
|
5813
|
+
if (uo.get(t))
|
|
5814
|
+
return uo.get(t);
|
|
5818
5815
|
const n = t.replace(/FromIndex$/, ""), o = t !== n, i = Wd.includes(n);
|
|
5819
5816
|
if (
|
|
5820
5817
|
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
|
@@ -5829,7 +5826,7 @@ function Vi(e, t) {
|
|
|
5829
5826
|
i && s.done
|
|
5830
5827
|
]))[0];
|
|
5831
5828
|
};
|
|
5832
|
-
return
|
|
5829
|
+
return uo.set(t, a), a;
|
|
5833
5830
|
}
|
|
5834
5831
|
Nd((e) => ({
|
|
5835
5832
|
...e,
|
|
@@ -5872,7 +5869,7 @@ function Kd(e) {
|
|
|
5872
5869
|
const t = e.getComponent();
|
|
5873
5870
|
return (t == null ? void 0 : t.type) === "VERSION";
|
|
5874
5871
|
}
|
|
5875
|
-
const
|
|
5872
|
+
const Oo = "@firebase/app", Mi = "0.10.13";
|
|
5876
5873
|
/**
|
|
5877
5874
|
* @license
|
|
5878
5875
|
* Copyright 2019 Google LLC
|
|
@@ -5906,8 +5903,8 @@ const wt = new Pd("@firebase/app"), qd = "@firebase/app-compat", Yd = "@firebase
|
|
|
5906
5903
|
* See the License for the specific language governing permissions and
|
|
5907
5904
|
* limitations under the License.
|
|
5908
5905
|
*/
|
|
5909
|
-
const
|
|
5910
|
-
[
|
|
5906
|
+
const $o = "[DEFAULT]", wm = {
|
|
5907
|
+
[Oo]: "fire-core",
|
|
5911
5908
|
[qd]: "fire-core-compat",
|
|
5912
5909
|
[Xd]: "fire-analytics",
|
|
5913
5910
|
[Yd]: "fire-analytics-compat",
|
|
@@ -5952,7 +5949,7 @@ const Do = "[DEFAULT]", wm = {
|
|
|
5952
5949
|
* See the License for the specific language governing permissions and
|
|
5953
5950
|
* limitations under the License.
|
|
5954
5951
|
*/
|
|
5955
|
-
const cn = /* @__PURE__ */ new Map(), km = /* @__PURE__ */ new Map(),
|
|
5952
|
+
const cn = /* @__PURE__ */ new Map(), km = /* @__PURE__ */ new Map(), Do = /* @__PURE__ */ new Map();
|
|
5956
5953
|
function Ui(e, t) {
|
|
5957
5954
|
try {
|
|
5958
5955
|
e.container.addComponent(t);
|
|
@@ -5962,9 +5959,9 @@ function Ui(e, t) {
|
|
|
5962
5959
|
}
|
|
5963
5960
|
function Fn(e) {
|
|
5964
5961
|
const t = e.name;
|
|
5965
|
-
if (
|
|
5962
|
+
if (Do.has(t))
|
|
5966
5963
|
return wt.debug(`There were multiple attempts to register component ${t}.`), !1;
|
|
5967
|
-
|
|
5964
|
+
Do.set(t, e);
|
|
5968
5965
|
for (const n of cn.values())
|
|
5969
5966
|
Ui(n, e);
|
|
5970
5967
|
for (const n of km.values())
|
|
@@ -6088,7 +6085,7 @@ const Am = _m;
|
|
|
6088
6085
|
function Tm(e, t = {}) {
|
|
6089
6086
|
let n = e;
|
|
6090
6087
|
typeof t != "object" && (t = { name: t });
|
|
6091
|
-
const o = Object.assign({ name:
|
|
6088
|
+
const o = Object.assign({ name: $o, automaticDataCollectionEnabled: !1 }, t), i = o.name;
|
|
6092
6089
|
if (typeof i != "string" || !i)
|
|
6093
6090
|
throw Rt.create("bad-app-name", {
|
|
6094
6091
|
appName: String(i)
|
|
@@ -6100,19 +6097,19 @@ function Tm(e, t = {}) {
|
|
|
6100
6097
|
);
|
|
6101
6098
|
const a = cn.get(i);
|
|
6102
6099
|
if (a) {
|
|
6103
|
-
if (
|
|
6100
|
+
if (Ro(n, a.options) && Ro(o, a.config))
|
|
6104
6101
|
return a;
|
|
6105
6102
|
throw Rt.create("duplicate-app", { appName: i });
|
|
6106
6103
|
}
|
|
6107
6104
|
const r = new Id(i);
|
|
6108
|
-
for (const s of
|
|
6105
|
+
for (const s of Do.values())
|
|
6109
6106
|
r.addComponent(s);
|
|
6110
6107
|
const l = new xm(n, o, r);
|
|
6111
6108
|
return cn.set(i, l), l;
|
|
6112
6109
|
}
|
|
6113
|
-
function Rm(e =
|
|
6110
|
+
function Rm(e = $o) {
|
|
6114
6111
|
const t = cn.get(e);
|
|
6115
|
-
if (!t && e ===
|
|
6112
|
+
if (!t && e === $o && Na())
|
|
6116
6113
|
return Tm();
|
|
6117
6114
|
if (!t)
|
|
6118
6115
|
throw Rt.create("no-app", { appName: e });
|
|
@@ -6157,9 +6154,9 @@ function an(e, t, n) {
|
|
|
6157
6154
|
* limitations under the License.
|
|
6158
6155
|
*/
|
|
6159
6156
|
const Im = "firebase-heartbeat-database", Em = 1, dn = "firebase-heartbeat-store";
|
|
6160
|
-
let
|
|
6157
|
+
let co = null;
|
|
6161
6158
|
function Wa() {
|
|
6162
|
-
return
|
|
6159
|
+
return co || (co = jd(Im, Em, {
|
|
6163
6160
|
upgrade: (e, t) => {
|
|
6164
6161
|
switch (t) {
|
|
6165
6162
|
case 0:
|
|
@@ -6174,7 +6171,7 @@ function Wa() {
|
|
|
6174
6171
|
throw Rt.create("idb-open", {
|
|
6175
6172
|
originalErrorMessage: e.message
|
|
6176
6173
|
});
|
|
6177
|
-
})),
|
|
6174
|
+
})), co;
|
|
6178
6175
|
}
|
|
6179
6176
|
async function Om(e) {
|
|
6180
6177
|
try {
|
|
@@ -6375,7 +6372,7 @@ function Mm(e) {
|
|
|
6375
6372
|
(t) => new Pm(t),
|
|
6376
6373
|
"PRIVATE"
|
|
6377
6374
|
/* ComponentType.PRIVATE */
|
|
6378
|
-
)), an(
|
|
6375
|
+
)), an(Oo, Mi, e), an(Oo, Mi, "esm2017"), an("fire-js", "");
|
|
6379
6376
|
}
|
|
6380
6377
|
Mm("");
|
|
6381
6378
|
/**
|
|
@@ -6419,7 +6416,7 @@ class Me extends Zt {
|
|
|
6419
6416
|
* @param status_ - Corresponding HTTP Status Code
|
|
6420
6417
|
*/
|
|
6421
6418
|
constructor(t, n, o = 0) {
|
|
6422
|
-
super(
|
|
6419
|
+
super(mo(t), `Firebase Storage: ${n} (${mo(t)})`), this.status_ = o, this.customData = { serverResponse: null }, this._baseMessage = this.message, Object.setPrototypeOf(this, Me.prototype);
|
|
6423
6420
|
}
|
|
6424
6421
|
get status() {
|
|
6425
6422
|
return this.status_;
|
|
@@ -6431,7 +6428,7 @@ class Me extends Zt {
|
|
|
6431
6428
|
* Compares a `StorageErrorCode` against this error's code, filtering out the prefix.
|
|
6432
6429
|
*/
|
|
6433
6430
|
_codeEquals(t) {
|
|
6434
|
-
return
|
|
6431
|
+
return mo(t) === this.code;
|
|
6435
6432
|
}
|
|
6436
6433
|
/**
|
|
6437
6434
|
* Optional response message that was added by the server.
|
|
@@ -6448,10 +6445,10 @@ var Ve;
|
|
|
6448
6445
|
(function(e) {
|
|
6449
6446
|
e.UNKNOWN = "unknown", e.OBJECT_NOT_FOUND = "object-not-found", e.BUCKET_NOT_FOUND = "bucket-not-found", e.PROJECT_NOT_FOUND = "project-not-found", e.QUOTA_EXCEEDED = "quota-exceeded", e.UNAUTHENTICATED = "unauthenticated", e.UNAUTHORIZED = "unauthorized", e.UNAUTHORIZED_APP = "unauthorized-app", e.RETRY_LIMIT_EXCEEDED = "retry-limit-exceeded", e.INVALID_CHECKSUM = "invalid-checksum", e.CANCELED = "canceled", e.INVALID_EVENT_NAME = "invalid-event-name", e.INVALID_URL = "invalid-url", e.INVALID_DEFAULT_BUCKET = "invalid-default-bucket", e.NO_DEFAULT_BUCKET = "no-default-bucket", e.CANNOT_SLICE_BLOB = "cannot-slice-blob", e.SERVER_FILE_WRONG_SIZE = "server-file-wrong-size", e.NO_DOWNLOAD_URL = "no-download-url", e.INVALID_ARGUMENT = "invalid-argument", e.INVALID_ARGUMENT_COUNT = "invalid-argument-count", e.APP_DELETED = "app-deleted", e.INVALID_ROOT_OPERATION = "invalid-root-operation", e.INVALID_FORMAT = "invalid-format", e.INTERNAL_ERROR = "internal-error", e.UNSUPPORTED_ENVIRONMENT = "unsupported-environment";
|
|
6450
6447
|
})(Ve || (Ve = {}));
|
|
6451
|
-
function
|
|
6448
|
+
function mo(e) {
|
|
6452
6449
|
return "storage/" + e;
|
|
6453
6450
|
}
|
|
6454
|
-
function
|
|
6451
|
+
function Yo() {
|
|
6455
6452
|
const e = "An unknown error occurred, please check the error payload for server response.";
|
|
6456
6453
|
return new Me(Ve.UNKNOWN, e);
|
|
6457
6454
|
}
|
|
@@ -6495,7 +6492,7 @@ function Zm() {
|
|
|
6495
6492
|
function Qm(e) {
|
|
6496
6493
|
return new Me(Ve.UNSUPPORTED_ENVIRONMENT, `${e} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);
|
|
6497
6494
|
}
|
|
6498
|
-
function
|
|
6495
|
+
function Po(e) {
|
|
6499
6496
|
return new Me(Ve.INVALID_ARGUMENT, e);
|
|
6500
6497
|
}
|
|
6501
6498
|
function Ya() {
|
|
@@ -6578,11 +6575,11 @@ class tt {
|
|
|
6578
6575
|
}
|
|
6579
6576
|
];
|
|
6580
6577
|
for (let j = 0; j < S.length; j++) {
|
|
6581
|
-
const I = S[j],
|
|
6582
|
-
if (
|
|
6583
|
-
const
|
|
6584
|
-
let z =
|
|
6585
|
-
z || (z = ""), o = new tt(
|
|
6578
|
+
const I = S[j], A = I.regex.exec(t);
|
|
6579
|
+
if (A) {
|
|
6580
|
+
const x = A[I.indices.bucket];
|
|
6581
|
+
let z = A[I.indices.path];
|
|
6582
|
+
z || (z = ""), o = new tt(x, z), I.postModify(o);
|
|
6586
6583
|
break;
|
|
6587
6584
|
}
|
|
6588
6585
|
}
|
|
@@ -6686,20 +6683,20 @@ function op(e) {
|
|
|
6686
6683
|
function ip(e) {
|
|
6687
6684
|
return typeof e == "object" && !Array.isArray(e);
|
|
6688
6685
|
}
|
|
6689
|
-
function
|
|
6686
|
+
function Xo(e) {
|
|
6690
6687
|
return typeof e == "string" || e instanceof String;
|
|
6691
6688
|
}
|
|
6692
6689
|
function Li(e) {
|
|
6693
|
-
return
|
|
6690
|
+
return Zo() && e instanceof Blob;
|
|
6694
6691
|
}
|
|
6695
|
-
function
|
|
6692
|
+
function Zo() {
|
|
6696
6693
|
return typeof Blob < "u";
|
|
6697
6694
|
}
|
|
6698
6695
|
function ji(e, t, n, o) {
|
|
6699
6696
|
if (o < t)
|
|
6700
|
-
throw
|
|
6697
|
+
throw Po(`Invalid value for '${e}'. Expected ${t} or greater.`);
|
|
6701
6698
|
if (o > n)
|
|
6702
|
-
throw
|
|
6699
|
+
throw Po(`Invalid value for '${e}'. Expected ${n} or less.`);
|
|
6703
6700
|
}
|
|
6704
6701
|
/**
|
|
6705
6702
|
* @license
|
|
@@ -6818,7 +6815,7 @@ class rp {
|
|
|
6818
6815
|
r(s);
|
|
6819
6816
|
}
|
|
6820
6817
|
else if (l !== null) {
|
|
6821
|
-
const s =
|
|
6818
|
+
const s = Yo();
|
|
6822
6819
|
s.serverResponse = l.getErrorText(), this.errorCallback_ ? r(this.errorCallback_(l, s)) : r(s);
|
|
6823
6820
|
} else if (i.canceled) {
|
|
6824
6821
|
const s = this.appDelete_ ? Ya() : Hm();
|
|
@@ -6887,7 +6884,7 @@ function pp(...e) {
|
|
|
6887
6884
|
n.append(e[o]);
|
|
6888
6885
|
return n.getBlob();
|
|
6889
6886
|
} else {
|
|
6890
|
-
if (
|
|
6887
|
+
if (Zo())
|
|
6891
6888
|
return new Blob(e);
|
|
6892
6889
|
throw new Me(Ve.UNSUPPORTED_ENVIRONMENT, "This browser doesn't seem to support creating Blobs");
|
|
6893
6890
|
}
|
|
@@ -6966,7 +6963,7 @@ const pt = {
|
|
|
6966
6963
|
*/
|
|
6967
6964
|
DATA_URL: "data_url"
|
|
6968
6965
|
};
|
|
6969
|
-
class
|
|
6966
|
+
class po {
|
|
6970
6967
|
constructor(t, n) {
|
|
6971
6968
|
this.data = t, this.contentType = n || null;
|
|
6972
6969
|
}
|
|
@@ -6974,14 +6971,14 @@ class fo {
|
|
|
6974
6971
|
function gp(e, t) {
|
|
6975
6972
|
switch (e) {
|
|
6976
6973
|
case pt.RAW:
|
|
6977
|
-
return new
|
|
6974
|
+
return new po(Za(t));
|
|
6978
6975
|
case pt.BASE64:
|
|
6979
6976
|
case pt.BASE64URL:
|
|
6980
|
-
return new
|
|
6977
|
+
return new po(Qa(e, t));
|
|
6981
6978
|
case pt.DATA_URL:
|
|
6982
|
-
return new
|
|
6979
|
+
return new po(bp(t), yp(t));
|
|
6983
6980
|
}
|
|
6984
|
-
throw
|
|
6981
|
+
throw Yo();
|
|
6985
6982
|
}
|
|
6986
6983
|
function Za(e) {
|
|
6987
6984
|
const t = [];
|
|
@@ -7096,11 +7093,11 @@ class xt {
|
|
|
7096
7093
|
}
|
|
7097
7094
|
}
|
|
7098
7095
|
static getBlob(...t) {
|
|
7099
|
-
if (
|
|
7096
|
+
if (Zo()) {
|
|
7100
7097
|
const n = t.map((o) => o instanceof xt ? o.data_ : o);
|
|
7101
7098
|
return new xt(pp.apply(null, n));
|
|
7102
7099
|
} else {
|
|
7103
|
-
const n = t.map((r) =>
|
|
7100
|
+
const n = t.map((r) => Xo(r) ? gp(pt.RAW, r).data : r.data_);
|
|
7104
7101
|
let o = 0;
|
|
7105
7102
|
n.forEach((r) => {
|
|
7106
7103
|
o += r.byteLength;
|
|
@@ -7198,7 +7195,7 @@ class Xe {
|
|
|
7198
7195
|
}
|
|
7199
7196
|
let wn = null;
|
|
7200
7197
|
function Sp(e) {
|
|
7201
|
-
return !
|
|
7198
|
+
return !Xo(e) || e.length < 2 ? e : tr(e);
|
|
7202
7199
|
}
|
|
7203
7200
|
function nr() {
|
|
7204
7201
|
if (wn)
|
|
@@ -7239,7 +7236,7 @@ function or(e, t, n) {
|
|
|
7239
7236
|
}
|
|
7240
7237
|
function Tp(e, t, n, o) {
|
|
7241
7238
|
const i = er(t);
|
|
7242
|
-
if (i === null || !
|
|
7239
|
+
if (i === null || !Xo(i.downloadTokens))
|
|
7243
7240
|
return null;
|
|
7244
7241
|
const a = i.downloadTokens;
|
|
7245
7242
|
if (a.length === 0)
|
|
@@ -7261,7 +7258,7 @@ function Rp(e, t) {
|
|
|
7261
7258
|
}
|
|
7262
7259
|
return JSON.stringify(n);
|
|
7263
7260
|
}
|
|
7264
|
-
class
|
|
7261
|
+
class Qo {
|
|
7265
7262
|
constructor(t, n, o, i) {
|
|
7266
7263
|
this.url = t, this.method = n, this.handler = o, this.timeout = i, this.urlParams = {}, this.headers = {}, this.body = null, this.errorHandler = null, this.progressCallback = null, this.successCodes = [200], this.additionalRetryCodes = [];
|
|
7267
7264
|
}
|
|
@@ -7284,7 +7281,7 @@ class Jo {
|
|
|
7284
7281
|
*/
|
|
7285
7282
|
function ir(e) {
|
|
7286
7283
|
if (!e)
|
|
7287
|
-
throw
|
|
7284
|
+
throw Yo();
|
|
7288
7285
|
}
|
|
7289
7286
|
function Ip(e, t) {
|
|
7290
7287
|
function n(o, i) {
|
|
@@ -7316,14 +7313,14 @@ function rr(e) {
|
|
|
7316
7313
|
return n;
|
|
7317
7314
|
}
|
|
7318
7315
|
function Op(e, t, n) {
|
|
7319
|
-
const o = t.fullServerUrl(), i = jn(o, e.host, e._protocol), a = "GET", r = e.maxOperationRetryTime, l = new
|
|
7316
|
+
const o = t.fullServerUrl(), i = jn(o, e.host, e._protocol), a = "GET", r = e.maxOperationRetryTime, l = new Qo(i, a, Ep(e, n), r);
|
|
7320
7317
|
return l.errorHandler = rr(t), l;
|
|
7321
7318
|
}
|
|
7322
7319
|
function $p(e, t) {
|
|
7323
7320
|
const n = t.fullServerUrl(), o = jn(n, e.host, e._protocol), i = "DELETE", a = e.maxOperationRetryTime;
|
|
7324
7321
|
function r(s, u) {
|
|
7325
7322
|
}
|
|
7326
|
-
const l = new
|
|
7323
|
+
const l = new Qo(o, i, r, a);
|
|
7327
7324
|
return l.successCodes = [200, 204], l.errorHandler = rr(t), l;
|
|
7328
7325
|
}
|
|
7329
7326
|
function Dp(e, t) {
|
|
@@ -7356,8 +7353,8 @@ Content-Type: ` + u.contentType + `\r
|
|
|
7356
7353
|
--` + s + "--", f = xt.getBlob(c, o, p);
|
|
7357
7354
|
if (f === null)
|
|
7358
7355
|
throw Xm();
|
|
7359
|
-
const g = { name: u.fullPath }, k = jn(a, e.host, e._protocol), b = "POST", v = e.maxUploadRetryTime,
|
|
7360
|
-
return
|
|
7356
|
+
const g = { name: u.fullPath }, k = jn(a, e.host, e._protocol), b = "POST", v = e.maxUploadRetryTime, T = new Qo(k, b, Ip(e, n), v);
|
|
7357
|
+
return T.urlParams = g, T.headers = r, T.body = f.uploadData(), T.errorHandler = ar(t), T;
|
|
7361
7358
|
}
|
|
7362
7359
|
class Vp {
|
|
7363
7360
|
constructor() {
|
|
@@ -7422,7 +7419,7 @@ class Mp extends Vp {
|
|
|
7422
7419
|
this.xhr_.responseType = "text";
|
|
7423
7420
|
}
|
|
7424
7421
|
}
|
|
7425
|
-
function
|
|
7422
|
+
function Jo() {
|
|
7426
7423
|
return new Mp();
|
|
7427
7424
|
}
|
|
7428
7425
|
/**
|
|
@@ -7510,7 +7507,7 @@ class Ut {
|
|
|
7510
7507
|
function Up(e, t, n) {
|
|
7511
7508
|
e._throwIfRoot("uploadBytes");
|
|
7512
7509
|
const o = Fp(e.storage, e._location, nr(), new xt(t, !0), n);
|
|
7513
|
-
return e.storage.makeRequestWithTokens(o,
|
|
7510
|
+
return e.storage.makeRequestWithTokens(o, Jo).then((i) => ({
|
|
7514
7511
|
metadata: i,
|
|
7515
7512
|
ref: e
|
|
7516
7513
|
}));
|
|
@@ -7518,7 +7515,7 @@ function Up(e, t, n) {
|
|
|
7518
7515
|
function zp(e) {
|
|
7519
7516
|
e._throwIfRoot("getDownloadURL");
|
|
7520
7517
|
const t = Op(e.storage, e._location, nr());
|
|
7521
|
-
return e.storage.makeRequestWithTokens(t,
|
|
7518
|
+
return e.storage.makeRequestWithTokens(t, Jo).then((n) => {
|
|
7522
7519
|
if (n === null)
|
|
7523
7520
|
throw Zm();
|
|
7524
7521
|
return n;
|
|
@@ -7527,7 +7524,7 @@ function zp(e) {
|
|
|
7527
7524
|
function Np(e) {
|
|
7528
7525
|
e._throwIfRoot("deleteObject");
|
|
7529
7526
|
const t = $p(e.storage, e._location);
|
|
7530
|
-
return e.storage.makeRequestWithTokens(t,
|
|
7527
|
+
return e.storage.makeRequestWithTokens(t, Jo);
|
|
7531
7528
|
}
|
|
7532
7529
|
function Bp(e, t) {
|
|
7533
7530
|
const n = kp(e._location.path, t), o = new tt(e._location.bucket, n);
|
|
@@ -7556,7 +7553,7 @@ function jp(e, t) {
|
|
|
7556
7553
|
return new Ut(e, t);
|
|
7557
7554
|
}
|
|
7558
7555
|
function sr(e, t) {
|
|
7559
|
-
if (e instanceof
|
|
7556
|
+
if (e instanceof ei) {
|
|
7560
7557
|
const n = e;
|
|
7561
7558
|
if (n._bucket == null)
|
|
7562
7559
|
throw Ym();
|
|
@@ -7567,9 +7564,9 @@ function sr(e, t) {
|
|
|
7567
7564
|
}
|
|
7568
7565
|
function Gp(e, t) {
|
|
7569
7566
|
if (t && Lp(t)) {
|
|
7570
|
-
if (e instanceof
|
|
7567
|
+
if (e instanceof ei)
|
|
7571
7568
|
return jp(e, t);
|
|
7572
|
-
throw
|
|
7569
|
+
throw Po("To use ref(service, url), the first argument must be a Storage instance.");
|
|
7573
7570
|
} else
|
|
7574
7571
|
return sr(e, t);
|
|
7575
7572
|
}
|
|
@@ -7582,7 +7579,7 @@ function Wp(e, t, n, o = {}) {
|
|
|
7582
7579
|
const { mockUserToken: i } = o;
|
|
7583
7580
|
i && (e._overrideAuthToken = typeof i == "string" ? i : bd(i, e.app.options.projectId));
|
|
7584
7581
|
}
|
|
7585
|
-
class
|
|
7582
|
+
class ei {
|
|
7586
7583
|
constructor(t, n, o, i, a) {
|
|
7587
7584
|
this.app = t, this._authProvider = n, this._appCheckProvider = o, this._url = i, this._firebaseVersion = a, this._bucket = null, this._host = Ka, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = Um, this._maxUploadRetryTime = zm, this._requests = /* @__PURE__ */ new Set(), i != null ? this._bucket = tt.makeFromBucketSpec(i, this._host) : this._bucket = Gi(this._host, this.app.options);
|
|
7588
7585
|
}
|
|
@@ -7719,7 +7716,7 @@ function Yp(e, t, n, o = {}) {
|
|
|
7719
7716
|
}
|
|
7720
7717
|
function Xp(e, { instanceIdentifier: t }) {
|
|
7721
7718
|
const n = e.getProvider("app").getImmediate(), o = e.getProvider("auth-internal"), i = e.getProvider("app-check-internal");
|
|
7722
|
-
return new
|
|
7719
|
+
return new ei(n, o, i, t, Am);
|
|
7723
7720
|
}
|
|
7724
7721
|
function Zp() {
|
|
7725
7722
|
Fn(new un(
|
|
@@ -7776,7 +7773,7 @@ const Qp = {
|
|
|
7776
7773
|
t: u
|
|
7777
7774
|
} = ke(), d = W(!1), c = W(!1), p = W(!1), f = W(void 0), g = W(null), k = (K) => {
|
|
7778
7775
|
Bt.isBoolean(K) ? c.value = K : c.value = !c.value;
|
|
7779
|
-
}, b = R(() => !n.initialValue.id && n.initialValue.name === "Addon"), v = W($n(n.initialValue)),
|
|
7776
|
+
}, b = R(() => !n.initialValue.id && n.initialValue.name === "Addon"), v = W($n(n.initialValue)), T = R(() => !v.value.id && !b.value), S = W(""), j = R(() => {
|
|
7780
7777
|
var ce;
|
|
7781
7778
|
if (!v.value.id && !b.value)
|
|
7782
7779
|
return [];
|
|
@@ -7808,16 +7805,16 @@ const Qp = {
|
|
|
7808
7805
|
variant: "tertiary",
|
|
7809
7806
|
textColor: "neutral-gray-400",
|
|
7810
7807
|
onClick: it(async () => {
|
|
7811
|
-
await
|
|
7808
|
+
await x(le);
|
|
7812
7809
|
}, ["stop", "prevent"])
|
|
7813
7810
|
})]);
|
|
7814
7811
|
}
|
|
7815
7812
|
}];
|
|
7816
|
-
async function
|
|
7817
|
-
|
|
7813
|
+
async function A() {
|
|
7814
|
+
T.value || await l.create(v.value.id);
|
|
7818
7815
|
}
|
|
7819
|
-
async function
|
|
7820
|
-
|
|
7816
|
+
async function x(K) {
|
|
7817
|
+
T.value || await l.update(K._id);
|
|
7821
7818
|
}
|
|
7822
7819
|
const z = R(() => r.version === It.enum.v4);
|
|
7823
7820
|
async function F(K) {
|
|
@@ -7846,7 +7843,7 @@ const Qp = {
|
|
|
7846
7843
|
v.value.name = K;
|
|
7847
7844
|
}
|
|
7848
7845
|
const Q = Xt(() => {
|
|
7849
|
-
if (
|
|
7846
|
+
if (T.value)
|
|
7850
7847
|
return !!v.value.name || !!(f.value && Object.keys(f.value).length > 0);
|
|
7851
7848
|
const K = r.categories.find((O) => O._id === v.value.id), le = v.value.name !== (K == null ? void 0 : K.name), ce = (K == null ? void 0 : K.name_locale) || {}, Z = f.value || {}, ge = JSON.stringify(ce) !== JSON.stringify(Z), he = !!g.value || g.value === null && !!(K != null && K.thumbnail);
|
|
7852
7849
|
return le || ge || he;
|
|
@@ -7857,11 +7854,11 @@ const Qp = {
|
|
|
7857
7854
|
const {
|
|
7858
7855
|
updateMenu: K
|
|
7859
7856
|
} = a, le = f.value;
|
|
7860
|
-
if (
|
|
7857
|
+
if (T.value) {
|
|
7861
7858
|
let ce = "";
|
|
7862
7859
|
if (g.value) {
|
|
7863
|
-
const Z = `temp_${Date.now()}`, ge =
|
|
7864
|
-
await Yi.update(ge, g.value, Xi.firebase.storageBucket), ce =
|
|
7860
|
+
const Z = `temp_${Date.now()}`, ge = bi(Z);
|
|
7861
|
+
await Yi.update(ge, g.value, Xi.firebase.storageBucket), ce = pi(ge);
|
|
7865
7862
|
}
|
|
7866
7863
|
await K({
|
|
7867
7864
|
module: Be.enum.category,
|
|
@@ -7879,8 +7876,8 @@ const Qp = {
|
|
|
7879
7876
|
const ce = r.categories.find((ge) => ge._id === v.value.id);
|
|
7880
7877
|
let Z = (ce == null ? void 0 : ce.thumbnail) || "";
|
|
7881
7878
|
if (g.value) {
|
|
7882
|
-
const ge =
|
|
7883
|
-
await Yi.update(ge, g.value, Xi.firebase.storageBucket), Z =
|
|
7879
|
+
const ge = bi(v.value.id || void 0);
|
|
7880
|
+
await Yi.update(ge, g.value, Xi.firebase.storageBucket), Z = pi(ge);
|
|
7884
7881
|
} else g.value === null && (ce != null && ce.thumbnail) && (Z = "");
|
|
7885
7882
|
await K({
|
|
7886
7883
|
module: Be.enum.category,
|
|
@@ -7924,10 +7921,10 @@ const Qp = {
|
|
|
7924
7921
|
"max-width": 560,
|
|
7925
7922
|
"onOn:clickedAway": m(Q)
|
|
7926
7923
|
}, {
|
|
7927
|
-
"side-sheet-header": M(() => [_("p", Qp, oe(
|
|
7924
|
+
"side-sheet-header": M(() => [_("p", Qp, oe(T.value ? m(u)("menu.category.manager.dialog.add.title") : m(u)("menu.category.title")), 1)]),
|
|
7928
7925
|
"side-sheet-footer": M(() => [_("div", sf, [b.value ? te("", !0) : (y(), ee(ce, {
|
|
7929
7926
|
key: 0,
|
|
7930
|
-
label:
|
|
7927
|
+
label: T.value ? m(u)("menu.category.manager.dialog.add.action") : m(u)("menu.common.actions.update"),
|
|
7931
7928
|
loading: d.value,
|
|
7932
7929
|
size: "lg",
|
|
7933
7930
|
type: "submit",
|
|
@@ -7978,7 +7975,7 @@ const Qp = {
|
|
|
7978
7975
|
class: "flex-1 min-h-0",
|
|
7979
7976
|
shrinkable: !0
|
|
7980
7977
|
}, {
|
|
7981
|
-
"append-title": M(() => [
|
|
7978
|
+
"append-title": M(() => [T.value ? (y(), ee(Z, {
|
|
7982
7979
|
key: 0,
|
|
7983
7980
|
placement: "top",
|
|
7984
7981
|
"z-index": 999
|
|
@@ -7991,7 +7988,7 @@ const Qp = {
|
|
|
7991
7988
|
"text-color": "primary",
|
|
7992
7989
|
"border-color": "primary",
|
|
7993
7990
|
disabled: !0,
|
|
7994
|
-
onClick:
|
|
7991
|
+
onClick: A
|
|
7995
7992
|
}, null, 8, ["label"])]),
|
|
7996
7993
|
_: 1
|
|
7997
7994
|
})) : (y(), ee(he, {
|
|
@@ -8001,7 +7998,7 @@ const Qp = {
|
|
|
8001
7998
|
"prepend-icon": "add",
|
|
8002
7999
|
"text-color": "primary",
|
|
8003
8000
|
"border-color": "primary",
|
|
8004
|
-
onClick:
|
|
8001
|
+
onClick: A
|
|
8005
8002
|
}, null, 8, ["label"]))]),
|
|
8006
8003
|
default: M(() => [_("div", nf, [_("div", of, oe(m(u)("menu.category.products.linked_count", {
|
|
8007
8004
|
count: j.value.length
|
|
@@ -8011,7 +8008,7 @@ const Qp = {
|
|
|
8011
8008
|
"onUpdate:modelValue": le[4] || (le[4] = (pe) => S.value = pe)
|
|
8012
8009
|
}, null, 8, ["placeholder", "modelValue"])])]), _("div", rf, [h(J, {
|
|
8013
8010
|
"column-defs": I,
|
|
8014
|
-
draggable: z.value && !
|
|
8011
|
+
draggable: z.value && !T.value,
|
|
8015
8012
|
"page-size": j.value.length,
|
|
8016
8013
|
"row-data": j.value,
|
|
8017
8014
|
"search-value": S.value,
|
|
@@ -8019,12 +8016,12 @@ const Qp = {
|
|
|
8019
8016
|
"hide-footer": "",
|
|
8020
8017
|
"pin-header-row": "",
|
|
8021
8018
|
onDndChanged: F,
|
|
8022
|
-
onRowClick: le[5] || (le[5] = (pe) =>
|
|
8019
|
+
onRowClick: le[5] || (le[5] = (pe) => x(pe.original))
|
|
8023
8020
|
}, null, 8, ["draggable", "page-size", "row-data", "search-value"])])]),
|
|
8024
8021
|
_: 1
|
|
8025
8022
|
}, 8, ["title"])])]),
|
|
8026
8023
|
_: 1
|
|
8027
|
-
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]), h(
|
|
8024
|
+
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]), h(No, {
|
|
8028
8025
|
modelValue: p.value,
|
|
8029
8026
|
"onUpdate:modelValue": le[8] || (le[8] = (pe) => p.value = pe),
|
|
8030
8027
|
title: m(u)("menu.category.title"),
|
|
@@ -8068,9 +8065,9 @@ const Qp = {
|
|
|
8068
8065
|
p(), l("primary");
|
|
8069
8066
|
}
|
|
8070
8067
|
return (g, k) => {
|
|
8071
|
-
const b = U("fm-button"), v = U("fm-text-field"),
|
|
8068
|
+
const b = U("fm-button"), v = U("fm-text-field"), T = U("FmForm");
|
|
8072
8069
|
return y(), q(Ce, null, [
|
|
8073
|
-
h(
|
|
8070
|
+
h(T, { onValidationSuccess: f }, {
|
|
8074
8071
|
default: M(() => [
|
|
8075
8072
|
h(v, {
|
|
8076
8073
|
modelValue: i.value,
|
|
@@ -8093,7 +8090,7 @@ const Qp = {
|
|
|
8093
8090
|
]),
|
|
8094
8091
|
_: 1
|
|
8095
8092
|
}),
|
|
8096
|
-
h(
|
|
8093
|
+
h(No, {
|
|
8097
8094
|
modelValue: o.value,
|
|
8098
8095
|
"onUpdate:modelValue": k[2] || (k[2] = (S) => o.value = S),
|
|
8099
8096
|
title: m(n)("menu.category.title"),
|
|
@@ -8109,7 +8106,7 @@ const Qp = {
|
|
|
8109
8106
|
dialog: e,
|
|
8110
8107
|
menuLoader: t
|
|
8111
8108
|
}) => {
|
|
8112
|
-
const { t: n } = ke(), o =
|
|
8109
|
+
const { t: n } = ke(), o = zo();
|
|
8113
8110
|
function i() {
|
|
8114
8111
|
var d, c, p;
|
|
8115
8112
|
if (!o) throw new Error("No current instance found");
|
|
@@ -8203,7 +8200,7 @@ const Qp = {
|
|
|
8203
8200
|
rearrange: l
|
|
8204
8201
|
};
|
|
8205
8202
|
};
|
|
8206
|
-
function
|
|
8203
|
+
function Fo(e, t) {
|
|
8207
8204
|
const n = t ? void 0 : "";
|
|
8208
8205
|
return (e == null ? void 0 : e.trim()) || n;
|
|
8209
8206
|
}
|
|
@@ -8289,7 +8286,7 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8289
8286
|
value: B.id
|
|
8290
8287
|
}));
|
|
8291
8288
|
return n.isAddon ? D : D.filter((B) => !!B.value);
|
|
8292
|
-
}),
|
|
8289
|
+
}), T = R(() => p.value.addon), S = R(() => !v.value.find((D) => !!D.value)), j = R(() => Tn(n.form.category ? n.form : n.fallback) || []), I = R(() => j.value.reduce((D, B) => (D[B._id] = B, D), {})), A = R({
|
|
8293
8290
|
get() {
|
|
8294
8291
|
return j.value.map((D) => D._id);
|
|
8295
8292
|
},
|
|
@@ -8307,14 +8304,14 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8307
8304
|
}
|
|
8308
8305
|
c("update:form", "category", B._id), c("update:form", "additionalCategories", X);
|
|
8309
8306
|
}
|
|
8310
|
-
}),
|
|
8307
|
+
}), x = W(), z = ({
|
|
8311
8308
|
multiple: D = !0
|
|
8312
8309
|
} = {}) => n.isAddon ? null : h(ol, {
|
|
8313
|
-
ref:
|
|
8310
|
+
ref: x,
|
|
8314
8311
|
disabled: !p.value.category || n.isAddon || d(),
|
|
8315
8312
|
items: v.value,
|
|
8316
|
-
modelValue:
|
|
8317
|
-
"onUpdate:model-value": (B) =>
|
|
8313
|
+
modelValue: A.value,
|
|
8314
|
+
"onUpdate:model-value": (B) => A.value = B,
|
|
8318
8315
|
placeholder: Z("menu.product.form.detail.category.placeholder"),
|
|
8319
8316
|
multiple: D
|
|
8320
8317
|
}, {
|
|
@@ -8323,7 +8320,7 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8323
8320
|
type: "button",
|
|
8324
8321
|
onClick: () => {
|
|
8325
8322
|
var B;
|
|
8326
|
-
(B =
|
|
8323
|
+
(B = x.value) == null || B.hideMenu(), u.create();
|
|
8327
8324
|
}
|
|
8328
8325
|
}, [h(Oe.FmIcon, {
|
|
8329
8326
|
color: "primary",
|
|
@@ -8459,7 +8456,7 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8459
8456
|
title: m(Z)("menu.product.form.detail.title")
|
|
8460
8457
|
}, {
|
|
8461
8458
|
default: M(() => {
|
|
8462
|
-
var Et, Lt, Jt,
|
|
8459
|
+
var Et, Lt, Jt, oi, ii;
|
|
8463
8460
|
return [_("div", df, [_("div", mf, [_("div", pf, [h(X, {
|
|
8464
8461
|
"model-value": D.form.code,
|
|
8465
8462
|
placeholder: ((Et = D.fallback) == null ? void 0 : Et.code) || m(Z)("menu.product.form.detail.fields.code.placeholder"),
|
|
@@ -8470,7 +8467,7 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8470
8467
|
rules: [(we) => !H.value || w.value === 0 || m(Z)("menu.product.form.detail.fields.code.duplicate_warning", {
|
|
8471
8468
|
count: w.value
|
|
8472
8469
|
})],
|
|
8473
|
-
"onUpdate:modelValue": B[0] || (B[0] = (we) => c("update:form", "code", m(
|
|
8470
|
+
"onUpdate:modelValue": B[0] || (B[0] = (we) => c("update:form", "code", m(Fo)(we, D.isOverride)))
|
|
8474
8471
|
}, null, 8, ["model-value", "placeholder", "helper-text", "label", "rules"])]), _("div", ff, [h(X, {
|
|
8475
8472
|
id: "product-name",
|
|
8476
8473
|
disabled: !p.value.name,
|
|
@@ -8511,11 +8508,11 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8511
8508
|
"model-value": D.form.name2,
|
|
8512
8509
|
placeholder: ((Jt = D.fallback) == null ? void 0 : Jt.name2) || m(Z)("menu.product.form.detail.fields.name2.placeholder"),
|
|
8513
8510
|
label: m(Z)("menu.product.form.detail.fields.name2.label"),
|
|
8514
|
-
"onUpdate:modelValue": B[2] || (B[2] = (we) => c("update:form", "name2", m(
|
|
8511
|
+
"onUpdate:modelValue": B[2] || (B[2] = (we) => c("update:form", "name2", m(Fo)(we, D.isOverride)))
|
|
8515
8512
|
}, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "label"]), _("div", gf, [h(ae, {
|
|
8516
8513
|
disabled: !p.value.description,
|
|
8517
8514
|
"model-value": D.form.description || void 0,
|
|
8518
|
-
placeholder: ((
|
|
8515
|
+
placeholder: ((oi = D.fallback) == null ? void 0 : oi.description) || m(Z)("menu.product.form.detail.fields.description.placeholder"),
|
|
8519
8516
|
"onUpdate:modelValue": B[3] || (B[3] = (we) => c("update:form", "description", we.trim())),
|
|
8520
8517
|
class: "description"
|
|
8521
8518
|
}, {
|
|
@@ -8547,7 +8544,7 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8547
8544
|
"cover-only": f.value,
|
|
8548
8545
|
disabled: !p.value.images && !f.value,
|
|
8549
8546
|
"item-id": D.form._id || "",
|
|
8550
|
-
"legacy-thumbnail": D.form.thumbnail ?? ((
|
|
8547
|
+
"legacy-thumbnail": D.form.thumbnail ?? ((ii = D.fallback) == null ? void 0 : ii.thumbnail) ?? null,
|
|
8551
8548
|
"menu-items": m(o).state.menu.modules.item,
|
|
8552
8549
|
"model-value": g.value,
|
|
8553
8550
|
staged: D.staged,
|
|
@@ -8556,7 +8553,7 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8556
8553
|
}, null, 8, ["cover-only", "disabled", "item-id", "legacy-thumbnail", "menu-items", "model-value", "staged"])]), h(_t, {
|
|
8557
8554
|
label: m(o).isV4 ? m(Z)("menu.product.form.detail.category.label") : m(Z)("menu.product.form.detail.category.label_singular")
|
|
8558
8555
|
}, {
|
|
8559
|
-
default: M(() => [
|
|
8556
|
+
default: M(() => [T.value ? (y(), ee(fe, {
|
|
8560
8557
|
key: 0,
|
|
8561
8558
|
disabled: !p.value.category,
|
|
8562
8559
|
"model-value": $.value,
|
|
@@ -8623,7 +8620,7 @@ const Af = /* @__PURE__ */ ye({
|
|
|
8623
8620
|
}, null, 8, ["label", "model-value", "rules"]), h(hl, {
|
|
8624
8621
|
form: D.form,
|
|
8625
8622
|
"onUpdate:orderQuantity": B[9] || (B[9] = (we) => c("update:form", "orderQuantity", we))
|
|
8626
|
-
}, null, 8, ["form"])])) : te("", !0), h(
|
|
8623
|
+
}, null, 8, ["form"])])) : te("", !0), h(Bo, {
|
|
8627
8624
|
disabled: !p.value.orderFrom,
|
|
8628
8625
|
"model-value": D.form.orderFrom,
|
|
8629
8626
|
"order-from-none": p.value.orderFromNone,
|
|
@@ -8732,21 +8729,21 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8732
8729
|
},
|
|
8733
8730
|
emits: ["update:modelValue", "update:group"],
|
|
8734
8731
|
setup(e, { emit: t }) {
|
|
8735
|
-
const n = e, o = t, { t: i } = ke(), a = W(!1), r = W(!0), l = W([]), s = W([]), u = W({}), d = W({}), c = W({}), p = W({}), f = R(() => n.group.name_locale ? Object.entries(n.group.name_locale).map(([
|
|
8736
|
-
localeCode:
|
|
8737
|
-
localeName:
|
|
8738
|
-
value:
|
|
8739
|
-
})) : []), g = R(() => Object.values(n.group.items).map((
|
|
8740
|
-
...
|
|
8741
|
-
optionIndex:
|
|
8732
|
+
const n = e, o = t, { t: i } = ke(), a = W(!1), r = W(!0), l = W([]), s = W([]), u = W({}), d = W({}), c = W({}), p = W({}), f = R(() => n.group.name_locale ? Object.entries(n.group.name_locale).map(([A, x]) => ({
|
|
8733
|
+
localeCode: A,
|
|
8734
|
+
localeName: yo(A),
|
|
8735
|
+
value: x
|
|
8736
|
+
})) : []), g = R(() => Object.values(n.group.items).map((A, x) => ({
|
|
8737
|
+
...A,
|
|
8738
|
+
optionIndex: x + 1
|
|
8742
8739
|
})));
|
|
8743
8740
|
function k() {
|
|
8744
|
-
const
|
|
8741
|
+
const A = /* @__PURE__ */ new Set();
|
|
8745
8742
|
Object.values(n.group.items).forEach((G) => {
|
|
8746
|
-
G.name_locale && Object.keys(G.name_locale).forEach((H) =>
|
|
8747
|
-
}),
|
|
8748
|
-
const
|
|
8749
|
-
l.value =
|
|
8743
|
+
G.name_locale && Object.keys(G.name_locale).forEach((H) => A.add(H));
|
|
8744
|
+
}), A.size === 0 && n.group.name_locale && Object.keys(n.group.name_locale).forEach((G) => A.add(G));
|
|
8745
|
+
const x = Array.from(A);
|
|
8746
|
+
l.value = x;
|
|
8750
8747
|
const z = {}, F = {};
|
|
8751
8748
|
Object.values(n.group.items).forEach((G) => {
|
|
8752
8749
|
z[G._id] = {}, G.name_locale && Object.entries(G.name_locale).forEach(([H, w]) => {
|
|
@@ -8756,53 +8753,53 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8756
8753
|
}
|
|
8757
8754
|
Ae(
|
|
8758
8755
|
() => [n.modelValue, n.group],
|
|
8759
|
-
([
|
|
8760
|
-
|
|
8756
|
+
([A]) => {
|
|
8757
|
+
A && (k(), s.value = Fe.clone(l.value), d.value = Fe.clone(u.value), p.value = Fe.clone(c.value), a.value = !1, r.value = !0);
|
|
8761
8758
|
},
|
|
8762
8759
|
{ immediate: !0, deep: !0 }
|
|
8763
8760
|
);
|
|
8764
|
-
function b(
|
|
8765
|
-
const
|
|
8766
|
-
for (const F of
|
|
8767
|
-
|
|
8761
|
+
function b(A) {
|
|
8762
|
+
const x = new Set(l.value), z = new Set(A);
|
|
8763
|
+
for (const F of A)
|
|
8764
|
+
x.has(F) || Object.keys(u.value).forEach((G) => {
|
|
8768
8765
|
u.value[G][F] || (u.value[G][F] = "");
|
|
8769
8766
|
});
|
|
8770
|
-
for (const F of
|
|
8767
|
+
for (const F of x)
|
|
8771
8768
|
z.has(F) || Object.keys(u.value).forEach((G) => {
|
|
8772
8769
|
delete u.value[G][F];
|
|
8773
8770
|
});
|
|
8774
|
-
l.value =
|
|
8771
|
+
l.value = A;
|
|
8775
8772
|
}
|
|
8776
8773
|
function v() {
|
|
8777
8774
|
return !Fe.isEqual(l.value, s.value) || !Fe.isEqual(u.value, d.value) || !Fe.isEqual(c.value, p.value);
|
|
8778
8775
|
}
|
|
8779
|
-
function
|
|
8780
|
-
const
|
|
8781
|
-
Object.keys(
|
|
8782
|
-
const z = c.value[
|
|
8783
|
-
z !== void 0 && (
|
|
8784
|
-
const F = u.value[
|
|
8776
|
+
function T() {
|
|
8777
|
+
const A = Fe.clone(n.group);
|
|
8778
|
+
Object.keys(A.items).forEach((x) => {
|
|
8779
|
+
const z = c.value[x];
|
|
8780
|
+
z !== void 0 && (A.items[x].name = z || null);
|
|
8781
|
+
const F = u.value[x];
|
|
8785
8782
|
if (F && Object.keys(F).length > 0) {
|
|
8786
8783
|
const G = {};
|
|
8787
8784
|
Object.entries(F).forEach(([H, w]) => {
|
|
8788
8785
|
w && w.trim() && (G[H] = w.trim());
|
|
8789
|
-
}), Object.keys(G).length > 0 ?
|
|
8786
|
+
}), Object.keys(G).length > 0 ? A.items[x].name_locale = G : delete A.items[x].name_locale;
|
|
8790
8787
|
} else
|
|
8791
|
-
delete
|
|
8792
|
-
}), o("update:group",
|
|
8788
|
+
delete A.items[x].name_locale;
|
|
8789
|
+
}), o("update:group", A), o("update:modelValue", !1);
|
|
8793
8790
|
}
|
|
8794
8791
|
function S() {
|
|
8795
8792
|
o("update:modelValue", !1);
|
|
8796
8793
|
}
|
|
8797
8794
|
const j = Xt(v, S), I = R({
|
|
8798
8795
|
get: () => n.modelValue,
|
|
8799
|
-
set: (
|
|
8796
|
+
set: (A) => o("update:modelValue", A)
|
|
8800
8797
|
});
|
|
8801
|
-
return (
|
|
8798
|
+
return (A, x) => {
|
|
8802
8799
|
const z = U("FmIcon"), F = U("fm-button"), G = U("fm-side-sheet");
|
|
8803
8800
|
return y(), ee(G, {
|
|
8804
8801
|
modelValue: I.value,
|
|
8805
|
-
"onUpdate:modelValue":
|
|
8802
|
+
"onUpdate:modelValue": x[2] || (x[2] = (H) => I.value = H),
|
|
8806
8803
|
"max-width": 720,
|
|
8807
8804
|
"onOn:clickedAway": m(j)
|
|
8808
8805
|
}, {
|
|
@@ -8815,7 +8812,7 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8815
8812
|
label: m(i)("common.save"),
|
|
8816
8813
|
size: "lg",
|
|
8817
8814
|
variant: "primary",
|
|
8818
|
-
onClick:
|
|
8815
|
+
onClick: T
|
|
8819
8816
|
}, null, 8, ["label"]),
|
|
8820
8817
|
h(F, {
|
|
8821
8818
|
label: m(i)("common.cancel"),
|
|
@@ -8835,7 +8832,7 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8835
8832
|
_("div", zf, [
|
|
8836
8833
|
_("div", {
|
|
8837
8834
|
class: "flex items-center gap-16 cursor-pointer",
|
|
8838
|
-
onClick:
|
|
8835
|
+
onClick: x[0] || (x[0] = (H) => a.value = !a.value)
|
|
8839
8836
|
}, [
|
|
8840
8837
|
h(z, {
|
|
8841
8838
|
name: "keyboard_arrow_down",
|
|
@@ -8846,7 +8843,7 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8846
8843
|
a.value ? (y(), q("div", Bf, [
|
|
8847
8844
|
h(In, {
|
|
8848
8845
|
label: m(i)("menu.group.translation.default"),
|
|
8849
|
-
"model-value":
|
|
8846
|
+
"model-value": A.group.name,
|
|
8850
8847
|
readonly: !0
|
|
8851
8848
|
}, null, 8, ["label", "model-value"]),
|
|
8852
8849
|
f.value.length > 0 ? (y(), q("div", Lf, [
|
|
@@ -8865,7 +8862,7 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8865
8862
|
_("div", jf, [
|
|
8866
8863
|
_("div", {
|
|
8867
8864
|
class: "flex items-center gap-16 cursor-pointer",
|
|
8868
|
-
onClick:
|
|
8865
|
+
onClick: x[1] || (x[1] = (H) => r.value = !r.value)
|
|
8869
8866
|
}, [
|
|
8870
8867
|
h(z, {
|
|
8871
8868
|
name: "keyboard_arrow_down",
|
|
@@ -8922,24 +8919,24 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8922
8919
|
setup(e, { expose: t, emit: n }) {
|
|
8923
8920
|
var j, I;
|
|
8924
8921
|
const o = e, i = n, a = De(), r = nt(), l = ft(ut(Je())), s = W([]), u = W(o.combinations[0].combinationKey || ""), d = R(
|
|
8925
|
-
() => s.value.findIndex((
|
|
8922
|
+
() => s.value.findIndex((A) => A.combinationKey == u.value)
|
|
8926
8923
|
), c = R(
|
|
8927
|
-
() => o.combinations.map((
|
|
8928
|
-
label: o.fullCombinations[
|
|
8929
|
-
value:
|
|
8924
|
+
() => o.combinations.map((A) => ({
|
|
8925
|
+
label: o.fullCombinations[A.combinationKey || ""],
|
|
8926
|
+
value: A.combinationKey || ""
|
|
8930
8927
|
}))
|
|
8931
8928
|
), p = R(() => {
|
|
8932
8929
|
var w, $;
|
|
8933
8930
|
if (!v.value) return null;
|
|
8934
|
-
const
|
|
8931
|
+
const A = (($ = (w = s.value[d.value]) == null ? void 0 : w.groups) == null ? void 0 : $.find((N) => N._id === o.groupId)) || {
|
|
8935
8932
|
_id: o.groupId,
|
|
8936
8933
|
groupKey: ""
|
|
8937
|
-
}, z = a.state.menu.modules.group.find((N) => N._id === o.groupId), F = Object.entries({ ...
|
|
8934
|
+
}, z = a.state.menu.modules.group.find((N) => N._id === o.groupId), F = Object.entries({ ...A, items: void 0 }).filter(([, N]) => !!N), G = {
|
|
8938
8935
|
...z,
|
|
8939
8936
|
...Object.fromEntries(F),
|
|
8940
8937
|
items: z.items.map((N) => {
|
|
8941
8938
|
var se;
|
|
8942
|
-
const Q = (se =
|
|
8939
|
+
const Q = (se = A.items) == null ? void 0 : se.find(
|
|
8943
8940
|
(K) => K._id == N._id && K.combinationKey == N.combinationKey
|
|
8944
8941
|
);
|
|
8945
8942
|
return {
|
|
@@ -8958,28 +8955,28 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8958
8955
|
!0
|
|
8959
8956
|
)[0];
|
|
8960
8957
|
});
|
|
8961
|
-
function f(
|
|
8958
|
+
function f(A) {
|
|
8962
8959
|
var G, H;
|
|
8963
|
-
const
|
|
8960
|
+
const x = (G = s.value[d.value].groups) == null ? void 0 : G.findIndex(
|
|
8964
8961
|
(w) => w._id === o.groupId
|
|
8965
|
-
), z = Te(s.value), F = { ...Dn(
|
|
8966
|
-
(
|
|
8962
|
+
), z = Te(s.value), F = { ...Dn(A), _id: o.groupId, groupKey: "" };
|
|
8963
|
+
(x ?? -1) < 0 ? z[d.value] = {
|
|
8967
8964
|
...z[d.value],
|
|
8968
8965
|
groups: [...((H = z[d.value]) == null ? void 0 : H.groups) || [], F]
|
|
8969
|
-
} : z[d.value].groups[
|
|
8966
|
+
} : z[d.value].groups[x] = F, s.value = z;
|
|
8970
8967
|
}
|
|
8971
|
-
function g(
|
|
8972
|
-
const
|
|
8968
|
+
function g(A) {
|
|
8969
|
+
const x = c.value.length;
|
|
8973
8970
|
let z = d.value;
|
|
8974
|
-
|
|
8971
|
+
A === "left" ? z = z === 0 ? x - 1 : z - 1 : z = z === x - 1 ? 0 : z + 1, u.value = c.value[z].value;
|
|
8975
8972
|
}
|
|
8976
|
-
function k(
|
|
8973
|
+
function k(A) {
|
|
8977
8974
|
return {
|
|
8978
8975
|
isV4: a.version === It.enum.v4,
|
|
8979
|
-
isDefault: (
|
|
8980
|
-
link: (
|
|
8981
|
-
orderFrom: (
|
|
8982
|
-
name: (
|
|
8976
|
+
isDefault: (x) => !0,
|
|
8977
|
+
link: (x) => !1,
|
|
8978
|
+
orderFrom: (x) => !0,
|
|
8979
|
+
name: (x) => !1,
|
|
8983
8980
|
bindToVariant: !1,
|
|
8984
8981
|
inventory: !0,
|
|
8985
8982
|
orderFromActiveOnly: a.rules.item.orderFromActiveOnly,
|
|
@@ -8993,50 +8990,50 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
8993
8990
|
};
|
|
8994
8991
|
}
|
|
8995
8992
|
function b() {
|
|
8996
|
-
const
|
|
8993
|
+
const A = s.value.map((x) => {
|
|
8997
8994
|
var z;
|
|
8998
8995
|
return {
|
|
8999
|
-
...
|
|
9000
|
-
groups: (z =
|
|
8996
|
+
...x,
|
|
8997
|
+
groups: (z = x.groups) == null ? void 0 : z.map((F) => ({
|
|
9001
8998
|
...ws(F, k())
|
|
9002
8999
|
}))
|
|
9003
9000
|
};
|
|
9004
9001
|
});
|
|
9005
|
-
i("update:combinations",
|
|
9002
|
+
i("update:combinations", A);
|
|
9006
9003
|
}
|
|
9007
9004
|
const v = W(!1);
|
|
9008
9005
|
Ae(
|
|
9009
9006
|
() => v.value,
|
|
9010
|
-
(
|
|
9011
|
-
|
|
9007
|
+
(A) => {
|
|
9008
|
+
A && (s.value = Te(o.combinations), u.value = o.combinations[0].combinationKey || "");
|
|
9012
9009
|
}
|
|
9013
9010
|
);
|
|
9014
|
-
const
|
|
9011
|
+
const T = W();
|
|
9015
9012
|
t({
|
|
9016
|
-
show: (j =
|
|
9017
|
-
trigger: (I =
|
|
9013
|
+
show: (j = T.value) == null ? void 0 : j.show,
|
|
9014
|
+
trigger: (I = T.value) == null ? void 0 : I.trigger
|
|
9018
9015
|
});
|
|
9019
9016
|
const { t: S } = ke();
|
|
9020
|
-
return (
|
|
9017
|
+
return (A, x) => {
|
|
9021
9018
|
const z = U("fm-select"), F = U("fm-button"), G = U("fm-card");
|
|
9022
9019
|
return y(), ee(pr, {
|
|
9023
9020
|
ref_key: "baseFormRef",
|
|
9024
|
-
ref:
|
|
9021
|
+
ref: T,
|
|
9025
9022
|
"allow-refund-inventory": !0,
|
|
9026
9023
|
"categorized-items": m(a).categorizedItems,
|
|
9027
9024
|
config: k,
|
|
9028
9025
|
group: p.value,
|
|
9029
9026
|
action: "update",
|
|
9030
9027
|
title: m(S)("menu.group.update"),
|
|
9031
|
-
"onUpdate:group":
|
|
9032
|
-
"onSubmit:group":
|
|
9033
|
-
"onStatus:show":
|
|
9028
|
+
"onUpdate:group": x[3] || (x[3] = (H) => f(H)),
|
|
9029
|
+
"onSubmit:group": x[4] || (x[4] = (H) => b()),
|
|
9030
|
+
"onStatus:show": x[5] || (x[5] = (H) => v.value = H)
|
|
9034
9031
|
}, {
|
|
9035
9032
|
default: M(({ trigger: H }) => [
|
|
9036
|
-
$e(
|
|
9033
|
+
$e(A.$slots, "default", { trigger: H })
|
|
9037
9034
|
]),
|
|
9038
9035
|
"variant-section": M(() => [
|
|
9039
|
-
u.value && !
|
|
9036
|
+
u.value && !A.hideVariantSection ? (y(), ee(G, {
|
|
9040
9037
|
key: 0,
|
|
9041
9038
|
class: "p-16 bg-fm-color-neutral-gray-100 space-y-24",
|
|
9042
9039
|
variant: "outlined"
|
|
@@ -9046,7 +9043,7 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
9046
9043
|
_("div", Qf, [
|
|
9047
9044
|
h(z, {
|
|
9048
9045
|
modelValue: u.value,
|
|
9049
|
-
"onUpdate:modelValue":
|
|
9046
|
+
"onUpdate:modelValue": x[0] || (x[0] = (H) => u.value = H),
|
|
9050
9047
|
items: c.value,
|
|
9051
9048
|
class: "flex-1"
|
|
9052
9049
|
}, null, 8, ["modelValue", "items"]),
|
|
@@ -9055,13 +9052,13 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
9055
9052
|
variant: m(ze).Tertiary,
|
|
9056
9053
|
"prepend-icon": "keyboard_arrow_left",
|
|
9057
9054
|
size: "lg",
|
|
9058
|
-
onClick:
|
|
9055
|
+
onClick: x[1] || (x[1] = (H) => g("left"))
|
|
9059
9056
|
}, null, 8, ["variant"]),
|
|
9060
9057
|
h(F, {
|
|
9061
9058
|
variant: m(ze).Tertiary,
|
|
9062
9059
|
"prepend-icon": "keyboard_arrow_right",
|
|
9063
9060
|
size: "lg",
|
|
9064
|
-
onClick:
|
|
9061
|
+
onClick: x[2] || (x[2] = (H) => g("right"))
|
|
9065
9062
|
}, null, 8, ["variant"])
|
|
9066
9063
|
])
|
|
9067
9064
|
])
|
|
@@ -9106,10 +9103,10 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
9106
9103
|
), t({ getKey: () => o.bindingKey, trigger: a });
|
|
9107
9104
|
const { t: c } = ke(), p = la();
|
|
9108
9105
|
return (f, g) => {
|
|
9109
|
-
const k = U("fm-text-field"), b = U("fm-card"), v = U("fm-button"),
|
|
9106
|
+
const k = U("fm-text-field"), b = U("fm-card"), v = U("fm-button"), T = U("fm-side-sheet");
|
|
9110
9107
|
return y(), q(Ce, null, [
|
|
9111
9108
|
$e(f.$slots, "default", { trigger: a }),
|
|
9112
|
-
h(
|
|
9109
|
+
h(T, {
|
|
9113
9110
|
id: "inventory-form",
|
|
9114
9111
|
modelValue: i.value,
|
|
9115
9112
|
"onUpdate:modelValue": g[2] || (g[2] = (S) => i.value = S),
|
|
@@ -9167,7 +9164,7 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
9167
9164
|
], 64);
|
|
9168
9165
|
};
|
|
9169
9166
|
}
|
|
9170
|
-
}),
|
|
9167
|
+
}), Vo = oh, ih = {
|
|
9171
9168
|
class: "flex items-center gap-8"
|
|
9172
9169
|
}, ah = {
|
|
9173
9170
|
class: "grow"
|
|
@@ -9270,7 +9267,7 @@ const Vf = /* @__PURE__ */ kt(Df, [["render", Ff]]), Mf = { class: "fm-typo-en-t
|
|
|
9270
9267
|
}
|
|
9271
9268
|
});
|
|
9272
9269
|
function fh() {
|
|
9273
|
-
const e =
|
|
9270
|
+
const e = zo();
|
|
9274
9271
|
function t({
|
|
9275
9272
|
component: n,
|
|
9276
9273
|
props: o
|
|
@@ -9417,12 +9414,12 @@ const hh = {
|
|
|
9417
9414
|
}), r.value = !1;
|
|
9418
9415
|
}
|
|
9419
9416
|
return (b, v) => {
|
|
9420
|
-
const
|
|
9417
|
+
const T = U("FmTable"), S = U("FmButton"), j = U("FmSideSheet"), I = Vt("tooltip");
|
|
9421
9418
|
return y(), q(Ce, null, [$e(b.$slots, "default", {
|
|
9422
9419
|
trigger: u
|
|
9423
9420
|
}), h(j, {
|
|
9424
9421
|
modelValue: r.value,
|
|
9425
|
-
"onUpdate:modelValue": v[2] || (v[2] = (
|
|
9422
|
+
"onUpdate:modelValue": v[2] || (v[2] = (A) => r.value = A),
|
|
9426
9423
|
"max-width": 720,
|
|
9427
9424
|
"is-container": m(Oe).FmForm,
|
|
9428
9425
|
"is-container-props": {
|
|
@@ -9447,12 +9444,12 @@ const hh = {
|
|
|
9447
9444
|
}, null, 8, ["name"]), _("div", wh, [_("p", kh, oe(m(a)("menu.product.form.member_price.configure.pricing_grid")), 1), h(yt, {
|
|
9448
9445
|
min: 0,
|
|
9449
9446
|
modelValue: l.value,
|
|
9450
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
9447
|
+
"onUpdate:modelValue": v[0] || (v[0] = (A) => l.value = A),
|
|
9451
9448
|
placeholder: b.basePriceFallback,
|
|
9452
9449
|
class: "w-[258px] xs:w-full",
|
|
9453
9450
|
label: m(a)("menu.product.form.member_price.configure.default_selling_price"),
|
|
9454
9451
|
"show-currency": "",
|
|
9455
|
-
rules: b.currentConfig == "Main Pricing" ? [(
|
|
9452
|
+
rules: b.currentConfig == "Main Pricing" ? [(A) => !!A || m(a)("menu.product.form.price.fields.selling_price.required")] : []
|
|
9456
9453
|
}, {
|
|
9457
9454
|
append: M(() => [m(n).showRemy ? qe((y(), ee(m(Rn), {
|
|
9458
9455
|
key: 0,
|
|
@@ -9461,7 +9458,7 @@ const hh = {
|
|
|
9461
9458
|
onClick: c
|
|
9462
9459
|
}, null, 512)), [[I, m(Ht)("Suggest pricing")]]) : te("", !0)]),
|
|
9463
9460
|
_: 1
|
|
9464
|
-
}, 8, ["modelValue", "placeholder", "label", "rules"])]), _("div", Ch, [_("div", Sh, [_("p", xh, oe(m(a)("menu.product.form.member_price.configure.member_selling_price.label")), 1), _("p", Ah, oe(m(a)("menu.product.form.member_price.configure.member_selling_price.sublabel")), 1)]), h(
|
|
9461
|
+
}, 8, ["modelValue", "placeholder", "label", "rules"])]), _("div", Ch, [_("div", Sh, [_("p", xh, oe(m(a)("menu.product.form.member_price.configure.member_selling_price.label")), 1), _("p", Ah, oe(m(a)("menu.product.form.member_price.configure.member_selling_price.sublabel")), 1)]), h(T, {
|
|
9465
9462
|
"column-defs": f,
|
|
9466
9463
|
"row-data": g.value,
|
|
9467
9464
|
"hide-footer": ""
|
|
@@ -9510,7 +9507,7 @@ const hh = {
|
|
|
9510
9507
|
}
|
|
9511
9508
|
}), dr = /* @__PURE__ */ ye({
|
|
9512
9509
|
__name: "PriceTierForm",
|
|
9513
|
-
props: /* @__PURE__ */
|
|
9510
|
+
props: /* @__PURE__ */ ai({
|
|
9514
9511
|
priceTiers: {
|
|
9515
9512
|
default: () => []
|
|
9516
9513
|
},
|
|
@@ -9526,7 +9523,7 @@ const hh = {
|
|
|
9526
9523
|
},
|
|
9527
9524
|
modelModifiers: {}
|
|
9528
9525
|
}),
|
|
9529
|
-
emits: /* @__PURE__ */
|
|
9526
|
+
emits: /* @__PURE__ */ ai(["update:priceTiersVariant"], ["update:modelValue"]),
|
|
9530
9527
|
setup(e, {
|
|
9531
9528
|
emit: t
|
|
9532
9529
|
}) {
|
|
@@ -9597,7 +9594,7 @@ const hh = {
|
|
|
9597
9594
|
default: () => h("span", {
|
|
9598
9595
|
class: "underline line-clamp-2 break-all"
|
|
9599
9596
|
}, [g ? n("menu.product.form.member_price.configure.title") : n("menu.product.form.member_price.configure.title_with_tier", {
|
|
9600
|
-
num: Object.values(f).filter((
|
|
9597
|
+
num: Object.values(f).filter((T) => T !== null).length
|
|
9601
9598
|
})])
|
|
9602
9599
|
})
|
|
9603
9600
|
}), h(Wn, {
|
|
@@ -9644,8 +9641,8 @@ const hh = {
|
|
|
9644
9641
|
o("submit", g), a();
|
|
9645
9642
|
}
|
|
9646
9643
|
return (g, k) => {
|
|
9647
|
-
const b = U("FmButton"), v = U("fm-button"),
|
|
9648
|
-
return y(), ee(
|
|
9644
|
+
const b = U("FmButton"), v = U("fm-button"), T = U("FmSideSheet");
|
|
9645
|
+
return y(), ee(T, {
|
|
9649
9646
|
id: "business-form",
|
|
9650
9647
|
modelValue: i.value,
|
|
9651
9648
|
"onUpdate:modelValue": k[2] || (k[2] = (S) => i.value = S),
|
|
@@ -9763,7 +9760,7 @@ const hh = {
|
|
|
9763
9760
|
};
|
|
9764
9761
|
}
|
|
9765
9762
|
});
|
|
9766
|
-
function
|
|
9763
|
+
function ti(e) {
|
|
9767
9764
|
if (!e) return null;
|
|
9768
9765
|
const t = {};
|
|
9769
9766
|
for (const [n, o] of Object.entries(e)) {
|
|
@@ -9774,7 +9771,7 @@ function ni(e) {
|
|
|
9774
9771
|
}
|
|
9775
9772
|
return Object.keys(t).length > 0 ? t : null;
|
|
9776
9773
|
}
|
|
9777
|
-
function
|
|
9774
|
+
function ni(e) {
|
|
9778
9775
|
if (!e) return null;
|
|
9779
9776
|
const t = {};
|
|
9780
9777
|
for (const [n, o] of Object.entries(e))
|
|
@@ -9829,7 +9826,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9829
9826
|
searchKey: f,
|
|
9830
9827
|
filter: g
|
|
9831
9828
|
} = ps(), k = R(() => {
|
|
9832
|
-
const C = Object.entries(n.group.items).filter(([, E]) => g([E.code || "", E.name || E.fallbackName,
|
|
9829
|
+
const C = Object.entries(n.group.items).filter(([, E]) => g([E.code || "", E.name || E.fallbackName, T(E.price ?? E.fallbackPrice), S(E.orderFrom || E.fallbackOrder), ...(E.items || []).map((Y) => [Y.code || "", Y.name || Y.fallbackName, T(Y.price ?? Y.fallbackPrice), S(Y.orderFrom || Y.fallbackOrder)].join(""))]));
|
|
9833
9830
|
return Object.fromEntries(C);
|
|
9834
9831
|
}), b = (C) => ({
|
|
9835
9832
|
...n.config,
|
|
@@ -9837,14 +9834,14 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9837
9834
|
link: n.config.link(C),
|
|
9838
9835
|
name: n.config.name(C),
|
|
9839
9836
|
orderFrom: n.config.orderFrom(C)
|
|
9840
|
-
}), v = R(() => !0),
|
|
9837
|
+
}), v = R(() => !0), T = (C) => C ? lt(C, !1) : "", S = (C) => {
|
|
9841
9838
|
var E;
|
|
9842
9839
|
return C == null ? "" : (E = Lr()[C]) == null ? void 0 : E.label;
|
|
9843
9840
|
}, j = R(() => Object.values(k.value)), I = W({}), {
|
|
9844
|
-
t:
|
|
9845
|
-
} = ke(),
|
|
9841
|
+
t: A
|
|
9842
|
+
} = ke(), x = Mn(), z = W([{
|
|
9846
9843
|
accessorKey: "isDefault",
|
|
9847
|
-
header: () =>
|
|
9844
|
+
header: () => A("menu.group.option.is_default"),
|
|
9848
9845
|
enableSorting: !1,
|
|
9849
9846
|
size: 35,
|
|
9850
9847
|
cell: (C) => {
|
|
@@ -9869,7 +9866,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9869
9866
|
}
|
|
9870
9867
|
}, {
|
|
9871
9868
|
accessorKey: "code",
|
|
9872
|
-
header: () =>
|
|
9869
|
+
header: () => A("menu.group.option.code"),
|
|
9873
9870
|
enableSorting: !1,
|
|
9874
9871
|
size: 100,
|
|
9875
9872
|
cell: (C) => {
|
|
@@ -9888,7 +9885,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9888
9885
|
accessorKey: "name",
|
|
9889
9886
|
header: () => Ue("div", {
|
|
9890
9887
|
class: "flex items-center w-full gap-8"
|
|
9891
|
-
}, [Ue("span",
|
|
9888
|
+
}, [Ue("span", A("menu.group.option.product_title")), Ue(Oe.FmButton, {
|
|
9892
9889
|
icon: "g_translate",
|
|
9893
9890
|
variant: ze.Tertiary,
|
|
9894
9891
|
textColor: ot.NeutralGray400,
|
|
@@ -9900,12 +9897,12 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9900
9897
|
enableSorting: !1,
|
|
9901
9898
|
cell: (C) => {
|
|
9902
9899
|
var D;
|
|
9903
|
-
const E = C.getValue(), Y = C.row.original, ne = !b(Y.combinationKey).name || Y.orderFrom === Pe.enum.NONE, de = C.row.depth > 0, be = Y.combinationKey ?
|
|
9900
|
+
const E = C.getValue(), Y = C.row.original, ne = !b(Y.combinationKey).name || Y.orderFrom === Pe.enum.NONE, de = C.row.depth > 0, be = Y.combinationKey ? bo(Y.combinationKey, De().variants) : a.rules.group.linkAddonName ? (D = se.value[Y._id]) == null ? void 0 : D.name : null;
|
|
9904
9901
|
return Ue("div", Ue(Oe.FmTextField, {
|
|
9905
9902
|
modelValue: E,
|
|
9906
9903
|
placeholder: be ?? "",
|
|
9907
9904
|
disabled: ne,
|
|
9908
|
-
rules: be ? void 0 : [(B) => ((B == null ? void 0 : B.length) ?? 0) > 0 ||
|
|
9905
|
+
rules: be ? void 0 : [(B) => ((B == null ? void 0 : B.length) ?? 0) > 0 || A("menu.group.option.product_title_required")],
|
|
9909
9906
|
"onUpdate:modelValue": (B) => {
|
|
9910
9907
|
var X;
|
|
9911
9908
|
if (de) {
|
|
@@ -9933,13 +9930,13 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9933
9930
|
enableSorting: !1,
|
|
9934
9931
|
header: () => {
|
|
9935
9932
|
var C;
|
|
9936
|
-
return
|
|
9933
|
+
return A("menu.group.option.price", {
|
|
9937
9934
|
symbol: (C = r.value) == null ? void 0 : C.currency.symbol
|
|
9938
9935
|
});
|
|
9939
9936
|
},
|
|
9940
9937
|
size: 400,
|
|
9941
9938
|
cell: (C) => {
|
|
9942
|
-
const E = C.getValue(), Y = C.row.original, ne = !b(null).priceEdit || Y.orderFrom === Pe.enum.NONE, de = Y.fallbackPrice, be = C.row.depth > 0, D =
|
|
9939
|
+
const E = C.getValue(), Y = C.row.original, ne = !b(null).priceEdit || Y.orderFrom === Pe.enum.NONE, de = Y.fallbackPrice, be = C.row.depth > 0, D = x.getMemberPricingPriceVariant(Y.price_variant), B = Object.values(D).every((X) => X === null);
|
|
9943
9940
|
return h("div", {
|
|
9944
9941
|
class: "flex items-center gap-8"
|
|
9945
9942
|
}, [h(yt, {
|
|
@@ -9969,7 +9966,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9969
9966
|
}, null), b(null).priceTier && h("div", {
|
|
9970
9967
|
class: "flex items-center gap-4"
|
|
9971
9968
|
}, [h(Gn, {
|
|
9972
|
-
title:
|
|
9969
|
+
title: A("menu.product.form.member_price.configure.title"),
|
|
9973
9970
|
currentConfig: "",
|
|
9974
9971
|
priceVariants: D,
|
|
9975
9972
|
showRemy: !1,
|
|
@@ -9979,7 +9976,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9979
9976
|
var P;
|
|
9980
9977
|
const ue = {
|
|
9981
9978
|
price: X.basePrice,
|
|
9982
|
-
price_variant:
|
|
9979
|
+
price_variant: ni(X.priceVariants)
|
|
9983
9980
|
};
|
|
9984
9981
|
if (be) {
|
|
9985
9982
|
const ae = (P = C.row.getParentRow()) == null ? void 0 : P.original;
|
|
@@ -9993,12 +9990,12 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
9993
9990
|
trigger: X
|
|
9994
9991
|
}) => h(Oe.FmButton, {
|
|
9995
9992
|
variant: ze.Plain,
|
|
9996
|
-
label:
|
|
9993
|
+
label: A("menu.product.form.member_price.configure.title"),
|
|
9997
9994
|
onClick: () => X()
|
|
9998
9995
|
}, {
|
|
9999
9996
|
default: () => h("span", {
|
|
10000
9997
|
class: "underline line-clamp-2 break-all"
|
|
10001
|
-
}, [B ?
|
|
9998
|
+
}, [B ? A("menu.product.form.member_price.configure.title") : A("menu.product.form.member_price.configure.title_with_tier", {
|
|
10002
9999
|
num: Object.values(D).filter((ue) => ue !== null).length
|
|
10003
10000
|
})])
|
|
10004
10001
|
})
|
|
@@ -10009,12 +10006,12 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10009
10006
|
}
|
|
10010
10007
|
}, {
|
|
10011
10008
|
accessorKey: "orderFrom",
|
|
10012
|
-
header: () =>
|
|
10009
|
+
header: () => A("menu.common.labels.order_from"),
|
|
10013
10010
|
size: 100,
|
|
10014
10011
|
enableSorting: !1,
|
|
10015
10012
|
cell: (C) => {
|
|
10016
10013
|
const E = C.getValue(), Y = C.row.original, ne = Y.fallbackOrder, de = C.row.depth > 0;
|
|
10017
|
-
return Ue(
|
|
10014
|
+
return Ue(Bo, {
|
|
10018
10015
|
modelValue: E,
|
|
10019
10016
|
fallback: ne,
|
|
10020
10017
|
disable: !b(Y.combinationKey).orderFrom,
|
|
@@ -10057,7 +10054,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10057
10054
|
onClick: D
|
|
10058
10055
|
}, null);
|
|
10059
10056
|
return h(U("fm-tooltip"), {
|
|
10060
|
-
content:
|
|
10057
|
+
content: A("menu.group.nested.title"),
|
|
10061
10058
|
zIndex: 110
|
|
10062
10059
|
}, {
|
|
10063
10060
|
default: () => [de.length > 0 ? h(Oe.FmBadge, {
|
|
@@ -10078,7 +10075,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10078
10075
|
var X;
|
|
10079
10076
|
const B = {
|
|
10080
10077
|
priceTiers: D.priceTiers,
|
|
10081
|
-
priceTiers_variant:
|
|
10078
|
+
priceTiers_variant: ti(D.priceTiersVariant)
|
|
10082
10079
|
};
|
|
10083
10080
|
if (ne) {
|
|
10084
10081
|
const ue = (X = C.row.getParentRow()) == null ? void 0 : X.original;
|
|
@@ -10087,7 +10084,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10087
10084
|
} else
|
|
10088
10085
|
H(E._id, B);
|
|
10089
10086
|
}
|
|
10090
|
-
}, null), b(E.combinationKey).inventory && h(
|
|
10087
|
+
}, null), b(E.combinationKey).inventory && h(Vo, {
|
|
10091
10088
|
title: "Inventory",
|
|
10092
10089
|
initialValue: E.inventoryBindings ?? [],
|
|
10093
10090
|
name: E.name ?? E.fallbackName ?? "",
|
|
@@ -10261,7 +10258,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10261
10258
|
}
|
|
10262
10259
|
function Z(C) {
|
|
10263
10260
|
var Y;
|
|
10264
|
-
const E = C.combinationKey ?
|
|
10261
|
+
const E = C.combinationKey ? bo(C.combinationKey, a.variants) : (Y = se.value[C._id]) == null ? void 0 : Y.name;
|
|
10265
10262
|
return C.name || C.fallbackName || E || "";
|
|
10266
10263
|
}
|
|
10267
10264
|
function ge(C) {
|
|
@@ -10314,8 +10311,8 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10314
10311
|
return (C, E) => {
|
|
10315
10312
|
const Y = U("fm-button"), ne = U("fm-table");
|
|
10316
10313
|
return y(), q(Ce, null, [h(Ye, {
|
|
10317
|
-
title: m(
|
|
10318
|
-
"sub-title": C.config.link() && d.value ? m(
|
|
10314
|
+
title: m(A)("menu.group.option.title"),
|
|
10315
|
+
"sub-title": C.config.link() && d.value ? m(A)("menu.group.option.subtitle") : ""
|
|
10319
10316
|
}, {
|
|
10320
10317
|
"append-title": M(() => [C.config.link() ? (y(), q(Ce, {
|
|
10321
10318
|
key: 0
|
|
@@ -10324,7 +10321,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10324
10321
|
"initial-value": p.value,
|
|
10325
10322
|
"show-variant": C.config.bindToVariant,
|
|
10326
10323
|
"select-variant": "",
|
|
10327
|
-
title: m(
|
|
10324
|
+
title: m(A)("menu.group.option.link_products"),
|
|
10328
10325
|
onSubmit: E[0] || (E[0] = ({
|
|
10329
10326
|
items: de
|
|
10330
10327
|
}) => he(de))
|
|
@@ -10335,7 +10332,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10335
10332
|
"text-color": m(ot).ColorPrimary,
|
|
10336
10333
|
"border-color": m(ot).ColorPrimary,
|
|
10337
10334
|
variant: "secondary",
|
|
10338
|
-
label: m(
|
|
10335
|
+
label: m(A)("menu.group.option.link_products"),
|
|
10339
10336
|
"prepend-icon": "link",
|
|
10340
10337
|
onClick: de
|
|
10341
10338
|
}, null, 8, ["text-color", "border-color", "label", "onClick"])]),
|
|
@@ -10344,7 +10341,7 @@ const Bh = /* @__PURE__ */ ye({
|
|
|
10344
10341
|
"text-color": m(ot).ColorPrimary,
|
|
10345
10342
|
"border-color": m(ot).ColorPrimary,
|
|
10346
10343
|
variant: "secondary",
|
|
10347
|
-
label: m(
|
|
10344
|
+
label: m(A)("menu.group.option.add_option"),
|
|
10348
10345
|
"prepend-icon": "add",
|
|
10349
10346
|
onClick: G
|
|
10350
10347
|
}, null, 8, ["text-color", "border-color", "label"])]))], 64)) : te("", !0)]),
|
|
@@ -10453,7 +10450,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10453
10450
|
() => o.group
|
|
10454
10451
|
), f = W(!1), g = W(!1), k = W(!1), b = (O) => {
|
|
10455
10452
|
Bt.isBoolean(O) ? g.value = O : g.value = !g.value;
|
|
10456
|
-
}, v = R(() => o.group ? o.config(o.group) : null),
|
|
10453
|
+
}, v = R(() => o.group ? o.config(o.group) : null), T = R(() => pa(v.value)), S = (O) => T.value.includes(O), j = R(() => [
|
|
10457
10454
|
{
|
|
10458
10455
|
label: "Normal",
|
|
10459
10456
|
value: Re.enum.NORMAL
|
|
@@ -10470,15 +10467,15 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10470
10467
|
function I(O) {
|
|
10471
10468
|
i("update:group", O);
|
|
10472
10469
|
}
|
|
10473
|
-
function
|
|
10470
|
+
function A(O) {
|
|
10474
10471
|
o.group && I({
|
|
10475
10472
|
...o.group,
|
|
10476
10473
|
name_locale: O
|
|
10477
10474
|
});
|
|
10478
10475
|
}
|
|
10479
|
-
const
|
|
10476
|
+
const x = W((he = o.group) == null ? void 0 : he.name);
|
|
10480
10477
|
function z(O) {
|
|
10481
|
-
o.group && (
|
|
10478
|
+
o.group && (x.value = O, I({
|
|
10482
10479
|
...o.group,
|
|
10483
10480
|
name: O
|
|
10484
10481
|
}));
|
|
@@ -10519,7 +10516,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10519
10516
|
async function N() {
|
|
10520
10517
|
var O;
|
|
10521
10518
|
if (o.action === "add") {
|
|
10522
|
-
if (a.groups.find((me) => me.name ===
|
|
10519
|
+
if (a.groups.find((me) => me.name === x.value)) {
|
|
10523
10520
|
s.open({
|
|
10524
10521
|
type: "error",
|
|
10525
10522
|
message: Z("menu.group.validation.name_duplicate")
|
|
@@ -10527,7 +10524,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10527
10524
|
return;
|
|
10528
10525
|
}
|
|
10529
10526
|
} else if (o.action === "update" && a.groups.find(
|
|
10530
|
-
(me) => me.name ===
|
|
10527
|
+
(me) => me.name === x.value && me._id !== o.group._id
|
|
10531
10528
|
)) {
|
|
10532
10529
|
s.open({
|
|
10533
10530
|
type: "error",
|
|
@@ -10538,7 +10535,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10538
10535
|
if (o.action === "add") {
|
|
10539
10536
|
const J = {
|
|
10540
10537
|
...o.group,
|
|
10541
|
-
name:
|
|
10538
|
+
name: x.value,
|
|
10542
10539
|
...o.group.name_locale && { name_locale: o.group.name_locale }
|
|
10543
10540
|
}, { group: me, linkItems: pe } = da(J), C = {
|
|
10544
10541
|
module: Be.enum.group,
|
|
@@ -10567,7 +10564,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10567
10564
|
}
|
|
10568
10565
|
const J = {
|
|
10569
10566
|
...o.group,
|
|
10570
|
-
name:
|
|
10567
|
+
name: x.value,
|
|
10571
10568
|
...o.group.name_locale && { name_locale: o.group.name_locale }
|
|
10572
10569
|
};
|
|
10573
10570
|
i("submit:group", J);
|
|
@@ -10600,7 +10597,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10600
10597
|
(O) => !!O || Z("menu.common.validation.required", { field: Z("menu.common.labels.group_name") }),
|
|
10601
10598
|
// Duplicate name validation
|
|
10602
10599
|
(O) => o.action === "add" ? !a.groups.find((me) => me.name === O) || Z("menu.group.validation.name_duplicate") : o.action === "update" ? !a.groups.find((me) => me.name === O && me._id !== o.group._id) || Z("menu.group.validation.name_duplicate") : !0
|
|
10603
|
-
]), ce = R(() =>
|
|
10600
|
+
]), ce = R(() => x.value ? le.value.every((O) => O(x.value) === !0) : !1);
|
|
10604
10601
|
t({
|
|
10605
10602
|
trigger: b,
|
|
10606
10603
|
show: g
|
|
@@ -10665,8 +10662,8 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10665
10662
|
var X;
|
|
10666
10663
|
return [
|
|
10667
10664
|
h(C, {
|
|
10668
|
-
modelValue:
|
|
10669
|
-
"onUpdate:modelValue": J[1] || (J[1] = (ue) =>
|
|
10665
|
+
modelValue: x.value,
|
|
10666
|
+
"onUpdate:modelValue": J[1] || (J[1] = (ue) => x.value = ue),
|
|
10670
10667
|
placeholder: (X = H.value) == null ? void 0 : X.name,
|
|
10671
10668
|
disabled: S("name"),
|
|
10672
10669
|
rules: S("name") ? [] : le.value,
|
|
@@ -10809,15 +10806,15 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10809
10806
|
]),
|
|
10810
10807
|
_: 3
|
|
10811
10808
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]),
|
|
10812
|
-
O.group ? (y(), ee(
|
|
10809
|
+
O.group ? (y(), ee(No, {
|
|
10813
10810
|
key: 0,
|
|
10814
10811
|
modelValue: k.value,
|
|
10815
10812
|
"onUpdate:modelValue": J[10] || (J[10] = (X) => k.value = X),
|
|
10816
10813
|
title: m(Z)("menu.group.title"),
|
|
10817
|
-
name:
|
|
10814
|
+
name: x.value ?? ((B = H.value) == null ? void 0 : B.name) ?? "",
|
|
10818
10815
|
"name-locale": O.group.name_locale,
|
|
10819
10816
|
"onUpdate:name": z,
|
|
10820
|
-
"onUpdate:nameLocale":
|
|
10817
|
+
"onUpdate:nameLocale": A
|
|
10821
10818
|
}, null, 8, ["modelValue", "title", "name", "name-locale"])) : te("", !0)
|
|
10822
10819
|
], 64);
|
|
10823
10820
|
};
|
|
@@ -10836,36 +10833,36 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10836
10833
|
setup(e) {
|
|
10837
10834
|
const t = e, n = nt(), { emitData: o, emitAction: i } = Nt(), a = De(), r = R(() => a.rules.group), l = R(() => a.groups);
|
|
10838
10835
|
function s(b) {
|
|
10839
|
-
return Te(b ?? []).sort((
|
|
10836
|
+
return Te(b ?? []).sort((T, S) => T.position - S.position);
|
|
10840
10837
|
}
|
|
10841
10838
|
const u = R(() => s(l.value).reduce((b, v) => (b[v._id] = {
|
|
10842
10839
|
name: v.name,
|
|
10843
10840
|
type: Un(a.items, v.items)
|
|
10844
10841
|
}, b), {})), d = R(() => [
|
|
10845
|
-
...Object.entries(u.value).map(([b, { name: v, type:
|
|
10846
|
-
label: `${v} ${r.value.type ? `(${
|
|
10842
|
+
...Object.entries(u.value).map(([b, { name: v, type: T }]) => ({
|
|
10843
|
+
label: `${v} ${r.value.type ? `(${vo(T)})` : ""}`.trim(),
|
|
10847
10844
|
value: b
|
|
10848
10845
|
}))
|
|
10849
10846
|
]), c = R(() => !!a.state.currentCatalogId || !!a.state.currentSchedulerId);
|
|
10850
10847
|
R(() => {
|
|
10851
|
-
const b = !a.state.currentSchedulerId, v = a.rules.group.type,
|
|
10852
|
-
return function(
|
|
10848
|
+
const b = !a.state.currentSchedulerId, v = a.rules.group.type, T = a.version == It.enum.v3, S = a.rules.item.orderFromActiveOnly, j = a.rules.item.bindToVariant;
|
|
10849
|
+
return function(A) {
|
|
10853
10850
|
return {
|
|
10854
|
-
isDefault: (
|
|
10855
|
-
link: (
|
|
10856
|
-
name: (
|
|
10857
|
-
type: v && !
|
|
10858
|
-
price:
|
|
10851
|
+
isDefault: (x) => !c.value && !x,
|
|
10852
|
+
link: (x) => !c.value && (!x || j),
|
|
10853
|
+
name: (x) => !c.value && !x,
|
|
10854
|
+
type: v && !A._id && !c.value,
|
|
10855
|
+
price: A.type != Re.enum.DYNAMIC,
|
|
10859
10856
|
priceEdit: !0,
|
|
10860
10857
|
priceTier: a.isV4,
|
|
10861
|
-
inventory: b ?
|
|
10862
|
-
orderFrom: (
|
|
10858
|
+
inventory: b ? T ? !c.value && A.type == Re.enum.NORMAL : !c.value : !1,
|
|
10859
|
+
orderFrom: (x) => b ? T ? A.type == Re.enum.DYNAMIC ? c.value : !!c.value == !x : c.value : !1,
|
|
10863
10860
|
orderFromActiveOnly: S,
|
|
10864
|
-
showOrderFrom: b ?
|
|
10861
|
+
showOrderFrom: b ? T ? c.value ? !0 : A.type == Re.enum.PRODUCT : c.value : !1,
|
|
10865
10862
|
bindToVariant: j,
|
|
10866
10863
|
isOverride: c.value,
|
|
10867
10864
|
isItemGroup: !1,
|
|
10868
|
-
isV4: !
|
|
10865
|
+
isV4: !T
|
|
10869
10866
|
};
|
|
10870
10867
|
};
|
|
10871
10868
|
}), R(() => ({
|
|
@@ -10879,10 +10876,10 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10879
10876
|
o(p.value), i("primary"), n.close();
|
|
10880
10877
|
};
|
|
10881
10878
|
return (b, v) => {
|
|
10882
|
-
const
|
|
10879
|
+
const T = U("FmSearch"), S = U("FmCheckbox"), j = U("FmButton");
|
|
10883
10880
|
return d.value.length > 0 ? (y(), q("div", Yh, [
|
|
10884
10881
|
_("div", null, [
|
|
10885
|
-
h(
|
|
10882
|
+
h(T, {
|
|
10886
10883
|
autofocus: "",
|
|
10887
10884
|
modelValue: f.value,
|
|
10888
10885
|
"onUpdate:modelValue": v[0] || (v[0] = (I) => f.value = I),
|
|
@@ -10897,8 +10894,8 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10897
10894
|
qe(h(S, {
|
|
10898
10895
|
modelValue: p.value,
|
|
10899
10896
|
"onUpdate:modelValue": [
|
|
10900
|
-
v[1] || (v[1] = (
|
|
10901
|
-
v[2] || (v[2] = (
|
|
10897
|
+
v[1] || (v[1] = (A) => p.value = A),
|
|
10898
|
+
v[2] || (v[2] = (A) => m(o)(p.value))
|
|
10902
10899
|
],
|
|
10903
10900
|
label: I.label,
|
|
10904
10901
|
value: I.value
|
|
@@ -10915,7 +10912,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10915
10912
|
label: m(g)("menu.common.actions.add_group"),
|
|
10916
10913
|
variant: "tertiary",
|
|
10917
10914
|
"text-color": "primary",
|
|
10918
|
-
onClick: (
|
|
10915
|
+
onClick: (A) => I()
|
|
10919
10916
|
}, null, 8, ["label", "onClick"])
|
|
10920
10917
|
]),
|
|
10921
10918
|
_: 1
|
|
@@ -10942,7 +10939,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
10942
10939
|
h(j, {
|
|
10943
10940
|
label: m(g)("menu.common.actions.add_group"),
|
|
10944
10941
|
icon: "add",
|
|
10945
|
-
onClick: (
|
|
10942
|
+
onClick: (A) => I()
|
|
10946
10943
|
}, null, 8, ["label", "onClick"])
|
|
10947
10944
|
]),
|
|
10948
10945
|
_: 1
|
|
@@ -11015,9 +11012,9 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11015
11012
|
name: $,
|
|
11016
11013
|
type: N
|
|
11017
11014
|
}]) => ({
|
|
11018
|
-
label: `${$} ${u.value.type ? `(${
|
|
11015
|
+
label: `${$} ${u.value.type ? `(${vo(N)})` : ""}`.trim(),
|
|
11019
11016
|
value: w
|
|
11020
|
-
}))]),
|
|
11017
|
+
}))]), T = R(() => [{
|
|
11021
11018
|
accessorKey: "name",
|
|
11022
11019
|
header: () => l("menu.product.form.group.columns.title"),
|
|
11023
11020
|
enableSorting: !1,
|
|
@@ -11033,7 +11030,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11033
11030
|
cell: (w) => {
|
|
11034
11031
|
var N;
|
|
11035
11032
|
const $ = w.row.original._id;
|
|
11036
|
-
return
|
|
11033
|
+
return vo((N = b.value[$]) == null ? void 0 : N.type);
|
|
11037
11034
|
}
|
|
11038
11035
|
}, {
|
|
11039
11036
|
accessorKey: "items",
|
|
@@ -11074,7 +11071,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11074
11071
|
variant: "tertiary",
|
|
11075
11072
|
textColor: "neutral-gray-400",
|
|
11076
11073
|
onClick: it(async () => {
|
|
11077
|
-
|
|
11074
|
+
A($);
|
|
11078
11075
|
}, ["stop", "prevent"])
|
|
11079
11076
|
}), Ue(qh, {
|
|
11080
11077
|
// variant items
|
|
@@ -11136,7 +11133,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11136
11133
|
groups: $
|
|
11137
11134
|
}));
|
|
11138
11135
|
}
|
|
11139
|
-
function
|
|
11136
|
+
function A(w) {
|
|
11140
11137
|
var N, Q, se;
|
|
11141
11138
|
if (!n.form.groups)
|
|
11142
11139
|
return;
|
|
@@ -11149,12 +11146,12 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11149
11146
|
groups: $
|
|
11150
11147
|
}));
|
|
11151
11148
|
}
|
|
11152
|
-
const
|
|
11149
|
+
const x = R(() => {
|
|
11153
11150
|
var w;
|
|
11154
11151
|
return !!((w = n.form.variant) != null && w.variantGroupIds.length);
|
|
11155
11152
|
}), z = R(() => {
|
|
11156
11153
|
var w;
|
|
11157
|
-
return
|
|
11154
|
+
return x.value ? (w = n.form.variant) == null ? void 0 : w.variantCombinations : [{
|
|
11158
11155
|
_id: n.form._id,
|
|
11159
11156
|
combinationKey: "",
|
|
11160
11157
|
groups: n.form.groups || []
|
|
@@ -11181,7 +11178,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11181
11178
|
return ($ = v.value.find((N) => N.value === w)) == null ? void 0 : $.label;
|
|
11182
11179
|
}, H = (w) => {
|
|
11183
11180
|
var $;
|
|
11184
|
-
|
|
11181
|
+
x.value ? s("update:form", "variant", {
|
|
11185
11182
|
variantGroupIds: (($ = n.form.variant) == null ? void 0 : $.variantGroupIds) || [],
|
|
11186
11183
|
variantCombinations: w
|
|
11187
11184
|
}) : s("update:form", "groups", w[0].groups || []);
|
|
@@ -11204,7 +11201,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11204
11201
|
var se;
|
|
11205
11202
|
return [((se = f.value) == null ? void 0 : se.length) > 0 ? (y(), ee(Q, {
|
|
11206
11203
|
key: 0,
|
|
11207
|
-
"column-defs":
|
|
11204
|
+
"column-defs": T.value,
|
|
11208
11205
|
"column-visibility": S.value,
|
|
11209
11206
|
"row-data": f.value.map((K) => ({
|
|
11210
11207
|
_id: K
|
|
@@ -11249,15 +11246,15 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11249
11246
|
const j = Fe.clone(o.form);
|
|
11250
11247
|
j.lowStockThreshold = S === null ? void 0 : S, i("replace:form", j);
|
|
11251
11248
|
}
|
|
11252
|
-
function p(S, j, I,
|
|
11249
|
+
function p(S, j, I, A) {
|
|
11253
11250
|
return !j || j && j.length === 0 ? [{
|
|
11254
11251
|
_id: "",
|
|
11255
11252
|
name: I || "",
|
|
11256
11253
|
binding: S || []
|
|
11257
|
-
}] : j.map((
|
|
11258
|
-
_id:
|
|
11259
|
-
name:
|
|
11260
|
-
binding:
|
|
11254
|
+
}] : j.map((x) => ({
|
|
11255
|
+
_id: x.combinationKey || "",
|
|
11256
|
+
name: bo(x.combinationKey || "", A),
|
|
11257
|
+
binding: x.inventoryBindings || []
|
|
11261
11258
|
}));
|
|
11262
11259
|
}
|
|
11263
11260
|
const f = R(() => {
|
|
@@ -11270,11 +11267,11 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11270
11267
|
function k(S, j) {
|
|
11271
11268
|
var z, F;
|
|
11272
11269
|
let I = Fe.clone(o.form);
|
|
11273
|
-
const
|
|
11274
|
-
if ((((z =
|
|
11275
|
-
const G =
|
|
11270
|
+
const A = I.variant;
|
|
11271
|
+
if ((((z = A == null ? void 0 : A.variantCombinations) == null ? void 0 : z.length) ?? 0) > 0 && A) {
|
|
11272
|
+
const G = A.variantCombinations.findIndex((w) => w.combinationKey === S);
|
|
11276
11273
|
if (G < 0) return;
|
|
11277
|
-
const H = Fe.clone(
|
|
11274
|
+
const H = Fe.clone(A.variantCombinations);
|
|
11278
11275
|
H[G].inventoryBindings = j, I = {
|
|
11279
11276
|
...I,
|
|
11280
11277
|
variant: {
|
|
@@ -11321,7 +11318,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11321
11318
|
const j = S.row.original;
|
|
11322
11319
|
return l.value ? h("div", {
|
|
11323
11320
|
class: "flex items-center justify-end"
|
|
11324
|
-
}, [h(
|
|
11321
|
+
}, [h(Vo, {
|
|
11325
11322
|
name: j.name,
|
|
11326
11323
|
initialValue: j.bindings ?? [],
|
|
11327
11324
|
title: n("menu.inventory.dialog.title", {
|
|
@@ -11349,28 +11346,28 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11349
11346
|
for (const j of b.value)
|
|
11350
11347
|
j.getKey() === S && j.trigger(!0);
|
|
11351
11348
|
}
|
|
11352
|
-
const
|
|
11349
|
+
const T = la();
|
|
11353
11350
|
return Gt(() => {
|
|
11354
|
-
|
|
11351
|
+
T.readInventory();
|
|
11355
11352
|
}), (S, j) => {
|
|
11356
11353
|
const I = U("FmStepperField");
|
|
11357
11354
|
return y(), q(Ce, null, [h(Ye, {
|
|
11358
11355
|
title: m(n)("menu.inventory.title"),
|
|
11359
11356
|
subTitle: m(n)("menu.inventory.subtitle")
|
|
11360
11357
|
}, {
|
|
11361
|
-
default: M(() => [_("div", ag, [_("div", rg, [(y(!0), q(Ce, null, Ie(g.value, (
|
|
11362
|
-
key:
|
|
11358
|
+
default: M(() => [_("div", ag, [_("div", rg, [(y(!0), q(Ce, null, Ie(g.value, (A) => (y(), ee(m(Vo), {
|
|
11359
|
+
key: A._id,
|
|
11363
11360
|
ref_for: !0,
|
|
11364
11361
|
ref_key: "inventoryManagerForms",
|
|
11365
11362
|
ref: b,
|
|
11366
11363
|
title: m(n)("menu.inventory.dialog.title", {
|
|
11367
11364
|
name: f.value
|
|
11368
11365
|
}),
|
|
11369
|
-
name:
|
|
11370
|
-
bindingKey:
|
|
11371
|
-
initialValue:
|
|
11372
|
-
"onUpdate:inventory": (
|
|
11373
|
-
k(
|
|
11366
|
+
name: A.name || "",
|
|
11367
|
+
bindingKey: A._id,
|
|
11368
|
+
initialValue: A.binding ?? [],
|
|
11369
|
+
"onUpdate:inventory": (x) => {
|
|
11370
|
+
k(A._id, x);
|
|
11374
11371
|
}
|
|
11375
11372
|
}, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), h(m(ms), {
|
|
11376
11373
|
"row-data": g.value,
|
|
@@ -11389,7 +11386,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11389
11386
|
"model-value": u.value ?? null,
|
|
11390
11387
|
step: 1,
|
|
11391
11388
|
placeholder: d.value,
|
|
11392
|
-
rules: [(
|
|
11389
|
+
rules: [(A) => A === null || Number.isInteger(A) || m(n)("menu.inventory.threshold.must_be_integer")],
|
|
11393
11390
|
"helper-text": m(n)("menu.inventory.threshold.helper_text"),
|
|
11394
11391
|
"onUpdate:modelValue": c
|
|
11395
11392
|
}, null, 8, ["model-value", "placeholder", "rules", "helper-text"])]),
|
|
@@ -11425,9 +11422,9 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11425
11422
|
emits: ["update:form"],
|
|
11426
11423
|
setup(e, { emit: t }) {
|
|
11427
11424
|
const n = e, o = zt(), i = De(), a = ua(), { t: r } = ke(), l = t, s = R(() => i.rules.item), u = R(() => {
|
|
11428
|
-
var
|
|
11429
|
-
const I = n.isOverride ? ((
|
|
11430
|
-
return
|
|
11425
|
+
var x, z;
|
|
11426
|
+
const I = n.isOverride ? ((x = n.fallback) == null ? void 0 : x.unit) ?? ((z = n.fallback) == null ? void 0 : z.perXUnit) : void 0, A = n.form.unit ?? n.form.perXUnit ?? I;
|
|
11427
|
+
return A != null;
|
|
11431
11428
|
}), d = (I) => {
|
|
11432
11429
|
l("update:form", "unit", I ? "" : void 0), l("update:form", "perXUnit", I ? 0 : void 0);
|
|
11433
11430
|
}, c = R(() => {
|
|
@@ -11442,14 +11439,14 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11442
11439
|
);
|
|
11443
11440
|
});
|
|
11444
11441
|
function f(I) {
|
|
11445
|
-
const
|
|
11442
|
+
const A = I.replace(/[^0-9.]/g, "");
|
|
11446
11443
|
if (!I) return !1;
|
|
11447
|
-
l("update:form", "perXUnit", parseFloat(
|
|
11444
|
+
l("update:form", "perXUnit", parseFloat(A));
|
|
11448
11445
|
}
|
|
11449
11446
|
function g(I) {
|
|
11450
11447
|
if (!I && n.form.perXUnit) {
|
|
11451
|
-
const [
|
|
11452
|
-
if (
|
|
11448
|
+
const [A, x] = n.form.perXUnit.toString().split(".");
|
|
11449
|
+
if (x && x.length > 4) {
|
|
11453
11450
|
const F = (typeof n.form.perXUnit == "string" ? parseFloat(n.form.perXUnit) : n.form.perXUnit).toFixed(4);
|
|
11454
11451
|
l("update:form", "perXUnit", parseFloat(F));
|
|
11455
11452
|
}
|
|
@@ -11462,9 +11459,9 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11462
11459
|
async function b() {
|
|
11463
11460
|
const I = n.form.name || "";
|
|
11464
11461
|
if (!I) {
|
|
11465
|
-
const
|
|
11466
|
-
if (
|
|
11467
|
-
|
|
11462
|
+
const A = document.getElementById("product-name");
|
|
11463
|
+
if (A) {
|
|
11464
|
+
A.focus();
|
|
11468
11465
|
return;
|
|
11469
11466
|
} else
|
|
11470
11467
|
return;
|
|
@@ -11475,14 +11472,14 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11475
11472
|
});
|
|
11476
11473
|
}
|
|
11477
11474
|
const v = R(() => {
|
|
11478
|
-
var I,
|
|
11479
|
-
return ((I = i.currentCatalog) == null ? void 0 : I.priceTierRules) ?? ((
|
|
11480
|
-
}),
|
|
11481
|
-
function j(I,
|
|
11482
|
-
|
|
11483
|
-
}
|
|
11484
|
-
return (I,
|
|
11485
|
-
const
|
|
11475
|
+
var I, A;
|
|
11476
|
+
return ((I = i.currentCatalog) == null ? void 0 : I.priceTierRules) ?? ((A = i.currentCatalog) == null ? void 0 : A.usePriceTiers) ?? [];
|
|
11477
|
+
}), T = Mn(), S = R(() => T.getMemberPricingPriceVariant(n.form.price_variant));
|
|
11478
|
+
function j(I, A) {
|
|
11479
|
+
A ? l("update:form", "priceTiers_variant", ti(I)) : l("update:form", "price_variant", ni(I));
|
|
11480
|
+
}
|
|
11481
|
+
return (I, A) => {
|
|
11482
|
+
const x = U("fm-select"), z = U("FmButton"), F = U("fm-checkbox"), G = U("fm-text-field"), H = Vt("tooltip");
|
|
11486
11483
|
return y(), ee(Ye, {
|
|
11487
11484
|
title: m(r)("menu.product.form.price.title")
|
|
11488
11485
|
}, {
|
|
@@ -11501,7 +11498,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11501
11498
|
class: "w-[258px] xs:w-full",
|
|
11502
11499
|
label: m(r)("menu.product.form.price.fields.selling_price.label"),
|
|
11503
11500
|
"show-currency": "",
|
|
11504
|
-
"onUpdate:modelValue":
|
|
11501
|
+
"onUpdate:modelValue": A[0] || (A[0] = (N) => N && l("update:form", "price", N))
|
|
11505
11502
|
}, {
|
|
11506
11503
|
append: M(() => [
|
|
11507
11504
|
qe(h(m(Rn), {
|
|
@@ -11514,7 +11511,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11514
11511
|
]),
|
|
11515
11512
|
_: 1
|
|
11516
11513
|
}, 8, ["disable", "model-value", "placeholder", "rules", "label"]),
|
|
11517
|
-
h(
|
|
11514
|
+
h(x, {
|
|
11518
11515
|
disabled: !s.value.tax || !c.value.systemCode,
|
|
11519
11516
|
items: c.value.countryTaxOptions,
|
|
11520
11517
|
label: c.value.systemCode ? m(r)("menu.product.form.price.fields.tax.label_with_code", {
|
|
@@ -11524,7 +11521,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11524
11521
|
placeholder: "--",
|
|
11525
11522
|
class: "flex-1",
|
|
11526
11523
|
"shift-menu": "",
|
|
11527
|
-
"onUpdate:modelValue":
|
|
11524
|
+
"onUpdate:modelValue": A[1] || (A[1] = (N) => l("update:form", "taxes", [m(Yn).decodeTax(N)]))
|
|
11528
11525
|
}, null, 8, ["disabled", "items", "label", "model-value"])
|
|
11529
11526
|
]),
|
|
11530
11527
|
m(i).isV4 ? (y(), q("div", ug, [
|
|
@@ -11541,8 +11538,8 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11541
11538
|
"base-price-fallback": ($ = I.fallback) != null && $.price ? m(lt)(I.fallback.price, !1) : void 0,
|
|
11542
11539
|
"price-variants": S.value,
|
|
11543
11540
|
"show-remy": !0,
|
|
11544
|
-
"onUpdate:basePrice":
|
|
11545
|
-
"onUpdate:priceVariants":
|
|
11541
|
+
"onUpdate:basePrice": A[2] || (A[2] = (N) => l("update:form", "price", N)),
|
|
11542
|
+
"onUpdate:priceVariants": A[3] || (A[3] = (N) => j(N))
|
|
11546
11543
|
}, {
|
|
11547
11544
|
default: M(({ trigger: N }) => [
|
|
11548
11545
|
h(z, {
|
|
@@ -11578,8 +11575,8 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11578
11575
|
"model-value": I.form.priceTiers || ((N = I.fallback) == null ? void 0 : N.priceTiers) || {},
|
|
11579
11576
|
"allow-negative-price": !1,
|
|
11580
11577
|
"price-variant": I.form.priceTiers_variant,
|
|
11581
|
-
"onUpdate:modelValue":
|
|
11582
|
-
"onUpdate:priceTiersVariant":
|
|
11578
|
+
"onUpdate:modelValue": A[4] || (A[4] = (Q) => l("update:form", "priceTiers", Q)),
|
|
11579
|
+
"onUpdate:priceTiersVariant": A[5] || (A[5] = (Q) => j(Q, !0))
|
|
11583
11580
|
}, null, 8, ["price-tiers", "model-value", "price-variant"]))
|
|
11584
11581
|
];
|
|
11585
11582
|
}),
|
|
@@ -11598,7 +11595,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11598
11595
|
value: I.form.openPrice,
|
|
11599
11596
|
label: m(r)("menu.product.form.price.settings.open_price.label"),
|
|
11600
11597
|
sublabel: m(r)("menu.product.form.price.settings.open_price.sublabel"),
|
|
11601
|
-
"onUpdate:modelValue":
|
|
11598
|
+
"onUpdate:modelValue": A[6] || (A[6] = (K) => l("update:form", "openPrice", K))
|
|
11602
11599
|
}, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
|
|
11603
11600
|
_("div", hg, [
|
|
11604
11601
|
h(F, {
|
|
@@ -11634,7 +11631,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11634
11631
|
(K) => !!K || m(r)("menu.product.form.price.settings.sell_by_unit.unit.required")
|
|
11635
11632
|
],
|
|
11636
11633
|
placeholder: m(r)("menu.product.form.price.settings.sell_by_unit.unit.placeholder"),
|
|
11637
|
-
"onUpdate:modelValue":
|
|
11634
|
+
"onUpdate:modelValue": A[7] || (A[7] = (K) => l("update:form", "unit", K))
|
|
11638
11635
|
}, null, 8, ["disabled", "model-value", "rules", "placeholder"])
|
|
11639
11636
|
])
|
|
11640
11637
|
])) : te("", !0)
|
|
@@ -11644,7 +11641,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11644
11641
|
"model-value": !!I.form.costing,
|
|
11645
11642
|
value: !!I.form.costing,
|
|
11646
11643
|
label: m(r)("menu.product.form.price.settings.track_costing.label"),
|
|
11647
|
-
"onUpdate:modelValue":
|
|
11644
|
+
"onUpdate:modelValue": A[8] || (A[8] = (K) => l("update:form", "costing", K ? m(Ze.Dinero).zero().toObject() : void 0))
|
|
11648
11645
|
}, null, 8, ["model-value", "value", "label"]),
|
|
11649
11646
|
I.form.costing ? (y(), q("div", wg, [
|
|
11650
11647
|
_("div", kg, [
|
|
@@ -11654,7 +11651,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11654
11651
|
"model-value": I.form.costing || null,
|
|
11655
11652
|
nullable: "",
|
|
11656
11653
|
"show-currency": "",
|
|
11657
|
-
"onUpdate:modelValue":
|
|
11654
|
+
"onUpdate:modelValue": A[9] || (A[9] = (K) => l("update:form", "costing", K ?? m(Ze.Dinero).zero().toObject()))
|
|
11658
11655
|
}, null, 8, ["model-value"])
|
|
11659
11656
|
])
|
|
11660
11657
|
])) : te("", !0)
|
|
@@ -11665,7 +11662,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11665
11662
|
"model-value": !!I.form.minPrice,
|
|
11666
11663
|
value: !!I.form.minPrice,
|
|
11667
11664
|
label: m(r)("menu.product.form.price.settings.min_price.label"),
|
|
11668
|
-
"onUpdate:modelValue":
|
|
11665
|
+
"onUpdate:modelValue": A[10] || (A[10] = (K) => l("update:form", "minPrice", K ? m(Ze.Dinero).zero().toObject() : void 0))
|
|
11669
11666
|
}, null, 8, ["disabled", "model-value", "value", "label"]),
|
|
11670
11667
|
_("div", Sg, [
|
|
11671
11668
|
_("div", xg, [
|
|
@@ -11676,7 +11673,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11676
11673
|
"model-value": I.form.minPrice || null,
|
|
11677
11674
|
class: "flex-1",
|
|
11678
11675
|
"show-currency": "",
|
|
11679
|
-
"onUpdate:modelValue":
|
|
11676
|
+
"onUpdate:modelValue": A[11] || (A[11] = (K) => l("update:form", "minPrice", K ?? m(Ze.Dinero).zero().toObject()))
|
|
11680
11677
|
}, null, 8, ["max", "model-value"])) : te("", !0)
|
|
11681
11678
|
])
|
|
11682
11679
|
])
|
|
@@ -11716,7 +11713,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11716
11713
|
module: Be.enum.printDepartment,
|
|
11717
11714
|
operation: Ne.F_OPERATION_TYPE.update,
|
|
11718
11715
|
data: r.value,
|
|
11719
|
-
link:
|
|
11716
|
+
link: _o(((c = r.value) == null ? void 0 : c.usedBy) || [])
|
|
11720
11717
|
},
|
|
11721
11718
|
r.value.name
|
|
11722
11719
|
) : await o.updateMenu(
|
|
@@ -11724,7 +11721,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11724
11721
|
module: Be.enum.printDepartment,
|
|
11725
11722
|
operation: Ne.F_OPERATION_TYPE.create,
|
|
11726
11723
|
data: r.value,
|
|
11727
|
-
link:
|
|
11724
|
+
link: _o(((p = r.value) == null ? void 0 : p.usedBy) || [])
|
|
11728
11725
|
},
|
|
11729
11726
|
r.value.name
|
|
11730
11727
|
), u(!1);
|
|
@@ -11828,10 +11825,10 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11828
11825
|
}), d = R(() => {
|
|
11829
11826
|
var v;
|
|
11830
11827
|
return u.value ? s.value.reduce(
|
|
11831
|
-
(
|
|
11828
|
+
(T, { _id: S }) => (T.includes(S) || (T = [...T, S]), T),
|
|
11832
11829
|
[...((v = n.form.print) == null ? void 0 : v.department) ?? []]
|
|
11833
|
-
) : s.value.map(({ _id:
|
|
11834
|
-
}), c = R(() => s.value.reduce((v,
|
|
11830
|
+
) : s.value.map(({ _id: T }) => T);
|
|
11831
|
+
}), c = R(() => s.value.reduce((v, T) => (v[T._id] = T.name, v), {}));
|
|
11835
11832
|
function p(v) {
|
|
11836
11833
|
a("update:form", "print", {
|
|
11837
11834
|
...r(),
|
|
@@ -11850,16 +11847,16 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11850
11847
|
a("update:form", "print", {
|
|
11851
11848
|
...r(),
|
|
11852
11849
|
...n.form.print,
|
|
11853
|
-
department: v.filter((
|
|
11850
|
+
department: v.filter((T) => {
|
|
11854
11851
|
var S;
|
|
11855
|
-
return (((S = n.form.print) == null ? void 0 : S.department) ?? []).includes(
|
|
11852
|
+
return (((S = n.form.print) == null ? void 0 : S.department) ?? []).includes(T);
|
|
11856
11853
|
})
|
|
11857
11854
|
});
|
|
11858
11855
|
}
|
|
11859
|
-
function k(v,
|
|
11856
|
+
function k(v, T) {
|
|
11860
11857
|
var j, I;
|
|
11861
11858
|
let S = [...((I = (j = n.form) == null ? void 0 : j.print) == null ? void 0 : I.department) ?? []];
|
|
11862
|
-
|
|
11859
|
+
T && !S.includes(v) ? S = [...S, v] : T || (S = S.filter((A) => A !== v)), a("update:form", "print", {
|
|
11863
11860
|
...r(),
|
|
11864
11861
|
...n.form.print,
|
|
11865
11862
|
department: S
|
|
@@ -11880,8 +11877,8 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11880
11877
|
return Ae(
|
|
11881
11878
|
() => s.value.length,
|
|
11882
11879
|
() => k(s.value[s.value.length - 1]._id, !0)
|
|
11883
|
-
), (v,
|
|
11884
|
-
const S = U("fm-switch"), j = U("fm-radio"), I = U("fm-radio-group"),
|
|
11880
|
+
), (v, T) => {
|
|
11881
|
+
const S = U("fm-switch"), j = U("fm-radio"), I = U("fm-radio-group"), A = U("fm-button"), x = U("fm-checkbox");
|
|
11885
11882
|
return y(), ee(Ye, {
|
|
11886
11883
|
title: m(i)("menu.product.form.print.title")
|
|
11887
11884
|
}, {
|
|
@@ -11900,7 +11897,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11900
11897
|
label: m(i)("menu.product.form.print.config.group_parent.label"),
|
|
11901
11898
|
"label-placement": "right",
|
|
11902
11899
|
sublabel: m(i)("menu.product.form.print.config.group_parent.sublabel"),
|
|
11903
|
-
"onUpdate:modelValue":
|
|
11900
|
+
"onUpdate:modelValue": T[0] || (T[0] = (G) => p(G))
|
|
11904
11901
|
}, null, 8, ["model-value", "label", "sublabel"])
|
|
11905
11902
|
];
|
|
11906
11903
|
}),
|
|
@@ -11909,7 +11906,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11909
11906
|
h(I, {
|
|
11910
11907
|
label: m(i)("menu.product.form.print.kds.label"),
|
|
11911
11908
|
"model-value": ((z = v.form.print) == null ? void 0 : z.sequential) ?? !1,
|
|
11912
|
-
"onUpdate:modelValue":
|
|
11909
|
+
"onUpdate:modelValue": T[1] || (T[1] = (F) => f(F))
|
|
11913
11910
|
}, {
|
|
11914
11911
|
default: M(() => [
|
|
11915
11912
|
_("div", $g, [
|
|
@@ -11932,7 +11929,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11932
11929
|
"item-key": (F) => F,
|
|
11933
11930
|
"model-value": d.value,
|
|
11934
11931
|
handle: ".handle",
|
|
11935
|
-
"onUpdate:modelValue":
|
|
11932
|
+
"onUpdate:modelValue": T[3] || (T[3] = (F) => g(F)),
|
|
11936
11933
|
class: "space-y-16"
|
|
11937
11934
|
}, {
|
|
11938
11935
|
item: M(({ element: F }) => {
|
|
@@ -11940,17 +11937,17 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11940
11937
|
return [
|
|
11941
11938
|
_("div", Dg, [
|
|
11942
11939
|
_("div", Pg, [
|
|
11943
|
-
u.value ? (y(), ee(
|
|
11940
|
+
u.value ? (y(), ee(A, {
|
|
11944
11941
|
key: 0,
|
|
11945
11942
|
disabled: !((H = (G = n.form.print) == null ? void 0 : G.department) != null && H.includes(F)),
|
|
11946
11943
|
class: "handle",
|
|
11947
11944
|
"prepend-icon": "drag_handle",
|
|
11948
11945
|
variant: "tertiary",
|
|
11949
|
-
onClick:
|
|
11946
|
+
onClick: T[2] || (T[2] = it(() => {
|
|
11950
11947
|
}, ["stop"]))
|
|
11951
11948
|
}, null, 8, ["disabled"])) : te("", !0)
|
|
11952
11949
|
]),
|
|
11953
|
-
h(
|
|
11950
|
+
h(x, {
|
|
11954
11951
|
id: F,
|
|
11955
11952
|
"data-checked": ($ = (w = n.form.print) == null ? void 0 : w.department) == null ? void 0 : $.includes(F),
|
|
11956
11953
|
label: c.value[F],
|
|
@@ -11967,7 +11964,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
11967
11964
|
h(m(Og), { "apply-product": !1 }, {
|
|
11968
11965
|
default: M(({ trigger: F }) => [
|
|
11969
11966
|
_("div", Fg, [
|
|
11970
|
-
h(
|
|
11967
|
+
h(A, {
|
|
11971
11968
|
variant: m(ze).Secondary,
|
|
11972
11969
|
label: m(i)("menu.product.form.print.routes.add"),
|
|
11973
11970
|
"prepend-icon": "add",
|
|
@@ -12044,7 +12041,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
12044
12041
|
dialog: a,
|
|
12045
12042
|
menuLoader: s
|
|
12046
12043
|
}), c = R(() => o.timePresets.map((b) => {
|
|
12047
|
-
const v = u.orderPacings.find((
|
|
12044
|
+
const v = u.orderPacings.find((T) => T._id === b.id);
|
|
12048
12045
|
return {
|
|
12049
12046
|
id: b.id,
|
|
12050
12047
|
isDefault: b.isDefault ?? !1,
|
|
@@ -12060,7 +12057,7 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
12060
12057
|
return Ue(Oe.FmCheckbox, {
|
|
12061
12058
|
modelValue: v,
|
|
12062
12059
|
value: v,
|
|
12063
|
-
"onUpdate:modelValue": (
|
|
12060
|
+
"onUpdate:modelValue": (T) => g(T, b.row.original.id)
|
|
12064
12061
|
});
|
|
12065
12062
|
}
|
|
12066
12063
|
}, {
|
|
@@ -12104,17 +12101,17 @@ const jh = { class: "fm-typo-en-title-md-600" }, Gh = {
|
|
|
12104
12101
|
}).onPrimary((b) => {
|
|
12105
12102
|
i("update:linkedOrderPacing", b);
|
|
12106
12103
|
}).onTertiary(() => {
|
|
12107
|
-
const b = u.items.find((
|
|
12104
|
+
const b = u.items.find((T) => T._id === o.itemId), v = b ? [vs(b, u.orderPacings)] : [];
|
|
12108
12105
|
d.create(v);
|
|
12109
12106
|
});
|
|
12110
12107
|
}
|
|
12111
12108
|
return (b, v) => {
|
|
12112
|
-
const
|
|
12109
|
+
const T = U("FmButton"), S = U("FmTable");
|
|
12113
12110
|
return y(), q(Ce, null, [h(Ye, {
|
|
12114
12111
|
title: m(n)("menu.product.form.order_pacing.time_presets.title"),
|
|
12115
12112
|
"sub-title": m(n)("menu.product.form.order_pacing.time_presets.subtitle")
|
|
12116
12113
|
}, {
|
|
12117
|
-
"append-title": M(() => [h(
|
|
12114
|
+
"append-title": M(() => [h(T, {
|
|
12118
12115
|
class: "flex-shrink-0",
|
|
12119
12116
|
label: m(n)("menu.product.form.order_pacing.time_presets.add"),
|
|
12120
12117
|
"prepend-icon": "add",
|
|
@@ -12275,7 +12272,7 @@ const Gg = {
|
|
|
12275
12272
|
enableSorting: !1,
|
|
12276
12273
|
header: () => r("menu.product.form.takeaway.columns.takeaway"),
|
|
12277
12274
|
cell: (b) => {
|
|
12278
|
-
const v = b.getValue(),
|
|
12275
|
+
const v = b.getValue(), T = b.row.original;
|
|
12279
12276
|
return Ue(cs, {
|
|
12280
12277
|
action: "add",
|
|
12281
12278
|
applyProduct: !1,
|
|
@@ -12285,7 +12282,7 @@ const Gg = {
|
|
|
12285
12282
|
module: Be.enum.takeaway,
|
|
12286
12283
|
operation: Ne.F_OPERATION_TYPE.create,
|
|
12287
12284
|
data: S,
|
|
12288
|
-
link:
|
|
12285
|
+
link: _o(S.usedBy || [])
|
|
12289
12286
|
}, S.name);
|
|
12290
12287
|
}
|
|
12291
12288
|
}, {
|
|
@@ -12297,7 +12294,7 @@ const Gg = {
|
|
|
12297
12294
|
items: d.value,
|
|
12298
12295
|
shiftMenu: !0,
|
|
12299
12296
|
"onUpdate:modelValue": (j) => {
|
|
12300
|
-
|
|
12297
|
+
T.onUpdate(j || "");
|
|
12301
12298
|
}
|
|
12302
12299
|
}, {
|
|
12303
12300
|
"append-menu": () => o.rules.takeaway.create ? Ue("button", {
|
|
@@ -12323,9 +12320,9 @@ const Gg = {
|
|
|
12323
12320
|
});
|
|
12324
12321
|
function f(b) {
|
|
12325
12322
|
return (v) => {
|
|
12326
|
-
const
|
|
12327
|
-
pos: (
|
|
12328
|
-
app: (
|
|
12323
|
+
const T = n.form.takeawayConfig, S = {
|
|
12324
|
+
pos: (T == null ? void 0 : T.pos) ?? !0,
|
|
12325
|
+
app: (T == null ? void 0 : T.app) ?? !0,
|
|
12329
12326
|
[b]: v
|
|
12330
12327
|
};
|
|
12331
12328
|
l("update:form", "takeawayConfig", S);
|
|
@@ -12345,19 +12342,19 @@ const Gg = {
|
|
|
12345
12342
|
set: f("app")
|
|
12346
12343
|
});
|
|
12347
12344
|
return (b, v) => {
|
|
12348
|
-
const
|
|
12345
|
+
const T = U("FmCheckbox"), S = U("fm-table");
|
|
12349
12346
|
return y(), ee(Ye, {
|
|
12350
12347
|
title: m(r)("menu.product.form.takeaway.title"),
|
|
12351
12348
|
"sub-title": m(r)("menu.product.form.takeaway.subtitle")
|
|
12352
12349
|
}, {
|
|
12353
|
-
default: M(() => [_("div", Gg, [p.value.pos ? (y(), ee(
|
|
12350
|
+
default: M(() => [_("div", Gg, [p.value.pos ? (y(), ee(T, {
|
|
12354
12351
|
key: 0,
|
|
12355
12352
|
modelValue: g.value,
|
|
12356
12353
|
"onUpdate:modelValue": v[0] || (v[0] = (j) => g.value = j),
|
|
12357
12354
|
label: m(r)("menu.product.form.takeaway.takeawayConfig.pos.label"),
|
|
12358
12355
|
sublabel: m(r)("menu.product.form.takeaway.takeawayConfig.pos.sublabel"),
|
|
12359
12356
|
value: !0
|
|
12360
|
-
}, null, 8, ["modelValue", "label", "sublabel"])) : te("", !0), p.value.app ? (y(), ee(
|
|
12357
|
+
}, null, 8, ["modelValue", "label", "sublabel"])) : te("", !0), p.value.app ? (y(), ee(T, {
|
|
12361
12358
|
key: 1,
|
|
12362
12359
|
modelValue: k.value,
|
|
12363
12360
|
"onUpdate:modelValue": v[1] || (v[1] = (j) => k.value = j),
|
|
@@ -12424,7 +12421,7 @@ const Gg = {
|
|
|
12424
12421
|
])
|
|
12425
12422
|
]),
|
|
12426
12423
|
_("div", qg, [
|
|
12427
|
-
h(m(
|
|
12424
|
+
h(m(gi), null, {
|
|
12428
12425
|
default: M(({ trigger: b }) => [
|
|
12429
12426
|
m(i).rules.item.variant ? (y(), ee(k, {
|
|
12430
12427
|
key: 0,
|
|
@@ -12453,7 +12450,7 @@ const Gg = {
|
|
|
12453
12450
|
_("p", Qg, oe(m(a)("menu.common.empty.no_variant.title")), 1),
|
|
12454
12451
|
_("p", Jg, oe(m(a)("menu.common.empty.no_variant.subtitle")), 1)
|
|
12455
12452
|
]),
|
|
12456
|
-
h(m(
|
|
12453
|
+
h(m(gi), null, {
|
|
12457
12454
|
default: M(({ trigger: b }) => [
|
|
12458
12455
|
h(k, {
|
|
12459
12456
|
label: m(a)("menu.variant.add"),
|
|
@@ -12534,7 +12531,7 @@ const Gg = {
|
|
|
12534
12531
|
const $ = ((le = n.form.variant) == null ? void 0 : le.variantGroupIds) || [], N = (ce = n.form.variant) == null ? void 0 : ce.variantCombinations, K = w.split(/(?=variant)/g).map((Z) => Z.replace(/\/*$/, "")).filter((Z) => $.some((ge) => Z.includes(ge))).join("/");
|
|
12535
12532
|
return N == null ? void 0 : N.find((Z) => Z.combinationKey === K);
|
|
12536
12533
|
}
|
|
12537
|
-
const
|
|
12534
|
+
const T = (w) => {
|
|
12538
12535
|
j(w);
|
|
12539
12536
|
}, S = R(() => {
|
|
12540
12537
|
var $;
|
|
@@ -12542,7 +12539,7 @@ const Gg = {
|
|
|
12542
12539
|
var K, le;
|
|
12543
12540
|
const Q = (le = (K = n.fallback) == null ? void 0 : K.variant) == null ? void 0 : le.variantCombinations.find(({
|
|
12544
12541
|
combinationKey: ce
|
|
12545
|
-
}) => ce === N.combinationKey), se =
|
|
12542
|
+
}) => ce === N.combinationKey), se = x.value ? null : N.price;
|
|
12546
12543
|
return {
|
|
12547
12544
|
...N,
|
|
12548
12545
|
price: se,
|
|
@@ -12611,10 +12608,10 @@ const Gg = {
|
|
|
12611
12608
|
value: Q.variant
|
|
12612
12609
|
}]);
|
|
12613
12610
|
}
|
|
12614
|
-
const
|
|
12611
|
+
const A = R(() => {
|
|
12615
12612
|
var w, $;
|
|
12616
12613
|
return ((w = o.currentCatalog) == null ? void 0 : w.priceTierRules) ?? (($ = o.currentCatalog) == null ? void 0 : $.usePriceTiers) ?? [];
|
|
12617
|
-
}),
|
|
12614
|
+
}), x = R(() => A.value.length > 0 && o.currentCatalog && !o.currentScheduler), z = Mn(), F = R(() => [{
|
|
12618
12615
|
accessorKey: "combinationKey",
|
|
12619
12616
|
header: () => l("menu.product.form.variant.columns.variant"),
|
|
12620
12617
|
enableSorting: !1,
|
|
@@ -12643,7 +12640,7 @@ const Gg = {
|
|
|
12643
12640
|
}) : !0;
|
|
12644
12641
|
}],
|
|
12645
12642
|
"onUpdate:model-value": (ce) => {
|
|
12646
|
-
I(w.row.index, "code",
|
|
12643
|
+
I(w.row.index, "code", Fo(ce, !0));
|
|
12647
12644
|
}
|
|
12648
12645
|
}, null);
|
|
12649
12646
|
}
|
|
@@ -12654,7 +12651,7 @@ const Gg = {
|
|
|
12654
12651
|
cell: (w) => {
|
|
12655
12652
|
var se, K;
|
|
12656
12653
|
const $ = w.getValue(), Q = (se = w.row.original.fallback) == null ? void 0 : se.orderFrom;
|
|
12657
|
-
return h(
|
|
12654
|
+
return h(Bo, {
|
|
12658
12655
|
modelValue: $,
|
|
12659
12656
|
fallback: n.form.orderFrom ?? Q ?? ((K = n.fallback) == null ? void 0 : K.orderFrom),
|
|
12660
12657
|
disable: !u.value.orderFrom,
|
|
@@ -12678,7 +12675,7 @@ const Gg = {
|
|
|
12678
12675
|
return h("div", {
|
|
12679
12676
|
class: "flex items-center gap-8"
|
|
12680
12677
|
}, [h(yt, {
|
|
12681
|
-
disable:
|
|
12678
|
+
disable: x.value,
|
|
12682
12679
|
placeholder: se ? lt(se) : void 0,
|
|
12683
12680
|
modelValue: $,
|
|
12684
12681
|
min: 0,
|
|
@@ -12700,7 +12697,7 @@ const Gg = {
|
|
|
12700
12697
|
I(w.row.index, "price", he);
|
|
12701
12698
|
},
|
|
12702
12699
|
"onUpdate:priceVariants": (he) => {
|
|
12703
|
-
I(w.row.index, "price_variant",
|
|
12700
|
+
I(w.row.index, "price_variant", ni(he));
|
|
12704
12701
|
}
|
|
12705
12702
|
}, {
|
|
12706
12703
|
default: ({
|
|
@@ -12723,7 +12720,7 @@ const Gg = {
|
|
|
12723
12720
|
"price-tiers-variant": N.priceTiers_variant,
|
|
12724
12721
|
fallback: (ge = N.fallback) == null ? void 0 : ge.priceTiers,
|
|
12725
12722
|
"onUpdate:value": (he) => {
|
|
12726
|
-
I(w.row.index, "priceTiers", he.priceTiers), I(w.row.index, "priceTiers_variant",
|
|
12723
|
+
I(w.row.index, "priceTiers", he.priceTiers), I(w.row.index, "priceTiers_variant", ti(he.priceTiersVariant));
|
|
12727
12724
|
}
|
|
12728
12725
|
}, null)]);
|
|
12729
12726
|
}
|
|
@@ -12780,7 +12777,7 @@ const Gg = {
|
|
|
12780
12777
|
group: "variants",
|
|
12781
12778
|
handle: ".handle",
|
|
12782
12779
|
"item-key": "id",
|
|
12783
|
-
"onUpdate:modelValue":
|
|
12780
|
+
"onUpdate:modelValue": T
|
|
12784
12781
|
}, {
|
|
12785
12782
|
item: M(({
|
|
12786
12783
|
element: Z
|
|
@@ -12899,8 +12896,8 @@ const Gg = {
|
|
|
12899
12896
|
}, v = R(() => {
|
|
12900
12897
|
var V;
|
|
12901
12898
|
return i.mapVariant((V = f.value.variant) == null ? void 0 : V.variantGroupIds);
|
|
12902
|
-
}),
|
|
12903
|
-
|
|
12899
|
+
}), T = W([]);
|
|
12900
|
+
Mo(() => Gr(T.value));
|
|
12904
12901
|
const S = (V, L) => {
|
|
12905
12902
|
f.value = {
|
|
12906
12903
|
...Te(f.value),
|
|
@@ -12919,10 +12916,10 @@ const Gg = {
|
|
|
12919
12916
|
}
|
|
12920
12917
|
const I = R(
|
|
12921
12918
|
() => !!i.currentCatalog || !!i.state.currentSchedulerId
|
|
12922
|
-
),
|
|
12919
|
+
), A = R(() => {
|
|
12923
12920
|
var V;
|
|
12924
12921
|
return I.value ? f.value.category == "" || f.value.category == null && ((V = p.value) == null ? void 0 : V.category) == null : i.version === It.enum.v4 && f.value.category == null;
|
|
12925
|
-
}),
|
|
12922
|
+
}), x = R(() => a.itemAttributeSettings.value.length > 0 && !I.value);
|
|
12926
12923
|
function z() {
|
|
12927
12924
|
var _e;
|
|
12928
12925
|
const V = i.getSelectedTax(
|
|
@@ -13148,17 +13145,17 @@ const Gg = {
|
|
|
13148
13145
|
E.isUpdatingItem = !1, i.selectCatalog(E.storedCatalogId), i.selectScheduler(E.storedSchedulerId);
|
|
13149
13146
|
}
|
|
13150
13147
|
async function ne() {
|
|
13151
|
-
await
|
|
13148
|
+
await fi(), I.value && [
|
|
13152
13149
|
[G.value, H],
|
|
13153
13150
|
[$.value, N]
|
|
13154
13151
|
].forEach(([L, fe]) => {
|
|
13155
13152
|
L || fe(!1);
|
|
13156
|
-
}), o("submit:form", Ns(Te(f.value)),
|
|
13153
|
+
}), o("submit:form", Ns(Te(f.value)), T.value), c(), Y();
|
|
13157
13154
|
}
|
|
13158
13155
|
async function de() {
|
|
13159
13156
|
var V;
|
|
13160
13157
|
if ((V = n.initialForm) != null && V._id) {
|
|
13161
|
-
await
|
|
13158
|
+
await fi();
|
|
13162
13159
|
const L = Hr(
|
|
13163
13160
|
[f.value],
|
|
13164
13161
|
[n.initialForm]
|
|
@@ -13193,7 +13190,7 @@ const Gg = {
|
|
|
13193
13190
|
onOnCancel: de
|
|
13194
13191
|
}, {
|
|
13195
13192
|
"append-title": M(() => [
|
|
13196
|
-
m(be)("sm") ? (y(), ee(
|
|
13193
|
+
m(be)("sm") ? (y(), ee(vi, {
|
|
13197
13194
|
key: 0,
|
|
13198
13195
|
variant: "dialog",
|
|
13199
13196
|
title: F.value.title,
|
|
@@ -13203,10 +13200,10 @@ const Gg = {
|
|
|
13203
13200
|
default: M(() => {
|
|
13204
13201
|
var fe, _e;
|
|
13205
13202
|
return [
|
|
13206
|
-
m(be)("sm") ? te("", !0) : (y(), ee(
|
|
13203
|
+
m(be)("sm") ? te("", !0) : (y(), ee(vi, {
|
|
13207
13204
|
key: 0,
|
|
13208
13205
|
class: "fixed",
|
|
13209
|
-
style:
|
|
13206
|
+
style: fo({
|
|
13210
13207
|
top: "85px",
|
|
13211
13208
|
left: m(B).right + "px"
|
|
13212
13209
|
}),
|
|
@@ -13240,18 +13237,18 @@ const Gg = {
|
|
|
13240
13237
|
h(Tf, {
|
|
13241
13238
|
fallback: p.value,
|
|
13242
13239
|
form: f.value,
|
|
13243
|
-
"is-addon":
|
|
13240
|
+
"is-addon": A.value,
|
|
13244
13241
|
"is-override": I.value,
|
|
13245
13242
|
"is-create": n.action === "add",
|
|
13246
|
-
staged:
|
|
13243
|
+
staged: T.value,
|
|
13247
13244
|
"onUpdate:form": S,
|
|
13248
|
-
"onUpdate:staged": L[0] || (L[0] = (re) =>
|
|
13245
|
+
"onUpdate:staged": L[0] || (L[0] = (re) => T.value = re)
|
|
13249
13246
|
}, null, 8, ["fallback", "form", "is-addon", "is-override", "is-create", "staged"])
|
|
13250
13247
|
]),
|
|
13251
13248
|
_: 1
|
|
13252
13249
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
13253
13250
|
I.value ? te("", !0) : (y(), q("div", sv)),
|
|
13254
|
-
|
|
13251
|
+
x.value ? (y(), ee(Ye, {
|
|
13255
13252
|
key: 2,
|
|
13256
13253
|
title: m(r)("menu.product.form.sections.tagging.title"),
|
|
13257
13254
|
"sub-title": m(r)("menu.product.form.sections.tagging.subtitle")
|
|
@@ -13266,7 +13263,7 @@ const Gg = {
|
|
|
13266
13263
|
]),
|
|
13267
13264
|
_: 1
|
|
13268
13265
|
}, 8, ["title", "sub-title"])) : te("", !0),
|
|
13269
|
-
|
|
13266
|
+
x.value ? (y(), q("div", lv)) : te("", !0),
|
|
13270
13267
|
h($t, {
|
|
13271
13268
|
toggle: $.value,
|
|
13272
13269
|
"onUpdate:toggle": [
|
|
@@ -13281,7 +13278,7 @@ const Gg = {
|
|
|
13281
13278
|
h(Ag, {
|
|
13282
13279
|
fallback: p.value,
|
|
13283
13280
|
form: f.value,
|
|
13284
|
-
"is-addon":
|
|
13281
|
+
"is-addon": A.value,
|
|
13285
13282
|
"is-override": I.value,
|
|
13286
13283
|
"onUpdate:form": S
|
|
13287
13284
|
}, null, 8, ["fallback", "form", "is-addon", "is-override"])
|
|
@@ -13305,7 +13302,7 @@ const Gg = {
|
|
|
13305
13302
|
fallback: p.value,
|
|
13306
13303
|
form: f.value,
|
|
13307
13304
|
"full-combinations": v.value,
|
|
13308
|
-
"is-addon":
|
|
13305
|
+
"is-addon": A.value,
|
|
13309
13306
|
"is-override": I.value,
|
|
13310
13307
|
"onUpdate:form": S,
|
|
13311
13308
|
"onReplace:form": L[6] || (L[6] = (re) => f.value = re)
|
|
@@ -13329,7 +13326,7 @@ const Gg = {
|
|
|
13329
13326
|
fallback: p.value,
|
|
13330
13327
|
form: f.value,
|
|
13331
13328
|
"full-combinations": v.value,
|
|
13332
|
-
"is-addon":
|
|
13329
|
+
"is-addon": A.value,
|
|
13333
13330
|
"is-override": I.value,
|
|
13334
13331
|
"onUpdate:form": S,
|
|
13335
13332
|
"onReplace:form": L[9] || (L[9] = (re) => f.value = re)
|
|
@@ -13354,7 +13351,7 @@ const Gg = {
|
|
|
13354
13351
|
fallback: p.value,
|
|
13355
13352
|
form: f.value,
|
|
13356
13353
|
"full-combinations": v.value,
|
|
13357
|
-
"is-addon":
|
|
13354
|
+
"is-addon": A.value,
|
|
13358
13355
|
"is-override": I.value,
|
|
13359
13356
|
"onUpdate:form": S,
|
|
13360
13357
|
"onReplace:form": L[12] || (L[12] = (re) => f.value = re)
|
|
@@ -13379,7 +13376,7 @@ const Gg = {
|
|
|
13379
13376
|
fallback: p.value,
|
|
13380
13377
|
form: f.value,
|
|
13381
13378
|
"full-combinations": v.value,
|
|
13382
|
-
"is-addon":
|
|
13379
|
+
"is-addon": A.value,
|
|
13383
13380
|
"is-override": I.value,
|
|
13384
13381
|
"onUpdate:form": S,
|
|
13385
13382
|
"onReplace:form": L[15] || (L[15] = (re) => f.value = re)
|
|
@@ -13404,7 +13401,7 @@ const Gg = {
|
|
|
13404
13401
|
fallback: p.value,
|
|
13405
13402
|
form: f.value,
|
|
13406
13403
|
"full-combinations": v.value,
|
|
13407
|
-
"is-addon":
|
|
13404
|
+
"is-addon": A.value,
|
|
13408
13405
|
"is-override": I.value,
|
|
13409
13406
|
"onUpdate:form": S,
|
|
13410
13407
|
"onReplace:form": L[18] || (L[18] = (re) => f.value = re)
|
|
@@ -13444,7 +13441,7 @@ function fr(e, t) {
|
|
|
13444
13441
|
const p = u.find((k) => k._id === c._id), f = (g = c.items) == null ? void 0 : g.map((k) => {
|
|
13445
13442
|
var v;
|
|
13446
13443
|
const b = (v = p == null ? void 0 : p.items) == null ? void 0 : v.find(
|
|
13447
|
-
(
|
|
13444
|
+
(T) => T._id === k._id && T.combinationKey == k.combinationKey
|
|
13448
13445
|
);
|
|
13449
13446
|
return {
|
|
13450
13447
|
...b || {},
|
|
@@ -13523,29 +13520,29 @@ function bv(e, t) {
|
|
|
13523
13520
|
};
|
|
13524
13521
|
}
|
|
13525
13522
|
const Hn = Qi("item-manager", () => {
|
|
13526
|
-
const e = De(), t = Je(), n = nt(), o = ut(t), i = ft(o), a =
|
|
13523
|
+
const e = De(), t = Je(), n = nt(), o = ut(t), i = ft(o), a = zo(), { t: r } = ke(), l = (x) => {
|
|
13527
13524
|
if (!a) throw new Error("No current instance found");
|
|
13528
13525
|
const { container: z } = ra(gv, a, {
|
|
13529
|
-
...
|
|
13526
|
+
...x,
|
|
13530
13527
|
autoShow: !0,
|
|
13531
13528
|
"onUpdate:show": async (F) => {
|
|
13532
13529
|
F || (An(null, z), z.remove());
|
|
13533
13530
|
}
|
|
13534
13531
|
});
|
|
13535
13532
|
};
|
|
13536
|
-
function s(
|
|
13533
|
+
function s(x) {
|
|
13537
13534
|
const { saveMenuWithImages: z } = i;
|
|
13538
13535
|
l({
|
|
13539
13536
|
action: "add",
|
|
13540
|
-
categoryId:
|
|
13537
|
+
categoryId: x,
|
|
13541
13538
|
"onSubmit:form": async (F, G) => {
|
|
13542
13539
|
F.inventoryBindings ?? (F.inventoryBindings = []), F.inventoryBindings.length === 0 && (F.inventoryBindings = null), F.position = Qr(e.state.menu.modules.item), await z(F, Ne.F_OPERATION_TYPE.create, G);
|
|
13543
13540
|
}
|
|
13544
13541
|
});
|
|
13545
13542
|
}
|
|
13546
|
-
async function u(
|
|
13543
|
+
async function u(x, z, F) {
|
|
13547
13544
|
l({
|
|
13548
|
-
initialForm: bv(
|
|
13545
|
+
initialForm: bv(x, z || []),
|
|
13549
13546
|
action: "update",
|
|
13550
13547
|
"onSubmit:form": async (G) => {
|
|
13551
13548
|
G.inventoryBindings ?? (G.inventoryBindings = []), G.inventoryBindings.length === 0 && (G.inventoryBindings = null), await F(
|
|
@@ -13559,41 +13556,41 @@ const Hn = Qi("item-manager", () => {
|
|
|
13559
13556
|
}
|
|
13560
13557
|
});
|
|
13561
13558
|
}
|
|
13562
|
-
async function d(
|
|
13559
|
+
async function d(x) {
|
|
13563
13560
|
var w;
|
|
13564
|
-
const z = e.currentCatalog, F = e.state.currentSchedulerId, G = z.override.scheduler[F] ?? {}, H = (w = G == null ? void 0 : G.items) == null ? void 0 : w.filter(($) => $._id ===
|
|
13565
|
-
await u(
|
|
13561
|
+
const z = e.currentCatalog, F = e.state.currentSchedulerId, G = z.override.scheduler[F] ?? {}, H = (w = G == null ? void 0 : G.items) == null ? void 0 : w.filter(($) => $._id === x._id);
|
|
13562
|
+
await u(x, H, async ($) => {
|
|
13566
13563
|
const N = $.modules.catalog.find(
|
|
13567
13564
|
(Q) => Q._id === z._id
|
|
13568
13565
|
);
|
|
13569
13566
|
await new vt(N, e, i.updateMenu, n).update();
|
|
13570
13567
|
});
|
|
13571
13568
|
}
|
|
13572
|
-
async function c(
|
|
13569
|
+
async function c(x) {
|
|
13573
13570
|
const z = e.currentCatalog;
|
|
13574
|
-
await u(
|
|
13571
|
+
await u(x, z.override.items[x._id], async (F) => {
|
|
13575
13572
|
const G = F.modules.catalog.find(
|
|
13576
13573
|
(H) => H._id === z._id
|
|
13577
13574
|
);
|
|
13578
13575
|
await new vt(G, e, i.updateMenu, n).update();
|
|
13579
13576
|
});
|
|
13580
13577
|
}
|
|
13581
|
-
async function p(
|
|
13578
|
+
async function p(x) {
|
|
13582
13579
|
const z = e.schedulers.find(
|
|
13583
13580
|
(G) => G._id === e.state.currentSchedulerId
|
|
13584
|
-
), F = z.items.filter((G) => G._id ===
|
|
13585
|
-
await u(
|
|
13581
|
+
), F = z.items.filter((G) => G._id === x._id);
|
|
13582
|
+
await u(x, F, async (G) => {
|
|
13586
13583
|
const H = G.modules.scheduler.find(
|
|
13587
13584
|
(w) => w._id === z._id
|
|
13588
13585
|
);
|
|
13589
13586
|
await new kn(H, e, i.updateMenu, n).update();
|
|
13590
13587
|
});
|
|
13591
13588
|
}
|
|
13592
|
-
async function f(
|
|
13589
|
+
async function f(x) {
|
|
13593
13590
|
var H, w;
|
|
13594
13591
|
const z = e.state.currentSchedulerId, F = Te(e.currentCatalog), G = (w = ((H = F.override.scheduler[z]) == null ? void 0 : H.items) || []) == null ? void 0 : w.reduce(($, N) => {
|
|
13595
13592
|
if (N.combinationKey) return [...$, N];
|
|
13596
|
-
const Q =
|
|
13593
|
+
const Q = x.find((se) => se._id === N._id);
|
|
13597
13594
|
return Q ? [...$, { ...N, price: Q.price }] : [...$, N];
|
|
13598
13595
|
}, []);
|
|
13599
13596
|
F.override.scheduler = {
|
|
@@ -13605,11 +13602,11 @@ const Hn = Qi("item-manager", () => {
|
|
|
13605
13602
|
}
|
|
13606
13603
|
}, await new vt(F, e, i.updateMenu, n).update();
|
|
13607
13604
|
}
|
|
13608
|
-
async function g(
|
|
13605
|
+
async function g(x) {
|
|
13609
13606
|
var H;
|
|
13610
13607
|
const z = Te(e.currentCatalog), F = (H = Object.entries(z.override.items)) == null ? void 0 : H.reduce(
|
|
13611
13608
|
(w, [$, N]) => {
|
|
13612
|
-
const Q =
|
|
13609
|
+
const Q = x.find((K) => K._id === $);
|
|
13613
13610
|
if (!Q)
|
|
13614
13611
|
return w[$] = N, w;
|
|
13615
13612
|
const se = N.find((K) => !K.combinationKey);
|
|
@@ -13639,10 +13636,10 @@ const Hn = Qi("item-manager", () => {
|
|
|
13639
13636
|
n
|
|
13640
13637
|
).update();
|
|
13641
13638
|
}
|
|
13642
|
-
async function k(
|
|
13639
|
+
async function k(x) {
|
|
13643
13640
|
const z = Te(e.currentScheduler), F = z.items.reduce((G, H) => {
|
|
13644
13641
|
if (H.combinationKey) return [...G, H];
|
|
13645
|
-
const w =
|
|
13642
|
+
const w = x.find(($) => $._id === H._id);
|
|
13646
13643
|
return w ? [...G, { ...H, price: w.price }] : [...G, H];
|
|
13647
13644
|
}, []);
|
|
13648
13645
|
await new kn(
|
|
@@ -13655,8 +13652,8 @@ const Hn = Qi("item-manager", () => {
|
|
|
13655
13652
|
n
|
|
13656
13653
|
).update();
|
|
13657
13654
|
}
|
|
13658
|
-
async function b(
|
|
13659
|
-
const z = new Map(e.state.menu.modules.item.map((H) => [H._id, H])), F =
|
|
13655
|
+
async function b(x) {
|
|
13656
|
+
const z = new Map(e.state.menu.modules.item.map((H) => [H._id, H])), F = x.reduce((H, w) => {
|
|
13660
13657
|
const $ = z.get(w._id);
|
|
13661
13658
|
return $ && H.push({
|
|
13662
13659
|
...$,
|
|
@@ -13680,28 +13677,28 @@ const Hn = Qi("item-manager", () => {
|
|
|
13680
13677
|
`${F.length} products`
|
|
13681
13678
|
);
|
|
13682
13679
|
}
|
|
13683
|
-
function v(
|
|
13680
|
+
function v(x) {
|
|
13684
13681
|
const { saveMenuWithImages: z } = i;
|
|
13685
13682
|
l({
|
|
13686
|
-
initialForm:
|
|
13683
|
+
initialForm: x,
|
|
13687
13684
|
action: "update",
|
|
13688
13685
|
"onSubmit:form": async (F, G) => {
|
|
13689
13686
|
F.inventoryBindings ?? (F.inventoryBindings = []), F.inventoryBindings.length === 0 && (F.inventoryBindings = null), await z(F, Ne.F_OPERATION_TYPE.update, G);
|
|
13690
13687
|
}
|
|
13691
13688
|
});
|
|
13692
13689
|
}
|
|
13693
|
-
async function x
|
|
13694
|
-
const z = e.state.menu.modules.item.find((F) => F._id ===
|
|
13690
|
+
async function T(x) {
|
|
13691
|
+
const z = e.state.menu.modules.item.find((F) => F._id === x);
|
|
13695
13692
|
e.currentCatalog ? e.state.currentSchedulerId ? await d(z) : await c(z) : e.state.currentSchedulerId ? await p(z) : v(z);
|
|
13696
13693
|
}
|
|
13697
|
-
async function S(
|
|
13698
|
-
e.currentCatalog ? e.currentScheduler ? await f(
|
|
13694
|
+
async function S(x) {
|
|
13695
|
+
e.currentCatalog ? e.currentScheduler ? await f(x) : await g(x) : (
|
|
13699
13696
|
// If Main
|
|
13700
|
-
e.currentScheduler ? await k(
|
|
13697
|
+
e.currentScheduler ? await k(x) : await b(x)
|
|
13701
13698
|
);
|
|
13702
13699
|
}
|
|
13703
|
-
function j(
|
|
13704
|
-
const { updateMenu: z } = i, F =
|
|
13700
|
+
function j(x) {
|
|
13701
|
+
const { updateMenu: z } = i, F = x.length > 1 ? `${x.length} products` : x[0].name;
|
|
13705
13702
|
n.open({
|
|
13706
13703
|
title: r("menu.common.dialog.remove.product.title"),
|
|
13707
13704
|
message: r("menu.common.dialog.remove.product.message", { name: F }),
|
|
@@ -13716,7 +13713,7 @@ const Hn = Qi("item-manager", () => {
|
|
|
13716
13713
|
}
|
|
13717
13714
|
}).onPrimary(async () => {
|
|
13718
13715
|
await z(
|
|
13719
|
-
|
|
13716
|
+
x.map(({ _id: G }) => ({
|
|
13720
13717
|
module: Be.enum.item,
|
|
13721
13718
|
operation: Ne.F_OPERATION_TYPE.delete,
|
|
13722
13719
|
data: G
|
|
@@ -13725,7 +13722,7 @@ const Hn = Qi("item-manager", () => {
|
|
|
13725
13722
|
!0
|
|
13726
13723
|
);
|
|
13727
13724
|
try {
|
|
13728
|
-
await Kr(
|
|
13725
|
+
await Kr(x.map(({ _id: G }) => G));
|
|
13729
13726
|
} catch (G) {
|
|
13730
13727
|
console.error("Failed to clean up deleted product images", G);
|
|
13731
13728
|
}
|
|
@@ -13735,37 +13732,37 @@ const Hn = Qi("item-manager", () => {
|
|
|
13735
13732
|
});
|
|
13736
13733
|
});
|
|
13737
13734
|
}
|
|
13738
|
-
async function I(
|
|
13735
|
+
async function I(x) {
|
|
13739
13736
|
e.currentScheduler ? await new kn(
|
|
13740
13737
|
e.currentScheduler,
|
|
13741
13738
|
e,
|
|
13742
13739
|
i.updateMenu,
|
|
13743
13740
|
n
|
|
13744
|
-
).unlinkProduct(
|
|
13741
|
+
).unlinkProduct(x.map((z) => z._id)) : e.currentCatalog ? await new vt(
|
|
13745
13742
|
e.currentCatalog,
|
|
13746
13743
|
e,
|
|
13747
13744
|
i.updateMenu,
|
|
13748
13745
|
n
|
|
13749
|
-
).unlinkProduct(
|
|
13746
|
+
).unlinkProduct(x.map((z) => z._id)) : j(x);
|
|
13750
13747
|
}
|
|
13751
|
-
async function
|
|
13748
|
+
async function A(x) {
|
|
13752
13749
|
const { updateMenu: z } = i;
|
|
13753
13750
|
await z(
|
|
13754
13751
|
{
|
|
13755
13752
|
module: Be.enum.item,
|
|
13756
13753
|
operation: Ne.F_OPERATION_TYPE.rearrange,
|
|
13757
|
-
data:
|
|
13754
|
+
data: x
|
|
13758
13755
|
},
|
|
13759
13756
|
"Products"
|
|
13760
13757
|
);
|
|
13761
13758
|
}
|
|
13762
13759
|
return {
|
|
13763
|
-
initDynamicGroupItem: (
|
|
13760
|
+
initDynamicGroupItem: (x) => fr(e, x),
|
|
13764
13761
|
create: s,
|
|
13765
|
-
update:
|
|
13762
|
+
update: T,
|
|
13766
13763
|
updateMany: S,
|
|
13767
13764
|
deleteItem: I,
|
|
13768
|
-
rearrange:
|
|
13765
|
+
rearrange: A
|
|
13769
13766
|
};
|
|
13770
13767
|
});
|
|
13771
13768
|
export {
|
|
@@ -13773,13 +13770,13 @@ export {
|
|
|
13773
13770
|
lf as A,
|
|
13774
13771
|
Ln as B,
|
|
13775
13772
|
un as C,
|
|
13776
|
-
|
|
13773
|
+
Fo as D,
|
|
13777
13774
|
La as E,
|
|
13778
13775
|
Zt as F,
|
|
13779
13776
|
wl as G,
|
|
13780
13777
|
hl as H,
|
|
13781
13778
|
Qs as I,
|
|
13782
|
-
|
|
13779
|
+
Bo as J,
|
|
13783
13780
|
Kc as K,
|
|
13784
13781
|
Pd as L,
|
|
13785
13782
|
ol as M,
|
|
@@ -13789,10 +13786,10 @@ export {
|
|
|
13789
13786
|
ws as Q,
|
|
13790
13787
|
Gn as R,
|
|
13791
13788
|
Am as S,
|
|
13792
|
-
|
|
13789
|
+
ni as T,
|
|
13793
13790
|
Wn as U,
|
|
13794
13791
|
mr as V,
|
|
13795
|
-
|
|
13792
|
+
Vo as W,
|
|
13796
13793
|
ph as X,
|
|
13797
13794
|
Fh as Y,
|
|
13798
13795
|
Lh as Z,
|
|
@@ -13808,7 +13805,7 @@ export {
|
|
|
13808
13805
|
Og as a7,
|
|
13809
13806
|
jg as a8,
|
|
13810
13807
|
fh as a9,
|
|
13811
|
-
|
|
13808
|
+
ti as aa,
|
|
13812
13809
|
$t as ab,
|
|
13813
13810
|
Lg as ac,
|
|
13814
13811
|
Ws as ad,
|
|
@@ -13816,7 +13813,7 @@ export {
|
|
|
13816
13813
|
nb as af,
|
|
13817
13814
|
pc as ag,
|
|
13818
13815
|
Da as ah,
|
|
13819
|
-
|
|
13816
|
+
bi as ai,
|
|
13820
13817
|
Yi as aj,
|
|
13821
13818
|
cf as ak,
|
|
13822
13819
|
Zi as al,
|
|
@@ -13827,7 +13824,7 @@ export {
|
|
|
13827
13824
|
pr as aq,
|
|
13828
13825
|
hd as b,
|
|
13829
13826
|
mb as c,
|
|
13830
|
-
|
|
13827
|
+
Ro as d,
|
|
13831
13828
|
pn as e,
|
|
13832
13829
|
Ba as f,
|
|
13833
13830
|
Rm as g,
|