@feedmepos/mf-connect 0.1.47-prod → 0.1.49-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/{Analytic-AnuRQDA4.js → Analytic-ibBD_21m.js} +113 -113
  2. package/dist/{App-DP_jCyej.js → App-CDjwWK8a.js} +632 -622
  3. package/dist/{Bin-tL4lF6PB.js → Bin-DCaG0YGW.js} +9 -9
  4. package/dist/Broadcast-CbF3d_N7.js +233 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqYusgBO.js} +18 -18
  6. package/dist/{Card-Bi-ODgCc.js → Card-CDNE85po.js} +239 -239
  7. package/dist/{Collections-JHWotZ1I.js → Collections-DHn__E9U.js} +31 -31
  8. package/dist/Credit-DiTnwnFe.js +228 -0
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js} +756 -753
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js} +96 -96
  11. package/dist/Experience-CjMVeGsX.js +229 -0
  12. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  13. package/dist/{Game-DUCx2Dl9.js → Game-D3gANFAo.js} +98 -92
  14. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
  15. package/dist/{Index-zynxjOOr.js → Index-DEF_a5Mu.js} +54 -54
  16. package/dist/{Marketing-BBHDVRkR.js → Marketing-BeED4Y7H.js} +24 -24
  17. package/dist/{Member-B09bj6C3.js → Member-CA4hnHJY.js} +63 -63
  18. package/dist/MemberList-CZtriA_Q.js +1606 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BVrvf4AM.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-BqTDGnOG.js} +2286 -2220
  22. package/dist/{Mission-DAv0e_ZH.js → Mission-CDSMpqnG.js} +113 -107
  23. package/dist/{Overview-D0rBTEtP.js → Overview-ArineqY4.js} +337 -337
  24. package/dist/Point-51MD49EM.js +232 -0
  25. package/dist/{Promotion-BSPU5hP9.js → Promotion-BVrofYd6.js} +43 -43
  26. package/dist/{Queue-C5IFJ3iE.js → Queue-Q-aEeZ8w.js} +13 -13
  27. package/dist/{Record-CoFSrv7j.js → Record-DaVcschI.js} +10 -10
  28. package/dist/{Reward-COIOBOl-.js → Reward-DTtFuqOZ.js} +173 -173
  29. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js} +11 -11
  30. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js} +381 -381
  31. package/dist/{Segment-DF5SrucQ.js → Segment-DIy4RERw.js} +327 -327
  32. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js} +14 -14
  33. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js} +11 -11
  34. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js} +3 -3
  35. package/dist/Setting-DGDgmP84.js +1936 -0
  36. package/dist/{Store-E2_0EIy8.js → Store-Dh2uVHGY.js} +238 -238
  37. package/dist/StoreRewards-DFF_0g59.js +423 -0
  38. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js} +186 -186
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js} +1 -1
  40. package/dist/{Tier-CEEHsXkC.js → Tier-yKvE4mRW.js} +106 -106
  41. package/dist/{Title-BMAWlGeW.js → Title-DWWSC02W.js} +95 -95
  42. package/dist/{Transaction-CLsceq-O.js → Transaction-ru7M0PKE.js} +2 -2
  43. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSkv6hMH.js} +6 -6
  44. package/dist/{Voucher-Cd293WYY.js → Voucher-DmuaThKv.js} +37 -37
  45. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Db_aeyc1.js +419 -0
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js} +1 -1
  47. package/dist/app-DaFoFS2V.js +57962 -0
  48. package/dist/{app-aVXsWATU.js → app-ja_XST5q.js} +31 -31
  49. package/dist/app.js +1 -1
  50. package/dist/{business-DVlHPzaL.js → business-BSP_3iNl.js} +11 -8
  51. package/dist/{campaign-D9KeUWA7.js → campaign-C1hWNRWr.js} +2 -2
  52. package/dist/{campaign-l-u9A514.js → campaign-DMZnXtyb.js} +10 -10
  53. package/dist/{campaign.enum-Cud82tES.js → campaign.enum-Bfsz7Aon.js} +1 -1
  54. package/dist/campaign.fn-B-xvcbEb.js +758 -0
  55. package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BRkrN4Bi.js} +1 -1
  56. package/dist/{collection.fn-yR-xnV4g.js → collection.fn-D03AXdUn.js} +2 -2
  57. package/dist/{dto-Cua1OHMY.js → dto-DpRkSGg6.js} +4 -4
  58. package/dist/{effect-B5-eXNEr.js → effect-BW1-I1J4.js} +1 -1
  59. package/dist/{email-addresses-BeYh5fr5.js → email-addresses-BLVkwSkP.js} +1 -1
  60. package/dist/{export-BUF4_DUz.js → export-DOfDownW.js} +4 -4
  61. package/dist/{helper-CGwOThAl.js → helper-BzfjLXgi.js} +1 -1
  62. package/dist/{index-DlFVLRKG.js → index-BBi9jDD1.js} +3 -3
  63. package/dist/{index-Cx8-ipee.js → index-BJl_HxaB.js} +6 -6
  64. package/dist/{index-1BGPM6Uy.js → index-Ba5-z1MU.js} +1 -1
  65. package/dist/{index-BmL_b0IR.js → index-Bp8F6U9V.js} +1 -1
  66. package/dist/{index-C-d_4n-1.js → index-C6fpU8-G.js} +1 -1
  67. package/dist/{index-knuJv0ti.js → index-COoQSeE7.js} +4 -4
  68. package/dist/{index-aMDi62-C.js → index-DTnzjEWu.js} +1 -1
  69. package/dist/{index-BLdVWQId.js → index-DWBeauin.js} +3 -3
  70. package/dist/{index-Cl2iYM2F.js → index-Da1qz9oA.js} +1 -1
  71. package/dist/{index-CB8iWT_p.js → index-Dve1-uYX.js} +1 -1
  72. package/dist/{index-ng2IXlL1.js → index-P6ISAxfQ.js} +1 -1
  73. package/dist/{index-hX2mE0gQ.js → index-cpWgtd-c.js} +1 -1
  74. package/dist/{index-D5KIp8ZB.js → index-sFyvCun2.js} +1023 -1023
  75. package/dist/{index-DNTd-FNx.js → index-zyVYgteg.js} +2 -2
  76. package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DT0awUwa.js} +40 -40
  77. package/dist/{loading-c4b7n9Xp.js → loading-CZH88Duq.js} +1 -1
  78. package/dist/{membership-oBIs4sbL.js → membership-GNRX1fEK.js} +3 -3
  79. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  80. package/dist/{money-AP24H0gk.js → money-Xe5mDYRC.js} +1 -1
  81. package/dist/{number-CwsAYC_2.js → number-CAjqc2Pu.js} +1 -1
  82. package/dist/objectid-BQJRv_jX.js +145 -0
  83. package/dist/{plugins-Dn7JDHi7.js → plugins-Z2YcDTj8.js} +2 -2
  84. package/dist/{reward-4wdoZeXw.js → reward-G656rbLJ.js} +1 -1
  85. package/dist/{rule-_OJza6tn.js → rule-BJ5blBZp.js} +4 -4
  86. package/dist/{rule-builder-DmlhHAED.js → rule-builder-CursBigG.js} +1 -1
  87. package/dist/{template-BSQLFHf4.js → template-BnyUm8is.js} +63 -63
  88. package/dist/timezone-B64-HrWi.js +1150 -0
  89. package/dist/{trigger-DC9tDnI2.js → trigger-C_ih51ky.js} +4 -4
  90. package/dist/usePagination-Ds-cuHop.js +223 -0
  91. package/dist/{user-CCVOptFD.js → user-BZc_OAUj.js} +1 -1
  92. package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-2D47GxQX.js} +401 -401
  93. package/dist/{xlsx-BVMaOi8M.js → xlsx-BEk5qawh.js} +226 -226
  94. package/package.json +5 -4
  95. package/dist/Broadcast-T2a5tN8R.js +0 -227
  96. package/dist/Credit-DQQCXqS0.js +0 -222
  97. package/dist/Experience-DzTV21vX.js +0 -223
  98. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/MemberList-DLSLGQ02.js +0 -1606
  101. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  102. package/dist/Point-BeBYi1BT.js +0 -226
  103. package/dist/Setting-Dt0sG_hk.js +0 -1936
  104. package/dist/StoreRewards-DuSsWnTE.js +0 -423
  105. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
  106. package/dist/app-jRT7vsk_.js +0 -33357
  107. package/dist/campaign.fn-C-UojhHv.js +0 -758
  108. package/dist/objectid-CVDLTdni.js +0 -145
  109. package/dist/usePagination-JoYaROkV.js +0 -223
@@ -1,28 +1,28 @@
1
- import { defineComponent as q, resolveComponent as w, openBlock as C, createElementBlock as B, Fragment as Y, createVNode as c, withCtx as V, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as _e, ref as $, computed as G, watch as ie, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as ce, createTextVNode as de, createCommentVNode as z, h as te, onMounted as ve } from "vue";
1
+ import { defineComponent as q, resolveComponent as w, openBlock as C, createElementBlock as B, Fragment as Y, createVNode as c, withCtx as V, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as ve, ref as F, computed as G, watch as ie, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as de, createTextVNode as ce, createCommentVNode as z, h as te, onMounted as _e } from "vue";
2
2
  import { _ as ge } from "./campaign-CpzFl8Vr.js";
3
- import { u as Z } from "./vue-i18n--_Wu1nMj.js";
4
- import { u as ue } from "./loading-c4b7n9Xp.js";
5
- import { c as we, p as K } from "./plugins-Dn7JDHi7.js";
3
+ import { u as Z } from "./vue-i18n-2D47GxQX.js";
4
+ import { u as ue } from "./loading-CZH88Duq.js";
5
+ import { c as we, p as K } from "./plugins-Z2YcDTj8.js";
6
6
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
7
7
  import { Z as N } from "./zod-Bg2FbC-D.js";
8
8
  import { u as W } from "./app-wDQR6dpb.js";
9
- import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js";
10
- import { u as me } from "./reward-4wdoZeXw.js";
11
- import { l as le, c as se } from "./index-knuJv0ti.js";
12
- import "./index-DNTd-FNx.js";
13
- import { a as be, b as xe } from "./index-Cx8-ipee.js";
14
- import "./index-ng2IXlL1.js";
15
- import "./index-DlFVLRKG.js";
16
- import "./index-D5KIp8ZB.js";
17
- import { C as fe } from "./membership-oBIs4sbL.js";
18
- import { t as ee } from "./helper-CGwOThAl.js";
9
+ import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js";
10
+ import { u as me } from "./reward-G656rbLJ.js";
11
+ import { l as le, c as se } from "./index-COoQSeE7.js";
12
+ import "./index-zyVYgteg.js";
13
+ import { a as be, b as xe } from "./index-BJl_HxaB.js";
14
+ import "./index-P6ISAxfQ.js";
15
+ import "./index-BBi9jDD1.js";
16
+ import "./index-sFyvCun2.js";
17
+ import { C as fe } from "./membership-GNRX1fEK.js";
18
+ import { t as ee } from "./helper-BzfjLXgi.js";
19
19
  import { c as H } from "./object-qECH92oz.js";
20
20
  import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
21
- import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js";
22
- import { a as Se, _ as $e, b as Fe } from "./trigger-DC9tDnI2.js";
23
- import { O as ke } from "./objectid-CVDLTdni.js";
24
- import { r as pe } from "./index-CB8iWT_p.js";
25
- import { u as Pe } from "./business-DVlHPzaL.js";
21
+ import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js";
22
+ import { a as Se, _ as Fe, b as ke } from "./trigger-C_ih51ky.js";
23
+ import { O as $e } from "./objectid-BQJRv_jX.js";
24
+ import { r as pe } from "./index-Dve1-uYX.js";
25
+ import { u as Pe } from "./business-BSP_3iNl.js";
26
26
  const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Te = { class: "flex-1" }, Ue = { class: "flex items-center gap-8" }, Ae = { class: "fm-typo-en-title-sm-800" }, Le = { class: "flex gap-8 items-center" }, Ee = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Oe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, je = { class: "flex-1 space-y-4" }, De = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
27
27
  __name: "ReferralRewadGroupCard",
28
28
  props: {
@@ -36,13 +36,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
36
36
  }
37
37
  },
38
38
  emits: ["edit", "addCount", "remove"],
39
- setup(F, { emit: n }) {
40
- const { t: I } = Z(), p = n;
41
- return (g, m) => {
42
- const l = w("FmButton"), d = w("FmListItem");
39
+ setup(k, { emit: l }) {
40
+ const { t: I } = Z(), p = l;
41
+ return (g, f) => {
42
+ const s = w("FmButton"), u = w("FmListItem");
43
43
  return C(), B(Y, null, [
44
- c(d, {
45
- onClick: m[4] || (m[4] = (u) => p("edit", F.level)),
44
+ c(u, {
45
+ onClick: f[4] || (f[4] = (m) => p("edit", k.level)),
46
46
  class: "!p-0"
47
47
  }, {
48
48
  default: V(() => [
@@ -50,23 +50,23 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
50
50
  a("div", Ie, [
51
51
  a("div", Te, [
52
52
  a("div", Ue, [
53
- a("div", Ae, O(F.rewardGroup.name), 1)
53
+ a("div", Ae, O(k.rewardGroup.name), 1)
54
54
  ])
55
55
  ])
56
56
  ]),
57
57
  a("div", Le, [
58
- c(l, {
58
+ c(s, {
59
59
  variant: "secondary",
60
60
  label: r(I)("connect.referral.reward.add_count"),
61
61
  icon: "add",
62
- onClick: m[0] || (m[0] = (u) => {
63
- u.stopPropagation(), p("addCount", F.level);
62
+ onClick: f[0] || (f[0] = (m) => {
63
+ m.stopPropagation(), p("addCount", k.level);
64
64
  })
65
65
  }, null, 8, ["label"]),
66
- c(l, {
66
+ c(s, {
67
67
  icon: "delete",
68
- onClick: m[1] || (m[1] = (u) => {
69
- u.stopPropagation(), p("remove", F.level);
68
+ onClick: f[1] || (f[1] = (m) => {
69
+ m.stopPropagation(), p("remove", k.level);
70
70
  }),
71
71
  variant: "tertiary"
72
72
  })
@@ -77,42 +77,42 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
77
77
  a("div", Oe, [
78
78
  a("div", je, [
79
79
  a("div", null, [
80
- a("div", De, O(F.rewardGroup.name), 1)
80
+ a("div", De, O(k.rewardGroup.name), 1)
81
81
  ])
82
82
  ])
83
83
  ]),
84
- c(l, {
84
+ c(s, {
85
85
  variant: "tertiary",
86
86
  icon: "delete",
87
- onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", F.level)))
87
+ onClick: f[2] || (f[2] = (m) => (m.stopPropagation(), p("remove", k.level)))
88
88
  })
89
89
  ]),
90
- c(l, {
90
+ c(s, {
91
91
  class: "w-full",
92
92
  variant: "secondary",
93
93
  label: "Add count",
94
94
  disabled: !0,
95
95
  icon: "add",
96
- onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", F.level)))
96
+ onClick: f[3] || (f[3] = (m) => (m.stopPropagation(), p("addCount", k.level)))
97
97
  })
98
98
  ])
99
99
  ]),
100
100
  _: 1
101
101
  }),
102
- _e(g.$slots, "default")
102
+ ve(g.$slots, "default")
103
103
  ], 64);
104
104
  };
105
105
  }
106
106
  }), Me = { class: "flex flex-col space-y-16 pr-12" }, Ne = { class: "flex gap-16 items-center" }, He = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ze = { class: "fm-typo-en-title-sm-800" }, Ye = { class: "flex items-center gap-8" }, qe = /* @__PURE__ */ q({
107
107
  __name: "EditReferralCountSheet",
108
108
  emits: ["update"],
109
- setup(F, { expose: n, emit: I }) {
110
- const { t: p } = Z(), g = I, m = $(!1), l = $({}), d = $(-1), u = $(-1), R = Q(), A = be.superRefine((e, t) => {
111
- var k, U, P, x, _, E, ae;
112
- const i = u.value == -1 ? ((P = (U = (k = R.referralProgram) == null ? void 0 : k.reward[d.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : u.value, v = (_ = (x = R.referralProgram) == null ? void 0 : x.reward[d.value]) == null ? void 0 : _.rewards[i - 1], b = (ae = (E = R.referralProgram) == null ? void 0 : E.reward[d.value]) == null ? void 0 : ae.rewards[i + 1];
113
- v && e.threshold.from < v.threshold.from + 1 && t.addIssue({
109
+ setup(k, { expose: l, emit: I }) {
110
+ const { t: p } = Z(), g = I, f = F(!1), s = F({}), u = F(-1), m = F(-1), R = Q(), A = be.superRefine((e, t) => {
111
+ var $, U, P, x, v, E, ae;
112
+ const d = m.value == -1 ? ((P = (U = ($ = R.referralProgram) == null ? void 0 : $.reward[u.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : m.value, _ = (v = (x = R.referralProgram) == null ? void 0 : x.reward[u.value]) == null ? void 0 : v.rewards[d - 1], b = (ae = (E = R.referralProgram) == null ? void 0 : E.reward[u.value]) == null ? void 0 : ae.rewards[d + 1];
113
+ _ && e.threshold.from < _.threshold.from + 1 && t.addIssue({
114
114
  code: "custom",
115
- message: `The min referral must be at least ${v.threshold.from + 1}`,
115
+ message: `The min referral must be at least ${_.threshold.from + 1}`,
116
116
  path: ["option"]
117
117
  }), b && e.threshold.to && b.threshold.to && e.threshold.to > b.threshold.to - 1 && t.addIssue({
118
118
  code: "custom",
@@ -120,40 +120,40 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
120
120
  path: ["option"]
121
121
  });
122
122
  }), T = G(() => {
123
- const e = A.safeParse(l.value);
123
+ const e = A.safeParse(s.value);
124
124
  return e.success ? [] : e.error.errors;
125
125
  });
126
126
  function M() {
127
- const e = A.safeParse(l.value);
127
+ const e = A.safeParse(s.value);
128
128
  e.success && g("update", {
129
- groupIndex: d.value,
130
- countIndex: u.value,
129
+ groupIndex: u.value,
130
+ countIndex: m.value,
131
131
  referralCount: e.data
132
132
  });
133
133
  }
134
134
  async function D(e, t) {
135
- var i, v, b, k, U, P;
136
- if (m.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0)
137
- d.value = t.groupIndex, u.value = t.countIndex, l.value = H(
138
- (i = R.referralProgram) == null ? void 0 : i.reward[t.groupIndex].rewards[t.countIndex]
135
+ var d, _, b, $, U, P;
136
+ if (f.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0)
137
+ u.value = t.groupIndex, m.value = t.countIndex, s.value = H(
138
+ (d = R.referralProgram) == null ? void 0 : d.reward[t.groupIndex].rewards[t.countIndex]
139
139
  );
140
140
  else {
141
- d.value = t.groupIndex, u.value = -1;
142
- const x = u.value == -1 ? ((k = (b = (v = R.referralProgram) == null ? void 0 : v.reward[d.value]) == null ? void 0 : b.rewards) == null ? void 0 : k.length) || 0 : u.value, _ = (P = (U = R.referralProgram) == null ? void 0 : U.reward[d.value]) == null ? void 0 : P.rewards[x - 1];
143
- l.value = {
141
+ u.value = t.groupIndex, m.value = -1;
142
+ const x = m.value == -1 ? (($ = (b = (_ = R.referralProgram) == null ? void 0 : _.reward[u.value]) == null ? void 0 : b.rewards) == null ? void 0 : $.length) || 0 : m.value, v = (P = (U = R.referralProgram) == null ? void 0 : U.reward[u.value]) == null ? void 0 : P.rewards[x - 1];
143
+ s.value = {
144
144
  threshold: {
145
- from: _ != null && _.threshold ? _ != null && _.threshold.to ? _.threshold.to + 1 : (_ == null ? void 0 : _.threshold.from) + 1 : 1,
145
+ from: v != null && v.threshold ? v != null && v.threshold.to ? v.threshold.to + 1 : (v == null ? void 0 : v.threshold.from) + 1 : 1,
146
146
  to: null
147
147
  },
148
148
  rewards: []
149
149
  };
150
150
  }
151
- h.value = [], h.value = s.value.map(
152
- (x) => l.value.rewards.includes(x.id)
151
+ h.value = [], h.value = i.value.map(
152
+ (x) => s.value.rewards.includes(x.id)
153
153
  );
154
154
  }
155
155
  function L() {
156
- m.value = !1;
156
+ f.value = !1;
157
157
  }
158
158
  const y = [
159
159
  {
@@ -177,7 +177,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
177
177
  return t.description;
178
178
  }
179
179
  }
180
- ], f = me(), o = $([]), s = G(() => f.rewards.map((e) => {
180
+ ], n = me(), o = F([]), i = G(() => n.rewards.map((e) => {
181
181
  let t = "No expiry";
182
182
  switch (e.option.type) {
183
183
  case "VOUCHER":
@@ -197,36 +197,36 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
197
197
  }));
198
198
  G(() => []);
199
199
  function S() {
200
- const e = s.value;
200
+ const e = i.value;
201
201
  for (let t = 0; t < e.length; t++) {
202
- const i = e[t], v = h.value[t];
203
- v && !l.value.rewards.includes(i.id) && l.value.rewards.push(i.id), !v && l.value.rewards.includes(i.id) && (l.value.rewards = l.value.rewards.filter(
204
- (b) => b != i.id
202
+ const d = e[t], _ = h.value[t];
203
+ _ && !s.value.rewards.includes(d.id) && s.value.rewards.push(d.id), !_ && s.value.rewards.includes(d.id) && (s.value.rewards = s.value.rewards.filter(
204
+ (b) => b != d.id
205
205
  ));
206
206
  }
207
207
  }
208
- const h = $({});
209
- return ie(h, S, { deep: !0 }), n({
208
+ const h = F({});
209
+ return ie(h, S, { deep: !0 }), l({
210
210
  showSheet: D,
211
211
  hideSheet: L,
212
- data: l
212
+ data: s
213
213
  }), (e, t) => {
214
- const i = w("FmStepperField"), v = w("FmHelperText"), b = w("FmTable"), k = w("FmButton"), U = w("FmSideSheet");
214
+ const d = w("FmStepperField"), _ = w("FmHelperText"), b = w("FmTable"), $ = w("FmButton"), U = w("FmSideSheet");
215
215
  return C(), j(U, {
216
216
  "max-width": 1e3,
217
- modelValue: r(m),
218
- "onUpdate:modelValue": t[4] || (t[4] = (P) => J(m) ? m.value = P : null),
219
- header: `${r(u) == -1 ? r(p)("connect.referral.editReferralCountSheet.add") : r(p)("connect.referral.editReferralCountSheet.edit")}`
217
+ modelValue: r(f),
218
+ "onUpdate:modelValue": t[4] || (t[4] = (P) => J(f) ? f.value = P : null),
219
+ header: `${r(m) == -1 ? r(p)("connect.referral.editReferralCountSheet.add") : r(p)("connect.referral.editReferralCountSheet.edit")}`
220
220
  }, {
221
221
  "side-sheet-footer": V(() => [
222
222
  a("div", Ye, [
223
- c(k, {
223
+ c($, {
224
224
  label: r(p)("connect.editTierSheet.submit"),
225
225
  onClick: M,
226
226
  disabled: r(T).length > 0 || r(W)().isLoading,
227
227
  loading: r(W)().isLoading
228
228
  }, null, 8, ["label", "disabled", "loading"]),
229
- c(k, {
229
+ c($, {
230
230
  label: r(p)("connect.editTierSheet.cancel"),
231
231
  onClick: t[3] || (t[3] = (P) => L()),
232
232
  variant: "tertiary"
@@ -234,14 +234,14 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
234
234
  ])
235
235
  ]),
236
236
  default: V(() => [
237
- c(X, { json: r(l) }, null, 8, ["json"]),
237
+ c(X, { json: r(s) }, null, 8, ["json"]),
238
238
  c(X, { json: r(T) }, null, 8, ["json"]),
239
239
  a("div", Me, [
240
240
  a("div", null, [
241
241
  a("div", Ne, [
242
- c(i, {
243
- modelValue: r(l).threshold.from,
244
- "onUpdate:modelValue": t[0] || (t[0] = (P) => r(l).threshold.from = P),
242
+ c(d, {
243
+ modelValue: r(s).threshold.from,
244
+ "onUpdate:modelValue": t[0] || (t[0] = (P) => r(s).threshold.from = P),
245
245
  "show-steppers": !1,
246
246
  rules: [r(N).ruleAtPath(r(A), "threshold.from")]
247
247
  }, {
@@ -257,9 +257,9 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
257
257
  ]),
258
258
  _: 1
259
259
  }, 8, ["modelValue", "rules"]),
260
- c(i, {
261
- modelValue: r(l).threshold.to,
262
- "onUpdate:modelValue": t[1] || (t[1] = (P) => r(l).threshold.to = P),
260
+ c(d, {
261
+ modelValue: r(s).threshold.to,
262
+ "onUpdate:modelValue": t[1] || (t[1] = (P) => r(s).threshold.to = P),
263
263
  "show-steppers": !1,
264
264
  rules: [r(N).ruleAtPath(r(A), "threshold.to")]
265
265
  }, {
@@ -276,7 +276,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
276
276
  _: 1
277
277
  }, 8, ["modelValue", "rules"])
278
278
  ]),
279
- c(v, {
279
+ c(_, {
280
280
  text: r(N).helperText(r(T), "threshold"),
281
281
  state: r(N).helperState(r(T), "threshold")
282
282
  }, null, 8, ["text", "state"]),
@@ -291,7 +291,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
291
291
  selection: "multiple",
292
292
  "column-filter": r(o),
293
293
  "column-defs": y,
294
- "row-data": r(s),
294
+ "row-data": r(i),
295
295
  "page-size": 10
296
296
  }, null, 8, ["modelValue", "column-filter", "row-data"])
297
297
  ])
@@ -300,7 +300,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
300
300
  }, 8, ["modelValue", "header"]);
301
301
  };
302
302
  }
303
- }), Ke = { class: "space-y-16" }, Je = /* @__PURE__ */ a("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1), We = { class: "grid grid-cols-3 gap-16" }, Ze = { class: "fm-typo-en-title-sm-800" }, Qe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Xe = /* @__PURE__ */ q({
303
+ }), Ke = { class: "space-y-16" }, Je = { class: "grid grid-cols-3 gap-16" }, We = { class: "fm-typo-en-title-sm-800" }, Ze = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qe = /* @__PURE__ */ q({
304
304
  __name: "CriteriaTriggerInput",
305
305
  props: {
306
306
  modelValue: {
@@ -312,32 +312,32 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
312
312
  }
313
313
  },
314
314
  emits: ["update:model-value"],
315
- setup(F, { emit: n }) {
316
- const I = F, p = n, g = G(() => [
315
+ setup(k, { emit: l }) {
316
+ const I = k, p = l, g = G(() => [
317
317
  le.enum.BILL_COMPLETED,
318
318
  le.enum.FEEDBACK
319
- ].map((m) => Se[m]));
320
- return (m, l) => {
321
- const d = w("FmCard");
319
+ ].map((f) => Se[f]));
320
+ return (f, s) => {
321
+ const u = w("FmCard");
322
322
  return C(), B("div", Ke, [
323
- Je,
324
- a("div", We, [
325
- (C(!0), B(Y, null, re(r(g), (u) => (C(), j(d, {
326
- key: u.name,
323
+ s[0] || (s[0] = a("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1)),
324
+ a("div", Je, [
325
+ (C(!0), B(Y, null, re(r(g), (m) => (C(), j(u, {
326
+ key: m.name,
327
327
  variant: "outlined",
328
328
  disabled: I.disabled,
329
- class: ce(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
329
+ class: de(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
330
330
  "col-span-3": r(g).length == 1,
331
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": F.modelValue == u.value,
332
- "hover:bg-fm-color-opacity-sm": F.modelValue != u.value
331
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": k.modelValue == m.value,
332
+ "hover:bg-fm-color-opacity-sm": k.modelValue != m.value
333
333
  }]),
334
334
  onClick: () => {
335
- I.modelValue != u.value && !I.disabled && p("update:model-value", u.value);
335
+ I.modelValue != m.value && !I.disabled && p("update:model-value", m.value);
336
336
  }
337
337
  }, {
338
338
  default: V(() => [
339
- a("div", Ze, O(u.name), 1),
340
- a("div", Qe, O(u.description), 1)
339
+ a("div", We, O(m.name), 1),
340
+ a("div", Ze, O(m.description), 1)
341
341
  ]),
342
342
  _: 2
343
343
  }, 1032, ["disabled", "class", "onClick"]))), 128))
@@ -345,72 +345,72 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
345
345
  ]);
346
346
  };
347
347
  }
348
- }), er = { class: "flex items-center gap-x-8" }, rr = { class: "flex flex-col space-y-16 pr-12" }, tr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1), or = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1), ar = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1), nr = /* @__PURE__ */ a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1), lr = {
348
+ }), Xe = { class: "flex items-center gap-x-8" }, er = { class: "flex flex-col space-y-16 pr-12" }, rr = {
349
349
  key: 0,
350
350
  class: "space-y-16"
351
- }, sr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1), ir = {
351
+ }, tr = {
352
352
  key: 1,
353
353
  class: "space-y-16"
354
- }, cr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1), dr = { class: "flex items-center gap-8" }, ur = /* @__PURE__ */ q({
354
+ }, or = { class: "flex items-center gap-8" }, ar = /* @__PURE__ */ q({
355
355
  __name: "EditCriteriaSheet",
356
356
  emits: ["update"],
357
- setup(F, { expose: n, emit: I }) {
358
- const { t: p } = Z(), g = I, m = $(!1), l = $(-1), d = $({}), u = Q(), R = xe.superRefine((y, f) => {
359
- y.name.length >= 50 && f.addIssue({
357
+ setup(k, { expose: l, emit: I }) {
358
+ const { t: p } = Z(), g = I, f = F(!1), s = F(-1), u = F({}), m = Q(), R = xe.superRefine((y, n) => {
359
+ y.name.length >= 50 && n.addIssue({
360
360
  code: "custom",
361
361
  message: "Name must be less than 50 characters"
362
- }), y.name.length < 1 && f.addIssue({
362
+ }), y.name.length < 1 && n.addIssue({
363
363
  code: "custom",
364
364
  message: "Name is required"
365
365
  });
366
366
  }), A = G(() => {
367
- const y = R.safeParse(d.value);
367
+ const y = R.safeParse(u.value);
368
368
  return y.success ? [] : y.error.errors;
369
369
  });
370
- function T(y, f) {
370
+ function T(y, n) {
371
371
  var o;
372
- m.value = y, y && typeof f == "number" && f >= 0 ? (l.value = f, d.value = H(
373
- (o = u.referralProgram) == null ? void 0 : o.criteria[f]
374
- )) : (l.value = -1, d.value = {
375
- _id: new ke().toString(),
372
+ f.value = y, y && typeof n == "number" && n >= 0 ? (s.value = n, u.value = H(
373
+ (o = m.referralProgram) == null ? void 0 : o.criteria[n]
374
+ )) : (s.value = -1, u.value = {
375
+ _id: new $e().toString(),
376
376
  name: "",
377
377
  type: "AUTO",
378
378
  event: { type: "BILL_COMPLETED" }
379
379
  });
380
380
  }
381
381
  function M() {
382
- m.value = !1;
382
+ f.value = !1;
383
383
  }
384
384
  function D() {
385
- const y = R.safeParse(d.value);
386
- y.success && g("update", l.value, y.data);
385
+ const y = R.safeParse(u.value);
386
+ y.success && g("update", s.value, y.data);
387
387
  }
388
388
  function L(y) {
389
- d.value.type = y, y == "AUTO" ? d.value.event = { type: "BILL_COMPLETED" } : d.value.event = void 0;
389
+ u.value.type = y, y == "AUTO" ? u.value.event = { type: "BILL_COMPLETED" } : u.value.event = void 0;
390
390
  }
391
- return n({
391
+ return l({
392
392
  showSheet: T,
393
393
  hideSheet: M,
394
- data: d
395
- }), (y, f) => {
396
- const o = w("FmButton"), s = w("FmRadio"), S = w("FmRadioGroup"), h = w("FmSideSheet");
394
+ data: u
395
+ }), (y, n) => {
396
+ const o = w("FmButton"), i = w("FmRadio"), S = w("FmRadioGroup"), h = w("FmSideSheet");
397
397
  return C(), j(h, {
398
398
  "max-width": 768,
399
- modelValue: r(m),
400
- "onUpdate:modelValue": f[6] || (f[6] = (e) => J(m) ? m.value = e : null)
399
+ modelValue: r(f),
400
+ "onUpdate:modelValue": n[6] || (n[6] = (e) => J(f) ? f.value = e : null)
401
401
  }, {
402
402
  "side-sheet-header": V(() => [
403
- a("div", er, [
403
+ a("div", Xe, [
404
404
  c(o, {
405
405
  icon: "arrow_back",
406
406
  variant: "tertiary",
407
- onClick: f[0] || (f[0] = (e) => T(!1))
407
+ onClick: n[0] || (n[0] = (e) => T(!1))
408
408
  }),
409
- de("Add Criteria ")
409
+ n[7] || (n[7] = ce("Add Criteria ", -1))
410
410
  ])
411
411
  ]),
412
412
  "side-sheet-footer": V(() => [
413
- a("div", dr, [
413
+ a("div", or, [
414
414
  c(o, {
415
415
  label: r(p)("connect.editTierSheet.submit"),
416
416
  onClick: D,
@@ -419,34 +419,34 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
419
419
  }, null, 8, ["label", "disabled", "loading"]),
420
420
  c(o, {
421
421
  label: r(p)("connect.editTierSheet.cancel"),
422
- onClick: f[5] || (f[5] = (e) => T(!1)),
422
+ onClick: n[5] || (n[5] = (e) => T(!1)),
423
423
  variant: "tertiary"
424
424
  }, null, 8, ["label"])
425
425
  ])
426
426
  ]),
427
427
  default: V(() => [
428
- c(X, { json: r(d) }, null, 8, ["json"]),
429
- a("div", rr, [
430
- tr,
428
+ c(X, { json: r(u) }, null, 8, ["json"]),
429
+ a("div", er, [
430
+ n[12] || (n[12] = a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1)),
431
431
  c(Re, {
432
- modelValue: r(d).name,
433
- "onUpdate:modelValue": f[1] || (f[1] = (e) => r(d).name = e),
432
+ modelValue: r(u).name,
433
+ "onUpdate:modelValue": n[1] || (n[1] = (e) => r(u).name = e),
434
434
  label: r(p)("connect.referral.editReferralTierSheet.name"),
435
435
  schema: r(N).typeAtPath(r(R), "name")
436
436
  }, null, 8, ["modelValue", "label", "schema"]),
437
- or,
437
+ n[13] || (n[13] = a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1)),
438
438
  c(S, {
439
- "model-value": r(d).type,
439
+ "model-value": r(u).type,
440
440
  label: "Verify status",
441
441
  "onUpdate:modelValue": L
442
442
  }, {
443
443
  default: V(() => [
444
- c(s, {
444
+ c(i, {
445
445
  value: "AUTO",
446
446
  label: "Auto",
447
447
  sublabel: "Verify based on rule configuration"
448
448
  }),
449
- c(s, {
449
+ c(i, {
450
450
  value: "MANUAL",
451
451
  label: "Manual",
452
452
  sublabel: "Verify based on manual inspection"
@@ -454,25 +454,25 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
454
454
  ]),
455
455
  _: 1
456
456
  }, 8, ["model-value"]),
457
- r(d).type == "AUTO" ? (C(), B(Y, { key: 0 }, [
458
- ar,
459
- nr,
460
- c(Xe, {
461
- "model-value": r(d).event.type,
462
- "onUpdate:modelValue": f[2] || (f[2] = (e) => r(d).event.type = e)
457
+ r(u).type == "AUTO" ? (C(), B(Y, { key: 0 }, [
458
+ n[10] || (n[10] = a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1)),
459
+ n[11] || (n[11] = a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1)),
460
+ c(Qe, {
461
+ "model-value": r(u).event.type,
462
+ "onUpdate:modelValue": n[2] || (n[2] = (e) => r(u).event.type = e)
463
463
  }, null, 8, ["model-value"]),
464
- r(d).event.type == r(se).enum.BILL_COMPLETED ? (C(), B("div", lr, [
465
- sr,
466
- c($e, {
467
- "model-value": r(d).event.rule,
468
- "onUpdate:modelValue": f[3] || (f[3] = (e) => r(d).event.rule = e)
464
+ r(u).event.type == r(se).enum.BILL_COMPLETED ? (C(), B("div", rr, [
465
+ n[8] || (n[8] = a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1)),
466
+ c(Fe, {
467
+ "model-value": r(u).event.rule,
468
+ "onUpdate:modelValue": n[3] || (n[3] = (e) => r(u).event.rule = e)
469
469
  }, null, 8, ["model-value"])
470
470
  ])) : z("", !0),
471
- r(d).event.type == r(se).enum.FEEDBACK ? (C(), B("div", ir, [
472
- cr,
473
- c(Fe, {
474
- "model-value": r(d).event.rule,
475
- "onUpdate:modelValue": f[4] || (f[4] = (e) => r(d).event.rule = e)
471
+ r(u).event.type == r(se).enum.FEEDBACK ? (C(), B("div", tr, [
472
+ n[9] || (n[9] = a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1)),
473
+ c(ke, {
474
+ "model-value": r(u).event.rule,
475
+ "onUpdate:modelValue": n[4] || (n[4] = (e) => r(u).event.rule = e)
476
476
  }, null, 8, ["model-value"])
477
477
  ])) : z("", !0)
478
478
  ], 64)) : z("", !0)
@@ -484,49 +484,46 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
484
484
  }
485
485
  });
486
486
  function he() {
487
- const F = $(!1), n = Ce();
487
+ const k = F(!1), l = Ce();
488
488
  return {
489
489
  confirmUpdateReferralRecord: async () => {
490
490
  await new Promise((p) => {
491
- n.open({
491
+ l.open({
492
492
  title: "Confirmation",
493
493
  message: "This will change all referral settings? Would you like to update previous referral record?",
494
494
  primaryActions: { text: "Update all", close: !0 },
495
495
  secondaryActions: { text: "Update future only", close: !0 }
496
496
  }).onPrimary(async () => {
497
- F.value = !0, p();
497
+ k.value = !0, p();
498
498
  }).onSecondary(async () => {
499
- F.value = !1, p();
499
+ k.value = !1, p();
500
500
  });
501
501
  });
502
502
  },
503
- updateReferralRecord: F
503
+ updateReferralRecord: k
504
504
  };
505
505
  }
506
- const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex justify-between items-center" }, pr = /* @__PURE__ */ a("div", null, [
507
- /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
508
- /* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
509
- ], -1), hr = /* @__PURE__ */ q({
506
+ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex justify-between items-center" }, sr = /* @__PURE__ */ q({
510
507
  __name: "ManageCriteriaSheet",
511
- setup(F, { expose: n }) {
512
- const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = he(), l = $(!1), d = $({}), u = Q(), R = $(
508
+ setup(k, { expose: l }) {
509
+ const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: f } = he(), s = F(!1), u = F({}), m = Q(), R = F(
513
510
  null
514
511
  ), A = G(() => {
515
512
  var o;
516
- return (o = u.referralProgram) == null ? void 0 : o.criteria;
513
+ return (o = m.referralProgram) == null ? void 0 : o.criteria;
517
514
  });
518
515
  async function T(o) {
519
516
  await g(), await p(async () => {
520
517
  await pe.update({
521
518
  ...o,
522
- updateReferralRecord: m.value
523
- }), await u.readReferralProgram();
519
+ updateReferralRecord: f.value
520
+ }), await m.readReferralProgram();
524
521
  });
525
522
  }
526
- async function M(o, s) {
523
+ async function M(o, i) {
527
524
  var e, t;
528
- const S = o == -1 ? ((e = u.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(u.referralProgram);
529
- h.criteria[S] = s, await T(h), (t = R.value) == null || t.showSheet(!1);
525
+ const S = o == -1 ? ((e = m.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(m.referralProgram);
526
+ h.criteria[S] = i, await T(h), (t = R.value) == null || t.showSheet(!1);
530
527
  }
531
528
  async function D(o) {
532
529
  var h, e;
@@ -537,8 +534,8 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
537
534
  I("connect.prompt.cancel")
538
535
  ))
539
536
  return;
540
- const s = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, S = H(u.referralProgram);
541
- S.criteria.splice(s, 1), await T(S), (e = R.value) == null || e.showSheet(!1);
537
+ const i = o == -1 ? ((h = m.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, S = H(m.referralProgram);
538
+ S.criteria.splice(i, 1), await T(S), (e = R.value) == null || e.showSheet(!1);
542
539
  }
543
540
  const L = [
544
541
  {
@@ -562,8 +559,8 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
562
559
  variant: "tertiary",
563
560
  icon: "delete",
564
561
  iconColor: "neutral-gray-400",
565
- onClick: (s) => {
566
- s.stopPropagation(), D(o.row.index);
562
+ onClick: (i) => {
563
+ i.stopPropagation(), D(o.row.index);
567
564
  }
568
565
  })
569
566
  ];
@@ -571,35 +568,38 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
571
568
  }
572
569
  ];
573
570
  function y(o) {
574
- l.value = o;
571
+ s.value = o;
575
572
  }
576
- function f() {
577
- l.value = !1;
573
+ function n() {
574
+ s.value = !1;
578
575
  }
579
- return n({
576
+ return l({
580
577
  showSheet: y,
581
- hideSheet: f,
582
- data: d
583
- }), (o, s) => {
578
+ hideSheet: n,
579
+ data: u
580
+ }), (o, i) => {
584
581
  const S = w("FmButton"), h = w("FmTable"), e = w("FmSideSheet");
585
582
  return C(), B(Y, null, [
586
583
  c(e, {
587
584
  "max-width": 768,
588
- modelValue: r(l),
589
- "onUpdate:modelValue": s[2] || (s[2] = (t) => J(l) ? l.value = t : null),
585
+ modelValue: r(s),
586
+ "onUpdate:modelValue": i[2] || (i[2] = (t) => J(s) ? s.value = t : null),
590
587
  header: "Manage Criteria"
591
588
  }, {
592
589
  default: V(() => [
593
- a("div", mr, [
594
- a("div", fr, [
595
- pr,
590
+ a("div", nr, [
591
+ a("div", lr, [
592
+ i[3] || (i[3] = a("div", null, [
593
+ a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
594
+ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
595
+ ], -1)),
596
596
  c(S, {
597
597
  label: "Add Criteria",
598
598
  icon: "add",
599
599
  variant: "secondary",
600
- onClick: s[0] || (s[0] = (t) => {
601
- var i;
602
- return (i = r(R)) == null ? void 0 : i.showSheet(!0);
600
+ onClick: i[0] || (i[0] = (t) => {
601
+ var d;
602
+ return (d = r(R)) == null ? void 0 : d.showSheet(!0);
603
603
  })
604
604
  })
605
605
  ]),
@@ -609,16 +609,16 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
609
609
  "page-size": 100,
610
610
  "shrink-at": !1,
611
611
  "column-defs": L,
612
- onRowClick: s[1] || (s[1] = (t) => {
613
- var i;
614
- return (i = r(R)) == null ? void 0 : i.showSheet(!0, t.index);
612
+ onRowClick: i[1] || (i[1] = (t) => {
613
+ var d;
614
+ return (d = r(R)) == null ? void 0 : d.showSheet(!0, t.index);
615
615
  })
616
616
  }, null, 8, ["row-data"])
617
617
  ])
618
618
  ]),
619
619
  _: 1
620
620
  }, 8, ["modelValue"]),
621
- c(ur, {
621
+ c(ar, {
622
622
  ref_key: "editCriteriaSheetRef",
623
623
  ref: R,
624
624
  onUpdate: M
@@ -626,20 +626,20 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
626
626
  ], 64);
627
627
  };
628
628
  }
629
- }), _r = { class: "flex flex-col space-y-16 pr-12" }, vr = { class: "fm-typo-en-title-sm-800" }, gr = { class: "flex items-center gap-8" }, wr = /* @__PURE__ */ q({
629
+ }), ir = { class: "flex flex-col space-y-16 pr-12" }, dr = { class: "fm-typo-en-title-sm-800" }, cr = { class: "flex items-center gap-8" }, ur = /* @__PURE__ */ q({
630
630
  __name: "EditRefereeRewardSheet",
631
631
  emits: ["update"],
632
- setup(F, { expose: n, emit: I }) {
633
- const { t: p } = Z(), g = I, m = $(!1), l = $([]), d = Q();
634
- function u() {
635
- g("update", l.value);
632
+ setup(k, { expose: l, emit: I }) {
633
+ const { t: p } = Z(), g = I, f = F(!1), s = F([]), u = Q();
634
+ function m() {
635
+ g("update", s.value);
636
636
  }
637
637
  async function R(o) {
638
- var s, S;
639
- m.value = o, l.value = ((S = (s = d.referralProgram) == null ? void 0 : s.refereeReward) == null ? void 0 : S.map((h) => h.toString())) || [], f.value = L.value.map((h) => l.value.includes(h.id));
638
+ var i, S;
639
+ f.value = o, s.value = ((S = (i = u.referralProgram) == null ? void 0 : i.refereeReward) == null ? void 0 : S.map((h) => h.toString())) || [], n.value = L.value.map((h) => s.value.includes(h.id));
640
640
  }
641
641
  function A() {
642
- m.value = !1;
642
+ f.value = !1;
643
643
  }
644
644
  const T = [
645
645
  {
@@ -658,19 +658,19 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
658
658
  header: "Description",
659
659
  accessorFn: (o) => o.description,
660
660
  cell(o) {
661
- const s = o.row.original;
662
- if (s.collectible.type == "VOUCHER" || s.selectedReward == null)
663
- return s.description;
661
+ const i = o.row.original;
662
+ if (i.collectible.type == "VOUCHER" || i.selectedReward == null)
663
+ return i.description;
664
664
  }
665
665
  }
666
- ], M = me(), D = $([]), L = G(() => M.rewards.map((o) => {
667
- let s = "No expiry";
666
+ ], M = me(), D = F([]), L = G(() => M.rewards.map((o) => {
667
+ let i = "No expiry";
668
668
  switch (o.option.type) {
669
669
  case "VOUCHER":
670
- s = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
670
+ i = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
671
671
  break;
672
672
  case "LOYALTY":
673
- s = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
673
+ i = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
674
674
  break;
675
675
  }
676
676
  return {
@@ -678,52 +678,52 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
678
678
  name: o.name,
679
679
  collectible: o.option,
680
680
  collectibleConfig: o.collectibleConfig,
681
- description: s
681
+ description: i
682
682
  };
683
683
  }));
684
684
  G(() => []);
685
685
  function y() {
686
686
  const o = L.value;
687
- for (let s = 0; s < o.length; s++) {
688
- const S = o[s], h = f.value[s];
689
- h && !l.value.includes(S.id) && l.value.push(S.id), !h && l.value.includes(S.id) && (l.value = l.value.filter((e) => e != S.id));
687
+ for (let i = 0; i < o.length; i++) {
688
+ const S = o[i], h = n.value[i];
689
+ h && !s.value.includes(S.id) && s.value.push(S.id), !h && s.value.includes(S.id) && (s.value = s.value.filter((e) => e != S.id));
690
690
  }
691
691
  }
692
- const f = $({});
693
- return ie(f, y, { deep: !0 }), n({
692
+ const n = F({});
693
+ return ie(n, y, { deep: !0 }), l({
694
694
  showSheet: R,
695
695
  hideSheet: A,
696
- data: l
697
- }), (o, s) => {
696
+ data: s
697
+ }), (o, i) => {
698
698
  const S = w("FmTable"), h = w("FmButton"), e = w("FmSideSheet");
699
699
  return C(), j(e, {
700
700
  "max-width": 1e3,
701
- modelValue: r(m),
702
- "onUpdate:modelValue": s[2] || (s[2] = (t) => J(m) ? m.value = t : null),
701
+ modelValue: r(f),
702
+ "onUpdate:modelValue": i[2] || (i[2] = (t) => J(f) ? f.value = t : null),
703
703
  header: "Referee reward"
704
704
  }, {
705
705
  "side-sheet-footer": V(() => [
706
- a("div", gr, [
706
+ a("div", cr, [
707
707
  c(h, {
708
708
  label: r(p)("connect.common.save"),
709
- onClick: u,
709
+ onClick: m,
710
710
  disabled: r(W)().isLoading,
711
711
  loading: r(W)().isLoading
712
712
  }, null, 8, ["label", "disabled", "loading"]),
713
713
  c(h, {
714
714
  label: r(p)("connect.common.cancel"),
715
- onClick: s[1] || (s[1] = (t) => A()),
715
+ onClick: i[1] || (i[1] = (t) => A()),
716
716
  variant: "tertiary"
717
717
  }, null, 8, ["label"])
718
718
  ])
719
719
  ]),
720
720
  default: V(() => [
721
- c(X, { json: r(l) }, null, 8, ["json"]),
722
- a("div", _r, [
723
- a("div", vr, O(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
721
+ c(X, { json: r(s) }, null, 8, ["json"]),
722
+ a("div", ir, [
723
+ a("div", dr, O(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
724
724
  c(S, {
725
- modelValue: r(f),
726
- "onUpdate:modelValue": s[0] || (s[0] = (t) => J(f) ? f.value = t : null),
725
+ modelValue: r(n),
726
+ "onUpdate:modelValue": i[0] || (i[0] = (t) => J(n) ? n.value = t : null),
727
727
  selection: "multiple",
728
728
  "column-filter": r(D),
729
729
  "column-defs": T,
@@ -736,48 +736,42 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
736
736
  }, 8, ["modelValue"]);
737
737
  };
738
738
  }
739
- }), yr = { class: "fm-typo-en-title-sm-600" }, br = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, xr = { class: "flex gap-x-8" }, Cr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, Rr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Sr = { class: "mb-40" }, $r = {
739
+ }), mr = { class: "fm-typo-en-title-sm-600" }, fr = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, pr = { class: "flex gap-x-8" }, hr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, vr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _r = { class: "mb-40" }, gr = {
740
740
  key: 0,
741
741
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
742
- }, Fr = /* @__PURE__ */ a("div", { class: "flex flex-col gap-16 text-center" }, [
743
- /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
744
- /* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Add referral count to configure progression reward to the referral program ")
745
- ], -1), kr = /* @__PURE__ */ a("img", {
746
- src: ge,
747
- class: "aspect-square w-[150px]"
748
- }, null, -1), Pr = { class: "flex flex-col gap-16 text-center" }, Vr = { class: "fm-typo-en-title-sm-800" }, Ir = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = /* @__PURE__ */ q({
742
+ }, wr = { class: "flex flex-col gap-16 text-center" }, yr = { class: "fm-typo-en-title-sm-800" }, br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qr = /* @__PURE__ */ q({
749
743
  __name: "Overview",
750
- setup(F) {
751
- const { t: n } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: l } = he(), d = G(() => {
744
+ setup(k) {
745
+ const { t: l } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: s } = he(), u = G(() => {
752
746
  var e;
753
747
  return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
754
- }), u = $(null);
755
- $(null);
756
- const R = $(null), A = $(null), T = $(null), M = G(() => {
757
- var e, t, i, v;
748
+ }), m = F(null);
749
+ F(null);
750
+ const R = F(null), A = F(null), T = F(null), M = G(() => {
751
+ var e, t, d, _;
758
752
  return [
759
753
  {
760
754
  label: "connect.referral.how_it_works.generate_link",
761
- sublabel: n("connect.referral.how_it_works.generate_link_for_member"),
755
+ sublabel: l("connect.referral.how_it_works.generate_link_for_member"),
762
756
  icon: "offline_share"
763
757
  },
764
758
  {
765
759
  label: "connect.referral.how_it_works.referee_join_reward",
766
- sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} ${n("connect.referral.how_it_works.reward")}`,
767
- action: n("connect.referral.actions.manage_reward"),
760
+ sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} ${l("connect.referral.how_it_works.reward")}`,
761
+ action: l("connect.referral.actions.manage_reward"),
768
762
  onClick: () => {
769
763
  var b;
770
764
  return (b = T.value) == null ? void 0 : b.showSheet(!0);
771
765
  },
772
- helperText: n(
766
+ helperText: l(
773
767
  "connect.referral.how_it_works.referee_join_reward_description"
774
768
  ),
775
769
  icon: "group_add"
776
770
  },
777
771
  {
778
772
  label: "connect.referral.how_it_works.referee_meet_criteria",
779
- sublabel: `${(i = g.referralProgram) == null ? void 0 : i.criteria.length} ${n("connect.referral.how_it_works.criteria")}`,
780
- action: n("connect.referral.actions.manage_criteria"),
773
+ sublabel: `${(d = g.referralProgram) == null ? void 0 : d.criteria.length} ${l("connect.referral.how_it_works.criteria")}`,
774
+ action: l("connect.referral.actions.manage_criteria"),
781
775
  onClick: () => {
782
776
  var b;
783
777
  return (b = A.value) == null ? void 0 : b.showSheet(!0);
@@ -786,15 +780,15 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
786
780
  },
787
781
  {
788
782
  label: "connect.referral.how_it_works.referer_get_reward",
789
- sublabel: `${(v = g.referralProgram) == null ? void 0 : v.reward.length} ${n("connect.referral.how_it_works.reward_tier")}`,
790
- helperText: n("connect.referral.how_it_works.referral_tier_description"),
783
+ sublabel: `${(_ = g.referralProgram) == null ? void 0 : _.reward.length} ${l("connect.referral.how_it_works.reward_tier")}`,
784
+ helperText: l("connect.referral.how_it_works.referral_tier_description"),
791
785
  icon: "featured_seasonal_and_gifts"
792
786
  }
793
787
  ];
794
788
  });
795
789
  function D(e) {
796
790
  var t;
797
- (t = u.value) == null || t.onManageRewardGroup(e);
791
+ (t = m.value) == null || t.onManageRewardGroup(e);
798
792
  }
799
793
  function L(e) {
800
794
  var t;
@@ -804,57 +798,57 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
804
798
  });
805
799
  }
806
800
  async function y(e) {
807
- var P, x, _, E;
808
- const t = e.countIndex == -1 ? ((x = (P = g.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : x.rewards.length) || 0 : e.countIndex || 0, i = e.referralCount, v = H(
801
+ var P, x, v, E;
802
+ const t = e.countIndex == -1 ? ((x = (P = g.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : x.rewards.length) || 0 : e.countIndex || 0, d = e.referralCount, _ = H(
809
803
  g.referralProgram
810
- ), b = v.reward[e.groupIndex];
804
+ ), b = _.reward[e.groupIndex];
811
805
  b.rewards[t] = e.referralCount;
812
- const k = b.rewards[t - 1], U = b.rewards[t + 1];
813
- if (k && k.threshold.to != i.threshold.from - 1) {
806
+ const $ = b.rewards[t - 1], U = b.rewards[t + 1];
807
+ if ($ && $.threshold.to != d.threshold.from - 1) {
814
808
  if (!await K.confirm(
815
- n(
809
+ l(
816
810
  "connect.referral.referral_count.update.range_discontinuous.previous",
817
811
  {
818
- name: k.threshold.from,
819
- from: k.threshold.from ?? 0,
820
- to: k.threshold.to ?? 1 / 0,
821
- newTo: i.threshold.from - 1
812
+ name: $.threshold.from,
813
+ from: $.threshold.from ?? 0,
814
+ to: $.threshold.to ?? 1 / 0,
815
+ newTo: d.threshold.from - 1
822
816
  }
823
817
  ),
824
- n("connect.referral.referral_count.title"),
825
- n("connect.referral.referral_count.remove.next_range")
818
+ l("connect.referral.referral_count.title"),
819
+ l("connect.referral.referral_count.remove.next_range")
826
820
  ))
827
821
  return;
828
- k.threshold.to = i.threshold.from - 1;
822
+ $.threshold.to = d.threshold.from - 1;
829
823
  }
830
- if (U && U.threshold.from - 1 != i.threshold.to) {
824
+ if (U && U.threshold.from - 1 != d.threshold.to) {
831
825
  if (!await K.confirm(
832
- n("connect.program.tier.update.range_discontinuous.next", {
826
+ l("connect.program.tier.update.range_discontinuous.next", {
833
827
  name: U.threshold.from,
834
828
  from: U.threshold.from ?? 0,
835
829
  to: U.threshold.to ?? 1 / 0,
836
- newFrom: i.threshold.to ?? 1
830
+ newFrom: d.threshold.to ?? 1
837
831
  }),
838
- n("connect.program.tier.title"),
839
- n("connect.program.tier.remove.next_range"),
840
- n("connect.prompt.cancel")
832
+ l("connect.program.tier.title"),
833
+ l("connect.program.tier.remove.next_range"),
834
+ l("connect.prompt.cancel")
841
835
  ))
842
836
  return;
843
- U.threshold.from = (i.threshold.to ?? 0) + 1;
837
+ U.threshold.from = (d.threshold.to ?? 0) + 1;
844
838
  }
845
- !U && !((_ = i.threshold) != null && _.to) && (i.threshold.to = void 0), await o(v), (E = R.value) == null || E.hideSheet();
839
+ !U && !((v = d.threshold) != null && v.to) && (d.threshold.to = void 0), await o(_), (E = R.value) == null || E.hideSheet();
846
840
  }
847
- async function f(e) {
848
- var i;
841
+ async function n(e) {
842
+ var d;
849
843
  const t = H(g.referralProgram);
850
- t.refereeReward = e, await o(t), (i = T.value) == null || i.hideSheet();
844
+ t.refereeReward = e, await o(t), (d = T.value) == null || d.hideSheet();
851
845
  }
852
846
  async function o(e) {
853
- await m(), await I(
847
+ await f(), await I(
854
848
  async () => {
855
849
  await pe.update({
856
850
  ...e,
857
- updateReferralRecord: l.value
851
+ updateReferralRecord: s.value
858
852
  }), await g.readReferralProgram();
859
853
  },
860
854
  {
@@ -863,12 +857,12 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
863
857
  }
864
858
  );
865
859
  }
866
- async function s(e) {
860
+ async function i(e) {
867
861
  if (!await K.remove(
868
- n("connect.referral.reward.confirm_remove_referral_tier"),
869
- n("connect.referral.reward.remove_referral_tier"),
870
- n("connect.prompt.confirm"),
871
- n("connect.prompt.cancel")
862
+ l("connect.referral.reward.confirm_remove_referral_tier"),
863
+ l("connect.referral.reward.remove_referral_tier"),
864
+ l("connect.prompt.confirm"),
865
+ l("connect.prompt.cancel")
872
866
  ))
873
867
  return;
874
868
  const t = H(g.referralProgram);
@@ -876,36 +870,36 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
876
870
  }
877
871
  async function S(e, t) {
878
872
  if (!await K.remove(
879
- n("connect.referral.reward.confirm_remove_referral_count"),
880
- n("connect.referral.reward.remove_referral_count"),
881
- n("connect.prompt.confirm"),
882
- n("connect.prompt.cancel")
873
+ l("connect.referral.reward.confirm_remove_referral_count"),
874
+ l("connect.referral.reward.remove_referral_count"),
875
+ l("connect.prompt.confirm"),
876
+ l("connect.prompt.cancel")
883
877
  ))
884
878
  return;
885
- const i = H(g.referralProgram), v = i.reward[e].rewards[t + 1];
886
- if (v) {
879
+ const d = H(g.referralProgram), _ = d.reward[e].rewards[t + 1];
880
+ if (_) {
887
881
  if (!await K.confirm(
888
- n("connect.referral.referral_count.update.range_discontinuous.next", {
889
- from: v.threshold.from ?? 0,
890
- to: v.threshold.to ?? 1 / 0,
891
- newFrom: i.reward[e].rewards[t].threshold.from
882
+ l("connect.referral.referral_count.update.range_discontinuous.next", {
883
+ from: _.threshold.from ?? 0,
884
+ to: _.threshold.to ?? 1 / 0,
885
+ newFrom: d.reward[e].rewards[t].threshold.from
892
886
  }),
893
- n("connect.referral.referral_count.remove.title"),
894
- n("connect.referral.referral_count.remove.next_range"),
895
- n("connect.prompt.cancel")
887
+ l("connect.referral.referral_count.remove.title"),
888
+ l("connect.referral.referral_count.remove.next_range"),
889
+ l("connect.prompt.cancel")
896
890
  ))
897
891
  return;
898
- v.threshold.from = i.reward[e].rewards[t].threshold.from;
892
+ _.threshold.from = d.reward[e].rewards[t].threshold.from;
899
893
  }
900
- i.reward[e].rewards.splice(t, 1), await o(i);
894
+ d.reward[e].rewards.splice(t, 1), await o(d);
901
895
  }
902
896
  const h = [
903
897
  {
904
- header: n("connect.referral.reward.table.count"),
898
+ header: l("connect.referral.reward.table.count"),
905
899
  accessorFn: (e) => e.threshold.from == e.threshold.to ? `${e.threshold.from}` : e.threshold.to ? `${e.threshold.from} - ${e.threshold.to ?? "∞"}` : `${e.threshold.from}+`
906
900
  },
907
901
  {
908
- header: n("connect.referral.reward.table.reward"),
902
+ header: l("connect.referral.reward.table.reward"),
909
903
  accessorKey: "type",
910
904
  accessorFn: (e) => {
911
905
  var t;
@@ -930,48 +924,48 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
930
924
  }
931
925
  }
932
926
  ];
933
- return ve(async () => {
927
+ return _e(async () => {
934
928
  await g.readReferralProgram();
935
929
  }), (e, t) => {
936
- const i = w("FmCard"), v = w("FmIcon"), b = w("FmTooltip"), k = w("FmButton"), U = w("FmTable"), P = w("FmList");
930
+ const d = w("FmCard"), _ = w("FmIcon"), b = w("FmTooltip"), $ = w("FmButton"), U = w("FmTable"), P = w("FmList");
937
931
  return C(), B(Y, null, [
938
932
  z("", !0),
939
- c(i, {
933
+ c(d, {
940
934
  variant: "outlined",
941
935
  class: "flex flex-col gap-16 p-16"
942
936
  }, {
943
937
  default: V(() => [
944
- a("div", yr, O(r(n)("connect.referral.how_it_works.title")), 1),
945
- a("div", br, [
946
- (C(!0), B(Y, null, re(r(M), (x, _) => (C(), B("div", {
947
- key: _,
948
- class: ce(["px-8", { "xs:!border-r": _ % 2 == 0 }])
938
+ a("div", mr, O(r(l)("connect.referral.how_it_works.title")), 1),
939
+ a("div", fr, [
940
+ (C(!0), B(Y, null, re(r(M), (x, v) => (C(), B("div", {
941
+ key: v,
942
+ class: de(["px-8", { "xs:!border-r": v % 2 == 0 }])
949
943
  }, [
950
- a("div", xr, [
951
- c(v, {
944
+ a("div", pr, [
945
+ c(_, {
952
946
  name: x.icon,
953
947
  color: "primary",
954
948
  class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
955
949
  }, null, 8, ["name"]),
956
950
  a("div", null, [
957
- a("div", Cr, [
958
- de(O(r(n)(x.label)) + " ", 1),
951
+ a("div", hr, [
952
+ ce(O(r(l)(x.label)) + " ", 1),
959
953
  x.helperText ? (C(), j(b, {
960
954
  key: 0,
961
955
  content: x.helperText
962
956
  }, {
963
957
  default: V(() => [
964
- c(v, {
958
+ c(_, {
965
959
  name: "help",
966
960
  size: "sm",
967
961
  outline: !0
968
962
  })
969
963
  ]),
970
- _: 2
971
- }, 1032, ["content"])) : z("", !0)
964
+ _: 1
965
+ }, 8, ["content"])) : z("", !0)
972
966
  ]),
973
- a("div", Rr, O(x.sublabel), 1),
974
- x.action ? (C(), j(k, {
967
+ a("div", vr, O(x.sublabel), 1),
968
+ x.action ? (C(), j($, {
975
969
  key: 0,
976
970
  variant: "plain",
977
971
  label: x.action,
@@ -986,7 +980,7 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
986
980
  ]),
987
981
  _: 1
988
982
  }),
989
- r(d) && r(d).length > 0 ? (C(), j(i, {
983
+ r(u) && r(u).length > 0 ? (C(), j(d, {
990
984
  key: 1,
991
985
  variant: "outlined",
992
986
  class: "flex flex-col gap-16 p-16"
@@ -994,33 +988,36 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
994
988
  default: V(() => [
995
989
  c(P, { separator: !0 }, {
996
990
  default: V(() => [
997
- (C(!0), B(Y, null, re(r(d), (x, _) => (C(), j(Ge, {
998
- key: _,
991
+ (C(!0), B(Y, null, re(r(u), (x, v) => (C(), j(Ge, {
992
+ key: v,
999
993
  "reward-group": x,
1000
- level: _,
1001
- onEdit: (E) => D(_),
1002
- onRemove: (E) => s(_),
994
+ level: v,
995
+ onEdit: (E) => D(v),
996
+ onRemove: (E) => i(v),
1003
997
  onAddCount: t[0] || (t[0] = (E) => {
1004
998
  L({ groupIndex: E, countIndex: -1 });
1005
999
  })
1006
1000
  }, {
1007
1001
  default: V(() => [
1008
- a("div", Sr, [
1002
+ a("div", _r, [
1009
1003
  c(U, {
1010
- "row-data": x.rewards.map((E) => ({ ...E, groupIndex: _ })),
1004
+ "row-data": x.rewards.map((E) => ({ ...E, groupIndex: v })),
1011
1005
  "column-defs": h,
1012
1006
  "hide-footer": !0,
1013
1007
  "page-size": 50,
1014
- onRowClick: (E) => L({ groupIndex: _, countIndex: E.index })
1008
+ onRowClick: (E) => L({ groupIndex: v, countIndex: E.index })
1015
1009
  }, null, 8, ["row-data", "onRowClick"])
1016
1010
  ]),
1017
- x.rewards.length ? z("", !0) : (C(), B("div", $r, [
1018
- Fr,
1019
- c(k, {
1011
+ x.rewards.length ? z("", !0) : (C(), B("div", gr, [
1012
+ t[3] || (t[3] = a("div", { class: "flex flex-col gap-16 text-center" }, [
1013
+ a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
1014
+ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Add referral count to configure progression reward to the referral program ")
1015
+ ], -1)),
1016
+ c($, {
1020
1017
  variant: "secondary",
1021
1018
  label: "Add count",
1022
1019
  icon: "add",
1023
- onClick: (E) => L({ groupIndex: _, countIndex: -1 })
1020
+ onClick: (E) => L({ groupIndex: v, countIndex: -1 })
1024
1021
  }, null, 8, ["onClick"])
1025
1022
  ]))
1026
1023
  ]),
@@ -1031,20 +1028,23 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
1031
1028
  })
1032
1029
  ]),
1033
1030
  _: 1
1034
- })) : (C(), j(i, {
1031
+ })) : (C(), j(d, {
1035
1032
  key: 2,
1036
1033
  variant: "outlined",
1037
1034
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1038
1035
  }, {
1039
1036
  default: V(() => [
1040
- kr,
1041
- a("div", Pr, [
1042
- a("div", Vr, O(r(n)("connect.referral.referral_tier_title")), 1),
1043
- a("div", Ir, O(r(n)("connect.referral.referral_tier_description")), 1)
1037
+ t[4] || (t[4] = a("img", {
1038
+ src: ge,
1039
+ class: "aspect-square w-[150px]"
1040
+ }, null, -1)),
1041
+ a("div", wr, [
1042
+ a("div", yr, O(r(l)("connect.referral.referral_tier_title")), 1),
1043
+ a("div", br, O(r(l)("connect.referral.referral_tier_description")), 1)
1044
1044
  ]),
1045
- c(k, {
1045
+ c($, {
1046
1046
  variant: "primary",
1047
- label: r(n)("connect.referral.add_referral_tier"),
1047
+ label: r(l)("connect.referral.add_referral_tier"),
1048
1048
  icon: "add",
1049
1049
  disabled: !r(p).isPremium,
1050
1050
  onClick: t[1] || (t[1] = (x) => D(-1))
@@ -1054,26 +1054,26 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
1054
1054
  })),
1055
1055
  c(ye, {
1056
1056
  ref_key: "rewardGroupRef",
1057
- ref: u
1057
+ ref: m
1058
1058
  }, null, 512),
1059
1059
  c(qe, {
1060
1060
  ref_key: "editReferralCountSheetRef",
1061
1061
  ref: R,
1062
1062
  onUpdate: y
1063
1063
  }, null, 512),
1064
- c(hr, {
1064
+ c(sr, {
1065
1065
  ref_key: "manageCriteriaSheetRef",
1066
1066
  ref: A
1067
1067
  }, null, 512),
1068
- c(wr, {
1068
+ c(ur, {
1069
1069
  ref_key: "editRefereeRewardSheetRef",
1070
1070
  ref: T,
1071
- onUpdate: f
1071
+ onUpdate: n
1072
1072
  }, null, 512)
1073
1073
  ], 64);
1074
1074
  };
1075
1075
  }
1076
1076
  });
1077
1077
  export {
1078
- ot as default
1078
+ qr as default
1079
1079
  };