@feedmepos/mf-connect 0.1.98-beta.32 → 0.1.98-beta.34

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 (108) hide show
  1. package/dist/{App-CNxXYDQA.js → App-BR2UXO7l.js} +8 -8
  2. package/dist/{AuditLogs-1BQil5oX.js → AuditLogs-BBD1wTXb.js} +9 -9
  3. package/dist/{Bin-aAMGXyy9.js → Bin-DwrHg3SM.js} +8 -8
  4. package/dist/{Broadcast-D5bqpEmf.js → Broadcast-CDD_5WRc.js} +11 -11
  5. package/dist/{CampaignAnalytic-CN2WcXYn.js → CampaignAnalytic-RrQKMFge.js} +700 -540
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D9GfSdXq.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqJ4eBqz.js} +6 -6
  7. package/dist/{Card-DfEuS5gl.js → Card-DtNiiVL5.js} +18 -18
  8. package/dist/{Collections-1OTkyEYN.js → Collections-DmHTGdZr.js} +8 -8
  9. package/dist/{Credit-qCK-zP2Y.js → Credit-XUkEFWyO.js} +12 -12
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-9NWM4yOR.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D1flbVc5.js} +31 -31
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Dnhei4AU.js → EffectSheet.vue_vue_type_style_index_0_lang-B9RTx5e6.js} +6 -6
  12. package/dist/{Experience-BBU56znM.js → Experience-8FQBl3Jk.js} +12 -12
  13. package/dist/{FileSaver.min-D_mPZjeB.js → FileSaver.min-CJx_XKAF.js} +1 -1
  14. package/dist/{Game-B9mElf85.js → Game-DtG-3-20.js} +13 -13
  15. package/dist/{Grab-CbsGHZfG.js → Grab-D-d1UWrd.js} +9 -9
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-VL01SI_I.js → ImageInput.vue_vue_type_script_setup_true_lang-CKScubJr.js} +1 -1
  17. package/dist/{Index-CZIwtF0k.js → Index-CQFVY2_M.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-juzVYVi0.js → LocationPicker.vue_vue_type_script_setup_true_lang-BWaMK57y.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Br92n7M3.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyANZcR6.js} +1 -1
  20. package/dist/{LoyaltyDashboard-DjkNjh1M.js → LoyaltyDashboard-hdaNCbqS.js} +7 -7
  21. package/dist/{MainLayout-BHdPdHlp.js → MainLayout-IoBUK1t1.js} +1 -1
  22. package/dist/{Marketing-CQdgWswq.js → Marketing-CjmMZIjz.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-jzSiHrVn.js → MarketingMaterialEdit-C1W9eMIl.js} +6 -6
  24. package/dist/{Member-CdnKnmuC.js → Member-BNH1jrcb.js} +11 -11
  25. package/dist/{MemberList-nA2eRYW6.js → MemberList-BqINyMhD.js} +25 -25
  26. package/dist/{MemberTransactions-BHALSRqB.js → MemberTransactions-0ajNUHJh.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-TXiPUFjM.js → MessageInput.vue_vue_type_script_setup_true_lang-CwJaBsFN.js} +9 -9
  28. package/dist/{Mission-B0aReKMJ.js → Mission-CjKBQ4hb.js} +13 -13
  29. package/dist/Overview-AX_6SxrE.js +1284 -0
  30. package/dist/{Overview-CIB61CBG.js → Overview-CKnshNlU.js} +18 -18
  31. package/dist/{Point-BgUEcVbF.js → Point-ggQx_C1t.js} +12 -12
  32. package/dist/{Promotion-CBHfk3xI.js → Promotion-2eipp2Ey.js} +13 -13
  33. package/dist/{Queue-DdQHEsaR.js → Queue-Dt8Qh-VK.js} +10 -10
  34. package/dist/{Record-BkLjJ-kq.js → Record-Ykk-3IbY.js} +9 -9
  35. package/dist/{Review-Cxa2Bi2q.js → Review-Bc7rBVWg.js} +2 -2
  36. package/dist/{ReviewFacebookCallback-BhSWj_BK.js → ReviewFacebookCallback-BqCM0C5t.js} +5 -5
  37. package/dist/{ReviewGoogleCallback-DlKlinv4.js → ReviewGoogleCallback-AusPx9Qd.js} +5 -5
  38. package/dist/{Reward-1_9Thzxv.js → Reward-BBuWaXxY.js} +16 -16
  39. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D-pu0qTL.js → RewardGroup.vue_vue_type_script_setup_true_lang-BmFszOzd.js} +11 -11
  40. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-C55MTCd6.js → RuleGroup.vue_vue_type_script_setup_true_lang-BmebXPla.js} +14 -14
  41. package/dist/{Segment-CbuM0oqp.js → Segment-BRzfoGuE.js} +24 -24
  42. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DTw26WFe.js → SelectItems.vue_vue_type_script_setup_true_lang-ll1Zl1NM.js} +2 -2
  43. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-ChIeh5kM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-xYvyDS15.js} +12 -12
  44. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BtRbHWrt.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-1_KEGmQS.js} +4 -4
  45. package/dist/{Setting-D6XLdUHo.js → Setting-Dqd70ZVG.js} +14 -14
  46. package/dist/{SettingAdvertisements-CROGLyf0.js → SettingAdvertisements-k0WfcX1K.js} +12 -12
  47. package/dist/{Settings-DgJFEIpt.js → Settings-BJtDdCkJ.js} +5 -5
  48. package/dist/{Store-DDojtoEi.js → Store-Ob71BJHB.js} +21 -21
  49. package/dist/{StoreRewards-BTVhqRbW.js → StoreRewards-DJ3Ugt_h.js} +15 -15
  50. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BxCy3Fk5.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CazJrfSC.js} +386 -445
  51. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-y2NxEq4f.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DVDxB8wn.js} +2 -2
  52. package/dist/{Tier-BWVosUHF.js → Tier-rtR9s70b.js} +24 -24
  53. package/dist/{Title-Dcu9e-na.js → Title-Cj96AOQB.js} +21 -21
  54. package/dist/{Transaction-B0V2qZBQ.js → Transaction-oyGtjd_T.js} +2 -2
  55. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CE1HmXwU.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-SPHicnDN.js} +6 -6
  56. package/dist/{Voucher-u2IJaAHw.js → Voucher-B5N-YGJK.js} +14 -14
  57. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DlCEICsf.js → VoucherEditor.vue_vue_type_script_setup_true_lang-der0dPTi.js} +12 -12
  58. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BqcVNJY1.js → ZodTextField.vue_vue_type_script_setup_true_lang-YICmUY9J.js} +2 -2
  59. package/dist/{app-J_0SevWd.js → app-DM6oVZsM.js} +120 -65
  60. package/dist/app.js +1 -1
  61. package/dist/{business-CsYOIMmN.js → business-BGKVouFN.js} +1 -1
  62. package/dist/{campaign-CEuSGs0P.js → campaign-lNt9Yuxj.js} +2 -2
  63. package/dist/{campaign-B7AmOe4b.js → campaign-u9WwQFI9.js} +7 -7
  64. package/dist/{campaign.fn-i8dPJ25D.js → campaign.fn-Cadt9swf.js} +20 -20
  65. package/dist/{collection.fn-BQ8wuiDD.js → collection.fn-RLwjpdkT.js} +2 -2
  66. package/dist/{duplicateCampaign-CU-vJAMn.js → duplicateCampaign-QMgpeHWr.js} +2 -2
  67. package/dist/{effect-CdiluX3c.js → effect-CqtFAMMC.js} +1 -1
  68. package/dist/{email-addresses-CRks2VoS.js → email-addresses-h8wGPJ7R.js} +2 -2
  69. package/dist/{export-BzO_R_tT.js → export-DY3Hegrb.js} +3 -3
  70. package/dist/{helper-DQ1hga5s.js → helper-DPKh_ZjU.js} +1 -1
  71. package/dist/{index-Ci4w7iLa.js → index-2iE9rOed.js} +1 -1
  72. package/dist/{index-yrH8x1-i.js → index-BSZynXOw.js} +1 -1
  73. package/dist/{index-CUhcefIe.js → index-BkQrvkOb.js} +2 -2
  74. package/dist/{index-B09Leh3n.js → index-BzhAfqFB.js} +13 -8
  75. package/dist/{index-DQGjv4xY.js → index-C-AVWuWN.js} +2 -2
  76. package/dist/{index-CCEi8Zf_.js → index-CJQKTuIk.js} +1 -1
  77. package/dist/{index-0O1t0S4q.js → index-CTOeD7L9.js} +1 -1
  78. package/dist/{index-DtlnuU5Q.js → index-D7gOjsR0.js} +3 -3
  79. package/dist/{index-MjBzQEFO.js → index-DNAHL9AU.js} +2 -2
  80. package/dist/{index-BsnVJG1F.js → index-DQ1APEdi.js} +1 -1
  81. package/dist/{index-BXOpGbAX.js → index-DkNqohh9.js} +23 -16
  82. package/dist/{index-DJUdhmNI.js → index-DqX1Vli-.js} +1 -1
  83. package/dist/{index-C_fi9WV2.js → index-oM-xH8hF.js} +1 -1
  84. package/dist/{index-D_7zLq-s.js → index-oVSJYEzS.js} +1 -1
  85. package/dist/{index-BmpKqhfv.js → index-ogxSJTLh.js} +2 -2
  86. package/dist/{index.esm2017-BIjrnzt3.js → index.esm2017-CG7XIwEp.js} +1 -1
  87. package/dist/{loading-Oo_J76T6.js → loading-4amdJgCm.js} +1 -1
  88. package/dist/{lodash-D_m_JBgX.js → lodash-DGzcyEFQ.js} +1 -1
  89. package/dist/{membership-BzicPSED.js → membership-Pu5_24FL.js} +2 -2
  90. package/dist/{money-D_TgioqX.js → money-bExnxIDJ.js} +1 -1
  91. package/dist/{number-C69W9t0P.js → number-CfKE2tk7.js} +1 -1
  92. package/dist/{objectid-8WROvPOV.js → objectid-Ku2j_Y91.js} +9 -9
  93. package/dist/{plugins-DU_sWFOn.js → plugins-BiRxH8HH.js} +3 -3
  94. package/dist/{reward-gUVChY_n.js → reward-CTrFirP6.js} +1 -1
  95. package/dist/{rule-DN1rfxVA.js → rule-Bpp0MdS0.js} +3 -3
  96. package/dist/{rule-builder-BnU36OpM.js → rule-builder-DgUulIzK.js} +1 -1
  97. package/dist/{template-BOXPK0-P.js → template-Dh3E1B5P.js} +6 -6
  98. package/dist/{timezone-CV5vHYYz.js → timezone-cJCD0TZs.js} +1 -1
  99. package/dist/transaction.fn-Dd-nFQlz.js +64 -0
  100. package/dist/{trigger-GP4mC5kc.js → trigger-CzJeib_t.js} +5 -5
  101. package/dist/{useMarketingMaterialActions-CC06kGq3.js → useMarketingMaterialActions-DRPPq_f7.js} +3 -3
  102. package/dist/{usePagination-BjV6asuC.js → usePagination-B_aAFhhT.js} +1 -1
  103. package/dist/{user-B_1Zm_6U.js → user-Bi_keaVG.js} +1 -1
  104. package/dist/{vue-i18n-CGoM6XkW.js → vue-i18n-Smvd1GuG.js} +351 -351
  105. package/dist/{xlsx-yGcEutsz.js → xlsx-hKexV5wm.js} +440 -440
  106. package/dist/{zod-BtYgzWyF.js → zod-Bik7Qsx7.js} +1 -1
  107. package/package.json +1 -1
  108. package/dist/Overview-DeeB3zo1.js +0 -1117
@@ -1,14 +1,16 @@
1
- import { defineComponent as j, computed as P, resolveComponent as _, openBlock as n, createBlock as h, withCtx as $, createElementBlock as v, createCommentVNode as g, createElementVNode as a, toDisplayString as u, normalizeClass as W, unref as l, Fragment as E, normalizeStyle as me, renderList as ee, createVNode as I, ref as H, onMounted as ge } from "vue";
2
- import { u as ye } from "./vue-i18n-CGoM6XkW.js";
3
- import { useCoreStore as he } from "@feedmepos/mf-common";
4
- import { c as V } from "./index-yrH8x1-i.js";
5
- import { u as xe } from "./loading-Oo_J76T6.js";
6
- import { s as ke, a as we } from "./campaign-B7AmOe4b.js";
7
- import { C as ue } from "./timezone-CV5vHYYz.js";
8
- import { h as Re } from "./moment-D7p2TMB-.js";
9
- import { _ as Z } from "./MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js";
10
- import { useRoute as Me, useRouter as _e } from "vue-router";
11
- const Se = {
1
+ import { defineComponent as j, computed as O, resolveComponent as S, openBlock as r, createBlock as g, withCtx as L, createElementBlock as p, createCommentVNode as b, createElementVNode as a, toDisplayString as u, normalizeClass as H, unref as n, Fragment as E, normalizeStyle as de, createTextVNode as xe, renderList as Z, createVNode as P, ref as Y, onMounted as ke } from "vue";
2
+ import { u as ve } from "./vue-i18n-Smvd1GuG.js";
3
+ import { useCoreStore as we } from "@feedmepos/mf-common";
4
+ import { c as U } from "./index-BSZynXOw.js";
5
+ import { u as Re } from "./loading-4amdJgCm.js";
6
+ import { s as Me, a as _e } from "./campaign-u9WwQFI9.js";
7
+ import { C as pe } from "./timezone-cJCD0TZs.js";
8
+ import { h as Se } from "./moment-D7p2TMB-.js";
9
+ import { s as Ce } from "./index-CuvNtC_M.js";
10
+ import { T as Ie } from "./transaction.fn-Dd-nFQlz.js";
11
+ import { _ as ee } from "./MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js";
12
+ import { useRoute as $e, useRouter as Pe } from "vue-router";
13
+ const Oe = {
12
14
  state: "populated",
13
15
  reportRangeLabel: "Unavailable",
14
16
  funnel: [],
@@ -17,7 +19,7 @@ const Se = {
17
19
  breakdown: null,
18
20
  outcomes: [],
19
21
  metrics: []
20
- }, Ie = {
22
+ }, De = {
21
23
  state: "populated",
22
24
  reportRangeLabel: "Unavailable",
23
25
  funnel: [],
@@ -37,7 +39,7 @@ const Se = {
37
39
  },
38
40
  outcomes: [],
39
41
  metrics: []
40
- }, Ce = {
42
+ }, Le = {
41
43
  state: "populated",
42
44
  reportRangeLabel: "Unavailable",
43
45
  funnel: [],
@@ -47,7 +49,7 @@ const Se = {
47
49
  breakdowns: [],
48
50
  outcomes: [],
49
51
  metrics: []
50
- }, Oe = {
52
+ }, Ee = {
51
53
  state: "populated",
52
54
  reportRangeLabel: "Unavailable",
53
55
  funnel: [],
@@ -57,7 +59,7 @@ const Se = {
57
59
  breakdowns: [],
58
60
  outcomes: [],
59
61
  metrics: []
60
- }, Pe = {
62
+ }, Be = {
61
63
  state: "populated",
62
64
  reportRangeLabel: "Unavailable",
63
65
  funnel: [],
@@ -67,7 +69,7 @@ const Se = {
67
69
  breakdowns: [],
68
70
  outcomes: [],
69
71
  metrics: []
70
- }, $e = {
72
+ }, Te = {
71
73
  state: "populated",
72
74
  reportRangeLabel: "Unavailable",
73
75
  funnel: [],
@@ -77,7 +79,7 @@ const Se = {
77
79
  breakdowns: [],
78
80
  outcomes: [],
79
81
  metrics: []
80
- }, De = {
82
+ }, Ne = {
81
83
  state: "populated",
82
84
  reportRangeLabel: "Unavailable",
83
85
  funnel: [],
@@ -87,147 +89,223 @@ const Se = {
87
89
  breakdowns: [],
88
90
  outcomes: [],
89
91
  metrics: []
90
- }, Ee = {
92
+ }, Ve = {
91
93
  VOUCHER: {
92
94
  label: "Voucher",
93
95
  icon: "confirmation_number",
94
96
  objective: "Reactivation",
95
- report: Se
97
+ report: Oe
96
98
  },
97
99
  PROMOTION: {
98
100
  label: "Promotion",
99
101
  icon: "percent",
100
102
  objective: "Purchase conversion",
101
- report: Ie
103
+ report: De
102
104
  },
103
105
  MISSION: {
104
106
  label: "Mission",
105
107
  icon: "flag",
106
108
  objective: "Member engagement",
107
- report: Ce
109
+ report: Le
108
110
  },
109
111
  GAME: {
110
112
  label: "Game",
111
113
  icon: "sports_esports",
112
114
  objective: "Member engagement",
113
- report: Oe
115
+ report: Ee
114
116
  },
115
117
  COIN: {
116
118
  label: "Point",
117
119
  icon: "stars",
118
120
  objective: "Member engagement",
119
- report: Pe
121
+ report: Be
120
122
  },
121
123
  POINT: {
122
124
  label: "Experience",
123
125
  icon: "trending_up",
124
126
  objective: "Member engagement",
125
- report: $e
127
+ report: Te
126
128
  },
127
129
  CREDIT: {
128
130
  label: "Credit",
129
131
  icon: "account_balance_wallet",
130
132
  objective: "Member engagement",
131
- report: De
133
+ report: Ne
132
134
  }
133
135
  };
134
- function Le(t) {
135
- return Ee[t];
136
+ function Ue(t) {
137
+ return Ve[t];
136
138
  }
137
- function C(t, r) {
138
- return `${(t ?? 0).toLocaleString()} ${r}`;
139
+ function _(t, l, e = l) {
140
+ const s = t ?? 0;
141
+ return `${s.toLocaleString()} ${s === 1 ? e : l}`;
139
142
  }
140
143
  function m(t) {
141
144
  return (t ?? 0).toLocaleString();
142
145
  }
143
- function w(t) {
146
+ function R(t) {
144
147
  return t == null ? "—" : `RM ${t.toLocaleString("en-MY", {
145
148
  minimumFractionDigits: 2,
146
149
  maximumFractionDigits: 2
147
150
  })}`;
148
151
  }
149
- function D(t, r) {
150
- const e = r ?? 0;
152
+ function B(t, l) {
153
+ const e = l ?? 0;
151
154
  return e ? Math.round((t ?? 0) / e * 1e3) / 10 : 0;
152
155
  }
153
- function N(t) {
154
- const r = Re(t);
155
- return r.isValid() ? r.format("D MMM YYYY") : t;
156
+ function V(t) {
157
+ const l = Se(t);
158
+ return l.isValid() ? l.format("D MMM YYYY") : t;
156
159
  }
157
- function Te(t, r, e) {
158
- const { metrics: s, scope: c } = r, y = D(
159
- s.redeemedMembers,
160
+ function Fe(t, l, e) {
161
+ const { metrics: s, scope: i } = l, h = l.redemptionBreakdown ?? {
162
+ member: {
163
+ redeemedMembers: 0,
164
+ redeemedVouchers: 0,
165
+ voucherUses: 0,
166
+ completedBills: 0
167
+ },
168
+ guest: {
169
+ redeemedVouchers: 0,
170
+ voucherUses: 0,
171
+ completedBills: 0
172
+ }
173
+ }, { member: d, guest: v } = h, o = B(
174
+ d.redeemedMembers,
160
175
  s.distributedMembers
161
- ), i = D(
176
+ ), w = B(
162
177
  s.redeemedVouchers,
163
178
  s.distributedVouchers
164
- ), f = s.completedBills === 0 ? 0 : s.rewardValueUsed / s.completedBills, o = s.completedBills === 0 ? 0 : s.exactSales / s.completedBills, R = D(
179
+ ), c = s.completedBills === 0 ? 0 : s.rewardValueUsed / s.completedBills, C = s.completedBills === 0 ? 0 : s.exactSales / s.completedBills, y = B(
165
180
  s.expiredUnusedVouchers,
166
181
  s.distributedVouchers
167
182
  );
168
183
  return {
169
184
  ...t,
170
- reportRangeLabel: c.startDate && c.endDate ? `${N(c.startDate)} – ${N(c.endDate)}` : "Unavailable",
185
+ reportRangeLabel: i.startDate && i.endDate ? `${V(i.startDate)} – ${V(i.endDate)}` : "Unavailable",
171
186
  audienceLabel: void 0,
187
+ funnelHeadline: {
188
+ key: "voucherUtilization",
189
+ label: "Redemption rate",
190
+ value: `${w}%`,
191
+ helper: "Distinct redeemed vouchers divided by distributed vouchers"
192
+ },
193
+ funnelSummary: `${m(s.redeemedVouchers)} of ${m(
194
+ s.distributedVouchers
195
+ )} distributed vouchers redeemed. ${_(
196
+ d.voucherUses,
197
+ "member voucher uses",
198
+ "member voucher use"
199
+ )} and ${_(
200
+ v.voucherUses,
201
+ "guest voucher uses",
202
+ "guest voucher use"
203
+ )}.`,
204
+ funnelPrimaryLabel: "Member path",
172
205
  funnel: [
173
206
  {
174
207
  key: "distributed",
175
208
  label: "Distributed",
176
- membersLabel: C(s.distributedMembers, "members"),
177
- unitsLabel: C(s.distributedVouchers, "vouchers"),
178
- valueLabel: w(s.distributedFixedValue),
209
+ membersLabel: _(
210
+ s.distributedMembers,
211
+ "members",
212
+ "member"
213
+ ),
214
+ unitsLabel: _(
215
+ s.distributedVouchers,
216
+ "vouchers",
217
+ "voucher"
218
+ ),
219
+ valueLabel: R(s.distributedFixedValue),
179
220
  helper: "Unique members who received at least one voucher"
180
221
  },
181
222
  {
182
223
  key: "redeemed",
183
224
  label: "Redeemed",
184
- membersLabel: C(s.redeemedMembers, "members"),
185
- unitsLabel: C(s.voucherUses, "voucher uses"),
186
- ratePct: y,
187
- rateLabel: `${y}% of distributed members`,
225
+ membersLabel: _(d.redeemedMembers, "members", "member"),
226
+ unitsLabel: _(
227
+ d.voucherUses,
228
+ "voucher uses",
229
+ "voucher use"
230
+ ),
231
+ ratePct: o,
232
+ rateLabel: `${o}% of distributed members`,
188
233
  helper: "Distinct identified members who used the voucher"
189
234
  },
190
235
  {
191
236
  key: "completedBills",
192
237
  label: "Completed bills",
193
- primaryLabel: C(s.completedBills, "completed bills"),
194
- extra: "Includes direct guest voucher use",
195
- helper: "Distinct completed bills where this voucher was used"
238
+ primaryLabel: _(
239
+ d.completedBills,
240
+ "completed bills",
241
+ "completed bill"
242
+ ),
243
+ helper: "Distinct completed bills where a member used this voucher"
196
244
  }
197
245
  ],
246
+ funnelSecondary: {
247
+ label: "Guest path",
248
+ stages: [
249
+ {
250
+ key: "guestRedeemed",
251
+ label: "Redeemed",
252
+ primaryLabel: _(
253
+ v.voucherUses,
254
+ "voucher uses",
255
+ "voucher use"
256
+ ),
257
+ unitsLabel: _(
258
+ v.redeemedVouchers,
259
+ "redeemed vouchers",
260
+ "redeemed voucher"
261
+ ),
262
+ helper: "Voucher uses by guests without a member account"
263
+ },
264
+ {
265
+ key: "guestCompletedBills",
266
+ label: "Completed bills",
267
+ primaryLabel: _(
268
+ v.completedBills,
269
+ "completed bills",
270
+ "completed bill"
271
+ ),
272
+ helper: "Distinct completed bills where a guest used this voucher"
273
+ }
274
+ ]
275
+ },
198
276
  cards: [
199
277
  {
200
278
  key: "distributedMembers",
201
279
  label: "Distributed Members",
202
280
  value: (s.distributedMembers ?? 0).toLocaleString(),
203
- sub: C(s.distributedVouchers, "vouchers")
281
+ sub: _(s.distributedVouchers, "vouchers")
204
282
  },
205
283
  {
206
284
  key: "redemptionRate",
207
285
  label: "Redemption Rate",
208
- value: `${y}%`,
209
- sub: "of distributed members"
286
+ value: `${w}%`,
287
+ sub: "of distributed vouchers"
210
288
  },
211
289
  {
212
290
  key: "exactSales",
213
291
  label: "Exact Sales",
214
- value: w(s.exactSales),
215
- sub: C(s.completedBills, "completed bills")
292
+ value: R(s.exactSales),
293
+ sub: _(s.completedBills, "completed bills")
216
294
  },
217
295
  {
218
296
  key: "rewardValueUsed",
219
297
  label: "Reward Value Used",
220
- value: w(s.rewardValueUsed),
298
+ value: R(s.rewardValueUsed),
221
299
  sub: "voucher discount used"
222
300
  },
223
301
  {
224
302
  key: "unusedVoucherValue",
225
303
  label: "Unused Voucher Value",
226
- value: w(s.unusedVoucherValue),
304
+ value: R(s.unusedVoucherValue),
227
305
  sub: "issued, not yet redeemed"
228
306
  }
229
307
  ],
230
- trend: qe(e),
308
+ trend: Ye(e),
231
309
  breakdown: {
232
310
  dimension: "Outlet",
233
311
  columns: [
@@ -237,14 +315,14 @@ function Te(t, r, e) {
237
315
  "Exact sales",
238
316
  "Reward value used"
239
317
  ],
240
- rows: r.performanceDetails.map((p) => ({
241
- name: p.restaurantName,
318
+ rows: l.performanceDetails.map((I) => ({
319
+ name: I.restaurantName,
242
320
  cells: [
243
- p.redeemedMembers.toLocaleString(),
244
- p.voucherUses.toLocaleString(),
245
- p.completedBills.toLocaleString(),
246
- w(p.exactSales),
247
- w(p.rewardValueUsed)
321
+ I.redeemedMembers.toLocaleString(),
322
+ I.voucherUses.toLocaleString(),
323
+ I.completedBills.toLocaleString(),
324
+ R(I.exactSales),
325
+ R(I.rewardValueUsed)
248
326
  ]
249
327
  }))
250
328
  },
@@ -252,7 +330,7 @@ function Te(t, r, e) {
252
330
  {
253
331
  key: "exactSales",
254
332
  label: "Exact Sales",
255
- value: w(s.exactSales)
333
+ value: R(s.exactSales)
256
334
  },
257
335
  {
258
336
  key: "attributedBills",
@@ -262,62 +340,62 @@ function Te(t, r, e) {
262
340
  {
263
341
  key: "rewardValueUsed",
264
342
  label: "Reward Value Used",
265
- value: w(s.rewardValueUsed)
343
+ value: R(s.rewardValueUsed)
266
344
  },
267
345
  {
268
346
  key: "averageBillValue",
269
347
  label: "Average Bill Value",
270
- value: w(o)
348
+ value: R(C)
271
349
  }
272
350
  ],
273
351
  metrics: [
274
352
  {
275
353
  key: "memberRedemptionRate",
276
354
  label: "Member Redemption Rate",
277
- value: `${y}%`,
355
+ value: `${o}%`,
278
356
  helper: "Redeemed members ÷ distributed members"
279
357
  },
280
358
  {
281
359
  key: "voucherUtilizationRate",
282
360
  label: "Voucher Utilization Rate",
283
- value: `${i}%`,
361
+ value: `${w}%`,
284
362
  helper: "Redeemed vouchers ÷ distributed vouchers"
285
363
  },
286
364
  {
287
365
  key: "averageDiscountPerBill",
288
366
  label: "Average Discount per Bill",
289
- value: w(f),
367
+ value: R(c),
290
368
  helper: "Reward value used ÷ completed bills"
291
369
  },
292
370
  {
293
371
  key: "averageBillValue",
294
372
  label: "Average Bill Value",
295
- value: w(o),
373
+ value: R(C),
296
374
  helper: "Exact sales ÷ completed bills"
297
375
  },
298
376
  {
299
377
  key: "breakageRate",
300
378
  label: "Breakage Rate to date",
301
- value: `${R}%`,
379
+ value: `${y}%`,
302
380
  helper: "Expired unused vouchers ÷ distributed vouchers"
303
381
  }
304
382
  ]
305
383
  };
306
384
  }
307
- function Be(t, r) {
308
- const { metrics: e, scope: s } = r, c = D(
385
+ function Ae(t, l) {
386
+ const { metrics: e, scope: s } = l, i = B(
309
387
  e.memberBills,
310
388
  e.attributedBills
311
- ), y = D(
389
+ ), h = B(
312
390
  e.nonMemberBills,
313
391
  e.attributedBills
314
- ), i = D(
392
+ ), d = B(
315
393
  e.memberSales,
316
394
  e.exactSales
317
- ), f = e.attributedBills ? e.promotionValueUsed / e.attributedBills : 0, o = e.attributedBills ? e.exactSales / e.attributedBills : 0;
395
+ ), v = e.attributedBills ? e.promotionValueUsed / e.attributedBills : 0, o = e.attributedBills ? e.exactSales / e.attributedBills : 0;
318
396
  return {
319
397
  ...t,
320
- reportRangeLabel: s.startDate && s.endDate ? `${N(s.startDate)} – ${N(s.endDate)}` : "Unavailable",
398
+ reportRangeLabel: s.startDate && s.endDate ? `${V(s.startDate)} – ${V(s.endDate)}` : "Unavailable",
321
399
  audienceLabel: void 0,
322
400
  funnel: [],
323
401
  cards: [],
@@ -326,12 +404,12 @@ function Be(t, r) {
326
404
  memberBills: m(e.memberBills),
327
405
  appliedMembers: m(e.appliedMembers),
328
406
  nonMemberBills: m(e.nonMemberBills),
329
- memberSales: w(e.memberSales),
330
- nonMemberSales: w(e.nonMemberSales),
331
- memberBillSharePct: c,
332
- nonMemberBillSharePct: y,
333
- memberSalesSharePct: i,
334
- summary: `Members account for ${c}% of attributed bills and ${i}% of attributed sales.`
407
+ memberSales: R(e.memberSales),
408
+ nonMemberSales: R(e.nonMemberSales),
409
+ memberBillSharePct: i,
410
+ nonMemberBillSharePct: h,
411
+ memberSalesSharePct: d,
412
+ summary: `Members account for ${i}% of attributed bills and ${d}% of attributed sales.`
335
413
  },
336
414
  breakdown: {
337
415
  dimension: "Outlet",
@@ -343,15 +421,15 @@ function Be(t, r) {
343
421
  "Exact sales",
344
422
  "Promotion value used"
345
423
  ],
346
- rows: r.performanceDetails.map((R) => ({
347
- name: R.restaurantName,
424
+ rows: l.performanceDetails.map((w) => ({
425
+ name: w.restaurantName,
348
426
  cells: [
349
- m(R.appliedMembers),
350
- m(R.memberBills),
351
- m(R.nonMemberBills),
352
- m(R.attributedBills),
353
- w(R.exactSales),
354
- w(R.promotionValueUsed)
427
+ m(w.appliedMembers),
428
+ m(w.memberBills),
429
+ m(w.nonMemberBills),
430
+ m(w.attributedBills),
431
+ R(w.exactSales),
432
+ R(w.promotionValueUsed)
355
433
  ]
356
434
  }))
357
435
  },
@@ -359,7 +437,7 @@ function Be(t, r) {
359
437
  {
360
438
  key: "exactSales",
361
439
  label: "Exact Sales",
362
- value: w(e.exactSales)
440
+ value: R(e.exactSales)
363
441
  },
364
442
  {
365
443
  key: "attributedBills",
@@ -369,56 +447,56 @@ function Be(t, r) {
369
447
  {
370
448
  key: "promotionValueUsed",
371
449
  label: "Promotion Value Used",
372
- value: w(e.promotionValueUsed)
450
+ value: R(e.promotionValueUsed)
373
451
  },
374
452
  {
375
453
  key: "averageBillValue",
376
454
  label: "Average Bill Value",
377
- value: w(o)
455
+ value: R(o)
378
456
  }
379
457
  ],
380
458
  metrics: [
381
459
  {
382
460
  key: "memberApplicationShare",
383
461
  label: "Member Application Share",
384
- value: `${c}%`,
462
+ value: `${i}%`,
385
463
  helper: "Member bills ÷ attributed bills"
386
464
  },
387
465
  {
388
466
  key: "nonMemberApplicationShare",
389
467
  label: "Non-member Application Share",
390
- value: `${y}%`,
468
+ value: `${h}%`,
391
469
  helper: "Non-member bills ÷ attributed bills"
392
470
  },
393
471
  {
394
472
  key: "memberSalesShare",
395
473
  label: "Member Sales Share",
396
- value: `${i}%`,
474
+ value: `${d}%`,
397
475
  helper: "Member sales ÷ exact sales"
398
476
  },
399
477
  {
400
478
  key: "averageDiscountPerBill",
401
479
  label: "Average Discount per Bill",
402
- value: w(f),
480
+ value: R(v),
403
481
  helper: "Promotion value used ÷ attributed bills"
404
482
  },
405
483
  {
406
484
  key: "averageBillValue",
407
485
  label: "Average Bill Value",
408
- value: w(o),
486
+ value: R(o),
409
487
  helper: "Exact sales ÷ attributed bills"
410
488
  }
411
489
  ]
412
490
  };
413
491
  }
414
- function Ne(t, r) {
415
- const { metrics: e, scope: s } = r, c = e.participants ? e.stampsEarned / e.participants : 0, y = Math.max(
492
+ function qe(t, l) {
493
+ const { metrics: e, scope: s } = l, i = e.participants ? e.stampsEarned / e.participants : 0, h = Math.max(
416
494
  e.completionEvents - e.completedMembers,
417
495
  0
418
496
  );
419
497
  return {
420
498
  ...t,
421
- reportRangeLabel: s.startDate && s.endDate ? `${N(s.startDate)} – ${N(s.endDate)}` : "Unavailable",
499
+ reportRangeLabel: s.startDate && s.endDate ? `${V(s.startDate)} – ${V(s.endDate)}` : "Unavailable",
422
500
  funnel: [],
423
501
  cards: [
424
502
  {
@@ -469,13 +547,13 @@ function Ne(t, r) {
469
547
  "Issue transactions",
470
548
  "Quantity issued"
471
549
  ],
472
- rows: r.rewards.map((i) => ({
473
- name: i.rewardName,
550
+ rows: l.rewards.map((d) => ({
551
+ name: d.rewardName,
474
552
  cells: [
475
- i.rewardType,
476
- m(i.recipients),
477
- m(i.issuanceTransactions),
478
- m(i.quantityIssued)
553
+ d.rewardType,
554
+ m(d.recipients),
555
+ m(d.issuanceTransactions),
556
+ m(d.quantityIssued)
479
557
  ]
480
558
  }))
481
559
  }
@@ -486,12 +564,12 @@ function Ne(t, r) {
486
564
  breakdown: {
487
565
  dimension: "Outlet",
488
566
  columns: ["Participants", "Stamps earned", "Completion events"],
489
- rows: r.performanceDetails.map((i) => ({
490
- name: i.restaurantName || "Unattributed / online",
567
+ rows: l.performanceDetails.map((d) => ({
568
+ name: d.restaurantName || "Unattributed / online",
491
569
  cells: [
492
- m(i.participants),
493
- m(i.stampsEarned),
494
- m(i.completionEvents)
570
+ m(d.participants),
571
+ m(d.stampsEarned),
572
+ m(d.completionEvents)
495
573
  ]
496
574
  }))
497
575
  }
@@ -513,19 +591,19 @@ function Ne(t, r) {
513
591
  {
514
592
  key: "completionReach",
515
593
  label: "Completion Reach",
516
- value: `${D(e.completedMembers, e.participants)}%`,
594
+ value: `${B(e.completedMembers, e.participants)}%`,
517
595
  helper: "Completed members ÷ participants"
518
596
  },
519
597
  {
520
598
  key: "rewardReach",
521
599
  label: "Reward Reach",
522
- value: `${D(e.rewardRecipients, e.participants)}%`,
600
+ value: `${B(e.rewardRecipients, e.participants)}%`,
523
601
  helper: "Reward recipients ÷ participants"
524
602
  },
525
603
  {
526
604
  key: "averageStampsPerParticipant",
527
605
  label: "Average Stamps per Participant",
528
- value: c.toLocaleString("en-MY", {
606
+ value: i.toLocaleString("en-MY", {
529
607
  maximumFractionDigits: 2
530
608
  }),
531
609
  helper: "Stamps earned ÷ participants"
@@ -533,49 +611,49 @@ function Ne(t, r) {
533
611
  {
534
612
  key: "repeatCompletionEvents",
535
613
  label: "Repeat Completion Events",
536
- value: m(y),
614
+ value: m(h),
537
615
  helper: "Completion events beyond the first completion per member"
538
616
  }
539
617
  ]
540
618
  };
541
619
  }
542
- function Ve(t, r) {
543
- const { metrics: e, scope: s } = r, c = D(e.players, e.tokenRecipients), y = D(e.plays, e.tokensIssued), i = D(
620
+ function je(t, l) {
621
+ const { metrics: e, scope: s } = l, i = B(e.players, e.tokenRecipients), h = B(e.plays, e.tokensIssued), d = B(
544
622
  e.rewardRecipients,
545
623
  e.players
546
- ), f = e.players ? e.plays / e.players : 0;
624
+ ), v = e.players ? e.plays / e.players : 0;
547
625
  return {
548
626
  ...t,
549
- reportRangeLabel: s.startDate && s.endDate ? `${N(s.startDate)} – ${N(s.endDate)}` : "Unavailable",
627
+ reportRangeLabel: s.startDate && s.endDate ? `${V(s.startDate)} – ${V(s.endDate)}` : "Unavailable",
550
628
  audienceLabel: void 0,
551
629
  funnel: [
552
630
  {
553
631
  key: "tokenRecipients",
554
632
  label: "Token recipients",
555
- membersLabel: C(e.tokenRecipients, "members"),
556
- unitsLabel: C(e.tokensIssued, "tokens"),
557
- extra: `${m(e.plays)} plays · ${y}% token utilization`,
633
+ membersLabel: _(e.tokenRecipients, "members"),
634
+ unitsLabel: _(e.tokensIssued, "tokens"),
635
+ extra: `${m(e.plays)} plays · ${h}% token utilization`,
558
636
  helper: "Distinct members who received at least one game token"
559
637
  },
560
638
  {
561
639
  key: "players",
562
640
  label: "Players",
563
- membersLabel: C(e.players, "members"),
564
- unitsLabel: C(e.plays, "plays"),
565
- ratePct: c,
566
- rateLabel: `${c}% of token recipients`,
641
+ membersLabel: _(e.players, "members"),
642
+ unitsLabel: _(e.plays, "plays"),
643
+ ratePct: i,
644
+ rateLabel: `${i}% of token recipients`,
567
645
  helper: "Distinct members who consumed at least one game token"
568
646
  },
569
647
  {
570
648
  key: "rewardRecipients",
571
649
  label: "Reward recipients",
572
- membersLabel: C(e.rewardRecipients, "members"),
573
- unitsLabel: C(
650
+ membersLabel: _(e.rewardRecipients, "members"),
651
+ unitsLabel: _(
574
652
  e.rewardIssueTransactions,
575
653
  "reward issue transactions"
576
654
  ),
577
- ratePct: i,
578
- rateLabel: `${i}% of players`,
655
+ ratePct: d,
656
+ rateLabel: `${d}% of players`,
579
657
  helper: "Distinct players receiving at least one Reward Pool reward"
580
658
  }
581
659
  ],
@@ -619,7 +697,7 @@ function Ve(t, r) {
619
697
  "Issue transactions",
620
698
  "Quantity issued"
621
699
  ],
622
- rows: r.rewards.map((o) => ({
700
+ rows: l.rewards.map((o) => ({
623
701
  name: o.rewardName || "Unnamed reward",
624
702
  cells: [
625
703
  o.rewardType,
@@ -636,7 +714,7 @@ function Ve(t, r) {
636
714
  breakdown: {
637
715
  dimension: "Outlet",
638
716
  columns: ["Recipients", "Tokens issued"],
639
- rows: r.tokenDistributionDetails.map((o) => ({
717
+ rows: l.tokenDistributionDetails.map((o) => ({
640
718
  name: o.restaurantName || "Unattributed / online",
641
719
  cells: [
642
720
  m(o.recipients),
@@ -662,25 +740,25 @@ function Ve(t, r) {
662
740
  {
663
741
  key: "playerRate",
664
742
  label: "Player Rate",
665
- value: `${c}%`,
743
+ value: `${i}%`,
666
744
  helper: "Players ÷ token recipients"
667
745
  },
668
746
  {
669
747
  key: "tokenUtilizationRate",
670
748
  label: "Token Utilization Rate",
671
- value: `${y}%`,
749
+ value: `${h}%`,
672
750
  helper: "Plays ÷ tokens issued"
673
751
  },
674
752
  {
675
753
  key: "rewardRecipientRate",
676
754
  label: "Reward Recipient Rate",
677
- value: `${i}%`,
755
+ value: `${d}%`,
678
756
  helper: "Reward recipients ÷ players"
679
757
  },
680
758
  {
681
759
  key: "averagePlaysPerPlayer",
682
760
  label: "Average Plays per Player",
683
- value: f.toLocaleString("en-MY", {
761
+ value: v.toLocaleString("en-MY", {
684
762
  maximumFractionDigits: 2
685
763
  }),
686
764
  helper: "Plays ÷ players"
@@ -688,51 +766,47 @@ function Ve(t, r) {
688
766
  ]
689
767
  };
690
768
  }
691
- function X(t, r) {
692
- return r ? w(t ?? 0) : m(t);
769
+ const ze = "Members can appear under more than one source, so total share may add to more than 100%.";
770
+ function J(t, l) {
771
+ return l ? R(t ?? 0) : m(t);
693
772
  }
694
- function J(t, r) {
695
- return t[r] ?? 0;
773
+ function W(t, l) {
774
+ return t[l] ?? 0;
696
775
  }
697
- function ae(t, r, e) {
698
- const { metrics: s, scope: c } = r, y = s.recipients ? J(s, e.quantityKey) / s.recipients : 0, i = s.issuanceTransactions ? J(s, e.quantityKey) / s.issuanceTransactions : 0, f = [
776
+ function ae(t, l, e) {
777
+ const { metrics: s, scope: i } = l, h = s.recipients ? W(s, e.quantityKey) / s.recipients : 0, d = s.issuanceTransactions ? W(s, e.quantityKey) / s.issuanceTransactions : 0, v = [
699
778
  "Recipients",
700
779
  ...e.includeSourceRecipientShare ? ["Recipient share"] : [],
701
780
  "Issuance transactions",
702
781
  e.quantityLabel
703
- ], o = r.sourceDetails.map((p) => ({
704
- name: p.source || "Unknown",
782
+ ], o = l.sourceDetails.map((c) => ({
783
+ name: c.source ? Ce(Ie.getReason(c.source)) : "Unknown",
705
784
  cells: [
706
- m(p.recipients),
707
- ...e.includeSourceRecipientShare ? [`${D(p.recipients, s.recipients)}%`] : [],
708
- m(p.issuanceTransactions),
709
- X(
710
- J(p, e.quantityKey),
785
+ m(c.recipients),
786
+ ...e.includeSourceRecipientShare ? [`${B(c.recipients, s.recipients)}%`] : [],
787
+ m(c.issuanceTransactions),
788
+ J(
789
+ W(c, e.quantityKey),
711
790
  e.currency
712
791
  )
713
792
  ]
714
- })), R = [
793
+ })), w = [
715
794
  {
716
795
  key: "averagePerRecipient",
717
796
  label: `Average ${e.quantityName} per Recipient`,
718
- value: X(y, e.currency),
797
+ value: J(h, e.currency),
719
798
  helper: `${e.quantityLabel} ÷ recipients`
720
799
  },
721
800
  {
722
801
  key: "averagePerIssue",
723
802
  label: `Average ${e.quantityName} per Issue`,
724
- value: X(i, e.currency),
803
+ value: J(d, e.currency),
725
804
  helper: `${e.quantityLabel} ÷ issuance transactions`
726
805
  }
727
806
  ];
728
- return e.includeSourceRecipientShare && R.push({
729
- key: "recipientShareBySource",
730
- label: "Recipient Share by Source",
731
- value: "See source breakdown",
732
- helper: "Source recipients ÷ total recipients"
733
- }), {
807
+ return {
734
808
  ...t,
735
- reportRangeLabel: c.startDate && c.endDate ? `${N(c.startDate)} – ${N(c.endDate)}` : "Unavailable",
809
+ reportRangeLabel: i.startDate && i.endDate ? `${V(i.startDate)} – ${V(i.endDate)}` : "Unavailable",
736
810
  audienceLabel: void 0,
737
811
  funnel: [],
738
812
  cards: [
@@ -747,16 +821,18 @@ function ae(t, r, e) {
747
821
  key: "issuanceTransactions",
748
822
  label: "Issuance Transactions",
749
823
  value: m(s.issuanceTransactions),
750
- sub: "transactions"
824
+ sub: "transactions",
825
+ helper: "Count of issuance transactions directly attributed to this campaign"
751
826
  },
752
827
  {
753
828
  key: e.quantityKey,
754
- label: e.quantityLabel.replace(/^./, (p) => p.toUpperCase()),
755
- value: X(
756
- J(s, e.quantityKey),
829
+ label: e.quantityLabel.replace(/^./, (c) => c.toUpperCase()),
830
+ value: J(
831
+ W(s, e.quantityKey),
757
832
  e.currency
758
833
  ),
759
- sub: e.quantityUnit
834
+ sub: e.quantityUnit,
835
+ helper: `Total ${e.quantityName.toLowerCase()} issued through transactions directly attributed to this campaign`
760
836
  }
761
837
  ],
762
838
  trend: [],
@@ -765,9 +841,10 @@ function ae(t, r, e) {
765
841
  {
766
842
  title: "Distribution by source",
767
843
  emptyMessage: "No source activity was recorded for this campaign.",
844
+ ...e.includeSourceRecipientShare ? { note: ze } : {},
768
845
  breakdown: {
769
846
  dimension: "Source",
770
- columns: f,
847
+ columns: v,
771
848
  rows: o
772
849
  }
773
850
  },
@@ -781,13 +858,13 @@ function ae(t, r, e) {
781
858
  "Issuance transactions",
782
859
  e.quantityLabel
783
860
  ],
784
- rows: r.performanceDetails.map((p) => ({
785
- name: p.restaurantName || "Unattributed / online",
861
+ rows: l.performanceDetails.map((c) => ({
862
+ name: c.restaurantName || "Unattributed / online",
786
863
  cells: [
787
- m(p.recipients),
788
- m(p.issuanceTransactions),
789
- X(
790
- J(p, e.quantityKey),
864
+ m(c.recipients),
865
+ m(c.issuanceTransactions),
866
+ J(
867
+ W(c, e.quantityKey),
791
868
  e.currency
792
869
  )
793
870
  ]
@@ -796,11 +873,11 @@ function ae(t, r, e) {
796
873
  }
797
874
  ],
798
875
  outcomes: [],
799
- metrics: R
876
+ metrics: w
800
877
  };
801
878
  }
802
- function Ue(t, r) {
803
- return ae(t, r, {
879
+ function Ge(t, l) {
880
+ return ae(t, l, {
804
881
  label: "Point",
805
882
  quantityName: "Points",
806
883
  quantityLabel: "Points issued",
@@ -810,8 +887,8 @@ function Ue(t, r) {
810
887
  includeSourceRecipientShare: !0
811
888
  });
812
889
  }
813
- function Fe(t, r) {
814
- return ae(t, r, {
890
+ function He(t, l) {
891
+ return ae(t, l, {
815
892
  label: "Experience",
816
893
  quantityName: "Experience",
817
894
  quantityLabel: "Experience issued",
@@ -821,8 +898,8 @@ function Fe(t, r) {
821
898
  includeSourceRecipientShare: !0
822
899
  });
823
900
  }
824
- function Ae(t, r) {
825
- return ae(t, r, {
901
+ function Ke(t, l) {
902
+ return ae(t, l, {
826
903
  label: "Credit",
827
904
  quantityName: "Credit",
828
905
  quantityLabel: "Credit issued",
@@ -832,9 +909,9 @@ function Ae(t, r) {
832
909
  includeSourceRecipientShare: !1
833
910
  });
834
911
  }
835
- function qe(t) {
912
+ function Ye(t) {
836
913
  if (!(t != null && t.categories.length)) return [];
837
- const r = {
914
+ const l = {
838
915
  key: "members",
839
916
  label: "Distributed members vs Redeemed members",
840
917
  categories: t.categories,
@@ -843,8 +920,8 @@ function qe(t) {
843
920
  { label: "Redeemed members", values: t.redeemedMembers }
844
921
  ]
845
922
  };
846
- return t.distributedValue == null ? [r] : [
847
- r,
923
+ return t.distributedValue == null ? [l] : [
924
+ l,
848
925
  {
849
926
  key: "value",
850
927
  label: "Distributed voucher value vs Reward value used",
@@ -859,25 +936,25 @@ function qe(t) {
859
936
  }
860
937
  ];
861
938
  }
862
- function je(t) {
939
+ function Qe(t) {
863
940
  return [
864
941
  {
865
942
  header: t.dimension,
866
- accessorFn: (r) => r.name
943
+ accessorFn: (l) => l.name
867
944
  },
868
- ...t.columns.map((r, e) => ({
869
- header: r,
945
+ ...t.columns.map((l, e) => ({
946
+ header: l,
870
947
  accessorFn: (s) => s.cells[e] ?? ""
871
948
  }))
872
949
  ];
873
950
  }
874
- const ze = {
951
+ const Xe = {
875
952
  key: 0,
876
953
  class: "flex items-center gap-8 mb-8"
877
- }, Ge = { class: "fm-typo-en-body-sm-600 text-fm-color-primary uppercase" }, He = { class: "flex items-center gap-12 mb-12 flex-wrap" }, Ke = { class: "fm-typo-en-title-lg-800 text-fm-color-typo-primary m-0" }, Ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-wrap gap-x-16 gap-y-4" }, Qe = {
954
+ }, Je = { class: "fm-typo-en-body-sm-600 text-fm-color-primary uppercase" }, We = { class: "flex items-center gap-12 mb-12 flex-wrap" }, Ze = { class: "fm-typo-en-title-lg-800 text-fm-color-typo-primary m-0" }, et = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-wrap gap-x-16 gap-y-4" }, tt = {
878
955
  key: 1,
879
956
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4"
880
- }, Xe = /* @__PURE__ */ j({
957
+ }, at = /* @__PURE__ */ j({
881
958
  __name: "CampaignAnalyticHeader",
882
959
  props: {
883
960
  campaignName: {},
@@ -891,96 +968,96 @@ const ze = {
891
968
  demo: { type: Boolean }
892
969
  },
893
970
  setup(t) {
894
- const r = t, { t: e } = ye(), s = P(() => r.status ? {
971
+ const l = t, { t: e } = ve(), s = O(() => l.status ? {
895
972
  active: "text-fm-color-typo-success bg-fm-color-system-success-100",
896
973
  upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
897
974
  expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
898
- }[r.status] : "");
899
- return (c, y) => {
900
- const i = _("FmIcon"), f = _("FmChip"), o = _("FmCard");
901
- return n(), h(o, {
975
+ }[l.status] : "");
976
+ return (i, h) => {
977
+ const d = S("FmIcon"), v = S("FmChip"), o = S("FmCard");
978
+ return r(), g(o, {
902
979
  variant: "outlined",
903
980
  class: "p-24"
904
981
  }, {
905
- default: $(() => [
906
- t.mechanicLabel ? (n(), v("div", ze, [
907
- t.icon ? (n(), h(i, {
982
+ default: L(() => [
983
+ t.mechanicLabel ? (r(), p("div", Xe, [
984
+ t.icon ? (r(), g(d, {
908
985
  key: 0,
909
986
  name: t.icon,
910
987
  outline: "",
911
988
  size: "sm",
912
989
  class: "!text-fm-color-primary"
913
- }, null, 8, ["name"])) : g("", !0),
914
- a("span", Ge, u(t.objective ? `${t.mechanicLabel} · ${t.objective}` : t.mechanicLabel), 1)
915
- ])) : g("", !0),
916
- a("div", He, [
917
- a("h1", Ke, u(t.campaignName), 1),
918
- t.status ? (n(), h(f, {
990
+ }, null, 8, ["name"])) : b("", !0),
991
+ a("span", Je, u(t.objective ? `${t.mechanicLabel} · ${t.objective}` : t.mechanicLabel), 1)
992
+ ])) : b("", !0),
993
+ a("div", We, [
994
+ a("h1", Ze, u(t.campaignName), 1),
995
+ t.status ? (r(), g(v, {
919
996
  key: 0,
920
- class: W(l(s)),
921
- label: l(e)(`connect.campaign.common.status.${t.status}`),
997
+ class: H(n(s)),
998
+ label: n(e)(`connect.campaign.common.status.${t.status}`),
922
999
  compact: ""
923
- }, null, 8, ["class", "label"])) : g("", !0),
924
- t.demo ? (n(), h(f, {
1000
+ }, null, 8, ["class", "label"])) : b("", !0),
1001
+ t.demo ? (r(), g(v, {
925
1002
  key: 1,
926
1003
  class: "!text-fm-color-typo-warning !bg-fm-color-system-warning-100",
927
1004
  compact: "",
928
1005
  label: "Demo data"
929
- })) : g("", !0)
1006
+ })) : b("", !0)
930
1007
  ]),
931
- a("div", Ye, [
1008
+ a("div", et, [
932
1009
  a("span", null, u(t.datesLabel), 1),
933
- t.reportRangeLabel ? (n(), v(E, { key: 0 }, [
934
- y[0] || (y[0] = a("span", { class: "text-fm-color-typo-disabled" }, "·", -1)),
1010
+ t.reportRangeLabel ? (r(), p(E, { key: 0 }, [
1011
+ h[0] || (h[0] = a("span", { class: "text-fm-color-typo-disabled" }, "·", -1)),
935
1012
  a("span", null, "Reporting: " + u(t.reportRangeLabel), 1)
936
- ], 64)) : g("", !0)
1013
+ ], 64)) : b("", !0)
937
1014
  ]),
938
- t.audienceLabel ? (n(), v("div", Qe, " Audience: " + u(t.audienceLabel), 1)) : g("", !0)
1015
+ t.audienceLabel ? (r(), p("div", tt, " Audience: " + u(t.audienceLabel), 1)) : b("", !0)
939
1016
  ]),
940
1017
  _: 1
941
1018
  });
942
1019
  };
943
1020
  }
944
- }), Je = { class: "grid grid-cols-2 xs:grid-cols-1 gap-16" }, We = { class: "min-w-0" }, Ze = { class: "fm-typo-en-title-sm-800 mt-8" }, et = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, tt = { class: "min-w-0" }, at = { class: "fm-typo-en-title-sm-800 mt-8" }, st = { class: "grid grid-cols-2 xs:grid-cols-1 gap-16 mt-16" }, rt = { class: "min-w-0" }, lt = { class: "fm-typo-en-title-sm-800 mt-8" }, nt = { class: "min-w-0" }, it = { class: "fm-typo-en-title-sm-800 mt-8" }, ot = ["aria-label"], ct = { class: "flex h-12 overflow-hidden rounded-xxxl bg-fm-color-neutral-gray-100" }, mt = { class: "flex justify-between gap-16 mt-8 fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ut = { class: "mt-16 pt-12 border-t border-fm-color-neutral-gray-100 fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, dt = /* @__PURE__ */ j({
1021
+ }), st = { class: "grid grid-cols-2 xs:grid-cols-1 gap-16" }, rt = { class: "min-w-0" }, lt = { class: "fm-typo-en-title-sm-800 mt-8" }, nt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, ot = { class: "min-w-0" }, it = { class: "fm-typo-en-title-sm-800 mt-8" }, ct = { class: "grid grid-cols-2 xs:grid-cols-1 gap-16 mt-16" }, mt = { class: "min-w-0" }, ut = { class: "fm-typo-en-title-sm-800 mt-8" }, dt = { class: "min-w-0" }, pt = { class: "fm-typo-en-title-sm-800 mt-8" }, yt = ["aria-label"], bt = { class: "flex h-12 overflow-hidden rounded-xxxl bg-fm-color-neutral-gray-100" }, vt = { class: "flex justify-between gap-16 mt-8 fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ft = { class: "mt-16 pt-12 border-t border-fm-color-neutral-gray-100 fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ht = /* @__PURE__ */ j({
945
1022
  __name: "PromotionApplicationMix",
946
1023
  props: {
947
1024
  mix: {}
948
1025
  },
949
1026
  setup(t) {
950
- return (r, e) => {
951
- const s = _("FmCard");
952
- return n(), h(s, {
1027
+ return (l, e) => {
1028
+ const s = S("FmCard");
1029
+ return r(), g(s, {
953
1030
  variant: "outlined",
954
1031
  class: "p-24"
955
1032
  }, {
956
- default: $(() => [
1033
+ default: L(() => [
957
1034
  e[4] || (e[4] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Customer mix ", -1)),
958
1035
  e[5] || (e[5] = a("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4 mb-16" }, " Completed bills attributed to this promotion ", -1)),
959
- a("div", Je, [
960
- a("div", We, [
1036
+ a("div", st, [
1037
+ a("div", rt, [
961
1038
  e[0] || (e[0] = a("div", { class: "flex items-center gap-8" }, [
962
1039
  a("div", { class: "w-8 h-8 rounded-sm bg-fm-color-primary" }),
963
1040
  a("span", { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary" }, " Member bills ")
964
1041
  ], -1)),
965
- a("div", Ze, u(t.mix.memberBills), 1),
966
- a("div", et, u(t.mix.appliedMembers) + " applied members ", 1)
1042
+ a("div", lt, u(t.mix.memberBills), 1),
1043
+ a("div", nt, u(t.mix.appliedMembers) + " applied members ", 1)
967
1044
  ]),
968
- a("div", tt, [
1045
+ a("div", ot, [
969
1046
  e[1] || (e[1] = a("div", { class: "flex items-center gap-8" }, [
970
1047
  a("div", { class: "w-8 h-8 rounded-sm bg-fm-color-neutral-gray-200" }),
971
1048
  a("span", { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary" }, " Non-member bills ")
972
1049
  ], -1)),
973
- a("div", at, u(t.mix.nonMemberBills), 1)
1050
+ a("div", it, u(t.mix.nonMemberBills), 1)
974
1051
  ])
975
1052
  ]),
976
- a("div", st, [
977
- a("div", rt, [
1053
+ a("div", ct, [
1054
+ a("div", mt, [
978
1055
  e[2] || (e[2] = a("div", { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary" }, " Member sales ", -1)),
979
- a("div", lt, u(t.mix.memberSales), 1)
1056
+ a("div", ut, u(t.mix.memberSales), 1)
980
1057
  ]),
981
- a("div", nt, [
1058
+ a("div", dt, [
982
1059
  e[3] || (e[3] = a("div", { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary" }, " Non-member sales ", -1)),
983
- a("div", it, u(t.mix.nonMemberSales), 1)
1060
+ a("div", pt, u(t.mix.nonMemberSales), 1)
984
1061
  ])
985
1062
  ]),
986
1063
  a("div", {
@@ -988,103 +1065,161 @@ const ze = {
988
1065
  role: "img",
989
1066
  "aria-label": t.mix.summary
990
1067
  }, [
991
- a("div", ct, [
1068
+ a("div", bt, [
992
1069
  a("div", {
993
1070
  class: "h-full bg-fm-color-primary",
994
- style: me({ width: t.mix.memberBillSharePct + "%" })
1071
+ style: de({ width: t.mix.memberBillSharePct + "%" })
995
1072
  }, null, 4),
996
1073
  a("div", {
997
1074
  class: "h-full bg-fm-color-neutral-gray-200",
998
- style: me({ width: t.mix.nonMemberBillSharePct + "%" })
1075
+ style: de({ width: t.mix.nonMemberBillSharePct + "%" })
999
1076
  }, null, 4)
1000
1077
  ]),
1001
- a("div", mt, [
1078
+ a("div", vt, [
1002
1079
  a("span", null, "Members " + u(t.mix.memberBillSharePct) + "%", 1),
1003
1080
  a("span", null, "Non-members " + u(t.mix.nonMemberBillSharePct) + "%", 1)
1004
1081
  ])
1005
- ], 8, ot),
1006
- a("div", ut, u(t.mix.summary), 1)
1082
+ ], 8, yt),
1083
+ a("div", ft, u(t.mix.summary), 1)
1007
1084
  ]),
1008
1085
  _: 1
1009
1086
  });
1010
1087
  };
1011
1088
  }
1012
- }), pt = { class: "flex xs:flex-col items-stretch" }, yt = { class: "flex-1 min-w-0 px-16 xs:px-4 xs:py-12" }, bt = { class: "flex items-center gap-4" }, vt = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-tertiary" }, ft = {
1089
+ }), gt = {
1090
+ key: 0,
1091
+ class: "mt-16"
1092
+ }, xt = { class: "flex items-end gap-8" }, kt = { class: "fm-typo-en-title-lg-800 text-fm-color-typo-primary" }, wt = { class: "flex items-center gap-4 fm-typo-en-body-sm-600 text-fm-color-typo-secondary mb-4" }, Rt = {
1093
+ key: 0,
1094
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4"
1095
+ }, Mt = {
1096
+ key: 0,
1097
+ class: "flex xs:block"
1098
+ }, _t = {
1099
+ key: 0,
1100
+ class: "flex-1 min-w-0 xs:hidden"
1101
+ }, St = { class: "flex xs:flex-col items-stretch" }, Ct = {
1102
+ key: 0,
1103
+ class: "flex-1 min-w-0 xs:hidden"
1104
+ }, It = { class: "flex-1 min-w-0 px-16 xs:px-4 xs:py-12" }, $t = { class: "flex items-center gap-4" }, Pt = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-tertiary" }, Ot = {
1013
1105
  key: 0,
1014
1106
  class: "fm-typo-en-body-md-400 text-fm-color-typo-disabled italic mt-8"
1015
- }, gt = { class: "fm-typo-en-title-sm-800 text-fm-color-typo-primary mt-8" }, ht = {
1107
+ }, Dt = { class: "fm-typo-en-title-sm-800 text-fm-color-typo-primary mt-8" }, Lt = {
1016
1108
  key: 0,
1017
1109
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
1018
- }, xt = {
1110
+ }, Et = {
1019
1111
  key: 1,
1020
1112
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
1021
- }, kt = {
1113
+ }, Bt = {
1022
1114
  key: 2,
1023
1115
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
1024
- }, wt = {
1116
+ }, Tt = {
1025
1117
  key: 3,
1026
1118
  class: "mt-8"
1027
- }, Rt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, Mt = {
1119
+ }, Nt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, Vt = {
1028
1120
  key: 0,
1029
1121
  class: "flex items-center justify-center px-4 xs:py-4"
1030
- }, _t = /* @__PURE__ */ j({
1122
+ }, Ut = /* @__PURE__ */ j({
1031
1123
  __name: "CampaignFunnel",
1032
1124
  props: {
1033
- stages: {}
1125
+ stages: {},
1126
+ headline: {},
1127
+ summary: {},
1128
+ primaryLabel: {},
1129
+ secondaryLabel: {},
1130
+ secondaryStages: {}
1034
1131
  },
1035
1132
  setup(t) {
1036
- return (r, e) => {
1037
- const s = _("FmProgressBar"), c = _("FmIcon"), y = _("FmCard");
1038
- return n(), h(y, {
1133
+ const l = t, e = O(() => {
1134
+ var s;
1135
+ return [
1136
+ { label: l.primaryLabel, stages: l.stages, offset: !1 },
1137
+ ...(s = l.secondaryStages) != null && s.length ? [
1138
+ {
1139
+ label: l.secondaryLabel,
1140
+ stages: l.secondaryStages,
1141
+ offset: !0
1142
+ }
1143
+ ] : []
1144
+ ];
1145
+ });
1146
+ return (s, i) => {
1147
+ const h = S("FmProgressBar"), d = S("FmIcon"), v = S("FmCard");
1148
+ return r(), g(v, {
1039
1149
  variant: "outlined",
1040
1150
  class: "p-24"
1041
1151
  }, {
1042
- default: $(() => [
1043
- e[0] || (e[0] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Campaign funnel ", -1)),
1044
- e[1] || (e[1] = a("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4 mb-16" }, " Campaign activity at each stage ", -1)),
1045
- a("div", pt, [
1046
- (n(!0), v(E, null, ee(t.stages, (i, f) => (n(), v("div", {
1047
- key: i.key,
1048
- class: "flex xs:flex-col flex-1 min-w-0 items-stretch"
1049
- }, [
1050
- a("div", yt, [
1051
- a("div", bt, [
1052
- a("span", vt, u(i.label), 1),
1053
- i.helper ? (n(), h(Z, {
1054
- key: 0,
1055
- description: i.helper
1056
- }, null, 8, ["description"])) : g("", !0)
1152
+ default: L(() => [
1153
+ i[0] || (i[0] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Campaign funnel ", -1)),
1154
+ i[1] || (i[1] = a("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, " Campaign activity at each stage ", -1)),
1155
+ t.headline ? (r(), p("div", gt, [
1156
+ a("div", xt, [
1157
+ a("span", kt, u(t.headline.value), 1),
1158
+ a("span", wt, [
1159
+ xe(u(t.headline.label) + " ", 1),
1160
+ t.headline.helper ? (r(), g(ee, {
1161
+ key: 0,
1162
+ description: t.headline.helper
1163
+ }, null, 8, ["description"])) : b("", !0)
1164
+ ])
1165
+ ]),
1166
+ t.summary ? (r(), p("div", Rt, u(t.summary), 1)) : b("", !0)
1167
+ ])) : b("", !0),
1168
+ (r(!0), p(E, null, Z(n(e), (o, w) => (r(), p("div", {
1169
+ key: o.label ?? w,
1170
+ class: H(["flex flex-col", w ? "mt-16 pt-16 border-t border-fm-color-neutral-gray-100" : "mt-16"])
1171
+ }, [
1172
+ o.label ? (r(), p("div", Mt, [
1173
+ o.offset ? (r(), p("div", _t)) : b("", !0),
1174
+ a("div", {
1175
+ class: H(["fm-typo-en-body-sm-600 text-fm-color-typo-secondary mb-8", o.offset ? "flex-[2]" : "flex-1"])
1176
+ }, u(o.label), 3)
1177
+ ])) : b("", !0),
1178
+ a("div", St, [
1179
+ o.offset ? (r(), p("div", Ct)) : b("", !0),
1180
+ (r(!0), p(E, null, Z(o.stages, (c, C) => (r(), p("div", {
1181
+ key: c.key,
1182
+ class: "flex xs:flex-col flex-1 min-w-0 items-stretch"
1183
+ }, [
1184
+ a("div", It, [
1185
+ a("div", $t, [
1186
+ a("span", Pt, u(c.label), 1),
1187
+ c.helper ? (r(), g(ee, {
1188
+ key: 0,
1189
+ description: c.helper
1190
+ }, null, 8, ["description"])) : b("", !0)
1191
+ ]),
1192
+ c.notSupported ? (r(), p("div", Ot, u(c.helper), 1)) : (r(), p(E, { key: 1 }, [
1193
+ a("div", Dt, u(c.primaryLabel ?? c.membersLabel ?? "—"), 1),
1194
+ c.unitsLabel ? (r(), p("div", Lt, u(c.unitsLabel), 1)) : b("", !0),
1195
+ c.valueLabel ? (r(), p("div", Et, u(c.valueLabel), 1)) : b("", !0),
1196
+ c.extra ? (r(), p("div", Bt, u(c.extra), 1)) : b("", !0),
1197
+ c.ratePct !== void 0 ? (r(), p("div", Tt, [
1198
+ P(h, {
1199
+ value: c.ratePct,
1200
+ color: "primary",
1201
+ size: "sm"
1202
+ }, null, 8, ["value"]),
1203
+ a("div", Nt, u(c.rateLabel), 1)
1204
+ ])) : b("", !0)
1205
+ ], 64))
1057
1206
  ]),
1058
- i.notSupported ? (n(), v("div", ft, u(i.helper), 1)) : (n(), v(E, { key: 1 }, [
1059
- a("div", gt, u(i.primaryLabel ?? i.membersLabel ?? "—"), 1),
1060
- i.unitsLabel ? (n(), v("div", ht, u(i.unitsLabel), 1)) : g("", !0),
1061
- i.valueLabel ? (n(), v("div", xt, u(i.valueLabel), 1)) : g("", !0),
1062
- i.extra ? (n(), v("div", kt, u(i.extra), 1)) : g("", !0),
1063
- i.ratePct !== void 0 ? (n(), v("div", wt, [
1064
- I(s, {
1065
- value: i.ratePct,
1066
- color: "primary",
1067
- size: "sm"
1068
- }, null, 8, ["value"]),
1069
- a("div", Rt, u(i.rateLabel), 1)
1070
- ])) : g("", !0)
1071
- ], 64))
1072
- ]),
1073
- f < t.stages.length - 1 ? (n(), v("div", Mt, [
1074
- I(c, {
1075
- name: "chevron_right",
1076
- size: "sm",
1077
- class: "text-fm-color-neutral-gray-300 xs:rotate-90"
1078
- })
1079
- ])) : g("", !0)
1080
- ]))), 128))
1081
- ])
1207
+ C < o.stages.length - 1 ? (r(), p("div", Vt, [
1208
+ P(d, {
1209
+ name: "chevron_right",
1210
+ size: "sm",
1211
+ class: "text-fm-color-neutral-gray-300 xs:rotate-90"
1212
+ })
1213
+ ])) : b("", !0)
1214
+ ]))), 128))
1215
+ ])
1216
+ ], 2))), 128))
1082
1217
  ]),
1083
1218
  _: 1
1084
1219
  });
1085
1220
  };
1086
1221
  }
1087
- }), St = { class: "grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] xs:grid-cols-1 gap-16" }, It = { class: "flex items-center gap-8" }, Ct = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary flex-1 min-w-0 truncate" }, Ot = {
1222
+ }), Ft = { class: "grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] xs:grid-cols-1 gap-16" }, At = { class: "flex items-center gap-8" }, qt = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary flex-1 min-w-0 truncate" }, jt = {
1088
1223
  key: 0,
1089
1224
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
1090
1225
  }, te = /* @__PURE__ */ j({
@@ -1093,145 +1228,151 @@ const ze = {
1093
1228
  cards: {}
1094
1229
  },
1095
1230
  setup(t) {
1096
- return (r, e) => {
1097
- const s = _("FmCard");
1098
- return n(), v("section", St, [
1099
- (n(!0), v(E, null, ee(t.cards, (c) => (n(), h(s, {
1100
- key: c.key,
1231
+ return (l, e) => {
1232
+ const s = S("FmCard");
1233
+ return r(), p("section", Ft, [
1234
+ (r(!0), p(E, null, Z(t.cards, (i) => (r(), g(s, {
1235
+ key: i.key,
1101
1236
  variant: "outlined",
1102
1237
  class: "flex flex-col gap-4 p-16 min-w-0 overflow-hidden"
1103
1238
  }, {
1104
- default: $(() => [
1105
- a("div", It, [
1106
- a("span", Ct, u(c.label), 1),
1107
- c.helper ? (n(), h(Z, {
1239
+ default: L(() => [
1240
+ a("div", At, [
1241
+ a("span", qt, u(i.label), 1),
1242
+ i.helper ? (r(), g(ee, {
1108
1243
  key: 0,
1109
- description: c.helper
1110
- }, null, 8, ["description"])) : g("", !0)
1244
+ description: i.helper
1245
+ }, null, 8, ["description"])) : b("", !0)
1111
1246
  ]),
1112
1247
  a("div", {
1113
- class: W([
1248
+ class: H([
1114
1249
  "fm-typo-en-title-sm-800 truncate",
1115
- c.unavailable ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
1250
+ i.unavailable ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
1116
1251
  ])
1117
- }, u(c.value), 3),
1118
- c.sub ? (n(), v("div", Ot, u(c.sub), 1)) : g("", !0)
1252
+ }, u(i.value), 3),
1253
+ i.sub ? (r(), p("div", jt, u(i.sub), 1)) : b("", !0)
1119
1254
  ]),
1120
1255
  _: 2
1121
1256
  }, 1024))), 128))
1122
1257
  ]);
1123
1258
  };
1124
1259
  }
1125
- }), Pt = { class: "flex items-center justify-between gap-12 flex-wrap mb-16 xs:flex-col xs:items-start" }, $t = {
1260
+ }), zt = { class: "flex items-center justify-between gap-12 flex-wrap mb-16 xs:flex-col xs:items-start" }, Gt = {
1126
1261
  key: 0,
1127
1262
  class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary mb-12"
1128
- }, Dt = /* @__PURE__ */ j({
1263
+ }, Ht = /* @__PURE__ */ j({
1129
1264
  __name: "CampaignTrendChart",
1130
1265
  props: {
1131
1266
  modes: {}
1132
1267
  },
1133
1268
  setup(t) {
1134
- var R;
1135
- const r = t, e = ["#FF7823", "#B2B3B6"], s = H(((R = r.modes[0]) == null ? void 0 : R.key) ?? ""), c = P(
1136
- () => r.modes.map((p) => ({ label: p.label, value: p.key }))
1137
- ), y = P(
1138
- () => c.value.find((p) => p.value === s.value) ?? null
1139
- ), i = P(
1140
- () => r.modes.find((p) => p.key === s.value) ?? r.modes[0]
1141
- ), f = P(
1269
+ var w;
1270
+ const l = t, e = ["#FF7823", "#B2B3B6"], s = Y(((w = l.modes[0]) == null ? void 0 : w.key) ?? ""), i = O(
1271
+ () => l.modes.map((c) => ({ label: c.label, value: c.key }))
1272
+ ), h = O(
1273
+ () => i.value.find((c) => c.value === s.value) ?? null
1274
+ ), d = O(
1275
+ () => l.modes.find((c) => c.key === s.value) ?? l.modes[0]
1276
+ ), v = O(
1142
1277
  () => {
1143
- var p;
1144
- return (((p = i.value) == null ? void 0 : p.series) ?? []).map((L, d) => ({
1145
- label: L.label,
1146
- data: L.values,
1147
- color: e[d] ?? e[e.length - 1],
1148
- dash: d > 0
1278
+ var c;
1279
+ return (((c = d.value) == null ? void 0 : c.series) ?? []).map((C, y) => ({
1280
+ label: C.label,
1281
+ data: C.values,
1282
+ color: e[y] ?? e[e.length - 1],
1283
+ dash: y > 0
1149
1284
  }));
1150
1285
  }
1151
1286
  ), o = { display: !0 };
1152
- return (p, L) => {
1153
- const d = _("FmButtonGroup"), U = _("FmLineChart"), M = _("FmCard");
1154
- return n(), h(M, {
1287
+ return (c, C) => {
1288
+ const y = S("FmButtonGroup"), I = S("FmLineChart"), M = S("FmCard");
1289
+ return r(), g(M, {
1155
1290
  variant: "outlined",
1156
1291
  class: "p-24"
1157
1292
  }, {
1158
- default: $(() => [
1159
- a("div", Pt, [
1160
- L[1] || (L[1] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Funnel trend ", -1)),
1161
- t.modes.length > 1 ? (n(), h(d, {
1293
+ default: L(() => [
1294
+ a("div", zt, [
1295
+ C[1] || (C[1] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Funnel trend ", -1)),
1296
+ t.modes.length > 1 ? (r(), g(y, {
1162
1297
  key: 0,
1163
- items: l(c),
1164
- "model-value": l(y),
1165
- "onUpdate:modelValue": L[0] || (L[0] = (k) => s.value = k.value)
1166
- }, null, 8, ["items", "model-value"])) : g("", !0)
1298
+ items: n(i),
1299
+ "model-value": n(h),
1300
+ "onUpdate:modelValue": C[0] || (C[0] = (x) => s.value = x.value)
1301
+ }, null, 8, ["items", "model-value"])) : b("", !0)
1167
1302
  ]),
1168
- l(i) ? (n(), v("div", $t, u(l(i).label), 1)) : g("", !0),
1169
- l(i) ? (n(), h(U, {
1303
+ n(d) ? (r(), p("div", Gt, u(n(d).label), 1)) : b("", !0),
1304
+ n(d) ? (r(), g(I, {
1170
1305
  key: 1,
1171
- datasets: l(f),
1172
- "x-axis": { categories: l(i).categories },
1306
+ datasets: n(v),
1307
+ "x-axis": { categories: n(d).categories },
1173
1308
  "x-cfg": o,
1174
1309
  "y-cfg": o,
1175
1310
  legend: { display: !0 },
1176
1311
  height: "150px"
1177
- }, null, 8, ["datasets", "x-axis"])) : g("", !0)
1312
+ }, null, 8, ["datasets", "x-axis"])) : b("", !0)
1178
1313
  ]),
1179
1314
  _: 1
1180
1315
  });
1181
1316
  };
1182
1317
  }
1183
- }), Et = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Lt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4 mb-12" }, Tt = {
1318
+ }), Kt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Yt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, Qt = {
1319
+ key: 0,
1320
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4"
1321
+ }, Xt = {
1184
1322
  key: 1,
1185
1323
  class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary mt-8"
1186
- }, Bt = {
1324
+ }, Jt = {
1187
1325
  key: 2,
1188
1326
  class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary mt-8"
1189
- }, de = /* @__PURE__ */ j({
1327
+ }, ye = /* @__PURE__ */ j({
1190
1328
  __name: "CampaignBreakdownTable",
1191
1329
  props: {
1192
1330
  breakdown: {},
1193
1331
  title: { default: "Performance details" },
1194
- emptyMessage: { default: "No outlet activity was recorded for this campaign." }
1332
+ emptyMessage: { default: "No outlet activity was recorded for this campaign." },
1333
+ note: {}
1195
1334
  },
1196
1335
  setup(t) {
1197
- const r = t, e = P(
1198
- () => r.breakdown ? je(r.breakdown) : []
1336
+ const l = t, e = O(
1337
+ () => l.breakdown ? Qe(l.breakdown) : []
1199
1338
  );
1200
- return (s, c) => {
1201
- const y = _("FmTable"), i = _("FmCard");
1202
- return n(), h(i, {
1339
+ return (s, i) => {
1340
+ const h = S("FmTable"), d = S("FmCard");
1341
+ return r(), g(d, {
1203
1342
  variant: "outlined",
1204
1343
  class: "p-24"
1205
1344
  }, {
1206
- default: $(() => {
1207
- var f;
1345
+ default: L(() => {
1346
+ var v;
1208
1347
  return [
1209
- a("div", Et, u(t.title), 1),
1210
- (f = t.breakdown) != null && f.rows.length ? (n(), v(E, { key: 0 }, [
1211
- a("div", Lt, " By " + u(t.breakdown.dimension), 1),
1212
- I(y, {
1348
+ a("div", Kt, u(t.title), 1),
1349
+ (v = t.breakdown) != null && v.rows.length ? (r(), p(E, { key: 0 }, [
1350
+ a("div", Yt, " By " + u(t.breakdown.dimension), 1),
1351
+ t.note ? (r(), p("div", Qt, u(t.note), 1)) : b("", !0),
1352
+ P(h, {
1353
+ class: "mt-12",
1213
1354
  "row-data": t.breakdown.rows,
1214
- "column-defs": l(e),
1355
+ "column-defs": n(e),
1215
1356
  "column-filter": [],
1216
1357
  "hide-footer": ""
1217
1358
  }, null, 8, ["row-data", "column-defs"])
1218
- ], 64)) : t.breakdown ? (n(), v("div", Tt, u(t.emptyMessage), 1)) : (n(), v("div", Bt, " No breakdown dimension is available for this campaign. "))
1359
+ ], 64)) : t.breakdown ? (r(), p("div", Xt, u(t.emptyMessage), 1)) : (r(), p("div", Jt, " No breakdown dimension is available for this campaign. "))
1219
1360
  ];
1220
1361
  }),
1221
1362
  _: 1
1222
1363
  });
1223
1364
  };
1224
1365
  }
1225
- }), Nt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Vt = {
1366
+ }), Wt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Zt = {
1226
1367
  key: 0,
1227
1368
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4 mb-12"
1228
- }, Ut = {
1369
+ }, ea = {
1229
1370
  key: 0,
1230
1371
  class: "px-16 py-12 rounded-lg bg-fm-color-neutral-gray-100 min-w-0"
1231
- }, Ft = { class: "flex items-center gap-8" }, At = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary flex-1 min-w-0 truncate" }, qt = {
1372
+ }, ta = { class: "flex items-center gap-8" }, aa = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary flex-1 min-w-0 truncate" }, sa = {
1232
1373
  key: 1,
1233
1374
  class: "flex items-center justify-between gap-12 py-8 border-b border-fm-color-neutral-gray-100"
1234
- }, jt = { class: "flex items-center gap-8 min-w-0" }, zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary truncate" }, pe = /* @__PURE__ */ j({
1375
+ }, ra = { class: "flex items-center gap-8 min-w-0" }, la = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary truncate" }, be = /* @__PURE__ */ j({
1235
1376
  __name: "CampaignMetricList",
1236
1377
  props: {
1237
1378
  title: {},
@@ -1240,49 +1381,49 @@ const ze = {
1240
1381
  variant: { default: "tile" }
1241
1382
  },
1242
1383
  setup(t) {
1243
- return (r, e) => {
1244
- const s = _("FmCard");
1245
- return n(), h(s, {
1384
+ return (l, e) => {
1385
+ const s = S("FmCard");
1386
+ return r(), g(s, {
1246
1387
  variant: "outlined",
1247
1388
  class: "p-24"
1248
1389
  }, {
1249
- default: $(() => [
1250
- a("div", Nt, u(t.title), 1),
1251
- t.caption ? (n(), v("div", Vt, u(t.caption), 1)) : g("", !0),
1390
+ default: L(() => [
1391
+ a("div", Wt, u(t.title), 1),
1392
+ t.caption ? (r(), p("div", Zt, u(t.caption), 1)) : b("", !0),
1252
1393
  a("div", {
1253
- class: W(["grid grid-cols-[repeat(auto-fit,minmax(220px,1fr))] xs:grid-cols-1", t.variant === "tile" ? "gap-16" : "gap-x-16"])
1394
+ class: H(["grid grid-cols-[repeat(auto-fit,minmax(220px,1fr))] xs:grid-cols-1", t.variant === "tile" ? "gap-16" : "gap-x-16"])
1254
1395
  }, [
1255
- (n(!0), v(E, null, ee(t.items, (c) => (n(), v(E, {
1256
- key: c.key
1396
+ (r(!0), p(E, null, Z(t.items, (i) => (r(), p(E, {
1397
+ key: i.key
1257
1398
  }, [
1258
- t.variant === "tile" ? (n(), v("div", Ut, [
1259
- a("div", Ft, [
1260
- a("span", At, u(c.label), 1),
1261
- c.helper ? (n(), h(Z, {
1399
+ t.variant === "tile" ? (r(), p("div", ea, [
1400
+ a("div", ta, [
1401
+ a("span", aa, u(i.label), 1),
1402
+ i.helper ? (r(), g(ee, {
1262
1403
  key: 0,
1263
- description: c.helper
1264
- }, null, 8, ["description"])) : g("", !0)
1404
+ description: i.helper
1405
+ }, null, 8, ["description"])) : b("", !0)
1265
1406
  ]),
1266
1407
  a("div", {
1267
- class: W([
1408
+ class: H([
1268
1409
  "fm-typo-en-body-lg-600 mt-4 truncate",
1269
- c.unavailable ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
1410
+ i.unavailable ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
1270
1411
  ])
1271
- }, u(c.value), 3)
1272
- ])) : (n(), v("div", qt, [
1273
- a("div", jt, [
1274
- a("span", zt, u(c.label), 1),
1275
- c.helper ? (n(), h(Z, {
1412
+ }, u(i.value), 3)
1413
+ ])) : (r(), p("div", sa, [
1414
+ a("div", ra, [
1415
+ a("span", la, u(i.label), 1),
1416
+ i.helper ? (r(), g(ee, {
1276
1417
  key: 0,
1277
- description: c.helper
1278
- }, null, 8, ["description"])) : g("", !0)
1418
+ description: i.helper
1419
+ }, null, 8, ["description"])) : b("", !0)
1279
1420
  ]),
1280
1421
  a("span", {
1281
- class: W([
1422
+ class: H([
1282
1423
  "fm-typo-en-body-md-600 whitespace-nowrap",
1283
- c.unavailable ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
1424
+ i.unavailable ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
1284
1425
  ])
1285
- }, u(c.value), 3)
1426
+ }, u(i.value), 3)
1286
1427
  ]))
1287
1428
  ], 64))), 128))
1288
1429
  ], 2)
@@ -1291,54 +1432,54 @@ const ze = {
1291
1432
  });
1292
1433
  };
1293
1434
  }
1294
- }), Gt = { class: "flex items-center gap-8" }, Ht = { class: "px-24 flex flex-col gap-16 pb-24" }, Kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Yt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Qt = {
1435
+ }), na = { class: "flex items-center gap-8" }, oa = { class: "px-24 flex flex-col gap-16 pb-24" }, ia = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ma = {
1295
1436
  key: 0,
1296
1437
  class: "flex flex-col gap-12"
1297
- }, Xt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Jt = {
1438
+ }, ua = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, da = {
1298
1439
  key: 1,
1299
1440
  class: "flex flex-col gap-12"
1300
- }, oa = /* @__PURE__ */ j({
1441
+ }, _a = /* @__PURE__ */ j({
1301
1442
  __name: "CampaignAnalytic",
1302
1443
  setup(t) {
1303
- const { t: r } = ye(), e = Me(), s = _e(), { global: c, minor: y } = xe, i = he(), f = H(), o = H(), R = H(), p = H(!1), L = H(!1), d = P(() => {
1304
- var O;
1305
- return (O = f.value) == null ? void 0 : O.campaign;
1306
- }), U = P(
1307
- () => d.value ? Le(d.value.type) : void 0
1308
- ), M = P(() => {
1309
- var O;
1310
- return (O = U.value) == null ? void 0 : O.report;
1311
- }), k = P(() => {
1312
- var O, x, z, G, T, B, F, S, b, A, q, K, Y;
1313
- return M.value && ((O = d.value) == null ? void 0 : O.type) === "COIN" ? Ue(
1444
+ const { t: l } = ve(), e = $e(), s = Pe(), { global: i, minor: h } = Re, d = we(), v = Y(), o = Y(), w = Y(), c = Y(!1), C = Y(!1), y = O(() => {
1445
+ var D;
1446
+ return (D = v.value) == null ? void 0 : D.campaign;
1447
+ }), I = O(
1448
+ () => y.value ? Ue(y.value.type) : void 0
1449
+ ), M = O(() => {
1450
+ var D;
1451
+ return (D = I.value) == null ? void 0 : D.report;
1452
+ }), x = O(() => {
1453
+ var D, k, z, G, T, N, F, $, f, A, q, Q, X;
1454
+ return M.value && ((D = y.value) == null ? void 0 : D.type) === "COIN" ? Ge(
1314
1455
  M.value,
1315
- ((x = o.value) == null ? void 0 : x.type) === "COIN" ? o.value : ne()
1316
- ) : M.value && ((z = d.value) == null ? void 0 : z.type) === "POINT" ? Fe(
1456
+ ((k = o.value) == null ? void 0 : k.type) === "COIN" ? o.value : ne()
1457
+ ) : M.value && ((z = y.value) == null ? void 0 : z.type) === "POINT" ? He(
1317
1458
  M.value,
1318
- ((G = o.value) == null ? void 0 : G.type) === "POINT" ? o.value : ie()
1319
- ) : M.value && ((T = d.value) == null ? void 0 : T.type) === "CREDIT" ? Ae(
1459
+ ((G = o.value) == null ? void 0 : G.type) === "POINT" ? o.value : oe()
1460
+ ) : M.value && ((T = y.value) == null ? void 0 : T.type) === "CREDIT" ? Ke(
1320
1461
  M.value,
1321
- ((B = o.value) == null ? void 0 : B.type) === "CREDIT" ? o.value : oe()
1322
- ) : M.value && ((F = d.value) == null ? void 0 : F.type) === "GAME" ? Ve(
1462
+ ((N = o.value) == null ? void 0 : N.type) === "CREDIT" ? o.value : ie()
1463
+ ) : M.value && ((F = y.value) == null ? void 0 : F.type) === "GAME" ? je(
1323
1464
  M.value,
1324
- ((S = o.value) == null ? void 0 : S.type) === "GAME" ? o.value : le()
1325
- ) : M.value && ((b = d.value) == null ? void 0 : b.type) === "MISSION" ? Ne(
1465
+ (($ = o.value) == null ? void 0 : $.type) === "GAME" ? o.value : le()
1466
+ ) : M.value && ((f = y.value) == null ? void 0 : f.type) === "MISSION" ? qe(
1326
1467
  M.value,
1327
1468
  ((A = o.value) == null ? void 0 : A.type) === "MISSION" ? o.value : re()
1328
- ) : M.value && ((q = d.value) == null ? void 0 : q.type) === "PROMOTION" ? Be(
1469
+ ) : M.value && ((q = y.value) == null ? void 0 : q.type) === "PROMOTION" ? Ae(
1329
1470
  M.value,
1330
- ((K = o.value) == null ? void 0 : K.type) === "PROMOTION" ? o.value : se()
1331
- ) : M.value && ((Y = o.value) == null ? void 0 : Y.type) === "VOUCHER" ? Te(
1471
+ ((Q = o.value) == null ? void 0 : Q.type) === "PROMOTION" ? o.value : se()
1472
+ ) : M.value && ((X = o.value) == null ? void 0 : X.type) === "VOUCHER" ? Fe(
1332
1473
  M.value,
1333
1474
  o.value,
1334
- R.value
1475
+ w.value
1335
1476
  ) : M.value;
1336
- }), be = P(
1337
- () => d.value ? r(ke(d.value.timeframeOptions)) : ""
1338
- ), ve = P(
1339
- () => d.value && d.value.type !== "MEMBERSHIP" ? we(d.value) : void 0
1477
+ }), fe = O(
1478
+ () => y.value ? l(Me(y.value.timeframeOptions)) : ""
1479
+ ), he = O(
1480
+ () => y.value && y.value.type !== "MEMBERSHIP" ? _e(y.value) : void 0
1340
1481
  );
1341
- function fe() {
1482
+ function ge() {
1342
1483
  return {
1343
1484
  type: "VOUCHER",
1344
1485
  scope: { startDate: "", endDate: "" },
@@ -1355,6 +1496,19 @@ const ze = {
1355
1496
  rewardValueUsed: 0,
1356
1497
  unusedVoucherValue: null
1357
1498
  },
1499
+ redemptionBreakdown: {
1500
+ member: {
1501
+ redeemedMembers: 0,
1502
+ redeemedVouchers: 0,
1503
+ voucherUses: 0,
1504
+ completedBills: 0
1505
+ },
1506
+ guest: {
1507
+ redeemedVouchers: 0,
1508
+ voucherUses: 0,
1509
+ completedBills: 0
1510
+ }
1511
+ },
1358
1512
  performanceDetails: []
1359
1513
  };
1360
1514
  }
@@ -1421,7 +1575,7 @@ const ze = {
1421
1575
  performanceDetails: []
1422
1576
  };
1423
1577
  }
1424
- function ie() {
1578
+ function oe() {
1425
1579
  return {
1426
1580
  type: "POINT",
1427
1581
  scope: { startDate: "", endDate: "" },
@@ -1434,7 +1588,7 @@ const ze = {
1434
1588
  performanceDetails: []
1435
1589
  };
1436
1590
  }
1437
- function oe() {
1591
+ function ie() {
1438
1592
  return {
1439
1593
  type: "CREDIT",
1440
1594
  scope: { startDate: "", endDate: "" },
@@ -1447,220 +1601,226 @@ const ze = {
1447
1601
  performanceDetails: []
1448
1602
  };
1449
1603
  }
1450
- return ge(async () => {
1451
- var O, x, z, G, T, B, F;
1604
+ return ke(async () => {
1605
+ var D, k, z, G, T, N, F;
1452
1606
  try {
1453
- await c(async () => {
1607
+ await i(async () => {
1454
1608
  var A, q;
1455
- f.value = await V.readById(e.params.id);
1456
- const b = e.meta.campaignType;
1457
- L.value = !!b && ((q = (A = f.value) == null ? void 0 : A.campaign) == null ? void 0 : q.type) !== b;
1609
+ v.value = await U.readById(e.params.id);
1610
+ const f = e.meta.campaignType;
1611
+ C.value = !!f && ((q = (A = v.value) == null ? void 0 : A.campaign) == null ? void 0 : q.type) !== f;
1458
1612
  });
1459
- const S = {
1460
- timezone: ue[i.currentCountry.value || "MY"] ?? ue.MY
1613
+ const $ = {
1614
+ timezone: pe[d.currentCountry.value || "MY"] ?? pe.MY
1461
1615
  };
1462
- ((O = f.value) == null ? void 0 : O.campaign.type) === "VOUCHER" ? (o.value = fe(), await Promise.all([
1463
- y(
1464
- () => V.readAnalyticsOverview(e.params.id, {
1465
- ...S
1616
+ ((D = v.value) == null ? void 0 : D.campaign.type) === "VOUCHER" ? (o.value = ge(), await Promise.all([
1617
+ h(
1618
+ () => U.readAnalyticsOverview(e.params.id, {
1619
+ ...$
1466
1620
  })
1467
- ).then((b) => {
1468
- b.type === "VOUCHER" && (o.value = b);
1621
+ ).then((f) => {
1622
+ f.type === "VOUCHER" && (o.value = f);
1469
1623
  }).catch(() => {
1470
1624
  }),
1471
- y(
1472
- () => V.readAnalyticsTrend(e.params.id, S)
1473
- ).then((b) => R.value = b).catch(() => {
1625
+ h(
1626
+ () => U.readAnalyticsTrend(e.params.id, $)
1627
+ ).then((f) => w.value = f).catch(() => {
1474
1628
  })
1475
- ])) : ((x = f.value) == null ? void 0 : x.campaign.type) === "PROMOTION" ? (o.value = se(), await y(
1476
- () => V.readAnalyticsOverview(e.params.id, S)
1477
- ).then((b) => {
1478
- b.type === "PROMOTION" && (o.value = b);
1629
+ ])) : ((k = v.value) == null ? void 0 : k.campaign.type) === "PROMOTION" ? (o.value = se(), await h(
1630
+ () => U.readAnalyticsOverview(e.params.id, $)
1631
+ ).then((f) => {
1632
+ f.type === "PROMOTION" && (o.value = f);
1479
1633
  }).catch(() => {
1480
- })) : ((z = f.value) == null ? void 0 : z.campaign.type) === "MISSION" ? (o.value = re(), await y(
1481
- () => V.readAnalyticsOverview(e.params.id, S)
1482
- ).then((b) => {
1483
- b.type === "MISSION" && (o.value = b);
1634
+ })) : ((z = v.value) == null ? void 0 : z.campaign.type) === "MISSION" ? (o.value = re(), await h(
1635
+ () => U.readAnalyticsOverview(e.params.id, $)
1636
+ ).then((f) => {
1637
+ f.type === "MISSION" && (o.value = f);
1484
1638
  }).catch(() => {
1485
- })) : ((G = f.value) == null ? void 0 : G.campaign.type) === "GAME" ? (o.value = le(), await y(
1486
- () => V.readAnalyticsOverview(e.params.id, S)
1487
- ).then((b) => {
1488
- b.type === "GAME" && (o.value = b);
1639
+ })) : ((G = v.value) == null ? void 0 : G.campaign.type) === "GAME" ? (o.value = le(), await h(
1640
+ () => U.readAnalyticsOverview(e.params.id, $)
1641
+ ).then((f) => {
1642
+ f.type === "GAME" && (o.value = f);
1489
1643
  }).catch(() => {
1490
- })) : ((T = f.value) == null ? void 0 : T.campaign.type) === "COIN" ? (o.value = ne(), await y(
1491
- () => V.readAnalyticsOverview(e.params.id, S)
1492
- ).then((b) => {
1493
- b.type === "COIN" && (o.value = b);
1644
+ })) : ((T = v.value) == null ? void 0 : T.campaign.type) === "COIN" ? (o.value = ne(), await h(
1645
+ () => U.readAnalyticsOverview(e.params.id, $)
1646
+ ).then((f) => {
1647
+ f.type === "COIN" && (o.value = f);
1494
1648
  }).catch(() => {
1495
- })) : ((B = f.value) == null ? void 0 : B.campaign.type) === "POINT" ? (o.value = ie(), await y(
1496
- () => V.readAnalyticsOverview(e.params.id, S)
1497
- ).then((b) => {
1498
- b.type === "POINT" && (o.value = b);
1649
+ })) : ((N = v.value) == null ? void 0 : N.campaign.type) === "POINT" ? (o.value = oe(), await h(
1650
+ () => U.readAnalyticsOverview(e.params.id, $)
1651
+ ).then((f) => {
1652
+ f.type === "POINT" && (o.value = f);
1499
1653
  }).catch(() => {
1500
- })) : ((F = f.value) == null ? void 0 : F.campaign.type) === "CREDIT" && (o.value = oe(), await y(
1501
- () => V.readAnalyticsOverview(e.params.id, S)
1502
- ).then((b) => {
1503
- b.type === "CREDIT" && (o.value = b);
1654
+ })) : ((F = v.value) == null ? void 0 : F.campaign.type) === "CREDIT" && (o.value = ie(), await h(
1655
+ () => U.readAnalyticsOverview(e.params.id, $)
1656
+ ).then((f) => {
1657
+ f.type === "CREDIT" && (o.value = f);
1504
1658
  }).catch(() => {
1505
1659
  }));
1506
1660
  } catch {
1507
- p.value = !0;
1661
+ c.value = !0;
1508
1662
  }
1509
- }), (O, x) => {
1510
- var F, S, b, A, q, K, Y, ce;
1511
- const z = _("FmPill"), G = _("FmPageHead"), T = _("FmIcon"), B = _("FmCard");
1512
- return n(), v(E, null, [
1513
- I(G, {
1663
+ }), (D, k) => {
1664
+ var F, $, f, A, q, Q, X, ce, me, ue;
1665
+ const z = S("FmPill"), G = S("FmPageHead"), T = S("FmIcon"), N = S("FmCard");
1666
+ return r(), p(E, null, [
1667
+ P(G, {
1514
1668
  title: "Campaign analytic",
1515
1669
  "back-button": !0,
1516
- "onClick:back": x[0] || (x[0] = (Q) => l(s).back())
1670
+ "onClick:back": k[0] || (k[0] = (K) => n(s).back())
1517
1671
  }, {
1518
- title: $(() => [
1519
- a("div", Gt, [
1520
- x[1] || (x[1] = a("span", { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2" }, " Campaign analytic ", -1)),
1521
- I(z, { variant: "beta" })
1672
+ title: L(() => [
1673
+ a("div", na, [
1674
+ k[1] || (k[1] = a("span", { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2" }, " Campaign analytic ", -1)),
1675
+ P(z, { variant: "beta" })
1522
1676
  ])
1523
1677
  ]),
1524
1678
  _: 1
1525
1679
  }),
1526
- a("div", Ht, [
1527
- l(p) ? (n(), h(B, {
1680
+ a("div", oa, [
1681
+ n(c) ? (r(), g(N, {
1528
1682
  key: 0,
1529
1683
  variant: "outlined",
1530
1684
  class: "flex flex-col items-center justify-center text-center py-80 px-40 gap-8"
1531
1685
  }, {
1532
- default: $(() => [
1533
- I(T, {
1686
+ default: L(() => [
1687
+ P(T, {
1534
1688
  name: "error",
1535
1689
  outline: "",
1536
1690
  size: "lg",
1537
1691
  class: "text-fm-color-neutral-gray-300"
1538
1692
  }),
1539
- x[2] || (x[2] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Could not load this campaign ", -1)),
1540
- x[3] || (x[3] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, " The campaign may have been deleted, or the link is no longer valid. ", -1))
1693
+ k[2] || (k[2] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Could not load this campaign ", -1)),
1694
+ k[3] || (k[3] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, " The campaign may have been deleted, or the link is no longer valid. ", -1))
1541
1695
  ]),
1542
1696
  _: 1
1543
- })) : l(d) ? (n(), v(E, { key: 1 }, [
1544
- I(Xe, {
1545
- "campaign-name": l(d).name,
1546
- "dates-label": l(be),
1547
- status: l(ve),
1548
- "mechanic-label": (F = l(U)) == null ? void 0 : F.label,
1549
- icon: (S = l(U)) == null ? void 0 : S.icon,
1550
- objective: (b = l(U)) == null ? void 0 : b.objective,
1551
- "report-range-label": (A = l(k)) == null ? void 0 : A.reportRangeLabel,
1552
- "audience-label": (q = l(k)) == null ? void 0 : q.audienceLabel
1697
+ })) : n(y) ? (r(), p(E, { key: 1 }, [
1698
+ P(at, {
1699
+ "campaign-name": n(y).name,
1700
+ "dates-label": n(fe),
1701
+ status: n(he),
1702
+ "mechanic-label": (F = n(I)) == null ? void 0 : F.label,
1703
+ icon: ($ = n(I)) == null ? void 0 : $.icon,
1704
+ objective: (f = n(I)) == null ? void 0 : f.objective,
1705
+ "report-range-label": (A = n(x)) == null ? void 0 : A.reportRangeLabel,
1706
+ "audience-label": (q = n(x)) == null ? void 0 : q.audienceLabel
1553
1707
  }, null, 8, ["campaign-name", "dates-label", "status", "mechanic-label", "icon", "objective", "report-range-label", "audience-label"]),
1554
- l(L) ? (n(), h(B, {
1708
+ n(C) ? (r(), g(N, {
1555
1709
  key: 0,
1556
1710
  variant: "outlined",
1557
1711
  class: "flex flex-col items-center justify-center text-center py-80 px-40 gap-8"
1558
1712
  }, {
1559
- default: $(() => [
1560
- I(T, {
1713
+ default: L(() => [
1714
+ P(T, {
1561
1715
  name: "wrong_location",
1562
1716
  outline: "",
1563
1717
  size: "lg",
1564
1718
  class: "text-fm-color-neutral-gray-300"
1565
1719
  }),
1566
- x[4] || (x[4] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " This campaign does not belong here ", -1)),
1567
- a("div", Kt, " It is a " + u(l(d).type) + " campaign. Open it from its own campaign list to see the right report. ", 1)
1720
+ k[4] || (k[4] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " This campaign does not belong here ", -1)),
1721
+ a("div", ia, " It is a " + u(n(y).type) + " campaign. Open it from its own campaign list to see the right report. ", 1)
1568
1722
  ]),
1569
1723
  _: 1
1570
- })) : l(U) ? ((K = l(M)) == null ? void 0 : K.state) === "empty" ? (n(), h(B, {
1724
+ })) : n(I) ? ((Q = n(M)) == null ? void 0 : Q.state) === "empty" ? (r(), g(N, {
1571
1725
  key: 2,
1572
1726
  variant: "outlined",
1573
1727
  class: "flex flex-col items-center justify-center text-center py-80 px-40 gap-8"
1574
1728
  }, {
1575
- default: $(() => [
1576
- I(T, {
1729
+ default: L(() => [
1730
+ P(T, {
1577
1731
  name: "inbox",
1578
1732
  outline: "",
1579
1733
  size: "lg",
1580
1734
  class: "text-fm-color-neutral-gray-300"
1581
1735
  }),
1582
- x[6] || (x[6] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Campaign activity has not started ", -1)),
1583
- x[7] || (x[7] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, " Performance data will appear after members enter the campaign. ", -1))
1736
+ k[6] || (k[6] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Campaign activity has not started ", -1)),
1737
+ k[7] || (k[7] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, " Performance data will appear after members enter the campaign. ", -1))
1584
1738
  ]),
1585
1739
  _: 1
1586
- })) : l(k) ? (n(), v(E, { key: 3 }, [
1587
- l(d).type === "COIN" || l(d).type === "POINT" || l(d).type === "CREDIT" ? (n(), v("section", Qt, [
1740
+ })) : n(x) ? (r(), p(E, { key: 3 }, [
1741
+ n(y).type === "COIN" || n(y).type === "POINT" || n(y).type === "CREDIT" ? (r(), p("section", ma, [
1588
1742
  a("div", null, [
1589
- a("div", Xt, u((Y = l(U)) == null ? void 0 : Y.label) + " distribution summary ", 1)
1743
+ a("div", ua, u((X = n(I)) == null ? void 0 : X.label) + " distribution summary ", 1)
1590
1744
  ]),
1591
- I(te, {
1592
- cards: l(k).cards
1745
+ P(te, {
1746
+ cards: n(x).cards
1593
1747
  }, null, 8, ["cards"])
1594
- ])) : g("", !0),
1595
- l(d).type === "MISSION" ? (n(), v("section", Jt, [
1596
- x[8] || (x[8] = a("div", null, [
1748
+ ])) : b("", !0),
1749
+ n(y).type === "MISSION" ? (r(), p("section", da, [
1750
+ k[8] || (k[8] = a("div", null, [
1597
1751
  a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Mission participation and completion "),
1598
1752
  a("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary mt-4" }, " Campaign-lifetime member activity and completion ")
1599
1753
  ], -1)),
1600
- I(te, {
1601
- cards: l(k).cards
1754
+ P(te, {
1755
+ cards: n(x).cards
1602
1756
  }, null, 8, ["cards"])
1603
- ])) : g("", !0),
1604
- l(k).applicationMix ? (n(), h(dt, {
1757
+ ])) : b("", !0),
1758
+ n(x).applicationMix ? (r(), g(ht, {
1605
1759
  key: 2,
1606
- mix: l(k).applicationMix
1607
- }, null, 8, ["mix"])) : l(d).type !== "MISSION" && l(k).funnel.length ? (n(), h(_t, {
1760
+ mix: n(x).applicationMix
1761
+ }, null, 8, ["mix"])) : n(y).type !== "MISSION" && n(x).funnel.length ? (r(), g(Ut, {
1608
1762
  key: 3,
1609
- stages: l(k).funnel
1610
- }, null, 8, ["stages"])) : g("", !0),
1611
- l(d).type !== "MISSION" && l(d).type !== "COIN" && l(d).type !== "POINT" && l(d).type !== "CREDIT" && l(k).cards.length ? (n(), h(te, {
1763
+ stages: n(x).funnel,
1764
+ headline: n(x).funnelHeadline,
1765
+ summary: n(x).funnelSummary,
1766
+ "primary-label": n(x).funnelPrimaryLabel,
1767
+ "secondary-stages": (ce = n(x).funnelSecondary) == null ? void 0 : ce.stages,
1768
+ "secondary-label": (me = n(x).funnelSecondary) == null ? void 0 : me.label
1769
+ }, null, 8, ["stages", "headline", "summary", "primary-label", "secondary-stages", "secondary-label"])) : b("", !0),
1770
+ n(y).type !== "MISSION" && n(y).type !== "COIN" && n(y).type !== "POINT" && n(y).type !== "CREDIT" && n(x).cards.length ? (r(), g(te, {
1612
1771
  key: 4,
1613
- cards: l(k).cards
1614
- }, null, 8, ["cards"])) : g("", !0),
1615
- l(k).trend.length ? (n(), h(Dt, {
1772
+ cards: n(x).cards
1773
+ }, null, 8, ["cards"])) : b("", !0),
1774
+ n(x).trend.length ? (r(), g(Ht, {
1616
1775
  key: 5,
1617
- modes: l(k).trend
1618
- }, null, 8, ["modes"])) : g("", !0),
1619
- (ce = l(k).breakdowns) != null && ce.length ? (n(!0), v(E, { key: 6 }, ee(l(k).breakdowns, (Q) => (n(), h(de, {
1620
- key: Q.title,
1621
- breakdown: Q.breakdown,
1622
- title: Q.title,
1623
- "empty-message": Q.emptyMessage
1624
- }, null, 8, ["breakdown", "title", "empty-message"]))), 128)) : (n(), h(de, {
1776
+ modes: n(x).trend
1777
+ }, null, 8, ["modes"])) : b("", !0),
1778
+ (ue = n(x).breakdowns) != null && ue.length ? (r(!0), p(E, { key: 6 }, Z(n(x).breakdowns, (K) => (r(), g(ye, {
1779
+ key: K.title,
1780
+ breakdown: K.breakdown,
1781
+ title: K.title,
1782
+ "empty-message": K.emptyMessage,
1783
+ note: K.note
1784
+ }, null, 8, ["breakdown", "title", "empty-message", "note"]))), 128)) : (r(), g(ye, {
1625
1785
  key: 7,
1626
- breakdown: l(k).breakdown
1786
+ breakdown: n(x).breakdown
1627
1787
  }, null, 8, ["breakdown"])),
1628
- l(k).outcomes.length ? (n(), h(pe, {
1788
+ n(x).outcomes.length ? (r(), g(be, {
1629
1789
  key: 8,
1630
- title: l(d).type === "MISSION" || l(d).type === "GAME" ? "Reward activity" : "Business outcome",
1631
- caption: l(d).type === "MISSION" || l(d).type === "GAME" ? "Reward issuance attributed to this campaign" : "Financial and loyalty outcomes attributed to this campaign",
1632
- items: l(k).outcomes,
1790
+ title: n(y).type === "MISSION" || n(y).type === "GAME" ? "Reward activity" : "Business outcome",
1791
+ caption: n(y).type === "MISSION" || n(y).type === "GAME" ? "Reward issuance attributed to this campaign" : "Financial and loyalty outcomes attributed to this campaign",
1792
+ items: n(x).outcomes,
1633
1793
  variant: "tile"
1634
- }, null, 8, ["title", "caption", "items"])) : g("", !0),
1635
- I(pe, {
1794
+ }, null, 8, ["title", "caption", "items"])) : b("", !0),
1795
+ P(be, {
1636
1796
  title: "Metric definitions",
1637
1797
  caption: "Hover a metric for its denominator and attribution method",
1638
- items: l(k).metrics,
1798
+ items: n(x).metrics,
1639
1799
  variant: "row"
1640
1800
  }, null, 8, ["items"])
1641
- ], 64)) : g("", !0) : (n(), h(B, {
1801
+ ], 64)) : b("", !0) : (r(), g(N, {
1642
1802
  key: 1,
1643
1803
  variant: "outlined",
1644
1804
  class: "flex flex-col items-center justify-center text-center py-80 px-40 gap-8"
1645
1805
  }, {
1646
- default: $(() => [
1647
- I(T, {
1806
+ default: L(() => [
1807
+ P(T, {
1648
1808
  name: "query_stats",
1649
1809
  outline: "",
1650
1810
  size: "lg",
1651
1811
  class: "text-fm-color-neutral-gray-300"
1652
1812
  }),
1653
- x[5] || (x[5] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Analytic is not available for this campaign type ", -1)),
1654
- a("div", Yt, " Reporting has not been defined for " + u(l(d).type) + " campaigns yet. ", 1)
1813
+ k[5] || (k[5] = a("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Analytic is not available for this campaign type ", -1)),
1814
+ a("div", ca, " Reporting has not been defined for " + u(n(y).type) + " campaigns yet. ", 1)
1655
1815
  ]),
1656
1816
  _: 1
1657
1817
  }))
1658
- ], 64)) : g("", !0)
1818
+ ], 64)) : b("", !0)
1659
1819
  ])
1660
1820
  ], 64);
1661
1821
  };
1662
1822
  }
1663
1823
  });
1664
1824
  export {
1665
- oa as default
1825
+ _a as default
1666
1826
  };