@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
@@ -1,49 +1,49 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, createCommentVNode, computed, onMounted, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, isRef, createTextVNode, normalizeClass, watchEffect, resolveDynamicComponent, toRefs, normalizeStyle, onBeforeUnmount, createSlots } from "vue";
2
- import { _ } from "./lodash-nwnDizYo.js";
3
- import { h as axios, c as core, S as SvcConfig } from "./index-DKI8401o.js";
4
- import { z, S as S6, f as Zh } from "./app-BjdLqYQq.js";
5
- import { Z as ZodHelper } from "./zod-T4wMYjWT.js";
2
+ import { _ } from "./lodash-CeSjJptg.js";
3
+ import { h as axios, c as core, S as SvcConfig } from "./index-CeafUn1o.js";
4
+ import { z, S as S6, f as Zh } from "./app-DX7OWVY2.js";
5
+ import { Z as ZodHelper } from "./zod-DjtAaF0U.js";
6
6
  import { z as z$1 } from "./index-C_H8jFYf.js";
7
- import { e as FdoGroup, F as F_RUNNABLE_CAMPAIGN_TYPE, f as FdtoRunnableCampaign, g as FdoCreditLoyaltyReward, h as FdtoRandomReward, i as F_MISSION_TYPE, j as FdoThresholdCreditReward, k as FdtoThresholdReward, l as FdoMission } from "./index-BhTrG89b.js";
8
- import { F as FdoObjectId } from "./index-Czg-2Ni0.js";
9
- import { F as FdtoCollectibleConfig } from "./index-C5V6u2Qd.js";
10
- import { a as isRuleGroup, R as RuleBuilder, s as stripRruleDtstartExceptSchedule, i as isRuleEntry, T as TEMPLATES } from "./index-8mBfDn3M.js";
11
- import { A as APP_INBOX_BODY_LIMIT, g as FdoBroadcastUrl, h as F_PUSH_DESTINATION, t as toDelivery, i as toLegacyMessage } from "./index-BEKMTiFb.js";
12
- import { e as CHANNEL_DISPLAY_ORDER, i as isPaidChannel, f as isChannelComplete, h as setMode, j as addChannel, k as hasDraft, l as setPrimaryChannel, r as removeChannel, m as moveChannel, n as setChannelContent, o as getCampaignSummaryObject, p as normaliseBroadcastDelivery } from "./campaign-Dw_ujovr.js";
13
- import { u as useMembershipStore } from "./membership-DfarOMtO.js";
14
- import { u as useBusinessStore } from "./business-D9fgkHxb.js";
7
+ import { e as FdoGroup, F as F_RUNNABLE_CAMPAIGN_TYPE, f as FdtoRunnableCampaign, g as FdoCreditLoyaltyReward, h as FdtoRandomReward, i as F_MISSION_TYPE, j as FdoThresholdCreditReward, k as FdtoThresholdReward, l as FdoMission } from "./index-qI1yx02a.js";
8
+ import { F as FdoObjectId } from "./index-B9XVyhtC.js";
9
+ import { F as FdtoCollectibleConfig } from "./index-ClvaVYkG.js";
10
+ import { a as isRuleGroup, R as RuleBuilder, s as stripRruleDtstartExceptSchedule, i as isRuleEntry, T as TEMPLATES } from "./index-DDzi_-Lu.js";
11
+ import { A as APP_INBOX_BODY_LIMIT, g as FdoBroadcastUrl, h as F_PUSH_DESTINATION, t as toDelivery, i as toLegacyMessage } from "./index-DqZX-A6e.js";
12
+ import { e as CHANNEL_DISPLAY_ORDER, i as isPaidChannel, f as isChannelComplete, h as setMode, j as addChannel, k as hasDraft, l as setPrimaryChannel, r as removeChannel, m as moveChannel, n as setChannelContent, o as getCampaignSummaryObject, p as normaliseBroadcastDelivery } from "./campaign-BqRf2VUO.js";
13
+ import { u as useMembershipStore } from "./membership-BbeavSNs.js";
14
+ import { u as useBusinessStore } from "./business-D3U9HSu9.js";
15
15
  import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
16
16
  import { h as hooks } from "./moment-D7p2TMB-.js";
17
17
  import { f as featureVersionMapping } from "./campaign.enum-Dx-Zo68Q.js";
18
- import { _ as _sfc_main$C } from "./ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js";
19
- import { _ as _sfc_main$A, a as _sfc_main$D, b as _sfc_main$F } from "./EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js";
20
- import { _ as _sfc_main$E } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js";
21
- import { p as prompt, f as firebaseStorage } from "./plugins-DEHr0UOe.js";
18
+ import { _ as _sfc_main$C } from "./ImageInput.vue_vue_type_script_setup_true_lang-CNPeU9xm.js";
19
+ import { _ as _sfc_main$A, a as _sfc_main$D, b as _sfc_main$F } from "./EffectSheet.vue_vue_type_style_index_0_lang--Oyj3KYg.js";
20
+ import { _ as _sfc_main$E } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CS6b1cM3.js";
21
+ import { p as prompt, f as firebaseStorage } from "./plugins-BHuaMEYA.js";
22
22
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-CHgC5LLL.js";
23
- import { _ as _sfc_main$G } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js";
24
- import { a as _sfc_main$u, _ as _sfc_main$y } from "./RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js";
25
- import { u as useI18n } from "./vue-i18n-DXvyTCZf.js";
26
- import { T as TypeToTriggerOptions, _ as _sfc_main$H, b as _sfc_main$I } from "./trigger-Dipr6btC.js";
27
- import { D as DEFAULT_MESSAGE_VARIABLES, a as _sfc_main$v, g as getSmsMessageMetrics, _ as _sfc_main$w, b as _sfc_main$x } from "./MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js";
23
+ import { _ as _sfc_main$G } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-CMwZl4E6.js";
24
+ import { a as _sfc_main$u, _ as _sfc_main$y } from "./RuleGroup.vue_vue_type_script_setup_true_lang-U403emCF.js";
25
+ import { u as useI18n } from "./vue-i18n-CDSTH7g5.js";
26
+ import { T as TypeToTriggerOptions, _ as _sfc_main$H, b as _sfc_main$I } from "./trigger-COlbQlaB.js";
27
+ import { D as DEFAULT_MESSAGE_VARIABLES, a as _sfc_main$v, g as getSmsMessageMetrics, _ as _sfc_main$w, b as _sfc_main$x } from "./MessageInput.vue_vue_type_script_setup_true_lang-4N20f8Sj.js";
28
28
  import { useDialog } from "@feedmepos/ui-library";
29
29
  import { useCoreStore } from "@feedmepos/mf-common";
30
- import { c as campaignApi } from "./index-DcZiikOH.js";
31
- import { m as membershipApi } from "./index-BbVbqe4Y.js";
32
- import { a as useChannelFlag } from "./feature-flag-DVdEaChJ.js";
33
- import { m as moment } from "./index-TAoQpeLQ.js";
34
- import { c as calculateNextScheduleAt, R as RRule, S as SummarizeRrule, g as getRruleAnchorDate } from "./rule-DfqmQTVK.js";
35
- import { C as CountryTimezone } from "./timezone-_4tabIaK.js";
36
- import { _ as _sfc_main$z, a as _sfc_main$B } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js";
37
- import "./index-CQxkDpX0.js";
38
- import "./index-B0h0iYWP.js";
39
- import "./index-C-iwb2Ln.js";
40
- import "./index-BW7FoVEA.js";
30
+ import { c as campaignApi } from "./index-DxhNNZ-a.js";
31
+ import { m as membershipApi } from "./index-Bdg48Cus.js";
32
+ import { a as useChannelFlag } from "./feature-flag-BIh6MM4i.js";
33
+ import { m as moment } from "./index-BtmVXdRR.js";
34
+ import { c as calculateNextScheduleAt, R as RRule, S as SummarizeRrule, g as getRruleAnchorDate } from "./rule-BVsfOP2h.js";
35
+ import { C as CountryTimezone } from "./timezone-CUc7q5Ii.js";
36
+ import { _ as _sfc_main$z, a as _sfc_main$B } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-CkH-rNqZ.js";
37
+ import "./index-iiWxryxo.js";
38
+ import "./index-D3yYjyaj.js";
39
+ import "./index-I9lmcd2w.js";
40
+ import "./index-BGguMtc0.js";
41
41
  import { a as F_GAME_TYPE } from "./collectible.enum-Liy2wH3s.js";
42
- import { u as useLoading } from "./loading-x6IScY4K.js";
43
- import { i as initCollectibleConfig } from "./helper-as9K-piK.js";
44
- import { C as CollectionUtils } from "./collection.fn-CCOWtB-c.js";
42
+ import { u as useLoading } from "./loading-Qx5K2WL0.js";
43
+ import { i as initCollectibleConfig } from "./helper-WnxOxoRK.js";
44
+ import { C as CollectionUtils } from "./collection.fn-BcGqExuE.js";
45
45
  import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
46
- import { u as useCampaignStore } from "./campaign-eMaPX8r6.js";
46
+ import { u as useCampaignStore } from "./campaign-CKfeN2xN.js";
47
47
  import { a as cleanPF } from "./object-BYyQ0PZp.js";
48
48
  const publicClient = axios.create({ withCredentials: !1, timeout: 5e3 });
49
49
  async function getNativeApp(e) {
@@ -58,12 +58,12 @@ async function getNativeApp(e) {
58
58
  }).parse(o.data).native;
59
59
  }
60
60
  function campaignRefinement(e, r) {
61
- var i, u;
61
+ var u, m;
62
62
  if (console.log(e, r), !e) return;
63
63
  const o = e.campaign;
64
64
  if (!o) return;
65
- const m = o.event.rule;
66
- if (!m || !isRuleGroup(m)) {
65
+ const p = o.event.rule;
66
+ if (!p || !isRuleGroup(p)) {
67
67
  r.addIssue({
68
68
  code: "custom",
69
69
  path: ["campaign", "event", "rule"],
@@ -87,7 +87,7 @@ function campaignRefinement(e, r) {
87
87
  break;
88
88
  }
89
89
  case "CREDIT": {
90
- const l = (i = o.config) == null ? void 0 : i.validityOption;
90
+ const l = (u = o.config) == null ? void 0 : u.validityOption;
91
91
  (!l || ["validForDay", "validBefore"].every((a) => l[a] == null)) && r.addIssue({
92
92
  code: "custom",
93
93
  path: ["campaign", "config", "validityOption"],
@@ -107,7 +107,7 @@ function campaignRefinement(e, r) {
107
107
  i18n: "connectZodCustom:campaign.reward_threshold_range"
108
108
  }
109
109
  });
110
- }), (u = o.config) != null && u.validityOption.followFirstReceive || r.addIssue({
110
+ }), (m = o.config) != null && m.validityOption.followFirstReceive || r.addIssue({
111
111
  code: "custom",
112
112
  path: ["campaign", "config", "validityOption"],
113
113
  params: {
@@ -116,7 +116,7 @@ function campaignRefinement(e, r) {
116
116
  }));
117
117
  break;
118
118
  case "SCHEDULE": {
119
- if (!m.rules.g_schedule) {
119
+ if (!p.rules.g_schedule) {
120
120
  r.addIssue({
121
121
  code: "custom",
122
122
  path: ["campaign", "event", "rule"],
@@ -128,7 +128,7 @@ function campaignRefinement(e, r) {
128
128
  return;
129
129
  }
130
130
  const l = RuleBuilder.getRules(
131
- m.rules.g_schedule
131
+ p.rules.g_schedule
132
132
  ), n = [
133
133
  {
134
134
  property: "trigger.date",
@@ -139,9 +139,9 @@ function campaignRefinement(e, r) {
139
139
  operator: ["_isOnTime"]
140
140
  }
141
141
  ];
142
- n.length == l.length && n.every((s) => l.some((v) => {
143
- const f = RuleBuilder.simplify(v);
144
- return f.property === s.property && s.operator.includes(f.operator);
142
+ n.length == l.length && n.every((d) => l.some((g) => {
143
+ const f = RuleBuilder.simplify(g);
144
+ return f.property === d.property && d.operator.includes(f.operator);
145
145
  })) || r.addIssue({
146
146
  code: "custom",
147
147
  path: ["campaign", "event", "rule"],
@@ -166,20 +166,20 @@ function campaignRefinement(e, r) {
166
166
  function campaignTransform(e) {
167
167
  var o;
168
168
  if (e.campaign.type === "VOUCHER" && "configs" in e) {
169
- const m = e.configs;
170
- m.extras.targetLocation = e.campaign.targetLocation;
171
- const i = Math.max(
169
+ const p = e.configs;
170
+ p.extras.targetLocation = e.campaign.targetLocation;
171
+ const u = Math.max(
172
172
  e.campaign.earningOption.amount,
173
- m.options.maxUse ?? 1
173
+ p.options.maxUse ?? 1
174
174
  );
175
- e.campaign.earningOption.amount = i, m.options.maxUse = i, e.campaign.earningOption = {
175
+ e.campaign.earningOption.amount = u, p.options.maxUse = u, e.campaign.earningOption = {
176
176
  type: "FIXED",
177
177
  amount: 1
178
178
  };
179
179
  }
180
180
  if (e.campaign.type == "MISSION" && "configs" in e) {
181
- const m = e.configs;
182
- m.options.validityOption = (o = e.campaign.config) == null ? void 0 : o.validityOption;
181
+ const p = e.configs;
182
+ p.options.validityOption = (o = e.campaign.config) == null ? void 0 : o.validityOption;
183
183
  }
184
184
  const r = e.campaign.event;
185
185
  return r.type != "BILL_COMPLETED" && r.rule && isRuleGroup(r.rule) && (r.rule = RuleBuilder.removeEntry(r.rule, "g_bill"), e.campaign.event = r), r.rule && isRuleGroup(r.rule) && (r.rule = stripRruleDtstartExceptSchedule(r.rule), e.campaign.event = r), e;
@@ -282,14 +282,14 @@ function summarizeGrabDiscount(e) {
282
282
  case "order":
283
283
  return "Bill discount";
284
284
  case "items":
285
- return l.type.startsWith("bundle") ? m(l.type) : "Item discount";
285
+ return l.type.startsWith("bundle") ? p(l.type) : "Item discount";
286
286
  case "categories":
287
287
  return "Category discount";
288
288
  default:
289
289
  return "Discount";
290
290
  }
291
291
  }
292
- function m(l) {
292
+ function p(l) {
293
293
  switch (l) {
294
294
  case "bundleSameFixPrice":
295
295
  return "Bundle (same item) - Fixed price";
@@ -307,7 +307,7 @@ function summarizeGrabDiscount(e) {
307
307
  return "Bundle discount";
308
308
  }
309
309
  }
310
- function i(l) {
310
+ function u(l) {
311
311
  switch (l.type) {
312
312
  case "percentage":
313
313
  case "bundleSamePercentage":
@@ -328,13 +328,13 @@ function summarizeGrabDiscount(e) {
328
328
  return `${r}${l.value} discount`;
329
329
  }
330
330
  }
331
- function u(l) {
331
+ function m(l) {
332
332
  return l.cap && l.cap > 0 ? `capped at ${r}${l.cap}` : null;
333
333
  }
334
334
  return {
335
335
  type: o(e),
336
- adjustment: i(e),
337
- cap: u(e)
336
+ adjustment: u(e),
337
+ cap: m(e)
338
338
  };
339
339
  }
340
340
  const _hoisted_1$r = {
@@ -349,34 +349,34 @@ const _hoisted_1$r = {
349
349
  },
350
350
  emits: ["confirm", "cancel"],
351
351
  setup(e, { emit: r }) {
352
- const o = e, m = r, i = ref();
352
+ const o = e, p = r, u = ref();
353
353
  watch(
354
354
  () => o.visible,
355
355
  (a) => {
356
- var s, v;
357
- !a && i.value && ((v = (s = i.value).setSelectedItems) == null || v.call(s, o.initialValue || []));
356
+ var d, g;
357
+ !a && u.value && ((g = (d = u.value).setSelectedItems) == null || g.call(d, o.initialValue || []));
358
358
  }
359
359
  );
360
- function u() {
360
+ function m() {
361
361
  var a;
362
- (a = i.value) == null || a.onConfirm();
362
+ (a = u.value) == null || a.onConfirm();
363
363
  }
364
364
  function l() {
365
- m("cancel");
365
+ p("cancel");
366
366
  }
367
367
  function n(a) {
368
- m("confirm", a);
368
+ p("confirm", a);
369
369
  }
370
- return (a, s) => {
371
- const v = resolveComponent("FmIcon"), f = resolveComponent("FmButton");
370
+ return (a, d) => {
371
+ const g = resolveComponent("FmIcon"), f = resolveComponent("FmButton");
372
372
  return e.visible ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
373
373
  createElementVNode("div", _hoisted_2$n, [
374
374
  createElementVNode("div", _hoisted_3$k, [
375
- createVNode(v, {
375
+ createVNode(g, {
376
376
  name: "restaurant",
377
377
  size: "md"
378
378
  }),
379
- s[0] || (s[0] = createElementVNode("h3", { class: "fm-typo-en-body-lg-600" }, "Select Items", -1))
379
+ d[0] || (d[0] = createElementVNode("h3", { class: "fm-typo-en-body-lg-600" }, "Select Items", -1))
380
380
  ]),
381
381
  createVNode(f, {
382
382
  icon: "close",
@@ -384,11 +384,11 @@ const _hoisted_1$r = {
384
384
  onClick: l
385
385
  })
386
386
  ]),
387
- s[1] || (s[1] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which items this discount applies to. For bundle discounts, select multiple items that can be bundled together. ", -1)),
387
+ d[1] || (d[1] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which items this discount applies to. For bundle discounts, select multiple items that can be bundled together. ", -1)),
388
388
  createElementVNode("div", _hoisted_4$j, [
389
389
  createVNode(unref(S6), {
390
390
  ref_key: "selectItemRef",
391
- ref: i,
391
+ ref: u,
392
392
  "initial-value": e.initialValue,
393
393
  "filter-items": e.filterItems,
394
394
  "on-complete": n,
@@ -404,7 +404,7 @@ const _hoisted_1$r = {
404
404
  createVNode(f, {
405
405
  variant: "primary",
406
406
  label: "Confirm Selection",
407
- onClick: u
407
+ onClick: m
408
408
  })
409
409
  ])
410
410
  ])) : createCommentVNode("", !0);
@@ -424,56 +424,56 @@ const _hoisted_1$r = {
424
424
  },
425
425
  emits: ["confirm", "cancel"],
426
426
  setup(e, { emit: r }) {
427
- const o = e, m = r, i = Zh(), u = ref({}), l = ref(""), n = computed(() => {
428
- const d = i.menu.value;
429
- return d ? d.modules.category.map((p) => ({
430
- id: p._id,
431
- name: p.name
427
+ const o = e, p = r, u = Zh(), m = ref({}), l = ref(""), n = computed(() => {
428
+ const s = u.menu.value;
429
+ return s ? s.modules.category.map((i) => ({
430
+ id: i._id,
431
+ name: i.name
432
432
  })) : [];
433
433
  }), a = computed(() => {
434
434
  if (!l.value) return n.value;
435
- const d = l.value.toLowerCase();
435
+ const s = l.value.toLowerCase();
436
436
  return n.value.filter(
437
- (p) => p.name.toLowerCase().includes(d)
437
+ (i) => i.name.toLowerCase().includes(s)
438
438
  );
439
- }), s = computed(() => Object.values(u.value).filter(Boolean).length);
440
- function v() {
441
- u.value = n.value.reduce(
442
- (d, p) => (d[p.id] = o.initialValue.includes(p.id), d),
439
+ }), d = computed(() => Object.values(m.value).filter(Boolean).length);
440
+ function g() {
441
+ m.value = n.value.reduce(
442
+ (s, i) => (s[i.id] = o.initialValue.includes(i.id), s),
443
443
  {}
444
444
  );
445
445
  }
446
446
  watch([() => o.visible, () => o.initialValue], () => {
447
- o.visible && v();
447
+ o.visible && g();
448
448
  }), onMounted(async () => {
449
- await i.store.getMenu(), v();
449
+ await u.store.getMenu(), g();
450
450
  });
451
- function f(d) {
452
- u.value[d] = !u.value[d];
451
+ function f(s) {
452
+ m.value[s] = !m.value[s];
453
453
  }
454
454
  function c() {
455
- const d = s.value === a.value.length;
456
- a.value.forEach((p) => {
457
- u.value[p.id] = !d;
455
+ const s = d.value === a.value.length;
456
+ a.value.forEach((i) => {
457
+ m.value[i.id] = !s;
458
458
  });
459
459
  }
460
- function k() {
461
- Object.keys(u.value).forEach((d) => {
462
- u.value[d] = !1;
460
+ function b() {
461
+ Object.keys(m.value).forEach((s) => {
462
+ m.value[s] = !1;
463
463
  });
464
464
  }
465
465
  function x() {
466
- const d = Object.entries(u.value).filter(([, p]) => p).map(([p]) => p);
467
- m("confirm", d);
466
+ const s = Object.entries(m.value).filter(([, i]) => i).map(([i]) => i);
467
+ p("confirm", s);
468
468
  }
469
- function h() {
470
- m("cancel");
469
+ function k() {
470
+ p("cancel");
471
471
  }
472
- const g = computed(() => a.value.length > 0 && a.value.every(
473
- (d) => u.value[d.id]
472
+ const v = computed(() => a.value.length > 0 && a.value.every(
473
+ (s) => m.value[s.id]
474
474
  ));
475
- return (d, p) => {
476
- const C = resolveComponent("FmIcon"), V = resolveComponent("FmButton"), N = resolveComponent("FmTextField"), R = resolveComponent("FmCheckbox"), E = resolveComponent("FmListItem"), D = resolveComponent("FmList");
475
+ return (s, i) => {
476
+ const C = resolveComponent("FmIcon"), V = resolveComponent("FmButton"), $ = resolveComponent("FmTextField"), S = resolveComponent("FmCheckbox"), w = resolveComponent("FmListItem"), R = resolveComponent("FmList");
477
477
  return e.visible ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
478
478
  createElementVNode("div", _hoisted_2$m, [
479
479
  createElementVNode("div", _hoisted_3$j, [
@@ -481,22 +481,22 @@ const _hoisted_1$r = {
481
481
  name: "category",
482
482
  size: "md"
483
483
  }),
484
- p[2] || (p[2] = createElementVNode("h3", { class: "fm-typo-en-body-lg-600" }, "Select Categories", -1))
484
+ i[2] || (i[2] = createElementVNode("h3", { class: "fm-typo-en-body-lg-600" }, "Select Categories", -1))
485
485
  ]),
486
486
  createVNode(V, {
487
487
  icon: "close",
488
488
  variant: "tertiary",
489
- onClick: h
489
+ onClick: k
490
490
  })
491
491
  ]),
492
- p[3] || (p[3] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which categories this discount applies to. The discount will be available for all items within the selected categories. ", -1)),
492
+ i[3] || (i[3] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which categories this discount applies to. The discount will be available for all items within the selected categories. ", -1)),
493
493
  createElementVNode("div", _hoisted_4$i, [
494
494
  createElementVNode("div", _hoisted_5$f, [
495
495
  createVNode(V, {
496
496
  icon: "select_all",
497
497
  variant: "tertiary",
498
498
  size: "small",
499
- label: `${g.value ? "Deselect" : "Select"} All`,
499
+ label: `${v.value ? "Deselect" : "Select"} All`,
500
500
  onClick: c
501
501
  }, null, 8, ["label"]),
502
502
  createVNode(V, {
@@ -504,32 +504,32 @@ const _hoisted_1$r = {
504
504
  variant: "tertiary",
505
505
  size: "small",
506
506
  label: "Clear",
507
- onClick: k
507
+ onClick: b
508
508
  }),
509
- createElementVNode("span", _hoisted_6$b, toDisplayString(s.value) + " selected ", 1)
509
+ createElementVNode("span", _hoisted_6$b, toDisplayString(d.value) + " selected ", 1)
510
510
  ]),
511
- createVNode(N, {
511
+ createVNode($, {
512
512
  modelValue: l.value,
513
- "onUpdate:modelValue": p[0] || (p[0] = (w) => l.value = w),
513
+ "onUpdate:modelValue": i[0] || (i[0] = (F) => l.value = F),
514
514
  placeholder: "Search categories",
515
515
  "leading-icon": { name: "search", color: "" },
516
516
  class: "flex-1 min-w-[200px]"
517
517
  }, null, 8, ["modelValue"])
518
518
  ]),
519
519
  createElementVNode("div", _hoisted_7$a, [
520
- a.value.length > 0 ? (openBlock(), createBlock(D, { key: 0 }, {
520
+ a.value.length > 0 ? (openBlock(), createBlock(R, { key: 0 }, {
521
521
  default: withCtx(() => [
522
- (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (w) => (openBlock(), createBlock(E, {
523
- key: w.id,
522
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (F) => (openBlock(), createBlock(w, {
523
+ key: F.id,
524
524
  clickable: !0,
525
- onClick: (A) => f(w.id)
525
+ onClick: (M) => f(F.id)
526
526
  }, {
527
527
  leading: withCtx(() => [
528
- createVNode(R, {
529
- "model-value": u.value[w.id] || !1,
530
- value: w.id,
531
- "onUpdate:modelValue": (A) => f(w.id),
532
- onClick: p[1] || (p[1] = withModifiers(() => {
528
+ createVNode(S, {
529
+ "model-value": m.value[F.id] || !1,
530
+ value: F.id,
531
+ "onUpdate:modelValue": (M) => f(F.id),
532
+ onClick: i[1] || (i[1] = withModifiers(() => {
533
533
  }, ["stop"]))
534
534
  }, null, 8, ["model-value", "value", "onUpdate:modelValue"])
535
535
  ]),
@@ -541,8 +541,8 @@ const _hoisted_1$r = {
541
541
  class: "text-fm-color-typo-secondary"
542
542
  }),
543
543
  createElementVNode("div", null, [
544
- createElementVNode("div", _hoisted_9$9, toDisplayString(w.name), 1),
545
- createElementVNode("div", _hoisted_10$8, " ID: " + toDisplayString(w.id), 1)
544
+ createElementVNode("div", _hoisted_9$9, toDisplayString(F.name), 1),
545
+ createElementVNode("div", _hoisted_10$8, " ID: " + toDisplayString(F.id), 1)
546
546
  ])
547
547
  ])
548
548
  ]),
@@ -558,12 +558,12 @@ const _hoisted_1$r = {
558
558
  createVNode(V, {
559
559
  variant: "secondary",
560
560
  label: "Cancel",
561
- onClick: h
561
+ onClick: k
562
562
  }),
563
563
  createVNode(V, {
564
564
  variant: "primary",
565
- label: `Confirm Selection (${s.value})`,
566
- disabled: s.value === 0,
565
+ label: `Confirm Selection (${d.value})`,
566
+ disabled: d.value === 0,
567
567
  onClick: x
568
568
  }, null, 8, ["label", "disabled"])
569
569
  ])
@@ -583,7 +583,7 @@ const _hoisted_1$r = {
583
583
  },
584
584
  emits: ["update:model-value"],
585
585
  setup(e, { emit: r }) {
586
- const o = e, m = r, i = Zh(), u = ref(!1), l = ref(!1), n = ref(!1), a = ref({
586
+ const o = e, p = r, u = Zh(), m = ref(!1), l = ref(!1), n = ref(!1), a = ref({
587
587
  type: "net",
588
588
  value: 0,
589
589
  scope: {
@@ -592,71 +592,71 @@ const _hoisted_1$r = {
592
592
  });
593
593
  watch(
594
594
  () => o.modelValue,
595
- (b) => {
596
- b && (a.value = { ...b });
595
+ (h) => {
596
+ h && (a.value = { ...h });
597
597
  },
598
598
  { immediate: !0 }
599
599
  ), onMounted(async () => {
600
- await i.store.getMenu();
600
+ await u.store.getMenu();
601
601
  });
602
- const s = computed(() => {
603
- var b;
604
- return !(!a.value.type || !((b = a.value.scope) != null && b.type) || c(a.value.type) && (!a.value.value || a.value.value <= 0) || (a.value.scope.type === "items" || a.value.scope.type === "category") && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0));
602
+ const d = computed(() => {
603
+ var h;
604
+ return !(!a.value.type || !((h = a.value.scope) != null && h.type) || c(a.value.type) && (!a.value.value || a.value.value <= 0) || (a.value.scope.type === "items" || a.value.scope.type === "category") && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0));
605
605
  });
606
- async function v(b) {
607
- b.stopPropagation(), await prompt.remove("Are you sure you want to remove this discount?") && m("update:model-value", null);
606
+ async function g(h) {
607
+ h.stopPropagation(), await prompt.remove("Are you sure you want to remove this discount?") && p("update:model-value", null);
608
608
  }
609
609
  function f() {
610
- var b;
611
- return C(((b = a.value.scope) == null ? void 0 : b.type) || "order");
610
+ var h;
611
+ return C(((h = a.value.scope) == null ? void 0 : h.type) || "order");
612
612
  }
613
- function c(b) {
614
- return b && !["freeItem", "delivery"].includes(b);
613
+ function c(h) {
614
+ return h && !["freeItem", "delivery"].includes(h);
615
615
  }
616
- function k(b) {
617
- return b && ["percentage", "bundleSamePercentage", "bundleDiffPercentage"].includes(
618
- b
616
+ function b(h) {
617
+ return h && ["percentage", "bundleSamePercentage", "bundleDiffPercentage"].includes(
618
+ h
619
619
  );
620
620
  }
621
- function x(b) {
622
- return b != null && b.includes("Percentage") ? "Discount percentage" : b != null && b.includes("FixPrice") ? "Bundle fixed price" : b === "percentage" ? "Discount percentage" : "Discount amount";
621
+ function x(h) {
622
+ return h != null && h.includes("Percentage") ? "Discount percentage" : h != null && h.includes("FixPrice") ? "Bundle fixed price" : h === "percentage" ? "Discount percentage" : "Discount amount";
623
623
  }
624
- function h(b) {
625
- return b != null && b.includes("Percentage") || b === "percentage" ? "10" : "5.00";
624
+ function k(h) {
625
+ return h != null && h.includes("Percentage") || h === "percentage" ? "10" : "5.00";
626
626
  }
627
- function g(b) {
628
- return b != null && b.includes("Percentage") || b === "percentage" ? "%" : "$";
627
+ function v(h) {
628
+ return h != null && h.includes("Percentage") || h === "percentage" ? "%" : "$";
629
629
  }
630
- function d(b, B) {
630
+ function s(h, B) {
631
631
  a.value = {
632
632
  ...a.value,
633
- [b]: B
633
+ [h]: B
634
634
  };
635
635
  }
636
- function p(b, B) {
637
- var O;
638
- const T = {
636
+ function i(h, B) {
637
+ var A;
638
+ const D = {
639
639
  ...a.value.scope,
640
- [b]: B
640
+ [h]: B
641
641
  };
642
642
  if (a.value = {
643
643
  ...a.value,
644
- scope: T
645
- }, b === "type") {
646
- const P = C(B);
647
- P.some(
644
+ scope: D
645
+ }, h === "type") {
646
+ const O = C(B);
647
+ O.some(
648
648
  (j) => j.value === a.value.type
649
649
  ) || (a.value = {
650
650
  ...a.value,
651
- type: ((O = P[0]) == null ? void 0 : O.value) || "net",
651
+ type: ((A = O[0]) == null ? void 0 : A.value) || "net",
652
652
  // Reset value and cap when changing to incompatible type
653
653
  value: 0,
654
654
  cap: void 0
655
655
  });
656
656
  }
657
657
  }
658
- function C(b) {
659
- switch (b) {
658
+ function C(h) {
659
+ switch (h) {
660
660
  case "order":
661
661
  return [
662
662
  { label: "Amount off", value: "net" },
@@ -702,8 +702,8 @@ const _hoisted_1$r = {
702
702
  ];
703
703
  }
704
704
  }
705
- function V(b) {
706
- switch (b) {
705
+ function V(h) {
706
+ switch (h) {
707
707
  case "order":
708
708
  return "Applies to entire order. Available: Amount off, Percentage off, Delivery fee discount.";
709
709
  case "category":
@@ -714,47 +714,47 @@ const _hoisted_1$r = {
714
714
  return "Select how you want to apply the discount.";
715
715
  }
716
716
  }
717
- function N() {
718
- var b;
719
- return ((b = a.value.scope) == null ? void 0 : b.type) === "items";
717
+ function $() {
718
+ var h;
719
+ return ((h = a.value.scope) == null ? void 0 : h.type) === "items";
720
720
  }
721
- function R() {
722
- var b;
723
- return ((b = a.value.scope) == null ? void 0 : b.type) === "category";
721
+ function S() {
722
+ var h;
723
+ return ((h = a.value.scope) == null ? void 0 : h.type) === "category";
724
724
  }
725
- function E() {
726
- var T;
727
- const b = (T = a.value.scope) == null ? void 0 : T.objectIDs;
728
- if (!b || b.length === 0)
725
+ function w() {
726
+ var D;
727
+ const h = (D = a.value.scope) == null ? void 0 : D.objectIDs;
728
+ if (!h || h.length === 0)
729
729
  return "No items selected";
730
- const B = i.menu.value;
731
- return B && b.length <= 3 ? b.map((P) => {
732
- const U = B.modules.item.find((j) => j._id === P);
733
- return U ? (U.name2 || U.name).trim() : `Item ${P}`;
734
- }).join(", ") : b.length === 1 ? "1 item selected" : `${b.length} items selected`;
730
+ const B = u.menu.value;
731
+ return B && h.length <= 3 ? h.map((O) => {
732
+ const P = B.modules.item.find((j) => j._id === O);
733
+ return P ? (P.name2 || P.name).trim() : `Item ${O}`;
734
+ }).join(", ") : h.length === 1 ? "1 item selected" : `${h.length} items selected`;
735
735
  }
736
- function D() {
737
- var T;
738
- const b = (T = a.value.scope) == null ? void 0 : T.objectIDs;
739
- if (!b || b.length === 0)
736
+ function R() {
737
+ var D;
738
+ const h = (D = a.value.scope) == null ? void 0 : D.objectIDs;
739
+ if (!h || h.length === 0)
740
740
  return "No categories selected";
741
- const B = i.menu.value;
742
- return B && b.length <= 3 ? b.map((P) => {
743
- const U = B.modules.category.find((j) => j._id === P);
744
- return U ? U.name : `Category ${P}`;
745
- }).join(", ") : b.length === 1 ? "1 category selected" : `${b.length} categories selected`;
741
+ const B = u.menu.value;
742
+ return B && h.length <= 3 ? h.map((O) => {
743
+ const P = B.modules.category.find((j) => j._id === O);
744
+ return P ? P.name : `Category ${O}`;
745
+ }).join(", ") : h.length === 1 ? "1 category selected" : `${h.length} categories selected`;
746
746
  }
747
- function w() {
747
+ function F() {
748
748
  l.value = !0;
749
749
  }
750
- function A() {
750
+ function M() {
751
751
  n.value = !0;
752
752
  }
753
- function H(b) {
754
- p("objectIDs", b), l.value = !1;
753
+ function H(h) {
754
+ i("objectIDs", h), l.value = !1;
755
755
  }
756
- function I(b) {
757
- p("objectIDs", b), n.value = !1;
756
+ function I(h) {
757
+ i("objectIDs", h), n.value = !1;
758
758
  }
759
759
  function X() {
760
760
  l.value = !1;
@@ -763,49 +763,49 @@ const _hoisted_1$r = {
763
763
  n.value = !1;
764
764
  }
765
765
  const Z = computed(() => {
766
- var B, T, O;
767
- const b = [];
768
- return a.value.type || b.push("Discount type is required"), (B = a.value.scope) != null && B.type || b.push("Scope type is required"), c(a.value.type) && (!a.value.value || a.value.value <= 0) && b.push("Discount amount must be greater than 0"), ((T = a.value.scope) == null ? void 0 : T.type) === "items" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one item"), ((O = a.value.scope) == null ? void 0 : O.type) === "category" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one category"), b;
766
+ var B, D, A;
767
+ const h = [];
768
+ return a.value.type || h.push("Discount type is required"), (B = a.value.scope) != null && B.type || h.push("Scope type is required"), c(a.value.type) && (!a.value.value || a.value.value <= 0) && h.push("Discount amount must be greater than 0"), ((D = a.value.scope) == null ? void 0 : D.type) === "items" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && h.push("Please select at least one item"), ((A = a.value.scope) == null ? void 0 : A.type) === "category" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && h.push("Please select at least one category"), h;
769
769
  });
770
770
  function J() {
771
- m("update:model-value", a.value), u.value = !1;
771
+ p("update:model-value", a.value), m.value = !1;
772
772
  }
773
773
  const W = [
774
774
  { label: "Bill discount", value: "order" },
775
775
  { label: "Item discount", value: "items" },
776
776
  { label: "Category discount", value: "category" }
777
777
  ];
778
- return (b, B) => {
779
- const T = resolveComponent("FmButton"), O = resolveComponent("FmSelect"), P = resolveComponent("FmStepperField"), U = resolveComponent("FmIcon"), j = resolveComponent("FmSideSheet");
778
+ return (h, B) => {
779
+ const D = resolveComponent("FmButton"), A = resolveComponent("FmSelect"), O = resolveComponent("FmStepperField"), P = resolveComponent("FmIcon"), j = resolveComponent("FmSideSheet");
780
780
  return openBlock(), createBlock(j, {
781
781
  "max-width": 550,
782
782
  header: "Apply discount",
783
- modelValue: unref(u),
783
+ modelValue: unref(m),
784
784
  "onUpdate:modelValue": [
785
- B[5] || (B[5] = (L) => isRef(u) ? u.value = L : null),
786
- B[6] || (B[6] = (L) => u.value = L)
785
+ B[5] || (B[5] = (U) => isRef(m) ? m.value = U : null),
786
+ B[6] || (B[6] = (U) => m.value = U)
787
787
  ]
788
788
  }, {
789
789
  "side-sheet-button": withCtx(() => {
790
- var L, G, Y, q;
790
+ var U, G, Y, q;
791
791
  return [
792
792
  createElementVNode("div", _hoisted_1$p, [
793
793
  B[7] || (B[7] = createElementVNode("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the Grab campaign discount you want to offer your customers. ", -1)),
794
794
  e.modelValue ? (openBlock(), createElementBlock("div", _hoisted_2$l, [
795
795
  createElementVNode("div", _hoisted_3$i, [
796
- createElementVNode("div", null, toDisplayString((L = unref(summarizeGrabDiscount)(e.modelValue)) == null ? void 0 : L.type), 1),
796
+ createElementVNode("div", null, toDisplayString((U = unref(summarizeGrabDiscount)(e.modelValue)) == null ? void 0 : U.type), 1),
797
797
  createElementVNode("div", _hoisted_4$h, [
798
798
  createTextVNode(toDisplayString((G = unref(summarizeGrabDiscount)(e.modelValue)) == null ? void 0 : G.adjustment) + " ", 1),
799
799
  (Y = unref(summarizeGrabDiscount)(e.modelValue)) != null && Y.cap ? (openBlock(), createElementBlock("span", _hoisted_5$e, toDisplayString((q = unref(summarizeGrabDiscount)(e.modelValue)) == null ? void 0 : q.cap), 1)) : createCommentVNode("", !0)
800
800
  ])
801
801
  ]),
802
- createVNode(T, {
802
+ createVNode(D, {
803
803
  icon: "delete",
804
804
  "icon-color": "neutral-gray-400",
805
805
  variant: "tertiary",
806
- onClick: v
806
+ onClick: g
807
807
  })
808
- ])) : (openBlock(), createBlock(T, {
808
+ ])) : (openBlock(), createBlock(D, {
809
809
  key: 0,
810
810
  label: "Apply Grab discount",
811
811
  icon: "add",
@@ -818,30 +818,30 @@ const _hoisted_1$r = {
818
818
  }),
819
819
  "side-sheet-footer": withCtx(() => [
820
820
  createElementVNode("div", _hoisted_26$1, [
821
- createVNode(T, {
821
+ createVNode(D, {
822
822
  variant: "secondary",
823
823
  label: "Cancel",
824
824
  class: "flex-1",
825
- onClick: B[4] || (B[4] = (L) => u.value = !1)
825
+ onClick: B[4] || (B[4] = (U) => m.value = !1)
826
826
  }),
827
- createVNode(T, {
827
+ createVNode(D, {
828
828
  variant: "primary",
829
- label: unref(s) ? "Confirm" : "Complete Required Fields",
829
+ label: unref(d) ? "Confirm" : "Complete Required Fields",
830
830
  class: "flex-1",
831
- disabled: !unref(s),
831
+ disabled: !unref(d),
832
832
  onClick: J
833
833
  }, null, 8, ["label", "disabled"])
834
834
  ])
835
835
  ]),
836
836
  default: withCtx(() => {
837
- var L, G, Y, q;
837
+ var U, G, Y, q;
838
838
  return [
839
839
  createElementVNode("div", _hoisted_6$a, [
840
840
  createElementVNode("div", null, [
841
841
  B[8] || (B[8] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Campaign type", -1)),
842
- createVNode(O, {
843
- "model-value": ((L = unref(a).scope) == null ? void 0 : L.type) || "order",
844
- "onUpdate:modelValue": B[0] || (B[0] = (y) => p("type", y)),
842
+ createVNode(A, {
843
+ "model-value": ((U = unref(a).scope) == null ? void 0 : U.type) || "order",
844
+ "onUpdate:modelValue": B[0] || (B[0] = (y) => i("type", y)),
845
845
  placeholder: "Select campaign type",
846
846
  items: W
847
847
  }, null, 8, ["model-value"]),
@@ -849,49 +849,49 @@ const _hoisted_1$r = {
849
849
  ]),
850
850
  createElementVNode("div", null, [
851
851
  B[9] || (B[9] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Discount type", -1)),
852
- createVNode(O, {
852
+ createVNode(A, {
853
853
  "model-value": unref(a).type,
854
- "onUpdate:modelValue": B[1] || (B[1] = (y) => d("type", y)),
854
+ "onUpdate:modelValue": B[1] || (B[1] = (y) => s("type", y)),
855
855
  placeholder: "Select discount type",
856
856
  items: f()
857
857
  }, null, 8, ["model-value", "items"])
858
858
  ]),
859
859
  c(unref(a).type) ? (openBlock(), createElementBlock("div", _hoisted_8$8, [
860
860
  createElementVNode("label", _hoisted_9$8, toDisplayString(x(unref(a).type)), 1),
861
- createVNode(P, {
861
+ createVNode(O, {
862
862
  modelValue: unref(a).value,
863
863
  "onUpdate:modelValue": B[2] || (B[2] = (y) => unref(a).value = y),
864
- placeholder: h(unref(a).type),
865
- suffix: g(unref(a).type),
864
+ placeholder: k(unref(a).type),
865
+ suffix: v(unref(a).type),
866
866
  type: "number"
867
867
  }, null, 8, ["modelValue", "placeholder", "suffix"])
868
868
  ])) : createCommentVNode("", !0),
869
- k(unref(a).type) ? (openBlock(), createElementBlock("div", _hoisted_10$7, [
869
+ b(unref(a).type) ? (openBlock(), createElementBlock("div", _hoisted_10$7, [
870
870
  B[10] || (B[10] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Discount cap (optional)", -1)),
871
- createVNode(P, {
871
+ createVNode(O, {
872
872
  modelValue: unref(a).cap,
873
873
  "onUpdate:modelValue": B[3] || (B[3] = (y) => unref(a).cap = y),
874
874
  placeholder: "Maximum discount amount",
875
875
  type: "number"
876
876
  }, null, 8, ["modelValue"])
877
877
  ])) : createCommentVNode("", !0),
878
- N() ? (openBlock(), createElementBlock("div", _hoisted_11$5, [
878
+ $() ? (openBlock(), createElementBlock("div", _hoisted_11$5, [
879
879
  unref(l) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_12$4, [
880
880
  B[12] || (B[12] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Select Items", -1)),
881
881
  createElementVNode("div", _hoisted_13$4, [
882
882
  createElementVNode("div", _hoisted_14$4, [
883
883
  createElementVNode("div", _hoisted_15$3, [
884
- createVNode(U, {
884
+ createVNode(P, {
885
885
  name: "restaurant",
886
886
  size: "md"
887
887
  }),
888
- createElementVNode("span", _hoisted_16$2, toDisplayString(E()), 1)
888
+ createElementVNode("span", _hoisted_16$2, toDisplayString(w()), 1)
889
889
  ]),
890
- createVNode(T, {
890
+ createVNode(D, {
891
891
  variant: "secondary",
892
892
  label: "Select Items",
893
893
  icon: "chevron_right",
894
- onClick: w
894
+ onClick: F
895
895
  })
896
896
  ]),
897
897
  B[11] || (B[11] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which items this discount applies to. Bundle discounts require multiple items. ", -1))
@@ -904,23 +904,23 @@ const _hoisted_1$r = {
904
904
  onCancel: X
905
905
  }, null, 8, ["visible", "initial-value"])
906
906
  ])) : createCommentVNode("", !0),
907
- R() ? (openBlock(), createElementBlock("div", _hoisted_17$2, [
907
+ S() ? (openBlock(), createElementBlock("div", _hoisted_17$2, [
908
908
  unref(n) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_18$2, [
909
909
  B[14] || (B[14] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Select Categories", -1)),
910
910
  createElementVNode("div", _hoisted_19$2, [
911
911
  createElementVNode("div", _hoisted_20$2, [
912
912
  createElementVNode("div", _hoisted_21$1, [
913
- createVNode(U, {
913
+ createVNode(P, {
914
914
  name: "category",
915
915
  size: "md"
916
916
  }),
917
- createElementVNode("span", _hoisted_22$1, toDisplayString(D()), 1)
917
+ createElementVNode("span", _hoisted_22$1, toDisplayString(R()), 1)
918
918
  ]),
919
- createVNode(T, {
919
+ createVNode(D, {
920
920
  variant: "secondary",
921
921
  label: "Select Categories",
922
922
  icon: "chevron_right",
923
- onClick: A
923
+ onClick: M
924
924
  })
925
925
  ]),
926
926
  B[13] || (B[13] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which categories this discount applies to. ", -1))
@@ -936,7 +936,7 @@ const _hoisted_1$r = {
936
936
  ]),
937
937
  unref(Z).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_23$1, [
938
938
  createElementVNode("div", _hoisted_24$1, [
939
- createVNode(U, { name: "warning" }),
939
+ createVNode(P, { name: "warning" }),
940
940
  B[15] || (B[15] = createElementVNode("span", { class: "fm-typo-en-body-sm-600" }, "Please fix the following issues:", -1))
941
941
  ]),
942
942
  createElementVNode("ul", _hoisted_25$1, [
@@ -966,43 +966,43 @@ const _hoisted_1$r = {
966
966
  },
967
967
  emits: ["update:model-value"],
968
968
  setup(e, { emit: r }) {
969
- const { t: o } = useI18n(), m = e, i = r, u = ref(
970
- !m.modelValue || !m.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(m.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
969
+ const { t: o } = useI18n(), p = e, u = r, m = ref(
970
+ !p.modelValue || !p.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(p.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
971
971
  );
972
- watch(u, async (n, a) => {
973
- var s;
974
- if (a == "custom" && n == "all_time" && RuleBuilder.getRules((s = m.modelValue) == null ? void 0 : s.rules.g_time).length > 0) {
975
- const v = await prompt.confirm(
972
+ watch(m, async (n, a) => {
973
+ var d;
974
+ if (a == "custom" && n == "all_time" && RuleBuilder.getRules((d = p.modelValue) == null ? void 0 : d.rules.g_time).length > 0) {
975
+ const g = await prompt.confirm(
976
976
  o("connect.template.rule.time.confirm_remove"),
977
977
  o("connect.common.confirm"),
978
978
  o("connect.common.confirm"),
979
979
  o("connect.common.cancel")
980
980
  );
981
- v && i(
981
+ g && u(
982
982
  "update:model-value",
983
983
  RuleBuilder.setRuleToGroup(
984
- m.modelValue ?? RuleBuilder.scaffoldGroup(),
984
+ p.modelValue ?? RuleBuilder.scaffoldGroup(),
985
985
  RuleBuilder.scaffoldGroup("g_time")
986
986
  )
987
- ), u.value = v ? n : a;
987
+ ), m.value = g ? n : a;
988
988
  }
989
989
  });
990
990
  async function l(n) {
991
991
  var a;
992
- if (n == "custom" && RuleBuilder.getRules((a = m.modelValue) == null ? void 0 : a.rules.g_time).length > 0) {
992
+ if (n == "custom" && RuleBuilder.getRules((a = p.modelValue) == null ? void 0 : a.rules.g_time).length > 0) {
993
993
  if (!await prompt.confirm(
994
994
  o("connect.template.rule.time.confirm_remove"),
995
995
  o("connect.common.confirm"),
996
996
  o("connect.common.confirm"),
997
997
  o("connect.common.cancel")
998
998
  )) {
999
- u.value = "all_time";
999
+ m.value = "all_time";
1000
1000
  return;
1001
1001
  }
1002
- i(
1002
+ u(
1003
1003
  "update:model-value",
1004
1004
  RuleBuilder.setRuleToGroup(
1005
- m.modelValue ?? RuleBuilder.scaffoldGroup(),
1005
+ p.modelValue ?? RuleBuilder.scaffoldGroup(),
1006
1006
  RuleBuilder.scaffoldGroup("g_time")
1007
1007
  )
1008
1008
  );
@@ -1010,34 +1010,34 @@ const _hoisted_1$r = {
1010
1010
  }
1011
1011
  return (n, a) => {
1012
1012
  var f;
1013
- const s = resolveComponent("FmRadio"), v = resolveComponent("FmRadioGroup");
1013
+ const d = resolveComponent("FmRadio"), g = resolveComponent("FmRadioGroup");
1014
1014
  return openBlock(), createElementBlock("div", _hoisted_1$o, [
1015
- createVNode(v, {
1016
- modelValue: unref(u),
1015
+ createVNode(g, {
1016
+ modelValue: unref(m),
1017
1017
  "onUpdate:modelValue": [
1018
- a[0] || (a[0] = (c) => isRef(u) ? u.value = c : null),
1018
+ a[0] || (a[0] = (c) => isRef(m) ? m.value = c : null),
1019
1019
  a[1] || (a[1] = (c) => l(c))
1020
1020
  ]
1021
1021
  }, {
1022
1022
  default: withCtx(() => [
1023
- createVNode(s, {
1023
+ createVNode(d, {
1024
1024
  label: unref(o)("connect.template.rule.time.all_time"),
1025
1025
  value: "all_time"
1026
1026
  }, null, 8, ["label"]),
1027
- createVNode(s, {
1027
+ createVNode(d, {
1028
1028
  label: unref(o)("connect.template.rule.time.custom"),
1029
1029
  value: "custom"
1030
1030
  }, null, 8, ["label"])
1031
1031
  ]),
1032
1032
  _: 1
1033
1033
  }, 8, ["modelValue"]),
1034
- unref(u) == "custom" ? (openBlock(), createBlock(_sfc_main$u, {
1034
+ unref(m) == "custom" ? (openBlock(), createBlock(_sfc_main$u, {
1035
1035
  key: 0,
1036
1036
  class: "!mt-[0px]",
1037
1037
  "include-only": "trigger",
1038
1038
  "trigger-type": "SCHEDULE",
1039
1039
  "model-value": ((f = e.modelValue) == null ? void 0 : f.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
1040
- "onUpdate:modelValue": a[2] || (a[2] = (c) => i(
1040
+ "onUpdate:modelValue": a[2] || (a[2] = (c) => u(
1041
1041
  "update:model-value",
1042
1042
  unref(RuleBuilder).setRuleToGroup(
1043
1043
  e.modelValue ?? unref(RuleBuilder).scaffoldGroup(),
@@ -1058,9 +1058,9 @@ const _hoisted_1$r = {
1058
1058
  },
1059
1059
  emits: ["update:model-value"],
1060
1060
  setup(e, { emit: r }) {
1061
- const { t: o } = useI18n(), m = e, i = r, u = computed(() => {
1061
+ const { t: o } = useI18n(), p = e, u = r, m = computed(() => {
1062
1062
  const { property: l, operator: n, equator: a } = RuleBuilder.simplify(
1063
- m.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
1063
+ p.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
1064
1064
  op: "before",
1065
1065
  x: 1
1066
1066
  })
@@ -1072,14 +1072,14 @@ const _hoisted_1$r = {
1072
1072
  };
1073
1073
  });
1074
1074
  return (l, n) => {
1075
- const a = resolveComponent("FmRadio"), s = resolveComponent("FmStepperField");
1075
+ const a = resolveComponent("FmRadio"), d = resolveComponent("FmStepperField");
1076
1076
  return openBlock(), createElementBlock("div", null, [
1077
1077
  createVNode(a, {
1078
1078
  label: unref(o)("connect.template.rule.birthday.on_birthday"),
1079
1079
  value: "_isRange-day",
1080
- "model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
1080
+ "model-value": `${unref(m).operator}-${unref(m).equator.unit}`,
1081
1081
  "onUpdate:modelValue": n[0] || (n[0] = () => {
1082
- i(
1082
+ u(
1083
1083
  "update:model-value",
1084
1084
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
1085
1085
  op: "this",
@@ -1092,9 +1092,9 @@ const _hoisted_1$r = {
1092
1092
  createVNode(a, {
1093
1093
  label: unref(o)("connect.template.rule.birthday.days_before"),
1094
1094
  value: "_isDay",
1095
- "model-value": unref(u).operator,
1095
+ "model-value": unref(m).operator,
1096
1096
  "onUpdate:modelValue": n[1] || (n[1] = () => {
1097
- i(
1097
+ u(
1098
1098
  "update:model-value",
1099
1099
  unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
1100
1100
  op: "after",
@@ -1104,16 +1104,16 @@ const _hoisted_1$r = {
1104
1104
  );
1105
1105
  })
1106
1106
  }, null, 8, ["label", "model-value"]),
1107
- unref(u).operator == "_isDay" ? (openBlock(), createBlock(s, {
1107
+ unref(m).operator == "_isDay" ? (openBlock(), createBlock(d, {
1108
1108
  key: 0,
1109
1109
  label: unref(o)("connect.template.rule.birthday.days_before_label"),
1110
1110
  "show-steppers": !1,
1111
- "model-value": unref(u).equator.x,
1112
- "onUpdate:modelValue": n[2] || (n[2] = (v) => i(
1111
+ "model-value": unref(m).equator.x,
1112
+ "onUpdate:modelValue": n[2] || (n[2] = (g) => u(
1113
1113
  "update:model-value",
1114
1114
  unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
1115
1115
  op: "after",
1116
- x: v,
1116
+ x: g,
1117
1117
  ignoreYear: !0
1118
1118
  })
1119
1119
  ))
@@ -1121,9 +1121,9 @@ const _hoisted_1$r = {
1121
1121
  createVNode(a, {
1122
1122
  label: unref(o)("connect.template.rule.birthday.in_birthday_week"),
1123
1123
  value: "_isRange-week",
1124
- "model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
1124
+ "model-value": `${unref(m).operator}-${unref(m).equator.unit}`,
1125
1125
  "onUpdate:modelValue": n[3] || (n[3] = () => {
1126
- i(
1126
+ u(
1127
1127
  "update:model-value",
1128
1128
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
1129
1129
  op: "this",
@@ -1136,9 +1136,9 @@ const _hoisted_1$r = {
1136
1136
  createVNode(a, {
1137
1137
  label: unref(o)("connect.template.rule.birthday.in_birthday_month"),
1138
1138
  value: "_isRange-month",
1139
- "model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
1139
+ "model-value": `${unref(m).operator}-${unref(m).equator.unit}`,
1140
1140
  "onUpdate:modelValue": n[4] || (n[4] = () => {
1141
- i(
1141
+ u(
1142
1142
  "update:model-value",
1143
1143
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
1144
1144
  op: "this",
@@ -1168,30 +1168,30 @@ const _hoisted_1$r = {
1168
1168
  },
1169
1169
  emits: ["update:model-value"],
1170
1170
  setup(e, { emit: r }) {
1171
- const { t: o } = useI18n(), m = e, i = r, u = computed(() => m.disabled ? TypeToTriggerOptions[m.campaignType].filter(
1172
- (l) => l.value == m.modelValue
1173
- ) : TypeToTriggerOptions[m.campaignType]);
1171
+ const { t: o } = useI18n(), p = e, u = r, m = computed(() => p.disabled ? TypeToTriggerOptions[p.campaignType].filter(
1172
+ (l) => l.value == p.modelValue
1173
+ ) : TypeToTriggerOptions[p.campaignType]);
1174
1174
  return (l, n) => {
1175
1175
  const a = resolveComponent("FmCard");
1176
1176
  return openBlock(), createElementBlock("div", _hoisted_1$n, [
1177
1177
  createElementVNode("div", _hoisted_2$k, toDisplayString(unref(o)("connect.campaign.trigger.description")), 1),
1178
1178
  createElementVNode("div", _hoisted_3$h, [
1179
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (s) => (openBlock(), createBlock(a, {
1179
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (d) => (openBlock(), createBlock(a, {
1180
1180
  variant: "outlined",
1181
- disabled: m.disabled,
1181
+ disabled: p.disabled,
1182
1182
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
1183
- "col-span-3": unref(u).length == 1,
1184
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == s.value,
1185
- "hover:bg-fm-color-opacity-sm": e.modelValue != s.value
1183
+ "col-span-3": unref(m).length == 1,
1184
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == d.value,
1185
+ "hover:bg-fm-color-opacity-sm": e.modelValue != d.value
1186
1186
  }]),
1187
1187
  onClick: () => {
1188
- m.modelValue != s.value && !m.disabled && i("update:model-value", s.value);
1188
+ p.modelValue != d.value && !p.disabled && u("update:model-value", d.value);
1189
1189
  },
1190
- key: s.name
1190
+ key: d.name
1191
1191
  }, {
1192
1192
  default: withCtx(() => [
1193
- createElementVNode("div", _hoisted_4$g, toDisplayString(s.name), 1),
1194
- createElementVNode("div", _hoisted_5$d, toDisplayString(s.description), 1)
1193
+ createElementVNode("div", _hoisted_4$g, toDisplayString(d.name), 1),
1194
+ createElementVNode("div", _hoisted_5$d, toDisplayString(d.description), 1)
1195
1195
  ]),
1196
1196
  _: 2
1197
1197
  }, 1032, ["disabled", "class", "onClick"]))), 128))
@@ -1214,12 +1214,12 @@ const _hoisted_1$r = {
1214
1214
  emits: ["update:model-value"],
1215
1215
  setup(e, { emit: r }) {
1216
1216
  const o = r;
1217
- return (m, i) => {
1218
- const u = resolveComponent("FmButton"), l = resolveComponent("FmField"), n = resolveComponent("FmDatePicker");
1217
+ return (p, u) => {
1218
+ const m = resolveComponent("FmButton"), l = resolveComponent("FmField"), n = resolveComponent("FmDatePicker");
1219
1219
  return openBlock(), createBlock(n, {
1220
1220
  label: e.label,
1221
1221
  "model-value": e.modelValue || "",
1222
- "onUpdate:modelValue": i[1] || (i[1] = (a) => o("update:model-value", a))
1222
+ "onUpdate:modelValue": u[1] || (u[1] = (a) => o("update:model-value", a))
1223
1223
  }, {
1224
1224
  "trigger-button": withCtx(({ opened: a }) => [
1225
1225
  createVNode(l, {
@@ -1228,11 +1228,11 @@ const _hoisted_1$r = {
1228
1228
  "icon-outlined": !a
1229
1229
  }, {
1230
1230
  append: withCtx(() => [
1231
- e.modelValue ? (openBlock(), createBlock(u, {
1231
+ e.modelValue ? (openBlock(), createBlock(m, {
1232
1232
  key: 0,
1233
1233
  variant: "tertiary",
1234
1234
  icon: "clear",
1235
- onClick: i[0] || (i[0] = (s) => (s.stopPropagation(), o("update:model-value", null)))
1235
+ onClick: u[0] || (u[0] = (d) => (d.stopPropagation(), o("update:model-value", null)))
1236
1236
  })) : createCommentVNode("", !0)
1237
1237
  ]),
1238
1238
  default: withCtx(() => [
@@ -1257,19 +1257,19 @@ const _hoisted_1$r = {
1257
1257
  },
1258
1258
  emits: ["update:model-value"],
1259
1259
  setup(e, { emit: r }) {
1260
- const { t: o } = useI18n(), m = r;
1261
- return (i, u) => {
1260
+ const { t: o } = useI18n(), p = r;
1261
+ return (u, m) => {
1262
1262
  var l, n;
1263
1263
  return openBlock(), createElementBlock("div", _hoisted_1$m, [
1264
1264
  createElementVNode("div", _hoisted_2$j, [
1265
1265
  createVNode(_sfc_main$n, {
1266
1266
  "model-value": ((l = e.modelValue) == null ? void 0 : l.startDate) ?? null,
1267
1267
  label: unref(o)("connect.common.startDate"),
1268
- "onUpdate:modelValue": u[0] || (u[0] = (a) => {
1269
- var s;
1270
- return m("update:model-value", {
1268
+ "onUpdate:modelValue": m[0] || (m[0] = (a) => {
1269
+ var d;
1270
+ return p("update:model-value", {
1271
1271
  startDate: a,
1272
- endDate: ((s = e.modelValue) == null ? void 0 : s.endDate) ?? null
1272
+ endDate: ((d = e.modelValue) == null ? void 0 : d.endDate) ?? null
1273
1273
  });
1274
1274
  })
1275
1275
  }, null, 8, ["model-value", "label"])
@@ -1279,10 +1279,10 @@ const _hoisted_1$r = {
1279
1279
  createVNode(_sfc_main$n, {
1280
1280
  "model-value": ((n = e.modelValue) == null ? void 0 : n.endDate) ?? null,
1281
1281
  label: unref(o)("connect.common.endDate"),
1282
- "onUpdate:modelValue": u[1] || (u[1] = (a) => {
1283
- var s;
1284
- return m("update:model-value", {
1285
- startDate: ((s = e.modelValue) == null ? void 0 : s.startDate) ?? null,
1282
+ "onUpdate:modelValue": m[1] || (m[1] = (a) => {
1283
+ var d;
1284
+ return p("update:model-value", {
1285
+ startDate: ((d = e.modelValue) == null ? void 0 : d.startDate) ?? null,
1286
1286
  endDate: a
1287
1287
  });
1288
1288
  })
@@ -1310,42 +1310,42 @@ const _hoisted_1$r = {
1310
1310
  },
1311
1311
  emits: ["update:model-value"],
1312
1312
  setup(e, { emit: r }) {
1313
- const { t: o } = useI18n(), m = e, i = r;
1314
- function u(k) {
1315
- i("update:model-value", { ...m.modelValue, ...k });
1313
+ const { t: o } = useI18n(), p = e, u = r;
1314
+ function m(b) {
1315
+ u("update:model-value", { ...p.modelValue, ...b });
1316
1316
  }
1317
- function l(k, x) {
1318
- return k >= x ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1317
+ function l(b, x) {
1318
+ return b >= x ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1319
1319
  }
1320
- const n = computed(() => m.modelValue.buttons ?? []), a = computed(() => {
1321
- var k;
1322
- return ((k = m.modelValue.content) == null ? void 0 : k.length) ?? 0;
1320
+ const n = computed(() => p.modelValue.buttons ?? []), a = computed(() => {
1321
+ var b;
1322
+ return ((b = p.modelValue.content) == null ? void 0 : b.length) ?? 0;
1323
1323
  });
1324
- function s(k, x) {
1325
- u({
1324
+ function d(b, x) {
1325
+ m({
1326
1326
  buttons: n.value.map(
1327
- (h, g) => g === k ? { ...h, ...x } : h
1327
+ (k, v) => v === b ? { ...k, ...x } : k
1328
1328
  )
1329
1329
  });
1330
1330
  }
1331
- function v() {
1332
- n.value.length >= MAX_BUTTONS || u({ buttons: [...n.value, { label: "", url: "" }] });
1331
+ function g() {
1332
+ n.value.length >= MAX_BUTTONS || m({ buttons: [...n.value, { label: "", url: "" }] });
1333
1333
  }
1334
- function f(k) {
1335
- var g;
1336
- if (!m.showValidation) return { label: void 0, url: void 0 };
1337
- const x = (g = k.url) == null ? void 0 : g.trim();
1338
- let h;
1339
- return x ? FdoBroadcastUrl.safeParse(x).success || (h = o("connect.campaign.push.linkUrlInvalid")) : h = o("connect.campaign.appInbox.buttonUrlRequired"), {
1340
- label: k.label.trim() ? void 0 : o("connect.campaign.appInbox.buttonLabelRequired"),
1341
- url: h
1334
+ function f(b) {
1335
+ var v;
1336
+ if (!p.showValidation) return { label: void 0, url: void 0 };
1337
+ const x = (v = b.url) == null ? void 0 : v.trim();
1338
+ let k;
1339
+ return x ? FdoBroadcastUrl.safeParse(x).success || (k = o("connect.campaign.push.linkUrlInvalid")) : k = o("connect.campaign.appInbox.buttonUrlRequired"), {
1340
+ label: b.label.trim() ? void 0 : o("connect.campaign.appInbox.buttonLabelRequired"),
1341
+ url: k
1342
1342
  };
1343
1343
  }
1344
- function c(k) {
1345
- u({ buttons: n.value.filter((x, h) => h !== k) });
1344
+ function c(b) {
1345
+ m({ buttons: n.value.filter((x, k) => k !== b) });
1346
1346
  }
1347
- return (k, x) => {
1348
- const h = resolveComponent("FmTextField"), g = resolveComponent("FmButton");
1347
+ return (b, x) => {
1348
+ const k = resolveComponent("FmTextField"), v = resolveComponent("FmButton");
1349
1349
  return openBlock(), createElementBlock("div", _hoisted_1$l, [
1350
1350
  createElementVNode("div", null, [
1351
1351
  createElementVNode("div", _hoisted_2$i, [
@@ -1354,11 +1354,11 @@ const _hoisted_1$r = {
1354
1354
  class: normalizeClass(["fm-typo-en-body-sm-400", l(e.modelValue.title.length, TITLE_WARN_AT$1)])
1355
1355
  }, toDisplayString(e.modelValue.title.length) + " / " + toDisplayString(TITLE_LIMIT$1), 3)
1356
1356
  ]),
1357
- createVNode(h, {
1357
+ createVNode(k, {
1358
1358
  "model-value": e.modelValue.title,
1359
1359
  "max-length": TITLE_LIMIT$1,
1360
1360
  placeholder: unref(o)("connect.campaign.appInbox.titlePlaceholder"),
1361
- "onUpdate:modelValue": x[0] || (x[0] = (d) => u({ title: d }))
1361
+ "onUpdate:modelValue": x[0] || (x[0] = (s) => m({ title: s }))
1362
1362
  }, null, 8, ["model-value", "placeholder"])
1363
1363
  ]),
1364
1364
  createElementVNode("div", null, [
@@ -1368,11 +1368,11 @@ const _hoisted_1$r = {
1368
1368
  class: normalizeClass(["fm-typo-en-body-sm-400", l(e.modelValue.previewText.length, PREVIEW_WARN_AT)])
1369
1369
  }, toDisplayString(e.modelValue.previewText.length) + " / " + toDisplayString(PREVIEW_LIMIT), 3)
1370
1370
  ]),
1371
- createVNode(h, {
1371
+ createVNode(k, {
1372
1372
  "model-value": e.modelValue.previewText,
1373
1373
  "max-length": PREVIEW_LIMIT,
1374
1374
  placeholder: unref(o)("connect.campaign.appInbox.previewTextPlaceholder"),
1375
- "onUpdate:modelValue": x[1] || (x[1] = (d) => u({ previewText: d }))
1375
+ "onUpdate:modelValue": x[1] || (x[1] = (s) => m({ previewText: s }))
1376
1376
  }, null, 8, ["model-value", "placeholder"])
1377
1377
  ]),
1378
1378
  createElementVNode("div", _hoisted_6$9, [
@@ -1391,7 +1391,7 @@ const _hoisted_1$r = {
1391
1391
  variables: e.variables,
1392
1392
  "media-limit": 1,
1393
1393
  "button-label": unref(o)("connect.campaign.appInbox.editBodyMessage"),
1394
- "onUpdate:html": x[2] || (x[2] = (d) => u({ content: d.html }))
1394
+ "onUpdate:html": x[2] || (x[2] = (s) => m({ content: s.html }))
1395
1395
  }, null, 8, ["html", "variables", "button-label"])
1396
1396
  ]),
1397
1397
  createElementVNode("div", _hoisted_9$7, [
@@ -1399,43 +1399,43 @@ const _hoisted_1$r = {
1399
1399
  createElementVNode("span", _hoisted_11$4, toDisplayString(unref(o)("connect.campaign.appInbox.buttons")), 1),
1400
1400
  createElementVNode("span", _hoisted_12$3, toDisplayString(unref(n).length) + " / " + toDisplayString(MAX_BUTTONS), 1)
1401
1401
  ]),
1402
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (d, p) => (openBlock(), createElementBlock("div", {
1403
- key: p,
1402
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (s, i) => (openBlock(), createElementBlock("div", {
1403
+ key: i,
1404
1404
  class: "flex flex-wrap items-start gap-8"
1405
1405
  }, [
1406
1406
  createElementVNode("div", _hoisted_13$3, [
1407
- createVNode(h, {
1408
- "model-value": d.label,
1407
+ createVNode(k, {
1408
+ "model-value": s.label,
1409
1409
  "max-length": 20,
1410
1410
  placeholder: unref(o)("connect.campaign.appInbox.buttonLabel"),
1411
- "helper-state": f(d).label ? "error" : "none",
1412
- "helper-text": f(d).label,
1413
- "onUpdate:modelValue": (C) => s(p, { label: C })
1411
+ "helper-state": f(s).label ? "error" : "none",
1412
+ "helper-text": f(s).label,
1413
+ "onUpdate:modelValue": (C) => d(i, { label: C })
1414
1414
  }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
1415
1415
  ]),
1416
1416
  createElementVNode("div", _hoisted_14$3, [
1417
- createVNode(h, {
1418
- "model-value": d.url ?? "",
1417
+ createVNode(k, {
1418
+ "model-value": s.url ?? "",
1419
1419
  inputmode: "url",
1420
1420
  placeholder: unref(o)("connect.campaign.push.linkUrlPlaceholder"),
1421
- "helper-state": f(d).url ? "error" : "none",
1422
- "helper-text": f(d).url,
1423
- "onUpdate:modelValue": (C) => s(p, { url: C.trim() })
1421
+ "helper-state": f(s).url ? "error" : "none",
1422
+ "helper-text": f(s).url,
1423
+ "onUpdate:modelValue": (C) => d(i, { url: C.trim() })
1424
1424
  }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
1425
1425
  ]),
1426
- createVNode(g, {
1426
+ createVNode(v, {
1427
1427
  icon: "delete",
1428
1428
  "icon-color": "neutral-gray-400",
1429
1429
  variant: "tertiary",
1430
- onClick: (C) => c(p)
1430
+ onClick: (C) => c(i)
1431
1431
  }, null, 8, ["onClick"])
1432
1432
  ]))), 128)),
1433
- unref(n).length < MAX_BUTTONS ? (openBlock(), createBlock(g, {
1433
+ unref(n).length < MAX_BUTTONS ? (openBlock(), createBlock(v, {
1434
1434
  key: 0,
1435
1435
  variant: "tertiary",
1436
1436
  icon: "add",
1437
1437
  label: unref(o)("connect.campaign.appInbox.addButton"),
1438
- onClick: v
1438
+ onClick: g
1439
1439
  }, null, 8, ["label"])) : createCommentVNode("", !0)
1440
1440
  ])
1441
1441
  ]);
@@ -1462,72 +1462,72 @@ const _hoisted_1$r = {
1462
1462
  },
1463
1463
  emits: ["update:model-value"],
1464
1464
  setup(e, { emit: r }) {
1465
- const { t: o } = useI18n(), m = e, i = r, u = F_PUSH_DESTINATION.options, l = computed(() => m.modelValue.destination === "EXTERNAL"), n = computed(() => {
1465
+ const { t: o } = useI18n(), p = e, u = r, m = F_PUSH_DESTINATION.options, l = computed(() => p.modelValue.destination === "EXTERNAL"), n = computed(() => {
1466
1466
  var c;
1467
- if (!m.showValidation || !l.value) return;
1468
- const f = (c = m.modelValue.url) == null ? void 0 : c.trim();
1467
+ if (!p.showValidation || !l.value) return;
1468
+ const f = (c = p.modelValue.url) == null ? void 0 : c.trim();
1469
1469
  return f ? FdoBroadcastUrl.safeParse(f).success ? void 0 : o("connect.campaign.push.linkUrlInvalid") : o("connect.campaign.push.linkUrlRequired");
1470
1470
  });
1471
1471
  function a(f) {
1472
- i("update:model-value", { ...m.modelValue, ...f });
1472
+ u("update:model-value", { ...p.modelValue, ...f });
1473
1473
  }
1474
- function s(f) {
1474
+ function d(f) {
1475
1475
  a(f === "EXTERNAL" ? { destination: f } : { destination: f, url: null });
1476
1476
  }
1477
- function v(f, c) {
1477
+ function g(f, c) {
1478
1478
  return f >= c ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1479
1479
  }
1480
1480
  return (f, c) => {
1481
- const k = resolveComponent("FmTextField"), x = resolveComponent("FmTextarea"), h = resolveComponent("FmSelect");
1481
+ const b = resolveComponent("FmTextField"), x = resolveComponent("FmTextarea"), k = resolveComponent("FmSelect");
1482
1482
  return openBlock(), createElementBlock("div", _hoisted_1$k, [
1483
1483
  createElementVNode("div", null, [
1484
1484
  createElementVNode("div", _hoisted_2$h, [
1485
1485
  createElementVNode("span", _hoisted_3$e, toDisplayString(unref(o)("connect.campaign.push.title")), 1),
1486
1486
  createElementVNode("span", {
1487
- class: normalizeClass(["fm-typo-en-body-sm-400", v(e.modelValue.title.length, TITLE_WARN_AT)])
1487
+ class: normalizeClass(["fm-typo-en-body-sm-400", g(e.modelValue.title.length, TITLE_WARN_AT)])
1488
1488
  }, toDisplayString(e.modelValue.title.length) + " / " + toDisplayString(TITLE_LIMIT), 3)
1489
1489
  ]),
1490
- createVNode(k, {
1490
+ createVNode(b, {
1491
1491
  "model-value": e.modelValue.title,
1492
1492
  "max-length": TITLE_LIMIT,
1493
1493
  placeholder: unref(o)("connect.campaign.push.titlePlaceholder"),
1494
- "onUpdate:modelValue": c[0] || (c[0] = (g) => a({ title: g }))
1494
+ "onUpdate:modelValue": c[0] || (c[0] = (v) => a({ title: v }))
1495
1495
  }, null, 8, ["model-value", "placeholder"])
1496
1496
  ]),
1497
1497
  createElementVNode("div", null, [
1498
1498
  createElementVNode("div", _hoisted_4$d, [
1499
1499
  createElementVNode("span", _hoisted_5$b, toDisplayString(unref(o)("connect.campaign.push.body")), 1),
1500
1500
  createElementVNode("span", {
1501
- class: normalizeClass(["fm-typo-en-body-sm-400", v(e.modelValue.body.length, BODY_WARN_AT)])
1501
+ class: normalizeClass(["fm-typo-en-body-sm-400", g(e.modelValue.body.length, BODY_WARN_AT)])
1502
1502
  }, toDisplayString(e.modelValue.body.length) + " / " + toDisplayString(BODY_LIMIT), 3)
1503
1503
  ]),
1504
1504
  createVNode(x, {
1505
1505
  "model-value": e.modelValue.body,
1506
1506
  "max-length": BODY_LIMIT,
1507
1507
  placeholder: unref(o)("connect.campaign.push.bodyPlaceholder"),
1508
- "onUpdate:modelValue": c[1] || (c[1] = (g) => a({ body: g }))
1508
+ "onUpdate:modelValue": c[1] || (c[1] = (v) => a({ body: v }))
1509
1509
  }, null, 8, ["model-value", "placeholder"])
1510
1510
  ]),
1511
1511
  createElementVNode("div", null, [
1512
1512
  createElementVNode("div", _hoisted_6$8, toDisplayString(unref(o)("connect.campaign.push.link")), 1),
1513
- createVNode(h, {
1513
+ createVNode(k, {
1514
1514
  "model-value": e.modelValue.destination ?? "NONE",
1515
- items: unref(u).map((g) => ({
1516
- label: unref(o)(`connect.campaign.appInbox.destination.${g}`),
1517
- value: g
1515
+ items: unref(m).map((v) => ({
1516
+ label: unref(o)(`connect.campaign.appInbox.destination.${v}`),
1517
+ value: v
1518
1518
  })),
1519
- "onUpdate:modelValue": c[2] || (c[2] = (g) => s(g))
1519
+ "onUpdate:modelValue": c[2] || (c[2] = (v) => d(v))
1520
1520
  }, null, 8, ["model-value", "items"]),
1521
1521
  unref(l) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_7$7, toDisplayString(unref(o)("connect.campaign.push.linkHelper")), 1)),
1522
1522
  unref(l) ? (openBlock(), createElementBlock("div", _hoisted_8$6, [
1523
1523
  createElementVNode("div", _hoisted_9$6, toDisplayString(unref(o)("connect.campaign.push.linkUrl")), 1),
1524
- createVNode(k, {
1524
+ createVNode(b, {
1525
1525
  "model-value": e.modelValue.url ?? "",
1526
1526
  inputmode: "url",
1527
1527
  placeholder: unref(o)("connect.campaign.push.linkUrlPlaceholder"),
1528
1528
  "helper-state": unref(n) ? "error" : "none",
1529
1529
  "helper-text": unref(n),
1530
- "onUpdate:modelValue": c[3] || (c[3] = (g) => a({ url: g.trim() || null }))
1530
+ "onUpdate:modelValue": c[3] || (c[3] = (v) => a({ url: v.trim() || null }))
1531
1531
  }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text"])
1532
1532
  ])) : createCommentVNode("", !0)
1533
1533
  ])
@@ -1547,42 +1547,42 @@ const _hoisted_1$r = {
1547
1547
  emits: ["update:model-value"],
1548
1548
  setup(e) {
1549
1549
  const { t: r } = useI18n();
1550
- return (o, m) => (openBlock(), createElementBlock("div", _hoisted_1$j, [
1551
- (openBlock(!0), createElementBlock(Fragment, null, renderList(e.tabs, (i) => (openBlock(), createElementBlock("div", {
1552
- key: i.key,
1550
+ return (o, p) => (openBlock(), createElementBlock("div", _hoisted_1$j, [
1551
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(e.tabs, (u) => (openBlock(), createElementBlock("div", {
1552
+ key: u.key,
1553
1553
  class: "flex flex-none items-center"
1554
1554
  }, [
1555
- i.connector ? (openBlock(), createElementBlock("span", _hoisted_2$g, toDisplayString(i.connector), 1)) : createCommentVNode("", !0),
1555
+ u.connector ? (openBlock(), createElementBlock("span", _hoisted_2$g, toDisplayString(u.connector), 1)) : createCommentVNode("", !0),
1556
1556
  createElementVNode("button", {
1557
1557
  type: "button",
1558
1558
  class: normalizeClass([
1559
1559
  "min-w-[132px] flex-none rounded-[10px] border px-[14px] py-[10px] text-left transition-colors",
1560
- e.modelValue === i.key ? "border-fm-color-primary bg-fm-color-system-warning-100" : "border-fm-color-neutral-gray-100 bg-fm-color-neutral-white hover:border-fm-color-neutral-gray-200"
1560
+ e.modelValue === u.key ? "border-fm-color-primary bg-fm-color-system-warning-100" : "border-fm-color-neutral-gray-100 bg-fm-color-neutral-white hover:border-fm-color-neutral-gray-200"
1561
1561
  ]),
1562
- "aria-current": e.modelValue === i.key ? "true" : void 0,
1563
- onClick: (u) => o.$emit("update:model-value", i.key)
1562
+ "aria-current": e.modelValue === u.key ? "true" : void 0,
1563
+ onClick: (m) => o.$emit("update:model-value", u.key)
1564
1564
  }, [
1565
1565
  createElementVNode("span", _hoisted_4$c, [
1566
- i.step ? (openBlock(), createElementBlock("span", {
1566
+ u.step ? (openBlock(), createElementBlock("span", {
1567
1567
  key: 0,
1568
1568
  class: normalizeClass([
1569
1569
  "flex h-[18px] w-[18px] flex-none items-center justify-center rounded-full text-[10.5px] font-semibold leading-[18px]",
1570
- e.modelValue === i.key ? "bg-fm-color-primary text-fm-color-typo-white" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
1570
+ e.modelValue === u.key ? "bg-fm-color-primary text-fm-color-typo-white" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
1571
1571
  ])
1572
- }, toDisplayString(i.step), 3)) : createCommentVNode("", !0),
1572
+ }, toDisplayString(u.step), 3)) : createCommentVNode("", !0),
1573
1573
  createElementVNode("span", {
1574
1574
  class: normalizeClass([
1575
1575
  "truncate text-[12.5px] font-semibold leading-[1.3]",
1576
- e.modelValue === i.key ? "text-fm-color-primary" : "text-fm-color-typo-primary"
1576
+ e.modelValue === u.key ? "text-fm-color-primary" : "text-fm-color-typo-primary"
1577
1577
  ])
1578
- }, toDisplayString(i.label), 3),
1579
- i.complete ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", {
1578
+ }, toDisplayString(u.label), 3),
1579
+ u.complete ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", {
1580
1580
  key: 1,
1581
1581
  class: "h-[7px] w-[7px] flex-none rounded-full bg-fm-color-system-error-400",
1582
1582
  title: unref(r)("connect.campaign.broadcast.messageMissing")
1583
1583
  }, null, 8, _hoisted_5$a))
1584
1584
  ]),
1585
- createElementVNode("span", _hoisted_6$7, toDisplayString(i.sub), 1)
1585
+ createElementVNode("span", _hoisted_6$7, toDisplayString(u.sub), 1)
1586
1586
  ], 10, _hoisted_3$d)
1587
1587
  ]))), 128))
1588
1588
  ]));
@@ -1610,36 +1610,36 @@ const _hoisted_1$r = {
1610
1610
  senderPrefix: {}
1611
1611
  },
1612
1612
  setup(e) {
1613
- const { t: r } = useI18n(), o = e, m = computed(
1613
+ const { t: r } = useI18n(), o = e, p = computed(
1614
1614
  () => o.target === "PUSH" ? o.content : void 0
1615
- ), i = computed(
1616
- () => o.target === "APP_INBOX" ? o.content : void 0
1617
1615
  ), u = computed(
1616
+ () => o.target === "APP_INBOX" ? o.content : void 0
1617
+ ), m = computed(
1618
1618
  () => o.target === "SMS" || o.target === "WHATSAPP" ? o.content : void 0
1619
1619
  ), l = computed(() => {
1620
1620
  var f, c;
1621
- const v = (c = (f = u.value) == null ? void 0 : f.content) == null ? void 0 : c.trim();
1622
- return v ? o.senderPrefix ? `${o.senderPrefix}${v}` : v : r("connect.campaign.broadcast.preview.emptyText");
1621
+ const g = (c = (f = m.value) == null ? void 0 : f.content) == null ? void 0 : c.trim();
1622
+ return g ? o.senderPrefix ? `${o.senderPrefix}${g}` : g : r("connect.campaign.broadcast.preview.emptyText");
1623
1623
  }), n = computed(() => {
1624
1624
  var f;
1625
- const v = ((f = i.value) == null ? void 0 : f.content) ?? "";
1626
- return v.trim() ? `<!doctype html><meta charset="utf-8"><base target="_blank"><style>
1625
+ const g = ((f = u.value) == null ? void 0 : f.content) ?? "";
1626
+ return g.trim() ? `<!doctype html><meta charset="utf-8"><base target="_blank"><style>
1627
1627
  html,body{margin:0;font:400 12px/1.5 Inter,system-ui,sans-serif;color:#1C1C1E;word-break:break-word}
1628
1628
  img{max-width:100%;height:auto}
1629
- </style>${v}` : "";
1629
+ </style>${g}` : "";
1630
1630
  }), a = computed(() => {
1631
- const v = /* @__PURE__ */ new Date(), f = v.toLocaleDateString(void 0, {
1631
+ const g = /* @__PURE__ */ new Date(), f = g.toLocaleDateString(void 0, {
1632
1632
  weekday: "short",
1633
1633
  day: "2-digit",
1634
1634
  month: "short"
1635
- }), c = v.toLocaleTimeString(void 0, {
1635
+ }), c = g.toLocaleTimeString(void 0, {
1636
1636
  hour: "2-digit",
1637
1637
  minute: "2-digit"
1638
1638
  });
1639
1639
  return `${f} · ${c}`;
1640
- }), s = computed(() => o.target === "PUSH" ? r("connect.campaign.broadcast.preview.note.push") : o.target === "APP_INBOX" ? r("connect.campaign.broadcast.preview.note.inbox") : r("connect.campaign.broadcast.preview.note.text"));
1641
- return (v, f) => {
1642
- var c, k, x, h, g, d, p, C, V, N, R;
1640
+ }), d = computed(() => o.target === "PUSH" ? r("connect.campaign.broadcast.preview.note.push") : o.target === "APP_INBOX" ? r("connect.campaign.broadcast.preview.note.inbox") : r("connect.campaign.broadcast.preview.note.text"));
1641
+ return (g, f) => {
1642
+ var c, b, x, k, v, s, i, C, V, $, S;
1643
1643
  return e.target !== "EMAIL" ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
1644
1644
  createElementVNode("div", _hoisted_2$f, toDisplayString(unref(r)("connect.campaign.broadcast.preview.title")), 1),
1645
1645
  createElementVNode("div", {
@@ -1659,17 +1659,17 @@ const _hoisted_1$r = {
1659
1659
  e.target === "PUSH" ? (openBlock(), createElementBlock("div", _hoisted_4$b, [
1660
1660
  createElementVNode("div", _hoisted_5$9, toDisplayString(unref(a)), 1),
1661
1661
  createElementVNode("div", _hoisted_6$6, [
1662
- createElementVNode("div", _hoisted_7$6, toDisplayString(((k = (c = unref(m)) == null ? void 0 : c.title) == null ? void 0 : k.trim()) || unref(r)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1663
- createElementVNode("div", _hoisted_8$5, toDisplayString(((h = (x = unref(m)) == null ? void 0 : x.body) == null ? void 0 : h.trim()) || unref(r)("connect.campaign.broadcast.preview.emptyBody")), 1)
1662
+ createElementVNode("div", _hoisted_7$6, toDisplayString(((b = (c = unref(p)) == null ? void 0 : c.title) == null ? void 0 : b.trim()) || unref(r)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1663
+ createElementVNode("div", _hoisted_8$5, toDisplayString(((k = (x = unref(p)) == null ? void 0 : x.body) == null ? void 0 : k.trim()) || unref(r)("connect.campaign.broadcast.preview.emptyBody")), 1)
1664
1664
  ])
1665
1665
  ])) : e.target === "APP_INBOX" ? (openBlock(), createElementBlock("div", _hoisted_9$5, [
1666
1666
  createElementVNode("div", _hoisted_10$5, toDisplayString(unref(r)("connect.campaign.broadcast.preview.inboxHeading")), 1),
1667
1667
  createElementVNode("div", _hoisted_11$3, [
1668
- createElementVNode("div", _hoisted_12$2, toDisplayString(((d = (g = unref(i)) == null ? void 0 : g.title) == null ? void 0 : d.trim()) || unref(r)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1669
- createElementVNode("div", _hoisted_13$2, toDisplayString(((C = (p = unref(i)) == null ? void 0 : p.previewText) == null ? void 0 : C.trim()) || unref(r)("connect.campaign.broadcast.preview.emptyBody")), 1),
1670
- (V = unref(i)) != null && V.imageUrl ? (openBlock(), createElementBlock("img", {
1668
+ createElementVNode("div", _hoisted_12$2, toDisplayString(((s = (v = unref(u)) == null ? void 0 : v.title) == null ? void 0 : s.trim()) || unref(r)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1669
+ createElementVNode("div", _hoisted_13$2, toDisplayString(((C = (i = unref(u)) == null ? void 0 : i.previewText) == null ? void 0 : C.trim()) || unref(r)("connect.campaign.broadcast.preview.emptyBody")), 1),
1670
+ (V = unref(u)) != null && V.imageUrl ? (openBlock(), createElementBlock("img", {
1671
1671
  key: 0,
1672
- src: unref(i).imageUrl,
1672
+ src: unref(u).imageUrl,
1673
1673
  alt: "",
1674
1674
  class: "mt-8 w-full rounded-[8px]"
1675
1675
  }, null, 8, _hoisted_14$2)) : createCommentVNode("", !0),
@@ -1681,11 +1681,11 @@ const _hoisted_1$r = {
1681
1681
  class: "mt-8 h-[120px] w-full border-0",
1682
1682
  title: unref(r)("connect.campaign.broadcast.preview.bodyFrameTitle")
1683
1683
  }, null, 8, _hoisted_15$2)) : createCommentVNode("", !0),
1684
- (R = (N = unref(i)) == null ? void 0 : N.buttons) != null && R.length ? (openBlock(), createElementBlock("div", _hoisted_16$1, [
1685
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i).buttons, (E, D) => (openBlock(), createElementBlock("div", {
1686
- key: D,
1684
+ (S = ($ = unref(u)) == null ? void 0 : $.buttons) != null && S.length ? (openBlock(), createElementBlock("div", _hoisted_16$1, [
1685
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u).buttons, (w, R) => (openBlock(), createElementBlock("div", {
1686
+ key: R,
1687
1687
  class: "rounded-[8px] bg-fm-color-primary px-12 py-8 text-center fm-typo-en-body-sm-400 text-fm-color-typo-white"
1688
- }, toDisplayString(E.label || unref(r)("connect.campaign.appInbox.buttonLabel")), 1))), 128))
1688
+ }, toDisplayString(w.label || unref(r)("connect.campaign.appInbox.buttonLabel")), 1))), 128))
1689
1689
  ])) : createCommentVNode("", !0)
1690
1690
  ])
1691
1691
  ])) : (openBlock(), createElementBlock("div", _hoisted_17$1, [
@@ -1693,7 +1693,7 @@ const _hoisted_1$r = {
1693
1693
  createElementVNode("div", _hoisted_19$1, toDisplayString(unref(l)), 1)
1694
1694
  ]))
1695
1695
  ], 2),
1696
- createElementVNode("div", _hoisted_20$1, toDisplayString(unref(s)), 1)
1696
+ createElementVNode("div", _hoisted_20$1, toDisplayString(unref(d)), 1)
1697
1697
  ])) : createCommentVNode("", !0);
1698
1698
  };
1699
1699
  }
@@ -1714,24 +1714,24 @@ const _hoisted_1$r = {
1714
1714
  },
1715
1715
  emits: ["move", "remove", "add"],
1716
1716
  setup(e) {
1717
- const { t: r } = useI18n(), o = e, m = computed(() => o.addable.length > 0);
1718
- return (i, u) => {
1717
+ const { t: r } = useI18n(), o = e, p = computed(() => o.addable.length > 0);
1718
+ return (u, m) => {
1719
1719
  const l = resolveComponent("FmButton"), n = resolveComponent("FmMenuItem"), a = resolveComponent("FmMenu");
1720
1720
  return openBlock(), createElementBlock("div", _hoisted_1$h, [
1721
1721
  createElementVNode("div", _hoisted_2$e, [
1722
1722
  createElementVNode("span", _hoisted_3$b, toDisplayString(unref(r)("connect.campaign.broadcast.fallbackChannels")), 1),
1723
1723
  createElementVNode("span", _hoisted_4$a, toDisplayString(unref(r)("connect.campaign.broadcast.fallbackChannelsHint")), 1)
1724
1724
  ]),
1725
- (openBlock(!0), createElementBlock(Fragment, null, renderList(e.rows, (s, v) => (openBlock(), createElementBlock("div", {
1726
- key: s.channel,
1725
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(e.rows, (d, g) => (openBlock(), createElementBlock("div", {
1726
+ key: d.channel,
1727
1727
  class: "flex flex-wrap items-center gap-12 rounded-[8px] border border-fm-color-neutral-gray-100 px-16 py-[14px]"
1728
1728
  }, [
1729
- createElementVNode("span", _hoisted_5$8, toDisplayString(s.position), 1),
1729
+ createElementVNode("span", _hoisted_5$8, toDisplayString(d.position), 1),
1730
1730
  createElementVNode("span", _hoisted_6$5, [
1731
1731
  createElementVNode("span", _hoisted_7$5, [
1732
- createElementVNode("span", _hoisted_8$4, toDisplayString(s.label), 1),
1733
- s.complete ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_9$4, [
1734
- u[0] || (u[0] = createElementVNode("span", { class: "h-[6px] w-[6px] rounded-full bg-fm-color-system-error-400" }, null, -1)),
1732
+ createElementVNode("span", _hoisted_8$4, toDisplayString(d.label), 1),
1733
+ d.complete ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_9$4, [
1734
+ m[0] || (m[0] = createElementVNode("span", { class: "h-[6px] w-[6px] rounded-full bg-fm-color-system-error-400" }, null, -1)),
1735
1735
  createTextVNode(" " + toDisplayString(unref(r)("connect.campaign.broadcast.messageMissing")), 1)
1736
1736
  ]))
1737
1737
  ])
@@ -1745,8 +1745,8 @@ const _hoisted_1$r = {
1745
1745
  icon: "arrow_upward",
1746
1746
  "icon-color": "neutral-gray-400",
1747
1747
  variant: "tertiary",
1748
- disabled: v === 0,
1749
- onClick: (f) => i.$emit("move", s.channel, -1)
1748
+ disabled: g === 0,
1749
+ onClick: (f) => u.$emit("move", d.channel, -1)
1750
1750
  }, null, 8, ["disabled", "onClick"])
1751
1751
  ], 8, _hoisted_11$2),
1752
1752
  createElementVNode("span", {
@@ -1757,8 +1757,8 @@ const _hoisted_1$r = {
1757
1757
  icon: "arrow_downward",
1758
1758
  "icon-color": "neutral-gray-400",
1759
1759
  variant: "tertiary",
1760
- disabled: v === e.rows.length - 1,
1761
- onClick: (f) => i.$emit("move", s.channel, 1)
1760
+ disabled: g === e.rows.length - 1,
1761
+ onClick: (f) => u.$emit("move", d.channel, 1)
1762
1762
  }, null, 8, ["disabled", "onClick"])
1763
1763
  ], 8, _hoisted_12$1),
1764
1764
  createElementVNode("span", {
@@ -1769,12 +1769,12 @@ const _hoisted_1$r = {
1769
1769
  icon: "delete",
1770
1770
  "icon-color": "neutral-gray-400",
1771
1771
  variant: "tertiary",
1772
- onClick: (f) => i.$emit("remove", s.channel)
1772
+ onClick: (f) => u.$emit("remove", d.channel)
1773
1773
  }, null, 8, ["onClick"])
1774
1774
  ], 8, _hoisted_13$1)
1775
1775
  ])
1776
1776
  ]))), 128)),
1777
- unref(m) ? (openBlock(), createBlock(a, {
1777
+ unref(p) ? (openBlock(), createBlock(a, {
1778
1778
  key: 0,
1779
1779
  placement: "bottom-start"
1780
1780
  }, {
@@ -1782,10 +1782,10 @@ const _hoisted_1$r = {
1782
1782
  createElementVNode("button", _hoisted_14$1, " + " + toDisplayString(unref(r)("connect.campaign.broadcast.addFallbackChannel")), 1)
1783
1783
  ]),
1784
1784
  default: withCtx(() => [
1785
- (openBlock(!0), createElementBlock(Fragment, null, renderList(e.addable, (s) => (openBlock(), createBlock(n, {
1786
- key: s.channel,
1787
- label: s.label,
1788
- onClick: (v) => i.$emit("add", s.channel)
1785
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(e.addable, (d) => (openBlock(), createBlock(n, {
1786
+ key: d.channel,
1787
+ label: d.label,
1788
+ onClick: (g) => u.$emit("add", d.channel)
1789
1789
  }, null, 8, ["label", "onClick"]))), 128))
1790
1790
  ]),
1791
1791
  _: 1
@@ -1856,12 +1856,12 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1856
1856
  },
1857
1857
  emits: ["retry-push", "update:model-value"],
1858
1858
  setup(e, { emit: r }) {
1859
- const { t: o } = useI18n(), m = useDialog(), i = computed(() => {
1859
+ const { t: o } = useI18n(), p = useDialog(), u = computed(() => {
1860
1860
  let y = "unavailable";
1861
1861
  return a.pushAvailability === "checking" ? y = "checking" : a.pushAvailability === "non-native" && (y = "requiresNativeApp"), o("connect.campaign.broadcast.pushAvailability." + y);
1862
1862
  });
1863
- function u() {
1864
- m.open({
1863
+ function m() {
1864
+ p.open({
1865
1865
  title: o("connect.campaign.broadcast.pushAvailability.contactSales"),
1866
1866
  message: o("connect.campaign.broadcast.pushAvailability.dialogMessage"),
1867
1867
  primaryActions: {
@@ -1870,73 +1870,73 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1870
1870
  }
1871
1871
  });
1872
1872
  }
1873
- const l = useCoreStore(), n = useMembershipStore(), a = e, s = r, v = ref(!1), f = ref("SMS"), c = computed(() => {
1873
+ const l = useCoreStore(), n = useMembershipStore(), a = e, d = r, g = ref(!1), f = ref("SMS"), c = computed(() => {
1874
1874
  const y = a.modelValue;
1875
1875
  return y && "channels" in y ? y : toDelivery({ message: y });
1876
1876
  });
1877
- function k(y) {
1878
- s("update:model-value", y);
1877
+ function b(y) {
1878
+ d("update:model-value", y);
1879
1879
  }
1880
1880
  function x(y) {
1881
1881
  return o(`connect.campaign.broadcast.channel.${y}`);
1882
1882
  }
1883
- const h = {
1883
+ const k = {
1884
1884
  SMS: "chat",
1885
1885
  WHATSAPP: "chat",
1886
1886
  EMAIL: "mail",
1887
1887
  APP_INBOX: "inbox",
1888
1888
  PUSH: "notifications"
1889
1889
  };
1890
- function g(y) {
1891
- return h[y];
1890
+ function v(y) {
1891
+ return k[y];
1892
1892
  }
1893
- const d = computed(() => c.value.mode === "fallback"), p = computed(
1893
+ const s = computed(() => c.value.mode === "fallback"), i = computed(
1894
1894
  () => a.variables.filter(
1895
1895
  (y) => a.triggerType == "SCHEDULE" ? !y.startsWith("transaction.") : !0
1896
1896
  )
1897
1897
  ), C = useChannelFlag();
1898
1898
  function V(y) {
1899
- return C(y) === "off" ? !1 : y === "PUSH" ? a.pushAvailability === "native" : y === "WHATSAPP" ? v.value : !0;
1899
+ return C(y) === "off" ? !1 : y === "PUSH" ? a.pushAvailability === "native" : y === "WHATSAPP" ? g.value : !0;
1900
1900
  }
1901
- const N = ["fallback", "all"];
1902
- function R(y) {
1903
- y !== c.value.mode && k(setMode(c.value, y));
1901
+ const $ = ["fallback", "all"];
1902
+ function S(y) {
1903
+ y !== c.value.mode && b(setMode(c.value, y));
1904
1904
  }
1905
- const E = ref(null);
1906
- function D(y) {
1907
- var F;
1908
- const $ = (F = E.value) == null ? void 0 : F[y];
1909
- return $ ? new Intl.NumberFormat(void 0, {
1905
+ const w = ref(null);
1906
+ function R(y) {
1907
+ var T;
1908
+ const E = (T = w.value) == null ? void 0 : T[y];
1909
+ return E ? new Intl.NumberFormat(void 0, {
1910
1910
  style: "currency",
1911
- currency: $.currency,
1912
- minimumFractionDigits: $.precision,
1913
- maximumFractionDigits: $.precision
1914
- }).format($.amount / 10 ** $.precision) : null;
1911
+ currency: E.currency,
1912
+ minimumFractionDigits: E.precision,
1913
+ maximumFractionDigits: E.precision
1914
+ }).format(E.amount / 10 ** E.precision) : null;
1915
1915
  }
1916
- const w = computed(
1916
+ const F = computed(
1917
1917
  () => (
1918
1918
  // A flagged-off channel stays visible while selected, so it can be removed.
1919
1919
  CHANNEL_DISPLAY_ORDER.filter(
1920
1920
  (y) => C(y) === "on" || c.value.channels.includes(y)
1921
1921
  ).map((y) => {
1922
- const $ = c.value.channels.includes(y), F = D(y);
1923
- let M = o("connect.campaign.broadcast.freeChannel");
1924
- return isPaidChannel(y) && (M = F ? o("connect.campaign.broadcast.perMessage", { price: F }) : null), {
1922
+ const E = c.value.channels.includes(y), T = R(y);
1923
+ let L = o("connect.campaign.broadcast.freeChannel");
1924
+ return isPaidChannel(y) && (L = T ? o("connect.campaign.broadcast.perMessage", { price: T }) : null), {
1925
1925
  channel: y,
1926
1926
  label: x(y),
1927
- selected: $,
1927
+ selected: E,
1928
1928
  available: V(y),
1929
- rateNote: M,
1929
+ rateNote: L,
1930
1930
  // In fallback mode the grid is a radio for the primary channel, so only
1931
1931
  // the primary reads as checked; a fallback is tagged instead.
1932
- checked: d.value ? c.value.channels[0] === y : $,
1933
- usedAsFallback: d.value && c.value.channels.indexOf(y) > 0
1932
+ checked: s.value ? c.value.channels[0] === y : E,
1933
+ usedAsFallback: s.value && c.value.channels.indexOf(y) > 0
1934
1934
  };
1935
1935
  })
1936
1936
  )
1937
1937
  );
1938
- async function A(y) {
1939
- if (d.value) {
1938
+ async function M(y) {
1939
+ if (s.value) {
1940
1940
  await H(y);
1941
1941
  return;
1942
1942
  }
@@ -1944,17 +1944,17 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1944
1944
  await I(y);
1945
1945
  return;
1946
1946
  }
1947
- V(y) && k(addChannel(c.value, y, p.value));
1947
+ V(y) && b(addChannel(c.value, y, i.value));
1948
1948
  }
1949
1949
  async function H(y) {
1950
1950
  if (!V(y)) return;
1951
- const $ = c.value.channels[0];
1952
- $ !== y && ($ && hasDraft(c.value, $) && !await prompt.remove(
1951
+ const E = c.value.channels[0];
1952
+ E !== y && (E && hasDraft(c.value, E) && !await prompt.remove(
1953
1953
  o("connect.campaign.broadcast.replaceChannelConfirm", {
1954
- channel: x($),
1954
+ channel: x(E),
1955
1955
  next: x(y)
1956
1956
  })
1957
- ) || V(y) && (k(setPrimaryChannel(c.value, y, p.value)), f.value = y));
1957
+ ) || V(y) && (b(setPrimaryChannel(c.value, y, i.value)), f.value = y));
1958
1958
  }
1959
1959
  async function I(y) {
1960
1960
  if (hasDraft(c.value, y) && !await prompt.remove(
@@ -1963,20 +1963,20 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1963
1963
  })
1964
1964
  ))
1965
1965
  return;
1966
- const $ = removeChannel(c.value, y);
1967
- k($), f.value === y && (f.value = $.channels[0] ?? "SMS");
1966
+ const E = removeChannel(c.value, y);
1967
+ b(E), f.value === y && (f.value = E.channels[0] ?? "SMS");
1968
1968
  }
1969
- function X(y, $) {
1970
- k(moveChannel(c.value, y, $));
1969
+ function X(y, E) {
1970
+ b(moveChannel(c.value, y, E));
1971
1971
  }
1972
1972
  function K(y) {
1973
- V(y) && k(addChannel(c.value, y, p.value));
1973
+ V(y) && b(addChannel(c.value, y, i.value));
1974
1974
  }
1975
1975
  const Z = computed(
1976
- () => c.value.channels.slice(1).map((y, $) => ({
1976
+ () => c.value.channels.slice(1).map((y, E) => ({
1977
1977
  channel: y,
1978
1978
  label: x(y),
1979
- position: $ + 2,
1979
+ position: E + 2,
1980
1980
  complete: !a.showValidation || isChannelComplete(c.value, y)
1981
1981
  }))
1982
1982
  ), J = computed(
@@ -1987,58 +1987,58 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1987
1987
  label: x(y)
1988
1988
  }))
1989
1989
  ), W = computed(
1990
- () => c.value.channels.map((y, $) => {
1991
- let F = o("connect.campaign.broadcast.tab.sendsToEligible");
1992
- d.value && (F = o(
1993
- $ === 0 ? "connect.campaign.broadcast.tab.firstAttempt" : "connect.campaign.broadcast.tab.ifNotReached"
1990
+ () => c.value.channels.map((y, E) => {
1991
+ let T = o("connect.campaign.broadcast.tab.sendsToEligible");
1992
+ s.value && (T = o(
1993
+ E === 0 ? "connect.campaign.broadcast.tab.firstAttempt" : "connect.campaign.broadcast.tab.ifNotReached"
1994
1994
  ));
1995
- let M;
1996
- return $ > 0 && (M = d.value ? "→" : "+"), {
1995
+ let L;
1996
+ return E > 0 && (L = s.value ? "→" : "+"), {
1997
1997
  key: y,
1998
1998
  label: x(y),
1999
- sub: F,
1999
+ sub: T,
2000
2000
  complete: !a.showValidation || isChannelComplete(c.value, y),
2001
- step: d.value ? $ + 1 : void 0,
2002
- connector: M
2001
+ step: s.value ? E + 1 : void 0,
2002
+ connector: L
2003
2003
  };
2004
2004
  })
2005
2005
  );
2006
2006
  watchEffect(() => {
2007
- const y = W.value.map(($) => $.key);
2007
+ const y = W.value.map((E) => E.key);
2008
2008
  y.length && !y.includes(f.value) && (f.value = y[0]);
2009
2009
  });
2010
- const b = computed(() => f.value), B = computed(() => {
2011
- const y = b.value;
2010
+ const h = computed(() => f.value), B = computed(() => {
2011
+ const y = h.value;
2012
2012
  if (!(y === "APP_INBOX" || y === "PUSH"))
2013
2013
  return c.value.content[y];
2014
- }), T = computed(
2014
+ }), D = computed(
2015
2015
  () => c.value.content.APP_INBOX
2016
- ), O = computed(
2016
+ ), A = computed(
2017
2017
  () => c.value.content.PUSH
2018
2018
  );
2019
- function P(y) {
2020
- k(setChannelContent(c.value, "APP_INBOX", y));
2019
+ function O(y) {
2020
+ b(setChannelContent(c.value, "APP_INBOX", y));
2021
2021
  }
2022
- function U(y) {
2023
- V("PUSH") && k(setChannelContent(c.value, "PUSH", y));
2022
+ function P(y) {
2023
+ V("PUSH") && b(setChannelContent(c.value, "PUSH", y));
2024
2024
  }
2025
- function j(y, $) {
2026
- y === "APP_INBOX" || y === "PUSH" || k(setChannelContent(c.value, y, { ...$, channel: y }));
2025
+ function j(y, E) {
2026
+ y === "APP_INBOX" || y === "PUSH" || b(setChannelContent(c.value, y, { ...E, channel: y }));
2027
2027
  }
2028
- const L = computed(
2028
+ const U = computed(
2029
2029
  () => c.value.channels.filter(isPaidChannel)
2030
2030
  ), G = computed(() => {
2031
- var $, F, M;
2032
- const y = (($ = n.membership) == null ? void 0 : $.brand) || ((M = (F = l.currentBusiness) == null ? void 0 : F.value) == null ? void 0 : M.name) || "";
2031
+ var E, T, L;
2032
+ const y = ((E = n.membership) == null ? void 0 : E.brand) || ((L = (T = l.currentBusiness) == null ? void 0 : T.value) == null ? void 0 : L.name) || "";
2033
2033
  return getSmsMessageMetrics({ brandName: y, content: "" }).prefix;
2034
2034
  }), Y = `${define_appEndpoint_default.licensePortalUrl}settings?businessId=${SvcConfig.businessId}`;
2035
2035
  async function q() {
2036
2036
  try {
2037
2037
  const y = await membershipApi.getWhatsappNumbers();
2038
- v.value = y.some(
2039
- ($) => {
2040
- var F;
2041
- return (F = $ == null ? void 0 : $.default) == null ? void 0 : F.includes("Marketing");
2038
+ g.value = y.some(
2039
+ (E) => {
2040
+ var T;
2041
+ return (T = E == null ? void 0 : E.default) == null ? void 0 : T.includes("Marketing");
2042
2042
  }
2043
2043
  );
2044
2044
  } catch (y) {
@@ -2047,9 +2047,9 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2047
2047
  }
2048
2048
  return onMounted(async () => {
2049
2049
  const y = c.value.channels[0];
2050
- y && (f.value = y), campaignApi.readBroadcastCreditSummary().then(($) => E.value = $.prices).catch(() => E.value = null), await q();
2051
- }), (y, $) => {
2052
- const F = resolveComponent("FmIcon"), M = resolveComponent("FmCard"), Q = resolveComponent("FmButton");
2050
+ y && (f.value = y), campaignApi.readBroadcastCreditSummary().then((E) => w.value = E.prices).catch(() => w.value = null), await q();
2051
+ }), (y, E) => {
2052
+ const T = resolveComponent("FmIcon"), L = resolveComponent("FmCard"), Q = resolveComponent("FmButton");
2053
2053
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
2054
2054
  createElementVNode("div", _hoisted_2$d, [
2055
2055
  createElementVNode("div", null, [
@@ -2057,32 +2057,32 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2057
2057
  createElementVNode("div", _hoisted_4$9, toDisplayString(unref(o)("connect.campaign.broadcast.deliveryDescription")), 1)
2058
2058
  ]),
2059
2059
  createElementVNode("div", _hoisted_5$7, [
2060
- (openBlock(), createElementBlock(Fragment, null, renderList(N, (S) => createVNode(M, {
2061
- key: S,
2060
+ (openBlock(), createElementBlock(Fragment, null, renderList($, (N) => createVNode(L, {
2061
+ key: N,
2062
2062
  variant: "outlined",
2063
2063
  class: normalizeClass(["h-full cursor-pointer select-none p-16 space-y-8", {
2064
- "border-fm-color-primary bg-fm-color-system-warning-100": unref(c).mode === S,
2065
- "hover:bg-fm-color-opacity-sm": unref(c).mode !== S
2064
+ "border-fm-color-primary bg-fm-color-system-warning-100": unref(c).mode === N,
2065
+ "hover:bg-fm-color-opacity-sm": unref(c).mode !== N
2066
2066
  }]),
2067
- onClick: (ee) => R(S)
2067
+ onClick: (ee) => S(N)
2068
2068
  }, {
2069
2069
  default: withCtx(() => [
2070
2070
  createElementVNode("div", _hoisted_6$4, [
2071
- createElementVNode("div", _hoisted_7$4, toDisplayString(unref(o)(`connect.campaign.broadcast.mode.${S}.label`)), 1),
2072
- unref(c).mode === S ? (openBlock(), createBlock(F, {
2071
+ createElementVNode("div", _hoisted_7$4, toDisplayString(unref(o)(`connect.campaign.broadcast.mode.${N}.label`)), 1),
2072
+ unref(c).mode === N ? (openBlock(), createBlock(T, {
2073
2073
  key: 0,
2074
2074
  name: "check_circle",
2075
2075
  size: "md",
2076
2076
  class: "shrink-0 text-fm-color-primary"
2077
2077
  })) : createCommentVNode("", !0)
2078
2078
  ]),
2079
- createElementVNode("div", _hoisted_8$3, toDisplayString(unref(o)(`connect.campaign.broadcast.mode.${S}.description`)), 1)
2079
+ createElementVNode("div", _hoisted_8$3, toDisplayString(unref(o)(`connect.campaign.broadcast.mode.${N}.description`)), 1)
2080
2080
  ]),
2081
2081
  _: 2
2082
2082
  }, 1032, ["class", "onClick"])), 64))
2083
2083
  ]),
2084
2084
  unref(c).channels.length < 2 ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
2085
- createVNode(F, {
2085
+ createVNode(T, {
2086
2086
  name: "info",
2087
2087
  size: "sm",
2088
2088
  class: "mt-[2px]"
@@ -2091,75 +2091,75 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2091
2091
  ])) : createCommentVNode("", !0)
2092
2092
  ]),
2093
2093
  createElementVNode("div", _hoisted_10$3, [
2094
- createElementVNode("div", _hoisted_11$1, toDisplayString(unref(d) ? unref(o)("connect.campaign.broadcast.primaryChannel") : unref(o)("connect.campaign.broadcast.channels")), 1),
2094
+ createElementVNode("div", _hoisted_11$1, toDisplayString(unref(s) ? unref(o)("connect.campaign.broadcast.primaryChannel") : unref(o)("connect.campaign.broadcast.channels")), 1),
2095
2095
  createElementVNode("div", _hoisted_12, [
2096
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(w), (S) => (openBlock(), createBlock(M, {
2097
- key: S.channel,
2096
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(F), (N) => (openBlock(), createBlock(L, {
2097
+ key: N.channel,
2098
2098
  variant: "outlined",
2099
2099
  class: normalizeClass(["flex h-full flex-col gap-12 p-16", [
2100
- S.checked ? "!border-fm-color-primary bg-fm-color-system-warning-100" : "",
2101
- S.available ? "cursor-pointer" : "cursor-not-allowed bg-fm-color-neutral-gray-100"
2100
+ N.checked ? "!border-fm-color-primary bg-fm-color-system-warning-100" : "",
2101
+ N.available ? "cursor-pointer" : "cursor-not-allowed bg-fm-color-neutral-gray-100"
2102
2102
  ]]),
2103
- "aria-disabled": S.channel === "PUSH" ? void 0 : !S.available,
2104
- onClick: (ee) => A(S.channel)
2103
+ "aria-disabled": N.channel === "PUSH" ? void 0 : !N.available,
2104
+ onClick: (ee) => M(N.channel)
2105
2105
  }, {
2106
2106
  default: withCtx(() => [
2107
2107
  createElementVNode("div", _hoisted_13, [
2108
2108
  createElementVNode("span", {
2109
2109
  class: normalizeClass([
2110
2110
  "flex h-[34px] w-[34px] flex-none items-center justify-center rounded-[8px]",
2111
- S.available ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-fm-color-neutral-gray-200 text-fm-color-neutral-gray-400"
2111
+ N.available ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-fm-color-neutral-gray-200 text-fm-color-neutral-gray-400"
2112
2112
  ])
2113
2113
  }, [
2114
- createVNode(F, {
2115
- name: g(S.channel),
2114
+ createVNode(T, {
2115
+ name: v(N.channel),
2116
2116
  size: "md"
2117
2117
  }, null, 8, ["name"])
2118
2118
  ], 2),
2119
- S.available ? (openBlock(), createElementBlock("span", {
2119
+ N.available ? (openBlock(), createElementBlock("span", {
2120
2120
  key: 0,
2121
2121
  class: normalizeClass(["flex h-[22px] w-[22px] flex-none items-center justify-center border-2 transition-colors", [
2122
- unref(d) ? "rounded-full" : "rounded-[4px]",
2123
- S.checked ? "border-fm-color-primary bg-fm-color-primary text-fm-color-typo-white" : "border-fm-color-neutral-gray-300 bg-fm-color-neutral-white"
2122
+ unref(s) ? "rounded-full" : "rounded-[4px]",
2123
+ N.checked ? "border-fm-color-primary bg-fm-color-primary text-fm-color-typo-white" : "border-fm-color-neutral-gray-300 bg-fm-color-neutral-white"
2124
2124
  ]])
2125
2125
  }, [
2126
- S.checked && !unref(d) ? (openBlock(), createBlock(F, {
2126
+ N.checked && !unref(s) ? (openBlock(), createBlock(T, {
2127
2127
  key: 0,
2128
2128
  name: "check",
2129
2129
  size: "sm"
2130
- })) : S.checked ? (openBlock(), createElementBlock("span", _hoisted_14)) : createCommentVNode("", !0)
2130
+ })) : N.checked ? (openBlock(), createElementBlock("span", _hoisted_14)) : createCommentVNode("", !0)
2131
2131
  ], 2)) : createCommentVNode("", !0)
2132
2132
  ]),
2133
2133
  createElementVNode("div", null, [
2134
2134
  createElementVNode("div", {
2135
- class: normalizeClass(["fm-typo-en-body-md-600", S.available ? "" : "text-fm-color-typo-disabled"])
2136
- }, toDisplayString(S.label), 3),
2137
- S.available && S.rateNote ? (openBlock(), createElementBlock("div", _hoisted_15, toDisplayString(S.rateNote), 1)) : createCommentVNode("", !0),
2138
- S.available ? S.usedAsFallback ? (openBlock(), createElementBlock("div", _hoisted_17, toDisplayString(unref(o)("connect.campaign.broadcast.usedAsFallback")), 1)) : createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_16, toDisplayString(S.channel === "PUSH" ? unref(i) : unref(o)("connect.campaign.broadcast.notSetUp")), 1))
2135
+ class: normalizeClass(["fm-typo-en-body-md-600", N.available ? "" : "text-fm-color-typo-disabled"])
2136
+ }, toDisplayString(N.label), 3),
2137
+ N.available && N.rateNote ? (openBlock(), createElementBlock("div", _hoisted_15, toDisplayString(N.rateNote), 1)) : createCommentVNode("", !0),
2138
+ N.available ? N.usedAsFallback ? (openBlock(), createElementBlock("div", _hoisted_17, toDisplayString(unref(o)("connect.campaign.broadcast.usedAsFallback")), 1)) : createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_16, toDisplayString(N.channel === "PUSH" ? unref(u) : unref(o)("connect.campaign.broadcast.notSetUp")), 1))
2139
2139
  ]),
2140
- S.channel === "WHATSAPP" && !S.available ? (openBlock(), createElementBlock("a", {
2140
+ N.channel === "WHATSAPP" && !N.available ? (openBlock(), createElementBlock("a", {
2141
2141
  key: 0,
2142
2142
  href: Y,
2143
2143
  target: "_blank",
2144
2144
  class: "mt-auto fm-typo-en-body-sm-400 text-fm-color-secondary-blueberry underline",
2145
- onClick: $[0] || ($[0] = withModifiers(() => {
2145
+ onClick: E[0] || (E[0] = withModifiers(() => {
2146
2146
  }, ["stop"]))
2147
2147
  }, toDisplayString(unref(o)("connect.campaign.messageInput.manageWhatsappChannel")), 1)) : createCommentVNode("", !0),
2148
- S.channel === "PUSH" && !S.available ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2148
+ N.channel === "PUSH" && !N.available ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2149
2149
  e.pushAvailability === "non-native" ? (openBlock(), createBlock(Q, {
2150
2150
  key: 0,
2151
2151
  label: unref(o)("connect.campaign.broadcast.pushAvailability.contactSales"),
2152
- onClick: withModifiers(u, ["stop"])
2152
+ onClick: withModifiers(m, ["stop"])
2153
2153
  }, null, 8, ["label"])) : createCommentVNode("", !0),
2154
2154
  e.pushAvailability === "failed" ? (openBlock(), createBlock(Q, {
2155
2155
  key: 1,
2156
2156
  label: unref(o)("connect.campaign.broadcast.pushAvailability.retry"),
2157
- onClick: $[1] || ($[1] = withModifiers((ee) => s("retry-push"), ["stop"]))
2157
+ onClick: E[1] || (E[1] = withModifiers((ee) => d("retry-push"), ["stop"]))
2158
2158
  }, null, 8, ["label"])) : createCommentVNode("", !0),
2159
- S.selected ? (openBlock(), createBlock(Q, {
2159
+ N.selected ? (openBlock(), createBlock(Q, {
2160
2160
  key: 2,
2161
2161
  label: unref(o)("connect.campaign.broadcast.pushAvailability.removePush"),
2162
- onClick: $[2] || ($[2] = withModifiers((ee) => I("PUSH"), ["stop"]))
2162
+ onClick: E[2] || (E[2] = withModifiers((ee) => I("PUSH"), ["stop"]))
2163
2163
  }, null, 8, ["label"])) : createCommentVNode("", !0)
2164
2164
  ], 64)) : createCommentVNode("", !0)
2165
2165
  ]),
@@ -2168,7 +2168,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2168
2168
  ]),
2169
2169
  unref(c).channels.includes("PUSH") && !V("PUSH") ? (openBlock(), createElementBlock("div", _hoisted_18, toDisplayString(unref(o)("connect.campaign.broadcast.pushAvailability.removeBeforeSave")), 1)) : createCommentVNode("", !0),
2170
2170
  e.showValidation && !unref(c).channels.length ? (openBlock(), createElementBlock("div", _hoisted_19, toDisplayString(unref(o)("connect.campaign.broadcast.selectChannelRequired")), 1)) : createCommentVNode("", !0),
2171
- unref(d) && unref(c).channels.length ? (openBlock(), createBlock(_sfc_main$h, {
2171
+ unref(s) && unref(c).channels.length ? (openBlock(), createBlock(_sfc_main$h, {
2172
2172
  key: 2,
2173
2173
  rows: unref(Z),
2174
2174
  addable: unref(J),
@@ -2182,30 +2182,30 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2182
2182
  createElementVNode("div", _hoisted_21, toDisplayString(unref(o)("connect.campaign.broadcast.content")), 1),
2183
2183
  createElementVNode("div", _hoisted_22, toDisplayString(unref(o)("connect.campaign.broadcast.contentDescription")), 1)
2184
2184
  ]),
2185
- unref(L).length ? (openBlock(), createBlock(_sfc_main$w, {
2185
+ unref(U).length ? (openBlock(), createBlock(_sfc_main$w, {
2186
2186
  key: 0,
2187
- channels: unref(L)
2187
+ channels: unref(U)
2188
2188
  }, null, 8, ["channels"])) : createCommentVNode("", !0),
2189
2189
  unref(c).channels.length ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_23, toDisplayString(unref(o)("connect.campaign.broadcast.noChannelContent")), 1)),
2190
2190
  unref(c).channels.length ? (openBlock(), createBlock(_sfc_main$j, {
2191
2191
  key: 2,
2192
2192
  modelValue: unref(f),
2193
- "onUpdate:modelValue": $[3] || ($[3] = (S) => isRef(f) ? f.value = S : null),
2193
+ "onUpdate:modelValue": E[3] || (E[3] = (N) => isRef(f) ? f.value = N : null),
2194
2194
  tabs: unref(W)
2195
2195
  }, null, 8, ["modelValue", "tabs"])) : createCommentVNode("", !0),
2196
2196
  unref(c).channels.includes(unref(f)) ? (openBlock(), createElementBlock("div", _hoisted_24, [
2197
2197
  createElementVNode("div", _hoisted_25, [
2198
- unref(f) === "PUSH" && unref(O) && V("PUSH") ? (openBlock(), createBlock(_sfc_main$k, {
2198
+ unref(f) === "PUSH" && unref(A) && V("PUSH") ? (openBlock(), createBlock(_sfc_main$k, {
2199
2199
  key: 0,
2200
- "model-value": unref(O),
2200
+ "model-value": unref(A),
2201
2201
  "show-validation": e.showValidation,
2202
- "onUpdate:modelValue": U
2203
- }, null, 8, ["model-value", "show-validation"])) : unref(f) === "PUSH" ? (openBlock(), createElementBlock("div", _hoisted_26, toDisplayString(unref(i)), 1)) : unref(f) === "APP_INBOX" && unref(T) ? (openBlock(), createBlock(_sfc_main$l, {
2202
+ "onUpdate:modelValue": P
2203
+ }, null, 8, ["model-value", "show-validation"])) : unref(f) === "PUSH" ? (openBlock(), createElementBlock("div", _hoisted_26, toDisplayString(unref(u)), 1)) : unref(f) === "APP_INBOX" && unref(D) ? (openBlock(), createBlock(_sfc_main$l, {
2204
2204
  key: 2,
2205
- "model-value": unref(T),
2206
- variables: unref(p),
2205
+ "model-value": unref(D),
2206
+ variables: unref(i),
2207
2207
  "show-validation": e.showValidation,
2208
- "onUpdate:modelValue": P
2208
+ "onUpdate:modelValue": O
2209
2209
  }, null, 8, ["model-value", "variables", "show-validation"])) : unref(f) !== "APP_INBOX" ? (openBlock(), createBlock(_sfc_main$x, {
2210
2210
  key: unref(f),
2211
2211
  "model-value": unref(B),
@@ -2213,14 +2213,14 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2213
2213
  "allow-whatsapp": !1,
2214
2214
  "hide-credit-card": !0,
2215
2215
  "trigger-type": e.triggerType,
2216
- variables: unref(p),
2216
+ variables: unref(i),
2217
2217
  placeholder: e.placeholder,
2218
- "onUpdate:modelValue": $[4] || ($[4] = (S) => j(unref(b), S))
2218
+ "onUpdate:modelValue": E[4] || (E[4] = (N) => j(unref(h), N))
2219
2219
  }, null, 8, ["model-value", "trigger-type", "variables", "placeholder"])) : createCommentVNode("", !0)
2220
2220
  ]),
2221
2221
  createVNode(_sfc_main$i, {
2222
2222
  target: unref(f),
2223
- content: unref(c).content[unref(b)],
2223
+ content: unref(c).content[unref(h)],
2224
2224
  "sender-prefix": unref(G)
2225
2225
  }, null, 8, ["target", "content", "sender-prefix"])
2226
2226
  ])) : createCommentVNode("", !0)
@@ -2247,60 +2247,60 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2247
2247
  },
2248
2248
  emits: ["update:model-value"],
2249
2249
  setup(e, { emit: r }) {
2250
- const { t: o } = useI18n(), m = e, i = r, u = useCoreStore(), l = computed(
2251
- () => CountryTimezone[u.currentCountry.value || "MY"]
2250
+ const { t: o } = useI18n(), p = e, u = r, m = useCoreStore(), l = computed(
2251
+ () => CountryTimezone[m.currentCountry.value || "MY"]
2252
2252
  );
2253
2253
  function n() {
2254
- const d = RuleBuilder.getRules(m.modelValue);
2255
- return d.length == 0 ? "fixed" : d.some(
2256
- (p) => isRuleEntry(p) && RuleBuilder.simplify(p).operator == "_rrule"
2254
+ const s = RuleBuilder.getRules(p.modelValue);
2255
+ return s.length == 0 ? "fixed" : s.some(
2256
+ (i) => isRuleEntry(i) && RuleBuilder.simplify(i).operator == "_rrule"
2257
2257
  ) ? "repeating" : "fixed";
2258
2258
  }
2259
- const a = ref(n()), s = ref(!1), v = ref(!1), f = computed(() => [
2259
+ const a = ref(n()), d = ref(!1), g = ref(!1), f = computed(() => [
2260
2260
  { label: o("connect.template.rule.schedule.fixed"), value: "fixed" },
2261
2261
  { label: o("connect.template.rule.schedule.repeating"), value: "repeating" }
2262
2262
  ]), c = computed(() => {
2263
- const d = RuleBuilder.getRules(m.modelValue), p = d.find(
2263
+ const s = RuleBuilder.getRules(p.modelValue), i = s.find(
2264
2264
  (V) => isRuleEntry(V) && RuleBuilder.simplify(V).property == "trigger.date"
2265
- ), C = d.find(
2265
+ ), C = s.find(
2266
2266
  (V) => isRuleEntry(V) && RuleBuilder.simplify(V).property == "trigger.time"
2267
2267
  );
2268
2268
  return {
2269
- date: p ? RuleBuilder.simplify(p).equator : null,
2269
+ date: i ? RuleBuilder.simplify(i).equator : null,
2270
2270
  time: C ? RuleBuilder.simplify(C).equator : null
2271
2271
  };
2272
- }), k = computed(
2272
+ }), b = computed(
2273
2273
  () => calculateNextScheduleAt(
2274
- m.modelValue,
2274
+ p.modelValue,
2275
2275
  /* @__PURE__ */ new Date(),
2276
- m.startDate ? new Date(m.startDate) : /* @__PURE__ */ new Date(),
2277
- m.endDate ? new Date(m.endDate) : void 0
2276
+ p.startDate ? new Date(p.startDate) : /* @__PURE__ */ new Date(),
2277
+ p.endDate ? new Date(p.endDate) : void 0
2278
2278
  )
2279
2279
  );
2280
- function x(d, p) {
2281
- i(
2280
+ function x(s, i) {
2281
+ u(
2282
2282
  "update:model-value",
2283
2283
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
2284
- RuleBuilder.constructEntry("trigger.date", "_rrule", d),
2285
- RuleBuilder.constructEntry("trigger.time", "_isOnTime", p ?? "00:00")
2284
+ RuleBuilder.constructEntry("trigger.date", "_rrule", s),
2285
+ RuleBuilder.constructEntry("trigger.time", "_isOnTime", i ?? "00:00")
2286
2286
  ])
2287
2287
  );
2288
2288
  }
2289
2289
  watch(
2290
- () => m.startDate,
2291
- (d, p) => {
2292
- if (!d || d === p || a.value !== "repeating" || !c.value.date) return;
2290
+ () => p.startDate,
2291
+ (s, i) => {
2292
+ if (!s || s === i || a.value !== "repeating" || !c.value.date) return;
2293
2293
  const C = RRule.fromString(c.value.date), V = new RRule({
2294
2294
  ...C.origOptions,
2295
- dtstart: new Date(d)
2295
+ dtstart: new Date(s)
2296
2296
  }).toString();
2297
- V !== c.value.date && (x(V, c.value.time), v.value = !0);
2297
+ V !== c.value.date && (x(V, c.value.time), g.value = !0);
2298
2298
  }
2299
2299
  );
2300
- function h(d) {
2301
- const p = d.value, C = getRruleAnchorDate({
2302
- startDate: m.startDate ? new Date(m.startDate) : void 0
2303
- }), V = p == "fixed" ? [
2300
+ function k(s) {
2301
+ const i = s.value, C = getRruleAnchorDate({
2302
+ startDate: p.startDate ? new Date(p.startDate) : void 0
2303
+ }), V = i == "fixed" ? [
2304
2304
  RuleBuilder.constructEntry(
2305
2305
  "trigger.date",
2306
2306
  "_isOnDate",
@@ -2323,38 +2323,38 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2323
2323
  ),
2324
2324
  RuleBuilder.constructEntry("trigger.time", "_isOnTime", "00:00")
2325
2325
  ];
2326
- i(
2326
+ u(
2327
2327
  "update:model-value",
2328
2328
  RuleBuilder.setRuleToGroup(
2329
2329
  RuleBuilder.scaffoldGroup("g_schedule"),
2330
2330
  V
2331
2331
  )
2332
- ), a.value = p, v.value = !1;
2332
+ ), a.value = i, g.value = !1;
2333
2333
  }
2334
- function g(d) {
2335
- a.value == "fixed" ? i(
2334
+ function v(s) {
2335
+ a.value == "fixed" ? u(
2336
2336
  "update:model-value",
2337
2337
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
2338
2338
  RuleBuilder.constructEntry(
2339
2339
  "trigger.date",
2340
2340
  "_isOnDate",
2341
- d.date
2341
+ s.date
2342
2342
  ),
2343
2343
  RuleBuilder.constructEntry(
2344
2344
  "trigger.time",
2345
2345
  "_isOnTime",
2346
- d.time
2346
+ s.time
2347
2347
  )
2348
2348
  ])
2349
- ) : x(d.date, d.time), v.value = !1;
2349
+ ) : x(s.date, s.time), g.value = !1;
2350
2350
  }
2351
- return (d, p) => {
2352
- const C = resolveComponent("FmButtonGroup"), V = resolveComponent("FmTimePicker"), N = resolveComponent("FmIcon"), R = resolveComponent("FmTooltip"), E = resolveComponent("FmField"), D = resolveComponent("FmCard"), w = resolveComponent("FmPopover"), A = resolveComponent("FmDatePicker"), H = resolveComponent("FmHelperText");
2351
+ return (s, i) => {
2352
+ const C = resolveComponent("FmButtonGroup"), V = resolveComponent("FmTimePicker"), $ = resolveComponent("FmIcon"), S = resolveComponent("FmTooltip"), w = resolveComponent("FmField"), R = resolveComponent("FmCard"), F = resolveComponent("FmPopover"), M = resolveComponent("FmDatePicker"), H = resolveComponent("FmHelperText");
2353
2353
  return openBlock(), createElementBlock(Fragment, null, [
2354
2354
  createVNode(C, {
2355
2355
  items: unref(f),
2356
2356
  "model-value": unref(f).find((I) => I.value === unref(a)) ?? null,
2357
- "onUpdate:modelValue": h,
2357
+ "onUpdate:modelValue": k,
2358
2358
  class: "mb-8"
2359
2359
  }, null, 8, ["items", "model-value"]),
2360
2360
  createElementVNode("div", _hoisted_1$f, [
@@ -2362,20 +2362,20 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2362
2362
  createVNode(V, {
2363
2363
  label: unref(o)("connect.template.rule.schedule.notify_time"),
2364
2364
  "model-value": unref(c).time,
2365
- "onUpdate:modelValue": p[0] || (p[0] = (I) => g({ date: unref(c).date, time: I })),
2365
+ "onUpdate:modelValue": i[0] || (i[0] = (I) => v({ date: unref(c).date, time: I })),
2366
2366
  "helper-text": unref(c).time ? void 0 : unref(o)("connect.template.rule.schedule.time_required"),
2367
2367
  "helper-state": unref(c).time ? void 0 : "error"
2368
2368
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"]),
2369
2369
  unref(a) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$9, [
2370
2370
  createElementVNode("div", _hoisted_4$8, [
2371
2371
  createElementVNode("div", null, toDisplayString(unref(o)("connect.template.rule.schedule.notify_date")), 1),
2372
- unref(c).date ? (openBlock(), createBlock(R, {
2372
+ unref(c).date ? (openBlock(), createBlock(S, {
2373
2373
  key: 0,
2374
2374
  "z-index": 9999,
2375
2375
  content: unref(SummarizeRrule)(unref(RRule).fromString(unref(c).date).options)
2376
2376
  }, {
2377
2377
  default: withCtx(() => [
2378
- createVNode(N, {
2378
+ createVNode($, {
2379
2379
  name: "info",
2380
2380
  size: "sm",
2381
2381
  outline: !0
@@ -2384,12 +2384,12 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2384
2384
  _: 1
2385
2385
  }, 8, ["content"])) : createCommentVNode("", !0)
2386
2386
  ]),
2387
- createVNode(w, {
2388
- "show-popover": unref(s),
2389
- onPopoverChanged: p[3] || (p[3] = (I) => s.value = I)
2387
+ createVNode(F, {
2388
+ "show-popover": unref(d),
2389
+ onPopoverChanged: i[3] || (i[3] = (I) => d.value = I)
2390
2390
  }, {
2391
2391
  "popover-button": withCtx(() => [
2392
- createVNode(E, {
2392
+ createVNode(w, {
2393
2393
  class: "cursor-pointer",
2394
2394
  "helper-text": unref(c).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2395
2395
  "helper-state": unref(c).date ? void 0 : "error"
@@ -2401,14 +2401,14 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2401
2401
  }, 8, ["helper-text", "helper-state"])
2402
2402
  ]),
2403
2403
  default: withCtx(() => [
2404
- createVNode(D, { class: "elevated p-8 w-[450px]" }, {
2404
+ createVNode(R, { class: "elevated p-8 w-[450px]" }, {
2405
2405
  default: withCtx(() => [
2406
2406
  createVNode(_sfc_main$y, {
2407
2407
  "apply-button": !0,
2408
2408
  "model-value": unref(c).date || "",
2409
2409
  "start-date": e.startDate ? new Date(e.startDate) : /* @__PURE__ */ new Date(),
2410
- onCancel: p[1] || (p[1] = (I) => s.value = !1),
2411
- "onUpdate:modelValue": p[2] || (p[2] = (I) => (g({ date: I, time: unref(c).time }), s.value = !1))
2410
+ onCancel: i[1] || (i[1] = (I) => d.value = !1),
2411
+ "onUpdate:modelValue": i[2] || (i[2] = (I) => (v({ date: I, time: unref(c).time }), d.value = !1))
2412
2412
  }, null, 8, ["model-value", "start-date"])
2413
2413
  ]),
2414
2414
  _: 1
@@ -2416,21 +2416,21 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2416
2416
  ]),
2417
2417
  _: 1
2418
2418
  }, 8, ["show-popover"])
2419
- ])) : (openBlock(), createBlock(A, {
2419
+ ])) : (openBlock(), createBlock(M, {
2420
2420
  key: 1,
2421
2421
  label: unref(o)("connect.template.rule.schedule.notify_date"),
2422
2422
  "model-value": unref(c).date || "",
2423
- "onUpdate:modelValue": p[4] || (p[4] = (I) => g({ date: I, time: unref(c).time })),
2423
+ "onUpdate:modelValue": i[4] || (i[4] = (I) => v({ date: I, time: unref(c).time })),
2424
2424
  "helper-text": unref(c).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2425
2425
  "helper-state": unref(c).date ? void 0 : "error"
2426
2426
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"]))
2427
2427
  ]),
2428
- unref(c).date && unref(c).time && unref(k) ? (openBlock(), createBlock(H, {
2428
+ unref(c).date && unref(c).time && unref(b) ? (openBlock(), createBlock(H, {
2429
2429
  key: 0,
2430
- text: `${unref(moment)(unref(k)).isAfter(unref(moment)()) ? unref(o)("connect.template.rule.schedule.next_notification") : unref(o)("connect.template.rule.schedule.last_trigger_on")} ${unref(moment)(unref(k)).format("dddd, DD MMM YYYY")} at
2431
- ${unref(moment)(unref(k)).format("hh:mmA")}(UTC${unref(moment).tz(unref(l)).format("Z")}) (${unref(moment)(unref(k)).fromNow()})`
2430
+ text: `${unref(moment)(unref(b)).isAfter(unref(moment)()) ? unref(o)("connect.template.rule.schedule.next_notification") : unref(o)("connect.template.rule.schedule.last_trigger_on")} ${unref(moment)(unref(b)).format("dddd, DD MMM YYYY")} at
2431
+ ${unref(moment)(unref(b)).format("hh:mmA")}(UTC${unref(moment).tz(unref(l)).format("Z")}) (${unref(moment)(unref(b)).fromNow()})`
2432
2432
  }, null, 8, ["text"])) : createCommentVNode("", !0),
2433
- unref(v) ? (openBlock(), createBlock(H, {
2433
+ unref(g) ? (openBlock(), createBlock(H, {
2434
2434
  key: 1,
2435
2435
  text: "Repeating schedule was updated to stay anchored to the campaign start date.",
2436
2436
  state: "warning"
@@ -2448,7 +2448,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2448
2448
  },
2449
2449
  emits: ["update:model-value"],
2450
2450
  setup(e, { emit: r }) {
2451
- const { t: o } = useI18n(), m = e, i = r, u = computed(
2451
+ const { t: o } = useI18n(), p = e, u = r, m = computed(
2452
2452
  () => [
2453
2453
  {
2454
2454
  label: o("connect.campaign.gameType.option.FORTUNE_WHEEL.label"),
@@ -2469,21 +2469,21 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2469
2469
  return openBlock(), createElementBlock("div", _hoisted_1$e, [
2470
2470
  createElementVNode("div", _hoisted_2$b, toDisplayString(unref(o)("connect.template.select_game")), 1),
2471
2471
  createElementVNode("div", _hoisted_3$8, [
2472
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (s) => (openBlock(), createBlock(a, {
2472
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (d) => (openBlock(), createBlock(a, {
2473
2473
  variant: "outlined",
2474
2474
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
2475
- "col-span-2": unref(u).length == 1,
2476
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == s.value,
2477
- "hover:bg-fm-color-opacity-sm": e.modelValue != s.value
2475
+ "col-span-2": unref(m).length == 1,
2476
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == d.value,
2477
+ "hover:bg-fm-color-opacity-sm": e.modelValue != d.value
2478
2478
  }]),
2479
2479
  onClick: () => {
2480
- m.modelValue != s.value && i("update:model-value", s.value);
2480
+ p.modelValue != d.value && u("update:model-value", d.value);
2481
2481
  },
2482
- key: s.value
2482
+ key: d.value
2483
2483
  }, {
2484
2484
  default: withCtx(() => [
2485
- createElementVNode("div", _hoisted_4$7, toDisplayString(s.label), 1),
2486
- createElementVNode("div", _hoisted_5$5, toDisplayString(s.description), 1)
2485
+ createElementVNode("div", _hoisted_4$7, toDisplayString(d.label), 1),
2486
+ createElementVNode("div", _hoisted_5$5, toDisplayString(d.description), 1)
2487
2487
  ]),
2488
2488
  _: 2
2489
2489
  }, 1032, ["class", "onClick"]))), 128))
@@ -2498,28 +2498,37 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2498
2498
  __name: "EditRewardPoolSheet",
2499
2499
  emits: ["update:model-value"],
2500
2500
  setup(e, { expose: r, emit: o }) {
2501
- const m = useMembershipStore(), { minor: i } = useLoading, u = ref(!1), l = ref(), n = ref(), a = ref(0), s = computed(() => {
2502
- var h;
2503
- return ((h = m.loyaltyRewards.items.find(
2504
- (g) => {
2505
- var d;
2506
- return g.value === ((d = l.value) == null ? void 0 : d.collectible);
2507
- }
2508
- )) == null ? void 0 : h.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
2509
- }), v = computed(() => {
2510
- const x = s.value.safeParse(l.value);
2511
- return x.success ? [] : x.error.errors;
2501
+ const p = useMembershipStore(), { minor: u } = useLoading, m = ref(!1), l = ref(), n = ref(), a = ref(0), d = computed(
2502
+ () => {
2503
+ var v;
2504
+ return (v = p.loyaltyRewards.items.find(
2505
+ (s) => {
2506
+ var i;
2507
+ return s.value === ((i = l.value) == null ? void 0 : i.collectible);
2508
+ }
2509
+ )) == null ? void 0 : v.raw.type;
2510
+ }
2511
+ ), g = computed(
2512
+ () => {
2513
+ var v;
2514
+ return ((v = l.value) == null ? void 0 : v.type) === "LOYALTY" && (d.value === "CREDIT" || d.value === "TITLE");
2515
+ }
2516
+ ), f = computed(
2517
+ () => g.value ? FdoCreditLoyaltyReward : FdtoRandomReward
2518
+ ), c = computed(() => {
2519
+ const v = f.value.safeParse(l.value);
2520
+ return v.success ? [] : v.error.errors;
2512
2521
  });
2513
- function f(x, h, g) {
2514
- x && (l.value = h, a.value = g), u.value = x;
2522
+ function b(v, s, i) {
2523
+ v && (l.value = s, a.value = i), m.value = v;
2515
2524
  }
2516
- const c = o;
2525
+ const x = o;
2517
2526
  async function k() {
2518
- const x = s.value.safeParse(l.value);
2519
- x.success && (await i(
2527
+ const v = f.value.safeParse(l.value);
2528
+ v.success && (await u(
2520
2529
  async () => {
2521
- x.data.type === "VOUCHER" && n.value && (x.data.collectibleConfig.image = await firebaseStorage.update(
2522
- x.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
2530
+ v.data.type === "VOUCHER" && n.value && (v.data.collectibleConfig.image = await firebaseStorage.update(
2531
+ v.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
2523
2532
  n.value
2524
2533
  ));
2525
2534
  },
@@ -2527,44 +2536,44 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2527
2536
  message: "Uploading reward image",
2528
2537
  successMessage: "Reward image updated"
2529
2538
  }
2530
- ), c("update:model-value", x.data, a.value));
2539
+ ), x("update:model-value", v.data, a.value));
2531
2540
  }
2532
2541
  return r({
2533
- showSheet: f
2534
- }), (x, h) => {
2535
- const g = resolveComponent("FmSelect"), d = resolveComponent("FmStepperField"), p = resolveComponent("FmButton"), C = resolveComponent("FmSideSheet");
2536
- return openBlock(), createBlock(C, {
2542
+ showSheet: b
2543
+ }), (v, s) => {
2544
+ const i = resolveComponent("FmSelect"), C = resolveComponent("FmStepperField"), V = resolveComponent("FmButton"), $ = resolveComponent("FmSideSheet");
2545
+ return openBlock(), createBlock($, {
2537
2546
  "max-width": 560,
2538
- modelValue: unref(u),
2547
+ modelValue: unref(m),
2539
2548
  "onUpdate:modelValue": [
2540
- h[9] || (h[9] = (V) => isRef(u) ? u.value = V : null),
2541
- h[10] || (h[10] = (V) => u.value = V)
2549
+ s[9] || (s[9] = (S) => isRef(m) ? m.value = S : null),
2550
+ s[10] || (s[10] = (S) => m.value = S)
2542
2551
  ],
2543
2552
  header: "Edit reward",
2544
2553
  "dismiss-away": ""
2545
2554
  }, {
2546
2555
  "side-sheet-footer": withCtx(() => [
2547
2556
  createElementVNode("div", _hoisted_2$a, [
2548
- createVNode(p, {
2557
+ createVNode(V, {
2549
2558
  variant: "primary",
2550
2559
  type: "button",
2551
- disabled: unref(v).length > 0,
2560
+ disabled: unref(c).length > 0,
2552
2561
  label: "Confirm",
2553
- onClick: h[7] || (h[7] = (V) => k())
2562
+ onClick: s[7] || (s[7] = (S) => k())
2554
2563
  }, null, 8, ["disabled"]),
2555
- createVNode(p, {
2564
+ createVNode(V, {
2556
2565
  variant: "secondary",
2557
2566
  type: "button",
2558
2567
  label: "Cancel",
2559
- onClick: h[8] || (h[8] = (V) => u.value = !1)
2568
+ onClick: s[8] || (s[8] = (S) => m.value = !1)
2560
2569
  })
2561
2570
  ])
2562
2571
  ]),
2563
2572
  default: withCtx(() => {
2564
- var V, N, R;
2573
+ var S;
2565
2574
  return [
2566
2575
  unref(l) ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
2567
- createVNode(g, {
2576
+ createVNode(i, {
2568
2577
  label: "Reward Type",
2569
2578
  items: [
2570
2579
  { label: "No Reward", value: "NO_REWARD" },
@@ -2572,12 +2581,12 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2572
2581
  { label: "Loyalty", value: "LOYALTY" }
2573
2582
  ],
2574
2583
  "model-value": unref(l).type,
2575
- "onUpdate:modelValue": h[0] || (h[0] = (E) => {
2576
- E == "NO_REWARD" ? l.value = {
2584
+ "onUpdate:modelValue": s[0] || (s[0] = (w) => {
2585
+ w == "NO_REWARD" ? l.value = {
2577
2586
  type: "NO_REWARD",
2578
2587
  collectible: null,
2579
2588
  weight: 1
2580
- } : E === "VOUCHER" ? l.value = {
2589
+ } : w === "VOUCHER" ? l.value = {
2581
2590
  collectible: null,
2582
2591
  type: "VOUCHER",
2583
2592
  collectibleConfig: unref(initCollectibleConfig)("VOUCHER", {
@@ -2592,7 +2601,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2592
2601
  },
2593
2602
  weight: 1
2594
2603
  } : l.value = {
2595
- collectible: unref(m).loyaltyRewards.raw[0]._id,
2604
+ collectible: unref(p).loyaltyRewards.raw[0]._id,
2596
2605
  type: "LOYALTY",
2597
2606
  earningOption: {
2598
2607
  amount: 1,
@@ -2605,75 +2614,65 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2605
2614
  };
2606
2615
  })
2607
2616
  }, null, 8, ["model-value"]),
2608
- unref(l).type == "LOYALTY" ? (openBlock(), createBlock(g, {
2617
+ unref(l).type == "LOYALTY" ? (openBlock(), createBlock(i, {
2609
2618
  key: 0,
2610
2619
  label: "Loyalty type",
2611
- rules: [unref(ZodHelper).ruleAtPath(unref(s), "collectible", [unref(l).type])],
2612
- items: unref(m).loyaltyRewards.items,
2620
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "collectible", [unref(l).type])],
2621
+ items: unref(p).loyaltyRewards.items,
2613
2622
  "model-value": unref(l).collectible,
2614
- "onUpdate:modelValue": h[1] || (h[1] = (E) => unref(l).collectible = E)
2623
+ "onUpdate:modelValue": s[1] || (s[1] = (w) => unref(l).collectible = w)
2615
2624
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
2616
- createVNode(d, {
2625
+ createVNode(C, {
2617
2626
  label: "Weight",
2618
- rules: [unref(ZodHelper).ruleAtPath(unref(s), "weight", [unref(l).type])],
2627
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "weight", [unref(l).type])],
2619
2628
  "model-value": unref(l).weight,
2620
- "onUpdate:modelValue": h[2] || (h[2] = (E) => l.value = {
2629
+ "onUpdate:modelValue": s[2] || (s[2] = (w) => l.value = {
2621
2630
  ...unref(l),
2622
- weight: E
2631
+ weight: w
2623
2632
  })
2624
2633
  }, null, 8, ["rules", "model-value"]),
2625
2634
  unref(l).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2626
- ((V = unref(m).loyaltyRewards.items.find(
2627
- (E) => {
2628
- var D;
2629
- return E.value === ((D = unref(l)) == null ? void 0 : D.collectible);
2630
- }
2631
- )) == null ? void 0 : V.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2632
- h[11] || (h[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
2635
+ unref(d) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2636
+ s[11] || (s[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
2633
2637
  createVNode(_sfc_main$z, {
2634
2638
  class: "mt-[-8px]",
2635
2639
  rules: [
2636
- unref(ZodHelper).ruleAtPath(unref(s), "earningOption", [unref(l).type])
2640
+ unref(ZodHelper).ruleAtPath(unref(f), "earningOption", [unref(l).type])
2637
2641
  ],
2638
- "helper-state": unref(ZodHelper).helperState(unref(v), "earningOption"),
2639
- "error-text": unref(ZodHelper).helperText(unref(v), "earningOption"),
2642
+ "helper-state": unref(ZodHelper).helperState(unref(c), "earningOption"),
2643
+ "error-text": unref(ZodHelper).helperText(unref(c), "earningOption"),
2640
2644
  "fixed-type": !0,
2641
2645
  "model-value": unref(l).earningOption,
2642
- "onUpdate:modelValue": h[3] || (h[3] = (E) => l.value = {
2646
+ "onUpdate:modelValue": s[3] || (s[3] = (w) => l.value = {
2643
2647
  ...unref(l),
2644
- earningOption: E
2648
+ earningOption: w
2645
2649
  })
2646
2650
  }, null, 8, ["rules", "helper-state", "error-text", "model-value"])
2647
2651
  ], 64)) : createCommentVNode("", !0),
2648
- h[12] || (h[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
2652
+ s[12] || (s[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
2649
2653
  createVNode(_sfc_main$A, {
2650
2654
  type: unref(l).type === "LOYALTY" ? "custom" : "range",
2651
- "for-credit": unref(l).type === "LOYALTY" && ((N = unref(m).loyaltyRewards.items.find(
2652
- (E) => {
2653
- var D;
2654
- return E.value === ((D = unref(l)) == null ? void 0 : D.collectible);
2655
- }
2656
- )) == null ? void 0 : N.raw.type) === "CREDIT",
2655
+ "for-credit": unref(g),
2657
2656
  class: "!gap-24",
2658
- rules: [unref(ZodHelper).ruleAtPath(unref(s), "validityOption", [unref(l).type])],
2657
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "validityOption", [unref(l).type])],
2659
2658
  "model-value": unref(l).validityOption,
2660
- "onUpdate:modelValue": h[4] || (h[4] = (E) => l.value = {
2659
+ "onUpdate:modelValue": s[4] || (s[4] = (w) => l.value = {
2661
2660
  ...unref(l),
2662
- validityOption: E
2661
+ validityOption: w
2663
2662
  })
2664
2663
  }, null, 8, ["type", "for-credit", "rules", "model-value"])
2665
2664
  ], 64)) : createCommentVNode("", !0),
2666
2665
  unref(l).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$B, {
2667
2666
  key: 2,
2668
2667
  "reward-image": unref(n),
2669
- "model-value": ((R = unref(l)) == null ? void 0 : R.collectibleConfig) ?? void 0,
2670
- "onUpdate:modelValue": h[5] || (h[5] = (E) => l.value = {
2668
+ "model-value": ((S = unref(l)) == null ? void 0 : S.collectibleConfig) ?? void 0,
2669
+ "onUpdate:modelValue": s[5] || (s[5] = (w) => l.value = {
2671
2670
  ...unref(l),
2672
- collectibleConfig: E
2671
+ collectibleConfig: w
2673
2672
  }),
2674
- "onUpdate:rewardImage": h[6] || (h[6] = (E) => n.value = E)
2673
+ "onUpdate:rewardImage": s[6] || (s[6] = (w) => n.value = w)
2675
2674
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
2676
- createVNode(JsonViewer, { json: unref(v) }, null, 8, ["json"])
2675
+ createVNode(JsonViewer, { json: unref(c) }, null, 8, ["json"])
2677
2676
  ])) : createCommentVNode("", !0)
2678
2677
  ];
2679
2678
  }),
@@ -2701,36 +2700,36 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2701
2700
  },
2702
2701
  emits: ["update:model-value"],
2703
2702
  setup(e, { emit: r }) {
2704
- const o = e, m = r, i = useMembershipStore(), { t: u } = useI18n(), l = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), n = computed(() => o.modelValue ?? []), a = computed(() => {
2705
- const h = l.safeParse(n.value);
2706
- return h.success ? [] : h.error.errors;
2707
- }), s = ref();
2708
- function v(h, g) {
2709
- var p;
2710
- const d = [...n.value];
2711
- d[g] = h, (p = s.value) == null || p.showSheet(!1), m("update:model-value", d);
2703
+ const o = e, p = r, u = useMembershipStore(), { t: m } = useI18n(), l = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), n = computed(() => o.modelValue ?? []), a = computed(() => {
2704
+ const k = l.safeParse(n.value);
2705
+ return k.success ? [] : k.error.errors;
2706
+ }), d = ref();
2707
+ function g(k, v) {
2708
+ var i;
2709
+ const s = [...n.value];
2710
+ s[v] = k, (i = d.value) == null || i.showSheet(!1), p("update:model-value", s);
2712
2711
  }
2713
- function f(h) {
2714
- const g = h.type == "VOUCHER" ? h.collectibleConfig : i.collectibles.find(
2715
- (C) => C._id.toString() == h.collectible
2716
- ), d = CollectionUtils.formattedType((g == null ? void 0 : g.name) || ""), p = h.weight;
2712
+ function f(k) {
2713
+ const v = k.type == "VOUCHER" ? k.collectibleConfig : u.collectibles.find(
2714
+ (C) => C._id.toString() == k.collectible
2715
+ ), s = CollectionUtils.formattedType((v == null ? void 0 : v.name) || ""), i = k.weight;
2717
2716
  return {
2718
- label: isNullOrEmpty(d) ? "NO REWARD" : d,
2719
- sublabel: `${p} (${(p / n.value.reduce((C, V) => C + V.weight, 0) * 100).toFixed(2)}%)`
2717
+ label: isNullOrEmpty(s) ? "NO REWARD" : s,
2718
+ sublabel: `${i} (${(i / n.value.reduce((C, V) => C + V.weight, 0) * 100).toFixed(2)}%)`
2720
2719
  };
2721
2720
  }
2722
- function c(h) {
2723
- var d;
2724
- const g = [...n.value];
2725
- (d = s.value) == null || d.showSheet(!0, g[h], h);
2721
+ function c(k) {
2722
+ var s;
2723
+ const v = [...n.value];
2724
+ (s = d.value) == null || s.showSheet(!0, v[k], k);
2726
2725
  }
2727
- function k(h) {
2728
- const g = [...n.value];
2729
- g.splice(h, 1), m("update:model-value", g);
2726
+ function b(k) {
2727
+ const v = [...n.value];
2728
+ v.splice(k, 1), p("update:model-value", v);
2730
2729
  }
2731
2730
  function x() {
2732
- var h;
2733
- (h = s.value) == null || h.showSheet(
2731
+ var k;
2732
+ (k = d.value) == null || k.showSheet(
2734
2733
  !0,
2735
2734
  {
2736
2735
  type: "NO_REWARD",
@@ -2740,33 +2739,33 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2740
2739
  n.value.length
2741
2740
  );
2742
2741
  }
2743
- return (h, g) => {
2744
- const d = resolveComponent("FmButton"), p = resolveComponent("FmCard"), C = resolveComponent("FmHelperText");
2742
+ return (k, v) => {
2743
+ const s = resolveComponent("FmButton"), i = resolveComponent("FmCard"), C = resolveComponent("FmHelperText");
2745
2744
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
2746
- createElementVNode("div", _hoisted_2$9, toDisplayString(unref(u)("connect.template.configure_reward_type")), 1),
2747
- createVNode(d, {
2748
- label: unref(u)("connect.campaign.rewardPool.addReward"),
2749
- onClick: g[0] || (g[0] = (V) => x()),
2745
+ createElementVNode("div", _hoisted_2$9, toDisplayString(unref(m)("connect.template.configure_reward_type")), 1),
2746
+ createVNode(s, {
2747
+ label: unref(m)("connect.campaign.rewardPool.addReward"),
2748
+ onClick: v[0] || (v[0] = (V) => x()),
2750
2749
  variant: "plain",
2751
2750
  icon: "add"
2752
2751
  }, null, 8, ["label"]),
2753
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (V, N) => (openBlock(), createBlock(p, {
2754
- key: N,
2752
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (V, $) => (openBlock(), createBlock(i, {
2753
+ key: $,
2755
2754
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
2756
2755
  variant: "outlined",
2757
- onClick: (R) => c(N)
2756
+ onClick: (S) => c($)
2758
2757
  }, {
2759
2758
  default: withCtx(() => {
2760
- var R;
2759
+ var S;
2761
2760
  return [
2762
2761
  createElementVNode("div", null, [
2763
- createElementVNode("div", _hoisted_3$7, toDisplayString(V.type == "LOYALTY" ? (R = V == null ? void 0 : V.earningOption) == null ? void 0 : R.amount : "") + " " + toDisplayString(f(V).label), 1),
2762
+ createElementVNode("div", _hoisted_3$7, toDisplayString(V.type == "LOYALTY" ? (S = V == null ? void 0 : V.earningOption) == null ? void 0 : S.amount : "") + " " + toDisplayString(f(V).label), 1),
2764
2763
  createElementVNode("div", _hoisted_4$6, toDisplayString(f(V).sublabel), 1)
2765
2764
  ]),
2766
- createVNode(d, {
2765
+ createVNode(s, {
2767
2766
  icon: "delete",
2768
2767
  variant: "tertiary",
2769
- onClick: (E) => (E.stopPropagation(), k(N))
2768
+ onClick: (w) => (w.stopPropagation(), b($))
2770
2769
  }, null, 8, ["onClick"])
2771
2770
  ];
2772
2771
  }),
@@ -2779,8 +2778,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2779
2778
  }, null, 8, ["text"]))), 128)),
2780
2779
  createVNode(_sfc_main$d, {
2781
2780
  ref_key: "sheetRef",
2782
- ref: s,
2783
- "onUpdate:modelValue": v
2781
+ ref: d,
2782
+ "onUpdate:modelValue": g
2784
2783
  }, null, 512)
2785
2784
  ]);
2786
2785
  };
@@ -2797,7 +2796,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2797
2796
  },
2798
2797
  emits: ["update:model-value"],
2799
2798
  setup(e, { emit: r }) {
2800
- const { t: o } = useI18n(), m = e, i = r, u = computed(() => [
2799
+ const { t: o } = useI18n(), p = e, u = r, m = computed(() => [
2801
2800
  {
2802
2801
  label: o("connect.template.promotion_game.rock_paper_scissors.label"),
2803
2802
  description: o("connect.template.promotion_game.rock_paper_scissors.description"),
@@ -2805,27 +2804,27 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2805
2804
  }
2806
2805
  ]);
2807
2806
  return (l, n) => {
2808
- var f, c, k;
2809
- const a = resolveComponent("FmSwitch"), s = resolveComponent("FmCard"), v = resolveComponent("FmHelperText");
2807
+ var f, c, b;
2808
+ const a = resolveComponent("FmSwitch"), d = resolveComponent("FmCard"), g = resolveComponent("FmHelperText");
2810
2809
  return openBlock(), createElementBlock("div", _hoisted_1$b, [
2811
2810
  createVNode(a, {
2812
2811
  label: unref(o)("connect.template.promotion_game.enable"),
2813
2812
  "model-value": !!((f = e.modelValue) != null && f.gameType),
2814
- "onUpdate:modelValue": n[0] || (n[0] = (x) => x ? i("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : i("update:model-value", null))
2813
+ "onUpdate:modelValue": n[0] || (n[0] = (x) => x ? u("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : u("update:model-value", null))
2815
2814
  }, null, 8, ["label", "model-value"]),
2816
2815
  ((c = e.modelValue) == null ? void 0 : c.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
2817
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (x) => {
2818
- var h, g;
2819
- return openBlock(), createBlock(s, {
2816
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (x) => {
2817
+ var k, v;
2818
+ return openBlock(), createBlock(d, {
2820
2819
  variant: "outlined",
2821
2820
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
2822
- "col-span-2": unref(u).length == 1,
2823
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((h = e.modelValue) == null ? void 0 : h.gameType) == x.value,
2824
- "hover:bg-fm-color-opacity-sm": ((g = e.modelValue) == null ? void 0 : g.gameType) != x.value
2821
+ "col-span-2": unref(m).length == 1,
2822
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((k = e.modelValue) == null ? void 0 : k.gameType) == x.value,
2823
+ "hover:bg-fm-color-opacity-sm": ((v = e.modelValue) == null ? void 0 : v.gameType) != x.value
2825
2824
  }]),
2826
2825
  onClick: () => {
2827
- var d;
2828
- ((d = m.modelValue) == null ? void 0 : d.gameType) != x.value && i("update:model-value", { gameType: x.value });
2826
+ var s;
2827
+ ((s = p.modelValue) == null ? void 0 : s.gameType) != x.value && u("update:model-value", { gameType: x.value });
2829
2828
  },
2830
2829
  key: x.value
2831
2830
  }, {
@@ -2837,7 +2836,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2837
2836
  }, 1032, ["class", "onClick"]);
2838
2837
  }), 128))
2839
2838
  ])) : createCommentVNode("", !0),
2840
- ((k = e.modelValue) == null ? void 0 : k.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(v, {
2839
+ ((b = e.modelValue) == null ? void 0 : b.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(g, {
2841
2840
  key: 1,
2842
2841
  text: unref(o)("connect.template.promotion_game.rock_paper_scissors.warning"),
2843
2842
  state: "warning"
@@ -2861,12 +2860,12 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2861
2860
  },
2862
2861
  emits: ["update:model-value"],
2863
2862
  setup(e, { emit: r }) {
2864
- const { t: o } = useI18n(), m = e, i = r, u = ref(m.modelValue ?? {}), l = ref(
2863
+ const { t: o } = useI18n(), p = e, u = r, m = ref(p.modelValue ?? {}), l = ref(
2865
2864
  (() => {
2866
2865
  const f = {};
2867
- return u.value.workingHour && Object.keys(u.value.workingHour).forEach((c) => {
2868
- const k = u.value.workingHour[c];
2869
- k && "periods" in k && Array.isArray(k.periods) ? f[c] = k.periods : Array.isArray(k) && (f[c] = k);
2866
+ return m.value.workingHour && Object.keys(m.value.workingHour).forEach((c) => {
2867
+ const b = m.value.workingHour[c];
2868
+ b && "periods" in b && Array.isArray(b.periods) ? f[c] = b.periods : Array.isArray(b) && (f[c] = b);
2870
2869
  }), f;
2871
2870
  })()
2872
2871
  ), n = [
@@ -2881,26 +2880,26 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2881
2880
  l.value[f] || (l.value[f] = []), l.value[f].push({
2882
2881
  startTime: "00:00",
2883
2882
  endTime: "23:59"
2884
- }), v();
2885
- }, s = (f, c) => {
2886
- l.value[f] && l.value[f].length > c && (l.value[f].splice(c, 1), l.value[f].length === 0 && delete l.value[f], v());
2887
- }, v = () => {
2883
+ }), g();
2884
+ }, d = (f, c) => {
2885
+ l.value[f] && l.value[f].length > c && (l.value[f].splice(c, 1), l.value[f].length === 0 && delete l.value[f], g());
2886
+ }, g = () => {
2888
2887
  const f = Object.keys(l.value).reduce(
2889
- (c, k) => (l.value[k] && l.value[k].length > 0 && (c[k] = {
2890
- periods: l.value[k]
2888
+ (c, b) => (l.value[b] && l.value[b].length > 0 && (c[b] = {
2889
+ periods: l.value[b]
2891
2890
  }), c),
2892
2891
  {}
2893
2892
  );
2894
- u.value.workingHour = Object.keys(f).length > 0 ? f : void 0;
2893
+ m.value.workingHour = Object.keys(f).length > 0 ? f : void 0;
2895
2894
  };
2896
- return watch(u, () => i("update:model-value", u.value), { deep: !0 }), watch(l, v, { deep: !0 }), (f, c) => {
2897
- const k = resolveComponent("FmSelect"), x = resolveComponent("FmStepperField"), h = resolveComponent("FmCheckbox"), g = resolveComponent("FmTimePicker"), d = resolveComponent("FmButton");
2895
+ return watch(m, () => u("update:model-value", m.value), { deep: !0 }), watch(l, g, { deep: !0 }), (f, c) => {
2896
+ const b = resolveComponent("FmSelect"), x = resolveComponent("FmStepperField"), k = resolveComponent("FmCheckbox"), v = resolveComponent("FmTimePicker"), s = resolveComponent("FmButton");
2898
2897
  return openBlock(), createElementBlock("div", _hoisted_1$a, [
2899
2898
  createElementVNode("div", _hoisted_2$7, [
2900
- createVNode(k, {
2899
+ createVNode(b, {
2901
2900
  label: unref(o)("connect.template.eaterType"),
2902
- modelValue: unref(u).eaterType,
2903
- "onUpdate:modelValue": c[0] || (c[0] = (p) => unref(u).eaterType = p),
2901
+ modelValue: unref(m).eaterType,
2902
+ "onUpdate:modelValue": c[0] || (c[0] = (i) => unref(m).eaterType = i),
2904
2903
  items: [
2905
2904
  { label: unref(o)("connect.template.allEaters"), value: "all" },
2906
2905
  { label: unref(o)("connect.template.newEatersOnly"), value: "new" },
@@ -2912,8 +2911,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2912
2911
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "eaterType")]
2913
2912
  }, null, 8, ["label", "modelValue", "items", "rules"]),
2914
2913
  createVNode(x, {
2915
- modelValue: unref(u).minBasketAmount,
2916
- "onUpdate:modelValue": c[1] || (c[1] = (p) => unref(u).minBasketAmount = p),
2914
+ modelValue: unref(m).minBasketAmount,
2915
+ "onUpdate:modelValue": c[1] || (c[1] = (i) => unref(m).minBasketAmount = i),
2917
2916
  "show-steppers": !1,
2918
2917
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "minBasketAmount")]
2919
2918
  }, {
@@ -2928,8 +2927,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2928
2927
  _: 1
2929
2928
  }, 8, ["modelValue", "rules"]),
2930
2929
  createVNode(x, {
2931
- modelValue: unref(u).bundleQuantity,
2932
- "onUpdate:modelValue": c[2] || (c[2] = (p) => unref(u).bundleQuantity = p),
2930
+ modelValue: unref(m).bundleQuantity,
2931
+ "onUpdate:modelValue": c[2] || (c[2] = (i) => unref(m).bundleQuantity = i),
2933
2932
  "show-steppers": !1,
2934
2933
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "bundleQuantity")]
2935
2934
  }, {
@@ -2947,46 +2946,46 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2947
2946
  createElementVNode("div", _hoisted_3$5, [
2948
2947
  createElementVNode("div", _hoisted_4$4, [
2949
2948
  createElementVNode("div", _hoisted_5$4, toDisplayString(unref(o)("connect.template.operationHours")), 1),
2950
- (openBlock(), createElementBlock(Fragment, null, renderList(n, (p) => createElementVNode("div", {
2951
- key: p.key,
2949
+ (openBlock(), createElementBlock(Fragment, null, renderList(n, (i) => createElementVNode("div", {
2950
+ key: i.key,
2952
2951
  class: "space-y-2"
2953
2952
  }, [
2954
2953
  createElementVNode("div", _hoisted_6$3, [
2955
- createVNode(h, {
2956
- label: p.label,
2957
- "model-value": !!(unref(l)[p.key] && unref(l)[p.key].length > 0),
2954
+ createVNode(k, {
2955
+ label: i.label,
2956
+ "model-value": !!(unref(l)[i.key] && unref(l)[i.key].length > 0),
2958
2957
  "onUpdate:modelValue": (C) => {
2959
- C ? a(p.key) : (unref(l)[p.key] = [], delete unref(l)[p.key], v());
2958
+ C ? a(i.key) : (unref(l)[i.key] = [], delete unref(l)[i.key], g());
2960
2959
  }
2961
2960
  }, null, 8, ["label", "model-value", "onUpdate:modelValue"])
2962
2961
  ]),
2963
- unref(l)[p.key] && unref(l)[p.key].length > 0 ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
2964
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l)[p.key] || [], (C, V) => (openBlock(), createElementBlock("div", {
2962
+ unref(l)[i.key] && unref(l)[i.key].length > 0 ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
2963
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l)[i.key] || [], (C, V) => (openBlock(), createElementBlock("div", {
2965
2964
  key: V,
2966
2965
  class: "flex items-center space-x-2 w-100"
2967
2966
  }, [
2968
- createVNode(g, {
2967
+ createVNode(v, {
2969
2968
  "model-value": C.startTime || "",
2970
- "onUpdate:modelValue": (N) => {
2971
- unref(l)[p.key] && unref(l)[p.key][V] && (unref(l)[p.key][V].startTime = N || "", v());
2969
+ "onUpdate:modelValue": ($) => {
2970
+ unref(l)[i.key] && unref(l)[i.key][V] && (unref(l)[i.key][V].startTime = $ || "", g());
2972
2971
  }
2973
2972
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2974
2973
  c[3] || (c[3] = createElementVNode("span", null, "to", -1)),
2975
- createVNode(g, {
2974
+ createVNode(v, {
2976
2975
  "model-value": C.endTime || "",
2977
- "onUpdate:modelValue": (N) => {
2978
- unref(l)[p.key] && unref(l)[p.key][V] && (unref(l)[p.key][V].endTime = N || "", v());
2976
+ "onUpdate:modelValue": ($) => {
2977
+ unref(l)[i.key] && unref(l)[i.key][V] && (unref(l)[i.key][V].endTime = $ || "", g());
2979
2978
  }
2980
2979
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2981
- createVNode(d, {
2980
+ createVNode(s, {
2982
2981
  variant: "tertiary",
2983
2982
  size: "sm",
2984
- onClick: (N) => s(p.key, V),
2983
+ onClick: ($) => d(i.key, V),
2985
2984
  icon: "close"
2986
2985
  }, null, 8, ["onClick"]),
2987
- V === 0 ? (openBlock(), createBlock(d, {
2986
+ V === 0 ? (openBlock(), createBlock(s, {
2988
2987
  key: 0,
2989
- onClick: (N) => a(p.key),
2988
+ onClick: ($) => a(i.key),
2990
2989
  icon: "add",
2991
2990
  variant: "plain"
2992
2991
  }, null, 8, ["onClick"])) : createCommentVNode("", !0)
@@ -3011,14 +3010,14 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3011
3010
  },
3012
3011
  emits: ["update:model-value"],
3013
3012
  setup(e, { emit: r }) {
3014
- const { t: o } = useI18n(), m = e, i = r, u = ref(m.modelValue ?? {});
3015
- return watch(u, () => i("update:model-value", u.value)), (l, n) => {
3013
+ const { t: o } = useI18n(), p = e, u = r, m = ref(p.modelValue ?? {});
3014
+ return watch(m, () => u("update:model-value", m.value)), (l, n) => {
3016
3015
  const a = resolveComponent("FmStepperField");
3017
3016
  return openBlock(), createElementBlock("div", _hoisted_1$9, [
3018
3017
  createElementVNode("div", _hoisted_2$6, [
3019
3018
  createVNode(a, {
3020
- modelValue: unref(u).totalCount,
3021
- "onUpdate:modelValue": n[0] || (n[0] = (s) => unref(u).totalCount = s),
3019
+ modelValue: unref(m).totalCount,
3020
+ "onUpdate:modelValue": n[0] || (n[0] = (d) => unref(m).totalCount = d),
3022
3021
  "show-steppers": !1,
3023
3022
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "totalCount")]
3024
3023
  }, {
@@ -3033,8 +3032,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3033
3032
  _: 1
3034
3033
  }, 8, ["modelValue", "rules"]),
3035
3034
  createVNode(a, {
3036
- modelValue: unref(u).totalCountPerUser,
3037
- "onUpdate:modelValue": n[1] || (n[1] = (s) => unref(u).totalCountPerUser = s),
3035
+ modelValue: unref(m).totalCountPerUser,
3036
+ "onUpdate:modelValue": n[1] || (n[1] = (d) => unref(m).totalCountPerUser = d),
3038
3037
  "show-steppers": !1,
3039
3038
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "totalCountPerUser")]
3040
3039
  }, {
@@ -3061,7 +3060,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3061
3060
  },
3062
3061
  emits: ["update:model-value"],
3063
3062
  setup(e, { emit: r }) {
3064
- const { t: o } = useI18n(), m = e, i = r, u = computed(() => [
3063
+ const { t: o } = useI18n(), p = e, u = r, m = computed(() => [
3065
3064
  {
3066
3065
  label: o("connect.campaign.mission.typeOption.STAMP.label"),
3067
3066
  description: o("connect.campaign.mission.typeOption.STAMP.description"),
@@ -3078,21 +3077,21 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3078
3077
  return openBlock(), createElementBlock("div", _hoisted_1$8, [
3079
3078
  createElementVNode("div", _hoisted_2$5, toDisplayString(unref(o)("connect.template.select_game")), 1),
3080
3079
  createElementVNode("div", _hoisted_3$4, [
3081
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (s) => (openBlock(), createBlock(a, {
3080
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (d) => (openBlock(), createBlock(a, {
3082
3081
  variant: "outlined",
3083
3082
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
3084
- "col-span-2": unref(u).length == 1,
3085
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == s.value,
3086
- "hover:bg-fm-color-opacity-sm": e.modelValue != s.value
3083
+ "col-span-2": unref(m).length == 1,
3084
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == d.value,
3085
+ "hover:bg-fm-color-opacity-sm": e.modelValue != d.value
3087
3086
  }]),
3088
3087
  onClick: () => {
3089
- m.modelValue != s.value && i("update:model-value", s.value);
3088
+ p.modelValue != d.value && u("update:model-value", d.value);
3090
3089
  },
3091
- key: s.value
3090
+ key: d.value
3092
3091
  }, {
3093
3092
  default: withCtx(() => [
3094
- createElementVNode("div", _hoisted_4$3, toDisplayString(s.label), 1),
3095
- createElementVNode("div", _hoisted_5$3, toDisplayString(s.description), 1)
3093
+ createElementVNode("div", _hoisted_4$3, toDisplayString(d.label), 1),
3094
+ createElementVNode("div", _hoisted_5$3, toDisplayString(d.description), 1)
3096
3095
  ]),
3097
3096
  _: 2
3098
3097
  }, 1032, ["class", "onClick"]))), 128))
@@ -3116,14 +3115,14 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3116
3115
  emits: ["update:model-value"],
3117
3116
  setup(e, { emit: r }) {
3118
3117
  const o = r;
3119
- return (m, i) => {
3120
- const u = resolveComponent("FmStepperField");
3118
+ return (p, u) => {
3119
+ const m = resolveComponent("FmStepperField");
3121
3120
  return openBlock(), createElementBlock("div", _hoisted_1$7, [
3122
- i[1] || (i[1] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Input the total number of stamps needed to complete the mission ", -1)),
3123
- createVNode(u, {
3121
+ u[1] || (u[1] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Input the total number of stamps needed to complete the mission ", -1)),
3122
+ createVNode(m, {
3124
3123
  label: "Maximum to collect",
3125
3124
  "model-value": e.modelValue || null,
3126
- "onUpdate:modelValue": i[0] || (i[0] = (l) => o("update:model-value", l)),
3125
+ "onUpdate:modelValue": u[0] || (u[0] = (l) => o("update:model-value", l)),
3127
3126
  "helper-text": e.helperText || "Set the threshold required for reward eligibility",
3128
3127
  "helper-state": e.helperState || "none"
3129
3128
  }, null, 8, ["model-value", "helper-text", "helper-state"])
@@ -3140,28 +3139,31 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3140
3139
  },
3141
3140
  emits: ["update:model-value"],
3142
3141
  setup(e, { expose: r, emit: o }) {
3143
- const m = e, i = useMembershipStore(), { minor: u } = useLoading, l = ref(!1), n = ref(), a = ref(), s = ref(0), v = computed(() => {
3144
- var d;
3145
- return ((d = i.loyaltyRewards.items.find(
3146
- (p) => {
3147
- var C;
3148
- return p.value === ((C = n.value) == null ? void 0 : C.collectible);
3142
+ const p = e, u = useMembershipStore(), { minor: m } = useLoading, l = ref(!1), n = ref(), a = ref(), d = ref(0), g = computed(() => {
3143
+ var i, C;
3144
+ const s = (i = u.loyaltyRewards.items.find(
3145
+ (V) => {
3146
+ var $;
3147
+ return V.value === (($ = n.value) == null ? void 0 : $.collectible);
3149
3148
  }
3150
- )) == null ? void 0 : d.raw.type) === "CREDIT" ? FdoThresholdCreditReward : FdtoThresholdReward;
3151
- }), f = computed(() => {
3152
- const g = v.value.safeParse(n.value);
3153
- return g.success ? [] : g.error.errors;
3149
+ )) == null ? void 0 : i.raw.type;
3150
+ return ((C = n.value) == null ? void 0 : C.type) === "LOYALTY" && (s === "CREDIT" || s === "TITLE");
3151
+ }), f = computed(
3152
+ () => g.value ? FdoThresholdCreditReward : FdtoThresholdReward
3153
+ ), c = computed(() => {
3154
+ const s = f.value.safeParse(n.value);
3155
+ return s.success ? [] : s.error.errors;
3154
3156
  });
3155
- function c(g, d, p) {
3156
- g && (n.value = d, s.value = p), l.value = g;
3157
+ function b(s, i, C) {
3158
+ s && (n.value = i, d.value = C), l.value = s;
3157
3159
  }
3158
- const k = o;
3159
- async function x() {
3160
- const g = v.value.safeParse(n.value);
3161
- g.success && (await u(
3160
+ const x = o;
3161
+ async function k() {
3162
+ const s = f.value.safeParse(n.value);
3163
+ s.success && (await m(
3162
3164
  async () => {
3163
- g.data.type === "VOUCHER" && a.value && (g.data.collectibleConfig.image = await firebaseStorage.update(
3164
- g.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, a.value),
3165
+ s.data.type === "VOUCHER" && a.value && (s.data.collectibleConfig.image = await firebaseStorage.update(
3166
+ s.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, a.value),
3165
3167
  a.value
3166
3168
  ));
3167
3169
  },
@@ -3169,82 +3171,82 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3169
3171
  message: "Uploading reward image",
3170
3172
  successMessage: "Reward image updated"
3171
3173
  }
3172
- ), k("update:model-value", g.data, s.value));
3174
+ ), x("update:model-value", s.data, d.value));
3173
3175
  }
3174
- const h = ref();
3176
+ const v = ref();
3175
3177
  return r({
3176
- showSheet: c
3177
- }), (g, d) => {
3178
- const p = resolveComponent("FmStepperField"), C = resolveComponent("FmSelect"), V = resolveComponent("FmForm"), N = resolveComponent("FmButton"), R = resolveComponent("FmSideSheet");
3179
- return openBlock(), createBlock(R, {
3178
+ showSheet: b
3179
+ }), (s, i) => {
3180
+ const C = resolveComponent("FmStepperField"), V = resolveComponent("FmSelect"), $ = resolveComponent("FmForm"), S = resolveComponent("FmButton"), w = resolveComponent("FmSideSheet");
3181
+ return openBlock(), createBlock(w, {
3180
3182
  "max-width": 560,
3181
3183
  modelValue: unref(l),
3182
3184
  "onUpdate:modelValue": [
3183
- d[10] || (d[10] = (E) => isRef(l) ? l.value = E : null),
3184
- d[11] || (d[11] = (E) => l.value = E)
3185
+ i[10] || (i[10] = (R) => isRef(l) ? l.value = R : null),
3186
+ i[11] || (i[11] = (R) => l.value = R)
3185
3187
  ],
3186
3188
  header: "Edit reward",
3187
3189
  "dismiss-away": ""
3188
3190
  }, {
3189
3191
  "side-sheet-footer": withCtx(() => [
3190
3192
  createElementVNode("div", _hoisted_1$6, [
3191
- createVNode(N, {
3193
+ createVNode(S, {
3192
3194
  variant: "primary",
3193
3195
  type: "button",
3194
3196
  label: "Confirm",
3195
- disabled: unref(f).length > 0,
3196
- onClick: d[8] || (d[8] = async () => {
3197
- var E;
3198
- return (E = unref(h)) == null ? void 0 : E.validateInputs();
3197
+ disabled: unref(c).length > 0,
3198
+ onClick: i[8] || (i[8] = async () => {
3199
+ var R;
3200
+ return (R = unref(v)) == null ? void 0 : R.validateInputs();
3199
3201
  })
3200
3202
  }, null, 8, ["disabled"]),
3201
- createVNode(N, {
3203
+ createVNode(S, {
3202
3204
  variant: "secondary",
3203
3205
  type: "button",
3204
3206
  label: "Cancel",
3205
- onClick: d[9] || (d[9] = (E) => l.value = !1)
3207
+ onClick: i[9] || (i[9] = (R) => l.value = !1)
3206
3208
  })
3207
3209
  ])
3208
3210
  ]),
3209
3211
  default: withCtx(() => [
3210
3212
  createVNode(JsonViewer, { json: unref(n) }, null, 8, ["json"]),
3211
- unref(n) ? (openBlock(), createBlock(V, {
3213
+ unref(n) ? (openBlock(), createBlock($, {
3212
3214
  key: 0,
3213
3215
  class: "flex flex-col gap-y-24",
3214
3216
  ref_key: "formRef",
3215
- ref: h,
3216
- onValidationSuccess: d[7] || (d[7] = (E) => x())
3217
+ ref: v,
3218
+ onValidationSuccess: i[7] || (i[7] = (R) => k())
3217
3219
  }, {
3218
3220
  default: withCtx(() => {
3219
- var E, D;
3221
+ var R;
3220
3222
  return [
3221
- unref(n).type ? (openBlock(), createBlock(p, {
3223
+ unref(n).type ? (openBlock(), createBlock(C, {
3222
3224
  key: 0,
3223
3225
  label: "Threshold",
3224
3226
  rules: [
3225
3227
  unref(ZodHelper).toRule(
3226
3228
  unref(z).number().min(1).max(
3227
- m.maxThreshold,
3228
- `Number cannot be more than ${m.maxThreshold}`
3229
+ p.maxThreshold,
3230
+ `Number cannot be more than ${p.maxThreshold}`
3229
3231
  )
3230
3232
  )
3231
3233
  ],
3232
3234
  "model-value": unref(n).threshold,
3233
- "onUpdate:modelValue": d[0] || (d[0] = (w) => n.value = {
3235
+ "onUpdate:modelValue": i[0] || (i[0] = (F) => n.value = {
3234
3236
  ...unref(n),
3235
- threshold: w
3237
+ threshold: F
3236
3238
  })
3237
3239
  }, null, 8, ["rules", "model-value"])) : createCommentVNode("", !0),
3238
- createVNode(C, {
3240
+ createVNode(V, {
3239
3241
  label: "Reward Type",
3240
3242
  items: [
3241
3243
  { label: "Voucher", value: "VOUCHER" },
3242
3244
  { label: "Loyalty", value: "LOYALTY" }
3243
3245
  ],
3244
3246
  "model-value": unref(n).type,
3245
- "onUpdate:modelValue": d[1] || (d[1] = (w) => {
3246
- var A, H;
3247
- w === "VOUCHER" ? n.value = {
3247
+ "onUpdate:modelValue": i[1] || (i[1] = (F) => {
3248
+ var M, H;
3249
+ F === "VOUCHER" ? n.value = {
3248
3250
  collectible: null,
3249
3251
  type: "VOUCHER",
3250
3252
  collectibleConfig: unref(initCollectibleConfig)("VOUCHER", {
@@ -3257,9 +3259,9 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3257
3259
  validityOption: {
3258
3260
  validForDay: 7
3259
3261
  },
3260
- threshold: (A = unref(n)) == null ? void 0 : A.threshold
3262
+ threshold: (M = unref(n)) == null ? void 0 : M.threshold
3261
3263
  } : n.value = {
3262
- collectible: unref(i).loyaltyRewards.raw[0]._id,
3264
+ collectible: unref(u).loyaltyRewards.raw[0]._id,
3263
3265
  type: "LOYALTY",
3264
3266
  earningOption: {
3265
3267
  amount: 1,
@@ -3272,56 +3274,51 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3272
3274
  };
3273
3275
  })
3274
3276
  }, null, 8, ["model-value"]),
3275
- unref(n).type == "LOYALTY" ? (openBlock(), createBlock(C, {
3277
+ unref(n).type == "LOYALTY" ? (openBlock(), createBlock(V, {
3276
3278
  key: 1,
3277
3279
  label: "Loyalty type",
3278
- rules: [unref(ZodHelper).ruleAtPath(unref(v), "collectible", [unref(n).type])],
3279
- items: unref(i).loyaltyRewards.items,
3280
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "collectible", [unref(n).type])],
3281
+ items: unref(u).loyaltyRewards.items,
3280
3282
  "model-value": unref(n).collectible,
3281
- "onUpdate:modelValue": d[2] || (d[2] = (w) => unref(n).collectible = w)
3283
+ "onUpdate:modelValue": i[2] || (i[2] = (F) => unref(n).collectible = F)
3282
3284
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
3283
3285
  unref(n).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
3284
- d[12] || (d[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
3286
+ i[12] || (i[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
3285
3287
  createVNode(_sfc_main$z, {
3286
3288
  class: "mt-[-8px]",
3287
- rules: [unref(ZodHelper).ruleAtPath(unref(v), "earningOption", [unref(n).type])],
3288
- "helper-state": unref(ZodHelper).helperState(unref(f), "earningOption"),
3289
- "error-text": unref(ZodHelper).helperText(unref(f), "earningOption"),
3289
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "earningOption", [unref(n).type])],
3290
+ "helper-state": unref(ZodHelper).helperState(unref(c), "earningOption"),
3291
+ "error-text": unref(ZodHelper).helperText(unref(c), "earningOption"),
3290
3292
  "fixed-type": !0,
3291
3293
  "model-value": unref(n).earningOption,
3292
- "onUpdate:modelValue": d[3] || (d[3] = (w) => n.value = {
3294
+ "onUpdate:modelValue": i[3] || (i[3] = (F) => n.value = {
3293
3295
  ...unref(n),
3294
- earningOption: w
3296
+ earningOption: F
3295
3297
  })
3296
3298
  }, null, 8, ["rules", "helper-state", "error-text", "model-value"]),
3297
3299
  createVNode(_sfc_main$A, {
3298
3300
  class: "!gap-24",
3299
3301
  type: unref(n).type === "LOYALTY" ? "custom" : "range",
3300
- "for-credit": unref(n).type === "LOYALTY" && ((E = unref(i).loyaltyRewards.items.find(
3301
- (w) => {
3302
- var A;
3303
- return w.value === ((A = unref(n)) == null ? void 0 : A.collectible);
3304
- }
3305
- )) == null ? void 0 : E.raw.type) === "CREDIT",
3306
- rules: [unref(ZodHelper).ruleAtPath(unref(v), "validityOption", [unref(n).type])],
3302
+ "for-credit": unref(g),
3303
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "validityOption", [unref(n).type])],
3307
3304
  "model-value": unref(n).validityOption,
3308
- "onUpdate:modelValue": d[4] || (d[4] = (w) => n.value = {
3305
+ "onUpdate:modelValue": i[4] || (i[4] = (F) => n.value = {
3309
3306
  ...unref(n),
3310
- validityOption: w
3307
+ validityOption: F
3311
3308
  })
3312
3309
  }, null, 8, ["type", "for-credit", "rules", "model-value"])
3313
3310
  ], 64)) : createCommentVNode("", !0),
3314
3311
  unref(n).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$B, {
3315
3312
  key: 3,
3316
3313
  "reward-image": unref(a),
3317
- "model-value": ((D = unref(n)) == null ? void 0 : D.collectibleConfig) ?? void 0,
3318
- "onUpdate:modelValue": d[5] || (d[5] = (w) => n.value = {
3314
+ "model-value": ((R = unref(n)) == null ? void 0 : R.collectibleConfig) ?? void 0,
3315
+ "onUpdate:modelValue": i[5] || (i[5] = (F) => n.value = {
3319
3316
  ...unref(n),
3320
- collectibleConfig: w
3317
+ collectibleConfig: F
3321
3318
  }),
3322
- "onUpdate:rewardImage": d[6] || (d[6] = (w) => a.value = w)
3319
+ "onUpdate:rewardImage": i[6] || (i[6] = (F) => a.value = F)
3323
3320
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
3324
- createVNode(JsonViewer, { json: unref(f) }, null, 8, ["json"])
3321
+ createVNode(JsonViewer, { json: unref(c) }, null, 8, ["json"])
3325
3322
  ];
3326
3323
  }),
3327
3324
  _: 1
@@ -3355,19 +3352,19 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3355
3352
  }
3356
3353
  },
3357
3354
  setup(e) {
3358
- const r = e, { maxRange: o, currentRange: m, markers: i } = toRefs(r), u = computed(
3359
- () => Math.min(m.value / o.value * 100, 100)
3355
+ const r = e, { maxRange: o, currentRange: p, markers: u } = toRefs(r), m = computed(
3356
+ () => Math.min(p.value / o.value * 100, 100)
3360
3357
  ), l = (n) => n / o.value * 100;
3361
3358
  return (n, a) => {
3362
- const s = resolveComponent("FmIcon");
3359
+ const d = resolveComponent("FmIcon");
3363
3360
  return e.type === "STAMP" ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
3364
- (openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(o), 40), (v) => (openBlock(), createBlock(s, {
3361
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(o), 40), (g) => (openBlock(), createBlock(d, {
3365
3362
  class: normalizeClass(
3366
- unref(m) >= v ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
3363
+ unref(p) >= g ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
3367
3364
  ),
3368
- outline: unref(m) < v,
3369
- key: v,
3370
- name: unref(i).some((f) => f === v) ? "featured_seasonal_and_gifts" : "check_circle"
3365
+ outline: unref(p) < g,
3366
+ key: g,
3367
+ name: unref(u).some((f) => f === g) ? "featured_seasonal_and_gifts" : "check_circle"
3371
3368
  }, null, 8, ["class", "outline", "name"]))), 128))
3372
3369
  ])) : (openBlock(), createElementBlock("div", {
3373
3370
  key: 1,
@@ -3375,12 +3372,12 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3375
3372
  }, [
3376
3373
  createElementVNode("div", {
3377
3374
  class: normalizeClass(["bg-fm-color-primary", "absolute top-0 left-0 h-full rounded-lg"]),
3378
- style: normalizeStyle({ width: unref(u) + "%" })
3375
+ style: normalizeStyle({ width: unref(m) + "%" })
3379
3376
  }, null, 4),
3380
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i), (v, f) => (openBlock(), createElementBlock("div", {
3377
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (g, f) => (openBlock(), createElementBlock("div", {
3381
3378
  key: f,
3382
3379
  class: "absolute -top-1.5 flex flex-col items-center -translate-x-1/2",
3383
- style: normalizeStyle({ left: l(v) + "%" })
3380
+ style: normalizeStyle({ left: l(g) + "%" })
3384
3381
  }, [
3385
3382
  createElementVNode("div", _hoisted_2$4, [
3386
3383
  createElementVNode("div", {
@@ -3394,16 +3391,16 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3394
3391
  }
3395
3392
  }), isObject = (e) => e !== null && typeof e == "object";
3396
3393
  function changeKeysFactory(e) {
3397
- return function r(o, m = 1, i) {
3398
- if (m === 0 || !isObject(o))
3394
+ return function r(o, p = 1, u) {
3395
+ if (p === 0 || !isObject(o))
3399
3396
  return o;
3400
3397
  if (Array.isArray(o))
3401
- return o.map((l) => r(l, m - 1, i));
3402
- const u = Object.create(Object.getPrototypeOf(o));
3398
+ return o.map((l) => r(l, p - 1, u));
3399
+ const m = Object.create(Object.getPrototypeOf(o));
3403
3400
  return Object.keys(o).forEach((l) => {
3404
- const n = o[l], a = e(l, i), s = r(n, m - 1, i);
3405
- u[a] = s;
3406
- }), u;
3401
+ const n = o[l], a = e(l, u), d = r(n, p - 1, u);
3402
+ m[a] = d;
3403
+ }), m;
3407
3404
  };
3408
3405
  }
3409
3406
  const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class: "space-y-16" }, _hoisted_2$3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_3$3 = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$2 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_5$2 = { class: "fm-typo-en-title-sm-800" }, _hoisted_6$2 = { class: "flex items-center gap-4" }, _hoisted_7$2 = { class: "fm-typo-en-body-lg-600" }, _hoisted_8$2 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_9$2 = { class: "flex items-center gap-16" }, _hoisted_10$2 = { key: 0 }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
@@ -3420,49 +3417,49 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3420
3417
  },
3421
3418
  emits: ["update:model-value"],
3422
3419
  setup(e, { emit: r }) {
3423
- const { t: o } = useI18n(), m = e, i = r, u = useMembershipStore(), l = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), n = computed(
3424
- () => m.modelValue.sort((g, d) => g.threshold - d.threshold) ?? []
3420
+ const { t: o } = useI18n(), p = e, u = r, m = useMembershipStore(), l = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), n = computed(
3421
+ () => p.modelValue.sort((v, s) => v.threshold - s.threshold) ?? []
3425
3422
  ), a = computed(() => {
3426
- const g = l.safeParse(n.value);
3427
- return g.success ? [] : g.error.errors;
3428
- }), s = ref();
3429
- function v(g, d) {
3423
+ const v = l.safeParse(n.value);
3424
+ return v.success ? [] : v.error.errors;
3425
+ }), d = ref();
3426
+ function g(v, s) {
3430
3427
  var C;
3431
- const p = [...n.value];
3432
- p[d] = g, (C = s.value) == null || C.showSheet(!1), i("update:model-value", p);
3428
+ const i = [...n.value];
3429
+ i[s] = v, (C = d.value) == null || C.showSheet(!1), u("update:model-value", i);
3433
3430
  }
3434
- function f(g) {
3435
- const d = g.type == "VOUCHER" ? g.collectibleConfig : u.collectibles.find(
3436
- (V) => V._id.toString() == g.collectible
3437
- ), p = CollectionUtils.formattedType((d == null ? void 0 : d.name) || ""), C = g.earningOption.type == "FIXED" ? o("connect.template.mission_pool.reward_sublabel_fixed", {
3438
- threshold: g.threshold,
3439
- amount: g.earningOption.amount
3431
+ function f(v) {
3432
+ const s = v.type == "VOUCHER" ? v.collectibleConfig : m.collectibles.find(
3433
+ (V) => V._id.toString() == v.collectible
3434
+ ), i = CollectionUtils.formattedType((s == null ? void 0 : s.name) || ""), C = v.earningOption.type == "FIXED" ? o("connect.template.mission_pool.reward_sublabel_fixed", {
3435
+ threshold: v.threshold,
3436
+ amount: v.earningOption.amount
3440
3437
  }) : o("connect.template.mission_pool.reward_sublabel_per_spend", {
3441
- threshold: g.threshold,
3442
- amount: g.earningOption.amount,
3443
- every: g.earningOption.every
3438
+ threshold: v.threshold,
3439
+ amount: v.earningOption.amount,
3440
+ every: v.earningOption.every
3444
3441
  });
3445
3442
  return {
3446
- label: isNullOrEmpty(p) ? o("connect.template.mission_pool.no_reward") : p,
3443
+ label: isNullOrEmpty(i) ? o("connect.template.mission_pool.no_reward") : i,
3447
3444
  sublabel: C
3448
3445
  };
3449
3446
  }
3450
- function c(g) {
3451
- var p;
3452
- const d = [...n.value];
3453
- (p = s.value) == null || p.showSheet(!0, d[g], g);
3447
+ function c(v) {
3448
+ var i;
3449
+ const s = [...n.value];
3450
+ (i = d.value) == null || i.showSheet(!0, s[v], v);
3454
3451
  }
3455
- function k(g) {
3456
- const d = [...n.value];
3457
- d.splice(g, 1), i("update:model-value", d);
3452
+ function b(v) {
3453
+ const s = [...n.value];
3454
+ s.splice(v, 1), u("update:model-value", s);
3458
3455
  }
3459
3456
  function x() {
3460
- var g;
3461
- (g = s.value) == null || g.showSheet(
3457
+ var v;
3458
+ (v = d.value) == null || v.showSheet(
3462
3459
  !0,
3463
3460
  {
3464
3461
  type: "LOYALTY",
3465
- collectible: u.loyaltyRewards.items[0].value,
3462
+ collectible: m.loyaltyRewards.items[0].value,
3466
3463
  threshold: null,
3467
3464
  validityOption: {
3468
3465
  validForDay: 7
@@ -3475,46 +3472,46 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3475
3472
  n.value.length
3476
3473
  );
3477
3474
  }
3478
- function h(g) {
3479
- var d, p;
3480
- return g.type == "VOUCHER" ? (d = g.collectibleConfig) == null ? void 0 : d.name : sentenceCase(
3481
- ((p = u.loyaltyRewards.items.find(
3482
- (C) => C.value == g.collectible
3483
- )) == null ? void 0 : p.label) || ""
3475
+ function k(v) {
3476
+ var s, i;
3477
+ return v.type == "VOUCHER" ? (s = v.collectibleConfig) == null ? void 0 : s.name : sentenceCase(
3478
+ ((i = m.loyaltyRewards.items.find(
3479
+ (C) => C.value == v.collectible
3480
+ )) == null ? void 0 : i.label) || ""
3484
3481
  );
3485
3482
  }
3486
- return (g, d) => {
3487
- const p = resolveComponent("FmButton"), C = resolveComponent("FmCard"), V = resolveComponent("FmHelperText");
3483
+ return (v, s) => {
3484
+ const i = resolveComponent("FmButton"), C = resolveComponent("FmCard"), V = resolveComponent("FmHelperText");
3488
3485
  return openBlock(), createElementBlock("div", _hoisted_1$4, [
3489
3486
  createElementVNode("div", _hoisted_2$3, toDisplayString(unref(o)("connect.template.configure_reward_customer")), 1),
3490
- createVNode(p, {
3487
+ createVNode(i, {
3491
3488
  label: unref(o)("connect.template.mission_pool.add_reward"),
3492
- onClick: d[0] || (d[0] = (N) => x()),
3489
+ onClick: s[0] || (s[0] = ($) => x()),
3493
3490
  variant: "plain",
3494
3491
  icon: "add"
3495
3492
  }, null, 8, ["label"]),
3496
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (N, R) => (openBlock(), createBlock(C, {
3497
- key: R,
3493
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), ($, S) => (openBlock(), createBlock(C, {
3494
+ key: S,
3498
3495
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
3499
3496
  variant: "outlined",
3500
- onClick: (E) => c(R)
3497
+ onClick: (w) => c(S)
3501
3498
  }, {
3502
3499
  default: withCtx(() => [
3503
3500
  createElementVNode("div", null, [
3504
- createElementVNode("div", _hoisted_3$3, toDisplayString(f(N).label), 1),
3505
- createElementVNode("div", _hoisted_4$2, toDisplayString(f(N).sublabel), 1)
3501
+ createElementVNode("div", _hoisted_3$3, toDisplayString(f($).label), 1),
3502
+ createElementVNode("div", _hoisted_4$2, toDisplayString(f($).sublabel), 1)
3506
3503
  ]),
3507
- createVNode(p, {
3504
+ createVNode(i, {
3508
3505
  icon: "delete",
3509
3506
  variant: "tertiary",
3510
- onClick: (E) => (E.stopPropagation(), k(R))
3507
+ onClick: (w) => (w.stopPropagation(), b(S))
3511
3508
  }, null, 8, ["onClick"])
3512
3509
  ]),
3513
3510
  _: 2
3514
3511
  }, 1032, ["onClick"]))), 128)),
3515
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter((N) => N.path.join(".") == ""), (N) => (openBlock(), createBlock(V, {
3516
- key: N.message,
3517
- text: N.message,
3512
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter(($) => $.path.join(".") == ""), ($) => (openBlock(), createBlock(V, {
3513
+ key: $.message,
3514
+ text: $.message,
3518
3515
  state: "error"
3519
3516
  }, null, 8, ["text"]))), 128)),
3520
3517
  createElementVNode("div", _hoisted_5$2, toDisplayString(unref(o)("connect.template.mission_pool.preview")), 1),
@@ -3524,11 +3521,11 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3524
3521
  class: "p-24 space-y-16 w-fit"
3525
3522
  }, {
3526
3523
  default: withCtx(() => {
3527
- var N, R;
3524
+ var $, S;
3528
3525
  return [
3529
3526
  createElementVNode("div", _hoisted_6$2, [
3530
3527
  createElementVNode("div", null, [
3531
- createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString(((N = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : N.earningOption.amount) > 1 ? (R = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : R.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? h(e.modelValue[e.modelValue.length - 1]) : ""), 1),
3528
+ createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString((($ = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : $.earningOption.amount) > 1 ? (S = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : S.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? k(e.modelValue[e.modelValue.length - 1]) : ""), 1),
3532
3529
  createElementVNode("div", _hoisted_8$2, toDisplayString(unref(o)("connect.template.mission_pool.earn_stamp")), 1)
3533
3530
  ])
3534
3531
  ]),
@@ -3537,7 +3534,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3537
3534
  type: e.mission.type,
3538
3535
  "max-range": e.mission.end,
3539
3536
  currentRange: e.mission.end / 4,
3540
- markers: e.modelValue.map((E) => E.threshold)
3537
+ markers: e.modelValue.map((w) => w.threshold)
3541
3538
  }, null, 8, ["type", "max-range", "currentRange", "markers"]),
3542
3539
  e.mission.type == "PROGRESSIVE" ? (openBlock(), createElementBlock("div", _hoisted_10$2, " 0/" + toDisplayString(e.mission.end.toLocaleString()), 1)) : createCommentVNode("", !0)
3543
3540
  ])
@@ -3547,8 +3544,8 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3547
3544
  })),
3548
3545
  createVNode(_sfc_main$6, {
3549
3546
  ref_key: "sheetRef",
3550
- ref: s,
3551
- "onUpdate:modelValue": v,
3547
+ ref: d,
3548
+ "onUpdate:modelValue": g,
3552
3549
  "max-threshold": e.mission.end
3553
3550
  }, null, 8, ["max-threshold"])
3554
3551
  ]);
@@ -3561,10 +3558,10 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3561
3558
  },
3562
3559
  emits: ["update:model-value"],
3563
3560
  setup(e, { emit: r }) {
3564
- const { t: o } = useI18n(), m = e, i = computed(() => {
3565
- const n = FdoMission.safeParse(m.modelValue);
3561
+ const { t: o } = useI18n(), p = e, u = computed(() => {
3562
+ const n = FdoMission.safeParse(p.modelValue);
3566
3563
  return n.success ? [] : n.error.errors;
3567
- }), u = computed(() => [
3564
+ }), m = computed(() => [
3568
3565
  {
3569
3566
  label: o("connect.campaign.mission.typeOption.STAMP.label"),
3570
3567
  description: o("connect.campaign.mission.typeOption.STAMP.description"),
@@ -3578,27 +3575,27 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3578
3575
  ]), l = r;
3579
3576
  return (n, a) => {
3580
3577
  var f;
3581
- const s = resolveComponent("FmCard"), v = resolveComponent("FmStepperField");
3578
+ const d = resolveComponent("FmCard"), g = resolveComponent("FmStepperField");
3582
3579
  return openBlock(), createElementBlock("div", _hoisted_1$3, [
3583
3580
  createElementVNode("div", _hoisted_2$2, [
3584
3581
  createElementVNode("div", _hoisted_3$2, toDisplayString(unref(o)("connect.campaign.mission.missionType")), 1),
3585
3582
  createElementVNode("div", _hoisted_4$1, toDisplayString(unref(o)("connect.template.select_game")), 1),
3586
3583
  createElementVNode("div", _hoisted_5$1, [
3587
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (c) => {
3588
- var k, x;
3589
- return openBlock(), createBlock(s, {
3584
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (c) => {
3585
+ var b, x;
3586
+ return openBlock(), createBlock(d, {
3590
3587
  variant: "outlined",
3591
3588
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
3592
- "col-span-2": unref(u).length == 1,
3593
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((k = e.modelValue) == null ? void 0 : k.type) == c.value,
3589
+ "col-span-2": unref(m).length == 1,
3590
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((b = e.modelValue) == null ? void 0 : b.type) == c.value,
3594
3591
  "hover:bg-fm-color-opacity-sm": ((x = e.modelValue) == null ? void 0 : x.type) != c.value
3595
3592
  }]),
3596
3593
  onClick: () => {
3597
- var h, g;
3598
- ((h = e.modelValue) == null ? void 0 : h.type) != c.value && l("update:model-value", {
3594
+ var k, v;
3595
+ ((k = e.modelValue) == null ? void 0 : k.type) != c.value && l("update:model-value", {
3599
3596
  ...e.modelValue,
3600
3597
  type: c.value,
3601
- end: ((g = e.modelValue) == null ? void 0 : g.end) || 1
3598
+ end: ((v = e.modelValue) == null ? void 0 : v.end) || 1
3602
3599
  });
3603
3600
  },
3604
3601
  key: c.value
@@ -3615,19 +3612,19 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3615
3612
  createElementVNode("div", _hoisted_8$1, [
3616
3613
  createElementVNode("div", _hoisted_9$1, toDisplayString(unref(o)("connect.campaign.mission.collectionsRequired")), 1),
3617
3614
  createElementVNode("div", _hoisted_10$1, toDisplayString(unref(o)("connect.campaign.mission.collectionsRequiredDescription")), 1),
3618
- createVNode(v, {
3615
+ createVNode(g, {
3619
3616
  label: unref(o)("connect.campaign.mission.maximumToCollect"),
3620
3617
  "model-value": ((f = e.modelValue) == null ? void 0 : f.end) || null,
3621
3618
  "onUpdate:modelValue": a[0] || (a[0] = (c) => {
3622
- var k;
3619
+ var b;
3623
3620
  return l("update:model-value", {
3624
3621
  ...e.modelValue,
3625
- type: ((k = e.modelValue) == null ? void 0 : k.type) || "STAMP",
3622
+ type: ((b = e.modelValue) == null ? void 0 : b.type) || "STAMP",
3626
3623
  end: c
3627
3624
  });
3628
3625
  }),
3629
- "helper-text": unref(ZodHelper).helperText(unref(i), "end") || unref(o)("connect.campaign.mission.thresholdHelperText"),
3630
- "helper-state": unref(ZodHelper).helperState(unref(i), "end") || "none"
3626
+ "helper-text": unref(ZodHelper).helperText(unref(u), "end") || unref(o)("connect.campaign.mission.thresholdHelperText"),
3627
+ "helper-state": unref(ZodHelper).helperState(unref(u), "end") || "none"
3631
3628
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"])
3632
3629
  ])
3633
3630
  ]);
@@ -3636,8 +3633,8 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3636
3633
  });
3637
3634
  function useLocaleText() {
3638
3635
  const { locale: e, t: r } = useI18n();
3639
- function o(m, i) {
3640
- return m ? m[e.value] ?? m["en-US"] ?? r(i) : r(i);
3636
+ function o(p, u) {
3637
+ return p ? p[e.value] ?? p["en-US"] ?? r(u) : r(u);
3641
3638
  }
3642
3639
  return { getLocaleText: o };
3643
3640
  }
@@ -3677,12 +3674,12 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3677
3674
  },
3678
3675
  emits: ["retry-push", "update:model-value", "update:file"],
3679
3676
  setup(e, { emit: r }) {
3680
- const { t: o } = useI18n(), { getLocaleText: m } = useLocaleText(), i = e, u = r;
3681
- function l(v) {
3682
- switch (i.field.type) {
3677
+ const { t: o } = useI18n(), { getLocaleText: p } = useLocaleText(), u = e, m = r;
3678
+ function l(g) {
3679
+ switch (u.field.type) {
3683
3680
  case "timeframe":
3684
- const f = v.startDate ? hooks(v.startDate).startOf("day").toISOString() : void 0, c = v.endDate ? hooks(v.endDate).endOf("day").toISOString() : void 0;
3685
- u("update:model-value", {
3681
+ const f = g.startDate ? hooks(g.startDate).startOf("day").toISOString() : void 0, c = g.endDate ? hooks(g.endDate).endOf("day").toISOString() : void 0;
3682
+ m("update:model-value", {
3686
3683
  type: "timeframe",
3687
3684
  property: "__now",
3688
3685
  start: f,
@@ -3690,80 +3687,80 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3690
3687
  });
3691
3688
  break;
3692
3689
  case "image": {
3693
- u(
3690
+ m(
3694
3691
  "update:file",
3695
- v,
3696
- n.value || firebaseStorage.collectibleImagePath(void 0, v)
3692
+ g,
3693
+ n.value || firebaseStorage.collectibleImagePath(void 0, g)
3697
3694
  );
3698
3695
  break;
3699
3696
  }
3700
3697
  default:
3701
- u("update:model-value", v);
3698
+ m("update:model-value", g);
3702
3699
  break;
3703
3700
  }
3704
3701
  }
3705
3702
  const n = computed(() => {
3706
- switch (i.field.type) {
3703
+ switch (u.field.type) {
3707
3704
  case "timeframe": {
3708
- const v = i.modelValue;
3705
+ const g = u.modelValue;
3709
3706
  return {
3710
- startDate: v != null && v.start ? hooks(v == null ? void 0 : v.start).format("YYYY-MM-DD") : null,
3711
- endDate: v != null && v.end ? hooks(v == null ? void 0 : v.end).format("YYYY-MM-DD") : null
3707
+ startDate: g != null && g.start ? hooks(g == null ? void 0 : g.start).format("YYYY-MM-DD") : null,
3708
+ endDate: g != null && g.end ? hooks(g == null ? void 0 : g.end).format("YYYY-MM-DD") : null
3712
3709
  };
3713
3710
  }
3714
3711
  default:
3715
- return i.modelValue;
3712
+ return u.modelValue;
3716
3713
  }
3717
3714
  });
3718
3715
  function a() {
3719
- if (!s.value.schema) return [];
3720
- const v = s.value.schema.safeParse(i.modelValue);
3721
- return v.success ? [] : v.error.errors;
3716
+ if (!d.value.schema) return [];
3717
+ const g = d.value.schema.safeParse(u.modelValue);
3718
+ return g.success ? [] : g.error.errors;
3722
3719
  }
3723
- const s = computed(() => ({
3724
- schema: i.schema,
3725
- unwrapped: i.schema ? ZodHelper.unwrap(i.schema) : void 0,
3726
- rules: i.schema ? [ZodHelper.ruleAtPath(i.schema, "")] : void 0,
3727
- labelMark: i.schema && ZodHelper.isRequired(i.schema) == !1 ? "optional" : void 0,
3728
- zodLabel: i.schema ? ZodHelper.toInputLabel(
3729
- i.schema,
3730
- m(i.field.label_locale, i.field.label ?? "")
3720
+ const d = computed(() => ({
3721
+ schema: u.schema,
3722
+ unwrapped: u.schema ? ZodHelper.unwrap(u.schema) : void 0,
3723
+ rules: u.schema ? [ZodHelper.ruleAtPath(u.schema, "")] : void 0,
3724
+ labelMark: u.schema && ZodHelper.isRequired(u.schema) == !1 ? "optional" : void 0,
3725
+ zodLabel: u.schema ? ZodHelper.toInputLabel(
3726
+ u.schema,
3727
+ p(u.field.label_locale, u.field.label ?? "")
3731
3728
  ) : void 0
3732
3729
  }));
3733
- return (v, f) => {
3734
- var d, p, C, V, N;
3735
- const c = resolveComponent("FmTextField"), k = resolveComponent("FmStepperField"), x = resolveComponent("FmTextarea"), h = resolveComponent("FmHelperText"), g = resolveComponent("FmSwitch");
3730
+ return (g, f) => {
3731
+ var s, i, C, V, $;
3732
+ const c = resolveComponent("FmTextField"), b = resolveComponent("FmStepperField"), x = resolveComponent("FmTextarea"), k = resolveComponent("FmHelperText"), v = resolveComponent("FmSwitch");
3736
3733
  return e.field.type === "text" ? (openBlock(), createBlock(c, {
3737
3734
  key: 0,
3738
- label: unref(m)(e.field.label_locale, e.field.label ?? ""),
3739
- "label-mark": unref(s).labelMark,
3740
- rules: unref(s).rules,
3735
+ label: unref(p)(e.field.label_locale, e.field.label ?? ""),
3736
+ "label-mark": unref(d).labelMark,
3737
+ rules: unref(d).rules,
3741
3738
  "model-value": unref(n),
3742
3739
  "onUpdate:modelValue": l,
3743
3740
  "helper-state": e.helperText ? "error" : void 0,
3744
3741
  "helper-text": e.helperText
3745
3742
  }, null, 8, ["label", "label-mark", "rules", "model-value", "helper-state", "helper-text"])) : e.field.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3746
3743
  createVNode(JsonViewer, {
3747
- json: { schema: unref(s).unwrapped, props: i }
3744
+ json: { schema: unref(d).unwrapped, props: u }
3748
3745
  }, null, 8, ["json"]),
3749
- createVNode(k, {
3750
- label: unref(m)(e.field.label_locale, e.field.label ?? ""),
3751
- "label-mark": e.field.isRuleChildren ? void 0 : unref(s).labelMark,
3746
+ createVNode(b, {
3747
+ label: unref(p)(e.field.label_locale, e.field.label ?? ""),
3748
+ "label-mark": e.field.isRuleChildren ? void 0 : unref(d).labelMark,
3752
3749
  "model-value": unref(n),
3753
- rules: e.field.isRuleChildren ? [] : unref(s).rules,
3750
+ rules: e.field.isRuleChildren ? [] : unref(d).rules,
3754
3751
  "onUpdate:modelValue": l,
3755
3752
  "helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
3756
3753
  "helper-text": e.field.isRuleChildren ? e.helperText : void 0
3757
3754
  }, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
3758
3755
  ], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(x, {
3759
3756
  key: 2,
3760
- label: unref(m)(e.field.label_locale, e.field.label ?? ""),
3761
- "label-mark": unref(s).labelMark,
3762
- rules: unref(s).rules,
3757
+ label: unref(p)(e.field.label_locale, e.field.label ?? ""),
3758
+ "label-mark": unref(d).labelMark,
3759
+ rules: unref(d).rules,
3763
3760
  "model-value": unref(n),
3764
3761
  "onUpdate:modelValue": l,
3765
3762
  "show-word-count": "",
3766
- "max-length": (N = (V = (C = (p = (d = unref(s)) == null ? void 0 : d.unwrapped) == null ? void 0 : p._def) == null ? void 0 : C.checks) == null ? void 0 : V.find((R) => R.kind == "max")) == null ? void 0 : N.value
3763
+ "max-length": ($ = (V = (C = (i = (s = unref(d)) == null ? void 0 : s.unwrapped) == null ? void 0 : i._def) == null ? void 0 : C.checks) == null ? void 0 : V.find((S) => S.kind == "max")) == null ? void 0 : $.value
3767
3764
  }, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$o, {
3768
3765
  key: 3,
3769
3766
  "campaign-type": e.extras,
@@ -3775,7 +3772,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3775
3772
  "model-value": unref(n),
3776
3773
  "onUpdate:modelValue": l
3777
3774
  }, null, 8, ["model-value"]),
3778
- createVNode(h, {
3775
+ createVNode(k, {
3779
3776
  class: "!mt-[8px]",
3780
3777
  text: unref(ZodHelper).helperText(a(), ""),
3781
3778
  state: unref(ZodHelper).helperState(a(), "")
@@ -3788,16 +3785,16 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3788
3785
  "onUpdate:file": l
3789
3786
  }, {
3790
3787
  label: withCtx(() => [
3791
- (openBlock(), createBlock(resolveDynamicComponent(unref(s).zodLabel)))
3788
+ (openBlock(), createBlock(resolveDynamicComponent(unref(d).zodLabel)))
3792
3789
  ]),
3793
3790
  _: 1
3794
- }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(g, {
3791
+ }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(v, {
3795
3792
  key: 6,
3796
- label: unref(m)(e.field.label_locale, e.field.label ?? ""),
3793
+ label: unref(p)(e.field.label_locale, e.field.label ?? ""),
3797
3794
  "label-placement": "right",
3798
3795
  sublabel: e.field.property == "campaign.notify" ? "Notify customer when customer receives the reward" : void 0,
3799
- "label-mark": unref(s).labelMark,
3800
- rules: unref(s).rules,
3796
+ "label-mark": unref(d).labelMark,
3797
+ rules: unref(d).rules,
3801
3798
  "model-value": unref(n),
3802
3799
  "onUpdate:modelValue": l
3803
3800
  }, null, 8, ["label", "sublabel", "label-mark", "rules", "model-value"])) : e.field.type === "collectible_options" ? (openBlock(), createBlock(_sfc_main$D, {
@@ -3805,18 +3802,18 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3805
3802
  "model-value": unref(n),
3806
3803
  "onUpdate:modelValue": l,
3807
3804
  "no-campaign": !1,
3808
- schema: unref(s).schema,
3805
+ schema: unref(d).schema,
3809
3806
  "is-mission": e.extras === "MISSION"
3810
3807
  }, null, 8, ["model-value", "schema", "is-mission"])) : e.field.type === "grab_conditions" ? (openBlock(), createBlock(GrabConditionsInput, {
3811
3808
  key: 8,
3812
3809
  "model-value": unref(n),
3813
3810
  "onUpdate:modelValue": l,
3814
- schema: unref(s).schema
3811
+ schema: unref(d).schema
3815
3812
  }, null, 8, ["model-value", "schema"])) : e.field.type === "grab_quota" ? (openBlock(), createBlock(_sfc_main$9, {
3816
3813
  key: 9,
3817
3814
  "model-value": unref(n),
3818
3815
  "onUpdate:modelValue": l,
3819
- schema: unref(s).schema
3816
+ schema: unref(d).schema
3820
3817
  }, null, 8, ["model-value", "schema"])) : e.field.type === "target_location" ? (openBlock(), createBlock(_sfc_main$E, {
3821
3818
  key: 10,
3822
3819
  "model-value": unref(n),
@@ -3827,7 +3824,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3827
3824
  "onUpdate:modelValue": l,
3828
3825
  "can-set-auto-apply": e.field.property == "campaign.effect"
3829
3826
  }, null, 8, ["model-value", "can-set-auto-apply"]),
3830
- unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(h, {
3827
+ unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(k, {
3831
3828
  key: 0,
3832
3829
  class: "!mt-[8px]",
3833
3830
  text: unref(o)("connect.campaign.common.effect_required"),
@@ -3838,7 +3835,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3838
3835
  "model-value": unref(n),
3839
3836
  "onUpdate:modelValue": l
3840
3837
  }, null, 8, ["model-value"]),
3841
- unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(h, {
3838
+ unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(k, {
3842
3839
  key: 0,
3843
3840
  class: "!mt-[8px]",
3844
3841
  text: unref(o)("connect.campaign.common.effect_required"),
@@ -3848,7 +3845,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3848
3845
  e.field.property === "campaign.message" ? (openBlock(), createBlock(_sfc_main$g, {
3849
3846
  key: 0,
3850
3847
  "push-availability": e.pushAvailability,
3851
- onRetryPush: f[0] || (f[0] = (R) => u("retry-push")),
3848
+ onRetryPush: f[0] || (f[0] = (S) => m("retry-push")),
3852
3849
  "show-validation": e.showValidation,
3853
3850
  "model-value": unref(n),
3854
3851
  "onUpdate:modelValue": l,
@@ -3877,7 +3874,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3877
3874
  "model-value": unref(n),
3878
3875
  "onUpdate:modelValue": l,
3879
3876
  "helper-text": e.helperText || unref(ZodHelper).helperText(a(), ""),
3880
- "for-credit": i.campaignType === "CREDIT"
3877
+ "for-credit": u.campaignType === "CREDIT"
3881
3878
  }, null, 8, ["model-value", "helper-text", "for-credit"])) : e.field.type === "game_type" ? (openBlock(), createBlock(_sfc_main$e, {
3882
3879
  key: 16,
3883
3880
  "model-value": unref(n),
@@ -3912,7 +3909,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3912
3909
  "start-date": e.extras.start,
3913
3910
  "end-date": e.extras.end
3914
3911
  }, null, 8, ["model-value", "start-date", "end-date"]),
3915
- e.helperText ? (openBlock(), createBlock(h, {
3912
+ e.helperText ? (openBlock(), createBlock(k, {
3916
3913
  key: 0,
3917
3914
  class: "!mt-[8px]",
3918
3915
  text: e.helperText,
@@ -3923,14 +3920,14 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3923
3920
  "model-value": unref(n),
3924
3921
  "onUpdate:modelValue": l
3925
3922
  }, null, 8, ["model-value"]),
3926
- e.helperText ? (openBlock(), createBlock(h, {
3923
+ e.helperText ? (openBlock(), createBlock(k, {
3927
3924
  key: 0,
3928
3925
  class: "!mt-[8px]",
3929
3926
  text: e.helperText,
3930
3927
  state: "error"
3931
3928
  }, null, 8, ["text"])) : createCommentVNode("", !0)
3932
3929
  ], 64)) : e.field.type === "rule_time" ? (openBlock(), createElementBlock(Fragment, { key: 24 }, [
3933
- e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(n).rules.g_time).length > 0 ? (openBlock(), createBlock(h, {
3930
+ e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(n).rules.g_time).length > 0 ? (openBlock(), createBlock(k, {
3934
3931
  key: 0,
3935
3932
  state: "warning",
3936
3933
  text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
@@ -3939,7 +3936,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3939
3936
  "model-value": unref(n),
3940
3937
  "onUpdate:modelValue": l
3941
3938
  }, null, 8, ["model-value"]),
3942
- e.helperText ? (openBlock(), createBlock(h, {
3939
+ e.helperText ? (openBlock(), createBlock(k, {
3943
3940
  key: 1,
3944
3941
  class: "!mt-[8px]",
3945
3942
  text: e.helperText,
@@ -3950,7 +3947,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3950
3947
  "model-value": unref(n),
3951
3948
  "onUpdate:modelValue": l
3952
3949
  }, null, 8, ["model-value"]),
3953
- e.helperText ? (openBlock(), createBlock(h, {
3950
+ e.helperText ? (openBlock(), createBlock(k, {
3954
3951
  key: 0,
3955
3952
  class: "!mt-[8px]",
3956
3953
  text: e.helperText,
@@ -3961,7 +3958,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3961
3958
  "model-value": unref(n),
3962
3959
  "onUpdate:modelValue": l
3963
3960
  }, null, 8, ["model-value"]),
3964
- e.helperText ? (openBlock(), createBlock(h, {
3961
+ e.helperText ? (openBlock(), createBlock(k, {
3965
3962
  key: 0,
3966
3963
  class: "!mt-[8px]",
3967
3964
  text: e.helperText,
@@ -3972,7 +3969,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3972
3969
  "model-value": unref(n),
3973
3970
  "onUpdate:modelValue": l
3974
3971
  }, null, 8, ["model-value"]),
3975
- e.helperText ? (openBlock(), createBlock(h, {
3972
+ e.helperText ? (openBlock(), createBlock(k, {
3976
3973
  key: 0,
3977
3974
  class: "!mt-[8px]",
3978
3975
  text: e.helperText,
@@ -3983,13 +3980,13 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3983
3980
  "model-value": unref(n),
3984
3981
  "onUpdate:modelValue": l
3985
3982
  }, null, 8, ["model-value"]),
3986
- e.helperText ? (openBlock(), createBlock(h, {
3983
+ e.helperText ? (openBlock(), createBlock(k, {
3987
3984
  key: 0,
3988
3985
  class: "!mt-[8px]",
3989
3986
  text: e.helperText,
3990
3987
  state: "error"
3991
3988
  }, null, 8, ["text"])) : createCommentVNode("", !0)
3992
- ], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(i.field), 1));
3989
+ ], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(u.field), 1));
3993
3990
  };
3994
3991
  }
3995
3992
  }), _hoisted_1$1 = { class: "fm-typo-en-body-lg-600" }, _hoisted_2$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_3$1 = { class: "fm-typo-en-body-lg-600" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -4002,10 +3999,10 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4002
3999
  },
4003
4000
  setup(e) {
4004
4001
  const { t: r, te: o } = useI18n();
4005
- function m(i) {
4006
- return o(i) || o(i, "en-US");
4002
+ function p(u) {
4003
+ return o(u) || o(u, "en-US");
4007
4004
  }
4008
- return (i, u) => {
4005
+ return (u, m) => {
4009
4006
  const l = resolveComponent("FmCard");
4010
4007
  return openBlock(), createBlock(l, {
4011
4008
  variant: "outlined",
@@ -4013,14 +4010,14 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4013
4010
  }, {
4014
4011
  default: withCtx(() => [
4015
4012
  createElementVNode("div", _hoisted_1$1, toDisplayString(unref(r)("connect.campaign.common.summary")), 1),
4016
- u[0] || (u[0] = createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1)),
4013
+ m[0] || (m[0] = createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1)),
4017
4014
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (n, a) => (openBlock(), createElementBlock("div", {
4018
4015
  class: "space-y-4",
4019
4016
  key: a
4020
4017
  }, [
4021
4018
  n ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4022
4019
  createElementVNode("div", _hoisted_2$1, toDisplayString(unref(r)(`${a}`)), 1),
4023
- createElementVNode("div", _hoisted_3$1, toDisplayString(m(`${n}`) ? unref(r)(`${n}`) : n), 1)
4020
+ createElementVNode("div", _hoisted_3$1, toDisplayString(p(`${n}`) ? unref(r)(`${n}`) : n), 1)
4024
4021
  ], 64)) : createCommentVNode("", !0)
4025
4022
  ]))), 128))
4026
4023
  ]),
@@ -4044,8 +4041,8 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4044
4041
  pushAvailability.value = "checking";
4045
4042
  try {
4046
4043
  if (!r) throw new Error("Business ID is unavailable");
4047
- const m = await getNativeApp(r);
4048
- o() && (pushAvailability.value = m ? "native" : "non-native");
4044
+ const p = await getNativeApp(r);
4045
+ o() && (pushAvailability.value = p ? "native" : "non-native");
4049
4046
  } catch {
4050
4047
  o() && (pushAvailability.value = "failed");
4051
4048
  }
@@ -4076,15 +4073,15 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4076
4073
  isLoading.value = visible, await useMembershipStore().readRewards(), await useBusinessStore().readLocations(), await useMembershipStore().readSegments(), await useMembershipStore().readMembership();
4077
4074
  } catch {
4078
4075
  } finally {
4079
- await new Promise((m) => setTimeout(m, 120)), isLoading.value = !1;
4076
+ await new Promise((p) => setTimeout(p, 120)), isLoading.value = !1;
4080
4077
  }
4081
- template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((m, i) => {
4082
- var u;
4083
- if (m.campaign.type === "VOUCHER" && m.campaign.code) {
4084
- const l = (u = m.campaign._id) == null ? void 0 : u.toString();
4078
+ template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((p, u) => {
4079
+ var m;
4080
+ if (p.campaign.type === "VOUCHER" && p.campaign.code) {
4081
+ const l = (m = p.campaign._id) == null ? void 0 : m.toString();
4085
4082
  useCampaignStore().campaigns.voucher.some(
4086
- (n) => n.code === m.campaign.code && n._id.toString() !== l
4087
- ) && i.addIssue({
4083
+ (n) => n.code === p.campaign.code && n._id.toString() !== l
4084
+ ) && u.addIssue({
4088
4085
  code: "custom",
4089
4086
  message: "Code already exists, please use another code",
4090
4087
  path: ["campaign", "code"]
@@ -4129,10 +4126,10 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4129
4126
  });
4130
4127
  function stepErrors(e = currentStep.value - 1) {
4131
4128
  const r = template.value.steps[e].groups.flatMap(
4132
- (o) => o.fields.map((m) => schemaPathForField(m.property))
4129
+ (o) => o.fields.map((p) => schemaPathForField(p.property))
4133
4130
  );
4134
4131
  return errors.value.filter(
4135
- (o) => r.some((m) => o.path.join(".").includes(m))
4132
+ (o) => r.some((p) => o.path.join(".").includes(p))
4136
4133
  );
4137
4134
  }
4138
4135
  const validateOnSubmit = computed(() => campaignType.value === "BROADCAST"), submitAttempted = ref(!1), showValidation = computed(
@@ -4176,16 +4173,16 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4176
4173
  return e === "campaign.message" ? "campaign.delivery" : e;
4177
4174
  }
4178
4175
  function onUpdateProperty(e, r) {
4179
- var o, m, i, u, l, n, a, s;
4176
+ var o, p, u, m, l, n, a, d;
4180
4177
  if (e === "campaign.message" && r && "channels" in r) {
4181
4178
  _.set(data.value, "campaign.delivery", r);
4182
- const v = toLegacyMessage(r);
4183
- v ? _.set(data.value, "campaign.message", v) : delete data.value.campaign.message;
4179
+ const g = toLegacyMessage(r);
4180
+ g ? _.set(data.value, "campaign.message", g) : delete data.value.campaign.message;
4184
4181
  return;
4185
4182
  }
4186
4183
  if (_.set(data.value, e, r), e == "campaign.event.type") {
4187
- const f = ((u = (i = (m = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : m.campaign) == null ? void 0 : i.event) == null ? void 0 : u.rule) ? _.cloneDeep({
4188
- ...(s = (a = (n = (l = template.value) == null ? void 0 : l.defaultValue) == null ? void 0 : n.campaign) == null ? void 0 : a.event) == null ? void 0 : s.rule
4184
+ const f = ((m = (u = (p = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : p.campaign) == null ? void 0 : u.event) == null ? void 0 : m.rule) ? _.cloneDeep({
4185
+ ...(d = (a = (n = (l = template.value) == null ? void 0 : l.defaultValue) == null ? void 0 : n.campaign) == null ? void 0 : a.event) == null ? void 0 : d.rule
4189
4186
  }) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
4190
4187
  RuleBuilder.scaffoldGroup("g_schedule"),
4191
4188
  RuleBuilder.scaffoldGroup("g_time"),
@@ -4242,7 +4239,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4242
4239
  (r || r === void 0) && (sheetVisible.value = !1);
4243
4240
  }
4244
4241
  return (e, r) => {
4245
- const o = resolveComponent("FmButton"), m = resolveComponent("FmStep"), i = resolveComponent("FmStepper"), u = resolveComponent("FmCard"), l = resolveComponent("FmTopSheet");
4242
+ const o = resolveComponent("FmButton"), p = resolveComponent("FmStep"), u = resolveComponent("FmStepper"), m = resolveComponent("FmCard"), l = resolveComponent("FmTopSheet");
4246
4243
  return openBlock(), createBlock(l, {
4247
4244
  "fullscreen-size": "lg",
4248
4245
  modelValue: unref(sheetVisible),
@@ -4298,7 +4295,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4298
4295
  ])
4299
4296
  ])
4300
4297
  ], -1)),
4301
- createVNode(u, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
4298
+ createVNode(m, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
4302
4299
  ])
4303
4300
  ])
4304
4301
  ])
@@ -4308,14 +4305,14 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4308
4305
  name: "default",
4309
4306
  fn: withCtx(() => [
4310
4307
  unref(data) ? (openBlock(), createElementBlock("div", _hoisted_3, [
4311
- createVNode(i, {
4308
+ createVNode(u, {
4312
4309
  modelValue: unref(currentStep),
4313
4310
  "onUpdate:modelValue": r[1] || (r[1] = (n) => isRef(currentStep) ? currentStep.value = n : null),
4314
4311
  orientation: "horizontal",
4315
4312
  class: "xs:hidden mx-[-24px] mt-16 mb-24 flex-1"
4316
4313
  }, {
4317
4314
  default: withCtx(() => [
4318
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (n, a) => (openBlock(), createBlock(m, {
4315
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (n, a) => (openBlock(), createBlock(p, {
4319
4316
  key: n.name,
4320
4317
  title: unref(getLocaleText)(n.name_locale, n.name),
4321
4318
  value: a + 1,
@@ -4331,14 +4328,14 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4331
4328
  variant: "tertiary",
4332
4329
  onClick: r[2] || (r[2] = (n) => sheetVisible.value = !1)
4333
4330
  }),
4334
- createVNode(i, {
4331
+ createVNode(u, {
4335
4332
  modelValue: unref(currentStep),
4336
4333
  "onUpdate:modelValue": r[3] || (r[3] = (n) => isRef(currentStep) ? currentStep.value = n : null),
4337
4334
  orientation: "horizontal",
4338
4335
  class: "flex-1"
4339
4336
  }, {
4340
4337
  default: withCtx(() => [
4341
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (n, a) => (openBlock(), createBlock(m, {
4338
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (n, a) => (openBlock(), createBlock(p, {
4342
4339
  key: n.name,
4343
4340
  title: unref(sheetTitle),
4344
4341
  description: unref(getLocaleText)(n.name_locale, n.name),
@@ -4376,35 +4373,35 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4376
4373
  class: "space-y-24"
4377
4374
  }, [
4378
4375
  createElementVNode("div", _hoisted_7, toDisplayString(unref(getLocaleText)(n.name_locale, n.name ?? "")), 1),
4379
- (openBlock(!0), createElementBlock(Fragment, null, renderList(n.fields, (s, v) => (openBlock(), createElementBlock("div", { key: v }, [
4376
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(n.fields, (d, g) => (openBlock(), createElementBlock("div", { key: g }, [
4380
4377
  (openBlock(), createBlock(_sfc_main$2, {
4381
- key: v,
4382
- field: s,
4383
- modelValue: valueForField(s.property),
4384
- disabled: isDisable(s),
4378
+ key: g,
4379
+ field: d,
4380
+ modelValue: valueForField(d.property),
4381
+ disabled: isDisable(d),
4385
4382
  "campaign-type": unref(campaignType),
4386
4383
  "show-validation": unref(showValidation),
4387
4384
  "push-availability": unref(pushAvailability),
4388
4385
  onRetryPush: checkPushAvailability,
4389
- "onUpdate:modelValue": (f) => onUpdateProperty(s.property, f),
4386
+ "onUpdate:modelValue": (f) => onUpdateProperty(d.property, f),
4390
4387
  "onUpdate:file": async (f, c) => {
4391
- const k = await onUpdateFile(f, c);
4392
- onUpdateProperty(s.property, k || "");
4388
+ const b = await onUpdateFile(f, c);
4389
+ onUpdateProperty(d.property, b || "");
4393
4390
  },
4394
4391
  schema: unref(ZodHelper).typeAtPath(
4395
4392
  unref(schema),
4396
- schemaPathForField(s.property),
4393
+ schemaPathForField(d.property),
4397
4394
  unref(data).campaign.type != "MISSION" ? [unref(data).campaign.type] : ["STAMP", "MISSION"]
4398
4395
  ),
4399
4396
  "helper-state": unref(ZodHelper).helperState(
4400
4397
  unref(visibleErrors),
4401
- schemaPathForField(s.property)
4398
+ schemaPathForField(d.property)
4402
4399
  ),
4403
4400
  "helper-text": unref(ZodHelper).helperText(
4404
4401
  unref(visibleErrors),
4405
- schemaPathForField(s.property)
4402
+ schemaPathForField(d.property)
4406
4403
  ),
4407
- extras: s.extras != null ? s.extras == "" ? unref(data) : unref(_).get(unref(data), s.extras) : void 0
4404
+ extras: d.extras != null ? d.extras == "" ? unref(data) : unref(_).get(unref(data), d.extras) : void 0
4408
4405
  }, null, 8, ["field", "modelValue", "disabled", "campaign-type", "show-validation", "push-availability", "onUpdate:modelValue", "onUpdate:file", "schema", "helper-state", "helper-text", "extras"]))
4409
4406
  ]))), 128))
4410
4407
  ]))), 128)),