@feedmepos/mf-connect 0.1.18-prod → 0.1.20-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 (83) hide show
  1. package/dist/{Analytic-D_zDhkUZ.js → Analytic-DaYL4IwZ.js} +10 -10
  2. package/dist/{App-Cg3jGOHs.js → App-CnRrmva6.js} +6 -6
  3. package/dist/{Bin-DDQbrukE.js → Bin-Bf8yL56G.js} +7 -7
  4. package/dist/{Broadcast-Cfgolg9v.js → Broadcast-CyqZZRc1.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-fcwwtaxY.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BBAGO9mc.js} +6 -6
  6. package/dist/{Card-Bso_EfYT.js → Card-BHOw7yjA.js} +14 -14
  7. package/dist/{Collections-DhnNFiVB.js → Collections-DQYk52tc.js} +5 -5
  8. package/dist/{Credit-k3EIWJJ3.js → Credit-BVD4wCLN.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-c_0muFRC.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-EdpoxZlh.js} +27 -27
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-B7codHAX.js → EffectSheet.vue_vue_type_style_index_0_lang-1tSUOxmX.js} +6 -6
  11. package/dist/{Experience-D_f18SMO.js → Experience-BKTJKeqW.js} +8 -8
  12. package/dist/{Game-DHuxNZcB.js → Game-DDnwUySW.js} +8 -8
  13. package/dist/{Index-eVtMlpFA.js → Index-Cf6d9PW1.js} +9 -9
  14. package/dist/{Marketing-CWjubvPu.js → Marketing-Dm2ECeZM.js} +5 -5
  15. package/dist/{Member-lHrV55rW.js → Member-Bjx7KU3k.js} +4 -4
  16. package/dist/{MemberList-B503F2VR.js → MemberList-BEiuLggu.js} +23 -23
  17. package/dist/{MemberTransactions-CKDoWW_j.js → MemberTransactions-C3YdUquh.js} +1 -1
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-6RaFXWbc.js → MessageInput.vue_vue_type_script_setup_true_lang-ChUeeW90.js} +2 -2
  19. package/dist/{Mission-DG3jWdQJ.js → Mission-CZ-jJd14.js} +8 -8
  20. package/dist/{Overview-CAP-QbHt.js → Overview-CgbAmJNJ.js} +16 -16
  21. package/dist/{Point-Bi4DG0ST.js → Point-Bt3nTcqr.js} +8 -8
  22. package/dist/{Promotion-DOr-8Fal.js → Promotion-DnMvO6sH.js} +9 -9
  23. package/dist/{Record-DbHyGWgG.js → Record-DGSd8OoA.js} +6 -6
  24. package/dist/{Reward-D8kJawxA.js → Reward-DjSvoVKB.js} +14 -14
  25. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CBmfdyU3.js → RewardGroup.vue_vue_type_script_setup_true_lang-CD5NQYu7.js} +10 -10
  26. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DEtbXGSn.js → RuleGroup.vue_vue_type_script_setup_true_lang-DL9sCsHT.js} +12 -12
  27. package/dist/{Segment-BYQJE7lX.js → Segment-CwyALcvm.js} +13 -13
  28. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-XdIrcS9h.js → SelectItems.vue_vue_type_script_setup_true_lang-BpM7WgFp.js} +2 -2
  29. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Dr2TtNPP.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Bwa2RvTx.js} +3 -3
  30. package/dist/{Setting-CNlYQQG7.js → Setting-CCxSOD98.js} +8 -8
  31. package/dist/{Store-CsMXWbPn.js → Store-BTejxCBe.js} +731 -643
  32. package/dist/{StoreRewards-CvDtU4nt.js → StoreRewards-DrUIjbjC.js} +12 -12
  33. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B5-J_psL.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B-z5tu9A.js} +17 -17
  34. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DnZQX8U_.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CpIVuHaf.js} +1 -1
  35. package/dist/{Tier-BEtmw9tB.js → Tier-njMn6MiO.js} +18 -18
  36. package/dist/{Title-CQjCTRFS.js → Title-Db8js_gS.js} +18 -18
  37. package/dist/{Transaction-Dclb9Ac7.js → Transaction-D9TjDeKD.js} +2 -2
  38. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Dxdt36PT.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bod8YjzJ.js} +6 -6
  39. package/dist/{Voucher-BESvjc4p.js → Voucher--yr4TQ-G.js} +11 -11
  40. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BHONAjDW.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CeL94a07.js} +10 -10
  41. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BUGDCcYs.js → ZodTextField.vue_vue_type_script_setup_true_lang-BCc_w9J8.js} +1 -1
  42. package/dist/{app-Q1yckvqp.js → app-BqAFUCz8.js} +522 -514
  43. package/dist/{app-DpZb_uFJ.js → app-Ugrk96Pp.js} +1 -1
  44. package/dist/app.js +1 -1
  45. package/dist/{business-CheZkwPX.js → business-CTwB-cPM.js} +1 -1
  46. package/dist/{campaign-CsicTS13.js → campaign-CKZMkxH5.js} +2 -2
  47. package/dist/{campaign-CZarn1Pn.js → campaign-DwL2D9J5.js} +9 -9
  48. package/dist/{campaign.enum-CGYRYexg.js → campaign.enum-uKI06HHx.js} +1 -1
  49. package/dist/{campaign.fn-XAWhr6-a.js → campaign.fn-Dp8mlrpN.js} +33 -33
  50. package/dist/{collectible.enum-tEM_nK3f.js → collectible.enum-Bw421zWp.js} +1 -1
  51. package/dist/{collection.fn-Dy7-oO7_.js → collection.fn-D2zmqc53.js} +2 -2
  52. package/dist/{dto-Cgll17wb.js → dto-FP61IJwc.js} +4 -4
  53. package/dist/{effect-CRtxySC5.js → effect-BE4EnD4B.js} +1 -1
  54. package/dist/{email-addresses-DNAdOP56.js → email-addresses-D8_sMdak.js} +1 -1
  55. package/dist/{export-BzglwM__.js → export-kgzxrVkq.js} +3 -3
  56. package/dist/{helper-kOMs19DV.js → helper-BI6pWRqN.js} +1 -1
  57. package/dist/{index-Diydk2cV.js → index-BUXc2Nw5.js} +1 -1
  58. package/dist/{index-Dal27QBg.js → index-BpBt6Y8F.js} +1 -1
  59. package/dist/{index-ClGbT7Ie.js → index-COe4sMRZ.js} +1 -1
  60. package/dist/{index-BFsyDjHp.js → index-CaJmkfzc.js} +3 -3
  61. package/dist/{index-RHYYXURv.js → index-Cga6gx-T.js} +1 -1
  62. package/dist/{index-ymsvC9M9.js → index-DLIjZTu7.js} +2 -2
  63. package/dist/{index-3VnMKTMI.js → index-DTbigOhK.js} +1 -1
  64. package/dist/{index-WJz81etb.js → index-DcBjYW9W.js} +1 -1
  65. package/dist/{index-CUSwI0lR.js → index-DoHEyLZn.js} +3 -3
  66. package/dist/{index-CL2S0cI6.js → index-aOnN-LXC.js} +1 -1
  67. package/dist/{index-C2l3Ifc0.js → index-fCUvdTQu.js} +6 -6
  68. package/dist/{index-DkXEiQWq.js → index-sLN88aCQ.js} +4 -4
  69. package/dist/{index.esm2017-BL3TvIjS.js → index.esm2017-CWKGaTMR.js} +1 -1
  70. package/dist/{loading-eMx0_Xs5.js → loading-GiUoU2Fa.js} +4 -4
  71. package/dist/{membership-BPY-gM3q.js → membership-Bt_7SvV0.js} +3 -3
  72. package/dist/{money-DfHzDPGF.js → money-BZq33xlW.js} +1 -1
  73. package/dist/{number-Ds8wlc5h.js → number-DFHYy76W.js} +1 -1
  74. package/dist/{objectid-Bk2VYf03.js → objectid-C6apWPpH.js} +4 -4
  75. package/dist/{reward-Cs71ZByd.js → reward-Dy_FLF01.js} +1 -1
  76. package/dist/{rule-builder-Dbz-Ea9H.js → rule-builder-BpZ5uHIv.js} +1 -1
  77. package/dist/{rule-Jngq91oM.js → rule-zl6tGcQA.js} +3 -3
  78. package/dist/{template-Bko9yw_T.js → template-BKEUsA_B.js} +4 -4
  79. package/dist/{trigger-CKKxPJPD.js → trigger-ChT3kWh_.js} +4 -4
  80. package/dist/{usePagination-CEZVEXNR.js → usePagination-DWyHwAZT.js} +1 -1
  81. package/dist/{user-B5C_dlbm.js → user-CX5C_btL.js} +1 -1
  82. package/dist/{vue-i18n-D6cJsUHs.js → vue-i18n--AFmNvm8.js} +232 -232
  83. package/package.json +1 -1
@@ -1,43 +1,43 @@
1
- import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as x, createElementBlock as D, createVNode as r, createCommentVNode as A, toDisplayString as L, unref as e, Fragment as X, renderList as re, ref as R, isRef as ne, reactive as He, onMounted as fe, watch as we, toRaw as qe, createTextVNode as de, h as Ke } from "vue";
2
- import { _ as We } from "./tier-BJDhpH6X.js";
3
- import { useDialog as Ae, useDialogChild as Me, components as ze } from "@feedmepos/ui-library";
4
- import { c as B, e as Ce, S as Ye } from "./index-BFsyDjHp.js";
5
- import { d as se, a as Je, p as he, u as Ee, n as Ge, f as Fe } from "./loading-eMx0_Xs5.js";
6
- import { u as $e, C as me } from "./membership-BPY-gM3q.js";
7
- import { a as Xe, c as Ne } from "./object-qECH92oz.js";
1
+ import { defineComponent as ee, computed as j, resolveComponent as h, openBlock as g, createBlock as I, withCtx as T, createElementVNode as x, createElementBlock as B, createVNode as i, createCommentVNode as M, toDisplayString as L, unref as e, Fragment as X, renderList as re, ref as R, isRef as oe, reactive as Ke, onMounted as fe, watch as we, toRaw as He, createTextVNode as de, h as qe } from "vue";
2
+ import { _ as Ye } from "./tier-BJDhpH6X.js";
3
+ import { useDialog as Me, useDialogChild as Oe, components as We } from "@feedmepos/ui-library";
4
+ import { c as N, e as he, S as ze } from "./index-CaJmkfzc.js";
5
+ import { d as se, a as Je, p as xe, u as Ee, n as Ge, f as Fe } from "./loading-GiUoU2Fa.js";
6
+ import { u as ke, C as me } from "./membership-Bt_7SvV0.js";
7
+ import { a as Xe, c as De } from "./object-qECH92oz.js";
8
8
  import { _ as ue } from "./lodash-B5I3zXaY.js";
9
- import { u as be } from "./vue-i18n-D6cJsUHs.js";
9
+ import { u as be } from "./vue-i18n--AFmNvm8.js";
10
10
  import { Z, g as J, a as G } from "./zod-Bg2FbC-D.js";
11
- import { z as Q, R as Ze } from "./app-Q1yckvqp.js";
12
- import { k as Qe, l as et, m as tt, n as Oe, o as ot } from "./index-DkXEiQWq.js";
13
- import { u as xe } from "./app-wDQR6dpb.js";
14
- import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BUGDCcYs.js";
15
- import { J as ke } from "./JsonViewer-v8_C7l5N.js";
16
- import { _ as nt } from "./index-ymsvC9M9.js";
17
- import { _ as lt } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
18
- import { _ as at } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
19
- import { z as st, a as rt } from "./money-DfHzDPGF.js";
20
- import { F as it } from "./number-Ds8wlc5h.js";
21
- import { t as dt } from "./helper-kOMs19DV.js";
22
- import "./index-3VnMKTMI.js";
23
- import "./index-C2l3Ifc0.js";
24
- import "./index-ClGbT7Ie.js";
25
- import "./index-CUSwI0lR.js";
26
- import { m as ut } from "./index-Dal27QBg.js";
27
- import { m as _e } from "./index-CL2S0cI6.js";
11
+ import { z as Q, R as Ze } from "./app-BqAFUCz8.js";
12
+ import { k as Qe, l as et, m as tt, n as Ae, o as nt } from "./index-sLN88aCQ.js";
13
+ import { u as Se } from "./app-wDQR6dpb.js";
14
+ import { _ as te } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BCc_w9J8.js";
15
+ import { J as Pe } from "./JsonViewer-v8_C7l5N.js";
16
+ import { _ as ot } from "./index-DLIjZTu7.js";
17
+ import { _ as at } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
18
+ import { _ as lt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
19
+ import { z as st, a as rt } from "./money-BZq33xlW.js";
20
+ import { F as it } from "./number-DFHYy76W.js";
21
+ import { t as dt } from "./helper-BI6pWRqN.js";
22
+ import "./index-DTbigOhK.js";
23
+ import "./index-fCUvdTQu.js";
24
+ import "./index-COe4sMRZ.js";
25
+ import "./index-DoHEyLZn.js";
26
+ import { m as ut } from "./index-BpBt6Y8F.js";
27
+ import { m as Ce } from "./index-aOnN-LXC.js";
28
28
  import { useRouter as ct } from "vue-router";
29
29
  function je(v) {
30
30
  return se.DineroFactory(v).toUnit();
31
31
  }
32
- function mt(v, _, a, f, i = [], b = []) {
33
- const n = nt.compact(
32
+ function mt(v, _, l, f, r = [], b = []) {
33
+ const o = ot.compact(
34
34
  _.map((t) => v.find((c) => c.systemCode === t.systemCode && c.taxCode === t.taxCode)).filter((t) => !!t && b.includes(t.systemCode))
35
- ), m = n.reduce(
35
+ ), m = o.reduce(
36
36
  (t, c) => {
37
37
  var y;
38
38
  return Object.assign(t, {
39
39
  [c.taxCode]: {
40
- inclusive: ((y = i.find((d) => d.systemCode === c.systemCode)) == null ? void 0 : y.inclusive) || !1,
40
+ inclusive: ((y = r.find((d) => d.systemCode === c.systemCode)) == null ? void 0 : y.inclusive) || !1,
41
41
  adjustment: {
42
42
  level: 1,
43
43
  type: {
@@ -62,7 +62,7 @@ function mt(v, _, a, f, i = [], b = []) {
62
62
  level: 0,
63
63
  type: {
64
64
  type: "BY_AMOUNT",
65
- amount: se.DineroFactory(a).subtract(se.Dinero.fromNumber({ number: f }).toObject()).toObject()
65
+ amount: se.DineroFactory(l).subtract(se.Dinero.fromNumber({ number: f }).toObject()).toObject()
66
66
  }
67
67
  }
68
68
  },
@@ -72,7 +72,7 @@ function mt(v, _, a, f, i = [], b = []) {
72
72
  adjustments: {},
73
73
  roundToNearest: 0
74
74
  });
75
- return n.map((t) => ({
75
+ return o.map((t) => ({
76
76
  setting: t,
77
77
  systemCode: t.systemCode,
78
78
  name: t.name,
@@ -83,10 +83,10 @@ function mt(v, _, a, f, i = [], b = []) {
83
83
  }).convertPrecision(2).toObject()
84
84
  }));
85
85
  }
86
- function pt(v, _, a) {
87
- return v ? v.reduce((f, i) => {
86
+ function pt(v, _, l) {
87
+ return v ? v.reduce((f, r) => {
88
88
  var b;
89
- return (b = a.find((n) => n.systemCode === i.systemCode)) != null && b.inclusive || (f = se.DineroFactory(f.toObject()).add(i.total)), f;
89
+ return (b = l.find((o) => o.systemCode === r.systemCode)) != null && b.inclusive || (f = se.DineroFactory(f.toObject()).add(r.total)), f;
90
90
  }, se.DineroFactory(_)).toObject() : se.DineroFactory(_).toObject();
91
91
  }
92
92
  const yt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, ft = ["src"], bt = {
@@ -99,29 +99,29 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
99
99
  },
100
100
  emits: ["edit", "delete", "send"],
101
101
  setup(v, { emit: _ }) {
102
- const a = v, f = _, i = j(() => {
103
- const n = [];
104
- return a.bundle.price.amount > 0 && n.push(
105
- `${B.Config.getCountry().currency.symbol}${je(a.bundle.price)}`
106
- ), a.bundle.coinPrice && n.push(`${a.bundle.coinPrice} point(s)`), n.join(" or ");
102
+ const l = v, f = _, r = j(() => {
103
+ const o = [];
104
+ return l.bundle.price.amount > 0 && o.push(
105
+ `${N.Config.getCountry().currency.symbol}${je(l.bundle.price)}`
106
+ ), l.bundle.coinPrice && o.push(`${l.bundle.coinPrice} point(s)`), o.join(" or ");
107
107
  }), b = j(() => {
108
108
  var m, u;
109
- const n = [];
110
- if (a.bundle.titles.length > 0 && n.push(`${a.bundle.titles.length} title(s)`), a.bundle.vouchers.length > 0 && n.push(`${a.bundle.vouchers.length} voucher(s)`), a.bundle.credit.normal || (m = a.bundle.credit.free) != null && m.amount) {
111
- const t = a.bundle.credit.normal + (((u = a.bundle.credit.free) == null ? void 0 : u.amount) ?? 0);
112
- n.push(`${t} credit(s)`);
109
+ const o = [];
110
+ if (l.bundle.titles.length > 0 && o.push(`${l.bundle.titles.length} title(s)`), l.bundle.vouchers.length > 0 && o.push(`${l.bundle.vouchers.length} voucher(s)`), l.bundle.credit.normal || (m = l.bundle.credit.free) != null && m.amount) {
111
+ const t = l.bundle.credit.normal + (((u = l.bundle.credit.free) == null ? void 0 : u.amount) ?? 0);
112
+ o.push(`${t} credit(s)`);
113
113
  }
114
- return n;
114
+ return o;
115
115
  });
116
- return (n, m) => {
117
- const u = h("FmIcon"), t = h("FmChip"), c = h("FmButton"), y = h("FmMenuItem"), d = h("FmMenu"), S = h("FmCard");
118
- return g(), I(S, {
116
+ return (o, m) => {
117
+ const u = h("FmIcon"), t = h("FmChip"), c = h("FmButton"), y = h("FmMenuItem"), d = h("FmMenu"), V = h("FmCard");
118
+ return g(), I(V, {
119
119
  variant: "outlined",
120
120
  class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
121
121
  }, {
122
122
  default: T(() => [
123
123
  x("div", yt, [
124
- v.bundle.image ? (g(), D("img", {
124
+ v.bundle.image ? (g(), B("img", {
125
125
  key: 1,
126
126
  src: v.bundle.image,
127
127
  class: "w-full h-full object-contain aspect-video"
@@ -132,35 +132,35 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
132
132
  size: "md",
133
133
  class: "text-fm-color-neutral-gray-200"
134
134
  })),
135
- v.bundle.isFeedvibe ? (g(), D("div", bt, [
136
- r(t, {
135
+ v.bundle.isFeedvibe ? (g(), B("div", bt, [
136
+ i(t, {
137
137
  label: "Feedvibe",
138
138
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
139
139
  compact: ""
140
140
  })
141
- ])) : A("", !0),
141
+ ])) : M("", !0),
142
142
  x("div", gt, [
143
- r(d, { placement: "bottom-end" }, {
143
+ i(d, { placement: "bottom-end" }, {
144
144
  "menu-button": T(() => [
145
- r(c, {
145
+ i(c, {
146
146
  icon: "more_vert",
147
147
  variant: "tertiary"
148
148
  })
149
149
  ]),
150
150
  default: T(() => [
151
- r(y, {
152
- onClick: m[0] || (m[0] = (l) => f("edit", v.bundle)),
151
+ i(y, {
152
+ onClick: m[0] || (m[0] = (a) => f("edit", v.bundle)),
153
153
  icon: "edit",
154
154
  label: "Edit"
155
155
  }),
156
- v.bundle.stripePriceId ? A("", !0) : (g(), I(y, {
156
+ v.bundle.stripePriceId ? M("", !0) : (g(), I(y, {
157
157
  key: 0,
158
- onClick: m[1] || (m[1] = (l) => f("send", v.bundle)),
158
+ onClick: m[1] || (m[1] = (a) => f("send", v.bundle)),
159
159
  icon: "send",
160
160
  label: "Send"
161
161
  })),
162
- r(y, {
163
- onClick: m[2] || (m[2] = (l) => f("delete", v.bundle)),
162
+ i(y, {
163
+ onClick: m[2] || (m[2] = (a) => f("delete", v.bundle)),
164
164
  icon: "delete"
165
165
  }, {
166
166
  label: T(() => [
@@ -174,11 +174,11 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
174
174
  ])
175
175
  ]),
176
176
  x("div", ht, L(v.bundle.name), 1),
177
- x("div", _t, L(e(i) || "Free"), 1),
177
+ x("div", _t, L(e(r) || "Free"), 1),
178
178
  x("div", xt, [
179
- (g(!0), D(X, null, re(e(b), (l, F) => (g(), I(t, {
180
- key: F,
181
- label: l
179
+ (g(!0), B(X, null, re(e(b), (a, S) => (g(), I(t, {
180
+ key: S,
181
+ label: a
182
182
  }, null, 8, ["label"]))), 128))
183
183
  ])
184
184
  ]),
@@ -186,21 +186,21 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
186
186
  });
187
187
  };
188
188
  }
189
- }), Ft = /* @__PURE__ */ ee({
189
+ }), St = /* @__PURE__ */ ee({
190
190
  __name: "AddBundleCard",
191
191
  emits: ["create"],
192
192
  setup(v, { emit: _ }) {
193
- const { t: a } = be(), f = _;
194
- return (i, b) => {
195
- const n = h("FmButton"), m = h("FmCard");
193
+ const { t: l } = be(), f = _;
194
+ return (r, b) => {
195
+ const o = h("FmButton"), m = h("FmCard");
196
196
  return g(), I(m, {
197
197
  variant: "outlined",
198
198
  class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
199
199
  }, {
200
200
  default: T(() => [
201
- r(n, {
201
+ i(o, {
202
202
  onClick: b[0] || (b[0] = (u) => f("create")),
203
- label: e(a)("connect.store.actions.addBundle"),
203
+ label: e(l)("connect.store.actions.addBundle"),
204
204
  icon: "add",
205
205
  variant: "secondary"
206
206
  }, null, 8, ["label"])
@@ -209,7 +209,7 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
209
209
  });
210
210
  };
211
211
  }
212
- }), Vt = { class: "space-y-16" }, St = { class: "flex w-full justify-between pb-16" }, wt = { class: "flex items-center justify-end gap-8" }, $t = /* @__PURE__ */ ee({
212
+ }), Ft = { class: "space-y-16" }, Vt = { class: "flex w-full justify-between pb-16" }, wt = { class: "flex items-center justify-end gap-8" }, kt = /* @__PURE__ */ ee({
213
213
  __name: "CategoryDialog",
214
214
  props: {
215
215
  action: {
@@ -222,40 +222,40 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
222
222
  }
223
223
  },
224
224
  setup(v) {
225
- const { t: _ } = be(), a = v, f = Ae(), { emitData: i, emitAction: b } = Me(), n = R(a.initialValue), m = Q.string().min(1);
225
+ const { t: _ } = be(), l = v, f = Me(), { emitData: r, emitAction: b } = Oe(), o = R(l.initialValue), m = Q.string().min(1);
226
226
  function u() {
227
- i(n.value), b("primary"), f.close();
227
+ r(o.value), b("primary"), f.close();
228
228
  }
229
229
  function t() {
230
- i(null), b("primary"), f.close();
230
+ r(null), b("primary"), f.close();
231
231
  }
232
232
  return (c, y) => {
233
- const d = h("FmTextField"), S = h("FmButton");
234
- return g(), D("div", Vt, [
235
- r(d, {
236
- modelValue: e(n),
237
- "onUpdate:modelValue": y[0] || (y[0] = (l) => ne(n) ? n.value = l : null),
233
+ const d = h("FmTextField"), V = h("FmButton");
234
+ return g(), B("div", Ft, [
235
+ i(d, {
236
+ modelValue: e(o),
237
+ "onUpdate:modelValue": y[0] || (y[0] = (a) => oe(o) ? o.value = a : null),
238
238
  label: e(_)("connect.store.category.label"),
239
239
  rules: [e(Z).toRule(e(m))]
240
240
  }, null, 8, ["modelValue", "label", "rules"]),
241
- x("div", St, [
241
+ x("div", Vt, [
242
242
  x("div", null, [
243
- v.action == "edit" ? (g(), I(S, {
243
+ v.action == "edit" ? (g(), I(V, {
244
244
  key: 0,
245
245
  onClick: t,
246
246
  label: e(_)("connect.common.delete"),
247
247
  variant: "destructive"
248
- }, null, 8, ["label"])) : A("", !0)
248
+ }, null, 8, ["label"])) : M("", !0)
249
249
  ]),
250
250
  x("div", wt, [
251
- r(S, {
251
+ i(V, {
252
252
  label: e(_)("connect.common.cancel"),
253
253
  variant: "tertiary",
254
- onClick: y[1] || (y[1] = (l) => e(f).close())
254
+ onClick: y[1] || (y[1] = (a) => e(f).close())
255
255
  }, null, 8, ["label"]),
256
- r(S, {
256
+ i(V, {
257
257
  label: v.action == "edit" ? e(_)("connect.common.edit") : e(_)("connect.common.add"),
258
- disabled: !e(n),
258
+ disabled: !e(o),
259
259
  onClick: u
260
260
  }, null, 8, ["label", "disabled"])
261
261
  ])
@@ -263,50 +263,50 @@ const yt = { class: "relative h-[120px] aspect-video flex items-center justify-c
263
263
  ]);
264
264
  };
265
265
  }
266
- }), kt = { class: "space-y-16" }, Pt = /* @__PURE__ */ x("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1), Tt = { class: "flex items-center justify-end gap-8 pb-16" }, Ut = /* @__PURE__ */ ee({
266
+ }), Pt = { class: "space-y-16" }, $t = /* @__PURE__ */ x("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Select a category to create FeedMe CNY 2025 bundle ", -1), Tt = { class: "flex items-center justify-end gap-8 pb-16" }, Ut = /* @__PURE__ */ ee({
267
267
  __name: "SelectCategoryDialog",
268
268
  setup(v) {
269
- const { emitData: _, emitAction: a } = Me(), f = $e(), i = R(), b = j(
270
- () => f.sortedStoreCategories.map((n, m) => ({
271
- label: n.name,
269
+ const { emitData: _, emitAction: l } = Oe(), f = ke(), r = R(), b = j(
270
+ () => f.sortedStoreCategories.map((o, m) => ({
271
+ label: o.name,
272
272
  value: m
273
273
  }))
274
274
  );
275
- return (n, m) => {
275
+ return (o, m) => {
276
276
  const u = h("FmSelect"), t = h("FmButton");
277
- return g(), D("div", kt, [
278
- Pt,
279
- r(u, {
277
+ return g(), B("div", Pt, [
278
+ $t,
279
+ i(u, {
280
280
  placeholder: "Select a category",
281
281
  items: e(b),
282
- modelValue: e(i),
282
+ modelValue: e(r),
283
283
  "onUpdate:modelValue": [
284
- m[0] || (m[0] = (c) => ne(i) ? i.value = c : null),
284
+ m[0] || (m[0] = (c) => oe(r) ? r.value = c : null),
285
285
  m[1] || (m[1] = (c) => e(_)(c))
286
286
  ],
287
287
  label: "Category"
288
288
  }, null, 8, ["items", "modelValue"]),
289
289
  x("div", Tt, [
290
- r(t, {
290
+ i(t, {
291
291
  variant: "tertiary",
292
292
  label: "Cancel",
293
- onClick: m[2] || (m[2] = (c) => e(a)("tertiary"))
293
+ onClick: m[2] || (m[2] = (c) => e(l)("tertiary"))
294
294
  }),
295
- r(t, {
295
+ i(t, {
296
296
  label: "Select",
297
- onClick: m[3] || (m[3] = (c) => e(a)("primary")),
298
- disabled: e(i) == null
297
+ onClick: m[3] || (m[3] = (c) => e(l)("primary")),
298
+ disabled: e(r) == null
299
299
  }, null, 8, ["disabled"])
300
300
  ])
301
301
  ]);
302
302
  };
303
303
  }
304
304
  });
305
- function Ve(v) {
305
+ function _e(v) {
306
306
  return v.states.map((_) => ({ label: _, value: _ }));
307
307
  }
308
308
  const Rt = {
309
- [Ce.F_COUNTRY.enum.MY]: {
309
+ [he.F_COUNTRY.enum.MY]: {
310
310
  states: [
311
311
  "Johor",
312
312
  "Kedah",
@@ -326,16 +326,16 @@ const Rt = {
326
326
  "Terengganu"
327
327
  ],
328
328
  get stateItems() {
329
- return Ve(this);
329
+ return _e(this);
330
330
  }
331
331
  },
332
- [Ce.F_COUNTRY.enum.SG]: {
332
+ [he.F_COUNTRY.enum.SG]: {
333
333
  states: [],
334
334
  get stateItems() {
335
- return Ve(this);
335
+ return _e(this);
336
336
  }
337
337
  },
338
- [Ce.F_COUNTRY.enum.ID]: {
338
+ [he.F_COUNTRY.enum.ID]: {
339
339
  states: [
340
340
  "Aceh",
341
341
  "Bali",
@@ -372,10 +372,94 @@ const Rt = {
372
372
  "West Sumatra"
373
373
  ],
374
374
  get stateItems() {
375
- return Ve(this);
375
+ return _e(this);
376
+ }
377
+ },
378
+ [he.F_COUNTRY.enum.TH]: {
379
+ states: [
380
+ "Bangkok",
381
+ "Amnat Charoen",
382
+ "Ang Thong",
383
+ "Bueng Kan",
384
+ "Buri Ram",
385
+ "Chachoengsao",
386
+ "Chai Nat",
387
+ "Chaiyaphum",
388
+ "Chanthaburi",
389
+ "Chiang Mai",
390
+ "Chiang Rai",
391
+ "Chonburi",
392
+ "Chumphon",
393
+ "Kalasin",
394
+ "Kamphaeng Phet",
395
+ "Kanchanaburi",
396
+ "Khon Kaen",
397
+ "Krabi",
398
+ "Lampang",
399
+ "Lamphun",
400
+ "Loei",
401
+ "Lopburi",
402
+ "Mae Hong Son",
403
+ "Maha Sarakham",
404
+ "Mukdahan",
405
+ "Nakhon Nayok",
406
+ "Nakhon Pathom",
407
+ "Nakhon Phanom",
408
+ "Nakhon Ratchasima",
409
+ "Nakhon Sawan",
410
+ "Nakhon Si Thammarat",
411
+ "Nan",
412
+ "Narathiwat",
413
+ "Nong Bua Lamphu",
414
+ "Nong Khai",
415
+ "Nonthaburi",
416
+ "Pathum Thani",
417
+ "Pattani",
418
+ "Phang Nga",
419
+ "Phatthalung",
420
+ "Phayao",
421
+ "Phetchabun",
422
+ "Phetchaburi",
423
+ "Phichit",
424
+ "Phitsanulok",
425
+ "Phra Nakhon Si Ayutthaya",
426
+ "Phrae",
427
+ "Phuket",
428
+ "Prachinburi",
429
+ "Prachuap Khiri Khan",
430
+ "Ranong",
431
+ "Ratchaburi",
432
+ "Rayong",
433
+ "Roi Et",
434
+ "Sa Kaeo",
435
+ "Sakon Nakhon",
436
+ "Samut Prakan",
437
+ "Samut Sakhon",
438
+ "Samut Songkhram",
439
+ "Saraburi",
440
+ "Satun",
441
+ "Sing Buri",
442
+ "Sisaket",
443
+ "Songkhla",
444
+ "Sukhothai",
445
+ "Suphan Buri",
446
+ "Surat Thani",
447
+ "Surin",
448
+ "Tak",
449
+ "Trang",
450
+ "Trat",
451
+ "Ubon Ratchathani",
452
+ "Udon Thani",
453
+ "Uthai Thani",
454
+ "Uttaradit",
455
+ "Yala",
456
+ "Yasothon"
457
+ ],
458
+ get stateItems() {
459
+ return _e(this);
376
460
  }
377
461
  }
378
- }, pe = () => B.Config.getCountry(), ye = {
462
+ }, pe = () => N.Config.getCountry(), ye = {
379
463
  get fullCurrency() {
380
464
  return pe().currency;
381
465
  },
@@ -383,7 +467,7 @@ const Rt = {
383
467
  return pe().currency.code;
384
468
  },
385
469
  get fullTax() {
386
- return B.Country.getCountryFlattenTaxes(pe().code);
470
+ return N.Country.getCountryFlattenTaxes(pe().code);
387
471
  },
388
472
  get taxSystem() {
389
473
  return pe().taxSystems;
@@ -395,20 +479,20 @@ const Rt = {
395
479
  }));
396
480
  },
397
481
  groupedTaxOptions() {
398
- const v = B.Country.getCountryFlattenTaxes(pe().code);
482
+ const v = N.Country.getCountryFlattenTaxes(pe().code);
399
483
  return ye.taxSystem.map((_) => ({
400
484
  code: _.code,
401
- options: v.map((a) => ({ ...a, feedmeTaxCode: ye.generateCode(a) })).filter((a) => a.systemCode === _.code)
485
+ options: v.map((l) => ({ ...l, feedmeTaxCode: ye.generateCode(l) })).filter((l) => l.systemCode === _.code)
402
486
  }));
403
487
  },
404
488
  systemDefaultCode(v) {
405
- const _ = ye.groupedTaxOptions().find((a) => a.code === v);
406
- return _ == null ? void 0 : _.options.find((a) => a.default);
489
+ const _ = ye.groupedTaxOptions().find((l) => l.code === v);
490
+ return _ == null ? void 0 : _.options.find((l) => l.default);
407
491
  },
408
492
  generateCode(v) {
409
493
  return `${v.systemCode}/${v.taxCode}`;
410
494
  }
411
- }, oe = ye, It = /* @__PURE__ */ ee({
495
+ }, ne = ye, It = /* @__PURE__ */ ee({
412
496
  __name: "TaxInclusiveSetting",
413
497
  props: {
414
498
  modelValue: {
@@ -419,53 +503,53 @@ const Rt = {
419
503
  },
420
504
  emits: ["update:model-value"],
421
505
  setup(v, { emit: _ }) {
422
- const a = v, f = oe.taxSystem, i = _, b = R(a.modelValue);
423
- function n(c, y) {
424
- const d = ue.clone(a.modelValue), S = d.findIndex((l) => l.systemCode === c);
425
- S >= 0 ? d[S].inclusive = y : d.push({
506
+ const l = v, f = ne.taxSystem, r = _, b = R(l.modelValue);
507
+ function o(c, y) {
508
+ const d = ue.clone(l.modelValue), V = d.findIndex((a) => a.systemCode === c);
509
+ V >= 0 ? d[V].inclusive = y : d.push({
426
510
  systemCode: c,
427
511
  inclusive: y
428
- }), b.value = d, i("update:model-value", d);
512
+ }), b.value = d, r("update:model-value", d);
429
513
  }
430
514
  function m() {
431
515
  return f.map((c) => {
432
- const y = a.modelValue ? a.modelValue.find((d) => d.systemCode === c.code) : !1;
516
+ const y = l.modelValue ? l.modelValue.find((d) => d.systemCode === c.code) : !1;
433
517
  return {
434
518
  label: c.name,
435
519
  config: {
436
520
  value: y ? y.inclusive : !1
437
521
  },
438
522
  input: (d) => {
439
- n(c.code, d);
523
+ o(c.code, d);
440
524
  }
441
525
  };
442
526
  });
443
527
  }
444
- const u = He(m());
528
+ const u = Ke(m());
445
529
  function t(c, y) {
446
530
  return `${c} ${y ? "Inclusive" : "Exclusive"}`;
447
531
  }
448
532
  return fe(() => {
449
- a.modelValue.length || n(f[0].code, !1);
533
+ l.modelValue.length || o(f[0].code, !1);
450
534
  }), we(
451
- () => a.modelValue,
535
+ () => l.modelValue,
452
536
  (c, y) => {
453
- c != y && !c.length && n(f[0].code, !1);
537
+ c != y && !c.length && o(f[0].code, !1);
454
538
  }
455
539
  ), (c, y) => {
456
540
  const d = h("FmSwitch");
457
- return g(!0), D(X, null, re(e(u), (S, l) => {
458
- var F;
459
- return g(), D("div", { key: l }, [
460
- r(d, {
461
- "model-value": ((F = e(b)[l]) == null ? void 0 : F.inclusive) || !1,
541
+ return g(!0), B(X, null, re(e(u), (V, a) => {
542
+ var S;
543
+ return g(), B("div", { key: a }, [
544
+ i(d, {
545
+ "model-value": ((S = e(b)[a]) == null ? void 0 : S.inclusive) || !1,
462
546
  "label-placement": "left",
463
- "onUpdate:modelValue": (w) => S.input(w)
547
+ "onUpdate:modelValue": (w) => V.input(w)
464
548
  }, {
465
549
  label: T(() => {
466
550
  var w;
467
551
  return [
468
- x("div", null, L(t(S.label, ((w = e(b)[l]) == null ? void 0 : w.inclusive) || !1)), 1)
552
+ x("div", null, L(t(V.label, ((w = e(b)[a]) == null ? void 0 : w.inclusive) || !1)), 1)
469
553
  ];
470
554
  }),
471
555
  _: 2
@@ -475,54 +559,54 @@ const Rt = {
475
559
  };
476
560
  }
477
561
  });
478
- var Dt = { mode: "production", appMode: "mf" };
479
- const Bt = { class: "space-y-8" }, Nt = {
562
+ var Bt = { mode: "production", appMode: "mf" };
563
+ const Nt = { class: "space-y-8" }, Dt = {
480
564
  key: 0,
481
565
  class: "space-y-16"
482
- }, Ot = /* @__PURE__ */ ee({
566
+ }, At = /* @__PURE__ */ ee({
483
567
  __name: "StripeSetting",
484
568
  props: {
485
569
  modelValue: {}
486
570
  },
487
571
  emits: ["update:modelValue"],
488
572
  setup(v, { emit: _ }) {
489
- const a = v, f = _, i = R(!1);
490
- we(i, (n, m) => {
491
- m != n && (!a.modelValue && n ? f("update:modelValue", {
573
+ const l = v, f = _, r = R(!1);
574
+ we(r, (o, m) => {
575
+ m != o && (!l.modelValue && o ? f("update:modelValue", {
492
576
  apiKey: "",
493
577
  webhookSecret: ""
494
- }) : n || f("update:modelValue", void 0));
578
+ }) : o || f("update:modelValue", void 0));
495
579
  });
496
580
  const b = j(() => {
497
- const n = Dt.mode === "development", m = B.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
498
- return `https://marketing${n ? "-dev" : ""}${u}.feedmeapi.com/stripe/${Ye.getBusinessId()}/webhook`;
581
+ const o = Bt.mode === "development", m = N.Config.getCountry().code.toLowerCase(), u = m != "my" ? `.${m}` : "";
582
+ return `https://marketing${o ? "-dev" : ""}${u}.feedmeapi.com/stripe/${ze.getBusinessId()}/webhook`;
499
583
  });
500
584
  return fe(() => {
501
- i.value = !!a.modelValue;
502
- }), (n, m) => {
585
+ r.value = !!l.modelValue;
586
+ }), (o, m) => {
503
587
  const u = h("FmSwitch"), t = h("FmTextField"), c = h("FmButton");
504
- return g(), D("div", Bt, [
505
- r(u, {
506
- modelValue: e(i),
507
- "onUpdate:modelValue": m[0] || (m[0] = (y) => ne(i) ? i.value = y : null),
588
+ return g(), B("div", Nt, [
589
+ i(u, {
590
+ modelValue: e(r),
591
+ "onUpdate:modelValue": m[0] || (m[0] = (y) => oe(r) ? r.value = y : null),
508
592
  value: "true",
509
593
  label: "Enable Stripe"
510
594
  }, null, 8, ["modelValue"]),
511
- a.modelValue ? (g(), D("div", Nt, [
512
- r(t, {
595
+ l.modelValue ? (g(), B("div", Dt, [
596
+ i(t, {
513
597
  label: "API Key",
514
- modelValue: a.modelValue.apiKey,
515
- "onUpdate:modelValue": m[1] || (m[1] = (y) => a.modelValue.apiKey = y),
598
+ modelValue: l.modelValue.apiKey,
599
+ "onUpdate:modelValue": m[1] || (m[1] = (y) => l.modelValue.apiKey = y),
516
600
  "helper-text": "Go to Stripe Dashboard get your API Key and paste here."
517
601
  }, null, 8, ["modelValue"]),
518
- r(t, {
602
+ i(t, {
519
603
  label: "Webhook URL",
520
604
  "model-value": e(b),
521
605
  readonly: "",
522
606
  "helper-text": "Copy this URL to your Stripe dashboard"
523
607
  }, {
524
608
  append: T(() => [
525
- r(c, {
609
+ i(c, {
526
610
  icon: "content_copy",
527
611
  variant: "tertiary",
528
612
  onClick: m[2] || (m[2] = (y) => e(Je)(e(b)))
@@ -530,28 +614,28 @@ const Bt = { class: "space-y-8" }, Nt = {
530
614
  ]),
531
615
  _: 1
532
616
  }, 8, ["model-value"]),
533
- r(t, {
534
- modelValue: a.modelValue.webhookSecret,
535
- "onUpdate:modelValue": m[3] || (m[3] = (y) => a.modelValue.webhookSecret = y),
617
+ i(t, {
618
+ modelValue: l.modelValue.webhookSecret,
619
+ "onUpdate:modelValue": m[3] || (m[3] = (y) => l.modelValue.webhookSecret = y),
536
620
  label: "Webhook Secret",
537
621
  "helper-text": `Copy the webhook signing secret from your Stripe account and paste
538
622
  here.`
539
623
  }, null, 8, ["modelValue"])
540
- ])) : A("", !0)
624
+ ])) : M("", !0)
541
625
  ]);
542
626
  };
543
627
  }
544
- }), At = {
628
+ }), Mt = {
545
629
  key: 0,
546
630
  class: "space-y-16 pr-12"
547
- }, Mt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Et = {
631
+ }, Ot = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Et = {
548
632
  key: 1,
549
633
  class: "space-y-16"
550
- }, jt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Lt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Ht = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, qt = { class: "space-y-4" }, Kt = { class: "fm-typo-en-body-lg-400" }, Wt = { class: "space-y-16" }, zt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Yt = { class: "flex items-center gap-8" }, Jt = /* @__PURE__ */ ee({
634
+ }, jt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Lt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, Kt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Ht = { class: "space-y-4" }, qt = { class: "fm-typo-en-body-lg-400" }, Yt = { class: "space-y-16" }, Wt = { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, zt = { class: "flex items-center gap-8" }, Jt = /* @__PURE__ */ ee({
551
635
  __name: "StoreSettingSheet",
552
636
  emits: ["update"],
553
- setup(v, { expose: _, emit: a }) {
554
- const { t: f } = be(), i = a, b = R(!1), n = R(), m = R(!1), u = Qe.extend({
637
+ setup(v, { expose: _, emit: l }) {
638
+ const { t: f } = be(), r = l, b = R(!1), o = R(), m = R(!1), u = Qe.extend({
555
639
  company: et.extend({
556
640
  name: Q.string().min(1, "Company name is required"),
557
641
  regNo: Q.string().min(1, "Registration number is required"),
@@ -566,10 +650,10 @@ const Bt = { class: "space-y-8" }, Nt = {
566
650
  phoneNo: Q.string().min(1, "Phone number is required"),
567
651
  sstRegNo: Q.string().optional()
568
652
  })
569
- }), t = j(() => u.safeParse(n.value).success);
653
+ }), t = j(() => u.safeParse(o.value).success);
570
654
  function c() {
571
- const S = u.safeParse(n.value);
572
- S.success && i("update", S.data);
655
+ const V = u.safeParse(o.value);
656
+ V.success && r("update", V.data);
573
657
  }
574
658
  function y() {
575
659
  return {
@@ -581,7 +665,7 @@ const Bt = { class: "space-y-8" }, Nt = {
581
665
  city: "",
582
666
  postcode: "",
583
667
  state: "",
584
- country: B.Config.getCountry().name
668
+ country: N.Config.getCountry().name
585
669
  },
586
670
  phoneNo: "",
587
671
  regNo: "",
@@ -590,117 +674,117 @@ const Bt = { class: "space-y-8" }, Nt = {
590
674
  inclusiveTaxes: []
591
675
  };
592
676
  }
593
- function d(S, l) {
594
- b.value = S, S && (n.value = l != null && l.company ? l : y());
677
+ function d(V, a) {
678
+ b.value = V, V && (o.value = a != null && a.company ? a : y());
595
679
  }
596
680
  return _({
597
681
  showSheet: d,
598
- data: n
599
- }), (S, l) => {
600
- const F = h("FmIcon"), w = h("FmMenuItem"), N = h("FmMenu"), W = h("FmSelect"), Y = h("FmButton"), H = h("FmSideSheet");
601
- return g(), I(H, {
682
+ data: o
683
+ }), (V, a) => {
684
+ const S = h("FmIcon"), w = h("FmMenuItem"), D = h("FmMenu"), Y = h("FmSelect"), z = h("FmButton"), K = h("FmSideSheet");
685
+ return g(), I(K, {
602
686
  "max-width": 560,
603
687
  modelValue: e(b),
604
- "onUpdate:modelValue": l[15] || (l[15] = (z) => ne(b) ? b.value = z : null),
688
+ "onUpdate:modelValue": a[15] || (a[15] = (W) => oe(b) ? b.value = W : null),
605
689
  header: e(f)("connect.store.setting.title")
606
690
  }, {
607
691
  "side-sheet-footer": T(() => [
608
- x("div", Yt, [
609
- r(Y, {
692
+ x("div", zt, [
693
+ i(z, {
610
694
  label: e(f)("connect.common.save"),
611
695
  onClick: c,
612
- disabled: !e(t) || e(xe)().isLoading,
613
- loading: e(xe)().isLoading
696
+ disabled: !e(t) || e(Se)().isLoading,
697
+ loading: e(Se)().isLoading
614
698
  }, null, 8, ["label", "disabled", "loading"]),
615
- r(Y, {
699
+ i(z, {
616
700
  label: e(f)("connect.common.cancel"),
617
- onClick: l[14] || (l[14] = (z) => d(!1)),
701
+ onClick: a[14] || (a[14] = (W) => d(!1)),
618
702
  variant: "tertiary"
619
703
  }, null, 8, ["label"])
620
704
  ])
621
705
  ]),
622
706
  default: T(() => {
623
- var z, le;
707
+ var W, ae;
624
708
  return [
625
- r(ke, { json: e(n) }, null, 8, ["json"]),
626
- e(n) && e(n).company ? (g(), D("div", At, [
627
- x("div", Mt, L(e(f)("connect.store.setting.company.legal_info")), 1),
628
- r(te, {
629
- modelValue: e(n).company.name,
630
- "onUpdate:modelValue": l[0] || (l[0] = (s) => e(n).company.name = s),
709
+ i(Pe, { json: e(o) }, null, 8, ["json"]),
710
+ e(o) && e(o).company ? (g(), B("div", Mt, [
711
+ x("div", Ot, L(e(f)("connect.store.setting.company.legal_info")), 1),
712
+ i(te, {
713
+ modelValue: e(o).company.name,
714
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => e(o).company.name = s),
631
715
  label: e(f)("connect.store.setting.company.name"),
632
716
  schema: e(Z).typeAtPath(e(u), "company.name")
633
717
  }, null, 8, ["modelValue", "label", "schema"]),
634
- r(te, {
635
- modelValue: e(n).company.regNo,
636
- "onUpdate:modelValue": l[1] || (l[1] = (s) => e(n).company.regNo = s),
718
+ i(te, {
719
+ modelValue: e(o).company.regNo,
720
+ "onUpdate:modelValue": a[1] || (a[1] = (s) => e(o).company.regNo = s),
637
721
  label: e(f)("connect.store.setting.company.reg_no"),
638
722
  schema: e(Z).typeAtPath(e(u), "company.regNo")
639
723
  }, null, 8, ["modelValue", "label", "schema"]),
640
- e(B.Config).getCountry().taxSystems.length ? (g(), I(te, {
724
+ e(N.Config).getCountry().taxSystems.length ? (g(), I(te, {
641
725
  key: 0,
642
- modelValue: e(n).company.sstRegNo,
726
+ modelValue: e(o).company.sstRegNo,
643
727
  "onUpdate:modelValue": [
644
- l[2] || (l[2] = (s) => e(n).company.sstRegNo = s),
645
- l[3] || (l[3] = (s) => s ? null : e(n).inclusiveTaxes = [])
728
+ a[2] || (a[2] = (s) => e(o).company.sstRegNo = s),
729
+ a[3] || (a[3] = (s) => s ? null : e(o).inclusiveTaxes = [])
646
730
  ],
647
731
  label: e(f)("connect.store.setting.company.tax_reg_no"),
648
732
  schema: e(Z).typeAtPath(e(u), "company.sstRegNo")
649
- }, null, 8, ["modelValue", "label", "schema"])) : A("", !0),
650
- (z = e(n).company) != null && z.sstRegNo && e(n).inclusiveTaxes ? (g(), D("div", Et, [
733
+ }, null, 8, ["modelValue", "label", "schema"])) : M("", !0),
734
+ (W = e(o).company) != null && W.sstRegNo && e(o).inclusiveTaxes ? (g(), B("div", Et, [
651
735
  x("div", jt, L(e(f)("connect.store.setting.company.tax")), 1),
652
- r(It, {
653
- modelValue: e(n).inclusiveTaxes,
654
- "onUpdate:modelValue": l[4] || (l[4] = (s) => e(n).inclusiveTaxes = s)
736
+ i(It, {
737
+ modelValue: e(o).inclusiveTaxes,
738
+ "onUpdate:modelValue": a[4] || (a[4] = (s) => e(o).inclusiveTaxes = s)
655
739
  }, null, 8, ["modelValue"])
656
- ])) : A("", !0),
657
- r(te, {
658
- modelValue: e(n).company.phoneNo,
659
- "onUpdate:modelValue": l[5] || (l[5] = (s) => e(n).company.phoneNo = s),
740
+ ])) : M("", !0),
741
+ i(te, {
742
+ modelValue: e(o).company.phoneNo,
743
+ "onUpdate:modelValue": a[5] || (a[5] = (s) => e(o).company.phoneNo = s),
660
744
  label: e(f)("connect.store.setting.company.phone"),
661
745
  schema: e(Z).typeAtPath(e(u), "company.phoneNo")
662
746
  }, null, 8, ["modelValue", "label", "schema"]),
663
747
  x("div", Lt, L(e(f)("connect.store.setting.company.address.title")), 1),
664
- r(te, {
665
- modelValue: e(n).company.address.line1,
666
- "onUpdate:modelValue": l[6] || (l[6] = (s) => e(n).company.address.line1 = s),
748
+ i(te, {
749
+ modelValue: e(o).company.address.line1,
750
+ "onUpdate:modelValue": a[6] || (a[6] = (s) => e(o).company.address.line1 = s),
667
751
  label: e(f)("connect.store.setting.company.address.line1"),
668
752
  schema: e(Z).typeAtPath(e(u), "company.address.line1")
669
753
  }, null, 8, ["modelValue", "label", "schema"]),
670
- r(te, {
671
- modelValue: e(n).company.address.line2,
672
- "onUpdate:modelValue": l[7] || (l[7] = (s) => e(n).company.address.line2 = s),
754
+ i(te, {
755
+ modelValue: e(o).company.address.line2,
756
+ "onUpdate:modelValue": a[7] || (a[7] = (s) => e(o).company.address.line2 = s),
673
757
  label: e(f)("connect.store.setting.company.address.line2"),
674
758
  schema: e(Z).typeAtPath(e(u), "company.address.line2")
675
759
  }, null, 8, ["modelValue", "label", "schema"]),
676
- x("div", Ht, [
677
- r(te, {
678
- modelValue: e(n).company.address.city,
679
- "onUpdate:modelValue": l[8] || (l[8] = (s) => e(n).company.address.city = s),
760
+ x("div", Kt, [
761
+ i(te, {
762
+ modelValue: e(o).company.address.city,
763
+ "onUpdate:modelValue": a[8] || (a[8] = (s) => e(o).company.address.city = s),
680
764
  label: e(f)("connect.store.setting.company.address.city"),
681
765
  schema: e(Z).typeAtPath(e(u), "company.address.city")
682
766
  }, null, 8, ["modelValue", "label", "schema"]),
683
- r(te, {
684
- modelValue: e(n).company.address.postcode,
685
- "onUpdate:modelValue": l[9] || (l[9] = (s) => e(n).company.address.postcode = s),
767
+ i(te, {
768
+ modelValue: e(o).company.address.postcode,
769
+ "onUpdate:modelValue": a[9] || (a[9] = (s) => e(o).company.address.postcode = s),
686
770
  label: e(f)("connect.store.setting.company.address.postcode"),
687
771
  schema: e(Z).typeAtPath(e(u), "company.address.postcode")
688
772
  }, null, 8, ["modelValue", "label", "schema"]),
689
- x("div", qt, [
690
- x("div", Kt, L(e(f)("connect.store.setting.company.address.state")), 1),
691
- r(N, {
773
+ x("div", Ht, [
774
+ x("div", qt, L(e(f)("connect.store.setting.company.address.state")), 1),
775
+ i(D, {
692
776
  placement: "top-end",
693
777
  "model-value": e(m)
694
778
  }, {
695
779
  "menu-button": T(() => [
696
- r(te, {
697
- modelValue: e(n).company.address.state,
698
- "onUpdate:modelValue": l[10] || (l[10] = (s) => e(n).company.address.state = s),
780
+ i(te, {
781
+ modelValue: e(o).company.address.state,
782
+ "onUpdate:modelValue": a[10] || (a[10] = (s) => e(o).company.address.state = s),
699
783
  schema: e(Z).typeAtPath(e(u), "company.address.state"),
700
- onFocusChanged: l[11] || (l[11] = (s) => m.value = s)
784
+ onFocusChanged: a[11] || (a[11] = (s) => m.value = s)
701
785
  }, {
702
786
  append: T(() => [
703
- r(F, {
787
+ i(S, {
704
788
  name: e(m) ? "keyboard_arrow_up" : "keyboard_arrow_down"
705
789
  }, null, 8, ["name"])
706
790
  ]),
@@ -708,44 +792,44 @@ const Bt = { class: "space-y-8" }, Nt = {
708
792
  }, 8, ["modelValue", "schema"])
709
793
  ]),
710
794
  default: T(() => [
711
- (g(!0), D(X, null, re(e(Rt)[e(B.Config).getCountry().code].stateItems.filter(
795
+ (g(!0), B(X, null, re(e(Rt)[e(N.Config).getCountry().code].stateItems.filter(
712
796
  (s) => {
713
- var $, U;
714
- return s.label.toLowerCase().includes(((U = ($ = e(n)) == null ? void 0 : $.company) == null ? void 0 : U.address.state.toLowerCase()) ?? "");
797
+ var k, U;
798
+ return s.label.toLowerCase().includes(((U = (k = e(o)) == null ? void 0 : k.company) == null ? void 0 : U.address.state.toLowerCase()) ?? "");
715
799
  }
716
800
  ) || [], (s) => (g(), I(w, {
717
801
  key: s.value,
718
- "model-value": e(n).company.address.state === s.value,
802
+ "model-value": e(o).company.address.state === s.value,
719
803
  label: s.label,
720
804
  onClick: () => {
721
- e(n).company.address.state = s.value, m.value = !1;
805
+ e(o).company.address.state = s.value, m.value = !1;
722
806
  }
723
807
  }, null, 8, ["model-value", "label", "onClick"]))), 128))
724
808
  ]),
725
809
  _: 1
726
810
  }, 8, ["model-value"])
727
811
  ]),
728
- r(W, {
812
+ i(Y, {
729
813
  label: e(f)("connect.store.setting.company.address.country"),
730
- modelValue: e(n).company.address.country,
731
- "onUpdate:modelValue": l[12] || (l[12] = (s) => e(n).company.address.country = s),
814
+ modelValue: e(o).company.address.country,
815
+ "onUpdate:modelValue": a[12] || (a[12] = (s) => e(o).company.address.country = s),
732
816
  items: [
733
817
  {
734
- label: e(B.Config).getCountry().name,
735
- value: e(B.Config).getCountry().name
818
+ label: e(N.Config).getCountry().name,
819
+ value: e(N.Config).getCountry().name
736
820
  }
737
821
  ],
738
822
  rules: [e(Z).ruleAtPath(e(u), "company.address.country")]
739
823
  }, null, 8, ["label", "modelValue", "items", "rules"])
740
824
  ]),
741
- x("div", Wt, [
742
- x("div", zt, L(e(f)("connect.store.setting.stripe.title")), 1),
743
- r(Ot, {
744
- "model-value": (le = e(n)) == null ? void 0 : le.stripe,
745
- "onUpdate:modelValue": l[13] || (l[13] = (s) => e(n).stripe = s)
825
+ x("div", Yt, [
826
+ x("div", Wt, L(e(f)("connect.store.setting.stripe.title")), 1),
827
+ i(At, {
828
+ "model-value": (ae = e(o)) == null ? void 0 : ae.stripe,
829
+ "onUpdate:modelValue": a[13] || (a[13] = (s) => e(o).stripe = s)
746
830
  }, null, 8, ["model-value"])
747
831
  ])
748
- ])) : A("", !0)
832
+ ])) : M("", !0)
749
833
  ];
750
834
  }),
751
835
  _: 1
@@ -754,7 +838,7 @@ const Bt = { class: "space-y-8" }, Nt = {
754
838
  }
755
839
  });
756
840
  function Gt(v, _ = !0) {
757
- return B.DineroFactory(v).toFormat(_);
841
+ return N.DineroFactory(v).toFormat(_);
758
842
  }
759
843
  const Xt = /* @__PURE__ */ ee({
760
844
  __name: "TaxVariantSetting",
@@ -767,70 +851,70 @@ const Xt = /* @__PURE__ */ ee({
767
851
  },
768
852
  emits: ["update:modelValue"],
769
853
  setup(v, { emit: _ }) {
770
- const a = v, f = _;
854
+ const l = v, f = _;
771
855
  fe(() => {
772
- if (n.value.length !== b.value.length) {
856
+ if (o.value.length !== b.value.length) {
773
857
  const t = b.value.reduce((c, y) => {
774
- const d = oe.systemDefaultCode(y.name);
858
+ const d = ne.systemDefaultCode(y.name);
775
859
  if (!d) return c;
776
- const { systemCode: S, taxCode: l } = d;
777
- return y.value || c.push({ systemCode: S, taxCode: l }), c;
860
+ const { systemCode: V, taxCode: a } = d;
861
+ return y.value || c.push({ systemCode: V, taxCode: a }), c;
778
862
  }, []);
779
863
  u(t);
780
864
  }
781
865
  });
782
- function i() {
783
- return oe.groupedTaxOptions();
866
+ function r() {
867
+ return ne.groupedTaxOptions();
784
868
  }
785
- const b = j(() => i().map((t) => ({
869
+ const b = j(() => r().map((t) => ({
786
870
  name: t.code,
787
- value: (n.value || []).find(
871
+ value: (o.value || []).find(
788
872
  (c) => t.options.some((y) => y.feedmeTaxCode === c)
789
873
  ),
790
874
  options: t.options.map((c) => ({
791
875
  label: `${c.name} (${it(c.rate)}%)`,
792
876
  value: c.feedmeTaxCode
793
877
  }))
794
- }))), n = j(() => a.modelValue.map((t) => oe.generateCode(t)));
878
+ }))), o = j(() => l.modelValue.map((t) => ne.generateCode(t)));
795
879
  function m(t) {
796
- const c = i().find(
797
- (l) => l.options.some((F) => F.feedmeTaxCode === t)
798
- ), y = c == null ? void 0 : c.options.find((l) => l.feedmeTaxCode === t);
880
+ const c = r().find(
881
+ (a) => a.options.some((S) => S.feedmeTaxCode === t)
882
+ ), y = c == null ? void 0 : c.options.find((a) => a.feedmeTaxCode === t);
799
883
  if (!y) return;
800
- const { systemCode: d, taxCode: S } = y;
801
- u([{ systemCode: d, taxCode: S }]);
884
+ const { systemCode: d, taxCode: V } = y;
885
+ u([{ systemCode: d, taxCode: V }]);
802
886
  }
803
887
  function u(t) {
804
- const c = ue.clone(a.modelValue);
888
+ const c = ue.clone(l.modelValue);
805
889
  t.forEach((y) => {
806
- const d = i().find(
807
- (F) => F.options.some((w) => w.feedmeTaxCode === oe.generateCode(y))
808
- ), S = (d == null ? void 0 : d.options) || [], l = c.findIndex(
809
- (F) => S.some((w) => oe.generateCode(w) === oe.generateCode(F))
890
+ const d = r().find(
891
+ (S) => S.options.some((w) => w.feedmeTaxCode === ne.generateCode(y))
892
+ ), V = (d == null ? void 0 : d.options) || [], a = c.findIndex(
893
+ (S) => V.some((w) => ne.generateCode(w) === ne.generateCode(S))
810
894
  );
811
- l >= 0 ? c.splice(l, 1, y) : c.push(y);
895
+ a >= 0 ? c.splice(a, 1, y) : c.push(y);
812
896
  }), f("update:modelValue", c);
813
897
  }
814
898
  return (t, c) => {
815
899
  const y = h("FmRadio"), d = h("FmRadioGroup");
816
- return g(!0), D(X, null, re(e(b), (S) => (g(), D("div", {
817
- key: S.name,
900
+ return g(!0), B(X, null, re(e(b), (V) => (g(), B("div", {
901
+ key: V.name,
818
902
  class: "flex items-start"
819
903
  }, [
820
- r(d, {
821
- modelValue: S.value,
904
+ i(d, {
905
+ modelValue: V.value,
822
906
  "onUpdate:modelValue": [
823
- (l) => S.value = l,
824
- c[0] || (c[0] = (l) => {
825
- m(l);
907
+ (a) => V.value = a,
908
+ c[0] || (c[0] = (a) => {
909
+ m(a);
826
910
  })
827
911
  ]
828
912
  }, {
829
913
  default: T(() => [
830
- (g(!0), D(X, null, re(S.options, (l, F) => (g(), I(y, {
831
- key: F,
832
- value: l.value,
833
- label: l.label
914
+ (g(!0), B(X, null, re(V.options, (a, S) => (g(), I(y, {
915
+ key: S,
916
+ value: a.value,
917
+ label: a.label
834
918
  }, null, 8, ["value", "label"]))), 128))
835
919
  ]),
836
920
  _: 2
@@ -838,13 +922,13 @@ const Xt = /* @__PURE__ */ ee({
838
922
  ]))), 128);
839
923
  };
840
924
  }
841
- }), Se = {
925
+ }), Ve = {
842
926
  get _id() {
843
927
  return (/* @__PURE__ */ new Date()).toISOString();
844
928
  },
845
929
  name: "",
846
- price: B.Dinero.zero().toObject(),
847
- originalPrice: B.Dinero.zero().toObject(),
930
+ price: N.Dinero.zero().toObject(),
931
+ originalPrice: N.Dinero.zero().toObject(),
848
932
  vouchers: [],
849
933
  credit: {
850
934
  normal: 0,
@@ -864,18 +948,18 @@ const Xt = /* @__PURE__ */ ee({
864
948
  }, Zt = {
865
949
  key: 0,
866
950
  class: "space-y-24 pr-12"
867
- }, Qt = { class: "space-y-8" }, eo = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, to = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, oo = /* @__PURE__ */ x("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1), no = /* @__PURE__ */ x("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1), lo = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, so = { class: "space-y-8" }, ro = { class: "flex items-center justify-between" }, io = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, uo = { class: "space-y-8" }, co = { class: "flex items-center gap-8" }, mo = /* @__PURE__ */ ee({
951
+ }, Qt = { class: "space-y-8" }, en = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, tn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, nn = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, on = /* @__PURE__ */ x("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1), an = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, ln = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, sn = { class: "space-y-8" }, rn = { class: "flex items-center justify-between" }, dn = { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, un = { class: "space-y-8" }, cn = { class: "flex items-center gap-8" }, mn = /* @__PURE__ */ ee({
868
952
  __name: "EditBundleSheet",
869
953
  emits: ["update"],
870
- setup(v, { expose: _, emit: a }) {
871
- const f = a, { t: i } = be(), b = $e(), n = R(!1), m = R([]), u = R({
954
+ setup(v, { expose: _, emit: l }) {
955
+ const f = l, { t: r } = be(), b = ke(), o = R(!1), m = R([]), u = R({
872
956
  category: 0,
873
957
  index: -1,
874
958
  originalCategoryIndex: void 0
875
- }), t = R(ue.cloneDeep(Se)), c = R(), y = Oe, d = j(() => {
959
+ }), t = R(ue.cloneDeep(Ve)), c = R(), y = Ae, d = j(() => {
876
960
  const p = y.safeParse(t.value);
877
961
  return p.success ? [] : p.error.errors;
878
- }), S = [
962
+ }), V = [
879
963
  {
880
964
  header: "Reward title",
881
965
  accessorFn: (p) => p.collectible.name,
@@ -894,229 +978,233 @@ const Xt = /* @__PURE__ */ ee({
894
978
  accessorFn: (p) => p.description,
895
979
  cell(p) {
896
980
  var C;
897
- const o = p.row.original;
898
- return o.collectible.type == "VOUCHER" || o.selectedReward == null ? o.description : Ke(ze.FmStepperField, {
899
- "onUpdate:modelValue": (k) => {
981
+ const n = p.row.original;
982
+ return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : qe(We.FmStepperField, {
983
+ "onUpdate:modelValue": (P) => {
900
984
  t.value.titles = t.value.titles.map(
901
- (E) => E.id == o.collectible._id ? { ...E, dayToExpire: k } : E
985
+ (E) => E.id == n.collectible._id ? { ...E, dayToExpire: P } : E
902
986
  );
903
987
  },
904
- modelValue: ((C = o.selectedReward) == null ? void 0 : C.extra) ?? 0,
988
+ modelValue: ((C = n.selectedReward) == null ? void 0 : C.extra) ?? 0,
905
989
  appendText: "day(s)",
906
990
  helperState: J(d.value, "titles"),
907
991
  helperText: G(d.value, "titles"),
908
992
  max: 9999,
909
- rules: [(k) => k <= 9999 || "Maximum 9999 days allowed"],
993
+ rules: [(P) => P <= 9999 || "Maximum 9999 days allowed"],
910
994
  showSteppers: !1,
911
995
  disabled: !!t.value.stripePriceId
912
996
  });
913
997
  }
914
998
  }
915
- ], l = R([]), F = j(() => b.bundleRewards.map((p) => {
916
- const o = w.value.find((k) => k.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${dt(p.options.validityOption || {})}` : "No expiry";
999
+ ], a = R([]), S = j(() => b.bundleRewards.map((p) => {
1000
+ const n = w.value.find((P) => P.id == p._id), C = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${dt(
1001
+ p.options.validityOption || {}
1002
+ )}` : "No expiry";
917
1003
  return {
918
1004
  collectible: p,
919
1005
  description: C,
920
- selectedReward: o
1006
+ selectedReward: n
921
1007
  };
922
1008
  })), w = j(() => {
923
- var p, o;
1009
+ var p, n;
924
1010
  return [
925
1011
  ...((p = t.value) == null ? void 0 : p.titles.map((C) => ({
926
1012
  id: C.id,
927
1013
  extra: C.dayToExpire
928
1014
  }))) ?? [],
929
- ...((o = t.value) == null ? void 0 : o.vouchers.map((C) => ({
1015
+ ...((n = t.value) == null ? void 0 : n.vouchers.map((C) => ({
930
1016
  id: C,
931
1017
  extra: void 0
932
1018
  }))) ?? []
933
1019
  ];
934
- }), N = j(
1020
+ }), D = j(
935
1021
  () => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
936
1022
  );
937
- function W(p) {
1023
+ function Y(p) {
938
1024
  t.value.subscriptionValidity = p;
939
- for (const o of t.value.titles)
940
- o.dayToExpire = p;
1025
+ for (const n of t.value.titles)
1026
+ n.dayToExpire = p;
941
1027
  t.value.credit.free && (t.value.credit.free.day = p);
942
1028
  }
943
- function Y() {
944
- const p = F.value, o = t.value;
945
- if (!(!o || !p))
1029
+ function z() {
1030
+ const p = S.value, n = t.value;
1031
+ if (!(!n || !p))
946
1032
  for (let C = 0; C < p.length; C++) {
947
- const k = p[C];
948
- H.value[C] ? k.collectible.type == "TITLE" ? o.titles.findIndex(
949
- (q) => q.id == k.collectible._id
950
- ) < 0 && o.titles.push({
951
- id: k.collectible._id,
952
- dayToExpire: N.value
953
- }) : o.vouchers.findIndex(
954
- (q) => q == k.collectible._id
955
- ) < 0 && o.vouchers.push(k.collectible._id) : (o.titles = o.titles.filter((K) => K.id != k.collectible._id), o.vouchers = o.vouchers.filter(
956
- (K) => K != k.collectible._id
1033
+ const P = p[C];
1034
+ K.value[C] ? P.collectible.type == "TITLE" ? n.titles.findIndex(
1035
+ (H) => H.id == P.collectible._id
1036
+ ) < 0 && n.titles.push({
1037
+ id: P.collectible._id,
1038
+ dayToExpire: D.value
1039
+ }) : n.vouchers.findIndex(
1040
+ (H) => H == P.collectible._id
1041
+ ) < 0 && n.vouchers.push(P.collectible._id) : (n.titles = n.titles.filter((q) => q.id != P.collectible._id), n.vouchers = n.vouchers.filter(
1042
+ (q) => q != P.collectible._id
957
1043
  ));
958
1044
  }
959
1045
  }
960
- const H = R({});
961
- we(H, Y, { deep: !0 });
962
- const z = j(() => {
963
- var p, o;
964
- return (o = (p = b.storeOption) == null ? void 0 : p.company) == null ? void 0 : o.sstRegNo;
965
- }), le = j(() => {
966
- var p, o, C;
967
- return (C = (o = (p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) == null ? void 0 : o[0]) != null && C.inclusive ? "Inclusive" : "Exclusive";
1046
+ const K = R({});
1047
+ we(K, z, { deep: !0 });
1048
+ const W = j(() => {
1049
+ var p, n;
1050
+ return (n = (p = b.storeOption) == null ? void 0 : p.company) == null ? void 0 : n.sstRegNo;
1051
+ }), ae = j(() => {
1052
+ var p, n, C;
1053
+ return (C = (n = (p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) == null ? void 0 : n[0]) != null && C.inclusive ? "Inclusive" : "Exclusive";
968
1054
  }), s = j(() => {
969
- var p, o, C;
1055
+ var p, n, C;
970
1056
  return mt(
971
- oe.fullTax,
972
- qe(t.value.taxes),
1057
+ ne.fullTax,
1058
+ He(t.value.taxes),
973
1059
  t.value.price,
974
1060
  Number(t.value.credit.normal),
975
1061
  ((p = b.storeOption) == null ? void 0 : p.inclusiveTaxes) ?? [],
976
- (C = (o = b.storeOption) == null ? void 0 : o.company) != null && C.sstRegNo ? oe.taxSystem.map((k) => k.code) : []
1062
+ (C = (n = b.storeOption) == null ? void 0 : n.company) != null && C.sstRegNo ? ne.taxSystem.map((P) => P.code) : []
977
1063
  );
978
- }), $ = j(() => s.value.reduce(
979
- (o, C) => o.add(C.total),
1064
+ }), k = j(() => s.value.reduce(
1065
+ (n, C) => n.add(C.total),
980
1066
  rt()
981
1067
  ).toFormat()), U = j(() => {
982
- var k;
1068
+ var P;
983
1069
  const p = pt(
984
1070
  s.value,
985
1071
  t.value.price,
986
- ((k = b.storeOption) == null ? void 0 : k.inclusiveTaxes) ?? []
1072
+ ((P = b.storeOption) == null ? void 0 : P.inclusiveTaxes) ?? []
987
1073
  );
988
1074
  t.value.priceWithTaxes = p;
989
- const o = Gt(p, !1), C = Number(o.replace(/[^\d.-]/g, ""));
1075
+ const n = Gt(p, !1), C = Number(n.replace(/[^\d.-]/g, ""));
990
1076
  return Number.isNaN(C) ? 0 : C;
991
1077
  });
992
- function M() {
993
- t.value.taxTotals = s.value, f("update", Oe.parse(Xe(t.value)));
1078
+ function O() {
1079
+ t.value.taxTotals = s.value, f("update", Ae.parse(Xe(t.value)));
994
1080
  }
995
- function P() {
996
- return ue.cloneDeep(Se);
1081
+ function $() {
1082
+ return ue.cloneDeep(Ve);
997
1083
  }
998
- function O(p, o) {
999
- n.value = p, p && o && (c.value = void 0, m.value = o.categories, t.value = o.bundle || P(), u.value.category = o.category, u.value.index = o.index, u.value.originalCategoryIndex = o.category, H.value = F.value.reduce((C, k, E) => (C[E] = !!k.selectedReward, C), {}));
1084
+ function A(p, n) {
1085
+ o.value = p, p && n && (c.value = void 0, m.value = n.categories, t.value = n.bundle || $(), u.value.category = n.category, u.value.index = n.index, u.value.originalCategoryIndex = n.category, K.value = S.value.reduce((C, P, E) => (C[E] = !!P.selectedReward, C), {}));
1000
1086
  }
1001
1087
  return _({
1002
- showSheet: O,
1088
+ showSheet: A,
1003
1089
  bundleImage: c,
1004
1090
  target: u,
1005
1091
  data: t
1006
- }), (p, o) => {
1007
- const C = h("FmSwitch"), k = h("FmHelperText"), E = h("FmTextField"), K = h("FmSelect"), q = h("FmStepperField"), ie = h("FmMenuItem"), ge = h("FmTable"), ce = h("FmButton"), ve = h("FmSideSheet");
1092
+ }), (p, n) => {
1093
+ const C = h("FmSwitch"), P = h("FmHelperText"), E = h("FmTextField"), q = h("FmSelect"), H = h("FmStepperField"), ie = h("FmMenuItem"), ge = h("FmTable"), ce = h("FmButton"), ve = h("FmSideSheet");
1008
1094
  return g(), I(ve, {
1009
1095
  "max-width": 768,
1010
- modelValue: e(n),
1011
- "onUpdate:modelValue": o[20] || (o[20] = (ae) => ne(n) ? n.value = ae : null),
1012
- header: e(u).index != -1 ? e(i)("connect.store.bundle.edit.title") : e(i)("connect.store.bundle.edit.create")
1096
+ modelValue: e(o),
1097
+ "onUpdate:modelValue": n[20] || (n[20] = (le) => oe(o) ? o.value = le : null),
1098
+ header: e(u).index != -1 ? e(r)("connect.store.bundle.edit.title") : e(r)("connect.store.bundle.edit.create")
1013
1099
  }, {
1014
1100
  "side-sheet-footer": T(() => [
1015
- x("div", co, [
1016
- r(ce, {
1101
+ x("div", cn, [
1102
+ i(ce, {
1017
1103
  label: e(u).index != -1 ? "Save" : "Add",
1018
- onClick: M,
1104
+ onClick: O,
1019
1105
  disabled: e(d).length > 0,
1020
- loading: e(xe)().isLoading
1106
+ loading: e(Se)().isLoading
1021
1107
  }, null, 8, ["label", "disabled", "loading"]),
1022
- r(ce, {
1108
+ i(ce, {
1023
1109
  label: "Cancel",
1024
- onClick: o[19] || (o[19] = (ae) => O(!1)),
1110
+ onClick: n[19] || (n[19] = (le) => A(!1)),
1025
1111
  variant: "tertiary"
1026
1112
  })
1027
1113
  ])
1028
1114
  ]),
1029
1115
  default: T(() => {
1030
- var ae, Pe, Te, Ue, Re, Ie, De, Be;
1116
+ var le, $e, Te, Ue, Re, Ie, Be, Ne;
1031
1117
  return [
1032
- r(ke, { json: e(t) }, null, 8, ["json"]),
1033
- e(t) ? (g(), D("div", Zt, [
1118
+ i(Pe, { json: e(t) }, null, 8, ["json"]),
1119
+ e(t) ? (g(), B("div", Zt, [
1034
1120
  x("div", Qt, [
1035
- e(B.Config).getCountry().code == "MY" && ((ae = e(b).payoutAccount) == null ? void 0 : ae.status) == "APPROVED" && ((Pe = e(b).payoutAccount) != null && Pe.enable) ? (g(), I(C, {
1121
+ e(N.Config).getCountry().code == "MY" && ((le = e(b).payoutAccount) == null ? void 0 : le.status) == "APPROVED" && (($e = e(b).payoutAccount) != null && $e.enable) ? (g(), I(C, {
1036
1122
  key: 0,
1037
- "onUpdate:modelValue": o[0] || (o[0] = (V) => {
1038
- e(t).isFeedvibe = V, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], H.value = {});
1123
+ "onUpdate:modelValue": n[0] || (n[0] = (F) => {
1124
+ e(t).isFeedvibe = F, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], K.value = {});
1039
1125
  }),
1040
1126
  "label-placement": "right",
1041
1127
  "model-value": e(t).isFeedvibe || !1,
1042
1128
  label: "Feedvibe Campaign",
1043
1129
  sublabel: "Bundle will be appear for Feedvibe campaign use"
1044
- }, null, 8, ["model-value"])) : A("", !0),
1045
- e(t).isFeedvibe ? (g(), I(k, {
1130
+ }, null, 8, ["model-value"])) : M("", !0),
1131
+ e(t).isFeedvibe ? (g(), I(P, {
1046
1132
  key: 1,
1047
1133
  text: "There will be a 15% charge for FeedVibe bundles sold in the FeedVibe app",
1048
1134
  state: "warning"
1049
- })) : A("", !0)
1135
+ })) : M("", !0)
1050
1136
  ]),
1051
- x("div", eo, L(e(i)("connect.store.bundle.edit.basicInformation")), 1),
1052
- r(E, {
1053
- label: e(i)("connect.store.bundle.edit.bundleName"),
1137
+ x("div", en, L(e(r)("connect.store.bundle.edit.basicInformation")), 1),
1138
+ i(E, {
1139
+ label: e(r)("connect.store.bundle.edit.bundleName"),
1054
1140
  modelValue: e(t).name,
1055
- "onUpdate:modelValue": o[1] || (o[1] = (V) => e(t).name = V),
1141
+ "onUpdate:modelValue": n[1] || (n[1] = (F) => e(t).name = F),
1056
1142
  "helper-state": e(J)(e(d), "name"),
1057
1143
  "helper-text": e(G)(e(d), "name")
1058
1144
  }, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
1059
- r(K, {
1145
+ i(q, {
1060
1146
  modelValue: e(u).category,
1061
- "onUpdate:modelValue": o[2] || (o[2] = (V) => e(u).category = V),
1147
+ "onUpdate:modelValue": n[2] || (n[2] = (F) => e(u).category = F),
1062
1148
  label: "Store Category",
1063
- items: e(m).map((V, Le) => ({ label: V, value: Le }))
1149
+ items: e(m).map((F, Le) => ({ label: F, value: Le }))
1064
1150
  }, null, 8, ["modelValue", "items"]),
1065
- r(lt, {
1066
- label: e(i)("connect.store.bundle.edit.bundleImage"),
1151
+ i(at, {
1152
+ label: e(r)("connect.store.bundle.edit.bundleImage"),
1067
1153
  class: "w-1/2 xs:w-2/3",
1068
1154
  "aspect-ratio": "16/9",
1069
1155
  thumbnail: e(t).image ?? void 0,
1070
1156
  file: e(c) ?? void 0,
1071
- "onUpdate:file": o[3] || (o[3] = (V) => {
1072
- c.value = V;
1157
+ "onUpdate:file": n[3] || (n[3] = (F) => {
1158
+ c.value = F;
1073
1159
  }),
1074
1160
  "helper-state": e(J)(e(d), "image"),
1075
1161
  "helper-text": e(G)(e(d), "image")
1076
1162
  }, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
1077
- r(q, {
1078
- "model-value": e(B.Dinero).fromFdoDinero(e(t).price).toUnit(),
1079
- label: e(i)("connect.store.bundle.edit.bundlePrice"),
1163
+ i(H, {
1164
+ "model-value": e(N.Dinero).fromFdoDinero(e(t).price).toUnit(),
1165
+ label: e(r)("connect.store.bundle.edit.bundlePrice"),
1080
1166
  min: 0,
1081
1167
  "max-fraction-digits": 2,
1082
- "onUpdate:modelValue": o[4] || (o[4] = (V) => {
1083
- e(t).price.amount = V * 10 ** e(t).price.precision;
1168
+ "onUpdate:modelValue": n[4] || (n[4] = (F) => {
1169
+ e(t).price.amount = F * 10 ** e(t).price.precision;
1084
1170
  }),
1085
1171
  "is-currency": !0,
1086
1172
  "show-steppers": !1,
1087
- "helper-text": e(G)(e(d), "price") || `${e(B.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e(B.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
1173
+ "helper-text": e(G)(e(d), "price") || `${e(N.Dinero).fromNumber({ number: 1 }).toFormat(
1174
+ !0
1175
+ )} = ${e(N.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
1088
1176
  "helper-state": e(J)(e(d), "price")
1089
1177
  }, {
1090
1178
  prepend: T(() => [
1091
- de(L(e(B.Dinero).defaultCurrency()), 1)
1179
+ de(L(e(N.Dinero).defaultCurrency()), 1)
1092
1180
  ]),
1093
1181
  _: 1
1094
1182
  }, 8, ["model-value", "label", "helper-text", "helper-state"]),
1095
- r(q, {
1096
- "model-value": e(B.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
1097
- label: e(i)("connect.store.bundle.edit.bundleValue"),
1183
+ i(H, {
1184
+ "model-value": e(N.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
1185
+ label: e(r)("connect.store.bundle.edit.bundleValue"),
1098
1186
  min: 0,
1099
1187
  "max-fraction-digits": 2,
1100
- "onUpdate:modelValue": o[5] || (o[5] = (V) => {
1101
- e(t).originalPrice || (e(t).originalPrice = e(B.Dinero).zero().toObject()), e(t).originalPrice.amount = V * 10 ** e(t).originalPrice.precision;
1188
+ "onUpdate:modelValue": n[5] || (n[5] = (F) => {
1189
+ e(t).originalPrice || (e(t).originalPrice = e(N.Dinero).zero().toObject()), e(t).originalPrice.amount = F * 10 ** e(t).originalPrice.precision;
1102
1190
  }),
1103
1191
  "is-currency": !0,
1104
1192
  "show-steppers": !1,
1105
- "helper-text": e(G)(e(d), "originalPrice") || e(i)("connect.store.bundle.edit.originalPriceHelper"),
1193
+ "helper-text": e(G)(e(d), "originalPrice") || e(r)("connect.store.bundle.edit.originalPriceHelper"),
1106
1194
  "helper-state": e(J)(e(d), "originalPrice")
1107
1195
  }, {
1108
1196
  prepend: T(() => [
1109
- de(L(e(B.Dinero).defaultCurrency()), 1)
1197
+ de(L(e(N.Dinero).defaultCurrency()), 1)
1110
1198
  ]),
1111
1199
  _: 1
1112
1200
  }, 8, ["model-value", "label", "helper-text", "helper-state"]),
1113
- e(t).isFeedvibe ? A("", !0) : (g(), I(q, {
1201
+ e(t).isFeedvibe ? M("", !0) : (g(), I(H, {
1114
1202
  key: 0,
1115
1203
  "model-value": e(t).coinPrice ?? null,
1116
- label: e(i)("connect.store.bundle.edit.pointNeeded"),
1204
+ label: e(r)("connect.store.bundle.edit.pointNeeded"),
1117
1205
  min: 0,
1118
- "onUpdate:modelValue": o[6] || (o[6] = (V) => {
1119
- V > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = V;
1206
+ "onUpdate:modelValue": n[6] || (n[6] = (F) => {
1207
+ F > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = F;
1120
1208
  }),
1121
1209
  "show-steppers": !1,
1122
1210
  "helper-state": e(J)(e(d), "coinPrice"),
@@ -1127,32 +1215,32 @@ const Xt = /* @__PURE__ */ ee({
1127
1215
  ]),
1128
1216
  _: 1
1129
1217
  }, 8, ["model-value", "label", "helper-state", "helper-text"])),
1130
- (Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(), D(X, { key: 1 }, [
1131
- x("div", to, L(e(i)("connect.store.bundle.edit.subscriptionSettings")), 1),
1132
- r(E, {
1133
- label: e(i)("connect.store.bundle.edit.stripePriceId"),
1218
+ (Te = e(b).storeOption) != null && Te.stripe && !e(t).isFeedvibe ? (g(), B(X, { key: 1 }, [
1219
+ x("div", tn, L(e(r)("connect.store.bundle.edit.subscriptionSettings")), 1),
1220
+ i(E, {
1221
+ label: e(r)("connect.store.bundle.edit.stripePriceId"),
1134
1222
  modelValue: e(t).stripePriceId,
1135
- "onUpdate:modelValue": o[7] || (o[7] = (V) => e(t).stripePriceId = V),
1223
+ "onUpdate:modelValue": n[7] || (n[7] = (F) => e(t).stripePriceId = F),
1136
1224
  "helper-state": e(J)(e(d), "stripePriceId"),
1137
1225
  "helper-text": e(G)(e(d), "stripePriceId")
1138
1226
  }, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
1139
- e(t).stripePriceId ? (g(), I(q, {
1227
+ e(t).stripePriceId ? (g(), I(H, {
1140
1228
  key: 0,
1141
1229
  "model-value": e(t).subscriptionValidity ?? null,
1142
1230
  min: 1,
1143
- "onUpdate:modelValue": W,
1144
- label: e(i)("connect.store.bundle.edit.subscriptionValidity"),
1231
+ "onUpdate:modelValue": Y,
1232
+ label: e(r)("connect.store.bundle.edit.subscriptionValidity"),
1145
1233
  "show-steppers": !1,
1146
1234
  "helper-state": e(J)(e(d), "subscriptionValidity"),
1147
1235
  "helper-text": e(G)(e(d), "subscriptionValidity")
1148
- }, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : A("", !0)
1149
- ], 64)) : A("", !0),
1150
- e(t).isFeedvibe ? A("", !0) : (g(), D(X, { key: 2 }, [
1151
- oo,
1152
- r(q, {
1236
+ }, null, 8, ["model-value", "label", "helper-state", "helper-text"])) : M("", !0)
1237
+ ], 64)) : M("", !0),
1238
+ e(t).isFeedvibe ? M("", !0) : (g(), B(X, { key: 2 }, [
1239
+ x("div", nn, L(e(r)("connect.store.bundle.edit.credit")), 1),
1240
+ i(H, {
1153
1241
  modelValue: e(t).credit.normal,
1154
- "onUpdate:modelValue": o[8] || (o[8] = (V) => e(t).credit.normal = V),
1155
- label: "Normal credit",
1242
+ "onUpdate:modelValue": n[8] || (n[8] = (F) => e(t).credit.normal = F),
1243
+ label: e(r)("connect.store.bundle.edit.normalCredit"),
1156
1244
  "show-steppers": !1,
1157
1245
  "helper-state": e(J)(e(d), "credit.normal"),
1158
1246
  "helper-text": e(G)(e(d), "credit.normal")
@@ -1161,17 +1249,17 @@ const Xt = /* @__PURE__ */ ee({
1161
1249
  de(" credit ")
1162
1250
  ]),
1163
1251
  _: 1
1164
- }, 8, ["modelValue", "helper-state", "helper-text"]),
1165
- r(q, {
1252
+ }, 8, ["modelValue", "label", "helper-state", "helper-text"]),
1253
+ i(H, {
1166
1254
  "model-value": ((Ue = e(t).credit.free) == null ? void 0 : Ue.amount) ?? null,
1167
1255
  min: 0,
1168
- "onUpdate:modelValue": o[9] || (o[9] = (V) => {
1256
+ "onUpdate:modelValue": n[9] || (n[9] = (F) => {
1169
1257
  e(t).credit.free || (e(t).credit.free = {
1170
1258
  amount: 0,
1171
1259
  day: 1
1172
- }), e(t).credit.free.amount = V;
1260
+ }), e(t).credit.free.amount = F;
1173
1261
  }),
1174
- label: "Free credit",
1262
+ label: e(r)("connect.store.bundle.edit.freeCredit"),
1175
1263
  "show-steppers": !1,
1176
1264
  "helper-state": e(J)(e(d), "credit.free.amount"),
1177
1265
  "helper-text": e(G)(e(d), "credit.free.amount")
@@ -1180,17 +1268,17 @@ const Xt = /* @__PURE__ */ ee({
1180
1268
  de(" credit ")
1181
1269
  ]),
1182
1270
  _: 1
1183
- }, 8, ["model-value", "helper-state", "helper-text"]),
1184
- (Re = e(t).credit.free) != null && Re.amount ? (g(), I(q, {
1271
+ }, 8, ["model-value", "label", "helper-state", "helper-text"]),
1272
+ (Re = e(t).credit.free) != null && Re.amount ? (g(), I(H, {
1185
1273
  key: 0,
1186
1274
  disabled: !!e(t).stripePriceId,
1187
1275
  "model-value": ((Ie = e(t).credit.free) == null ? void 0 : Ie.day) ?? null,
1188
1276
  min: 0,
1189
- "onUpdate:modelValue": o[10] || (o[10] = (V) => {
1277
+ "onUpdate:modelValue": n[10] || (n[10] = (F) => {
1190
1278
  e(t).credit.free || (e(t).credit.free = {
1191
1279
  amount: 0,
1192
1280
  day: 1
1193
- }), e(t).credit.free.day = e(N) || V;
1281
+ }), e(t).credit.free.day = e(D) || F;
1194
1282
  }),
1195
1283
  label: "Free credit valid for",
1196
1284
  "show-steppers": !1,
@@ -1201,39 +1289,39 @@ const Xt = /* @__PURE__ */ ee({
1201
1289
  de(" day(s) ")
1202
1290
  ]),
1203
1291
  _: 1
1204
- }, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : A("", !0)
1292
+ }, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : M("", !0)
1205
1293
  ], 64)),
1206
- e(z) ? (g(), D(X, { key: 3 }, [
1207
- no,
1208
- r(Xt, {
1294
+ e(W) ? (g(), B(X, { key: 3 }, [
1295
+ on,
1296
+ i(Xt, {
1209
1297
  modelValue: e(t).taxes,
1210
- "onUpdate:modelValue": o[11] || (o[11] = (V) => e(t).taxes = V)
1298
+ "onUpdate:modelValue": n[11] || (n[11] = (F) => e(t).taxes = F)
1211
1299
  }, null, 8, ["modelValue"]),
1212
- r(E, {
1213
- label: `Tax Charged (${e(le)})`,
1214
- "model-value": e($),
1300
+ i(E, {
1301
+ label: `Tax Charged (${e(ae)})`,
1302
+ "model-value": e(k),
1215
1303
  disabled: ""
1216
1304
  }, null, 8, ["label", "model-value"])
1217
- ], 64)) : A("", !0),
1218
- r(q, {
1305
+ ], 64)) : M("", !0),
1306
+ i(H, {
1219
1307
  label: "Total Price",
1220
1308
  "model-value": e(U),
1221
1309
  disabled: !0
1222
1310
  }, null, 8, ["model-value"]),
1223
- x("div", lo, L(e(i)("connect.store.bundle.edit.bundleReward.title")), 1),
1224
- x("div", ao, L(e(i)("connect.store.bundle.edit.bundleReward.description")), 1),
1225
- x("div", so, [
1226
- x("div", ro, [
1227
- r(at, {
1228
- label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
1311
+ x("div", an, L(e(r)("connect.store.bundle.edit.bundleReward.title")), 1),
1312
+ x("div", ln, L(e(r)("connect.store.bundle.edit.bundleReward.description")), 1),
1313
+ x("div", sn, [
1314
+ x("div", rn, [
1315
+ i(lt, {
1316
+ label: `Reward type: ${e(a).length == 0 ? "All" : e(a)[0].name}`
1229
1317
  }, {
1230
1318
  default: T(() => [
1231
- r(ie, {
1232
- onClick: o[12] || (o[12] = (V) => l.value = []),
1319
+ i(ie, {
1320
+ onClick: n[12] || (n[12] = (F) => a.value = []),
1233
1321
  label: "All"
1234
1322
  }),
1235
- r(ie, {
1236
- onClick: o[13] || (o[13] = (V) => l.value = [
1323
+ i(ie, {
1324
+ onClick: n[13] || (n[13] = (F) => a.value = [
1237
1325
  {
1238
1326
  id: "type",
1239
1327
  value: "VOUCHER",
@@ -1242,8 +1330,8 @@ const Xt = /* @__PURE__ */ ee({
1242
1330
  ]),
1243
1331
  label: e(me).VOUCHER.name
1244
1332
  }, null, 8, ["label"]),
1245
- r(ie, {
1246
- onClick: o[14] || (o[14] = (V) => l.value = [
1333
+ i(ie, {
1334
+ onClick: n[14] || (n[14] = (F) => a.value = [
1247
1335
  {
1248
1336
  id: "type",
1249
1337
  value: "TITLE",
@@ -1256,98 +1344,98 @@ const Xt = /* @__PURE__ */ ee({
1256
1344
  _: 1
1257
1345
  }, 8, ["label"])
1258
1346
  ]),
1259
- r(ge, {
1260
- modelValue: e(H),
1261
- "onUpdate:modelValue": o[15] || (o[15] = (V) => ne(H) ? H.value = V : null),
1347
+ i(ge, {
1348
+ modelValue: e(K),
1349
+ "onUpdate:modelValue": n[15] || (n[15] = (F) => oe(K) ? K.value = F : null),
1262
1350
  selection: "multiple",
1263
- "column-filter": e(l),
1264
- "column-defs": S,
1265
- "row-data": e(F).filter(
1266
- (V) => !e(t).isFeedvibe || V.collectible.type == "VOUCHER"
1351
+ "column-filter": e(a),
1352
+ "column-defs": V,
1353
+ "row-data": e(S).filter(
1354
+ (F) => !e(t).isFeedvibe || F.collectible.type == "VOUCHER"
1267
1355
  ),
1268
- "hide-footer": e(F).length <= 10
1356
+ "hide-footer": e(S).length <= 10
1269
1357
  }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
1270
- r(k, {
1358
+ i(P, {
1271
1359
  text: e(G)(e(d), "titles"),
1272
1360
  state: e(J)(e(d), "titles")
1273
1361
  }, null, 8, ["text", "state"])
1274
1362
  ]),
1275
- x("div", io, L(e(i)("connect.store.bundle.edit.advanceSetting")), 1),
1276
- x("div", uo, [
1277
- r(C, {
1363
+ x("div", dn, L(e(r)("connect.store.bundle.edit.advanceSetting")), 1),
1364
+ x("div", un, [
1365
+ i(C, {
1278
1366
  "model-value": e(t).internal ?? !1,
1279
- "onUpdate:modelValue": o[16] || (o[16] = (V) => e(t).internal = V),
1367
+ "onUpdate:modelValue": n[16] || (n[16] = (F) => e(t).internal = F),
1280
1368
  "label-placement": "right",
1281
- label: e(i)("connect.store.bundle.edit.internalBundle"),
1282
- sublabel: e(i)("connect.store.bundle.edit.internalBundleDescription")
1369
+ label: e(r)("connect.store.bundle.edit.internalBundle"),
1370
+ sublabel: e(r)("connect.store.bundle.edit.internalBundleDescription")
1283
1371
  }, null, 8, ["model-value", "label", "sublabel"]),
1284
- r(C, {
1372
+ i(C, {
1285
1373
  "model-value": e(t).hideInPos ?? !1,
1286
- "onUpdate:modelValue": o[17] || (o[17] = (V) => e(t).hideInPos = V),
1374
+ "onUpdate:modelValue": n[17] || (n[17] = (F) => e(t).hideInPos = F),
1287
1375
  "label-placement": "right",
1288
- label: e(i)("connect.store.bundle.edit.hideInPos"),
1289
- sublabel: e(i)("connect.store.bundle.edit.hideInPosDescription")
1376
+ label: e(r)("connect.store.bundle.edit.hideInPos"),
1377
+ sublabel: e(r)("connect.store.bundle.edit.hideInPosDescription")
1290
1378
  }, null, 8, ["model-value", "label", "sublabel"]),
1291
- r(q, {
1292
- "model-value": ((Be = (De = e(t).config) == null ? void 0 : De.options) == null ? void 0 : Be.maxPerUser) || null,
1293
- "onUpdate:modelValue": o[18] || (o[18] = (V) => e(ue).set(e(t), "config.options.maxPerUser", V)),
1294
- label: e(i)("connect.store.bundle.edit.maxPerUser"),
1379
+ i(H, {
1380
+ "model-value": ((Ne = (Be = e(t).config) == null ? void 0 : Be.options) == null ? void 0 : Ne.maxPerUser) || null,
1381
+ "onUpdate:modelValue": n[18] || (n[18] = (F) => e(ue).set(e(t), "config.options.maxPerUser", F)),
1382
+ label: e(r)("connect.store.bundle.edit.maxPerUser"),
1295
1383
  "show-steppers": !1,
1296
1384
  placeholder: "Unlimited"
1297
1385
  }, null, 8, ["model-value", "label"])
1298
1386
  ])
1299
- ])) : A("", !0)
1387
+ ])) : M("", !0)
1300
1388
  ];
1301
1389
  }),
1302
1390
  _: 1
1303
1391
  }, 8, ["modelValue", "header"]);
1304
1392
  };
1305
1393
  }
1306
- }), po = { class: "flex gap-8 items-center flex-wrap" }, yo = { class: "flex items-center gap-8" }, fo = /* @__PURE__ */ ee({
1394
+ }), pn = { class: "flex gap-8 items-center flex-wrap" }, yn = { class: "flex items-center gap-8" }, fn = /* @__PURE__ */ ee({
1307
1395
  __name: "SendBundleSheet",
1308
1396
  emits: ["success"],
1309
- setup(v, { expose: _, emit: a }) {
1310
- const { minor: f } = Ee, i = R(), b = R(""), n = R(""), m = R([]), u = R(!1), t = R();
1397
+ setup(v, { expose: _, emit: l }) {
1398
+ const { minor: f } = Ee, r = R(), b = R(""), o = R(""), m = R([]), u = R(!1), t = R();
1311
1399
  R(!0);
1312
- function c(F) {
1313
- u.value = !0, b.value = null, n.value = "", i.value = F.bundle;
1400
+ function c(S) {
1401
+ u.value = !0, b.value = null, o.value = "", r.value = S.bundle;
1314
1402
  }
1315
1403
  function y() {
1316
1404
  u.value = !1;
1317
1405
  }
1318
- async function d(F) {
1406
+ async function d(S) {
1319
1407
  const w = await ut.read({
1320
1408
  limit: 25,
1321
1409
  skip: 0,
1322
1410
  sortBy: "_id",
1323
- search: F,
1411
+ search: S,
1324
1412
  descending: !1
1325
1413
  });
1326
- m.value = w.resources.map((N) => ({
1327
- label: `${N.name} (${N.phoneNumber})`,
1328
- value: N._id
1329
- })), await new Promise((N) => setTimeout(N, 100));
1414
+ m.value = w.resources.map((D) => ({
1415
+ label: `${D.name} (${D.phoneNumber})`,
1416
+ value: D._id
1417
+ })), await new Promise((D) => setTimeout(D, 100));
1330
1418
  }
1331
- async function S() {
1332
- if (!i.value || !b.value) return;
1333
- const F = m.value.find(
1334
- (N) => N.value === b.value
1419
+ async function V() {
1420
+ if (!r.value || !b.value) return;
1421
+ const S = m.value.find(
1422
+ (D) => D.value === b.value
1335
1423
  );
1336
- await he.confirm(
1337
- `Are you sure you want to send bundle ${i.value.name} to ${F == null ? void 0 : F.label}?`,
1424
+ await xe.confirm(
1425
+ `Are you sure you want to send bundle ${r.value.name} to ${S == null ? void 0 : S.label}?`,
1338
1426
  "Confirm",
1339
1427
  "Confirm",
1340
1428
  "Cancel"
1341
1429
  ) && await f(
1342
1430
  async () => {
1343
- const N = {
1344
- bundle: i.value._id,
1431
+ const D = {
1432
+ bundle: r.value._id,
1345
1433
  member: b.value,
1346
- source: ot.enum.ADMIN,
1347
- ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${n.value}`,
1434
+ source: nt.enum.ADMIN,
1435
+ ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
1348
1436
  withCoin: !1
1349
1437
  };
1350
- await _e.sendBundle(N), y();
1438
+ await Ce.sendBundle(D), y();
1351
1439
  },
1352
1440
  {
1353
1441
  message: "Sending bundle",
@@ -1355,100 +1443,100 @@ const Xt = /* @__PURE__ */ ee({
1355
1443
  }
1356
1444
  );
1357
1445
  }
1358
- const l = j(() => {
1359
- var w, N, W;
1360
- const F = [];
1361
- return ((w = i.value) == null ? void 0 : w.price.amount) > 0 && F.push(
1362
- `${B.Config.getCountry().currency.symbol}${je((N = i.value) == null ? void 0 : N.price)}`
1363
- ), (W = i.value) != null && W.coinPrice && F.push(`${i.value.coinPrice} point(s)`), F.join(" or ");
1446
+ const a = j(() => {
1447
+ var w, D, Y;
1448
+ const S = [];
1449
+ return ((w = r.value) == null ? void 0 : w.price.amount) > 0 && S.push(
1450
+ `${N.Config.getCountry().currency.symbol}${je((D = r.value) == null ? void 0 : D.price)}`
1451
+ ), (Y = r.value) != null && Y.coinPrice && S.push(`${r.value.coinPrice} point(s)`), S.join(" or ");
1364
1452
  });
1365
1453
  return _({
1366
1454
  showSheet: c,
1367
1455
  hideSheet: y
1368
1456
  }), fe(async () => {
1369
1457
  await d("");
1370
- }), (F, w) => {
1371
- const N = h("FmCardMedia"), W = h("FmCardHeader"), Y = h("FmChip"), H = h("FmCardSection"), z = h("FmCard"), le = h("FmSelect"), s = h("FmTextField"), $ = h("FmForm"), U = h("FmButton"), M = h("FmSideSheet");
1372
- return g(), I(M, {
1458
+ }), (S, w) => {
1459
+ const D = h("FmCardMedia"), Y = h("FmCardHeader"), z = h("FmChip"), K = h("FmCardSection"), W = h("FmCard"), ae = h("FmSelect"), s = h("FmTextField"), k = h("FmForm"), U = h("FmButton"), O = h("FmSideSheet");
1460
+ return g(), I(O, {
1373
1461
  "max-width": 560,
1374
1462
  "dismiss-away": !0,
1375
1463
  header: "Send bundle to member",
1376
1464
  modelValue: e(u),
1377
1465
  "onUpdate:modelValue": [
1378
- w[4] || (w[4] = (P) => ne(u) ? u.value = P : null),
1379
- w[5] || (w[5] = (P) => u.value = P)
1466
+ w[4] || (w[4] = ($) => oe(u) ? u.value = $ : null),
1467
+ w[5] || (w[5] = ($) => u.value = $)
1380
1468
  ]
1381
1469
  }, {
1382
1470
  "side-sheet-footer": T(() => [
1383
- x("div", yo, [
1384
- r(U, {
1471
+ x("div", yn, [
1472
+ i(U, {
1385
1473
  label: "Send",
1386
- loading: e(xe)().isLoading,
1474
+ loading: e(Se)().isLoading,
1387
1475
  onClick: w[2] || (w[2] = async () => {
1388
- var P;
1389
- return (P = e(t)) == null ? void 0 : P.validateInputs();
1476
+ var $;
1477
+ return ($ = e(t)) == null ? void 0 : $.validateInputs();
1390
1478
  })
1391
1479
  }, null, 8, ["loading"]),
1392
- r(U, {
1480
+ i(U, {
1393
1481
  label: "Cancel",
1394
1482
  type: "button",
1395
1483
  variant: "tertiary",
1396
- onClick: w[3] || (w[3] = (P) => u.value = !1)
1484
+ onClick: w[3] || (w[3] = ($) => u.value = !1)
1397
1485
  })
1398
1486
  ])
1399
1487
  ]),
1400
1488
  default: T(() => [
1401
- r($, {
1489
+ i(k, {
1402
1490
  class: "space-y-16",
1403
1491
  ref_key: "form",
1404
1492
  ref: t,
1405
- onValidationSuccess: S,
1493
+ onValidationSuccess: V,
1406
1494
  blameFormChildOnValidationFailed: ""
1407
1495
  }, {
1408
1496
  default: T(() => [
1409
- r(z, {
1497
+ i(W, {
1410
1498
  class: "max-w-[700px]",
1411
1499
  horizontal: "",
1412
1500
  variant: "outlined"
1413
1501
  }, {
1414
1502
  default: T(() => {
1415
- var P, O;
1503
+ var $, A;
1416
1504
  return [
1417
- (P = e(i)) != null && P.image ? (g(), I(N, {
1505
+ ($ = e(r)) != null && $.image ? (g(), I(D, {
1418
1506
  key: 0,
1419
1507
  width: "100",
1420
- src: (O = e(i)) == null ? void 0 : O.image
1421
- }, null, 8, ["src"])) : A("", !0),
1422
- r(H, { class: "flex flex-col gap-16 justify-between" }, {
1508
+ src: (A = e(r)) == null ? void 0 : A.image
1509
+ }, null, 8, ["src"])) : M("", !0),
1510
+ i(K, { class: "flex flex-col gap-16 justify-between" }, {
1423
1511
  default: T(() => {
1424
1512
  var p;
1425
1513
  return [
1426
- r(W, {
1514
+ i(Y, {
1427
1515
  class: "p-0",
1428
- title: (p = e(i)) == null ? void 0 : p.name,
1429
- subtitle: e(l)
1516
+ title: (p = e(r)) == null ? void 0 : p.name,
1517
+ subtitle: e(a)
1430
1518
  }, null, 8, ["title", "subtitle"]),
1431
- r(H, { class: "p-0" }, {
1519
+ i(K, { class: "p-0" }, {
1432
1520
  default: T(() => {
1433
- var o, C, k, E, K, q, ie, ge, ce, ve, ae;
1521
+ var n, C, P, E, q, H, ie, ge, ce, ve, le;
1434
1522
  return [
1435
- x("div", po, [
1436
- (o = e(i)) != null && o.isFeedvibe ? (g(), I(Y, {
1523
+ x("div", pn, [
1524
+ (n = e(r)) != null && n.isFeedvibe ? (g(), I(z, {
1437
1525
  key: 0,
1438
1526
  label: "Feedvibe"
1439
- })) : A("", !0),
1440
- (k = (C = e(i)) == null ? void 0 : C.titles) != null && k.length ? (g(), I(Y, {
1527
+ })) : M("", !0),
1528
+ (P = (C = e(r)) == null ? void 0 : C.titles) != null && P.length ? (g(), I(z, {
1441
1529
  key: 1,
1442
- label: `${e(i).titles.length} title(s)`
1443
- }, null, 8, ["label"])) : A("", !0),
1444
- (K = (E = e(i)) == null ? void 0 : E.vouchers) != null && K.length ? (g(), I(Y, {
1530
+ label: `${e(r).titles.length} title(s)`
1531
+ }, null, 8, ["label"])) : M("", !0),
1532
+ (q = (E = e(r)) == null ? void 0 : E.vouchers) != null && q.length ? (g(), I(z, {
1445
1533
  key: 2,
1446
- label: `${e(i).vouchers.length} voucher(s)`
1447
- }, null, 8, ["label"])) : A("", !0),
1448
- (ie = (q = e(i)) == null ? void 0 : q.credit) != null && ie.normal || (ve = (ce = (ge = e(i)) == null ? void 0 : ge.credit) == null ? void 0 : ce.free) != null && ve.amount ? (g(), I(Y, {
1534
+ label: `${e(r).vouchers.length} voucher(s)`
1535
+ }, null, 8, ["label"])) : M("", !0),
1536
+ (ie = (H = e(r)) == null ? void 0 : H.credit) != null && ie.normal || (ve = (ce = (ge = e(r)) == null ? void 0 : ge.credit) == null ? void 0 : ce.free) != null && ve.amount ? (g(), I(z, {
1449
1537
  key: 3,
1450
- label: `${(e(i).credit.normal || 0) + (((ae = e(i).credit.free) == null ? void 0 : ae.amount) || 0)} credit(s)`
1451
- }, null, 8, ["label"])) : A("", !0)
1538
+ label: `${(e(r).credit.normal || 0) + (((le = e(r).credit.free) == null ? void 0 : le.amount) || 0)} credit(s)`
1539
+ }, null, 8, ["label"])) : M("", !0)
1452
1540
  ])
1453
1541
  ];
1454
1542
  }),
@@ -1462,22 +1550,22 @@ const Xt = /* @__PURE__ */ ee({
1462
1550
  }),
1463
1551
  _: 1
1464
1552
  }),
1465
- r(le, {
1553
+ i(ae, {
1466
1554
  modelValue: e(b),
1467
- "onUpdate:modelValue": w[0] || (w[0] = (P) => ne(b) ? b.value = P : null),
1555
+ "onUpdate:modelValue": w[0] || (w[0] = ($) => oe(b) ? b.value = $ : null),
1468
1556
  label: "Select member",
1469
1557
  searchable: "",
1470
1558
  items: e(m),
1471
1559
  onSearch: d,
1472
- rules: [(P) => !!P > 0 || "Member is required"],
1560
+ rules: [($) => !!$ > 0 || "Member is required"],
1473
1561
  "helper-text": "Type to search member"
1474
1562
  }, null, 8, ["modelValue", "items", "rules"]),
1475
- r(s, {
1476
- modelValue: e(n),
1477
- "onUpdate:modelValue": w[1] || (w[1] = (P) => ne(n) ? n.value = P : null),
1563
+ i(s, {
1564
+ modelValue: e(o),
1565
+ "onUpdate:modelValue": w[1] || (w[1] = ($) => oe(o) ? o.value = $ : null),
1478
1566
  label: "Reference (optional)",
1479
1567
  rules: [
1480
- (P) => P.length < 50 || "Reference must be less than 50 characters"
1568
+ ($) => $.length < 50 || "Reference must be less than 50 characters"
1481
1569
  ]
1482
1570
  }, null, 8, ["modelValue", "rules"])
1483
1571
  ]),
@@ -1489,115 +1577,115 @@ const Xt = /* @__PURE__ */ ee({
1489
1577
  };
1490
1578
  }
1491
1579
  });
1492
- var bo = { 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" };
1493
- const go = { class: "px-24 flex flex-col gap-y-16" }, vo = { class: "flex gap-8 items-center" }, ho = { class: "fm-typo-en-body-lg-600" }, _o = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, xo = /* @__PURE__ */ x("img", {
1494
- src: We,
1580
+ var bn = { 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" };
1581
+ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8 items-center" }, hn = { class: "fm-typo-en-body-lg-600" }, _n = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, xn = /* @__PURE__ */ x("img", {
1582
+ src: Ye,
1495
1583
  class: "aspect-square w-[150px]"
1496
- }, null, -1), Co = { class: "flex flex-col gap-16 text-center" }, Fo = { class: "fm-typo-en-title-sm-800" }, Vo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qo = /* @__PURE__ */ ee({
1584
+ }, null, -1), Cn = { class: "flex flex-col gap-16 text-center" }, Sn = { class: "fm-typo-en-title-sm-800" }, Fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qn = /* @__PURE__ */ ee({
1497
1585
  __name: "Store",
1498
1586
  setup(v) {
1499
1587
  const _ = {
1500
1588
  label: "Setup payout account",
1501
1589
  value: "payout",
1502
1590
  isPrimary: !1
1503
- }, { t: a } = be(), f = {
1504
- label: a("connect.store.actions.setting"),
1591
+ }, { t: l } = be(), f = {
1592
+ label: l("connect.store.actions.setting"),
1505
1593
  value: "setting",
1506
1594
  isPrimary: !1
1507
- }, i = {
1508
- label: a("connect.store.actions.manageReward"),
1595
+ }, r = {
1596
+ label: l("connect.store.actions.manageReward"),
1509
1597
  value: "create_reward"
1510
1598
  }, b = {
1511
- label: a("connect.store.actions.addCategory"),
1599
+ label: l("connect.store.actions.addCategory"),
1512
1600
  value: "create_category",
1513
1601
  isPrimary: !0,
1514
1602
  prependIcon: "add"
1515
- }, n = R(), m = ct(), u = $e(), { global: t, minor: c } = Ee, y = Ae(), d = j(() => u.sortedStoreCategories), S = j(() => u.sortedStoreCategories.map((s) => s.name)), l = R(), F = R();
1603
+ }, o = R(), m = ct(), u = ke(), { global: t, minor: c } = Ee, y = Me(), d = j(() => u.sortedStoreCategories), V = j(() => u.sortedStoreCategories.map((s) => s.name)), a = R(), S = R();
1516
1604
  async function w(s) {
1517
- var $;
1518
- s === "setting" ? ($ = l.value) == null || $.showSheet(!0, u.storeOption) : s === "create_category" ? W(-1) : s === "create_reward" ? await m.push({ name: Ze["$connect-STORE_REWARDS"] }) : s == "payout" && window.open(bo.paymentPortalUrl, "_blank");
1605
+ var k;
1606
+ s === "setting" ? (k = a.value) == null || k.showSheet(!0, u.storeOption) : s === "create_category" ? Y(-1) : s === "create_reward" ? await m.push({ name: Ze["$connect-STORE_REWARDS"] }) : s == "payout" && window.open(bn.paymentPortalUrl, "_blank");
1519
1607
  }
1520
- async function N(s) {
1608
+ async function D(s) {
1521
1609
  await c(
1522
1610
  async () => {
1523
- var $;
1524
- await _e.updateStore(s), await u.readMemberStore(), ($ = l.value) == null || $.showSheet(!1);
1611
+ var k;
1612
+ await Ce.updateStore(s), await u.readMemberStore(), (k = a.value) == null || k.showSheet(!1);
1525
1613
  },
1526
1614
  {
1527
- message: a("connect.store.setting.update.message"),
1528
- successMessage: a("connect.store.setting.update.success")
1615
+ message: l("connect.store.setting.update.message"),
1616
+ successMessage: l("connect.store.setting.update.success")
1529
1617
  }
1530
1618
  );
1531
1619
  }
1532
- async function W(s = -1) {
1533
- var $, U;
1534
- if ((!u.storeOption || !u.storeOption.company) && await he.confirm(
1535
- a("connect.store.category.setup.title"),
1536
- a("connect.store.category.setup.button"),
1537
- a("connect.store.category.setup.action"),
1538
- a("connect.common.cancel")
1620
+ async function Y(s = -1) {
1621
+ var k, U;
1622
+ if ((!u.storeOption || !u.storeOption.company) && await xe.confirm(
1623
+ l("connect.store.category.setup.title"),
1624
+ l("connect.store.category.setup.button"),
1625
+ l("connect.store.category.setup.action"),
1626
+ l("connect.common.cancel")
1539
1627
  ))
1540
- return ($ = l.value) == null ? void 0 : $.showSheet(!0);
1628
+ return (k = a.value) == null ? void 0 : k.showSheet(!0);
1541
1629
  y.open({
1542
- title: s == -1 ? a("connect.store.category.add") : a("connect.store.category.edit"),
1543
- contentComponent: $t,
1630
+ title: s == -1 ? l("connect.store.category.add") : l("connect.store.category.edit"),
1631
+ contentComponent: kt,
1544
1632
  contentComponentProps: {
1545
1633
  initialValue: ((U = d.value[s]) == null ? void 0 : U.name) ?? "",
1546
1634
  action: s == -1 ? "add" : "edit"
1547
1635
  }
1548
- }).onPrimary(async (M) => {
1549
- M === null && !await he.remove(
1550
- a("connect.store.category.remove.confirm"),
1551
- a("connect.store.category.remove.title")
1636
+ }).onPrimary(async (O) => {
1637
+ O === null && !await xe.remove(
1638
+ l("connect.store.category.remove.confirm"),
1639
+ l("connect.store.category.remove.title")
1552
1640
  ) || await c(
1553
1641
  async () => {
1554
- const P = s == -1 ? [...d.value, { name: M, bundles: [] }] : [...d.value].map((O, p) => p == s ? { ...O, name: M } : O).filter((O) => O.name !== null);
1555
- await _e.updateStoreBundle({
1556
- categories: P
1642
+ const $ = s == -1 ? [...d.value, { name: O, bundles: [] }] : [...d.value].map((A, p) => p == s ? { ...A, name: O } : A).filter((A) => A.name !== null);
1643
+ await Ce.updateStoreBundle({
1644
+ categories: $
1557
1645
  }), await u.readMemberStore();
1558
1646
  },
1559
1647
  {
1560
- message: M === null ? a("connect.store.category.update.deleting") : s == -1 ? a("connect.store.category.update.creating") : a("connect.store.category.update.updating"),
1561
- successMessage: M === null ? a("connect.store.category.update.success.deleted") : s == -1 ? a("connect.store.category.update.success.created") : a("connect.store.category.update.success.updated")
1648
+ message: O === null ? l("connect.store.category.update.deleting") : s == -1 ? l("connect.store.category.update.creating") : l("connect.store.category.update.updating"),
1649
+ successMessage: O === null ? l("connect.store.category.update.success.deleted") : s == -1 ? l("connect.store.category.update.success.created") : l("connect.store.category.update.success.updated")
1562
1650
  }
1563
1651
  );
1564
1652
  });
1565
1653
  }
1566
- async function Y(s, $, U, M) {
1567
- var p, o, C;
1568
- $ ?? ($ = (p = F.value) == null ? void 0 : p.target.category), U ?? (U = (o = F.value) == null ? void 0 : o.target.index), M ?? (M = (C = F.value) == null ? void 0 : C.target.originalCategoryIndex);
1569
- const P = Ne(d.value);
1570
- for (const k of P)
1571
- for (const E of k.bundles)
1654
+ async function z(s, k, U, O) {
1655
+ var p, n, C;
1656
+ k ?? (k = (p = S.value) == null ? void 0 : p.target.category), U ?? (U = (n = S.value) == null ? void 0 : n.target.index), O ?? (O = (C = S.value) == null ? void 0 : C.target.originalCategoryIndex);
1657
+ const $ = De(d.value);
1658
+ for (const P of $)
1659
+ for (const E of P.bundles)
1572
1660
  console.log(E, "bundle in payload"), "pf_vouchers" in E && delete E.pf_vouchers;
1573
- $ != M && (P[M].bundles.splice(U, 1), U = P[$].bundles.length), console.log($, U, M, "ci, bi, originalCategoryIndex");
1574
- const O = P[$];
1575
- if (!O) {
1661
+ k != O && ($[O].bundles.splice(U, 1), U = $[k].bundles.length), console.log(k, U, O, "ci, bi, originalCategoryIndex");
1662
+ const A = $[k];
1663
+ if (!A) {
1576
1664
  Ge.error("Unexpected error", 2e3);
1577
1665
  return;
1578
1666
  }
1579
1667
  if (s == null) {
1580
- if (await he.remove(
1668
+ if (await xe.remove(
1581
1669
  "Are you sure you want to delete this bundle?",
1582
1670
  "Delete bundle"
1583
1671
  ) == !1)
1584
1672
  return;
1585
- O.bundles.splice(U, 1);
1673
+ A.bundles.splice(U, 1);
1586
1674
  } else
1587
- U == -1 ? O.bundles.push(s) : O.bundles[U] = s;
1675
+ U == -1 ? A.bundles.push(s) : A.bundles[U] = s;
1588
1676
  await c(
1589
1677
  async () => {
1590
- var k, E;
1678
+ var P, E;
1591
1679
  if (s != null) {
1592
- const K = (k = F.value) == null ? void 0 : k.bundleImage;
1593
- K === null && s.image ? (await Fe.delete(s.image), s.image = null) : K && (s.image = await Fe.update(
1594
- Fe.bundleImagePath(void 0, K),
1595
- K
1680
+ const q = (P = S.value) == null ? void 0 : P.bundleImage;
1681
+ q === null && s.image ? (await Fe.delete(s.image), s.image = null) : q && (s.image = await Fe.update(
1682
+ Fe.bundleImagePath(void 0, q),
1683
+ q
1596
1684
  ));
1597
1685
  }
1598
- await _e.updateStoreBundle({
1599
- categories: P
1600
- }), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E = F.value) == null || E.showSheet(!1);
1686
+ await Ce.updateStoreBundle({
1687
+ categories: $
1688
+ }), await u.readMemberStore(), await u.readMembership(), await u.readRewards(), (E = S.value) == null || E.showSheet(!1);
1601
1689
  },
1602
1690
  {
1603
1691
  message: `${s == null ? "Deleting" : U == -1 ? "Creating" : "Updating"} bundle`,
@@ -1605,45 +1693,45 @@ const go = { class: "px-24 flex flex-col gap-y-16" }, vo = { class: "flex gap-8
1605
1693
  }
1606
1694
  );
1607
1695
  }
1608
- function H(s) {
1609
- var $;
1610
- ($ = F.value) == null || $.showSheet(!0, {
1696
+ function K(s) {
1697
+ var k;
1698
+ (k = S.value) == null || k.showSheet(!0, {
1611
1699
  ...s,
1612
- bundle: s.bundle ? Ne(s.bundle) : void 0
1700
+ bundle: s.bundle ? De(s.bundle) : void 0
1613
1701
  });
1614
1702
  }
1615
- const z = R([]);
1616
- function le(s) {
1617
- var $;
1618
- ($ = n.value) == null || $.showSheet({
1703
+ const W = R([]);
1704
+ function ae(s) {
1705
+ var k;
1706
+ (k = o.value) == null || k.showSheet({
1619
1707
  bundle: s
1620
1708
  });
1621
1709
  }
1622
1710
  return fe(async () => {
1623
- var s, $;
1711
+ var s, k;
1624
1712
  await t(async () => {
1625
- var U, M;
1713
+ var U, O;
1626
1714
  if (await u.readMemberStore(), await u.readMembership(), await u.readRewards(), await u.readPayoutAccount(), (U = m.currentRoute.value.query) != null && U.action) {
1627
- switch ((M = m.currentRoute.value.query) == null ? void 0 : M.action) {
1715
+ switch ((O = m.currentRoute.value.query) == null ? void 0 : O.action) {
1628
1716
  case "update_setting":
1629
1717
  w("setting");
1630
1718
  break;
1631
1719
  case "create_category":
1632
- W(-1);
1720
+ Y(-1);
1633
1721
  break;
1634
1722
  case "create_feedvibe_bundle":
1635
1723
  y.open({
1636
1724
  title: "Select category",
1637
1725
  contentComponent: Ut
1638
- }).onPrimary((P) => {
1639
- y.close(), H({
1640
- categories: S.value,
1641
- category: P,
1726
+ }).onPrimary(($) => {
1727
+ y.close(), K({
1728
+ categories: V.value,
1729
+ category: $,
1642
1730
  index: -1,
1643
1731
  bundle: {
1644
- ...ue.cloneDeep(Se),
1732
+ ...ue.cloneDeep(Ve),
1645
1733
  isFeedvibe: !0,
1646
- price: B.Dinero.fromNumber({
1734
+ price: N.Dinero.fromNumber({
1647
1735
  number: 10,
1648
1736
  precision: 2
1649
1737
  }).toObject()
@@ -1654,91 +1742,91 @@ const go = { class: "px-24 flex flex-col gap-y-16" }, vo = { class: "flex gap-8
1654
1742
  }
1655
1743
  m.replace({ query: {} });
1656
1744
  }
1657
- }), z.value = [f, i, b], (((s = u.payoutAccount) == null ? void 0 : s.status) != "APPROVED" || (($ = u.payoutAccount) == null ? void 0 : $.enable) != !0) && (z.value = [
1745
+ }), W.value = [f, r, b], (((s = u.payoutAccount) == null ? void 0 : s.status) != "APPROVED" || ((k = u.payoutAccount) == null ? void 0 : k.enable) != !0) && (W.value = [
1658
1746
  _,
1659
1747
  f,
1660
- i,
1748
+ r,
1661
1749
  b
1662
1750
  ]);
1663
- }), (s, $) => {
1664
- const U = h("FmPageHead"), M = h("FmButton"), P = h("FmCard");
1665
- return g(), D(X, null, [
1666
- r(U, {
1667
- title: e(a)("connect.store.title"),
1668
- actions: e(z),
1751
+ }), (s, k) => {
1752
+ const U = h("FmPageHead"), O = h("FmButton"), $ = h("FmCard");
1753
+ return g(), B(X, null, [
1754
+ i(U, {
1755
+ title: e(l)("connect.store.title"),
1756
+ actions: e(W),
1669
1757
  "onClick:action": w
1670
1758
  }, null, 8, ["title", "actions"]),
1671
- x("div", go, [
1672
- e(d) && e(d).length > 0 ? (g(), D(X, { key: 0 }, [
1673
- (g(!0), D(X, null, re(e(d), (O, p) => (g(), D("div", {
1674
- key: O.name,
1759
+ x("div", gn, [
1760
+ e(d) && e(d).length > 0 ? (g(), B(X, { key: 0 }, [
1761
+ (g(!0), B(X, null, re(e(d), (A, p) => (g(), B("div", {
1762
+ key: A.name,
1675
1763
  class: "space-y-8 py-12"
1676
1764
  }, [
1677
- x("div", vo, [
1678
- x("div", ho, L(O.name), 1),
1679
- r(ke, { json: O }, null, 8, ["json"]),
1680
- r(M, {
1765
+ x("div", vn, [
1766
+ x("div", hn, L(A.name), 1),
1767
+ i(Pe, { json: A }, null, 8, ["json"]),
1768
+ i(O, {
1681
1769
  icon: "edit",
1682
1770
  size: "md",
1683
1771
  variant: "tertiary",
1684
- onClick: (o) => W(p)
1772
+ onClick: (n) => Y(p)
1685
1773
  }, null, 8, ["onClick"])
1686
1774
  ]),
1687
- x("div", _o, [
1688
- (g(!0), D(X, null, re(O.bundles, (o, C) => (g(), I(Ct, {
1689
- bundle: o,
1690
- key: o._id,
1691
- onEdit: (k) => H({
1692
- bundle: o,
1775
+ x("div", _n, [
1776
+ (g(!0), B(X, null, re(A.bundles, (n, C) => (g(), I(Ct, {
1777
+ bundle: n,
1778
+ key: n._id,
1779
+ onEdit: (P) => K({
1780
+ bundle: n,
1693
1781
  category: p,
1694
1782
  index: C,
1695
- categories: e(S)
1783
+ categories: e(V)
1696
1784
  }),
1697
- onDelete: (k) => Y(null, p, C),
1698
- onSend: le
1785
+ onDelete: (P) => z(null, p, C),
1786
+ onSend: ae
1699
1787
  }, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
1700
- r(Ft, {
1701
- onCreate: (o) => H({
1788
+ i(St, {
1789
+ onCreate: (n) => K({
1702
1790
  category: p,
1703
1791
  index: -1,
1704
- categories: e(S)
1792
+ categories: e(V)
1705
1793
  })
1706
1794
  }, null, 8, ["onCreate"])
1707
1795
  ])
1708
1796
  ]))), 128)),
1709
- r(mo, {
1797
+ i(mn, {
1710
1798
  ref_key: "bundleSheetRef",
1711
- ref: F,
1712
- onUpdate: Y
1799
+ ref: S,
1800
+ onUpdate: z
1713
1801
  }, null, 512)
1714
- ], 64)) : (g(), I(P, {
1802
+ ], 64)) : (g(), I($, {
1715
1803
  key: 1,
1716
1804
  variant: "outlined",
1717
1805
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1718
1806
  }, {
1719
1807
  default: T(() => [
1720
- xo,
1721
- x("div", Co, [
1722
- x("div", Fo, L(e(a)("connect.store.bundle.title")), 1),
1723
- x("div", Vo, L(e(a)("connect.store.bundle.description")), 1)
1808
+ xn,
1809
+ x("div", Cn, [
1810
+ x("div", Sn, L(e(l)("connect.store.bundle.title")), 1),
1811
+ x("div", Fn, L(e(l)("connect.store.bundle.description")), 1)
1724
1812
  ]),
1725
- r(M, {
1813
+ i(O, {
1726
1814
  variant: "primary",
1727
- label: e(a)("connect.store.actions.addCategory"),
1815
+ label: e(l)("connect.store.actions.addCategory"),
1728
1816
  icon: "add",
1729
- onClick: $[0] || ($[0] = (O) => W(-1))
1817
+ onClick: k[0] || (k[0] = (A) => Y(-1))
1730
1818
  }, null, 8, ["label"])
1731
1819
  ]),
1732
1820
  _: 1
1733
1821
  })),
1734
- r(Jt, {
1822
+ i(Jt, {
1735
1823
  ref_key: "settingSheetRef",
1736
- ref: l,
1737
- onUpdate: N
1824
+ ref: a,
1825
+ onUpdate: D
1738
1826
  }, null, 512),
1739
- r(fo, {
1827
+ i(fn, {
1740
1828
  ref_key: "sendBundleSheetRef",
1741
- ref: n
1829
+ ref: o
1742
1830
  }, null, 512)
1743
1831
  ])
1744
1832
  ], 64);
@@ -1746,5 +1834,5 @@ const go = { class: "px-24 flex flex-col gap-y-16" }, vo = { class: "flex gap-8
1746
1834
  }
1747
1835
  });
1748
1836
  export {
1749
- Qo as default
1837
+ Qn as default
1750
1838
  };