@feedmepos/mf-connect 0.1.117-dev → 0.1.118-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 (135) hide show
  1. package/README.md +12 -8
  2. package/dist/{App-BpcsgH7K.js → App-CBFNBDb2.js} +275 -275
  3. package/dist/{AuditLogs-BNnUiVnD.js → AuditLogs-BtSA8b08.js} +13 -13
  4. package/dist/{Bin-Cm0wjQeR.js → Bin-CjmS_Tfn.js} +8 -8
  5. package/dist/{Broadcast-BoJaHqnO.js → Broadcast-BeePmZa1.js} +12 -12
  6. package/dist/{CampaignAnalytic-Eg4xZW0B.js → CampaignAnalytic-CZlnyvOi.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Du3Ah4HP.js} +9 -9
  8. package/dist/{Card-BfkMcFaG.js → Card-C8SzQQ0z.js} +23 -23
  9. package/dist/{Collections-RXmxQbII.js → Collections-BXNWTSZH.js} +8 -8
  10. package/dist/{Credit-CsRPM1jv.js → Credit-CK0-0yD1.js} +12 -12
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BXYpYC7Y.js} +1 -1
  12. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CdpnNDzR.js} +1042 -1045
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js → EffectSheet.vue_vue_type_style_index_0_lang--Oyj3KYg.js} +6 -6
  14. package/dist/{Experience-BC8Pj-v9.js → Experience-CWJaj62g.js} +13 -13
  15. package/dist/{FileSaver.min-DzmoQFA0.js → FileSaver.min-lV9H82L5.js} +1 -1
  16. package/dist/{Game-DJXNHFBs.js → Game-zBV1LYAg.js} +13 -13
  17. package/dist/{GiftCardSetup-_0n8lU-t.js → GiftCardSetup-Cnq9353j.js} +10 -10
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CdgSBdrX.js} +7 -7
  19. package/dist/{Goals-DSZwKpds.js → Goals-Utk08egN.js} +4 -4
  20. package/dist/{Grab-DDc7e-AC.js → Grab-DwMmWmbT.js} +9 -9
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js → ImageInput.vue_vue_type_script_setup_true_lang-CNPeU9xm.js} +1 -1
  22. package/dist/{Index-Cbi0bquE.js → Index-Bjgs18xf.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js → LocationPicker.vue_vue_type_script_setup_true_lang-DWnf4lXH.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Dy_oWJaZ.js} +1 -1
  25. package/dist/{LoyaltyDashboard-fK90c27A.js → LoyaltyDashboard-DmUfujX_.js} +15 -15
  26. package/dist/{MainLayout-Bf-l9yL4.js → MainLayout-DlDZQJfy.js} +1 -1
  27. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js → MainLayout.vue_vue_type_script_setup_true_lang-yAflY70k.js} +3 -3
  28. package/dist/{Marketing-B7cZGsO-.js → Marketing-B0iKlHP-.js} +4 -4
  29. package/dist/{MarketingMaterialEdit-5IcV2ct6.js → MarketingMaterialEdit-BNHxVb8A.js} +6 -6
  30. package/dist/{Member-BGTrRVdq.js → Member-Bcm3_pWB.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CPp4OpOx.js} +24 -24
  32. package/dist/{MemberImportHistory--FxkTJmu.js → MemberImportHistory-AQgLzB3g.js} +7 -7
  33. package/dist/{MemberList-EjY5dgwt.js → MemberList-CkMTo2uD.js} +14 -14
  34. package/dist/{MemberTransactions-Oia7LIFK.js → MemberTransactions-CxLCVjvw.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js → MessageInput.vue_vue_type_script_setup_true_lang-4N20f8Sj.js} +10 -10
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DghbYpSQ.js} +1 -1
  37. package/dist/{Mission-BFHYb4aT.js → Mission-CQS1CoDN.js} +14 -14
  38. package/dist/{Overview-BVNyQxFL.js → Overview-NQ287sgq.js} +21 -21
  39. package/dist/{Overview-d5U37aot.js → Overview-UG1IjY7-.js} +4 -4
  40. package/dist/{Point-CXkqH02Z.js → Point-krMa_mb1.js} +14 -14
  41. package/dist/{Promotion-DdxNvlOO.js → Promotion-vFBmJSti.js} +14 -14
  42. package/dist/{Queue-C96oNKyP.js → Queue-BusxSPt-.js} +13 -13
  43. package/dist/{Record-Bj2e2Y4i.js → Record-DjKqn0za.js} +9 -9
  44. package/dist/{Review-CJK5S1oI.js → Review-CqLp8l7U.js} +2 -2
  45. package/dist/{ReviewFacebookCallback-ChG7TRy5.js → ReviewFacebookCallback-D2kMSVFC.js} +5 -5
  46. package/dist/{ReviewGoogleCallback-Dmk4VyGA.js → ReviewGoogleCallback-B1cHR-o2.js} +5 -5
  47. package/dist/Reward-FeSxgzuS.js +444 -0
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js → RewardGroup.vue_vue_type_script_setup_true_lang-CCxVjBsO.js} +14 -14
  49. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js → RuleGroup.vue_vue_type_script_setup_true_lang-U403emCF.js} +15 -15
  50. package/dist/{Segment-FYvtCkqH.js → Segment-Nj59F9Nr.js} +26 -26
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Kg9m-0DS.js} +15 -15
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLbDApPL.js} +4 -4
  53. package/dist/{Setting-CUAWjCqa.js → Setting-CCIzNxv-.js} +14 -14
  54. package/dist/{SettingAdvertisements-COIQwUD6.js → SettingAdvertisements-CkPyAg5y.js} +12 -12
  55. package/dist/{Settings-D2gFPvmW.js → Settings-CYjKGCpa.js} +5 -5
  56. package/dist/{Store-BAXwiyvx.js → Store-Bp8Zkzi2.js} +27 -27
  57. package/dist/{StoreRewards-2mUavtUg.js → StoreRewards-DXW5nVyW.js} +15 -15
  58. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BYVezFI2.js} +25 -25
  59. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CS6b1cM3.js} +2 -2
  60. package/dist/{Tier-BmAOzRHL.js → Tier-B8Utn9Qb.js} +27 -27
  61. package/dist/{Title-DMxiUg30.js → Title-CwaNSFer.js} +23 -23
  62. package/dist/{Transaction-CF6hXEpN.js → Transaction-ieciAdXP.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CMwZl4E6.js} +6 -6
  64. package/dist/{Voucher-DrtITxq-.js → Voucher-BKfujj6r.js} +18 -18
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CkH-rNqZ.js} +12 -12
  66. package/dist/{WhatsappAccount-Bb0Y7ikk.js → WhatsappAccount-D73WDP7a.js} +66 -64
  67. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-C3L7vWZE.js} +1 -1
  68. package/dist/{WhatsappBot-DNvvaPey.js → WhatsappBot-DTWZAXhi.js} +324 -322
  69. package/dist/{WhatsappBotLogs-C8M-1pvv.js → WhatsappBotLogs-DtDcrjs9.js} +11 -11
  70. package/dist/{WhatsappBotSettings-D6egqUyU.js → WhatsappBotSettings-7_mH9U4y.js} +287 -288
  71. package/dist/WhatsappLayout-BVpaFJ8H.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CMeaNKJt.js +261 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js → ZodTextField.vue_vue_type_script_setup_true_lang-BO1zA9AR.js} +2 -2
  74. package/dist/{app-BjdLqYQq.js → app-DX7OWVY2.js} +528 -524
  75. package/dist/app.js +1 -1
  76. package/dist/{base.export-B68z5BF6.js → base.export-bamzzexi.js} +2 -2
  77. package/dist/{business-D9fgkHxb.js → business-D3U9HSu9.js} +1 -1
  78. package/dist/{campaign-Dw_ujovr.js → campaign-BqRf2VUO.js} +8 -8
  79. package/dist/{campaign-eMaPX8r6.js → campaign-CKfeN2xN.js} +2 -2
  80. package/dist/{campaign.fn-DFjGNvmN.js → campaign.fn-DQe5LZuT.js} +38 -38
  81. package/dist/{collection.fn-CCOWtB-c.js → collection.fn-BcGqExuE.js} +2 -2
  82. package/dist/{currency-CTLKReFC.js → currency-sjMYWoI8.js} +1 -1
  83. package/dist/{duplicateCampaign-BcpBfUGL.js → duplicateCampaign-CJF3ZLNd.js} +2 -2
  84. package/dist/{effect-CTI1ZH57.js → effect-Cv8ugBR3.js} +1 -1
  85. package/dist/{email-addresses-B74e3bnB.js → email-addresses-CWqtseTn.js} +2 -2
  86. package/dist/{feature-flag-DVdEaChJ.js → feature-flag-BIh6MM4i.js} +159 -159
  87. package/dist/{helper-as9K-piK.js → helper-WnxOxoRK.js} +1 -1
  88. package/dist/{index-CHU3UePP.js → index-5TTGGDnF.js} +1 -1
  89. package/dist/{index-Ba719MYq.js → index-B3CkAr-6.js} +1 -1
  90. package/dist/{index-Czg-2Ni0.js → index-B9XVyhtC.js} +3 -3
  91. package/dist/{index-BW7FoVEA.js → index-BGguMtc0.js} +1 -1
  92. package/dist/{index-BbVbqe4Y.js → index-Bdg48Cus.js} +2 -2
  93. package/dist/{index-B_wRpO02.js → index-BoAmM8QH.js} +2 -2
  94. package/dist/{index-TAoQpeLQ.js → index-BtmVXdRR.js} +1 -1
  95. package/dist/{index-3LjKJhQa.js → index-CDTETsXQ.js} +1 -1
  96. package/dist/{index-DKI8401o.js → index-CeafUn1o.js} +2 -2
  97. package/dist/{index-QHqcSN2q.js → index-CiSTQhs9.js} +1 -1
  98. package/dist/{index-C5V6u2Qd.js → index-ClvaVYkG.js} +2 -2
  99. package/dist/{index-CWLOcQ6j.js → index-CnsSd5Dg.js} +9 -9
  100. package/dist/{index-B0h0iYWP.js → index-D3yYjyaj.js} +2 -2
  101. package/dist/{index-8mBfDn3M.js → index-DDzi_-Lu.js} +7 -7
  102. package/dist/{index-Ckz6u3ac.js → index-DOgDR_QH.js} +2 -2
  103. package/dist/{index-BEKMTiFb.js → index-DqZX-A6e.js} +3 -3
  104. package/dist/{index-DcZiikOH.js → index-DxhNNZ-a.js} +2 -2
  105. package/dist/{index-wsCCqwdr.js → index-DzYFQGSw.js} +2 -2
  106. package/dist/{index-C-iwb2Ln.js → index-I9lmcd2w.js} +2 -2
  107. package/dist/{index-CQxkDpX0.js → index-iiWxryxo.js} +4 -4
  108. package/dist/{index-BhTrG89b.js → index-qI1yx02a.js} +4 -4
  109. package/dist/{index.esm2017-DL6rTGDW.js → index.esm2017-GI2alVO5.js} +1 -1
  110. package/dist/{loading-x6IScY4K.js → loading-Qx5K2WL0.js} +1 -1
  111. package/dist/{lodash-nwnDizYo.js → lodash-CeSjJptg.js} +1 -1
  112. package/dist/{member-import-C-b01Tyd.js → member-import-Cq8G7SsW.js} +1 -1
  113. package/dist/{membership-DfarOMtO.js → membership-BbeavSNs.js} +2 -2
  114. package/dist/{money-CFn-jR4W.js → money-D8YIFaGA.js} +1 -1
  115. package/dist/{number-CSlyDL2x.js → number-DAubZ5bt.js} +1 -1
  116. package/dist/{objectid-zcT6ESET.js → objectid-DeXFWDMh.js} +6 -6
  117. package/dist/{onboarding-DyaFaaF2.js → onboarding-SyFxaTJY.js} +3 -3
  118. package/dist/{onboardingSetup-DQt91O9f.js → onboardingSetup-CLpHlBn8.js} +2 -2
  119. package/dist/{plugins-DEHr0UOe.js → plugins-BHuaMEYA.js} +3 -3
  120. package/dist/{reward-Du_Pv-4p.js → reward-dYWnmAC8.js} +1 -1
  121. package/dist/{rule-DfqmQTVK.js → rule-BVsfOP2h.js} +10 -10
  122. package/dist/{template-CcbNF4PF.js → template-BcdtbhUJ.js} +6 -6
  123. package/dist/{timezone-_4tabIaK.js → timezone-CUc7q5Ii.js} +1 -1
  124. package/dist/{transaction.fn-C46PHwCV.js → transaction.fn-jF9u_cBy.js} +2 -2
  125. package/dist/{trigger-Dipr6btC.js → trigger-COlbQlaB.js} +5 -5
  126. package/dist/{useMarketingMaterialActions-BAw2ZjeF.js → useMarketingMaterialActions-Dq6-gsOW.js} +4 -4
  127. package/dist/{usePagination-D6RZ18zS.js → usePagination-BYZB6ORK.js} +1 -1
  128. package/dist/{user-BCexQj3Q.js → user-DK7L8VFR.js} +1 -1
  129. package/dist/{vue-i18n-DXvyTCZf.js → vue-i18n-CDSTH7g5.js} +162 -162
  130. package/dist/{xlsx-BTxt_Jg6.js → xlsx-CKxXlDzD.js} +1 -1
  131. package/dist/{zod-T4wMYjWT.js → zod-DjtAaF0U.js} +1 -1
  132. package/package.json +1 -1
  133. package/dist/Reward-Dh2YI0Xb.js +0 -442
  134. package/dist/WhatsappLayout-DeQTPuF6.js +0 -21
  135. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +0 -253
@@ -0,0 +1,21 @@
1
+ import { defineComponent as n, computed as c, watch as p, openBlock as t, createBlock as a, createCommentVNode as s } from "vue";
2
+ import { useRouter as u } from "vue-router";
3
+ import { _ as f, a as i } from "./MainLayout.vue_vue_type_script_setup_true_lang-yAflY70k.js";
4
+ import { u as _ } from "./feature-flag-BIh6MM4i.js";
5
+ import { R as l } from "./app-DX7OWVY2.js";
6
+ const A = /* @__PURE__ */ n({
7
+ __name: "WhatsappLayout",
8
+ setup(d) {
9
+ const r = u(), m = _(), e = c(() => m());
10
+ return p(
11
+ e,
12
+ (o) => {
13
+ o === "off" && r.replace({ name: l["$connect-ANALYTIC"] });
14
+ },
15
+ { immediate: !0 }
16
+ ), (o, h) => e.value === "loading" ? (t(), a(f, { key: 0 })) : e.value === "on" ? (t(), a(i, { key: 1 })) : s("", !0);
17
+ }
18
+ });
19
+ export {
20
+ A as default
21
+ };
@@ -0,0 +1,261 @@
1
+ import { computed as d, toValue as j, ref as f, watch as D, defineComponent as W, mergeModels as O, useModel as $, onBeforeUnmount as z, resolveComponent as N, openBlock as v, createBlock as H, withCtx as T, createElementVNode as t, toDisplayString as s, unref as r, createElementBlock as _, createVNode as L, createTextVNode as V, Fragment as J, renderList as K, createCommentVNode as F } from "vue";
2
+ import { u as E } from "./vue-i18n-CDSTH7g5.js";
3
+ import { b as Q } from "./browser-BSAOEeIM.js";
4
+ import { S as X, a as Y } from "./index-CeafUn1o.js";
5
+ import { w as Z } from "./index-DzYFQGSw.js";
6
+ function ee(m) {
7
+ const l = m.connectedAt !== null;
8
+ switch (m.status) {
9
+ case "connected":
10
+ return "connected";
11
+ case "disconnected":
12
+ return l ? "disconnected" : void 0;
13
+ case "connecting":
14
+ return l ? "connecting" : void 0;
15
+ }
16
+ }
17
+ const R = [
18
+ "bg-fm-color-primary",
19
+ "bg-fm-color-secondary-plum",
20
+ "bg-fm-color-system-success-400"
21
+ ];
22
+ function te(m) {
23
+ const { t: l, locale: b } = E(), e = d(() => j(m)), x = d(
24
+ () => {
25
+ var o, a, i;
26
+ return (i = (a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.profilePicture) == null ? void 0 : i.url;
27
+ }
28
+ ), k = f(!1);
29
+ D(x, () => {
30
+ k.value = !1;
31
+ });
32
+ const G = d(
33
+ () => {
34
+ var o, a, i, p, g, y;
35
+ return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.businessName) || ((p = (i = e.value) == null ? void 0 : i.account) == null ? void 0 : p.name) || ((y = (g = e.value) == null ? void 0 : g.account) == null ? void 0 : y.phoneNumber) || l("connect.whatsappBot.unnamedAccount");
36
+ }
37
+ ), c = d(
38
+ () => {
39
+ var o, a;
40
+ return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.phoneNumber) || l("connect.whatsappBot.phoneUnavailable");
41
+ }
42
+ ), w = d(
43
+ () => G.value.trim().split(/\s+/).slice(0, 2).map((o) => Array.from(o)[0]).join("").toLocaleUpperCase(b.value)
44
+ ), B = d(
45
+ () => e.value ? ee(e.value) ?? "disconnected" : "disconnected"
46
+ ), h = d(
47
+ () => {
48
+ var o;
49
+ return R[Number.parseInt(((o = e.value) == null ? void 0 : o.clientId.slice(-6)) ?? "0", 16) % R.length];
50
+ }
51
+ );
52
+ return {
53
+ name: G,
54
+ phoneNumber: c,
55
+ initials: w,
56
+ state: B,
57
+ avatarColor: h,
58
+ profilePictureUrl: x,
59
+ profilePictureFailed: k
60
+ };
61
+ }
62
+ const oe = { class: "min-w-0 flex flex-col" }, ne = { class: "text-[18px] leading-[24px] font-semibold" }, ae = { class: "text-[13px] leading-[18px] text-fm-color-typo-tertiary break-words" }, se = {
63
+ key: 0,
64
+ class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
65
+ }, re = {
66
+ key: 1,
67
+ class: "py-[40px] flex flex-col items-center text-center gap-[16px]"
68
+ }, ie = {
69
+ role: "alert",
70
+ class: "text-[14px] text-fm-color-typo-error"
71
+ }, le = {
72
+ key: 2,
73
+ class: "grid grid-cols-[minmax(0,1fr)_226px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
74
+ }, ce = { class: "min-w-0 flex flex-col gap-[20px] text-[14px] leading-[20px]" }, pe = { class: "text-fm-color-typo-secondary [text-wrap:pretty]" }, ue = { class: "flex flex-col gap-[10px]" }, de = { class: "text-[12px] leading-[16px] font-semibold uppercase tracking-[0.06em] text-fm-color-typo-tertiary" }, fe = { class: "flex flex-col gap-[10px]" }, me = { class: "flex flex-col gap-[6px]" }, xe = {
75
+ id: "whatsapp-group-invite-link-label",
76
+ class: "font-medium text-fm-color-typo-tertiary"
77
+ }, ve = { class: "flex items-center gap-[8px] border border-fm-color-neutral-gray-200 rounded-[8px] pl-[12px] pr-[4px] py-[4px]" }, he = ["value"], ge = ["disabled"], ye = {
78
+ key: 0,
79
+ class: "sr-only"
80
+ }, _e = {
81
+ key: 1,
82
+ role: "alert",
83
+ class: "text-[12px] leading-[16px] text-fm-color-typo-error"
84
+ }, be = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary" }, we = { class: "flex flex-col items-center gap-[12px] w-[226px] xs:justify-self-center" }, Be = { class: "border border-fm-color-neutral-gray-100 rounded-[12px] overflow-hidden" }, ke = ["src", "alt"], Ge = ["href"], Fe = /* @__PURE__ */ W({
85
+ __name: "WhatsappNotificationGroupDialog",
86
+ props: /* @__PURE__ */ O({
87
+ account: {}
88
+ }, {
89
+ modelValue: { type: Boolean, required: !0 },
90
+ modelModifiers: {}
91
+ }),
92
+ emits: ["update:modelValue"],
93
+ setup(m) {
94
+ const l = m, b = $(m, "modelValue"), { t: e } = E(), x = d(() => X.getBusinessId() ?? ""), { name: k, phoneNumber: G } = te(() => l.account), c = f(), w = f(""), B = f(!1), h = f(""), o = f(!1), a = f(!1), i = f("");
95
+ let p, g;
96
+ function y() {
97
+ p == null || p.abort(), clearTimeout(g), o.value = !1, a.value = !1;
98
+ }
99
+ function S(n) {
100
+ if (n instanceof Y) {
101
+ if (n.status === 409)
102
+ return e("connect.whatsappBot.notificationGroup.notReady");
103
+ if (n.status === 404)
104
+ return e("connect.whatsappBot.errors.accountNotFound");
105
+ }
106
+ return x.value ? e("connect.whatsappBot.errors.loadGroup") : e("connect.whatsappBot.errors.selectBusiness");
107
+ }
108
+ async function I() {
109
+ y();
110
+ const n = new AbortController();
111
+ p = n, B.value = !0, h.value = "", i.value = "", c.value = void 0, w.value = "";
112
+ try {
113
+ if (!x.value)
114
+ throw new Error(e("connect.whatsappBot.errors.selectBusiness"));
115
+ const u = await Z.getNotificationGroup(
116
+ x.value,
117
+ l.account.clientId,
118
+ n.signal
119
+ );
120
+ if (n.signal.aborted) return;
121
+ const A = await Q.toDataURL(u.inviteLink, {
122
+ width: 224,
123
+ margin: 2,
124
+ errorCorrectionLevel: "M"
125
+ });
126
+ if (n.signal.aborted) return;
127
+ c.value = u, w.value = A;
128
+ } catch (u) {
129
+ if (n.signal.aborted) return;
130
+ h.value = S(u);
131
+ } finally {
132
+ n.signal.aborted || (B.value = !1);
133
+ }
134
+ }
135
+ async function U() {
136
+ if (!c.value || !p || a.value) return;
137
+ const n = p;
138
+ a.value = !0, o.value = !1, i.value = "", clearTimeout(g);
139
+ try {
140
+ if (await navigator.clipboard.writeText(c.value.inviteLink), n.signal.aborted) return;
141
+ o.value = !0, g = setTimeout(() => {
142
+ o.value = !1;
143
+ }, 2e3);
144
+ } catch {
145
+ n.signal.aborted || (i.value = e("connect.whatsappBot.errors.copyGroupLink"));
146
+ } finally {
147
+ n.signal.aborted || (a.value = !1);
148
+ }
149
+ }
150
+ return D(
151
+ [b, x, () => l.account.clientId],
152
+ ([n]) => {
153
+ n ? I() : y();
154
+ },
155
+ { immediate: !0 }
156
+ ), z(y), (n, u) => {
157
+ const A = N("FmCircularProgress"), q = N("FmButton"), M = N("FmIcon"), P = N("FmDialog");
158
+ return v(), H(P, {
159
+ modelValue: b.value,
160
+ "onUpdate:modelValue": u[0] || (u[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", oe, [
168
+ t("h2", ne, s(r(e)("connect.whatsappBot.notificationGroup.dialogTitle")), 1),
169
+ t("p", ae, s(r(k)) + " · " + s(r(G)), 1)
170
+ ])
171
+ ]),
172
+ default: T(() => [
173
+ B.value ? (v(), _("output", se, [
174
+ L(A),
175
+ V(" " + s(r(e)("connect.whatsappBot.notificationGroup.loading")), 1)
176
+ ])) : h.value ? (v(), _("div", re, [
177
+ t("p", ie, s(h.value), 1),
178
+ L(q, {
179
+ label: r(e)("connect.whatsappBot.tryAgain"),
180
+ "prepend-icon": "refresh",
181
+ class: "!rounded-full [&_.label]:text-[14px]",
182
+ onClick: I
183
+ }, null, 8, ["label"])
184
+ ])) : c.value ? (v(), _("div", le, [
185
+ t("div", ce, [
186
+ t("p", pe, s(r(e)("connect.whatsappBot.notificationGroup.scanDescription")), 1),
187
+ t("div", ue, [
188
+ t("h3", de, s(r(e)("connect.whatsappBot.notificationGroup.postsTitle")), 1),
189
+ t("ul", fe, [
190
+ (v(), _(J, null, K(["unanswered", "staffRequests", "humanRequests"], (C) => t("li", {
191
+ key: C,
192
+ class: "flex gap-[10px]"
193
+ }, [
194
+ u[1] || (u[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(" " + s(r(e)(`connect.whatsappBot.notificationGroup.posts.${C}`)), 1)
199
+ ])), 64))
200
+ ])
201
+ ]),
202
+ t("div", me, [
203
+ t("span", xe, s(r(e)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
204
+ t("div", ve, [
205
+ t("input", {
206
+ id: "whatsapp-group-invite-link",
207
+ type: "text",
208
+ readonly: "",
209
+ value: c.value.inviteLink,
210
+ "aria-labelledby": "whatsapp-group-invite-link-label",
211
+ tabindex: "0",
212
+ 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"
213
+ }, null, 8, he),
214
+ t("button", {
215
+ type: "button",
216
+ disabled: a.value,
217
+ 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",
218
+ onClick: U
219
+ }, s(r(e)(
220
+ `connect.whatsappBot.notificationGroup.${o.value ? "copied" : "copy"}`
221
+ )), 9, ge)
222
+ ]),
223
+ o.value ? (v(), _("output", ye, s(r(e)("connect.whatsappBot.notificationGroup.copied")), 1)) : F("", !0),
224
+ i.value ? (v(), _("p", _e, s(i.value), 1)) : F("", !0),
225
+ t("p", be, s(r(e)("connect.whatsappBot.notificationGroup.shareNote")), 1)
226
+ ])
227
+ ]),
228
+ t("div", we, [
229
+ t("div", Be, [
230
+ t("img", {
231
+ src: w.value,
232
+ alt: r(e)("connect.whatsappBot.notificationGroup.qrAlt"),
233
+ width: "224",
234
+ height: "224"
235
+ }, null, 8, ke)
236
+ ]),
237
+ t("a", {
238
+ href: c.value.inviteLink,
239
+ target: "_blank",
240
+ rel: "noopener noreferrer",
241
+ 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]"
242
+ }, [
243
+ V(s(r(e)("connect.whatsappBot.notificationGroup.openWhatsapp")) + " ", 1),
244
+ L(M, {
245
+ name: "open_in_new",
246
+ size: "sm"
247
+ })
248
+ ], 8, Ge)
249
+ ])
250
+ ])) : F("", !0)
251
+ ]),
252
+ _: 1
253
+ }, 8, ["modelValue"]);
254
+ };
255
+ }
256
+ });
257
+ export {
258
+ Fe as _,
259
+ te as u,
260
+ ee as w
261
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
2
- import { Z as d } from "./zod-T4wMYjWT.js";
3
- import { u as V } from "./vue-i18n-DXvyTCZf.js";
2
+ import { Z as d } from "./zod-DjtAaF0U.js";
3
+ import { u as V } from "./vue-i18n-CDSTH7g5.js";
4
4
  const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
5
5
  key: 0,
6
6
  class: "text-fm-color-typo-tertiary"