@feedmepos/mf-connect 0.1.10-prod → 0.1.12-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 (81) hide show
  1. package/dist/{Analytic-CpSbitWV.js → Analytic-D_0-S9bm.js} +9 -9
  2. package/dist/{App-BPT8XzjX.js → App-CRUf3Y0S.js} +6 -6
  3. package/dist/{Broadcast-CJHpiQeN.js → Broadcast-B0pjSEvx.js} +8 -8
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DUPqWdIm.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-k3T8QO9-.js} +7 -7
  5. package/dist/{Card-Bvn36zqZ.js → Card-DK6dhPcq.js} +15 -15
  6. package/dist/{Collections-Bq6OxsJC.js → Collections-C7dc9NQd.js} +5 -5
  7. package/dist/{Credit-Dno_g7dW.js → Credit-B2QhAnU7.js} +8 -8
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-cGbwORhw.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CWMtJS9Z.js} +28 -28
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Ho7zwlbb.js → EffectSheet.vue_vue_type_style_index_0_lang-C09W42uh.js} +6 -6
  10. package/dist/{Experience-BC1qSIGO.js → Experience-4j5Hoeig.js} +8 -8
  11. package/dist/{Game-C_CKGMBW.js → Game-Dvc5v56r.js} +8 -8
  12. package/dist/{Index-BXFaWTfw.js → Index-vWNoadSH.js} +80 -77
  13. package/dist/{Marketing-Ni0WAie5.js → Marketing-DkkAcFb4.js} +5 -5
  14. package/dist/{Member-djnisrK1.js → Member-CM1b1duv.js} +4 -4
  15. package/dist/{MemberList-CclU-3B7.js → MemberList-b2Rlocct.js} +14 -14
  16. package/dist/{MemberTransactions-DVVsv3Ux.js → MemberTransactions-Fj2nJ4Ur.js} +1 -1
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-khyDg1m4.js → MessageInput.vue_vue_type_script_setup_true_lang-BZKudA25.js} +2 -2
  18. package/dist/{Mission-Z5somdo_.js → Mission-KLaXikD6.js} +8 -8
  19. package/dist/{Overview-BvMVz3lQ.js → Overview-BUc3n5O3.js} +400 -396
  20. package/dist/{Point-DdPukiTg.js → Point-hB9FCAw0.js} +8 -8
  21. package/dist/{Promotion-DCqdIwjG.js → Promotion-3yLTsHvx.js} +9 -9
  22. package/dist/Record-BZlaZcFg.js +338 -0
  23. package/dist/{Reward-CiJHGXfQ.js → Reward-CyO0pKoa.js} +14 -14
  24. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CrGCBRmH.js → RewardGroup.vue_vue_type_script_setup_true_lang-UYD9G3y0.js} +11 -11
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-tnT6i0Jq.js → RuleGroup.vue_vue_type_script_setup_true_lang-DUKyzpZK.js} +13 -13
  26. package/dist/{Segment-CQb3j-o0.js → Segment-BXV6-vOS.js} +13 -13
  27. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-B7YqIU5D.js → SelectItems.vue_vue_type_script_setup_true_lang-3pUUUAKD.js} +2 -2
  28. package/dist/{Setting-91cK3ssU.js → Setting-CFZdsnpN.js} +8 -8
  29. package/dist/{Store-B-uldUKt.js → Store-7vr-PeY6.js} +18 -18
  30. package/dist/{StoreRewards-dDNeFlA9.js → StoreRewards-Cqth7AIJ.js} +12 -12
  31. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BVb1X0aq.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D0L5FGVd.js} +18 -18
  32. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Ds0WxGxr.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-B79xzd2T.js} +1 -1
  33. package/dist/{Tier-_jMaLj3u.js → Tier-im_GyLWx.js} +19 -19
  34. package/dist/{Title-By7o67aT.js → Title-BhudgeSH.js} +19 -19
  35. package/dist/{Transaction-BLpEgeI2.js → Transaction-CnugRki7.js} +2 -2
  36. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Bf_nO9zH.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-m-_fdbTx.js} +6 -6
  37. package/dist/{Voucher-CG5tfibn.js → Voucher-WB5QSvGY.js} +11 -11
  38. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DpQUoXyQ.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DK0pDVj1.js} +10 -10
  39. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-YwGR2En3.js → ZodTextField.vue_vue_type_script_setup_true_lang-DWV8fnLD.js} +1 -1
  40. package/dist/{app-vCqTQIeC.js → app-C3K2hDWf.js} +623 -490
  41. package/dist/{app-DDmTqTb7.js → app-NqsHFVEk.js} +1 -1
  42. package/dist/app.js +1 -1
  43. package/dist/{business-Cz78KGF2.js → business-CcRzjtxz.js} +1 -1
  44. package/dist/{campaign-BBd4o7F_.js → campaign-B67A_7OK.js} +2 -2
  45. package/dist/{campaign.enum-CIhi0b-m.js → campaign.enum-ByK4gMba.js} +1 -1
  46. package/dist/{campaign.fn-5silF1DK.js → campaign.fn-DzGsXCdF.js} +142 -142
  47. package/dist/{collectible.enum-cMIQ6ogq.js → collectible.enum-BqASpzzd.js} +1 -1
  48. package/dist/{collection.fn-BGc7Qeli.js → collection.fn-D2WvxL88.js} +2 -2
  49. package/dist/{dto-i04OPJfW.js → dto-Dw255bzd.js} +10 -10
  50. package/dist/{effect-D8UzkYRg.js → effect-BxPu1FzR.js} +1 -1
  51. package/dist/{email-addresses-u05o35hN.js → email-addresses-DcK0Q2zA.js} +1 -1
  52. package/dist/{export-BEXuPYEd.js → export-7jK-Ioe-.js} +3 -3
  53. package/dist/{helper-RptRJGv6.js → helper-lXhemocG.js} +1 -1
  54. package/dist/{index-g8EbRVnr.js → index-1l0_N69H.js} +1 -1
  55. package/dist/{index-BjHZUhiH.js → index-96KcJ-Wb.js} +1 -1
  56. package/dist/{index-hEE_ntHd.js → index-B9BSm7oO.js} +1 -1
  57. package/dist/{index-B8s-gucK.js → index-BC2jOmNm.js} +1 -1
  58. package/dist/{index-Bpu2DYUc.js → index-BhchMLq2.js} +2 -2
  59. package/dist/{index-DFAnoAe9.js → index-C8XNjc5V.js} +1 -1
  60. package/dist/{index-UfL5qRzR.js → index-CQL21tjK.js} +4 -4
  61. package/dist/{index-C6-rCMhD.js → index-D2P6nwsu.js} +3 -3
  62. package/dist/{index-DwzoqCt8.js → index-D42yBguK.js} +3 -3
  63. package/dist/{index-Dt6K2eG8.js → index-DG2-DF-P.js} +1 -1
  64. package/dist/{index-Cq_ZIbRm.js → index-D_uxupsH.js} +7 -7
  65. package/dist/{index-DbyJ6Nyn.js → index-DtMb1Vde.js} +3 -3
  66. package/dist/{index.esm2017-BSzW_yaL.js → index.esm2017-D1A8aO1S.js} +1 -1
  67. package/dist/{loading-DjEdwdnj.js → loading-D2WV28Cg.js} +4 -4
  68. package/dist/{membership-BL9Xs8lD.js → membership-YYMIuLdo.js} +3 -3
  69. package/dist/{money-D7lq0cx-.js → money-JypeKzEz.js} +1 -1
  70. package/dist/{number-BiDabTkI.js → number-B2nrtMri.js} +1 -1
  71. package/dist/{objectid-CXf0jb1W.js → objectid-9TjXs_6J.js} +11 -11
  72. package/dist/{reward-Cr8rbe5R.js → reward-DkpMRLGx.js} +1 -1
  73. package/dist/{rule-vkYJij4h.js → rule-Bpwn27Yr.js} +3 -3
  74. package/dist/{rule-builder-DPKFZ5UX.js → rule-builder-BQ6QcxJ2.js} +1 -1
  75. package/dist/{template-Bep5Y5ch.js → template-C-b_3Q0G.js} +4 -4
  76. package/dist/{trigger-fWhQ3bqv.js → trigger-DE5iEB5A.js} +4 -4
  77. package/dist/{usePagination-DSF5b4hM.js → usePagination-C_YZGKWk.js} +1 -1
  78. package/dist/{user-9UiaP0xs.js → user-VhJqEOJm.js} +1 -1
  79. package/dist/{vue-i18n-BhiDOB1j.js → vue-i18n-BfBJ65t0.js} +288 -288
  80. package/package.json +1 -1
  81. package/dist/Record-CvMxXm1B.js +0 -337
@@ -1,28 +1,28 @@
1
- import { defineComponent as q, resolveComponent as w, openBlock as R, createElementBlock as B, Fragment as Y, createVNode as i, withCtx as V, createElementVNode as a, toDisplayString as O, unref as t, renderSlot as _e, ref as $, computed as G, watch as ie, createBlock as D, isRef as W, resolveDynamicComponent as ne, renderList as te, normalizeClass as de, createTextVNode as ce, createCommentVNode as z, h as re, 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 _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-BhiDOB1j.js";
4
- import { c as we, p as K, u as ue } from "./loading-DjEdwdnj.js";
3
+ import { u as Z } from "./vue-i18n-BfBJ65t0.js";
4
+ import { c as we, p as K, u as ue } from "./loading-D2WV28Cg.js";
5
5
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
6
6
  import { Z as N } from "./zod-Bg2FbC-D.js";
7
- import { u as J } from "./app-wDQR6dpb.js";
8
- import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-CrGCBRmH.js";
9
- import { u as me } from "./reward-Cr8rbe5R.js";
10
- import "./index-DwzoqCt8.js";
11
- import "./index-Bpu2DYUc.js";
12
- import { k as le, l as se } from "./index-UfL5qRzR.js";
13
- import { a as be, b as xe } from "./index-Cq_ZIbRm.js";
14
- import "./index-hEE_ntHd.js";
15
- import "./index-DbyJ6Nyn.js";
16
- import { C as fe } from "./membership-BL9Xs8lD.js";
17
- import { t as ee } from "./helper-RptRJGv6.js";
7
+ import { u as W } from "./app-wDQR6dpb.js";
8
+ import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-UYD9G3y0.js";
9
+ import { u as me } from "./reward-DkpMRLGx.js";
10
+ import "./index-D42yBguK.js";
11
+ import "./index-BhchMLq2.js";
12
+ import { k as le, l as se } from "./index-CQL21tjK.js";
13
+ import { a as be, b as xe } from "./index-D_uxupsH.js";
14
+ import "./index-B9BSm7oO.js";
15
+ import "./index-DtMb1Vde.js";
16
+ import { C as fe } from "./membership-YYMIuLdo.js";
17
+ import { t as ee } from "./helper-lXhemocG.js";
18
18
  import { c as H } from "./object-qECH92oz.js";
19
- import { useDialog as Re, components as oe } from "@feedmepos/ui-library";
20
- import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-YwGR2En3.js";
21
- import { b as Se, _ as $e, a as Fe } from "./trigger-fWhQ3bqv.js";
22
- import { O as ke } from "./objectid-CXf0jb1W.js";
23
- import { r as pe } from "./index-g8EbRVnr.js";
24
- import { u as Pe } from "./business-Cz78KGF2.js";
25
- 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" }, De = { class: "flex-1 space-y-4" }, je = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
19
+ import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
20
+ import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DWV8fnLD.js";
21
+ import { b as Se, _ as $e, a as ke } from "./trigger-DE5iEB5A.js";
22
+ import { O as Fe } from "./objectid-9TjXs_6J.js";
23
+ import { r as pe } from "./index-1l0_N69H.js";
24
+ import { u as Pe } from "./business-CcRzjtxz.js";
25
+ 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({
26
26
  __name: "ReferralRewadGroupCard",
27
27
  props: {
28
28
  rewardGroup: {
@@ -35,13 +35,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
35
35
  }
36
36
  },
37
37
  emits: ["edit", "addCount", "remove"],
38
- setup(F, { emit: u }) {
39
- const { t: I } = Z(), p = u;
38
+ setup(k, { emit: n }) {
39
+ const { t: I } = Z(), p = n;
40
40
  return (g, m) => {
41
- const n = w("FmButton"), d = w("FmListItem");
42
- return R(), B(Y, null, [
43
- i(d, {
44
- onClick: m[4] || (m[4] = (c) => p("edit", F.level)),
41
+ const l = w("FmButton"), d = w("FmListItem");
42
+ return C(), B(Y, null, [
43
+ c(d, {
44
+ onClick: m[4] || (m[4] = (u) => p("edit", k.level)),
45
45
  class: "!p-0"
46
46
  }, {
47
47
  default: V(() => [
@@ -49,23 +49,23 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
49
49
  a("div", Ie, [
50
50
  a("div", Te, [
51
51
  a("div", Ue, [
52
- a("div", Ae, O(F.rewardGroup.name), 1)
52
+ a("div", Ae, O(k.rewardGroup.name), 1)
53
53
  ])
54
54
  ])
55
55
  ]),
56
56
  a("div", Le, [
57
- i(n, {
57
+ c(l, {
58
58
  variant: "secondary",
59
- label: t(I)("connect.referral.reward.add_count"),
59
+ label: r(I)("connect.referral.reward.add_count"),
60
60
  icon: "add",
61
- onClick: m[0] || (m[0] = (c) => {
62
- c.stopPropagation(), p("addCount", F.level);
61
+ onClick: m[0] || (m[0] = (u) => {
62
+ u.stopPropagation(), p("addCount", k.level);
63
63
  })
64
64
  }, null, 8, ["label"]),
65
- i(n, {
65
+ c(l, {
66
66
  icon: "delete",
67
- onClick: m[1] || (m[1] = (c) => {
68
- c.stopPropagation(), p("remove", F.level);
67
+ onClick: m[1] || (m[1] = (u) => {
68
+ u.stopPropagation(), p("remove", k.level);
69
69
  }),
70
70
  variant: "tertiary"
71
71
  })
@@ -74,25 +74,25 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
74
74
  a("div", Ee, [
75
75
  a("div", Be, [
76
76
  a("div", Oe, [
77
- a("div", De, [
77
+ a("div", je, [
78
78
  a("div", null, [
79
- a("div", je, O(F.rewardGroup.name), 1)
79
+ a("div", De, O(k.rewardGroup.name), 1)
80
80
  ])
81
81
  ])
82
82
  ]),
83
- i(n, {
83
+ c(l, {
84
84
  variant: "tertiary",
85
85
  icon: "delete",
86
- onClick: m[2] || (m[2] = (c) => (c.stopPropagation(), p("remove", F.level)))
86
+ onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", k.level)))
87
87
  })
88
88
  ]),
89
- i(n, {
89
+ c(l, {
90
90
  class: "w-full",
91
91
  variant: "secondary",
92
92
  label: "Add count",
93
93
  disabled: !0,
94
94
  icon: "add",
95
- onClick: m[3] || (m[3] = (c) => (c.stopPropagation(), p("addCount", F.level)))
95
+ onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", k.level)))
96
96
  })
97
97
  ])
98
98
  ]),
@@ -102,44 +102,44 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
102
102
  ], 64);
103
103
  };
104
104
  }
105
- }), Me = { class: "flex flex-col space-y-16 pr-12" }, Ne = { class: "flex gap-16 items-center" }, He = /* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " When max. referral count is not set, it will default unlimited ", -1), ze = { class: "fm-typo-en-title-sm-800" }, Ye = { class: "flex items-center gap-8" }, qe = /* @__PURE__ */ q({
105
+ }), 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({
106
106
  __name: "EditReferralCountSheet",
107
107
  emits: ["update"],
108
- setup(F, { expose: u, emit: I }) {
109
- const { t: p } = Z(), g = I, m = $(!1), n = $({}), d = $(-1), c = $(-1), C = Q(), A = be.superRefine((e, r) => {
110
- var k, U, P, x, _, E, ae;
111
- const s = c.value == -1 ? ((P = (U = (k = C.referralProgram) == null ? void 0 : k.reward[d.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : c.value, v = (_ = (x = C.referralProgram) == null ? void 0 : x.reward[d.value]) == null ? void 0 : _.rewards[s - 1], b = (ae = (E = C.referralProgram) == null ? void 0 : E.reward[d.value]) == null ? void 0 : ae.rewards[s + 1];
112
- v && e.threshold.from < v.threshold.from + 1 && r.addIssue({
108
+ setup(k, { expose: n, emit: I }) {
109
+ const { t: p } = Z(), g = I, m = $(!1), l = $({}), d = $(-1), u = $(-1), R = Q(), A = be.superRefine((e, t) => {
110
+ var F, U, P, x, _, E, ae;
111
+ const i = u.value == -1 ? ((P = (U = (F = R.referralProgram) == null ? void 0 : F.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];
112
+ v && e.threshold.from < v.threshold.from + 1 && t.addIssue({
113
113
  code: "custom",
114
114
  message: `The min referral must be at least ${v.threshold.from + 1}`,
115
115
  path: ["option"]
116
- }), b && e.threshold.to && b.threshold.to && e.threshold.to > b.threshold.to - 1 && r.addIssue({
116
+ }), b && e.threshold.to && b.threshold.to && e.threshold.to > b.threshold.to - 1 && t.addIssue({
117
117
  code: "custom",
118
118
  message: `The max referral must be at most ${b.threshold.to - 2}`,
119
119
  path: ["option"]
120
120
  });
121
121
  }), T = G(() => {
122
- const e = A.safeParse(n.value);
122
+ const e = A.safeParse(l.value);
123
123
  return e.success ? [] : e.error.errors;
124
124
  });
125
125
  function M() {
126
- const e = A.safeParse(n.value);
126
+ const e = A.safeParse(l.value);
127
127
  e.success && g("update", {
128
128
  groupIndex: d.value,
129
- countIndex: c.value,
129
+ countIndex: u.value,
130
130
  referralCount: e.data
131
131
  });
132
132
  }
133
- async function j(e, r) {
134
- var s, v, b, k, U, P;
135
- if (m.value = e, e && typeof (r == null ? void 0 : r.countIndex) == "number" && r.countIndex >= 0)
136
- d.value = r.groupIndex, c.value = r.countIndex, n.value = H(
137
- (s = C.referralProgram) == null ? void 0 : s.reward[r.groupIndex].rewards[r.countIndex]
133
+ async function D(e, t) {
134
+ var i, v, b, F, U, P;
135
+ if (m.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0)
136
+ d.value = t.groupIndex, u.value = t.countIndex, l.value = H(
137
+ (i = R.referralProgram) == null ? void 0 : i.reward[t.groupIndex].rewards[t.countIndex]
138
138
  );
139
139
  else {
140
- d.value = r.groupIndex, c.value = -1;
141
- const x = c.value == -1 ? ((k = (b = (v = C.referralProgram) == null ? void 0 : v.reward[d.value]) == null ? void 0 : b.rewards) == null ? void 0 : k.length) || 0 : c.value, _ = (P = (U = C.referralProgram) == null ? void 0 : U.reward[d.value]) == null ? void 0 : P.rewards[x - 1];
142
- n.value = {
140
+ d.value = t.groupIndex, u.value = -1;
141
+ const x = u.value == -1 ? ((F = (b = (v = R.referralProgram) == null ? void 0 : v.reward[d.value]) == null ? void 0 : b.rewards) == null ? void 0 : F.length) || 0 : u.value, _ = (P = (U = R.referralProgram) == null ? void 0 : U.reward[d.value]) == null ? void 0 : P.rewards[x - 1];
142
+ l.value = {
143
143
  threshold: {
144
144
  from: _ != null && _.threshold ? _ != null && _.threshold.to ? _.threshold.to + 1 : (_ == null ? void 0 : _.threshold.from) + 1 : 1,
145
145
  to: null
@@ -147,8 +147,8 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
147
147
  rewards: []
148
148
  };
149
149
  }
150
- h.value = [], h.value = l.value.map(
151
- (x) => n.value.rewards.includes(x.id)
150
+ h.value = [], h.value = s.value.map(
151
+ (x) => l.value.rewards.includes(x.id)
152
152
  );
153
153
  }
154
154
  function L() {
@@ -171,19 +171,19 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
171
171
  header: "Description",
172
172
  accessorFn: (e) => e.description,
173
173
  cell(e) {
174
- const r = e.row.original;
175
- if (r.collectible.type == "VOUCHER" || r.selectedReward == null)
176
- return r.description;
174
+ const t = e.row.original;
175
+ if (t.collectible.type == "VOUCHER" || t.selectedReward == null)
176
+ return t.description;
177
177
  }
178
178
  }
179
- ], f = me(), o = $([]), l = G(() => f.rewards.map((e) => {
180
- let r = "No expiry";
179
+ ], f = me(), o = $([]), s = G(() => f.rewards.map((e) => {
180
+ let t = "No expiry";
181
181
  switch (e.option.type) {
182
182
  case "VOUCHER":
183
- r = `${e.option.collectibleConfig.options.maxUse} use(s), ${ee(e.option.collectibleConfig.options.validityOption || {})}`;
183
+ t = `${e.option.collectibleConfig.options.maxUse} use(s), ${ee(e.option.collectibleConfig.options.validityOption || {})}`;
184
184
  break;
185
185
  case "LOYALTY":
186
- r = `${e.option.earningOption.amount}, ${ee(e.option.validityOption || {})}`;
186
+ t = `${e.option.earningOption.amount}, ${ee(e.option.validityOption || {})}`;
187
187
  break;
188
188
  }
189
189
  return {
@@ -191,64 +191,64 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
191
191
  name: e.name,
192
192
  collectible: e.option,
193
193
  collectibleConfig: e.collectibleConfig,
194
- description: r
194
+ description: t
195
195
  };
196
196
  }));
197
197
  G(() => []);
198
198
  function S() {
199
- const e = l.value;
200
- for (let r = 0; r < e.length; r++) {
201
- const s = e[r], v = h.value[r];
202
- v && !n.value.rewards.includes(s.id) && n.value.rewards.push(s.id), !v && n.value.rewards.includes(s.id) && (n.value.rewards = n.value.rewards.filter(
203
- (b) => b != s.id
199
+ const e = s.value;
200
+ for (let t = 0; t < e.length; t++) {
201
+ const i = e[t], v = h.value[t];
202
+ 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(
203
+ (b) => b != i.id
204
204
  ));
205
205
  }
206
206
  }
207
207
  const h = $({});
208
- return ie(h, S, { deep: !0 }), u({
209
- showSheet: j,
208
+ return ie(h, S, { deep: !0 }), n({
209
+ showSheet: D,
210
210
  hideSheet: L,
211
- data: n
212
- }), (e, r) => {
213
- const s = w("FmStepperField"), v = w("FmHelperText"), b = w("FmTable"), k = w("FmButton"), U = w("FmSideSheet");
214
- return R(), D(U, {
211
+ data: l
212
+ }), (e, t) => {
213
+ const i = w("FmStepperField"), v = w("FmHelperText"), b = w("FmTable"), F = w("FmButton"), U = w("FmSideSheet");
214
+ return C(), j(U, {
215
215
  "max-width": 1e3,
216
- modelValue: t(m),
217
- "onUpdate:modelValue": r[4] || (r[4] = (P) => W(m) ? m.value = P : null),
218
- header: `${t(c) == -1 ? t(p)("connect.referral.editReferralCountSheet.add") : t(p)("connect.referral.editReferralCountSheet.edit")}`
216
+ modelValue: r(m),
217
+ "onUpdate:modelValue": t[4] || (t[4] = (P) => J(m) ? m.value = P : null),
218
+ header: `${r(u) == -1 ? r(p)("connect.referral.editReferralCountSheet.add") : r(p)("connect.referral.editReferralCountSheet.edit")}`
219
219
  }, {
220
220
  "side-sheet-footer": V(() => [
221
221
  a("div", Ye, [
222
- i(k, {
223
- label: t(p)("connect.editTierSheet.submit"),
222
+ c(F, {
223
+ label: r(p)("connect.editTierSheet.submit"),
224
224
  onClick: M,
225
- disabled: t(T).length > 0 || t(J)().isLoading,
226
- loading: t(J)().isLoading
225
+ disabled: r(T).length > 0 || r(W)().isLoading,
226
+ loading: r(W)().isLoading
227
227
  }, null, 8, ["label", "disabled", "loading"]),
228
- i(k, {
229
- label: t(p)("connect.editTierSheet.cancel"),
230
- onClick: r[3] || (r[3] = (P) => L()),
228
+ c(F, {
229
+ label: r(p)("connect.editTierSheet.cancel"),
230
+ onClick: t[3] || (t[3] = (P) => L()),
231
231
  variant: "tertiary"
232
232
  }, null, 8, ["label"])
233
233
  ])
234
234
  ]),
235
235
  default: V(() => [
236
- i(X, { json: t(n) }, null, 8, ["json"]),
237
- i(X, { json: t(T) }, null, 8, ["json"]),
236
+ c(X, { json: r(l) }, null, 8, ["json"]),
237
+ c(X, { json: r(T) }, null, 8, ["json"]),
238
238
  a("div", Me, [
239
239
  a("div", null, [
240
240
  a("div", Ne, [
241
- i(s, {
242
- modelValue: t(n).threshold.from,
243
- "onUpdate:modelValue": r[0] || (r[0] = (P) => t(n).threshold.from = P),
241
+ c(i, {
242
+ modelValue: r(l).threshold.from,
243
+ "onUpdate:modelValue": t[0] || (t[0] = (P) => r(l).threshold.from = P),
244
244
  "show-steppers": !1,
245
- rules: [t(N).ruleAtPath(t(A), "threshold.from")]
245
+ rules: [r(N).ruleAtPath(r(A), "threshold.from")]
246
246
  }, {
247
247
  label: V(() => [
248
- (R(), D(ne(
249
- t(N).toInputLabel(
250
- t(N).typeAtPath(t(A), "threshold.from"),
251
- t(p)(
248
+ (C(), j(ne(
249
+ r(N).toInputLabel(
250
+ r(N).typeAtPath(r(A), "threshold.from"),
251
+ r(p)(
252
252
  "connect.referral.editReferralCountSheet.min_referral_count"
253
253
  )
254
254
  )
@@ -256,17 +256,17 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
256
256
  ]),
257
257
  _: 1
258
258
  }, 8, ["modelValue", "rules"]),
259
- i(s, {
260
- modelValue: t(n).threshold.to,
261
- "onUpdate:modelValue": r[1] || (r[1] = (P) => t(n).threshold.to = P),
259
+ c(i, {
260
+ modelValue: r(l).threshold.to,
261
+ "onUpdate:modelValue": t[1] || (t[1] = (P) => r(l).threshold.to = P),
262
262
  "show-steppers": !1,
263
- rules: [t(N).ruleAtPath(t(A), "threshold.to")]
263
+ rules: [r(N).ruleAtPath(r(A), "threshold.to")]
264
264
  }, {
265
265
  label: V(() => [
266
- (R(), D(ne(
267
- t(N).toInputLabel(
268
- t(N).typeAtPath(t(A), "threshold.to"),
269
- t(p)(
266
+ (C(), j(ne(
267
+ r(N).toInputLabel(
268
+ r(N).typeAtPath(r(A), "threshold.to"),
269
+ r(p)(
270
270
  "connect.referral.editReferralCountSheet.max_referral_count"
271
271
  )
272
272
  )
@@ -275,20 +275,22 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
275
275
  _: 1
276
276
  }, 8, ["modelValue", "rules"])
277
277
  ]),
278
- i(v, {
279
- text: t(N).helperText(t(T), "threshold"),
280
- state: t(N).helperState(t(T), "threshold")
278
+ c(v, {
279
+ text: r(N).helperText(r(T), "threshold"),
280
+ state: r(N).helperState(r(T), "threshold")
281
281
  }, null, 8, ["text", "state"]),
282
- He
282
+ a("div", He, O(r(p)(
283
+ "connect.referral.editReferralCountSheet.max_referral_count_description"
284
+ )), 1)
283
285
  ]),
284
- a("div", ze, O(t(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
285
- i(b, {
286
- modelValue: t(h),
287
- "onUpdate:modelValue": r[2] || (r[2] = (P) => W(h) ? h.value = P : null),
286
+ a("div", ze, O(r(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
287
+ c(b, {
288
+ modelValue: r(h),
289
+ "onUpdate:modelValue": t[2] || (t[2] = (P) => J(h) ? h.value = P : null),
288
290
  selection: "multiple",
289
- "column-filter": t(o),
291
+ "column-filter": r(o),
290
292
  "column-defs": y,
291
- "row-data": t(l),
293
+ "row-data": r(s),
292
294
  "page-size": 10
293
295
  }, null, 8, ["modelValue", "column-filter", "row-data"])
294
296
  ])
@@ -297,7 +299,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
297
299
  }, 8, ["modelValue", "header"]);
298
300
  };
299
301
  }
300
- }), Ke = { class: "space-y-16" }, We = /* @__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), Je = { 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({
302
+ }), 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({
301
303
  __name: "CriteriaTriggerInput",
302
304
  props: {
303
305
  modelValue: {
@@ -309,32 +311,32 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
309
311
  }
310
312
  },
311
313
  emits: ["update:model-value"],
312
- setup(F, { emit: u }) {
313
- const I = F, p = u, g = G(() => [
314
+ setup(k, { emit: n }) {
315
+ const I = k, p = n, g = G(() => [
314
316
  le.enum.BILL_COMPLETED,
315
317
  le.enum.FEEDBACK
316
318
  ].map((m) => Se[m]));
317
- return (m, n) => {
319
+ return (m, l) => {
318
320
  const d = w("FmCard");
319
- return R(), B("div", Ke, [
320
- We,
321
- a("div", Je, [
322
- (R(!0), B(Y, null, te(t(g), (c) => (R(), D(d, {
323
- key: c.name,
321
+ return C(), B("div", Ke, [
322
+ Je,
323
+ a("div", We, [
324
+ (C(!0), B(Y, null, re(r(g), (u) => (C(), j(d, {
325
+ key: u.name,
324
326
  variant: "outlined",
325
327
  disabled: I.disabled,
326
- class: de(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
327
- "col-span-3": t(g).length == 1,
328
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": F.modelValue == c.value,
329
- "hover:bg-fm-color-opacity-sm": F.modelValue != c.value
328
+ class: ce(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
329
+ "col-span-3": r(g).length == 1,
330
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": k.modelValue == u.value,
331
+ "hover:bg-fm-color-opacity-sm": k.modelValue != u.value
330
332
  }]),
331
333
  onClick: () => {
332
- I.modelValue != c.value && !I.disabled && p("update:model-value", c.value);
334
+ I.modelValue != u.value && !I.disabled && p("update:model-value", u.value);
333
335
  }
334
336
  }, {
335
337
  default: V(() => [
336
- a("div", Ze, O(c.name), 1),
337
- a("div", Qe, O(c.description), 1)
338
+ a("div", Ze, O(u.name), 1),
339
+ a("div", Qe, O(u.description), 1)
338
340
  ]),
339
341
  _: 2
340
342
  }, 1032, ["disabled", "class", "onClick"]))), 128))
@@ -342,17 +344,17 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
342
344
  ]);
343
345
  };
344
346
  }
345
- }), et = { class: "flex items-center gap-x-8" }, tt = { class: "flex flex-col space-y-16 pr-12" }, rt = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1), ot = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1), at = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1), nt = /* @__PURE__ */ a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1), lt = {
347
+ }), 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 = {
346
348
  key: 0,
347
349
  class: "space-y-16"
348
- }, st = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1), it = {
350
+ }, sr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1), ir = {
349
351
  key: 1,
350
352
  class: "space-y-16"
351
- }, dt = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1), ct = { class: "flex items-center gap-8" }, ut = /* @__PURE__ */ q({
353
+ }, cr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1), dr = { class: "flex items-center gap-8" }, ur = /* @__PURE__ */ q({
352
354
  __name: "EditCriteriaSheet",
353
355
  emits: ["update"],
354
- setup(F, { expose: u, emit: I }) {
355
- const { t: p } = Z(), g = I, m = $(!1), n = $(-1), d = $({}), c = Q(), C = xe.superRefine((y, f) => {
356
+ setup(k, { expose: n, emit: I }) {
357
+ const { t: p } = Z(), g = I, m = $(!1), l = $(-1), d = $({}), u = Q(), R = xe.superRefine((y, f) => {
356
358
  y.name.length >= 50 && f.addIssue({
357
359
  code: "custom",
358
360
  message: "Name must be less than 50 characters"
@@ -361,15 +363,15 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
361
363
  message: "Name is required"
362
364
  });
363
365
  }), A = G(() => {
364
- const y = C.safeParse(d.value);
366
+ const y = R.safeParse(d.value);
365
367
  return y.success ? [] : y.error.errors;
366
368
  });
367
369
  function T(y, f) {
368
370
  var o;
369
- m.value = y, y && typeof f == "number" && f >= 0 ? (n.value = f, d.value = H(
370
- (o = c.referralProgram) == null ? void 0 : o.criteria[f]
371
- )) : (n.value = -1, d.value = {
372
- _id: new ke().toString(),
371
+ m.value = y, y && typeof f == "number" && f >= 0 ? (l.value = f, d.value = H(
372
+ (o = u.referralProgram) == null ? void 0 : o.criteria[f]
373
+ )) : (l.value = -1, d.value = {
374
+ _id: new Fe().toString(),
373
375
  name: "",
374
376
  type: "AUTO",
375
377
  event: { type: "BILL_COMPLETED" }
@@ -378,72 +380,72 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
378
380
  function M() {
379
381
  m.value = !1;
380
382
  }
381
- function j() {
382
- const y = C.safeParse(d.value);
383
- y.success && g("update", n.value, y.data);
383
+ function D() {
384
+ const y = R.safeParse(d.value);
385
+ y.success && g("update", l.value, y.data);
384
386
  }
385
387
  function L(y) {
386
388
  d.value.type = y, y == "AUTO" ? d.value.event = { type: "BILL_COMPLETED" } : d.value.event = void 0;
387
389
  }
388
- return u({
390
+ return n({
389
391
  showSheet: T,
390
392
  hideSheet: M,
391
393
  data: d
392
394
  }), (y, f) => {
393
- const o = w("FmButton"), l = w("FmRadio"), S = w("FmRadioGroup"), h = w("FmSideSheet");
394
- return R(), D(h, {
395
+ const o = w("FmButton"), s = w("FmRadio"), S = w("FmRadioGroup"), h = w("FmSideSheet");
396
+ return C(), j(h, {
395
397
  "max-width": 768,
396
- modelValue: t(m),
397
- "onUpdate:modelValue": f[6] || (f[6] = (e) => W(m) ? m.value = e : null)
398
+ modelValue: r(m),
399
+ "onUpdate:modelValue": f[6] || (f[6] = (e) => J(m) ? m.value = e : null)
398
400
  }, {
399
401
  "side-sheet-header": V(() => [
400
- a("div", et, [
401
- i(o, {
402
+ a("div", er, [
403
+ c(o, {
402
404
  icon: "arrow_back",
403
405
  variant: "tertiary",
404
406
  onClick: f[0] || (f[0] = (e) => T(!1))
405
407
  }),
406
- ce("Add Criteria ")
408
+ de("Add Criteria ")
407
409
  ])
408
410
  ]),
409
411
  "side-sheet-footer": V(() => [
410
- a("div", ct, [
411
- i(o, {
412
- label: t(p)("connect.editTierSheet.submit"),
413
- onClick: j,
414
- disabled: t(A).length > 0 || t(J)().isLoading,
415
- loading: t(J)().isLoading
412
+ a("div", dr, [
413
+ c(o, {
414
+ label: r(p)("connect.editTierSheet.submit"),
415
+ onClick: D,
416
+ disabled: r(A).length > 0 || r(W)().isLoading,
417
+ loading: r(W)().isLoading
416
418
  }, null, 8, ["label", "disabled", "loading"]),
417
- i(o, {
418
- label: t(p)("connect.editTierSheet.cancel"),
419
+ c(o, {
420
+ label: r(p)("connect.editTierSheet.cancel"),
419
421
  onClick: f[5] || (f[5] = (e) => T(!1)),
420
422
  variant: "tertiary"
421
423
  }, null, 8, ["label"])
422
424
  ])
423
425
  ]),
424
426
  default: V(() => [
425
- i(X, { json: t(d) }, null, 8, ["json"]),
426
- a("div", tt, [
427
- rt,
428
- i(Ce, {
429
- modelValue: t(d).name,
430
- "onUpdate:modelValue": f[1] || (f[1] = (e) => t(d).name = e),
431
- label: t(p)("connect.referral.editReferralTierSheet.name"),
432
- schema: t(N).typeAtPath(t(C), "name")
427
+ c(X, { json: r(d) }, null, 8, ["json"]),
428
+ a("div", rr, [
429
+ tr,
430
+ c(Re, {
431
+ modelValue: r(d).name,
432
+ "onUpdate:modelValue": f[1] || (f[1] = (e) => r(d).name = e),
433
+ label: r(p)("connect.referral.editReferralTierSheet.name"),
434
+ schema: r(N).typeAtPath(r(R), "name")
433
435
  }, null, 8, ["modelValue", "label", "schema"]),
434
- ot,
435
- i(S, {
436
- "model-value": t(d).type,
436
+ or,
437
+ c(S, {
438
+ "model-value": r(d).type,
437
439
  label: "Verify status",
438
440
  "onUpdate:modelValue": L
439
441
  }, {
440
442
  default: V(() => [
441
- i(l, {
443
+ c(s, {
442
444
  value: "AUTO",
443
445
  label: "Auto",
444
446
  sublabel: "Verify based on rule configuration"
445
447
  }),
446
- i(l, {
448
+ c(s, {
447
449
  value: "MANUAL",
448
450
  label: "Manual",
449
451
  sublabel: "Verify based on manual inspection"
@@ -451,25 +453,25 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
451
453
  ]),
452
454
  _: 1
453
455
  }, 8, ["model-value"]),
454
- t(d).type == "AUTO" ? (R(), B(Y, { key: 0 }, [
455
- at,
456
- nt,
457
- i(Xe, {
458
- "model-value": t(d).event.type,
459
- "onUpdate:modelValue": f[2] || (f[2] = (e) => t(d).event.type = e)
456
+ r(d).type == "AUTO" ? (C(), B(Y, { key: 0 }, [
457
+ ar,
458
+ nr,
459
+ c(Xe, {
460
+ "model-value": r(d).event.type,
461
+ "onUpdate:modelValue": f[2] || (f[2] = (e) => r(d).event.type = e)
460
462
  }, null, 8, ["model-value"]),
461
- t(d).event.type == t(se).enum.BILL_COMPLETED ? (R(), B("div", lt, [
462
- st,
463
- i($e, {
464
- "model-value": t(d).event.rule,
465
- "onUpdate:modelValue": f[3] || (f[3] = (e) => t(d).event.rule = e)
463
+ r(d).event.type == r(se).enum.BILL_COMPLETED ? (C(), B("div", lr, [
464
+ sr,
465
+ c($e, {
466
+ "model-value": r(d).event.rule,
467
+ "onUpdate:modelValue": f[3] || (f[3] = (e) => r(d).event.rule = e)
466
468
  }, null, 8, ["model-value"])
467
469
  ])) : z("", !0),
468
- t(d).event.type == t(se).enum.FEEDBACK ? (R(), B("div", it, [
469
- dt,
470
- i(Fe, {
471
- "model-value": t(d).event.rule,
472
- "onUpdate:modelValue": f[4] || (f[4] = (e) => t(d).event.rule = e)
470
+ r(d).event.type == r(se).enum.FEEDBACK ? (C(), B("div", ir, [
471
+ cr,
472
+ c(ke, {
473
+ "model-value": r(d).event.rule,
474
+ "onUpdate:modelValue": f[4] || (f[4] = (e) => r(d).event.rule = e)
473
475
  }, null, 8, ["model-value"])
474
476
  ])) : z("", !0)
475
477
  ], 64)) : z("", !0)
@@ -481,51 +483,51 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
481
483
  }
482
484
  });
483
485
  function he() {
484
- const F = $(!1), u = Re();
486
+ const k = $(!1), n = Ce();
485
487
  return {
486
488
  confirmUpdateReferralRecord: async () => {
487
489
  await new Promise((p) => {
488
- u.open({
490
+ n.open({
489
491
  title: "Confirmation",
490
492
  message: "This will change all referral settings? Would you like to update previous referral record?",
491
493
  primaryActions: { text: "Update all", close: !0 },
492
494
  secondaryActions: { text: "Update future only", close: !0 }
493
495
  }).onPrimary(async () => {
494
- F.value = !0, p();
496
+ k.value = !0, p();
495
497
  }).onSecondary(async () => {
496
- F.value = !1, p();
498
+ k.value = !1, p();
497
499
  });
498
500
  });
499
501
  },
500
- updateReferralRecord: F
502
+ updateReferralRecord: k
501
503
  };
502
504
  }
503
- const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex justify-between items-center" }, pt = /* @__PURE__ */ a("div", null, [
505
+ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex justify-between items-center" }, pr = /* @__PURE__ */ a("div", null, [
504
506
  /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
505
507
  /* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
506
- ], -1), ht = /* @__PURE__ */ q({
508
+ ], -1), hr = /* @__PURE__ */ q({
507
509
  __name: "ManageCriteriaSheet",
508
- setup(F, { expose: u }) {
509
- const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = he(), n = $(!1), d = $({}), c = Q(), C = $(
510
+ setup(k, { expose: n }) {
511
+ const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = he(), l = $(!1), d = $({}), u = Q(), R = $(
510
512
  null
511
513
  ), A = G(() => {
512
514
  var o;
513
- return (o = c.referralProgram) == null ? void 0 : o.criteria;
515
+ return (o = u.referralProgram) == null ? void 0 : o.criteria;
514
516
  });
515
517
  async function T(o) {
516
518
  await g(), await p(async () => {
517
519
  await pe.update({
518
520
  ...o,
519
521
  updateReferralRecord: m.value
520
- }), await c.readReferralProgram();
522
+ }), await u.readReferralProgram();
521
523
  });
522
524
  }
523
- async function M(o, l) {
524
- var e, r;
525
- const S = o == -1 ? ((e = c.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(c.referralProgram);
526
- h.criteria[S] = l, await T(h), (r = C.value) == null || r.showSheet(!1);
525
+ async function M(o, s) {
526
+ var e, t;
527
+ const S = o == -1 ? ((e = u.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(u.referralProgram);
528
+ h.criteria[S] = s, await T(h), (t = R.value) == null || t.showSheet(!1);
527
529
  }
528
- async function j(o) {
530
+ async function D(o) {
529
531
  var h, e;
530
532
  if (!await K.remove(
531
533
  "Are you sure to remove criteria",
@@ -534,8 +536,8 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
534
536
  I("connect.prompt.cancel")
535
537
  ))
536
538
  return;
537
- const l = o == -1 ? ((h = c.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, S = H(c.referralProgram);
538
- S.criteria.splice(l, 1), await T(S), (e = C.value) == null || e.showSheet(!1);
539
+ const s = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, S = H(u.referralProgram);
540
+ S.criteria.splice(s, 1), await T(S), (e = R.value) == null || e.showSheet(!1);
539
541
  }
540
542
  const L = [
541
543
  {
@@ -545,7 +547,7 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
545
547
  {
546
548
  header: "Validity method",
547
549
  cell(o) {
548
- return re(oe.FmChip, {
550
+ return te(oe.FmChip, {
549
551
  label: we.title(o.row.original.type),
550
552
  variant: "plain"
551
553
  });
@@ -555,12 +557,12 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
555
557
  header: "Actions",
556
558
  cell(o) {
557
559
  return [
558
- re(oe.FmButton, {
560
+ te(oe.FmButton, {
559
561
  variant: "tertiary",
560
562
  icon: "delete",
561
563
  iconColor: "neutral-gray-400",
562
- onClick: (l) => {
563
- l.stopPropagation(), j(o.row.index);
564
+ onClick: (s) => {
565
+ s.stopPropagation(), D(o.row.index);
564
566
  }
565
567
  })
566
568
  ];
@@ -568,72 +570,72 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
568
570
  }
569
571
  ];
570
572
  function y(o) {
571
- n.value = o;
573
+ l.value = o;
572
574
  }
573
575
  function f() {
574
- n.value = !1;
576
+ l.value = !1;
575
577
  }
576
- return u({
578
+ return n({
577
579
  showSheet: y,
578
580
  hideSheet: f,
579
581
  data: d
580
- }), (o, l) => {
582
+ }), (o, s) => {
581
583
  const S = w("FmButton"), h = w("FmTable"), e = w("FmSideSheet");
582
- return R(), B(Y, null, [
583
- i(e, {
584
+ return C(), B(Y, null, [
585
+ c(e, {
584
586
  "max-width": 768,
585
- modelValue: t(n),
586
- "onUpdate:modelValue": l[2] || (l[2] = (r) => W(n) ? n.value = r : null),
587
+ modelValue: r(l),
588
+ "onUpdate:modelValue": s[2] || (s[2] = (t) => J(l) ? l.value = t : null),
587
589
  header: "Manage Criteria"
588
590
  }, {
589
591
  default: V(() => [
590
- a("div", mt, [
591
- a("div", ft, [
592
- pt,
593
- i(S, {
592
+ a("div", mr, [
593
+ a("div", fr, [
594
+ pr,
595
+ c(S, {
594
596
  label: "Add Criteria",
595
597
  icon: "add",
596
598
  variant: "secondary",
597
- onClick: l[0] || (l[0] = (r) => {
598
- var s;
599
- return (s = t(C)) == null ? void 0 : s.showSheet(!0);
599
+ onClick: s[0] || (s[0] = (t) => {
600
+ var i;
601
+ return (i = r(R)) == null ? void 0 : i.showSheet(!0);
600
602
  })
601
603
  })
602
604
  ]),
603
- i(h, {
604
- "row-data": t(A),
605
+ c(h, {
606
+ "row-data": r(A),
605
607
  "hide-footer": !0,
606
608
  "page-size": 100,
607
609
  "shrink-at": !1,
608
610
  "column-defs": L,
609
- onRowClick: l[1] || (l[1] = (r) => {
610
- var s;
611
- return (s = t(C)) == null ? void 0 : s.showSheet(!0, r.index);
611
+ onRowClick: s[1] || (s[1] = (t) => {
612
+ var i;
613
+ return (i = r(R)) == null ? void 0 : i.showSheet(!0, t.index);
612
614
  })
613
615
  }, null, 8, ["row-data"])
614
616
  ])
615
617
  ]),
616
618
  _: 1
617
619
  }, 8, ["modelValue"]),
618
- i(ut, {
620
+ c(ur, {
619
621
  ref_key: "editCriteriaSheetRef",
620
- ref: C,
622
+ ref: R,
621
623
  onUpdate: M
622
624
  }, null, 512)
623
625
  ], 64);
624
626
  };
625
627
  }
626
- }), _t = { class: "flex flex-col space-y-16 pr-12" }, vt = { class: "fm-typo-en-title-sm-800" }, gt = { class: "flex items-center gap-8" }, wt = /* @__PURE__ */ q({
628
+ }), _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({
627
629
  __name: "EditRefereeRewardSheet",
628
630
  emits: ["update"],
629
- setup(F, { expose: u, emit: I }) {
630
- const { t: p } = Z(), g = I, m = $(!1), n = $([]), d = Q();
631
- function c() {
632
- g("update", n.value);
631
+ setup(k, { expose: n, emit: I }) {
632
+ const { t: p } = Z(), g = I, m = $(!1), l = $([]), d = Q();
633
+ function u() {
634
+ g("update", l.value);
633
635
  }
634
- async function C(o) {
635
- var l, S;
636
- m.value = o, n.value = ((S = (l = d.referralProgram) == null ? void 0 : l.refereeReward) == null ? void 0 : S.map((h) => h.toString())) || [], f.value = L.value.map((h) => n.value.includes(h.id));
636
+ async function R(o) {
637
+ var s, S;
638
+ 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));
637
639
  }
638
640
  function A() {
639
641
  m.value = !1;
@@ -655,19 +657,19 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
655
657
  header: "Description",
656
658
  accessorFn: (o) => o.description,
657
659
  cell(o) {
658
- const l = o.row.original;
659
- if (l.collectible.type == "VOUCHER" || l.selectedReward == null)
660
- return l.description;
660
+ const s = o.row.original;
661
+ if (s.collectible.type == "VOUCHER" || s.selectedReward == null)
662
+ return s.description;
661
663
  }
662
664
  }
663
- ], M = me(), j = $([]), L = G(() => M.rewards.map((o) => {
664
- let l = "No expiry";
665
+ ], M = me(), D = $([]), L = G(() => M.rewards.map((o) => {
666
+ let s = "No expiry";
665
667
  switch (o.option.type) {
666
668
  case "VOUCHER":
667
- l = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
669
+ s = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
668
670
  break;
669
671
  case "LOYALTY":
670
- l = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
672
+ s = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
671
673
  break;
672
674
  }
673
675
  return {
@@ -675,56 +677,56 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
675
677
  name: o.name,
676
678
  collectible: o.option,
677
679
  collectibleConfig: o.collectibleConfig,
678
- description: l
680
+ description: s
679
681
  };
680
682
  }));
681
683
  G(() => []);
682
684
  function y() {
683
685
  const o = L.value;
684
- for (let l = 0; l < o.length; l++) {
685
- const S = o[l], h = f.value[l];
686
- h && !n.value.includes(S.id) && n.value.push(S.id), !h && n.value.includes(S.id) && (n.value = n.value.filter((e) => e != S.id));
686
+ for (let s = 0; s < o.length; s++) {
687
+ const S = o[s], h = f.value[s];
688
+ 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
689
  }
688
690
  }
689
691
  const f = $({});
690
- return ie(f, y, { deep: !0 }), u({
691
- showSheet: C,
692
+ return ie(f, y, { deep: !0 }), n({
693
+ showSheet: R,
692
694
  hideSheet: A,
693
- data: n
694
- }), (o, l) => {
695
+ data: l
696
+ }), (o, s) => {
695
697
  const S = w("FmTable"), h = w("FmButton"), e = w("FmSideSheet");
696
- return R(), D(e, {
698
+ return C(), j(e, {
697
699
  "max-width": 1e3,
698
- modelValue: t(m),
699
- "onUpdate:modelValue": l[2] || (l[2] = (r) => W(m) ? m.value = r : null),
700
+ modelValue: r(m),
701
+ "onUpdate:modelValue": s[2] || (s[2] = (t) => J(m) ? m.value = t : null),
700
702
  header: "Referee reward"
701
703
  }, {
702
704
  "side-sheet-footer": V(() => [
703
- a("div", gt, [
704
- i(h, {
705
- label: t(p)("connect.common.save"),
706
- onClick: c,
707
- disabled: t(J)().isLoading,
708
- loading: t(J)().isLoading
705
+ a("div", gr, [
706
+ c(h, {
707
+ label: r(p)("connect.common.save"),
708
+ onClick: u,
709
+ disabled: r(W)().isLoading,
710
+ loading: r(W)().isLoading
709
711
  }, null, 8, ["label", "disabled", "loading"]),
710
- i(h, {
711
- label: t(p)("connect.common.cancel"),
712
- onClick: l[1] || (l[1] = (r) => A()),
712
+ c(h, {
713
+ label: r(p)("connect.common.cancel"),
714
+ onClick: s[1] || (s[1] = (t) => A()),
713
715
  variant: "tertiary"
714
716
  }, null, 8, ["label"])
715
717
  ])
716
718
  ]),
717
719
  default: V(() => [
718
- i(X, { json: t(n) }, null, 8, ["json"]),
719
- a("div", _t, [
720
- a("div", vt, O(t(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
721
- i(S, {
722
- modelValue: t(f),
723
- "onUpdate:modelValue": l[0] || (l[0] = (r) => W(f) ? f.value = r : null),
720
+ c(X, { json: r(l) }, null, 8, ["json"]),
721
+ a("div", _r, [
722
+ a("div", vr, O(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
723
+ c(S, {
724
+ modelValue: r(f),
725
+ "onUpdate:modelValue": s[0] || (s[0] = (t) => J(f) ? f.value = t : null),
724
726
  selection: "multiple",
725
- "column-filter": t(j),
727
+ "column-filter": r(D),
726
728
  "column-defs": T,
727
- "row-data": t(L),
729
+ "row-data": r(L),
728
730
  "page-size": 10
729
731
  }, null, 8, ["modelValue", "column-filter", "row-data"])
730
732
  ])
@@ -733,46 +735,48 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
733
735
  }, 8, ["modelValue"]);
734
736
  };
735
737
  }
736
- }), yt = { class: "fm-typo-en-title-sm-600" }, bt = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, xt = { class: "flex gap-x-8" }, Rt = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, Ct = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = { class: "mb-40" }, $t = {
738
+ }), 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 = {
737
739
  key: 0,
738
740
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
739
- }, Ft = /* @__PURE__ */ a("div", { class: "flex flex-col gap-16 text-center" }, [
741
+ }, kr = /* @__PURE__ */ a("div", { class: "flex flex-col gap-16 text-center" }, [
740
742
  /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
741
743
  /* @__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 ")
742
- ], -1), kt = /* @__PURE__ */ a("img", {
744
+ ], -1), Fr = /* @__PURE__ */ a("img", {
743
745
  src: ge,
744
746
  class: "aspect-square w-[150px]"
745
- }, null, -1), Pt = { class: "flex flex-col gap-16 text-center" }, Vt = { class: "fm-typo-en-title-sm-800" }, It = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rr = /* @__PURE__ */ q({
747
+ }, 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" }, tt = /* @__PURE__ */ q({
746
748
  __name: "Overview",
747
- setup(F) {
748
- const { t: u } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: n } = he(), d = G(() => {
749
+ setup(k) {
750
+ const { t: n } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: l } = he(), d = G(() => {
749
751
  var e;
750
752
  return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
751
- }), c = $(null);
753
+ }), u = $(null);
752
754
  $(null);
753
- const C = $(null), A = $(null), T = $(null), M = G(() => {
754
- var e, r, s, v;
755
+ const R = $(null), A = $(null), T = $(null), M = G(() => {
756
+ var e, t, i, v;
755
757
  return [
756
758
  {
757
759
  label: "connect.referral.how_it_works.generate_link",
758
- sublabel: u("connect.referral.how_it_works.generate_link_for_member"),
760
+ sublabel: n("connect.referral.how_it_works.generate_link_for_member"),
759
761
  icon: "offline_share"
760
762
  },
761
763
  {
762
764
  label: "connect.referral.how_it_works.referee_join_reward",
763
- sublabel: `${((r = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : r.length) || 0} reward(s)`,
764
- action: u("connect.referral.actions.manage_reward"),
765
+ sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} ${n("connect.referral.how_it_works.reward")}`,
766
+ action: n("connect.referral.actions.manage_reward"),
765
767
  onClick: () => {
766
768
  var b;
767
769
  return (b = T.value) == null ? void 0 : b.showSheet(!0);
768
770
  },
769
- helperText: "Referee will receive rewards after successfully competing all criteria",
771
+ helperText: n(
772
+ "connect.referral.how_it_works.referee_join_reward_description"
773
+ ),
770
774
  icon: "group_add"
771
775
  },
772
776
  {
773
777
  label: "connect.referral.how_it_works.referee_meet_criteria",
774
- sublabel: `${(s = g.referralProgram) == null ? void 0 : s.criteria.length} criteria`,
775
- action: u("connect.referral.actions.manage_criteria"),
778
+ sublabel: `${(i = g.referralProgram) == null ? void 0 : i.criteria.length} ${n("connect.referral.how_it_works.criteria")}`,
779
+ action: n("connect.referral.actions.manage_criteria"),
776
780
  onClick: () => {
777
781
  var b;
778
782
  return (b = A.value) == null ? void 0 : b.showSheet(!0);
@@ -781,75 +785,75 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
781
785
  },
782
786
  {
783
787
  label: "connect.referral.how_it_works.referer_get_reward",
784
- sublabel: `${(v = g.referralProgram) == null ? void 0 : v.reward.length} configured tier(s)`,
785
- helperText: "Referer will receive rewards after referee completed all criteria",
788
+ sublabel: `${(v = g.referralProgram) == null ? void 0 : v.reward.length} ${n("connect.referral.how_it_works.reward_tier")}`,
789
+ helperText: n("connect.referral.how_it_works.referral_tier_description"),
786
790
  icon: "featured_seasonal_and_gifts"
787
791
  }
788
792
  ];
789
793
  });
790
- function j(e) {
791
- var r;
792
- (r = c.value) == null || r.onManageRewardGroup(e);
794
+ function D(e) {
795
+ var t;
796
+ (t = u.value) == null || t.onManageRewardGroup(e);
793
797
  }
794
798
  function L(e) {
795
- var r;
796
- (r = C.value) == null || r.showSheet(!0, {
799
+ var t;
800
+ (t = R.value) == null || t.showSheet(!0, {
797
801
  groupIndex: e.groupIndex,
798
802
  countIndex: e.countIndex
799
803
  });
800
804
  }
801
805
  async function y(e) {
802
806
  var P, x, _, E;
803
- const r = e.countIndex == -1 ? ((x = (P = g.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : x.rewards.length) || 0 : e.countIndex || 0, s = e.referralCount, v = H(
807
+ 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(
804
808
  g.referralProgram
805
809
  ), b = v.reward[e.groupIndex];
806
- b.rewards[r] = e.referralCount;
807
- const k = b.rewards[r - 1], U = b.rewards[r + 1];
808
- if (k && k.threshold.to != s.threshold.from - 1) {
810
+ b.rewards[t] = e.referralCount;
811
+ const F = b.rewards[t - 1], U = b.rewards[t + 1];
812
+ if (F && F.threshold.to != i.threshold.from - 1) {
809
813
  if (!await K.confirm(
810
- u(
814
+ n(
811
815
  "connect.referral.referral_count.update.range_discontinuous.previous",
812
816
  {
813
- name: k.threshold.from,
814
- from: k.threshold.from ?? 0,
815
- to: k.threshold.to ?? 1 / 0,
816
- newTo: s.threshold.from - 1
817
+ name: F.threshold.from,
818
+ from: F.threshold.from ?? 0,
819
+ to: F.threshold.to ?? 1 / 0,
820
+ newTo: i.threshold.from - 1
817
821
  }
818
822
  ),
819
- u("connect.referral.referral_count.title"),
820
- u("connect.referral.referral_count.remove.next_range")
823
+ n("connect.referral.referral_count.title"),
824
+ n("connect.referral.referral_count.remove.next_range")
821
825
  ))
822
826
  return;
823
- k.threshold.to = s.threshold.from - 1;
827
+ F.threshold.to = i.threshold.from - 1;
824
828
  }
825
- if (U && U.threshold.from - 1 != s.threshold.to) {
829
+ if (U && U.threshold.from - 1 != i.threshold.to) {
826
830
  if (!await K.confirm(
827
- u("connect.program.tier.update.range_discontinuous.next", {
831
+ n("connect.program.tier.update.range_discontinuous.next", {
828
832
  name: U.threshold.from,
829
833
  from: U.threshold.from ?? 0,
830
834
  to: U.threshold.to ?? 1 / 0,
831
- newFrom: s.threshold.to ?? 1
835
+ newFrom: i.threshold.to ?? 1
832
836
  }),
833
- u("connect.program.tier.title"),
834
- u("connect.program.tier.remove.next_range"),
835
- u("connect.prompt.cancel")
837
+ n("connect.program.tier.title"),
838
+ n("connect.program.tier.remove.next_range"),
839
+ n("connect.prompt.cancel")
836
840
  ))
837
841
  return;
838
- U.threshold.from = (s.threshold.to ?? 0) + 1;
842
+ U.threshold.from = (i.threshold.to ?? 0) + 1;
839
843
  }
840
- !U && !((_ = s.threshold) != null && _.to) && (s.threshold.to = void 0), await o(v), (E = C.value) == null || E.hideSheet();
844
+ !U && !((_ = i.threshold) != null && _.to) && (i.threshold.to = void 0), await o(v), (E = R.value) == null || E.hideSheet();
841
845
  }
842
846
  async function f(e) {
843
- var s;
844
- const r = H(g.referralProgram);
845
- r.refereeReward = e, await o(r), (s = T.value) == null || s.hideSheet();
847
+ var i;
848
+ const t = H(g.referralProgram);
849
+ t.refereeReward = e, await o(t), (i = T.value) == null || i.hideSheet();
846
850
  }
847
851
  async function o(e) {
848
852
  await m(), await I(
849
853
  async () => {
850
854
  await pe.update({
851
855
  ...e,
852
- updateReferralRecord: n.value
856
+ updateReferralRecord: l.value
853
857
  }), await g.readReferralProgram();
854
858
  },
855
859
  {
@@ -858,53 +862,53 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
858
862
  }
859
863
  );
860
864
  }
861
- async function l(e) {
865
+ async function s(e) {
862
866
  if (!await K.remove(
863
- "Are you sure to remove referral tier",
864
- "Remove referral tier",
865
- u("connect.prompt.confirm"),
866
- u("connect.prompt.cancel")
867
+ n("connect.referral.reward.confirm_remove_referral_tier"),
868
+ n("connect.referral.reward.remove_referral_tier"),
869
+ n("connect.prompt.confirm"),
870
+ n("connect.prompt.cancel")
867
871
  ))
868
872
  return;
869
- const r = H(g.referralProgram);
870
- r.reward.splice(e, 1), await o(r);
873
+ const t = H(g.referralProgram);
874
+ t.reward.splice(e, 1), await o(t);
871
875
  }
872
- async function S(e, r) {
876
+ async function S(e, t) {
873
877
  if (!await K.remove(
874
- "Are you sure to remove referral count",
875
- "Remove referral tier",
876
- u("connect.prompt.confirm"),
877
- u("connect.prompt.cancel")
878
+ n("connect.referral.reward.confirm_remove_referral_count"),
879
+ n("connect.referral.reward.remove_referral_count"),
880
+ n("connect.prompt.confirm"),
881
+ n("connect.prompt.cancel")
878
882
  ))
879
883
  return;
880
- const s = H(g.referralProgram), v = s.reward[e].rewards[r + 1];
884
+ const i = H(g.referralProgram), v = i.reward[e].rewards[t + 1];
881
885
  if (v) {
882
886
  if (!await K.confirm(
883
- u("connect.referral.referral_count.update.range_discontinuous.next", {
887
+ n("connect.referral.referral_count.update.range_discontinuous.next", {
884
888
  from: v.threshold.from ?? 0,
885
889
  to: v.threshold.to ?? 1 / 0,
886
- newFrom: s.reward[e].rewards[r].threshold.from
890
+ newFrom: i.reward[e].rewards[t].threshold.from
887
891
  }),
888
- u("connect.referral.referral_count.remove.title"),
889
- u("connect.referral.referral_count.remove.next_range"),
890
- u("connect.prompt.cancel")
892
+ n("connect.referral.referral_count.remove.title"),
893
+ n("connect.referral.referral_count.remove.next_range"),
894
+ n("connect.prompt.cancel")
891
895
  ))
892
896
  return;
893
- v.threshold.from = s.reward[e].rewards[r].threshold.from;
897
+ v.threshold.from = i.reward[e].rewards[t].threshold.from;
894
898
  }
895
- s.reward[e].rewards.splice(r, 1), await o(s);
899
+ i.reward[e].rewards.splice(t, 1), await o(i);
896
900
  }
897
901
  const h = [
898
902
  {
899
- header: "Referral Count",
903
+ header: n("connect.referral.reward.table.count"),
900
904
  accessorFn: (e) => e.threshold.from == e.threshold.to ? `${e.threshold.from}` : e.threshold.to ? `${e.threshold.from} - ${e.threshold.to ?? "∞"}` : `${e.threshold.from}+`
901
905
  },
902
906
  {
903
- header: "Rewards",
907
+ header: n("connect.referral.reward.table.reward"),
904
908
  accessorKey: "type",
905
909
  accessorFn: (e) => {
906
- var r;
907
- return `${((r = e.pf_reward) == null ? void 0 : r.length) || 0} reward(s)`;
910
+ var t;
911
+ return `${((t = e.pf_reward) == null ? void 0 : t.length) || 0} reward(s)`;
908
912
  }
909
913
  },
910
914
  {
@@ -913,13 +917,13 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
913
917
  textAlign: "right"
914
918
  },
915
919
  cell(e) {
916
- return re(oe.FmButton, {
920
+ return te(oe.FmButton, {
917
921
  variant: "tertiary",
918
922
  icon: "delete",
919
923
  iconColor: "neutral-gray-400",
920
924
  class: "ml-auto",
921
- onClick: (r) => {
922
- r.stopPropagation(), console.log(e.row), S(e.row.original.groupIndex, e.row.index);
925
+ onClick: (t) => {
926
+ t.stopPropagation(), console.log(e.row), S(e.row.original.groupIndex, e.row.index);
923
927
  }
924
928
  });
925
929
  }
@@ -927,36 +931,36 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
927
931
  ];
928
932
  return ve(async () => {
929
933
  await g.readReferralProgram();
930
- }), (e, r) => {
931
- const s = w("FmCard"), v = w("FmIcon"), b = w("FmTooltip"), k = w("FmButton"), U = w("FmTable"), P = w("FmList");
932
- return R(), B(Y, null, [
934
+ }), (e, t) => {
935
+ const i = w("FmCard"), v = w("FmIcon"), b = w("FmTooltip"), F = w("FmButton"), U = w("FmTable"), P = w("FmList");
936
+ return C(), B(Y, null, [
933
937
  z("", !0),
934
- i(s, {
938
+ c(i, {
935
939
  variant: "outlined",
936
940
  class: "flex flex-col gap-16 p-16"
937
941
  }, {
938
942
  default: V(() => [
939
- a("div", yt, O(t(u)("connect.referral.how_it_works.title")), 1),
940
- a("div", bt, [
941
- (R(!0), B(Y, null, te(t(M), (x, _) => (R(), B("div", {
943
+ a("div", yr, O(r(n)("connect.referral.how_it_works.title")), 1),
944
+ a("div", br, [
945
+ (C(!0), B(Y, null, re(r(M), (x, _) => (C(), B("div", {
942
946
  key: _,
943
- class: de(["px-8", { "xs:!border-r": _ % 2 == 0 }])
947
+ class: ce(["px-8", { "xs:!border-r": _ % 2 == 0 }])
944
948
  }, [
945
- a("div", xt, [
946
- i(v, {
949
+ a("div", xr, [
950
+ c(v, {
947
951
  name: x.icon,
948
952
  color: "primary",
949
953
  class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
950
954
  }, null, 8, ["name"]),
951
955
  a("div", null, [
952
- a("div", Rt, [
953
- ce(O(t(u)(x.label)) + " ", 1),
954
- x.helperText ? (R(), D(b, {
956
+ a("div", Cr, [
957
+ de(O(r(n)(x.label)) + " ", 1),
958
+ x.helperText ? (C(), j(b, {
955
959
  key: 0,
956
960
  content: x.helperText
957
961
  }, {
958
962
  default: V(() => [
959
- i(v, {
963
+ c(v, {
960
964
  name: "help",
961
965
  size: "sm",
962
966
  outline: !0
@@ -965,12 +969,12 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
965
969
  _: 2
966
970
  }, 1032, ["content"])) : z("", !0)
967
971
  ]),
968
- a("div", Ct, O(x.sublabel), 1),
969
- x.action ? (R(), D(k, {
972
+ a("div", Rr, O(x.sublabel), 1),
973
+ x.action ? (C(), j(F, {
970
974
  key: 0,
971
975
  variant: "plain",
972
976
  label: x.action,
973
- disabled: !t(p).isPremium,
977
+ disabled: !r(p).isPremium,
974
978
  class: "fm-typo-en-body-md-400 !p-0",
975
979
  onClick: x.onClick
976
980
  }, null, 8, ["label", "disabled", "onClick"])) : z("", !0)
@@ -981,27 +985,27 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
981
985
  ]),
982
986
  _: 1
983
987
  }),
984
- t(d) && t(d).length > 0 ? (R(), D(s, {
988
+ r(d) && r(d).length > 0 ? (C(), j(i, {
985
989
  key: 1,
986
990
  variant: "outlined",
987
991
  class: "flex flex-col gap-16 p-16"
988
992
  }, {
989
993
  default: V(() => [
990
- i(P, { separator: !0 }, {
994
+ c(P, { separator: !0 }, {
991
995
  default: V(() => [
992
- (R(!0), B(Y, null, te(t(d), (x, _) => (R(), D(Ge, {
996
+ (C(!0), B(Y, null, re(r(d), (x, _) => (C(), j(Ge, {
993
997
  key: _,
994
998
  "reward-group": x,
995
999
  level: _,
996
- onEdit: (E) => j(_),
997
- onRemove: (E) => l(_),
998
- onAddCount: r[0] || (r[0] = (E) => {
1000
+ onEdit: (E) => D(_),
1001
+ onRemove: (E) => s(_),
1002
+ onAddCount: t[0] || (t[0] = (E) => {
999
1003
  L({ groupIndex: E, countIndex: -1 });
1000
1004
  })
1001
1005
  }, {
1002
1006
  default: V(() => [
1003
- a("div", St, [
1004
- i(U, {
1007
+ a("div", Sr, [
1008
+ c(U, {
1005
1009
  "row-data": x.rewards.map((E) => ({ ...E, groupIndex: _ })),
1006
1010
  "column-defs": h,
1007
1011
  "hide-footer": !0,
@@ -1009,9 +1013,9 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
1009
1013
  onRowClick: (E) => L({ groupIndex: _, countIndex: E.index })
1010
1014
  }, null, 8, ["row-data", "onRowClick"])
1011
1015
  ]),
1012
- x.rewards.length ? z("", !0) : (R(), B("div", $t, [
1013
- Ft,
1014
- i(k, {
1016
+ x.rewards.length ? z("", !0) : (C(), B("div", $r, [
1017
+ kr,
1018
+ c(F, {
1015
1019
  variant: "secondary",
1016
1020
  label: "Add count",
1017
1021
  icon: "add",
@@ -1026,41 +1030,41 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
1026
1030
  })
1027
1031
  ]),
1028
1032
  _: 1
1029
- })) : (R(), D(s, {
1033
+ })) : (C(), j(i, {
1030
1034
  key: 2,
1031
1035
  variant: "outlined",
1032
1036
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1033
1037
  }, {
1034
1038
  default: V(() => [
1035
- kt,
1036
- a("div", Pt, [
1037
- a("div", Vt, O(t(u)("connect.referral.referral_tier_title")), 1),
1038
- a("div", It, O(t(u)("connect.referral.referral_tier_description")), 1)
1039
+ Fr,
1040
+ a("div", Pr, [
1041
+ a("div", Vr, O(r(n)("connect.referral.referral_tier_title")), 1),
1042
+ a("div", Ir, O(r(n)("connect.referral.referral_tier_description")), 1)
1039
1043
  ]),
1040
- i(k, {
1044
+ c(F, {
1041
1045
  variant: "primary",
1042
- label: t(u)("connect.referral.add_referral_tier"),
1046
+ label: r(n)("connect.referral.add_referral_tier"),
1043
1047
  icon: "add",
1044
- disabled: !t(p).isPremium,
1045
- onClick: r[1] || (r[1] = (x) => j(-1))
1048
+ disabled: !r(p).isPremium,
1049
+ onClick: t[1] || (t[1] = (x) => D(-1))
1046
1050
  }, null, 8, ["label", "disabled"])
1047
1051
  ]),
1048
1052
  _: 1
1049
1053
  })),
1050
- i(ye, {
1054
+ c(ye, {
1051
1055
  ref_key: "rewardGroupRef",
1052
- ref: c
1056
+ ref: u
1053
1057
  }, null, 512),
1054
- i(qe, {
1058
+ c(qe, {
1055
1059
  ref_key: "editReferralCountSheetRef",
1056
- ref: C,
1060
+ ref: R,
1057
1061
  onUpdate: y
1058
1062
  }, null, 512),
1059
- i(ht, {
1063
+ c(hr, {
1060
1064
  ref_key: "manageCriteriaSheetRef",
1061
1065
  ref: A
1062
1066
  }, null, 512),
1063
- i(wt, {
1067
+ c(wr, {
1064
1068
  ref_key: "editRefereeRewardSheetRef",
1065
1069
  ref: T,
1066
1070
  onUpdate: f
@@ -1070,5 +1074,5 @@ const mt = { class: "flex flex-col space-y-16 mt-24" }, ft = { class: "flex just
1070
1074
  }
1071
1075
  });
1072
1076
  export {
1073
- rr as default
1077
+ tt as default
1074
1078
  };