5601productObj = dataObj.product;5602} catch (error) {5603console.error(error);5604}5605if (!productObj) {5606console.error(5607"Can't get product with uid = " + curProdUid + ' in storepart = ' + options.storepart5608);5609return;5610}5611t_catalog_openProductPopup(recid, options, productObj);5612
} else { console.error( "Can't get product with uid = " + curProdUid + ' in storepart = ' + options.storepart ); } }; // 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_2 t_catalog_loadOneProduct(recid, options, curProdUid, onDone, function (error) { t_catalog_changeEndpoint(error, function () { // 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_loadOneProduct(recid, options, curProdUid, onDone); }); }); } else { // if user coming from catalog redirect back to main page } } }}// 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_showPopup(recid, fromHistory, fromPopup) { var el = document.getElementById('rec' + recid); // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 var popup = el.querySelector('.t-popup'); t_catalog_resetNavStyles(recid); t_catalog_triggerEvent(document.body, 'popupShowed'); document.body.classList.add('t-body_popupshowed'); // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 popup.style.display = 'block'; // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 var isPopupOverflowed = popup.scrollHeight > document.documentElement.clientHeight; if (!isPopupOverflowed) { // remove scrollbar before show popup // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 popup.style.overflow = 'hidden'; } setTimeout(function () { // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 popup.querySelector('.t-popup__container').classList.add('t-popup__container-animated'); // @ts-expect-error ST-2949_3 popup.classList.add('t-popup_show'); t_catalog_triggerEvent(document.body, 'twishlist_addbtn'); t_catalog_popup_updateLazyLoad(); if (!isPopupOverflowed) { // add scrollbar after .3s of transition setTimeout(function () { // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 popup.style.overflow = 'auto'; // 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_triggerEvent(popup, t_catalog_POPUP_SHOWED_EVENT_NAME); }, 300); return; } // подскроливаем к верху, необходимо для корректного // отображения попапа (если в предыдущий раз мы доскролили до низа) // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 popup.scrollTop = 0; // 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_triggerEvent(popup, t_catalog_POPUP_SHOWED_EVENT_NAME); }, 50); // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 popup.addEventListener(t_catalog_POPUP_SHOWED_EVENT_NAME, t_catalog_popup_updateLazyLoad); if (!fromPopup) { // 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_addPopupEvents(el, recid); }}