@feedmepos/mf-connect 0.1.13-prod → 0.1.14-prod
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-CBEDTJ94.js → Analytic-MRp7gtO3.js} +9 -9
- package/dist/{App-BcrQs0nE.js → App-BU3B2A-F.js} +6 -6
- package/dist/{Broadcast-ClM81ght.js → Broadcast-DmciJlSU.js} +38 -37
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CTwScH9I.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJPOgBXj.js} +7 -7
- package/dist/{Card-B7_nUT03.js → Card-Dq2cAgTi.js} +15 -15
- package/dist/Collections-B4x4VH1a.js +445 -0
- package/dist/{Credit-DC6pzGIR.js → Credit-CVdT1KBU.js} +57 -56
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCwaUg09.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BmjXu-U7.js} +27 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D2qCLBp3.js → EffectSheet.vue_vue_type_style_index_0_lang-A_uosv-g.js} +6 -6
- package/dist/{Experience-ClJWQLEB.js → Experience-CEeXWbue.js} +39 -38
- package/dist/{Game-BznCxZXt.js → Game-mx5c5ZhV.js} +46 -45
- package/dist/{Index-D27v-Lqw.js → Index-DQ1qadwz.js} +9 -9
- package/dist/{Marketing-FvYJ_Lt-.js → Marketing-CciBZijv.js} +5 -5
- package/dist/{Member-CQYj0FQK.js → Member-C51SlKxj.js} +4 -4
- package/dist/{MemberList-UIZANV1T.js → MemberList-D1x731cU.js} +14 -14
- package/dist/{MemberTransactions-JKLzrvh6.js → MemberTransactions-BpoTQHFQ.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-_72tx6g3.js → MessageInput.vue_vue_type_script_setup_true_lang-DZu24zwy.js} +2 -2
- package/dist/{Mission-LwSpobZu.js → Mission-LpCnpKYD.js} +35 -34
- package/dist/{Overview-PXshmkPD.js → Overview-DxvOqUao.js} +17 -17
- package/dist/{Point-uaIRQMRW.js → Point-BmI7y6h6.js} +51 -50
- package/dist/{Promotion-qjos6ksl.js → Promotion-MHaOqrwu.js} +34 -33
- package/dist/{Record-qqPaVdrx.js → Record-75BxMATe.js} +6 -6
- package/dist/{Reward-BC6GJ4kD.js → Reward-8VfyFuEt.js} +14 -14
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CF7hNZIU.js → RewardGroup.vue_vue_type_script_setup_true_lang-D12_r-9X.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DQ8rQIwv.js → RuleGroup.vue_vue_type_script_setup_true_lang-BIdBxvN7.js} +13 -13
- package/dist/{Segment-B5E2FdYc.js → Segment-I9FUibZy.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dqz3uAze.js → SelectItems.vue_vue_type_script_setup_true_lang-BGeR0-AG.js} +2 -2
- package/dist/{Setting-CA9PQVKp.js → Setting-B8V2I0EZ.js} +8 -8
- package/dist/{Store-irRFotGI.js → Store-CQkGNSSm.js} +281 -278
- package/dist/{StoreRewards-CcJ8MMvp.js → StoreRewards-DOtjveqw.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CcNjdcMX.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Cf9IsQXS.js} +251 -245
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-2i2fDWDC.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DPmeW62s.js} +1 -1
- package/dist/{Tier-CdxK-QtB.js → Tier-DAj_5abZ.js} +19 -19
- package/dist/{Title-Ci_NXdrD.js → Title-DryO4wcO.js} +19 -19
- package/dist/{Transaction-ChKg7UTd.js → Transaction-DpibVFU-.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B3INK4Ue.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DoiPRPPo.js} +6 -6
- package/dist/{Voucher-CDlHku1x.js → Voucher-CSc0_dGX.js} +56 -55
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-D9wqrTVc.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DRnVggfC.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Di6QPzfu.js → ZodTextField.vue_vue_type_script_setup_true_lang-BzBcsSYS.js} +1 -1
- package/dist/{app-B9MkUjRo.js → app-BoQTcBOD.js} +28 -28
- package/dist/{app-BmT3kZJr.js → app-BzPle2EI.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-1nKmKs9l.js → business-H9a63ymR.js} +1 -1
- package/dist/{campaign-xn4PhDSV.js → campaign-CR-16mwD.js} +2 -2
- package/dist/{campaign.enum-KwZQ6yBR.js → campaign.enum-DcaetYuk.js} +1 -1
- package/dist/{campaign.fn-CVj38fae.js → campaign.fn-BqGZqM77.js} +110 -110
- package/dist/{collectible.enum-DojcTb50.js → collectible.enum-YKtiwQbt.js} +1 -1
- package/dist/{collection.fn-Bv2EZuA3.js → collection.fn-CI8lSAsC.js} +2 -2
- package/dist/{dto-DP9kIlr_.js → dto-BBLfD0Lh.js} +17 -16
- package/dist/{effect-47JS4i8Q.js → effect-36H79d0n.js} +1 -1
- package/dist/{email-addresses-C6Jvh8MK.js → email-addresses-drrACeqJ.js} +1 -1
- package/dist/{export-BdPv7Hej.js → export-BgnO3lJs.js} +3 -3
- package/dist/{helper-Di0AEV1F.js → helper-CcV9DZXq.js} +1 -1
- package/dist/{index-Dd0IgwOF.js → index-6RqtavHk.js} +4 -4
- package/dist/{index-CPjDZrsE.js → index-B5ii6hOh.js} +1 -1
- package/dist/{index-YAoPUv6z.js → index-BEDXujqZ.js} +1 -1
- package/dist/{index-CVsuhUpe.js → index-BPbhXWRp.js} +7 -7
- package/dist/{index-BUjGxHkM.js → index-BRTpdfj3.js} +3 -3
- package/dist/{index-CDmiwLKd.js → index-CB1CnEOn.js} +1 -1
- package/dist/{index-DHb0pIVR.js → index-CibFRBGu.js} +2 -2
- package/dist/{index-gYvuI9Nk.js → index-Cidu1YZP.js} +3 -3
- package/dist/{index-BZg5tj39.js → index-DLAAi9ur.js} +3039 -3036
- package/dist/{index-D5LMqy6S.js → index-DydNNBhY.js} +1 -1
- package/dist/{index-Be9fjCVp.js → index-ZycLk3NR.js} +1 -1
- package/dist/{index-BPkcvPHp.js → index-mgoYj6L9.js} +1 -1
- package/dist/{index.esm2017-C-O-0X0H.js → index.esm2017-QS_XhcBp.js} +1 -1
- package/dist/{loading-E0zwe5lq.js → loading-LktVwV5k.js} +4 -4
- package/dist/{membership-OECc9rWj.js → membership-7ETvXph3.js} +3 -3
- package/dist/{money-CVSdH00t.js → money-BYszknw8.js} +1 -1
- package/dist/{number-Iu6cix1k.js → number-Dmd4vT4F.js} +1 -1
- package/dist/objectid-BQtSeCVi.js +145 -0
- package/dist/{reward-BH_1xbHQ.js → reward-DJGOX-D1.js} +1 -1
- package/dist/{rule-CbkzOdR3.js → rule-D7jM4gdg.js} +3 -3
- package/dist/{rule-builder-WIEeIoXD.js → rule-builder-FO9UeYUJ.js} +1 -1
- package/dist/{template-Dlo0YPQp.js → template-C4Ddrpk1.js} +4 -4
- package/dist/{trigger-BMknrXKj.js → trigger-w7Q4qOMB.js} +4 -4
- package/dist/{usePagination-B9K_XXDC.js → usePagination-PH1OvyZM.js} +1 -1
- package/dist/{user-CuX5BIg5.js → user-DRPXRVy2.js} +1 -1
- package/dist/{vue-i18n-CrVlAF7z.js → vue-i18n-B49HKiTU.js} +2 -2
- package/package.json +6 -6
- package/dist/Collections-N7LIfZ2D.js +0 -435
- package/dist/objectid-B16Lk1pC.js +0 -145
|
@@ -1,435 +0,0 @@
|
|
|
1
|
-
var ee = Object.defineProperty;
|
|
2
|
-
var oe = (f, r, d) => r in f ? ee(f, r, { enumerable: !0, configurable: !0, writable: !0, value: d }) : f[r] = d;
|
|
3
|
-
var z = (f, r, d) => oe(f, typeof r != "symbol" ? r + "" : r, d);
|
|
4
|
-
import { defineComponent as G, ref as p, computed as H, watch as O, resolveComponent as u, openBlock as y, createBlock as L, unref as e, isRef as K, withCtx as I, createElementVNode as b, createVNode as s, createElementBlock as R, Fragment as P, renderList as te, createCommentVNode as U, onMounted as ae, h as T } from "vue";
|
|
5
|
-
import { h as j } from "./moment-BWErdI6_.js";
|
|
6
|
-
import { components as le } from "@feedmepos/ui-library";
|
|
7
|
-
import { u as J, a as ne } from "./loading-E0zwe5lq.js";
|
|
8
|
-
import { J as se } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
-
import { u as re } from "./app-wDQR6dpb.js";
|
|
10
|
-
import { useRoute as Q, useRouter as ie } from "vue-router";
|
|
11
|
-
import { c as N } from "./index-CPjDZrsE.js";
|
|
12
|
-
import { e as m } from "./index-vh86FiIQ.js";
|
|
13
|
-
import { u as Y, a as ue, _ as de, w as ce } from "./usePagination-B9K_XXDC.js";
|
|
14
|
-
import { g as me } from "./user-CuX5BIg5.js";
|
|
15
|
-
import { m as pe } from "./index-D5LMqy6S.js";
|
|
16
|
-
import { o as fe } from "./objectId-dwaoBfJX.js";
|
|
17
|
-
const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), be = { class: "space-y-16" }, Ce = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1), ve = { class: "gap-16 grid grid-cols-2" }, he = { class: "flex items-center gap-8" }, ye = /* @__PURE__ */ G({
|
|
18
|
-
__name: "CreateCollectionSheet",
|
|
19
|
-
emits: ["success"],
|
|
20
|
-
setup(f, { expose: r, emit: d }) {
|
|
21
|
-
const { minor: w } = J, F = Q(), k = p(), _ = p(!1), E = d, g = p(!1);
|
|
22
|
-
function q(l) {
|
|
23
|
-
g.value = l, l && (a.value = {
|
|
24
|
-
quantity: 1,
|
|
25
|
-
code: "",
|
|
26
|
-
codeConfig: {
|
|
27
|
-
length: 8,
|
|
28
|
-
charset: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
29
|
-
prefix: "",
|
|
30
|
-
suffix: "",
|
|
31
|
-
pattern: "########"
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
const a = p({
|
|
36
|
-
quantity: 1,
|
|
37
|
-
code: "",
|
|
38
|
-
codeConfig: {
|
|
39
|
-
length: 8,
|
|
40
|
-
charset: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
41
|
-
prefix: "",
|
|
42
|
-
suffix: "",
|
|
43
|
-
pattern: "########"
|
|
44
|
-
}
|
|
45
|
-
}), A = [
|
|
46
|
-
{
|
|
47
|
-
label: "Bulk codes",
|
|
48
|
-
value: "bulk",
|
|
49
|
-
sublabel: "Bulk generate unique codes"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: "Custom code",
|
|
53
|
-
value: "single",
|
|
54
|
-
sublabel: "Enter your own custom codes"
|
|
55
|
-
}
|
|
56
|
-
], B = [
|
|
57
|
-
{
|
|
58
|
-
label: "Alphanumeric",
|
|
59
|
-
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: "Alphabetic",
|
|
63
|
-
value: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
64
|
-
},
|
|
65
|
-
{ label: "Alphabetic Lowercase", value: "abcdefghijklmnopqrstuvwxyz" },
|
|
66
|
-
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
67
|
-
{ label: "Numbers", value: "0123456789" },
|
|
68
|
-
{ label: "Custom", value: "" }
|
|
69
|
-
], C = p(B[0].value), c = p("bulk"), x = p(!1), D = H(() => F.params.id);
|
|
70
|
-
async function n(l) {
|
|
71
|
-
var o;
|
|
72
|
-
await ((o = k.value) == null ? void 0 : o.validateInputs()), _.value && await w(
|
|
73
|
-
async () => {
|
|
74
|
-
await N.createCollectionByCampaignId(D.value, l), await E("success");
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
message: "Creating claim(s)",
|
|
78
|
-
successMessage: "Claim(s) created"
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
return r({
|
|
83
|
-
showSheet: q
|
|
84
|
-
}), O(
|
|
85
|
-
() => c.value,
|
|
86
|
-
(l, o) => {
|
|
87
|
-
o != l && (a.value.code = "", a.value.codeConfig.length = 8, a.value.codeConfig.charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", a.value.codeConfig.prefix = "", a.value.codeConfig.suffix = "", a.value.codeConfig.pattern = "########");
|
|
88
|
-
}
|
|
89
|
-
), O(
|
|
90
|
-
() => a.value.codeConfig.length,
|
|
91
|
-
(l, o) => {
|
|
92
|
-
l != o && (a.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(l))));
|
|
93
|
-
}
|
|
94
|
-
), (l, o) => {
|
|
95
|
-
const v = u("FmRadio"), i = u("FmRadioGroup"), V = u("FmSwitch"), M = u("FmStepperField"), S = u("FmSelect"), h = u("FmTextField"), W = u("FmTextarea"), X = u("FmForm"), $ = u("FmButton"), Z = u("FmSideSheet");
|
|
96
|
-
return y(), L(Z, {
|
|
97
|
-
"max-width": 560,
|
|
98
|
-
"dismiss-away": !0,
|
|
99
|
-
header: "Create collection",
|
|
100
|
-
modelValue: e(g),
|
|
101
|
-
"onUpdate:modelValue": [
|
|
102
|
-
o[14] || (o[14] = (t) => K(g) ? g.value = t : null),
|
|
103
|
-
o[15] || (o[15] = (t) => g.value = t)
|
|
104
|
-
]
|
|
105
|
-
}, {
|
|
106
|
-
"side-sheet-footer": I(() => [
|
|
107
|
-
b("div", he, [
|
|
108
|
-
s($, {
|
|
109
|
-
label: "Save",
|
|
110
|
-
onClick: o[12] || (o[12] = (t) => n(e(a))),
|
|
111
|
-
loading: e(re)().isLoading
|
|
112
|
-
}, null, 8, ["loading"]),
|
|
113
|
-
s($, {
|
|
114
|
-
label: "Cancel",
|
|
115
|
-
type: "button",
|
|
116
|
-
variant: "tertiary",
|
|
117
|
-
onClick: o[13] || (o[13] = (t) => g.value = !1)
|
|
118
|
-
})
|
|
119
|
-
])
|
|
120
|
-
]),
|
|
121
|
-
default: I(() => [
|
|
122
|
-
s(se, { json: e(a) }, null, 8, ["json"]),
|
|
123
|
-
s(X, {
|
|
124
|
-
ref_key: "form",
|
|
125
|
-
ref: k,
|
|
126
|
-
class: "space-y-40",
|
|
127
|
-
onValidationSuccess: o[10] || (o[10] = (t) => _.value = !0),
|
|
128
|
-
onValidationFailed: o[11] || (o[11] = (t) => _.value = !1)
|
|
129
|
-
}, {
|
|
130
|
-
default: I(() => [
|
|
131
|
-
b("div", null, [
|
|
132
|
-
ge,
|
|
133
|
-
s(i, {
|
|
134
|
-
modelValue: e(c),
|
|
135
|
-
"onUpdate:modelValue": o[0] || (o[0] = (t) => K(c) ? c.value = t : null),
|
|
136
|
-
inline: !1
|
|
137
|
-
}, {
|
|
138
|
-
default: I(() => [
|
|
139
|
-
(y(), R(P, null, te(A, (t) => s(v, {
|
|
140
|
-
key: t.value,
|
|
141
|
-
value: t.value,
|
|
142
|
-
label: t.label,
|
|
143
|
-
sublabel: t.sublabel
|
|
144
|
-
}, null, 8, ["value", "label", "sublabel"])), 64))
|
|
145
|
-
]),
|
|
146
|
-
_: 1
|
|
147
|
-
}, 8, ["modelValue"])
|
|
148
|
-
]),
|
|
149
|
-
b("div", be, [
|
|
150
|
-
Ce,
|
|
151
|
-
e(c) === "bulk" ? (y(), R(P, { key: 0 }, [
|
|
152
|
-
s(V, {
|
|
153
|
-
"model-value": e(x),
|
|
154
|
-
"label-placement": "right",
|
|
155
|
-
value: "true",
|
|
156
|
-
label: "Advance code setting",
|
|
157
|
-
required: !0,
|
|
158
|
-
"onUpdate:modelValue": o[1] || (o[1] = () => x.value = !e(x))
|
|
159
|
-
}, null, 8, ["model-value"]),
|
|
160
|
-
e(x) ? (y(), R(P, { key: 0 }, [
|
|
161
|
-
s(M, {
|
|
162
|
-
modelValue: e(a).codeConfig.length,
|
|
163
|
-
"onUpdate:modelValue": o[2] || (o[2] = (t) => e(a).codeConfig.length = t),
|
|
164
|
-
label: "Code length",
|
|
165
|
-
max: 16,
|
|
166
|
-
min: 1,
|
|
167
|
-
rules: [
|
|
168
|
-
(t) => Number(t) >= 1 || "Code length must at least 1",
|
|
169
|
-
(t) => Number(t) <= 16 || "Code length must less than 16"
|
|
170
|
-
],
|
|
171
|
-
required: !0
|
|
172
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
173
|
-
s(S, {
|
|
174
|
-
label: "Charset",
|
|
175
|
-
"model-value": e(C),
|
|
176
|
-
items: B,
|
|
177
|
-
"helper-text": e(a).codeConfig.charset.length > 62 ? `${e(a).codeConfig.charset.substring(0, 62)}...` : e(a).codeConfig.charset,
|
|
178
|
-
"onUpdate:modelValue": o[3] || (o[3] = (t) => {
|
|
179
|
-
C.value = t, e(a).codeConfig.charset = t;
|
|
180
|
-
})
|
|
181
|
-
}, null, 8, ["model-value", "helper-text"]),
|
|
182
|
-
e(C) === "" ? (y(), L(h, {
|
|
183
|
-
key: 0,
|
|
184
|
-
modelValue: e(a).codeConfig.charset,
|
|
185
|
-
"onUpdate:modelValue": o[4] || (o[4] = (t) => e(a).codeConfig.charset = t),
|
|
186
|
-
label: "Custom Charset",
|
|
187
|
-
required: ""
|
|
188
|
-
}, null, 8, ["modelValue"])) : U("", !0),
|
|
189
|
-
b("div", ve, [
|
|
190
|
-
s(h, {
|
|
191
|
-
modelValue: e(a).codeConfig.prefix,
|
|
192
|
-
"onUpdate:modelValue": o[5] || (o[5] = (t) => e(a).codeConfig.prefix = t),
|
|
193
|
-
label: "Prefix (Optional)"
|
|
194
|
-
}, null, 8, ["modelValue"]),
|
|
195
|
-
s(h, {
|
|
196
|
-
modelValue: e(a).codeConfig.suffix,
|
|
197
|
-
"onUpdate:modelValue": o[6] || (o[6] = (t) => e(a).codeConfig.suffix = t),
|
|
198
|
-
label: "Suffix (Optional)"
|
|
199
|
-
}, null, 8, ["modelValue"])
|
|
200
|
-
]),
|
|
201
|
-
s(h, {
|
|
202
|
-
modelValue: e(a).codeConfig.pattern,
|
|
203
|
-
"onUpdate:modelValue": o[7] || (o[7] = (t) => e(a).codeConfig.pattern = t),
|
|
204
|
-
label: "Pattern",
|
|
205
|
-
required: !0
|
|
206
|
-
}, null, 8, ["modelValue"])
|
|
207
|
-
], 64)) : U("", !0),
|
|
208
|
-
s(h, {
|
|
209
|
-
modelValue: e(a).quantity,
|
|
210
|
-
"onUpdate:modelValue": o[8] || (o[8] = (t) => e(a).quantity = t),
|
|
211
|
-
label: "Number of code",
|
|
212
|
-
rules: [
|
|
213
|
-
(t) => t >= 1 || "Quantity cannot be less than 1",
|
|
214
|
-
(t) => t <= 1e4 || "Quantity cannot more than 10,000"
|
|
215
|
-
],
|
|
216
|
-
required: !0,
|
|
217
|
-
"helper-text": `${e(a).quantity} claim will be created`
|
|
218
|
-
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
219
|
-
], 64)) : U("", !0),
|
|
220
|
-
e(c) !== "bulk" ? (y(), L(W, {
|
|
221
|
-
key: 1,
|
|
222
|
-
modelValue: e(a).code,
|
|
223
|
-
"onUpdate:modelValue": o[9] || (o[9] = (t) => e(a).code = t),
|
|
224
|
-
label: "Custom Code",
|
|
225
|
-
rules: [(t) => e(c) != "single" || !!t || "Custom code is required"],
|
|
226
|
-
placeholder: "(For multiple codes, please enter in the new row.)"
|
|
227
|
-
}, null, 8, ["modelValue", "rules"])) : U("", !0)
|
|
228
|
-
])
|
|
229
|
-
]),
|
|
230
|
-
_: 1
|
|
231
|
-
}, 512)
|
|
232
|
-
]),
|
|
233
|
-
_: 1
|
|
234
|
-
}, 8, ["modelValue"]);
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
class xe {
|
|
239
|
-
constructor() {
|
|
240
|
-
z(this, "data", []);
|
|
241
|
-
}
|
|
242
|
-
addRecord(r) {
|
|
243
|
-
this.data.push(r);
|
|
244
|
-
}
|
|
245
|
-
buildExcel() {
|
|
246
|
-
const r = Y.book_new(), d = Y.json_to_sheet(this.data);
|
|
247
|
-
return Y.book_append_sheet(r, d, "Collection"), r;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex items-center justify-end py-4 xs:hidden" }, Me = /* @__PURE__ */ G({
|
|
251
|
-
__name: "Collections",
|
|
252
|
-
setup(f) {
|
|
253
|
-
const r = ie(), d = Q(), w = p(), F = H(() => d.params.id), k = p(!1), { custom: _ } = J, E = [
|
|
254
|
-
{
|
|
255
|
-
header: "ID/Code",
|
|
256
|
-
accessorKey: "_id",
|
|
257
|
-
cell(n) {
|
|
258
|
-
return T("div", { class: "flex items-center" }, [
|
|
259
|
-
T(le.FmIcon, {
|
|
260
|
-
name: "content_copy",
|
|
261
|
-
outline: !0,
|
|
262
|
-
size: "sm",
|
|
263
|
-
class: "cursor-pointer mr-4",
|
|
264
|
-
onClick: (l) => {
|
|
265
|
-
l.preventDefault(), l.stopPropagation(), ne(
|
|
266
|
-
n.row.original.code || n.row.original._id.toString()
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
}),
|
|
270
|
-
T(
|
|
271
|
-
"div",
|
|
272
|
-
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
273
|
-
n.row.original.code || n.row.original._id.toString()
|
|
274
|
-
)
|
|
275
|
-
]);
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
header: "User",
|
|
280
|
-
accessorKey: "user",
|
|
281
|
-
enableSorting: !1,
|
|
282
|
-
cell(n) {
|
|
283
|
-
const l = n.row.original.pf_user;
|
|
284
|
-
return me(l);
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
header: "Phone",
|
|
289
|
-
accessorFn: (n) => {
|
|
290
|
-
var l;
|
|
291
|
-
return ((l = n.pf_user) == null ? void 0 : l.phoneNumber) || "-";
|
|
292
|
-
},
|
|
293
|
-
accessorKey: "pf_user.phoneNumber"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
header: "Balance",
|
|
297
|
-
accessorKey: "balance"
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
header: "Created at",
|
|
301
|
-
accessorKey: "_id",
|
|
302
|
-
accessorFn: (n) => j(fe(n._id.toString())).format("DD MMM YYYY")
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
header: "Nearest expired at",
|
|
306
|
-
accessorKey: "expiryBalance",
|
|
307
|
-
accessorFn: (n) => {
|
|
308
|
-
var l;
|
|
309
|
-
return n.expiryBalance && n.expiryBalance.length ? j((l = n.expiryBalance) == null ? void 0 : l[0].expiredAt).format("DD MMM YYYY") : "Never expires";
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
], g = {
|
|
313
|
-
"$connect-STORE_REWARD_COLLECTIONS": pe.readCollectionsByRewardId,
|
|
314
|
-
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS": N.readCollectionsByCampaignId
|
|
315
|
-
}, q = (n) => {
|
|
316
|
-
const l = g[d.name];
|
|
317
|
-
return (o) => l(n, o);
|
|
318
|
-
}, { tableMeta: a, rowData: A, onSort: B, debouncedFetchData: C, onSearch: c } = ue(q(F.value));
|
|
319
|
-
async function x() {
|
|
320
|
-
var n;
|
|
321
|
-
await C(), (n = w.value) == null || n.showSheet(!1);
|
|
322
|
-
}
|
|
323
|
-
async function D() {
|
|
324
|
-
k.value || _(
|
|
325
|
-
async () => {
|
|
326
|
-
var v;
|
|
327
|
-
const n = new xe(), l = (await N.readCollectionsByCampaignId(F.value, {
|
|
328
|
-
limit: 1,
|
|
329
|
-
skip: 0,
|
|
330
|
-
sortBy: m.sortBy,
|
|
331
|
-
descending: m.descending
|
|
332
|
-
})).meta.totalResources ?? 0, o = m.rowsPerPage;
|
|
333
|
-
for (let i = 0; i < l; i += o) {
|
|
334
|
-
const V = {
|
|
335
|
-
...m,
|
|
336
|
-
limit: o,
|
|
337
|
-
skip: (m.page - 1) * m.rowsPerPage,
|
|
338
|
-
sortBy: m.sortBy,
|
|
339
|
-
descending: m.descending
|
|
340
|
-
}, M = await N.readCollectionsByCampaignId(
|
|
341
|
-
F.value,
|
|
342
|
-
V
|
|
343
|
-
);
|
|
344
|
-
for await (const S of M.resources) {
|
|
345
|
-
const h = {
|
|
346
|
-
Id: (S == null ? void 0 : S.code) || ((v = S._id) == null ? void 0 : v.toString()) || ""
|
|
347
|
-
};
|
|
348
|
-
n.addRecord(h);
|
|
349
|
-
}
|
|
350
|
-
m.page++;
|
|
351
|
-
}
|
|
352
|
-
await ce(
|
|
353
|
-
n.buildExcel(),
|
|
354
|
-
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
355
|
-
{
|
|
356
|
-
bookType: "xlsx",
|
|
357
|
-
bookSST: !1,
|
|
358
|
-
type: "array"
|
|
359
|
-
}
|
|
360
|
-
), m.page = 1;
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
isLoading: k
|
|
364
|
-
}
|
|
365
|
-
);
|
|
366
|
-
}
|
|
367
|
-
return ae(async () => {
|
|
368
|
-
await C();
|
|
369
|
-
}), (n, l) => {
|
|
370
|
-
const o = u("FmPageHead"), v = u("FmSearch");
|
|
371
|
-
return y(), R(P, null, [
|
|
372
|
-
s(o, {
|
|
373
|
-
title: "Collections",
|
|
374
|
-
"back-button": !0,
|
|
375
|
-
actions: [
|
|
376
|
-
{ label: "Export", value: "export", isPrimary: !1 },
|
|
377
|
-
{
|
|
378
|
-
label: "Create collection",
|
|
379
|
-
value: "create",
|
|
380
|
-
isPrimary: !0
|
|
381
|
-
}
|
|
382
|
-
],
|
|
383
|
-
"onClick:back": l[0] || (l[0] = (i) => e(r).back()),
|
|
384
|
-
"onClick:action": l[1] || (l[1] = (i) => {
|
|
385
|
-
var V;
|
|
386
|
-
i === "create" && ((V = e(w)) == null || V.showSheet(!0)), i === "export" && D();
|
|
387
|
-
})
|
|
388
|
-
}),
|
|
389
|
-
b("div", Ve, [
|
|
390
|
-
s(v, {
|
|
391
|
-
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
392
|
-
modelValue: e(a).searchValue,
|
|
393
|
-
"onUpdate:modelValue": [
|
|
394
|
-
l[2] || (l[2] = (i) => e(a).searchValue = i),
|
|
395
|
-
e(c)
|
|
396
|
-
],
|
|
397
|
-
placeholder: "Search",
|
|
398
|
-
collapsible: ""
|
|
399
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
400
|
-
b("div", Se, [
|
|
401
|
-
s(v, {
|
|
402
|
-
modelValue: e(a).searchValue,
|
|
403
|
-
"onUpdate:modelValue": [
|
|
404
|
-
l[3] || (l[3] = (i) => e(a).searchValue = i),
|
|
405
|
-
e(c)
|
|
406
|
-
],
|
|
407
|
-
placeholder: "Search",
|
|
408
|
-
collapsible: ""
|
|
409
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
410
|
-
]),
|
|
411
|
-
s(de, {
|
|
412
|
-
loading: e(a).isLoading,
|
|
413
|
-
"row-data": e(A),
|
|
414
|
-
"column-defs": E,
|
|
415
|
-
"row-count": e(a).totalRows,
|
|
416
|
-
"page-count": e(a).pageCount,
|
|
417
|
-
"page-index": e(a).pageIndex,
|
|
418
|
-
"page-size": e(a).pageSize,
|
|
419
|
-
"shrink-at": !1,
|
|
420
|
-
onSortChange: e(B),
|
|
421
|
-
onPageChange: l[4] || (l[4] = (i) => e(C)({ pageSize: i.pageSize, pageIndex: i.pageIndex }))
|
|
422
|
-
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
423
|
-
s(ye, {
|
|
424
|
-
ref_key: "sheetRef",
|
|
425
|
-
ref: w,
|
|
426
|
-
onSuccess: x
|
|
427
|
-
}, null, 512)
|
|
428
|
-
])
|
|
429
|
-
], 64);
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
});
|
|
433
|
-
export {
|
|
434
|
-
Me as default
|
|
435
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { g as l } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
2
|
-
var t = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_b2007d0c-fee0-4aa3-ba64-d60df24c34f6", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.41", 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.15.9 npm/? node/v20.19.1 linux x64", CI: "true", npm_package_dependencies_vue: "^3.4.33", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_b2007d0c-fee0-4aa3-ba64-d60df24c34f6", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.4", npm_node_execpath: "/opt/hostedtoolcache/node/20.19.1/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.14", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/28.1.13356709", 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.12.5", npm_package_dependencies_fabric: "^6.4.2", npm_package_dependencies_zod_i18n_map: "2.27.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", SYSTEMD_EXEC_PID: "709", npm_package_dependencies__feedmepos_ui_library: "1.5.5", npm_package_dependencies_dayjs: "^1.11.12", 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_dependencies_i18next: "24.2.1", npm_package_devDependencies_tailwindcss: "^3.4.6", npm_package_devDependencies_typescript: "^5.5.3", 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", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.26", 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: "20250511.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.8", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/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.9/x64", JOURNAL_STREAM: "9:5873", GITHUB_WORKFLOW: "Publish mf-connect - production", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.157.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "15292553735", STATS_VMFE: "true", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.7", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "5b33b55243662c44ec569a21a97eb4a4fe07250b", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[PROD] publish-mf-connect.yml@refs/heads/main", 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.15.9/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.15.9/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.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.1/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_f7ea88fd-29a2-4c74-ad55-e8e57a814def", INVOCATION_ID: "03ca1b8509874856bc824c5f7ccfca4e", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.19.1/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: "56", 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.18", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 463", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "main", 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.14.6", npm_lifecycle_script: "vite build --mode fmmf:prod", 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.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.1.13-prod", npm_lifecycle_event: "build:mf:prod", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", 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: "5b33b55243662c44ec569a21a97eb4a4fe07250b", GITHUB_RUN_ATTEMPT: "1", STATS_D_TC: "true", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.4.0", GITHUB_REF: "refs/heads/main", GITHUB_ACTOR: "qaijunse", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_dependencies_firebase: "^10.12.4", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_b2007d0c-fee0-4aa3-ba64-d60df24c34f6", JAVA_HOME: "/usr/lib/jvm/temurin-17-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.15.9/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", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_b2007d0c-fee0-4aa3-ba64-d60df24c34f6", 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.39", 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", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", STATS_EXTP: "https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_b2007d0c-fee0-4aa3-ba64-d60df24c34f6", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", NODE_ENV: "production", FEEDME_NAMESPACE: "prod", FIREBASE_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", FIREBASE_AUTH_DOMAIN: "feedme-253402.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-253402.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-253402", FIREBASE_STORAGE_BUCKET: "image.feedme.cc", FIREBASE_MESSAGING_SENDER_ID: "128512026847", FIREBASE_APP_ID: "1:128512026847:web:7c5c8ab7e8b90502dc616a", FIREBASE_MEASUREMENT_ID: "G-LTKS7N2HQS", ASSET_STORAGE_BUCKET: "static.feedme.cc", AUTH_URL: "https://portal-v2.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "member.feedme.cc", CRM_APP_URL: "crm.feedme.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedme.cc", CLIENT_ID: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", PAYMENT_PORTAL_URL: "https://portal.feedme.cc/payment/payout-account" } }, i = Math.floor(Math.random() * 16777215), a = n.index = parseInt(Math.random() * 16777215, 10), c = (typeof t > "u" || typeof t.pid != "number" ? Math.floor(Math.random() * 1e5) : t.pid) % 65535, d = (() => {
|
|
3
|
-
try {
|
|
4
|
-
return _Buffer;
|
|
5
|
-
} catch {
|
|
6
|
-
try {
|
|
7
|
-
return Buffer;
|
|
8
|
-
} catch {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
})(), p = function(e) {
|
|
13
|
-
return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
|
|
14
|
-
}, u = [];
|
|
15
|
-
for (var r = 0; r < 256; r++)
|
|
16
|
-
u[r] = (r <= 15 ? "0" : "") + r.toString(16);
|
|
17
|
-
var m = new RegExp("^[0-9a-fA-F]{24}$"), s = [];
|
|
18
|
-
r = 0;
|
|
19
|
-
for (; r < 10; ) s[48 + r] = r++;
|
|
20
|
-
for (; r < 16; ) s[55 + r] = s[87 + r] = r++;
|
|
21
|
-
function n(e) {
|
|
22
|
-
if (!(this instanceof n)) return new n(e);
|
|
23
|
-
if (e && (e instanceof n || e._bsontype === "ObjectID"))
|
|
24
|
-
return e;
|
|
25
|
-
if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
|
|
26
|
-
this.id = this.generate(e);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
var _ = n.isValid(e);
|
|
30
|
-
if (!_ && e != null)
|
|
31
|
-
throw new Error(
|
|
32
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
33
|
-
);
|
|
34
|
-
if (_ && typeof e == "string" && e.length === 24)
|
|
35
|
-
return n.createFromHexString(e);
|
|
36
|
-
if (e != null && e.length === 12)
|
|
37
|
-
this.id = e;
|
|
38
|
-
else {
|
|
39
|
-
if (e != null && typeof e.toHexString == "function")
|
|
40
|
-
return e;
|
|
41
|
-
throw new Error(
|
|
42
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
var g = n;
|
|
47
|
-
n.default = n;
|
|
48
|
-
n.createFromTime = function(e) {
|
|
49
|
-
return e = parseInt(e, 10) % 4294967295, new n(f(8, e) + "0000000000000000");
|
|
50
|
-
};
|
|
51
|
-
n.createFromHexString = function(e) {
|
|
52
|
-
if (typeof e > "u" || e != null && e.length !== 24)
|
|
53
|
-
throw new Error(
|
|
54
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
55
|
-
);
|
|
56
|
-
for (var _ = "", o = 0; o < 24; )
|
|
57
|
-
_ += String.fromCharCode(s[e.charCodeAt(o++)] << 4 | s[e.charCodeAt(o++)]);
|
|
58
|
-
return new n(_);
|
|
59
|
-
};
|
|
60
|
-
n.isValid = function(e) {
|
|
61
|
-
return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && m.test(e) : e instanceof n ? !0 : p(e) ? n.isValid(e.toString("hex")) : typeof e.toHexString == "function" && d && (e.id instanceof d || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && m.test(e.id) : !1;
|
|
62
|
-
};
|
|
63
|
-
n.prototype = {
|
|
64
|
-
constructor: n,
|
|
65
|
-
/**
|
|
66
|
-
* Return the ObjectID id as a 24 byte hex string representation
|
|
67
|
-
*
|
|
68
|
-
* @return {String} return the 24 byte hex string representation.
|
|
69
|
-
* @api public
|
|
70
|
-
*/
|
|
71
|
-
toHexString: function() {
|
|
72
|
-
if (!this.id || !this.id.length)
|
|
73
|
-
throw new Error(
|
|
74
|
-
"invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
|
|
75
|
-
);
|
|
76
|
-
if (this.id.length === 24)
|
|
77
|
-
return this.id;
|
|
78
|
-
if (p(this.id))
|
|
79
|
-
return this.id.toString("hex");
|
|
80
|
-
for (var e = "", _ = 0; _ < this.id.length; _++)
|
|
81
|
-
e += u[this.id.charCodeAt(_)];
|
|
82
|
-
return e;
|
|
83
|
-
},
|
|
84
|
-
/**
|
|
85
|
-
* Compares the equality of this ObjectID with `otherID`.
|
|
86
|
-
*
|
|
87
|
-
* @param {Object} otherId ObjectID instance to compare against.
|
|
88
|
-
* @return {Boolean} the result of comparing two ObjectID's
|
|
89
|
-
* @api public
|
|
90
|
-
*/
|
|
91
|
-
equals: function(e) {
|
|
92
|
-
return e instanceof n ? this.toString() === e.toString() : typeof e == "string" && n.isValid(e) && e.length === 12 && p(this.id) ? e === this.id.toString("binary") : typeof e == "string" && n.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && n.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof n || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
|
|
93
|
-
},
|
|
94
|
-
/**
|
|
95
|
-
* Returns the generation date (accurate up to the second) that this ID was generated.
|
|
96
|
-
*
|
|
97
|
-
* @return {Date} the generation date
|
|
98
|
-
* @api public
|
|
99
|
-
*/
|
|
100
|
-
getTimestamp: function() {
|
|
101
|
-
var e = /* @__PURE__ */ new Date(), _;
|
|
102
|
-
return p(this.id) ? _ = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : _ = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(_) * 1e3), e;
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* Generate a 12 byte id buffer used in ObjectID's
|
|
106
|
-
*
|
|
107
|
-
* @method
|
|
108
|
-
* @param {number} [time] optional parameter allowing to pass in a second based timestamp.
|
|
109
|
-
* @return {string} return the 12 byte id buffer string.
|
|
110
|
-
*/
|
|
111
|
-
generate: function(e) {
|
|
112
|
-
typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
|
|
113
|
-
var _ = E();
|
|
114
|
-
return String.fromCharCode(
|
|
115
|
-
e >> 24 & 255,
|
|
116
|
-
e >> 16 & 255,
|
|
117
|
-
e >> 8 & 255,
|
|
118
|
-
e & 255,
|
|
119
|
-
i >> 16 & 255,
|
|
120
|
-
i >> 8 & 255,
|
|
121
|
-
i & 255,
|
|
122
|
-
c >> 8 & 255,
|
|
123
|
-
c & 255,
|
|
124
|
-
_ >> 16 & 255,
|
|
125
|
-
_ >> 8 & 255,
|
|
126
|
-
_ & 255
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
function E() {
|
|
131
|
-
return a = (a + 1) % 16777215;
|
|
132
|
-
}
|
|
133
|
-
function f(e, _) {
|
|
134
|
-
return _ = _.toString(16), _.length === e ? _ : "00000000".substring(_.length, e) + _;
|
|
135
|
-
}
|
|
136
|
-
var T = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
|
|
137
|
-
n.prototype[T] = function() {
|
|
138
|
-
return "ObjectID(" + this + ")";
|
|
139
|
-
};
|
|
140
|
-
n.prototype.toJSON = n.prototype.toHexString;
|
|
141
|
-
n.prototype.toString = n.prototype.toHexString;
|
|
142
|
-
const R = /* @__PURE__ */ l(g);
|
|
143
|
-
export {
|
|
144
|
-
R as O
|
|
145
|
-
};
|