PageSourceSearch

https://www.lidl.at/c/js/hashed/AUXSlider.1c0e039be129d418bf91c1f871829ba3.js

js lidl.at collected 2026-10-02 07:46:24 UTC 3,720 bytes, 1 lines download raw bytes

1function ASliderUX(){const t="RIGHT",e="LEFT",n="NONE",i="OTHER";function r(t){const e=t.querySelector(".ATheHeroStage__OfferAnchor--current");if(e){const n=s(t);if(n&&!function(t,e){const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();if(n.left<i.left&&n.right>i.right)return!0;if(n.left>=i.left&&n.left<=i.right&&n.right<i.right)return!0;return!1}(e,n)){const t=g(n).allDomElements;if(t.length>0){const i=function(t,e){const n=u(t);for(let t=0;t<n.length;t++)if(!0===e(n[t]))return t;return-1}(n,t=>t===e||t.contains(e));if(i>-1){const e=Math.floor(i/t.length);n.scroll({left:e*t[0].offsetWidth*t.length,behavior:"smooth"})}}}}}function o(t){const e=t.querySelectorAll(".m-ux-slider");return e.length?Array.prototype.slice.call(e):[t]}function l(t){return t.querySelector(".m-ux-slider-button-left")}function c(t){return t.querySelector(".m-ux-slider-button-right")}function s(t){return t.querySelector(".m-ux-slider-track, .m-ux-slider-track-grid, .m-ux-slider-track-distances-8")}function u(t){return t.children}function f(t){return 0!==t.offsetWidth}function d(t,e){const n=g(t).allDomElements;return n&&n.length>0?t.scrollLeft+n.length*n[0].offsetWidth*(e?1:-1):0}function a(t,e){return function(){t.scroll({left:d(t,e),behavior:"smooth"})}}function h(t,e,n){return function(){if(!t.offsetWidth)return;const i=function(t){return t.scrollWidth-t.scrollLeft-t.offsetWidth}(t);t.scrollLeft>20?e&&(e.classList.remove("m-ux-hide"),e.disabled=!1):e&&(e.classList.add("m-ux-hide"),e.disabled=!0),i>20?n&&(n.classList.remove("m-ux-hide"),n.disabled=!1):n&&(n.classList.add("m-ux-hide"),n.disabled=!0)}}function g(t){const e=u(t),n=(i=e.length,Math.round(t.scrollLeft/(t.scrollWidth/i)));var i;const r=function(e){return Math.floor(t.offsetWidth/(t.scrollWidth/e)+.2)}(e.length),o=n+r-1;return{indexOfFirst:n,allDomElements:Array.prototype.slice.call(e,n,o+1),amount:r}}function m(t,e){if(e.contains(t))return t.parentNode===e?t:m(t.parentNode,e)}function L(r,o){const s=l(r),u=c(r);if(!s||!u)return;const f=h(o,s,u);s.addEventListener("click",a(o)),u.addEventListener("click",a(o,!0)),window.addEventListener("resize",f),window.addEventListener("pageshow",f),o.addEventListener("scroll",f),f(),r.hasAttribute("data-slider-focus-reveal")&&o.addEventListener("focusin",l=>{const c=m(l.target,o);if(c){const l=function(r,o){const l=r.getBoundingClientRect(),c=o.getBoundingClientRect();return l.left>=c.left&&l.left<=c.right&&l.right<c.right?n:l.right>c.right?t:l.left<c.left?e:i}(c,r);l!==n&&setTimeout(()=>{o.scroll({left:d(o,l!==e),behavior:"smooth"})},0)}})}function E(t,e){const n=function(t){const e=t.querySelectorAll(".m-ux-slider-indicator");return Array.prototype.slice.call(e)}(t);let i=g(e);function r(){n.filter(function(t){return-1!==t.getAttribute("class").indexOf("m-ux-slider-indicator--active")}).forEach(function(t){t.classList.remove("m-ux-slider-indicator--active")}),function(){i=g(e);const t=n[i.indexOfFirst];t&&t.classList.add("m-ux-slider-indicator--active")}()}function o(){i=g(e),n.forEach(function(t){t.classList.remove("m-ux-hide")});let t=0;for(;++t<i.amount;)n[n.length-t].classList.add("m-ux-hide")}n.length&&(e.addEventListener("scroll",r),window.addEventListener("resize",function(){i.allDomElements[0]&&(e.scrollLeft=i.allDomElements[0].offsetLeft,o())}),o(),r())}function v(t){const e=s(t);e&&(L(t,e),E(t,e))}COLLAPSIBLE_WRAPPER=".MarkupCollapsible",this.init=function(t){const e=o(t);e.forEach(v),e.forEach(r)},this.triggerManageButtonVisibility=function(t){return function(){const e=function(t){const e=o(t);let n=null;for(let t=0;t<e.length;t++){const i=e[t];if(f(i)){n=i;break}}return n}(t);if(e){h(s(e),l(e),c(e))()}}}}const aSliderUX=new ASliderUX;aSliderUX.init(document);

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.