str += '<div class="' + wrapperClassStr + '" style="' + wrapperStyle + '">';
3913 str += ' ' + t_catalog_get_productCard_mark_html(product, options); 3914 str += ' ' + imgEl.outerHTML; 3915 str += ' ' + (options.imageHover ? hoverImgEl : ''); 3921 // Заглушка только если шаблон карточки кладёт что-то на фото. Флаг ставит fillImage / replaceWith. 3922 return t_catalog__emptyProductCardImageHtml({ 3923 listStyle: options.prodCard.listStyle, 3924 placeholderWithoutImage: options.prodCard.placeholderWithoutImage, 3925 wrapperClass: wrapperClassStr, 3926 wrapperStyle: wrapperStyle, 3927 markHtml: t_catalog_get_productCard_mark_html(product, options), 3931// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 3932// @ts-expect-error ST-2949_2 3933function t_catalog_get_productCard_img_replaceWith(product, el_product, options, curImage) { 3934 const prodCard = options && options.prodCard; 3935 const previousPlaceholder = prodCard ? prodCard.placeholderWithoutImage : undefined; 3937 prodCard.placeholderWithoutImage = t_catalog__cardNeedsImagePlaceholder(el_product); 3942 el_newImage = t_catalog_get_productCard_img_html(product, options, curImage); 3945 if (previousPlaceholder === undefined) delete prodCard.placeholderWithoutImage; 3946 else prodCard.placeholderWithoutImage = previousPlaceholder; 3950 const el_image = el_product.querySelector('.t-catalog__card__imgwrapper'); 3951 const gallery = el_image && el_image.querySelector('.js-catalog-card-gallery'); 3953 selectCatalogGalleryImage(gallery, curImage); 3957 const filterEl = el_image && el_image.querySelector('.t-catalog__card__filter'); 3958 const filterClone = filterEl ? filterEl.cloneNode(true) : null; 3961 el_image.outerHTML = el_newImage; 3962 } else if (el_newImage) { 3963 t_catalog__insertProductCardImageHtml(el_product, el_newImage); 3967 const newWrapper = el_product.querySelector('.t-catalog__card__imgwrapper'); 3969 newWrapper.appendChild(filterClone); 3973 t_catalog_popup_updateLazyLoad(); 3974 t_catalog_triggerEvent(document.body, 'twishlist_addbtn'); 3977// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 3978// @ts-expect-error ST-2949_2 3979function t_catalog_get_productCard_imgElHover_html(product, options, curtImg) { 3980 if (product.gallery && product.gallery[0] === '[') { 3981 var galleryArr = JSON.parse(product.gallery); 3982 if (typeof galleryArr[1] !== 'undefined') { 3983 var imgSrc = galleryArr[1].img; 3984 // if current image is passed to the function find another unique image in gallery to show on hover 3985 if (curtImg && curtImg.length) { 3986 for (var i = 0; i < galleryArr.length; i++) { 3987 var img = galleryArr[i].img; 3988 if (img !== curtImg) { 3996 if (options.hasOriginalAspectRatio) { 3997 imgEl = document.createElement('img'); 3998 imgEl.classList.add('t-catalog__card__img'); 3999 imgEl.classList.add('t-catalog__card__img_second'); 4000 imgEl.classList.add('t-img');