@useinsider/guido 3.1.1 → 3.2.0-beta.565bfaf

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 (82) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +66 -54
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +91 -81
  5. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +7 -7
  6. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +12 -20
  7. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  8. package/dist/components/organisms/header/EditorActions.vue2.js +51 -36
  9. package/dist/components/organisms/header/RightSlot.vue.js +10 -10
  10. package/dist/components/organisms/header/RightSlot.vue2.js +16 -13
  11. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +18 -17
  12. package/dist/composables/useHtmlCompiler.js +23 -21
  13. package/dist/composables/useHtmlValidator.js +40 -38
  14. package/dist/composables/usePreviewMode.js +20 -16
  15. package/dist/composables/useRecommendation.js +2 -2
  16. package/dist/composables/useSave.js +23 -15
  17. package/dist/composables/useStripo.js +44 -41
  18. package/dist/composables/validators/useLiquidValidator.js +42 -0
  19. package/dist/config/compiler/liquidCompilerRules.js +15 -0
  20. package/dist/config/compiler/recommendationCompilerRules.js +158 -44
  21. package/dist/config/compiler/unsubscribeCompilerRules.js +37 -37
  22. package/dist/config/compiler/utils/recommendationCompilerUtils.js +49 -46
  23. package/dist/config/i18n/en/tooltips.json.js +2 -1
  24. package/dist/config/migrator/checkboxMigrator.js +5 -3
  25. package/dist/config/migrator/radioButtonMigrator.js +14 -12
  26. package/dist/enums/displayConditions.js +82 -78
  27. package/dist/enums/extensions/recommendationBlock.js +96 -39
  28. package/dist/enums/recommendation.js +2 -2
  29. package/dist/enums/unsubscribe.js +17 -16
  30. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  31. package/dist/extensions/Blocks/CouponBlock/template.js +24 -13
  32. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  33. package/dist/extensions/Blocks/Recommendation/block.js +1 -1
  34. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +27 -11
  35. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +185 -172
  36. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +95 -93
  37. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +75 -73
  38. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +3 -3
  39. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +7 -5
  40. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -29
  41. package/dist/extensions/Blocks/Recommendation/templates/index.js +7 -7
  42. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +3 -1
  43. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +20 -20
  44. package/dist/extensions/Blocks/Recommendation/templates/utils.js +57 -50
  45. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +6 -6
  46. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +16 -17
  47. package/dist/extensions/DynamicContent/dynamic-content.js +17 -12
  48. package/dist/guido.css +1 -1
  49. package/dist/services/recommendationApi.js +15 -15
  50. package/dist/services/stripoApi.js +9 -9
  51. package/dist/services/templateLibraryApi.js +48 -46
  52. package/dist/src/@types/config/index.d.ts +1 -1
  53. package/dist/src/@types/config/schemas.d.ts +28 -0
  54. package/dist/src/@types/config/types.d.ts +3 -1
  55. package/dist/src/@types/generic.d.ts +0 -1
  56. package/dist/src/@types/save-as-template.d.ts +1 -0
  57. package/dist/src/composables/useConfig.d.ts +12 -0
  58. package/dist/src/composables/validators/useLiquidValidator.d.ts +3 -0
  59. package/dist/src/config/compiler/liquidCompilerRules.d.ts +2 -0
  60. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +1 -1
  61. package/dist/src/enums/displayConditions.d.ts +5 -1
  62. package/dist/src/enums/extensions/recommendationBlock.d.ts +8 -1
  63. package/dist/src/enums/unsubscribe.d.ts +8 -3
  64. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +2 -0
  65. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  66. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +5 -0
  67. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -0
  68. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
  69. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
  70. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +20 -3
  71. package/dist/src/services/templateLibraryApi.d.ts +1 -1
  72. package/dist/src/stores/config.d.ts +108 -0
  73. package/dist/src/stores/preview.d.ts +3 -0
  74. package/dist/src/utils/genericUtil.d.ts +1 -1
  75. package/dist/src/utils/htmlCompiler.d.ts +2 -1
  76. package/dist/static/styles/base.css.js +7 -2
  77. package/dist/stores/preview.js +4 -3
  78. package/dist/utils/genericUtil.js +42 -20
  79. package/dist/utils/htmlCompiler.js +48 -41
  80. package/dist/utils/templatePreparation.js +36 -25
  81. package/dist/utils/tooltipUtils.js +4 -5
  82. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
1
  import { ModificationDescription as p } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { RecommendationBlockId as f } from "../../constants/blockIds.js";
2
+ import { RecommendationBlockId as m } from "../../constants/blockIds.js";
3
3
  import { MOBILE_CONTAINER_SELECTOR as P, MOBILE_ROW_SELECTOR as k, CURRENCY_ATTR as y, DESKTOP_CONTAINER_SELECTOR as q, CONTAINER_SELECTOR as $ } from "../../constants/selectors.js";
4
4
  import { RecommendationConfigService as E } from "../../services/configService.js";
5
5
  import { useRecommendationExtensionStore as C } from "../../store/recommendation.js";
6
6
  import { prepareProductRows as T } from "../../templates/index.js";
7
7
  import { formatPrice as B } from "../../utils/priceFormatter.js";
8
8
  import { isTdNode as v } from "../../utils/tagName.js";
9
- import { getDefaultProducts as _, DEFAULT_CARD_COMPOSITION as R, sanitizeImageUrl as j } from "../../templates/utils.js";
9
+ import { getDefaultProducts as L, DEFAULT_CARD_COMPOSITION as R, sanitizeImageUrl as j } from "../../templates/utils.js";
10
10
  const h = "recommendation-block-v2";
11
11
  function M(t) {
12
12
  if (!t)
@@ -16,7 +16,7 @@ function M(t) {
16
16
  if (e && e.includes(h))
17
17
  return t;
18
18
  }
19
- return "querySelector" in t ? t.querySelector(`.${h}`) : null;
19
+ return "querySelector" in t ? t.querySelector(`.${h}`) ?? null : null;
20
20
  }
21
21
  function g(t) {
22
22
  const e = M(t);
@@ -25,7 +25,7 @@ function g(t) {
25
25
  const o = e.getAttribute("data-layout");
26
26
  return o === "list" || o === "horizontal" ? "list" : "grid";
27
27
  }
28
- function L(t) {
28
+ function _(t) {
29
29
  const e = M(t);
30
30
  if (!e || !("getAttribute" in e))
31
31
  return R;
@@ -36,12 +36,12 @@ function b(t, e, o) {
36
36
  if (!e || !("childNodes" in e))
37
37
  return !1;
38
38
  const i = e.childNodes().find(
39
- (c) => "getType" in c && c.getType() === "text"
39
+ (l) => "getType" in l && l.getType() === "text"
40
40
  );
41
41
  return i ? (t.modifyHtml(i).setText(o), !0) : !1;
42
42
  }
43
43
  function x(t, e) {
44
- return t && t.length > 0 ? t : e.length > 0 ? e : _();
44
+ return t && t.length > 0 ? t : e.length > 0 ? e : L();
45
45
  }
46
46
  function V(t) {
47
47
  const { currentNode: e, documentModifier: o } = t;
@@ -56,7 +56,7 @@ function W(t) {
56
56
  documentModifier: o,
57
57
  products: n,
58
58
  layout: i,
59
- composition: c
59
+ composition: l
60
60
  } = t;
61
61
  if (!e || !("querySelector" in e))
62
62
  return;
@@ -68,9 +68,10 @@ function W(t) {
68
68
  const s = e.querySelector(k);
69
69
  if (!s)
70
70
  return;
71
- const l = C(), a = x(n, l.recommendationProducts), m = c ?? L(e), S = `<td><table class="ins-recommendation-product-container ins-recommendation-mobile-container" width="100%" cellpadding="0" cellspacing="0" border="0">${T(a, r, {
71
+ const c = C(), a = x(n, c.recommendationProducts), f = l ?? _(e), S = `<td><table class="ins-recommendation-product-container ins-recommendation-mobile-container" width="100%" cellpadding="0" cellspacing="0" border="0">${T(a, r, {
72
72
  productsPerRow: u.mobileCardsInRow,
73
- composition: m
73
+ composition: f,
74
+ filterList: c.filterList
74
75
  })}</table></td>`;
75
76
  o.modifyHtml(s).setInnerHtml(S), o.apply(new p("Updated mobile product rows"));
76
77
  }
@@ -80,7 +81,7 @@ function G(t) {
80
81
  documentModifier: o,
81
82
  afterRegenerate: n,
82
83
  products: i,
83
- layout: c,
84
+ layout: l,
84
85
  composition: r
85
86
  } = t;
86
87
  if (!e || !("querySelector" in e))
@@ -88,53 +89,54 @@ function G(t) {
88
89
  const u = e.querySelector(q) ?? e.querySelector($);
89
90
  if (!u)
90
91
  return;
91
- const s = C(), l = x(i, s.recommendationProducts), { cardsInRow: a } = s.recommendationConfigs, m = r ?? L(e), d = c ?? g(e), S = T(l, d, {
92
+ const s = C(), c = x(i, s.recommendationProducts), { cardsInRow: a } = s.recommendationConfigs, f = r ?? _(e), d = l ?? g(e), S = T(c, d, {
92
93
  productsPerRow: a,
93
- composition: m
94
+ composition: f,
95
+ filterList: s.filterList
94
96
  });
95
97
  o.modifyHtml(u).setInnerHtml(S).apply(new p("Updated product")), W(t), n == null || n();
96
98
  }
97
99
  function I(t, e, o, n) {
98
- const c = `0 ${Math.floor(o / 2)}px`;
100
+ const l = `0 ${Math.floor(o / 2)}px`;
99
101
  let r = !1;
100
102
  return n === "grid" ? Array.from(
101
103
  t.querySelectorAll(".attribute-cell")
102
104
  ).forEach((s) => {
103
- e.modifyHtml(s).setStyle("padding", c), r = !0;
105
+ e.modifyHtml(s).setStyle("padding", l), r = !0;
104
106
  }) : Array.from(
105
107
  t.querySelectorAll(".product-card-wrapper")
106
108
  ).forEach((s) => {
107
- const l = "parentNode" in s ? s.parentNode : null;
108
- l && v(l) && (e.modifyHtml(l).setStyle("padding", c), r = !0);
109
+ const c = "parentNode" in s ? s.parentNode : null;
110
+ c && v(c) && (e.modifyHtml(c).setStyle("padding", l), r = !0);
109
111
  }), r;
110
112
  }
111
113
  function O(t, e, o) {
112
114
  const n = `${o}px`, i = Array.from(t.querySelectorAll(".spacer"));
113
- let c = !1;
115
+ let l = !1;
114
116
  return i.forEach((r) => {
115
- e.modifyHtml(r).setStyle("height", n), c = !0;
116
- }), c;
117
+ e.modifyHtml(r).setStyle("height", n), l = !0;
118
+ }), l;
117
119
  }
118
120
  function Y(t) {
119
121
  const { currentNode: e, documentModifier: o } = t;
120
122
  if (!e)
121
123
  return;
122
124
  const n = E.getConfig(e), i = g(e);
123
- let c = !1;
125
+ let l = !1;
124
126
  const r = e.querySelector(q);
125
127
  if (r) {
126
- c = I(
128
+ l = I(
127
129
  r,
128
130
  o,
129
131
  n.columnSpacing,
130
132
  i
131
133
  );
132
- const l = O(
134
+ const c = O(
133
135
  r,
134
136
  o,
135
137
  n.rowSpacing
136
138
  );
137
- c = c || l;
139
+ l = l || c;
138
140
  }
139
141
  const u = e.querySelector(P);
140
142
  if (u) {
@@ -144,23 +146,23 @@ function Y(t) {
144
146
  n.mobileColumnSpacing,
145
147
  i
146
148
  );
147
- c = c || s;
148
- const l = O(
149
+ l = l || s;
150
+ const c = O(
149
151
  u,
150
152
  o,
151
153
  n.mobileRowSpacing
152
154
  );
153
- c = c || l;
155
+ l = l || c;
154
156
  }
155
- c && o.apply(new p("Reapply spacing after regeneration"));
157
+ l && o.apply(new p("Reapply spacing after regeneration"));
156
158
  }
157
159
  function re(t) {
158
- const { currentNode: e, documentModifier: o, afterRegenerate: n, products: i, layout: c, composition: r } = t;
160
+ const { currentNode: e, documentModifier: o, afterRegenerate: n, products: i, layout: l, composition: r } = t;
159
161
  e && G({
160
162
  currentNode: e,
161
163
  documentModifier: o,
162
164
  products: i,
163
- layout: c,
165
+ layout: l,
164
166
  composition: r,
165
167
  afterRegenerate: () => {
166
168
  setTimeout(() => {
@@ -170,7 +172,7 @@ function re(t) {
170
172
  });
171
173
  }
172
174
  function ie(t, e) {
173
- return t.length === e ? t : t.length > e ? t.slice(0, e) : [...t, ..._(e - t.length)];
175
+ return t.length === e ? t : t.length > e ? t.slice(0, e) : [...t, ...L(e - t.length)];
174
176
  }
175
177
  function D() {
176
178
  const t = C(), { currencySettings: e } = t.recommendationConfigs, o = parseInt(e.decimalCount);
@@ -191,28 +193,28 @@ function A(t, e = "price") {
191
193
  });
192
194
  }
193
195
  function F(t) {
194
- var c, r;
195
- const e = D(), o = ((c = t.original_price) == null ? void 0 : c[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, n = ((r = t.price) == null ? void 0 : r[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, i = o > 0 ? Math.round((o - n) / o * 100) : 0;
196
+ var l, r;
197
+ const e = D(), o = ((l = t.original_price) == null ? void 0 : l[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, n = ((r = t.price) == null ? void 0 : r[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, i = o > 0 ? Math.round((o - n) / o * 100) : 0;
196
198
  return i > 0 ? `-${i}%` : "0%";
197
199
  }
198
200
  function H(t) {
199
- const { documentModifier: e, product: o, priceEl: n, oldPriceEl: i, omnibusPriceEl: c, omnibusDiscountEl: r } = t;
201
+ const { documentModifier: e, product: o, priceEl: n, oldPriceEl: i, omnibusPriceEl: l, omnibusDiscountEl: r } = t;
200
202
  let u = !1;
201
203
  if (n && "querySelector" in n) {
202
- const s = n.querySelector("strong"), l = A(o, "price");
203
- b(e, s, l) && (u = !0);
204
+ const s = n.querySelector("strong") ?? null, c = A(o, "price");
205
+ b(e, s, c) && (u = !0);
204
206
  }
205
207
  if (i && "querySelector" in i) {
206
- const s = i.querySelector("strong"), l = A(o, "original_price");
207
- b(e, s, l) && (u = !0);
208
+ const s = i.querySelector("strong") ?? null, c = A(o, "original_price");
209
+ b(e, s, c) && (u = !0);
208
210
  }
209
- if (c && "querySelector" in c) {
210
- const s = c.querySelector(".omnibus-price-value"), l = A(o, "original_price");
211
- b(e, s, l) && (u = !0);
211
+ if (l && "querySelector" in l) {
212
+ const s = l.querySelector(".omnibus-price-value") ?? null, c = A(o, "original_price");
213
+ b(e, s, c) && (u = !0);
212
214
  }
213
215
  if (r && "querySelector" in r) {
214
- const s = r.querySelector(".omnibus-discount-value"), l = F(o);
215
- b(e, s, l) && (u = !0);
216
+ const s = r.querySelector(".omnibus-discount-value") ?? null, c = F(o);
217
+ b(e, s, c) && (u = !0);
216
218
  }
217
219
  return u;
218
220
  }
@@ -222,33 +224,33 @@ function K(t) {
222
224
  product: o,
223
225
  imageEl: n,
224
226
  nameEl: i,
225
- priceEl: c,
227
+ priceEl: l,
226
228
  oldPriceEl: r,
227
229
  omnibusPriceEl: u,
228
230
  omnibusDiscountEl: s,
229
- buttonEl: l
231
+ buttonEl: c
230
232
  } = t;
231
233
  let a = !1;
232
234
  if (n && "querySelector" in n) {
233
- const m = n.querySelector("img");
234
- m && (e.modifyHtml(m).setAttribute("src", j(o.image_url)).setAttribute("alt", o.name), a = !0);
235
+ const f = n.querySelector("img");
236
+ f && (e.modifyHtml(f).setAttribute("src", j(o.image_url)).setAttribute("alt", o.name), a = !0);
235
237
  const d = n.querySelector("a");
236
238
  d && (e.modifyHtml(d).setAttribute("href", o.url), a = !0);
237
239
  }
238
240
  if (i && "querySelector" in i) {
239
- const m = i.querySelector("strong");
240
- b(e, m, o.name) && (a = !0);
241
+ const f = i.querySelector("strong") ?? null;
242
+ b(e, f, o.name) && (a = !0);
241
243
  }
242
244
  if (H({
243
245
  documentModifier: e,
244
246
  product: o,
245
- priceEl: c,
247
+ priceEl: l,
246
248
  oldPriceEl: r,
247
249
  omnibusPriceEl: u,
248
250
  omnibusDiscountEl: s
249
- }) && (a = !0), l && "querySelector" in l) {
250
- const m = l.querySelector("a.es-button") || l.querySelector("a");
251
- m && (e.modifyHtml(m).setAttribute("href", o.url), a = !0);
251
+ }) && (a = !0), c && "querySelector" in c) {
252
+ const f = c.querySelector("a.es-button") || c.querySelector("a");
253
+ f && (e.modifyHtml(f).setAttribute("href", o.url), a = !0);
252
254
  }
253
255
  return a;
254
256
  }
@@ -259,53 +261,53 @@ function w(t, e, o) {
259
261
  if (!("querySelectorAll" in t))
260
262
  return !1;
261
263
  const n = t.querySelectorAll(
262
- `[esd-extension-block-id="${f.IMAGE}"]`
264
+ `[esd-extension-block-id="${m.IMAGE}"]`
263
265
  ), i = t.querySelectorAll(
264
- `[esd-extension-block-id="${f.NAME}"]`
265
- ), c = t.querySelectorAll(
266
- `[esd-extension-block-id="${f.PRICE}"]`
266
+ `[esd-extension-block-id="${m.NAME}"]`
267
+ ), l = t.querySelectorAll(
268
+ `[esd-extension-block-id="${m.PRICE}"]`
267
269
  ), r = t.querySelectorAll(
268
- `[esd-extension-block-id="${f.OLD_PRICE}"]`
270
+ `[esd-extension-block-id="${m.OLD_PRICE}"]`
269
271
  ), u = t.querySelectorAll(
270
- `[esd-extension-block-id="${f.OMNIBUS_PRICE}"]`
272
+ `[esd-extension-block-id="${m.OMNIBUS_PRICE}"]`
271
273
  ), s = t.querySelectorAll(
272
- `[esd-extension-block-id="${f.OMNIBUS_DISCOUNT}"]`
273
- ), l = t.querySelectorAll(
274
- `[esd-extension-block-id="${f.BUTTON}"]`
274
+ `[esd-extension-block-id="${m.OMNIBUS_DISCOUNT}"]`
275
+ ), c = t.querySelectorAll(
276
+ `[esd-extension-block-id="${m.BUTTON}"]`
275
277
  ), a = Math.min(n.length, o.length);
276
- let m = !1;
278
+ let f = !1;
277
279
  for (let d = 0; d < a; d++) {
278
280
  const S = K({
279
281
  documentModifier: e,
280
282
  product: o[d],
281
283
  imageEl: n[d] ?? null,
282
284
  nameEl: i[d] ?? null,
283
- priceEl: c[d] ?? null,
285
+ priceEl: l[d] ?? null,
284
286
  oldPriceEl: r[d] ?? null,
285
287
  omnibusPriceEl: u[d] ?? null,
286
288
  omnibusDiscountEl: s[d] ?? null,
287
- buttonEl: l[d] ?? null
289
+ buttonEl: c[d] ?? null
288
290
  });
289
- m = m || S;
291
+ f = f || S;
290
292
  }
291
- return m;
293
+ return f;
292
294
  }
293
- function ce(t) {
295
+ function le(t) {
294
296
  const { currentNode: e, documentModifier: o, products: n } = t;
295
297
  if (!e || !("querySelectorAll" in e))
296
298
  return !1;
297
299
  const i = U(e);
298
300
  if (!("querySelectorAll" in i) || i.querySelectorAll(
299
- `[esd-extension-block-id="${f.IMAGE}"]`
301
+ `[esd-extension-block-id="${m.IMAGE}"]`
300
302
  ).length !== n.length)
301
303
  return !1;
302
304
  let r = w(i, o, n);
303
305
  const u = g(e), s = E.getConfig(e);
304
306
  if (u !== "list" && s.mobileLayoutEnabled && "querySelector" in e) {
305
- const l = e.querySelector(P);
306
- if (l) {
307
+ const c = e.querySelector(P);
308
+ if (c) {
307
309
  const a = w(
308
- l,
310
+ c,
309
311
  o,
310
312
  n
311
313
  );
@@ -318,40 +320,40 @@ function N(t, e, o) {
318
320
  if (!("querySelectorAll" in t))
319
321
  return !1;
320
322
  const n = t.querySelectorAll(
321
- `[esd-extension-block-id="${f.PRICE}"]`
323
+ `[esd-extension-block-id="${m.PRICE}"]`
322
324
  ), i = t.querySelectorAll(
323
- `[esd-extension-block-id="${f.OLD_PRICE}"]`
324
- ), c = t.querySelectorAll(
325
- `[esd-extension-block-id="${f.OMNIBUS_PRICE}"]`
325
+ `[esd-extension-block-id="${m.OLD_PRICE}"]`
326
+ ), l = t.querySelectorAll(
327
+ `[esd-extension-block-id="${m.OMNIBUS_PRICE}"]`
326
328
  ), r = t.querySelectorAll(
327
- `[esd-extension-block-id="${f.OMNIBUS_DISCOUNT}"]`
329
+ `[esd-extension-block-id="${m.OMNIBUS_DISCOUNT}"]`
328
330
  ), u = Math.min(n.length, o.length);
329
331
  let s = !1;
330
- for (let l = 0; l < u; l++)
332
+ for (let c = 0; c < u; c++)
331
333
  H({
332
334
  documentModifier: e,
333
- product: o[l],
334
- priceEl: n[l] ?? null,
335
- oldPriceEl: i[l] ?? null,
336
- omnibusPriceEl: c[l] ?? null,
337
- omnibusDiscountEl: r[l] ?? null
335
+ product: o[c],
336
+ priceEl: n[c] ?? null,
337
+ oldPriceEl: i[c] ?? null,
338
+ omnibusPriceEl: l[c] ?? null,
339
+ omnibusDiscountEl: r[c] ?? null
338
340
  }) && (s = !0);
339
341
  return s;
340
342
  }
341
- function le(t) {
343
+ function ce(t) {
342
344
  const { currentNode: e, documentModifier: o } = t;
343
345
  if (!e || !("querySelectorAll" in e))
344
346
  return !1;
345
347
  const i = C().recommendationProducts;
346
348
  if (i.length === 0)
347
349
  return !1;
348
- const c = U(e);
349
- let r = N(c, o, i);
350
+ const l = U(e);
351
+ let r = N(l, o, i);
350
352
  const u = g(e), s = E.getConfig(e);
351
353
  if (u !== "list" && s.mobileLayoutEnabled && "querySelector" in e) {
352
- const l = e.querySelector(P);
353
- if (l) {
354
- const a = N(l, o, i);
354
+ const c = e.querySelector(P);
355
+ if (c) {
356
+ const a = N(c, o, i);
355
357
  r = r || a;
356
358
  }
357
359
  }
@@ -361,23 +363,23 @@ function se(t) {
361
363
  const { currentNode: e, documentModifier: o, currency: n } = t, i = M(e);
362
364
  if (!i)
363
365
  return;
364
- const c = n.alignment === "before" ? "0" : "1", r = (u, s) => {
366
+ const l = n.alignment === "before" ? "0" : "1", r = (u, s) => {
365
367
  o.modifyHtml(i).setAttribute(u, s);
366
368
  };
367
- r(y.CURRENCY, n.code), r(y.SYMBOL, n.symbol), r(y.ALIGNMENT, c), r(y.THOUSAND_SEPARATOR, n.thousandSeparator), r(y.DECIMAL_SEPARATOR, n.decimalSeparator), r(y.DECIMAL_COUNT, n.decimalCount.toString()), o.apply(new p("Update currency attributes"));
369
+ r(y.CURRENCY, n.code), r(y.SYMBOL, n.symbol), r(y.ALIGNMENT, l), r(y.THOUSAND_SEPARATOR, n.thousandSeparator), r(y.DECIMAL_SEPARATOR, n.decimalSeparator), r(y.DECIMAL_COUNT, n.decimalCount.toString()), o.apply(new p("Update currency attributes"));
368
370
  }
369
371
  export {
370
372
  ie as adjustProductsToSize,
371
373
  A as formatProductPrice,
372
374
  M as getBlockElement,
373
- L as getCardComposition,
375
+ _ as getCardComposition,
374
376
  g as getCurrentLayout,
375
377
  Y as reapplySpacing,
376
378
  W as regenerateMobileProductRows,
377
379
  G as regenerateProductRows,
378
380
  re as regenerateProductRowsWithStyles,
379
381
  se as setCurrencyAttributes,
380
- le as updatePricesInPlace,
381
- ce as updateProductContentInPlace,
382
+ ce as updatePricesInPlace,
383
+ le as updateProductContentInPlace,
382
384
  K as updateSingleProductContent
383
385
  };