@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.71

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 (152) hide show
  1. package/dist/{App-BonFFUVJ.js → App-B-Onur9k.js} +812 -666
  2. package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-BnEeKG1C.js} +14 -13
  3. package/dist/{Bin-Mu8gAiHw.js → Bin-BH9_nATR.js} +8 -8
  4. package/dist/Broadcast-Gt2ZLLpZ.js +302 -0
  5. package/dist/CampaignAnalytic-BT6zTgNk.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js} +6 -5
  7. package/dist/Card-dD52oor7.js +1084 -0
  8. package/dist/{Collections-CByXxRW_.js → Collections-7bwYNl3M.js} +14 -13
  9. package/dist/Credit-qZdlqXqR.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js +4213 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js} +35 -35
  13. package/dist/{Experience-B7J-aqPK.js → Experience-CAaWgWXP.js} +112 -86
  14. package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-BpfY6VnX.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-fhrbFb_5.js +356 -0
  17. package/dist/GiftCardSetup-CTwmNKim.js +736 -0
  18. package/dist/{Grab-C45MmlD9.js → Grab-BnPfb92x.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js} +1 -1
  20. package/dist/{Index-vQ6uP49O.js → Index-DRwvmm_j.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js} +1 -1
  23. package/dist/LoyaltyDashboard-8jn6SIWo.js +2865 -0
  24. package/dist/MainLayout-Bf42AcB1.js +143 -0
  25. package/dist/{Marketing-B6xMdQvW.js → Marketing-DruTMjiR.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-moEHd_gP.js} +15 -14
  27. package/dist/Member-C9VTQqIm.js +654 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js +1279 -0
  29. package/dist/MemberImportHistory-DZVwya9v.js +187 -0
  30. package/dist/MemberList-KusIfy1u.js +334 -0
  31. package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-msyjdzlI.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js} +5928 -5644
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js +40 -0
  34. package/dist/Mission-CUUxpBUF.js +360 -0
  35. package/dist/{Overview-nsyJGSCq.js → Overview-C9jyKXHX.js} +21 -20
  36. package/dist/Overview-CYKoF8Hp.js +1316 -0
  37. package/dist/Point-CPpQ07yp.js +288 -0
  38. package/dist/Promotion-CJ95m9Qb.js +423 -0
  39. package/dist/{Queue-Dkipt6fw.js → Queue-CX39ILh_.js} +14 -13
  40. package/dist/{Record-BFqx6vM-.js → Record-6I0qyXB5.js} +9 -9
  41. package/dist/Review-DoWu2XNT.js +45 -0
  42. package/dist/ReviewFacebookCallback-Co-5TnI7.js +238 -0
  43. package/dist/ReviewGoogleCallback-Ca7ZuMcF.js +213 -0
  44. package/dist/{Reward-DjFEE7I_.js → Reward-Cx_N6qBJ.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js} +196 -186
  47. package/dist/{Segment-BAjdUfZ6.js → Segment-Bx0EW966.js} +275 -276
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js} +37 -36
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js} +4 -4
  50. package/dist/{Setting-BK7y0XC-.js → Setting-DzEK3dWj.js} +14 -14
  51. package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-BNALbI88.js} +12 -12
  52. package/dist/Settings-Cw85-xzq.js +230 -0
  53. package/dist/Store-BSqW1gwf.js +2612 -0
  54. package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-CJXnS8Qf.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js} +2 -2
  57. package/dist/{Tier-BF3V430O.js → Tier-DfitNxp2.js} +2580 -754
  58. package/dist/{Title-DwPuqKfJ.js → Title-QCbtOvKB.js} +39 -37
  59. package/dist/Transaction-dOCzlidD.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js} +26 -26
  61. package/dist/{Voucher-DnhVIl_o.js → Voucher-BfoCDwjg.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js} +118 -124
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js} +2 -2
  64. package/dist/{app-i3r-6ZVm.js → app-BxTElIm-.js} +45168 -37577
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-BmUK8hMh.js +75 -0
  67. package/dist/{business-i0Gxk7gG.js → business-DjAiT8tR.js} +5 -5
  68. package/dist/campaign-DlR3KF9m.js +368 -0
  69. package/dist/campaign-tAmQNoq7.js +100 -0
  70. package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BjwEQd11.js} +1 -1
  71. package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn-C6kWWIQx.js} +53 -53
  72. package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-BrtXpT9S.js} +1 -1
  73. package/dist/collection.fn-CDhfM3Eq.js +26 -0
  74. package/dist/currency-10nX5QnT.js +7 -0
  75. package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-6oMZOvfM.js} +11 -11
  76. package/dist/{effect-DM4AzeQl.js → effect-T4YzuTc5.js} +1 -1
  77. package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-BjODnJMM.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkdISSVP.js → helper-BCl5r5yZ.js} +1 -1
  80. package/dist/{index-DgzNGQgE.js → index-B9ZMIUMa.js} +2083 -2559
  81. package/dist/{index-CB7ytKOE.js → index-BBsK7TUw.js} +1588 -1522
  82. package/dist/index-BQk6zTgf.js +32437 -0
  83. package/dist/index-Bd4clHfr.js +901 -0
  84. package/dist/index-BeVWchv7.js +14550 -0
  85. package/dist/index-Bht1Z11w.js +72 -0
  86. package/dist/{index-FD50UHqf.js → index-BiolIgqR.js} +105 -123
  87. package/dist/{index-Cl8t41Sk.js → index-BxU--5J5.js} +5 -5
  88. package/dist/index-Bz6oSli7.js +151 -0
  89. package/dist/index-C5IfNJUl.js +53 -0
  90. package/dist/{index-BWsj6lCJ.js → index-CRvUvCMA.js} +14 -14
  91. package/dist/{index-B6xi1soU.js → index-CnaQt4Pn.js} +1 -1
  92. package/dist/{index-4EtrCy_K.js → index-Ctja--IE.js} +4 -4
  93. package/dist/{index-D6qeYVNz.js → index-D8rGhchh.js} +1 -1
  94. package/dist/{index-BrboOmPq.js → index-DJdTDF9C.js} +347 -216
  95. package/dist/index-DXiJa8Cw.js +137 -0
  96. package/dist/{index-CxdLExX0.js → index-DeQKLilv.js} +24 -9
  97. package/dist/{index-vI-ndGu_.js → index-DhtKt4OL.js} +5 -5
  98. package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-CEOegJjn.js} +132 -132
  99. package/dist/{loading-DTKDhqew.js → loading-Dx4SCvZY.js} +1 -1
  100. package/dist/{lodash-CCPBsqhe.js → lodash-Dq8OKCKK.js} +1 -1
  101. package/dist/member-import-DX-jn2uk.js +187 -0
  102. package/dist/membership-CltAa-gH.js +274 -0
  103. package/dist/{money-wMK3QkZ5.js → money-DsaAjJTI.js} +1 -1
  104. package/dist/{number-DjKVlWn0.js → number-DmhHKYgY.js} +1 -1
  105. package/dist/objectid-BdNv-dZX.js +145 -0
  106. package/dist/{plugins-D25PaNJk.js → plugins-BFKVM3uC.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-E63jqJHm.js → reward--SjvIeyy.js} +1 -1
  109. package/dist/{rule-RVvPtAnk.js → rule-CAKdNobZ.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-zNxOQaqe.js → template-Cfxc5eM8.js} +6 -6
  112. package/dist/timezone-D2b-V5XD.js +20 -0
  113. package/dist/transaction.fn-B5mLY7bz.js +71 -0
  114. package/dist/{trigger-BXV02FhP.js → trigger-DvYcjRBZ.js} +17 -17
  115. package/dist/useMarketingMaterialActions-DtqnjMSt.js +96 -0
  116. package/dist/{usePagination-BPcPhEnp.js → usePagination-DKX24g31.js} +1 -1
  117. package/dist/{user-Bd8S7R5u.js → user-fWb1NxGO.js} +1 -1
  118. package/dist/vue-i18n-wJReAVJw.js +2365 -0
  119. package/dist/{xlsx-_tQC9Ezf.js → xlsx-Mthhu4JR.js} +440 -440
  120. package/dist/{zod-C1j2GLZP.js → zod-CVpVUgBZ.js} +1 -1
  121. package/package.json +10 -6
  122. package/dist/Broadcast-Cy-i-WOT.js +0 -266
  123. package/dist/Card-f2XOtWxp.js +0 -910
  124. package/dist/Credit-CcZF4aQS.js +0 -260
  125. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js +0 -3377
  127. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  128. package/dist/Game-CUW7NeVG.js +0 -330
  129. package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
  130. package/dist/MainLayout-R5NxIBR-.js +0 -41
  131. package/dist/Member-CC5F6Bmz.js +0 -280
  132. package/dist/MemberList-Cq4zxopX.js +0 -1601
  133. package/dist/Mission-DcCZ6tAG.js +0 -334
  134. package/dist/Point-D1vLd5hL.js +0 -262
  135. package/dist/Promotion-Cv7MW5RJ.js +0 -397
  136. package/dist/Review-CKhakUMe.js +0 -1123
  137. package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
  138. package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
  139. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
  140. package/dist/Store-uTRQ6KbC.js +0 -1996
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
  142. package/dist/Transaction-CnTEfMGU.js +0 -39
  143. package/dist/campaign-CbMlARNI.js +0 -219
  144. package/dist/campaign-f7FT91GR.js +0 -277
  145. package/dist/export-DQR-0lmK.js +0 -97
  146. package/dist/index-COrXX9MR.js +0 -52
  147. package/dist/index-CWiaP-aV.js +0 -28900
  148. package/dist/index-jVfDVEtz.js +0 -85
  149. package/dist/membership-rifuatxU.js +0 -255
  150. package/dist/objectid-DjpWkCxH.js +0 -145
  151. package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
  152. package/dist/vue-i18n-CgMK-TaC.js +0 -2365
@@ -0,0 +1,1316 @@
1
+ import { defineComponent as O, ref as k, computed as m, resolveComponent as X, openBlock as r, createBlock as U, unref as e, withCtx as V, createVNode as g, normalizeClass as G, createElementVNode as l, toDisplayString as d, createElementBlock as u, Fragment as Y, renderList as P, useModel as K, onMounted as oe, isRef as N, createCommentVNode as I, watch as W, withModifiers as Z, renderSlot as ee, createTextVNode as _, Teleport as ge, createSlots as we, onUnmounted as fe, normalizeStyle as le, nextTick as pe } from "vue";
2
+ import { h as q } from "./moment-D7p2TMB-.js";
3
+ import { u as j } from "./vue-i18n-wJReAVJw.js";
4
+ import { _ as ye } from "./DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js";
5
+ import { _ as se } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
6
+ import { u as he } from "./business-DjAiT8tR.js";
7
+ import { components as B, useSnackbar as be } from "@feedmepos/ui-library";
8
+ import { g as xe } from "./google-C3S8u0mT.js";
9
+ import { r as $ } from "./index-Bht1Z11w.js";
10
+ const ke = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ce = /* @__PURE__ */ O({
11
+ __name: "SortChip",
12
+ props: {
13
+ modelValue: {
14
+ type: String,
15
+ required: !0
16
+ },
17
+ items: {
18
+ type: Array,
19
+ required: !0
20
+ },
21
+ label: {
22
+ type: String,
23
+ default: "Sort by: "
24
+ },
25
+ placement: {
26
+ type: String,
27
+ default: "bottom-end"
28
+ },
29
+ class: {
30
+ type: String,
31
+ default: "text-fm-color-neutral-gray-400 cursor-pointer"
32
+ }
33
+ },
34
+ emits: ["update:model-value"],
35
+ setup(t, { emit: a }) {
36
+ const s = t, o = a, n = k(!1), c = m(
37
+ () => {
38
+ var f;
39
+ return ((f = s.items.find((w) => w.value === s.modelValue)) == null ? void 0 : f.label) ?? "";
40
+ }
41
+ );
42
+ function i(f) {
43
+ o("update:model-value", f), n.value = !1;
44
+ }
45
+ return (f, w) => {
46
+ const C = X("FmIcon"), E = X("FmChip"), F = X("FmMenuItem"), R = X("FmMenu");
47
+ return r(), U(R, {
48
+ placement: t.placement,
49
+ "model-value": e(n),
50
+ "close-on-click": !0,
51
+ onMenuChanged: w[0] || (w[0] = (y) => n.value = y)
52
+ }, {
53
+ "menu-button": V(() => [
54
+ g(E, {
55
+ label: `${t.label}${e(c)}`,
56
+ class: G(s.class)
57
+ }, {
58
+ default: V(() => [
59
+ l("div", ke, d(t.label) + d(e(c)), 1),
60
+ g(C, {
61
+ name: e(n) ? "keyboard_arrow_up" : "keyboard_arrow_down",
62
+ class: G(s.class),
63
+ outline: "",
64
+ size: "sm"
65
+ }, null, 8, ["name", "class"])
66
+ ]),
67
+ _: 1
68
+ }, 8, ["label", "class"])
69
+ ]),
70
+ default: V(() => [
71
+ (r(!0), u(Y, null, P(t.items, (y) => (r(), U(F, {
72
+ key: y.value,
73
+ value: y.value,
74
+ label: y.label,
75
+ onClick: (p) => i(y.value)
76
+ }, null, 8, ["value", "label", "onClick"]))), 128))
77
+ ]),
78
+ _: 1
79
+ }, 8, ["placement", "model-value"]);
80
+ };
81
+ }
82
+ }), Ce = { class: "flex justify-between gap-8" }, Ae = { class: "flex flex-wrap gap-8" }, Ie = /* @__PURE__ */ O({
83
+ __name: "ReviewListingController",
84
+ props: {
85
+ source: {
86
+ required: !0
87
+ },
88
+ sourceModifiers: {},
89
+ dateFrom: { required: !0 },
90
+ dateFromModifiers: {},
91
+ dateTo: { required: !0 },
92
+ dateToModifiers: {},
93
+ locationId: { required: !0 },
94
+ locationIdModifiers: {},
95
+ deletedFilter: {
96
+ required: !0
97
+ },
98
+ deletedFilterModifiers: {},
99
+ sort: { required: !0 },
100
+ sortModifiers: {}
101
+ },
102
+ emits: ["update:source", "update:dateFrom", "update:dateTo", "update:locationId", "update:deletedFilter", "update:sort"],
103
+ setup(t) {
104
+ const { t: a } = j(), s = K(t, "source"), o = K(t, "dateFrom"), n = K(t, "dateTo"), c = K(t, "locationId"), i = K(t, "deletedFilter"), f = K(t, "sort"), w = he(), C = m(() => [
105
+ { label: "Google", value: "google" },
106
+ { label: "FeedMe", value: "feedme" },
107
+ { label: "Feedvibe", value: "feedvibe" }
108
+ ]), E = m(() => [
109
+ ...w.locationOptions.map((h) => ({
110
+ label: h.label,
111
+ value: h.value
112
+ }))
113
+ ]), F = m(() => [
114
+ {
115
+ label: a("connect.review.filter.sort.createTime_desc"),
116
+ value: "createTime_desc"
117
+ },
118
+ {
119
+ label: a("connect.review.filter.sort.createTime_asc"),
120
+ value: "createTime_asc"
121
+ },
122
+ { label: a("connect.review.filter.sort.rating_asc"), value: "rating_asc" },
123
+ { label: a("connect.review.filter.sort.rating_desc"), value: "rating_desc" }
124
+ ]), R = m(() => [
125
+ {
126
+ label: a("connect.review.filter.deleted.all"),
127
+ value: "all"
128
+ },
129
+ {
130
+ label: a("connect.review.filter.deleted.exclude"),
131
+ value: "excludeDeleted"
132
+ }
133
+ ]), y = m({
134
+ get: () => s.value ?? [],
135
+ set: (h) => {
136
+ s.value = h.length ? h : null;
137
+ }
138
+ }), p = m({
139
+ get: () => c.value ? [c.value] : [],
140
+ set: (h) => {
141
+ c.value = h.length === 1 && h[0] ? h[0] : "";
142
+ }
143
+ }), v = m({
144
+ get: () => ({
145
+ startDate: o.value ?? void 0,
146
+ endDate: n.value ?? void 0
147
+ }),
148
+ set: (h) => {
149
+ o.value = h.startDate ?? null, n.value = h.endDate ?? null;
150
+ }
151
+ }), S = m(() => w.locations.length > 0);
152
+ return oe(() => w.readLocations()), (h, D) => (r(), u("div", Ce, [
153
+ l("div", Ae, [
154
+ g(se, {
155
+ modelValue: e(y),
156
+ "onUpdate:modelValue": D[0] || (D[0] = (T) => N(y) ? y.value = T : null),
157
+ label: `${e(a)("connect.review.filter.source")}: `,
158
+ "show-item-label": !0,
159
+ items: e(C),
160
+ searchable: !1,
161
+ placement: "bottom-start"
162
+ }, null, 8, ["modelValue", "label", "items"]),
163
+ e(S) ? (r(), U(se, {
164
+ key: 0,
165
+ modelValue: e(p),
166
+ "onUpdate:modelValue": D[1] || (D[1] = (T) => N(p) ? p.value = T : null),
167
+ label: `${e(a)("connect.review.filter.location")}: `,
168
+ "show-item-label": !0,
169
+ items: e(E),
170
+ placement: "bottom-start"
171
+ }, null, 8, ["modelValue", "label", "items"])) : I("", !0),
172
+ g(ye, {
173
+ modelValue: e(v),
174
+ "onUpdate:modelValue": D[2] || (D[2] = (T) => N(v) ? v.value = T : null)
175
+ }, null, 8, ["modelValue"]),
176
+ g(ce, {
177
+ modelValue: i.value,
178
+ "onUpdate:modelValue": D[3] || (D[3] = (T) => i.value = T),
179
+ label: `${e(a)("connect.review.filter.deleted.label")}: `,
180
+ items: e(R),
181
+ placement: "bottom-start"
182
+ }, null, 8, ["modelValue", "label", "items"])
183
+ ]),
184
+ g(ce, {
185
+ modelValue: f.value,
186
+ "onUpdate:modelValue": D[4] || (D[4] = (T) => f.value = T),
187
+ label: `${e(a)("connect.review.filter.sort.label")}: `,
188
+ items: e(F),
189
+ placement: "bottom-start"
190
+ }, null, 8, ["modelValue", "label", "items"])
191
+ ]));
192
+ }
193
+ }), De = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='%231877F2'%3e%3cpath%20d='M24%2012.073c0-6.627-5.373-12-12-12s-12%205.373-12%2012c0%205.99%204.388%2010.954%2010.125%2011.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007%201.792-4.669%204.533-4.669%201.312%200%202.686.235%202.686.235v2.953H15.83c-1.491%200-1.956.925-1.956%201.874v2.25h3.328l-.532%203.47h-2.796v8.385C19.612%2023.027%2024%2018.062%2024%2012.073z'/%3e%3c/svg%3e", Me = { class: "flex h-full flex-col" }, Fe = { class: "shrink-0 border-b border-fm-color-neutral-gray-200 pb-[12px] pt-18" }, Se = { class: "flex items-center gap-[10px]" }, Be = { class: "min-w-0 flex-1" }, Ee = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, Re = { class: "flex items-center gap-4" }, Ue = { class: "ml-4 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, Ve = ["title"], Te = { class: "min-h-0 flex-1 overflow-y-auto py-[20px]" }, Ye = { class: "flex flex-col gap-16" }, Oe = {
194
+ key: 0,
195
+ class: "rounded-lg border border-red-200 bg-red-50 px-12 py-8 fm-typo-en-body-sm-600 text-red-700"
196
+ }, Qe = { class: "m-0 fm-typo-en-body-md-400 leading-22" }, Ge = { key: 1 }, Pe = { class: "mb-8 fm-typo-en-body-sm-600 uppercase tracking-wide text-fm-color-neutral-gray-400" }, ze = { class: "flex flex-wrap gap-8" }, Le = ["src", "alt"], Ne = { class: "flex flex-col gap-[10px] rounded-xl bg-fm-color-neutral-gray-100 py-[14px] px-[24px]" }, qe = { class: "flex justify-between gap-12 fm-typo-en-body-sm-400" }, He = { class: "text-fm-color-neutral-gray-400" }, je = { class: "font-semibold text-fm-color-neutral-gray-400" }, Je = { class: "flex justify-between gap-12 fm-typo-en-body-sm-400" }, Ke = { class: "text-fm-color-neutral-gray-400" }, Ze = { class: "text-right font-semibold text-fm-color-neutral-gray-400" }, We = { class: "flex justify-between gap-12 fm-typo-en-body-sm-400" }, Xe = { class: "text-fm-color-neutral-gray-400" }, _e = { class: "font-semibold text-fm-color-neutral-gray-400" }, $e = {
197
+ key: 0,
198
+ class: "flex justify-between gap-12 fm-typo-en-body-sm-400"
199
+ }, et = { class: "text-fm-color-neutral-gray-400" }, tt = { class: "font-semibold text-fm-color-neutral-gray-400" }, lt = {
200
+ key: 1,
201
+ class: "flex justify-between gap-12 fm-typo-en-body-sm-400"
202
+ }, ot = { class: "text-red-700" }, nt = { class: "font-semibold text-red-700" }, at = { class: "flex justify-between gap-12 fm-typo-en-body-sm-400" }, rt = { class: "text-fm-color-neutral-gray-400" }, it = { class: "font-mono text-xs text-fm-color-neutral-gray-400" }, st = {
203
+ key: 0,
204
+ class: "shrink-0 border-t border-fm-color-neutral-gray-200 py-[12px]"
205
+ }, ct = /* @__PURE__ */ O({
206
+ __name: "ReviewDetailSheet",
207
+ props: {
208
+ modelValue: { type: Boolean },
209
+ review: {},
210
+ referenceId: {},
211
+ location: {},
212
+ platformName: {},
213
+ reviewerPictureUrl: {}
214
+ },
215
+ emits: ["update:modelValue"],
216
+ setup(t, { emit: a }) {
217
+ const { FmButton: s } = B, { t: o } = j(), n = t, c = a, i = m({
218
+ get: () => n.modelValue,
219
+ set: (h) => c("update:modelValue", h)
220
+ }), f = m(() => {
221
+ var h;
222
+ return (h = n.review.reviewer) == null ? void 0 : h.name;
223
+ }), w = m(() => {
224
+ if (n.review.source === "google" || n.review.source === "feedme")
225
+ return n.review.starRating;
226
+ if (n.review.source === "feedvibe") return n.review.rating.overall;
227
+ }), C = m(() => n.review.source === "google" || n.review.source === "feedme" || n.review.source === "feedvibe" ? n.review.mediaItems : []), E = m(
228
+ () => q(n.review.createTime).format("D MMM YYYY, hh:mm A")
229
+ ), F = m(() => n.review.updateTime ? new Date(n.review.updateTime).getTime() !== new Date(n.review.createTime).getTime() : !1), R = m(
230
+ () => F.value ? q(n.review.updateTime).format("D MMM YYYY, hh:mm A") : void 0
231
+ ), y = m(
232
+ () => F.value ? o("connect.review.overview.editedAt", { time: R.value }) : E.value
233
+ ), p = m(
234
+ () => n.review.deletedAt ? q(n.review.deletedAt).format("D MMM YYYY, hh:mm A") : void 0
235
+ ), v = m(() => {
236
+ if (n.review.source === "google")
237
+ return n.review.originalUrl;
238
+ });
239
+ function S() {
240
+ v.value && window.open(v.value, "_blank", "noopener,noreferrer");
241
+ }
242
+ return (h, D) => {
243
+ const T = X("FmSideSheet");
244
+ return r(), U(T, {
245
+ modelValue: i.value,
246
+ "onUpdate:modelValue": D[1] || (D[1] = (M) => i.value = M),
247
+ "max-width": 560,
248
+ "close-button": !1,
249
+ "dismiss-away": !0
250
+ }, {
251
+ default: V(() => [
252
+ l("div", Me, [
253
+ l("div", Fe, [
254
+ l("div", Se, [
255
+ g(e(B).FmAvatar, {
256
+ name: t.reviewerPictureUrl ? void 0 : f.value,
257
+ src: t.reviewerPictureUrl,
258
+ size: "md",
259
+ class: "h-40 w-40 shrink-0"
260
+ }, null, 8, ["name", "src"]),
261
+ l("div", Be, [
262
+ l("div", Ee, d(f.value || e(o)("connect.review.detail.anonymous")), 1),
263
+ l("div", Re, [
264
+ (r(), u(Y, null, P(5, (M) => g(e(B).FmIcon, {
265
+ key: M,
266
+ name: "star",
267
+ size: "sm",
268
+ class: G(
269
+ M <= Math.round(w.value || 0) ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
270
+ )
271
+ }, null, 8, ["class"])), 64)),
272
+ l("span", Ue, d(y.value), 1)
273
+ ])
274
+ ]),
275
+ l("button", {
276
+ type: "button",
277
+ title: e(o)("connect.review.detail.close"),
278
+ class: "flex h-[30px] w-[30px] items-center justify-center rounded-lg border-0 bg-transparent text-fm-color-neutral-gray-400 hover:bg-fm-color-neutral-gray-100",
279
+ onClick: D[0] || (D[0] = (M) => i.value = !1)
280
+ }, [
281
+ g(e(B).FmIcon, {
282
+ name: "close",
283
+ size: "sm"
284
+ })
285
+ ], 8, Ve)
286
+ ])
287
+ ]),
288
+ l("div", Te, [
289
+ l("div", Ye, [
290
+ p.value ? (r(), u("div", Oe, d(e(o)("connect.review.detail.deleted")), 1)) : I("", !0),
291
+ l("p", Qe, d(t.review.comment || e(o)("connect.review.detail.noComment")), 1),
292
+ C.value.length ? (r(), u("div", Ge, [
293
+ l("div", Pe, d(e(o)("connect.review.detail.photos", { n: C.value.length })), 1),
294
+ l("div", ze, [
295
+ (r(!0), u(Y, null, P(C.value, (M, J) => (r(), u("div", {
296
+ key: M.externalId || J,
297
+ class: "flex h-[76px] w-[76px] items-center justify-center overflow-hidden rounded-lg bg-fm-color-neutral-gray-100"
298
+ }, [
299
+ l("img", {
300
+ src: M.thumbnailUrl,
301
+ alt: M.thumbnailLabel,
302
+ class: "h-full w-full object-cover"
303
+ }, null, 8, Le)
304
+ ]))), 128))
305
+ ])
306
+ ])) : I("", !0),
307
+ l("div", Ne, [
308
+ l("div", qe, [
309
+ l("span", He, d(e(o)("connect.review.detail.source")), 1),
310
+ l("span", je, d(t.platformName), 1)
311
+ ]),
312
+ l("div", Je, [
313
+ l("span", Ke, d(e(o)("connect.review.detail.outlet")), 1),
314
+ l("span", Ze, d(t.location || e(o)("connect.review.detail.emptyValue")), 1)
315
+ ]),
316
+ l("div", We, [
317
+ l("span", Xe, d(e(o)("connect.review.detail.createTime")), 1),
318
+ l("span", _e, d(E.value), 1)
319
+ ]),
320
+ R.value ? (r(), u("div", $e, [
321
+ l("span", et, d(e(o)("connect.review.detail.updateTime")), 1),
322
+ l("span", tt, d(R.value), 1)
323
+ ])) : I("", !0),
324
+ p.value ? (r(), u("div", lt, [
325
+ l("span", ot, d(e(o)("connect.review.detail.deletedAt")), 1),
326
+ l("span", nt, d(p.value), 1)
327
+ ])) : I("", !0),
328
+ l("div", at, [
329
+ l("span", rt, d(e(o)("connect.review.detail.referenceId")), 1),
330
+ l("span", it, d(t.referenceId), 1)
331
+ ])
332
+ ])
333
+ ])
334
+ ]),
335
+ v.value && !t.review.deletedAt ? (r(), u("div", st, [
336
+ g(e(s), {
337
+ variant: "primary",
338
+ size: "md",
339
+ "prepend-icon": "open_in_new",
340
+ label: e(o)("connect.review.detail.openOriginalLink"),
341
+ class: "w-full",
342
+ onClick: S
343
+ }, null, 8, ["label"])
344
+ ])) : I("", !0)
345
+ ])
346
+ ]),
347
+ _: 1
348
+ }, 8, ["modelValue"]);
349
+ };
350
+ }
351
+ }), dt = 300, de = /* @__PURE__ */ new Map();
352
+ let ue = Promise.resolve();
353
+ function ut(t) {
354
+ const a = de.get(t);
355
+ if (a) return a;
356
+ const s = ue.then(
357
+ () => new Promise((o) => {
358
+ const n = new Image();
359
+ n.onload = () => o(!0), n.onerror = () => o(!1), n.src = t;
360
+ })
361
+ );
362
+ return de.set(t, s), ue = s.then(
363
+ () => new Promise(
364
+ (o) => setTimeout(o, dt)
365
+ )
366
+ ), s;
367
+ }
368
+ const ve = /* @__PURE__ */ O({
369
+ __name: "ReviewerProfileImage",
370
+ props: {
371
+ name: {},
372
+ pictureUrl: {},
373
+ isGoogle: { type: Boolean }
374
+ },
375
+ emits: ["loaded"],
376
+ setup(t, { emit: a }) {
377
+ const s = t, o = a, n = k();
378
+ return W(
379
+ () => [s.pictureUrl, s.isGoogle],
380
+ async ([c, i]) => {
381
+ n.value = i ? void 0 : c, o("loaded", n.value), i && c && await ut(c) && s.pictureUrl === c && s.isGoogle === i && (n.value = c, o("loaded", c));
382
+ },
383
+ { immediate: !0 }
384
+ ), (c, i) => (r(), U(e(B).FmAvatar, {
385
+ name: n.value ? void 0 : t.name,
386
+ src: n.value,
387
+ size: "md",
388
+ class: "h-40 w-40 shrink-0"
389
+ }, null, 8, ["name", "src"]));
390
+ }
391
+ }), mt = { class: "absolute right-[16px] top-[16px] z-10 flex gap-8" }, vt = { class: "flex items-start gap-12" }, gt = { class: "min-w-0 flex flex-col flex-1 gap-8" }, wt = { class: "flex flex-wrap items-start justify-between gap-8" }, ft = { class: "flex min-w-0 flex-wrap items-center gap-x-8 gap-y-4" }, pt = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, yt = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, ht = {
392
+ key: 0,
393
+ class: "inline-flex items-center gap-4 rounded-full bg-red-100 px-8 py-4 fm-typo-en-body-sm-600 text-red-700"
394
+ }, bt = { class: "flex flex-wrap items-center gap-8" }, xt = { class: "inline-flex items-center gap-4 rounded-full bg-fm-color-neutral-gray-100 px-12 py-4" }, kt = ["src", "alt"], Ct = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, At = {
395
+ key: 0,
396
+ class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
397
+ }, It = { class: "mb-4 flex items-center justify-between gap-8 fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Dt = { class: "font-normal" }, Mt = { class: "m-0 whitespace-pre-line fm-typo-en-body-sm-400" }, Ft = {
398
+ key: 1,
399
+ class: "mt-4"
400
+ }, ne = /* @__PURE__ */ O({
401
+ __name: "ReviewCardTemplate",
402
+ props: {
403
+ review: {},
404
+ logo: {},
405
+ logoAlt: {},
406
+ gap: {},
407
+ originalLink: {},
408
+ onReply: { type: Function }
409
+ },
410
+ setup(t) {
411
+ const { FmButton: a } = B, { t: s } = j(), o = t, n = m(() => {
412
+ var v;
413
+ return (v = o.review.reviewer) == null ? void 0 : v.name;
414
+ }), c = m(() => {
415
+ var v;
416
+ return (v = o.review.reviewer) == null ? void 0 : v.pictureUrl;
417
+ }), i = k(), f = m(() => o.review.restaurantName), w = m(() => {
418
+ if (o.review.source === "google" || o.review.source === "feedme")
419
+ return o.review.reply;
420
+ }), C = m(() => {
421
+ switch (o.review.source) {
422
+ case "google":
423
+ return "Google";
424
+ case "facebook":
425
+ return "Facebook";
426
+ case "feedme":
427
+ return "FeedMe";
428
+ case "feedvibe":
429
+ return "Feedvibe";
430
+ }
431
+ }), E = m(
432
+ () => o.review.source === "feedme" ? o.review.billId : o.review.externalId || ""
433
+ ), F = m(() => o.review.updateTime ? new Date(o.review.updateTime).getTime() !== new Date(o.review.createTime).getTime() : !1), R = m(() => {
434
+ const v = F.value ? o.review.updateTime : o.review.createTime;
435
+ return q(v).format("D MMM YYYY, hh:mm A");
436
+ });
437
+ function y() {
438
+ o.originalLink && window.open(o.originalLink, "_blank", "noopener,noreferrer");
439
+ }
440
+ const p = k(!1);
441
+ return (v, S) => (r(), u(Y, null, [
442
+ l("div", {
443
+ class: "relative cursor-pointer rounded-xl border border-fm-color-neutral-gray-200 bg-white p-16 transition-colors hover:border-fm-color-neutral-gray-300",
444
+ onClick: S[3] || (S[3] = (h) => p.value = !0)
445
+ }, [
446
+ l("div", mt, [
447
+ t.originalLink && !t.review.deletedAt ? (r(), U(e(a), {
448
+ key: 0,
449
+ variant: "secondary",
450
+ size: "md",
451
+ "prepend-icon": "open_in_new",
452
+ label: e(s)("connect.review.overview.originalLink"),
453
+ onClick: Z(y, ["stop"])
454
+ }, null, 8, ["label"])) : I("", !0),
455
+ t.onReply && !t.review.deletedAt ? (r(), U(e(a), {
456
+ key: 1,
457
+ variant: "primary",
458
+ size: "md",
459
+ "prepend-icon": "reply",
460
+ label: w.value && t.review.source === "google" ? e(s)("connect.review.overview.editReply") : e(s)("connect.review.overview.reply"),
461
+ onClick: S[0] || (S[0] = Z((h) => t.onReply(t.review), ["stop"]))
462
+ }, null, 8, ["label"])) : I("", !0)
463
+ ]),
464
+ l("div", vt, [
465
+ g(ve, {
466
+ name: n.value,
467
+ "picture-url": c.value,
468
+ "is-google": t.review.source === "google",
469
+ onLoaded: S[1] || (S[1] = (h) => i.value = h)
470
+ }, null, 8, ["name", "picture-url", "is-google"]),
471
+ l("div", gt, [
472
+ l("div", wt, [
473
+ l("div", ft, [
474
+ l("span", pt, d(n.value || e(s)("connect.review.overview.anonymous")), 1),
475
+ ee(v.$slots, "rating"),
476
+ l("span", yt, d(F.value ? e(s)("connect.review.overview.editedAt", { time: R.value }) : R.value), 1),
477
+ t.review.deletedAt ? (r(), u("span", ht, [
478
+ g(e(B).FmTooltip, {
479
+ content: e(s)("connect.review.overview.deletedInfo"),
480
+ "content-class": "max-w-[min(320px,calc(100vw-32px))] whitespace-normal",
481
+ placement: "left"
482
+ }, {
483
+ default: V(() => [
484
+ g(e(B).FmIcon, {
485
+ name: "info",
486
+ outline: "",
487
+ size: "sm"
488
+ })
489
+ ]),
490
+ _: 1
491
+ }, 8, ["content"]),
492
+ _(" " + d(e(s)("connect.review.overview.deleted")), 1)
493
+ ])) : I("", !0)
494
+ ])
495
+ ]),
496
+ l("div", bt, [
497
+ l("span", xt, [
498
+ l("img", {
499
+ src: t.logo,
500
+ alt: t.logoAlt || C.value,
501
+ class: "h-16 w-16"
502
+ }, null, 8, kt),
503
+ l("span", Ct, d(C.value), 1)
504
+ ]),
505
+ S[5] || (S[5] = l("span", { class: "text-fm-color-neutral-gray-400" }, "·", -1)),
506
+ f.value ? (r(), u("span", At, d(f.value), 1)) : I("", !0)
507
+ ]),
508
+ ee(v.$slots, "details"),
509
+ ee(v.$slots, "comment", {}, () => [
510
+ l("p", {
511
+ class: G(["mt-8 line-clamp-3 fm-typo-en-body-md-400", {
512
+ "italic text-fm-color-neutral-gray-400": !t.review.comment
513
+ }])
514
+ }, d(t.review.comment || e(s)("connect.review.overview.noComment")), 3)
515
+ ]),
516
+ w.value ? (r(), u("div", {
517
+ key: 0,
518
+ class: G(["rounded-lg bg-fm-color-neutral-gray-100 px-12 py-8", { "cursor-pointer": t.onReply && !t.review.deletedAt }]),
519
+ onClick: S[2] || (S[2] = Z((h) => t.onReply && !t.review.deletedAt && t.onReply(t.review), ["stop"]))
520
+ }, [
521
+ l("div", It, [
522
+ l("span", null, d(e(s)("connect.review.overview.reply")), 1),
523
+ l("span", Dt, d(e(q)(w.value.updateTime).format("D MMM YYYY, hh:mm A")), 1)
524
+ ]),
525
+ l("p", Mt, d(w.value.comment), 1)
526
+ ], 2)) : I("", !0),
527
+ v.$slots.media ? (r(), u("div", Ft, [
528
+ ee(v.$slots, "media")
529
+ ])) : I("", !0)
530
+ ])
531
+ ])
532
+ ]),
533
+ g(ct, {
534
+ modelValue: p.value,
535
+ "onUpdate:modelValue": S[4] || (S[4] = (h) => p.value = h),
536
+ review: t.review,
537
+ "reference-id": E.value,
538
+ location: f.value,
539
+ "platform-name": C.value,
540
+ "reviewer-picture-url": i.value
541
+ }, null, 8, ["modelValue", "review", "reference-id", "location", "platform-name", "reviewer-picture-url"])
542
+ ], 64));
543
+ }
544
+ }), St = {
545
+ key: 0,
546
+ class: "flex items-center gap-4"
547
+ }, Bt = /* @__PURE__ */ O({
548
+ __name: "FacebookReviewCard",
549
+ props: {
550
+ review: {}
551
+ },
552
+ setup(t) {
553
+ const { t: a } = j();
554
+ return (s, o) => (r(), U(ne, {
555
+ review: t.review,
556
+ logo: e(De)
557
+ }, {
558
+ rating: V(() => [
559
+ t.review.isPositive != null ? (r(), u("div", St, [
560
+ g(e(B).FmIcon, {
561
+ name: t.review.isPositive ? "thumb_up" : "thumb_down",
562
+ size: "sm",
563
+ class: G(
564
+ t.review.isPositive ? "text-fm-color-typo-success" : "text-fm-color-system-error-500"
565
+ )
566
+ }, null, 8, ["name", "class"]),
567
+ l("span", {
568
+ class: G([
569
+ "fm-typo-en-body-sm-400",
570
+ t.review.isPositive ? "text-fm-color-typo-success" : "text-fm-color-system-error-500"
571
+ ])
572
+ }, d(t.review.isPositive ? e(a)("connect.review.overview.positive") : e(a)("connect.review.overview.negative")), 3)
573
+ ])) : I("", !0)
574
+ ]),
575
+ _: 1
576
+ }, 8, ["review", "logo"]));
577
+ }
578
+ }), Et = "data:image/svg+xml,%3csvg%20width='388'%20height='388'%20viewBox='0%200%20388%20388'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M239.449%200H148.553C66.5106%200%200.00195312%2066.5086%200.00195312%20148.551V239.447C0.00195312%20321.489%2066.5106%20387.998%20148.553%20387.998H239.449C321.491%20387.998%20388%20321.489%20388%20239.447V148.551C388%2066.5086%20321.491%200%20239.449%200Z'%20fill='url(%23paint0_linear_feedme_logo)'%20/%3e%3cmask%20id='mask0_feedme_logo'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='388'%20height='388'%3e%3cpath%20d='M239.447%200H148.551C66.5086%200%200%2066.5086%200%20148.551V239.447C0%20321.489%2066.5086%20387.998%20148.551%20387.998H239.447C321.49%20387.998%20387.998%20321.489%20387.998%20239.447V148.551C387.998%2066.5086%20321.49%200%20239.447%200Z'%20fill='white'%20/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_feedme_logo)'%3e%3cpath%20d='M82.587%20258.589V258.76C83.2747%20264.893%2084.1917%20271.598%2085.3953%20278.648L101.271%20392.296H127.462V253.946C127.462%20241.395%20137.033%20231.194%20148.839%20231.194H150.329C162.135%20231.194%20171.706%20241.395%20171.706%20253.946V392.296H216.352V253.946C216.352%20241.395%20225.923%20231.194%20237.729%20231.194H239.219C251.025%20231.194%20260.596%20241.395%20260.596%20253.946V392.296H286.959L302.835%20277.788C303.981%20271.025%20304.841%20264.549%20305.471%20258.589V258.187C307.649%20238.759%20307.649%20225.061%20307.649%20225.061C307.649%20182.938%20290.054%20148.264%20252.286%20119.78C241.97%20112.043%20233.029%20100.466%20232.17%2075.7079C232.17%2075.7079%20229.705%2012.9519%20253.719%20-33.7568H134.339C158.353%2012.9519%20155.888%2075.7079%20155.888%2075.7079C155.029%20100.409%20146.088%20111.986%20135.772%20119.78C97.9465%20148.321%2080.4092%20182.938%2080.4092%20225.061C80.4092%20225.061%2080.4092%20238.873%2082.587%20258.474V258.589Z'%20fill='white'%20/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_feedme_logo'%20x1='43.5013'%20y1='344.556'%20x2='344.501'%20y2='43.5567'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF5D53'%20/%3e%3cstop%20offset='1'%20stop-color='%23FCA23E'%20/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", Rt = {
579
+ key: 0,
580
+ class: "flex flex-wrap gap-8"
581
+ }, Ut = ["onClick"], Vt = ["src", "alt"], Tt = {
582
+ key: 0,
583
+ class: "absolute inset-0 flex items-center justify-center bg-black/30"
584
+ }, Yt = ["src"], Ot = ["src", "alt"], ae = /* @__PURE__ */ O({
585
+ __name: "ReviewCardMedia",
586
+ props: {
587
+ mediaItems: {}
588
+ },
589
+ setup(t) {
590
+ const a = k(null);
591
+ return (s, o) => t.mediaItems && t.mediaItems.length > 0 ? (r(), u("div", Rt, [
592
+ (r(!0), u(Y, null, P(t.mediaItems, (n, c) => (r(), u("div", {
593
+ key: c,
594
+ class: "relative w-72 h-72 rounded-lg overflow-hidden border border-fm-color-neutral-gray-200 shrink-0 cursor-pointer hover:opacity-90 transition-opacity",
595
+ onClick: Z((i) => a.value = n, ["stop"])
596
+ }, [
597
+ l("img", {
598
+ src: n.thumbnailUrl,
599
+ alt: n.thumbnailLabel,
600
+ class: "w-full h-full object-cover"
601
+ }, null, 8, Vt),
602
+ n.videoUrl ? (r(), u("div", Tt, [
603
+ g(e(B).FmIcon, {
604
+ name: "play_arrow",
605
+ class: "text-white"
606
+ })
607
+ ])) : I("", !0)
608
+ ], 8, Ut))), 128)),
609
+ (r(), U(ge, { to: "body" }, [
610
+ a.value ? (r(), u("div", {
611
+ key: 0,
612
+ class: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",
613
+ onClick: o[2] || (o[2] = (n) => a.value = null)
614
+ }, [
615
+ l("button", {
616
+ class: "absolute top-16 right-16 z-50 p-8 text-white hover:text-fm-color-neutral-gray-300 transition-colors",
617
+ onClick: o[0] || (o[0] = (n) => a.value = null)
618
+ }, [
619
+ g(e(B).FmIcon, {
620
+ name: "close",
621
+ size: "lg"
622
+ })
623
+ ]),
624
+ l("div", {
625
+ class: "relative max-w-[90vw] max-h-[90vh] flex items-center justify-center",
626
+ onClick: o[1] || (o[1] = Z(() => {
627
+ }, ["stop"]))
628
+ }, [
629
+ a.value.videoUrl ? (r(), u("video", {
630
+ key: 0,
631
+ src: a.value.videoUrl,
632
+ controls: "",
633
+ autoplay: "",
634
+ class: "max-w-full max-h-[90vh] rounded-lg shadow-lg"
635
+ }, null, 8, Yt)) : (r(), u("img", {
636
+ key: 1,
637
+ src: a.value.thumbnailUrl,
638
+ alt: a.value.thumbnailLabel,
639
+ class: "max-w-full max-h-[90vh] rounded-lg shadow-lg object-contain"
640
+ }, null, 8, Ot))
641
+ ])
642
+ ])) : I("", !0)
643
+ ]))
644
+ ])) : I("", !0);
645
+ }
646
+ }), Qt = { class: "flex items-center gap-4" }, Gt = /* @__PURE__ */ O({
647
+ __name: "FeedmeReviewCard",
648
+ props: {
649
+ review: {}
650
+ },
651
+ setup(t) {
652
+ const a = t, s = m(() => {
653
+ var c, i;
654
+ const n = (i = (c = a.review.reviewer) == null ? void 0 : c.phoneNumber) == null ? void 0 : i.replace(/\D/g, "");
655
+ return n ? `https://wa.me/${n}` : void 0;
656
+ });
657
+ function o() {
658
+ s.value && window.open(s.value, "_blank", "noopener,noreferrer");
659
+ }
660
+ return (n, c) => (r(), U(ne, {
661
+ review: t.review,
662
+ logo: e(Et),
663
+ "logo-alt": "FeedMe",
664
+ "on-reply": s.value ? o : void 0
665
+ }, {
666
+ rating: V(() => [
667
+ l("div", Qt, [
668
+ (r(), u(Y, null, P(5, (i) => g(e(B).FmIcon, {
669
+ key: i,
670
+ name: "star",
671
+ size: "sm",
672
+ class: G(
673
+ i <= t.review.starRating ? "text-yellow-400" : "text-fm-color-neutral-gray-200"
674
+ )
675
+ }, null, 8, ["class"])), 64))
676
+ ])
677
+ ]),
678
+ media: V(() => [
679
+ g(ae, {
680
+ "media-items": t.review.mediaItems
681
+ }, null, 8, ["media-items"])
682
+ ]),
683
+ _: 1
684
+ }, 8, ["review", "logo", "on-reply"]));
685
+ }
686
+ }), Pt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIMAAABjCAYAAAC42bPkAAAjBElEQVR4Ae1deZClV1U/53uve5ZMMj2SiAatvEGUEinTUxIV1JqeKJIAcSYqVe7p1rIQLZkeS1EQ6R6tsigUZ0K5QCFOD1KFfwAzYUsAZV4gbFo4EyxArZK8FFv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= { class: "flex flex-wrap items-center gap-x-8 gap-y-4 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-500" }, Nt = { class: "font-semibold text-fm-color-neutral-gray-400" }, qt = { class: "font-semibold text-fm-color-neutral-gray-400" }, Ht = { class: "font-semibold text-fm-color-neutral-gray-400" }, jt = /* @__PURE__ */ O({
687
+ __name: "FeedvibeReviewCard",
688
+ props: {
689
+ review: {}
690
+ },
691
+ setup(t) {
692
+ const { t: a } = j();
693
+ return (s, o) => (r(), U(ne, {
694
+ review: t.review,
695
+ logo: e(Pt),
696
+ "logo-alt": "Feedvibe",
697
+ gap: "12"
698
+ }, {
699
+ rating: V(() => [
700
+ l("div", zt, [
701
+ (r(), u(Y, null, P(5, (n) => g(e(B).FmIcon, {
702
+ key: n,
703
+ name: "star",
704
+ size: "sm",
705
+ class: G(
706
+ n <= Math.round(t.review.rating.overall) ? "text-yellow-400" : "text-fm-color-neutral-gray-200"
707
+ )
708
+ }, null, 8, ["class"])), 64))
709
+ ])
710
+ ]),
711
+ details: V(() => [
712
+ l("div", Lt, [
713
+ l("span", null, [
714
+ _(d(e(a)("connect.review.overview.food")) + ": ", 1),
715
+ l("strong", Nt, d(t.review.rating.food) + "/5 ", 1)
716
+ ]),
717
+ o[0] || (o[0] = l("span", { "aria-hidden": "true" }, "|", -1)),
718
+ l("span", null, [
719
+ _(d(e(a)("connect.review.overview.service")) + ": ", 1),
720
+ l("strong", qt, d(t.review.rating.service) + "/5 ", 1)
721
+ ]),
722
+ o[1] || (o[1] = l("span", { "aria-hidden": "true" }, "|", -1)),
723
+ l("span", null, [
724
+ _(d(e(a)("connect.review.overview.atmosphere")) + ": ", 1),
725
+ l("strong", Ht, d(t.review.rating.atmosphere) + "/5 ", 1)
726
+ ])
727
+ ])
728
+ ]),
729
+ media: V(() => [
730
+ g(ae, {
731
+ "media-items": t.review.mediaItems
732
+ }, null, 8, ["media-items"])
733
+ ]),
734
+ _: 1
735
+ }, 8, ["review", "logo"]));
736
+ }
737
+ }), Jt = { class: "flex flex-col gap-16" }, Kt = { class: "rounded-lg bg-fm-color-neutral-gray-100 px-16 py-12" }, Zt = { class: "flex items-start gap-12" }, Wt = { class: "min-w-0 flex-1" }, Xt = { class: "mb-4 flex flex-wrap items-center gap-x-8 gap-y-4" }, _t = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, $t = { class: "flex items-center gap-2" }, el = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, tl = {
738
+ key: 0,
739
+ class: "mt-8"
740
+ }, ll = {
741
+ key: 0,
742
+ class: "m-0 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
743
+ }, ol = { class: "flex w-full items-center justify-between gap-8 pl-16" }, nl = { key: 1 }, al = { class: "flex gap-8" }, rl = /* @__PURE__ */ O({
744
+ __name: "GoogleReplyDialog",
745
+ props: {
746
+ modelValue: { type: Boolean },
747
+ review: {}
748
+ },
749
+ emits: ["update:modelValue", "replied"],
750
+ setup(t, { emit: a }) {
751
+ const { FmButton: s, FmDialog: o, FmIcon: n, FmTextarea: c } = B, i = t, f = a, { t: w } = j(), C = be(), E = k(""), F = k(!1), R = k(!1);
752
+ W(
753
+ () => i.modelValue,
754
+ (b) => {
755
+ var x;
756
+ b && (E.value = ((x = i.review.reply) == null ? void 0 : x.comment) ?? "");
757
+ }
758
+ );
759
+ const y = m(() => {
760
+ var b;
761
+ return !!((b = i.review.reply) != null && b.comment);
762
+ }), p = m(() => F.value || R.value), v = m(() => p.value || !E.value.trim()), S = m(
763
+ () => {
764
+ var b;
765
+ return ((b = i.review.reviewer) == null ? void 0 : b.name) || w("connect.review.overview.anonymous");
766
+ }
767
+ ), h = m(() => i.review.updateTime ? new Date(i.review.updateTime).getTime() !== new Date(i.review.createTime).getTime() : !1), D = m(() => {
768
+ const b = h.value ? i.review.updateTime : i.review.createTime;
769
+ return q(b).format("D MMM YYYY");
770
+ });
771
+ async function T() {
772
+ if (!v.value) {
773
+ F.value = !0;
774
+ try {
775
+ const b = await $.replyToGoogleReview(
776
+ i.review._id,
777
+ E.value.trim()
778
+ );
779
+ i.review.reply = b, C.open({
780
+ type: "success",
781
+ message: w("connect.review.overview.replyDialog.success")
782
+ }), f("update:modelValue", !1), f("replied");
783
+ } catch {
784
+ C.open({
785
+ type: "error",
786
+ message: w("connect.review.overview.replyDialog.failed")
787
+ });
788
+ } finally {
789
+ F.value = !1;
790
+ }
791
+ }
792
+ }
793
+ async function M() {
794
+ if (!(!y.value || p.value)) {
795
+ R.value = !0;
796
+ try {
797
+ await $.deleteGoogleReviewReply(i.review._id), i.review.reply = void 0, C.open({
798
+ type: "success",
799
+ message: w("connect.review.overview.replyDialog.deleteSuccess")
800
+ }), f("update:modelValue", !1), f("replied");
801
+ } catch {
802
+ C.open({
803
+ type: "error",
804
+ message: w("connect.review.overview.replyDialog.deleteFailed")
805
+ });
806
+ } finally {
807
+ R.value = !1;
808
+ }
809
+ }
810
+ }
811
+ function J() {
812
+ p.value || f("update:modelValue", !1);
813
+ }
814
+ return (b, x) => (r(), U(e(o), {
815
+ "model-value": t.modelValue,
816
+ "max-width": "560px",
817
+ "onUpdate:modelValue": x[1] || (x[1] = (A) => f("update:modelValue", A))
818
+ }, {
819
+ "dialog-header": V(() => [
820
+ _(d(e(w)("connect.review.overview.replyDialog.title")), 1)
821
+ ]),
822
+ "dialog-footer": V(() => [
823
+ l("div", ol, [
824
+ y.value ? (r(), U(e(s), {
825
+ key: 0,
826
+ variant: "tertiary",
827
+ "prepend-icon": "delete",
828
+ "text-color": "system-error-300",
829
+ "icon-color": "system-error-300",
830
+ label: e(w)("connect.review.overview.replyDialog.deleteReview"),
831
+ loading: R.value,
832
+ disabled: p.value,
833
+ onClick: M
834
+ }, null, 8, ["label", "loading", "disabled"])) : (r(), u("div", nl)),
835
+ l("div", al, [
836
+ g(e(s), {
837
+ variant: "tertiary",
838
+ label: e(w)("connect.common.cancel"),
839
+ disabled: p.value,
840
+ onClick: J
841
+ }, null, 8, ["label", "disabled"]),
842
+ g(e(s), {
843
+ variant: "primary",
844
+ label: y.value ? e(w)("connect.review.overview.replyDialog.saveChanges") : e(w)("connect.review.overview.replyDialog.postReply"),
845
+ loading: F.value,
846
+ disabled: v.value,
847
+ onClick: T
848
+ }, null, 8, ["label", "loading", "disabled"])
849
+ ])
850
+ ])
851
+ ]),
852
+ default: V(() => {
853
+ var A, Q, H, z;
854
+ return [
855
+ l("div", Jt, [
856
+ l("div", Kt, [
857
+ l("div", Zt, [
858
+ g(ve, {
859
+ name: (A = t.review.reviewer) == null ? void 0 : A.name,
860
+ "picture-url": (Q = t.review.reviewer) == null ? void 0 : Q.pictureUrl,
861
+ "is-google": t.review.source === "google"
862
+ }, null, 8, ["name", "picture-url", "is-google"]),
863
+ l("div", Wt, [
864
+ l("div", Xt, [
865
+ l("span", _t, d(S.value), 1),
866
+ l("div", $t, [
867
+ (r(), u(Y, null, P(5, (L) => g(e(n), {
868
+ key: L,
869
+ name: "star",
870
+ size: "sm",
871
+ class: G(
872
+ L <= t.review.starRating ? "text-yellow-400" : "text-fm-color-neutral-gray-200"
873
+ )
874
+ }, null, 8, ["class"])), 64))
875
+ ]),
876
+ l("span", el, d(h.value ? e(w)("connect.review.overview.editedAt", {
877
+ time: D.value
878
+ }) : D.value), 1)
879
+ ]),
880
+ l("p", {
881
+ class: G(["m-0 line-clamp-3 fm-typo-en-body-sm-400", {
882
+ "italic text-fm-color-neutral-gray-400": !t.review.comment
883
+ }])
884
+ }, d(t.review.comment || e(w)("connect.review.overview.noComment")), 3),
885
+ (H = t.review.mediaItems) != null && H.length ? (r(), u("div", tl, [
886
+ g(ae, {
887
+ "media-items": t.review.mediaItems
888
+ }, null, 8, ["media-items"])
889
+ ])) : I("", !0)
890
+ ])
891
+ ])
892
+ ]),
893
+ g(e(c), {
894
+ modelValue: E.value,
895
+ "onUpdate:modelValue": x[0] || (x[0] = (L) => E.value = L),
896
+ label: e(w)("connect.review.overview.replyDialog.yourReply"),
897
+ placeholder: e(w)("connect.review.overview.replyDialog.placeholder"),
898
+ "max-length": 4096,
899
+ "show-word-count": "",
900
+ autofocus: ""
901
+ }, null, 8, ["modelValue", "label", "placeholder"]),
902
+ y.value && ((z = t.review.reply) != null && z.updateTime) ? (r(), u("p", ll, d(e(w)("connect.review.overview.replyDialog.lastUpdated", {
903
+ time: e(q)(t.review.reply.updateTime).format("D MMM YYYY, hh:mm A")
904
+ })), 1)) : I("", !0)
905
+ ])
906
+ ];
907
+ }),
908
+ _: 1
909
+ }, 8, ["model-value"]));
910
+ }
911
+ }), il = { class: "flex items-center gap-4" }, sl = { class: "mt-8" }, cl = { class: "line-clamp-3 fm-typo-en-body-md-400" }, dl = {
912
+ key: 0,
913
+ class: "mt-4 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
914
+ }, ul = /* @__PURE__ */ O({
915
+ __name: "GoogleReviewCard",
916
+ props: {
917
+ review: {}
918
+ },
919
+ setup(t) {
920
+ const { t: a } = j(), s = k(!1), o = k(!1);
921
+ function n() {
922
+ o.value = !0;
923
+ }
924
+ return (c, i) => (r(), u(Y, null, [
925
+ g(ne, {
926
+ review: t.review,
927
+ logo: e(xe),
928
+ "original-link": t.review.originalUrl,
929
+ "on-reply": n
930
+ }, we({
931
+ rating: V(() => [
932
+ l("div", il, [
933
+ (r(), u(Y, null, P(5, (f) => g(e(B).FmIcon, {
934
+ key: f,
935
+ name: "star",
936
+ size: "sm",
937
+ class: G(
938
+ f <= t.review.starRating ? "text-yellow-400" : "text-fm-color-neutral-gray-200"
939
+ )
940
+ }, null, 8, ["class"])), 64))
941
+ ])
942
+ ]),
943
+ media: V(() => [
944
+ g(ae, {
945
+ "media-items": t.review.mediaItems
946
+ }, null, 8, ["media-items"])
947
+ ]),
948
+ _: 2
949
+ }, [
950
+ t.review.translatedComment ? {
951
+ name: "comment",
952
+ fn: V(() => [
953
+ l("div", sl, [
954
+ l("p", cl, d(s.value ? t.review.comment : t.review.translatedComment), 1),
955
+ s.value ? I("", !0) : (r(), u("p", dl, d(e(a)("connect.review.overview.translatedByGoogle")), 1)),
956
+ l("button", {
957
+ type: "button",
958
+ class: "mt-4 border-0 bg-transparent p-0 fm-typo-en-body-sm-600 text-blue-500 hover:underline",
959
+ onClick: i[0] || (i[0] = Z((f) => s.value = !s.value, ["stop"]))
960
+ }, d(s.value ? e(a)("connect.review.overview.seeTranslation") : e(a)("connect.review.overview.seeOriginal")), 1)
961
+ ])
962
+ ]),
963
+ key: "0"
964
+ } : void 0
965
+ ]), 1032, ["review", "logo", "original-link"]),
966
+ g(rl, {
967
+ modelValue: o.value,
968
+ "onUpdate:modelValue": i[1] || (i[1] = (f) => o.value = f),
969
+ review: t.review
970
+ }, null, 8, ["modelValue", "review"])
971
+ ], 64));
972
+ }
973
+ }), ml = /* @__PURE__ */ O({
974
+ __name: "ReviewCard",
975
+ props: {
976
+ review: {}
977
+ },
978
+ setup(t) {
979
+ const a = t, s = m(
980
+ () => a.review.source === "google" ? a.review : null
981
+ ), o = m(
982
+ () => a.review.source === "facebook" ? a.review : null
983
+ ), n = m(
984
+ () => a.review.source === "feedme" ? a.review : null
985
+ ), c = m(
986
+ () => a.review.source === "feedvibe" ? a.review : null
987
+ );
988
+ return (i, f) => s.value ? (r(), U(ul, {
989
+ key: 0,
990
+ review: s.value
991
+ }, null, 8, ["review"])) : o.value ? (r(), U(Bt, {
992
+ key: 1,
993
+ review: o.value
994
+ }, null, 8, ["review"])) : n.value ? (r(), U(Gt, {
995
+ key: 2,
996
+ review: n.value
997
+ }, null, 8, ["review"])) : c.value ? (r(), U(jt, {
998
+ key: 3,
999
+ review: c.value
1000
+ }, null, 8, ["review"])) : I("", !0);
1001
+ }
1002
+ }), vl = {
1003
+ key: 0,
1004
+ class: "flex justify-center py-32"
1005
+ }, gl = {
1006
+ key: 1,
1007
+ class: "flex flex-col items-center justify-center py-48 gap-8"
1008
+ }, wl = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, fl = ["data-sentinel"], pl = { class: "flex flex-col gap-12" }, yl = {
1009
+ key: 3,
1010
+ class: "flex justify-center py-16"
1011
+ }, te = 100, re = 20, me = 220, hl = /* @__PURE__ */ O({
1012
+ __name: "ReviewFeed",
1013
+ props: {
1014
+ reviews: {},
1015
+ loading: { type: Boolean },
1016
+ hasMore: { type: Boolean }
1017
+ },
1018
+ emits: ["loadMore"],
1019
+ setup(t, { emit: a }) {
1020
+ const { t: s } = j(), o = t, n = a, c = k(0), i = m(
1021
+ () => Math.min(c.value + te, o.reviews.length)
1022
+ ), f = m(
1023
+ () => o.reviews.slice(c.value, i.value)
1024
+ ), w = m(() => {
1025
+ const b = f.value, x = [];
1026
+ for (let A = 0; A < b.length; A += re)
1027
+ x.push({
1028
+ start: c.value + A,
1029
+ items: b.slice(A, A + re)
1030
+ });
1031
+ return x;
1032
+ }), C = m(
1033
+ () => c.value * me
1034
+ ), E = m(
1035
+ () => (o.reviews.length - i.value) * me
1036
+ );
1037
+ W(
1038
+ () => o.reviews.length,
1039
+ (b, x) => {
1040
+ if (b < x) {
1041
+ c.value = 0;
1042
+ return;
1043
+ }
1044
+ c.value + te >= x && (c.value = Math.max(0, b - te));
1045
+ }
1046
+ );
1047
+ const F = k(null), R = k(null), y = k(null), p = k(null), v = k(!1);
1048
+ async function S(b, x) {
1049
+ var z;
1050
+ const A = Math.max(0, o.reviews.length - te), Q = Math.min(Math.max(b - re, 0), A);
1051
+ if (Q === c.value || v.value) return;
1052
+ v.value = !0;
1053
+ const H = x == null ? void 0 : x.getBoundingClientRect().top;
1054
+ if (c.value = Q, await pe(), x && H !== void 0) {
1055
+ const L = (z = F.value) == null ? void 0 : z.querySelector(`[data-sentinel="${b}"]`);
1056
+ L && window.scrollBy(0, L.getBoundingClientRect().top - H);
1057
+ }
1058
+ v.value = !1;
1059
+ }
1060
+ function h() {
1061
+ const b = window.innerHeight, x = [
1062
+ { el: R.value, base: 0, span: c.value },
1063
+ {
1064
+ el: y.value,
1065
+ base: i.value,
1066
+ span: o.reviews.length - i.value
1067
+ }
1068
+ ];
1069
+ for (const { el: A, base: Q, span: H } of x) {
1070
+ if (!A || H <= 0) continue;
1071
+ const z = A.getBoundingClientRect();
1072
+ if (z.top <= 0 && z.bottom >= b && z.height > 0) {
1073
+ const L = (b / 2 - z.top) / z.height;
1074
+ S(Math.floor(Q + L * H));
1075
+ return;
1076
+ }
1077
+ }
1078
+ }
1079
+ let D = !1;
1080
+ function T() {
1081
+ D || (D = !0, requestAnimationFrame(() => {
1082
+ D = !1, h();
1083
+ }));
1084
+ }
1085
+ let M = null;
1086
+ function J() {
1087
+ var b;
1088
+ M == null || M.disconnect(), (b = F.value) == null || b.querySelectorAll("[data-sentinel]").forEach((x) => M == null ? void 0 : M.observe(x));
1089
+ }
1090
+ return oe(() => {
1091
+ M = new IntersectionObserver((x) => {
1092
+ for (const A of x)
1093
+ if (A.isIntersecting) {
1094
+ const Q = Number(A.target.dataset.sentinel);
1095
+ S(Q, A.target);
1096
+ }
1097
+ }), J(), W([c, () => o.reviews.length], J, {
1098
+ flush: "post"
1099
+ });
1100
+ const b = new IntersectionObserver(
1101
+ (x) => {
1102
+ x[0].isIntersecting && o.hasMore && !o.loading && n("loadMore");
1103
+ },
1104
+ { threshold: 0.5 }
1105
+ );
1106
+ p.value && b.observe(p.value), window.addEventListener("scroll", T, { passive: !0 }), fe(() => {
1107
+ M == null || M.disconnect(), b.disconnect(), window.removeEventListener("scroll", T);
1108
+ });
1109
+ }), (b, x) => (r(), u(Y, null, [
1110
+ t.loading && t.reviews.length === 0 ? (r(), u("div", vl, [
1111
+ g(e(B).FmIcon, {
1112
+ name: "sync",
1113
+ size: "xl",
1114
+ class: "animate-spin text-fm-color-neutral-gray-400"
1115
+ })
1116
+ ])) : t.reviews.length === 0 ? (r(), u("div", gl, [
1117
+ g(e(B).FmIcon, {
1118
+ name: "rate_review",
1119
+ size: "xl",
1120
+ class: "text-fm-color-neutral-gray-300"
1121
+ }),
1122
+ l("p", wl, d(e(s)("connect.review.overview.empty")), 1)
1123
+ ])) : (r(), u("div", {
1124
+ key: 2,
1125
+ ref_key: "listEl",
1126
+ ref: F
1127
+ }, [
1128
+ e(c) > 0 ? (r(), u("div", {
1129
+ key: 0,
1130
+ ref_key: "topSpacerEl",
1131
+ ref: R,
1132
+ style: le({ height: `${e(C)}px` })
1133
+ }, null, 4)) : I("", !0),
1134
+ (r(!0), u(Y, null, P(e(w), (A) => (r(), u(Y, {
1135
+ key: A.start
1136
+ }, [
1137
+ l("div", {
1138
+ "data-sentinel": A.start,
1139
+ class: "h-1"
1140
+ }, null, 8, fl),
1141
+ l("div", pl, [
1142
+ (r(!0), u(Y, null, P(A.items, (Q) => (r(), U(ml, {
1143
+ key: Q._id,
1144
+ review: Q
1145
+ }, null, 8, ["review"]))), 128))
1146
+ ])
1147
+ ], 64))), 128)),
1148
+ e(E) > 0 ? (r(), u("div", {
1149
+ key: 1,
1150
+ ref_key: "bottomSpacerEl",
1151
+ ref: y,
1152
+ style: le({ height: `${e(E)}px` })
1153
+ }, null, 4)) : I("", !0)
1154
+ ], 512)),
1155
+ l("div", {
1156
+ ref_key: "sentinel",
1157
+ ref: p,
1158
+ class: "h-1"
1159
+ }, null, 512),
1160
+ t.loading && t.reviews.length > 0 ? (r(), u("div", yl, [
1161
+ g(e(B).FmIcon, {
1162
+ name: "sync",
1163
+ size: "md",
1164
+ class: "animate-spin text-fm-color-neutral-gray-400"
1165
+ })
1166
+ ])) : I("", !0)
1167
+ ], 64));
1168
+ }
1169
+ }), bl = { class: "w-1/2 rounded-lg border border-fm-color-neutral-gray-200 bg-white p-5" }, xl = { class: "fm-typo-en-title-md-600 text-fm-color-typo-primary" }, kl = { class: "mt-16 grid grid-cols-[minmax(0,1fr)_minmax(140px,0.5fr)] gap-5" }, Cl = { class: "mt-12 flex flex-col gap-8" }, Al = { class: "w-16 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-500" }, Il = { class: "h-8 flex-1 overflow-hidden rounded-full bg-fm-color-neutral-gray-100" }, Dl = { class: "w-24 text-right fm-typo-en-body-sm-400 text-fm-color-neutral-gray-500" }, Ml = { class: "mt-8 flex flex-col items-center" }, Fl = { class: "fm-typo-en-display-lg-800 text-fm-color-typo-primary" }, Sl = {
1170
+ class: "mt-8 flex items-center gap-1",
1171
+ "aria-label": "Average rating"
1172
+ }, Bl = { class: "mt-4 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, El = /* @__PURE__ */ O({
1173
+ __name: "ReviewSummary",
1174
+ setup(t) {
1175
+ const a = k({
1176
+ averageScore: 0,
1177
+ total: 0,
1178
+ starCounts: [5, 4, 3, 2, 1].map((n) => ({ star: n, count: 0 }))
1179
+ }), s = m(() => a.value.averageScore.toFixed(1));
1180
+ function o(n) {
1181
+ return `${Math.min(Math.max(a.value.averageScore - n + 1, 0), 1) * 100}%`;
1182
+ }
1183
+ return oe(async () => {
1184
+ a.value = await $.getReviewSummary();
1185
+ }), (n, c) => (r(), u("div", bl, [
1186
+ l("h2", xl, d(n.$t("connect.review.overview.summary")), 1),
1187
+ l("div", kl, [
1188
+ l("div", Cl, [
1189
+ (r(!0), u(Y, null, P(e(a).starCounts, (i) => (r(), u("div", {
1190
+ key: i.star,
1191
+ class: "flex items-center gap-8"
1192
+ }, [
1193
+ l("span", Al, d(i.star), 1),
1194
+ g(e(B).FmIcon, {
1195
+ name: "star",
1196
+ size: "sm",
1197
+ class: "text-amber-400"
1198
+ }),
1199
+ l("div", Il, [
1200
+ l("div", {
1201
+ class: "h-full rounded-full bg-amber-400 transition-[width]",
1202
+ style: le({
1203
+ width: `${e(a).total ? i.count / e(a).total * 100 : 0}%`
1204
+ })
1205
+ }, null, 4)
1206
+ ]),
1207
+ l("span", Dl, d(i.count), 1)
1208
+ ]))), 128))
1209
+ ]),
1210
+ l("div", Ml, [
1211
+ l("span", Fl, d(e(s)), 1),
1212
+ l("div", Sl, [
1213
+ (r(), u(Y, null, P(5, (i) => l("span", {
1214
+ key: i,
1215
+ class: "relative"
1216
+ }, [
1217
+ g(e(B).FmIcon, {
1218
+ name: "star",
1219
+ size: "md",
1220
+ class: "text-fm-color-neutral-gray-200"
1221
+ }),
1222
+ l("span", {
1223
+ class: "absolute inset-y-0 left-0 overflow-hidden",
1224
+ style: le({ width: o(i) })
1225
+ }, [
1226
+ g(e(B).FmIcon, {
1227
+ name: "star",
1228
+ size: "md",
1229
+ class: "text-amber-400"
1230
+ })
1231
+ ], 4)
1232
+ ])), 64))
1233
+ ]),
1234
+ l("span", Bl, " (" + d(e(a).total) + ") ", 1)
1235
+ ])
1236
+ ])
1237
+ ]));
1238
+ }
1239
+ }), Rl = { class: "p-24 flex flex-col gap-12" }, ie = 20, Ll = /* @__PURE__ */ O({
1240
+ __name: "Overview",
1241
+ setup(t) {
1242
+ const a = k([]), s = k(!1), o = k(!0), n = k(null), c = k(null), i = k(null), f = k(""), w = k("all"), C = k("createTime_desc");
1243
+ W(n, () => {
1244
+ f.value = "";
1245
+ });
1246
+ function E(y) {
1247
+ var p;
1248
+ return {
1249
+ source: ((p = n.value) == null ? void 0 : p.join(",")) || void 0,
1250
+ dateFrom: c.value ? q(c.value).startOf("day").toISOString() : void 0,
1251
+ dateTo: i.value ? q(i.value).endOf("day").toISOString() : void 0,
1252
+ locationId: f.value || void 0,
1253
+ excludeDeleted: w.value === "excludeDeleted" ? !0 : void 0,
1254
+ sort: C.value,
1255
+ limit: ie,
1256
+ skip: y
1257
+ };
1258
+ }
1259
+ async function F() {
1260
+ s.value = !0, o.value = !0;
1261
+ try {
1262
+ const y = await $.listReviews(E(0));
1263
+ a.value = y, o.value = y.length === ie;
1264
+ } finally {
1265
+ s.value = !1;
1266
+ }
1267
+ }
1268
+ async function R() {
1269
+ if (!(s.value || !o.value)) {
1270
+ s.value = !0;
1271
+ try {
1272
+ const y = await $.listReviews(E(a.value.length));
1273
+ a.value = [...a.value, ...y], o.value = y.length === ie;
1274
+ } finally {
1275
+ s.value = !1;
1276
+ }
1277
+ }
1278
+ }
1279
+ return W(
1280
+ [
1281
+ n,
1282
+ c,
1283
+ i,
1284
+ f,
1285
+ w,
1286
+ C
1287
+ ],
1288
+ F
1289
+ ), oe(F), (y, p) => (r(), u("div", Rl, [
1290
+ g(El),
1291
+ g(Ie, {
1292
+ source: e(n),
1293
+ "onUpdate:source": p[0] || (p[0] = (v) => N(n) ? n.value = v : null),
1294
+ "date-from": e(c),
1295
+ "onUpdate:dateFrom": p[1] || (p[1] = (v) => N(c) ? c.value = v : null),
1296
+ "date-to": e(i),
1297
+ "onUpdate:dateTo": p[2] || (p[2] = (v) => N(i) ? i.value = v : null),
1298
+ "location-id": e(f),
1299
+ "onUpdate:locationId": p[3] || (p[3] = (v) => N(f) ? f.value = v : null),
1300
+ "deleted-filter": e(w),
1301
+ "onUpdate:deletedFilter": p[4] || (p[4] = (v) => N(w) ? w.value = v : null),
1302
+ sort: e(C),
1303
+ "onUpdate:sort": p[5] || (p[5] = (v) => N(C) ? C.value = v : null)
1304
+ }, null, 8, ["source", "date-from", "date-to", "location-id", "deleted-filter", "sort"]),
1305
+ g(hl, {
1306
+ reviews: e(a),
1307
+ loading: e(s),
1308
+ "has-more": e(o),
1309
+ onLoadMore: R
1310
+ }, null, 8, ["reviews", "loading", "has-more"])
1311
+ ]));
1312
+ }
1313
+ });
1314
+ export {
1315
+ Ll as default
1316
+ };