@feedmepos/mf-connect 0.1.123-prod → 0.1.124-dev

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 (149) hide show
  1. package/dist/{App-BOQIQ8Jz.js → App-C7BnLHSt.js} +502 -493
  2. package/dist/AuditLogs-BPKQdFga.js +2016 -0
  3. package/dist/{Bin-BethwelP.js → Bin-Bq7yY0I2.js} +8 -8
  4. package/dist/{Broadcast-CHIXRBHf.js → Broadcast-D52rPmVl.js} +22 -21
  5. package/dist/{CampaignAnalytic-BaEeAhnr.js → CampaignAnalytic-DpiWtzIp.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYo7Rpes.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B1eAAN64.js} +8 -9
  7. package/dist/{Card-C075nS85.js → Card-BQc7vud2.js} +22 -22
  8. package/dist/{Collections-BsQ_kcoJ.js → Collections--VzkneGp.js} +197 -185
  9. package/dist/{Credit-BsZlyp-x.js → Credit-DhfAcw-p.js} +21 -20
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CcytVckH.js → DateRangeChip.vue_vue_type_script_setup_true_lang-D2Csdg-3.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DFz_2GZ1.js +4439 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Da4snauu.js → EffectSheet.vue_vue_type_style_index_0_lang-Cr2_XbyY.js} +16 -16
  13. package/dist/{Experience-B9iubxQ5.js → Experience-CUwbHfo5.js} +32 -31
  14. package/dist/{FileSaver.min-1XYUiJrd.js → FileSaver.min-DvZpiwMd.js} +1 -1
  15. package/dist/{Game-B3ZTJcjj.js → Game-CI5-y0JJ.js} +19 -18
  16. package/dist/{GiftCardSetup-DpLDBOS2.js → GiftCardSetup-CGacqQ0j.js} +31 -31
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-hNbexVdE.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B6POxDLJ.js} +7 -7
  18. package/dist/{Goals--dysejOz.js → Goals-fqJY9iMx.js} +4 -4
  19. package/dist/Grab-CAx1cCE4.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BI1EQciE.js → ImageInput.vue_vue_type_script_setup_true_lang-DTKf7uR-.js} +1 -1
  21. package/dist/{Index-v2J17JTP.js → Index-CT1Gnjsv.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B1vTvUTW.js → LocationPicker.vue_vue_type_script_setup_true_lang-BRQ12Yum.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dz0VI7PT.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BRzuWJ1Y.js} +1 -1
  24. package/dist/{LoyaltyDashboard-BI_khH0P.js → LoyaltyDashboard-IJIDEBWf.js} +15 -15
  25. package/dist/{MainLayout-On2p0hEA.js → MainLayout-BMghr-wf.js} +1 -1
  26. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DSdJORyW.js → MainLayout.vue_vue_type_script_setup_true_lang-BitJKgvd.js} +3 -3
  27. package/dist/{Marketing-Pqa4USnd.js → Marketing-Ckr9cp3w.js} +4 -4
  28. package/dist/{MarketingMaterialEdit-IRRsEF8W.js → MarketingMaterialEdit-BIZnE8CY.js} +214 -211
  29. package/dist/{Member-p1zyrY20.js → Member-d1nPxr74.js} +7 -7
  30. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DI4XM_rJ.js +1281 -0
  31. package/dist/{MemberImportHistory-BwkJJj_u.js → MemberImportHistory-CxX9iYhV.js} +7 -7
  32. package/dist/{MemberList-Ci8K7HI4.js → MemberList-DUzYpxhj.js} +103 -105
  33. package/dist/{MemberTransactions-D8xLWGcw.js → MemberTransactions-BFM3ybeo.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CvCuVDR-.js → MessageInput.vue_vue_type_script_setup_true_lang-B5j0YBix.js} +12 -12
  35. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DzrAjDGZ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DsSHSbBB.js} +1 -1
  36. package/dist/{Mission-JpI-0kHJ.js → Mission-De9BF5wb.js} +22 -21
  37. package/dist/{Overview-92S0hiOS.js → Overview-DeHo3gef.js} +145 -144
  38. package/dist/{Overview-BXCQnl4x.js → Overview-Pmxqv6qp.js} +20 -20
  39. package/dist/{Point-krrZWESo.js → Point-DE_Cc85N.js} +22 -21
  40. package/dist/{Promotion-BjlFWrMI.js → Promotion-cZDzgho4.js} +137 -131
  41. package/dist/{Queue-FW3I2guh.js → Queue-DmDbrtTk.js} +45 -45
  42. package/dist/{Record-Hj3_FQp6.js → Record-uxNNOvmK.js} +9 -9
  43. package/dist/{Review-CBL5Wga7.js → Review-CIIn_Bdx.js} +2 -2
  44. package/dist/ReviewFacebookCallback-CO6FxHzc.js +225 -0
  45. package/dist/{ReviewGoogleCallback-CAqc1gmT.js → ReviewGoogleCallback-B7kmGwb_.js} +5 -5
  46. package/dist/{Reward-UN-LYZPR.js → Reward-Bj1snFu8.js} +16 -16
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C4deW4H6.js → RewardGroup.vue_vue_type_script_setup_true_lang-BO-36dE4.js} +13 -13
  48. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-b7ZEMd4s.js +1923 -0
  49. package/dist/{Segment-D9ehFadR.js → Segment-BgJgWa6C.js} +303 -306
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D7PbDKI7.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D2TDoZgQ.js} +14 -14
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DWXfOk-I.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CEBH11hR.js} +4 -4
  52. package/dist/Setting-DpEI72mW.js +574 -0
  53. package/dist/{SettingAdvertisements-BNWTSQ14.js → SettingAdvertisements-vdUtIXwC.js} +12 -12
  54. package/dist/Settings-C6yJ1WEB.js +286 -0
  55. package/dist/{Store-vRzLqmIu.js → Store-DgltT0RA.js} +28 -28
  56. package/dist/{StoreRewards-DitATf4s.js → StoreRewards-BXH_5cYL.js} +15 -15
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DqlluwMB.js +1319 -0
  58. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DjCO9U0c.js +7007 -0
  59. package/dist/{Tier-B0JGxXei.js → Tier-CqfHGUX0.js} +2575 -687
  60. package/dist/{Title-DBLK191p.js → Title-B5VnUNiS.js} +95 -94
  61. package/dist/{Transaction-CUthGjH1.js → Transaction-BZh1Q9Lj.js} +2 -2
  62. package/dist/Upselling-Cf24ub-9.js +1055 -0
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CUCR6aEY.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Buj7CRlQ.js} +26 -26
  64. package/dist/{Voucher-DsyOteEs.js → Voucher-CZJdV2Ok.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Ddbutv4Y.js → VoucherEditor.vue_vue_type_script_setup_true_lang-65x2VrpD.js} +12 -12
  66. package/dist/{WhatsappAccount-PWKWg15w.js → WhatsappAccount-DsRilNC5.js} +6 -6
  67. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-HUSiUfoc.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Bn26qwx5.js} +1 -1
  68. package/dist/{WhatsappBot-CMFcJj1b.js → WhatsappBot-CpzMaTss.js} +6 -6
  69. package/dist/{WhatsappBotLogs-CVOw3VxD.js → WhatsappBotLogs-DRF8VufQ.js} +6 -6
  70. package/dist/{WhatsappBotSettings-ouG9rSoI.js → WhatsappBotSettings-DSUPGC-p.js} +4 -4
  71. package/dist/{WhatsappLayout-CHtKQYog.js → WhatsappLayout-BCWYcQmD.js} +3 -3
  72. package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-B0tpwJ9B.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DyxyISRP.js} +3 -3
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CEytppMm.js → ZodTextField.vue_vue_type_script_setup_true_lang-Db-Z7cY_.js} +2 -2
  74. package/dist/{app-CZGZKKye.js → app-BQeODViN.js} +14861 -15017
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-Cxm_LrqA.js → base.export-kSFLDDoC.js} +2 -2
  77. package/dist/{business-CieIljvm.js → business-EP-Do3Ew.js} +1 -1
  78. package/dist/{campaign-DhN6zKES.js → campaign-BjnUPowX.js} +34 -28
  79. package/dist/{campaign-DWClF3jI.js → campaign-C8GgaCub.js} +121 -94
  80. package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
  81. package/dist/campaign.fn-DQ--gL4B.js +776 -0
  82. package/dist/{collection.fn-Cep8tuk5.js → collection.fn-BhXecwh5.js} +2 -2
  83. package/dist/{currency-DhwsYY32.js → currency-CGMNh1Q_.js} +1 -1
  84. package/dist/duplicateCampaign-icqF8Na9.js +51 -0
  85. package/dist/{effect-BwOOpJRh.js → effect-Bc6oGIWd.js} +1 -1
  86. package/dist/{email-addresses-DZB2oj9y.js → email-addresses-B3KWfUMk.js} +25 -25
  87. package/dist/{feature-flag-BSpbhSMn.js → feature-flag-HhjvSuDm.js} +171 -185
  88. package/dist/google-BQK68wbe.js +5 -0
  89. package/dist/{helper-D_4T4gbM.js → helper-D1BYvcED.js} +1 -1
  90. package/dist/{index-DgCpTG1m.js → index-BIBcfAw5.js} +1 -1
  91. package/dist/{index-BpnjNIh1.js → index-BkevK_Hp.js} +1 -1
  92. package/dist/{index-D5OOlgos.js → index-Br2SLVsn.js} +608 -251
  93. package/dist/{index-BYipoHQc.js → index-Bunp1bt_.js} +1 -1
  94. package/dist/{index-BDKVZZR0.js → index-C-46QHFh.js} +380 -234
  95. package/dist/{index-MCyDYhZI.js → index-C3MK8Twg.js} +1 -1
  96. package/dist/{index-DVir0ptH.js → index-CsYTLmPa.js} +4 -4
  97. package/dist/{index-Dh815w-7.js → index-D2TnjKPP.js} +23 -23
  98. package/dist/{index-CyYV4eem.js → index-DCC3pLug.js} +19 -6
  99. package/dist/{index-X5Gzu80O.js → index-DOSuhtdE.js} +1 -1
  100. package/dist/{index-FrOuWhLi.js → index-DeqpfWLa.js} +3 -3
  101. package/dist/{index-Df4ox2zj.js → index-DiCgGQoC.js} +2 -2
  102. package/dist/{index-tUxF4g8G.js → index-GQv1_jaJ.js} +2 -2
  103. package/dist/{index-rcMo_-nr.js → index-Ptcqv0W6.js} +2 -2
  104. package/dist/{index-CY88cQHU.js → index-VLFerh-X.js} +10 -10
  105. package/dist/{index-DcTRgcug.js → index-VyoufKYY.js} +1 -1
  106. package/dist/{index-BtN3vRvA.js → index-Yw4M7v7m.js} +2699 -2614
  107. package/dist/{index-DcO1O6fl.js → index-cPPWotJe.js} +10 -10
  108. package/dist/{index-FKxe6jKI.js → index-gMrtUwSD.js} +316 -316
  109. package/dist/{index-CIJKKs_J.js → index-oIo5Cful.js} +533 -462
  110. package/dist/{index.esm2017-DSF7lxrn.js → index.esm2017-DUZpLdEB.js} +93 -93
  111. package/dist/{loading-B4qq_74t.js → loading-DhpcQgdj.js} +1 -1
  112. package/dist/{lodash-BuScZ_TM.js → lodash-r4AR7GJC.js} +1 -1
  113. package/dist/{member-import-DyM1Xskc.js → member-import-CogEef9H.js} +1 -1
  114. package/dist/{membership-C77S6FIb.js → membership-BQFkjRjs.js} +2 -2
  115. package/dist/{money-Dcr44NhN.js → money-Ifqd4pyC.js} +1 -1
  116. package/dist/{number-C2u_79r4.js → number-C9Tw_Ncm.js} +1 -1
  117. package/dist/objectid-D7dqM1a3.js +145 -0
  118. package/dist/{onboarding-Chxkor1U.js → onboarding-D4dm_rxU.js} +36 -36
  119. package/dist/{onboardingSetup-BvL9lW9U.js → onboardingSetup-DtNZUoRr.js} +2 -2
  120. package/dist/{plugins-dnLWrrhC.js → plugins-DGI9Fkiu.js} +3 -3
  121. package/dist/{reward-DVHKTXQL.js → reward-DTtejZqM.js} +1 -1
  122. package/dist/{rule-IYgreBdC.js → rule-C4N3ce3c.js} +572 -492
  123. package/dist/style.css +1 -1
  124. package/dist/template-YhWRyNGp.js +227 -0
  125. package/dist/{timezone-Cdp7cU32.js → timezone-5rYhX7XZ.js} +1 -1
  126. package/dist/{transaction.fn-kl4EZybB.js → transaction.fn-Ba_U7HdT.js} +2 -2
  127. package/dist/{trigger-C1m8eupI.js → trigger-B8I1aO6Y.js} +9 -9
  128. package/dist/{useMarketingMaterialActions-m5OLWGoL.js → useMarketingMaterialActions-CTOFHmlL.js} +4 -4
  129. package/dist/{usePagination-DX82vEDi.js → usePagination-3wAPVCOp.js} +1 -1
  130. package/dist/{user-DBndrlMY.js → user-Ds4DW_-Y.js} +1 -1
  131. package/dist/vue-i18n-Bqlt_-jA.js +2365 -0
  132. package/dist/{xlsx-ColLmoRB.js → xlsx-xlOCvuAq.js} +166 -166
  133. package/dist/{zod-CHmP8TTi.js → zod-GVNjvrpT.js} +1 -1
  134. package/package.json +6 -2
  135. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-qX_uFelR.js +0 -3493
  136. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DyvEDRBE.js +0 -1308
  137. package/dist/ReviewFacebookCallback-31bFMGu3.js +0 -238
  138. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BbzRH7BF.js +0 -1884
  139. package/dist/Setting-DGoNxCsO.js +0 -578
  140. package/dist/Settings-CQ67orRm.js +0 -179
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DEP0FuoM.js +0 -1297
  142. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DndMZr1k.js +0 -142
  143. package/dist/Upselling-CZLmpsdx.js +0 -200
  144. package/dist/campaign.fn-CKTsVS5U.js +0 -776
  145. package/dist/google-C3S8u0mT.js +0 -4
  146. package/dist/objectid-nYLSIO_I.js +0 -145
  147. package/dist/rule-builder-QC_xPC4L.js +0 -102
  148. package/dist/template-COvkfF2w.js +0 -275
  149. package/dist/vue-i18n-FBUIkfn5.js +0 -2365
@@ -0,0 +1,286 @@
1
+ import { defineComponent as M, useSlots as G, ref as F, watch as z, computed as b, openBlock as t, createElementBlock as s, createElementVNode as a, normalizeClass as N, unref as e, toDisplayString as d, Fragment as w, createBlock as U, createCommentVNode as C, createVNode as E, renderSlot as W, onMounted as q, withCtx as L, renderList as R, createStaticVNode as J } from "vue";
2
+ import { u as K } from "./loading-DhpcQgdj.js";
3
+ import { u as Q } from "./business-EP-Do3Ew.js";
4
+ import { components as x, useSnackbar as X } from "@feedmepos/ui-library";
5
+ import { u as O } from "./vue-i18n-Bqlt_-jA.js";
6
+ import { h as A } from "./moment-D7p2TMB-.js";
7
+ import { g as Z, f as ee } from "./google-BQK68wbe.js";
8
+ import { R as ne } from "./app-BQeODViN.js";
9
+ import { useRouter as oe } from "vue-router";
10
+ import { r as $ } from "./index-VLFerh-X.js";
11
+ const te = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white overflow-hidden" }, ce = ["src"], ae = { class: "flex flex-col flex-1 gap-4 min-w-0" }, se = { class: "fm-typo-en-body-md-600 capitalize" }, re = { class: "truncate" }, le = { class: "truncate" }, ie = {
12
+ key: 1,
13
+ class: "truncate"
14
+ }, ue = {
15
+ key: 2,
16
+ class: "truncate"
17
+ }, de = {
18
+ key: 1,
19
+ class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate"
20
+ }, me = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, H = /* @__PURE__ */ M({
21
+ __name: "ReviewSource",
22
+ props: {
23
+ icon: {},
24
+ name: {},
25
+ connected: { type: Boolean },
26
+ subtitle: {},
27
+ syncing: { type: Boolean },
28
+ tokenExpired: { type: Boolean },
29
+ lastSyncTime: {}
30
+ },
31
+ emits: ["connect", "sync"],
32
+ setup(r, { emit: h }) {
33
+ const f = r, S = h, { t: l } = O(), c = G(), k = F(null);
34
+ z(
35
+ () => f.syncing,
36
+ (i) => {
37
+ i && (k.value = /* @__PURE__ */ new Date());
38
+ },
39
+ { immediate: !0 }
40
+ );
41
+ const p = b(
42
+ () => f.lastSyncTime ? A(f.lastSyncTime) : null
43
+ ), T = b(() => {
44
+ var i;
45
+ return ((i = p.value) == null ? void 0 : i.fromNow()) ?? "";
46
+ }), B = b(
47
+ () => {
48
+ var i;
49
+ return ((i = p.value) == null ? void 0 : i.format("D MMM YYYY, HH:mm")) ?? "";
50
+ }
51
+ ), I = b(
52
+ () => A(k.value ?? void 0).format("HH:mm")
53
+ ), u = b(() => f.syncing ? "syncing" : p.value ? "synced" : "never");
54
+ return (i, m) => (t(), s("div", te, [
55
+ a("div", {
56
+ class: N(["flex items-center gap-12 p-16", e(c).default ? "border-b border-fm-color-neutral-gray-100" : ""])
57
+ }, [
58
+ a("img", {
59
+ src: r.icon,
60
+ class: "w-10 h-10 shrink-0"
61
+ }, null, 8, ce),
62
+ a("div", ae, [
63
+ a("span", se, d(r.name), 1),
64
+ r.connected ? (t(), s("div", {
65
+ key: 0,
66
+ class: N(["flex items-center gap-8 fm-typo-en-body-sm-400 truncate", {
67
+ "text-fm-color-typo-secondary": u.value !== "syncing",
68
+ "text-fm-color-typo-warning": u.value === "syncing"
69
+ }])
70
+ }, [
71
+ a("span", {
72
+ class: N(["w-8 h-8 rounded-full shrink-0", {
73
+ "bg-fm-color-system-success-400": u.value === "synced",
74
+ "bg-fm-color-primary": u.value === "syncing",
75
+ "bg-fm-color-neutral-gray-300": u.value === "never"
76
+ }])
77
+ }, null, 2),
78
+ u.value === "synced" ? (t(), s(w, { key: 0 }, [
79
+ a("span", re, d(e(l)("connect.review.lastSynced", { relative: T.value })), 1),
80
+ m[3] || (m[3] = a("span", { class: "text-fm-color-neutral-gray-300" }, "·", -1)),
81
+ a("span", le, d(B.value), 1)
82
+ ], 64)) : u.value === "syncing" ? (t(), s("span", ie, d(e(l)("connect.review.syncingNow", { time: I.value })), 1)) : (t(), s("span", ue, d(e(l)("connect.review.neverSynced")), 1))
83
+ ], 2)) : (t(), s("span", de, d(r.subtitle || e(l)("connect.review.notConnected")), 1))
84
+ ]),
85
+ r.connected ? (t(), s(w, { key: 0 }, [
86
+ r.tokenExpired ? (t(), U(e(x).FmChip, {
87
+ key: 0,
88
+ label: e(l)("connect.review.expired"),
89
+ variant: "critical"
90
+ }, null, 8, ["label"])) : C("", !0),
91
+ E(e(x).FmButton, {
92
+ variant: "secondary",
93
+ "prepend-icon": "refresh",
94
+ label: e(l)("connect.review.reconnect"),
95
+ onClick: m[0] || (m[0] = (_) => S("connect"))
96
+ }, null, 8, ["label"]),
97
+ r.tokenExpired ? C("", !0) : (t(), U(e(x).FmButton, {
98
+ key: 1,
99
+ variant: "primary",
100
+ "prepend-icon": "sync",
101
+ label: e(l)("connect.review.sync"),
102
+ loading: r.syncing,
103
+ onClick: m[1] || (m[1] = (_) => S("sync"))
104
+ }, null, 8, ["label", "loading"]))
105
+ ], 64)) : C("", !0)
106
+ ], 2),
107
+ r.connected ? C("", !0) : (t(), s("div", {
108
+ key: 0,
109
+ class: N(["flex items-center justify-between gap-12 p-16", e(c).default ? "border-b border-fm-color-neutral-gray-100" : ""])
110
+ }, [
111
+ a("span", me, d(e(l)("connect.review.connectHint", { name: r.name })), 1),
112
+ E(e(x).FmButton, {
113
+ "prepend-icon": "add",
114
+ label: e(l)("connect.review.connect"),
115
+ onClick: m[2] || (m[2] = (_) => S("connect"))
116
+ }, null, 8, ["label"])
117
+ ], 2)),
118
+ W(i.$slots, "default")
119
+ ]));
120
+ }
121
+ }), ye = { class: "p-24 flex flex-col gap-8" }, fe = { class: "flex flex-col flex-1 min-w-0" }, ge = { class: "fm-typo-en-body-lg-600 truncate" }, pe = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, ve = ["src"], be = { class: "flex flex-col flex-1 min-w-0" }, ke = { class: "fm-typo-en-body-lg-600 truncate" }, we = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, Te = /* @__PURE__ */ M({
122
+ __name: "Settings",
123
+ setup(r) {
124
+ const { t: h } = O(), f = X(), S = oe(), l = Q(), c = F(null), k = F(!1), p = F(!1), T = b(
125
+ () => {
126
+ var n;
127
+ return c.value ? ((n = c.value.google) == null ? void 0 : n.accessToken) === null : !1;
128
+ }
129
+ ), B = b(
130
+ () => {
131
+ var n;
132
+ return c.value ? ((n = c.value.facebook) == null ? void 0 : n.token) === null : !1;
133
+ }
134
+ );
135
+ function I(n) {
136
+ const o = window.location.pathname.replace(/\/review(?:\/.*)?$/, "");
137
+ return `${window.location.origin}${o}${n}`;
138
+ }
139
+ async function u() {
140
+ await K.minor(async () => {
141
+ c.value = await $.getSource();
142
+ });
143
+ }
144
+ function i(n) {
145
+ var o;
146
+ return (o = l.locations.find(
147
+ (g) => g._id.toString() === n
148
+ )) == null ? void 0 : o.name;
149
+ }
150
+ function m(n) {
151
+ return n.map((o) => i(o)).filter((o) => o !== void 0).join(", ");
152
+ }
153
+ function _() {
154
+ f.open({
155
+ message: h("connect.review.syncSuccess"),
156
+ type: "success"
157
+ }), S.push({ name: ne["$connect-REVIEW_OVERVIEW"] });
158
+ }
159
+ async function P() {
160
+ var n, o;
161
+ k.value = !0;
162
+ try {
163
+ await $.syncGoogleReviews(), _();
164
+ } catch (g) {
165
+ if (await u(), ((o = (n = c.value) == null ? void 0 : n.google) == null ? void 0 : o.accessToken) === null) {
166
+ f.open({
167
+ message: h("connect.review.tokenExpired"),
168
+ type: "error"
169
+ });
170
+ return;
171
+ }
172
+ throw g;
173
+ } finally {
174
+ k.value = !1;
175
+ }
176
+ }
177
+ async function Y() {
178
+ var n, o;
179
+ p.value = !0;
180
+ try {
181
+ await $.syncFacebookReviews(), _();
182
+ } catch (g) {
183
+ if (await u(), ((o = (n = c.value) == null ? void 0 : n.facebook) == null ? void 0 : o.token) === null) {
184
+ f.open({
185
+ message: h("connect.review.tokenExpired"),
186
+ type: "error"
187
+ });
188
+ return;
189
+ }
190
+ throw g;
191
+ } finally {
192
+ p.value = !1;
193
+ }
194
+ }
195
+ async function j() {
196
+ const n = I("/review/google/callback"), { callbackUrl: o } = await $.getOauthUrl("google", n);
197
+ window.location.href = o;
198
+ }
199
+ async function D() {
200
+ const n = I("/review/facebook/callback"), { callbackUrl: o } = await $.getOauthUrl("facebook", n);
201
+ window.location.href = o;
202
+ }
203
+ return q(() => {
204
+ u(), l.readLocations();
205
+ }), (n, o) => {
206
+ var g, V;
207
+ return t(), s("div", ye, [
208
+ e(c) ? (t(), s(w, { key: 0 }, [
209
+ E(H, {
210
+ icon: e(Z),
211
+ name: "google",
212
+ connected: !!e(c).google,
213
+ syncing: e(k),
214
+ "token-expired": e(T),
215
+ "last-sync-time": (g = e(c).google) == null ? void 0 : g.lastSyncTime,
216
+ onConnect: j,
217
+ onSync: P
218
+ }, {
219
+ default: L(() => {
220
+ var v;
221
+ return [
222
+ (t(!0), s(w, null, R((v = e(c).google) == null ? void 0 : v.locations, (y) => (t(), s("div", {
223
+ key: y.googleLocationName,
224
+ class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
225
+ }, [
226
+ E(e(x).FmIcon, {
227
+ name: "location_on",
228
+ class: "text-fm-color-neutral-gray-300 shrink-0"
229
+ }),
230
+ a("div", fe, [
231
+ a("span", ge, d(y.displayName), 1),
232
+ a("span", pe, d(i(y.locationId)), 1)
233
+ ])
234
+ ]))), 128))
235
+ ];
236
+ }),
237
+ _: 1
238
+ }, 8, ["icon", "connected", "syncing", "token-expired", "last-sync-time"]),
239
+ E(H, {
240
+ icon: e(ee),
241
+ name: "facebook",
242
+ connected: !!e(c).facebook,
243
+ syncing: e(p),
244
+ "token-expired": e(B),
245
+ "last-sync-time": (V = e(c).facebook) == null ? void 0 : V.lastSyncTime,
246
+ onConnect: D,
247
+ onSync: Y
248
+ }, {
249
+ default: L(() => {
250
+ var v;
251
+ return [
252
+ (t(!0), s(w, null, R((v = e(c).facebook) == null ? void 0 : v.pages, (y) => (t(), s("div", {
253
+ key: y.facebookPageId,
254
+ class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
255
+ }, [
256
+ y.pageProfileImageUrl ? (t(), s("img", {
257
+ key: 0,
258
+ src: y.pageProfileImageUrl,
259
+ class: "w-10 h-10 rounded-full shrink-0 object-cover"
260
+ }, null, 8, ve)) : (t(), U(e(x).FmIcon, {
261
+ key: 1,
262
+ name: "person",
263
+ class: "text-fm-color-neutral-gray-300 shrink-0"
264
+ })),
265
+ a("div", be, [
266
+ a("span", ke, d(y.pageName), 1),
267
+ a("span", we, d(m(y.locationIds)), 1)
268
+ ])
269
+ ]))), 128))
270
+ ];
271
+ }),
272
+ _: 1
273
+ }, 8, ["icon", "connected", "syncing", "token-expired", "last-sync-time"])
274
+ ], 64)) : (t(), s(w, { key: 1 }, R(["google", "facebook"], (v) => a("div", {
275
+ key: v,
276
+ class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16"
277
+ }, [...o[0] || (o[0] = [
278
+ J('<div class="animate-pulse flex items-center gap-12"><div class="w-10 h-10 rounded-full bg-fm-color-neutral-gray-100 shrink-0"></div><div class="flex-1 min-w-0 space-y-8"><div class="h-16 w-20 rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-full max-w-[160px] rounded bg-fm-color-neutral-gray-100"></div></div><div class="h-32 w-24 rounded bg-fm-color-neutral-gray-100 shrink-0"></div></div>', 1)
279
+ ])])), 64))
280
+ ]);
281
+ };
282
+ }
283
+ });
284
+ export {
285
+ Te as default
286
+ };
@@ -1,37 +1,37 @@
1
1
  import { defineComponent as Y, computed as D, resolveComponent as v, openBlock as m, createBlock as R, withCtx as I, createElementVNode as n, toDisplayString as w, createVNode as l, createCommentVNode as M, createElementBlock as T, unref as e, Fragment as z, renderList as ce, ref as O, isRef as be, reactive as lt, onMounted as Ne, watch as We, toRaw as it, createTextVNode as ee, h as rt, normalizeStyle as tt, normalizeClass as we } from "vue";
2
2
  import { _ as ct } from "./tier-BJDhpH6X.js";
3
3
  import { useDialog as Ye, useDialogChild as Je, components as dt } from "@feedmepos/ui-library";
4
- import { c as q, e as Le, S as He } from "./index-DcO1O6fl.js";
5
- import { u as ot } from "./loading-B4qq_74t.js";
6
- import { u as Xe, C as Ie } from "./membership-C77S6FIb.js";
7
- import { p as ut, q as mt, r as pt, s as Qe, t as ft, u as yt } from "./index-CIJKKs_J.js";
4
+ import { c as q, e as Le, S as He } from "./index-cPPWotJe.js";
5
+ import { u as ot } from "./loading-DhpcQgdj.js";
6
+ import { u as Xe, C as Ie } from "./membership-BQFkjRjs.js";
7
+ import { t as ut, u as mt, v as pt, w as Qe, x as ft, y as yt } from "./index-oIo5Cful.js";
8
8
  import { a as gt, c as qe } from "./object-BYyQ0PZp.js";
9
- import { _ as pe } from "./lodash-BuScZ_TM.js";
10
- import { c as _e } from "./index-FrOuWhLi.js";
11
- import { u as ve } from "./vue-i18n-FBUIkfn5.js";
12
- import { Z as ie, g as ae, a as se } from "./zod-CHmP8TTi.js";
13
- import { z as re, R as Ae } from "./app-CZGZKKye.js";
9
+ import { _ as pe } from "./lodash-r4AR7GJC.js";
10
+ import { c as _e } from "./index-DeqpfWLa.js";
11
+ import { u as ve } from "./vue-i18n-Bqlt_-jA.js";
12
+ import { Z as ie, g as ae, a as se } from "./zod-GVNjvrpT.js";
13
+ import { z as re, R as Ae } from "./app-BQeODViN.js";
14
14
  import { u as je } from "./app-wDQR6dpb.js";
15
- import { _ as ye } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CEytppMm.js";
16
- import { c as bt, p as Ee, n as vt, f as Ge } from "./plugins-dnLWrrhC.js";
15
+ import { _ as ye } from "./ZodTextField.vue_vue_type_script_setup_true_lang-Db-Z7cY_.js";
16
+ import { c as bt, p as Ee, n as vt, f as Ge } from "./plugins-DGI9Fkiu.js";
17
17
  import { J as Ze } from "./JsonViewer-v8_C7l5N.js";
18
- import { _ as ht } from "./index-BtN3vRvA.js";
19
- import { _ as xt } from "./ImageInput.vue_vue_type_script_setup_true_lang-BI1EQciE.js";
18
+ import { _ as ht } from "./index-Yw4M7v7m.js";
19
+ import { _ as xt } from "./ImageInput.vue_vue_type_script_setup_true_lang-DTKf7uR-.js";
20
20
  import { _ as _t } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
21
- import { z as Ct, a as St } from "./money-Dcr44NhN.js";
22
- import { f as Ft } from "./currency-DhwsYY32.js";
23
- import { F as wt } from "./number-C2u_79r4.js";
24
- import { a as $t, t as kt } from "./helper-D_4T4gbM.js";
25
- import "./index-BpnjNIh1.js";
26
- import "./index-BDKVZZR0.js";
27
- import "./index-D5OOlgos.js";
28
- import "./index-rcMo_-nr.js";
21
+ import { z as Ct, a as St } from "./money-Ifqd4pyC.js";
22
+ import { f as Ft } from "./currency-CGMNh1Q_.js";
23
+ import { F as wt } from "./number-C9Tw_Ncm.js";
24
+ import { a as $t, t as kt } from "./helper-D1BYvcED.js";
25
+ import "./index-BkevK_Hp.js";
26
+ import "./index-Br2SLVsn.js";
27
+ import "./index-C-46QHFh.js";
28
+ import "./index-Ptcqv0W6.js";
29
29
  import "./index-I9lmcd2w.js";
30
- import "./index-X5Gzu80O.js";
31
- import { m as Pt } from "./index-Df4ox2zj.js";
32
- import { m as De } from "./index-CyYV4eem.js";
33
- import { g as Ke } from "./index-DgCpTG1m.js";
34
- import { u as Vt } from "./business-CieIljvm.js";
30
+ import "./index-DOSuhtdE.js";
31
+ import { m as Pt } from "./index-DiCgGQoC.js";
32
+ import { m as De } from "./index-DCC3pLug.js";
33
+ import { g as Ke } from "./index-BIBcfAw5.js";
34
+ import { u as Vt } from "./business-EP-Do3Ew.js";
35
35
  import { useRouter as Tt } from "vue-router";
36
36
  function nt(b) {
37
37
  return _e.DineroFactory(b).toUnit();
@@ -600,7 +600,7 @@ const Yt = {
600
600
  };
601
601
  }
602
602
  });
603
- var Xt = { mode: "production", appMode: "mf" };
603
+ var Xt = { mode: "development", appMode: "mf" };
604
604
  const Zt = { class: "space-y-8" }, Qt = {
605
605
  key: 0,
606
606
  class: "space-y-16"
@@ -2117,7 +2117,7 @@ const vn = { class: "grid lg:grid-cols-2 gap-32 items-center" }, hn = { class: "
2117
2117
  };
2118
2118
  }
2119
2119
  });
2120
- var et = { 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", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
2120
+ var et = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
2121
2121
  const Bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary max-w-[640px]" }, Nn = { class: "px-24 flex flex-col gap-y-16" }, Mn = { class: "space-y-8 py-12" }, On = { class: "flex gap-8 items-center" }, Ln = { class: "fm-typo-en-body-lg-600" }, An = {
2122
2122
  key: 1,
2123
2123
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
@@ -1,25 +1,25 @@
1
1
  import { defineComponent as Z, ref as A, computed as q, onMounted as z, resolveComponent as F, openBlock as y, createBlock as E, unref as e, isRef as ee, withCtx as V, createElementVNode as s, createVNode as c, createElementBlock as D, createTextVNode as te, resolveDynamicComponent as N, toDisplayString as H, Fragment as W, createCommentVNode as P, h as C } from "vue";
2
2
  import { _ as oe } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as J, components as $ } from "@feedmepos/ui-library";
4
- import "./index-BpnjNIh1.js";
5
- import { u as ae } from "./loading-B4qq_74t.js";
6
- import { C as Q, u as ne } from "./membership-C77S6FIb.js";
7
- import { p as B, f as K } from "./plugins-dnLWrrhC.js";
4
+ import "./index-BkevK_Hp.js";
5
+ import { u as ae } from "./loading-DhpcQgdj.js";
6
+ import { C as Q, u as ne } from "./membership-BQFkjRjs.js";
7
+ import { p as B, f as K } from "./plugins-DGI9Fkiu.js";
8
8
  import { useCoreStore as X } from "@feedmepos/mf-common";
9
- import { u as se } from "./vue-i18n-FBUIkfn5.js";
10
- import { F as ie } from "./index-BtN3vRvA.js";
9
+ import { u as se } from "./vue-i18n-Bqlt_-jA.js";
10
+ import { F as ie } from "./index-Yw4M7v7m.js";
11
11
  import { c as re } from "./object-BYyQ0PZp.js";
12
12
  import { u as Y } from "./app-wDQR6dpb.js";
13
- import { u as le } from "./business-CieIljvm.js";
14
- import { Z as h } from "./zod-CHmP8TTi.js";
15
- import { _ as de } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CEytppMm.js";
16
- import { _ as ce } from "./ImageInput.vue_vue_type_script_setup_true_lang-BI1EQciE.js";
17
- import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DndMZr1k.js";
18
- import { b as pe, a as ue } from "./EffectSheet.vue_vue_type_style_index_0_lang-Da4snauu.js";
19
- import { i as fe, F as ye, h as j, t as we } from "./helper-D_4T4gbM.js";
13
+ import { u as le } from "./business-EP-Do3Ew.js";
14
+ import { Z as h } from "./zod-GVNjvrpT.js";
15
+ import { _ as de } from "./ZodTextField.vue_vue_type_script_setup_true_lang-Db-Z7cY_.js";
16
+ import { _ as ce } from "./ImageInput.vue_vue_type_script_setup_true_lang-DTKf7uR-.js";
17
+ import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DjCO9U0c.js";
18
+ import { b as pe, a as ue } from "./EffectSheet.vue_vue_type_style_index_0_lang-Cr2_XbyY.js";
19
+ import { i as fe, F as ye, h as j, t as we } from "./helper-D1BYvcED.js";
20
20
  import { useRouter as ge } from "vue-router";
21
- import { m as G } from "./index-CyYV4eem.js";
22
- import { R as L } from "./app-CZGZKKye.js";
21
+ import { m as G } from "./index-DCC3pLug.js";
22
+ import { R as L } from "./app-BQeODViN.js";
23
23
  function ve(w) {
24
24
  return !!(w != null && w.isAdmin) || !!(w != null && w.isStaff);
25
25
  }