/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 107); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { module.exports = jQuery; /***/ }), /***/ 107: /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(41); /***/ }), /***/ 41: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_touch__ = __webpack_require__(71); __WEBPACK_IMPORTED_MODULE_1__foundation_util_touch__["a" /* Touch */].init(__WEBPACK_IMPORTED_MODULE_0_jquery___default.a); window.Foundation.Touch = __WEBPACK_IMPORTED_MODULE_1__foundation_util_touch__["a" /* Touch */]; /***/ }), /***/ 71: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Touch; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } //************************************************** //**Work inspired by multiple jquery swipe plugins** //**Done by Yohai Ararat *************************** //************************************************** var Touch = {}; var startPosX, startPosY, startTime, elapsedTime, isMoving = false; function onTouchEnd() { // alert(this); this.removeEventListener('touchmove', onTouchMove); this.removeEventListener('touchend', onTouchEnd); isMoving = false; } function onTouchMove(e) { if (__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.preventDefault) { e.preventDefault(); } if (isMoving) { var x = e.touches[0].pageX; var y = e.touches[0].pageY; var dx = startPosX - x; var dy = startPosY - y; var dir; elapsedTime = new Date().getTime() - startTime; if (Math.abs(dx) >= __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.moveThreshold && elapsedTime <= __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.timeThreshold) { dir = dx > 0 ? 'left' : 'right'; } // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) { // dir = dy > 0 ? 'down' : 'up'; // } if (dir) { e.preventDefault(); onTouchEnd.call(this); __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('swipe', dir).trigger('swipe' + dir); } } } function onTouchStart(e) { if (e.touches.length == 1) { startPosX = e.touches[0].pageX; startPosY = e.touches[0].pageY; isMoving = true; startTime = new Date().getTime(); this.addEventListener('touchmove', onTouchMove, false); this.addEventListener('touchend', onTouchEnd, false); } } function init() { this.addEventListener && this.addEventListener('touchstart', onTouchStart, false); } function teardown() { this.removeEventListener('touchstart', onTouchStart); } var SpotSwipe = function () { function SpotSwipe($) { _classCallCheck(this, SpotSwipe); this.version = '1.0.0'; this.enabled = 'ontouchstart' in document.documentElement; this.preventDefault = false; this.moveThreshold = 75; this.timeThreshold = 200; this.$ = $; this._init(); } _createClass(SpotSwipe, [{ key: '_init', value: function _init() { var $ = this.$; $.event.special.swipe = { setup: init }; $.each(['left', 'up', 'down', 'right'], function () { $.event.special['swipe' + this] = { setup: function () { $(this).on('swipe', $.noop); } }; }); } }]); return SpotSwipe; }(); /**************************************************** * As far as I can tell, both setupSpotSwipe and * * setupTouchHandler should be idempotent, * * because they directly replace functions & * * values, and do not add event handlers directly. * ****************************************************/ Touch.setupSpotSwipe = function ($) { $.spotSwipe = new SpotSwipe($); }; /**************************************************** * Method for adding pseudo drag events to elements * ***************************************************/ Touch.setupTouchHandler = function ($) { $.fn.addTouch = function () { this.each(function (i, el) { $(el).bind('touchstart touchmove touchend touchcancel', function () { //we pass the original event object because the jQuery event //object is normalized to w3c specs and does not provide the TouchList handleTouch(event); }); }); var handleTouch = function (event) { var touches = event.changedTouches, first = touches[0], eventTypes = { touchstart: 'mousedown', touchmove: 'mousemove', touchend: 'mouseup' }, type = eventTypes[event.type], simulatedEvent; if ('MouseEvent' in window && typeof window.MouseEvent === 'function') { simulatedEvent = new window.MouseEvent(type, { 'bubbles': true, 'cancelable': true, 'screenX': first.screenX, 'screenY': first.screenY, 'clientX': first.clientX, 'clientY': first.clientY }); } else { simulatedEvent = document.createEvent('MouseEvent'); simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 /*left*/, null); } first.target.dispatchEvent(simulatedEvent); }; }; }; Touch.init = function ($) { if (typeof $.spotSwipe === 'undefined') { Touch.setupSpotSwipe($); Touch.setupTouchHandler($); } }; /***/ }) /******/ });