1 2; /* Start:"a:4:{s:4:"full";s:75:"/local/components/webit/linking/templates/.default/script.js?17523203862786";s:6:"source";s:60:"/local/components/webit/linking/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3function TagsCustom(areaId) { 4 this.areaId = areaId; 5 6 $($.proxy(this, "init")); 7} 8 9TagsCustom.prototype = { 10 init: function() { 11 this.el = $("#" + this.areaId); 12 this.sliderInited = false; 13 this.sliderOptions = { 14 slideMargin: 10, 15 touchEnabled: BX.Browser.isMobile(), 16 infiniteLoop: false, 17 hideControlOnEnd: true, 18 pager: false, 19 controls: true, 20 nextText: "<i class='fa fa-chevron-right'></i>", 21 prevText: "<i class='fa fa-chevron-left'></i>", 22 moveSlides: 1, 23 }; 24 this.resizeTimeout = null; 25 26 this.initSlider(); 27 this.bindEvents(); 28 }, 29 30 bindEvents: function() { 31 this.el.find(".s-tags__toggle").on("click", $.proxy(this, "toggleSlider")); 32 $(window).on("resize", $.proxy(this, "onWindowResize")); 33 }, 34 35 initSlider: function() { 36 this.recalcSliderOptions(); 37 this.el.removeClass("s-tags_mode_list s-tags_mode_initial").addClass("s-tags_mode_slider"); 38 this.slider = this.el.find(".s-tags__items").bxSlider(this.sliderOptions); 39 this.sliderInited = true; 40 }, 41 42 destroySlider: function() { 43 this.slider.destroySlider(); 44 this.el.removeClass("s-tags_mode_slider").addClass("s-tags_mode_list"); 45 this.sliderInited = false; 46 }, 47 48 toggleSlider: function() { 49 if(this.sliderInited) { 50 this.destroySlider(); 51 } else { 52 this.initSlider(); 53 } 54 }, 55 56 onWindowResize: function() { 57 if(this.sliderInited) { 58 clearTimeout(this.resizeTimeout); 59 this.resizeTimeout = setTimeout($.proxy(function() { 60 if(this.recalcSliderOptions()) { 61 this.slider.reloadSlider(this.sliderOptions); 62 } 63 }, this), 100) 64 } 65 }, 66 67 recalcSliderOptions: function() { 68 let slidesCount, 69 slideWidth, 70 hasChanges = false; 71 72 if(window.matchMedia("(min-width: 768px)").matches) { 73 slidesCount = 4; 74 } else if(window.matchMedia("(min-width: 576px)").matches) { 75 slidesCount = 2; 76 } else { 77 slidesCount = 1; 78 } 79 if(this.sliderOptions.minSlides !== slidesCount || this.sliderOptions.maxSlides !== slidesCount) { 80 this.sliderOptions.minSlides = slidesCount; 81 this.sliderOptions.maxSlides = slidesCount; 82 hasChanges = true; 83 } 84 85 slideWidth = this.el.find(".s-tags__inner").outerWidth() / slidesCount; 86 if(this.sliderOptions.slideWidth !== slideWidth) { 87 this.sliderOptions.slideWidth = slideWidth; 88 hasChanges = true; 89 } 90 91 return hasChanges; 92 }, 93}; 94/* End */ 95; 96; /* Start:"a:4:{s:4:"full";s:78:"/bitrix/templates/aspro-allcorp2/vendor/jquery.bxslider.min.js?175232042923647";s:6:"source";s:58:"/bitrix/templates/aspro-allcorp2/vendor/jquery.bxslider.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 97!function(t){var e={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSli
vendor: 11,633 bytes, line 97
97des:1,maxSlides:1,moveSlides:0,slideWidth:0,shrinkItems:!1,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0},onAutoChange:function(){return!0}};t.fn.bxSlider=function(n){if(0===this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var s={},o=this,r=t(window).width(),a=t(window).height();if(!t(o).data("bxSlider")){var l=function(){t(o).data("bxSlider")||(s.settings=t.extend({},e,n),s.settings.slideWidth=parseInt(s.settings.slideWidth),s.children=o.children(s.settings.slideSelector),s.children.length<s.settings.minSlides&&(s.settings.minSlides=s.children.length),s.children.length<s.settings.maxSlides&&(s.settings.maxSlides=s.children.length),s.settings.randomStart&&(s.settings.startSlide=Math.floor(Math.random()*s.children.length)),s.active={index:s.settings.startSlide},s.carousel=s.settings.minSlides>1||s.settings.maxSlides>1?!0:!1,s.carousel&&(s.settings.preloadImages="all"),s.minThreshold=s.settings.minSlides*s.settings.slideWidth+(s.settings.minSlides-1)*s.settings.slideMargin,s.maxThreshold=s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin,s.working=!1,s.controls={},s.interval=null,s.animProp="vertical"===s.settings.mode?"top":"left",s.usingCSS=s.settings.useCSS&&"fade"!==s.settings.mode&&function(){for(var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],i=0;i<e.length;i++)if(void 0!==t.style[e[i]])return s.cssPrefix=e[i].replace("Perspective","").toLowerCase(),s.animProp="-"+s.cssPrefix+"-transform",!0;return!1}(),"vertical"===s.settings.mode&&(s.settings.maxSlides=s.settings.minSlides),o.data("origStyle",o.attr("style")),o.children(s.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),d())},d=function(){var e=s.children.eq(s.settings.startSlide);o.wrap('<div class="'+s.settings.wrapperClass+'"><div class="bx-viewport"></div></div>'),s.viewport=o.parent(),s.settings.ariaLive&&!s.settings.ticker&&s.viewport.attr("aria-live","polite"),s.loader=t('<div class="bx-loading" />'),s.viewport.prepend(s.loader),o.css({width:"horizontal"===s.settings.mode?1e3*s.children.length+215+"%":"auto",position:"relative"}),s.usingCSS&&s.settings.easing?o.css("-"+s.cssPrefix+"-transition-timing-function",s.settings.easing):s.settings.easing||(s.settings.easing="swing"),s.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),s.viewport.parent().css({maxWidth:u()}),s.children.css({"float":"horizontal"===s.settings.mode?"left":"none",listStyle:"none",position:"relative"}),s.children.css("width",h()),"horizontal"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginRight",s.settings.slideMargin),"vertical"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginBottom",s.settings.slideMargin),"fade"===s.settings.mode&&(s.children.css({position:"absolute",zIndex:0,display:"none"}),s.children.eq(s.settings.startSlide).css({zIndex:s.settings.slideZIndex,display:"block"})),s.controls.el=t('<div class="bx-controls" />'),s.settings.captions&&P(),s.active.last=s.settings.startSlide===f()-1,s.settings.video&&o.fitVids(),("all"===s.settings.preloadImages||s.settings.ticker)&&(e=s.children),s.settings.ticker?s.settings.pager=!1:(s.settings.controls&&C(),s.settings.auto&&s.settings.autoControls&&T(),s.settings.pager&&w(),(s.settings.controls||s.settings.autoControls||s.settings.pager)&&s.viewport.after(s.controls.el)),c(e,g)},c=function(e,i){var n=e.find('img:not([src=""]), iframe').length,s=0;return 0===n?void i():void e.find('img:not([src=""]), iframe').each(function(){t(this).one("load error",function(){++s===n&&i()}).each(function(){(this.complete||""==this.src)&&t(this).trigger("load")})})},g=function(){if(s.settings.infiniteLoop&&"fade"!==s.settings.mode&&!s.settings.ticker){var e="vertical"===s.settings.mode?s.settings.minSlides:s.settings.maxSlides,i=s.children.slice(0,e).clone(!0).addClass("bx-clone"),n=s.children.slice(-e).clone(!0).addClass("bx-clone");s.settings.ariaHidden&&(i.attr("aria-hidden",!0),n.attr("aria-hidden",!0)),o.append(i).prepend(n)}s.loader.remove(),m(),"vertical"===s.settings.mode&&(s.settings.adaptiveHeight=!0),s.viewport.height(p()),o.redrawSlider(),s.settings.onSliderLoad.call(o,s.active.index),s.initialized=!0,s.settings.responsive&&t(window).bind("resize",U),s.settings.auto&&s.settings.autoStart&&(f()>1||s.settings.autoSlideForOnePage)&&L(),s.settings.ticker&&O(),s.settings.pager&&I(s.settings.startSlide),s.settings.controls&&D(),s.settings.touchEnabled&&!s.settings.ticker&&Y(),s.settings.keyboardEnabled&&!s.settings.ticker&&t(document).keydown(X)},p=function(){var e=0,n=t();if("vertical"===s.settings.mode||s.settings.adaptiveHeight)if(s.carousel){var o=1===s.settings.moveSlides?s.active.index:s.active.index*x();for(n=s.children.eq(o),i=1;i<=s.settings.maxSlides-1;i++)n=o+i>=s.children.length?n.add(s.children.eq(i-1)):n.add(s.children.eq(o+i))}else n=s.children.eq(s.active.index);else n=s.children;return"vertical"===s.settings.mode?(n.each(function(i){e+=t(this).outerHeight()}),s.settings.slideMargin>0&&(e+=s.settings.slideMargin*(s.settings.minSlides-1))):e=Math.max.apply(Math,n.map(function(){return t(this).outerHeight(!1)}).get()),"border-box"===s.viewport.css("box-sizing")?e+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))+parseFloat(s.viewport.css("border-top-width"))+parseFloat(s.viewport.css("border-bottom-width")):"padding-box"===s.viewport.css("box-sizing")&&(e+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))),e},u=function(){var t="100%";return s.settings.slideWidth>0&&(t="horizontal"===s.settings.mode?s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin:s.settings.slideWidth),t},h=function(){var t=s.settings.slideWidth,e=s.viewport.width();if(0===s.settings.slideWidth||s.settings.slideWidth>e&&!s.carousel||"vertical"===s.settings.mode)t=e;else if(s.settings.maxSlides>1&&"horizontal"===s.settings.mode){if(e>s.maxThreshold)return t;e<s.minThreshold?t=(e-s.settings.slideMargin*(s.settings.minSlides-1))/s.settings.minSlides:s.settings.shrinkItems&&(t=Math.floor((e+s.settings.slideMargin)/Math.ceil((e+s.settings.slideMargin)/(t+s.settings.slideMargin))-s.settings.slideMargin))}return t},v=function(){var t=1,e=null;return"horizontal"===s.settings.mode&&s.settings.slideWidth>0?s.viewport.width()<s.minThreshold?t=s.settings.minSlides:s.viewport.width()>s.maxThreshold?t=s.settings.maxSlides:(e=s.children.first().width()+s.settings.slideMargin,t=Math.floor((s.viewport.width()+s.settings.slideMargin)/e)||1):"vertical"===s.settings.mode&&(t=s.settings.minSlides),t},f=function(){var t=0,e=0,i=0;if(s.settings.moveSlides>0){if(!s.settings.infiniteLoop){for(;e<s.children.length;)++t,e=i+v(),i+=s.settings.moveSlides<=v()?s.settings.moveSlides:v();return i}t=Math.ceil(s.children.length/x())}else t=Math.ceil(s.children.length/v());return t},x=function(){return s.settings.moveSlides>0&&s.settings.moveSlides<=v()?s.settings.moveSlides:v()},m=function(){var t,e,i;s.children.length>s.settings.maxSlides&&s.active.last&&!s.settings.infiniteLoop?"horizontal"===s.settings.mode?(e=s.children.last(),t=e.position(),S(-(t.left-(s.viewport.width()-e.outerWidth())),"reset",0)):"vertical"===s.settings.mode&&(i=s.children.length-s.settings.minSlides,t=s.children.eq(i).position(),S(-t.top,"reset",0)):(t=s.children.eq(s.active.index*x()).position(),s.active.index===f()-1&&(s.active.last=!0),void 0!==t&&("horizontal"===s.settings.mode?S(-t.left,"reset",0):"vertical"===s.settings.mode&&S(-t.top,"reset",0)))},S=function(e,i,n,r){var a,l;s.usingCSS?(l="vertical"===s.settings.mode?"translate3d(0, "+e+"px, 0)":"translate3d("+e+"px, 0, 0)",o.css("-"+s.cssPrefix+"-transition-duration",n/1e3+"s"),"slide"===i?(o.css(s.animProp,l),0!==n?o.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){t(e.target).is(o)&&(o.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),A())}):A()):"reset"===i?o.css(s.animProp,l):"ticker"===i&&(o.css("-"+s.cssPrefix+"-transition-timing-function","linear"),o.css(s.animProp,l),0!==n?o.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){t(e.target).is(o)&&(o.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),S(r.resetValue,"reset",0),F())}):(S(r.resetValue,"reset",0),F()))):(a={},a[s.animProp]=e,"slide"===i?o.animate(a,n,s.settings.easing,function(){A()}):"reset"===i?o.css(s.animProp,e):"ticker"===i&&o.animate(a,n,"linear",function(){S(r.resetValue,"reset",0),F()}))},b=function(){for(var e="",i="",n=f(),o=0;n>o;o++)i="",s.settings.buildPager&&t.isFunction(s.settings.buildPager)||s.settings.pagerCustom?(i=s.settings.buildPager(o),s.pagerEl.addClass("bx-custom-pager")):(i=o+1,s.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+o+'" class="bx-pager-link">'+i+"</a></div>";s.pagerEl.html(e)},w=function(){s.settings.pagerCustom?s.pagerEl=t(s.settings.pagerCustom):(s.pagerEl=t('<div class="bx-pager" />'),s.settings.pagerSelector?t(s.settings.pagerSelector).html(s.pagerEl):s.controls.el.addClass("bx-has-pager").append(s.pagerEl),b()),s.pagerEl.on("click touchend","a",z)},C=function(){s.controls.next=t('<a class="bx-next" href="">'+s.settings.nextText+"</a>"),s.controls.prev=t('<a class="bx-prev" href="">'+s.settings.prevText+"</a>"),s.controls.next.bind("click touchend",E),s.controls.prev.bind("click touchend",k),s.settings.nextSelector&&t(s.settings.nextSelector).append(s.controls.next),s.settings.prevSelector&&t(s.settings.prevSelector).append(s.controls.prev),s.settings.nextSelector||s.settings.prevSelector||(s.controls.directionEl=t('<div class="bx-controls-direction" />'),s.controls.directionEl.append(s.controls.prev).append(s.controls.next),s.controls.el.addClass("bx-has-controls-direction").append(s.controls.directionEl))},T=function(){s.controls.start=t('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+s.settings.startText+"</a></div>"),s.controls.stop=t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+s.settings.stopText+"</a></div>"),s.controls.autoEl=t('<div class="bx-controls-auto" />'),s.controls.autoEl.on("click",".bx-start",M),s.controls.autoEl.on("click",".bx-stop",y),s.settings.autoControlsCombine?s.controls.autoEl.append(s.controls.start):s.controls.autoEl.append(s.controls.start).append(s.controls.stop),s.settings.autoControlsSelector?t(s.settings.autoControlsSelector).html(s.controls.autoEl):s.controls.el.addClass("bx-has-controls-auto").append(s.controls.autoEl),q(s.settings.autoStart?"stop":"start")},P=function(){s.children.each(function(e){var i=t(this).find("img:first").attr("title");void 0!==i&&(""+i).length&&t(this).append('<div class="bx-caption"><span>'+i+"</span></div>")})},E=function(t){t.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),o.goToNextSlide())},k=function(t){t.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),o.goToPrevSlide())},M=function(t){o.startAuto(),t.preventDefault()},y=function(t){o.stopAuto(),t.preventDefault()},z=function(e){var i,n;e.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),i=t(e.currentTarget),void 0!==i.attr("data-sli
97de-index")&&(n=parseInt(i.attr("data-slide-index")),n!==s.active.index&&o.goToSlide(n)))},I=function(e){var i=s.children.length;return"short"===s.settings.pagerType?(s.settings.maxSlides>1&&(i=Math.ceil(s.children.length/s.settings.maxSlides)),void s.pagerEl.html(e+1+s.settings.pagerShortSeparator+i)):(s.pagerEl.find("a").removeClass("active"),void s.pagerEl.each(function(i,n){t(n).find("a").eq(e).addClass("active")}))},A=function(){if(s.settings.infiniteLoop){var t="";0===s.active.index?t=s.children.eq(0).position():s.active.index===f()-1&&s.carousel?t=s.children.eq((f()-1)*x()).position():s.active.index===s.children.length-1&&(t=s.children.eq(s.children.length-1).position()),t&&("horizontal"===s.settings.mode?S(-t.left,"reset",0):"vertical"===s.settings.mode&&S(-t.top,"reset",0))}s.working=!1,s.settings.onSlideAfter.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)},q=function(t){s.settings.autoControlsCombine?s.controls.autoEl.html(s.controls[t]):(s.controls.autoEl.find("a").removeClass("active"),s.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))}
97,D=function(){1===f()?(s.controls.prev.addClass("disabled"),s.controls.next.addClass("disabled")):!s.settings.infiniteLoop&&s.settings.hideControlOnEnd&&(0===s.active.index?(s.controls.prev.addClass("disabled"),s.controls.next.removeClass("disabled")):s.active.index===f()-1?(s.controls.next.addClass("disabled"),s.controls.prev.removeClass("disabled")):(s.controls.prev.removeClass("disabled"),s.controls.next.removeClass("disabled")))},H=function(){o.startAuto()},W=function(){o.stopAuto()},L=function(){if(s.settings.autoDelay>0){setTimeout(o.startAuto,s.settings.autoDelay)}else o.startAuto(),t(window).focus(H).blur(W);s.settings.autoHover&&o.hover(function(){s.interval&&(o.stopAuto(!0),s.autoPaused=!0)},function(){s.autoPaused&&(o.startAuto(!0),s.autoPaused=null)})},O=function(){var e,i,n,r,a,l,d,c,g=0;"next"===s.settings.autoDirection?o.append(s.children.clone().addClass("bx-clone")):(o.prepend(s.children.clone().addClass("bx-clone")),e=s.children.first().position(),g="horizontal"===s.settings.mode?-e.left:-e.top),S(g,"reset",0),s.settings.pager=!1,s.settings.controls=!1,s.settings.autoControls=!1,s.settings.tickerHover&&(s.usingCSS?(r="horizontal"===s.settings.mode?4:5,s.viewport.hover(function(){i=o.css("-"+s.cssPrefix+"-transform"),n=parseFloat(i.split(",")[r]),S(n,"reset",0)},function(){c=0,s.children.each(function(e){c+="horizontal"===s.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)}),a=s.settings.speed/c,l="horizontal"===s.settings.mode?"left":"top",d=a*(c-Math.abs(parseInt(n))),F(d)})):s.viewport.hover(function(){o.stop()},function(){c=0,s.children.each(function(e){c+="horizontal"===s.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)}),a=s.settings.speed/c,l="horizontal"===s.settings.mode?"left":"top",d=a*(c-Math.abs(parseInt(o.css(l)))),F(d)})),F()},F=function(t){var e,i,n,r=t?t:s.settings.speed,a={left:0,top:0},l={left:0,top:0};"next"===s.settings.autoDirection?a=o.find(".bx-clone").first().position():l=s.children.first().position(),e="horizontal"===s.settings.mode?-a.left:-a.top,i="horizontal"===s.settings.mode?-l.left:-l.top,n={resetValue:i},S(e,"ticker",r,n)},N=function(e){var i=t(window),n={top:i.scrollTop(),left:i.scrollLeft()},s=e.offset();return n.right=n.left+i.width(),n.bottom=n.top+i.height(),s.right=s.left+e.outerWidth(),s.bottom=s.top+e.outerHeight(),!(n.right<s.left||n.left>s.right||n.bottom<s.top||n.top>s.bottom)},X=function(t){var e=document.activeElement.tagName.toLowerCase(),i="input|textarea",n=new RegExp(e,["i"]),s=n.exec(i);if(null==s&&N(o)){if(39===t.keyCode)return E(t),!1;if(37===t.keyCode)return k(t),!1}},Y=function(){s.touch={start:{x:0,y:0},end:{x:0,y:0}},s.viewport.bind("touchstart MSPointerDown pointerdown",V),s.viewport.on("click",".bxslider a",function(t){s.viewport.hasClass("click-disabled")&&(t.preventDefault(),s.viewport.removeClass("click-disabled"))})},V=function(t){if(s.controls.el.addClass("disabled"),s.working)t.preventDefault(),s.controls.el.removeClass("disabled");else{s.touch.originalPos=o.position();var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e];s.touch.start.x=i[0].pageX,s.touch.start.y=i[0].pageY;var n="function"==typeof PointerEvent;if(n&&void 0===e.pointerId)return;s.viewport.get(0).setPointerCapture&&(s.pointerId=e.pointerId,s.viewport.get(0).setPointerCapture(s.pointerId)),s.viewport.bind("touchmove MSPointerMove pointermove",Z),s.viewport.bind("touchend MSPointerUp pointerup",B),s.viewport.bind("MSPointerCancel pointercancel",R)}},R=function(t){S(s.touch.originalPos.left,"reset",0),s.controls.el.removeClass("disabled"),s.viewport.unbind("MSPointerCancel pointercancel",R),s.viewport.unbind("touchmove MSPointerMove pointermove",Z),s.viewport.unbind("touchend MSPointerUp pointerup",B),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},Z=function(t){var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e],n=Math.abs(i[0].pageX-s.touch.start.x),o=Math.abs(i[0].pageY-s.touch.start.y),r=0,a=0;3*n>o&&s.settings.preventDefaultSwipeX?t.preventDefault():3*o>n&&s.settings.preventDefaultSwipeY&&t.preventDefault(),"fade"!==s.settings.mode&&s.settings.oneToOneTouch&&("horizontal"===s.settings.mode?(a=i[0].pageX-s.touch.start.x,r=s.touch.originalPos.left+a):(a=i[0].pageY-s.touch.start.y,r=s.touch.originalPos.top+a),S(r,"reset",0))},B=function(t){s.viewport.unbind("touchmove MSPointerMove pointermove",Z),s.controls.el.removeClass("disabled");var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e],n=0,r=0;
vendor: 5,232 bytes, line 97
97s.touch.end.x=i[0].pageX,s.touch.end.y=i[0].pageY,"fade"===s.settings.mode?(r=Math.abs(s.touch.start.x-s.touch.end.x),r>=s.settings.swipeThreshold&&(s.touch.start.x>s.touch.end.x?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto())):("horizontal"===s.settings.mode?(r=s.touch.end.x-s.touch.start.x,n=s.touch.originalPos.left):(r=s.touch.end.y-s.touch.start.y,n=s.touch.originalPos.top),!s.settings.infiniteLoop&&(0===s.active.index&&r>0||s.active.last&&0>r)?S(n,"reset",200):Math.abs(r)>=s.settings.swipeThreshold?(0>r?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):S(n,"reset",200)),s.viewport.unbind("touchend MSPointerUp pointerup",B),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},U=function(e){if(s.initialized)if(s.working)window.setTimeout(U,10);else{var i=t(window).width(),n=t(window).height();(r!==i||a!==n)&&(r=i,a=n,o.redrawSlider(),s.settings.onSliderResize.call(o,s.active.index))}},j=function(t){var e=v();s.settings.ariaHidden&&!s.settings.ticker&&(s.children.attr("aria-hidden","true"),s.children.slice(t,t+e).attr("aria-hidden","false"))},Q=function(t){return 0>t?s.settings.infiniteLoop?f()-1:s.active.index:t>=f()?s.settings.infiniteLoop?0:s.active.index:t};return o.goToSlide=function(e,i){var n,r,a,l,d=!0,c=0,g={left:0,top:0},u=null;if(s.oldIndex=s.active.index,s.active.index=Q(e),!s.working&&s.active.index!==s.oldIndex){if(s.working=!0,d=s.settings.onSlideBefore.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index),"undefined"!=typeof d&&!d)return s.active.index=s.oldIndex,void(s.working=!1);"next"===i?s.settings.onSlideNext.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)||(d=!1):"prev"===i&&(s.settings.onSlidePrev.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)||(d=!1)),s.active.last=s.active.index>=f()-1,(s.settings.pager||s.settings.pagerCustom)&&I(s.active.index),s.settings.controls&&D(),"fade"===s.settings.mode?(s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),s.children.filter(":visible").fadeOut(s.settings.speed).css({zIndex:0}),s.children.eq(s.active.index).css("zIndex",s.settings.slideZIndex+1).fadeIn(s.settings.speed,function(){t(this).css("zIndex",s.settings.slideZIndex),A()})):(s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),!s.settings.infiniteLoop&&s.carousel&&s.active.last?"horizontal"===s.settings.mode?(u=s.children.eq(s.children.length-1),g=u.position(),c=s.viewport.width()-u.outerWidth()):(n=s.children.length-s.settings.minSlides,g=s.children.eq(n).position()):s.carousel&&s.active.last&&"prev"===i?(r=1===s.settings.moveSlides?s.settings.maxSlides-x():(f()-1)*x()-(s.children.length-s.settings.maxSlides),u=o.children(".bx-clone").eq(r),g=u.position()):"next"===i&&0===s.active.index?(g=o.find("> .bx-clone").eq(s.settings.maxSlides).position(),s.active.last=!1):e>=0&&(l=e*parseInt(x()),g=s.children.eq(l).position()),"undefined"!=typeof g&&(a="horizontal"===s.settings.mode?-(g.left-c):-g.top,S(a,"slide",s.settings.speed)),s.working=!1),s.settings.ariaHidden&&j(s.active.index*x())}},o.goToNextSlide=function(){if((s.settings.infiniteLoop||!s.active.last)&&1!=s.working){var t=parseInt(s.active.index)+1;o.goToSlide(t,"next")}},o.goToPrevSlide=function(){if((s.settings.infiniteLoop||0!==s.active.index)&&1!=s.working){var t=parseInt(s.active.index)-1;o.goToSlide(t,"prev")}},o.startAuto=function(t){s.interval||(s.interval=setInterval(function(){"next"===s.settings.autoDirection?o.goToNextSlide():o.goToPrevSlide()},s.settings.pause),s.settings.onAutoChange.call(o,!0),s.settings.autoControls&&t!==!0&&q("stop"))},o.stopAuto=function(t){s.interval&&(clearInterval(s.interval),s.interval=null,s.settings.onAutoChange.call(o,!1),s.settings.autoControls&&t!==!0&&q("start"))},o.getCurrentSlide=function(){return s.active.index},o.getCurrentSlideElement=function(){return s.children.eq(s.active.index)},o.getSlideElement=function(t){return s.children.eq(t)},o.getSlideCount=function(){return s.children.length},o.isWorking=function(){return s.working},o.redrawSlider=function(){s.children.add(o.find(".bx-clone")).outerWidth(h()),s.viewport.css("height",p()),s.settings.ticker||m(),s.active.last&&(s.active.index=f()-1),s.active.index>=f()&&(s.active.last=!0),s.settings.pager&&!s.settings.pagerCustom&&(b(),I(s.active.index)),s.settings.ariaHidden&&j(s.active.index*x())},o.destroySlider=function(){s.initialized&&(s.initialized=!1,t(".bx-clone",this).remove(),s.children.each(function(){void 0!==t(this).data("origStyle")?t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void 0!==t(this).data("origStyle")?this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).unwrap().unwrap(),s.controls.el&&s.controls.el.remove(),s.controls.next&&s.controls.next.remove(),s.controls.prev&&s.controls.prev.remove(),s.pagerEl&&s.settings.controls&&!s.settings.pagerCustom&&s.pagerEl.remove(),t(".bx-caption",this).remove(),s.controls.autoEl&&s.controls.autoEl.remove(),clearInterval(s.interval),s.settings.responsive&&t(window).unbind("resize",U),s.settings.keyboardEnabled&&t(document).unbind("
97keydown",X),t(this).removeData("bxSlider"),t(window).off("blur",W).off("focus",H))},o.reloadSlider=function(e){void 0!==e&&(n=e),o.destroySlider(),l(),t(o).data("bxSlider",this)},l(),t(o).data("bxSlider",this),this}}}(jQuery); 98/* End */ 99; 100; /* Start:"a:4:{s:4:"full";s:114:"/bitrix/templates/aspro-allcorp2/components/bitrix/news.list/catalog-sections-3-custom/script.min.js?1752320430188";s:6:"source";s:96:"/bitrix/templates/aspro-allcorp2/components/bitrix/news.list/catalog-sections-3-custom/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 101$(document).ready(function(){(BX.browser.IsIE9()&&BX.browser.IsIE()||BX.browser.IsMac())&&$(".catalog .item.slice-item").length&&$(".catalog .item.slice-item").sliceHeight({fixWidth:1})}); 102/* End */ 103; 104; /* Start:"a:4:{s:4:"full";s:112:"/bitrix/templates/aspro-allcorp2/components/bitrix/catalog.smart.filter/catalog_custom/script.js?177981395526814";s:6:"source";s:96:"/bitrix/templates/aspro-allcorp2/components/bitrix/catalog.smart.filter/catalog_custom/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 105function JCSmartFilter(ajaxURL, viewMode, params) 106{ 107 this.ajaxURL = ajaxURL; 108 this.form = null; 109 this.timer = null; 110 this.cacheKey = ''; 111 this.cache = []; 112 this.viewMode = viewMode; 113 this.sef = true; 114 if (params && params.SEF_SET_FILTER_URL) 115 { 116 this.bindUrlToButton('set_filter', params.SEF_SET_FILTER_URL); 117 this.sef = true; 118 } 119 if (params && params.SEF_DEL_FILTER_URL) 120 { 121 this.bindUrlToButton('del_filter', params.SEF_DEL_FILTER_URL); 122 } 123 this.instantReload = params && params.INSTANT_RELOAD; 124} 125 126JCSmartFilter.prototype.keyup = function(input) 127{ 128 if(!!this.timer) 129 { 130 clearTimeout(this.timer); 131 } 132 this.timer = setTimeout(BX.delegate(function(){ 133 this.reload(input); 134 }, this), 500); 135}; 136 137JCSmartFilter.prototype.click = function(checkbox) 138{ 139 if(!!this.timer) 140 { 141 clearTimeout(this.timer); 142 } 143 144 this.timer = setTimeout(BX.delegate(function(){ 145 this.reload(checkbox); 146 }, this), 500); 147}; 148 149JCSmartFilter.prototype.reload = function(input) 150{ 151 if (this.cacheKey !== '') 152 { 153 //Postprone backend query 154 if(!!this.timer) 155 { 156 clearTimeout(this.timer); 157 } 158 this.timer = setTimeout(BX.delegate(function(){ 159 this.reload(input); 160 }, this), 1000); 161 return; 162 } 163 this.cacheKey = '|'; 164 165 var isSelecBox = false; 166 isSelecBox = $(input).closest('.bx_filter_select_container').length; 167 168 this.position_input = 0; 169 170 this.label_input = $('label[data-role=label_'+$(input).attr('id').replace("all_", "")+']'); 171 if(isSelecBox) 172 { 173 this.label_input = $(input).closest('.bx_filter_select_container'); 174 } 175 if(this.label_input.length) 176 { 177 this.position_input = this.label_input.offset().top - this.label_input.height() / 2; 178 if(this.label_input.hasClass('nab')){ 179 this.position_input += 7; 180 } 181 if(isSelecBox) 182 { 183 this.position_input += 10; 184 } 185 } 186 187 this.position = BX.pos(input, true); 188 this.form = BX.findParent(input, {'tag':'form'}); 189 if (this.form) 190 { 191 var values = []; 192 values[0] = {name: 'ajax', value: 'y'}; 193 this.gatherInputsValues(values, BX.findChildren(this.form, {'tag': new RegExp('^(input|select)$', 'i')}, true)); 194 195 for (var i = 0; i < values.length; i++) 196 this.cacheKey += values[i].name + ':' + values[i].value + '|'; 197 198 if (this.cache[this.cacheKey]) 199 { 200 this.curFilterinput = input; 201 this.postHandler(this.cache[this.cacheKey], true); 202 } 203 else 204 { 205 if (this.sef) 206 { 207 var set_filter = BX('set_filter'); 208 set_filter.disabled = true; 209 } 210 211 this.curFilterinput = input; 212 BX.ajax.loadJSON( 213 this.ajaxURL, 214 this.values2post(values), 215 BX.delegate(this.postHandler, this) 216 ); 217 } 218 } 219}; 220 221JCSmartFilter.prototype.updateItem = function (PID, arItem) 222{ 223 if (arItem.PROPERTY_TYPE === 'N' || arItem.PRICE) 224 { 225 var trackBar = window['trackBar' + PID]; 226 if (!trackBar && arItem.ENCODED_ID) 227 trackBar = window['trackBar' + arItem.ENCODED_ID]; 228 229 if (trackBar && arItem.VALUES) 230 { 231 if (arItem.VALUES.MIN) 232 { 233 if (arItem.VALUES.MIN.FILTERED_VALUE) 234 trackBar.setMinFilteredValue(arItem.VALUES.MIN.FILTERED_VALUE); 235 else 236 trackBar.setMinFilteredValue(arItem.VALUES.MIN.VALUE); 237 } 238
239 if (arItem.VALUES.MAX) 240 { 241 if (arItem.VALUES.MAX.FILTERED_VALUE) 242 trackBar.setMaxFilteredValue(arItem.VALUES.MAX.FILTERED_VALUE); 243 else 244 trackBar.setMaxFilteredValue(arItem.VALUES.MAX.VALUE); 245 } 246 } 247 } 248 else if (arItem.VALUES) 249 { 250 for (var i in arItem.VALUES) 251 { 252 if (arItem.VALUES.hasOwnProperty(i)) 253 { 254 var value = arItem.VALUES[i]; 255 var control = BX(value.CONTROL_ID); 256 257 if (!!control) 258 { 259 var label = document.querySelector('[data-role="label_'+value.CONTROL_ID+'"]'); 260 input = document.querySelector('[name="'+value.CONTROL_ID+'"]'); 261 if (value.DISABLED) 262 { 263 if (label){ 264 BX.addClass(label, 'disabled'); 265 if(input){ 266 input.setAttribute('disabled','disabled'); 267 BX.addClass(input, 'disabled'); 268 } 269 }else{ 270 BX.addClass(control.parentNode, 'disabled'); 271 } 272 273 274 } 275 else 276 { 277 if (label){ 278 BX.removeClass(label, 'disabled'); 279 if(input){ 280 input.removeAttribute('disabled'); 281 BX.removeClass(input, 'disabled'); 282 } 283 }else 284 BX.removeClass(control.parentNode, 'disabled'); 285 } 286 287 if (value.hasOwnProperty('ELEMENT_COUNT')) 288 { 289 label = document.querySelector('[data-role="count_'+value.CONTROL_ID+'"]'); 290 if (label) 291 label.innerHTML = value.ELEMENT_COUNT; 292 } 293 } 294 } 295 } 296 } 297}; 298 299JCSmartFilter.prototype.postHandler = function (result, fromCache) 300{ 301 var hrefFILTER, url, curProp; 302 var modef = BX('modef'); 303 var modef_mobile = BX('modef_mobile'); 304 var modef_num = BX('modef_num'); 305 var modef_num_mobile = BX('modef_num_mobile'); 306 307 if (!!result && !!result.ITEMS) 308 { 309 for(var PID in result.ITEMS) 310 { 311 if (result.ITEMS.hasOwnProperty(PID)) 312 { 313 this.updateItem(PID, result.ITEMS[PID]); 314 } 315 } 316 317 if (!!modef && !!modef_num) 318 { 319 if(this.position_input) 320 $('#modef').css({'top':this.position_input - $(".smartfilter").offset().top}) 321 else 322 $('#modef').css({'top':'auto'}) 323 324 if(this.viewMode == "HORIZONTAL") 325 $('#modef').css({'top':'auto'}) 326 327 modef_num.innerHTML = result.ELEMENT_COUNT; 328 hrefFILTER = BX.findChildren(modef, {tag: 'A'}, true); 329 330 if (!!modef_num_mobile && !!modef_mobile) 331 { 332 modef_num_mobile.innerHTML = result.ELEMENT_COUNT; 333 hrefFILTER_mobile = BX.findChildren(modef_mobile, {tag: 'A'}, true); 334 } 335 336 if (result.FILTER_URL && hrefFILTER) 337 { 338 hrefFILTER[0].href = BX.util.htmlspecialcharsback(result.FILTER_URL); 339 } 340 341 if (result.FILTER_AJAX_URL && result.COMPONENT_CONTAINER_ID) 342 { 343 BX.unbindAll(hrefFILTER[0]); 344 BX.bind(hrefFILTER[0], 'click', function(e) 345 { 346 url = BX.util.htmlspecialcharsback(result.FILTER_AJAX_URL); 347 BX.ajax.insertToNode(url, result.COMPONENT_CONTAINER_ID); 348 return BX.PreventDefault(e); 349 }); 350 } 351 352 if (this.instantReload) 353 { 354 url = BX.util.htmlspecialcharsback(result.FILTER_AJAX_URL); 355 let tagsValue = $('input[name="tags"]').val(); 356 if (tagsValue) 357 { 358 url = url + '?tags=' + tagsValue; 359 } 360 361 history.replaceState(null, "", url); 362 let container = $(".main-catalog-wrapper .items"), 363 waiter = BX.showWait(container[0]); 364 $.ajax({ 365 url: url, 366 data: {"AJAX_REQUEST": "Y"}, 367 success: function(html) { 368 container.html(html); 369 container.siblings(".bottom_nav").html(container.find(".bottom_nav").html()); 370 }, 371 complete: function() { 372 BX.closeWait(container, waiter); 373 }, 374 }); 375 } 376 else 377 { 378 if (modef.style.display === 'none') 379 { 380 modef.style.display = 'inline-block'; 381 if (!!modef_num_mobile && !!modef_mobile) 382 modef_mobile.style.display = 'inline-block'; 383 } 384 if (this.viewMode == "VERTICAL") 385 { 386 curProp = BX.findChild(BX.findParent(this.curFilterinput, {'class':'bx_filter_parameters_box'}), {'class':'bx_filter_container_modef'}, true, false); 387 curProp.appendChild(modef); 388 } 389 390 if (result.SEF_SET_FILTER_URL) 391 { 392 this.bindUrlToButton('set_filter', result.SEF_SET_FILTER_URL); 393 } 394 } 395 } 396 } 397 398 if (this.sef) 399 { 400 var set_filter = BX('set_filter'); 401 set_filter.disabled = false;
402 } 403 404 if (!fromCache && this.cacheKey !== '') 405 { 406 this.cache[this.cacheKey] = result; 407 } 408 this.cacheKey = ''; 409}; 410 411JCSmartFilter.prototype.bindUrlToButton = function (buttonId, url) 412{ 413 var button = BX(buttonId); 414 if (button) 415 { 416 var proxy = function(j, func) 417 { 418 return function() 419 { 420 return func(j); 421 } 422 }; 423 424 if (button.type == 'submit') 425 button.type = 'button'; 426 427 BX.bind(button, 'click', proxy(url, function(url) 428 { 429 window.location.href = url; 430 return false; 431 })); 432 } 433}; 434 435JCSmartFilter.prototype.gatherInputsValues = function (values, elements) 436{ 437 if(elements) 438 { 439 for(var i = 0; i < elements.length; i++) 440 { 441 var el = elements[i]; 442 if (el.disabled || !el.type) 443 continue; 444 445 switch(el.type.toLowerCase()) 446 { 447 case 'text': 448 case 'textarea': 449 case 'password': 450 case 'hidden': 451 case 'select-one': 452 if(el.value.length) 453 values[values.length] = {name : el.name, value : el.value}; 454 break; 455 case 'radio': 456 case 'checkbox': 457 if(el.checked) 458 values[values.length] = {name : el.name, value : el.value}; 459 break; 460 case 'select-multiple': 461 for (var j = 0; j < el.options.length; j++) 462 { 463 if (el.options[j].selected) 464 values[values.length] = {name : el.name, value : el.options[j].value}; 465 } 466 break; 467 default: 468 break; 469 } 470 } 471 } 472}; 473 474JCSmartFilter.prototype.values2post = function (values) 475{ 476 var post = []; 477 var current = post; 478 var i = 0; 479 480 while(i < values.length) 481 { 482 var p = values[i].name.indexOf('['); 483 if(p == -1) 484 { 485 current[values[i].name] = values[i].value; 486 current = post; 487 i++; 488 } 489 else 490 { 491 var name = values[i].name.substring(0, p); 492 var rest = values[i].name.substring(p+1); 493 if(!current[name]) 494 current[name] = []; 495 496 var pp = rest.indexOf(']'); 497 if(pp == -1) 498 { 499 //Error - not balanced brackets 500 current = post; 501 i++; 502 } 503 else if(pp == 0) 504 { 505 //No index specified - so take the next integer 506 current = current[name]; 507 values[i].name = '' + current.length; 508 } 509 else 510 { 511 //Now index name becomes and name and we go deeper into the array 512 current = current[name]; 513 values[i].name = rest.substring(0, pp) + rest.substring(pp+1); 514 } 515 } 516 } 517 return post; 518}; 519 520JCSmartFilter.prototype.hideFilterProps = function(element) 521{ 522 var obj = element.parentNode, 523 filterBlock = obj.querySelector("[data-role='bx_filter_block']"), 524 propAngle = obj.querySelector("[data-role='prop_angle']"); 525 526 if(BX.hasClass(obj, "bx-active")) 527 { 528 new BX.easing({ 529 duration : 300, 530 start : { opacity: 1, height: filterBlock.offsetHeight }, 531 finish : { opacity: 0, height:0 }, 532 transition : BX.easing.transitions.quart, 533 step : function(state){ 534 filterBlock.style.opacity = state.opacity; 535 filterBlock.style.height = state.height + "px"; 536 }, 537 complete : function() { 538 filterBlock.setAttribute("style", ""); 539 BX.removeClass(obj, "bx-active"); 540 } 541 }).animate(); 542 543 BX.addClass(propAngle, "fa-angle-down"); 544 BX.removeClass(propAngle, "fa-angle-up"); 545 } 546 else 547 { 548 filterBlock.style.display = "block"; 549 filterBlock.style.opacity = 0; 550 filterBlock.style.height = "auto"; 551 552 var obj_children_height = filterBlock.offsetHeight; 553 filterBlock.style.height = 0; 554 555 new BX.easing({ 556 duration : 300, 557 start : { opacity: 0, height: 0 }, 558 finish : { opacity: 1, height: obj_children_height }, 559 transition : BX.easing.transitions.quart, 560 step : function(state){ 561 filterBlock.style.opacity = state.opacity; 562 filterBlock.style.height = state.height + "px"; 563 }, 564 complete : function() { 565 } 566 }).animate(); 567 568 BX.addClass(obj, "bx-active"); 569 BX.removeClass(propAngle, "fa-angle-down"); 570 BX.addClass(propAngle, "fa-angle-up"); 571 } 572}; 573 574JCSmartFilter.prototype.showDropDownPopup = function(element, popupId) 575{ 576 var contentNode = element.querySelector('[data-role="dropdownContent"]'); 577 BX.PopupWindowManager.create("smartFilterDropDown"+popupId, element, { 578 autoHide: true, 579 offsetLeft: 0, 580 offsetTop: 0, 581 overlay : false, 582 draggable: {restrict:true}, 583 closeByEsc: true, 584 content: contentNode 585 }).show(); 586 var popup=$('#smartFilterDropDown'+popupId); 587 popup.css({'width':$(element).css('width')}); 588}; 589 590JCSmartFilter.prototype.selectDropDownItem = function(element, controlId) 591{ 592 if(!BX.hasClass(element,'disabled')){ 593 this.keyup(BX(controlId)); 594 595 var wrapContainer = BX.findParent(BX(controlId), {className:"bx_filter_select_container"}, false); 596 597 var currentOption = wrapContainer.querySelector('[data-role="currentOption"]'); 598 599 currentOption.innerHTML = element.innerHTML; 600 $(element).closest('.bx_filter_select_popup').find('label').removeClass('selected'); 601 BX.addClass(element, "selected"); 602 BX.PopupWindowManager.getCurrentPopup().close(); 603 } 604}; 605 606BX.namespace("BX.Iblock.SmartFilter"); 607BX.Iblock.SmartFilter = (function() 608{ 609 var SmartFilter = function(arParams) 610 { 611 if (typeof arParams === 'object') 612 { 613 this.leftSlider = BX(arParams.leftSlider); 614 this.rightSlider = BX(arParams.rightSlider); 615 this.tracker = BX(arParams.tracker); 616 this.trackerWrap = BX(arParams.trackerWrap); 617 618 this.minInput = BX(arParams.minInputId); 619 this.maxInput = BX(arParams.maxInputId); 620 621 this.minPrice = parseFloat(arParams.minPrice); 622 this.maxPrice = parseFloat(arParams.maxPrice); 623 624 this.curMinPrice = parseFloat(arParams.curMinPrice); 625 this.curMaxPrice = parseFloat(arParams.curMaxPrice); 626
627 this.fltMinPrice = arParams.fltMinPrice ? parseFloat(arParams.fltMinPrice) : parseFloat(arParams.curMinPrice); 628 this.fltMaxPrice = arParams.fltMaxPrice ? parseFloat(arParams.fltMaxPrice) : parseFloat(arParams.curMaxPrice); 629 630 this.precision = arParams.precision || 0; 631 632 this.priceDiff = this.maxPrice - this.minPrice; 633 634 this.leftPercent = 0; 635 this.rightPercent = 0; 636 637 this.fltMinPercent = 0; 638 this.fltMaxPercent = 0; 639 640 this.colorUnavailableActive = BX(arParams.colorUnavailableActive);//gray 641 this.colorAvailableActive = BX(arParams.colorAvailableActive);//blue 642 this.colorAvailableInactive = BX(arParams.colorAvailableInactive);//light blue 643 644 this.isTouch = false; 645 646 this.init(); 647 648 if ('ontouchstart' in document.documentElement || 'ontouchstart' in window) 649 { 650 this.isTouch = true; 651 652 BX.bind(this.leftSlider, "touchstart", BX.proxy(function(event){ 653 this.onMoveLeftSlider(event) 654 }, this)); 655 656 BX.bind(this.rightSlider, "touchstart", BX.proxy(function(event){ 657 this.onMoveRightSlider(event) 658 }, this)); 659 660 BX.bind(this.colorAvailableActive, "touchstart", BX.proxy(function(event){ 661 this.onChangeLeftSlider(event); 662 }, this)); 663 664 BX.bind(this.colorUnavailableActive, "touchstart", BX.proxy(function(event){ 665 this.onChangeLeftSlider(event); 666 }, this)); 667 668 BX.bind(this.colorAvailableInactive, "touchstart", BX.proxy(function(event){ 669 this.onChangeLeftSlider(event); 670 }, this)); 671 } 672 else 673 { 674 BX.bind(this.leftSlider, "mousedown", BX.proxy(function(event){ 675 this.onMoveLeftSlider(event) 676 }, this)); 677 678 BX.bind(this.rightSlider, "mousedown", BX.proxy(function(event){ 679 this.onMoveRightSlider(event) 680 }, this)); 681 682 BX.bind(this.colorAvailableActive, "mousedown", BX.proxy(function(event){ 683 this.onChangeLeftSlider(event); 684 }, this)); 685 686 BX.bind(this.colorUnavailableActive, "mousedown", BX.proxy(function(event){ 687 this.onChangeLeftSlider(event); 688 }, this)); 689 690 BX.bind(this.colorAvailableInactive, "mousedown", BX.proxy(function(event){ 691 this.onChangeLeftSlider(event); 692 }, this)); 693 } 694 695 BX.bind(this.minInput, "keyup", BX.proxy(function(event){ 696 this.onInputChange(); 697 }, this)); 698 699 BX.bind(this.maxInput, "keyup", BX.proxy(function(event){ 700 this.onInputChange(); 701 }, this)); 702 } 703 }; 704 705 SmartFilter.prototype.init = function() 706 { 707 var priceDiff; 708 709 if (this.curMinPrice > this.minPrice) 710 { 711 priceDiff = this.curMinPrice - this.minPrice; 712 this.leftPercent = (priceDiff*100)/this.priceDiff; 713 714 this.leftSlider.style.left = this.leftPercent + "%"; 715 this.colorUnavailableActive.style.left = this.leftPercent + "%"; 716 } 717 718 this.setMinFilteredValue(this.fltMinPrice); 719 720 if (this.curMaxPrice < this.maxPrice) 721 { 722 priceDiff = this.maxPrice - this.curMaxPrice; 723 this.rightPercent = (priceDiff*100)/this.priceDiff; 724 725 this.rightSlider.style.right = this.rightPercent + "%"; 726 this.colorUnavailableActive.style.right = this.rightPercent + "%"; 727 } 728 729 this.setMaxFilteredValue(this.fltMaxPrice); 730 }; 731 732 SmartFilter.prototype.setMinFilteredValue = function (fltMinPrice) 733 { 734 this.fltMinPrice = parseFloat(fltMinPrice); 735 if (this.fltMinPrice >= this.minPrice) 736 { 737 var priceDiff = this.fltMinPrice - this.minPrice; 738 this.fltMinPercent = (priceDiff*100)/this.priceDiff; 739 740 if (this.leftPercent > this.fltMinPercent) 741 this.colorAvailableActive.style.left = this.leftPercent + "%"; 742 else 743 this.colorAvailableActive.style.left = this.fltMinPercent + "%"; 744 745 this.colorAvailableInactive.style.left = this.fltMinPercent + "%"; 746 } 747 else 748 { 749 this.colorAvailableActive.style.left = "0%"; 750 this.colorAvailableInactive.style.left = "0%"; 751 } 752 }; 753 754 SmartFilter.prototype.setMaxFilteredValue = function (fltMaxPrice) 755 { 756 this.fltMaxPrice = parseFloat(fltMaxPrice); 757 if (this.fltMaxPrice <= this.maxPrice) 758 { 759 var priceDiff = this.maxPrice - this.fltMaxPrice; 760 this.fltMaxPercent = (priceDiff*100)/this.priceDiff; 761 762 if (this.rightPercent > this.fltMaxPercent) 763 this.colorAvailableActive.style.right = this.rightPercent + "%"; 764 else 765 this.colorAvailableActive.style.right = this.fltMaxPercent + "%"; 766 767 this.colorAvailableInactive.style.right = this.fltMaxPercent + "%"; 768 } 769 else 770 { 771 this.colorAvailableActive.style.right = "0%"; 772 this.colorAvailableInactive.style.right = "0%"; 773 } 774 }; 775 776 SmartFilter.prototype.getXCoord = function(elem) 777 { 778 var box = elem.getBoundingClientRect(); 779 var body = document.body; 780 var docElem = document.documentElement; 781 782 var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft; 783 var clientLeft = docElem.clientLeft || body.clientLeft || 0; 784 var left = box.left + scrollLeft - clientLeft; 785 786 return Math.round(left); 787 }; 788 789 SmartFilter.prototype.getPageX = function(e) 790 { 791 e = e || window.event; 792 var pageX = null; 793 794 if (this.isTouch && event.targetTouches[0] != null) 795 { 796 pageX = e.targetTouches[0].pageX; 797 } 798 else if (e.pageX != null) 799 { 800 pageX = e.pageX; 801 } 802 else if (e.clientX != null) 803 { 804 var html = document.documentElement; 805 var body = document.body; 806 807 pageX = e.clientX + (html.scrollLeft || body && body.scrollLeft || 0); 808 pageX -= html.clientLeft || 0; 809 } 810 811 return pageX; 812 }; 813 814 SmartFilter.prototype.recountMinPrice = function() 815 { 816 var newMinPrice = (this.priceDiff*this.leftPercent)/100; 817 newMinPrice = (this.minPrice + newMinPrice).toFixed(this.precision); 818 819 if (newMinPrice != this.minPrice) 820 this.minInput.value = newMinPrice; 821 else 822 this.minInput.value = ""; 823 smartFilter.keyup(this.minInput); 824 }; 825 826 SmartFilter.prototype.recountMaxPrice = function() 827 { 828 var newMaxPrice = (this.priceDiff*this.rightPercent)/100; 829 newMaxPrice = (this.maxPrice - newMaxPrice).toFixed(this.precision); 830 831 if (newMaxPrice != this.maxPrice) 832 this.maxInput.value = newMaxPrice; 833 else 834 this.maxInput.value = ""; 835 smartFilter.keyup(this.maxInput); 836 }; 837 838 SmartFilter.prototype.onInputChange = function () 839 { 840 var priceDiff; 841 if (this.minInput.value) 842 { 843 var leftInputValue = this.minInput.value; 844 if (leftInputValue < this.minPrice) 845 leftInputValue = this.minPrice; 846 847 if (leftInputValue > this.maxPrice) 848 leftInputValue = this.maxPrice; 849 850 priceDiff = leftInputValue - this.minPrice; 851 this.leftPercent = (priceDiff*100)/this.priceDiff; 852 853 this.makeLeftSliderMove(false); 854 } 855 856 if (this.maxInput.value) 857 { 858 var rightInputValue = this.maxInput.value; 859 if (rightInputValue < this.minPrice) 860 rightInputValue = this.minPrice; 861 862 if (rightInputValue > this.maxPrice) 863 rightInputValue = this.maxPrice; 864 865 priceDiff = this.maxPrice - rightInputValue; 866 this.rightPercent = (priceDiff*100)/this.priceDiff; 867 868 this.makeRightSliderMove(false); 869 } 870 }; 871 872 SmartFilter.prototype.makeLeftSliderMove = function(recountPrice) 873 { 874 recountPrice = (recountPrice !== false); 875 876 this.leftSlider.style.left = this.leftPercent + "%"; 877 this.colorUnavailableActive.style.left = this.leftPercent + "%"; 878 879 var areBothSlidersMoving = false;
880 if (this.leftPercent + this.rightPercent >= 100) 881 { 882 areBothSlidersMoving = true; 883 this.rightPercent = 100 - this.leftPercent; 884 this.rightSlider.style.right = this.rightPercent + "%"; 885 this.colorUnavailableActive.style.right = this.rightPercent + "%"; 886 } 887 888 if (this.leftPercent >= this.fltMinPercent && this.leftPercent <= (100-this.fltMaxPercent)) 889 { 890 this.colorAvailableActive.style.left = this.leftPercent + "%"; 891 if (areBothSlidersMoving) 892 { 893 this.colorAvailableActive.style.right = 100 - this.leftPercent + "%"; 894 } 895 } 896 else if(this.leftPercent <= this.fltMinPercent) 897 { 898 this.colorAvailableActive.style.left = this.fltMinPercent + "%"; 899 if (areBothSlidersMoving) 900 { 901 this.colorAvailableActive.style.right = 100 - this.fltMinPercent + "%"; 902 } 903 } 904 else if(this.leftPercent >= this.fltMaxPercent) 905 { 906 this.colorAvailableActive.style.left = 100-this.fltMaxPercent + "%"; 907 if (areBothSlidersMoving) 908 { 909 this.colorAvailableActive.style.right = this.fltMaxPercent + "%"; 910 } 911 } 912 913 if (recountPrice) 914 { 915 this.recountMinPrice(); 916 if (areBothSlidersMoving) 917 this.recountMaxPrice(); 918 } 919 }; 920 921 SmartFilter.prototype.countNewLeft = function(event) 922 { 923 var pageX = this.getPageX(event); 924 925 var trackerXCoord = this.getXCoord(this.trackerWrap); 926 var rightEdge = this.trackerWrap.offsetWidth; 927 928 var newLeft = pageX - trackerXCoord; 929 930 if (newLeft < 0) 931 newLeft = 0; 932 else if (newLeft > rightEdge) 933 newLeft = rightEdge; 934 935 return newLeft; 936 }; 937 938 SmartFilter.prototype.onMoveLeftSlider = function(e) 939 { 940 if (!this.isTouch) 941 { 942 this.leftSlider.ondragstart = function() { 943 return false; 944 }; 945 } 946 947 if (!this.isTouch) 948 { 949 document.onmousemove = BX.proxy(function(event) { 950 this.leftPercent = ((this.countNewLeft(event)*100)/this.trackerWrap.offsetWidth); 951 this.makeLeftSliderMove(); 952 }, this); 953 954 document.onmouseup = function() { 955 document.onmousemove = document.onmouseup = null; 956 }; 957 } 958 else 959 { 960 var onMoveFunction = BX.proxy(function(event) { 961 this.leftPercent = ((this.countNewLeft(event)*100)/this.trackerWrap.offsetWidth); 962 this.makeLeftSliderMove(); 963 }, this); 964 965 var onEndFunction = BX.proxy(function(event) { 966 window.removeEventListener('touchmove', onMoveFunction, false); 967 window.removeEventListener('touchend', onEndFunction, false); 968 onMoveFunction = onEndFunction = null; 969 }, this); 970 971 window.addEventListener('touchmove', onMoveFunction, false); 972 window.addEventListener('touchend', onEndFunction, false); 973 974 /*document.ontouchmove = BX.proxy(function(event) { 975 this.leftPercent = ((this.countNewLeft(event)*100)/this.trackerWrap.offsetWidth); 976 this.makeLeftSliderMove(); 977 }, this); 978 979 document.ontouchend = function() { 980 document.ontouchmove = document.touchend = null; 981 };*/ 982 } 983 984 return false; 985 }; 986 987 SmartFilter.prototype.makeRightSliderMove = function(recountPrice) 988 { 989 recountPrice = (recountPrice !== false); 990 991 this.rightSlider.style.right = this.rightPercent + "%"; 992 this.colorUnavailableActive.style.right = this.rightPercent + "%"; 993 994 var areBothSlidersMoving = false; 995 if (this.leftPercent + this.rightPercent >= 100) 996 { 997 areBothSlidersMoving = true; 998 this.leftPercent = 100 - this.rightPercent; 999 this.leftSlider.style.left = this.leftPercent + "%"; 1000 this.colorUnavailableActive.style.left = this.leftPercent + "%"; 1001 } 1002 1003 if ((100-this.rightPercent) >= this.fltMinPercent && this.rightPercent >= this.fltMaxPercent) 1004 { 1005 this.colorAvailableActive.style.right = this.rightPercent + "%"; 1006 if (areBothSlidersMoving) 1007 { 1008 this.colorAvailableActive.style.left = 100 - this.rightPercent + "%"; 1009 } 1010 } 1011 else if(this.rightPercent <= this.fltMaxPercent) 1012 { 1013 this.colorAvailableActive.style.right = this.fltMaxPercent + "%"; 1014 if (areBothSlidersMoving) 1015 { 1016 this.colorAvailableActive.style.left = 100 - this.fltMaxPercent + "%"; 1017 } 1018 } 1019 else if((100-this.rightPercent) <= this.fltMinPercent) 1020 { 1021 this.colorAvailableActive.style.right = 100-this.fltMinPercent + "%"; 1022 if (areBothSlidersMoving) 1023 { 1024 this.colorAvailableActive.style.left = this.fltMinPercent + "%"; 1025 } 1026 } 1027 1028 if (recountPrice) 1029 { 1030 this.recountMaxPrice(); 1031 if (areBothSlidersMoving) 1032 this.recountMinPrice(); 1033 } 1034 }; 1035 1036 SmartFilter.prototype.onMoveRightSlider = function(e) 1037 { 1038 if (!this.isTouch) 1039 { 1040 this.rightSlider.ondragstart = function() { 1041 return false;
1042 }; 1043 } 1044 1045 if (!this.isTouch) 1046 { 1047 document.onmousemove = BX.proxy(function(event) { 1048 this.rightPercent = 100-(((this.countNewLeft(event))*100)/(this.trackerWrap.offsetWidth)); 1049 this.makeRightSliderMove(); 1050 }, this); 1051 1052 document.onmouseup = function() { 1053 document.onmousemove = document.onmouseup = null; 1054 }; 1055 } 1056 else 1057 { 1058 var onMoveFunction = BX.proxy(function(event) { 1059 this.rightPercent = 100-(((this.countNewLeft(event))*100)/(this.trackerWrap.offsetWidth)); 1060 this.makeRightSliderMove(); 1061 }, this); 1062 1063 var onEndFunction = BX.proxy(function(event) { 1064 window.removeEventListener('touchmove', onMoveFunction, false); 1065 window.removeEventListener('touchend', onEndFunction, false); 1066 onMoveFunction = onEndFunction = null; 1067 }, this); 1068 1069 window.addEventListener('touchmove', onMoveFunction, false); 1070 window.addEventListener('touchend', onEndFunction, false); 1071 1072 /*document.ontouchmove = BX.proxy(function(event) { 1073 this.rightPercent = 100-(((this.countNewLeft(event))*100)/(this.trackerWrap.offsetWidth)); 1074 this.makeRightSliderMove(); 1075 }, this); 1076 1077 document.ontouchend = function() { 1078 document.ontouchmove = document.ontouchend = null; 1079 };*/ 1080 } 1081 1082 return false; 1083 }; 1084 1085 SmartFilter.prototype.onChangeLeftSlider = function(e) 1086 { 1087 if (!this.isTouch) 1088 { 1089 this.leftSlider.ondragstart = function() { 1090 //return false; 1091 }; 1092 } 1093 1094 if (!this.isTouch) 1095 { 1096 document.onmousedown = BX.proxy(function(event) { 1097 var percent=((this.countNewLeft(event)*100)/this.trackerWrap.offsetWidth); 1098 if($(event.target).is(".bx_ui_slider_handle") || !$(event.target).is("[class^=bx_ui_slider]")) 1099 return; 1100 if(percent<50){ 1101 this.leftPercent = percent+1; 1102 this.makeLeftSliderMove(); 1103 }else{ 1104 this.rightPercent = 100-percent; 1105 this.makeRightSliderMove(); 1106 } 1107 }, this); 1108 1109 document.onmouseup = function() { 1110 document.onmousemove = document.onmouseup = null; 1111 }; 1112 } 1113 else 1114 { 1115 var percent=((this.countNewLeft(e)*100)/this.trackerWrap.offsetWidth); 1116 if($(e.target).is(".bx_ui_slider_handle")) 1117 return; 1118 if(percent<50){ 1119 this.leftPercent = percent; 1120 this.makeLeftSliderMove(); 1121 }else{ 1122 this.rightPercent = 100-percent; 1123 this.makeRightSliderMove(); 1124 } 1125 1126 /*document.ontouchend = BX.proxy(function(event) { 1127 var percent=((this.countNewLeft(event)*100)/this.trackerWrap.offsetWidth); 1128 if($(event.target).is(".bx_ui_slider_handle")) 1129 return; 1130 if(percent<50){ 1131 this.leftPercent = percent; 1132 this.makeLeftSliderMove(); 1133 }else{ 1134 this.rightPercent = 100-percent; 1135 this.makeRightSliderMove(); 1136 } 1137 }, this); 1138 1139 document.ontouchend = function() { 1140 document.ontouchmove = document.touchend = null; 1141 };*/ 1142 } 1143 1144 return false; 1145 }; 1146 1147 return SmartFilter; 1148})(); 1149/* End */ 1150; 1151; /* Start:"a:4:{s:4:"full";s:108:"/bitrix/templates/aspro-allcorp2/components/bitrix/catalog.section.list/tags_custom/script.js?17523204302306";s:6:"source";s:93:"/bitrix/templates/aspro-allcorp2/components/bitrix/catalog.section.list/tags_custom/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1152function TagsCustom(areaId) { 1153 this.areaId = areaId; 1154 1155 $($.proxy(this, "init")); 1156} 1157 1158TagsCustom.prototype = { 1159 init: function() { 1160 this.el = $("#" + this.areaId); 1161 this.sliderInited = false; 1162 this.sliderOptions = { 1163 slideMargin: 10, 1164 touchEnabled: BX.Browser.isMobile(), 1165 infiniteLoop: false, 1166 hideControlOnEnd: true, 1167 pager: false, 1168 controls: true, 1169 nextText: "<i class='fa fa-chevron-right'></i>", 1170 prevText: "<i class='fa fa-chevron-left'></i>", 1171 moveSlides: 1, 1172 }; 1173 this.resizeTimeout = null; 1174 1175 this.initSlider(); 1176 this.bindEvents(); 1177 }, 1178 1179 bindEvents: function() { 1180 this.el.find(".s-tags__toggle").on("click", $.proxy(this, "toggleSlider")); 1181 $(window).on("resize", $.proxy(this, "onWindowResize")); 1182 }, 1183 1184 initSlider: function() { 1185 this.recalcSliderOptions(); 1186 this.el.removeClass("s-tags_mode_list s-tags_mode_initial").addClass("s-tags_mode_slider"); 1187 this.slider = this.el.find(".s-tags__items").bxSlider(this.sliderOptions); 1188 this.sliderInited = true; 1189 }, 1190 1191 destroySlider: function() { 1192 this.slider.destroySlider(); 1193 this.el.removeClass("s-tags_mode_slider").addClass("s-tags_mode_list"); 1194 this.sliderInited = false;
1195 }, 1196 1197 toggleSlider: function() { 1198 if(this.sliderInited) { 1199 this.destroySlider(); 1200 } else { 1201 this.initSlider(); 1202 } 1203 }, 1204 1205 onWindowResize: function() { 1206 if(this.sliderInited) { 1207 clearTimeout(this.resizeTimeout); 1208 this.resizeTimeout = setTimeout($.proxy(function() { 1209 if(this.recalcSliderOptions()) { 1210 this.slider.reloadSlider(this.sliderOptions); 1211 } 1212 }, this), 100) 1213 } 1214 }, 1215 1216 recalcSliderOptions: function() { 1217 let slidesCount, 1218 slideWidth, 1219 hasChanges = false; 1220 1221 if(window.matchMedia("(min-width: 768px)").matches) { 1222 slidesCount = 4; 1223 } else if(window.matchMedia("(min-width: 576px)").matches) { 1224 slidesCount = 2; 1225 } else { 1226 slidesCount = 1; 1227 } 1228 if(this.sliderOptions.minSlides !== slidesCount || this.sliderOptions.maxSlides !== slidesCount) { 1229 this.sliderOptions.minSlides = slidesCount; 1230 this.sliderOptions.maxSlides = slidesCount; 1231 hasChanges = true; 1232 } 1233 1234 slideWidth = this.el.find(".s-tags__inner").outerWidth() / slidesCount; 1235 if(this.sliderOptions.slideWidth !== slideWidth) { 1236 this.sliderOptions.slideWidth = slideWidth; 1237 hasChanges = true; 1238 } 1239 1240 return hasChanges; 1241 }, 1242}; 1243/* End */ 1244; 1245; /* Start:"a:4:{s:4:"full";s:99:"/bitrix/templates/aspro-allcorp2/components/bitrix/news.list/items-list/script.min.js?1752320430741";s:6:"source";s:81:"/bitrix/templates/aspro-allcorp2/components/bitrix/news.list/items-list/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1246$(document).ready(function(){$(".table .row.sid").length&&BX.browser.IsIE9()&&BX.browser.IsIE()&&$(".table .row.sid").each(function(){$(this).find(".item:visible .properties").sliceHeight({fixWidth:2}),$(this).find(".item:visible .text").sliceHeight({fixWidth:2})}),$(".table.item-views .tabs a").length&&($(".table.item-views .tabs a").first().addClass("heightsliced"),$(".table.item-views .tabs a").on("click",function(){$(this).hasClass("heightsliced")||($(".table.item-views .tab-pane.active").find(".item .image").sliceHeight({lineheight:-3}),$(".table.item-views .tab-pane.active").find(".item .properties").sliceHeight(),$(".table.item-views .tab-pane.active").find(".item .text").sliceHeight(),$(this).addClass("heightsliced"))}))}); 1247/* End */ 1248;; /* /local/components/webit/linking/templates/.default/script.js?17523203862786*/ 1249; /* /bitrix/templates/aspro-allcorp2/vendor/jquery.bxslider.min.js?175232042923647*/ 1250; /* /bitrix/templates/aspro-allcorp2/components/bitrix/news.list/catalog-sections-3-custom/script.min.js?1752320430188*/ 1251; /* /bitrix/templates/aspro-allcorp2/components/bitrix/catalog.smart.filter/catalog_custom/script.js?177981395526814*/ 1252; /* /bitrix/templates/aspro-allcorp2/components/bitrix/catalog.section.list/tags_custom/script.js?17523204302306*/ 1253; /* /bitrix/templates/aspro-allcorp2/components/bitrix/news.list/items-list/script.min.js?1752320430741*/
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.