@feedmepos/mf-settings 0.0.58 → 0.0.60
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-854f8c7c.js → App-48215cac.js} +3 -3
- package/dist/{Business-ddbd12c2.js → Business-a9258021.js} +751 -732
- package/dist/{CreateBusiness-fa4096f9.js → CreateBusiness-2662327f.js} +12 -11
- package/dist/{FoodCourt-0a28a67f.js → FoodCourt-3d6ab131.js} +13 -11
- package/dist/{LicenseOrder-86aa7996.js → LicenseOrder-bd3d3012.js} +8 -8
- package/dist/ReasonTemplate-4270229d.js +2234 -0
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-08a69f88.js +88 -0
- package/dist/{Tagging-5fcdf95d.js → Tagging-d8e2293e.js} +8 -7
- package/dist/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/{app-59ccea16.js → app-0dbb5982.js} +320 -66
- package/dist/app.js +4 -3
- package/dist/apps/mf-settings/src/View/ReasonTemplate.vue.d.ts +2 -0
- package/dist/apps/mf-settings/src/api/index.d.ts +2 -0
- package/dist/apps/mf-settings/src/app.d.ts +123 -0
- package/dist/apps/mf-settings/src/components/reason/ReasonTemplateForm.vue.d.ts +28 -0
- package/dist/apps/mf-settings/src/store/attributeSettings.d.ts +2 -2
- package/dist/apps/mf-settings/src/types/reasonTemplate.d.ts +9 -0
- package/dist/apps/mf-settings/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{business-ad1b9825.js → business-49b1df80.js} +1 -1
- package/dist/createForm-d3b97d2e.js +50 -0
- package/dist/dayjs.min-2edeb0fb.js +310 -0
- package/dist/index-33f7f731.js +17967 -0
- package/dist/{index-71e4b8aa.js → index-b5909a1d.js} +1035 -1024
- package/dist/{index-759f69a1.js → index-cc4114ab.js} +1721 -1731
- package/dist/object-27ce045b.js +16 -0
- package/dist/rules-2bee6632.js +6 -0
- package/package.json +2 -2
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-030a97dd.js +0 -395
- package/dist/index-e68421c3.js +0 -18030
- package/dist/object-8ac0c0d8.js +0 -63
- package/dist/rules-c9fa22f8.js +0 -13
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
var Or = Object.defineProperty;
|
|
2
2
|
var Sr = (t, e, r) => e in t ? Or(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as re, ref as ae, resolveComponent as q, openBlock as
|
|
3
|
+
var Xe = (t, e, r) => (Sr(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
import { defineComponent as re, ref as ae, resolveComponent as q, openBlock as j, createBlock as te, withCtx as K, withModifiers as ot, createCommentVNode as ce, renderSlot as de, createElementVNode as $, nextTick as Pr, createElementBlock as B, normalizeClass as ee, createTextVNode as je, toDisplayString as G, computed as Y, normalizeStyle as Me, createVNode as L, reactive as ft, Fragment as oe, unref as _, renderList as he, h as At, Teleport as Tr, Transition as Lr, withKeys as Nr, watch as Ot, onMounted as Cr, onUnmounted as xr, toRaw as St, normalizeProps as kr, guardReactiveProps as Vr, getCurrentInstance as Fr, isRef as Pt } from "vue";
|
|
5
5
|
import { useCoreStore as pe, useI18n as ve, CustomAttributesForm as jr } from "@feedmepos/mf-common";
|
|
6
|
-
import { useSnackbar as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { useSnackbar as mt, components as Mr, useDialog as pt, useDialogChild as Ur, useBreakpoints as ur } from "@feedmepos/ui-library";
|
|
7
|
+
import { a as Dr, _ as Gr } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-08a69f88.js";
|
|
8
|
+
import { _ as Br, c as Ye } from "./createForm-d3b97d2e.js";
|
|
9
|
+
import { D as ht, u as cr } from "./dayjs.min-2edeb0fb.js";
|
|
9
10
|
import { _ as Re, c as Kr } from "./FormSection.vue_vue_type_script_setup_true_lang-6aab82f2.js";
|
|
10
|
-
import { e as
|
|
11
|
-
import { u as fr, b as Pe, a as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
11
|
+
import { e as vt, g as dr, c as qr } from "./index-cc4114ab.js";
|
|
12
|
+
import { u as fr, b as Pe, a as We, g as Ue } from "./index-b5909a1d.js";
|
|
13
|
+
import { c as $e } from "./object-27ce045b.js";
|
|
14
|
+
import { b as Hr } from "./business-49b1df80.js";
|
|
15
|
+
import { t as Je, w as Ze, x as zr, y as Xr, z as Yr, A as Wr, B as De, u as be, D as Jr, G as Zr } from "./map-695afd6f.js";
|
|
16
|
+
import { _ as mr } from "./_plugin-vue_export-helper-dad06003.js";
|
|
17
|
+
import { u as Qr } from "./app-0dbb5982.js";
|
|
18
|
+
import { r as fe } from "./rules-2bee6632.js";
|
|
16
19
|
import "pinia";
|
|
17
20
|
import "@feedmepos/mf-mdm";
|
|
18
21
|
import "vue-router";
|
|
@@ -60,7 +63,7 @@ const tn = /* @__PURE__ */ re({
|
|
|
60
63
|
}
|
|
61
64
|
return (n, s) => {
|
|
62
65
|
const o = q("FmButton"), i = q("FmBottomSheet");
|
|
63
|
-
return
|
|
66
|
+
return j(), te(i, {
|
|
64
67
|
modelValue: e.value,
|
|
65
68
|
"onUpdate:modelValue": s[1] || (s[1] = (f) => e.value = f),
|
|
66
69
|
"dismiss-away": "",
|
|
@@ -68,11 +71,11 @@ const tn = /* @__PURE__ */ re({
|
|
|
68
71
|
"z-index": 110
|
|
69
72
|
}, {
|
|
70
73
|
"bottom-sheet-button": K(() => [
|
|
71
|
-
n.$slots.button ? ce("", !0) : (
|
|
74
|
+
n.$slots.button ? ce("", !0) : (j(), te(o, {
|
|
72
75
|
key: 0,
|
|
73
76
|
icon: "more_vert",
|
|
74
77
|
variant: "tertiary",
|
|
75
|
-
onClick:
|
|
78
|
+
onClick: ot(r, ["stop"])
|
|
76
79
|
})),
|
|
77
80
|
de(n.$slots, "button")
|
|
78
81
|
]),
|
|
@@ -99,8 +102,8 @@ const tn = /* @__PURE__ */ re({
|
|
|
99
102
|
const e = t;
|
|
100
103
|
return (r, n) => {
|
|
101
104
|
const s = q("FmIcon");
|
|
102
|
-
return
|
|
103
|
-
r.$slots.content ? ce("", !0) : (
|
|
105
|
+
return j(), B("div", rn, [
|
|
106
|
+
r.$slots.content ? ce("", !0) : (j(), B("div", {
|
|
104
107
|
key: 0,
|
|
105
108
|
class: ee(["flex items-center", {
|
|
106
109
|
"text-fm-color-typo-disabled": e.disabled,
|
|
@@ -109,11 +112,11 @@ const tn = /* @__PURE__ */ re({
|
|
|
109
112
|
[e.itemClass || ""]: e.itemClass && !e.disabled
|
|
110
113
|
}])
|
|
111
114
|
}, [
|
|
112
|
-
r.icon ? (
|
|
115
|
+
r.icon ? (j(), te(s, {
|
|
113
116
|
key: 0,
|
|
114
117
|
name: r.icon
|
|
115
118
|
}, null, 8, ["name"])) : ce("", !0),
|
|
116
|
-
|
|
119
|
+
je(" " + G(r.label), 1)
|
|
117
120
|
], 2)),
|
|
118
121
|
de(r.$slots, "content")
|
|
119
122
|
]);
|
|
@@ -142,14 +145,14 @@ const tn = /* @__PURE__ */ re({
|
|
|
142
145
|
const r = t, n = e, s = Y(() => r.modelValue ? URL.createObjectURL(r.modelValue) : r.previousUrl);
|
|
143
146
|
return (o, i) => {
|
|
144
147
|
const f = q("fm-icon"), d = q("fm-drop-field");
|
|
145
|
-
return s.value ? (
|
|
148
|
+
return s.value ? (j(), B("div", sn, [
|
|
146
149
|
$("p", an, [
|
|
147
|
-
|
|
150
|
+
je(G(r.label) + " ", 1),
|
|
148
151
|
$("span", on, G(o.subLabel), 1)
|
|
149
152
|
]),
|
|
150
153
|
$("div", {
|
|
151
154
|
class: ee(["relative", "border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md"]),
|
|
152
|
-
style:
|
|
155
|
+
style: Me({ width: `${r.width}px`, height: `${r.height}px` })
|
|
153
156
|
}, [
|
|
154
157
|
$("div", ln, [
|
|
155
158
|
$("div", un, [
|
|
@@ -160,7 +163,7 @@ const tn = /* @__PURE__ */ re({
|
|
|
160
163
|
}, null, 8, cn)
|
|
161
164
|
])
|
|
162
165
|
]),
|
|
163
|
-
o.canDelete ? (
|
|
166
|
+
o.canDelete ? (j(), B("button", {
|
|
164
167
|
key: 0,
|
|
165
168
|
class: ee([
|
|
166
169
|
"absolute top-12 right-12 z-10",
|
|
@@ -168,20 +171,20 @@ const tn = /* @__PURE__ */ re({
|
|
|
168
171
|
"bg-fm-color-neutral-white"
|
|
169
172
|
]),
|
|
170
173
|
type: "button",
|
|
171
|
-
onClick: i[0] || (i[0] = (
|
|
174
|
+
onClick: i[0] || (i[0] = (b) => n("reset:model-value"))
|
|
172
175
|
}, [
|
|
173
|
-
|
|
176
|
+
L(f, { name: "close" })
|
|
174
177
|
])) : ce("", !0)
|
|
175
178
|
], 4)
|
|
176
|
-
])) : (
|
|
179
|
+
])) : (j(), te(d, {
|
|
177
180
|
key: 1,
|
|
178
181
|
accept: ".jpg, .jpeg, .png, .gif",
|
|
179
|
-
style:
|
|
180
|
-
onFileUpload: i[1] || (i[1] = (
|
|
182
|
+
style: Me({ width: `${r.width}px`, height: `${r.height}px` }),
|
|
183
|
+
onFileUpload: i[1] || (i[1] = (b) => n("update:model-value", b))
|
|
181
184
|
}, {
|
|
182
185
|
label: K(() => [
|
|
183
186
|
$("p", dn, [
|
|
184
|
-
|
|
187
|
+
je(G(r.label) + " ", 1),
|
|
185
188
|
$("span", fn, G(r.subLabel), 1)
|
|
186
189
|
])
|
|
187
190
|
]),
|
|
@@ -689,28 +692,28 @@ const tn = /* @__PURE__ */ re({
|
|
|
689
692
|
"za",
|
|
690
693
|
"zm",
|
|
691
694
|
"zw"
|
|
692
|
-
],
|
|
695
|
+
], Qe = {
|
|
693
696
|
async get(t, e) {
|
|
694
|
-
const r =
|
|
697
|
+
const r = Je(void 0, e), n = Ze(r, t);
|
|
695
698
|
return await (await zr(n)).text();
|
|
696
699
|
},
|
|
697
700
|
async update(t, e, r) {
|
|
698
|
-
const n =
|
|
701
|
+
const n = Je(void 0, r), s = Ze(n, t);
|
|
699
702
|
return await Xr(s, e), await Yr(s);
|
|
700
703
|
},
|
|
701
704
|
async delete(t, e) {
|
|
702
|
-
const r =
|
|
705
|
+
const r = Je(void 0, e), n = Ze(r, t);
|
|
703
706
|
await Wr(n);
|
|
704
707
|
}
|
|
705
708
|
}, me = {
|
|
706
709
|
async get(t) {
|
|
707
|
-
return await
|
|
710
|
+
return await Qe.get(t);
|
|
708
711
|
},
|
|
709
712
|
async update(t, e, r) {
|
|
710
|
-
return await
|
|
713
|
+
return await Qe.update(t, e);
|
|
711
714
|
},
|
|
712
715
|
async delete(t) {
|
|
713
|
-
await
|
|
716
|
+
await Qe.delete(t);
|
|
714
717
|
}
|
|
715
718
|
}, mn = { class: "fm-typo-en-title-md-600" }, pn = { class: "pt-8 space-y-24" }, hn = { class: "flex gap-8 items-center justify-start" }, vn = /* @__PURE__ */ re({
|
|
716
719
|
__name: "BusinessForm",
|
|
@@ -725,7 +728,7 @@ const tn = /* @__PURE__ */ re({
|
|
|
725
728
|
}
|
|
726
729
|
},
|
|
727
730
|
setup(t, { expose: e }) {
|
|
728
|
-
const r = t, n =
|
|
731
|
+
const r = t, n = mt(), s = fr(n), o = "https://feedmedev.cc", i = ft(
|
|
729
732
|
r.initialValue ? $e(r.initialValue) : {
|
|
730
733
|
thumbnail: void 0,
|
|
731
734
|
name: "",
|
|
@@ -734,44 +737,44 @@ const tn = /* @__PURE__ */ re({
|
|
|
734
737
|
}
|
|
735
738
|
);
|
|
736
739
|
Y(() => i.newThumbnail ? URL.createObjectURL(i.newThumbnail) : i.thumbnail);
|
|
737
|
-
const f = Y(() => pe().currentCountry.value), d = ae(!1),
|
|
738
|
-
|
|
740
|
+
const f = Y(() => pe().currentCountry.value), d = ae(!1), b = ae(!1), l = (x) => {
|
|
741
|
+
b.value = !b.value;
|
|
739
742
|
};
|
|
740
743
|
function g() {
|
|
741
744
|
i.thumbnail = void 0, i.newThumbnail = void 0;
|
|
742
745
|
}
|
|
743
|
-
const
|
|
744
|
-
const
|
|
746
|
+
const O = async () => {
|
|
747
|
+
const x = i;
|
|
745
748
|
await s.minor(async () => {
|
|
746
|
-
var k, V,
|
|
747
|
-
if (
|
|
748
|
-
const
|
|
749
|
-
`business/${r.businessId}/thumbnail/${
|
|
750
|
-
|
|
749
|
+
var k, V, A;
|
|
750
|
+
if (x.newThumbnail) {
|
|
751
|
+
const F = await me.update(
|
|
752
|
+
`business/${r.businessId}/thumbnail/${ht().toISOString()}.png`,
|
|
753
|
+
x.newThumbnail
|
|
751
754
|
);
|
|
752
|
-
|
|
755
|
+
x.thumbnail = F, (k = r.initialValue) != null && k.thumbnail && await me.delete(r.initialValue.thumbnail);
|
|
753
756
|
} else
|
|
754
|
-
(V = r.initialValue) != null && V.thumbnail && !
|
|
755
|
-
const
|
|
756
|
-
y.value = { ...y.value, ...
|
|
757
|
+
(V = r.initialValue) != null && V.thumbnail && !x.thumbnail && await me.delete((A = r.initialValue) == null ? void 0 : A.thumbnail);
|
|
758
|
+
const v = await Hr.updateBusinessProfile(r.businessId, x), y = pe().currentBusiness;
|
|
759
|
+
y.value = { ...y.value, ...v }, l();
|
|
757
760
|
});
|
|
758
761
|
};
|
|
759
762
|
e({
|
|
760
|
-
show:
|
|
761
|
-
trigger:
|
|
763
|
+
show: b,
|
|
764
|
+
trigger: l
|
|
762
765
|
});
|
|
763
766
|
const { t: c } = ve();
|
|
764
|
-
return (
|
|
767
|
+
return (x, v) => {
|
|
765
768
|
const y = q("FmTextField"), k = q("fm-button"), V = q("fm-side-sheet");
|
|
766
|
-
return
|
|
767
|
-
de(
|
|
768
|
-
|
|
769
|
+
return j(), B(oe, null, [
|
|
770
|
+
de(x.$slots, "default", { trigger: l }),
|
|
771
|
+
L(V, {
|
|
769
772
|
id: "unit-form",
|
|
770
|
-
modelValue:
|
|
771
|
-
"onUpdate:modelValue":
|
|
773
|
+
modelValue: b.value,
|
|
774
|
+
"onUpdate:modelValue": v[4] || (v[4] = (A) => b.value = A),
|
|
772
775
|
"is-container": _(Mr).FmForm,
|
|
773
776
|
"is-container-props": {
|
|
774
|
-
onValidationSuccess:
|
|
777
|
+
onValidationSuccess: O,
|
|
775
778
|
blameFormChildOnValidationFailed: !0
|
|
776
779
|
},
|
|
777
780
|
"max-width": 560,
|
|
@@ -782,53 +785,53 @@ const tn = /* @__PURE__ */ re({
|
|
|
782
785
|
]),
|
|
783
786
|
"side-sheet-footer": K(() => [
|
|
784
787
|
$("div", hn, [
|
|
785
|
-
|
|
788
|
+
L(k, {
|
|
786
789
|
label: _(c)("common.update"),
|
|
787
790
|
loading: d.value,
|
|
788
791
|
size: "lg",
|
|
789
792
|
type: "submit",
|
|
790
793
|
variant: "primary"
|
|
791
794
|
}, null, 8, ["label", "loading"]),
|
|
792
|
-
|
|
795
|
+
L(k, {
|
|
793
796
|
label: _(c)("common.cancel"),
|
|
794
797
|
size: "lg",
|
|
795
798
|
variant: "tertiary",
|
|
796
|
-
onClick:
|
|
799
|
+
onClick: v[3] || (v[3] = () => b.value = !1)
|
|
797
800
|
}, null, 8, ["label"])
|
|
798
801
|
])
|
|
799
802
|
]),
|
|
800
803
|
default: K(() => [
|
|
801
804
|
$("div", pn, [
|
|
802
805
|
$("div", null, [
|
|
803
|
-
|
|
806
|
+
L(ye, {
|
|
804
807
|
label: _(c)("settings.business.form.cover_photo.label"),
|
|
805
808
|
"sub-label": _(c)("settings.business.form.cover_photo.optional"),
|
|
806
809
|
"previous-url": i.thumbnail,
|
|
807
810
|
modelValue: i.newThumbnail,
|
|
808
|
-
"onUpdate:modelValue":
|
|
811
|
+
"onUpdate:modelValue": v[0] || (v[0] = (A) => i.newThumbnail = A),
|
|
809
812
|
"onReset:modelValue": g
|
|
810
813
|
}, null, 8, ["label", "sub-label", "previous-url", "modelValue"])
|
|
811
814
|
]),
|
|
812
815
|
$("div", null, [
|
|
813
|
-
|
|
816
|
+
L(y, {
|
|
814
817
|
label: _(c)("settings.business.form.name"),
|
|
815
818
|
modelValue: i.name,
|
|
816
|
-
"onUpdate:modelValue":
|
|
819
|
+
"onUpdate:modelValue": v[1] || (v[1] = (A) => i.name = A)
|
|
817
820
|
}, null, 8, ["label", "modelValue"])
|
|
818
821
|
]),
|
|
819
822
|
$("div", null, [
|
|
820
|
-
|
|
823
|
+
L(y, {
|
|
821
824
|
label: _(c)("settings.business.form.url.label"),
|
|
822
825
|
"model-value": i.url || "",
|
|
823
|
-
"onUpdate:modelValue":
|
|
826
|
+
"onUpdate:modelValue": v[2] || (v[2] = (A) => i.url = A),
|
|
824
827
|
placeholder: t.businessId,
|
|
825
828
|
rules: [
|
|
826
|
-
(
|
|
827
|
-
var
|
|
828
|
-
return !
|
|
829
|
+
(A) => {
|
|
830
|
+
var F;
|
|
831
|
+
return !A || ((F = t.initialValue) == null ? void 0 : F.url) == i.url || f.value == _(vt.F_COUNTRY).enum.MY || _(c)("settings.business.form.url.errors.disabled");
|
|
829
832
|
},
|
|
830
|
-
(
|
|
831
|
-
(
|
|
833
|
+
(A) => !A || _(pr).test(A) || _(c)("settings.business.form.url.errors.format"),
|
|
834
|
+
(A) => !A || !_(hr).includes(A) || _(c)("settings.business.form.url.errors.reserved")
|
|
832
835
|
]
|
|
833
836
|
}, {
|
|
834
837
|
prepend: K(() => [
|
|
@@ -844,7 +847,7 @@ const tn = /* @__PURE__ */ re({
|
|
|
844
847
|
], 64);
|
|
845
848
|
};
|
|
846
849
|
}
|
|
847
|
-
}), gn = { class: "fm-typo-en-body-lg-600" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" },
|
|
850
|
+
}), gn = { class: "fm-typo-en-body-lg-600" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Tt = /* @__PURE__ */ re({
|
|
848
851
|
__name: "FormLabel",
|
|
849
852
|
props: {
|
|
850
853
|
label: {},
|
|
@@ -853,12 +856,12 @@ const tn = /* @__PURE__ */ re({
|
|
|
853
856
|
},
|
|
854
857
|
setup(t) {
|
|
855
858
|
const e = t, r = Y(() => e.optional && !e.subLabel ? "(optional)" : e.subLabel);
|
|
856
|
-
return (n, s) => (
|
|
857
|
-
|
|
859
|
+
return (n, s) => (j(), B("p", gn, [
|
|
860
|
+
je(G(n.label) + " ", 1),
|
|
858
861
|
$("span", bn, G(r.value), 1)
|
|
859
862
|
]));
|
|
860
863
|
}
|
|
861
|
-
}), yn = { class: "space-y-4" }, $n = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _n = { class: "fm-typo-en-body-lg-600" },
|
|
864
|
+
}), yn = { class: "space-y-4" }, $n = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _n = { class: "fm-typo-en-body-lg-600" }, Lt = /* @__PURE__ */ re({
|
|
862
865
|
__name: "InfoBasic",
|
|
863
866
|
props: {
|
|
864
867
|
name: {
|
|
@@ -871,21 +874,21 @@ const tn = /* @__PURE__ */ re({
|
|
|
871
874
|
}
|
|
872
875
|
},
|
|
873
876
|
setup(t) {
|
|
874
|
-
return (e, r) => (
|
|
877
|
+
return (e, r) => (j(), B("div", yn, [
|
|
875
878
|
$("div", $n, G(t.name), 1),
|
|
876
879
|
$("div", _n, G(t.value), 1)
|
|
877
880
|
]));
|
|
878
881
|
}
|
|
879
882
|
}), En = {};
|
|
880
883
|
function wn(t, e) {
|
|
881
|
-
return
|
|
884
|
+
return j(), B("div", null, e[0] || (e[0] = [
|
|
882
885
|
$("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
883
886
|
]));
|
|
884
887
|
}
|
|
885
888
|
const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
886
889
|
key: 0,
|
|
887
890
|
class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
|
|
888
|
-
}, An = { class: "fm-typo-en-title-sm-600" },
|
|
891
|
+
}, An = { class: "fm-typo-en-title-sm-600" }, Nt = /* @__PURE__ */ re({
|
|
889
892
|
__name: "Summary",
|
|
890
893
|
props: {
|
|
891
894
|
title: {},
|
|
@@ -893,13 +896,13 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
893
896
|
items: {}
|
|
894
897
|
},
|
|
895
898
|
setup(t) {
|
|
896
|
-
const e = t, r =
|
|
899
|
+
const e = t, r = pt();
|
|
897
900
|
function n() {
|
|
898
901
|
r.open({
|
|
899
902
|
title: e.title,
|
|
900
|
-
contentComponent:
|
|
903
|
+
contentComponent: At("div", { class: "space-y-4" }, [
|
|
901
904
|
...e.items.map(
|
|
902
|
-
(s) =>
|
|
905
|
+
(s) => At(Lt, {
|
|
903
906
|
name: s.name,
|
|
904
907
|
value: s.value || "--"
|
|
905
908
|
})
|
|
@@ -909,15 +912,15 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
909
912
|
}
|
|
910
913
|
return (s, o) => {
|
|
911
914
|
const i = q("FmButton");
|
|
912
|
-
return e.variant === "full" ? (
|
|
915
|
+
return e.variant === "full" ? (j(), B("div", In, [
|
|
913
916
|
$("div", An, G(s.title), 1),
|
|
914
|
-
|
|
915
|
-
(
|
|
917
|
+
L(Rn),
|
|
918
|
+
(j(!0), B(oe, null, he(s.items, (f) => (j(), te(Lt, {
|
|
916
919
|
key: f.name,
|
|
917
920
|
name: f.name,
|
|
918
921
|
value: f.value || "--"
|
|
919
922
|
}, null, 8, ["name", "value"]))), 128))
|
|
920
|
-
])) : (
|
|
923
|
+
])) : (j(), te(i, {
|
|
921
924
|
key: 1,
|
|
922
925
|
icon: "info",
|
|
923
926
|
variant: "tertiary",
|
|
@@ -952,14 +955,14 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
952
955
|
};
|
|
953
956
|
return (o, i) => {
|
|
954
957
|
const f = q("fm-button"), d = q("fm-form");
|
|
955
|
-
return
|
|
956
|
-
|
|
958
|
+
return j(), te(Tr, { to: "body" }, [
|
|
959
|
+
L(Lr, { name: "fade" }, {
|
|
957
960
|
default: K(() => [
|
|
958
|
-
o.show ? (
|
|
961
|
+
o.show ? (j(), te(d, {
|
|
959
962
|
key: 0,
|
|
960
963
|
"blame-form-child-on-validation-failed": "",
|
|
961
964
|
class: ee(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
|
|
962
|
-
style:
|
|
965
|
+
style: Me({ zIndex: o.zIndex }),
|
|
963
966
|
tabindex: "-1",
|
|
964
967
|
onValidationSuccess: n,
|
|
965
968
|
onKeyup: Nr(s, ["esc"])
|
|
@@ -968,12 +971,12 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
968
971
|
$("div", On, [
|
|
969
972
|
$("p", Sn, G(o.title), 1),
|
|
970
973
|
de(o.$slots, "append-title", {}, void 0, !0),
|
|
971
|
-
(
|
|
972
|
-
label:
|
|
974
|
+
(j(!0), B(oe, null, he(o.secondaryActions, (b) => (j(), te(f, {
|
|
975
|
+
label: b.label,
|
|
973
976
|
variant: "tertiary",
|
|
974
|
-
onClick:
|
|
977
|
+
onClick: b.click
|
|
975
978
|
}, null, 8, ["label", "onClick"]))), 256)),
|
|
976
|
-
|
|
979
|
+
L(f, {
|
|
977
980
|
label: o.primaryAction.label,
|
|
978
981
|
type: "submit",
|
|
979
982
|
variant: "primary"
|
|
@@ -993,7 +996,7 @@ const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
|
|
|
993
996
|
}
|
|
994
997
|
});
|
|
995
998
|
const Ln = /* @__PURE__ */ mr(Tn, [["__scopeId", "data-v-5b5c7179"]]);
|
|
996
|
-
var
|
|
999
|
+
var it = { exports: {} };
|
|
997
1000
|
const Nn = "2.0.0", vr = 256, Cn = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
998
1001
|
9007199254740991, xn = 16, kn = vr - 6, Vn = [
|
|
999
1002
|
"major",
|
|
@@ -1004,7 +1007,7 @@ const Nn = "2.0.0", vr = 256, Cn = Number.MAX_SAFE_INTEGER || /* istanbul ignore
|
|
|
1004
1007
|
"prepatch",
|
|
1005
1008
|
"prerelease"
|
|
1006
1009
|
];
|
|
1007
|
-
var
|
|
1010
|
+
var Be = {
|
|
1008
1011
|
MAX_LENGTH: vr,
|
|
1009
1012
|
MAX_SAFE_COMPONENT_LENGTH: xn,
|
|
1010
1013
|
MAX_SAFE_BUILD_LENGTH: kn,
|
|
@@ -1016,42 +1019,42 @@ var De = {
|
|
|
1016
1019
|
};
|
|
1017
1020
|
const Fn = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => {
|
|
1018
1021
|
};
|
|
1019
|
-
var
|
|
1022
|
+
var Ke = Fn;
|
|
1020
1023
|
(function(t, e) {
|
|
1021
1024
|
const {
|
|
1022
1025
|
MAX_SAFE_COMPONENT_LENGTH: r,
|
|
1023
1026
|
MAX_SAFE_BUILD_LENGTH: n,
|
|
1024
1027
|
MAX_LENGTH: s
|
|
1025
|
-
} =
|
|
1028
|
+
} = Be, o = Ke;
|
|
1026
1029
|
e = t.exports = {};
|
|
1027
|
-
const i = e.re = [], f = e.safeRe = [], d = e.src = [],
|
|
1028
|
-
let
|
|
1029
|
-
const
|
|
1030
|
+
const i = e.re = [], f = e.safeRe = [], d = e.src = [], b = e.safeSrc = [], l = e.t = {};
|
|
1031
|
+
let g = 0;
|
|
1032
|
+
const O = "[a-zA-Z0-9-]", c = [
|
|
1030
1033
|
["\\s", 1],
|
|
1031
1034
|
["\\d", s],
|
|
1032
|
-
[
|
|
1033
|
-
],
|
|
1034
|
-
for (const [
|
|
1035
|
-
|
|
1036
|
-
return
|
|
1037
|
-
},
|
|
1038
|
-
const
|
|
1039
|
-
o(
|
|
1035
|
+
[O, n]
|
|
1036
|
+
], x = (y) => {
|
|
1037
|
+
for (const [k, V] of c)
|
|
1038
|
+
y = y.split(`${k}*`).join(`${k}{0,${V}}`).split(`${k}+`).join(`${k}{1,${V}}`);
|
|
1039
|
+
return y;
|
|
1040
|
+
}, v = (y, k, V) => {
|
|
1041
|
+
const A = x(k), F = g++;
|
|
1042
|
+
o(y, F, k), l[y] = F, d[F] = k, b[F] = A, i[F] = new RegExp(k, V ? "g" : void 0), f[F] = new RegExp(A, V ? "g" : void 0);
|
|
1040
1043
|
};
|
|
1041
|
-
|
|
1042
|
-
})(
|
|
1043
|
-
var Se =
|
|
1044
|
+
v("NUMERICIDENTIFIER", "0|[1-9]\\d*"), v("NUMERICIDENTIFIERLOOSE", "\\d+"), v("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${O}*`), v("MAINVERSION", `(${d[l.NUMERICIDENTIFIER]})\\.(${d[l.NUMERICIDENTIFIER]})\\.(${d[l.NUMERICIDENTIFIER]})`), v("MAINVERSIONLOOSE", `(${d[l.NUMERICIDENTIFIERLOOSE]})\\.(${d[l.NUMERICIDENTIFIERLOOSE]})\\.(${d[l.NUMERICIDENTIFIERLOOSE]})`), v("PRERELEASEIDENTIFIER", `(?:${d[l.NONNUMERICIDENTIFIER]}|${d[l.NUMERICIDENTIFIER]})`), v("PRERELEASEIDENTIFIERLOOSE", `(?:${d[l.NONNUMERICIDENTIFIER]}|${d[l.NUMERICIDENTIFIERLOOSE]})`), v("PRERELEASE", `(?:-(${d[l.PRERELEASEIDENTIFIER]}(?:\\.${d[l.PRERELEASEIDENTIFIER]})*))`), v("PRERELEASELOOSE", `(?:-?(${d[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[l.PRERELEASEIDENTIFIERLOOSE]})*))`), v("BUILDIDENTIFIER", `${O}+`), v("BUILD", `(?:\\+(${d[l.BUILDIDENTIFIER]}(?:\\.${d[l.BUILDIDENTIFIER]})*))`), v("FULLPLAIN", `v?${d[l.MAINVERSION]}${d[l.PRERELEASE]}?${d[l.BUILD]}?`), v("FULL", `^${d[l.FULLPLAIN]}$`), v("LOOSEPLAIN", `[v=\\s]*${d[l.MAINVERSIONLOOSE]}${d[l.PRERELEASELOOSE]}?${d[l.BUILD]}?`), v("LOOSE", `^${d[l.LOOSEPLAIN]}$`), v("GTLT", "((?:<|>)?=?)"), v("XRANGEIDENTIFIERLOOSE", `${d[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), v("XRANGEIDENTIFIER", `${d[l.NUMERICIDENTIFIER]}|x|X|\\*`), v("XRANGEPLAIN", `[v=\\s]*(${d[l.XRANGEIDENTIFIER]})(?:\\.(${d[l.XRANGEIDENTIFIER]})(?:\\.(${d[l.XRANGEIDENTIFIER]})(?:${d[l.PRERELEASE]})?${d[l.BUILD]}?)?)?`), v("XRANGEPLAINLOOSE", `[v=\\s]*(${d[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[l.XRANGEIDENTIFIERLOOSE]})(?:${d[l.PRERELEASELOOSE]})?${d[l.BUILD]}?)?)?`), v("XRANGE", `^${d[l.GTLT]}\\s*${d[l.XRANGEPLAIN]}$`), v("XRANGELOOSE", `^${d[l.GTLT]}\\s*${d[l.XRANGEPLAINLOOSE]}$`), v("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), v("COERCE", `${d[l.COERCEPLAIN]}(?:$|[^\\d])`), v("COERCEFULL", d[l.COERCEPLAIN] + `(?:${d[l.PRERELEASE]})?(?:${d[l.BUILD]})?(?:$|[^\\d])`), v("COERCERTL", d[l.COERCE], !0), v("COERCERTLFULL", d[l.COERCEFULL], !0), v("LONETILDE", "(?:~>?)"), v("TILDETRIM", `(\\s*)${d[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", v("TILDE", `^${d[l.LONETILDE]}${d[l.XRANGEPLAIN]}$`), v("TILDELOOSE", `^${d[l.LONETILDE]}${d[l.XRANGEPLAINLOOSE]}$`), v("LONECARET", "(?:\\^)"), v("CARETTRIM", `(\\s*)${d[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", v("CARET", `^${d[l.LONECARET]}${d[l.XRANGEPLAIN]}$`), v("CARETLOOSE", `^${d[l.LONECARET]}${d[l.XRANGEPLAINLOOSE]}$`), v("COMPARATORLOOSE", `^${d[l.GTLT]}\\s*(${d[l.LOOSEPLAIN]})$|^$`), v("COMPARATOR", `^${d[l.GTLT]}\\s*(${d[l.FULLPLAIN]})$|^$`), v("COMPARATORTRIM", `(\\s*)${d[l.GTLT]}\\s*(${d[l.LOOSEPLAIN]}|${d[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", v("HYPHENRANGE", `^\\s*(${d[l.XRANGEPLAIN]})\\s+-\\s+(${d[l.XRANGEPLAIN]})\\s*$`), v("HYPHENRANGELOOSE", `^\\s*(${d[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[l.XRANGEPLAINLOOSE]})\\s*$`), v("STAR", "(<|>)?=?\\s*\\*"), v("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), v("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
1045
|
+
})(it, it.exports);
|
|
1046
|
+
var Se = it.exports;
|
|
1044
1047
|
const jn = Object.freeze({ loose: !0 }), Mn = Object.freeze({}), Un = (t) => t ? typeof t != "object" ? jn : t : Mn;
|
|
1045
|
-
var
|
|
1046
|
-
const
|
|
1047
|
-
const r =
|
|
1048
|
+
var gt = Un;
|
|
1049
|
+
const Ct = /^[0-9]+$/, gr = (t, e) => {
|
|
1050
|
+
const r = Ct.test(t), n = Ct.test(e);
|
|
1048
1051
|
return r && n && (t = +t, e = +e), t === e ? 0 : r && !n ? -1 : n && !r ? 1 : t < e ? -1 : 1;
|
|
1049
1052
|
}, Dn = (t, e) => gr(e, t);
|
|
1050
1053
|
var br = {
|
|
1051
1054
|
compareIdentifiers: gr,
|
|
1052
1055
|
rcompareIdentifiers: Dn
|
|
1053
1056
|
};
|
|
1054
|
-
const Te =
|
|
1057
|
+
const Te = Ke, { MAX_LENGTH: xt, MAX_SAFE_INTEGER: Le } = Be, { safeRe: Ne, t: Ce } = Se, Gn = gt, { compareIdentifiers: ge } = br;
|
|
1055
1058
|
let Bn = class ue {
|
|
1056
1059
|
constructor(e, r) {
|
|
1057
1060
|
if (r = Gn(r), e instanceof ue) {
|
|
@@ -1060,12 +1063,12 @@ let Bn = class ue {
|
|
|
1060
1063
|
e = e.version;
|
|
1061
1064
|
} else if (typeof e != "string")
|
|
1062
1065
|
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
1063
|
-
if (e.length >
|
|
1066
|
+
if (e.length > xt)
|
|
1064
1067
|
throw new TypeError(
|
|
1065
|
-
`version is longer than ${
|
|
1068
|
+
`version is longer than ${xt} characters`
|
|
1066
1069
|
);
|
|
1067
1070
|
Te("SemVer", e, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
|
|
1068
|
-
const n = e.trim().match(r.loose ?
|
|
1071
|
+
const n = e.trim().match(r.loose ? Ne[Ce.LOOSE] : Ne[Ce.FULL]);
|
|
1069
1072
|
if (!n)
|
|
1070
1073
|
throw new TypeError(`Invalid Version: ${e}`);
|
|
1071
1074
|
if (this.raw = e, this.major = +n[1], this.minor = +n[2], this.patch = +n[3], this.major > Le || this.major < 0)
|
|
@@ -1140,6 +1143,15 @@ let Bn = class ue {
|
|
|
1140
1143
|
// preminor will bump the version up to the next minor release, and immediately
|
|
1141
1144
|
// down to pre-release. premajor and prepatch work the same way.
|
|
1142
1145
|
inc(e, r, n) {
|
|
1146
|
+
if (e.startsWith("pre")) {
|
|
1147
|
+
if (!r && n === !1)
|
|
1148
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
1149
|
+
if (r) {
|
|
1150
|
+
const s = `-${r}`.match(this.options.loose ? Ne[Ce.PRERELEASELOOSE] : Ne[Ce.PRERELEASE]);
|
|
1151
|
+
if (!s || s[1] !== r)
|
|
1152
|
+
throw new Error(`invalid identifier: ${r}`);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1143
1155
|
switch (e) {
|
|
1144
1156
|
case "premajor":
|
|
1145
1157
|
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", r, n);
|
|
@@ -1153,6 +1165,11 @@ let Bn = class ue {
|
|
|
1153
1165
|
case "prerelease":
|
|
1154
1166
|
this.prerelease.length === 0 && this.inc("patch", r, n), this.inc("pre", r, n);
|
|
1155
1167
|
break;
|
|
1168
|
+
case "release":
|
|
1169
|
+
if (this.prerelease.length === 0)
|
|
1170
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
1171
|
+
this.prerelease.length = 0;
|
|
1172
|
+
break;
|
|
1156
1173
|
case "major":
|
|
1157
1174
|
(this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
|
|
1158
1175
|
break;
|
|
@@ -1164,8 +1181,6 @@ let Bn = class ue {
|
|
|
1164
1181
|
break;
|
|
1165
1182
|
case "pre": {
|
|
1166
1183
|
const s = Number(n) ? 1 : 0;
|
|
1167
|
-
if (!r && n === !1)
|
|
1168
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
1169
1184
|
if (this.prerelease.length === 0)
|
|
1170
1185
|
this.prerelease = [s];
|
|
1171
1186
|
else {
|
|
@@ -1230,10 +1245,14 @@ const Ft = Ee, Qn = (t, e) => {
|
|
|
1230
1245
|
if (s === 0)
|
|
1231
1246
|
return null;
|
|
1232
1247
|
const o = s > 0, i = o ? r : n, f = o ? n : r, d = !!i.prerelease.length;
|
|
1233
|
-
if (!!f.prerelease.length && !d)
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1248
|
+
if (!!f.prerelease.length && !d) {
|
|
1249
|
+
if (!f.patch && !f.minor)
|
|
1250
|
+
return "major";
|
|
1251
|
+
if (f.compareMain(i) === 0)
|
|
1252
|
+
return f.minor && !f.patch ? "minor" : "patch";
|
|
1253
|
+
}
|
|
1254
|
+
const l = d ? "pre" : "";
|
|
1255
|
+
return r.major !== n.major ? l + "major" : r.minor !== n.minor ? l + "minor" : r.patch !== n.patch ? l + "patch" : "prerelease";
|
|
1237
1256
|
};
|
|
1238
1257
|
var es = Qn;
|
|
1239
1258
|
const ts = ne, rs = (t, e) => new ts(t, e).major;
|
|
@@ -1257,24 +1276,24 @@ const Mt = ne, $s = (t, e, r) => {
|
|
|
1257
1276
|
const n = new Mt(t, r), s = new Mt(e, r);
|
|
1258
1277
|
return n.compare(s) || n.compareBuild(s);
|
|
1259
1278
|
};
|
|
1260
|
-
var
|
|
1261
|
-
const _s =
|
|
1279
|
+
var bt = $s;
|
|
1280
|
+
const _s = bt, Es = (t, e) => t.sort((r, n) => _s(r, n, e));
|
|
1262
1281
|
var ws = Es;
|
|
1263
|
-
const Rs =
|
|
1282
|
+
const Rs = bt, Is = (t, e) => t.sort((r, n) => Rs(n, r, e));
|
|
1264
1283
|
var As = Is;
|
|
1265
1284
|
const Os = ie, Ss = (t, e, r) => Os(t, e, r) > 0;
|
|
1266
|
-
var
|
|
1285
|
+
var qe = Ss;
|
|
1267
1286
|
const Ps = ie, Ts = (t, e, r) => Ps(t, e, r) < 0;
|
|
1268
|
-
var
|
|
1287
|
+
var yt = Ts;
|
|
1269
1288
|
const Ls = ie, Ns = (t, e, r) => Ls(t, e, r) === 0;
|
|
1270
1289
|
var yr = Ns;
|
|
1271
1290
|
const Cs = ie, xs = (t, e, r) => Cs(t, e, r) !== 0;
|
|
1272
1291
|
var $r = xs;
|
|
1273
1292
|
const ks = ie, Vs = (t, e, r) => ks(t, e, r) >= 0;
|
|
1274
|
-
var
|
|
1293
|
+
var $t = Vs;
|
|
1275
1294
|
const Fs = ie, js = (t, e, r) => Fs(t, e, r) <= 0;
|
|
1276
|
-
var
|
|
1277
|
-
const Ms = yr, Us = $r, Ds =
|
|
1295
|
+
var _t = js;
|
|
1296
|
+
const Ms = yr, Us = $r, Ds = qe, Gs = $t, Bs = yt, Ks = _t, qs = (t, e, r, n) => {
|
|
1278
1297
|
switch (e) {
|
|
1279
1298
|
case "===":
|
|
1280
1299
|
return typeof t == "object" && (t = t.version), typeof r == "object" && (r = r.version), t === r;
|
|
@@ -1299,7 +1318,7 @@ const Ms = yr, Us = $r, Ds = Be, Gs = bt, Bs = gt, Ks = yt, qs = (t, e, r, n) =>
|
|
|
1299
1318
|
}
|
|
1300
1319
|
};
|
|
1301
1320
|
var _r = qs;
|
|
1302
|
-
const Hs = ne, zs = Ee, { safeRe:
|
|
1321
|
+
const Hs = ne, zs = Ee, { safeRe: xe, t: ke } = Se, Xs = (t, e) => {
|
|
1303
1322
|
if (t instanceof Hs)
|
|
1304
1323
|
return t;
|
|
1305
1324
|
if (typeof t == "number" && (t = String(t)), typeof t != "string")
|
|
@@ -1307,12 +1326,12 @@ const Hs = ne, zs = Ee, { safeRe: Ne, t: Ce } = Se, Xs = (t, e) => {
|
|
|
1307
1326
|
e = e || {};
|
|
1308
1327
|
let r = null;
|
|
1309
1328
|
if (!e.rtl)
|
|
1310
|
-
r = t.match(e.includePrerelease ?
|
|
1329
|
+
r = t.match(e.includePrerelease ? xe[ke.COERCEFULL] : xe[ke.COERCE]);
|
|
1311
1330
|
else {
|
|
1312
|
-
const d = e.includePrerelease ?
|
|
1313
|
-
let
|
|
1314
|
-
for (; (
|
|
1315
|
-
(!r ||
|
|
1331
|
+
const d = e.includePrerelease ? xe[ke.COERCERTLFULL] : xe[ke.COERCERTL];
|
|
1332
|
+
let b;
|
|
1333
|
+
for (; (b = d.exec(t)) && (!r || r.index + r[0].length !== t.length); )
|
|
1334
|
+
(!r || b.index + b[0].length !== r.index + r[0].length) && (r = b), d.lastIndex = b.index + b[1].length + b[2].length;
|
|
1316
1335
|
d.lastIndex = -1;
|
|
1317
1336
|
}
|
|
1318
1337
|
if (r === null)
|
|
@@ -1344,10 +1363,10 @@ class Ws {
|
|
|
1344
1363
|
return this;
|
|
1345
1364
|
}
|
|
1346
1365
|
}
|
|
1347
|
-
var Js = Ws,
|
|
1366
|
+
var Js = Ws, et, Ut;
|
|
1348
1367
|
function le() {
|
|
1349
1368
|
if (Ut)
|
|
1350
|
-
return
|
|
1369
|
+
return et;
|
|
1351
1370
|
Ut = 1;
|
|
1352
1371
|
const t = /\s+/g;
|
|
1353
1372
|
class e {
|
|
@@ -1356,16 +1375,16 @@ function le() {
|
|
|
1356
1375
|
return p.loose === !!E.loose && p.includePrerelease === !!E.includePrerelease ? p : new e(p.raw, E);
|
|
1357
1376
|
if (p instanceof o)
|
|
1358
1377
|
return this.raw = p.value, this.set = [[p]], this.formatted = void 0, this;
|
|
1359
|
-
if (this.options = E, this.loose = !!E.loose, this.includePrerelease = !!E.includePrerelease, this.raw = p.trim().replace(t, " "), this.set = this.raw.split("||").map((
|
|
1378
|
+
if (this.options = E, this.loose = !!E.loose, this.includePrerelease = !!E.includePrerelease, this.raw = p.trim().replace(t, " "), this.set = this.raw.split("||").map((I) => this.parseRange(I.trim())).filter((I) => I.length), !this.set.length)
|
|
1360
1379
|
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
1361
1380
|
if (this.set.length > 1) {
|
|
1362
|
-
const
|
|
1363
|
-
if (this.set = this.set.filter((
|
|
1364
|
-
this.set = [
|
|
1381
|
+
const I = this.set[0];
|
|
1382
|
+
if (this.set = this.set.filter((N) => !v(N[0])), this.set.length === 0)
|
|
1383
|
+
this.set = [I];
|
|
1365
1384
|
else if (this.set.length > 1) {
|
|
1366
|
-
for (const
|
|
1367
|
-
if (
|
|
1368
|
-
this.set = [
|
|
1385
|
+
for (const N of this.set)
|
|
1386
|
+
if (N.length === 1 && y(N[0])) {
|
|
1387
|
+
this.set = [N];
|
|
1369
1388
|
break;
|
|
1370
1389
|
}
|
|
1371
1390
|
}
|
|
@@ -1378,8 +1397,8 @@ function le() {
|
|
|
1378
1397
|
for (let p = 0; p < this.set.length; p++) {
|
|
1379
1398
|
p > 0 && (this.formatted += "||");
|
|
1380
1399
|
const E = this.set[p];
|
|
1381
|
-
for (let
|
|
1382
|
-
|
|
1400
|
+
for (let I = 0; I < E.length; I++)
|
|
1401
|
+
I > 0 && (this.formatted += " "), this.formatted += E[I].toString().trim();
|
|
1383
1402
|
}
|
|
1384
1403
|
}
|
|
1385
1404
|
return this.formatted;
|
|
@@ -1391,27 +1410,27 @@ function le() {
|
|
|
1391
1410
|
return this.range;
|
|
1392
1411
|
}
|
|
1393
1412
|
parseRange(p) {
|
|
1394
|
-
const
|
|
1395
|
-
if (
|
|
1396
|
-
return
|
|
1397
|
-
const P = this.options.loose,
|
|
1398
|
-
p = p.replace(
|
|
1413
|
+
const I = ((this.options.includePrerelease && c) | (this.options.loose && x)) + ":" + p, N = n.get(I);
|
|
1414
|
+
if (N)
|
|
1415
|
+
return N;
|
|
1416
|
+
const P = this.options.loose, C = P ? d[b.HYPHENRANGELOOSE] : d[b.HYPHENRANGE];
|
|
1417
|
+
p = p.replace(C, R(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(d[b.COMPARATORTRIM], l), i("comparator trim", p), p = p.replace(d[b.TILDETRIM], g), i("tilde trim", p), p = p.replace(d[b.CARETTRIM], O), i("caret trim", p);
|
|
1399
1418
|
let w = p.split(" ").map((H) => V(H, this.options)).join(" ").split(/\s+/).map((H) => h(H, this.options));
|
|
1400
|
-
P && (w = w.filter((H) => (i("loose invalid filter", H, this.options), !!H.match(d[
|
|
1401
|
-
const
|
|
1419
|
+
P && (w = w.filter((H) => (i("loose invalid filter", H, this.options), !!H.match(d[b.COMPARATORLOOSE])))), i("range list", w);
|
|
1420
|
+
const T = /* @__PURE__ */ new Map(), U = w.map((H) => new o(H, this.options));
|
|
1402
1421
|
for (const H of U) {
|
|
1403
|
-
if (
|
|
1422
|
+
if (v(H))
|
|
1404
1423
|
return [H];
|
|
1405
|
-
|
|
1424
|
+
T.set(H.value, H);
|
|
1406
1425
|
}
|
|
1407
|
-
|
|
1408
|
-
const X = [...
|
|
1409
|
-
return n.set(
|
|
1426
|
+
T.size > 1 && T.has("") && T.delete("");
|
|
1427
|
+
const X = [...T.values()];
|
|
1428
|
+
return n.set(I, X), X;
|
|
1410
1429
|
}
|
|
1411
1430
|
intersects(p, E) {
|
|
1412
1431
|
if (!(p instanceof e))
|
|
1413
1432
|
throw new TypeError("a Range is required");
|
|
1414
|
-
return this.set.some((
|
|
1433
|
+
return this.set.some((I) => k(I, E) && p.set.some((N) => k(N, E) && I.every((P) => N.every((C) => P.intersects(C, E)))));
|
|
1415
1434
|
}
|
|
1416
1435
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
1417
1436
|
test(p) {
|
|
@@ -1429,107 +1448,107 @@ function le() {
|
|
|
1429
1448
|
return !1;
|
|
1430
1449
|
}
|
|
1431
1450
|
}
|
|
1432
|
-
|
|
1433
|
-
const r = Js, n = new r(), s =
|
|
1451
|
+
et = e;
|
|
1452
|
+
const r = Js, n = new r(), s = gt, o = He(), i = Ke, f = ne, {
|
|
1434
1453
|
safeRe: d,
|
|
1435
|
-
t:
|
|
1436
|
-
comparatorTrimReplace:
|
|
1454
|
+
t: b,
|
|
1455
|
+
comparatorTrimReplace: l,
|
|
1437
1456
|
tildeTrimReplace: g,
|
|
1438
|
-
caretTrimReplace:
|
|
1439
|
-
} = Se, { FLAG_INCLUDE_PRERELEASE: c, FLAG_LOOSE:
|
|
1457
|
+
caretTrimReplace: O
|
|
1458
|
+
} = Se, { FLAG_INCLUDE_PRERELEASE: c, FLAG_LOOSE: x } = Be, v = (m) => m.value === "<0.0.0-0", y = (m) => m.value === "", k = (m, p) => {
|
|
1440
1459
|
let E = !0;
|
|
1441
|
-
const
|
|
1442
|
-
let
|
|
1443
|
-
for (; E &&
|
|
1444
|
-
E =
|
|
1460
|
+
const I = m.slice();
|
|
1461
|
+
let N = I.pop();
|
|
1462
|
+
for (; E && I.length; )
|
|
1463
|
+
E = I.every((P) => N.intersects(P, p)), N = I.pop();
|
|
1445
1464
|
return E;
|
|
1446
|
-
}, V = (m, p) => (i("comp", m, p), m = Z(m, p), i("caret", m), m =
|
|
1447
|
-
const E = p.loose ? d[
|
|
1448
|
-
return m.replace(E, (
|
|
1449
|
-
i("tilde", m,
|
|
1450
|
-
let
|
|
1451
|
-
return
|
|
1465
|
+
}, V = (m, p) => (i("comp", m, p), m = Z(m, p), i("caret", m), m = F(m, p), i("tildes", m), m = W(m, p), i("xrange", m), m = u(m, p), i("stars", m), m), A = (m) => !m || m.toLowerCase() === "x" || m === "*", F = (m, p) => m.trim().split(/\s+/).map((E) => J(E, p)).join(" "), J = (m, p) => {
|
|
1466
|
+
const E = p.loose ? d[b.TILDELOOSE] : d[b.TILDE];
|
|
1467
|
+
return m.replace(E, (I, N, P, C, w) => {
|
|
1468
|
+
i("tilde", m, I, N, P, C, w);
|
|
1469
|
+
let T;
|
|
1470
|
+
return A(N) ? T = "" : A(P) ? T = `>=${N}.0.0 <${+N + 1}.0.0-0` : A(C) ? T = `>=${N}.${P}.0 <${N}.${+P + 1}.0-0` : w ? (i("replaceTilde pr", w), T = `>=${N}.${P}.${C}-${w} <${N}.${+P + 1}.0-0`) : T = `>=${N}.${P}.${C} <${N}.${+P + 1}.0-0`, i("tilde return", T), T;
|
|
1452
1471
|
});
|
|
1453
1472
|
}, Z = (m, p) => m.trim().split(/\s+/).map((E) => D(E, p)).join(" "), D = (m, p) => {
|
|
1454
1473
|
i("caret", m, p);
|
|
1455
|
-
const E = p.loose ? d[
|
|
1456
|
-
return m.replace(E, (
|
|
1457
|
-
i("caret", m,
|
|
1474
|
+
const E = p.loose ? d[b.CARETLOOSE] : d[b.CARET], I = p.includePrerelease ? "-0" : "";
|
|
1475
|
+
return m.replace(E, (N, P, C, w, T) => {
|
|
1476
|
+
i("caret", m, N, P, C, w, T);
|
|
1458
1477
|
let U;
|
|
1459
|
-
return
|
|
1478
|
+
return A(P) ? U = "" : A(C) ? U = `>=${P}.0.0${I} <${+P + 1}.0.0-0` : A(w) ? P === "0" ? U = `>=${P}.${C}.0${I} <${P}.${+C + 1}.0-0` : U = `>=${P}.${C}.0${I} <${+P + 1}.0.0-0` : T ? (i("replaceCaret pr", T), P === "0" ? C === "0" ? U = `>=${P}.${C}.${w}-${T} <${P}.${C}.${+w + 1}-0` : U = `>=${P}.${C}.${w}-${T} <${P}.${+C + 1}.0-0` : U = `>=${P}.${C}.${w}-${T} <${+P + 1}.0.0-0`) : (i("no pr"), P === "0" ? C === "0" ? U = `>=${P}.${C}.${w}${I} <${P}.${C}.${+w + 1}-0` : U = `>=${P}.${C}.${w}${I} <${P}.${+C + 1}.0-0` : U = `>=${P}.${C}.${w} <${+P + 1}.0.0-0`), i("caret return", U), U;
|
|
1460
1479
|
});
|
|
1461
1480
|
}, W = (m, p) => (i("replaceXRanges", m, p), m.split(/\s+/).map((E) => a(E, p)).join(" ")), a = (m, p) => {
|
|
1462
1481
|
m = m.trim();
|
|
1463
|
-
const E = p.loose ? d[
|
|
1464
|
-
return m.replace(E, (
|
|
1465
|
-
i("xRange", m,
|
|
1466
|
-
const U =
|
|
1467
|
-
return
|
|
1482
|
+
const E = p.loose ? d[b.XRANGELOOSE] : d[b.XRANGE];
|
|
1483
|
+
return m.replace(E, (I, N, P, C, w, T) => {
|
|
1484
|
+
i("xRange", m, I, N, P, C, w, T);
|
|
1485
|
+
const U = A(P), X = U || A(C), H = X || A(w), M = H;
|
|
1486
|
+
return N === "=" && M && (N = ""), T = p.includePrerelease ? "-0" : "", U ? N === ">" || N === "<" ? I = "<0.0.0-0" : I = "*" : N && M ? (X && (C = 0), w = 0, N === ">" ? (N = ">=", X ? (P = +P + 1, C = 0, w = 0) : (C = +C + 1, w = 0)) : N === "<=" && (N = "<", X ? P = +P + 1 : C = +C + 1), N === "<" && (T = "-0"), I = `${N + P}.${C}.${w}${T}`) : X ? I = `>=${P}.0.0${T} <${+P + 1}.0.0-0` : H && (I = `>=${P}.${C}.0${T} <${P}.${+C + 1}.0-0`), i("xRange return", I), I;
|
|
1468
1487
|
});
|
|
1469
|
-
},
|
|
1470
|
-
for (let
|
|
1471
|
-
if (!m[
|
|
1488
|
+
}, u = (m, p) => (i("replaceStars", m, p), m.trim().replace(d[b.STAR], "")), h = (m, p) => (i("replaceGTE0", m, p), m.trim().replace(d[p.includePrerelease ? b.GTE0PRE : b.GTE0], "")), R = (m) => (p, E, I, N, P, C, w, T, U, X, H, M) => (A(I) ? E = "" : A(N) ? E = `>=${I}.0.0${m ? "-0" : ""}` : A(P) ? E = `>=${I}.${N}.0${m ? "-0" : ""}` : C ? E = `>=${E}` : E = `>=${E}${m ? "-0" : ""}`, A(U) ? T = "" : A(X) ? T = `<${+U + 1}.0.0-0` : A(H) ? T = `<${U}.${+X + 1}.0-0` : M ? T = `<=${U}.${X}.${H}-${M}` : m ? T = `<${U}.${X}.${+H + 1}-0` : T = `<=${T}`, `${E} ${T}`.trim()), S = (m, p, E) => {
|
|
1489
|
+
for (let I = 0; I < m.length; I++)
|
|
1490
|
+
if (!m[I].test(p))
|
|
1472
1491
|
return !1;
|
|
1473
1492
|
if (p.prerelease.length && !E.includePrerelease) {
|
|
1474
|
-
for (let
|
|
1475
|
-
if (i(m[
|
|
1476
|
-
const
|
|
1477
|
-
if (
|
|
1493
|
+
for (let I = 0; I < m.length; I++)
|
|
1494
|
+
if (i(m[I].semver), m[I].semver !== o.ANY && m[I].semver.prerelease.length > 0) {
|
|
1495
|
+
const N = m[I].semver;
|
|
1496
|
+
if (N.major === p.major && N.minor === p.minor && N.patch === p.patch)
|
|
1478
1497
|
return !0;
|
|
1479
1498
|
}
|
|
1480
1499
|
return !1;
|
|
1481
1500
|
}
|
|
1482
1501
|
return !0;
|
|
1483
1502
|
};
|
|
1484
|
-
return
|
|
1503
|
+
return et;
|
|
1485
1504
|
}
|
|
1486
|
-
var
|
|
1487
|
-
function
|
|
1505
|
+
var tt, Dt;
|
|
1506
|
+
function He() {
|
|
1488
1507
|
if (Dt)
|
|
1489
|
-
return
|
|
1508
|
+
return tt;
|
|
1490
1509
|
Dt = 1;
|
|
1491
1510
|
const t = Symbol("SemVer ANY");
|
|
1492
1511
|
class e {
|
|
1493
1512
|
static get ANY() {
|
|
1494
1513
|
return t;
|
|
1495
1514
|
}
|
|
1496
|
-
constructor(
|
|
1497
|
-
if (g = r(g),
|
|
1498
|
-
if (
|
|
1499
|
-
return
|
|
1500
|
-
|
|
1515
|
+
constructor(l, g) {
|
|
1516
|
+
if (g = r(g), l instanceof e) {
|
|
1517
|
+
if (l.loose === !!g.loose)
|
|
1518
|
+
return l;
|
|
1519
|
+
l = l.value;
|
|
1501
1520
|
}
|
|
1502
|
-
|
|
1521
|
+
l = l.trim().split(/\s+/).join(" "), i("comparator", l, g), this.options = g, this.loose = !!g.loose, this.parse(l), this.semver === t ? this.value = "" : this.value = this.operator + this.semver.version, i("comp", this);
|
|
1503
1522
|
}
|
|
1504
|
-
parse(
|
|
1505
|
-
const g = this.options.loose ? n[s.COMPARATORLOOSE] : n[s.COMPARATOR],
|
|
1506
|
-
if (!
|
|
1507
|
-
throw new TypeError(`Invalid comparator: ${
|
|
1508
|
-
this.operator =
|
|
1523
|
+
parse(l) {
|
|
1524
|
+
const g = this.options.loose ? n[s.COMPARATORLOOSE] : n[s.COMPARATOR], O = l.match(g);
|
|
1525
|
+
if (!O)
|
|
1526
|
+
throw new TypeError(`Invalid comparator: ${l}`);
|
|
1527
|
+
this.operator = O[1] !== void 0 ? O[1] : "", this.operator === "=" && (this.operator = ""), O[2] ? this.semver = new f(O[2], this.options.loose) : this.semver = t;
|
|
1509
1528
|
}
|
|
1510
1529
|
toString() {
|
|
1511
1530
|
return this.value;
|
|
1512
1531
|
}
|
|
1513
|
-
test(
|
|
1514
|
-
if (i("Comparator.test",
|
|
1532
|
+
test(l) {
|
|
1533
|
+
if (i("Comparator.test", l, this.options.loose), this.semver === t || l === t)
|
|
1515
1534
|
return !0;
|
|
1516
|
-
if (typeof
|
|
1535
|
+
if (typeof l == "string")
|
|
1517
1536
|
try {
|
|
1518
|
-
|
|
1537
|
+
l = new f(l, this.options);
|
|
1519
1538
|
} catch {
|
|
1520
1539
|
return !1;
|
|
1521
1540
|
}
|
|
1522
|
-
return o(
|
|
1541
|
+
return o(l, this.operator, this.semver, this.options);
|
|
1523
1542
|
}
|
|
1524
|
-
intersects(
|
|
1525
|
-
if (!(
|
|
1543
|
+
intersects(l, g) {
|
|
1544
|
+
if (!(l instanceof e))
|
|
1526
1545
|
throw new TypeError("a Comparator is required");
|
|
1527
|
-
return this.operator === "" ? this.value === "" ? !0 : new d(
|
|
1546
|
+
return this.operator === "" ? this.value === "" ? !0 : new d(l.value, g).test(this.value) : l.operator === "" ? l.value === "" ? !0 : new d(this.value, g).test(l.semver) : (g = r(g), g.includePrerelease && (this.value === "<0.0.0-0" || l.value === "<0.0.0-0") || !g.includePrerelease && (this.value.startsWith("<0.0.0") || l.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && l.operator.startsWith(">") || this.operator.startsWith("<") && l.operator.startsWith("<") || this.semver.version === l.semver.version && this.operator.includes("=") && l.operator.includes("=") || o(this.semver, "<", l.semver, g) && this.operator.startsWith(">") && l.operator.startsWith("<") || o(this.semver, ">", l.semver, g) && this.operator.startsWith("<") && l.operator.startsWith(">")));
|
|
1528
1547
|
}
|
|
1529
1548
|
}
|
|
1530
|
-
|
|
1531
|
-
const r =
|
|
1532
|
-
return
|
|
1549
|
+
tt = e;
|
|
1550
|
+
const r = gt, { safeRe: n, t: s } = Se, o = _r, i = Ke, f = ne, d = le();
|
|
1551
|
+
return tt;
|
|
1533
1552
|
}
|
|
1534
1553
|
const Zs = le(), Qs = (t, e, r) => {
|
|
1535
1554
|
try {
|
|
@@ -1539,7 +1558,7 @@ const Zs = le(), Qs = (t, e, r) => {
|
|
|
1539
1558
|
}
|
|
1540
1559
|
return e.test(t);
|
|
1541
1560
|
};
|
|
1542
|
-
var
|
|
1561
|
+
var ze = Qs;
|
|
1543
1562
|
const ea = le(), ta = (t, e) => new ea(t, e).set.map((r) => r.map((n) => n.value).join(" ").trim().split(" "));
|
|
1544
1563
|
var ra = ta;
|
|
1545
1564
|
const na = ne, sa = le(), aa = (t, e, r) => {
|
|
@@ -1566,17 +1585,17 @@ const ia = ne, la = le(), ua = (t, e, r) => {
|
|
|
1566
1585
|
}), n;
|
|
1567
1586
|
};
|
|
1568
1587
|
var ca = ua;
|
|
1569
|
-
const
|
|
1588
|
+
const rt = ne, da = le(), Gt = qe, fa = (t, e) => {
|
|
1570
1589
|
t = new da(t, e);
|
|
1571
|
-
let r = new
|
|
1572
|
-
if (t.test(r) || (r = new
|
|
1590
|
+
let r = new rt("0.0.0");
|
|
1591
|
+
if (t.test(r) || (r = new rt("0.0.0-0"), t.test(r)))
|
|
1573
1592
|
return r;
|
|
1574
1593
|
r = null;
|
|
1575
1594
|
for (let n = 0; n < t.set.length; ++n) {
|
|
1576
1595
|
const s = t.set[n];
|
|
1577
1596
|
let o = null;
|
|
1578
1597
|
s.forEach((i) => {
|
|
1579
|
-
const f = new
|
|
1598
|
+
const f = new rt(i.semver.version);
|
|
1580
1599
|
switch (i.operator) {
|
|
1581
1600
|
case ">":
|
|
1582
1601
|
f.prerelease.length === 0 ? f.patch++ : f.prerelease.push(0), f.raw = f.format();
|
|
@@ -1603,7 +1622,7 @@ const pa = le(), ha = (t, e) => {
|
|
|
1603
1622
|
}
|
|
1604
1623
|
};
|
|
1605
1624
|
var va = ha;
|
|
1606
|
-
const ga = ne, Er =
|
|
1625
|
+
const ga = ne, Er = He(), { ANY: ba } = Er, ya = le(), $a = ze, Bt = qe, Kt = yt, _a = _t, Ea = $t, wa = (t, e, r, n) => {
|
|
1607
1626
|
t = new ga(t, n), e = new ya(e, n);
|
|
1608
1627
|
let s, o, i, f, d;
|
|
1609
1628
|
switch (r) {
|
|
@@ -1618,40 +1637,40 @@ const ga = ne, Er = Ke(), { ANY: ba } = Er, ya = le(), $a = qe, Bt = Be, Kt = gt
|
|
|
1618
1637
|
}
|
|
1619
1638
|
if ($a(t, e, n))
|
|
1620
1639
|
return !1;
|
|
1621
|
-
for (let
|
|
1622
|
-
const
|
|
1623
|
-
let g = null,
|
|
1624
|
-
if (
|
|
1625
|
-
c.semver === ba && (c = new Er(">=0.0.0")), g = g || c,
|
|
1626
|
-
}), g.operator === f || g.operator === d || (!
|
|
1640
|
+
for (let b = 0; b < e.set.length; ++b) {
|
|
1641
|
+
const l = e.set[b];
|
|
1642
|
+
let g = null, O = null;
|
|
1643
|
+
if (l.forEach((c) => {
|
|
1644
|
+
c.semver === ba && (c = new Er(">=0.0.0")), g = g || c, O = O || c, s(c.semver, g.semver, n) ? g = c : i(c.semver, O.semver, n) && (O = c);
|
|
1645
|
+
}), g.operator === f || g.operator === d || (!O.operator || O.operator === f) && o(t, O.semver))
|
|
1627
1646
|
return !1;
|
|
1628
|
-
if (
|
|
1647
|
+
if (O.operator === d && i(t, O.semver))
|
|
1629
1648
|
return !1;
|
|
1630
1649
|
}
|
|
1631
1650
|
return !0;
|
|
1632
1651
|
};
|
|
1633
|
-
var
|
|
1634
|
-
const Ra =
|
|
1652
|
+
var Et = wa;
|
|
1653
|
+
const Ra = Et, Ia = (t, e, r) => Ra(t, e, ">", r);
|
|
1635
1654
|
var Aa = Ia;
|
|
1636
|
-
const Oa =
|
|
1655
|
+
const Oa = Et, Sa = (t, e, r) => Oa(t, e, "<", r);
|
|
1637
1656
|
var Pa = Sa;
|
|
1638
1657
|
const qt = le(), Ta = (t, e, r) => (t = new qt(t, r), e = new qt(e, r), t.intersects(e, r));
|
|
1639
1658
|
var La = Ta;
|
|
1640
|
-
const Na =
|
|
1659
|
+
const Na = ze, Ca = ie;
|
|
1641
1660
|
var xa = (t, e, r) => {
|
|
1642
1661
|
const n = [];
|
|
1643
1662
|
let s = null, o = null;
|
|
1644
|
-
const i = t.sort((
|
|
1645
|
-
for (const
|
|
1646
|
-
Na(
|
|
1663
|
+
const i = t.sort((l, g) => Ca(l, g, r));
|
|
1664
|
+
for (const l of i)
|
|
1665
|
+
Na(l, e, r) ? (o = l, s || (s = l)) : (o && n.push([s, o]), o = null, s = null);
|
|
1647
1666
|
s && n.push([s, null]);
|
|
1648
1667
|
const f = [];
|
|
1649
|
-
for (const [
|
|
1650
|
-
|
|
1651
|
-
const d = f.join(" || "),
|
|
1652
|
-
return d.length <
|
|
1668
|
+
for (const [l, g] of n)
|
|
1669
|
+
l === g ? f.push(l) : !g && l === i[0] ? f.push("*") : g ? l === i[0] ? f.push(`<=${g}`) : f.push(`${l} - ${g}`) : f.push(`>=${l}`);
|
|
1670
|
+
const d = f.join(" || "), b = typeof e.raw == "string" ? e.raw : String(e);
|
|
1671
|
+
return d.length < b.length ? d : e;
|
|
1653
1672
|
};
|
|
1654
|
-
const Ht = le(),
|
|
1673
|
+
const Ht = le(), wt = He(), { ANY: nt } = wt, Ie = ze, Rt = ie, ka = (t, e, r = {}) => {
|
|
1655
1674
|
if (t === e)
|
|
1656
1675
|
return !0;
|
|
1657
1676
|
t = new Ht(t, r), e = new Ht(e, r);
|
|
@@ -1667,15 +1686,15 @@ const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r =
|
|
|
1667
1686
|
return !1;
|
|
1668
1687
|
}
|
|
1669
1688
|
return !0;
|
|
1670
|
-
}, Va = [new
|
|
1689
|
+
}, Va = [new wt(">=0.0.0-0")], zt = [new wt(">=0.0.0")], Fa = (t, e, r) => {
|
|
1671
1690
|
if (t === e)
|
|
1672
1691
|
return !0;
|
|
1673
|
-
if (t.length === 1 && t[0].semver ===
|
|
1674
|
-
if (e.length === 1 && e[0].semver ===
|
|
1692
|
+
if (t.length === 1 && t[0].semver === nt) {
|
|
1693
|
+
if (e.length === 1 && e[0].semver === nt)
|
|
1675
1694
|
return !0;
|
|
1676
1695
|
r.includePrerelease ? t = Va : t = zt;
|
|
1677
1696
|
}
|
|
1678
|
-
if (e.length === 1 && e[0].semver ===
|
|
1697
|
+
if (e.length === 1 && e[0].semver === nt) {
|
|
1679
1698
|
if (r.includePrerelease)
|
|
1680
1699
|
return !0;
|
|
1681
1700
|
e = zt;
|
|
@@ -1688,7 +1707,7 @@ const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r =
|
|
|
1688
1707
|
return null;
|
|
1689
1708
|
let i;
|
|
1690
1709
|
if (s && o) {
|
|
1691
|
-
if (i =
|
|
1710
|
+
if (i = Rt(s.semver, o.semver, r), i > 0)
|
|
1692
1711
|
return null;
|
|
1693
1712
|
if (i === 0 && (s.operator !== ">=" || o.operator !== "<="))
|
|
1694
1713
|
return null;
|
|
@@ -1696,16 +1715,16 @@ const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r =
|
|
|
1696
1715
|
for (const c of n) {
|
|
1697
1716
|
if (s && !Ie(c, String(s), r) || o && !Ie(c, String(o), r))
|
|
1698
1717
|
return null;
|
|
1699
|
-
for (const
|
|
1700
|
-
if (!Ie(c, String(
|
|
1718
|
+
for (const x of e)
|
|
1719
|
+
if (!Ie(c, String(x), r))
|
|
1701
1720
|
return !1;
|
|
1702
1721
|
return !0;
|
|
1703
1722
|
}
|
|
1704
|
-
let f, d,
|
|
1723
|
+
let f, d, b, l, g = o && !r.includePrerelease && o.semver.prerelease.length ? o.semver : !1, O = s && !r.includePrerelease && s.semver.prerelease.length ? s.semver : !1;
|
|
1705
1724
|
g && g.prerelease.length === 1 && o.operator === "<" && g.prerelease[0] === 0 && (g = !1);
|
|
1706
1725
|
for (const c of e) {
|
|
1707
|
-
if (
|
|
1708
|
-
if (
|
|
1726
|
+
if (l = l || c.operator === ">" || c.operator === ">=", b = b || c.operator === "<" || c.operator === "<=", s) {
|
|
1727
|
+
if (O && c.semver.prerelease && c.semver.prerelease.length && c.semver.major === O.major && c.semver.minor === O.minor && c.semver.patch === O.patch && (O = !1), c.operator === ">" || c.operator === ">=") {
|
|
1709
1728
|
if (f = Xt(s, c, r), f === c && f !== s)
|
|
1710
1729
|
return !1;
|
|
1711
1730
|
} else if (s.operator === ">=" && !Ie(s.semver, String(c), r))
|
|
@@ -1721,20 +1740,20 @@ const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r =
|
|
|
1721
1740
|
if (!c.operator && (o || s) && i !== 0)
|
|
1722
1741
|
return !1;
|
|
1723
1742
|
}
|
|
1724
|
-
return !(s &&
|
|
1743
|
+
return !(s && b && !o && i !== 0 || o && l && !s && i !== 0 || O || g);
|
|
1725
1744
|
}, Xt = (t, e, r) => {
|
|
1726
1745
|
if (!t)
|
|
1727
1746
|
return e;
|
|
1728
|
-
const n =
|
|
1747
|
+
const n = Rt(t.semver, e.semver, r);
|
|
1729
1748
|
return n > 0 ? t : n < 0 || e.operator === ">" && t.operator === ">=" ? e : t;
|
|
1730
1749
|
}, Yt = (t, e, r) => {
|
|
1731
1750
|
if (!t)
|
|
1732
1751
|
return e;
|
|
1733
|
-
const n =
|
|
1752
|
+
const n = Rt(t.semver, e.semver, r);
|
|
1734
1753
|
return n < 0 ? t : n > 0 || e.operator === "<" && t.operator === "<=" ? e : t;
|
|
1735
1754
|
};
|
|
1736
1755
|
var ja = ka;
|
|
1737
|
-
const
|
|
1756
|
+
const st = Se, Wt = Be, Ma = ne, Jt = br, Ua = Ee, Da = zn, Ga = Wn, Ba = Zn, Ka = es, qa = ns, Ha = os, za = us, Xa = fs, Ya = ie, Wa = vs, Ja = ys, Za = bt, Qa = ws, eo = As, to = qe, ro = yt, no = yr, so = $r, ao = $t, oo = _t, io = _r, lo = Ys, uo = He(), co = le(), fo = ze, mo = ra, po = oa, ho = ca, vo = ma, go = va, bo = Et, yo = Aa, $o = Pa, _o = La, Eo = xa, wo = ja;
|
|
1738
1757
|
var Ro = {
|
|
1739
1758
|
parse: Ua,
|
|
1740
1759
|
valid: Da,
|
|
@@ -1774,16 +1793,16 @@ var Ro = {
|
|
|
1774
1793
|
simplifyRange: Eo,
|
|
1775
1794
|
subset: wo,
|
|
1776
1795
|
SemVer: Ma,
|
|
1777
|
-
re:
|
|
1778
|
-
src:
|
|
1779
|
-
tokens:
|
|
1796
|
+
re: st.re,
|
|
1797
|
+
src: st.src,
|
|
1798
|
+
tokens: st.t,
|
|
1780
1799
|
SEMVER_SPEC_VERSION: Wt.SEMVER_SPEC_VERSION,
|
|
1781
1800
|
RELEASE_TYPES: Wt.RELEASE_TYPES,
|
|
1782
1801
|
compareIdentifiers: Jt.compareIdentifiers,
|
|
1783
1802
|
rcompareIdentifiers: Jt.rcompareIdentifiers
|
|
1784
1803
|
};
|
|
1785
1804
|
const Zt = /* @__PURE__ */ dr(Ro);
|
|
1786
|
-
var
|
|
1805
|
+
var lt = /* @__PURE__ */ ((t) => (t[t.menuV3 = 0] = "menuV3", t[t.applyEffectOnOrder = 1] = "applyEffectOnOrder", t[t.nestedAddon = 2] = "nestedAddon", t[t.feedmeDelivery = 3] = "feedmeDelivery", t[t.taxAndServiceChargeV4 = 4] = "taxAndServiceChargeV4", t[t.itemCombo = 5] = "itemCombo", t[t.itemTakeaway = 6] = "itemTakeaway", t[t.transferInventory = 7] = "transferInventory", t[t.qrEPayment = 8] = "qrEPayment", t[t.deliveryIntegration = 9] = "deliveryIntegration", t[t.rmsPayment = 10] = "rmsPayment", t[t.queue = 11] = "queue", t[t.paymentVoucher = 12] = "paymentVoucher", t))(lt || {});
|
|
1787
1806
|
const wr = {
|
|
1788
1807
|
0: "3.0.0-alpha",
|
|
1789
1808
|
1: "3.5.0-alpha",
|
|
@@ -1855,7 +1874,7 @@ function Oe(t) {
|
|
|
1855
1874
|
};
|
|
1856
1875
|
}
|
|
1857
1876
|
function Oo({ posVersion: t, payoutAccount: e }) {
|
|
1858
|
-
return !!t && Io(
|
|
1877
|
+
return !!t && Io(lt.qrEPayment, t) ? !e || !e.enable ? "Payout account is required" : e.status !== vt.F_PAYOUT_ACCOUNT_STATUS.enum.APPROVED ? "Payout account under review" : !0 : `For POS ${Ao(lt.qrEPayment)} or above`;
|
|
1859
1878
|
}
|
|
1860
1879
|
function Rr(t) {
|
|
1861
1880
|
return {
|
|
@@ -1868,42 +1887,42 @@ function Rr(t) {
|
|
|
1868
1887
|
allowEPayment: Oo(t)
|
|
1869
1888
|
};
|
|
1870
1889
|
}
|
|
1871
|
-
function
|
|
1872
|
-
return Rr(
|
|
1890
|
+
function at(t) {
|
|
1891
|
+
return Rr(Ue(t));
|
|
1873
1892
|
}
|
|
1874
1893
|
async function tr(t) {
|
|
1875
|
-
const e =
|
|
1894
|
+
const e = Ue(t), r = [];
|
|
1876
1895
|
for (const n of e)
|
|
1877
1896
|
r.push(await Rr(n));
|
|
1878
1897
|
return r;
|
|
1879
1898
|
}
|
|
1880
1899
|
const Ae = {
|
|
1881
1900
|
async readRestaurant(t) {
|
|
1882
|
-
return await
|
|
1901
|
+
return await at(await Pe().get(`/restaurants/${t}`));
|
|
1883
1902
|
},
|
|
1884
1903
|
async readRestaurants() {
|
|
1885
|
-
return await tr(await
|
|
1904
|
+
return await tr(await We().get("/restaurants"));
|
|
1886
1905
|
},
|
|
1887
1906
|
async readRestaurantsByBusiness() {
|
|
1888
|
-
return await tr(await
|
|
1907
|
+
return await tr(await We().get("/restaurant-list"));
|
|
1889
1908
|
},
|
|
1890
1909
|
async createRestaurant(t) {
|
|
1891
|
-
return await
|
|
1910
|
+
return await at(await We().post("/restaurants", t));
|
|
1892
1911
|
},
|
|
1893
1912
|
async updateRestaurantProfile(t, e) {
|
|
1894
|
-
return await
|
|
1913
|
+
return await at(
|
|
1895
1914
|
await Pe().put(`/restaurants/${t}/profile`, e)
|
|
1896
1915
|
);
|
|
1897
1916
|
},
|
|
1898
1917
|
async updateRestaurantAttributes(t, e) {
|
|
1899
|
-
return
|
|
1918
|
+
return Ue(
|
|
1900
1919
|
await Pe().put(`/restaurants/${t}/attributes`, {
|
|
1901
1920
|
attributes: e
|
|
1902
1921
|
})
|
|
1903
1922
|
);
|
|
1904
1923
|
},
|
|
1905
1924
|
async createRestaurantFeature(t) {
|
|
1906
|
-
return
|
|
1925
|
+
return Ue(await Pe().post(`/license/restaurant/${t}`));
|
|
1907
1926
|
}
|
|
1908
1927
|
}, So = /* @__PURE__ */ re({
|
|
1909
1928
|
__name: "GoogleMap",
|
|
@@ -1926,7 +1945,7 @@ const Ae = {
|
|
|
1926
1945
|
},
|
|
1927
1946
|
center: {
|
|
1928
1947
|
type: Object,
|
|
1929
|
-
default:
|
|
1948
|
+
default: De.jb
|
|
1930
1949
|
}
|
|
1931
1950
|
},
|
|
1932
1951
|
emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
|
|
@@ -1934,8 +1953,8 @@ const Ae = {
|
|
|
1934
1953
|
const n = t, s = r;
|
|
1935
1954
|
e({
|
|
1936
1955
|
setCenter: (a) => {
|
|
1937
|
-
var
|
|
1938
|
-
(
|
|
1956
|
+
var u;
|
|
1957
|
+
(u = i.value) == null || u.setCenter(a);
|
|
1939
1958
|
}
|
|
1940
1959
|
});
|
|
1941
1960
|
const o = ae(), i = ae(null), f = [];
|
|
@@ -1945,18 +1964,18 @@ const Ae = {
|
|
|
1945
1964
|
lng: a.latLng.lng()
|
|
1946
1965
|
};
|
|
1947
1966
|
}
|
|
1948
|
-
function
|
|
1949
|
-
const R = be().maps.event.addListener(a,
|
|
1967
|
+
function b(a, u, h) {
|
|
1968
|
+
const R = be().maps.event.addListener(a, u, h);
|
|
1950
1969
|
f.push(R);
|
|
1951
1970
|
}
|
|
1952
|
-
const
|
|
1953
|
-
function g(a,
|
|
1954
|
-
|
|
1971
|
+
const l = ae([]);
|
|
1972
|
+
function g(a, u, h) {
|
|
1973
|
+
b(a, u, h);
|
|
1955
1974
|
}
|
|
1956
|
-
function
|
|
1957
|
-
c(null),
|
|
1975
|
+
function O(a) {
|
|
1976
|
+
c(null), l.value = a.map((u, h) => {
|
|
1958
1977
|
const R = be(), S = new R.maps.Marker({
|
|
1959
|
-
position:
|
|
1978
|
+
position: u,
|
|
1960
1979
|
draggable: !0
|
|
1961
1980
|
});
|
|
1962
1981
|
return g(S, "dragend", (m) => {
|
|
@@ -1965,51 +1984,51 @@ const Ae = {
|
|
|
1965
1984
|
}), c(i.value);
|
|
1966
1985
|
}
|
|
1967
1986
|
function c(a) {
|
|
1968
|
-
|
|
1987
|
+
l.value.map((u) => St(u).setMap(a));
|
|
1969
1988
|
}
|
|
1970
|
-
const
|
|
1971
|
-
function
|
|
1972
|
-
|
|
1989
|
+
const x = ae([]);
|
|
1990
|
+
function v(a, u, h) {
|
|
1991
|
+
b(a, u, h);
|
|
1973
1992
|
}
|
|
1974
|
-
function y(a,
|
|
1975
|
-
|
|
1993
|
+
function y(a, u, h) {
|
|
1994
|
+
b(a, u, h);
|
|
1976
1995
|
}
|
|
1977
1996
|
function k(a) {
|
|
1978
|
-
return
|
|
1997
|
+
return x.value[a].getPath().getArray().map(({ lat: h, lng: R }) => ({
|
|
1979
1998
|
lat: h(),
|
|
1980
1999
|
lng: R()
|
|
1981
2000
|
}));
|
|
1982
2001
|
}
|
|
1983
2002
|
function V(a) {
|
|
1984
|
-
const
|
|
1985
|
-
s("polygon-change", { index: a, path:
|
|
2003
|
+
const u = k(a);
|
|
2004
|
+
s("polygon-change", { index: a, path: u });
|
|
1986
2005
|
}
|
|
1987
|
-
function
|
|
1988
|
-
const R = k(a).filter((S, m) => m !==
|
|
2006
|
+
function A(a, u) {
|
|
2007
|
+
const R = k(a).filter((S, m) => m !== u);
|
|
1989
2008
|
s("polygon-change", { index: a, path: R });
|
|
1990
2009
|
}
|
|
1991
|
-
function
|
|
1992
|
-
|
|
2010
|
+
function F(a, u) {
|
|
2011
|
+
u.vertex !== void 0 ? A(a, u.vertex) : s("polygon-right-click", a);
|
|
1993
2012
|
}
|
|
1994
2013
|
function J(a) {
|
|
1995
|
-
Z(null),
|
|
2014
|
+
Z(null), x.value = a.map((u, h) => {
|
|
1996
2015
|
const R = be(), S = new R.maps.Polygon({
|
|
1997
|
-
paths:
|
|
1998
|
-
strokeColor:
|
|
1999
|
-
fillColor:
|
|
2016
|
+
paths: u.paths,
|
|
2017
|
+
strokeColor: u.strokeColor,
|
|
2018
|
+
fillColor: u.fillColor,
|
|
2000
2019
|
fillOpacity: 0.5,
|
|
2001
2020
|
editable: n.editable
|
|
2002
2021
|
});
|
|
2003
|
-
return
|
|
2022
|
+
return v(S, "contextmenu", (m) => F(h, m)), S.getPaths().forEach((m) => {
|
|
2004
2023
|
y(m, "insert_at", () => V(h)), y(m, "set_at", () => V(h));
|
|
2005
2024
|
}), S;
|
|
2006
2025
|
}), Z(i.value);
|
|
2007
2026
|
}
|
|
2008
2027
|
function Z(a) {
|
|
2009
|
-
|
|
2028
|
+
x.value.map((u) => St(u).setMap(a));
|
|
2010
2029
|
}
|
|
2011
|
-
function D(a,
|
|
2012
|
-
|
|
2030
|
+
function D(a, u, h) {
|
|
2031
|
+
b(a, u, h);
|
|
2013
2032
|
}
|
|
2014
2033
|
function W() {
|
|
2015
2034
|
const a = be().maps.Map;
|
|
@@ -2020,13 +2039,13 @@ const Ae = {
|
|
|
2020
2039
|
streetViewControl: !1,
|
|
2021
2040
|
draggable: !0,
|
|
2022
2041
|
scrollwheel: !0
|
|
2023
|
-
}), D(i.value, "click", (
|
|
2042
|
+
}), D(i.value, "click", (u) => s("map-click", d(u)));
|
|
2024
2043
|
}
|
|
2025
|
-
return
|
|
2026
|
-
!o.value || !be() || (W(),
|
|
2044
|
+
return Ot(() => n.markers, O, { deep: !0 }), Ot(() => n.polygons, J, { deep: !0 }), Cr(() => {
|
|
2045
|
+
!o.value || !be() || (W(), O(n.markers), J(n.polygons));
|
|
2027
2046
|
}), xr(() => {
|
|
2028
2047
|
f.forEach((a) => a.remove());
|
|
2029
|
-
}), (a,
|
|
2048
|
+
}), (a, u) => (j(), B("div", {
|
|
2030
2049
|
ref_key: "mapRef",
|
|
2031
2050
|
ref: o,
|
|
2032
2051
|
class: "map app-map"
|
|
@@ -2045,13 +2064,13 @@ const Ae = {
|
|
|
2045
2064
|
}
|
|
2046
2065
|
},
|
|
2047
2066
|
setup(t) {
|
|
2048
|
-
const { t: e } = ve(), r = t, { emitData: n } = Ur(), s =
|
|
2049
|
-
$e(r.coordinate ? r.coordinate :
|
|
2067
|
+
const { t: e } = ve(), r = t, { emitData: n } = Ur(), s = ft(
|
|
2068
|
+
$e(r.coordinate ? r.coordinate : De.jb)
|
|
2050
2069
|
);
|
|
2051
2070
|
function o({ position: i }) {
|
|
2052
2071
|
s.lat = i.lat, s.lng = i.lng, n(s);
|
|
2053
2072
|
}
|
|
2054
|
-
return n(s), (i, f) => (
|
|
2073
|
+
return n(s), (i, f) => (j(), B("div", Po, [
|
|
2055
2074
|
$("div", null, [
|
|
2056
2075
|
$("div", To, [
|
|
2057
2076
|
$("div", null, G(_(e)("settings.coordinate_dialog.address")) + ":", 1),
|
|
@@ -2066,7 +2085,7 @@ const Ae = {
|
|
|
2066
2085
|
$("div", null, G(s.lng), 1)
|
|
2067
2086
|
])
|
|
2068
2087
|
]),
|
|
2069
|
-
|
|
2088
|
+
L(So, {
|
|
2070
2089
|
class: "w-full",
|
|
2071
2090
|
style: { height: "300px" },
|
|
2072
2091
|
editable: "",
|
|
@@ -2095,19 +2114,19 @@ const Ae = {
|
|
|
2095
2114
|
},
|
|
2096
2115
|
emits: ["update:model-value"],
|
|
2097
2116
|
setup(t, { emit: e }) {
|
|
2098
|
-
const { t: r } = ve(), n = t, s = e, o =
|
|
2117
|
+
const { t: r } = ve(), n = t, s = e, o = pt(), i = Y(() => {
|
|
2099
2118
|
const g = n.modelValue || [];
|
|
2100
2119
|
return g.length < 2 ? null : Jr(g);
|
|
2101
2120
|
}), f = Y(() => i.value ? `${i.value.lat}, ${i.value.lng}` : "");
|
|
2102
2121
|
async function d() {
|
|
2103
|
-
const g = be().maps.Geocoder,
|
|
2122
|
+
const g = be().maps.Geocoder, O = new g();
|
|
2104
2123
|
let c = i.value;
|
|
2105
|
-
c || await new Promise((
|
|
2106
|
-
n.address.formatted ?
|
|
2124
|
+
c || await new Promise((x) => {
|
|
2125
|
+
n.address.formatted ? O.geocode({ address: n.address.formatted }, (v) => {
|
|
2107
2126
|
var k;
|
|
2108
|
-
const y = (k =
|
|
2109
|
-
c = y ? { lng: y.location.lng(), lat: y.location.lat() } :
|
|
2110
|
-
}) : (c =
|
|
2127
|
+
const y = (k = v == null ? void 0 : v[0]) == null ? void 0 : k.geometry;
|
|
2128
|
+
c = y ? { lng: y.location.lng(), lat: y.location.lat() } : De.jb, x(!0);
|
|
2129
|
+
}) : (c = De.jb, x(!0));
|
|
2111
2130
|
}), o.open({
|
|
2112
2131
|
contentComponent: Co,
|
|
2113
2132
|
contentComponentProps: {
|
|
@@ -2125,26 +2144,26 @@ const Ae = {
|
|
|
2125
2144
|
variant: "destructive",
|
|
2126
2145
|
close: !0
|
|
2127
2146
|
}
|
|
2128
|
-
}).onPrimary(async (
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2147
|
+
}).onPrimary(async (x) => {
|
|
2148
|
+
const v = x ? Zr(x) : [];
|
|
2149
|
+
l(), s("update:model-value", v);
|
|
2131
2150
|
}).onSecondary(() => {
|
|
2132
|
-
|
|
2151
|
+
l(), s("update:model-value", []);
|
|
2133
2152
|
});
|
|
2134
2153
|
}
|
|
2135
|
-
const
|
|
2136
|
-
function
|
|
2137
|
-
|
|
2154
|
+
const b = ae(!1);
|
|
2155
|
+
function l() {
|
|
2156
|
+
b.value = !1;
|
|
2138
2157
|
}
|
|
2139
|
-
return (g,
|
|
2140
|
-
const c = q("FmIcon"),
|
|
2141
|
-
return
|
|
2158
|
+
return (g, O) => {
|
|
2159
|
+
const c = q("FmIcon"), x = q("FmField"), v = q("FmFormGroup");
|
|
2160
|
+
return j(), te(v, {
|
|
2142
2161
|
modelValue: i.value,
|
|
2143
|
-
"onUpdate:modelValue":
|
|
2162
|
+
"onUpdate:modelValue": O[0] || (O[0] = (y) => i.value = y),
|
|
2144
2163
|
label: _(r)("settings.coordinate_input.title")
|
|
2145
2164
|
}, {
|
|
2146
2165
|
default: K(() => [
|
|
2147
|
-
|
|
2166
|
+
L(x, {
|
|
2148
2167
|
class: "cursor-pointer",
|
|
2149
2168
|
onClick: d
|
|
2150
2169
|
}, {
|
|
@@ -2152,7 +2171,7 @@ const Ae = {
|
|
|
2152
2171
|
de(g.$slots, "prepend")
|
|
2153
2172
|
]),
|
|
2154
2173
|
append: K(() => [
|
|
2155
|
-
|
|
2174
|
+
L(c, {
|
|
2156
2175
|
class: "text-fm-color-neutral-gray-400",
|
|
2157
2176
|
name: "location_on",
|
|
2158
2177
|
outline: "",
|
|
@@ -2190,8 +2209,8 @@ const Ae = {
|
|
|
2190
2209
|
},
|
|
2191
2210
|
emits: ["update:model-value"],
|
|
2192
2211
|
setup(t, { emit: e }) {
|
|
2193
|
-
const r = t, n = e, s =
|
|
2194
|
-
|
|
2212
|
+
const r = t, n = e, s = mt(), { t: o } = ve();
|
|
2213
|
+
ht().startOf("week");
|
|
2195
2214
|
const i = Y(
|
|
2196
2215
|
() => [
|
|
2197
2216
|
o("settings.operation_hours.mon"),
|
|
@@ -2213,33 +2232,33 @@ const Ae = {
|
|
|
2213
2232
|
enable: !1,
|
|
2214
2233
|
hours: []
|
|
2215
2234
|
}))
|
|
2216
|
-
), d = Y(() => Object.values(f.value).map((k) => k.hours)),
|
|
2217
|
-
function
|
|
2235
|
+
), d = Y(() => Object.values(f.value).map((k) => k.hours)), b = Y(() => f.value.reduce((k, V, A) => (V.hours.length > 0 && k.push(A), k), []));
|
|
2236
|
+
function l() {
|
|
2218
2237
|
return { start: "00:00", end: "23:59" };
|
|
2219
2238
|
}
|
|
2220
2239
|
function g(k) {
|
|
2221
|
-
const V =
|
|
2240
|
+
const V = b.value.find((F) => !k.includes(F));
|
|
2222
2241
|
if (V !== void 0) {
|
|
2223
|
-
y((
|
|
2242
|
+
y((F) => (F[V].enable = !1, F[V].hours = [], F));
|
|
2224
2243
|
return;
|
|
2225
2244
|
}
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2245
|
+
const A = k.find((F) => !b.value.includes(F));
|
|
2246
|
+
A !== void 0 && f.value[A].hours.length === 0 && y((F) => (F[A].enable = !0, F[A].hours = [l()], F));
|
|
2228
2247
|
}
|
|
2229
|
-
function
|
|
2230
|
-
y((V) => (V[k].hours.push(
|
|
2248
|
+
function O(k) {
|
|
2249
|
+
y((V) => (V[k].hours.push(l()), V));
|
|
2231
2250
|
}
|
|
2232
2251
|
function c(k, V) {
|
|
2233
|
-
d.value[k].length > 1 ? y((
|
|
2252
|
+
d.value[k].length > 1 ? y((A) => (A[k].hours.splice(V, 1), A)) : s.open({ title: o("settings.operation_hours.cannot_remove_last"), type: "error" });
|
|
2234
2253
|
}
|
|
2235
|
-
function
|
|
2236
|
-
|
|
2254
|
+
function x(k, V, A) {
|
|
2255
|
+
A && y((F) => (F[k].hours[V].start = A, F));
|
|
2237
2256
|
}
|
|
2238
|
-
function
|
|
2239
|
-
|
|
2257
|
+
function v(k, V, A) {
|
|
2258
|
+
A && y((F) => (F[k].hours[V].end = A, F));
|
|
2240
2259
|
}
|
|
2241
2260
|
function y(k) {
|
|
2242
|
-
const V = k($e(f.value)),
|
|
2261
|
+
const V = k($e(f.value)), A = {
|
|
2243
2262
|
0: V[0],
|
|
2244
2263
|
1: V[1],
|
|
2245
2264
|
2: V[2],
|
|
@@ -2248,18 +2267,18 @@ const Ae = {
|
|
|
2248
2267
|
5: V[5],
|
|
2249
2268
|
6: V[6]
|
|
2250
2269
|
};
|
|
2251
|
-
n("update:model-value",
|
|
2270
|
+
n("update:model-value", A);
|
|
2252
2271
|
}
|
|
2253
2272
|
return (k, V) => {
|
|
2254
|
-
const
|
|
2255
|
-
return
|
|
2256
|
-
(
|
|
2273
|
+
const A = q("FmCheckbox"), F = q("FmTimePicker"), J = q("FmButton"), Z = q("FmField");
|
|
2274
|
+
return j(), B("div", null, [
|
|
2275
|
+
(j(!0), B(oe, null, he(i.value, (D) => (j(), B("div", {
|
|
2257
2276
|
key: D.value,
|
|
2258
2277
|
class: "flex flex-col items-start"
|
|
2259
2278
|
}, [
|
|
2260
2279
|
$("div", ko, [
|
|
2261
|
-
|
|
2262
|
-
"model-value":
|
|
2280
|
+
L(A, {
|
|
2281
|
+
"model-value": b.value,
|
|
2263
2282
|
label: D.label,
|
|
2264
2283
|
value: D.value,
|
|
2265
2284
|
"onUpdate:modelValue": g
|
|
@@ -2267,35 +2286,35 @@ const Ae = {
|
|
|
2267
2286
|
]),
|
|
2268
2287
|
$("div", Vo, [
|
|
2269
2288
|
$("div", null, [
|
|
2270
|
-
|
|
2289
|
+
b.value.includes(D.value) ? (j(!0), B(oe, { key: 0 }, he(d.value[D.value], (W, a) => (j(), B("div", {
|
|
2271
2290
|
key: a,
|
|
2272
2291
|
class: "flex items-center gap-8"
|
|
2273
2292
|
}, [
|
|
2274
|
-
|
|
2293
|
+
L(F, {
|
|
2275
2294
|
"model-value": W.start,
|
|
2276
|
-
"onUpdate:modelValue": (
|
|
2295
|
+
"onUpdate:modelValue": (u) => x(D.value, a, u)
|
|
2277
2296
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2278
2297
|
$("span", {
|
|
2279
2298
|
class: ee([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
|
|
2280
2299
|
}, G(_(o)("settings.operation_hours.to")), 1),
|
|
2281
|
-
|
|
2300
|
+
L(F, {
|
|
2282
2301
|
"model-value": W.end,
|
|
2283
|
-
"onUpdate:modelValue": (
|
|
2302
|
+
"onUpdate:modelValue": (u) => v(D.value, a, u)
|
|
2284
2303
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2285
|
-
|
|
2304
|
+
L(J, {
|
|
2286
2305
|
icon: "close",
|
|
2287
2306
|
variant: "tertiary",
|
|
2288
|
-
onClick: (
|
|
2307
|
+
onClick: (u) => c(D.value, a)
|
|
2289
2308
|
}, null, 8, ["onClick"]),
|
|
2290
|
-
|
|
2309
|
+
L(J, {
|
|
2291
2310
|
class: ee(a === 0 ? "" : "invisible"),
|
|
2292
2311
|
icon: "add",
|
|
2293
2312
|
color: "primary",
|
|
2294
2313
|
variant: "secondary",
|
|
2295
|
-
onClick: (
|
|
2314
|
+
onClick: (u) => O(D.value)
|
|
2296
2315
|
}, null, 8, ["class", "onClick"])
|
|
2297
|
-
]))), 128)) : (
|
|
2298
|
-
|
|
2316
|
+
]))), 128)) : (j(), B("div", Fo, [
|
|
2317
|
+
L(Z, null, {
|
|
2299
2318
|
default: K(() => [
|
|
2300
2319
|
$("div", {
|
|
2301
2320
|
class: ee([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
@@ -2306,7 +2325,7 @@ const Ae = {
|
|
|
2306
2325
|
$("span", {
|
|
2307
2326
|
class: ee([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
|
|
2308
2327
|
}, G(_(o)("settings.operation_hours.to")), 1),
|
|
2309
|
-
|
|
2328
|
+
L(Z, null, {
|
|
2310
2329
|
default: K(() => [
|
|
2311
2330
|
$("div", {
|
|
2312
2331
|
class: ee([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
@@ -2340,64 +2359,64 @@ const Ae = {
|
|
|
2340
2359
|
function f(d) {
|
|
2341
2360
|
s("update:model-value", d(o.value));
|
|
2342
2361
|
}
|
|
2343
|
-
return (d,
|
|
2344
|
-
const
|
|
2345
|
-
return
|
|
2362
|
+
return (d, b) => {
|
|
2363
|
+
const l = q("FmTextField");
|
|
2364
|
+
return j(), B("div", Mo, [
|
|
2346
2365
|
$("div", Uo, [
|
|
2347
2366
|
$("div", Do, [
|
|
2348
|
-
|
|
2367
|
+
L(l, {
|
|
2349
2368
|
"model-value": o.value.line1,
|
|
2350
2369
|
label: _(r)("settings.address.line1"),
|
|
2351
2370
|
"label-mark": "required",
|
|
2352
2371
|
rules: [_(fe)],
|
|
2353
|
-
"onUpdate:modelValue":
|
|
2372
|
+
"onUpdate:modelValue": b[0] || (b[0] = (g) => f((O) => ({ ...O, line1: i(g) })))
|
|
2354
2373
|
}, null, 8, ["model-value", "label", "rules"])
|
|
2355
2374
|
]),
|
|
2356
2375
|
$("div", Go, [
|
|
2357
|
-
|
|
2376
|
+
L(l, {
|
|
2358
2377
|
"model-value": o.value.line2,
|
|
2359
2378
|
label: _(r)("settings.address.line2"),
|
|
2360
|
-
"onUpdate:modelValue":
|
|
2379
|
+
"onUpdate:modelValue": b[1] || (b[1] = (g) => f((O) => ({ ...O, line2: i(g) })))
|
|
2361
2380
|
}, null, 8, ["model-value", "label"])
|
|
2362
2381
|
])
|
|
2363
2382
|
]),
|
|
2364
2383
|
$("div", Bo, [
|
|
2365
2384
|
$("div", Ko, [
|
|
2366
|
-
|
|
2385
|
+
L(l, {
|
|
2367
2386
|
"model-value": o.value.city,
|
|
2368
2387
|
rules: [_(fe)],
|
|
2369
2388
|
label: _(r)("settings.address.city"),
|
|
2370
2389
|
"label-mark": "required",
|
|
2371
|
-
"onUpdate:modelValue":
|
|
2390
|
+
"onUpdate:modelValue": b[2] || (b[2] = (g) => f((O) => ({ ...O, city: i(g) })))
|
|
2372
2391
|
}, null, 8, ["model-value", "rules", "label"])
|
|
2373
2392
|
]),
|
|
2374
2393
|
$("div", qo, [
|
|
2375
|
-
|
|
2394
|
+
L(l, {
|
|
2376
2395
|
"model-value": o.value.postcode,
|
|
2377
2396
|
label: _(r)("settings.address.postal_code"),
|
|
2378
2397
|
"label-mark": "required",
|
|
2379
2398
|
rules: [_(fe)],
|
|
2380
|
-
"onUpdate:modelValue":
|
|
2399
|
+
"onUpdate:modelValue": b[3] || (b[3] = (g) => f((O) => ({ ...O, postcode: i(g) })))
|
|
2381
2400
|
}, null, 8, ["model-value", "label", "rules"])
|
|
2382
2401
|
])
|
|
2383
2402
|
]),
|
|
2384
2403
|
$("div", Ho, [
|
|
2385
2404
|
$("div", zo, [
|
|
2386
|
-
|
|
2405
|
+
L(l, {
|
|
2387
2406
|
"model-value": o.value.state,
|
|
2388
2407
|
label: _(r)("settings.address.state"),
|
|
2389
2408
|
"label-mark": "required",
|
|
2390
2409
|
rules: [_(fe)],
|
|
2391
|
-
"onUpdate:modelValue":
|
|
2410
|
+
"onUpdate:modelValue": b[4] || (b[4] = (g) => f((O) => ({ ...O, state: i(g) })))
|
|
2392
2411
|
}, null, 8, ["model-value", "label", "rules"])
|
|
2393
2412
|
]),
|
|
2394
2413
|
$("div", Xo, [
|
|
2395
|
-
|
|
2414
|
+
L(l, {
|
|
2396
2415
|
"model-value": o.value.country,
|
|
2397
2416
|
label: _(r)("settings.address.country"),
|
|
2398
2417
|
"label-mark": "required",
|
|
2399
2418
|
rules: [_(fe)],
|
|
2400
|
-
"onUpdate:modelValue":
|
|
2419
|
+
"onUpdate:modelValue": b[5] || (b[5] = (g) => f((O) => ({ ...O, country: i(g) })))
|
|
2401
2420
|
}, null, 8, ["model-value", "label", "rules"])
|
|
2402
2421
|
])
|
|
2403
2422
|
])
|
|
@@ -2410,12 +2429,12 @@ function rr(t) {
|
|
|
2410
2429
|
}
|
|
2411
2430
|
class Wo {
|
|
2412
2431
|
constructor(e, r) {
|
|
2413
|
-
|
|
2414
|
-
|
|
2432
|
+
Xe(this, "restaurant");
|
|
2433
|
+
Xe(this, "data");
|
|
2415
2434
|
this.restaurant = e, this.data = r;
|
|
2416
2435
|
}
|
|
2417
2436
|
generateUrl(e) {
|
|
2418
|
-
const r = e === "normal" ?
|
|
2437
|
+
const r = e === "normal" ? ht().toISOString() : "photo";
|
|
2419
2438
|
return `restaurant/${this.restaurant.id}/${e}/${r}`;
|
|
2420
2439
|
}
|
|
2421
2440
|
async manageThumbnail() {
|
|
@@ -2493,13 +2512,13 @@ const Jo = () => {
|
|
|
2493
2512
|
},
|
|
2494
2513
|
setup(t, { expose: e }) {
|
|
2495
2514
|
var P;
|
|
2496
|
-
const r = t, { restaurants: n, currentBusiness: s, restaurantAttributeSettings: o, enabledCountries: i } = pe(), f =
|
|
2497
|
-
|
|
2498
|
-
},
|
|
2499
|
-
var
|
|
2500
|
-
return (
|
|
2501
|
-
}), c =
|
|
2502
|
-
|
|
2515
|
+
const r = t, { restaurants: n, currentBusiness: s, restaurantAttributeSettings: o, enabledCountries: i } = pe(), f = mt(), d = fr(f), { copyTextToClipboard: b } = cr(), l = ae(!1), g = (C, w) => {
|
|
2516
|
+
l.value = !l.value;
|
|
2517
|
+
}, O = Y(() => {
|
|
2518
|
+
var C;
|
|
2519
|
+
return (C = r.restaurant) == null ? void 0 : C.profile;
|
|
2520
|
+
}), c = ft(
|
|
2521
|
+
O.value ? $e(O.value) : {
|
|
2503
2522
|
...Qt(),
|
|
2504
2523
|
address: Oe(Qt().address),
|
|
2505
2524
|
legalName: "",
|
|
@@ -2542,26 +2561,26 @@ const Jo = () => {
|
|
|
2542
2561
|
}
|
|
2543
2562
|
}
|
|
2544
2563
|
}
|
|
2545
|
-
),
|
|
2564
|
+
), x = "https://feedmedev.cc/", v = Y(() => pe().currentCountry.value), { t: y } = ve(), k = ae(
|
|
2546
2565
|
r.restaurantId ? y("settings.business.restaurant.form.title.update") : y("settings.business.restaurant.form.title.add")
|
|
2547
2566
|
), V = ae(((P = r.restaurant) == null ? void 0 : P.customAttributes) || {});
|
|
2548
|
-
async function
|
|
2549
|
-
Object.values(V.value).length !== 0 && await Ae.updateRestaurantAttributes(
|
|
2567
|
+
async function A(C) {
|
|
2568
|
+
Object.values(V.value).length !== 0 && await Ae.updateRestaurantAttributes(C, V.value);
|
|
2550
2569
|
}
|
|
2551
|
-
const
|
|
2552
|
-
function Z(
|
|
2570
|
+
const F = Y(() => Oe(c.address)), J = Y(() => F.value.formatted);
|
|
2571
|
+
function Z(C) {
|
|
2553
2572
|
var w;
|
|
2554
|
-
if (typeof
|
|
2555
|
-
const
|
|
2556
|
-
|
|
2573
|
+
if (typeof C == "string") {
|
|
2574
|
+
const T = (w = n.value.find((U) => U._id === C)) == null ? void 0 : w.profile.operatingHours;
|
|
2575
|
+
T ? c.operatingHours = $e(T) : f.open({
|
|
2557
2576
|
title: y("settings.business.restaurant.form.sections.operation_hours.invalid"),
|
|
2558
2577
|
type: "error"
|
|
2559
2578
|
});
|
|
2560
2579
|
}
|
|
2561
2580
|
}
|
|
2562
2581
|
function D() {
|
|
2563
|
-
const
|
|
2564
|
-
|
|
2582
|
+
const C = x + (c.url || r.restaurantId);
|
|
2583
|
+
b(C);
|
|
2565
2584
|
}
|
|
2566
2585
|
function W() {
|
|
2567
2586
|
c.thumbnailPhoto = void 0, c.newThumbnailPhoto = void 0;
|
|
@@ -2569,13 +2588,13 @@ const Jo = () => {
|
|
|
2569
2588
|
function a() {
|
|
2570
2589
|
c.coverPhoto = void 0, c.newCoverPhoto = void 0;
|
|
2571
2590
|
}
|
|
2572
|
-
function
|
|
2573
|
-
c.newPhotos = c.newPhotos || [], c.newPhotos.push(
|
|
2591
|
+
function u(C) {
|
|
2592
|
+
c.newPhotos = c.newPhotos || [], c.newPhotos.push(C);
|
|
2574
2593
|
}
|
|
2575
|
-
const h = Jo(), R =
|
|
2594
|
+
const h = Jo(), R = pt();
|
|
2576
2595
|
function S() {
|
|
2577
|
-
var w,
|
|
2578
|
-
!((w =
|
|
2596
|
+
var w, T;
|
|
2597
|
+
!((w = O.value) != null && w.code) && ((T = c.code) == null ? void 0 : T.trim()) ? R.open({
|
|
2579
2598
|
title: y("settings.business.restaurant.codeConfirmation.title"),
|
|
2580
2599
|
message: y("settings.business.restaurant.codeConfirmation.message", {
|
|
2581
2600
|
name: c.name,
|
|
@@ -2595,15 +2614,15 @@ const Jo = () => {
|
|
|
2595
2614
|
}) : m();
|
|
2596
2615
|
}
|
|
2597
2616
|
function m() {
|
|
2598
|
-
var
|
|
2617
|
+
var C, w;
|
|
2599
2618
|
if (g(), r.restaurantId) {
|
|
2600
|
-
if (!((
|
|
2619
|
+
if (!((C = s.value) != null && C.id))
|
|
2601
2620
|
return;
|
|
2602
2621
|
d.minor(async () => {
|
|
2603
|
-
var
|
|
2604
|
-
r.restaurant && (await
|
|
2622
|
+
var T, U;
|
|
2623
|
+
r.restaurant && (await A(r.restaurantId), await h.updateRestaurantProfile(r.restaurant, {
|
|
2605
2624
|
...c,
|
|
2606
|
-
url: ((
|
|
2625
|
+
url: ((T = c.url) == null ? void 0 : T.trim()) || null,
|
|
2607
2626
|
code: ((U = c.code) == null ? void 0 : U.trim()) || null,
|
|
2608
2627
|
phoneNo: rr(c.phoneNo)
|
|
2609
2628
|
}), y("settings.business.restaurant.form.message.updated"));
|
|
@@ -2612,12 +2631,12 @@ const Jo = () => {
|
|
|
2612
2631
|
if (!((w = s.value) != null && w.id))
|
|
2613
2632
|
return;
|
|
2614
2633
|
d.minor(async () => {
|
|
2615
|
-
var
|
|
2634
|
+
var T, U;
|
|
2616
2635
|
await h.createRestaurant(
|
|
2617
2636
|
s.value.id,
|
|
2618
2637
|
{
|
|
2619
2638
|
...c,
|
|
2620
|
-
url: ((
|
|
2639
|
+
url: ((T = c.url) == null ? void 0 : T.trim()) || null,
|
|
2621
2640
|
code: ((U = c.code) == null ? void 0 : U.trim()) || null,
|
|
2622
2641
|
phoneNo: rr(c.phoneNo)
|
|
2623
2642
|
},
|
|
@@ -2648,25 +2667,25 @@ const Jo = () => {
|
|
|
2648
2667
|
]
|
|
2649
2668
|
})), { isAtMost: E } = ur();
|
|
2650
2669
|
Y(() => E("sm"));
|
|
2651
|
-
const
|
|
2652
|
-
return e({ trigger: g }), (
|
|
2653
|
-
const
|
|
2654
|
-
return
|
|
2655
|
-
de(
|
|
2670
|
+
const I = ae(null), N = Qr(I);
|
|
2671
|
+
return e({ trigger: g }), (C, w) => {
|
|
2672
|
+
const T = q("FmTextField"), U = q("FmPhoneNumber"), X = q("FmTextarea"), H = q("FmButton");
|
|
2673
|
+
return j(), B(oe, null, [
|
|
2674
|
+
de(C.$slots, "trigger", kr(Vr({
|
|
2656
2675
|
trigger: g
|
|
2657
2676
|
}))),
|
|
2658
|
-
|
|
2677
|
+
L(Ln, {
|
|
2659
2678
|
title: k.value,
|
|
2660
|
-
show:
|
|
2679
|
+
show: l.value,
|
|
2661
2680
|
"primary-action": { label: _(y)("common.save") },
|
|
2662
2681
|
"secondary-actions": [
|
|
2663
|
-
{ label: _(y)("settings.business.restaurant.actions.discard"), click: () =>
|
|
2682
|
+
{ label: _(y)("settings.business.restaurant.actions.discard"), click: () => l.value = !1 }
|
|
2664
2683
|
],
|
|
2665
2684
|
onOnPrimary: S,
|
|
2666
|
-
onOnCancel: w[17] || (w[17] = (
|
|
2685
|
+
onOnCancel: w[17] || (w[17] = (M) => l.value = !1)
|
|
2667
2686
|
}, {
|
|
2668
2687
|
"append-title": K(() => [
|
|
2669
|
-
_(E)("sm") ? (
|
|
2688
|
+
_(E)("sm") ? (j(), te(Nt, {
|
|
2670
2689
|
key: 0,
|
|
2671
2690
|
variant: "dialog",
|
|
2672
2691
|
title: p.value.title,
|
|
@@ -2677,40 +2696,40 @@ const Jo = () => {
|
|
|
2677
2696
|
$("div", Zo, [
|
|
2678
2697
|
$("div", {
|
|
2679
2698
|
ref_key: "formWrapper",
|
|
2680
|
-
ref:
|
|
2699
|
+
ref: I,
|
|
2681
2700
|
class: "py-24 pr-[400px] w-[1150px] xs:pr-0 sm:pr-0 xs:w-full"
|
|
2682
2701
|
}, [
|
|
2683
|
-
_(E)("sm") ? ce("", !0) : (
|
|
2702
|
+
_(E)("sm") ? ce("", !0) : (j(), te(Nt, {
|
|
2684
2703
|
key: 0,
|
|
2685
2704
|
class: "fixed",
|
|
2686
|
-
style:
|
|
2705
|
+
style: Me({
|
|
2687
2706
|
top: "85px",
|
|
2688
|
-
left: _(
|
|
2707
|
+
left: _(N).right - 400 + "px"
|
|
2689
2708
|
}),
|
|
2690
2709
|
variant: "full",
|
|
2691
2710
|
title: p.value.title,
|
|
2692
2711
|
items: p.value.items
|
|
2693
2712
|
}, null, 8, ["style", "title", "items"])),
|
|
2694
2713
|
$("div", Qo, [
|
|
2695
|
-
|
|
2714
|
+
L(Re, {
|
|
2696
2715
|
title: _(y)("settings.business.restaurant.form.sections.basic_info.title")
|
|
2697
2716
|
}, {
|
|
2698
2717
|
default: K(() => {
|
|
2699
|
-
var
|
|
2718
|
+
var M, Q;
|
|
2700
2719
|
return [
|
|
2701
2720
|
$("div", ei, [
|
|
2702
2721
|
$("div", null, [
|
|
2703
|
-
|
|
2722
|
+
L(T, {
|
|
2704
2723
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.code.label"),
|
|
2705
2724
|
modelValue: c.code,
|
|
2706
2725
|
"onUpdate:modelValue": w[0] || (w[0] = (z) => c.code = z),
|
|
2707
2726
|
"label-mark": "optional",
|
|
2708
2727
|
"helper-text": _(y)("settings.business.restaurant.form.sections.basic_info.code.helper"),
|
|
2709
|
-
disabled: ((
|
|
2728
|
+
disabled: ((M = O.value) == null ? void 0 : M.code) !== void 0 && ((Q = O.value) == null ? void 0 : Q.code) !== null
|
|
2710
2729
|
}, null, 8, ["label", "modelValue", "helper-text", "disabled"])
|
|
2711
2730
|
]),
|
|
2712
2731
|
$("div", null, [
|
|
2713
|
-
|
|
2732
|
+
L(T, {
|
|
2714
2733
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.name.label"),
|
|
2715
2734
|
modelValue: c.name,
|
|
2716
2735
|
"onUpdate:modelValue": w[1] || (w[1] = (z) => c.name = z),
|
|
@@ -2719,7 +2738,7 @@ const Jo = () => {
|
|
|
2719
2738
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
2720
2739
|
]),
|
|
2721
2740
|
$("div", null, [
|
|
2722
|
-
|
|
2741
|
+
L(T, {
|
|
2723
2742
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.legal_name.label"),
|
|
2724
2743
|
modelValue: c.legalName,
|
|
2725
2744
|
"onUpdate:modelValue": w[2] || (w[2] = (z) => c.legalName = z),
|
|
@@ -2728,7 +2747,7 @@ const Jo = () => {
|
|
|
2728
2747
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
2729
2748
|
]),
|
|
2730
2749
|
$("div", null, [
|
|
2731
|
-
|
|
2750
|
+
L(T, {
|
|
2732
2751
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.reg_no.label"),
|
|
2733
2752
|
modelValue: c.regNo,
|
|
2734
2753
|
"onUpdate:modelValue": w[3] || (w[3] = (z) => c.regNo = z),
|
|
@@ -2737,7 +2756,7 @@ const Jo = () => {
|
|
|
2737
2756
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
2738
2757
|
]),
|
|
2739
2758
|
$("div", null, [
|
|
2740
|
-
|
|
2759
|
+
L(T, {
|
|
2741
2760
|
modelValue: c.sstRegNo,
|
|
2742
2761
|
"onUpdate:modelValue": w[4] || (w[4] = (z) => c.sstRegNo = z),
|
|
2743
2762
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.tax_no.label"),
|
|
@@ -2746,7 +2765,7 @@ const Jo = () => {
|
|
|
2746
2765
|
]),
|
|
2747
2766
|
$("div", ti, [
|
|
2748
2767
|
$("div", ri, [
|
|
2749
|
-
|
|
2768
|
+
L(U, {
|
|
2750
2769
|
class: "w-full",
|
|
2751
2770
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.contact.label"),
|
|
2752
2771
|
modelValue: c.phoneNo,
|
|
@@ -2756,7 +2775,7 @@ const Jo = () => {
|
|
|
2756
2775
|
}, null, 8, ["label", "modelValue", "extra-country-codes"])
|
|
2757
2776
|
]),
|
|
2758
2777
|
$("div", ni, [
|
|
2759
|
-
|
|
2778
|
+
L(T, {
|
|
2760
2779
|
class: "w-full",
|
|
2761
2780
|
modelValue: c.email,
|
|
2762
2781
|
"onUpdate:modelValue": w[6] || (w[6] = (z) => c.email = z),
|
|
@@ -2766,7 +2785,7 @@ const Jo = () => {
|
|
|
2766
2785
|
])
|
|
2767
2786
|
]),
|
|
2768
2787
|
$("div", null, [
|
|
2769
|
-
|
|
2788
|
+
L(ye, {
|
|
2770
2789
|
label: _(y)("settings.business.restaurant.form.sections.basic_info.image.label"),
|
|
2771
2790
|
"sub-label": _(y)("settings.business.restaurant.form.sections.basic_info.image.optional"),
|
|
2772
2791
|
"previous-url": c.thumbnailPhoto,
|
|
@@ -2780,61 +2799,61 @@ const Jo = () => {
|
|
|
2780
2799
|
}),
|
|
2781
2800
|
_: 1
|
|
2782
2801
|
}, 8, ["title"]),
|
|
2783
|
-
_(o).length > 0 ? (
|
|
2802
|
+
_(o).length > 0 ? (j(), B(oe, { key: 0 }, [
|
|
2784
2803
|
w[18] || (w[18] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2785
|
-
|
|
2804
|
+
L(Re, {
|
|
2786
2805
|
title: _(y)("settings.restaurantTagging.title"),
|
|
2787
2806
|
"sub-title": _(y)("settings.restaurantTagging.subtitle")
|
|
2788
2807
|
}, {
|
|
2789
2808
|
default: K(() => [
|
|
2790
|
-
|
|
2809
|
+
L(_(jr), {
|
|
2791
2810
|
entity: "restaurant",
|
|
2792
2811
|
modelValue: V.value,
|
|
2793
|
-
"onUpdate:modelValue": w[8] || (w[8] = (
|
|
2812
|
+
"onUpdate:modelValue": w[8] || (w[8] = (M) => V.value = M)
|
|
2794
2813
|
}, null, 8, ["modelValue"])
|
|
2795
2814
|
]),
|
|
2796
2815
|
_: 1
|
|
2797
2816
|
}, 8, ["title", "sub-title"])
|
|
2798
2817
|
], 64)) : ce("", !0),
|
|
2799
2818
|
w[19] || (w[19] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2800
|
-
|
|
2819
|
+
L(Re, {
|
|
2801
2820
|
title: _(y)("settings.business.restaurant.form.sections.address.title")
|
|
2802
2821
|
}, {
|
|
2803
2822
|
default: K(() => [
|
|
2804
2823
|
$("div", si, [
|
|
2805
|
-
|
|
2824
|
+
L(Yo, {
|
|
2806
2825
|
modelValue: c.address,
|
|
2807
|
-
"onUpdate:modelValue": w[9] || (w[9] = (
|
|
2826
|
+
"onUpdate:modelValue": w[9] || (w[9] = (M) => c.address = M)
|
|
2808
2827
|
}, null, 8, ["modelValue"]),
|
|
2809
|
-
|
|
2810
|
-
address:
|
|
2828
|
+
L(xo, {
|
|
2829
|
+
address: F.value,
|
|
2811
2830
|
modelValue: c.address.coordinates,
|
|
2812
|
-
"onUpdate:modelValue": w[10] || (w[10] = (
|
|
2831
|
+
"onUpdate:modelValue": w[10] || (w[10] = (M) => c.address.coordinates = M)
|
|
2813
2832
|
}, null, 8, ["address", "modelValue"])
|
|
2814
2833
|
])
|
|
2815
2834
|
]),
|
|
2816
2835
|
_: 1
|
|
2817
2836
|
}, 8, ["title"]),
|
|
2818
2837
|
w[20] || (w[20] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2819
|
-
|
|
2838
|
+
L(Re, {
|
|
2820
2839
|
title: _(y)("settings.business.restaurant.form.sections.operation_hours.title")
|
|
2821
2840
|
}, {
|
|
2822
2841
|
default: K(() => [
|
|
2823
2842
|
$("div", ai, [
|
|
2824
2843
|
$("div", oi, [
|
|
2825
|
-
|
|
2844
|
+
L(Tt, {
|
|
2826
2845
|
label: _(y)("settings.business.restaurant.form.sections.operation_hours.copy_with"),
|
|
2827
2846
|
optional: !1
|
|
2828
2847
|
}, null, 8, ["label"]),
|
|
2829
|
-
|
|
2848
|
+
L(Dr, {
|
|
2830
2849
|
class: "w-[320px]",
|
|
2831
|
-
"exclude-restaurants": [t.restaurantId
|
|
2850
|
+
"exclude-restaurants": t.restaurantId ? [t.restaurantId] : [],
|
|
2832
2851
|
"model-value": "",
|
|
2833
|
-
"onUpdate:modelValue": w[11] || (w[11] = (
|
|
2852
|
+
"onUpdate:modelValue": w[11] || (w[11] = (M) => Z(M))
|
|
2834
2853
|
}, null, 8, ["exclude-restaurants"]),
|
|
2835
|
-
|
|
2854
|
+
L(jo, {
|
|
2836
2855
|
modelValue: c.operatingHours,
|
|
2837
|
-
"onUpdate:modelValue": w[12] || (w[12] = (
|
|
2856
|
+
"onUpdate:modelValue": w[12] || (w[12] = (M) => c.operatingHours = M)
|
|
2838
2857
|
}, null, 8, ["modelValue"])
|
|
2839
2858
|
])
|
|
2840
2859
|
])
|
|
@@ -2842,35 +2861,35 @@ const Jo = () => {
|
|
|
2842
2861
|
_: 1
|
|
2843
2862
|
}, 8, ["title"]),
|
|
2844
2863
|
w[21] || (w[21] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2845
|
-
|
|
2864
|
+
L(Re, {
|
|
2846
2865
|
title: _(y)("settings.business.restaurant.form.sections.branding.title")
|
|
2847
2866
|
}, {
|
|
2848
2867
|
default: K(() => [
|
|
2849
2868
|
$("div", ii, [
|
|
2850
|
-
|
|
2869
|
+
L(X, {
|
|
2851
2870
|
label: _(y)("settings.business.restaurant.form.sections.branding.description"),
|
|
2852
2871
|
"model-value": c.description ?? "",
|
|
2853
|
-
"onUpdate:modelValue": w[13] || (w[13] = (
|
|
2872
|
+
"onUpdate:modelValue": w[13] || (w[13] = (M) => c.description = M)
|
|
2854
2873
|
}, null, 8, ["label", "model-value"]),
|
|
2855
|
-
|
|
2874
|
+
L(T, {
|
|
2856
2875
|
label: _(y)("settings.business.restaurant.form.sections.branding.url.label"),
|
|
2857
2876
|
placeholder: t.restaurantId,
|
|
2858
2877
|
"model-value": c.url,
|
|
2859
|
-
"onUpdate:modelValue": w[14] || (w[14] = (
|
|
2878
|
+
"onUpdate:modelValue": w[14] || (w[14] = (M) => c.url = M),
|
|
2860
2879
|
rules: [
|
|
2861
|
-
(
|
|
2880
|
+
(M) => {
|
|
2862
2881
|
var Q;
|
|
2863
|
-
return !
|
|
2882
|
+
return !M || ((Q = O.value) == null ? void 0 : Q.url) == c.url || v.value == _(vt.F_COUNTRY).enum.MY || _(y)("settings.business.restaurant.form.sections.branding.url.errors.disabled");
|
|
2864
2883
|
},
|
|
2865
|
-
(
|
|
2866
|
-
(
|
|
2884
|
+
(M) => !M || _(pr).test(M) || _(y)("settings.business.restaurant.form.sections.branding.url.errors.invalid"),
|
|
2885
|
+
(M) => !M || !_(hr).includes(M) || _(y)("settings.business.restaurant.form.sections.branding.url.errors.reserved")
|
|
2867
2886
|
]
|
|
2868
2887
|
}, {
|
|
2869
2888
|
prepend: K(() => [
|
|
2870
|
-
$("span", null, G(
|
|
2889
|
+
$("span", null, G(x))
|
|
2871
2890
|
]),
|
|
2872
2891
|
append: K(() => [
|
|
2873
|
-
|
|
2892
|
+
L(H, {
|
|
2874
2893
|
variant: "tertiary",
|
|
2875
2894
|
icon: "file_copy",
|
|
2876
2895
|
"text-color": "neutral-gray-400",
|
|
@@ -2880,43 +2899,43 @@ const Jo = () => {
|
|
|
2880
2899
|
_: 1
|
|
2881
2900
|
}, 8, ["label", "placeholder", "model-value", "rules"]),
|
|
2882
2901
|
$("div", null, [
|
|
2883
|
-
|
|
2902
|
+
L(ye, {
|
|
2884
2903
|
label: _(y)("settings.business.form.cover_photo.label"),
|
|
2885
2904
|
"previous-url": c.coverPhoto,
|
|
2886
2905
|
modelValue: c.newCoverPhoto,
|
|
2887
|
-
"onUpdate:modelValue": w[15] || (w[15] = (
|
|
2906
|
+
"onUpdate:modelValue": w[15] || (w[15] = (M) => c.newCoverPhoto = M),
|
|
2888
2907
|
"onReset:modelValue": a
|
|
2889
2908
|
}, null, 8, ["label", "previous-url", "modelValue"])
|
|
2890
2909
|
]),
|
|
2891
2910
|
$("div", null, [
|
|
2892
|
-
|
|
2911
|
+
L(Tt, {
|
|
2893
2912
|
label: _(y)("settings.business.restaurant.form.sections.branding.carousel_photos.label")
|
|
2894
2913
|
}, null, 8, ["label"]),
|
|
2895
|
-
(
|
|
2914
|
+
(j(!0), B(oe, null, he(c.photos || [], (M, Q) => (j(), te(ye, {
|
|
2896
2915
|
key: Q,
|
|
2897
|
-
"previous-url":
|
|
2916
|
+
"previous-url": M,
|
|
2898
2917
|
"model-value": void 0,
|
|
2899
2918
|
"onReset:modelValue": (z) => {
|
|
2900
2919
|
var we;
|
|
2901
2920
|
return (we = c.photos) == null ? void 0 : we.splice(Q, 1);
|
|
2902
2921
|
}
|
|
2903
2922
|
}, null, 8, ["previous-url", "onReset:modelValue"]))), 128)),
|
|
2904
|
-
(
|
|
2923
|
+
(j(!0), B(oe, null, he(c.newPhotos || [], (M, Q) => {
|
|
2905
2924
|
var z;
|
|
2906
|
-
return
|
|
2925
|
+
return j(), te(ye, {
|
|
2907
2926
|
key: Q,
|
|
2908
2927
|
"model-value": ((z = c.newPhotos) == null ? void 0 : z[Q]) || void 0,
|
|
2909
2928
|
"previous-url": void 0,
|
|
2910
2929
|
"onReset:modelValue": (we) => {
|
|
2911
|
-
var
|
|
2912
|
-
return (
|
|
2930
|
+
var It;
|
|
2931
|
+
return (It = c.photos) == null ? void 0 : It.splice(Q, 1);
|
|
2913
2932
|
}
|
|
2914
2933
|
}, null, 8, ["model-value", "onReset:modelValue"]);
|
|
2915
2934
|
}), 128)),
|
|
2916
|
-
|
|
2935
|
+
L(ye, {
|
|
2917
2936
|
"model-value": void 0,
|
|
2918
2937
|
"previous-url": void 0,
|
|
2919
|
-
"onUpdate:modelValue": w[16] || (w[16] = (
|
|
2938
|
+
"onUpdate:modelValue": w[16] || (w[16] = (M) => u(M))
|
|
2920
2939
|
})
|
|
2921
2940
|
])
|
|
2922
2941
|
])
|
|
@@ -2969,8 +2988,8 @@ var Ir = { exports: {} };
|
|
|
2969
2988
|
s.d(
|
|
2970
2989
|
f,
|
|
2971
2990
|
d,
|
|
2972
|
-
(function(
|
|
2973
|
-
return o[
|
|
2991
|
+
(function(b) {
|
|
2992
|
+
return o[b];
|
|
2974
2993
|
}).bind(null, d)
|
|
2975
2994
|
);
|
|
2976
2995
|
return f;
|
|
@@ -2990,16 +3009,16 @@ var Ir = { exports: {} };
|
|
|
2990
3009
|
},
|
|
2991
3010
|
function(r, n, s) {
|
|
2992
3011
|
function o(a) {
|
|
2993
|
-
return (o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
2994
|
-
return typeof
|
|
2995
|
-
} : function(
|
|
2996
|
-
return
|
|
3012
|
+
return (o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(u) {
|
|
3013
|
+
return typeof u;
|
|
3014
|
+
} : function(u) {
|
|
3015
|
+
return u && typeof Symbol == "function" && u.constructor === Symbol && u !== Symbol.prototype ? "symbol" : typeof u;
|
|
2997
3016
|
})(a);
|
|
2998
3017
|
}
|
|
2999
3018
|
function i(a) {
|
|
3000
|
-
var
|
|
3019
|
+
var u = "[object " + a + "]";
|
|
3001
3020
|
return function(h) {
|
|
3002
|
-
return Object.prototype.toString.call(h) ===
|
|
3021
|
+
return Object.prototype.toString.call(h) === u;
|
|
3003
3022
|
};
|
|
3004
3023
|
}
|
|
3005
3024
|
s.r(n), s.d(n, "default", function() {
|
|
@@ -3009,107 +3028,107 @@ var Ir = { exports: {} };
|
|
|
3009
3028
|
}), s.d(n, "comparable", function() {
|
|
3010
3029
|
return W;
|
|
3011
3030
|
});
|
|
3012
|
-
var f = i("Array"), d = i("Object"),
|
|
3013
|
-
function
|
|
3014
|
-
return
|
|
3031
|
+
var f = i("Array"), d = i("Object"), b = i("Function");
|
|
3032
|
+
function l(a, u) {
|
|
3033
|
+
return b(a.get) ? a.get(u) : a[u];
|
|
3015
3034
|
}
|
|
3016
3035
|
function g(a) {
|
|
3017
|
-
return function(
|
|
3036
|
+
return function(u, h) {
|
|
3018
3037
|
if (!f(h) || !h.length)
|
|
3019
|
-
return a(
|
|
3038
|
+
return a(u, h);
|
|
3020
3039
|
for (var R = 0, S = h.length; R < S; R++)
|
|
3021
|
-
if (a(
|
|
3040
|
+
if (a(u, l(h, R)))
|
|
3022
3041
|
return !0;
|
|
3023
3042
|
return !1;
|
|
3024
3043
|
};
|
|
3025
3044
|
}
|
|
3026
|
-
function
|
|
3027
|
-
return function(
|
|
3045
|
+
function O(a) {
|
|
3046
|
+
return function(u, h) {
|
|
3028
3047
|
if (!f(h) || !h.length)
|
|
3029
|
-
return a(
|
|
3048
|
+
return a(u, h);
|
|
3030
3049
|
for (var R = 0, S = h.length; R < S; R++)
|
|
3031
|
-
if (!a(
|
|
3050
|
+
if (!a(u, l(h, R)))
|
|
3032
3051
|
return !1;
|
|
3033
3052
|
return !0;
|
|
3034
3053
|
};
|
|
3035
3054
|
}
|
|
3036
|
-
function c(a,
|
|
3037
|
-
return a.validate(a.options,
|
|
3055
|
+
function c(a, u, h, R) {
|
|
3056
|
+
return a.validate(a.options, u, h, R);
|
|
3038
3057
|
}
|
|
3039
|
-
var
|
|
3040
|
-
$eq: g(function(a,
|
|
3041
|
-
return a(
|
|
3058
|
+
var x = {
|
|
3059
|
+
$eq: g(function(a, u) {
|
|
3060
|
+
return a(u);
|
|
3042
3061
|
}),
|
|
3043
|
-
$ne:
|
|
3044
|
-
return a(
|
|
3062
|
+
$ne: O(function(a, u) {
|
|
3063
|
+
return a(u);
|
|
3045
3064
|
}),
|
|
3046
|
-
$gt: g(function(a,
|
|
3047
|
-
return a(
|
|
3065
|
+
$gt: g(function(a, u) {
|
|
3066
|
+
return a(u);
|
|
3048
3067
|
}),
|
|
3049
|
-
$gte: g(function(a,
|
|
3050
|
-
return a(
|
|
3068
|
+
$gte: g(function(a, u) {
|
|
3069
|
+
return a(u);
|
|
3051
3070
|
}),
|
|
3052
|
-
$lt: g(function(a,
|
|
3053
|
-
return a(
|
|
3071
|
+
$lt: g(function(a, u) {
|
|
3072
|
+
return a(u);
|
|
3054
3073
|
}),
|
|
3055
|
-
$lte: g(function(a,
|
|
3056
|
-
return a(
|
|
3074
|
+
$lte: g(function(a, u) {
|
|
3075
|
+
return a(u);
|
|
3057
3076
|
}),
|
|
3058
|
-
$mod: g(function(a,
|
|
3059
|
-
return a(
|
|
3077
|
+
$mod: g(function(a, u) {
|
|
3078
|
+
return a(u);
|
|
3060
3079
|
}),
|
|
3061
|
-
$in: function(a,
|
|
3062
|
-
return a(
|
|
3080
|
+
$in: function(a, u) {
|
|
3081
|
+
return a(u);
|
|
3063
3082
|
},
|
|
3064
|
-
$nin: function(a,
|
|
3065
|
-
return a(
|
|
3083
|
+
$nin: function(a, u) {
|
|
3084
|
+
return a(u);
|
|
3066
3085
|
},
|
|
3067
|
-
$not: function(a,
|
|
3068
|
-
return a(
|
|
3086
|
+
$not: function(a, u, h, R) {
|
|
3087
|
+
return a(u, h, R);
|
|
3069
3088
|
},
|
|
3070
|
-
$type: function(a,
|
|
3071
|
-
return a(
|
|
3089
|
+
$type: function(a, u) {
|
|
3090
|
+
return a(u);
|
|
3072
3091
|
},
|
|
3073
|
-
$all: function(a,
|
|
3074
|
-
return
|
|
3092
|
+
$all: function(a, u, h, R) {
|
|
3093
|
+
return x.$and(a, u, h, R);
|
|
3075
3094
|
},
|
|
3076
|
-
$size: function(a,
|
|
3077
|
-
return !!
|
|
3095
|
+
$size: function(a, u) {
|
|
3096
|
+
return !!u && a === u.length;
|
|
3078
3097
|
},
|
|
3079
|
-
$or: function(a,
|
|
3098
|
+
$or: function(a, u, h, R) {
|
|
3080
3099
|
for (var S = 0, m = a.length; S < m; S++)
|
|
3081
|
-
if (c(
|
|
3100
|
+
if (c(l(a, S), u, h, R))
|
|
3082
3101
|
return !0;
|
|
3083
3102
|
return !1;
|
|
3084
3103
|
},
|
|
3085
|
-
$nor: function(a,
|
|
3086
|
-
return !
|
|
3104
|
+
$nor: function(a, u, h, R) {
|
|
3105
|
+
return !x.$or(a, u, h, R);
|
|
3087
3106
|
},
|
|
3088
|
-
$and: function(a,
|
|
3107
|
+
$and: function(a, u, h, R) {
|
|
3089
3108
|
for (var S = 0, m = a.length; S < m; S++)
|
|
3090
|
-
if (!c(
|
|
3109
|
+
if (!c(l(a, S), u, h, R))
|
|
3091
3110
|
return !1;
|
|
3092
3111
|
return !0;
|
|
3093
3112
|
},
|
|
3094
|
-
$regex: g(function(a,
|
|
3095
|
-
return typeof
|
|
3113
|
+
$regex: g(function(a, u) {
|
|
3114
|
+
return typeof u == "string" && a.test(u);
|
|
3096
3115
|
}),
|
|
3097
|
-
$where: function(a,
|
|
3098
|
-
return a.call(
|
|
3116
|
+
$where: function(a, u, h, R) {
|
|
3117
|
+
return a.call(u, u, h, R);
|
|
3099
3118
|
},
|
|
3100
|
-
$elemMatch: function(a,
|
|
3101
|
-
return f(
|
|
3119
|
+
$elemMatch: function(a, u, h, R) {
|
|
3120
|
+
return f(u) ? !!~function(S, m) {
|
|
3102
3121
|
for (var p = 0; p < S.length; p++)
|
|
3103
|
-
if (
|
|
3122
|
+
if (l(S, p), c(m, l(S, p)))
|
|
3104
3123
|
return p;
|
|
3105
3124
|
return -1;
|
|
3106
|
-
}(
|
|
3125
|
+
}(u, a) : c(a, u, h, R);
|
|
3107
3126
|
},
|
|
3108
|
-
$exists: function(a,
|
|
3127
|
+
$exists: function(a, u, h, R) {
|
|
3109
3128
|
return R.hasOwnProperty(h) === a;
|
|
3110
3129
|
}
|
|
3111
|
-
},
|
|
3112
|
-
$eq: function(a,
|
|
3130
|
+
}, v = {
|
|
3131
|
+
$eq: function(a, u, h) {
|
|
3113
3132
|
var R = h.comparable, S = h.compare;
|
|
3114
3133
|
return a instanceof RegExp ? g(function(m) {
|
|
3115
3134
|
return typeof m == "string" && a.test(m);
|
|
@@ -3123,31 +3142,31 @@ var Ir = { exports: {} };
|
|
|
3123
3142
|
}
|
|
3124
3143
|
);
|
|
3125
3144
|
},
|
|
3126
|
-
$gt: function(a,
|
|
3145
|
+
$gt: function(a, u, h) {
|
|
3127
3146
|
var R = h.comparable, S = h.compare;
|
|
3128
3147
|
return function(m) {
|
|
3129
3148
|
return S(R(m), R(a)) > 0;
|
|
3130
3149
|
};
|
|
3131
3150
|
},
|
|
3132
|
-
$gte: function(a,
|
|
3151
|
+
$gte: function(a, u, h) {
|
|
3133
3152
|
var R = h.comparable, S = h.compare;
|
|
3134
3153
|
return function(m) {
|
|
3135
3154
|
return S(R(m), R(a)) >= 0;
|
|
3136
3155
|
};
|
|
3137
3156
|
},
|
|
3138
|
-
$lt: function(a,
|
|
3157
|
+
$lt: function(a, u, h) {
|
|
3139
3158
|
var R = h.comparable, S = h.compare;
|
|
3140
3159
|
return function(m) {
|
|
3141
3160
|
return S(R(m), R(a)) < 0;
|
|
3142
3161
|
};
|
|
3143
3162
|
},
|
|
3144
|
-
$lte: function(a,
|
|
3163
|
+
$lte: function(a, u, h) {
|
|
3145
3164
|
var R = h.comparable, S = h.compare;
|
|
3146
3165
|
return function(m) {
|
|
3147
3166
|
return S(R(m), R(a)) <= 0;
|
|
3148
3167
|
};
|
|
3149
3168
|
},
|
|
3150
|
-
$in: function(a,
|
|
3169
|
+
$in: function(a, u, h) {
|
|
3151
3170
|
var R = h.comparable;
|
|
3152
3171
|
return function(S) {
|
|
3153
3172
|
if (!(S instanceof Array)) {
|
|
@@ -3163,60 +3182,60 @@ var Ir = { exports: {} };
|
|
|
3163
3182
|
return !0;
|
|
3164
3183
|
}
|
|
3165
3184
|
for (E = a.length; E--; ) {
|
|
3166
|
-
var p = c(J(
|
|
3185
|
+
var p = c(J(l(a, E), h), m, E, a);
|
|
3167
3186
|
if (p && String(p) !== "[object Object]" && String(m) !== "[object Object]")
|
|
3168
3187
|
return !0;
|
|
3169
3188
|
}
|
|
3170
3189
|
return !!~a.indexOf(m);
|
|
3171
3190
|
}
|
|
3172
3191
|
for (var E = S.length; E--; )
|
|
3173
|
-
if (~a.indexOf(R(
|
|
3192
|
+
if (~a.indexOf(R(l(S, E))))
|
|
3174
3193
|
return !0;
|
|
3175
3194
|
return !1;
|
|
3176
3195
|
};
|
|
3177
3196
|
},
|
|
3178
|
-
$nin: function(a,
|
|
3179
|
-
var R =
|
|
3197
|
+
$nin: function(a, u, h) {
|
|
3198
|
+
var R = v.$in(a, u, h);
|
|
3180
3199
|
return function(S, m, p, E) {
|
|
3181
3200
|
return !R(S, m, p, E);
|
|
3182
3201
|
};
|
|
3183
3202
|
},
|
|
3184
3203
|
$mod: function(a) {
|
|
3185
|
-
return function(
|
|
3186
|
-
return
|
|
3204
|
+
return function(u) {
|
|
3205
|
+
return u % a[0] == a[1];
|
|
3187
3206
|
};
|
|
3188
3207
|
},
|
|
3189
|
-
$ne: function(a,
|
|
3190
|
-
var R =
|
|
3191
|
-
return
|
|
3208
|
+
$ne: function(a, u, h) {
|
|
3209
|
+
var R = v.$eq(a, u, h);
|
|
3210
|
+
return O(function(S, m, p, E) {
|
|
3192
3211
|
return !R(S, m, p, E);
|
|
3193
3212
|
});
|
|
3194
3213
|
},
|
|
3195
|
-
$and: function(a,
|
|
3196
|
-
return a.map(
|
|
3214
|
+
$and: function(a, u, h) {
|
|
3215
|
+
return a.map(A(h));
|
|
3197
3216
|
},
|
|
3198
|
-
$all: function(a,
|
|
3199
|
-
return
|
|
3217
|
+
$all: function(a, u, h) {
|
|
3218
|
+
return v.$and(a, u, h);
|
|
3200
3219
|
},
|
|
3201
|
-
$or: function(a,
|
|
3202
|
-
return a.map(
|
|
3220
|
+
$or: function(a, u, h) {
|
|
3221
|
+
return a.map(A(h));
|
|
3203
3222
|
},
|
|
3204
|
-
$nor: function(a,
|
|
3205
|
-
return a.map(
|
|
3223
|
+
$nor: function(a, u, h) {
|
|
3224
|
+
return a.map(A(h));
|
|
3206
3225
|
},
|
|
3207
|
-
$not: function(a,
|
|
3208
|
-
var R =
|
|
3226
|
+
$not: function(a, u, h) {
|
|
3227
|
+
var R = A(h)(a);
|
|
3209
3228
|
return function(S, m, p) {
|
|
3210
3229
|
return !c(R, S, m, p);
|
|
3211
3230
|
};
|
|
3212
3231
|
},
|
|
3213
3232
|
$type: function(a) {
|
|
3214
|
-
return function(
|
|
3215
|
-
return
|
|
3233
|
+
return function(u, h, R) {
|
|
3234
|
+
return u != null && (u instanceof a || u.constructor == a);
|
|
3216
3235
|
};
|
|
3217
3236
|
},
|
|
3218
|
-
$regex: function(a,
|
|
3219
|
-
return new RegExp(a,
|
|
3237
|
+
$regex: function(a, u) {
|
|
3238
|
+
return new RegExp(a, u.$options);
|
|
3220
3239
|
},
|
|
3221
3240
|
$where: function(a) {
|
|
3222
3241
|
if (typeof a == "function")
|
|
@@ -3225,118 +3244,118 @@ var Ir = { exports: {} };
|
|
|
3225
3244
|
'In CSP mode, sift does not support strings in "$where" condition'
|
|
3226
3245
|
);
|
|
3227
3246
|
},
|
|
3228
|
-
$elemMatch: function(a,
|
|
3229
|
-
return
|
|
3247
|
+
$elemMatch: function(a, u, h) {
|
|
3248
|
+
return A(h)(a);
|
|
3230
3249
|
},
|
|
3231
3250
|
$exists: function(a) {
|
|
3232
3251
|
return !!a;
|
|
3233
3252
|
}
|
|
3234
3253
|
};
|
|
3235
|
-
function y(a,
|
|
3236
|
-
return { options: a, validate:
|
|
3254
|
+
function y(a, u) {
|
|
3255
|
+
return { options: a, validate: u };
|
|
3237
3256
|
}
|
|
3238
|
-
function k(a,
|
|
3257
|
+
function k(a, u) {
|
|
3239
3258
|
var h = a.keyPath, R = a.child, S = a.query, m = [];
|
|
3240
|
-
if (function w(
|
|
3241
|
-
if (X === U.length ||
|
|
3242
|
-
return void
|
|
3243
|
-
var Q =
|
|
3244
|
-
if (f(
|
|
3245
|
-
for (var z = 0, we =
|
|
3246
|
-
w(
|
|
3259
|
+
if (function w(T, U, X, H, M) {
|
|
3260
|
+
if (X === U.length || T == null)
|
|
3261
|
+
return void M.push([T, U[X - 1], H]);
|
|
3262
|
+
var Q = l(U, X);
|
|
3263
|
+
if (f(T) && isNaN(Number(Q)))
|
|
3264
|
+
for (var z = 0, we = T.length; z < we; z++)
|
|
3265
|
+
w(l(T, z), U, X, T, M);
|
|
3247
3266
|
else
|
|
3248
|
-
w(
|
|
3249
|
-
}(
|
|
3267
|
+
w(l(T, Q), U, X + 1, T, M);
|
|
3268
|
+
}(u, h, 0, u, m), m.length === 1) {
|
|
3250
3269
|
var p = m[0];
|
|
3251
3270
|
return c(R, p[0], p[1], p[2]);
|
|
3252
3271
|
}
|
|
3253
|
-
for (var E = S && S.$ne !== void 0,
|
|
3254
|
-
var P = m[
|
|
3255
|
-
E ?
|
|
3272
|
+
for (var E = S && S.$ne !== void 0, I = E, N = 0; N < m.length; N++) {
|
|
3273
|
+
var P = m[N], C = c(R, P[0], P[1], P[2]);
|
|
3274
|
+
E ? I &= C : I |= C;
|
|
3256
3275
|
}
|
|
3257
|
-
return
|
|
3276
|
+
return I;
|
|
3258
3277
|
}
|
|
3259
|
-
function V(a,
|
|
3260
|
-
return y({ keyPath: a, child:
|
|
3278
|
+
function V(a, u, h) {
|
|
3279
|
+
return y({ keyPath: a, child: u, query: h }, k);
|
|
3261
3280
|
}
|
|
3262
|
-
function
|
|
3263
|
-
var
|
|
3281
|
+
function A(a) {
|
|
3282
|
+
var u = a.comparable, h = a.expressions, R = function(p) {
|
|
3264
3283
|
var E;
|
|
3265
3284
|
return (!p || !(E = p) || E.constructor !== Object && E.constructor !== Array && E.constructor.toString() !== "function Object() { [native code] }" && E.constructor.toString() !== "function Array() { [native code] }" || E.toJSON) && (p = { $eq: p }), p;
|
|
3266
3285
|
}, S = function(p) {
|
|
3267
|
-
p =
|
|
3286
|
+
p = u(p);
|
|
3268
3287
|
var E = [];
|
|
3269
|
-
for (var
|
|
3270
|
-
var
|
|
3271
|
-
if (
|
|
3272
|
-
var P =
|
|
3288
|
+
for (var I in p) {
|
|
3289
|
+
var N = p[I];
|
|
3290
|
+
if (I !== "$options") {
|
|
3291
|
+
var P = x[I] || a && h && h[I];
|
|
3273
3292
|
if (P)
|
|
3274
|
-
|
|
3293
|
+
v[I] && (N = v[I](N, p, a)), E.push(y(u(N), P));
|
|
3275
3294
|
else {
|
|
3276
|
-
if (
|
|
3277
|
-
throw new Error("Unknown operation " +
|
|
3278
|
-
var
|
|
3279
|
-
E.push(V(
|
|
3295
|
+
if (I.charCodeAt(0) === 36)
|
|
3296
|
+
throw new Error("Unknown operation " + I);
|
|
3297
|
+
var C = I.split(".");
|
|
3298
|
+
E.push(V(C, m(N), N));
|
|
3280
3299
|
}
|
|
3281
3300
|
}
|
|
3282
3301
|
}
|
|
3283
|
-
return E.length === 1 ? E[0] : y(E,
|
|
3302
|
+
return E.length === 1 ? E[0] : y(E, x.$and);
|
|
3284
3303
|
}, m = function(p) {
|
|
3285
|
-
return p = R(p), function E(
|
|
3286
|
-
if (!d(
|
|
3287
|
-
return
|
|
3288
|
-
for (var P in
|
|
3289
|
-
|
|
3290
|
-
return
|
|
3291
|
-
}(p, []).join(",").search(/[$.]/) === -1 ? y(p,
|
|
3304
|
+
return p = R(p), function E(I, N) {
|
|
3305
|
+
if (!d(I))
|
|
3306
|
+
return N;
|
|
3307
|
+
for (var P in I)
|
|
3308
|
+
N.push(P), E(I[P], N);
|
|
3309
|
+
return N;
|
|
3310
|
+
}(p, []).join(",").search(/[$.]/) === -1 ? y(p, F) : S(p);
|
|
3292
3311
|
};
|
|
3293
3312
|
return function(p) {
|
|
3294
3313
|
return S(R(p));
|
|
3295
3314
|
};
|
|
3296
3315
|
}
|
|
3297
|
-
function
|
|
3298
|
-
if (Object.prototype.toString.call(a) !== Object.prototype.toString.call(
|
|
3316
|
+
function F(a, u) {
|
|
3317
|
+
if (Object.prototype.toString.call(a) !== Object.prototype.toString.call(u))
|
|
3299
3318
|
return !1;
|
|
3300
3319
|
if (d(a)) {
|
|
3301
|
-
if (Object.keys(a).length !== Object.keys(
|
|
3320
|
+
if (Object.keys(a).length !== Object.keys(u).length)
|
|
3302
3321
|
return !1;
|
|
3303
3322
|
for (var h in a)
|
|
3304
|
-
if (!
|
|
3323
|
+
if (!F(a[h], u[h]))
|
|
3305
3324
|
return !1;
|
|
3306
3325
|
return !0;
|
|
3307
3326
|
}
|
|
3308
3327
|
if (f(a)) {
|
|
3309
|
-
if (a.length !==
|
|
3328
|
+
if (a.length !== u.length)
|
|
3310
3329
|
return !1;
|
|
3311
3330
|
for (var R = 0, S = a.length; R < S; R++)
|
|
3312
|
-
if (!
|
|
3331
|
+
if (!F(a[R], u[R]))
|
|
3313
3332
|
return !1;
|
|
3314
3333
|
return !0;
|
|
3315
3334
|
}
|
|
3316
|
-
return a ===
|
|
3335
|
+
return a === u;
|
|
3317
3336
|
}
|
|
3318
|
-
function J(a,
|
|
3319
|
-
var h =
|
|
3320
|
-
return
|
|
3337
|
+
function J(a, u) {
|
|
3338
|
+
var h = A(u)(a);
|
|
3339
|
+
return u && u.select && (h = {
|
|
3321
3340
|
options: h,
|
|
3322
3341
|
validate: function(R, S, m, p) {
|
|
3323
|
-
return c(R, S &&
|
|
3342
|
+
return c(R, S && u.select(S), m, p);
|
|
3324
3343
|
}
|
|
3325
3344
|
}), h;
|
|
3326
3345
|
}
|
|
3327
|
-
function Z(a,
|
|
3328
|
-
var h = J(a,
|
|
3346
|
+
function Z(a, u) {
|
|
3347
|
+
var h = J(a, u = Object.assign({ compare: D, comparable: W }, u));
|
|
3329
3348
|
return function(R, S, m) {
|
|
3330
3349
|
return c(h, R, S, m);
|
|
3331
3350
|
};
|
|
3332
3351
|
}
|
|
3333
|
-
function D(a,
|
|
3334
|
-
if (
|
|
3352
|
+
function D(a, u) {
|
|
3353
|
+
if (F(a, u))
|
|
3335
3354
|
return 0;
|
|
3336
|
-
if (o(a) === o(
|
|
3337
|
-
if (a >
|
|
3355
|
+
if (o(a) === o(u)) {
|
|
3356
|
+
if (a > u)
|
|
3338
3357
|
return 1;
|
|
3339
|
-
if (a <
|
|
3358
|
+
if (a < u)
|
|
3340
3359
|
return -1;
|
|
3341
3360
|
}
|
|
3342
3361
|
}
|
|
@@ -3361,15 +3380,15 @@ function di(t, e, r) {
|
|
|
3361
3380
|
function fi(t, e) {
|
|
3362
3381
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
|
|
3363
3382
|
}
|
|
3364
|
-
function
|
|
3365
|
-
return
|
|
3383
|
+
function ut(t) {
|
|
3384
|
+
return ut = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
|
|
3366
3385
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
3367
|
-
},
|
|
3386
|
+
}, ut(t);
|
|
3368
3387
|
}
|
|
3369
|
-
function
|
|
3370
|
-
return
|
|
3388
|
+
function Ge(t, e) {
|
|
3389
|
+
return Ge = Object.setPrototypeOf || function(n, s) {
|
|
3371
3390
|
return n.__proto__ = s, n;
|
|
3372
|
-
},
|
|
3391
|
+
}, Ge(t, e);
|
|
3373
3392
|
}
|
|
3374
3393
|
function mi() {
|
|
3375
3394
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
@@ -3383,20 +3402,20 @@ function mi() {
|
|
|
3383
3402
|
return !1;
|
|
3384
3403
|
}
|
|
3385
3404
|
}
|
|
3386
|
-
function
|
|
3387
|
-
return mi() ?
|
|
3405
|
+
function Fe(t, e, r) {
|
|
3406
|
+
return mi() ? Fe = Reflect.construct : Fe = function(s, o, i) {
|
|
3388
3407
|
var f = [null];
|
|
3389
3408
|
f.push.apply(f, o);
|
|
3390
|
-
var d = Function.bind.apply(s, f),
|
|
3391
|
-
return i &&
|
|
3392
|
-
},
|
|
3409
|
+
var d = Function.bind.apply(s, f), b = new d();
|
|
3410
|
+
return i && Ge(b, i.prototype), b;
|
|
3411
|
+
}, Fe.apply(null, arguments);
|
|
3393
3412
|
}
|
|
3394
3413
|
function pi(t) {
|
|
3395
3414
|
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
3396
3415
|
}
|
|
3397
|
-
function
|
|
3416
|
+
function ct(t) {
|
|
3398
3417
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
3399
|
-
return
|
|
3418
|
+
return ct = function(n) {
|
|
3400
3419
|
if (n === null || !pi(n))
|
|
3401
3420
|
return n;
|
|
3402
3421
|
if (typeof n != "function")
|
|
@@ -3407,7 +3426,7 @@ function lt(t) {
|
|
|
3407
3426
|
e.set(n, s);
|
|
3408
3427
|
}
|
|
3409
3428
|
function s() {
|
|
3410
|
-
return
|
|
3429
|
+
return Fe(n, arguments, ut(this).constructor);
|
|
3411
3430
|
}
|
|
3412
3431
|
return s.prototype = Object.create(n.prototype, {
|
|
3413
3432
|
constructor: {
|
|
@@ -3416,8 +3435,8 @@ function lt(t) {
|
|
|
3416
3435
|
writable: !0,
|
|
3417
3436
|
configurable: !0
|
|
3418
3437
|
}
|
|
3419
|
-
}),
|
|
3420
|
-
},
|
|
3438
|
+
}), Ge(s, n);
|
|
3439
|
+
}, ct(t);
|
|
3421
3440
|
}
|
|
3422
3441
|
function or(t) {
|
|
3423
3442
|
if (t === void 0)
|
|
@@ -3426,9 +3445,9 @@ function or(t) {
|
|
|
3426
3445
|
}
|
|
3427
3446
|
var Ar = function(e) {
|
|
3428
3447
|
return 'Cannot execute "' + e.action + '" on "' + e.subjectName + '"';
|
|
3429
|
-
},
|
|
3448
|
+
}, Ve = Ar, hi = /* @__PURE__ */ function(t) {
|
|
3430
3449
|
fi(e, t), e.setDefaultMessage = function(s) {
|
|
3431
|
-
s === null ?
|
|
3450
|
+
s === null ? Ve = Ar : Ve = typeof s == "string" ? function() {
|
|
3432
3451
|
return s;
|
|
3433
3452
|
} : s;
|
|
3434
3453
|
}, e.from = function(s) {
|
|
@@ -3439,7 +3458,7 @@ var Ar = function(e) {
|
|
|
3439
3458
|
};
|
|
3440
3459
|
function e(n, s) {
|
|
3441
3460
|
var o;
|
|
3442
|
-
return s === void 0 && (s = {}), o = t.call(this, n) || this, o._setMetadata(s), o.message = n ||
|
|
3461
|
+
return s === void 0 && (s = {}), o = t.call(this, n) || this, o._setMetadata(s), o.message = n || Ve(or(o)), o._customMessage = null, typeof Error.captureStackTrace == "function" && (o.name = o.constructor.name, Error.captureStackTrace(or(o), o.constructor)), o;
|
|
3443
3462
|
}
|
|
3444
3463
|
var r = e.prototype;
|
|
3445
3464
|
return r.setMessage = function(s) {
|
|
@@ -3456,13 +3475,13 @@ var Ar = function(e) {
|
|
|
3456
3475
|
subjectName: this.ability.subjectName(o)
|
|
3457
3476
|
});
|
|
3458
3477
|
var d = f ? f.reason : "";
|
|
3459
|
-
throw this.message = this._customMessage || d ||
|
|
3478
|
+
throw this.message = this._customMessage || d || Ve(this), this;
|
|
3460
3479
|
}
|
|
3461
3480
|
}, r._setMetadata = function(s) {
|
|
3462
3481
|
this.subject = s.subject, this.subjectName = s.subjectName, this.action = s.action, this.field = s.field;
|
|
3463
3482
|
}, e;
|
|
3464
|
-
}(
|
|
3465
|
-
function
|
|
3483
|
+
}(ct(Error));
|
|
3484
|
+
function dt(t) {
|
|
3466
3485
|
return Array.isArray(t) ? t : [t];
|
|
3467
3486
|
}
|
|
3468
3487
|
function vi(t) {
|
|
@@ -3490,7 +3509,7 @@ function Ri(t) {
|
|
|
3490
3509
|
}
|
|
3491
3510
|
var Ii = /* @__PURE__ */ function() {
|
|
3492
3511
|
function t(r) {
|
|
3493
|
-
this.actions = r.actions || r.action, this.subject = r.subject, this.fields = !r.fields || r.fields.length === 0 ? void 0 :
|
|
3512
|
+
this.actions = r.actions || r.action, this.subject = r.subject, this.fields = !r.fields || r.fields.length === 0 ? void 0 : dt(r.fields), Object.defineProperty(this, "_fieldsPattern", {
|
|
3494
3513
|
writable: !0
|
|
3495
3514
|
}), this.inverted = !!r.inverted, this.conditions = r.conditions, Object.defineProperty(this, "_matches", {
|
|
3496
3515
|
writable: !0,
|
|
@@ -3545,14 +3564,14 @@ var Ai = /* @__PURE__ */ function() {
|
|
|
3545
3564
|
return process.env.NODE_ENV !== "production" && o.isAllInverted && n.length && console.warn("[casl]: Ability contains only inverted rules. That means user will not be able to do any actions. This will be changed to Error throw in the next major version"), this[se].indexedRules = o.rules, this[se].hasPerFieldRules = o.hasPerFieldRules, this.emit("updated", s), this;
|
|
3546
3565
|
}, e.buildIndexFor = function(n) {
|
|
3547
3566
|
for (var s = /* @__PURE__ */ Object.create(null), o = this[se].RuleType, i = !0, f = !1, d = 0; d < n.length; d++) {
|
|
3548
|
-
var
|
|
3549
|
-
i = !!(i &&
|
|
3567
|
+
var b = new o(n[d]), l = this.expandActions(b.actions), g = dt(b.subject), O = n.length - d - 1;
|
|
3568
|
+
i = !!(i && b.inverted), !f && b.fields && (f = !0);
|
|
3550
3569
|
for (var c = 0; c < g.length; c++) {
|
|
3551
|
-
var
|
|
3552
|
-
s[
|
|
3553
|
-
for (var
|
|
3554
|
-
var y = v
|
|
3555
|
-
s[
|
|
3570
|
+
var x = g[c];
|
|
3571
|
+
s[x] = s[x] || /* @__PURE__ */ Object.create(null);
|
|
3572
|
+
for (var v = 0; v < l.length; v++) {
|
|
3573
|
+
var y = l[v];
|
|
3574
|
+
s[x][y] = s[x][y] || /* @__PURE__ */ Object.create(null), s[x][y][O] = b;
|
|
3556
3575
|
}
|
|
3557
3576
|
}
|
|
3558
3577
|
}
|
|
@@ -3562,7 +3581,7 @@ var Ai = /* @__PURE__ */ function() {
|
|
|
3562
3581
|
rules: s
|
|
3563
3582
|
};
|
|
3564
3583
|
}, e.expandActions = function(n) {
|
|
3565
|
-
for (var s = this[se].aliases, o =
|
|
3584
|
+
for (var s = this[se].aliases, o = dt(n), i = 0; i < o.length; ) {
|
|
3566
3585
|
var f = o[i++];
|
|
3567
3586
|
s.hasOwnProperty(f) && (o = o.concat(s[f]));
|
|
3568
3587
|
}
|
|
@@ -3582,8 +3601,8 @@ var Ai = /* @__PURE__ */ function() {
|
|
|
3582
3601
|
return i[f] || (i[f] = this.mergeRulesFor(n, o)), i[f];
|
|
3583
3602
|
}, e.mergeRulesFor = function(n, s) {
|
|
3584
3603
|
var o = this[se].indexedRules, i = [s, "all"].reduce(function(f, d) {
|
|
3585
|
-
var
|
|
3586
|
-
return
|
|
3604
|
+
var b = o[d];
|
|
3605
|
+
return b ? Object.assign(f, b[n], b.manage) : f;
|
|
3587
3606
|
}, []);
|
|
3588
3607
|
return i.filter(Boolean);
|
|
3589
3608
|
}, e.rulesFor = function(n, s, o) {
|
|
@@ -3658,23 +3677,23 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3658
3677
|
}, Ni = { class: "fm-typo-en-body-md-600" }, Ci = {
|
|
3659
3678
|
key: 0,
|
|
3660
3679
|
class: "space-y-8"
|
|
3661
|
-
}, xi = { class: "flex justify-end" }, ki = { class: "flex-1 pb-64 overflow-auto divide-y divide-fm-color-neutral-gray-100" }, Vi = { key: 0 }, Fi = ["onClick"], ji = { class: "flex justify-between items-center" }, Mi = { class: "fm-typo-en-body-lg-600" }, Ui = { class: "flex gap-8" }, Di = { class: "text-fm-color-typo-secondary" }, Gi = { class: "text-fm-color-typo-secondary" }, Bi = { class: "text-fm-color-typo-secondary" },
|
|
3680
|
+
}, xi = { class: "flex justify-end" }, ki = { class: "flex-1 pb-64 overflow-auto divide-y divide-fm-color-neutral-gray-100" }, Vi = { key: 0 }, Fi = ["onClick"], ji = { class: "flex justify-between items-center" }, Mi = { class: "fm-typo-en-body-lg-600" }, Ui = { class: "flex gap-8" }, Di = { class: "text-fm-color-typo-secondary" }, Gi = { class: "text-fm-color-typo-secondary" }, Bi = { class: "text-fm-color-typo-secondary" }, cl = /* @__PURE__ */ re({
|
|
3662
3681
|
__name: "Business",
|
|
3663
3682
|
setup(t) {
|
|
3664
3683
|
const { searchKey: e, filter: r } = li(), { copyTextToClipboard: n } = cr(), s = ur(), o = Y(() => s.breakpoints.value.xs), { t: i } = ve(), f = Y(() => {
|
|
3665
|
-
const { currentBusiness:
|
|
3684
|
+
const { currentBusiness: x, restaurants: v } = pe(), y = x.value;
|
|
3666
3685
|
if (!y)
|
|
3667
3686
|
return null;
|
|
3668
|
-
const { id: k, name: V, thumbnail:
|
|
3687
|
+
const { id: k, name: V, thumbnail: A, url: F } = y, J = v.value.filter((D) => D.managable).map((D) => {
|
|
3669
3688
|
var p;
|
|
3670
|
-
const { _id: W, profile: a } = D, { name:
|
|
3689
|
+
const { _id: W, profile: a } = D, { name: u, email: h, phoneNo: R, address: S, sstRegNo: m } = {
|
|
3671
3690
|
...a,
|
|
3672
3691
|
address: Oe(a.address)
|
|
3673
3692
|
};
|
|
3674
3693
|
return {
|
|
3675
3694
|
id: W,
|
|
3676
3695
|
code: ((p = D.profile) == null ? void 0 : p.code) || "--",
|
|
3677
|
-
name:
|
|
3696
|
+
name: u,
|
|
3678
3697
|
email: h,
|
|
3679
3698
|
phone: R,
|
|
3680
3699
|
address: S.formatted,
|
|
@@ -3685,12 +3704,12 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3685
3704
|
return {
|
|
3686
3705
|
id: k,
|
|
3687
3706
|
name: V,
|
|
3688
|
-
thumbnail:
|
|
3689
|
-
url: `https://feedmedev.cc/${
|
|
3707
|
+
thumbnail: A,
|
|
3708
|
+
url: `https://feedmedev.cc/${F || k}`,
|
|
3690
3709
|
doc: y,
|
|
3691
|
-
canCreateRestaurant: Oi(y,
|
|
3710
|
+
canCreateRestaurant: Oi(y, v.value),
|
|
3692
3711
|
restaurants: J.filter(
|
|
3693
|
-
({ code: D, name: W, address: a, phone:
|
|
3712
|
+
({ code: D, name: W, address: a, phone: u, email: h }) => r([D, W, a, u, h])
|
|
3694
3713
|
)
|
|
3695
3714
|
};
|
|
3696
3715
|
}), d = Y(() => [
|
|
@@ -3723,68 +3742,68 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3723
3742
|
{
|
|
3724
3743
|
header: i("settings.business.restaurant.tax.title"),
|
|
3725
3744
|
enableSorting: !1,
|
|
3726
|
-
cell: (
|
|
3745
|
+
cell: (x) => {
|
|
3727
3746
|
var y;
|
|
3728
|
-
const
|
|
3729
|
-
return (y =
|
|
3747
|
+
const v = x.row.original;
|
|
3748
|
+
return (y = v.doc.profile.sstRegNo) != null && y.length ? v.doc.profile.sstRegNo : i("settings.business.restaurant.tax.not_set");
|
|
3730
3749
|
}
|
|
3731
3750
|
},
|
|
3732
3751
|
{
|
|
3733
3752
|
id: "action",
|
|
3734
3753
|
header: "",
|
|
3735
3754
|
size: 80,
|
|
3736
|
-
cell: (
|
|
3737
|
-
const
|
|
3755
|
+
cell: (x) => {
|
|
3756
|
+
const v = x.row.original;
|
|
3738
3757
|
return Kr([
|
|
3739
3758
|
{
|
|
3740
3759
|
name: "edit",
|
|
3741
|
-
onClick: () => c(
|
|
3760
|
+
onClick: () => c(v)
|
|
3742
3761
|
},
|
|
3743
3762
|
{
|
|
3744
3763
|
name: "file_copy",
|
|
3745
3764
|
onClick: () => {
|
|
3746
|
-
n(
|
|
3765
|
+
n(v.id);
|
|
3747
3766
|
}
|
|
3748
3767
|
}
|
|
3749
3768
|
]);
|
|
3750
3769
|
}
|
|
3751
3770
|
}
|
|
3752
3771
|
]);
|
|
3753
|
-
function
|
|
3754
|
-
var
|
|
3755
|
-
n(((
|
|
3772
|
+
function b() {
|
|
3773
|
+
var x;
|
|
3774
|
+
n(((x = f.value) == null ? void 0 : x.url) || "");
|
|
3756
3775
|
}
|
|
3757
|
-
function
|
|
3776
|
+
function l() {
|
|
3758
3777
|
if (!f.value)
|
|
3759
3778
|
return;
|
|
3760
|
-
const { name:
|
|
3761
|
-
|
|
3779
|
+
const { name: x, url: v, thumbnail: y } = f.value.doc;
|
|
3780
|
+
Ye(g, vn, {
|
|
3762
3781
|
businessId: f.value.id,
|
|
3763
3782
|
initialValue: {
|
|
3764
|
-
name:
|
|
3765
|
-
url:
|
|
3783
|
+
name: x,
|
|
3784
|
+
url: v,
|
|
3766
3785
|
thumbnail: y
|
|
3767
3786
|
}
|
|
3768
3787
|
});
|
|
3769
3788
|
}
|
|
3770
3789
|
const g = Fr();
|
|
3771
|
-
function
|
|
3772
|
-
|
|
3790
|
+
function O() {
|
|
3791
|
+
Ye(g, sr, {
|
|
3773
3792
|
enableFeedmeExpress: !1
|
|
3774
3793
|
});
|
|
3775
3794
|
}
|
|
3776
|
-
function c(
|
|
3777
|
-
var
|
|
3778
|
-
|
|
3779
|
-
restaurantId:
|
|
3780
|
-
restaurant:
|
|
3781
|
-
enableFeedmeExpress: ((
|
|
3795
|
+
function c(x) {
|
|
3796
|
+
var v;
|
|
3797
|
+
Ye(g, sr, {
|
|
3798
|
+
restaurantId: x.id,
|
|
3799
|
+
restaurant: x.doc,
|
|
3800
|
+
enableFeedmeExpress: ((v = x.doc.feedmeDelivery) == null ? void 0 : v.enable) || !1
|
|
3782
3801
|
});
|
|
3783
3802
|
}
|
|
3784
|
-
return (
|
|
3803
|
+
return (x, v) => {
|
|
3785
3804
|
var Z;
|
|
3786
|
-
const y = q("FmSpacer"), k = q("FmButton"), V = q("FmTooltip"),
|
|
3787
|
-
return
|
|
3805
|
+
const y = q("FmSpacer"), k = q("FmButton"), V = q("FmTooltip"), A = q("FmSearch"), F = q("FmTable"), J = q("FmCircularProgress");
|
|
3806
|
+
return j(), te(Br, {
|
|
3788
3807
|
heading: ((Z = f.value) == null ? void 0 : Z.name) || "--"
|
|
3789
3808
|
}, {
|
|
3790
3809
|
"sub-heading": K(() => {
|
|
@@ -3794,36 +3813,36 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3794
3813
|
$("span", null, G(_(i)("settings.business.url")) + ": ", 1),
|
|
3795
3814
|
$("span", {
|
|
3796
3815
|
class: "cursor-pointer xs:w-max-[200px] truncate",
|
|
3797
|
-
onClick:
|
|
3816
|
+
onClick: b
|
|
3798
3817
|
}, G((D = f.value) == null ? void 0 : D.url), 1)
|
|
3799
3818
|
])
|
|
3800
3819
|
];
|
|
3801
3820
|
}),
|
|
3802
3821
|
"append-heading": K(() => [
|
|
3803
3822
|
$("div", Pi, [
|
|
3804
|
-
|
|
3805
|
-
o.value ? (
|
|
3806
|
-
|
|
3807
|
-
onClick:
|
|
3823
|
+
L(y),
|
|
3824
|
+
o.value ? (j(), B(oe, { key: 1 }, [
|
|
3825
|
+
L(Gr, {
|
|
3826
|
+
onClick: O,
|
|
3808
3827
|
label: _(i)("settings.business.add_restaurant"),
|
|
3809
3828
|
"prepend-icon": "add"
|
|
3810
3829
|
}, null, 8, ["label"]),
|
|
3811
|
-
|
|
3830
|
+
L(tn, null, {
|
|
3812
3831
|
default: K(() => [
|
|
3813
|
-
|
|
3832
|
+
L(nn, {
|
|
3814
3833
|
label: _(i)("common.edit"),
|
|
3815
|
-
onClick:
|
|
3834
|
+
onClick: l
|
|
3816
3835
|
}, null, 8, ["label"])
|
|
3817
3836
|
]),
|
|
3818
3837
|
_: 1
|
|
3819
3838
|
})
|
|
3820
|
-
], 64)) : (
|
|
3821
|
-
|
|
3822
|
-
onClick:
|
|
3839
|
+
], 64)) : (j(), B("div", Ti, [
|
|
3840
|
+
L(k, {
|
|
3841
|
+
onClick: l,
|
|
3823
3842
|
variant: "secondary",
|
|
3824
3843
|
label: _(i)("common.edit")
|
|
3825
3844
|
}, null, 8, ["label"]),
|
|
3826
|
-
|
|
3845
|
+
L(V, {
|
|
3827
3846
|
variant: "rich",
|
|
3828
3847
|
placement: "left",
|
|
3829
3848
|
"z-index": 100
|
|
@@ -3831,7 +3850,7 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3831
3850
|
content: K(() => {
|
|
3832
3851
|
var D;
|
|
3833
3852
|
return [
|
|
3834
|
-
(D = f.value) != null && D.canCreateRestaurant ? ce("", !0) : (
|
|
3853
|
+
(D = f.value) != null && D.canCreateRestaurant ? ce("", !0) : (j(), B("div", Li, [
|
|
3835
3854
|
$("p", Ni, G(_(i)("settings.business.quota.limit_title")), 1),
|
|
3836
3855
|
$("p", null, G(_(i)("settings.business.quota.limit_message")), 1)
|
|
3837
3856
|
]))
|
|
@@ -3840,8 +3859,8 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3840
3859
|
default: K(() => {
|
|
3841
3860
|
var D;
|
|
3842
3861
|
return [
|
|
3843
|
-
|
|
3844
|
-
onClick:
|
|
3862
|
+
L(k, {
|
|
3863
|
+
onClick: O,
|
|
3845
3864
|
label: _(i)("settings.business.add_restaurant"),
|
|
3846
3865
|
disabled: !((D = f.value) != null && D.canCreateRestaurant),
|
|
3847
3866
|
"prepend-icon": "add"
|
|
@@ -3856,17 +3875,17 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3856
3875
|
default: K(() => {
|
|
3857
3876
|
var D, W;
|
|
3858
3877
|
return [
|
|
3859
|
-
o.value ? (
|
|
3860
|
-
|
|
3878
|
+
o.value ? (j(), B(oe, { key: 1 }, [
|
|
3879
|
+
L(A, {
|
|
3861
3880
|
class: "my-8 mx-16",
|
|
3862
3881
|
modelValue: _(e),
|
|
3863
|
-
"onUpdate:modelValue":
|
|
3882
|
+
"onUpdate:modelValue": v[2] || (v[2] = (a) => Pt(e) ? e.value = a : null),
|
|
3864
3883
|
placeholder: _(i)("settings.business.search_restaurants")
|
|
3865
3884
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
3866
3885
|
$("div", ki, [
|
|
3867
|
-
f.value ? (
|
|
3868
|
-
var
|
|
3869
|
-
return
|
|
3886
|
+
f.value ? (j(!0), B(oe, { key: 1 }, he((W = f.value) == null ? void 0 : W.restaurants, (a) => {
|
|
3887
|
+
var u;
|
|
3888
|
+
return j(), B("div", {
|
|
3870
3889
|
key: a.id,
|
|
3871
3890
|
class: "py-12 px-16 space-y-4",
|
|
3872
3891
|
onClick: (h) => c(a)
|
|
@@ -3874,43 +3893,43 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3874
3893
|
$("div", ji, [
|
|
3875
3894
|
$("div", Mi, G(a.name), 1),
|
|
3876
3895
|
$("div", Ui, [
|
|
3877
|
-
|
|
3896
|
+
L(k, {
|
|
3878
3897
|
icon: "edit",
|
|
3879
3898
|
"text-color": "neutral-gray-400",
|
|
3880
3899
|
variant: "tertiary",
|
|
3881
|
-
onClick:
|
|
3900
|
+
onClick: ot((h) => c(a), ["stop"])
|
|
3882
3901
|
}, null, 8, ["onClick"]),
|
|
3883
|
-
|
|
3902
|
+
L(k, {
|
|
3884
3903
|
icon: "file_copy",
|
|
3885
3904
|
"text-color": "neutral-gray-400",
|
|
3886
3905
|
variant: "tertiary",
|
|
3887
|
-
onClick:
|
|
3906
|
+
onClick: ot((h) => _(n)(a.id), ["stop"])
|
|
3888
3907
|
}, null, 8, ["onClick"])
|
|
3889
3908
|
])
|
|
3890
3909
|
]),
|
|
3891
3910
|
$("div", Di, G(_(i)("settings.business.restaurant.contact")) + ": " + G(a.phone), 1),
|
|
3892
3911
|
$("div", Gi, G(_(i)("settings.business.restaurant.email")) + ": " + G(a.email), 1),
|
|
3893
|
-
$("div", Bi, G(_(i)("settings.business.restaurant.tax.title")) + ": " + G((
|
|
3912
|
+
$("div", Bi, G(_(i)("settings.business.restaurant.tax.title")) + ": " + G((u = a.doc.profile.sstRegNo) != null && u.length ? a.doc.profile.sstRegNo : _(i)("settings.business.restaurant.tax.not_set")), 1)
|
|
3894
3913
|
], 8, Fi);
|
|
3895
|
-
}), 128)) : (
|
|
3896
|
-
|
|
3914
|
+
}), 128)) : (j(), B("div", Vi, [
|
|
3915
|
+
L(J, { size: "lg" })
|
|
3897
3916
|
]))
|
|
3898
3917
|
])
|
|
3899
|
-
], 64)) : (
|
|
3918
|
+
], 64)) : (j(), B("div", Ci, [
|
|
3900
3919
|
$("div", xi, [
|
|
3901
|
-
|
|
3920
|
+
L(A, {
|
|
3902
3921
|
class: "w-[320px]",
|
|
3903
3922
|
modelValue: _(e),
|
|
3904
|
-
"onUpdate:modelValue":
|
|
3923
|
+
"onUpdate:modelValue": v[0] || (v[0] = (a) => Pt(e) ? e.value = a : null),
|
|
3905
3924
|
placeholder: _(i)("settings.business.search_restaurants")
|
|
3906
3925
|
}, null, 8, ["modelValue", "placeholder"])
|
|
3907
3926
|
]),
|
|
3908
|
-
|
|
3927
|
+
L(F, {
|
|
3909
3928
|
"column-defs": d.value,
|
|
3910
3929
|
"row-data": ((D = f.value) == null ? void 0 : D.restaurants) || [],
|
|
3911
3930
|
"shrink-at": !1,
|
|
3912
3931
|
loading: !f.value,
|
|
3913
|
-
onRowClick:
|
|
3932
|
+
onRowClick: v[1] || (v[1] = (a) => c(a.original))
|
|
3914
3933
|
}, null, 8, ["column-defs", "row-data", "loading"])
|
|
3915
3934
|
]))
|
|
3916
3935
|
];
|
|
@@ -3921,5 +3940,5 @@ const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex
|
|
|
3921
3940
|
}
|
|
3922
3941
|
});
|
|
3923
3942
|
export {
|
|
3924
|
-
|
|
3943
|
+
cl as default
|
|
3925
3944
|
};
|