@liquidcommercedev/rmn-sdk 1.5.0-beta.40 → 1.5.0-beta.42

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 (21) hide show
  1. package/dist/index.cjs +905 -474
  2. package/dist/index.esm.js +905 -474
  3. package/dist/types/enums.d.ts +3 -0
  4. package/dist/types/modules/element/component/spot/spot.component.d.ts +4 -0
  5. package/dist/types/modules/element/element.interface.d.ts +6 -1
  6. package/dist/types/modules/selection/selection.interface.d.ts +8 -0
  7. package/dist/types/modules/spot-template/rb-template.interface.d.ts +79 -48
  8. package/dist/types/modules/spot-template/reservebar/homepage-hero-full-image.template.d.ts +2 -0
  9. package/dist/types/modules/spot-template/reservebar/homepage-hero-three-tile.template.d.ts +2 -0
  10. package/dist/types/modules/spot-template/reservebar/homepage-hero-two-tile.template.d.ts +2 -0
  11. package/dist/types/modules/spot-template/reservebar/large-category-image-tout.template.d.ts +2 -0
  12. package/dist/types/modules/spot-template/reservebar/long-tout-short.template.d.ts +2 -0
  13. package/dist/types/modules/spot-template/reservebar/long-tout-tall.template.d.ts +2 -0
  14. package/dist/types/modules/spot-template/reservebar/navigation-banner.template.d.ts +2 -0
  15. package/dist/types/modules/spot-template/reservebar/small-category-image-tout.template.d.ts +2 -0
  16. package/dist/types/modules/spot-template/reservebar/small-discover-tout.template.d.ts +1 -0
  17. package/dist/types/modules/spot-template/spot-template.constant.d.ts +5 -0
  18. package/dist/types/modules/spot-template/spot-template.interface.d.ts +1 -0
  19. package/dist/types/modules/spot-template/utils.d.ts +2 -0
  20. package/package.json +13 -11
  21. package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
package/dist/index.cjs CHANGED
@@ -88,6 +88,9 @@ exports.ENUM_TEXT_BLOCK_POSITION = void 0;
88
88
  (function (ENUM_TEXT_BLOCK_POSITION) {
89
89
  ENUM_TEXT_BLOCK_POSITION["LEFT"] = "left";
90
90
  ENUM_TEXT_BLOCK_POSITION["RIGHT"] = "right";
91
+ ENUM_TEXT_BLOCK_POSITION["TOP"] = "top";
92
+ ENUM_TEXT_BLOCK_POSITION["BOTTOM"] = "bottom";
93
+ ENUM_TEXT_BLOCK_POSITION["MIDDLE"] = "middle";
91
94
  ENUM_TEXT_BLOCK_POSITION["TOP_LEFT"] = "top-left";
92
95
  ENUM_TEXT_BLOCK_POSITION["TOP_RIGHT"] = "top-right";
93
96
  ENUM_TEXT_BLOCK_POSITION["BOTTOM_LEFT"] = "bottom-left";
@@ -1948,8 +1951,8 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
1948
1951
  byteOffset = 0;
1949
1952
  } else if (byteOffset > 0x7fffffff) {
1950
1953
  byteOffset = 0x7fffffff;
1951
- } else if (byteOffset < -0x80000000) {
1952
- byteOffset = -0x80000000;
1954
+ } else if (byteOffset < -2147483648) {
1955
+ byteOffset = -2147483648;
1953
1956
  }
1954
1957
  byteOffset = +byteOffset; // Coerce to Number.
1955
1958
  if (isNaN(byteOffset)) {
@@ -2708,7 +2711,7 @@ Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, no
2708
2711
  Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
2709
2712
  value = +value;
2710
2713
  offset = offset | 0;
2711
- if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
2714
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -128);
2712
2715
  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
2713
2716
  if (value < 0) value = 0xff + value + 1;
2714
2717
  this[offset] = (value & 0xff);
@@ -2718,7 +2721,7 @@ Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
2718
2721
  Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
2719
2722
  value = +value;
2720
2723
  offset = offset | 0;
2721
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
2724
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768);
2722
2725
  if (Buffer.TYPED_ARRAY_SUPPORT) {
2723
2726
  this[offset] = (value & 0xff);
2724
2727
  this[offset + 1] = (value >>> 8);
@@ -2731,7 +2734,7 @@ Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert)
2731
2734
  Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
2732
2735
  value = +value;
2733
2736
  offset = offset | 0;
2734
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
2737
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768);
2735
2738
  if (Buffer.TYPED_ARRAY_SUPPORT) {
2736
2739
  this[offset] = (value >>> 8);
2737
2740
  this[offset + 1] = (value & 0xff);
@@ -2744,7 +2747,7 @@ Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert)
2744
2747
  Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
2745
2748
  value = +value;
2746
2749
  offset = offset | 0;
2747
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
2750
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);
2748
2751
  if (Buffer.TYPED_ARRAY_SUPPORT) {
2749
2752
  this[offset] = (value & 0xff);
2750
2753
  this[offset + 1] = (value >>> 8);
@@ -2759,7 +2762,7 @@ Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert)
2759
2762
  Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
2760
2763
  value = +value;
2761
2764
  offset = offset | 0;
2762
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
2765
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);
2763
2766
  if (value < 0) value = 0xffffffff + value + 1;
2764
2767
  if (Buffer.TYPED_ARRAY_SUPPORT) {
2765
2768
  this[offset] = (value >>> 24);
@@ -6089,7 +6092,7 @@ function matchesKeywordPattern(words, required, optional) {
6089
6092
  return false;
6090
6093
  }
6091
6094
  // If no optional keywords are specified, return true
6092
- if (!(optional === null || optional === void 0 ? void 0 : optional.length)) {
6095
+ if (!(optional === null || optional === undefined ? undefined : optional.length)) {
6093
6096
  return true;
6094
6097
  }
6095
6098
  // If optional keywords exist, check if at least one matches as a whole word
@@ -6102,7 +6105,7 @@ function matchesKeywordPattern(words, required, optional) {
6102
6105
  * @returns {RMN_SPOT_EVENT | null} - The corresponding RMN_SPOT_EVENT or null if no match
6103
6106
  */
6104
6107
  function getEventTypeFromRawEvent(event) {
6105
- if (!(event === null || event === void 0 ? void 0 : event.trim())) {
6108
+ if (!(event === null || event === undefined ? undefined : event.trim())) {
6106
6109
  return null;
6107
6110
  }
6108
6111
  const words = normalizeEventName(event);
@@ -7589,7 +7592,7 @@ class ObjectHelper {
7589
7592
  else if (typeof value === 'object') {
7590
7593
  return this.mergeObjectValues(targetValue, value);
7591
7594
  }
7592
- return (_a = value !== null && value !== void 0 ? value : targetValue) !== null && _a !== void 0 ? _a : undefined;
7595
+ return (_a = value !== null && value !== undefined ? value : targetValue) !== null && _a !== undefined ? _a : undefined;
7593
7596
  }
7594
7597
  /**
7595
7598
  * Merges the values of an array or object with a given array of objects and returns the merged result as an object.
@@ -7670,7 +7673,7 @@ function xhrFallbackEventFire(url) {
7670
7673
  }
7671
7674
  function beaconEventFire(url) {
7672
7675
  var _a;
7673
- return (_a = navigator === null || navigator === void 0 ? void 0 : navigator.sendBeacon) === null || _a === void 0 ? void 0 : _a.call(navigator, url);
7676
+ return (_a = navigator === null || navigator === undefined ? undefined : navigator.sendBeacon) === null || _a === undefined ? undefined : _a.call(navigator, url);
7674
7677
  }
7675
7678
  /**
7676
7679
  * Helper function to decode base64 string and parse JSON
@@ -7791,7 +7794,7 @@ function calculateScaleFactor(elementScale) {
7791
7794
  * @returns {string} - The query string.
7792
7795
  */
7793
7796
  function objectToQueryParams(obj) {
7794
- return Object.entries(obj !== null && obj !== void 0 ? obj : {})
7797
+ return Object.entries(obj !== null && obj !== undefined ? obj : {})
7795
7798
  .map(([key, value]) => {
7796
7799
  if (value == null) {
7797
7800
  return '';
@@ -12043,7 +12046,7 @@ function requireCipherCore () {
12043
12046
  C_lib.StreamCipher = Cipher.extend({
12044
12047
  _doFinalize: function () {
12045
12048
  // Process partial blocks
12046
- var finalProcessedBlocks = this._process(!!'flush');
12049
+ var finalProcessedBlocks = this._process(true);
12047
12050
 
12048
12051
  return finalProcessedBlocks;
12049
12052
  },
@@ -12324,10 +12327,10 @@ function requireCipherCore () {
12324
12327
  padding.pad(this._data, this.blockSize);
12325
12328
 
12326
12329
  // Process final blocks
12327
- finalProcessedBlocks = this._process(!!'flush');
12330
+ finalProcessedBlocks = this._process(true);
12328
12331
  } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
12329
12332
  // Process final blocks
12330
- finalProcessedBlocks = this._process(!!'flush');
12333
+ finalProcessedBlocks = this._process(true);
12331
12334
 
12332
12335
  // Unpad data
12333
12336
  padding.unpad(finalProcessedBlocks);
@@ -16685,9 +16688,9 @@ class ApiError {
16685
16688
  constructor(error) {
16686
16689
  var _a, _b, _c, _d, _e, _f, _g;
16687
16690
  const e = error;
16688
- this.cause = (_d = (_b = (_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.data.statusCode) !== null && _b !== void 0 ? _b : (_c = e === null || e === void 0 ? void 0 : e.response) === null || _c === void 0 ? void 0 : _c.status) !== null && _d !== void 0 ? _d : 0;
16691
+ this.cause = (_d = (_b = (_a = e === null || e === undefined ? undefined : e.response) === null || _a === undefined ? undefined : _a.data.statusCode) !== null && _b !== undefined ? _b : (_c = e === null || e === undefined ? undefined : e.response) === null || _c === undefined ? undefined : _c.status) !== null && _d !== undefined ? _d : 0;
16689
16692
  this.errorMessage =
16690
- (_g = (_f = (_e = e === null || e === void 0 ? void 0 : e.response) === null || _e === void 0 ? void 0 : _e.data.message) !== null && _f !== void 0 ? _f : e === null || e === void 0 ? void 0 : e.message) !== null && _g !== void 0 ? _g : `There's been an error related to the API request to LiquidCommerce RMN Services.`;
16693
+ (_g = (_f = (_e = e === null || e === undefined ? undefined : e.response) === null || _e === undefined ? undefined : _e.data.message) !== null && _f !== undefined ? _f : e === null || e === undefined ? undefined : e.message) !== null && _g !== undefined ? _g : `There's been an error related to the API request to LiquidCommerce RMN Services.`;
16691
16694
  }
16692
16695
  }
16693
16696
 
@@ -16802,12 +16805,12 @@ class BaseApi extends BaseApiAbstract {
16802
16805
  this.authInfo = auth;
16803
16806
  this.encryptedApi = EncryptedApi.getInstance(this.authInfo.apiKey);
16804
16807
  this.objectHelper = ObjectHelper.getInstance();
16805
- this.baseUrl = (_a = SDK_CONFIG.url[this.authInfo.env]) !== null && _a !== void 0 ? _a : SDK_CONFIG.url.development;
16808
+ this.baseUrl = (_a = SDK_CONFIG.url[this.authInfo.env]) !== null && _a !== undefined ? _a : SDK_CONFIG.url.development;
16806
16809
  const configHeaders = {
16807
16810
  [SDK_CONFIG.accessHeader]: `Bearer ${this.authInfo.token}`,
16808
16811
  };
16809
16812
  const partnerSite = this.getPartnerSite();
16810
- const isPartnerSiteValid = partnerSite === null || partnerSite === void 0 ? void 0 : partnerSite.startsWith('http');
16813
+ const isPartnerSiteValid = partnerSite === null || partnerSite === undefined ? undefined : partnerSite.startsWith('http');
16811
16814
  if (partnerSite && isPartnerSiteValid) {
16812
16815
  configHeaders[REQUEST_CLOUD_PARTNER_SITE] = partnerSite;
16813
16816
  }
@@ -16863,7 +16866,7 @@ class BaseApi extends BaseApiAbstract {
16863
16866
  configOverrides = {
16864
16867
  ...configOverrides,
16865
16868
  headers: {
16866
- ...configOverrides === null || configOverrides === void 0 ? void 0 : configOverrides.headers,
16869
+ ...configOverrides === null || configOverrides === undefined ? undefined : configOverrides.headers,
16867
16870
  [REQUEST_CLOUD_PROTECTED_KEY]: 'true',
16868
16871
  [REQUEST_CLOUD_PROTECTED_TIMESTAMP]: timestamp,
16869
16872
  [SDK_CONFIG.apiHeader]: this.authInfo.apiKey,
@@ -16900,7 +16903,7 @@ class BaseApi extends BaseApiAbstract {
16900
16903
  * @returns {AxiosRequestConfig} - The merged Axios request configuration.
16901
16904
  */
16902
16905
  createFullConfig(configOverrides) {
16903
- return this.objectHelper.merge(this.getConfig(), configOverrides !== null && configOverrides !== void 0 ? configOverrides : {});
16906
+ return this.objectHelper.merge(this.getConfig(), configOverrides !== null && configOverrides !== undefined ? configOverrides : {});
16904
16907
  }
16905
16908
  /**
16906
16909
  * Sends a request to the specified URL with the given configuration.
@@ -16924,17 +16927,17 @@ class BaseApi extends BaseApiAbstract {
16924
16927
  */
16925
16928
  async getResponse(response) {
16926
16929
  var _a, _b, _c, _d, _e, _f, _g;
16927
- let responseData = (response === null || response === void 0 ? void 0 : response.data) ? response.data : null;
16930
+ let responseData = (response === null || response === undefined ? undefined : response.data) ? response.data : null;
16928
16931
  let isEncrypted = false;
16929
16932
  let timestamp = 0;
16930
- if ((response === null || response === void 0 ? void 0 : response.headers) &&
16931
- ((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a.has) &&
16932
- ((_b = response === null || response === void 0 ? void 0 : response.headers) === null || _b === void 0 ? void 0 : _b.has(REQUEST_CLOUD_PROTECTED_KEY)) &&
16933
- ((_c = response === null || response === void 0 ? void 0 : response.headers) === null || _c === void 0 ? void 0 : _c.has(REQUEST_CLOUD_PROTECTED_TIMESTAMP)) &&
16934
- ((_d = response === null || response === void 0 ? void 0 : response.headers) === null || _d === void 0 ? void 0 : _d.get)) {
16935
- isEncrypted = ((_e = response === null || response === void 0 ? void 0 : response.headers) === null || _e === void 0 ? void 0 : _e.get(REQUEST_CLOUD_PROTECTED_KEY)) === 'true';
16936
- timestamp = ((_f = response === null || response === void 0 ? void 0 : response.headers) === null || _f === void 0 ? void 0 : _f.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
16937
- ? Number((_g = response === null || response === void 0 ? void 0 : response.headers) === null || _g === void 0 ? void 0 : _g.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
16933
+ if ((response === null || response === undefined ? undefined : response.headers) &&
16934
+ ((_a = response === null || response === undefined ? undefined : response.headers) === null || _a === undefined ? undefined : _a.has) &&
16935
+ ((_b = response === null || response === undefined ? undefined : response.headers) === null || _b === undefined ? undefined : _b.has(REQUEST_CLOUD_PROTECTED_KEY)) &&
16936
+ ((_c = response === null || response === undefined ? undefined : response.headers) === null || _c === undefined ? undefined : _c.has(REQUEST_CLOUD_PROTECTED_TIMESTAMP)) &&
16937
+ ((_d = response === null || response === undefined ? undefined : response.headers) === null || _d === undefined ? undefined : _d.get)) {
16938
+ isEncrypted = ((_e = response === null || response === undefined ? undefined : response.headers) === null || _e === undefined ? undefined : _e.get(REQUEST_CLOUD_PROTECTED_KEY)) === 'true';
16939
+ timestamp = ((_f = response === null || response === undefined ? undefined : response.headers) === null || _f === undefined ? undefined : _f.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
16940
+ ? Number((_g = response === null || response === undefined ? undefined : response.headers) === null || _g === undefined ? undefined : _g.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
16938
16941
  : 0;
16939
16942
  }
16940
16943
  if (responseData &&
@@ -16943,7 +16946,7 @@ class BaseApi extends BaseApiAbstract {
16943
16946
  timestamp > 0) {
16944
16947
  const { t: encryptedPayload } = responseData;
16945
16948
  const decryptedData = await this.encryptedApi.handleDecryption(encryptedPayload, timestamp);
16946
- if (decryptedData === null || decryptedData === void 0 ? void 0 : decryptedData.payload) {
16949
+ if (decryptedData === null || decryptedData === undefined ? undefined : decryptedData.payload) {
16947
16950
  delete decryptedData.payload.exp;
16948
16951
  delete decryptedData.payload.iat;
16949
16952
  responseData = decryptedData.payload;
@@ -16997,9 +17000,9 @@ class AuthService extends BaseApi {
16997
17000
  },
16998
17001
  });
16999
17002
  if (isErr) {
17000
- throw new Error(`There was an error during authentication: (${isErr === null || isErr === void 0 ? void 0 : isErr.errorMessage})`);
17003
+ throw new Error(`There was an error during authentication: (${isErr === null || isErr === undefined ? undefined : isErr.errorMessage})`);
17001
17004
  }
17002
- if (isOk && (val === null || val === void 0 ? void 0 : val.data.token)) {
17005
+ if (isOk && (val === null || val === undefined ? undefined : val.data.token)) {
17003
17006
  this.authInfo.token = val.data.token;
17004
17007
  this.authInfo.authenticated = true;
17005
17008
  }
@@ -17078,6 +17081,8 @@ class BaseSpotComponent extends BaseElement {
17078
17081
  super();
17079
17082
  this.initialized = false;
17080
17083
  this.dataInitialized = false;
17084
+ this.reRenderOnDeviceChange = false;
17085
+ this._isMobileDevice = true;
17081
17086
  }
17082
17087
  initializeData(data, config) {
17083
17088
  if (this.dataInitialized) {
@@ -17127,6 +17132,27 @@ class BaseSpotComponent extends BaseElement {
17127
17132
  }
17128
17133
  `;
17129
17134
  }
17135
+ setupDeviceDetection() {
17136
+ if (!isBrowser)
17137
+ return;
17138
+ const mediaQuery = '(max-width: 639.98px)';
17139
+ const containerQuery = window.matchMedia(mediaQuery);
17140
+ const updateDeviceState = (e) => {
17141
+ var _a;
17142
+ const isMobileNewValue = e.matches;
17143
+ if (this._isMobileDevice !== isMobileNewValue) {
17144
+ this._isMobileDevice = isMobileNewValue;
17145
+ (_a = this.onDeviceChange) === null || _a === undefined ? undefined : _a.call(this, this._isMobileDevice);
17146
+ if (this.reRenderOnDeviceChange) {
17147
+ this.render();
17148
+ }
17149
+ }
17150
+ };
17151
+ // Setup listener
17152
+ containerQuery.addEventListener('change', updateDeviceState);
17153
+ // Initial check
17154
+ updateDeviceState(containerQuery);
17155
+ }
17130
17156
  // Lifecycle callbacks
17131
17157
  connectedCallback() {
17132
17158
  var _a;
@@ -17135,14 +17161,15 @@ class BaseSpotComponent extends BaseElement {
17135
17161
  this.initialized = true;
17136
17162
  if (this.dataInitialized) {
17137
17163
  this.render();
17164
+ this.setupDeviceDetection();
17138
17165
  }
17139
- (_a = this.connected) === null || _a === void 0 ? void 0 : _a.call(this);
17166
+ (_a = this.connected) === null || _a === undefined ? undefined : _a.call(this);
17140
17167
  }
17141
17168
  disconnectedCallback() {
17142
17169
  var _a;
17143
17170
  if (!isBrowser)
17144
17171
  return;
17145
- (_a = this.disconnected) === null || _a === void 0 ? void 0 : _a.call(this);
17172
+ (_a = this.disconnected) === null || _a === undefined ? undefined : _a.call(this);
17146
17173
  }
17147
17174
  }
17148
17175
 
@@ -17185,11 +17212,11 @@ class LocalStorageService {
17185
17212
  setSpot(spotId, data) {
17186
17213
  var _a, _b, _c, _d, _e;
17187
17214
  data.createdAt = Date.now();
17188
- const isExistentSpot = (_a = this.spots) === null || _a === void 0 ? void 0 : _a.has(spotId);
17215
+ const isExistentSpot = (_a = this.spots) === null || _a === undefined ? undefined : _a.has(spotId);
17189
17216
  if (isExistentSpot) {
17190
- data.firedEvents = (_d = (_c = (_b = this.spots) === null || _b === void 0 ? void 0 : _b.get(spotId)) === null || _c === void 0 ? void 0 : _c.firedEvents) !== null && _d !== void 0 ? _d : [];
17217
+ data.firedEvents = (_d = (_c = (_b = this.spots) === null || _b === undefined ? undefined : _b.get(spotId)) === null || _c === undefined ? undefined : _c.firedEvents) !== null && _d !== undefined ? _d : [];
17191
17218
  }
17192
- (_e = this.spots) === null || _e === void 0 ? void 0 : _e.set(spotId, data);
17219
+ (_e = this.spots) === null || _e === undefined ? undefined : _e.set(spotId, data);
17193
17220
  this.updateLocalStorage();
17194
17221
  }
17195
17222
  // public removeSpot(spotId: string): void {
@@ -17234,12 +17261,12 @@ class LocalStorageService {
17234
17261
  setUserId() {
17235
17262
  var _a;
17236
17263
  const prefix = LocalStorageService.localStorageKeyPrefix;
17237
- const existingKeys = Object.keys((_a = window.localStorage) !== null && _a !== void 0 ? _a : {}).filter((key) => key.startsWith(prefix));
17264
+ const existingKeys = Object.keys((_a = window.localStorage) !== null && _a !== undefined ? _a : {}).filter((key) => key.startsWith(prefix));
17238
17265
  const setNewKey = () => {
17239
17266
  var _a;
17240
17267
  const uniqueId = UniqueIdGenerator.generate();
17241
17268
  const newLocalStorageKey = `${prefix}_${uniqueId}`;
17242
- (_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.setItem(newLocalStorageKey, '');
17269
+ (_a = window.localStorage) === null || _a === undefined ? undefined : _a.setItem(newLocalStorageKey, '');
17243
17270
  LocalStorageService.localStorageKey = newLocalStorageKey;
17244
17271
  };
17245
17272
  if (existingKeys.length === 0) {
@@ -17251,7 +17278,7 @@ class LocalStorageService {
17251
17278
  existingKeys.forEach((key) => {
17252
17279
  var _a;
17253
17280
  if (key !== validKey) {
17254
- (_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.removeItem(key);
17281
+ (_a = window.localStorage) === null || _a === undefined ? undefined : _a.removeItem(key);
17255
17282
  }
17256
17283
  });
17257
17284
  if (validKey) {
@@ -17267,7 +17294,7 @@ class LocalStorageService {
17267
17294
  // ======================== Utility functions ======================== //
17268
17295
  syncLocalStorage() {
17269
17296
  var _a;
17270
- const localStorageData = (_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(LocalStorageService.localStorageKey);
17297
+ const localStorageData = (_a = window.localStorage) === null || _a === undefined ? undefined : _a.getItem(LocalStorageService.localStorageKey);
17271
17298
  if (localStorageData) {
17272
17299
  try {
17273
17300
  const decryptedData = this.decryptData(localStorageData);
@@ -17306,15 +17333,15 @@ class LocalStorageService {
17306
17333
  }
17307
17334
  clearLocalStorage() {
17308
17335
  var _a;
17309
- (_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.removeItem(LocalStorageService.localStorageKey);
17336
+ (_a = window.localStorage) === null || _a === undefined ? undefined : _a.removeItem(LocalStorageService.localStorageKey);
17310
17337
  }
17311
17338
  removeExpiredSpots() {
17312
17339
  var _a;
17313
17340
  const currentTime = Date.now();
17314
- (_a = this.spots) === null || _a === void 0 ? void 0 : _a.forEach((spot, spotId) => {
17341
+ (_a = this.spots) === null || _a === undefined ? undefined : _a.forEach((spot, spotId) => {
17315
17342
  var _a, _b;
17316
- if (currentTime - ((_a = spot.createdAt) !== null && _a !== void 0 ? _a : 0) > LocalStorageService.spotExpirationTime) {
17317
- (_b = this.spots) === null || _b === void 0 ? void 0 : _b.delete(spotId);
17343
+ if (currentTime - ((_a = spot.createdAt) !== null && _a !== undefined ? _a : 0) > LocalStorageService.spotExpirationTime) {
17344
+ (_b = this.spots) === null || _b === undefined ? undefined : _b.delete(spotId);
17318
17345
  }
17319
17346
  });
17320
17347
  this.updateLocalStorage();
@@ -17350,9 +17377,9 @@ class LocalStorageService {
17350
17377
  obj.spotId,
17351
17378
  obj.spotType,
17352
17379
  this.spotEventObjectToArray(obj.events),
17353
- (_b = (_a = obj.firedEvents) === null || _a === void 0 ? void 0 : _a.map((event) => [event.productId, event.event])) !== null && _b !== void 0 ? _b : [],
17380
+ (_b = (_a = obj.firedEvents) === null || _a === undefined ? undefined : _a.map((event) => [event.productId, event.event])) !== null && _b !== undefined ? _b : [],
17354
17381
  obj.productIds,
17355
- (_c = obj.createdAt) !== null && _c !== void 0 ? _c : 0,
17382
+ (_c = obj.createdAt) !== null && _c !== undefined ? _c : 0,
17356
17383
  ];
17357
17384
  }
17358
17385
  /**
@@ -17422,8 +17449,8 @@ class ProximityObserver {
17422
17449
  this.targetIds = new Set(elementIds);
17423
17450
  this.processedIds = new Set();
17424
17451
  this.callback = callback;
17425
- this.proximityThreshold = (_a = options.proximityThreshold) !== null && _a !== void 0 ? _a : 500;
17426
- this.intersectionMargin = (_b = options.intersectionMargin) !== null && _b !== void 0 ? _b : '2000px';
17452
+ this.proximityThreshold = (_a = options.proximityThreshold) !== null && _a !== undefined ? _a : 500;
17453
+ this.intersectionMargin = (_b = options.intersectionMargin) !== null && _b !== undefined ? _b : '2000px';
17427
17454
  this.initializeObservers();
17428
17455
  this.observeExistingElements();
17429
17456
  }
@@ -17464,7 +17491,7 @@ class ProximityObserver {
17464
17491
  });
17465
17492
  // Start observing DOM changes
17466
17493
  if (document.body) {
17467
- (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(document.body, {
17494
+ (_a = this.mutationObserver) === null || _a === undefined ? undefined : _a.observe(document.body, {
17468
17495
  childList: true,
17469
17496
  subtree: true,
17470
17497
  });
@@ -17474,13 +17501,13 @@ class ProximityObserver {
17474
17501
  var _a;
17475
17502
  if (element.id && this.processedIds.has(element.id)) {
17476
17503
  this.processedIds.delete(element.id);
17477
- (_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.unobserve(element);
17504
+ (_a = this.intersectionObserver) === null || _a === undefined ? undefined : _a.unobserve(element);
17478
17505
  }
17479
17506
  }
17480
17507
  checkElement(element) {
17481
17508
  var _a;
17482
17509
  if (element.id && this.targetIds.has(element.id) && !this.processedIds.has(element.id)) {
17483
- (_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.observe(element);
17510
+ (_a = this.intersectionObserver) === null || _a === undefined ? undefined : _a.observe(element);
17484
17511
  }
17485
17512
  }
17486
17513
  findNearbyTargetIds(element) {
@@ -17527,7 +17554,7 @@ class ProximityObserver {
17527
17554
  this.processedIds.add(id);
17528
17555
  const el = document.getElementById(id);
17529
17556
  if (el)
17530
- (_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.unobserve(el);
17557
+ (_a = this.intersectionObserver) === null || _a === undefined ? undefined : _a.unobserve(el);
17531
17558
  });
17532
17559
  // Trigger callback with the group
17533
17560
  this.callback(groupIdsToProcess);
@@ -17650,7 +17677,7 @@ class ResizeObserverService {
17650
17677
  this.container = element.parentElement;
17651
17678
  this.setDimensions(maxSize, minScale);
17652
17679
  this.resizeObserver = new ResizeObserver(() => this.updateElementSize());
17653
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.container);
17680
+ (_a = this.resizeObserver) === null || _a === undefined ? undefined : _a.observe(this.container);
17654
17681
  // Initial size update
17655
17682
  this.updateElementSize();
17656
17683
  }
@@ -17706,7 +17733,7 @@ class ResizeObserverService {
17706
17733
  }
17707
17734
  disconnect() {
17708
17735
  var _a;
17709
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
17736
+ (_a = this.resizeObserver) === null || _a === undefined ? undefined : _a.disconnect();
17710
17737
  }
17711
17738
  }
17712
17739
 
@@ -17720,6 +17747,11 @@ const GFONT_SOURCE_SANS_3 = `
17720
17747
  const GFONT_CORMORANT = `
17721
17748
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap">
17722
17749
  `;
17750
+ const FONTS = {
17751
+ preconnect: GFONT_PRECONNECT,
17752
+ sourceSans: GFONT_SOURCE_SANS_3,
17753
+ cormorant: GFONT_CORMORANT,
17754
+ };
17723
17755
 
17724
17756
  function convertHexToRgba(hex, opacity = 1) {
17725
17757
  // Remove # if present
@@ -17753,6 +17785,16 @@ function generateGradientColor(overlay, fallback = '') {
17753
17785
  const gradientColor = convertHexToRgba(color, overlayOpacity);
17754
17786
  return `${fullColor} 0%, ${gradientColor} ${goTo}%, ${transparentColor} 100%`;
17755
17787
  }
17788
+ function importFonts(...fonts) {
17789
+ const fontsToImport = fonts.length === 0 ? ['sourceSans', 'cormorant'] : fonts;
17790
+ return [
17791
+ FONTS.preconnect,
17792
+ ...fontsToImport.map((font) => FONTS[font]),
17793
+ ].join('');
17794
+ }
17795
+ function renderElement(tag, className, content) {
17796
+ return (content === null || content === undefined ? undefined : content.trim()) ? `<${tag} class="${className}">${content}</${tag}>` : '';
17797
+ }
17756
17798
 
17757
17799
  class BillboardV1SE extends BaseSpotComponent {
17758
17800
  constructor() {
@@ -17765,7 +17807,7 @@ class BillboardV1SE extends BaseSpotComponent {
17765
17807
  disconnected() {
17766
17808
  var _a;
17767
17809
  this.removeEventListener('spotSizeChanged', this.handleSpotSizeChanged);
17768
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
17810
+ (_a = this.resizeObserver) === null || _a === undefined ? undefined : _a.disconnect();
17769
17811
  }
17770
17812
  setupResizeObserver() {
17771
17813
  if (!this._config.fluid) {
@@ -17788,7 +17830,7 @@ class BillboardV1SE extends BaseSpotComponent {
17788
17830
  var _a;
17789
17831
  // Find all text elements within the shadow root
17790
17832
  const selectors = ['h2', 'p', 'span'].join(', ');
17791
- const elements = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selectors);
17833
+ const elements = (_a = this.shadowRoot) === null || _a === undefined ? undefined : _a.querySelectorAll(selectors);
17792
17834
  if (!elements)
17793
17835
  return;
17794
17836
  const scaleFactor = calculateScaleFactor(elementScale);
@@ -18002,6 +18044,7 @@ class RbCollectionBannerWithoutTextBlockSE extends BaseSpotComponent {
18002
18044
  class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18003
18045
  constructor() {
18004
18046
  super();
18047
+ this.reRenderOnDeviceChange = true;
18005
18048
  }
18006
18049
  getGradientDirection(position) {
18007
18050
  switch (position) {
@@ -18021,24 +18064,42 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18021
18064
  }
18022
18065
  template() {
18023
18066
  const prefix = this._config.prefix;
18024
- const { preHeader, header, description, ctaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, } = this._data;
18067
+ const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, mobileTextBlockPosition = textBlockPosition,
18068
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18069
+ enableMobileTexts = false, } = this._data;
18070
+ const content = this._isMobileDevice && enableMobileTexts
18071
+ ? {
18072
+ preHeader: mobilePreHeader,
18073
+ header: mobileHeader,
18074
+ description: mobileDescription,
18075
+ ctaText: mobileCtaText,
18076
+ }
18077
+ : { preHeader, header, description, ctaText };
18078
+ if (!this.hasContent) {
18079
+ return `
18080
+ ${importFonts()}
18081
+ <div class="${prefix}"></div>
18082
+ `;
18083
+ }
18084
+ const elements = [
18085
+ renderElement('h2', `${prefix}__pre-header`, content.preHeader),
18086
+ renderElement('h2', `${prefix}__header`, content.header),
18087
+ renderElement('p', `${prefix}__description`, content.description),
18088
+ renderElement('span', `${prefix}__cta-button`, content.ctaText),
18089
+ ];
18025
18090
  return `
18026
- ${GFONT_PRECONNECT}
18027
- ${GFONT_SOURCE_SANS_3}
18028
- ${GFONT_CORMORANT}
18091
+ ${importFonts()}
18029
18092
  <div class="${prefix}">
18030
- <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition}">
18031
- ${preHeader ? `<h2 class="${prefix}__pre-header">${preHeader}</h2>` : ''}
18032
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18033
- ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
18034
- ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
18093
+ <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
18094
+ ${elements.join('')}
18035
18095
  </div>
18036
18096
  </div>
18037
18097
  `;
18038
18098
  }
18039
18099
  styles() {
18040
- const { textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT } = this._data;
18041
- const gradientDirection = this.getGradientDirection(textBlockPosition);
18100
+ const { textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, mobileTextBlockPosition = textBlockPosition, } = this._data;
18101
+ const desktopGradientDirection = this.getGradientDirection(textBlockPosition);
18102
+ const mobileGradientDirection = this.getGradientDirection(mobileTextBlockPosition);
18042
18103
  const linearGradient = generateGradientColor(this._config.overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
18043
18104
  const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
18044
18105
  const prefix = this._config.prefix;
@@ -18047,7 +18108,9 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18047
18108
  display: flex;
18048
18109
  width: 100%;
18049
18110
  height: 100%;
18050
- background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");
18111
+ ${this.hasContent
18112
+ ? `background-image: linear-gradient(${mobileGradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");`
18113
+ : `background-image: url("${mobilePrimaryImage}");`}
18051
18114
  background-size: cover;
18052
18115
  background-repeat: no-repeat;
18053
18116
  background-position: center;
@@ -18069,42 +18132,50 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18069
18132
  position: absolute;
18070
18133
  }
18071
18134
 
18072
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
18073
- top: 3%;
18074
- left: 3%;
18075
- }
18135
+ @container (max-width: 639px) {
18136
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
18137
+ top: 3%;
18138
+ left: 3%;
18139
+ align-items: flex-start;
18140
+ text-align: left;
18141
+ }
18076
18142
 
18077
- .${prefix}text-block--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
18078
- top: 3%;
18079
- right: 3%;
18080
- align-items: flex-end;
18081
- text-align: right;
18082
- }
18143
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
18144
+ top: 3%;
18145
+ right: 3%;
18146
+ align-items: flex-end;
18147
+ text-align: right;
18148
+ }
18083
18149
 
18084
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
18085
- top: 50%;
18086
- left: 3%;
18087
- transform: translateY(-50%);
18088
- }
18150
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
18151
+ top: 50%;
18152
+ left: 3%;
18153
+ transform: translateY(-50%);
18154
+ align-items: flex-start;
18155
+ text-align: left;
18156
+ }
18089
18157
 
18090
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
18091
- top: 50%;
18092
- right: 3%;
18093
- transform: translateY(-50%);
18094
- align-items: flex-end;
18095
- text-align: right;
18096
- }
18158
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
18159
+ top: 50%;
18160
+ right: 3%;
18161
+ transform: translateY(-50%);
18162
+ align-items: flex-end;
18163
+ text-align: right;
18164
+ }
18097
18165
 
18098
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
18099
- bottom: 3%;
18100
- left: 3%;
18101
- }
18166
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
18167
+ bottom: 3%;
18168
+ left: 3%;
18169
+ align-items: flex-start;
18170
+ text-align: left;
18171
+ }
18102
18172
 
18103
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
18104
- bottom: 3%;
18105
- right: 3%;
18106
- align-items: flex-end;
18107
- text-align: right;
18173
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
18174
+ bottom: 3%;
18175
+ right: 3%;
18176
+ align-items: flex-end;
18177
+ text-align: right;
18178
+ }
18108
18179
  }
18109
18180
 
18110
18181
  .${prefix}__pre-header {
@@ -18154,12 +18225,58 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18154
18225
 
18155
18226
  @container (min-width: 640px) {
18156
18227
  .${prefix} {
18157
- background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${primaryImage}");
18228
+ ${this.hasContent
18229
+ ? `background-image: linear-gradient(${desktopGradientDirection}, ${linearGradient}), url("${primaryImage}");`
18230
+ : `background-image: url("${primaryImage}");`}
18158
18231
  }
18159
18232
 
18160
18233
  .${prefix}__text {
18161
18234
  width: 70%;
18162
18235
  }
18236
+
18237
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
18238
+ top: 3%;
18239
+ left: 3%;
18240
+ align-items: flex-start;
18241
+ text-align: left;
18242
+ }
18243
+
18244
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
18245
+ top: 3%;
18246
+ right: 3%;
18247
+ align-items: flex-end;
18248
+ text-align: right;
18249
+ }
18250
+
18251
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
18252
+ top: 50%;
18253
+ left: 3%;
18254
+ transform: translateY(-50%);
18255
+ align-items: flex-start;
18256
+ text-align: left;
18257
+ }
18258
+
18259
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
18260
+ top: 50%;
18261
+ right: 3%;
18262
+ transform: translateY(-50%);
18263
+ align-items: flex-end;
18264
+ text-align: right;
18265
+ }
18266
+
18267
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
18268
+ bottom: 3%;
18269
+ left: 3%;
18270
+ align-items: flex-start;
18271
+ text-align: left;
18272
+ }
18273
+
18274
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
18275
+ bottom: 3%;
18276
+ right: 3%;
18277
+ align-items: flex-end;
18278
+ text-align: right;
18279
+ }
18163
18280
  }
18164
18281
 
18165
18282
  @container (min-width: 768px) {
@@ -18201,46 +18318,73 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18201
18318
  }
18202
18319
  `;
18203
18320
  }
18321
+ get hasContent() {
18322
+ const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
18323
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18324
+ enableMobileTexts = false, } = this._data;
18325
+ const content = this._isMobileDevice && enableMobileTexts
18326
+ ? {
18327
+ preHeader: mobilePreHeader,
18328
+ header: mobileHeader,
18329
+ description: mobileDescription,
18330
+ ctaText: mobileCtaText,
18331
+ }
18332
+ : { preHeader, header, description, ctaText };
18333
+ return Object.values(content).some(Boolean);
18334
+ }
18204
18335
  }
18205
18336
 
18206
18337
  class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18207
18338
  constructor() {
18208
18339
  super();
18340
+ this.reRenderOnDeviceChange = true;
18209
18341
  }
18210
18342
  template() {
18211
18343
  const prefix = this._config.prefix;
18212
- const { header, description, ctaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.LEFT, } = this._data;
18344
+ const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.LEFT, mobileTextBlockPosition = textBlockPosition,
18345
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18346
+ enableMobileTexts = false, } = this._data;
18347
+ const content = this._isMobileDevice && enableMobileTexts
18348
+ ? {
18349
+ header: mobileHeader,
18350
+ description: mobileDescription,
18351
+ ctaText: mobileCtaText,
18352
+ }
18353
+ : { header, description, ctaText };
18354
+ const elements = this.hasContent
18355
+ ? [
18356
+ renderElement('h2', `${prefix}__header`, content.header),
18357
+ renderElement('p', `${prefix}__description`, content.description),
18358
+ renderElement('span', `${prefix}__cta-button`, content.ctaText),
18359
+ ]
18360
+ : [];
18213
18361
  return `
18214
- ${GFONT_PRECONNECT}
18215
- ${GFONT_SOURCE_SANS_3}
18216
- ${GFONT_CORMORANT}
18217
- <div class="${prefix}">
18218
- <div class="${prefix}__content ${prefix}__text-block--${textBlockPosition}">
18219
- <div class="${prefix}__main">
18220
- <div class="${prefix}__secondary-image"></div>
18221
- <div class="${prefix}__text">
18222
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18223
- ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
18224
- ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
18225
- </div>
18226
- </div>
18227
- <div class="${prefix}__primary-image"></div>
18362
+ ${importFonts()}
18363
+ <div class="${prefix}">
18364
+ <div class="${prefix}__content ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
18365
+ <div class="${prefix}__main">
18366
+ <div class="${prefix}__secondary-image"></div>
18367
+ <div class="${prefix}__text">
18368
+ ${elements.join('')}
18228
18369
  </div>
18370
+ </div>
18371
+ <div class="${prefix}__primary-image"></div>
18229
18372
  </div>
18373
+ </div>
18230
18374
  `;
18231
18375
  }
18232
18376
  styles() {
18233
18377
  const { textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, secondaryImage, mobileSecondaryImage = secondaryImage, } = this._data;
18234
18378
  const prefix = this._config.prefix;
18235
18379
  return `
18236
- .${prefix} {
18380
+ .${prefix} {
18237
18381
  width: 100%;
18238
18382
  height: 100%;
18239
18383
  display: block;
18240
18384
  position: relative;
18241
- }
18385
+ }
18242
18386
 
18243
- .${prefix}__content {
18387
+ .${prefix}__content {
18244
18388
  width: 100%;
18245
18389
  height: 100%;
18246
18390
  display: flex;
@@ -18249,35 +18393,45 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18249
18393
  gap: 6px;
18250
18394
  color: inherit;
18251
18395
  cursor: pointer;
18252
- }
18396
+ }
18253
18397
 
18254
- .${prefix}__primary-image {
18398
+ .${prefix}__primary-image {
18255
18399
  width: 100%;
18256
18400
  height: 60%;
18257
18401
  background-image: url("${mobilePrimaryImage}");
18258
18402
  background-position: center;
18259
18403
  background-repeat: no-repeat;
18260
18404
  background-size: cover;
18261
- }
18405
+ }
18262
18406
 
18263
- .${prefix}__main {
18407
+ .${prefix}__main {
18264
18408
  width: 100%;
18265
18409
  height: 40%;
18266
18410
  display: flex;
18267
18411
  flex-direction: row;
18268
18412
  gap: 6px;
18269
- }
18413
+ }
18414
+
18415
+ @container (max-width: 767px) {
18416
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.LEFT} .${prefix}__main {
18417
+ flex-direction: row;
18418
+ }
18270
18419
 
18271
- .${prefix}__secondary-image {
18420
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.RIGHT} .${prefix}__main {
18421
+ flex-direction: row-reverse;
18422
+ }
18423
+ }
18424
+
18425
+ .${prefix}__secondary-image {
18272
18426
  width: 50%;
18273
18427
  height: 100%;
18274
18428
  background-image: url("${mobileSecondaryImage}");
18275
18429
  background-position: center;
18276
18430
  background-repeat: no-repeat;
18277
18431
  background-size: cover;
18278
- }
18432
+ }
18279
18433
 
18280
- .${prefix}__text {
18434
+ .${prefix}__text {
18281
18435
  color: ${textColor};
18282
18436
  background-color: ${backgroundColor};
18283
18437
  text-align: center;
@@ -18290,9 +18444,9 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18290
18444
  gap: 10px;
18291
18445
  padding: 0 10px;
18292
18446
  box-sizing: border-box;
18293
- }
18447
+ }
18294
18448
 
18295
- .${prefix}__header {
18449
+ .${prefix}__header {
18296
18450
  color: inherit;
18297
18451
  margin: 0;
18298
18452
  font-size: 18px;
@@ -18300,18 +18454,18 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18300
18454
  font-style: normal;
18301
18455
  font-weight: 700;
18302
18456
  line-height: normal;
18303
- }
18457
+ }
18304
18458
 
18305
- .${prefix}__description {
18459
+ .${prefix}__description {
18306
18460
  color: inherit;
18307
18461
  margin: 0;
18308
18462
  font-size: 10px;
18309
18463
  font-family: "Source Sans 3", system-ui;
18310
18464
  font-style: normal;
18311
18465
  font-weight: 400;
18312
- }
18466
+ }
18313
18467
 
18314
- .${prefix}__cta-button {
18468
+ .${prefix}__cta-button {
18315
18469
  color: ${ctaTextColor};
18316
18470
  background-color: transparent;
18317
18471
  font-size: 8px;
@@ -18325,266 +18479,319 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18325
18479
  cursor: pointer;
18326
18480
  padding: 0;
18327
18481
  transition: opacity 0.3s ease;
18328
- }
18482
+ }
18329
18483
 
18330
- .${prefix}__content:hover .${prefix}__cta-button {
18484
+ .${prefix}__content:hover .${prefix}__cta-button {
18331
18485
  opacity: 0.8;
18332
- }
18486
+ }
18333
18487
 
18334
- @container (min-width: 640px) {
18488
+ @container (min-width: 640px) {
18335
18489
  .${prefix}__primary-image {
18336
- background-image: url("${primaryImage}");
18490
+ background-image: url("${primaryImage}");
18337
18491
  }
18338
18492
 
18339
18493
  .${prefix}__secondary-image {
18340
- background-image: url("${secondaryImage}");
18494
+ background-image: url("${secondaryImage}");
18341
18495
  }
18342
- }
18496
+ }
18343
18497
 
18344
- @container (min-width: 768px) {
18498
+ @container (min-width: 768px) {
18345
18499
  .${prefix}__content {
18346
- flex-direction: row;
18500
+ flex-direction: row;
18501
+ }
18502
+
18503
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.LEFT} {
18504
+ flex-direction: row;
18347
18505
  }
18348
18506
 
18349
18507
  .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.RIGHT} {
18350
- flex-direction: row-reverse;
18508
+ flex-direction: row-reverse;
18351
18509
  }
18352
18510
 
18353
18511
  .${prefix}__primary-image {
18354
- width: 66.66666%;
18355
- height: 100%;
18512
+ width: 66.66666%;
18513
+ height: 100%;
18356
18514
  }
18357
18515
 
18358
18516
  .${prefix}__main {
18359
- flex-direction: column;
18360
- height: 100%;
18361
- width: 33.33333%;
18362
- }
18363
-
18364
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.RIGHT} .${prefix}__main {
18365
- flex-direction: column;
18517
+ flex-direction: column;
18518
+ height: 100%;
18519
+ width: 33.33333%;
18366
18520
  }
18367
18521
 
18368
18522
  .${prefix}__secondary-image {
18369
- width: 100%;
18370
- height: 50%;
18523
+ width: 100%;
18524
+ height: 50%;
18371
18525
  }
18372
18526
 
18373
18527
  .${prefix}__text {
18374
- width: 100%;
18375
- height: 50%;
18528
+ width: 100%;
18529
+ height: 50%;
18376
18530
  }
18377
18531
 
18378
18532
  .${prefix}__header {
18379
- font-size: 22px;
18533
+ font-size: 22px;
18380
18534
  }
18381
18535
 
18382
18536
  .${prefix}__description {
18383
- font-size: 12px;
18537
+ font-size: 12px;
18384
18538
  }
18385
18539
 
18386
18540
  .${prefix}__cta-button {
18387
- font-size: 12px;
18541
+ font-size: 12px;
18388
18542
  }
18389
- }
18543
+ }
18390
18544
 
18391
- @container (min-width: 1024px) {
18545
+ @container (min-width: 1024px) {
18392
18546
  .${prefix}__header {
18393
- font-size: 24px;
18547
+ font-size: 24px;
18394
18548
  }
18395
18549
  .${prefix}__description {
18396
- font-size: 13px;
18550
+ font-size: 13px;
18397
18551
  }
18398
18552
  .${prefix}__cta-button {
18399
18553
  font-size: 13px;
18400
18554
  }
18401
- }
18555
+ }
18402
18556
 
18403
- @container (min-width: 1280px) {
18557
+ @container (min-width: 1280px) {
18404
18558
  .${prefix}__header {
18405
- font-size: 28px;
18559
+ font-size: 28px;
18406
18560
  }
18407
18561
  .${prefix}__description {
18408
- font-size: 14px;
18562
+ font-size: 14px;
18409
18563
  }
18410
18564
  .${prefix}__cta-button {
18411
- font-size: 14px;
18565
+ font-size: 14px;
18412
18566
  }
18413
- }
18567
+ }
18414
18568
  `;
18415
18569
  }
18570
+ get hasContent() {
18571
+ const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
18572
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18573
+ enableMobileTexts = false, } = this._data;
18574
+ const content = this._isMobileDevice && enableMobileTexts
18575
+ ? {
18576
+ header: mobileHeader,
18577
+ description: mobileDescription,
18578
+ ctaText: mobileCtaText,
18579
+ }
18580
+ : { header, description, ctaText };
18581
+ return Object.values(content).some(Boolean);
18582
+ }
18416
18583
  }
18417
18584
 
18418
18585
  class RbHomepageHeroTwoTileSE extends BaseSpotComponent {
18419
18586
  constructor() {
18420
18587
  super();
18588
+ this.reRenderOnDeviceChange = true;
18421
18589
  }
18422
18590
  template() {
18423
18591
  const prefix = this._config.prefix;
18424
- const { header, description, ctaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.LEFT, } = this._data;
18592
+ const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.LEFT, mobileTextBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.TOP,
18593
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18594
+ enableMobileTexts = false, } = this._data;
18595
+ const content = this._isMobileDevice && enableMobileTexts
18596
+ ? {
18597
+ header: mobileHeader,
18598
+ description: mobileDescription,
18599
+ ctaText: mobileCtaText,
18600
+ }
18601
+ : { header, description, ctaText };
18602
+ const elements = this.hasContent
18603
+ ? [
18604
+ renderElement('h2', `${prefix}__header`, content.header),
18605
+ renderElement('p', `${prefix}__description`, content.description),
18606
+ renderElement('span', `${prefix}__cta-button`, content.ctaText),
18607
+ ]
18608
+ : [];
18425
18609
  return `
18426
- ${GFONT_PRECONNECT}
18427
- ${GFONT_SOURCE_SANS_3}
18428
- ${GFONT_CORMORANT}
18610
+ ${importFonts()}
18429
18611
  <div class="${prefix}">
18430
- <div class="${prefix}__content ${prefix}__text-block--${textBlockPosition}">
18612
+ <div class="${prefix}__content ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
18431
18613
  <div class="${prefix}__text">
18432
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18433
- ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
18434
- ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
18614
+ ${elements.join('')}
18435
18615
  </div>
18436
18616
  <div class="${prefix}__image"></div>
18437
18617
  </div>
18438
18618
  </div>
18439
- `;
18619
+ `;
18440
18620
  }
18441
18621
  styles() {
18442
18622
  const { textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
18443
18623
  const prefix = this._config.prefix;
18444
18624
  return `
18445
- .${prefix} {
18446
- width: 100%;
18447
- height: 100%;
18448
- background-color: transparent;
18449
- cursor: pointer;
18450
- position: relative;
18451
- }
18625
+ .${prefix} {
18626
+ width: 100%;
18627
+ height: 100%;
18628
+ background-color: transparent;
18629
+ cursor: pointer;
18630
+ position: relative;
18631
+ }
18452
18632
 
18453
- .${prefix}__content {
18454
- width: 100%;
18455
- height: 100%;
18456
- display: flex;
18457
- flex-direction: column-reverse;
18458
- background-color: transparent;
18459
- gap: 6px;
18460
- }
18633
+ .${prefix}__content {
18634
+ width: 100%;
18635
+ height: 100%;
18636
+ display: flex;
18637
+ flex-direction: column-reverse;
18638
+ background-color: transparent;
18639
+ gap: 6px;
18640
+ }
18461
18641
 
18462
- .${prefix}__image {
18463
- width: 100%;
18464
- height: 100%;
18465
- background-image: url("${mobilePrimaryImage}");
18466
- background-position: center;
18467
- background-repeat: no-repeat;
18468
- background-size: cover;
18469
- }
18642
+ .${prefix}__image {
18643
+ width: 100%;
18644
+ height: 100%;
18645
+ background-image: url("${mobilePrimaryImage}");
18646
+ background-position: center;
18647
+ background-repeat: no-repeat;
18648
+ background-size: cover;
18649
+ }
18470
18650
 
18471
- .${prefix}__text {
18472
- color: ${textColor};
18473
- background-color: ${backgroundColor};
18474
- text-align: center;
18475
- display: flex;
18476
- flex-direction: column;
18477
- justify-content: center;
18478
- align-items: center;
18479
- width: 100%;
18480
- height: 100%;
18481
- gap: 10px;
18482
- padding: 0 10px;
18483
- box-sizing: border-box;
18484
- }
18651
+ .${prefix}__text {
18652
+ color: ${textColor};
18653
+ background-color: ${backgroundColor};
18654
+ text-align: center;
18655
+ display: flex;
18656
+ flex-direction: column;
18657
+ justify-content: center;
18658
+ align-items: center;
18659
+ width: 100%;
18660
+ height: 100%;
18661
+ gap: 10px;
18662
+ padding: 0 10px;
18663
+ box-sizing: border-box;
18664
+ }
18485
18665
 
18486
- .${prefix}__header {
18487
- font-size: 18px;
18488
- margin: 0;
18489
- color: inherit;
18490
- font-family: "Cormorant", system-ui;
18491
- font-style: normal;
18492
- font-weight: 700;
18493
- line-height: normal;
18494
- }
18666
+ @container (max-width: 767px) {
18667
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM} {
18668
+ flex-direction: column-reverse;
18669
+ }
18495
18670
 
18496
- .${prefix}__description {
18497
- color: inherit;
18498
- margin: 0;
18499
- font-size: 10px;
18500
- font-family: "Source Sans 3", system-ui;
18501
- font-style: normal;
18502
- font-weight: 400;
18503
- }
18671
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.TOP} {
18672
+ flex-direction: column;
18673
+ }
18674
+ }
18504
18675
 
18505
- .${prefix}__cta-button {
18506
- color: ${ctaTextColor};
18507
- background-color: transparent;
18508
- font-size: 8px;
18509
- font-style: normal;
18510
- font-weight: 700;
18511
- font-family: "Source Sans 3", system-ui;
18512
- text-decoration-line: underline;
18513
- text-transform: uppercase;
18514
- letter-spacing: 1.4px;
18515
- border: none;
18516
- cursor: pointer;
18517
- padding: 0;
18518
- transition: opacity 0.3s ease;
18519
- }
18676
+ .${prefix}__header {
18677
+ font-size: 18px;
18678
+ margin: 0;
18679
+ color: inherit;
18680
+ font-family: "Cormorant", system-ui;
18681
+ font-style: normal;
18682
+ font-weight: 700;
18683
+ line-height: normal;
18684
+ }
18520
18685
 
18521
- .${prefix}__content:hover .${prefix}__cta-button {
18522
- opacity: 0.8;
18523
- }
18686
+ .${prefix}__description {
18687
+ color: inherit;
18688
+ margin: 0;
18689
+ font-size: 10px;
18690
+ font-family: "Source Sans 3", system-ui;
18691
+ font-style: normal;
18692
+ font-weight: 400;
18693
+ }
18524
18694
 
18525
- @container (min-width: 640px) {
18526
- .${prefix}__image {
18527
- background-image: url("${primaryImage}");
18528
- }
18529
- }
18695
+ .${prefix}__cta-button {
18696
+ color: ${ctaTextColor};
18697
+ background-color: transparent;
18698
+ font-size: 8px;
18699
+ font-style: normal;
18700
+ font-weight: 700;
18701
+ font-family: "Source Sans 3", system-ui;
18702
+ text-decoration-line: underline;
18703
+ text-transform: uppercase;
18704
+ letter-spacing: 1.4px;
18705
+ border: none;
18706
+ cursor: pointer;
18707
+ padding: 0;
18708
+ transition: opacity 0.3s ease;
18709
+ }
18530
18710
 
18531
- @container (min-width: 768px) {
18532
- .${prefix}__content {
18533
- flex-direction: row;
18534
- }
18711
+ .${prefix}__content:hover .${prefix}__cta-button {
18712
+ opacity: 0.8;
18713
+ }
18535
18714
 
18536
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.RIGHT} {
18537
- flex-direction: row-reverse;
18538
- }
18715
+ @container (min-width: 640px) {
18716
+ .${prefix}__image {
18717
+ background-image: url("${primaryImage}");
18718
+ }
18719
+ }
18539
18720
 
18540
- .${prefix}__image {
18541
- width: 66.66666%;
18542
- height: 100%;
18543
- }
18721
+ @container (min-width: 768px) {
18722
+ .${prefix}__content {
18723
+ flex-direction: row;
18724
+ }
18544
18725
 
18545
- .${prefix}__text {
18546
- width: 33.33333%;
18547
- height: 100%;
18548
- }
18726
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.LEFT} {
18727
+ flex-direction: row;
18728
+ }
18549
18729
 
18550
- .${prefix}__header {
18551
- font-size: 22px;
18552
- }
18730
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.RIGHT} {
18731
+ flex-direction: row-reverse;
18732
+ }
18553
18733
 
18554
- .${prefix}__description {
18555
- font-size: 12px;
18556
- }
18734
+ .${prefix}__image {
18735
+ width: 66.66666%;
18736
+ height: 100%;
18737
+ }
18557
18738
 
18558
- .${prefix}__cta-button {
18559
- font-size: 12px;
18560
- }
18561
- }
18739
+ .${prefix}__text {
18740
+ width: 33.33333%;
18741
+ height: 100%;
18742
+ }
18562
18743
 
18563
- @container (min-width: 1024px) {
18564
- .${prefix}__header {
18565
- font-size: 24px;
18566
- }
18567
- .${prefix}__description {
18568
- font-size: 13px;
18569
- }
18570
- .${prefix}__cta-button {
18571
- font-size: 13px;
18572
- }
18573
- }
18744
+ .${prefix}__header {
18745
+ font-size: 22px;
18746
+ }
18574
18747
 
18575
- @container (min-width: 1280px) {
18576
- .${prefix}__header {
18577
- font-size: 28px;
18578
- }
18579
- .${prefix}__description {
18580
- font-size: 14px;
18581
- }
18582
- .${prefix}__cta-button {
18583
- font-size: 14px;
18584
- }
18585
- }
18748
+ .${prefix}__description {
18749
+ font-size: 12px;
18750
+ }
18751
+
18752
+ .${prefix}__cta-button {
18753
+ font-size: 12px;
18754
+ }
18755
+ }
18756
+
18757
+ @container (min-width: 1024px) {
18758
+ .${prefix}__header {
18759
+ font-size: 24px;
18760
+ }
18761
+ .${prefix}__description {
18762
+ font-size: 13px;
18763
+ }
18764
+ .${prefix}__cta-button {
18765
+ font-size: 13px;
18766
+ }
18767
+ }
18768
+
18769
+ @container (min-width: 1280px) {
18770
+ .${prefix}__header {
18771
+ font-size: 28px;
18772
+ }
18773
+ .${prefix}__description {
18774
+ font-size: 14px;
18775
+ }
18776
+ .${prefix}__cta-button {
18777
+ font-size: 14px;
18778
+ }
18779
+ }
18586
18780
  `;
18587
18781
  }
18782
+ get hasContent() {
18783
+ const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
18784
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18785
+ enableMobileTexts = false, } = this._data;
18786
+ const content = this._isMobileDevice && enableMobileTexts
18787
+ ? {
18788
+ header: mobileHeader,
18789
+ description: mobileDescription,
18790
+ ctaText: mobileCtaText,
18791
+ }
18792
+ : { header, description, ctaText };
18793
+ return Object.values(content).some(Boolean);
18794
+ }
18588
18795
  }
18589
18796
 
18590
18797
  class RbInTextSE extends BaseSpotComponent {
@@ -18629,22 +18836,39 @@ class RbInTextSE extends BaseSpotComponent {
18629
18836
  class RbLargeCategoryImageToutSE extends BaseSpotComponent {
18630
18837
  constructor() {
18631
18838
  super();
18839
+ this.reRenderOnDeviceChange = true;
18632
18840
  }
18633
18841
  template() {
18634
18842
  const prefix = this._config.prefix;
18635
- const { header, description, ctaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.LEFT, } = this._data;
18843
+ const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.LEFT,
18844
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18845
+ enableMobileTexts = false, } = this._data;
18846
+ const content = this._isMobileDevice && enableMobileTexts
18847
+ ? {
18848
+ header: mobileHeader,
18849
+ description: mobileDescription,
18850
+ ctaText: mobileCtaText,
18851
+ }
18852
+ : { header, description, ctaText };
18853
+ if (!this.hasContent) {
18854
+ return `
18855
+ ${importFonts()}
18856
+ <div class="${prefix}"></div>
18857
+ `;
18858
+ }
18859
+ const elements = [
18860
+ renderElement('h2', `${prefix}__header`, content.header),
18861
+ renderElement('p', `${prefix}__description`, content.description),
18862
+ renderElement('span', `${prefix}__cta-button`, content.ctaText),
18863
+ ];
18636
18864
  return `
18637
- ${GFONT_PRECONNECT}
18638
- ${GFONT_SOURCE_SANS_3}
18639
- ${GFONT_CORMORANT}
18640
- <div class="${prefix}">
18641
- <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition}">
18642
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18643
- ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
18644
- ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
18865
+ ${importFonts()}
18866
+ <div class="${prefix}">
18867
+ <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition}">
18868
+ ${elements.join('')}
18869
+ </div>
18645
18870
  </div>
18646
- </div>
18647
- `;
18871
+ `;
18648
18872
  }
18649
18873
  styles() {
18650
18874
  const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
@@ -18657,7 +18881,9 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
18657
18881
  display: flex;
18658
18882
  flex-direction: column;
18659
18883
  justify-content: flex-end;
18660
- background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");
18884
+ ${this.hasContent
18885
+ ? `background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");`
18886
+ : `background-image: url("${mobilePrimaryImage}");`}
18661
18887
  background-size: cover;
18662
18888
  background-repeat: no-repeat;
18663
18889
  background-position: center;
@@ -18733,7 +18959,9 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
18733
18959
 
18734
18960
  @container (min-width: 640px) {
18735
18961
  .${prefix} {
18736
- background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");
18962
+ ${this.hasContent
18963
+ ? `background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");`
18964
+ : `background-image: url("${primaryImage}");`}
18737
18965
  }
18738
18966
  }
18739
18967
 
@@ -18781,25 +19009,56 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
18781
19009
  }
18782
19010
  `;
18783
19011
  }
19012
+ get hasContent() {
19013
+ const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
19014
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19015
+ enableMobileTexts = false, } = this._data;
19016
+ const content = this._isMobileDevice && enableMobileTexts
19017
+ ? {
19018
+ header: mobileHeader,
19019
+ description: mobileDescription,
19020
+ ctaText: mobileCtaText,
19021
+ }
19022
+ : { header, description, ctaText };
19023
+ return Object.values(content).some(Boolean);
19024
+ }
18784
19025
  }
18785
19026
 
18786
19027
  class RbLongToutShortSE extends BaseSpotComponent {
18787
19028
  constructor() {
18788
19029
  super();
19030
+ this.reRenderOnDeviceChange = true;
18789
19031
  }
18790
19032
  template() {
18791
19033
  const prefix = this._config.prefix;
18792
- const { preHeader, header, description, ctaText } = this._data;
19034
+ const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
19035
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19036
+ enableMobileTexts = false, } = this._data;
19037
+ const content = this._isMobileDevice && enableMobileTexts
19038
+ ? {
19039
+ preHeader: mobilePreHeader,
19040
+ header: mobileHeader,
19041
+ description: mobileDescription,
19042
+ ctaText: mobileCtaText,
19043
+ }
19044
+ : { preHeader, header, description, ctaText };
19045
+ if (!this.hasContent) {
19046
+ return `
19047
+ ${importFonts()}
19048
+ <div class="${prefix}"></div>
19049
+ `;
19050
+ }
19051
+ const elements = [
19052
+ renderElement('h2', `${prefix}__pre-header`, content.preHeader),
19053
+ renderElement('h2', `${prefix}__header`, content.header),
19054
+ renderElement('p', `${prefix}__description`, content.description),
19055
+ renderElement('span', `${prefix}__cta-button`, content.ctaText),
19056
+ ];
18793
19057
  return `
18794
- ${GFONT_PRECONNECT}
18795
- ${GFONT_SOURCE_SANS_3}
18796
- ${GFONT_CORMORANT}
19058
+ ${importFonts()}
18797
19059
  <div class="${prefix}">
18798
19060
  <div class="${prefix}__text">
18799
- ${preHeader ? `<h2 class="${prefix}__pre-header">${preHeader}</h2>` : ''}
18800
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18801
- ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
18802
- ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
19061
+ ${elements.join('')}
18803
19062
  </div>
18804
19063
  </div>
18805
19064
  `;
@@ -18945,11 +19204,26 @@ class RbLongToutShortSE extends BaseSpotComponent {
18945
19204
  }
18946
19205
  `;
18947
19206
  }
19207
+ get hasContent() {
19208
+ const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
19209
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19210
+ enableMobileTexts = false, } = this._data;
19211
+ const content = this._isMobileDevice && enableMobileTexts
19212
+ ? {
19213
+ preHeader: mobilePreHeader,
19214
+ header: mobileHeader,
19215
+ description: mobileDescription,
19216
+ ctaText: mobileCtaText,
19217
+ }
19218
+ : { preHeader, header, description, ctaText };
19219
+ return Object.values(content).some(Boolean);
19220
+ }
18948
19221
  }
18949
19222
 
18950
19223
  class RbLongToutTallSE extends BaseSpotComponent {
18951
19224
  constructor() {
18952
19225
  super();
19226
+ this.reRenderOnDeviceChange = true;
18953
19227
  }
18954
19228
  getGradientDirection(position) {
18955
19229
  switch (position) {
@@ -18969,24 +19243,44 @@ class RbLongToutTallSE extends BaseSpotComponent {
18969
19243
  }
18970
19244
  template() {
18971
19245
  const prefix = this._config.prefix;
18972
- const { preHeader, header, description, ctaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, } = this._data;
19246
+ const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, mobileTextBlockPosition = textBlockPosition,
19247
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19248
+ enableMobileTexts = false, } = this._data;
19249
+ const content = this._isMobileDevice && enableMobileTexts
19250
+ ? {
19251
+ preHeader: mobilePreHeader,
19252
+ header: mobileHeader,
19253
+ description: mobileDescription,
19254
+ ctaText: mobileCtaText,
19255
+ }
19256
+ : { preHeader, header, description, ctaText };
19257
+ if (!this.hasContent) {
19258
+ return `
19259
+ ${importFonts()}
19260
+ <div class="${prefix}"></div>
19261
+ `;
19262
+ }
19263
+ const elements = [
19264
+ renderElement('h2', `${prefix}__pre-header`, content.preHeader),
19265
+ renderElement('h2', `${prefix}__header`, content.header),
19266
+ renderElement('p', `${prefix}__description`, content.description),
19267
+ renderElement('span', `${prefix}__cta-button`, content.ctaText),
19268
+ ];
18973
19269
  return `
18974
- ${GFONT_PRECONNECT}
18975
- ${GFONT_SOURCE_SANS_3}
18976
- ${GFONT_CORMORANT}
18977
- <div class="${prefix}">
18978
- <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition.toLowerCase().replace('_', '-')}">
18979
- ${preHeader ? `<h2 class="${prefix}__pre-header">${preHeader}</h2>` : ''}
18980
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18981
- ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
18982
- ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
19270
+ ${GFONT_PRECONNECT}
19271
+ ${GFONT_SOURCE_SANS_3}
19272
+ ${GFONT_CORMORANT}
19273
+ <div class="${prefix}">
19274
+ <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
19275
+ ${elements.join('')}
19276
+ </div>
18983
19277
  </div>
18984
- </div>
18985
- `;
19278
+ `;
18986
19279
  }
18987
19280
  styles() {
18988
- const { textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT } = this._data;
18989
- const gradientDirection = this.getGradientDirection(textBlockPosition);
19281
+ const { textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, mobileTextBlockPosition = textBlockPosition, } = this._data;
19282
+ const desktopGradientDirection = this.getGradientDirection(textBlockPosition);
19283
+ const mobileGradientDirection = this.getGradientDirection(mobileTextBlockPosition);
18990
19284
  const linearGradient = generateGradientColor(this._config.overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
18991
19285
  const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
18992
19286
  const prefix = this._config.prefix;
@@ -18995,7 +19289,9 @@ class RbLongToutTallSE extends BaseSpotComponent {
18995
19289
  display: flex;
18996
19290
  width: 100%;
18997
19291
  height: 100%;
18998
- background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");
19292
+ ${this.hasContent
19293
+ ? `background-image: linear-gradient(${mobileGradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");`
19294
+ : `background-image: url("${mobilePrimaryImage}");`}
18999
19295
  background-size: cover;
19000
19296
  background-repeat: no-repeat;
19001
19297
  background-position: center;
@@ -19017,48 +19313,106 @@ class RbLongToutTallSE extends BaseSpotComponent {
19017
19313
  position: absolute;
19018
19314
  }
19019
19315
 
19020
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
19021
- top: 3%;
19022
- left: 3%;
19023
- align-items: flex-start;
19024
- text-align: left;
19025
- }
19316
+ @container (max-width: 639px) {
19317
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
19318
+ top: 3%;
19319
+ left: 3%;
19320
+ align-items: flex-start;
19321
+ text-align: left;
19322
+ }
19026
19323
 
19027
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
19028
- top: 3%;
19029
- right: 3%;
19030
- align-items: flex-end;
19031
- text-align: right;
19032
- }
19324
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
19325
+ top: 3%;
19326
+ right: 3%;
19327
+ align-items: flex-end;
19328
+ text-align: right;
19329
+ }
19033
19330
 
19034
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
19035
- top: 50%;
19036
- left: 3%;
19037
- transform: translateY(-50%);
19038
- align-items: flex-start;
19039
- text-align: left;
19040
- }
19331
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
19332
+ top: 50%;
19333
+ left: 3%;
19334
+ transform: translateY(-50%);
19335
+ align-items: flex-start;
19336
+ text-align: left;
19337
+ }
19041
19338
 
19042
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
19043
- top: 50%;
19044
- right: 3%;
19045
- transform: translateY(-50%);
19046
- align-items: flex-end;
19047
- text-align: right;
19048
- }
19339
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
19340
+ top: 50%;
19341
+ right: 3%;
19342
+ transform: translateY(-50%);
19343
+ align-items: flex-end;
19344
+ text-align: right;
19345
+ }
19049
19346
 
19050
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
19051
- bottom: 3%;
19052
- left: 3%;
19053
- align-items: flex-start;
19054
- text-align: left;
19347
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
19348
+ bottom: 3%;
19349
+ left: 3%;
19350
+ align-items: flex-start;
19351
+ text-align: left;
19352
+ }
19353
+
19354
+ .${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
19355
+ bottom: 3%;
19356
+ right: 3%;
19357
+ align-items: flex-end;
19358
+ text-align: right;
19359
+ }
19055
19360
  }
19056
19361
 
19057
- .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
19058
- bottom: 3%;
19059
- right: 3%;
19060
- align-items: flex-end;
19061
- text-align: right;
19362
+ @container (min-width: 640px) {
19363
+ .${prefix} {
19364
+ ${this.hasContent
19365
+ ? `background-image: linear-gradient(${desktopGradientDirection}, ${linearGradient}), url("${primaryImage}");`
19366
+ : `background-image: url("${primaryImage}");`}
19367
+ }
19368
+
19369
+ .${prefix}__text {
19370
+ width: 70%;
19371
+ }
19372
+
19373
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
19374
+ top: 3%;
19375
+ left: 3%;
19376
+ align-items: flex-start;
19377
+ text-align: left;
19378
+ }
19379
+
19380
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
19381
+ top: 3%;
19382
+ right: 3%;
19383
+ align-items: flex-end;
19384
+ text-align: right;
19385
+ }
19386
+
19387
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
19388
+ top: 50%;
19389
+ left: 3%;
19390
+ transform: translateY(-50%);
19391
+ align-items: flex-start;
19392
+ text-align: left;
19393
+ }
19394
+
19395
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
19396
+ top: 50%;
19397
+ right: 3%;
19398
+ transform: translateY(-50%);
19399
+ align-items: flex-end;
19400
+ text-align: right;
19401
+ }
19402
+
19403
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
19404
+ bottom: 3%;
19405
+ left: 3%;
19406
+ align-items: flex-start;
19407
+ text-align: left;
19408
+ }
19409
+
19410
+ .${prefix}__text-block--${exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
19411
+ bottom: 3%;
19412
+ right: 3%;
19413
+ align-items: flex-end;
19414
+ text-align: right;
19415
+ }
19062
19416
  }
19063
19417
 
19064
19418
  .${prefix}__pre-header {
@@ -19106,16 +19460,6 @@ class RbLongToutTallSE extends BaseSpotComponent {
19106
19460
  background-color: ${ctaBorderColor.length === 7 ? `${ctaBorderColor}15` : `${ctaBorderColor}`};
19107
19461
  }
19108
19462
 
19109
- @container (min-width: 640px) {
19110
- .${prefix} {
19111
- background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${primaryImage}");
19112
- }
19113
-
19114
- .${prefix}__text {
19115
- width: 70%;
19116
- }
19117
- }
19118
-
19119
19463
  @container (min-width: 768px) {
19120
19464
  .${prefix}__description {
19121
19465
  font-size: 12px;
@@ -19155,22 +19499,50 @@ class RbLongToutTallSE extends BaseSpotComponent {
19155
19499
  }
19156
19500
  `;
19157
19501
  }
19502
+ get hasContent() {
19503
+ const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
19504
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19505
+ enableMobileTexts = false, } = this._data;
19506
+ const content = this._isMobileDevice && enableMobileTexts
19507
+ ? {
19508
+ preHeader: mobilePreHeader,
19509
+ header: mobileHeader,
19510
+ description: mobileDescription,
19511
+ ctaText: mobileCtaText,
19512
+ }
19513
+ : { preHeader, header, description, ctaText };
19514
+ return Object.values(content).some(Boolean);
19515
+ }
19158
19516
  }
19159
19517
 
19160
19518
  class RbNavigationBannerSE extends BaseSpotComponent {
19161
19519
  constructor() {
19162
19520
  super();
19521
+ this.reRenderOnDeviceChange = true;
19163
19522
  }
19164
19523
  template() {
19165
19524
  const prefix = this._config.prefix;
19166
- const { header } = this._data;
19525
+ const { header, mobileHeader,
19526
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19527
+ enableMobileTexts = false, } = this._data;
19528
+ const content = this._isMobileDevice && enableMobileTexts
19529
+ ? {
19530
+ header: mobileHeader,
19531
+ }
19532
+ : { header };
19533
+ if (!this.hasContent) {
19534
+ return `
19535
+ ${importFonts('sourceSans')}
19536
+ <div class="${prefix}"></div>
19537
+ `;
19538
+ }
19539
+ const elements = [renderElement('h2', `${prefix}__header`, content.header)];
19167
19540
  return `
19168
- ${GFONT_PRECONNECT}
19169
- ${GFONT_SOURCE_SANS_3}
19170
- <div class="${prefix}">
19171
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
19172
- </div>
19173
- `;
19541
+ ${importFonts('sourceSans')}
19542
+ <div class="${prefix}">
19543
+ ${elements.join('')}
19544
+ </div>
19545
+ `;
19174
19546
  }
19175
19547
  styles() {
19176
19548
  const { textColor = '#ffffff', primaryImage, mobilePrimaryImage = primaryImage } = this._data;
@@ -19186,7 +19558,9 @@ class RbNavigationBannerSE extends BaseSpotComponent {
19186
19558
  border-radius: 5px;
19187
19559
  overflow: hidden;
19188
19560
  cursor: pointer;
19189
- background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");
19561
+ ${this.hasContent
19562
+ ? `background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");`
19563
+ : `background-image: url("${mobilePrimaryImage}");`}
19190
19564
  background-size: cover;
19191
19565
  background-position: center;
19192
19566
  background-repeat: no-repeat;
@@ -19206,7 +19580,9 @@ class RbNavigationBannerSE extends BaseSpotComponent {
19206
19580
 
19207
19581
  @container (min-width: 640px) {
19208
19582
  .${prefix} {
19209
- background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");
19583
+ ${this.hasContent
19584
+ ? `background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");`
19585
+ : `background-image: url("${primaryImage}");`}
19210
19586
  }
19211
19587
  }
19212
19588
 
@@ -19229,22 +19605,47 @@ class RbNavigationBannerSE extends BaseSpotComponent {
19229
19605
  }
19230
19606
  `;
19231
19607
  }
19608
+ get hasContent() {
19609
+ const { header, mobileHeader,
19610
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19611
+ enableMobileTexts = false, } = this._data;
19612
+ const content = this._isMobileDevice && enableMobileTexts
19613
+ ? {
19614
+ header: mobileHeader,
19615
+ }
19616
+ : { header };
19617
+ return Object.values(content).some(Boolean);
19618
+ }
19232
19619
  }
19233
19620
 
19234
19621
  class RbSmallCategoryImageToutSE extends BaseSpotComponent {
19235
19622
  constructor() {
19236
19623
  super();
19624
+ this.reRenderOnDeviceChange = true;
19237
19625
  }
19238
19626
  template() {
19239
19627
  const prefix = this._config.prefix;
19240
- const { header } = this._data;
19628
+ const { header, mobileHeader,
19629
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19630
+ enableMobileTexts = false, } = this._data;
19631
+ const content = this._isMobileDevice && enableMobileTexts
19632
+ ? {
19633
+ header: mobileHeader,
19634
+ }
19635
+ : { header };
19636
+ if (!this.hasContent) {
19637
+ return `
19638
+ ${importFonts('cormorant')}
19639
+ <div class="${prefix}"></div>
19640
+ `;
19641
+ }
19642
+ const elements = [renderElement('h2', `${prefix}__header`, content.header)];
19241
19643
  return `
19242
- ${GFONT_PRECONNECT}
19243
- ${GFONT_CORMORANT}
19244
- <div class="${prefix}">
19245
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
19246
- </div>
19247
- `;
19644
+ ${importFonts('cormorant')}
19645
+ <div class="${prefix}">
19646
+ ${elements.join('')}
19647
+ </div>
19648
+ `;
19248
19649
  }
19249
19650
  styles() {
19250
19651
  const { textColor = '#ffffff', primaryImage, mobilePrimaryImage = primaryImage } = this._data;
@@ -19257,7 +19658,9 @@ class RbSmallCategoryImageToutSE extends BaseSpotComponent {
19257
19658
  display: flex;
19258
19659
  flex-direction: column;
19259
19660
  justify-content: flex-end;
19260
- background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");
19661
+ ${this.hasContent
19662
+ ? `background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");`
19663
+ : `background-image: url("${mobilePrimaryImage}");`}
19261
19664
  background-size: cover;
19262
19665
  background-repeat: no-repeat;
19263
19666
  background-position: center;
@@ -19280,30 +19683,51 @@ class RbSmallCategoryImageToutSE extends BaseSpotComponent {
19280
19683
 
19281
19684
  @container (min-width: 640px) {
19282
19685
  .${prefix} {
19283
- background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");
19686
+ ${this.hasContent
19687
+ ? `background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");`
19688
+ : `background-image: url("${primaryImage}");`}
19284
19689
  }
19285
19690
  }
19286
19691
  `;
19287
19692
  }
19693
+ get hasContent() {
19694
+ const { header, mobileHeader,
19695
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19696
+ enableMobileTexts = false, } = this._data;
19697
+ const content = this._isMobileDevice && enableMobileTexts
19698
+ ? {
19699
+ header: mobileHeader,
19700
+ }
19701
+ : { header };
19702
+ return Object.values(content).some(Boolean);
19703
+ }
19288
19704
  }
19289
19705
 
19290
19706
  class RbSmallDiscoverToutSE extends BaseSpotComponent {
19291
19707
  constructor() {
19292
19708
  super();
19709
+ this.reRenderOnDeviceChange = true;
19293
19710
  }
19294
19711
  template() {
19295
19712
  const prefix = this._config.prefix;
19296
- const { header } = this._data;
19713
+ const { header, mobileHeader,
19714
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19715
+ enableMobileTexts = false, } = this._data;
19716
+ const content = this._isMobileDevice && enableMobileTexts
19717
+ ? {
19718
+ header: mobileHeader,
19719
+ }
19720
+ : { header };
19721
+ const elements = [renderElement('h2', `${prefix}__header`, content.header)];
19297
19722
  return `
19298
- ${GFONT_PRECONNECT}
19299
- ${GFONT_CORMORANT}
19300
- <div class="${prefix}">
19301
- <div class="${prefix}__image"></div>
19302
- <div class="${prefix}__text">
19303
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
19723
+ ${importFonts('sourceSans')}
19724
+ <div class="${prefix}">
19725
+ <div class="${prefix}__image"></div>
19726
+ <div class="${prefix}__text">
19727
+ ${elements.join('')}
19728
+ </div>
19304
19729
  </div>
19305
- </div>
19306
- `;
19730
+ `;
19307
19731
  }
19308
19732
  styles() {
19309
19733
  const { textColor = '#000000', backgroundColor = 'transparent', primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
@@ -19420,13 +19844,13 @@ class RbVideoPlayerSE extends BaseSpotComponent {
19420
19844
  if (!this.video)
19421
19845
  return;
19422
19846
  const muteButton = this._container.querySelector(this.muteButtonSelector());
19423
- muteButton === null || muteButton === void 0 ? void 0 : muteButton.addEventListener('click', this.handleMuteToggle);
19847
+ muteButton === null || muteButton === undefined ? undefined : muteButton.addEventListener('click', this.handleMuteToggle);
19424
19848
  }
19425
19849
  removeEventListeners() {
19426
19850
  if (!this.video)
19427
19851
  return;
19428
19852
  const muteButton = this._container.querySelector(this.muteButtonSelector());
19429
- muteButton === null || muteButton === void 0 ? void 0 : muteButton.removeEventListener('click', this.handleMuteToggle);
19853
+ muteButton === null || muteButton === undefined ? undefined : muteButton.removeEventListener('click', this.handleMuteToggle);
19430
19854
  }
19431
19855
  template() {
19432
19856
  const prefix = this._config.prefix;
@@ -19605,7 +20029,7 @@ class SpotTemplateService {
19605
20029
  const variantClasses = this.isRbSpot(spotType) ? this.rbTemplates : this.iabTemplates;
19606
20030
  if (!variantClasses)
19607
20031
  return null;
19608
- const spotClass = ((_a = variantClasses[spotType]) === null || _a === void 0 ? void 0 : _a[spotVariant]) || null;
20032
+ const spotClass = ((_a = variantClasses[spotType]) === null || _a === undefined ? undefined : _a[spotVariant]) || null;
19609
20033
  if (!spotClass)
19610
20034
  return null;
19611
20035
  return spotClass;
@@ -19939,7 +20363,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
19939
20363
  disconnectedCallback() {
19940
20364
  var _a;
19941
20365
  this.cleanupEventListeners();
19942
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
20366
+ (_a = this.resizeObserver) === null || _a === undefined ? undefined : _a.disconnect();
19943
20367
  }
19944
20368
  setupResizeObserver() {
19945
20369
  if (this.data && !this.data.fluid) {
@@ -19960,14 +20384,14 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
19960
20384
  */
19961
20385
  initializeState() {
19962
20386
  var _a, _b, _c, _d, _e, _f, _g, _h;
19963
- this.state.useDots = Boolean((_a = this.data) === null || _a === void 0 ? void 0 : _a.useDots);
19964
- this.state.useButtons = Boolean((_b = this.data) === null || _b === void 0 ? void 0 : _b.useButtons);
19965
- this.state.autoplay = (_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c.autoplay) !== null && _d !== void 0 ? _d : true;
19966
- this.state.interval = (_f = (_e = this.data) === null || _e === void 0 ? void 0 : _e.interval) !== null && _f !== void 0 ? _f : CustomCarouselElement.defaultConfigs.interval;
19967
- if (typeof ((_g = this.data) === null || _g === void 0 ? void 0 : _g.useDots) === 'object') {
20387
+ this.state.useDots = Boolean((_a = this.data) === null || _a === undefined ? undefined : _a.useDots);
20388
+ this.state.useButtons = Boolean((_b = this.data) === null || _b === undefined ? undefined : _b.useButtons);
20389
+ this.state.autoplay = (_d = (_c = this.data) === null || _c === undefined ? undefined : _c.autoplay) !== null && _d !== undefined ? _d : true;
20390
+ this.state.interval = (_f = (_e = this.data) === null || _e === undefined ? undefined : _e.interval) !== null && _f !== undefined ? _f : CustomCarouselElement.defaultConfigs.interval;
20391
+ if (typeof ((_g = this.data) === null || _g === undefined ? undefined : _g.useDots) === 'object') {
19968
20392
  this.state.dots = { ...this.state.dots, ...this.data.useDots };
19969
20393
  }
19970
- if (typeof ((_h = this.data) === null || _h === void 0 ? void 0 : _h.useButtons) === 'object') {
20394
+ if (typeof ((_h = this.data) === null || _h === undefined ? undefined : _h.useButtons) === 'object') {
19971
20395
  this.state.buttons = { ...this.state.buttons, ...this.data.useButtons };
19972
20396
  }
19973
20397
  this.validateConfiguration();
@@ -20431,7 +20855,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
20431
20855
  }
20432
20856
  this.state.isVirtualizing = false;
20433
20857
  // Force reflow to ensure the style change takes effect immediately
20434
- void ((_a = this.elements.slidesContainer) === null || _a === void 0 ? void 0 : _a.offsetHeight);
20858
+ void ((_a = this.elements.slidesContainer) === null || _a === undefined ? undefined : _a.offsetHeight);
20435
20859
  }
20436
20860
  /**
20437
20861
  * Updates dot active states
@@ -20540,8 +20964,8 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
20540
20964
  });
20541
20965
  }
20542
20966
  if (this.state.useButtons) {
20543
- (_a = this.elements.prevButton) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => this.handleNavigation('prev'));
20544
- (_b = this.elements.nextButton) === null || _b === void 0 ? void 0 : _b.addEventListener('click', () => this.handleNavigation('next'));
20967
+ (_a = this.elements.prevButton) === null || _a === undefined ? undefined : _a.addEventListener('click', () => this.handleNavigation('prev'));
20968
+ (_b = this.elements.nextButton) === null || _b === undefined ? undefined : _b.addEventListener('click', () => this.handleNavigation('next'));
20545
20969
  }
20546
20970
  }
20547
20971
  /**
@@ -20728,7 +21152,7 @@ class ElementService {
20728
21152
  const dimensions = SPOT_DIMENSIONS[params.spotType];
20729
21153
  skeleton.data = {
20730
21154
  spotType: params.spotType,
20731
- fluid: (params === null || params === void 0 ? void 0 : params.fluid) === undefined ? false : params.fluid,
21155
+ fluid: (params === null || params === undefined ? undefined : params.fluid) === undefined ? false : params.fluid,
20732
21156
  ...dimensions,
20733
21157
  };
20734
21158
  return skeleton;
@@ -20818,16 +21242,16 @@ class DataLayerMonitor {
20818
21242
  }
20819
21243
  extractProductData(event) {
20820
21244
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20821
- const items = ((_a = event === null || event === void 0 ? void 0 : event.value) === null || _a === void 0 ? void 0 : _a.items) ||
20822
- ((_b = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _b === void 0 ? void 0 : _b.items) ||
20823
- ((_c = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _c === void 0 ? void 0 : _c.products) ||
20824
- ((_e = (_d = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _d === void 0 ? void 0 : _d.detail) === null || _e === void 0 ? void 0 : _e.products) ||
20825
- ((_g = (_f = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _f === void 0 ? void 0 : _f.checkout) === null || _g === void 0 ? void 0 : _g.products) ||
20826
- ((_j = (_h = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _h === void 0 ? void 0 : _h.purchase) === null || _j === void 0 ? void 0 : _j.products) ||
20827
- ((_l = (_k = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _k === void 0 ? void 0 : _k.add) === null || _l === void 0 ? void 0 : _l.products) ||
20828
- ((_o = (_m = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _m === void 0 ? void 0 : _m.remove) === null || _o === void 0 ? void 0 : _o.products) ||
20829
- ((_q = (_p = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _p === void 0 ? void 0 : _p.click) === null || _q === void 0 ? void 0 : _q.products) ||
20830
- (event === null || event === void 0 ? void 0 : event.products) ||
21245
+ const items = ((_a = event === null || event === undefined ? undefined : event.value) === null || _a === undefined ? undefined : _a.items) ||
21246
+ ((_b = event === null || event === undefined ? undefined : event.ecommerce) === null || _b === undefined ? undefined : _b.items) ||
21247
+ ((_c = event === null || event === undefined ? undefined : event.ecommerce) === null || _c === undefined ? undefined : _c.products) ||
21248
+ ((_e = (_d = event === null || event === undefined ? undefined : event.ecommerce) === null || _d === undefined ? undefined : _d.detail) === null || _e === undefined ? undefined : _e.products) ||
21249
+ ((_g = (_f = event === null || event === undefined ? undefined : event.ecommerce) === null || _f === undefined ? undefined : _f.checkout) === null || _g === undefined ? undefined : _g.products) ||
21250
+ ((_j = (_h = event === null || event === undefined ? undefined : event.ecommerce) === null || _h === undefined ? undefined : _h.purchase) === null || _j === undefined ? undefined : _j.products) ||
21251
+ ((_l = (_k = event === null || event === undefined ? undefined : event.ecommerce) === null || _k === undefined ? undefined : _k.add) === null || _l === undefined ? undefined : _l.products) ||
21252
+ ((_o = (_m = event === null || event === undefined ? undefined : event.ecommerce) === null || _m === undefined ? undefined : _m.remove) === null || _o === undefined ? undefined : _o.products) ||
21253
+ ((_q = (_p = event === null || event === undefined ? undefined : event.ecommerce) === null || _p === undefined ? undefined : _p.click) === null || _q === undefined ? undefined : _q.products) ||
21254
+ (event === null || event === undefined ? undefined : event.products) ||
20831
21255
  [];
20832
21256
  return items.map((item) => {
20833
21257
  const data = {
@@ -20883,7 +21307,7 @@ class MonitorService {
20883
21307
  return;
20884
21308
  this.implementedMonitor.setListener(async (eventData) => {
20885
21309
  var _a;
20886
- await this.matchAndFireEvent(eventData, (_a = this.localStorageService) === null || _a === void 0 ? void 0 : _a.getSpots());
21310
+ await this.matchAndFireEvent(eventData, (_a = this.localStorageService) === null || _a === undefined ? undefined : _a.getSpots());
20887
21311
  });
20888
21312
  this.implementedMonitor.start();
20889
21313
  }
@@ -20899,14 +21323,14 @@ class MonitorService {
20899
21323
  continue;
20900
21324
  }
20901
21325
  const firedEvents = spot.firedEvents || [];
20902
- const eventProductId = (_a = this.normalizeStringHelper) === null || _a === void 0 ? void 0 : _a.normalize(String(data.id));
21326
+ const eventProductId = (_a = this.normalizeStringHelper) === null || _a === undefined ? undefined : _a.normalize(String(data.id));
20903
21327
  const isEventAlreadyFired = firedEvents.some((event) => event.productId === eventProductId && event.event === eventData.event);
20904
21328
  if (isEventAlreadyFired) {
20905
21329
  continue;
20906
21330
  }
20907
- const spotRelatedProductIdsSet = new Set(spot.productIds.map((id) => { var _a; return (_a = this.normalizeStringHelper) === null || _a === void 0 ? void 0 : _a.normalize(String(id)); }));
20908
- const eventProductBrand = (_b = this.normalizeStringHelper) === null || _b === void 0 ? void 0 : _b.normalize(String(data.brand));
20909
- const eventVariantBrand = (_c = this.normalizeStringHelper) === null || _c === void 0 ? void 0 : _c.normalize(String(data.variant));
21331
+ const spotRelatedProductIdsSet = new Set(spot.productIds.map((id) => { var _a; return (_a = this.normalizeStringHelper) === null || _a === undefined ? undefined : _a.normalize(String(id)); }));
21332
+ const eventProductBrand = (_b = this.normalizeStringHelper) === null || _b === undefined ? undefined : _b.normalize(String(data.brand));
21333
+ const eventVariantBrand = (_c = this.normalizeStringHelper) === null || _c === undefined ? undefined : _c.normalize(String(data.variant));
20910
21334
  const isProductMatch = [eventProductId, eventProductBrand, eventVariantBrand].some((id) => spotRelatedProductIdsSet.has(id));
20911
21335
  if (!isProductMatch) {
20912
21336
  continue;
@@ -20937,7 +21361,7 @@ class MonitorService {
20937
21361
  event: eventData.event,
20938
21362
  });
20939
21363
  // Update the spots in the local storage
20940
- (_d = this.localStorageService) === null || _d === void 0 ? void 0 : _d.setSpot(spot.spotId, {
21364
+ (_d = this.localStorageService) === null || _d === undefined ? undefined : _d.setSpot(spot.spotId, {
20941
21365
  placementId: spot.placementId,
20942
21366
  spotId: spot.spotId,
20943
21367
  spotType: spot.spotType,
@@ -21001,9 +21425,9 @@ class SelectionService extends BaseApi {
21001
21425
  }
21002
21426
  const { isOk, val, isErr } = await this.post(SELECTION_API_PATH, data, {});
21003
21427
  if (isErr) {
21004
- return { error: `There was an error during spot selection: (${isErr === null || isErr === void 0 ? void 0 : isErr.errorMessage})` };
21428
+ return { error: `There was an error during spot selection: (${isErr === null || isErr === undefined ? undefined : isErr.errorMessage})` };
21005
21429
  }
21006
- if (isOk && val && val.data && (val === null || val === void 0 ? void 0 : val.refresh.token)) {
21430
+ if (isOk && val && val.data && (val === null || val === undefined ? undefined : val.refresh.token)) {
21007
21431
  this.authInfo.authenticated = true;
21008
21432
  this.authInfo.token = val.refresh.token;
21009
21433
  return val.data.spots;
@@ -21118,7 +21542,7 @@ class SpotManagerService {
21118
21542
  spotId: spot.id,
21119
21543
  spotType: spot.spot,
21120
21544
  events: spot.events,
21121
- productIds: (_a = spot.productIds) !== null && _a !== void 0 ? _a : [],
21545
+ productIds: (_a = spot.productIds) !== null && _a !== undefined ? _a : [],
21122
21546
  });
21123
21547
  }
21124
21548
  async handleClickEvent({ placementId, spot }) {
@@ -21131,7 +21555,7 @@ class SpotManagerService {
21131
21555
  await fireEvent({
21132
21556
  spotType: spot.spot,
21133
21557
  event: exports.RMN_SPOT_EVENT.CLICK,
21134
- eventUrl: (_b = (_a = spot.events.find((event) => event.event === exports.RMN_SPOT_EVENT.CLICK)) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '',
21558
+ eventUrl: (_b = (_a = spot.events.find((event) => event.event === exports.RMN_SPOT_EVENT.CLICK)) === null || _a === undefined ? undefined : _a.url) !== null && _b !== undefined ? _b : '',
21135
21559
  });
21136
21560
  }
21137
21561
  handleImpressionEvent(placementId, spot) {
@@ -21145,7 +21569,7 @@ class SpotManagerService {
21145
21569
  await fireEvent({
21146
21570
  spotType: spot.spot,
21147
21571
  event: exports.RMN_SPOT_EVENT.IMPRESSION,
21148
- eventUrl: (_b = (_a = spot.events.find((event) => event.event === exports.RMN_SPOT_EVENT.IMPRESSION)) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '',
21572
+ eventUrl: (_b = (_a = spot.events.find((event) => event.event === exports.RMN_SPOT_EVENT.IMPRESSION)) === null || _a === undefined ? undefined : _a.url) !== null && _b !== undefined ? _b : '',
21149
21573
  });
21150
21574
  })();
21151
21575
  }
@@ -21220,7 +21644,7 @@ function validateInjectData(inject) {
21220
21644
  */
21221
21645
  function clearPlacement(placementId) {
21222
21646
  var _a;
21223
- (_a = document.getElementById(placementId)) === null || _a === void 0 ? void 0 : _a.replaceChildren();
21647
+ (_a = document.getElementById(placementId)) === null || _a === undefined ? undefined : _a.replaceChildren();
21224
21648
  }
21225
21649
  /**
21226
21650
  * Prepares the spot placement for rendering by taking care of its styling.
@@ -21254,10 +21678,10 @@ function overrideSpotColors(spot, colors) {
21254
21678
  const { textColor, backgroundColor, ctaTextColor, ctaBorderColor } = colors;
21255
21679
  return {
21256
21680
  ...spot,
21257
- textColor: textColor !== null && textColor !== void 0 ? textColor : spot.textColor,
21258
- backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : spot.backgroundColor,
21259
- ctaTextColor: ctaTextColor !== null && ctaTextColor !== void 0 ? ctaTextColor : spot.ctaTextColor,
21260
- ctaBorderColor: ctaBorderColor !== null && ctaBorderColor !== void 0 ? ctaBorderColor : spot.ctaBorderColor,
21681
+ textColor: textColor !== null && textColor !== undefined ? textColor : spot.textColor,
21682
+ backgroundColor: backgroundColor !== null && backgroundColor !== undefined ? backgroundColor : spot.backgroundColor,
21683
+ ctaTextColor: ctaTextColor !== null && ctaTextColor !== undefined ? ctaTextColor : spot.ctaTextColor,
21684
+ ctaBorderColor: ctaBorderColor !== null && ctaBorderColor !== undefined ? ctaBorderColor : spot.ctaBorderColor,
21261
21685
  };
21262
21686
  }
21263
21687
  // Sets the id for the user who is browsing the website
@@ -21377,7 +21801,7 @@ class BrowserRmnClient {
21377
21801
  }, false);
21378
21802
  prepareSpotPlacement(placement);
21379
21803
  const skeletonElement = this.elementService.createSkeletonElement({
21380
- fluid: (_b = (_a = injectData === null || injectData === void 0 ? void 0 : injectData.config) === null || _a === void 0 ? void 0 : _a.fluid) !== null && _b !== void 0 ? _b : globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.fluid,
21804
+ fluid: (_b = (_a = injectData === null || injectData === undefined ? undefined : injectData.config) === null || _a === undefined ? undefined : _a.fluid) !== null && _b !== undefined ? _b : globalConfig === null || globalConfig === undefined ? undefined : globalConfig.fluid,
21381
21805
  spotType: injectData.spotType,
21382
21806
  });
21383
21807
  if (!skeletonElement) {
@@ -21389,7 +21813,7 @@ class BrowserRmnClient {
21389
21813
  });
21390
21814
  }
21391
21815
  if (skeletonElement) {
21392
- placement === null || placement === void 0 ? void 0 : placement.replaceChildren(skeletonElement);
21816
+ placement === null || placement === undefined ? undefined : placement.replaceChildren(skeletonElement);
21393
21817
  }
21394
21818
  validPlacements.set(placementId, placement);
21395
21819
  this.spotManagerService.updateSpotLifecycleState(injectData.placementId, {
@@ -21404,11 +21828,18 @@ class BrowserRmnClient {
21404
21828
  const validInjectPlacements = Array.from(validPlacements.keys())
21405
21829
  .map((id) => injectMap.get(id))
21406
21830
  .filter(Boolean);
21407
- // Make the spot selection request
21408
- const response = await this.injectSpotSelectionRequest({
21409
- ...params,
21410
- inject: validInjectPlacements,
21411
- });
21831
+ let response;
21832
+ // Use custom spots if provided
21833
+ if (params.customSpots) {
21834
+ response = params.customSpots;
21835
+ }
21836
+ else {
21837
+ // Make the spot selection request
21838
+ response = await this.injectSpotSelectionRequest({
21839
+ ...params,
21840
+ inject: validInjectPlacements,
21841
+ });
21842
+ }
21412
21843
  // Handle request error state
21413
21844
  if (typeof response === 'object' && 'error' in response) {
21414
21845
  this.spotManagerService.updateSpotLifecycleState('all', {
@@ -21425,9 +21856,9 @@ class BrowserRmnClient {
21425
21856
  validPlacements.forEach((placement, placementId) => {
21426
21857
  var _a;
21427
21858
  const injectData = injectMap.get(placementId);
21428
- const itemConfig = (_a = injectData === null || injectData === void 0 ? void 0 : injectData.config) !== null && _a !== void 0 ? _a : globalConfig;
21859
+ const itemConfig = (_a = injectData === null || injectData === undefined ? undefined : injectData.config) !== null && _a !== undefined ? _a : globalConfig;
21429
21860
  const spots = response[placementId];
21430
- if (!(spots === null || spots === void 0 ? void 0 : spots.length)) {
21861
+ if (!(spots === null || spots === undefined ? undefined : spots.length)) {
21431
21862
  this.spotManagerService.updateSpotLifecycleState(injectData.placementId, {
21432
21863
  state: {
21433
21864
  error: `No spots found for type "${injectData.spotType}".`,
@@ -21473,12 +21904,12 @@ class BrowserRmnClient {
21473
21904
  isCarouselItem: false,
21474
21905
  },
21475
21906
  });
21476
- const spotData = overrideSpotColors(spot, config === null || config === void 0 ? void 0 : config.colors);
21907
+ const spotData = overrideSpotColors(spot, config === null || config === undefined ? undefined : config.colors);
21477
21908
  const spotElement = this.elementService.createSpotElement({
21478
21909
  spot: spotData,
21479
21910
  config: {
21480
21911
  prefix: '',
21481
- fluid: spot.spot === exports.RMN_SPOT_TYPE.RB_IN_TEXT ? true : ((_a = config === null || config === void 0 ? void 0 : config.fluid) !== null && _a !== void 0 ? _a : false),
21912
+ fluid: spot.spot === exports.RMN_SPOT_TYPE.RB_IN_TEXT ? true : ((_a = config === null || config === undefined ? undefined : config.fluid) !== null && _a !== undefined ? _a : false),
21482
21913
  useShadowDom: true,
21483
21914
  },
21484
21915
  });
@@ -21498,8 +21929,8 @@ class BrowserRmnClient {
21498
21929
  placementId,
21499
21930
  spotElement,
21500
21931
  });
21501
- placement === null || placement === void 0 ? void 0 : placement.replaceChildren(spotElement);
21502
- if (config === null || config === void 0 ? void 0 : config.listenRenderedSpotData) {
21932
+ placement === null || placement === undefined ? undefined : placement.replaceChildren(spotElement);
21933
+ if (config === null || config === undefined ? undefined : config.listenRenderedSpotData) {
21503
21934
  this.spotManagerService.publish(exports.RMN_EVENT.RENDERED_SPOT_DATA, {
21504
21935
  placementId,
21505
21936
  data: [spotData],
@@ -21543,7 +21974,7 @@ class BrowserRmnClient {
21543
21974
  isCarouselItem: true,
21544
21975
  },
21545
21976
  });
21546
- const spot = overrideSpotColors(spotItem, config === null || config === void 0 ? void 0 : config.colors);
21977
+ const spot = overrideSpotColors(spotItem, config === null || config === undefined ? undefined : config.colors);
21547
21978
  const spotElement = this.elementService.createSpotElement({
21548
21979
  spot,
21549
21980
  config: {
@@ -21579,11 +22010,11 @@ class BrowserRmnClient {
21579
22010
  const carouselElement = this.elementService.createCarouselElement({
21580
22011
  slides: carouselSlides,
21581
22012
  config: {
21582
- fluid: config === null || config === void 0 ? void 0 : config.fluid,
22013
+ fluid: config === null || config === undefined ? undefined : config.fluid,
21583
22014
  width: maxWidth,
21584
22015
  height: maxHeight,
21585
- minScale: (_a = config === null || config === void 0 ? void 0 : config.minScale) !== null && _a !== void 0 ? _a : 0.25, // Scale down to 25% of the original size
21586
- ...config === null || config === void 0 ? void 0 : config.carousel,
22016
+ minScale: (_a = config === null || config === undefined ? undefined : config.minScale) !== null && _a !== undefined ? _a : 0.25, // Scale down to 25% of the original size
22017
+ ...config === null || config === undefined ? undefined : config.carousel,
21587
22018
  },
21588
22019
  });
21589
22020
  if (!carouselElement) {
@@ -21597,8 +22028,8 @@ class BrowserRmnClient {
21597
22028
  clearPlacement(placementId);
21598
22029
  return;
21599
22030
  }
21600
- placement === null || placement === void 0 ? void 0 : placement.replaceChildren(carouselElement);
21601
- if (config === null || config === void 0 ? void 0 : config.listenRenderedSpotData) {
22031
+ placement === null || placement === undefined ? undefined : placement.replaceChildren(carouselElement);
22032
+ if (config === null || config === undefined ? undefined : config.listenRenderedSpotData) {
21602
22033
  this.spotManagerService.publish(exports.RMN_EVENT.RENDERED_SPOT_DATA, {
21603
22034
  placementId,
21604
22035
  data: spots,
@@ -21628,11 +22059,11 @@ class BrowserRmnClient {
21628
22059
  const spots = inject.map((item) => ({
21629
22060
  placementId: item.placementId,
21630
22061
  spot: item.spotType,
21631
- count: item === null || item === void 0 ? void 0 : item.count,
21632
- ...item === null || item === void 0 ? void 0 : item.filter,
22062
+ count: item === null || item === undefined ? undefined : item.count,
22063
+ ...item === null || item === undefined ? undefined : item.filter,
21633
22064
  }));
21634
22065
  const request = {
21635
- url: config === null || config === void 0 ? void 0 : config.url,
22066
+ url: config === null || config === undefined ? undefined : config.url,
21636
22067
  filter,
21637
22068
  spots,
21638
22069
  };