{"size": 5855, "ext": "js", "max_stars_repo_path": "dist/js/swipr.js", "max_stars_repo_name": "robinpoort/swipr", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dist/js/swipr.js", "max_issues_repo_name": "robinpoort/swipr", "max_issues_repo_issues_event_min_datetime": "2018-06-13T13:02:43.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-28T11:58:29.000Z", "max_forks_repo_path": "dist/js/swipr.js", "max_forks_repo_name": "robinpoort/swipr", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 5855.0, "max_line_length": 5855, "alphanum_fraction": 0.7491033305}
!function(t,e){"function"==typeof define&&define.amd?define([],function(){return e(t)}):"object"==typeof exports?module.exports=e(t):t.swipr=e(t)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,function(p){"use strict";var f,m="querySelector"in document&&"addEventListener"in window&&"classList"in document.createElement("_"),v={wrapper:"[data-swipr-wrapper]",swiper:"[data-swipr]",startItem:"[data-swipr-start]",startItemPosition:"left",swiprPreviousButtonClass:"swipr-prev",swiprPreviousButtonContent:"previous",swiprNextButtonClass:"swipr-next",swiprNextButtonContent:"next",disabledButtonClass:"is-disabled",amount:.8,speed:400,initiatedClass:"is-initiated",enabledClass:"is-enabled",disableOnMobileTouch:!0};Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(this))return null;do{if(e.matches(t))return e;e=e.parentElement}while(null!==e);return null});var b=function(){var n={},s=!1,t=0;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(s=arguments[0],t++);for(var e=function(t){for(var e in t)t.hasOwnProperty(e)&&(s&&"[object Object]"===Object.prototype.toString.call(t[e])?n[e]=b(n[e],t[e]):n[e]=t[e])};t<arguments.length;t++){e(arguments[t])}return n};function h(t){for(var e=t.previousSibling;null!=e&&3===e.nodeType;)e=e.previousSibling;return e}function y(t){for(var e=t.nextSibling;null!=e&&3===e.nodeType;)e=e.nextSibling;return e}return function(t){var r,o,e,a={},l=function(t){r&&(h(t).classList.contains(r.swiprPreviousButtonClass)&&(h(t).style.display="none"),y(t).classList.contains(r.swiprNextButtonClass)&&(y(t).style.display="none"))},d=function(t){var e=h(t),n=y(t);0<t.scrollLeft?(e.classList.remove(r.disabledButtonClass),e.removeAttribute("disabled")):(e.disabled=!0,e.classList.add(r.disabledButtonClass)),t.scrollWidth-t.scrollLeft===t.offsetWidth?(n.disabled=!0,n.classList.add(r.disabledButtonClass)):(n.classList.remove(r.disabledButtonClass),n.removeAttribute("disabled"))};function c(t,e,n){var s=t.scrollLeft,i=e-s,o=0,r=function(){o+=20,t.scrollLeft=Math.easeInOutQuad(o,s,i,n),o<n&&setTimeout(r,20)};r()}function n(t,e){o=t.querySelector(r.swiper);var n,s=Math.round(t.offsetWidth*r.amount),i=o.scrollLeft;"prev"===e&&(n=i-s),"next"===e&&(n=i+s),c(o,n,r.speed)}a.runswipr=function(t){var o=b(r||v,t||{});!function(t,e,n){if("[object Object]"===Object.prototype.toString.call(t))for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.call(n,t[s],s,t);else for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t)}(document.querySelectorAll(o.swiper),function(t){var e,n;!function(t){if(r&&!function(t){for(var e=t.firstChild;null!=e&&3===e.nodeType;)e=e.nextSibling;return e}(t.parentNode).classList.contains(r.swiprPreviousButtonClass)){var e=document.createElement("button"),n=document.createElement("button");e.classList.add(r.swiprPreviousButtonClass),e.innerHTML=r.swiprPreviousButtonContent,e.setAttribute("type","button"),n.classList.add(r.swiprNextButtonClass),n.innerHTML=r.swiprNextButtonContent,n.setAttribute("type","button"),t.parentNode.insertBefore(e,t),t.parentNode.insertBefore(n,t.nextSibling),e.addEventListener("click",u,!1),n.addEventListener("click",u,!1)}}(t),l(t),t.parentNode.classList.add(o.initiatedClass),t.scrollWidth>t.clientWidth?(a.enable(t),e=t,!1!==(n=f)&&(e.style.marginBottom=-2*n+"px",e.style.paddingBottom=n+"px"),d(t)):a.disable(t);var s=t.querySelector(o.startItem);if(s){t.style.position="relative";var i=s.offsetLeft;"center"===o.startItemPosition&&(i=s.offsetLeft+s.offsetWidth/2-t.offsetWidth/2),"right"===o.startItemPosition&&(i=s.offsetLeft+s.offsetWidth-t.offsetWidth),c(t,i,r.speed)}})},Math.easeInOutQuad=function(t,e,n,s){return(t/=s/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e};var u=function(){var t=this.className;t===r.swiprPreviousButtonClass&&n(this.parentNode,"prev"),t===r.swiprNextButtonClass&&n(this.parentNode,"next")},s=function(){d(this)},i=function(){e||(e=setTimeout(function(){e=null,a.runswipr(t)},66))};return a.enable=function(t){var e;r&&(e=t,r&&(h(e).classList.contains(r.swiprPreviousButtonClass)&&h(e).removeAttribute("style"),y(e).classList.contains(r.swiprNextButtonClass)&&y(e).removeAttribute("style")),t.parentNode.classList.add(r.enabledClass),t.addEventListener("scroll",s,!1))},a.disable=function(t){r&&(l(t),t.parentNode.classList.remove(r.enabledClass),t.removeAttribute("style"))},a.destroy=function(){r&&(p.removeEventListener("resize",i,!1),function(t){if(r){var e=t.parentNode.getElementsByClassName(r.swiprPreviousButtonClass)[0],n=t.parentNode.getElementsByClassName(r.swiprNextButtonClass)[0];e.removeEventListener("click",u,!1),n.removeEventListener("click",u,!1),e.parentNode.removeChild(e),n.parentNode.removeChild(n)}}(o),o.parentNode.classList.remove(r.initiatedClass),o.parentNode.classList.remove(r.enabledClass),f=e=o=r=null)},a.init=function(t){var e;m&&(r=b(v,t||{}),"ontouchstart"in document.documentElement&&((e=navigator.userAgent).match(/Android/i)||e.match(/webOS/i)||e.match(/iPhone/i)||e.match(/iPod/i)||e.match(/iPad/i)||e.match(/Windows Phone/i)||e.match(/SymbianOS/i)||e.match(/RIM/i)||e.match(/BB/i))&&r.disableOnMobileTouch||(f=function(){var t=document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var e=t.offsetWidth;t.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",t.appendChild(n);var s=n.offsetWidth;return t.parentNode.removeChild(t),e!==s&&e-s}(),a.runswipr(t),p.addEventListener("resize",i,!1)))},a.init(t),a}});