@feedmepos/mf-connect 0.1.116-dev → 0.1.117-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 (154) hide show
  1. package/README.md +1 -66
  2. package/dist/{App-DWDgsBqW.js → App-CAo1izHr.js} +618 -652
  3. package/dist/{Bin-Cz6fmewG.js → Bin-DDDfjisJ.js} +8 -8
  4. package/dist/{Broadcast-CQ0pfKpx.js → Broadcast-BsCulZhE.js} +21 -22
  5. package/dist/{CampaignAnalytic-CiRCB3kh.js → CampaignAnalytic-CnVYFSkT.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bp7UeQWJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ZTHyZ_0y.js} +9 -9
  7. package/dist/{Card-Kw2PFL2m.js → Card-DPyQH9qZ.js} +24 -25
  8. package/dist/{Collections-D8Vx_EEH.js → Collections-CZCVA969.js} +185 -197
  9. package/dist/{Credit-B1jsQ5zg.js → Credit-BTg364-i.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B6Fpf8zy.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BJx8K6Ja.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ijya9Cho.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cdpr9Ku4.js → EffectSheet.vue_vue_type_style_index_0_lang-CfEnSXzg.js} +32 -32
  13. package/dist/{Experience-B0JIA3sL.js → Experience-Bk_eUcSX.js} +31 -32
  14. package/dist/{FileSaver.min-M-9kTN8q.js → FileSaver.min-CXFiZAp7.js} +1 -1
  15. package/dist/{Game-CNJyqnK3.js → Game-CBnKpFdl.js} +18 -19
  16. package/dist/{GiftCardSetup-DSQIC7fD.js → GiftCardSetup-q75wNV_F.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-ABiLOF1j.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-Cga0Th2O.js} +7 -7
  18. package/dist/{Goals-DBPzGIRK.js → Goals-Bbbgurfd.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js → ImageInput.vue_vue_type_script_setup_true_lang-CZS05h1r.js} +1 -1
  20. package/dist/{Index-CiWyZXnK.js → Index-C8_OWllb.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DnP03_b7.js → LocationPicker.vue_vue_type_script_setup_true_lang-BlCg-jI7.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DM17LaNE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CACxChIo.js} +1 -1
  23. package/dist/{LoyaltyDashboard-C4ZlK9Hv.js → LoyaltyDashboard-DJlE0371.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js → MainLayout-Bs2UPvFx.js} +4 -5
  25. package/dist/Marketing-BvRYzFV8.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-o88sdvTM.js} +1031 -2
  27. package/dist/{Member-B-l5P9jk.js → Member-C4yqwsMH.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C_ZjHH4I.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BbumjyC_.js} +50 -43
  29. package/dist/{MemberImportHistory-BJcu-ahG.js → MemberImportHistory-CbuXCdxC.js} +7 -7
  30. package/dist/{MemberList-DVsWNWIc.js → MemberList-CpAepPBe.js} +105 -103
  31. package/dist/{MemberTransactions-C2VPySEO.js → MemberTransactions-BbpXvsSk.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js → MessageInput.vue_vue_type_script_setup_true_lang-BaWgxbad.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BouFp66T.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CEgMElLo.js} +1 -1
  34. package/dist/{Mission-DWO-IF0f.js → Mission-Bdb9KVeP.js} +21 -22
  35. package/dist/{Overview-DPcWm2S0.js → Overview-CEiyGMcf.js} +22 -23
  36. package/dist/{Overview-Dbp4Sv-H.js → Overview-D_9JwnFU.js} +144 -145
  37. package/dist/{Point-PnWrzVOY.js → Point-Bd5cMXQx.js} +21 -22
  38. package/dist/{Promotion-Bwpi60dN.js → Promotion-D9gZDvgR.js} +131 -137
  39. package/dist/{Queue-BvEcKyVJ.js → Queue-BnAOL_rp.js} +45 -46
  40. package/dist/{Record-DzNvU2fM.js → Record-D6TWFKe0.js} +9 -9
  41. package/dist/{Review-HDYwnMd6.js → Review-DLEgvnc-.js} +2 -2
  42. package/dist/ReviewFacebookCallback-jVlm2O8f.js +238 -0
  43. package/dist/{ReviewGoogleCallback-6V9JNKsl.js → ReviewGoogleCallback-BgAbO3pI.js} +5 -5
  44. package/dist/{Reward-DI6IyG-d.js → Reward-DBheQiFu.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DFAIPMe7.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bt-EqsiH.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CKL8MEld.js +1883 -0
  47. package/dist/{Segment-DrV6pQyx.js → Segment-B9Se5FFw.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CXHt_ZeT.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-f7AS5vwv.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-XRXkLy6j.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-3BKA0UFI.js} +4 -4
  50. package/dist/Setting-B92JT_Y4.js +2037 -0
  51. package/dist/{SettingAdvertisements-BtqKt4Ca.js → SettingAdvertisements-CLw-dqiA.js} +12 -12
  52. package/dist/Settings-BmmM8ZnR.js +179 -0
  53. package/dist/{Store-HZs9GG03.js → Store-B5PPP5zM.js} +30 -31
  54. package/dist/{StoreRewards-BSTXL4FR.js → StoreRewards-DllyaVBY.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-3Vvqf6_H.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-7ZZ0e5tQ.js +142 -0
  57. package/dist/{Tier-Ka0rbjC_.js → Tier-M_TApfju.js} +687 -2576
  58. package/dist/{Title-7jvrf34J.js → Title-Cpltm-I2.js} +92 -94
  59. package/dist/{Transaction-D-M3udf5.js → Transaction-BYfAYRpv.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CrlpuElX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BOhfGxVj.js} +26 -26
  61. package/dist/{Voucher-BZCLPyDk.js → Voucher-DHoyg0YZ.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C_MOMFkX.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DWHwM6AJ.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Do4GTTKx.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6tTjLAZ.js} +2 -2
  64. package/dist/{app-CEe3kSZM.js → app-B_doYklh.js} +7107 -8879
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-BjSdr85q.js → base.export-DmbnT_bp.js} +2 -2
  67. package/dist/{business-CJjiItSo.js → business-DdVGtTvx.js} +1 -1
  68. package/dist/{campaign-DEXq52fE.js → campaign-CVkA08zl.js} +25 -31
  69. package/dist/{campaign-D4MWLs1D.js → campaign-jEhKmpKg.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-DWu6-kOo.js} +2 -3
  71. package/dist/{campaign.fn-DiadKjES.js → campaign.fn-BlgEyeFz.js} +82 -82
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-CVLkXKml.js} +1 -1
  73. package/dist/{collection.fn-CfqIdnSS.js → collection.fn-DLNGTrPf.js} +2 -2
  74. package/dist/{currency-CPB6E_s-.js → currency-DKS1md4e.js} +1 -1
  75. package/dist/{effect-DFodA5mh.js → effect-Bk-zYexf.js} +1 -1
  76. package/dist/{email-addresses-C0CwgNs_.js → email-addresses-I9A5iLzf.js} +2 -2
  77. package/dist/{feature-flag-Bap2oi_S.js → feature-flag-DQti61iR.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-DKKsSb2o.js → helper-9cPlo6ae.js} +1 -1
  80. package/dist/{index-CJGb1iJi.js → index-1Cdj34z1.js} +1 -1
  81. package/dist/{index-CtwPthW5.js → index-3V8E9GaZ.js} +2 -2
  82. package/dist/{index-CfqmNZUH.js → index-728mP6kW.js} +581 -683
  83. package/dist/{index-DDmpyI6z.js → index-BRm0LMTo.js} +252 -611
  84. package/dist/{index-qAQiQd-s.js → index-BxpbI0GH.js} +7 -7
  85. package/dist/{index-DFV2ydYE.js → index-C-OnJpT8.js} +1 -1
  86. package/dist/{index-D5veZ8LP.js → index-CIwdXphn.js} +2613 -2700
  87. package/dist/{index-DxmlvoHV.js → index-CNUXbXvG.js} +6 -19
  88. package/dist/{index-RUdMURTx.js → index-Cj6oxbl0.js} +10 -11
  89. package/dist/{index-CXqPYmyv.js → index-ClYX4COd.js} +3 -4
  90. package/dist/{index-CEFEuMOF.js → index-CuyzSc1l.js} +1 -1
  91. package/dist/{index-BS6725ZB.js → index-DOE2VR99.js} +198 -198
  92. package/dist/{index-C_4eW8Sr.js → index-DWkuIfHy.js} +232 -390
  93. package/dist/{index-BdGo-qgB.js → index-Dj51vqab.js} +4 -4
  94. package/dist/{index-DRnUcSVN.js → index-DuvnRxeo.js} +1 -1
  95. package/dist/{index-BJCirs9i.js → index-cgtAlOl9.js} +10767 -8028
  96. package/dist/{index-BWsGYTzB.js → index-fHiFL1dW.js} +15 -29
  97. package/dist/{index-CFZMwKR6.js → index-oNMFyOGe.js} +7 -8
  98. package/dist/{index-4LQanFJi.js → index-vKvGJ4Ve.js} +2 -2
  99. package/dist/{index.esm2017-i1myv90H.js → index.esm2017-CsF37oA-.js} +177 -177
  100. package/dist/{loading-BAFiJnEb.js → loading-BJJmTFoe.js} +1 -1
  101. package/dist/{lodash-De2KDgqX.js → lodash-BMJ6_hsa.js} +1 -1
  102. package/dist/{member-import-BP4RZGbA.js → member-import-DrGxVJt9.js} +5 -6
  103. package/dist/{membership-CQWw-rTa.js → membership-CAqKihwy.js} +3 -3
  104. package/dist/{money-rwjWYzdi.js → money-Bf9d2ZUH.js} +1 -1
  105. package/dist/{number-DwSvkBpS.js → number-CWXlGZa5.js} +1 -1
  106. package/dist/objectid-2DN5a9sY.js +145 -0
  107. package/dist/{onboarding-u7cpl6k3.js → onboarding-Dn9O7r3a.js} +25 -25
  108. package/dist/{onboardingSetup-DoxDlcVN.js → onboardingSetup-BMkDoGy-.js} +2 -2
  109. package/dist/{plugins-CKaeoHSK.js → plugins-KDgceFWV.js} +3 -3
  110. package/dist/{reward-BasbGRWt.js → reward-eilGRaXi.js} +1 -1
  111. package/dist/{rule-IN41b-qE.js → rule-Dr9Zjg_o.js} +492 -572
  112. package/dist/rule-builder-cz6Dy-no.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DwbazO8p.js +236 -0
  115. package/dist/{timezone-C68y8HiI.js → timezone-C5CIfvHs.js} +1 -1
  116. package/dist/{transaction.fn-Ckxm2gof.js → transaction.fn-Cr-FLjh0.js} +2 -2
  117. package/dist/{trigger-xA8j3s9B.js → trigger-B0Fv6wbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-CNk3LR9M.js +96 -0
  119. package/dist/{usePagination-CIRxyVr8.js → usePagination-BcA-imTr.js} +1 -1
  120. package/dist/{user-PTTQTMyQ.js → user-DRvLwlBE.js} +1 -1
  121. package/dist/vue-i18n-y7bHQpNx.js +2365 -0
  122. package/dist/{xlsx-l0AsOrP1.js → xlsx-CBObn76o.js} +379 -379
  123. package/dist/{zod-Bm1pKYLC.js → zod-DWU5EdQV.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BqEtvKFs.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js +0 -4442
  127. package/dist/Grab-CGWinKBS.js +0 -301
  128. package/dist/MainLayout-D22Q2_jN.js +0 -4
  129. package/dist/Marketing-CmVnvEN6.js +0 -269
  130. package/dist/MarketingMaterialEdit-CQ55zG-W.js +0 -1037
  131. package/dist/ReviewFacebookCallback-rAlgcTQ_.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CDoba0oG.js +0 -1923
  133. package/dist/Setting-aLQCUCP9.js +0 -574
  134. package/dist/Settings-BkYtKb4l.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D9nykzc3.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js +0 -7007
  137. package/dist/WhatsappAccount-BG0dIroG.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Co05OXon.js +0 -39
  139. package/dist/WhatsappBot-O5h5UKXz.js +0 -876
  140. package/dist/WhatsappBotLogs-BOPTuu6o.js +0 -372
  141. package/dist/WhatsappBotSettings-BSiIvpGO.js +0 -705
  142. package/dist/WhatsappLayout-DLVIfkzJ.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DJdi7dV6.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-BzWvsZwc.js +0 -51
  146. package/dist/feature-flag--GbS6Qn_.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C1C21iKU.js +0 -74
  150. package/dist/index-C_H8jFYf.js +0 -2743
  151. package/dist/objectid-DtEPzPd_.js +0 -145
  152. package/dist/template-3Nu_MAMG.js +0 -188
  153. package/dist/useMarketingMaterialActions-ClYoBaFw.js +0 -125
  154. package/dist/vue-i18n-DYnrLWFT.js +0 -2365
@@ -1,286 +0,0 @@
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-BAFiJnEb.js";
3
- import { u as Q } from "./business-CJjiItSo.js";
4
- import { components as x, useSnackbar as X } from "@feedmepos/ui-library";
5
- import { u as O } from "./vue-i18n-DYnrLWFT.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-CEe3kSZM.js";
9
- import { useRouter as oe } from "vue-router";
10
- import { r as $ } from "./index-RUdMURTx.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
- };