@feedmepos/mf-connect 0.1.38-beta.74 → 0.1.38-beta.75

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 (140) hide show
  1. package/dist/Analytic-9B27Q-I3.js +761 -0
  2. package/dist/App-isiE4pjM.js +4642 -0
  3. package/dist/AuditLogs-BmHr7pNI.js +1991 -0
  4. package/dist/Bin-BR06pDbx.js +166 -0
  5. package/dist/Broadcast-D_t80J2I.js +267 -0
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C5IuPCTB.js +121 -0
  7. package/dist/Card-Zs-1lcSr.js +910 -0
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  9. package/dist/Collections-BjeTJSHo.js +541 -0
  10. package/dist/Credit-DdmdsxOF.js +261 -0
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  12. package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
  13. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  14. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DkOfrONH.js +3120 -0
  15. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-kzk3iEKA.js +351 -0
  16. package/dist/Experience-WxtE9ZIT.js +260 -0
  17. package/dist/FileSaver.min-Vgxo4jNi.js +74 -0
  18. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  19. package/dist/Game-Cc0mZ3y4.js +331 -0
  20. package/dist/GenerateMaterial-Dsvnpz4o.js +589 -0
  21. package/dist/Grab-CcaXToD-.js +301 -0
  22. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D0yJMgs9.js +145 -0
  23. package/dist/Index-C0TcFJJY.js +259 -0
  24. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  25. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-CXFtSS9_.js +48 -0
  26. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-Ca7hKpcD.js +18737 -0
  27. package/dist/MainLayout-DPpjvWwq.js +41 -0
  28. package/dist/Marketing-DfXuNM7X.js +145 -0
  29. package/dist/MarketingMaterialEdit-C63qyQSd.js +746 -0
  30. package/dist/Member-LTYVn-80.js +280 -0
  31. package/dist/MemberList-Gqr6ha5p.js +1601 -0
  32. package/dist/MemberOverview-wL_ailso.js +58 -0
  33. package/dist/MemberTransactions-CVZ-SPhm.js +45 -0
  34. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BGooFTgg.js +60799 -0
  35. package/dist/Mission-CLQdNsOe.js +335 -0
  36. package/dist/Overview-BluyLBRI.js +1078 -0
  37. package/dist/Point-DQLQxJG1.js +263 -0
  38. package/dist/Promotion-BG0xL1ed.js +397 -0
  39. package/dist/Queue-BR7TrLI8.js +259 -0
  40. package/dist/Record-2WFpDhAb.js +341 -0
  41. package/dist/Review-Bu9SGftr.js +617 -0
  42. package/dist/ReviewFacebookCallback-CV99Udei.js +243 -0
  43. package/dist/ReviewGoogleCallback-DiqgQzOt.js +213 -0
  44. package/dist/Reward-CPhM3ChT.js +442 -0
  45. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-Q9pVq11w.js +149 -0
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BRUQtqjv.js +1912 -0
  47. package/dist/Segment-D6V8FKUY.js +881 -0
  48. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BrE1gGHP.js +181 -0
  49. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DQhO9k7V.js +188 -0
  50. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyHx6m95.js +147 -0
  51. package/dist/Setting-Bh5bB75w.js +2000 -0
  52. package/dist/SettingAdvertisements-CFUjq6s1.js +264 -0
  53. package/dist/Store-DiVaUn7w.js +1996 -0
  54. package/dist/StoreRewards-Bb9iW3Yz.js +535 -0
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DVFsPzLK.js +1129 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D9uZR0si.js +7005 -0
  57. package/dist/Tier-BYxLjqAB.js +970 -0
  58. package/dist/Title-D3cdNE2O.js +568 -0
  59. package/dist/Transaction-D7ItbBra.js +39 -0
  60. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-UXSlpEM0.js +130 -0
  61. package/dist/Voucher-DNQz_ujN.js +422 -0
  62. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CztGuaCV.js +421 -0
  63. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-RI0mY3Nx.js +56 -0
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  65. package/dist/app-wDQR6dpb.js +39 -0
  66. package/dist/app-zPef9Uzl.js +59396 -0
  67. package/dist/app.js +7 -0
  68. package/dist/business-DKEB57Mf.js +82 -0
  69. package/dist/campaign-BD_s6pW4.js +100 -0
  70. package/dist/campaign-CpzFl8Vr.js +4 -0
  71. package/dist/campaign-D9IfNIPI.js +253 -0
  72. package/dist/campaign.enum-gPz5hWSW.js +26 -0
  73. package/dist/campaign.fn-Csxad3W7.js +776 -0
  74. package/dist/collectible.enum-CA-QbTP-.js +19 -0
  75. package/dist/collection.fn-tFxG0UiA.js +26 -0
  76. package/dist/dto-CdvywxS_.js +222 -0
  77. package/dist/duplicateCampaign-Cj68m0Ti.js +51 -0
  78. package/dist/effect-KecOJIEK.js +89 -0
  79. package/dist/email-addresses-Ske7sY-s.js +705 -0
  80. package/dist/export-17vDh5vq.js +97 -0
  81. package/dist/feedme.ico +0 -0
  82. package/dist/helper-B-ZDFjy7.js +86 -0
  83. package/dist/index-BRZC-Cy5.js +85 -0
  84. package/dist/index-BV_G-XzK.js +30289 -0
  85. package/dist/index-BwLCkOIF.js +36 -0
  86. package/dist/index-C1Z4oibL.js +48 -0
  87. package/dist/index-CNLqZu6_.js +2639 -0
  88. package/dist/index-CdByBgmF.js +32 -0
  89. package/dist/index-CkqQGjg1.js +8912 -0
  90. package/dist/index-CuvNtC_M.js +61 -0
  91. package/dist/index-D05Pcg0E.js +124 -0
  92. package/dist/index-D58_aTiN.js +28897 -0
  93. package/dist/index-DCzjjZgV.js +67 -0
  94. package/dist/index-DY3_9zbY.js +3431 -0
  95. package/dist/index-Dc2JsMD2.js +54 -0
  96. package/dist/index-Dh78uGTl.js +146 -0
  97. package/dist/index-DnrSd_o_.js +3 -0
  98. package/dist/index-vh86FiIQ.js +10 -0
  99. package/dist/index-woXH3LmA.js +31 -0
  100. package/dist/index.esm2017-DxQe1gCt.js +3069 -0
  101. package/dist/loading-B1ymwDT_.js +71 -0
  102. package/dist/lodash-BiGSPE0G.js +3678 -0
  103. package/dist/membership-GnNCDGBk.js +235 -0
  104. package/dist/moment-D7p2TMB-.js +2583 -0
  105. package/dist/money-CG6LGklW.js +15 -0
  106. package/dist/number-p19we-YD.js +12 -0
  107. package/dist/object-qECH92oz.js +26 -0
  108. package/dist/objectId-dwaoBfJX.js +7 -0
  109. package/dist/objectid-XhaZoPQl.js +145 -0
  110. package/dist/plugins-cxSxZO0d.js +1817 -0
  111. package/dist/remy-D_Deb3ue.js +13 -0
  112. package/dist/reward-siULTu5h.js +36 -0
  113. package/dist/rule-GD9oMCPH.js +1969 -0
  114. package/dist/rule-builder-DWFem4d5.js +102 -0
  115. package/dist/style.css +13 -0
  116. package/dist/template-o23nw6e2.js +188 -0
  117. package/dist/tier-BJDhpH6X.js +4 -0
  118. package/dist/tiers/tier=1.png +0 -0
  119. package/dist/tiers/tier=2.png +0 -0
  120. package/dist/tiers/tier=3.png +0 -0
  121. package/dist/tiers/tier=4.png +0 -0
  122. package/dist/timezone-BVwygiRH.js +1154 -0
  123. package/dist/titles/type=diamond.png +0 -0
  124. package/dist/titles/type=drinks.png +0 -0
  125. package/dist/titles/type=food.png +0 -0
  126. package/dist/titles/type=heart.png +0 -0
  127. package/dist/titles/type=medal.png +0 -0
  128. package/dist/titles/type=spend.png +0 -0
  129. package/dist/titles/type=thank-you.png +0 -0
  130. package/dist/titles/type=thumbs-up.png +0 -0
  131. package/dist/titles/type=years.png +0 -0
  132. package/dist/trigger-CrEBP1aZ.js +213 -0
  133. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  134. package/dist/type_drinks-D6jnpvwV.js +4 -0
  135. package/dist/usePagination-BbTCnhtY.js +266 -0
  136. package/dist/user-DcMEufQ6.js +55 -0
  137. package/dist/vue-i18n-BxV_u4BZ.js +2365 -0
  138. package/dist/xlsx-BnJDxONa.js +15491 -0
  139. package/dist/zod-CUN5LrI6.js +91 -0
  140. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import { z as e } from "./index-BV_G-XzK.js";
2
+ const E = e.enum([
3
+ "VOUCHER",
4
+ "CREDIT",
5
+ "POINT",
6
+ "COIN",
7
+ "TIER",
8
+ "TITLE",
9
+ "COIN",
10
+ "GAME",
11
+ "STAMP",
12
+ "REFERRAL"
13
+ ]);
14
+ E.enum.VOUCHER + "", E.enum.CREDIT + "", E.enum.POINT + "", E.enum.COIN + "", E.enum.TIER + "", E.enum.TITLE + "", E.enum.GAME + "", E.enum.STAMP + "", E.enum.REFERRAL + "";
15
+ const R = e.enum(["FORTUNE_WHEEL", "ROCK_PAPER_SCISSORS"]);
16
+ export {
17
+ E as F,
18
+ R as a
19
+ };
@@ -0,0 +1,26 @@
1
+ import "./index-CkqQGjg1.js";
2
+ import "./index-BV_G-XzK.js";
3
+ function r(e) {
4
+ switch (e) {
5
+ case "PROMOTION":
6
+ return "Promotion";
7
+ case "VOUCHER":
8
+ return "Voucher";
9
+ case "CREDIT":
10
+ return "Credit";
11
+ case "POINT":
12
+ return "Experience";
13
+ case "COIN":
14
+ return "Point";
15
+ case "GAME":
16
+ return "Game";
17
+ default:
18
+ return e;
19
+ }
20
+ }
21
+ const o = {
22
+ formattedType: r
23
+ };
24
+ export {
25
+ o as C
26
+ };
@@ -0,0 +1,222 @@
1
+ import { F as o, z as a } from "./index-BV_G-XzK.js";
2
+ import { s as R, a as r, t as h } from "./index-DY3_9zbY.js";
3
+ import { F as u } from "./index-CkqQGjg1.js";
4
+ import { i as f, R as d } from "./rule-builder-DWFem4d5.js";
5
+ function A(n, e) {
6
+ var p, l;
7
+ if (console.log(n, e), !n) return;
8
+ const t = n.campaign;
9
+ if (!t) return;
10
+ const i = t.event.rule;
11
+ if (!i || !f(i)) {
12
+ e.addIssue({
13
+ code: "custom",
14
+ path: ["campaign", "event", "rule"],
15
+ params: {
16
+ i18n: "connectZodCustom:campaign.rule_required",
17
+ type: t.event.type
18
+ }
19
+ });
20
+ return;
21
+ }
22
+ switch (t.type) {
23
+ case "MISSION": {
24
+ t.earningOption.amount > t.mission.end && e.addIssue({
25
+ code: "custom",
26
+ path: ["campaign", "earningOption"],
27
+ params: {
28
+ i18n: "connectZodCustom:campaign.earning_amount_exceed",
29
+ max: t.mission.end
30
+ }
31
+ });
32
+ break;
33
+ }
34
+ case "CREDIT": {
35
+ const c = (p = t.config) == null ? void 0 : p.validityOption;
36
+ (!c || ["validForDay", "validBefore"].every((g) => c[g] == null)) && e.addIssue({
37
+ code: "custom",
38
+ path: ["campaign", "config", "validityOption"],
39
+ params: {
40
+ i18n: "connectZodCustom:campaign.credit_validity_required"
41
+ }
42
+ });
43
+ }
44
+ }
45
+ switch (t.event.type) {
46
+ case "BILL_COMPLETED":
47
+ t.type === "MISSION" && t.rewards.length && (t.rewards.forEach((c, m) => {
48
+ (c.threshold < 0 || c.threshold > t.mission.end) && e.addIssue({
49
+ code: "custom",
50
+ path: ["campaign", "rewards", m, "threshold"],
51
+ params: {
52
+ i18n: "connectZodCustom:campaign.reward_threshold_range"
53
+ }
54
+ });
55
+ }), (l = t.config) != null && l.validityOption.followFirstReceive || e.addIssue({
56
+ code: "custom",
57
+ path: ["campaign", "config", "validityOption"],
58
+ params: {
59
+ i18n: "connectZodCustom:campaign.mission_first_receive"
60
+ }
61
+ }));
62
+ break;
63
+ case "SCHEDULE": {
64
+ if (!i.rules.g_schedule) {
65
+ e.addIssue({
66
+ code: "custom",
67
+ path: ["campaign", "event", "rule"],
68
+ params: {
69
+ i18n: "connectZodCustom:campaign.schedule_period_required"
70
+ },
71
+ fatal: !0
72
+ });
73
+ return;
74
+ }
75
+ const c = d.getRules(
76
+ i.rules.g_schedule
77
+ ), m = [
78
+ {
79
+ property: "trigger.date",
80
+ operator: ["_isOnDate", "_rrule"]
81
+ },
82
+ {
83
+ property: "trigger.time",
84
+ operator: ["_isOnTime"]
85
+ }
86
+ ];
87
+ m.length == c.length && m.every((O) => c.some((C) => {
88
+ const I = d.simplify(C);
89
+ return I.property === O.property && O.operator.includes(I.operator);
90
+ })) || e.addIssue({
91
+ code: "custom",
92
+ path: ["campaign", "event", "rule"],
93
+ params: {
94
+ i18n: "connectZodCustom:campaign.active_period_invalid"
95
+ }
96
+ });
97
+ break;
98
+ }
99
+ default: {
100
+ "earningOption" in t && t.earningOption.type != "FIXED" && e.addIssue({
101
+ code: "custom",
102
+ path: ["campaign", "earningOption"],
103
+ params: {
104
+ i18n: "connectZodCustom:campaign.fixed_earning_required"
105
+ }
106
+ });
107
+ break;
108
+ }
109
+ }
110
+ }
111
+ function N(n) {
112
+ var t;
113
+ if (n.campaign.type === "VOUCHER" && "configs" in n) {
114
+ const i = n.configs;
115
+ i.extras.targetLocation = n.campaign.targetLocation;
116
+ const p = Math.max(
117
+ n.campaign.earningOption.amount,
118
+ i.options.maxUse ?? 1
119
+ );
120
+ n.campaign.earningOption.amount = p, i.options.maxUse = p, n.campaign.earningOption = {
121
+ type: "FIXED",
122
+ amount: 1
123
+ };
124
+ }
125
+ if (n.campaign.type == "MISSION" && "configs" in n) {
126
+ const i = n.configs;
127
+ i.options.validityOption = (t = n.campaign.config) == null ? void 0 : t.validityOption;
128
+ }
129
+ const e = n.campaign.event;
130
+ return e.type != "BILL_COMPLETED" && e.rule && f(e.rule) && (e.rule = d.removeEntry(e.rule, "g_bill"), n.campaign.event = e), n;
131
+ }
132
+ function s(n) {
133
+ const e = h.optionsMap.get(n).extend({
134
+ _id: o.optional(),
135
+ collectible: a.string().nullish()
136
+ });
137
+ switch (n) {
138
+ case "VOUCHER":
139
+ return a.object({
140
+ campaign: e,
141
+ templateId: o,
142
+ configs: u,
143
+ updateCollections: a.boolean().optional(),
144
+ code: a.string().optional()
145
+ });
146
+ case "PROMOTION":
147
+ return a.object({
148
+ campaign: e,
149
+ templateId: o
150
+ });
151
+ case "POINT":
152
+ return a.object({
153
+ campaign: e,
154
+ templateId: o
155
+ });
156
+ case "CREDIT":
157
+ return a.object({
158
+ campaign: e,
159
+ templateId: o
160
+ });
161
+ case "BROADCAST":
162
+ return a.object({
163
+ campaign: e,
164
+ templateId: o
165
+ });
166
+ case "COIN":
167
+ return a.object({
168
+ campaign: e,
169
+ templateId: o
170
+ });
171
+ case "REWARD_POOL":
172
+ return a.object({
173
+ campaign: e,
174
+ templateId: o,
175
+ updateCollections: a.boolean().optional()
176
+ });
177
+ case "GAME":
178
+ return a.object({
179
+ campaign: e,
180
+ configs: u,
181
+ templateId: o,
182
+ updateCollections: a.boolean().optional()
183
+ });
184
+ case "MISSION":
185
+ return a.object({
186
+ campaign: e,
187
+ configs: u,
188
+ templateId: o,
189
+ updateCollections: a.boolean().optional()
190
+ });
191
+ case "GRAB":
192
+ return a.object({
193
+ campaign: e,
194
+ templateId: o
195
+ });
196
+ default:
197
+ throw new Error("Not implemented");
198
+ }
199
+ }
200
+ const D = R.extend({
201
+ _id: o.optional(),
202
+ name: a.string().min(1).max(300),
203
+ business: o.optional(),
204
+ campaigns: a.array(o).optional()
205
+ }), T = {
206
+ [r.enum.VOUCHER]: s("VOUCHER"),
207
+ [r.enum.PROMOTION]: s("PROMOTION"),
208
+ [r.enum.POINT]: s("POINT"),
209
+ [r.enum.CREDIT]: s("CREDIT"),
210
+ [r.enum.BROADCAST]: s("BROADCAST"),
211
+ [r.enum.COIN]: s("COIN"),
212
+ [r.enum.REWARD_POOL]: s("REWARD_POOL"),
213
+ [r.enum.GAME]: s("GAME"),
214
+ [r.enum.MISSION]: s("MISSION"),
215
+ [r.enum.GRAB]: s("GRAB")
216
+ };
217
+ export {
218
+ T as C,
219
+ D as F,
220
+ N as a,
221
+ A as c
222
+ };
@@ -0,0 +1,51 @@
1
+ import { p as l, i } from "./plugins-cxSxZO0d.js";
2
+ import { _ as r } from "./lodash-BiGSPE0G.js";
3
+ function A(e) {
4
+ return l.confirm(
5
+ i.global.t("connect.common.duplicate.confirmMessage", { name: e }),
6
+ i.global.t("connect.common.duplicate.title"),
7
+ i.global.t("connect.common.duplicate.proceed")
8
+ );
9
+ }
10
+ const f = ["LOYALTY", "NO_REWARD"], s = {
11
+ GAME: [(e) => {
12
+ var o;
13
+ return (o = e == null ? void 0 : e.game) == null ? void 0 : o.rewards;
14
+ }],
15
+ MISSION: [
16
+ (e) => e == null ? void 0 : e.rewards,
17
+ (e) => {
18
+ var o;
19
+ return (o = e == null ? void 0 : e.mission) == null ? void 0 : o.rewards;
20
+ }
21
+ ],
22
+ REWARD_POOL: [(e) => e == null ? void 0 : e.rewards]
23
+ };
24
+ function u(e, o) {
25
+ e && e.forEach((t) => {
26
+ o.includes(t.type ?? "") || (t.collectible = null, t.type === "VOUCHER" && t.collectibleConfig && (t.collectibleConfig._id = void 0));
27
+ });
28
+ }
29
+ function d(e) {
30
+ e._id = void 0;
31
+ }
32
+ function R(e, o) {
33
+ e.campaign && (e.campaign._id = void 0, e.campaign.currentReceive = void 0, o || (e.campaign.collectible = void 0));
34
+ }
35
+ function C(e, o) {
36
+ e.configs && (e.configs.currentReceive = void 0, o || (e.configs._id = void 0));
37
+ }
38
+ function E(e) {
39
+ const o = s[(e == null ? void 0 : e.type) ?? ""];
40
+ o && o.forEach((t) => {
41
+ u(t(e), f);
42
+ });
43
+ }
44
+ function v(e, o = {}) {
45
+ const t = r.cloneDeep(e), { keepCollectible: c = !1 } = o, n = t.campaign;
46
+ return d(t), R(t, c), C(t, c), E(n), t;
47
+ }
48
+ export {
49
+ A as c,
50
+ v as p
51
+ };
@@ -0,0 +1,89 @@
1
+ import { c as r } from "./index-D58_aTiN.js";
2
+ function p(n) {
3
+ if (!n)
4
+ return null;
5
+ const o = r.Config.getCountry().currency.symbol;
6
+ function s(t) {
7
+ if (t.options.target === "ITEM" && t.options.strategy.type === "PRICE_CHANGE")
8
+ return null;
9
+ const e = r.Dinero.fromFdoDecimal({ decimal: t.adjustment.amount });
10
+ switch (t.adjustment.type) {
11
+ case "BY_PERCENTAGE":
12
+ return `${e.toObject().amount}% discount`;
13
+ case "BY_AMOUNT":
14
+ return `${o}${e.toUnit()} discount`;
15
+ case "TO_AMOUNT":
16
+ return `to ${o}${e.toUnit()}`;
17
+ }
18
+ }
19
+ function u(t) {
20
+ switch (t.options.target) {
21
+ case "BILL":
22
+ return "Bill Discount";
23
+ case "ITEM":
24
+ if (t.options.strategy.type === "PRICE_CHANGE") {
25
+ const e = t.options.strategy.key;
26
+ return e ? `Use ${e} price` : "Use different price";
27
+ } else {
28
+ if (t.options.strategy.type === "SIMPLE")
29
+ return "Item Discount";
30
+ if (t.options.strategy.type === "BUY_X_GET_Y")
31
+ return "Buy X Get Y (same product set)";
32
+ if (t.options.strategy.type === "BUY_X_GET_Y_V2")
33
+ return "Buy X Get Y (mixed product set)";
34
+ if (t.options.strategy.type === "BUY_X_ITEM_A_GET_Y_ITEM_B")
35
+ return "Buy X Get Y (different product set)";
36
+ if (t.options.strategy.type === "COMBO")
37
+ return "Combo";
38
+ }
39
+ break;
40
+ case "PAYMENT":
41
+ return "Payment";
42
+ default:
43
+ throw new Error("Invalid effect target");
44
+ }
45
+ }
46
+ function a(t) {
47
+ return t.options.target === "ITEM" && t.options.strategy.type === "PRICE_CHANGE" ? "Requires POS 7.12.18 or above" : null;
48
+ }
49
+ function c(t) {
50
+ if (t.options.target === "BILL" || t.options.target === "PAYMENT") {
51
+ const e = r.Dinero.fromFdoDecimal({
52
+ decimal: t.options.minPurchase
53
+ });
54
+ return e.toUnit() > 0 ? `min spend ${o}${e.toUnit()}` : "no min spend";
55
+ }
56
+ if (t.options.target === "ITEM" && t.options.minPurchase) {
57
+ const e = r.Dinero.fromFdoDecimal({
58
+ decimal: t.options.minPurchase
59
+ });
60
+ return e.toUnit() > 0 ? `min spend ${o}${e.toUnit()}` : "no min spend";
61
+ }
62
+ return "no min spend";
63
+ }
64
+ function m(t) {
65
+ var e;
66
+ if (((e = t.adjustmentRule) == null ? void 0 : e.type) == "CAPPED_AT") {
67
+ const i = r.Dinero.fromFdoDecimal({
68
+ decimal: t.adjustmentRule.amount
69
+ }).toPositive();
70
+ return i.toUnit() > 0 ? `cap at ${o}${i.toUnit()}` : null;
71
+ }
72
+ return null;
73
+ }
74
+ return {
75
+ type: u(n),
76
+ adjustment: s(n),
77
+ requirements: c(n),
78
+ maxCap: m(n),
79
+ posHint: a(n)
80
+ };
81
+ }
82
+ function l(n) {
83
+ const o = p(n);
84
+ return !n || !o ? null : Object.values(o).filter(Boolean).join(" | ");
85
+ }
86
+ export {
87
+ l as e,
88
+ p as s
89
+ };