@ikas/storefront 0.0.24 → 0.0.26
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/build/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeAutoObservable, toJS, runInAction, reaction, action, computed, configure } from 'mobx';
|
|
2
|
-
import queryString
|
|
2
|
+
import queryString from 'querystring';
|
|
3
3
|
import React, { createElement, useState, useEffect, Fragment, useCallback, useRef } from 'react';
|
|
4
4
|
import { observer } from 'mobx-react-lite';
|
|
5
5
|
import { useRouter } from 'next/router';
|
|
@@ -11034,505 +11034,6 @@ var IkasBrandListPropValueProvider = /** @class */ (function () {
|
|
|
11034
11034
|
return IkasBrandListPropValueProvider;
|
|
11035
11035
|
}());
|
|
11036
11036
|
|
|
11037
|
-
var strictUriEncode = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
11038
|
-
|
|
11039
|
-
var token = '%[a-f0-9]{2}';
|
|
11040
|
-
var singleMatcher = new RegExp(token, 'gi');
|
|
11041
|
-
var multiMatcher = new RegExp('(' + token + ')+', 'gi');
|
|
11042
|
-
|
|
11043
|
-
function decodeComponents(components, split) {
|
|
11044
|
-
try {
|
|
11045
|
-
// Try to decode the entire string first
|
|
11046
|
-
return decodeURIComponent(components.join(''));
|
|
11047
|
-
} catch (err) {
|
|
11048
|
-
// Do nothing
|
|
11049
|
-
}
|
|
11050
|
-
|
|
11051
|
-
if (components.length === 1) {
|
|
11052
|
-
return components;
|
|
11053
|
-
}
|
|
11054
|
-
|
|
11055
|
-
split = split || 1;
|
|
11056
|
-
|
|
11057
|
-
// Split the array in 2 parts
|
|
11058
|
-
var left = components.slice(0, split);
|
|
11059
|
-
var right = components.slice(split);
|
|
11060
|
-
|
|
11061
|
-
return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
|
|
11062
|
-
}
|
|
11063
|
-
|
|
11064
|
-
function decode(input) {
|
|
11065
|
-
try {
|
|
11066
|
-
return decodeURIComponent(input);
|
|
11067
|
-
} catch (err) {
|
|
11068
|
-
var tokens = input.match(singleMatcher);
|
|
11069
|
-
|
|
11070
|
-
for (var i = 1; i < tokens.length; i++) {
|
|
11071
|
-
input = decodeComponents(tokens, i).join('');
|
|
11072
|
-
|
|
11073
|
-
tokens = input.match(singleMatcher);
|
|
11074
|
-
}
|
|
11075
|
-
|
|
11076
|
-
return input;
|
|
11077
|
-
}
|
|
11078
|
-
}
|
|
11079
|
-
|
|
11080
|
-
function customDecodeURIComponent(input) {
|
|
11081
|
-
// Keep track of all the replacements and prefill the map with the `BOM`
|
|
11082
|
-
var replaceMap = {
|
|
11083
|
-
'%FE%FF': '\uFFFD\uFFFD',
|
|
11084
|
-
'%FF%FE': '\uFFFD\uFFFD'
|
|
11085
|
-
};
|
|
11086
|
-
|
|
11087
|
-
var match = multiMatcher.exec(input);
|
|
11088
|
-
while (match) {
|
|
11089
|
-
try {
|
|
11090
|
-
// Decode as big chunks as possible
|
|
11091
|
-
replaceMap[match[0]] = decodeURIComponent(match[0]);
|
|
11092
|
-
} catch (err) {
|
|
11093
|
-
var result = decode(match[0]);
|
|
11094
|
-
|
|
11095
|
-
if (result !== match[0]) {
|
|
11096
|
-
replaceMap[match[0]] = result;
|
|
11097
|
-
}
|
|
11098
|
-
}
|
|
11099
|
-
|
|
11100
|
-
match = multiMatcher.exec(input);
|
|
11101
|
-
}
|
|
11102
|
-
|
|
11103
|
-
// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else
|
|
11104
|
-
replaceMap['%C2'] = '\uFFFD';
|
|
11105
|
-
|
|
11106
|
-
var entries = Object.keys(replaceMap);
|
|
11107
|
-
|
|
11108
|
-
for (var i = 0; i < entries.length; i++) {
|
|
11109
|
-
// Replace all decoded components
|
|
11110
|
-
var key = entries[i];
|
|
11111
|
-
input = input.replace(new RegExp(key, 'g'), replaceMap[key]);
|
|
11112
|
-
}
|
|
11113
|
-
|
|
11114
|
-
return input;
|
|
11115
|
-
}
|
|
11116
|
-
|
|
11117
|
-
var decodeUriComponent = function (encodedURI) {
|
|
11118
|
-
if (typeof encodedURI !== 'string') {
|
|
11119
|
-
throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');
|
|
11120
|
-
}
|
|
11121
|
-
|
|
11122
|
-
try {
|
|
11123
|
-
encodedURI = encodedURI.replace(/\+/g, ' ');
|
|
11124
|
-
|
|
11125
|
-
// Try the built in decoder first
|
|
11126
|
-
return decodeURIComponent(encodedURI);
|
|
11127
|
-
} catch (err) {
|
|
11128
|
-
// Fallback to a more advanced decoder
|
|
11129
|
-
return customDecodeURIComponent(encodedURI);
|
|
11130
|
-
}
|
|
11131
|
-
};
|
|
11132
|
-
|
|
11133
|
-
var splitOnFirst = (string, separator) => {
|
|
11134
|
-
if (!(typeof string === 'string' && typeof separator === 'string')) {
|
|
11135
|
-
throw new TypeError('Expected the arguments to be of type `string`');
|
|
11136
|
-
}
|
|
11137
|
-
|
|
11138
|
-
if (separator === '') {
|
|
11139
|
-
return [string];
|
|
11140
|
-
}
|
|
11141
|
-
|
|
11142
|
-
const separatorIndex = string.indexOf(separator);
|
|
11143
|
-
|
|
11144
|
-
if (separatorIndex === -1) {
|
|
11145
|
-
return [string];
|
|
11146
|
-
}
|
|
11147
|
-
|
|
11148
|
-
return [
|
|
11149
|
-
string.slice(0, separatorIndex),
|
|
11150
|
-
string.slice(separatorIndex + separator.length)
|
|
11151
|
-
];
|
|
11152
|
-
};
|
|
11153
|
-
|
|
11154
|
-
var queryString = createCommonjsModule(function (module, exports) {
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
const isNullOrUndefined = value => value === null || value === undefined;
|
|
11160
|
-
|
|
11161
|
-
function encoderForArrayFormat(options) {
|
|
11162
|
-
switch (options.arrayFormat) {
|
|
11163
|
-
case 'index':
|
|
11164
|
-
return key => (result, value) => {
|
|
11165
|
-
const index = result.length;
|
|
11166
|
-
|
|
11167
|
-
if (
|
|
11168
|
-
value === undefined ||
|
|
11169
|
-
(options.skipNull && value === null) ||
|
|
11170
|
-
(options.skipEmptyString && value === '')
|
|
11171
|
-
) {
|
|
11172
|
-
return result;
|
|
11173
|
-
}
|
|
11174
|
-
|
|
11175
|
-
if (value === null) {
|
|
11176
|
-
return [...result, [encode(key, options), '[', index, ']'].join('')];
|
|
11177
|
-
}
|
|
11178
|
-
|
|
11179
|
-
return [
|
|
11180
|
-
...result,
|
|
11181
|
-
[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')
|
|
11182
|
-
];
|
|
11183
|
-
};
|
|
11184
|
-
|
|
11185
|
-
case 'bracket':
|
|
11186
|
-
return key => (result, value) => {
|
|
11187
|
-
if (
|
|
11188
|
-
value === undefined ||
|
|
11189
|
-
(options.skipNull && value === null) ||
|
|
11190
|
-
(options.skipEmptyString && value === '')
|
|
11191
|
-
) {
|
|
11192
|
-
return result;
|
|
11193
|
-
}
|
|
11194
|
-
|
|
11195
|
-
if (value === null) {
|
|
11196
|
-
return [...result, [encode(key, options), '[]'].join('')];
|
|
11197
|
-
}
|
|
11198
|
-
|
|
11199
|
-
return [...result, [encode(key, options), '[]=', encode(value, options)].join('')];
|
|
11200
|
-
};
|
|
11201
|
-
|
|
11202
|
-
case 'comma':
|
|
11203
|
-
case 'separator':
|
|
11204
|
-
return key => (result, value) => {
|
|
11205
|
-
if (value === null || value === undefined || value.length === 0) {
|
|
11206
|
-
return result;
|
|
11207
|
-
}
|
|
11208
|
-
|
|
11209
|
-
if (result.length === 0) {
|
|
11210
|
-
return [[encode(key, options), '=', encode(value, options)].join('')];
|
|
11211
|
-
}
|
|
11212
|
-
|
|
11213
|
-
return [[result, encode(value, options)].join(options.arrayFormatSeparator)];
|
|
11214
|
-
};
|
|
11215
|
-
|
|
11216
|
-
default:
|
|
11217
|
-
return key => (result, value) => {
|
|
11218
|
-
if (
|
|
11219
|
-
value === undefined ||
|
|
11220
|
-
(options.skipNull && value === null) ||
|
|
11221
|
-
(options.skipEmptyString && value === '')
|
|
11222
|
-
) {
|
|
11223
|
-
return result;
|
|
11224
|
-
}
|
|
11225
|
-
|
|
11226
|
-
if (value === null) {
|
|
11227
|
-
return [...result, encode(key, options)];
|
|
11228
|
-
}
|
|
11229
|
-
|
|
11230
|
-
return [...result, [encode(key, options), '=', encode(value, options)].join('')];
|
|
11231
|
-
};
|
|
11232
|
-
}
|
|
11233
|
-
}
|
|
11234
|
-
|
|
11235
|
-
function parserForArrayFormat(options) {
|
|
11236
|
-
let result;
|
|
11237
|
-
|
|
11238
|
-
switch (options.arrayFormat) {
|
|
11239
|
-
case 'index':
|
|
11240
|
-
return (key, value, accumulator) => {
|
|
11241
|
-
result = /\[(\d*)\]$/.exec(key);
|
|
11242
|
-
|
|
11243
|
-
key = key.replace(/\[\d*\]$/, '');
|
|
11244
|
-
|
|
11245
|
-
if (!result) {
|
|
11246
|
-
accumulator[key] = value;
|
|
11247
|
-
return;
|
|
11248
|
-
}
|
|
11249
|
-
|
|
11250
|
-
if (accumulator[key] === undefined) {
|
|
11251
|
-
accumulator[key] = {};
|
|
11252
|
-
}
|
|
11253
|
-
|
|
11254
|
-
accumulator[key][result[1]] = value;
|
|
11255
|
-
};
|
|
11256
|
-
|
|
11257
|
-
case 'bracket':
|
|
11258
|
-
return (key, value, accumulator) => {
|
|
11259
|
-
result = /(\[\])$/.exec(key);
|
|
11260
|
-
key = key.replace(/\[\]$/, '');
|
|
11261
|
-
|
|
11262
|
-
if (!result) {
|
|
11263
|
-
accumulator[key] = value;
|
|
11264
|
-
return;
|
|
11265
|
-
}
|
|
11266
|
-
|
|
11267
|
-
if (accumulator[key] === undefined) {
|
|
11268
|
-
accumulator[key] = [value];
|
|
11269
|
-
return;
|
|
11270
|
-
}
|
|
11271
|
-
|
|
11272
|
-
accumulator[key] = [].concat(accumulator[key], value);
|
|
11273
|
-
};
|
|
11274
|
-
|
|
11275
|
-
case 'comma':
|
|
11276
|
-
case 'separator':
|
|
11277
|
-
return (key, value, accumulator) => {
|
|
11278
|
-
const isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);
|
|
11279
|
-
const isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));
|
|
11280
|
-
value = isEncodedArray ? decode(value, options) : value;
|
|
11281
|
-
const newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);
|
|
11282
|
-
accumulator[key] = newValue;
|
|
11283
|
-
};
|
|
11284
|
-
|
|
11285
|
-
default:
|
|
11286
|
-
return (key, value, accumulator) => {
|
|
11287
|
-
if (accumulator[key] === undefined) {
|
|
11288
|
-
accumulator[key] = value;
|
|
11289
|
-
return;
|
|
11290
|
-
}
|
|
11291
|
-
|
|
11292
|
-
accumulator[key] = [].concat(accumulator[key], value);
|
|
11293
|
-
};
|
|
11294
|
-
}
|
|
11295
|
-
}
|
|
11296
|
-
|
|
11297
|
-
function validateArrayFormatSeparator(value) {
|
|
11298
|
-
if (typeof value !== 'string' || value.length !== 1) {
|
|
11299
|
-
throw new TypeError('arrayFormatSeparator must be single character string');
|
|
11300
|
-
}
|
|
11301
|
-
}
|
|
11302
|
-
|
|
11303
|
-
function encode(value, options) {
|
|
11304
|
-
if (options.encode) {
|
|
11305
|
-
return options.strict ? strictUriEncode(value) : encodeURIComponent(value);
|
|
11306
|
-
}
|
|
11307
|
-
|
|
11308
|
-
return value;
|
|
11309
|
-
}
|
|
11310
|
-
|
|
11311
|
-
function decode(value, options) {
|
|
11312
|
-
if (options.decode) {
|
|
11313
|
-
return decodeUriComponent(value);
|
|
11314
|
-
}
|
|
11315
|
-
|
|
11316
|
-
return value;
|
|
11317
|
-
}
|
|
11318
|
-
|
|
11319
|
-
function keysSorter(input) {
|
|
11320
|
-
if (Array.isArray(input)) {
|
|
11321
|
-
return input.sort();
|
|
11322
|
-
}
|
|
11323
|
-
|
|
11324
|
-
if (typeof input === 'object') {
|
|
11325
|
-
return keysSorter(Object.keys(input))
|
|
11326
|
-
.sort((a, b) => Number(a) - Number(b))
|
|
11327
|
-
.map(key => input[key]);
|
|
11328
|
-
}
|
|
11329
|
-
|
|
11330
|
-
return input;
|
|
11331
|
-
}
|
|
11332
|
-
|
|
11333
|
-
function removeHash(input) {
|
|
11334
|
-
const hashStart = input.indexOf('#');
|
|
11335
|
-
if (hashStart !== -1) {
|
|
11336
|
-
input = input.slice(0, hashStart);
|
|
11337
|
-
}
|
|
11338
|
-
|
|
11339
|
-
return input;
|
|
11340
|
-
}
|
|
11341
|
-
|
|
11342
|
-
function getHash(url) {
|
|
11343
|
-
let hash = '';
|
|
11344
|
-
const hashStart = url.indexOf('#');
|
|
11345
|
-
if (hashStart !== -1) {
|
|
11346
|
-
hash = url.slice(hashStart);
|
|
11347
|
-
}
|
|
11348
|
-
|
|
11349
|
-
return hash;
|
|
11350
|
-
}
|
|
11351
|
-
|
|
11352
|
-
function extract(input) {
|
|
11353
|
-
input = removeHash(input);
|
|
11354
|
-
const queryStart = input.indexOf('?');
|
|
11355
|
-
if (queryStart === -1) {
|
|
11356
|
-
return '';
|
|
11357
|
-
}
|
|
11358
|
-
|
|
11359
|
-
return input.slice(queryStart + 1);
|
|
11360
|
-
}
|
|
11361
|
-
|
|
11362
|
-
function parseValue(value, options) {
|
|
11363
|
-
if (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {
|
|
11364
|
-
value = Number(value);
|
|
11365
|
-
} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {
|
|
11366
|
-
value = value.toLowerCase() === 'true';
|
|
11367
|
-
}
|
|
11368
|
-
|
|
11369
|
-
return value;
|
|
11370
|
-
}
|
|
11371
|
-
|
|
11372
|
-
function parse(query, options) {
|
|
11373
|
-
options = Object.assign({
|
|
11374
|
-
decode: true,
|
|
11375
|
-
sort: true,
|
|
11376
|
-
arrayFormat: 'none',
|
|
11377
|
-
arrayFormatSeparator: ',',
|
|
11378
|
-
parseNumbers: false,
|
|
11379
|
-
parseBooleans: false
|
|
11380
|
-
}, options);
|
|
11381
|
-
|
|
11382
|
-
validateArrayFormatSeparator(options.arrayFormatSeparator);
|
|
11383
|
-
|
|
11384
|
-
const formatter = parserForArrayFormat(options);
|
|
11385
|
-
|
|
11386
|
-
// Create an object with no prototype
|
|
11387
|
-
const ret = Object.create(null);
|
|
11388
|
-
|
|
11389
|
-
if (typeof query !== 'string') {
|
|
11390
|
-
return ret;
|
|
11391
|
-
}
|
|
11392
|
-
|
|
11393
|
-
query = query.trim().replace(/^[?#&]/, '');
|
|
11394
|
-
|
|
11395
|
-
if (!query) {
|
|
11396
|
-
return ret;
|
|
11397
|
-
}
|
|
11398
|
-
|
|
11399
|
-
for (const param of query.split('&')) {
|
|
11400
|
-
let [key, value] = splitOnFirst(options.decode ? param.replace(/\+/g, ' ') : param, '=');
|
|
11401
|
-
|
|
11402
|
-
// Missing `=` should be `null`:
|
|
11403
|
-
// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
|
|
11404
|
-
value = value === undefined ? null : ['comma', 'separator'].includes(options.arrayFormat) ? value : decode(value, options);
|
|
11405
|
-
formatter(decode(key, options), value, ret);
|
|
11406
|
-
}
|
|
11407
|
-
|
|
11408
|
-
for (const key of Object.keys(ret)) {
|
|
11409
|
-
const value = ret[key];
|
|
11410
|
-
if (typeof value === 'object' && value !== null) {
|
|
11411
|
-
for (const k of Object.keys(value)) {
|
|
11412
|
-
value[k] = parseValue(value[k], options);
|
|
11413
|
-
}
|
|
11414
|
-
} else {
|
|
11415
|
-
ret[key] = parseValue(value, options);
|
|
11416
|
-
}
|
|
11417
|
-
}
|
|
11418
|
-
|
|
11419
|
-
if (options.sort === false) {
|
|
11420
|
-
return ret;
|
|
11421
|
-
}
|
|
11422
|
-
|
|
11423
|
-
return (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {
|
|
11424
|
-
const value = ret[key];
|
|
11425
|
-
if (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {
|
|
11426
|
-
// Sort object keys, not values
|
|
11427
|
-
result[key] = keysSorter(value);
|
|
11428
|
-
} else {
|
|
11429
|
-
result[key] = value;
|
|
11430
|
-
}
|
|
11431
|
-
|
|
11432
|
-
return result;
|
|
11433
|
-
}, Object.create(null));
|
|
11434
|
-
}
|
|
11435
|
-
|
|
11436
|
-
exports.extract = extract;
|
|
11437
|
-
exports.parse = parse;
|
|
11438
|
-
|
|
11439
|
-
exports.stringify = (object, options) => {
|
|
11440
|
-
if (!object) {
|
|
11441
|
-
return '';
|
|
11442
|
-
}
|
|
11443
|
-
|
|
11444
|
-
options = Object.assign({
|
|
11445
|
-
encode: true,
|
|
11446
|
-
strict: true,
|
|
11447
|
-
arrayFormat: 'none',
|
|
11448
|
-
arrayFormatSeparator: ','
|
|
11449
|
-
}, options);
|
|
11450
|
-
|
|
11451
|
-
validateArrayFormatSeparator(options.arrayFormatSeparator);
|
|
11452
|
-
|
|
11453
|
-
const shouldFilter = key => (
|
|
11454
|
-
(options.skipNull && isNullOrUndefined(object[key])) ||
|
|
11455
|
-
(options.skipEmptyString && object[key] === '')
|
|
11456
|
-
);
|
|
11457
|
-
|
|
11458
|
-
const formatter = encoderForArrayFormat(options);
|
|
11459
|
-
|
|
11460
|
-
const objectCopy = {};
|
|
11461
|
-
|
|
11462
|
-
for (const key of Object.keys(object)) {
|
|
11463
|
-
if (!shouldFilter(key)) {
|
|
11464
|
-
objectCopy[key] = object[key];
|
|
11465
|
-
}
|
|
11466
|
-
}
|
|
11467
|
-
|
|
11468
|
-
const keys = Object.keys(objectCopy);
|
|
11469
|
-
|
|
11470
|
-
if (options.sort !== false) {
|
|
11471
|
-
keys.sort(options.sort);
|
|
11472
|
-
}
|
|
11473
|
-
|
|
11474
|
-
return keys.map(key => {
|
|
11475
|
-
const value = object[key];
|
|
11476
|
-
|
|
11477
|
-
if (value === undefined) {
|
|
11478
|
-
return '';
|
|
11479
|
-
}
|
|
11480
|
-
|
|
11481
|
-
if (value === null) {
|
|
11482
|
-
return encode(key, options);
|
|
11483
|
-
}
|
|
11484
|
-
|
|
11485
|
-
if (Array.isArray(value)) {
|
|
11486
|
-
return value
|
|
11487
|
-
.reduce(formatter(key), [])
|
|
11488
|
-
.join('&');
|
|
11489
|
-
}
|
|
11490
|
-
|
|
11491
|
-
return encode(key, options) + '=' + encode(value, options);
|
|
11492
|
-
}).filter(x => x.length > 0).join('&');
|
|
11493
|
-
};
|
|
11494
|
-
|
|
11495
|
-
exports.parseUrl = (url, options) => {
|
|
11496
|
-
options = Object.assign({
|
|
11497
|
-
decode: true
|
|
11498
|
-
}, options);
|
|
11499
|
-
|
|
11500
|
-
const [url_, hash] = splitOnFirst(url, '#');
|
|
11501
|
-
|
|
11502
|
-
return Object.assign(
|
|
11503
|
-
{
|
|
11504
|
-
url: url_.split('?')[0] || '',
|
|
11505
|
-
query: parse(extract(url), options)
|
|
11506
|
-
},
|
|
11507
|
-
options && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}
|
|
11508
|
-
);
|
|
11509
|
-
};
|
|
11510
|
-
|
|
11511
|
-
exports.stringifyUrl = (object, options) => {
|
|
11512
|
-
options = Object.assign({
|
|
11513
|
-
encode: true,
|
|
11514
|
-
strict: true
|
|
11515
|
-
}, options);
|
|
11516
|
-
|
|
11517
|
-
const url = removeHash(object.url).split('?')[0] || '';
|
|
11518
|
-
const queryFromUrl = exports.extract(object.url);
|
|
11519
|
-
const parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});
|
|
11520
|
-
|
|
11521
|
-
const query = Object.assign(parsedQueryFromUrl, object.query);
|
|
11522
|
-
let queryString = exports.stringify(query, options);
|
|
11523
|
-
if (queryString) {
|
|
11524
|
-
queryString = `?${queryString}`;
|
|
11525
|
-
}
|
|
11526
|
-
|
|
11527
|
-
let hash = getHash(object.url);
|
|
11528
|
-
if (object.fragmentIdentifier) {
|
|
11529
|
-
hash = `#${encode(object.fragmentIdentifier, options)}`;
|
|
11530
|
-
}
|
|
11531
|
-
|
|
11532
|
-
return `${url}${queryString}${hash}`;
|
|
11533
|
-
};
|
|
11534
|
-
});
|
|
11535
|
-
|
|
11536
11037
|
var IkasBrandPropValueProvider = /** @class */ (function () {
|
|
11537
11038
|
function IkasBrandPropValueProvider(prop, pageSpecificData) {
|
|
11538
11039
|
this.brandPropValue = prop;
|
|
@@ -11886,24 +11387,16 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
11886
11387
|
};
|
|
11887
11388
|
IkasPageDataProvider.prototype.getPageSpecificData = function () {
|
|
11888
11389
|
return __awaiter(this, void 0, void 0, function () {
|
|
11889
|
-
var slug, metaDataList, metaData,
|
|
11390
|
+
var slug, metaDataList, metaData, handleBrandPage, handleCategoryPage, _a;
|
|
11890
11391
|
var _this = this;
|
|
11891
11392
|
return __generator(this, function (_b) {
|
|
11892
11393
|
switch (_b.label) {
|
|
11893
11394
|
case 0:
|
|
11894
11395
|
if (this.pageType &&
|
|
11895
|
-
[
|
|
11896
|
-
IkasThemePageType.
|
|
11897
|
-
IkasThemePageType.
|
|
11898
|
-
IkasThemePageType.
|
|
11899
|
-
IkasThemePageType.ORDERS,
|
|
11900
|
-
IkasThemePageType.ORDER_DETAIL,
|
|
11901
|
-
IkasThemePageType.LOGIN,
|
|
11902
|
-
IkasThemePageType.REGISTER,
|
|
11903
|
-
IkasThemePageType.FORGOT_PASSWORD,
|
|
11904
|
-
IkasThemePageType.RECOVER_PASSWORD,
|
|
11905
|
-
IkasThemePageType.CUSTOM,
|
|
11906
|
-
IkasThemePageType.CART,
|
|
11396
|
+
![
|
|
11397
|
+
IkasThemePageType.BRAND,
|
|
11398
|
+
IkasThemePageType.PRODUCT,
|
|
11399
|
+
IkasThemePageType.CATEGORY,
|
|
11907
11400
|
].includes(this.pageType))
|
|
11908
11401
|
return [2 /*return*/];
|
|
11909
11402
|
slug = this.pageParams.slug;
|
|
@@ -11911,15 +11404,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
11911
11404
|
case 1:
|
|
11912
11405
|
metaDataList = _b.sent();
|
|
11913
11406
|
if (!metaDataList || !metaDataList.length) {
|
|
11914
|
-
return [2 /*return
|
|
11407
|
+
return [2 /*return*/, this.getPageSpecificProduct()];
|
|
11915
11408
|
}
|
|
11916
11409
|
metaData = metaDataList[0];
|
|
11917
|
-
setPageMetaData = function () {
|
|
11918
|
-
if (_this.page) {
|
|
11919
|
-
_this.page.pageTitle = metaData.pageTitle;
|
|
11920
|
-
_this.page.description = metaData.description;
|
|
11921
|
-
}
|
|
11922
|
-
};
|
|
11923
11410
|
handleBrandPage = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
11924
11411
|
var brandsResponse, brand;
|
|
11925
11412
|
return __generator(this, function (_a) {
|
|
@@ -11934,7 +11421,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
11934
11421
|
brand = brandsResponse.brands[0];
|
|
11935
11422
|
this.pageSpecificData = brand;
|
|
11936
11423
|
this.pageType = IkasThemePageType.BRAND;
|
|
11937
|
-
setPageMetaData();
|
|
11424
|
+
this.setPageMetaData(metaData);
|
|
11938
11425
|
return [2 /*return*/];
|
|
11939
11426
|
}
|
|
11940
11427
|
});
|
|
@@ -11953,26 +11440,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
11953
11440
|
category = categoriesResponse.categories[0];
|
|
11954
11441
|
this.pageSpecificData = category;
|
|
11955
11442
|
this.pageType = IkasThemePageType.CATEGORY;
|
|
11956
|
-
setPageMetaData();
|
|
11957
|
-
return [2 /*return*/];
|
|
11958
|
-
}
|
|
11959
|
-
});
|
|
11960
|
-
}); };
|
|
11961
|
-
handleProductPage = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
11962
|
-
var productsResponse, product;
|
|
11963
|
-
return __generator(this, function (_a) {
|
|
11964
|
-
switch (_a.label) {
|
|
11965
|
-
case 0: return [4 /*yield*/, IkasProductAPI.listProducts({
|
|
11966
|
-
idList: [metaData.targetId],
|
|
11967
|
-
})];
|
|
11968
|
-
case 1:
|
|
11969
|
-
productsResponse = _a.sent();
|
|
11970
|
-
if (!productsResponse.products.length)
|
|
11971
|
-
return [2 /*return*/];
|
|
11972
|
-
product = productsResponse.products[0];
|
|
11973
|
-
this.pageSpecificData = new IkasProductDetail(product, product.variants[0].variantValues, true);
|
|
11974
|
-
this.pageType = IkasThemePageType.PRODUCT;
|
|
11975
|
-
setPageMetaData();
|
|
11443
|
+
this.setPageMetaData(metaData);
|
|
11976
11444
|
return [2 /*return*/];
|
|
11977
11445
|
}
|
|
11978
11446
|
});
|
|
@@ -11988,7 +11456,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
11988
11456
|
case 3: return [2 /*return*/, _b.sent()];
|
|
11989
11457
|
case 4: return [4 /*yield*/, handleCategoryPage()];
|
|
11990
11458
|
case 5: return [2 /*return*/, _b.sent()];
|
|
11991
|
-
case 6: return [4 /*yield*/,
|
|
11459
|
+
case 6: return [4 /*yield*/, this.getPageSpecificProduct()];
|
|
11992
11460
|
case 7: return [2 /*return*/, _b.sent()];
|
|
11993
11461
|
case 8: return [3 /*break*/, 9];
|
|
11994
11462
|
case 9: return [2 /*return*/];
|
|
@@ -11996,6 +11464,82 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
11996
11464
|
});
|
|
11997
11465
|
});
|
|
11998
11466
|
};
|
|
11467
|
+
IkasPageDataProvider.prototype.getPageSpecificProduct = function () {
|
|
11468
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11469
|
+
var slug, getProductMetaData, metaDataResponse, productsResponse, product, isMainProductSlug, selectedVariantValues, variantSlugPart, variantSlugs, _i, _a, variant, isSelectedVariant, _loop_1, _b, variantSlugs_1, variantSlug, state_1;
|
|
11470
|
+
var _this = this;
|
|
11471
|
+
return __generator(this, function (_c) {
|
|
11472
|
+
switch (_c.label) {
|
|
11473
|
+
case 0:
|
|
11474
|
+
slug = this.pageParams.slug;
|
|
11475
|
+
getProductMetaData = function (slug) { return __awaiter(_this, void 0, void 0, function () {
|
|
11476
|
+
var metaDataList, splitParts, newSlug;
|
|
11477
|
+
return __generator(this, function (_a) {
|
|
11478
|
+
switch (_a.label) {
|
|
11479
|
+
case 0: return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(slug)];
|
|
11480
|
+
case 1:
|
|
11481
|
+
metaDataList = _a.sent();
|
|
11482
|
+
if (!(!metaDataList || !metaDataList.length)) return [3 /*break*/, 3];
|
|
11483
|
+
splitParts = slug.split("-");
|
|
11484
|
+
newSlug = splitParts.slice(0, splitParts.length - 1).join("-");
|
|
11485
|
+
return [4 /*yield*/, getProductMetaData(newSlug)];
|
|
11486
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
11487
|
+
case 3: return [2 /*return*/, {
|
|
11488
|
+
metaData: metaDataList[0],
|
|
11489
|
+
slug: slug,
|
|
11490
|
+
}];
|
|
11491
|
+
}
|
|
11492
|
+
});
|
|
11493
|
+
}); };
|
|
11494
|
+
return [4 /*yield*/, getProductMetaData(slug)];
|
|
11495
|
+
case 1:
|
|
11496
|
+
metaDataResponse = _c.sent();
|
|
11497
|
+
if (!metaDataResponse)
|
|
11498
|
+
return [2 /*return*/];
|
|
11499
|
+
return [4 /*yield*/, IkasProductAPI.listProducts({
|
|
11500
|
+
idList: [metaDataResponse.metaData.targetId],
|
|
11501
|
+
})];
|
|
11502
|
+
case 2:
|
|
11503
|
+
productsResponse = _c.sent();
|
|
11504
|
+
if (!productsResponse.products.length)
|
|
11505
|
+
return [2 /*return*/];
|
|
11506
|
+
product = productsResponse.products[0];
|
|
11507
|
+
isMainProductSlug = slug.length === metaDataResponse.slug.length;
|
|
11508
|
+
selectedVariantValues = [];
|
|
11509
|
+
if (!isMainProductSlug) {
|
|
11510
|
+
variantSlugPart = slug.slice(metaDataResponse.slug.length + 1);
|
|
11511
|
+
variantSlugs = variantSlugPart.split("-");
|
|
11512
|
+
for (_i = 0, _a = product.variants; _i < _a.length; _i++) {
|
|
11513
|
+
variant = _a[_i];
|
|
11514
|
+
isSelectedVariant = true;
|
|
11515
|
+
_loop_1 = function (variantSlug) {
|
|
11516
|
+
if (!variant.variantValues.some(function (vv) { return vv.slug === variantSlug; })) {
|
|
11517
|
+
isSelectedVariant = false;
|
|
11518
|
+
return "break";
|
|
11519
|
+
}
|
|
11520
|
+
};
|
|
11521
|
+
for (_b = 0, variantSlugs_1 = variantSlugs; _b < variantSlugs_1.length; _b++) {
|
|
11522
|
+
variantSlug = variantSlugs_1[_b];
|
|
11523
|
+
state_1 = _loop_1(variantSlug);
|
|
11524
|
+
if (state_1 === "break")
|
|
11525
|
+
break;
|
|
11526
|
+
}
|
|
11527
|
+
if (isSelectedVariant) {
|
|
11528
|
+
selectedVariantValues = variant.variantValues;
|
|
11529
|
+
break;
|
|
11530
|
+
}
|
|
11531
|
+
}
|
|
11532
|
+
}
|
|
11533
|
+
this.pageSpecificData = new IkasProductDetail(product, selectedVariantValues.length
|
|
11534
|
+
? selectedVariantValues
|
|
11535
|
+
: product.variants[0].variantValues, true);
|
|
11536
|
+
this.pageType = IkasThemePageType.PRODUCT;
|
|
11537
|
+
this.setPageMetaData(metaDataResponse.metaData);
|
|
11538
|
+
return [2 /*return*/];
|
|
11539
|
+
}
|
|
11540
|
+
});
|
|
11541
|
+
});
|
|
11542
|
+
};
|
|
11999
11543
|
IkasPageDataProvider.prototype.getPageComponentPropValues = function (pageComponent) {
|
|
12000
11544
|
return __awaiter(this, void 0, void 0, function () {
|
|
12001
11545
|
var component, result, setPageComponentPropValue;
|
|
@@ -12081,14 +11625,16 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12081
11625
|
});
|
|
12082
11626
|
});
|
|
12083
11627
|
};
|
|
11628
|
+
IkasPageDataProvider.prototype.setPageMetaData = function (metaData) {
|
|
11629
|
+
if (this.page) {
|
|
11630
|
+
this.page.pageTitle = metaData.pageTitle;
|
|
11631
|
+
this.page.description = metaData.description;
|
|
11632
|
+
}
|
|
11633
|
+
};
|
|
12084
11634
|
IkasPageDataProvider.isServer = function () {
|
|
12085
11635
|
return typeof window === "undefined";
|
|
12086
11636
|
};
|
|
12087
|
-
IkasPageDataProvider.initPropValues = function (propValuesStr, router
|
|
12088
|
-
var _queryParams = queryParams ||
|
|
12089
|
-
(IkasPageDataProvider.isServer()
|
|
12090
|
-
? {}
|
|
12091
|
-
: queryString.parse(location.search.replace("?", "")));
|
|
11637
|
+
IkasPageDataProvider.initPropValues = function (propValuesStr, router) {
|
|
12092
11638
|
var pageComponentPropValues = JSON.parse(propValuesStr).map(function (v) { return ({
|
|
12093
11639
|
pageComponent: new IkasThemePageComponent(v.pageComponent),
|
|
12094
11640
|
component: new IkasThemeComponent(v.component),
|
|
@@ -12123,7 +11669,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12123
11669
|
IkasPageDataProvider.initProductListPropValue(prop, propValue, pageComponentPropValue);
|
|
12124
11670
|
break;
|
|
12125
11671
|
case IkasThemeComponentPropType.PRODUCT_DETAIL:
|
|
12126
|
-
IkasPageDataProvider.initProductDetailPropValue(prop, propValue, pageComponentPropValue,
|
|
11672
|
+
IkasPageDataProvider.initProductDetailPropValue(prop, propValue, pageComponentPropValue, router);
|
|
12127
11673
|
break;
|
|
12128
11674
|
case IkasThemeComponentPropType.LINK:
|
|
12129
11675
|
case IkasThemeComponentPropType.LIST_OF_LINK:
|
|
@@ -12154,47 +11700,22 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12154
11700
|
var productList = new IkasProductList(propValue);
|
|
12155
11701
|
pageComponentPropValue.propValues[prop.name] = productList;
|
|
12156
11702
|
};
|
|
12157
|
-
IkasPageDataProvider.initProductDetailPropValue = function (prop, propValue, pageComponentPropValue,
|
|
11703
|
+
IkasPageDataProvider.initProductDetailPropValue = function (prop, propValue, pageComponentPropValue, router) {
|
|
12158
11704
|
var usePageData = propValue.usePageData;
|
|
12159
11705
|
var _propValue = propValue;
|
|
12160
11706
|
var productDetail = new IkasProductDetail(_propValue.product, _propValue.selectedVariantValues);
|
|
12161
|
-
var
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
var vid_1 =
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
var variant = product.variants.find(function (v) { return v.id === vid_1; });
|
|
11707
|
+
var isBrowser = typeof window !== "undefined";
|
|
11708
|
+
if (isBrowser) {
|
|
11709
|
+
var urlParams = new URLSearchParams(window.location.search);
|
|
11710
|
+
var vid_1 = urlParams.get("vid");
|
|
11711
|
+
if (vid_1) {
|
|
11712
|
+
var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
|
|
12168
11713
|
if (variant) {
|
|
12169
|
-
selectedVariantValues = variant.variantValues;
|
|
12170
|
-
hasVid = true;
|
|
11714
|
+
productDetail.selectedVariantValues = variant.variantValues;
|
|
12171
11715
|
}
|
|
12172
11716
|
}
|
|
12173
|
-
if (!hasVid) {
|
|
12174
|
-
product.variantTypes.forEach(function (pvt) {
|
|
12175
|
-
var slug = pvt.variantType.slug;
|
|
12176
|
-
var variantValueParam = queryParams[slug];
|
|
12177
|
-
if (variantValueParam) {
|
|
12178
|
-
var variantValueSlug_1 = variantValueParam;
|
|
12179
|
-
if (Array.isArray(variantValueParam)) {
|
|
12180
|
-
variantValueSlug_1 = variantValueParam[0];
|
|
12181
|
-
}
|
|
12182
|
-
var variantValue = pvt.variantType.values.find(function (vv) { return vv.slug === variantValueSlug_1; });
|
|
12183
|
-
if (variantValue)
|
|
12184
|
-
selectedVariantValues.push(variantValue);
|
|
12185
|
-
else
|
|
12186
|
-
selectedVariantValues.push(pvt.variantType.values[0]);
|
|
12187
|
-
}
|
|
12188
|
-
else {
|
|
12189
|
-
selectedVariantValues.push(pvt.variantType.values[0]);
|
|
12190
|
-
}
|
|
12191
|
-
});
|
|
12192
|
-
}
|
|
12193
11717
|
}
|
|
12194
|
-
|
|
12195
|
-
selectedVariantValues = productDetail.selectedVariantValues || [];
|
|
12196
|
-
}
|
|
12197
|
-
pageComponentPropValue.propValues[prop.name] = new IkasProductDetail(productDetail.product, selectedVariantValues, usePageData, router);
|
|
11718
|
+
pageComponentPropValue.propValues[prop.name] = new IkasProductDetail(productDetail.product, productDetail.selectedVariantValues, usePageData, router);
|
|
12198
11719
|
};
|
|
12199
11720
|
IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
|
|
12200
11721
|
if (Array.isArray(propValue)) {
|
|
@@ -12508,7 +12029,7 @@ var IkasOrderLineVariant = /** @class */ (function () {
|
|
|
12508
12029
|
queryParams_1[orderLineVariant.variantTypeSlug] =
|
|
12509
12030
|
orderLineVariant.variantNameSlug;
|
|
12510
12031
|
});
|
|
12511
|
-
return "/" + this.slug + "?" + queryString
|
|
12032
|
+
return "/" + this.slug + "?" + queryString.stringify(queryParams_1);
|
|
12512
12033
|
}
|
|
12513
12034
|
return "/" + this.slug;
|
|
12514
12035
|
},
|
|
@@ -14115,17 +13636,13 @@ var IkasProductDetail = /** @class */ (function () {
|
|
|
14115
13636
|
});
|
|
14116
13637
|
Object.defineProperty(IkasProductDetail.prototype, "href", {
|
|
14117
13638
|
get: function () {
|
|
14118
|
-
var _this = this;
|
|
14119
13639
|
var metaData = this.product.metaData;
|
|
14120
13640
|
if (!(metaData === null || metaData === void 0 ? void 0 : metaData.slug))
|
|
14121
13641
|
return "";
|
|
14122
13642
|
if (this.product.hasVariant) {
|
|
14123
|
-
|
|
14124
|
-
|
|
14125
|
-
|
|
14126
|
-
queryParams_1[vt.variantType.slug] = vv.slug;
|
|
14127
|
-
});
|
|
14128
|
-
return "/" + metaData.slug + "?" + queryString$1.stringify(queryParams_1);
|
|
13643
|
+
return "/" + metaData.slug + "-" + this.selectedVariantValues
|
|
13644
|
+
.map(function (vv) { return vv.slug; })
|
|
13645
|
+
.join("-");
|
|
14129
13646
|
}
|
|
14130
13647
|
return "/" + metaData.slug;
|
|
14131
13648
|
},
|
|
@@ -14133,20 +13650,18 @@ var IkasProductDetail = /** @class */ (function () {
|
|
|
14133
13650
|
configurable: true
|
|
14134
13651
|
});
|
|
14135
13652
|
IkasProductDetail.prototype.selectVariantValue = function (variantValue) {
|
|
14136
|
-
var _this = this;
|
|
14137
13653
|
var _a;
|
|
13654
|
+
var metaData = this.product.metaData;
|
|
14138
13655
|
var selectedVariantValues = this.selectedVariantValues.map(function (vv) {
|
|
14139
13656
|
if (vv.variantTypeId === variantValue.variantTypeId)
|
|
14140
13657
|
return variantValue;
|
|
14141
13658
|
return vv;
|
|
14142
13659
|
});
|
|
14143
|
-
var queryParams = {};
|
|
14144
|
-
selectedVariantValues.forEach(function (vv) {
|
|
14145
|
-
var vt = _this.product.variantTypes.find(function (vt) { return vt.variantType.id === vv.variantTypeId; });
|
|
14146
|
-
queryParams[vt.variantType.slug] = vv.slug;
|
|
14147
|
-
});
|
|
14148
13660
|
this.selectedVariantValues = selectedVariantValues;
|
|
14149
|
-
|
|
13661
|
+
var newUrl = "/" + metaData.slug + "-" + this.selectedVariantValues
|
|
13662
|
+
.map(function (vv) { return vv.slug; })
|
|
13663
|
+
.join("-");
|
|
13664
|
+
(_a = this.router) === null || _a === void 0 ? void 0 : _a.replace(newUrl);
|
|
14150
13665
|
};
|
|
14151
13666
|
return IkasProductDetail;
|
|
14152
13667
|
}());
|
|
@@ -18858,7 +18373,7 @@ var IkasCustomerAPI = /** @class */ (function () {
|
|
|
18858
18373
|
case 3:
|
|
18859
18374
|
err_5 = _b.sent();
|
|
18860
18375
|
console.log(err_5);
|
|
18861
|
-
return [
|
|
18376
|
+
return [2 /*return*/, false];
|
|
18862
18377
|
case 4: return [2 /*return*/, true];
|
|
18863
18378
|
}
|
|
18864
18379
|
});
|
|
@@ -23168,11 +22683,62 @@ var PolicyModal = observer(function (_a) {
|
|
|
23168
22683
|
});
|
|
23169
22684
|
|
|
23170
22685
|
var IkasPageHead = observer(function (_a) {
|
|
23171
|
-
var
|
|
22686
|
+
var page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr;
|
|
22687
|
+
var schema;
|
|
22688
|
+
if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === IkasThemePageType.PRODUCT) {
|
|
22689
|
+
schema = createProductSchema(pageSpecificDataStr);
|
|
22690
|
+
}
|
|
23172
22691
|
return (createElement(Head, null,
|
|
23173
|
-
createElement("title", null, pageTitle || ""),
|
|
23174
|
-
createElement("meta", { name: "description", content: description || "" })
|
|
23175
|
-
|
|
22692
|
+
createElement("title", null, (page === null || page === void 0 ? void 0 : page.pageTitle) || ""),
|
|
22693
|
+
createElement("meta", { name: "description", content: (page === null || page === void 0 ? void 0 : page.description) || "" }),
|
|
22694
|
+
!!schema && (createElement("script", { type: "application/ld+json", dangerouslySetInnerHTML: {
|
|
22695
|
+
__html: JSON.stringify(schema),
|
|
22696
|
+
} }))));
|
|
22697
|
+
});
|
|
22698
|
+
function createProductSchema(pageSpecificDataStr) {
|
|
22699
|
+
var _a;
|
|
22700
|
+
var productDetailParsed = JSON.parse(pageSpecificDataStr);
|
|
22701
|
+
var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
|
|
22702
|
+
return {
|
|
22703
|
+
"@context": "https://schema.org/",
|
|
22704
|
+
"@type": "Product",
|
|
22705
|
+
name: productDetail.product.name,
|
|
22706
|
+
image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
|
|
22707
|
+
description: "Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height.",
|
|
22708
|
+
sku: productDetail.selectedVariant.sku,
|
|
22709
|
+
mpn: "925872",
|
|
22710
|
+
brand: {
|
|
22711
|
+
"@type": "Brand",
|
|
22712
|
+
name: (_a = productDetail.product.brand) === null || _a === void 0 ? void 0 : _a.name,
|
|
22713
|
+
},
|
|
22714
|
+
review: {
|
|
22715
|
+
"@type": "Review",
|
|
22716
|
+
reviewRating: {
|
|
22717
|
+
"@type": "Rating",
|
|
22718
|
+
ratingValue: "4",
|
|
22719
|
+
bestRating: "5",
|
|
22720
|
+
},
|
|
22721
|
+
author: {
|
|
22722
|
+
"@type": "Person",
|
|
22723
|
+
name: "Fred Benson",
|
|
22724
|
+
},
|
|
22725
|
+
},
|
|
22726
|
+
aggregateRating: {
|
|
22727
|
+
"@type": "AggregateRating",
|
|
22728
|
+
ratingValue: "4.4",
|
|
22729
|
+
reviewCount: "89",
|
|
22730
|
+
},
|
|
22731
|
+
offers: {
|
|
22732
|
+
"@type": "Offer",
|
|
22733
|
+
url: "https://example.com/anvil",
|
|
22734
|
+
priceCurrency: productDetail.selectedVariant.price.currency,
|
|
22735
|
+
price: productDetail.selectedVariant.price.finalPrice,
|
|
22736
|
+
priceValidUntil: "2020-11-20",
|
|
22737
|
+
itemCondition: "https://schema.org/UsedCondition",
|
|
22738
|
+
availability: "https://schema.org/InStock",
|
|
22739
|
+
},
|
|
22740
|
+
};
|
|
22741
|
+
}
|
|
23176
22742
|
|
|
23177
22743
|
var IkasCheckoutPage = observer(function (_a) {
|
|
23178
22744
|
var _b, _c, _d;
|
|
@@ -23332,7 +22898,7 @@ var ThemeComponent = observer(function (_a) {
|
|
|
23332
22898
|
|
|
23333
22899
|
var IkasPage = observer(function (_a) {
|
|
23334
22900
|
var _b, _c;
|
|
23335
|
-
var propValues = _a.propValues, page = _a.page;
|
|
22901
|
+
var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr;
|
|
23336
22902
|
var renderComponent = function (pageComponent, index) {
|
|
23337
22903
|
var pageComponentPropValue = propValues.find(function (pv) { return pv.pageComponent.id === pageComponent.id; });
|
|
23338
22904
|
return (createElement(ThemeComponent, { key: pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, pageComponent: pageComponent }));
|
|
@@ -23345,7 +22911,7 @@ var IkasPage = observer(function (_a) {
|
|
|
23345
22911
|
if (!page)
|
|
23346
22912
|
return null;
|
|
23347
22913
|
return (createElement(Fragment, null,
|
|
23348
|
-
createElement(IkasPageHead, {
|
|
22914
|
+
createElement(IkasPageHead, { page: page, pageSpecificDataStr: pageSpecificDataStr }),
|
|
23349
22915
|
createElement("div", { style: pageStyle },
|
|
23350
22916
|
createElement("div", null,
|
|
23351
22917
|
headerComponent && renderComponent(headerComponent, -1),
|
|
@@ -23492,7 +23058,7 @@ var PageViewModel = /** @class */ (function () {
|
|
|
23492
23058
|
return [4 /*yield*/, pageDataProvider.getPageData()];
|
|
23493
23059
|
case 1:
|
|
23494
23060
|
_b.sent();
|
|
23495
|
-
pageDataProvider.pageComponentPropValues = IkasPageDataProvider.initPropValues(JSON.stringify(pageDataProvider.pageComponentPropValues), this.router
|
|
23061
|
+
pageDataProvider.pageComponentPropValues = IkasPageDataProvider.initPropValues(JSON.stringify(pageDataProvider.pageComponentPropValues), this.router);
|
|
23496
23062
|
runInAction(function () {
|
|
23497
23063
|
_this.pageDataProvider = pageDataProvider;
|
|
23498
23064
|
_this.isLoading = false;
|
|
@@ -23837,18 +23403,76 @@ var home = /*#__PURE__*/Object.freeze({
|
|
|
23837
23403
|
});
|
|
23838
23404
|
|
|
23839
23405
|
var Page$1 = function (_a) {
|
|
23840
|
-
var page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, propValuesStr = _a.propValuesStr
|
|
23406
|
+
var page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, propValuesStr = _a.propValuesStr;
|
|
23841
23407
|
var router = useRouter();
|
|
23842
23408
|
var propValues = computed(function () {
|
|
23843
|
-
return IkasPageDataProvider.initPropValues(propValuesStr, router
|
|
23844
|
-
? queryString.parse(window.location.search.replace("?", ""))
|
|
23845
|
-
: queryParams);
|
|
23409
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
23846
23410
|
});
|
|
23847
23411
|
handleGTM(page, pageSpecificDataStr);
|
|
23848
|
-
return createElement(IkasPage, { page: page, propValues: propValues.get() });
|
|
23412
|
+
return (createElement(IkasPage, { page: page, propValues: propValues.get(), pageSpecificDataStr: pageSpecificDataStr }));
|
|
23849
23413
|
};
|
|
23850
23414
|
var index$1 = observer(Page$1);
|
|
23851
|
-
var
|
|
23415
|
+
var getStaticPaths = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
23416
|
+
var metaData, targetTypes, brandCategoryMetaData, productMetaData, productsResponse, productParams, _loop_1, _i, _a, product;
|
|
23417
|
+
return __generator(this, function (_b) {
|
|
23418
|
+
switch (_b.label) {
|
|
23419
|
+
case 0: return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData()];
|
|
23420
|
+
case 1:
|
|
23421
|
+
metaData = _b.sent();
|
|
23422
|
+
targetTypes = [
|
|
23423
|
+
IkasHTMLMetaDataTargetType.BRAND,
|
|
23424
|
+
IkasHTMLMetaDataTargetType.CATEGORY,
|
|
23425
|
+
];
|
|
23426
|
+
brandCategoryMetaData = metaData.filter(function (m) { return m.targetType && targetTypes.includes(m.targetType); });
|
|
23427
|
+
productMetaData = metaData.filter(function (m) { return m.targetType && m.targetType === IkasHTMLMetaDataTargetType.PRODUCT; });
|
|
23428
|
+
return [4 /*yield*/, IkasProductAPI.listProducts({
|
|
23429
|
+
idList: productMetaData.map(function (p) { return p.targetId; }),
|
|
23430
|
+
})];
|
|
23431
|
+
case 2:
|
|
23432
|
+
productsResponse = _b.sent();
|
|
23433
|
+
productParams = [];
|
|
23434
|
+
_loop_1 = function (product) {
|
|
23435
|
+
var meta = productMetaData.find(function (pm) { return pm.targetId === product.id; });
|
|
23436
|
+
if (meta) {
|
|
23437
|
+
for (var _i = 0, _a = product.variants; _i < _a.length; _i++) {
|
|
23438
|
+
var variant = _a[_i];
|
|
23439
|
+
if (product.hasVariant) {
|
|
23440
|
+
var variantSlug = variant.variantValues
|
|
23441
|
+
.map(function (vv) { return vv.slug; })
|
|
23442
|
+
.join("-");
|
|
23443
|
+
productParams.push({
|
|
23444
|
+
slug: meta.slug + "-" + variantSlug,
|
|
23445
|
+
});
|
|
23446
|
+
}
|
|
23447
|
+
else {
|
|
23448
|
+
productParams.push({
|
|
23449
|
+
slug: meta.slug,
|
|
23450
|
+
});
|
|
23451
|
+
}
|
|
23452
|
+
}
|
|
23453
|
+
}
|
|
23454
|
+
};
|
|
23455
|
+
for (_i = 0, _a = productsResponse.products; _i < _a.length; _i++) {
|
|
23456
|
+
product = _a[_i];
|
|
23457
|
+
_loop_1(product);
|
|
23458
|
+
}
|
|
23459
|
+
return [2 /*return*/, {
|
|
23460
|
+
paths: brandCategoryMetaData
|
|
23461
|
+
.map(function (m) { return ({
|
|
23462
|
+
params: {
|
|
23463
|
+
slug: m.slug,
|
|
23464
|
+
originalSlug: m.slug,
|
|
23465
|
+
},
|
|
23466
|
+
}); })
|
|
23467
|
+
.concat(productParams.map(function (pp) { return ({
|
|
23468
|
+
params: pp,
|
|
23469
|
+
}); })),
|
|
23470
|
+
fallback: "blocking",
|
|
23471
|
+
}];
|
|
23472
|
+
}
|
|
23473
|
+
});
|
|
23474
|
+
}); };
|
|
23475
|
+
var getStaticProps$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
23852
23476
|
var theme, provider;
|
|
23853
23477
|
return __generator(this, function (_a) {
|
|
23854
23478
|
switch (_a.label) {
|
|
@@ -23865,7 +23489,8 @@ var getServerSideProps = function (context) { return __awaiter(void 0, void 0, v
|
|
|
23865
23489
|
}];
|
|
23866
23490
|
}
|
|
23867
23491
|
return [2 /*return*/, {
|
|
23868
|
-
props: __assign(__assign({}, provider.nextPageData.props), { pageSpecificDataStr: JSON.stringify(provider.pageSpecificData || {})
|
|
23492
|
+
props: __assign(__assign({}, provider.nextPageData.props), { pageSpecificDataStr: JSON.stringify(provider.pageSpecificData || {}) }),
|
|
23493
|
+
revalidate: 60,
|
|
23869
23494
|
}];
|
|
23870
23495
|
}
|
|
23871
23496
|
});
|
|
@@ -23889,7 +23514,8 @@ function handleGTM(page, pageSpecificDataStr) {
|
|
|
23889
23514
|
var index$2 = /*#__PURE__*/Object.freeze({
|
|
23890
23515
|
__proto__: null,
|
|
23891
23516
|
'default': index$1,
|
|
23892
|
-
|
|
23517
|
+
getStaticPaths: getStaticPaths,
|
|
23518
|
+
getStaticProps: getStaticProps$1
|
|
23893
23519
|
});
|
|
23894
23520
|
|
|
23895
23521
|
var Page$2 = function (_a) {
|
|
@@ -23898,7 +23524,7 @@ var Page$2 = function (_a) {
|
|
|
23898
23524
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
23899
23525
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
23900
23526
|
};
|
|
23901
|
-
var getStaticPaths = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
23527
|
+
var getStaticPaths$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
23902
23528
|
var theme, customPages, customPagePaths;
|
|
23903
23529
|
return __generator(this, function (_a) {
|
|
23904
23530
|
switch (_a.label) {
|
|
@@ -23918,7 +23544,7 @@ var getStaticPaths = function (context) { return __awaiter(void 0, void 0, void
|
|
|
23918
23544
|
}
|
|
23919
23545
|
});
|
|
23920
23546
|
}); };
|
|
23921
|
-
var getStaticProps$
|
|
23547
|
+
var getStaticProps$2 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
23922
23548
|
var theme, provider;
|
|
23923
23549
|
return __generator(this, function (_a) {
|
|
23924
23550
|
switch (_a.label) {
|
|
@@ -23937,8 +23563,8 @@ var getStaticProps$1 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
23937
23563
|
var _slug_ = /*#__PURE__*/Object.freeze({
|
|
23938
23564
|
__proto__: null,
|
|
23939
23565
|
'default': Page$2,
|
|
23940
|
-
getStaticPaths: getStaticPaths,
|
|
23941
|
-
getStaticProps: getStaticProps$
|
|
23566
|
+
getStaticPaths: getStaticPaths$1,
|
|
23567
|
+
getStaticProps: getStaticProps$2
|
|
23942
23568
|
});
|
|
23943
23569
|
|
|
23944
23570
|
var CheckoutPage = function (_a) {
|
|
@@ -23948,7 +23574,7 @@ var CheckoutPage = function (_a) {
|
|
|
23948
23574
|
return createElement(IkasCheckoutPage, { checkout: checkout, queryParams: queryParams });
|
|
23949
23575
|
};
|
|
23950
23576
|
var _id_ = observer(CheckoutPage);
|
|
23951
|
-
var getServerSideProps
|
|
23577
|
+
var getServerSideProps = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
23952
23578
|
var id, redirect, checkout;
|
|
23953
23579
|
return __generator(this, function (_a) {
|
|
23954
23580
|
switch (_a.label) {
|
|
@@ -23983,7 +23609,7 @@ var getServerSideProps$1 = function (context) { return __awaiter(void 0, void 0,
|
|
|
23983
23609
|
var _id_$1 = /*#__PURE__*/Object.freeze({
|
|
23984
23610
|
__proto__: null,
|
|
23985
23611
|
'default': _id_,
|
|
23986
|
-
getServerSideProps: getServerSideProps
|
|
23612
|
+
getServerSideProps: getServerSideProps
|
|
23987
23613
|
});
|
|
23988
23614
|
|
|
23989
23615
|
var Page$3 = function (_a) {
|
|
@@ -23992,7 +23618,7 @@ var Page$3 = function (_a) {
|
|
|
23992
23618
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
23993
23619
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
23994
23620
|
};
|
|
23995
|
-
var getStaticProps$
|
|
23621
|
+
var getStaticProps$3 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
23996
23622
|
var theme, provider;
|
|
23997
23623
|
return __generator(this, function (_a) {
|
|
23998
23624
|
switch (_a.label) {
|
|
@@ -24011,7 +23637,7 @@ var getStaticProps$2 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
24011
23637
|
var index$3 = /*#__PURE__*/Object.freeze({
|
|
24012
23638
|
__proto__: null,
|
|
24013
23639
|
'default': Page$3,
|
|
24014
|
-
getStaticProps: getStaticProps$
|
|
23640
|
+
getStaticProps: getStaticProps$3
|
|
24015
23641
|
});
|
|
24016
23642
|
|
|
24017
23643
|
var Page$4 = function (_a) {
|
|
@@ -24020,7 +23646,7 @@ var Page$4 = function (_a) {
|
|
|
24020
23646
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
24021
23647
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
24022
23648
|
};
|
|
24023
|
-
var getStaticProps$
|
|
23649
|
+
var getStaticProps$4 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24024
23650
|
var theme, provider;
|
|
24025
23651
|
return __generator(this, function (_a) {
|
|
24026
23652
|
switch (_a.label) {
|
|
@@ -24039,7 +23665,7 @@ var getStaticProps$3 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
24039
23665
|
var addresses = /*#__PURE__*/Object.freeze({
|
|
24040
23666
|
__proto__: null,
|
|
24041
23667
|
'default': Page$4,
|
|
24042
|
-
getStaticProps: getStaticProps$
|
|
23668
|
+
getStaticProps: getStaticProps$4
|
|
24043
23669
|
});
|
|
24044
23670
|
|
|
24045
23671
|
var Page$5 = function (_a) {
|
|
@@ -24048,7 +23674,7 @@ var Page$5 = function (_a) {
|
|
|
24048
23674
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
24049
23675
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
24050
23676
|
};
|
|
24051
|
-
var getStaticProps$
|
|
23677
|
+
var getStaticProps$5 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24052
23678
|
var theme, provider;
|
|
24053
23679
|
return __generator(this, function (_a) {
|
|
24054
23680
|
switch (_a.label) {
|
|
@@ -24067,7 +23693,7 @@ var getStaticProps$4 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
24067
23693
|
var index$4 = /*#__PURE__*/Object.freeze({
|
|
24068
23694
|
__proto__: null,
|
|
24069
23695
|
'default': Page$5,
|
|
24070
|
-
getStaticProps: getStaticProps$
|
|
23696
|
+
getStaticProps: getStaticProps$5
|
|
24071
23697
|
});
|
|
24072
23698
|
|
|
24073
23699
|
var Page$6 = function (_a) {
|
|
@@ -24076,7 +23702,7 @@ var Page$6 = function (_a) {
|
|
|
24076
23702
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
24077
23703
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
24078
23704
|
};
|
|
24079
|
-
var getServerSideProps$
|
|
23705
|
+
var getServerSideProps$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24080
23706
|
var theme, provider;
|
|
24081
23707
|
return __generator(this, function (_a) {
|
|
24082
23708
|
switch (_a.label) {
|
|
@@ -24095,7 +23721,7 @@ var getServerSideProps$2 = function (context) { return __awaiter(void 0, void 0,
|
|
|
24095
23721
|
var _id_$2 = /*#__PURE__*/Object.freeze({
|
|
24096
23722
|
__proto__: null,
|
|
24097
23723
|
'default': Page$6,
|
|
24098
|
-
getServerSideProps: getServerSideProps$
|
|
23724
|
+
getServerSideProps: getServerSideProps$1
|
|
24099
23725
|
});
|
|
24100
23726
|
|
|
24101
23727
|
var Page$7 = function (_a) {
|
|
@@ -24104,7 +23730,7 @@ var Page$7 = function (_a) {
|
|
|
24104
23730
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
24105
23731
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
24106
23732
|
};
|
|
24107
|
-
var getStaticProps$
|
|
23733
|
+
var getStaticProps$6 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24108
23734
|
var theme, provider;
|
|
24109
23735
|
return __generator(this, function (_a) {
|
|
24110
23736
|
switch (_a.label) {
|
|
@@ -24123,7 +23749,7 @@ var getStaticProps$5 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
24123
23749
|
var login = /*#__PURE__*/Object.freeze({
|
|
24124
23750
|
__proto__: null,
|
|
24125
23751
|
'default': Page$7,
|
|
24126
|
-
getStaticProps: getStaticProps$
|
|
23752
|
+
getStaticProps: getStaticProps$6
|
|
24127
23753
|
});
|
|
24128
23754
|
|
|
24129
23755
|
var Page$8 = function (_a) {
|
|
@@ -24132,7 +23758,7 @@ var Page$8 = function (_a) {
|
|
|
24132
23758
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
24133
23759
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
24134
23760
|
};
|
|
24135
|
-
var getStaticProps$
|
|
23761
|
+
var getStaticProps$7 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24136
23762
|
var theme, provider;
|
|
24137
23763
|
return __generator(this, function (_a) {
|
|
24138
23764
|
switch (_a.label) {
|
|
@@ -24151,7 +23777,7 @@ var getStaticProps$6 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
24151
23777
|
var register = /*#__PURE__*/Object.freeze({
|
|
24152
23778
|
__proto__: null,
|
|
24153
23779
|
'default': Page$8,
|
|
24154
|
-
getStaticProps: getStaticProps$
|
|
23780
|
+
getStaticProps: getStaticProps$7
|
|
24155
23781
|
});
|
|
24156
23782
|
|
|
24157
23783
|
var Page$9 = function (_a) {
|
|
@@ -24160,7 +23786,7 @@ var Page$9 = function (_a) {
|
|
|
24160
23786
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
24161
23787
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
24162
23788
|
};
|
|
24163
|
-
var getStaticProps$
|
|
23789
|
+
var getStaticProps$8 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24164
23790
|
var theme, provider;
|
|
24165
23791
|
return __generator(this, function (_a) {
|
|
24166
23792
|
switch (_a.label) {
|
|
@@ -24179,7 +23805,7 @@ var getStaticProps$7 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
24179
23805
|
var forgotPassword = /*#__PURE__*/Object.freeze({
|
|
24180
23806
|
__proto__: null,
|
|
24181
23807
|
'default': Page$9,
|
|
24182
|
-
getStaticProps: getStaticProps$
|
|
23808
|
+
getStaticProps: getStaticProps$8
|
|
24183
23809
|
});
|
|
24184
23810
|
|
|
24185
23811
|
var Page$a = function (_a) {
|
|
@@ -24188,7 +23814,7 @@ var Page$a = function (_a) {
|
|
|
24188
23814
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
24189
23815
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
24190
23816
|
};
|
|
24191
|
-
var getStaticProps$
|
|
23817
|
+
var getStaticProps$9 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24192
23818
|
var theme, provider;
|
|
24193
23819
|
return __generator(this, function (_a) {
|
|
24194
23820
|
switch (_a.label) {
|
|
@@ -24207,7 +23833,7 @@ var getStaticProps$8 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
24207
23833
|
var recoverPassword = /*#__PURE__*/Object.freeze({
|
|
24208
23834
|
__proto__: null,
|
|
24209
23835
|
'default': Page$a,
|
|
24210
|
-
getStaticProps: getStaticProps$
|
|
23836
|
+
getStaticProps: getStaticProps$9
|
|
24211
23837
|
});
|
|
24212
23838
|
|
|
24213
23839
|
var Page$b = function (_a) {
|
|
@@ -24216,7 +23842,7 @@ var Page$b = function (_a) {
|
|
|
24216
23842
|
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
24217
23843
|
return createElement(IkasPage, { page: page, propValues: propValues });
|
|
24218
23844
|
};
|
|
24219
|
-
var getStaticProps$
|
|
23845
|
+
var getStaticProps$a = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24220
23846
|
var theme, provider;
|
|
24221
23847
|
return __generator(this, function (_a) {
|
|
24222
23848
|
switch (_a.label) {
|
|
@@ -24235,7 +23861,7 @@ var getStaticProps$9 = function (context) { return __awaiter(void 0, void 0, voi
|
|
|
24235
23861
|
var cart = /*#__PURE__*/Object.freeze({
|
|
24236
23862
|
__proto__: null,
|
|
24237
23863
|
'default': Page$b,
|
|
24238
|
-
getStaticProps: getStaticProps$
|
|
23864
|
+
getStaticProps: getStaticProps$a
|
|
24239
23865
|
});
|
|
24240
23866
|
|
|
24241
23867
|
var IkasPageEditor$1 = dynamic(function () { return Promise.resolve().then(function () { return index; }).then(function (mod) { return mod.IkasPageEditor; }); }, { ssr: false });
|