PageSourceSearch

https://sportnutra.ru/bitrix/templates/aspro_max/js/scrollTabs.min.js?16036713006994

js sportnutra.ru collected 2026-10-08 17:34:10 UTC 6,994 bytes, 1 lines download raw bytes

1InitTabsScroll=function(){$(".arrow_scroll:not(.arrow_scroll_init)").scrollTab()},ResizeScrollTabs=function(){var r=$(".arrow_scroll_init");r.length&&r.each(function(r,e){var t=$(e);t.data("scrollTabOptions").resize()})},$(document).ready(function(){InitTabsScroll()}),$(window).on("resize",function(){void 0!==window.scrollTabsTimeout&&clearTimeout(window.scrollTabsTimeout),window.scrollTabsTimeout=setTimeout(ResizeScrollTabs,20)}),$.fn.scrollTab=function(r){function e(r,e){var t=$(r),a=t.find(e.tabs_wrapper);if(void 0===a||!a.length)return!1;var o=a.find("> li");if(!o.length)return!1;var s='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><rect width="12" height="8" fill="#333" fill-opacity="0" /><path d="M1015.69,507.693a0.986,0.986,0,0,1-1.4,0l-4.31-4.316-4.3,4.316a0.993,0.993,0,0,1-1.4-1.408l4.99-5.009a1.026,1.026,0,0,1,1.43,0l4.99,5.009A0.993,0.993,0,0,1,1015.69,507.693Z" fill="#333" transform="translate(-1004 -501)"/></svg>',n='<div class="arrows_wrapper"><div class="arrow arrow_left colored_theme_hover_text">'+s+'</div><div class="arrow arrow_right colored_theme_hover_text">'+s+"</div></div>",l=$(n).insertAfter(a),i=l.find(".arrow_left"),d=l.find(".arrow_right"),c=$.extend({},e);c.scrollTab=t,c.wrapper=a,c.tabs=o,c.arrows={},c.arrows.wrapper=l,c.arrows.arrow_left=i,c.arrows.arrow_right=d,void 0!==c.linked_tabs&&c.linked_tabs.length&&void 0!==c.linked_tabs.data("scrollTabOptions")&&(c.linked_options=c.linked_tabs.data("scrollTabOptions"),c.linked_options.linked_options=c),e.arrows_css&&(c.arrows.arrow_left.css(e.arrows_css),c.arrows.arrow_right.css(e.arrows_css)),c.initTabs=function(){c.wrapperBounds=c.wrapper[0].getBoundingClientRect(),c.scrollBounds=c.scrollTab[0].getBoundingClientRect(),elements=$(c.tabs),elements.length&&(c.firstTabBound=elements[0].getBoundingClientRect().left,c.lastTabBound=elements[elements.length-1].getBoundingClientRect().right),c.minTranslate=c.wrapperBounds.right<c.lastTabBound?c.wrapperBounds.right-c.lastTabBound-2:0,c.disabled=c.lastTabBound-c.wrapperBounds.left<=c.scrollBounds.width},c.wrapper.css({"white-space":"nowrap","min-width":"auto",overflow:"visible","z-index":"1"}),c.scrollTab.css({overflow:"hidden",position:"relative"}),c.checkArrows=function(r){void 0===r&&(r=c.translate),c.disabled?(c.arrows.arrow_left.addClass("disabled"),c.arrows.arrow_right.addClass("disabled")):r>=c.maxTranslate?(c.arrows.arrow_left.addClass("disabled"),c.arrows.arrow_right.removeClass("disabled")):r<=c.minTranslate?(c.arrows.arrow_right.addClass("disabled"),c.arrows.arrow_left.removeClass("disabled")):(c.arrows.arrow_left.removeClass("disabled"),c.arrows.arrow_right.removeClass("disabled"))},c.directScroll=function(r,e,t){void 0===e&&(e=5),clearInterval(c.timerMoveDirect);var a=c.translate+r;a>c.maxTranslate?a=c.maxTranslate:a<c.minTranslate&&(a=c.minTranslate);var o=c.translate;c.translate=a,0==e?(c.translate=a,c.wrapper.css({transform:"translateX("+c.translate+"px)"})):(void 0===t&&(t=1),c.timerMoveDirect=setInterval(function(){c.wrapper.css({transform:"translateX("+o+"px)"}),(r<0&&o<=a||r>0&&o>=a)&&(c.initTabs(),clearInterval(c.timerMoveDirect)),o<a?o+=t:o-=t},e)),c.checkArrows(a)},c.addArrowsEvents=function(){c.arrows.arrow_right.on("mouseenter",function(){c.arrows.arrow_left.removeClass("disabled"),c.timerMoveLeft=setInterval(function(){c.translate<c.minTranslate?(clearInterval(c.timerMoveLeft),c.arrows.arrow_right.addClass("disabled")):(c.translate-=c.translateSpeed,c.wrapper.css({transform:"translateX("+c.translate+"px)"}))},10)}),c.arrows.arrow_right.on("mouseleave",function(){clearInterval(c.timerMoveLeft)}),c.arrows.arrow_right.on("click",function(){c.directScroll(-c.directTranslate),c.arrows.arrow_left.removeClass("disabled")}),c.arrows.arrow_right.on("touchend",function(){setTimeout(function(){clearInterval(c.timerMoveLeft)},1)}),c.arrows.arrow_left.on("mouseenter",function(){c.arrows.arrow_right.removeClass("disabled"),c.timerMoveRight=setInterval(function(){c.translate>=c.maxTranslate?(clearInterval(c.timerMoveRight),c.arrows.arrow_left.addClass("disabled")):(c.translate+=c.translateSpeed,c.wrapper.css({transform:"translateX("+c.translate+"px)"}))},10)}),c.arrows.arrow_left.on("mouseleave",function(){clearInterval(c.timerMoveRight)}),c.arrows.arrow_left.on("click",function(){c.directScroll(c.directTranslate),c.arrows.arrow_right.removeClass("disabled")}),c.arrows.arrow_left.on("touchend",function(){setTimeout(function(){clearInterval(c.timerMoveRight)},1)})},c.addTabsEvents=function(){c.tabs.on("click",function(){var r=c.scrollBounds.left,e=c.scrollBounds.right,t=this.getBoundingClientRect(),a=t.left-c.arrows.arrow_width,o=t.right+c.arrows.arrow_width;if(a<r?c.directScroll(r-a,1,2):o>e&&c.directScroll(e-o,1,2),c.activeTab=$(this),void 0!==c.linked_options){var s=$(this).index(),n=$(c.linked_options.tabs[s]),l={leftScrollBound:c.linked_options.scrollBounds.left,rightScrollBound:c.linked_options.scrollBounds.right,tabBounds:n[0].getBoundingClientRect()};l.tabBounds.left<l.leftScrollBound?c.linked_options.directScroll(l.leftScrollBound-l.tabBounds.left+c.linked_options.arrows.arrow_width+1,0):l.tabBounds.right>l.rightScrollBound&&c.linked_options.directScroll(l.rightScrollBound-l.tabBounds.right-c.linked_options.arrows.arrow_width-1,0),c.linked_options.activeTab=n}})},c.addWrapperEvents=function(){c.wrapper.on("touchstart",function(r){c.touch.posPrev=r.originalEvent.changedTouches[0].pageX,clearInterval(c.timerMoveRight),clearInterval(c.timerMoveLeft),clearInterval(c.timerMoveDirect)}),c.wrapper.on("touchmove",function(r){c.touch.posCurrent=r.originalEvent.changedTouches[0].pageX-c.touch.posPrev,c.directScroll(c.touch.posCurrent,0),c.touch.posPrev=r.originalEvent.changedTouches[0].pageX})},c.resize=function(){if(c.onBeforeResize&&"function"==typeof c.onBeforeResize&&c.onBeforeResize(c),c.onResize&&"function"==typeof c.onResize&&c.onResize(c),c.translate<c.minTranslate?c.directScroll(c.minTranslate-c.translate):c.translate>c.maxTranslate&&c.directScroll(c.maxTranslate-c.translate),void 0!==c.activeTab&&c.activeTab.length){var r=c.activeTab[0].getBoundingClientRect();r.left<c.scrollBounds.left?c.directScroll(c.scrollBounds.left-r.left):r.right>c.scrollBounds.right&&c.directScroll(c.scrollBounds.right-r.right)}c.initTabs(),c.checkArrows(),c.onAfterResize&&"function"==typeof c.onAfterResize&&c.onAfterResize(c)},t.data("scrollTabOptions",c),t.data("scrollTabOptions").addArrowsEvents(),t.data("scrollTabOptions").addTabsEvents(),t.data("scrollTabOptions").addWrapperEvents(),t.addClass("arrow_scroll_init").addClass("swipeignore"),void 0!==d&&d.length&&(c.arrows.arrow_width=c.arrows.arrow_right[0].getBoundingClientRect().width),t.data("scrollTabOptions").resize(),delete c}r=$.extend({translate:1,translateSpeed:2,directTranslate:150,maxTranslate:1,touch:{},arrows_css:!1,tabs_wrapper:".nav-tabs",onResize:!1,width_grow:9},r);var t=$(this);if(t.hasClass("arrow_scroll_init"))return!1;t.each(function(t,a){e(a,r)})};

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.