{"version":3,"sources":["webpack:///webpack/bootstrap e1ce432564f371828215","webpack:///./js/util.js","webpack:///(webpack)/buildin/global.js","webpack:///./js/gallery.js","webpack:///./node_modules/swipejs/swipe.js"],"names":[],"mappings":"YACA,cAMA,IACA,iBAGA,mBACA,CACA,IACA,KAIA,2CAGA,aAGA,OACA,OAIA,IAzBA,eA4BA,MAGA,uBACA,GACA,kCACA,CACA,gBACA,cAGA,OAGA,iBACA,YACA,qBAA2B,UAA0B,UACrD,YAAiC,CAAe,QAChD,EAEA,aADA,QAIA,mBAAsD,wCAA+D,SAGrH,MAGA,4CC7DW,aAAU,EAAU,SAC3B,OAAO,GACV,iBAEW,aAAU,EAAU,SAC5B,OAAO,GAAG,MAAM,KAAK,EACxB,oBAQA,8DAdD,gBCAA,GAGA,GAAK,UACJ,OACA,KAFG,IAIJ,GAEC,GAAI,GAAK,SAAS,kBAAoB,CAAC,EAAE,MACzC,OAHD,CAGQ,QAEP,CAAqB,QAAlB,QAAO,UACT,EACD,OAID,CAEA,EAAiB,mHCnBjB,KAEA,CAAC,UACG,aAAG,YAAY,QAAQ,KACnB,IAA0C,CAAtC,aAAoB,mBAAS,OAEjC,UAAI,GAAS,YAEb,aAAI,EAAK,GAAI,GAAM,IACf,YACA,QACA,IACA,SACA,aACA,cACA,iBACA,4BAAiC,UAChC,CACD,gBAAgC,UAC/B,CAGL,IAAI,EAAM,YACV,kBAAI,KACA,IAAwB,CAApB,GAAG,eAAoB,EAAI,UAAU,OAAO,YAGhD,WAAI,GAAO,YAAmB,mBAC1B,EAAO,YAEX,qBAAK,iBAAiB,QAAmB,UACrC,CAGH,aAFG,mBACA,SAEJ,KAAK,iBAAiB,QAAmB,UACrC,OACA,mBACH,MACJ,EACJ,CACJ,EAvCD,mCCHA,QAUA;;;;;;EAAE,CAAgB,aAKd,CAAO,OAAI,UACT,UAAK,MACL,IAAO,EACR,KAHD,8BAaH,WAlBC,GAkBA,KAAM,UAIN,CAM0B,eAExB,CAEA,aAuWS,YACP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EAAO,EAAU,KAGtB,MAAK,EAAM,EAAI,GAGjB,GAAK,IACL,YAAK,EAAO,EAAM,GAAI,EAAS,EAAO,EACtC,WAAQ,EAAO,EAGf,KAAI,EAEF,cAAK,EAAO,EAAU,KACtB,KAAK,EAAO,EAAM,GAAK,GAGvB,MAAK,EAAS,IAGhB,GAAK,IACL,YAAK,EAAO,EAAM,GAAI,EAAS,EAAO,EACtC,WAAQ,EAAO,EAGjB,MAAY,IAIZ,SAAI,EAEF,cAAK,EAAO,EAAM,GAClB,MAAK,IACL,OAAK,EAAO,EAIZ,YAAK,EAAM,EACX,MAAK,IACL,OAAK,EAMX,SACE,QAAQ,oBACR,oBAAQ,oBACR,kBAAQ,oBAER,uBAAQ,oBACR,oBAAQ,oBAGX,iBAED,gBAAwB,WACtB,IAAI,GAAe,SAAS,EAAM,OAAO,aAAa,cACtD,IACE,SAAI,GAAS,EAAQ,cAErB,MAAiB,IAEpB,MAIH,SAGA,KAGA,IAEE,CAGA,cAAoB,aAClB,CACA,IACD,MAGD,OAAM,UACJ,CACA,IACD,GAGD,OAAM,UACJ,CACA,IACD,GAGD,EAGA,UAGA,OAGA,SAGA,UAGA,sBAAc,UAAa,CAAgB,QAG3C,EAIF,QAyWF,IA1tBI,GAAsB,QAAf,QAAO,OAAoB,KAAK,OAAS,MAAQ,MAChC,QAAV,YAAsB,EAA4B,eAGpE,KAAI,EAAY,EAEhB,SA+tBD,OAXM,EAAK,QAAU,EAClB,QAAU,WACR,GAAE,GAAG,MAAiB,WACpB,OAAO,MAAK,KAAK,UACf,GAAE,MAAM,KAAK,QAAa,MAAM,EAAE,MACnC,MACF,EACF,CAND,EAMI,EAAK,QAAU,EAGrB,QA1vBA","file":"gallery.bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e1ce432564f371828215","function $(selector, context = document) {\r\n return context.querySelector(selector);\r\n}\r\n\r\nfunction $$(selector, context = document) {\r\n return [].slice.call(context.querySelectorAll(selector));\r\n}\r\n\r\nfunction $id(id, context = document) {\r\n return context.getElementById(id);\r\n}\r\n\r\nfunction on(el, event, cb) {\r\n el.addEventListener(event, cb);\r\n}\r\n\r\nexport {\r\n $,\r\n $$,\r\n $id,\r\n on\r\n};\n\n\n// WEBPACK FOOTER //\n// ./js/util.js","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n// WEBPACK FOOTER //\n// (webpack)/buildin/global.js","import {$$, $} from './util';\r\nimport Swipe from 'swipejs/swipe';\r\n\r\n(function () {\r\n $$('.gallery').forEach(gallery => {\r\n if ($$('.slider__item', gallery).length < 2) return;\r\n\r\n let slider = $('.slider', gallery);\r\n\r\n let sw = new Swipe(slider, {\r\n startSlide: 0,\r\n speed: 400,\r\n auto: 3000,\r\n draggable: true,\r\n continuous: true,\r\n disableScroll: false,\r\n stopPropagation: false,\r\n callback: function (index, elem, dir) {\r\n },\r\n transitionEnd: function (index, elem) {\r\n }\r\n });\r\n\r\n let nav = $('.slider__nav', gallery);\r\n if (nav) {\r\n if (sw.getNumSlides() > 1) nav.classList.remove('hide');\r\n else return;\r\n\r\n let next = $('.slider__next', nav),\r\n prev = $('.slider__prev', nav);\r\n\r\n next.addEventListener('click', function (e) {\r\n event.preventDefault();\r\n sw.next();\r\n return false;\r\n });\r\n prev.addEventListener('click', function (e) {\r\n event.preventDefault();\r\n sw.prev();\r\n });\r\n }\r\n });\r\n})();\n\n\n// WEBPACK FOOTER //\n// ./js/gallery.js","/*!\n * Swipe 2.2.10\n *\n * Brad Birdsall\n * Copyright 2013, MIT License\n *\n*/\n\n// if the module has no dependencies, the above pattern can be simplified to\n// eslint-disable-next-line no-extra-semi\n;(function (root, factory) {\n // eslint-disable-next-line no-undef\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n // eslint-disable-next-line no-undef\n define([], function(){\n root.Swipe = factory();\n return root.Swipe;\n });\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals\n root.Swipe = factory();\n }\n}(this, function () {\n // Establish the root object, `window` (`self`) in the browser, `global`\n // on the server, or `this` in some virtual machines. We use `self`\n // instead of `window` for `WebWorker` support.\n var root = typeof self == 'object' && self.self === self && self ||\n typeof global == 'object' && global.global === global && global ||\n this;\n\n var _document = root.document;\n\n function Swipe(container, options) {\n\n 'use strict';\n\n options = options || {};\n\n // setup initial vars\n var start = {};\n var delta = {};\n var isScrolling;\n\n // setup auto slideshow\n var delay = options.auto || 0;\n var interval;\n\n var disabled = false;\n\n // utilities\n // simple no operation function\n var noop = function() {};\n // offload a functions execution\n var offloadFn = function(fn) { setTimeout(fn || noop, 0); };\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered.\n var throttle = function (fn, threshhold) {\n threshhold = threshhold || 100;\n var timeout = null;\n\n function cancel() {\n if (timeout) clearTimeout(timeout);\n }\n\n function throttledFn() {\n var context = this;\n var args = arguments;\n cancel();\n timeout = setTimeout(function() {\n timeout = null;\n fn.apply(context, args);\n }, threshhold);\n }\n\n // allow remove throttled timeout\n throttledFn.cancel = cancel;\n\n return throttledFn;\n };\n\n // check browser capabilities\n var browser = {\n addEventListener: !!root.addEventListener,\n // eslint-disable-next-line no-undef\n touch: ('ontouchstart' in root) || root.DocumentTouch && _document instanceof DocumentTouch,\n transitions: (function(temp) {\n var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];\n for ( var i in props ) {\n if (temp.style[ props[i] ] !== undefined){\n return true;\n }\n }\n return false;\n })(_document.createElement('swipe'))\n };\n\n // quit if no root element\n if (!container) return;\n\n var element = container.children[0];\n var slides, slidePos, width, length;\n var index = parseInt(options.startSlide, 10) || 0;\n var speed = options.speed || 300;\n options.continuous = options.continuous !== undefined ? options.continuous : true;\n\n // AutoRestart option: auto restart slideshow after user's touch event\n options.autoRestart = options.autoRestart !== undefined ? options.autoRestart : false;\n\n // throttled setup\n var throttledSetup = throttle(setup);\n\n // setup event capturing\n var events = {\n\n handleEvent: function(event) {\n if (disabled) return;\n\n switch (event.type) {\n case 'mousedown':\n case 'touchstart': this.start(event); break;\n case 'mousemove':\n case 'touchmove': this.move(event); break;\n case 'mouseup':\n case 'mouseleave':\n case 'touchend': this.end(event); break;\n case 'webkitTransitionEnd':\n case 'msTransitionEnd':\n case 'oTransitionEnd':\n case 'otransitionend':\n case 'transitionend': this.transitionEnd(event); break;\n case 'resize': throttledSetup(); break;\n }\n\n if (options.stopPropagation) {\n event.stopPropagation();\n }\n },\n\n start: function(event) {\n var touches;\n\n if (isMouseEvent(event)) {\n touches = event;\n event.preventDefault(); // For desktop Safari drag\n } else {\n touches = event.touches[0];\n }\n\n // measure start values\n start = {\n\n // get initial touch coords\n x: touches.pageX,\n y: touches.pageY,\n\n // store time to determine touch duration\n time: +new Date()\n\n };\n\n // used for testing first move event\n isScrolling = undefined;\n\n // reset delta and end measurements\n delta = {};\n\n // attach touchmove and touchend listeners\n if (isMouseEvent(event)) {\n element.addEventListener('mousemove', this, false);\n element.addEventListener('mouseup', this, false);\n element.addEventListener('mouseleave', this, false);\n } else {\n element.addEventListener('touchmove', this, false);\n element.addEventListener('touchend', this, false);\n }\n\n },\n\n move: function(event) {\n var touches;\n\n if (isMouseEvent(event)) {\n touches = event;\n } else {\n // ensure swiping with one touch and not pinching\n if ( event.touches.length > 1 || event.scale && event.scale !== 1) {\n return;\n }\n\n if (options.disableScroll) {\n event.preventDefault();\n }\n\n touches = event.touches[0];\n }\n\n // measure change in x and y\n delta = {\n x: touches.pageX - start.x,\n y: touches.pageY - start.y\n };\n\n // determine if scrolling test has run - one time test\n if ( typeof isScrolling === 'undefined') {\n isScrolling = !!( isScrolling || Math.abs(delta.x) < Math.abs(delta.y) );\n }\n\n // if user is not trying to scroll vertically\n if (!isScrolling) {\n\n // prevent native scrolling\n event.preventDefault();\n\n // stop slideshow\n stop();\n\n // increase resistance if first or last slide\n if (options.continuous) { // we don't add resistance at the end\n\n translate(circle(index-1), delta.x + slidePos[circle(index-1)], 0);\n translate(index, delta.x + slidePos[index], 0);\n translate(circle(index+1), delta.x + slidePos[circle(index+1)], 0);\n\n } else {\n\n delta.x =\n delta.x /\n ( (!index && delta.x > 0 || // if first slide and sliding left\n index === slides.length - 1 && // or if last slide and sliding right\n delta.x < 0 // and if sliding at all\n ) ?\n ( Math.abs(delta.x) / width + 1 ) // determine resistance level\n : 1 ); // no resistance if false\n\n // translate 1:1\n translate(index-1, delta.x + slidePos[index-1], 0);\n translate(index, delta.x + slidePos[index], 0);\n translate(index+1, delta.x + slidePos[index+1], 0);\n }\n }\n },\n\n end: function(event) {\n\n // measure duration\n var duration = +new Date() - start.time;\n\n // determine if slide attempt triggers next/prev slide\n var isValidSlide =\n Number(duration) < 250 && // if slide duration is less than 250ms\n Math.abs(delta.x) > 20 || // and if slide amt is greater than 20px\n Math.abs(delta.x) > width/2; // or if slide amt is greater than half the width\n\n // determine if slide attempt is past start and end\n var isPastBounds =\n !index && delta.x > 0 || // if first slide and slide amt is greater than 0\n index === slides.length - 1 && delta.x < 0; // or if last slide and slide amt is less than 0\n\n if (options.continuous) {\n isPastBounds = false;\n }\n\n // OLD determine direction of swipe (true:right, false:left)\n // determine direction of swipe (1: backward, -1: forward)\n var direction = Math.abs(delta.x) / delta.x;\n\n // if not scrolling vertically\n if (!isScrolling) {\n\n if (isValidSlide && !isPastBounds) {\n\n // if we're moving right\n if (direction < 0) {\n\n if (options.continuous) { // we need to get the next in this direction in place\n\n move(circle(index-1), -width, 0);\n move(circle(index+2), width, 0);\n\n } else {\n move(index-1, -width, 0);\n }\n\n move(index, slidePos[index]-width, speed);\n move(circle(index+1), slidePos[circle(index+1)]-width, speed);\n index = circle(index+1);\n\n } else {\n if (options.continuous) { // we need to get the next in this direction in place\n\n move(circle(index+1), width, 0);\n move(circle(index-2), -width, 0);\n\n } else {\n move(index+1, width, 0);\n }\n\n move(index, slidePos[index]+width, speed);\n move(circle(index-1), slidePos[circle(index-1)]+width, speed);\n index = circle(index-1);\n }\n\n runCallback(getPos(), slides[index], direction);\n\n } else {\n\n if (options.continuous) {\n\n move(circle(index-1), -width, speed);\n move(index, 0, speed);\n move(circle(index+1), width, speed);\n\n } else {\n\n move(index-1, -width, speed);\n move(index, 0, speed);\n move(index+1, width, speed);\n }\n }\n }\n\n // kill touchmove and touchend event listeners until touchstart called again\n if (isMouseEvent(event)) {\n element.removeEventListener('mousemove', events, false);\n element.removeEventListener('mouseup', events, false);\n element.removeEventListener('mouseleave', events, false);\n } else {\n element.removeEventListener('touchmove', events, false);\n element.removeEventListener('touchend', events, false);\n }\n\n },\n\n transitionEnd: function(event) {\n var currentIndex = parseInt(event.target.getAttribute('data-index'), 10);\n if (currentIndex === index) {\n if (delay || options.autoRestart) restart();\n\n runTransitionEnd(getPos(), slides[index]);\n }\n }\n };\n\n // trigger setup\n setup();\n\n // start auto slideshow if applicable\n begin();\n\n // Expose the Swipe API\n return {\n // initialize\n setup: setup,\n\n // go to slide\n slide: function(to, speed) {\n stop();\n slide(to, speed);\n },\n\n // move to previous\n prev: function() {\n stop();\n prev();\n },\n\n // move to next\n next: function() {\n stop();\n next();\n },\n\n // Restart slideshow\n restart: restart,\n\n // cancel slideshow\n stop: stop,\n\n // return current index position\n getPos: getPos,\n\n // disable slideshow\n disable: disable,\n\n // enable slideshow\n enable: enable,\n\n // return total number of slides\n getNumSlides: function() { return length; },\n\n // completely remove swipe\n kill: kill\n };\n\n // remove all event listeners\n function detachEvents() {\n if (browser.addEventListener) {\n // remove current event listeners\n element.removeEventListener('touchstart', events, false);\n element.removeEventListener('mousedown', events, false);\n element.removeEventListener('webkitTransitionEnd', events, false);\n element.removeEventListener('msTransitionEnd', events, false);\n element.removeEventListener('oTransitionEnd', events, false);\n element.removeEventListener('otransitionend', events, false);\n element.removeEventListener('transitionend', events, false);\n root.removeEventListener('resize', events, false);\n } else {\n root.onresize = null;\n }\n }\n\n // add event listeners\n function attachEvents() {\n if (browser.addEventListener) {\n\n // set touchstart event on element\n if (browser.touch) {\n element.addEventListener('touchstart', events, false);\n }\n\n if (options.draggable) {\n element.addEventListener('mousedown', events, false);\n }\n\n if (browser.transitions) {\n element.addEventListener('webkitTransitionEnd', events, false);\n element.addEventListener('msTransitionEnd', events, false);\n element.addEventListener('oTransitionEnd', events, false);\n element.addEventListener('otransitionend', events, false);\n element.addEventListener('transitionend', events, false);\n }\n\n // set resize event on window\n root.addEventListener('resize', events, false);\n\n } else {\n root.onresize = throttledSetup; // to play nice with old IE\n }\n }\n\n // clone nodes when there is only two slides\n function cloneNode(el) {\n var clone = el.cloneNode(true);\n element.appendChild(clone);\n\n // tag these slides as clones (to remove them on kill)\n clone.setAttribute('data-cloned', true);\n\n // Remove id from element\n clone.removeAttribute('id');\n }\n\n function setup() {\n // cache slides\n slides = element.children;\n length = slides.length;\n\n // slides length correction, minus cloned slides\n for (var i = 0; i < slides.length; i++) {\n if (slides[i].getAttribute('data-cloned')) length--;\n }\n\n // set continuous to false if only one slide\n if (slides.length < 2) {\n options.continuous = false;\n }\n\n // special case if two slides\n if (browser.transitions && options.continuous && slides.length < 3) {\n cloneNode(slides[0]);\n cloneNode(slides[1]);\n\n slides = element.children;\n }\n\n // create an array to store current positions of each slide\n slidePos = new Array(slides.length);\n\n // determine width of each slide\n width = container.getBoundingClientRect().width || container.offsetWidth;\n\n element.style.width = (slides.length * width * 2) + 'px';\n\n // stack elements\n var pos = slides.length;\n while(pos--) {\n var slide = slides[pos];\n\n slide.style.width = width + 'px';\n slide.setAttribute('data-index', pos);\n\n if (browser.transitions) {\n slide.style.left = (pos * -width) + 'px';\n move(pos, index > pos ? -width : (index < pos ? width : 0), 0);\n }\n }\n\n // reposition elements before and after index\n if (options.continuous && browser.transitions) {\n move(circle(index-1), -width, 0);\n move(circle(index+1), width, 0);\n }\n\n if (!browser.transitions) {\n element.style.left = (index * -width) + 'px';\n }\n\n container.style.visibility = 'visible';\n\n // reinitialize events\n detachEvents();\n attachEvents();\n }\n\n function prev() {\n if (disabled) return;\n\n if (options.continuous) {\n slide(index-1);\n } else if (index) {\n slide(index-1);\n }\n }\n\n function next() {\n if (disabled) return;\n\n if (options.continuous) {\n slide(index+1);\n } else if (index < slides.length - 1) {\n slide(index+1);\n }\n }\n\n function runCallback(pos, index, dir) {\n if (options.callback) {\n options.callback(pos, index, dir);\n }\n }\n\n function runTransitionEnd(pos, index) {\n if (options.transitionEnd) {\n options.transitionEnd(pos, index);\n }\n }\n\n function circle(index) {\n\n // a simple positive modulo using slides.length\n return (slides.length + (index % slides.length)) % slides.length;\n }\n\n function getPos() {\n // Fix for the clone issue in the event of 2 slides\n var currentIndex = index;\n\n if (currentIndex >= length) {\n currentIndex = currentIndex - length;\n }\n\n return currentIndex;\n }\n\n function slide(to, slideSpeed) {\n\n // ensure to is of type 'number'\n to = typeof to !== 'number' ? parseInt(to, 10) : to;\n\n // do nothing if already on requested slide\n if (index === to) return;\n\n if (browser.transitions) {\n\n var direction = Math.abs(index-to) / (index-to); // 1: backward, -1: forward\n\n // get the actual position of the slide\n if (options.continuous) {\n var natural_direction = direction;\n direction = -slidePos[circle(to)] / width;\n\n // if going forward but to < index, use to = slides.length + to\n // if going backward but to > index, use to = -slides.length + to\n if (direction !== natural_direction) {\n to = -direction * slides.length + to;\n }\n\n }\n\n var diff = Math.abs(index-to) - 1;\n\n // move all the slides between index and to in the right direction\n while (diff--) {\n move( circle((to > index ? to : index) - diff - 1), width * direction, 0);\n }\n\n to = circle(to);\n\n move(index, width * direction, slideSpeed || speed);\n move(to, 0, slideSpeed || speed);\n\n if (options.continuous) { // we need to get the next in place\n move(circle(to - direction), -(width * direction), 0);\n }\n\n } else {\n\n to = circle(to);\n animate(index * -width, to * -width, slideSpeed || speed);\n // no fallback for a circular continuous if the browser does not accept transitions\n }\n\n index = to;\n offloadFn(function() {\n runCallback(getPos(), slides[index], direction);\n });\n }\n\n function move(index, dist, speed) {\n translate(index, dist, speed);\n slidePos[index] = dist;\n }\n\n function translate(index, dist, speed) {\n\n var slide = slides[index];\n var style = slide && slide.style;\n\n if (!style) return;\n\n style.webkitTransitionDuration =\n style.MozTransitionDuration =\n style.msTransitionDuration =\n style.OTransitionDuration =\n style.transitionDuration = speed + 'ms';\n\n style.webkitTransform = 'translate(' + dist + 'px,0)' + 'translateZ(0)';\n style.msTransform =\n style.MozTransform =\n style.OTransform = 'translateX(' + dist + 'px)';\n\n }\n\n function animate(from, to, speed) {\n\n // if not an animation, just reposition\n if (!speed) {\n element.style.left = to + 'px';\n return;\n }\n\n var start = +new Date();\n\n var timer = setInterval(function() {\n var timeElap = +new Date() - start;\n\n if (timeElap > speed) {\n\n element.style.left = to + 'px';\n\n if (delay || options.autoRestart) restart();\n\n runTransitionEnd(getPos(), slides[index]);\n\n clearInterval(timer);\n\n return;\n }\n\n element.style.left = (( (to - from) * (Math.floor((timeElap / speed) * 100) / 100) ) + from) + 'px';\n }, 4);\n\n }\n\n function begin() {\n delay = options.auto || 0;\n if (delay) interval = setTimeout(next, delay);\n }\n\n function stop() {\n delay = 0;\n clearTimeout(interval);\n }\n\n function restart() {\n stop();\n begin();\n }\n\n function disable() {\n stop();\n disabled = true;\n }\n\n function enable() {\n disabled = false;\n restart();\n }\n\n function isMouseEvent(e) {\n return /^mouse/.test(e.type);\n }\n\n function kill() {\n // cancel slideshow\n stop();\n\n // remove inline styles\n container.style.visibility = '';\n\n // reset element\n element.style.width = '';\n element.style.left = '';\n\n // reset slides\n var pos = slides.length;\n while (pos--) {\n\n if (browser.transitions) {\n translate(pos, 0, 0);\n }\n\n var slide = slides[pos];\n\n // if the slide is tagged as clone, remove it\n if (slide.getAttribute('data-cloned')) {\n var _parent = slide.parentElement;\n _parent.removeChild(slide);\n }\n\n // remove styles\n slide.style.width = '';\n slide.style.left = '';\n\n slide.style.webkitTransitionDuration =\n slide.style.MozTransitionDuration =\n slide.style.msTransitionDuration =\n slide.style.OTransitionDuration =\n slide.style.transitionDuration = '';\n\n slide.style.webkitTransform =\n slide.style.msTransform =\n slide.style.MozTransform =\n slide.style.OTransform = '';\n\n // remove custom attributes (?)\n // slide.removeAttribute('data-index');\n }\n\n // remove all events\n detachEvents();\n\n // remove throttled function timeout\n throttledSetup.cancel();\n }\n }\n\n if ( root.jQuery || root.Zepto ) {\n (function($) {\n $.fn.Swipe = function(params) {\n return this.each(function() {\n $(this).data('Swipe', new Swipe($(this)[0], params));\n });\n };\n })( root.jQuery || root.Zepto );\n }\n\n return Swipe;\n}));\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/swipejs/swipe.js"],"sourceRoot":""}