window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isiOS=!1;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){window.isiOS=!0}
window.isiOSVersion='';if(window.isiOS){var version=(navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);if(version!==null){window.isiOSVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}
window.isSafari=!1;if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){window.isSafari=!0}
window.isSafariVersion='';if(window.isSafari){var version=(navigator.appVersion).match(/Version\/(\d+)\.(\d+)\.?(\d+)? Safari/);if(version!==null){window.isSafariVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}
function t_throttle(fn,threshhold,scope){var last;var deferTimer;threshhold||(threshhold=250);return function(){var context=scope||this;var now=+new Date();var args=arguments;if(last&&now<last+threshhold){clearTimeout(deferTimer);deferTimer=setTimeout(function(){last=now;fn.apply(context,args)},threshhold)}else{last=now;fn.apply(context,args)}}}
function t456_setListMagin(recid,imglogo){var rec=document.getElementById('rec'+recid);if(!rec||window.innerWidth<=980)return;var menu=rec.querySelector('.t456');var leftSide=menu?menu.querySelector('.t456__leftwrapper'):null;var list=menu?menu.querySelector('.t456__list'):null;var leftSideWidth=leftSide?leftSide.offsetWidth:0;if(list)list.style.marginRight=(imglogo?leftSideWidth:leftSideWidth+30)+'px'}
function t1122_init(recId,notifyBtnText){if(!window.CustomEvent)return;var thisBlockCount=document.querySelectorAll('.t1122').length;if(thisBlockCount>1){t1122_handleMultipleBlocksOnPage(thisBlockCount)}
if(thisBlockCount>1&&window.t1122_isInited)return;var rec=document.getElementById('rec'+recId);if(!rec)return;window.t1122_isInited=!0;rec.setAttribute('data-animationappear','off');rec.setAttribute('data-popup-subscribe-inited','y');rec.style.opacity='1';var popup=rec.querySelector('.t-popup');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()}))}
function 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)}}
function t1122_getLinkSelector(url){return 'a[href$="'+url+'"]'}
function 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)})}
function 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)}
var newInsertBtn=t1122_createPopupButton(popupLink,notifyBtnText,buyBtn);newInsertBtn.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)}
if(!productData){productData=soldOutEvent.detail.product}
t1122_insertProductDataIntoPopup(productData,popup);t1122_showPopup(recId)});buyBtn.insertAdjacentElement('afterend',newInsertBtn);buyBtn.style.display='none';if(typeof soldOutEvent.detail.renderSoldOutMessage==='function'){soldOutEvent.detail.renderSoldOutMessage()}}
function onAvailableEvent(availableEvent){var buyBtn=availableEvent.detail.buttonBuyElement;if(!buyBtn)return;var oldInsertedBtn=buyBtn.parentNode.querySelector('.'+insertBtnClass);if(oldInsertedBtn){t1122_removeElement(oldInsertedBtn)}
buyBtn.style.display=''}}
function t1122_createPopupButton(popupLink,btnText,buyBtn){var btn=document.createElement('a');btn.href=popupLink;btn.style.cssText=buyBtn.style.cssText;btn.style.display='';btn.classList.add('t1122__popup-btn');buyBtn.classList.forEach(function(className){if(className.indexOf('js-')===0||className.indexOf('_disabled')!==-1)return;btn.classList.add(className)});var span=document.createElement('span');span.textContent=btnText;span.style.overflow='hidden';btn.appendChild(span);return btn}
function t1122_removeElement(el){if(el.parentNode!==null){el.parentNode.removeChild(el)}}
function 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')})}
hrefs.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)}}})})}
function 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)}
popup.addEventListener('tildamodal:show'+popupLink,function(){document.addEventListener('keydown',escClosePopup)});popup.addEventListener('tildamodal:close'+popupLink,function(){document.removeEventListener('keydown',escClosePopup)})}
function t1122_setPopupAccessibility(popupLink){t_onFuncLoad('t_popup__addAttributesForAccessibility',function(){t_popup__addAttributesForAccessibility(popupLink)});t_onFuncLoad('t_popup__addClassOnTriggerButton',function(){t_popup__addClassOnTriggerButton(document,popupLink)})}
function t1122_updatePopupDefaults(popup){var hiddenFormEl=popup.querySelector('.js-successbox');if(hiddenFormEl){hiddenFormEl.style.display='none'}
var hiddenFormEl=popup.querySelector('.t1122__inputsbox_hidden');if(hiddenFormEl){hiddenFormEl.classList.remove('t1122__inputsbox_hidden')}}
function t1122_getPopupLink(popup){return popup.getAttribute('data-tooltip-hook')}
function 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)}
t1122_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)}}
function 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')}}
t1122_triggerEvent(document.body,'popupHidden');popup.classList.remove('t-popup_show');document.body.classList.remove('t1122__body_popupshowed');if(t1122_isIOS11()){t1122_unlockScroll()}
t_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)}
function 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'}}
if(titleEl){titleEl.textContent=t1122_unescapeQuotes(productData.name)}
var renderOptions={};if(optionsEl){optionsEl.innerHTML='';if(productData.options){renderOptions=t1122_prepareOptionsForRender(productData.options)}
for(var key in renderOptions){var optionEl=t1122_createProductOptionEl(key+': '+renderOptions[key]);optionsEl.appendChild(optionEl)}
if(productData.sku){var skuOptionEl=t1122_createProductOptionEl(t1122_unescapeQuotes(productData.sku));optionsEl.appendChild(skuOptionEl)}}
var hiddenInputsEl=popup.querySelector('.js-product-hidden');if(!hiddenInputsEl){hiddenInputsEl=document.createElement('div');hiddenInputsEl.classList.add('js-product-hidden');formEl.appendChild(hiddenInputsEl)}else{hiddenInputsEl.innerHTML=''}
var hiddenInputArray=[];var subscriptionHiddenInputArray=[];var detailsArray=[];if(productData.sku){detailsArray.push(productData.sku)}
for(var key in renderOptions){detailsArray.push(key+': '+renderOptions[key])}
if(productData.name){subscriptionHiddenInputArray.push(productData.name)}
if(detailsArray.length){subscriptionHiddenInputArray.push('('+detailsArray.join(', ')+')')}
if(productData.price!==undefined){subscriptionHiddenInputArray.push('-',productData.price)}
hiddenInputArray.push(t1122_createProductHiddenInput('product_subscription',subscriptionHiddenInputArray.join(' ')));hiddenInputArray.push(t1122_createProductHiddenInput('price',productData.price));hiddenInputArray.forEach(function(input){hiddenInputsEl.appendChild(input)})}
function t1122_createProductOptionEl(text){var optionEl=document.createElement('p');optionEl.classList.add('t1122__product-option');optionEl.textContent=text;return optionEl}
function t1122_createProductHiddenInput(name,value){var uidInputEl=document.createElement('input');uidInputEl.setAttribute('type','hidden');uidInputEl.name=name;uidInputEl.value=value;return uidInputEl}
function t1122_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}
function t1122_updateLazyload(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
function 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}
function 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)}}
function 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)}}
function t1122_isIOS11(){return/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream&&window.isiOSVersion&&window.isiOSVersion[0]===11}
function t1122_getLang(){var lang='';var allrecords=document.querySelector('#allrecords');if(allrecords){lang=allrecords.getAttribute('data-tilda-project-lang')}
if(!lang){lang=(window.navigator.userLanguage||window.navigator.language).slice(0,2)}
return lang?lang.toUpperCase():'EN'}
function t1122_triggerEvent(el,eventName){t_onFuncLoad('t_triggerEvent',function(){t_triggerEvent(el,eventName)})}
function t1122_unescapeQuotes(str){if(!str){return ''}
var map={'&quot;':'"','&#39;':"'",};return str.replace(/&quot;|&#39;/g,function(match){return map[match]})}
function t450_showMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menu=rec.querySelector('.t450');var overlay=rec.querySelector('.t450__overlay');var menuElements=rec.querySelectorAll('.t450__overlay, .t450__close, a[href*="#"]');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t450__body_menushowed');if(menu)menu.classList.add('t450__menu_show');if(overlay)overlay.classList.add('t450__menu_show');if(menu){menu.addEventListener('clickedAnchorInTooltipMenu',function(){t450_closeMenu(menu,overlay)})}
Array.prototype.forEach.call(menuElements,function(element){element.addEventListener('click',function(){if(element.closest('.tooltipstered, .t-menusub__target-link, .t794__tm-link, .t966__tm-link, .t978__tm-link'))return;if(element.href&&(element.href.substring(0,7)==='#price:'||element.href.substring(0,9)==='#submenu:'))return;t450_closeMenu(menu,overlay)})});document.addEventListener('keydown',function(e){if(e.keyCode===27){document.body.classList.remove('t390__body_popupshowed');var popups=document.querySelectorAll('.t390');Array.prototype.forEach.call(popups,function(popup){popup.classList.remove('t390__popup_show')})}});rec.addEventListener('click',function(e){if(e.target.closest('.t966__tm-link, .t978__tm-link')){t450_checkSize(recid);if(e.target.closest('.t978__tm-link')){setTimeout(function(){var hookLink=e.target.closest('.t978__tm-link');var menuBlock=hookLink.nextElementSibling;var submenuLinks=menuBlock?menuBlock.querySelectorAll('.t978__menu-link'):[];Array.prototype.forEach.call(submenuLinks,function(link){link.addEventListener('click',function(){t450_checkSize(recid)})})},300)}}});menu.addEventListener('menuOverflow',function(){t450_checkSize(recid)});t450_highlight(recid)}
function t450_closeMenu(menu,overlay){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t450__body_menushowed');if(menu)menu.classList.remove('t450__menu_show');if(overlay)overlay.classList.remove('t450__menu_show')}
function t450_checkSize(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t450'):null;if(!menu)return;var container=menu.querySelector('.t450__container');var topContainer=menu.querySelector('.t450__top');var rightContainer=menu.querySelector('.t450__rightside');setTimeout(function(){var topContainerHeight=topContainer?topContainer.offsetHeight:0;var rightContainerHeight=rightContainer?rightContainer.offsetHeight:0;var containerPaddingTop=container?window.getComputedStyle(container).paddingTop:'0';var containerPaddingBottom=container?window.getComputedStyle(container).paddingBottom:'0';containerPaddingTop=parseInt(containerPaddingTop,10);containerPaddingBottom=parseInt(containerPaddingBottom,10);if(topContainerHeight+rightContainerHeight+containerPaddingTop+containerPaddingBottom>document.documentElement.clientHeight){menu.classList.add('t450__overflowed')}else{menu.classList.remove('t450__overflowed')}})}
function t450_appearMenu(recid){var rec=document.getElementById('rec'+recid);var burger=rec?rec.querySelector('.t450__menu__content'):null;if(!burger)return;var burgerAppearOffset=burger?burger.getAttribute('data-appearoffset'):'';var burgerHideOffset=burger?burger.getAttribute('data-hideoffset'):'';if(burgerAppearOffset){burgerAppearOffset=t450_appearMenuParseNumber(burgerAppearOffset);if(window.pageYOffset>=burgerAppearOffset){if(burger.classList.contains('t450__beforeready')){burger.classList.remove('t450__beforeready')}}else{burger.classList.add('t450__beforeready')}}
if(burgerHideOffset){burgerHideOffset=t450_appearMenuParseNumber(burgerHideOffset);var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);if(window.pageYOffset+window.innerHeight>=scrollHeight-burgerHideOffset){if(!burger.classList.contains('t450__beforeready')){burger.classList.add('t450__beforeready')}}else if(burgerAppearOffset){if(window.pageYOffset>=burgerAppearOffset){burger.classList.remove('t450__beforeready')}}else{burger.classList.remove('t450__beforeready')}}}
function t450_appearMenuParseNumber(string){if(string.indexOf('vh')>-1){string=Math.floor((window.innerHeight*(parseInt(string)/100)))}
return parseInt(string,10)}
function t450_initMenu(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t450'):null;var overlay=rec?rec.querySelector('.t450__overlay'):null;var burger=rec?rec.querySelector('.t450__burger_container'):null;var menuLinks=rec?rec.querySelectorAll('.t-menu__link-item.t450__link-item_submenu'):[];var hook=menu?menu.getAttribute('data-tooltip-hook'):'';if(hook){document.addEventListener('click',function(e){if(e.target.closest('a[href="'+hook+'"]')){e.preventDefault();t450_closeMenu(menu,overlay);t450_showMenu(recid);t450_checkSize(recid)}})}
if(burger){burger.addEventListener('click',function(){t450_closeMenu(menu,overlay);t450_showMenu(recid);t450_checkSize(recid)})}
window.addEventListener('resize',function(){t450_checkSize(recid)});if(!window.isMobile)return;Array.prototype.forEach.call(menuLinks,function(link){link.addEventListener('click',function(){t450_checkSize(recid)})})}
function t450_highlight(recid){var url=window.location.href;var pathname=window.location.pathname;var hash=window.location.hash;if(url.substr(url.length-1)==='/'){url=url.slice(0,-1)}
if(pathname.substr(pathname.length-1)==='/'){pathname=pathname.slice(0,-1)}
if(pathname.charAt(0)==='/'){pathname=pathname.slice(1)}
if(pathname===''){pathname='/'}
var shouldBeActiveElements=document.querySelectorAll('.t450__menu a[href=\''+url+'\'], '+'.t450__menu a[href=\''+url+'/\'], '+'.t450__menu a[href=\''+pathname+'\'], '+'.t450__menu a[href=\'/'+pathname+'\'], '+'.t450__menu a[href=\''+pathname+'/\'], '+'.t450__menu a[href=\'/'+pathname+'/\']'+(hash?', .t450__menu a[href=\''+hash+'\']':''));var rec=document.getElementById('rec'+recid);var menuLinks=rec?rec.querySelectorAll('.t450__menu a'):[];Array.prototype.forEach.call(menuLinks,function(link){if(link.getAttribute('data-highlighted-by-user')!=='y')link.classList.remove('t-active')});Array.prototype.forEach.call(shouldBeActiveElements,function(link){link.classList.add('t-active')})}
function t985_init(recid,searchVariants){var rec=document.querySelector('#rec'+recid);if(!rec)return;if(searchVariants.length>0){t985_addSearchVariants(recid,searchVariants)}
var searchWidgetIcon=rec.querySelectorAll('.t985__search-widget-icon');Array.prototype.forEach.call(searchWidgetIcon,function(widgetIcon){widgetIcon.addEventListener('click',function(){t985_showSearch(rec)})});var closeIcon=rec.querySelector('.t985__close-icon');if(closeIcon){closeIcon.addEventListener('click',function(){t985_hideSearch(rec)})}
var overlay=rec.querySelector('.t985__overlay');if(overlay){overlay.addEventListener('click',function(event){var target=event.target;var parentTarget=target.parentElement;if(!target.classList.contains('.t985__widgetheader')&&!parentTarget.classList.contains('.t985__widgetheader')){t985_hideSearch(rec)}})}}
function t985_addSearchVariants(recid,searchVariants){var rec=document.querySelector('#rec'+recid);if(!rec)return;var container=rec.querySelector('.t985__searchvariants');var cleanVariants=searchVariants.replace(/(<([^>]+)>)/gi,'')
var searchArray=cleanVariants.split(',');Array.prototype.forEach.call(searchArray,function(variant){container.innerHTML+='<div class="t985__searchvariant t-text t-text_xs">'+variant+'</div>'})}
function t985_showSearch(rec){rec.querySelector('.t985__overlay').style.display='block';rec.querySelector('.t985__search-widget-icon').style.display='none'}
function t985_hideSearch(rec){rec.querySelector('.t985__overlay').style.display='none';rec.querySelector('.t985__search-widget-icon').style.display='block'}
function t825_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t825');if(!container)return;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;var button=rec.querySelector('.t825__btn');var buttonClose=rec.querySelector('.t825__mobile-close');var popup=rec.querySelector('.t825__popup');var analitics=popup.getAttribute('data-track-popup');var hook='TildaSendMessageWidget'+recId;if(button){button.addEventListener('click',function(event){if(button.classList.contains('t825__btn_active')){t825_closePopup(rec);return}
button.classList.add('t825__btn_active');container.classList.add('t825_active');t825_showPopup(rec);event.preventDefault();if(analitics)Tilda.sendEventToStatistics(analitics,hook)})}
if(buttonClose){buttonClose.addEventListener('click',function(){t825_closePopup(rec)})}
var whatsApp=rec.querySelector('.t825__whatsapp');if(whatsApp){var whatsAppHref=whatsApp.getAttribute('href');if(whatsAppHref)t825_removeExtraSymbolsFromWhatsApp(whatsApp,whatsAppHref)}
t825__lazyLoad()}
function t825_removeExtraSymbolsFromWhatsApp(whatsApp,whatsAppHref){if(whatsAppHref&&whatsAppHref.indexOf('?text=')!==-1){var whatsAppHrefArr=whatsAppHref.split('?text=');whatsAppHrefArr[0]=whatsAppHrefArr[0].replace(/[\(\)+-]/g,'');whatsAppHref=whatsAppHrefArr[0]+'?text='+whatsAppHrefArr[1]}else{whatsAppHref=whatsAppHref.replace(/[\(\)+-]/,'')}
whatsApp.setAttribute('href',whatsAppHref)}
function t825_showPopup(rec){var popup=rec.querySelector('.t825__popup');var buttonWrapper=rec.querySelector('.t825__btn_wrapper');var buttonText=rec.querySelector('.t825__btn-text');if(buttonWrapper)buttonWrapper.classList.remove('t8245_btn_animate');if(buttonText)buttonText.style.display='none';if(window.innerWidth<960)document.body.classList.add('t825__body_popupshowed');popup.style.display='block';setTimeout(function(){popup.classList.add('t825__popup_show')},50);document.addEventListener('keydown',t825__escClosePopup);t825__lazyLoad()}
function t825__escClosePopup(event){if(event.key==='Escape')t825_closePopup()}
function t825_closePopup(rec){if(window.innerWidth<960)document.body.classList.remove('t825__body_popupshowed');var containers=document.querySelectorAll('.t825');var popups=document.querySelectorAll('.t825__popup');var buttons=document.querySelectorAll('.t825__btn');for(var i=0;i<containers.length;i++){containers[i].classList.remove('t825_active')}
for(var i=0;i<popups.length;i++){popups[i].classList.remove('t825__popup_show')}
for(var i=0;i<buttons.length;i++){buttons[i].classList.remove('t825__btn_active')}
setTimeout(function(){if(!rec)return;var popupHide=rec.querySelector('.t825__popup:not(.t825__popup_show)');if(popupHide){popupHide.style.display='none'}},300);document.removeEventListener('keydown',t825__escClosePopup)}
function t825__lazyLoad(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
window.requestAnimationFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60)}})();function t270_scroll(hash,offset){if(!hash)return;t270_checkLoad(hash,offset);var excludeHashes=['#!/tproduct/','#!/tab/','#opencart']
if(excludeHashes.includes(hash)){return!0}
var isHistoryChangeAllowed=window.location.hash!==hash;var wrapperBlock=document.querySelector('.t270');var dontChangeHistory=wrapperBlock?Boolean(wrapperBlock.getAttribute('data-history-disabled')):!1;t270_scrollToEl(hash,offset);if(!dontChangeHistory&&isHistoryChangeAllowed){if(history.pushState){history.pushState(null,null,hash)}else{window.location.hash=hash}
isHistoryChangeAllowed=!1}
return!0}
function t270_checkLoad(hash,offset){if(window.t270_loadChecked)return;var sliderWrappers=document.body.querySelectorAll('.t-slds__items-wrapper');if(!sliderWrappers.length)return;var lastWrapper=sliderWrappers[sliderWrappers.length-1];var sliderImgs=lastWrapper?lastWrapper.querySelectorAll('.t-slds__bgimg'):[];var lastImg=sliderImgs[sliderImgs.length-1];var imageUrl=lastImg?window.getComputedStyle(lastImg).backgroundImage:'';imageUrl=imageUrl.substring(5,imageUrl.length-2);var preloaderImg=document.createElement('img');preloaderImg.src=imageUrl?imageUrl:'';preloaderImg.addEventListener('load',function(){t270_scroll(hash,offset);window.t270_loadChecked=!0})}
function t270_scrollToEl(hash,offset){var SCROLL_DURATION_MS=500;var body=document.body;if(body.getAttribute('data-scroll'))return;var scrollTargetY=t270_getTarget(hash,offset);if(isNaN(scrollTargetY))return;var canSmoothScroll=window.CSS&&window.CSS.supports('scroll-behavior','smooth')&&'scrollBehavior' in document.documentElement.style;var userAgent=navigator.userAgent.toLowerCase();var isAndroid=userAgent.indexOf('android')!==-1;if(window.isMobile&&!isAndroid&&canSmoothScroll){body.setAttribute('data-scroll','true');window.scrollTo({left:0,top:scrollTargetY,behavior:'smooth'});setTimeout(function(){body.removeAttribute('data-scroll')},SCROLL_DURATION_MS)}else{t270_smoothScrollTo(scrollTargetY,SCROLL_DURATION_MS)}}
function t270_smoothScrollTo(targetY,duration=500){var body=document.body;var startY=window.scrollY||window.pageYOffset;var deltaY=targetY-startY;var startTime=performance.now();function easeInOutQuad(t){return Math.pow(t,2)}
function scroll(){var currentTime=performance.now();var elapsedTime=Math.min((currentTime-startTime)/duration,1);var ease=easeInOutQuad(elapsedTime);window.scrollTo(0,startY+deltaY*ease);if(elapsedTime<1){requestAnimationFrame(scroll)}else{body.removeAttribute('data-scroll');body.removeAttribute('data-scrollable');window.scrollTo(0,targetY)}}
body.setAttribute('data-scroll','true');body.setAttribute('data-scrollable','true');requestAnimationFrame(scroll)}
function t270_getTarget(hash,offset){var target;try{if(hash.substring(0,1)==='#'){target=document.getElementById(hash.substring(1))}else{target=document.querySelector(hash)}}catch(event){console.log('Exception t270: '+event.message);return}
if(!target){target=document.querySelector('a[name="'+hash.substr(1)+'"], div[id="'+hash.substr(1)+'"]');if(!target)return}
target=parseInt((target.getBoundingClientRect().top+window.pageYOffset)-offset,10);target=Math.max(target,0);return target}