1 2; /* Start:"a:4:{s:4:"full";s:59:"/bitrix/templates/eshop_adapt_blue/script.js?14334312521119";s:6:"source";s:44:"/bitrix/templates/eshop_adapt_blue/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3function eshopOpenNativeMenu() 4{ 5 var native_menu = BX("bx_native_menu"); 6 var is_menu_active = BX.hasClass(native_menu, "active"); 7 8 if (is_menu_active) 9 { 10 BX.removeClass(native_menu, "active"); 11 BX.removeClass(BX('bx_menu_bg'), "active"); 12 BX("bx_eshop_wrap").style.position = ""; 13 BX("bx_eshop_wrap").style.top = ""; 14 BX("bx_eshop_wrap").style.overflow = ""; 15 } 16 else 17 { 18 BX.addClass(native_menu, "active"); 19 BX.addClass(BX('bx_menu_bg'), "active"); 20 var topHeight = document.body.scrollTop; 21 BX("bx_eshop_wrap").style.position = "fixed"; 22 BX("bx_eshop_wrap").style.top = -topHeight+"px"; 23 BX("bx_eshop_wrap").style.overflow = "hidden"; 24 } 25 26 var easing = new BX.easing({ 27 duration : 300, 28 start : { left : (is_menu_active) ? 0 : -100 }, 29 finish : { left : (is_menu_active) ? -100 : 0 }, 30 transition : BX.easing.transitions.quart, 31 step : function(state){ 32 native_menu.style.left = state.left + "%"; 33 } 34 }); 35 easing.animate(); 36} 37 38window.addEventListener('resize', 39 function() { 40 if (window.innerWidth >= 640 && BX.hasClass(BX("bx_native_menu"), "active")) 41 eshopOpenNativeMenu(); 42 }, 43 false 44); 45 46/* End */ 47; 48; /* Start:"a:4:{s:4:"full";s:97:"/bitrix/components/bitrix/sale.basket.basket.line/templates/.default/script.min.js?14996844613876";s:6:"source";s:78:"/bitrix/components/bitrix/sale.basket.basket.line/templates/.default/script.js";s:3:"min";s:82:"/bitrix/components/bitrix/sale.basket.basket.line/templates/.default/script.min.js";s:3:"map";s:82:"/bitrix/components/bitrix/sale.basket.basket.line/templates/.default/script.map.js";}"*/ 49"use strict";function BitrixSmallCart(){}BitrixSmallCart.prototype={activate:function(){this.cartElement=BX(this.cartId);this.fixedPosition=this.arParams.POSITION_FIXED=="Y";if(this.fixedPosition){this.cartClosed=true;this.maxHeight=false;this.itemRemoved=false;this.verticalPosition=this.arParams.POSITION_VERTICAL;this.horizontalPosition=this.arParams.POSITION_HORIZONTAL;this.topPanelElement=BX("bx-panel");this.fixAfterRender();this.fixAfterRenderClosure=this.closure("fixAfterRender");var t=this.closure("fixCart");this.fixCartClosure=t;if(this.topPanelElement&&this.verticalPosition=="top")BX.addCustomEvent(window,"onTopPanelCollapse",t);var e=null;BX.bind(window,"resize",function(){clearTimeout(e);e=setTimeout(t,200)})}this.setCartBodyClosure=this.closure("setCartBody");BX.addCustomEvent(window,"OnBasketChange",this.closure("refreshCart",{}))},fixAfterRender:function(){this.statusElement=BX(this.cartId+"status");if(this.statusElement){if(this.cartClosed)this.statusElement.innerHTML=this.openMessage;else this.statusElement.innerHTML=this.closeMessage}this.productsElement=BX(this.cartId+"products");this.fixCart()},closure:function(t,e){var i=this;return e?function(){i[t](e)}:function(e){i[t](e)}},toggleOpenCloseCart:function(){if(this.cartClosed){BX.removeClass(this.cartElement,"bx-closed");BX.addClass(this.cartElement,"bx-opener");this.statusElement.innerHTML=this.closeMessage;this.cartClosed=false;this.fixCart()}else{BX.addClass(this.cartElement,"bx-closed");BX.removeClass(this.cartElement,"bx-opener");BX.removeClass(this.cartElement,"bx-max-height");this.statusElement.innerHTML=this.openMessage;this.cartClosed=true;var t=this.cartElement.querySelector("[data-role='basket-item-list']");if(t)t.style.top="auto"}setTimeout(this.fixCartClosure,100)},setVerticalCenter:function(t){var e=t/2-this.cartElement.offsetHeight/2;if(e<5)e=5;this.cartElement.style.top=e+"px"},fixCart:function(){if(this.horizontalPosition=="hcenter"){var t="innerWidth"in window?window.innerWidth:document.documentElement.offsetWidth;var e=t/2-this.cartElement.offsetWidth/2;if(e<5)e=5;this.cartElement.style.left=e+"px"}var i="innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight;switch(this.verticalPosition){case"top":if(this.topPanelElement)this.cartElement.style.top=this.topPanelElement.offsetHeight+5+"px";break;
49case"vcenter":this.setVerticalCenter(i);break}if(this.productsElement){var s=this.cartElement.querySelector("[data-role='basket-item-list']");if(this.cartClosed){if(this.maxHeight){BX.removeClass(this.cartElement,"bx-max-height");if(s)s.style.top="auto";this.maxHeight=false}}else{if(this.maxHeight){if(this.productsElement.scrollHeight==this.productsElement.clientHeight){BX.removeClass(this.cartElement,"bx-max-height");if(s)s.style.top="auto";this.maxHeight=false}}else{if(this.verticalPosition=="top"||this.verticalPosition=="vcenter"){if(this.cartElement.offsetTop+this.cartElement.offsetHeight>=i){BX.addClass(this.cartElement,"bx-max-height");if(s)s.style.top=82+"px";this.maxHeight=true}}else{if(this.cartElement.offsetHeight>=i){BX.addClass(this.cartElement,"bx-max-height");if(s)s.style.top=82+"px";this.maxHeight=true}}}}if(this.verticalPosition=="vcenter")this.setVerticalCenter(i)}},refreshCart:function(t){if(this.itemRemoved){this.itemRemoved=false;return}t.sessid=BX.bitrix_sessid();t.siteId=this.siteId;t.templateName=this.templateName;t.arParams=this.arParams;BX.ajax({url:this.ajaxPath,method:"POST",dataType:"html",data:t,onsuccess:this.setCartBodyClosure})},setCartBody:function(t){if(this.cartElement)this.cartElement.innerHTML=t.replace(/#CURRENT_URL#/g,this.currentUrl);if(this.fixedPosition)setTimeout(this.fixAfterRenderClosure,100)},removeItemFromCart:function(t){this.refreshCart({sbblRemoveItemFromCart:t});this.itemRemoved=true;BX.onCustomEvent("OnBasketChange")}}; 50/* End */ 51; 52; /* Start:"a:4:{s:4:"full";s:67:"/bitrix/components/bitrix/search.title/script.min.js?15802982426443";s:6:"source";s:48:"/bitrix/components/bitrix/search.title/script.js";s:3:"min";s:52:"/bitrix/components/bitrix/search.title/script.min.js";s:3:"map";s:52:"/bitrix/components/bitrix/search.title/script.map.js";}"*/ 53function JCTitleSearch(t){var e=this;this.arParams={AJAX_PAGE:t.AJAX_PAGE,CONTAINER_ID:t.CONTAINER_ID,INPUT_ID:t.INPUT_ID,MIN_QUERY_LEN:parseInt(t.MIN_QUERY_LEN)};if(t.WAIT_IMAGE)this.arParams.WAIT_IMAGE=t.WAIT_IMAGE;if(t.MIN_QUERY_LEN<=0)t.MIN_QUERY_LEN=1;this.cache=[];this.cache_key=null;this.startText="";this.running=false;this.runningCall=false;this.currentRow=-1;this.RESULT=null;this.CONTAINER=null;this.INPUT=null;this.WAIT=null;this.ShowResult=function(t){if(BX.type.isString(t)){e.RESULT.innerHTML=t}e.RESULT.style.display=e.RESULT.innerHTML!==""?"block":"none";var s=e.adjustResultNode();var i;var n;var l=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(l){n=BX.findChild(l,{tag:"th"},true)}if(n){var r=BX.pos(l);r.width=r.right-r.left;var a=BX.pos(n);a.width=a.right-a.left;n.style.width=a.width+"px";e.RESULT.style.width=s.width+a.width+"px";e.RESULT.style.left=s.left-a.width-1+"px";if(r.width-a.width>s.width)e.RESULT.style.width=s.width+a.width-1+"px";r=BX.pos(l);i=BX.pos(e.RESULT);if(i.right>r.right){e.RESULT.style.width=r.right-r.left+"px"}}var o;if(l)o=BX.findChild(e.RESULT,{class:"title-search-fader"},true);if(o&&n){i=BX.pos(e.RESULT);o.style.left=i.right-i.left-18+"px";o.style.width=18+"px";o.style.top=0+"px";o.style.height=i.bottom-i.top+"px";o.style.display="block"}};this.onKeyPress=function(t){var s=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(!s)return false;var i;var n=s.rows.length;switch(t){case 27:e.RESULT.style.display="none";e.currentRow=-1;e.UnSelectAll();return true;case 40:if(e.RESULT.style.display=="none")e.RESULT.style.display="block";var l=-1;for(i=0;i<n;i++){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){if(l==-1)l=i;if(e.currentRow<i){e.currentRow=i;break}else if(s.rows[i].className=="title-search-selected"){s.rows[i].className=""}}}if(i==n&&e.currentRow!=i)e.currentRow=l;s.rows[e.currentRow].className="title-search-selected";return true;case 38:if(e.RESULT.style.display=="none")e.RESULT.style.display="block";var r=-1;for(i=n-1;i>=0;i--){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){if(r==-1)r=i;if(e.currentRow>i){e.currentRow=i;break}else if(s.rows[i].className=="title-search-selected"){s.rows[i].className=""}}}if(i<0&&e.currentRow!=i)e.currentRow=r;s.rows[e.currentRow].className="title-search-selected";return true;case 13:if(e.RESULT.style.display=="block"){for(i=0;i<n;i++){if(e.currentRow==i){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){var a=BX.findChild(s.rows[i],{tag:"a"},true);if(a){window.location=a.href;return true}}}}}return false}return false};this.onTimeout=function(){e.onChange(function(){setTimeout(e.onTimeout,500)})};this.onChange=function(t){if(e.running){e.runningCall=true;return}e.running=true;if(e.INPUT.value!=e.oldValue&&e.INPUT.value!=e.startText){e.oldValue=e.INPUT.value;if(e.INPUT.value.length>
53=e.arParams.MIN_QUERY_LEN){e.cache_key=e.arParams.INPUT_ID+"|"+e.INPUT.value;if(e.cache[e.cache_key]==null){if(e.WAIT){var s=BX.pos(e.INPUT);var i=s.bottom-s.top-2;e.WAIT.style.top=s.top+1+"px";e.WAIT.style.height=i+"px";e.WAIT.style.width=i+"px";e.WAIT.style.left=s.right-i+2+"px";e.WAIT.style.display="block"}BX.ajax.post(e.arParams.AJAX_PAGE,{ajax_call:"y",INPUT_ID:e.arParams.INPUT_ID,q:e.INPUT.value,l:e.arParams.MIN_QUERY_LEN},function(s){e.cache[e.cache_key]=s;e.ShowResult(s);e.currentRow=-1;e.EnableMouseEvents();if(e.WAIT)e.WAIT.style.display="none";if(!!t)t();e.running=false;if(e.runningCall){e.runningCall=false;e.onChange()}});return}else{e.ShowResult(e.cache[e.cache_key]);e.currentRow=-1;e.EnableMouseEvents()}}else{e.RESULT.style.display="none";e.currentRow=-1;e.UnSelectAll()}}if(!!t)t();e.running=false};this.onScroll=function(){if(BX.type.isElementNode(e.RESULT)&&e.RESULT.style.display!=="none"&&e.RESULT.innerHTML!==""){e.adjustResultNode()}};this.UnSelectAll=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(t){var s=t.rows.length;for(var i=0;i<s;i++)t.rows[i].className=""}};this.EnableMouseEvents=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(t){var s=t.rows.length;for(var i=0;i<s;i++)if(!BX.findChild(t.rows[i],{class:"title-search-separator"},true)){t.rows[i].id="row_"+i;t.rows[i].onmouseover=function(t){if(e.currentRow!=this.id.substr(4)){e.UnSelectAll();this.className="title-search-selected";e.currentRow=this.id.substr(4)}};t.rows[i].onmouseout=function(t){this.className="";e.currentRow=-1}}}};this.onFocusLost=function(t){setTimeout(function(){e.RESULT.style.display="none"},250)};this.onFocusGain=function(){if(e.RESULT.innerHTML.length)e.ShowResult()};this.onKeyDown=function(t){if(!t)t=window.event;if(e.RESULT.style.display=="block"){if(e.onKeyPress(t.keyCode))return BX.PreventDefault(t)}};this.adjustResultNode=function(){if(!(BX.type.isElementNode(e.RESULT)&&BX.type.isElementNode(e.CONTAINER))){return{top:0,right:0,bottom:0,left:0,width:0,height:0}}var t=BX.pos(e.CONTAINER);e.RESULT.style.position="absolute";e.RESULT.style.top=t.bottom+2+"px";e.RESULT.style.left=t.left+"px";e.RESULT.style.width=t.width+"px";return t};this._onContainerLayoutChange=function(){if(BX.type.isElementNode(e.RESULT)&&e.RESULT.style.display!=="none"&&e.RESULT.innerHTML!==""){e.adjustResultNode()}};this.Init=function(){this.CONTAINER=document.getElementById(this.arParams.CONTAINER_ID);BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this._onContainerLayoutChange);this.RESULT=document.body.appendChild(document.createElement("DIV"));this.RESULT.className="title-search-result";this.INPUT=document.getElementById(this.arParams.INPUT_ID);this.startText=this.oldValue=this.INPUT.value;BX.bind(this.INPUT,"focus",function(){e.onFocusGain()});BX.bind(this.INPUT,"blur",function(){e.onFocusLost()});this.INPUT.onkeydown=this.onKeyDown;if(this.arParams.WAIT_IMAGE){this.WAIT=document.body.appendChild(document.createElement("DIV"));this.WAIT.style.backgroundImage="url('"+this.arParams.WAIT_IMAGE+"')";if(!BX.browser.IsIE())this.WAIT.style.backgroundRepeat="none";this.WAIT.style.display="none";this.WAIT.style.position="absolute";this.WAIT.style.zIndex="1100"}BX.bind(this.INPUT,"bxchange",function(){e.onChange()});var t=BX.findParent(this.CONTAINER,BX.is_fixed);if(BX.type.isElementNode(t)){BX.bind(window,"scroll",BX.throttle(this.onScroll,100,this))}};BX.ready(function(){e.Init(t)})} 54/* End */ 55; 56; /* Start:"a:4:{s:4:"full";s:88:"/bitrix/components/bitrix/menu/templates/catalog_horizontal/script.min.js?14844908304016";s:6:"source";s:69:"/bitrix/components/bitrix/menu/templates/catalog_horizontal/script.js";s:3:"min";s:73:"/bitrix/components/bitrix/menu/templates/catalog_horizontal/script.min.js";s:3:"map";s:73:"/bitrix/components/bitrix/menu/templates/catalog_horizontal/script.map.js";}"*/ 57(function(e){if(!e.BX||BX.CatalogMenu)return;BX.CatalogMenu={items:{},idCnt:1,currentItem:null,overItem:null,outItem:null,timeoutOver:null,timeoutOut:null,getItem:function(e){if(!BX.type.isDomNode(e))return null;var i=!e.id||!BX.type.isNotEmptyString(e.id)?e.id="menu-item-"+this.idCnt++:e.id;if(!this.items[i])this.items[i]=new t(e);return this.items[i]},itemOver:function(e){var t=this.getItem(e);if(!t)return;if(this.outItem==t){clearTimeout(t.timeoutOut)}this.overItem=t;if(t.timeoutOver){clearTimeout(t.timeoutOver)}t.timeoutOver=setTimeout(function(){if(BX.CatalogMenu.overItem==t){t.itemOver()}},100)},itemOut:function(e){var t=this.getItem(e);if(!t)return;this.outItem=t;if(t.timeoutOut){clearTimeout(t.timeoutOut)}t.timeoutOut=setTimeout(function(){if(t!=BX.CatalogMenu.overItem){t.itemOut()}if(t==BX.CatalogMenu.outItem){t.itemOut()}},100)},removeHover:function(e){if(typeof e!=="object")return false;var t=e.parentNode.querySelectorAll('[data-role="bx-menu-item"]');for(var i=0;i<t.length;i++){if(e==t[i])continue;if(BX.hasClass(t[i],"bx-hover"))BX.removeClass(t[i],"bx-hover")}}};var t=function(e){this.element=e;this.popup=BX.findChild(e,{className:"bx_children_container"},false,false);this.isLastItem=BX.lastChild(this.element.parentNode)==this.element};t.prototype.itemOver=function(){if(!BX.hasClass(this.element,"bx-hover")){BX.addClass(this.element,"bx-hover");var e=BX.findChild(this.element,{className:"bx-nav-2-lvl-container"},true,false);
57if(e){var t=e.getBoundingClientRect().left+e.offsetWidth;if(t>document.body.clientWidth)e.style.right=0}}};t.prototype.itemOut=function(){BX.removeClass(this.element,"bx-hover")}})(window);BX.namespace("BX.Main.Menu");BX.Main.Menu.CatalogHorizontal=function(){var e=function(e,t){this.menuBlockId=e||"";this.itemImgDesc=t||"";this.resizeMenu();BX.bind(window,"resize",BX.proxy(this.resizeMenu,this))};e.prototype.clickInMobile=function(e,t){if(BX.findParent(e,{className:"bx-aside-nav"},true))return;t.preventDefault();e.onclick="";return false};e.prototype.toggleInMobile=function(e){var t=BX.findParent(e,{className:"bx-nav-parent"});var i=e.firstChild;if(BX.hasClass(t,"bx-opened")){BX.removeClass(t,"bx-opened");BX.removeClass(i,"fa-angle-down");BX.addClass(i,"fa-angle-left")}else{BX.addClass(t,"bx-opened");BX.addClass(i,"fa-angle-down");BX.removeClass(i,"fa-angle-left")}};e.prototype.resizeMenu=function(){var e=this.templateWrap;var t=document.body.querySelector("[data-role='bx-menu-mobile']");var i=document.body.querySelector("[data-role='bx-menu-button-mobile']");if(document.body.clientWidth<=767){if(!t){t=BX.create("div",{attrs:{className:"bx-aside-nav","data-role":"bx-menu-mobile"},children:[BX.clone(BX("ul_"+this.menuBlockId))]});document.body.insertBefore(t,document.body.firstChild)}if(!i){i=BX.create("div",{attrs:{className:"bx-aside-nav-control bx-closed","data-role":"bx-menu-button-mobile"},children:[BX.create("i",{attrs:{className:"fa fa-bars"}})],events:{click:function(){if(BX.hasClass(this,"bx-opened")){BX.removeClass(this,"bx-opened");BX.removeClass(t,"bx-opened");BX.addClass(this,"bx-closed");document.body.style.overflow="";BX.removeClass(document.body,"bx-opened")}else{BX.addClass(this,"bx-opened");BX.addClass(t,"bx-opened");BX.removeClass(this,"bx-closed");document.body.style.overflow="hidden";BX.addClass(document.body,"bx-opened")}}}});document.body.insertBefore(i,document.body.firstChild)}}else{BX.removeClass(t,"bx-opened");BX.removeClass(document.body,"bx-opened");document.body.style.overflow="";if(i)BX.removeClass(i,"bx-opened")}};e.prototype.changeSectionPicure=function(e,t){var i=BX.findParent(e,{className:"bx-nav-1-lvl"});if(!i)return;var o=i.querySelector("[data-role='desc-img-block']");if(!o)return;var n=BX.findChild(o,{tagName:"img"},true,false);if(n)n.src=this.itemImgDesc[t]["PICTURE"];var a=BX.findChild(o,{tagName:"a"},true,false);if(a)a.href=e.href;var s=BX.findChild(o,{tagName:"p"},true,false);if(s)s.innerHTML=this.itemImgDesc[t]["DESC"]};return e}(); 58/* End */ 59; 60; /* Start:"a:4:{s:4:"full";s:115:"/bitrix/templates/eshop_adapt_blue/components/bitrix/catalog.top/slider_novosti_na_glavnoi/script.js?15049029668214";s:6:"source";s:100:"/bitrix/templates/eshop_adapt_blue/components/bitrix/catalog.top/slider_novosti_na_glavnoi/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 61(function (window) { 62 63if (!!window.JCCatalogTopBannerList) 64 return; 65 66window.JCCatalogTopBannerList = function (arParams) 67{ 68 this.params = null; 69 this.prevIndex = -1; 70 this.currentIndex = 0; 71 this.size = 0; 72 this.rotate = false; 73 this.rotateTimer = 30000; 74 this.rotatePause = false; 75 this.errorCode = 0; 76 77 this.slider = { 78 cont: null, 79 row: null, 80 items: null, 81 arrows: null, 82 left: null, 83 right: null, 84 pagination: null, 85 pages: null 86 }; 87 88 if (!arParams || 'object' != typeof(arParams)) 89 { 90 this.errorCode = -1; 91 } 92 if (0 === this.errorCode) 93 { 94 this.params = arParams; 95 } 96 if (!!this.params.rotate) 97 this.rotate = this.params.rotate; 98 if (!!this.params.rotateTimer) 99 { 100 this.params.rotateTimer = parseInt(this.params.rotateTimer); 101 if (!isNaN(this.params.rotateTimer) && 0 <= this.params.rotateTimer) 102 this.rotateTimer = this.params.rotateTimer; 103 } 104 105 if (0 === this.errorCode) 106 { 107 BX.ready(BX.delegate(this.Init,this)); 108 } 109}; 110 111window.JCCatalogTopBannerList.prototype.Init = function() 112{ 113 if (0 > this.errorCode) 114 return; 115 116 var i = 0; 117 if (!!this.params.cont) 118 { 119 this.slider.cont = BX(this.params.cont); 120 } 121 if (!!this.params.items && BX.type.isArray(this.params.items)) 122 { 123 this.slider.items = []; 124 for (i = 0; i < this.params.items.length; i++) 125 { 126 this.slider.items[this.slider.items.length] = BX(this.params.items[i]); 127 this.slider.items[this.slider.items.length-1].style.opacity = 0; 128 if (!this.slider.row) 129 this.slider.row = this.slider.items[this.slider.items.length-1].parentNode; 130 } 131 this.slider.items[0].style.opacity = 1; 132 this.size = this.slider.items.length; 133 } 134 135 if (!!this.params.arrows) 136 { 137 if (BX.type.isDomNode(this.params.arrows)) 138 this.slider.arrows = this.params.arrows; 139 else if ('object' == typeof(this.params.arrows)) 140 this.slider.arrows = this.slider.cont.appendChild(BX.create( 141 'DIV', 142 { 143 props: { 144 id: this.params.arrows.id, 145 className: this.params.arrows.className 146 } 147 } 148 )); 149 else if (BX.type.isNotEmptyString(this.params.arrows)) 150 this.slider.arrows = BX(this.params.arrows); 151 } 152 if (!this.slider.arrows) 153 { 154 this.slider.arrows = this.slider.cont; 155 } 156 if (!!this.params.left) 157 { 158 if (BX.type.isDomNode(this.params.left)) 159 this.slider.left = this.params.left; 160 else if ('object' == typeof(this.params.left)) 161 this.slider.left = this.slider.arrows.appendChild(BX.create( 162 'DIV', 163 { 164 props: { 165 id: this.params.left.id, 166 className: this.params.left.className 167 } 168 } 169 )); 170 else if (BX.type.isNotEmptyString(this.params.left)) 171 this.slider.left = BX(this.params.left); 172 } 173 if (!!this.params.right) 174 { 175 if (BX.type.isDomNode(this.params.right)) 176 this.slider.right = this.params.right; 177 else if ('object' == typeof(this.params.right)) 178 this.slider.right = this.slider.arrows.appendChild(BX.create( 179 'DIV', 180 { 181 props: { 182 id: this.params.right.id, 183 className: this.params.right.className 184 } 185 } 186 )); 187 else if (BX.type.isNotEmptyString(this.params.right)) 188 this.slider.right = BX(this.params.right); 189 } 190 if (!!this.params.pagination) 191 { 192 if (BX.type.isDomNode(this.params.pagination)) 193 this.slider.pagination = this.params.pagination; 194 else if ('object' == typeof(this.params.pagination)) 195 this.slider.pagination = this.slider.cont.appendChild(BX.create( 196 'UL', 197 { 198 props: { 199 id: this.params.pagination.id, 200 className: this.params.pagination.className 201 } 202 } 203 )); 204 else if (BX.type.isNotEmptyString(this.params.pagination)) 205 this.slider.pagination = BX(this.params.pagination); 206 } 207 if (!!this.slider.pagination) 208 { 209 this.slider.pages = []; 210 for (i = 0; i < this.slider.items.length; i++) 211 { 212 this.slider.pages[this.slider.pages.length] = this.slider.pagination.appendChild(BX.create( 213 'LI', 214 { 215 props: { 216 className: (0 === i ? 'active' : '') 217 }, 218 attrs: { 219 'data-pagevalue': i.toString() 220 }, 221 events: { 222 'click': BX.delegate(this.RowMove, this) 223 }, 224 html: '<span></span>' 225 } 226 )); 227 } 228 } 229 230 if (0 === this.errorCode) 231 { 232 if (this.rotate && !!this.slider.cont && 0 < this.rotateTimer) 233 { 234 BX.bind(this.slider.cont, 'mouseover', BX.delegate(this.RotateStop, this)); 235 BX.bind(this.slider.cont, 'mouseout', BX.delegate(this.RotateStart, this)); 236 setTimeout(BX.delegate(this.RowRotate, this), this.rotateTimer); 237 } 238 if (!!this.slider.left) 239 { 240 BX.bind(this.slider.left, 'click', BX.delegate(this.RowLeft, this)); 241 } 242 if (!!this.slider.right) 243 { 244 BX.bind(this.slider.right, 'click', BX.delegate(this.RowRight, this)); 245 } 246 } 247}; 248 249window.JCCatalogTopBannerList.prototype.RowStart = function() 250{ 251 if (0 > this.errorCode) 252 return; 253 BX.removeClass(this.slider.items[this.prevIndex], 'active'); 254 BX.removeClass(this.slider.pages[this.prevIndex], 'active'); 255}; 256 257window.JCCatalogTopBannerList.prototype.RowAnimate = function(state) 258{ 259 if (0 > this.errorCode) 260 return; 261 this.slider.items[this.prevIndex].style.opacity = (100 - state.opacity)/100; 262 this.slider.items[this.currentIndex].style.opacity = state.opacity/100; 263}; 264 265window.JCCatalogTopBannerList.prototype.RowComplete = function() 266{ 267 if (0 > this.errorCode) 268 return; 269 BX.addClass(this.slider.items[this.currentIndex], 'active'); 270 BX.addClass(this.slider.pages[this.currentIndex], 'active'); 271}; 272 273window.JCCatalogTopBannerList.prototype.RowLeft = function() 274{ 275 if (0 > this.errorCode) 276 return; 277 this.prevIndex = this.currentIndex; 278 this.currentIndex = (0 === this.currentIndex ? this.size : this.currentIndex)-1; 279 new BX.easing({ 280 duration : 800, 281 start : { left : -this.prevIndex*100 }, 282 finish : { left : -this.currentIndex*100 }, 283 transition : BX.easing.transitions.quart, 284 step : BX.delegate(function(state){ 285 this.slider.row.style.left = state.left+'%'; 286 }, this) 287 }).animate(); 288 this.RowStart(); 289 new BX.easing({ 290 duration : 1200, 291 start : { opacity : 0 }, 292 finish : { opacity : 100 }, 293 transition : BX.easing.transitions.quart, 294 step : BX.delegate(function(state) {this.RowAnimate(state); }, this), 295 complete: BX.delegate(this.RowComplete, this) 296 }).animate(); 297}; 298 299window.JCCatalogTopBannerList.prototype.RowRight = function() 300{ 301 if (0 > this.errorCode) 302 return; 303 this.prevIndex = this.currentIndex; 304 this.currentIndex++; 305 if (this.currentIndex == this.size) 306 this.currentIndex = 0; 307 new BX.easing({ 308 duration : 800, 309 start : { left : -this.prevIndex*100 }, 310 finish : { left : -this.currentIndex*100 }, 311 transition : BX.easing.transitions.quart, 312 step : BX.delegate(function(state){ 313 this.slider.row.style.left = state.left+'%'; 314 }, this) 315 }).animate(); 316 this.RowStart(); 317 new BX.easing({ 318 duration : 1200, 319 start : { opacity : 0 }, 320 finish : { opacity : 100 }, 321 transition : BX.easing.transitions.quart, 322 step : BX.delegate(function(state) {this.RowAnimate(state); }, this), 323 complete: BX.delegate(this.RowComplete, this) 324 }).animate(); 325}; 326 327window.JCCatalogTopBannerList.prototype.RowMove = function() 328{ 329 if (0 > this.errorCode) 330 return; 331 var target = BX.proxy_context; 332 if (!!target && target.hasAttribute('data-pagevalue')) 333 {
334 var pageValue = parseInt(target.getAttribute('data-pagevalue')); 335 if (!isNaN(pageValue) && pageValue < this.size) 336 { 337 this.prevIndex = this.currentIndex; 338 this.currentIndex = pageValue; 339 this.slider.row.style.left = -this.currentIndex*100+'%'; 340 this.slider.items[this.prevIndex].style.opacity = 0; 341 this.RowStart(); 342 new BX.easing({ 343 duration : 800, 344 start : { opacity : 0 }, 345 finish : { opacity : 100 }, 346 transition : BX.easing.transitions.quart, 347 step : BX.delegate(function(state) { this.RowAnimate(state); }, this), 348 complete: BX.delegate(this.RowComplete, this) 349 }).animate(); 350 } 351 } 352}; 353 354window.JCCatalogTopBannerList.prototype.RowRotate = function() 355{ 356 if (0 > this.errorCode) 357 return; 358 if (!this.rotatePause) 359 { 360 this.RowRight(); 361 } 362 setTimeout(BX.delegate(this.RowRotate, this), this.rotateTimer); 363}; 364 365window.JCCatalogTopBannerList.prototype.RotateStart = function() 366{ 367 if (0 > this.errorCode) 368 return; 369 this.rotatePause = false; 370}; 371 372window.JCCatalogTopBannerList.prototype.RotateStop = function() 373{ 374 if (0 > this.errorCode) 375 return; 376 this.rotatePause = true; 377}; 378})(window); 379/* End */ 380; 381; /* Start:"a:4:{s:4:"full";s:98:"/bitrix/components/bitrix/catalog.viewed.products/templates/.default/script.min.js?149968289321271";s:6:"source";s:78:"/bitrix/components/bitrix/catalog.viewed.products/templates/.default/script.js";s:3:"min";s:82:"/bitrix/components/bitrix/catalog.viewed.products/templates/.default/script.min.js";s:3:"map";s:82:"/bitrix/components/bitrix/catalog.viewed.products/templates/.default/script.map.js";}"*/ 382(function(t){if(!!t.JCCatalogSectionViewed){return}var e=function(t){e.superclass.constructor.apply(this,arguments);this.nameNode=BX.create("span",{props:{className:"bx_medium bx_bt_button",id:this.id},text:t.text});this.buttonNode=BX.create("span",{attrs:{className:t.ownerClass},style:{marginBottom:"0",borderBottom:"0 none transparent"},children:[this.nameNode],events:this.contextEvents});if(BX.browser.IsIE()){this.buttonNode.setAttribute("hideFocus","hidefocus")}};BX.extend(e,BX.PopupWindowButton);t.JCCatalogSectionViewed=function(t){this.productType=0;this.showQuantity=true;this.showAbsent=true;this.secondPict=false;this.showOldPrice=false;this.showPercent=false;this.showSkuProps=false;this.visual={ID:"",PICT_ID:"",SECOND_PICT_ID:"",QUANTITY_ID:"",QUANTITY_UP_ID:"",QUANTITY_DOWN_ID:"",PRICE_ID:"",DSC_PERC:"",SECOND_DSC_PERC:"",DISPLAY_PROP_DIV:"",BASKET_PROP_DIV:""};this.product={checkQuantity:false,maxQuantity:0,stepQuantity:1,isDblQuantity:false,canBuy:true,canSubscription:true,name:"",pict:{},id:0,addUrl:"",buyUrl:""};this.basketData={useProps:false,emptyProps:false,quantity:"quantity",props:"prop",basketUrl:""};this.defaultPict={pict:null,secondPict:null};this.checkQuantity=false;this.maxQuantity=0;this.stepQuantity=1;this.isDblQuantity=false;this.canBuy=true;this.canSubscription=true;this.precision=6;this.precisionFactor=Math.pow(10,this.precision);this.offers=[];this.offerNum=0;this.treeProps=[];this.obTreeRows=[];this.showCount=[];this.showStart=[];this.selectedValues={};this.obProduct=null;this.obQuantity=null;this.obQuantityUp=null;this.obQuantityDown=null;this.obPict=null;this.obSecondPict=null;this.obPrice=null;this.obTree=null;this.obBuyBtn=null;this.obDscPerc=null;this.obSecondDscPerc=null;this.obSkuProps=null;this.obMeasure=null;this.obPopupWin=null;this.basketUrl="";this.basketParams={};this.treeRowShowSize=5;this.treeEnableArrow={display:"",cursor:"pointer",opacity:1};this.treeDisableArrow={display:"",cursor:"default",opacity:.2};this.lastElement=false;this.containerHeight=0;this.errorCode=0;if("object"===typeof t){this.productType=parseInt(t.PRODUCT_TYPE,10);this.showQuantity=t.SHOW_QUANTITY;this.showAbsent=t.SHOW_ABSENT;this.secondPict=!!t.SECOND_PICT;this.showOldPrice=!!t.SHOW_OLD_PRICE;this.showPercent=!!t.SHOW_DISCOUNT_PERCENT;this.showSkuProps=!!t.SHOW_SKU_PROPS;this.visual=t.VISUAL;switch(this.productType){case 1:case 2:if(!!t.PRODUCT&&"object"===typeof t.PRODUCT){if(this.showQuantity){this.product.checkQuantity=t.PRODUCT.CHECK_QUANTITY;this.product.isDblQuantity=t.PRODUCT.QUANTITY_FLOAT;if(this.product.checkQuantity){this.product.maxQuantity=this.product.isDblQuantity?parseFloat(t.PRODUCT.MAX_QUANTITY):parseInt(t.PRODUCT.MAX_QUANTITY,10)}this.product.stepQuantity=this.product.isDblQuantity?parseFloat(t.PRODUCT.STEP_QUANTITY):parseInt(t.PRODUCT.STEP_QUANTITY,10);this.checkQuantity=this.product.checkQuantity;this.isDblQuantity=this.product.isDblQuantity;this.maxQuantity=this.product.maxQuantity;this.stepQuantity=this.product.stepQuantity;if(this.isDblQuantity){this.stepQuantity=Math.round(this.stepQuantity*this.precisionFactor)/this.precisionFactor}}this.product.canBuy=t.PRODUCT.CAN_BUY;this.product.canSubscription=t.PRODUCT.SUBSCRIPTION;this.canBuy=this.product.canBuy;this.canSubscription=this.product.canSubscription;this.product.name=t.PRODUCT.NAME;this.product.pict=t.PRODUCT.PICT;this.product.id=t.PRODUCT.ID;if(!!t.PRODUCT.ADD_URL){this.product.addUrl=t.PRODUCT.ADD_URL}if(!!t.PRODUCT.BUY_URL){this.product.buyUrl=t.PRODUCT.BUY_URL}if(!!t.BASKET&&"object"===typeof t.BASKET){this.basketData.useProps=!!t.BASKET.ADD_PROPS;this.basketData.emptyProps=!!t.BASKET.EMPTY_PROPS}}else{this.errorCode=-1}break;
382case 3:if(!!t.OFFERS&&BX.type.isArray(t.OFFERS)){if(!!t.PRODUCT&&"object"===typeof t.PRODUCT){this.product.name=t.PRODUCT.NAME;this.product.id=t.PRODUCT.ID}this.offers=t.OFFERS;this.offerNum=0;if(!!t.OFFER_SELECTED){this.offerNum=parseInt(t.OFFER_SELECTED,10)}if(isNaN(this.offerNum)){this.offerNum=0}if(!!t.TREE_PROPS){this.treeProps=t.TREE_PROPS}if(!!t.DEFAULT_PICTURE){this.defaultPict.pict=t.DEFAULT_PICTURE.PICTURE;this.defaultPict.secondPict=t.DEFAULT_PICTURE.PICTURE_SECOND}}else{this.errorCode=-1}break;default:this.errorCode=-1}if(!!t.BASKET&&"object"===typeof t.BASKET){if(!!t.BASKET.QUANTITY){this.basketData.quantity=t.BASKET.QUANTITY}if(!!t.BASKET.PROPS){this.basketData.props=t.BASKET.PROPS}if(!!t.BASKET.BASKET_URL){this.basketData.basketUrl=t.BASKET.BASKET_URL}}this.lastElement=!!t.LAST_ELEMENT&&"Y"===t.LAST_ELEMENT}if(0===this.errorCode){BX.ready(BX.delegate(this.Init,this))}};t.JCCatalogSectionViewed.prototype.Init=function(){var e=0,i="",s=null;this.obProduct=BX(this.visual.ID);if(!this.obProduct){this.errorCode=-1}this.obPict=BX(this.visual.PICT_ID);if(!this.obPict){this.errorCode=-2}if(this.secondPict&&!!this.visual.SECOND_PICT_ID){this.obSecondPict=BX(this.visual.SECOND_PICT_ID)}this.obPrice=BX(this.visual.PRICE_ID);if(!this.obPrice){this.errorCode=-16}if(this.showQuantity&&!!this.visual.QUANTITY_ID){this.obQuantity=BX(this.visual.QUANTITY_ID);if(!!this.visual.QUANTITY_UP_ID){this.obQuantityUp=BX(this.visual.QUANTITY_UP_ID)}if(!!this.visual.QUANTITY_DOWN_ID){this.obQuantityDown=BX(this.visual.QUANTITY_DOWN_ID)}}if(3===this.productType){if(!!this.visual.TREE_ID){this.obTree=BX(this.visual.TREE_ID);if(!this.obTree){this.errorCode=-256}i=this.visual.TREE_ITEM_ID;for(e=0;e<this.treeProps.length;e++){this.obTreeRows[e]={LEFT:BX(i+this.treeProps[e].ID+"_left"),RIGHT:BX(i+this.treeProps[e].ID+"_right"),LIST:BX(i+this.treeProps[e].ID+"_list"),CONT:BX(i+this.treeProps[e].ID+"_cont")};if(!this.obTreeRows[e].LEFT||!this.obTreeRows[e].RIGHT||!this.obTreeRows[e].LIST||!this.obTreeRows[e].CONT){this.errorCode=-512;break}}}if(!!this.visual.QUANTITY_MEASURE){this.obMeasure=BX(this.visual.QUANTITY_MEASURE)}}if(!!this.visual.BUY_ID){this.obBuyBtn=BX(this.visual.BUY_ID)}if(this.showPercent){if(!!this.visual.DSC_PERC){this.obDscPerc=BX(this.visual.DSC_PERC)}if(this.secondPict&&!!this.visual.SECOND_DSC_PERC){this.obSecondDscPerc=BX(this.visual.SECOND_DSC_PERC)}}if(this.showSkuProps){if(!!this.visual.DISPLAY_PROP_DIV){this.obSkuProps=BX(this.visual.DISPLAY_PROP_DIV)}}if(0===this.errorCode){if(this.showQuantity){if(!!this.obQuantityUp){BX.bind(this.obQuantityUp,"click",BX.delegate(this.QuantityUp,this))}if(!!this.obQuantityDown){BX.bind(this.obQuantityDown,"click",BX.delegate(this.QuantityDown,this))}if(!!this.obQuantity){BX.bind(this.obQuantity,"change",BX.delegate(this.QuantityChange,this))}}switch(this.productType){case 1:break;case 3:s=BX.findChildren(this.obTree,{tagName:"li"},true);if(!!s&&0<s.length){for(e=0;e<s.length;e++){BX.bind(s[e],"click",BX.delegate(this.SelectOfferProp,this))}}for(e=0;e<this.obTreeRows.length;e++){BX.bind(this.obTreeRows[e].LEFT,"click",BX.delegate(this.RowLeft,this));BX.bind(this.obTreeRows[e].RIGHT,"click",BX.delegate(this.RowRight,this))}this.SetCurrent();break}if(!!this.obBuyBtn){BX.bind(this.obBuyBtn,"click",BX.delegate(this.Basket,this))}if(this.lastElement){this.containerHeight=parseInt(this.obProduct.parentNode.offsetHeight,10);if(isNaN(this.containerHeight)){this.containerHeight=0}this.setHeight();BX.bind(t,"resize",BX.delegate(this.checkHeight,this));BX.bind(this.obProduct.parentNode,"mouseover",BX.delegate(this.setHeight,this));BX.bind(this.obProduct.parentNode,"mouseout",BX.delegate(this.clearHeight,this))}}};t.JCCatalogSectionViewed.prototype.checkHeight=function(){this.containerHeight=parseInt(this.obProduct.parentNode.offsetHeight,10);if(isNaN(this.containerHeight)){this.containerHeight=0}};t.JCCatalogSectionViewed.prototype.setHeight=function(){if(0<this.containerHeight){BX.adjust(this.obProduct.parentNode,{style:{height:this.containerHeight+"px"}})}};t.JCCatalogSectionViewed.prototype.clearHeight=function(){BX.adjust(this.obProduct.parentNode,{style:{height:"auto"}})};t.JCCatalogSectionViewed.prototype.QuantityUp=function(){var t=0,e=true;if(0===this.errorCode&&this.showQuantity&&this.canBuy){t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10);if(!isNaN(t)){t+=this.stepQuantity;if(this.checkQuantity){if(t>this.maxQuantity){e=false}}if(e){if(this.isDblQuantity){t=Math.round(t*this.precisionFactor)/this.precisionFactor}this.obQuantity.value=t}}}};t.JCCatalogSectionViewed.prototype.QuantityDown=function(){var t=0,e=true;if(0===this.errorCode&&this.showQuantity&&this.canBuy){t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10);if(!isNaN(t)){t-=this.stepQuantity;if(t<this.stepQuantity){e=false}if(e){if(this.isDblQuantity){t=Math.round(t*this.precisionFactor)/this.precisionFactor}this.obQuantity.value=t}}}};t.JCCatalogSectionViewed.prototype.QuantityChange=function(){var t=0,e=true;if(0===this.errorCode&&this.showQuantity){if(this.canBuy){t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10);if(!isNaN(t)){if(this.checkQuantity){if(t>this.maxQuantity){e=false;t=this.maxQuantity}else if(t<this.stepQuantity){e=false;t=this.stepQuantity}}if(!e){this.obQuantity.value=t}}else{this.obQuantity.value=this.stepQuantity}}else{this.obQuantity.value=this.stepQuantity}}};t.JCCatalogSectionViewed.prototype.QuantitySet=function(t){if(0===this.errorCode){this.canBuy=this.offers[t].CAN_BUY;if(this.canBuy){BX.addClass(this.obBuyBtn,"bx_bt_button");BX.removeClass(this.obBuyBtn,"bx_bt_button_type_2");this.obBuyBtn.innerHTML=BX.message("CVP_MESS_BTN_BUY")}else{BX.addClass(this.obBuyBtn,"bx_bt_button_type_2");BX.removeClass(this.obBuyBtn,"bx_bt_button");this.obBuyBtn.innerHTML=BX.message("CVP_MESS_NOT_AVAILABLE")}if(this.showQuantity){this.isDblQuantity=this.offers[t].QUANTITY_FLOAT;this.checkQuantity=this.offers[t].CHECK_QUANTITY;if(this.isDblQuantity){this.maxQuantity=parseFloat(this.offers[t].MAX_QUANTITY);this.stepQuantity=Math.round(parseFloat(this.offers[t].STEP_QUANTITY)*this.precisionFactor)/this.precisionFactor}else{this.maxQuantity=parseInt(this.offers[t].MAX_QUANTITY,10);this.stepQuantity=parseInt(this.offers[t].STEP_QUANTITY,10)}this.obQuantity.value=this.stepQuantity;this.obQuantity.disabled=!this.canBuy;if(!!this.obMeasure){if(!!this.offers[t].MEASURE){BX.adjust(this.obMeasure,{html:this.offers[t].MEASURE})}else{BX.adjust(this.obMeasure,{html:""})}}}}};t.JCCatalogSectionViewed.prototype.SelectOfferProp=function(){var t=0,e="",i="",s=[],o=null,a=BX.proxy_context;if(!!a&&a.hasAttribute("data-treevalue")){i=a.getAttribute("data-treevalue");s=i.split("_");if(this.SearchOfferPropIndex(s[0],s[1])){o=BX.findChildren(a.parentNode,{tagName:"li"},false);
382if(!!o&&0<o.length){for(t=0;t<o.length;t++){e=o[t].getAttribute("data-onevalue");if(e===s[1]){BX.addClass(o[t],"bx_active")}else{BX.removeClass(o[t],"bx_active")}}}}}};t.JCCatalogSectionViewed.prototype.SearchOfferPropIndex=function(t,e){var i="",s=false,o,a,h=[],r=-1,n={},u=[];for(o=0;o<this.treeProps.length;o++){if(this.treeProps[o].ID===t){r=o;break}}if(-1<r){for(o=0;o<r;o++){i="PROP_"+this.treeProps[o].ID;n[i]=this.selectedValues[i]}i="PROP_"+this.treeProps[r].ID;s=this.GetRowValues(n,i);if(!s){return false}if(!BX.util.in_array(e,s)){return false}n[i]=e;for(o=r+1;o<this.treeProps.length;o++){i="PROP_"+this.treeProps[o].ID;s=this.GetRowValues(n,i);if(!s){return false}if(this.showAbsent){h=[];u=[];u=BX.clone(n,true);for(a=0;a<s.length;a++){u[i]=s[a];if(this.GetCanBuy(u)){h[h.length]=s[a]}}}else{h=s}if(!!this.selectedValues[i]&&BX.util.in_array(this.selectedValues[i],h)){n[i]=this.selectedValues[i]}else{n[i]=h[0]}this.UpdateRow(o,n[i],s,h)}this.selectedValues=n;this.ChangeInfo()}return true};t.JCCatalogSectionViewed.prototype.RowLeft=function(){var t=0,e="",i=-1,s=BX.proxy_context;if(!!s&&s.hasAttribute("data-treevalue")){e=s.getAttribute("data-treevalue");for(t=0;t<this.treeProps.length;t++){if(this.treeProps[t].ID===e){i=t;break}}if(-1<i&&this.treeRowShowSize<this.showCount[i]){if(0>this.showStart[i]){this.showStart[i]++;BX.adjust(this.obTreeRows[i].LIST,{style:{marginLeft:this.showStart[i]*20+"%"}});BX.adjust(this.obTreeRows[i].RIGHT,{style:this.treeEnableArrow})}if(0<=this.showStart[i]){BX.adjust(this.obTreeRows[i].LEFT,{style:this.treeDisableArrow})}}}};t.JCCatalogSectionViewed.prototype.RowRight=function(){var t=0,e="",i=-1,s=BX.proxy_context;if(!!s&&s.hasAttribute("data-treevalue")){e=s.getAttribute("data-treevalue");for(t=0;t<this.treeProps.length;t++){if(this.treeProps[t].ID===e){i=t;break}}if(-1<i&&this.treeRowShowSize<this.showCount[i]){if(this.treeRowShowSize-this.showStart[i]<this.showCount[i]){this.showStart[i]--;BX.adjust(this.obTreeRows[i].LIST,{style:{marginLeft:this.showStart[i]*20+"%"}});BX.adjust(this.obTreeRows[i].LEFT,{style:this.treeEnableArrow})}if(this.treeRowShowSize-this.showStart[i]>=this.showCount[i]){BX.adjust(this.obTreeRows[i].RIGHT,{style:this.treeDisableArrow})}}}};t.JCCatalogSectionViewed.prototype.UpdateRow=function(t,e,i,s){var o=0,a=0,h="",r=0,n="",u={},l=false,f=false,c=false,p=0,d=this.treeEnableArrow,b=this.treeEnableArrow,P=0,T=null;if(-1<t&&t<this.obTreeRows.length){T=BX.findChildren(this.obTreeRows[t].LIST,{tagName:"li"},false);
382if(!!T&&0<T.length){l="PICT"===this.treeProps[t].SHOW_MODE;r=i.length;f=this.treeRowShowSize<r;n=f?100/r+"%":"20%";u={props:{className:""},style:{width:n}};if(l){u.style.paddingTop=n}for(o=0;o<T.length;o++){h=T[o].getAttribute("data-onevalue");c=h===e;if(BX.util.in_array(h,s)){u.props.className=c?"bx_active":""}else{u.props.className=c?"bx_active bx_missing":"bx_missing"}u.style.display="none";if(BX.util.in_array(h,i)){u.style.display="";if(c){p=a}a++}BX.adjust(T[o],u)}u={style:{width:(f?20*r:100)+"%",marginLeft:"0%"}};if(l){BX.adjust(this.obTreeRows[t].CONT,{props:{className:f?"bx_item_detail_scu full":"bx_item_detail_scu"}})}else{BX.adjust(this.obTreeRows[t].CONT,{props:{className:f?"bx_item_detail_size full":"bx_item_detail_size"}})}if(f){if(p+1===r){b=this.treeDisableArrow}if(this.treeRowShowSize<=p){P=this.treeRowShowSize-p-1;u.style.marginLeft=P*20+"%"}if(0===P){d=this.treeDisableArrow}BX.adjust(this.obTreeRows[t].LEFT,{style:d});BX.adjust(this.obTreeRows[t].RIGHT,{style:b})}else{BX.adjust(this.obTreeRows[t].LEFT,{style:{display:"none"}});BX.adjust(this.obTreeRows[t].RIGHT,{style:{display:"none"}})}BX.adjust(this.obTreeRows[t].LIST,u);this.showCount[t]=r;this.showStart[t]=P}}};t.JCCatalogSectionViewed.prototype.GetRowValues=function(t,e){var i=0,s,o=[],a=false,h=true;if(0===t.length){for(i=0;i<this.offers.length;i++){if(!BX.util.in_array(this.offers[i].TREE[e],o)){o[o.length]=this.offers[i].TREE[e]}}a=true}else{for(i=0;i<this.offers.length;i++){h=true;for(s in t){if(t[s]!==this.offers[i].TREE[s]){h=false;break}}if(h){if(!BX.util.in_array(this.offers[i].TREE[e],o)){o[o.length]=this.offers[i].TREE[e]}a=true}}}return a?o:false};t.JCCatalogSectionViewed.prototype.GetCanBuy=function(t){var e=0,i,s=false,o=true;for(e=0;e<this.offers.length;e++){o=true;for(i in t){if(t[i]!==this.offers[e].TREE[i]){o=false;break}}if(o){if(this.offers[e].CAN_BUY){s=true;break}}}return s};t.JCCatalogSectionViewed.prototype.SetCurrent=function(){var t=0,e=0,i=[],s="",o=false,a={},h=[],r=this.offers[this.offerNum].TREE;for(t=0;t<this.treeProps.length;t++){s="PROP_"+this.treeProps[t].ID;o=this.GetRowValues(a,s);if(!o){break}if(BX.util.in_array(r[s],o)){a[s]=r[s]}else{a[s]=o[0];this.offerNum=0}if(this.showAbsent){i=[];h=[];h=BX.clone(a,true);for(e=0;e<o.length;e++){h[s]=o[e];if(this.GetCanBuy(h)){i[i.length]=o[e]}}}else{i=o}this.UpdateRow(t,a[s],o,i)}this.selectedValues=a;this.ChangeInfo()};t.JCCatalogSectionViewed.prototype.ChangeInfo=function(){var t=0,e,i=-1,s={},o=true,a="";for(t=0;t<this.offers.length;t++){o=true;for(e in this.selectedValues){if(this.selectedValues[e]!==this.offers[t].TREE[e]){o=false;break}}if(o){i=t;break}}if(-1<i){if(!!this.obPict){if(!!this.offers[i].PREVIEW_PICTURE){BX.adjust(this.obPict,{style:{backgroundImage:"url("+this.offers[i].PREVIEW_PICTURE.SRC+")"}})}else{BX.adjust(this.obPict,{style:{backgroundImage:"url("+this.defaultPict.pict.SRC+")"}})}}if(this.secondPict&&!!this.obSecondPict){if(!!this.offers[i].PREVIEW_PICTURE_SECOND){BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.offers[i].PREVIEW_PICTURE_SECOND.SRC+")"}})}else if(!!this.offers[i].PREVIEW_PICTURE.SRC){BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.offers[i].PREVIEW_PICTURE.SRC+")"}})}else if(!!this.defaultPict.secondPict){BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.defaultPict.secondPict.SRC+")"}})}else{BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.defaultPict.pict.SRC+")"}})}}if(this.showSkuProps&&!!this.obSkuProps){if(0===this.offers[i].DISPLAY_PROPERTIES.length){BX.adjust(this.obSkuProps,{style:{display:"none"},html:""})}else{BX.adjust(this.obSkuProps,{style:{display:""},html:this.offers[i].DISPLAY_PROPERTIES})}}if(!!this.obPrice){a=this.offers[i].PRICE.PRINT_DISCOUNT_VALUE;if(this.showOldPrice&&this.offers[i].PRICE.DISCOUNT_VALUE!==this.offers[i].PRICE.VALUE){a+=" <span>"+this.offers[i].PRICE.PRINT_VALUE+"</span>"}BX.adjust(this.obPrice,{html:a});if(this.showPercent){if(this.offers[i].PRICE.DISCOUNT_VALUE!==this.offers[i].PRICE.VALUE){s={style:{display:""},html:this.offers[i].PRICE.DISCOUNT_DIFF_PERCENT}}else{s={style:{display:"none"},html:""}}if(!!this.obDscPerc){BX.adjust(this.obDscPerc,s)}if(!!this.obSecondDscPerc){BX.adjust(this.obSecondDscPerc,s)}}}this.offerNum=i;this.QuantitySet(this.offerNum)}};t.JCCatalogSectionViewed.prototype.InitBasketUrl=function(){switch(this.productType){case 1:case 2:this.basketUrl=this.product.addUrl;break;case 3:this.basketUrl=this.offers[this.offerNum].ADD_URL;break}this.basketParams={ajax_basket:"Y"};if(this.showQuantity){this.basketParams[this.basketData.quantity]=this.obQuantity.value}};t.JCCatalogSectionViewed.prototype.FillBasketProps=function(){if(!this.visual.BASKET_PROP_DIV){return}var t=0,e=null,i=false,s=null;if(this.basketData.useProps&&!this.basketData.emptyProps){if(!!this.obPopupWin&&!!this.obPopupWin.contentContainer){s=this.obPopupWin.contentContainer}}
382else{s=BX(this.visual.BASKET_PROP_DIV)}if(!s){return}e=s.getElementsByTagName("select");if(!!e&&!!e.length){for(t=0;t<e.length;t++){if(!e[t].disabled){switch(e[t].type.toLowerCase()){case"select-one":this.basketParams[e[t].name]=e[t].value;i=true;break;default:break}}}}e=s.getElementsByTagName("input");if(!!e&&!!e.length){for(t=0;t<e.length;t++){if(!e[t].disabled){switch(e[t].type.toLowerCase()){case"hidden":this.basketParams[e[t].name]=e[t].value;i=true;break;case"radio":if(e[t].checked){this.basketParams[e[t].name]=e[t].value;i=true}break;default:break}}}}if(!i){this.basketParams[this.basketData.props]=[];this.basketParams[this.basketData.props][0]=0}};t.JCCatalogSectionViewed.prototype.SendToBasket=function(){if(!this.canBuy){return}this.InitBasketUrl();this.FillBasketProps();BX.ajax.loadJSON(this.basketUrl,this.basketParams,BX.delegate(this.BasketResult,this))};t.JCCatalogSectionViewed.prototype.Basket=function(){var t="";if(!this.canBuy){return}switch(this.productType){case 1:case 2:if(this.basketData.useProps&&!this.basketData.emptyProps){this.InitPopupWindow();this.obPopupWin.setTitleBar(BX.message("CVP_TITLE_BASKET_PROPS"));if(BX(this.visual.BASKET_PROP_DIV)){t=BX(this.visual.BASKET_PROP_DIV).innerHTML}this.obPopupWin.setContent(t);this.obPopupWin.setButtons([new e({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CVP_BTN_MESSAGE_SEND_PROPS"),events:{click:BX.delegate(this.SendToBasket,this)}})]);this.obPopupWin.show()}else{this.SendToBasket()}break;case 3:this.SendToBasket();break}};t.JCCatalogSectionViewed.prototype.BasketResult=function(t){var i="",s="",o="",a,h=[];if(!!this.obPopupWin)this.obPopupWin.close();if(!BX.type.isPlainObject(t))return;a="OK"===t.STATUS;if(a){BX.onCustomEvent("OnBasketChange");s=this.product.name;switch(this.productType){case 1:case 2:o=this.product.pict.SRC;break;case 3:o=!!this.offers[this.offerNum].PREVIEW_PICTURE?this.offers[this.offerNum].PREVIEW_PICTURE.SRC:this.defaultPict.pict.SRC;break}i='<div style="width: 100%; margin: 0; text-align: center;"><img src="'+o+'" height="130" style="max-height:130px"><p>'+s+"</p></div>";h=[new e({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CVP_BTN_MESSAGE_BASKET_REDIRECT"),events:{click:BX.delegate(function(){location.href=!!this.basketData.basketUrl?this.basketData.basketUrl:BX.message("CVP_BASKET_URL")},this)}})]}else{i=!!t.MESSAGE?t.MESSAGE:BX.message("CVP_BASKET_UNKNOWN_ERROR");h=[new e({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CVP_BTN_MESSAGE_CLOSE"),events:{click:BX.delegate(this.obPopupWin.close,this.obPopupWin)}})]}this.InitPopupWindow();this.obPopupWin.setTitleBar(a?BX.message("CVP_TITLE_SUCCESSFUL"):BX.message("CVP_TITLE_ERROR"));this.obPopupWin.setContent(i);this.obPopupWin.setButtons(h);this.obPopupWin.show()};t.JCCatalogSectionViewed.prototype.InitPopupWindow=function(){if(!!this.obPopupWin)return;this.obPopupWin=BX.PopupWindowManager.create("CatalogSectionBasket_"+this.visual.ID,null,{autoHide:false,offsetLeft:0,offsetTop:0,overlay:true,closeByEsc:true,titleBar:true,closeIcon:true,contentColor:"white"})}})(window); 383/* End */ 384; 385; /* Start:"a:4:{s:4:"full";s:86:"/bitrix/components/abudagov/socnetlink/templates/.default/script.min.js?15809068011218";s:6:"source";s:67:"/bitrix/components/abudagov/socnetlink/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 386function twitchAnimation(obj,event){if(event.type=="mouseover"){obj.setAttribute("style","left: 8px;");setTimeout(function(){obj.setAttribute("style","left: -6px;");setTimeout(function(){obj.setAttribute("style","left: 4px;");setTimeout(function(){obj.setAttribute("style","left: 2px;");setTimeout(function(){obj.setAttribute("style","left: 0px;")},70)},80)},90)},100)}else{obj.setAttribute("style","left: 0px;")}}function transferSnl(){var objDonor=document.getElementById("ab-position-indiv");if(objDonor){var objRecipient=document.getElementById("snl");if(objRecipient){while(objDonor.lastChild){objRecipient.insertBefore(objDonor.lastChild,objRecipient.firstChild)}}var elements=document.querySelectorAll(".snl");if(elements){for(var i=0;i<elements.length;i++){if(i+1==elements.length){elements[i].appendChild(objDonor)}else{var objDonorCopy=objDonor.cloneNode(true);elements[i].appendChild(objDonorCopy)}}}}else{var objDonor=document.getElementById("ab-position-right");if(!objDonor){var objDonor=document.getElementById("ab-position-left")}if(objDonor){while(objDonor.lastChild){document.body.insertBefore(objDonor.lastChild,document.body.firstChild)}}}}document.addEventListener("DOMContentLoaded",transferSnl); 387/* End */ 388;; /* /bitrix/templates/eshop_adapt_blue/script.js?14334312521119*/ 389; /* /bitrix/components/bitrix/sale.basket.basket.line/templates/.default/script.min.js?14996844613876*/ 390; /* /bitrix/components/bitrix/search.title/script.min.js?15802982426443*/ 391; /* /bitrix/components/bitrix/menu/templates/catalog_horizontal/script.min.js?14844908304016*/ 392; /* /bitrix/templates/eshop_adapt_blue/components/bitrix/catalog.top/slider_novosti_na_glavnoi/script.
392js?15049029668214*/ 393; /* /bitrix/components/bitrix/catalog.viewed.products/templates/.default/script.min.js?149968289321271*/ 394; /* /bitrix/components/abudagov/socnetlink/templates/.default/script.min.js?15809068011218*/ 395 396//# sourceMappingURL=template_e5e34d5a1a5f60820f648d2247d2e1e1.map.js
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.