@feedmepos/mf-connect 0.1.115-dev → 0.1.115-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +1 -66
  2. package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
  3. package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
  4. package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
  5. package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
  7. package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
  8. package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
  9. package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
  13. package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
  14. package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
  15. package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
  16. package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
  18. package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
  20. package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
  23. package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
  25. package/dist/Marketing-BKK45Eve.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
  27. package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
  29. package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
  30. package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
  31. package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
  34. package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
  35. package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
  36. package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
  37. package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
  38. package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
  39. package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
  40. package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
  41. package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
  42. package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
  43. package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
  44. package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
  47. package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
  50. package/dist/Setting-BnFRI0Se.js +2037 -0
  51. package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
  52. package/dist/Settings-BvT8_tkQ.js +179 -0
  53. package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
  54. package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
  57. package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
  58. package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
  59. package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
  61. package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
  64. package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
  67. package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
  68. package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
  69. package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
  71. package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
  73. package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
  74. package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
  75. package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
  76. package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
  77. package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
  80. package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
  81. package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
  82. package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
  83. package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
  84. package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
  85. package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
  86. package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
  87. package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
  88. package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
  89. package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
  90. package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
  91. package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
  92. package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
  93. package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
  94. package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
  95. package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
  96. package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
  97. package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
  98. package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
  99. package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
  100. package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
  101. package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
  102. package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
  103. package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
  104. package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
  105. package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
  106. package/dist/objectid-DEMM_jdR.js +145 -0
  107. package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
  108. package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
  109. package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
  110. package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
  111. package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
  112. package/dist/rule-builder-Deufb6h_.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DeebIqJ_.js +236 -0
  115. package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
  116. package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
  117. package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
  119. package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
  120. package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
  121. package/dist/vue-i18n-Cze706-f.js +2365 -0
  122. package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
  123. package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BPpdm96t.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
  127. package/dist/Grab-BWzdN_cd.js +0 -301
  128. package/dist/MainLayout-DwnjGXh6.js +0 -4
  129. package/dist/Marketing-DCco__2F.js +0 -273
  130. package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
  131. package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
  133. package/dist/Setting-CDM4RhLW.js +0 -574
  134. package/dist/Settings-D-0tvZRr.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
  137. package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
  139. package/dist/WhatsappBot-Cl64wG_F.js +0 -876
  140. package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
  141. package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
  142. package/dist/WhatsappLayout-C639d2HP.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
  146. package/dist/feature-flag-Bo-k5sIG.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C_H8jFYf.js +0 -2743
  150. package/dist/index-DQ8JJhxs.js +0 -74
  151. package/dist/objectid-C-wocWKI.js +0 -145
  152. package/dist/template-BZyFhr73.js +0 -188
  153. package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
  154. package/dist/vue-i18n-DWGiC_vs.js +0 -2365
@@ -1,21 +0,0 @@
1
- import { defineComponent as n, watch as s, unref as a, openBlock as o, createBlock as r, createCommentVNode as p } from "vue";
2
- import { useRouter as c } from "vue-router";
3
- import { _ as u, a as _ } from "./MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js";
4
- import { u as f } from "./feature-flag-Bo-k5sIG.js";
5
- import { R as i } from "./app-CgimGODl.js";
6
- const y = /* @__PURE__ */ n({
7
- __name: "WhatsappLayout",
8
- setup(d) {
9
- const m = c(), e = f();
10
- return s(
11
- () => e.loaded && !e.whatsappBotEnabled,
12
- (t) => {
13
- t && m.replace({ name: i["$connect-ANALYTIC"] });
14
- },
15
- { immediate: !0 }
16
- ), (t, l) => a(e).loaded ? a(e).whatsappBotEnabled ? (o(), r(_, { key: 1 })) : p("", !0) : (o(), r(u, { key: 0 }));
17
- }
18
- });
19
- export {
20
- y as default
21
- };
@@ -1,253 +0,0 @@
1
- import { computed as f, toValue as j, ref as m, watch as S, defineComponent as W, mergeModels as O, useModel as $, onBeforeUnmount as z, resolveComponent as N, openBlock as h, createBlock as H, withCtx as T, createElementVNode as t, toDisplayString as n, unref as s, createElementBlock as _, createVNode as L, createTextVNode as V, Fragment as J, renderList as K, createCommentVNode as F } from "vue";
2
- import { u as U } from "./vue-i18n-DWGiC_vs.js";
3
- import { b as Q } from "./browser-BSAOEeIM.js";
4
- import { S as X, a as R } from "./index-CCEXSPxk.js";
5
- import { w as Y } from "./index-DQ8JJhxs.js";
6
- function Z(x) {
7
- const c = x.connectedAt !== null;
8
- switch (x.status) {
9
- case "connected":
10
- return "connected";
11
- case "disconnected":
12
- return c ? "disconnected" : void 0;
13
- case "connecting":
14
- return c ? "connecting" : void 0;
15
- }
16
- }
17
- const D = [
18
- "bg-fm-color-primary",
19
- "bg-fm-color-secondary-plum",
20
- "bg-fm-color-system-success-400"
21
- ];
22
- function ee(x) {
23
- const { t: c, locale: b } = U(), e = f(() => j(x)), v = f(
24
- () => {
25
- var o, a, r;
26
- return (r = (a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.profilePicture) == null ? void 0 : r.url;
27
- }
28
- ), k = m(!1);
29
- S(v, () => {
30
- k.value = !1;
31
- });
32
- const G = f(
33
- () => {
34
- var o, a, r, u, g, y;
35
- return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.businessName) || ((u = (r = e.value) == null ? void 0 : r.account) == null ? void 0 : u.name) || ((y = (g = e.value) == null ? void 0 : g.account) == null ? void 0 : y.phoneNumber) || c("connect.whatsappBot.unnamedAccount");
36
- }
37
- ), p = f(
38
- () => {
39
- var o, a;
40
- return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.phoneNumber) || c("connect.whatsappBot.phoneUnavailable");
41
- }
42
- ), w = f(
43
- () => G.value.trim().split(/\s+/).slice(0, 2).map((o) => Array.from(o)[0]).join("").toLocaleUpperCase(b.value)
44
- ), B = f(
45
- () => e.value ? Z(e.value) ?? "disconnected" : "disconnected"
46
- ), d = f(
47
- () => {
48
- var o;
49
- return D[parseInt(((o = e.value) == null ? void 0 : o.clientId.slice(-6)) ?? "0", 16) % D.length];
50
- }
51
- );
52
- return {
53
- name: G,
54
- phoneNumber: p,
55
- initials: w,
56
- state: B,
57
- avatarColor: d,
58
- profilePictureUrl: v,
59
- profilePictureFailed: k
60
- };
61
- }
62
- const te = { class: "min-w-0 flex flex-col" }, oe = { class: "text-[18px] leading-[24px] font-semibold" }, ne = { class: "text-[13px] leading-[18px] text-fm-color-typo-tertiary break-words" }, ae = {
63
- key: 0,
64
- role: "status",
65
- class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
66
- }, se = {
67
- key: 1,
68
- class: "py-[40px] flex flex-col items-center text-center gap-[16px]"
69
- }, ie = {
70
- role: "alert",
71
- class: "text-[14px] text-fm-color-typo-error"
72
- }, le = {
73
- key: 2,
74
- class: "grid grid-cols-[minmax(0,1fr)_226px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
75
- }, re = { class: "min-w-0 flex flex-col gap-[20px] text-[14px] leading-[20px]" }, ce = { class: "text-fm-color-typo-secondary [text-wrap:pretty]" }, pe = { class: "flex flex-col gap-[10px]" }, ue = { class: "text-[12px] leading-[16px] font-semibold uppercase tracking-[0.06em] text-fm-color-typo-tertiary" }, de = { class: "flex flex-col gap-[10px]" }, fe = { class: "flex flex-col gap-[6px]" }, me = {
76
- id: "whatsapp-group-invite-link-label",
77
- class: "font-medium text-fm-color-typo-tertiary"
78
- }, xe = { class: "flex items-center gap-[8px] border border-fm-color-neutral-gray-200 rounded-[8px] pl-[12px] pr-[4px] py-[4px]" }, ve = {
79
- id: "whatsapp-group-invite-link",
80
- role: "textbox",
81
- "aria-readonly": "true",
82
- "aria-labelledby": "whatsapp-group-invite-link-label",
83
- tabindex: "0",
84
- class: "flex-1 min-w-0 h-[32px] overflow-x-auto overflow-y-hidden whitespace-nowrap text-[13px] leading-[32px] font-mono bg-fm-color-neutral-white rounded-[4px] focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
85
- }, he = ["disabled"], ge = {
86
- key: 0,
87
- role: "status",
88
- class: "sr-only"
89
- }, ye = {
90
- key: 1,
91
- role: "alert",
92
- class: "text-[12px] leading-[16px] text-fm-color-typo-error"
93
- }, _e = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary" }, be = { class: "flex flex-col items-center gap-[12px] w-[226px] xs:justify-self-center" }, we = { class: "border border-fm-color-neutral-gray-100 rounded-[12px] overflow-hidden" }, Be = ["src", "alt"], ke = ["href"], Ve = /* @__PURE__ */ W({
94
- __name: "WhatsappNotificationGroupDialog",
95
- props: /* @__PURE__ */ O({
96
- account: {}
97
- }, {
98
- modelValue: { type: Boolean, required: !0 },
99
- modelModifiers: {}
100
- }),
101
- emits: ["update:modelValue"],
102
- setup(x) {
103
- const c = x, b = $(x, "modelValue"), { t: e } = U(), v = f(() => X.getBusinessId() ?? ""), { name: k, phoneNumber: G } = ee(() => c.account), p = m(), w = m(""), B = m(!1), d = m(""), o = m(!1), a = m(!1), r = m("");
104
- let u, g;
105
- function y() {
106
- u == null || u.abort(), clearTimeout(g), o.value = !1, a.value = !1;
107
- }
108
- async function I() {
109
- y();
110
- const i = new AbortController();
111
- u = i, B.value = !0, d.value = "", r.value = "", p.value = void 0, w.value = "";
112
- try {
113
- if (!v.value)
114
- throw new Error(e("connect.whatsappBot.errors.selectBusiness"));
115
- const l = await Y.getNotificationGroup(
116
- v.value,
117
- c.account.clientId,
118
- i.signal
119
- );
120
- if (i.signal.aborted) return;
121
- const A = await Q.toDataURL(l.inviteLink, {
122
- width: 224,
123
- margin: 2,
124
- errorCorrectionLevel: "M"
125
- });
126
- if (i.signal.aborted) return;
127
- p.value = l, w.value = A;
128
- } catch (l) {
129
- if (i.signal.aborted) return;
130
- l instanceof R && l.status === 409 ? d.value = e("connect.whatsappBot.notificationGroup.notReady") : l instanceof R && l.status === 404 ? d.value = e("connect.whatsappBot.errors.accountNotFound") : d.value = v.value ? e("connect.whatsappBot.errors.loadGroup") : e("connect.whatsappBot.errors.selectBusiness");
131
- } finally {
132
- i.signal.aborted || (B.value = !1);
133
- }
134
- }
135
- async function q() {
136
- if (!p.value || !u || a.value) return;
137
- const i = u;
138
- a.value = !0, o.value = !1, r.value = "", clearTimeout(g);
139
- try {
140
- if (await navigator.clipboard.writeText(p.value.inviteLink), i.signal.aborted) return;
141
- o.value = !0, g = setTimeout(() => {
142
- o.value = !1;
143
- }, 2e3);
144
- } catch {
145
- i.signal.aborted || (r.value = e("connect.whatsappBot.errors.copyGroupLink"));
146
- } finally {
147
- i.signal.aborted || (a.value = !1);
148
- }
149
- }
150
- return S(
151
- [b, v, () => c.account.clientId],
152
- ([i]) => {
153
- i ? I() : y();
154
- },
155
- { immediate: !0 }
156
- ), z(y), (i, l) => {
157
- const A = N("FmCircularProgress"), E = N("FmButton"), P = N("FmIcon"), M = N("FmDialog");
158
- return h(), H(M, {
159
- modelValue: b.value,
160
- "onUpdate:modelValue": l[0] || (l[0] = (C) => b.value = C),
161
- "min-width": "min(640px, calc(100% - 32px))",
162
- "max-width": "640px",
163
- "max-height": "90vh",
164
- "dismiss-away": ""
165
- }, {
166
- "dialog-header": T(() => [
167
- t("div", te, [
168
- t("h2", oe, n(s(e)("connect.whatsappBot.notificationGroup.dialogTitle")), 1),
169
- t("p", ne, n(s(k)) + " · " + n(s(G)), 1)
170
- ])
171
- ]),
172
- default: T(() => [
173
- B.value ? (h(), _("div", ae, [
174
- L(A),
175
- V(" " + n(s(e)("connect.whatsappBot.notificationGroup.loading")), 1)
176
- ])) : d.value ? (h(), _("div", se, [
177
- t("p", ie, n(d.value), 1),
178
- L(E, {
179
- label: s(e)("connect.whatsappBot.tryAgain"),
180
- "prepend-icon": "refresh",
181
- class: "!rounded-full [&_.label]:text-[14px]",
182
- onClick: I
183
- }, null, 8, ["label"])
184
- ])) : p.value ? (h(), _("div", le, [
185
- t("div", re, [
186
- t("p", ce, n(s(e)("connect.whatsappBot.notificationGroup.scanDescription")), 1),
187
- t("div", pe, [
188
- t("h3", ue, n(s(e)("connect.whatsappBot.notificationGroup.postsTitle")), 1),
189
- t("ul", de, [
190
- (h(), _(J, null, K(["unanswered", "staffRequests", "humanRequests"], (C) => t("li", {
191
- key: C,
192
- class: "flex gap-[10px]"
193
- }, [
194
- l[1] || (l[1] = t("span", {
195
- "aria-hidden": "true",
196
- class: "w-[6px] h-[6px] rounded-full bg-fm-color-primary shrink-0 mt-[7px]"
197
- }, null, -1)),
198
- V(" " + n(s(e)(`connect.whatsappBot.notificationGroup.posts.${C}`)), 1)
199
- ])), 64))
200
- ])
201
- ]),
202
- t("div", fe, [
203
- t("span", me, n(s(e)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
204
- t("div", xe, [
205
- t("div", ve, n(p.value.inviteLink), 1),
206
- t("button", {
207
- type: "button",
208
- disabled: a.value,
209
- class: "shrink-0 h-[32px] px-[12px] rounded-[6px] bg-fm-color-neutral-gray-100 text-[13px] font-semibold hover:bg-fm-color-neutral-gray-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary",
210
- onClick: q
211
- }, n(s(e)(
212
- `connect.whatsappBot.notificationGroup.${o.value ? "copied" : "copy"}`
213
- )), 9, he)
214
- ]),
215
- o.value ? (h(), _("span", ge, n(s(e)("connect.whatsappBot.notificationGroup.copied")), 1)) : F("", !0),
216
- r.value ? (h(), _("p", ye, n(r.value), 1)) : F("", !0),
217
- t("p", _e, n(s(e)("connect.whatsappBot.notificationGroup.shareNote")), 1)
218
- ])
219
- ]),
220
- t("div", be, [
221
- t("div", we, [
222
- t("img", {
223
- src: w.value,
224
- alt: s(e)("connect.whatsappBot.notificationGroup.qrAlt"),
225
- width: "224",
226
- height: "224"
227
- }, null, 8, Be)
228
- ]),
229
- t("a", {
230
- href: p.value.inviteLink,
231
- target: "_blank",
232
- rel: "noopener noreferrer",
233
- class: "w-full h-[40px] flex items-center justify-center gap-[6px] rounded-full bg-fm-color-primary text-fm-color-typo-white text-[14px] font-semibold no-underline hover:opacity-90 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary focus-visible:ring-offset-[2px]"
234
- }, [
235
- V(n(s(e)("connect.whatsappBot.notificationGroup.openWhatsapp")) + " ", 1),
236
- L(P, {
237
- name: "open_in_new",
238
- size: "sm"
239
- })
240
- ], 8, ke)
241
- ])
242
- ])) : F("", !0)
243
- ]),
244
- _: 1
245
- }, 8, ["modelValue"]);
246
- };
247
- }
248
- });
249
- export {
250
- Ve as _,
251
- ee as u,
252
- Z as w
253
- };