@feedmepos/mf-connect 0.1.98-beta.71 → 0.1.98-beta.73

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 (117) hide show
  1. package/dist/{App-B-Onur9k.js → App-C4XD_vWL.js} +8 -8
  2. package/dist/{AuditLogs-BnEeKG1C.js → AuditLogs-DpevHGsA.js} +11 -11
  3. package/dist/{Bin-BH9_nATR.js → Bin-FRrYZ8pV.js} +8 -8
  4. package/dist/{Broadcast-Gt2ZLLpZ.js → Broadcast-CoefxWt-.js} +91 -90
  5. package/dist/{CampaignAnalytic-BT6zTgNk.js → CampaignAnalytic-CdZjzsLr.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQOLEDzY.js} +6 -6
  7. package/dist/{Card-dD52oor7.js → Card-BABL96V6.js} +21 -21
  8. package/dist/{Collections-7bwYNl3M.js → Collections-D6XuhBO1.js} +8 -8
  9. package/dist/{Credit-qZdlqXqR.js → Credit-D2WTeN8Z.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B0KkvFWi.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-G2oU70Ef.js} +847 -734
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js → EffectSheet.vue_vue_type_style_index_0_lang-C4RByg0k.js} +6 -6
  13. package/dist/{Experience-CAaWgWXP.js → Experience-CUqmspwT.js} +12 -12
  14. package/dist/{FileSaver.min-BpfY6VnX.js → FileSaver.min-DX17A8Gj.js} +1 -1
  15. package/dist/{Game-fhrbFb_5.js → Game-D8IvyDdA.js} +13 -13
  16. package/dist/{GiftCardSetup-CTwmNKim.js → GiftCardSetup-BOSKBH8c.js} +10 -10
  17. package/dist/{Grab-BnPfb92x.js → Grab-CnBGt_H2.js} +9 -9
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js → ImageInput.vue_vue_type_script_setup_true_lang-BI00YCKv.js} +1 -1
  19. package/dist/{Index-DRwvmm_j.js → Index-BovDOTbf.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js → LocationPicker.vue_vue_type_script_setup_true_lang-D8auavm7.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BM99IoIG.js} +1 -1
  22. package/dist/{LoyaltyDashboard-8jn6SIWo.js → LoyaltyDashboard-DiCQnQ76.js} +13 -13
  23. package/dist/{MainLayout-Bf42AcB1.js → MainLayout-Cg37dK-P.js} +3 -3
  24. package/dist/{Marketing-DruTMjiR.js → Marketing-DRCT9dBo.js} +4 -4
  25. package/dist/{MarketingMaterialEdit-moEHd_gP.js → MarketingMaterialEdit-DcE0A8_A.js} +6 -6
  26. package/dist/{Member-C9VTQqIm.js → Member-C8T1-ywK.js} +7 -7
  27. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CTl8LtJ9.js} +23 -23
  28. package/dist/{MemberImportHistory-DZVwya9v.js → MemberImportHistory-CYCxxxN7.js} +7 -7
  29. package/dist/{MemberList-KusIfy1u.js → MemberList-Ddlnm4JX.js} +14 -14
  30. package/dist/{MemberTransactions-msyjdzlI.js → MemberTransactions-DwyZTeZb.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js → MessageInput.vue_vue_type_script_setup_true_lang-BWCxGlQO.js} +10 -10
  32. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-LdVeH7gh.js} +1 -1
  33. package/dist/{Mission-CUUxpBUF.js → Mission-CW0y8Bzw.js} +13 -13
  34. package/dist/{Overview-C9jyKXHX.js → Overview-CO4T3l6l.js} +19 -19
  35. package/dist/{Overview-CYKoF8Hp.js → Overview-i2XPL7Pu.js} +4 -4
  36. package/dist/{Point-CPpQ07yp.js → Point-CNWdfqQZ.js} +12 -12
  37. package/dist/{Promotion-CJ95m9Qb.js → Promotion-DAemCP79.js} +13 -13
  38. package/dist/{Queue-CX39ILh_.js → Queue-DI50gMny.js} +11 -11
  39. package/dist/{Record-6I0qyXB5.js → Record-DX3WHXku.js} +9 -9
  40. package/dist/{Review-DoWu2XNT.js → Review-DzSNG4Le.js} +2 -2
  41. package/dist/{ReviewFacebookCallback-Co-5TnI7.js → ReviewFacebookCallback-CrdRUN3t.js} +5 -5
  42. package/dist/{ReviewGoogleCallback-Ca7ZuMcF.js → ReviewGoogleCallback-Da28WNzU.js} +5 -5
  43. package/dist/{Reward-Cx_N6qBJ.js → Reward-DUQAE99I.js} +16 -16
  44. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js → RewardGroup.vue_vue_type_script_setup_true_lang-BGAOPkwD.js} +12 -12
  45. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js → RuleGroup.vue_vue_type_script_setup_true_lang-B9Dbe9no.js} +13 -13
  46. package/dist/{Segment-Bx0EW966.js → Segment-BgVf2-G2.js} +24 -24
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDLXF5HM.js} +13 -13
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-9UiH43em.js} +4 -4
  49. package/dist/{Setting-DzEK3dWj.js → Setting-3jW6EbKA.js} +14 -14
  50. package/dist/{SettingAdvertisements-BNALbI88.js → SettingAdvertisements-C40QcuSn.js} +12 -12
  51. package/dist/{Settings-Cw85-xzq.js → Settings-DT9bypKs.js} +5 -5
  52. package/dist/{Store-BSqW1gwf.js → Store-DQyOUfEJ.js} +25 -25
  53. package/dist/{StoreRewards-CJXnS8Qf.js → StoreRewards-Dr_c0PbO.js} +15 -15
  54. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bh5h8Lc_.js} +24 -24
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-LquvtnTy.js} +2 -2
  56. package/dist/{Tier-DfitNxp2.js → Tier-DmqfEWcB.js} +25 -25
  57. package/dist/{Title-QCbtOvKB.js → Title-Dx6pcJfP.js} +21 -21
  58. package/dist/{Transaction-dOCzlidD.js → Transaction-CD6agt6m.js} +2 -2
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CNjBtitb.js} +6 -6
  60. package/dist/{Voucher-BfoCDwjg.js → Voucher-P4dyOeUd.js} +14 -14
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Bv--fzY0.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bq_7U0NO.js} +2 -2
  63. package/dist/{app-BxTElIm-.js → app-CmqX1V1B.js} +1370 -1335
  64. package/dist/app.js +1 -1
  65. package/dist/{base.export-BmUK8hMh.js → base.export-guVE-B2c.js} +2 -2
  66. package/dist/{business-DjAiT8tR.js → business-DXmGtwPm.js} +1 -1
  67. package/dist/{campaign-tAmQNoq7.js → campaign-CVXbgs-y.js} +2 -2
  68. package/dist/{campaign-DlR3KF9m.js → campaign-D9Jufumh.js} +157 -125
  69. package/dist/{campaign.enum-BjwEQd11.js → campaign.enum-CXhYMbkx.js} +1 -1
  70. package/dist/{campaign.fn-C6kWWIQx.js → campaign.fn-DoJPn6yl.js} +23 -23
  71. package/dist/{collectible.enum-BrtXpT9S.js → collectible.enum-Tk6LIMMm.js} +1 -1
  72. package/dist/{collection.fn-CDhfM3Eq.js → collection.fn-DCVNYQau.js} +2 -2
  73. package/dist/{currency-10nX5QnT.js → currency-BYhkCI6F.js} +1 -1
  74. package/dist/{duplicateCampaign-6oMZOvfM.js → duplicateCampaign-BOVBZHFs.js} +2 -2
  75. package/dist/{effect-T4YzuTc5.js → effect-e6wYWgc8.js} +1 -1
  76. package/dist/{email-addresses-BjODnJMM.js → email-addresses-Dcd_vAeM.js} +2 -2
  77. package/dist/{helper-BCl5r5yZ.js → helper-DluoQ6zi.js} +1 -1
  78. package/dist/{index-Bz6oSli7.js → index-2QCDTrA9.js} +2 -2
  79. package/dist/{index-BBsK7TUw.js → index-BAs9N7bi.js} +3 -3
  80. package/dist/{index-C5IfNJUl.js → index-BFzBAm6P.js} +1 -1
  81. package/dist/{index-CnaQt4Pn.js → index-BpAhyOgv.js} +1 -1
  82. package/dist/{index-BxU--5J5.js → index-C-oypk0K.js} +3 -3
  83. package/dist/{index-BQk6zTgf.js → index-C9JY8Ru6.js} +2 -2
  84. package/dist/{index-DJdTDF9C.js → index-CBRWvjup.js} +7 -7
  85. package/dist/{index-CRvUvCMA.js → index-CDdNExzM.js} +1 -1
  86. package/dist/{index-BiolIgqR.js → index-ChYMoLaB.js} +1 -1
  87. package/dist/{index-Bht1Z11w.js → index-CiJQlOu7.js} +7 -7
  88. package/dist/{index-Ctja--IE.js → index-DB51l5yi.js} +1 -1
  89. package/dist/{index-Bd4clHfr.js → index-DIP_uzZm.js} +5 -5
  90. package/dist/{index-BeVWchv7.js → index-DKrJlWH3.js} +1124 -1124
  91. package/dist/{index-DhtKt4OL.js → index-DoiGG41P.js} +3 -3
  92. package/dist/{index-DeQKLilv.js → index-SQItAw7w.js} +3 -3
  93. package/dist/{index-D8rGhchh.js → index-SS72WJs_.js} +1 -1
  94. package/dist/{index-DXiJa8Cw.js → index-kPcRcSFx.js} +2 -2
  95. package/dist/{index-B9ZMIUMa.js → index-qkkPuNFM.js} +5 -5
  96. package/dist/{index.esm2017-CEOegJjn.js → index.esm2017-BLVWhb4f.js} +1 -1
  97. package/dist/{loading-Dx4SCvZY.js → loading-ClX4Z1ZH.js} +1 -1
  98. package/dist/{lodash-Dq8OKCKK.js → lodash-Cxh2BWuW.js} +1 -1
  99. package/dist/{member-import-DX-jn2uk.js → member-import-DKfSDn0D.js} +1 -1
  100. package/dist/{membership-CltAa-gH.js → membership-BBAosVNQ.js} +3 -3
  101. package/dist/{money-DsaAjJTI.js → money-CWzvdiFT.js} +1 -1
  102. package/dist/{number-DmhHKYgY.js → number-Cp7TGBzd.js} +1 -1
  103. package/dist/{objectid-BdNv-dZX.js → objectid-CXWfUmP_.js} +9 -9
  104. package/dist/{plugins-BFKVM3uC.js → plugins-BKD6oEHa.js} +3 -3
  105. package/dist/{reward--SjvIeyy.js → reward-CrjStT4w.js} +1 -1
  106. package/dist/{rule-CAKdNobZ.js → rule-CBZRptRM.js} +8 -8
  107. package/dist/{template-Cfxc5eM8.js → template-D4qWK9tk.js} +6 -6
  108. package/dist/{timezone-D2b-V5XD.js → timezone-t0WxSk3e.js} +1 -1
  109. package/dist/{transaction.fn-B5mLY7bz.js → transaction.fn-DZp6Drqf.js} +2 -2
  110. package/dist/{trigger-DvYcjRBZ.js → trigger-DN5yeimJ.js} +5 -5
  111. package/dist/{useMarketingMaterialActions-DtqnjMSt.js → useMarketingMaterialActions-ChkZyyRO.js} +3 -3
  112. package/dist/{usePagination-DKX24g31.js → usePagination-Vda9U5Dh.js} +1 -1
  113. package/dist/{user-fWb1NxGO.js → user-jEjTV3E6.js} +1 -1
  114. package/dist/{vue-i18n-wJReAVJw.js → vue-i18n-Bg_RJ_GV.js} +482 -482
  115. package/dist/{xlsx-Mthhu4JR.js → xlsx-unW4U5Tx.js} +440 -440
  116. package/dist/{zod-CVpVUgBZ.js → zod-DIsCEUuE.js} +1 -1
  117. package/package.json +1 -1
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { F as e, i as o, r as p } from "./app-BxTElIm-.js";
2
+ import { F as e, i as o, r as p } from "./app-CmqX1V1B.js";
3
3
  export {
4
4
  e as FmApp,
5
5
  o as i18nMessages,
@@ -1,8 +1,8 @@
1
1
  var w = Object.defineProperty;
2
2
  var y = (e, s, o) => s in e ? w(e, s, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[s] = o;
3
3
  var n = (e, s, o) => y(e, typeof s != "symbol" ? s + "" : s, o);
4
- import { u as x } from "./loading-Dx4SCvZY.js";
5
- import { w as h, u as a } from "./xlsx-Mthhu4JR.js";
4
+ import { u as x } from "./loading-ClX4Z1ZH.js";
5
+ import { w as h, u as a } from "./xlsx-unW4U5Tx.js";
6
6
  const t = {
7
7
  sortBy: "_id",
8
8
  descending: !1,
@@ -1,7 +1,7 @@
1
1
  import { ref as i, computed as u } from "vue";
2
2
  import { defineStore as w } from "pinia";
3
3
  import { useCoreStore as y } from "@feedmepos/mf-common";
4
- import { d as I, g as r, A as b, S, b as D } from "./index-BQk6zTgf.js";
4
+ import { d as I, g as r, A as b, S, b as D } from "./index-C9JY8Ru6.js";
5
5
  const $ = {
6
6
  async readSettings(e) {
7
7
  try {
@@ -1,7 +1,7 @@
1
1
  import { defineStore as d } from "pinia";
2
2
  import { reactive as b, onMounted as f, ref as s } from "vue";
3
- import { c } from "./index-Bz6oSli7.js";
4
- import { g as i, S as g, b as h } from "./index-BQk6zTgf.js";
3
+ import { c } from "./index-2QCDTrA9.js";
4
+ import { g as i, S as g, b as h } from "./index-C9JY8Ru6.js";
5
5
  const p = () => {
6
6
  const e = g.getBusinessId();
7
7
  if (!e) throw new Error("Invalid business ID");
@@ -1,27 +1,27 @@
1
- import { h as s } from "./moment-D7p2TMB-.js";
2
- import "./index-Bd4clHfr.js";
3
- import { e as l } from "./effect-T4YzuTc5.js";
4
- import { components as h } from "@feedmepos/ui-library";
5
- import { a as C } from "./index-DJdTDF9C.js";
6
- import { c as O } from "./rule-CAKdNobZ.js";
7
- import { u as b } from "./business-DjAiT8tR.js";
8
- import { C as i } from "./campaign.fn-C6kWWIQx.js";
9
- import { t as y } from "./index-BeVWchv7.js";
10
- import { c as d } from "./string-Gcy5IM_H.js";
11
- import { i as f } from "./plugins-BFKVM3uC.js";
1
+ import { h as u } from "./moment-D7p2TMB-.js";
2
+ import "./index-DIP_uzZm.js";
3
+ import { e as l } from "./effect-e6wYWgc8.js";
4
+ import { components as d } from "@feedmepos/ui-library";
5
+ import { a as E } from "./index-CBRWvjup.js";
6
+ import { c as N } from "./rule-CBZRptRM.js";
7
+ import { u as I } from "./business-DXmGtwPm.js";
8
+ import { C as m } from "./campaign.fn-DoJPn6yl.js";
9
+ import { g as y, t as h } from "./index-DKrJlWH3.js";
10
+ import { c as C } from "./string-Gcy5IM_H.js";
11
+ import { i as f } from "./plugins-BKD6oEHa.js";
12
12
  import { h as p } from "vue";
13
- import { F as c } from "./campaign.enum-BjwEQd11.js";
14
- const E = [
13
+ import { F as s } from "./campaign.enum-CXhYMbkx.js";
14
+ const R = [
15
15
  "APP_INBOX",
16
16
  "PUSH",
17
17
  "SMS",
18
18
  "EMAIL",
19
19
  "WHATSAPP"
20
- ], N = [...E];
21
- function G(t) {
22
- return N.includes(t);
20
+ ], S = [...R];
21
+ function j(t) {
22
+ return S.includes(t);
23
23
  }
24
- function I(t, e) {
24
+ function O(t, e) {
25
25
  return t === "APP_INBOX" ? {
26
26
  title: "",
27
27
  previewText: "",
@@ -40,17 +40,17 @@ function I(t, e) {
40
40
  variables: e
41
41
  };
42
42
  }
43
- function j(t, e, n = []) {
43
+ function V(t, e, n = []) {
44
44
  return t.channels.includes(e) ? t : {
45
45
  ...t,
46
46
  channels: [...t.channels, e],
47
47
  content: {
48
48
  ...t.content,
49
- [e]: t.content[e] ?? I(e, n)
49
+ [e]: t.content[e] ?? O(e, n)
50
50
  }
51
51
  };
52
52
  }
53
- function V(t, e) {
53
+ function X(t, e) {
54
54
  const n = { ...t.content };
55
55
  return delete n[e], {
56
56
  ...t,
@@ -58,218 +58,250 @@ function V(t, e) {
58
58
  content: n
59
59
  };
60
60
  }
61
- function k(t, e, n) {
61
+ function z(t, e, n) {
62
62
  return {
63
63
  ...t,
64
64
  content: { ...t.content, [e]: n }
65
65
  };
66
66
  }
67
- function z(t, e, n) {
68
- const o = t.channels.indexOf(e), m = o + n;
69
- if (o < 0 || m < 0 || m >= t.channels.length) return t;
70
- const u = [...t.channels];
71
- return [u[o], u[m]] = [u[m], u[o]], { ...t, channels: u };
67
+ function W(t, e, n) {
68
+ const o = t.channels.indexOf(e), a = o + n;
69
+ if (o < 0 || a < 0 || a >= t.channels.length) return t;
70
+ const r = [...t.channels];
71
+ return [r[o], r[a]] = [r[a], r[o]], { ...t, channels: r };
72
72
  }
73
- function X(t, e) {
73
+ function J(t, e, n = []) {
74
+ const [o, ...a] = t.channels;
75
+ if (o === e) return t;
76
+ const r = {
77
+ ...t.content,
78
+ [e]: t.content[e] ?? O(e, n)
79
+ };
80
+ return o && delete r[o], {
81
+ ...t,
82
+ channels: [e, ...a.filter((b) => b !== e)],
83
+ content: r
84
+ };
85
+ }
86
+ function K(t, e) {
87
+ if (!e) return !1;
88
+ const n = t.content[e];
89
+ return n ? ["title", "previewText", "content", "body"].some(
90
+ (o) => typeof n[o] == "string" && !!n[o].trim()
91
+ ) : !1;
92
+ }
93
+ function q(t, e) {
74
94
  return { ...t, mode: e };
75
95
  }
76
- function W(t, e) {
96
+ function Q(t, e) {
77
97
  const n = t.content[e];
78
98
  if (!n) return !1;
79
99
  if (e === "APP_INBOX") {
80
- const o = n;
81
- return o.title.trim().length > 0 && o.previewText.trim().length > 0;
100
+ const o = n, a = (o.buttons ?? []).every(
101
+ (r) => r.label.trim().length > 0 && y.safeParse(r.url ?? "").success
102
+ );
103
+ return o.title.trim().length > 0 && o.previewText.trim().length > 0 && a;
82
104
  }
83
105
  if (e === "PUSH") {
84
- const o = n;
85
- return o.title.trim().length > 0 && o.body.trim().length > 0;
106
+ const o = n, a = o.title.trim().length > 0 && o.body.trim().length > 0, r = o.destination !== "EXTERNAL" || y.safeParse(o.url ?? "").success;
107
+ return a && r;
86
108
  }
87
109
  return n.content.trim().length > 0;
88
110
  }
89
- function R(t, e) {
111
+ function A(t, e) {
90
112
  return t.channels.map(e).join(t.mode === "fallback" ? " → " : " + ");
91
113
  }
92
- const a = f.global.t;
93
- function S() {
114
+ function Z(t) {
115
+ var e, n;
116
+ if (!(!t || t.delivery)) {
117
+ if ((n = (e = t.message) == null ? void 0 : e.content) != null && n.trim()) {
118
+ t.delivery = h(t);
119
+ return;
120
+ }
121
+ delete t.message, t.delivery = { mode: "fallback", channels: [], content: {} };
122
+ }
123
+ }
124
+ const c = f.global.t;
125
+ function D() {
94
126
  const t = f.global.locale;
95
127
  return typeof t == "string" ? t : t.value;
96
128
  }
97
129
  function g(t) {
98
- return new Intl.DateTimeFormat(S(), {
130
+ return new Intl.DateTimeFormat(D(), {
99
131
  day: "2-digit",
100
132
  month: "short",
101
133
  year: "numeric"
102
134
  }).format(new Date(t));
103
135
  }
104
- function r(t) {
136
+ function i(t) {
105
137
  return p(
106
138
  "div",
107
139
  {
108
140
  class: `${t.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
109
141
  },
110
142
  [
111
- p(h.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
143
+ p(d.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
112
144
  p("span", { class: "fm-typo-en-body-md-600" }, t.name)
113
145
  ]
114
146
  );
115
147
  }
116
- const J = {
117
- [c.enum.CREDIT]: {
148
+ const tt = {
149
+ [s.enum.CREDIT]: {
118
150
  chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
119
151
  icon: "local_activity",
120
152
  get name() {
121
- return a("connect.campaign.common.typeName.CREDIT");
153
+ return c("connect.campaign.common.typeName.CREDIT");
122
154
  },
123
155
  chip() {
124
- return r(this);
156
+ return i(this);
125
157
  }
126
158
  },
127
- [c.enum.PROMOTION]: {
159
+ [s.enum.PROMOTION]: {
128
160
  chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
129
161
  icon: "loyalty",
130
162
  get name() {
131
- return a("connect.campaign.common.typeName.PROMOTION");
163
+ return c("connect.campaign.common.typeName.PROMOTION");
132
164
  },
133
165
  chip() {
134
- return r(this);
166
+ return i(this);
135
167
  }
136
168
  },
137
- [c.enum.VOUCHER]: {
169
+ [s.enum.VOUCHER]: {
138
170
  chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
139
171
  icon: "sell",
140
172
  get name() {
141
- return a("connect.campaign.common.typeName.VOUCHER");
173
+ return c("connect.campaign.common.typeName.VOUCHER");
142
174
  },
143
175
  chip() {
144
- return r(this);
176
+ return i(this);
145
177
  }
146
178
  },
147
- [c.enum.POINT]: {
179
+ [s.enum.POINT]: {
148
180
  chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
149
181
  icon: "award_star",
150
182
  get name() {
151
- return a("connect.campaign.common.typeName.POINT");
183
+ return c("connect.campaign.common.typeName.POINT");
152
184
  },
153
185
  chip() {
154
- return r(this);
186
+ return i(this);
155
187
  }
156
188
  },
157
- [c.enum.BROADCAST]: {
189
+ [s.enum.BROADCAST]: {
158
190
  chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
159
191
  icon: "campaign",
160
192
  get name() {
161
- return a("connect.campaign.common.typeName.BROADCAST");
193
+ return c("connect.campaign.common.typeName.BROADCAST");
162
194
  },
163
195
  chip() {
164
- return r(this);
196
+ return i(this);
165
197
  }
166
198
  },
167
- [c.enum.GAME]: {
199
+ [s.enum.GAME]: {
168
200
  chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
169
201
  icon: "database",
170
202
  get name() {
171
- return a("connect.campaign.common.typeName.GAME");
203
+ return c("connect.campaign.common.typeName.GAME");
172
204
  },
173
205
  chip() {
174
- return r(this);
206
+ return i(this);
175
207
  }
176
208
  },
177
- [c.enum.REWARD_POOL]: {
209
+ [s.enum.REWARD_POOL]: {
178
210
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
179
211
  icon: "editor_choice",
180
212
  get name() {
181
- return a("connect.campaign.common.typeName.REWARD_POOL");
213
+ return c("connect.campaign.common.typeName.REWARD_POOL");
182
214
  },
183
215
  chip() {
184
- return r(this);
216
+ return i(this);
185
217
  }
186
218
  },
187
- [c.enum.COIN]: {
219
+ [s.enum.COIN]: {
188
220
  chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
189
221
  icon: "monetization_on",
190
222
  get name() {
191
- return a("connect.campaign.common.typeName.COIN");
223
+ return c("connect.campaign.common.typeName.COIN");
192
224
  },
193
225
  chip() {
194
- return r(this);
226
+ return i(this);
195
227
  }
196
228
  },
197
- [c.enum.MEMBERSHIP]: {
229
+ [s.enum.MEMBERSHIP]: {
198
230
  chipClass: "",
199
231
  icon: "",
200
232
  get name() {
201
- return a("connect.campaign.common.typeName.MEMBERSHIP");
233
+ return c("connect.campaign.common.typeName.MEMBERSHIP");
202
234
  },
203
235
  chip() {
204
- return r(this);
236
+ return i(this);
205
237
  }
206
238
  },
207
- [c.enum.MISSION]: {
239
+ [s.enum.MISSION]: {
208
240
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
209
241
  icon: "editor_choice",
210
242
  get name() {
211
- return a("connect.campaign.common.typeName.MISSION");
243
+ return c("connect.campaign.common.typeName.MISSION");
212
244
  },
213
245
  chip() {
214
- return r(this);
246
+ return i(this);
215
247
  }
216
248
  },
217
- [c.enum.GRAB]: {
249
+ [s.enum.GRAB]: {
218
250
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
219
251
  icon: "editor_choice",
220
252
  name: "Grab",
221
253
  chip() {
222
- return r(this);
254
+ return i(this);
223
255
  }
224
256
  }
225
257
  };
226
- function K(t) {
258
+ function et(t) {
227
259
  const e = _(t), n = {
228
260
  active: "text-fm-color-typo-success bg-fm-color-system-success-100",
229
261
  upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
230
262
  expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
231
263
  };
232
- return t.type == "VOUCHER" ? p(h.FmChip, {
264
+ return t.type == "VOUCHER" ? p(d.FmChip, {
233
265
  class: n[e],
234
- label: d.title(a(`connect.campaign.common.status.${e}`)),
266
+ label: C.title(c(`connect.campaign.common.status.${e}`)),
235
267
  compact: !0
236
- }) : p(h.FmChip, {
268
+ }) : p(d.FmChip, {
237
269
  class: n[e],
238
- label: d.title(a(`connect.campaign.common.status.${e}`)),
270
+ label: C.title(c(`connect.campaign.common.status.${e}`)),
239
271
  compact: !0
240
272
  });
241
273
  }
242
- function q(t) {
274
+ function nt(t) {
243
275
  const e = t.timeframeOptions;
244
276
  if (!e || !e.start && !e.end)
245
- return a("connect.campaign.common.always_active");
277
+ return c("connect.campaign.common.always_active");
246
278
  if (!e.start && e.end)
247
- return a("connect.campaign.common.valid_until", {
279
+ return c("connect.campaign.common.valid_until", {
248
280
  date: g(e.end)
249
281
  });
250
- const n = g(e.start), o = e.end ? g(e.end) : a("connect.campaign.common.unlimited");
282
+ const n = g(e.start), o = e.end ? g(e.end) : c("connect.campaign.common.unlimited");
251
283
  return `${n} -> ${o}`;
252
284
  }
253
- function A(t) {
285
+ function P(t) {
254
286
  if (!t || !t.start && !t.end)
255
287
  return "connect.campaign.common.always";
256
- const e = t.start ? s(t.start).format("DD MMM YYYY") : "From campaign creation", n = t.end ? s(t.end).format("DD MMM YYYY") : "Never ends";
288
+ const e = t.start ? u(t.start).format("DD MMM YYYY") : "From campaign creation", n = t.end ? u(t.end).format("DD MMM YYYY") : "Never ends";
257
289
  return `${e} - ${n}`;
258
290
  }
259
- function Q(t) {
291
+ function ot(t) {
260
292
  const { campaign: e } = t;
261
293
  return {
262
294
  "connect.campaign.common.campaign_name": e.name,
263
- "connect.campaign.common.campaign_period": A(
295
+ "connect.campaign.common.campaign_period": P(
264
296
  e.timeframeOptions
265
297
  ),
266
298
  get "connect.campaign.common.next_schedule_at"() {
267
- if ((e == null ? void 0 : e.event.type) != "SCHEDULE" || !e.event.rule || !C(e.event.rule))
299
+ if ((e == null ? void 0 : e.event.type) != "SCHEDULE" || !e.event.rule || !E(e.event.rule))
268
300
  return;
269
- const n = O(
301
+ const n = N(
270
302
  e.event.rule.rules.g_schedule
271
303
  );
272
- return n ? s(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
304
+ return n ? u(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
273
305
  },
274
306
  get "connect.campaign.common.discount_type"() {
275
307
  if (e.type == "PROMOTION") return l(e.effect);
@@ -278,68 +310,65 @@ function Q(t) {
278
310
  },
279
311
  get "connect.campaign.broadcast.summary.delivery"() {
280
312
  if (e.type != "BROADCAST") return;
281
- const n = y(e);
313
+ const n = h(e);
282
314
  if (!(n.channels.length < 2))
283
315
  return `connect.campaign.broadcast.mode.${n.mode}.label`;
284
316
  },
285
317
  get "connect.campaign.broadcast.summary.channels"() {
286
318
  var n;
287
319
  if (e.type == "BROADCAST")
288
- return ((n = D(e)) == null ? void 0 : n.route) ?? "connect.campaign.broadcast.noChannelsSelected";
320
+ return ((n = T(e)) == null ? void 0 : n.route) ?? "connect.campaign.broadcast.noChannelsSelected";
289
321
  },
290
322
  get "connect.campaign.common.available_at"() {
291
323
  return e.targetLocation ? e.targetLocation.length > 0 ? e.targetLocation.map(
292
- (n) => b().locationItems.find((o) => o.value == n).label
324
+ (n) => I().locationItems.find((o) => o.value == n).label
293
325
  ).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
294
326
  }
295
327
  };
296
328
  }
297
329
  function _(t) {
298
- return t.timeframeOptions && t.timeframeOptions.type == "timeframe" ? s().isBetween(
299
- t.timeframeOptions.start ?? s().subtract(1, "d"),
300
- t.timeframeOptions.end ?? s().add(1, "d")
301
- ) ? "active" : s().isAfter(t.timeframeOptions.end) ? "expired" : "upcoming" : "active";
330
+ return t.timeframeOptions && t.timeframeOptions.type == "timeframe" ? u().isBetween(
331
+ t.timeframeOptions.start ?? u().subtract(1, "d"),
332
+ t.timeframeOptions.end ?? u().add(1, "d")
333
+ ) ? "active" : u().isAfter(t.timeframeOptions.end) ? "expired" : "upcoming" : "active";
302
334
  }
303
- function D(t) {
304
- const e = y(t);
335
+ function T(t) {
336
+ const e = h(t);
305
337
  if (!e.channels.length) return null;
306
- const n = R(
307
- e,
308
- (o) => f.global.t(`connect.campaign.broadcast.channel.${o}`)
309
- );
338
+ const o = A(e, (a) => f.global.t(`connect.campaign.broadcast.channel.${a}`));
310
339
  return {
311
340
  strategy: e.channels.length > 1 ? f.global.t(
312
341
  `connect.campaign.broadcast.strategy.${e.mode}`
313
342
  ) : null,
314
- route: n
343
+ route: o
315
344
  };
316
345
  }
317
- function Z(t) {
346
+ function at(t) {
318
347
  var e, n;
319
348
  switch (t.event.type) {
320
349
  case "BILL_COMPLETED":
321
- const o = `Spend to get ${i.formattedType(t.type)}`;
350
+ const o = `Spend to get ${m.formattedType(t.type)}`;
322
351
  switch (t.type) {
323
352
  case "POINT":
324
353
  case "CREDIT":
325
354
  case "COIN":
326
- return t.earningOption.type == "FIXED" ? `Spend to get ${t.earningOption.amount} ${i.formattedType(t.type)}` : `Every ${t.earningOption.every} amount spent get ${t.earningOption.amount} ${i.formattedType(t.type)}`;
355
+ return t.earningOption.type == "FIXED" ? `Spend to get ${t.earningOption.amount} ${m.formattedType(t.type)}` : `Every ${t.earningOption.every} amount spent get ${t.earningOption.amount} ${m.formattedType(t.type)}`;
327
356
  case "VOUCHER":
328
- const m = (n = (e = t == null ? void 0 : t.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : n.effect;
329
- return m ? `${o} - ${l(m)}` : o;
357
+ const a = (n = (e = t == null ? void 0 : t.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : n.effect;
358
+ return a ? `${o} - ${l(a)}` : o;
330
359
  default:
331
360
  return o;
332
361
  }
333
362
  case "FEEDBACK":
334
- return `Give feedback to receive ${i.formattedType(t.type)}`;
363
+ return `Give feedback to receive ${m.formattedType(t.type)}`;
335
364
  case "SCHEDULE":
336
- return `Receive ${i.formattedType(t.type)} on scheduled time`;
365
+ return `Receive ${m.formattedType(t.type)} on scheduled time`;
337
366
  case "SIMPLE_CLAIM":
338
367
  return "Simple claim voucher";
339
368
  case "TIER_UPGRADED":
340
- return `Receive ${i.formattedType(t.type)} when member tier upgraded`;
369
+ return `Receive ${m.formattedType(t.type)} when member tier upgraded`;
341
370
  case "MEMBERSHIP_JOINED":
342
- return `Receive ${i.formattedType(t.type)} when member joined`;
371
+ return `Receive ${m.formattedType(t.type)} when member joined`;
343
372
  case "MAKING_ORDER":
344
373
  return t.type !== "PROMOTION" ? void 0 : l(t.effect);
345
374
  default:
@@ -349,20 +378,23 @@ function Z(t) {
349
378
  }
350
379
  }
351
380
  export {
352
- J as C,
381
+ tt as C,
353
382
  _ as a,
354
- K as b,
355
- Z as c,
356
- D as d,
357
- E as e,
358
- W as f,
359
- q as g,
360
- j as h,
361
- G as i,
362
- X as j,
363
- k,
364
- Q as l,
365
- z as m,
366
- V as r,
367
- A as s
383
+ et as b,
384
+ at as c,
385
+ T as d,
386
+ R as e,
387
+ Q as f,
388
+ nt as g,
389
+ V as h,
390
+ j as i,
391
+ q as j,
392
+ K as k,
393
+ J as l,
394
+ W as m,
395
+ z as n,
396
+ ot as o,
397
+ Z as p,
398
+ X as r,
399
+ P as s
368
400
  };
@@ -1,4 +1,4 @@
1
- import { z as E } from "./index-BxU--5J5.js";
1
+ import { z as E } from "./index-C-oypk0K.js";
2
2
  const M = E.enum([
3
3
  "VOUCHER",
4
4
  "PROMOTION",