@feedmepos/mf-connect 0.0.24-prod → 0.0.26-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 (62) hide show
  1. package/dist/{Analytic-CHsctJL0.js → Analytic-BwBhJ7bl.js} +8 -8
  2. package/dist/{App-BSiHlz5h.js → App-CA0Bo7YB.js} +5 -5
  3. package/dist/{Broadcast-CL9Sa0bc.js → Broadcast-B7Vr0vR9.js} +7 -7
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C2krWgqp.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DHe7YrHv.js} +8 -8
  5. package/dist/{Card-CqTzwiBp.js → Card-CMtk619g.js} +52 -52
  6. package/dist/{Collections-9OXjYxFu.js → Collections-CoqcbHXm.js} +5 -5
  7. package/dist/{Credit-BDm7vWU6.js → Credit-DO5d0Ia5.js} +7 -7
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-B7qqPxFM.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-wjcSfHZH.js} +20 -20
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DItx2Ubv.js → EffectSheet.vue_vue_type_style_index_0_lang-nOplo491.js} +5 -5
  10. package/dist/{Experience-DTWow5NR.js → Experience-0UrzWEqm.js} +7 -7
  11. package/dist/{Game-BkYVDXqA.js → Game-D8Mu-QrE.js} +7 -7
  12. package/dist/{Marketing-sDN1f-Rb.js → Marketing-CR39uxLG.js} +4 -4
  13. package/dist/{Member-CIzs5lmW.js → Member-BZc2vm9K.js} +3 -3
  14. package/dist/{MemberList-CdTv3lWA.js → MemberList-B82Z9gw6.js} +12 -12
  15. package/dist/{MemberTransactions-CBoHXPr7.js → MemberTransactions-D930e4BY.js} +1 -1
  16. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CSwRL1kp.js → MessageInput.vue_vue_type_script_setup_true_lang-tJa9UGBw.js} +2 -2
  17. package/dist/{Mission-DdHOGOjC.js → Mission-BF7HKRi8.js} +7 -7
  18. package/dist/{Point-Bc4su8pQ.js → Point-B0NCGElf.js} +7 -7
  19. package/dist/{Promotion-Dhl69yfs.js → Promotion-BmQnf0S_.js} +8 -8
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CPHiByal.js → RuleGroup.vue_vue_type_script_setup_true_lang-DLk3mfqC.js} +14 -14
  21. package/dist/{Segment-D95w0dZl.js → Segment-e6COr7ja.js} +7 -7
  22. package/dist/{Setting-C3ia_BMY.js → Setting-AIeGOPa5.js} +7 -7
  23. package/dist/{Store-ziVgZZSh.js → Store-BuMv-LTP.js} +342 -335
  24. package/dist/{StoreRewards-CJBlOtGb.js → StoreRewards-ZneBcoft.js} +10 -10
  25. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-oTTUzRap.js +818 -0
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C-5z47S1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BxIB_0F7.js} +1 -1
  27. package/dist/{Tier-BKBlLV7D.js → Tier-COOABCAS.js} +13 -13
  28. package/dist/{Title-COWE-LXc.js → Title-C3SBQRLi.js} +13 -13
  29. package/dist/{Transaction-BKU5hTvU.js → Transaction-D2mzi_Jl.js} +1 -1
  30. package/dist/{Voucher-DGLn6y-b.js → Voucher-CTzZO62k.js} +10 -10
  31. package/dist/{app-BQpZdCao.js → app-BdK2GXbi.js} +24 -24
  32. package/dist/{app-CKg8FD6W.js → app-DnQYkIC1.js} +1 -1
  33. package/dist/app.js +1 -1
  34. package/dist/{business-DGCDUsna.js → business-DOjJsL7e.js} +1 -1
  35. package/dist/{campaign-DFzcetIZ.js → campaign-BfMIUjwj.js} +2 -2
  36. package/dist/{dto-BOsVyHhB.js → dto-CVcS74Vc.js} +37 -37
  37. package/dist/{effect-DAgCe9mB.js → effect-BoRL9Psq.js} +1 -1
  38. package/dist/{export-BArwqiqn.js → export-BF80KJle.js} +3 -3
  39. package/dist/{helper-CjcpPq85.js → helper-nDRCuCMN.js} +1 -1
  40. package/dist/{index-E9DFEkCN.js → index-B4sdSZlj.js} +1 -1
  41. package/dist/{index-DUmYKFqp.js → index-BLMsRNp3.js} +3 -3
  42. package/dist/{index-DarpjYwN.js → index-Bmre6Xyp.js} +5 -5
  43. package/dist/{index-D61l3xYo.js → index-BoPQzRxs.js} +2 -2
  44. package/dist/{index-CBYeGg9d.js → index-BqxhzaPB.js} +1 -1
  45. package/dist/{index-CksikPRJ.js → index-C3Ue1uba.js} +3 -3
  46. package/dist/{index-BtSUMNhN.js → index-D7SjamN8.js} +1 -1
  47. package/dist/{index-DQNrbgQh.js → index-DNcU_RF1.js} +1 -1
  48. package/dist/{index-BLUNODxz.js → index-DTolyILx.js} +1 -1
  49. package/dist/{index-D9aWLz3L.js → index-F2VnwXeh.js} +1 -1
  50. package/dist/{index-Dl6Tmuvm.js → index-KXzxwHB2.js} +5 -5
  51. package/dist/{index-Cr7N263J.js → index-MP-346gd.js} +2 -2
  52. package/dist/{index.esm2017-CK_DN0pS.js → index.esm2017-EdeAmUeI.js} +1 -1
  53. package/dist/{loading-CrTiMhEE.js → loading-CmOFZn8N.js} +4 -4
  54. package/dist/{membership-BTYMMItR.js → membership-BVO31tOv.js} +3 -3
  55. package/dist/{money-DPJgDQxk.js → money-B5Qx7zIa.js} +1 -1
  56. package/dist/{number-DRvZfW5z.js → number-DSC_WHKN.js} +1 -1
  57. package/dist/{rule-DBp5EC2a.js → rule-B7oRK5yD.js} +2 -2
  58. package/dist/{rule-builder-B7-hVixK.js → rule-builder-DdebV2-2.js} +1 -1
  59. package/dist/{template-D9IbwHGS.js → template-C9fzQdej.js} +3 -3
  60. package/dist/{xlsx-BUPLRzvR.js → xlsx-Cv4wYDm9.js} +1 -1
  61. package/package.json +1 -1
  62. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DNIqB0jd.js +0 -795
@@ -1,30 +1,30 @@
1
- import { defineComponent as J, computed as D, resolveComponent as _, openBlock as v, createBlock as E, withCtx as P, createElementVNode as b, createElementBlock as $, createVNode as s, createCommentVNode as j, toDisplayString as le, unref as e, Fragment as L, renderList as oe, ref as A, isRef as ne, reactive as Ie, onMounted as me, watch as he, toRaw as De, createTextVNode as te, h as Be } from "vue";
2
- import { _ as Ae } from "./tier-BJDhpH6X.js";
3
- import { useDialog as Te, useDialogChild as Ue, components as Ne } from "@feedmepos/ui-library";
4
- import { c as k, e as ce, S as Oe } from "./index-CksikPRJ.js";
5
- import { d as Q, a as Ee, u as Me, p as pe, n as je, f as ye } from "./loading-CrTiMhEE.js";
6
- import { u as xe, C as ie } from "./membership-BTYMMItR.js";
7
- import { a as Le, c as $e } from "./object-qECH92oz.js";
8
- import { _ as ae } from "./lodash-B5I3zXaY.js";
1
+ import { defineComponent as G, computed as D, resolveComponent as _, openBlock as b, createBlock as B, withCtx as P, createElementVNode as v, createElementBlock as $, createVNode as s, createCommentVNode as j, toDisplayString as ne, unref as e, Fragment as L, renderList as ae, ref as A, isRef as se, reactive as Ae, onMounted as me, watch as he, toRaw as Ne, createTextVNode as oe, h as Oe } from "vue";
2
+ import { _ as Ee } from "./tier-BJDhpH6X.js";
3
+ import { useDialog as Re, useDialogChild as Ie, components as Me } from "@feedmepos/ui-library";
4
+ import { c as R, e as ce, S as je } from "./index-C3Ue1uba.js";
5
+ import { d as Q, a as Le, u as qe, p as pe, n as He, f as ye } from "./loading-CmOFZn8N.js";
6
+ import { u as xe, C as ie } from "./membership-BVO31tOv.js";
7
+ import { a as Ke, c as ke } from "./object-qECH92oz.js";
8
+ import { _ as le } from "./lodash-B5I3zXaY.js";
9
9
  import { Z as z, _ as X, g as K, a as W } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
10
- import { z as Y, R as qe } from "./app-BQpZdCao.js";
11
- import { F as He, a as Ke, b as We, c as Pe } from "./index-D61l3xYo.js";
12
- import { u as be } from "./app-wDQR6dpb.js";
10
+ import { z as Y, R as We } from "./app-BdK2GXbi.js";
11
+ import { F as ze, a as Ye, b as Je, c as Ue } from "./index-BoPQzRxs.js";
12
+ import { u as ve } from "./app-wDQR6dpb.js";
13
13
  import { J as _e } from "./JsonViewer-v8_C7l5N.js";
14
- import { _ as ze } from "./index-CBYeGg9d.js";
15
- import { _ as Ye } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
16
- import { _ as Je } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
17
- import { z as Ge, a as Xe } from "./money-DPJgDQxk.js";
18
- import { F as Ze } from "./number-DRvZfW5z.js";
19
- import { t as Qe } from "./helper-CjcpPq85.js";
20
- import "./index-BLUNODxz.js";
21
- import { useRouter as et } from "vue-router";
22
- import { m as fe } from "./index-D9aWLz3L.js";
23
- function tt(f) {
14
+ import { _ as Ge } from "./index-BqxhzaPB.js";
15
+ import { _ as Xe } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
16
+ import { _ as Ze } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
17
+ import { z as Qe, a as et } from "./money-B5Qx7zIa.js";
18
+ import { F as tt } from "./number-DSC_WHKN.js";
19
+ import { t as ot } from "./helper-nDRCuCMN.js";
20
+ import "./index-DTolyILx.js";
21
+ import { useRouter as at } from "vue-router";
22
+ import { m as fe } from "./index-F2VnwXeh.js";
23
+ function lt(f) {
24
24
  return Q.DineroFactory(f).toUnit();
25
25
  }
26
- function ot(f, g, i, S, y = [], l = []) {
27
- const r = ze.compact(
26
+ function nt(f, g, i, F, y = [], l = []) {
27
+ const r = Ge.compact(
28
28
  g.map((d) => f.find((o) => o.systemCode === d.systemCode && o.taxCode === d.taxCode)).filter((d) => !!d && l.includes(d.systemCode))
29
29
  ), t = r.reduce(
30
30
  (d, o) => {
@@ -47,7 +47,7 @@ function ot(f, g, i, S, y = [], l = []) {
47
47
  });
48
48
  },
49
49
  {}
50
- ), F = Q.Calculator.calculate({
50
+ ), S = Q.Calculator.calculate({
51
51
  items: {
52
52
  0: {
53
53
  quantity: 1,
@@ -56,7 +56,7 @@ function ot(f, g, i, S, y = [], l = []) {
56
56
  level: 0,
57
57
  type: {
58
58
  type: "BY_AMOUNT",
59
- amount: Q.DineroFactory(i).subtract(Q.Dinero.fromNumber({ number: S }).toObject()).toObject()
59
+ amount: Q.DineroFactory(i).subtract(Q.Dinero.fromNumber({ number: F }).toObject()).toObject()
60
60
  }
61
61
  }
62
62
  },
@@ -73,67 +73,67 @@ function ot(f, g, i, S, y = [], l = []) {
73
73
  taxCode: d.taxCode,
74
74
  rate: d.rate,
75
75
  total: Q.DineroFactory({
76
- ...F.items[0].taxes[d.taxCode]
76
+ ...S.items[0].taxes[d.taxCode]
77
77
  }).convertPrecision(2).toObject()
78
78
  }));
79
79
  }
80
- function at(f, g, i) {
81
- return f ? f.reduce((S, y) => {
80
+ function st(f, g, i) {
81
+ return f ? f.reduce((F, y) => {
82
82
  var l;
83
- return (l = i.find((r) => r.systemCode === y.systemCode)) != null && l.inclusive || (S = Q.DineroFactory(S.toObject()).add(y.total)), S;
83
+ return (l = i.find((r) => r.systemCode === y.systemCode)) != null && l.inclusive || (F = Q.DineroFactory(F.toObject()).add(y.total)), F;
84
84
  }, Q.DineroFactory(g)).toObject() : Q.DineroFactory(g).toObject();
85
85
  }
86
- const lt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, nt = ["src"], st = {
86
+ const rt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, it = ["src"], dt = {
87
87
  key: 2,
88
88
  class: "absolute top-2 left-2"
89
- }, rt = { class: "absolute top-0 right-0" }, it = { class: "fm-typo-en-body-lg-600" }, dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ut = { class: "flex gap-8 items-center flex-wrap" }, mt = /* @__PURE__ */ J({
89
+ }, ut = { class: "absolute top-0 right-0" }, mt = { class: "fm-typo-en-body-lg-600" }, ct = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pt = { class: "flex gap-8 items-center flex-wrap" }, yt = /* @__PURE__ */ G({
90
90
  __name: "StoreBundleCard",
91
91
  props: {
92
92
  bundle: { type: Object, required: !0 }
93
93
  },
94
94
  emits: ["edit", "delete"],
95
95
  setup(f, { emit: g }) {
96
- const i = f, S = g, y = D(() => {
96
+ const i = f, F = g, y = D(() => {
97
97
  const r = [];
98
98
  return i.bundle.price.amount > 0 && r.push(
99
- `${k.Config.getCountry().currency.symbol}${tt(i.bundle.price)}`
99
+ `${R.Config.getCountry().currency.symbol}${lt(i.bundle.price)}`
100
100
  ), i.bundle.coinPrice && r.push(`${i.bundle.coinPrice} point(s)`), r.join(" or ");
101
101
  }), l = D(() => {
102
- var t, F;
102
+ var t, S;
103
103
  const r = [];
104
104
  if (i.bundle.titles.length > 0 && r.push(`${i.bundle.titles.length} title(s)`), i.bundle.vouchers.length > 0 && r.push(`${i.bundle.vouchers.length} voucher(s)`), i.bundle.credit.normal || (t = i.bundle.credit.free) != null && t.amount) {
105
- const d = i.bundle.credit.normal + (((F = i.bundle.credit.free) == null ? void 0 : F.amount) ?? 0);
105
+ const d = i.bundle.credit.normal + (((S = i.bundle.credit.free) == null ? void 0 : S.amount) ?? 0);
106
106
  r.push(`${d} credit(s)`);
107
107
  }
108
108
  return r;
109
109
  });
110
110
  return (r, t) => {
111
- const F = _("FmIcon"), d = _("FmChip"), o = _("FmButton"), p = _("FmMenuItem"), m = _("FmMenu"), n = _("FmCard");
112
- return v(), E(n, {
111
+ const S = _("FmIcon"), d = _("FmChip"), o = _("FmButton"), p = _("FmMenuItem"), m = _("FmMenu"), n = _("FmCard");
112
+ return b(), B(n, {
113
113
  variant: "outlined",
114
114
  class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
115
115
  }, {
116
116
  default: P(() => [
117
- b("div", lt, [
118
- f.bundle.image ? (v(), $("img", {
117
+ v("div", rt, [
118
+ f.bundle.image ? (b(), $("img", {
119
119
  key: 1,
120
120
  src: f.bundle.image,
121
121
  class: "w-full h-full object-contain aspect-video"
122
- }, null, 8, nt)) : (v(), E(F, {
122
+ }, null, 8, it)) : (b(), B(S, {
123
123
  key: 0,
124
124
  name: "image",
125
125
  outline: !0,
126
126
  size: "md",
127
127
  class: "text-fm-color-neutral-gray-200"
128
128
  })),
129
- f.bundle.isFeedvibe ? (v(), $("div", st, [
129
+ f.bundle.isFeedvibe ? (b(), $("div", dt, [
130
130
  s(d, {
131
131
  label: "Feedvibe",
132
132
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
133
133
  compact: ""
134
134
  })
135
135
  ])) : j("", !0),
136
- b("div", rt, [
136
+ v("div", ut, [
137
137
  s(m, { placement: "bottom-end" }, {
138
138
  "menu-button": P(() => [
139
139
  s(o, {
@@ -143,11 +143,11 @@ const lt = { class: "relative h-[120px] aspect-video flex items-center justify-c
143
143
  ]),
144
144
  default: P(() => [
145
145
  s(p, {
146
- onClick: t[0] || (t[0] = (C) => S("edit", f.bundle)),
146
+ onClick: t[0] || (t[0] = (V) => F("edit", f.bundle)),
147
147
  label: "Edit"
148
148
  }),
149
149
  s(p, {
150
- onClick: t[1] || (t[1] = (C) => S("delete", f.bundle)),
150
+ onClick: t[1] || (t[1] = (V) => F("delete", f.bundle)),
151
151
  label: "Delete"
152
152
  })
153
153
  ]),
@@ -155,12 +155,12 @@ const lt = { class: "relative h-[120px] aspect-video flex items-center justify-c
155
155
  })
156
156
  ])
157
157
  ]),
158
- b("div", it, le(f.bundle.name), 1),
159
- b("div", dt, le(e(y) || "Free"), 1),
160
- b("div", ut, [
161
- (v(!0), $(L, null, oe(e(l), (C, T) => (v(), E(d, {
158
+ v("div", mt, ne(f.bundle.name), 1),
159
+ v("div", ct, ne(e(y) || "Free"), 1),
160
+ v("div", pt, [
161
+ (b(!0), $(L, null, ae(e(l), (V, T) => (b(), B(d, {
162
162
  key: T,
163
- label: C
163
+ label: V
164
164
  }, null, 8, ["label"]))), 128))
165
165
  ])
166
166
  ]),
@@ -168,14 +168,14 @@ const lt = { class: "relative h-[120px] aspect-video flex items-center justify-c
168
168
  });
169
169
  };
170
170
  }
171
- }), ct = /* @__PURE__ */ J({
171
+ }), ft = /* @__PURE__ */ G({
172
172
  __name: "AddBundleCard",
173
173
  emits: ["create"],
174
174
  setup(f, { emit: g }) {
175
175
  const i = g;
176
- return (S, y) => {
176
+ return (F, y) => {
177
177
  const l = _("FmButton"), r = _("FmCard");
178
- return v(), E(r, {
178
+ return b(), B(r, {
179
179
  variant: "outlined",
180
180
  class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
181
181
  }, {
@@ -191,7 +191,7 @@ const lt = { class: "relative h-[120px] aspect-video flex items-center justify-c
191
191
  });
192
192
  };
193
193
  }
194
- }), pt = { class: "space-y-16" }, yt = { class: "flex w-full justify-between pb-16" }, ft = { class: "flex items-center justify-end gap-8" }, vt = /* @__PURE__ */ J({
194
+ }), bt = { class: "space-y-16" }, vt = { class: "flex w-full justify-between pb-16" }, gt = { class: "flex items-center justify-end gap-8" }, ht = /* @__PURE__ */ G({
195
195
  __name: "CategoryDialog",
196
196
  props: {
197
197
  action: {
@@ -204,32 +204,32 @@ const lt = { class: "relative h-[120px] aspect-video flex items-center justify-c
204
204
  }
205
205
  },
206
206
  setup(f) {
207
- const g = f, i = Te(), { emitData: S, emitAction: y } = Ue(), l = A(g.initialValue), r = Y.string().min(1);
207
+ const g = f, i = Re(), { emitData: F, emitAction: y } = Ie(), l = A(g.initialValue), r = Y.string().min(1);
208
208
  function t() {
209
- S(l.value), y("primary"), i.close();
209
+ F(l.value), y("primary"), i.close();
210
210
  }
211
- function F() {
212
- S(null), y("primary"), i.close();
211
+ function S() {
212
+ F(null), y("primary"), i.close();
213
213
  }
214
214
  return (d, o) => {
215
215
  const p = _("FmTextField"), m = _("FmButton");
216
- return v(), $("div", pt, [
216
+ return b(), $("div", bt, [
217
217
  s(p, {
218
218
  modelValue: e(l),
219
- "onUpdate:modelValue": o[0] || (o[0] = (n) => ne(l) ? l.value = n : null),
219
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => se(l) ? l.value = n : null),
220
220
  label: "Category name",
221
221
  rules: [e(z).toRule(e(r))]
222
222
  }, null, 8, ["modelValue", "rules"]),
223
- b("div", yt, [
224
- b("div", null, [
225
- f.action == "edit" ? (v(), E(m, {
223
+ v("div", vt, [
224
+ v("div", null, [
225
+ f.action == "edit" ? (b(), B(m, {
226
226
  key: 0,
227
- onClick: F,
227
+ onClick: S,
228
228
  label: "Delete",
229
229
  variant: "destructive"
230
230
  })) : j("", !0)
231
231
  ]),
232
- b("div", ft, [
232
+ v("div", gt, [
233
233
  s(m, {
234
234
  label: "Cancel",
235
235
  variant: "tertiary",
@@ -245,30 +245,30 @@ const lt = { class: "relative h-[120px] aspect-video flex items-center justify-c
245
245
  ]);
246
246
  };
247
247
  }
248
- }), bt = { class: "space-y-16" }, gt = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1), ht = { class: "flex items-center justify-end gap-8 pb-16" }, xt = /* @__PURE__ */ J({
248
+ }), xt = { class: "space-y-16" }, _t = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1), Ct = { class: "flex items-center justify-end gap-8 pb-16" }, Vt = /* @__PURE__ */ G({
249
249
  __name: "SelectCategoryDialog",
250
250
  setup(f) {
251
- const { emitData: g, emitAction: i } = Ue(), S = xe(), y = A(), l = D(
252
- () => S.sortedStoreCategories.map((r, t) => ({
251
+ const { emitData: g, emitAction: i } = Ie(), F = xe(), y = A(), l = D(
252
+ () => F.sortedStoreCategories.map((r, t) => ({
253
253
  label: r.name,
254
254
  value: t
255
255
  }))
256
256
  );
257
257
  return (r, t) => {
258
- const F = _("FmSelect"), d = _("FmButton");
259
- return v(), $("div", bt, [
260
- gt,
261
- s(F, {
258
+ const S = _("FmSelect"), d = _("FmButton");
259
+ return b(), $("div", xt, [
260
+ _t,
261
+ s(S, {
262
262
  placeholder: "Select a category",
263
263
  items: e(l),
264
264
  modelValue: e(y),
265
265
  "onUpdate:modelValue": [
266
- t[0] || (t[0] = (o) => ne(y) ? y.value = o : null),
266
+ t[0] || (t[0] = (o) => se(y) ? y.value = o : null),
267
267
  t[1] || (t[1] = (o) => e(g)(o))
268
268
  ],
269
269
  label: "Category"
270
270
  }, null, 8, ["items", "modelValue"]),
271
- b("div", ht, [
271
+ v("div", Ct, [
272
272
  s(d, {
273
273
  variant: "tertiary",
274
274
  label: "Cancel",
@@ -284,10 +284,10 @@ const lt = { class: "relative h-[120px] aspect-video flex items-center justify-c
284
284
  };
285
285
  }
286
286
  });
287
- function ve(f) {
287
+ function be(f) {
288
288
  return f.states.map((g) => ({ label: g, value: g }));
289
289
  }
290
- const _t = {
290
+ const Ft = {
291
291
  [ce.F_COUNTRY.enum.MY]: {
292
292
  states: [
293
293
  "Johor",
@@ -308,13 +308,13 @@ const _t = {
308
308
  "Terengganu"
309
309
  ],
310
310
  get stateItems() {
311
- return ve(this);
311
+ return be(this);
312
312
  }
313
313
  },
314
314
  [ce.F_COUNTRY.enum.SG]: {
315
315
  states: [],
316
316
  get stateItems() {
317
- return ve(this);
317
+ return be(this);
318
318
  }
319
319
  },
320
320
  [ce.F_COUNTRY.enum.ID]: {
@@ -354,10 +354,10 @@ const _t = {
354
354
  "West Sumatra"
355
355
  ],
356
356
  get stateItems() {
357
- return ve(this);
357
+ return be(this);
358
358
  }
359
359
  }
360
- }, de = () => k.Config.getCountry(), ue = {
360
+ }, de = () => R.Config.getCountry(), ue = {
361
361
  get fullCurrency() {
362
362
  return de().currency;
363
363
  },
@@ -365,7 +365,7 @@ const _t = {
365
365
  return de().currency.code;
366
366
  },
367
367
  get fullTax() {
368
- return k.Country.getCountryFlattenTaxes(de().code);
368
+ return R.Country.getCountryFlattenTaxes(de().code);
369
369
  },
370
370
  get taxSystem() {
371
371
  return de().taxSystems;
@@ -377,7 +377,7 @@ const _t = {
377
377
  }));
378
378
  },
379
379
  groupedTaxOptions() {
380
- const f = k.Country.getCountryFlattenTaxes(de().code);
380
+ const f = R.Country.getCountryFlattenTaxes(de().code);
381
381
  return ue.taxSystem.map((g) => ({
382
382
  code: g.code,
383
383
  options: f.map((i) => ({ ...i, feedmeTaxCode: ue.generateCode(i) })).filter((i) => i.systemCode === g.code)
@@ -390,7 +390,7 @@ const _t = {
390
390
  generateCode(f) {
391
391
  return `${f.systemCode}/${f.taxCode}`;
392
392
  }
393
- }, Z = ue, Ct = /* @__PURE__ */ J({
393
+ }, Z = ue, St = /* @__PURE__ */ G({
394
394
  __name: "TaxInclusiveSetting",
395
395
  props: {
396
396
  modelValue: {
@@ -401,16 +401,16 @@ const _t = {
401
401
  },
402
402
  emits: ["update:model-value"],
403
403
  setup(f, { emit: g }) {
404
- const i = f, S = Z.taxSystem, y = g, l = A(i.modelValue);
404
+ const i = f, F = Z.taxSystem, y = g, l = A(i.modelValue);
405
405
  function r(o, p) {
406
- const m = ae.clone(i.modelValue), n = m.findIndex((C) => C.systemCode === o);
406
+ const m = le.clone(i.modelValue), n = m.findIndex((V) => V.systemCode === o);
407
407
  n >= 0 ? m[n].inclusive = p : m.push({
408
408
  systemCode: o,
409
409
  inclusive: p
410
410
  }), l.value = m, y("update:model-value", m);
411
411
  }
412
412
  function t() {
413
- return S.map((o) => {
413
+ return F.map((o) => {
414
414
  const p = i.modelValue ? i.modelValue.find((m) => m.systemCode === o.code) : !1;
415
415
  return {
416
416
  label: o.name,
@@ -423,31 +423,31 @@ const _t = {
423
423
  };
424
424
  });
425
425
  }
426
- const F = Ie(t());
426
+ const S = Ae(t());
427
427
  function d(o, p) {
428
428
  return `${o} ${p ? "Inclusive" : "Exclusive"}`;
429
429
  }
430
430
  return me(() => {
431
- i.modelValue.length || r(S[0].code, !1);
431
+ i.modelValue.length || r(F[0].code, !1);
432
432
  }), he(
433
433
  () => i.modelValue,
434
434
  (o, p) => {
435
- o != p && !o.length && r(S[0].code, !1);
435
+ o != p && !o.length && r(F[0].code, !1);
436
436
  }
437
437
  ), (o, p) => {
438
438
  const m = _("FmSwitch");
439
- return v(!0), $(L, null, oe(e(F), (n, C) => {
439
+ return b(!0), $(L, null, ae(e(S), (n, V) => {
440
440
  var T;
441
- return v(), $("div", { key: C }, [
441
+ return b(), $("div", { key: V }, [
442
442
  s(m, {
443
- "model-value": ((T = e(l)[C]) == null ? void 0 : T.inclusive) || !1,
443
+ "model-value": ((T = e(l)[V]) == null ? void 0 : T.inclusive) || !1,
444
444
  "label-placement": "left",
445
445
  "onUpdate:modelValue": (N) => n.input(N)
446
446
  }, {
447
447
  label: P(() => {
448
448
  var N;
449
449
  return [
450
- b("div", null, le(d(n.label, ((N = e(l)[C]) == null ? void 0 : N.inclusive) || !1)), 1)
450
+ v("div", null, ne(d(n.label, ((N = e(l)[V]) == null ? void 0 : N.inclusive) || !1)), 1)
451
451
  ];
452
452
  }),
453
453
  _: 2
@@ -457,40 +457,40 @@ const _t = {
457
457
  };
458
458
  }
459
459
  });
460
- var Vt = { mode: "production" };
461
- const St = { class: "space-y-8" }, Ft = {
460
+ var wt = { mode: "production" };
461
+ const $t = { class: "space-y-8" }, Pt = {
462
462
  key: 0,
463
463
  class: "space-y-16"
464
- }, wt = /* @__PURE__ */ J({
464
+ }, Tt = /* @__PURE__ */ G({
465
465
  __name: "StripeSetting",
466
466
  props: {
467
467
  modelValue: {}
468
468
  },
469
469
  emits: ["update:modelValue"],
470
470
  setup(f, { emit: g }) {
471
- const i = f, S = g, y = A(!1);
471
+ const i = f, F = g, y = A(!1);
472
472
  he(y, (r, t) => {
473
- t != r && (!i.modelValue && r ? S("update:modelValue", {
473
+ t != r && (!i.modelValue && r ? F("update:modelValue", {
474
474
  apiKey: "",
475
475
  webhookSecret: ""
476
- }) : r || S("update:modelValue", void 0));
476
+ }) : r || F("update:modelValue", void 0));
477
477
  });
478
478
  const l = D(() => {
479
- const r = Vt.mode === "development", t = k.Config.getCountry().code.toLowerCase(), F = t != "my" ? `.${t}` : "";
480
- return `https://marketing${r ? "-dev" : ""}${F}.feedmeapi.com/stripe/${Oe.getBusinessId()}/webhook`;
479
+ const r = wt.mode === "development", t = R.Config.getCountry().code.toLowerCase(), S = t != "my" ? `.${t}` : "";
480
+ return `https://marketing${r ? "-dev" : ""}${S}.feedmeapi.com/stripe/${je.getBusinessId()}/webhook`;
481
481
  });
482
482
  return me(() => {
483
483
  y.value = !!i.modelValue;
484
484
  }), (r, t) => {
485
- const F = _("FmSwitch"), d = _("FmTextField"), o = _("FmButton");
486
- return v(), $("div", St, [
487
- s(F, {
485
+ const S = _("FmSwitch"), d = _("FmTextField"), o = _("FmButton");
486
+ return b(), $("div", $t, [
487
+ s(S, {
488
488
  modelValue: e(y),
489
- "onUpdate:modelValue": t[0] || (t[0] = (p) => ne(y) ? y.value = p : null),
489
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => se(y) ? y.value = p : null),
490
490
  value: "true",
491
491
  label: "Enable Stripe"
492
492
  }, null, 8, ["modelValue"]),
493
- i.modelValue ? (v(), $("div", Ft, [
493
+ i.modelValue ? (b(), $("div", Pt, [
494
494
  s(d, {
495
495
  label: "API Key",
496
496
  modelValue: i.modelValue.apiKey,
@@ -507,7 +507,7 @@ const St = { class: "space-y-8" }, Ft = {
507
507
  s(o, {
508
508
  icon: "content_copy",
509
509
  variant: "tertiary",
510
- onClick: t[2] || (t[2] = (p) => e(Ee)(e(l)))
510
+ onClick: t[2] || (t[2] = (p) => e(Le)(e(l)))
511
511
  })
512
512
  ]),
513
513
  _: 1
@@ -523,21 +523,21 @@ const St = { class: "space-y-8" }, Ft = {
523
523
  ]);
524
524
  };
525
525
  }
526
- }), $t = {
526
+ }), kt = {
527
527
  key: 0,
528
528
  class: "space-y-16 pr-12"
529
- }, Pt = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Company legal information ", -1), Tt = {
529
+ }, Ut = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Company legal information ", -1), Rt = {
530
530
  key: 0,
531
531
  class: "space-y-16"
532
- }, Ut = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Tax", -1), kt = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Address", -1), Rt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, It = { class: "space-y-4" }, Dt = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-400" }, "State", -1), Bt = { class: "space-y-16" }, At = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Stripe Integration ", -1), Nt = { class: "flex items-center gap-8" }, Ot = /* @__PURE__ */ J({
532
+ }, It = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Tax", -1), Dt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Address", -1), Bt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, At = { class: "space-y-4" }, Nt = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-lg-400" }, "State", -1), Ot = { class: "space-y-16" }, Et = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Stripe Integration ", -1), Mt = { class: "flex items-center gap-8" }, jt = /* @__PURE__ */ G({
533
533
  __name: "StoreSettingSheet",
534
534
  emits: ["update"],
535
535
  setup(f, { expose: g, emit: i }) {
536
- const S = i, y = A(!1), l = A(), r = A(!1), t = He.extend({
537
- company: Ke.extend({
536
+ const F = i, y = A(!1), l = A(), r = A(!1), t = ze.extend({
537
+ company: Ye.extend({
538
538
  name: Y.string().min(1, "Company name is required"),
539
539
  regNo: Y.string().min(1, "Registration number is required"),
540
- address: We.extend({
540
+ address: Je.extend({
541
541
  line1: Y.string().min(1, "Line 1 is required"),
542
542
  line2: Y.string().optional(),
543
543
  state: Y.string().min(1, "State is required"),
@@ -548,10 +548,10 @@ const St = { class: "space-y-8" }, Ft = {
548
548
  phoneNo: Y.string().min(1, "Phone number is required"),
549
549
  sstRegNo: Y.string().optional()
550
550
  })
551
- }), F = D(() => t.safeParse(l.value).success);
551
+ }), S = D(() => t.safeParse(l.value).success);
552
552
  function d() {
553
553
  const m = t.safeParse(l.value);
554
- m.success && S("update", m.data);
554
+ m.success && F("update", m.data);
555
555
  }
556
556
  function o() {
557
557
  return {
@@ -563,7 +563,7 @@ const St = { class: "space-y-8" }, Ft = {
563
563
  city: "",
564
564
  postcode: "",
565
565
  state: "",
566
- country: k.Config.getCountry().name
566
+ country: R.Config.getCountry().name
567
567
  },
568
568
  phoneNo: "",
569
569
  regNo: "",
@@ -579,20 +579,20 @@ const St = { class: "space-y-8" }, Ft = {
579
579
  showSheet: p,
580
580
  data: l
581
581
  }), (m, n) => {
582
- const C = _("FmIcon"), T = _("FmMenuItem"), N = _("FmMenu"), ee = _("FmSelect"), M = _("FmButton"), h = _("FmSideSheet");
583
- return v(), E(h, {
582
+ const V = _("FmIcon"), T = _("FmMenuItem"), N = _("FmMenu"), ee = _("FmSelect"), M = _("FmButton"), h = _("FmSideSheet");
583
+ return b(), B(h, {
584
584
  "max-width": 560,
585
585
  modelValue: e(y),
586
- "onUpdate:modelValue": n[15] || (n[15] = (w) => ne(y) ? y.value = w : null),
586
+ "onUpdate:modelValue": n[15] || (n[15] = (w) => se(y) ? y.value = w : null),
587
587
  header: "Store setting"
588
588
  }, {
589
589
  "side-sheet-footer": P(() => [
590
- b("div", Nt, [
590
+ v("div", Mt, [
591
591
  s(M, {
592
592
  label: "Submit",
593
593
  onClick: d,
594
- disabled: !e(F) || e(be)().isLoading,
595
- loading: e(be)().isLoading
594
+ disabled: !e(S) || e(ve)().isLoading,
595
+ loading: e(ve)().isLoading
596
596
  }, null, 8, ["disabled", "loading"]),
597
597
  s(M, {
598
598
  label: "Cancel",
@@ -602,11 +602,11 @@ const St = { class: "space-y-8" }, Ft = {
602
602
  ])
603
603
  ]),
604
604
  default: P(() => {
605
- var w, U;
605
+ var w, k;
606
606
  return [
607
607
  s(_e, { json: e(l) }, null, 8, ["json"]),
608
- e(l) && e(l).company ? (v(), $("div", $t, [
609
- Pt,
608
+ e(l) && e(l).company ? (b(), $("div", kt, [
609
+ Ut,
610
610
  s(X, {
611
611
  modelValue: e(l).company.name,
612
612
  "onUpdate:modelValue": n[0] || (n[0] = (c) => e(l).company.name = c),
@@ -628,9 +628,9 @@ const St = { class: "space-y-8" }, Ft = {
628
628
  label: "Tax Registration number",
629
629
  schema: e(z).typeAtPath(e(t), "company.sstRegNo")
630
630
  }, null, 8, ["modelValue", "schema"]),
631
- (w = e(l).company) != null && w.sstRegNo && e(l).inclusiveTaxes ? (v(), $("div", Tt, [
632
- Ut,
633
- s(Ct, {
631
+ (w = e(l).company) != null && w.sstRegNo && e(l).inclusiveTaxes ? (b(), $("div", Rt, [
632
+ It,
633
+ s(St, {
634
634
  modelValue: e(l).inclusiveTaxes,
635
635
  "onUpdate:modelValue": n[4] || (n[4] = (c) => e(l).inclusiveTaxes = c)
636
636
  }, null, 8, ["modelValue"])
@@ -641,7 +641,7 @@ const St = { class: "space-y-8" }, Ft = {
641
641
  label: "Phone number",
642
642
  schema: e(z).typeAtPath(e(t), "company.phoneNo")
643
643
  }, null, 8, ["modelValue", "schema"]),
644
- kt,
644
+ Dt,
645
645
  s(X, {
646
646
  modelValue: e(l).company.address.line1,
647
647
  "onUpdate:modelValue": n[6] || (n[6] = (c) => e(l).company.address.line1 = c),
@@ -654,7 +654,7 @@ const St = { class: "space-y-8" }, Ft = {
654
654
  label: "Line 2",
655
655
  schema: e(z).typeAtPath(e(t), "company.address.line2")
656
656
  }, null, 8, ["modelValue", "schema"]),
657
- b("div", Rt, [
657
+ v("div", Bt, [
658
658
  s(X, {
659
659
  modelValue: e(l).company.address.city,
660
660
  "onUpdate:modelValue": n[8] || (n[8] = (c) => e(l).company.address.city = c),
@@ -667,8 +667,8 @@ const St = { class: "space-y-8" }, Ft = {
667
667
  label: "Postcode",
668
668
  schema: e(z).typeAtPath(e(t), "company.address.postcode")
669
669
  }, null, 8, ["modelValue", "schema"]),
670
- b("div", It, [
671
- Dt,
670
+ v("div", At, [
671
+ Nt,
672
672
  s(N, {
673
673
  placement: "top-end",
674
674
  "model-value": e(r)
@@ -681,7 +681,7 @@ const St = { class: "space-y-8" }, Ft = {
681
681
  onFocusChanged: n[11] || (n[11] = (c) => r.value = c)
682
682
  }, {
683
683
  append: P(() => [
684
- s(C, {
684
+ s(V, {
685
685
  name: e(r) ? "keyboard_arrow_up" : "keyboard_arrow_down"
686
686
  }, null, 8, ["name"])
687
687
  ]),
@@ -689,12 +689,12 @@ const St = { class: "space-y-8" }, Ft = {
689
689
  }, 8, ["modelValue", "schema"])
690
690
  ]),
691
691
  default: P(() => [
692
- (v(!0), $(L, null, oe(e(_t)[e(k.Config).getCountry().code].stateItems.filter(
692
+ (b(!0), $(L, null, ae(e(Ft)[e(R.Config).getCountry().code].stateItems.filter(
693
693
  (c) => {
694
694
  var O, I;
695
695
  return c.label.toLowerCase().includes(((I = (O = e(l)) == null ? void 0 : O.company) == null ? void 0 : I.address.state.toLowerCase()) ?? "");
696
696
  }
697
- ) || [], (c) => (v(), E(T, {
697
+ ) || [], (c) => (b(), B(T, {
698
698
  key: c.value,
699
699
  "model-value": e(l).company.address.state === c.value,
700
700
  label: c.label,
@@ -712,17 +712,17 @@ const St = { class: "space-y-8" }, Ft = {
712
712
  "onUpdate:modelValue": n[12] || (n[12] = (c) => e(l).company.address.country = c),
713
713
  items: [
714
714
  {
715
- label: e(k.Config).getCountry().name,
716
- value: e(k.Config).getCountry().name
715
+ label: e(R.Config).getCountry().name,
716
+ value: e(R.Config).getCountry().name
717
717
  }
718
718
  ],
719
719
  rules: [e(z).ruleAtPath(e(t), "company.address.country")]
720
720
  }, null, 8, ["modelValue", "items", "rules"])
721
721
  ]),
722
- b("div", Bt, [
723
- At,
724
- s(wt, {
725
- "model-value": (U = e(l)) == null ? void 0 : U.stripe,
722
+ v("div", Ot, [
723
+ Et,
724
+ s(Tt, {
725
+ "model-value": (k = e(l)) == null ? void 0 : k.stripe,
726
726
  "onUpdate:modelValue": n[13] || (n[13] = (c) => e(l).stripe = c)
727
727
  }, null, 8, ["model-value"])
728
728
  ])
@@ -734,10 +734,10 @@ const St = { class: "space-y-8" }, Ft = {
734
734
  };
735
735
  }
736
736
  });
737
- function Et(f, g = !0) {
738
- return k.DineroFactory(f).toFormat(g);
737
+ function Lt(f, g = !0) {
738
+ return R.DineroFactory(f).toFormat(g);
739
739
  }
740
- const Mt = /* @__PURE__ */ J({
740
+ const qt = /* @__PURE__ */ G({
741
741
  __name: "TaxVariantSetting",
742
742
  props: {
743
743
  modelValue: {
@@ -748,16 +748,16 @@ const Mt = /* @__PURE__ */ J({
748
748
  },
749
749
  emits: ["update:modelValue"],
750
750
  setup(f, { emit: g }) {
751
- const i = f, S = g;
751
+ const i = f, F = g;
752
752
  me(() => {
753
753
  if (r.value.length !== l.value.length) {
754
754
  const d = l.value.reduce((o, p) => {
755
755
  const m = Z.systemDefaultCode(p.name);
756
756
  if (!m) return o;
757
- const { systemCode: n, taxCode: C } = m;
758
- return p.value || o.push({ systemCode: n, taxCode: C }), o;
757
+ const { systemCode: n, taxCode: V } = m;
758
+ return p.value || o.push({ systemCode: n, taxCode: V }), o;
759
759
  }, []);
760
- F(d);
760
+ S(d);
761
761
  }
762
762
  });
763
763
  function y() {
@@ -769,49 +769,49 @@ const Mt = /* @__PURE__ */ J({
769
769
  (o) => d.options.some((p) => p.feedmeTaxCode === o)
770
770
  ),
771
771
  options: d.options.map((o) => ({
772
- label: `${o.name} (${Ze(o.rate)}%)`,
772
+ label: `${o.name} (${tt(o.rate)}%)`,
773
773
  value: o.feedmeTaxCode
774
774
  }))
775
775
  }))), r = D(() => i.modelValue.map((d) => Z.generateCode(d)));
776
776
  function t(d) {
777
777
  const o = y().find(
778
- (C) => C.options.some((T) => T.feedmeTaxCode === d)
779
- ), p = o == null ? void 0 : o.options.find((C) => C.feedmeTaxCode === d);
778
+ (V) => V.options.some((T) => T.feedmeTaxCode === d)
779
+ ), p = o == null ? void 0 : o.options.find((V) => V.feedmeTaxCode === d);
780
780
  if (!p) return;
781
781
  const { systemCode: m, taxCode: n } = p;
782
- F([{ systemCode: m, taxCode: n }]);
782
+ S([{ systemCode: m, taxCode: n }]);
783
783
  }
784
- function F(d) {
785
- const o = ae.clone(i.modelValue);
784
+ function S(d) {
785
+ const o = le.clone(i.modelValue);
786
786
  d.forEach((p) => {
787
787
  const m = y().find(
788
788
  (T) => T.options.some((N) => N.feedmeTaxCode === Z.generateCode(p))
789
- ), n = (m == null ? void 0 : m.options) || [], C = o.findIndex(
789
+ ), n = (m == null ? void 0 : m.options) || [], V = o.findIndex(
790
790
  (T) => n.some((N) => Z.generateCode(N) === Z.generateCode(T))
791
791
  );
792
- C >= 0 ? o.splice(C, 1, p) : o.push(p);
793
- }), S("update:modelValue", o);
792
+ V >= 0 ? o.splice(V, 1, p) : o.push(p);
793
+ }), F("update:modelValue", o);
794
794
  }
795
795
  return (d, o) => {
796
796
  const p = _("FmRadio"), m = _("FmRadioGroup");
797
- return v(!0), $(L, null, oe(e(l), (n) => (v(), $("div", {
797
+ return b(!0), $(L, null, ae(e(l), (n) => (b(), $("div", {
798
798
  key: n.name,
799
799
  class: "flex items-start"
800
800
  }, [
801
801
  s(m, {
802
802
  modelValue: n.value,
803
803
  "onUpdate:modelValue": [
804
- (C) => n.value = C,
805
- o[0] || (o[0] = (C) => {
806
- t(C);
804
+ (V) => n.value = V,
805
+ o[0] || (o[0] = (V) => {
806
+ t(V);
807
807
  })
808
808
  ]
809
809
  }, {
810
810
  default: P(() => [
811
- (v(!0), $(L, null, oe(n.options, (C, T) => (v(), E(p, {
811
+ (b(!0), $(L, null, ae(n.options, (V, T) => (b(), B(p, {
812
812
  key: T,
813
- value: C.value,
814
- label: C.label
813
+ value: V.value,
814
+ label: V.label
815
815
  }, null, 8, ["value", "label"]))), 128))
816
816
  ]),
817
817
  _: 2
@@ -824,8 +824,8 @@ const Mt = /* @__PURE__ */ J({
824
824
  return (/* @__PURE__ */ new Date()).toISOString();
825
825
  },
826
826
  name: "",
827
- price: k.Dinero.zero().toObject(),
828
- originalPrice: k.Dinero.zero().toObject(),
827
+ price: R.Dinero.zero().toObject(),
828
+ originalPrice: R.Dinero.zero().toObject(),
829
829
  vouchers: [],
830
830
  credit: {
831
831
  normal: 0,
@@ -841,18 +841,18 @@ const Mt = /* @__PURE__ */ J({
841
841
  taxes: [],
842
842
  taxTotals: [],
843
843
  internal: !1,
844
- priceWithTaxes: Ge()
845
- }, jt = {
844
+ priceWithTaxes: Qe()
845
+ }, Ht = {
846
846
  key: 0,
847
847
  class: "space-y-24 pr-12"
848
- }, Lt = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Basic information", -1), qt = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, " Subscription Settings ", -1), Ht = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1), Kt = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1), Wt = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Bundle reward", -1), zt = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, " Let your member know what they can expect from this bundle ", -1), Yt = { class: "space-y-8" }, Jt = { class: "flex items-center justify-between" }, Gt = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Advanced Setting", -1), Xt = { class: "space-y-8" }, Zt = { class: "flex items-center gap-8" }, Qt = /* @__PURE__ */ J({
848
+ }, Kt = { class: "space-y-8" }, Wt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Basic information", -1), zt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, " Subscription Settings ", -1), Yt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1), Jt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1), Gt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Bundle reward", -1), Xt = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, " Let your member know what they can expect from this bundle ", -1), Zt = { class: "space-y-8" }, Qt = { class: "flex items-center justify-between" }, eo = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Advanced Setting", -1), to = { class: "space-y-8" }, oo = { class: "flex items-center gap-8" }, ao = /* @__PURE__ */ G({
849
849
  __name: "EditBundleSheet",
850
850
  emits: ["update"],
851
851
  setup(f, { expose: g, emit: i }) {
852
- const S = i, y = xe(), l = A(!1), r = A({
852
+ const F = i, y = xe(), l = A(!1), r = A({
853
853
  category: 0,
854
854
  index: -1
855
- }), t = A(ae.cloneDeep(ge)), F = A(), d = Pe, o = D(() => {
855
+ }), t = A(le.cloneDeep(ge)), S = A(), d = Ue, o = D(() => {
856
856
  const u = d.safeParse(t.value);
857
857
  return u.success ? [] : u.error.errors;
858
858
  }), p = [
@@ -873,15 +873,15 @@ const Mt = /* @__PURE__ */ J({
873
873
  header: "Description",
874
874
  accessorFn: (u) => u.description,
875
875
  cell(u) {
876
- var V;
876
+ var C;
877
877
  const a = u.row.original;
878
- return a.collectible.type == "VOUCHER" || a.selectedReward == null ? a.description : Be(Ne.FmStepperField, {
879
- "onUpdate:modelValue": (R) => {
878
+ return a.collectible.type == "VOUCHER" || a.selectedReward == null ? a.description : Oe(Me.FmStepperField, {
879
+ "onUpdate:modelValue": (U) => {
880
880
  t.value.titles = t.value.titles.map(
881
- (B) => B.id == a.collectible._id ? { ...B, dayToExpire: R } : B
881
+ (J) => J.id == a.collectible._id ? { ...J, dayToExpire: U } : J
882
882
  );
883
883
  },
884
- modelValue: ((V = a.selectedReward) == null ? void 0 : V.extra) ?? 0,
884
+ modelValue: ((C = a.selectedReward) == null ? void 0 : C.extra) ?? 0,
885
885
  appendText: "day(s)",
886
886
  showSteppers: !1,
887
887
  disabled: !!t.value.stripePriceId
@@ -889,21 +889,21 @@ const Mt = /* @__PURE__ */ J({
889
889
  }
890
890
  }
891
891
  ], m = A([]), n = D(() => y.bundleRewards.map((u) => {
892
- const a = C.value.find((R) => R.id == u._id), V = u.type === "VOUCHER" ? `${u.options.maxUse} use(s), ${Qe(u.options.validityOption || {})}` : "No expiry";
892
+ const a = V.value.find((U) => U.id == u._id), C = u.type === "VOUCHER" ? `${u.options.maxUse} use(s), ${ot(u.options.validityOption || {})}` : "No expiry";
893
893
  return {
894
894
  collectible: u,
895
- description: V,
895
+ description: C,
896
896
  selectedReward: a
897
897
  };
898
- })), C = D(() => {
898
+ })), V = D(() => {
899
899
  var u, a;
900
900
  return [
901
- ...((u = t.value) == null ? void 0 : u.titles.map((V) => ({
902
- id: V.id,
903
- extra: V.dayToExpire
901
+ ...((u = t.value) == null ? void 0 : u.titles.map((C) => ({
902
+ id: C.id,
903
+ extra: C.dayToExpire
904
904
  }))) ?? [],
905
- ...((a = t.value) == null ? void 0 : a.vouchers.map((V) => ({
906
- id: V,
905
+ ...((a = t.value) == null ? void 0 : a.vouchers.map((C) => ({
906
+ id: C,
907
907
  extra: void 0
908
908
  }))) ?? []
909
909
  ];
@@ -919,81 +919,81 @@ const Mt = /* @__PURE__ */ J({
919
919
  function ee() {
920
920
  const u = n.value, a = t.value;
921
921
  if (!(!a || !u))
922
- for (let V = 0; V < u.length; V++) {
923
- const R = u[V];
924
- M.value[V] ? R.collectible.type == "TITLE" ? a.titles.findIndex(
925
- (se) => se.id == R.collectible._id
922
+ for (let C = 0; C < u.length; C++) {
923
+ const U = u[C];
924
+ M.value[C] ? U.collectible.type == "TITLE" ? a.titles.findIndex(
925
+ (te) => te.id == U.collectible._id
926
926
  ) < 0 && a.titles.push({
927
- id: R.collectible._id,
927
+ id: U.collectible._id,
928
928
  dayToExpire: T.value
929
929
  }) : a.vouchers.findIndex(
930
- (se) => se == R.collectible._id
931
- ) < 0 && a.vouchers.push(R.collectible._id) : (a.titles = a.titles.filter((G) => G.id != R.collectible._id), a.vouchers = a.vouchers.filter(
932
- (G) => G != R.collectible._id
930
+ (te) => te == U.collectible._id
931
+ ) < 0 && a.vouchers.push(U.collectible._id) : (a.titles = a.titles.filter((E) => E.id != U.collectible._id), a.vouchers = a.vouchers.filter(
932
+ (E) => E != U.collectible._id
933
933
  ));
934
934
  }
935
935
  }
936
936
  const M = A({});
937
937
  he(M, ee, { deep: !0 });
938
938
  const h = D(() => {
939
- var u;
940
- return (u = y.storeOption.company) == null ? void 0 : u.sstRegNo;
941
- }), w = D(() => {
942
- var u, a, V;
943
- return (V = (a = (u = y.storeOption) == null ? void 0 : u.inclusiveTaxes) == null ? void 0 : a[0]) != null && V.inclusive ? "Inclusive" : "Exclusive";
944
- }), U = D(() => {
945
939
  var u, a;
946
- return ot(
940
+ return (a = (u = y.storeOption) == null ? void 0 : u.company) == null ? void 0 : a.sstRegNo;
941
+ }), w = D(() => {
942
+ var u, a, C;
943
+ return (C = (a = (u = y.storeOption) == null ? void 0 : u.inclusiveTaxes) == null ? void 0 : a[0]) != null && C.inclusive ? "Inclusive" : "Exclusive";
944
+ }), k = D(() => {
945
+ var u, a, C;
946
+ return nt(
947
947
  Z.fullTax,
948
- De(t.value.taxes),
948
+ Ne(t.value.taxes),
949
949
  t.value.price,
950
950
  Number(t.value.credit.normal),
951
951
  ((u = y.storeOption) == null ? void 0 : u.inclusiveTaxes) ?? [],
952
- (a = y.storeOption.company) != null && a.sstRegNo ? Z.taxSystem.map((V) => V.code) : []
952
+ (C = (a = y.storeOption) == null ? void 0 : a.company) != null && C.sstRegNo ? Z.taxSystem.map((U) => U.code) : []
953
953
  );
954
- }), c = D(() => U.value.reduce(
955
- (a, V) => a.add(V.total),
956
- Xe()
954
+ }), c = D(() => k.value.reduce(
955
+ (a, C) => a.add(C.total),
956
+ et()
957
957
  ).toFormat()), O = D(() => {
958
- var R;
959
- const u = at(
960
- U.value,
958
+ var U;
959
+ const u = st(
960
+ k.value,
961
961
  t.value.price,
962
- ((R = y.storeOption) == null ? void 0 : R.inclusiveTaxes) ?? []
962
+ ((U = y.storeOption) == null ? void 0 : U.inclusiveTaxes) ?? []
963
963
  );
964
964
  t.value.priceWithTaxes = u;
965
- const a = Et(u, !1), V = Number(a.replace(/[^\d.-]/g, ""));
966
- return Number.isNaN(V) ? 0 : V;
965
+ const a = Lt(u, !1), C = Number(a.replace(/[^\d.-]/g, ""));
966
+ return Number.isNaN(C) ? 0 : C;
967
967
  });
968
968
  function I() {
969
- t.value.taxTotals = U.value, S("update", Pe.parse(Le(t.value)));
969
+ t.value.taxTotals = k.value, F("update", Ue.parse(Ke(t.value)));
970
970
  }
971
971
  function q() {
972
- return ae.cloneDeep(ge);
972
+ return le.cloneDeep(ge);
973
973
  }
974
974
  function H(u, a) {
975
- l.value = u, u && a && (console.log(a.bundle, "set.bundle"), F.value = void 0, t.value = a.bundle || q(), r.value.category = a.category, r.value.index = a.index, M.value = n.value.reduce((V, R, B) => (V[B] = !!R.selectedReward, V), {}));
975
+ l.value = u, u && a && (console.log(a.bundle, "set.bundle"), S.value = void 0, t.value = a.bundle || q(), r.value.category = a.category, r.value.index = a.index, M.value = n.value.reduce((C, U, J) => (C[J] = !!U.selectedReward, C), {}));
976
976
  }
977
977
  return g({
978
978
  showSheet: H,
979
- bundleImage: F,
979
+ bundleImage: S,
980
980
  target: r,
981
981
  data: t
982
982
  }), (u, a) => {
983
- const V = _("FmSwitch"), R = _("FmTextField"), B = _("FmStepperField"), G = _("FmMenuItem"), se = _("FmTable"), ke = _("FmHelperText"), Ce = _("FmButton"), Re = _("FmSideSheet");
984
- return v(), E(Re, {
983
+ const C = _("FmSwitch"), U = _("FmHelperText"), J = _("FmTextField"), E = _("FmStepperField"), te = _("FmMenuItem"), De = _("FmTable"), Ce = _("FmButton"), Be = _("FmSideSheet");
984
+ return b(), B(Be, {
985
985
  "max-width": 560,
986
986
  modelValue: e(l),
987
- "onUpdate:modelValue": a[19] || (a[19] = (re) => ne(l) ? l.value = re : null),
987
+ "onUpdate:modelValue": a[19] || (a[19] = (re) => se(l) ? l.value = re : null),
988
988
  header: e(r).index != -1 ? "Edit bundle" : "Create bundle"
989
989
  }, {
990
990
  "side-sheet-footer": P(() => [
991
- b("div", Zt, [
991
+ v("div", oo, [
992
992
  s(Ce, {
993
993
  label: e(r).index != -1 ? "Save" : "Add",
994
994
  onClick: I,
995
995
  disabled: e(o).length > 0,
996
- loading: e(be)().isLoading
996
+ loading: e(ve)().isLoading
997
997
  }, null, 8, ["label", "disabled", "loading"]),
998
998
  s(Ce, {
999
999
  label: "Cancel",
@@ -1003,42 +1003,49 @@ const Mt = /* @__PURE__ */ J({
1003
1003
  ])
1004
1004
  ]),
1005
1005
  default: P(() => {
1006
- var re, Ve, Se, Fe, we;
1006
+ var re, Ve, Fe, Se, we, $e, Pe, Te;
1007
1007
  return [
1008
1008
  s(_e, { json: e(t) }, null, 8, ["json"]),
1009
- e(t) ? (v(), $("div", jt, [
1010
- e(k.Config).getCountry().code == "MY" ? (v(), E(V, {
1011
- key: 0,
1012
- "onUpdate:modelValue": a[0] || (a[0] = (x) => {
1013
- e(t).isFeedvibe = x, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], M.value = {});
1014
- }),
1015
- "label-placement": "right",
1016
- "model-value": e(t).isFeedvibe || !1,
1017
- label: "Feedvibe Campaign",
1018
- sublabel: "Bundle will be appear for Feedvibe campaign use"
1019
- }, null, 8, ["model-value"])) : j("", !0),
1020
- Lt,
1021
- s(R, {
1009
+ e(t) ? (b(), $("div", Ht, [
1010
+ v("div", Kt, [
1011
+ e(R.Config).getCountry().code == "MY" && ((re = e(y).payoutAccount) == null ? void 0 : re.status) == "APPROVED" && ((Ve = e(y).payoutAccount) != null && Ve.enable) ? (b(), B(C, {
1012
+ key: 0,
1013
+ "onUpdate:modelValue": a[0] || (a[0] = (x) => {
1014
+ e(t).isFeedvibe = x, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], M.value = {});
1015
+ }),
1016
+ "label-placement": "right",
1017
+ "model-value": e(t).isFeedvibe || !1,
1018
+ label: "Feedvibe Campaign",
1019
+ sublabel: "Bundle will be appear for Feedvibe campaign use"
1020
+ }, null, 8, ["model-value"])) : j("", !0),
1021
+ e(t).isFeedvibe ? (b(), B(U, {
1022
+ key: 1,
1023
+ text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app",
1024
+ state: "warning"
1025
+ })) : j("", !0)
1026
+ ]),
1027
+ Wt,
1028
+ s(J, {
1022
1029
  label: "Bundle name",
1023
1030
  modelValue: e(t).name,
1024
1031
  "onUpdate:modelValue": a[1] || (a[1] = (x) => e(t).name = x),
1025
1032
  "helper-state": e(K)(e(o), "name"),
1026
1033
  "helper-text": e(W)(e(o), "name")
1027
1034
  }, null, 8, ["modelValue", "helper-state", "helper-text"]),
1028
- s(Ye, {
1035
+ s(Xe, {
1029
1036
  label: "Bundle image",
1030
1037
  class: "w-1/2 xs:w-2/3",
1031
1038
  "aspect-ratio": "16/9",
1032
1039
  thumbnail: e(t).image ?? void 0,
1033
- file: e(F) ?? void 0,
1040
+ file: e(S) ?? void 0,
1034
1041
  "onUpdate:file": a[2] || (a[2] = (x) => {
1035
- F.value = x;
1042
+ S.value = x;
1036
1043
  }),
1037
1044
  "helper-state": e(K)(e(o), "image"),
1038
1045
  "helper-text": e(W)(e(o), "image")
1039
1046
  }, null, 8, ["thumbnail", "file", "helper-state", "helper-text"]),
1040
- s(B, {
1041
- "model-value": e(k.Dinero).fromFdoDinero(e(t).price).toUnit(),
1047
+ s(E, {
1048
+ "model-value": e(R.Dinero).fromFdoDinero(e(t).price).toUnit(),
1042
1049
  label: "Price",
1043
1050
  min: 0,
1044
1051
  "max-fraction-digits": 2,
@@ -1047,21 +1054,21 @@ const Mt = /* @__PURE__ */ J({
1047
1054
  }),
1048
1055
  "is-currency": !0,
1049
1056
  "show-steppers": !1,
1050
- "helper-text": e(W)(e(o), "price") || `${e(k.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e(k.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
1057
+ "helper-text": e(W)(e(o), "price") || `${e(R.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e(R.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
1051
1058
  "helper-state": e(K)(e(o), "price")
1052
1059
  }, {
1053
1060
  prepend: P(() => [
1054
- te(le(e(k.Dinero).defaultCurrency()), 1)
1061
+ oe(ne(e(R.Dinero).defaultCurrency()), 1)
1055
1062
  ]),
1056
1063
  _: 1
1057
1064
  }, 8, ["model-value", "helper-text", "helper-state"]),
1058
- s(B, {
1059
- "model-value": e(k.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
1065
+ s(E, {
1066
+ "model-value": e(R.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
1060
1067
  label: "Bundle Value",
1061
1068
  min: 0,
1062
1069
  "max-fraction-digits": 2,
1063
1070
  "onUpdate:modelValue": a[4] || (a[4] = (x) => {
1064
- e(t).originalPrice || (e(t).originalPrice = e(k.Dinero).zero().toObject()), e(t).originalPrice.amount = x * 10 ** e(t).originalPrice.precision;
1071
+ e(t).originalPrice || (e(t).originalPrice = e(R.Dinero).zero().toObject()), e(t).originalPrice.amount = x * 10 ** e(t).originalPrice.precision;
1065
1072
  }),
1066
1073
  "is-currency": !0,
1067
1074
  "show-steppers": !1,
@@ -1069,12 +1076,12 @@ const Mt = /* @__PURE__ */ J({
1069
1076
  "helper-state": e(K)(e(o), "originalPrice")
1070
1077
  }, {
1071
1078
  prepend: P(() => [
1072
- te(le(e(k.Dinero).defaultCurrency()), 1)
1079
+ oe(ne(e(R.Dinero).defaultCurrency()), 1)
1073
1080
  ]),
1074
1081
  _: 1
1075
1082
  }, 8, ["model-value", "helper-text", "helper-state"]),
1076
- e(t).isFeedvibe ? j("", !0) : (v(), E(B, {
1077
- key: 1,
1083
+ e(t).isFeedvibe ? j("", !0) : (b(), B(E, {
1084
+ key: 0,
1078
1085
  "model-value": e(t).coinPrice ?? null,
1079
1086
  label: "Point Needed",
1080
1087
  min: 0,
@@ -1086,20 +1093,20 @@ const Mt = /* @__PURE__ */ J({
1086
1093
  "helper-text": e(W)(e(o), "coinPrice")
1087
1094
  }, {
1088
1095
  append: P(() => [
1089
- te(" point(s) ")
1096
+ oe(" point(s) ")
1090
1097
  ]),
1091
1098
  _: 1
1092
1099
  }, 8, ["model-value", "helper-state", "helper-text"])),
1093
- e(y).storeOption.stripe && !e(t).isFeedvibe ? (v(), $(L, { key: 2 }, [
1094
- qt,
1095
- s(R, {
1100
+ (Fe = e(y).storeOption) != null && Fe.stripe && !e(t).isFeedvibe ? (b(), $(L, { key: 1 }, [
1101
+ zt,
1102
+ s(J, {
1096
1103
  label: "Stripe Price ID",
1097
1104
  modelValue: e(t).stripePriceId,
1098
1105
  "onUpdate:modelValue": a[6] || (a[6] = (x) => e(t).stripePriceId = x),
1099
1106
  "helper-state": e(K)(e(o), "stripePriceId"),
1100
1107
  "helper-text": e(W)(e(o), "stripePriceId")
1101
1108
  }, null, 8, ["modelValue", "helper-state", "helper-text"]),
1102
- e(t).stripePriceId ? (v(), E(B, {
1109
+ e(t).stripePriceId ? (b(), B(E, {
1103
1110
  key: 0,
1104
1111
  "model-value": e(t).subscriptionValidity ?? null,
1105
1112
  min: 1,
@@ -1110,14 +1117,14 @@ const Mt = /* @__PURE__ */ J({
1110
1117
  "helper-text": e(W)(e(o), "subscriptionValidity")
1111
1118
  }, {
1112
1119
  append: P(() => [
1113
- te(" day(s) ")
1120
+ oe(" day(s) ")
1114
1121
  ]),
1115
1122
  _: 1
1116
1123
  }, 8, ["model-value", "helper-state", "helper-text"])) : j("", !0)
1117
1124
  ], 64)) : j("", !0),
1118
- e(t).isFeedvibe ? j("", !0) : (v(), $(L, { key: 3 }, [
1119
- Ht,
1120
- s(B, {
1125
+ e(t).isFeedvibe ? j("", !0) : (b(), $(L, { key: 2 }, [
1126
+ Yt,
1127
+ s(E, {
1121
1128
  modelValue: e(t).credit.normal,
1122
1129
  "onUpdate:modelValue": a[7] || (a[7] = (x) => e(t).credit.normal = x),
1123
1130
  label: "Normal credit",
@@ -1126,12 +1133,12 @@ const Mt = /* @__PURE__ */ J({
1126
1133
  "helper-text": e(W)(e(o), "credit.normal")
1127
1134
  }, {
1128
1135
  append: P(() => [
1129
- te(" credit ")
1136
+ oe(" credit ")
1130
1137
  ]),
1131
1138
  _: 1
1132
1139
  }, 8, ["modelValue", "helper-state", "helper-text"]),
1133
- s(B, {
1134
- "model-value": ((re = e(t).credit.free) == null ? void 0 : re.amount) ?? null,
1140
+ s(E, {
1141
+ "model-value": ((Se = e(t).credit.free) == null ? void 0 : Se.amount) ?? null,
1135
1142
  min: 0,
1136
1143
  "onUpdate:modelValue": a[8] || (a[8] = (x) => {
1137
1144
  e(t).credit.free || (e(t).credit.free = {
@@ -1145,14 +1152,14 @@ const Mt = /* @__PURE__ */ J({
1145
1152
  "helper-text": e(W)(e(o), "credit.free.amount")
1146
1153
  }, {
1147
1154
  append: P(() => [
1148
- te(" credit ")
1155
+ oe(" credit ")
1149
1156
  ]),
1150
1157
  _: 1
1151
1158
  }, 8, ["model-value", "helper-state", "helper-text"]),
1152
- (Ve = e(t).credit.free) != null && Ve.amount ? (v(), E(B, {
1159
+ (we = e(t).credit.free) != null && we.amount ? (b(), B(E, {
1153
1160
  key: 0,
1154
1161
  disabled: !!e(t).stripePriceId,
1155
- "model-value": ((Se = e(t).credit.free) == null ? void 0 : Se.day) ?? null,
1162
+ "model-value": (($e = e(t).credit.free) == null ? void 0 : $e.day) ?? null,
1156
1163
  min: 0,
1157
1164
  "onUpdate:modelValue": a[9] || (a[9] = (x) => {
1158
1165
  e(t).credit.free || (e(t).credit.free = {
@@ -1166,41 +1173,41 @@ const Mt = /* @__PURE__ */ J({
1166
1173
  "helper-text": e(W)(e(o), "credit.free.day")
1167
1174
  }, {
1168
1175
  append: P(() => [
1169
- te(" day(s) ")
1176
+ oe(" day(s) ")
1170
1177
  ]),
1171
1178
  _: 1
1172
1179
  }, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : j("", !0)
1173
1180
  ], 64)),
1174
- e(h) ? (v(), $(L, { key: 4 }, [
1175
- Kt,
1176
- s(Mt, {
1181
+ e(h) ? (b(), $(L, { key: 3 }, [
1182
+ Jt,
1183
+ s(qt, {
1177
1184
  modelValue: e(t).taxes,
1178
1185
  "onUpdate:modelValue": a[10] || (a[10] = (x) => e(t).taxes = x)
1179
1186
  }, null, 8, ["modelValue"]),
1180
- s(R, {
1187
+ s(J, {
1181
1188
  label: `Tax Charged (${e(w)})`,
1182
1189
  "model-value": e(c),
1183
1190
  disabled: ""
1184
1191
  }, null, 8, ["label", "model-value"])
1185
1192
  ], 64)) : j("", !0),
1186
- s(B, {
1193
+ s(E, {
1187
1194
  label: "Total Price",
1188
1195
  "model-value": e(O),
1189
1196
  disabled: !0
1190
1197
  }, null, 8, ["model-value"]),
1191
- Wt,
1192
- zt,
1193
- b("div", Yt, [
1194
- b("div", Jt, [
1195
- s(Je, {
1198
+ Gt,
1199
+ Xt,
1200
+ v("div", Zt, [
1201
+ v("div", Qt, [
1202
+ s(Ze, {
1196
1203
  label: `Reward type: ${e(m).length == 0 ? "All" : e(m)[0].name}`
1197
1204
  }, {
1198
1205
  default: P(() => [
1199
- s(G, {
1206
+ s(te, {
1200
1207
  onClick: a[11] || (a[11] = (x) => m.value = []),
1201
1208
  label: "All"
1202
1209
  }),
1203
- s(G, {
1210
+ s(te, {
1204
1211
  onClick: a[12] || (a[12] = (x) => m.value = [
1205
1212
  {
1206
1213
  id: "type",
@@ -1210,7 +1217,7 @@ const Mt = /* @__PURE__ */ J({
1210
1217
  ]),
1211
1218
  label: e(ie).VOUCHER.name
1212
1219
  }, null, 8, ["label"]),
1213
- s(G, {
1220
+ s(te, {
1214
1221
  onClick: a[13] || (a[13] = (x) => m.value = [
1215
1222
  {
1216
1223
  id: "type",
@@ -1224,9 +1231,9 @@ const Mt = /* @__PURE__ */ J({
1224
1231
  _: 1
1225
1232
  }, 8, ["label"])
1226
1233
  ]),
1227
- s(se, {
1234
+ s(De, {
1228
1235
  modelValue: e(M),
1229
- "onUpdate:modelValue": a[14] || (a[14] = (x) => ne(M) ? M.value = x : null),
1236
+ "onUpdate:modelValue": a[14] || (a[14] = (x) => se(M) ? M.value = x : null),
1230
1237
  selection: "multiple",
1231
1238
  "column-filter": e(m),
1232
1239
  "column-defs": p,
@@ -1235,30 +1242,30 @@ const Mt = /* @__PURE__ */ J({
1235
1242
  ),
1236
1243
  "hide-footer": e(n).length <= 10
1237
1244
  }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
1238
- s(ke, {
1245
+ s(U, {
1239
1246
  text: e(W)(e(o), "titles"),
1240
1247
  state: e(K)(e(o), "titles")
1241
1248
  }, null, 8, ["text", "state"])
1242
1249
  ]),
1243
- Gt,
1244
- b("div", Xt, [
1245
- s(V, {
1250
+ eo,
1251
+ v("div", to, [
1252
+ s(C, {
1246
1253
  "model-value": e(t).internal ?? !1,
1247
1254
  "onUpdate:modelValue": a[15] || (a[15] = (x) => e(t).internal = x),
1248
1255
  "label-placement": "right",
1249
1256
  label: "Internal Bundle",
1250
1257
  sublabel: "Internal bundle will be hidden in FeedMe member app"
1251
1258
  }, null, 8, ["model-value"]),
1252
- s(V, {
1259
+ s(C, {
1253
1260
  "model-value": e(t).hideInPos ?? !1,
1254
1261
  "onUpdate:modelValue": a[16] || (a[16] = (x) => e(t).hideInPos = x),
1255
1262
  "label-placement": "right",
1256
1263
  label: "Hide In POS",
1257
1264
  sublabel: "Bundle will be hidden in FeedMe POS"
1258
1265
  }, null, 8, ["model-value"]),
1259
- s(B, {
1260
- "model-value": ((we = (Fe = e(t).config) == null ? void 0 : Fe.options) == null ? void 0 : we.maxPerUser) || null,
1261
- "onUpdate:modelValue": a[17] || (a[17] = (x) => e(ae).set(e(t), "config.options.maxPerUser", x)),
1266
+ s(E, {
1267
+ "model-value": ((Te = (Pe = e(t).config) == null ? void 0 : Pe.options) == null ? void 0 : Te.maxPerUser) || null,
1268
+ "onUpdate:modelValue": a[17] || (a[17] = (x) => e(le).set(e(t), "config.options.maxPerUser", x)),
1262
1269
  label: "Max purchase per user",
1263
1270
  "show-steppers": !1,
1264
1271
  placeholder: "Unlimited"
@@ -1272,14 +1279,14 @@ const Mt = /* @__PURE__ */ J({
1272
1279
  };
1273
1280
  }
1274
1281
  });
1275
- var eo = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedme.cc" };
1276
- const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8 items-center" }, ao = { class: "fm-typo-en-body-lg-600" }, lo = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, no = /* @__PURE__ */ b("img", {
1277
- src: Ae,
1282
+ var lo = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedme.cc" };
1283
+ const no = { class: "px-24 flex flex-col gap-y-16" }, so = { class: "flex gap-8 items-center" }, ro = { class: "fm-typo-en-body-lg-600" }, io = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, uo = /* @__PURE__ */ v("img", {
1284
+ src: Ee,
1278
1285
  class: "aspect-square w-[150px]"
1279
- }, null, -1), so = /* @__PURE__ */ b("div", { class: "flex flex-col gap-16 text-center" }, [
1280
- /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800" }, "Store bundle"),
1281
- /* @__PURE__ */ b("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Add item that you want to let your user spend and get here. It can be bunch of vouchers, benefits, experience and more! ")
1282
- ], -1), Uo = /* @__PURE__ */ J({
1286
+ }, null, -1), mo = /* @__PURE__ */ v("div", { class: "flex flex-col gap-16 text-center" }, [
1287
+ /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800" }, "Store bundle"),
1288
+ /* @__PURE__ */ v("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Add item that you want to let your user spend and get here. It can be bunch of vouchers, benefits, experience and more! ")
1289
+ ], -1), Do = /* @__PURE__ */ G({
1283
1290
  __name: "Store",
1284
1291
  setup(f) {
1285
1292
  const g = {
@@ -1290,7 +1297,7 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1290
1297
  label: "Store setting",
1291
1298
  value: "setting",
1292
1299
  isPrimary: !1
1293
- }, S = {
1300
+ }, F = {
1294
1301
  label: "Manage reward",
1295
1302
  value: "create_reward"
1296
1303
  }, y = {
@@ -1298,13 +1305,13 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1298
1305
  value: "create_category",
1299
1306
  isPrimary: !0,
1300
1307
  prependIcon: "add"
1301
- }, l = et(), r = xe(), { global: t, minor: F } = Me, d = Te(), o = D(() => r.sortedStoreCategories), p = A(), m = A();
1308
+ }, l = at(), r = xe(), { global: t, minor: S } = qe, d = Re(), o = D(() => r.sortedStoreCategories), p = A(), m = A();
1302
1309
  async function n(h) {
1303
1310
  var w;
1304
- h === "setting" ? (w = p.value) == null || w.showSheet(!0, r.storeOption) : h === "create_category" ? T(-1) : h === "create_reward" ? await l.push({ name: qe["$connect-STORE_REWARDS"] }) : h == "payout" && window.open(eo.paymentPortalUrl, "_blank");
1311
+ h === "setting" ? (w = p.value) == null || w.showSheet(!0, r.storeOption) : h === "create_category" ? T(-1) : h === "create_reward" ? await l.push({ name: We["$connect-STORE_REWARDS"] }) : h == "payout" && window.open(lo.paymentPortalUrl, "_blank");
1305
1312
  }
1306
- async function C(h) {
1307
- await F(
1313
+ async function V(h) {
1314
+ await S(
1308
1315
  async () => {
1309
1316
  var w;
1310
1317
  await fe.updateStore(h), await r.readMemberStore(), (w = p.value) == null || w.showSheet(!1);
@@ -1316,7 +1323,7 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1316
1323
  );
1317
1324
  }
1318
1325
  async function T(h = -1) {
1319
- var w, U;
1326
+ var w, k;
1320
1327
  if ((!r.storeOption || !r.storeOption.company) && await pe.confirm(
1321
1328
  "Please set up your store setting first before adding category.",
1322
1329
  "Update store setting",
@@ -1325,16 +1332,16 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1325
1332
  return (w = p.value) == null ? void 0 : w.showSheet(!0);
1326
1333
  d.open({
1327
1334
  title: h == -1 ? "Add category" : "Edit category",
1328
- contentComponent: vt,
1335
+ contentComponent: ht,
1329
1336
  contentComponentProps: {
1330
- initialValue: ((U = o.value[h]) == null ? void 0 : U.name) ?? "",
1337
+ initialValue: ((k = o.value[h]) == null ? void 0 : k.name) ?? "",
1331
1338
  action: h == -1 ? "add" : "edit"
1332
1339
  }
1333
1340
  }).onPrimary(async (c) => {
1334
1341
  c === null && !await pe.remove(
1335
1342
  "Are you sure you want to remove category?",
1336
1343
  "Remove category"
1337
- ) || await F(
1344
+ ) || await S(
1338
1345
  async () => {
1339
1346
  const O = h == -1 ? [...o.value, { name: c, bundles: [] }] : [...o.value].map((I, q) => q == h ? { ...I, name: c } : I).filter((I) => I.name !== null);
1340
1347
  await fe.updateStoreBundle({
@@ -1348,12 +1355,12 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1348
1355
  );
1349
1356
  });
1350
1357
  }
1351
- async function N(h, w, U) {
1358
+ async function N(h, w, k) {
1352
1359
  var I, q;
1353
- w ?? (w = (I = m.value) == null ? void 0 : I.target.category), U ?? (U = (q = m.value) == null ? void 0 : q.target.index);
1354
- const c = $e(o.value), O = c[w];
1360
+ w ?? (w = (I = m.value) == null ? void 0 : I.target.category), k ?? (k = (q = m.value) == null ? void 0 : q.target.index);
1361
+ const c = ke(o.value), O = c[w];
1355
1362
  if (!O) {
1356
- je.error("Unexpected error", 2e3);
1363
+ He.error("Unexpected error", 2e3);
1357
1364
  return;
1358
1365
  }
1359
1366
  if (h == null) {
@@ -1362,10 +1369,10 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1362
1369
  "Delete bundle"
1363
1370
  ) == !1)
1364
1371
  return;
1365
- O.bundles.splice(U, 1);
1372
+ O.bundles.splice(k, 1);
1366
1373
  } else
1367
- U == -1 ? O.bundles.push(h) : O.bundles[U] = h;
1368
- await F(
1374
+ k == -1 ? O.bundles.push(h) : O.bundles[k] = h;
1375
+ await S(
1369
1376
  async () => {
1370
1377
  var H, u;
1371
1378
  if (h != null) {
@@ -1380,8 +1387,8 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1380
1387
  }), await r.readMemberStore(), await r.readMembership(), await r.readRewards(), (u = m.value) == null || u.showSheet(!1);
1381
1388
  },
1382
1389
  {
1383
- message: `${h == null ? "Deleting" : U == -1 ? "Creating" : "Updating"} bundle`,
1384
- successMessage: `Bundle ${h == null ? "deleted" : U == -1 ? "created" : "updated"} successfully`
1390
+ message: `${h == null ? "Deleting" : k == -1 ? "Creating" : "Updating"} bundle`,
1391
+ successMessage: `Bundle ${h == null ? "deleted" : k == -1 ? "created" : "updated"} successfully`
1385
1392
  }
1386
1393
  );
1387
1394
  }
@@ -1389,15 +1396,15 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1389
1396
  var w;
1390
1397
  (w = m.value) == null || w.showSheet(!0, {
1391
1398
  ...h,
1392
- bundle: h.bundle ? $e(h.bundle) : void 0
1399
+ bundle: h.bundle ? ke(h.bundle) : void 0
1393
1400
  });
1394
1401
  }
1395
1402
  const M = A([]);
1396
1403
  return me(async () => {
1397
1404
  var h, w;
1398
1405
  await t(async () => {
1399
- var U, c;
1400
- if (await r.readMemberStore(), await r.readMembership(), await r.readRewards(), await r.readPayoutAccount(), (U = l.currentRoute.value.query) != null && U.action) {
1406
+ var k, c;
1407
+ if (await r.readMemberStore(), await r.readMembership(), await r.readRewards(), await r.readPayoutAccount(), (k = l.currentRoute.value.query) != null && k.action) {
1401
1408
  switch ((c = l.currentRoute.value.query) == null ? void 0 : c.action) {
1402
1409
  case "update_setting":
1403
1410
  n("setting");
@@ -1408,15 +1415,15 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1408
1415
  case "create_feedvibe_bundle":
1409
1416
  d.open({
1410
1417
  title: "Select category",
1411
- contentComponent: xt
1418
+ contentComponent: Vt
1412
1419
  }).onPrimary((O) => {
1413
1420
  d.close(), ee({
1414
1421
  category: O,
1415
1422
  index: -1,
1416
1423
  bundle: {
1417
- ...ae.cloneDeep(ge),
1424
+ ...le.cloneDeep(ge),
1418
1425
  isFeedvibe: !0,
1419
- price: k.Dinero.fromNumber({
1426
+ price: R.Dinero.fromNumber({
1420
1427
  number: 10,
1421
1428
  precision: 2
1422
1429
  }).toObject()
@@ -1427,28 +1434,28 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1427
1434
  }
1428
1435
  l.replace({ query: {} });
1429
1436
  }
1430
- }), M.value = [i, S, y], (((h = r.payoutAccount) == null ? void 0 : h.status) != "APPROVED" || ((w = r.payoutAccount) == null ? void 0 : w.enable) != !0) && (M.value = [
1437
+ }), M.value = [i, F, y], (((h = r.payoutAccount) == null ? void 0 : h.status) != "APPROVED" || ((w = r.payoutAccount) == null ? void 0 : w.enable) != !0) && (M.value = [
1431
1438
  g,
1432
1439
  i,
1433
- S,
1440
+ F,
1434
1441
  y
1435
1442
  ]);
1436
1443
  }), (h, w) => {
1437
- const U = _("FmPageHead"), c = _("FmButton"), O = _("FmCard");
1438
- return v(), $(L, null, [
1439
- s(U, {
1444
+ const k = _("FmPageHead"), c = _("FmButton"), O = _("FmCard");
1445
+ return b(), $(L, null, [
1446
+ s(k, {
1440
1447
  title: "Store",
1441
1448
  actions: e(M),
1442
1449
  "onClick:action": n
1443
1450
  }, null, 8, ["actions"]),
1444
- b("div", to, [
1445
- e(o) && e(o).length > 0 ? (v(), $(L, { key: 0 }, [
1446
- (v(!0), $(L, null, oe(e(o), (I, q) => (v(), $("div", {
1451
+ v("div", no, [
1452
+ e(o) && e(o).length > 0 ? (b(), $(L, { key: 0 }, [
1453
+ (b(!0), $(L, null, ae(e(o), (I, q) => (b(), $("div", {
1447
1454
  key: I.name,
1448
1455
  class: "space-y-8 py-12"
1449
1456
  }, [
1450
- b("div", oo, [
1451
- b("div", ao, le(I.name), 1),
1457
+ v("div", so, [
1458
+ v("div", ro, ne(I.name), 1),
1452
1459
  s(_e, { json: I }, null, 8, ["json"]),
1453
1460
  s(c, {
1454
1461
  icon: "edit",
@@ -1457,31 +1464,31 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1457
1464
  onClick: (H) => T(q)
1458
1465
  }, null, 8, ["onClick"])
1459
1466
  ]),
1460
- b("div", lo, [
1461
- (v(!0), $(L, null, oe(I.bundles, (H, u) => (v(), E(mt, {
1467
+ v("div", io, [
1468
+ (b(!0), $(L, null, ae(I.bundles, (H, u) => (b(), B(yt, {
1462
1469
  bundle: H,
1463
1470
  key: H._id,
1464
1471
  onEdit: (a) => ee({ bundle: H, category: q, index: u }),
1465
1472
  onDelete: (a) => N(null, q, u)
1466
1473
  }, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
1467
- s(ct, {
1474
+ s(ft, {
1468
1475
  onCreate: (H) => ee({ category: q, index: -1 })
1469
1476
  }, null, 8, ["onCreate"])
1470
1477
  ])
1471
1478
  ]))), 128)),
1472
- s(Qt, {
1479
+ s(ao, {
1473
1480
  ref_key: "bundleSheetRef",
1474
1481
  ref: m,
1475
1482
  onUpdate: N
1476
1483
  }, null, 512)
1477
- ], 64)) : (v(), E(O, {
1484
+ ], 64)) : (b(), B(O, {
1478
1485
  key: 1,
1479
1486
  variant: "outlined",
1480
1487
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1481
1488
  }, {
1482
1489
  default: P(() => [
1483
- no,
1484
- so,
1490
+ uo,
1491
+ mo,
1485
1492
  s(c, {
1486
1493
  variant: "primary",
1487
1494
  label: "Add category",
@@ -1491,10 +1498,10 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1491
1498
  ]),
1492
1499
  _: 1
1493
1500
  })),
1494
- s(Ot, {
1501
+ s(jt, {
1495
1502
  ref_key: "settingSheetRef",
1496
1503
  ref: p,
1497
- onUpdate: C
1504
+ onUpdate: V
1498
1505
  }, null, 512)
1499
1506
  ])
1500
1507
  ], 64);
@@ -1502,5 +1509,5 @@ const to = { class: "px-24 flex flex-col gap-y-16" }, oo = { class: "flex gap-8
1502
1509
  }
1503
1510
  });
1504
1511
  export {
1505
- Uo as default
1512
+ Do as default
1506
1513
  };