@feedmepos/mf-connect 0.0.9 → 0.0.11-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/dist/{Analytic-CwaN0mge.js → Analytic-CpXLcGWV.js} +7 -7
  2. package/dist/{Broadcast-Cjx5xzUC.js → Broadcast-CEMQS5PI.js} +7 -7
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D4mO5aik.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0Kvpl_V.js} +8 -8
  4. package/dist/{Card-DbY6YaXk.js → Card-BqX-aRK9.js} +182 -187
  5. package/dist/{Collections-DRN2gzwh.js → Collections-SRmluAj0.js} +102 -84
  6. package/dist/{Credit-DOcrzykJ.js → Credit-DdBKFsII.js} +7 -7
  7. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYNpBySQ.js +2600 -0
  8. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-EF_rHfwT.js → EffectSheet.vue_vue_type_style_index_0_lang-admNNBWu.js} +1864 -1830
  9. package/dist/{Experience-aQj-3H2Y.js → Experience-CSfRrWqI.js} +7 -7
  10. package/dist/Game-BV--qn0e.js +250 -0
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js → ImageInput.vue_vue_type_script_setup_true_lang-DpYjrT3G.js} +1 -1
  12. package/dist/{MainLayout-Cxl9yLPs.js → MainLayout-B_ZXQrMD.js} +1 -1
  13. package/dist/{Marketing-BYUcbcMU.js → Marketing-Bac3EbOu.js} +16 -16
  14. package/dist/{Member-D7K9fm_Q.js → Member-CGMRVEuI.js} +2 -2
  15. package/dist/{MemberList-DbXkxUzF.js → MemberList-CSyb4bNE.js} +196 -195
  16. package/dist/{MemberTransactions-DED1SYwX.js → MemberTransactions-BdraBHg6.js} +2 -2
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLqIp5wR.js → MessageInput.vue_vue_type_script_setup_true_lang-BvAFOoym.js} +2 -2
  18. package/dist/Mission-D8-D99g-.js +248 -0
  19. package/dist/Point-BOI4mT-K.js +220 -0
  20. package/dist/{Promotion-DzVXy_C9.js → Promotion-D0MLMo9m.js} +8 -8
  21. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CeS6KlhP.js → RuleGroup.vue_vue_type_script_setup_true_lang-1L68zx5t.js} +58 -58
  22. package/dist/Segment-BeUbkVj7.js +444 -0
  23. package/dist/{Setting-pCzenLoL.js → Setting-uM4iKdyM.js} +386 -379
  24. package/dist/{Store-DEwEIFYD.js → Store-BkccNTnM.js} +432 -413
  25. package/dist/{StoreRewards-D7vnZN4f.js → StoreRewards-BLgP6Mfv.js} +9 -9
  26. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-ALzQU3th.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Z0nqQyi8.js} +39 -38
  27. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-GMIztWCj.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C771jjYx.js} +1 -1
  28. package/dist/{Tier-BJbX5CPB.js → Tier-DwKAfz6f.js} +17 -16
  29. package/dist/{Title-C9xV6rBg.js → Title-B1_yd9pC.js} +16 -15
  30. package/dist/{Transaction-C8OHlhzR.js → Transaction-DcVCMUY4.js} +1 -1
  31. package/dist/{Voucher-eZwm7N1D.js → Voucher-Djvai5vL.js} +30 -30
  32. package/dist/{app-DgbDbhL-.js → app-BvizV9z5.js} +3192 -3178
  33. package/dist/app.js +1 -1
  34. package/dist/{campaign-BkvrUTEJ.js → campaign-BdSwq7MJ.js} +31 -27
  35. package/dist/dto-CkH5Zama.js +1150 -0
  36. package/dist/{effect-f7DAPYC8.js → effect-DT4ivttr.js} +1 -1
  37. package/dist/{export-BXbCXTfd.js → export-BAJL8_2G.js} +3 -3
  38. package/dist/{helper-BhvQ9m6d.js → helper-CiIZ1pUo.js} +21 -8
  39. package/dist/{index-CdtrQ9tR.js → index-7uOMMdXt.js} +245 -184
  40. package/dist/{index-Cfo2A0Se.js → index-8nrxC9d5.js} +1 -1
  41. package/dist/{index-FWp9M1yS.js → index-B5gJ6P15.js} +269 -21
  42. package/dist/{index-BhacKx5B.js → index-BLWw_MlC.js} +1363 -1341
  43. package/dist/{index-VmFlM704.js → index-C5N8jeJ1.js} +1 -1
  44. package/dist/{index-Cz5RZlYh.js → index-C8dIiNQb.js} +1 -1
  45. package/dist/{index-Dd3hrFcQ.js → index-Ccn7PGoB.js} +268 -267
  46. package/dist/{index-oQLJE4Uw.js → index-CjZxaXvZ.js} +69 -64
  47. package/dist/{index-DQC_1tRF.js → index-DCs4-zXS.js} +7 -17
  48. package/dist/{index-BsEqtUmY.js → index-DMyaEjMn.js} +26 -20
  49. package/dist/{loading-DQaawbHE.js → loading-C1IzY-n2.js} +1312 -1312
  50. package/dist/{lodash-DzdmTD20.js → lodash-BMQ4xbjY.js} +1 -1
  51. package/dist/membership-D3I4udu3.js +221 -0
  52. package/dist/{money-vzwOUBrp.js → money-BQEcWGhZ.js} +1 -1
  53. package/dist/{number-CBzs6rfW.js → number-DGx2QPUy.js} +1 -1
  54. package/dist/{rule-BR5rrmUV.js → rule-CvlhLEGy.js} +2 -2
  55. package/dist/{rule-builder-7GBNrPXt.js → rule-builder-Di3qiIBb.js} +1 -1
  56. package/dist/{template-CETJ6lkf.js → template-D6Abrya4.js} +5 -5
  57. package/dist/{usePagination-DdZeE4Tt.js → usePagination-MhbjQgN7.js} +1 -1
  58. package/dist/{xlsx-CDAKxZE_.js → xlsx-mL_3T1k3.js} +226 -226
  59. package/package.json +3 -3
  60. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CUxfXaro.js +0 -2002
  61. package/dist/Game-Cnje-m_M.js +0 -242
  62. package/dist/Point-CQm8whVQ.js +0 -211
  63. package/dist/Segment-D3o0D3Uv.js +0 -407
  64. package/dist/dto-YYVhW73A.js +0 -1092
  65. package/dist/libs/packages/core/src/bill/bill.dto.d.ts +0 -75
  66. package/dist/libs/packages/core/src/bill/index.d.ts +0 -115
  67. package/dist/libs/packages/core/src/business/index.d.ts +0 -21
  68. package/dist/libs/packages/core/src/campaign/broadcast/index.d.ts +0 -36
  69. package/dist/libs/packages/core/src/campaign/campaign.enum.d.ts +0 -9
  70. package/dist/libs/packages/core/src/campaign/campaign.fn.d.ts +0 -7
  71. package/dist/libs/packages/core/src/campaign/dto.d.ts +0 -5517
  72. package/dist/libs/packages/core/src/campaign/group.d.ts +0 -25
  73. package/dist/libs/packages/core/src/campaign/index.d.ts +0 -33988
  74. package/dist/libs/packages/core/src/collectible/collectible.dto.d.ts +0 -21
  75. package/dist/libs/packages/core/src/collectible/collectible.enum.d.ts +0 -14
  76. package/dist/libs/packages/core/src/collectible/helper.d.ts +0 -195
  77. package/dist/libs/packages/core/src/collectible/index.d.ts +0 -1588
  78. package/dist/libs/packages/core/src/collectible/pool/index.d.ts +0 -1381
  79. package/dist/libs/packages/core/src/collection/collection.fn.d.ts +0 -5
  80. package/dist/libs/packages/core/src/collection/index.d.ts +0 -1014
  81. package/dist/libs/packages/core/src/collection/transaction.d.ts +0 -845
  82. package/dist/libs/packages/core/src/collection/transaction.fn.d.ts +0 -10
  83. package/dist/libs/packages/core/src/common/array.d.ts +0 -2
  84. package/dist/libs/packages/core/src/common/hash.d.ts +0 -10
  85. package/dist/libs/packages/core/src/common/index.d.ts +0 -42
  86. package/dist/libs/packages/core/src/common/number.d.ts +0 -7
  87. package/dist/libs/packages/core/src/common/object.d.ts +0 -5
  88. package/dist/libs/packages/core/src/common/objectId.d.ts +0 -2
  89. package/dist/libs/packages/core/src/common/string.d.ts +0 -4
  90. package/dist/libs/packages/core/src/counter/counter.dto.d.ts +0 -767
  91. package/dist/libs/packages/core/src/counter/index.d.ts +0 -1
  92. package/dist/libs/packages/core/src/event/index.d.ts +0 -4246
  93. package/dist/libs/packages/core/src/feedback/index.d.ts +0 -24
  94. package/dist/libs/packages/core/src/game/index.d.ts +0 -32
  95. package/dist/libs/packages/core/src/index.d.ts +0 -21
  96. package/dist/libs/packages/core/src/internal/index.d.ts +0 -56
  97. package/dist/libs/packages/core/src/legacy/setting/index.d.ts +0 -89
  98. package/dist/libs/packages/core/src/location/index.d.ts +0 -44
  99. package/dist/libs/packages/core/src/loyalty/card/index.d.ts +0 -1296
  100. package/dist/libs/packages/core/src/loyalty/index.d.ts +0 -3
  101. package/dist/libs/packages/core/src/loyalty/tier/helper.d.ts +0 -2
  102. package/dist/libs/packages/core/src/loyalty/tier/index.d.ts +0 -251
  103. package/dist/libs/packages/core/src/loyalty/title/index.d.ts +0 -4
  104. package/dist/libs/packages/core/src/marketing-material/index.d.ts +0 -186
  105. package/dist/libs/packages/core/src/marketing-material/marketing-material.enum.d.ts +0 -3
  106. package/dist/libs/packages/core/src/notification/index.d.ts +0 -130
  107. package/dist/libs/packages/core/src/pagination/index.d.ts +0 -25
  108. package/dist/libs/packages/core/src/permission/index.d.ts +0 -243
  109. package/dist/libs/packages/core/src/service/index.d.ts +0 -10
  110. package/dist/libs/packages/core/src/store/dto.d.ts +0 -1069
  111. package/dist/libs/packages/core/src/store/index.d.ts +0 -3942
  112. package/dist/libs/packages/core/src/store/store.fn.d.ts +0 -104
  113. package/dist/libs/packages/core/src/template/index.d.ts +0 -880
  114. package/dist/libs/packages/core/src/template/templates.d.ts +0 -1239
  115. package/dist/libs/packages/core/src/user/index.d.ts +0 -245
  116. package/dist/libs/packages/core/src/user/segment.dto.d.ts +0 -27
  117. package/dist/libs/packages/core/src/user/segmentation.d.ts +0 -28
  118. package/dist/libs/packages/core/src/user/user.dto.d.ts +0 -873
  119. package/dist/libs/packages/core/src/validation/index.d.ts +0 -1
  120. package/dist/libs/packages/core/src/validation/rule/builder.d.ts +0 -36
  121. package/dist/libs/packages/core/src/validation/rule/index.d.ts +0 -45
  122. package/dist/libs/packages/core/src/validation/rule/operator.enum.d.ts +0 -405
  123. package/dist/libs/packages/core/src/validation/rule/rule.fn.d.ts +0 -6
  124. package/dist/libs/packages/validation/src/index.d.ts +0 -3
  125. package/dist/libs/packages/validation/src/rule/rule-builder.d.ts +0 -19
  126. package/dist/libs/packages/validation/src/rule/rule.d.ts +0 -52
  127. package/dist/libs/packages/validation/src/rule/validate.d.ts +0 -2
  128. package/dist/membership-Dq2-b-S_.js +0 -210
  129. package/dist/packages/connect/src/App.vue.d.ts +0 -2
  130. package/dist/packages/connect/src/Entry.vue.d.ts +0 -2
  131. package/dist/packages/connect/src/api/auth/index.d.ts +0 -3
  132. package/dist/packages/connect/src/api/campaign/index.d.ts +0 -30
  133. package/dist/packages/connect/src/api/campaign/template.d.ts +0 -5
  134. package/dist/packages/connect/src/api/index.d.ts +0 -29
  135. package/dist/packages/connect/src/api/location/index.d.ts +0 -7
  136. package/dist/packages/connect/src/api/marketing-material/index.d.ts +0 -7
  137. package/dist/packages/connect/src/api/member/index.d.ts +0 -12
  138. package/dist/packages/connect/src/api/membership/index.d.ts +0 -28
  139. package/dist/packages/connect/src/api/segments/index.d.ts +0 -13
  140. package/dist/packages/connect/src/api/settings/index.d.ts +0 -4
  141. package/dist/packages/connect/src/api/transaction/index.d.ts +0 -9
  142. package/dist/packages/connect/src/api/users/index.d.ts +0 -8
  143. package/dist/packages/connect/src/app.d.ts +0 -16
  144. package/dist/packages/connect/src/components/NavigationTab.vue.d.ts +0 -2
  145. package/dist/packages/connect/src/components/analytic/CampaignCard.vue.d.ts +0 -24
  146. package/dist/packages/connect/src/components/analytic/CampaignChip.vue.d.ts +0 -47
  147. package/dist/packages/connect/src/components/analytic/CampaignGroup.vue.d.ts +0 -25
  148. package/dist/packages/connect/src/components/analytic/CampaignStat.vue.d.ts +0 -31
  149. package/dist/packages/connect/src/components/analytic/LinkCampaign.vue.d.ts +0 -30
  150. package/dist/packages/connect/src/components/campaign/CampaignChip.vue.d.ts +0 -13
  151. package/dist/packages/connect/src/components/campaign/CampaignSummary.vue.d.ts +0 -13
  152. package/dist/packages/connect/src/components/campaign/CampaignTriggerInput.vue.d.ts +0 -34
  153. package/dist/packages/connect/src/components/campaign/EarningOptionInput.vue.d.ts +0 -50
  154. package/dist/packages/connect/src/components/campaign/GameTypeInput.vue.d.ts +0 -15
  155. package/dist/packages/connect/src/components/campaign/MessageInput.vue.d.ts +0 -64
  156. package/dist/packages/connect/src/components/campaign/PromotionGameTypeInput.vue.d.ts +0 -19
  157. package/dist/packages/connect/src/components/campaign/ScheduleRuleInput.vue.d.ts +0 -29
  158. package/dist/packages/connect/src/components/campaign/TargetLocationInput.vue.d.ts +0 -32
  159. package/dist/packages/connect/src/components/campaign/ValidityInput.vue.d.ts +0 -59
  160. package/dist/packages/connect/src/components/collectible/CollectibleChip.vue.d.ts +0 -13
  161. package/dist/packages/connect/src/components/collectible/CollectibleOptionInput.vue.d.ts +0 -59
  162. package/dist/packages/connect/src/components/collection/Collections.vue.d.ts +0 -2
  163. package/dist/packages/connect/src/components/common/BaseTable.vue.d.ts +0 -80
  164. package/dist/packages/connect/src/components/common/FmTableSelection.vue.d.ts +0 -22
  165. package/dist/packages/connect/src/components/custom/ChipMenu.vue.d.ts +0 -96
  166. package/dist/packages/connect/src/components/custom/CustomSelect.vue.d.ts +0 -68
  167. package/dist/packages/connect/src/components/custom/DateInput.vue.d.ts +0 -24
  168. package/dist/packages/connect/src/components/custom/DateRangeChip.vue.d.ts +0 -25
  169. package/dist/packages/connect/src/components/custom/DateRangeInput.vue.d.ts +0 -28
  170. package/dist/packages/connect/src/components/custom/FilterChip.vue.d.ts +0 -90
  171. package/dist/packages/connect/src/components/custom/ImageInput.vue.d.ts +0 -115
  172. package/dist/packages/connect/src/components/custom/json/JsonNode.vue.d.ts +0 -36
  173. package/dist/packages/connect/src/components/custom/json/JsonViewer.vue.d.ts +0 -22
  174. package/dist/packages/connect/src/components/custom/zod/ZodTextField.vue.d.ts +0 -52
  175. package/dist/packages/connect/src/components/loading/ImageLoading.vue.d.ts +0 -2
  176. package/dist/packages/connect/src/components/loading/LottieAnimation.vue.d.ts +0 -39
  177. package/dist/packages/connect/src/components/loading/Splash.vue.d.ts +0 -2
  178. package/dist/packages/connect/src/components/loyalty/CampaignTypeDialog.vue.d.ts +0 -13
  179. package/dist/packages/connect/src/components/loyalty/CreditCoinDialog.vue.d.ts +0 -29
  180. package/dist/packages/connect/src/components/loyalty/TierExpression.vue.d.ts +0 -32
  181. package/dist/packages/connect/src/components/marketing/HeadlineStyleSideSheet.vue.d.ts +0 -42
  182. package/dist/packages/connect/src/components/marketing/ImageSideSheet.vue.d.ts +0 -40
  183. package/dist/packages/connect/src/components/marketing/LinkRewardSideSheet.vue.d.ts +0 -30
  184. package/dist/packages/connect/src/components/marketing/MarketingSheet.vue.d.ts +0 -2
  185. package/dist/packages/connect/src/components/marketing/RewardDropDown.vue.d.ts +0 -26
  186. package/dist/packages/connect/src/components/marketing/RightSheet.vue.d.ts +0 -66
  187. package/dist/packages/connect/src/components/marketing/SlideUpDown.vue.d.ts +0 -27
  188. package/dist/packages/connect/src/components/marketing/platform/BrandAppImage.vue.d.ts +0 -103
  189. package/dist/packages/connect/src/components/marketing/platform/FacebookPost.vue.d.ts +0 -103
  190. package/dist/packages/connect/src/components/marketing/platform/FacebookStory.vue.d.ts +0 -103
  191. package/dist/packages/connect/src/components/marketing/platform/ImageCanvas.vue.d.ts +0 -81
  192. package/dist/packages/connect/src/components/marketing/platform/InstagramPost.vue.d.ts +0 -102
  193. package/dist/packages/connect/src/components/marketing/platform/InstagramReel.vue.d.ts +0 -102
  194. package/dist/packages/connect/src/components/marketing/platform/InstagramStory.vue.d.ts +0 -102
  195. package/dist/packages/connect/src/components/marketing/platform/TvImage.vue.d.ts +0 -103
  196. package/dist/packages/connect/src/components/member/MemberDetail.vue.d.ts +0 -2
  197. package/dist/packages/connect/src/components/member/MemberList.vue.d.ts +0 -2
  198. package/dist/packages/connect/src/components/member/MemberOverview.vue.d.ts +0 -2
  199. package/dist/packages/connect/src/components/member/MemberStatsDialog.vue.d.ts +0 -21
  200. package/dist/packages/connect/src/components/rule/BillRuleGroup.vue.d.ts +0 -19
  201. package/dist/packages/connect/src/components/rule/CustomRuleDialog.vue.d.ts +0 -30
  202. package/dist/packages/connect/src/components/rule/FeedbackRuleGroup.vue.d.ts +0 -19
  203. package/dist/packages/connect/src/components/rule/PresetRuleDialog.vue.d.ts +0 -20
  204. package/dist/packages/connect/src/components/rule/RuleConfigurator.vue.d.ts +0 -37
  205. package/dist/packages/connect/src/components/rule/RuleEntry.vue.d.ts +0 -19
  206. package/dist/packages/connect/src/components/rule/RuleEquator.vue.d.ts +0 -31
  207. package/dist/packages/connect/src/components/rule/RuleGroup.vue.d.ts +0 -30
  208. package/dist/packages/connect/src/components/rule/SegmentConfigurator.vue.d.ts +0 -17
  209. package/dist/packages/connect/src/components/rule/TimeRuleGroup.vue.d.ts +0 -19
  210. package/dist/packages/connect/src/components/rule/UserRuleGroup.vue.d.ts +0 -19
  211. package/dist/packages/connect/src/components/rule/equators/BirthdayInput.vue.d.ts +0 -15
  212. package/dist/packages/connect/src/components/rule/equators/IsDayInput.vue.d.ts +0 -24
  213. package/dist/packages/connect/src/components/rule/equators/IsInMonthInput.vue.d.ts +0 -16
  214. package/dist/packages/connect/src/components/rule/equators/IsRangeInput.vue.d.ts +0 -55
  215. package/dist/packages/connect/src/components/rule/equators/RruleInput.vue.d.ts +0 -37
  216. package/dist/packages/connect/src/components/rule/presets.d.ts +0 -18
  217. package/dist/packages/connect/src/components/segment/ReviewSegment.vue.d.ts +0 -16
  218. package/dist/packages/connect/src/components/setting/LinkDeviceDialog.vue.d.ts +0 -2
  219. package/dist/packages/connect/src/components/store/AddBundleCard.vue.d.ts +0 -6
  220. package/dist/packages/connect/src/components/store/CategoryDialog.vue.d.ts +0 -23
  221. package/dist/packages/connect/src/components/store/StoreBundleCard.vue.d.ts +0 -20
  222. package/dist/packages/connect/src/components/store/StoreTransactions.vue.d.ts +0 -10
  223. package/dist/packages/connect/src/components/stripe/StripeSetting.vue.d.ts +0 -21
  224. package/dist/packages/connect/src/components/tax/TaxInclusiveSetting.vue.d.ts +0 -30
  225. package/dist/packages/connect/src/components/tax/TaxVariantSetting.vue.d.ts +0 -24
  226. package/dist/packages/connect/src/components/template/TemplateDialog.vue.d.ts +0 -24
  227. package/dist/packages/connect/src/components/template/TemplateInput.vue.d.ts +0 -54
  228. package/dist/packages/connect/src/components/tier/TierCard.vue.d.ts +0 -39
  229. package/dist/packages/connect/src/components/transactions/CollectionTransactions.vue.d.ts +0 -10
  230. package/dist/packages/connect/src/components/transactions/MemberTransactions.vue.d.ts +0 -2
  231. package/dist/packages/connect/src/composables/export.d.ts +0 -11
  232. package/dist/packages/connect/src/composables/index.d.ts +0 -2
  233. package/dist/packages/connect/src/composables/loading.d.ts +0 -19
  234. package/dist/packages/connect/src/composables/template.d.ts +0 -7
  235. package/dist/packages/connect/src/composables/usePagination.d.ts +0 -32
  236. package/dist/packages/connect/src/export/base.export.d.ts +0 -7
  237. package/dist/packages/connect/src/export/card.export.d.ts +0 -9
  238. package/dist/packages/connect/src/export/collection-transaction.export.d.ts +0 -14
  239. package/dist/packages/connect/src/export/collection.export.d.ts +0 -9
  240. package/dist/packages/connect/src/export/index.d.ts +0 -11
  241. package/dist/packages/connect/src/export/member.export.d.ts +0 -33
  242. package/dist/packages/connect/src/export/store-transaction.export.d.ts +0 -14
  243. package/dist/packages/connect/src/helpers/campaign.d.ts +0 -94
  244. package/dist/packages/connect/src/helpers/collectible.d.ts +0 -58
  245. package/dist/packages/connect/src/helpers/common.d.ts +0 -1
  246. package/dist/packages/connect/src/helpers/country.d.ts +0 -21
  247. package/dist/packages/connect/src/helpers/currency.d.ts +0 -2
  248. package/dist/packages/connect/src/helpers/effect.d.ts +0 -7
  249. package/dist/packages/connect/src/helpers/message.d.ts +0 -32
  250. package/dist/packages/connect/src/helpers/number.d.ts +0 -3
  251. package/dist/packages/connect/src/helpers/qr.d.ts +0 -7
  252. package/dist/packages/connect/src/helpers/rrule.d.ts +0 -26
  253. package/dist/packages/connect/src/helpers/rule.d.ts +0 -91
  254. package/dist/packages/connect/src/helpers/string.d.ts +0 -16
  255. package/dist/packages/connect/src/helpers/tax.d.ts +0 -74
  256. package/dist/packages/connect/src/helpers/trigger.d.ts +0 -59
  257. package/dist/packages/connect/src/helpers/user.d.ts +0 -6
  258. package/dist/packages/connect/src/helpers/zod.d.ts +0 -27
  259. package/dist/packages/connect/src/layouts/MainLayout.vue.d.ts +0 -2
  260. package/dist/packages/connect/src/main.d.ts +0 -2
  261. package/dist/packages/connect/src/router/index.d.ts +0 -5
  262. package/dist/packages/connect/src/router/name.d.ts +0 -2
  263. package/dist/packages/connect/src/router/shared.d.ts +0 -11
  264. package/dist/packages/connect/src/sheets/analytic/AnalyticSheet.vue.d.ts +0 -12
  265. package/dist/packages/connect/src/sheets/campaign/EditCampaignSheet.vue.d.ts +0 -11
  266. package/dist/packages/connect/src/sheets/campaign/SendVoucherSheet.vue.d.ts +0 -13
  267. package/dist/packages/connect/src/sheets/card/CardDesignSheet.vue.d.ts +0 -9
  268. package/dist/packages/connect/src/sheets/card/CreateCardSheet.vue.d.ts +0 -11
  269. package/dist/packages/connect/src/sheets/collectible/EditRewardSheet.vue.d.ts +0 -15
  270. package/dist/packages/connect/src/sheets/collectible/EditTitleSheet.vue.d.ts +0 -15
  271. package/dist/packages/connect/src/sheets/collection/CreateCollectionSheet.vue.d.ts +0 -9
  272. package/dist/packages/connect/src/sheets/effect/EffectSheet.vue.d.ts +0 -135
  273. package/dist/packages/connect/src/sheets/member/MemberDetailSheet.vue.d.ts +0 -22
  274. package/dist/packages/connect/src/sheets/store/StoreSettingSheet.vue.d.ts +0 -80
  275. package/dist/packages/connect/src/types/index.d.ts +0 -4
  276. package/dist/packages/connect/src/views/Analytic.vue.d.ts +0 -2
  277. package/dist/packages/connect/src/views/Marketing.vue.d.ts +0 -2
  278. package/dist/packages/connect/src/views/Setting.vue.d.ts +0 -2
  279. package/dist/packages/connect/src/views/Transaction.vue.d.ts +0 -2
  280. package/dist/packages/connect/src/views/campaign/Broadcast.vue.d.ts +0 -2
  281. package/dist/packages/connect/src/views/campaign/Promotion.vue.d.ts +0 -2
  282. package/dist/packages/connect/src/views/campaign/Voucher.vue.d.ts +0 -2
  283. package/dist/packages/connect/src/views/loyalty/Card.vue.d.ts +0 -2
  284. package/dist/packages/connect/src/views/loyalty/Member.vue.d.ts +0 -2
  285. package/dist/packages/connect/src/views/loyalty/Segment.vue.d.ts +0 -2
  286. package/dist/packages/connect/src/views/program/Credit.vue.d.ts +0 -2
  287. package/dist/packages/connect/src/views/program/Experience.vue.d.ts +0 -2
  288. package/dist/packages/connect/src/views/program/Game.vue.d.ts +0 -2
  289. package/dist/packages/connect/src/views/program/Point.vue.d.ts +0 -2
  290. package/dist/packages/connect/src/views/program/Tier.vue.d.ts +0 -2
  291. package/dist/packages/connect/src/views/program/Title.vue.d.ts +0 -2
  292. package/dist/packages/connect/src/views/store/Store.vue.d.ts +0 -2
  293. package/dist/packages/connect/src/views/store/StoreRewards.vue.d.ts +0 -2
@@ -1,27 +1,27 @@
1
- import { defineComponent as G, computed as R, resolveComponent as V, openBlock as h, createBlock as E, withCtx as T, createElementVNode as v, createVNode as r, createElementBlock as P, toDisplayString as de, unref as e, Fragment as J, renderList as te, ref as A, isRef as ue, createCommentVNode as W, reactive as Ie, onMounted as me, watch as ve, toRaw as Re, createTextVNode as oe, h as De } from "vue";
1
+ import { defineComponent as G, computed as D, resolveComponent as V, openBlock as h, createBlock as O, withCtx as P, createElementVNode as v, createVNode as r, createElementBlock as U, toDisplayString as ae, unref as e, Fragment as z, renderList as oe, ref as A, isRef as ue, createCommentVNode as W, reactive as Ie, onMounted as me, watch as ve, toRaw as Re, createTextVNode as te, h as De } from "vue";
2
2
  import { _ as Be } from "./tier-BJDhpH6X.js";
3
- import { useDialog as Pe, useDialogChild as Ne, components as Ae } from "@feedmepos/ui-library";
4
- import { d as Q, a as Ee, u as Me, p as ce, n as Oe, f as pe } from "./loading-DQaawbHE.js";
5
- import { u as Ue, C as le } from "./membership-Dq2-b-S_.js";
6
- import { a as je, c as $e } from "./object-qECH92oz.js";
7
- import { d as D, z as L, i as fe, S as Le, u as be, J as he, b as He } from "./app-DgbDbhL-.js";
8
- import { F as qe, a as Ke, b as We, c as Te } from "./index-oQLJE4Uw.js";
9
- import { _ as Y, Z as H, g as q, a as K } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
10
- import { _ as ie } from "./lodash-DzdmTD20.js";
11
- import { _ as Je } from "./index-BhacKx5B.js";
12
- import { _ as Ye } from "./ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js";
13
- import { _ as ze } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
14
- import { z as Ge, a as Ze } from "./money-vzwOUBrp.js";
15
- import { F as Qe } from "./number-CBzs6rfW.js";
16
- import { t as Xe } from "./helper-BhvQ9m6d.js";
3
+ import { useDialog as Te, useDialogChild as Ne, components as Ae } from "@feedmepos/ui-library";
4
+ import { d as Q, a as Oe, u as Ee, p as ce, n as Me, f as pe } from "./loading-C1IzY-n2.js";
5
+ import { u as Ue, C as se } from "./membership-D3I4udu3.js";
6
+ import { a as je, c as Pe } from "./object-qECH92oz.js";
7
+ import { d as T, z as q, i as fe, S as Le, u as be, J as he, b as He } from "./app-BvizV9z5.js";
8
+ import { F as qe, a as Ke, b as We, c as $e } from "./index-CjZxaXvZ.js";
9
+ import { _ as J, Z as K, g as L, a as H } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
10
+ import { _ as de } from "./lodash-BMQ4xbjY.js";
11
+ import { _ as ze } from "./index-BLWw_MlC.js";
12
+ import { _ as Je } from "./ImageInput.vue_vue_type_script_setup_true_lang-DpYjrT3G.js";
13
+ import { _ as Ye } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
14
+ import { z as Ge, a as Ze } from "./money-BQEcWGhZ.js";
15
+ import { F as Qe } from "./number-DGx2QPUy.js";
16
+ import { t as Xe } from "./helper-CiIZ1pUo.js";
17
17
  import { useRouter as et } from "vue-router";
18
- import { m as ye } from "./index-VmFlM704.js";
18
+ import { m as ye } from "./index-C5N8jeJ1.js";
19
19
  function tt(f) {
20
20
  return Q.DineroFactory(f).toUnit();
21
21
  }
22
- function ot(f, b, u, F, _ = [], t = []) {
23
- const p = Je.compact(
24
- b.map((d) => f.find((i) => i.systemCode === d.systemCode && i.taxCode === d.taxCode)).filter((d) => !!d && t.includes(d.systemCode))
22
+ function ot(f, b, u, w, _ = [], a = []) {
23
+ const p = ze.compact(
24
+ b.map((d) => f.find((i) => i.systemCode === d.systemCode && i.taxCode === d.taxCode)).filter((d) => !!d && a.includes(d.systemCode))
25
25
  ), m = p.reduce(
26
26
  (d, i) => {
27
27
  var n;
@@ -43,7 +43,7 @@ function ot(f, b, u, F, _ = [], t = []) {
43
43
  });
44
44
  },
45
45
  {}
46
- ), a = Q.Calculator.calculate({
46
+ ), t = Q.Calculator.calculate({
47
47
  items: {
48
48
  0: {
49
49
  quantity: 1,
@@ -52,7 +52,7 @@ function ot(f, b, u, F, _ = [], t = []) {
52
52
  level: 0,
53
53
  type: {
54
54
  type: "BY_AMOUNT",
55
- amount: Q.DineroFactory(u).subtract(Q.Dinero.fromNumber({ number: F }).toObject()).toObject()
55
+ amount: Q.DineroFactory(u).subtract(Q.Dinero.fromNumber({ number: w }).toObject()).toObject()
56
56
  }
57
57
  }
58
58
  },
@@ -69,14 +69,14 @@ function ot(f, b, u, F, _ = [], t = []) {
69
69
  taxCode: d.taxCode,
70
70
  rate: d.rate,
71
71
  total: Q.DineroFactory({
72
- ...a.items[0].taxes[d.taxCode]
72
+ ...t.items[0].taxes[d.taxCode]
73
73
  }).convertPrecision(2).toObject()
74
74
  }));
75
75
  }
76
76
  function at(f, b, u) {
77
- return f ? f.reduce((F, _) => {
78
- var t;
79
- return (t = u.find((p) => p.systemCode === _.systemCode)) != null && t.inclusive || (F = Q.DineroFactory(F.toObject()).add(_.total)), F;
77
+ return f ? f.reduce((w, _) => {
78
+ var a;
79
+ return (a = u.find((p) => p.systemCode === _.systemCode)) != null && a.inclusive || (w = Q.DineroFactory(w.toObject()).add(_.total)), w;
80
80
  }, Q.DineroFactory(b)).toObject() : Q.DineroFactory(b).toObject();
81
81
  }
82
82
  const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, st = ["src"], rt = { class: "fm-typo-en-body-lg-600" }, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, dt = { class: "flex gap-8 items-center flex-wrap" }, ut = /* @__PURE__ */ G({
@@ -86,42 +86,42 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
86
86
  },
87
87
  emits: ["edit", "delete"],
88
88
  setup(f, { emit: b }) {
89
- const u = f, F = b, _ = R(() => {
89
+ const u = f, w = b, _ = D(() => {
90
90
  const p = [];
91
91
  return u.bundle.price.amount > 0 && p.push(
92
- `${D.Config.getCountry().currency.symbol}${tt(u.bundle.price)}`
92
+ `${T.Config.getCountry().currency.symbol}${tt(u.bundle.price)}`
93
93
  ), u.bundle.coinPrice && p.push(`${u.bundle.coinPrice} point(s)`), p.join(" or ");
94
- }), t = R(() => {
95
- var m, a;
94
+ }), a = D(() => {
95
+ var m, t;
96
96
  const p = [];
97
97
  if (u.bundle.titles.length > 0 && p.push(`${u.bundle.titles.length} title(s)`), u.bundle.vouchers.length > 0 && p.push(`${u.bundle.vouchers.length} voucher(s)`), u.bundle.credit.normal || (m = u.bundle.credit.free) != null && m.amount) {
98
- const d = u.bundle.credit.normal + (((a = u.bundle.credit.free) == null ? void 0 : a.amount) ?? 0);
98
+ const d = u.bundle.credit.normal + (((t = u.bundle.credit.free) == null ? void 0 : t.amount) ?? 0);
99
99
  p.push(`${d} credit(s)`);
100
100
  }
101
101
  return p;
102
102
  });
103
103
  return (p, m) => {
104
- const a = V("FmButton"), d = V("FmMenuItem"), i = V("FmMenu"), n = V("FmIcon"), y = V("FmChip"), l = V("FmCard");
105
- return h(), E(l, {
104
+ const t = V("FmButton"), d = V("FmMenuItem"), i = V("FmMenu"), n = V("FmIcon"), y = V("FmChip"), l = V("FmCard");
105
+ return h(), O(l, {
106
106
  variant: "outlined",
107
107
  class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center relative"
108
108
  }, {
109
- default: T(() => [
109
+ default: P(() => [
110
110
  v("div", nt, [
111
111
  r(i, { placement: "bottom-end" }, {
112
- "menu-button": T(() => [
113
- r(a, {
112
+ "menu-button": P(() => [
113
+ r(t, {
114
114
  icon: "more_vert",
115
115
  variant: "tertiary"
116
116
  })
117
117
  ]),
118
- default: T(() => [
118
+ default: P(() => [
119
119
  r(d, {
120
- onClick: m[0] || (m[0] = (g) => F("edit", f.bundle)),
120
+ onClick: m[0] || (m[0] = (g) => w("edit", f.bundle)),
121
121
  label: "Edit"
122
122
  }),
123
123
  r(d, {
124
- onClick: m[1] || (m[1] = (g) => F("delete", f.bundle)),
124
+ onClick: m[1] || (m[1] = (g) => w("delete", f.bundle)),
125
125
  label: "Delete"
126
126
  })
127
127
  ]),
@@ -129,11 +129,11 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
129
129
  })
130
130
  ]),
131
131
  v("div", lt, [
132
- f.bundle.image ? (h(), P("img", {
132
+ f.bundle.image ? (h(), U("img", {
133
133
  key: 1,
134
134
  src: f.bundle.image,
135
135
  class: "w-full h-full object-contain aspect-video"
136
- }, null, 8, st)) : (h(), E(n, {
136
+ }, null, 8, st)) : (h(), O(n, {
137
137
  key: 0,
138
138
  name: "image",
139
139
  outline: !0,
@@ -141,11 +141,11 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
141
141
  class: "text-fm-color-neutral-gray-200"
142
142
  }))
143
143
  ]),
144
- v("div", rt, de(f.bundle.name), 1),
145
- v("div", it, de(e(_) || "Free"), 1),
144
+ v("div", rt, ae(f.bundle.name), 1),
145
+ v("div", it, ae(e(_) || "Free"), 1),
146
146
  v("div", dt, [
147
- (h(!0), P(J, null, te(e(t), (g, k) => (h(), E(y, {
148
- key: k,
147
+ (h(!0), U(z, null, oe(e(a), (g, I) => (h(), O(y, {
148
+ key: I,
149
149
  label: g
150
150
  }, null, 8, ["label"]))), 128))
151
151
  ])
@@ -159,14 +159,14 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
159
159
  emits: ["create"],
160
160
  setup(f, { emit: b }) {
161
161
  const u = b;
162
- return (F, _) => {
163
- const t = V("FmButton"), p = V("FmCard");
164
- return h(), E(p, {
162
+ return (w, _) => {
163
+ const a = V("FmButton"), p = V("FmCard");
164
+ return h(), O(p, {
165
165
  variant: "outlined",
166
166
  class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
167
167
  }, {
168
- default: T(() => [
169
- r(t, {
168
+ default: P(() => [
169
+ r(a, {
170
170
  onClick: _[0] || (_[0] = (m) => u("create")),
171
171
  label: "Add bundle",
172
172
  icon: "add",
@@ -190,30 +190,30 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
190
190
  }
191
191
  },
192
192
  setup(f) {
193
- const b = f, u = Pe(), { emitData: F, emitAction: _ } = Ne(), t = A(b.initialValue), p = L.string().min(1), m = R(() => {
194
- const i = p.safeParse(t.value);
193
+ const b = f, u = Te(), { emitData: w, emitAction: _ } = Ne(), a = A(b.initialValue), p = q.string().min(1), m = D(() => {
194
+ const i = p.safeParse(a.value);
195
195
  return i.success ? "" : i.error.flatten().formErrors.join(`
196
196
  `);
197
197
  });
198
- function a() {
199
- F(t.value), _("primary"), u.close();
198
+ function t() {
199
+ w(a.value), _("primary"), u.close();
200
200
  }
201
201
  function d() {
202
- F(null), _("primary"), u.close();
202
+ w(null), _("primary"), u.close();
203
203
  }
204
204
  return (i, n) => {
205
205
  const y = V("FmTextField"), l = V("FmButton");
206
- return h(), P("div", null, [
206
+ return h(), U("div", null, [
207
207
  r(y, {
208
- modelValue: e(t),
209
- "onUpdate:modelValue": n[0] || (n[0] = (g) => ue(t) ? t.value = g : null),
208
+ modelValue: e(a),
209
+ "onUpdate:modelValue": n[0] || (n[0] = (g) => ue(a) ? a.value = g : null),
210
210
  label: "Category name",
211
211
  "helper-text": e(m),
212
212
  "helper-state": e(m) ? "error" : "none"
213
213
  }, null, 8, ["modelValue", "helper-text", "helper-state"]),
214
214
  v("div", ct, [
215
215
  v("div", null, [
216
- f.action == "edit" ? (h(), E(l, {
216
+ f.action == "edit" ? (h(), O(l, {
217
217
  key: 0,
218
218
  onClick: d,
219
219
  label: "Delete",
@@ -229,7 +229,7 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
229
229
  r(l, {
230
230
  label: f.action == "edit" ? "Edit" : "Add",
231
231
  disabled: !!e(m),
232
- onClick: a
232
+ onClick: t
233
233
  }, null, 8, ["label", "disabled"])
234
234
  ])
235
235
  ])
@@ -310,40 +310,40 @@ const yt = {
310
310
  return ge(this);
311
311
  }
312
312
  }
313
- }, se = () => D.Config.getCountry(), re = {
313
+ }, re = () => T.Config.getCountry(), ie = {
314
314
  get fullCurrency() {
315
- return se().currency;
315
+ return re().currency;
316
316
  },
317
317
  get currency() {
318
- return se().currency.code;
318
+ return re().currency.code;
319
319
  },
320
320
  get fullTax() {
321
- return D.Country.getCountryFlattenTaxes(se().code);
321
+ return T.Country.getCountryFlattenTaxes(re().code);
322
322
  },
323
323
  get taxSystem() {
324
- return se().taxSystems;
324
+ return re().taxSystems;
325
325
  },
326
326
  taxInclusion(f) {
327
- return re.taxSystem.map((b) => ({
327
+ return ie.taxSystem.map((b) => ({
328
328
  systemCode: b.code,
329
329
  inclusive: f !== void 0 ? f : !1
330
330
  }));
331
331
  },
332
332
  groupedTaxOptions() {
333
- const f = D.Country.getCountryFlattenTaxes(se().code);
334
- return re.taxSystem.map((b) => ({
333
+ const f = T.Country.getCountryFlattenTaxes(re().code);
334
+ return ie.taxSystem.map((b) => ({
335
335
  code: b.code,
336
- options: f.map((u) => ({ ...u, feedmeTaxCode: re.generateCode(u) })).filter((u) => u.systemCode === b.code)
336
+ options: f.map((u) => ({ ...u, feedmeTaxCode: ie.generateCode(u) })).filter((u) => u.systemCode === b.code)
337
337
  }));
338
338
  },
339
339
  systemDefaultCode(f) {
340
- const b = re.groupedTaxOptions().find((u) => u.code === f);
340
+ const b = ie.groupedTaxOptions().find((u) => u.code === f);
341
341
  return b == null ? void 0 : b.options.find((u) => u.default);
342
342
  },
343
343
  generateCode(f) {
344
344
  return `${f.systemCode}/${f.taxCode}`;
345
345
  }
346
- }, z = re, gt = /* @__PURE__ */ G({
346
+ }, Y = ie, gt = /* @__PURE__ */ G({
347
347
  __name: "TaxInclusiveSetting",
348
348
  props: {
349
349
  modelValue: {
@@ -354,16 +354,16 @@ const yt = {
354
354
  },
355
355
  emits: ["update:model-value"],
356
356
  setup(f, { emit: b }) {
357
- const u = f, F = z.taxSystem, _ = b, t = A(u.modelValue);
357
+ const u = f, w = Y.taxSystem, _ = b, a = A(u.modelValue);
358
358
  function p(i, n) {
359
- const y = ie.clone(u.modelValue), l = y.findIndex((g) => g.systemCode === i);
359
+ const y = de.clone(u.modelValue), l = y.findIndex((g) => g.systemCode === i);
360
360
  l >= 0 ? y[l].inclusive = n : y.push({
361
361
  systemCode: i,
362
362
  inclusive: n
363
- }), t.value = y, _("update:model-value", y);
363
+ }), a.value = y, _("update:model-value", y);
364
364
  }
365
365
  function m() {
366
- return F.map((i) => {
366
+ return w.map((i) => {
367
367
  const n = u.modelValue ? u.modelValue.find((y) => y.systemCode === i.code) : !1;
368
368
  return {
369
369
  label: i.name,
@@ -376,31 +376,31 @@ const yt = {
376
376
  };
377
377
  });
378
378
  }
379
- const a = Ie(m());
379
+ const t = Ie(m());
380
380
  function d(i, n) {
381
381
  return `${i} ${n ? "Inclusive" : "Exclusive"}`;
382
382
  }
383
383
  return me(() => {
384
- u.modelValue.length || p(F[0].code, !1);
384
+ u.modelValue.length || p(w[0].code, !1);
385
385
  }), ve(
386
386
  () => u.modelValue,
387
387
  (i, n) => {
388
- i != n && !i.length && p(F[0].code, !1);
388
+ i != n && !i.length && p(w[0].code, !1);
389
389
  }
390
390
  ), (i, n) => {
391
391
  const y = V("FmSwitch");
392
- return h(!0), P(J, null, te(e(a), (l, g) => {
393
- var k;
394
- return h(), P("div", { key: g }, [
392
+ return h(!0), U(z, null, oe(e(t), (l, g) => {
393
+ var I;
394
+ return h(), U("div", { key: g }, [
395
395
  r(y, {
396
- "model-value": ((k = e(t)[g]) == null ? void 0 : k.inclusive) || !1,
396
+ "model-value": ((I = e(a)[g]) == null ? void 0 : I.inclusive) || !1,
397
397
  "label-placement": "left",
398
398
  "onUpdate:modelValue": (B) => l.input(B)
399
399
  }, {
400
- label: T(() => {
400
+ label: P(() => {
401
401
  var B;
402
402
  return [
403
- v("div", null, de(d(l.label, ((B = e(t)[g]) == null ? void 0 : B.inclusive) || !1)), 1)
403
+ v("div", null, ae(d(l.label, ((B = e(a)[g]) == null ? void 0 : B.inclusive) || !1)), 1)
404
404
  ];
405
405
  }),
406
406
  _: 2
@@ -421,29 +421,29 @@ const vt = { class: "space-y-8" }, ht = {
421
421
  },
422
422
  emits: ["update:modelValue"],
423
423
  setup(f, { emit: b }) {
424
- const u = f, F = b, _ = A(!1);
424
+ const u = f, w = b, _ = A(!1);
425
425
  ve(_, (p, m) => {
426
- m != p && (!u.modelValue && p ? F("update:modelValue", {
426
+ m != p && (!u.modelValue && p ? w("update:modelValue", {
427
427
  apiKey: "",
428
428
  webhookSecret: ""
429
- }) : p || F("update:modelValue", void 0));
429
+ }) : p || w("update:modelValue", void 0));
430
430
  });
431
- const t = R(() => {
432
- const p = bt.mode === "development", m = D.Config.getCountry().code.toLowerCase(), a = m != "my" ? `.${m}` : "";
433
- return `https://marketing${p ? "-dev" : ""}${a}.feedmeapi.com/stripe/${Le.getBusinessId()}/webhook`;
431
+ const a = D(() => {
432
+ const p = bt.mode === "development", m = T.Config.getCountry().code.toLowerCase(), t = m != "my" ? `.${m}` : "";
433
+ return `https://marketing${p ? "-dev" : ""}${t}.feedmeapi.com/stripe/${Le.getBusinessId()}/webhook`;
434
434
  });
435
435
  return me(() => {
436
436
  _.value = !!u.modelValue;
437
437
  }), (p, m) => {
438
- const a = V("FmSwitch"), d = V("FmTextField"), i = V("FmButton");
439
- return h(), P("div", vt, [
440
- r(a, {
438
+ const t = V("FmSwitch"), d = V("FmTextField"), i = V("FmButton");
439
+ return h(), U("div", vt, [
440
+ r(t, {
441
441
  modelValue: e(_),
442
442
  "onUpdate:modelValue": m[0] || (m[0] = (n) => ue(_) ? _.value = n : null),
443
443
  value: "true",
444
444
  label: "Enable Stripe"
445
445
  }, null, 8, ["modelValue"]),
446
- u.modelValue ? (h(), P("div", ht, [
446
+ u.modelValue ? (h(), U("div", ht, [
447
447
  r(d, {
448
448
  label: "API Key",
449
449
  modelValue: u.modelValue.apiKey,
@@ -452,15 +452,15 @@ const vt = { class: "space-y-8" }, ht = {
452
452
  }, null, 8, ["modelValue"]),
453
453
  r(d, {
454
454
  label: "Webhook URL",
455
- "model-value": e(t),
455
+ "model-value": e(a),
456
456
  readonly: "",
457
457
  "helper-text": "Copy this URL to your Stripe dashboard"
458
458
  }, {
459
- append: T(() => [
459
+ append: P(() => [
460
460
  r(i, {
461
461
  icon: "content_copy",
462
462
  variant: "tertiary",
463
- onClick: m[2] || (m[2] = (n) => e(Ee)(e(t)))
463
+ onClick: m[2] || (m[2] = (n) => e(Oe)(e(a)))
464
464
  })
465
465
  ]),
466
466
  _: 1
@@ -482,29 +482,29 @@ const vt = { class: "space-y-8" }, ht = {
482
482
  }, Ct = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Company legal information ", -1), Vt = {
483
483
  key: 0,
484
484
  class: "space-y-16"
485
- }, St = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Tax", -1), Ft = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Address", -1), wt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, $t = { class: "space-y-4" }, Tt = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-lg-400" }, "State", -1), Pt = { class: "space-y-16" }, Ut = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Stripe Integration ", -1), kt = { class: "flex items-center gap-8" }, It = /* @__PURE__ */ G({
485
+ }, St = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Tax", -1), Ft = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Address", -1), wt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Pt = { class: "space-y-4" }, $t = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-lg-400" }, "State", -1), Tt = { class: "space-y-16" }, Ut = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Stripe Integration ", -1), kt = { class: "flex items-center gap-8" }, It = /* @__PURE__ */ G({
486
486
  __name: "StoreSettingSheet",
487
487
  emits: ["update"],
488
488
  setup(f, { expose: b, emit: u }) {
489
- const F = u, _ = A(!1), t = A(), p = A(!1), m = qe.extend({
489
+ const w = u, _ = A(!1), a = A(), p = A(!1), m = qe.extend({
490
490
  company: Ke.extend({
491
- name: L.string().min(1, "Company name is required"),
492
- regNo: L.string().min(1, "Registration number is required"),
491
+ name: q.string().min(1, "Company name is required"),
492
+ regNo: q.string().min(1, "Registration number is required"),
493
493
  address: We.extend({
494
- line1: L.string().min(1, "Line 1 is required"),
495
- line2: L.string().optional(),
496
- state: L.string().min(1, "State is required"),
497
- city: L.string().min(1, "City is required"),
498
- postcode: L.string().min(1, "Postcode is required"),
499
- country: L.string().min(1, "Country is required")
494
+ line1: q.string().min(1, "Line 1 is required"),
495
+ line2: q.string().optional(),
496
+ state: q.string().min(1, "State is required"),
497
+ city: q.string().min(1, "City is required"),
498
+ postcode: q.string().min(1, "Postcode is required"),
499
+ country: q.string().min(1, "Country is required")
500
500
  }),
501
- phoneNo: L.string().min(1, "Phone number is required"),
502
- sstRegNo: L.string().optional()
501
+ phoneNo: q.string().min(1, "Phone number is required"),
502
+ sstRegNo: q.string().optional()
503
503
  })
504
- }), a = R(() => m.safeParse(t.value).success);
504
+ }), t = D(() => m.safeParse(a.value).success);
505
505
  function d() {
506
- const y = m.safeParse(t.value);
507
- y.success && F("update", y.data);
506
+ const y = m.safeParse(a.value);
507
+ y.success && w("update", y.data);
508
508
  }
509
509
  function i() {
510
510
  return {
@@ -516,7 +516,7 @@ const vt = { class: "space-y-8" }, ht = {
516
516
  city: "",
517
517
  postcode: "",
518
518
  state: "",
519
- country: D.Config.getCountry().name
519
+ country: T.Config.getCountry().name
520
520
  },
521
521
  phoneNo: "",
522
522
  regNo: "",
@@ -526,114 +526,114 @@ const vt = { class: "space-y-8" }, ht = {
526
526
  };
527
527
  }
528
528
  function n(y, l) {
529
- _.value = y, y && (t.value = l != null && l.company ? l : i());
529
+ _.value = y, y && (a.value = l != null && l.company ? l : i());
530
530
  }
531
531
  return b({
532
532
  showSheet: n,
533
- data: t
533
+ data: a
534
534
  }), (y, l) => {
535
- const g = V("FmIcon"), k = V("FmMenuItem"), B = V("FmMenu"), C = V("FmSelect"), $ = V("FmButton"), U = V("FmSideSheet");
536
- return h(), E(U, {
535
+ const g = V("FmIcon"), I = V("FmMenuItem"), B = V("FmMenu"), C = V("FmSelect"), $ = V("FmButton"), k = V("FmSideSheet");
536
+ return h(), O(k, {
537
537
  "max-width": 560,
538
538
  modelValue: e(_),
539
- "onUpdate:modelValue": l[15] || (l[15] = (I) => ue(_) ? _.value = I : null),
539
+ "onUpdate:modelValue": l[15] || (l[15] = (R) => ue(_) ? _.value = R : null),
540
540
  header: "Store setting"
541
541
  }, {
542
- "side-sheet-footer": T(() => [
542
+ "side-sheet-footer": P(() => [
543
543
  v("div", kt, [
544
544
  r($, {
545
545
  label: "Submit",
546
546
  onClick: d,
547
- disabled: !e(a) || e(be)().isLoading,
547
+ disabled: !e(t) || e(be)().isLoading,
548
548
  loading: e(be)().isLoading
549
549
  }, null, 8, ["disabled", "loading"]),
550
550
  r($, {
551
551
  label: "Cancel",
552
- onClick: l[14] || (l[14] = (I) => n(!1)),
552
+ onClick: l[14] || (l[14] = (R) => n(!1)),
553
553
  variant: "tertiary"
554
554
  })
555
555
  ])
556
556
  ]),
557
- default: T(() => {
558
- var I, M;
557
+ default: P(() => {
558
+ var R, E;
559
559
  return [
560
- r(he, { json: e(t) }, null, 8, ["json"]),
561
- e(t) && e(t).company ? (h(), P("div", _t, [
560
+ r(he, { json: e(a) }, null, 8, ["json"]),
561
+ e(a) && e(a).company ? (h(), U("div", _t, [
562
562
  Ct,
563
- r(Y, {
564
- modelValue: e(t).company.name,
565
- "onUpdate:modelValue": l[0] || (l[0] = (c) => e(t).company.name = c),
563
+ r(J, {
564
+ modelValue: e(a).company.name,
565
+ "onUpdate:modelValue": l[0] || (l[0] = (c) => e(a).company.name = c),
566
566
  label: "Company name",
567
- schema: e(H).typeAtPath(e(m), "company.name")
567
+ schema: e(K).typeAtPath(e(m), "company.name")
568
568
  }, null, 8, ["modelValue", "schema"]),
569
- r(Y, {
570
- modelValue: e(t).company.regNo,
571
- "onUpdate:modelValue": l[1] || (l[1] = (c) => e(t).company.regNo = c),
569
+ r(J, {
570
+ modelValue: e(a).company.regNo,
571
+ "onUpdate:modelValue": l[1] || (l[1] = (c) => e(a).company.regNo = c),
572
572
  label: "Registration number",
573
- schema: e(H).typeAtPath(e(m), "company.regNo")
573
+ schema: e(K).typeAtPath(e(m), "company.regNo")
574
574
  }, null, 8, ["modelValue", "schema"]),
575
- r(Y, {
576
- modelValue: e(t).company.sstRegNo,
575
+ r(J, {
576
+ modelValue: e(a).company.sstRegNo,
577
577
  "onUpdate:modelValue": [
578
- l[2] || (l[2] = (c) => e(t).company.sstRegNo = c),
579
- l[3] || (l[3] = (c) => c ? null : e(t).inclusiveTaxes = [])
578
+ l[2] || (l[2] = (c) => e(a).company.sstRegNo = c),
579
+ l[3] || (l[3] = (c) => c ? null : e(a).inclusiveTaxes = [])
580
580
  ],
581
581
  label: "Tax Registration number",
582
- schema: e(H).typeAtPath(e(m), "company.sstRegNo")
582
+ schema: e(K).typeAtPath(e(m), "company.sstRegNo")
583
583
  }, null, 8, ["modelValue", "schema"]),
584
- (I = e(t).company) != null && I.sstRegNo && e(t).inclusiveTaxes ? (h(), P("div", Vt, [
584
+ (R = e(a).company) != null && R.sstRegNo && e(a).inclusiveTaxes ? (h(), U("div", Vt, [
585
585
  St,
586
586
  r(gt, {
587
- modelValue: e(t).inclusiveTaxes,
588
- "onUpdate:modelValue": l[4] || (l[4] = (c) => e(t).inclusiveTaxes = c)
587
+ modelValue: e(a).inclusiveTaxes,
588
+ "onUpdate:modelValue": l[4] || (l[4] = (c) => e(a).inclusiveTaxes = c)
589
589
  }, null, 8, ["modelValue"])
590
590
  ])) : W("", !0),
591
- r(Y, {
592
- modelValue: e(t).company.phoneNo,
593
- "onUpdate:modelValue": l[5] || (l[5] = (c) => e(t).company.phoneNo = c),
591
+ r(J, {
592
+ modelValue: e(a).company.phoneNo,
593
+ "onUpdate:modelValue": l[5] || (l[5] = (c) => e(a).company.phoneNo = c),
594
594
  label: "Phone number",
595
- schema: e(H).typeAtPath(e(m), "company.phoneNo")
595
+ schema: e(K).typeAtPath(e(m), "company.phoneNo")
596
596
  }, null, 8, ["modelValue", "schema"]),
597
597
  Ft,
598
- r(Y, {
599
- modelValue: e(t).company.address.line1,
600
- "onUpdate:modelValue": l[6] || (l[6] = (c) => e(t).company.address.line1 = c),
598
+ r(J, {
599
+ modelValue: e(a).company.address.line1,
600
+ "onUpdate:modelValue": l[6] || (l[6] = (c) => e(a).company.address.line1 = c),
601
601
  label: "Line 1",
602
- schema: e(H).typeAtPath(e(m), "company.address.line1")
602
+ schema: e(K).typeAtPath(e(m), "company.address.line1")
603
603
  }, null, 8, ["modelValue", "schema"]),
604
- r(Y, {
605
- modelValue: e(t).company.address.line2,
606
- "onUpdate:modelValue": l[7] || (l[7] = (c) => e(t).company.address.line2 = c),
604
+ r(J, {
605
+ modelValue: e(a).company.address.line2,
606
+ "onUpdate:modelValue": l[7] || (l[7] = (c) => e(a).company.address.line2 = c),
607
607
  label: "Line 2",
608
- schema: e(H).typeAtPath(e(m), "company.address.line2")
608
+ schema: e(K).typeAtPath(e(m), "company.address.line2")
609
609
  }, null, 8, ["modelValue", "schema"]),
610
610
  v("div", wt, [
611
- r(Y, {
612
- modelValue: e(t).company.address.city,
613
- "onUpdate:modelValue": l[8] || (l[8] = (c) => e(t).company.address.city = c),
611
+ r(J, {
612
+ modelValue: e(a).company.address.city,
613
+ "onUpdate:modelValue": l[8] || (l[8] = (c) => e(a).company.address.city = c),
614
614
  label: "City",
615
- schema: e(H).typeAtPath(e(m), "company.address.city")
615
+ schema: e(K).typeAtPath(e(m), "company.address.city")
616
616
  }, null, 8, ["modelValue", "schema"]),
617
- r(Y, {
618
- modelValue: e(t).company.address.postcode,
619
- "onUpdate:modelValue": l[9] || (l[9] = (c) => e(t).company.address.postcode = c),
617
+ r(J, {
618
+ modelValue: e(a).company.address.postcode,
619
+ "onUpdate:modelValue": l[9] || (l[9] = (c) => e(a).company.address.postcode = c),
620
620
  label: "Postcode",
621
- schema: e(H).typeAtPath(e(m), "company.address.postcode")
621
+ schema: e(K).typeAtPath(e(m), "company.address.postcode")
622
622
  }, null, 8, ["modelValue", "schema"]),
623
- v("div", $t, [
624
- Tt,
623
+ v("div", Pt, [
624
+ $t,
625
625
  r(B, {
626
626
  placement: "top-end",
627
627
  "model-value": e(p)
628
628
  }, {
629
- "menu-button": T(() => [
630
- r(Y, {
631
- modelValue: e(t).company.address.state,
632
- "onUpdate:modelValue": l[10] || (l[10] = (c) => e(t).company.address.state = c),
633
- schema: e(H).typeAtPath(e(m), "company.address.state"),
629
+ "menu-button": P(() => [
630
+ r(J, {
631
+ modelValue: e(a).company.address.state,
632
+ "onUpdate:modelValue": l[10] || (l[10] = (c) => e(a).company.address.state = c),
633
+ schema: e(K).typeAtPath(e(m), "company.address.state"),
634
634
  onFocusChanged: l[11] || (l[11] = (c) => p.value = c)
635
635
  }, {
636
- append: T(() => [
636
+ append: P(() => [
637
637
  r(g, {
638
638
  name: e(p) ? "keyboard_arrow_up" : "keyboard_arrow_down"
639
639
  }, null, 8, ["name"])
@@ -641,18 +641,18 @@ const vt = { class: "space-y-8" }, ht = {
641
641
  _: 1
642
642
  }, 8, ["modelValue", "schema"])
643
643
  ]),
644
- default: T(() => [
645
- (h(!0), P(J, null, te(e(yt)[e(D.Config).getCountry().code].stateItems.filter(
644
+ default: P(() => [
645
+ (h(!0), U(z, null, oe(e(yt)[e(T.Config).getCountry().code].stateItems.filter(
646
646
  (c) => {
647
- var N, O;
648
- return c.label.toLowerCase().includes(((O = (N = e(t)) == null ? void 0 : N.company) == null ? void 0 : O.address.state.toLowerCase()) ?? "");
647
+ var N, M;
648
+ return c.label.toLowerCase().includes(((M = (N = e(a)) == null ? void 0 : N.company) == null ? void 0 : M.address.state.toLowerCase()) ?? "");
649
649
  }
650
- ) || [], (c) => (h(), E(k, {
650
+ ) || [], (c) => (h(), O(I, {
651
651
  key: c.value,
652
- "model-value": e(t).company.address.state === c.value,
652
+ "model-value": e(a).company.address.state === c.value,
653
653
  label: c.label,
654
654
  onClick: () => {
655
- e(t).company.address.state = c.value, p.value = !1;
655
+ e(a).company.address.state = c.value, p.value = !1;
656
656
  }
657
657
  }, null, 8, ["model-value", "label", "onClick"]))), 128))
658
658
  ]),
@@ -661,22 +661,22 @@ const vt = { class: "space-y-8" }, ht = {
661
661
  ]),
662
662
  r(C, {
663
663
  label: "Country",
664
- modelValue: e(t).company.address.country,
665
- "onUpdate:modelValue": l[12] || (l[12] = (c) => e(t).company.address.country = c),
664
+ modelValue: e(a).company.address.country,
665
+ "onUpdate:modelValue": l[12] || (l[12] = (c) => e(a).company.address.country = c),
666
666
  items: [
667
667
  {
668
- label: e(D.Config).getCountry().name,
669
- value: e(D.Config).getCountry().name
668
+ label: e(T.Config).getCountry().name,
669
+ value: e(T.Config).getCountry().name
670
670
  }
671
671
  ],
672
- rules: [e(H).ruleAtPath(e(m), "company.address.country")]
672
+ rules: [e(K).ruleAtPath(e(m), "company.address.country")]
673
673
  }, null, 8, ["modelValue", "items", "rules"])
674
674
  ]),
675
- v("div", Pt, [
675
+ v("div", Tt, [
676
676
  Ut,
677
677
  r(xt, {
678
- "model-value": (M = e(t)) == null ? void 0 : M.stripe,
679
- "onUpdate:modelValue": l[13] || (l[13] = (c) => e(t).stripe = c)
678
+ "model-value": (E = e(a)) == null ? void 0 : E.stripe,
679
+ "onUpdate:modelValue": l[13] || (l[13] = (c) => e(a).stripe = c)
680
680
  }, null, 8, ["model-value"])
681
681
  ])
682
682
  ])) : W("", !0)
@@ -688,7 +688,7 @@ const vt = { class: "space-y-8" }, ht = {
688
688
  }
689
689
  });
690
690
  function Rt(f, b = !0) {
691
- return D.DineroFactory(f).toFormat(b);
691
+ return T.DineroFactory(f).toFormat(b);
692
692
  }
693
693
  const Dt = /* @__PURE__ */ G({
694
694
  __name: "TaxVariantSetting",
@@ -701,22 +701,22 @@ const Dt = /* @__PURE__ */ G({
701
701
  },
702
702
  emits: ["update:modelValue"],
703
703
  setup(f, { emit: b }) {
704
- const u = f, F = b;
704
+ const u = f, w = b;
705
705
  me(() => {
706
- if (p.value.length !== t.value.length) {
707
- const d = t.value.reduce((i, n) => {
708
- const y = z.systemDefaultCode(n.name);
706
+ if (p.value.length !== a.value.length) {
707
+ const d = a.value.reduce((i, n) => {
708
+ const y = Y.systemDefaultCode(n.name);
709
709
  if (!y) return i;
710
710
  const { systemCode: l, taxCode: g } = y;
711
711
  return n.value || i.push({ systemCode: l, taxCode: g }), i;
712
712
  }, []);
713
- a(d);
713
+ t(d);
714
714
  }
715
715
  });
716
716
  function _() {
717
- return z.groupedTaxOptions();
717
+ return Y.groupedTaxOptions();
718
718
  }
719
- const t = R(() => _().map((d) => ({
719
+ const a = D(() => _().map((d) => ({
720
720
  name: d.code,
721
721
  value: (p.value || []).find(
722
722
  (i) => d.options.some((n) => n.feedmeTaxCode === i)
@@ -725,29 +725,29 @@ const Dt = /* @__PURE__ */ G({
725
725
  label: `${i.name} (${Qe(i.rate)}%)`,
726
726
  value: i.feedmeTaxCode
727
727
  }))
728
- }))), p = R(() => u.modelValue.map((d) => z.generateCode(d)));
728
+ }))), p = D(() => u.modelValue.map((d) => Y.generateCode(d)));
729
729
  function m(d) {
730
730
  const i = _().find(
731
- (g) => g.options.some((k) => k.feedmeTaxCode === d)
731
+ (g) => g.options.some((I) => I.feedmeTaxCode === d)
732
732
  ), n = i == null ? void 0 : i.options.find((g) => g.feedmeTaxCode === d);
733
733
  if (!n) return;
734
734
  const { systemCode: y, taxCode: l } = n;
735
- a([{ systemCode: y, taxCode: l }]);
735
+ t([{ systemCode: y, taxCode: l }]);
736
736
  }
737
- function a(d) {
738
- const i = ie.clone(u.modelValue);
737
+ function t(d) {
738
+ const i = de.clone(u.modelValue);
739
739
  d.forEach((n) => {
740
740
  const y = _().find(
741
- (k) => k.options.some((B) => B.feedmeTaxCode === z.generateCode(n))
741
+ (I) => I.options.some((B) => B.feedmeTaxCode === Y.generateCode(n))
742
742
  ), l = (y == null ? void 0 : y.options) || [], g = i.findIndex(
743
- (k) => l.some((B) => z.generateCode(B) === z.generateCode(k))
743
+ (I) => l.some((B) => Y.generateCode(B) === Y.generateCode(I))
744
744
  );
745
745
  g >= 0 ? i.splice(g, 1, n) : i.push(n);
746
- }), F("update:modelValue", i);
746
+ }), w("update:modelValue", i);
747
747
  }
748
748
  return (d, i) => {
749
749
  const n = V("FmRadio"), y = V("FmRadioGroup");
750
- return h(!0), P(J, null, te(e(t), (l) => (h(), P("div", {
750
+ return h(!0), U(z, null, oe(e(a), (l) => (h(), U("div", {
751
751
  key: l.name,
752
752
  class: "flex items-start"
753
753
  }, [
@@ -760,9 +760,9 @@ const Dt = /* @__PURE__ */ G({
760
760
  })
761
761
  ]
762
762
  }, {
763
- default: T(() => [
764
- (h(!0), P(J, null, te(l.options, (g, k) => (h(), E(n, {
765
- key: k,
763
+ default: P(() => [
764
+ (h(!0), U(z, null, oe(l.options, (g, I) => (h(), O(n, {
765
+ key: I,
766
766
  value: g.value,
767
767
  label: g.label
768
768
  }, null, 8, ["value", "label"]))), 128))
@@ -778,16 +778,17 @@ const Dt = /* @__PURE__ */ G({
778
778
  }, Nt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Basic information", -1), At = {
779
779
  key: 0,
780
780
  class: "fm-typo-en-title-sm-800 !mb-[-16px]"
781
- }, Et = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1), Mt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1), Ot = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Bundle reward", -1), jt = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, " Let your member know what they can expect from this bundle ", -1), Lt = { class: "space-y-8" }, Ht = { class: "flex items-center justify-between" }, qt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Advanced Setting", -1), Kt = { class: "space-y-8" }, Wt = { class: "flex items-center gap-8" }, Jt = /* @__PURE__ */ G({
781
+ }, Ot = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1), Et = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1), Mt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Bundle reward", -1), jt = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, " Let your member know what they can expect from this bundle ", -1), Lt = { class: "space-y-8" }, Ht = { class: "flex items-center justify-between" }, qt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Advanced Setting", -1), Kt = { class: "space-y-8" }, Wt = { class: "flex items-center gap-8" }, zt = /* @__PURE__ */ G({
782
782
  __name: "EditBundleSheet",
783
783
  emits: ["update"],
784
784
  setup(f, { expose: b, emit: u }) {
785
- const F = {
785
+ const w = {
786
786
  get _id() {
787
787
  return (/* @__PURE__ */ new Date()).toISOString();
788
788
  },
789
789
  name: "",
790
- price: D.Dinero.zero().toObject(),
790
+ price: T.Dinero.zero().toObject(),
791
+ originalPrice: T.Dinero.zero().toObject(),
791
792
  vouchers: [],
792
793
  credit: {
793
794
  normal: 0,
@@ -804,11 +805,11 @@ const Dt = /* @__PURE__ */ G({
804
805
  taxTotals: [],
805
806
  internal: !1,
806
807
  priceWithTaxes: Ge()
807
- }, _ = u, t = Ue(), p = A(!1), m = A({
808
+ }, _ = u, a = Ue(), p = A(!1), m = A({
808
809
  category: 0,
809
810
  index: -1
810
- }), a = A(ie.cloneDeep(F)), d = A(), i = Te.superRefine((s, o) => {
811
- var x, w;
811
+ }), t = A(de.cloneDeep(w)), d = A(), i = $e.superRefine((s, o) => {
812
+ var x, F;
812
813
  s.price.amount < 0 && o.addIssue({
813
814
  code: "custom",
814
815
  path: ["price"],
@@ -833,21 +834,21 @@ const Dt = /* @__PURE__ */ G({
833
834
  code: "custom",
834
835
  message: "Bundle redeem with point cannot set normal credit.",
835
836
  path: ["credit", "normal"]
836
- }), s.credit.normal > D.Dinero.fromFdoDinero(s.price).toUnit() && o.addIssue({
837
+ }), s.credit.normal > T.Dinero.fromFdoDinero(s.price).toUnit() && o.addIssue({
837
838
  code: "custom",
838
- message: `Normal credit cannot be more than price. Max: ${D.Dinero.fromFdoDinero(s.price).toUnit()}`,
839
+ message: `Normal credit cannot be more than price. Max: ${T.Dinero.fromFdoDinero(s.price).toUnit()}`,
839
840
  path: ["credit", "normal"]
840
841
  }), s.titles.length > 0 && s.titles.some((j) => j.dayToExpire < 0) && o.addIssue({
841
842
  code: "custom",
842
843
  path: ["titles"],
843
844
  message: "Title expiry must be at least 0 day (expire same day)"
844
- }), (((w = (x = s.config) == null ? void 0 : x.options) == null ? void 0 : w.maxPerUser) || 0) < 0 && o.addIssue({
845
+ }), (((F = (x = s.config) == null ? void 0 : x.options) == null ? void 0 : F.maxPerUser) || 0) < 0 && o.addIssue({
845
846
  code: "custom",
846
847
  path: ["config.options.maxPerUser"],
847
848
  message: "Max purchase per user cannot be negative"
848
849
  });
849
- }), n = R(() => {
850
- const s = i.safeParse(a.value);
850
+ }), n = D(() => {
851
+ const s = i.safeParse(t.value);
851
852
  return s.success ? [] : s.error.errors;
852
853
  }), y = [
853
854
  {
@@ -860,7 +861,7 @@ const Dt = /* @__PURE__ */ G({
860
861
  header: "Reward type",
861
862
  accessorFn: (s) => s.collectible.type,
862
863
  cell(s) {
863
- return le[s.row.original.collectible.type].chip();
864
+ return se[s.row.original.collectible.type].chip();
864
865
  }
865
866
  },
866
867
  {
@@ -870,118 +871,118 @@ const Dt = /* @__PURE__ */ G({
870
871
  var x;
871
872
  const o = s.row.original;
872
873
  return o.collectible.type == "VOUCHER" || o.selectedReward == null ? o.description : De(Ae.FmStepperField, {
873
- "onUpdate:modelValue": (w) => {
874
- a.value.titles = a.value.titles.map(
875
- (j) => j.id == o.collectible._id ? { ...j, dayToExpire: w } : j
874
+ "onUpdate:modelValue": (F) => {
875
+ t.value.titles = t.value.titles.map(
876
+ (j) => j.id == o.collectible._id ? { ...j, dayToExpire: F } : j
876
877
  );
877
878
  },
878
879
  modelValue: ((x = o.selectedReward) == null ? void 0 : x.extra) ?? 0,
879
880
  appendText: "day(s)",
880
881
  showSteppers: !1,
881
- disabled: !!a.value.stripePriceId
882
+ disabled: !!t.value.stripePriceId
882
883
  });
883
884
  }
884
885
  }
885
- ], l = A([]), g = R(() => t.bundleRewards.map((s) => {
886
- const o = k.value.find((w) => w.id == s._id), x = s.type === "VOUCHER" ? `${s.options.maxUse} use(s), ${Xe(s.options.validityOption || {})}` : "No expiry";
886
+ ], l = A([]), g = D(() => a.bundleRewards.map((s) => {
887
+ const o = I.value.find((F) => F.id == s._id), x = s.type === "VOUCHER" ? `${s.options.maxUse} use(s), ${Xe(s.options.validityOption || {})}` : "No expiry";
887
888
  return {
888
889
  collectible: s,
889
890
  description: x,
890
891
  selectedReward: o
891
892
  };
892
- })), k = R(() => {
893
+ })), I = D(() => {
893
894
  var s, o;
894
895
  return [
895
- ...((s = a.value) == null ? void 0 : s.titles.map((x) => ({
896
+ ...((s = t.value) == null ? void 0 : s.titles.map((x) => ({
896
897
  id: x.id,
897
898
  extra: x.dayToExpire
898
899
  }))) ?? [],
899
- ...((o = a.value) == null ? void 0 : o.vouchers.map((x) => ({
900
+ ...((o = t.value) == null ? void 0 : o.vouchers.map((x) => ({
900
901
  id: x,
901
902
  extra: void 0
902
903
  }))) ?? []
903
904
  ];
904
- }), B = R(
905
- () => a.value.stripePriceId && a.value.subscriptionValidity ? a.value.subscriptionValidity : 0
905
+ }), B = D(
906
+ () => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
906
907
  );
907
908
  function C(s) {
908
- a.value.subscriptionValidity = s;
909
- for (const o of a.value.titles)
909
+ t.value.subscriptionValidity = s;
910
+ for (const o of t.value.titles)
910
911
  o.dayToExpire = s;
911
- a.value.credit.free && (a.value.credit.free.day = s);
912
+ t.value.credit.free && (t.value.credit.free.day = s);
912
913
  }
913
914
  function $() {
914
- const s = g.value, o = a.value;
915
+ const s = g.value, o = t.value;
915
916
  if (!(!o || !s))
916
917
  for (let x = 0; x < s.length; x++) {
917
- const w = s[x];
918
- U.value[x] ? w.collectible.type == "TITLE" ? o.titles.findIndex(
919
- (ae) => ae.id == w.collectible._id
918
+ const F = s[x];
919
+ k.value[x] ? F.collectible.type == "TITLE" ? o.titles.findIndex(
920
+ (ne) => ne.id == F.collectible._id
920
921
  ) < 0 && o.titles.push({
921
- id: w.collectible._id,
922
+ id: F.collectible._id,
922
923
  dayToExpire: B.value
923
924
  }) : o.vouchers.findIndex(
924
- (ae) => ae == w.collectible._id
925
- ) < 0 && o.vouchers.push(w.collectible._id) : (o.titles = o.titles.filter((ee) => ee.id != w.collectible._id), o.vouchers = o.vouchers.filter(
926
- (ee) => ee != w.collectible._id
925
+ (ne) => ne == F.collectible._id
926
+ ) < 0 && o.vouchers.push(F.collectible._id) : (o.titles = o.titles.filter((ee) => ee.id != F.collectible._id), o.vouchers = o.vouchers.filter(
927
+ (ee) => ee != F.collectible._id
927
928
  ));
928
929
  }
929
930
  }
930
- const U = A({});
931
- ve(U, $, { deep: !0 });
932
- const I = R(() => {
931
+ const k = A({});
932
+ ve(k, $, { deep: !0 });
933
+ const R = D(() => {
933
934
  var s;
934
- return (s = t.storeOption.company) == null ? void 0 : s.sstRegNo;
935
- }), M = R(() => {
935
+ return (s = a.storeOption.company) == null ? void 0 : s.sstRegNo;
936
+ }), E = D(() => {
936
937
  var s, o, x;
937
- return (x = (o = (s = t.storeOption) == null ? void 0 : s.inclusiveTaxes) == null ? void 0 : o[0]) != null && x.inclusive ? "Inclusive" : "Exclusive";
938
- }), c = R(() => {
938
+ return (x = (o = (s = a.storeOption) == null ? void 0 : s.inclusiveTaxes) == null ? void 0 : o[0]) != null && x.inclusive ? "Inclusive" : "Exclusive";
939
+ }), c = D(() => {
939
940
  var s, o;
940
941
  return ot(
941
- z.fullTax,
942
- Re(a.value.taxes),
943
- a.value.price,
944
- Number(a.value.credit.normal),
945
- ((s = t.storeOption) == null ? void 0 : s.inclusiveTaxes) ?? [],
946
- (o = t.storeOption.company) != null && o.sstRegNo ? z.taxSystem.map((x) => x.code) : []
942
+ Y.fullTax,
943
+ Re(t.value.taxes),
944
+ t.value.price,
945
+ Number(t.value.credit.normal),
946
+ ((s = a.storeOption) == null ? void 0 : s.inclusiveTaxes) ?? [],
947
+ (o = a.storeOption.company) != null && o.sstRegNo ? Y.taxSystem.map((x) => x.code) : []
947
948
  );
948
- }), N = R(() => c.value.reduce(
949
+ }), N = D(() => c.value.reduce(
949
950
  (o, x) => o.add(x.total),
950
951
  Ze()
951
- ).toFormat()), O = R(() => {
952
- var w;
952
+ ).toFormat()), M = D(() => {
953
+ var F;
953
954
  const s = at(
954
955
  c.value,
955
- a.value.price,
956
- ((w = t.storeOption) == null ? void 0 : w.inclusiveTaxes) ?? []
956
+ t.value.price,
957
+ ((F = a.storeOption) == null ? void 0 : F.inclusiveTaxes) ?? []
957
958
  );
958
- a.value.priceWithTaxes = s;
959
+ t.value.priceWithTaxes = s;
959
960
  const o = Rt(s, !1), x = Number(o.replace(/[^\d.-]/g, ""));
960
961
  return Number.isNaN(x) ? 0 : x;
961
962
  });
962
963
  function X() {
963
- a.value.taxTotals = c.value, _("update", Te.parse(je(a.value)));
964
+ t.value.taxTotals = c.value, _("update", $e.parse(je(t.value)));
964
965
  }
965
966
  function Z() {
966
- return ie.cloneDeep(F);
967
+ return de.cloneDeep(w);
967
968
  }
968
969
  function xe(s, o) {
969
- p.value = s, s && o && (console.log(o.bundle, "set.bundle"), d.value = void 0, a.value = o.bundle || Z(), m.value.category = o.category, m.value.index = o.index, U.value = g.value.reduce((x, w, j) => (x[j] = !!w.selectedReward, x), {}));
970
+ p.value = s, s && o && (console.log(o.bundle, "set.bundle"), d.value = void 0, t.value = o.bundle || Z(), m.value.category = o.category, m.value.index = o.index, k.value = g.value.reduce((x, F, j) => (x[j] = !!F.selectedReward, x), {}));
970
971
  }
971
972
  return b({
972
973
  showSheet: xe,
973
974
  bundleImage: d,
974
975
  target: m,
975
- data: a
976
+ data: t
976
977
  }), (s, o) => {
977
- const x = V("FmTextField"), w = V("FmStepperField"), j = V("FmMenuItem"), ee = V("FmTable"), ae = V("FmHelperText"), _e = V("FmSwitch"), Ce = V("FmButton"), ke = V("FmSideSheet");
978
- return h(), E(ke, {
978
+ const x = V("FmTextField"), F = V("FmStepperField"), j = V("FmMenuItem"), ee = V("FmTable"), ne = V("FmHelperText"), _e = V("FmSwitch"), Ce = V("FmButton"), ke = V("FmSideSheet");
979
+ return h(), O(ke, {
979
980
  "max-width": 560,
980
981
  modelValue: e(p),
981
- "onUpdate:modelValue": o[17] || (o[17] = (ne) => ue(p) ? p.value = ne : null),
982
+ "onUpdate:modelValue": o[18] || (o[18] = (le) => ue(p) ? p.value = le : null),
982
983
  header: e(m).index != -1 ? "Edit bundle" : "Create bundle"
983
984
  }, {
984
- "side-sheet-footer": T(() => [
985
+ "side-sheet-footer": P(() => [
985
986
  v("div", Wt, [
986
987
  r(Ce, {
987
988
  label: e(m).index != -1 ? "Save" : "Add",
@@ -991,234 +992,252 @@ const Dt = /* @__PURE__ */ G({
991
992
  }, null, 8, ["label", "disabled", "loading"]),
992
993
  r(Ce, {
993
994
  label: "Cancel",
994
- onClick: o[16] || (o[16] = (ne) => xe(!1)),
995
+ onClick: o[17] || (o[17] = (le) => xe(!1)),
995
996
  variant: "tertiary"
996
997
  })
997
998
  ])
998
999
  ]),
999
- default: T(() => {
1000
- var ne, Ve, Se, Fe, we;
1000
+ default: P(() => {
1001
+ var le, Ve, Se, Fe, we;
1001
1002
  return [
1002
- r(he, { json: e(a) }, null, 8, ["json"]),
1003
- e(a) ? (h(), P("div", Bt, [
1003
+ r(he, { json: e(t) }, null, 8, ["json"]),
1004
+ e(t) ? (h(), U("div", Bt, [
1004
1005
  Nt,
1005
1006
  r(x, {
1006
1007
  label: "Bundle name",
1007
- modelValue: e(a).name,
1008
- "onUpdate:modelValue": o[0] || (o[0] = (S) => e(a).name = S),
1009
- "helper-state": e(q)(e(n), "name"),
1010
- "helper-text": e(K)(e(n), "name")
1008
+ modelValue: e(t).name,
1009
+ "onUpdate:modelValue": o[0] || (o[0] = (S) => e(t).name = S),
1010
+ "helper-state": e(L)(e(n), "name"),
1011
+ "helper-text": e(H)(e(n), "name")
1011
1012
  }, null, 8, ["modelValue", "helper-state", "helper-text"]),
1012
- r(Ye, {
1013
+ r(Je, {
1013
1014
  label: "Bundle image",
1014
1015
  class: "w-1/2 xs:w-2/3",
1015
1016
  "aspect-ratio": "16/9",
1016
- thumbnail: e(a).image ?? void 0,
1017
+ thumbnail: e(t).image ?? void 0,
1017
1018
  file: e(d) ?? void 0,
1018
1019
  "onUpdate:file": o[1] || (o[1] = (S) => {
1019
1020
  d.value = S;
1020
1021
  }),
1021
- "helper-state": e(q)(e(n), "image"),
1022
- "helper-text": e(K)(e(n), "image")
1022
+ "helper-state": e(L)(e(n), "image"),
1023
+ "helper-text": e(H)(e(n), "image")
1023
1024
  }, null, 8, ["thumbnail", "file", "helper-state", "helper-text"]),
1024
- r(w, {
1025
- "model-value": e(D.Dinero).fromFdoDinero(e(a).price).toUnit(),
1025
+ r(F, {
1026
+ "model-value": e(T.Dinero).fromFdoDinero(e(t).price).toUnit(),
1026
1027
  label: "Price",
1027
1028
  min: 0,
1028
1029
  "max-fraction-digits": 2,
1029
1030
  "onUpdate:modelValue": o[2] || (o[2] = (S) => {
1030
- e(a).price.amount = S * 10 ** e(a).price.precision;
1031
+ e(t).price.amount = S * 10 ** e(t).price.precision;
1031
1032
  }),
1032
1033
  "is-currency": !0,
1033
1034
  "show-steppers": !1,
1034
- "helper-text": e(K)(e(n), "price") || `${e(D.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e(D.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
1035
- "helper-state": e(q)(e(n), "price")
1035
+ "helper-text": e(H)(e(n), "price") || `${e(T.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e(T.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
1036
+ "helper-state": e(L)(e(n), "price")
1036
1037
  }, {
1037
- prepend: T(() => [
1038
- oe(de(e(D.Dinero).defaultCurrency()), 1)
1038
+ prepend: P(() => [
1039
+ te(ae(e(T.Dinero).defaultCurrency()), 1)
1039
1040
  ]),
1040
1041
  _: 1
1041
1042
  }, 8, ["model-value", "helper-text", "helper-state"]),
1042
- r(w, {
1043
- "model-value": e(a).coinPrice ?? null,
1044
- label: "Point Needed",
1043
+ r(F, {
1044
+ "model-value": e(T.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
1045
+ label: "Original Price",
1045
1046
  min: 0,
1047
+ "max-fraction-digits": 2,
1046
1048
  "onUpdate:modelValue": o[3] || (o[3] = (S) => {
1047
- S > 0 && e(a).credit.normal > 0 && (e(a).credit.normal = 0), e(a).coinPrice = S;
1049
+ (!1 in e(t) || !e(t).originalPrice) && (e(t).originalPrice = e(T.Dinero).zero().toObject()), e(t).originalPrice.amount = S * 10 ** e(t).originalPrice.precision;
1048
1050
  }),
1051
+ "is-currency": !0,
1049
1052
  "show-steppers": !1,
1050
- "helper-state": e(q)(e(n), "coinPrice"),
1051
- "helper-text": e(K)(e(n), "coinPrice")
1053
+ "helper-text": e(H)(e(n), "originalPrice") || "Leave empty or set to 0 to disable original price",
1054
+ "helper-state": e(L)(e(n), "originalPrice")
1052
1055
  }, {
1053
- append: T(() => [
1054
- oe(" point(s) ")
1056
+ prepend: P(() => [
1057
+ te(ae(e(T.Dinero).defaultCurrency()), 1)
1058
+ ]),
1059
+ _: 1
1060
+ }, 8, ["model-value", "helper-text", "helper-state"]),
1061
+ r(F, {
1062
+ "model-value": e(t).coinPrice ?? null,
1063
+ label: "Point Needed",
1064
+ min: 0,
1065
+ "onUpdate:modelValue": o[4] || (o[4] = (S) => {
1066
+ S > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = S;
1067
+ }),
1068
+ "show-steppers": !1,
1069
+ "helper-state": e(L)(e(n), "coinPrice"),
1070
+ "helper-text": e(H)(e(n), "coinPrice")
1071
+ }, {
1072
+ append: P(() => [
1073
+ te(" point(s) ")
1055
1074
  ]),
1056
1075
  _: 1
1057
1076
  }, 8, ["model-value", "helper-state", "helper-text"]),
1058
- e(t).storeOption.stripe ? (h(), P("div", At, " Subscription Settings ")) : W("", !0),
1059
- e(t).storeOption.stripe ? (h(), E(x, {
1077
+ e(a).storeOption.stripe ? (h(), U("div", At, " Subscription Settings ")) : W("", !0),
1078
+ e(a).storeOption.stripe ? (h(), O(x, {
1060
1079
  key: 1,
1061
1080
  label: "Stripe Price ID",
1062
- modelValue: e(a).stripePriceId,
1063
- "onUpdate:modelValue": o[4] || (o[4] = (S) => e(a).stripePriceId = S),
1064
- "helper-state": e(q)(e(n), "stripePriceId"),
1065
- "helper-text": e(K)(e(n), "stripePriceId")
1081
+ modelValue: e(t).stripePriceId,
1082
+ "onUpdate:modelValue": o[5] || (o[5] = (S) => e(t).stripePriceId = S),
1083
+ "helper-state": e(L)(e(n), "stripePriceId"),
1084
+ "helper-text": e(H)(e(n), "stripePriceId")
1066
1085
  }, null, 8, ["modelValue", "helper-state", "helper-text"])) : W("", !0),
1067
- e(a).stripePriceId ? (h(), E(w, {
1086
+ e(t).stripePriceId ? (h(), O(F, {
1068
1087
  key: 2,
1069
- "model-value": e(a).subscriptionValidity ?? null,
1088
+ "model-value": e(t).subscriptionValidity ?? null,
1070
1089
  min: 1,
1071
1090
  "onUpdate:modelValue": C,
1072
1091
  label: "Subscription validity (days)",
1073
1092
  "show-steppers": !1,
1074
- "helper-state": e(q)(e(n), "subscriptionValidity"),
1075
- "helper-text": e(K)(e(n), "subscriptionValidity")
1093
+ "helper-state": e(L)(e(n), "subscriptionValidity"),
1094
+ "helper-text": e(H)(e(n), "subscriptionValidity")
1076
1095
  }, {
1077
- append: T(() => [
1078
- oe(" day(s) ")
1096
+ append: P(() => [
1097
+ te(" day(s) ")
1079
1098
  ]),
1080
1099
  _: 1
1081
1100
  }, 8, ["model-value", "helper-state", "helper-text"])) : W("", !0),
1082
- Et,
1083
- r(w, {
1084
- modelValue: e(a).credit.normal,
1085
- "onUpdate:modelValue": o[5] || (o[5] = (S) => e(a).credit.normal = S),
1101
+ Ot,
1102
+ r(F, {
1103
+ modelValue: e(t).credit.normal,
1104
+ "onUpdate:modelValue": o[6] || (o[6] = (S) => e(t).credit.normal = S),
1086
1105
  label: "Normal credit",
1087
1106
  "show-steppers": !1,
1088
- "helper-state": e(q)(e(n), "credit.normal"),
1089
- "helper-text": e(K)(e(n), "credit.normal")
1107
+ "helper-state": e(L)(e(n), "credit.normal"),
1108
+ "helper-text": e(H)(e(n), "credit.normal")
1090
1109
  }, {
1091
- append: T(() => [
1092
- oe(" credit ")
1110
+ append: P(() => [
1111
+ te(" credit ")
1093
1112
  ]),
1094
1113
  _: 1
1095
1114
  }, 8, ["modelValue", "helper-state", "helper-text"]),
1096
- r(w, {
1097
- "model-value": ((ne = e(a).credit.free) == null ? void 0 : ne.amount) ?? null,
1115
+ r(F, {
1116
+ "model-value": ((le = e(t).credit.free) == null ? void 0 : le.amount) ?? null,
1098
1117
  min: 0,
1099
- "onUpdate:modelValue": o[6] || (o[6] = (S) => {
1100
- e(a).credit.free || (e(a).credit.free = {
1118
+ "onUpdate:modelValue": o[7] || (o[7] = (S) => {
1119
+ e(t).credit.free || (e(t).credit.free = {
1101
1120
  amount: 0,
1102
1121
  day: 1
1103
- }), e(a).credit.free.amount = S;
1122
+ }), e(t).credit.free.amount = S;
1104
1123
  }),
1105
1124
  label: "Free credit",
1106
1125
  "show-steppers": !1,
1107
- "helper-state": e(q)(e(n), "credit.free.amount"),
1108
- "helper-text": e(K)(e(n), "credit.free.amount")
1126
+ "helper-state": e(L)(e(n), "credit.free.amount"),
1127
+ "helper-text": e(H)(e(n), "credit.free.amount")
1109
1128
  }, {
1110
- append: T(() => [
1111
- oe(" credit ")
1129
+ append: P(() => [
1130
+ te(" credit ")
1112
1131
  ]),
1113
1132
  _: 1
1114
1133
  }, 8, ["model-value", "helper-state", "helper-text"]),
1115
- (Ve = e(a).credit.free) != null && Ve.amount ? (h(), E(w, {
1134
+ (Ve = e(t).credit.free) != null && Ve.amount ? (h(), O(F, {
1116
1135
  key: 3,
1117
- disabled: !!e(a).stripePriceId,
1118
- "model-value": ((Se = e(a).credit.free) == null ? void 0 : Se.day) ?? null,
1136
+ disabled: !!e(t).stripePriceId,
1137
+ "model-value": ((Se = e(t).credit.free) == null ? void 0 : Se.day) ?? null,
1119
1138
  min: 0,
1120
- "onUpdate:modelValue": o[7] || (o[7] = (S) => {
1121
- e(a).credit.free || (e(a).credit.free = {
1139
+ "onUpdate:modelValue": o[8] || (o[8] = (S) => {
1140
+ e(t).credit.free || (e(t).credit.free = {
1122
1141
  amount: 0,
1123
1142
  day: 1
1124
- }), e(a).credit.free.day = e(B) || S;
1143
+ }), e(t).credit.free.day = e(B) || S;
1125
1144
  }),
1126
1145
  label: "Free credit valid for",
1127
1146
  "show-steppers": !1,
1128
- "helper-state": e(q)(e(n), "credit.free.day"),
1129
- "helper-text": e(K)(e(n), "credit.free.day")
1147
+ "helper-state": e(L)(e(n), "credit.free.day"),
1148
+ "helper-text": e(H)(e(n), "credit.free.day")
1130
1149
  }, {
1131
- append: T(() => [
1132
- oe(" day(s) ")
1150
+ append: P(() => [
1151
+ te(" day(s) ")
1133
1152
  ]),
1134
1153
  _: 1
1135
1154
  }, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : W("", !0),
1136
- e(I) ? (h(), P(J, { key: 4 }, [
1137
- Mt,
1155
+ e(R) ? (h(), U(z, { key: 4 }, [
1156
+ Et,
1138
1157
  r(Dt, {
1139
- modelValue: e(a).taxes,
1140
- "onUpdate:modelValue": o[8] || (o[8] = (S) => e(a).taxes = S)
1158
+ modelValue: e(t).taxes,
1159
+ "onUpdate:modelValue": o[9] || (o[9] = (S) => e(t).taxes = S)
1141
1160
  }, null, 8, ["modelValue"]),
1142
1161
  r(x, {
1143
- label: `Tax Charged (${e(M)})`,
1162
+ label: `Tax Charged (${e(E)})`,
1144
1163
  "model-value": e(N),
1145
1164
  disabled: ""
1146
1165
  }, null, 8, ["label", "model-value"])
1147
1166
  ], 64)) : W("", !0),
1148
- r(w, {
1167
+ r(F, {
1149
1168
  label: "Total Price",
1150
- "model-value": e(O),
1169
+ "model-value": e(M),
1151
1170
  disabled: !0
1152
1171
  }, null, 8, ["model-value"]),
1153
- Ot,
1172
+ Mt,
1154
1173
  jt,
1155
1174
  v("div", Lt, [
1156
1175
  v("div", Ht, [
1157
- r(ze, {
1176
+ r(Ye, {
1158
1177
  label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
1159
1178
  }, {
1160
- default: T(() => [
1179
+ default: P(() => [
1161
1180
  r(j, {
1162
- onClick: o[9] || (o[9] = (S) => l.value = []),
1181
+ onClick: o[10] || (o[10] = (S) => l.value = []),
1163
1182
  label: "All"
1164
1183
  }),
1165
1184
  r(j, {
1166
- onClick: o[10] || (o[10] = (S) => l.value = [
1185
+ onClick: o[11] || (o[11] = (S) => l.value = [
1167
1186
  {
1168
1187
  id: "type",
1169
1188
  value: "VOUCHER",
1170
- name: e(le).VOUCHER.name
1189
+ name: e(se).VOUCHER.name
1171
1190
  }
1172
1191
  ]),
1173
- label: e(le).VOUCHER.name
1192
+ label: e(se).VOUCHER.name
1174
1193
  }, null, 8, ["label"]),
1175
1194
  r(j, {
1176
- onClick: o[11] || (o[11] = (S) => l.value = [
1195
+ onClick: o[12] || (o[12] = (S) => l.value = [
1177
1196
  {
1178
1197
  id: "type",
1179
1198
  value: "TITLE",
1180
- name: e(le).TITLE.name
1199
+ name: e(se).TITLE.name
1181
1200
  }
1182
1201
  ]),
1183
- label: e(le).TITLE.name
1202
+ label: e(se).TITLE.name
1184
1203
  }, null, 8, ["label"])
1185
1204
  ]),
1186
1205
  _: 1
1187
1206
  }, 8, ["label"])
1188
1207
  ]),
1189
1208
  r(ee, {
1190
- modelValue: e(U),
1191
- "onUpdate:modelValue": o[12] || (o[12] = (S) => ue(U) ? U.value = S : null),
1209
+ modelValue: e(k),
1210
+ "onUpdate:modelValue": o[13] || (o[13] = (S) => ue(k) ? k.value = S : null),
1192
1211
  selection: "multiple",
1193
1212
  "column-filter": e(l),
1194
1213
  "column-defs": y,
1195
1214
  "row-data": e(g),
1196
1215
  "hide-footer": e(g).length <= 10
1197
1216
  }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
1198
- r(ae, {
1199
- text: e(K)(e(n), "titles"),
1200
- state: e(q)(e(n), "titles")
1217
+ r(ne, {
1218
+ text: e(H)(e(n), "titles"),
1219
+ state: e(L)(e(n), "titles")
1201
1220
  }, null, 8, ["text", "state"])
1202
1221
  ]),
1203
1222
  qt,
1204
1223
  v("div", Kt, [
1205
1224
  r(_e, {
1206
- "model-value": e(a).internal ?? !1,
1207
- "onUpdate:modelValue": o[13] || (o[13] = (S) => e(a).internal = S),
1225
+ "model-value": e(t).internal ?? !1,
1226
+ "onUpdate:modelValue": o[14] || (o[14] = (S) => e(t).internal = S),
1208
1227
  "label-placement": "right",
1209
1228
  label: "Internal Bundle",
1210
1229
  sublabel: "Internal bundle will be hidden in FeedMe member app"
1211
1230
  }, null, 8, ["model-value"]),
1212
1231
  r(_e, {
1213
- "model-value": e(a).hideInPos ?? !1,
1214
- "onUpdate:modelValue": o[14] || (o[14] = (S) => e(a).hideInPos = S),
1232
+ "model-value": e(t).hideInPos ?? !1,
1233
+ "onUpdate:modelValue": o[15] || (o[15] = (S) => e(t).hideInPos = S),
1215
1234
  "label-placement": "right",
1216
1235
  label: "Hide In POS",
1217
1236
  sublabel: "Bundle will be hidden in FeedMe POS"
1218
1237
  }, null, 8, ["model-value"]),
1219
- r(w, {
1220
- "model-value": ((we = (Fe = e(a).config) == null ? void 0 : Fe.options) == null ? void 0 : we.maxPerUser) || null,
1221
- "onUpdate:modelValue": o[15] || (o[15] = (S) => e(ie).set(e(a), "config.options.maxPerUser", S)),
1238
+ r(F, {
1239
+ "model-value": ((we = (Fe = e(t).config) == null ? void 0 : Fe.options) == null ? void 0 : we.maxPerUser) || null,
1240
+ "onUpdate:modelValue": o[16] || (o[16] = (S) => e(de).set(e(t), "config.options.maxPerUser", S)),
1222
1241
  label: "Max purchase per user",
1223
1242
  "show-steppers": !1,
1224
1243
  placeholder: "Unlimited"
@@ -1231,7 +1250,7 @@ const Dt = /* @__PURE__ */ G({
1231
1250
  }, 8, ["modelValue", "header"]);
1232
1251
  };
1233
1252
  }
1234
- }), Yt = { class: "px-24 flex flex-col gap-y-16" }, zt = { class: "flex gap-8 items-center" }, Gt = { class: "fm-typo-en-body-lg-600" }, Zt = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, Qt = /* @__PURE__ */ v("img", {
1253
+ }), Jt = { class: "px-24 flex flex-col gap-y-16" }, Yt = { class: "flex gap-8 items-center" }, Gt = { class: "fm-typo-en-body-lg-600" }, Zt = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, Qt = /* @__PURE__ */ v("img", {
1235
1254
  src: Be,
1236
1255
  class: "aspect-square w-[150px]"
1237
1256
  }, null, -1), Xt = /* @__PURE__ */ v("div", { class: "flex flex-col gap-16 text-center" }, [
@@ -1247,21 +1266,21 @@ const Dt = /* @__PURE__ */ G({
1247
1266
  }, u = {
1248
1267
  label: "Manage reward",
1249
1268
  value: "create_reward"
1250
- }, F = {
1269
+ }, w = {
1251
1270
  label: "Add category",
1252
1271
  value: "create_category",
1253
1272
  isPrimary: !0,
1254
1273
  prependIcon: "add"
1255
- }, _ = et(), t = Ue(), { global: p, minor: m } = Me, a = Pe(), d = R(() => t.sortedStoreCategories), i = A(), n = A();
1274
+ }, _ = et(), a = Ue(), { global: p, minor: m } = Ee, t = Te(), d = D(() => a.sortedStoreCategories), i = A(), n = A();
1256
1275
  async function y(C) {
1257
1276
  var $;
1258
- C === "setting" ? ($ = i.value) == null || $.showSheet(!0, t.storeOption) : C === "create_category" ? g(-1) : C === "create_reward" && await _.push({ name: He["$connect-STORE_REWARDS"] });
1277
+ C === "setting" ? ($ = i.value) == null || $.showSheet(!0, a.storeOption) : C === "create_category" ? g(-1) : C === "create_reward" && await _.push({ name: He["$connect-STORE_REWARDS"] });
1259
1278
  }
1260
1279
  async function l(C) {
1261
1280
  await m(
1262
1281
  async () => {
1263
1282
  var $;
1264
- await ye.updateStore(C), await t.readMemberStore(), ($ = i.value) == null || $.showSheet(!1);
1283
+ await ye.updateStore(C), await a.readMemberStore(), ($ = i.value) == null || $.showSheet(!1);
1265
1284
  },
1266
1285
  {
1267
1286
  message: "Updating store setting",
@@ -1270,44 +1289,44 @@ const Dt = /* @__PURE__ */ G({
1270
1289
  );
1271
1290
  }
1272
1291
  async function g(C = -1) {
1273
- var $, U;
1274
- if ((!t.storeOption || !t.storeOption.company) && await ce.confirm(
1292
+ var $, k;
1293
+ if ((!a.storeOption || !a.storeOption.company) && await ce.confirm(
1275
1294
  "Please set up your store setting first before adding category.",
1276
1295
  "Update store setting",
1277
1296
  "Update now"
1278
1297
  ))
1279
1298
  return ($ = i.value) == null ? void 0 : $.showSheet(!0);
1280
- a.open({
1299
+ t.open({
1281
1300
  title: C == -1 ? "Add category" : "Edit category",
1282
1301
  contentComponent: ft,
1283
1302
  contentComponentProps: {
1284
- initialValue: ((U = d.value[C]) == null ? void 0 : U.name) ?? "",
1303
+ initialValue: ((k = d.value[C]) == null ? void 0 : k.name) ?? "",
1285
1304
  action: C == -1 ? "add" : "edit"
1286
1305
  }
1287
- }).onPrimary(async (I) => {
1288
- I === null && !await ce.remove(
1306
+ }).onPrimary(async (R) => {
1307
+ R === null && !await ce.remove(
1289
1308
  "Are you sure you want to remove category?",
1290
1309
  "Remove category"
1291
1310
  ) || await m(
1292
1311
  async () => {
1293
- const M = C == -1 ? [...d.value, { name: I, bundles: [] }] : [...d.value].map((c, N) => N == C ? { ...c, name: I } : c).filter((c) => c.name !== null);
1312
+ const E = C == -1 ? [...d.value, { name: R, bundles: [] }] : [...d.value].map((c, N) => N == C ? { ...c, name: R } : c).filter((c) => c.name !== null);
1294
1313
  await ye.updateStoreBundle({
1295
- categories: M
1296
- }), await t.readMemberStore();
1314
+ categories: E
1315
+ }), await a.readMemberStore();
1297
1316
  },
1298
1317
  {
1299
- message: I === null ? "Deleting category" : C == -1 ? "Creating category" : "Updating categories",
1300
- successMessage: `Category ${I === null ? "deleted" : C == -1 ? "created" : "updated"} successfully`
1318
+ message: R === null ? "Deleting category" : C == -1 ? "Creating category" : "Updating categories",
1319
+ successMessage: `Category ${R === null ? "deleted" : C == -1 ? "created" : "updated"} successfully`
1301
1320
  }
1302
1321
  );
1303
1322
  });
1304
1323
  }
1305
- async function k(C, $, U) {
1324
+ async function I(C, $, k) {
1306
1325
  var c, N;
1307
- $ ?? ($ = (c = n.value) == null ? void 0 : c.target.category), U ?? (U = (N = n.value) == null ? void 0 : N.target.index);
1308
- const I = $e(d.value), M = I[$];
1309
- if (!M) {
1310
- Oe.error("Unexpected error", 2e3);
1326
+ $ ?? ($ = (c = n.value) == null ? void 0 : c.target.category), k ?? (k = (N = n.value) == null ? void 0 : N.target.index);
1327
+ const R = Pe(d.value), E = R[$];
1328
+ if (!E) {
1329
+ Me.error("Unexpected error", 2e3);
1311
1330
  return;
1312
1331
  }
1313
1332
  if (C == null) {
@@ -1316,26 +1335,26 @@ const Dt = /* @__PURE__ */ G({
1316
1335
  "Delete bundle"
1317
1336
  ) == !1)
1318
1337
  return;
1319
- M.bundles.splice(U, 1);
1338
+ E.bundles.splice(k, 1);
1320
1339
  } else
1321
- U == -1 ? M.bundles.push(C) : M.bundles[U] = C;
1340
+ k == -1 ? E.bundles.push(C) : E.bundles[k] = C;
1322
1341
  await m(
1323
1342
  async () => {
1324
- var O, X;
1343
+ var M, X;
1325
1344
  if (C != null) {
1326
- const Z = (O = n.value) == null ? void 0 : O.bundleImage;
1345
+ const Z = (M = n.value) == null ? void 0 : M.bundleImage;
1327
1346
  Z === null && C.image ? (await pe.delete(C.image), C.image = null) : Z && (C.image = await pe.update(
1328
1347
  pe.bundleImagePath(void 0, Z),
1329
1348
  Z
1330
1349
  ));
1331
1350
  }
1332
1351
  await ye.updateStoreBundle({
1333
- categories: I
1334
- }), await t.readMemberStore(), await t.readMembership(), await t.readRewards(), (X = n.value) == null || X.showSheet(!1);
1352
+ categories: R
1353
+ }), await a.readMemberStore(), await a.readMembership(), await a.readRewards(), (X = n.value) == null || X.showSheet(!1);
1335
1354
  },
1336
1355
  {
1337
- message: `${C == null ? "Deleting" : U == -1 ? "Creating" : "Updating"} bundle`,
1338
- successMessage: `Bundle ${C == null ? "deleted" : U == -1 ? "created" : "updated"} successfully`
1356
+ message: `${C == null ? "Deleting" : k == -1 ? "Creating" : "Updating"} bundle`,
1357
+ successMessage: `Bundle ${C == null ? "deleted" : k == -1 ? "created" : "updated"} successfully`
1339
1358
  }
1340
1359
  );
1341
1360
  }
@@ -1343,63 +1362,63 @@ const Dt = /* @__PURE__ */ G({
1343
1362
  var $;
1344
1363
  ($ = n.value) == null || $.showSheet(!0, {
1345
1364
  ...C,
1346
- bundle: C.bundle ? $e(C.bundle) : void 0
1365
+ bundle: C.bundle ? Pe(C.bundle) : void 0
1347
1366
  });
1348
1367
  }
1349
1368
  return me(async () => {
1350
1369
  await p(async () => {
1351
- await t.readMemberStore(), await t.readMembership(), await t.readRewards();
1370
+ await a.readMemberStore(), await a.readMembership(), await a.readRewards();
1352
1371
  });
1353
1372
  }), (C, $) => {
1354
- const U = V("FmPageHead"), I = V("FmButton"), M = V("FmCard");
1355
- return h(), P(J, null, [
1356
- r(U, {
1373
+ const k = V("FmPageHead"), R = V("FmButton"), E = V("FmCard");
1374
+ return h(), U(z, null, [
1375
+ r(k, {
1357
1376
  title: "Store",
1358
- actions: [b, u, F],
1377
+ actions: [b, u, w],
1359
1378
  "onClick:action": y
1360
1379
  }, null, 8, ["actions"]),
1361
- v("div", Yt, [
1362
- e(d) && e(d).length > 0 ? (h(), P(J, { key: 0 }, [
1363
- (h(!0), P(J, null, te(e(d), (c, N) => (h(), P("div", {
1380
+ v("div", Jt, [
1381
+ e(d) && e(d).length > 0 ? (h(), U(z, { key: 0 }, [
1382
+ (h(!0), U(z, null, oe(e(d), (c, N) => (h(), U("div", {
1364
1383
  key: c.name,
1365
1384
  class: "space-y-8 py-12"
1366
1385
  }, [
1367
- v("div", zt, [
1368
- v("div", Gt, de(c.name), 1),
1386
+ v("div", Yt, [
1387
+ v("div", Gt, ae(c.name), 1),
1369
1388
  r(he, { json: c }, null, 8, ["json"]),
1370
- r(I, {
1389
+ r(R, {
1371
1390
  icon: "edit",
1372
1391
  size: "md",
1373
1392
  variant: "tertiary",
1374
- onClick: (O) => g(N)
1393
+ onClick: (M) => g(N)
1375
1394
  }, null, 8, ["onClick"])
1376
1395
  ]),
1377
1396
  v("div", Zt, [
1378
- (h(!0), P(J, null, te(c.bundles, (O, X) => (h(), E(ut, {
1379
- bundle: O,
1380
- key: O._id,
1381
- onEdit: (Z) => B({ bundle: O, category: N, index: X }),
1382
- onDelete: (Z) => k(null, N, X)
1397
+ (h(!0), U(z, null, oe(c.bundles, (M, X) => (h(), O(ut, {
1398
+ bundle: M,
1399
+ key: M._id,
1400
+ onEdit: (Z) => B({ bundle: M, category: N, index: X }),
1401
+ onDelete: (Z) => I(null, N, X)
1383
1402
  }, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
1384
1403
  r(mt, {
1385
- onCreate: (O) => B({ category: N, index: -1 })
1404
+ onCreate: (M) => B({ category: N, index: -1 })
1386
1405
  }, null, 8, ["onCreate"])
1387
1406
  ])
1388
1407
  ]))), 128)),
1389
- r(Jt, {
1408
+ r(zt, {
1390
1409
  ref_key: "bundleSheetRef",
1391
1410
  ref: n,
1392
- onUpdate: k
1411
+ onUpdate: I
1393
1412
  }, null, 512)
1394
- ], 64)) : (h(), E(M, {
1413
+ ], 64)) : (h(), O(E, {
1395
1414
  key: 1,
1396
1415
  variant: "outlined",
1397
1416
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1398
1417
  }, {
1399
- default: T(() => [
1418
+ default: P(() => [
1400
1419
  Qt,
1401
1420
  Xt,
1402
- r(I, {
1421
+ r(R, {
1403
1422
  variant: "primary",
1404
1423
  label: "Add category",
1405
1424
  icon: "add",