9301// add SKU text9302var storeProdSKU = el_product.querySelector('.js-catalog-prod-sku');9303// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)9304// @ts-expect-error ST-2949_19305if (storeProdSKU && storeProdSKU.style.display !== 'none') {9306var parent = storeProdSKU.parentNode;9307if (parent) {9308// @ts-expect-error ST-2949_19309if (parent.classList.contains('t-descr')) {9310// TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)9311// @ts-expect-error ST-2949_3
storeProdSKU.insertAdjacentHTML('beforebegin', window.tCatalogDict['sku'] + ': '); } } }}// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function t_catalog_oneProduct_successMsg_show(recid, product, options) { if (!options.previewmode) { var el_rec = document.getElementById('rec' + recid); var text = t_catalog__getBrowserLang() === 'RU' ? 'Товар успешно связан с каталогом. Название товара в каталоге: ' : 'Product is connected to catalog. Product name in catalog is '; text += '<b>' + product.title + '</b>'; t_catalog_showMsgInRedactor(el_rec, text, 'success'); }}// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function t_catalog_oneProduct_error_show(recid, opts) { if (!opts.previewmode) { var el_rec = document.getElementById('rec' + recid); var errorText = t_catalog__getBrowserLang() === 'RU' ? 'Не удается получить товар из каталога. Возможно он был удален или отключен. Пожалуйста, проверьте, что товар с таким ID существует.' : "Can't find a product in the catalog. It may have been deleted or disabled. Please check that the product with this ID exists."; t_catalog_showMsgInRedactor(el_rec, errorText, 'error'); }}// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function t_catalog_showMsgInRedactor(el_rec, text, type) { var storeMsg = el_rec.querySelector('.js-catalog-msg'); t_catalog__removeElement(storeMsg); var textColor = type === 'success' ? '#fff' : '#000'; var bgColor = type === 'success' ? '#62C584' : 'yellow'; var msgHtml = ''; msgHtml += '<div class="js-catalog-msg" style="margin: 0;text-align: left; font-family: tfutura,Arial,sans-serif; color: ' + textColor + ';">'; msgHtml += ' <div style="background: ' + bgColor + '; padding: 16px 20px; box-sizing: border-box; margin-bottom: 30px; position: relative;" class="t-container">'; msgHtml += ' <div style="width: 40px; height: 40px; position: absolute; left: 20px; bottom: -40px;">'; msgHtml += ' <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="40px" width="40px"><polygon fill="' + bgColor + '" stroke="' + bgColor + '" stroke-width="0" points="0,0 40,0 0,20 0,0"></polygon></svg>'; msgHtml += ' </div>'; msgHtml += text; msgHtml += ' </div>'; msgHtml += '</div>'; el_rec.insertAdjacentHTML('afterbegin', msgHtml);}// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function t_catalog_isQueryInAddressBar(queryString) { var currentLocationSearch; try { currentLocationSearch = decodeURI(window.location.href); } catch (error) { console.error(error); currentLocationSearch = window.location.href; } if (!currentLocationSearch) { return false; } return currentLocationSearch.indexOf(queryString) !== -1;}// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function t_catalog_getColumnWidth(size) { var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var mediaQuery = windowWidth > 1200 ? 'minWidth1200' : 'maxWidth1200'; var gridSizes = { minWidth1200: { col_1: 60,