@feedmepos/mf-connect 0.1.124-dev → 0.1.125-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 (139) hide show
  1. package/dist/{App-C7BnLHSt.js → App-lOnYYWzx.js} +454 -455
  2. package/dist/{AuditLogs-BPKQdFga.js → AuditLogs-C5aMzrhF.js} +13 -13
  3. package/dist/{Bin-Bq7yY0I2.js → Bin-Dk0rAESN.js} +8 -8
  4. package/dist/{Broadcast-D52rPmVl.js → Broadcast-BBNpuceo.js} +12 -12
  5. package/dist/{CampaignAnalytic-DpiWtzIp.js → CampaignAnalytic-BgROt0Yu.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B1eAAN64.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CrgCuB45.js} +9 -9
  7. package/dist/{Card-BQc7vud2.js → Card-fSEJaQmL.js} +23 -23
  8. package/dist/{Collections--VzkneGp.js → Collections-DVM1dOOo.js} +8 -8
  9. package/dist/{Credit-DhfAcw-p.js → Credit-CNDYRDiK.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D2Csdg-3.js → DateRangeChip.vue_vue_type_script_setup_true_lang-Cup-EvR6.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DFz_2GZ1.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CJ90EwzB.js} +36 -36
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cr2_XbyY.js → EffectSheet.vue_vue_type_style_index_0_lang-JQmGeS__.js} +24 -24
  13. package/dist/{Experience-CUwbHfo5.js → Experience-Bqfx1Gjq.js} +13 -13
  14. package/dist/{FileSaver.min-DvZpiwMd.js → FileSaver.min-B4Jv2-PR.js} +1 -1
  15. package/dist/{Game-CI5-y0JJ.js → Game-DmbJYYaC.js} +13 -13
  16. package/dist/{GiftCardSetup-CGacqQ0j.js → GiftCardSetup-DHxDI5hU.js} +10 -10
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-B6POxDLJ.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BfrjE7gE.js} +7 -7
  18. package/dist/{Goals-fqJY9iMx.js → Goals-B-3PoUlx.js} +4 -4
  19. package/dist/{Grab-CAx1cCE4.js → Grab-BRfVvqAr.js} +9 -9
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DTKf7uR-.js → ImageInput.vue_vue_type_script_setup_true_lang-TUlgTblc.js} +1 -1
  21. package/dist/{Index-CT1Gnjsv.js → Index-vfYiu7G1.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BRQ12Yum.js → LocationPicker.vue_vue_type_script_setup_true_lang-BKdq7bw2.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BRzuWJ1Y.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DUAKzHgZ.js} +1 -1
  24. package/dist/{LoyaltyDashboard-IJIDEBWf.js → LoyaltyDashboard-CHEIpAHw.js} +15 -15
  25. package/dist/{MainLayout-BMghr-wf.js → MainLayout-Cf1lEoHL.js} +1 -1
  26. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-BitJKgvd.js → MainLayout.vue_vue_type_script_setup_true_lang-DwNxuVHy.js} +3 -3
  27. package/dist/{Marketing-Ckr9cp3w.js → Marketing-BBF8mHSo.js} +4 -4
  28. package/dist/{MarketingMaterialEdit-BIZnE8CY.js → MarketingMaterialEdit-COTHaH08.js} +6 -6
  29. package/dist/{Member-d1nPxr74.js → Member-BEyxcsNI.js} +7 -7
  30. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DLSsOeLt.js +1300 -0
  31. package/dist/{MemberImportHistory-CxX9iYhV.js → MemberImportHistory-zs8VJsoI.js} +7 -7
  32. package/dist/{MemberList-DUzYpxhj.js → MemberList-2-qKmm5p.js} +14 -14
  33. package/dist/{MemberTransactions-BFM3ybeo.js → MemberTransactions-DOsMBs30.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B5j0YBix.js → MessageInput.vue_vue_type_script_setup_true_lang-DBl4cf8X.js} +10 -10
  35. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DsSHSbBB.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CtqBL-Ky.js} +1 -1
  36. package/dist/{Mission-De9BF5wb.js → Mission-Bo7tuR13.js} +14 -14
  37. package/dist/{Overview-Pmxqv6qp.js → Overview-BrGVMqE1.js} +21 -21
  38. package/dist/{Overview-DeHo3gef.js → Overview-CnoidK6U.js} +4 -4
  39. package/dist/{Point-DE_Cc85N.js → Point-DJ2-HEmx.js} +14 -14
  40. package/dist/{Promotion-cZDzgho4.js → Promotion-D7Q3EY3d.js} +14 -14
  41. package/dist/{Queue-DmDbrtTk.js → Queue-CLXhXQeU.js} +13 -13
  42. package/dist/{Record-uxNNOvmK.js → Record-CCF7K-pJ.js} +9 -9
  43. package/dist/{Review-CIIn_Bdx.js → Review-BZH_tGDe.js} +2 -2
  44. package/dist/{ReviewFacebookCallback-CO6FxHzc.js → ReviewFacebookCallback-Bs-oiDMC.js} +5 -5
  45. package/dist/{ReviewGoogleCallback-B7kmGwb_.js → ReviewGoogleCallback-eHLJko2f.js} +5 -5
  46. package/dist/{Reward-Bj1snFu8.js → Reward-ea05o2qi.js} +16 -16
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BO-36dE4.js → RewardGroup.vue_vue_type_script_setup_true_lang-Csa8UPMS.js} +14 -14
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-b7ZEMd4s.js → RuleGroup.vue_vue_type_script_setup_true_lang-DW3NDgHq.js} +15 -15
  49. package/dist/{Segment-BgJgWa6C.js → Segment-z3BAGTqr.js} +26 -26
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D2TDoZgQ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D4H86p3o.js} +15 -15
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CEBH11hR.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-x8dMt8PF.js} +4 -4
  52. package/dist/Setting-D0nKTgej.js +578 -0
  53. package/dist/{SettingAdvertisements-vdUtIXwC.js → SettingAdvertisements-BUGsMAdi.js} +12 -12
  54. package/dist/{Settings-C6yJ1WEB.js → Settings-C2loJXla.js} +5 -5
  55. package/dist/{Store-DgltT0RA.js → Store-CbhAyr1j.js} +27 -27
  56. package/dist/{StoreRewards-BXH_5cYL.js → StoreRewards-DHt64JEN.js} +15 -15
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CQ7I8Zli.js +1297 -0
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DjCO9U0c.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-ylUyqix_.js} +2 -2
  59. package/dist/{Tier-CqfHGUX0.js → Tier-CH5DwMYW.js} +122 -115
  60. package/dist/{Title-B5VnUNiS.js → Title-DNLw_rOp.js} +23 -23
  61. package/dist/{Transaction-BZh1Q9Lj.js → Transaction-DCuU6B7G.js} +2 -2
  62. package/dist/Upselling-DBsfEEvV.js +214 -0
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Buj7CRlQ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-f-j87AZA.js} +6 -6
  64. package/dist/{Voucher-CZJdV2Ok.js → Voucher-BVztDyI0.js} +18 -18
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-65x2VrpD.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CrYrxFVi.js} +12 -12
  66. package/dist/{WhatsappAccount-DsRilNC5.js → WhatsappAccount-CobyTNkp.js} +6 -6
  67. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Bn26qwx5.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-C-pbY0Zv.js} +1 -1
  68. package/dist/{WhatsappBot-CpzMaTss.js → WhatsappBot-xc4QD061.js} +6 -6
  69. package/dist/WhatsappBotLogs-eiDWJkN7.js +509 -0
  70. package/dist/{WhatsappBotSettings-DSUPGC-p.js → WhatsappBotSettings-D4cMFn3z.js} +65 -65
  71. package/dist/{WhatsappLayout-BCWYcQmD.js → WhatsappLayout-C8DejCWo.js} +3 -3
  72. package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DyxyISRP.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CZNpggfQ.js} +3 -3
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Db-Z7cY_.js → ZodTextField.vue_vue_type_script_setup_true_lang-C6TJ4hxh.js} +2 -2
  74. package/dist/{app-BQeODViN.js → app-Bik4hlr7.js} +14726 -13780
  75. package/dist/app.js +1 -1
  76. package/dist/{base.export-kSFLDDoC.js → base.export-BRw8QzdM.js} +2 -2
  77. package/dist/{business-EP-Do3Ew.js → business-Dv2S3X12.js} +1 -1
  78. package/dist/{campaign-BjnUPowX.js → campaign-CNDBsfeQ.js} +6 -6
  79. package/dist/{campaign-C8GgaCub.js → campaign-witQNfmZ.js} +8 -8
  80. package/dist/{campaign.fn-DQ--gL4B.js → campaign.fn-Dr4w5BrO.js} +31 -31
  81. package/dist/{collection.fn-BhXecwh5.js → collection.fn-C0Dx5_1j.js} +2 -2
  82. package/dist/{currency-CGMNh1Q_.js → currency-lP50Csky.js} +1 -1
  83. package/dist/{duplicateCampaign-icqF8Na9.js → duplicateCampaign-BfLxdQWg.js} +2 -2
  84. package/dist/{effect-Bc6oGIWd.js → effect-6bi20cxS.js} +1 -1
  85. package/dist/{email-addresses-B3KWfUMk.js → email-addresses-BmujKG-l.js} +25 -25
  86. package/dist/{feature-flag-HhjvSuDm.js → feature-flag-DdxBiP1p.js} +200 -186
  87. package/dist/{helper-D1BYvcED.js → helper-DSmzzBjW.js} +1 -1
  88. package/dist/{index-BkevK_Hp.js → index-2JiR1s6M.js} +1 -1
  89. package/dist/{index-C3MK8Twg.js → index-373LDTQ7.js} +1 -1
  90. package/dist/{index-Br2SLVsn.js → index-83SeIfhc.js} +7 -7
  91. package/dist/{index-gMrtUwSD.js → index-B0Ddw1na.js} +129 -129
  92. package/dist/index-BD3HIAoL.js +86 -0
  93. package/dist/{index-CsYTLmPa.js → index-BNdhRCyN.js} +1 -1
  94. package/dist/{index-DOSuhtdE.js → index-BTud0ICl.js} +1 -1
  95. package/dist/{index-GQv1_jaJ.js → index-BYlnybS9.js} +2 -2
  96. package/dist/{index-DCC3pLug.js → index-CCVnmv0l.js} +2 -2
  97. package/dist/{index-Yw4M7v7m.js → index-CEscBR6G.js} +3 -2
  98. package/dist/{index-oIo5Cful.js → index-CFhazRum.js} +1048 -1047
  99. package/dist/{index-I9lmcd2w.js → index-CH-uRaZH.js} +56 -53
  100. package/dist/{index-VLFerh-X.js → index-CH1MpmvS.js} +11 -11
  101. package/dist/{index-Bunp1bt_.js → index-CRd8uD-d.js} +1 -1
  102. package/dist/{index-DiCgGQoC.js → index-CdQGmMRo.js} +2 -2
  103. package/dist/{index-C-46QHFh.js → index-Cei8qPkg.js} +4 -4
  104. package/dist/{index-BIBcfAw5.js → index-D-Ln1G1Y.js} +1 -1
  105. package/dist/{index-D2TnjKPP.js → index-DGctCMca.js} +2 -2
  106. package/dist/{index-Ptcqv0W6.js → index-DGz2Y25B.js} +2 -2
  107. package/dist/{index-DeqpfWLa.js → index-DMT5xoCz.js} +3 -3
  108. package/dist/{index-cPPWotJe.js → index-DjlmY7Od.js} +5 -5
  109. package/dist/{index.esm2017-DUZpLdEB.js → index.esm2017-BcULj0z4.js} +1 -1
  110. package/dist/{loading-DhpcQgdj.js → loading-DmCJ1FiL.js} +1 -1
  111. package/dist/{lodash-r4AR7GJC.js → lodash-FEhiisF1.js} +1 -1
  112. package/dist/{member-import-CogEef9H.js → member-import-BLxPVKon.js} +22 -13
  113. package/dist/{membership-BQFkjRjs.js → membership-Dq3LSd35.js} +2 -2
  114. package/dist/{money-Ifqd4pyC.js → money-D2RIG9zm.js} +1 -1
  115. package/dist/{number-C9Tw_Ncm.js → number-D87ngEVu.js} +1 -1
  116. package/dist/objectid-CuPXVpKE.js +145 -0
  117. package/dist/{onboarding-D4dm_rxU.js → onboarding-YlSAcar0.js} +20 -20
  118. package/dist/{onboardingSetup-DtNZUoRr.js → onboardingSetup-qgS6ktSi.js} +2 -2
  119. package/dist/{plugins-DGI9Fkiu.js → plugins-B3B_2EiB.js} +3 -3
  120. package/dist/{reward-DTtejZqM.js → reward-BtEe_1ZU.js} +1 -1
  121. package/dist/{rule-C4N3ce3c.js → rule-PmdBF8Cb.js} +10 -10
  122. package/dist/{template-YhWRyNGp.js → template-D6wO9_aV.js} +6 -6
  123. package/dist/{timezone-5rYhX7XZ.js → timezone-DPnmvzUK.js} +1 -1
  124. package/dist/{transaction.fn-Ba_U7HdT.js → transaction.fn-BavSYDYI.js} +2 -2
  125. package/dist/{trigger-B8I1aO6Y.js → trigger-CsIScoNI.js} +5 -5
  126. package/dist/{useMarketingMaterialActions-CTOFHmlL.js → useMarketingMaterialActions-CHBfA7iR.js} +4 -4
  127. package/dist/{usePagination-3wAPVCOp.js → usePagination-DXPBbII4.js} +1 -1
  128. package/dist/{user-Ds4DW_-Y.js → user-B8js0aIx.js} +1 -1
  129. package/dist/{vue-i18n-Bqlt_-jA.js → vue-i18n-R6DAeTzc.js} +193 -193
  130. package/dist/{xlsx-xlOCvuAq.js → xlsx-CYugHPG9.js} +166 -166
  131. package/dist/{zod-GVNjvrpT.js → zod-BEFViLGC.js} +1 -1
  132. package/package.json +1 -1
  133. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DI4XM_rJ.js +0 -1281
  134. package/dist/Setting-DpEI72mW.js +0 -574
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DqlluwMB.js +0 -1319
  136. package/dist/Upselling-Cf24ub-9.js +0 -1055
  137. package/dist/WhatsappBotLogs-DRF8VufQ.js +0 -372
  138. package/dist/index-VyoufKYY.js +0 -74
  139. package/dist/objectid-D7dqM1a3.js +0 -145
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as Z, ref as w, computed as M, watch as H, onBeforeUnmount as te, resolveComponent as B, openBlock as o, createElementBlock as p, createElementVNode as t, normalizeClass as R, unref as e, toDisplayString as a, createBlock as A, withCtx as S, createTextVNode as Q, createVNode as k, createCommentVNode as D, Fragment as G, renderList as X, mergeModels as ae, useModel as le, isRef as ce } from "vue";
2
- import { u as Y } from "./vue-i18n-Bqlt_-jA.js";
2
+ import { u as Y } from "./vue-i18n-R6DAeTzc.js";
3
3
  import { useRouter as ie } from "vue-router";
4
4
  import { useCoreStore as pe } from "@feedmepos/mf-common";
5
- import { S as K, b as se } from "./index-cPPWotJe.js";
6
- import { w as J } from "./index-VyoufKYY.js";
7
- import { u as ue, _ as de, w as me } from "./WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DyxyISRP.js";
8
- import { R as N } from "./app-BQeODViN.js";
9
- import { _ as fe } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Bn26qwx5.js";
5
+ import { S as K, a as se } from "./index-DjlmY7Od.js";
6
+ import { w as J } from "./index-BD3HIAoL.js";
7
+ import { u as ue, _ as de, w as me } from "./WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CZNpggfQ.js";
8
+ import { R as N } from "./app-Bik4hlr7.js";
9
+ import { _ as fe } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-C-pbY0Zv.js";
10
10
  import { b as re } from "./browser-BSAOEeIM.js";
11
11
  const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" }, he = ["src"], _e = { key: 1 }, ge = { class: "min-w-0 flex-1" }, ye = ["title"], be = { key: 1 }, we = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary break-all" }, Be = { class: "relative z-10 shrink-0" }, ke = ["aria-label", "title", "aria-expanded", "disabled", "aria-busy"], $e = { class: "text-[14px] text-fm-color-typo-error" }, Ce = { class: "flex items-center justify-between flex-wrap gap-[8px] border-t border-fm-color-neutral-gray-100 pt-[12px]" }, Ae = {
12
12
  key: 0,
@@ -0,0 +1,509 @@
1
+ import { defineComponent as Y, resolveComponent as y, openBlock as n, createElementBlock as p, createElementVNode as s, toDisplayString as l, unref as c, createVNode as h, computed as g, createCommentVNode as k, Fragment as T, renderList as G, normalizeClass as ee, createTextVNode as te, createBlock as S, ref as w, h as F, watch as J, onBeforeUnmount as xe, withCtx as K, withDirectives as ve, vShow as fe } from "vue";
2
+ import { u as j } from "./vue-i18n-R6DAeTzc.js";
3
+ import { useCoreStore as he } from "@feedmepos/mf-common";
4
+ import { components as ge } from "@feedmepos/ui-library";
5
+ import { S as we } from "./index-DjlmY7Od.js";
6
+ import { w as Q } from "./index-BD3HIAoL.js";
7
+ import { _ as ye } from "./remy-icon-BhUGu2NI.js";
8
+ import { _ as be } from "./WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CZNpggfQ.js";
9
+ import { C as X } from "./timezone-DPnmvzUK.js";
10
+ import { m as _e } from "./index-373LDTQ7.js";
11
+ const Be = { class: "group self-end min-w-[min(280px,100%)] max-w-[80%] rounded-[12px] rounded-br-[4px] bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary" }, ke = { class: "flex items-center gap-[4px] min-h-[28px] px-[10px] py-[4px] text-[11px] font-medium cursor-pointer list-none rounded-[12px] focus-visible:outline-fm-color-primary" }, Ce = { class: "flex-1 group-open:hidden" }, Fe = { class: "flex-1 hidden group-open:inline" }, Ae = { class: "px-[10px] pt-[2px] pb-[8px] text-[13px] leading-[18px] whitespace-pre-wrap break-words" }, $e = /* @__PURE__ */ Y({
12
+ __name: "ThoughtBubble",
13
+ props: {
14
+ text: {}
15
+ },
16
+ setup(r) {
17
+ const { t: b } = j();
18
+ return (o, A) => {
19
+ const a = y("FmIcon");
20
+ return n(), p("details", Be, [
21
+ s("summary", ke, [
22
+ A[0] || (A[0] = s("img", {
23
+ src: ye,
24
+ alt: "",
25
+ "aria-hidden": "true",
26
+ class: "w-[16px] h-[16px] shrink-0"
27
+ }, null, -1)),
28
+ s("span", Ce, l(c(b)("connect.whatsappBot.logs.thought")), 1),
29
+ s("span", Fe, l(c(b)("connect.whatsappBot.logs.hideThought")), 1),
30
+ h(a, {
31
+ name: "keyboard_arrow_down",
32
+ size: "sm",
33
+ class: "transition-transform group-open:rotate-180"
34
+ })
35
+ ]),
36
+ s("p", Ae, l(r.text), 1)
37
+ ]);
38
+ };
39
+ }
40
+ }), Ne = { class: "border border-fm-color-neutral-gray-100 rounded-[16px] bg-fm-color-neutral-white overflow-hidden" }, Me = { class: "flex items-center gap-[10px] px-[16px] py-[10px] border-b border-fm-color-neutral-gray-100 flex-wrap" }, De = {
41
+ key: 0,
42
+ "aria-hidden": "true",
43
+ class: "w-[28px] h-[28px] rounded-full bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary text-[12px] font-semibold flex items-center justify-center shrink-0"
44
+ }, Ie = {
45
+ key: 1,
46
+ class: "min-w-0 flex-1"
47
+ }, Se = { class: "text-[14px] font-semibold leading-[20px] break-words" }, Te = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary break-words" }, ze = ["datetime"], Le = { class: "flex flex-col gap-[10px] px-[16px] py-[12px]" }, Ee = {
48
+ key: 0,
49
+ class: "self-end text-[12px] leading-[16px] text-fm-color-typo-tertiary"
50
+ }, Ve = {
51
+ key: 0,
52
+ class: "text-[11px] text-fm-color-typo-tertiary"
53
+ }, Ue = ["datetime"], Ge = ["disabled", "title"], Ye = { class: "w-[24px] h-[24px] rounded-full bg-fm-color-secondary-plum/10 text-fm-color-secondary-plum flex items-center justify-center shrink-0" }, je = { class: "flex flex-col min-w-0" }, We = { class: "text-[13px] leading-[18px] font-semibold" }, Oe = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary whitespace-pre-wrap break-words" }, Pe = /* @__PURE__ */ Y({
54
+ __name: "WhatsappLogConversation",
55
+ props: {
56
+ conversation: {},
57
+ group: {},
58
+ accountName: {},
59
+ timezone: {},
60
+ showCustomer: { type: Boolean, default: !0 }
61
+ },
62
+ emits: ["notificationGroup"],
63
+ setup(r, { emit: b }) {
64
+ const o = r, A = b, { t: a, locale: u } = j(), C = g(
65
+ () => o.conversation.customerName || o.conversation.phoneNumber || a("connect.whatsappBot.logs.unknownCustomer")
66
+ ), v = g(
67
+ () => o.conversation.customerName ? o.conversation.customerName.trim().split(/\s+/).slice(0, 2).map((f) => Array.from(f)[0]).join("").toLocaleUpperCase(u.value) : "?"
68
+ ), I = g(
69
+ () => new Intl.DateTimeFormat(u.value, {
70
+ dateStyle: "medium",
71
+ timeStyle: "short",
72
+ timeZone: o.timezone
73
+ })
74
+ ), $ = g(
75
+ () => new Intl.DateTimeFormat(u.value, {
76
+ hour: "2-digit",
77
+ minute: "2-digit",
78
+ hour12: !1,
79
+ timeZone: o.timezone
80
+ })
81
+ );
82
+ function m(f) {
83
+ var _;
84
+ return (_ = f.reaction) != null && _.removed ? a("connect.whatsappBot.logs.reactionRemoved") : f.text ? f.text : a("connect.whatsappBot.logs.mediaMessage", { type: f.messageType });
85
+ }
86
+ return (f, _) => {
87
+ const N = y("FmIcon");
88
+ return n(), p("article", Ne, [
89
+ s("header", Me, [
90
+ r.showCustomer ? (n(), p("div", De, l(v.value), 1)) : k("", !0),
91
+ r.showCustomer ? (n(), p("div", Ie, [
92
+ s("h2", Se, l(C.value), 1),
93
+ s("p", Te, l(r.conversation.phoneNumber || c(a)("connect.whatsappBot.phoneUnavailable")) + " · " + l(c(a)("connect.whatsappBot.logs.via", { name: r.accountName })), 1)
94
+ ])) : k("", !0),
95
+ s("time", {
96
+ datetime: r.group.lastCreatedAt,
97
+ class: "text-[12px] text-fm-color-typo-tertiary tabular-nums"
98
+ }, l(I.value.format(new Date(r.group.lastCreatedAt))), 9, ze)
99
+ ]),
100
+ s("ol", Le, [
101
+ (n(!0), p(T, null, G(r.group.logs, (i) => (n(), p("li", {
102
+ key: i.id,
103
+ class: "flex flex-col gap-[4px] min-w-0"
104
+ }, [
105
+ i.type === "message" ? (n(), p(T, { key: 0 }, [
106
+ i.isFromMe && !i.isFromBot ? (n(), p("span", Ee, l(c(a)("connect.whatsappBot.logs.sentByStaff")), 1)) : k("", !0),
107
+ s("div", {
108
+ class: ee([
109
+ "px-[10px] py-[6px] text-[14px] leading-[20px] whitespace-pre-wrap break-words min-w-0",
110
+ i.isFromMe ? "self-end max-w-[80%] bg-fm-color-primary-oats rounded-[12px] rounded-br-[4px]" : "self-start max-w-[75%] bg-[#F7F7F7] rounded-[12px] rounded-bl-[4px]"
111
+ ])
112
+ }, [
113
+ te(l(m(i)) + " ", 1),
114
+ i.isEdit ? (n(), p("span", Ve, " (" + l(c(a)("connect.whatsappBot.logs.edited")) + ") ", 1)) : k("", !0),
115
+ s("time", {
116
+ datetime: i.timestamp,
117
+ class: "float-right mt-[6px] ml-[10px] text-[11px] leading-[14px] text-fm-color-typo-tertiary tabular-nums"
118
+ }, l($.value.format(new Date(i.timestamp))), 9, Ue)
119
+ ], 2)
120
+ ], 64)) : i.type === "thought" ? (n(), S($e, {
121
+ key: 1,
122
+ text: i.text
123
+ }, null, 8, ["text"])) : i.type === "escalate" ? (n(), p("button", {
124
+ key: 2,
125
+ type: "button",
126
+ disabled: !r.conversation.clientId,
127
+ title: c(a)("connect.whatsappBot.logs.openNotificationGroup"),
128
+ class: "self-end flex items-start gap-[8px] max-w-[80%] py-[8px] pr-[12px] pl-[8px] border border-fm-color-neutral-gray-200 rounded-[8px] text-left hover:bg-fm-color-neutral-gray-100/50 focus-visible:outline-fm-color-primary",
129
+ onClick: _[0] || (_[0] = (z) => r.conversation.clientId && A("notificationGroup", r.conversation.clientId))
130
+ }, [
131
+ s("span", Ye, [
132
+ h(N, {
133
+ name: "group",
134
+ size: "sm"
135
+ })
136
+ ]),
137
+ s("span", je, [
138
+ s("span", We, l(c(a)("connect.whatsappBot.logs.escalated")), 1),
139
+ s("span", Oe, l(c(a)("connect.whatsappBot.logs.reason", {
140
+ reason: i.reason
141
+ })), 1)
142
+ ])
143
+ ], 8, Ge)) : k("", !0)
144
+ ]))), 128))
145
+ ])
146
+ ]);
147
+ };
148
+ }
149
+ });
150
+ function Re(r, b) {
151
+ const o = /* @__PURE__ */ new Map(), A = [...r].sort(
152
+ (a, u) => Date.parse(a.createdAt) - Date.parse(u.createdAt) || q(a) - q(u) || a.id.localeCompare(u.id)
153
+ );
154
+ for (const a of A) {
155
+ const u = _e.tz(a.createdAt, b).format("YYYY-MM-DD"), C = o.get(u);
156
+ C ? (C.logs.push(a), C.lastCreatedAt = a.createdAt) : o.set(u, {
157
+ date: u,
158
+ createdAt: a.createdAt,
159
+ lastCreatedAt: a.createdAt,
160
+ logs: [a]
161
+ });
162
+ }
163
+ return [...o.values()].sort(
164
+ (a, u) => Date.parse(u.lastCreatedAt) - Date.parse(a.lastCreatedAt)
165
+ );
166
+ }
167
+ function q(r) {
168
+ return r.type === "thought" ? 1 : r.type === "escalate" ? 2 : r.isFromMe ? 3 : 0;
169
+ }
170
+ const Ze = { class: "mt-[20px] flex flex-col gap-[16px]" }, He = { class: "min-w-0 flex-1" }, Je = { class: "text-[16px] font-semibold leading-[24px] break-words" }, Ke = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary break-words" }, Qe = { class: "max-h-[240px] overflow-y-auto" }, Xe = {
171
+ key: 0,
172
+ role: "alert",
173
+ class: "text-[14px] text-fm-color-typo-error"
174
+ }, qe = {
175
+ key: 1,
176
+ class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
177
+ }, et = {
178
+ key: 2,
179
+ class: "flex items-center gap-[12px] flex-wrap"
180
+ }, tt = {
181
+ role: "alert",
182
+ class: "text-[14px] text-fm-color-typo-error"
183
+ }, ot = {
184
+ key: 3,
185
+ class: "border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[8px]"
186
+ }, at = { class: "text-[20px] font-semibold" }, nt = { class: "max-w-[420px] text-[14px] leading-[20px] text-fm-color-typo-secondary" }, st = {
187
+ key: 4,
188
+ class: "w-full max-w-[880px] min-w-0 flex flex-col gap-[12px]"
189
+ }, lt = { key: 5 }, gt = /* @__PURE__ */ Y({
190
+ __name: "WhatsappBotLogs",
191
+ props: {
192
+ accounts: {}
193
+ },
194
+ setup(r) {
195
+ const b = r, { t: o, locale: A } = j(), a = he(), u = g(() => we.getBusinessId() ?? ""), C = g(
196
+ () => X[a.currentCountry.value || "MY"] ?? X.MY
197
+ ), v = w([]), I = w(""), $ = w([]), m = w(), f = w([]), _ = w([]), N = w(!0), i = w(""), z = w(), E = w(!1), M = w("");
198
+ let B;
199
+ const oe = g(
200
+ () => new Intl.DateTimeFormat(A.value, {
201
+ dateStyle: "medium",
202
+ timeStyle: "short",
203
+ timeZone: C.value
204
+ })
205
+ );
206
+ function W(e) {
207
+ return e.customerName || e.phoneNumber || o("connect.whatsappBot.logs.unknownCustomer");
208
+ }
209
+ function O(e) {
210
+ var d;
211
+ const t = e.lastMessage;
212
+ return t ? (d = t.reaction) != null && d.removed ? o("connect.whatsappBot.logs.reactionRemoved") : t.text || o("connect.whatsappBot.logs.mediaMessage", { type: t.messageType }) : o("connect.whatsappBot.logs.noMessages");
213
+ }
214
+ function L(e) {
215
+ var d;
216
+ const t = (d = b.accounts.find(
217
+ (D) => D.clientId === e
218
+ )) == null ? void 0 : d.account;
219
+ return (t == null ? void 0 : t.businessName) || (t == null ? void 0 : t.name) || (t == null ? void 0 : t.phoneNumber) || o("connect.whatsappBot.logs.unknownAccount", { id: (e == null ? void 0 : e.slice(-6)) ?? "" });
220
+ }
221
+ const ae = g(
222
+ () => [
223
+ .../* @__PURE__ */ new Set([
224
+ ...b.accounts.map((e) => e.clientId),
225
+ ..._.value,
226
+ ...v.value
227
+ ])
228
+ ].map((e) => ({ clientId: e, label: L(e) }))
229
+ ), P = g(() => {
230
+ const e = I.value.trim().toLocaleLowerCase();
231
+ return ae.value.filter(
232
+ (t) => t.label.toLocaleLowerCase().includes(e)
233
+ );
234
+ }), ne = g(() => {
235
+ const e = v.value;
236
+ let t = o("connect.whatsappBot.logs.allAccounts");
237
+ return e.length === 1 ? t = L(e[0]) : e.length > 1 && (t = o("connect.whatsappBot.logs.selectedAccounts", {
238
+ count: e.length
239
+ })), o("connect.whatsappBot.logs.accountFilter", { name: t });
240
+ }), R = g(
241
+ () => Re(f.value, C.value)
242
+ ), se = g(() => [
243
+ {
244
+ id: "customer",
245
+ header: o("connect.whatsappBot.logs.customer"),
246
+ cell: ({ row: { original: e } }) => F("div", { class: "flex items-center gap-[10px] min-w-0" }, [
247
+ F(ge.FmAvatar, {
248
+ name: e.customerName || "?",
249
+ size: "sm"
250
+ }),
251
+ F("div", { class: "min-w-0" }, [
252
+ F(
253
+ "button",
254
+ {
255
+ type: "button",
256
+ class: "block max-w-full truncate text-left font-semibold focus-visible:outline-fm-color-primary",
257
+ onClick: (t) => {
258
+ t.stopPropagation(), H(e);
259
+ }
260
+ },
261
+ W(e)
262
+ ),
263
+ F(
264
+ "p",
265
+ { class: "text-[12px] text-fm-color-typo-tertiary truncate" },
266
+ e.phoneNumber || o("connect.whatsappBot.phoneUnavailable")
267
+ )
268
+ ])
269
+ ])
270
+ },
271
+ {
272
+ id: "account",
273
+ header: o("connect.whatsappBot.logs.account"),
274
+ accessorFn: (e) => L(e.clientId)
275
+ },
276
+ {
277
+ id: "lastMessage",
278
+ header: o("connect.whatsappBot.logs.lastMessage"),
279
+ cell: ({ row: e }) => F(
280
+ "p",
281
+ {
282
+ class: "truncate text-fm-color-typo-secondary",
283
+ title: O(e.original)
284
+ },
285
+ O(e.original)
286
+ ),
287
+ meta: { maxWidth: "400px" }
288
+ },
289
+ {
290
+ id: "lastActiveAt",
291
+ header: o("connect.whatsappBot.logs.lastActive"),
292
+ cell: ({ row: { original: e } }) => F("div", { class: "text-right tabular-nums" }, [
293
+ F(
294
+ "time",
295
+ { datetime: e.lastActiveAt },
296
+ oe.value.format(new Date(e.lastActiveAt))
297
+ ),
298
+ F(
299
+ "p",
300
+ { class: "text-[12px] text-fm-color-typo-tertiary" },
301
+ o("connect.whatsappBot.logs.messageCount", e.messageCount)
302
+ )
303
+ ]),
304
+ meta: { textAlign: "right" }
305
+ }
306
+ ]);
307
+ function le(e) {
308
+ v.value = v.value.includes(e) ? v.value.filter((t) => t !== e) : [...v.value, e];
309
+ }
310
+ function re(e) {
311
+ M.value = "";
312
+ const t = b.accounts.find(
313
+ (d) => d.clientId === e
314
+ );
315
+ if (!t) {
316
+ M.value = o("connect.whatsappBot.errors.accountNotFound");
317
+ return;
318
+ }
319
+ z.value = t, E.value = !0;
320
+ }
321
+ function Z() {
322
+ B == null || B.abort(), m.value = void 0, f.value = [], N.value = !1, i.value = "", M.value = "";
323
+ }
324
+ function H(e) {
325
+ m.value = e, M.value = "", V();
326
+ }
327
+ async function V() {
328
+ B == null || B.abort();
329
+ const e = new AbortController();
330
+ B = e, N.value = !0, i.value = "", f.value = [];
331
+ const t = m.value;
332
+ t || ($.value = []);
333
+ try {
334
+ if (!u.value)
335
+ throw new Error(o("connect.whatsappBot.errors.selectBusiness"));
336
+ if (t) {
337
+ const d = await Q.listConversationLogs(
338
+ u.value,
339
+ t.id,
340
+ e.signal
341
+ );
342
+ e.signal.aborted || (f.value = d);
343
+ } else {
344
+ const d = await Q.listConversations(
345
+ u.value,
346
+ v.value.length ? { clientIds: v.value.join(",") } : {},
347
+ e.signal
348
+ );
349
+ if (e.signal.aborted) return;
350
+ $.value = d, _.value = [
351
+ .../* @__PURE__ */ new Set([
352
+ ..._.value,
353
+ ...d.map((D) => D.clientId).filter((D) => D !== null)
354
+ ])
355
+ ];
356
+ }
357
+ } catch (d) {
358
+ e.signal.aborted || (i.value = d instanceof Error ? d.message : o(
359
+ t ? "connect.whatsappBot.logs.loadError" : "connect.whatsappBot.logs.conversationsLoadError"
360
+ ));
361
+ } finally {
362
+ e.signal.aborted || (N.value = !1);
363
+ }
364
+ }
365
+ return J(u, () => {
366
+ v.value = [], I.value = "", _.value = [], E.value = !1, z.value = void 0, M.value = "";
367
+ }), J(
368
+ [u, () => v.value.join(",")],
369
+ () => {
370
+ Z(), V();
371
+ },
372
+ { immediate: !0 }
373
+ ), xe(() => B == null ? void 0 : B.abort()), (e, t) => {
374
+ const d = y("FmButton"), D = y("FmAvatar"), ce = y("FmChip"), ie = y("FmSearch"), pe = y("FmMenuDivider"), U = y("FmMenuItem"), ue = y("FmMenu"), me = y("FmCircularProgress"), de = y("FmTable");
375
+ return n(), p(T, null, [
376
+ s("section", Ze, [
377
+ s("div", {
378
+ class: ee(["flex items-center gap-[12px] flex-wrap", m.value ? "max-w-[880px]" : ""])
379
+ }, [
380
+ m.value ? (n(), p(T, { key: 0 }, [
381
+ h(d, {
382
+ variant: "secondary",
383
+ icon: "chevron_left",
384
+ "aria-label": c(o)("connect.whatsappBot.logs.backToConversations"),
385
+ class: "!h-[36px] !w-[36px] !rounded-[8px] shrink-0",
386
+ onClick: Z
387
+ }, null, 8, ["aria-label"]),
388
+ h(D, {
389
+ name: m.value.customerName || "?",
390
+ size: "md"
391
+ }, null, 8, ["name"]),
392
+ s("div", He, [
393
+ s("h2", Je, l(W(m.value)), 1),
394
+ s("p", Ke, l(m.value.phoneNumber || c(o)("connect.whatsappBot.phoneUnavailable")) + " · " + l(c(o)("connect.whatsappBot.logs.via", {
395
+ name: L(m.value.clientId)
396
+ })), 1)
397
+ ])
398
+ ], 64)) : (n(), S(ue, {
399
+ key: 1,
400
+ "close-on-click": !1,
401
+ width: 280
402
+ }, {
403
+ "menu-button": K(() => [
404
+ h(ce, {
405
+ label: ne.value,
406
+ "right-icon": "keyboard_arrow_down",
407
+ class: "text-fm-color-typo-secondary cursor-pointer"
408
+ }, null, 8, ["label"])
409
+ ]),
410
+ default: K(() => [
411
+ h(ie, {
412
+ modelValue: I.value,
413
+ "onUpdate:modelValue": t[0] || (t[0] = (x) => I.value = x),
414
+ placeholder: c(o)("connect.whatsappBot.logs.searchAccounts")
415
+ }, null, 8, ["modelValue", "placeholder"]),
416
+ h(pe),
417
+ h(U, {
418
+ label: c(o)("connect.whatsappBot.logs.allAccounts"),
419
+ "model-value": !v.value.length,
420
+ "has-checkbox": "",
421
+ onClick: t[1] || (t[1] = (x) => v.value = [])
422
+ }, null, 8, ["label", "model-value"]),
423
+ s("div", Qe, [
424
+ (n(!0), p(T, null, G(P.value, (x) => (n(), S(U, {
425
+ key: x.clientId,
426
+ label: x.label,
427
+ "model-value": v.value.includes(x.clientId),
428
+ "has-checkbox": "",
429
+ onClick: (rt) => le(x.clientId)
430
+ }, null, 8, ["label", "model-value", "onClick"]))), 128)),
431
+ P.value.length ? k("", !0) : (n(), S(U, {
432
+ key: 0,
433
+ label: c(o)("connect.whatsappBot.logs.noMatchingAccounts"),
434
+ disabled: ""
435
+ }, null, 8, ["label"]))
436
+ ])
437
+ ]),
438
+ _: 1
439
+ })),
440
+ h(d, {
441
+ variant: "plain",
442
+ "prepend-icon": "refresh",
443
+ label: c(o)("connect.whatsappBot.logs.refresh"),
444
+ disabled: N.value,
445
+ class: "ml-auto",
446
+ onClick: t[2] || (t[2] = (x) => V())
447
+ }, null, 8, ["label", "disabled"])
448
+ ], 2),
449
+ M.value ? (n(), p("p", Xe, l(M.value), 1)) : k("", !0),
450
+ N.value ? (n(), p("output", qe, [
451
+ h(me),
452
+ te(" " + l(c(o)(
453
+ m.value ? "connect.whatsappBot.logs.loading" : "connect.whatsappBot.logs.conversationsLoading"
454
+ )), 1)
455
+ ])) : i.value ? (n(), p("div", et, [
456
+ s("p", tt, l(i.value), 1),
457
+ h(d, {
458
+ variant: "secondary",
459
+ "prepend-icon": "refresh",
460
+ label: c(o)("connect.whatsappBot.tryAgain"),
461
+ onClick: t[3] || (t[3] = (x) => V())
462
+ }, null, 8, ["label"])
463
+ ])) : (m.value ? !R.value.length : !$.value.length) ? (n(), p("div", ot, [
464
+ s("h2", at, l(c(o)(
465
+ m.value ? "connect.whatsappBot.logs.emptyTitle" : "connect.whatsappBot.logs.conversationsEmptyTitle"
466
+ )), 1),
467
+ s("p", nt, l(c(o)(
468
+ m.value ? "connect.whatsappBot.logs.emptyDescription" : "connect.whatsappBot.logs.conversationsEmptyDescription"
469
+ )), 1)
470
+ ])) : m.value ? (n(), p("div", st, [
471
+ (n(!0), p(T, null, G(R.value, (x) => (n(), S(Pe, {
472
+ key: x.date,
473
+ conversation: m.value,
474
+ group: x,
475
+ "account-name": L(m.value.clientId),
476
+ timezone: C.value,
477
+ "show-customer": !1,
478
+ onNotificationGroup: re
479
+ }, null, 8, ["conversation", "group", "account-name", "timezone"]))), 128))
480
+ ])) : k("", !0),
481
+ $.value.length ? ve((n(), p("div", lt, [
482
+ h(de, {
483
+ "aria-label": c(o)("connect.whatsappBot.logs.conversations"),
484
+ "row-data": $.value,
485
+ "column-defs": se.value,
486
+ "page-size": 10,
487
+ "hide-footer": $.value.length <= 10,
488
+ "shrink-at": !1,
489
+ "auto-reset-page-index": "",
490
+ "row-class-name": "cursor-pointer",
491
+ onRowClick: t[4] || (t[4] = (x) => H(x.original))
492
+ }, null, 8, ["aria-label", "row-data", "column-defs", "hide-footer"])
493
+ ], 512)), [
494
+ [fe, !m.value && !N.value && !i.value]
495
+ ]) : k("", !0)
496
+ ]),
497
+ z.value ? (n(), S(be, {
498
+ key: 0,
499
+ modelValue: E.value,
500
+ "onUpdate:modelValue": t[5] || (t[5] = (x) => E.value = x),
501
+ account: z.value
502
+ }, null, 8, ["modelValue", "account"])) : k("", !0)
503
+ ], 64);
504
+ };
505
+ }
506
+ });
507
+ export {
508
+ gt as default
509
+ };