@liquidcommercedev/rmn-sdk 1.5.0-beta.44 → 1.5.0-beta.46
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.
- package/dist/index.cjs +289 -324
- package/dist/index.esm.js +289 -324
- package/package.json +18 -19
- package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
package/dist/index.esm.js
CHANGED
@@ -112,9 +112,6 @@ const SDK_CONFIG = {
|
|
112
112
|
apiHeader: REQUEST_CLOUD_API_KEY,
|
113
113
|
accessHeader: 'Authorization',
|
114
114
|
credentials: {
|
115
|
-
authenticated: false,
|
116
|
-
apiKey: '',
|
117
|
-
token: '',
|
118
115
|
env: RMN_ENV.DEVELOPMENT,
|
119
116
|
},
|
120
117
|
};
|
@@ -259,94 +256,18 @@ function Item(fun, array) {
|
|
259
256
|
Item.prototype.run = function () {
|
260
257
|
this.fun.apply(null, this.array);
|
261
258
|
};
|
262
|
-
var title = 'browser';
|
263
|
-
var platform$2 = 'browser';
|
264
|
-
var browser = true;
|
265
|
-
var env = {};
|
266
|
-
var argv = [];
|
267
|
-
var version = ''; // empty string to avoid regexp issues
|
268
|
-
var versions = {};
|
269
|
-
var release = {};
|
270
|
-
var config = {};
|
271
|
-
|
272
|
-
function noop$1() {}
|
273
|
-
|
274
|
-
var on = noop$1;
|
275
|
-
var addListener = noop$1;
|
276
|
-
var once = noop$1;
|
277
|
-
var off = noop$1;
|
278
|
-
var removeListener = noop$1;
|
279
|
-
var removeAllListeners = noop$1;
|
280
|
-
var emit = noop$1;
|
281
|
-
|
282
|
-
function binding(name) {
|
283
|
-
throw new Error('process.binding is not supported');
|
284
|
-
}
|
285
|
-
|
286
|
-
function cwd () { return '/' }
|
287
|
-
function chdir (dir) {
|
288
|
-
throw new Error('process.chdir is not supported');
|
289
|
-
}function umask() { return 0; }
|
290
259
|
|
291
260
|
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
|
292
261
|
var performance = global$1.performance || {};
|
293
|
-
|
294
|
-
performance.now ||
|
262
|
+
performance.now ||
|
295
263
|
performance.mozNow ||
|
296
264
|
performance.msNow ||
|
297
265
|
performance.oNow ||
|
298
266
|
performance.webkitNow ||
|
299
267
|
function(){ return (new Date()).getTime() };
|
300
268
|
|
301
|
-
// generate timestamp or delta
|
302
|
-
// see http://nodejs.org/api/process.html#process_process_hrtime
|
303
|
-
function hrtime(previousTimestamp){
|
304
|
-
var clocktime = performanceNow.call(performance)*1e-3;
|
305
|
-
var seconds = Math.floor(clocktime);
|
306
|
-
var nanoseconds = Math.floor((clocktime%1)*1e9);
|
307
|
-
if (previousTimestamp) {
|
308
|
-
seconds = seconds - previousTimestamp[0];
|
309
|
-
nanoseconds = nanoseconds - previousTimestamp[1];
|
310
|
-
if (nanoseconds<0) {
|
311
|
-
seconds--;
|
312
|
-
nanoseconds += 1e9;
|
313
|
-
}
|
314
|
-
}
|
315
|
-
return [seconds,nanoseconds]
|
316
|
-
}
|
317
|
-
|
318
|
-
var startTime = new Date();
|
319
|
-
function uptime() {
|
320
|
-
var currentTime = new Date();
|
321
|
-
var dif = currentTime - startTime;
|
322
|
-
return dif / 1000;
|
323
|
-
}
|
324
|
-
|
325
269
|
var browser$1 = {
|
326
|
-
nextTick: nextTick
|
327
|
-
title: title,
|
328
|
-
browser: browser,
|
329
|
-
env: env,
|
330
|
-
argv: argv,
|
331
|
-
version: version,
|
332
|
-
versions: versions,
|
333
|
-
on: on,
|
334
|
-
addListener: addListener,
|
335
|
-
once: once,
|
336
|
-
off: off,
|
337
|
-
removeListener: removeListener,
|
338
|
-
removeAllListeners: removeAllListeners,
|
339
|
-
emit: emit,
|
340
|
-
binding: binding,
|
341
|
-
cwd: cwd,
|
342
|
-
chdir: chdir,
|
343
|
-
umask: umask,
|
344
|
-
hrtime: hrtime,
|
345
|
-
platform: platform$2,
|
346
|
-
release: release,
|
347
|
-
config: config,
|
348
|
-
uptime: uptime
|
349
|
-
};
|
270
|
+
nextTick: nextTick};
|
350
271
|
|
351
272
|
function bind(fn, thisArg) {
|
352
273
|
return function wrap() {
|
@@ -954,26 +875,6 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
954
875
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
955
876
|
};
|
956
877
|
|
957
|
-
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
958
|
-
|
959
|
-
const DIGIT = '0123456789';
|
960
|
-
|
961
|
-
const ALPHABET = {
|
962
|
-
DIGIT,
|
963
|
-
ALPHA,
|
964
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
965
|
-
};
|
966
|
-
|
967
|
-
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
968
|
-
let str = '';
|
969
|
-
const {length} = alphabet;
|
970
|
-
while (size--) {
|
971
|
-
str += alphabet[Math.random() * length|0];
|
972
|
-
}
|
973
|
-
|
974
|
-
return str;
|
975
|
-
};
|
976
|
-
|
977
878
|
/**
|
978
879
|
* If the thing is a FormData object, return true, otherwise return false.
|
979
880
|
*
|
@@ -1101,8 +1002,6 @@ var utils$1 = {
|
|
1101
1002
|
findKey,
|
1102
1003
|
global: _global,
|
1103
1004
|
isContextDefined,
|
1104
|
-
ALPHABET,
|
1105
|
-
generateString,
|
1106
1005
|
isSpecCompliantForm,
|
1107
1006
|
toJSONObject,
|
1108
1007
|
isAsyncFn,
|
@@ -3099,7 +2998,7 @@ function isSlowBuffer (obj) {
|
|
3099
2998
|
*
|
3100
2999
|
* @returns {Error} The created error.
|
3101
3000
|
*/
|
3102
|
-
function AxiosError(message, code, config, request, response) {
|
3001
|
+
function AxiosError$1(message, code, config, request, response) {
|
3103
3002
|
Error.call(this);
|
3104
3003
|
|
3105
3004
|
if (Error.captureStackTrace) {
|
@@ -3119,7 +3018,7 @@ function AxiosError(message, code, config, request, response) {
|
|
3119
3018
|
}
|
3120
3019
|
}
|
3121
3020
|
|
3122
|
-
utils$1.inherits(AxiosError, Error, {
|
3021
|
+
utils$1.inherits(AxiosError$1, Error, {
|
3123
3022
|
toJSON: function toJSON() {
|
3124
3023
|
return {
|
3125
3024
|
// Standard
|
@@ -3141,7 +3040,7 @@ utils$1.inherits(AxiosError, Error, {
|
|
3141
3040
|
}
|
3142
3041
|
});
|
3143
3042
|
|
3144
|
-
const prototype$1 = AxiosError.prototype;
|
3043
|
+
const prototype$1 = AxiosError$1.prototype;
|
3145
3044
|
const descriptors = {};
|
3146
3045
|
|
3147
3046
|
[
|
@@ -3162,11 +3061,11 @@ const descriptors = {};
|
|
3162
3061
|
descriptors[code] = {value: code};
|
3163
3062
|
});
|
3164
3063
|
|
3165
|
-
Object.defineProperties(AxiosError, descriptors);
|
3064
|
+
Object.defineProperties(AxiosError$1, descriptors);
|
3166
3065
|
Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
3167
3066
|
|
3168
3067
|
// eslint-disable-next-line func-names
|
3169
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
3068
|
+
AxiosError$1.from = (error, code, config, request, response, customProps) => {
|
3170
3069
|
const axiosError = Object.create(prototype$1);
|
3171
3070
|
|
3172
3071
|
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
@@ -3175,7 +3074,7 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
3175
3074
|
return prop !== 'isAxiosError';
|
3176
3075
|
});
|
3177
3076
|
|
3178
|
-
AxiosError.call(axiosError, error.message, code, config, request, response);
|
3077
|
+
AxiosError$1.call(axiosError, error.message, code, config, request, response);
|
3179
3078
|
|
3180
3079
|
axiosError.cause = error;
|
3181
3080
|
|
@@ -3267,7 +3166,7 @@ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop)
|
|
3267
3166
|
*
|
3268
3167
|
* @returns
|
3269
3168
|
*/
|
3270
|
-
function toFormData(obj, formData, options) {
|
3169
|
+
function toFormData$1(obj, formData, options) {
|
3271
3170
|
if (!utils$1.isObject(obj)) {
|
3272
3171
|
throw new TypeError('target must be an object');
|
3273
3172
|
}
|
@@ -3305,7 +3204,7 @@ function toFormData(obj, formData, options) {
|
|
3305
3204
|
}
|
3306
3205
|
|
3307
3206
|
if (!useBlob && utils$1.isBlob(value)) {
|
3308
|
-
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
3207
|
+
throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
|
3309
3208
|
}
|
3310
3209
|
|
3311
3210
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
@@ -3434,7 +3333,7 @@ function encode$2(str) {
|
|
3434
3333
|
function AxiosURLSearchParams(params, options) {
|
3435
3334
|
this._pairs = [];
|
3436
3335
|
|
3437
|
-
params && toFormData(params, this, options);
|
3336
|
+
params && toFormData$1(params, this, options);
|
3438
3337
|
}
|
3439
3338
|
|
3440
3339
|
const prototype = AxiosURLSearchParams.prototype;
|
@@ -3665,7 +3564,7 @@ var platform = {
|
|
3665
3564
|
};
|
3666
3565
|
|
3667
3566
|
function toURLEncodedForm(data, options) {
|
3668
|
-
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
3567
|
+
return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
|
3669
3568
|
visitor: function(value, key, path, helpers) {
|
3670
3569
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
3671
3570
|
this.append(key, value.toString('base64'));
|
@@ -3789,7 +3688,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
3789
3688
|
}
|
3790
3689
|
}
|
3791
3690
|
|
3792
|
-
return (
|
3691
|
+
return (encoder || JSON.stringify)(rawValue);
|
3793
3692
|
}
|
3794
3693
|
|
3795
3694
|
const defaults = {
|
@@ -3840,7 +3739,7 @@ const defaults = {
|
|
3840
3739
|
if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
3841
3740
|
const _FormData = this.env && this.env.FormData;
|
3842
3741
|
|
3843
|
-
return toFormData(
|
3742
|
+
return toFormData$1(
|
3844
3743
|
isFileList ? {'files[]': data} : data,
|
3845
3744
|
_FormData && new _FormData(),
|
3846
3745
|
this.formSerializer
|
@@ -3874,7 +3773,7 @@ const defaults = {
|
|
3874
3773
|
} catch (e) {
|
3875
3774
|
if (strictJSONParsing) {
|
3876
3775
|
if (e.name === 'SyntaxError') {
|
3877
|
-
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
3776
|
+
throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
3878
3777
|
}
|
3879
3778
|
throw e;
|
3880
3779
|
}
|
@@ -4037,7 +3936,7 @@ function buildAccessors(obj, header) {
|
|
4037
3936
|
});
|
4038
3937
|
}
|
4039
3938
|
|
4040
|
-
class AxiosHeaders {
|
3939
|
+
let AxiosHeaders$1 = class AxiosHeaders {
|
4041
3940
|
constructor(headers) {
|
4042
3941
|
headers && this.set(headers);
|
4043
3942
|
}
|
@@ -4248,12 +4147,12 @@ class AxiosHeaders {
|
|
4248
4147
|
|
4249
4148
|
return this;
|
4250
4149
|
}
|
4251
|
-
}
|
4150
|
+
};
|
4252
4151
|
|
4253
|
-
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
4152
|
+
AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
4254
4153
|
|
4255
4154
|
// reserved names hotfix
|
4256
|
-
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
4155
|
+
utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
|
4257
4156
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
4258
4157
|
return {
|
4259
4158
|
get: () => value,
|
@@ -4263,7 +4162,7 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
4263
4162
|
}
|
4264
4163
|
});
|
4265
4164
|
|
4266
|
-
utils$1.freezeMethods(AxiosHeaders);
|
4165
|
+
utils$1.freezeMethods(AxiosHeaders$1);
|
4267
4166
|
|
4268
4167
|
/**
|
4269
4168
|
* Transform the data for a request or a response
|
@@ -4276,7 +4175,7 @@ utils$1.freezeMethods(AxiosHeaders);
|
|
4276
4175
|
function transformData(fns, response) {
|
4277
4176
|
const config = this || defaults;
|
4278
4177
|
const context = response || config;
|
4279
|
-
const headers = AxiosHeaders.from(context.headers);
|
4178
|
+
const headers = AxiosHeaders$1.from(context.headers);
|
4280
4179
|
let data = context.data;
|
4281
4180
|
|
4282
4181
|
utils$1.forEach(fns, function transform(fn) {
|
@@ -4288,7 +4187,7 @@ function transformData(fns, response) {
|
|
4288
4187
|
return data;
|
4289
4188
|
}
|
4290
4189
|
|
4291
|
-
function isCancel(value) {
|
4190
|
+
function isCancel$1(value) {
|
4292
4191
|
return !!(value && value.__CANCEL__);
|
4293
4192
|
}
|
4294
4193
|
|
@@ -4301,13 +4200,13 @@ function isCancel(value) {
|
|
4301
4200
|
*
|
4302
4201
|
* @returns {CanceledError} The created error.
|
4303
4202
|
*/
|
4304
|
-
function CanceledError(message, config, request) {
|
4203
|
+
function CanceledError$1(message, config, request) {
|
4305
4204
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
4306
|
-
AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
4205
|
+
AxiosError$1.call(this, message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
|
4307
4206
|
this.name = 'CanceledError';
|
4308
4207
|
}
|
4309
4208
|
|
4310
|
-
utils$1.inherits(CanceledError, AxiosError, {
|
4209
|
+
utils$1.inherits(CanceledError$1, AxiosError$1, {
|
4311
4210
|
__CANCEL__: true
|
4312
4211
|
});
|
4313
4212
|
|
@@ -4325,9 +4224,9 @@ function settle(resolve, reject, response) {
|
|
4325
4224
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
4326
4225
|
resolve(response);
|
4327
4226
|
} else {
|
4328
|
-
reject(new AxiosError(
|
4227
|
+
reject(new AxiosError$1(
|
4329
4228
|
'Request failed with status code ' + response.status,
|
4330
|
-
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
4229
|
+
[AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
4331
4230
|
response.config,
|
4332
4231
|
response.request,
|
4333
4232
|
response
|
@@ -4566,14 +4465,15 @@ function combineURLs(baseURL, relativeURL) {
|
|
4566
4465
|
*
|
4567
4466
|
* @returns {string} The combined full path
|
4568
4467
|
*/
|
4569
|
-
function buildFullPath(baseURL, requestedURL) {
|
4570
|
-
|
4468
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
4469
|
+
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
4470
|
+
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
4571
4471
|
return combineURLs(baseURL, requestedURL);
|
4572
4472
|
}
|
4573
4473
|
return requestedURL;
|
4574
4474
|
}
|
4575
4475
|
|
4576
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
4476
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
4577
4477
|
|
4578
4478
|
/**
|
4579
4479
|
* Config-specific merge-function which creates a new config-object
|
@@ -4584,7 +4484,7 @@ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing }
|
|
4584
4484
|
*
|
4585
4485
|
* @returns {Object} New object resulting from merging config2 to config1
|
4586
4486
|
*/
|
4587
|
-
function mergeConfig(config1, config2) {
|
4487
|
+
function mergeConfig$1(config1, config2) {
|
4588
4488
|
// eslint-disable-next-line no-param-reassign
|
4589
4489
|
config2 = config2 || {};
|
4590
4490
|
const config = {};
|
@@ -4676,13 +4576,13 @@ function mergeConfig(config1, config2) {
|
|
4676
4576
|
}
|
4677
4577
|
|
4678
4578
|
var resolveConfig = (config) => {
|
4679
|
-
const newConfig = mergeConfig({}, config);
|
4579
|
+
const newConfig = mergeConfig$1({}, config);
|
4680
4580
|
|
4681
4581
|
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
4682
4582
|
|
4683
|
-
newConfig.headers = headers = AxiosHeaders.from(headers);
|
4583
|
+
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
4684
4584
|
|
4685
|
-
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
4585
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
4686
4586
|
|
4687
4587
|
// HTTP basic authentication
|
4688
4588
|
if (auth) {
|
@@ -4729,7 +4629,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
4729
4629
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
4730
4630
|
const _config = resolveConfig(config);
|
4731
4631
|
let requestData = _config.data;
|
4732
|
-
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
4632
|
+
const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
|
4733
4633
|
let {responseType, onUploadProgress, onDownloadProgress} = _config;
|
4734
4634
|
let onCanceled;
|
4735
4635
|
let uploadThrottled, downloadThrottled;
|
@@ -4756,7 +4656,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
4756
4656
|
return;
|
4757
4657
|
}
|
4758
4658
|
// Prepare the response
|
4759
|
-
const responseHeaders = AxiosHeaders.from(
|
4659
|
+
const responseHeaders = AxiosHeaders$1.from(
|
4760
4660
|
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
4761
4661
|
);
|
4762
4662
|
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
@@ -4811,7 +4711,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
4811
4711
|
return;
|
4812
4712
|
}
|
4813
4713
|
|
4814
|
-
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
4714
|
+
reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
|
4815
4715
|
|
4816
4716
|
// Clean up request
|
4817
4717
|
request = null;
|
@@ -4821,7 +4721,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
4821
4721
|
request.onerror = function handleError() {
|
4822
4722
|
// Real errors are hidden from us by the browser
|
4823
4723
|
// onerror should only fire if it's a network error
|
4824
|
-
reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
|
4724
|
+
reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request));
|
4825
4725
|
|
4826
4726
|
// Clean up request
|
4827
4727
|
request = null;
|
@@ -4834,9 +4734,9 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
4834
4734
|
if (_config.timeoutErrorMessage) {
|
4835
4735
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
4836
4736
|
}
|
4837
|
-
reject(new AxiosError(
|
4737
|
+
reject(new AxiosError$1(
|
4838
4738
|
timeoutErrorMessage,
|
4839
|
-
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
4739
|
+
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
4840
4740
|
config,
|
4841
4741
|
request));
|
4842
4742
|
|
@@ -4886,7 +4786,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
4886
4786
|
if (!request) {
|
4887
4787
|
return;
|
4888
4788
|
}
|
4889
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
4789
|
+
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
4890
4790
|
request.abort();
|
4891
4791
|
request = null;
|
4892
4792
|
};
|
@@ -4900,7 +4800,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
4900
4800
|
const protocol = parseProtocol(_config.url);
|
4901
4801
|
|
4902
4802
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
4903
|
-
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
4803
|
+
reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
|
4904
4804
|
return;
|
4905
4805
|
}
|
4906
4806
|
|
@@ -4923,13 +4823,13 @@ const composeSignals = (signals, timeout) => {
|
|
4923
4823
|
aborted = true;
|
4924
4824
|
unsubscribe();
|
4925
4825
|
const err = reason instanceof Error ? reason : this.reason;
|
4926
|
-
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
4826
|
+
controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
|
4927
4827
|
}
|
4928
4828
|
};
|
4929
4829
|
|
4930
4830
|
let timer = timeout && setTimeout(() => {
|
4931
4831
|
timer = null;
|
4932
|
-
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
4832
|
+
onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
|
4933
4833
|
}, timeout);
|
4934
4834
|
|
4935
4835
|
const unsubscribe = () => {
|
@@ -5086,7 +4986,7 @@ isFetchSupported && (((res) => {
|
|
5086
4986
|
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
5087
4987
|
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
|
5088
4988
|
(_, config) => {
|
5089
|
-
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
4989
|
+
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
5090
4990
|
});
|
5091
4991
|
});
|
5092
4992
|
})(new Response));
|
@@ -5235,7 +5135,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
5235
5135
|
return await new Promise((resolve, reject) => {
|
5236
5136
|
settle(resolve, reject, {
|
5237
5137
|
data: responseData,
|
5238
|
-
headers: AxiosHeaders.from(response.headers),
|
5138
|
+
headers: AxiosHeaders$1.from(response.headers),
|
5239
5139
|
status: response.status,
|
5240
5140
|
statusText: response.statusText,
|
5241
5141
|
config,
|
@@ -5247,14 +5147,14 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
5247
5147
|
|
5248
5148
|
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
5249
5149
|
throw Object.assign(
|
5250
|
-
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
5150
|
+
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
|
5251
5151
|
{
|
5252
5152
|
cause: err.cause || err
|
5253
5153
|
}
|
5254
5154
|
)
|
5255
5155
|
}
|
5256
5156
|
|
5257
|
-
throw AxiosError.from(err, err && err.code, config, request);
|
5157
|
+
throw AxiosError$1.from(err, err && err.code, config, request);
|
5258
5158
|
}
|
5259
5159
|
});
|
5260
5160
|
|
@@ -5299,7 +5199,7 @@ var adapters = {
|
|
5299
5199
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
5300
5200
|
|
5301
5201
|
if (adapter === undefined) {
|
5302
|
-
throw new AxiosError(`Unknown adapter '${id}'`);
|
5202
|
+
throw new AxiosError$1(`Unknown adapter '${id}'`);
|
5303
5203
|
}
|
5304
5204
|
}
|
5305
5205
|
|
@@ -5321,7 +5221,7 @@ var adapters = {
|
|
5321
5221
|
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
5322
5222
|
'as no adapter specified';
|
5323
5223
|
|
5324
|
-
throw new AxiosError(
|
5224
|
+
throw new AxiosError$1(
|
5325
5225
|
`There is no suitable adapter to dispatch the request ` + s,
|
5326
5226
|
'ERR_NOT_SUPPORT'
|
5327
5227
|
);
|
@@ -5345,7 +5245,7 @@ function throwIfCancellationRequested(config) {
|
|
5345
5245
|
}
|
5346
5246
|
|
5347
5247
|
if (config.signal && config.signal.aborted) {
|
5348
|
-
throw new CanceledError(null, config);
|
5248
|
+
throw new CanceledError$1(null, config);
|
5349
5249
|
}
|
5350
5250
|
}
|
5351
5251
|
|
@@ -5359,7 +5259,7 @@ function throwIfCancellationRequested(config) {
|
|
5359
5259
|
function dispatchRequest(config) {
|
5360
5260
|
throwIfCancellationRequested(config);
|
5361
5261
|
|
5362
|
-
config.headers = AxiosHeaders.from(config.headers);
|
5262
|
+
config.headers = AxiosHeaders$1.from(config.headers);
|
5363
5263
|
|
5364
5264
|
// Transform request data
|
5365
5265
|
config.data = transformData.call(
|
@@ -5383,11 +5283,11 @@ function dispatchRequest(config) {
|
|
5383
5283
|
response
|
5384
5284
|
);
|
5385
5285
|
|
5386
|
-
response.headers = AxiosHeaders.from(response.headers);
|
5286
|
+
response.headers = AxiosHeaders$1.from(response.headers);
|
5387
5287
|
|
5388
5288
|
return response;
|
5389
5289
|
}, function onAdapterRejection(reason) {
|
5390
|
-
if (!isCancel(reason)) {
|
5290
|
+
if (!isCancel$1(reason)) {
|
5391
5291
|
throwIfCancellationRequested(config);
|
5392
5292
|
|
5393
5293
|
// Transform response data
|
@@ -5397,7 +5297,7 @@ function dispatchRequest(config) {
|
|
5397
5297
|
config.transformResponse,
|
5398
5298
|
reason.response
|
5399
5299
|
);
|
5400
|
-
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
5300
|
+
reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
|
5401
5301
|
}
|
5402
5302
|
}
|
5403
5303
|
|
@@ -5405,7 +5305,7 @@ function dispatchRequest(config) {
|
|
5405
5305
|
});
|
5406
5306
|
}
|
5407
5307
|
|
5408
|
-
const VERSION = "1.
|
5308
|
+
const VERSION$1 = "1.8.3";
|
5409
5309
|
|
5410
5310
|
const validators$1 = {};
|
5411
5311
|
|
@@ -5429,15 +5329,15 @@ const deprecatedWarnings = {};
|
|
5429
5329
|
*/
|
5430
5330
|
validators$1.transitional = function transitional(validator, version, message) {
|
5431
5331
|
function formatMessage(opt, desc) {
|
5432
|
-
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
5332
|
+
return '[Axios v' + VERSION$1 + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
5433
5333
|
}
|
5434
5334
|
|
5435
5335
|
// eslint-disable-next-line func-names
|
5436
5336
|
return (value, opt, opts) => {
|
5437
5337
|
if (validator === false) {
|
5438
|
-
throw new AxiosError(
|
5338
|
+
throw new AxiosError$1(
|
5439
5339
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
5440
|
-
AxiosError.ERR_DEPRECATED
|
5340
|
+
AxiosError$1.ERR_DEPRECATED
|
5441
5341
|
);
|
5442
5342
|
}
|
5443
5343
|
|
@@ -5476,7 +5376,7 @@ validators$1.spelling = function spelling(correctSpelling) {
|
|
5476
5376
|
|
5477
5377
|
function assertOptions(options, schema, allowUnknown) {
|
5478
5378
|
if (typeof options !== 'object') {
|
5479
|
-
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
5379
|
+
throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
|
5480
5380
|
}
|
5481
5381
|
const keys = Object.keys(options);
|
5482
5382
|
let i = keys.length;
|
@@ -5487,12 +5387,12 @@ function assertOptions(options, schema, allowUnknown) {
|
|
5487
5387
|
const value = options[opt];
|
5488
5388
|
const result = value === undefined || validator(value, opt, options);
|
5489
5389
|
if (result !== true) {
|
5490
|
-
throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
5390
|
+
throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
|
5491
5391
|
}
|
5492
5392
|
continue;
|
5493
5393
|
}
|
5494
5394
|
if (allowUnknown !== true) {
|
5495
|
-
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
5395
|
+
throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
|
5496
5396
|
}
|
5497
5397
|
}
|
5498
5398
|
}
|
@@ -5511,7 +5411,7 @@ const validators = validator.validators;
|
|
5511
5411
|
*
|
5512
5412
|
* @return {Axios} A new instance of Axios
|
5513
5413
|
*/
|
5514
|
-
class Axios {
|
5414
|
+
let Axios$1 = class Axios {
|
5515
5415
|
constructor(instanceConfig) {
|
5516
5416
|
this.defaults = instanceConfig;
|
5517
5417
|
this.interceptors = {
|
@@ -5565,7 +5465,7 @@ class Axios {
|
|
5565
5465
|
config = configOrUrl || {};
|
5566
5466
|
}
|
5567
5467
|
|
5568
|
-
config = mergeConfig(this.defaults, config);
|
5468
|
+
config = mergeConfig$1(this.defaults, config);
|
5569
5469
|
|
5570
5470
|
const {transitional, paramsSerializer, headers} = config;
|
5571
5471
|
|
@@ -5590,6 +5490,13 @@ class Axios {
|
|
5590
5490
|
}
|
5591
5491
|
}
|
5592
5492
|
|
5493
|
+
// Set config.allowAbsoluteUrls
|
5494
|
+
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
|
5495
|
+
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
5496
|
+
} else {
|
5497
|
+
config.allowAbsoluteUrls = true;
|
5498
|
+
}
|
5499
|
+
|
5593
5500
|
validator.assertOptions(config, {
|
5594
5501
|
baseUrl: validators.spelling('baseURL'),
|
5595
5502
|
withXsrfToken: validators.spelling('withXSRFToken')
|
@@ -5611,7 +5518,7 @@ class Axios {
|
|
5611
5518
|
}
|
5612
5519
|
);
|
5613
5520
|
|
5614
|
-
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
5521
|
+
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
5615
5522
|
|
5616
5523
|
// filter out skipped interceptors
|
5617
5524
|
const requestInterceptorChain = [];
|
@@ -5684,17 +5591,17 @@ class Axios {
|
|
5684
5591
|
}
|
5685
5592
|
|
5686
5593
|
getUri(config) {
|
5687
|
-
config = mergeConfig(this.defaults, config);
|
5688
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
5594
|
+
config = mergeConfig$1(this.defaults, config);
|
5595
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
5689
5596
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
5690
5597
|
}
|
5691
|
-
}
|
5598
|
+
};
|
5692
5599
|
|
5693
5600
|
// Provide aliases for supported request methods
|
5694
5601
|
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
5695
5602
|
/*eslint func-names:0*/
|
5696
|
-
Axios.prototype[method] = function(url, config) {
|
5697
|
-
return this.request(mergeConfig(config || {}, {
|
5603
|
+
Axios$1.prototype[method] = function(url, config) {
|
5604
|
+
return this.request(mergeConfig$1(config || {}, {
|
5698
5605
|
method,
|
5699
5606
|
url,
|
5700
5607
|
data: (config || {}).data
|
@@ -5707,7 +5614,7 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
|
|
5707
5614
|
|
5708
5615
|
function generateHTTPMethod(isForm) {
|
5709
5616
|
return function httpMethod(url, data, config) {
|
5710
|
-
return this.request(mergeConfig(config || {}, {
|
5617
|
+
return this.request(mergeConfig$1(config || {}, {
|
5711
5618
|
method,
|
5712
5619
|
headers: isForm ? {
|
5713
5620
|
'Content-Type': 'multipart/form-data'
|
@@ -5718,9 +5625,9 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
|
|
5718
5625
|
};
|
5719
5626
|
}
|
5720
5627
|
|
5721
|
-
Axios.prototype[method] = generateHTTPMethod();
|
5628
|
+
Axios$1.prototype[method] = generateHTTPMethod();
|
5722
5629
|
|
5723
|
-
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
5630
|
+
Axios$1.prototype[method + 'Form'] = generateHTTPMethod(true);
|
5724
5631
|
});
|
5725
5632
|
|
5726
5633
|
/**
|
@@ -5730,7 +5637,7 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
|
|
5730
5637
|
*
|
5731
5638
|
* @returns {CancelToken}
|
5732
5639
|
*/
|
5733
|
-
class CancelToken {
|
5640
|
+
let CancelToken$1 = class CancelToken {
|
5734
5641
|
constructor(executor) {
|
5735
5642
|
if (typeof executor !== 'function') {
|
5736
5643
|
throw new TypeError('executor must be a function.');
|
@@ -5778,7 +5685,7 @@ class CancelToken {
|
|
5778
5685
|
return;
|
5779
5686
|
}
|
5780
5687
|
|
5781
|
-
token.reason = new CanceledError(message, config, request);
|
5688
|
+
token.reason = new CanceledError$1(message, config, request);
|
5782
5689
|
resolvePromise(token.reason);
|
5783
5690
|
});
|
5784
5691
|
}
|
@@ -5851,7 +5758,7 @@ class CancelToken {
|
|
5851
5758
|
cancel
|
5852
5759
|
};
|
5853
5760
|
}
|
5854
|
-
}
|
5761
|
+
};
|
5855
5762
|
|
5856
5763
|
/**
|
5857
5764
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
@@ -5874,7 +5781,7 @@ class CancelToken {
|
|
5874
5781
|
*
|
5875
5782
|
* @returns {Function}
|
5876
5783
|
*/
|
5877
|
-
function spread(callback) {
|
5784
|
+
function spread$1(callback) {
|
5878
5785
|
return function wrap(arr) {
|
5879
5786
|
return callback.apply(null, arr);
|
5880
5787
|
};
|
@@ -5887,11 +5794,11 @@ function spread(callback) {
|
|
5887
5794
|
*
|
5888
5795
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
5889
5796
|
*/
|
5890
|
-
function isAxiosError(payload) {
|
5797
|
+
function isAxiosError$1(payload) {
|
5891
5798
|
return utils$1.isObject(payload) && (payload.isAxiosError === true);
|
5892
5799
|
}
|
5893
5800
|
|
5894
|
-
const HttpStatusCode = {
|
5801
|
+
const HttpStatusCode$1 = {
|
5895
5802
|
Continue: 100,
|
5896
5803
|
SwitchingProtocols: 101,
|
5897
5804
|
Processing: 102,
|
@@ -5957,8 +5864,8 @@ const HttpStatusCode = {
|
|
5957
5864
|
NetworkAuthenticationRequired: 511,
|
5958
5865
|
};
|
5959
5866
|
|
5960
|
-
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
5961
|
-
HttpStatusCode[value] = key;
|
5867
|
+
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
|
5868
|
+
HttpStatusCode$1[value] = key;
|
5962
5869
|
});
|
5963
5870
|
|
5964
5871
|
/**
|
@@ -5969,18 +5876,18 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
5969
5876
|
* @returns {Axios} A new instance of Axios
|
5970
5877
|
*/
|
5971
5878
|
function createInstance(defaultConfig) {
|
5972
|
-
const context = new Axios(defaultConfig);
|
5973
|
-
const instance = bind(Axios.prototype.request, context);
|
5879
|
+
const context = new Axios$1(defaultConfig);
|
5880
|
+
const instance = bind(Axios$1.prototype.request, context);
|
5974
5881
|
|
5975
5882
|
// Copy axios.prototype to instance
|
5976
|
-
utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
5883
|
+
utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
5977
5884
|
|
5978
5885
|
// Copy context to instance
|
5979
5886
|
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
5980
5887
|
|
5981
5888
|
// Factory for creating new instances
|
5982
5889
|
instance.create = function create(instanceConfig) {
|
5983
|
-
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
5890
|
+
return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
|
5984
5891
|
};
|
5985
5892
|
|
5986
5893
|
return instance;
|
@@ -5990,17 +5897,17 @@ function createInstance(defaultConfig) {
|
|
5990
5897
|
const axios = createInstance(defaults);
|
5991
5898
|
|
5992
5899
|
// Expose Axios class to allow class inheritance
|
5993
|
-
axios.Axios = Axios;
|
5900
|
+
axios.Axios = Axios$1;
|
5994
5901
|
|
5995
5902
|
// Expose Cancel & CancelToken
|
5996
|
-
axios.CanceledError = CanceledError;
|
5997
|
-
axios.CancelToken = CancelToken;
|
5998
|
-
axios.isCancel = isCancel;
|
5999
|
-
axios.VERSION = VERSION;
|
6000
|
-
axios.toFormData = toFormData;
|
5903
|
+
axios.CanceledError = CanceledError$1;
|
5904
|
+
axios.CancelToken = CancelToken$1;
|
5905
|
+
axios.isCancel = isCancel$1;
|
5906
|
+
axios.VERSION = VERSION$1;
|
5907
|
+
axios.toFormData = toFormData$1;
|
6001
5908
|
|
6002
5909
|
// Expose AxiosError class
|
6003
|
-
axios.AxiosError = AxiosError;
|
5910
|
+
axios.AxiosError = AxiosError$1;
|
6004
5911
|
|
6005
5912
|
// alias for CanceledError for backward compatibility
|
6006
5913
|
axios.Cancel = axios.CanceledError;
|
@@ -6010,24 +5917,46 @@ axios.all = function all(promises) {
|
|
6010
5917
|
return Promise.all(promises);
|
6011
5918
|
};
|
6012
5919
|
|
6013
|
-
axios.spread = spread;
|
5920
|
+
axios.spread = spread$1;
|
6014
5921
|
|
6015
5922
|
// Expose isAxiosError
|
6016
|
-
axios.isAxiosError = isAxiosError;
|
5923
|
+
axios.isAxiosError = isAxiosError$1;
|
6017
5924
|
|
6018
5925
|
// Expose mergeConfig
|
6019
|
-
axios.mergeConfig = mergeConfig;
|
5926
|
+
axios.mergeConfig = mergeConfig$1;
|
6020
5927
|
|
6021
|
-
axios.AxiosHeaders = AxiosHeaders;
|
5928
|
+
axios.AxiosHeaders = AxiosHeaders$1;
|
6022
5929
|
|
6023
5930
|
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
6024
5931
|
|
6025
5932
|
axios.getAdapter = adapters.getAdapter;
|
6026
5933
|
|
6027
|
-
axios.HttpStatusCode = HttpStatusCode;
|
5934
|
+
axios.HttpStatusCode = HttpStatusCode$1;
|
6028
5935
|
|
6029
5936
|
axios.default = axios;
|
6030
5937
|
|
5938
|
+
// This module is intended to unwrap Axios default export as named.
|
5939
|
+
// Keep top-level export same with static properties
|
5940
|
+
// so that it can keep same with es module or cjs
|
5941
|
+
const {
|
5942
|
+
Axios,
|
5943
|
+
AxiosError,
|
5944
|
+
CanceledError,
|
5945
|
+
isCancel,
|
5946
|
+
CancelToken,
|
5947
|
+
VERSION,
|
5948
|
+
all,
|
5949
|
+
Cancel,
|
5950
|
+
isAxiosError,
|
5951
|
+
spread,
|
5952
|
+
toFormData,
|
5953
|
+
AxiosHeaders,
|
5954
|
+
HttpStatusCode,
|
5955
|
+
formToJSON,
|
5956
|
+
getAdapter,
|
5957
|
+
mergeConfig
|
5958
|
+
} = axios;
|
5959
|
+
|
6031
5960
|
/**
|
6032
5961
|
* Keyword patterns for each RMN_SPOT_EVENT.
|
6033
5962
|
* Each event type has required keywords that must be present and optional ones.
|
@@ -6090,7 +6019,7 @@ function matchesKeywordPattern(words, required, optional) {
|
|
6090
6019
|
return false;
|
6091
6020
|
}
|
6092
6021
|
// If no optional keywords are specified, return true
|
6093
|
-
if (!(optional === null || optional ===
|
6022
|
+
if (!(optional === null || optional === void 0 ? void 0 : optional.length)) {
|
6094
6023
|
return true;
|
6095
6024
|
}
|
6096
6025
|
// If optional keywords exist, check if at least one matches as a whole word
|
@@ -6103,7 +6032,7 @@ function matchesKeywordPattern(words, required, optional) {
|
|
6103
6032
|
* @returns {RMN_SPOT_EVENT | null} - The corresponding RMN_SPOT_EVENT or null if no match
|
6104
6033
|
*/
|
6105
6034
|
function getEventTypeFromRawEvent(event) {
|
6106
|
-
if (!(event === null || event ===
|
6035
|
+
if (!(event === null || event === void 0 ? void 0 : event.trim())) {
|
6107
6036
|
return null;
|
6108
6037
|
}
|
6109
6038
|
const words = normalizeEventName(event);
|
@@ -7590,7 +7519,7 @@ class ObjectHelper {
|
|
7590
7519
|
else if (typeof value === 'object') {
|
7591
7520
|
return this.mergeObjectValues(targetValue, value);
|
7592
7521
|
}
|
7593
|
-
return (_a = value !== null && value !==
|
7522
|
+
return (_a = value !== null && value !== void 0 ? value : targetValue) !== null && _a !== void 0 ? _a : undefined;
|
7594
7523
|
}
|
7595
7524
|
/**
|
7596
7525
|
* Merges the values of an array or object with a given array of objects and returns the merged result as an object.
|
@@ -7671,7 +7600,7 @@ function xhrFallbackEventFire(url) {
|
|
7671
7600
|
}
|
7672
7601
|
function beaconEventFire(url) {
|
7673
7602
|
var _a;
|
7674
|
-
return (_a = navigator === null || navigator ===
|
7603
|
+
return (_a = navigator === null || navigator === void 0 ? void 0 : navigator.sendBeacon) === null || _a === void 0 ? void 0 : _a.call(navigator, url);
|
7675
7604
|
}
|
7676
7605
|
/**
|
7677
7606
|
* Helper function to decode base64 string and parse JSON
|
@@ -7792,7 +7721,7 @@ function calculateScaleFactor(elementScale) {
|
|
7792
7721
|
* @returns {string} - The query string.
|
7793
7722
|
*/
|
7794
7723
|
function objectToQueryParams(obj) {
|
7795
|
-
return Object.entries(obj !== null && obj !==
|
7724
|
+
return Object.entries(obj !== null && obj !== void 0 ? obj : {})
|
7796
7725
|
.map(([key, value]) => {
|
7797
7726
|
if (value == null) {
|
7798
7727
|
return '';
|
@@ -7941,7 +7870,7 @@ UniqueIdGenerator.base32Chars = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
|
|
7941
7870
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
7942
7871
|
|
7943
7872
|
function getAugmentedNamespace(n) {
|
7944
|
-
if (n
|
7873
|
+
if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
|
7945
7874
|
var f = n.default;
|
7946
7875
|
if (typeof f == "function") {
|
7947
7876
|
var a = function a () {
|
@@ -15724,6 +15653,11 @@ function checkSigCryptoKey(key, alg, ...usages) {
|
|
15724
15653
|
}
|
15725
15654
|
break;
|
15726
15655
|
}
|
15656
|
+
case 'Ed25519': {
|
15657
|
+
if (!isAlgorithm(key.algorithm, 'Ed25519'))
|
15658
|
+
throw unusable('Ed25519');
|
15659
|
+
break;
|
15660
|
+
}
|
15727
15661
|
case 'ES256':
|
15728
15662
|
case 'ES384':
|
15729
15663
|
case 'ES512': {
|
@@ -15903,6 +15837,10 @@ function subtleMapping(jwk) {
|
|
15903
15837
|
}
|
15904
15838
|
case 'OKP': {
|
15905
15839
|
switch (jwk.alg) {
|
15840
|
+
case 'Ed25519':
|
15841
|
+
algorithm = { name: 'Ed25519' };
|
15842
|
+
keyUsages = jwk.d ? ['sign'] : ['verify'];
|
15843
|
+
break;
|
15906
15844
|
case 'EdDSA':
|
15907
15845
|
algorithm = { name: jwk.crv };
|
15908
15846
|
keyUsages = jwk.d ? ['sign'] : ['verify'];
|
@@ -16018,7 +15956,7 @@ async function importJWK(jwk, alg) {
|
|
16018
15956
|
}
|
16019
15957
|
return decode(jwk.k);
|
16020
15958
|
case 'RSA':
|
16021
|
-
if (jwk.oth !== undefined) {
|
15959
|
+
if ('oth' in jwk && jwk.oth !== undefined) {
|
16022
15960
|
throw new JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
16023
15961
|
}
|
16024
15962
|
case 'EC':
|
@@ -16156,6 +16094,8 @@ function subtleDsa(alg, algorithm) {
|
|
16156
16094
|
case 'ES384':
|
16157
16095
|
case 'ES512':
|
16158
16096
|
return { hash, name: 'ECDSA', namedCurve: algorithm.namedCurve };
|
16097
|
+
case 'Ed25519':
|
16098
|
+
return { name: 'Ed25519' };
|
16159
16099
|
case 'EdDSA':
|
16160
16100
|
return { name: algorithm.name };
|
16161
16101
|
default:
|
@@ -16686,9 +16626,9 @@ class ApiError {
|
|
16686
16626
|
constructor(error) {
|
16687
16627
|
var _a, _b, _c, _d, _e, _f, _g;
|
16688
16628
|
const e = error;
|
16689
|
-
this.cause = (_d = (_b = (_a = e === null || e ===
|
16629
|
+
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;
|
16690
16630
|
this.errorMessage =
|
16691
|
-
(_g = (_f = (_e = e === null || e ===
|
16631
|
+
(_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.`;
|
16692
16632
|
}
|
16693
16633
|
}
|
16694
16634
|
|
@@ -16803,12 +16743,12 @@ class BaseApi extends BaseApiAbstract {
|
|
16803
16743
|
this.authInfo = auth;
|
16804
16744
|
this.encryptedApi = EncryptedApi.getInstance(this.authInfo.apiKey);
|
16805
16745
|
this.objectHelper = ObjectHelper.getInstance();
|
16806
|
-
this.baseUrl = (_a = SDK_CONFIG.url[this.authInfo.env]) !== null && _a !==
|
16746
|
+
this.baseUrl = (_a = SDK_CONFIG.url[this.authInfo.env]) !== null && _a !== void 0 ? _a : SDK_CONFIG.url.development;
|
16807
16747
|
const configHeaders = {
|
16808
16748
|
[SDK_CONFIG.accessHeader]: `Bearer ${this.authInfo.token}`,
|
16809
16749
|
};
|
16810
16750
|
const partnerSite = this.getPartnerSite();
|
16811
|
-
const isPartnerSiteValid = partnerSite === null || partnerSite ===
|
16751
|
+
const isPartnerSiteValid = partnerSite === null || partnerSite === void 0 ? void 0 : partnerSite.startsWith('http');
|
16812
16752
|
if (partnerSite && isPartnerSiteValid) {
|
16813
16753
|
configHeaders[REQUEST_CLOUD_PARTNER_SITE] = partnerSite;
|
16814
16754
|
}
|
@@ -16864,7 +16804,7 @@ class BaseApi extends BaseApiAbstract {
|
|
16864
16804
|
configOverrides = {
|
16865
16805
|
...configOverrides,
|
16866
16806
|
headers: {
|
16867
|
-
...configOverrides === null || configOverrides ===
|
16807
|
+
...configOverrides === null || configOverrides === void 0 ? void 0 : configOverrides.headers,
|
16868
16808
|
[REQUEST_CLOUD_PROTECTED_KEY]: 'true',
|
16869
16809
|
[REQUEST_CLOUD_PROTECTED_TIMESTAMP]: timestamp,
|
16870
16810
|
[SDK_CONFIG.apiHeader]: this.authInfo.apiKey,
|
@@ -16901,7 +16841,7 @@ class BaseApi extends BaseApiAbstract {
|
|
16901
16841
|
* @returns {AxiosRequestConfig} - The merged Axios request configuration.
|
16902
16842
|
*/
|
16903
16843
|
createFullConfig(configOverrides) {
|
16904
|
-
return this.objectHelper.merge(this.getConfig(), configOverrides !== null && configOverrides !==
|
16844
|
+
return this.objectHelper.merge(this.getConfig(), configOverrides !== null && configOverrides !== void 0 ? configOverrides : {});
|
16905
16845
|
}
|
16906
16846
|
/**
|
16907
16847
|
* Sends a request to the specified URL with the given configuration.
|
@@ -16925,17 +16865,17 @@ class BaseApi extends BaseApiAbstract {
|
|
16925
16865
|
*/
|
16926
16866
|
async getResponse(response) {
|
16927
16867
|
var _a, _b, _c, _d, _e, _f, _g;
|
16928
|
-
let responseData = (response === null || response ===
|
16868
|
+
let responseData = (response === null || response === void 0 ? void 0 : response.data) ? response.data : null;
|
16929
16869
|
let isEncrypted = false;
|
16930
16870
|
let timestamp = 0;
|
16931
|
-
if ((response === null || response ===
|
16932
|
-
((_a = response === null || response ===
|
16933
|
-
((_b = response === null || response ===
|
16934
|
-
((_c = response === null || response ===
|
16935
|
-
((_d = response === null || response ===
|
16936
|
-
isEncrypted = ((_e = response === null || response ===
|
16937
|
-
timestamp = ((_f = response === null || response ===
|
16938
|
-
? Number((_g = response === null || response ===
|
16871
|
+
if ((response === null || response === void 0 ? void 0 : response.headers) &&
|
16872
|
+
((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a.has) &&
|
16873
|
+
((_b = response === null || response === void 0 ? void 0 : response.headers) === null || _b === void 0 ? void 0 : _b.has(REQUEST_CLOUD_PROTECTED_KEY)) &&
|
16874
|
+
((_c = response === null || response === void 0 ? void 0 : response.headers) === null || _c === void 0 ? void 0 : _c.has(REQUEST_CLOUD_PROTECTED_TIMESTAMP)) &&
|
16875
|
+
((_d = response === null || response === void 0 ? void 0 : response.headers) === null || _d === void 0 ? void 0 : _d.get)) {
|
16876
|
+
isEncrypted = ((_e = response === null || response === void 0 ? void 0 : response.headers) === null || _e === void 0 ? void 0 : _e.get(REQUEST_CLOUD_PROTECTED_KEY)) === 'true';
|
16877
|
+
timestamp = ((_f = response === null || response === void 0 ? void 0 : response.headers) === null || _f === void 0 ? void 0 : _f.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
|
16878
|
+
? Number((_g = response === null || response === void 0 ? void 0 : response.headers) === null || _g === void 0 ? void 0 : _g.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
|
16939
16879
|
: 0;
|
16940
16880
|
}
|
16941
16881
|
if (responseData &&
|
@@ -16944,7 +16884,7 @@ class BaseApi extends BaseApiAbstract {
|
|
16944
16884
|
timestamp > 0) {
|
16945
16885
|
const { t: encryptedPayload } = responseData;
|
16946
16886
|
const decryptedData = await this.encryptedApi.handleDecryption(encryptedPayload, timestamp);
|
16947
|
-
if (decryptedData === null || decryptedData ===
|
16887
|
+
if (decryptedData === null || decryptedData === void 0 ? void 0 : decryptedData.payload) {
|
16948
16888
|
delete decryptedData.payload.exp;
|
16949
16889
|
delete decryptedData.payload.iat;
|
16950
16890
|
responseData = decryptedData.payload;
|
@@ -16998,9 +16938,9 @@ class AuthService extends BaseApi {
|
|
16998
16938
|
},
|
16999
16939
|
});
|
17000
16940
|
if (isErr) {
|
17001
|
-
throw new Error(`There was an error during authentication: (${isErr === null || isErr ===
|
16941
|
+
throw new Error(`There was an error during authentication: (${isErr === null || isErr === void 0 ? void 0 : isErr.errorMessage})`);
|
17002
16942
|
}
|
17003
|
-
if (isOk && (val === null || val ===
|
16943
|
+
if (isOk && (val === null || val === void 0 ? void 0 : val.data.token)) {
|
17004
16944
|
this.authInfo.token = val.data.token;
|
17005
16945
|
this.authInfo.authenticated = true;
|
17006
16946
|
}
|
@@ -17140,7 +17080,7 @@ class BaseSpotComponent extends BaseElement {
|
|
17140
17080
|
const isMobileNewValue = e.matches;
|
17141
17081
|
if (this._isMobileDevice !== isMobileNewValue) {
|
17142
17082
|
this._isMobileDevice = isMobileNewValue;
|
17143
|
-
(_a = this.onDeviceChange) === null || _a ===
|
17083
|
+
(_a = this.onDeviceChange) === null || _a === void 0 ? void 0 : _a.call(this, this._isMobileDevice);
|
17144
17084
|
if (this.reRenderOnDeviceChange) {
|
17145
17085
|
this.render();
|
17146
17086
|
}
|
@@ -17161,13 +17101,13 @@ class BaseSpotComponent extends BaseElement {
|
|
17161
17101
|
this.render();
|
17162
17102
|
this.setupDeviceDetection();
|
17163
17103
|
}
|
17164
|
-
(_a = this.connected) === null || _a ===
|
17104
|
+
(_a = this.connected) === null || _a === void 0 ? void 0 : _a.call(this);
|
17165
17105
|
}
|
17166
17106
|
disconnectedCallback() {
|
17167
17107
|
var _a;
|
17168
17108
|
if (!isBrowser)
|
17169
17109
|
return;
|
17170
|
-
(_a = this.disconnected) === null || _a ===
|
17110
|
+
(_a = this.disconnected) === null || _a === void 0 ? void 0 : _a.call(this);
|
17171
17111
|
}
|
17172
17112
|
}
|
17173
17113
|
|
@@ -17210,11 +17150,11 @@ class LocalStorageService {
|
|
17210
17150
|
setSpot(spotId, data) {
|
17211
17151
|
var _a, _b, _c, _d, _e;
|
17212
17152
|
data.createdAt = Date.now();
|
17213
|
-
const isExistentSpot = (_a = this.spots) === null || _a ===
|
17153
|
+
const isExistentSpot = (_a = this.spots) === null || _a === void 0 ? void 0 : _a.has(spotId);
|
17214
17154
|
if (isExistentSpot) {
|
17215
|
-
data.firedEvents = (_d = (_c = (_b = this.spots) === null || _b ===
|
17155
|
+
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 : [];
|
17216
17156
|
}
|
17217
|
-
(_e = this.spots) === null || _e ===
|
17157
|
+
(_e = this.spots) === null || _e === void 0 ? void 0 : _e.set(spotId, data);
|
17218
17158
|
this.updateLocalStorage();
|
17219
17159
|
}
|
17220
17160
|
// public removeSpot(spotId: string): void {
|
@@ -17259,12 +17199,12 @@ class LocalStorageService {
|
|
17259
17199
|
setUserId() {
|
17260
17200
|
var _a;
|
17261
17201
|
const prefix = LocalStorageService.localStorageKeyPrefix;
|
17262
|
-
const existingKeys = Object.keys((_a = window.localStorage) !== null && _a !==
|
17202
|
+
const existingKeys = Object.keys((_a = window.localStorage) !== null && _a !== void 0 ? _a : {}).filter((key) => key.startsWith(prefix));
|
17263
17203
|
const setNewKey = () => {
|
17264
17204
|
var _a;
|
17265
17205
|
const uniqueId = UniqueIdGenerator.generate();
|
17266
17206
|
const newLocalStorageKey = `${prefix}_${uniqueId}`;
|
17267
|
-
(_a = window.localStorage) === null || _a ===
|
17207
|
+
(_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.setItem(newLocalStorageKey, '');
|
17268
17208
|
LocalStorageService.localStorageKey = newLocalStorageKey;
|
17269
17209
|
};
|
17270
17210
|
if (existingKeys.length === 0) {
|
@@ -17276,7 +17216,7 @@ class LocalStorageService {
|
|
17276
17216
|
existingKeys.forEach((key) => {
|
17277
17217
|
var _a;
|
17278
17218
|
if (key !== validKey) {
|
17279
|
-
(_a = window.localStorage) === null || _a ===
|
17219
|
+
(_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.removeItem(key);
|
17280
17220
|
}
|
17281
17221
|
});
|
17282
17222
|
if (validKey) {
|
@@ -17292,7 +17232,7 @@ class LocalStorageService {
|
|
17292
17232
|
// ======================== Utility functions ======================== //
|
17293
17233
|
syncLocalStorage() {
|
17294
17234
|
var _a;
|
17295
|
-
const localStorageData = (_a = window.localStorage) === null || _a ===
|
17235
|
+
const localStorageData = (_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(LocalStorageService.localStorageKey);
|
17296
17236
|
if (localStorageData) {
|
17297
17237
|
try {
|
17298
17238
|
const decryptedData = this.decryptData(localStorageData);
|
@@ -17331,15 +17271,15 @@ class LocalStorageService {
|
|
17331
17271
|
}
|
17332
17272
|
clearLocalStorage() {
|
17333
17273
|
var _a;
|
17334
|
-
(_a = window.localStorage) === null || _a ===
|
17274
|
+
(_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.removeItem(LocalStorageService.localStorageKey);
|
17335
17275
|
}
|
17336
17276
|
removeExpiredSpots() {
|
17337
17277
|
var _a;
|
17338
17278
|
const currentTime = Date.now();
|
17339
|
-
(_a = this.spots) === null || _a ===
|
17279
|
+
(_a = this.spots) === null || _a === void 0 ? void 0 : _a.forEach((spot, spotId) => {
|
17340
17280
|
var _a, _b;
|
17341
|
-
if (currentTime - ((_a = spot.createdAt) !== null && _a !==
|
17342
|
-
(_b = this.spots) === null || _b ===
|
17281
|
+
if (currentTime - ((_a = spot.createdAt) !== null && _a !== void 0 ? _a : 0) > LocalStorageService.spotExpirationTime) {
|
17282
|
+
(_b = this.spots) === null || _b === void 0 ? void 0 : _b.delete(spotId);
|
17343
17283
|
}
|
17344
17284
|
});
|
17345
17285
|
this.updateLocalStorage();
|
@@ -17375,9 +17315,9 @@ class LocalStorageService {
|
|
17375
17315
|
obj.spotId,
|
17376
17316
|
obj.spotType,
|
17377
17317
|
this.spotEventObjectToArray(obj.events),
|
17378
|
-
(_b = (_a = obj.firedEvents) === null || _a ===
|
17318
|
+
(_b = (_a = obj.firedEvents) === null || _a === void 0 ? void 0 : _a.map((event) => [event.productId, event.event])) !== null && _b !== void 0 ? _b : [],
|
17379
17319
|
obj.productIds,
|
17380
|
-
(_c = obj.createdAt) !== null && _c !==
|
17320
|
+
(_c = obj.createdAt) !== null && _c !== void 0 ? _c : 0,
|
17381
17321
|
];
|
17382
17322
|
}
|
17383
17323
|
/**
|
@@ -17447,8 +17387,8 @@ class ProximityObserver {
|
|
17447
17387
|
this.targetIds = new Set(elementIds);
|
17448
17388
|
this.processedIds = new Set();
|
17449
17389
|
this.callback = callback;
|
17450
|
-
this.proximityThreshold = (_a = options.proximityThreshold) !== null && _a !==
|
17451
|
-
this.intersectionMargin = (_b = options.intersectionMargin) !== null && _b !==
|
17390
|
+
this.proximityThreshold = (_a = options.proximityThreshold) !== null && _a !== void 0 ? _a : 500;
|
17391
|
+
this.intersectionMargin = (_b = options.intersectionMargin) !== null && _b !== void 0 ? _b : '2000px';
|
17452
17392
|
this.initializeObservers();
|
17453
17393
|
this.observeExistingElements();
|
17454
17394
|
}
|
@@ -17489,7 +17429,7 @@ class ProximityObserver {
|
|
17489
17429
|
});
|
17490
17430
|
// Start observing DOM changes
|
17491
17431
|
if (document.body) {
|
17492
|
-
(_a = this.mutationObserver) === null || _a ===
|
17432
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(document.body, {
|
17493
17433
|
childList: true,
|
17494
17434
|
subtree: true,
|
17495
17435
|
});
|
@@ -17499,13 +17439,13 @@ class ProximityObserver {
|
|
17499
17439
|
var _a;
|
17500
17440
|
if (element.id && this.processedIds.has(element.id)) {
|
17501
17441
|
this.processedIds.delete(element.id);
|
17502
|
-
(_a = this.intersectionObserver) === null || _a ===
|
17442
|
+
(_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.unobserve(element);
|
17503
17443
|
}
|
17504
17444
|
}
|
17505
17445
|
checkElement(element) {
|
17506
17446
|
var _a;
|
17507
17447
|
if (element.id && this.targetIds.has(element.id) && !this.processedIds.has(element.id)) {
|
17508
|
-
(_a = this.intersectionObserver) === null || _a ===
|
17448
|
+
(_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.observe(element);
|
17509
17449
|
}
|
17510
17450
|
}
|
17511
17451
|
findNearbyTargetIds(element) {
|
@@ -17552,7 +17492,7 @@ class ProximityObserver {
|
|
17552
17492
|
this.processedIds.add(id);
|
17553
17493
|
const el = document.getElementById(id);
|
17554
17494
|
if (el)
|
17555
|
-
(_a = this.intersectionObserver) === null || _a ===
|
17495
|
+
(_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.unobserve(el);
|
17556
17496
|
});
|
17557
17497
|
// Trigger callback with the group
|
17558
17498
|
this.callback(groupIdsToProcess);
|
@@ -17675,7 +17615,7 @@ class ResizeObserverService {
|
|
17675
17615
|
this.container = element.parentElement;
|
17676
17616
|
this.setDimensions(maxSize, minScale);
|
17677
17617
|
this.resizeObserver = new ResizeObserver(() => this.updateElementSize());
|
17678
|
-
(_a = this.resizeObserver) === null || _a ===
|
17618
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.container);
|
17679
17619
|
// Initial size update
|
17680
17620
|
this.updateElementSize();
|
17681
17621
|
}
|
@@ -17731,7 +17671,7 @@ class ResizeObserverService {
|
|
17731
17671
|
}
|
17732
17672
|
disconnect() {
|
17733
17673
|
var _a;
|
17734
|
-
(_a = this.resizeObserver) === null || _a ===
|
17674
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
17735
17675
|
}
|
17736
17676
|
}
|
17737
17677
|
|
@@ -17791,7 +17731,7 @@ function importFonts(...fonts) {
|
|
17791
17731
|
].join('');
|
17792
17732
|
}
|
17793
17733
|
function renderElement(tag, className, content) {
|
17794
|
-
return (content === null || content ===
|
17734
|
+
return (content === null || content === void 0 ? void 0 : content.trim()) ? `<${tag} class="${className}">${content}</${tag}>` : '';
|
17795
17735
|
}
|
17796
17736
|
|
17797
17737
|
class BillboardV1SE extends BaseSpotComponent {
|
@@ -17805,7 +17745,7 @@ class BillboardV1SE extends BaseSpotComponent {
|
|
17805
17745
|
disconnected() {
|
17806
17746
|
var _a;
|
17807
17747
|
this.removeEventListener('spotSizeChanged', this.handleSpotSizeChanged);
|
17808
|
-
(_a = this.resizeObserver) === null || _a ===
|
17748
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
17809
17749
|
}
|
17810
17750
|
setupResizeObserver() {
|
17811
17751
|
if (!this._config.fluid) {
|
@@ -17828,7 +17768,7 @@ class BillboardV1SE extends BaseSpotComponent {
|
|
17828
17768
|
var _a;
|
17829
17769
|
// Find all text elements within the shadow root
|
17830
17770
|
const selectors = ['h2', 'p', 'span'].join(', ');
|
17831
|
-
const elements = (_a = this.shadowRoot) === null || _a ===
|
17771
|
+
const elements = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selectors);
|
17832
17772
|
if (!elements)
|
17833
17773
|
return;
|
17834
17774
|
const scaleFactor = calculateScaleFactor(elementScale);
|
@@ -18112,7 +18052,6 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18112
18052
|
background-size: cover;
|
18113
18053
|
background-repeat: no-repeat;
|
18114
18054
|
background-position: center;
|
18115
|
-
padding: 3%;
|
18116
18055
|
box-sizing: border-box;
|
18117
18056
|
color: ${textColor};
|
18118
18057
|
cursor: pointer;
|
@@ -18124,7 +18063,6 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18124
18063
|
flex-direction: column;
|
18125
18064
|
justify-content: flex-start;
|
18126
18065
|
align-items: flex-start;
|
18127
|
-
width: 100%;
|
18128
18066
|
height: fit-content;
|
18129
18067
|
gap: 8px;
|
18130
18068
|
position: absolute;
|
@@ -18134,12 +18072,14 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18134
18072
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
18135
18073
|
top: 3%;
|
18136
18074
|
left: 3%;
|
18075
|
+
right: 3%;
|
18137
18076
|
align-items: flex-start;
|
18138
18077
|
text-align: left;
|
18139
18078
|
}
|
18140
18079
|
|
18141
18080
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
18142
18081
|
top: 3%;
|
18082
|
+
left: 3%;
|
18143
18083
|
right: 3%;
|
18144
18084
|
align-items: flex-end;
|
18145
18085
|
text-align: right;
|
@@ -18148,6 +18088,7 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18148
18088
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
18149
18089
|
top: 50%;
|
18150
18090
|
left: 3%;
|
18091
|
+
right: 3%;
|
18151
18092
|
transform: translateY(-50%);
|
18152
18093
|
align-items: flex-start;
|
18153
18094
|
text-align: left;
|
@@ -18155,6 +18096,7 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18155
18096
|
|
18156
18097
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
18157
18098
|
top: 50%;
|
18099
|
+
left: 3%;
|
18158
18100
|
right: 3%;
|
18159
18101
|
transform: translateY(-50%);
|
18160
18102
|
align-items: flex-end;
|
@@ -18164,12 +18106,14 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18164
18106
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
18165
18107
|
bottom: 3%;
|
18166
18108
|
left: 3%;
|
18109
|
+
right: 3%;
|
18167
18110
|
align-items: flex-start;
|
18168
18111
|
text-align: left;
|
18169
18112
|
}
|
18170
18113
|
|
18171
18114
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
18172
18115
|
bottom: 3%;
|
18116
|
+
left: 3%;
|
18173
18117
|
right: 3%;
|
18174
18118
|
align-items: flex-end;
|
18175
18119
|
text-align: right;
|
@@ -18228,19 +18172,21 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18228
18172
|
: `background-image: url("${primaryImage}");`}
|
18229
18173
|
}
|
18230
18174
|
|
18231
|
-
.${prefix}__text {
|
18232
|
-
width:
|
18175
|
+
.${prefix}__text > * {
|
18176
|
+
max-width: 60%;
|
18233
18177
|
}
|
18234
18178
|
|
18235
18179
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
18236
18180
|
top: 3%;
|
18237
18181
|
left: 3%;
|
18182
|
+
right: 3%;
|
18238
18183
|
align-items: flex-start;
|
18239
18184
|
text-align: left;
|
18240
18185
|
}
|
18241
18186
|
|
18242
18187
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
18243
18188
|
top: 3%;
|
18189
|
+
left: 3%;
|
18244
18190
|
right: 3%;
|
18245
18191
|
align-items: flex-end;
|
18246
18192
|
text-align: right;
|
@@ -18249,6 +18195,7 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18249
18195
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
18250
18196
|
top: 50%;
|
18251
18197
|
left: 3%;
|
18198
|
+
right: 3%;
|
18252
18199
|
transform: translateY(-50%);
|
18253
18200
|
align-items: flex-start;
|
18254
18201
|
text-align: left;
|
@@ -18256,6 +18203,7 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18256
18203
|
|
18257
18204
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
18258
18205
|
top: 50%;
|
18206
|
+
left: 3%;
|
18259
18207
|
right: 3%;
|
18260
18208
|
transform: translateY(-50%);
|
18261
18209
|
align-items: flex-end;
|
@@ -18265,12 +18213,14 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18265
18213
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
18266
18214
|
bottom: 3%;
|
18267
18215
|
left: 3%;
|
18216
|
+
right: 3%;
|
18268
18217
|
align-items: flex-start;
|
18269
18218
|
text-align: left;
|
18270
18219
|
}
|
18271
18220
|
|
18272
18221
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
18273
18222
|
bottom: 3%;
|
18223
|
+
left: 3%;
|
18274
18224
|
right: 3%;
|
18275
18225
|
align-items: flex-end;
|
18276
18226
|
text-align: right;
|
@@ -19293,7 +19243,6 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19293
19243
|
background-size: cover;
|
19294
19244
|
background-repeat: no-repeat;
|
19295
19245
|
background-position: center;
|
19296
|
-
padding: 3%;
|
19297
19246
|
box-sizing: border-box;
|
19298
19247
|
color: ${textColor};
|
19299
19248
|
cursor: pointer;
|
@@ -19305,7 +19254,6 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19305
19254
|
flex-direction: column;
|
19306
19255
|
justify-content: flex-start;
|
19307
19256
|
align-items: flex-start;
|
19308
|
-
width: 100%;
|
19309
19257
|
height: fit-content;
|
19310
19258
|
gap: 8px;
|
19311
19259
|
position: absolute;
|
@@ -19315,12 +19263,14 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19315
19263
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
19316
19264
|
top: 3%;
|
19317
19265
|
left: 3%;
|
19266
|
+
right: 3%;
|
19318
19267
|
align-items: flex-start;
|
19319
19268
|
text-align: left;
|
19320
19269
|
}
|
19321
19270
|
|
19322
19271
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
19323
19272
|
top: 3%;
|
19273
|
+
left: 3%;
|
19324
19274
|
right: 3%;
|
19325
19275
|
align-items: flex-end;
|
19326
19276
|
text-align: right;
|
@@ -19329,6 +19279,7 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19329
19279
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
19330
19280
|
top: 50%;
|
19331
19281
|
left: 3%;
|
19282
|
+
right: 3%;
|
19332
19283
|
transform: translateY(-50%);
|
19333
19284
|
align-items: flex-start;
|
19334
19285
|
text-align: left;
|
@@ -19336,6 +19287,7 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19336
19287
|
|
19337
19288
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
19338
19289
|
top: 50%;
|
19290
|
+
left: 3%;
|
19339
19291
|
right: 3%;
|
19340
19292
|
transform: translateY(-50%);
|
19341
19293
|
align-items: flex-end;
|
@@ -19345,12 +19297,14 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19345
19297
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
19346
19298
|
bottom: 3%;
|
19347
19299
|
left: 3%;
|
19300
|
+
right: 3%;
|
19348
19301
|
align-items: flex-start;
|
19349
19302
|
text-align: left;
|
19350
19303
|
}
|
19351
19304
|
|
19352
19305
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
19353
19306
|
bottom: 3%;
|
19307
|
+
left: 3%;
|
19354
19308
|
right: 3%;
|
19355
19309
|
align-items: flex-end;
|
19356
19310
|
text-align: right;
|
@@ -19364,19 +19318,21 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19364
19318
|
: `background-image: url("${primaryImage}");`}
|
19365
19319
|
}
|
19366
19320
|
|
19367
|
-
.${prefix}__text {
|
19368
|
-
width:
|
19321
|
+
.${prefix}__text > * {
|
19322
|
+
max-width: 60%;
|
19369
19323
|
}
|
19370
19324
|
|
19371
19325
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
19372
19326
|
top: 3%;
|
19373
19327
|
left: 3%;
|
19328
|
+
right: 3%;
|
19374
19329
|
align-items: flex-start;
|
19375
19330
|
text-align: left;
|
19376
19331
|
}
|
19377
19332
|
|
19378
19333
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
19379
19334
|
top: 3%;
|
19335
|
+
left: 3%;
|
19380
19336
|
right: 3%;
|
19381
19337
|
align-items: flex-end;
|
19382
19338
|
text-align: right;
|
@@ -19385,6 +19341,7 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19385
19341
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
19386
19342
|
top: 50%;
|
19387
19343
|
left: 3%;
|
19344
|
+
right: 3%;
|
19388
19345
|
transform: translateY(-50%);
|
19389
19346
|
align-items: flex-start;
|
19390
19347
|
text-align: left;
|
@@ -19392,6 +19349,7 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19392
19349
|
|
19393
19350
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
19394
19351
|
top: 50%;
|
19352
|
+
left: 3%;
|
19395
19353
|
right: 3%;
|
19396
19354
|
transform: translateY(-50%);
|
19397
19355
|
align-items: flex-end;
|
@@ -19401,12 +19359,14 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19401
19359
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
19402
19360
|
bottom: 3%;
|
19403
19361
|
left: 3%;
|
19362
|
+
right: 3%;
|
19404
19363
|
align-items: flex-start;
|
19405
19364
|
text-align: left;
|
19406
19365
|
}
|
19407
19366
|
|
19408
19367
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
19409
19368
|
bottom: 3%;
|
19369
|
+
left: 3%;
|
19410
19370
|
right: 3%;
|
19411
19371
|
align-items: flex-end;
|
19412
19372
|
text-align: right;
|
@@ -19843,13 +19803,13 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
19843
19803
|
if (!this.video)
|
19844
19804
|
return;
|
19845
19805
|
const muteButton = this._container.querySelector(this.muteButtonSelector());
|
19846
|
-
muteButton === null || muteButton ===
|
19806
|
+
muteButton === null || muteButton === void 0 ? void 0 : muteButton.addEventListener('click', this.handleMuteToggle);
|
19847
19807
|
}
|
19848
19808
|
removeEventListeners() {
|
19849
19809
|
if (!this.video)
|
19850
19810
|
return;
|
19851
19811
|
const muteButton = this._container.querySelector(this.muteButtonSelector());
|
19852
|
-
muteButton === null || muteButton ===
|
19812
|
+
muteButton === null || muteButton === void 0 ? void 0 : muteButton.removeEventListener('click', this.handleMuteToggle);
|
19853
19813
|
}
|
19854
19814
|
getGradientDirection(position) {
|
19855
19815
|
switch (position) {
|
@@ -20031,7 +19991,6 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20031
19991
|
flex-direction: column;
|
20032
19992
|
justify-content: flex-start;
|
20033
19993
|
align-items: flex-start;
|
20034
|
-
width: 100%;
|
20035
19994
|
height: fit-content;
|
20036
19995
|
gap: 8px;
|
20037
19996
|
position: absolute;
|
@@ -20049,12 +20008,14 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20049
20008
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
20050
20009
|
top: 3%;
|
20051
20010
|
left: 3%;
|
20011
|
+
right: 3%;
|
20052
20012
|
align-items: flex-start;
|
20053
20013
|
text-align: left;
|
20054
20014
|
}
|
20055
20015
|
|
20056
20016
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
20057
20017
|
top: 3%;
|
20018
|
+
left: 3%;
|
20058
20019
|
right: 3%;
|
20059
20020
|
align-items: flex-end;
|
20060
20021
|
text-align: right;
|
@@ -20063,6 +20024,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20063
20024
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
20064
20025
|
top: 50%;
|
20065
20026
|
left: 3%;
|
20027
|
+
right: 3%;
|
20066
20028
|
transform: translateY(-50%);
|
20067
20029
|
align-items: flex-start;
|
20068
20030
|
text-align: left;
|
@@ -20070,6 +20032,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20070
20032
|
|
20071
20033
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
20072
20034
|
top: 50%;
|
20035
|
+
left: 3%;
|
20073
20036
|
right: 3%;
|
20074
20037
|
transform: translateY(-50%);
|
20075
20038
|
align-items: flex-end;
|
@@ -20079,12 +20042,14 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20079
20042
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
20080
20043
|
bottom: 3%;
|
20081
20044
|
left: 3%;
|
20045
|
+
right: 3%;
|
20082
20046
|
align-items: flex-start;
|
20083
20047
|
text-align: left;
|
20084
20048
|
}
|
20085
20049
|
|
20086
20050
|
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
20087
20051
|
bottom: 3%;
|
20052
|
+
left: 3%;
|
20088
20053
|
right: 3%;
|
20089
20054
|
align-items: flex-end;
|
20090
20055
|
text-align: right;
|
@@ -20098,19 +20063,21 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20098
20063
|
: ``}
|
20099
20064
|
}
|
20100
20065
|
|
20101
|
-
.${prefix}__text {
|
20102
|
-
width:
|
20066
|
+
.${prefix}__text > * {
|
20067
|
+
max-width: 60%;
|
20103
20068
|
}
|
20104
20069
|
|
20105
20070
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
20106
20071
|
top: 3%;
|
20107
20072
|
left: 3%;
|
20073
|
+
right: 3%;
|
20108
20074
|
align-items: flex-start;
|
20109
20075
|
text-align: left;
|
20110
20076
|
}
|
20111
20077
|
|
20112
20078
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
20113
20079
|
top: 3%;
|
20080
|
+
left: 3%;
|
20114
20081
|
right: 3%;
|
20115
20082
|
align-items: flex-end;
|
20116
20083
|
text-align: right;
|
@@ -20119,6 +20086,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20119
20086
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
20120
20087
|
top: 50%;
|
20121
20088
|
left: 3%;
|
20089
|
+
right: 3%;
|
20122
20090
|
transform: translateY(-50%);
|
20123
20091
|
align-items: flex-start;
|
20124
20092
|
text-align: left;
|
@@ -20126,6 +20094,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20126
20094
|
|
20127
20095
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
20128
20096
|
top: 50%;
|
20097
|
+
left: 3%;
|
20129
20098
|
right: 3%;
|
20130
20099
|
transform: translateY(-50%);
|
20131
20100
|
align-items: flex-end;
|
@@ -20135,12 +20104,14 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20135
20104
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
20136
20105
|
bottom: 3%;
|
20137
20106
|
left: 3%;
|
20107
|
+
right: 3%;
|
20138
20108
|
align-items: flex-start;
|
20139
20109
|
text-align: left;
|
20140
20110
|
}
|
20141
20111
|
|
20142
20112
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
20143
20113
|
bottom: 3%;
|
20114
|
+
left: 3%;
|
20144
20115
|
right: 3%;
|
20145
20116
|
align-items: flex-end;
|
20146
20117
|
text-align: right;
|
@@ -20206,12 +20177,6 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20206
20177
|
opacity: 0.8;
|
20207
20178
|
}
|
20208
20179
|
|
20209
|
-
@container (min-width: 640px) {
|
20210
|
-
.${prefix}__text {
|
20211
|
-
width: 70%;
|
20212
|
-
}
|
20213
|
-
}
|
20214
|
-
|
20215
20180
|
@container (min-width: 768px) {
|
20216
20181
|
.${prefix}__description {
|
20217
20182
|
font-size: 12px;
|
@@ -20254,7 +20219,7 @@ class SpotTemplateService {
|
|
20254
20219
|
const variantClasses = this.isRbSpot(spotType) ? this.rbTemplates : this.iabTemplates;
|
20255
20220
|
if (!variantClasses)
|
20256
20221
|
return null;
|
20257
|
-
const spotClass = ((_a = variantClasses[spotType]) === null || _a ===
|
20222
|
+
const spotClass = ((_a = variantClasses[spotType]) === null || _a === void 0 ? void 0 : _a[spotVariant]) || null;
|
20258
20223
|
if (!spotClass)
|
20259
20224
|
return null;
|
20260
20225
|
return spotClass;
|
@@ -20588,7 +20553,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
20588
20553
|
disconnectedCallback() {
|
20589
20554
|
var _a;
|
20590
20555
|
this.cleanupEventListeners();
|
20591
|
-
(_a = this.resizeObserver) === null || _a ===
|
20556
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
20592
20557
|
}
|
20593
20558
|
setupResizeObserver() {
|
20594
20559
|
if (this.data && !this.data.fluid) {
|
@@ -20609,14 +20574,14 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
20609
20574
|
*/
|
20610
20575
|
initializeState() {
|
20611
20576
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
20612
|
-
this.state.useDots = Boolean((_a = this.data) === null || _a ===
|
20613
|
-
this.state.useButtons = Boolean((_b = this.data) === null || _b ===
|
20614
|
-
this.state.autoplay = (_d = (_c = this.data) === null || _c ===
|
20615
|
-
this.state.interval = (_f = (_e = this.data) === null || _e ===
|
20616
|
-
if (typeof ((_g = this.data) === null || _g ===
|
20577
|
+
this.state.useDots = Boolean((_a = this.data) === null || _a === void 0 ? void 0 : _a.useDots);
|
20578
|
+
this.state.useButtons = Boolean((_b = this.data) === null || _b === void 0 ? void 0 : _b.useButtons);
|
20579
|
+
this.state.autoplay = (_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c.autoplay) !== null && _d !== void 0 ? _d : true;
|
20580
|
+
this.state.interval = (_f = (_e = this.data) === null || _e === void 0 ? void 0 : _e.interval) !== null && _f !== void 0 ? _f : CustomCarouselElement.defaultConfigs.interval;
|
20581
|
+
if (typeof ((_g = this.data) === null || _g === void 0 ? void 0 : _g.useDots) === 'object') {
|
20617
20582
|
this.state.dots = { ...this.state.dots, ...this.data.useDots };
|
20618
20583
|
}
|
20619
|
-
if (typeof ((_h = this.data) === null || _h ===
|
20584
|
+
if (typeof ((_h = this.data) === null || _h === void 0 ? void 0 : _h.useButtons) === 'object') {
|
20620
20585
|
this.state.buttons = { ...this.state.buttons, ...this.data.useButtons };
|
20621
20586
|
}
|
20622
20587
|
this.validateConfiguration();
|
@@ -21080,7 +21045,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
21080
21045
|
}
|
21081
21046
|
this.state.isVirtualizing = false;
|
21082
21047
|
// Force reflow to ensure the style change takes effect immediately
|
21083
|
-
void ((_a = this.elements.slidesContainer) === null || _a ===
|
21048
|
+
void ((_a = this.elements.slidesContainer) === null || _a === void 0 ? void 0 : _a.offsetHeight);
|
21084
21049
|
}
|
21085
21050
|
/**
|
21086
21051
|
* Updates dot active states
|
@@ -21189,8 +21154,8 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
21189
21154
|
});
|
21190
21155
|
}
|
21191
21156
|
if (this.state.useButtons) {
|
21192
|
-
(_a = this.elements.prevButton) === null || _a ===
|
21193
|
-
(_b = this.elements.nextButton) === null || _b ===
|
21157
|
+
(_a = this.elements.prevButton) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => this.handleNavigation('prev'));
|
21158
|
+
(_b = this.elements.nextButton) === null || _b === void 0 ? void 0 : _b.addEventListener('click', () => this.handleNavigation('next'));
|
21194
21159
|
}
|
21195
21160
|
}
|
21196
21161
|
/**
|
@@ -21377,7 +21342,7 @@ class ElementService {
|
|
21377
21342
|
const dimensions = SPOT_DIMENSIONS[params.spotType];
|
21378
21343
|
skeleton.data = {
|
21379
21344
|
spotType: params.spotType,
|
21380
|
-
fluid: (params === null || params ===
|
21345
|
+
fluid: (params === null || params === void 0 ? void 0 : params.fluid) === undefined ? false : params.fluid,
|
21381
21346
|
...dimensions,
|
21382
21347
|
};
|
21383
21348
|
return skeleton;
|
@@ -21467,16 +21432,16 @@ class DataLayerMonitor {
|
|
21467
21432
|
}
|
21468
21433
|
extractProductData(event) {
|
21469
21434
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
21470
|
-
const items = ((_a = event === null || event ===
|
21471
|
-
((_b = event === null || event ===
|
21472
|
-
((_c = event === null || event ===
|
21473
|
-
((_e = (_d = event === null || event ===
|
21474
|
-
((_g = (_f = event === null || event ===
|
21475
|
-
((_j = (_h = event === null || event ===
|
21476
|
-
((_l = (_k = event === null || event ===
|
21477
|
-
((_o = (_m = event === null || event ===
|
21478
|
-
((_q = (_p = event === null || event ===
|
21479
|
-
(event === null || event ===
|
21435
|
+
const items = ((_a = event === null || event === void 0 ? void 0 : event.value) === null || _a === void 0 ? void 0 : _a.items) ||
|
21436
|
+
((_b = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _b === void 0 ? void 0 : _b.items) ||
|
21437
|
+
((_c = event === null || event === void 0 ? void 0 : event.ecommerce) === null || _c === void 0 ? void 0 : _c.products) ||
|
21438
|
+
((_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) ||
|
21439
|
+
((_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) ||
|
21440
|
+
((_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) ||
|
21441
|
+
((_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) ||
|
21442
|
+
((_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) ||
|
21443
|
+
((_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) ||
|
21444
|
+
(event === null || event === void 0 ? void 0 : event.products) ||
|
21480
21445
|
[];
|
21481
21446
|
return items.map((item) => {
|
21482
21447
|
const data = {
|
@@ -21532,7 +21497,7 @@ class MonitorService {
|
|
21532
21497
|
return;
|
21533
21498
|
this.implementedMonitor.setListener(async (eventData) => {
|
21534
21499
|
var _a;
|
21535
|
-
await this.matchAndFireEvent(eventData, (_a = this.localStorageService) === null || _a ===
|
21500
|
+
await this.matchAndFireEvent(eventData, (_a = this.localStorageService) === null || _a === void 0 ? void 0 : _a.getSpots());
|
21536
21501
|
});
|
21537
21502
|
this.implementedMonitor.start();
|
21538
21503
|
}
|
@@ -21548,14 +21513,14 @@ class MonitorService {
|
|
21548
21513
|
continue;
|
21549
21514
|
}
|
21550
21515
|
const firedEvents = spot.firedEvents || [];
|
21551
|
-
const eventProductId = (_a = this.normalizeStringHelper) === null || _a ===
|
21516
|
+
const eventProductId = (_a = this.normalizeStringHelper) === null || _a === void 0 ? void 0 : _a.normalize(String(data.id));
|
21552
21517
|
const isEventAlreadyFired = firedEvents.some((event) => event.productId === eventProductId && event.event === eventData.event);
|
21553
21518
|
if (isEventAlreadyFired) {
|
21554
21519
|
continue;
|
21555
21520
|
}
|
21556
|
-
const spotRelatedProductIdsSet = new Set(spot.productIds.map((id) => { var _a; return (_a = this.normalizeStringHelper) === null || _a ===
|
21557
|
-
const eventProductBrand = (_b = this.normalizeStringHelper) === null || _b ===
|
21558
|
-
const eventVariantBrand = (_c = this.normalizeStringHelper) === null || _c ===
|
21521
|
+
const spotRelatedProductIdsSet = new Set(spot.productIds.map((id) => { var _a; return (_a = this.normalizeStringHelper) === null || _a === void 0 ? void 0 : _a.normalize(String(id)); }));
|
21522
|
+
const eventProductBrand = (_b = this.normalizeStringHelper) === null || _b === void 0 ? void 0 : _b.normalize(String(data.brand));
|
21523
|
+
const eventVariantBrand = (_c = this.normalizeStringHelper) === null || _c === void 0 ? void 0 : _c.normalize(String(data.variant));
|
21559
21524
|
const isProductMatch = [eventProductId, eventProductBrand, eventVariantBrand].some((id) => spotRelatedProductIdsSet.has(id));
|
21560
21525
|
if (!isProductMatch) {
|
21561
21526
|
continue;
|
@@ -21586,7 +21551,7 @@ class MonitorService {
|
|
21586
21551
|
event: eventData.event,
|
21587
21552
|
});
|
21588
21553
|
// Update the spots in the local storage
|
21589
|
-
(_d = this.localStorageService) === null || _d ===
|
21554
|
+
(_d = this.localStorageService) === null || _d === void 0 ? void 0 : _d.setSpot(spot.spotId, {
|
21590
21555
|
placementId: spot.placementId,
|
21591
21556
|
spotId: spot.spotId,
|
21592
21557
|
spotType: spot.spotType,
|
@@ -21650,9 +21615,9 @@ class SelectionService extends BaseApi {
|
|
21650
21615
|
}
|
21651
21616
|
const { isOk, val, isErr } = await this.post(SELECTION_API_PATH, data, {});
|
21652
21617
|
if (isErr) {
|
21653
|
-
return { error: `There was an error during spot selection: (${isErr === null || isErr ===
|
21618
|
+
return { error: `There was an error during spot selection: (${isErr === null || isErr === void 0 ? void 0 : isErr.errorMessage})` };
|
21654
21619
|
}
|
21655
|
-
if (isOk && val && val.data && (val === null || val ===
|
21620
|
+
if (isOk && val && val.data && (val === null || val === void 0 ? void 0 : val.refresh.token)) {
|
21656
21621
|
this.authInfo.authenticated = true;
|
21657
21622
|
this.authInfo.token = val.refresh.token;
|
21658
21623
|
return val.data.spots;
|
@@ -21767,7 +21732,7 @@ class SpotManagerService {
|
|
21767
21732
|
spotId: spot.id,
|
21768
21733
|
spotType: spot.spot,
|
21769
21734
|
events: spot.events,
|
21770
|
-
productIds: (_a = spot.productIds) !== null && _a !==
|
21735
|
+
productIds: (_a = spot.productIds) !== null && _a !== void 0 ? _a : [],
|
21771
21736
|
});
|
21772
21737
|
}
|
21773
21738
|
async handleClickEvent({ placementId, spot }) {
|
@@ -21780,7 +21745,7 @@ class SpotManagerService {
|
|
21780
21745
|
await fireEvent({
|
21781
21746
|
spotType: spot.spot,
|
21782
21747
|
event: RMN_SPOT_EVENT.CLICK,
|
21783
|
-
eventUrl: (_b = (_a = spot.events.find((event) => event.event === RMN_SPOT_EVENT.CLICK)) === null || _a ===
|
21748
|
+
eventUrl: (_b = (_a = spot.events.find((event) => event.event === RMN_SPOT_EVENT.CLICK)) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '',
|
21784
21749
|
});
|
21785
21750
|
}
|
21786
21751
|
handleImpressionEvent(placementId, spot) {
|
@@ -21794,7 +21759,7 @@ class SpotManagerService {
|
|
21794
21759
|
await fireEvent({
|
21795
21760
|
spotType: spot.spot,
|
21796
21761
|
event: RMN_SPOT_EVENT.IMPRESSION,
|
21797
|
-
eventUrl: (_b = (_a = spot.events.find((event) => event.event === RMN_SPOT_EVENT.IMPRESSION)) === null || _a ===
|
21762
|
+
eventUrl: (_b = (_a = spot.events.find((event) => event.event === RMN_SPOT_EVENT.IMPRESSION)) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '',
|
21798
21763
|
});
|
21799
21764
|
})();
|
21800
21765
|
}
|
@@ -21869,7 +21834,7 @@ function validateInjectData(inject) {
|
|
21869
21834
|
*/
|
21870
21835
|
function clearPlacement(placementId) {
|
21871
21836
|
var _a;
|
21872
|
-
(_a = document.getElementById(placementId)) === null || _a ===
|
21837
|
+
(_a = document.getElementById(placementId)) === null || _a === void 0 ? void 0 : _a.replaceChildren();
|
21873
21838
|
}
|
21874
21839
|
/**
|
21875
21840
|
* Prepares the spot placement for rendering by taking care of its styling.
|
@@ -21903,10 +21868,10 @@ function overrideSpotColors(spot, colors) {
|
|
21903
21868
|
const { textColor, backgroundColor, ctaTextColor, ctaBorderColor } = colors;
|
21904
21869
|
return {
|
21905
21870
|
...spot,
|
21906
|
-
textColor: textColor !== null && textColor !==
|
21907
|
-
backgroundColor: backgroundColor !== null && backgroundColor !==
|
21908
|
-
ctaTextColor: ctaTextColor !== null && ctaTextColor !==
|
21909
|
-
ctaBorderColor: ctaBorderColor !== null && ctaBorderColor !==
|
21871
|
+
textColor: textColor !== null && textColor !== void 0 ? textColor : spot.textColor,
|
21872
|
+
backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : spot.backgroundColor,
|
21873
|
+
ctaTextColor: ctaTextColor !== null && ctaTextColor !== void 0 ? ctaTextColor : spot.ctaTextColor,
|
21874
|
+
ctaBorderColor: ctaBorderColor !== null && ctaBorderColor !== void 0 ? ctaBorderColor : spot.ctaBorderColor,
|
21910
21875
|
};
|
21911
21876
|
}
|
21912
21877
|
// Sets the id for the user who is browsing the website
|
@@ -22026,7 +21991,7 @@ class BrowserRmnClient {
|
|
22026
21991
|
}, false);
|
22027
21992
|
prepareSpotPlacement(placement);
|
22028
21993
|
const skeletonElement = this.elementService.createSkeletonElement({
|
22029
|
-
fluid: (_b = (_a = injectData === null || injectData ===
|
21994
|
+
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,
|
22030
21995
|
spotType: injectData.spotType,
|
22031
21996
|
});
|
22032
21997
|
if (!skeletonElement) {
|
@@ -22038,7 +22003,7 @@ class BrowserRmnClient {
|
|
22038
22003
|
});
|
22039
22004
|
}
|
22040
22005
|
if (skeletonElement) {
|
22041
|
-
placement === null || placement ===
|
22006
|
+
placement === null || placement === void 0 ? void 0 : placement.replaceChildren(skeletonElement);
|
22042
22007
|
}
|
22043
22008
|
validPlacements.set(placementId, placement);
|
22044
22009
|
this.spotManagerService.updateSpotLifecycleState(injectData.placementId, {
|
@@ -22081,9 +22046,9 @@ class BrowserRmnClient {
|
|
22081
22046
|
validPlacements.forEach((placement, placementId) => {
|
22082
22047
|
var _a;
|
22083
22048
|
const injectData = injectMap.get(placementId);
|
22084
|
-
const itemConfig = (_a = injectData === null || injectData ===
|
22049
|
+
const itemConfig = (_a = injectData === null || injectData === void 0 ? void 0 : injectData.config) !== null && _a !== void 0 ? _a : globalConfig;
|
22085
22050
|
const spots = response[placementId];
|
22086
|
-
if (!(spots === null || spots ===
|
22051
|
+
if (!(spots === null || spots === void 0 ? void 0 : spots.length)) {
|
22087
22052
|
this.spotManagerService.updateSpotLifecycleState(injectData.placementId, {
|
22088
22053
|
state: {
|
22089
22054
|
error: `No spots found for type "${injectData.spotType}".`,
|
@@ -22129,12 +22094,12 @@ class BrowserRmnClient {
|
|
22129
22094
|
isCarouselItem: false,
|
22130
22095
|
},
|
22131
22096
|
});
|
22132
|
-
const spotData = overrideSpotColors(spot, config === null || config ===
|
22097
|
+
const spotData = overrideSpotColors(spot, config === null || config === void 0 ? void 0 : config.colors);
|
22133
22098
|
const spotElement = this.elementService.createSpotElement({
|
22134
22099
|
spot: spotData,
|
22135
22100
|
config: {
|
22136
22101
|
prefix: '',
|
22137
|
-
fluid: spot.spot === RMN_SPOT_TYPE.RB_IN_TEXT ? true : ((_a = config === null || config ===
|
22102
|
+
fluid: spot.spot === RMN_SPOT_TYPE.RB_IN_TEXT ? true : ((_a = config === null || config === void 0 ? void 0 : config.fluid) !== null && _a !== void 0 ? _a : false),
|
22138
22103
|
useShadowDom: true,
|
22139
22104
|
},
|
22140
22105
|
});
|
@@ -22154,8 +22119,8 @@ class BrowserRmnClient {
|
|
22154
22119
|
placementId,
|
22155
22120
|
spotElement,
|
22156
22121
|
});
|
22157
|
-
placement === null || placement ===
|
22158
|
-
if (config === null || config ===
|
22122
|
+
placement === null || placement === void 0 ? void 0 : placement.replaceChildren(spotElement);
|
22123
|
+
if (config === null || config === void 0 ? void 0 : config.listenRenderedSpotData) {
|
22159
22124
|
this.spotManagerService.publish(RMN_EVENT.RENDERED_SPOT_DATA, {
|
22160
22125
|
placementId,
|
22161
22126
|
data: [spotData],
|
@@ -22199,7 +22164,7 @@ class BrowserRmnClient {
|
|
22199
22164
|
isCarouselItem: true,
|
22200
22165
|
},
|
22201
22166
|
});
|
22202
|
-
const spot = overrideSpotColors(spotItem, config === null || config ===
|
22167
|
+
const spot = overrideSpotColors(spotItem, config === null || config === void 0 ? void 0 : config.colors);
|
22203
22168
|
const spotElement = this.elementService.createSpotElement({
|
22204
22169
|
spot,
|
22205
22170
|
config: {
|
@@ -22235,11 +22200,11 @@ class BrowserRmnClient {
|
|
22235
22200
|
const carouselElement = this.elementService.createCarouselElement({
|
22236
22201
|
slides: carouselSlides,
|
22237
22202
|
config: {
|
22238
|
-
fluid: config === null || config ===
|
22203
|
+
fluid: config === null || config === void 0 ? void 0 : config.fluid,
|
22239
22204
|
width: maxWidth,
|
22240
22205
|
height: maxHeight,
|
22241
|
-
minScale: (_a = config === null || config ===
|
22242
|
-
...config === null || config ===
|
22206
|
+
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
|
22207
|
+
...config === null || config === void 0 ? void 0 : config.carousel,
|
22243
22208
|
},
|
22244
22209
|
});
|
22245
22210
|
if (!carouselElement) {
|
@@ -22253,8 +22218,8 @@ class BrowserRmnClient {
|
|
22253
22218
|
clearPlacement(placementId);
|
22254
22219
|
return;
|
22255
22220
|
}
|
22256
|
-
placement === null || placement ===
|
22257
|
-
if (config === null || config ===
|
22221
|
+
placement === null || placement === void 0 ? void 0 : placement.replaceChildren(carouselElement);
|
22222
|
+
if (config === null || config === void 0 ? void 0 : config.listenRenderedSpotData) {
|
22258
22223
|
this.spotManagerService.publish(RMN_EVENT.RENDERED_SPOT_DATA, {
|
22259
22224
|
placementId,
|
22260
22225
|
data: spots,
|
@@ -22284,11 +22249,11 @@ class BrowserRmnClient {
|
|
22284
22249
|
const spots = inject.map((item) => ({
|
22285
22250
|
placementId: item.placementId,
|
22286
22251
|
spot: item.spotType,
|
22287
|
-
count: item === null || item ===
|
22288
|
-
...item === null || item ===
|
22252
|
+
count: item === null || item === void 0 ? void 0 : item.count,
|
22253
|
+
...item === null || item === void 0 ? void 0 : item.filter,
|
22289
22254
|
}));
|
22290
22255
|
const request = {
|
22291
|
-
url: config === null || config ===
|
22256
|
+
url: config === null || config === void 0 ? void 0 : config.url,
|
22292
22257
|
filter,
|
22293
22258
|
spots,
|
22294
22259
|
};
|