/******/ (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 = 102); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { module.exports = jQuery; /***/ }), /***/ 1: /***/ (function(module, exports) { module.exports = {Foundation: window.Foundation}; /***/ }), /***/ 102: /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(36); /***/ }), /***/ 3: /***/ (function(module, exports) { module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend}; /***/ }), /***/ 36: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(66); __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].Keyboard = __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["a" /* Keyboard */]; /***/ }), /***/ 66: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Keyboard; }); /* 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_core__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__); /******************************************* * * * This util was created by Marius Olbertz * * Please thank Marius on GitHub /owlbertz * * or the web http://www.mariusolbertz.de/ * * * ******************************************/ var keyCodes = { 9: 'TAB', 13: 'ENTER', 27: 'ESCAPE', 32: 'SPACE', 35: 'END', 36: 'HOME', 37: 'ARROW_LEFT', 38: 'ARROW_UP', 39: 'ARROW_RIGHT', 40: 'ARROW_DOWN' }; var commands = {}; // Functions pulled out to be referenceable from internals function findFocusable($element) { if (!$element) { return false; } return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function () { if (!__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is(':visible') || __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).attr('tabindex') < 0) { return false; } //only have visible elements and those that have a tabindex greater or equal 0 return true; }); } function parseKey(event) { var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase(); // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events key = key.replace(/\W+/, ''); if (event.shiftKey) key = 'SHIFT_' + key; if (event.ctrlKey) key = 'CTRL_' + key; if (event.altKey) key = 'ALT_' + key; // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`) key = key.replace(/_$/, ''); return key; } var Keyboard = { keys: getKeyCodes(keyCodes), /** * Parses the (keyboard) event and returns a String that represents its key * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE * @param {Event} event - the event generated by the event handler * @return String key - String that represents the key pressed */ parseKey: parseKey, /** * Handles the given (keyboard) event * @param {Event} event - the event generated by the event handler * @param {String} component - Foundation component's name, e.g. Slider or Reveal * @param {Objects} functions - collection of functions that are to be executed */ handleKey: function (event, component, functions) { var commandList = commands[component], keyCode = this.parseKey(event), cmds, command, fn; if (!commandList) return console.warn('Component not defined!'); if (typeof commandList.ltr === 'undefined') { // this component does not differentiate between ltr and rtl cmds = commandList; // use plain list } else { // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__["rtl"])()) cmds = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, commandList.ltr, commandList.rtl);else cmds = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, commandList.rtl, commandList.ltr); } command = cmds[keyCode]; fn = functions[command]; if (fn && typeof fn === 'function') { // execute function if exists var returnValue = fn.apply(); if (functions.handled || typeof functions.handled === 'function') { // execute function when event was handled functions.handled(returnValue); } } else { if (functions.unhandled || typeof functions.unhandled === 'function') { // execute function when event was not handled functions.unhandled(); } } }, /** * Finds all focusable elements within the given `$element` * @param {jQuery} $element - jQuery object to search within * @return {jQuery} $focusable - all focusable elements within `$element` */ findFocusable: findFocusable, /** * Returns the component name name * @param {Object} component - Foundation component, e.g. Slider or Reveal * @return String componentName */ register: function (componentName, cmds) { commands[componentName] = cmds; }, // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context? // /** * Traps the focus in the given element. * @param {jQuery} $element jQuery object to trap the foucs into. */ trapFocus: function ($element) { var $focusable = findFocusable($element), $firstFocusable = $focusable.eq(0), $lastFocusable = $focusable.eq(-1); $element.on('keydown.zf.trapfocus', function (event) { if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') { event.preventDefault(); $firstFocusable.focus(); } else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') { event.preventDefault(); $lastFocusable.focus(); } }); }, /** * Releases the trapped focus from the given element. * @param {jQuery} $element jQuery object to release the focus for. */ releaseFocus: function ($element) { $element.off('keydown.zf.trapfocus'); } }; /* * Constants for easier comparing. * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE */ function getKeyCodes(kcs) { var k = {}; for (var kc in kcs) { k[kcs[kc]] = kcs[kc]; }return k; } /***/ }) /******/ });