3001}3002imgEl.classList.add('t-bgimg');3003imgEl.setAttribute('data-original', imgSrc);3004imgEl.style.backgroundImage = 'url("' + t_store_getLazyUrl(options, imgSrc) + '")';3005t_store_get_productCard_getImgStyles(imgEl, options);3006}30073008if (product.editions.length === 1) {3009var edition = t_store_product_getFirstAvailableEditionData(product.editions);3010// у mock-товаров uid пустой3011if (edition.uid) {3012
imgEl.setAttribute( options.hasOriginalAspectRatio ? 'imgfield' : 'bgimgfield', 'st_gallery__' + edition.uid + ':::0' ); } } str += '<div class="' + wrapperClassStr + '" style="' + wrapperStyle + '">'; str += ' ' + t_store_get_productCard_mark_html(product, options); str += ' ' + imgEl.outerHTML; str += ' ' + (options.imageHover ? hoverImgEl : ''); str += '</div>'; return str; } else { return ''; }}function t_store_get_productCard_img_replaceWith(product, el_product, options, curImage) { var el_image = el_product.querySelector('.t-store__card__imgwrapper'); var el_newImage = t_store_get_productCard_img_html(product, options, curImage); if (el_image) { el_image.outerHTML = el_newImage; } t_store_popup_updateLazyLoad(); t_store_triggerEvent(document.body, 'twishlist_addbtn');}function t_store_get_productCard_imgElHover_html(product, options, curtImg) { if (product.gallery && product.gallery[0] === '[') { var galleryArr = JSON.parse(product.gallery); if (typeof galleryArr[1] !== 'undefined') { var imgSrc = galleryArr[1].img; // if current image is passed to the function find another unique image in gallery to show on hover if (curtImg && curtImg.length) { for (var i = 0; i < galleryArr.length; i++) { var img = galleryArr[i].img; if (img !== curtImg) { imgSrc = img; break; } } } var imgEl; if (options.hasOriginalAspectRatio) { imgEl = document.createElement('img'); imgEl.classList.add('t-store__card__img'); imgEl.classList.add('t-store__card__img_second'); imgEl.classList.add('t-img'); imgEl.setAttribute('data-original', imgSrc); imgEl.src = t_store_getLazySrc(options, imgSrc); var isSafari16_3 = /Version\/16\.3 Safari/.test(navigator.userAgent); if (isSafari16_3) { imgEl.style.objectFit = 'contain'; } } else { imgEl = document.createElement('div'); imgEl.classList.add('t-store__card__bgimg', 't-store__card__bgimg_second'); imgEl.classList.add('t-bgimg'); imgEl.setAttribute('data-original', imgSrc); imgEl.style.backgroundImage = 'url("' + t_store_getLazyUrl(options, imgSrc) + '")'; t_store_get_productCard_getImgStyles(imgEl, options); } return imgEl.outerHTML; } } return '';}function t_store_get_productCard_getImgStyles(el, options) { if (options && options.prodCard && options.prodCard.borderRadius) { var size = parseInt(options.prodCard.borderRadius, 10); el.style.borderRadius = size + 'px ' + size + 'px 0px 0px'; if (size > 0 && !window.tStoreIsMobile) { el.style.top = '-2px'; } }}function t_store_get_productCard_mark_html(product, options) { if (!product.mark) { return ''; } var stylesStr = '';