@feedmepos/mf-connect 0.0.16-beta.15 → 0.0.16-beta.16

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 (64) hide show
  1. package/dist/{Analytic-DJhRtdsN.js → Analytic-bLizLbJa.js} +9 -9
  2. package/dist/{App-2tY0U97c.js → App-Ds7CQc12.js} +1127 -2776
  3. package/dist/{Broadcast-C6DwjiXb.js → Broadcast-B5Mg-uve.js} +8 -8
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrxUjVOW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D3dhzlYF.js} +8 -8
  5. package/dist/{Card-Bfe7aRhZ.js → Card-CgZQnEp0.js} +15 -15
  6. package/dist/{Collections-dwmL2_0n.js → Collections-ByuAY_DC.js} +4 -4
  7. package/dist/{Credit-DqBTIPFO.js → Credit-DIYIylxA.js} +8 -8
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BrAepuu8.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BOsLG0Eo.js} +22 -22
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CNFzOEsD.js → EffectSheet.vue_vue_type_style_index_0_lang-DoWhCxMM.js} +5 -5
  10. package/dist/{Experience-CzrBJ05F.js → Experience-jY58vCoP.js} +8 -8
  11. package/dist/{Game-D5Pe1dNa.js → Game-DA5L8V6j.js} +8 -8
  12. package/dist/{Marketing-B-xc3Enq.js → Marketing-eIz4iGsy.js} +5 -5
  13. package/dist/{Member-Bqz0MBCK.js → Member-DH9DEHRX.js} +4 -4
  14. package/dist/{MemberList-Ct-A3tqA.js → MemberList-CMIXdSgs.js} +14 -15
  15. package/dist/{MemberTransactions-Du5X_vO5.js → MemberTransactions-7-iQ_cAu.js} +1 -1
  16. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-hjUXGsN1.js → MessageInput.vue_vue_type_script_setup_true_lang-MP4mEA9t.js} +2 -2
  17. package/dist/{Mission-BK-mY_Ch.js → Mission-Coa_hN6d.js} +8 -8
  18. package/dist/{Point-CbZr_UO5.js → Point-CSlYPQXh.js} +8 -8
  19. package/dist/{Promotion-DACjJv_a.js → Promotion-z1v93j2v.js} +9 -9
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BA5KfKh4.js → RuleGroup.vue_vue_type_script_setup_true_lang-gzMPpCaM.js} +14 -14
  21. package/dist/{Segment-BCdo5XMD.js → Segment-Al61bHYD.js} +8 -8
  22. package/dist/{Setting-BSo7vFND.js → Setting-K6eahN7Y.js} +8 -8
  23. package/dist/{Store-c8WnnlS_.js → Store-DZv8Iguk.js} +468 -461
  24. package/dist/{StoreRewards-BY_zTMBZ.js → StoreRewards-CxeLRjwp.js} +11 -11
  25. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CFIobtfM.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BCh6NZyD.js} +6 -6
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D172oXuE.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DkfJijAI.js} +1 -1
  27. package/dist/{Tier-IatUkcWl.js → Tier-BqApC3pq.js} +14 -14
  28. package/dist/{Title-CVhaWfzN.js → Title-Caq8OXfR.js} +14 -14
  29. package/dist/{Transaction-CE6VaaPs.js → Transaction-BvlF1azu.js} +2 -2
  30. package/dist/{Voucher-DnVY-3JW.js → Voucher-CXOjQhZj.js} +11 -11
  31. package/dist/{app-nFEDcnMn.js → app-Bm5Jq5v0.js} +1 -1
  32. package/dist/{app-CACCmEjg.js → app-DeWid7Tl.js} +24 -27
  33. package/dist/app.js +1 -1
  34. package/dist/{business-CdGjzKcs.js → business-Fy1TH_4l.js} +1 -1
  35. package/dist/{campaign-BkYmJW7z.js → campaign-D1xpuZuL.js} +2 -2
  36. package/dist/{collection.fn-CGFAZQ2_.js → collection.fn-ClUU74TS.js} +2 -2
  37. package/dist/{dto-Dvj91pgr.js → dto-LHzgwiGa.js} +68 -68
  38. package/dist/{effect-Ophp7dON.js → effect-yGgbWnDg.js} +1 -1
  39. package/dist/{export-BGBPSHTs.js → export-DhsfFfY2.js} +3 -3
  40. package/dist/{helper-CUoZRpRy.js → helper-Bux3pQOn.js} +1 -1
  41. package/dist/{index-9iiggDJN.js → index-B673OjWB.js} +5 -5
  42. package/dist/{index-B0SLSgP6.js → index-BGpLHO9A.js} +1 -1
  43. package/dist/{index-CglJB_9S.js → index-BIyOsBh2.js} +2 -2
  44. package/dist/{index-DzK-3JOj.js → index-BMTJaXOh.js} +1 -1
  45. package/dist/{index-CK0ntPYI.js → index-Bn4XQbxl.js} +1 -1
  46. package/dist/{index-8b2vPpUK.js → index-BpvStEh1.js} +1 -1
  47. package/dist/{index-DmpRZsgz.js → index-Bqaj48b1.js} +3 -3
  48. package/dist/{index-9CXxhFs1.js → index-CzeHKjyw.js} +1 -1
  49. package/dist/{index-BmFcwAcv.js → index-DOuM3gj5.js} +2 -2
  50. package/dist/{index-BfTgMQXi.js → index-DQuLzu9p.js} +1 -1
  51. package/dist/{index-CiMqtKLV.js → index-DmhSJMOI.js} +3 -3
  52. package/dist/{index-BwMuicJb.js → index-JKtwv4CK.js} +5 -5
  53. package/dist/{index.esm2017-U95fg9MF.js → index.esm2017-loatrfCL.js} +1 -1
  54. package/dist/{loading-CMEZXUgZ.js → loading-C_-Tqxyl.js} +4 -4
  55. package/dist/{membership-3wPcH3Lm.js → membership-Kdzaj6qq.js} +3 -3
  56. package/dist/{money-ByQ17v9q.js → money-CwE68qJA.js} +1 -1
  57. package/dist/{number-DR_c0Nb-.js → number-CiFKdycE.js} +1 -1
  58. package/dist/{rule-BVmN8twE.js → rule-BoYiMCxm.js} +2 -2
  59. package/dist/{rule-builder-BkPl93YJ.js → rule-builder-CSPbn4Du.js} +1 -1
  60. package/dist/style.css +1 -1
  61. package/dist/{template-6EgHBGRC.js → template-Lql9BEp7.js} +4 -4
  62. package/dist/{vue-i18n-UO1Z1PmP.js → vue-i18n-D8eFv8xb.js} +169 -169
  63. package/dist/{xlsx-lp3tpnNx.js → xlsx-Q-Uj-BEy.js} +1 -1
  64. package/package.json +1 -1
@@ -1,34 +1,34 @@
1
- import { defineComponent as G, computed as I, resolveComponent as _, openBlock as x, createBlock as E, withCtx as k, createElementVNode as g, createElementBlock as P, createVNode as d, createCommentVNode as M, toDisplayString as j, unref as e, Fragment as L, renderList as ne, ref as D, isRef as re, reactive as Ae, onMounted as pe, watch as Ce, toRaw as Ee, createTextVNode as ae, h as Oe } from "vue";
2
- import { _ as Me } from "./tier-BJDhpH6X.js";
3
- import { useDialog as Ie, useDialogChild as Be, components as je } from "@feedmepos/ui-library";
4
- import { r as te, k as ye, t as Te, S as Le, c as qe, e as Y } from "./index-DmpRZsgz.js";
5
- import { d as oe, a as He, u as Ke, p as fe, n as We, f as be } from "./loading-CMEZXUgZ.js";
6
- import { u as Ve, C as ue } from "./membership-3wPcH3Lm.js";
7
- import { a as ze, c as Ue } from "./object-qECH92oz.js";
8
- import { _ as se } from "./lodash-B5I3zXaY.js";
9
- import { u as _e } from "./vue-i18n-UO1Z1PmP.js";
1
+ import { defineComponent as X, computed as I, resolveComponent as _, openBlock as x, createBlock as B, withCtx as k, createElementVNode as g, createElementBlock as P, createVNode as d, createCommentVNode as O, toDisplayString as j, unref as e, Fragment as L, renderList as le, ref as D, isRef as ie, reactive as Me, onMounted as pe, watch as Ce, toRaw as je, createTextVNode as se, h as Le } from "vue";
2
+ import { _ as qe } from "./tier-BJDhpH6X.js";
3
+ import { useDialog as Ae, useDialogChild as Ne, components as He } from "@feedmepos/ui-library";
4
+ import { r as te, k as ye, t as Ie, S as Ke, c as We, e as G } from "./index-Bqaj48b1.js";
5
+ import { d as oe, a as ze, u as Je, p as fe, n as Ye, f as be } from "./loading-C_-Tqxyl.js";
6
+ import { u as Ve, C as ue } from "./membership-Kdzaj6qq.js";
7
+ import { a as Ge, c as Be } from "./object-qECH92oz.js";
8
+ import { _ as re } from "./lodash-B5I3zXaY.js";
9
+ import { u as _e } from "./vue-i18n-D8eFv8xb.js";
10
10
  import { Z as z, g as K, a as W } from "./zod-W_PvIofQ.js";
11
- import { z as J, R as Je } from "./app-CACCmEjg.js";
12
- import { F as Ye, a as Ge, b as Xe, c as Re } from "./index-BmFcwAcv.js";
11
+ import { z as J, R as Xe } from "./app-DeWid7Tl.js";
12
+ import { F as Ze, a as Qe, b as et, c as De } from "./index-DOuM3gj5.js";
13
13
  import { u as xe } from "./app-wDQR6dpb.js";
14
14
  import { _ as Z } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js";
15
15
  import { J as Fe } from "./JsonViewer-v8_C7l5N.js";
16
- import { _ as Ze } from "./index-B0SLSgP6.js";
17
- import { _ as Qe } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
18
- import { _ as et } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
19
- import { z as tt, a as ot } from "./money-ByQ17v9q.js";
20
- import { F as nt } from "./number-DR_c0Nb-.js";
21
- import { t as lt } from "./helper-CUoZRpRy.js";
22
- import "./index-DzK-3JOj.js";
23
- import { useRouter as at } from "vue-router";
24
- import { m as ve } from "./index-9CXxhFs1.js";
25
- function st(b) {
16
+ import { _ as tt } from "./index-BGpLHO9A.js";
17
+ import { _ as ot } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
18
+ import { _ as nt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
19
+ import { z as lt, a as at } from "./money-CwE68qJA.js";
20
+ import { F as st } from "./number-CiFKdycE.js";
21
+ import { t as rt } from "./helper-Bux3pQOn.js";
22
+ import "./index-BMTJaXOh.js";
23
+ import { useRouter as it } from "vue-router";
24
+ import { m as ve } from "./index-CzeHKjyw.js";
25
+ function dt(b) {
26
26
  return oe.DineroFactory(b).toUnit();
27
27
  }
28
- function rt(b, h, l, F, u = [], s = []) {
29
- const y = Ze.compact(
30
- h.map((c) => b.find((i) => i.systemCode === c.systemCode && i.taxCode === c.taxCode)).filter((c) => !!c && s.includes(c.systemCode))
31
- ), a = y.reduce(
28
+ function ut(b, h, l, S, u = [], a = []) {
29
+ const y = tt.compact(
30
+ h.map((c) => b.find((i) => i.systemCode === c.systemCode && i.taxCode === c.taxCode)).filter((c) => !!c && a.includes(c.systemCode))
31
+ ), s = y.reduce(
32
32
  (c, i) => {
33
33
  var r;
34
34
  return Object.assign(c, {
@@ -49,7 +49,7 @@ function rt(b, h, l, F, u = [], s = []) {
49
49
  });
50
50
  },
51
51
  {}
52
- ), t = oe.Calculator.calculate({
52
+ ), o = oe.Calculator.calculate({
53
53
  items: {
54
54
  0: {
55
55
  quantity: 1,
@@ -58,11 +58,11 @@ function rt(b, h, l, F, u = [], s = []) {
58
58
  level: 0,
59
59
  type: {
60
60
  type: "BY_AMOUNT",
61
- amount: oe.DineroFactory(l).subtract(oe.Dinero.fromNumber({ number: F }).toObject()).toObject()
61
+ amount: oe.DineroFactory(l).subtract(oe.Dinero.fromNumber({ number: S }).toObject()).toObject()
62
62
  }
63
63
  }
64
64
  },
65
- taxes: a
65
+ taxes: s
66
66
  }
67
67
  },
68
68
  adjustments: {},
@@ -75,67 +75,67 @@ function rt(b, h, l, F, u = [], s = []) {
75
75
  taxCode: c.taxCode,
76
76
  rate: c.rate,
77
77
  total: oe.DineroFactory({
78
- ...t.items[0].taxes[c.taxCode]
78
+ ...o.items[0].taxes[c.taxCode]
79
79
  }).convertPrecision(2).toObject()
80
80
  }));
81
81
  }
82
- function it(b, h, l) {
83
- return b ? b.reduce((F, u) => {
84
- var s;
85
- return (s = l.find((y) => y.systemCode === u.systemCode)) != null && s.inclusive || (F = oe.DineroFactory(F.toObject()).add(u.total)), F;
82
+ function ct(b, h, l) {
83
+ return b ? b.reduce((S, u) => {
84
+ var a;
85
+ return (a = l.find((y) => y.systemCode === u.systemCode)) != null && a.inclusive || (S = oe.DineroFactory(S.toObject()).add(u.total)), S;
86
86
  }, oe.DineroFactory(h)).toObject() : oe.DineroFactory(h).toObject();
87
87
  }
88
- const dt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, ut = ["src"], ct = {
88
+ const mt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, pt = ["src"], yt = {
89
89
  key: 2,
90
90
  class: "absolute top-2 left-2"
91
- }, mt = { class: "absolute top-0 right-0" }, pt = { class: "fm-typo-en-body-lg-600" }, yt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ft = { class: "flex gap-8 items-center flex-wrap" }, bt = /* @__PURE__ */ G({
91
+ }, ft = { class: "absolute top-0 right-0" }, bt = { class: "fm-typo-en-body-lg-600" }, vt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "flex gap-8 items-center flex-wrap" }, xt = /* @__PURE__ */ X({
92
92
  __name: "StoreBundleCard",
93
93
  props: {
94
94
  bundle: { type: Object, required: !0 }
95
95
  },
96
96
  emits: ["edit", "delete"],
97
97
  setup(b, { emit: h }) {
98
- const l = b, F = h, u = I(() => {
98
+ const l = b, S = h, u = I(() => {
99
99
  const y = [];
100
100
  return l.bundle.price.amount > 0 && y.push(
101
- `${te.getCountry().currency.symbol}${st(l.bundle.price)}`
101
+ `${te.getCountry().currency.symbol}${dt(l.bundle.price)}`
102
102
  ), l.bundle.coinPrice && y.push(`${l.bundle.coinPrice} point(s)`), y.join(" or ");
103
- }), s = I(() => {
104
- var a, t;
103
+ }), a = I(() => {
104
+ var s, o;
105
105
  const y = [];
106
- if (l.bundle.titles.length > 0 && y.push(`${l.bundle.titles.length} title(s)`), l.bundle.vouchers.length > 0 && y.push(`${l.bundle.vouchers.length} voucher(s)`), l.bundle.credit.normal || (a = l.bundle.credit.free) != null && a.amount) {
107
- const c = l.bundle.credit.normal + (((t = l.bundle.credit.free) == null ? void 0 : t.amount) ?? 0);
106
+ if (l.bundle.titles.length > 0 && y.push(`${l.bundle.titles.length} title(s)`), l.bundle.vouchers.length > 0 && y.push(`${l.bundle.vouchers.length} voucher(s)`), l.bundle.credit.normal || (s = l.bundle.credit.free) != null && s.amount) {
107
+ const c = l.bundle.credit.normal + (((o = l.bundle.credit.free) == null ? void 0 : o.amount) ?? 0);
108
108
  y.push(`${c} credit(s)`);
109
109
  }
110
110
  return y;
111
111
  });
112
- return (y, a) => {
113
- const t = _("FmIcon"), c = _("FmChip"), i = _("FmButton"), r = _("FmMenuItem"), f = _("FmMenu"), n = _("FmCard");
114
- return x(), E(n, {
112
+ return (y, s) => {
113
+ const o = _("FmIcon"), c = _("FmChip"), i = _("FmButton"), r = _("FmMenuItem"), f = _("FmMenu"), n = _("FmCard");
114
+ return x(), B(n, {
115
115
  variant: "outlined",
116
116
  class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
117
117
  }, {
118
118
  default: k(() => [
119
- g("div", dt, [
119
+ g("div", mt, [
120
120
  b.bundle.image ? (x(), P("img", {
121
121
  key: 1,
122
122
  src: b.bundle.image,
123
123
  class: "w-full h-full object-contain aspect-video"
124
- }, null, 8, ut)) : (x(), E(t, {
124
+ }, null, 8, pt)) : (x(), B(o, {
125
125
  key: 0,
126
126
  name: "image",
127
127
  outline: !0,
128
128
  size: "md",
129
129
  class: "text-fm-color-neutral-gray-200"
130
130
  })),
131
- b.bundle.isFeedvibe ? (x(), P("div", ct, [
131
+ b.bundle.isFeedvibe ? (x(), P("div", yt, [
132
132
  d(c, {
133
133
  label: "Feedvibe",
134
134
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
135
135
  compact: ""
136
136
  })
137
- ])) : M("", !0),
138
- g("div", mt, [
137
+ ])) : O("", !0),
138
+ g("div", ft, [
139
139
  d(f, { placement: "bottom-end" }, {
140
140
  "menu-button": k(() => [
141
141
  d(i, {
@@ -145,11 +145,11 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
145
145
  ]),
146
146
  default: k(() => [
147
147
  d(r, {
148
- onClick: a[0] || (a[0] = (C) => F("edit", b.bundle)),
148
+ onClick: s[0] || (s[0] = (C) => S("edit", b.bundle)),
149
149
  label: "Edit"
150
150
  }),
151
151
  d(r, {
152
- onClick: a[1] || (a[1] = (C) => F("delete", b.bundle)),
152
+ onClick: s[1] || (s[1] = (C) => S("delete", b.bundle)),
153
153
  label: "Delete"
154
154
  })
155
155
  ]),
@@ -157,10 +157,10 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
157
157
  })
158
158
  ])
159
159
  ]),
160
- g("div", pt, j(b.bundle.name), 1),
161
- g("div", yt, j(e(u) || "Free"), 1),
162
- g("div", ft, [
163
- (x(!0), P(L, null, ne(e(s), (C, U) => (x(), E(c, {
160
+ g("div", bt, j(b.bundle.name), 1),
161
+ g("div", vt, j(e(u) || "Free"), 1),
162
+ g("div", gt, [
163
+ (x(!0), P(L, null, le(e(a), (C, U) => (x(), B(c, {
164
164
  key: U,
165
165
  label: C
166
166
  }, null, 8, ["label"]))), 128))
@@ -170,20 +170,20 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
170
170
  });
171
171
  };
172
172
  }
173
- }), vt = /* @__PURE__ */ G({
173
+ }), ht = /* @__PURE__ */ X({
174
174
  __name: "AddBundleCard",
175
175
  emits: ["create"],
176
176
  setup(b, { emit: h }) {
177
- const { t: l } = _e(), F = h;
178
- return (u, s) => {
179
- const y = _("FmButton"), a = _("FmCard");
180
- return x(), E(a, {
177
+ const { t: l } = _e(), S = h;
178
+ return (u, a) => {
179
+ const y = _("FmButton"), s = _("FmCard");
180
+ return x(), B(s, {
181
181
  variant: "outlined",
182
182
  class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
183
183
  }, {
184
184
  default: k(() => [
185
185
  d(y, {
186
- onClick: s[0] || (s[0] = (t) => F("create")),
186
+ onClick: a[0] || (a[0] = (o) => S("create")),
187
187
  label: e(l)("connect.store.actions.addBundle"),
188
188
  icon: "add",
189
189
  variant: "secondary"
@@ -193,7 +193,7 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
193
193
  });
194
194
  };
195
195
  }
196
- }), gt = { class: "space-y-16" }, xt = { class: "flex w-full justify-between pb-16" }, ht = { class: "flex items-center justify-end gap-8" }, Ct = /* @__PURE__ */ G({
196
+ }), Ct = { class: "space-y-16" }, Vt = { class: "flex w-full justify-between pb-16" }, _t = { class: "flex items-center justify-end gap-8" }, Ft = /* @__PURE__ */ X({
197
197
  __name: "CategoryDialog",
198
198
  props: {
199
199
  action: {
@@ -206,32 +206,32 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
206
206
  }
207
207
  },
208
208
  setup(b) {
209
- const h = b, l = Ie(), { emitData: F, emitAction: u } = Be(), s = D(h.initialValue), y = J.string().min(1);
210
- function a() {
211
- F(s.value), u("primary"), l.close();
209
+ const h = b, l = Ae(), { emitData: S, emitAction: u } = Ne(), a = D(h.initialValue), y = J.string().min(1);
210
+ function s() {
211
+ S(a.value), u("primary"), l.close();
212
212
  }
213
- function t() {
214
- F(null), u("primary"), l.close();
213
+ function o() {
214
+ S(null), u("primary"), l.close();
215
215
  }
216
216
  return (c, i) => {
217
217
  const r = _("FmTextField"), f = _("FmButton");
218
- return x(), P("div", gt, [
218
+ return x(), P("div", Ct, [
219
219
  d(r, {
220
- modelValue: e(s),
221
- "onUpdate:modelValue": i[0] || (i[0] = (n) => re(s) ? s.value = n : null),
220
+ modelValue: e(a),
221
+ "onUpdate:modelValue": i[0] || (i[0] = (n) => ie(a) ? a.value = n : null),
222
222
  label: "Category name",
223
223
  rules: [e(z).toRule(e(y))]
224
224
  }, null, 8, ["modelValue", "rules"]),
225
- g("div", xt, [
225
+ g("div", Vt, [
226
226
  g("div", null, [
227
- b.action == "edit" ? (x(), E(f, {
227
+ b.action == "edit" ? (x(), B(f, {
228
228
  key: 0,
229
- onClick: t,
229
+ onClick: o,
230
230
  label: "Delete",
231
231
  variant: "destructive"
232
- })) : M("", !0)
232
+ })) : O("", !0)
233
233
  ]),
234
- g("div", ht, [
234
+ g("div", _t, [
235
235
  d(f, {
236
236
  label: "Cancel",
237
237
  variant: "tertiary",
@@ -239,46 +239,46 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
239
239
  }),
240
240
  d(f, {
241
241
  label: b.action == "edit" ? "Edit" : "Add",
242
- disabled: !e(s),
243
- onClick: a
242
+ disabled: !e(a),
243
+ onClick: s
244
244
  }, null, 8, ["label", "disabled"])
245
245
  ])
246
246
  ])
247
247
  ]);
248
248
  };
249
249
  }
250
- }), Vt = { class: "space-y-16" }, _t = { class: "flex items-center justify-end gap-8 pb-16" }, Ft = /* @__PURE__ */ G({
250
+ }), St = { class: "space-y-16" }, wt = { class: "flex items-center justify-end gap-8 pb-16" }, Pt = /* @__PURE__ */ X({
251
251
  __name: "SelectCategoryDialog",
252
252
  setup(b) {
253
- const { emitData: h, emitAction: l } = Be(), F = Ve(), u = D(), s = I(
254
- () => F.sortedStoreCategories.map((y, a) => ({
253
+ const { emitData: h, emitAction: l } = Ne(), S = Ve(), u = D(), a = I(
254
+ () => S.sortedStoreCategories.map((y, s) => ({
255
255
  label: y.name,
256
- value: a
256
+ value: s
257
257
  }))
258
258
  );
259
- return (y, a) => {
260
- const t = _("FmSelect"), c = _("FmButton");
261
- return x(), P("div", Vt, [
262
- a[4] || (a[4] = g("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
263
- d(t, {
259
+ return (y, s) => {
260
+ const o = _("FmSelect"), c = _("FmButton");
261
+ return x(), P("div", St, [
262
+ s[4] || (s[4] = g("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1)),
263
+ d(o, {
264
264
  placeholder: "Select a category",
265
- items: e(s),
265
+ items: e(a),
266
266
  modelValue: e(u),
267
267
  "onUpdate:modelValue": [
268
- a[0] || (a[0] = (i) => re(u) ? u.value = i : null),
269
- a[1] || (a[1] = (i) => e(h)(i))
268
+ s[0] || (s[0] = (i) => ie(u) ? u.value = i : null),
269
+ s[1] || (s[1] = (i) => e(h)(i))
270
270
  ],
271
271
  label: "Category"
272
272
  }, null, 8, ["items", "modelValue"]),
273
- g("div", _t, [
273
+ g("div", wt, [
274
274
  d(c, {
275
275
  variant: "tertiary",
276
276
  label: "Cancel",
277
- onClick: a[2] || (a[2] = (i) => e(l)("tertiary"))
277
+ onClick: s[2] || (s[2] = (i) => e(l)("tertiary"))
278
278
  }),
279
279
  d(c, {
280
280
  label: "Select",
281
- onClick: a[3] || (a[3] = (i) => e(l)("primary")),
281
+ onClick: s[3] || (s[3] = (i) => e(l)("primary")),
282
282
  disabled: e(u) == null
283
283
  }, null, 8, ["disabled"])
284
284
  ])
@@ -289,7 +289,7 @@ const dt = { class: "relative h-[120px] aspect-video flex items-center justify-c
289
289
  function ge(b) {
290
290
  return b.states.map((h) => ({ label: h, value: h }));
291
291
  }
292
- const St = {
292
+ const kt = {
293
293
  [ye.enum.MY]: {
294
294
  states: [
295
295
  "Johor",
@@ -367,7 +367,7 @@ const St = {
367
367
  return ce().currency.code;
368
368
  },
369
369
  get fullTax() {
370
- return Te.getCountryFlattenTaxes(ce().code);
370
+ return Ie.getCountryFlattenTaxes(ce().code);
371
371
  },
372
372
  get taxSystem() {
373
373
  return ce().taxSystems;
@@ -379,7 +379,7 @@ const St = {
379
379
  }));
380
380
  },
381
381
  groupedTaxOptions() {
382
- const b = Te.getCountryFlattenTaxes(ce().code);
382
+ const b = Ie.getCountryFlattenTaxes(ce().code);
383
383
  return me.taxSystem.map((h) => ({
384
384
  code: h.code,
385
385
  options: b.map((l) => ({ ...l, feedmeTaxCode: me.generateCode(l) })).filter((l) => l.systemCode === h.code)
@@ -392,7 +392,7 @@ const St = {
392
392
  generateCode(b) {
393
393
  return `${b.systemCode}/${b.taxCode}`;
394
394
  }
395
- }, Q = me, wt = /* @__PURE__ */ G({
395
+ }, Q = me, $t = /* @__PURE__ */ X({
396
396
  __name: "TaxInclusiveSetting",
397
397
  props: {
398
398
  modelValue: {
@@ -403,16 +403,16 @@ const St = {
403
403
  },
404
404
  emits: ["update:model-value"],
405
405
  setup(b, { emit: h }) {
406
- const l = b, F = Q.taxSystem, u = h, s = D(l.modelValue);
406
+ const l = b, S = Q.taxSystem, u = h, a = D(l.modelValue);
407
407
  function y(i, r) {
408
- const f = se.clone(l.modelValue), n = f.findIndex((C) => C.systemCode === i);
408
+ const f = re.clone(l.modelValue), n = f.findIndex((C) => C.systemCode === i);
409
409
  n >= 0 ? f[n].inclusive = r : f.push({
410
410
  systemCode: i,
411
411
  inclusive: r
412
- }), s.value = f, u("update:model-value", f);
412
+ }), a.value = f, u("update:model-value", f);
413
413
  }
414
- function a() {
415
- return F.map((i) => {
414
+ function s() {
415
+ return S.map((i) => {
416
416
  const r = l.modelValue ? l.modelValue.find((f) => f.systemCode === i.code) : !1;
417
417
  return {
418
418
  label: i.name,
@@ -425,31 +425,31 @@ const St = {
425
425
  };
426
426
  });
427
427
  }
428
- const t = Ae(a());
428
+ const o = Me(s());
429
429
  function c(i, r) {
430
430
  return `${i} ${r ? "Inclusive" : "Exclusive"}`;
431
431
  }
432
432
  return pe(() => {
433
- l.modelValue.length || y(F[0].code, !1);
433
+ l.modelValue.length || y(S[0].code, !1);
434
434
  }), Ce(
435
435
  () => l.modelValue,
436
436
  (i, r) => {
437
- i != r && !i.length && y(F[0].code, !1);
437
+ i != r && !i.length && y(S[0].code, !1);
438
438
  }
439
439
  ), (i, r) => {
440
440
  const f = _("FmSwitch");
441
- return x(!0), P(L, null, ne(e(t), (n, C) => {
441
+ return x(!0), P(L, null, le(e(o), (n, C) => {
442
442
  var U;
443
443
  return x(), P("div", { key: C }, [
444
444
  d(f, {
445
- "model-value": ((U = e(s)[C]) == null ? void 0 : U.inclusive) || !1,
445
+ "model-value": ((U = e(a)[C]) == null ? void 0 : U.inclusive) || !1,
446
446
  "label-placement": "left",
447
447
  "onUpdate:modelValue": (R) => n.input(R)
448
448
  }, {
449
449
  label: k(() => {
450
450
  var R;
451
451
  return [
452
- g("div", null, j(c(n.label, ((R = e(s)[C]) == null ? void 0 : R.inclusive) || !1)), 1)
452
+ g("div", null, j(c(n.label, ((R = e(a)[C]) == null ? void 0 : R.inclusive) || !1)), 1)
453
453
  ];
454
454
  }),
455
455
  _: 2
@@ -459,49 +459,49 @@ const St = {
459
459
  };
460
460
  }
461
461
  });
462
- var Pt = { mode: "development", appMode: "mf" };
463
- const kt = { class: "space-y-8" }, $t = {
462
+ var Tt = { mode: "development", appMode: "mf" };
463
+ const Ut = { class: "space-y-8" }, Rt = {
464
464
  key: 0,
465
465
  class: "space-y-16"
466
- }, Tt = /* @__PURE__ */ G({
466
+ }, It = /* @__PURE__ */ X({
467
467
  __name: "StripeSetting",
468
468
  props: {
469
469
  modelValue: {}
470
470
  },
471
471
  emits: ["update:modelValue"],
472
472
  setup(b, { emit: h }) {
473
- const l = b, F = h, u = D(!1);
474
- Ce(u, (y, a) => {
475
- a != y && (!l.modelValue && y ? F("update:modelValue", {
473
+ const l = b, S = h, u = D(!1);
474
+ Ce(u, (y, s) => {
475
+ s != y && (!l.modelValue && y ? S("update:modelValue", {
476
476
  apiKey: "",
477
477
  webhookSecret: ""
478
- }) : y || F("update:modelValue", void 0));
478
+ }) : y || S("update:modelValue", void 0));
479
479
  });
480
- const s = I(() => {
481
- const y = Pt.mode === "development", a = te.getCountry().code.toLowerCase(), t = a != "my" ? `.${a}` : "";
482
- return `https://marketing${y ? "-dev" : ""}${t}.feedmeapi.com/stripe/${Le.getBusinessId()}/webhook`;
480
+ const a = I(() => {
481
+ const y = Tt.mode === "development", s = te.getCountry().code.toLowerCase(), o = s != "my" ? `.${s}` : "";
482
+ return `https://marketing${y ? "-dev" : ""}${o}.feedmeapi.com/stripe/${Ke.getBusinessId()}/webhook`;
483
483
  });
484
484
  return pe(() => {
485
485
  u.value = !!l.modelValue;
486
- }), (y, a) => {
487
- const t = _("FmSwitch"), c = _("FmTextField"), i = _("FmButton");
488
- return x(), P("div", kt, [
489
- d(t, {
486
+ }), (y, s) => {
487
+ const o = _("FmSwitch"), c = _("FmTextField"), i = _("FmButton");
488
+ return x(), P("div", Ut, [
489
+ d(o, {
490
490
  modelValue: e(u),
491
- "onUpdate:modelValue": a[0] || (a[0] = (r) => re(u) ? u.value = r : null),
491
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => ie(u) ? u.value = r : null),
492
492
  value: "true",
493
493
  label: "Enable Stripe"
494
494
  }, null, 8, ["modelValue"]),
495
- l.modelValue ? (x(), P("div", $t, [
495
+ l.modelValue ? (x(), P("div", Rt, [
496
496
  d(c, {
497
497
  label: "API Key",
498
498
  modelValue: l.modelValue.apiKey,
499
- "onUpdate:modelValue": a[1] || (a[1] = (r) => l.modelValue.apiKey = r),
499
+ "onUpdate:modelValue": s[1] || (s[1] = (r) => l.modelValue.apiKey = r),
500
500
  "helper-text": "Go to Stripe Dashboard get your API Key and paste here."
501
501
  }, null, 8, ["modelValue"]),
502
502
  d(c, {
503
503
  label: "Webhook URL",
504
- "model-value": e(s),
504
+ "model-value": e(a),
505
505
  readonly: "",
506
506
  "helper-text": "Copy this URL to your Stripe dashboard"
507
507
  }, {
@@ -509,37 +509,37 @@ const kt = { class: "space-y-8" }, $t = {
509
509
  d(i, {
510
510
  icon: "content_copy",
511
511
  variant: "tertiary",
512
- onClick: a[2] || (a[2] = (r) => e(He)(e(s)))
512
+ onClick: s[2] || (s[2] = (r) => e(ze)(e(a)))
513
513
  })
514
514
  ]),
515
515
  _: 1
516
516
  }, 8, ["model-value"]),
517
517
  d(c, {
518
518
  modelValue: l.modelValue.webhookSecret,
519
- "onUpdate:modelValue": a[3] || (a[3] = (r) => l.modelValue.webhookSecret = r),
519
+ "onUpdate:modelValue": s[3] || (s[3] = (r) => l.modelValue.webhookSecret = r),
520
520
  label: "Webhook Secret",
521
521
  "helper-text": `Copy the webhook signing secret from your Stripe account and paste
522
522
  here.`
523
523
  }, null, 8, ["modelValue"])
524
- ])) : M("", !0)
524
+ ])) : O("", !0)
525
525
  ]);
526
526
  };
527
527
  }
528
- }), Ut = {
528
+ }), Bt = {
529
529
  key: 0,
530
530
  class: "space-y-16 pr-12"
531
- }, Rt = {
531
+ }, Dt = {
532
532
  key: 0,
533
533
  class: "space-y-16"
534
- }, It = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Bt = { class: "space-y-4" }, Dt = { class: "space-y-16" }, Nt = { class: "flex items-center gap-8" }, At = /* @__PURE__ */ G({
534
+ }, At = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Nt = { class: "space-y-4" }, Et = { class: "space-y-16" }, Ot = { class: "flex items-center gap-8" }, Mt = /* @__PURE__ */ X({
535
535
  __name: "StoreSettingSheet",
536
536
  emits: ["update"],
537
537
  setup(b, { expose: h, emit: l }) {
538
- const F = l, u = D(!1), s = D(), y = D(!1), a = Ye.extend({
539
- company: Ge.extend({
538
+ const S = l, u = D(!1), a = D(), y = D(!1), s = Ze.extend({
539
+ company: Qe.extend({
540
540
  name: J.string().min(1, "Company name is required"),
541
541
  regNo: J.string().min(1, "Registration number is required"),
542
- address: Xe.extend({
542
+ address: et.extend({
543
543
  line1: J.string().min(1, "Line 1 is required"),
544
544
  line2: J.string().optional(),
545
545
  state: J.string().min(1, "State is required"),
@@ -550,10 +550,10 @@ const kt = { class: "space-y-8" }, $t = {
550
550
  phoneNo: J.string().min(1, "Phone number is required"),
551
551
  sstRegNo: J.string().optional()
552
552
  })
553
- }), t = I(() => a.safeParse(s.value).success);
553
+ }), o = I(() => s.safeParse(a.value).success);
554
554
  function c() {
555
- const f = a.safeParse(s.value);
556
- f.success && F("update", f.data);
555
+ const f = s.safeParse(a.value);
556
+ f.success && S("update", f.data);
557
557
  }
558
558
  function i() {
559
559
  return {
@@ -575,25 +575,25 @@ const kt = { class: "space-y-8" }, $t = {
575
575
  };
576
576
  }
577
577
  function r(f, n) {
578
- u.value = f, f && (s.value = n != null && n.company ? n : i());
578
+ u.value = f, f && (a.value = n != null && n.company ? n : i());
579
579
  }
580
580
  return h({
581
581
  showSheet: r,
582
- data: s
582
+ data: a
583
583
  }), (f, n) => {
584
- const C = _("FmIcon"), U = _("FmMenuItem"), R = _("FmMenu"), le = _("FmSelect"), ee = _("FmButton"), O = _("FmSideSheet");
585
- return x(), E(O, {
584
+ const C = _("FmIcon"), U = _("FmMenuItem"), R = _("FmMenu"), ae = _("FmSelect"), ee = _("FmButton"), M = _("FmSideSheet");
585
+ return x(), B(M, {
586
586
  "max-width": 560,
587
587
  modelValue: e(u),
588
- "onUpdate:modelValue": n[15] || (n[15] = (v) => re(u) ? u.value = v : null),
588
+ "onUpdate:modelValue": n[15] || (n[15] = (v) => ie(u) ? u.value = v : null),
589
589
  header: "Store setting"
590
590
  }, {
591
591
  "side-sheet-footer": k(() => [
592
- g("div", Nt, [
592
+ g("div", Ot, [
593
593
  d(ee, {
594
594
  label: "Submit",
595
595
  onClick: c,
596
- disabled: !e(t) || e(xe)().isLoading,
596
+ disabled: !e(o) || e(xe)().isLoading,
597
597
  loading: e(xe)().isLoading
598
598
  }, null, 8, ["disabled", "loading"]),
599
599
  d(ee, {
@@ -606,70 +606,70 @@ const kt = { class: "space-y-8" }, $t = {
606
606
  default: k(() => {
607
607
  var v, w;
608
608
  return [
609
- d(Fe, { json: e(s) }, null, 8, ["json"]),
610
- e(s) && e(s).company ? (x(), P("div", Ut, [
609
+ d(Fe, { json: e(a) }, null, 8, ["json"]),
610
+ e(a) && e(a).company ? (x(), P("div", Bt, [
611
611
  n[19] || (n[19] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Company legal information ", -1)),
612
612
  d(Z, {
613
- modelValue: e(s).company.name,
614
- "onUpdate:modelValue": n[0] || (n[0] = (m) => e(s).company.name = m),
613
+ modelValue: e(a).company.name,
614
+ "onUpdate:modelValue": n[0] || (n[0] = (m) => e(a).company.name = m),
615
615
  label: "Company name",
616
- schema: e(z).typeAtPath(e(a), "company.name")
616
+ schema: e(z).typeAtPath(e(s), "company.name")
617
617
  }, null, 8, ["modelValue", "schema"]),
618
618
  d(Z, {
619
- modelValue: e(s).company.regNo,
620
- "onUpdate:modelValue": n[1] || (n[1] = (m) => e(s).company.regNo = m),
619
+ modelValue: e(a).company.regNo,
620
+ "onUpdate:modelValue": n[1] || (n[1] = (m) => e(a).company.regNo = m),
621
621
  label: "Registration number",
622
- schema: e(z).typeAtPath(e(a), "company.regNo")
622
+ schema: e(z).typeAtPath(e(s), "company.regNo")
623
623
  }, null, 8, ["modelValue", "schema"]),
624
624
  d(Z, {
625
- modelValue: e(s).company.sstRegNo,
625
+ modelValue: e(a).company.sstRegNo,
626
626
  "onUpdate:modelValue": [
627
- n[2] || (n[2] = (m) => e(s).company.sstRegNo = m),
628
- n[3] || (n[3] = (m) => m ? null : e(s).inclusiveTaxes = [])
627
+ n[2] || (n[2] = (m) => e(a).company.sstRegNo = m),
628
+ n[3] || (n[3] = (m) => m ? null : e(a).inclusiveTaxes = [])
629
629
  ],
630
630
  label: "Tax Registration number",
631
- schema: e(z).typeAtPath(e(a), "company.sstRegNo")
631
+ schema: e(z).typeAtPath(e(s), "company.sstRegNo")
632
632
  }, null, 8, ["modelValue", "schema"]),
633
- (v = e(s).company) != null && v.sstRegNo && e(s).inclusiveTaxes ? (x(), P("div", Rt, [
633
+ (v = e(a).company) != null && v.sstRegNo && e(a).inclusiveTaxes ? (x(), P("div", Dt, [
634
634
  n[16] || (n[16] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Tax", -1)),
635
- d(wt, {
636
- modelValue: e(s).inclusiveTaxes,
637
- "onUpdate:modelValue": n[4] || (n[4] = (m) => e(s).inclusiveTaxes = m)
635
+ d($t, {
636
+ modelValue: e(a).inclusiveTaxes,
637
+ "onUpdate:modelValue": n[4] || (n[4] = (m) => e(a).inclusiveTaxes = m)
638
638
  }, null, 8, ["modelValue"])
639
- ])) : M("", !0),
639
+ ])) : O("", !0),
640
640
  d(Z, {
641
- modelValue: e(s).company.phoneNo,
642
- "onUpdate:modelValue": n[5] || (n[5] = (m) => e(s).company.phoneNo = m),
641
+ modelValue: e(a).company.phoneNo,
642
+ "onUpdate:modelValue": n[5] || (n[5] = (m) => e(a).company.phoneNo = m),
643
643
  label: "Phone number",
644
- schema: e(z).typeAtPath(e(a), "company.phoneNo")
644
+ schema: e(z).typeAtPath(e(s), "company.phoneNo")
645
645
  }, null, 8, ["modelValue", "schema"]),
646
646
  n[20] || (n[20] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Address", -1)),
647
647
  d(Z, {
648
- modelValue: e(s).company.address.line1,
649
- "onUpdate:modelValue": n[6] || (n[6] = (m) => e(s).company.address.line1 = m),
648
+ modelValue: e(a).company.address.line1,
649
+ "onUpdate:modelValue": n[6] || (n[6] = (m) => e(a).company.address.line1 = m),
650
650
  label: "Line 1",
651
- schema: e(z).typeAtPath(e(a), "company.address.line1")
651
+ schema: e(z).typeAtPath(e(s), "company.address.line1")
652
652
  }, null, 8, ["modelValue", "schema"]),
653
653
  d(Z, {
654
- modelValue: e(s).company.address.line2,
655
- "onUpdate:modelValue": n[7] || (n[7] = (m) => e(s).company.address.line2 = m),
654
+ modelValue: e(a).company.address.line2,
655
+ "onUpdate:modelValue": n[7] || (n[7] = (m) => e(a).company.address.line2 = m),
656
656
  label: "Line 2",
657
- schema: e(z).typeAtPath(e(a), "company.address.line2")
657
+ schema: e(z).typeAtPath(e(s), "company.address.line2")
658
658
  }, null, 8, ["modelValue", "schema"]),
659
- g("div", It, [
659
+ g("div", At, [
660
660
  d(Z, {
661
- modelValue: e(s).company.address.city,
662
- "onUpdate:modelValue": n[8] || (n[8] = (m) => e(s).company.address.city = m),
661
+ modelValue: e(a).company.address.city,
662
+ "onUpdate:modelValue": n[8] || (n[8] = (m) => e(a).company.address.city = m),
663
663
  label: "City",
664
- schema: e(z).typeAtPath(e(a), "company.address.city")
664
+ schema: e(z).typeAtPath(e(s), "company.address.city")
665
665
  }, null, 8, ["modelValue", "schema"]),
666
666
  d(Z, {
667
- modelValue: e(s).company.address.postcode,
668
- "onUpdate:modelValue": n[9] || (n[9] = (m) => e(s).company.address.postcode = m),
667
+ modelValue: e(a).company.address.postcode,
668
+ "onUpdate:modelValue": n[9] || (n[9] = (m) => e(a).company.address.postcode = m),
669
669
  label: "Postcode",
670
- schema: e(z).typeAtPath(e(a), "company.address.postcode")
670
+ schema: e(z).typeAtPath(e(s), "company.address.postcode")
671
671
  }, null, 8, ["modelValue", "schema"]),
672
- g("div", Bt, [
672
+ g("div", Nt, [
673
673
  n[17] || (n[17] = g("div", { class: "fm-typo-en-body-lg-400" }, "State", -1)),
674
674
  d(R, {
675
675
  placement: "top-end",
@@ -677,9 +677,9 @@ const kt = { class: "space-y-8" }, $t = {
677
677
  }, {
678
678
  "menu-button": k(() => [
679
679
  d(Z, {
680
- modelValue: e(s).company.address.state,
681
- "onUpdate:modelValue": n[10] || (n[10] = (m) => e(s).company.address.state = m),
682
- schema: e(z).typeAtPath(e(a), "company.address.state"),
680
+ modelValue: e(a).company.address.state,
681
+ "onUpdate:modelValue": n[10] || (n[10] = (m) => e(a).company.address.state = m),
682
+ schema: e(z).typeAtPath(e(s), "company.address.state"),
683
683
  onFocusChanged: n[11] || (n[11] = (m) => y.value = m)
684
684
  }, {
685
685
  append: k(() => [
@@ -691,44 +691,44 @@ const kt = { class: "space-y-8" }, $t = {
691
691
  }, 8, ["modelValue", "schema"])
692
692
  ]),
693
693
  default: k(() => [
694
- (x(!0), P(L, null, ne(e(St)[e(te).getCountry().code].stateItems.filter(
694
+ (x(!0), P(L, null, le(e(kt)[e(te).getCountry().code].stateItems.filter(
695
695
  (m) => {
696
- var T, N;
697
- return m.label.toLowerCase().includes(((N = (T = e(s)) == null ? void 0 : T.company) == null ? void 0 : N.address.state.toLowerCase()) ?? "");
696
+ var T, A;
697
+ return m.label.toLowerCase().includes(((A = (T = e(a)) == null ? void 0 : T.company) == null ? void 0 : A.address.state.toLowerCase()) ?? "");
698
698
  }
699
- ) || [], (m) => (x(), E(U, {
699
+ ) || [], (m) => (x(), B(U, {
700
700
  key: m.value,
701
- "model-value": e(s).company.address.state === m.value,
701
+ "model-value": e(a).company.address.state === m.value,
702
702
  label: m.label,
703
703
  onClick: () => {
704
- e(s).company.address.state = m.value, y.value = !1;
704
+ e(a).company.address.state = m.value, y.value = !1;
705
705
  }
706
706
  }, null, 8, ["model-value", "label", "onClick"]))), 128))
707
707
  ]),
708
708
  _: 1
709
709
  }, 8, ["model-value"])
710
710
  ]),
711
- d(le, {
711
+ d(ae, {
712
712
  label: "Country",
713
- modelValue: e(s).company.address.country,
714
- "onUpdate:modelValue": n[12] || (n[12] = (m) => e(s).company.address.country = m),
713
+ modelValue: e(a).company.address.country,
714
+ "onUpdate:modelValue": n[12] || (n[12] = (m) => e(a).company.address.country = m),
715
715
  items: [
716
716
  {
717
717
  label: e(te).getCountry().name,
718
718
  value: e(te).getCountry().name
719
719
  }
720
720
  ],
721
- rules: [e(z).ruleAtPath(e(a), "company.address.country")]
721
+ rules: [e(z).ruleAtPath(e(s), "company.address.country")]
722
722
  }, null, 8, ["modelValue", "items", "rules"])
723
723
  ]),
724
- g("div", Dt, [
724
+ g("div", Et, [
725
725
  n[18] || (n[18] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Stripe Integration ", -1)),
726
- d(Tt, {
727
- "model-value": (w = e(s)) == null ? void 0 : w.stripe,
728
- "onUpdate:modelValue": n[13] || (n[13] = (m) => e(s).stripe = m)
726
+ d(It, {
727
+ "model-value": (w = e(a)) == null ? void 0 : w.stripe,
728
+ "onUpdate:modelValue": n[13] || (n[13] = (m) => e(a).stripe = m)
729
729
  }, null, 8, ["model-value"])
730
730
  ])
731
- ])) : M("", !0)
731
+ ])) : O("", !0)
732
732
  ];
733
733
  }),
734
734
  _: 1
@@ -736,10 +736,10 @@ const kt = { class: "space-y-8" }, $t = {
736
736
  };
737
737
  }
738
738
  });
739
- function Et(b, h = !0) {
740
- return qe(b).toFormat(h);
739
+ function jt(b, h = !0) {
740
+ return We(b).toFormat(h);
741
741
  }
742
- const Ot = /* @__PURE__ */ G({
742
+ const Lt = /* @__PURE__ */ X({
743
743
  __name: "TaxVariantSetting",
744
744
  props: {
745
745
  modelValue: {
@@ -750,41 +750,41 @@ const Ot = /* @__PURE__ */ G({
750
750
  },
751
751
  emits: ["update:modelValue"],
752
752
  setup(b, { emit: h }) {
753
- const l = b, F = h;
753
+ const l = b, S = h;
754
754
  pe(() => {
755
- if (y.value.length !== s.value.length) {
756
- const c = s.value.reduce((i, r) => {
755
+ if (y.value.length !== a.value.length) {
756
+ const c = a.value.reduce((i, r) => {
757
757
  const f = Q.systemDefaultCode(r.name);
758
758
  if (!f) return i;
759
759
  const { systemCode: n, taxCode: C } = f;
760
760
  return r.value || i.push({ systemCode: n, taxCode: C }), i;
761
761
  }, []);
762
- t(c);
762
+ o(c);
763
763
  }
764
764
  });
765
765
  function u() {
766
766
  return Q.groupedTaxOptions();
767
767
  }
768
- const s = I(() => u().map((c) => ({
768
+ const a = I(() => u().map((c) => ({
769
769
  name: c.code,
770
770
  value: (y.value || []).find(
771
771
  (i) => c.options.some((r) => r.feedmeTaxCode === i)
772
772
  ),
773
773
  options: c.options.map((i) => ({
774
- label: `${i.name} (${nt(i.rate)}%)`,
774
+ label: `${i.name} (${st(i.rate)}%)`,
775
775
  value: i.feedmeTaxCode
776
776
  }))
777
777
  }))), y = I(() => l.modelValue.map((c) => Q.generateCode(c)));
778
- function a(c) {
778
+ function s(c) {
779
779
  const i = u().find(
780
780
  (C) => C.options.some((U) => U.feedmeTaxCode === c)
781
781
  ), r = i == null ? void 0 : i.options.find((C) => C.feedmeTaxCode === c);
782
782
  if (!r) return;
783
783
  const { systemCode: f, taxCode: n } = r;
784
- t([{ systemCode: f, taxCode: n }]);
784
+ o([{ systemCode: f, taxCode: n }]);
785
785
  }
786
- function t(c) {
787
- const i = se.clone(l.modelValue);
786
+ function o(c) {
787
+ const i = re.clone(l.modelValue);
788
788
  c.forEach((r) => {
789
789
  const f = u().find(
790
790
  (U) => U.options.some((R) => R.feedmeTaxCode === Q.generateCode(r))
@@ -792,11 +792,11 @@ const Ot = /* @__PURE__ */ G({
792
792
  (U) => n.some((R) => Q.generateCode(R) === Q.generateCode(U))
793
793
  );
794
794
  C >= 0 ? i.splice(C, 1, r) : i.push(r);
795
- }), F("update:modelValue", i);
795
+ }), S("update:modelValue", i);
796
796
  }
797
797
  return (c, i) => {
798
798
  const r = _("FmRadio"), f = _("FmRadioGroup");
799
- return x(!0), P(L, null, ne(e(s), (n) => (x(), P("div", {
799
+ return x(!0), P(L, null, le(e(a), (n) => (x(), P("div", {
800
800
  key: n.name,
801
801
  class: "flex items-start"
802
802
  }, [
@@ -805,12 +805,12 @@ const Ot = /* @__PURE__ */ G({
805
805
  "onUpdate:modelValue": [
806
806
  (C) => n.value = C,
807
807
  i[0] || (i[0] = (C) => {
808
- a(C);
808
+ s(C);
809
809
  })
810
810
  ]
811
811
  }, {
812
812
  default: k(() => [
813
- (x(!0), P(L, null, ne(n.options, (C, U) => (x(), E(r, {
813
+ (x(!0), P(L, null, le(n.options, (C, U) => (x(), B(r, {
814
814
  key: U,
815
815
  value: C.value,
816
816
  label: C.label
@@ -826,8 +826,8 @@ const Ot = /* @__PURE__ */ G({
826
826
  return (/* @__PURE__ */ new Date()).toISOString();
827
827
  },
828
828
  name: "",
829
- price: Y.zero().toObject(),
830
- originalPrice: Y.zero().toObject(),
829
+ price: G.zero().toObject(),
830
+ originalPrice: G.zero().toObject(),
831
831
  vouchers: [],
832
832
  credit: {
833
833
  normal: 0,
@@ -843,19 +843,19 @@ const Ot = /* @__PURE__ */ G({
843
843
  taxes: [],
844
844
  taxTotals: [],
845
845
  internal: !1,
846
- priceWithTaxes: tt()
847
- }, Mt = {
846
+ priceWithTaxes: lt()
847
+ }, qt = {
848
848
  key: 0,
849
849
  class: "space-y-24 pr-12"
850
- }, jt = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, Lt = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, qt = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, Ht = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, Kt = { class: "space-y-8" }, Wt = { class: "flex items-center justify-between" }, zt = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, Jt = { class: "space-y-8" }, Yt = { class: "flex items-center gap-8" }, Gt = /* @__PURE__ */ G({
850
+ }, Ht = { class: "space-y-8" }, Kt = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, Wt = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, zt = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, Jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, Yt = { class: "space-y-8" }, Gt = { class: "flex items-center justify-between" }, Xt = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, Zt = { class: "space-y-8" }, Qt = { class: "flex items-center gap-8" }, eo = /* @__PURE__ */ X({
851
851
  __name: "EditBundleSheet",
852
852
  emits: ["update"],
853
853
  setup(b, { expose: h, emit: l }) {
854
- const F = l, { t: u } = _e(), s = Ve(), y = D(!1), a = D({
854
+ const S = l, { t: u } = _e(), a = Ve(), y = D(!1), s = D({
855
855
  category: 0,
856
856
  index: -1
857
- }), t = D(se.cloneDeep(he)), c = D(), i = Re, r = I(() => {
858
- const p = i.safeParse(t.value);
857
+ }), o = D(re.cloneDeep(he)), c = D(), i = De, r = I(() => {
858
+ const p = i.safeParse(o.value);
859
859
  return p.success ? [] : p.error.errors;
860
860
  }), f = [
861
861
  {
@@ -875,195 +875,202 @@ const Ot = /* @__PURE__ */ G({
875
875
  header: "Description",
876
876
  accessorFn: (p) => p.description,
877
877
  cell(p) {
878
- var S;
879
- const o = p.row.original;
880
- return o.collectible.type == "VOUCHER" || o.selectedReward == null ? o.description : Oe(je.FmStepperField, {
878
+ var F;
879
+ const t = p.row.original;
880
+ return t.collectible.type == "VOUCHER" || t.selectedReward == null ? t.description : Le(He.FmStepperField, {
881
881
  "onUpdate:modelValue": ($) => {
882
- t.value.titles = t.value.titles.map(
883
- (B) => B.id == o.collectible._id ? { ...B, dayToExpire: $ } : B
882
+ o.value.titles = o.value.titles.map(
883
+ (Y) => Y.id == t.collectible._id ? { ...Y, dayToExpire: $ } : Y
884
884
  );
885
885
  },
886
- modelValue: ((S = o.selectedReward) == null ? void 0 : S.extra) ?? 0,
886
+ modelValue: ((F = t.selectedReward) == null ? void 0 : F.extra) ?? 0,
887
887
  appendText: "day(s)",
888
888
  showSteppers: !1,
889
- disabled: !!t.value.stripePriceId
889
+ disabled: !!o.value.stripePriceId
890
890
  });
891
891
  }
892
892
  }
893
- ], n = D([]), C = I(() => s.bundleRewards.map((p) => {
894
- const o = U.value.find(($) => $.id == p._id), S = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${lt(p.options.validityOption || {})}` : "No expiry";
893
+ ], n = D([]), C = I(() => a.bundleRewards.map((p) => {
894
+ const t = U.value.find(($) => $.id == p._id), F = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${rt(p.options.validityOption || {})}` : "No expiry";
895
895
  return {
896
896
  collectible: p,
897
- description: S,
898
- selectedReward: o
897
+ description: F,
898
+ selectedReward: t
899
899
  };
900
900
  })), U = I(() => {
901
- var p, o;
901
+ var p, t;
902
902
  return [
903
- ...((p = t.value) == null ? void 0 : p.titles.map((S) => ({
904
- id: S.id,
905
- extra: S.dayToExpire
903
+ ...((p = o.value) == null ? void 0 : p.titles.map((F) => ({
904
+ id: F.id,
905
+ extra: F.dayToExpire
906
906
  }))) ?? [],
907
- ...((o = t.value) == null ? void 0 : o.vouchers.map((S) => ({
908
- id: S,
907
+ ...((t = o.value) == null ? void 0 : t.vouchers.map((F) => ({
908
+ id: F,
909
909
  extra: void 0
910
910
  }))) ?? []
911
911
  ];
912
912
  }), R = I(
913
- () => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
913
+ () => o.value.stripePriceId && o.value.subscriptionValidity ? o.value.subscriptionValidity : 0
914
914
  );
915
- function le(p) {
916
- t.value.subscriptionValidity = p;
917
- for (const o of t.value.titles)
918
- o.dayToExpire = p;
919
- t.value.credit.free && (t.value.credit.free.day = p);
915
+ function ae(p) {
916
+ o.value.subscriptionValidity = p;
917
+ for (const t of o.value.titles)
918
+ t.dayToExpire = p;
919
+ o.value.credit.free && (o.value.credit.free.day = p);
920
920
  }
921
921
  function ee() {
922
- const p = C.value, o = t.value;
923
- if (!(!o || !p))
924
- for (let S = 0; S < p.length; S++) {
925
- const $ = p[S];
926
- O.value[S] ? $.collectible.type == "TITLE" ? o.titles.findIndex(
927
- (ie) => ie.id == $.collectible._id
928
- ) < 0 && o.titles.push({
922
+ const p = C.value, t = o.value;
923
+ if (!(!t || !p))
924
+ for (let F = 0; F < p.length; F++) {
925
+ const $ = p[F];
926
+ M.value[F] ? $.collectible.type == "TITLE" ? t.titles.findIndex(
927
+ (ne) => ne.id == $.collectible._id
928
+ ) < 0 && t.titles.push({
929
929
  id: $.collectible._id,
930
930
  dayToExpire: R.value
931
- }) : o.vouchers.findIndex(
932
- (ie) => ie == $.collectible._id
933
- ) < 0 && o.vouchers.push($.collectible._id) : (o.titles = o.titles.filter((X) => X.id != $.collectible._id), o.vouchers = o.vouchers.filter(
934
- (X) => X != $.collectible._id
931
+ }) : t.vouchers.findIndex(
932
+ (ne) => ne == $.collectible._id
933
+ ) < 0 && t.vouchers.push($.collectible._id) : (t.titles = t.titles.filter((E) => E.id != $.collectible._id), t.vouchers = t.vouchers.filter(
934
+ (E) => E != $.collectible._id
935
935
  ));
936
936
  }
937
937
  }
938
- const O = D({});
939
- Ce(O, ee, { deep: !0 });
938
+ const M = D({});
939
+ Ce(M, ee, { deep: !0 });
940
940
  const v = I(() => {
941
- var p;
942
- return (p = s.storeOption.company) == null ? void 0 : p.sstRegNo;
941
+ var p, t;
942
+ return (t = (p = a.storeOption) == null ? void 0 : p.company) == null ? void 0 : t.sstRegNo;
943
943
  }), w = I(() => {
944
- var p, o, S;
945
- return (S = (o = (p = s.storeOption) == null ? void 0 : p.inclusiveTaxes) == null ? void 0 : o[0]) != null && S.inclusive ? "Inclusive" : "Exclusive";
944
+ var p, t, F;
945
+ return (F = (t = (p = a.storeOption) == null ? void 0 : p.inclusiveTaxes) == null ? void 0 : t[0]) != null && F.inclusive ? "Inclusive" : "Exclusive";
946
946
  }), m = I(() => {
947
- var p, o;
948
- return rt(
947
+ var p, t, F;
948
+ return ut(
949
949
  Q.fullTax,
950
- Ee(t.value.taxes),
951
- t.value.price,
952
- Number(t.value.credit.normal),
953
- ((p = s.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
954
- (o = s.storeOption.company) != null && o.sstRegNo ? Q.taxSystem.map((S) => S.code) : []
950
+ je(o.value.taxes),
951
+ o.value.price,
952
+ Number(o.value.credit.normal),
953
+ ((p = a.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
954
+ (F = (t = a.storeOption) == null ? void 0 : t.company) != null && F.sstRegNo ? Q.taxSystem.map(($) => $.code) : []
955
955
  );
956
956
  }), T = I(() => m.value.reduce(
957
- (o, S) => o.add(S.total),
958
- ot()
959
- ).toFormat()), N = I(() => {
957
+ (t, F) => t.add(F.total),
958
+ at()
959
+ ).toFormat()), A = I(() => {
960
960
  var $;
961
- const p = it(
961
+ const p = ct(
962
962
  m.value,
963
- t.value.price,
964
- (($ = s.storeOption) == null ? void 0 : $.inclusiveTaxes) ?? []
963
+ o.value.price,
964
+ (($ = a.storeOption) == null ? void 0 : $.inclusiveTaxes) ?? []
965
965
  );
966
- t.value.priceWithTaxes = p;
967
- const o = Et(p, !1), S = Number(o.replace(/[^\d.-]/g, ""));
968
- return Number.isNaN(S) ? 0 : S;
966
+ o.value.priceWithTaxes = p;
967
+ const t = jt(p, !1), F = Number(t.replace(/[^\d.-]/g, ""));
968
+ return Number.isNaN(F) ? 0 : F;
969
969
  });
970
- function A() {
971
- t.value.taxTotals = m.value, F("update", Re.parse(ze(t.value)));
970
+ function N() {
971
+ o.value.taxTotals = m.value, S("update", De.parse(Ge(o.value)));
972
972
  }
973
973
  function q() {
974
- return se.cloneDeep(he);
974
+ return re.cloneDeep(he);
975
975
  }
976
- function H(p, o) {
977
- y.value = p, p && o && (console.log(o.bundle, "set.bundle"), c.value = void 0, t.value = o.bundle || q(), a.value.category = o.category, a.value.index = o.index, O.value = C.value.reduce((S, $, B) => (S[B] = !!$.selectedReward, S), {}));
976
+ function H(p, t) {
977
+ y.value = p, p && t && (console.log(t.bundle, "set.bundle"), c.value = void 0, o.value = t.bundle || q(), s.value.category = t.category, s.value.index = t.index, M.value = C.value.reduce((F, $, Y) => (F[Y] = !!$.selectedReward, F), {}));
978
978
  }
979
979
  return h({
980
980
  showSheet: H,
981
981
  bundleImage: c,
982
- target: a,
983
- data: t
984
- }), (p, o) => {
985
- const S = _("FmSwitch"), $ = _("FmTextField"), B = _("FmStepperField"), X = _("FmMenuItem"), ie = _("FmTable"), De = _("FmHelperText"), Se = _("FmButton"), Ne = _("FmSideSheet");
986
- return x(), E(Ne, {
982
+ target: s,
983
+ data: o
984
+ }), (p, t) => {
985
+ const F = _("FmSwitch"), $ = _("FmHelperText"), Y = _("FmTextField"), E = _("FmStepperField"), ne = _("FmMenuItem"), Ee = _("FmTable"), Se = _("FmButton"), Oe = _("FmSideSheet");
986
+ return x(), B(Oe, {
987
987
  "max-width": 560,
988
988
  modelValue: e(y),
989
- "onUpdate:modelValue": o[19] || (o[19] = (de) => re(y) ? y.value = de : null),
990
- header: e(a).index != -1 ? e(u)("connect.store.bundle.edit.title") : e(u)("connect.store.bundle.edit.create")
989
+ "onUpdate:modelValue": t[19] || (t[19] = (de) => ie(y) ? y.value = de : null),
990
+ header: e(s).index != -1 ? e(u)("connect.store.bundle.edit.title") : e(u)("connect.store.bundle.edit.create")
991
991
  }, {
992
992
  "side-sheet-footer": k(() => [
993
- g("div", Yt, [
993
+ g("div", Qt, [
994
994
  d(Se, {
995
- label: e(a).index != -1 ? "Save" : "Add",
996
- onClick: A,
995
+ label: e(s).index != -1 ? "Save" : "Add",
996
+ onClick: N,
997
997
  disabled: e(r).length > 0,
998
998
  loading: e(xe)().isLoading
999
999
  }, null, 8, ["label", "disabled", "loading"]),
1000
1000
  d(Se, {
1001
1001
  label: "Cancel",
1002
- onClick: o[18] || (o[18] = (de) => H(!1)),
1002
+ onClick: t[18] || (t[18] = (de) => H(!1)),
1003
1003
  variant: "tertiary"
1004
1004
  })
1005
1005
  ])
1006
1006
  ]),
1007
1007
  default: k(() => {
1008
- var de, we, Pe, ke, $e;
1008
+ var de, we, Pe, ke, $e, Te, Ue, Re;
1009
1009
  return [
1010
- d(Fe, { json: e(t) }, null, 8, ["json"]),
1011
- e(t) ? (x(), P("div", Mt, [
1012
- e(te).getCountry().code == "MY" ? (x(), E(S, {
1013
- key: 0,
1014
- "onUpdate:modelValue": o[0] || (o[0] = (V) => {
1015
- e(t).isFeedvibe = V, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], O.value = {});
1016
- }),
1017
- "label-placement": "right",
1018
- "model-value": e(t).isFeedvibe || !1,
1019
- label: "Feedvibe Campaign",
1020
- sublabel: "Bundle will be appear for Feedvibe campaign use"
1021
- }, null, 8, ["model-value"])) : M("", !0),
1022
- g("div", jt, j(e(u)("connect.store.bundle.edit.basicInformation")), 1),
1023
- d($, {
1010
+ d(Fe, { json: e(o) }, null, 8, ["json"]),
1011
+ e(o) ? (x(), P("div", qt, [
1012
+ g("div", Ht, [
1013
+ e(te).getCountry().code == "MY" && ((de = e(a).payoutAccount) == null ? void 0 : de.status) == "APPROVED" && ((we = e(a).payoutAccount) != null && we.enable) ? (x(), B(F, {
1014
+ key: 0,
1015
+ "onUpdate:modelValue": t[0] || (t[0] = (V) => {
1016
+ e(o).isFeedvibe = V, e(o).isFeedvibe && (e(o).credit.normal = 0, e(o).coinPrice = 0, e(o).titles = [], M.value = {});
1017
+ }),
1018
+ "label-placement": "right",
1019
+ "model-value": e(o).isFeedvibe || !1,
1020
+ label: "Feedvibe Campaign",
1021
+ sublabel: "Bundle will be appear for Feedvibe campaign use"
1022
+ }, null, 8, ["model-value"])) : O("", !0),
1023
+ e(o).isFeedvibe ? (x(), B($, {
1024
+ key: 1,
1025
+ text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app",
1026
+ state: "warning"
1027
+ })) : O("", !0)
1028
+ ]),
1029
+ g("div", Kt, j(e(u)("connect.store.bundle.edit.basicInformation")), 1),
1030
+ d(Y, {
1024
1031
  label: e(u)("connect.store.bundle.edit.bundleName"),
1025
- modelValue: e(t).name,
1026
- "onUpdate:modelValue": o[1] || (o[1] = (V) => e(t).name = V),
1032
+ modelValue: e(o).name,
1033
+ "onUpdate:modelValue": t[1] || (t[1] = (V) => e(o).name = V),
1027
1034
  "helper-state": e(K)(e(r), "name"),
1028
1035
  "helper-text": e(W)(e(r), "name")
1029
1036
  }, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
1030
- d(Qe, {
1037
+ d(ot, {
1031
1038
  label: e(u)("connect.store.bundle.edit.bundleImage"),
1032
1039
  class: "w-1/2 xs:w-2/3",
1033
1040
  "aspect-ratio": "16/9",
1034
- thumbnail: e(t).image ?? void 0,
1041
+ thumbnail: e(o).image ?? void 0,
1035
1042
  file: e(c) ?? void 0,
1036
- "onUpdate:file": o[2] || (o[2] = (V) => {
1043
+ "onUpdate:file": t[2] || (t[2] = (V) => {
1037
1044
  c.value = V;
1038
1045
  }),
1039
1046
  "helper-state": e(K)(e(r), "image"),
1040
1047
  "helper-text": e(W)(e(r), "image")
1041
1048
  }, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
1042
- d(B, {
1043
- "model-value": e(Y).fromFdoDinero(e(t).price).toUnit(),
1049
+ d(E, {
1050
+ "model-value": e(G).fromFdoDinero(e(o).price).toUnit(),
1044
1051
  label: e(u)("connect.store.bundle.edit.bundlePrice"),
1045
1052
  min: 0,
1046
1053
  "max-fraction-digits": 2,
1047
- "onUpdate:modelValue": o[3] || (o[3] = (V) => {
1048
- e(t).price.amount = V * 10 ** e(t).price.precision;
1054
+ "onUpdate:modelValue": t[3] || (t[3] = (V) => {
1055
+ e(o).price.amount = V * 10 ** e(o).price.precision;
1049
1056
  }),
1050
1057
  "is-currency": !0,
1051
1058
  "show-steppers": !1,
1052
- "helper-text": e(W)(e(r), "price") || `${e(Y).fromNumber({ number: 1 }).toFormat(!0)} = ${e(Y).fromNumber({ number: 1 }).toUnit()} credit`,
1059
+ "helper-text": e(W)(e(r), "price") || `${e(G).fromNumber({ number: 1 }).toFormat(!0)} = ${e(G).fromNumber({ number: 1 }).toUnit()} credit`,
1053
1060
  "helper-state": e(K)(e(r), "price")
1054
1061
  }, {
1055
1062
  prepend: k(() => [
1056
- ae(j(e(Y).defaultCurrency()), 1)
1063
+ se(j(e(G).defaultCurrency()), 1)
1057
1064
  ]),
1058
1065
  _: 1
1059
1066
  }, 8, ["model-value", "label", "helper-text", "helper-state"]),
1060
- d(B, {
1061
- "model-value": e(Y).fromFdoDinero(e(t).originalPrice).toUnit(),
1067
+ d(E, {
1068
+ "model-value": e(G).fromFdoDinero(e(o).originalPrice).toUnit(),
1062
1069
  label: e(u)("connect.store.bundle.edit.bundleValue"),
1063
1070
  min: 0,
1064
1071
  "max-fraction-digits": 2,
1065
- "onUpdate:modelValue": o[4] || (o[4] = (V) => {
1066
- e(t).originalPrice || (e(t).originalPrice = e(Y).zero().toObject()), e(t).originalPrice.amount = V * 10 ** e(t).originalPrice.precision;
1072
+ "onUpdate:modelValue": t[4] || (t[4] = (V) => {
1073
+ e(o).originalPrice || (e(o).originalPrice = e(G).zero().toObject()), e(o).originalPrice.amount = V * 10 ** e(o).originalPrice.precision;
1067
1074
  }),
1068
1075
  "is-currency": !0,
1069
1076
  "show-steppers": !1,
@@ -1071,134 +1078,134 @@ const Ot = /* @__PURE__ */ G({
1071
1078
  "helper-state": e(K)(e(r), "originalPrice")
1072
1079
  }, {
1073
1080
  prepend: k(() => [
1074
- ae(j(e(Y).defaultCurrency()), 1)
1081
+ se(j(e(G).defaultCurrency()), 1)
1075
1082
  ]),
1076
1083
  _: 1
1077
1084
  }, 8, ["model-value", "label", "helper-text", "helper-state"]),
1078
- e(t).isFeedvibe ? M("", !0) : (x(), E(B, {
1079
- key: 1,
1080
- "model-value": e(t).coinPrice ?? null,
1085
+ e(o).isFeedvibe ? O("", !0) : (x(), B(E, {
1086
+ key: 0,
1087
+ "model-value": e(o).coinPrice ?? null,
1081
1088
  label: e(u)("connect.store.bundle.edit.pointNeeded"),
1082
1089
  min: 0,
1083
- "onUpdate:modelValue": o[5] || (o[5] = (V) => {
1084
- V > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = V;
1090
+ "onUpdate:modelValue": t[5] || (t[5] = (V) => {
1091
+ V > 0 && e(o).credit.normal > 0 && (e(o).credit.normal = 0), e(o).coinPrice = V;
1085
1092
  }),
1086
1093
  "show-steppers": !1,
1087
1094
  "helper-state": e(K)(e(r), "coinPrice"),
1088
1095
  "helper-text": e(W)(e(r), "coinPrice")
1089
1096
  }, {
1090
- append: k(() => o[20] || (o[20] = [
1091
- ae(" point(s) ")
1097
+ append: k(() => t[20] || (t[20] = [
1098
+ se(" point(s) ")
1092
1099
  ])),
1093
1100
  _: 1
1094
1101
  }, 8, ["model-value", "label", "helper-state", "helper-text"])),
1095
- e(s).storeOption.stripe && !e(t).isFeedvibe ? (x(), P(L, { key: 2 }, [
1096
- g("div", Lt, j(e(u)("connect.store.bundle.edit.subscriptionSettings")), 1),
1097
- d($, {
1102
+ (Pe = e(a).storeOption) != null && Pe.stripe && !e(o).isFeedvibe ? (x(), P(L, { key: 1 }, [
1103
+ g("div", Wt, j(e(u)("connect.store.bundle.edit.subscriptionSettings")), 1),
1104
+ d(Y, {
1098
1105
  label: e(u)("connect.store.bundle.edit.stripePriceId"),
1099
- modelValue: e(t).stripePriceId,
1100
- "onUpdate:modelValue": o[6] || (o[6] = (V) => e(t).stripePriceId = V),
1106
+ modelValue: e(o).stripePriceId,
1107
+ "onUpdate:modelValue": t[6] || (t[6] = (V) => e(o).stripePriceId = V),
1101
1108
  "helper-state": e(K)(e(r), "stripePriceId"),
1102
1109
  "helper-text": e(W)(e(r), "stripePriceId")
1103
1110
  }, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
1104
- e(t).stripePriceId ? (x(), E(B, {
1111
+ e(o).stripePriceId ? (x(), B(E, {
1105
1112
  key: 0,
1106
- "model-value": e(t).subscriptionValidity ?? null,
1113
+ "model-value": e(o).subscriptionValidity ?? null,
1107
1114
  min: 1,
1108
- "onUpdate:modelValue": le,
1115
+ "onUpdate:modelValue": ae,
1109
1116
  label: e(u)("connect.store.bundle.edit.subscriptionValidity"),
1110
1117
  "show-steppers": !1,
1111
1118
  "helper-state": e(K)(e(r), "subscriptionValidity"),
1112
1119
  "helper-text": e(W)(e(r), "subscriptionValidity")
1113
- }, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : M("", !0)
1114
- ], 64)) : M("", !0),
1115
- e(t).isFeedvibe ? M("", !0) : (x(), P(L, { key: 3 }, [
1116
- o[24] || (o[24] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1)),
1117
- d(B, {
1118
- modelValue: e(t).credit.normal,
1119
- "onUpdate:modelValue": o[7] || (o[7] = (V) => e(t).credit.normal = V),
1120
+ }, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : O("", !0)
1121
+ ], 64)) : O("", !0),
1122
+ e(o).isFeedvibe ? O("", !0) : (x(), P(L, { key: 2 }, [
1123
+ t[24] || (t[24] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1)),
1124
+ d(E, {
1125
+ modelValue: e(o).credit.normal,
1126
+ "onUpdate:modelValue": t[7] || (t[7] = (V) => e(o).credit.normal = V),
1120
1127
  label: "Normal credit",
1121
1128
  "show-steppers": !1,
1122
1129
  "helper-state": e(K)(e(r), "credit.normal"),
1123
1130
  "helper-text": e(W)(e(r), "credit.normal")
1124
1131
  }, {
1125
- append: k(() => o[21] || (o[21] = [
1126
- ae(" credit ")
1132
+ append: k(() => t[21] || (t[21] = [
1133
+ se(" credit ")
1127
1134
  ])),
1128
1135
  _: 1
1129
1136
  }, 8, ["modelValue", "helper-state", "helper-text"]),
1130
- d(B, {
1131
- "model-value": ((de = e(t).credit.free) == null ? void 0 : de.amount) ?? null,
1137
+ d(E, {
1138
+ "model-value": ((ke = e(o).credit.free) == null ? void 0 : ke.amount) ?? null,
1132
1139
  min: 0,
1133
- "onUpdate:modelValue": o[8] || (o[8] = (V) => {
1134
- e(t).credit.free || (e(t).credit.free = {
1140
+ "onUpdate:modelValue": t[8] || (t[8] = (V) => {
1141
+ e(o).credit.free || (e(o).credit.free = {
1135
1142
  amount: 0,
1136
1143
  day: 1
1137
- }), e(t).credit.free.amount = V;
1144
+ }), e(o).credit.free.amount = V;
1138
1145
  }),
1139
1146
  label: "Free credit",
1140
1147
  "show-steppers": !1,
1141
1148
  "helper-state": e(K)(e(r), "credit.free.amount"),
1142
1149
  "helper-text": e(W)(e(r), "credit.free.amount")
1143
1150
  }, {
1144
- append: k(() => o[22] || (o[22] = [
1145
- ae(" credit ")
1151
+ append: k(() => t[22] || (t[22] = [
1152
+ se(" credit ")
1146
1153
  ])),
1147
1154
  _: 1
1148
1155
  }, 8, ["model-value", "helper-state", "helper-text"]),
1149
- (we = e(t).credit.free) != null && we.amount ? (x(), E(B, {
1156
+ ($e = e(o).credit.free) != null && $e.amount ? (x(), B(E, {
1150
1157
  key: 0,
1151
- disabled: !!e(t).stripePriceId,
1152
- "model-value": ((Pe = e(t).credit.free) == null ? void 0 : Pe.day) ?? null,
1158
+ disabled: !!e(o).stripePriceId,
1159
+ "model-value": ((Te = e(o).credit.free) == null ? void 0 : Te.day) ?? null,
1153
1160
  min: 0,
1154
- "onUpdate:modelValue": o[9] || (o[9] = (V) => {
1155
- e(t).credit.free || (e(t).credit.free = {
1161
+ "onUpdate:modelValue": t[9] || (t[9] = (V) => {
1162
+ e(o).credit.free || (e(o).credit.free = {
1156
1163
  amount: 0,
1157
1164
  day: 1
1158
- }), e(t).credit.free.day = e(R) || V;
1165
+ }), e(o).credit.free.day = e(R) || V;
1159
1166
  }),
1160
1167
  label: "Free credit valid for",
1161
1168
  "show-steppers": !1,
1162
1169
  "helper-state": e(K)(e(r), "credit.free.day"),
1163
1170
  "helper-text": e(W)(e(r), "credit.free.day")
1164
1171
  }, {
1165
- append: k(() => o[23] || (o[23] = [
1166
- ae(" day(s) ")
1172
+ append: k(() => t[23] || (t[23] = [
1173
+ se(" day(s) ")
1167
1174
  ])),
1168
1175
  _: 1
1169
- }, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : M("", !0)
1176
+ }, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : O("", !0)
1170
1177
  ], 64)),
1171
- e(v) ? (x(), P(L, { key: 4 }, [
1172
- o[25] || (o[25] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
1173
- d(Ot, {
1174
- modelValue: e(t).taxes,
1175
- "onUpdate:modelValue": o[10] || (o[10] = (V) => e(t).taxes = V)
1178
+ e(v) ? (x(), P(L, { key: 3 }, [
1179
+ t[25] || (t[25] = g("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1)),
1180
+ d(Lt, {
1181
+ modelValue: e(o).taxes,
1182
+ "onUpdate:modelValue": t[10] || (t[10] = (V) => e(o).taxes = V)
1176
1183
  }, null, 8, ["modelValue"]),
1177
- d($, {
1184
+ d(Y, {
1178
1185
  label: `Tax Charged (${e(w)})`,
1179
1186
  "model-value": e(T),
1180
1187
  disabled: ""
1181
1188
  }, null, 8, ["label", "model-value"])
1182
- ], 64)) : M("", !0),
1183
- d(B, {
1189
+ ], 64)) : O("", !0),
1190
+ d(E, {
1184
1191
  label: "Total Price",
1185
- "model-value": e(N),
1192
+ "model-value": e(A),
1186
1193
  disabled: !0
1187
1194
  }, null, 8, ["model-value"]),
1188
- g("div", qt, j(e(u)("connect.store.bundle.edit.bundleReward.title")), 1),
1189
- g("div", Ht, j(e(u)("connect.store.bundle.edit.bundleReward.description")), 1),
1190
- g("div", Kt, [
1191
- g("div", Wt, [
1192
- d(et, {
1195
+ g("div", zt, j(e(u)("connect.store.bundle.edit.bundleReward.title")), 1),
1196
+ g("div", Jt, j(e(u)("connect.store.bundle.edit.bundleReward.description")), 1),
1197
+ g("div", Yt, [
1198
+ g("div", Gt, [
1199
+ d(nt, {
1193
1200
  label: `Reward type: ${e(n).length == 0 ? "All" : e(n)[0].name}`
1194
1201
  }, {
1195
1202
  default: k(() => [
1196
- d(X, {
1197
- onClick: o[11] || (o[11] = (V) => n.value = []),
1203
+ d(ne, {
1204
+ onClick: t[11] || (t[11] = (V) => n.value = []),
1198
1205
  label: "All"
1199
1206
  }),
1200
- d(X, {
1201
- onClick: o[12] || (o[12] = (V) => n.value = [
1207
+ d(ne, {
1208
+ onClick: t[12] || (t[12] = (V) => n.value = [
1202
1209
  {
1203
1210
  id: "type",
1204
1211
  value: "VOUCHER",
@@ -1207,8 +1214,8 @@ const Ot = /* @__PURE__ */ G({
1207
1214
  ]),
1208
1215
  label: e(ue).VOUCHER.name
1209
1216
  }, null, 8, ["label"]),
1210
- d(X, {
1211
- onClick: o[13] || (o[13] = (V) => n.value = [
1217
+ d(ne, {
1218
+ onClick: t[13] || (t[13] = (V) => n.value = [
1212
1219
  {
1213
1220
  id: "type",
1214
1221
  value: "TITLE",
@@ -1221,47 +1228,47 @@ const Ot = /* @__PURE__ */ G({
1221
1228
  _: 1
1222
1229
  }, 8, ["label"])
1223
1230
  ]),
1224
- d(ie, {
1225
- modelValue: e(O),
1226
- "onUpdate:modelValue": o[14] || (o[14] = (V) => re(O) ? O.value = V : null),
1231
+ d(Ee, {
1232
+ modelValue: e(M),
1233
+ "onUpdate:modelValue": t[14] || (t[14] = (V) => ie(M) ? M.value = V : null),
1227
1234
  selection: "multiple",
1228
1235
  "column-filter": e(n),
1229
1236
  "column-defs": f,
1230
1237
  "row-data": e(C).filter(
1231
- (V) => !e(t).isFeedvibe || V.collectible.type == "VOUCHER"
1238
+ (V) => !e(o).isFeedvibe || V.collectible.type == "VOUCHER"
1232
1239
  ),
1233
1240
  "hide-footer": e(C).length <= 10
1234
1241
  }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
1235
- d(De, {
1242
+ d($, {
1236
1243
  text: e(W)(e(r), "titles"),
1237
1244
  state: e(K)(e(r), "titles")
1238
1245
  }, null, 8, ["text", "state"])
1239
1246
  ]),
1240
- g("div", zt, j(e(u)("connect.store.bundle.edit.advanceSetting")), 1),
1241
- g("div", Jt, [
1242
- d(S, {
1243
- "model-value": e(t).internal ?? !1,
1244
- "onUpdate:modelValue": o[15] || (o[15] = (V) => e(t).internal = V),
1247
+ g("div", Xt, j(e(u)("connect.store.bundle.edit.advanceSetting")), 1),
1248
+ g("div", Zt, [
1249
+ d(F, {
1250
+ "model-value": e(o).internal ?? !1,
1251
+ "onUpdate:modelValue": t[15] || (t[15] = (V) => e(o).internal = V),
1245
1252
  "label-placement": "right",
1246
1253
  label: e(u)("connect.store.bundle.edit.internalBundle"),
1247
1254
  sublabel: e(u)("connect.store.bundle.edit.internalBundleDescription")
1248
1255
  }, null, 8, ["model-value", "label", "sublabel"]),
1249
- d(S, {
1250
- "model-value": e(t).hideInPos ?? !1,
1251
- "onUpdate:modelValue": o[16] || (o[16] = (V) => e(t).hideInPos = V),
1256
+ d(F, {
1257
+ "model-value": e(o).hideInPos ?? !1,
1258
+ "onUpdate:modelValue": t[16] || (t[16] = (V) => e(o).hideInPos = V),
1252
1259
  "label-placement": "right",
1253
1260
  label: e(u)("connect.store.bundle.edit.hideInPos"),
1254
1261
  sublabel: e(u)("connect.store.bundle.edit.hideInPosDescription")
1255
1262
  }, null, 8, ["model-value", "label", "sublabel"]),
1256
- d(B, {
1257
- "model-value": (($e = (ke = e(t).config) == null ? void 0 : ke.options) == null ? void 0 : $e.maxPerUser) || null,
1258
- "onUpdate:modelValue": o[17] || (o[17] = (V) => e(se).set(e(t), "config.options.maxPerUser", V)),
1263
+ d(E, {
1264
+ "model-value": ((Re = (Ue = e(o).config) == null ? void 0 : Ue.options) == null ? void 0 : Re.maxPerUser) || null,
1265
+ "onUpdate:modelValue": t[17] || (t[17] = (V) => e(re).set(e(o), "config.options.maxPerUser", V)),
1259
1266
  label: e(u)("connect.store.bundle.edit.maxPerUser"),
1260
1267
  "show-steppers": !1,
1261
1268
  placeholder: "Unlimited"
1262
1269
  }, null, 8, ["model-value", "label"])
1263
1270
  ])
1264
- ])) : M("", !0)
1271
+ ])) : O("", !0)
1265
1272
  ];
1266
1273
  }),
1267
1274
  _: 1
@@ -1269,36 +1276,36 @@ const Ot = /* @__PURE__ */ G({
1269
1276
  };
1270
1277
  }
1271
1278
  });
1272
- var Xt = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
1273
- const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8 items-center" }, eo = { class: "fm-typo-en-body-lg-600" }, to = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, oo = { class: "flex flex-col gap-16 text-center" }, no = { class: "fm-typo-en-title-sm-800" }, lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, To = /* @__PURE__ */ G({
1279
+ var to = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
1280
+ const oo = { class: "px-24 flex flex-col gap-y-16" }, no = { class: "flex gap-8 items-center" }, lo = { class: "fm-typo-en-body-lg-600" }, ao = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, so = { class: "flex flex-col gap-16 text-center" }, ro = { class: "fm-typo-en-title-sm-800" }, io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = /* @__PURE__ */ X({
1274
1281
  __name: "Store",
1275
1282
  setup(b) {
1276
1283
  const h = {
1277
1284
  label: "Setup payout account",
1278
1285
  value: "payout",
1279
1286
  isPrimary: !1
1280
- }, { t: l } = _e(), F = {
1287
+ }, { t: l } = _e(), S = {
1281
1288
  label: l("connect.store.actions.setting"),
1282
1289
  value: "setting",
1283
1290
  isPrimary: !1
1284
1291
  }, u = {
1285
1292
  label: l("connect.store.actions.manageReward"),
1286
1293
  value: "create_reward"
1287
- }, s = {
1294
+ }, a = {
1288
1295
  label: l("connect.store.actions.addCategory"),
1289
1296
  value: "create_category",
1290
1297
  isPrimary: !0,
1291
1298
  prependIcon: "add"
1292
- }, y = at(), a = Ve(), { global: t, minor: c } = Ke, i = Ie(), r = I(() => a.sortedStoreCategories), f = D(), n = D();
1299
+ }, y = it(), s = Ve(), { global: o, minor: c } = Je, i = Ae(), r = I(() => s.sortedStoreCategories), f = D(), n = D();
1293
1300
  async function C(v) {
1294
1301
  var w;
1295
- v === "setting" ? (w = f.value) == null || w.showSheet(!0, a.storeOption) : v === "create_category" ? R(-1) : v === "create_reward" ? await y.push({ name: Je["$connect-STORE_REWARDS"] }) : v == "payout" && window.open(Xt.paymentPortalUrl, "_blank");
1302
+ v === "setting" ? (w = f.value) == null || w.showSheet(!0, s.storeOption) : v === "create_category" ? R(-1) : v === "create_reward" ? await y.push({ name: Xe["$connect-STORE_REWARDS"] }) : v == "payout" && window.open(to.paymentPortalUrl, "_blank");
1296
1303
  }
1297
1304
  async function U(v) {
1298
1305
  await c(
1299
1306
  async () => {
1300
1307
  var w;
1301
- await ve.updateStore(v), await a.readMemberStore(), (w = f.value) == null || w.showSheet(!1);
1308
+ await ve.updateStore(v), await s.readMemberStore(), (w = f.value) == null || w.showSheet(!1);
1302
1309
  },
1303
1310
  {
1304
1311
  message: l("connect.store.setting.update.message"),
@@ -1308,7 +1315,7 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1308
1315
  }
1309
1316
  async function R(v = -1) {
1310
1317
  var w, m;
1311
- if ((!a.storeOption || !a.storeOption.company) && await fe.confirm(
1318
+ if ((!s.storeOption || !s.storeOption.company) && await fe.confirm(
1312
1319
  l("connect.store.category.setup.title"),
1313
1320
  l("connect.store.category.setup.button"),
1314
1321
  l("connect.store.category.setup.action")
@@ -1316,7 +1323,7 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1316
1323
  return (w = f.value) == null ? void 0 : w.showSheet(!0);
1317
1324
  i.open({
1318
1325
  title: v == -1 ? l("connect.store.category.add") : l("connect.store.category.edit"),
1319
- contentComponent: Ct,
1326
+ contentComponent: Ft,
1320
1327
  contentComponentProps: {
1321
1328
  initialValue: ((m = r.value[v]) == null ? void 0 : m.name) ?? "",
1322
1329
  action: v == -1 ? "add" : "edit"
@@ -1327,10 +1334,10 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1327
1334
  l("connect.store.category.remove.title")
1328
1335
  ) || await c(
1329
1336
  async () => {
1330
- const N = v == -1 ? [...r.value, { name: T, bundles: [] }] : [...r.value].map((A, q) => q == v ? { ...A, name: T } : A).filter((A) => A.name !== null);
1337
+ const A = v == -1 ? [...r.value, { name: T, bundles: [] }] : [...r.value].map((N, q) => q == v ? { ...N, name: T } : N).filter((N) => N.name !== null);
1331
1338
  await ve.updateStoreBundle({
1332
- categories: N
1333
- }), await a.readMemberStore();
1339
+ categories: A
1340
+ }), await s.readMemberStore();
1334
1341
  },
1335
1342
  {
1336
1343
  message: T === null ? l("connect.store.category.update.deleting") : v == -1 ? l("connect.store.category.update.creating") : l("connect.store.category.update.updating"),
@@ -1339,12 +1346,12 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1339
1346
  );
1340
1347
  });
1341
1348
  }
1342
- async function le(v, w, m) {
1343
- var A, q;
1344
- w ?? (w = (A = n.value) == null ? void 0 : A.target.category), m ?? (m = (q = n.value) == null ? void 0 : q.target.index);
1345
- const T = Ue(r.value), N = T[w];
1346
- if (!N) {
1347
- We.error("Unexpected error", 2e3);
1349
+ async function ae(v, w, m) {
1350
+ var N, q;
1351
+ w ?? (w = (N = n.value) == null ? void 0 : N.target.category), m ?? (m = (q = n.value) == null ? void 0 : q.target.index);
1352
+ const T = Be(r.value), A = T[w];
1353
+ if (!A) {
1354
+ Ye.error("Unexpected error", 2e3);
1348
1355
  return;
1349
1356
  }
1350
1357
  if (v == null) {
@@ -1353,22 +1360,22 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1353
1360
  "Delete bundle"
1354
1361
  ) == !1)
1355
1362
  return;
1356
- N.bundles.splice(m, 1);
1363
+ A.bundles.splice(m, 1);
1357
1364
  } else
1358
- m == -1 ? N.bundles.push(v) : N.bundles[m] = v;
1365
+ m == -1 ? A.bundles.push(v) : A.bundles[m] = v;
1359
1366
  await c(
1360
1367
  async () => {
1361
1368
  var H, p;
1362
1369
  if (v != null) {
1363
- const o = (H = n.value) == null ? void 0 : H.bundleImage;
1364
- o === null && v.image ? (await be.delete(v.image), v.image = null) : o && (v.image = await be.update(
1365
- be.bundleImagePath(void 0, o),
1366
- o
1370
+ const t = (H = n.value) == null ? void 0 : H.bundleImage;
1371
+ t === null && v.image ? (await be.delete(v.image), v.image = null) : t && (v.image = await be.update(
1372
+ be.bundleImagePath(void 0, t),
1373
+ t
1367
1374
  ));
1368
1375
  }
1369
1376
  await ve.updateStoreBundle({
1370
1377
  categories: T
1371
- }), await a.readMemberStore(), await a.readMembership(), await a.readRewards(), (p = n.value) == null || p.showSheet(!1);
1378
+ }), await s.readMemberStore(), await s.readMembership(), await s.readRewards(), (p = n.value) == null || p.showSheet(!1);
1372
1379
  },
1373
1380
  {
1374
1381
  message: `${v == null ? "Deleting" : m == -1 ? "Creating" : "Updating"} bundle`,
@@ -1380,15 +1387,15 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1380
1387
  var w;
1381
1388
  (w = n.value) == null || w.showSheet(!0, {
1382
1389
  ...v,
1383
- bundle: v.bundle ? Ue(v.bundle) : void 0
1390
+ bundle: v.bundle ? Be(v.bundle) : void 0
1384
1391
  });
1385
1392
  }
1386
- const O = D([]);
1393
+ const M = D([]);
1387
1394
  return pe(async () => {
1388
1395
  var v, w;
1389
- await t(async () => {
1396
+ await o(async () => {
1390
1397
  var m, T;
1391
- if (await a.readMemberStore(), await a.readMembership(), await a.readRewards(), await a.readPayoutAccount(), (m = y.currentRoute.value.query) != null && m.action) {
1398
+ if (await s.readMemberStore(), await s.readMembership(), await s.readRewards(), await s.readPayoutAccount(), (m = y.currentRoute.value.query) != null && m.action) {
1392
1399
  switch ((T = y.currentRoute.value.query) == null ? void 0 : T.action) {
1393
1400
  case "update_setting":
1394
1401
  C("setting");
@@ -1399,15 +1406,15 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1399
1406
  case "create_feedvibe_bundle":
1400
1407
  i.open({
1401
1408
  title: "Select category",
1402
- contentComponent: Ft
1403
- }).onPrimary((N) => {
1409
+ contentComponent: Pt
1410
+ }).onPrimary((A) => {
1404
1411
  i.close(), ee({
1405
- category: N,
1412
+ category: A,
1406
1413
  index: -1,
1407
1414
  bundle: {
1408
- ...se.cloneDeep(he),
1415
+ ...re.cloneDeep(he),
1409
1416
  isFeedvibe: !0,
1410
- price: Y.fromNumber({
1417
+ price: G.fromNumber({
1411
1418
  number: 10,
1412
1419
  precision: 2
1413
1420
  }).toObject()
@@ -1418,29 +1425,29 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1418
1425
  }
1419
1426
  y.replace({ query: {} });
1420
1427
  }
1421
- }), O.value = [F, u, s], (((v = a.payoutAccount) == null ? void 0 : v.status) != "APPROVED" || ((w = a.payoutAccount) == null ? void 0 : w.enable) != !0) && (O.value = [
1428
+ }), M.value = [S, u, a], (((v = s.payoutAccount) == null ? void 0 : v.status) != "APPROVED" || ((w = s.payoutAccount) == null ? void 0 : w.enable) != !0) && (M.value = [
1422
1429
  h,
1423
- F,
1430
+ S,
1424
1431
  u,
1425
- s
1432
+ a
1426
1433
  ]);
1427
1434
  }), (v, w) => {
1428
- const m = _("FmPageHead"), T = _("FmButton"), N = _("FmCard");
1435
+ const m = _("FmPageHead"), T = _("FmButton"), A = _("FmCard");
1429
1436
  return x(), P(L, null, [
1430
1437
  d(m, {
1431
1438
  title: e(l)("connect.store.title"),
1432
- actions: e(O),
1439
+ actions: e(M),
1433
1440
  "onClick:action": C
1434
1441
  }, null, 8, ["title", "actions"]),
1435
- g("div", Zt, [
1442
+ g("div", oo, [
1436
1443
  e(r) && e(r).length > 0 ? (x(), P(L, { key: 0 }, [
1437
- (x(!0), P(L, null, ne(e(r), (A, q) => (x(), P("div", {
1438
- key: A.name,
1444
+ (x(!0), P(L, null, le(e(r), (N, q) => (x(), P("div", {
1445
+ key: N.name,
1439
1446
  class: "space-y-8 py-12"
1440
1447
  }, [
1441
- g("div", Qt, [
1442
- g("div", eo, j(A.name), 1),
1443
- d(Fe, { json: A }, null, 8, ["json"]),
1448
+ g("div", no, [
1449
+ g("div", lo, j(N.name), 1),
1450
+ d(Fe, { json: N }, null, 8, ["json"]),
1444
1451
  d(T, {
1445
1452
  icon: "edit",
1446
1453
  size: "md",
@@ -1448,47 +1455,47 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1448
1455
  onClick: (H) => R(q)
1449
1456
  }, null, 8, ["onClick"])
1450
1457
  ]),
1451
- g("div", to, [
1452
- (x(!0), P(L, null, ne(A.bundles, (H, p) => (x(), E(bt, {
1458
+ g("div", ao, [
1459
+ (x(!0), P(L, null, le(N.bundles, (H, p) => (x(), B(xt, {
1453
1460
  bundle: H,
1454
1461
  key: H._id,
1455
- onEdit: (o) => ee({ bundle: H, category: q, index: p }),
1456
- onDelete: (o) => le(null, q, p)
1462
+ onEdit: (t) => ee({ bundle: H, category: q, index: p }),
1463
+ onDelete: (t) => ae(null, q, p)
1457
1464
  }, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
1458
- d(vt, {
1465
+ d(ht, {
1459
1466
  onCreate: (H) => ee({ category: q, index: -1 })
1460
1467
  }, null, 8, ["onCreate"])
1461
1468
  ])
1462
1469
  ]))), 128)),
1463
- d(Gt, {
1470
+ d(eo, {
1464
1471
  ref_key: "bundleSheetRef",
1465
1472
  ref: n,
1466
- onUpdate: le
1473
+ onUpdate: ae
1467
1474
  }, null, 512)
1468
- ], 64)) : (x(), E(N, {
1475
+ ], 64)) : (x(), B(A, {
1469
1476
  key: 1,
1470
1477
  variant: "outlined",
1471
1478
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1472
1479
  }, {
1473
1480
  default: k(() => [
1474
1481
  w[1] || (w[1] = g("img", {
1475
- src: Me,
1482
+ src: qe,
1476
1483
  class: "aspect-square w-[150px]"
1477
1484
  }, null, -1)),
1478
- g("div", oo, [
1479
- g("div", no, j(e(l)("connect.store.bundle.title")), 1),
1480
- g("div", lo, j(e(l)("connect.store.bundle.description")), 1)
1485
+ g("div", so, [
1486
+ g("div", ro, j(e(l)("connect.store.bundle.title")), 1),
1487
+ g("div", io, j(e(l)("connect.store.bundle.description")), 1)
1481
1488
  ]),
1482
1489
  d(T, {
1483
1490
  variant: "primary",
1484
1491
  label: e(l)("connect.store.actions.addCategory"),
1485
1492
  icon: "add",
1486
- onClick: w[0] || (w[0] = (A) => R(-1))
1493
+ onClick: w[0] || (w[0] = (N) => R(-1))
1487
1494
  }, null, 8, ["label"])
1488
1495
  ]),
1489
1496
  _: 1
1490
1497
  })),
1491
- d(At, {
1498
+ d(Mt, {
1492
1499
  ref_key: "settingSheetRef",
1493
1500
  ref: f,
1494
1501
  onUpdate: U
@@ -1499,5 +1506,5 @@ const Zt = { class: "px-24 flex flex-col gap-y-16" }, Qt = { class: "flex gap-8
1499
1506
  }
1500
1507
  });
1501
1508
  export {
1502
- To as default
1509
+ Bo as default
1503
1510
  };