PageSourceSearch

https://www.inlain.ch/assets/swipe/js/swipe.min.js?v=2.2.2

js inlain.ch collected 2026-09-24 12:23:28 UTC 6,793 bytes, 1 lines download raw bytes

1function Swipe(i,c){function O(){}var l=function(t){setTimeout(t||O,0)},v={addEventListener:!!window.addEventListener,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,transitions:function(t){var e,n=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(e in n)if(void 0!==t.style[n[e]])return!0;return!1}(document.createElement("swipe"))};if(i){var h,f,m,o,r,p=i.children[0],x=(c=c||{},parseInt(c.startSlide,10)||0),E=x,g=!1,w=c.speed||300,s=(c.continuous=void 0===c.continuous||c.continuous,{}),a={},b=c.auto||0,t=null,u={},d={},L={handleEvent:function(t){switch(t.type){case"touchstart":this.start(t);break;case"touchmove":this.move(t);break;case"touchend":l(this.end(t));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":l(this.transitionEnd(t));break;case"resize":l(D)}c.stopPropagation&&t.stopPropagation()},start:function(t){t=t.touches[0];u={x:t.pageX,y:t.pageY,time:+new Date},r=void 0,d={},p.addEventListener("touchmove",this,!1),p.addEventListener("touchend",this,!1)},move:function(t){var e;1<t.touches.length||t.scale&&1!==t.scale||(c.disableScroll&&t.preventDefault(),e=t.touches[0],d={x:e.pageX-u.x,y:e.pageY-u.y},r=void 0===r?!!(r||Math.abs(d.x)<Math.abs(d.y)):r)||(t.preventDefault(),q(),c.continuous?(I(A(x-1),d.x+f[A(x-1)],0),I(x,d.x+f[x],0),I(A(x+1),d.x+f[A(x+1)],0)):(d.x=d.x/(!x&&0<d.x||x==h.length-1&&d.x<0?Math.abs(d.x)/m+1:1),I(x-1,d.x+f[x-1],0),I(x,d.x+f[x],0),I(x+1,d.x+f[x+1],0)))},end:function(){var t=+new Date-u.time,t=Number(t)<250&&20<Math.abs(d.x)||Math.abs(d.x)>m/2,e=!x&&0<d.x||x==h.length-1&&d.x<0,n=(c.continuous&&(e=!1),d.x<0);r||(t&&!e?(x=n?(c.continuous?(C(A(x-1),-m,0),C(A(x+2),m,0)):C(x-1,-m,0),C(x,f[x]-m,w),C(A(x+1),f[A(x+1)]-m,w),A(x+1)):(c.continuous?(C(A(x+1),m,0),C(A(x-2),-m,0)):C(x+1,m,0),C(x,f[x]+m,w),C(A(x-1),f[A(x-1)]+m,w),A(x-1)),E=g?x%2:x,c.menu&&X(),c.callback&&c.callback(E,h[x])):c.continuous?(C(A(x-1),-m,w),C(x,0,w),C(A(x+1),m,w)):(C(x-1,-m,w),C(x,0,w),C(x+1,m,w))),p.removeEventListener("touchmove",L,!1),p.removeEventListener("touchend",L,!1)},transitionEnd:function(t){parseInt(t.target.getAttribute("data-index"),10)==x&&(b&&P(),c.transitionEnd)&&c.transitionEnd.call(t,E,h[x])}};if(D(),c.menu){var e=c.menu.querySelector(".slider-prev"),n=c.menu.querySelector(".slider-next"),T=c.menu.querySelector(".slider-menu");if(e&&(a.prev=function(t){S(t),q(),W()},s.prev=e,M(s.prev,"click",a.prev)),n&&(a.next=function(t){S(t),q(),z()},s.next=n,M(s.next,"click",a.next)),T){for(var y=0;y<o;y++){var k=document.createElement("b");k.innerHTML="•",k.setAttribute("data-index",y.toString()),y==E&&(k.className="active"),M(k,"click",function(e){return function(t){S(t),q(),N(parseInt(this.getAttribute?this.getAttribute("data-index"):e.attributes["data-index"].nodeValue))}}(k)),T.appendChild(k)}s.dots=T}}return Y(),b&&P(),v.addEventListener?(v.touch&&p.addEventListener("touchstart",L,!1),v.transitions&&(p.addEventListener("webkitTransitionEnd",L,!1),p.addEventListener("msTransitionEnd",L,!1),p.addEventListener("oTransitionEnd",L,!1),p.addEventListener("otransitionend",L,!1),p.addEventListener("transitionend",L,!1)),window.addEventListener("resize",L,!1)):window.onresize=function(){D()},{setup:function(){D()},slide:function(t,e){q(),N(t,e)},prev:function(){q(),W()},next:function(){q(),z()},stop:function(){q()},getPos:function(){return E},getNumSlides:function(){return o},kill:function(){q(),p.style.width="",p.style.left="";for(var t=h.length;t--;){var e=h[t];e.style.width="",e.style.left="",v.transitions&&I(t,0,0)}v.addEventListener?(p.removeEventListener("touchstart",L,!1),p.removeEventListener("mousedown",L,!1),p.removeEventListener("webkitTransitionEnd",L,!1),p.removeEventListener("msTransitionEnd",L,!1),p.removeEventListener("oTransitionEnd",L,!1),p.removeEventListener("otransitionend",L,!1),p.removeEventListener("transitionend",L,!1),window.removeEventListener("resize",L,!1)):window.onresize=null;for(var n=s.dots.childNodes;0<n.length;)s.dots.removeChild(n[0]);V(s.prev,"click",a.prev),V(s.next,"click",a.next)}}}function D(){h=p.children;for(var t=0;t<h.length;t++)8==h[t].nodeType&&(p.removeChild(h[t]),--t);o=h.length,h.length<2&&(c.continuous=!1),v.transitions&&c.continuous&&h.length<3&&(p.appendChild(h[0].cloneNode(!0)),p.appendChild(p.children[1].cloneNode(!0)),h=p.children,g=!0),f=new Array(h.length),m=i.getBoundingClientRect().width||i.offsetWidth,p.style.width=h.length*m+"px";for(var e=h.length;e--;){var n=h[e];n.style.width=m+"px",n.setAttribute("data-index",e.toString()),v.transitions&&(n.style.left=e*-m+"px",C(e,e<x?-m:x<e?m:0,0))}
1c.continuous&&v.transitions&&(C(A(x-1),-m,0),C(A(x+1),m,0)),v.transitions||(p.style.left=x*-m+"px"),i.style.visibility="visible"}function M(t,e,n){v.addEventListener?t.addEventListener(e,n,!1):window.attachEvent&&t.attachEvent("on"+e,n)}function S(t){t.returnValue=!1,t.preventDefault&&t.preventDefault()}function V(t,e,n){v.addEventListener?t.removeEventListener(e,n,!1):window.detachEvent&&t.detachEvent("on"+e,n)}function X(){for(var t=0;t<s.dots.children.length;t++){var e=s.dots.children[t];e.className=parseInt(e.getAttribute?e.getAttribute("data-index"):e.attributes["data-index"].nodeValue)==E?"active":""}}function W(){(c.continuous||x)&&N(x-1)}function z(){(c.continuous||x<h.length-1)&&N(x+1)}function Y(){i.classList.toggle("slider-start",0===x),i.classList.toggle("slider-end",x===h.length-1),c.menu&&(c.menu.classList.toggle("slider-start",0===x),c.menu.classList.toggle("slider-end",x===h.length-1))}function A(t){return(h.length+t%h.length)%h.length}function N(t,e){if(x!=t){if(v.transitions){for(var n,i=Math.abs(x-t)/(x-t),o=(c.continuous&&(n=i,(i=-f[A(t)]/m)!==n)&&(t=-i*h.length+t),Math.abs(x-t)-1);o--;)C(A((x<t?t:x)-o-1),m*i,0);t=A(t),C(x,m*i,e||w),C(t,0,e||w),c.continuous&&C(A(t-i),-m*i,0)}else t=A(t),r=x*-m,s=t*-m,(a=e||w)?(u=+new Date,d=setInterval(function(){var t=+new Date-u;a<t?(p.style.left=s+"px",b&&P(),c.transitionEnd&&c.transitionEnd.call(event,E,h[x]),clearInterval(d)):p.style.left=(s-r)*(Math.floor(t/a*100)/100)+r+"px"},4)):p.style.left=s+"px";var r,s,a,u,d;x=t,E=g?x%2:x,c.menu&&X(),Y(),l(c.callback&&c.callback(E,h[x]))}}function C(t,e,n){I(t,e,n),f[t]=e}function I(t,e,n){t=h[t],t=t&&t.style;t&&(t.webkitTransitionDuration=t.MozTransitionDuration=t.msTransitionDuration=t.OTransitionDuration=t.transitionDuration=n+"ms",t.webkitTransform="translate("+e+"px,0)translateZ(0)",t.msTransform=t.MozTransform=t.OTransform="translateX("+e+"px)")}function P(){null!==t&&clearTimeout(t),t=setTimeout(function(){t=null,z()},b)}function q(){b=0,clearTimeout(t)}}"undefined"!=typeof exports&&((exports="undefined"!=typeof module&&module.exports?module.exports=Swipe:exports).Swipe=Swipe);

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.