9101});9102} else if (window.tStoreSingleProdsObj) {9103// @ts-expect-error ST-2949_39104t_catalog_oneProduct_fill(recid, window.tStoreSingleProdsObj[uid], options);9105} else {9106el_prod.addEventListener('tStoreSingleProductsLoaded', function () {9107// @ts-expect-error ST-2949_39108t_catalog_oneProduct_fill(recid, window.tStoreSingleProdsObj[uid], options);9109});9110}9111}9112
// 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_clearUid(uid) { if (typeof uid !== 'string') return ''; return uid.replace('product id: ', '');}// 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_preloader_add(recid) { var el_rec = document.getElementById('rec' + recid); // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 var el_prod = el_rec.querySelector('.js-catalog-product_single'); if (!el_prod) return; var elInfo = el_prod.querySelector('.js-catalog-single-product-info'); // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 elInfo.style.display = 'none'; // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 clearTimeout(el_rec.getAttribute('data-preloader-timeout')); var preloaderTimerId = setTimeout(function () { var str = ''; str += '<div class="t-catalog__single-prod-preloader" style="display:none;">'; var strTextEl = '<div class="t-catalog__single-prod-preloader__text"></div>'; for (var i = 0; i < 6; i++) { str += strTextEl; } str += '</div>'; // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 elInfo.insertAdjacentHTML('beforebegin', str); // @ts-expect-error ST-2949_3 t_catalog__fadeIn(el_prod.querySelector('.t-catalog__single-prod-preloader')); }, 1000); // @ts-expect-error ST-2949_3 el_rec.setAttribute('data-preloader-timeout', preloaderTimerId);}// 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_preloader_hide(recid) { var el_rec = document.getElementById('rec' + recid); // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 var el_prod = el_rec.querySelector('.js-catalog-product_single'); if (!el_prod) return; // @ts-expect-error ST-2949_3 clearTimeout(el_rec.getAttribute('data-preloader-timeout')); var storeSingleProductInfo = el_prod.querySelector('.js-catalog-single-product-info'); if (storeSingleProductInfo) { // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 storeSingleProductInfo.style.display = ''; } var orderLink = el_prod.querySelector('a.t-btn[href="#order"]'); var orderWrapper = orderLink ? orderLink.parentElement || orderLink.parentNode : ''; // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 if (orderWrapper) orderWrapper.style.pointerEvents = 'inherit'; // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 t_catalog__removeElement(el_prod.querySelector('.t-catalog__single-prod-preloader'));}// 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_requestAllSingle(options) { // get single products ids var el_singleProds = document.querySelectorAll('.js-catalog-product_single'); // @ts-expect-error ST-2949_2 var arrId = []; Array.prototype.forEach.call(el_singleProds, function (product) { var uid = product.getAttribute('data-product-gen-uid'); uid = t_catalog_oneProduct_clearUid(uid); arrId.push(uid); });