Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-blocks-page189718009.min.js

Код файла
Версия от 13.09.2026, 07:00:42 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
401function t766_initPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;rec.setAttribute('data-animationappear','off');rec.style.opacity='1';var popup=rec.querySelector('.t-popup');if(!popup)return;var hook=popup.getAttribute('data-tooltip-hook');if(!hook)return;t_onFuncLoad('t_popup__addAttributesForAccessibility',function(){t_popup__addAttributesForAccessibility(hook)});var analitics=popup.getAttribute('data-track-popup');document.addEventListener('click',function(event){var target=event.target.closest('a[href="'+hook+'"]');if(target){t766_showPopup(recid);event.preventDefault();if(analitics&&window.Tilda){var virtualTitle=hook;if(virtualTitle.substring(0,7)==='#popup:'){virtualTitle=virtualTitle.substring(7)}402Tilda.sendEventToStatistics(analitics,virtualTitle)}}});t_onFuncLoad('t_popup__addClassOnTriggerButton',function(){t_popup__addClassOnTriggerButton(document,hook)});popup.addEventListener('mousedown',function(event){var windowWidth=window.innerWidth;var maxScrollBarWidth=17;var windowWithoutScrollBar=windowWidth-maxScrollBarWidth;if(event.clientX>windowWithoutScrollBar){return}403if(event.target===this){t766_closePopup(recid)}});var closeButtons=rec.querySelectorAll('.t-popup__close, .t766__close-text');Array.prototype.forEach.call(closeButtons,function(button){button.addEventListener('click',function(){t766_closePopup(recid)})});var buyButtons=rec.querySelectorAll('a[href*="#"]');Array.prototype.forEach.call(buyButtons,function(button){button.addEventListener('click',function(event){var url=button.getAttribute('href');if(!url||(url.substring(0,7)!=='#price:'&&url.substring(0,15)!=='#addtofavorites')){t766_closePopup(recid);if(!url||url.substring(0,7)==='#popup:'){var popupHook=document.querySelector('.t-popup[data-tooltip-hook="'+url+'"]');var recType='';if(popupHook){var recElement=popupHook.closest('.r');recType=recElement.getAttribute('data-parenttplid')||recElement.getAttribute('data-record-type')}404if(recType!=='945'){setTimeout(function(){document.body.classList.add('t-body_popupshowed')},300)}}else if(url.substring(0,1)==='#'&&/(android)/i.test(navigator.userAgent)){event.preventDefault();window.setTimeout(function(){var elID=url.substring(1);var el=document.getElementById(elID)||document.getElementsByName(elID)[0];if(el){el.scrollIntoView();window.location.hash=elID}},300)}}})});document.addEventListener('keydown',function(event){var isGallaryShowed=document.body.classList.contains('t-zoomer__show');if(isGallaryShowed)return;var isPopupShowed=document.body.classList.contains('t-body_popupshowed');if(!isPopupShowed)return;if(event.keyCode===27){t766_closePopup(recid)}})}
История файла и сравнение версий
  • 13.09.2026, 07:00:42 · 56c3b845
405function t766_showPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var popup=rec.querySelector('.t-popup');popup.style.display='block';setTimeout(function(){popup.querySelector('.t-popup__container').classList.add('t-popup__container-animated');popup.classList.add('t-popup_show');t_onFuncLoad('t_slds_SliderWidth',function(){t_slds_SliderWidth(recid)});popup.focus();t_onFuncLoad('t_popup__trapFocus',function(){t_popup__trapFocus(popup)});var sliderWrapper=rec.querySelector('.t-slds__items-wrapper');var position=parseInt(sliderWrapper.getAttribute('data-slider-pos'),10);var slider=rec.querySelector('.t-slds__container');var paddingLeft=parseInt(slider.style.paddingLeft,10)||0;var paddingRight=parseInt(slider.style.paddingRight,10)||0;var sliderWidth=slider.clientWidth-(paddingLeft+paddingRight);sliderWrapper.style.transform='translate3d(-'+sliderWidth*position+'px, 0, 0)';t_onFuncLoad('t_slds_UpdateSliderHeight',function(){t_slds_UpdateSliderHeight(recid)});t_onFuncLoad('t_slds_UpdateSliderArrowsHeight',function(){t_slds_UpdateSliderArrowsHeight(recid)});if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}},50);var body=document.body;if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');body.classList.add('t-body_popupshowed');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event)}
406function t766_closePopup(recid){var body=document.body;if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');body.classList.remove('t-body_popupshowed');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event);var rec=document.getElementById('rec'+recid);if(!rec)return;var allPopups=document.querySelectorAll('.t-popup');Array.prototype.forEach.call(allPopups,function(popup){popup.classList.remove('t-popup_show')});t_onFuncLoad('t_popup__addFocusOnTriggerButton',function(){t_popup__addFocusOnTriggerButton()});setTimeout(function(){var hiddenPopups=document.querySelectorAll('.t-popup:not(.t-popup_show)');hiddenPopups.forEach(function(popup){popup.style.display='none'})},300)}
407function t750_init(recid){setTimeout(function(){t_onFuncLoad('t_prod__init',function(){t_prod__init(recid)});t750_initPopup(recid);var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(event)},500)}
408function t750_initPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;rec.setAttribute('data-animationappear','off');rec.style.opacity='1';var popup=rec.querySelector('.t-popup');if(!popup)return;var hook=popup.getAttribute('data-tooltip-hook');var analitics=popup.getAttribute('data-track-popup');if(!hook)return;t_onFuncLoad('t_popup__addAttributesForAccessibility',function(){t_popup__addAttributesForAccessibility(hook)});var isInitSlds=!1;document.addEventListener('click',function(event){var target=event.target.closest('a[href="'+hook+'"]');if(target){event.preventDefault();t750_showPopup(recid);if(isInitSlds){t_onFuncLoad('t_slds_updateSlider',function(){t_slds_updateSlider(recid)})}else{t_onFuncLoad('t_sldsInit',function(){t_sldsInit(recid);isInitSlds=!0})}
409if(analitics&&window.Tilda){var virtualTitle=hook;if(virtualTitle.substring(0,7)==='#popup:'){virtualTitle=virtualTitle.substring(7)}
410Tilda.sendEventToStatistics(analitics,virtualTitle)}}});t_onFuncLoad('t_popup__addClassOnTriggerButton',function(){t_popup__addClassOnTriggerButton(document,hook)});popup.addEventListener('mousedown',function(event){var windowWidth=window.innerWidth;var maxScrollBarWidth=17;var windowWithoutScrollBar=windowWidth-maxScrollBarWidth;if(event.clientX>windowWithoutScrollBar){return}
411if(event.target===this){t750_closePopup(recid)}});var closeButtons=rec.querySelectorAll('.t-popup__close, .t750__close-text');Array.prototype.forEach.call(closeButtons,function(button){button.addEventListener('click',function(){t750_closePopup(recid)})});var orderLinks=rec.querySelectorAll('a[href*="#"]');Array.prototype.forEach.call(orderLinks,function(link){link.addEventListener('click',linkHandler,!1);function linkHandler(){var orderUrl=link.getAttribute('href');if(!orderUrl||(orderUrl.substring(0,7)!=='#price:'&&orderUrl.substring(0,15)!=='#addtofavorites')){t750_closePopup(recid);if(!orderUrl||orderUrl.substring(0,7)==='#popup:'){setTimeout(function(){document.body.classList.add('t-body_popupshowed')},300)}
412if(window.navigator.userAgent.indexOf('Android')!==-1&&orderUrl.slice(0,4)==='#rec'){var elem=document.getElementById(orderUrl.replace('#',''));if(!elem)return;var elemTopPos=elem.getBoundingClientRect().top+window.pageYOffset;if(elemTopPos)window.scrollTo(0,parseInt(elemTopPos,10))}}}});document.addEventListener('keydown',function(event){var isGallaryShowed=document.body.classList.contains('t-zoomer__show');if(isGallaryShowed)return;var isPopupShowed=document.body.classList.contains('t-body_popupshowed');if(!isPopupShowed)return;if(event.keyCode===27){t750_closePopup(recid)}})}
413function t750_showPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var popup=rec.querySelector('.t-popup');popup.style.display='block';setTimeout(function(){popup.querySelector('.t-popup__container').classList.add('t-popup__container-animated');popup.classList.add('t-popup_show');popup.focus();t_onFuncLoad('t_popup__trapFocus',function(){t_popup__trapFocus(popup)});t_onFuncLoad('t_slds_SliderWidth',function(){t_slds_SliderWidth(recid)});var slider=rec.querySelector('.t-slds__container');var paddingLeft=parseInt(slider.style.paddingLeft,10)||0;var paddingRight=parseInt(slider.style.paddingRight,10)||0;var sliderWidth=slider.clientWidth-(paddingLeft+paddingRight);var sliderWrapper=rec.querySelector('.t-slds__items-wrapper');var position=parseInt(sliderWrapper.getAttribute('data-slider-pos'),10);sliderWrapper.style.transform='translate3d(-'+sliderWidth*position+'px, 0, 0)';t_onFuncLoad('t_slds_UpdateSliderHeight',function(){t_slds_UpdateSliderHeight(recid)});t_onFuncLoad('t_slds_UpdateSliderArrowsHeight',function(){t_slds_UpdateSliderArrowsHeight(recid)});if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}},50);var body=document.body;if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');body.classList.add('t-body_popupshowed');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event);if(window.isSafari){setTimeout(function(){popup.scrollTop=1})}}
414function t750_closePopup(recid){var body=document.body;if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');body.classList.remove('t-body_popupshowed');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event);var rec=document.getElementById('rec'+recid);if(!rec)return;var popup=rec.querySelector('.t-popup');if(!popup)return;var allPopups=document.querySelectorAll('.t-popup');Array.prototype.forEach.call(allPopups,function(popup){popup.classList.remove('t-popup_show')});t_onFuncLoad('t_popup__addFocusOnTriggerButton',function(){t_popup__addFocusOnTriggerButton()});setTimeout(function(){var hiddenPopups=document.querySelectorAll('.t-popup:not(.t-popup_show)');hiddenPopups.forEach(function(popup){popup.style.display='none'})},300)}
415function t1122_init(recId,notifyBtnText){if(!window.CustomEvent)return;var thisBlockCount=document.querySelectorAll('.t1122').length;if(thisBlockCount>1){t1122_handleMultipleBlocksOnPage(thisBlockCount)}
416if(thisBlockCount>1&&window.t1122_isInited)return;var rec=document.getElementById('rec'+recId);if(!rec)return;var popup=rec.querySelector('.t-popup');if(!popup)return;window.t1122_isInited=!0;rec.setAttribute('data-animationappear','off');rec.setAttribute('data-popup-subscribe-inited','y');rec.style.opacity='1';var popupLink='#popup:out-of-stock';popup.setAttribute('data-tooltip-hook',popupLink);t1122_handleProductNotifyBtn(recId,popup,notifyBtnText);t1122_handlePopupLinks(recId);t1122_setPopupAccessibility(popupLink);t1122_handlePopupClose(recId,popup);t1122_handleEditorPageLink(recId,popup);popup.addEventListener('scroll',t_throttle(function(){t1122_updateLazyload()}))}
417function t1122_handleMultipleBlocksOnPage(blocksCount){var errorText='';var errorTexts={RU:'Ошибка: На странице присутствуют '+blocksCount+' виджета подписки на поступление товара (блок ST600). Пожалуйста, удалите дубликаты. Блоки могут находиться на странице Header или Footer.',EN:'Error: There are '+blocksCount+' out of stock widgets on the page (block ST600). Please remove duplicates. Blocks can be located in the Header or Footer of the page.',};var lang=t1122_getLang();errorText=errorTexts[lang]||errorTexts.EN;var errorTextElements=document.querySelectorAll('.t1122__error');errorTextElements.forEach(function(errorTextEl){errorTextEl.style.display='';errorTextEl.textContent=errorText});if(!window.t1122_isAlertShowed){window.t1122_isAlertShowed=!0;console.error(errorText);alert(errorText)}}
418function t1122_getLinkSelector(url){return 'a[href$="'+url+'"]'}
419function t1122_handleEditorPageLink(recId,popup){var allRecords=document.getElementById('allrecords');var currentMode=allRecords.getAttribute('data-tilda-mode');if(currentMode!=='edit')return;var popupLink=t1122_getPopupLink(popup);var showPopupSelector=t1122_getLinkSelector(popupLink);var showPopupBtn=document.querySelector(showPopupSelector);if(!showPopupBtn)return;var productData={uid:'123456789',name:'Underwater wearable watch',sku:'700.936.37',img:'https://static.tildacdn.com/tild3536-6236-4535-b035-663833623266/noroot.png',options:[{option:'Bracelet size',variant:'S',price:null,},],price:null,inv:1,};showPopupBtn.addEventListener('click',function(event){event.preventDefault();t1122_insertProductDataIntoPopup(productData,popup);t1122_showPopup(recId)})}
420function t1122_handleProductNotifyBtn(recId,popup,notifyBtnText){var productElements=document.querySelectorAll('.js-product');if(!productElements)return;var popupLink=popup.getAttribute('data-tooltip-hook');var insertBtnClass='js-out-of-stock-inserted-block';t_onFuncLoad('t_store__collectProductDataByElement',function(){document.addEventListener('tStoreSoldOut',onSoldOutEvent)});document.addEventListener('tStoreAvailable',onAvailableEvent);function onSoldOutEvent(soldOutEvent){var buyBtn=soldOutEvent.detail.buttonBuyElement;if(!buyBtn)return;var oldInsertedBtn=buyBtn.parentNode.querySelector('.'+insertBtnClass);if(oldInsertedBtn){t1122_removeElement(oldInsertedBtn)}
421var newInsertBtn=t1122_createPopupButton(popupLink,notifyBtnText,buyBtn);buyBtn.insertAdjacentElement('afterend',newInsertBtn);buyBtn.style.display='none';buyBtn.classList.add('t_catalog__prod-popup__btn-replaced');var effectNameFirst=buyBtn.getAttribute('data-btneffects-first');var effectNameSecond=buyBtn.getAttribute('data-btneffects-second');if(effectNameFirst){newInsertBtn.setAttribute('data-btneffects-first',effectNameFirst)}else if(effectNameSecond){newInsertBtn.setAttribute('data-btneffects-second',effectNameSecond)}
422var effects=buyBtn.querySelector('.t-btn_wrap-effects')||buyBtn.querySelector('.t-btn_effects');if(effects){newInsertBtn.appendChild(effects.cloneNode(!0))}
423var buyBtnStyle=buyBtn.querySelector('style');if(buyBtnStyle){newInsertBtn.appendChild(buyBtnStyle.cloneNode(!0))}
424newInsertBtn.classList.add(insertBtnClass);newInsertBtn.addEventListener('click',function(notifyBtnClickEvent){notifyBtnClickEvent.preventDefault();var productEl=buyBtn.closest('.js-product');var productData;if(productEl){productData=t_store__collectProductDataByElement(productEl)}
425if(!productData){productData=soldOutEvent.detail.product}
426t1122_insertProductDataIntoPopup(productData,popup);t1122_showPopup(recId)});if(typeof soldOutEvent.detail.renderSoldOutMessage==='function'){soldOutEvent.detail.renderSoldOutMessage()}}
427function onAvailableEvent(availableEvent){var buyBtn=availableEvent.detail.buttonBuyElement;if(!buyBtn)return;var oldInsertedBtn=buyBtn.parentNode.querySelector('.'+insertBtnClass);if(oldInsertedBtn){t1122_removeElement(oldInsertedBtn)}
428buyBtn.style.display=''}}
429function t1122_createPopupButton(popupLink,btnText,buyBtn){var btn=document.createElement('a');btn.href=popupLink;btn.style.display='';btn.classList.add('t1122__popup-btn');buyBtn.classList.forEach(function(className){if(className.indexOf('js-')===0||className.indexOf('_disabled')!==-1||className==='t_catalog__prod-popup__btn-replaced')
430return;btn.classList.add(className)});var span=document.createElement('span');span.textContent=btnText;span.classList.add('t-btnflex__text');btn.appendChild(span);return btn}
431function t1122_removeElement(el){if(el.parentNode!==null){el.parentNode.removeChild(el)}}
432function t1122_handlePopupLinks(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var hrefs=rec.querySelectorAll('a[href*="#"]');var submitHref=rec.querySelector('.t-submit[href*="#"]');if(submitHref){submitHref.addEventListener('click',function(){document.body.classList.remove('t-body_scroll-locked')})}
433hrefs.forEach(function(href){href.addEventListener('click',function(){var url=this.getAttribute('href');if(!url||url.substring(0,7)!='#price:'){t1122_closePopup(recId);if(!url||url.substring(0,7)=='#popup:'){setTimeout(function(){t1122_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed')},300)}}})})}
434function t1122_handlePopupClose(recId,popup){var popupLink=t1122_getPopupLink(popup);var popupCloseBtn=popup.querySelector('.t-popup__close');popup.addEventListener('click',function(event){var windowWithoutScrollBar=window.innerWidth-17;if(event.clientX>windowWithoutScrollBar)return;if(event.target===this)t1122_closePopup(recId)});popupCloseBtn.addEventListener('click',function(){t1122_closePopup(recId)});function escClosePopup(event){var key=event.key||event.keyCode;if(key==='Escape'||key==='Esc'||key===27)t1122_closePopup(recId)}
435popup.addEventListener('tildamodal:show'+popupLink,function(){document.addEventListener('keydown',escClosePopup)});popup.addEventListener('tildamodal:close'+popupLink,function(){document.removeEventListener('keydown',escClosePopup)})}
436function t1122_setPopupAccessibility(popupLink){t_onFuncLoad('t_popup__addAttributesForAccessibility',function(){t_popup__addAttributesForAccessibility(popupLink)});t_onFuncLoad('t_popup__addClassOnTriggerButton',function(){t_popup__addClassOnTriggerButton(document,popupLink)})}
437function t1122_updatePopupDefaults(popup){var hiddenFormEl=popup.querySelector('.js-successbox');if(hiddenFormEl){hiddenFormEl.style.display='none'}
438var hiddenFormEl=popup.querySelector('.t1122__inputsbox_hidden');if(hiddenFormEl){hiddenFormEl.classList.remove('t1122__inputsbox_hidden')}}
439function t1122_getPopupLink(popup){return popup.getAttribute('data-tooltip-hook')}
440function t1122_showPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var windowWidth=window.innerWidth;var screenMin=rec.getAttribute('data-screen-min');var screenMax=rec.getAttribute('data-screen-max');if(screenMin&&windowWidth<parseInt(screenMin,10))return;if(screenMax&&windowWidth>parseInt(screenMax,10))return;var popup=rec.querySelector('.t-popup');var popupLink=popup.getAttribute('data-tooltip-hook');var ranges=rec.querySelectorAll('.t-range');var documentBody=document.body;ranges.forEach(function(range){t1122_triggerEvent(range,'popupOpened')});t1122_updatePopupDefaults(popup);t_onFuncLoad('t_popup__showPopup',function(){t_popup__showPopup(popup)});t_onFuncLoad('t_popup__resizePopup',function(){t_popup__resizePopup(recId)});t1122_triggerEvent(document.body,'popupShowed');documentBody.classList.add('t-body_popupshowed');documentBody.classList.add('t1122__body_popupshowed');if(t1122_isIOS11()){setTimeout(t1122_lockScroll,500)}
441t1122_updateLazyload();t1122_triggerEvent(popup,'tildamodal:show'+popupLink);t_onFuncLoad('t_forms__calculateInputsWidth',function(){t_forms__calculateInputsWidth(recId)});var analytics=popup.getAttribute('data-track-popup');if(analytics&&window.Tilda){Tilda.sendEventToStatistics(analytics,popupLink)}}
442function t1122_closePopup(recId){var rec=document.getElementById('rec'+recId);var popup=rec.querySelector('.t-popup');var popupTooltipHook=popup.getAttribute('data-tooltip-hook');var popupAll=document.querySelectorAll('.t-popup_show:not(.t-feed__post-popup):not(.t945__popup)');if(popupAll.length==1){t1122_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed')}else{var newPopup=[];popupAll.forEach(function(popup){if(popup.getAttribute('data-tooltip-hook')===popupTooltipHook){popup.classList.remove('t-popup_show');newPopup.push(popup)}});if(newPopup.length===popupAll.length){t1122_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed')}}
443t1122_triggerEvent(document.body,'popupHidden');popup.classList.remove('t-popup_show');document.body.classList.remove('t1122__body_popupshowed');if(t1122_isIOS11()){t1122_unlockScroll()}
444t_onFuncLoad('t_popup__addFocusOnTriggerButton',function(){t_popup__addFocusOnTriggerButton()});setTimeout(function(){var popupHide=document.querySelectorAll('.t-popup:not(.t-popup_show)');popupHide.forEach(function(popup){popup.style.display='none'})},300);t1122_triggerEvent(popup,'tildamodal:close'+popupTooltipHook)}
445function t1122_insertProductDataIntoPopup(productData,popup){var imgEl=popup.querySelector('.js-product-img');var titleEl=popup.querySelector('.js-product-title');var optionsEl=popup.querySelector('.js-product-options');var formEl=popup.querySelector('.t-form');if(imgEl){if(productData.img){imgEl.style.backgroundImage='url("'+productData.img+'")';imgEl.style.display=''}else{imgEl.style.display='none'}}
446if(titleEl){titleEl.innerHTML='';if(productData.name){var titleTextEl=t1122_createProductTitleEl(productData.name);titleEl.appendChild(titleTextEl)}}
447var renderOptions={};if(optionsEl){optionsEl.innerHTML='';if(productData.options){renderOptions=t1122_prepareOptionsForRender(productData.options)}
448for(var key in renderOptions){var optionEl=t1122_createProductOptionEl(key+': '+renderOptions[key]);optionsEl.appendChild(optionEl)}
449if(productData.sku){var skuOptionEl=t1122_createProductOptionEl(t1122_unescapeQuotes(productData.sku));optionsEl.appendChild(skuOptionEl)}}
450var hiddenInputsEl=popup.querySelector('.js-product-hidden');if(!hiddenInputsEl){hiddenInputsEl=document.createElement('div');hiddenInputsEl.classList.add('js-product-hidden');formEl.appendChild(hiddenInputsEl)}else{hiddenInputsEl.innerHTML=''}
451var hiddenInputArray=[];var subscriptionHiddenInputArray=[];var detailsArray=[];if(productData.sku){detailsArray.push(productData.sku)}
452for(var key in renderOptions){detailsArray.push(key+': '+renderOptions[key])}
453if(productData.name){subscriptionHiddenInputArray.push(productData.name)}
454if(detailsArray.length){subscriptionHiddenInputArray.push('('+detailsArray.join(', ')+')')}
455if(productData.price!==undefined){subscriptionHiddenInputArray.push('-',productData.price)}
456hiddenInputArray.push(t1122_createProductHiddenInput('product_subscription',subscriptionHiddenInputArray.join(' ')));hiddenInputArray.push(t1122_createProductHiddenInput('price',productData.price));hiddenInputArray.forEach(function(input){hiddenInputsEl.appendChild(input)})}
457function t1122_createProductOptionEl(text){var optionEl=document.createElement('p');optionEl.classList.add('t1122__product-option');optionEl.textContent=text;return optionEl}
458function t1122_createProductTitleEl(text){var titleEl=document.createElement('h3');titleEl.classList.add('t1122__product-title','t-descr','t-descr_sm');titleEl.textContent=t1122_unescapeQuotes(text);return titleEl}
459function t1122_createProductHiddenInput(name,value){var uidInputEl=document.createElement('input');uidInputEl.setAttribute('type','hidden');uidInputEl.name=name;uidInputEl.value=value;return uidInputEl}
460function t1122_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}
461function t1122_updateLazyload(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
462function t1122_prepareOptionsForRender(options){var renderOptions={};options.forEach(function(item){if(!item.variant)return;if(renderOptions[item.option]){renderOptions[item.option]+=', '+item.variant}else{renderOptions[item.option]=item.variant}});return renderOptions}
463function t1122_lockScroll(){var documentBody=document.body;if(!documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=typeof window.pageYOffset!=='undefined'?window.pageYOffset:(document.documentElement||documentBody.parentNode||documentBody).scrollTop;documentBody.classList.add('t-body_scroll-locked');documentBody.style.top='-'+bodyScrollTop+'px';documentBody.setAttribute('data-popup-scrolltop',bodyScrollTop)}}
464function t1122_unlockScroll(){var documentBody=document.body;if(documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=documentBody.getAttribute('data-popup-scrolltop');documentBody.classList.remove('t-body_scroll-locked');documentBody.style.top=null;documentBody.removeAttribute('data-popup-scrolltop');document.documentElement.scrollTop=parseInt(bodyScrollTop)}}
465function t1122_isIOS11(){return(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream&&window.isiOSVersion&&window.isiOSVersion[0]===11)}
466function t1122_getLang(){var lang='';var allrecords=document.querySelector('#allrecords');if(allrecords){lang=allrecords.getAttribute('data-tilda-project-lang')}
467if(!lang){lang=(window.navigator.userLanguage||window.navigator.language).slice(0,2)}
468return lang?lang.toUpperCase():'EN'}
469function t1122_triggerEvent(el,eventName){t_onFuncLoad('t_triggerEvent',function(){t_triggerEvent(el,eventName)})}
470function t1122_unescapeQuotes(str){if(!str){return ''}
471var map={'&quot;':'"','&#39;':"'",};return str.replace(/&quot;|&#39;/g,function(match){return map[match]})}
Предыдущие 100 строк