1"use strict"; 2 3function _typeof2(o) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof2(o); } 4(function webpackUniversalModuleDefinition(root, factory) { 5 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("jquery"));else if (typeof define === 'function' && define.amd) define(["jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.core"] = factory(require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.core"] = factory(root["jQuery"]); 6})(window, function (__WEBPACK_EXTERNAL_MODULE_jquery__) { 7 return /******/function (modules) { 8 // webpackBootstrap 9 /******/ // The module cache 10 /******/ 11 var installedModules = {}; 12 /******/ 13 /******/ // The require function 14 /******/ 15 function __webpack_require__(moduleId) { 16 /******/ 17 /******/ // Check if module is in cache 18 /******/if (installedModules[moduleId]) { 19 /******/return installedModules[moduleId].exports; 20 /******/ 21 } 22 /******/ // Create a new module (and put it into the cache) 23 /******/ 24 var module = installedModules[moduleId] = { 25 /******/i: moduleId, 26 /******/l: false, 27 /******/exports: {} 28 /******/ 29 }; 30 /******/ 31 /******/ // Execute the module function 32 /******/ 33 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 34 /******/ 35 /******/ // Flag the module as loaded 36 /******/ 37 module.l = true; 38 /******/ 39 /******/ // Return the exports of the module 40 /******/ 41 return module.exports; 42 /******/ 43 } 44 /******/ 45 /******/ 46 /******/ // expose the modules object (__webpack_modules__) 47 /******/ 48 __webpack_require__.m = modules; 49 /******/ 50 /******/ // expose the module cache 51 /******/ 52 __webpack_require__.c = installedModules; 53 /******/ 54 /******/ // define getter function for harmony exports 55 /******/ 56 __webpack_require__.d = function (exports, name, getter) { 57 /******/if (!__webpack_require__.o(exports, name)) { 58 /******/Object.defineProperty(exports, name, { 59 enumerable: true, 60 get: getter 61 }); 62 /******/ 63 } 64 /******/ 65 }; 66 /******/ 67 /******/ // define __esModule on exports 68 /******/ 69 __webpack_require__.r = function (exports) { 70 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 71 /******/Object.defineProperty(exports, Symbol.toStringTag, { 72 value: 'Module' 73 }); 74 /******/ 75 } 76 /******/ 77 Object.defineProperty(exports, '__esModule', { 78 value: true 79 }); 80 /******/ 81 }; 82 /******/ 83 /******/ // create a fake namespace object 84 /******/ // mode & 1: value is a module id, require it 85 /******/ // mode & 2: merge all properties of value into the ns 86 /******/ // mode & 4: return value when already ns object 87 /******/ // mode & 8|1: behave like require 88 /******/ 89 __webpack_require__.t = function (value, mode) { 90 /******/if (mode & 1) value = __webpack_require__(value); 91 /******/ 92 if (mode & 8) return value; 93 /******/ 94 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value; 95 /******/ 96 var ns = Object.create(null); 97 /******/ 98 __webpack_require__.r(ns); 99 /******/ 100 Object.defineProperty(ns, 'default', { 101 enumerable: true, 102 value: value 103 }); 104 /******/ 105 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 106 return value[key]; 107 }.bind(null, key)); 108 /******/ 109 return ns; 110 /******/ 111 }; 112 /******/ 113 /******/ // getDefaultExport function for compatibility with non-harmony modules 114 /******/ 115 __webpack_require__.n = function (module) {
116 /******/var getter = module && module.__esModule ? /******/function getDefault() { 117 return module['default']; 118 } : /******/function getModuleExports() { 119 return module; 120 }; 121 /******/ 122 __webpack_require__.d(getter, 'a', getter); 123 /******/ 124 return getter; 125 /******/ 126 }; 127 /******/ 128 /******/ // Object.prototype.hasOwnProperty.call 129 /******/ 130 __webpack_require__.o = function (object, property) { 131 return Object.prototype.hasOwnProperty.call(object, property); 132 }; 133 /******/ 134 /******/ // __webpack_public_path__ 135 /******/ 136 __webpack_require__.p = ""; 137 /******/ 138 /******/ 139 /******/ // Load entry module and return exports 140 /******/ 141 return __webpack_require__(__webpack_require__.s = 0); 142 /******/ 143 } 144 /************************************************************************/ 145 /******/({ 146
146/***/"./js/entries/plugins/foundation.core.js": ( 147 /*!***********************************************!*\ 148 !*** ./js/entries/plugins/foundation.core.js ***! 149 \***********************************************/ 150 /*! exports provided: Foundation, Plugin, rtl, GetYoDigits, RegExpEscape, transitionend, onLoad, ignoreMousedisappear */ 151 /***/ 152 function _js_entries_plugins_foundationCoreJs(module, __webpack_exports__, __webpack_require__) { 153 "use strict"; 154 155 __webpack_require__.r(__webpack_exports__); 156 /* harmony import */ 157 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 158 /* harmony import */ 159 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 160 /* harmony import */ 161 var _foundation_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.core */"./js/foundation.core.js"); 162 /* harmony reexport (safe) */ 163 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 164 return _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"]; 165 }); 166 167 /* harmony import */ 168 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../foundation.core.plugin */"./js/foundation.core.plugin.js"); 169 /* harmony import */ 170 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../foundation.core.utils */"./js/foundation.core.utils.js"); 171 /* harmony reexport (safe) */ 172 __webpack_require__.d(__webpack_exports__, "Plugin", function () { 173 return _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]; 174 }); 175 176 /* harmony reexport (safe) */ 177 __webpack_require__.d(__webpack_exports__, "rtl", function () { 178 return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["rtl"]; 179 }); 180 181 /* harmony reexport (safe) */ 182 __webpack_require__.d(__webpack_exports__, "GetYoDigits", function () { 183 return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"]; 184 }); 185 186 /* harmony reexport (safe) */ 187 __webpack_require__.d(__webpack_exports__, "RegExpEscape", function () { 188 return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["RegExpEscape"]; 189 }); 190 191 /* harmony reexport (safe) */ 192 __webpack_require__.d(__webpack_exports__, "transitionend", function () { 193 return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["transitionend"]; 194 }); 195 196 /* harmony reexport (safe) */ 197 __webpack_require__.d(__webpack_exports__, "onLoad", function () { 198 return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["onLoad"]; 199 }); 200 201 /* harmony reexport (safe) */ 202 __webpack_require__.d(__webpack_exports__, "ignoreMousedisappear", function () { 203 return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["ignoreMousedisappear"]; 204 }); 205 206 // --- Foundation Core API --- 207 // Initialize Foundation and add some utilities to its public API for backward compatibility. 208 // Please note that every utility do not have to be added to the core API. 209 210 _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].addToJquery(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); // Every plugin depends on plugin now, we can include that on the core for the 211 // script inclusion path. 212 213 _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Plugin = _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]; // These are now separated out, but historically were a part of this module, 214 // and since this is here for backwards compatibility we include them in 215 // this entry. 216 217 _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].rtl = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["rtl"]; 218 _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].GetYoDigits = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"]; 219 _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].transitionend = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["transitionend"]; 220 _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].RegExpEscape = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["RegExpEscape"]; 221 _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].onLoad = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["onLoad"]; 222 window.Foundation = _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"]; // --- Foundation Core exports --- 223 // Export "Plugin" and all core utilities, since the `foundation.core` entry plays the role of 224 // all core source files. 225 226 /***/ 227 }), 228
228/***/"./js/foundation.core.js": ( 229 /*!*******************************!*\ 230 !*** ./js/foundation.core.js ***! 231 \*******************************/ 232 /*! exports provided: Foundation */ 233 /***/ 234 function _js_foundationCoreJs(module, __webpack_exports__, __webpack_require__) { 235 "use strict"; 236 237 __webpack_require__.r(__webpack_exports__); 238 /* harmony export (binding) */ 239 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 240 return Foundation; 241 }); 242 /* harmony import */ 243 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 244 /* harmony import */ 245 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 246 /* harmony import */ 247 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */"./js/foundation.core.utils.js"); 248 /* harmony import */ 249 var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */"./js/foundation.util.mediaQuery.js"); 250 function _typeof(obj) { 251 "@babel/helpers - typeof"; 252 253 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 254 _typeof = function _typeof(obj) { 255 return typeof obj; 256 }; 257 } else { 258 _typeof = function _typeof(obj) { 259 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 260 }; 261 } 262 return _typeof(obj); 263 } 264 var FOUNDATION_VERSION = '6.7.5'; // Global Foundation object 265 // This is attached to the window, or used as a module for AMD/Browserify 266 267 var Foundation = { 268 version: FOUNDATION_VERSION, 269 /** 270 * Stores initialized plugins. 271 */ 272 _plugins: {}, 273 /** 274 * Stores generated unique ids for plugin instances 275 */ 276 _uuids: [], 277 /** 278 * Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing. 279 * @param {Object} plugin - The constructor of the plugin. 280 */ 281 plugin: function plugin(_plugin, name) { 282 // Object key to use when adding to global Foundation object 283 // Examples: Foundation.Reveal, Foundation.OffCanvas 284 var className = name || functionName(_plugin); // Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin 285 // Examples: data-reveal, data-off-canvas 286 287 var attrName = hyphenate(className); // Add to the Foundation object and the plugins list (for reflowing) 288 289 this._plugins[attrName] = this[className] = _plugin; 290 }, 291 /** 292 * @function 293 * Populates the _uuids array with pointers to each individual plugin instance. 294 * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls. 295 * Also fires the initialization event for each plugin, consolidating repetitive code. 296 * @param {Object} plugin - an instance of a plugin, usually `this` in context. 297 * @param {String} name - the name of the plugin, passed as a camelCased string. 298 * @fires Plugin#init 299 */ 300 registerPlugin: function registerPlugin(plugin, name) { 301 var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase(); 302 plugin.uuid = Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, pluginName); 303 if (!plugin.$element.attr("data-".concat(pluginName))) { 304 plugin.$element.attr("data-".concat(pluginName), plugin.uuid); 305 } 306 if (!plugin.$element.data('zfPlugin')) { 307 plugin.$element.data('zfPlugin', plugin); 308 } 309 /** 310 * Fires when the plugin has initialized. 311 * @event Plugin#init 312 */ 313 314 plugin.$element.trigger("init.zf.".concat(pluginName)); 315 this._uuids.push(plugin.uuid); 316 return; 317 }, 318 /** 319 * @function 320 * Removes the plugins uuid from the _uuids array.
vendor: 11,656 bytes, lines 321-580
321 * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute. 322 * Also fires the destroyed event for the plugin, consolidating repetitive code. 323 * @param {Object} plugin - an instance of a plugin, usually `this` in context. 324 * @fires Plugin#destroyed 325 */ 326 unregisterPlugin: function unregisterPlugin(plugin) { 327 var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor)); 328 this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1); 329 plugin.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin') 330 /** 331 * Fires when the plugin has been destroyed. 332 * @event Plugin#destroyed 333 */.trigger("destroyed.zf.".concat(pluginName)); 334 for (var prop in plugin) { 335 if (typeof plugin[prop] === 'function') { 336 plugin[prop] = null; //clean up script to prep for garbage collection. 337 } 338 } 339 return; 340 }, 341 /** 342 * @function 343 * Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc. 344 * @param {String} plugins - optional string of an individual plugin key, attained by calling `$(element).data('pluginName')`, or string of a plugin class i.e. `'dropdown'` 345 * @default If no argument is passed, reflow all currently active plugins. 346 */ 347 reInit: function reInit(plugins) { 348 var isJQ = plugins instanceof jquery__WEBPACK_IMPORTED_MODULE_0___default.a; 349 try { 350 if (isJQ) { 351 plugins.each(function () { 352 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('zfPlugin')._init(); 353 }); 354 } else { 355 var type = _typeof(plugins), 356 _this = this, 357 fns = { 358 'object': function object(plgs) { 359 plgs.forEach(function (p) { 360 p = hyphenate(p); 361 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + p + ']').foundation('_init'); 362 }); 363 }, 364 'string': function string() { 365 plugins = hyphenate(plugins); 366 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + plugins + ']').foundation('_init'); 367 }, 368 'undefined': function undefined() { 369 this.object(Object.keys(_this._plugins)); 370 } 371 }; 372 fns[type](plugins); 373 } 374 } catch (err) { 375 console.error(err); 376 } finally { 377 return plugins; 378 } 379 }, 380 /** 381 * Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized. 382 * @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object. 383 * @param {String|Array} plugins - A list of plugins to initialize. Leave this out to initialize everything. 384 */ 385 reflow: function reflow(elem, plugins) { 386 // If plugins is undefined, just grab everything 387 if (typeof plugins === 'undefined') { 388 plugins = Object.keys(this._plugins); 389 } // If plugins is a string, convert it to an array with one item 390 else if (typeof plugins === 'string') { 391 plugins = [plugins]; 392 } 393 var _this = this; // Iterate through each plugin 394 395 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(plugins, function (i, name) { 396 // Get the current plugin 397 var plugin = _this._plugins[name]; // Localize the search to all elements inside elem, as well as elem itself, unless elem === document 398 399 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(elem).find('[data-' + name + ']').addBack('[data-' + name + ']').filter(function () { 400 return typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data("zfPlugin") === 'undefined'; 401 }); // For each plugin found, initialize it 402 403 $elem.each(function () { 404 var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 405 opts = { 406 reflow: true 407 }; 408 if ($el.attr('data-options')) { 409 $el.attr('data-options').split(';').forEach(function (option) { 410 var opt = option.split(':').map(function (el) { 411 return el.trim(); 412 }); 413 if (opt[0]) opts[opt[0]] = parseValue(opt[1]); 414 }); 415 } 416 try { 417 $el.data('zfPlugin', new plugin(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), opts)); 418 } catch (er) { 419 console.error(er); 420 } finally { 421 return; 422 } 423 }); 424 }); 425 }, 426 getFnName: functionName, 427 addToJquery: function addToJquery() { 428 // TODO: consider not making this a jQuery function 429 // TODO: need way to reflow vs. re-initialize 430 431 /** 432 * The Foundation jQuery method. 433 * @param {String|Array} method - An action to perform on the current jQuery object. 434 */ 435 var foundation = function foundation(method) { 436 var type = _typeof(method), 437 $noJS = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.no-js'); 438 if ($noJS.length) { 439 $noJS.removeClass('no-js'); 440 } 441 if (type === 'undefined') { 442 //needs to initialize the Foundation object, or an individual plugin. 443 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init(); 444 Foundation.reflow(this); 445 } else if (type === 'string') { 446 //an individual method to invoke on a plugin or group of plugins 447 var args = Array.prototype.slice.call(arguments, 1); //collect all the arguments, if necessary 448 449 var plugClass = this.data('zfPlugin'); //determine the class of plugin 450 451 if (typeof plugClass !== 'undefined' && typeof plugClass[method] !== 'undefined') { 452 //make sure both the class and method exist 453 if (this.length === 1) { 454 //if there's only one, call it directly. 455 plugClass[method].apply(plugClass, args); 456 } else { 457 this.each(function (i, el) { 458 //otherwise loop through the jQuery collection and invoke the method on each 459 plugClass[method].apply(jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).data('zfPlugin'), args); 460 }); 461 } 462 } else { 463 //error for no class or no method 464 throw new ReferenceError("We're sorry, '" + method + "' is not an available method for " + (plugClass ? functionName(plugClass) : 'this element') + '.'); 465 } 466 } else { 467 //error for invalid argument type 468 throw new TypeError("We're sorry, ".concat(type, " is not a valid parameter. You must use a string representing the method you wish to invoke.")); 469 } 470 return this; 471 }; 472 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.fn.foundation = foundation; 473 return jquery__WEBPACK_IMPORTED_MODULE_0___default.a; 474 } 475 }; 476 Foundation.util = { 477 /** 478 * Function for applying a debounce effect to a function call. 479 * @function 480 * @param {Function} func - Function to be called at end of timeout. 481 * @param {Number} delay - Time in ms to delay the call of `func`. 482 * @returns function 483 */ 484 throttle: function throttle(func, delay) { 485 var timer = null; 486 return function () { 487 var context = this, 488 args = arguments; 489 if (timer === null) { 490 timer = setTimeout(function () { 491 func.apply(context, args); 492 timer = null; 493 }, delay); 494 } 495 }; 496 } 497 }; 498 window.Foundation = Foundation; // Polyfill for requestAnimationFrame 499 500 (function () { 501 if (!Date.now || !window.Date.now) window.Date.now = Date.now = function () { 502 return new Date().getTime(); 503 }; 504 var vendors = ['webkit', 'moz']; 505 for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) { 506 var vp = vendors[i]; 507 window.requestAnimationFrame = window[vp + 'RequestAnimationFrame']; 508 window.cancelAnimationFrame = window[vp + 'CancelAnimationFrame'] || window[vp + 'CancelRequestAnimationFrame']; 509 } 510 if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) { 511 var lastTime = 0; 512 window.requestAnimationFrame = function (callback) { 513 var now = Date.now(); 514 var nextTime = Math.max(lastTime + 16, now); 515 return setTimeout(function () { 516 callback(lastTime = nextTime); 517 }, nextTime - now); 518 }; 519 window.cancelAnimationFrame = clearTimeout; 520 } 521 /** 522 * Polyfill for performance.now, required by rAF 523 */ 524 525 if (!window.performance || !window.performance.now) { 526 window.performance = { 527 start: Date.now(), 528 now: function now() { 529 return Date.now() - this.start; 530 } 531 }; 532 } 533 })(); 534 if (!Function.prototype.bind) { 535 /* eslint-disable no-extend-native */ 536 Function.prototype.bind = function (oThis) { 537 if (typeof this !== 'function') { 538 // closest thing possible to the ECMAScript 5 539 // internal IsCallable function 540 throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); 541 } 542 var aArgs = Array.prototype.slice.call(arguments, 1), 543 fToBind = this, 544 fNOP = function fNOP() {}, 545 fBound = function fBound() { 546 return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); 547 }; 548 if (this.prototype) { 549 // native functions don't have a prototype 550 fNOP.prototype = this.prototype; 551 } 552 fBound.prototype = new fNOP(); 553 return fBound; 554 }; 555 } // Polyfill to get the name of a function in IE9 556 557 function functionName(fn) { 558 if (typeof Function.prototype.name === 'undefined') { 559 var funcNameRegex = /function\s([^(]{1,})\(/; 560 var results = funcNameRegex.exec(fn.toString()); 561 return results && results.length > 1 ? results[1].trim() : ""; 562 } else if (typeof fn.prototype === 'undefined') { 563 return fn.constructor.name; 564 } else { 565 return fn.prototype.constructor.name; 566 } 567 } 568 function parseValue(str) { 569 if ('true' === str) return true;else if ('false' === str) return false;else if (!isNaN(str * 1)) return parseFloat(str); 570 return str; 571 } // Convert PascalCase to kebab-case 572 // Thank you: http://stackoverflow.com/a/8955580 573 574 function hyphenate(str) { 575 return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); 576 } 577 578 /***/ 579 }), 580
580/***/"./js/foundation.core.plugin.js": ( 581 /*!**************************************!*\ 582 !*** ./js/foundation.core.plugin.js ***! 583 \**************************************/ 584 /*! exports provided: Plugin */ 585 /***/ 586 function _js_foundationCorePluginJs(module, __webpack_exports__, __webpack_require__) { 587 "use strict"; 588 589 __webpack_require__.r(__webpack_exports__); 590 /* harmony export (binding) */ 591 __webpack_require__.d(__webpack_exports__, "Plugin", function () { 592 return Plugin; 593 }); 594 /* harmony import */ 595 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core.utils */"./js/foundation.core.utils.js"); 596 function _classCallCheck(instance, Constructor) { 597 if (!(instance instanceof Constructor)) { 598 throw new TypeError("Cannot call a class as a function"); 599 } 600 } 601 function _defineProperties(target, props) { 602 for (var i = 0; i < props.length; i++) { 603 var descriptor = props[i]; 604 descriptor.enumerable = descriptor.enumerable || false; 605 descriptor.configurable = true; 606 if ("value" in descriptor) descriptor.writable = true; 607 Object.defineProperty(target, descriptor.key, descriptor); 608 } 609 } 610 function _createClass(Constructor, protoProps, staticProps) { 611 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 612 if (staticProps) _defineProperties(Constructor, staticProps); 613 return Constructor; 614 } 615 616 // Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST 617 // {function} _setup (replaces previous constructor), 618 // {function} _destroy (replaces previous destroy) 619 620 var Plugin = /*#__PURE__*/function () { 621 function Plugin(element, options) { 622 _classCallCheck(this, Plugin); 623 this._setup(element, options); 624 var pluginName = getPluginName(this); 625 this.uuid = Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_0__["GetYoDigits"])(6, pluginName); 626 if (!this.$element.attr("data-".concat(pluginName))) { 627 this.$element.attr("data-".concat(pluginName), this.uuid); 628 } 629 if (!this.$element.data('zfPlugin')) { 630 this.$element.data('zfPlugin', this); 631 } 632 /** 633 * Fires when the plugin has initialized. 634 * @event Plugin#init 635 */ 636 637 this.$element.trigger("init.zf.".concat(pluginName)); 638 } 639 _createClass(Plugin, [{ 640 key: "destroy", 641 value: function destroy() { 642 this._destroy(); 643 var pluginName = getPluginName(this); 644 this.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin') 645 /** 646 * Fires when the plugin has been destroyed. 647 * @event Plugin#destroyed 648 */.trigger("destroyed.zf.".concat(pluginName)); 649 for (var prop in this) { 650 if (this.hasOwnProperty(prop)) { 651 this[prop] = null; //clean up script to prep for garbage collection. 652 } 653 } 654 } 655 }]); 656 return Plugin; 657 }(); // Convert PascalCase to kebab-case 658 // Thank you: http://stackoverflow.com/a/8955580 659 660 function hyphenate(str) { 661 return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); 662 } 663 function getPluginName(obj) { 664 return hyphenate(obj.className); 665 } 666 667 /***/ 668 }), 669
vendor: 5,947 bytes, lines 669-810
669/***/"./js/foundation.core.utils.js": ( 670 /*!*************************************!*\ 671 !*** ./js/foundation.core.utils.js ***! 672 \*************************************/ 673 /*! exports provided: rtl, GetYoDigits, RegExpEscape, transitionend, onLoad, ignoreMousedisappear */ 674 /***/ 675 function _js_foundationCoreUtilsJs(module, __webpack_exports__, __webpack_require__) { 676 "use strict"; 677 678 __webpack_require__.r(__webpack_exports__); 679 /* harmony export (binding) */ 680 __webpack_require__.d(__webpack_exports__, "rtl", function () { 681 return rtl; 682 }); 683 /* harmony export (binding) */ 684 __webpack_require__.d(__webpack_exports__, "GetYoDigits", function () { 685 return GetYoDigits; 686 }); 687 /* harmony export (binding) */ 688 __webpack_require__.d(__webpack_exports__, "RegExpEscape", function () { 689 return RegExpEscape; 690 }); 691 /* harmony export (binding) */ 692 __webpack_require__.d(__webpack_exports__, "transitionend", function () { 693 return transitionend; 694 }); 695 /* harmony export (binding) */ 696 __webpack_require__.d(__webpack_exports__, "onLoad", function () { 697 return onLoad; 698 }); 699 /* harmony export (binding) */ 700 __webpack_require__.d(__webpack_exports__, "ignoreMousedisappear", function () { 701 return ignoreMousedisappear; 702 }); 703 /* harmony import */ 704 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 705 /* harmony import */ 706 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 707 // Core Foundation Utilities, utilized in a number of places. 708 709 /** 710 * Returns a boolean for RTL support 711 */ 712 713 function rtl() { 714 return jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').attr('dir') === 'rtl'; 715 } 716 /** 717 * returns a random base-36 uid with namespacing 718 * @function 719 * @param {Number} length - number of random base-36 digits desired. Increase for more random strings. 720 * @param {String} namespace - name of plugin to be incorporated in uid, optional. 721 * @default {String} '' - if no plugin name is provided, nothing is appended to the uid. 722 * @returns {String} - unique id 723 */ 724 725 function GetYoDigits() { 726 var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6; 727 var namespace = arguments.length > 1 ? arguments[1] : undefined; 728 var str = ''; 729 var chars = '0123456789abcdefghijklmnopqrstuvwxyz'; 730 var charsLength = chars.length; 731 for (var i = 0; i < length; i++) { 732 str += chars[Math.floor(Math.random() * charsLength)]; 733 } 734 return namespace ? "".concat(str, "-").concat(namespace) : str; 735 } 736 /** 737 * Escape a string so it can be used as a regexp pattern 738 * @function 739 * @see https://stackoverflow.com/a/9310752/4317384 740 * 741 * @param {String} str - string to escape. 742 * @returns {String} - escaped string 743 */ 744 745 function RegExpEscape(str) { 746 return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); 747 } 748 function transitionend($elem) { 749 var transitions = { 750 'transition': 'transitionend', 751 'WebkitTransition': 'webkitTransitionEnd', 752 'MozTransition': 'transitionend', 753 'OTransition': 'otransitionend' 754 }; 755 var elem = document.createElement('div'), 756 end; 757 for (var transition in transitions) { 758 if (typeof elem.style[transition] !== 'undefined') { 759 end = transitions[transition]; 760 } 761 } 762 if (end) { 763 return end; 764 } else { 765 setTimeout(function () { 766 $elem.triggerHandler('transitionend', [$elem]); 767 }, 1); 768 return 'transitionend'; 769 } 770 } 771 /** 772 * Return an event type to listen for window load. 773 * 774 * If `$elem` is passed, an event will be triggered on `$elem`. If window is already loaded, the event will still be triggered. 775 * If `handler` is passed, attach it to the event on `$elem`. 776 * Calling `onLoad` without handler allows you to get the event type that will be triggered before attaching the handler by yourself. 777 * @function 778 * 779 * @param {Object} [] $elem - jQuery element on which the event will be triggered if passed. 780 * @param {Function} [] handler - function to attach to the event. 781 * @returns {String} - event type that should or will be triggered. 782 */ 783 784 function onLoad($elem, handler) { 785 var didLoad = document.readyState === 'complete'; 786 var eventType = (didLoad ? '_didLoad' : 'load') + '.zf.util.onLoad'; 787 var cb = function cb() { 788 return $elem.triggerHandler(eventType); 789 }; 790 if ($elem) { 791 if (handler) $elem.one(eventType, handler); 792 if (didLoad) setTimeout(cb);else jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).one('load', cb); 793 } 794 return eventType; 795 } 796 /** 797 * Retuns an handler for the `mouseleave` that ignore disappeared mouses. 798 * 799 * If the mouse "disappeared" from the document (like when going on a browser UI element, See https://git.io/zf-11410), 800 * the event is ignored. 801 * - If the `ignoreLeaveWindow` is `true`, the event is ignored when the user actually left the window 802 * (like by switching to an other window with [Alt]+[Tab]). 803 * - If the `ignoreReappear` is `true`, the event will be ignored when the mouse will reappear later on the document 804 * outside of the element it left. 805 * 806 * @function 807 * 808 * @param {Function} [] handler - handler for the filtered `mouseleave` event to watch. 809 * @param {Object} [] options - object of options: 810 * - {Boolean}
810 [false] ignoreLeaveWindow - also ignore when the user switched windows. 811 * - {Boolean} [false] ignoreReappear - also ignore when the mouse reappeared outside of the element it left. 812 * @returns {Function} - filtered handler to use to listen on the `mouseleave` event. 813 */ 814 815 function ignoreMousedisappear(handler) { 816 var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, 817 _ref$ignoreLeaveWindo = _ref.ignoreLeaveWindow, 818 ignoreLeaveWindow = _ref$ignoreLeaveWindo === void 0 ? false : _ref$ignoreLeaveWindo, 819 _ref$ignoreReappear = _ref.ignoreReappear, 820 ignoreReappear = _ref$ignoreReappear === void 0 ? false : _ref$ignoreReappear; 821 return function leaveEventHandler(eLeave) { 822 for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 823 rest[_key - 1] = arguments[_key]; 824 } 825 var callback = handler.bind.apply(handler, [this, eLeave].concat(rest)); // The mouse left: call the given callback if the mouse entered elsewhere 826 827 if (eLeave.relatedTarget !== null) { 828 return callback(); 829 } // Otherwise, check if the mouse actually left the window. 830 // In firefox if the user switched between windows, the window sill have the focus by the time 831 // the event is triggered. We have to debounce the event to test this case. 832 833 setTimeout(function leaveEventDebouncer() { 834 if (!ignoreLeaveWindow && document.hasFocus && !document.hasFocus()) { 835 return callback(); 836 } // Otherwise, wait for the mouse to reeapear outside of the element, 837 838 if (!ignoreReappear) { 839 jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).one('mouseenter', function reenterEventHandler(eReenter) { 840 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(eLeave.currentTarget).has(eReenter.target).length) { 841 // Fill where the mouse finally entered. 842 eLeave.relatedTarget = eReenter.target; 843 callback(); 844 } 845 }); 846 } 847 }, 0); 848 }; 849 } 850 851 /***/ 852 }), 853
853/***/"./js/foundation.util.mediaQuery.js": ( 854 /*!******************************************!*\ 855 !*** ./js/foundation.util.mediaQuery.js ***! 856 \******************************************/ 857 /*! exports provided: MediaQuery */ 858 /***/ 859 function _js_foundationUtilMediaQueryJs(module, __webpack_exports__, __webpack_require__) { 860 "use strict"; 861 862 __webpack_require__.r(__webpack_exports__); 863 /* harmony export (binding) */ 864 __webpack_require__.d(__webpack_exports__, "MediaQuery", function () { 865 return MediaQuery; 866 }); 867 /* harmony import */ 868 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 869 /* harmony import */ 870 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 871 function _typeof(obj) { 872 "@babel/helpers - typeof"; 873 874 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 875 _typeof = function _typeof(obj) { 876 return typeof obj; 877 }; 878 } else { 879 _typeof = function _typeof(obj) { 880 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 881 }; 882 } 883 return _typeof(obj); 884 } 885 function _slicedToArray(arr, i) { 886 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); 887 } 888 function _nonIterableRest() { 889 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 890 } 891 function _unsupportedIterableToArray(o, minLen) { 892 if (!o) return; 893 if (typeof o === "string") return _arrayLikeToArray(o, minLen); 894 var n = Object.prototype.toString.call(o).slice(8, -1); 895 if (n === "Object" && o.constructor) n = o.constructor.name; 896 if (n === "Map" || n === "Set") return Array.from(o); 897 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); 898 } 899 function _arrayLikeToArray(arr, len) { 900 if (len == null || len > arr.length) len = arr.length; 901 for (var i = 0, arr2 = new Array(len); i < len; i++) { 902 arr2[i] = arr[i]; 903 } 904 return arr2; 905 } 906 function _iterableToArrayLimit(arr, i) { 907 var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; 908 if (_i == null) return; 909 var _arr = []; 910 var _n = true; 911 var _d = false; 912 var _s, _e; 913 try { 914 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { 915 _arr.push(_s.value); 916 if (i && _arr.length === i) break; 917 } 918 } catch (err) { 919 _d = true; 920 _e = err; 921 } finally { 922 try { 923 if (!_n && _i["return"] != null) _i["return"](); 924 } finally { 925 if (_d) throw _e; 926 } 927 } 928 return _arr; 929 } 930 function _arrayWithHoles(arr) { 931 if (Array.isArray(arr)) return arr; 932 } 933 934 // Default set of media queries 935 // const defaultQueries = { 936 // 'default' : 'only screen', 937 // landscape : 'only screen and (orientation: landscape)', 938 // portrait : 'only screen and (orientation: portrait)', 939 // retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 940 // 'only screen and (min--moz-device-pixel-ratio: 2),' + 941 // 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 942 // 'only screen and (min-device-pixel-ratio: 2),' + 943 // 'only screen and (min-resolution: 192dpi),' + 944 // 'only screen and (min-resolution: 2dppx)' 945 // }; 946 // matchMedia() polyfill - Test a CSS media type/query in JS. 947 // Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license 948 949 /* eslint-disable */ 950 951 window.matchMedia || (window.matchMedia = function () { 952 "use strict"; 953 954 // For browsers that support matchMedium api such as IE 9 and webkit 955 var styleMedia = window.styleMedia || window.media; // For those that don't support matchMedium 956 957 if (!styleMedia) { 958 var style = document.createElement('style'), 959 script = document.getElementsByTagName('script')[0], 960 info = null; 961 style.type = 'text/css'; 962 style.id = 'matchmediajs-test'; 963 if (!script) { 964 document.head.appendChild(style); 965 } else { 966 script.parentNode.insertBefore(style, script); 967 } // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 968 969 info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle; 970 styleMedia = { 971 matchMedium: function matchMedium(media) { 972 var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 973 974 if (style.styleSheet) { 975 style.styleSheet.cssText = text; 976 } else { 977 style.textContent = text; 978 } // Test if media query is true or false 979 980 return info.width === '1px'; 981 } 982 }; 983 } 984 return function (media) { 985 return { 986 matches: styleMedia.matchMedium(media || 'all'), 987 media: media || 'all' 988 }; 989 }; 990 }()); 991 /* eslint-enable */ 992 993 var MediaQuery = { 994 queries: [], 995 current: '', 996 /** 997 * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher. 998 * @function 999 * @private 1000 */ 1001 _init: function _init() { 1002 // make sure the initialization is only done once when calling _init() several times 1003 if (this.isInitialized === true) { 1004 return this; 1005 } else { 1006 this.isInitialized = true; 1007 } 1008 var self = this; 1009 var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq'); 1010 if (!$meta.length) { 1011 jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq" name="foundation-mq" content>').appendTo(document.head); 1012 } 1013 var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family'); 1014 var namedQueries; 1015 namedQueries = parseStyleToObject(extractedStyles); 1016 self.queries = []; // reset 1017
vendor: 5,168 bytes, lines 1018-1143
1018 for (var key in namedQueries) { 1019 if (namedQueries.hasOwnProperty(key)) { 1020 self.queries.push({ 1021 name: key, 1022 value: "only screen and (min-width: ".concat(namedQueries[key], ")") 1023 }); 1024 } 1025 } 1026 this.current = this._getCurrentSize(); 1027 this._watcher(); 1028 }, 1029 /** 1030 * Reinitializes the media query helper. 1031 * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization. 1032 * @function 1033 * @private 1034 */ 1035 _reInit: function _reInit() { 1036 this.isInitialized = false; 1037 this._init(); 1038 }, 1039 /** 1040 * Checks if the screen is at least as wide as a breakpoint. 1041 * @function 1042 * @param {String} size - Name of the breakpoint to check. 1043 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller. 1044 */ 1045 atLeast: function atLeast(size) { 1046 var query = this.get(size); 1047 if (query) { 1048 return window.matchMedia(query).matches; 1049 } 1050 return false; 1051 }, 1052 /** 1053 * Checks if the screen is within the given breakpoint. 1054 * If smaller than the breakpoint of larger than its upper limit it returns false. 1055 * @function 1056 * @param {String} size - Name of the breakpoint to check. 1057 * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise. 1058 */ 1059 only: function only(size) { 1060 return size === this._getCurrentSize(); 1061 }, 1062 /** 1063 * Checks if the screen is within a breakpoint or smaller. 1064 * @function 1065 * @param {String} size - Name of the breakpoint to check. 1066 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger. 1067 */ 1068 upTo: function upTo(size) { 1069 var nextSize = this.next(size); // If the next breakpoint does not match, the screen is smaller than 1070 // the upper limit of this breakpoint. 1071 1072 if (nextSize) { 1073 return !this.atLeast(nextSize); 1074 } // If there is no next breakpoint, the "size" breakpoint does not have 1075 // an upper limit and the screen will always be within it or smaller. 1076 1077 return true; 1078 }, 1079 /** 1080 * Checks if the screen matches to a breakpoint. 1081 * @function 1082 * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method. 1083 * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not. 1084 */ 1085 is: function is(size) { 1086 var parts = size.trim().split(' ').filter(function (p) { 1087 return !!p.length; 1088 }); 1089 var _parts = _slicedToArray(parts, 2), 1090 bpSize = _parts[0], 1091 _parts$ = _parts[1], 1092 bpModifier = _parts$ === void 0 ? '' : _parts$; // Only the breakpont 1093 1094 if (bpModifier === 'only') { 1095 return this.only(bpSize); 1096 } // At least the breakpoint (included) 1097 1098 if (!bpModifier || bpModifier === 'up') { 1099 return this.atLeast(bpSize); 1100 } // Up to the breakpoint (included) 1101 1102 if (bpModifier === 'down') { 1103 return this.upTo(bpSize); 1104 } 1105 throw new Error("\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"".concat(size, "\".\n ")); 1106 }, 1107 /** 1108 * Gets the media query of a breakpoint. 1109 * @function 1110 * @param {String} size - Name of the breakpoint to get. 1111 * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist. 1112 */ 1113 get: function get(size) { 1114 for (var i in this.queries) { 1115 if (this.queries.hasOwnProperty(i)) { 1116 var query = this.queries[i]; 1117 if (size === query.name) return query.value; 1118 } 1119 } 1120 return null; 1121 }, 1122 /** 1123 * Get the breakpoint following the given breakpoint. 1124 * @function 1125 * @param {String} size - Name of the breakpoint. 1126 * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one. 1127 */ 1128 next: function next(size) { 1129 var _this = this; 1130 var queryIndex = this.queries.findIndex(function (q) { 1131 return _this._getQueryName(q) === size; 1132 }); 1133 if (queryIndex === -1) { 1134 throw new Error("\n Unknown breakpoint \"".concat(size, "\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n ")); 1135 } 1136 var nextQuery = this.queries[queryIndex + 1]; 1137 return nextQuery ? nextQuery.name : null; 1138 }, 1139 /** 1140 * Returns the name of the breakpoint related to the given value. 1141 * @function 1142 * @private 1143 * @param {String|Object}
1143 value - Breakpoint name or query object. 1144 * @returns {String} Name of the breakpoint. 1145 */ 1146 _getQueryName: function _getQueryName(value) { 1147 if (typeof value === 'string') return value; 1148 if (_typeof(value) === 'object') return value.name; 1149 throw new TypeError("\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"".concat(value, "\" (").concat(_typeof(value), ")\n ")); 1150 }, 1151 /** 1152 * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one). 1153 * @function 1154 * @private 1155 * @returns {String} Name of the current breakpoint. 1156 */ 1157 _getCurrentSize: function _getCurrentSize() { 1158 var matched; 1159 for (var i = 0; i < this.queries.length; i++) { 1160 var query = this.queries[i]; 1161 if (window.matchMedia(query.value).matches) { 1162 matched = query; 1163 } 1164 } 1165 return matched && this._getQueryName(matched); 1166 }, 1167 /** 1168 * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes. 1169 * @function 1170 * @private 1171 */ 1172 _watcher: function _watcher() { 1173 var _this2 = this; 1174 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('resize.zf.trigger', function () { 1175 var newSize = _this2._getCurrentSize(), 1176 currentSize = _this2.current; 1177 if (newSize !== currentSize) { 1178 // Change the current media query 1179 _this2.current = newSize; // Broadcast the media query change on the window 1180 1181 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]); 1182 } 1183 }); 1184 } 1185 }; // Thank you: https://github.com/sindresorhus/query-string 1186 1187 function parseStyleToObject(str) { 1188 var styleObject = {}; 1189 if (typeof str !== 'string') { 1190 return styleObject; 1191 } 1192 str = str.trim().slice(1, -1); // browsers re-quote string style values 1193 1194 if (!str) { 1195 return styleObject; 1196 } 1197 styleObject = str.split('&').reduce(function (ret, param) { 1198 var parts = param.replace(/\+/g, ' ').split('='); 1199 var key = parts[0]; 1200 var val = parts[1]; 1201 key = decodeURIComponent(key); // missing `=` should be `null`: 1202 // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters 1203 1204 val = typeof val === 'undefined' ? null : decodeURIComponent(val); 1205 if (!ret.hasOwnProperty(key)) { 1206 ret[key] = val; 1207 } else if (Array.isArray(ret[key])) { 1208 ret[key].push(val); 1209 } else { 1210 ret[key] = [ret[key], val]; 1211 } 1212 return ret; 1213 }, {}); 1214 return styleObject; 1215 } 1216 1217 /***/ 1218 }), 1219 /***/0: ( 1220 /*!*****************************************************!*\ 1221 !*** multi ./js/entries/plugins/foundation.core.js ***! 1222 \*****************************************************/ 1223 /*! no static exports found */ 1224 /***/ 1225 function _(module, exports, __webpack_require__) { 1226 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.core.js */"./js/entries/plugins/foundation.core.js"); 1227 1228 /***/ 1229 }), 1230 /***/"jquery": ( 1231 /*!********************************************************************************************!*\ 1232 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 1233 \********************************************************************************************/ 1234 /*! no static exports found */ 1235 /***/ 1236 function jquery(module, exports) { 1237 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 1238 1239 /***/ 1240 }) 1241 1242 /******/ 1243 }); 1244}); 1245(function webpackUniversalModuleDefinition(root, factory) { 1246 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.util.mediaQuery"] = factory(require("./foundation.core"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 1247})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 1248 return /******/function (modules) { 1249 // webpackBootstrap 1250 /******/ // The module cache 1251 /******/ 1252 var installedModules = {}; 1253 /******/ 1254 /******/ // The require function 1255 /******/ 1256 function __webpack_require__(moduleId) { 1257 /******/ 1258 /******/ // Check if module is in cache 1259 /******/if (installedModules[moduleId]) { 1260 /******/return installedModules[moduleId].exports; 1261 /******/ 1262 } 1263 /******/ // Create a new module (and put it into the cache) 1264 /******/ 1265 var module = installedModules[moduleId] = { 1266 /******/i: moduleId, 1267 /******/l: false, 1268 /******/exports: {} 1269 /******/ 1270 }; 1271 /******/ 1272 /******/ // Execute the module function 1273 /******/ 1274 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 1275 /******/ 1276 /******/ // Flag the module as loaded 1277 /******/ 1278 module.l = true; 1279 /******/ 1280 /******/ // Return the exports of the module 1281 /******/ 1282 return module.exports; 1283 /******/ 1284 } 1285 /******/ 1286 /******/ 1287 /******/ // expose the modules object (__webpack_modules__) 1288 /******/ 1289 __webpack_require__.m = modules; 1290 /******/ 1291 /******/ // expose the module cache 1292 /******/ 1293 __webpack_require__.c = installedModules; 1294 /******/ 1295 /******/ // define getter function for harmony exports 1296 /******/ 1297 __webpack_require__.d = function (exports, name, getter) { 1298 /******/if (!__webpack_require__.o(exports, name)) { 1299 /******/Object.defineProperty(exports, name, { 1300 enumerable: true, 1301 get: getter 1302 }); 1303 /******/ 1304 } 1305 /******/ 1306 }; 1307 /******/ 1308 /******/ // define __esModule on exports 1309 /******/ 1310 __webpack_require__.r = function (exports) { 1311 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 1312 /******/Object.defineProperty(exports, Symbol.toStringTag, { 1313 value: 'Module' 1314 }); 1315 /******/ 1316 } 1317 /******/ 1318 Object.defineProperty(exports, '__esModule', { 1319 value: true 1320 }); 1321 /******/ 1322 }; 1323 /******/ 1324 /******/ // create a fake namespace object 1325 /******/ // mode & 1: value is a module id, require it 1326 /******/ // mode & 2: merge all properties of value into the ns 1327 /******/ // mode & 4: return value when already ns object 1328 /******/ // mode & 8|1: behave like require 1329 /******/ 1330 __webpack_require__.t = function (value, mode) { 1331 /******/if (mode & 1) value = __webpack_require__(value); 1332 /******/ 1333 if (mode & 8) return value; 1334 /******/ 1335 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esMo
vendor: 2,260 bytes, lines 1335-1398
1335dule) return value; 1336 /******/ 1337 var ns = Object.create(null); 1338 /******/ 1339 __webpack_require__.r(ns); 1340 /******/ 1341 Object.defineProperty(ns, 'default', { 1342 enumerable: true, 1343 value: value 1344 }); 1345 /******/ 1346 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 1347 return value[key]; 1348 }.bind(null, key)); 1349 /******/ 1350 return ns; 1351 /******/ 1352 }; 1353 /******/ 1354 /******/ // getDefaultExport function for compatibility with non-harmony modules 1355 /******/ 1356 __webpack_require__.n = function (module) { 1357 /******/var getter = module && module.__esModule ? /******/function getDefault() { 1358 return module['default']; 1359 } : /******/function getModuleExports() { 1360 return module; 1361 }; 1362 /******/ 1363 __webpack_require__.d(getter, 'a', getter); 1364 /******/ 1365 return getter; 1366 /******/ 1367 }; 1368 /******/ 1369 /******/ // Object.prototype.hasOwnProperty.call 1370 /******/ 1371 __webpack_require__.o = function (object, property) { 1372 return Object.prototype.hasOwnProperty.call(object, property); 1373 }; 1374 /******/ 1375 /******/ // __webpack_public_path__ 1376 /******/ 1377 __webpack_require__.p = ""; 1378 /******/ 1379 /******/ 1380 /******/ // Load entry module and return exports 1381 /******/ 1382 return __webpack_require__(__webpack_require__.s = 24); 1383 /******/ 1384 } 1385 /************************************************************************/ 1386 /******/({ 1387 /***/"./foundation.core": ( 1388 /*!****************************************************************************************************************************************************************!*\ 1389 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 1390 \****************************************************************************************************************************************************************/ 1391 /*! no static exports found */ 1392 /***/ 1393 function _foundationCore(module, exports) { 1394 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 1395 1396 /***/ 1397 }), 1398
1398/***/"./js/entries/plugins/foundation.util.mediaQuery.js": ( 1399 /*!**********************************************************!*\ 1400 !*** ./js/entries/plugins/foundation.util.mediaQuery.js ***! 1401 \**********************************************************/ 1402 /*! exports provided: Foundation, MediaQuery */ 1403 /***/ 1404 function _js_entries_plugins_foundationUtilMediaQueryJs(module, __webpack_exports__, __webpack_require__) { 1405 "use strict"; 1406 1407 __webpack_require__.r(__webpack_exports__); 1408 /* harmony import */ 1409 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 1410 /* harmony import */ 1411 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 1412 /* harmony reexport (safe) */ 1413 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 1414 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 1415 }); 1416 1417 /* harmony import */ 1418 var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.mediaQuery */"./js/foundation.util.mediaQuery.js"); 1419 /* harmony reexport (safe) */ 1420 __webpack_require__.d(__webpack_exports__, "MediaQuery", function () { 1421 return _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]; 1422 }); 1423 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].MediaQuery = _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]; 1424 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].MediaQuery._init(); 1425 1426 /***/ 1427 }), 1428
1428/***/"./js/foundation.util.mediaQuery.js": ( 1429 /*!******************************************!*\ 1430 !*** ./js/foundation.util.mediaQuery.js ***! 1431 \******************************************/ 1432 /*! exports provided: MediaQuery */ 1433 /***/ 1434 function _js_foundationUtilMediaQueryJs(module, __webpack_exports__, __webpack_require__) { 1435 "use strict"; 1436 1437 __webpack_require__.r(__webpack_exports__); 1438 /* harmony export (binding) */ 1439 __webpack_require__.d(__webpack_exports__, "MediaQuery", function () { 1440 return MediaQuery; 1441 }); 1442 /* harmony import */ 1443 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 1444 /* harmony import */ 1445 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 1446 function _typeof(obj) { 1447 "@babel/helpers - typeof"; 1448 1449 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 1450 _typeof = function _typeof(obj) { 1451 return typeof obj; 1452 }; 1453 } else { 1454 _typeof = function _typeof(obj) { 1455 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 1456 }; 1457 } 1458 return _typeof(obj); 1459 } 1460 function _slicedToArray(arr, i) { 1461 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); 1462 } 1463 function _nonIterableRest() { 1464 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 1465 } 1466 function _unsupportedIterableToArray(o, minLen) { 1467 if (!o) return; 1468 if (typeof o === "string") return _arrayLikeToArray(o, minLen); 1469 var n = Object.prototype.toString.call(o).slice(8, -1); 1470 if (n === "Object" && o.constructor) n = o.constructor.name; 1471 if (n === "Map" || n === "Set") return Array.from(o); 1472 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); 1473 } 1474 function _arrayLikeToArray(arr, len) { 1475 if (len == null || len > arr.length) len = arr.length; 1476 for (var i = 0, arr2 = new Array(len); i < len; i++) { 1477 arr2[i] = arr[i]; 1478 } 1479 return arr2; 1480 } 1481 function _iterableToArrayLimit(arr, i) { 1482 var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; 1483 if (_i == null) return; 1484 var _arr = []; 1485 var _n = true; 1486 var _d = false; 1487 var _s, _e; 1488 try { 1489 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { 1490 _arr.push(_s.value); 1491 if (i && _arr.length === i) break; 1492 } 1493 } catch (err) { 1494 _d = true; 1495 _e = err; 1496 } finally { 1497 try { 1498 if (!_n && _i["return"] != null) _i["return"](); 1499 } finally { 1500 if (_d) throw _e; 1501 } 1502 } 1503 return _arr; 1504 } 1505 function _arrayWithHoles(arr) { 1506 if (Array.isArray(arr)) return arr; 1507 } 1508 1509 // Default set of media queries 1510 // const defaultQueries = { 1511 // 'default' : 'only screen', 1512 // landscape : 'only screen and (orientation: landscape)', 1513 // portrait : 'only screen and (orientation: portrait)', 1514 // retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 1515 // 'only screen and (min--moz-device-pixel-ratio: 2),' + 1516 // 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 1517 // 'only screen and (min-device-pixel-ratio: 2),' + 1518 // 'only screen and (min-resolution: 192dpi),' + 1519 // 'only screen and (min-resolution: 2dppx)' 1520 // }; 1521 // matchMedia() polyfill - Test a CSS media type/query in JS. 1522 // Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license 1523 1524 /* eslint-disable */ 1525 1526 window.matchMedia || (window.matchMedia = function () { 1527 "use strict"; 1528 1529 // For browsers that support matchMedium api such as IE 9 and webkit 1530 var styleMedia = window.styleMedia || window.media; // For those that don't support matchMedium 1531 1532 if (!styleMedia) { 1533 var style = document.createElement('style'), 1534 script = document.getElementsByTagName('script')[0], 1535 info = null; 1536 style.type = 'text/css'; 1537 style.id = 'matchmediajs-test'; 1538 if (!script) { 1539 document.head.appendChild(style); 1540 } else { 1541 script.parentNode.insertBefore(style, script); 1542 } // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 1543 1544 info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle; 1545 styleMedia = { 1546 matchMedium: function matchMedium(media) { 1547 var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 1548 1549 if (style.styleSheet) { 1550 style.styleSheet.cssText = text; 1551 } else { 1552 style.textContent = text; 1553 } // Test if media query is true or false 1554 1555 return info.width === '1px'; 1556 } 1557 }; 1558 } 1559 return function (media) { 1560 return { 1561 matches: styleMedia.matchMedium(media || 'all'), 1562 media: media || 'all' 1563 }; 1564 }; 1565 }()); 1566 /* eslint-enable */ 1567 1568 var MediaQuery = { 1569 queries: [], 1570 current: '', 1571 /** 1572 * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher. 1573 * @function 1574 * @private 1575 */ 1576 _init: function _init() { 1577 // make sure the initialization is only done once when calling _init() several times 1578 if (this.isInitialized === true) { 1579 return this; 1580 } else { 1581 this.isInitialized = true; 1582 } 1583 var self = this; 1584 var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq'); 1585 if (!$meta.length) { 1586 jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq" name="foundation-mq" content>').appendTo(document.head); 1587 } 1588 var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family'); 1589 var namedQueries; 1590 namedQueries = parseStyleToObject(extractedStyles); 1591 self.queries = []; // reset 1592
vendor: 5,168 bytes, lines 1593-1718
1593 for (var key in namedQueries) { 1594 if (namedQueries.hasOwnProperty(key)) { 1595 self.queries.push({ 1596 name: key, 1597 value: "only screen and (min-width: ".concat(namedQueries[key], ")") 1598 }); 1599 } 1600 } 1601 this.current = this._getCurrentSize(); 1602 this._watcher(); 1603 }, 1604 /** 1605 * Reinitializes the media query helper. 1606 * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization. 1607 * @function 1608 * @private 1609 */ 1610 _reInit: function _reInit() { 1611 this.isInitialized = false; 1612 this._init(); 1613 }, 1614 /** 1615 * Checks if the screen is at least as wide as a breakpoint. 1616 * @function 1617 * @param {String} size - Name of the breakpoint to check. 1618 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller. 1619 */ 1620 atLeast: function atLeast(size) { 1621 var query = this.get(size); 1622 if (query) { 1623 return window.matchMedia(query).matches; 1624 } 1625 return false; 1626 }, 1627 /** 1628 * Checks if the screen is within the given breakpoint. 1629 * If smaller than the breakpoint of larger than its upper limit it returns false. 1630 * @function 1631 * @param {String} size - Name of the breakpoint to check. 1632 * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise. 1633 */ 1634 only: function only(size) { 1635 return size === this._getCurrentSize(); 1636 }, 1637 /** 1638 * Checks if the screen is within a breakpoint or smaller. 1639 * @function 1640 * @param {String} size - Name of the breakpoint to check. 1641 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger. 1642 */ 1643 upTo: function upTo(size) { 1644 var nextSize = this.next(size); // If the next breakpoint does not match, the screen is smaller than 1645 // the upper limit of this breakpoint. 1646 1647 if (nextSize) { 1648 return !this.atLeast(nextSize); 1649 } // If there is no next breakpoint, the "size" breakpoint does not have 1650 // an upper limit and the screen will always be within it or smaller. 1651 1652 return true; 1653 }, 1654 /** 1655 * Checks if the screen matches to a breakpoint. 1656 * @function 1657 * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method. 1658 * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not. 1659 */ 1660 is: function is(size) { 1661 var parts = size.trim().split(' ').filter(function (p) { 1662 return !!p.length; 1663 }); 1664 var _parts = _slicedToArray(parts, 2), 1665 bpSize = _parts[0], 1666 _parts$ = _parts[1], 1667 bpModifier = _parts$ === void 0 ? '' : _parts$; // Only the breakpont 1668 1669 if (bpModifier === 'only') { 1670 return this.only(bpSize); 1671 } // At least the breakpoint (included) 1672 1673 if (!bpModifier || bpModifier === 'up') { 1674 return this.atLeast(bpSize); 1675 } // Up to the breakpoint (included) 1676 1677 if (bpModifier === 'down') { 1678 return this.upTo(bpSize); 1679 } 1680 throw new Error("\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"".concat(size, "\".\n ")); 1681 }, 1682 /** 1683 * Gets the media query of a breakpoint. 1684 * @function 1685 * @param {String} size - Name of the breakpoint to get. 1686 * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist. 1687 */ 1688 get: function get(size) { 1689 for (var i in this.queries) { 1690 if (this.queries.hasOwnProperty(i)) { 1691 var query = this.queries[i]; 1692 if (size === query.name) return query.value; 1693 } 1694 } 1695 return null; 1696 }, 1697 /** 1698 * Get the breakpoint following the given breakpoint. 1699 * @function 1700 * @param {String} size - Name of the breakpoint. 1701 * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one. 1702 */ 1703 next: function next(size) { 1704 var _this = this; 1705 var queryIndex = this.queries.findIndex(function (q) { 1706 return _this._getQueryName(q) === size; 1707 }); 1708 if (queryIndex === -1) { 1709 throw new Error("\n Unknown breakpoint \"".concat(size, "\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n ")); 1710 } 1711 var nextQuery = this.queries[queryIndex + 1]; 1712 return nextQuery ? nextQuery.name : null; 1713 }, 1714 /** 1715 * Returns the name of the breakpoint related to the given value. 1716 * @function 1717 * @private 1718 * @param {String|Object}
1718 value - Breakpoint name or query object. 1719 * @returns {String} Name of the breakpoint. 1720 */ 1721 _getQueryName: function _getQueryName(value) { 1722 if (typeof value === 'string') return value; 1723 if (_typeof(value) === 'object') return value.name; 1724 throw new TypeError("\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"".concat(value, "\" (").concat(_typeof(value), ")\n ")); 1725 }, 1726 /** 1727 * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one). 1728 * @function 1729 * @private 1730 * @returns {String} Name of the current breakpoint. 1731 */ 1732 _getCurrentSize: function _getCurrentSize() { 1733 var matched; 1734 for (var i = 0; i < this.queries.length; i++) { 1735 var query = this.queries[i]; 1736 if (window.matchMedia(query.value).matches) { 1737 matched = query; 1738 } 1739 } 1740 return matched && this._getQueryName(matched); 1741 }, 1742 /** 1743 * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes. 1744 * @function 1745 * @private 1746 */ 1747 _watcher: function _watcher() { 1748 var _this2 = this; 1749 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('resize.zf.trigger', function () { 1750 var newSize = _this2._getCurrentSize(), 1751 currentSize = _this2.current; 1752 if (newSize !== currentSize) { 1753 // Change the current media query 1754 _this2.current = newSize; // Broadcast the media query change on the window 1755 1756 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]); 1757 } 1758 }); 1759 } 1760 }; // Thank you: https://github.com/sindresorhus/query-string 1761 1762 function parseStyleToObject(str) { 1763 var styleObject = {}; 1764 if (typeof str !== 'string') { 1765 return styleObject; 1766 } 1767 str = str.trim().slice(1, -1); // browsers re-quote string style values 1768 1769 if (!str) { 1770 return styleObject; 1771 } 1772 styleObject = str.split('&').reduce(function (ret, param) { 1773 var parts = param.replace(/\+/g, ' ').split('='); 1774 var key = parts[0]; 1775 var val = parts[1]; 1776 key = decodeURIComponent(key); // missing `=` should be `null`: 1777 // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters 1778 1779 val = typeof val === 'undefined' ? null : decodeURIComponent(val); 1780 if (!ret.hasOwnProperty(key)) { 1781 ret[key] = val; 1782 } else if (Array.isArray(ret[key])) { 1783 ret[key].push(val); 1784 } else { 1785 ret[key] = [ret[key], val]; 1786 } 1787 return ret; 1788 }, {}); 1789 return styleObject; 1790 } 1791 1792 /***/ 1793 }), 1794 /***/24: ( 1795 /*!****************************************************************!*\ 1796 !*** multi ./js/entries/plugins/foundation.util.mediaQuery.js ***! 1797 \****************************************************************/ 1798 /*! no static exports found */ 1799 /***/ 1800 function _(module, exports, __webpack_require__) { 1801 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.util.mediaQuery.js */"./js/entries/plugins/foundation.util.mediaQuery.js"); 1802 1803 /***/ 1804 }), 1805 /***/"jquery": ( 1806 /*!********************************************************************************************!*\ 1807 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 1808 \********************************************************************************************/ 1809 /*! no static exports found */ 1810 /***/ 1811 function jquery(module, exports) { 1812 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 1813 1814 /***/ 1815 }) 1816 1817 /******/ 1818 }); 1819}); 1820(function webpackUniversalModuleDefinition(root, factory) { 1821 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"));else if (typeof define === 'function' && define.amd) define(["./foundation.core"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.util.box"] = factory(require("./foundation.core"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.box"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"]); 1822})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__) { 1823 return /******/function (modules) { 1824 // webpackBootstrap 1825 /******/ // The module cache 1826 /******/ 1827 var installedModules = {}; 1828 /******/ 1829 /******/ // The require function 1830 /******/ 1831 function __webpack_require__(moduleId) { 1832 /******/ 1833 /******/ // Check if module is in cache 1834 /******/if (installedModules[moduleId]) { 1835 /******/return installedModules[moduleId].exports; 1836 /******/ 1837 } 1838 /******/ // Create a new module (and put it into the cache) 1839 /******/ 1840 var module = installedModules[moduleId] = { 1841 /******/i: moduleId, 1842 /******/l: false, 1843 /******/exports: {} 1844 /******/ 1845 }; 1846 /******/ 1847 /******/ // Execute the module function 1848 /******/ 1849 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 1850 /******/ 1851 /******/ // Flag the module as loaded 1852 /******/ 1853 module.l = true; 1854 /******/ 1855 /******/ // Return the exports of the module 1856 /******/ 1857 return module.exports; 1858 /******/ 1859 } 1860 /******/ 1861 /******/ 1862 /******/ // expose the modules object (__webpack_modules__) 1863 /******/ 1864 __webpack_require__.m = modules; 1865 /******/ 1866 /******/ // expose the module cache 1867 /******/ 1868 __webpack_require__.c = installedModules; 1869 /******/ 1870 /******/ // define getter function for harmony exports 1871 /******/ 1872 __webpack_require__.d = function (exports, name, getter) { 1873 /******/if (!__webpack_require__.o(exports, name)) { 1874 /******/Object.defineProperty(exports, name, { 1875 enumerable: true, 1876 get: getter 1877 }); 1878 /******/ 1879 } 1880 /******/ 1881 }; 1882 /******/ 1883 /******/ // define __esModule on exports 1884 /******/ 1885 __webpack_require__.r = function (exports) { 1886 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 1887 /******/Object.defineProperty(exports, Symbol.toStringTag, { 1888 value: 'Module' 1889 }); 1890 /******/ 1891 } 1892 /******/ 1893 Object.defineProperty(exports, '__esModule', { 1894 value: true 1895 }); 1896 /******/ 1897 }; 1898 /******/ 1899 /******/ // create a fake namespace object 1900 /******/ // mode & 1: value is a module id, require it 1901 /******/ // mode & 2: merge all properties of value into the ns 1902 /******/ // mode & 4: return value when already ns object 1903 /******/ // mode & 8|1: behave like require 1904 /******/ 1905 __webpack_require__.t = function (value, mode) { 1906 /******/if (mode & 1) value = __webpack_require__(value); 1907 /******/ 1908 if (mode & 8) return value; 1909 /******/ 1910 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esMo
vendor: 2,260 bytes, lines 1910-1973
1910dule) return value; 1911 /******/ 1912 var ns = Object.create(null); 1913 /******/ 1914 __webpack_require__.r(ns); 1915 /******/ 1916 Object.defineProperty(ns, 'default', { 1917 enumerable: true, 1918 value: value 1919 }); 1920 /******/ 1921 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 1922 return value[key]; 1923 }.bind(null, key)); 1924 /******/ 1925 return ns; 1926 /******/ 1927 }; 1928 /******/ 1929 /******/ // getDefaultExport function for compatibility with non-harmony modules 1930 /******/ 1931 __webpack_require__.n = function (module) { 1932 /******/var getter = module && module.__esModule ? /******/function getDefault() { 1933 return module['default']; 1934 } : /******/function getModuleExports() { 1935 return module; 1936 }; 1937 /******/ 1938 __webpack_require__.d(getter, 'a', getter); 1939 /******/ 1940 return getter; 1941 /******/ 1942 }; 1943 /******/ 1944 /******/ // Object.prototype.hasOwnProperty.call 1945 /******/ 1946 __webpack_require__.o = function (object, property) { 1947 return Object.prototype.hasOwnProperty.call(object, property); 1948 }; 1949 /******/ 1950 /******/ // __webpack_public_path__ 1951 /******/ 1952 __webpack_require__.p = ""; 1953 /******/ 1954 /******/ 1955 /******/ // Load entry module and return exports 1956 /******/ 1957 return __webpack_require__(__webpack_require__.s = 21); 1958 /******/ 1959 } 1960 /************************************************************************/ 1961 /******/({ 1962 /***/"./foundation.core": ( 1963 /*!****************************************************************************************************************************************************************!*\ 1964 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 1965 \****************************************************************************************************************************************************************/ 1966 /*! no static exports found */ 1967 /***/ 1968 function _foundationCore(module, exports) { 1969 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 1970 1971 /***/ 1972 }), 1973
1973/***/"./js/entries/plugins/foundation.util.box.js": ( 1974 /*!***************************************************!*\ 1975 !*** ./js/entries/plugins/foundation.util.box.js ***! 1976 \***************************************************/ 1977 /*! exports provided: Foundation, Box */ 1978 /***/ 1979 function _js_entries_plugins_foundationUtilBoxJs(module, __webpack_exports__, __webpack_require__) { 1980 "use strict"; 1981 1982 __webpack_require__.r(__webpack_exports__); 1983 /* harmony import */ 1984 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 1985 /* harmony import */ 1986 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 1987 /* harmony reexport (safe) */ 1988 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 1989 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 1990 }); 1991 1992 /* harmony import */ 1993 var _foundation_util_box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.box */"./js/foundation.util.box.js"); 1994 /* harmony reexport (safe) */ 1995 __webpack_require__.d(__webpack_exports__, "Box", function () { 1996 return _foundation_util_box__WEBPACK_IMPORTED_MODULE_1__["Box"]; 1997 }); 1998 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Box = _foundation_util_box__WEBPACK_IMPORTED_MODULE_1__["Box"]; 1999 2000 /***/ 2001 }), 2002
vendor: 5,609 bytes, lines 2002-2124
2002/***/"./js/foundation.util.box.js": ( 2003 /*!***********************************!*\ 2004 !*** ./js/foundation.util.box.js ***! 2005 \***********************************/ 2006 /*! exports provided: Box */ 2007 /***/ 2008 function _js_foundationUtilBoxJs(module, __webpack_exports__, __webpack_require__) { 2009 "use strict"; 2010 2011 __webpack_require__.r(__webpack_exports__); 2012 /* harmony export (binding) */ 2013 __webpack_require__.d(__webpack_exports__, "Box", function () { 2014 return Box; 2015 }); 2016 var Box = { 2017 ImNotTouchingYou: ImNotTouchingYou, 2018 OverlapArea: OverlapArea, 2019 GetDimensions: GetDimensions, 2020 GetExplicitOffsets: GetExplicitOffsets 2021 }; 2022 /** 2023 * Compares the dimensions of an element to a container and determines collision events with container. 2024 * @function 2025 * @param {jQuery} element - jQuery object to test for collisions. 2026 * @param {jQuery} parent - jQuery object to use as bounding container. 2027 * @param {Boolean} lrOnly - set to true to check left and right values only. 2028 * @param {Boolean} tbOnly - set to true to check top and bottom values only. 2029 * @default if no parent object passed, detects collisions with `window`. 2030 * @returns {Boolean} - true if collision free, false if a collision in any direction. 2031 */ 2032 2033 function ImNotTouchingYou(element, parent, lrOnly, tbOnly, ignoreBottom) { 2034 return OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) === 0; 2035 } 2036 function OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) { 2037 var eleDims = GetDimensions(element), 2038 topOver, 2039 bottomOver, 2040 leftOver, 2041 rightOver; 2042 if (parent) { 2043 var parDims = GetDimensions(parent); 2044 bottomOver = parDims.height + parDims.offset.top - (eleDims.offset.top + eleDims.height); 2045 topOver = eleDims.offset.top - parDims.offset.top; 2046 leftOver = eleDims.offset.left - parDims.offset.left; 2047 rightOver = parDims.width + parDims.offset.left - (eleDims.offset.left + eleDims.width); 2048 } else { 2049 bottomOver = eleDims.windowDims.height + eleDims.windowDims.offset.top - (eleDims.offset.top + eleDims.height); 2050 topOver = eleDims.offset.top - eleDims.windowDims.offset.top; 2051 leftOver = eleDims.offset.left - eleDims.windowDims.offset.left; 2052 rightOver = eleDims.windowDims.width - (eleDims.offset.left + eleDims.width); 2053 } 2054 bottomOver = ignoreBottom ? 0 : Math.min(bottomOver, 0); 2055 topOver = Math.min(topOver, 0); 2056 leftOver = Math.min(leftOver, 0); 2057 rightOver = Math.min(rightOver, 0); 2058 if (lrOnly) { 2059 return leftOver + rightOver; 2060 } 2061 if (tbOnly) { 2062 return topOver + bottomOver; 2063 } // use sum of squares b/c we care about overlap area. 2064 2065 return Math.sqrt(topOver * topOver + bottomOver * bottomOver + leftOver * leftOver + rightOver * rightOver); 2066 } 2067 /** 2068 * Uses native methods to return an object of dimension values. 2069 * @function 2070 * @param {jQuery || HTML} element - jQuery object or DOM element for which to get the dimensions. Can be any element other that document or window. 2071 * @returns {Object} - nested object of integer pixel values 2072 * TODO - if element is window, return only those values. 2073 */ 2074 2075 function GetDimensions(elem) { 2076 elem = elem.length ? elem[0] : elem; 2077 if (elem === window || elem === document) { 2078 throw new Error("I'm sorry, Dave. I'm afraid I can't do that."); 2079 } 2080 var rect = elem.getBoundingClientRect(), 2081 parRect = elem.parentNode.getBoundingClientRect(), 2082 winRect = document.body.getBoundingClientRect(), 2083 winY = window.pageYOffset, 2084 winX = window.pageXOffset; 2085 return { 2086 width: rect.width, 2087 height: rect.height, 2088 offset: { 2089 top: rect.top + winY, 2090 left: rect.left + winX 2091 }, 2092 parentDims: { 2093 width: parRect.width, 2094 height: parRect.height, 2095 offset: { 2096 top: parRect.top + winY, 2097 left: parRect.left + winX 2098 } 2099 }, 2100 windowDims: { 2101 width: winRect.width, 2102 height: winRect.height, 2103 offset: { 2104 top: winY, 2105 left: winX 2106 } 2107 } 2108 }; 2109 } 2110 /** 2111 * Returns an object of top and left integer pixel values for dynamically rendered elements, 2112 * such as: Tooltip, Reveal, and Dropdown. Maintained for backwards compatibility, and where 2113 * you don't know alignment, but generally from 2114 * 6.4 forward you should use GetExplicitOffsets, as GetOffsets conflates position and alignment. 2115 * @function 2116 * @param {jQuery} element - jQuery object for the element being positioned. 2117 * @param {jQuery} anchor - jQuery object for the element's anchor point. 2118 * @param {String} position - a string relating to the desired position of the element, relative to it's anchor 2119 * @param {Number} vOffset - integer pixel value of desired vertical separation between anchor and element. 2120 * @param {Number} hOffset - integer pixel value of desired horizontal separation between anchor and element. 2121 * @param {Boolean} isOverflow - if a collision event is detected, sets to true to default the element to full width - any desired offset. 2122 * TODO alter/rewrite to work with `em` values as well/instead of pixels 2123 */ 2124
2125 function GetExplicitOffsets(element, anchor, position, alignment, vOffset, hOffset, isOverflow) { 2126 var $eleDims = GetDimensions(element), 2127 $anchorDims = anchor ? GetDimensions(anchor) : null; 2128 var topVal, leftVal; 2129 if ($anchorDims !== null) { 2130 // set position related attribute 2131 switch (position) { 2132 case 'top': 2133 topVal = $anchorDims.offset.top - ($eleDims.height + vOffset); 2134 break; 2135 case 'bottom': 2136 topVal = $anchorDims.offset.top + $anchorDims.height + vOffset; 2137 break; 2138 case 'left': 2139 leftVal = $anchorDims.offset.left - ($eleDims.width + hOffset); 2140 break; 2141 case 'right': 2142 leftVal = $anchorDims.offset.left + $anchorDims.width + hOffset; 2143 break; 2144 } // set alignment related attribute 2145 2146 switch (position) { 2147 case 'top': 2148 case 'bottom': 2149 switch (alignment) { 2150 case 'left': 2151 leftVal = $anchorDims.offset.left + hOffset; 2152 break; 2153 case 'right': 2154 leftVal = $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset; 2155 break; 2156 case 'center': 2157 leftVal = isOverflow ? hOffset : $anchorDims.offset.left + $anchorDims.width / 2 - $eleDims.width / 2 + hOffset; 2158 break; 2159 } 2160 break; 2161 case 'right': 2162 case 'left': 2163 switch (alignment) { 2164 case 'bottom': 2165 topVal = $anchorDims.offset.top - vOffset + $anchorDims.height - $eleDims.height; 2166 break; 2167 case 'top': 2168 topVal = $anchorDims.offset.top + vOffset; 2169 break; 2170 case 'center': 2171 topVal = $anchorDims.offset.top + vOffset + $anchorDims.height / 2 - $eleDims.height / 2; 2172 break; 2173 } 2174 break; 2175 } 2176 } 2177 return { 2178 top: topVal, 2179 left: leftVal 2180 }; 2181 } 2182 2183 /***/ 2184 }), 2185 /***/21: ( 2186 /*!*********************************************************!*\ 2187 !*** multi ./js/entries/plugins/foundation.util.box.js ***! 2188 \*********************************************************/ 2189 /*! no static exports found */ 2190 /***/ 2191 function _(module, exports, __webpack_require__) { 2192 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.util.box.js */"./js/entries/plugins/foundation.util.box.js"); 2193 2194 /***/ 2195 }) 2196 2197 /******/ 2198 }); 2199}); 2200(function webpackUniversalModuleDefinition(root, factory) { 2201 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.util.keyboard"] = factory(require("./foundation.core"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 2202})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 2203 return /******/function (modules) { 2204 // webpackBootstrap 2205 /******/ // The module cache 2206 /******/ 2207 var installedModules = {}; 2208 /******/ 2209 /******/ // The require function 2210 /******/ 2211 function __webpack_require__(moduleId) { 2212 /******/ 2213 /******/ // Check if module is in cache 2214 /******/if (installedModules[moduleId]) { 2215 /******/return installedModules[moduleId].exports; 2216 /******/ 2217 } 2218 /******/ // Create a new module (and put it into the cache) 2219 /******/ 2220 var module = installedModules[moduleId] = { 2221 /******/i: moduleId, 2222 /******/l: false, 2223 /******/exports: {} 2224 /******/ 2225 }; 2226 /******/ 2227 /******/ // Execute the module function 2228 /******/ 2229 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 2230 /******/ 2231 /******/ // Flag the module as loaded 2232 /******/ 2233 module.l = true; 2234 /******/ 2235 /******/ // Return the exports of the module 2236 /******/ 2237 return module.exports; 2238 /******/ 2239 } 2240 /******/ 2241 /******/ 2242 /******/ // expose the modules object (__webpack_modules__) 2243 /******/ 2244 __webpack_require__.m = modules; 2245 /******/ 2246 /******/ // expose the module cache 2247 /******/ 2248 __webpack_require__.c = installedModules; 2249 /******/ 2250 /******/ // define getter function for harmony exports 2251 /******/ 2252 __webpack_require__.d = function (exports, name, getter) { 2253 /******/if (!__webpack_require__.o(exports, name)) { 2254 /******/Object.defineProperty(exports, name, { 2255 enumerable: true, 2256 get: getter 2257 }); 2258 /******/ 2259 } 2260 /******/ 2261 }; 2262 /******/ 2263 /******/ // define __esModule on exports 2264 /******/ 2265 __webpack_require__.r = function (exports) { 2266 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 2267 /******/Object.defineProperty(exports, Symbol.toStringTag, { 2268 value: 'Module' 2269 }); 2270 /******/ 2271 } 2272 /******/ 2273 Object.defineProperty(exports, '__esModule', { 2274 value: true 2275 }); 2276 /******/ 2277 }; 2278 /******/ 2279 /******/ // create a fake namespace object 2280 /******/ // mode & 1: value is a module id, require it 2281 /******/ // mode & 2: merge all properties of value into the ns 2282 /******/ // mode & 4: return value when already ns object 2283 /******/ // mode & 8|1: behave like require 2284 /******/ 2285 __webpack_require__.t = function (value, mode) { 2286 /******/if (mode & 1) value = __webpack_require__(value); 2287 /******/ 2288 if (mode & 8) return value; 2289 /******/ 2290 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esMo
vendor: 2,260 bytes, lines 2290-2353
2290dule) return value; 2291 /******/ 2292 var ns = Object.create(null); 2293 /******/ 2294 __webpack_require__.r(ns); 2295 /******/ 2296 Object.defineProperty(ns, 'default', { 2297 enumerable: true, 2298 value: value 2299 }); 2300 /******/ 2301 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 2302 return value[key]; 2303 }.bind(null, key)); 2304 /******/ 2305 return ns; 2306 /******/ 2307 }; 2308 /******/ 2309 /******/ // getDefaultExport function for compatibility with non-harmony modules 2310 /******/ 2311 __webpack_require__.n = function (module) { 2312 /******/var getter = module && module.__esModule ? /******/function getDefault() { 2313 return module['default']; 2314 } : /******/function getModuleExports() { 2315 return module; 2316 }; 2317 /******/ 2318 __webpack_require__.d(getter, 'a', getter); 2319 /******/ 2320 return getter; 2321 /******/ 2322 }; 2323 /******/ 2324 /******/ // Object.prototype.hasOwnProperty.call 2325 /******/ 2326 __webpack_require__.o = function (object, property) { 2327 return Object.prototype.hasOwnProperty.call(object, property); 2328 }; 2329 /******/ 2330 /******/ // __webpack_public_path__ 2331 /******/ 2332 __webpack_require__.p = ""; 2333 /******/ 2334 /******/ 2335 /******/ // Load entry module and return exports 2336 /******/ 2337 return __webpack_require__(__webpack_require__.s = 23); 2338 /******/ 2339 } 2340 /************************************************************************/ 2341 /******/({ 2342 /***/"./foundation.core": ( 2343 /*!****************************************************************************************************************************************************************!*\ 2344 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 2345 \****************************************************************************************************************************************************************/ 2346 /*! no static exports found */ 2347 /***/ 2348 function _foundationCore(module, exports) { 2349 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 2350 2351 /***/ 2352 }), 2353
2353/***/"./js/entries/plugins/foundation.util.keyboard.js": ( 2354 /*!********************************************************!*\ 2355 !*** ./js/entries/plugins/foundation.util.keyboard.js ***! 2356 \********************************************************/ 2357 /*! exports provided: Foundation, Keyboard */ 2358 /***/ 2359 function _js_entries_plugins_foundationUtilKeyboardJs(module, __webpack_exports__, __webpack_require__) { 2360 "use strict"; 2361 2362 __webpack_require__.r(__webpack_exports__); 2363 /* harmony import */ 2364 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 2365 /* harmony import */ 2366 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 2367 /* harmony reexport (safe) */ 2368 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 2369 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 2370 }); 2371 2372 /* harmony import */ 2373 var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.keyboard */"./js/foundation.util.keyboard.js"); 2374 /* harmony reexport (safe) */ 2375 __webpack_require__.d(__webpack_exports__, "Keyboard", function () { 2376 return _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"]; 2377 }); 2378 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Keyboard = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"]; 2379 2380 /***/ 2381 }), 2382
vendor: 5,533 bytes, lines 2382-2501
2382/***/"./js/foundation.util.keyboard.js": ( 2383 /*!****************************************!*\ 2384 !*** ./js/foundation.util.keyboard.js ***! 2385 \****************************************/ 2386 /*! exports provided: Keyboard */ 2387 /***/ 2388 function _js_foundationUtilKeyboardJs(module, __webpack_exports__, __webpack_require__) { 2389 "use strict"; 2390 2391 __webpack_require__.r(__webpack_exports__); 2392 /* harmony export (binding) */ 2393 __webpack_require__.d(__webpack_exports__, "Keyboard", function () { 2394 return Keyboard; 2395 }); 2396 /* harmony import */ 2397 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 2398 /* harmony import */ 2399 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 2400 /* harmony import */ 2401 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */"./foundation.core"); 2402 /* harmony import */ 2403 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 2404 /******************************************* 2405 * * 2406 * This util was created by Marius Olbertz * 2407 * Please thank Marius on GitHub /owlbertz * 2408 * or the web http://www.mariusolbertz.de/ * 2409 * * 2410 ******************************************/ 2411 2412 var keyCodes = { 2413 9: 'TAB', 2414 13: 'ENTER', 2415 27: 'ESCAPE', 2416 32: 'SPACE', 2417 35: 'END', 2418 36: 'HOME', 2419 37: 'ARROW_LEFT', 2420 38: 'ARROW_UP', 2421 39: 'ARROW_RIGHT', 2422 40: 'ARROW_DOWN' 2423 }; 2424 var commands = {}; // Functions pulled out to be referenceable from internals 2425 2426 function findFocusable($element) { 2427 if (!$element) { 2428 return false; 2429 } 2430 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 () { 2431 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is(':visible') || jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('tabindex') < 0) { 2432 return false; 2433 } //only have visible elements and those that have a tabindex greater or equal 0 2434 2435 return true; 2436 }).sort(function (a, b) { 2437 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex') === jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex')) { 2438 return 0; 2439 } 2440 var aTabIndex = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex'), 10), 2441 bTabIndex = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex'), 10); // Undefined is treated the same as 0 2442 2443 if (typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex') === 'undefined' && bTabIndex > 0) { 2444 return 1; 2445 } 2446 if (typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex') === 'undefined' && aTabIndex > 0) { 2447 return -1; 2448 } 2449 if (aTabIndex === 0 && bTabIndex > 0) { 2450 return 1; 2451 } 2452 if (bTabIndex === 0 && aTabIndex > 0) { 2453 return -1; 2454 } 2455 if (aTabIndex < bTabIndex) { 2456 return -1; 2457 } 2458 if (aTabIndex > bTabIndex) { 2459 return 1; 2460 } 2461 }); 2462 } 2463 function parseKey(event) { 2464 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 2465 2466 key = key.replace(/\W+/, ''); 2467 if (event.shiftKey) key = "SHIFT_".concat(key); 2468 if (event.ctrlKey) key = "CTRL_".concat(key); 2469 if (event.altKey) key = "ALT_".concat(key); // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`) 2470 2471 key = key.replace(/_$/, ''); 2472 return key; 2473 } 2474 var Keyboard = { 2475 keys: getKeyCodes(keyCodes), 2476 /** 2477 * Parses the (keyboard) event and returns a String that represents its key 2478 * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE 2479 * @param {Event} event - the event generated by the event handler 2480 * @return String key - String that represents the key pressed 2481 */ 2482 parseKey: parseKey, 2483 /** 2484 * Handles the given (keyboard) event 2485 * @param {Event} event - the event generated by the event handler 2486 * @param {String} component - Foundation component's name, e.g. Slider or Reveal 2487 * @param {Objects} functions - collection of functions that are to be executed 2488 */ 2489 handleKey: function handleKey(event, component, functions) { 2490 var commandList = commands[component], 2491 keyCode = this.parseKey(event), 2492 cmds, 2493 command, 2494 fn; 2495 if (!commandList) return console.warn('Component not defined!'); // Ignore the event if it was already handled 2496 2497 if (event.zfIsKeyHandled === true) return; // This component does not differentiate between ltr and rtl 2498 2499 if (typeof commandList.ltr === 'undefined') { 2500 cmds = commandList; // use plain list 2501 } else {
vendor: 4,139 bytes, lines 2502-2597
2502 // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa 2503 if (Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["rtl"])()) cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, commandList.ltr, commandList.rtl);else cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, commandList.rtl, commandList.ltr); 2504 } 2505 command = cmds[keyCode]; 2506 fn = functions[command]; // Execute the handler if found 2507 2508 if (fn && typeof fn === 'function') { 2509 var returnValue = fn.apply(); // Mark the event as "handled" to prevent future handlings 2510 2511 event.zfIsKeyHandled = true; // Execute function when event was handled 2512 2513 if (functions.handled || typeof functions.handled === 'function') { 2514 functions.handled(returnValue); 2515 } 2516 } else { 2517 // Execute function when event was not handled 2518 if (functions.unhandled || typeof functions.unhandled === 'function') { 2519 functions.unhandled(); 2520 } 2521 } 2522 }, 2523 /** 2524 * Finds all focusable elements within the given `$element` 2525 * @param {jQuery} $element - jQuery object to search within 2526 * @return {jQuery} $focusable - all focusable elements within `$element` 2527 */ 2528 findFocusable: findFocusable, 2529 /** 2530 * Returns the component name name 2531 * @param {Object} component - Foundation component, e.g. Slider or Reveal 2532 * @return String componentName 2533 */ 2534 register: function register(componentName, cmds) { 2535 commands[componentName] = cmds; 2536 }, 2537 // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context? 2538 // 2539 2540 /** 2541 * Traps the focus in the given element. 2542 * @param {jQuery} $element jQuery object to trap the foucs into. 2543 */ 2544 trapFocus: function trapFocus($element) { 2545 var $focusable = findFocusable($element), 2546 $firstFocusable = $focusable.eq(0), 2547 $lastFocusable = $focusable.eq(-1); 2548 $element.on('keydown.zf.trapfocus', function (event) { 2549 if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') { 2550 event.preventDefault(); 2551 $firstFocusable.focus(); 2552 } else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') { 2553 event.preventDefault(); 2554 $lastFocusable.focus(); 2555 } 2556 }); 2557 }, 2558 /** 2559 * Releases the trapped focus from the given element. 2560 * @param {jQuery} $element jQuery object to release the focus for. 2561 */ 2562 releaseFocus: function releaseFocus($element) { 2563 $element.off('keydown.zf.trapfocus'); 2564 } 2565 }; 2566 /* 2567 * Constants for easier comparing. 2568 * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE 2569 */ 2570 2571 function getKeyCodes(kcs) { 2572 var k = {}; 2573 for (var kc in kcs) { 2574 if (kcs.hasOwnProperty(kc)) k[kcs[kc]] = kcs[kc]; 2575 } 2576 return k; 2577 } 2578 2579 /***/ 2580 }), 2581 /***/23: ( 2582 /*!**************************************************************!*\ 2583 !*** multi ./js/entries/plugins/foundation.util.keyboard.js ***! 2584 \**************************************************************/ 2585 /*! no static exports found */ 2586 /***/ 2587 function _(module, exports, __webpack_require__) { 2588 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.util.keyboard.js */"./js/entries/plugins/foundation.util.keyboard.js"); 2589 2590 /***/ 2591 }), 2592 /***/"jquery": ( 2593 /*!********************************************************************************************!*\ 2594 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 2595 \********************************************************************************************/ 2596 /*! no static exports found */ 2597 /***/
2598 function jquery(module, exports) { 2599 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 2600 2601 /***/ 2602 }) 2603 2604 /******/ 2605 }); 2606}); 2607(function webpackUniversalModuleDefinition(root, factory) { 2608 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.util.imageLoader"] = factory(require("./foundation.core"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.imageLoader"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 2609})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 2610 return /******/function (modules) { 2611 // webpackBootstrap 2612 /******/ // The module cache 2613 /******/ 2614 var installedModules = {}; 2615 /******/ 2616 /******/ // The require function 2617 /******/ 2618 function __webpack_require__(moduleId) { 2619 /******/ 2620 /******/ // Check if module is in cache 2621 /******/if (installedModules[moduleId]) { 2622 /******/return installedModules[moduleId].exports; 2623 /******/ 2624 } 2625 /******/ // Create a new module (and put it into the cache) 2626 /******/ 2627 var module = installedModules[moduleId] = { 2628 /******/i: moduleId, 2629 /******/l: false, 2630 /******/exports: {} 2631 /******/ 2632 }; 2633 /******/ 2634 /******/ // Execute the module function 2635 /******/ 2636 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 2637 /******/ 2638 /******/ // Flag the module as loaded 2639 /******/ 2640 module.l = true; 2641 /******/ 2642 /******/ // Return the exports of the module 2643 /******/ 2644 return module.exports; 2645 /******/ 2646 } 2647 /******/ 2648 /******/ 2649 /******/ // expose the modules object (__webpack_modules__) 2650 /******/ 2651 __webpack_require__.m = modules; 2652 /******/ 2653 /******/ // expose the module cache 2654 /******/ 2655 __webpack_require__.c = installedModules; 2656 /******/ 2657 /******/ // define getter function for harmony exports 2658 /******/ 2659 __webpack_require__.d = function (exports, name, getter) { 2660 /******/if (!__webpack_require__.o(exports, name)) { 2661 /******/Object.defineProperty(exports, name, { 2662 enumerable: true, 2663 get: getter 2664 }); 2665 /******/ 2666 } 2667 /******/ 2668 }; 2669 /******/ 2670 /******/ // define __esModule on exports 2671 /******/ 2672 __webpack_require__.r = function (exports) { 2673 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 2674 /******/Object.defineProperty(exports, Symbol.toStringTag, { 2675 value: 'Module' 2676 }); 2677 /******/ 2678 } 2679 /******/ 2680 Object.defineProperty(exports, '__esModule', { 2681 value: true 2682 }); 2683 /******/ 2684 }; 2685 /******/ 2686 /******/ // create a fake namespace object 2687 /******/ // mode & 1: value is a module id, require it 2688 /******/ // mode & 2: merge all properties of value into the ns 2689 /******/ // mode & 4: return value when already ns object 2690 /******/ // mode & 8|1: behave like require 2691 /******/ 2692 __webpack_require__.t = function (value, mode) { 2693 /******/if (mode & 1) value = __webpack_require__(value); 2694 /******/ 2695 if (mode & 8) return value; 2696 /******/ 2697 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value; 2698 /******/ 2699 var ns = Object.create(null); 2700 /******/ 2701 __webpack_require__.r(ns); 2702 /******/ 2703 Object.defineProperty(ns, 'default', { 2704 enumerable: true, 2705 value: value 2706 }); 2707 /******/ 2708 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 2709 return value[key]; 2710 }.bind(null, key)); 2711 /******/ 2712 return ns; 2713 /******/ 2714 }; 2715 /******/ 2716 /******/ // getDefaultExport function for compatibility with non-harmony modules 2717 /******/ 2718 __webpack_require__.n = function (module) {
2719 /******/var getter = module && module.__esModule ? /******/function getDefault() { 2720 return module['default']; 2721 } : /******/function getModuleExports() { 2722 return module; 2723 }; 2724 /******/ 2725 __webpack_require__.d(getter, 'a', getter); 2726 /******/ 2727 return getter; 2728 /******/ 2729 }; 2730 /******/ 2731 /******/ // Object.prototype.hasOwnProperty.call 2732 /******/ 2733 __webpack_require__.o = function (object, property) { 2734 return Object.prototype.hasOwnProperty.call(object, property); 2735 }; 2736 /******/ 2737 /******/ // __webpack_public_path__ 2738 /******/ 2739 __webpack_require__.p = ""; 2740 /******/ 2741 /******/ 2742 /******/ // Load entry module and return exports 2743 /******/ 2744 return __webpack_require__(__webpack_require__.s = 22); 2745 /******/ 2746 } 2747 /************************************************************************/ 2748 /******/({ 2749 /***/"./foundation.core": ( 2750 /*!****************************************************************************************************************************************************************!*\ 2751 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 2752 \****************************************************************************************************************************************************************/ 2753 /*! no static exports found */ 2754 /***/ 2755 function _foundationCore(module, exports) { 2756 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 2757 2758 /***/ 2759 }), 2760
2760/***/"./js/entries/plugins/foundation.util.imageLoader.js": ( 2761 /*!***********************************************************!*\ 2762 !*** ./js/entries/plugins/foundation.util.imageLoader.js ***! 2763 \***********************************************************/ 2764 /*! exports provided: Foundation, onImagesLoaded */ 2765 /***/ 2766 function _js_entries_plugins_foundationUtilImageLoaderJs(module, __webpack_exports__, __webpack_require__) { 2767 "use strict"; 2768 2769 __webpack_require__.r(__webpack_exports__); 2770 /* harmony import */ 2771 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 2772 /* harmony import */ 2773 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 2774 /* harmony reexport (safe) */ 2775 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 2776 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 2777 }); 2778 2779 /* harmony import */ 2780 var _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.imageLoader */"./js/foundation.util.imageLoader.js"); 2781 /* harmony reexport (safe) */ 2782 __webpack_require__.d(__webpack_exports__, "onImagesLoaded", function () { 2783 return _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_1__["onImagesLoaded"]; 2784 }); 2785 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].onImagesLoaded = _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_1__["onImagesLoaded"]; 2786 2787 /***/ 2788 }), 2789
2789/***/"./js/foundation.util.imageLoader.js": ( 2790 /*!*******************************************!*\ 2791 !*** ./js/foundation.util.imageLoader.js ***! 2792 \*******************************************/ 2793 /*! exports provided: onImagesLoaded */ 2794 /***/ 2795 function _js_foundationUtilImageLoaderJs(module, __webpack_exports__, __webpack_require__) { 2796 "use strict"; 2797 2798 __webpack_require__.r(__webpack_exports__); 2799 /* harmony export (binding) */ 2800 __webpack_require__.d(__webpack_exports__, "onImagesLoaded", function () { 2801 return onImagesLoaded; 2802 }); 2803 /* harmony import */ 2804 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 2805 /* harmony import */ 2806 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 2807 2808 /** 2809 * Runs a callback function when images are fully loaded. 2810 * @param {Object} images - Image(s) to check if loaded. 2811 * @param {Func} callback - Function to execute when image is fully loaded. 2812 */ 2813 2814 function onImagesLoaded(images, callback) { 2815 var unloaded = images.length; 2816 if (unloaded === 0) { 2817 callback(); 2818 } 2819 images.each(function () { 2820 // Check if image is loaded 2821 if (this.complete && typeof this.naturalWidth !== 'undefined') { 2822 singleImageLoaded(); 2823 } else { 2824 // If the above check failed, simulate loading on detached element. 2825 var image = new Image(); // Still count image as loaded if it finalizes with an error. 2826 2827 var events = "load.zf.images error.zf.images"; 2828 jquery__WEBPACK_IMPORTED_MODULE_0___default()(image).one(events, function me() { 2829 // Unbind the event listeners. We're using 'one' but only one of the two events will have fired. 2830 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).off(events, me); 2831 singleImageLoaded(); 2832 }); 2833 image.src = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('src'); 2834 } 2835 }); 2836 function singleImageLoaded() { 2837 unloaded--; 2838 if (unloaded === 0) { 2839 callback(); 2840 } 2841 } 2842 } 2843 2844 /***/ 2845 }), 2846 /***/22: ( 2847 /*!*****************************************************************!*\ 2848 !*** multi ./js/entries/plugins/foundation.util.imageLoader.js ***! 2849 \*****************************************************************/ 2850 /*! no static exports found */ 2851 /***/ 2852 function _(module, exports, __webpack_require__) { 2853 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.util.imageLoader.js */"./js/entries/plugins/foundation.util.imageLoader.js"); 2854 2855 /***/ 2856 }), 2857 /***/"jquery": ( 2858 /*!********************************************************************************************!*\ 2859 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 2860 \********************************************************************************************/ 2861 /*! no static exports found */ 2862 /***/ 2863 function jquery(module, exports) { 2864 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 2865 2866 /***/ 2867 }) 2868 2869 /******/ 2870 }); 2871}); 2872(function webpackUniversalModuleDefinition(root, factory) { 2873 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.util.motion"] = factory(require("./foundation.core"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 2874})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 2875 return /******/function (modules) { 2876 // webpackBootstrap 2877 /******/ // The module cache 2878 /******/ 2879 var installedModules = {}; 2880 /******/ 2881 /******/ // The require function 2882 /******/ 2883 function __webpack_require__(moduleId) { 2884 /******/ 2885 /******/ // Check if module is in cache 2886 /******/if (installedModules[moduleId]) { 2887 /******/return installedModules[moduleId].exports; 2888 /******/ 2889 } 2890 /******/ // Create a new module (and put it into the cache) 2891 /******/ 2892 var module = installedModules[moduleId] = { 2893 /******/i: moduleId, 2894 /******/l: false, 2895 /******/exports: {} 2896 /******/ 2897 }; 2898 /******/ 2899 /******/ // Execute the module function 2900 /******/ 2901 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 2902 /******/ 2903 /******/ // Flag the module as loaded 2904 /******/ 2905 module.l = true; 2906 /******/ 2907 /******/ // Return the exports of the module 2908 /******/ 2909 return module.exports; 2910 /******/ 2911 } 2912 /******/ 2913 /******/ 2914 /******/ // expose the modules object (__webpack_modules__) 2915 /******/ 2916 __webpack_require__.m = modules; 2917 /******/ 2918 /******/ // expose the module cache 2919 /******/ 2920 __webpack_require__.c = installedModules; 2921 /******/ 2922 /******/ // define getter function for harmony exports 2923 /******/ 2924 __webpack_require__.d = function (exports, name, getter) { 2925 /******/if (!__webpack_require__.o(exports, name)) { 2926 /******/Object.defineProperty(exports, name, { 2927 enumerable: true, 2928 get: getter 2929 }); 2930 /******/ 2931 } 2932 /******/ 2933 }; 2934 /******/ 2935 /******/ // define __esModule on exports 2936 /******/ 2937 __webpack_require__.r = function (exports) { 2938 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 2939 /******/Object.defineProperty(exports, Symbol.toStringTag, { 2940 value: 'Module' 2941 }); 2942 /******/ 2943 } 2944 /******/ 2945 Object.defineProperty(exports, '__esModule', { 2946 value: true 2947 }); 2948 /******/ 2949 }; 2950 /******/ 2951 /******/ // create a fake namespace object 2952 /******/ // mode & 1: value is a module id, require it 2953 /******/ // mode & 2: merge all properties of value into the ns 2954 /******/ // mode & 4: return value when already ns object 2955 /******/ // mode & 8|1: behave like require 2956 /******/ 2957 __webpack_require__.t = function (value, mode) { 2958 /******/if (mode & 1) value = __webpack_require__(value); 2959 /******/ 2960 if (mode & 8) return value; 2961 /******/ 2962 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esMo
vendor: 2,260 bytes, lines 2962-3025
2962dule) return value; 2963 /******/ 2964 var ns = Object.create(null); 2965 /******/ 2966 __webpack_require__.r(ns); 2967 /******/ 2968 Object.defineProperty(ns, 'default', { 2969 enumerable: true, 2970 value: value 2971 }); 2972 /******/ 2973 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 2974 return value[key]; 2975 }.bind(null, key)); 2976 /******/ 2977 return ns; 2978 /******/ 2979 }; 2980 /******/ 2981 /******/ // getDefaultExport function for compatibility with non-harmony modules 2982 /******/ 2983 __webpack_require__.n = function (module) { 2984 /******/var getter = module && module.__esModule ? /******/function getDefault() { 2985 return module['default']; 2986 } : /******/function getModuleExports() { 2987 return module; 2988 }; 2989 /******/ 2990 __webpack_require__.d(getter, 'a', getter); 2991 /******/ 2992 return getter; 2993 /******/ 2994 }; 2995 /******/ 2996 /******/ // Object.prototype.hasOwnProperty.call 2997 /******/ 2998 __webpack_require__.o = function (object, property) { 2999 return Object.prototype.hasOwnProperty.call(object, property); 3000 }; 3001 /******/ 3002 /******/ // __webpack_public_path__ 3003 /******/ 3004 __webpack_require__.p = ""; 3005 /******/ 3006 /******/ 3007 /******/ // Load entry module and return exports 3008 /******/ 3009 return __webpack_require__(__webpack_require__.s = 25); 3010 /******/ 3011 } 3012 /************************************************************************/ 3013 /******/({ 3014 /***/"./foundation.core": ( 3015 /*!****************************************************************************************************************************************************************!*\ 3016 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 3017 \****************************************************************************************************************************************************************/ 3018 /*! no static exports found */ 3019 /***/ 3020 function _foundationCore(module, exports) { 3021 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 3022 3023 /***/ 3024 }), 3025
3025/***/"./js/entries/plugins/foundation.util.motion.js": ( 3026 /*!******************************************************!*\ 3027 !*** ./js/entries/plugins/foundation.util.motion.js ***! 3028 \******************************************************/ 3029 /*! exports provided: Foundation, Motion, Move */ 3030 /***/ 3031 function _js_entries_plugins_foundationUtilMotionJs(module, __webpack_exports__, __webpack_require__) { 3032 "use strict"; 3033 3034 __webpack_require__.r(__webpack_exports__); 3035 /* harmony import */ 3036 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 3037 /* harmony import */ 3038 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 3039 /* harmony reexport (safe) */ 3040 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 3041 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 3042 }); 3043 3044 /* harmony import */ 3045 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.motion */"./js/foundation.util.motion.js"); 3046 /* harmony reexport (safe) */ 3047 __webpack_require__.d(__webpack_exports__, "Motion", function () { 3048 return _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"]; 3049 }); 3050 3051 /* harmony reexport (safe) */ 3052 __webpack_require__.d(__webpack_exports__, "Move", function () { 3053 return _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Move"]; 3054 }); 3055 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Motion = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"]; 3056 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Move = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Move"]; 3057 3058 /***/ 3059 }), 3060
vendor: 5,422 bytes, lines 3060-3187
3060/***/"./js/foundation.util.motion.js": ( 3061 /*!**************************************!*\ 3062 !*** ./js/foundation.util.motion.js ***! 3063 \**************************************/ 3064 /*! exports provided: Move, Motion */ 3065 /***/ 3066 function _js_foundationUtilMotionJs(module, __webpack_exports__, __webpack_require__) { 3067 "use strict"; 3068 3069 __webpack_require__.r(__webpack_exports__); 3070 /* harmony export (binding) */ 3071 __webpack_require__.d(__webpack_exports__, "Move", function () { 3072 return Move; 3073 }); 3074 /* harmony export (binding) */ 3075 __webpack_require__.d(__webpack_exports__, "Motion", function () { 3076 return Motion; 3077 }); 3078 /* harmony import */ 3079 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 3080 /* harmony import */ 3081 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3082 /* harmony import */ 3083 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */"./foundation.core"); 3084 /* harmony import */ 3085 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 3086 3087 /** 3088 * Motion module. 3089 * @module foundation.motion 3090 */ 3091 3092 var initClasses = ['mui-enter', 'mui-leave']; 3093 var activeClasses = ['mui-enter-active', 'mui-leave-active']; 3094 var Motion = { 3095 animateIn: function animateIn(element, animation, cb) { 3096 animate(true, element, animation, cb); 3097 }, 3098 animateOut: function animateOut(element, animation, cb) { 3099 animate(false, element, animation, cb); 3100 } 3101 }; 3102 function Move(duration, elem, fn) { 3103 var anim, 3104 prog, 3105 start = null; 3106 if (duration === 0) { 3107 fn.apply(elem); 3108 elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]); 3109 return; 3110 } 3111 function move(ts) { 3112 if (!start) start = ts; 3113 prog = ts - start; 3114 fn.apply(elem); 3115 if (prog < duration) { 3116 anim = window.requestAnimationFrame(move, elem); 3117 } else { 3118 window.cancelAnimationFrame(anim); 3119 elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]); 3120 } 3121 } 3122 anim = window.requestAnimationFrame(move); 3123 } 3124 /** 3125 * Animates an element in or out using a CSS transition class. 3126 * @function 3127 * @private 3128 * @param {Boolean} isIn - Defines if the animation is in or out. 3129 * @param {Object} element - jQuery or HTML object to animate. 3130 * @param {String} animation - CSS class to use. 3131 * @param {Function} cb - Callback to run when animation is finished. 3132 */ 3133 3134 function animate(isIn, element, animation, cb) { 3135 element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element).eq(0); 3136 if (!element.length) return; 3137 var initClass = isIn ? initClasses[0] : initClasses[1]; 3138 var activeClass = isIn ? activeClasses[0] : activeClasses[1]; // Set up the animation 3139 3140 reset(); 3141 element.addClass(animation).css('transition', 'none'); 3142 requestAnimationFrame(function () { 3143 element.addClass(initClass); 3144 if (isIn) element.show(); 3145 }); // Start the animation 3146 3147 requestAnimationFrame(function () { 3148 // will trigger the browser to synchronously calculate the style and layout 3149 // also called reflow or layout thrashing 3150 // see https://gist.github.com/paulirish/5d52fb081b3570c81e3a 3151 element[0].offsetWidth; 3152 element.css('transition', '').addClass(activeClass); 3153 }); // Clean up the animation when it finishes 3154 3155 element.one(Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["transitionend"])(element), finish); // Hides the element (for out animations), resets the element, and runs a callback 3156 3157 function finish() { 3158 if (!isIn) element.hide(); 3159 reset(); 3160 if (cb) cb.apply(element); 3161 } // Resets transitions and removes motion-specific classes 3162 3163 function reset() { 3164 element[0].style.transitionDuration = 0; 3165 element.removeClass("".concat(initClass, " ").concat(activeClass, " ").concat(animation)); 3166 } 3167 } 3168 3169 /***/ 3170 }), 3171 /***/25: ( 3172 /*!************************************************************!*\ 3173 !*** multi ./js/entries/plugins/foundation.util.motion.js ***! 3174 \************************************************************/ 3175 /*! no static exports found */ 3176 /***/ 3177 function _(module, exports, __webpack_require__) { 3178 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.util.motion.js */"./js/entries/plugins/foundation.util.motion.js"); 3179 3180 /***/ 3181 }), 3182 /***/"jquery": ( 3183 /*!********************************************************************************************!*\ 3184 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 3185 \********************************************************************************************/ 3186 /*! no static exports found */ 3187 /***/
3188 function jquery(module, exports) { 3189 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 3190 3191 /***/ 3192 }) 3193 3194 /******/ 3195 }); 3196}); 3197(function webpackUniversalModuleDefinition(root, factory) { 3198 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("./foundation.util.motion"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "./foundation.util.motion", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.util.triggers"] = factory(require("./foundation.core"), require("./foundation.util.motion"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.triggers"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"], root["jQuery"]); 3199})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 3200 return /******/function (modules) { 3201 // webpackBootstrap 3202 /******/ // The module cache 3203 /******/ 3204 var installedModules = {}; 3205 /******/ 3206 /******/ // The require function 3207 /******/ 3208 function __webpack_require__(moduleId) { 3209 /******/ 3210 /******/ // Check if module is in cache 3211 /******/if (installedModules[moduleId]) { 3212 /******/return installedModules[moduleId].exports; 3213 /******/ 3214 } 3215 /******/ // Create a new module (and put it into the cache) 3216 /******/ 3217 var module = installedModules[moduleId] = { 3218 /******/i: moduleId, 3219 /******/l: false, 3220 /******/exports: {} 3221 /******/ 3222 }; 3223 /******/ 3224 /******/ // Execute the module function 3225 /******/ 3226 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 3227 /******/ 3228 /******/ // Flag the module as loaded 3229 /******/ 3230 module.l = true; 3231 /******/ 3232 /******/ // Return the exports of the module 3233 /******/ 3234 return module.exports; 3235 /******/ 3236 } 3237 /******/ 3238 /******/ 3239 /******/ // expose the modules object (__webpack_modules__) 3240 /******/ 3241 __webpack_require__.m = modules; 3242 /******/ 3243 /******/ // expose the module cache 3244 /******/ 3245 __webpack_require__.c = installedModules; 3246 /******/ 3247 /******/ // define getter function for harmony exports 3248 /******/ 3249 __webpack_require__.d = function (exports, name, getter) { 3250 /******/if (!__webpack_require__.o(exports, name)) { 3251 /******/Object.defineProperty(exports, name, { 3252 enumerable: true, 3253 get: getter 3254 }); 3255 /******/ 3256 } 3257 /******/ 3258 }; 3259 /******/ 3260 /******/ // define __esModule on exports 3261 /******/ 3262 __webpack_require__.r = function (exports) { 3263 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 3264 /******/Object.defineProperty(exports, Symbol.toStringTag, { 3265 value: 'Module' 3266 }); 3267 /******/ 3268 } 3269 /******/ 3270 Object.defineProperty(exports, '__esModule', { 3271 value: true 3272 }); 3273 /******/ 3274 }; 3275 /******/ 3276 /******/ // create a fake namespace object 3277 /******/ // mode & 1: value is a module id, require it 3278 /******/ // mode & 2: merge all properties of value into the ns 3279 /******/ // mode & 4: return value when already ns object 3280 /******/ // mode & 8|1: behave like require 3281 /******/ 3282 __webpack_require__.t = function (value, mode) { 3283 /******/if (mode & 1) value = __webpack_require__(value); 3284 /******/ 3285 if (mode & 8) return value; 3286 /******/ 3287 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value; 3288 /******/ 3289 var ns = Object.create(null); 3290 /******/ 3291 __webpack_require__.r(ns); 3292 /******/ 3293 Object.defineProperty(ns, 'default', { 3294 enumerable: true, 3295 value: value 3296 }); 3297 /******/ 3298 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 3299 return value[key]; 3300 }.bind(null, key)); 3301 /******/ 3302 return ns; 3303 /******/ 3304 }; 3305 /******/ 3306 /******/ // getDefaultExport function for compatibility with non-harmony modules 3307 /******/ 3308 __webpack_require__.n = function (module) {
3309 /******/var getter = module && module.__esModule ? /******/function getDefault() { 3310 return module['default']; 3311 } : /******/function getModuleExports() { 3312 return module; 3313 }; 3314 /******/ 3315 __webpack_require__.d(getter, 'a', getter); 3316 /******/ 3317 return getter; 3318 /******/ 3319 }; 3320 /******/ 3321 /******/ // Object.prototype.hasOwnProperty.call 3322 /******/ 3323 __webpack_require__.o = function (object, property) { 3324 return Object.prototype.hasOwnProperty.call(object, property); 3325 }; 3326 /******/ 3327 /******/ // __webpack_public_path__ 3328 /******/ 3329 __webpack_require__.p = ""; 3330 /******/ 3331 /******/ 3332 /******/ // Load entry module and return exports 3333 /******/ 3334 return __webpack_require__(__webpack_require__.s = 29); 3335 /******/ 3336 } 3337 /************************************************************************/ 3338 /******/({ 3339 /***/"./foundation.core": ( 3340 /*!****************************************************************************************************************************************************************!*\ 3341 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 3342 \****************************************************************************************************************************************************************/ 3343 /*! no static exports found */ 3344 /***/ 3345 function _foundationCore(module, exports) { 3346 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 3347 3348 /***/ 3349 }), 3350 /***/"./foundation.util.motion": ( 3351 /*!********************************************************************************************************************************************************************************************!*\ 3352 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***! 3353 \********************************************************************************************************************************************************************************************/ 3354 /*! no static exports found */ 3355 /***/ 3356 function _foundationUtilMotion(module, exports) { 3357 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__; 3358 3359 /***/ 3360 }), 3361
3361/***/"./js/entries/plugins/foundation.util.triggers.js": ( 3362 /*!********************************************************!*\ 3363 !*** ./js/entries/plugins/foundation.util.triggers.js ***! 3364 \********************************************************/ 3365 /*! exports provided: Foundation, Triggers */ 3366 /***/ 3367 function _js_entries_plugins_foundationUtilTriggersJs(module, __webpack_exports__, __webpack_require__) { 3368 "use strict"; 3369 3370 __webpack_require__.r(__webpack_exports__); 3371 /* harmony import */ 3372 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 3373 /* harmony import */ 3374 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 3375 /* harmony reexport (safe) */ 3376 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 3377 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 3378 }); 3379 3380 /* harmony import */ 3381 var jquery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jquery */"jquery"); 3382 /* harmony import */ 3383 var jquery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_1__); 3384 /* harmony import */ 3385 var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../foundation.util.triggers */"./js/foundation.util.triggers.js"); 3386 /* harmony reexport (safe) */ 3387 __webpack_require__.d(__webpack_exports__, "Triggers", function () { 3388 return _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_2__["Triggers"]; 3389 }); 3390 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_2__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_1___default.a, _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]); 3391 3392 /***/ 3393 }), 3394
vendor: 13,410 bytes, lines 3394-3655
3394/***/"./js/foundation.util.triggers.js": ( 3395 /*!****************************************!*\ 3396 !*** ./js/foundation.util.triggers.js ***! 3397 \****************************************/ 3398 /*! exports provided: Triggers */ 3399 /***/ 3400 function _js_foundationUtilTriggersJs(module, __webpack_exports__, __webpack_require__) { 3401 "use strict"; 3402 3403 __webpack_require__.r(__webpack_exports__); 3404 /* harmony export (binding) */ 3405 __webpack_require__.d(__webpack_exports__, "Triggers", function () { 3406 return Triggers; 3407 }); 3408 /* harmony import */ 3409 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 3410 /* harmony import */ 3411 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3412 /* harmony import */ 3413 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */"./foundation.core"); 3414 /* harmony import */ 3415 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 3416 /* harmony import */ 3417 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */"./foundation.util.motion"); 3418 /* harmony import */ 3419 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__); 3420 function _typeof(obj) { 3421 "@babel/helpers - typeof"; 3422 3423 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 3424 _typeof = function _typeof(obj) { 3425 return typeof obj; 3426 }; 3427 } else { 3428 _typeof = function _typeof(obj) { 3429 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 3430 }; 3431 } 3432 return _typeof(obj); 3433 } 3434 var MutationObserver = function () { 3435 var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; 3436 for (var i = 0; i < prefixes.length; i++) { 3437 if ("".concat(prefixes[i], "MutationObserver") in window) { 3438 return window["".concat(prefixes[i], "MutationObserver")]; 3439 } 3440 } 3441 return false; 3442 }(); 3443 var triggers = function triggers(el, type) { 3444 el.data(type).split(' ').forEach(function (id) { 3445 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]); 3446 }); 3447 }; 3448 var Triggers = { 3449 Listeners: { 3450 Basic: {}, 3451 Global: {} 3452 }, 3453 Initializers: {} 3454 }; 3455 Triggers.Listeners.Basic = { 3456 openListener: function openListener() { 3457 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open'); 3458 }, 3459 closeListener: function closeListener() { 3460 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close'); 3461 if (id) { 3462 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close'); 3463 } else { 3464 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger'); 3465 } 3466 }, 3467 toggleListener: function toggleListener() { 3468 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 3469 if (id) { 3470 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle'); 3471 } else { 3472 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger'); 3473 } 3474 }, 3475 closeableListener: function closeableListener(e) { 3476 var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable'); // Only close the first closable element. See https://git.io/zf-7833 3477 3478 e.stopPropagation(); 3479 if (animation !== '') { 3480 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () { 3481 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf'); 3482 }); 3483 } else { 3484 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf'); 3485 } 3486 }, 3487 toggleFocusListener: function toggleFocusListener() { 3488 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus'); 3489 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]); 3490 } 3491 }; // Elements with [data-open] will reveal a plugin that supports it when clicked. 3492 3493 Triggers.Initializers.addOpenListener = function ($elem) { 3494 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); 3495 $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); 3496 }; // Elements with [data-close] will close a plugin that supports it when clicked. 3497 // If used without a value on [data-close], the event will bubble, allowing it to close a parent component. 3498 3499 Triggers.Initializers.addCloseListener = function ($elem) { 3500 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); 3501 $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); 3502 }; // Elements with [data-toggle] will toggle a plugin that supports it when clicked. 3503 3504 Triggers.Initializers.addToggleListener = function ($elem) { 3505 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); 3506 $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); 3507 }; // Elements with [data-closable] will respond to close.zf.trigger events. 3508 3509 Triggers.Initializers.addCloseableListener = function ($elem) { 3510 $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); 3511 $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); 3512 }; // Elements with [data-toggle-focus] will respond to coming in and out of focus 3513 3514 Triggers.Initializers.addToggleFocusListener = function ($elem) { 3515 $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); 3516 $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); 3517 }; // More Global/complex listeners and triggers 3518 3519 Triggers.Listeners.Global = { 3520 resizeListener: function resizeListener($nodes) { 3521 if (!MutationObserver) { 3522 //fallback for IE 9 3523 $nodes.each(function () { 3524 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger'); 3525 }); 3526 } //trigger all listening elements and signal a resize event 3527 3528 $nodes.attr('data-events', "resize"); 3529 }, 3530 scrollListener: function scrollListener($nodes) { 3531 if (!MutationObserver) { 3532 //fallback for IE 9 3533 $nodes.each(function () { 3534 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger'); 3535 }); 3536 } //trigger all listening elements and signal a scroll event 3537 3538 $nodes.attr('data-events', "scroll"); 3539 }, 3540 closeMeListener: function closeMeListener(e, pluginId) { 3541 var plugin = e.namespace.split('.')[0]; 3542 var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]")); 3543 plugins.each(function () { 3544 var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 3545 _this.triggerHandler('close.zf.trigger', [_this]); 3546 }); 3547 } 3548 }; // Global, parses whole document. 3549 3550 Triggers.Initializers.addClosemeListener = function (pluginName) { 3551 var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'), 3552 plugNames = ['dropdown', 'tooltip', 'reveal']; 3553 if (pluginName) { 3554 if (typeof pluginName === 'string') { 3555 plugNames.push(pluginName); 3556 } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') { 3557 plugNames = plugNames.concat(pluginName); 3558 } else { 3559 console.error('Plugin names must be strings'); 3560 } 3561 } 3562 if (yetiBoxes.length) { 3563 var listeners = plugNames.map(function (name) { 3564 return "closeme.zf.".concat(name); 3565 }).join(' '); 3566 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); 3567 } 3568 }; 3569 function debounceGlobalListener(debounce, trigger, listener) { 3570 var timer, 3571 args = Array.prototype.slice.call(arguments, 3); 3572 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on(trigger, function () { 3573 if (timer) { 3574 clearTimeout(timer); 3575 } 3576 timer = setTimeout(function () { 3577 listener.apply(null, args); 3578 }, debounce || 10); //default time to emit scroll event 3579 }); 3580 } 3581 Triggers.Initializers.addResizeListener = function (debounce) { 3582 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]'); 3583 if ($nodes.length) { 3584 debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); 3585 } 3586 }; 3587 Triggers.Initializers.addScrollListener = function (debounce) { 3588 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]'); 3589 if ($nodes.length) { 3590 debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); 3591 } 3592 }; 3593 Triggers.Initializers.addMutationEventsListener = function ($elem) { 3594 if (!MutationObserver) { 3595 return false; 3596 } 3597 var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); //element callback 3598 3599 var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) { 3600 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target); //trigger the event handler for the element depending on type 3601 3602 switch (mutationRecordsList[0].type) { 3603 case "attributes": 3604 if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { 3605 $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); 3606 } 3607 if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { 3608 $target.triggerHandler('resizeme.zf.trigger', [$target]); 3609 } 3610 if (mutationRecordsList[0].attributeName === "style") { 3611 $target.closest("[data-mutate]").attr("data-events", "mutate"); 3612 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 3613 } 3614 break; 3615 case "childList": 3616 $target.closest("[data-mutate]").attr("data-events", "mutate"); 3617 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 3618 break; 3619 default: 3620 return false; 3621 //nothing 3622 } 3623 }; 3624 if ($nodes.length) { 3625 //for each element that needs to listen for resizing, scrolling, or mutation add a single observer 3626 for (var i = 0; i <= $nodes.length - 1; i++) { 3627 var elementObserver = new MutationObserver(listeningElementsMutation); 3628 elementObserver.observe($nodes[i], { 3629 attributes: true, 3630 childList: true, 3631 characterData: false, 3632 subtree: true, 3633 attributeFilter: ["data-events", "style"] 3634 }); 3635 } 3636 } 3637 }; 3638 Triggers.Initializers.addSimpleListeners = function () { 3639 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 3640 Triggers.Initializers.addOpenListener($document); 3641 Triggers.Initializers.addCloseListener($document); 3642 Triggers.Initializers.addToggleListener($document); 3643 Triggers.Initializers.addCloseableListener($document); 3644 Triggers.Initializers.addToggleFocusListener($document); 3645 }; 3646 Triggers.Initializers.addGlobalListeners = function () { 3647 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 3648 Triggers.Initializers.addMutationEventsListener($document); 3649 Triggers.Initializers.addResizeListener(250); 3650 Triggers.Initializers.addScrollListener(); 3651 Triggers.Initializers.addClosemeListener(); 3652 }; 3653 Triggers.init = function (__, Foundation) { 3654 Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["onLoad"])(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 3655 if (jquery__WEBPACK_IMPORTED_MODULE_0___default.a.triggersInitialized !== true) {
3656 Triggers.Initializers.addSimpleListeners(); 3657 Triggers.Initializers.addGlobalListeners(); 3658 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.triggersInitialized = true; 3659 } 3660 }); 3661 if (Foundation) { 3662 Foundation.Triggers = Triggers; // Legacy included to be backwards compatible for now. 3663 3664 Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; 3665 } 3666 }; 3667 3668 /***/ 3669 }), 3670 /***/29: ( 3671 /*!**************************************************************!*\ 3672 !*** multi ./js/entries/plugins/foundation.util.triggers.js ***! 3673 \**************************************************************/ 3674 /*! no static exports found */ 3675 /***/ 3676 function _(module, exports, __webpack_require__) { 3677 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.util.triggers.js */"./js/entries/plugins/foundation.util.triggers.js"); 3678 3679 /***/ 3680 }), 3681 /***/"jquery": ( 3682 /*!********************************************************************************************!*\ 3683 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 3684 \********************************************************************************************/ 3685 /*! no static exports found */ 3686 /***/ 3687 function jquery(module, exports) { 3688 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 3689 3690 /***/ 3691 }) 3692 3693 /******/ 3694 }); 3695}); 3696(function webpackUniversalModuleDefinition(root, factory) { 3697 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.util.touch"] = factory(require("./foundation.core"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 3698})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 3699 return /******/function (modules) { 3700 // webpackBootstrap 3701 /******/ // The module cache 3702 /******/ 3703 var installedModules = {}; 3704 /******/ 3705 /******/ // The require function 3706 /******/ 3707 function __webpack_require__(moduleId) { 3708 /******/ 3709 /******/ // Check if module is in cache 3710 /******/if (installedModules[moduleId]) { 3711 /******/return installedModules[moduleId].exports; 3712 /******/ 3713 } 3714 /******/ // Create a new module (and put it into the cache) 3715 /******/ 3716 var module = installedModules[moduleId] = { 3717 /******/i: moduleId, 3718 /******/l: false, 3719 /******/exports: {} 3720 /******/ 3721 }; 3722 /******/ 3723 /******/ // Execute the module function 3724 /******/ 3725 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 3726 /******/ 3727 /******/ // Flag the module as loaded 3728 /******/ 3729 module.l = true; 3730 /******/ 3731 /******/ // Return the exports of the module 3732 /******/ 3733 return module.exports; 3734 /******/ 3735 } 3736 /******/ 3737 /******/ 3738 /******/ // expose the modules object (__webpack_modules__) 3739 /******/ 3740 __webpack_require__.m = modules; 3741 /******/ 3742 /******/ // expose the module cache 3743 /******/ 3744 __webpack_require__.c = installedModules; 3745 /******/ 3746 /******/ // define getter function for harmony exports 3747 /******/ 3748 __webpack_require__.d = function (exports, name, getter) { 3749 /******/if (!__webpack_require__.o(exports, name)) { 3750 /******/Object.defineProperty(exports, name, { 3751 enumerable: true, 3752 get: getter 3753 }); 3754 /******/ 3755 } 3756 /******/ 3757 }; 3758 /******/ 3759 /******/ // define __esModule on exports 3760 /******/ 3761 __webpack_require__.r = function (exports) { 3762 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 3763 /******/Object.defineProperty(exports, Symbol.toStringTag, { 3764 value: 'Module' 3765 }); 3766 /******/ 3767 } 3768 /******/ 3769 Object.defineProperty(exports, '__esModule', { 3770 value: true 3771 }); 3772 /******/ 3773 }; 3774 /******/ 3775 /******/ // create a fake namespace object 3776 /******/ // mode & 1: value is a module id, require it 3777 /******/ // mode & 2: merge all properties of value into the ns 3778 /******/ // mode & 4: return value when already ns object 3779 /******/ // mode & 8|1: behave like require 3780 /******/ 3781 __webpack_require__.t = function (value, mode) { 3782 /******/if (mode & 1) value = __webpack_require__(value); 3783 /******/ 3784 if (mode & 8) return value; 3785 /******/ 3786 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esMo
vendor: 2,260 bytes, lines 3786-3849
3786dule) return value; 3787 /******/ 3788 var ns = Object.create(null); 3789 /******/ 3790 __webpack_require__.r(ns); 3791 /******/ 3792 Object.defineProperty(ns, 'default', { 3793 enumerable: true, 3794 value: value 3795 }); 3796 /******/ 3797 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 3798 return value[key]; 3799 }.bind(null, key)); 3800 /******/ 3801 return ns; 3802 /******/ 3803 }; 3804 /******/ 3805 /******/ // getDefaultExport function for compatibility with non-harmony modules 3806 /******/ 3807 __webpack_require__.n = function (module) { 3808 /******/var getter = module && module.__esModule ? /******/function getDefault() { 3809 return module['default']; 3810 } : /******/function getModuleExports() { 3811 return module; 3812 }; 3813 /******/ 3814 __webpack_require__.d(getter, 'a', getter); 3815 /******/ 3816 return getter; 3817 /******/ 3818 }; 3819 /******/ 3820 /******/ // Object.prototype.hasOwnProperty.call 3821 /******/ 3822 __webpack_require__.o = function (object, property) { 3823 return Object.prototype.hasOwnProperty.call(object, property); 3824 }; 3825 /******/ 3826 /******/ // __webpack_public_path__ 3827 /******/ 3828 __webpack_require__.p = ""; 3829 /******/ 3830 /******/ 3831 /******/ // Load entry module and return exports 3832 /******/ 3833 return __webpack_require__(__webpack_require__.s = 28); 3834 /******/ 3835 } 3836 /************************************************************************/ 3837 /******/({ 3838 /***/"./foundation.core": ( 3839 /*!****************************************************************************************************************************************************************!*\ 3840 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 3841 \****************************************************************************************************************************************************************/ 3842 /*! no static exports found */ 3843 /***/ 3844 function _foundationCore(module, exports) { 3845 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 3846 3847 /***/ 3848 }), 3849
3849/***/"./js/entries/plugins/foundation.util.touch.js": ( 3850 /*!*****************************************************!*\ 3851 !*** ./js/entries/plugins/foundation.util.touch.js ***! 3852 \*****************************************************/ 3853 /*! exports provided: Foundation, Touch */ 3854 /***/ 3855 function _js_entries_plugins_foundationUtilTouchJs(module, __webpack_exports__, __webpack_require__) { 3856 "use strict"; 3857 3858 __webpack_require__.r(__webpack_exports__); 3859 /* harmony import */ 3860 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 3861 /* harmony import */ 3862 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3863 /* harmony import */ 3864 var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.touch */"./js/foundation.util.touch.js"); 3865 /* harmony reexport (safe) */ 3866 __webpack_require__.d(__webpack_exports__, "Touch", function () { 3867 return _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"]; 3868 }); 3869 3870 /* harmony import */ 3871 var _foundation_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 3872 /* harmony import */ 3873 var _foundation_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_2__); 3874 /* harmony reexport (safe) */ 3875 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 3876 return _foundation_core__WEBPACK_IMPORTED_MODULE_2__["Foundation"]; 3877 }); 3878 _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 3879 window.Foundation.Touch = _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"]; 3880 3881 /***/ 3882 }), 3883
3883/***/"./js/foundation.util.touch.js": ( 3884 /*!*************************************!*\ 3885 !*** ./js/foundation.util.touch.js ***! 3886 \*************************************/ 3887 /*! exports provided: Touch */ 3888 /***/ 3889 function _js_foundationUtilTouchJs(module, __webpack_exports__, __webpack_require__) { 3890 "use strict"; 3891 3892 __webpack_require__.r(__webpack_exports__); 3893 /* harmony export (binding) */ 3894 __webpack_require__.d(__webpack_exports__, "Touch", function () { 3895 return Touch; 3896 }); 3897 /* harmony import */ 3898 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 3899 /* harmony import */ 3900 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3901 function _classCallCheck(instance, Constructor) { 3902 if (!(instance instanceof Constructor)) { 3903 throw new TypeError("Cannot call a class as a function"); 3904 } 3905 } 3906 function _defineProperties(target, props) { 3907 for (var i = 0; i < props.length; i++) { 3908 var descriptor = props[i]; 3909 descriptor.enumerable = descriptor.enumerable || false; 3910 descriptor.configurable = true; 3911 if ("value" in descriptor) descriptor.writable = true; 3912 Object.defineProperty(target, descriptor.key, descriptor); 3913 } 3914 } 3915 function _createClass(Constructor, protoProps, staticProps) { 3916 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 3917 if (staticProps) _defineProperties(Constructor, staticProps); 3918 return Constructor; 3919 } 3920 3921 //************************************************** 3922 //**Work inspired by multiple jquery swipe plugins** 3923 //**Done by Yohai Ararat *************************** 3924 //************************************************** 3925 3926 var Touch = {}; 3927 var startPosX, 3928 startTime, 3929 elapsedTime, 3930 startEvent, 3931 isMoving = false, 3932 didMoved = false; 3933 function onTouchEnd(e) { 3934 this.removeEventListener('touchmove', onTouchMove); 3935 this.removeEventListener('touchend', onTouchEnd); // If the touch did not move, consider it as a "tap" 3936 3937 if (!didMoved) { 3938 var tapEvent = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.Event('tap', startEvent || e); 3939 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(tapEvent); 3940 } 3941 startEvent = null; 3942 isMoving = false; 3943 didMoved = false; 3944 } 3945 function onTouchMove(e) { 3946 if (true === jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.preventDefault) { 3947 e.preventDefault(); 3948 } 3949 if (isMoving) { 3950 var x = e.touches[0].pageX; // var y = e.touches[0].pageY; 3951 3952 var dx = startPosX - x; // var dy = startPosY - y; 3953 3954 var dir; 3955 didMoved = true; 3956 elapsedTime = new Date().getTime() - startTime; 3957 if (Math.abs(dx) >= jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.moveThreshold && elapsedTime <= jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.timeThreshold) { 3958 dir = dx > 0 ? 'left' : 'right'; 3959 } // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) { 3960 // dir = dy > 0 ? 'down' : 'up'; 3961 // } 3962 3963 if (dir) { 3964 e.preventDefault(); 3965 onTouchEnd.apply(this, arguments); 3966 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default.a.Event('swipe', Object.assign({}, e)), dir).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default.a.Event("swipe".concat(dir), Object.assign({}, e))); 3967 } 3968 } 3969 } 3970 function onTouchStart(e) { 3971 if (e.touches.length === 1) { 3972 startPosX = e.touches[0].pageX; 3973 startEvent = e; 3974 isMoving = true; 3975 didMoved = false; 3976 startTime = new Date().getTime(); 3977 this.addEventListener('touchmove', onTouchMove, { 3978 passive: true === jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.preventDefault 3979 }); 3980 this.addEventListener('touchend', onTouchEnd, false); 3981 } 3982 }
3983 function init() { 3984 this.addEventListener && this.addEventListener('touchstart', onTouchStart, { 3985 passive: true 3986 }); 3987 } // function teardown() { 3988 // this.removeEventListener('touchstart', onTouchStart); 3989 // } 3990 3991 var SpotSwipe = /*#__PURE__*/function () { 3992 function SpotSwipe() { 3993 _classCallCheck(this, SpotSwipe); 3994 this.version = '1.0.0'; 3995 this.enabled = 'ontouchstart' in document.documentElement; 3996 this.preventDefault = false; 3997 this.moveThreshold = 75; 3998 this.timeThreshold = 200; 3999 this._init(); 4000 } 4001 _createClass(SpotSwipe, [{ 4002 key: "_init", 4003 value: function _init() { 4004 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.event.special.swipe = { 4005 setup: init 4006 }; 4007 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.event.special.tap = { 4008 setup: init 4009 }; 4010 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(['left', 'up', 'down', 'right'], function () { 4011 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.event.special["swipe".concat(this)] = { 4012 setup: function setup() { 4013 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).on('swipe', jquery__WEBPACK_IMPORTED_MODULE_0___default.a.noop); 4014 } 4015 }; 4016 }); 4017 } 4018 }]); 4019 return SpotSwipe; 4020 }(); 4021 /**************************************************** 4022 * As far as I can tell, both setupSpotSwipe and * 4023 * setupTouchHandler should be idempotent, * 4024 * because they directly replace functions & * 4025 * values, and do not add event handlers directly. * 4026 ****************************************************/ 4027 4028 Touch.setupSpotSwipe = function () { 4029 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe = new SpotSwipe(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 4030 }; 4031 /**************************************************** 4032 * Method for adding pseudo drag events to elements * 4033 ***************************************************/ 4034 4035 Touch.setupTouchHandler = function () { 4036 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.fn.addTouch = function () { 4037 this.each(function (i, el) { 4038 jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).bind('touchstart touchmove touchend touchcancel', function (event) { 4039 //we pass the original event object because the jQuery event 4040 //object is normalized to w3c specs and does not provide the TouchList 4041 handleTouch(event); 4042 }); 4043 }); 4044 var handleTouch = function handleTouch(event) { 4045 var touches = event.changedTouches, 4046 first = touches[0], 4047 eventTypes = { 4048 touchstart: 'mousedown', 4049 touchmove: 'mousemove', 4050 touchend: 'mouseup' 4051 }, 4052 type = eventTypes[event.type], 4053 simulatedEvent; 4054 if ('MouseEvent' in window && typeof window.MouseEvent === 'function') { 4055 simulatedEvent = new window.MouseEvent(type, { 4056 'bubbles': true, 4057 'cancelable': true, 4058 'screenX': first.screenX, 4059 'screenY': first.screenY, 4060 'clientX': first.clientX, 4061 'clientY': first.clientY 4062 }); 4063 } else { 4064 simulatedEvent = document.createEvent('MouseEvent'); 4065 simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 4066 /*left*/, null); 4067 } 4068 first.target.dispatchEvent(simulatedEvent); 4069 }; 4070 }; 4071 }; 4072 Touch.init = function () { 4073 if (typeof jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe === 'undefined') { 4074 Touch.setupSpotSwipe(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 4075 Touch.setupTouchHandler(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 4076 } 4077 }; 4078 4079 /***/ 4080 }), 4081 /***/28: ( 4082 /*!***********************************************************!*\ 4083 !*** multi ./js/entries/plugins/foundation.util.touch.js ***! 4084 \***********************************************************/ 4085 /*! no static exports found */ 4086 /***/ 4087 function _(module, exports, __webpack_require__) { 4088 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.util.touch.js */"./js/entries/plugins/foundation.util.touch.js"); 4089 4090 /***/ 4091 }), 4092 /***/"jquery": ( 4093 /*!********************************************************************************************!*\ 4094 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 4095 \********************************************************************************************/ 4096 /*! no static exports found */ 4097 /***/
4098 function jquery(module, exports) { 4099 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 4100 4101 /***/ 4102 }) 4103 4104 /******/ 4105 }); 4106}); 4107(function webpackUniversalModuleDefinition(root, factory) { 4108 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("./foundation.util.keyboard"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "./foundation.util.keyboard", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.accordion"] = factory(require("./foundation.core"), require("./foundation.util.keyboard"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.accordion"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"], root["jQuery"]); 4109})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 4110 return /******/function (modules) { 4111 // webpackBootstrap 4112 /******/ // The module cache 4113 /******/ 4114 var installedModules = {}; 4115 /******/ 4116 /******/ // The require function 4117 /******/ 4118 function __webpack_require__(moduleId) { 4119 /******/ 4120 /******/ // Check if module is in cache 4121 /******/if (installedModules[moduleId]) { 4122 /******/return installedModules[moduleId].exports; 4123 /******/ 4124 } 4125 /******/ // Create a new module (and put it into the cache) 4126 /******/ 4127 var module = installedModules[moduleId] = { 4128 /******/i: moduleId, 4129 /******/l: false, 4130 /******/exports: {} 4131 /******/ 4132 }; 4133 /******/ 4134 /******/ // Execute the module function 4135 /******/ 4136 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 4137 /******/ 4138 /******/ // Flag the module as loaded 4139 /******/ 4140 module.l = true; 4141 /******/ 4142 /******/ // Return the exports of the module 4143 /******/ 4144 return module.exports; 4145 /******/ 4146 } 4147 /******/ 4148 /******/ 4149 /******/ // expose the modules object (__webpack_modules__) 4150 /******/ 4151 __webpack_require__.m = modules; 4152 /******/ 4153 /******/ // expose the module cache 4154 /******/ 4155 __webpack_require__.c = installedModules; 4156 /******/ 4157 /******/ // define getter function for harmony exports 4158 /******/ 4159 __webpack_require__.d = function (exports, name, getter) { 4160 /******/if (!__webpack_require__.o(exports, name)) { 4161 /******/Object.defineProperty(exports, name, { 4162 enumerable: true, 4163 get: getter 4164 }); 4165 /******/ 4166 } 4167 /******/ 4168 }; 4169 /******/ 4170 /******/ // define __esModule on exports 4171 /******/ 4172 __webpack_require__.r = function (exports) { 4173 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 4174 /******/Object.defineProperty(exports, Symbol.toStringTag, { 4175 value: 'Module' 4176 }); 4177 /******/ 4178 } 4179 /******/ 4180 Object.defineProperty(exports, '__esModule', { 4181 value: true 4182 }); 4183 /******/ 4184 }; 4185 /******/ 4186 /******/ // create a fake namespace object 4187 /******/ // mode & 1: value is a module id, require it 4188 /******/ // mode & 2: merge all properties of value into the ns 4189 /******/ // mode & 4: return value when already ns object 4190 /******/ // mode & 8|1: behave like require 4191 /******/ 4192 __webpack_require__.t = function (value, mode) { 4193 /******/if (mode & 1) value = __webpack_require__(value); 4194 /******/ 4195 if (mode & 8) return value; 4196 /******/ 4197 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value; 4198 /******/ 4199 var ns = Object.create(null); 4200 /******/ 4201 __webpack_require__.r(ns); 4202 /******/ 4203 Object.defineProperty(ns, 'default', { 4204 enumerable: true, 4205 value: value 4206 }); 4207 /******/ 4208 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 4209 return value[key]; 4210 }.bind(null, key)); 4211 /******/ 4212 return ns; 4213 /******/ 4214 }; 4215 /******/ 4216 /******/ // getDefaultExport function for compatibility with non-harmony modules 4217 /******/ 4218 __webpack_require__.n = function (module) {
4219 /******/var getter = module && module.__esModule ? /******/function getDefault() { 4220 return module['default']; 4221 } : /******/function getModuleExports() { 4222 return module; 4223 }; 4224 /******/ 4225 __webpack_require__.d(getter, 'a', getter); 4226 /******/ 4227 return getter; 4228 /******/ 4229 }; 4230 /******/ 4231 /******/ // Object.prototype.hasOwnProperty.call 4232 /******/ 4233 __webpack_require__.o = function (object, property) { 4234 return Object.prototype.hasOwnProperty.call(object, property); 4235 }; 4236 /******/ 4237 /******/ // __webpack_public_path__ 4238 /******/ 4239 __webpack_require__.p = ""; 4240 /******/ 4241 /******/ 4242 /******/ // Load entry module and return exports 4243 /******/ 4244 return __webpack_require__(__webpack_require__.s = 1); 4245 /******/ 4246 } 4247 /************************************************************************/ 4248 /******/({ 4249 /***/"./foundation.core": ( 4250 /*!****************************************************************************************************************************************************************!*\ 4251 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 4252 \****************************************************************************************************************************************************************/ 4253 /*! no static exports found */ 4254 /***/ 4255 function _foundationCore(module, exports) { 4256 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 4257 4258 /***/ 4259 }), 4260 /***/"./foundation.util.keyboard": ( 4261 /*!****************************************************************************************************************************************************************************************************!*\ 4262 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.keyboard"],"amd":"./foundation.util.keyboard","commonjs":"./foundation.util.keyboard","commonjs2":"./foundation.util.keyboard"} ***! 4263 \****************************************************************************************************************************************************************************************************/ 4264 /*! no static exports found */ 4265 /***/ 4266 function _foundationUtilKeyboard(module, exports) { 4267 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__; 4268 4269 /***/ 4270 }), 4271
4271/***/"./js/entries/plugins/foundation.accordion.js": ( 4272 /*!****************************************************!*\ 4273 !*** ./js/entries/plugins/foundation.accordion.js ***! 4274 \****************************************************/ 4275 /*! exports provided: Foundation, Accordion */ 4276 /***/ 4277 function _js_entries_plugins_foundationAccordionJs(module, __webpack_exports__, __webpack_require__) { 4278 "use strict"; 4279 4280 __webpack_require__.r(__webpack_exports__); 4281 /* harmony import */ 4282 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 4283 /* harmony import */ 4284 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 4285 /* harmony reexport (safe) */ 4286 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 4287 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 4288 }); 4289 4290 /* harmony import */ 4291 var _foundation_accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.accordion */"./js/foundation.accordion.js"); 4292 /* harmony reexport (safe) */ 4293 __webpack_require__.d(__webpack_exports__, "Accordion", function () { 4294 return _foundation_accordion__WEBPACK_IMPORTED_MODULE_1__["Accordion"]; 4295 }); 4296 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_accordion__WEBPACK_IMPORTED_MODULE_1__["Accordion"], 'Accordion'); 4297 4298 /***/ 4299 }), 4300
vendor: 4,856 bytes, lines 4300-4408
4300/***/"./js/foundation.accordion.js": ( 4301 /*!************************************!*\ 4302 !*** ./js/foundation.accordion.js ***! 4303 \************************************/ 4304 /*! exports provided: Accordion */ 4305 /***/ 4306 function _js_foundationAccordionJs(module, __webpack_exports__, __webpack_require__) { 4307 "use strict"; 4308 4309 __webpack_require__.r(__webpack_exports__); 4310 /* harmony export (binding) */ 4311 __webpack_require__.d(__webpack_exports__, "Accordion", function () { 4312 return Accordion; 4313 }); 4314 /* harmony import */ 4315 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 4316 /* harmony import */ 4317 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 4318 /* harmony import */ 4319 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.plugin */"./foundation.core"); 4320 /* harmony import */ 4321 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__); 4322 /* harmony import */ 4323 var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.keyboard */"./foundation.util.keyboard"); 4324 /* harmony import */ 4325 var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__); 4326 function _typeof(obj) { 4327 "@babel/helpers - typeof"; 4328 4329 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 4330 _typeof = function _typeof(obj) { 4331 return typeof obj; 4332 }; 4333 } else { 4334 _typeof = function _typeof(obj) { 4335 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 4336 }; 4337 } 4338 return _typeof(obj); 4339 } 4340 function _classCallCheck(instance, Constructor) { 4341 if (!(instance instanceof Constructor)) { 4342 throw new TypeError("Cannot call a class as a function"); 4343 } 4344 } 4345 function _defineProperties(target, props) { 4346 for (var i = 0; i < props.length; i++) { 4347 var descriptor = props[i]; 4348 descriptor.enumerable = descriptor.enumerable || false; 4349 descriptor.configurable = true; 4350 if ("value" in descriptor) descriptor.writable = true; 4351 Object.defineProperty(target, descriptor.key, descriptor); 4352 } 4353 } 4354 function _createClass(Constructor, protoProps, staticProps) { 4355 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 4356 if (staticProps) _defineProperties(Constructor, staticProps); 4357 return Constructor; 4358 } 4359 function _inherits(subClass, superClass) { 4360 if (typeof superClass !== "function" && superClass !== null) { 4361 throw new TypeError("Super expression must either be null or a function"); 4362 } 4363 subClass.prototype = Object.create(superClass && superClass.prototype, { 4364 constructor: { 4365 value: subClass, 4366 writable: true, 4367 configurable: true 4368 } 4369 }); 4370 if (superClass) _setPrototypeOf(subClass, superClass); 4371 } 4372 function _setPrototypeOf(o, p) { 4373 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { 4374 o.__proto__ = p; 4375 return o; 4376 }; 4377 return _setPrototypeOf(o, p); 4378 } 4379 function _createSuper(Derived) { 4380 var hasNativeReflectConstruct = _isNativeReflectConstruct(); 4381 return function _createSuperInternal() { 4382 var Super = _getPrototypeOf(Derived), 4383 result; 4384 if (hasNativeReflectConstruct) { 4385 var NewTarget = _getPrototypeOf(this).constructor; 4386 result = Reflect.construct(Super, arguments, NewTarget); 4387 } else { 4388 result = Super.apply(this, arguments); 4389 } 4390 return _possibleConstructorReturn(this, result); 4391 }; 4392 } 4393 function _possibleConstructorReturn(self, call) { 4394 if (call && (_typeof(call) === "object" || typeof call === "function")) { 4395 return call; 4396 } else if (call !== void 0) { 4397 throw new TypeError("Derived constructors may only return object or undefined"); 4398 } 4399 return _assertThisInitialized(self); 4400 } 4401 function _assertThisInitialized(self) { 4402 if (self === void 0) { 4403 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 4404 } 4405 return self; 4406 } 4407 function _isNativeReflectConstruct() { 4408 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
4409 if (Reflect.construct.sham) return false; 4410 if (typeof Proxy === "function") return true; 4411 try { 4412 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); 4413 return true; 4414 } catch (e) { 4415 return false; 4416 } 4417 } 4418 function _getPrototypeOf(o) { 4419 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { 4420 return o.__proto__ || Object.getPrototypeOf(o); 4421 }; 4422 return _getPrototypeOf(o); 4423 } 4424 4425 /** 4426 * Accordion module. 4427 * @module foundation.accordion 4428 * @requires foundation.util.keyboard 4429 */ 4430 4431 var Accordion = /*#__PURE__*/function (_Plugin) { 4432 _inherits(Accordion, _Plugin); 4433 var _super = _createSuper(Accordion); 4434 function Accordion() { 4435 _classCallCheck(this, Accordion); 4436 return _super.apply(this, arguments); 4437 } 4438 _createClass(Accordion, [{ 4439 key: "_setup", 4440 value: 4441 /** 4442 * Creates a new instance of an accordion. 4443 * @class 4444 * @name Accordion 4445 * @fires Accordion#init 4446 * @param {jQuery} element - jQuery object to make into an accordion. 4447 * @param {Object} options - a plain object with settings to override the default options. 4448 */ 4449 function _setup(element, options) { 4450 this.$element = element; 4451 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Accordion.defaults, this.$element.data(), options); 4452 this.className = 'Accordion'; // ie9 back compat 4453 4454 this._init(); 4455 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].register('Accordion', { 4456 'ENTER': 'toggle', 4457 'SPACE': 'toggle', 4458 'ARROW_DOWN': 'next', 4459 'ARROW_UP': 'previous', 4460 'HOME': 'first', 4461 'END': 'last' 4462 }); 4463 } 4464 /** 4465 * Initializes the accordion by animating the preset active pane(s). 4466 * @private 4467 */ 4468 }, { 4469 key: "_init", 4470 value: function _init() { 4471 var _this2 = this; 4472 this._isInitializing = true; 4473 this.$tabs = this.$element.children('[data-accordion-item]'); 4474 this.$tabs.each(function (idx, el) { 4475 var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(el), 4476 $content = $el.children('[data-tab-content]'), 4477 id = $content[0].id || Object(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, 'accordion'), 4478 linkId = el.id ? "".concat(el.id, "-label") : "".concat(id, "-label"); 4479 $el.find('a:first').attr({ 4480 'aria-controls': id, 4481 'id': linkId, 4482 'aria-expanded': false 4483 }); 4484 $content.attr({ 4485 'role': 'region', 4486 'aria-labelledby': linkId, 4487 'aria-hidden': true, 4488 'id': id 4489 }); 4490 }); 4491 var $initActive = this.$element.find('.is-active').children('[data-tab-content]'); 4492 if ($initActive.length) { 4493 // Save up the initial hash to return to it later when going back in history 4494 this._initialAnchor = $initActive.prev('a').attr('href'); 4495 this._openSingleTab($initActive); 4496 } 4497 this._checkDeepLink = function () { 4498 var anchor = window.location.hash; 4499 if (!anchor.length) { 4500 // If we are still initializing and there is no anchor, then there is nothing to do 4501 if (_this2._isInitializing) return; // Otherwise, move to the initial anchor 4502 4503 if (_this2._initialAnchor) anchor = _this2._initialAnchor; 4504 } 4505 var $anchor = anchor && jquery__WEBPACK_IMPORTED_MODULE_0___default()(anchor); 4506 var $link = anchor && _this2.$element.find("[href$=\"".concat(anchor, "\"]"));
vendor: 10,199 bytes, lines 4506-4754
4506 // Whether the anchor element that has been found is part of this element 4507 4508 var isOwnAnchor = !!($anchor.length && $link.length); 4509 if (isOwnAnchor) { 4510 // If there is an anchor for the hash, open it (if not already active) 4511 if ($anchor && $link && $link.length) { 4512 if (!$link.parent('[data-accordion-item]').hasClass('is-active')) { 4513 _this2._openSingleTab($anchor); 4514 } 4515 } // Otherwise, close everything 4516 else { 4517 _this2._closeAllTabs(); 4518 } // Roll up a little to show the titles 4519 4520 if (_this2.options.deepLinkSmudge) { 4521 Object(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["onLoad"])(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 4522 var offset = _this2.$element.offset(); 4523 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({ 4524 scrollTop: offset.top - _this2.options.deepLinkSmudgeOffset 4525 }, _this2.options.deepLinkSmudgeDelay); 4526 }); 4527 } 4528 /** 4529 * Fires when the plugin has deeplinked at pageload 4530 * @event Accordion#deeplink 4531 */ 4532 4533 _this2.$element.trigger('deeplink.zf.accordion', [$link, $anchor]); 4534 } 4535 }; //use browser to open a tab, if it exists in this tabset 4536 4537 if (this.options.deepLink) { 4538 this._checkDeepLink(); 4539 } 4540 this._events(); 4541 this._isInitializing = false; 4542 } 4543 /** 4544 * Adds event handlers for items within the accordion. 4545 * @private 4546 */ 4547 }, { 4548 key: "_events", 4549 value: function _events() { 4550 var _this = this; 4551 this.$tabs.each(function () { 4552 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 4553 var $tabContent = $elem.children('[data-tab-content]'); 4554 if ($tabContent.length) { 4555 $elem.children('a').off('click.zf.accordion keydown.zf.accordion').on('click.zf.accordion', function (e) { 4556 e.preventDefault(); 4557 _this.toggle($tabContent); 4558 }).on('keydown.zf.accordion', function (e) { 4559 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].handleKey(e, 'Accordion', { 4560 toggle: function toggle() { 4561 _this.toggle($tabContent); 4562 }, 4563 next: function next() { 4564 var $a = $elem.next().find('a').focus(); 4565 if (!_this.options.multiExpand) { 4566 $a.trigger('click.zf.accordion'); 4567 } 4568 }, 4569 previous: function previous() { 4570 var $a = $elem.prev().find('a').focus(); 4571 if (!_this.options.multiExpand) { 4572 $a.trigger('click.zf.accordion'); 4573 } 4574 }, 4575 first: function first() { 4576 var $a = _this.$tabs.first().find('.accordion-title').focus(); 4577 if (!_this.options.multiExpand) { 4578 $a.trigger('click.zf.accordion'); 4579 } 4580 }, 4581 last: function last() { 4582 var $a = _this.$tabs.last().find('.accordion-title').focus(); 4583 if (!_this.options.multiExpand) { 4584 $a.trigger('click.zf.accordion'); 4585 } 4586 }, 4587 handled: function handled() { 4588 e.preventDefault(); 4589 } 4590 }); 4591 }); 4592 } 4593 }); 4594 if (this.options.deepLink) { 4595 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('hashchange', this._checkDeepLink); 4596 } 4597 } 4598 /** 4599 * Toggles the selected content pane's open/close state. 4600 * @param {jQuery} $target - jQuery object of the pane to toggle (`.accordion-content`). 4601 * @function 4602 */ 4603 }, { 4604 key: "toggle", 4605 value: function toggle($target) { 4606 if ($target.closest('[data-accordion]').is('[disabled]')) { 4607 console.info('Cannot toggle an accordion that is disabled.'); 4608 return; 4609 } 4610 if ($target.parent().hasClass('is-active')) { 4611 this.up($target); 4612 } else { 4613 this.down($target); 4614 } //either replace or update browser history 4615 4616 if (this.options.deepLink) { 4617 var anchor = $target.prev('a').attr('href'); 4618 if (this.options.updateHistory) { 4619 history.pushState({}, '', anchor); 4620 } else { 4621 history.replaceState({}, '', anchor); 4622 } 4623 } 4624 } 4625 /** 4626 * Opens the accordion tab defined by `$target`. 4627 * @param {jQuery} $target - Accordion pane to open (`.accordion-content`). 4628 * @fires Accordion#down 4629 * @function 4630 */ 4631 }, { 4632 key: "down", 4633 value: function down($target) { 4634 if ($target.closest('[data-accordion]').is('[disabled]')) { 4635 console.info('Cannot call down on an accordion that is disabled.'); 4636 return; 4637 } 4638 if (this.options.multiExpand) this._openTab($target);else this._openSingleTab($target); 4639 } 4640 /** 4641 * Closes the tab defined by `$target`. 4642 * It may be ignored if the Accordion options don't allow it. 4643 * 4644 * @param {jQuery} $target - Accordion tab to close (`.accordion-content`). 4645 * @fires Accordion#up 4646 * @function 4647 */ 4648 }, { 4649 key: "up", 4650 value: function up($target) { 4651 if (this.$element.is('[disabled]')) { 4652 console.info('Cannot call up on an accordion that is disabled.'); 4653 return; 4654 } // Don't close the item if it is already closed 4655 4656 var $targetItem = $target.parent(); 4657 if (!$targetItem.hasClass('is-active')) return; // Don't close the item if there is no other active item (unless with `allowAllClosed`) 4658 4659 var $othersItems = $targetItem.siblings(); 4660 if (!this.options.allowAllClosed && !$othersItems.hasClass('is-active')) return; 4661 this._closeTab($target); 4662 } 4663 /** 4664 * Make the tab defined by `$target` the only opened tab, closing all others tabs. 4665 * @param {jQuery} $target - Accordion tab to open (`.accordion-content`). 4666 * @function 4667 * @private 4668 */ 4669 }, { 4670 key: "_openSingleTab", 4671 value: function _openSingleTab($target) { 4672 // Close all the others active tabs. 4673 var $activeContents = this.$element.children('.is-active').children('[data-tab-content]'); 4674 if ($activeContents.length) { 4675 this._closeTab($activeContents.not($target)); 4676 } // Then open the target. 4677 4678 this._openTab($target); 4679 } 4680 /** 4681 * Opens the tab defined by `$target`. 4682 * @param {jQuery} $target - Accordion tab to open (`.accordion-content`). 4683 * @fires Accordion#down 4684 * @function 4685 * @private 4686 */ 4687 }, { 4688 key: "_openTab", 4689 value: function _openTab($target) { 4690 var _this3 = this; 4691 var $targetItem = $target.parent(); 4692 var targetContentId = $target.attr('aria-labelledby'); 4693 $target.attr('aria-hidden', false); 4694 $targetItem.addClass('is-active'); 4695 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(targetContentId)).attr({ 4696 'aria-expanded': true 4697 }); 4698 $target.finish().slideDown(this.options.slideSpeed, function () { 4699 /** 4700 * Fires when the tab is done opening. 4701 * @event Accordion#down 4702 */ 4703 _this3.$element.trigger('down.zf.accordion', [$target]); 4704 }); 4705 } 4706 /** 4707 * Closes the tab defined by `$target`. 4708 * @param {jQuery} $target - Accordion tab to close (`.accordion-content`). 4709 * @fires Accordion#up 4710 * @function 4711 * @private 4712 */ 4713 }, { 4714 key: "_closeTab", 4715 value: function _closeTab($target) { 4716 var _this4 = this; 4717 var $targetItem = $target.parent(); 4718 var targetContentId = $target.attr('aria-labelledby'); 4719 $target.attr('aria-hidden', true); 4720 $targetItem.removeClass('is-active'); 4721 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(targetContentId)).attr({ 4722 'aria-expanded': false 4723 }); 4724 $target.finish().slideUp(this.options.slideSpeed, function () { 4725 /** 4726 * Fires when the tab is done collapsing up. 4727 * @event Accordion#up 4728 */ 4729 _this4.$element.trigger('up.zf.accordion', [$target]); 4730 }); 4731 } 4732 /** 4733 * Closes all active tabs 4734 * @fires Accordion#up 4735 * @function 4736 * @private 4737 */ 4738 }, { 4739 key: "_closeAllTabs", 4740 value: function _closeAllTabs() { 4741 var $activeTabs = this.$element.children('.is-active').children('[data-tab-content]'); 4742 if ($activeTabs.length) { 4743 this._closeTab($activeTabs); 4744 } 4745 } 4746 /** 4747 * Destroys an instance of an accordion. 4748 * @fires Accordion#destroyed 4749 * @function 4750 */ 4751 }, { 4752 key: "_destroy", 4753 value: function _destroy() { 4754 this.$element.find('[data-tab-content]').stop(true).slide
4754Up(0).css('display', ''); 4755 this.$element.find('a').off('.zf.accordion'); 4756 if (this.options.deepLink) { 4757 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('hashchange', this._checkDeepLink); 4758 } 4759 } 4760 }]); 4761 return Accordion; 4762 }(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["Plugin"]); 4763 Accordion.defaults = { 4764 /** 4765 * Amount of time to animate the opening of an accordion pane. 4766 * @option 4767 * @type {number} 4768 * @default 250 4769 */ 4770 slideSpeed: 250, 4771 /** 4772 * Allow the accordion to have multiple open panes. 4773 * @option 4774 * @type {boolean} 4775 * @default false 4776 */ 4777 multiExpand: false, 4778 /** 4779 * Allow the accordion to close all panes. 4780 * @option 4781 * @type {boolean} 4782 * @default false 4783 */ 4784 allowAllClosed: false, 4785 /** 4786 * Link the location hash to the open pane. 4787 * Set the location hash when the opened pane changes, and open and scroll to the corresponding pane when the location changes. 4788 * @option 4789 * @type {boolean} 4790 * @default false 4791 */ 4792 deepLink: false, 4793 /** 4794 * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the accordion panel is visible 4795 * @option 4796 * @type {boolean} 4797 * @default false 4798 */ 4799 deepLinkSmudge: false, 4800 /** 4801 * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment 4802 * @option 4803 * @type {number} 4804 * @default 300 4805 */ 4806 deepLinkSmudgeDelay: 300, 4807 /** 4808 * If `deepLinkSmudge` is enabled, the offset for scrollToTtop to prevent overlap by a sticky element at the top of the page 4809 * @option 4810 * @type {number} 4811 * @default 0 4812 */ 4813 deepLinkSmudgeOffset: 0, 4814 /** 4815 * If `deepLink` is enabled, update the browser history with the open accordion 4816 * @option 4817 * @type {boolean} 4818 * @default false 4819 */ 4820 updateHistory: false 4821 }; 4822 4823 /***/ 4824 }), 4825 /***/1: ( 4826 /*!**********************************************************!*\ 4827 !*** multi ./js/entries/plugins/foundation.accordion.js ***! 4828 \**********************************************************/ 4829 /*! no static exports found */ 4830 /***/ 4831 function _(module, exports, __webpack_require__) { 4832 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.accordion.js */"./js/entries/plugins/foundation.accordion.js"); 4833 4834 /***/ 4835 }), 4836 /***/"jquery": ( 4837 /*!********************************************************************************************!*\ 4838 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 4839 \********************************************************************************************/ 4840 /*! no static exports found */ 4841 /***/ 4842 function jquery(module, exports) { 4843 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 4844 4845 /***/ 4846 }) 4847 4848 /******/ 4849 }); 4850}); 4851(function webpackUniversalModuleDefinition(root, factory) { 4852 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("./foundation.util.keyboard"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("./foundation.util.touch"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "./foundation.util.keyboard", "./foundation.util.mediaQuery", "./foundation.util.motion", "./foundation.util.touch", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.reveal"] = factory(require("./foundation.core"), require("./foundation.util.keyboard"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("./foundation.util.touch"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.reveal"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"], root["jQuery"]); 4853})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 4854 return /******/function (modules) { 4855 // webpackBootstrap 4856 /******/ // The module cache 4857 /******/ 4858 var installedModules = {}; 4859 /******/ 4860 /******/ // The require function 4861 /******/ 4862 function __webpack_require__(moduleId) { 4863 /******/ 4864 /******/ // Check if module is in cache 4865 /******/if (installedModules[moduleId]) { 4866 /******/return installedModules[moduleId].exports; 4867 /******/ 4868 } 4869 /******/ // Create a new module (and put it into the cache) 4870 /******/ 4871 var module = installedModules[moduleId] = { 4872 /******/i: moduleId, 4873 /******/l: false, 4874 /******/exports: {} 4875 /******/ 4876 }; 4877 /******/ 4878 /******/ // Execute the module function 4879 /******/ 4880 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 4881 /******/ 4882 /******/ // Flag the module as loaded 4883 /******/ 4884 module.l = true; 4885 /******/ 4886 /******/ // Return the exports of the module 4887 /******/ 4888 return module.exports; 4889 /******/ 4890 } 4891 /******/ 4892 /******/ 4893 /******/ // expose the modules object (__webpack_modules__) 4894 /******/ 4895 __webpack_require__.m = modules; 4896 /******/ 4897 /******/ // expose the module cache 4898 /******/ 4899 __webpack_require__.c = installedModules; 4900 /******/ 4901 /******/ // define getter function for harmony exports 4902 /******/ 4903 __webpack_require__.d = function (exports, name, getter) { 4904 /******/if (!__webpack_require__.o(exports, name)) { 4905 /******/Object.defineProperty(exports, name, { 4906 enumerable: true, 4907 get: getter 4908 }); 4909 /******/ 4910 } 4911 /******/ 4912 }; 4913 /******/ 4914 /******/ // define __esModule on exports 4915 /******/ 4916 __webpack_require__.r = function (exports) { 4917 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 4918 /******/Object.defineProperty(exports, Symbol.toStringTag, { 4919 value: 'Module' 4920 }); 4921 /******/ 4922 } 4923 /******/ 4924 Object.defineProperty(exports, '__esModule', { 4925 value: true 4926 }); 4927 /******/ 4928 }; 4929 /******/ 4930 /******/ // create a fake namespace object 4931 /******/ // mode & 1: value is a module id, require it 4932 /******/ // mode & 2: merge all properties of value into the ns 4933 /******/ // mode & 4: return value when already ns object 4934 /******/ // mode & 8|1: behave like require 4935 /******/ 4936 __webpack_require__.t = function (value, mode) { 4937 /******/if (mode & 1) value = __webpack_require__(value); 4938 /******/ 4939 if (mode & 8) return value; 4940 /******/ 4941 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esMo
vendor: 4,679 bytes, lines 4941-5031
4941dule) return value; 4942 /******/ 4943 var ns = Object.create(null); 4944 /******/ 4945 __webpack_require__.r(ns); 4946 /******/ 4947 Object.defineProperty(ns, 'default', { 4948 enumerable: true, 4949 value: value 4950 }); 4951 /******/ 4952 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 4953 return value[key]; 4954 }.bind(null, key)); 4955 /******/ 4956 return ns; 4957 /******/ 4958 }; 4959 /******/ 4960 /******/ // getDefaultExport function for compatibility with non-harmony modules 4961 /******/ 4962 __webpack_require__.n = function (module) { 4963 /******/var getter = module && module.__esModule ? /******/function getDefault() { 4964 return module['default']; 4965 } : /******/function getModuleExports() { 4966 return module; 4967 }; 4968 /******/ 4969 __webpack_require__.d(getter, 'a', getter); 4970 /******/ 4971 return getter; 4972 /******/ 4973 }; 4974 /******/ 4975 /******/ // Object.prototype.hasOwnProperty.call 4976 /******/ 4977 __webpack_require__.o = function (object, property) { 4978 return Object.prototype.hasOwnProperty.call(object, property); 4979 }; 4980 /******/ 4981 /******/ // __webpack_public_path__ 4982 /******/ 4983 __webpack_require__.p = ""; 4984 /******/ 4985 /******/ 4986 /******/ // Load entry module and return exports 4987 /******/ 4988 return __webpack_require__(__webpack_require__.s = 14); 4989 /******/ 4990 } 4991 /************************************************************************/ 4992 /******/({ 4993 /***/"./foundation.core": ( 4994 /*!****************************************************************************************************************************************************************!*\ 4995 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 4996 \****************************************************************************************************************************************************************/ 4997 /*! no static exports found */ 4998 /***/ 4999 function _foundationCore(module, exports) { 5000 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 5001 5002 /***/ 5003 }), 5004 /***/"./foundation.util.keyboard": ( 5005 /*!****************************************************************************************************************************************************************************************************!*\ 5006 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.keyboard"],"amd":"./foundation.util.keyboard","commonjs":"./foundation.util.keyboard","commonjs2":"./foundation.util.keyboard"} ***! 5007 \****************************************************************************************************************************************************************************************************/ 5008 /*! no static exports found */ 5009 /***/ 5010 function _foundationUtilKeyboard(module, exports) { 5011 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__; 5012 5013 /***/ 5014 }), 5015 /***/"./foundation.util.mediaQuery": ( 5016 /*!************************************************************************************************************************************************************************************************************!*\ 5017 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.mediaQuery"],"amd":"./foundation.util.mediaQuery","commonjs":"./foundation.util.mediaQuery","commonjs2":"./foundation.util.mediaQuery"} ***! 5018 \************************************************************************************************************************************************************************************************************/ 5019 /*! no static exports found */ 5020 /***/ 5021 function _foundationUtilMediaQuery(module, exports) { 5022 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__; 5023 5024 /***/ 5025 }), 5026 /***/"./foundation.util.motion": ( 5027 /*!********************************************************************************************************************************************************************************************!*\ 5028 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***! 5029 \********************************************************************************************************************************************************************************************/ 5030 /*! no static exports found */ 5031 /***/
5032 function _foundationUtilMotion(module, exports) { 5033 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__; 5034 5035 /***/ 5036 }), 5037 /***/"./foundation.util.touch": ( 5038 /*!****************************************************************************************************************************************************************************************!*\ 5039 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.touch"],"amd":"./foundation.util.touch","commonjs":"./foundation.util.touch","commonjs2":"./foundation.util.touch"} ***! 5040 \****************************************************************************************************************************************************************************************/ 5041 /*! no static exports found */ 5042 /***/ 5043 function _foundationUtilTouch(module, exports) { 5044 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__; 5045 5046 /***/ 5047 }), 5048
5048/***/"./js/entries/plugins/foundation.reveal.js": ( 5049 /*!*************************************************!*\ 5050 !*** ./js/entries/plugins/foundation.reveal.js ***! 5051 \*************************************************/ 5052 /*! exports provided: Foundation, Reveal */ 5053 /***/ 5054 function _js_entries_plugins_foundationRevealJs(module, __webpack_exports__, __webpack_require__) { 5055 "use strict"; 5056 5057 __webpack_require__.r(__webpack_exports__); 5058 /* harmony import */ 5059 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 5060 /* harmony import */ 5061 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 5062 /* harmony reexport (safe) */ 5063 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 5064 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 5065 }); 5066 5067 /* harmony import */ 5068 var _foundation_reveal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.reveal */"./js/foundation.reveal.js"); 5069 /* harmony reexport (safe) */ 5070 __webpack_require__.d(__webpack_exports__, "Reveal", function () { 5071 return _foundation_reveal__WEBPACK_IMPORTED_MODULE_1__["Reveal"]; 5072 }); 5073 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_reveal__WEBPACK_IMPORTED_MODULE_1__["Reveal"], 'Reveal'); 5074 5075 /***/ 5076 }), 5077
vendor: 6,117 bytes, lines 5077-5199
5077/***/"./js/foundation.reveal.js": ( 5078 /*!*********************************!*\ 5079 !*** ./js/foundation.reveal.js ***! 5080 \*********************************/ 5081 /*! exports provided: Reveal */ 5082 /***/ 5083 function _js_foundationRevealJs(module, __webpack_exports__, __webpack_require__) { 5084 "use strict"; 5085 5086 __webpack_require__.r(__webpack_exports__); 5087 /* harmony export (binding) */ 5088 __webpack_require__.d(__webpack_exports__, "Reveal", function () { 5089 return Reveal; 5090 }); 5091 /* harmony import */ 5092 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 5093 /* harmony import */ 5094 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 5095 /* harmony import */ 5096 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.plugin */"./foundation.core"); 5097 /* harmony import */ 5098 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__); 5099 /* harmony import */ 5100 var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.keyboard */"./foundation.util.keyboard"); 5101 /* harmony import */ 5102 var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__); 5103 /* harmony import */ 5104 var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.mediaQuery */"./foundation.util.mediaQuery"); 5105 /* harmony import */ 5106 var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__); 5107 /* harmony import */ 5108 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.motion */"./foundation.util.motion"); 5109 /* harmony import */ 5110 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__); 5111 /* harmony import */ 5112 var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.util.triggers */"./js/foundation.util.triggers.js"); 5113 /* harmony import */ 5114 var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./foundation.util.touch */"./foundation.util.touch"); 5115 /* harmony import */ 5116 var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__); 5117 function _typeof(obj) { 5118 "@babel/helpers - typeof"; 5119 5120 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 5121 _typeof = function _typeof(obj) { 5122 return typeof obj; 5123 }; 5124 } else { 5125 _typeof = function _typeof(obj) { 5126 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 5127 }; 5128 } 5129 return _typeof(obj); 5130 } 5131 function _classCallCheck(instance, Constructor) { 5132 if (!(instance instanceof Constructor)) { 5133 throw new TypeError("Cannot call a class as a function"); 5134 } 5135 } 5136 function _defineProperties(target, props) { 5137 for (var i = 0; i < props.length; i++) { 5138 var descriptor = props[i]; 5139 descriptor.enumerable = descriptor.enumerable || false; 5140 descriptor.configurable = true; 5141 if ("value" in descriptor) descriptor.writable = true; 5142 Object.defineProperty(target, descriptor.key, descriptor); 5143 } 5144 } 5145 function _createClass(Constructor, protoProps, staticProps) { 5146 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 5147 if (staticProps) _defineProperties(Constructor, staticProps); 5148 return Constructor; 5149 } 5150 function _inherits(subClass, superClass) { 5151 if (typeof superClass !== "function" && superClass !== null) { 5152 throw new TypeError("Super expression must either be null or a function"); 5153 } 5154 subClass.prototype = Object.create(superClass && superClass.prototype, { 5155 constructor: { 5156 value: subClass, 5157 writable: true, 5158 configurable: true 5159 } 5160 }); 5161 if (superClass) _setPrototypeOf(subClass, superClass); 5162 } 5163 function _setPrototypeOf(o, p) { 5164 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { 5165 o.__proto__ = p; 5166 return o; 5167 }; 5168 return _setPrototypeOf(o, p); 5169 } 5170 function _createSuper(Derived) { 5171 var hasNativeReflectConstruct = _isNativeReflectConstruct(); 5172 return function _createSuperInternal() { 5173 var Super = _getPrototypeOf(Derived), 5174 result; 5175 if (hasNativeReflectConstruct) { 5176 var NewTarget = _getPrototypeOf(this).constructor; 5177 result = Reflect.construct(Super, arguments, NewTarget); 5178 } else { 5179 result = Super.apply(this, arguments); 5180 } 5181 return _possibleConstructorReturn(this, result); 5182 }; 5183 } 5184 function _possibleConstructorReturn(self, call) { 5185 if (call && (_typeof(call) === "object" || typeof call === "function")) { 5186 return call; 5187 } else if (call !== void 0) { 5188 throw new TypeError("Derived constructors may only return object or undefined"); 5189 } 5190 return _assertThisInitialized(self); 5191 } 5192 function _assertThisInitialized(self) { 5193 if (self === void 0) { 5194 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 5195 } 5196 return self; 5197 } 5198 function _isNativeReflectConstruct() { 5199 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
5200 if (Reflect.construct.sham) return false; 5201 if (typeof Proxy === "function") return true; 5202 try { 5203 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); 5204 return true; 5205 } catch (e) { 5206 return false; 5207 } 5208 } 5209 function _getPrototypeOf(o) { 5210 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { 5211 return o.__proto__ || Object.getPrototypeOf(o); 5212 }; 5213 return _getPrototypeOf(o); 5214 } 5215 5216 /** 5217 * Reveal module. 5218 * @module foundation.reveal 5219 * @requires foundation.util.keyboard 5220 * @requires foundation.util.touch 5221 * @requires foundation.util.triggers 5222 * @requires foundation.util.mediaQuery 5223 * @requires foundation.util.motion if using animations 5224 */ 5225 5226 var Reveal = /*#__PURE__*/function (_Plugin) { 5227 _inherits(Reveal, _Plugin); 5228 var _super = _createSuper(Reveal); 5229 function Reveal() { 5230 _classCallCheck(this, Reveal); 5231 return _super.apply(this, arguments); 5232 } 5233 _createClass(Reveal, [{ 5234 key: "_setup", 5235 value: 5236 /** 5237 * Creates a new instance of Reveal. 5238 * @class 5239 * @name Reveal 5240 * @param {jQuery} element - jQuery object to use for the modal. 5241 * @param {Object} options - optional parameters. 5242 */ 5243 function _setup(element, options) { 5244 this.$element = element; 5245 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Reveal.defaults, this.$element.data(), options); 5246 this.className = 'Reveal'; // ie9 back compat 5247 5248 this._init(); // Touch and Triggers init are idempotent, just need to make sure they are initialized 5249 5250 _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 5251 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 5252 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].register('Reveal', { 5253 'ESCAPE': 'close' 5254 }); 5255 } 5256 /** 5257 * Initializes the modal by adding the overlay and close buttons, (if selected). 5258 * @private 5259 */ 5260 }, { 5261 key: "_init", 5262 value: function _init() { 5263 var _this2 = this; 5264 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__["MediaQuery"]._init(); 5265 this.id = this.$element.attr('id'); 5266 this.isActive = false; 5267 this.cached = { 5268 mq: _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__["MediaQuery"].current 5269 }; 5270 this.$anchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(this.id, "\"]")).length ? jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(this.id, "\"]")) : jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-toggle=\"".concat(this.id, "\"]")); 5271 this.$anchor.attr({ 5272 'aria-controls': this.id, 5273 'aria-haspopup': 'dialog', 5274 'tabindex': 0 5275 }); 5276 if (this.options.fullScreen || this.$element.hasClass('full')) { 5277 this.options.fullScreen = true; 5278 this.options.overlay = false; 5279 } 5280 if (this.options.overlay && !this.$overlay) { 5281 this.$overlay = this._makeOverlay(this.id); 5282 } 5283 this.$element.attr({ 5284 'role': 'dialog', 5285 'aria-hidden': true, 5286 'data-yeti-box': this.id, 5287 'data-resize': this.id 5288 }); 5289 if (this.$overlay) { 5290 this.$element.detach().appendTo(this.$overlay); 5291 } else { 5292 this.$element.detach().appendTo(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.appendTo)); 5293 this.$element.addClass('without-overlay'); 5294 } 5295 this._events(); 5296 if (this.options.deepLink && window.location.hash === "#".concat(this.id
vendor: 18,455 bytes, lines 5296-5710
5296)) { 5297 this.onLoadListener = Object(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["onLoad"])(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 5298 return _this2.open(); 5299 }); 5300 } 5301 } 5302 /** 5303 * Creates an overlay div to display behind the modal. 5304 * @private 5305 */ 5306 }, { 5307 key: "_makeOverlay", 5308 value: function _makeOverlay() { 5309 var additionalOverlayClasses = ''; 5310 if (this.options.additionalOverlayClasses) { 5311 additionalOverlayClasses = ' ' + this.options.additionalOverlayClasses; 5312 } 5313 return jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div></div>').addClass('reveal-overlay' + additionalOverlayClasses).appendTo(this.options.appendTo); 5314 } 5315 /** 5316 * Updates position of modal 5317 * TODO: Figure out if we actually need to cache these values or if it doesn't matter 5318 * @private 5319 */ 5320 }, { 5321 key: "_updatePosition", 5322 value: function _updatePosition() { 5323 var width = this.$element.outerWidth(); 5324 var outerWidth = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).width(); 5325 var height = this.$element.outerHeight(); 5326 var outerHeight = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height(); 5327 var left, 5328 top = null; 5329 if (this.options.hOffset === 'auto') { 5330 left = parseInt((outerWidth - width) / 2, 10); 5331 } else { 5332 left = parseInt(this.options.hOffset, 10); 5333 } 5334 if (this.options.vOffset === 'auto') { 5335 if (height > outerHeight) { 5336 top = parseInt(Math.min(100, outerHeight / 10), 10); 5337 } else { 5338 top = parseInt((outerHeight - height) / 4, 10); 5339 } 5340 } else if (this.options.vOffset !== null) { 5341 top = parseInt(this.options.vOffset, 10); 5342 } 5343 if (top !== null) { 5344 this.$element.css({ 5345 top: top + 'px' 5346 }); 5347 } // only worry about left if we don't have an overlay or we have a horizontal offset, 5348 // otherwise we're perfectly in the middle 5349 5350 if (!this.$overlay || this.options.hOffset !== 'auto') { 5351 this.$element.css({ 5352 left: left + 'px' 5353 }); 5354 this.$element.css({ 5355 margin: '0px' 5356 }); 5357 } 5358 } 5359 /** 5360 * Adds event handlers for the modal. 5361 * @private 5362 */ 5363 }, { 5364 key: "_events", 5365 value: function _events() { 5366 var _this3 = this; 5367 var _this = this; 5368 this.$element.on({ 5369 'open.zf.trigger': this.open.bind(this), 5370 'close.zf.trigger': function closeZfTrigger(event, $element) { 5371 if (event.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default()(event.target).parents('[data-closable]')[0] === $element) { 5372 // only close reveal when it's explicitly called 5373 return _this3.close.apply(_this3); 5374 } 5375 }, 5376 'toggle.zf.trigger': this.toggle.bind(this), 5377 'resizeme.zf.trigger': function resizemeZfTrigger() { 5378 _this._updatePosition(); 5379 } 5380 }); 5381 if (this.options.closeOnClick && this.options.overlay) { 5382 this.$overlay.off('.zf.reveal').on('click.zf.dropdown tap.zf.dropdown', function (e) { 5383 if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(_this.$element[0], e.target) || !jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(document, e.target)) { 5384 return; 5385 } 5386 _this.close(); 5387 }); 5388 } 5389 if (this.options.deepLink) { 5390 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on("hashchange.zf.reveal:".concat(this.id), this._handleState.bind(this)); 5391 } 5392 } 5393 /** 5394 * Handles modal methods on back/forward button clicks or any other event that triggers hashchange. 5395 * @private 5396 */ 5397 }, { 5398 key: "_handleState", 5399 value: function _handleState() { 5400 if (window.location.hash === '#' + this.id && !this.isActive) { 5401 this.open(); 5402 } else { 5403 this.close(); 5404 } 5405 } 5406 /** 5407 * Disables the scroll when Reveal is shown to prevent the background from shifting 5408 * @param {number} scrollTop - Scroll to visually apply, window current scroll by default 5409 */ 5410 }, { 5411 key: "_disableScroll", 5412 value: function _disableScroll(scrollTop) { 5413 scrollTop = scrollTop || jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).scrollTop(); 5414 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height()) { 5415 jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top", -scrollTop); 5416 } 5417 } 5418 /** 5419 * Reenables the scroll when Reveal closes 5420 * @param {number} scrollTop - Scroll to restore, html "top" property by default (as set by `_disableScroll`) 5421 */ 5422 }, { 5423 key: "_enableScroll", 5424 value: function _enableScroll(scrollTop) { 5425 scrollTop = scrollTop || parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top"), 10); 5426 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height()) { 5427 jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top", ""); 5428 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).scrollTop(-scrollTop); 5429 } 5430 } 5431 /** 5432 * Opens the modal controlled by `this.$anchor`, and closes all others by default. 5433 * @function 5434 * @fires Reveal#closeme 5435 * @fires Reveal#open 5436 */ 5437 }, { 5438 key: "open", 5439 value: function open() { 5440 var _this4 = this; 5441 5442 // either update or replace browser history 5443 var hash = "#".concat(this.id); 5444 if (this.options.deepLink && window.location.hash !== hash) { 5445 if (window.history.pushState) { 5446 if (this.options.updateHistory) { 5447 window.history.pushState({}, '', hash); 5448 } else { 5449 window.history.replaceState({}, '', hash); 5450 } 5451 } else { 5452 window.location.hash = hash; 5453 } 5454 } // Remember anchor that opened it to set focus back later, have general anchors as fallback 5455 5456 this.$activeAnchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.activeElement).is(this.$anchor) ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.activeElement) : this.$anchor; 5457 this.isActive = true; // Make elements invisible, but remove display: none so we can get size and positioning 5458 5459 this.$element.css({ 5460 'visibility': 'hidden' 5461 }).show().scrollTop(0); 5462 if (this.options.overlay) { 5463 this.$overlay.css({ 5464 'visibility': 'hidden' 5465 }).show(); 5466 } 5467 this._updatePosition(); 5468 this.$element.hide().css({ 5469 'visibility': '' 5470 }); 5471 if (this.$overlay) { 5472 this.$overlay.css({ 5473 'visibility': '' 5474 }).hide(); 5475 if (this.$element.hasClass('fast')) { 5476 this.$overlay.addClass('fast'); 5477 } else if (this.$element.hasClass('slow')) { 5478 this.$overlay.addClass('slow'); 5479 } 5480 } 5481 if (!this.options.multipleOpened) { 5482 /** 5483 * Fires immediately before the modal opens. 5484 * Closes any other modals that are currently open 5485 * @event Reveal#closeme 5486 */ 5487 this.$element.trigger('closeme.zf.reveal', this.id); 5488 } 5489 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 5490 this._disableScroll(); 5491 } 5492 var _this = this; // Motion UI method of reveal 5493 5494 if (this.options.animationIn) { 5495 var afterAnimation = function afterAnimation() { 5496 _this.$element.attr({ 5497 'aria-hidden': false, 5498 'tabindex': -1 5499 }).focus(); 5500 _this._addGlobalClasses(); 5501 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].trapFocus(_this.$element); 5502 }; 5503 if (this.options.overlay) { 5504 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__["Motion"].animateIn(this.$overlay, 'fade-in'); 5505 } 5506 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__["Motion"].animateIn(this.$element, this.options.animationIn, function () { 5507 if (_this4.$element) { 5508 // protect against object having been removed 5509 _this4.focusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].findFocusable(_this4.$element); 5510 afterAnimation(); 5511 } 5512 }); 5513 } // jQuery method of reveal 5514 else { 5515 if (this.options.overlay) { 5516 this.$overlay.show(0); 5517 } 5518 this.$element.show(this.options.showDelay); 5519 } // handle accessibility 5520 5521 this.$element.attr({ 5522 'aria-hidden': false, 5523 'tabindex': -1 5524 }).focus(); 5525 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].trapFocus(this.$element); 5526 this._addGlobalClasses(); 5527 this._addGlobalListeners(); 5528 /** 5529 * Fires when the modal has successfully opened. 5530 * @event Reveal#open 5531 */ 5532 5533 this.$element.trigger('open.zf.reveal'); 5534 } 5535 /** 5536 * Adds classes and listeners on document required by open modals. 5537 * 5538 * The following classes are added and updated: 5539 * - `.is-reveal-open` - Prevents the scroll on document 5540 * - `.zf-has-scroll` - Displays a disabled scrollbar on document if required like if the 5541 * scroll was not disabled. This prevent a "shift" of the page content due 5542 * the scrollbar disappearing when the modal opens. 5543 * 5544 * @private 5545 */ 5546 }, { 5547 key: "_addGlobalClasses", 5548 value: function _addGlobalClasses() { 5549 var updateScrollbarClass = function updateScrollbarClass() { 5550 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').toggleClass('zf-has-scroll', !!(jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height())); 5551 }; 5552 this.$element.on('resizeme.zf.trigger.revealScrollbarListener', function () { 5553 return updateScrollbarClass(); 5554 }); 5555 updateScrollbarClass(); 5556 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').addClass('is-reveal-open'); 5557 } 5558 /** 5559 * Removes classes and listeners on document that were required by open modals. 5560 * @private 5561 */ 5562 }, { 5563 key: "_removeGlobalClasses", 5564 value: function _removeGlobalClasses() { 5565 this.$element.off('resizeme.zf.trigger.revealScrollbarListener'); 5566 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').removeClass('is-reveal-open'); 5567 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').removeClass('zf-has-scroll'); 5568 } 5569 /** 5570 * Adds extra event handlers for the body and window if necessary. 5571 * @private 5572 */ 5573 }, { 5574 key: "_addGlobalListeners", 5575 value: function _addGlobalListeners() { 5576 var _this = this; 5577 if (!this.$element) { 5578 return; 5579 } // If we're in the middle of cleanup, don't freak out 5580 5581 this.focusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].findFocusable(this.$element); 5582 if (!this.options.overlay && this.options.closeOnClick && !this.options.fullScreen) { 5583 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').on('click.zf.dropdown tap.zf.dropdown', function (e) { 5584 if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(_this.$element[0], e.target) || !jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(document, e.target)) { 5585 return; 5586 } 5587 _this.close(); 5588 }); 5589 } 5590 if (this.options.closeOnEsc) { 5591 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('keydown.zf.reveal', function (e) { 5592 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].handleKey(e, 'Reveal', { 5593 close: function close() { 5594 if (_this.options.closeOnEsc) { 5595 _this.close(); 5596 } 5597 } 5598 }); 5599 }); 5600 } 5601 } 5602 /** 5603 * Closes the modal. 5604 * @function 5605 * @fires Reveal#closed 5606 */ 5607 }, { 5608 key: "close", 5609 value: function close() { 5610 if (!this.isActive || !this.$element.is(':visible')) { 5611 return false; 5612 } 5613 var _this = this; // Motion UI method of hiding 5614 5615 if (this.options.animationOut) { 5616 if (this.options.overlay) { 5617 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__["Motion"].animateOut(this.$overlay, 'fade-out'); 5618 } 5619 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__["Motion"].animateOut(this.$element, this.options.animationOut, finishUp); 5620 } // jQuery method of hiding 5621 else { 5622 this.$element.hide(this.options.hideDelay); 5623 if (this.options.overlay) { 5624 this.$overlay.hide(0, finishUp); 5625 } else { 5626 finishUp(); 5627 } 5628 } // Conditionals to remove extra event listeners added on open 5629 5630 if (this.options.closeOnEsc) { 5631 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('keydown.zf.reveal'); 5632 } 5633 if (!this.options.overlay && this.options.closeOnClick) { 5634 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').off('click.zf.dropdown tap.zf.dropdown'); 5635 } 5636 this.$element.off('keydown.zf.reveal'); 5637 function finishUp() { 5638 // Get the current top before the modal is closed and restore the scroll after. 5639 // TODO: use component properties instead of HTML properties 5640 // See https://github.com/foundation/foundation-sites/pull/10786 5641 var scrollTop = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top"), 10); 5642 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 5643 _this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal 5644 } 5645 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].releaseFocus(_this.$element); 5646 _this.$element.attr('aria-hidden', true); 5647 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 5648 _this._enableScroll(scrollTop); 5649 } 5650 /** 5651 * Fires when the modal is done closing. 5652 * @event Reveal#closed 5653 */ 5654 5655 _this.$element.trigger('closed.zf.reveal'); 5656 } 5657 /** 5658 * Resets the modal content 5659 * This prevents a running video to keep going in the background 5660 */ 5661 5662 if (this.options.resetOnClose) { 5663 this.$element.html(this.$element.html()); 5664 } 5665 this.isActive = false; // If deepLink and we did not switched to an other modal... 5666 5667 if (_this.options.deepLink && window.location.hash === "#".concat(this.id)) { 5668 // Remove the history hash 5669 if (window.history.replaceState) { 5670 var urlWithoutHash = window.location.pathname + window.location.search; 5671 if (this.options.updateHistory) { 5672 window.history.pushState({}, '', urlWithoutHash); // remove the hash 5673 } else { 5674 window.history.replaceState('', document.title, urlWithoutHash); 5675 } 5676 } else { 5677 window.location.hash = ''; 5678 } 5679 } 5680 this.$activeAnchor.focus(); 5681 } 5682 /** 5683 * Toggles the open/closed state of a modal. 5684 * @function 5685 */ 5686 }, { 5687 key: "toggle", 5688 value: function toggle() { 5689 if (this.isActive) { 5690 this.close(); 5691 } else { 5692 this.open(); 5693 } 5694 } 5695 }, { 5696 key: "_destroy", 5697 value: 5698 /** 5699 * Destroys an instance of a modal. 5700 * @function 5701 */ 5702 function _destroy() { 5703 if (this.options.overlay) { 5704 this.$element.appendTo(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.appendTo)); // move $element outside of $overlay to prevent error unregisterPlugin() 5705 5706 this.$overlay.hide().off().remove(); 5707 } 5708 this.$element.hide().off(); 5709 this.$anchor.off('.zf'); 5710 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(".zf.reveal:".concat(this.id
5710)); 5711 if (this.onLoadListener) jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(this.onLoadListener); 5712 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 5713 this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal 5714 } 5715 } 5716 }]); 5717 return Reveal; 5718 }(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["Plugin"]); 5719 Reveal.defaults = { 5720 /** 5721 * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide. 5722 * @option 5723 * @type {string} 5724 * @default '' 5725 */ 5726 animationIn: '', 5727 /** 5728 * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide. 5729 * @option 5730 * @type {string} 5731 * @default '' 5732 */ 5733 animationOut: '', 5734 /** 5735 * Time, in ms, to delay the opening of a modal after a click if no animation used. 5736 * @option 5737 * @type {number} 5738 * @default 0 5739 */ 5740 showDelay: 0, 5741 /** 5742 * Time, in ms, to delay the closing of a modal after a click if no animation used. 5743 * @option 5744 * @type {number} 5745 * @default 0 5746 */ 5747 hideDelay: 0, 5748 /** 5749 * Allows a click on the body/overlay to close the modal. 5750 * @option 5751 * @type {boolean} 5752 * @default true 5753 */ 5754 closeOnClick: true, 5755 /** 5756 * Allows the modal to close if the user presses the `ESCAPE` key. 5757 * @option 5758 * @type {boolean} 5759 * @default true 5760 */ 5761 closeOnEsc: true, 5762 /** 5763 * If true, allows multiple modals to be displayed at once. 5764 * @option 5765 * @type {boolean} 5766 * @default false 5767 */ 5768 multipleOpened: false, 5769 /** 5770 * Distance, in pixels, the modal should push down from the top of the screen. 5771 * @option 5772 * @type {number|string} 5773 * @default auto 5774 */ 5775 vOffset: 'auto', 5776 /** 5777 * Distance, in pixels, the modal should push in from the side of the screen. 5778 * @option 5779 * @type {number|string} 5780 * @default auto 5781 */ 5782 hOffset: 'auto', 5783 /** 5784 * Allows the modal to be fullscreen, completely blocking out the rest of the view. JS checks for this as well. 5785 * @option 5786 * @type {boolean} 5787 * @default false 5788 */ 5789 fullScreen: false, 5790 /** 5791 * Allows the modal to generate an overlay div, which will cover the view when modal opens. 5792 * @option 5793 * @type {boolean} 5794 * @default true 5795 */ 5796 overlay: true, 5797 /** 5798 * Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api, otherwise, videos will continue to play in the background. 5799 * @option 5800 * @type {boolean} 5801 * @default false 5802 */ 5803 resetOnClose: false, 5804 /** 5805 * Link the location hash to the modal. 5806 * Set the location hash when the modal is opened/closed, and open/close the modal when the location changes. 5807 * @option 5808 * @type {boolean} 5809 * @default false 5810 */ 5811 deepLink: false, 5812 /** 5813 * If `deepLink` is enabled, update the browser history with the open modal 5814 * @option 5815 * @default false 5816 */ 5817 updateHistory: false, 5818 /** 5819 * Allows the modal to append to custom div. 5820 * @option 5821 * @type {string} 5822 * @default "body" 5823 */ 5824 appendTo: "body", 5825 /** 5826 * Allows adding additional class names to the reveal overlay. 5827 * @option 5828 * @type {string} 5829 * @default '' 5830 */ 5831 additionalOverlayClasses: '' 5832 }; 5833 5834 /***/ 5835 }), 5836
vendor: 13,410 bytes, lines 5836-6097
5836/***/"./js/foundation.util.triggers.js": ( 5837 /*!****************************************!*\ 5838 !*** ./js/foundation.util.triggers.js ***! 5839 \****************************************/ 5840 /*! exports provided: Triggers */ 5841 /***/ 5842 function _js_foundationUtilTriggersJs(module, __webpack_exports__, __webpack_require__) { 5843 "use strict"; 5844 5845 __webpack_require__.r(__webpack_exports__); 5846 /* harmony export (binding) */ 5847 __webpack_require__.d(__webpack_exports__, "Triggers", function () { 5848 return Triggers; 5849 }); 5850 /* harmony import */ 5851 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 5852 /* harmony import */ 5853 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 5854 /* harmony import */ 5855 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */"./foundation.core"); 5856 /* harmony import */ 5857 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 5858 /* harmony import */ 5859 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */"./foundation.util.motion"); 5860 /* harmony import */ 5861 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__); 5862 function _typeof(obj) { 5863 "@babel/helpers - typeof"; 5864 5865 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 5866 _typeof = function _typeof(obj) { 5867 return typeof obj; 5868 }; 5869 } else { 5870 _typeof = function _typeof(obj) { 5871 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 5872 }; 5873 } 5874 return _typeof(obj); 5875 } 5876 var MutationObserver = function () { 5877 var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; 5878 for (var i = 0; i < prefixes.length; i++) { 5879 if ("".concat(prefixes[i], "MutationObserver") in window) { 5880 return window["".concat(prefixes[i], "MutationObserver")]; 5881 } 5882 } 5883 return false; 5884 }(); 5885 var triggers = function triggers(el, type) { 5886 el.data(type).split(' ').forEach(function (id) { 5887 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]); 5888 }); 5889 }; 5890 var Triggers = { 5891 Listeners: { 5892 Basic: {}, 5893 Global: {} 5894 }, 5895 Initializers: {} 5896 }; 5897 Triggers.Listeners.Basic = { 5898 openListener: function openListener() { 5899 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open'); 5900 }, 5901 closeListener: function closeListener() { 5902 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close'); 5903 if (id) { 5904 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close'); 5905 } else { 5906 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger'); 5907 } 5908 }, 5909 toggleListener: function toggleListener() { 5910 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 5911 if (id) { 5912 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle'); 5913 } else { 5914 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger'); 5915 } 5916 }, 5917 closeableListener: function closeableListener(e) { 5918 var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable'); // Only close the first closable element. See https://git.io/zf-7833 5919 5920 e.stopPropagation(); 5921 if (animation !== '') { 5922 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () { 5923 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf'); 5924 }); 5925 } else { 5926 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf'); 5927 } 5928 }, 5929 toggleFocusListener: function toggleFocusListener() { 5930 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus'); 5931 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]); 5932 } 5933 }; // Elements with [data-open] will reveal a plugin that supports it when clicked. 5934 5935 Triggers.Initializers.addOpenListener = function ($elem) { 5936 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); 5937 $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); 5938 }; // Elements with [data-close] will close a plugin that supports it when clicked. 5939 // If used without a value on [data-close], the event will bubble, allowing it to close a parent component. 5940 5941 Triggers.Initializers.addCloseListener = function ($elem) { 5942 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); 5943 $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); 5944 }; // Elements with [data-toggle] will toggle a plugin that supports it when clicked. 5945 5946 Triggers.Initializers.addToggleListener = function ($elem) { 5947 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); 5948 $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); 5949 }; // Elements with [data-closable] will respond to close.zf.trigger events. 5950 5951 Triggers.Initializers.addCloseableListener = function ($elem) { 5952 $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); 5953 $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); 5954 }; // Elements with [data-toggle-focus] will respond to coming in and out of focus 5955 5956 Triggers.Initializers.addToggleFocusListener = function ($elem) { 5957 $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); 5958 $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); 5959 }; // More Global/complex listeners and triggers 5960 5961 Triggers.Listeners.Global = { 5962 resizeListener: function resizeListener($nodes) { 5963 if (!MutationObserver) { 5964 //fallback for IE 9 5965 $nodes.each(function () { 5966 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger'); 5967 }); 5968 } //trigger all listening elements and signal a resize event 5969 5970 $nodes.attr('data-events', "resize"); 5971 }, 5972 scrollListener: function scrollListener($nodes) { 5973 if (!MutationObserver) { 5974 //fallback for IE 9 5975 $nodes.each(function () { 5976 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger'); 5977 }); 5978 } //trigger all listening elements and signal a scroll event 5979 5980 $nodes.attr('data-events', "scroll"); 5981 }, 5982 closeMeListener: function closeMeListener(e, pluginId) { 5983 var plugin = e.namespace.split('.')[0]; 5984 var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]")); 5985 plugins.each(function () { 5986 var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 5987 _this.triggerHandler('close.zf.trigger', [_this]); 5988 }); 5989 } 5990 }; // Global, parses whole document. 5991 5992 Triggers.Initializers.addClosemeListener = function (pluginName) { 5993 var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'), 5994 plugNames = ['dropdown', 'tooltip', 'reveal']; 5995 if (pluginName) { 5996 if (typeof pluginName === 'string') { 5997 plugNames.push(pluginName); 5998 } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') { 5999 plugNames = plugNames.concat(pluginName); 6000 } else { 6001 console.error('Plugin names must be strings'); 6002 } 6003 } 6004 if (yetiBoxes.length) { 6005 var listeners = plugNames.map(function (name) { 6006 return "closeme.zf.".concat(name); 6007 }).join(' '); 6008 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); 6009 } 6010 }; 6011 function debounceGlobalListener(debounce, trigger, listener) { 6012 var timer, 6013 args = Array.prototype.slice.call(arguments, 3); 6014 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on(trigger, function () { 6015 if (timer) { 6016 clearTimeout(timer); 6017 } 6018 timer = setTimeout(function () { 6019 listener.apply(null, args); 6020 }, debounce || 10); //default time to emit scroll event 6021 }); 6022 } 6023 Triggers.Initializers.addResizeListener = function (debounce) { 6024 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]'); 6025 if ($nodes.length) { 6026 debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); 6027 } 6028 }; 6029 Triggers.Initializers.addScrollListener = function (debounce) { 6030 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]'); 6031 if ($nodes.length) { 6032 debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); 6033 } 6034 }; 6035 Triggers.Initializers.addMutationEventsListener = function ($elem) { 6036 if (!MutationObserver) { 6037 return false; 6038 } 6039 var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); //element callback 6040 6041 var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) { 6042 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target); //trigger the event handler for the element depending on type 6043 6044 switch (mutationRecordsList[0].type) { 6045 case "attributes": 6046 if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { 6047 $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); 6048 } 6049 if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { 6050 $target.triggerHandler('resizeme.zf.trigger', [$target]); 6051 } 6052 if (mutationRecordsList[0].attributeName === "style") { 6053 $target.closest("[data-mutate]").attr("data-events", "mutate"); 6054 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 6055 } 6056 break; 6057 case "childList": 6058 $target.closest("[data-mutate]").attr("data-events", "mutate"); 6059 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 6060 break; 6061 default: 6062 return false; 6063 //nothing 6064 } 6065 }; 6066 if ($nodes.length) { 6067 //for each element that needs to listen for resizing, scrolling, or mutation add a single observer 6068 for (var i = 0; i <= $nodes.length - 1; i++) { 6069 var elementObserver = new MutationObserver(listeningElementsMutation); 6070 elementObserver.observe($nodes[i], { 6071 attributes: true, 6072 childList: true, 6073 characterData: false, 6074 subtree: true, 6075 attributeFilter: ["data-events", "style"] 6076 }); 6077 } 6078 } 6079 }; 6080 Triggers.Initializers.addSimpleListeners = function () { 6081 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 6082 Triggers.Initializers.addOpenListener($document); 6083 Triggers.Initializers.addCloseListener($document); 6084 Triggers.Initializers.addToggleListener($document); 6085 Triggers.Initializers.addCloseableListener($document); 6086 Triggers.Initializers.addToggleFocusListener($document); 6087 }; 6088 Triggers.Initializers.addGlobalListeners = function () { 6089 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 6090 Triggers.Initializers.addMutationEventsListener($document); 6091 Triggers.Initializers.addResizeListener(250); 6092 Triggers.Initializers.addScrollListener(); 6093 Triggers.Initializers.addClosemeListener(); 6094 }; 6095 Triggers.init = function (__, Foundation) { 6096 Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["onLoad"])(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 6097 if (jquery__WEBPACK_IMPORTED_MODULE_0___default.a.triggersInitialized !== true) {
6098 Triggers.Initializers.addSimpleListeners(); 6099 Triggers.Initializers.addGlobalListeners(); 6100 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.triggersInitialized = true; 6101 } 6102 }); 6103 if (Foundation) { 6104 Foundation.Triggers = Triggers; // Legacy included to be backwards compatible for now. 6105 6106 Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; 6107 } 6108 }; 6109 6110 /***/ 6111 }), 6112 /***/14: ( 6113 /*!*******************************************************!*\ 6114 !*** multi ./js/entries/plugins/foundation.reveal.js ***! 6115 \*******************************************************/ 6116 /*! no static exports found */ 6117 /***/ 6118 function _(module, exports, __webpack_require__) { 6119 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.reveal.js */"./js/entries/plugins/foundation.reveal.js"); 6120 6121 /***/ 6122 }), 6123 /***/"jquery": ( 6124 /*!********************************************************************************************!*\ 6125 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 6126 \********************************************************************************************/ 6127 /*! no static exports found */ 6128 /***/ 6129 function jquery(module, exports) { 6130 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 6131 6132 /***/ 6133 }) 6134 6135 /******/ 6136 }); 6137}); 6138(function webpackUniversalModuleDefinition(root, factory) { 6139 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("./foundation.util.imageLoader"), require("./foundation.util.keyboard"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "./foundation.util.imageLoader", "./foundation.util.keyboard", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.tabs"] = factory(require("./foundation.core"), require("./foundation.util.imageLoader"), require("./foundation.util.keyboard"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.tabs"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.imageLoader"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"], root["jQuery"]); 6140})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_imageLoader__, __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 6141 return /******/function (modules) { 6142 // webpackBootstrap 6143 /******/ // The module cache 6144 /******/ 6145 var installedModules = {}; 6146 /******/ 6147 /******/ // The require function 6148 /******/ 6149 function __webpack_require__(moduleId) { 6150 /******/ 6151 /******/ // Check if module is in cache 6152 /******/if (installedModules[moduleId]) { 6153 /******/return installedModules[moduleId].exports; 6154 /******/ 6155 } 6156 /******/ // Create a new module (and put it into the cache) 6157 /******/ 6158 var module = installedModules[moduleId] = { 6159 /******/i: moduleId, 6160 /******/l: false, 6161 /******/exports: {} 6162 /******/ 6163 }; 6164 /******/ 6165 /******/ // Execute the module function 6166 /******/ 6167 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 6168 /******/ 6169 /******/ // Flag the module as loaded 6170 /******/ 6171 module.l = true; 6172 /******/ 6173 /******/ // Return the exports of the module 6174 /******/ 6175 return module.exports; 6176 /******/ 6177 } 6178 /******/ 6179 /******/ 6180 /******/ // expose the modules object (__webpack_modules__) 6181 /******/ 6182 __webpack_require__.m = modules; 6183 /******/ 6184 /******/ // expose the module cache 6185 /******/ 6186 __webpack_require__.c = installedModules; 6187 /******/ 6188 /******/ // define getter function for harmony exports 6189 /******/ 6190 __webpack_require__.d = function (exports, name, getter) { 6191 /******/if (!__webpack_require__.o(exports, name)) { 6192 /******/Object.defineProperty(exports, name, { 6193 enumerable: true, 6194 get: getter 6195 }); 6196 /******/ 6197 } 6198 /******/ 6199 }; 6200 /******/ 6201 /******/ // define __esModule on exports 6202 /******/ 6203 __webpack_require__.r = function (exports) { 6204 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 6205 /******/Object.defineProperty(exports, Symbol.toStringTag, { 6206 value: 'Module' 6207 }); 6208 /******/ 6209 } 6210 /******/ 6211 Object.defineProperty(exports, '__esModule', { 6212 value: true 6213 }); 6214 /******/ 6215 }; 6216 /******/ 6217 /******/ // create a fake namespace object 6218 /******/ // mode & 1: value is a module id, require it 6219 /******/ // mode & 2: merge all properties of value into the ns 6220 /******/ // mode & 4: return value when already ns object 6221 /******/ // mode & 8|1: behave like require 6222 /******/ 6223 __webpack_require__.t = function (value, mode) { 6224 /******/if (mode & 1) value = __webpack_require__(value); 6225 /******/ 6226 if (mode & 8) return value; 6227 /******/ 6228 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esMo
vendor: 4,021 bytes, lines 6228-6313
6228dule) return value; 6229 /******/ 6230 var ns = Object.create(null); 6231 /******/ 6232 __webpack_require__.r(ns); 6233 /******/ 6234 Object.defineProperty(ns, 'default', { 6235 enumerable: true, 6236 value: value 6237 }); 6238 /******/ 6239 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 6240 return value[key]; 6241 }.bind(null, key)); 6242 /******/ 6243 return ns; 6244 /******/ 6245 }; 6246 /******/ 6247 /******/ // getDefaultExport function for compatibility with non-harmony modules 6248 /******/ 6249 __webpack_require__.n = function (module) { 6250 /******/var getter = module && module.__esModule ? /******/function getDefault() { 6251 return module['default']; 6252 } : /******/function getModuleExports() { 6253 return module; 6254 }; 6255 /******/ 6256 __webpack_require__.d(getter, 'a', getter); 6257 /******/ 6258 return getter; 6259 /******/ 6260 }; 6261 /******/ 6262 /******/ // Object.prototype.hasOwnProperty.call 6263 /******/ 6264 __webpack_require__.o = function (object, property) { 6265 return Object.prototype.hasOwnProperty.call(object, property); 6266 }; 6267 /******/ 6268 /******/ // __webpack_public_path__ 6269 /******/ 6270 __webpack_require__.p = ""; 6271 /******/ 6272 /******/ 6273 /******/ // Load entry module and return exports 6274 /******/ 6275 return __webpack_require__(__webpack_require__.s = 18); 6276 /******/ 6277 } 6278 /************************************************************************/ 6279 /******/({ 6280 /***/"./foundation.core": ( 6281 /*!****************************************************************************************************************************************************************!*\ 6282 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 6283 \****************************************************************************************************************************************************************/ 6284 /*! no static exports found */ 6285 /***/ 6286 function _foundationCore(module, exports) { 6287 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 6288 6289 /***/ 6290 }), 6291 /***/"./foundation.util.imageLoader": ( 6292 /*!****************************************************************************************************************************************************************************************************************!*\ 6293 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.imageLoader"],"amd":"./foundation.util.imageLoader","commonjs":"./foundation.util.imageLoader","commonjs2":"./foundation.util.imageLoader"} ***! 6294 \****************************************************************************************************************************************************************************************************************/ 6295 /*! no static exports found */ 6296 /***/ 6297 function _foundationUtilImageLoader(module, exports) { 6298 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_imageLoader__; 6299 6300 /***/ 6301 }), 6302 /***/"./foundation.util.keyboard": ( 6303 /*!****************************************************************************************************************************************************************************************************!*\ 6304 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.keyboard"],"amd":"./foundation.util.keyboard","commonjs":"./foundation.util.keyboard","commonjs2":"./foundation.util.keyboard"} ***! 6305 \****************************************************************************************************************************************************************************************************/ 6306 /*! no static exports found */ 6307 /***/ 6308 function _foundationUtilKeyboard(module, exports) { 6309 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__; 6310 6311 /***/ 6312 }), 6313
6313/***/"./js/entries/plugins/foundation.tabs.js": ( 6314 /*!***********************************************!*\ 6315 !*** ./js/entries/plugins/foundation.tabs.js ***! 6316 \***********************************************/ 6317 /*! exports provided: Foundation, Tabs */ 6318 /***/ 6319 function _js_entries_plugins_foundationTabsJs(module, __webpack_exports__, __webpack_require__) { 6320 "use strict"; 6321 6322 __webpack_require__.r(__webpack_exports__); 6323 /* harmony import */ 6324 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 6325 /* harmony import */ 6326 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 6327 /* harmony reexport (safe) */ 6328 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 6329 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 6330 }); 6331 6332 /* harmony import */ 6333 var _foundation_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.tabs */"./js/foundation.tabs.js"); 6334 /* harmony reexport (safe) */ 6335 __webpack_require__.d(__webpack_exports__, "Tabs", function () { 6336 return _foundation_tabs__WEBPACK_IMPORTED_MODULE_1__["Tabs"]; 6337 }); 6338 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_tabs__WEBPACK_IMPORTED_MODULE_1__["Tabs"], 'Tabs'); 6339 6340 /***/ 6341 }), 6342
vendor: 5,203 bytes, lines 6342-6454
6342/***/"./js/foundation.tabs.js": ( 6343 /*!*******************************!*\ 6344 !*** ./js/foundation.tabs.js ***! 6345 \*******************************/ 6346 /*! exports provided: Tabs */ 6347 /***/ 6348 function _js_foundationTabsJs(module, __webpack_exports__, __webpack_require__) { 6349 "use strict"; 6350 6351 __webpack_require__.r(__webpack_exports__); 6352 /* harmony export (binding) */ 6353 __webpack_require__.d(__webpack_exports__, "Tabs", function () { 6354 return Tabs; 6355 }); 6356 /* harmony import */ 6357 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 6358 /* harmony import */ 6359 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 6360 /* harmony import */ 6361 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.plugin */"./foundation.core"); 6362 /* harmony import */ 6363 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__); 6364 /* harmony import */ 6365 var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.keyboard */"./foundation.util.keyboard"); 6366 /* harmony import */ 6367 var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__); 6368 /* harmony import */ 6369 var _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.imageLoader */"./foundation.util.imageLoader"); 6370 /* harmony import */ 6371 var _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_3__); 6372 function _typeof(obj) { 6373 "@babel/helpers - typeof"; 6374 6375 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 6376 _typeof = function _typeof(obj) { 6377 return typeof obj; 6378 }; 6379 } else { 6380 _typeof = function _typeof(obj) { 6381 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 6382 }; 6383 } 6384 return _typeof(obj); 6385 } 6386 function _classCallCheck(instance, Constructor) { 6387 if (!(instance instanceof Constructor)) { 6388 throw new TypeError("Cannot call a class as a function"); 6389 } 6390 } 6391 function _defineProperties(target, props) { 6392 for (var i = 0; i < props.length; i++) { 6393 var descriptor = props[i]; 6394 descriptor.enumerable = descriptor.enumerable || false; 6395 descriptor.configurable = true; 6396 if ("value" in descriptor) descriptor.writable = true; 6397 Object.defineProperty(target, descriptor.key, descriptor); 6398 } 6399 } 6400 function _createClass(Constructor, protoProps, staticProps) { 6401 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 6402 if (staticProps) _defineProperties(Constructor, staticProps); 6403 return Constructor; 6404 } 6405 function _inherits(subClass, superClass) { 6406 if (typeof superClass !== "function" && superClass !== null) { 6407 throw new TypeError("Super expression must either be null or a function"); 6408 } 6409 subClass.prototype = Object.create(superClass && superClass.prototype, { 6410 constructor: { 6411 value: subClass, 6412 writable: true, 6413 configurable: true 6414 } 6415 }); 6416 if (superClass) _setPrototypeOf(subClass, superClass); 6417 } 6418 function _setPrototypeOf(o, p) { 6419 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { 6420 o.__proto__ = p; 6421 return o; 6422 }; 6423 return _setPrototypeOf(o, p); 6424 } 6425 function _createSuper(Derived) { 6426 var hasNativeReflectConstruct = _isNativeReflectConstruct(); 6427 return function _createSuperInternal() { 6428 var Super = _getPrototypeOf(Derived), 6429 result; 6430 if (hasNativeReflectConstruct) { 6431 var NewTarget = _getPrototypeOf(this).constructor; 6432 result = Reflect.construct(Super, arguments, NewTarget); 6433 } else { 6434 result = Super.apply(this, arguments); 6435 } 6436 return _possibleConstructorReturn(this, result); 6437 }; 6438 } 6439 function _possibleConstructorReturn(self, call) { 6440 if (call && (_typeof(call) === "object" || typeof call === "function")) { 6441 return call; 6442 } else if (call !== void 0) { 6443 throw new TypeError("Derived constructors may only return object or undefined"); 6444 } 6445 return _assertThisInitialized(self); 6446 } 6447 function _assertThisInitialized(self) { 6448 if (self === void 0) { 6449 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 6450 } 6451 return self; 6452 } 6453 function _isNativeReflectConstruct() { 6454 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
6455 if (Reflect.construct.sham) return false; 6456 if (typeof Proxy === "function") return true; 6457 try { 6458 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); 6459 return true; 6460 } catch (e) { 6461 return false; 6462 } 6463 } 6464 function _getPrototypeOf(o) { 6465 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { 6466 return o.__proto__ || Object.getPrototypeOf(o); 6467 }; 6468 return _getPrototypeOf(o); 6469 } 6470 6471 /** 6472 * Tabs module. 6473 * @module foundation.tabs 6474 * @requires foundation.util.keyboard 6475 * @requires foundation.util.imageLoader if tabs contain images 6476 */ 6477 6478 var Tabs = /*#__PURE__*/function (_Plugin) { 6479 _inherits(Tabs, _Plugin); 6480 var _super = _createSuper(Tabs); 6481 function Tabs() { 6482 _classCallCheck(this, Tabs); 6483 return _super.apply(this, arguments); 6484 } 6485 _createClass(Tabs, [{ 6486 key: "_setup", 6487 value: 6488 /** 6489 * Creates a new instance of tabs. 6490 * @class 6491 * @name Tabs 6492 * @fires Tabs#init 6493 * @param {jQuery} element - jQuery object to make into tabs. 6494 * @param {Object} options - Overrides to the default plugin settings. 6495 */ 6496 function _setup(element, options) { 6497 this.$element = element; 6498 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Tabs.defaults, this.$element.data(), options); 6499 this.className = 'Tabs'; // ie9 back compat 6500 6501 this._init(); 6502 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].register('Tabs', { 6503 'ENTER': 'open', 6504 'SPACE': 'open', 6505 'ARROW_RIGHT': 'next', 6506 'ARROW_UP': 'previous', 6507 'ARROW_DOWN': 'next', 6508 'ARROW_LEFT': 'previous' // 'TAB': 'next', 6509 // 'SHIFT_TAB': 'previous' 6510 }); 6511 } 6512 /** 6513 * Initializes the tabs by showing and focusing (if autoFocus=true) the preset active tab. 6514 * @private 6515 */ 6516 }, { 6517 key: "_init", 6518 value: function _init() { 6519 var _this2 = this; 6520 var _this = this; 6521 this._isInitializing = true; 6522 this.$element.attr({ 6523 'role': 'tablist' 6524 }); 6525 this.$tabTitles = this.$element.find(".".concat(this.options.linkClass)); 6526 this.$tabContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-tabs-content=\"".concat(this.$element[0].id, "\"]")); 6527 this.$tabTitles.each(function () { 6528 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 6529 $link = $elem.find('a'), 6530 isActive = $elem.hasClass("".concat(_this.options.linkActiveClass)), 6531 hash = $link.attr('data-tabs-target') || $link[0].hash.slice(1), 6532 linkId = $link[0].id ? $link[0].id : "".concat(hash, "-label"), 6533 $tabContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(hash)); 6534 $elem.attr({ 6535 'role': 'presentation' 6536 }); 6537 $link.attr({ 6538 'role': 'tab', 6539 'aria-controls': hash, 6540 'aria-selected': isActive, 6541 'id': linkId, 6542 'tabindex': isActive ? '0' : '-1' 6543 }); 6544 $tabContent.attr({ 6545 'role': 'tabpanel', 6546 'aria-labelledby': linkId 6547 }); // Save up the initial hash to return to it later when going back in history 6548 6549 if (isActive) { 6550 _this._initialAnchor = "#".concat(hash); 6551 } 6552 if (!isActive) { 6553 $tabContent.attr('aria-hidden', 'true'); 6554 } 6555 if (isActive && _this.options.autoFocus) { 6556 _this.onLoadListener = Object(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["onLoad"])(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 6557 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({ 6558 scrollTop: $elem.offset().top 6559 }, _this.options.deepLinkSmudgeDelay, function () { 6560 $link.focus(); 6561 }); 6562 }); 6563 } 6564 }); 6565 if (this.options.matchHeight) { 6566 var $images = this.$tabContent.find('img'); 6567 if ($images.length) { 6568 Object(_foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_3__["onImagesLoaded"])($images, this._setHeight.bind(this)); 6569 } else { 6570 this._setHeight(); 6571 } 6572 } // Current context-bound function to open tabs on page load or history hashchange 6573 6574 this._checkDeepLink = function () { 6575 var anchor = window.location.hash; 6576 if (!anchor.length) { 6577 // If we are still initializing and there is no anchor, then there is nothing to do 6578 if (_this2._isInitializing) return; // Otherwise, move to the initial anchor 6579 6580 if (_this2._initialAnchor) anchor = _this2._initialAnchor; 6581 } 6582 var anchorNoHash = anchor.indexOf('#') >= 0 ? anchor.slice(1) : anchor; 6583 var $anchor = anchorNoHash && jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(anchorNoHash)); 6584 var $link = anchor && _this2.$element.find("[href$=\"".concat(anchor, "\"],[data-tabs-target=\"").concat(anchorNoHash, "\"]")).first();
vendor: 13,886 bytes, lines 6584-6927
6584 // Whether the anchor element that has been found is part of this element 6585 6586 var isOwnAnchor = !!($anchor.length && $link.length); 6587 if (isOwnAnchor) { 6588 // If there is an anchor for the hash, select it 6589 if ($anchor && $anchor.length && $link && $link.length) { 6590 _this2.selectTab($anchor, true); 6591 } // Otherwise, collapse everything 6592 else { 6593 _this2._collapse(); 6594 } // Roll up a little to show the titles 6595 6596 if (_this2.options.deepLinkSmudge) { 6597 var offset = _this2.$element.offset(); 6598 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({ 6599 scrollTop: offset.top - _this2.options.deepLinkSmudgeOffset 6600 }, _this2.options.deepLinkSmudgeDelay); 6601 } 6602 /** 6603 * Fires when the plugin has deeplinked at pageload 6604 * @event Tabs#deeplink 6605 */ 6606 6607 _this2.$element.trigger('deeplink.zf.tabs', [$link, $anchor]); 6608 } 6609 }; //use browser to open a tab, if it exists in this tabset 6610 6611 if (this.options.deepLink) { 6612 this._checkDeepLink(); 6613 } 6614 this._events(); 6615 this._isInitializing = false; 6616 } 6617 /** 6618 * Adds event handlers for items within the tabs. 6619 * @private 6620 */ 6621 }, { 6622 key: "_events", 6623 value: function _events() { 6624 this._addKeyHandler(); 6625 this._addClickHandler(); 6626 this._setHeightMqHandler = null; 6627 if (this.options.matchHeight) { 6628 this._setHeightMqHandler = this._setHeight.bind(this); 6629 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', this._setHeightMqHandler); 6630 } 6631 if (this.options.deepLink) { 6632 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('hashchange', this._checkDeepLink); 6633 } 6634 } 6635 /** 6636 * Adds click handlers for items within the tabs. 6637 * @private 6638 */ 6639 }, { 6640 key: "_addClickHandler", 6641 value: function _addClickHandler() { 6642 var _this = this; 6643 this.$element.off('click.zf.tabs').on('click.zf.tabs', ".".concat(this.options.linkClass), function (e) { 6644 e.preventDefault(); 6645 _this._handleTabChange(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)); 6646 }); 6647 } 6648 /** 6649 * Adds keyboard event handlers for items within the tabs. 6650 * @private 6651 */ 6652 }, { 6653 key: "_addKeyHandler", 6654 value: function _addKeyHandler() { 6655 var _this = this; 6656 this.$tabTitles.off('keydown.zf.tabs').on('keydown.zf.tabs', function (e) { 6657 if (e.which === 9) return; 6658 var $element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 6659 $elements = $element.parent('ul').children('li'), 6660 $prevElement, 6661 $nextElement; 6662 $elements.each(function (i) { 6663 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is($element)) { 6664 if (_this.options.wrapOnKeys) { 6665 $prevElement = i === 0 ? $elements.last() : $elements.eq(i - 1); 6666 $nextElement = i === $elements.length - 1 ? $elements.first() : $elements.eq(i + 1); 6667 } else { 6668 $prevElement = $elements.eq(Math.max(0, i - 1)); 6669 $nextElement = $elements.eq(Math.min(i + 1, $elements.length - 1)); 6670 } 6671 return; 6672 } 6673 }); // handle keyboard event with keyboard util 6674 6675 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].handleKey(e, 'Tabs', { 6676 open: function open() { 6677 $element.find('[role="tab"]').focus(); 6678 _this._handleTabChange($element); 6679 }, 6680 previous: function previous() { 6681 $prevElement.find('[role="tab"]').focus(); 6682 _this._handleTabChange($prevElement); 6683 }, 6684 next: function next() { 6685 $nextElement.find('[role="tab"]').focus(); 6686 _this._handleTabChange($nextElement); 6687 }, 6688 handled: function handled() { 6689 e.preventDefault(); 6690 } 6691 }); 6692 }); 6693 } 6694 /** 6695 * Opens the tab `$targetContent` defined by `$target`. Collapses active tab. 6696 * @param {jQuery} $target - Tab to open. 6697 * @param {boolean} historyHandled - browser has already handled a history update 6698 * @fires Tabs#change 6699 * @function 6700 */ 6701 }, { 6702 key: "_handleTabChange", 6703 value: function _handleTabChange($target, historyHandled) { 6704 // With `activeCollapse`, if the target is the active Tab, collapse it. 6705 if ($target.hasClass("".concat(this.options.linkActiveClass))) { 6706 if (this.options.activeCollapse) { 6707 this._collapse(); 6708 } 6709 return; 6710 } 6711 var $oldTab = this.$element.find(".".concat(this.options.linkClass, ".").concat(this.options.linkActiveClass)), 6712 $tabLink = $target.find('[role="tab"]'), 6713 target = $tabLink.attr('data-tabs-target'), 6714 anchor = target && target.length ? "#".concat(target) : $tabLink[0].hash, 6715 $targetContent = this.$tabContent.find(anchor); //close old tab 6716 6717 this._collapseTab($oldTab); //open new tab 6718 6719 this._openTab($target); //either replace or update browser history 6720 6721 if (this.options.deepLink && !historyHandled) { 6722 if (this.options.updateHistory) { 6723 history.pushState({}, '', anchor); 6724 } else { 6725 history.replaceState({}, '', anchor); 6726 } 6727 } 6728 /** 6729 * Fires when the plugin has successfully changed tabs. 6730 * @event Tabs#change 6731 */ 6732 6733 this.$element.trigger('change.zf.tabs', [$target, $targetContent]); //fire to children a mutation event 6734 6735 $targetContent.find("[data-mutate]").trigger("mutateme.zf.trigger"); 6736 } 6737 /** 6738 * Opens the tab `$targetContent` defined by `$target`. 6739 * @param {jQuery} $target - Tab to open. 6740 * @function 6741 */ 6742 }, { 6743 key: "_openTab", 6744 value: function _openTab($target) { 6745 var $tabLink = $target.find('[role="tab"]'), 6746 hash = $tabLink.attr('data-tabs-target') || $tabLink[0].hash.slice(1), 6747 $targetContent = this.$tabContent.find("#".concat(hash)); 6748 $target.addClass("".concat(this.options.linkActiveClass)); 6749 $tabLink.attr({ 6750 'aria-selected': 'true', 6751 'tabindex': '0' 6752 }); 6753 $targetContent.addClass("".concat(this.options.panelActiveClass)).removeAttr('aria-hidden'); 6754 } 6755 /** 6756 * Collapses `$targetContent` defined by `$target`. 6757 * @param {jQuery} $target - Tab to collapse. 6758 * @function 6759 */ 6760 }, { 6761 key: "_collapseTab", 6762 value: function _collapseTab($target) { 6763 var $targetAnchor = $target.removeClass("".concat(this.options.linkActiveClass)).find('[role="tab"]').attr({ 6764 'aria-selected': 'false', 6765 'tabindex': -1 6766 }); 6767 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat($targetAnchor.attr('aria-controls'))).removeClass("".concat(this.options.panelActiveClass)).attr({ 6768 'aria-hidden': 'true' 6769 }); 6770 } 6771 /** 6772 * Collapses the active Tab. 6773 * @fires Tabs#collapse 6774 * @function 6775 */ 6776 }, { 6777 key: "_collapse", 6778 value: function _collapse() { 6779 var $activeTab = this.$element.find(".".concat(this.options.linkClass, ".").concat(this.options.linkActiveClass)); 6780 if ($activeTab.length) { 6781 this._collapseTab($activeTab); 6782 /** 6783 * Fires when the plugin has successfully collapsed tabs. 6784 * @event Tabs#collapse 6785 */ 6786 6787 this.$element.trigger('collapse.zf.tabs', [$activeTab]); 6788 } 6789 } 6790 /** 6791 * Public method for selecting a content pane to display. 6792 * @param {jQuery | String} elem - jQuery object or string of the id of the pane to display. 6793 * @param {boolean} historyHandled - browser has already handled a history update 6794 * @function 6795 */ 6796 }, { 6797 key: "selectTab", 6798 value: function selectTab(elem, historyHandled) { 6799 var idStr, hashIdStr; 6800 if (_typeof(elem) === 'object') { 6801 idStr = elem[0].id; 6802 } else { 6803 idStr = elem; 6804 } 6805 if (idStr.indexOf('#') < 0) { 6806 hashIdStr = "#".concat(idStr); 6807 } else { 6808 hashIdStr = idStr; 6809 idStr = idStr.slice(1); 6810 } 6811 var $target = this.$tabTitles.has("[href$=\"".concat(hashIdStr, "\"],[data-tabs-target=\"").concat(idStr, "\"]")).first(); 6812 this._handleTabChange($target, historyHandled); 6813 } 6814 }, { 6815 key: "_setHeight", 6816 value: 6817 /** 6818 * Sets the height of each panel to the height of the tallest panel. 6819 * If enabled in options, gets called on media query change. 6820 * If loading content via external source, can be called directly or with _reflow. 6821 * If enabled with `data-match-height="true"`, tabs sets to equal height 6822 * @function 6823 * @private 6824 */ 6825 function _setHeight() { 6826 var max = 0, 6827 _this = this; // Lock down the `this` value for the root tabs object 6828 6829 if (!this.$tabContent) { 6830 return; 6831 } 6832 this.$tabContent.find(".".concat(this.options.panelClass)).css('min-height', '').each(function () { 6833 var panel = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 6834 isActive = panel.hasClass("".concat(_this.options.panelActiveClass)); // get the options from the parent instead of trying to get them from the child 6835 6836 if (!isActive) { 6837 panel.css({ 6838 'visibility': 'hidden', 6839 'display': 'block' 6840 }); 6841 } 6842 var temp = this.getBoundingClientRect().height; 6843 if (!isActive) { 6844 panel.css({ 6845 'visibility': '', 6846 'display': '' 6847 }); 6848 } 6849 max = temp > max ? temp : max; 6850 }).css('min-height', "".concat(max, "px")); 6851 } 6852 /** 6853 * Destroys an instance of tabs. 6854 * @fires Tabs#destroyed 6855 */ 6856 }, { 6857 key: "_destroy", 6858 value: function _destroy() { 6859 this.$element.find(".".concat(this.options.linkClass)).off('.zf.tabs').hide().end().find(".".concat(this.options.panelClass)).hide(); 6860 if (this.options.matchHeight) { 6861 if (this._setHeightMqHandler != null) { 6862 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('changed.zf.mediaquery', this._setHeightMqHandler); 6863 } 6864 } 6865 if (this.options.deepLink) { 6866 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('hashchange', this._checkDeepLink); 6867 } 6868 if (this.onLoadListener) { 6869 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(this.onLoadListener); 6870 } 6871 } 6872 }]); 6873 return Tabs; 6874 }(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["Plugin"]); 6875 Tabs.defaults = { 6876 /** 6877 * Link the location hash to the active pane. 6878 * Set the location hash when the active pane changes, and open the corresponding pane when the location changes. 6879 * @option 6880 * @type {boolean} 6881 * @default false 6882 */ 6883 deepLink: false, 6884 /** 6885 * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the tab panel is visible 6886 * @option 6887 * @type {boolean} 6888 * @default false 6889 */ 6890 deepLinkSmudge: false, 6891 /** 6892 * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment 6893 * @option 6894 * @type {number} 6895 * @default 300 6896 */ 6897 deepLinkSmudgeDelay: 300, 6898 /** 6899 * If `deepLinkSmudge` is enabled, animation offset from the top for the deep link adjustment 6900 * @option 6901 * @type {number} 6902 * @default 0 6903 */ 6904 deepLinkSmudgeOffset: 0, 6905 /** 6906 * If `deepLink` is enabled, update the browser history with the open tab 6907 * @option 6908 * @type {boolean} 6909 * @default false 6910 */ 6911 updateHistory: false, 6912 /** 6913 * Allows the window to scroll to content of active pane on load. 6914 * Not recommended if more than one tab panel per page. 6915 * @option 6916 * @type {boolean} 6917 * @default false 6918 */ 6919 autoFocus: false, 6920 /** 6921 * Allows keyboard input to 'wrap' around the tab links. 6922 * @option 6923 * @type {boolean} 6924 * @default true 6925 */ 6926 wrapOnKeys: true, 6927 /**
6928 * Allows the tab content panes to match heights if set to true. 6929 * @option 6930 * @type {boolean} 6931 * @default false 6932 */ 6933 matchHeight: false, 6934 /** 6935 * Allows active tabs to collapse when clicked. 6936 * @option 6937 * @type {boolean} 6938 * @default false 6939 */ 6940 activeCollapse: false, 6941 /** 6942 * Class applied to `li`'s in tab link list. 6943 * @option 6944 * @type {string} 6945 * @default 'tabs-title' 6946 */ 6947 linkClass: 'tabs-title', 6948 /** 6949 * Class applied to the active `li` in tab link list. 6950 * @option 6951 * @type {string} 6952 * @default 'is-active' 6953 */ 6954 linkActiveClass: 'is-active', 6955 /** 6956 * Class applied to the content containers. 6957 * @option 6958 * @type {string} 6959 * @default 'tabs-panel' 6960 */ 6961 panelClass: 'tabs-panel', 6962 /** 6963 * Class applied to the active content container. 6964 * @option 6965 * @type {string} 6966 * @default 'is-active' 6967 */ 6968 panelActiveClass: 'is-active' 6969 }; 6970 6971 /***/ 6972 }), 6973 /***/18: ( 6974 /*!*****************************************************!*\ 6975 !*** multi ./js/entries/plugins/foundation.tabs.js ***! 6976 \*****************************************************/ 6977 /*! no static exports found */ 6978 /***/ 6979 function _(module, exports, __webpack_require__) { 6980 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.tabs.js */"./js/entries/plugins/foundation.tabs.js"); 6981 6982 /***/ 6983 }), 6984 /***/"jquery": ( 6985 /*!********************************************************************************************!*\ 6986 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 6987 \********************************************************************************************/ 6988 /*! no static exports found */ 6989 /***/ 6990 function jquery(module, exports) { 6991 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 6992 6993 /***/ 6994 }) 6995 6996 /******/ 6997 }); 6998}); 6999(function webpackUniversalModuleDefinition(root, factory) { 7000 if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object' && (typeof module === "undefined" ? "undefined" : _typeof2(module)) === 'object') module.exports = factory(require("./foundation.core"), require("./foundation.util.box"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("jquery"));else if (typeof define === 'function' && define.amd) define(["./foundation.core", "./foundation.util.box", "./foundation.util.mediaQuery", "./foundation.util.motion", "jquery"], factory);else if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === 'object') exports["foundation.tooltip"] = factory(require("./foundation.core"), require("./foundation.util.box"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("jquery"));else root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.tooltip"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.box"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"], root["jQuery"]); 7001})(window, function (__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_box__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 7002 return /******/function (modules) { 7003 // webpackBootstrap 7004 /******/ // The module cache 7005 /******/ 7006 var installedModules = {}; 7007 /******/ 7008 /******/ // The require function 7009 /******/ 7010 function __webpack_require__(moduleId) { 7011 /******/ 7012 /******/ // Check if module is in cache 7013 /******/if (installedModules[moduleId]) { 7014 /******/return installedModules[moduleId].exports; 7015 /******/ 7016 } 7017 /******/ // Create a new module (and put it into the cache) 7018 /******/ 7019 var module = installedModules[moduleId] = { 7020 /******/i: moduleId, 7021 /******/l: false, 7022 /******/exports: {} 7023 /******/ 7024 }; 7025 /******/ 7026 /******/ // Execute the module function 7027 /******/ 7028 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 7029 /******/ 7030 /******/ // Flag the module as loaded 7031 /******/ 7032 module.l = true; 7033 /******/ 7034 /******/ // Return the exports of the module 7035 /******/ 7036 return module.exports; 7037 /******/ 7038 } 7039 /******/ 7040 /******/ 7041 /******/ // expose the modules object (__webpack_modules__) 7042 /******/ 7043 __webpack_require__.m = modules; 7044 /******/ 7045 /******/ // expose the module cache 7046 /******/ 7047 __webpack_require__.c = installedModules; 7048 /******/ 7049 /******/ // define getter function for harmony exports 7050 /******/ 7051 __webpack_require__.d = function (exports, name, getter) { 7052 /******/if (!__webpack_require__.o(exports, name)) { 7053 /******/Object.defineProperty(exports, name, { 7054 enumerable: true, 7055 get: getter 7056 }); 7057 /******/ 7058 } 7059 /******/ 7060 }; 7061 /******/ 7062 /******/ // define __esModule on exports 7063 /******/ 7064 __webpack_require__.r = function (exports) { 7065 /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { 7066 /******/Object.defineProperty(exports, Symbol.toStringTag, { 7067 value: 'Module' 7068 }); 7069 /******/ 7070 } 7071 /******/ 7072 Object.defineProperty(exports, '__esModule', { 7073 value: true 7074 }); 7075 /******/ 7076 }; 7077 /******/ 7078 /******/ // create a fake namespace object 7079 /******/ // mode & 1: value is a module id, require it 7080 /******/ // mode & 2: merge all properties of value into the ns 7081 /******/ // mode & 4: return value when already ns object 7082 /******/ // mode & 8|1: behave like require 7083 /******/ 7084 __webpack_require__.t = function (value, mode) { 7085 /******/if (mode & 1) value = __webpack_require__(value); 7086 /******/ 7087 if (mode & 8) return value; 7088 /******/ 7089 if (mode & 4 && _typeof2(value) === 'object' && value && value.__esMo
vendor: 4,604 bytes, lines 7089-7179
7089dule) return value; 7090 /******/ 7091 var ns = Object.create(null); 7092 /******/ 7093 __webpack_require__.r(ns); 7094 /******/ 7095 Object.defineProperty(ns, 'default', { 7096 enumerable: true, 7097 value: value 7098 }); 7099 /******/ 7100 if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) { 7101 return value[key]; 7102 }.bind(null, key)); 7103 /******/ 7104 return ns; 7105 /******/ 7106 }; 7107 /******/ 7108 /******/ // getDefaultExport function for compatibility with non-harmony modules 7109 /******/ 7110 __webpack_require__.n = function (module) { 7111 /******/var getter = module && module.__esModule ? /******/function getDefault() { 7112 return module['default']; 7113 } : /******/function getModuleExports() { 7114 return module; 7115 }; 7116 /******/ 7117 __webpack_require__.d(getter, 'a', getter); 7118 /******/ 7119 return getter; 7120 /******/ 7121 }; 7122 /******/ 7123 /******/ // Object.prototype.hasOwnProperty.call 7124 /******/ 7125 __webpack_require__.o = function (object, property) { 7126 return Object.prototype.hasOwnProperty.call(object, property); 7127 }; 7128 /******/ 7129 /******/ // __webpack_public_path__ 7130 /******/ 7131 __webpack_require__.p = ""; 7132 /******/ 7133 /******/ 7134 /******/ // Load entry module and return exports 7135 /******/ 7136 return __webpack_require__(__webpack_require__.s = 20); 7137 /******/ 7138 } 7139 /************************************************************************/ 7140 /******/({ 7141 /***/"./foundation.core": ( 7142 /*!****************************************************************************************************************************************************************!*\ 7143 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 7144 \****************************************************************************************************************************************************************/ 7145 /*! no static exports found */ 7146 /***/ 7147 function _foundationCore(module, exports) { 7148 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 7149 7150 /***/ 7151 }), 7152 /***/"./foundation.util.box": ( 7153 /*!********************************************************************************************************************************************************************************!*\ 7154 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.box"],"amd":"./foundation.util.box","commonjs":"./foundation.util.box","commonjs2":"./foundation.util.box"} ***! 7155 \********************************************************************************************************************************************************************************/ 7156 /*! no static exports found */ 7157 /***/ 7158 function _foundationUtilBox(module, exports) { 7159 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_box__; 7160 7161 /***/ 7162 }), 7163 /***/"./foundation.util.mediaQuery": ( 7164 /*!************************************************************************************************************************************************************************************************************!*\ 7165 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.mediaQuery"],"amd":"./foundation.util.mediaQuery","commonjs":"./foundation.util.mediaQuery","commonjs2":"./foundation.util.mediaQuery"} ***! 7166 \************************************************************************************************************************************************************************************************************/ 7167 /*! no static exports found */ 7168 /***/ 7169 function _foundationUtilMediaQuery(module, exports) { 7170 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__; 7171 7172 /***/ 7173 }), 7174 /***/"./foundation.util.motion": ( 7175 /*!********************************************************************************************************************************************************************************************!*\ 7176 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***! 7177 \********************************************************************************************************************************************************************************************/ 7178 /*! no static exports found */ 7179 /***/
7180 function _foundationUtilMotion(module, exports) { 7181 module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__; 7182 7183 /***/ 7184 }), 7185
7185/***/"./js/entries/plugins/foundation.tooltip.js": ( 7186 /*!**************************************************!*\ 7187 !*** ./js/entries/plugins/foundation.tooltip.js ***! 7188 \**************************************************/ 7189 /*! exports provided: Foundation, Tooltip */ 7190 /***/ 7191 function _js_entries_plugins_foundationTooltipJs(module, __webpack_exports__, __webpack_require__) { 7192 "use strict"; 7193 7194 __webpack_require__.r(__webpack_exports__); 7195 /* harmony import */ 7196 var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */"./foundation.core"); 7197 /* harmony import */ 7198 var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 7199 /* harmony reexport (safe) */ 7200 __webpack_require__.d(__webpack_exports__, "Foundation", function () { 7201 return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; 7202 }); 7203 7204 /* harmony import */ 7205 var _foundation_tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.tooltip */"./js/foundation.tooltip.js"); 7206 /* harmony reexport (safe) */ 7207 __webpack_require__.d(__webpack_exports__, "Tooltip", function () { 7208 return _foundation_tooltip__WEBPACK_IMPORTED_MODULE_1__["Tooltip"]; 7209 }); 7210 _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_tooltip__WEBPACK_IMPORTED_MODULE_1__["Tooltip"], 'Tooltip'); 7211 7212 /***/ 7213 }), 7214
vendor: 4,580 bytes, lines 7214-7318
7214/***/"./js/foundation.positionable.js": ( 7215 /*!***************************************!*\ 7216 !*** ./js/foundation.positionable.js ***! 7217 \***************************************/ 7218 /*! exports provided: Positionable */ 7219 /***/ 7220 function _js_foundationPositionableJs(module, __webpack_exports__, __webpack_require__) { 7221 "use strict"; 7222 7223 __webpack_require__.r(__webpack_exports__); 7224 /* harmony export (binding) */ 7225 __webpack_require__.d(__webpack_exports__, "Positionable", function () { 7226 return Positionable; 7227 }); 7228 /* harmony import */ 7229 var _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.util.box */"./foundation.util.box"); 7230 /* harmony import */ 7231 var _foundation_util_box__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__); 7232 /* harmony import */ 7233 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.plugin */"./foundation.core"); 7234 /* harmony import */ 7235 var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__); 7236 function _typeof(obj) { 7237 "@babel/helpers - typeof"; 7238 7239 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 7240 _typeof = function _typeof(obj) { 7241 return typeof obj; 7242 }; 7243 } else { 7244 _typeof = function _typeof(obj) { 7245 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 7246 }; 7247 } 7248 return _typeof(obj); 7249 } 7250 function _classCallCheck(instance, Constructor) { 7251 if (!(instance instanceof Constructor)) { 7252 throw new TypeError("Cannot call a class as a function"); 7253 } 7254 } 7255 function _defineProperties(target, props) { 7256 for (var i = 0; i < props.length; i++) { 7257 var descriptor = props[i]; 7258 descriptor.enumerable = descriptor.enumerable || false; 7259 descriptor.configurable = true; 7260 if ("value" in descriptor) descriptor.writable = true; 7261 Object.defineProperty(target, descriptor.key, descriptor); 7262 } 7263 } 7264 function _createClass(Constructor, protoProps, staticProps) { 7265 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 7266 if (staticProps) _defineProperties(Constructor, staticProps); 7267 return Constructor; 7268 } 7269 function _inherits(subClass, superClass) { 7270 if (typeof superClass !== "function" && superClass !== null) { 7271 throw new TypeError("Super expression must either be null or a function"); 7272 } 7273 subClass.prototype = Object.create(superClass && superClass.prototype, { 7274 constructor: { 7275 value: subClass, 7276 writable: true, 7277 configurable: true 7278 } 7279 }); 7280 if (superClass) _setPrototypeOf(subClass, superClass); 7281 } 7282 function _setPrototypeOf(o, p) { 7283 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { 7284 o.__proto__ = p; 7285 return o; 7286 }; 7287 return _setPrototypeOf(o, p); 7288 } 7289 function _createSuper(Derived) { 7290 var hasNativeReflectConstruct = _isNativeReflectConstruct(); 7291 return function _createSuperInternal() { 7292 var Super = _getPrototypeOf(Derived), 7293 result; 7294 if (hasNativeReflectConstruct) { 7295 var NewTarget = _getPrototypeOf(this).constructor; 7296 result = Reflect.construct(Super, arguments, NewTarget); 7297 } else { 7298 result = Super.apply(this, arguments); 7299 } 7300 return _possibleConstructorReturn(this, result); 7301 }; 7302 } 7303 function _possibleConstructorReturn(self, call) { 7304 if (call && (_typeof(call) === "object" || typeof call === "function")) { 7305 return call; 7306 } else if (call !== void 0) { 7307 throw new TypeError("Derived constructors may only return object or undefined"); 7308 } 7309 return _assertThisInitialized(self); 7310 } 7311 function _assertThisInitialized(self) { 7312 if (self === void 0) { 7313 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 7314 } 7315 return self; 7316 } 7317 function _isNativeReflectConstruct() { 7318 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
7319 if (Reflect.construct.sham) return false; 7320 if (typeof Proxy === "function") return true; 7321 try { 7322 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); 7323 return true; 7324 } catch (e) { 7325 return false; 7326 } 7327 } 7328 function _getPrototypeOf(o) { 7329 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { 7330 return o.__proto__ || Object.getPrototypeOf(o); 7331 }; 7332 return _getPrototypeOf(o); 7333 } 7334 var POSITIONS = ['left', 'right', 'top', 'bottom']; 7335 var VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center']; 7336 var HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center']; 7337 var ALIGNMENTS = { 7338 'left': VERTICAL_ALIGNMENTS, 7339 'right': VERTICAL_ALIGNMENTS, 7340 'top': HORIZONTAL_ALIGNMENTS, 7341 'bottom': HORIZONTAL_ALIGNMENTS 7342 }; 7343 function nextItem(item, array) { 7344 var currentIdx = array.indexOf(item); 7345 if (currentIdx === array.length - 1) { 7346 return array[0]; 7347 } else { 7348 return array[currentIdx + 1]; 7349 } 7350 } 7351 var Positionable = /*#__PURE__*/function (_Plugin) { 7352 _inherits(Positionable, _Plugin); 7353 var _super = _createSuper(Positionable); 7354 function Positionable() { 7355 _classCallCheck(this, Positionable); 7356 return _super.apply(this, arguments); 7357 } 7358 _createClass(Positionable, [{ 7359 key: "_init", 7360 value: 7361 /** 7362 * Abstract class encapsulating the tether-like explicit positioning logic 7363 * including repositioning based on overlap. 7364 * Expects classes to define defaults for vOffset, hOffset, position, 7365 * alignment, allowOverlap, and allowBottomOverlap. They can do this by 7366 * extending the defaults, or (for now recommended due to the way docs are 7367 * generated) by explicitly declaring them. 7368 * 7369 **/ 7370 function _init() { 7371 this.triedPositions = {}; 7372 this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position; 7373 this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment; 7374 this.originalPosition = this.position; 7375 this.originalAlignment = this.alignment; 7376 } 7377 }, { 7378 key: "_getDefaultPosition", 7379 value: function _getDefaultPosition() { 7380 return 'bottom'; 7381 } 7382 }, { 7383 key: "_getDefaultAlignment", 7384 value: function _getDefaultAlignment() { 7385 switch (this.position) { 7386 case 'bottom': 7387 case 'top': 7388 return Object(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["rtl"])() ? 'right' : 'left'; 7389 case 'left': 7390 case 'right': 7391 return 'bottom'; 7392 } 7393 } 7394 /** 7395 * Adjusts the positionable possible positions by iterating through alignments 7396 * and positions. 7397 * @function 7398 * @private 7399 */ 7400 }, { 7401 key: "_reposition", 7402 value: function _reposition() { 7403 if (this._alignmentsExhausted(this.position)) { 7404 this.position = nextItem(this.position, POSITIONS); 7405 this.alignment = ALIGNMENTS[this.position][0]; 7406 } else { 7407 this._realign(); 7408 } 7409 } 7410 /** 7411 * Adjusts the dropdown pane possible positions by iterating through alignments 7412 * on the current position. 7413 * @function 7414 * @private 7415 */ 7416 }, { 7417 key: "_realign", 7418 value: function _realign() { 7419 this._addTriedPosition(this.position, this.alignment); 7420 this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position]); 7421 } 7422 }, { 7423 key: "_addTriedPosition", 7424 value: function _addTriedPosition(position, alignment) { 7425 this.triedPositions[position] = this.triedPositions[position] || []; 7426 this.triedPositions[position].push(alignment); 7427 } 7428 }, { 7429 key: "_positionsExhausted", 7430 value: function _positionsExhausted() { 7431 var isExhausted = true; 7432 for (var i = 0; i < POSITIONS.length; i++) { 7433 isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]); 7434 } 7435 return isExhausted; 7436 } 7437 }, { 7438 key: "_alignmentsExhausted", 7439 value: function _alignmentsExhausted(position) { 7440 return this.triedPositions[position] && this.triedPositions[position].length === ALIGNMENTS[position].length; 7441 } // When we're trying to center, we don't want to apply offset that's going to 7442 // take us just off center, so wrap around to return 0 for the appropriate 7443 // offset in those alignments. TODO: Figure out if we want to make this 7444 // configurable behavior... it feels more intuitive, especially for tooltips, but 7445 // it's possible someone might actually want to start from center and then nudge 7446 // slightly off. 7447 }, { 7448 key: "_getVOffset", 7449 value: function _getVOffset() { 7450 return this.options.vOffset; 7451 } 7452 }, { 7453 key: "_getHOffset", 7454 value: function _getHOffset() { 7455 return this.options.hOffset; 7456 } 7457 }, { 7458 key: "_setPosition", 7459 value: function _setPosition($anchor, $element, $parent) { 7460 if ($anchor.attr('aria-expanded') === 'false') { 7461 return false;
7462 } 7463 if (!this.options.allowOverlap) { 7464 // restore original position & alignment before checking overlap 7465 this.position = this.originalPosition; 7466 this.alignment = this.originalAlignment; 7467 } 7468 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 7469 if (!this.options.allowOverlap) { 7470 var minOverlap = 100000000; // default coordinates to how we start, in case we can't figure out better 7471 7472 var minCoordinates = { 7473 position: this.position, 7474 alignment: this.alignment 7475 }; 7476 while (!this._positionsExhausted()) { 7477 var overlap = _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap); 7478 if (overlap === 0) { 7479 return; 7480 } 7481 if (overlap < minOverlap) { 7482 minOverlap = overlap; 7483 minCoordinates = { 7484 position: this.position, 7485 alignment: this.alignment 7486 }; 7487 } 7488 this._reposition(); 7489 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 7490 } // If we get through the entire loop, there was no non-overlapping 7491 // position available. Pick the version with least overlap. 7492 7493 this.position = minCoordinates.position; 7494 this.alignment = minCoordinates.alignment; 7495 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 7496 } 7497 } 7498 }]); 7499 return Positionable; 7500 }(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["Plugin"]); 7501 Positionable.defaults = { 7502 /** 7503 * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto. 7504 * @option 7505 * @type {string} 7506 * @default 'auto' 7507 */ 7508 position: 'auto', 7509 /** 7510 * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto. 7511 * @option 7512 * @type {string} 7513 * @default 'auto' 7514 */ 7515 alignment: 'auto', 7516 /** 7517 * Allow overlap of container/window. If false, dropdown positionable first 7518 * try to position as defined by data-position and data-alignment, but 7519 * reposition if it would cause an overflow. 7520 * @option 7521 * @type {boolean} 7522 * @default false 7523 */ 7524 allowOverlap: false, 7525 /** 7526 * Allow overlap of only the bottom of the container. This is the most common 7527 * behavior for dropdowns, allowing the dropdown to extend the bottom of the 7528 * screen but not otherwise influence or break out of the container. 7529 * @option 7530 * @type {boolean} 7531 * @default true 7532 */ 7533 allowBottomOverlap: true, 7534 /** 7535 * Number of pixels the positionable should be separated vertically from anchor 7536 * @option 7537 * @type {number} 7538 * @default 0 7539 */ 7540 vOffset: 0, 7541 /** 7542 * Number of pixels the positionable should be separated horizontally from anchor 7543 * @option 7544 * @type {number} 7545 * @default 0 7546 */ 7547 hOffset: 0 7548 }; 7549 7550 /***/ 7551 }), 7552
vendor: 6,046 bytes, lines 7552-7687
7552/***/"./js/foundation.tooltip.js": ( 7553 /*!**********************************!*\ 7554 !*** ./js/foundation.tooltip.js ***! 7555 \**********************************/ 7556 /*! exports provided: Tooltip */ 7557 /***/ 7558 function _js_foundationTooltipJs(module, __webpack_exports__, __webpack_require__) { 7559 "use strict"; 7560 7561 __webpack_require__.r(__webpack_exports__); 7562 /* harmony export (binding) */ 7563 __webpack_require__.d(__webpack_exports__, "Tooltip", function () { 7564 return Tooltip; 7565 }); 7566 /* harmony import */ 7567 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 7568 /* harmony import */ 7569 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 7570 /* harmony import */ 7571 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */"./foundation.core"); 7572 /* harmony import */ 7573 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 7574 /* harmony import */ 7575 var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */"./foundation.util.mediaQuery"); 7576 /* harmony import */ 7577 var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__); 7578 /* harmony import */ 7579 var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.triggers */"./js/foundation.util.triggers.js"); 7580 /* harmony import */ 7581 var _foundation_positionable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.positionable */"./js/foundation.positionable.js"); 7582 function _typeof(obj) { 7583 "@babel/helpers - typeof"; 7584 7585 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 7586 _typeof = function _typeof(obj) { 7587 return typeof obj; 7588 }; 7589 } else { 7590 _typeof = function _typeof(obj) { 7591 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 7592 }; 7593 } 7594 return _typeof(obj); 7595 } 7596 function _classCallCheck(instance, Constructor) { 7597 if (!(instance instanceof Constructor)) { 7598 throw new TypeError("Cannot call a class as a function"); 7599 } 7600 } 7601 function _defineProperties(target, props) { 7602 for (var i = 0; i < props.length; i++) { 7603 var descriptor = props[i]; 7604 descriptor.enumerable = descriptor.enumerable || false; 7605 descriptor.configurable = true; 7606 if ("value" in descriptor) descriptor.writable = true; 7607 Object.defineProperty(target, descriptor.key, descriptor); 7608 } 7609 } 7610 function _createClass(Constructor, protoProps, staticProps) { 7611 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 7612 if (staticProps) _defineProperties(Constructor, staticProps); 7613 return Constructor; 7614 } 7615 function _get(target, property, receiver) { 7616 if (typeof Reflect !== "undefined" && Reflect.get) { 7617 _get = Reflect.get; 7618 } else { 7619 _get = function _get(target, property, receiver) { 7620 var base = _superPropBase(target, property); 7621 if (!base) return; 7622 var desc = Object.getOwnPropertyDescriptor(base, property); 7623 if (desc.get) { 7624 return desc.get.call(receiver); 7625 } 7626 return desc.value; 7627 }; 7628 } 7629 return _get(target, property, receiver || target); 7630 } 7631 function _superPropBase(object, property) { 7632 while (!Object.prototype.hasOwnProperty.call(object, property)) { 7633 object = _getPrototypeOf(object); 7634 if (object === null) break; 7635 } 7636 return object; 7637 } 7638 function _inherits(subClass, superClass) { 7639 if (typeof superClass !== "function" && superClass !== null) { 7640 throw new TypeError("Super expression must either be null or a function"); 7641 } 7642 subClass.prototype = Object.create(superClass && superClass.prototype, { 7643 constructor: { 7644 value: subClass, 7645 writable: true, 7646 configurable: true 7647 } 7648 }); 7649 if (superClass) _setPrototypeOf(subClass, superClass); 7650 } 7651 function _setPrototypeOf(o, p) { 7652 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { 7653 o.__proto__ = p; 7654 return o; 7655 }; 7656 return _setPrototypeOf(o, p); 7657 } 7658 function _createSuper(Derived) { 7659 var hasNativeReflectConstruct = _isNativeReflectConstruct(); 7660 return function _createSuperInternal() { 7661 var Super = _getPrototypeOf(Derived), 7662 result; 7663 if (hasNativeReflectConstruct) { 7664 var NewTarget = _getPrototypeOf(this).constructor; 7665 result = Reflect.construct(Super, arguments, NewTarget); 7666 } else { 7667 result = Super.apply(this, arguments); 7668 } 7669 return _possibleConstructorReturn(this, result); 7670 }; 7671 } 7672 function _possibleConstructorReturn(self, call) { 7673 if (call && (_typeof(call) === "object" || typeof call === "function")) { 7674 return call; 7675 } else if (call !== void 0) { 7676 throw new TypeError("Derived constructors may only return object or undefined"); 7677 } 7678 return _assertThisInitialized(self); 7679 } 7680 function _assertThisInitialized(self) { 7681 if (self === void 0) { 7682 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 7683 } 7684 return self; 7685 } 7686 function _isNativeReflectConstruct() { 7687 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
7688 if (Reflect.construct.sham) return false; 7689 if (typeof Proxy === "function") return true; 7690 try { 7691 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); 7692 return true; 7693 } catch (e) { 7694 return false; 7695 } 7696 } 7697 function _getPrototypeOf(o) { 7698 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { 7699 return o.__proto__ || Object.getPrototypeOf(o); 7700 }; 7701 return _getPrototypeOf(o); 7702 } 7703 7704 /** 7705 * Tooltip module. 7706 * @module foundation.tooltip 7707 * @requires foundation.util.box 7708 * @requires foundation.util.mediaQuery 7709 * @requires foundation.util.triggers 7710 */ 7711 7712 var Tooltip = /*#__PURE__*/function (_Positionable) { 7713 _inherits(Tooltip, _Positionable); 7714 var _super = _createSuper(Tooltip); 7715 function Tooltip() { 7716 _classCallCheck(this, Tooltip); 7717 return _super.apply(this, arguments); 7718 } 7719 _createClass(Tooltip, [{ 7720 key: "_setup", 7721 value: 7722 /** 7723 * Creates a new instance of a Tooltip. 7724 * @class 7725 * @name Tooltip 7726 * @fires Tooltip#init 7727 * @param {jQuery} element - jQuery object to attach a tooltip to. 7728 * @param {Object} options - object to extend the default configuration. 7729 */ 7730 function _setup(element, options) { 7731 this.$element = element; 7732 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Tooltip.defaults, this.$element.data(), options); 7733 this.className = 'Tooltip'; // ie9 back compat 7734 7735 this.isActive = false; 7736 this.isClick = false; // Triggers init is idempotent, just need to make sure it is initialized 7737 7738 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_3__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 7739 this._init(); 7740 } 7741 /** 7742 * Initializes the tooltip by setting the creating the tip element, adding it's text, setting private variables and setting attributes on the anchor. 7743 * @private 7744 */ 7745 }, { 7746 key: "_init", 7747 value: function _init() { 7748 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init(); 7749 var elemId = this.$element.attr('aria-describedby') || Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, 'tooltip'); 7750 this.options.tipText = this.options.tipText || this.$element.attr('title'); 7751 this.template = this.options.template ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.template) : this._buildTemplate(elemId); 7752 if (this.options.allowHtml) { 7753 this.template.appendTo(document.body).html(this.options.tipText).hide(); 7754 } else { 7755 this.template.appendTo(document.body).text(this.options.tipText).hide(); 7756 } 7757 this.$element.attr({ 7758 'title': '', 7759 'aria-describedby': elemId, 7760 'data-yeti-box': elemId, 7761 'data-toggle': elemId, 7762 'data-resize': elemId 7763 }).addClass(this.options.triggerClass); 7764 _get(_getPrototypeOf(Tooltip.prototype), "_init", this).call(this); 7765 this._events(); 7766 } 7767 }, { 7768 key: "_getDefaultPosition", 7769 value: function _getDefaultPosition() { 7770 // handle legacy classnames 7771 var elementClassName = this.$element[0].className; 7772 if (this.$element[0] instanceof SVGElement) { 7773 elementClassName = elementClassName.baseVal; 7774 } 7775 var position = elementClassName.match(/\b(top|left|right|bottom)\b/g); 7776 return position ? position[0] : 'top'; 7777 } 7778 }, { 7779 key: "_getDefaultAlignment", 7780 value: function _getDefaultAlignment() { 7781 return 'center'; 7782 } 7783 }, { 7784 key: "_getHOffset", 7785 value: function _getHOffset() { 7786 if (this.position === 'left' || this.position === 'right') { 7787 return this.options.hOffset + this.options.tooltipWidth; 7788 } else { 7789 return this.options.hOffset; 7790 } 7791 } 7792 }, { 7793 key: "_getVOffset", 7794 value: function _getVOffset() { 7795 if (this.position === 'top' || this.position === 'bottom') { 7796 return this.options.vOffset + this.options.tooltipHeight; 7797 } else { 7798 return this.options.vOffset; 7799 } 7800 } 7801 /** 7802 * builds the tooltip element, adds attributes, and returns the template. 7803 * @private 7804 */ 7805 }, { 7806 key: "_buildTemplate", 7807 value: function _buildTemplate(id) { 7808 var templateClasses = "".concat(this.options.tooltipClass, " ").concat(this.options.templateClasses).trim(); 7809 var $template = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div></div>').addClass(templateClasses).attr({ 7810 'role': 'tooltip', 7811 'aria-hidden': true, 7812 'data-is-active': false, 7813 'data-is-focus': false, 7814 'id': id 7815 }); 7816 return $template; 7817 } 7818 /** 7819 * sets the position class of an element and recursively calls itself until there are no more possible positions to attempt, or the tooltip element is no longer colliding. 7820 * if the tooltip is larger than the screen width, default to full width - any user selected margin 7821 * @private 7822 */ 7823 }, { 7824 key: "_setPosition", 7825 value: function _setPosition() { 7826 _get(_getPrototypeOf(Tooltip.prototype), "_setPosition", this).call(this, this.$element, this.template); 7827 } 7828 /** 7829 * reveals the tooltip, and fires an event to close any other open tooltips on the page 7830 * @fires Tooltip#closeme 7831 * @fires Tooltip#show 7832 * @function 7833 */ 7834 }, { 7835 key: "show", 7836 value: function show() { 7837 if (this.options.showOn !== 'all' && !_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"].is(this.options.showOn)) { 7838 // console.error('The screen is too small to display this tooltip'); 7839 return false;
vendor: 1,892 bytes, lines 7840-7890
7840 } 7841 var _this = this; 7842 this.template.css('visibility', 'hidden').show(); 7843 this._setPosition(); 7844 this.template.removeClass('top bottom left right').addClass(this.position); 7845 this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment); 7846 /** 7847 * Fires to close all other open tooltips on the page 7848 * @event Closeme#tooltip 7849 */ 7850 7851 this.$element.trigger('closeme.zf.tooltip', this.template.attr('id')); 7852 this.template.attr({ 7853 'data-is-active': true, 7854 'aria-hidden': false 7855 }); 7856 _this.isActive = true; 7857 this.template.stop().hide().css('visibility', '').fadeIn(this.options.fadeInDuration, function () {//maybe do stuff? 7858 }); 7859 /** 7860 * Fires when the tooltip is shown 7861 * @event Tooltip#show 7862 */ 7863 7864 this.$element.trigger('show.zf.tooltip'); 7865 } 7866 /** 7867 * Hides the current tooltip, and resets the positioning class if it was changed due to collision 7868 * @fires Tooltip#hide 7869 * @function 7870 */ 7871 }, { 7872 key: "hide", 7873 value: function hide() { 7874 var _this = this; 7875 this.template.stop().attr({ 7876 'aria-hidden': true, 7877 'data-is-active': false 7878 }).fadeOut(this.options.fadeOutDuration, function () { 7879 _this.isActive = false; 7880 _this.isClick = false; 7881 }); 7882 /** 7883 * fires when the tooltip is hidden 7884 * @event Tooltip#hide 7885 */ 7886 7887 this.$element.trigger('hide.zf.tooltip'); 7888 } 7889 /** 7890 * adds event listeners for the tooltip and its anchor
vendor: 7,809 bytes, lines 7891-8111
7891 * TODO combine some of the listeners like focus and mouseenter, etc. 7892 * @private 7893 */ 7894 }, { 7895 key: "_events", 7896 value: function _events() { 7897 var _this = this; 7898 var hasTouch = 'ontouchstart' in window || typeof window.ontouchstart !== 'undefined'; 7899 var isFocus = false; // `disableForTouch: Fully disable the tooltip on touch devices 7900 7901 if (hasTouch && this.options.disableForTouch) return; 7902 if (!this.options.disableHover) { 7903 this.$element.on('mouseenter.zf.tooltip', function () { 7904 if (!_this.isActive) { 7905 _this.timeout = setTimeout(function () { 7906 _this.show(); 7907 }, _this.options.hoverDelay); 7908 } 7909 }).on('mouseleave.zf.tooltip', Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["ignoreMousedisappear"])(function () { 7910 clearTimeout(_this.timeout); 7911 if (!isFocus || _this.isClick && !_this.options.clickOpen) { 7912 _this.hide(); 7913 } 7914 })); 7915 } 7916 if (hasTouch) { 7917 this.$element.on('tap.zf.tooltip touchend.zf.tooltip', function () { 7918 _this.isActive ? _this.hide() : _this.show(); 7919 }); 7920 } 7921 if (this.options.clickOpen) { 7922 this.$element.on('mousedown.zf.tooltip', function () { 7923 if (_this.isClick) {//_this.hide(); 7924 // _this.isClick = false; 7925 } else { 7926 _this.isClick = true; 7927 if ((_this.options.disableHover || !_this.$element.attr('tabindex')) && !_this.isActive) { 7928 _this.show(); 7929 } 7930 } 7931 }); 7932 } else { 7933 this.$element.on('mousedown.zf.tooltip', function () { 7934 _this.isClick = true; 7935 }); 7936 } 7937 this.$element.on({ 7938 // 'toggle.zf.trigger': this.toggle.bind(this), 7939 // 'close.zf.trigger': this.hide.bind(this) 7940 'close.zf.trigger': this.hide.bind(this) 7941 }); 7942 this.$element.on('focus.zf.tooltip', function () { 7943 isFocus = true; 7944 if (_this.isClick) { 7945 // If we're not showing open on clicks, we need to pretend a click-launched focus isn't 7946 // a real focus, otherwise on hover and come back we get bad behavior 7947 if (!_this.options.clickOpen) { 7948 isFocus = false; 7949 } 7950 return false; 7951 } else { 7952 _this.show(); 7953 } 7954 }).on('focusout.zf.tooltip', function () { 7955 isFocus = false; 7956 _this.isClick = false; 7957 _this.hide(); 7958 }).on('resizeme.zf.trigger', function () { 7959 if (_this.isActive) { 7960 _this._setPosition(); 7961 } 7962 }); 7963 } 7964 /** 7965 * adds a toggle method, in addition to the static show() & hide() functions 7966 * @function 7967 */ 7968 }, { 7969 key: "toggle", 7970 value: function toggle() { 7971 if (this.isActive) { 7972 this.hide(); 7973 } else { 7974 this.show(); 7975 } 7976 } 7977 /** 7978 * Destroys an instance of tooltip, removes template element from the view. 7979 * @function 7980 */ 7981 }, { 7982 key: "_destroy", 7983 value: function _destroy() { 7984 this.$element.attr('title', this.template.text()).off('.zf.trigger .zf.tooltip').removeClass(this.options.triggerClass).removeClass('top right left bottom').removeAttr('aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box'); 7985 this.template.remove(); 7986 } 7987 }]); 7988 return Tooltip; 7989 }(_foundation_positionable__WEBPACK_IMPORTED_MODULE_4__["Positionable"]); 7990 Tooltip.defaults = { 7991 /** 7992 * Time, in ms, before a tooltip should open on hover. 7993 * @option 7994 * @type {number} 7995 * @default 200 7996 */ 7997 hoverDelay: 200, 7998 /** 7999 * Time, in ms, a tooltip should take to fade into view. 8000 * @option 8001 * @type {number} 8002 * @default 150 8003 */ 8004 fadeInDuration: 150, 8005 /** 8006 * Time, in ms, a tooltip should take to fade out of view. 8007 * @option 8008 * @type {number} 8009 * @default 150 8010 */ 8011 fadeOutDuration: 150, 8012 /** 8013 * Disables hover events from opening the tooltip if set to true 8014 * @option 8015 * @type {boolean} 8016 * @default false 8017 */ 8018 disableHover: false, 8019 /** 8020 * Disable the tooltip for touch devices. 8021 * This can be useful to make elements with a tooltip on it trigger their 8022 * action on the first tap instead of displaying the tooltip. 8023 * @option 8024 * @type {booelan} 8025 * @default false 8026 */ 8027 disableForTouch: false, 8028 /** 8029 * Optional addtional classes to apply to the tooltip template on init. 8030 * @option 8031 * @type {string} 8032 * @default '' 8033 */ 8034 templateClasses: '', 8035 /** 8036 * Non-optional class added to tooltip templates. Foundation default is 'tooltip'. 8037 * @option 8038 * @type {string} 8039 * @default 'tooltip' 8040 */ 8041 tooltipClass: 'tooltip', 8042 /** 8043 * Class applied to the tooltip anchor element. 8044 * @option 8045 * @type {string} 8046 * @default 'has-tip' 8047 */ 8048 triggerClass: 'has-tip', 8049 /** 8050 * Minimum breakpoint size at which to open the tooltip. 8051 * @option 8052 * @type {string} 8053 * @default 'small' 8054 */ 8055 showOn: 'small', 8056 /** 8057 * Custom template to be used to generate markup for tooltip. 8058 * @option 8059 * @type {string} 8060 * @default '' 8061 */ 8062 template: '', 8063 /** 8064 * Text displayed in the tooltip template on open. 8065 * @option 8066 * @type {string} 8067 * @default '' 8068 */ 8069 tipText: '', 8070 touchCloseText: 'Tap to close.', 8071 /** 8072 * Allows the tooltip to remain open if triggered with a click or touch event. 8073 * @option 8074 * @type {boolean} 8075 * @default true 8076 */ 8077 clickOpen: true, 8078 /** 8079 * Position of tooltip. Can be left, right, bottom, top, or auto. 8080 * @option 8081 * @type {string} 8082 * @default 'auto' 8083 */ 8084 position: 'auto', 8085 /** 8086 * Alignment of tooltip relative to anchor. Can be left, right, bottom, top, center, or auto. 8087 * @option 8088 * @type {string} 8089 * @default 'auto' 8090 */ 8091 alignment: 'auto', 8092 /** 8093 * Allow overlap of container/window. If false, tooltip will first try to 8094 * position as defined by data-position and data-alignment, but reposition if 8095 * it would cause an overflow. @option 8096 * @type {boolean} 8097 * @default false 8098 */ 8099 allowOverlap: false, 8100 /** 8101 * Allow overlap of only the bottom of the container. This is the most common 8102 * behavior for dropdowns, allowing the dropdown to extend the bottom of the 8103 * screen but not otherwise influence or break out of the container. 8104 * Less common for tooltips. 8105 * @option 8106 * @type {boolean} 8107 * @default false 8108 */ 8109 allowBottomOverlap: false, 8110 /** 8111 * Distance, in pixels, the template should push away from the anch
8111or on the Y axis. 8112 * @option 8113 * @type {number} 8114 * @default 0 8115 */ 8116 vOffset: 0, 8117 /** 8118 * Distance, in pixels, the template should push away from the anchor on the X axis 8119 * @option 8120 * @type {number} 8121 * @default 0 8122 */ 8123 hOffset: 0, 8124 /** 8125 * Distance, in pixels, the template spacing auto-adjust for a vertical tooltip 8126 * @option 8127 * @type {number} 8128 * @default 14 8129 */ 8130 tooltipHeight: 14, 8131 /** 8132 * Distance, in pixels, the template spacing auto-adjust for a horizontal tooltip 8133 * @option 8134 * @type {number} 8135 * @default 12 8136 */ 8137 tooltipWidth: 12, 8138 /** 8139 * Allow HTML in tooltip. Warning: If you are loading user-generated content into tooltips, 8140 * allowing HTML may open yourself up to XSS attacks. 8141 * @option 8142 * @type {boolean} 8143 * @default false 8144 */ 8145 allowHtml: false 8146 }; 8147 /** 8148 * TODO utilize resize event trigger 8149 */ 8150 8151 /***/ 8152 }), 8153
vendor: 13,410 bytes, lines 8153-8414
8153/***/"./js/foundation.util.triggers.js": ( 8154 /*!****************************************!*\ 8155 !*** ./js/foundation.util.triggers.js ***! 8156 \****************************************/ 8157 /*! exports provided: Triggers */ 8158 /***/ 8159 function _js_foundationUtilTriggersJs(module, __webpack_exports__, __webpack_require__) { 8160 "use strict"; 8161 8162 __webpack_require__.r(__webpack_exports__); 8163 /* harmony export (binding) */ 8164 __webpack_require__.d(__webpack_exports__, "Triggers", function () { 8165 return Triggers; 8166 }); 8167 /* harmony import */ 8168 var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */"jquery"); 8169 /* harmony import */ 8170 var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 8171 /* harmony import */ 8172 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */"./foundation.core"); 8173 /* harmony import */ 8174 var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 8175 /* harmony import */ 8176 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */"./foundation.util.motion"); 8177 /* harmony import */ 8178 var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__); 8179 function _typeof(obj) { 8180 "@babel/helpers - typeof"; 8181 8182 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 8183 _typeof = function _typeof(obj) { 8184 return typeof obj; 8185 }; 8186 } else { 8187 _typeof = function _typeof(obj) { 8188 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 8189 }; 8190 } 8191 return _typeof(obj); 8192 } 8193 var MutationObserver = function () { 8194 var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; 8195 for (var i = 0; i < prefixes.length; i++) { 8196 if ("".concat(prefixes[i], "MutationObserver") in window) { 8197 return window["".concat(prefixes[i], "MutationObserver")]; 8198 } 8199 } 8200 return false; 8201 }(); 8202 var triggers = function triggers(el, type) { 8203 el.data(type).split(' ').forEach(function (id) { 8204 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]); 8205 }); 8206 }; 8207 var Triggers = { 8208 Listeners: { 8209 Basic: {}, 8210 Global: {} 8211 }, 8212 Initializers: {} 8213 }; 8214 Triggers.Listeners.Basic = { 8215 openListener: function openListener() { 8216 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open'); 8217 }, 8218 closeListener: function closeListener() { 8219 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close'); 8220 if (id) { 8221 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close'); 8222 } else { 8223 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger'); 8224 } 8225 }, 8226 toggleListener: function toggleListener() { 8227 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 8228 if (id) { 8229 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle'); 8230 } else { 8231 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger'); 8232 } 8233 }, 8234 closeableListener: function closeableListener(e) { 8235 var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable'); // Only close the first closable element. See https://git.io/zf-7833 8236 8237 e.stopPropagation(); 8238 if (animation !== '') { 8239 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () { 8240 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf'); 8241 }); 8242 } else { 8243 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf'); 8244 } 8245 }, 8246 toggleFocusListener: function toggleFocusListener() { 8247 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus'); 8248 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]); 8249 } 8250 }; // Elements with [data-open] will reveal a plugin that supports it when clicked. 8251 8252 Triggers.Initializers.addOpenListener = function ($elem) { 8253 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); 8254 $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); 8255 }; // Elements with [data-close] will close a plugin that supports it when clicked. 8256 // If used without a value on [data-close], the event will bubble, allowing it to close a parent component. 8257 8258 Triggers.Initializers.addCloseListener = function ($elem) { 8259 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); 8260 $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); 8261 }; // Elements with [data-toggle] will toggle a plugin that supports it when clicked. 8262 8263 Triggers.Initializers.addToggleListener = function ($elem) { 8264 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); 8265 $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); 8266 }; // Elements with [data-closable] will respond to close.zf.trigger events. 8267 8268 Triggers.Initializers.addCloseableListener = function ($elem) { 8269 $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); 8270 $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); 8271 }; // Elements with [data-toggle-focus] will respond to coming in and out of focus 8272 8273 Triggers.Initializers.addToggleFocusListener = function ($elem) { 8274 $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); 8275 $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); 8276 }; // More Global/complex listeners and triggers 8277 8278 Triggers.Listeners.Global = { 8279 resizeListener: function resizeListener($nodes) { 8280 if (!MutationObserver) { 8281 //fallback for IE 9 8282 $nodes.each(function () { 8283 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger'); 8284 }); 8285 } //trigger all listening elements and signal a resize event 8286 8287 $nodes.attr('data-events', "resize"); 8288 }, 8289 scrollListener: function scrollListener($nodes) { 8290 if (!MutationObserver) { 8291 //fallback for IE 9 8292 $nodes.each(function () { 8293 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger'); 8294 }); 8295 } //trigger all listening elements and signal a scroll event 8296 8297 $nodes.attr('data-events', "scroll"); 8298 }, 8299 closeMeListener: function closeMeListener(e, pluginId) { 8300 var plugin = e.namespace.split('.')[0]; 8301 var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]")); 8302 plugins.each(function () { 8303 var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 8304 _this.triggerHandler('close.zf.trigger', [_this]); 8305 }); 8306 } 8307 }; // Global, parses whole document. 8308 8309 Triggers.Initializers.addClosemeListener = function (pluginName) { 8310 var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'), 8311 plugNames = ['dropdown', 'tooltip', 'reveal']; 8312 if (pluginName) { 8313 if (typeof pluginName === 'string') { 8314 plugNames.push(pluginName); 8315 } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') { 8316 plugNames = plugNames.concat(pluginName); 8317 } else { 8318 console.error('Plugin names must be strings'); 8319 } 8320 } 8321 if (yetiBoxes.length) { 8322 var listeners = plugNames.map(function (name) { 8323 return "closeme.zf.".concat(name); 8324 }).join(' '); 8325 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); 8326 } 8327 }; 8328 function debounceGlobalListener(debounce, trigger, listener) { 8329 var timer, 8330 args = Array.prototype.slice.call(arguments, 3); 8331 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on(trigger, function () { 8332 if (timer) { 8333 clearTimeout(timer); 8334 } 8335 timer = setTimeout(function () { 8336 listener.apply(null, args); 8337 }, debounce || 10); //default time to emit scroll event 8338 }); 8339 } 8340 Triggers.Initializers.addResizeListener = function (debounce) { 8341 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]'); 8342 if ($nodes.length) { 8343 debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); 8344 } 8345 }; 8346 Triggers.Initializers.addScrollListener = function (debounce) { 8347 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]'); 8348 if ($nodes.length) { 8349 debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); 8350 } 8351 }; 8352 Triggers.Initializers.addMutationEventsListener = function ($elem) { 8353 if (!MutationObserver) { 8354 return false; 8355 } 8356 var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); //element callback 8357 8358 var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) { 8359 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target); //trigger the event handler for the element depending on type 8360 8361 switch (mutationRecordsList[0].type) { 8362 case "attributes": 8363 if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { 8364 $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); 8365 } 8366 if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { 8367 $target.triggerHandler('resizeme.zf.trigger', [$target]); 8368 } 8369 if (mutationRecordsList[0].attributeName === "style") { 8370 $target.closest("[data-mutate]").attr("data-events", "mutate"); 8371 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 8372 } 8373 break; 8374 case "childList": 8375 $target.closest("[data-mutate]").attr("data-events", "mutate"); 8376 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 8377 break; 8378 default: 8379 return false; 8380 //nothing 8381 } 8382 }; 8383 if ($nodes.length) { 8384 //for each element that needs to listen for resizing, scrolling, or mutation add a single observer 8385 for (var i = 0; i <= $nodes.length - 1; i++) { 8386 var elementObserver = new MutationObserver(listeningElementsMutation); 8387 elementObserver.observe($nodes[i], { 8388 attributes: true, 8389 childList: true, 8390 characterData: false, 8391 subtree: true, 8392 attributeFilter: ["data-events", "style"] 8393 }); 8394 } 8395 } 8396 }; 8397 Triggers.Initializers.addSimpleListeners = function () { 8398 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 8399 Triggers.Initializers.addOpenListener($document); 8400 Triggers.Initializers.addCloseListener($document); 8401 Triggers.Initializers.addToggleListener($document); 8402 Triggers.Initializers.addCloseableListener($document); 8403 Triggers.Initializers.addToggleFocusListener($document); 8404 }; 8405 Triggers.Initializers.addGlobalListeners = function () { 8406 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 8407 Triggers.Initializers.addMutationEventsListener($document); 8408 Triggers.Initializers.addResizeListener(250); 8409 Triggers.Initializers.addScrollListener(); 8410 Triggers.Initializers.addClosemeListener(); 8411 }; 8412 Triggers.init = function (__, Foundation) { 8413 Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["onLoad"])(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 8414 if (jquery__WEBPACK_IMPORTED_MODULE_0___default.a.triggersInitialized !== true) {
8415 Triggers.Initializers.addSimpleListeners(); 8416 Triggers.Initializers.addGlobalListeners(); 8417 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.triggersInitialized = true; 8418 } 8419 }); 8420 if (Foundation) { 8421 Foundation.Triggers = Triggers; // Legacy included to be backwards compatible for now. 8422 8423 Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; 8424 } 8425 }; 8426 8427 /***/ 8428 })
8428, 8429 /***/20: ( 8430 /*!********************************************************!*\ 8431 !*** multi ./js/entries/plugins/foundation.tooltip.js ***! 8432 \********************************************************/ 8433 /*! no static exports found */ 8434 /***/ 8435 function _(module, exports, __webpack_require__) { 8436 module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.tooltip.js */"./js/entries/plugins/foundation.tooltip.js"); 8437 8438 /***/ 8439 }), 8440 /***/"jquery": ( 8441 /*!********************************************************************************************!*\ 8442 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 8443 \********************************************************************************************/ 8444 /*! no static exports found */ 8445 /***/ 8446 function jquery(module, exports) { 8447 module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 8448 8449 /***/ 8450 }) 8451 8452 /******/ 8453 }); 8454}); 8455 8456/** 8457 * jQuery.browser.mobile (http://detectmobilebrowser.com/) 8458 * 8459 * jQuery.browser.mobile will be true if the browser is a mobile device 8460 * 8461 **/ 8462(function (a) { 8463 (jQuery.browser = jQuery.browser || {}).mobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)); 8464})(navigator.userAgent || navigator.vendor || window.opera); 8465/** 8466 * jquery-match-height master by @liabru 8467 * http://brm.io/jquery-match-height/ 8468 * License: MIT 8469 */ 8470 8471; 8472(function (factory) { 8473 // eslint-disable-line no-extra-semi 8474 'use strict'; 8475 8476 if (typeof define === 'function' && define.amd) { 8477 // AMD 8478 define(['jquery'], factory); 8479 } else if (typeof module !== 'undefined' && module.exports) { 8480 // CommonJS 8481 module.exports = factory(require('jquery')); 8482 } else { 8483 // Global 8484 factory(jQuery); 8485 } 8486})(function ($) { 8487 /* 8488 * internal 8489 */ 8490 8491 var _previousResizeWidth = -1, 8492 _updateTimeout = -1; 8493 8494 /* 8495 * _parse 8496 * value parse utility function 8497 */ 8498 8499 var _parse = function _parse(value) { 8500 // parse value and convert NaN to 0 8501 return parseFloat(value) || 0; 8502 }; 8503 8504 /* 8505 * _rows 8506 * utility function returns array of jQuery selections representing each row 8507 * (as displayed after float wrapping applied by browser) 8508 */ 8509 8510 var _rows = function _rows(elements) { 8511 var tolerance = 1, 8512 $elements = $(elements), 8513 lastTop = null, 8514 rows = []; 8515 8516 // group elements by their top position 8517 $elements.each(function () { 8518 var $that = $(this), 8519 top = $that.offset().top - _parse($that.css('margin-top')), 8520 lastRow = rows.length > 0 ? rows[rows.length - 1] : null; 8521 if (lastRow === null) { 8522 // first item on the row, so just push it 8523 rows.push($that); 8524 } else { 8525 // if the row top is the same, add to the row group 8526 if (Math.floor(Math.abs(lastTop - top)) <= tolerance) { 8527 rows[rows.length - 1] = lastRow.add($that); 8528 } else { 8529 // otherwise start a new row group 8530 rows.push($that); 8531 } 8532 } 8533 8534 // keep track of the last row top 8535 lastTop = top; 8536 }); 8537 return rows; 8538 }; 8539 8540 /* 8541 * _parseOptions 8542 * handle plugin options 8543 */ 8544 8545 var _parseOptions = function _parseOptions(options) { 8546 var opts = { 8547 byRow: true, 8548 property: 'height', 8549 target: null, 8550 remove: false 8551 }; 8552 if (_typeof2(options) === 'object') { 8553 return $.extend(opts, options); 8554 } 8555 if (typeof options === 'boolean') { 8556 opts.byRow = options; 8557 } else if (options === 'remove') { 8558 opts.remove = true; 8559 } 8560 return opts; 8561 }; 8562 8563 /* 8564 * matchHeight 8565 * plugin definition 8566 */ 8567 8568 var matchHeight = $.fn.matchHeight = function (options) { 8569 var opts = _parseOptions(options); 8570 8571 // handle remove 8572 if (opts.remove) { 8573 var that = this; 8574 8575 // remove fixed height from all selected elements 8576 this.css(opts.property, ''); 8577 8578 // remove selected elements from all groups 8579 $.each(matchHeight._groups, function (key, group) { 8580 group.elements = group.elements.not(that); 8581 }); 8582 8583 // TODO: cleanup empty groups 8584 8585 return this; 8586 } 8587 if (this.length <= 1 && !opts.target) { 8588 return this; 8589 } 8590 8591 // keep track of this group so we can re-apply later on load and resize events 8592 matchHeight._groups.push({ 8593 elements: this, 8594 options: opts 8595 }); 8596 8597 // match each element's height to the tallest element in the selection 8598 matchHeight._apply(this, opts); 8599 return this; 8600 }; 8601 8602 /* 8603 * plugin global options 8604 */ 8605 8606 matchHeight.version = 'master'; 8607 matchHeight._groups = []; 8608 matchHeight._throttle = 80; 8609 matchHeight._maintainScroll = false;
vendor: 7,344 bytes, lines 8610-8848
8610 matchHeight._beforeUpdate = null; 8611 matchHeight._afterUpdate = null; 8612 matchHeight._rows = _rows; 8613 matchHeight._parse = _parse; 8614 matchHeight._parseOptions = _parseOptions; 8615 8616 /* 8617 * matchHeight._apply 8618 * apply matchHeight to given elements 8619 */ 8620 8621 matchHeight._apply = function (elements, options) { 8622 var opts = _parseOptions(options), 8623 $elements = $(elements), 8624 rows = [$elements]; 8625 8626 // take note of scroll position 8627 var scrollTop = $(window).scrollTop(), 8628 htmlHeight = $('html').outerHeight(true); 8629 8630 // get hidden parents 8631 var $hiddenParents = $elements.parents().filter(':hidden'); 8632 8633 // cache the original inline style 8634 $hiddenParents.each(function () { 8635 var $that = $(this); 8636 $that.data('style-cache', $that.attr('style')); 8637 }); 8638 8639 // temporarily must force hidden parents visible 8640 $hiddenParents.css('display', 'block'); 8641 8642 // get rows if using byRow, otherwise assume one row 8643 if (opts.byRow && !opts.target) { 8644 // must first force an arbitrary equal height so floating elements break evenly 8645 $elements.each(function () { 8646 var $that = $(this), 8647 display = $that.css('display'); 8648 8649 // temporarily force a usable display value 8650 if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') { 8651 display = 'block'; 8652 } 8653 8654 // cache the original inline style 8655 $that.data('style-cache', $that.attr('style')); 8656 $that.css({ 8657 'display': display, 8658 'padding-top': '0', 8659 'padding-bottom': '0', 8660 'margin-top': '0', 8661 'margin-bottom': '0', 8662 'border-top-width': '0', 8663 'border-bottom-width': '0', 8664 'height': '100px', 8665 'overflow': 'hidden' 8666 }); 8667 }); 8668 8669 // get the array of rows (based on element top position) 8670 rows = _rows($elements); 8671 8672 // revert original inline styles 8673 $elements.each(function () { 8674 var $that = $(this); 8675 $that.attr('style', $that.data('style-cache') || ''); 8676 }); 8677 } 8678 $.each(rows, function (key, row) { 8679 var $row = $(row), 8680 targetHeight = 0; 8681 if (!opts.target) { 8682 // skip apply to rows with only one item 8683 if (opts.byRow && $row.length <= 1) { 8684 $row.css(opts.property, ''); 8685 return; 8686 } 8687 8688 // iterate the row and find the max height 8689 $row.each(function () { 8690 var $that = $(this), 8691 style = $that.attr('style'), 8692 display = $that.css('display'); 8693 8694 // temporarily force a usable display value 8695 if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') { 8696 display = 'block'; 8697 } 8698 8699 // ensure we get the correct actual height (and not a previously set height value) 8700 var css = { 8701 'display': display 8702 }; 8703 css[opts.property] = ''; 8704 $that.css(css); 8705 8706 // find the max height (including padding, but not margin) 8707 if ($that.outerHeight(false) > targetHeight) { 8708 targetHeight = $that.outerHeight(false); 8709 } 8710 8711 // revert styles 8712 if (style) { 8713 $that.attr('style', style); 8714 } else { 8715 $that.css('display', ''); 8716 } 8717 }); 8718 } else { 8719 // if target set, use the height of the target element 8720 targetHeight = opts.target.outerHeight(false); 8721 } 8722 8723 // iterate the row and apply the height to all elements 8724 $row.each(function () { 8725 var $that = $(this), 8726 verticalPadding = 0; 8727 8728 // don't apply to a target 8729 if (opts.target && $that.is(opts.target)) { 8730 return; 8731 } 8732 8733 // handle padding and border correctly (required when not using border-box) 8734 if ($that.css('box-sizing') !== 'border-box') { 8735 verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width')); 8736 verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom')); 8737 } 8738 8739 // set the height (accounting for padding and border) 8740 $that.css(opts.property, targetHeight - verticalPadding + 'px'); 8741 }); 8742 }); 8743 8744 // revert hidden parents 8745 $hiddenParents.each(function () { 8746 var $that = $(this); 8747 $that.attr('style', $that.data('style-cache') || null); 8748 }); 8749 8750 // restore scroll position if enabled 8751 if (matchHeight._maintainScroll) { 8752 $(window).scrollTop(scrollTop / htmlHeight * $('html').outerHeight(true)); 8753 } 8754 return this; 8755 }; 8756 8757 /* 8758 * matchHeight._applyDataApi 8759 * applies matchHeight to all elements with a data-match-height attribute 8760 */ 8761 8762 matchHeight._applyDataApi = function () { 8763 var groups = {}; 8764 8765 // generate groups by their groupId set by elements using data-match-height 8766 $('[data-match-height], [data-mh]').each(function () { 8767 var $this = $(this), 8768 groupId = $this.attr('data-mh') || $this.attr('data-match-height'); 8769 if (groupId in groups) { 8770 groups[groupId] = groups[groupId].add($this); 8771 } else { 8772 groups[groupId] = $this; 8773 } 8774 }); 8775 8776 // apply matchHeight to each group 8777 $.each(groups, function () { 8778 this.matchHeight(true); 8779 }); 8780 }; 8781 8782 /* 8783 * matchHeight._update 8784 * updates matchHeight on all current groups with their correct options 8785 */ 8786 8787 var _update = function _update(event) { 8788 if (matchHeight._beforeUpdate) { 8789 matchHeight._beforeUpdate(event, matchHeight._groups); 8790 } 8791 $.each(matchHeight._groups, function () { 8792 matchHeight._apply(this.elements, this.options); 8793 }); 8794 if (matchHeight._afterUpdate) { 8795 matchHeight._afterUpdate(event, matchHeight._groups); 8796 } 8797 }; 8798 matchHeight._update = function (throttle, event) { 8799 // prevent update if fired from a resize event 8800 // where the viewport width hasn't actually changed 8801 // fixes an event looping bug in IE8 8802 if (event && event.type === 'resize') { 8803 var windowWidth = $(window).width(); 8804 if (windowWidth === _previousResizeWidth) { 8805 return; 8806 } 8807 _previousResizeWidth = windowWidth; 8808 } 8809 8810 // throttle updates 8811 if (!throttle) { 8812 _update(event); 8813 } else if (_updateTimeout === -1) { 8814 _updateTimeout = setTimeout(function () { 8815 _update(event); 8816 _updateTimeout = -1; 8817 }, matchHeight._throttle); 8818 } 8819 }; 8820 8821 /* 8822 * bind events 8823 */ 8824 8825 // apply on DOM ready event 8826 $(matchHeight._applyDataApi); 8827 8828 // use on or bind where supported 8829 var on = $.fn.on ? 'on' : 'bind'; 8830 8831 // update heights on load and resize events 8832 $(window)[on]('load', function (event) { 8833 matchHeight._update(false, event); 8834 }); 8835 8836 // throttled update heights on resize events 8837 $(window)[on]('resize orientationchange', function (event) { 8838 matchHeight._update(true, event); 8839 }); 8840}); 8841(function ($) { 8842 $(function () { 8843 var dynamicPriceContainer = $('.single-product-dynamic-price'); 8844 var itemPrice = $(dynamicPriceContainer).data('price'); 8845 var dynamicPriceValueInt = $(dynamicPriceContainer).find('.amount .value'); 8846 var dynamicPriceValueDecimal = $(dynamicPriceContainer).find('.amount sup'); 8847 var dynamicPriceQty = $(dynamicPriceContainer).find('.single-product-dynamic-price__qty .value'); 8848 var triggering = false;
8849 function fetchAndShowNotices() { 8850 // Fetch notices directly from server (bypassing fragments cache) 8851 $.ajax({ 8852 url: wc_add_to_cart_params.wc_ajax_url.toString().replace('%%endpoint%%', 'get_refreshed_fragments'), 8853 type: 'POST', 8854 success: function success(data) { 8855 if (data && data.fragments && data.fragments['.woocommerce-notices-wrapper']) { 8856 var wrapper = $('.woocommerce-notices-wrapper').first(); 8857 if (wrapper.length) { 8858 wrapper.html($(data.fragments['.woocommerce-notices-wrapper']).html()); 8859 var notices = wrapper.find('.woocommerce-error, .woocommerce-message'); 8860 if (notices.length > 0) { 8861 $('html, body').animate({ 8862 scrollTop: wrapper.offset().top - 100 8863 }, 300); 8864 } 8865 } 8866 } 8867 } 8868 }); 8869 } 8870 $.ajaxPrefilter(function (options) { 8871 if (typeof options.url === 'string' && options.url.indexOf('wc-ajax=add_to_cart') !== -1) { 8872 var originalSuccess = options.success; 8873 options.success = function (response) { 8874 if (response && response.error) { 8875 // WC returns {error: true} and queues the notice server-side 8876 // Fetch notices directly to avoid fragment caching issues 8877 fetchAndShowNotices(); 8878 $('.single_add_to_cart_button, .add_to_cart_button').removeClass('loading'); 8879 return; 8880 } 8881 if (originalSuccess) { 8882 originalSuccess.apply(this, arguments); 8883 } 8884 }; 8885 } 8886 }); 8887 function setup_quantity_sync() { 8888 $('.woocommerce .quantity input').on('change keyup input click', function () { 8889 if ($(this).data('skip-theme-qty-update')) { 8890 return; 8891 } 8892 var that = this; 8893 if (triggering) { 8894 return; 8895 } 8896 setTimeout(function () { 8897 var parent_form = $(that).parents('form'); 8898 var qty = $(parent_form).find('input[type=number]'); 8899 var current_quantity = parseInt($(qty).val()) || 1; 8900 8901 // Clamp to max if exceeded 8902 var max = parseInt($(qty).attr('max')); 8903 var min = parseInt($(qty).attr('min')) || 1; 8904 if (max && !isNaN(max) && current_quantity > max) { 8905 current_quantity = max; 8906 $(qty).val(max); 8907 } 8908 if (current_quantity < min) { 8909 current_quantity = min; 8910 $(qty).val(min); 8911 } 8912 $(parent_form).find('.add_to_cart_button').attr('data-quantity', current_quantity); 8913 updateDynamicPrice(current_quantity); 8914 triggering = true; 8915 $(qty).trigger('change'); 8916 triggering = false; 8917 }, 0); 8918 }).trigger('change'); 8919 } 8920 function updateDynamicPrice(current_quantity) { 8921 $(dynamicPriceQty).html(current_quantity); 8922 var newPrice = itemPrice * current_quantity; 8923 var priceInt = Math.floor(newPrice); 8924 var priceDecimal = newPrice * 100 - priceInt * 100; 8925 var priceDecimalString = priceDecimal.toString(); 8926 if (priceDecimalString.length < 2) { 8927 priceDecimalString = "0".concat(priceDecimalString); 8928 } 8929 if (priceDecimalString.length > 2) { 8930 priceDecimalString = priceDecimalString.substring(0, 1); 8931 } 8932 $(dynamicPriceValueInt).html(priceInt); 8933 $(dynamicPriceValueDecimal).html(priceDecimalString); 8934 } 8935 setup_quantity_sync(); 8936 8937 // $(document).on("yith-wcan-ajax-filtered", function () { 8938 // setup_quantity_sync(); 8939 // 8940 // $(".woocommerce .quantity .plus").on("click", function () { 8941 // // var input = $(this).prev(); 8942 // var input = $(this).siblings('input[type=number]'); 8943 // input.val(parseInt(input.val()) + 1); 8944 // }); 8945 // 8946 // $(".woocommerce .quantity .minus").on("click", function () { 8947 // var input = $(this).siblings('input[type=number]'); 8948 // input.val((parseInt(input.val()) - 1 > 0 ? parseInt(input.val()) - 1 : 0)); 8949 // }); 8950 // }); 8951 }); 8952})(jQuery); 8953jQuery(function ($) { 8954 function setupListeners() {
8955 $(".woocommerce .quantity .plus").off("click.mmk_cart").on("click.mmk_cart", function () { 8956 var input = $(this).prev(); 8957 if (input.data('skip-theme-qty-update')) { 8958 return; 8959 } 8960 var max = parseInt($(input).attr('max')); 8961 var step = parseInt($(input).attr('step')) || 1; 8962 var value = parseInt(input.val()); 8963 var newValue; 8964 if (max && !isNaN(max)) { 8965 newValue = Math.min(max, value + step); 8966 } else { 8967 newValue = value + step; 8968 } 8969 input.val(newValue); 8970 $("input[name='update_cart']").removeAttr("disabled"); 8971 }); 8972 $(".woocommerce .quantity .minus").off("click.mmk_cart").on("click.mmk_cart", function () { 8973 var input = $(this).next(); 8974 if (input.data('skip-theme-qty-update')) { 8975 return; 8976 } 8977 var min = parseInt($(input).attr('min')); 8978 var step = parseInt($(input).attr('step')) || 1; 8979 var value = parseInt(input.val()); 8980 var newValue; 8981 if (min && !isNaN(min)) { 8982 newValue = Math.max(min, value - step); 8983 } else { 8984 newValue = Math.max(0, value - step); 8985 } 8986 input.val(newValue); 8987 8988 // input.val((parseInt(input.val()) - 1 > 0 ? parseInt(input.val()) - 1 : 0)); 8989 8990 $("input[name='update_cart']").removeAttr("disabled"); 8991 }); 8992 } 8993 setupListeners(); 8994 $(document.body).on("updated_cart_totals", function () { 8995 setupListeners(); 8996 var sum = 0; 8997 $(".shop_table.cart .input-text.qty.text").each(function () { 8998 sum += parseInt($(this).val()); 8999 }); 9000 if (sum > 0) $(".cart-items-number").html(sum).css("display", "block"); 9001 }); 9002}); 9003// (function ($) { 9004// $(function () { 9005// function toggleJuridiskieLauki(action) { 9006// var lauki = $('#billing_company_field,#billing_myfield7_field,#billing_myfield7c_field'); 9007// 9008// switch (action) { 9009// case "show": 9010// $(lauki).show(); 9011// break; 9012// case "hide": 9013// $(lauki).hide(); 9014// break; 9015// } 9016// } 9017// 9018// function checkState() { 9019// if ($('input[name="billing_myfield1"]:checked').val() == 'Fiziska persona') { 9020// toggleJuridiskieLauki('hide'); 9021// } else { 9022// toggleJuridiskieLauki('show'); 9023// } 9024// } 9025// 9026// if ($('form.woocommerce-checkout').length) { 9027// checkState(); 9028// 9029// $('input[name="billing_myfield1"]').on('change', function () { 9030// checkState(); 9031// }); 9032// } 9033// }); 9034// })(jQuery); 9035jQuery(function ($) { 9036 // Check if we're on the relevant page 9037 if (!$('.wc_payment_methods').length) { 9038 return; 9039 } 9040 function highlightSelectedPaymentMethod() { 9041 // Find all payment method li elements and the selected one 9042 var $methods = $('.wc_payment_methods li'); 9043 var $selected = $('.wc_payment_methods input[name="payment_method"]:checked').closest('li'); 9044 9045 // Remove selectedClass class from all and add to the selected one 9046 var selectedClass = 'wc_payment_method--selected'; 9047 $methods.removeClass(selectedClass); 9048 $selected.addClass(selectedClass); 9049 } 9050 9051 // Initial highlight on page load 9052 highlightSelectedPaymentMethod(); 9053 9054 // Highlight on payment method change 9055 $(document).on('change', 'input[name="payment_method"]', highlightSelectedPaymentMethod); 9056 9057 // Reapply the highlight after checkout update (which happens via AJAX) 9058 $(document.body).on('updated_checkout', highlightSelectedPaymentMethod); 9059}); 9060jQuery(function ($) { 9061 var checkoutForm = $('form.woocommerce-checkout'); 9062 if (!checkoutForm.length) { 9063 return; 9064 } 9065 var $body = $('body'); 9066 var isSubmitting = false; 9067 function triggerUpdateOrderReview() { 9068 if (isSubmitting) { 9069 return; // Skip if submitting 9070 } 9071 $body.trigger('update_checkout'); 9072 } 9073 9074 // Set flag on mousedown (fires before blur) 9075 checkoutForm.on('mousedown', '#place_order', function () { 9076 isSubmitting = true; 9077 }); 9078 9079 // Reset flag if click doesn't result in submission 9080 checkoutForm.on('mouseup', '#place_order', function () { 9081 setTimeout(function () { 9082 isSubmitting = false;
9083 }, 500); 9084 }); 9085 checkoutForm.on('change', 'input, select, textarea', function () { 9086 if ($(this).is('#marketing_consent')) { 9087 return; 9088 } 9089 triggerUpdateOrderReview(); 9090 }); 9091}); 9092 9093// Save data on page leave 9094// $(window).on('beforeunload', function () { 9095// console.log('beforeunload event'); 9096// triggerUpdateOrderReview(); 9097 9098// var update_order_reviewed = false; 9099// 9100// $('body').on('updated_checkout', function () { 9101// console.log('updated_checkout event triggered'); 9102// update_order_reviewed = true; 9103// }); 9104// 9105// const start = new Date().getTime(); 9106// 9107// while (!update_order_reviewed) { 9108// if (new Date().getTime() - start > 10000) { 9109// console.log('Waiting for updated_checkout event timed out'); 9110// break; 9111// } 9112// await new Promise(resolve => setTimeout(resolve, 100)); 9113// } 9114// 9115// if (update_order_reviewed) { 9116// console.log('updated_checkout event was triggered'); 9117// } else { 9118// console.log('updated_checkout event was not triggered in time'); 9119// } 9120 9121// e.preventDefault(); 9122// }); 9123(function ($) { 9124 $(document).on("yith-wcan-ajax-filtered", function () { 9125 setupFilterOpenings(); 9126 }); 9127 function setupFilterOpenings() { 9128 $('a.yit-wcan-select-open').on('click', function () { 9129 $('a.yit-wcan-select-open').not(this).each(function () { 9130 custom_yit_close_select_dropdown(this); 9131 }); 9132 }); 9133 } 9134 function custom_yit_close_select_dropdown(element) { 9135 $(element).parent().find('div.yith-wcan-select-wrapper').css("z-index", "-1").animate({ 9136 visibility: "hidden", 9137 opacity: 0 9138 }, 300); 9139 $(element).parent().find('a.yit-wcan-select-open').removeClass('active'); 9140 } 9141 setupFilterOpenings(); 9142})(jQuery); 9143jQuery(function ($) { 9144 var all_rows = $('.full-width-bg-grey'); 9145 function adjust_side_width() { 9146 var window_width = $(window).width(); 9147 $(all_rows).each(function () { 9148 var row_width = $(this).outerWidth(); 9149 var row_bg_color = $(this).css('background-color'); 9150 var side_width = (window_width - row_width) / 2; 9151 $(this).find('.full-width-bg-grey__side').css({ 9152 'width': side_width, 9153 'background-color': row_bg_color 9154 }); 9155 }); 9156 } 9157 adjust_side_width(); 9158 $(window).on('resize', function () { 9159 adjust_side_width(); 9160 }); 9161}); 9162jQuery(document).foundation(); 9163jQuery(function ($) { 9164 $('.youtube-lazyload[data-embed]').each(function () { 9165 var id = $(this).data('embed'); 9166 var thumbnail = $(this).data('thumbnail'); 9167 var block_id = $(this).data('block-id'); 9168 var block_args = $(this).data('args'); 9169 if (!id) { 9170 return; 9171 } 9172 var container = this; 9173 9174 // var youtube_data_url = ['https://www.googleapis.com/youtube/v3/videos?id=', id, '&key=', settings.yt_api_key, '&part=snippet'].join(''); 9175 // 9176 // loadBackgroundImage(id, width, $thumb, youtube_data_url); 9177 9178 var source_hd = thumbnail ? thumbnail : "https://img.youtube.com/vi/" + id + "/hqdefault.jpg"; 9179 9180 // var source_hd = "https://img.youtube.com/vi/" + id + "/hqdefault.jpg"; 9181 // var source_max = "https://img.youtube.com/vi/" + id + "/maxresdefault.jpg"; 9182 var image = new Image(); 9183 9184 // fetch(source_max, {method: 'HEAD'}) 9185 // .then(res => { 9186 // if (res.ok) { 9187 // console.log('Image exists.'); 9188 // 9189 // image.src = source_max; 9190 // 9191 // $(image).on("load", function (response, data) { 9192 // $(container).append(image); 9193 // }); 9194 // } else { 9195 // console.log('Image does not exist.'); 9196 // 9197 // image.src = source_hd; 9198 // 9199 // $(image).on("load", function (response, data) { 9200 // $(container).append(image); 9201 // }); 9202 // } 9203 // }) 9204 // .catch(function (err) { 9205 // console.log('Error:', err); 9206 // image.src = source_hd; 9207 // 9208 // $(image).on("load", function (response, data) { 9209 // $(container).append(image); 9210 // }); 9211 // }); 9212 9213 image.src = source_hd; 9214 $(image).on("load", function (response, data) { 9215 $(container).append(image); 9216 }); 9217 $(this).on("click", function () { 9218 var iframe = document.createElement("iframe"); 9219 var args = '?rel=0&showinfo=0&autoplay=1&enablejsapi=1'; 9220 if (block_args) { 9221 args += '&' + block_args; 9222 } 9223 iframe.setAttribute("frameborder", "0"); 9224 iframe.setAttribute("allowfullscreen", "");
9225 // iframe.setAttribute("src", "https://www.youtube.com/embed/" + id + "?rel=0&showinfo=0&autoplay=1&enablejsapi=1"); 9226 iframe.setAttribute("src", "https://www.youtube-nocookie.com/embed/" + id + args); 9227 iframe.setAttribute("allow", "autoplay"); 9228 if (block_id) { 9229 iframe.setAttribute("id", block_id); 9230 } 9231 $(this).html(""); 9232 $(this).append(iframe); 9233 $(this).trigger('mmk_youtube_lazyloaded', iframe); 9234 }); 9235 }); 9236}); 9237jQuery(function ($) { 9238 var initiated = false; 9239 $(window).on('resize', function () { 9240 if (initiated) { 9241 return; 9242 } 9243 initiated = true; 9244 setTimeout(function () { 9245 $.fn.matchHeight._update(); 9246 initiated = false; 9247 }, 20); 9248 }); 9249 initiated = true; 9250 setTimeout(function () { 9251 $.fn.matchHeight._update(); 9252 initiated = false; 9253 }, 1000); 9254 setTimeout(function () { 9255 $.fn.matchHeight._update(); 9256 initiated = false; 9257 }, 2000); 9258 9259 // setInterval(function () { 9260 // $.fn.matchHeight._update(); 9261 // }, 5000); 9262}); 9263jQuery(function ($) { 9264 $('.mmk-faq-accordion').each(function () { 9265 var content = $(this).find('.accordion-content').first(); 9266 $(this).foundation('down', $(content)); 9267 }); 9268}); 9269jQuery(document).ready(function ($) { 9270 $(function () { 9271 // $('.single-product .tabs [href="#tab-additional_information"]').remove(); 9272 // $('.single-product #tab-additional_information').detach().appendTo('.single-product .summary.entry-summary').addClass('moved').css('display', 'block'); 9273 9274 if (window.location.href.indexOf("nggallery") > -1) { 9275 var last_breadcrumb = $('.ngg-breadcrumbs .ngg-breadcrumb').last(); 9276 var separator = $('<li class="separator">/</li>'); 9277 $(separator).appendTo('.bread-crumb'); 9278 $(last_breadcrumb).appendTo('.bread-crumb'); 9279 $('.bread-crumb .page_title').remove(); 9280 $('.ngg-breadcrumbs').remove(); 9281 } 9282 $('br.ngg-clear').remove(); 9283 }); 9284 9285 // Select all links with hashes 9286 $('a[href*="#"]') 9287 // Remove links that don't actually link to anything 9288 .not('[href="#"]').not('[href="#0"]').not('[role="tab"]').click(function (event) { 9289 // On-page links 9290 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 9291 // Figure out element to scroll to 9292 var target = $(this.hash); 9293 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 9294 // Does a scroll target exist? 9295 if (target.length) { 9296 // Only prevent default if animation is actually gonna happen 9297 event.preventDefault(); 9298 $('html, body').animate({ 9299 // scrollTop: target.offset().top-100 9300 scrollTop: target.offset().top - 140 9301 }, 1000, function () { 9302 // Callback after animation 9303 // Must change focus! 9304 var $target = $(target); 9305 $target.focus(); 9306 if ($target.is(":focus")) { 9307 // Checking if the target was focused 9308 return false; 9309 } else { 9310 $target.attr('tabindex', '-1'); // Adding tabindex for elements not focusable 9311 $target.focus(); // Set focus again 9312 } 9313 ; 9314 }); 9315 } 9316 } 9317 }); 9318}); 9319(function ($) { 9320 var $productTitleElements = $('.woocommerce-loop-product__title'); 9321 if (!$productTitleElements.length) { 9322 return; 9323 } 9324 $productTitleElements.matchHeight(); 9325 $('.product-card-parameters').matchHeight(); 9326 $('.product-card-availability-container').matchHeight(); 9327 $('.woocommerce ul.products li.product img, html .woocommerce-page ul.products li.product img').each(function () { 9328 if (!$(this).next('.product-thumbnail-square-replacement').length) { 9329 var image_src = $(this).attr('src') || $(this).data('cfsrc'); 9330 var square_image_replacement = $('<div class="product-thumbnail-square-replacement"></div>').css('background-image', 'url("' + image_src + '")'); 9331 $(square_image_replacement).insertAfter(this); 9332 } 9333 }); 9334})(jQuery); 9335(function ($) { 9336 $('.woocommerce-product-gallery').on('wc-product-gallery-after-init', function () { 9337 var galleryViewport = $(this).find('.flex-viewport'); 9338 // console.log(galleryViewport.length); 9339 if (!galleryViewport.length) { 9340 return; 9341 } 9342 var badges = $('.single-product-badges'); 9343 // console.log(badges); 9344 9345 $(badges).detach().appendTo(galleryViewport); 9346 }); 9347})(jQuery); 9348jQuery(function ($) { 9349 // Cache DOM elements for better performance 9350 var $singleProductDescription = $('.single-product-description'); 9351 if (!$singleProductDescription.length) { 9352 return; 9353 } 9354 var $readMoreButton = $singleProductDescription.find('.single-product-description__read-more'); 9355 var $wrapper = $singleProductDescription.find('.single-product-description__wrapper'); 9356 9357 // Toggle Read More Button visibility 9358 /** 9359 * Toggles the visibility of the "Read More" button based on the scroll height and client height of the wrapper element. 9360 * If the content inside the wrapper does not overflow, the "Read More" button is hidden. 9361 * If the content overflows, the button is shown.
9362 * 9363 * @return {void} Does not return a value. 9364 */ 9365 function toggleReadMoreButton() { 9366 var $wrapperElement = $wrapper[0]; 9367 var scrollHeight = ($wrapperElement === null || $wrapperElement === void 0 ? void 0 : $wrapperElement.scrollHeight) || 0; 9368 var clientHeight = ($wrapperElement === null || $wrapperElement === void 0 ? void 0 : $wrapperElement.clientHeight) || 0; 9369 $singleProductDescription.toggleClass('single-product-description--need-read-more', scrollHeight > clientHeight); 9370 } 9371 9372 // Initial check 9373 toggleReadMoreButton(); 9374 9375 // Show full description on Read More click 9376 $singleProductDescription.on('click', '.single-product-description__read-more', function () { 9377 $singleProductDescription.toggleClass('single-product-description--open'); 9378 }); 9379 9380 // Throttle resize event 9381 var resizeTimeout; 9382 $(window).on('resize', function () { 9383 clearTimeout(resizeTimeout); 9384 resizeTimeout = setTimeout(toggleReadMoreButton, 150); 9385 }); 9386}); 9387(function ($) { 9388 jQuery(document).ready(function ($) { 9389 $(".woocommerce-product-gallery").on("wc-product-gallery-after-init", function (event, element, args) { 9390 // const el = document.querySelector('.flex-control-nav'); 9391 // el.addEventListener('touchmove', function (e) { 9392 // el.scrollLeft += e.touches[0].clientX > window.innerWidth / 2 ? 10 : -10; 9393 // }); 9394 9395 // $('.flex-control-nav li').first().addClass('flex-active'); 9396 // $('.flex-control-nav li').on('click', function () { 9397 9398 // $('.flex-control-nav li').removeClass('flex-active'); 9399 // $(this).addClass('flex-active'); 9400 // }); 9401 // $('.flex-control-nav li').on('touchend', function () { 9402 // $('.flex-control-nav li').removeClass('flex-active'); 9403 // $(this).addClass('flex-active'); 9404 // }); 9405 9406 var el = document.querySelector('.flex-control-nav'); 9407 var isDown = false; 9408 var startX; 9409 var scrollLeft; 9410 el.addEventListener('touchmove', function (e) { 9411 el.scrollLeft += e.touches[0].clientX > window.innerWidth / 2 ? 10 : -10; 9412 }); 9413 el.addEventListener('mousedown', function (e) { 9414 isDown = true; 9415 el.classList.add('active'); 9416 startX = e.pageX - el.offsetLeft; 9417 scrollLeft = el.scrollLeft; 9418 }); 9419 el.addEventListener('mouseleave', function () { 9420 isDown = false; 9421 el.classList.remove('active'); 9422 }); 9423 el.addEventListener('mouseup', function () { 9424 isDown = false; 9425 el.classList.remove('active'); 9426 }); 9427 el.addEventListener('mousemove', function (e) { 9428 if (!isDown) return; 9429 e.preventDefault(); 9430 var x = e.pageX - el.offsetLeft; 9431 var walk = (x - startX) * 2; 9432 el.scrollLeft = scrollLeft - walk; 9433 }); 9434 $('.flex-control-nav li').first().addClass('flex-active'); 9435 $('.flex-control-nav li').on('click touchend', function () { 9436 $('.flex-control-nav li').removeClass('flex-active'); 9437 $(this).addClass('flex-active'); 9438 var item = this; 9439 var container = el; 9440 var itemRect = item.getBoundingClientRect(); 9441 var containerRect = container.getBoundingClientRect(); 9442 if (itemRect.left < containerRect.left) { 9443 container.scrollLeft += itemRect.left - containerRect.left - 50; 9444 } 9445 if (itemRect.right > containerRect.right) { 9446 container.scrollLeft += itemRect.right - containerRect.right + 50; 9447 } 9448 }); 9449 9450 // setTimeout(function () { 9451 // $(".flex-control-nav").addClass('active'); 9452 // $(".flex-control-nav").slick({ 9453 // slidesToShow: 5, 9454 // slidesToScroll: 1, 9455 // dots: true, 9456 // arrows: false, 9457 // infinite: false, 9458 // responsive: [ 9459 // { 9460 // breakpoint: 768, 9461 // settings: { 9462 // slidesToShow: 4, 9463 // }, 9464 // }, 9465 // ], 9466 // }); 9467 9468 // $(".flex-control-nav .slick-slide").each(function () { 9469 // if ($(this).find("img.flex-active").length > 0) { 9470 // $(this).addClass("flex-active"); 9471 // } 9472 // }); 9473 // let isDragging = false;
9474 // $(".flex-control-nav .slick-slide") 9475 // .on("mousedown touchstart", function () { 9476 // isDragging = false; 9477 // }) 9478 // .on("mousemove touchmove", function () { 9479 // isDragging = true; 9480 // }) 9481 // .on("mouseup touchend", function () { 9482 // if (!isDragging) { 9483 // $(".flex-control-nav .slick-slide").removeClass( 9484 // "flex-active" 9485 // ); 9486 // $(this).addClass("flex-active"); 9487 // } 9488 // }); 9489 9490 // }, 1000); 9491 }); 9492 if ($(".related .products").length) { 9493 $(".related .products").slick({ 9494 slidesToShow: 4, 9495 slidesToScroll: 1, 9496 dots: true, 9497 arrows: true, 9498 infinite: false, 9499 responsive: [{ 9500 breakpoint: 768, 9501 settings: { 9502 slidesToShow: 2 9503 } 9504 }] 9505 }); 9506 } 9507 9508 // Move function declarations outside the if block to fix strict mode error 9509 function supportsLineClamp() { 9510 return 'webkitLineClamp' in document.createElement('div').style || 'lineClamp' in document.createElement('div').style; 9511 } 9512 function checkReadMoreVisibility() { 9513 $(".read-more-container").each(function () { 9514 var $this = $(this); 9515 var $text = $this.find(".read-more-text"); 9516 var $readMoreBtn = $this.find(".read-more-btn"); 9517 9518 // Force the text to display in full temporarily to measure its true height 9519 var originalCssText = $text[0].style.cssText; 9520 $text.css({ 9521 'height': 'auto', 9522 'max-height': 'none', 9523 'overflow': 'visible', 9524 'display': 'block', 9525 '-webkit-line-clamp': 'unset', 9526 'line-clamp': 'unset' 9527 }); 9528 9529 // Get the full height 9530 var fullHeight = $text[0].scrollHeight; 9531 var textContent = $text.text().trim(); 9532 9533 // Restore original styles 9534 $text[0].style.cssText = originalCssText; 9535 9536 // Apply line-clamp styles 9537 $text.css({ 9538 'display': '-webkit-box', 9539 '-webkit-line-clamp': '3', 9540 'line-clamp': '3', 9541 '-webkit-box-orient': 'vertical', 9542 'overflow': 'hidden' 9543 }); 9544 9545 // Get the clamped height 9546 var clampedHeight = $text.height(); 9547 9548 // Check if text is overflowing 9549 var isOverflowing = fullHeight > clampedHeight + 5; 9550 9551 // Show/hide button based on overflow 9552 if (isOverflowing) { 9553 $readMoreBtn.css({ 9554 'visibility': 'visible', 9555 'opacity': '1', 9556 'transition': 'opacity 0.2s ease' 9557 }); 9558 9559 // If text is expanded, show the "read less" text 9560 if ($text.hasClass("expanded")) { 9561 $readMoreBtn.text($readMoreBtn.data('less')); 9562 // Remove height restrictions when expanded 9563 $text.css({ 9564 'max-height': 'none', 9565 'display': 'block', 9566 '-webkit-line-clamp': 'unset', 9567 'line-clamp': 'unset', 9568 'overflow': 'visible' 9569 }); 9570 } else { 9571 $readMoreBtn.text($readMoreBtn.data('more')); 9572 } 9573 } else { 9574 $readMoreBtn.css({ 9575 'visibility': 'hidden', 9576 'opacity': '0' 9577 }); 9578 } 9579 }); 9580 } 9581 if ($(".read-more-container").length) { 9582 var maxLength = 250; 9583 var hasLineClampSupport = supportsLineClamp(); 9584 9585 // If line-clamp is not supported, just show the full description without read-more button 9586 if (!hasLineClampSupport) { 9587 $(".read-more-container").each(function () { 9588 var $this = $(this); 9589 var $text = $this.find(".read-more-text"); 9590 var $readMoreBtn = $this.find(".read-more-btn"); 9591 9592 // Show full text 9593 $text.css({ 9594 'max-height': 'none', 9595 'display': 'block', 9596 'overflow': 'visible' 9597 }); 9598 9599 // Keep button hidden 9600 $readMoreBtn.css({ 9601 'visibility': 'hidden', 9602 'opacity': '0' 9603 }); 9604 }); 9605 9606 // No need to continue with the rest of the functionality 9607 return; 9608 } 9609 9610 // Handle click events for read more buttons 9611 $(".read-more-container").each(function () { 9612 var $this = $(this); 9613 var $readMoreBtn = $this.find(".read-more-btn"); 9614 $readMoreBtn.click(function () { 9615 var $text = $this.find(".read-more-text"); 9616 if ($text.hasClass("expanded")) { 9617 $text.removeClass("expanded"); 9618 $(this).text($(this).data('more')); 9619 } else { 9620 $text.addClass("expanded"); 9621 $(this).text($(this).data('less')); 9622 } 9623
9624 // Check visibility after state change (with small delay to allow CSS transitions) 9625 setTimeout(checkReadMoreVisibility, 50); 9626 }); 9627 }); 9628 9629 // Initial check - run after a slight delay to ensure content is fully rendered 9630 // Run multiple checks to handle potential timing issues with content loading 9631 setTimeout(checkReadMoreVisibility, 100); 9632 setTimeout(checkReadMoreVisibility, 500); 9633 setTimeout(checkReadMoreVisibility, 1000); 9634 9635 // Re-check on window resize 9636 $(window).on('resize', function () { 9637 checkReadMoreVisibility(); 9638 }); 9639 } 9640 }); 9641})(jQuery); 9642(function ($) { 9643 var $originalCartFormContainer = $('.single-product-price-purchase__purchase'); 9644 if (!$originalCartFormContainer.length) return; //launch this only on single product page 9645 9646 var SCROLL_THRESHOLD = 100; 9647 var VISIBLE_CLASS = 'sticky-add-to-cart--visible'; 9648 var $stickyCartForm = createStickyCartForm($originalCartFormContainer); 9649 var $stickyCartWrapper = createStickyCartWrapper($stickyCartForm); 9650 var lastScrollTop = 0; 9651 var lastScrollDownTop = 0; 9652 var isStickyCartVisible = false; 9653 var hasScrolledUpOnce = false; 9654 $('body').append($stickyCartWrapper); 9655 var $quantitySelectors = $('.woocommerce.single-product .quantity input.qty'); //includes both original and cloned 9656 9657 $quantitySelectors.on('change', handleQuantityChange); 9658 $(window).on('scroll', handleScroll); 9659 9660 /** 9661 * Creates and returns a clone of the given form element. 9662 * 9663 * @param {jQuery} $originalForm - The original form element to be cloned. 9664 * @return {jQuery} A clone of the original form element. 9665 */ 9666 function createStickyCartForm($originalForm) { 9667 return $originalForm.clone(); 9668 } 9669 9670 /** 9671 * Creates a sticky cart wrapper element. 9672 * 9673 * @param {jQuery} $stickyForm - The form element to be wrapped in the sticky cart wrapper. 9674 * @return {jQuery} - The jQuery object representing the newly created sticky cart wrapper. 9675 */ 9676 function createStickyCartWrapper($stickyForm) { 9677 return $('<div></div>').addClass('product sticky-add-to-cart').append($stickyForm); 9678 } 9679 9680 /** 9681 * Sets the visibility of the sticky cart. 9682 * 9683 * @param {boolean} visible - A boolean indicating whether the sticky cart should be visible. 9684 * @return {void} 9685 */ 9686 function setStickyCartVisibility(visible) { 9687 $stickyCartWrapper.toggleClass(VISIBLE_CLASS, visible); 9688 isStickyCartVisible = visible; 9689 } 9690 9691 /** 9692 * Determines whether the sticky cart should be shown based on the user's scroll position and behavior. 9693 * 9694 * @param {number} scrollTop - The current vertical scroll position of the page. 9695 * @return {boolean} - Returns true if the sticky cart should be displayed, otherwise false. 9696 */ 9697 function shouldShowStickyCart(scrollTop) { 9698 var isScrollingUp = lastScrollTop > scrollTop; 9699 return !isStickyCartVisible && isScrollingUp && lastScrollDownTop - scrollTop > SCROLL_THRESHOLD && hasScrolledUpOnce; 9700 } 9701 9702 /** 9703 * Handles the scroll event on the current element. 9704 * Updates the state of the sticky cart visibility based on the scroll direction and position. 9705 * 9706 * The method checks if the screen width is at least 'medium' using the Foundation framework. 9707 * If the screen width is 'medium' or larger, the method returns early without performing any actions. 9708 * 9709 * @return {void} 9710 */ 9711 function handleScroll() { 9712 var _Foundation; 9713 if ((_Foundation = Foundation) !== null && _Foundation !== void 0 && _Foundation.MediaQuery.atLeast('medium')) return; 9714 var scrollTop = $(this).scrollTop(); 9715 var isScrollingDown = scrollTop > lastScrollTop; 9716 var isScrollingUp = lastScrollTop > scrollTop; 9717 if (shouldShowStickyCart(scrollTop)) { 9718 setStickyCartVisibility(true); 9719 } else if (isStickyCartVisible && isScrollingDown) { 9720 setStickyCartVisibility(false); 9721 } 9722 if (isScrollingDown) lastScrollDownTop = scrollTop; 9723 if (isScrollingUp && !hasScrolledUpOnce) hasScrolledUpOnce = true; 9724 lastScrollTop = scrollTop; 9725 } 9726 9727 /** 9728 * Handles the change in quantity from a specific input element. 9729 * This function retrieves the value of the input that triggered the event and synchronizes 9730 * the quantity inputs accordingly. 9731 * 9732 * @returns {void} This function does not return a value. 9733 */ 9734 function handleQuantityChange() { 9735 var $triggeringInput = $(this); 9736 syncQtyInputs($triggeringInput.val(), $triggeringInput); 9737 } 9738 9739 /** 9740 * Updates all quantity input fields to the specified value, excluding the triggering input field. 9741 * 9742 * @param {number} newQty - The new quantity to set for all other input fields. 9743 * @param {jQuery} $triggeringInput - The jQuery-wrapped input field that triggered the change. 9744 * @return {void} 9745 */ 9746 function syncQtyInputs(newQty, $triggeringInput) { 9747 $quantitySelectors.not($triggeringInput).val(newQty); 9748 } 9749})(jQuery); 9750jQuery(function ($) { 9751 var header = $('.header-nav'); 9752 var headerSmall = $('.header-small'); 9753 var wrapper_template = $('<div class="header-nav-wrapper"></div>'); 9754 var small_wrapper_template = $('<div class="header-small-wrapper"></div>'); 9755 var sticky_class = 'header-nav--sticky'; 9756 var small_sticky_class = 'header-small--sticky'; 9757 var wrapper, wrapperSmall; 9758 var sentinel = insertSentinel(); 9759 if (!window.IntersectionObserver) { 9760 return; 9761 } 9762 function prepare_header() { 9763 $(header).wrap(wrapper_template); 9764 wrapper = $('.header-nav-wrapper'); 9765 adjust_wrapper_height();
9766 prepare_header_small(); 9767 } 9768 function prepare_header_small() { 9769 $(headerSmall).wrap(small_wrapper_template); 9770 wrapperSmall = $('.header-small-wrapper'); 9771 adjust_small_wrapper_height(); 9772 } 9773 function adjust_wrapper_height() { 9774 $(header).css('height', ''); 9775 setTimeout(function () { 9776 var header_height = $(header).outerHeight(); 9777 header_height += parseInt($(header).css('margin-bottom')); 9778 $(wrapper).height(header_height); 9779 }, 0); 9780 } 9781 function adjust_small_wrapper_height() { 9782 $(headerSmall).css('height', ''); 9783 setTimeout(function () { 9784 var header_height = $(headerSmall).outerHeight(); 9785 $(wrapperSmall).height(header_height); 9786 $(headerSmall).addClass(small_sticky_class); 9787 }, 0); 9788 } 9789 $(window).on('resize', function () { 9790 adjust_wrapper_height(); 9791 adjust_small_wrapper_height(); 9792 }); 9793 function removeHeaderSticky() { 9794 $(header).removeClass(sticky_class); 9795 } 9796 function setHeaderSticky() { 9797 $(header).addClass(sticky_class); 9798 } 9799 function insertSentinel() { 9800 var sentinel_element = $('<div class="sticky-sentinel"></div>'); 9801 $(sentinel_element).css({ 9802 // position: 'absolute', 9803 visibility: 'hidden', 9804 width: '1px', 9805 height: '1px', 9806 left: '0' 9807 // top: top_offset_for_scrolled 9808 }).insertBefore(header); 9809 return sentinel_element[0]; 9810 } 9811 function observerCallback(entries, _observer) { 9812 $(entries).each(function (_entry) { 9813 if (this.isIntersecting) { 9814 removeHeaderSticky(); 9815 } else { 9816 setHeaderSticky(); 9817 } 9818 }); 9819 } 9820 function setupObserver() { 9821 var options = {}; 9822 var observer = new IntersectionObserver(observerCallback, options); 9823 observer.observe(sentinel); 9824 } 9825 function init() { 9826 prepare_header(); 9827 setupObserver(); 9828 } 9829 init(); 9830}); 9831jQuery(function ($) { 9832 var $filterButtons = $('.tire-brand-links-letters__letter'); 9833 if ($filterButtons.length === 0) return; 9834 var $logos = $('.tire-brand-links-logos__logo, .seo-brand-popular-brand-grid__item'); 9835 var filterActiveClass = 'tire-brand-links-letters__letter--active'; 9836 $filterButtons.on('click', function () { 9837 var filter = $(this).data('letter'); 9838 show_filtered_brands(filter); 9839 $filterButtons.removeClass(filterActiveClass); 9840 $(this).addClass(filterActiveClass); 9841 }); 9842 function show_filtered_brands(filter) { 9843 $logos.hide(); 9844 $logos.filter('[data-letter=' + filter + ']').show(); 9845 } 9846}); 9847 9848// jQuery(function ($) { 9849// var hidden_megamenu = $('.tire-brands-megamenu'); 9850// 9851// $('.tire-brands-top-menu-item').append(hidden_megamenu); 9852// });
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.