@feedmepos/mf-connect 0.0.5-beta.20 → 0.0.5-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-DUWe-WYz.js → Analytic-CVpCpEBl.js} +12 -13
- package/dist/{Broadcast-CAmI-dS9.js → Broadcast-C0SHdFpT.js} +11 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CQbePPyW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B94-nKP4.js} +8 -8
- package/dist/Card-C5yXOEhK.js +827 -0
- package/dist/Collections-Ka_q_V3S.js +424 -0
- package/dist/{Credit-CxyIk-mH.js → Credit-CmTa3hjm.js} +11 -12
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-AGQwe70B.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CNSfNMA_.js} +23 -24
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-y263YYGy.js → EffectSheet.vue_vue_type_style_index_0_lang-BLfzJ46z.js} +5 -5
- package/dist/{Experience-DH6nbWal.js → Experience-yd4ZPBXy.js} +11 -12
- package/dist/{Game-BGMGl6Uw.js → Game-DYTplwOh.js} +22 -23
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rs3BEnpo.js → ImageInput.vue_vue_type_script_setup_true_lang-BuuYdlE4.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BIwBZ7FH.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BfWuKa1w.js} +1 -1
- package/dist/{MainLayout-CjvNB4RK.js → MainLayout-8tc3ZtLI.js} +2 -2
- package/dist/{Marketing-BLbR9_KN.js → Marketing-D5Le-SWn.js} +19 -20
- package/dist/{Member-BqPHWUos.js → Member-CzY5Um_y.js} +2 -2
- package/dist/{MemberList-DoBv4aBY.js → MemberList-DpFa2ttF.js} +20 -21
- package/dist/{MemberTransactions-Cri3UCrX.js → MemberTransactions-CDKkRdfp.js} +4 -4
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang--qiv_ZUS.js → MessageInput.vue_vue_type_script_setup_true_lang-BD27S5wB.js} +4 -4
- package/dist/{Mission-BXRMH__V.js → Mission-9BmMMzyr.js} +25 -26
- package/dist/{Point-MS30HaX7.js → Point-IiWgZIyI.js} +11 -12
- package/dist/{Promotion-BuOELg3x.js → Promotion-BmEQ28sH.js} +42 -44
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CAnO-3XN.js → RuleGroup.vue_vue_type_script_setup_true_lang-BhOoz0HL.js} +12 -12
- package/dist/{Segment-C9s9hDBX.js → Segment-D1ID4Rmt.js} +39 -40
- package/dist/{Setting-CHk3QEsN.js → Setting-B3WeabHJ.js} +17 -18
- package/dist/{Store-CQWAs4Ew.js → Store-CKFLaYKH.js} +18 -19
- package/dist/{StoreRewards-DJkh42Es.js → StoreRewards-DIQL173Q.js} +27 -28
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2kjcViv.js +794 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CEBqSaBp.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C1QmPELI.js} +1 -1
- package/dist/{Tier-3zGwCsja.js → Tier-BvE47ciZ.js} +43 -43
- package/dist/{Title-TotAXw2n.js → Title-DfcczCHg.js} +42 -42
- package/dist/Transaction-CF0f3QCU.js +36 -0
- package/dist/Voucher-CCOZjT6k.js +481 -0
- package/dist/{app--rCS8dWb.js → app-B4oDOeXm.js} +1456 -1456
- package/dist/app.js +1 -1
- package/dist/{campaign-BPWXzTLO.js → campaign-BWwTQs_d.js} +2 -2
- package/dist/{collection.fn-NFB67-6j.js → collection.fn-C5XN0PPR.js} +2 -2
- package/dist/{dto-ChVvY7GG.js → dto-Ktuw3JiD.js} +138 -139
- package/dist/{effect-CbwZuhWY.js → effect-BM2dJl1a.js} +1 -1
- package/dist/export-LApNX--r.js +97 -0
- package/dist/{helper-D16-sxkv.js → helper-BUC1dAUX.js} +1 -1
- package/dist/{index-EmqFPQGb.js → index-B6GvsaDA.js} +1 -1
- package/dist/{index-DlqRXSLU.js → index-BZMMIcyM.js} +1 -1
- package/dist/{index-Blbjd5Y9.js → index-Bc-r4pik.js} +5 -5
- package/dist/{index-CGTaSvN6.js → index-Bt_xFt9g.js} +1 -1
- package/dist/{index-D-bPAs1d.js → index-C7qI5flU.js} +2 -2
- package/dist/{index-Dh6x04Wk.js → index-C86T8VON.js} +2 -2
- package/dist/{index-C7SZ9gvu.js → index-CvZ_MhCE.js} +7 -7
- package/dist/{index-vsgk07Y2.js → index-CzVShOLS.js} +1 -1
- package/dist/{index-BGAWJ6-h.js → index-DSUUVWFu.js} +3 -3
- package/dist/{index--VC0kdJZ.js → index-DVJQt0_Q.js} +2 -2
- package/dist/{plugins-Ccv9TIl4.js → loading-CM3ZyteE.js} +8204 -8108
- package/dist/{lodash-7Fz14kKI.js → lodash-DYMRs712.js} +1 -1
- package/dist/{membership-ByQds6Nb.js → membership-D0Z9EBWi.js} +3 -3
- package/dist/{money-DsiT1-aV.js → money-Cyt6uuok.js} +1 -1
- package/dist/{number-D4SI_vwy.js → number-CSBV_14_.js} +1 -1
- package/dist/{rule-NzJI8lrC.js → rule-C4ovkUox.js} +2 -2
- package/dist/{rule-builder-CNz0WgMq.js → rule-builder-DxDhft7B.js} +1 -1
- package/dist/{template-9wDwTGR-.js → template-Dd9xYS-m.js} +6 -6
- package/dist/{usePagination-CsZrmXsU.js → usePagination-cObe7G1g.js} +1 -1
- package/dist/{xlsx-CUa5ix7U.js → xlsx--baqnGDY.js} +1 -1
- package/package.json +1 -1
- package/dist/Card-DhgETjhz.js +0 -914
- package/dist/Collections-9fPXIR34.js +0 -424
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-1GgzlIRZ.js +0 -693
- package/dist/Transaction-gV9vaJCR.js +0 -34
- package/dist/Voucher-BJ-pXo7Y.js +0 -449
- package/dist/loading-B5tUSWjN.js +0 -100
|
@@ -0,0 +1,827 @@
|
|
|
1
|
+
import { defineComponent as Z, ref as g, computed as V, watch as he, onMounted as ee, resolveComponent as f, openBlock as m, createBlock as C, unref as n, isRef as J, withCtx as T, createElementVNode as c, createVNode as d, createElementBlock as y, Fragment as P, renderList as Q, createCommentVNode as A, normalizeClass as ve, createSlots as Ee, withModifiers as Se, h as W } from "vue";
|
|
2
|
+
import { _ as ke } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { h as re } from "./moment-BWErdI6_.js";
|
|
4
|
+
import { useDialog as Te, components as ye } from "@feedmepos/ui-library";
|
|
5
|
+
import { p as Re, u as ne, f as ie } from "./loading-CM3ZyteE.js";
|
|
6
|
+
import { u as Ae, g as Ce, a as Ie } from "./app-B4oDOeXm.js";
|
|
7
|
+
import { u as te } from "./membership-D0Z9EBWi.js";
|
|
8
|
+
import { _ as le } from "./index-Bc-r4pik.js";
|
|
9
|
+
import { m as oe } from "./index-B6GvsaDA.js";
|
|
10
|
+
import { _ as de } from "./ImageInput.vue_vue_type_script_setup_true_lang-BuuYdlE4.js";
|
|
11
|
+
import "./index-C7qI5flU.js";
|
|
12
|
+
import "./index-C86T8VON.js";
|
|
13
|
+
import { j as Oe } from "./index-CvZ_MhCE.js";
|
|
14
|
+
import "./index-DSUUVWFu.js";
|
|
15
|
+
import "./index-DVJQt0_Q.js";
|
|
16
|
+
import "./index-CzVShOLS.js";
|
|
17
|
+
import { a as xe } from "./object-qECH92oz.js";
|
|
18
|
+
import { w as Ne } from "./xlsx--baqnGDY.js";
|
|
19
|
+
import { e as De, C as Ue } from "./export-LApNX--r.js";
|
|
20
|
+
import { u as we, _ as He } from "./usePagination-cObe7G1g.js";
|
|
21
|
+
import { o as Fe } from "./objectId-dwaoBfJX.js";
|
|
22
|
+
const Be = /* @__PURE__ */ c("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1), Pe = { class: "space-y-16" }, Me = /* @__PURE__ */ c("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1), Ve = { class: "gap-16 grid grid-cols-2" }, Ge = { class: "space-y-16" }, Le = /* @__PURE__ */ c("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1), je = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "flex flex-col gap-[16px] w-full"
|
|
25
|
+
}, $e = { class: "flex flex-col gap-[8px]" }, Ke = /* @__PURE__ */ c("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1), Xe = ["src"], Ye = { class: "flex pt-[24px] gap-[24px]" }, We = ["src", "onClick", "alt"], qe = { class: "flex items-center gap-8" }, ze = /* @__PURE__ */ Z({
|
|
26
|
+
__name: "CreateCardSheet",
|
|
27
|
+
emits: ["success", "export"],
|
|
28
|
+
setup(e, { expose: i, emit: D }) {
|
|
29
|
+
const { minor: U } = ne, v = te(), I = g(), b = g(!1), O = D, h = g(!1);
|
|
30
|
+
function E(p) {
|
|
31
|
+
h.value = p, p && (a.value = {
|
|
32
|
+
quantity: 1,
|
|
33
|
+
code: "",
|
|
34
|
+
codeConfig: {
|
|
35
|
+
length: 12,
|
|
36
|
+
charset: "1234567890",
|
|
37
|
+
prefix: "",
|
|
38
|
+
suffix: "",
|
|
39
|
+
pattern: "####-####-####-####"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const a = g({
|
|
44
|
+
quantity: 1,
|
|
45
|
+
code: "",
|
|
46
|
+
codeConfig: {
|
|
47
|
+
length: 12,
|
|
48
|
+
charset: "1234567890",
|
|
49
|
+
prefix: "",
|
|
50
|
+
suffix: "",
|
|
51
|
+
pattern: "####-####-####-####"
|
|
52
|
+
},
|
|
53
|
+
setCardOnBind: !1,
|
|
54
|
+
bundle: void 0
|
|
55
|
+
}), x = [
|
|
56
|
+
{
|
|
57
|
+
label: "Bulk number",
|
|
58
|
+
value: "bulk",
|
|
59
|
+
sublabel: "Bulk generate unique number"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: "Custom number",
|
|
63
|
+
value: "single",
|
|
64
|
+
sublabel: "Enter your own custom number"
|
|
65
|
+
}
|
|
66
|
+
], H = [
|
|
67
|
+
{
|
|
68
|
+
label: "Alphanumeric",
|
|
69
|
+
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: "Alphabetic",
|
|
73
|
+
value: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
74
|
+
},
|
|
75
|
+
{ label: "Alphabetic Lowercase", value: "abcdefghijklmnopqrstuvwxyz" },
|
|
76
|
+
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
77
|
+
{ label: "Numbers", value: "0123456789" },
|
|
78
|
+
{ label: "Custom", value: "" }
|
|
79
|
+
], F = g(H[0].value), S = g("bulk"), w = g(0), B = V(
|
|
80
|
+
() => {
|
|
81
|
+
var p;
|
|
82
|
+
return (p = v.membership.design) == null ? void 0 : p[w.value];
|
|
83
|
+
}
|
|
84
|
+
), r = g(!1), o = V(
|
|
85
|
+
() => v.sortedStoreCategories.flatMap((p) => p.bundles)
|
|
86
|
+
);
|
|
87
|
+
async function u(p) {
|
|
88
|
+
var R, M;
|
|
89
|
+
if (await ((R = I.value) == null ? void 0 : R.validateInputs()), !b.value) return;
|
|
90
|
+
p.design = (M = B.value) == null ? void 0 : M.image;
|
|
91
|
+
const t = await Re.confirm(
|
|
92
|
+
"",
|
|
93
|
+
"Do you want to export generated card(s)?",
|
|
94
|
+
"Export",
|
|
95
|
+
"Generate and without export"
|
|
96
|
+
);
|
|
97
|
+
console.log(t), await U(
|
|
98
|
+
async () => {
|
|
99
|
+
const _ = await oe.createCards(p);
|
|
100
|
+
console.log(_), await O("success"), t && await O("export", _);
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
message: "Creating card(s)",
|
|
104
|
+
successMessage: "Card(s) created"
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
return i({
|
|
109
|
+
showSheet: E
|
|
110
|
+
}), he(
|
|
111
|
+
() => a.value.codeConfig.length,
|
|
112
|
+
(p, t) => {
|
|
113
|
+
p != t && (a.value.codeConfig.pattern = "#".repeat(Number(p)));
|
|
114
|
+
}
|
|
115
|
+
), ee(async () => {
|
|
116
|
+
await v.readMemberStore();
|
|
117
|
+
}), (p, t) => {
|
|
118
|
+
const R = f("FmRadio"), M = f("FmRadioGroup"), _ = f("FmSwitch"), j = f("FmStepperField"), $ = f("FmSelect"), G = f("FmTextField"), fe = f("FmTextarea"), K = f("FmButton"), ge = f("FmForm"), be = f("FmSideSheet");
|
|
119
|
+
return m(), C(be, {
|
|
120
|
+
"max-width": 560,
|
|
121
|
+
"dismiss-away": !0,
|
|
122
|
+
header: "Create collection",
|
|
123
|
+
modelValue: n(h),
|
|
124
|
+
"onUpdate:modelValue": [
|
|
125
|
+
t[19] || (t[19] = (N) => J(h) ? h.value = N : null),
|
|
126
|
+
t[20] || (t[20] = (N) => h.value = N)
|
|
127
|
+
]
|
|
128
|
+
}, {
|
|
129
|
+
"side-sheet-footer": T(() => [
|
|
130
|
+
c("div", qe, [
|
|
131
|
+
d(K, {
|
|
132
|
+
label: "Save",
|
|
133
|
+
onClick: t[17] || (t[17] = (N) => u(n(a))),
|
|
134
|
+
loading: n(Ae)().isLoading
|
|
135
|
+
}, null, 8, ["loading"]),
|
|
136
|
+
d(K, {
|
|
137
|
+
label: "Cancel",
|
|
138
|
+
type: "button",
|
|
139
|
+
variant: "tertiary",
|
|
140
|
+
onClick: t[18] || (t[18] = (N) => h.value = !1)
|
|
141
|
+
})
|
|
142
|
+
])
|
|
143
|
+
]),
|
|
144
|
+
default: T(() => [
|
|
145
|
+
d(ge, {
|
|
146
|
+
ref_key: "form",
|
|
147
|
+
ref: I,
|
|
148
|
+
class: "space-y-40",
|
|
149
|
+
onValidationSuccess: t[15] || (t[15] = (N) => b.value = !0),
|
|
150
|
+
onValidationFailed: t[16] || (t[16] = (N) => b.value = !1)
|
|
151
|
+
}, {
|
|
152
|
+
default: T(() => {
|
|
153
|
+
var N, se, ae;
|
|
154
|
+
return [
|
|
155
|
+
c("div", null, [
|
|
156
|
+
Be,
|
|
157
|
+
d(M, {
|
|
158
|
+
modelValue: n(S),
|
|
159
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => J(S) ? S.value = s : null),
|
|
160
|
+
inline: !1
|
|
161
|
+
}, {
|
|
162
|
+
default: T(() => [
|
|
163
|
+
(m(), y(P, null, Q(x, (s) => d(R, {
|
|
164
|
+
key: s.value,
|
|
165
|
+
value: s.value,
|
|
166
|
+
label: s.label,
|
|
167
|
+
sublabel: s.sublabel
|
|
168
|
+
}, null, 8, ["value", "label", "sublabel"])), 64))
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
}, 8, ["modelValue"])
|
|
172
|
+
]),
|
|
173
|
+
c("div", Pe, [
|
|
174
|
+
Me,
|
|
175
|
+
n(S) === "bulk" ? (m(), y(P, { key: 0 }, [
|
|
176
|
+
d(_, {
|
|
177
|
+
"model-value": n(r),
|
|
178
|
+
"label-placement": "right",
|
|
179
|
+
value: "true",
|
|
180
|
+
label: "Advance number setting",
|
|
181
|
+
required: !0,
|
|
182
|
+
"onUpdate:modelValue": t[1] || (t[1] = () => r.value = !n(r))
|
|
183
|
+
}, null, 8, ["model-value"]),
|
|
184
|
+
n(r) ? (m(), y(P, { key: 0 }, [
|
|
185
|
+
d(j, {
|
|
186
|
+
"model-value": n(a).codeConfig.length || null,
|
|
187
|
+
"onUpdate:modelValue": t[2] || (t[2] = (s) => n(a).codeConfig.length = s),
|
|
188
|
+
label: "Code length",
|
|
189
|
+
rules: [(s) => Number(s) >= 1 || "Code length must at least 1"],
|
|
190
|
+
required: !0
|
|
191
|
+
}, null, 8, ["model-value", "rules"]),
|
|
192
|
+
d($, {
|
|
193
|
+
label: "Charset",
|
|
194
|
+
"model-value": n(F),
|
|
195
|
+
items: H,
|
|
196
|
+
"helper-text": n(a).codeConfig.charset.length > 62 ? `${n(a).codeConfig.charset.substring(0, 62)}...` : n(a).codeConfig.charset,
|
|
197
|
+
"onUpdate:modelValue": t[3] || (t[3] = (s) => {
|
|
198
|
+
F.value = s, n(a).codeConfig.charset = s;
|
|
199
|
+
})
|
|
200
|
+
}, null, 8, ["model-value", "helper-text"]),
|
|
201
|
+
n(F) === "" ? (m(), C(G, {
|
|
202
|
+
key: 0,
|
|
203
|
+
modelValue: n(a).codeConfig.charset,
|
|
204
|
+
"onUpdate:modelValue": t[4] || (t[4] = (s) => n(a).codeConfig.charset = s),
|
|
205
|
+
label: "Custom Charset",
|
|
206
|
+
required: ""
|
|
207
|
+
}, null, 8, ["modelValue"])) : A("", !0),
|
|
208
|
+
c("div", Ve, [
|
|
209
|
+
d(G, {
|
|
210
|
+
modelValue: n(a).codeConfig.prefix,
|
|
211
|
+
"onUpdate:modelValue": t[5] || (t[5] = (s) => n(a).codeConfig.prefix = s),
|
|
212
|
+
label: "Prefix (Optional)"
|
|
213
|
+
}, null, 8, ["modelValue"]),
|
|
214
|
+
d(G, {
|
|
215
|
+
modelValue: n(a).codeConfig.suffix,
|
|
216
|
+
"onUpdate:modelValue": t[6] || (t[6] = (s) => n(a).codeConfig.suffix = s),
|
|
217
|
+
label: "Suffix (Optional)"
|
|
218
|
+
}, null, 8, ["modelValue"])
|
|
219
|
+
]),
|
|
220
|
+
d(G, {
|
|
221
|
+
modelValue: n(a).codeConfig.pattern,
|
|
222
|
+
"onUpdate:modelValue": t[7] || (t[7] = (s) => n(a).codeConfig.pattern = s),
|
|
223
|
+
label: "Pattern",
|
|
224
|
+
required: !0
|
|
225
|
+
}, null, 8, ["modelValue"])
|
|
226
|
+
], 64)) : A("", !0),
|
|
227
|
+
d(G, {
|
|
228
|
+
modelValue: n(a).quantity,
|
|
229
|
+
"onUpdate:modelValue": t[8] || (t[8] = (s) => n(a).quantity = s),
|
|
230
|
+
label: "Number of code",
|
|
231
|
+
rules: [
|
|
232
|
+
(s) => s >= 1 || "Quantity cannot be less than 1",
|
|
233
|
+
(s) => s <= 1e4 || "Quantity cannot more than 10,000"
|
|
234
|
+
],
|
|
235
|
+
required: !0,
|
|
236
|
+
"helper-text": `${n(a).quantity} card will be created`
|
|
237
|
+
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
238
|
+
], 64)) : A("", !0),
|
|
239
|
+
n(S) !== "bulk" ? (m(), C(fe, {
|
|
240
|
+
key: 1,
|
|
241
|
+
modelValue: n(a).code,
|
|
242
|
+
"onUpdate:modelValue": t[9] || (t[9] = (s) => n(a).code = s),
|
|
243
|
+
label: "Custom Card Number",
|
|
244
|
+
rules: [(s) => n(S) != "single" || !!s || "Custom code is required"],
|
|
245
|
+
placeholder: "(For multiple numbers, please enter in the new row.)"
|
|
246
|
+
}, null, 8, ["modelValue", "rules"])) : A("", !0)
|
|
247
|
+
]),
|
|
248
|
+
c("div", Ge, [
|
|
249
|
+
Le,
|
|
250
|
+
d(_, {
|
|
251
|
+
"label-placement": "right",
|
|
252
|
+
label: "Set card number on bind",
|
|
253
|
+
"model-value": n(a).setCardOnBind || !1,
|
|
254
|
+
"onUpdate:modelValue": t[10] || (t[10] = (s) => n(a).setCardOnBind = s)
|
|
255
|
+
}, null, 8, ["model-value"]),
|
|
256
|
+
d(le, {
|
|
257
|
+
label: "Activate bundle on bind",
|
|
258
|
+
placeholder: "Select bundle",
|
|
259
|
+
items: n(o).filter((s) => !s.stripePriceId).map((s) => ({ label: s.name, value: s._id })),
|
|
260
|
+
modelValue: n(a).bundle,
|
|
261
|
+
"onUpdate:modelValue": t[12] || (t[12] = (s) => n(a).bundle = s)
|
|
262
|
+
}, {
|
|
263
|
+
append: T(() => [
|
|
264
|
+
n(a).bundle ? (m(), C(K, {
|
|
265
|
+
key: 0,
|
|
266
|
+
icon: "link_off",
|
|
267
|
+
variant: "plain",
|
|
268
|
+
onClick: t[11] || (t[11] = (s) => n(a).bundle = void 0)
|
|
269
|
+
})) : A("", !0)
|
|
270
|
+
]),
|
|
271
|
+
_: 1
|
|
272
|
+
}, 8, ["items", "modelValue"]),
|
|
273
|
+
(se = (N = n(v).store) == null ? void 0 : N.stripe) != null && se.apiKey ? (m(), C(le, {
|
|
274
|
+
key: 0,
|
|
275
|
+
label: "Linked subscription bundle",
|
|
276
|
+
placeholder: "Select bundle",
|
|
277
|
+
items: n(o).filter((s) => s.stripePriceId).map((s) => ({ label: s.name, value: s._id })),
|
|
278
|
+
modelValue: n(a).subscriptionBundle,
|
|
279
|
+
"onUpdate:modelValue": t[14] || (t[14] = (s) => n(a).subscriptionBundle = s)
|
|
280
|
+
}, {
|
|
281
|
+
append: T(() => [
|
|
282
|
+
n(a).subscriptionBundle ? (m(), C(K, {
|
|
283
|
+
key: 0,
|
|
284
|
+
icon: "link_off",
|
|
285
|
+
variant: "plain",
|
|
286
|
+
onClick: t[13] || (t[13] = (s) => n(a).subscriptionBundle = void 0)
|
|
287
|
+
})) : A("", !0)
|
|
288
|
+
]),
|
|
289
|
+
_: 1
|
|
290
|
+
}, 8, ["items", "modelValue"])) : A("", !0)
|
|
291
|
+
]),
|
|
292
|
+
n(v).membership.design ? (m(), y("div", je, [
|
|
293
|
+
c("div", $e, [
|
|
294
|
+
Ke,
|
|
295
|
+
c("img", {
|
|
296
|
+
src: (ae = n(B)) == null ? void 0 : ae.image,
|
|
297
|
+
class: "aspect-[16/9]"
|
|
298
|
+
}, null, 8, Xe),
|
|
299
|
+
c("div", Ye, [
|
|
300
|
+
(m(!0), y(P, null, Q(n(v).membership.design, (s, X) => (m(), y("img", {
|
|
301
|
+
src: s.image,
|
|
302
|
+
key: `image_${X}`,
|
|
303
|
+
class: ve(["w-[112px] h-[63px] cursor-pointer", `${n(w) === X ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
304
|
+
onClick: (gn) => w.value = X,
|
|
305
|
+
alt: `ai_image_predict_${X}`,
|
|
306
|
+
style: { objectFit: "cover" }
|
|
307
|
+
}, null, 10, We))), 128))
|
|
308
|
+
])
|
|
309
|
+
])
|
|
310
|
+
])) : A("", !0)
|
|
311
|
+
];
|
|
312
|
+
}),
|
|
313
|
+
_: 1
|
|
314
|
+
}, 512)
|
|
315
|
+
]),
|
|
316
|
+
_: 1
|
|
317
|
+
}, 8, ["modelValue"]);
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
var q = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_4a186992-7379-4a1b-81dc-5b2410df8c5d", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.36", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", USER: "runner", npm_config_user_agent: "pnpm/9.14.2 npm/? node/v20.18.0 linux x64", CI: "true", npm_package_dependencies_vue: "^3.4.29", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_4a186992-7379-4a1b-81dc-5b2410df8c5d", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.1", npm_node_execpath: "/opt/hostedtoolcache/node/20.18.0/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", npm_package_files_0: "dist", HOME: "/home/runner", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-8.11", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.8.37", npm_package_dependencies_fabric: "^6.4.2", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", SYSTEMD_EXEC_PID: "478", npm_package_dependencies__feedmepos_ui_library: "1.2.56", npm_package_dependencies_dayjs: "^1.11.11", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_devDependencies_tailwindcss: "^3.4.4", npm_package_devDependencies_typescript: "^5.4.5", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod && pnpm build:dts && pnpm build-types", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.21", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.13/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20241117.1.0", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies_unplugin_auto_import: "^0.17.6", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.9/x64", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.3/x64", JOURNAL_STREAM: "8:18099", GITHUB_WORKFLOW: "Publish mf-connect - dev", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.111.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "12010818999", STATS_VMFE: "true", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.5", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "891bf6fa2fdc364060f87f61a648a7b2c7264bc3", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[DEV] publish-mf-connect.yml@refs/heads/dev", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.18.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_38a56519-4642-435d-a259-ce18a0767443", INVOCATION_ID: "9ffbd88b30944b588fdcc3be765f3b26", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.18.0/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "10", GITHUB_TRIGGERING_ACTOR: "qaijunse", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.10", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 362", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/marketing-services", STATS_D_D: "false", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "^2.10.4", npm_lifecycle_script: "vite build --mode fmmf", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", STATS_PIP: "false", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.0.5-beta.21", npm_lifecycle_event: "build:mf:dev", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "891bf6fa2fdc364060f87f61a648a7b2c7264bc3", GITHUB_RUN_ATTEMPT: "1", STATS_D_TC: "true", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.3.3", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "qaijunse", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", LEIN_HOME: "/usr/local/lib/lein", npm_package_dependencies_firebase: "^10.12.2", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_4a186992-7379-4a1b-81dc-5b2410df8c5d", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "39590157", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.14.2/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_4a186992-7379-4a1b-81dc-5b2410df8c5d", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.38", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.2.12479018", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", STATS_EXTP: "https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_4a186992-7379-4a1b-81dc-5b2410df8c5d", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", NODE_ENV: "production", FEEDME_NAMESPACE: "dev", FIREBASE_API_KEY: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", FIREBASE_AUTH_DOMAIN: "feedme-dev-4c3ef.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-dev-4c3ef.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-dev-4c3ef", FIREBASE_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", FIREBASE_MESSAGING_SENDER_ID: "458797803788", FIREBASE_APP_ID: "1:458797803788:web:37f2af2926a84288f0c129", FIREBASE_MEASUREMENT_ID: "G-J2QG09D2Q7", ASSET_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", AUTH_URL: "https://portal-v2-dev.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "member.feedmedev.cc", CRM_APP_URL: "crm.feedmedev.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedmedev.cc", CLIENT_ID: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", PAYMENT_PORTAL_URL: "https://portal.feedmedev.cc/payment/payout-account" } }, z = Math.floor(Math.random() * 16777215), pe = l.index = parseInt(Math.random() * 16777215, 10), me = (typeof q > "u" || typeof q.pid != "number" ? Math.floor(Math.random() * 1e5) : q.pid) % 65535, ue = (() => {
|
|
322
|
+
try {
|
|
323
|
+
return _Buffer;
|
|
324
|
+
} catch {
|
|
325
|
+
try {
|
|
326
|
+
return Buffer;
|
|
327
|
+
} catch {
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
})(), Y = function(e) {
|
|
332
|
+
return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
|
|
333
|
+
}, _e = [];
|
|
334
|
+
for (var k = 0; k < 256; k++)
|
|
335
|
+
_e[k] = (k <= 15 ? "0" : "") + k.toString(16);
|
|
336
|
+
var ce = new RegExp("^[0-9a-fA-F]{24}$"), L = [];
|
|
337
|
+
k = 0;
|
|
338
|
+
for (; k < 10; ) L[48 + k] = k++;
|
|
339
|
+
for (; k < 16; ) L[55 + k] = L[87 + k] = k++;
|
|
340
|
+
function l(e) {
|
|
341
|
+
if (!(this instanceof l)) return new l(e);
|
|
342
|
+
if (e && (e instanceof l || e._bsontype === "ObjectID"))
|
|
343
|
+
return e;
|
|
344
|
+
if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
|
|
345
|
+
this.id = this.generate(e);
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
var i = l.isValid(e);
|
|
349
|
+
if (!i && e != null)
|
|
350
|
+
throw new Error(
|
|
351
|
+
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
352
|
+
);
|
|
353
|
+
if (i && typeof e == "string" && e.length === 24)
|
|
354
|
+
return l.createFromHexString(e);
|
|
355
|
+
if (e != null && e.length === 12)
|
|
356
|
+
this.id = e;
|
|
357
|
+
else {
|
|
358
|
+
if (e != null && typeof e.toHexString == "function")
|
|
359
|
+
return e;
|
|
360
|
+
throw new Error(
|
|
361
|
+
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
var Je = l;
|
|
366
|
+
l.default = l;
|
|
367
|
+
l.createFromTime = function(e) {
|
|
368
|
+
return e = parseInt(e, 10) % 4294967295, new l(Ze(8, e) + "0000000000000000");
|
|
369
|
+
};
|
|
370
|
+
l.createFromHexString = function(e) {
|
|
371
|
+
if (typeof e > "u" || e != null && e.length !== 24)
|
|
372
|
+
throw new Error(
|
|
373
|
+
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
374
|
+
);
|
|
375
|
+
for (var i = "", D = 0; D < 24; )
|
|
376
|
+
i += String.fromCharCode(L[e.charCodeAt(D++)] << 4 | L[e.charCodeAt(D++)]);
|
|
377
|
+
return new l(i);
|
|
378
|
+
};
|
|
379
|
+
l.isValid = function(e) {
|
|
380
|
+
return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && ce.test(e) : e instanceof l ? !0 : Y(e) ? l.isValid(e.toString("hex")) : typeof e.toHexString == "function" && ue && (e.id instanceof ue || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && ce.test(e.id) : !1;
|
|
381
|
+
};
|
|
382
|
+
l.prototype = {
|
|
383
|
+
constructor: l,
|
|
384
|
+
/**
|
|
385
|
+
* Return the ObjectID id as a 24 byte hex string representation
|
|
386
|
+
*
|
|
387
|
+
* @return {String} return the 24 byte hex string representation.
|
|
388
|
+
* @api public
|
|
389
|
+
*/
|
|
390
|
+
toHexString: function() {
|
|
391
|
+
if (!this.id || !this.id.length)
|
|
392
|
+
throw new Error(
|
|
393
|
+
"invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
|
|
394
|
+
);
|
|
395
|
+
if (this.id.length === 24)
|
|
396
|
+
return this.id;
|
|
397
|
+
if (Y(this.id))
|
|
398
|
+
return this.id.toString("hex");
|
|
399
|
+
for (var e = "", i = 0; i < this.id.length; i++)
|
|
400
|
+
e += _e[this.id.charCodeAt(i)];
|
|
401
|
+
return e;
|
|
402
|
+
},
|
|
403
|
+
/**
|
|
404
|
+
* Compares the equality of this ObjectID with `otherID`.
|
|
405
|
+
*
|
|
406
|
+
* @param {Object} otherId ObjectID instance to compare against.
|
|
407
|
+
* @return {Boolean} the result of comparing two ObjectID's
|
|
408
|
+
* @api public
|
|
409
|
+
*/
|
|
410
|
+
equals: function(e) {
|
|
411
|
+
return e instanceof l ? this.toString() === e.toString() : typeof e == "string" && l.isValid(e) && e.length === 12 && Y(this.id) ? e === this.id.toString("binary") : typeof e == "string" && l.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && l.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof l || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
|
|
412
|
+
},
|
|
413
|
+
/**
|
|
414
|
+
* Returns the generation date (accurate up to the second) that this ID was generated.
|
|
415
|
+
*
|
|
416
|
+
* @return {Date} the generation date
|
|
417
|
+
* @api public
|
|
418
|
+
*/
|
|
419
|
+
getTimestamp: function() {
|
|
420
|
+
var e = /* @__PURE__ */ new Date(), i;
|
|
421
|
+
return Y(this.id) ? i = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : i = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(i) * 1e3), e;
|
|
422
|
+
},
|
|
423
|
+
/**
|
|
424
|
+
* Generate a 12 byte id buffer used in ObjectID's
|
|
425
|
+
*
|
|
426
|
+
* @method
|
|
427
|
+
* @param {number} [time] optional parameter allowing to pass in a second based timestamp.
|
|
428
|
+
* @return {string} return the 12 byte id buffer string.
|
|
429
|
+
*/
|
|
430
|
+
generate: function(e) {
|
|
431
|
+
typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
|
|
432
|
+
var i = Qe();
|
|
433
|
+
return String.fromCharCode(
|
|
434
|
+
e >> 24 & 255,
|
|
435
|
+
e >> 16 & 255,
|
|
436
|
+
e >> 8 & 255,
|
|
437
|
+
e & 255,
|
|
438
|
+
z >> 16 & 255,
|
|
439
|
+
z >> 8 & 255,
|
|
440
|
+
z & 255,
|
|
441
|
+
me >> 8 & 255,
|
|
442
|
+
me & 255,
|
|
443
|
+
i >> 16 & 255,
|
|
444
|
+
i >> 8 & 255,
|
|
445
|
+
i & 255
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
function Qe() {
|
|
450
|
+
return pe = (pe + 1) % 16777215;
|
|
451
|
+
}
|
|
452
|
+
function Ze(e, i) {
|
|
453
|
+
return i = i.toString(16), i.length === e ? i : "00000000".substring(i.length, e) + i;
|
|
454
|
+
}
|
|
455
|
+
var en = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
|
|
456
|
+
l.prototype[en] = function() {
|
|
457
|
+
return "ObjectID(" + this + ")";
|
|
458
|
+
};
|
|
459
|
+
l.prototype.toJSON = l.prototype.toHexString;
|
|
460
|
+
l.prototype.toString = l.prototype.toHexString;
|
|
461
|
+
const nn = /* @__PURE__ */ Ce(Je), tn = {
|
|
462
|
+
key: 0,
|
|
463
|
+
class: "grid grid-cols-1 gap-8"
|
|
464
|
+
}, on = { class: "flex items-center gap-8" }, sn = { class: "flex items-center gap-8" }, an = 5, rn = /* @__PURE__ */ Z({
|
|
465
|
+
__name: "CardDesignSheet",
|
|
466
|
+
emits: ["success"],
|
|
467
|
+
setup(e, { expose: i, emit: D }) {
|
|
468
|
+
const { minor: U } = ne, v = te(), I = Te(), b = g(!1);
|
|
469
|
+
g(), g(!1);
|
|
470
|
+
const O = g(), h = g(null);
|
|
471
|
+
V(() => {
|
|
472
|
+
var r, o;
|
|
473
|
+
return Math.min((((o = (r = O.value) == null ? void 0 : r.design) == null ? void 0 : o.length) ?? 0) + 1, an);
|
|
474
|
+
});
|
|
475
|
+
const E = D, a = V(() => {
|
|
476
|
+
var r, o;
|
|
477
|
+
return ((o = (r = v.membership) == null ? void 0 : r.design) == null ? void 0 : o.filter((u) => u.image)) || [];
|
|
478
|
+
}), x = g(!1);
|
|
479
|
+
function H(r) {
|
|
480
|
+
x.value = r;
|
|
481
|
+
}
|
|
482
|
+
function F() {
|
|
483
|
+
b.value = !0;
|
|
484
|
+
}
|
|
485
|
+
async function S() {
|
|
486
|
+
await U(
|
|
487
|
+
async () => {
|
|
488
|
+
var u;
|
|
489
|
+
const r = xe(O.value), o = Oe.parse(r);
|
|
490
|
+
if (o.design = (o == null ? void 0 : o.design) || [], h.value) {
|
|
491
|
+
const p = nn().toHexString(), t = await ie.update(
|
|
492
|
+
ie.designPath(p, h.value),
|
|
493
|
+
h.value
|
|
494
|
+
);
|
|
495
|
+
(u = o.design) == null || u.push({
|
|
496
|
+
_id: p,
|
|
497
|
+
image: t
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
await oe.update(o), await B(), await E("success"), h.value = null, b.value = !1;
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
message: "Saving card design",
|
|
504
|
+
successMessage: "Card design saved"
|
|
505
|
+
}
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
async function w(r, o) {
|
|
509
|
+
r ? h.value = r : o && I.open({
|
|
510
|
+
title: "Delete Design",
|
|
511
|
+
message: "Are you sure you want to delete this design?",
|
|
512
|
+
primaryActions: { text: "Delete", close: !0 },
|
|
513
|
+
secondaryActions: { text: "Cancel", close: !1 }
|
|
514
|
+
}).onPrimary(async () => {
|
|
515
|
+
var p, t;
|
|
516
|
+
const u = (p = O.value.design) == null ? void 0 : p.findIndex((R) => R._id == o);
|
|
517
|
+
console.log(u), u !== -1 && ((t = O.value.design) == null || t.splice(u, 1)), await S();
|
|
518
|
+
}).onSecondary(() => {
|
|
519
|
+
I.close();
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
async function B() {
|
|
523
|
+
await v.readMembership(), O.value = v.membership;
|
|
524
|
+
}
|
|
525
|
+
return i({
|
|
526
|
+
showSheet: H
|
|
527
|
+
}), ee(async () => {
|
|
528
|
+
await B(), a.value.length || (b.value = !0);
|
|
529
|
+
}), (r, o) => {
|
|
530
|
+
const u = f("FmButton"), p = f("FmSideSheet");
|
|
531
|
+
return m(), C(p, {
|
|
532
|
+
"max-width": 560,
|
|
533
|
+
"dismiss-away": !0,
|
|
534
|
+
header: "Manage Design",
|
|
535
|
+
modelValue: n(x),
|
|
536
|
+
"onUpdate:modelValue": [
|
|
537
|
+
o[2] || (o[2] = (t) => J(x) ? x.value = t : null),
|
|
538
|
+
o[3] || (o[3] = (t) => x.value = t)
|
|
539
|
+
]
|
|
540
|
+
}, Ee({
|
|
541
|
+
default: T(() => [
|
|
542
|
+
n(b) ? A("", !0) : (m(), y("div", tn, [
|
|
543
|
+
(m(!0), y(P, null, Q(n(a), (t) => (m(), C(de, {
|
|
544
|
+
key: String(t._id),
|
|
545
|
+
"image-fit": "cover",
|
|
546
|
+
label: "",
|
|
547
|
+
"aspect-ratio": "16/9",
|
|
548
|
+
thumbnail: t.image,
|
|
549
|
+
accept: ".png, .jpg, .jpeg, .gif",
|
|
550
|
+
"recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
|
|
551
|
+
file: void 0,
|
|
552
|
+
"delete-button": !1
|
|
553
|
+
}, {
|
|
554
|
+
"delete-button": T(() => [
|
|
555
|
+
d(u, {
|
|
556
|
+
class: "!text-neutral-50 !bg-neutral-700",
|
|
557
|
+
icon: "delete",
|
|
558
|
+
variant: "tertiary",
|
|
559
|
+
onClick: (R) => w(null, t._id)
|
|
560
|
+
}, null, 8, ["onClick"])
|
|
561
|
+
]),
|
|
562
|
+
_: 2
|
|
563
|
+
}, 1032, ["thumbnail"]))), 128))
|
|
564
|
+
])),
|
|
565
|
+
n(b) ? (m(), C(de, {
|
|
566
|
+
key: 1,
|
|
567
|
+
"image-fit": "cover",
|
|
568
|
+
label: "",
|
|
569
|
+
"aspect-ratio": "16/9",
|
|
570
|
+
accept: ".png, .jpg, .jpeg, .gif",
|
|
571
|
+
"recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
|
|
572
|
+
"onUpdate:file": w
|
|
573
|
+
})) : A("", !0)
|
|
574
|
+
]),
|
|
575
|
+
_: 2
|
|
576
|
+
}, [
|
|
577
|
+
n(b) ? {
|
|
578
|
+
name: "side-sheet-footer",
|
|
579
|
+
fn: T(() => [
|
|
580
|
+
c("div", sn, [
|
|
581
|
+
d(u, {
|
|
582
|
+
label: "Save",
|
|
583
|
+
onClick: S,
|
|
584
|
+
disabled: !n(h)
|
|
585
|
+
}, null, 8, ["disabled"]),
|
|
586
|
+
d(u, {
|
|
587
|
+
label: "Cancel",
|
|
588
|
+
type: "button",
|
|
589
|
+
variant: "tertiary",
|
|
590
|
+
onClick: o[1] || (o[1] = (t) => b.value = !1)
|
|
591
|
+
})
|
|
592
|
+
])
|
|
593
|
+
]),
|
|
594
|
+
key: "1"
|
|
595
|
+
} : {
|
|
596
|
+
name: "side-sheet-footer",
|
|
597
|
+
fn: T(() => [
|
|
598
|
+
c("div", on, [
|
|
599
|
+
d(u, {
|
|
600
|
+
label: "Add Design",
|
|
601
|
+
onClick: F
|
|
602
|
+
}),
|
|
603
|
+
d(u, {
|
|
604
|
+
label: "Cancel",
|
|
605
|
+
type: "button",
|
|
606
|
+
variant: "tertiary",
|
|
607
|
+
onClick: o[0] || (o[0] = (t) => x.value = !1)
|
|
608
|
+
})
|
|
609
|
+
])
|
|
610
|
+
]),
|
|
611
|
+
key: "0"
|
|
612
|
+
}
|
|
613
|
+
]), 1032, ["modelValue"]);
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
}), ln = { class: "flex items-center" }, dn = /* @__PURE__ */ c("span", { class: "fm-typo-en-title-sm-800" }, " Card ", -1), pn = { class: "px-24 flex flex-col pb-24 gap-y-16" }, mn = { class: "flex items-center justify-end" }, un = /* @__PURE__ */ c("img", {
|
|
617
|
+
src: ke,
|
|
618
|
+
class: "aspect-square w-[150px]"
|
|
619
|
+
}, null, -1), cn = /* @__PURE__ */ c("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
620
|
+
/* @__PURE__ */ c("div", { class: "fm-typo-en-title-sm-800" }, "Create member card"),
|
|
621
|
+
/* @__PURE__ */ c("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Track and manage member card to keep customers engaged with your business. ")
|
|
622
|
+
], -1), _n = {
|
|
623
|
+
key: 0,
|
|
624
|
+
class: "flex gap-x-8"
|
|
625
|
+
}, fn = {
|
|
626
|
+
key: 1,
|
|
627
|
+
class: "fm-typo-en-title-sm-800 text-fm-color-primary"
|
|
628
|
+
}, Pn = /* @__PURE__ */ Z({
|
|
629
|
+
__name: "Card",
|
|
630
|
+
setup(e) {
|
|
631
|
+
const { minor: i, global: D } = ne, U = g(), v = g(), I = Ie(), b = te(), O = V(
|
|
632
|
+
() => b.sortedStoreCategories.flatMap((r) => r.bundles)
|
|
633
|
+
), h = [
|
|
634
|
+
{
|
|
635
|
+
header: "Card Number",
|
|
636
|
+
accessorFn: (r) => r.serialNumber
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
header: "Redeemed by",
|
|
640
|
+
accessorKey: "user",
|
|
641
|
+
enableSorting: !1,
|
|
642
|
+
cell(r) {
|
|
643
|
+
const o = r.row.original.pf_member;
|
|
644
|
+
return W(
|
|
645
|
+
"div",
|
|
646
|
+
{
|
|
647
|
+
class: "flex items-center gap-x-8"
|
|
648
|
+
},
|
|
649
|
+
[
|
|
650
|
+
W(ye.FmAvatar, {
|
|
651
|
+
name: o != null && o.photoUrl || o == null ? void 0 : o.name,
|
|
652
|
+
src: (o == null ? void 0 : o.photoUrl) ?? void 0,
|
|
653
|
+
size: "sm"
|
|
654
|
+
}),
|
|
655
|
+
W("span", { class: "fm-typo-en-body-sm-400" }, o == null ? void 0 : o.name)
|
|
656
|
+
]
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
header: "Phone",
|
|
662
|
+
accessorFn: (r) => {
|
|
663
|
+
var o;
|
|
664
|
+
return ((o = r.pf_member) == null ? void 0 : o.phoneNumber) || "-";
|
|
665
|
+
},
|
|
666
|
+
accessorKey: "pf_member.phoneNumber"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
header: "Created at",
|
|
670
|
+
accessorKey: "_id",
|
|
671
|
+
accessorFn: (r) => re(Fe(r._id.toString())).format("DD MMM YYYY hh:mmA")
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
header: "Bundle",
|
|
675
|
+
accessorFn: (r) => {
|
|
676
|
+
var o;
|
|
677
|
+
return ((o = O.value.find((u) => u._id === r.bundle)) == null ? void 0 : o.name) || "-";
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
header: "Redeemed at",
|
|
682
|
+
accessorKey: "redeemedAt",
|
|
683
|
+
accessorFn: (r) => r.redeemedAt ? re(r.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
|
|
684
|
+
}
|
|
685
|
+
], { tableMeta: E, rowData: a, onSort: x, debouncedFetchData: H, onSearch: F } = we(oe.readCards);
|
|
686
|
+
async function S() {
|
|
687
|
+
var r;
|
|
688
|
+
await H(), (r = U.value) == null || r.showSheet(!1);
|
|
689
|
+
}
|
|
690
|
+
const w = V(() => I.isPremium ? [
|
|
691
|
+
{
|
|
692
|
+
label: "Create cards",
|
|
693
|
+
value: "create",
|
|
694
|
+
isPrimary: !0
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
label: "Manage Design",
|
|
698
|
+
value: "design",
|
|
699
|
+
isPrimary: !0
|
|
700
|
+
}
|
|
701
|
+
] : []);
|
|
702
|
+
async function B(r) {
|
|
703
|
+
const o = new Ue(), u = r.map((p) => ({
|
|
704
|
+
CardNumber: p
|
|
705
|
+
}));
|
|
706
|
+
o.addRecords(u), await Ne(
|
|
707
|
+
o.buildExcel(),
|
|
708
|
+
`cards-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
709
|
+
{
|
|
710
|
+
bookType: "xlsx",
|
|
711
|
+
bookSST: !1,
|
|
712
|
+
type: "array"
|
|
713
|
+
}
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
return ee(async () => {
|
|
717
|
+
await D(async () => {
|
|
718
|
+
await I.readPremium(), await b.readMemberStore(), await b.readMembership(), await S();
|
|
719
|
+
});
|
|
720
|
+
}), (r, o) => {
|
|
721
|
+
const u = f("FmChip"), p = f("FmPageHead"), t = f("FmSearch"), R = f("FmButton"), M = f("FmCard");
|
|
722
|
+
return m(), y(P, null, [
|
|
723
|
+
d(p, {
|
|
724
|
+
title: "Card",
|
|
725
|
+
actions: n(w),
|
|
726
|
+
"onClick:action": o[0] || (o[0] = (_) => {
|
|
727
|
+
var j, $;
|
|
728
|
+
console.log(_), _ === "design" && ((j = n(v)) == null || j.showSheet(!0)), _ === "create" && (($ = n(U)) == null || $.showSheet(!0));
|
|
729
|
+
})
|
|
730
|
+
}, {
|
|
731
|
+
title: T(() => [
|
|
732
|
+
c("div", ln, [
|
|
733
|
+
dn,
|
|
734
|
+
n(I).isPremium ? A("", !0) : (m(), C(u, {
|
|
735
|
+
key: 0,
|
|
736
|
+
class: "ml-8 fm-text-color-primary",
|
|
737
|
+
label: "Premium"
|
|
738
|
+
}))
|
|
739
|
+
])
|
|
740
|
+
]),
|
|
741
|
+
_: 1
|
|
742
|
+
}, 8, ["actions"]),
|
|
743
|
+
c("div", pn, [
|
|
744
|
+
n(a).length > 0 || n(a).length <= 0 && n(E).searchValue || n(E).pageCount > 0 ? (m(), y(P, { key: 0 }, [
|
|
745
|
+
c("div", mn, [
|
|
746
|
+
d(t, {
|
|
747
|
+
class: "mt-4",
|
|
748
|
+
modelValue: n(E).searchValue,
|
|
749
|
+
"onUpdate:modelValue": [
|
|
750
|
+
o[1] || (o[1] = (_) => n(E).searchValue = _),
|
|
751
|
+
n(F)
|
|
752
|
+
],
|
|
753
|
+
placeholder: "Search",
|
|
754
|
+
collapsible: ""
|
|
755
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
756
|
+
d(R, {
|
|
757
|
+
icon: "ios_share",
|
|
758
|
+
variant: "tertiary",
|
|
759
|
+
onClick: Se(n(De), ["prevent"])
|
|
760
|
+
}, null, 8, ["onClick"])
|
|
761
|
+
]),
|
|
762
|
+
d(He, {
|
|
763
|
+
loading: n(E).isLoading,
|
|
764
|
+
"row-data": n(a),
|
|
765
|
+
"row-count": n(E).totalRows,
|
|
766
|
+
"column-defs": h,
|
|
767
|
+
"shrink-at": !1,
|
|
768
|
+
"page-count": n(E).pageCount,
|
|
769
|
+
"page-index": n(E).pageIndex,
|
|
770
|
+
"page-size": n(E).pageSize,
|
|
771
|
+
onSortChange: n(x),
|
|
772
|
+
onPageChange: o[2] || (o[2] = (_) => {
|
|
773
|
+
n(H)({
|
|
774
|
+
pageSize: _.pageSize,
|
|
775
|
+
pageIndex: _.pageIndex
|
|
776
|
+
});
|
|
777
|
+
})
|
|
778
|
+
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
|
|
779
|
+
], 64)) : (m(), C(M, {
|
|
780
|
+
key: 1,
|
|
781
|
+
variant: "outlined",
|
|
782
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
783
|
+
}, {
|
|
784
|
+
default: T(() => [
|
|
785
|
+
un,
|
|
786
|
+
cn,
|
|
787
|
+
n(I).isPremium ? (m(), y("div", _n, [
|
|
788
|
+
d(R, {
|
|
789
|
+
variant: "primary",
|
|
790
|
+
label: "Add Card",
|
|
791
|
+
icon: "add",
|
|
792
|
+
onClick: o[3] || (o[3] = () => {
|
|
793
|
+
var _;
|
|
794
|
+
return (_ = n(U)) == null ? void 0 : _.showSheet(!0);
|
|
795
|
+
})
|
|
796
|
+
}),
|
|
797
|
+
d(R, {
|
|
798
|
+
variant: "secondary",
|
|
799
|
+
label: "Manage Design",
|
|
800
|
+
onClick: o[4] || (o[4] = () => {
|
|
801
|
+
var _;
|
|
802
|
+
return (_ = n(v)) == null ? void 0 : _.showSheet(!0);
|
|
803
|
+
})
|
|
804
|
+
})
|
|
805
|
+
])) : (m(), y("div", fn, " Go premium and enjoy all features. "))
|
|
806
|
+
]),
|
|
807
|
+
_: 1
|
|
808
|
+
})),
|
|
809
|
+
d(ze, {
|
|
810
|
+
ref_key: "sheetRef",
|
|
811
|
+
ref: U,
|
|
812
|
+
onSuccess: S,
|
|
813
|
+
onExport: B
|
|
814
|
+
}, null, 512),
|
|
815
|
+
d(rn, {
|
|
816
|
+
ref_key: "designSheetRef",
|
|
817
|
+
ref: v,
|
|
818
|
+
onSuccess: S
|
|
819
|
+
}, null, 512)
|
|
820
|
+
])
|
|
821
|
+
], 64);
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
export {
|
|
826
|
+
Pn as default
|
|
827
|
+
};
|