@feedmepos/mf-connect 0.1.98-beta.39 → 0.1.98-beta.40

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 (151) hide show
  1. package/package.json +1 -1
  2. package/dist/App-DwjQisFZ.js +0 -4785
  3. package/dist/AuditLogs-DMGqmriL.js +0 -2014
  4. package/dist/Bin-4wvIqogM.js +0 -166
  5. package/dist/Broadcast-DPpuSZ8_.js +0 -269
  6. package/dist/CampaignAnalytic-CXFDo2X_.js +0 -1826
  7. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-SLoy1-Kd.js +0 -122
  8. package/dist/Card-C8SA6un0.js +0 -911
  9. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  10. package/dist/Collections-BCpSiM_4.js +0 -541
  11. package/dist/Credit-C8RTBpP7.js +0 -286
  12. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  13. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  14. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0OI5QzpR.js +0 -3382
  15. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CJTduNh3.js +0 -351
  16. package/dist/Experience-Bg3kFQQE.js +0 -285
  17. package/dist/FileSaver.min-DMUuMi9w.js +0 -74
  18. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  19. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +0 -52
  20. package/dist/Game-D3DbkRUj.js +0 -356
  21. package/dist/GiftCardSetup-CxlMM4up.js +0 -542
  22. package/dist/Grab-DvEK8ixP.js +0 -301
  23. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BBK-UrEe.js +0 -145
  24. package/dist/Index-Do_9DXuY.js +0 -259
  25. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  26. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BKPGBYiU.js +0 -48
  27. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-D6wJN9Gj.js +0 -18737
  28. package/dist/LoyaltyDashboard-B4WqycGN.js +0 -1345
  29. package/dist/MainLayout-DdxLaufS.js +0 -143
  30. package/dist/Marketing-CcFEMwKB.js +0 -236
  31. package/dist/MarketingMaterialEdit-DoYFaMf7.js +0 -1036
  32. package/dist/Member-BussgBln.js +0 -281
  33. package/dist/MemberList-BXJxSsjo.js +0 -1603
  34. package/dist/MemberOverview-wL_ailso.js +0 -58
  35. package/dist/MemberTransactions-O-XY5nz3.js +0 -45
  36. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DsxrIO0r.js +0 -60957
  37. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +0 -38
  38. package/dist/Mission-CPkM-8Ns.js +0 -360
  39. package/dist/Overview-BJjpYUJN.js +0 -1080
  40. package/dist/Overview-C5KF_Jxj.js +0 -1316
  41. package/dist/Point-FDFwR3Hk.js +0 -288
  42. package/dist/Promotion-qtucKxn0.js +0 -423
  43. package/dist/Queue-d91tocPX.js +0 -261
  44. package/dist/Record-CvkK2iLq.js +0 -342
  45. package/dist/Review-C_zLGtzU.js +0 -45
  46. package/dist/ReviewFacebookCallback-Bidg3P76.js +0 -238
  47. package/dist/ReviewGoogleCallback-DL0lxMBL.js +0 -213
  48. package/dist/Reward-BTsQaI-J.js +0 -442
  49. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BjxA4eMX.js +0 -150
  50. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D4NIDc-C.js +0 -1913
  51. package/dist/Segment-BgFyB3BK.js +0 -1017
  52. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CkhjFNvZ.js +0 -181
  53. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-HYbRyACe.js +0 -189
  54. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-7dv3cAW3.js +0 -226
  55. package/dist/Setting-BxHoCSxw.js +0 -2047
  56. package/dist/SettingAdvertisements-WfvuE4fA.js +0 -264
  57. package/dist/Settings-B42SAvEx.js +0 -179
  58. package/dist/Store-BnvWfCy-.js +0 -2413
  59. package/dist/StoreRewards-BRzAMqR-.js +0 -540
  60. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C3FJr1L5.js +0 -1075
  61. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-UZYzUcif.js +0 -7007
  62. package/dist/Tier-BrzLNat2.js +0 -972
  63. package/dist/Title-EnlaNXld.js +0 -569
  64. package/dist/Transaction-BiXNxUGX.js +0 -39
  65. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Db5_DKQ0.js +0 -130
  66. package/dist/Voucher-C2dyk-jj.js +0 -444
  67. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DPE24a-J.js +0 -421
  68. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CI1HM9HA.js +0 -56
  69. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  70. package/dist/app-Bt8HrAEr.js +0 -60740
  71. package/dist/app-wDQR6dpb.js +0 -39
  72. package/dist/app.js +0 -7
  73. package/dist/business-BwtQpfUr.js +0 -82
  74. package/dist/campaign-B6U9lwKi.js +0 -255
  75. package/dist/campaign-C6Cb9s3C.js +0 -100
  76. package/dist/campaign-CpzFl8Vr.js +0 -4
  77. package/dist/campaign.enum-Dx-Zo68Q.js +0 -26
  78. package/dist/campaign.fn-B0x2EGhw.js +0 -776
  79. package/dist/collectible.enum-Liy2wH3s.js +0 -19
  80. package/dist/collection.fn-DfoA9sJV.js +0 -26
  81. package/dist/duplicateCampaign-Cnq5N-V8.js +0 -51
  82. package/dist/effect-B2REbrv8.js +0 -89
  83. package/dist/email-addresses-BzmOsxLn.js +0 -705
  84. package/dist/export-jHpRhPQu.js +0 -97
  85. package/dist/feedme.ico +0 -0
  86. package/dist/google-C3S8u0mT.js +0 -4
  87. package/dist/helper-DQAHX1kX.js +0 -86
  88. package/dist/index-4GG-yjdN.js +0 -2963
  89. package/dist/index-BWgMbKOB.js +0 -85
  90. package/dist/index-BccUpf0U.js +0 -3
  91. package/dist/index-BkgkJkVs.js +0 -8919
  92. package/dist/index-C0PKVTf9.js +0 -32
  93. package/dist/index-C8cXXcLk.js +0 -45
  94. package/dist/index-CTTGf4TM.js +0 -151
  95. package/dist/index-C_H8jFYf.js +0 -2743
  96. package/dist/index-CuvNtC_M.js +0 -61
  97. package/dist/index-DJN4auwx.js +0 -146
  98. package/dist/index-DMr9ohGV.js +0 -1139
  99. package/dist/index-DQTo_ytu.js +0 -31
  100. package/dist/index-DW7-0rf_.js +0 -53
  101. package/dist/index-Da7J83jM.js +0 -2706
  102. package/dist/index-Di1Z4vLS.js +0 -27550
  103. package/dist/index-FoKZGh7Z.js +0 -67
  104. package/dist/index-N25Px7RQ.js +0 -72
  105. package/dist/index-PgblELTo.js +0 -897
  106. package/dist/index-STBMTK1u.js +0 -28900
  107. package/dist/index-hP3Mgc0u.js +0 -55
  108. package/dist/index-vh86FiIQ.js +0 -10
  109. package/dist/index.esm2017-DV56jzfJ.js +0 -3069
  110. package/dist/loading-D__sDcq1.js +0 -72
  111. package/dist/lodash-DgkDIHoV.js +0 -3678
  112. package/dist/membership-CBjt1MGx.js +0 -255
  113. package/dist/moment-D7p2TMB-.js +0 -2583
  114. package/dist/money-BFUbPKDM.js +0 -15
  115. package/dist/number-CJb8OUa3.js +0 -12
  116. package/dist/object-BYyQ0PZp.js +0 -18
  117. package/dist/objectId-dwaoBfJX.js +0 -7
  118. package/dist/objectid-BMUFNR9T.js +0 -145
  119. package/dist/plugins-D95ZeD-9.js +0 -1788
  120. package/dist/remy-Qz_pNsUS.js +0 -13
  121. package/dist/reward-CSfV_XFK.js +0 -36
  122. package/dist/rule-DIzVHy2z.js +0 -1969
  123. package/dist/rule-builder-DF7fCvec.js +0 -126
  124. package/dist/string-Gcy5IM_H.js +0 -32
  125. package/dist/style.css +0 -4
  126. package/dist/template-r3lAQP1B.js +0 -188
  127. package/dist/tier-BJDhpH6X.js +0 -4
  128. package/dist/tiers/tier=1.png +0 -0
  129. package/dist/tiers/tier=2.png +0 -0
  130. package/dist/tiers/tier=3.png +0 -0
  131. package/dist/tiers/tier=4.png +0 -0
  132. package/dist/timezone-D40qRUoz.js +0 -20
  133. package/dist/titles/type=diamond.png +0 -0
  134. package/dist/titles/type=drinks.png +0 -0
  135. package/dist/titles/type=food.png +0 -0
  136. package/dist/titles/type=heart.png +0 -0
  137. package/dist/titles/type=medal.png +0 -0
  138. package/dist/titles/type=spend.png +0 -0
  139. package/dist/titles/type=thank-you.png +0 -0
  140. package/dist/titles/type=thumbs-up.png +0 -0
  141. package/dist/titles/type=years.png +0 -0
  142. package/dist/transaction.fn-DV-cpfOj.js +0 -64
  143. package/dist/trigger-BEJaSv5R.js +0 -213
  144. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  145. package/dist/type_drinks-D6jnpvwV.js +0 -4
  146. package/dist/useMarketingMaterialActions-Bd5BDfE1.js +0 -96
  147. package/dist/usePagination-DLIo76-X.js +0 -220
  148. package/dist/user-DtEjuhyM.js +0 -55
  149. package/dist/vue-i18n-dQ1XCaUv.js +0 -2365
  150. package/dist/xlsx-BUMZsTov.js +0 -15491
  151. package/dist/zod-B_pVZhsV.js +0 -91
@@ -1,143 +0,0 @@
1
- import { defineComponent as u, openBlock as a, createElementBlock as p, createVNode as r, unref as e, ref as b, computed as y, watch as V, resolveComponent as i, createElementVNode as o, toDisplayString as w, createTextVNode as j, createCommentVNode as m, normalizeClass as z, createBlock as x, withDirectives as N, vShow as R } from "vue";
2
- import { _ as E, S as P } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-D6wJN9Gj.js";
3
- import { u as $ } from "./vue-i18n-dQ1XCaUv.js";
4
- import { useCoreStore as D } from "@feedmepos/mf-common";
5
- import { A as G, a as v } from "./app-Bt8HrAEr.js";
6
- import { u as H } from "./remy-Qz_pNsUS.js";
7
- import { u as k } from "./app-wDQR6dpb.js";
8
- import { useRoute as L } from "vue-router";
9
- const T = { class: "bg-white w-full flex min-h-[calc(100svh-56px)] items-center" }, O = /* @__PURE__ */ u({
10
- __name: "Splash",
11
- setup(_) {
12
- return (t, n) => (a(), p("div", T, [
13
- r(E, {
14
- class: "flex-1",
15
- json: e(P),
16
- width: 100,
17
- height: 100
18
- }, null, 8, ["json"])
19
- ]));
20
- }
21
- }), S = "feedme_connect_marketing_promo_bar_hidden";
22
- function U() {
23
- try {
24
- return sessionStorage.getItem(S) !== null;
25
- } catch {
26
- return !1;
27
- }
28
- }
29
- function Y() {
30
- try {
31
- sessionStorage.setItem(S, (/* @__PURE__ */ new Date()).toISOString());
32
- } catch {
33
- }
34
- }
35
- const q = {
36
- key: 0,
37
- class: "sticky top-0 z-20 flex w-full items-center gap-12 border-b border-fm-color-neutral-gray-100 bg-fm-color-system-warning-100 px-24 py-8 xs:px-12"
38
- }, J = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-8" }, K = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, Q = { class: "fm-typo-en-body-md-600" }, W = { class: "flex shrink-0 items-center gap-8" }, X = ["aria-label"], Z = /* @__PURE__ */ u({
39
- __name: "AiMarketingPromoBar",
40
- setup(_) {
41
- const { t } = $(), n = H(), { sessionUser: f, currentCountry: d } = D(), s = b(!1), B = y(() => {
42
- var l;
43
- const c = ((l = f.value) == null ? void 0 : l.permissions) ?? [];
44
- return G(
45
- [
46
- {
47
- action: v.Action.manage,
48
- subject: v.Subject.Business.crm_marketingMaterial
49
- }
50
- ],
51
- c
52
- ).granted;
53
- }), C = y(
54
- () => d.value === "MY" && B.value
55
- );
56
- let h = !1;
57
- V(
58
- C,
59
- (c) => {
60
- h || !c || (h = !0, !U() && (s.value = !0));
61
- },
62
- { immediate: !0 }
63
- );
64
- function M() {
65
- n.activate({
66
- command: "generateMarketingMaterial",
67
- fullscreen: !0,
68
- forceNewConversation: !0
69
- });
70
- }
71
- function A() {
72
- Y(), s.value = !1;
73
- }
74
- return (c, l) => {
75
- const g = i("FmIcon"), F = i("FmChip"), I = i("FmButton");
76
- return s.value ? (a(), p("div", q, [
77
- o("div", J, [
78
- r(g, {
79
- name: "stars",
80
- size: "sm",
81
- color: "primary"
82
- }),
83
- o("span", K, [
84
- o("span", Q, w(e(t)("connect.marketing.promoBar.new")), 1),
85
- j(" " + w(e(t)("connect.marketing.promoBar.message")), 1)
86
- ]),
87
- r(F, {
88
- label: e(t)("connect.marketing.promoBar.credits"),
89
- variant: "info",
90
- compact: ""
91
- }, null, 8, ["label"])
92
- ]),
93
- o("div", W, [
94
- r(I, {
95
- class: "px-16 py-2 rounded-xl",
96
- variant: "primary",
97
- size: "sm",
98
- label: e(t)("connect.marketing.promoBar.cta"),
99
- "append-icon": "arrow_forward",
100
- onClick: M
101
- }, null, 8, ["label"]),
102
- o("button", {
103
- type: "button",
104
- class: "flex h-32 w-32 items-center justify-center",
105
- "aria-label": e(t)("connect.marketing.promoBar.close"),
106
- onClick: A
107
- }, [
108
- r(g, {
109
- name: "close",
110
- size: "sm",
111
- color: "neutral-gray-400"
112
- })
113
- ], 8, X)
114
- ])
115
- ])) : m("", !0);
116
- };
117
- }
118
- }), ie = /* @__PURE__ */ u({
119
- __name: "MainLayout",
120
- setup(_) {
121
- const t = L(), n = b(t.query.showHeader !== "false");
122
- return (f, d) => {
123
- const s = i("RouterView");
124
- return a(), p("div", {
125
- class: z([
126
- "bg-fm-color-neutral-white w-full xs:overflow-y-scroll",
127
- e(n) ? "min-h-[calc(100svh-56px)] xs:h-[calc(100svh-56px)]" : "min-h-screen"
128
- ])
129
- }, [
130
- e(k)().isGlobalLoading == !0 ? (a(), x(O, { key: 0 })) : m("", !0),
131
- N(o("div", null, [
132
- e(n) ? (a(), x(Z, { key: 0 })) : m("", !0),
133
- r(s)
134
- ], 512), [
135
- [R, e(k)().isGlobalLoading == !1]
136
- ])
137
- ], 2);
138
- };
139
- }
140
- });
141
- export {
142
- ie as default
143
- };
@@ -1,236 +0,0 @@
1
- import { defineComponent as b, resolveComponent as v, openBlock as s, createBlock as N, unref as c, ref as f, watch as R, createElementBlock as d, createVNode as i, withCtx as S, createElementVNode as n, toDisplayString as w, withModifiers as T, createStaticVNode as U, computed as L, onMounted as P, nextTick as H, onUnmounted as V, Fragment as I, renderList as B, createCommentVNode as j } from "vue";
2
- import { _ as D } from "./campaign-CpzFl8Vr.js";
3
- import { u as M } from "./vue-i18n-dQ1XCaUv.js";
4
- import { u as G, m as q } from "./useMarketingMaterialActions-Bd5BDfE1.js";
5
- import { u as O } from "./remy-Qz_pNsUS.js";
6
- import { useRouter as z } from "vue-router";
7
- import "./index-BccUpf0U.js";
8
- import { R as K } from "./app-Bt8HrAEr.js";
9
- const Z = /* @__PURE__ */ b({
10
- __name: "GenerateMaterialButton",
11
- setup(l) {
12
- const { t: r } = M(), u = O();
13
- function a() {
14
- u.activate({
15
- command: "generateMarketingMaterial",
16
- fullscreen: !0,
17
- forceNewConversation: !0
18
- });
19
- }
20
- return (t, e) => {
21
- const m = v("FmButton");
22
- return s(), N(m, {
23
- label: c(r)("connect.marketing.emptyState.action"),
24
- "prepend-icon": "wand_stars",
25
- onClick: a
26
- }, null, 8, ["label"]);
27
- };
28
- }
29
- }), J = /* @__PURE__ */ b({
30
- __name: "MarketingMaterialItemActionButton",
31
- props: {
32
- material: {}
33
- },
34
- emits: ["update:menuOpened"],
35
- setup(l, { emit: r }) {
36
- const u = l, a = r, { t } = M(), e = f(!1);
37
- R(e, (x) => {
38
- a("update:menuOpened", x);
39
- });
40
- const { shareMaterial: m, downloadMaterialImage: _, copyMaterialLink: p } = G();
41
- async function C() {
42
- e.value = !1, await m(u.material);
43
- }
44
- async function A() {
45
- e.value = !1, await _(u.material.imageUrl);
46
- }
47
- async function h() {
48
- e.value = !1, await p(u.material.imageUrl);
49
- }
50
- return (x, o) => {
51
- const k = v("FmButton"), y = v("FmMenuItem"), F = v("FmMenu");
52
- return s(), d("div", null, [
53
- i(F, {
54
- placement: "right-start",
55
- shift: !0,
56
- "model-value": e.value,
57
- onMenuChanged: o[0] || (o[0] = (g) => e.value = g)
58
- }, {
59
- "menu-button": S(() => [
60
- i(k, {
61
- icon: "more_vert",
62
- variant: "tertiary",
63
- size: "md"
64
- })
65
- ]),
66
- default: S(() => [
67
- i(y, {
68
- icon: "share",
69
- label: c(t)("connect.marketing.actions.share"),
70
- onClick: C
71
- }, null, 8, ["label"]),
72
- i(y, {
73
- icon: "download",
74
- label: c(t)("connect.marketing.actions.download"),
75
- onClick: A
76
- }, null, 8, ["label"]),
77
- i(y, {
78
- icon: "content_copy",
79
- label: c(t)("connect.marketing.actions.copyLink"),
80
- onClick: h
81
- }, null, 8, ["label"])
82
- ]),
83
- _: 1
84
- }, 8, ["model-value"])
85
- ]);
86
- };
87
- }
88
- }), Q = { class: "h-[205.5px] w-full overflow-hidden bg-fm-color-neutral-gray-100" }, W = ["src", "alt"], X = { class: "p-3" }, Y = { class: "flex items-start justify-between gap-2" }, ee = { class: "space-y-1 overflow-hidden" }, te = { class: "font-semibold text-sm text-gray-900 truncate" }, ne = { class: "text-xs text-gray-500 line-clamp-2" }, ae = {
89
- key: 1,
90
- class: "rounded-lg overflow-hidden border border-transparent fm-shadow-light-100 animate-pulse bg-white"
91
- }, $ = /* @__PURE__ */ b({
92
- __name: "MarketingMaterialItem",
93
- props: {
94
- material: {}
95
- },
96
- setup(l) {
97
- const { t: r } = M(), u = z(), a = f(!1);
98
- return (t, e) => l.material ? (s(), d("div", {
99
- key: 0,
100
- class: "group rounded-lg overflow-hidden cursor-pointer border border-transparent hover:border-blue-500 hover:bg-blue-50 transition-[border-color,background-color] fm-shadow-light-100 hover:fm-shadow-light-300",
101
- onClick: e[2] || (e[2] = () => {
102
- a.value || c(u).push({
103
- name: c(K)["$connect-MARKETING_MATERIAL_EDIT"],
104
- query: { id: l.material._id }
105
- });
106
- })
107
- }, [
108
- n("div", Q, [
109
- n("img", {
110
- src: l.material.imageUrl,
111
- alt: c(r)("connect.marketing.title"),
112
- class: "w-full h-full object-cover"
113
- }, null, 8, W)
114
- ]),
115
- n("div", X, [
116
- n("div", Y, [
117
- n("div", ee, [
118
- n("p", te, w(l.material.headline), 1),
119
- n("p", ne, w(l.material.caption), 1)
120
- ]),
121
- i(J, {
122
- material: l.material,
123
- "onUpdate:menuOpened": e[0] || (e[0] = (m) => a.value = m),
124
- onClick: e[1] || (e[1] = T(() => {
125
- }, ["stop"]))
126
- }, null, 8, ["material"])
127
- ])
128
- ])
129
- ])) : (s(), d("div", ae, [...e[3] || (e[3] = [
130
- U('<div class="h-[205.5px] w-full bg-fm-color-neutral-gray-100"></div><div class="p-3 space-y-2"><div class="h-[16px] w-3/4 rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-full rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-2/3 rounded bg-fm-color-neutral-gray-100"></div></div>', 2)
131
- ])]));
132
- }
133
- }), oe = {
134
- key: 0,
135
- class: "px-24 xs:px-12 flex flex-col gap-y-16 py-24 xs:py-16"
136
- }, le = { class: "fm-typo-en-title-sm-800 text-center" }, re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 xs:w-full text-center" }, se = {
137
- key: 1,
138
- class: "px-24 xs:px-12 flex flex-col gap-y-24 xs:gap-y-16 pt-24 xs:pt-16"
139
- }, ie = { class: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-16" }, E = 20, _e = /* @__PURE__ */ b({
140
- __name: "Marketing",
141
- setup(l) {
142
- const { t: r } = M(), u = O(), a = f([]), t = f(!0), e = f(!0), m = f(null), _ = f(null);
143
- let p = null;
144
- const C = L(() => ({
145
- label: r("connect.marketing.emptyState.action"),
146
- value: "generate",
147
- isPrimary: !0,
148
- prependIcon: "wand_stars"
149
- }));
150
- function A(o) {
151
- o === "generate" && u.activate({
152
- command: "generateMarketingMaterial",
153
- fullscreen: !0,
154
- forceNewConversation: !0
155
- });
156
- }
157
- async function h() {
158
- const o = await q.listMarketingMaterials(
159
- m.value,
160
- E
161
- );
162
- a.value.push(...o.resources), m.value = o.meta.nextCursor, e.value = !!o.meta.nextCursor;
163
- }
164
- function x() {
165
- p = new IntersectionObserver(
166
- async ([o]) => {
167
- if (!(!o.isIntersecting || !e.value || t.value)) {
168
- t.value = !0;
169
- try {
170
- await h();
171
- } catch {
172
- } finally {
173
- t.value = !1;
174
- }
175
- }
176
- },
177
- { rootMargin: "200px" }
178
- ), _.value && p.observe(_.value);
179
- }
180
- return P(async () => {
181
- try {
182
- await h();
183
- } catch {
184
- } finally {
185
- t.value = !1, await H(), x();
186
- }
187
- }), V(() => {
188
- p == null || p.disconnect();
189
- }), (o, k) => {
190
- const y = v("FmPageHead"), F = v("FmCard");
191
- return s(), d(I, null, [
192
- i(y, {
193
- title: c(r)("connect.marketing.title"),
194
- actions: a.value.length > 0 ? [C.value] : [],
195
- "onClick:action": A
196
- }, null, 8, ["title", "actions"]),
197
- !t.value && a.value.length === 0 ? (s(), d("div", oe, [
198
- i(F, {
199
- variant: "outlined",
200
- class: "w-full justify-center items-center flex flex-col p-[24px] xs:p-16 gap-[24px] xs:gap-16"
201
- }, {
202
- default: S(() => [
203
- k[0] || (k[0] = n("img", {
204
- src: D,
205
- class: "w-[150px]"
206
- }, null, -1)),
207
- n("p", le, w(c(r)("connect.marketing.emptyState.title")), 1),
208
- n("p", re, w(c(r)("connect.marketing.emptyState.description")), 1),
209
- i(Z)
210
- ]),
211
- _: 1
212
- })
213
- ])) : (s(), d("div", se, [
214
- n("div", ie, [
215
- (s(!0), d(I, null, B(a.value, (g) => (s(), N($, {
216
- key: g._id,
217
- material: g
218
- }, null, 8, ["material"]))), 128)),
219
- t.value ? (s(), d(I, { key: 0 }, B(E, (g) => i($, {
220
- key: `skeleton-${g}`,
221
- material: null
222
- })), 64)) : j("", !0)
223
- ]),
224
- n("div", {
225
- ref_key: "sentinel",
226
- ref: _,
227
- class: "h-1"
228
- }, null, 512)
229
- ]))
230
- ], 64);
231
- };
232
- }
233
- });
234
- export {
235
- _e as default
236
- };