@feedmepos/mf-connect 0.1.38-beta.6 → 0.1.38-beta.61

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 (148) hide show
  1. package/dist/{Analytic-NBx32reB.js → Analytic-CM7mh-iO.js} +16 -16
  2. package/dist/{App-CaK9PvMd.js → App-CeCzzsDu.js} +625 -619
  3. package/dist/AuditLogs-VWx8DFKA.js +1991 -0
  4. package/dist/{Bin-CL6o1JSs.js → Bin-vUuol_I9.js} +10 -10
  5. package/dist/Broadcast-6VXz4-IG.js +233 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIySMYGP.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js} +6 -6
  7. package/dist/{Card-DNdEjt6s.js → Card-CeIeGET1.js} +144 -140
  8. package/dist/Collections-CF_OcAL3.js +540 -0
  9. package/dist/Credit-BUqGOyp_.js +226 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js +3150 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js +347 -0
  14. package/dist/Experience-BxiFH_uV.js +225 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-lgg_oBvT.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-BzYW0LfY.js +300 -0
  18. package/dist/GenerateMaterial-B5A7mx2y.js +589 -0
  19. package/dist/Grab-BgiMqwvj.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js} +49 -48
  21. package/dist/{Index-2wokhhFB.js → Index-B85ops8K.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-CXGVkD-W.js} +1 -1
  24. package/dist/Marketing-Bnijl7lA.js +145 -0
  25. package/dist/MarketingMaterialEdit-BlUKwSoP.js +746 -0
  26. package/dist/{Member-2xV4Izwa.js → Member-sT853g51.js} +38 -37
  27. package/dist/{MemberList-CYgBdyJt.js → MemberList-DYT5_fSP.js} +158 -159
  28. package/dist/{MemberTransactions-DWDV01N4.js → MemberTransactions-Cqce5ebe.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Becsw31k.js → MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js} +5940 -5668
  30. package/dist/Mission-Q5_sGgrm.js +304 -0
  31. package/dist/{Overview-BZjto86d.js → Overview-B0rwrHR1.js} +24 -25
  32. package/dist/Point-BGYFMvev.js +228 -0
  33. package/dist/Promotion-0acd63nA.js +364 -0
  34. package/dist/{Queue-D62r2qjy.js → Queue-SVqRUlD_.js} +14 -15
  35. package/dist/{Record-0iF3dG7y.js → Record-BTjg4ihy.js} +10 -10
  36. package/dist/{Reward-C5IEJYu6.js → Reward-DW58VMRO.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js → RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js +1766 -0
  39. package/dist/{Segment-BknjBrUP.js → Segment-Dny8pxP1.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLQlkp-j.js → SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js} +12 -12
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaPi4hYB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BoZ0ZpNZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js} +4 -4
  43. package/dist/Setting-CjcnxK34.js +1992 -0
  44. package/dist/SettingAdvertisements-CIyDF4C8.js +263 -0
  45. package/dist/Store-B8k5YVqU.js +1934 -0
  46. package/dist/StoreRewards-BW08rwpL.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js +8093 -0
  49. package/dist/{Tier-B168DtFj.js → Tier-DKzu4tYw.js} +561 -480
  50. package/dist/{Title-uH0RI1N3.js → Title-BK-TXatJ.js} +149 -147
  51. package/dist/{Transaction-Bx-pmLrJ.js → Transaction-Duayg1jd.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ce_55V7l.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js} +7 -7
  53. package/dist/{Voucher-Dzpz2AEB.js → Voucher-BEVAkNeJ.js} +140 -124
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js → ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js} +2 -2
  56. package/dist/app-IvbII0ql.js +45026 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-B65OtB5B.js → business-BFIwFfkq.js} +11 -8
  59. package/dist/campaign-RuIwxc4y.js +253 -0
  60. package/dist/{campaign-qGy6uzrC.js → campaign-w9j4I4jn.js} +29 -25
  61. package/dist/{campaign.enum-CZp2DmXI.js → campaign.enum-IHLsfdik.js} +3 -2
  62. package/dist/campaign.fn-B_P1MkRV.js +776 -0
  63. package/dist/{collectible.enum-CN-lnG1m.js → collectible.enum-CUgSjO08.js} +1 -1
  64. package/dist/{collection.fn-mMwGQWce.js → collection.fn-CrfnNb41.js} +2 -2
  65. package/dist/dto-jwO_sX9I.js +222 -0
  66. package/dist/{effect-Bg3yb9T6.js → effect--0g8PNyt.js} +1 -1
  67. package/dist/{email-addresses-CQsN724N.js → email-addresses-HtsxvXw9.js} +2 -2
  68. package/dist/{export-BLf2dhFd.js → export-CFEwMRmd.js} +9 -10
  69. package/dist/{helper-CFaph16Q.js → helper-CCfb24PO.js} +22 -7
  70. package/dist/index-B-AMMFfT.js +3419 -0
  71. package/dist/{index-BPyac0fq.js → index-BR3UbZ0F.js} +1 -1
  72. package/dist/{index-Dy5p_b1S.js → index-BZEM0T2A.js} +1 -1
  73. package/dist/index-Bflu4Rft.js +8884 -0
  74. package/dist/{index-Dkmn0jmX.js → index-CR3f3BXQ.js} +2552 -2356
  75. package/dist/{index-BkySejFg.js → index-CZPcwcUo.js} +3 -3
  76. package/dist/{index-BPZtjcTm.js → index-CkuPY85X.js} +1 -1
  77. package/dist/index-CppLPpqB.js +30933 -0
  78. package/dist/index-CuvNtC_M.js +61 -0
  79. package/dist/{index-BKOgzVx6.js → index-DDYH-IEX.js} +1 -1
  80. package/dist/{index-DaEQgaiW.js → index-DdZdHioZ.js} +455 -245
  81. package/dist/{index-BBPIZjw6.js → index-Dic_WcAL.js} +3 -3
  82. package/dist/{index-CH2d_B8c.js → index-DpjYgKTN.js} +4 -1
  83. package/dist/index-wzSeRJAd.js +36 -0
  84. package/dist/{index.esm2017-B9vJTKYg.js → index.esm2017-CUnjzfU-.js} +89 -89
  85. package/dist/loading-CivgDw5C.js +215 -0
  86. package/dist/{lodash-B5I3zXaY.js → lodash-BSbv_9TG.js} +1 -1
  87. package/dist/{membership-Du79A0Pl.js → membership-j2w1YUO-.js} +3 -3
  88. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  89. package/dist/{money-DXgYs2-R.js → money-DL-x8hiT.js} +1 -1
  90. package/dist/{number-CBMkNZvH.js → number-D1yoFGEr.js} +1 -1
  91. package/dist/objectid-CHab6j3r.js +145 -0
  92. package/dist/{campaign-iKI-L84v.js → plugins-P-V4XWmW.js} +784 -777
  93. package/dist/remy-D_Deb3ue.js +13 -0
  94. package/dist/{reward-ClX_lWcQ.js → reward-BqMlBQRu.js} +1 -1
  95. package/dist/{rule-BfidJ75Y.js → rule-CztsLdki.js} +4 -4
  96. package/dist/rule-builder-DANv7Rmz.js +102 -0
  97. package/dist/style.css +11 -2
  98. package/dist/template-Dbz3FhHK.js +188 -0
  99. package/dist/timezone-BgVqObBq.js +1151 -0
  100. package/dist/trigger-CbriUibd.js +213 -0
  101. package/dist/usePagination-DtNK7W0U.js +223 -0
  102. package/dist/user-CVapqHfr.js +55 -0
  103. package/dist/vue-i18n-tpDAnnmD.js +2365 -0
  104. package/dist/{xlsx-Be4bARvl.js → xlsx-EewcN2uY.js} +1 -1
  105. package/dist/{zod-Bg2FbC-D.js → zod-D-wiCQRJ.js} +32 -31
  106. package/package.json +13 -5
  107. package/dist/AuditLogs-C-gCCPvF.js +0 -1887
  108. package/dist/Broadcast-B2-itjvZ.js +0 -227
  109. package/dist/Collections-DepGq6WJ.js +0 -465
  110. package/dist/Credit-D7K0gFwc.js +0 -222
  111. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  112. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js +0 -2185
  113. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DrbMJlm5.js +0 -347
  114. package/dist/Experience-FlBX3eyN.js +0 -223
  115. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  116. package/dist/Game-Cc3D7lKV.js +0 -278
  117. package/dist/Marketing-D7PXYloN.js +0 -20073
  118. package/dist/Mission-BSGc9822.js +0 -296
  119. package/dist/Point-0U4TTdPW.js +0 -226
  120. package/dist/Promotion-DiUa0GcV.js +0 -289
  121. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CxlamGFP.js +0 -1751
  122. package/dist/Setting-RLI7RgmN.js +0 -1936
  123. package/dist/Store-gxmv8hWJ.js +0 -1842
  124. package/dist/StoreRewards-C_6gY_Nk.js +0 -423
  125. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B5uzSYM4.js +0 -1029
  126. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-yjI96ZL0.js +0 -139
  127. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dbA6_6b9.js +0 -419
  128. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  129. package/dist/app-B90wINOO.js +0 -33357
  130. package/dist/app-DuUxQ1ZP.js +0 -7086
  131. package/dist/campaign.fn-DKScnmjX.js +0 -758
  132. package/dist/dto-C5ri8Nws.js +0 -214
  133. package/dist/index-BCGDOgxb.js +0 -38
  134. package/dist/index-BCPBmANe.js +0 -3120
  135. package/dist/index-BN2Uyvj4.js +0 -30038
  136. package/dist/index-CrbnfAk8.js +0 -8861
  137. package/dist/index-CsaQJMAR.js +0 -66
  138. package/dist/index-DJwQICyC.js +0 -146
  139. package/dist/loading-MEQuW9Xa.js +0 -71
  140. package/dist/objectid-BeZTZYqi.js +0 -145
  141. package/dist/plugins-KiMuDTPp.js +0 -208
  142. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  143. package/dist/rule-builder-BTcZx77a.js +0 -89
  144. package/dist/template-DPpMK30W.js +0 -190
  145. package/dist/trigger-DLp1bkZP.js +0 -144
  146. package/dist/usePagination-BeF5K3M7.js +0 -223
  147. package/dist/user-Cq9CGBHZ.js +0 -54
  148. package/dist/vue-i18n-COzqUgQy.js +0 -2365
@@ -0,0 +1,746 @@
1
+ import { defineComponent as _, resolveComponent as y, openBlock as n, createBlock as w, withCtx as $, createElementVNode as e, createVNode as i, createElementBlock as d, ref as v, watch as F, Fragment as I, unref as s, createCommentVNode as b, Teleport as R, Transition as A, withModifiers as L, toDisplayString as g, renderList as q, createTextVNode as N, onMounted as O } from "vue";
2
+ import "./index-BZEM0T2A.js";
3
+ import { useRoute as j, useRouter as V } from "vue-router";
4
+ import { u as E } from "./vue-i18n-tpDAnnmD.js";
5
+ import { m as C } from "./index-wzSeRJAd.js";
6
+ import { useClientEvent as M, ChatPanel as W } from "@feedmepos/mf-remy-panel";
7
+ import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ import { useSnackbar as H } from "@feedmepos/ui-library";
9
+ import { u as S } from "./remy-D_Deb3ue.js";
10
+ import { useCoreStore as U } from "@feedmepos/mf-common";
11
+ import { R as D } from "./app-IvbII0ql.js";
12
+ const z = /* @__PURE__ */ _({
13
+ __name: "ActionToolbarButton",
14
+ props: {
15
+ icon: {},
16
+ tooltip: {}
17
+ },
18
+ emits: ["click"],
19
+ setup(t, { emit: r }) {
20
+ const m = r;
21
+ return (c, a) => {
22
+ const l = y("FmIcon"), o = y("FmTooltip");
23
+ return n(), w(o, {
24
+ content: t.tooltip,
25
+ placement: "bottom",
26
+ "z-index": 60,
27
+ variant: "rich"
28
+ }, {
29
+ default: $(() => [
30
+ e("button", {
31
+ class: "p-2 rounded-lg bg-white/10 hover:bg-white/20 transition-colors text-white flex items-center justify-center",
32
+ onClick: a[0] || (a[0] = (f) => m("click"))
33
+ }, [
34
+ i(l, {
35
+ name: t.icon,
36
+ size: "md"
37
+ }, null, 8, ["name"])
38
+ ])
39
+ ]),
40
+ _: 1
41
+ }, 8, ["content"]);
42
+ };
43
+ }
44
+ }), Y = { class: "flex gap-8" }, K = /* @__PURE__ */ _({
45
+ __name: "ActionToolbar",
46
+ props: {
47
+ imageUrl: {}
48
+ },
49
+ emits: ["edit", "close"],
50
+ setup(t, { emit: r }) {
51
+ const m = t, c = r;
52
+ async function a() {
53
+ if (m.imageUrl)
54
+ try {
55
+ const o = await (await fetch(m.imageUrl)).blob(), f = URL.createObjectURL(o), x = document.createElement("a");
56
+ x.href = f, x.download = "marketing-material", x.click(), URL.revokeObjectURL(f);
57
+ } catch {
58
+ window.open(m.imageUrl, "_blank");
59
+ }
60
+ }
61
+ return (l, o) => (n(), d("div", Y, [
62
+ i(z, {
63
+ icon: "edit",
64
+ tooltip: "Edit",
65
+ onClick: o[0] || (o[0] = (f) => c("edit"))
66
+ }),
67
+ i(z, {
68
+ icon: "download",
69
+ tooltip: "Download",
70
+ onClick: a
71
+ }),
72
+ i(z, {
73
+ icon: "close",
74
+ tooltip: "Close",
75
+ onClick: o[1] || (o[1] = (f) => c("close"))
76
+ })
77
+ ]));
78
+ }
79
+ }), J = ["src"], Q = { class: "absolute inset-0 bg-black/40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity text-white" }, X = {
80
+ key: 1,
81
+ class: "absolute inset-0 flex items-center justify-center"
82
+ }, Z = { class: "relative" }, ee = ["src"], te = /* @__PURE__ */ _({
83
+ __name: "Thumbnail",
84
+ props: {
85
+ imageUrl: {}
86
+ },
87
+ emits: ["edit"],
88
+ setup(t, { emit: r }) {
89
+ const m = t, c = r, a = j(), l = v(!1), o = v(m.imageUrl);
90
+ F(
91
+ () => m.imageUrl,
92
+ (u) => {
93
+ o.value = u;
94
+ }
95
+ );
96
+ const f = v(!1);
97
+ function x() {
98
+ l.value = !1, c("edit", o.value);
99
+ }
100
+ return M(
101
+ "apply-edited-banner",
102
+ async ({ imageUrl: u }) => {
103
+ const p = a.query.id;
104
+ if (p) {
105
+ f.value = !0;
106
+ try {
107
+ await C.updateMarketingMaterial(p, { imageUrl: u }), o.value = u;
108
+ } finally {
109
+ f.value = !1;
110
+ }
111
+ }
112
+ }
113
+ ), (u, p) => {
114
+ const h = y("FmIcon");
115
+ return n(), d(I, null, [
116
+ e("div", {
117
+ class: "relative group cursor-pointer rounded-xl overflow-hidden fm-shadow-light-200 aspect-square bg-white",
118
+ onClick: p[0] || (p[0] = (k) => l.value = !0)
119
+ }, [
120
+ s(o) ? (n(), d("img", {
121
+ key: 0,
122
+ src: s(o),
123
+ alt: "Generated Material",
124
+ class: "w-full h-full object-contain"
125
+ }, null, 8, J)) : b("", !0),
126
+ e("div", Q, [
127
+ i(h, {
128
+ name: "zoom_in",
129
+ size: "xl"
130
+ })
131
+ ]),
132
+ s(f) ? (n(), d("div", X, [...p[3] || (p[3] = [
133
+ e("div", { class: "w-10 h-10 rounded-full border-4 border-white/30 border-t-white animate-spin" }, null, -1)
134
+ ])])) : b("", !0)
135
+ ]),
136
+ (n(), w(R, { to: "body" }, [
137
+ i(A, { name: "fade" }, {
138
+ default: $(() => [
139
+ s(l) ? (n(), d("div", {
140
+ key: 0,
141
+ class: "fixed inset-0 z-50 bg-black/80 flex items-center justify-center",
142
+ onClick: p[2] || (p[2] = L((k) => l.value = !1, ["self"]))
143
+ }, [
144
+ e("div", Z, [
145
+ i(K, {
146
+ class: "absolute top-0 right-0 z-10 -translate-y-full p-4",
147
+ "image-url": s(o),
148
+ onEdit: x,
149
+ onClose: p[1] || (p[1] = (k) => l.value = !1)
150
+ }, null, 8, ["image-url"]),
151
+ s(o) ? (n(), d("img", {
152
+ key: 0,
153
+ src: s(o),
154
+ alt: "Preview",
155
+ class: "max-h-[80vh] max-w-[90vw] object-contain rounded-xl"
156
+ }, null, 8, ee)) : b("", !0)
157
+ ])
158
+ ])) : b("", !0)
159
+ ]),
160
+ _: 1
161
+ })
162
+ ]))
163
+ ], 64);
164
+ };
165
+ }
166
+ }), oe = /* @__PURE__ */ G(te, [["__scopeId", "data-v-9a9ede30"]]), ne = { class: "flex gap-4 shrink-0 mt-2" }, B = /* @__PURE__ */ _({
167
+ __name: "TextActionWidget",
168
+ props: {
169
+ text: {}
170
+ },
171
+ emits: ["editWithRemy"],
172
+ setup(t, { emit: r }) {
173
+ const m = r, c = H();
174
+ async function a(l) {
175
+ l && (await navigator.clipboard.writeText(l), c.open({ message: "Copied to clipboard!", type: "success" }));
176
+ }
177
+ return (l, o) => {
178
+ const f = y("FmIcon"), x = y("FmTooltip");
179
+ return n(), d("div", ne, [
180
+ i(x, {
181
+ content: "Remy AI",
182
+ placement: "top",
183
+ "hide-arrow": !1
184
+ }, {
185
+ default: $(() => [
186
+ e("button", {
187
+ class: "p-8 rounded-md hover:bg-fm-color-neutral-gray-100 transition-colors",
188
+ onClick: o[0] || (o[0] = (u) => m("editWithRemy"))
189
+ }, [
190
+ i(f, {
191
+ name: "auto_awesome",
192
+ size: "sm",
193
+ color: "neutral-gray-400"
194
+ })
195
+ ])
196
+ ]),
197
+ _: 1
198
+ }),
199
+ i(x, {
200
+ content: "Copy",
201
+ placement: "top",
202
+ "hide-arrow": !1
203
+ }, {
204
+ default: $(() => [
205
+ e("button", {
206
+ class: "p-8 rounded-md hover:bg-fm-color-neutral-gray-100 transition-colors",
207
+ onClick: o[1] || (o[1] = (u) => a(t.text))
208
+ }, [
209
+ i(f, {
210
+ name: "content_copy",
211
+ size: "sm",
212
+ color: "neutral-gray-400"
213
+ })
214
+ ])
215
+ ]),
216
+ _: 1
217
+ })
218
+ ]);
219
+ };
220
+ }
221
+ }), se = { class: "flex gap-24 px-24 py-48 sm:flex-col xs:flex-col" }, le = { class: "flex-1" }, ie = { class: "flex-[2] flex flex-col gap-24" }, ae = { class: "flex flex-col gap-8" }, re = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, ce = { class: "flex items-start gap-8" }, de = { class: "fm-typo-en-title-sm-800 flex-1" }, me = { class: "flex flex-col gap-8" }, ue = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, pe = { class: "flex items-start gap-8" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary whitespace-pre-wrap flex-1" }, ge = /* @__PURE__ */ _({
222
+ __name: "OverviewTab",
223
+ props: {
224
+ imageUrl: {},
225
+ headline: {},
226
+ caption: {}
227
+ },
228
+ setup(t) {
229
+ const r = t, { t: m } = E(), c = j(), a = S(), l = v(r.headline), o = v(r.caption);
230
+ F(
231
+ () => r.headline,
232
+ (u) => {
233
+ l.value = u;
234
+ }
235
+ ), F(
236
+ () => r.caption,
237
+ (u) => {
238
+ o.value = u;
239
+ }
240
+ ), M(
241
+ "apply-edited-copy",
242
+ async ({ headline: u, caption: p }) => {
243
+ const h = c.query.id;
244
+ h && (await C.updateMarketingMaterial(h, {
245
+ headline: u,
246
+ caption: p
247
+ }), u !== void 0 && (l.value = u), p !== void 0 && (o.value = p));
248
+ }
249
+ );
250
+ function f(u) {
251
+ a.activate({
252
+ command: "editMarketingBanner",
253
+ images: u ? [u] : [],
254
+ prompt: "",
255
+ params: {
256
+ campaignInfo: { headline: r.headline, caption: r.caption }
257
+ }
258
+ });
259
+ }
260
+ function x() {
261
+ a.activate({
262
+ command: "editCopy",
263
+ params: {
264
+ campaignInfo: {
265
+ headline: l.value,
266
+ caption: o.value
267
+ }
268
+ }
269
+ });
270
+ }
271
+ return (u, p) => (n(), d("div", se, [
272
+ e("div", le, [
273
+ i(oe, {
274
+ "image-url": t.imageUrl,
275
+ onEdit: f
276
+ }, null, 8, ["image-url"])
277
+ ]),
278
+ e("div", ie, [
279
+ e("div", ae, [
280
+ e("p", re, g(s(m)("connect.marketing.materialEdit.headline")), 1),
281
+ e("div", ce, [
282
+ e("p", de, g(s(l)), 1),
283
+ i(B, {
284
+ text: s(l),
285
+ onEditWithRemy: x
286
+ }, null, 8, ["text"])
287
+ ])
288
+ ]),
289
+ p[0] || (p[0] = e("div", { class: "border-t border-fm-color-neutral-gray-200" }, null, -1)),
290
+ e("div", me, [
291
+ e("p", ue, g(s(m)("connect.marketing.materialEdit.caption")), 1),
292
+ e("div", pe, [
293
+ e("p", fe, g(s(o)), 1),
294
+ i(B, {
295
+ text: s(o),
296
+ onEditWithRemy: x
297
+ }, null, 8, ["text"])
298
+ ])
299
+ ])
300
+ ])
301
+ ]));
302
+ }
303
+ }), xe = { class: "flex items-center px-4" }, he = { class: "px-[4px] py-[6px] text-xs text-fm-color-typo-secondary" }, ye = /* @__PURE__ */ _({
304
+ __name: "ActionBar",
305
+ setup(t) {
306
+ const r = [
307
+ { icon: "thumb_up", count: "10k+" },
308
+ { icon: "mode_comment", count: "128" },
309
+ { icon: "share", count: "56" }
310
+ ];
311
+ return (m, c) => {
312
+ const a = y("FmIcon");
313
+ return n(), d("div", xe, [
314
+ (n(), d(I, null, q(r, (l) => e("button", {
315
+ key: l.icon,
316
+ 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"
317
+ }, [
318
+ i(a, {
319
+ class: "px-[4px] py-[6px]",
320
+ name: l.icon,
321
+ size: "md",
322
+ color: "neutral-gray-400",
323
+ outline: ""
324
+ }, null, 8, ["name"]),
325
+ e("span", he, g(l.count), 1)
326
+ ])), 64))
327
+ ]);
328
+ };
329
+ }
330
+ }), _e = { class: "max-w-[500px] mx-auto rounded-lg border border-fm-color-neutral-gray-200 fm-shadow-light-200 overflow-hidden bg-white" }, be = { class: "flex items-center gap-12 px-16 py-12" }, ve = { class: "w-40 h-40 rounded-full bg-fm-color-neutral-gray-200 flex items-center justify-center shrink-0 overflow-hidden" }, we = ["src"], ke = { class: "flex-1 min-w-0" }, $e = { class: "fm-typo-en-body-sm-700 text-fm-color-typo-primary leading-tight font-semibold" }, Ue = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary leading-tight text-xs flex items-center gap-4" }, ze = {
331
+ key: 0,
332
+ class: "px-16 pb-12"
333
+ }, Fe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-primary whitespace-pre-wrap" }, Ie = { class: "w-full bg-fm-color-neutral-gray-100 overflow-hidden" }, je = ["src"], Ce = {
334
+ key: 1,
335
+ class: "aspect-square flex items-center justify-center"
336
+ }, Te = { class: "px-16 py-12 bg-fm-color-neutral-gray-50 border-t border-fm-color-neutral-gray-200" }, Be = { class: "fm-typo-en-body-sm-700 text-fm-color-typo-primary line-clamp-2" }, Ee = /* @__PURE__ */ _({
337
+ __name: "FacebookPostPreview",
338
+ props: {
339
+ imageUrl: {},
340
+ headline: {},
341
+ caption: {}
342
+ },
343
+ setup(t) {
344
+ const { currentBusiness: r } = U();
345
+ return console.log("currentBusiness", r.value), (m, c) => {
346
+ var l, o;
347
+ const a = y("FmIcon");
348
+ return n(), d("div", _e, [
349
+ e("div", be, [
350
+ e("div", ve, [
351
+ (l = s(r)) != null && l.thumbnail ? (n(), d("img", {
352
+ key: 0,
353
+ src: s(r).thumbnail,
354
+ class: "w-full h-full object-cover",
355
+ alt: "Business logo"
356
+ }, null, 8, we)) : (n(), w(a, {
357
+ key: 1,
358
+ name: "storefront",
359
+ size: "sm",
360
+ color: "neutral-gray-400"
361
+ }))
362
+ ]),
363
+ e("div", ke, [
364
+ e("p", $e, g(((o = s(r)) == null ? void 0 : o.name) ?? "Your Business"), 1),
365
+ e("p", Ue, [
366
+ c[0] || (c[0] = N(" Sponsored · ", -1)),
367
+ i(a, {
368
+ name: "public",
369
+ size: "sm",
370
+ color: "neutral-gray-400"
371
+ })
372
+ ])
373
+ ]),
374
+ i(a, {
375
+ name: "more_horiz",
376
+ size: "sm",
377
+ color: "neutral-gray-400"
378
+ })
379
+ ]),
380
+ t.caption ? (n(), d("div", ze, [
381
+ e("p", Fe, g(t.caption), 1)
382
+ ])) : b("", !0),
383
+ e("div", Ie, [
384
+ t.imageUrl ? (n(), d("img", {
385
+ key: 0,
386
+ src: t.imageUrl,
387
+ alt: "Post image",
388
+ class: "w-full h-auto block"
389
+ }, null, 8, je)) : (n(), d("div", Ce, [
390
+ i(a, {
391
+ name: "image",
392
+ size: "xl",
393
+ color: "neutral-gray-300"
394
+ })
395
+ ]))
396
+ ]),
397
+ e("div", Te, [
398
+ c[1] || (c[1] = e("p", { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary uppercase tracking-wide mb-2" }, " yourbusiness.com ", -1)),
399
+ e("p", Be, g(t.headline ?? "—"), 1)
400
+ ]),
401
+ i(ye)
402
+ ]);
403
+ };
404
+ }
405
+ }), Me = { class: "max-w-[300px] mx-auto rounded-2xl overflow-hidden fm-shadow-light-200 relative aspect-[9/16] bg-black" }, Se = ["src"], Pe = {
406
+ key: 1,
407
+ class: "absolute inset-0 flex items-center justify-center bg-fm-color-neutral-gray-800"
408
+ }, Re = { class: "absolute inset-x-0 top-0 px-12 pt-12 pb-24 bg-gradient-to-b from-black/60 to-transparent" }, Ae = { class: "flex items-center gap-8" }, Le = { class: "w-32 h-32 rounded-full bg-fm-color-neutral-gray-200 shrink-0 overflow-hidden border-2 border-white" }, qe = ["src"], Ne = { class: "flex-1 min-w-0" }, Oe = { class: "text-white text-xs font-semibold leading-tight truncate" }, Ve = { class: "absolute inset-x-0 bottom-0 px-16 pb-24 pt-40 bg-gradient-to-t from-black/70 to-transparent" }, We = {
409
+ key: 0,
410
+ class: "text-white text-xs mb-12 line-clamp-3"
411
+ }, Ge = { class: "flex justify-center" }, He = { class: "px-24 py-8 rounded-full bg-white text-fm-color-typo-primary text-xs font-semibold" }, De = /* @__PURE__ */ _({
412
+ __name: "FacebookStoryPreview",
413
+ props: {
414
+ imageUrl: {},
415
+ headline: {},
416
+ caption: {}
417
+ },
418
+ setup(t) {
419
+ const { currentBusiness: r } = U();
420
+ return (m, c) => {
421
+ var l, o;
422
+ const a = y("FmIcon");
423
+ return n(), d("div", Me, [
424
+ t.imageUrl ? (n(), d("img", {
425
+ key: 0,
426
+ src: t.imageUrl,
427
+ alt: "Story image",
428
+ class: "absolute inset-0 w-full h-full object-contain"
429
+ }, null, 8, Se)) : (n(), d("div", Pe, [
430
+ i(a, {
431
+ name: "image",
432
+ size: "xl",
433
+ color: "neutral-gray-500"
434
+ })
435
+ ])),
436
+ e("div", Re, [
437
+ c[1] || (c[1] = e("div", { class: "flex gap-4 mb-10" }, [
438
+ e("div", { class: "h-[2px] flex-1 rounded-full bg-white" })
439
+ ], -1)),
440
+ e("div", Ae, [
441
+ e("div", Le, [
442
+ (l = s(r)) != null && l.thumbnail ? (n(), d("img", {
443
+ key: 0,
444
+ src: s(r).thumbnail,
445
+ class: "w-full h-full object-cover",
446
+ alt: "Business logo"
447
+ }, null, 8, qe)) : (n(), w(a, {
448
+ key: 1,
449
+ name: "storefront",
450
+ size: "sm",
451
+ color: "neutral-gray-400"
452
+ }))
453
+ ]),
454
+ e("div", Ne, [
455
+ e("p", Oe, g(((o = s(r)) == null ? void 0 : o.name) ?? "Your Business"), 1),
456
+ c[0] || (c[0] = e("p", { class: "text-white/70 text-[10px] leading-tight" }, "Sponsored", -1))
457
+ ]),
458
+ i(a, {
459
+ name: "more_vert",
460
+ size: "sm",
461
+ color: "neutral-white"
462
+ }),
463
+ i(a, {
464
+ name: "close",
465
+ size: "sm",
466
+ color: "neutral-white"
467
+ })
468
+ ])
469
+ ]),
470
+ e("div", Ve, [
471
+ t.caption ? (n(), d("p", We, g(t.caption), 1)) : b("", !0),
472
+ e("div", Ge, [
473
+ e("button", He, g(t.headline ?? "Learn More"), 1)
474
+ ])
475
+ ])
476
+ ]);
477
+ };
478
+ }
479
+ }), Ye = { class: "max-w-[400px] mx-auto rounded-lg border border-fm-color-neutral-gray-200 fm-shadow-light-200 overflow-hidden bg-white" }, Ke = { class: "flex items-center gap-12 px-12 py-10" }, Je = { class: "w-32 h-32 rounded-full bg-gradient-to-tr from-yellow-400 via-pink-500 to-purple-600 p-[2px] shrink-0" }, Qe = { class: "w-full h-full rounded-full bg-white p-[1px] overflow-hidden" }, Xe = ["src"], Ze = {
480
+ key: 1,
481
+ class: "w-full h-full rounded-full bg-fm-color-neutral-gray-200 flex items-center justify-center"
482
+ }, et = { class: "flex-1 min-w-0" }, tt = { class: "text-sm font-semibold text-fm-color-typo-primary leading-tight truncate" }, ot = { class: "w-full bg-fm-color-neutral-gray-100 overflow-hidden" }, nt = ["src"], st = {
483
+ key: 1,
484
+ class: "aspect-square flex items-center justify-center"
485
+ }, lt = { class: "flex items-center gap-12 px-12 pt-10 pb-4" }, it = {
486
+ key: 0,
487
+ class: "px-12 pb-12"
488
+ }, at = { class: "text-xs text-fm-color-typo-primary" }, rt = { class: "font-semibold mr-4" }, ct = { class: "line-clamp-2" }, dt = /* @__PURE__ */ _({
489
+ __name: "InstagramPostPreview",
490
+ props: {
491
+ imageUrl: {},
492
+ headline: {},
493
+ caption: {}
494
+ },
495
+ setup(t) {
496
+ const { currentBusiness: r } = U();
497
+ return (m, c) => {
498
+ var l, o, f;
499
+ const a = y("FmIcon");
500
+ return n(), d("div", Ye, [
501
+ e("div", Ke, [
502
+ e("div", Je, [
503
+ e("div", Qe, [
504
+ (l = s(r)) != null && l.thumbnail ? (n(), d("img", {
505
+ key: 0,
506
+ src: s(r).thumbnail,
507
+ class: "w-full h-full object-cover rounded-full",
508
+ alt: "Business logo"
509
+ }, null, 8, Xe)) : (n(), d("div", Ze, [
510
+ i(a, {
511
+ name: "storefront",
512
+ size: "sm",
513
+ color: "neutral-gray-400"
514
+ })
515
+ ]))
516
+ ])
517
+ ]),
518
+ e("div", et, [
519
+ e("p", tt, g(((o = s(r)) == null ? void 0 : o.name) ?? "yourbusiness"), 1),
520
+ c[0] || (c[0] = e("p", { class: "text-[10px] text-fm-color-typo-secondary leading-tight" }, " Sponsored ", -1))
521
+ ]),
522
+ i(a, {
523
+ name: "more_horiz",
524
+ size: "sm",
525
+ color: "neutral-gray-400"
526
+ })
527
+ ]),
528
+ e("div", ot, [
529
+ t.imageUrl ? (n(), d("img", {
530
+ key: 0,
531
+ src: t.imageUrl,
532
+ alt: "Post image",
533
+ class: "w-full h-auto block"
534
+ }, null, 8, nt)) : (n(), d("div", st, [
535
+ i(a, {
536
+ name: "image",
537
+ size: "xl",
538
+ color: "neutral-gray-300"
539
+ })
540
+ ]))
541
+ ]),
542
+ e("div", lt, [
543
+ i(a, {
544
+ name: "favorite_border",
545
+ size: "md",
546
+ color: "neutral-gray-700"
547
+ }),
548
+ i(a, {
549
+ name: "mode_comment",
550
+ size: "md",
551
+ color: "neutral-gray-700",
552
+ outline: ""
553
+ }),
554
+ i(a, {
555
+ name: "send",
556
+ size: "md",
557
+ color: "neutral-gray-700"
558
+ }),
559
+ c[1] || (c[1] = e("div", { class: "flex-1" }, null, -1)),
560
+ i(a, {
561
+ name: "bookmark_border",
562
+ size: "md",
563
+ color: "neutral-gray-700"
564
+ })
565
+ ]),
566
+ c[2] || (c[2] = e("div", { class: "px-12 pb-4" }, [
567
+ e("p", { class: "text-xs font-semibold text-fm-color-typo-primary" }, " 10,428 likes ")
568
+ ], -1)),
569
+ t.caption || t.headline ? (n(), d("div", it, [
570
+ e("p", at, [
571
+ e("span", rt, g(((f = s(r)) == null ? void 0 : f.name) ?? "yourbusiness"), 1),
572
+ e("span", ct, g(t.caption ?? t.headline), 1)
573
+ ])
574
+ ])) : b("", !0)
575
+ ]);
576
+ };
577
+ }
578
+ }), mt = { class: "max-w-[300px] mx-auto rounded-2xl overflow-hidden fm-shadow-light-200 relative aspect-[9/16] bg-black" }, ut = ["src"], pt = {
579
+ key: 1,
580
+ class: "absolute inset-0 flex items-center justify-center bg-fm-color-neutral-gray-800"
581
+ }, ft = { class: "absolute inset-x-0 top-0 px-12 pt-12 pb-24 bg-gradient-to-b from-black/60 to-transparent" }, gt = { class: "flex items-center gap-8" }, xt = { class: "w-32 h-32 rounded-full p-[2px] bg-gradient-to-tr from-yellow-400 via-pink-500 to-purple-600 shrink-0" }, ht = { class: "w-full h-full rounded-full bg-black/30 overflow-hidden" }, yt = ["src"], _t = {
582
+ key: 1,
583
+ class: "w-full h-full flex items-center justify-center"
584
+ }, bt = { class: "flex-1 min-w-0" }, vt = { class: "text-white text-xs font-semibold leading-tight truncate" }, wt = { class: "absolute inset-x-0 bottom-0 px-16 pb-24 pt-40 bg-gradient-to-t from-black/70 to-transparent" }, kt = {
585
+ key: 0,
586
+ class: "text-white text-xs mb-12 line-clamp-3"
587
+ }, $t = { class: "flex justify-center" }, Ut = { class: "px-24 py-8 rounded-full bg-white text-fm-color-typo-primary text-xs font-semibold" }, zt = /* @__PURE__ */ _({
588
+ __name: "InstagramStoryPreview",
589
+ props: {
590
+ imageUrl: {},
591
+ headline: {},
592
+ caption: {}
593
+ },
594
+ setup(t) {
595
+ const { currentBusiness: r } = U();
596
+ return (m, c) => {
597
+ var l, o;
598
+ const a = y("FmIcon");
599
+ return n(), d("div", mt, [
600
+ t.imageUrl ? (n(), d("img", {
601
+ key: 0,
602
+ src: t.imageUrl,
603
+ alt: "Story image",
604
+ class: "absolute inset-0 w-full h-full object-contain"
605
+ }, null, 8, ut)) : (n(), d("div", pt, [
606
+ i(a, {
607
+ name: "image",
608
+ size: "xl",
609
+ color: "neutral-gray-500"
610
+ })
611
+ ])),
612
+ e("div", ft, [
613
+ c[1] || (c[1] = e("div", { class: "flex gap-4 mb-10" }, [
614
+ e("div", { class: "h-[2px] flex-1 rounded-full bg-white" })
615
+ ], -1)),
616
+ e("div", gt, [
617
+ e("div", xt, [
618
+ e("div", ht, [
619
+ (l = s(r)) != null && l.thumbnail ? (n(), d("img", {
620
+ key: 0,
621
+ src: s(r).thumbnail,
622
+ class: "w-full h-full object-cover",
623
+ alt: "Business logo"
624
+ }, null, 8, yt)) : (n(), d("div", _t, [
625
+ i(a, {
626
+ name: "storefront",
627
+ size: "sm",
628
+ color: "neutral-gray-400"
629
+ })
630
+ ]))
631
+ ])
632
+ ]),
633
+ e("div", bt, [
634
+ e("p", vt, g(((o = s(r)) == null ? void 0 : o.name) ?? "yourbusiness"), 1),
635
+ c[0] || (c[0] = e("p", { class: "text-white/70 text-[10px] leading-tight" }, "Sponsored", -1))
636
+ ]),
637
+ i(a, {
638
+ name: "more_vert",
639
+ size: "sm",
640
+ color: "neutral-white"
641
+ }),
642
+ i(a, {
643
+ name: "close",
644
+ size: "sm",
645
+ color: "neutral-white"
646
+ })
647
+ ])
648
+ ]),
649
+ e("div", wt, [
650
+ t.caption ? (n(), d("p", kt, g(t.caption), 1)) : b("", !0),
651
+ e("div", $t, [
652
+ e("button", Ut, g(t.headline ?? "Learn More"), 1)
653
+ ])
654
+ ])
655
+ ]);
656
+ };
657
+ }
658
+ }), Ft = { class: "flex gap-24 px-24 py-48 flex-wrap" }, It = { class: "flex-1 min-w-[260px]" }, jt = { class: "flex-1 min-w-[200px]" }, Ct = { class: "flex-1 min-w-[260px]" }, Tt = { class: "flex-1 min-w-[200px]" }, Bt = /* @__PURE__ */ _({
659
+ __name: "PreviewTab",
660
+ props: {
661
+ imageUrl: {},
662
+ headline: {},
663
+ caption: {}
664
+ },
665
+ setup(t) {
666
+ return (r, m) => (n(), d("div", Ft, [
667
+ e("div", It, [
668
+ m[0] || (m[0] = e("p", { class: "text-xs font-semibold text-fm-color-typo-secondary uppercase tracking-wide mb-12 text-center" }, " FB Post ", -1)),
669
+ i(Ee, {
670
+ "image-url": t.imageUrl,
671
+ headline: t.headline,
672
+ caption: t.caption
673
+ }, null, 8, ["image-url", "headline", "caption"])
674
+ ]),
675
+ e("div", jt, [
676
+ m[1] || (m[1] = e("p", { class: "text-xs font-semibold text-fm-color-typo-secondary uppercase tracking-wide mb-12 text-center" }, " FB Story ", -1)),
677
+ i(De, {
678
+ "image-url": t.imageUrl,
679
+ headline: t.headline,
680
+ caption: t.caption
681
+ }, null, 8, ["image-url", "headline", "caption"])
682
+ ]),
683
+ e("div", Ct, [
684
+ m[2] || (m[2] = e("p", { class: "text-xs font-semibold text-fm-color-typo-secondary uppercase tracking-wide mb-12 text-center" }, " IG Post ", -1)),
685
+ i(dt, {
686
+ "image-url": t.imageUrl,
687
+ headline: t.headline,
688
+ caption: t.caption
689
+ }, null, 8, ["image-url", "headline", "caption"])
690
+ ]),
691
+ e("div", Tt, [
692
+ m[3] || (m[3] = e("p", { class: "text-xs font-semibold text-fm-color-typo-secondary uppercase tracking-wide mb-12 text-center" }, " IG Story ", -1)),
693
+ i(zt, {
694
+ "image-url": t.imageUrl,
695
+ headline: t.headline,
696
+ caption: t.caption
697
+ }, null, 8, ["image-url", "headline", "caption"])
698
+ ])
699
+ ]));
700
+ }
701
+ }), Et = { class: "px-24 pt-24" }, Gt = /* @__PURE__ */ _({
702
+ __name: "MarketingMaterialEdit",
703
+ setup(t) {
704
+ const { t: r } = E(), m = V(), c = j(), a = S(), l = v(null), o = v(null), f = v(null), x = [
705
+ { label: "Overview", value: "overview" },
706
+ { label: "Preview", value: "preview" }
707
+ ], u = v("overview");
708
+ return O(async () => {
709
+ const p = c.query.id;
710
+ if (!p) return;
711
+ const h = await C.getMarketingMaterial(p);
712
+ l.value = h.imageUrl, o.value = h.headline, f.value = h.caption;
713
+ }), (p, h) => {
714
+ const k = y("FmPageHead"), P = y("FmTabs");
715
+ return n(), d(I, null, [
716
+ i(k, {
717
+ title: s(r)("connect.marketing.materialEdit.title"),
718
+ class: "xs:hidden",
719
+ "onClick:back": h[0] || (h[0] = (T) => s(m).push({ name: s(D)["$connect-MARKETING"] }))
720
+ }, null, 8, ["title"]),
721
+ e("div", Et, [
722
+ i(P, {
723
+ "model-value": s(u),
724
+ items: x,
725
+ "onUpdate:modelValue": h[1] || (h[1] = (T) => u.value = T)
726
+ }, null, 8, ["model-value"])
727
+ ]),
728
+ s(u) === "overview" ? (n(), w(ge, {
729
+ key: 0,
730
+ "image-url": s(l),
731
+ headline: s(o),
732
+ caption: s(f)
733
+ }, null, 8, ["image-url", "headline", "caption"])) : s(u) === "preview" ? (n(), w(Bt, {
734
+ key: 1,
735
+ "image-url": s(l),
736
+ headline: s(o),
737
+ caption: s(f)
738
+ }, null, 8, ["image-url", "headline", "caption"])) : b("", !0),
739
+ s(a).dialogShowing ? (n(), w(s(W), { key: 2 })) : b("", !0)
740
+ ], 64);
741
+ };
742
+ }
743
+ });
744
+ export {
745
+ Gt as default
746
+ };