@feedmepos/mf-connect 0.1.114-prod → 0.1.116-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 (157) hide show
  1. package/README.md +66 -1
  2. package/dist/{App-DMYXrCc7.js → App-DWDgsBqW.js} +700 -654
  3. package/dist/AuditLogs-BqEtvKFs.js +2016 -0
  4. package/dist/{Bin-CHZolo56.js → Bin-Cz6fmewG.js} +8 -8
  5. package/dist/Broadcast-CQ0pfKpx.js +306 -0
  6. package/dist/{CampaignAnalytic-DgZvsUoF.js → CampaignAnalytic-CiRCB3kh.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C42uL_JO.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bp7UeQWJ.js} +9 -9
  8. package/dist/{Card-wRFTJwJ9.js → Card-Kw2PFL2m.js} +25 -24
  9. package/dist/{Collections-9G-_9Etz.js → Collections-D8Vx_EEH.js} +197 -185
  10. package/dist/{Credit-Bl7IDMCU.js → Credit-B1jsQ5zg.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BVLJeofG.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B6Fpf8zy.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Q1f6EQW3.js → EffectSheet.vue_vue_type_style_index_0_lang-Cdpr9Ku4.js} +32 -32
  14. package/dist/{Experience-Cs2iViLv.js → Experience-B0JIA3sL.js} +32 -31
  15. package/dist/{FileSaver.min-B3Levdbu.js → FileSaver.min-M-9kTN8q.js} +1 -1
  16. package/dist/{Game-oXURgzan.js → Game-CNJyqnK3.js} +19 -18
  17. package/dist/{GiftCardSetup-C2Wu-dRl.js → GiftCardSetup-DSQIC7fD.js} +75 -75
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Da2e89Um.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-ABiLOF1j.js} +7 -7
  19. package/dist/{Goals-B_xEM7gf.js → Goals-DBPzGIRK.js} +4 -4
  20. package/dist/Grab-CGWinKBS.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BRJR1heE.js → ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js} +1 -1
  22. package/dist/{Index-kuT6W6R_.js → Index-CiWyZXnK.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-7JqHfSk-.js → LocationPicker.vue_vue_type_script_setup_true_lang-DnP03_b7.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CI_4S7tW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DM17LaNE.js} +1 -1
  25. package/dist/{LoyaltyDashboard-CqxHdZcm.js → LoyaltyDashboard-C4ZlK9Hv.js} +15 -15
  26. package/dist/MainLayout-D22Q2_jN.js +4 -0
  27. package/dist/{MainLayout-CAERFIms.js → MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js} +5 -4
  28. package/dist/Marketing-CmVnvEN6.js +269 -0
  29. package/dist/MarketingMaterialEdit-CQ55zG-W.js +1037 -0
  30. package/dist/{Member-B8VZEn9t.js → Member-B-l5P9jk.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-B31lVLKh.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-C_ZjHH4I.js} +43 -50
  32. package/dist/{MemberImportHistory-D9tgHnTS.js → MemberImportHistory-BJcu-ahG.js} +7 -7
  33. package/dist/{MemberList-Hw_xQY1i.js → MemberList-DVsWNWIc.js} +103 -105
  34. package/dist/{MemberTransactions-DiBO4plw.js → MemberTransactions-C2VPySEO.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CbFt5X89.js → MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js} +4228 -4176
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BE_-Ed4z.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BouFp66T.js} +1 -1
  37. package/dist/{Mission-DpYei3aF.js → Mission-DWO-IF0f.js} +22 -21
  38. package/dist/{Overview-BFQMmyT6.js → Overview-DPcWm2S0.js} +23 -22
  39. package/dist/{Overview-CARquJCS.js → Overview-Dbp4Sv-H.js} +145 -144
  40. package/dist/{Point-Dd2ykwNv.js → Point-PnWrzVOY.js} +22 -21
  41. package/dist/{Promotion-DXl-W7np.js → Promotion-Bwpi60dN.js} +137 -131
  42. package/dist/{Queue-Cd3N-4iB.js → Queue-BvEcKyVJ.js} +47 -46
  43. package/dist/{Record-C3HdDsh5.js → Record-DzNvU2fM.js} +9 -9
  44. package/dist/{Review-Bif3Ub9Z.js → Review-HDYwnMd6.js} +2 -2
  45. package/dist/ReviewFacebookCallback-rAlgcTQ_.js +225 -0
  46. package/dist/{ReviewGoogleCallback-i-RNLlLm.js → ReviewGoogleCallback-6V9JNKsl.js} +5 -5
  47. package/dist/{Reward-DHxzrR_7.js → Reward-DI6IyG-d.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DcrFlcSo.js → RewardGroup.vue_vue_type_script_setup_true_lang-DFAIPMe7.js} +16 -15
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CDoba0oG.js +1923 -0
  50. package/dist/{Segment-Cjpxordk.js → Segment-DrV6pQyx.js} +290 -291
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-6u21xBu6.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CXHt_ZeT.js} +31 -30
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BOXVzfer.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-XRXkLy6j.js} +4 -4
  53. package/dist/Setting-aLQCUCP9.js +574 -0
  54. package/dist/{SettingAdvertisements-aog5fz32.js → SettingAdvertisements-BtqKt4Ca.js} +12 -12
  55. package/dist/Settings-BkYtKb4l.js +286 -0
  56. package/dist/{Store-Bq3kw1l2.js → Store-HZs9GG03.js} +31 -30
  57. package/dist/{StoreRewards-ZGXKEM09.js → StoreRewards-BSTXL4FR.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D9nykzc3.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js +7007 -0
  60. package/dist/{Tier-CfgpEHY7.js → Tier-Ka0rbjC_.js} +2576 -687
  61. package/dist/{Title-B2itYWeD.js → Title-7jvrf34J.js} +94 -92
  62. package/dist/{Transaction-hJ5ygIcf.js → Transaction-D-M3udf5.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-8BgGlpTh.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CrlpuElX.js} +26 -26
  64. package/dist/{Voucher-TG47pGR3.js → Voucher-BZCLPyDk.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjuXCTxg.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C_MOMFkX.js} +16 -16
  66. package/dist/WhatsappAccount-BG0dIroG.js +159 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Co05OXon.js +39 -0
  68. package/dist/WhatsappBot-O5h5UKXz.js +876 -0
  69. package/dist/WhatsappBotLogs-BOPTuu6o.js +372 -0
  70. package/dist/WhatsappBotSettings-BSiIvpGO.js +705 -0
  71. package/dist/WhatsappLayout-DLVIfkzJ.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DJdi7dV6.js +253 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BRs-gbP0.js → ZodTextField.vue_vue_type_script_setup_true_lang-Do4GTTKx.js} +2 -2
  74. package/dist/{app-tPHYkJcQ.js → app-CEe3kSZM.js} +10615 -8223
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-BHDVnGj2.js → base.export-BjSdr85q.js} +2 -2
  77. package/dist/browser-BSAOEeIM.js +1478 -0
  78. package/dist/{business-HLyWfrXY.js → business-CJjiItSo.js} +1 -1
  79. package/dist/campaign-D4MWLs1D.js +400 -0
  80. package/dist/{campaign-5zFgUNLw.js → campaign-DEXq52fE.js} +31 -25
  81. package/dist/{campaign.enum-BOkDnP2g.js → campaign.enum-Dx-Zo68Q.js} +3 -2
  82. package/dist/{campaign.fn-BIAoVtJj.js → campaign.fn-DiadKjES.js} +85 -85
  83. package/dist/{collectible.enum-BbZSAfys.js → collectible.enum-Liy2wH3s.js} +1 -1
  84. package/dist/{collection.fn-DPSgBHnz.js → collection.fn-CfqIdnSS.js} +2 -2
  85. package/dist/{currency-BVrMqU6-.js → currency-CPB6E_s-.js} +1 -1
  86. package/dist/duplicateCampaign-BzWvsZwc.js +51 -0
  87. package/dist/{effect-BBifVx76.js → effect-DFodA5mh.js} +1 -1
  88. package/dist/{email-addresses-9C7xHTNv.js → email-addresses-C0CwgNs_.js} +2 -2
  89. package/dist/feature-flag--GbS6Qn_.js +50 -0
  90. package/dist/feature-flag-Bap2oi_S.js +868 -0
  91. package/dist/google-BQK68wbe.js +5 -0
  92. package/dist/{helper-C08jyQNK.js → helper-DKKsSb2o.js} +1 -1
  93. package/dist/{index-Dk-jg0wN.js → index-4LQanFJi.js} +2 -2
  94. package/dist/{index-hSRM1smQ.js → index-BJCirs9i.js} +8028 -10767
  95. package/dist/index-BS6725ZB.js +14571 -0
  96. package/dist/{index-B_334Y_i.js → index-BWsGYTzB.js} +29 -15
  97. package/dist/{index-DZ-q5O-V.js → index-BdGo-qgB.js} +4 -4
  98. package/dist/index-C-iwb2Ln.js +109 -0
  99. package/dist/index-C1C21iKU.js +74 -0
  100. package/dist/{index-96ZiAKj_.js → index-CEFEuMOF.js} +1 -1
  101. package/dist/{index-C_WoO58V.js → index-CFZMwKR6.js} +8 -7
  102. package/dist/{index-kCbkOivd.js → index-CJGb1iJi.js} +1 -1
  103. package/dist/{index-CUle4c2B.js → index-CXqPYmyv.js} +4 -3
  104. package/dist/{index-DnRMNmUA.js → index-C_4eW8Sr.js} +396 -232
  105. package/dist/index-C_H8jFYf.js +2743 -0
  106. package/dist/{index-Yo0tP8KJ.js → index-CfqmNZUH.js} +683 -581
  107. package/dist/{index-ihw-WFCa.js → index-CtwPthW5.js} +2 -2
  108. package/dist/{index-Dhyqf1s8.js → index-D5veZ8LP.js} +2700 -2613
  109. package/dist/{index-NJSI4wX4.js → index-DDmpyI6z.js} +693 -231
  110. package/dist/{index-D24Q28cH.js → index-DFV2ydYE.js} +1 -1
  111. package/dist/{index-CEe1kJ0T.js → index-DRnUcSVN.js} +1 -1
  112. package/dist/{index-BgwZGunW.js → index-DxmlvoHV.js} +19 -6
  113. package/dist/{index-hIUtD2eY.js → index-RUdMURTx.js} +11 -10
  114. package/dist/{index-Ciw2TZxV.js → index-qAQiQd-s.js} +8 -7
  115. package/dist/{index.esm2017-hN99SQTb.js → index.esm2017-i1myv90H.js} +209 -209
  116. package/dist/{loading-CVuY4vQ4.js → loading-BAFiJnEb.js} +1 -1
  117. package/dist/{lodash-GFl9_FMH.js → lodash-De2KDgqX.js} +1 -1
  118. package/dist/{member-import-CshTzabx.js → member-import-BP4RZGbA.js} +6 -5
  119. package/dist/{membership-S0KES3Ex.js → membership-CQWw-rTa.js} +3 -3
  120. package/dist/{money-JxdX8ru4.js → money-rwjWYzdi.js} +1 -1
  121. package/dist/{number-BRLwa-mB.js → number-DwSvkBpS.js} +1 -1
  122. package/dist/objectid-DtEPzPd_.js +145 -0
  123. package/dist/{onboarding-BSKYeyP7.js → onboarding-u7cpl6k3.js} +25 -25
  124. package/dist/{onboardingSetup-BqT52VRm.js → onboardingSetup-DoxDlcVN.js} +2 -2
  125. package/dist/{plugins-BR_wmMFJ.js → plugins-CKaeoHSK.js} +3 -3
  126. package/dist/{MarketingMaterialEdit-BvIthCHG.js → remy-icon-BhUGu2NI.js} +2 -1031
  127. package/dist/{reward-CpCGg_W2.js → reward-BasbGRWt.js} +1 -1
  128. package/dist/{rule-Dbg9e8MO.js → rule-IN41b-qE.js} +572 -492
  129. package/dist/style.css +1 -1
  130. package/dist/template-3Nu_MAMG.js +188 -0
  131. package/dist/{timezone-CDVa-xPr.js → timezone-C68y8HiI.js} +1 -1
  132. package/dist/{transaction.fn-DrTBoF9T.js → transaction.fn-Ckxm2gof.js} +2 -2
  133. package/dist/{trigger-wqGwQfB2.js → trigger-xA8j3s9B.js} +8 -8
  134. package/dist/useMarketingMaterialActions-ClYoBaFw.js +125 -0
  135. package/dist/{usePagination-fODgpZZ8.js → usePagination-CIRxyVr8.js} +1 -1
  136. package/dist/{user-DaLUK1dk.js → user-PTTQTMyQ.js} +1 -1
  137. package/dist/vue-i18n-DYnrLWFT.js +2365 -0
  138. package/dist/{xlsx-Bl4_Dtrq.js → xlsx-l0AsOrP1.js} +786 -786
  139. package/dist/{zod-CAzWyVqj.js → zod-Bm1pKYLC.js} +1 -1
  140. package/package.json +12 -3
  141. package/dist/Broadcast-ByWvxVhW.js +0 -271
  142. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DGpQfV5T.js +0 -2431
  143. package/dist/Marketing-KgcwGErU.js +0 -236
  144. package/dist/ReviewFacebookCallback-mJF54-9l.js +0 -238
  145. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-39f3I4BB.js +0 -1883
  146. package/dist/Setting-Dl9MelHz.js +0 -2036
  147. package/dist/Settings-DvCCClIP.js +0 -179
  148. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DscLAF0p.js +0 -1264
  149. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-l_v4FHO0.js +0 -142
  150. package/dist/campaign-awCRccgX.js +0 -228
  151. package/dist/google-C3S8u0mT.js +0 -4
  152. package/dist/index-CoNJdOx7.js +0 -51
  153. package/dist/objectid-CEHN25HN.js +0 -145
  154. package/dist/rule-builder-BEIjxsE0.js +0 -102
  155. package/dist/template-CS-lExgI.js +0 -236
  156. package/dist/useMarketingMaterialActions-DC0gIyIZ.js +0 -96
  157. package/dist/vue-i18n-Dx-KXojZ.js +0 -2365
@@ -0,0 +1,1037 @@
1
+ import { defineComponent as C, resolveComponent as b, openBlock as s, createBlock as T, withCtx as j, createElementVNode as e, createVNode as c, createElementBlock as u, unref as t, ref as M, watch as V, Fragment as B, createCommentVNode as $, withModifiers as N, Teleport as J, Transition as Q, toDisplayString as f, renderList as L, createTextVNode as q, computed as E, normalizeClass as D, onMounted as X, isRef as Y, resolveDynamicComponent as ee } from "vue";
2
+ import { _ as O } from "./lodash-De2KDgqX.js";
3
+ import "./index-CEFEuMOF.js";
4
+ import { useRoute as G, useRouter as te } from "vue-router";
5
+ import { u as I } from "./vue-i18n-DYnrLWFT.js";
6
+ import { u as K, m as H } from "./useMarketingMaterialActions-ClYoBaFw.js";
7
+ import { useClientEvent as Z } from "@feedmepos/mf-remy-panel";
8
+ import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ import { _ as ne } from "./remy-icon-BhUGu2NI.js";
10
+ import { useSnackbar as ae, useDialog as se } from "@feedmepos/ui-library";
11
+ import { u as le } from "./remy-Qz_pNsUS.js";
12
+ import { useCoreStore as R } from "@feedmepos/mf-common";
13
+ import { u as ie } from "./loading-BAFiJnEb.js";
14
+ import { R as A } from "./app-CEe3kSZM.js";
15
+ const S = /* @__PURE__ */ C({
16
+ __name: "ActionToolbarButton",
17
+ props: {
18
+ icon: {},
19
+ tooltip: {}
20
+ },
21
+ emits: ["click"],
22
+ setup(l, { emit: m }) {
23
+ const d = m;
24
+ return (p, i) => {
25
+ const r = b("FmIcon"), o = b("FmTooltip");
26
+ return s(), T(o, {
27
+ content: l.tooltip,
28
+ placement: "bottom",
29
+ "z-index": 60,
30
+ variant: "rich"
31
+ }, {
32
+ default: j(() => [
33
+ e("button", {
34
+ class: "p-2 rounded-lg bg-white/10 hover:bg-white/20 transition-colors text-white flex items-center justify-center",
35
+ onClick: i[0] || (i[0] = (n) => d("click"))
36
+ }, [
37
+ c(r, {
38
+ name: l.icon,
39
+ size: "md"
40
+ }, null, 8, ["name"])
41
+ ])
42
+ ]),
43
+ _: 1
44
+ }, 8, ["content"]);
45
+ };
46
+ }
47
+ }), re = { class: "flex gap-8" }, ce = /* @__PURE__ */ C({
48
+ __name: "ActionToolbar",
49
+ props: {
50
+ imageUrl: {}
51
+ },
52
+ emits: ["edit", "close"],
53
+ setup(l, { emit: m }) {
54
+ const d = l, p = m, { t: i } = I();
55
+ async function r() {
56
+ if (d.imageUrl)
57
+ try {
58
+ const n = await (await fetch(d.imageUrl)).blob(), v = URL.createObjectURL(n), _ = document.createElement("a");
59
+ _.href = v, _.download = "marketing-material", _.click(), URL.revokeObjectURL(v);
60
+ } catch {
61
+ window.open(d.imageUrl, "_blank");
62
+ }
63
+ }
64
+ return (o, n) => (s(), u("div", re, [
65
+ c(S, {
66
+ icon: "edit",
67
+ tooltip: t(i)("connect.common.edit"),
68
+ onClick: n[0] || (n[0] = (v) => p("edit"))
69
+ }, null, 8, ["tooltip"]),
70
+ c(S, {
71
+ icon: "download",
72
+ tooltip: t(i)("connect.marketing.actions.download"),
73
+ onClick: r
74
+ }, null, 8, ["tooltip"]),
75
+ c(S, {
76
+ icon: "close",
77
+ tooltip: t(i)("connect.marketing.actions.close"),
78
+ onClick: n[1] || (n[1] = (v) => p("close"))
79
+ }, null, 8, ["tooltip"])
80
+ ]));
81
+ }
82
+ }), me = ["src", "alt"], de = {
83
+ key: 1,
84
+ class: "absolute inset-0 flex items-center justify-center bg-black/40"
85
+ }, ue = { class: "relative" }, pe = ["src", "alt"], ge = /* @__PURE__ */ C({
86
+ __name: "Thumbnail",
87
+ props: {
88
+ imageUrl: {}
89
+ },
90
+ emits: ["edit", "update:imageUrl"],
91
+ setup(l, { emit: m }) {
92
+ const d = l, p = m, { t: i } = I(), r = G(), o = M(!1), n = M(d.imageUrl);
93
+ V(
94
+ () => d.imageUrl,
95
+ (y) => {
96
+ n.value = y;
97
+ }
98
+ );
99
+ const v = M(!1);
100
+ function _() {
101
+ o.value = !1, p("edit", n.value);
102
+ }
103
+ Z(
104
+ "apply-edited-banner",
105
+ async ({ imageUrl: y }) => {
106
+ r.query.id && (n.value = y, p("update:imageUrl", y));
107
+ }
108
+ );
109
+ const { downloadMaterialImage: k, copyMaterialLink: h } = K();
110
+ async function F() {
111
+ n.value && await k(n.value);
112
+ }
113
+ function U() {
114
+ n.value && window.open(n.value, "_blank");
115
+ }
116
+ async function w() {
117
+ n.value && await h(n.value);
118
+ }
119
+ return (y, a) => {
120
+ const g = b("FmButton"), x = b("FmMenuItem"), P = b("FmMenu");
121
+ return s(), u(B, null, [
122
+ e("div", {
123
+ class: "relative group cursor-pointer rounded-xl overflow-hidden fm-shadow-light-200 w-[150px] h-[150px] bg-white",
124
+ onClick: a[1] || (a[1] = (z) => o.value = !0)
125
+ }, [
126
+ t(n) ? (s(), u("img", {
127
+ key: 0,
128
+ src: t(n),
129
+ alt: t(i)("connect.marketing.materialEdit.generatedMaterial"),
130
+ class: "w-full h-full object-contain"
131
+ }, null, 8, me)) : $("", !0),
132
+ e("div", {
133
+ class: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
134
+ onClick: a[0] || (a[0] = N(() => {
135
+ }, ["stop"]))
136
+ }, [
137
+ c(P, { placement: "right-start" }, {
138
+ "menu-button": j(() => [
139
+ c(g, {
140
+ icon: "more_horiz",
141
+ variant: "tertiary",
142
+ class: "bg-white hover:bg-gray-100 text-black shadow-sm"
143
+ })
144
+ ]),
145
+ default: j(() => [
146
+ c(x, {
147
+ icon: "open_in_new",
148
+ label: t(i)("connect.marketing.actions.openInNewTab"),
149
+ onClick: U
150
+ }, null, 8, ["label"]),
151
+ c(x, {
152
+ icon: "download",
153
+ label: t(i)("connect.marketing.actions.download"),
154
+ onClick: F
155
+ }, null, 8, ["label"]),
156
+ c(x, {
157
+ icon: "content_copy",
158
+ label: t(i)("connect.marketing.actions.copyLink"),
159
+ onClick: w
160
+ }, null, 8, ["label"]),
161
+ c(x, {
162
+ icon: "edit",
163
+ label: t(i)("connect.marketing.actions.regenerateImage"),
164
+ onClick: _
165
+ }, null, 8, ["label"])
166
+ ]),
167
+ _: 1
168
+ })
169
+ ]),
170
+ t(v) ? (s(), u("div", de, [...a[4] || (a[4] = [
171
+ e("div", { class: "w-10 h-10 rounded-full border-4 border-white/30 border-t-white animate-spin" }, null, -1)
172
+ ])])) : $("", !0)
173
+ ]),
174
+ (s(), T(J, { to: "body" }, [
175
+ c(Q, { name: "fade" }, {
176
+ default: j(() => [
177
+ t(o) ? (s(), u("div", {
178
+ key: 0,
179
+ class: "fixed inset-0 z-50 bg-black/80 flex items-center justify-center",
180
+ onClick: a[3] || (a[3] = N((z) => o.value = !1, ["self"]))
181
+ }, [
182
+ e("div", ue, [
183
+ c(ce, {
184
+ class: "absolute top-0 right-0 z-10 -translate-y-full p-4",
185
+ "image-url": t(n),
186
+ onEdit: _,
187
+ onClose: a[2] || (a[2] = (z) => o.value = !1)
188
+ }, null, 8, ["image-url"]),
189
+ t(n) ? (s(), u("img", {
190
+ key: 0,
191
+ src: t(n),
192
+ alt: t(i)("connect.marketing.materialEdit.preview"),
193
+ class: "max-h-[80vh] max-w-[90vw] object-contain rounded-xl"
194
+ }, null, 8, pe)) : $("", !0)
195
+ ])
196
+ ])) : $("", !0)
197
+ ]),
198
+ _: 1
199
+ })
200
+ ]))
201
+ ], 64);
202
+ };
203
+ }
204
+ }), fe = /* @__PURE__ */ oe(ge, [["__scopeId", "data-v-6b1bb096"]]), ve = { class: "flex shrink-0" }, W = /* @__PURE__ */ C({
205
+ __name: "TextActionWidget",
206
+ props: {
207
+ text: {}
208
+ },
209
+ emits: ["editWithRemy"],
210
+ setup(l, { emit: m }) {
211
+ const d = m, { t: p } = I(), i = ae();
212
+ async function r(o) {
213
+ if (o)
214
+ try {
215
+ await navigator.clipboard.writeText(o), i.open({ message: p("connect.marketing.actions.copied"), type: "success" });
216
+ } catch {
217
+ i.open({ message: p("connect.marketing.actions.failedToCopy"), type: "error" });
218
+ }
219
+ }
220
+ return (o, n) => {
221
+ const v = b("FmIcon"), _ = b("FmTooltip");
222
+ return s(), u("div", ve, [
223
+ c(_, {
224
+ content: t(p)("connect.marketing.actions.copy"),
225
+ placement: "top",
226
+ "hide-arrow": !1
227
+ }, {
228
+ default: j(() => [
229
+ e("button", {
230
+ class: "p-8 rounded-full hover:bg-fm-color-neutral-gray-100 transition-all opacity-0 group-hover:opacity-100 focus:opacity-100 flex items-center justify-center",
231
+ onClick: n[0] || (n[0] = (k) => r(l.text))
232
+ }, [
233
+ c(v, {
234
+ name: "content_copy",
235
+ size: "sm",
236
+ color: "neutral-gray-400"
237
+ })
238
+ ])
239
+ ]),
240
+ _: 1
241
+ }, 8, ["content"]),
242
+ c(_, {
243
+ content: t(p)("connect.marketing.actions.remyAi"),
244
+ placement: "top",
245
+ "hide-arrow": !1
246
+ }, {
247
+ default: j(() => [
248
+ e("button", {
249
+ class: "p-8 rounded-full hover:bg-fm-color-neutral-gray-100 transition-colors flex items-center justify-center",
250
+ onClick: n[1] || (n[1] = (k) => d("editWithRemy"))
251
+ }, [...n[2] || (n[2] = [
252
+ e("img", {
253
+ src: ne,
254
+ class: "w-16 h-16 opacity-60"
255
+ }, null, -1)
256
+ ])])
257
+ ]),
258
+ _: 1
259
+ }, 8, ["content"])
260
+ ]);
261
+ };
262
+ }
263
+ }), _e = { class: "border-t lg:border-t-0 lg:border-l border-fm-color-neutral-gray-100 p-24 xs:p-16" }, he = { class: "mb-24 align-middle font-['Inter'] text-[22px] font-semibold leading-[24px] tracking-[-0.015em] text-fm-color-typo-primary [leading-trim:none]" }, ye = { class: "flex flex-col gap-24" }, be = { class: "flex flex-col gap-12" }, xe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, ke = { class: "flex flex-col gap-8 group" }, we = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, $e = { class: "relative [&_input]:!pr-[70px]" }, Me = { class: "absolute right-[8px] top-1/2 -translate-y-1/2 z-10" }, Ce = { class: "flex flex-col gap-8 group" }, Fe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, Ue = { class: "relative [&_textarea]:!pr-[70px]" }, ze = { class: "absolute right-[8px] top-[16px] z-10" }, Ie = /* @__PURE__ */ C({
264
+ __name: "MarketingMaterialContentDetails",
265
+ props: {
266
+ marketingMaterial: {}
267
+ },
268
+ emits: ["update:imageUrl", "update:headline", "update:caption"],
269
+ setup(l, { emit: m }) {
270
+ const d = l, p = m, { t: i } = I(), r = le(), o = M(d.marketingMaterial.headline), n = M(d.marketingMaterial.caption), v = M(d.marketingMaterial.headline), _ = M(d.marketingMaterial.caption), k = M(!1), h = M(!1);
271
+ V(
272
+ () => d.marketingMaterial.headline,
273
+ (a) => {
274
+ if (k.value) {
275
+ k.value = !1;
276
+ return;
277
+ }
278
+ o.value = a, v.value = a;
279
+ }
280
+ ), V(
281
+ () => d.marketingMaterial.caption,
282
+ (a) => {
283
+ if (h.value) {
284
+ h.value = !1;
285
+ return;
286
+ }
287
+ n.value = a ?? "", _.value = a;
288
+ }
289
+ ), Z(
290
+ "apply-edited-copy",
291
+ async ({ headline: a, caption: g }) => {
292
+ a !== void 0 && (o.value = a, v.value = a, k.value = !0, p("update:headline", a)), g !== void 0 && (n.value = g, _.value = g, h.value = !0, p("update:caption", g));
293
+ }
294
+ );
295
+ function F() {
296
+ r.activate({
297
+ command: "editMarketingBanner",
298
+ prompt: "",
299
+ attachments: [
300
+ {
301
+ value: d.marketingMaterial,
302
+ key: "marketingMaterial"
303
+ }
304
+ ]
305
+ });
306
+ }
307
+ function U() {
308
+ r.activate({
309
+ command: "editCopy",
310
+ attachments: [
311
+ {
312
+ value: d.marketingMaterial,
313
+ key: "marketingMaterial"
314
+ }
315
+ ]
316
+ });
317
+ }
318
+ async function w(a) {
319
+ const g = a === "headline" ? o.value : n.value, x = a === "headline" ? v.value : _.value;
320
+ g !== x && (a === "headline" ? v.value = g : _.value = g);
321
+ }
322
+ function y(a, g) {
323
+ a === "headline" ? (o.value = g, k.value = !0, p("update:headline", g)) : (n.value = g, h.value = !0, p("update:caption", g));
324
+ }
325
+ return (a, g) => {
326
+ const x = b("FmTextField"), P = b("FmTextarea");
327
+ return s(), u("section", _e, [
328
+ e("h2", he, f(t(i)("connect.marketing.materialEdit.contentDetails")), 1),
329
+ e("div", ye, [
330
+ e("div", be, [
331
+ e("p", xe, f(t(i)("connect.marketing.materialEdit.image")), 1),
332
+ c(fe, {
333
+ "image-url": l.marketingMaterial.imageUrl,
334
+ onEdit: F,
335
+ "onUpdate:imageUrl": g[0] || (g[0] = (z) => p("update:imageUrl", z))
336
+ }, null, 8, ["image-url"])
337
+ ]),
338
+ e("div", ke, [
339
+ e("p", we, f(t(i)("connect.marketing.materialEdit.headline")), 1),
340
+ e("div", $e, [
341
+ c(x, {
342
+ "model-value": t(o),
343
+ "onUpdate:modelValue": g[1] || (g[1] = (z) => y("headline", z)),
344
+ onFocusChanged: g[2] || (g[2] = (z) => !z && w("headline"))
345
+ }, null, 8, ["model-value"]),
346
+ e("div", Me, [
347
+ c(W, {
348
+ text: t(o),
349
+ onEditWithRemy: U
350
+ }, null, 8, ["text"])
351
+ ])
352
+ ])
353
+ ]),
354
+ e("div", Ce, [
355
+ e("p", Fe, f(t(i)("connect.marketing.materialEdit.caption")), 1),
356
+ e("div", Ue, [
357
+ c(P, {
358
+ "model-value": t(n),
359
+ "onUpdate:modelValue": g[3] || (g[3] = (z) => y("caption", z)),
360
+ onFocusChanged: g[4] || (g[4] = (z) => !z && w("caption")),
361
+ rows: "4"
362
+ }, null, 8, ["model-value"]),
363
+ e("div", ze, [
364
+ c(W, {
365
+ text: t(n),
366
+ onEditWithRemy: U
367
+ }, null, 8, ["text"])
368
+ ])
369
+ ])
370
+ ])
371
+ ])
372
+ ]);
373
+ };
374
+ }
375
+ }), je = { class: "flex items-center px-4" }, Ee = { class: "px-[4px] py-[6px] text-xs text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ C({
376
+ __name: "ActionBar",
377
+ setup(l) {
378
+ const m = [
379
+ { icon: "thumb_up", count: "10k+" },
380
+ { icon: "mode_comment", count: "128" },
381
+ { icon: "share", count: "56" }
382
+ ];
383
+ return (d, p) => {
384
+ const i = b("FmIcon");
385
+ return s(), u("div", je, [
386
+ (s(), u(B, null, L(m, (r) => e("button", {
387
+ key: r.icon,
388
+ class: "flex px-12 py-[6px] items-center justify-center text-fm-color-typo-secondary hover:bg-fm-color-neutral-gray-50 transition-colors fm-typo-en-body-sm-400"
389
+ }, [
390
+ c(i, {
391
+ class: "px-[4px] py-[6px]",
392
+ name: r.icon,
393
+ size: "md",
394
+ color: "neutral-gray-400",
395
+ outline: ""
396
+ }, null, 8, ["name"]),
397
+ e("span", Ee, f(r.count), 1)
398
+ ])), 64))
399
+ ]);
400
+ };
401
+ }
402
+ }), Be = { class: "max-w-[500px] mx-auto rounded-lg border border-fm-color-neutral-gray-200 fm-shadow-light-200 overflow-hidden bg-white" }, Re = { class: "flex items-center gap-12 px-16 py-12" }, Pe = { class: "w-40 h-40 rounded-full bg-fm-color-neutral-gray-200 flex items-center justify-center shrink-0 overflow-hidden" }, Ae = ["src", "alt"], Se = { class: "flex-1 min-w-0" }, Ve = { class: "fm-typo-en-body-sm-700 text-fm-color-typo-primary leading-tight font-semibold" }, Le = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary leading-tight text-xs flex items-center gap-4" }, Ne = {
403
+ key: 0,
404
+ class: "px-16 pb-12"
405
+ }, De = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-primary whitespace-pre-wrap" }, Oe = { class: "w-full bg-fm-color-neutral-gray-100 overflow-hidden" }, He = ["src", "alt"], We = {
406
+ key: 1,
407
+ class: "aspect-square flex items-center justify-center"
408
+ }, qe = { class: "px-16 py-12 bg-fm-color-neutral-gray-50 border-t border-fm-color-neutral-gray-200" }, Ge = { class: "fm-typo-en-body-sm-700 text-fm-color-typo-primary line-clamp-2" }, Ke = /* @__PURE__ */ C({
409
+ __name: "FacebookPostPreview",
410
+ props: {
411
+ imageUrl: {},
412
+ headline: {},
413
+ caption: {}
414
+ },
415
+ setup(l) {
416
+ const { t: m } = I(), { currentBusiness: d } = R();
417
+ return (p, i) => {
418
+ var o, n;
419
+ const r = b("FmIcon");
420
+ return s(), u("div", Be, [
421
+ e("div", Re, [
422
+ e("div", Pe, [
423
+ (o = t(d)) != null && o.thumbnail ? (s(), u("img", {
424
+ key: 0,
425
+ src: t(d).thumbnail,
426
+ class: "w-full h-full object-cover",
427
+ alt: t(m)("connect.marketing.preview.businessLogo")
428
+ }, null, 8, Ae)) : (s(), T(r, {
429
+ key: 1,
430
+ name: "storefront",
431
+ size: "sm",
432
+ color: "neutral-gray-400"
433
+ }))
434
+ ]),
435
+ e("div", Se, [
436
+ e("p", Ve, f(((n = t(d)) == null ? void 0 : n.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
437
+ e("p", Le, [
438
+ q(f(t(m)("connect.marketing.preview.sponsored")) + " · ", 1),
439
+ c(r, {
440
+ name: "public",
441
+ size: "sm",
442
+ color: "neutral-gray-400"
443
+ })
444
+ ])
445
+ ]),
446
+ c(r, {
447
+ name: "more_horiz",
448
+ size: "sm",
449
+ color: "neutral-gray-400"
450
+ })
451
+ ]),
452
+ l.caption ? (s(), u("div", Ne, [
453
+ e("p", De, f(l.caption), 1)
454
+ ])) : $("", !0),
455
+ e("div", Oe, [
456
+ l.imageUrl ? (s(), u("img", {
457
+ key: 0,
458
+ src: l.imageUrl,
459
+ alt: t(m)("connect.marketing.preview.postImage"),
460
+ class: "w-full h-auto block"
461
+ }, null, 8, He)) : (s(), u("div", We, [
462
+ c(r, {
463
+ name: "image",
464
+ size: "xl",
465
+ color: "neutral-gray-300"
466
+ })
467
+ ]))
468
+ ]),
469
+ e("div", qe, [
470
+ i[0] || (i[0] = e("p", { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary uppercase tracking-wide mb-2" }, " yourbusiness.com ", -1)),
471
+ e("p", Ge, f(l.headline ?? "—"), 1)
472
+ ]),
473
+ c(Te)
474
+ ]);
475
+ };
476
+ }
477
+ }), Ze = { class: "max-w-[300px] mx-auto rounded-2xl overflow-hidden fm-shadow-light-200 relative aspect-[9/16] bg-black" }, Je = ["src", "alt"], Qe = {
478
+ key: 1,
479
+ class: "absolute inset-0 flex items-center justify-center bg-fm-color-neutral-gray-800"
480
+ }, Xe = { class: "absolute inset-x-0 top-0 px-12 pt-12 pb-24 bg-gradient-to-b from-black/60 to-transparent" }, Ye = { class: "flex items-center gap-8" }, et = { class: "w-32 h-32 rounded-full bg-fm-color-neutral-gray-200 shrink-0 overflow-hidden border-2 border-white" }, tt = ["src", "alt"], ot = { class: "flex-1 min-w-0" }, nt = { class: "text-white text-xs font-semibold leading-tight truncate" }, at = { class: "text-white/70 text-[10px] leading-tight" }, st = { class: "absolute inset-x-0 bottom-0 px-16 pb-24 pt-40 bg-gradient-to-t from-black/70 to-transparent" }, lt = {
481
+ key: 0,
482
+ class: "text-white text-xs mb-12 line-clamp-3"
483
+ }, it = { class: "flex justify-center" }, rt = { class: "px-24 py-8 rounded-full bg-white text-fm-color-typo-primary text-xs font-semibold" }, ct = /* @__PURE__ */ C({
484
+ __name: "FacebookStoryPreview",
485
+ props: {
486
+ imageUrl: {},
487
+ headline: {},
488
+ caption: {}
489
+ },
490
+ setup(l) {
491
+ const { t: m } = I(), { currentBusiness: d } = R();
492
+ return (p, i) => {
493
+ var o, n;
494
+ const r = b("FmIcon");
495
+ return s(), u(B, null, [
496
+ e("div", Ze, [
497
+ l.imageUrl ? (s(), u("img", {
498
+ key: 0,
499
+ src: l.imageUrl,
500
+ alt: t(m)("connect.marketing.preview.storyImage"),
501
+ class: "absolute inset-0 w-full h-full object-contain"
502
+ }, null, 8, Je)) : (s(), u("div", Qe, [
503
+ c(r, {
504
+ name: "image",
505
+ size: "xl",
506
+ color: "neutral-gray-500"
507
+ })
508
+ ])),
509
+ e("div", Xe, [
510
+ i[0] || (i[0] = e("div", { class: "flex gap-4 mb-10" }, [
511
+ e("div", { class: "h-[2px] flex-1 rounded-full bg-white" })
512
+ ], -1)),
513
+ e("div", Ye, [
514
+ e("div", et, [
515
+ (o = t(d)) != null && o.thumbnail ? (s(), u("img", {
516
+ key: 0,
517
+ src: t(d).thumbnail,
518
+ class: "w-full h-full object-cover",
519
+ alt: t(m)("connect.marketing.preview.businessLogo")
520
+ }, null, 8, tt)) : (s(), T(r, {
521
+ key: 1,
522
+ name: "storefront",
523
+ size: "sm",
524
+ color: "neutral-gray-400"
525
+ }))
526
+ ]),
527
+ e("div", ot, [
528
+ e("p", nt, f(((n = t(d)) == null ? void 0 : n.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
529
+ e("p", at, f(t(m)("connect.marketing.preview.sponsored")), 1)
530
+ ]),
531
+ c(r, {
532
+ name: "more_vert",
533
+ size: "sm",
534
+ color: "neutral-white"
535
+ }),
536
+ c(r, {
537
+ name: "close",
538
+ size: "sm",
539
+ color: "neutral-white"
540
+ })
541
+ ])
542
+ ]),
543
+ e("div", st, [
544
+ l.caption ? (s(), u("p", lt, f(l.caption), 1)) : $("", !0),
545
+ e("div", it, [
546
+ e("button", rt, f(l.headline ?? t(m)("connect.marketing.preview.learnMore")), 1)
547
+ ])
548
+ ])
549
+ ]),
550
+ i[1] || (i[1] = q(" /template> ", -1))
551
+ ], 64);
552
+ };
553
+ }
554
+ }), mt = { class: "max-w-[400px] mx-auto rounded-lg border border-fm-color-neutral-gray-200 fm-shadow-light-200 overflow-hidden bg-white" }, dt = { class: "flex items-center gap-12 px-12 py-10" }, ut = { class: "w-32 h-32 rounded-full bg-gradient-to-tr from-yellow-400 via-pink-500 to-purple-600 p-[2px] shrink-0" }, pt = { class: "w-full h-full rounded-full bg-white p-[1px] overflow-hidden" }, gt = ["src", "alt"], ft = {
555
+ key: 1,
556
+ class: "w-full h-full rounded-full bg-fm-color-neutral-gray-200 flex items-center justify-center"
557
+ }, vt = { class: "flex-1 min-w-0" }, _t = { class: "text-sm font-semibold text-fm-color-typo-primary leading-tight truncate" }, ht = { class: "text-[10px] text-fm-color-typo-secondary leading-tight" }, yt = { class: "w-full bg-fm-color-neutral-gray-100 overflow-hidden" }, bt = ["src", "alt"], xt = {
558
+ key: 1,
559
+ class: "aspect-square flex items-center justify-center"
560
+ }, kt = { class: "flex items-center gap-12 px-12 pt-10 pb-4" }, wt = { class: "px-12 pb-4" }, $t = { class: "text-xs font-semibold text-fm-color-typo-primary" }, Mt = {
561
+ key: 0,
562
+ class: "px-12 pb-12"
563
+ }, Ct = { class: "text-xs text-fm-color-typo-primary" }, Ft = { class: "font-semibold mr-4" }, Ut = { class: "line-clamp-2" }, zt = /* @__PURE__ */ C({
564
+ __name: "InstagramPostPreview",
565
+ props: {
566
+ imageUrl: {},
567
+ headline: {},
568
+ caption: {}
569
+ },
570
+ setup(l) {
571
+ const { t: m } = I(), { currentBusiness: d } = R();
572
+ return (p, i) => {
573
+ var o, n, v;
574
+ const r = b("FmIcon");
575
+ return s(), u("div", mt, [
576
+ e("div", dt, [
577
+ e("div", ut, [
578
+ e("div", pt, [
579
+ (o = t(d)) != null && o.thumbnail ? (s(), u("img", {
580
+ key: 0,
581
+ src: t(d).thumbnail,
582
+ class: "w-full h-full object-cover rounded-full",
583
+ alt: t(m)("connect.marketing.preview.businessLogo")
584
+ }, null, 8, gt)) : (s(), u("div", ft, [
585
+ c(r, {
586
+ name: "storefront",
587
+ size: "sm",
588
+ color: "neutral-gray-400"
589
+ })
590
+ ]))
591
+ ])
592
+ ]),
593
+ e("div", vt, [
594
+ e("p", _t, f(((n = t(d)) == null ? void 0 : n.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
595
+ e("p", ht, f(t(m)("connect.marketing.preview.sponsored")), 1)
596
+ ]),
597
+ c(r, {
598
+ name: "more_horiz",
599
+ size: "sm",
600
+ color: "neutral-gray-400"
601
+ })
602
+ ]),
603
+ e("div", yt, [
604
+ l.imageUrl ? (s(), u("img", {
605
+ key: 0,
606
+ src: l.imageUrl,
607
+ alt: t(m)("connect.marketing.preview.postImage"),
608
+ class: "w-full h-auto block"
609
+ }, null, 8, bt)) : (s(), u("div", xt, [
610
+ c(r, {
611
+ name: "image",
612
+ size: "xl",
613
+ color: "neutral-gray-300"
614
+ })
615
+ ]))
616
+ ]),
617
+ e("div", kt, [
618
+ c(r, {
619
+ name: "favorite_border",
620
+ size: "md",
621
+ color: "neutral-gray-700"
622
+ }),
623
+ c(r, {
624
+ name: "mode_comment",
625
+ size: "md",
626
+ color: "neutral-gray-700",
627
+ outline: ""
628
+ }),
629
+ c(r, {
630
+ name: "send",
631
+ size: "md",
632
+ color: "neutral-gray-700"
633
+ }),
634
+ i[0] || (i[0] = e("div", { class: "flex-1" }, null, -1)),
635
+ c(r, {
636
+ name: "bookmark_border",
637
+ size: "md",
638
+ color: "neutral-gray-700"
639
+ })
640
+ ]),
641
+ e("div", wt, [
642
+ e("p", $t, f(t(m)("connect.marketing.preview.likes", { count: "10,428" })), 1)
643
+ ]),
644
+ l.caption || l.headline ? (s(), u("div", Mt, [
645
+ e("p", Ct, [
646
+ e("span", Ft, f(((v = t(d)) == null ? void 0 : v.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
647
+ e("span", Ut, f(l.caption ?? l.headline), 1)
648
+ ])
649
+ ])) : $("", !0)
650
+ ]);
651
+ };
652
+ }
653
+ }), It = { class: "max-w-[300px] mx-auto rounded-2xl overflow-hidden fm-shadow-light-200 relative aspect-[9/16] bg-black" }, jt = ["src", "alt"], Et = {
654
+ key: 1,
655
+ class: "absolute inset-0 flex items-center justify-center bg-fm-color-neutral-gray-800"
656
+ }, Tt = { class: "absolute inset-x-0 top-0 px-12 pt-12 pb-24 bg-gradient-to-b from-black/60 to-transparent" }, Bt = { class: "flex items-center gap-8" }, Rt = { class: "w-32 h-32 rounded-full p-[2px] bg-gradient-to-tr from-yellow-400 via-pink-500 to-purple-600 shrink-0" }, Pt = { class: "w-full h-full rounded-full bg-black/30 overflow-hidden" }, At = ["src", "alt"], St = {
657
+ key: 1,
658
+ class: "w-full h-full flex items-center justify-center"
659
+ }, Vt = { class: "flex-1 min-w-0" }, Lt = { class: "text-white text-xs font-semibold leading-tight truncate" }, Nt = { class: "text-white/70 text-[10px] leading-tight" }, Dt = { class: "absolute inset-x-0 bottom-0 px-16 pb-24 pt-40 bg-gradient-to-t from-black/70 to-transparent" }, Ot = {
660
+ key: 0,
661
+ class: "text-white text-xs mb-12 line-clamp-3"
662
+ }, Ht = { class: "flex justify-center" }, Wt = { class: "px-24 py-8 rounded-full bg-white text-fm-color-typo-primary text-xs font-semibold" }, qt = /* @__PURE__ */ C({
663
+ __name: "InstagramStoryPreview",
664
+ props: {
665
+ imageUrl: {},
666
+ headline: {},
667
+ caption: {}
668
+ },
669
+ setup(l) {
670
+ const { t: m } = I(), { currentBusiness: d } = R();
671
+ return (p, i) => {
672
+ var o, n;
673
+ const r = b("FmIcon");
674
+ return s(), u("div", It, [
675
+ l.imageUrl ? (s(), u("img", {
676
+ key: 0,
677
+ src: l.imageUrl,
678
+ alt: t(m)("connect.marketing.preview.storyImage"),
679
+ class: "absolute inset-0 w-full h-full object-contain"
680
+ }, null, 8, jt)) : (s(), u("div", Et, [
681
+ c(r, {
682
+ name: "image",
683
+ size: "xl",
684
+ color: "neutral-gray-500"
685
+ })
686
+ ])),
687
+ e("div", Tt, [
688
+ i[0] || (i[0] = e("div", { class: "flex gap-4 mb-10" }, [
689
+ e("div", { class: "h-[2px] flex-1 rounded-full bg-white" })
690
+ ], -1)),
691
+ e("div", Bt, [
692
+ e("div", Rt, [
693
+ e("div", Pt, [
694
+ (o = t(d)) != null && o.thumbnail ? (s(), u("img", {
695
+ key: 0,
696
+ src: t(d).thumbnail,
697
+ class: "w-full h-full object-cover",
698
+ alt: t(m)("connect.marketing.preview.businessLogo")
699
+ }, null, 8, At)) : (s(), u("div", St, [
700
+ c(r, {
701
+ name: "storefront",
702
+ size: "sm",
703
+ color: "neutral-gray-400"
704
+ })
705
+ ]))
706
+ ])
707
+ ]),
708
+ e("div", Vt, [
709
+ e("p", Lt, f(((n = t(d)) == null ? void 0 : n.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
710
+ e("p", Nt, f(t(m)("connect.marketing.preview.sponsored")), 1)
711
+ ]),
712
+ c(r, {
713
+ name: "more_vert",
714
+ size: "sm",
715
+ color: "neutral-white"
716
+ }),
717
+ c(r, {
718
+ name: "close",
719
+ size: "sm",
720
+ color: "neutral-white"
721
+ })
722
+ ])
723
+ ]),
724
+ e("div", Dt, [
725
+ l.caption ? (s(), u("p", Ot, f(l.caption), 1)) : $("", !0),
726
+ e("div", Ht, [
727
+ e("button", Wt, f(l.headline ?? t(m)("connect.marketing.preview.learnMore")), 1)
728
+ ])
729
+ ])
730
+ ]);
731
+ };
732
+ }
733
+ }), Gt = { class: "relative w-full" }, Kt = {
734
+ key: 0,
735
+ class: "flex items-center gap-12"
736
+ }, Zt = ["fill"], Jt = ["d"], Qt = { class: "fm-typo-en-body-sm-700 font-semibold" }, Xt = {
737
+ key: 1,
738
+ class: "absolute z-30 w-full mt-8 bg-white border border-fm-color-neutral-gray-200 rounded-lg shadow-lg overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200"
739
+ }, Yt = { class: "max-h-[360px] overflow-y-auto py-8 px-8" }, eo = {
740
+ key: 0,
741
+ class: "h-1 bg-fm-color-neutral-gray-100 my-8"
742
+ }, to = { class: "flex items-center gap-8 px-16 py-8" }, oo = ["fill"], no = ["d"], ao = { class: "text-xs font-bold text-fm-color-typo-secondary uppercase tracking-wider" }, so = ["onClick"], lo = { class: "flex items-center gap-8" }, io = { class: "flex items-center gap-8" }, ro = { class: "text-xs text-fm-color-neutral-gray-400 font-medium" }, co = /* @__PURE__ */ C({
743
+ __name: "SocialMediaPreviewSelector",
744
+ props: {
745
+ modelValue: {}
746
+ },
747
+ emits: ["update:modelValue"],
748
+ setup(l, { emit: m }) {
749
+ const d = l, p = m, { t: i } = I(), r = M(!1), o = E(() => [
750
+ {
751
+ name: i("connect.marketing.preview.facebook"),
752
+ iconColor: "#1877F2",
753
+ iconPath: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",
754
+ options: [
755
+ {
756
+ label: i("connect.marketing.preview.facebookPost"),
757
+ value: "facebook-post",
758
+ icon: "draft",
759
+ aspectRatio: "1:1"
760
+ },
761
+ {
762
+ label: i("connect.marketing.preview.facebookStory"),
763
+ value: "facebook-story",
764
+ icon: "motion_play",
765
+ aspectRatio: "9:16"
766
+ }
767
+ ]
768
+ },
769
+ {
770
+ name: i("connect.marketing.preview.instagram"),
771
+ iconColor: "#E1306C",
772
+ iconPath: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm5.882-10.55a1.44 1.44 0 10-2.88 0 1.44 1.44 0 002.88 0z",
773
+ options: [
774
+ {
775
+ label: i("connect.marketing.preview.instagramPost"),
776
+ value: "instagram-post",
777
+ icon: "draft",
778
+ aspectRatio: "1:1"
779
+ },
780
+ {
781
+ label: i("connect.marketing.preview.instagramStory"),
782
+ value: "instagram-story",
783
+ icon: "motion_play",
784
+ aspectRatio: "9:16"
785
+ }
786
+ ]
787
+ }
788
+ ]), n = E(() => o.value.flatMap((h) => h.options)), v = E(
789
+ () => n.value.find((h) => h.value === d.modelValue)
790
+ ), _ = E(
791
+ () => o.value.find((h) => h.options.some((F) => F.value === d.modelValue))
792
+ ), k = (h) => {
793
+ p("update:modelValue", h), r.value = !1;
794
+ };
795
+ return (h, F) => {
796
+ const U = b("FmIcon");
797
+ return s(), u("div", Gt, [
798
+ r.value ? (s(), u("div", {
799
+ key: 0,
800
+ class: "fixed inset-0 z-10",
801
+ onClick: F[0] || (F[0] = (w) => r.value = !1)
802
+ })) : $("", !0),
803
+ e("button", {
804
+ type: "button",
805
+ onClick: F[1] || (F[1] = (w) => r.value = !r.value),
806
+ class: "relative z-20 flex items-center justify-between w-full px-16 py-12 bg-white border border-fm-color-neutral-gray-200 rounded-lg hover:border-fm-color-primary-300 focus:outline-none focus:border-fm-color-primary-500 transition-colors shadow-sm"
807
+ }, [
808
+ v.value && _.value ? (s(), u("div", Kt, [
809
+ (s(), u("svg", {
810
+ class: "w-[20px] h-[20px] shrink-0",
811
+ viewBox: "0 0 24 24",
812
+ fill: _.value.iconColor,
813
+ xmlns: "http://www.w3.org/2000/svg"
814
+ }, [
815
+ e("path", {
816
+ d: _.value.iconPath
817
+ }, null, 8, Jt)
818
+ ], 8, Zt)),
819
+ e("span", Qt, f(v.value.label), 1)
820
+ ])) : $("", !0),
821
+ c(U, {
822
+ name: "expand_more",
823
+ size: "md",
824
+ color: "neutral-gray-400"
825
+ })
826
+ ]),
827
+ r.value ? (s(), u("div", Xt, [
828
+ e("div", Yt, [
829
+ (s(!0), u(B, null, L(o.value, (w, y) => (s(), u("div", {
830
+ key: w.name,
831
+ class: "flex flex-col gap-[6px]"
832
+ }, [
833
+ y > 0 ? (s(), u("div", eo)) : $("", !0),
834
+ e("div", to, [
835
+ (s(), u("svg", {
836
+ class: "w-16 h-16 shrink-0",
837
+ viewBox: "0 0 24 24",
838
+ fill: w.iconColor,
839
+ xmlns: "http://www.w3.org/2000/svg"
840
+ }, [
841
+ e("path", {
842
+ d: w.iconPath
843
+ }, null, 8, no)
844
+ ], 8, oo)),
845
+ e("span", ao, f(w.name), 1)
846
+ ]),
847
+ (s(!0), u(B, null, L(w.options, (a) => (s(), u("button", {
848
+ key: a.value,
849
+ onClick: (g) => k(a.value),
850
+ class: D(["flex items-center justify-between w-full px-16 py-[10px] text-left transition-colors rounded-lg", [
851
+ l.modelValue === a.value ? "bg-fm-color-neutral-gray-200 " : "bg-white hover:bg-fm-color-neutral-gray-100"
852
+ ]])
853
+ }, [
854
+ e("div", lo, [
855
+ c(U, {
856
+ name: a.icon,
857
+ size: "sm",
858
+ outline: "",
859
+ color: l.modelValue === a.value ? "primary-500" : "neutral-gray-500"
860
+ }, null, 8, ["name", "color"]),
861
+ e("span", {
862
+ class: D([
863
+ "fm-typo-en-body-sm-500",
864
+ l.modelValue === a.value ? "text-fm-color-primary-600 font-semibold" : "text-fm-color-typo-primary"
865
+ ])
866
+ }, f(a.label), 3)
867
+ ]),
868
+ e("div", io, [
869
+ e("span", ro, f(a.aspectRatio), 1)
870
+ ])
871
+ ], 10, so))), 128))
872
+ ]))), 128))
873
+ ])
874
+ ])) : $("", !0)
875
+ ]);
876
+ };
877
+ }
878
+ }), mo = { class: "ml-12 flex items-center" }, uo = /* @__PURE__ */ C({
879
+ __name: "MarketingMaterialPrimaryButton",
880
+ props: {
881
+ disabled: { type: Boolean },
882
+ marketingMaterial: {}
883
+ },
884
+ emits: ["save"],
885
+ setup(l, { emit: m }) {
886
+ const d = l, { t: p } = I(), { shareMaterial: i } = K();
887
+ async function r() {
888
+ await i(d.marketingMaterial);
889
+ }
890
+ return (o, n) => {
891
+ const v = b("FmButton"), _ = b("FmMenuItem"), k = b("FmMenu");
892
+ return s(), u("div", mo, [
893
+ c(v, {
894
+ variant: "primary",
895
+ disabled: l.disabled,
896
+ class: "!rounded-r-none",
897
+ label: t(p)("connect.common.save"),
898
+ onClick: n[0] || (n[0] = (h) => o.$emit("save"))
899
+ }, null, 8, ["disabled", "label"]),
900
+ c(k, { placement: "bottom-end" }, {
901
+ "menu-button": j(() => [
902
+ c(v, {
903
+ variant: "primary",
904
+ icon: "arrow_drop_down",
905
+ disabled: l.disabled,
906
+ class: "!rounded-l-none border-l border-white/20 px-2"
907
+ }, null, 8, ["disabled"])
908
+ ]),
909
+ default: j(() => [
910
+ c(_, {
911
+ label: t(p)("connect.marketing.actions.share"),
912
+ disabled: !l.marketingMaterial || l.disabled,
913
+ onClick: r
914
+ }, null, 8, ["label", "disabled"])
915
+ ]),
916
+ _: 1
917
+ })
918
+ ]);
919
+ };
920
+ }
921
+ }), po = { class: "mx-auto mb-24 grid max-w-[856px] grid-cols-1 lg:grid-cols-2 rounded-2xl xs:rounded-none border border-fm-color-neutral-gray-200 xs:border-none overflow-hidden" }, go = { class: "min-w-0 bg-fm-color-neutral-gray-50 xs:p-16" }, fo = { class: "mx-auto flex max-w-[560px] flex-col" }, vo = { class: "p-24 xs:p-16" }, _o = { class: "bg-fm-color-neutral-gray-100 p-24 xs:p-12" }, Eo = /* @__PURE__ */ C({
922
+ __name: "MarketingMaterialEdit",
923
+ setup(l) {
924
+ const { t: m } = I(), d = te(), p = G(), i = se(), { minor: r } = ie, o = M(null), n = M(null), v = E(() => !o.value || !n.value ? !1 : o.value.imageUrl !== n.value.imageUrl || o.value.headline !== n.value.headline || o.value.caption !== n.value.caption), _ = {
925
+ label: m("connect.common.cancel"),
926
+ value: "cancel",
927
+ isPrimary: !1
928
+ };
929
+ async function k() {
930
+ v.value ? i.open({
931
+ title: m("connect.campaign.common.unsaved_changes"),
932
+ message: m("connect.campaign.common.unsaved_changes"),
933
+ primaryActions: {
934
+ text: m("connect.campaign.common.unsaved_changes_confirm"),
935
+ close: !0
936
+ },
937
+ secondaryActions: {
938
+ text: m("connect.campaign.common.unsaved_changes_cancel"),
939
+ close: !1
940
+ }
941
+ }).onPrimary(() => {
942
+ d.push({ name: A["$connect-MARKETING"] });
943
+ }).onSecondary(() => {
944
+ i.close();
945
+ }) : d.push({ name: A["$connect-MARKETING"] });
946
+ }
947
+ async function h() {
948
+ o.value && await r(
949
+ async () => {
950
+ const y = o.value._id, a = await H.updateMarketingMaterial(y, {
951
+ imageUrl: o.value.imageUrl,
952
+ headline: o.value.headline,
953
+ caption: o.value.caption
954
+ });
955
+ o.value = a, n.value = O.cloneDeep(a);
956
+ },
957
+ {
958
+ message: m("connect.marketing.materialEdit.saving"),
959
+ successMessage: m("connect.marketing.materialEdit.save_success")
960
+ }
961
+ );
962
+ }
963
+ async function F(y) {
964
+ y === "save" ? await h() : y === "cancel" && await k();
965
+ }
966
+ const U = M("facebook-post"), w = E(() => {
967
+ switch (U.value) {
968
+ case "facebook-story":
969
+ return ct;
970
+ case "instagram-post":
971
+ return zt;
972
+ case "instagram-story":
973
+ return qt;
974
+ default:
975
+ return Ke;
976
+ }
977
+ });
978
+ return X(async () => {
979
+ const y = p.query.id;
980
+ if (!y) {
981
+ d.replace({ name: A["$connect-MARKETING"] });
982
+ return;
983
+ }
984
+ const a = await H.getMarketingMaterial(y);
985
+ o.value = a, n.value = O.cloneDeep(a);
986
+ }), (y, a) => {
987
+ const g = b("FmPageHead");
988
+ return s(), u(B, null, [
989
+ c(g, {
990
+ "back-button": !0,
991
+ title: t(m)("connect.marketing.materialEdit.title"),
992
+ actions: [_],
993
+ "onClick:back": k,
994
+ "onClick:action": F
995
+ }, {
996
+ append: j(() => [
997
+ c(uo, {
998
+ "marketing-material": t(o),
999
+ onSave: h
1000
+ }, null, 8, ["marketing-material"])
1001
+ ]),
1002
+ _: 1
1003
+ }, 8, ["title", "actions"]),
1004
+ e("div", po, [
1005
+ e("section", go, [
1006
+ e("div", fo, [
1007
+ e("div", vo, [
1008
+ c(co, {
1009
+ modelValue: t(U),
1010
+ "onUpdate:modelValue": a[0] || (a[0] = (x) => Y(U) ? U.value = x : null)
1011
+ }, null, 8, ["modelValue"])
1012
+ ]),
1013
+ e("div", _o, [
1014
+ t(o) ? (s(), T(ee(t(w)), {
1015
+ key: 0,
1016
+ "image-url": t(o).imageUrl,
1017
+ headline: t(o).headline,
1018
+ caption: t(o).caption
1019
+ }, null, 8, ["image-url", "headline", "caption"])) : $("", !0)
1020
+ ])
1021
+ ])
1022
+ ]),
1023
+ t(o) ? (s(), T(Ie, {
1024
+ key: 0,
1025
+ "marketing-material": t(o),
1026
+ "onUpdate:imageUrl": a[1] || (a[1] = (x) => t(o).imageUrl = x),
1027
+ "onUpdate:headline": a[2] || (a[2] = (x) => t(o).headline = x),
1028
+ "onUpdate:caption": a[3] || (a[3] = (x) => t(o).caption = x)
1029
+ }, null, 8, ["marketing-material"])) : $("", !0)
1030
+ ])
1031
+ ], 64);
1032
+ };
1033
+ }
1034
+ });
1035
+ export {
1036
+ Eo as default
1037
+ };