@feedmepos/mf-connect 0.1.2-prod → 0.1.4-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.
Files changed (87) hide show
  1. package/dist/Analytic-07T9poLx.js +423 -0
  2. package/dist/{App-CRTD0U-N.js → App-C6MukSCT.js} +276 -275
  3. package/dist/Broadcast-CzsgeZNO.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C5zUv0Zx.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BirunpzI.js} +8 -8
  5. package/dist/Card-DQnyWZZf.js +824 -0
  6. package/dist/{Collections-BgbWoLWI.js → Collections-BV7CSqRw.js} +4 -4
  7. package/dist/Credit-CxsbYGLZ.js +220 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C137bE1q.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKSZYxvb.js} +918 -901
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DpsrI-Z3.js +345 -0
  10. package/dist/Experience-eMUbhq7h.js +221 -0
  11. package/dist/Game-CxAG2ViS.js +255 -0
  12. package/dist/Marketing-CozMj2Y5.js +316 -0
  13. package/dist/Member-DM1dj3F5.js +69 -0
  14. package/dist/{MemberList-ISy05wGZ.js → MemberList-DNjK9BbG.js} +14 -14
  15. package/dist/{MemberTransactions-CXvhJngX.js → MemberTransactions-CsjN3LZA.js} +1 -1
  16. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Ca1LO__F.js → MessageInput.vue_vue_type_script_setup_true_lang-DVQE9v2R.js} +2 -2
  17. package/dist/Mission-BugvTPPH.js +261 -0
  18. package/dist/Point-D8BjGtqT.js +222 -0
  19. package/dist/Promotion-mc9KBzoJ.js +253 -0
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D1eQ3i5D.js → RuleGroup.vue_vue_type_script_setup_true_lang-B2H3D_kZ.js} +15 -15
  21. package/dist/Segment-DZRFA-Pb.js +565 -0
  22. package/dist/Setting-DxNhR44e.js +1871 -0
  23. package/dist/Store-CdkJWpjV.js +1530 -0
  24. package/dist/StoreRewards-Cdturia8.js +400 -0
  25. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-nhS5Dhhk.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D7GcOiUM.js} +10 -10
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DWlpmE56.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-nuCOrrLE.js} +1 -1
  27. package/dist/{Tier-DLrOmrnK.js → Tier-I_MMd39Y.js} +470 -445
  28. package/dist/{Title-MHQuel7h.js → Title-DK5gmUvo.js} +298 -282
  29. package/dist/Transaction-BXpTIMS_.js +39 -0
  30. package/dist/Voucher-BQ5h2G0I.js +490 -0
  31. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-eAP99wyg.js +141 -0
  32. package/dist/app-CL2Wxzv5.js +5639 -0
  33. package/dist/{app-BjOpRVdv.js → app-DTAyCT-G.js} +1 -1
  34. package/dist/app.js +4 -3
  35. package/dist/{business-DveMDDHY.js → business-B9OUlaFZ.js} +1 -1
  36. package/dist/{campaign-CMb05XLt.js → campaign-CNbUA51l.js} +2 -2
  37. package/dist/{collection.fn-BjaBPYMU.js → collection.fn-D_i45T4Q.js} +2 -2
  38. package/dist/dto-B4208_es.js +2770 -0
  39. package/dist/{effect-CxAdSlyD.js → effect-Ye_yr8et.js} +1 -1
  40. package/dist/{email-addresses-Dtr5OALQ.js → email-addresses-Gm7Dyaxy.js} +1 -1
  41. package/dist/{export-DuBekrcg.js → export-Buee5oUV.js} +3 -3
  42. package/dist/{helper-DL6hnmtJ.js → helper-BBlHhMFc.js} +1 -1
  43. package/dist/{index-raYm7Ew2.js → index-BxJgFvym.js} +2 -2
  44. package/dist/{index-gcsOy_cD.js → index-ByaM-yoc.js} +91 -86
  45. package/dist/{index-DISwCnfH.js → index-C0QHb5SL.js} +2 -2
  46. package/dist/{index-Cibwzgac.js → index-C363BG5A.js} +3 -3
  47. package/dist/{index-BZAlqAaJ.js → index-CLL3no-v.js} +1 -1
  48. package/dist/{index-CAQpU5Rv.js → index-ChSVaFk3.js} +1 -1
  49. package/dist/{index-BSIUoSG3.js → index-Co9n8I_5.js} +3 -3
  50. package/dist/index-CoGNKU8v.js +3 -0
  51. package/dist/{index-Dx4pkNRc.js → index-DHGcUMVN.js} +1 -1
  52. package/dist/{index-CgPlJqkX.js → index-DWWtZSrm.js} +1 -1
  53. package/dist/{index-CGHNWhkM.js → index-DdVZgYE4.js} +258 -256
  54. package/dist/{index-BBBytzpn.js → index-Dx3HwWcb.js} +1 -1
  55. package/dist/{index.esm2017-Bs9CWbrs.js → index.esm2017-Dd02dg_O.js} +38 -38
  56. package/dist/{loading-Dj5bx8fg.js → loading-Or1ZDzDS.js} +11 -11
  57. package/dist/{membership-B2avlZoN.js → membership-B8h5ku-v.js} +3 -3
  58. package/dist/{money-CNSWtAf-.js → money-CmsKAJBT.js} +1 -1
  59. package/dist/{number-BA58pjU6.js → number-iEhp7Uai.js} +1 -1
  60. package/dist/{rule-BWazFYuZ.js → rule-BORkgSMK.js} +3 -3
  61. package/dist/{rule-builder-RIloDQBn.js → rule-builder-DEfkSr68.js} +1 -1
  62. package/dist/{template-u01r84LY.js → template-C_Y7bhlI.js} +4 -4
  63. package/dist/{usePagination--B6Wt7C1.js → usePagination-Ci8-uZvb.js} +1 -1
  64. package/dist/vue-i18n-BXzrZRP6.js +2365 -0
  65. package/package.json +7 -4
  66. package/dist/Analytic-AqWU_lJy.js +0 -620
  67. package/dist/Broadcast-utWSrzP9.js +0 -216
  68. package/dist/Card-x6qnEaIt.js +0 -823
  69. package/dist/Credit-CojzmUnh.js +0 -214
  70. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-8l3Dt_Lo.js +0 -344
  71. package/dist/Experience-CPjovKWF.js +0 -211
  72. package/dist/Game-DWcjPfZP.js +0 -250
  73. package/dist/Marketing-CwoI0pFF.js +0 -309
  74. package/dist/Member-oRcVGr20.js +0 -92
  75. package/dist/Mission-Y8s5MQIC.js +0 -248
  76. package/dist/Point-0Fw3qLIW.js +0 -220
  77. package/dist/Promotion-vqM23NPX.js +0 -244
  78. package/dist/Segment-lgzMRCyd.js +0 -564
  79. package/dist/Setting-CFGB53S0.js +0 -1870
  80. package/dist/Store-fJlew3HJ.js +0 -1533
  81. package/dist/StoreRewards-DWq34E4p.js +0 -429
  82. package/dist/Transaction-CYqMFEzc.js +0 -36
  83. package/dist/Voucher-B0QCX_nG.js +0 -485
  84. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  85. package/dist/app-SOHUUM08.js +0 -2974
  86. package/dist/dto-CY7JrHkZ.js +0 -1145
  87. package/dist/index-BMxu_XL-.js +0 -11
@@ -0,0 +1,423 @@
1
+ import { defineComponent as j, ref as y, watch as X, onMounted as I, resolveComponent as x, openBlock as d, createBlock as A, withCtx as L, createVNode as h, unref as t, createElementVNode as i, createElementBlock as k, Fragment as $, renderList as D, computed as G, toDisplayString as O, isRef as T, createSlots as Y, createCommentVNode as V, createTextVNode as ee, reactive as te, onBeforeMount as ae } from "vue";
2
+ import { _ as ne } from "./campaign-CpzFl8Vr.js";
3
+ import "./index-Co9n8I_5.js";
4
+ import { F as le, C as oe } from "./dto-B4208_es.js";
5
+ import { useRouter as se } from "vue-router";
6
+ import { c as R } from "./index-DWWtZSrm.js";
7
+ import { _ as re, Z as ie } from "./ZodTextField.vue_vue_type_script_setup_true_lang-eAP99wyg.js";
8
+ import { J as ue } from "./JsonViewer-v8_C7l5N.js";
9
+ import { u as ce } from "./loading-Or1ZDzDS.js";
10
+ import { useSnackbar as me } from "@feedmepos/ui-library";
11
+ import { u as de } from "./app-wDQR6dpb.js";
12
+ import { g as pe } from "./object-qECH92oz.js";
13
+ import { u as ve } from "./campaign-CNbUA51l.js";
14
+ import { u as fe } from "./membership-B8h5ku-v.js";
15
+ import { u as ye } from "./vue-i18n-BXzrZRP6.js";
16
+ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
17
+ __name: "CampaignCard",
18
+ props: {
19
+ title: {},
20
+ items: {},
21
+ modelValue: {}
22
+ },
23
+ emits: ["update:model-value"],
24
+ setup(U, { emit: b }) {
25
+ const u = U, v = b, S = (o) => {
26
+ o ? p.value = u.items.map((a) => a.value) : p.value = [], r.value = o, v("update:model-value", p.value);
27
+ }, _ = (o) => {
28
+ p.value = o, r.value = o.length === u.items.length, v("update:model-value", o);
29
+ }, r = y(!1), p = y([]);
30
+ return X(
31
+ () => u.modelValue,
32
+ () => {
33
+ p.value = u.modelValue.filter(
34
+ (o) => u.items.find((a) => a.value === o)
35
+ );
36
+ }
37
+ ), I(() => {
38
+ p.value = u.modelValue.filter(
39
+ (o) => u.items.find((a) => a.value === o)
40
+ );
41
+ }), (o, a) => {
42
+ const g = x("FmCheckbox"), l = x("FmCard");
43
+ return d(), A(l, {
44
+ variant: "outlined",
45
+ class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
46
+ }, {
47
+ default: L(() => [
48
+ h(g, {
49
+ "model-value": t(r),
50
+ value: "1",
51
+ label: u.title,
52
+ indeterminate: t(p).length > 0,
53
+ "onUpdate:modelValue": S
54
+ }, null, 8, ["model-value", "label", "indeterminate"]),
55
+ i("div", _e, [
56
+ (d(!0), k($, null, D(u.items, (n, c) => (d(), A(g, {
57
+ key: c,
58
+ "model-value": t(p),
59
+ label: n.label,
60
+ value: n.value,
61
+ "onUpdate:modelValue": _
62
+ }, null, 8, ["model-value", "label", "value"]))), 128))
63
+ ])
64
+ ]),
65
+ _: 1
66
+ });
67
+ };
68
+ }
69
+ }), he = { class: "space-y-16" }, be = { class: "flex items-center" }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, Ce = { class: "space-y-[40px]" }, ke = /* @__PURE__ */ j({
70
+ __name: "LinkCampaign",
71
+ props: {
72
+ modelValue: {
73
+ type: Array,
74
+ required: !0
75
+ },
76
+ campaigns: {
77
+ type: Object,
78
+ required: !0
79
+ }
80
+ },
81
+ emits: ["update:model-value"],
82
+ setup(U, { emit: b }) {
83
+ const u = y(""), v = y([]), S = U, _ = b, r = G(() => Object.entries(S.campaigns).reduce((o, [a, g]) => {
84
+ const l = g.filter(
85
+ (n) => n.label.toLowerCase().includes(u.value.toLowerCase())
86
+ );
87
+ return l.length > 0 && (o[a] = l), o;
88
+ }, {}));
89
+ function p(o, a) {
90
+ v.value = v.value.filter(
91
+ (g) => !a.map((l) => l.value).includes(g)
92
+ ), v.value = [.../* @__PURE__ */ new Set([...v.value, ...o])], _("update:model-value", v.value);
93
+ }
94
+ return I(() => {
95
+ v.value = S.modelValue;
96
+ }), (o, a) => {
97
+ const g = x("FmTextField");
98
+ return d(), k($, null, [
99
+ h(ue, { json: U.campaigns }, null, 8, ["json"]),
100
+ i("div", he, [
101
+ i("div", be, [
102
+ i("div", xe, O(t(v).length) + " campaign(s) linked ", 1),
103
+ h(g, {
104
+ modelValue: t(u),
105
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => T(u) ? u.value = l : null),
106
+ "prepend-icon": "search",
107
+ placeholder: "Search",
108
+ class: "w-full"
109
+ }, null, 8, ["modelValue"])
110
+ ]),
111
+ i("div", Ce, [
112
+ (d(!0), k($, null, D(t(r), (l, n) => (d(), A(ge, {
113
+ "model-value": t(v),
114
+ title: n,
115
+ items: l,
116
+ "onUpdate:modelValue": (c) => p(c, l)
117
+ }, null, 8, ["model-value", "title", "items", "onUpdate:modelValue"]))), 256))
118
+ ])
119
+ ])
120
+ ], 64);
121
+ };
122
+ }
123
+ }), Ve = { class: "flex items-center gap-x-8" }, Se = {
124
+ key: 0,
125
+ class: "space-y-16 pr-12"
126
+ }, we = /* @__PURE__ */ i("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1), Fe = /* @__PURE__ */ i("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1), Ae = { class: "flex items-center gap-x-16" }, $e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ue = { class: "mt-16" }, Pe = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Le = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Ge = { class: "flex items-center gap-8" }, Me = /* @__PURE__ */ j({
127
+ __name: "AnalyticSheet",
128
+ emits: ["success"],
129
+ setup(U, { expose: b, emit: u }) {
130
+ const v = u, S = de();
131
+ me();
132
+ const _ = y(!1), r = y(!1), p = {
133
+ name: "",
134
+ campaigns: []
135
+ }, o = y(""), a = y({ ...p }), g = le.superRefine((s, e) => {
136
+ }), l = y([]), n = y(null), { global: c, minor: w } = ce, P = G(() => {
137
+ const s = g.safeParse(a.value);
138
+ return s.success ? [] : s.error.errors;
139
+ });
140
+ function M(s) {
141
+ var e;
142
+ _.value = !0, s ? (n.value = { ...s }, a.value = { ...s, campaigns: (e = s.pf_campaigns) == null ? void 0 : e.map((m) => m._id) }) : (n.value = null, a.value = { ...p });
143
+ }
144
+ function F() {
145
+ _.value = !1, n.value = null;
146
+ }
147
+ function K() {
148
+ r.value = !0;
149
+ }
150
+ async function W() {
151
+ const s = await R.readAll({
152
+ limit: 1e3,
153
+ skip: 0,
154
+ sortBy: "_id",
155
+ search: "",
156
+ descending: !0
157
+ });
158
+ l.value = s.resources.filter(
159
+ (e) => !["MEMBERSHIP", "REWARD_POOL"].includes(e.type) && !["ISSUE_REWARD"].includes("event" in e ? e == null ? void 0 : e.event.type : "")
160
+ );
161
+ }
162
+ const N = G(() => {
163
+ const s = (m) => m.map((C) => ({
164
+ label: C.name,
165
+ value: C._id
166
+ }));
167
+ return pe(
168
+ l.value,
169
+ (m) => oe.formattedType(m.type),
170
+ s
171
+ );
172
+ }), q = G(() => Object.entries(N.value).reduce(
173
+ (s, [e, m]) => {
174
+ const C = m.filter((B) => {
175
+ var E, f;
176
+ return (f = (E = a.value) == null ? void 0 : E.campaigns) == null ? void 0 : f.includes(B.value);
177
+ }).filter(
178
+ (B) => B.label.toLowerCase().includes(o.value.toLowerCase())
179
+ );
180
+ return C.length > 0 && (s[e] = C), s;
181
+ },
182
+ {}
183
+ ));
184
+ function J(s) {
185
+ var m, C;
186
+ const e = (m = a.value.campaigns) == null ? void 0 : m.indexOf(s);
187
+ e != null && e > -1 && ((C = a.value.campaigns) == null || C.splice(e, 1));
188
+ }
189
+ async function Z() {
190
+ g.safeParse(a.value).success && await w(
191
+ async () => {
192
+ var e;
193
+ n.value ? await R.updateGroup(
194
+ (e = n.value) == null ? void 0 : e._id,
195
+ a.value
196
+ ) : await R.createGroup(a.value), v("success"), F();
197
+ },
198
+ {
199
+ message: "Saving group",
200
+ successMessage: "Group saved"
201
+ }
202
+ );
203
+ }
204
+ async function z() {
205
+ await w(
206
+ async () => {
207
+ var s;
208
+ await R.deleteGroup((s = n.value) == null ? void 0 : s._id), v("success"), F();
209
+ },
210
+ {
211
+ message: "Deleting group",
212
+ successMessage: "Group deleted"
213
+ }
214
+ );
215
+ }
216
+ return I(async () => {
217
+ await W();
218
+ }), b({
219
+ showSheet: M,
220
+ hideSheet: F
221
+ }), (s, e) => {
222
+ const m = x("FmButton"), C = x("FmTextField"), B = x("FmList"), E = x("FmSideSheet");
223
+ return d(), A(E, {
224
+ modelValue: t(_),
225
+ "onUpdate:modelValue": e[7] || (e[7] = (f) => T(_) ? _.value = f : null),
226
+ header: t(n) ? "Edit group" : "Add group",
227
+ "dismiss-away": "",
228
+ "close-button": !0,
229
+ "max-width": 550
230
+ }, Y({
231
+ "side-sheet-footer": L(() => [
232
+ i("div", Ge, [
233
+ t(r) ? V("", !0) : (d(), k($, { key: 0 }, [
234
+ h(m, {
235
+ label: "Submit",
236
+ onClick: Z,
237
+ disabled: t(P).length > 0 || t(S).isLoading
238
+ }, null, 8, ["disabled"]),
239
+ h(m, {
240
+ label: "Cancel",
241
+ onClick: e[4] || (e[4] = (f) => F()),
242
+ variant: "tertiary"
243
+ }),
244
+ t(n) ? (d(), A(m, {
245
+ key: 0,
246
+ label: "Delete",
247
+ variant: "plain",
248
+ class: "ml-auto fm-color-system-error-300",
249
+ onClick: e[5] || (e[5] = (f) => z())
250
+ })) : V("", !0)
251
+ ], 64)),
252
+ t(r) ? (d(), A(m, {
253
+ key: 1,
254
+ label: "Confirm",
255
+ onClick: e[6] || (e[6] = (f) => r.value = !1)
256
+ })) : V("", !0)
257
+ ])
258
+ ]),
259
+ default: L(() => [
260
+ t(r) ? V("", !0) : (d(), k("div", Se, [
261
+ we,
262
+ h(re, {
263
+ modelValue: t(a).name,
264
+ "onUpdate:modelValue": e[1] || (e[1] = (f) => t(a).name = f),
265
+ label: "Name",
266
+ schema: t(ie).typeAtPath(t(g), "name")
267
+ }, null, 8, ["modelValue", "schema"]),
268
+ Fe,
269
+ i("div", Ae, [
270
+ i("div", $e, O(t(a).campaigns.length) + " campaign(s) linked ", 1),
271
+ h(C, {
272
+ modelValue: t(o),
273
+ "onUpdate:modelValue": e[2] || (e[2] = (f) => T(o) ? o.value = f : null),
274
+ "prepend-icon": "search",
275
+ placeholder: "Search",
276
+ class: "w-auto"
277
+ }, null, 8, ["modelValue"])
278
+ ]),
279
+ h(m, {
280
+ variant: "plain",
281
+ icon: "link",
282
+ label: "Link Campaign",
283
+ onClick: K
284
+ })
285
+ ])),
286
+ t(r) ? (d(), A(ke, {
287
+ key: 1,
288
+ modelValue: t(a).campaigns,
289
+ "onUpdate:modelValue": e[3] || (e[3] = (f) => t(a).campaigns = f),
290
+ campaigns: t(N)
291
+ }, null, 8, ["modelValue", "campaigns"])) : V("", !0),
292
+ i("div", Ue, [
293
+ t(r) ? V("", !0) : (d(!0), k($, { key: 0 }, D(t(q), (f, Q) => (d(), k("div", null, [
294
+ i("div", Pe, O(Q), 1),
295
+ h(B, { separator: !0 }, {
296
+ default: L(() => [
297
+ (d(!0), k($, null, D(f, (H) => (d(), k("div", Le, [
298
+ i("div", null, O(H.label), 1),
299
+ i("div", null, [
300
+ h(m, {
301
+ icon: "delete",
302
+ onClick: (je) => J(H.value),
303
+ variant: "tertiary"
304
+ }, null, 8, ["onClick"])
305
+ ])
306
+ ]))), 256))
307
+ ]),
308
+ _: 2
309
+ }, 1024)
310
+ ]))), 256))
311
+ ])
312
+ ]),
313
+ _: 2
314
+ }, [
315
+ t(r) ? {
316
+ name: "side-sheet-header",
317
+ fn: L(() => [
318
+ i("div", Ve, [
319
+ h(m, {
320
+ icon: "arrow_back",
321
+ variant: "tertiary",
322
+ onClick: e[0] || (e[0] = (f) => r.value = !1)
323
+ }),
324
+ ee("Link campaign ")
325
+ ])
326
+ ]),
327
+ key: "0"
328
+ } : void 0
329
+ ]), 1032, ["modelValue", "header"]);
330
+ };
331
+ }
332
+ }), Be = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Re = { class: "space-y-16" }, Ee = { class: "flex items-center justify-end" }, Oe = /* @__PURE__ */ i("img", {
333
+ src: ne,
334
+ class: "w-[150px]"
335
+ }, null, -1), De = /* @__PURE__ */ i("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Analytics Dashboard Temporarily Unavailable ", -1), Te = /* @__PURE__ */ i("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " We apologize for the inconvenience. The analytics dashboard is currently under maintenance to improve your experience. Please check back later for updates on system availability. ", -1), nt = /* @__PURE__ */ j({
336
+ __name: "Analytic",
337
+ setup(U) {
338
+ const { t: b } = ye(), u = {
339
+ label: b("connect.analytic.addGroup"),
340
+ value: "create",
341
+ isPrimary: !0,
342
+ prependIcon: "add"
343
+ }, v = ve(), S = y(), _ = y([]), r = y(""), p = te({
344
+ totalCampaign: 0,
345
+ totalProgram: 0,
346
+ totalMember: 0
347
+ }), o = y("1");
348
+ b("connect.analytic.summary.totalCampaign"), b("connect.analytic.summary.totalProgram"), b("connect.analytic.summary.totalMember");
349
+ function a(n) {
350
+ var c;
351
+ o.value = (/* @__PURE__ */ new Date()).toISOString(), (c = S.value) == null || c.showSheet(n);
352
+ }
353
+ async function g() {
354
+ await v.readGroups();
355
+ const n = await R.readAllGrouped({
356
+ limit: 100,
357
+ skip: 0,
358
+ sortBy: "_id",
359
+ search: "",
360
+ descending: !0
361
+ });
362
+ _.value = n.resources;
363
+ }
364
+ G(() => _.value.filter((n) => {
365
+ var c;
366
+ return n.name.includes(r.value) || ((c = n.pf_campaigns) == null ? void 0 : c.filter((w) => w.name.includes(r.value)).length);
367
+ }));
368
+ const l = fe();
369
+ return se(), y(!0), G(() => {
370
+ var n, c, w, P;
371
+ return !l.storeOption || !l.storeOption.company ? -1 : !l.payoutAccount || !l.payoutAccount.enable || l.payoutAccount.status != "APPROVED" ? 0 : (c = (n = l.store) == null ? void 0 : n.categories) != null && c.length ? (P = (w = l.store) == null ? void 0 : w.categories) != null && P.some(
372
+ (M) => M.bundles.some((F) => F.isFeedvibe)
373
+ ) ? 3 : 2 : 1;
374
+ }), ae(async () => {
375
+ await l.readMemberStore(), await l.readMembership(), await l.readPayoutAccount();
376
+ }), (n, c) => {
377
+ const w = x("FmPageHead"), P = x("FmSearch"), M = x("FmCard");
378
+ return x("FmButton"), x("FmIcon"), d(), k($, null, [
379
+ h(w, {
380
+ title: t(b)("connect.analytic.title"),
381
+ actions: t(_).length > 0 ? [u] : [],
382
+ "onClick:action": c[0] || (c[0] = (F) => a())
383
+ }, null, 8, ["title", "actions"]),
384
+ i("div", Be, [
385
+ i("div", Re, [
386
+ i("div", Ee, [
387
+ h(P, {
388
+ class: "xs:hidden",
389
+ modelValue: t(r),
390
+ "onUpdate:modelValue": c[1] || (c[1] = (F) => T(r) ? r.value = F : null),
391
+ placeholder: t(b)("connect.analytic.search"),
392
+ collapsible: ""
393
+ }, null, 8, ["modelValue", "placeholder"])
394
+ ]),
395
+ V("", !0)
396
+ ]),
397
+ V("", !0),
398
+ t(_).length ? V("", !0) : (d(), A(M, {
399
+ key: 1,
400
+ variant: "outlined",
401
+ class: "flex flex-col gap-y-24 items-center p-16"
402
+ }, {
403
+ default: L(() => [
404
+ Oe,
405
+ De,
406
+ Te
407
+ ]),
408
+ _: 1
409
+ })),
410
+ V("", !0),
411
+ h(Me, {
412
+ ref_key: "sheetRef",
413
+ ref: S,
414
+ onSuccess: g
415
+ }, null, 512)
416
+ ])
417
+ ], 64);
418
+ };
419
+ }
420
+ });
421
+ export {
422
+ nt as default
423
+ };