@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.39-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 (110) hide show
  1. package/dist/Analytic-D8WCDkga.js +427 -0
  2. package/dist/{App-D11A2JY1.js → App-CTnXtg1W.js} +352 -364
  3. package/dist/{Bin-9wV4Ah3M.js → Bin-BY6-bvFj.js} +8 -8
  4. package/dist/{Broadcast-I3BtSk8V.js → Broadcast-5VTEIQAr.js} +40 -40
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BuAQxEM4.js} +18 -18
  6. package/dist/{Card-CqALG5RM.js → Card-8ivdV-Qz.js} +159 -159
  7. package/dist/{Collections-rg3SzoUb.js → Collections-CFszRHmE.js} +91 -103
  8. package/dist/{Credit-BNn1sYZv.js → Credit-DFslY__4.js} +74 -74
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js} +488 -489
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js} +94 -94
  11. package/dist/{Experience-D_Qm8SUj.js → Experience-BxfiZNlY.js} +41 -41
  12. package/dist/{Game-CKXgXm6Q.js → Game-0FZJcLmj.js} +31 -31
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
  14. package/dist/{Index-D4DGfUHd.js → Index-ByeKKbuM.js} +10 -10
  15. package/dist/Marketing-C7F4abzg.js +319 -0
  16. package/dist/{Member-B55vWHDd.js → Member-DP0fLSIV.js} +64 -64
  17. package/dist/MemberList-DFW2bMbr.js +1606 -0
  18. package/dist/MemberOverview-C2n9oJZh.js +58 -0
  19. package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-CW62fvgx.js} +1 -1
  20. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-iJXNbgsB.js +455 -0
  21. package/dist/{Mission-CFvhROuB.js → Mission-DEgQHJw6.js} +21 -21
  22. package/dist/{Overview-4273yNwL.js → Overview-5jDtZKi8.js} +335 -335
  23. package/dist/{Point-B_-_C919.js → Point-D2lB1-xB.js} +41 -41
  24. package/dist/{Promotion-D2S3COxk.js → Promotion-Diz1gIa0.js} +42 -42
  25. package/dist/{Queue-BmS1Oi-C.js → Queue-DIAuq7HG.js} +51 -51
  26. package/dist/{Record-DRBl0M8g.js → Record-T608yda1.js} +9 -9
  27. package/dist/{Reward-8056NmfK.js → Reward-fZzHrHCW.js} +173 -173
  28. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js} +11 -11
  29. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js → RuleGroup.vue_vue_type_script_setup_true_lang-C3_lmBe5.js} +431 -431
  30. package/dist/Segment-DDQIzsrk.js +882 -0
  31. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-B5oUf91Q.js} +2 -2
  32. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js} +11 -11
  33. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRmqgxES.js} +3 -3
  34. package/dist/{Setting-BrJfYoru.js → Setting-CQNyXmp4.js} +432 -432
  35. package/dist/{Store-Bpl_4yZW.js → Store-CIA1Rtsg.js} +210 -210
  36. package/dist/StoreRewards-D5zlE6cE.js +423 -0
  37. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkTYngJ_.js +995 -0
  38. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D8l3fQyz.js} +1 -1
  39. package/dist/{Tier-_LnXg3n6.js → Tier-jFXVOje_.js} +106 -106
  40. package/dist/{Title-B7AGStvx.js → Title-DVpZ1YMK.js} +131 -133
  41. package/dist/{Transaction-Chxv6V7u.js → Transaction-BF_wmok6.js} +2 -2
  42. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cex1Z43W.js} +6 -6
  43. package/dist/{Voucher-C5z2kOq9.js → Voucher-CaBMU5w0.js} +37 -37
  44. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js +419 -0
  45. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js} +1 -1
  46. package/dist/{app-BVojNX0w.js → app-CPhyKlyf.js} +1 -1
  47. package/dist/{app-7cvPyHJ7.js → app-DuIzRGvb.js} +124 -161
  48. package/dist/app.js +3 -4
  49. package/dist/{business-CmxV69wT.js → business-TTvv3aTz.js} +1 -1
  50. package/dist/{campaign-Dq5C_no-.js → campaign-BiMCoAzx.js} +3 -5
  51. package/dist/{campaign-CT_cNJEL.js → campaign-CjEVStN1.js} +9 -9
  52. package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-DpYmj9jp.js} +1 -1
  53. package/dist/campaign.fn-DJ6J98jS.js +758 -0
  54. package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-Cgmm_s-C.js} +1 -1
  55. package/dist/{collection.fn-CNZRdUgy.js → collection.fn-BsYCNgfJ.js} +2 -2
  56. package/dist/{dto-CT9zZbv9.js → dto-DgmHIlZ2.js} +4 -4
  57. package/dist/{effect-FIlOEC4H.js → effect-DnAVIDFy.js} +1 -1
  58. package/dist/{email-addresses-Ba7xImfX.js → email-addresses-CMRgb6Uv.js} +1 -1
  59. package/dist/{export-uzjZFNF9.js → export-DtarK6IJ.js} +3 -3
  60. package/dist/{helper-D4sAZde0.js → helper-BKZghMbF.js} +1 -1
  61. package/dist/{index-l2F5MnLF.js → index-2OAcPmuQ.js} +1 -1
  62. package/dist/{index-BI3m1Ehv.js → index-B0YZKHyu.js} +3 -3
  63. package/dist/{index-CH3z92VV.js → index-B5oXFFlO.js} +1 -1
  64. package/dist/{index-CvBcve-r.js → index-BQ3KHJXX.js} +1 -1
  65. package/dist/{index-B9pl4zRZ.js → index-B_893fH7.js} +79 -179
  66. package/dist/{index-CNJLP3D5.js → index-BoR-BOFw.js} +1 -1
  67. package/dist/{index-DNxa8Rqx.js → index-C7rl1eHp.js} +449 -516
  68. package/dist/{index-BXz54M1s.js → index-CBcbwf0k.js} +1 -1
  69. package/dist/{index-CS3Jmojj.js → index-CIztuDE4.js} +2462 -2453
  70. package/dist/{index-D5rvMvzx.js → index-CK67enPK.js} +1 -1
  71. package/dist/index-CuvNtC_M.js +61 -0
  72. package/dist/index-D2uZzjpn.js +44 -0
  73. package/dist/{index-CUfS9Kp1.js → index-DWdAUovq.js} +9 -9
  74. package/dist/{index-CONvJfKv.js → index-DkWcEDHA.js} +1 -1
  75. package/dist/{index-BjU8LVUC.js → index-VHu8hYtE.js} +385 -376
  76. package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DkwLmmR_.js} +127 -127
  77. package/dist/{loading-BWGQSrCB.js → loading-BFkEqWR6.js} +1 -1
  78. package/dist/{membership-Cc4OZ8-U.js → membership-D0eN3i_T.js} +3 -3
  79. package/dist/{money-D7p8nfun.js → money-DS9ZQwSP.js} +1 -1
  80. package/dist/{number-CMJjC4qz.js → number-C8Gt93v9.js} +1 -1
  81. package/dist/objectid-Cr99eTPd.js +145 -0
  82. package/dist/{plugins-eQis66QR.js → plugins-DK_ue6Xa.js} +2 -2
  83. package/dist/{reward-DrnzbG20.js → reward-CW2dSLDW.js} +1 -1
  84. package/dist/{rule-CtRxkYXB.js → rule-CebKyXSm.js} +3 -3
  85. package/dist/{rule-builder-Di9RIYHF.js → rule-builder-kQq14RfN.js} +17 -17
  86. package/dist/style.css +1 -1
  87. package/dist/{template-C3UfY0v5.js → template-CxUxlb6-.js} +64 -64
  88. package/dist/{trigger-C9U7Zgad.js → trigger-RqJo06KA.js} +4 -4
  89. package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
  90. package/dist/{user-D7n9yYmO.js → user-DhV5Iy52.js} +1 -1
  91. package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-BtvUK9hI.js} +419 -419
  92. package/dist/{xlsx-D4S4qbcZ.js → xlsx-WnLDq4qn.js} +381 -381
  93. package/package.json +3 -9
  94. package/dist/Analytic-BjSfI2Ff.js +0 -761
  95. package/dist/AuditLogs-DWCFYoRg.js +0 -1887
  96. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
  97. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
  98. package/dist/Marketing-Dn9A1vgH.js +0 -20073
  99. package/dist/MemberList-BWTG9Ohy.js +0 -1606
  100. package/dist/MemberOverview-wL_ailso.js +0 -58
  101. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +0 -60279
  102. package/dist/Segment-Bzq-pyhc.js +0 -882
  103. package/dist/StoreRewards-Cu7n7Pjz.js +0 -423
  104. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +0 -1029
  105. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +0 -419
  106. package/dist/campaign.fn-BYZgKDN7.js +0 -758
  107. package/dist/index-CsaQJMAR.js +0 -66
  108. package/dist/index-CwsMG2cV.js +0 -56
  109. package/dist/objectid-D5T27iny.js +0 -145
  110. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
@@ -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 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";
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";
2
2
  import { _ as ge } from "./campaign-CpzFl8Vr.js";
3
- import { u as Z } from "./vue-i18n-Bz45zC04.js";
4
- import { u as ue } from "./loading-BWGQSrCB.js";
5
- import { c as we, p as K } from "./plugins-eQis66QR.js";
3
+ import { u as Z } from "./vue-i18n-BtvUK9hI.js";
4
+ import { u as ue } from "./loading-BFkEqWR6.js";
5
+ import { c as we, p as K } from "./plugins-DK_ue6Xa.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-CJ_WC2gV.js";
10
- import { u as me } from "./reward-DrnzbG20.js";
11
- import { a as be, b as xe } from "./index-B9pl4zRZ.js";
12
- import { l as le, c as se } from "./index-DNxa8Rqx.js";
13
- import "./index-CUfS9Kp1.js";
14
- import "./index-CONvJfKv.js";
15
- import "./index-BI3m1Ehv.js";
16
- import "./index-CS3Jmojj.js";
17
- import { C as fe } from "./membership-Cc4OZ8-U.js";
18
- import { t as ee } from "./helper-D4sAZde0.js";
9
+ import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js";
10
+ import { u as me } from "./reward-CW2dSLDW.js";
11
+ import { l as le, c as se } from "./index-C7rl1eHp.js";
12
+ import "./index-DWdAUovq.js";
13
+ import { a as be, b as xe } from "./index-B_893fH7.js";
14
+ import "./index-DkWcEDHA.js";
15
+ import "./index-B0YZKHyu.js";
16
+ import "./index-CIztuDE4.js";
17
+ import { C as fe } from "./membership-D0eN3i_T.js";
18
+ import { t as ee } from "./helper-BKZghMbF.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-BlXzEWA6.js";
22
- import { a as Se, _ as Fe, b as ke } from "./trigger-C9U7Zgad.js";
23
- import { O as $e } from "./objectid-D5T27iny.js";
24
- import { r as pe } from "./index-BXz54M1s.js";
25
- import { u as Pe } from "./business-CmxV69wT.js";
21
+ import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js";
22
+ import { a as Se, _ as $e, b as Fe } from "./trigger-RqJo06KA.js";
23
+ import { O as ke } from "./objectid-Cr99eTPd.js";
24
+ import { r as pe } from "./index-CBcbwf0k.js";
25
+ import { u as Pe } from "./business-TTvv3aTz.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(k, { emit: l }) {
40
- const { t: I } = Z(), p = l;
41
- return (g, f) => {
42
- const s = w("FmButton"), u = w("FmListItem");
39
+ setup(F, { emit: n }) {
40
+ const { t: I } = Z(), p = n;
41
+ return (g, m) => {
42
+ const l = w("FmButton"), d = w("FmListItem");
43
43
  return C(), B(Y, null, [
44
- c(u, {
45
- onClick: f[4] || (f[4] = (m) => p("edit", k.level)),
44
+ c(d, {
45
+ onClick: m[4] || (m[4] = (u) => p("edit", F.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(k.rewardGroup.name), 1)
53
+ a("div", Ae, O(F.rewardGroup.name), 1)
54
54
  ])
55
55
  ])
56
56
  ]),
57
57
  a("div", Le, [
58
- c(s, {
58
+ c(l, {
59
59
  variant: "secondary",
60
60
  label: r(I)("connect.referral.reward.add_count"),
61
61
  icon: "add",
62
- onClick: f[0] || (f[0] = (m) => {
63
- m.stopPropagation(), p("addCount", k.level);
62
+ onClick: m[0] || (m[0] = (u) => {
63
+ u.stopPropagation(), p("addCount", F.level);
64
64
  })
65
65
  }, null, 8, ["label"]),
66
- c(s, {
66
+ c(l, {
67
67
  icon: "delete",
68
- onClick: f[1] || (f[1] = (m) => {
69
- m.stopPropagation(), p("remove", k.level);
68
+ onClick: m[1] || (m[1] = (u) => {
69
+ u.stopPropagation(), p("remove", F.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(k.rewardGroup.name), 1)
80
+ a("div", De, O(F.rewardGroup.name), 1)
81
81
  ])
82
82
  ])
83
83
  ]),
84
- c(s, {
84
+ c(l, {
85
85
  variant: "tertiary",
86
86
  icon: "delete",
87
- onClick: f[2] || (f[2] = (m) => (m.stopPropagation(), p("remove", k.level)))
87
+ onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", F.level)))
88
88
  })
89
89
  ]),
90
- c(s, {
90
+ c(l, {
91
91
  class: "w-full",
92
92
  variant: "secondary",
93
93
  label: "Add count",
94
94
  disabled: !0,
95
95
  icon: "add",
96
- onClick: f[3] || (f[3] = (m) => (m.stopPropagation(), p("addCount", k.level)))
96
+ onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", F.level)))
97
97
  })
98
98
  ])
99
99
  ]),
100
100
  _: 1
101
101
  }),
102
- ve(g.$slots, "default")
102
+ _e(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(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({
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({
114
114
  code: "custom",
115
- message: `The min referral must be at least ${_.threshold.from + 1}`,
115
+ message: `The min referral must be at least ${v.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(s.value);
123
+ const e = A.safeParse(l.value);
124
124
  return e.success ? [] : e.error.errors;
125
125
  });
126
126
  function M() {
127
- const e = A.safeParse(s.value);
127
+ const e = A.safeParse(l.value);
128
128
  e.success && g("update", {
129
- groupIndex: u.value,
130
- countIndex: m.value,
129
+ groupIndex: d.value,
130
+ countIndex: u.value,
131
131
  referralCount: e.data
132
132
  });
133
133
  }
134
134
  async function D(e, t) {
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]
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]
139
139
  );
140
140
  else {
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 = {
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 = {
144
144
  threshold: {
145
- from: v != null && v.threshold ? v != null && v.threshold.to ? v.threshold.to + 1 : (v == null ? void 0 : v.threshold.from) + 1 : 1,
145
+ from: _ != null && _.threshold ? _ != null && _.threshold.to ? _.threshold.to + 1 : (_ == null ? void 0 : _.threshold.from) + 1 : 1,
146
146
  to: null
147
147
  },
148
148
  rewards: []
149
149
  };
150
150
  }
151
- h.value = [], h.value = i.value.map(
152
- (x) => s.value.rewards.includes(x.id)
151
+ h.value = [], h.value = s.value.map(
152
+ (x) => l.value.rewards.includes(x.id)
153
153
  );
154
154
  }
155
155
  function L() {
156
- f.value = !1;
156
+ m.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
- ], n = me(), o = F([]), i = G(() => n.rewards.map((e) => {
180
+ ], f = me(), o = $([]), s = G(() => f.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 = i.value;
200
+ const e = s.value;
201
201
  for (let t = 0; t < e.length; t++) {
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
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
205
205
  ));
206
206
  }
207
207
  }
208
- const h = F({});
209
- return ie(h, S, { deep: !0 }), l({
208
+ const h = $({});
209
+ return ie(h, S, { deep: !0 }), n({
210
210
  showSheet: D,
211
211
  hideSheet: L,
212
- data: s
212
+ data: l
213
213
  }), (e, t) => {
214
- const d = w("FmStepperField"), _ = w("FmHelperText"), b = w("FmTable"), $ = w("FmButton"), U = w("FmSideSheet");
214
+ const i = w("FmStepperField"), v = w("FmHelperText"), b = w("FmTable"), k = w("FmButton"), U = w("FmSideSheet");
215
215
  return C(), j(U, {
216
216
  "max-width": 1e3,
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")}`
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")}`
220
220
  }, {
221
221
  "side-sheet-footer": V(() => [
222
222
  a("div", Ye, [
223
- c($, {
223
+ c(k, {
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($, {
229
+ c(k, {
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(s) }, null, 8, ["json"]),
237
+ c(X, { json: r(l) }, 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(d, {
243
- modelValue: r(s).threshold.from,
244
- "onUpdate:modelValue": t[0] || (t[0] = (P) => r(s).threshold.from = P),
242
+ c(i, {
243
+ modelValue: r(l).threshold.from,
244
+ "onUpdate:modelValue": t[0] || (t[0] = (P) => r(l).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(d, {
261
- modelValue: r(s).threshold.to,
262
- "onUpdate:modelValue": t[1] || (t[1] = (P) => r(s).threshold.to = P),
260
+ c(i, {
261
+ modelValue: r(l).threshold.to,
262
+ "onUpdate:modelValue": t[1] || (t[1] = (P) => r(l).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(_, {
279
+ c(v, {
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(i),
294
+ "row-data": r(s),
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 = { 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({
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({
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(k, { emit: l }) {
316
- const I = k, p = l, g = G(() => [
315
+ setup(F, { emit: n }) {
316
+ const I = F, p = n, g = G(() => [
317
317
  le.enum.BILL_COMPLETED,
318
318
  le.enum.FEEDBACK
319
- ].map((f) => Se[f]));
320
- return (f, s) => {
321
- const u = w("FmCard");
319
+ ].map((m) => Se[m]));
320
+ return (m, l) => {
321
+ const d = w("FmCard");
322
322
  return C(), B("div", Ke, [
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,
323
+ Je,
324
+ a("div", We, [
325
+ (C(!0), B(Y, null, re(r(g), (u) => (C(), j(d, {
326
+ key: u.name,
327
327
  variant: "outlined",
328
328
  disabled: I.disabled,
329
- class: de(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
329
+ class: ce(["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)]": k.modelValue == m.value,
332
- "hover:bg-fm-color-opacity-sm": k.modelValue != m.value
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
333
333
  }]),
334
334
  onClick: () => {
335
- I.modelValue != m.value && !I.disabled && p("update:model-value", m.value);
335
+ I.modelValue != u.value && !I.disabled && p("update:model-value", u.value);
336
336
  }
337
337
  }, {
338
338
  default: V(() => [
339
- a("div", We, O(m.name), 1),
340
- a("div", Ze, O(m.description), 1)
339
+ a("div", Ze, O(u.name), 1),
340
+ a("div", Qe, O(u.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
- }), Xe = { class: "flex items-center gap-x-8" }, er = { class: "flex flex-col space-y-16 pr-12" }, rr = {
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 = {
349
349
  key: 0,
350
350
  class: "space-y-16"
351
- }, tr = {
351
+ }, sr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1), ir = {
352
352
  key: 1,
353
353
  class: "space-y-16"
354
- }, or = { class: "flex items-center gap-8" }, ar = /* @__PURE__ */ q({
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({
355
355
  __name: "EditCriteriaSheet",
356
356
  emits: ["update"],
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({
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({
360
360
  code: "custom",
361
361
  message: "Name must be less than 50 characters"
362
- }), y.name.length < 1 && n.addIssue({
362
+ }), y.name.length < 1 && f.addIssue({
363
363
  code: "custom",
364
364
  message: "Name is required"
365
365
  });
366
366
  }), A = G(() => {
367
- const y = R.safeParse(u.value);
367
+ const y = R.safeParse(d.value);
368
368
  return y.success ? [] : y.error.errors;
369
369
  });
370
- function T(y, n) {
370
+ function T(y, f) {
371
371
  var o;
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(),
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(),
376
376
  name: "",
377
377
  type: "AUTO",
378
378
  event: { type: "BILL_COMPLETED" }
379
379
  });
380
380
  }
381
381
  function M() {
382
- f.value = !1;
382
+ m.value = !1;
383
383
  }
384
384
  function D() {
385
- const y = R.safeParse(u.value);
386
- y.success && g("update", s.value, y.data);
385
+ const y = R.safeParse(d.value);
386
+ y.success && g("update", l.value, y.data);
387
387
  }
388
388
  function L(y) {
389
- u.value.type = y, y == "AUTO" ? u.value.event = { type: "BILL_COMPLETED" } : u.value.event = void 0;
389
+ d.value.type = y, y == "AUTO" ? d.value.event = { type: "BILL_COMPLETED" } : d.value.event = void 0;
390
390
  }
391
- return l({
391
+ return n({
392
392
  showSheet: T,
393
393
  hideSheet: M,
394
- data: u
395
- }), (y, n) => {
396
- const o = w("FmButton"), i = w("FmRadio"), S = w("FmRadioGroup"), h = w("FmSideSheet");
394
+ data: d
395
+ }), (y, f) => {
396
+ const o = w("FmButton"), s = w("FmRadio"), S = w("FmRadioGroup"), h = w("FmSideSheet");
397
397
  return C(), j(h, {
398
398
  "max-width": 768,
399
- modelValue: r(f),
400
- "onUpdate:modelValue": n[6] || (n[6] = (e) => J(f) ? f.value = e : null)
399
+ modelValue: r(m),
400
+ "onUpdate:modelValue": f[6] || (f[6] = (e) => J(m) ? m.value = e : null)
401
401
  }, {
402
402
  "side-sheet-header": V(() => [
403
- a("div", Xe, [
403
+ a("div", er, [
404
404
  c(o, {
405
405
  icon: "arrow_back",
406
406
  variant: "tertiary",
407
- onClick: n[0] || (n[0] = (e) => T(!1))
407
+ onClick: f[0] || (f[0] = (e) => T(!1))
408
408
  }),
409
- n[7] || (n[7] = ce("Add Criteria "))
409
+ de("Add Criteria ")
410
410
  ])
411
411
  ]),
412
412
  "side-sheet-footer": V(() => [
413
- a("div", or, [
413
+ a("div", dr, [
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: n[5] || (n[5] = (e) => T(!1)),
422
+ onClick: f[5] || (f[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(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)),
428
+ c(X, { json: r(d) }, null, 8, ["json"]),
429
+ a("div", rr, [
430
+ tr,
431
431
  c(Re, {
432
- modelValue: r(u).name,
433
- "onUpdate:modelValue": n[1] || (n[1] = (e) => r(u).name = e),
432
+ modelValue: r(d).name,
433
+ "onUpdate:modelValue": f[1] || (f[1] = (e) => r(d).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
- n[13] || (n[13] = a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1)),
437
+ or,
438
438
  c(S, {
439
- "model-value": r(u).type,
439
+ "model-value": r(d).type,
440
440
  label: "Verify status",
441
441
  "onUpdate:modelValue": L
442
442
  }, {
443
443
  default: V(() => [
444
- c(i, {
444
+ c(s, {
445
445
  value: "AUTO",
446
446
  label: "Auto",
447
447
  sublabel: "Verify based on rule configuration"
448
448
  }),
449
- c(i, {
449
+ c(s, {
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(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)
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)
463
463
  }, null, 8, ["model-value"]),
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)
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)
469
469
  }, null, 8, ["model-value"])
470
470
  ])) : z("", !0),
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)
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)
476
476
  }, null, 8, ["model-value"])
477
477
  ])) : z("", !0)
478
478
  ], 64)) : z("", !0)
@@ -484,46 +484,49 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
484
484
  }
485
485
  });
486
486
  function he() {
487
- const k = F(!1), l = Ce();
487
+ const F = $(!1), n = Ce();
488
488
  return {
489
489
  confirmUpdateReferralRecord: async () => {
490
490
  await new Promise((p) => {
491
- l.open({
491
+ n.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
- k.value = !0, p();
497
+ F.value = !0, p();
498
498
  }).onSecondary(async () => {
499
- k.value = !1, p();
499
+ F.value = !1, p();
500
500
  });
501
501
  });
502
502
  },
503
- updateReferralRecord: k
503
+ updateReferralRecord: F
504
504
  };
505
505
  }
506
- const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex justify-between items-center" }, sr = /* @__PURE__ */ q({
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({
507
510
  __name: "ManageCriteriaSheet",
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(
511
+ setup(F, { expose: n }) {
512
+ const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = he(), l = $(!1), d = $({}), u = Q(), R = $(
510
513
  null
511
514
  ), A = G(() => {
512
515
  var o;
513
- return (o = m.referralProgram) == null ? void 0 : o.criteria;
516
+ return (o = u.referralProgram) == null ? void 0 : o.criteria;
514
517
  });
515
518
  async function T(o) {
516
519
  await g(), await p(async () => {
517
520
  await pe.update({
518
521
  ...o,
519
- updateReferralRecord: f.value
520
- }), await m.readReferralProgram();
522
+ updateReferralRecord: m.value
523
+ }), await u.readReferralProgram();
521
524
  });
522
525
  }
523
- async function M(o, i) {
526
+ async function M(o, s) {
524
527
  var e, t;
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);
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);
527
530
  }
528
531
  async function D(o) {
529
532
  var h, e;
@@ -534,8 +537,8 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
534
537
  I("connect.prompt.cancel")
535
538
  ))
536
539
  return;
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);
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);
539
542
  }
540
543
  const L = [
541
544
  {
@@ -559,8 +562,8 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
559
562
  variant: "tertiary",
560
563
  icon: "delete",
561
564
  iconColor: "neutral-gray-400",
562
- onClick: (i) => {
563
- i.stopPropagation(), D(o.row.index);
565
+ onClick: (s) => {
566
+ s.stopPropagation(), D(o.row.index);
564
567
  }
565
568
  })
566
569
  ];
@@ -568,38 +571,35 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
568
571
  }
569
572
  ];
570
573
  function y(o) {
571
- s.value = o;
574
+ l.value = o;
572
575
  }
573
- function n() {
574
- s.value = !1;
576
+ function f() {
577
+ l.value = !1;
575
578
  }
576
- return l({
579
+ return n({
577
580
  showSheet: y,
578
- hideSheet: n,
579
- data: u
580
- }), (o, i) => {
581
+ hideSheet: f,
582
+ data: d
583
+ }), (o, s) => {
581
584
  const S = w("FmButton"), h = w("FmTable"), e = w("FmSideSheet");
582
585
  return C(), B(Y, null, [
583
586
  c(e, {
584
587
  "max-width": 768,
585
- modelValue: r(s),
586
- "onUpdate:modelValue": i[2] || (i[2] = (t) => J(s) ? s.value = t : null),
588
+ modelValue: r(l),
589
+ "onUpdate:modelValue": s[2] || (s[2] = (t) => J(l) ? l.value = t : null),
587
590
  header: "Manage Criteria"
588
591
  }, {
589
592
  default: V(() => [
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)),
593
+ a("div", mr, [
594
+ a("div", fr, [
595
+ pr,
596
596
  c(S, {
597
597
  label: "Add Criteria",
598
598
  icon: "add",
599
599
  variant: "secondary",
600
- onClick: i[0] || (i[0] = (t) => {
601
- var d;
602
- return (d = r(R)) == null ? void 0 : d.showSheet(!0);
600
+ onClick: s[0] || (s[0] = (t) => {
601
+ var i;
602
+ return (i = r(R)) == null ? void 0 : i.showSheet(!0);
603
603
  })
604
604
  })
605
605
  ]),
@@ -609,16 +609,16 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
609
609
  "page-size": 100,
610
610
  "shrink-at": !1,
611
611
  "column-defs": L,
612
- onRowClick: i[1] || (i[1] = (t) => {
613
- var d;
614
- return (d = r(R)) == null ? void 0 : d.showSheet(!0, t.index);
612
+ onRowClick: s[1] || (s[1] = (t) => {
613
+ var i;
614
+ return (i = r(R)) == null ? void 0 : i.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(ar, {
621
+ c(ur, {
622
622
  ref_key: "editCriteriaSheetRef",
623
623
  ref: R,
624
624
  onUpdate: M
@@ -626,20 +626,20 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
626
626
  ], 64);
627
627
  };
628
628
  }
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({
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({
630
630
  __name: "EditRefereeRewardSheet",
631
631
  emits: ["update"],
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);
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);
636
636
  }
637
637
  async function R(o) {
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));
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));
640
640
  }
641
641
  function A() {
642
- f.value = !1;
642
+ m.value = !1;
643
643
  }
644
644
  const T = [
645
645
  {
@@ -658,19 +658,19 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
658
658
  header: "Description",
659
659
  accessorFn: (o) => o.description,
660
660
  cell(o) {
661
- const i = o.row.original;
662
- if (i.collectible.type == "VOUCHER" || i.selectedReward == null)
663
- return i.description;
661
+ const s = o.row.original;
662
+ if (s.collectible.type == "VOUCHER" || s.selectedReward == null)
663
+ return s.description;
664
664
  }
665
665
  }
666
- ], M = me(), D = F([]), L = G(() => M.rewards.map((o) => {
667
- let i = "No expiry";
666
+ ], M = me(), D = $([]), L = G(() => M.rewards.map((o) => {
667
+ let s = "No expiry";
668
668
  switch (o.option.type) {
669
669
  case "VOUCHER":
670
- i = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
670
+ s = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
671
671
  break;
672
672
  case "LOYALTY":
673
- i = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
673
+ s = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
674
674
  break;
675
675
  }
676
676
  return {
@@ -678,52 +678,52 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
678
678
  name: o.name,
679
679
  collectible: o.option,
680
680
  collectibleConfig: o.collectibleConfig,
681
- description: i
681
+ description: s
682
682
  };
683
683
  }));
684
684
  G(() => []);
685
685
  function y() {
686
686
  const o = L.value;
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));
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));
690
690
  }
691
691
  }
692
- const n = F({});
693
- return ie(n, y, { deep: !0 }), l({
692
+ const f = $({});
693
+ return ie(f, y, { deep: !0 }), n({
694
694
  showSheet: R,
695
695
  hideSheet: A,
696
- data: s
697
- }), (o, i) => {
696
+ data: l
697
+ }), (o, s) => {
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(f),
702
- "onUpdate:modelValue": i[2] || (i[2] = (t) => J(f) ? f.value = t : null),
701
+ modelValue: r(m),
702
+ "onUpdate:modelValue": s[2] || (s[2] = (t) => J(m) ? m.value = t : null),
703
703
  header: "Referee reward"
704
704
  }, {
705
705
  "side-sheet-footer": V(() => [
706
- a("div", cr, [
706
+ a("div", gr, [
707
707
  c(h, {
708
708
  label: r(p)("connect.common.save"),
709
- onClick: m,
709
+ onClick: u,
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: i[1] || (i[1] = (t) => A()),
715
+ onClick: s[1] || (s[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(s) }, null, 8, ["json"]),
722
- a("div", ir, [
723
- a("div", dr, O(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
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),
724
724
  c(S, {
725
- modelValue: r(n),
726
- "onUpdate:modelValue": i[0] || (i[0] = (t) => J(n) ? n.value = t : null),
725
+ modelValue: r(f),
726
+ "onUpdate:modelValue": s[0] || (s[0] = (t) => J(f) ? f.value = t : null),
727
727
  selection: "multiple",
728
728
  "column-filter": r(D),
729
729
  "column-defs": T,
@@ -736,42 +736,48 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
736
736
  }, 8, ["modelValue"]);
737
737
  };
738
738
  }
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 = {
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 = {
740
740
  key: 0,
741
741
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
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({
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({
743
749
  __name: "Overview",
744
- setup(k) {
745
- const { t: l } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: s } = he(), u = G(() => {
750
+ setup(F) {
751
+ const { t: n } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: l } = he(), d = G(() => {
746
752
  var e;
747
753
  return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
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, _;
754
+ }), u = $(null);
755
+ $(null);
756
+ const R = $(null), A = $(null), T = $(null), M = G(() => {
757
+ var e, t, i, v;
752
758
  return [
753
759
  {
754
760
  label: "connect.referral.how_it_works.generate_link",
755
- sublabel: l("connect.referral.how_it_works.generate_link_for_member"),
761
+ sublabel: n("connect.referral.how_it_works.generate_link_for_member"),
756
762
  icon: "offline_share"
757
763
  },
758
764
  {
759
765
  label: "connect.referral.how_it_works.referee_join_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"),
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"),
762
768
  onClick: () => {
763
769
  var b;
764
770
  return (b = T.value) == null ? void 0 : b.showSheet(!0);
765
771
  },
766
- helperText: l(
772
+ helperText: n(
767
773
  "connect.referral.how_it_works.referee_join_reward_description"
768
774
  ),
769
775
  icon: "group_add"
770
776
  },
771
777
  {
772
778
  label: "connect.referral.how_it_works.referee_meet_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"),
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"),
775
781
  onClick: () => {
776
782
  var b;
777
783
  return (b = A.value) == null ? void 0 : b.showSheet(!0);
@@ -780,15 +786,15 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
780
786
  },
781
787
  {
782
788
  label: "connect.referral.how_it_works.referer_get_reward",
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"),
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"),
785
791
  icon: "featured_seasonal_and_gifts"
786
792
  }
787
793
  ];
788
794
  });
789
795
  function D(e) {
790
796
  var t;
791
- (t = m.value) == null || t.onManageRewardGroup(e);
797
+ (t = u.value) == null || t.onManageRewardGroup(e);
792
798
  }
793
799
  function L(e) {
794
800
  var t;
@@ -798,57 +804,57 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
798
804
  });
799
805
  }
800
806
  async function y(e) {
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(
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(
803
809
  g.referralProgram
804
- ), b = _.reward[e.groupIndex];
810
+ ), b = v.reward[e.groupIndex];
805
811
  b.rewards[t] = e.referralCount;
806
- const $ = b.rewards[t - 1], U = b.rewards[t + 1];
807
- if ($ && $.threshold.to != d.threshold.from - 1) {
812
+ const k = b.rewards[t - 1], U = b.rewards[t + 1];
813
+ if (k && k.threshold.to != i.threshold.from - 1) {
808
814
  if (!await K.confirm(
809
- l(
815
+ n(
810
816
  "connect.referral.referral_count.update.range_discontinuous.previous",
811
817
  {
812
- name: $.threshold.from,
813
- from: $.threshold.from ?? 0,
814
- to: $.threshold.to ?? 1 / 0,
815
- newTo: d.threshold.from - 1
818
+ name: k.threshold.from,
819
+ from: k.threshold.from ?? 0,
820
+ to: k.threshold.to ?? 1 / 0,
821
+ newTo: i.threshold.from - 1
816
822
  }
817
823
  ),
818
- l("connect.referral.referral_count.title"),
819
- l("connect.referral.referral_count.remove.next_range")
824
+ n("connect.referral.referral_count.title"),
825
+ n("connect.referral.referral_count.remove.next_range")
820
826
  ))
821
827
  return;
822
- $.threshold.to = d.threshold.from - 1;
828
+ k.threshold.to = i.threshold.from - 1;
823
829
  }
824
- if (U && U.threshold.from - 1 != d.threshold.to) {
830
+ if (U && U.threshold.from - 1 != i.threshold.to) {
825
831
  if (!await K.confirm(
826
- l("connect.program.tier.update.range_discontinuous.next", {
832
+ n("connect.program.tier.update.range_discontinuous.next", {
827
833
  name: U.threshold.from,
828
834
  from: U.threshold.from ?? 0,
829
835
  to: U.threshold.to ?? 1 / 0,
830
- newFrom: d.threshold.to ?? 1
836
+ newFrom: i.threshold.to ?? 1
831
837
  }),
832
- l("connect.program.tier.title"),
833
- l("connect.program.tier.remove.next_range"),
834
- l("connect.prompt.cancel")
838
+ n("connect.program.tier.title"),
839
+ n("connect.program.tier.remove.next_range"),
840
+ n("connect.prompt.cancel")
835
841
  ))
836
842
  return;
837
- U.threshold.from = (d.threshold.to ?? 0) + 1;
843
+ U.threshold.from = (i.threshold.to ?? 0) + 1;
838
844
  }
839
- !U && !((v = d.threshold) != null && v.to) && (d.threshold.to = void 0), await o(_), (E = R.value) == null || E.hideSheet();
845
+ !U && !((_ = i.threshold) != null && _.to) && (i.threshold.to = void 0), await o(v), (E = R.value) == null || E.hideSheet();
840
846
  }
841
- async function n(e) {
842
- var d;
847
+ async function f(e) {
848
+ var i;
843
849
  const t = H(g.referralProgram);
844
- t.refereeReward = e, await o(t), (d = T.value) == null || d.hideSheet();
850
+ t.refereeReward = e, await o(t), (i = T.value) == null || i.hideSheet();
845
851
  }
846
852
  async function o(e) {
847
- await f(), await I(
853
+ await m(), await I(
848
854
  async () => {
849
855
  await pe.update({
850
856
  ...e,
851
- updateReferralRecord: s.value
857
+ updateReferralRecord: l.value
852
858
  }), await g.readReferralProgram();
853
859
  },
854
860
  {
@@ -857,12 +863,12 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
857
863
  }
858
864
  );
859
865
  }
860
- async function i(e) {
866
+ async function s(e) {
861
867
  if (!await K.remove(
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")
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")
866
872
  ))
867
873
  return;
868
874
  const t = H(g.referralProgram);
@@ -870,36 +876,36 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
870
876
  }
871
877
  async function S(e, t) {
872
878
  if (!await K.remove(
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")
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")
877
883
  ))
878
884
  return;
879
- const d = H(g.referralProgram), _ = d.reward[e].rewards[t + 1];
880
- if (_) {
885
+ const i = H(g.referralProgram), v = i.reward[e].rewards[t + 1];
886
+ if (v) {
881
887
  if (!await K.confirm(
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
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
886
892
  }),
887
- l("connect.referral.referral_count.remove.title"),
888
- l("connect.referral.referral_count.remove.next_range"),
889
- l("connect.prompt.cancel")
893
+ n("connect.referral.referral_count.remove.title"),
894
+ n("connect.referral.referral_count.remove.next_range"),
895
+ n("connect.prompt.cancel")
890
896
  ))
891
897
  return;
892
- _.threshold.from = d.reward[e].rewards[t].threshold.from;
898
+ v.threshold.from = i.reward[e].rewards[t].threshold.from;
893
899
  }
894
- d.reward[e].rewards.splice(t, 1), await o(d);
900
+ i.reward[e].rewards.splice(t, 1), await o(i);
895
901
  }
896
902
  const h = [
897
903
  {
898
- header: l("connect.referral.reward.table.count"),
904
+ header: n("connect.referral.reward.table.count"),
899
905
  accessorFn: (e) => e.threshold.from == e.threshold.to ? `${e.threshold.from}` : e.threshold.to ? `${e.threshold.from} - ${e.threshold.to ?? "∞"}` : `${e.threshold.from}+`
900
906
  },
901
907
  {
902
- header: l("connect.referral.reward.table.reward"),
908
+ header: n("connect.referral.reward.table.reward"),
903
909
  accessorKey: "type",
904
910
  accessorFn: (e) => {
905
911
  var t;
@@ -924,38 +930,38 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
924
930
  }
925
931
  }
926
932
  ];
927
- return _e(async () => {
933
+ return ve(async () => {
928
934
  await g.readReferralProgram();
929
935
  }), (e, t) => {
930
- const d = w("FmCard"), _ = w("FmIcon"), b = w("FmTooltip"), $ = w("FmButton"), U = w("FmTable"), P = w("FmList");
936
+ const i = w("FmCard"), v = w("FmIcon"), b = w("FmTooltip"), k = w("FmButton"), U = w("FmTable"), P = w("FmList");
931
937
  return C(), B(Y, null, [
932
938
  z("", !0),
933
- c(d, {
939
+ c(i, {
934
940
  variant: "outlined",
935
941
  class: "flex flex-col gap-16 p-16"
936
942
  }, {
937
943
  default: V(() => [
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 }])
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 }])
943
949
  }, [
944
- a("div", pr, [
945
- c(_, {
950
+ a("div", xr, [
951
+ c(v, {
946
952
  name: x.icon,
947
953
  color: "primary",
948
954
  class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
949
955
  }, null, 8, ["name"]),
950
956
  a("div", null, [
951
- a("div", hr, [
952
- ce(O(r(l)(x.label)) + " ", 1),
957
+ a("div", Cr, [
958
+ de(O(r(n)(x.label)) + " ", 1),
953
959
  x.helperText ? (C(), j(b, {
954
960
  key: 0,
955
961
  content: x.helperText
956
962
  }, {
957
963
  default: V(() => [
958
- c(_, {
964
+ c(v, {
959
965
  name: "help",
960
966
  size: "sm",
961
967
  outline: !0
@@ -964,8 +970,8 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
964
970
  _: 2
965
971
  }, 1032, ["content"])) : z("", !0)
966
972
  ]),
967
- a("div", vr, O(x.sublabel), 1),
968
- x.action ? (C(), j($, {
973
+ a("div", Rr, O(x.sublabel), 1),
974
+ x.action ? (C(), j(k, {
969
975
  key: 0,
970
976
  variant: "plain",
971
977
  label: x.action,
@@ -980,7 +986,7 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
980
986
  ]),
981
987
  _: 1
982
988
  }),
983
- r(u) && r(u).length > 0 ? (C(), j(d, {
989
+ r(d) && r(d).length > 0 ? (C(), j(i, {
984
990
  key: 1,
985
991
  variant: "outlined",
986
992
  class: "flex flex-col gap-16 p-16"
@@ -988,36 +994,33 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
988
994
  default: V(() => [
989
995
  c(P, { separator: !0 }, {
990
996
  default: V(() => [
991
- (C(!0), B(Y, null, re(r(u), (x, v) => (C(), j(Ge, {
992
- key: v,
997
+ (C(!0), B(Y, null, re(r(d), (x, _) => (C(), j(Ge, {
998
+ key: _,
993
999
  "reward-group": x,
994
- level: v,
995
- onEdit: (E) => D(v),
996
- onRemove: (E) => i(v),
1000
+ level: _,
1001
+ onEdit: (E) => D(_),
1002
+ onRemove: (E) => s(_),
997
1003
  onAddCount: t[0] || (t[0] = (E) => {
998
1004
  L({ groupIndex: E, countIndex: -1 });
999
1005
  })
1000
1006
  }, {
1001
1007
  default: V(() => [
1002
- a("div", _r, [
1008
+ a("div", Sr, [
1003
1009
  c(U, {
1004
- "row-data": x.rewards.map((E) => ({ ...E, groupIndex: v })),
1010
+ "row-data": x.rewards.map((E) => ({ ...E, groupIndex: _ })),
1005
1011
  "column-defs": h,
1006
1012
  "hide-footer": !0,
1007
1013
  "page-size": 50,
1008
- onRowClick: (E) => L({ groupIndex: v, countIndex: E.index })
1014
+ onRowClick: (E) => L({ groupIndex: _, countIndex: E.index })
1009
1015
  }, null, 8, ["row-data", "onRowClick"])
1010
1016
  ]),
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($, {
1017
+ x.rewards.length ? z("", !0) : (C(), B("div", $r, [
1018
+ Fr,
1019
+ c(k, {
1017
1020
  variant: "secondary",
1018
1021
  label: "Add count",
1019
1022
  icon: "add",
1020
- onClick: (E) => L({ groupIndex: v, countIndex: -1 })
1023
+ onClick: (E) => L({ groupIndex: _, countIndex: -1 })
1021
1024
  }, null, 8, ["onClick"])
1022
1025
  ]))
1023
1026
  ]),
@@ -1028,23 +1031,20 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
1028
1031
  })
1029
1032
  ]),
1030
1033
  _: 1
1031
- })) : (C(), j(d, {
1034
+ })) : (C(), j(i, {
1032
1035
  key: 2,
1033
1036
  variant: "outlined",
1034
1037
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1035
1038
  }, {
1036
1039
  default: V(() => [
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)
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)
1044
1044
  ]),
1045
- c($, {
1045
+ c(k, {
1046
1046
  variant: "primary",
1047
- label: r(l)("connect.referral.add_referral_tier"),
1047
+ label: r(n)("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 nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
1054
1054
  })),
1055
1055
  c(ye, {
1056
1056
  ref_key: "rewardGroupRef",
1057
- ref: m
1057
+ ref: u
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(sr, {
1064
+ c(hr, {
1065
1065
  ref_key: "manageCriteriaSheetRef",
1066
1066
  ref: A
1067
1067
  }, null, 512),
1068
- c(ur, {
1068
+ c(wr, {
1069
1069
  ref_key: "editRefereeRewardSheetRef",
1070
1070
  ref: T,
1071
- onUpdate: n
1071
+ onUpdate: f
1072
1072
  }, null, 512)
1073
1073
  ], 64);
1074
1074
  };
1075
1075
  }
1076
1076
  });
1077
1077
  export {
1078
- qr as default
1078
+ ot as default
1079
1079
  };