peceful/js/foundation.esm.js.map
2024-04-26 14:40:32 -07:00

1 line
No EOL
621 KiB
Text

{"version":3,"file":"foundation.esm.js","mappings":";;;;;;;;;;AAAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACFE;AACF;AACA;;AACA,SAASA,GAATA,CAAA,EAAe;EACb,OAAOC,6CAAC,CAAC,MAAD,CAAD,CAAUC,IAAV,CAAe,KAAf,MAA0B,KAAjC;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,WAATA,CAAA,EAA2C;EAAA,IAAtBC,MAAsB,GAAAC,SAAA,CAAAD,MAAA,QAAAC,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAb,CAAa;EAAA,IAAVE,SAAU,GAAAF,SAAA,CAAAD,MAAA,OAAAC,SAAA,MAAAC,SAAA;EACzC,IAAIE,GAAG,GAAG,EAAV;EACA,IAAMC,KAAK,GAAG,sCAAd;EACA,IAAMC,WAAW,GAAGD,KAAK,CAACL,MAA1B;EACA,KAAK,IAAIO,CAAC,GAAG,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CArBiB;;MAwBlB,IAAIg+B,qBAAqB,CAAC99B,MAA1B,EAAkC;QAChC89B,qBAAqB,CAACrT,MAAtB;QACAoT,UAAU,CAACvS,MAAX,CAAkBwS,qBAAlB;MACD;IACF;IAED;AACF;AACA;AACA;;;WACE,SAAAhf,SAAA,EAAW;MACT,KAAKnV,QAAL,CAAcqI,GAAd,CAAkB,WAAlB,EAA+B5G,IAA/B,CAAoC,GAApC,EAAyC4G,GAAzC,CAA6C,WAA7C,EAA0D5Q,GAA1D,GAAgEkV,IAAhE;IACD;;;EAhZiBoI,MAAA;AAmZpB2c,KAAK,CAAClc,QAAN,GAAiB;EACf;AACF;AACA;AACA;AACA;AACA;EACE2c,OAAO,EAAE,IAPM;EAQf;AACF;AACA;AACA;AACA;AACA;EACEc,UAAU,EAAE,IAdG;EAef;AACF;AACA;AACA;AACA;AACA;EACEwB,eAAe,EAAE,gBArBF;EAsBf;AACF;AACA;AACA;AACA;AACA;EACEC,cAAc,EAAE,iBA5BD;EA6Bf;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,cAAc,EAAE,eApCD;EAqCf;AACF;AACA;AACA;AACA;AACA;EACEC,aAAa,EAAE,gBA3CA;EA4Cf;AACF;AACA;AACA;AACA;AACA;EACEvC,QAAQ,EAAE,IAlDK;EAmDf;AACF;AACA;AACA;AACA;AACA;EACEK,UAAU,EAAE,IAzDG;EA0Df;AACF;AACA;AACA;AACA;AACA;EACEqB,YAAY,EAAE,IAhEC;EAiEf;AACF;AACA;AACA;AACA;AACA;EACE9jB,KAAK,EAAE,IAvEQ;EAwEf;AACF;AACA;AACA;AACA;AACA;EACE+iB,YAAY,EAAE,IA9EC;EA+Ef;AACF;AACA;AACA;AACA;AACA;EACET,UAAU,EAAE,IArFG;EAsFf;AACF;AACA;AACA;AACA;AACA;EACEX,cAAc,EAAE,iBA5FD;EA6Ff;AACF;AACA;AACA;AACA;AACA;EACEE,UAAU,EAAE,aAnGG;EAoGf;AACF;AACA;AACA;AACA;AACA;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EC,YAAY,EAAE,EAdE;EAehB;AACF;AACA;AACA;AACA;AACA;EACE0B,SAAS,EAAE,CArBK;EAsBhB;AACF;AACA;AACA;AACA;AACA;EACEO,SAAS,EAAE,CA5BK;EA6BhB;AACF;AACA;AACA;AACA;AACA;EACE3V,YAAY,EAAE,IAnCE;EAoChB;AACF;AACA;AACA;AACA;AACA;EACEyV,UAAU,EAAE,IA1CI;EA2ChB;AACF;AACA;AACA;AACA;AACA;EACET,cAAc,EAAE,KAjDA;EAkDhB;AACF;AACA;AACA;AACA;AACA;EACElwB,OAAO,EAAE,MAxDO;EAyDhB;AACF;AACA;AACA;AACA;AACA;EACEC,OAAO,EAAE,MA/DO;EAgEhB;AACF;AACA;AACA;AACA;AACA;EACEmvB,UAAU,EAAE,KAtEI;EAuEhB;AACF;AACA;AACA;AACA;AACA;EACEpH,OAAO,EAAE,IA7EO;EA8EhB;AACF;AACA;AACA;AACA;AACA;EACE8I,YAAY,EAAE,KApFE;EAqFhB;AACF;AACA;AACA;AACA;AACA;AACA;EACEza,QAAQ,EAAE,KA5FM;EA6FhB;AACF;AACA;AACA;AACA;EACES,aAAa,EAAE,KAlGC;EAmGd;AACJ;AACA;AACA;AACA;AACA;EACEziB,QAAQ,EAAE,MAzGM;EA0GhB;AACF;AACA;AACA;AACA;AACA;EACEi7B,wBAAwB,EAAE;AAhHV,CAAlB;;AC5fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IAEM2B,MAAA,0BAAA9iB,OAAA;;;;;;;;;;IACJ;AACF;AACA;AACA;AACA;AACA;AACA;IACE,SAAAP,OAAO3P,OAAP,EAAgBqI,OAAhB,EAAyB;MACvB,KAAK1N,QAAL,GAAgBqF,OAAhB;MACA,KAAKqI,OAAL,GAAexX,oDAAA,CAAS,EAAT,EAAamiC,MAAM,CAAC7iB,QAApB,EAA8B,KAAKxV,QAAL,CAAcC,IAAd,EAA9B,EAAoDyN,OAApD,CAAf;MACA,KAAKnO,SAAL,GAAiB,QAAjB,CAH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AKitC,QAAL,CAAcxoC,IAAd,EAA5B,EACcyN,GADd,CACkB,yBADlB,EAEc9F,WAFd,CAE0B,KAAKmL,OAAL,CAAa61B,YAFvC,EAGchhC,WAHd,CAG0B,uBAH1B,EAIclC,UAJd,CAIyB,wFAJzB;MAMA,KAAK+iC,QAAL,CAAcriB,MAAd;IACD;;;EA3RmB2D,YAAA;AA8RtBue,OAAO,CAACztB,QAAR,GAAmB;EACjB;AACF;AACA;AACA;AACA;AACA;EACEyR,UAAU,EAAE,GAPK;EAQjB;AACF;AACA;AACA;AACA;AACA;EACEid,cAAc,EAAE,GAdC;EAejB;AACF;AACA;AACA;AACA;AACA;EACEC,eAAe,EAAE,GArBA;EAsBjB;AACF;AACA;AACA;AACA;AACA;EACEhc,YAAY,EAAE,KA5BG;EA6BjB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEkc,eAAe,EAAE,KArCA;EAsCjB;AACF;AACA;AACA;AACA;AACA;EACER,eAAe,EAAE,EA5CA;EA6CjB;AACF;AACA;AACA;AACA;AACA;EACEC,YAAY,EAAE,SAnDG;EAoDjB;AACF;AACA;AACA;AACA;AACA;EACEP,YAAY,EAAE,SA1DG;EA2DjB;AACF;AACA;AACA;AACA;AACA;EACES,MAAM,EAAE,OAjES;EAkEjB;AACF;AACA;AACA;AACA;AACA;EACEZ,QAAQ,EAAE,EAxEO;EAyEjB;AACF;AACA;AACA;AACA;AACA;EACED,OAAO,EAAE,EA/EQ;EAgFjBmB,cAAc,EAAE,eAhFC;EAiFjB;AACF;AACA;AACA;AACA;AACA;EACEvc,SAAS,EAAE,IAvFM;EAwFjB;AACF;AACA;AACA;AACA;AACA;EACE7gB,QAAQ,EAAE,MA9FO;EA+FjB;AACF;AACA;AACA;AACA;AACA;EACEC,SAAS,EAAE,MArGM;EAsGjB;AACF;AACA;AACA;AACA;AACA;AACA;EACEue,YAAY,EAAE,KA7GG;EA8GjB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEI,kBAAk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ojC,OAAlB,EAA2B,SAA3B;AACAxjC,UAAU,CAACI,MAAX,CAAkB4jC,OAAlB,EAA2B,SAA3B;AACAhkC,UAAU,CAACI,MAAX,CAAkBolC,uBAAlB,EAA2C,yBAA3C","sources":["webpack://peceful/external var \"jQuery\"","webpack://peceful/webpack/bootstrap","webpack://peceful/webpack/runtime/compat get default export","webpack://peceful/webpack/runtime/define property getters","webpack://peceful/webpack/runtime/hasOwnProperty shorthand","webpack://peceful/webpack/runtime/make namespace object","webpack://peceful/../../js/foundation.core.utils.js","webpack://peceful/../../js/foundation.util.mediaQuery.js","webpack://peceful/../../js/foundation.core.js","webpack://peceful/../../js/foundation.util.box.js","webpack://peceful/../../js/foundation.util.imageLoader.js","webpack://peceful/../../js/foundation.util.keyboard.js","webpack://peceful/../../js/foundation.util.motion.js","webpack://peceful/../../js/foundation.util.nest.js","webpack://peceful/../../js/foundation.util.timer.js","webpack://peceful/../../js/foundation.util.touch.js","webpack://peceful/../../js/foundation.util.triggers.js","webpack://peceful/../../js/foundation.core.plugin.js","webpack://peceful/../../js/foundation.abide.js","webpack://peceful/../../js/foundation.accordion.js","webpack://peceful/../../js/foundation.accordionMenu.js","webpack://peceful/../../js/foundation.drilldown.js","webpack://peceful/../../js/foundation.positionable.js","webpack://peceful/../../js/foundation.dropdown.js","webpack://peceful/../../js/foundation.dropdownMenu.js","webpack://peceful/../../js/foundation.equalizer.js","webpack://peceful/../../js/foundation.interchange.js","webpack://peceful/../../js/foundation.smoothScroll.js","webpack://peceful/../../js/foundation.magellan.js","webpack://peceful/../../js/foundation.offcanvas.js","webpack://peceful/../../js/foundation.orbit.js","webpack://peceful/../../js/foundation.responsiveMenu.js","webpack://peceful/../../js/foundation.responsiveToggle.js","webpack://peceful/../../js/foundation.reveal.js","webpack://peceful/../../js/foundation.slider.js","webpack://peceful/../../js/foundation.sticky.js","webpack://peceful/../../js/foundation.tabs.js","webpack://peceful/../../js/foundation.toggler.js","webpack://peceful/../../js/foundation.tooltip.js","webpack://peceful/../../js/foundation.responsiveAccordionTabs.js","webpack://peceful/../../js/entries/foundation.js"],"sourcesContent":["module.exports = jQuery;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import $ from 'jquery';\n\n// Core Foundation Utilities, utilized in a number of places.\n\n /**\n * Returns a boolean for RTL support\n */\nfunction rtl() {\n return $('html').attr('dir') === 'rtl';\n}\n\n/**\n * returns a random base-36 uid with namespacing\n * @function\n * @param {Number} length - number of random base-36 digits desired. Increase for more random strings.\n * @param {String} namespace - name of plugin to be incorporated in uid, optional.\n * @default {String} '' - if no plugin name is provided, nothing is appended to the uid.\n * @returns {String} - unique id\n */\nfunction GetYoDigits(length = 6, namespace){\n let str = '';\n const chars = '0123456789abcdefghijklmnopqrstuvwxyz';\n const charsLength = chars.length;\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * charsLength)];\n }\n return namespace ? `${str}-${namespace}` : str;\n}\n\n/**\n * Escape a string so it can be used as a regexp pattern\n * @function\n * @see https://stackoverflow.com/a/9310752/4317384\n *\n * @param {String} str - string to escape.\n * @returns {String} - escaped string\n */\nfunction RegExpEscape(str){\n return str.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\nfunction transitionend($elem){\n var transitions = {\n 'transition': 'transitionend',\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'otransitionend'\n };\n var elem = document.createElement('div'),\n end;\n\n for (let transition in transitions){\n if (typeof elem.style[transition] !== 'undefined'){\n end = transitions[transition];\n }\n }\n if (end) {\n return end;\n } else {\n setTimeout(function(){\n $elem.triggerHandler('transitionend', [$elem]);\n }, 1);\n return 'transitionend';\n }\n}\n\n/**\n * Return an event type to listen for window load.\n *\n * If `$elem` is passed, an event will be triggered on `$elem`. If window is already loaded, the event will still be triggered.\n * If `handler` is passed, attach it to the event on `$elem`.\n * Calling `onLoad` without handler allows you to get the event type that will be triggered before attaching the handler by yourself.\n * @function\n *\n * @param {Object} [] $elem - jQuery element on which the event will be triggered if passed.\n * @param {Function} [] handler - function to attach to the event.\n * @returns {String} - event type that should or will be triggered.\n */\nfunction onLoad($elem, handler) {\n const didLoad = document.readyState === 'complete';\n const eventType = (didLoad ? '_didLoad' : 'load') + '.zf.util.onLoad';\n const cb = () => $elem.triggerHandler(eventType);\n\n if ($elem) {\n if (handler) $elem.one(eventType, handler);\n\n if (didLoad)\n setTimeout(cb);\n else\n $(window).one('load', cb);\n }\n\n return eventType;\n}\n\n/**\n * Retuns an handler for the `mouseleave` that ignore disappeared mouses.\n *\n * If the mouse \"disappeared\" from the document (like when going on a browser UI element, See https://git.io/zf-11410),\n * the event is ignored.\n * - If the `ignoreLeaveWindow` is `true`, the event is ignored when the user actually left the window\n * (like by switching to an other window with [Alt]+[Tab]).\n * - If the `ignoreReappear` is `true`, the event will be ignored when the mouse will reappear later on the document\n * outside of the element it left.\n *\n * @function\n *\n * @param {Function} [] handler - handler for the filtered `mouseleave` event to watch.\n * @param {Object} [] options - object of options:\n * - {Boolean} [false] ignoreLeaveWindow - also ignore when the user switched windows.\n * - {Boolean} [false] ignoreReappear - also ignore when the mouse reappeared outside of the element it left.\n * @returns {Function} - filtered handler to use to listen on the `mouseleave` event.\n */\nfunction ignoreMousedisappear(handler, { ignoreLeaveWindow = false, ignoreReappear = false } = {}) {\n return function leaveEventHandler(eLeave, ...rest) {\n const callback = handler.bind(this, eLeave, ...rest);\n\n // The mouse left: call the given callback if the mouse entered elsewhere\n if (eLeave.relatedTarget !== null) {\n return callback();\n }\n\n // Otherwise, check if the mouse actually left the window.\n // In firefox if the user switched between windows, the window sill have the focus by the time\n // the event is triggered. We have to debounce the event to test this case.\n setTimeout(function leaveEventDebouncer() {\n if (!ignoreLeaveWindow && document.hasFocus && !document.hasFocus()) {\n return callback();\n }\n\n // Otherwise, wait for the mouse to reeapear outside of the element,\n if (!ignoreReappear) {\n $(document).one('mouseenter', function reenterEventHandler(eReenter) {\n if (!$(eLeave.currentTarget).has(eReenter.target).length) {\n // Fill where the mouse finally entered.\n eLeave.relatedTarget = eReenter.target;\n callback();\n }\n });\n }\n\n }, 0);\n };\n}\n\n\nexport { rtl, GetYoDigits, RegExpEscape, transitionend, onLoad, ignoreMousedisappear };\n","import $ from 'jquery';\n\n// Default set of media queries\n// const defaultQueries = {\n// 'default' : 'only screen',\n// landscape : 'only screen and (orientation: landscape)',\n// portrait : 'only screen and (orientation: portrait)',\n// retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +\n// 'only screen and (min--moz-device-pixel-ratio: 2),' +\n// 'only screen and (-o-min-device-pixel-ratio: 2/1),' +\n// 'only screen and (min-device-pixel-ratio: 2),' +\n// 'only screen and (min-resolution: 192dpi),' +\n// 'only screen and (min-resolution: 2dppx)'\n// };\n\n\n// matchMedia() polyfill - Test a CSS media type/query in JS.\n// Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license\n/* eslint-disable */\nwindow.matchMedia || (window.matchMedia = (function () {\n \"use strict\";\n\n // For browsers that support matchMedium api such as IE 9 and webkit\n var styleMedia = (window.styleMedia || window.media);\n\n // For those that don't support matchMedium\n if (!styleMedia) {\n var style = document.createElement('style'),\n script = document.getElementsByTagName('script')[0],\n info = null;\n\n style.type = 'text/css';\n style.id = 'matchmediajs-test';\n\n if (!script) {\n document.head.appendChild(style);\n } else {\n script.parentNode.insertBefore(style, script);\n }\n\n // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers\n info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;\n\n styleMedia = {\n matchMedium: function (media) {\n var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';\n\n // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers\n if (style.styleSheet) {\n style.styleSheet.cssText = text;\n } else {\n style.textContent = text;\n }\n\n // Test if media query is true or false\n return info.width === '1px';\n }\n };\n }\n\n return function(media) {\n return {\n matches: styleMedia.matchMedium(media || 'all'),\n media: media || 'all'\n };\n };\n})());\n/* eslint-enable */\n\nvar MediaQuery = {\n queries: [],\n\n current: '',\n\n /**\n * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher.\n * @function\n * @private\n */\n _init() {\n\n // make sure the initialization is only done once when calling _init() several times\n if (this.isInitialized === true) {\n return this;\n } else {\n this.isInitialized = true;\n }\n\n var self = this;\n var $meta = $('meta.foundation-mq');\n if(!$meta.length){\n $('<meta class=\"foundation-mq\" name=\"foundation-mq\" content>').appendTo(document.head);\n }\n\n var extractedStyles = $('.foundation-mq').css('font-family');\n var namedQueries;\n\n namedQueries = parseStyleToObject(extractedStyles);\n\n self.queries = []; // reset\n\n for (var key in namedQueries) {\n if(namedQueries.hasOwnProperty(key)) {\n self.queries.push({\n name: key,\n value: `only screen and (min-width: ${namedQueries[key]})`\n });\n }\n }\n\n this.current = this._getCurrentSize();\n\n this._watcher();\n },\n\n /**\n * Reinitializes the media query helper.\n * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization.\n * @function\n * @private\n */\n _reInit() {\n this.isInitialized = false;\n this._init();\n },\n\n /**\n * Checks if the screen is at least as wide as a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller.\n */\n atLeast(size) {\n var query = this.get(size);\n\n if (query) {\n return window.matchMedia(query).matches;\n }\n\n return false;\n },\n\n /**\n * Checks if the screen is within the given breakpoint.\n * If smaller than the breakpoint of larger than its upper limit it returns false.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise.\n */\n only(size) {\n return size === this._getCurrentSize();\n },\n\n /**\n * Checks if the screen is within a breakpoint or smaller.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger.\n */\n upTo(size) {\n const nextSize = this.next(size);\n\n // If the next breakpoint does not match, the screen is smaller than\n // the upper limit of this breakpoint.\n if (nextSize) {\n return !this.atLeast(nextSize);\n }\n\n // If there is no next breakpoint, the \"size\" breakpoint does not have\n // an upper limit and the screen will always be within it or smaller.\n return true;\n },\n\n /**\n * Checks if the screen matches to a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not.\n */\n is(size) {\n const parts = size.trim().split(' ').filter(p => !!p.length);\n const [bpSize, bpModifier = ''] = parts;\n\n // Only the breakpont\n if (bpModifier === 'only') {\n return this.only(bpSize);\n }\n // At least the breakpoint (included)\n if (!bpModifier || bpModifier === 'up') {\n return this.atLeast(bpSize);\n }\n // Up to the breakpoint (included)\n if (bpModifier === 'down') {\n return this.upTo(bpSize);\n }\n\n throw new Error(`\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"${size}\".\n `);\n },\n\n /**\n * Gets the media query of a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to get.\n * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist.\n */\n get(size) {\n for (var i in this.queries) {\n if(this.queries.hasOwnProperty(i)) {\n var query = this.queries[i];\n if (size === query.name) return query.value;\n }\n }\n\n return null;\n },\n\n /**\n * Get the breakpoint following the given breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint.\n * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one.\n */\n next(size) {\n const queryIndex = this.queries.findIndex((q) => this._getQueryName(q) === size);\n if (queryIndex === -1) {\n throw new Error(`\n Unknown breakpoint \"${size}\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n `);\n }\n\n const nextQuery = this.queries[queryIndex + 1];\n return nextQuery ? nextQuery.name : null;\n },\n\n /**\n * Returns the name of the breakpoint related to the given value.\n * @function\n * @private\n * @param {String|Object} value - Breakpoint name or query object.\n * @returns {String} Name of the breakpoint.\n */\n _getQueryName(value) {\n if (typeof value === 'string')\n return value;\n if (typeof value === 'object')\n return value.name;\n throw new TypeError(`\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"${value}\" (${typeof value})\n `);\n },\n\n /**\n * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one).\n * @function\n * @private\n * @returns {String} Name of the current breakpoint.\n */\n _getCurrentSize() {\n var matched;\n\n for (var i = 0; i < this.queries.length; i++) {\n var query = this.queries[i];\n\n if (window.matchMedia(query.value).matches) {\n matched = query;\n }\n }\n\n return matched && this._getQueryName(matched);\n },\n\n /**\n * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes.\n * @function\n * @private\n */\n _watcher() {\n $(window).on('resize.zf.trigger', () => {\n var newSize = this._getCurrentSize(), currentSize = this.current;\n\n if (newSize !== currentSize) {\n // Change the current media query\n this.current = newSize;\n\n // Broadcast the media query change on the window\n $(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);\n }\n });\n }\n};\n\n\n\n// Thank you: https://github.com/sindresorhus/query-string\nfunction parseStyleToObject(str) {\n var styleObject = {};\n\n if (typeof str !== 'string') {\n return styleObject;\n }\n\n str = str.trim().slice(1, -1); // browsers re-quote string style values\n\n if (!str) {\n return styleObject;\n }\n\n styleObject = str.split('&').reduce(function(ret, param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = parts[0];\n var val = parts[1];\n key = decodeURIComponent(key);\n\n // missing `=` should be `null`:\n // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n val = typeof val === 'undefined' ? null : decodeURIComponent(val);\n\n if (!ret.hasOwnProperty(key)) {\n ret[key] = val;\n } else if (Array.isArray(ret[key])) {\n ret[key].push(val);\n } else {\n ret[key] = [ret[key], val];\n }\n return ret;\n }, {});\n\n return styleObject;\n}\n\nexport {MediaQuery};\n","import $ from 'jquery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\n\nvar FOUNDATION_VERSION = '6.7.4';\n\n// Global Foundation object\n// This is attached to the window, or used as a module for AMD/Browserify\nvar Foundation = {\n version: FOUNDATION_VERSION,\n\n /**\n * Stores initialized plugins.\n */\n _plugins: {},\n\n /**\n * Stores generated unique ids for plugin instances\n */\n _uuids: [],\n\n /**\n * Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing.\n * @param {Object} plugin - The constructor of the plugin.\n */\n plugin: function(plugin, name) {\n // Object key to use when adding to global Foundation object\n // Examples: Foundation.Reveal, Foundation.OffCanvas\n var className = (name || functionName(plugin));\n // Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin\n // Examples: data-reveal, data-off-canvas\n var attrName = hyphenate(className);\n\n // Add to the Foundation object and the plugins list (for reflowing)\n this._plugins[attrName] = this[className] = plugin;\n },\n /**\n * @function\n * Populates the _uuids array with pointers to each individual plugin instance.\n * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls.\n * Also fires the initialization event for each plugin, consolidating repetitive code.\n * @param {Object} plugin - an instance of a plugin, usually `this` in context.\n * @param {String} name - the name of the plugin, passed as a camelCased string.\n * @fires Plugin#init\n */\n registerPlugin: function(plugin, name){\n var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase();\n plugin.uuid = GetYoDigits(6, pluginName);\n\n if(!plugin.$element.attr(`data-${pluginName}`)){ plugin.$element.attr(`data-${pluginName}`, plugin.uuid); }\n if(!plugin.$element.data('zfPlugin')){ plugin.$element.data('zfPlugin', plugin); }\n /**\n * Fires when the plugin has initialized.\n * @event Plugin#init\n */\n plugin.$element.trigger(`init.zf.${pluginName}`);\n\n this._uuids.push(plugin.uuid);\n\n return;\n },\n /**\n * @function\n * Removes the plugins uuid from the _uuids array.\n * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute.\n * Also fires the destroyed event for the plugin, consolidating repetitive code.\n * @param {Object} plugin - an instance of a plugin, usually `this` in context.\n * @fires Plugin#destroyed\n */\n unregisterPlugin: function(plugin){\n var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor));\n\n this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1);\n plugin.$element.removeAttr(`data-${pluginName}`).removeData('zfPlugin')\n /**\n * Fires when the plugin has been destroyed.\n * @event Plugin#destroyed\n */\n .trigger(`destroyed.zf.${pluginName}`);\n for(var prop in plugin){\n if(typeof plugin[prop] === 'function'){\n plugin[prop] = null; //clean up script to prep for garbage collection.\n }\n }\n return;\n },\n\n /**\n * @function\n * Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc.\n * @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'`\n * @default If no argument is passed, reflow all currently active plugins.\n */\n reInit: function(plugins){\n var isJQ = plugins instanceof $;\n try{\n if(isJQ){\n plugins.each(function(){\n $(this).data('zfPlugin')._init();\n });\n }else{\n var type = typeof plugins,\n _this = this,\n fns = {\n 'object': function(plgs){\n plgs.forEach(function(p){\n p = hyphenate(p);\n $('[data-'+ p +']').foundation('_init');\n });\n },\n 'string': function(){\n plugins = hyphenate(plugins);\n $('[data-'+ plugins +']').foundation('_init');\n },\n 'undefined': function(){\n this.object(Object.keys(_this._plugins));\n }\n };\n fns[type](plugins);\n }\n }catch(err){\n console.error(err);\n }finally{\n return plugins;\n }\n },\n\n /**\n * Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized.\n * @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object.\n * @param {String|Array} plugins - A list of plugins to initialize. Leave this out to initialize everything.\n */\n reflow: function(elem, plugins) {\n\n // If plugins is undefined, just grab everything\n if (typeof plugins === 'undefined') {\n plugins = Object.keys(this._plugins);\n }\n // If plugins is a string, convert it to an array with one item\n else if (typeof plugins === 'string') {\n plugins = [plugins];\n }\n\n var _this = this;\n\n // Iterate through each plugin\n $.each(plugins, function(i, name) {\n // Get the current plugin\n var plugin = _this._plugins[name];\n\n // Localize the search to all elements inside elem, as well as elem itself, unless elem === document\n var $elem = $(elem).find('[data-'+name+']').addBack('[data-'+name+']').filter(function () {\n return typeof $(this).data(\"zfPlugin\") === 'undefined';\n });\n\n // For each plugin found, initialize it\n $elem.each(function() {\n var $el = $(this),\n opts = { reflow: true };\n\n if($el.attr('data-options')){\n $el.attr('data-options').split(';').forEach(function(option){\n var opt = option.split(':').map(function(el){ return el.trim(); });\n if(opt[0]) opts[opt[0]] = parseValue(opt[1]);\n });\n }\n try{\n $el.data('zfPlugin', new plugin($(this), opts));\n }catch(er){\n console.error(er);\n }finally{\n return;\n }\n });\n });\n },\n getFnName: functionName,\n\n addToJquery: function() {\n // TODO: consider not making this a jQuery function\n // TODO: need way to reflow vs. re-initialize\n /**\n * The Foundation jQuery method.\n * @param {String|Array} method - An action to perform on the current jQuery object.\n */\n var foundation = function(method) {\n var type = typeof method,\n $noJS = $('.no-js');\n\n if($noJS.length){\n $noJS.removeClass('no-js');\n }\n\n if(type === 'undefined'){//needs to initialize the Foundation object, or an individual plugin.\n MediaQuery._init();\n Foundation.reflow(this);\n }else if(type === 'string'){//an individual method to invoke on a plugin or group of plugins\n var args = Array.prototype.slice.call(arguments, 1);//collect all the arguments, if necessary\n var plugClass = this.data('zfPlugin');//determine the class of plugin\n\n if(typeof plugClass !== 'undefined' && typeof plugClass[method] !== 'undefined'){//make sure both the class and method exist\n if(this.length === 1){//if there's only one, call it directly.\n plugClass[method].apply(plugClass, args);\n }else{\n this.each(function(i, el){//otherwise loop through the jQuery collection and invoke the method on each\n plugClass[method].apply($(el).data('zfPlugin'), args);\n });\n }\n }else{//error for no class or no method\n throw new ReferenceError(\"We're sorry, '\" + method + \"' is not an available method for \" + (plugClass ? functionName(plugClass) : 'this element') + '.');\n }\n }else{//error for invalid argument type\n throw new TypeError(`We're sorry, ${type} is not a valid parameter. You must use a string representing the method you wish to invoke.`);\n }\n return this;\n };\n $.fn.foundation = foundation;\n return $;\n }\n};\n\nFoundation.util = {\n /**\n * Function for applying a debounce effect to a function call.\n * @function\n * @param {Function} func - Function to be called at end of timeout.\n * @param {Number} delay - Time in ms to delay the call of `func`.\n * @returns function\n */\n throttle: function (func, delay) {\n var timer = null;\n\n return function () {\n var context = this, args = arguments;\n\n if (timer === null) {\n timer = setTimeout(function () {\n func.apply(context, args);\n timer = null;\n }, delay);\n }\n };\n }\n};\n\nwindow.Foundation = Foundation;\n\n// Polyfill for requestAnimationFrame\n(function() {\n if (!Date.now || !window.Date.now)\n window.Date.now = Date.now = function() { return new Date().getTime(); };\n\n var vendors = ['webkit', 'moz'];\n for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {\n var vp = vendors[i];\n window.requestAnimationFrame = window[vp+'RequestAnimationFrame'];\n window.cancelAnimationFrame = (window[vp+'CancelAnimationFrame']\n || window[vp+'CancelRequestAnimationFrame']);\n }\n if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)\n || !window.requestAnimationFrame || !window.cancelAnimationFrame) {\n var lastTime = 0;\n window.requestAnimationFrame = function(callback) {\n var now = Date.now();\n var nextTime = Math.max(lastTime + 16, now);\n return setTimeout(function() { callback(lastTime = nextTime); },\n nextTime - now);\n };\n window.cancelAnimationFrame = clearTimeout;\n }\n /**\n * Polyfill for performance.now, required by rAF\n */\n if(!window.performance || !window.performance.now){\n window.performance = {\n start: Date.now(),\n now: function(){ return Date.now() - this.start; }\n };\n }\n})();\nif (!Function.prototype.bind) {\n /* eslint-disable no-extend-native */\n Function.prototype.bind = function(oThis) {\n if (typeof this !== 'function') {\n // closest thing possible to the ECMAScript 5\n // internal IsCallable function\n throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n }\n\n var aArgs = Array.prototype.slice.call(arguments, 1),\n fToBind = this,\n fNOP = function() {},\n fBound = function() {\n return fToBind.apply(this instanceof fNOP\n ? this\n : oThis,\n aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n\n if (this.prototype) {\n // native functions don't have a prototype\n fNOP.prototype = this.prototype;\n }\n fBound.prototype = new fNOP();\n\n return fBound;\n };\n}\n// Polyfill to get the name of a function in IE9\nfunction functionName(fn) {\n if (typeof Function.prototype.name === 'undefined') {\n var funcNameRegex = /function\\s([^(]{1,})\\(/;\n var results = (funcNameRegex).exec((fn).toString());\n return (results && results.length > 1) ? results[1].trim() : \"\";\n }\n else if (typeof fn.prototype === 'undefined') {\n return fn.constructor.name;\n }\n else {\n return fn.prototype.constructor.name;\n }\n}\nfunction parseValue(str){\n if ('true' === str) return true;\n else if ('false' === str) return false;\n else if (!isNaN(str * 1)) return parseFloat(str);\n return str;\n}\n// Convert PascalCase to kebab-case\n// Thank you: http://stackoverflow.com/a/8955580\nfunction hyphenate(str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nexport {Foundation};\n","var Box = {\n ImNotTouchingYou: ImNotTouchingYou,\n OverlapArea: OverlapArea,\n GetDimensions: GetDimensions,\n GetExplicitOffsets: GetExplicitOffsets\n}\n\n/**\n * Compares the dimensions of an element to a container and determines collision events with container.\n * @function\n * @param {jQuery} element - jQuery object to test for collisions.\n * @param {jQuery} parent - jQuery object to use as bounding container.\n * @param {Boolean} lrOnly - set to true to check left and right values only.\n * @param {Boolean} tbOnly - set to true to check top and bottom values only.\n * @default if no parent object passed, detects collisions with `window`.\n * @returns {Boolean} - true if collision free, false if a collision in any direction.\n */\nfunction ImNotTouchingYou(element, parent, lrOnly, tbOnly, ignoreBottom) {\n return OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) === 0;\n}\n\nfunction OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) {\n var eleDims = GetDimensions(element),\n topOver, bottomOver, leftOver, rightOver;\n if (parent) {\n var parDims = GetDimensions(parent);\n\n bottomOver = (parDims.height + parDims.offset.top) - (eleDims.offset.top + eleDims.height);\n topOver = eleDims.offset.top - parDims.offset.top;\n leftOver = eleDims.offset.left - parDims.offset.left;\n rightOver = (parDims.width + parDims.offset.left) - (eleDims.offset.left + eleDims.width);\n }\n else {\n bottomOver = (eleDims.windowDims.height + eleDims.windowDims.offset.top) - (eleDims.offset.top + eleDims.height);\n topOver = eleDims.offset.top - eleDims.windowDims.offset.top;\n leftOver = eleDims.offset.left - eleDims.windowDims.offset.left;\n rightOver = eleDims.windowDims.width - (eleDims.offset.left + eleDims.width);\n }\n\n bottomOver = ignoreBottom ? 0 : Math.min(bottomOver, 0);\n topOver = Math.min(topOver, 0);\n leftOver = Math.min(leftOver, 0);\n rightOver = Math.min(rightOver, 0);\n\n if (lrOnly) {\n return leftOver + rightOver;\n }\n if (tbOnly) {\n return topOver + bottomOver;\n }\n\n // use sum of squares b/c we care about overlap area.\n return Math.sqrt((topOver * topOver) + (bottomOver * bottomOver) + (leftOver * leftOver) + (rightOver * rightOver));\n}\n\n/**\n * Uses native methods to return an object of dimension values.\n * @function\n * @param {jQuery || HTML} element - jQuery object or DOM element for which to get the dimensions. Can be any element other that document or window.\n * @returns {Object} - nested object of integer pixel values\n * TODO - if element is window, return only those values.\n */\nfunction GetDimensions(elem){\n elem = elem.length ? elem[0] : elem;\n\n if (elem === window || elem === document) {\n throw new Error(\"I'm sorry, Dave. I'm afraid I can't do that.\");\n }\n\n var rect = elem.getBoundingClientRect(),\n parRect = elem.parentNode.getBoundingClientRect(),\n winRect = document.body.getBoundingClientRect(),\n winY = window.pageYOffset,\n winX = window.pageXOffset;\n\n return {\n width: rect.width,\n height: rect.height,\n offset: {\n top: rect.top + winY,\n left: rect.left + winX\n },\n parentDims: {\n width: parRect.width,\n height: parRect.height,\n offset: {\n top: parRect.top + winY,\n left: parRect.left + winX\n }\n },\n windowDims: {\n width: winRect.width,\n height: winRect.height,\n offset: {\n top: winY,\n left: winX\n }\n }\n }\n}\n\n/**\n * Returns an object of top and left integer pixel values for dynamically rendered elements,\n * such as: Tooltip, Reveal, and Dropdown. Maintained for backwards compatibility, and where\n * you don't know alignment, but generally from\n * 6.4 forward you should use GetExplicitOffsets, as GetOffsets conflates position and alignment.\n * @function\n * @param {jQuery} element - jQuery object for the element being positioned.\n * @param {jQuery} anchor - jQuery object for the element's anchor point.\n * @param {String} position - a string relating to the desired position of the element, relative to it's anchor\n * @param {Number} vOffset - integer pixel value of desired vertical separation between anchor and element.\n * @param {Number} hOffset - integer pixel value of desired horizontal separation between anchor and element.\n * @param {Boolean} isOverflow - if a collision event is detected, sets to true to default the element to full width - any desired offset.\n * TODO alter/rewrite to work with `em` values as well/instead of pixels\n */\nfunction GetExplicitOffsets(element, anchor, position, alignment, vOffset, hOffset, isOverflow) {\n var $eleDims = GetDimensions(element),\n $anchorDims = anchor ? GetDimensions(anchor) : null;\n\n var topVal, leftVal;\n\n if ($anchorDims !== null) {\n // set position related attribute\n switch (position) {\n case 'top':\n topVal = $anchorDims.offset.top - ($eleDims.height + vOffset);\n break;\n case 'bottom':\n topVal = $anchorDims.offset.top + $anchorDims.height + vOffset;\n break;\n case 'left':\n leftVal = $anchorDims.offset.left - ($eleDims.width + hOffset);\n break;\n case 'right':\n leftVal = $anchorDims.offset.left + $anchorDims.width + hOffset;\n break;\n }\n\n // set alignment related attribute\n switch (position) {\n case 'top':\n case 'bottom':\n switch (alignment) {\n case 'left':\n leftVal = $anchorDims.offset.left + hOffset;\n break;\n case 'right':\n leftVal = $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset;\n break;\n case 'center':\n leftVal = isOverflow ? hOffset : (($anchorDims.offset.left + ($anchorDims.width / 2)) - ($eleDims.width / 2)) + hOffset;\n break;\n }\n break;\n case 'right':\n case 'left':\n switch (alignment) {\n case 'bottom':\n topVal = $anchorDims.offset.top - vOffset + $anchorDims.height - $eleDims.height;\n break;\n case 'top':\n topVal = $anchorDims.offset.top + vOffset\n break;\n case 'center':\n topVal = ($anchorDims.offset.top + vOffset + ($anchorDims.height / 2)) - ($eleDims.height / 2)\n break;\n }\n break;\n }\n }\n\n return {top: topVal, left: leftVal};\n}\n\nexport {Box};\n","import $ from 'jquery';\n\n/**\n * Runs a callback function when images are fully loaded.\n * @param {Object} images - Image(s) to check if loaded.\n * @param {Func} callback - Function to execute when image is fully loaded.\n */\nfunction onImagesLoaded(images, callback){\n var unloaded = images.length;\n\n if (unloaded === 0) {\n callback();\n }\n\n images.each(function(){\n // Check if image is loaded\n if (this.complete && typeof this.naturalWidth !== 'undefined') {\n singleImageLoaded();\n }\n else {\n // If the above check failed, simulate loading on detached element.\n var image = new Image();\n // Still count image as loaded if it finalizes with an error.\n var events = \"load.zf.images error.zf.images\";\n $(image).one(events, function me(){\n // Unbind the event listeners. We're using 'one' but only one of the two events will have fired.\n $(this).off(events, me);\n singleImageLoaded();\n });\n image.src = $(this).attr('src');\n }\n });\n\n function singleImageLoaded() {\n unloaded--;\n if (unloaded === 0) {\n callback();\n }\n }\n}\n\nexport { onImagesLoaded };\n","/*******************************************\n * *\n * This util was created by Marius Olbertz *\n * Please thank Marius on GitHub /owlbertz *\n * or the web http://www.mariusolbertz.de/ *\n * *\n ******************************************/\n\nimport $ from 'jquery';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst keyCodes = {\n 9: 'TAB',\n 13: 'ENTER',\n 27: 'ESCAPE',\n 32: 'SPACE',\n 35: 'END',\n 36: 'HOME',\n 37: 'ARROW_LEFT',\n 38: 'ARROW_UP',\n 39: 'ARROW_RIGHT',\n 40: 'ARROW_DOWN'\n}\n\nvar commands = {}\n\n// Functions pulled out to be referenceable from internals\nfunction findFocusable($element) {\n if(!$element) {return false; }\n 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() {\n if (!$(this).is(':visible') || $(this).attr('tabindex') < 0) { return false; } //only have visible elements and those that have a tabindex greater or equal 0\n return true;\n })\n .sort( function( a, b ) {\n if ($(a).attr('tabindex') === $(b).attr('tabindex')) {\n return 0;\n }\n let aTabIndex = parseInt($(a).attr('tabindex'), 10),\n bTabIndex = parseInt($(b).attr('tabindex'), 10);\n // Undefined is treated the same as 0\n if (typeof $(a).attr('tabindex') === 'undefined' && bTabIndex > 0) {\n return 1;\n }\n if (typeof $(b).attr('tabindex') === 'undefined' && aTabIndex > 0) {\n return -1;\n }\n if (aTabIndex === 0 && bTabIndex > 0) {\n return 1;\n }\n if (bTabIndex === 0 && aTabIndex > 0) {\n return -1;\n }\n if (aTabIndex < bTabIndex) {\n return -1;\n }\n if (aTabIndex > bTabIndex) {\n return 1;\n }\n });\n}\n\nfunction parseKey(event) {\n var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();\n\n // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events\n key = key.replace(/\\W+/, '');\n\n if (event.shiftKey) key = `SHIFT_${key}`;\n if (event.ctrlKey) key = `CTRL_${key}`;\n if (event.altKey) key = `ALT_${key}`;\n\n // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)\n key = key.replace(/_$/, '');\n\n return key;\n}\n\nvar Keyboard = {\n keys: getKeyCodes(keyCodes),\n\n /**\n * Parses the (keyboard) event and returns a String that represents its key\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n * @param {Event} event - the event generated by the event handler\n * @return String key - String that represents the key pressed\n */\n parseKey: parseKey,\n\n /**\n * Handles the given (keyboard) event\n * @param {Event} event - the event generated by the event handler\n * @param {String} component - Foundation component's name, e.g. Slider or Reveal\n * @param {Objects} functions - collection of functions that are to be executed\n */\n handleKey(event, component, functions) {\n var commandList = commands[component],\n keyCode = this.parseKey(event),\n cmds,\n command,\n fn;\n\n if (!commandList) return console.warn('Component not defined!');\n\n // Ignore the event if it was already handled\n if (event.zfIsKeyHandled === true) return;\n\n // This component does not differentiate between ltr and rtl\n if (typeof commandList.ltr === 'undefined') {\n cmds = commandList; // use plain list\n } else { // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa\n if (Rtl()) cmds = $.extend({}, commandList.ltr, commandList.rtl);\n\n else cmds = $.extend({}, commandList.rtl, commandList.ltr);\n }\n command = cmds[keyCode];\n\n fn = functions[command];\n // Execute the handler if found\n if (fn && typeof fn === 'function') {\n var returnValue = fn.apply();\n\n // Mark the event as \"handled\" to prevent future handlings\n event.zfIsKeyHandled = true;\n\n // Execute function when event was handled\n if (functions.handled || typeof functions.handled === 'function') {\n functions.handled(returnValue);\n }\n } else {\n // Execute function when event was not handled\n if (functions.unhandled || typeof functions.unhandled === 'function') {\n functions.unhandled();\n }\n }\n },\n\n /**\n * Finds all focusable elements within the given `$element`\n * @param {jQuery} $element - jQuery object to search within\n * @return {jQuery} $focusable - all focusable elements within `$element`\n */\n\n findFocusable: findFocusable,\n\n /**\n * Returns the component name name\n * @param {Object} component - Foundation component, e.g. Slider or Reveal\n * @return String componentName\n */\n\n register(componentName, cmds) {\n commands[componentName] = cmds;\n },\n\n\n // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?\n //\n /**\n * Traps the focus in the given element.\n * @param {jQuery} $element jQuery object to trap the foucs into.\n */\n trapFocus($element) {\n var $focusable = findFocusable($element),\n $firstFocusable = $focusable.eq(0),\n $lastFocusable = $focusable.eq(-1);\n\n $element.on('keydown.zf.trapfocus', function(event) {\n if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {\n event.preventDefault();\n $firstFocusable.focus();\n }\n else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') {\n event.preventDefault();\n $lastFocusable.focus();\n }\n });\n },\n /**\n * Releases the trapped focus from the given element.\n * @param {jQuery} $element jQuery object to release the focus for.\n */\n releaseFocus($element) {\n $element.off('keydown.zf.trapfocus');\n }\n}\n\n/*\n * Constants for easier comparing.\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n */\nfunction getKeyCodes(kcs) {\n var k = {};\n for (var kc in kcs) {\n if (kcs.hasOwnProperty(kc)) k[kcs[kc]] = kcs[kc];\n }\n return k;\n}\n\nexport {Keyboard};\n","import $ from 'jquery';\nimport { transitionend } from './foundation.core.utils';\n\n/**\n * Motion module.\n * @module foundation.motion\n */\n\nconst initClasses = ['mui-enter', 'mui-leave'];\nconst activeClasses = ['mui-enter-active', 'mui-leave-active'];\n\nconst Motion = {\n animateIn: function(element, animation, cb) {\n animate(true, element, animation, cb);\n },\n\n animateOut: function(element, animation, cb) {\n animate(false, element, animation, cb);\n }\n}\n\nfunction Move(duration, elem, fn){\n var anim, prog, start = null;\n\n if (duration === 0) {\n fn.apply(elem);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n return;\n }\n\n function move(ts){\n if(!start) start = ts;\n prog = ts - start;\n fn.apply(elem);\n\n if(prog < duration){ anim = window.requestAnimationFrame(move, elem); }\n else{\n window.cancelAnimationFrame(anim);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n }\n }\n anim = window.requestAnimationFrame(move);\n}\n\n/**\n * Animates an element in or out using a CSS transition class.\n * @function\n * @private\n * @param {Boolean} isIn - Defines if the animation is in or out.\n * @param {Object} element - jQuery or HTML object to animate.\n * @param {String} animation - CSS class to use.\n * @param {Function} cb - Callback to run when animation is finished.\n */\nfunction animate(isIn, element, animation, cb) {\n element = $(element).eq(0);\n\n if (!element.length) return;\n\n var initClass = isIn ? initClasses[0] : initClasses[1];\n var activeClass = isIn ? activeClasses[0] : activeClasses[1];\n\n // Set up the animation\n reset();\n\n element\n .addClass(animation)\n .css('transition', 'none');\n\n requestAnimationFrame(() => {\n element.addClass(initClass);\n if (isIn) element.show();\n });\n\n // Start the animation\n requestAnimationFrame(() => {\n // will trigger the browser to synchronously calculate the style and layout\n // also called reflow or layout thrashing\n // see https://gist.github.com/paulirish/5d52fb081b3570c81e3a\n element[0].offsetWidth;\n element\n .css('transition', '')\n .addClass(activeClass);\n });\n\n // Clean up the animation when it finishes\n element.one(transitionend(element), finish);\n\n // Hides the element (for out animations), resets the element, and runs a callback\n function finish() {\n if (!isIn) element.hide();\n reset();\n if (cb) cb.apply(element);\n }\n\n // Resets transitions and removes motion-specific classes\n function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(`${initClass} ${activeClass} ${animation}`);\n }\n}\n\nexport { Move, Motion };\n\n","import $ from 'jquery';\n\nconst Nest = {\n Feather(menu, type = 'zf') {\n menu.attr('role', 'menubar');\n menu.find('a').attr({'role': 'menuitem'});\n\n var items = menu.find('li').attr({'role': 'none'}),\n subMenuClass = `is-${type}-submenu`,\n subItemClass = `${subMenuClass}-item`,\n hasSubClass = `is-${type}-submenu-parent`,\n applyAria = (type !== 'accordion'); // Accordions handle their own ARIA attriutes.\n\n items.each(function() {\n var $item = $(this),\n $sub = $item.children('ul');\n\n if ($sub.length) {\n $item.addClass(hasSubClass);\n if(applyAria) {\n $item.children('a:first').attr({\n 'aria-haspopup': true,\n 'aria-label': $item.children('a:first').text()\n });\n // Note: Drilldowns behave differently in how they hide, and so need\n // additional attributes. We should look if this possibly over-generalized\n // utility (Nest) is appropriate when we rework menus in 6.4\n if(type === 'drilldown') {\n $item.attr({'aria-expanded': false});\n }\n }\n $sub\n .addClass(`submenu ${subMenuClass}`)\n .attr({\n 'data-submenu': '',\n 'role': 'menubar'\n });\n if(type === 'drilldown') {\n $sub.attr({'aria-hidden': true});\n }\n }\n\n if ($item.parent('[data-submenu]').length) {\n $item.addClass(`is-submenu-item ${subItemClass}`);\n }\n });\n\n return;\n },\n\n Burn(menu, type) {\n var //items = menu.find('li'),\n subMenuClass = `is-${type}-submenu`,\n subItemClass = `${subMenuClass}-item`,\n hasSubClass = `is-${type}-submenu-parent`;\n\n menu\n .find('>li, > li > ul, .menu, .menu > li, [data-submenu] > li')\n .removeClass(`${subMenuClass} ${subItemClass} ${hasSubClass} is-submenu-item submenu is-active`)\n .removeAttr('data-submenu').css('display', '');\n\n }\n}\n\nexport {Nest};\n","function Timer(elem, options, cb) {\n var _this = this,\n duration = options.duration,//options is an object for easily adding features later.\n nameSpace = Object.keys(elem.data())[0] || 'timer',\n remain = -1,\n start,\n timer;\n\n this.isPaused = false;\n\n this.restart = function() {\n remain = -1;\n clearTimeout(timer);\n this.start();\n }\n\n this.start = function() {\n this.isPaused = false;\n // if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.\n clearTimeout(timer);\n remain = remain <= 0 ? duration : remain;\n elem.data('paused', false);\n start = Date.now();\n timer = setTimeout(function(){\n if(options.infinite){\n _this.restart();//rerun the timer.\n }\n if (cb && typeof cb === 'function') { cb(); }\n }, remain);\n elem.trigger(`timerstart.zf.${nameSpace}`);\n }\n\n this.pause = function() {\n this.isPaused = true;\n //if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.\n clearTimeout(timer);\n elem.data('paused', true);\n var end = Date.now();\n remain = remain - (end - start);\n elem.trigger(`timerpaused.zf.${nameSpace}`);\n }\n}\n\nexport {Timer};\n","//**************************************************\n//**Work inspired by multiple jquery swipe plugins**\n//**Done by Yohai Ararat ***************************\n//**************************************************\n\nimport $ from 'jquery';\n\nvar Touch = {};\n\nvar startPosX,\n startTime,\n elapsedTime,\n startEvent,\n isMoving = false,\n didMoved = false;\n\nfunction onTouchEnd(e) {\n this.removeEventListener('touchmove', onTouchMove);\n this.removeEventListener('touchend', onTouchEnd);\n\n // If the touch did not move, consider it as a \"tap\"\n if (!didMoved) {\n var tapEvent = $.Event('tap', startEvent || e);\n $(this).trigger(tapEvent);\n }\n\n startEvent = null;\n isMoving = false;\n didMoved = false;\n}\n\nfunction onTouchMove(e) {\n if (true === $.spotSwipe.preventDefault) { e.preventDefault(); }\n\n if(isMoving) {\n var x = e.touches[0].pageX;\n // var y = e.touches[0].pageY;\n var dx = startPosX - x;\n // var dy = startPosY - y;\n var dir;\n didMoved = true;\n elapsedTime = new Date().getTime() - startTime;\n if(Math.abs(dx) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n dir = dx > 0 ? 'left' : 'right';\n }\n // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n // dir = dy > 0 ? 'down' : 'up';\n // }\n if(dir) {\n e.preventDefault();\n onTouchEnd.apply(this, arguments);\n $(this)\n .trigger($.Event('swipe', Object.assign({}, e)), dir)\n .trigger($.Event(`swipe${dir}`, Object.assign({}, e)));\n }\n }\n\n}\n\nfunction onTouchStart(e) {\n\n if (e.touches.length === 1) {\n startPosX = e.touches[0].pageX;\n startEvent = e;\n isMoving = true;\n didMoved = false;\n startTime = new Date().getTime();\n this.addEventListener('touchmove', onTouchMove, { passive : true === $.spotSwipe.preventDefault });\n this.addEventListener('touchend', onTouchEnd, false);\n }\n}\n\nfunction init() {\n this.addEventListener && this.addEventListener('touchstart', onTouchStart, { passive : true });\n}\n\n// function teardown() {\n// this.removeEventListener('touchstart', onTouchStart);\n// }\n\nclass SpotSwipe {\n constructor() {\n this.version = '1.0.0';\n this.enabled = 'ontouchstart' in document.documentElement;\n this.preventDefault = false;\n this.moveThreshold = 75;\n this.timeThreshold = 200;\n this._init();\n }\n\n _init() {\n $.event.special.swipe = { setup: init };\n $.event.special.tap = { setup: init };\n\n $.each(['left', 'up', 'down', 'right'], function () {\n $.event.special[`swipe${this}`] = { setup: function(){\n $(this).on('swipe', $.noop);\n } };\n });\n }\n}\n\n/****************************************************\n * As far as I can tell, both setupSpotSwipe and *\n * setupTouchHandler should be idempotent, *\n * because they directly replace functions & *\n * values, and do not add event handlers directly. *\n ****************************************************/\n\nTouch.setupSpotSwipe = function() {\n $.spotSwipe = new SpotSwipe($);\n};\n\n/****************************************************\n * Method for adding pseudo drag events to elements *\n ***************************************************/\nTouch.setupTouchHandler = function() {\n $.fn.addTouch = function(){\n this.each(function(i, el){\n $(el).bind('touchstart touchmove touchend touchcancel', function(event) {\n //we pass the original event object because the jQuery event\n //object is normalized to w3c specs and does not provide the TouchList\n handleTouch(event);\n });\n });\n\n var handleTouch = function(event) {\n var touches = event.changedTouches,\n first = touches[0],\n eventTypes = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup'\n },\n type = eventTypes[event.type],\n simulatedEvent\n ;\n\n if('MouseEvent' in window && typeof window.MouseEvent === 'function') {\n simulatedEvent = new window.MouseEvent(type, {\n 'bubbles': true,\n 'cancelable': true,\n 'screenX': first.screenX,\n 'screenY': first.screenY,\n 'clientX': first.clientX,\n 'clientY': first.clientY\n });\n } else {\n simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n }\n first.target.dispatchEvent(simulatedEvent);\n };\n };\n};\n\nTouch.init = function () {\n if(typeof($.spotSwipe) === 'undefined') {\n Touch.setupSpotSwipe($);\n Touch.setupTouchHandler($);\n }\n};\n\nexport {Touch};\n","import $ from 'jquery';\nimport { onLoad } from './foundation.core.utils';\nimport { Motion } from './foundation.util.motion';\n\nconst MutationObserver = (function () {\n var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];\n for (var i=0; i < prefixes.length; i++) {\n if (`${prefixes[i]}MutationObserver` in window) {\n return window[`${prefixes[i]}MutationObserver`];\n }\n }\n return false;\n})();\n\nconst triggers = (el, type) => {\n el.data(type).split(' ').forEach(id => {\n $(`#${id}`)[ type === 'close' ? 'trigger' : 'triggerHandler'](`${type}.zf.trigger`, [el]);\n });\n};\n\nvar Triggers = {\n Listeners: {\n Basic: {},\n Global: {}\n },\n Initializers: {}\n}\n\nTriggers.Listeners.Basic = {\n openListener: function() {\n triggers($(this), 'open');\n },\n closeListener: function() {\n let id = $(this).data('close');\n if (id) {\n triggers($(this), 'close');\n }\n else {\n $(this).trigger('close.zf.trigger');\n }\n },\n toggleListener: function() {\n let id = $(this).data('toggle');\n if (id) {\n triggers($(this), 'toggle');\n } else {\n $(this).trigger('toggle.zf.trigger');\n }\n },\n closeableListener: function(e) {\n let animation = $(this).data('closable');\n\n // Only close the first closable element. See https://git.io/zf-7833\n e.stopPropagation();\n\n if(animation !== ''){\n Motion.animateOut($(this), animation, function() {\n $(this).trigger('closed.zf');\n });\n }else{\n $(this).fadeOut().trigger('closed.zf');\n }\n },\n toggleFocusListener: function() {\n let id = $(this).data('toggle-focus');\n $(`#${id}`).triggerHandler('toggle.zf.trigger', [$(this)]);\n }\n};\n\n// Elements with [data-open] will reveal a plugin that supports it when clicked.\nTriggers.Initializers.addOpenListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);\n $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);\n}\n\n// Elements with [data-close] will close a plugin that supports it when clicked.\n// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.\nTriggers.Initializers.addCloseListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);\n $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);\n}\n\n// Elements with [data-toggle] will toggle a plugin that supports it when clicked.\nTriggers.Initializers.addToggleListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);\n $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);\n}\n\n// Elements with [data-closable] will respond to close.zf.trigger events.\nTriggers.Initializers.addCloseableListener = ($elem) => {\n $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);\n $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);\n}\n\n// Elements with [data-toggle-focus] will respond to coming in and out of focus\nTriggers.Initializers.addToggleFocusListener = ($elem) => {\n $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);\n $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);\n}\n\n\n\n// More Global/complex listeners and triggers\nTriggers.Listeners.Global = {\n resizeListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('resizeme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a resize event\n $nodes.attr('data-events', \"resize\");\n },\n scrollListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('scrollme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a scroll event\n $nodes.attr('data-events', \"scroll\");\n },\n closeMeListener: function(e, pluginId){\n let plugin = e.namespace.split('.')[0];\n let plugins = $(`[data-${plugin}]`).not(`[data-yeti-box=\"${pluginId}\"]`);\n\n plugins.each(function(){\n let _this = $(this);\n _this.triggerHandler('close.zf.trigger', [_this]);\n });\n }\n}\n\n// Global, parses whole document.\nTriggers.Initializers.addClosemeListener = function(pluginName) {\n var yetiBoxes = $('[data-yeti-box]'),\n plugNames = ['dropdown', 'tooltip', 'reveal'];\n\n if(pluginName){\n if(typeof pluginName === 'string'){\n plugNames.push(pluginName);\n }else if(typeof pluginName === 'object' && typeof pluginName[0] === 'string'){\n plugNames = plugNames.concat(pluginName);\n }else{\n console.error('Plugin names must be strings');\n }\n }\n if(yetiBoxes.length){\n let listeners = plugNames.map((name) => {\n return `closeme.zf.${name}`;\n }).join(' ');\n\n $(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);\n }\n}\n\nfunction debounceGlobalListener(debounce, trigger, listener) {\n let timer, args = Array.prototype.slice.call(arguments, 3);\n $(window).on(trigger, function() {\n if (timer) { clearTimeout(timer); }\n timer = setTimeout(function(){\n listener.apply(null, args);\n }, debounce || 10); //default time to emit scroll event\n });\n}\n\nTriggers.Initializers.addResizeListener = function(debounce){\n let $nodes = $('[data-resize]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);\n }\n}\n\nTriggers.Initializers.addScrollListener = function(debounce){\n let $nodes = $('[data-scroll]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);\n }\n}\n\nTriggers.Initializers.addMutationEventsListener = function($elem) {\n if(!MutationObserver){ return false; }\n let $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');\n\n //element callback\n var listeningElementsMutation = function (mutationRecordsList) {\n var $target = $(mutationRecordsList[0].target);\n\n //trigger the event handler for the element depending on type\n switch (mutationRecordsList[0].type) {\n case \"attributes\":\n if ($target.attr(\"data-events\") === \"scroll\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);\n }\n if ($target.attr(\"data-events\") === \"resize\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('resizeme.zf.trigger', [$target]);\n }\n if (mutationRecordsList[0].attributeName === \"style\") {\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n }\n break;\n\n case \"childList\":\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n break;\n\n default:\n return false;\n //nothing\n }\n };\n\n if ($nodes.length) {\n //for each element that needs to listen for resizing, scrolling, or mutation add a single observer\n for (var i = 0; i <= $nodes.length - 1; i++) {\n var elementObserver = new MutationObserver(listeningElementsMutation);\n elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: [\"data-events\", \"style\"] });\n }\n }\n}\n\nTriggers.Initializers.addSimpleListeners = function() {\n let $document = $(document);\n\n Triggers.Initializers.addOpenListener($document);\n Triggers.Initializers.addCloseListener($document);\n Triggers.Initializers.addToggleListener($document);\n Triggers.Initializers.addCloseableListener($document);\n Triggers.Initializers.addToggleFocusListener($document);\n\n}\n\nTriggers.Initializers.addGlobalListeners = function() {\n let $document = $(document);\n Triggers.Initializers.addMutationEventsListener($document);\n Triggers.Initializers.addResizeListener(250);\n Triggers.Initializers.addScrollListener();\n Triggers.Initializers.addClosemeListener();\n}\n\n\nTriggers.init = function (__, Foundation) {\n onLoad($(window), function () {\n if ($.triggersInitialized !== true) {\n Triggers.Initializers.addSimpleListeners();\n Triggers.Initializers.addGlobalListeners();\n $.triggersInitialized = true;\n }\n });\n\n if(Foundation) {\n Foundation.Triggers = Triggers;\n // Legacy included to be backwards compatible for now.\n Foundation.IHearYou = Triggers.Initializers.addGlobalListeners\n }\n}\n\nexport {Triggers};\n","import { GetYoDigits } from './foundation.core.utils';\n\n// Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST\n// {function} _setup (replaces previous constructor),\n// {function} _destroy (replaces previous destroy)\nclass Plugin {\n\n constructor(element, options) {\n this._setup(element, options);\n var pluginName = getPluginName(this);\n this.uuid = GetYoDigits(6, pluginName);\n\n if(!this.$element.attr(`data-${pluginName}`)){ this.$element.attr(`data-${pluginName}`, this.uuid); }\n if(!this.$element.data('zfPlugin')){ this.$element.data('zfPlugin', this); }\n /**\n * Fires when the plugin has initialized.\n * @event Plugin#init\n */\n this.$element.trigger(`init.zf.${pluginName}`);\n }\n\n destroy() {\n this._destroy();\n var pluginName = getPluginName(this);\n this.$element.removeAttr(`data-${pluginName}`).removeData('zfPlugin')\n /**\n * Fires when the plugin has been destroyed.\n * @event Plugin#destroyed\n */\n .trigger(`destroyed.zf.${pluginName}`);\n for(var prop in this){\n if (this.hasOwnProperty(prop)) {\n this[prop] = null; //clean up script to prep for garbage collection.\n }\n }\n }\n}\n\n// Convert PascalCase to kebab-case\n// Thank you: http://stackoverflow.com/a/8955580\nfunction hyphenate(str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nfunction getPluginName(obj) {\n return hyphenate(obj.className);\n}\n\nexport {Plugin};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { GetYoDigits } from './foundation.core.utils';\n\n/**\n * Abide module.\n * @module foundation.abide\n */\n\nclass Abide extends Plugin {\n /**\n * Creates a new instance of Abide.\n * @class\n * @name Abide\n * @fires Abide#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options = {}) {\n this.$element = element;\n this.options = $.extend(true, {}, Abide.defaults, this.$element.data(), options);\n this.isEnabled = true;\n this.formnovalidate = null;\n\n this.className = 'Abide'; // ie9 back compat\n this._init();\n }\n\n /**\n * Initializes the Abide plugin and calls functions to get Abide functioning on load.\n * @private\n */\n _init() {\n this.$inputs = $.merge( // Consider as input to validate:\n this.$element.find('input').not('[type=\"submit\"]'), // * all input fields expect submit\n this.$element.find('textarea, select') // * all textareas and select fields\n );\n this.$submits = this.$element.find('[type=\"submit\"]');\n const $globalErrors = this.$element.find('[data-abide-error]');\n\n // Add a11y attributes to all fields\n if (this.options.a11yAttributes) {\n this.$inputs.each((i, input) => this.addA11yAttributes($(input)));\n $globalErrors.each((i, error) => this.addGlobalErrorA11yAttributes($(error)));\n }\n\n this._events();\n }\n\n /**\n * Initializes events for Abide.\n * @private\n */\n _events() {\n this.$element.off('.abide')\n .on('reset.zf.abide', () => {\n this.resetForm();\n })\n .on('submit.zf.abide', () => {\n return this.validateForm();\n });\n\n this.$submits\n .off('click.zf.abide keydown.zf.abide')\n .on('click.zf.abide keydown.zf.abide', (e) => {\n if (!e.key || (e.key === ' ' || e.key === 'Enter')) {\n e.preventDefault();\n this.formnovalidate = e.target.getAttribute('formnovalidate') !== null;\n this.$element.submit();\n }\n });\n\n if (this.options.validateOn === 'fieldChange') {\n this.$inputs\n .off('change.zf.abide')\n .on('change.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n\n if (this.options.liveValidate) {\n this.$inputs\n .off('input.zf.abide')\n .on('input.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n\n if (this.options.validateOnBlur) {\n this.$inputs\n .off('blur.zf.abide')\n .on('blur.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n }\n\n /**\n * Calls necessary functions to update Abide upon DOM change\n * @private\n */\n _reflow() {\n this._init();\n }\n\n /**\n * Checks whether the submitted form should be validated or not, consodering formnovalidate and isEnabled\n * @returns {Boolean}\n * @private\n */\n _validationIsDisabled() {\n if (this.isEnabled === false) { // whole validation disabled\n return true;\n } else if (typeof this.formnovalidate === 'boolean') { // triggered by $submit\n return this.formnovalidate;\n }\n // triggered by Enter in non-submit input\n return this.$submits.length ? this.$submits[0].getAttribute('formnovalidate') !== null : false;\n }\n\n /**\n * Enables the whole validation\n */\n enableValidation() {\n this.isEnabled = true;\n }\n\n /**\n * Disables the whole validation\n */\n disableValidation() {\n this.isEnabled = false;\n }\n\n /**\n * Checks whether or not a form element has the required attribute and if it's checked or not\n * @param {Object} element - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n requiredCheck($el) {\n if (!$el.attr('required')) return true;\n\n var isGood = true;\n\n switch ($el[0].type) {\n case 'checkbox':\n isGood = $el[0].checked;\n break;\n\n case 'select':\n case 'select-one':\n case 'select-multiple':\n var opt = $el.find('option:selected');\n if (!opt.length || !opt.val()) isGood = false;\n break;\n\n default:\n if (!$el.val() || !$el.val().length) isGood = false;\n }\n\n return isGood;\n }\n\n /**\n * Get:\n * - Based on $el, the first element(s) corresponding to `formErrorSelector` in this order:\n * 1. The element's direct sibling('s).\n * 2. The element's parent's children.\n * - Element(s) with the attribute `[data-form-error-for]` set with the element's id.\n *\n * This allows for multiple form errors per input, though if none are found, no form errors will be shown.\n *\n * @param {Object} $el - jQuery object to use as reference to find the form error selector.\n * @param {String[]} [failedValidators] - List of failed validators.\n * @returns {Object} jQuery object with the selector.\n */\n findFormError($el, failedValidators) {\n var id = $el.length ? $el[0].id : '';\n var $error = $el.siblings(this.options.formErrorSelector);\n\n if (!$error.length) {\n $error = $el.parent().find(this.options.formErrorSelector);\n }\n\n if (id) {\n $error = $error.add(this.$element.find(`[data-form-error-for=\"${id}\"]`));\n }\n\n if (!!failedValidators) {\n $error = $error.not('[data-form-error-on]')\n\n failedValidators.forEach((v) => {\n $error = $error.add($el.siblings(`[data-form-error-on=\"${v}\"]`));\n $error = $error.add(this.$element.find(`[data-form-error-for=\"${id}\"][data-form-error-on=\"${v}\"]`));\n });\n }\n\n return $error;\n }\n\n /**\n * Get the first element in this order:\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findLabel($el) {\n var id = $el[0].id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n return $el.closest('label');\n }\n\n return $label;\n }\n\n /**\n * Get the set of labels associated with a set of radio els in this order\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findRadioLabels($els) {\n var labels = $els.map((i, el) => {\n var id = el.id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n $label = $(el).closest('label');\n }\n return $label[0];\n });\n\n return $(labels);\n }\n\n /**\n * Get the set of labels associated with a set of checkbox els in this order\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findCheckboxLabels($els) {\n var labels = $els.map((i, el) => {\n var id = el.id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n $label = $(el).closest('label');\n }\n return $label[0];\n });\n\n return $(labels);\n }\n\n /**\n * Adds the CSS error class as specified by the Abide settings to the label, input, and the form\n * @param {Object} $el - jQuery object to add the class to\n * @param {String[]} [failedValidators] - List of failed validators.\n */\n addErrorClasses($el, failedValidators) {\n var $label = this.findLabel($el);\n var $formError = this.findFormError($el, failedValidators);\n\n if ($label.length) {\n $label.addClass(this.options.labelErrorClass);\n }\n\n if ($formError.length) {\n $formError.addClass(this.options.formErrorClass);\n }\n\n $el.addClass(this.options.inputErrorClass).attr({\n 'data-invalid': '',\n 'aria-invalid': true\n });\n }\n\n /**\n * Adds [for] and [role=alert] attributes to all form error targetting $el,\n * and [aria-describedby] attribute to $el toward the first form error.\n * @param {Object} $el - jQuery object\n */\n addA11yAttributes($el) {\n let $errors = this.findFormError($el);\n let $labels = $errors.filter('label');\n let $error = $errors.first();\n if (!$errors.length) return;\n\n // Set [aria-describedby] on the input toward the first form error if it is not set\n if (typeof $el.attr('aria-describedby') === 'undefined') {\n // Get the first error ID or create one\n let errorId = $error.attr('id');\n if (typeof errorId === 'undefined') {\n errorId = GetYoDigits(6, 'abide-error');\n $error.attr('id', errorId);\n }\n\n $el.attr('aria-describedby', errorId);\n }\n\n if ($labels.filter('[for]').length < $labels.length) {\n // Get the input ID or create one\n let elemId = $el.attr('id');\n if (typeof elemId === 'undefined') {\n elemId = GetYoDigits(6, 'abide-input');\n $el.attr('id', elemId);\n }\n\n // For each label targeting $el, set [for] if it is not set.\n $labels.each((i, label) => {\n const $label = $(label);\n if (typeof $label.attr('for') === 'undefined')\n $label.attr('for', elemId);\n });\n }\n\n // For each error targeting $el, set [role=alert] if it is not set.\n $errors.each((i, label) => {\n const $label = $(label);\n if (typeof $label.attr('role') === 'undefined')\n $label.attr('role', 'alert');\n }).end();\n }\n\n /**\n * Adds [aria-live] attribute to the given global form error $el.\n * @param {Object} $el - jQuery object to add the attribute to\n */\n addGlobalErrorA11yAttributes($el) {\n if (typeof $el.attr('aria-live') === 'undefined')\n $el.attr('aria-live', this.options.a11yErrorLevel);\n }\n\n /**\n * Remove CSS error classes etc from an entire radio button group\n * @param {String} groupName - A string that specifies the name of a radio button group\n *\n */\n removeRadioErrorClasses(groupName) {\n var $els = this.$element.find(`:radio[name=\"${groupName}\"]`);\n var $labels = this.findRadioLabels($els);\n var $formErrors = this.findFormError($els);\n\n if ($labels.length) {\n $labels.removeClass(this.options.labelErrorClass);\n }\n\n if ($formErrors.length) {\n $formErrors.removeClass(this.options.formErrorClass);\n }\n\n $els.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n\n }\n\n /**\n * Remove CSS error classes etc from an entire checkbox group\n * @param {String} groupName - A string that specifies the name of a checkbox group\n *\n */\n removeCheckboxErrorClasses(groupName) {\n var $els = this.$element.find(`:checkbox[name=\"${groupName}\"]`);\n var $labels = this.findCheckboxLabels($els);\n var $formErrors = this.findFormError($els);\n\n if ($labels.length) {\n $labels.removeClass(this.options.labelErrorClass);\n }\n\n if ($formErrors.length) {\n $formErrors.removeClass(this.options.formErrorClass);\n }\n\n $els.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n\n }\n\n /**\n * Removes CSS error class as specified by the Abide settings from the label, input, and the form\n * @param {Object} $el - jQuery object to remove the class from\n */\n removeErrorClasses($el) {\n // radios need to clear all of the els\n if ($el[0].type === 'radio') {\n return this.removeRadioErrorClasses($el.attr('name'));\n }\n // checkboxes need to clear all of the els\n else if ($el[0].type === 'checkbox') {\n return this.removeCheckboxErrorClasses($el.attr('name'));\n }\n\n var $label = this.findLabel($el);\n var $formError = this.findFormError($el);\n\n if ($label.length) {\n $label.removeClass(this.options.labelErrorClass);\n }\n\n if ($formError.length) {\n $formError.removeClass(this.options.formErrorClass);\n }\n\n $el.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n }\n\n /**\n * Goes through a form to find inputs and proceeds to validate them in ways specific to their type.\n * Ignores inputs with data-abide-ignore, type=\"hidden\" or disabled attributes set\n * @fires Abide#invalid\n * @fires Abide#valid\n * @param {Object} element - jQuery object to validate, should be an HTML input\n * @returns {Boolean} goodToGo - If the input is valid or not.\n */\n validateInput($el) {\n var clearRequire = this.requiredCheck($el),\n validator = $el.attr('data-validator'),\n failedValidators = [],\n manageErrorClasses = true;\n\n // skip validation if disabled\n if (this._validationIsDisabled()) {\n return true;\n }\n\n // don't validate ignored inputs or hidden inputs or disabled inputs\n if ($el.is('[data-abide-ignore]') || $el.is('[type=\"hidden\"]') || $el.is('[disabled]')) {\n return true;\n }\n\n switch ($el[0].type) {\n case 'radio':\n this.validateRadio($el.attr('name')) || failedValidators.push('required');\n break;\n\n case 'checkbox':\n this.validateCheckbox($el.attr('name')) || failedValidators.push('required');\n // validateCheckbox() adds/removes error classes\n manageErrorClasses = false;\n break;\n\n case 'select':\n case 'select-one':\n case 'select-multiple':\n clearRequire || failedValidators.push('required');\n break;\n\n default:\n clearRequire || failedValidators.push('required');\n this.validateText($el) || failedValidators.push('pattern');\n }\n\n if (validator) {\n const required = $el.attr('required') ? true : false;\n\n validator.split(' ').forEach((v) => {\n this.options.validators[v]($el, required, $el.parent()) || failedValidators.push(v);\n });\n }\n\n if ($el.attr('data-equalto')) {\n this.options.validators.equalTo($el) || failedValidators.push('equalTo');\n }\n\n var goodToGo = failedValidators.length === 0;\n var message = (goodToGo ? 'valid' : 'invalid') + '.zf.abide';\n\n if (goodToGo) {\n // Re-validate inputs that depend on this one with equalto\n const dependentElements = this.$element.find(`[data-equalto=\"${$el.attr('id')}\"]`);\n if (dependentElements.length) {\n let _this = this;\n dependentElements.each(function() {\n if ($(this).val()) {\n _this.validateInput($(this));\n }\n });\n }\n }\n\n if (manageErrorClasses) {\n if (!goodToGo) {\n this.addErrorClasses($el, failedValidators);\n } else {\n this.removeErrorClasses($el);\n }\n }\n\n /**\n * Fires when the input is done checking for validation. Event trigger is either `valid.zf.abide` or `invalid.zf.abide`\n * Trigger includes the DOM element of the input.\n * @event Abide#valid\n * @event Abide#invalid\n */\n $el.trigger(message, [$el]);\n\n return goodToGo;\n }\n\n /**\n * Goes through a form and if there are any invalid inputs, it will display the form error element\n * @returns {Boolean} noError - true if no errors were detected...\n * @fires Abide#formvalid\n * @fires Abide#forminvalid\n */\n validateForm() {\n var acc = [];\n var _this = this;\n var checkboxGroupName;\n\n // Remember first form submission to prevent specific checkbox validation (more than one required) until form got initially submitted\n if (!this.initialized) {\n this.initialized = true;\n }\n\n // skip validation if disabled\n if (this._validationIsDisabled()) {\n this.formnovalidate = null;\n return true;\n }\n\n this.$inputs.each(function() {\n\n // Only use one checkbox per group since validateCheckbox() iterates over all associated checkboxes\n if ($(this)[0].type === 'checkbox') {\n if ($(this).attr('name') === checkboxGroupName) return true;\n checkboxGroupName = $(this).attr('name');\n }\n\n acc.push(_this.validateInput($(this)));\n });\n\n var noError = acc.indexOf(false) === -1;\n\n this.$element.find('[data-abide-error]').each((i, elem) => {\n const $elem = $(elem);\n // Ensure a11y attributes are set\n if (this.options.a11yAttributes) this.addGlobalErrorA11yAttributes($elem);\n // Show or hide the error\n $elem.css('display', (noError ? 'none' : 'block'));\n });\n\n /**\n * Fires when the form is finished validating. Event trigger is either `formvalid.zf.abide` or `forminvalid.zf.abide`.\n * Trigger includes the element of the form.\n * @event Abide#formvalid\n * @event Abide#forminvalid\n */\n this.$element.trigger((noError ? 'formvalid' : 'forminvalid') + '.zf.abide', [this.$element]);\n\n return noError;\n }\n\n /**\n * Determines whether or a not a text input is valid based on the pattern specified in the attribute. If no matching pattern is found, returns true.\n * @param {Object} $el - jQuery object to validate, should be a text input HTML element\n * @param {String} pattern - string value of one of the RegEx patterns in Abide.options.patterns\n * @returns {Boolean} Boolean value depends on whether or not the input value matches the pattern specified\n */\n validateText($el, pattern) {\n // A pattern can be passed to this function, or it will be infered from the input's \"pattern\" attribute, or it's \"type\" attribute\n pattern = (pattern || $el.attr('data-pattern') || $el.attr('pattern') || $el.attr('type'));\n var inputText = $el.val();\n var valid = true;\n\n if (inputText.length) {\n // If the pattern attribute on the element is in Abide's list of patterns, then test that regexp\n if (this.options.patterns.hasOwnProperty(pattern)) {\n valid = this.options.patterns[pattern].test(inputText);\n }\n // If the pattern name isn't also the type attribute of the field, then test it as a regexp\n else if (pattern !== $el.attr('type')) {\n valid = new RegExp(pattern).test(inputText);\n }\n }\n\n return valid;\n }\n\n /**\n * Determines whether or a not a radio input is valid based on whether or not it is required and selected. Although the function targets a single `<input>`, it validates by checking the `required` and `checked` properties of all radio buttons in its group.\n * @param {String} groupName - A string that specifies the name of a radio button group\n * @returns {Boolean} Boolean value depends on whether or not at least one radio input has been selected (if it's required)\n */\n validateRadio(groupName) {\n // If at least one radio in the group has the `required` attribute, the group is considered required\n // Per W3C spec, all radio buttons in a group should have `required`, but we're being nice\n var $group = this.$element.find(`:radio[name=\"${groupName}\"]`);\n var valid = false, required = false;\n\n // For the group to be required, at least one radio needs to be required\n $group.each((i, e) => {\n if ($(e).attr('required')) {\n required = true;\n }\n });\n if (!required) valid=true;\n\n if (!valid) {\n // For the group to be valid, at least one radio needs to be checked\n $group.each((i, e) => {\n if ($(e).prop('checked')) {\n valid = true;\n }\n });\n }\n\n return valid;\n }\n\n /**\n * Determines whether or a not a checkbox input is valid based on whether or not it is required and checked. Although the function targets a single `<input>`, it validates by checking the `required` and `checked` properties of all checkboxes in its group.\n * @param {String} groupName - A string that specifies the name of a checkbox group\n * @returns {Boolean} Boolean value depends on whether or not at least one checkbox input has been checked (if it's required)\n */\n validateCheckbox(groupName) {\n // If at least one checkbox in the group has the `required` attribute, the group is considered required\n // Per W3C spec, all checkboxes in a group should have `required`, but we're being nice\n var $group = this.$element.find(`:checkbox[name=\"${groupName}\"]`);\n var valid = false, required = false, minRequired = 1, checked = 0;\n\n // For the group to be required, at least one checkbox needs to be required\n $group.each((i, e) => {\n if ($(e).attr('required')) {\n required = true;\n }\n });\n if (!required) valid=true;\n\n if (!valid) {\n // Count checked checkboxes within the group\n // Use data-min-required if available (default: 1)\n $group.each((i, e) => {\n if ($(e).prop('checked')) {\n checked++;\n }\n if (typeof $(e).attr('data-min-required') !== 'undefined') {\n minRequired = parseInt($(e).attr('data-min-required'), 10);\n }\n });\n\n // For the group to be valid, the minRequired amount of checkboxes have to be checked\n if (checked >= minRequired) {\n valid = true;\n }\n }\n\n // Skip validation if more than 1 checkbox have to be checked AND if the form hasn't got submitted yet (otherwise it will already show an error during the first fill in)\n if (this.initialized !== true && minRequired > 1) {\n return true;\n }\n\n // Refresh error class for all input\n $group.each((i, e) => {\n if (!valid) {\n this.addErrorClasses($(e), ['required']);\n } else {\n this.removeErrorClasses($(e));\n }\n });\n\n return valid;\n }\n\n /**\n * Determines if a selected input passes a custom validation function. Multiple validations can be used, if passed to the element with `data-validator=\"foo bar baz\"` in a space separated listed.\n * @param {Object} $el - jQuery input element.\n * @param {String} validators - a string of function names matching functions in the Abide.options.validators object.\n * @param {Boolean} required - self explanatory?\n * @returns {Boolean} - true if validations passed.\n */\n matchValidation($el, validators, required) {\n required = required ? true : false;\n\n var clear = validators.split(' ').map((v) => {\n return this.options.validators[v]($el, required, $el.parent());\n });\n return clear.indexOf(false) === -1;\n }\n\n /**\n * Resets form inputs and styles\n * @fires Abide#formreset\n */\n resetForm() {\n var $form = this.$element,\n opts = this.options;\n\n $(`.${opts.labelErrorClass}`, $form).not('small').removeClass(opts.labelErrorClass);\n $(`.${opts.inputErrorClass}`, $form).not('small').removeClass(opts.inputErrorClass);\n $(`${opts.formErrorSelector}.${opts.formErrorClass}`).removeClass(opts.formErrorClass);\n $form.find('[data-abide-error]').css('display', 'none');\n $(':input', $form).not(':button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]').val('').attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n $(':input:radio', $form).not('[data-abide-ignore]').prop('checked',false).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n $(':input:checkbox', $form).not('[data-abide-ignore]').prop('checked',false).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n /**\n * Fires when the form has been reset.\n * @event Abide#formreset\n */\n $form.trigger('formreset.zf.abide', [$form]);\n }\n\n /**\n * Destroys an instance of Abide.\n * Removes error styles and classes from elements, without resetting their values.\n */\n _destroy() {\n var _this = this;\n this.$element\n .off('.abide')\n .find('[data-abide-error]')\n .css('display', 'none');\n\n this.$inputs\n .off('.abide')\n .each(function() {\n _this.removeErrorClasses($(this));\n });\n\n this.$submits\n .off('.abide');\n }\n}\n\n/**\n * Default settings for plugin\n */\nAbide.defaults = {\n /**\n * The default event to validate inputs. Checkboxes and radios validate immediately.\n * Remove or change this value for manual validation.\n * @option\n * @type {?string}\n * @default 'fieldChange'\n */\n validateOn: 'fieldChange',\n\n /**\n * Class to be applied to input labels on failed validation.\n * @option\n * @type {string}\n * @default 'is-invalid-label'\n */\n labelErrorClass: 'is-invalid-label',\n\n /**\n * Class to be applied to inputs on failed validation.\n * @option\n * @type {string}\n * @default 'is-invalid-input'\n */\n inputErrorClass: 'is-invalid-input',\n\n /**\n * Class selector to use to target Form Errors for show/hide.\n * @option\n * @type {string}\n * @default '.form-error'\n */\n formErrorSelector: '.form-error',\n\n /**\n * Class added to Form Errors on failed validation.\n * @option\n * @type {string}\n * @default 'is-visible'\n */\n formErrorClass: 'is-visible',\n\n /**\n * If true, automatically insert when possible:\n * - `[aria-describedby]` on fields\n * - `[role=alert]` on form errors and `[for]` on form error labels\n * - `[aria-live]` on global errors `[data-abide-error]` (see option `a11yErrorLevel`).\n * @option\n * @type {boolean}\n * @default true\n */\n a11yAttributes: true,\n\n /**\n * [aria-live] attribute value to be applied on global errors `[data-abide-error]`.\n * Options are: 'assertive', 'polite' and 'off'/null\n * @option\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions\n * @type {string}\n * @default 'assertive'\n */\n a11yErrorLevel: 'assertive',\n\n /**\n * Set to true to validate text inputs on any value change.\n * @option\n * @type {boolean}\n * @default false\n */\n liveValidate: false,\n\n /**\n * Set to true to validate inputs on blur.\n * @option\n * @type {boolean}\n * @default false\n */\n validateOnBlur: false,\n\n patterns: {\n alpha : /^[a-zA-Z]+$/,\n // eslint-disable-next-line camelcase\n alpha_numeric : /^[a-zA-Z0-9]+$/,\n integer : /^[-+]?\\d+$/,\n number : /^[-+]?\\d*(?:[\\.\\,]\\d+)?$/,\n\n // amex, visa, diners\n card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$/,\n cvv : /^([0-9]){3,4}$/,\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address\n email : /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,\n\n // From CommonRegexJS (@talyssonoc)\n // https://github.com/talyssonoc/CommonRegexJS/blob/e2901b9f57222bc14069dc8f0598d5f412555411/lib/commonregex.js#L76\n // For more restrictive URL Regexs, see https://mathiasbynens.be/demo/url-regex.\n url: /^((?:(https?|ftps?|file|ssh|sftp):\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\))+(?:\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?\\xab\\xbb\\u201c\\u201d\\u2018\\u2019]))$/,\n\n // abc.de\n domain : /^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,8}$/,\n\n datetime : /^([0-2][0-9]{3})\\-([0-1][0-9])\\-([0-3][0-9])T([0-5][0-9])\\:([0-5][0-9])\\:([0-5][0-9])(Z|([\\-\\+]([0-1][0-9])\\:00))$/,\n // YYYY-MM-DD\n date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,\n // HH:MM:SS\n time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,\n dateISO : /^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/,\n // MM/DD/YYYY\n // eslint-disable-next-line camelcase\n month_day_year : /^(0[1-9]|1[012])[- \\/.](0[1-9]|[12][0-9]|3[01])[- \\/.]\\d{4}$/,\n // DD/MM/YYYY\n // eslint-disable-next-line camelcase\n day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \\/.](0[1-9]|1[012])[- \\/.]\\d{4}$/,\n\n // #FFF or #FFFFFF\n color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,\n\n // Domain || URL\n website: {\n test: (text) => {\n return Abide.defaults.patterns.domain.test(text) || Abide.defaults.patterns.url.test(text);\n }\n }\n },\n\n /**\n * Optional validation functions to be used. `equalTo` being the only default included function.\n * Functions should return only a boolean if the input is valid or not. Functions are given the following arguments:\n * el : The jQuery element to validate.\n * @option\n */\n validators: {\n equalTo: function (el) {\n return $(`#${el.attr('data-equalto')}`).val() === el.val();\n }\n }\n}\n\nexport { Abide };\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\n\n/**\n * Accordion module.\n * @module foundation.accordion\n * @requires foundation.util.keyboard\n */\n\nclass Accordion extends Plugin {\n /**\n * Creates a new instance of an accordion.\n * @class\n * @name Accordion\n * @fires Accordion#init\n * @param {jQuery} element - jQuery object to make into an accordion.\n * @param {Object} options - a plain object with settings to override the default options.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Accordion.defaults, this.$element.data(), options);\n\n this.className = 'Accordion'; // ie9 back compat\n this._init();\n\n Keyboard.register('Accordion', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ARROW_DOWN': 'next',\n 'ARROW_UP': 'previous',\n 'HOME': 'first',\n 'END': 'last',\n });\n }\n\n /**\n * Initializes the accordion by animating the preset active pane(s).\n * @private\n */\n _init() {\n this._isInitializing = true;\n\n this.$tabs = this.$element.children('[data-accordion-item]');\n\n\n this.$tabs.each(function(idx, el) {\n var $el = $(el),\n $content = $el.children('[data-tab-content]'),\n id = $content[0].id || GetYoDigits(6, 'accordion'),\n linkId = (el.id) ? `${el.id}-label` : `${id}-label`;\n\n $el.find('a:first').attr({\n 'aria-controls': id,\n 'id': linkId,\n 'aria-expanded': false\n });\n\n $content.attr({'role': 'region', 'aria-labelledby': linkId, 'aria-hidden': true, 'id': id});\n });\n\n var $initActive = this.$element.find('.is-active').children('[data-tab-content]');\n if ($initActive.length) {\n // Save up the initial hash to return to it later when going back in history\n this._initialAnchor = $initActive.prev('a').attr('href');\n this._openSingleTab($initActive);\n }\n\n this._checkDeepLink = () => {\n var anchor = window.location.hash;\n\n if (!anchor.length) {\n // If we are still initializing and there is no anchor, then there is nothing to do\n if (this._isInitializing) return;\n // Otherwise, move to the initial anchor\n if (this._initialAnchor) anchor = this._initialAnchor;\n }\n\n var $anchor = anchor && $(anchor);\n var $link = anchor && this.$element.find(`[href$=\"${anchor}\"]`);\n // Whether the anchor element that has been found is part of this element\n var isOwnAnchor = !!($anchor.length && $link.length);\n\n if (isOwnAnchor) {\n // If there is an anchor for the hash, open it (if not already active)\n if ($anchor && $link && $link.length) {\n if (!$link.parent('[data-accordion-item]').hasClass('is-active')) {\n this._openSingleTab($anchor);\n }\n }\n // Otherwise, close everything\n else {\n this._closeAllTabs();\n }\n\n // Roll up a little to show the titles\n if (this.options.deepLinkSmudge) {\n onLoad($(window), () => {\n var offset = this.$element.offset();\n $('html, body').animate({ scrollTop: offset.top - this.options.deepLinkSmudgeOffset }, this.options.deepLinkSmudgeDelay);\n });\n }\n\n /**\n * Fires when the plugin has deeplinked at pageload\n * @event Accordion#deeplink\n */\n this.$element.trigger('deeplink.zf.accordion', [$link, $anchor]);\n }\n }\n\n //use browser to open a tab, if it exists in this tabset\n if (this.options.deepLink) {\n this._checkDeepLink();\n }\n\n this._events();\n\n this._isInitializing = false;\n }\n\n /**\n * Adds event handlers for items within the accordion.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$tabs.each(function() {\n var $elem = $(this);\n var $tabContent = $elem.children('[data-tab-content]');\n if ($tabContent.length) {\n $elem.children('a').off('click.zf.accordion keydown.zf.accordion')\n .on('click.zf.accordion', function(e) {\n e.preventDefault();\n _this.toggle($tabContent);\n }).on('keydown.zf.accordion', function(e) {\n Keyboard.handleKey(e, 'Accordion', {\n toggle: function() {\n _this.toggle($tabContent);\n },\n next: function() {\n var $a = $elem.next().find('a').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion')\n }\n },\n previous: function() {\n var $a = $elem.prev().find('a').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion')\n }\n },\n first: function() {\n var $a = _this.$tabs.first().find('.accordion-title').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion');\n }\n },\n last: function() {\n var $a = _this.$tabs.last().find('.accordion-title').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion');\n }\n },\n handled: function() {\n e.preventDefault();\n }\n });\n });\n }\n });\n if (this.options.deepLink) {\n $(window).on('hashchange', this._checkDeepLink);\n }\n }\n\n /**\n * Toggles the selected content pane's open/close state.\n * @param {jQuery} $target - jQuery object of the pane to toggle (`.accordion-content`).\n * @function\n */\n toggle($target) {\n if ($target.closest('[data-accordion]').is('[disabled]')) {\n console.info('Cannot toggle an accordion that is disabled.');\n return;\n }\n if ($target.parent().hasClass('is-active')) {\n this.up($target);\n } else {\n this.down($target);\n }\n //either replace or update browser history\n if (this.options.deepLink) {\n var anchor = $target.prev('a').attr('href');\n\n if (this.options.updateHistory) {\n history.pushState({}, '', anchor);\n } else {\n history.replaceState({}, '', anchor);\n }\n }\n }\n\n /**\n * Opens the accordion tab defined by `$target`.\n * @param {jQuery} $target - Accordion pane to open (`.accordion-content`).\n * @fires Accordion#down\n * @function\n */\n down($target) {\n if ($target.closest('[data-accordion]').is('[disabled]')) {\n console.info('Cannot call down on an accordion that is disabled.');\n return;\n }\n\n if (this.options.multiExpand)\n this._openTab($target);\n else\n this._openSingleTab($target);\n }\n\n /**\n * Closes the tab defined by `$target`.\n * It may be ignored if the Accordion options don't allow it.\n *\n * @param {jQuery} $target - Accordion tab to close (`.accordion-content`).\n * @fires Accordion#up\n * @function\n */\n up($target) {\n if (this.$element.is('[disabled]')) {\n console.info('Cannot call up on an accordion that is disabled.');\n return;\n }\n\n // Don't close the item if it is already closed\n const $targetItem = $target.parent();\n if (!$targetItem.hasClass('is-active')) return;\n\n // Don't close the item if there is no other active item (unless with `allowAllClosed`)\n const $othersItems = $targetItem.siblings();\n if (!this.options.allowAllClosed && !$othersItems.hasClass('is-active')) return;\n\n this._closeTab($target);\n }\n\n /**\n * Make the tab defined by `$target` the only opened tab, closing all others tabs.\n * @param {jQuery} $target - Accordion tab to open (`.accordion-content`).\n * @function\n * @private\n */\n _openSingleTab($target) {\n // Close all the others active tabs.\n const $activeContents = this.$element.children('.is-active').children('[data-tab-content]');\n if ($activeContents.length) {\n this._closeTab($activeContents.not($target));\n }\n\n // Then open the target.\n this._openTab($target);\n }\n\n /**\n * Opens the tab defined by `$target`.\n * @param {jQuery} $target - Accordion tab to open (`.accordion-content`).\n * @fires Accordion#down\n * @function\n * @private\n */\n _openTab($target) {\n const $targetItem = $target.parent();\n const targetContentId = $target.attr('aria-labelledby');\n\n $target.attr('aria-hidden', false);\n $targetItem.addClass('is-active');\n\n $(`#${targetContentId}`).attr({\n 'aria-expanded': true\n });\n\n $target.finish().slideDown(this.options.slideSpeed, () => {\n /**\n * Fires when the tab is done opening.\n * @event Accordion#down\n */\n this.$element.trigger('down.zf.accordion', [$target]);\n });\n }\n\n /**\n * Closes the tab defined by `$target`.\n * @param {jQuery} $target - Accordion tab to close (`.accordion-content`).\n * @fires Accordion#up\n * @function\n * @private\n */\n _closeTab($target) {\n const $targetItem = $target.parent();\n const targetContentId = $target.attr('aria-labelledby');\n\n $target.attr('aria-hidden', true)\n $targetItem.removeClass('is-active');\n\n $(`#${targetContentId}`).attr({\n 'aria-expanded': false\n });\n\n $target.finish().slideUp(this.options.slideSpeed, () => {\n /**\n * Fires when the tab is done collapsing up.\n * @event Accordion#up\n */\n this.$element.trigger('up.zf.accordion', [$target]);\n });\n }\n\n /**\n * Closes all active tabs\n * @fires Accordion#up\n * @function\n * @private\n */\n _closeAllTabs() {\n var $activeTabs = this.$element.children('.is-active').children('[data-tab-content]');\n if ($activeTabs.length) {\n this._closeTab($activeTabs);\n }\n }\n\n /**\n * Destroys an instance of an accordion.\n * @fires Accordion#destroyed\n * @function\n */\n _destroy() {\n this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', '');\n this.$element.find('a').off('.zf.accordion');\n if (this.options.deepLink) {\n $(window).off('hashchange', this._checkDeepLink);\n }\n\n }\n}\n\nAccordion.defaults = {\n /**\n * Amount of time to animate the opening of an accordion pane.\n * @option\n * @type {number}\n * @default 250\n */\n slideSpeed: 250,\n /**\n * Allow the accordion to have multiple open panes.\n * @option\n * @type {boolean}\n * @default false\n */\n multiExpand: false,\n /**\n * Allow the accordion to close all panes.\n * @option\n * @type {boolean}\n * @default false\n */\n allowAllClosed: false,\n /**\n * Link the location hash to the open pane.\n * Set the location hash when the opened pane changes, and open and scroll to the corresponding pane when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n /**\n * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the accordion panel is visible\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinkSmudge: false,\n /**\n * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment\n * @option\n * @type {number}\n * @default 300\n */\n deepLinkSmudgeDelay: 300,\n /**\n * If `deepLinkSmudge` is enabled, the offset for scrollToTtop to prevent overlap by a sticky element at the top of the page\n * @option\n * @type {number}\n * @default 0\n */\n deepLinkSmudgeOffset: 0,\n /**\n * If `deepLink` is enabled, update the browser history with the open accordion\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false\n};\n\nexport { Accordion };\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * AccordionMenu module.\n * @module foundation.accordionMenu\n * @requires foundation.util.keyboard\n * @requires foundation.util.nest\n */\n\nclass AccordionMenu extends Plugin {\n /**\n * Creates a new instance of an accordion menu.\n * @class\n * @name AccordionMenu\n * @fires AccordionMenu#init\n * @param {jQuery} element - jQuery object to make into an accordion menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, AccordionMenu.defaults, this.$element.data(), options);\n this.className = 'AccordionMenu'; // ie9 back compat\n\n this._init();\n\n Keyboard.register('AccordionMenu', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ARROW_RIGHT': 'open',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'close',\n 'ESCAPE': 'closeAll'\n });\n }\n\n\n\n /**\n * Initializes the accordion menu by hiding all nested menus.\n * @private\n */\n _init() {\n Nest.Feather(this.$element, 'accordion');\n\n var _this = this;\n\n this.$element.find('[data-submenu]').not('.is-active').slideUp(0);//.find('a').css('padding-left', '1rem');\n this.$element.attr({\n 'aria-multiselectable': this.options.multiOpen\n });\n\n this.$menuLinks = this.$element.find('.is-accordion-submenu-parent');\n this.$menuLinks.each(function() {\n var linkId = this.id || GetYoDigits(6, 'acc-menu-link'),\n $elem = $(this),\n $sub = $elem.children('[data-submenu]'),\n subId = $sub[0].id || GetYoDigits(6, 'acc-menu'),\n isActive = $sub.hasClass('is-active');\n\n if (_this.options.parentLink) {\n let $anchor = $elem.children('a');\n $anchor.clone().prependTo($sub).wrap('<li data-is-parent-link class=\"is-submenu-parent-item is-submenu-item is-accordion-submenu-item\"></li>');\n }\n\n if (_this.options.submenuToggle) {\n $elem.addClass('has-submenu-toggle');\n $elem.children('a').after('<button id=\"' + linkId + '\" class=\"submenu-toggle\" aria-controls=\"' + subId + '\" aria-expanded=\"' + isActive + '\" title=\"' + _this.options.submenuToggleText + '\"><span class=\"submenu-toggle-text\">' + _this.options.submenuToggleText + '</span></button>');\n } else {\n $elem.attr({\n 'aria-controls': subId,\n 'aria-expanded': isActive,\n 'id': linkId\n });\n }\n $sub.attr({\n 'aria-labelledby': linkId,\n 'aria-hidden': !isActive,\n 'role': 'group',\n 'id': subId\n });\n });\n var initPanes = this.$element.find('.is-active');\n if (initPanes.length) {\n initPanes.each(function() {\n _this.down($(this));\n });\n }\n this._events();\n }\n\n /**\n * Adds event handlers for items within the menu.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$element.find('li').each(function() {\n var $submenu = $(this).children('[data-submenu]');\n\n if ($submenu.length) {\n if (_this.options.submenuToggle) {\n $(this).children('.submenu-toggle').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function() {\n _this.toggle($submenu);\n });\n } else {\n $(this).children('a').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function(e) {\n e.preventDefault();\n _this.toggle($submenu);\n });\n }\n }\n }).on('keydown.zf.accordionMenu', function(e) {\n var $element = $(this),\n $elements = $element.parent('ul').children('li'),\n $prevElement,\n $nextElement,\n $target = $element.children('[data-submenu]');\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(Math.max(0, i-1)).find('a').first();\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1)).find('a').first();\n\n if ($(this).children('[data-submenu]:visible').length) { // has open sub menu\n $nextElement = $element.find('li:first-child').find('a').first();\n }\n if ($(this).is(':first-child')) { // is first element of sub menu\n $prevElement = $element.parents('li').first().find('a').first();\n } else if ($prevElement.parents('li').first().children('[data-submenu]:visible').length) { // if previous element has open sub menu\n $prevElement = $prevElement.parents('li').find('li:last-child').find('a').first();\n }\n if ($(this).is(':last-child')) { // is last element of sub menu\n $nextElement = $element.parents('li').first().next('li').find('a').first();\n }\n\n return;\n }\n });\n\n Keyboard.handleKey(e, 'AccordionMenu', {\n open: function() {\n if ($target.is(':hidden')) {\n _this.down($target);\n $target.find('li').first().find('a').first().focus();\n }\n },\n close: function() {\n if ($target.length && !$target.is(':hidden')) { // close active sub of this item\n _this.up($target);\n } else if ($element.parent('[data-submenu]').length) { // close currently open sub\n _this.up($element.parent('[data-submenu]'));\n $element.parents('li').first().find('a').first().focus();\n }\n },\n up: function() {\n $prevElement.focus();\n return true;\n },\n down: function() {\n $nextElement.focus();\n return true;\n },\n toggle: function() {\n if (_this.options.submenuToggle) {\n return false;\n }\n if ($element.children('[data-submenu]').length) {\n _this.toggle($element.children('[data-submenu]'));\n return true;\n }\n },\n closeAll: function() {\n _this.hideAll();\n },\n handled: function(preventDefault) {\n if (preventDefault) {\n e.preventDefault();\n }\n }\n });\n });//.attr('tabindex', 0);\n }\n\n /**\n * Closes all panes of the menu.\n * @function\n */\n hideAll() {\n this.up(this.$element.find('[data-submenu]'));\n }\n\n /**\n * Opens all panes of the menu.\n * @function\n */\n showAll() {\n this.down(this.$element.find('[data-submenu]'));\n }\n\n /**\n * Toggles the open/close state of a submenu.\n * @function\n * @param {jQuery} $target - the submenu to toggle\n */\n toggle($target) {\n if (!$target.is(':animated')) {\n if (!$target.is(':hidden')) {\n this.up($target);\n }\n else {\n this.down($target);\n }\n }\n }\n\n /**\n * Opens the sub-menu defined by `$target`.\n * @param {jQuery} $target - Sub-menu to open.\n * @fires AccordionMenu#down\n */\n down($target) {\n // If having multiple submenus active is disabled, close all the submenus\n // that are not parents or children of the targeted submenu.\n if (!this.options.multiOpen) {\n // The \"branch\" of the targetted submenu, from the component root to\n // the active submenus nested in it.\n const $targetBranch = $target.parentsUntil(this.$element)\n .add($target)\n .add($target.find('.is-active'));\n // All the active submenus that are not in the branch.\n const $othersActiveSubmenus = this.$element.find('.is-active').not($targetBranch);\n\n this.up($othersActiveSubmenus);\n }\n\n $target\n .addClass('is-active')\n .attr({ 'aria-hidden': false });\n\n if (this.options.submenuToggle) {\n $target.prev('.submenu-toggle').attr({'aria-expanded': true});\n }\n else {\n $target.parent('.is-accordion-submenu-parent').attr({'aria-expanded': true});\n }\n\n $target.slideDown(this.options.slideSpeed, () => {\n /**\n * Fires when the menu is done opening.\n * @event AccordionMenu#down\n */\n this.$element.trigger('down.zf.accordionMenu', [$target]);\n });\n }\n\n /**\n * Closes the sub-menu defined by `$target`. All sub-menus inside the target will be closed as well.\n * @param {jQuery} $target - Sub-menu to close.\n * @fires AccordionMenu#up\n */\n up($target) {\n const $submenus = $target.find('[data-submenu]');\n const $allmenus = $target.add($submenus);\n\n $submenus.slideUp(0);\n $allmenus\n .removeClass('is-active')\n .attr('aria-hidden', true);\n\n if (this.options.submenuToggle) {\n $allmenus.prev('.submenu-toggle').attr('aria-expanded', false);\n }\n else {\n $allmenus.parent('.is-accordion-submenu-parent').attr('aria-expanded', false);\n }\n\n $target.slideUp(this.options.slideSpeed, () => {\n /**\n * Fires when the menu is done collapsing up.\n * @event AccordionMenu#up\n */\n this.$element.trigger('up.zf.accordionMenu', [$target]);\n });\n }\n\n /**\n * Destroys an instance of accordion menu.\n * @fires AccordionMenu#destroyed\n */\n _destroy() {\n this.$element.find('[data-submenu]').slideDown(0).css('display', '');\n this.$element.find('a').off('click.zf.accordionMenu');\n this.$element.find('[data-is-parent-link]').detach();\n\n if (this.options.submenuToggle) {\n this.$element.find('.has-submenu-toggle').removeClass('has-submenu-toggle');\n this.$element.find('.submenu-toggle').remove();\n }\n\n Nest.Burn(this.$element, 'accordion');\n }\n}\n\nAccordionMenu.defaults = {\n /**\n * Adds the parent link to the submenu.\n * @option\n * @type {boolean}\n * @default false\n */\n parentLink: false,\n /**\n * Amount of time to animate the opening of a submenu in ms.\n * @option\n * @type {number}\n * @default 250\n */\n slideSpeed: 250,\n /**\n * Adds a separate submenu toggle button. This allows the parent item to have a link.\n * @option\n * @example true\n */\n submenuToggle: false,\n /**\n * The text used for the submenu toggle if enabled. This is used for screen readers only.\n * @option\n * @example true\n */\n submenuToggleText: 'Toggle menu',\n /**\n * Allow the menu to have multiple open panes.\n * @option\n * @type {boolean}\n * @default true\n */\n multiOpen: true\n};\n\nexport { AccordionMenu };\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { GetYoDigits, transitionend } from './foundation.core.utils';\nimport { Box } from './foundation.util.box';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * Drilldown module.\n * @module foundation.drilldown\n * @requires foundation.util.keyboard\n * @requires foundation.util.nest\n * @requires foundation.util.box\n */\n\nclass Drilldown extends Plugin {\n /**\n * Creates a new instance of a drilldown menu.\n * @class\n * @name Drilldown\n * @param {jQuery} element - jQuery object to make into an accordion menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Drilldown.defaults, this.$element.data(), options);\n this.className = 'Drilldown'; // ie9 back compat\n\n this._init();\n\n Keyboard.register('Drilldown', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'previous',\n 'ESCAPE': 'close',\n });\n }\n\n /**\n * Initializes the drilldown by creating jQuery collections of elements\n * @private\n */\n _init() {\n Nest.Feather(this.$element, 'drilldown');\n\n if(this.options.autoApplyClass) {\n this.$element.addClass('drilldown');\n }\n\n this.$element.attr({\n 'aria-multiselectable': false\n });\n this.$submenuAnchors = this.$element.find('li.is-drilldown-submenu-parent').children('a');\n this.$submenus = this.$submenuAnchors.parent('li').children('[data-submenu]').attr('role', 'group');\n this.$menuItems = this.$element.find('li').not('.js-drilldown-back').find('a');\n\n // Set the main menu as current by default (unless a submenu is selected)\n // Used to set the wrapper height when the drilldown is closed/reopened from any (sub)menu\n this.$currentMenu = this.$element;\n\n this.$element.attr('data-mutate', (this.$element.attr('data-drilldown') || GetYoDigits(6, 'drilldown')));\n\n this._prepareMenu();\n this._registerEvents();\n\n this._keyboardEvents();\n }\n\n /**\n * prepares drilldown menu by setting attributes to links and elements\n * sets a min height to prevent content jumping\n * wraps the element if not already wrapped\n * @private\n * @function\n */\n _prepareMenu() {\n var _this = this;\n // if(!this.options.holdOpen){\n // this._menuLinkEvents();\n // }\n this.$submenuAnchors.each(function(){\n var $link = $(this);\n var $sub = $link.parent();\n if(_this.options.parentLink){\n $link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li data-is-parent-link class=\"is-submenu-parent-item is-submenu-item is-drilldown-submenu-item\" role=\"none\"></li>');\n }\n $link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0);\n $link.children('[data-submenu]')\n .attr({\n 'aria-hidden': true,\n 'tabindex': 0,\n 'role': 'group'\n });\n _this._events($link);\n });\n this.$submenus.each(function(){\n var $menu = $(this),\n $back = $menu.find('.js-drilldown-back');\n if(!$back.length){\n switch (_this.options.backButtonPosition) {\n case \"bottom\":\n $menu.append(_this.options.backButton);\n break;\n case \"top\":\n $menu.prepend(_this.options.backButton);\n break;\n default:\n console.error(\"Unsupported backButtonPosition value '\" + _this.options.backButtonPosition + \"'\");\n }\n }\n _this._back($menu);\n });\n\n this.$submenus.addClass('invisible');\n if(!this.options.autoHeight) {\n this.$submenus.addClass('drilldown-submenu-cover-previous');\n }\n\n // create a wrapper on element if it doesn't exist.\n if(!this.$element.parent().hasClass('is-drilldown')){\n this.$wrapper = $(this.options.wrapper).addClass('is-drilldown');\n if(this.options.animateHeight) this.$wrapper.addClass('animate-height');\n this.$element.wrap(this.$wrapper);\n }\n // set wrapper\n this.$wrapper = this.$element.parent();\n this.$wrapper.css(this._getMaxDims());\n }\n\n _resize() {\n this.$wrapper.css({'max-width': 'none', 'min-height': 'none'});\n // _getMaxDims has side effects (boo) but calling it should update all other necessary heights & widths\n this.$wrapper.css(this._getMaxDims());\n }\n\n /**\n * Adds event handlers to elements in the menu.\n * @function\n * @private\n * @param {jQuery} $elem - the current menu item to add handlers to.\n */\n _events($elem) {\n var _this = this;\n\n $elem.off('click.zf.drilldown')\n .on('click.zf.drilldown', function(e) {\n if($(e.target).parentsUntil('ul', 'li').hasClass('is-drilldown-submenu-parent')){\n e.preventDefault();\n }\n\n // if(e.target !== e.currentTarget.firstElementChild){\n // return false;\n // }\n _this._show($elem.parent('li'));\n\n if(_this.options.closeOnClick){\n var $body = $('body');\n $body.off('.zf.drilldown').on('click.zf.drilldown', function(ev) {\n if (ev.target === _this.$element[0] || $.contains(_this.$element[0], ev.target)) { return; }\n ev.preventDefault();\n _this._hideAll();\n $body.off('.zf.drilldown');\n });\n }\n });\n }\n\n /**\n * Adds event handlers to the menu element.\n * @function\n * @private\n */\n _registerEvents() {\n if(this.options.scrollTop){\n this._bindHandler = this._scrollTop.bind(this);\n this.$element.on('open.zf.drilldown hide.zf.drilldown close.zf.drilldown closed.zf.drilldown',this._bindHandler);\n }\n this.$element.on('mutateme.zf.trigger', this._resize.bind(this));\n }\n\n /**\n * Scroll to Top of Element or data-scroll-top-element\n * @function\n * @fires Drilldown#scrollme\n */\n _scrollTop() {\n var _this = this;\n var $scrollTopElement = _this.options.scrollTopElement !== ''?$(_this.options.scrollTopElement):_this.$element,\n scrollPos = parseInt($scrollTopElement.offset().top+_this.options.scrollTopOffset, 10);\n $('html, body').stop(true).animate({ scrollTop: scrollPos }, _this.options.animationDuration, _this.options.animationEasing,function(){\n /**\n * Fires after the menu has scrolled\n * @event Drilldown#scrollme\n */\n if(this===$('html')[0])_this.$element.trigger('scrollme.zf.drilldown');\n });\n }\n\n /**\n * Adds keydown event listener to `li`'s in the menu.\n * @private\n */\n _keyboardEvents() {\n var _this = this;\n\n this.$menuItems.add(this.$element.find('.js-drilldown-back > a, .is-submenu-parent-item > a')).on('keydown.zf.drilldown', function(e){\n var $element = $(this),\n $elements = $element.parent('li').parent('ul').children('li').children('a'),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(Math.max(0, i-1));\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1));\n return;\n }\n });\n\n Keyboard.handleKey(e, 'Drilldown', {\n next: function() {\n if ($element.is(_this.$submenuAnchors)) {\n _this._show($element.parent('li'));\n $element.parent('li').one(transitionend($element), function(){\n $element.parent('li').find('ul li a').not('.js-drilldown-back a').first().focus();\n });\n return true;\n }\n },\n previous: function() {\n _this._hide($element.parent('li').parent('ul'));\n $element.parent('li').parent('ul').one(transitionend($element), function(){\n setTimeout(function() {\n $element.parent('li').parent('ul').parent('li').children('a').first().focus();\n }, 1);\n });\n return true;\n },\n up: function() {\n $prevElement.focus();\n // Don't tap focus on first element in root ul\n return !$element.is(_this.$element.find('> li:first-child > a'));\n },\n down: function() {\n $nextElement.focus();\n // Don't tap focus on last element in root ul\n return !$element.is(_this.$element.find('> li:last-child > a'));\n },\n close: function() {\n // Don't close on element in root ul\n if (!$element.is(_this.$element.find('> li > a'))) {\n _this._hide($element.parent().parent());\n $element.parent().parent().siblings('a').focus();\n }\n },\n open: function() {\n if (_this.options.parentLink && $element.attr('href')) { // Link with href\n return false;\n } else if (!$element.is(_this.$menuItems)) { // not menu item means back button\n _this._hide($element.parent('li').parent('ul'));\n $element.parent('li').parent('ul').one(transitionend($element), function(){\n setTimeout(function() {\n $element.parent('li').parent('ul').parent('li').children('a').first().focus();\n }, 1);\n });\n return true;\n } else if ($element.is(_this.$submenuAnchors)) { // Sub menu item\n _this._show($element.parent('li'));\n $element.parent('li').one(transitionend($element), function(){\n $element.parent('li').find('ul li a').not('.js-drilldown-back a').first().focus();\n });\n return true;\n }\n },\n handled: function(preventDefault) {\n if (preventDefault) {\n e.preventDefault();\n }\n }\n });\n }); // end keyboardAccess\n }\n\n /**\n * Closes all open elements, and returns to root menu.\n * @function\n * @fires Drilldown#close\n * @fires Drilldown#closed\n */\n _hideAll() {\n var $elem = this.$element.find('.is-drilldown-submenu.is-active')\n $elem.addClass('is-closing');\n\n if (this.options.autoHeight) {\n const calcHeight = $elem.parent().closest('ul').data('calcHeight');\n this.$wrapper.css({ height: calcHeight });\n }\n\n /**\n * Fires when the menu is closing.\n * @event Drilldown#close\n */\n this.$element.trigger('close.zf.drilldown');\n\n $elem.one(transitionend($elem), () => {\n $elem.removeClass('is-active is-closing');\n\n /**\n * Fires when the menu is fully closed.\n * @event Drilldown#closed\n */\n this.$element.trigger('closed.zf.drilldown');\n });\n }\n\n /**\n * Adds event listener for each `back` button, and closes open menus.\n * @function\n * @fires Drilldown#back\n * @param {jQuery} $elem - the current sub-menu to add `back` event.\n */\n _back($elem) {\n var _this = this;\n $elem.off('click.zf.drilldown');\n $elem.children('.js-drilldown-back')\n .on('click.zf.drilldown', function() {\n _this._hide($elem);\n\n // If there is a parent submenu, call show\n let parentSubMenu = $elem.parent('li').parent('ul').parent('li');\n if (parentSubMenu.length) {\n _this._show(parentSubMenu);\n }\n else {\n _this.$currentMenu = _this.$element;\n }\n });\n }\n\n /**\n * Adds event listener to menu items w/o submenus to close open menus on click.\n * @function\n * @private\n */\n _menuLinkEvents() {\n var _this = this;\n this.$menuItems.not('.is-drilldown-submenu-parent')\n .off('click.zf.drilldown')\n .on('click.zf.drilldown', function() {\n setTimeout(function() {\n _this._hideAll();\n }, 0);\n });\n }\n\n /**\n * Sets the CSS classes for submenu to show it.\n * @function\n * @private\n * @param {jQuery} $elem - the target submenu (`ul` tag)\n * @param {boolean} trigger - trigger drilldown event\n */\n _setShowSubMenuClasses($elem, trigger) {\n $elem.addClass('is-active').removeClass('invisible').attr('aria-hidden', false);\n $elem.parent('li').attr('aria-expanded', true);\n if (trigger === true) {\n this.$element.trigger('open.zf.drilldown', [$elem]);\n }\n }\n\n /**\n * Sets the CSS classes for submenu to hide it.\n * @function\n * @private\n * @param {jQuery} $elem - the target submenu (`ul` tag)\n * @param {boolean} trigger - trigger drilldown event\n */\n _setHideSubMenuClasses($elem, trigger) {\n $elem.removeClass('is-active').addClass('invisible').attr('aria-hidden', true);\n $elem.parent('li').attr('aria-expanded', false);\n if (trigger === true) {\n $elem.trigger('hide.zf.drilldown', [$elem]);\n }\n }\n\n /**\n * Opens a specific drilldown (sub)menu no matter which (sub)menu in it is currently visible.\n * Compared to _show() this lets you jump into any submenu without clicking through every submenu on the way to it.\n * @function\n * @fires Drilldown#open\n * @param {jQuery} $elem - the target (sub)menu (`ul` tag)\n * @param {boolean} autoFocus - if true the first link in the target (sub)menu gets auto focused\n */\n _showMenu($elem, autoFocus) {\n\n var _this = this;\n\n // Reset drilldown\n var $expandedSubmenus = this.$element.find('li[aria-expanded=\"true\"] > ul[data-submenu]');\n $expandedSubmenus.each(function() {\n _this._setHideSubMenuClasses($(this));\n });\n\n // Save the menu as the currently displayed one.\n this.$currentMenu = $elem;\n\n // If target menu is root, focus first link & exit\n if ($elem.is('[data-drilldown]')) {\n if (autoFocus === true) $elem.find('li > a').first().focus();\n if (this.options.autoHeight) this.$wrapper.css('height', $elem.data('calcHeight'));\n return;\n }\n\n // Find all submenus on way to root incl. the element itself\n var $submenus = $elem.children().first().parentsUntil('[data-drilldown]', '[data-submenu]');\n\n // Open target menu and all submenus on its way to root\n $submenus.each(function(index) {\n\n // Update height of first child (target menu) if autoHeight option true\n if (index === 0 && _this.options.autoHeight) {\n _this.$wrapper.css('height', $(this).data('calcHeight'));\n }\n\n var isLastChild = index === $submenus.length - 1;\n\n // Add transitionsend listener to last child (root due to reverse order) to open target menu's first link\n // Last child makes sure the event gets always triggered even if going through several menus\n if (isLastChild === true) {\n $(this).one(transitionend($(this)), () => {\n if (autoFocus === true) {\n $elem.find('li > a').first().focus();\n }\n });\n }\n\n _this._setShowSubMenuClasses($(this), isLastChild);\n });\n }\n\n /**\n * Opens a submenu.\n * @function\n * @fires Drilldown#open\n * @param {jQuery} $elem - the current element with a submenu to open, i.e. the `li` tag.\n */\n _show($elem) {\n const $submenu = $elem.children('[data-submenu]');\n\n $elem.attr('aria-expanded', true);\n\n this.$currentMenu = $submenu;\n\n //hide drilldown parent menu when submenu is open\n // this removes it from the dom so that the tab key will take the user to the next visible element\n $elem.parent().closest('ul').addClass('invisible');\n\n // add visible class to submenu to override invisible class above\n $submenu.addClass('is-active visible').removeClass('invisible').attr('aria-hidden', false);\n\n if (this.options.autoHeight) {\n this.$wrapper.css({ height: $submenu.data('calcHeight') });\n }\n\n /**\n * Fires when the submenu has opened.\n * @event Drilldown#open\n */\n this.$element.trigger('open.zf.drilldown', [$elem]);\n }\n\n /**\n * Hides a submenu\n * @function\n * @fires Drilldown#hide\n * @param {jQuery} $elem - the current sub-menu to hide, i.e. the `ul` tag.\n */\n _hide($elem) {\n if(this.options.autoHeight) this.$wrapper.css({height:$elem.parent().closest('ul').data('calcHeight')});\n $elem.parent().closest('ul').removeClass('invisible');\n $elem.parent('li').attr('aria-expanded', false);\n $elem.attr('aria-hidden', true);\n $elem.addClass('is-closing')\n .one(transitionend($elem), function(){\n $elem.removeClass('is-active is-closing visible');\n $elem.blur().addClass('invisible');\n });\n /**\n * Fires when the submenu has closed.\n * @event Drilldown#hide\n */\n $elem.trigger('hide.zf.drilldown', [$elem]);\n }\n\n /**\n * Iterates through the nested menus to calculate the min-height, and max-width for the menu.\n * Prevents content jumping.\n * @function\n * @private\n */\n _getMaxDims() {\n var maxHeight = 0, result = {}, _this = this;\n\n // Recalculate menu heights and total max height\n this.$submenus.add(this.$element).each(function(){\n var height = Box.GetDimensions(this).height;\n\n maxHeight = height > maxHeight ? height : maxHeight;\n\n if(_this.options.autoHeight) {\n $(this).data('calcHeight',height);\n }\n });\n\n if (this.options.autoHeight)\n result.height = this.$currentMenu.data('calcHeight');\n else\n result['min-height'] = `${maxHeight}px`;\n\n result['max-width'] = `${this.$element[0].getBoundingClientRect().width}px`;\n\n return result;\n }\n\n /**\n * Destroys the Drilldown Menu\n * @function\n */\n _destroy() {\n $('body').off('.zf.drilldown');\n if(this.options.scrollTop) this.$element.off('.zf.drilldown',this._bindHandler);\n this._hideAll();\n\t this.$element.off('mutateme.zf.trigger');\n Nest.Burn(this.$element, 'drilldown');\n this.$element.unwrap()\n .find('.js-drilldown-back, .is-submenu-parent-item').remove()\n .end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu').off('transitionend otransitionend webkitTransitionEnd')\n .end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');\n this.$submenuAnchors.each(function() {\n $(this).off('.zf.drilldown');\n });\n\n this.$element.find('[data-is-parent-link]').detach();\n this.$submenus.removeClass('drilldown-submenu-cover-previous invisible');\n\n this.$element.find('a').each(function(){\n var $link = $(this);\n $link.removeAttr('tabindex');\n if($link.data('savedHref')){\n $link.attr('href', $link.data('savedHref')).removeData('savedHref');\n }else{ return; }\n });\n };\n}\n\nDrilldown.defaults = {\n /**\n * Drilldowns depend on styles in order to function properly; in the default build of Foundation these are\n * on the `drilldown` class. This option auto-applies this class to the drilldown upon initialization.\n * @option\n * @type {boolean}\n * @default true\n */\n autoApplyClass: true,\n /**\n * Markup used for JS generated back button. Prepended or appended (see backButtonPosition) to submenu lists and deleted on `destroy` method, 'js-drilldown-back' class required. Remove the backslash (`\\`) if copy and pasting.\n * @option\n * @type {string}\n * @default '<li class=\"js-drilldown-back\"><a tabindex=\"0\">Back</a></li>'\n */\n backButton: '<li class=\"js-drilldown-back\"><a tabindex=\"0\">Back</a></li>',\n /**\n * Position the back button either at the top or bottom of drilldown submenus. Can be `'left'` or `'bottom'`.\n * @option\n * @type {string}\n * @default top\n */\n backButtonPosition: 'top',\n /**\n * Markup used to wrap drilldown menu. Use a class name for independent styling; the JS applied class: `is-drilldown` is required. Remove the backslash (`\\`) if copy and pasting.\n * @option\n * @type {string}\n * @default '<div></div>'\n */\n wrapper: '<div></div>',\n /**\n * Adds the parent link to the submenu.\n * @option\n * @type {boolean}\n * @default false\n */\n parentLink: false,\n /**\n * Allow the menu to return to root list on body click.\n * @option\n * @type {boolean}\n * @default false\n */\n closeOnClick: false,\n /**\n * Allow the menu to auto adjust height.\n * @option\n * @type {boolean}\n * @default false\n */\n autoHeight: false,\n /**\n * Animate the auto adjust height.\n * @option\n * @type {boolean}\n * @default false\n */\n animateHeight: false,\n /**\n * Scroll to the top of the menu after opening a submenu or navigating back using the menu back button\n * @option\n * @type {boolean}\n * @default false\n */\n scrollTop: false,\n /**\n * String jquery selector (for example 'body') of element to take offset().top from, if empty string the drilldown menu offset().top is taken\n * @option\n * @type {string}\n * @default ''\n */\n scrollTopElement: '',\n /**\n * ScrollTop offset\n * @option\n * @type {number}\n * @default 0\n */\n scrollTopOffset: 0,\n /**\n * Scroll animation duration\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Scroll animation easing. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @see {@link https://api.jquery.com/animate|JQuery animate}\n * @default 'swing'\n */\n animationEasing: 'swing'\n // holdOpen: false\n};\n\nexport {Drilldown};\n","import { Box } from './foundation.util.box';\nimport { Plugin } from './foundation.core.plugin';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst POSITIONS = ['left', 'right', 'top', 'bottom'];\nconst VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center'];\nconst HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center'];\n\nconst ALIGNMENTS = {\n 'left': VERTICAL_ALIGNMENTS,\n 'right': VERTICAL_ALIGNMENTS,\n 'top': HORIZONTAL_ALIGNMENTS,\n 'bottom': HORIZONTAL_ALIGNMENTS\n}\n\nfunction nextItem(item, array) {\n var currentIdx = array.indexOf(item);\n if(currentIdx === array.length - 1) {\n return array[0];\n } else {\n return array[currentIdx + 1];\n }\n}\n\n\nclass Positionable extends Plugin {\n /**\n * Abstract class encapsulating the tether-like explicit positioning logic\n * including repositioning based on overlap.\n * Expects classes to define defaults for vOffset, hOffset, position,\n * alignment, allowOverlap, and allowBottomOverlap. They can do this by\n * extending the defaults, or (for now recommended due to the way docs are\n * generated) by explicitly declaring them.\n *\n **/\n\n _init() {\n this.triedPositions = {};\n this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position;\n this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment;\n this.originalPosition = this.position;\n this.originalAlignment = this.alignment;\n }\n\n _getDefaultPosition () {\n return 'bottom';\n }\n\n _getDefaultAlignment() {\n switch(this.position) {\n case 'bottom':\n case 'top':\n return Rtl() ? 'right' : 'left';\n case 'left':\n case 'right':\n return 'bottom';\n }\n }\n\n /**\n * Adjusts the positionable possible positions by iterating through alignments\n * and positions.\n * @function\n * @private\n */\n _reposition() {\n if(this._alignmentsExhausted(this.position)) {\n this.position = nextItem(this.position, POSITIONS);\n this.alignment = ALIGNMENTS[this.position][0];\n } else {\n this._realign();\n }\n }\n\n /**\n * Adjusts the dropdown pane possible positions by iterating through alignments\n * on the current position.\n * @function\n * @private\n */\n _realign() {\n this._addTriedPosition(this.position, this.alignment)\n this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position])\n }\n\n _addTriedPosition(position, alignment) {\n this.triedPositions[position] = this.triedPositions[position] || []\n this.triedPositions[position].push(alignment);\n }\n\n _positionsExhausted() {\n var isExhausted = true;\n for(var i = 0; i < POSITIONS.length; i++) {\n isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]);\n }\n return isExhausted;\n }\n\n _alignmentsExhausted(position) {\n return this.triedPositions[position] && this.triedPositions[position].length === ALIGNMENTS[position].length;\n }\n\n\n // When we're trying to center, we don't want to apply offset that's going to\n // take us just off center, so wrap around to return 0 for the appropriate\n // offset in those alignments. TODO: Figure out if we want to make this\n // configurable behavior... it feels more intuitive, especially for tooltips, but\n // it's possible someone might actually want to start from center and then nudge\n // slightly off.\n _getVOffset() {\n return this.options.vOffset;\n }\n\n _getHOffset() {\n return this.options.hOffset;\n }\n\n _setPosition($anchor, $element, $parent) {\n if($anchor.attr('aria-expanded') === 'false'){ return false; }\n\n if (!this.options.allowOverlap) {\n // restore original position & alignment before checking overlap\n this.position = this.originalPosition;\n this.alignment = this.originalAlignment;\n }\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n\n if(!this.options.allowOverlap) {\n var minOverlap = 100000000;\n // default coordinates to how we start, in case we can't figure out better\n var minCoordinates = {position: this.position, alignment: this.alignment};\n while(!this._positionsExhausted()) {\n let overlap = Box.OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap);\n if(overlap === 0) {\n return;\n }\n\n if(overlap < minOverlap) {\n minOverlap = overlap;\n minCoordinates = {position: this.position, alignment: this.alignment};\n }\n\n this._reposition();\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n // If we get through the entire loop, there was no non-overlapping\n // position available. Pick the version with least overlap.\n this.position = minCoordinates.position;\n this.alignment = minCoordinates.alignment;\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n }\n\n}\n\nPositionable.defaults = {\n /**\n * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, dropdown positionable first\n * try to position as defined by data-position and data-alignment, but\n * reposition if it would cause an overflow.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Number of pixels the positionable should be separated vertically from anchor\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels the positionable should be separated horizontally from anchor\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n}\n\nexport {Positionable};\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { GetYoDigits, ignoreMousedisappear } from './foundation.core.utils';\nimport { Positionable } from './foundation.positionable';\n\nimport { Triggers } from './foundation.util.triggers';\nimport { Touch } from './foundation.util.touch'\n\n/**\n * Dropdown module.\n * @module foundation.dropdown\n * @requires foundation.util.keyboard\n * @requires foundation.util.box\n * @requires foundation.util.touch\n * @requires foundation.util.triggers\n */\nclass Dropdown extends Positionable {\n /**\n * Creates a new instance of a dropdown.\n * @class\n * @name Dropdown\n * @param {jQuery} element - jQuery object to make into a dropdown.\n * Object should be of the dropdown panel, rather than its anchor.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Dropdown.defaults, this.$element.data(), options);\n this.className = 'Dropdown'; // ie9 back compat\n\n // Touch and Triggers init are idempotent, just need to make sure they are initialized\n Touch.init($);\n Triggers.init($);\n\n this._init();\n\n Keyboard.register('Dropdown', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ESCAPE': 'close'\n });\n }\n\n /**\n * Initializes the plugin by setting/checking options and attributes, adding helper variables, and saving the anchor.\n * @function\n * @private\n */\n _init() {\n var $id = this.$element.attr('id');\n\n this.$anchors = $(`[data-toggle=\"${$id}\"]`).length ? $(`[data-toggle=\"${$id}\"]`) : $(`[data-open=\"${$id}\"]`);\n this.$anchors.attr({\n 'aria-controls': $id,\n 'data-is-focus': false,\n 'data-yeti-box': $id,\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n\n this._setCurrentAnchor(this.$anchors.first());\n\n if(this.options.parentClass){\n this.$parent = this.$element.parents('.' + this.options.parentClass);\n }else{\n this.$parent = null;\n }\n\n // Set [aria-labelledby] on the Dropdown if it is not set\n if (typeof this.$element.attr('aria-labelledby') === 'undefined') {\n // Get the anchor ID or create one\n if (typeof this.$currentAnchor.attr('id') === 'undefined') {\n this.$currentAnchor.attr('id', GetYoDigits(6, 'dd-anchor'));\n }\n\n this.$element.attr('aria-labelledby', this.$currentAnchor.attr('id'));\n }\n\n this.$element.attr({\n 'aria-hidden': 'true',\n 'data-yeti-box': $id,\n 'data-resize': $id,\n });\n\n super._init();\n this._events();\n }\n\n _getDefaultPosition() {\n // handle legacy classnames\n var position = this.$element[0].className.match(/(top|left|right|bottom)/g);\n if(position) {\n return position[0];\n } else {\n return 'bottom'\n }\n }\n\n _getDefaultAlignment() {\n // handle legacy float approach\n var horizontalPosition = /float-(\\S+)/.exec(this.$currentAnchor.attr('class'));\n if(horizontalPosition) {\n return horizontalPosition[1];\n }\n\n return super._getDefaultAlignment();\n }\n\n\n\n /**\n * Sets the position and orientation of the dropdown pane, checks for collisions if allow-overlap is not true.\n * Recursively calls itself if a collision is detected, with a new position class.\n * @function\n * @private\n */\n _setPosition() {\n this.$element.removeClass(`has-position-${this.position} has-alignment-${this.alignment}`);\n super._setPosition(this.$currentAnchor, this.$element, this.$parent);\n this.$element.addClass(`has-position-${this.position} has-alignment-${this.alignment}`);\n }\n\n /**\n * Make it a current anchor.\n * Current anchor as the reference for the position of Dropdown panes.\n * @param {HTML} el - DOM element of the anchor.\n * @function\n * @private\n */\n _setCurrentAnchor(el) {\n this.$currentAnchor = $(el);\n }\n\n /**\n * Adds event listeners to the element utilizing the triggers utility library.\n * @function\n * @private\n */\n _events() {\n var _this = this,\n hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined');\n\n this.$element.on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': this.close.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'resizeme.zf.trigger': this._setPosition.bind(this)\n });\n\n this.$anchors.off('click.zf.trigger')\n .on('click.zf.trigger', function(e) {\n _this._setCurrentAnchor(this);\n\n if (\n // if forceFollow false, always prevent default action\n (_this.options.forceFollow === false) ||\n // if forceFollow true and hover option true, only prevent default action on 1st click\n // on 2nd click (dropown opened) the default action (e.g. follow a href) gets executed\n (hasTouch && _this.options.hover && _this.$element.hasClass('is-open') === false)\n ) {\n e.preventDefault();\n }\n });\n\n if(this.options.hover){\n this.$anchors.off('mouseenter.zf.dropdown mouseleave.zf.dropdown')\n .on('mouseenter.zf.dropdown', function(){\n _this._setCurrentAnchor(this);\n\n var bodyData = $('body').data();\n if(typeof(bodyData.whatinput) === 'undefined' || bodyData.whatinput === 'mouse') {\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.open();\n _this.$anchors.data('hover', true);\n }, _this.options.hoverDelay);\n }\n }).on('mouseleave.zf.dropdown', ignoreMousedisappear(function(){\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.close();\n _this.$anchors.data('hover', false);\n }, _this.options.hoverDelay);\n }));\n if(this.options.hoverPane){\n this.$element.off('mouseenter.zf.dropdown mouseleave.zf.dropdown')\n .on('mouseenter.zf.dropdown', function(){\n clearTimeout(_this.timeout);\n }).on('mouseleave.zf.dropdown', ignoreMousedisappear(function(){\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.close();\n _this.$anchors.data('hover', false);\n }, _this.options.hoverDelay);\n }));\n }\n }\n this.$anchors.add(this.$element).on('keydown.zf.dropdown', function(e) {\n\n var $target = $(this);\n\n Keyboard.handleKey(e, 'Dropdown', {\n open: function() {\n if ($target.is(_this.$anchors) && !$target.is('input, textarea')) {\n _this.open();\n _this.$element.attr('tabindex', -1).focus();\n e.preventDefault();\n }\n },\n close: function() {\n _this.close();\n _this.$anchors.focus();\n }\n });\n });\n }\n\n /**\n * Adds an event handler to the body to close any dropdowns on a click.\n * @function\n * @private\n */\n _addBodyHandler() {\n var $body = $(document.body).not(this.$element),\n _this = this;\n $body.off('click.zf.dropdown tap.zf.dropdown')\n .on('click.zf.dropdown tap.zf.dropdown', function (e) {\n if(_this.$anchors.is(e.target) || _this.$anchors.find(e.target).length) {\n return;\n }\n if(_this.$element.is(e.target) || _this.$element.find(e.target).length) {\n return;\n }\n _this.close();\n $body.off('click.zf.dropdown tap.zf.dropdown');\n });\n }\n\n /**\n * Opens the dropdown pane, and fires a bubbling event to close other dropdowns.\n * @function\n * @fires Dropdown#closeme\n * @fires Dropdown#show\n */\n open() {\n // var _this = this;\n /**\n * Fires to close other open dropdowns, typically when dropdown is opening\n * @event Dropdown#closeme\n */\n this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));\n this.$anchors.addClass('hover')\n .attr({'aria-expanded': true});\n // this.$element/*.show()*/;\n\n this.$element.addClass('is-opening');\n this._setPosition();\n this.$element.removeClass('is-opening').addClass('is-open')\n .attr({'aria-hidden': false});\n\n if(this.options.autoFocus){\n var $focusable = Keyboard.findFocusable(this.$element);\n if($focusable.length){\n $focusable.eq(0).focus();\n }\n }\n\n if(this.options.closeOnClick){ this._addBodyHandler(); }\n\n if (this.options.trapFocus) {\n Keyboard.trapFocus(this.$element);\n }\n\n /**\n * Fires once the dropdown is visible.\n * @event Dropdown#show\n */\n this.$element.trigger('show.zf.dropdown', [this.$element]);\n }\n\n /**\n * Closes the open dropdown pane.\n * @function\n * @fires Dropdown#hide\n */\n close() {\n if(!this.$element.hasClass('is-open')){\n return false;\n }\n this.$element.removeClass('is-open')\n .attr({'aria-hidden': true});\n\n this.$anchors.removeClass('hover')\n .attr('aria-expanded', false);\n\n /**\n * Fires once the dropdown is no longer visible.\n * @event Dropdown#hide\n */\n this.$element.trigger('hide.zf.dropdown', [this.$element]);\n\n if (this.options.trapFocus) {\n Keyboard.releaseFocus(this.$element);\n }\n }\n\n /**\n * Toggles the dropdown pane's visibility.\n * @function\n */\n toggle() {\n if(this.$element.hasClass('is-open')){\n if(this.$anchors.data('hover')) return;\n this.close();\n }else{\n this.open();\n }\n }\n\n /**\n * Destroys the dropdown.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.trigger').hide();\n this.$anchors.off('.zf.dropdown');\n $(document.body).off('click.zf.dropdown tap.zf.dropdown');\n\n }\n}\n\nDropdown.defaults = {\n /**\n * Class that designates bounding container of Dropdown (default: window)\n * @option\n * @type {?string}\n * @default null\n */\n parentClass: null,\n /**\n * Amount of time to delay opening a submenu on hover event.\n * @option\n * @type {number}\n * @default 250\n */\n hoverDelay: 250,\n /**\n * Allow submenus to open on hover events\n * @option\n * @type {boolean}\n * @default false\n */\n hover: false,\n /**\n * Don't close dropdown when hovering over dropdown pane\n * @option\n * @type {boolean}\n * @default false\n */\n hoverPane: false,\n /**\n * Number of pixels between the dropdown pane and the triggering element on open.\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels between the dropdown pane and the triggering element on open.\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n /**\n * Position of dropdown. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of dropdown relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, dropdown will first try to position as defined by data-position and data-alignment, but reposition if it would cause an overflow.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands.\n * @option\n * @type {boolean}\n * @default false\n */\n trapFocus: false,\n /**\n * Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening.\n * @option\n * @type {boolean}\n * @default false\n */\n autoFocus: false,\n /**\n * Allows a click on the body to close the dropdown.\n * @option\n * @type {boolean}\n * @default false\n */\n closeOnClick: false,\n /**\n * If true the default action of the toggle (e.g. follow a link with href) gets executed on click. If hover option is also true the default action gets prevented on first click for mobile / touch devices and executed on second click.\n * @option\n * @type {boolean}\n * @default true\n */\n forceFollow: true\n};\n\nexport {Dropdown};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { rtl as Rtl, ignoreMousedisappear } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Nest } from './foundation.util.nest';\nimport { Box } from './foundation.util.box';\nimport { Touch } from './foundation.util.touch'\n\n\n/**\n * DropdownMenu module.\n * @module foundation.dropdownMenu\n * @requires foundation.util.keyboard\n * @requires foundation.util.box\n * @requires foundation.util.nest\n * @requires foundation.util.touch\n */\n\nclass DropdownMenu extends Plugin {\n /**\n * Creates a new instance of DropdownMenu.\n * @class\n * @name DropdownMenu\n * @fires DropdownMenu#init\n * @param {jQuery} element - jQuery object to make into a dropdown menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, DropdownMenu.defaults, this.$element.data(), options);\n this.className = 'DropdownMenu'; // ie9 back compat\n\n Touch.init($); // Touch init is idempotent, we just need to make sure it's initialied.\n\n this._init();\n\n Keyboard.register('DropdownMenu', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'previous',\n 'ESCAPE': 'close'\n });\n }\n\n /**\n * Initializes the plugin, and calls _prepareMenu\n * @private\n * @function\n */\n _init() {\n Nest.Feather(this.$element, 'dropdown');\n\n var subs = this.$element.find('li.is-dropdown-submenu-parent');\n this.$element.children('.is-dropdown-submenu-parent').children('.is-dropdown-submenu').addClass('first-sub');\n\n this.$menuItems = this.$element.find('li[role=\"none\"]');\n this.$tabs = this.$element.children('li[role=\"none\"]');\n this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);\n\n if (this.options.alignment === 'auto') {\n if (this.$element.hasClass(this.options.rightClass) || Rtl() || this.$element.parents('.top-bar-right').is('*')) {\n this.options.alignment = 'right';\n subs.addClass('opens-left');\n } else {\n this.options.alignment = 'left';\n subs.addClass('opens-right');\n }\n } else {\n if (this.options.alignment === 'right') {\n subs.addClass('opens-left');\n } else {\n subs.addClass('opens-right');\n }\n }\n this.changed = false;\n this._events();\n };\n\n _isVertical() {\n return this.$tabs.css('display') === 'block' || this.$element.css('flex-direction') === 'column';\n }\n\n _isRtl() {\n return this.$element.hasClass('align-right') || (Rtl() && !this.$element.hasClass('align-left'));\n }\n\n /**\n * Adds event listeners to elements within the menu\n * @private\n * @function\n */\n _events() {\n var _this = this,\n hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined'),\n parClass = 'is-dropdown-submenu-parent';\n\n // used for onClick and in the keyboard handlers\n var handleClickFn = function(e) {\n var $elem = $(e.target).parentsUntil('ul', `.${parClass}`),\n hasSub = $elem.hasClass(parClass),\n hasClicked = $elem.attr('data-is-click') === 'true',\n $sub = $elem.children('.is-dropdown-submenu');\n\n if (hasSub) {\n if (hasClicked) {\n if (!_this.options.closeOnClick\n || (!_this.options.clickOpen && !hasTouch)\n || (_this.options.forceFollow && hasTouch)) {\n return;\n }\n e.stopImmediatePropagation();\n e.preventDefault();\n _this._hide($elem);\n }\n else {\n e.stopImmediatePropagation();\n e.preventDefault();\n _this._show($sub);\n $elem.add($elem.parentsUntil(_this.$element, `.${parClass}`)).attr('data-is-click', true);\n }\n }\n };\n\n if (this.options.clickOpen || hasTouch) {\n this.$menuItems.on('click.zf.dropdownMenu touchstart.zf.dropdownMenu', handleClickFn);\n }\n\n // Handle Leaf element Clicks\n if(_this.options.closeOnClickInside){\n this.$menuItems.on('click.zf.dropdownMenu', function() {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n if(!hasSub){\n _this._hide();\n }\n });\n }\n\n if (hasTouch && this.options.disableHoverOnTouch) this.options.disableHover = true;\n\n if (!this.options.disableHover) {\n this.$menuItems.on('mouseenter.zf.dropdownMenu', function () {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n\n if (hasSub) {\n clearTimeout($elem.data('_delay'));\n $elem.data('_delay', setTimeout(function () {\n _this._show($elem.children('.is-dropdown-submenu'));\n }, _this.options.hoverDelay));\n }\n }).on('mouseleave.zf.dropdownMenu', ignoreMousedisappear(function () {\n var $elem = $(this),\n hasSub = $elem.hasClass(parClass);\n if (hasSub && _this.options.autoclose) {\n if ($elem.attr('data-is-click') === 'true' && _this.options.clickOpen) { return false; }\n\n clearTimeout($elem.data('_delay'));\n $elem.data('_delay', setTimeout(function () {\n _this._hide($elem);\n }, _this.options.closingTime));\n }\n }));\n }\n this.$menuItems.on('keydown.zf.dropdownMenu', function(e) {\n var $element = $(e.target).parentsUntil('ul', '[role=\"none\"]'),\n isTab = _this.$tabs.index($element) > -1,\n $elements = isTab ? _this.$tabs : $element.siblings('li').add($element),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n $prevElement = $elements.eq(i-1);\n $nextElement = $elements.eq(i+1);\n return;\n }\n });\n\n var nextSibling = function() {\n $nextElement.children('a:first').focus();\n e.preventDefault();\n }, prevSibling = function() {\n $prevElement.children('a:first').focus();\n e.preventDefault();\n }, openSub = function() {\n var $sub = $element.children('ul.is-dropdown-submenu');\n if ($sub.length) {\n _this._show($sub);\n $element.find('li > a:first').focus();\n e.preventDefault();\n } else { return; }\n }, closeSub = function() {\n //if ($element.is(':first-child')) {\n var close = $element.parent('ul').parent('li');\n close.children('a:first').focus();\n _this._hide(close);\n e.preventDefault();\n //}\n };\n var functions = {\n open: openSub,\n close: function() {\n _this._hide(_this.$element);\n _this.$menuItems.eq(0).children('a').focus(); // focus to first element\n e.preventDefault();\n }\n };\n\n if (isTab) {\n if (_this._isVertical()) { // vertical menu\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n down: nextSibling,\n up: prevSibling,\n next: closeSub,\n previous: openSub\n });\n } else { // left aligned\n $.extend(functions, {\n down: nextSibling,\n up: prevSibling,\n next: openSub,\n previous: closeSub\n });\n }\n } else { // horizontal menu\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n next: prevSibling,\n previous: nextSibling,\n down: openSub,\n up: closeSub\n });\n } else { // left aligned\n $.extend(functions, {\n next: nextSibling,\n previous: prevSibling,\n down: openSub,\n up: closeSub\n });\n }\n }\n } else { // not tabs -> one sub\n if (_this._isRtl()) { // right aligned\n $.extend(functions, {\n next: closeSub,\n previous: openSub,\n down: nextSibling,\n up: prevSibling\n });\n } else { // left aligned\n $.extend(functions, {\n next: openSub,\n previous: closeSub,\n down: nextSibling,\n up: prevSibling\n });\n }\n }\n Keyboard.handleKey(e, 'DropdownMenu', functions);\n\n });\n }\n\n /**\n * Adds an event handler to the body to close any dropdowns on a click.\n * @function\n * @private\n */\n _addBodyHandler() {\n const $body = $(document.body);\n this._removeBodyHandler();\n $body.on('click.zf.dropdownMenu tap.zf.dropdownMenu', (e) => {\n var isItself = !!$(e.target).closest(this.$element).length;\n if (isItself) return;\n\n this._hide();\n this._removeBodyHandler();\n });\n }\n\n /**\n * Remove the body event handler. See `_addBodyHandler`.\n * @function\n * @private\n */\n _removeBodyHandler() {\n $(document.body).off('click.zf.dropdownMenu tap.zf.dropdownMenu');\n }\n\n /**\n * Opens a dropdown pane, and checks for collisions first.\n * @param {jQuery} $sub - ul element that is a submenu to show\n * @function\n * @private\n * @fires DropdownMenu#show\n */\n _show($sub) {\n var idx = this.$tabs.index(this.$tabs.filter(function(i, el) {\n return $(el).find($sub).length > 0;\n }));\n var $sibs = $sub.parent('li.is-dropdown-submenu-parent').siblings('li.is-dropdown-submenu-parent');\n this._hide($sibs, idx);\n $sub.css('visibility', 'hidden').addClass('js-dropdown-active')\n .parent('li.is-dropdown-submenu-parent').addClass('is-active');\n var clear = Box.ImNotTouchingYou($sub, null, true);\n if (!clear) {\n var oldClass = this.options.alignment === 'left' ? '-right' : '-left',\n $parentLi = $sub.parent('.is-dropdown-submenu-parent');\n $parentLi.removeClass(`opens${oldClass}`).addClass(`opens-${this.options.alignment}`);\n clear = Box.ImNotTouchingYou($sub, null, true);\n if (!clear) {\n $parentLi.removeClass(`opens-${this.options.alignment}`).addClass('opens-inner');\n }\n this.changed = true;\n }\n $sub.css('visibility', '');\n if (this.options.closeOnClick) { this._addBodyHandler(); }\n /**\n * Fires when the new dropdown pane is visible.\n * @event DropdownMenu#show\n */\n this.$element.trigger('show.zf.dropdownMenu', [$sub]);\n }\n\n /**\n * Hides a single, currently open dropdown pane, if passed a parameter, otherwise, hides everything.\n * @function\n * @param {jQuery} $elem - element with a submenu to hide\n * @param {Number} idx - index of the $tabs collection to hide\n * @fires DropdownMenu#hide\n * @private\n */\n _hide($elem, idx) {\n var $toClose;\n if ($elem && $elem.length) {\n $toClose = $elem;\n } else if (typeof idx !== 'undefined') {\n $toClose = this.$tabs.not(function(i) {\n return i === idx;\n });\n }\n else {\n $toClose = this.$element;\n }\n var somethingToClose = $toClose.hasClass('is-active') || $toClose.find('.is-active').length > 0;\n\n if (somethingToClose) {\n var $activeItem = $toClose.find('li.is-active');\n $activeItem.add($toClose).attr({\n 'data-is-click': false\n }).removeClass('is-active');\n\n $toClose.find('ul.js-dropdown-active').removeClass('js-dropdown-active');\n\n if (this.changed || $toClose.find('opens-inner').length) {\n var oldClass = this.options.alignment === 'left' ? 'right' : 'left';\n $toClose.find('li.is-dropdown-submenu-parent').add($toClose)\n .removeClass(`opens-inner opens-${this.options.alignment}`)\n .addClass(`opens-${oldClass}`);\n this.changed = false;\n }\n\n clearTimeout($activeItem.data('_delay'));\n this._removeBodyHandler();\n\n /**\n * Fires when the open menus are closed.\n * @event DropdownMenu#hide\n */\n this.$element.trigger('hide.zf.dropdownMenu', [$toClose]);\n }\n }\n\n /**\n * Destroys the plugin.\n * @function\n */\n _destroy() {\n this.$menuItems.off('.zf.dropdownMenu').removeAttr('data-is-click')\n .removeClass('is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner');\n $(document.body).off('.zf.dropdownMenu');\n Nest.Burn(this.$element, 'dropdown');\n }\n}\n\n/**\n * Default settings for plugin\n */\nDropdownMenu.defaults = {\n /**\n * Disallows hover events from opening submenus\n * @option\n * @type {boolean}\n * @default false\n */\n disableHover: false,\n /**\n * Disallows hover on touch devices\n * @option\n * @type {boolean}\n * @default true\n */\n disableHoverOnTouch: true,\n /**\n * Allow a submenu to automatically close on a mouseleave event, if not clicked open.\n * @option\n * @type {boolean}\n * @default true\n */\n autoclose: true,\n /**\n * Amount of time to delay opening a submenu on hover event.\n * @option\n * @type {number}\n * @default 50\n */\n hoverDelay: 50,\n /**\n * Allow a submenu to open/remain open on parent click event. Allows cursor to move away from menu.\n * @option\n * @type {boolean}\n * @default false\n */\n clickOpen: false,\n /**\n * Amount of time to delay closing a submenu on a mouseleave event.\n * @option\n * @type {number}\n * @default 500\n */\n\n closingTime: 500,\n /**\n * Position of the menu relative to what direction the submenus should open. Handled by JS. Can be `'auto'`, `'left'` or `'right'`.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow clicks on the body to close any open submenus.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n /**\n * Allow clicks on leaf anchor links to close any open submenus.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClickInside: true,\n /**\n * Class applied to vertical oriented menus, Foundation default is `vertical`. Update this if using your own class.\n * @option\n * @type {string}\n * @default 'vertical'\n */\n verticalClass: 'vertical',\n /**\n * Class applied to right-side oriented menus, Foundation default is `align-right`. Update this if using your own class.\n * @option\n * @type {string}\n * @default 'align-right'\n */\n rightClass: 'align-right',\n /**\n * Boolean to force overide the clicking of links to perform default action, on second touch event for mobile.\n * @option\n * @type {boolean}\n * @default true\n */\n forceFollow: true\n};\n\nexport {DropdownMenu};\n","import $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * Equalizer module.\n * @module foundation.equalizer\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.imageLoader if equalizer contains images\n */\n\nclass Equalizer extends Plugin {\n /**\n * Creates a new instance of Equalizer.\n * @class\n * @name Equalizer\n * @fires Equalizer#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options){\n this.$element = element;\n this.options = $.extend({}, Equalizer.defaults, this.$element.data(), options);\n this.className = 'Equalizer'; // ie9 back compat\n\n this._init();\n }\n\n /**\n * Initializes the Equalizer plugin and calls functions to get equalizer functioning on load.\n * @private\n */\n _init() {\n var eqId = this.$element.attr('data-equalizer') || '';\n var $watched = this.$element.find(`[data-equalizer-watch=\"${eqId}\"]`);\n\n MediaQuery._init();\n\n this.$watched = $watched.length ? $watched : this.$element.find('[data-equalizer-watch]');\n this.$element.attr('data-resize', (eqId || GetYoDigits(6, 'eq')));\n this.$element.attr('data-mutate', (eqId || GetYoDigits(6, 'eq')));\n\n this.hasNested = this.$element.find('[data-equalizer]').length > 0;\n this.isNested = this.$element.parentsUntil(document.body, '[data-equalizer]').length > 0;\n this.isOn = false;\n this._bindHandler = {\n onResizeMeBound: this._onResizeMe.bind(this),\n onPostEqualizedBound: this._onPostEqualized.bind(this)\n };\n\n var imgs = this.$element.find('img');\n var tooSmall;\n if(this.options.equalizeOn){\n tooSmall = this._checkMQ();\n $(window).on('changed.zf.mediaquery', this._checkMQ.bind(this));\n }else{\n this._events();\n }\n if((typeof tooSmall !== 'undefined' && tooSmall === false) || typeof tooSmall === 'undefined'){\n if(imgs.length){\n onImagesLoaded(imgs, this._reflow.bind(this));\n }else{\n this._reflow();\n }\n }\n }\n\n /**\n * Removes event listeners if the breakpoint is too small.\n * @private\n */\n _pauseEvents() {\n this.isOn = false;\n this.$element.off({\n '.zf.equalizer': this._bindHandler.onPostEqualizedBound,\n 'resizeme.zf.trigger': this._bindHandler.onResizeMeBound,\n\t 'mutateme.zf.trigger': this._bindHandler.onResizeMeBound\n });\n }\n\n /**\n * function to handle $elements resizeme.zf.trigger, with bound this on _bindHandler.onResizeMeBound\n * @private\n */\n _onResizeMe() {\n this._reflow();\n }\n\n /**\n * function to handle $elements postequalized.zf.equalizer, with bound this on _bindHandler.onPostEqualizedBound\n * @private\n */\n _onPostEqualized(e) {\n if(e.target !== this.$element[0]){ this._reflow(); }\n }\n\n /**\n * Initializes events for Equalizer.\n * @private\n */\n _events() {\n this._pauseEvents();\n if(this.hasNested){\n this.$element.on('postequalized.zf.equalizer', this._bindHandler.onPostEqualizedBound);\n }else{\n this.$element.on('resizeme.zf.trigger', this._bindHandler.onResizeMeBound);\n\t this.$element.on('mutateme.zf.trigger', this._bindHandler.onResizeMeBound);\n }\n this.isOn = true;\n }\n\n /**\n * Checks the current breakpoint to the minimum required size.\n * @private\n */\n _checkMQ() {\n var tooSmall = !MediaQuery.is(this.options.equalizeOn);\n if(tooSmall){\n if(this.isOn){\n this._pauseEvents();\n this.$watched.css('height', 'auto');\n }\n }else{\n if(!this.isOn){\n this._events();\n }\n }\n return tooSmall;\n }\n\n /**\n * A noop version for the plugin\n * @private\n */\n _killswitch() {\n return;\n }\n\n /**\n * Calls necessary functions to update Equalizer upon DOM change\n * @private\n */\n _reflow() {\n if(!this.options.equalizeOnStack){\n if(this._isStacked()){\n this.$watched.css('height', 'auto');\n return false;\n }\n }\n if (this.options.equalizeByRow) {\n this.getHeightsByRow(this.applyHeightByRow.bind(this));\n }else{\n this.getHeights(this.applyHeight.bind(this));\n }\n }\n\n /**\n * Manually determines if the first 2 elements are *NOT* stacked.\n * @private\n */\n _isStacked() {\n if (!this.$watched[0] || !this.$watched[1]) {\n return true;\n }\n return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;\n }\n\n /**\n * Finds the outer heights of children contained within an Equalizer parent and returns them in an array\n * @param {Function} cb - A non-optional callback to return the heights array to.\n * @returns {Array} heights - An array of heights of children within Equalizer container\n */\n getHeights(cb) {\n var heights = [];\n for(var i = 0, len = this.$watched.length; i < len; i++){\n this.$watched[i].style.height = 'auto';\n heights.push(this.$watched[i].offsetHeight);\n }\n cb(heights);\n }\n\n /**\n * Finds the outer heights of children contained within an Equalizer parent and returns them in an array\n * @param {Function} cb - A non-optional callback to return the heights array to.\n * @returns {Array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child\n */\n getHeightsByRow(cb) {\n var lastElTopOffset = (this.$watched.length ? this.$watched.first().offset().top : 0),\n groups = [],\n group = 0;\n //group by Row\n groups[group] = [];\n for(var i = 0, len = this.$watched.length; i < len; i++){\n this.$watched[i].style.height = 'auto';\n //maybe could use this.$watched[i].offsetTop\n var elOffsetTop = $(this.$watched[i]).offset().top;\n if (elOffsetTop !== lastElTopOffset) {\n group++;\n groups[group] = [];\n lastElTopOffset=elOffsetTop;\n }\n groups[group].push([this.$watched[i],this.$watched[i].offsetHeight]);\n }\n\n for (var j = 0, ln = groups.length; j < ln; j++) {\n var heights = $(groups[j]).map(function(){ return this[1]; }).get();\n var max = Math.max.apply(null, heights);\n groups[j].push(max);\n }\n cb(groups);\n }\n\n /**\n * Changes the CSS height property of each child in an Equalizer parent to match the tallest\n * @param {array} heights - An array of heights of children within Equalizer container\n * @fires Equalizer#preequalized\n * @fires Equalizer#postequalized\n */\n applyHeight(heights) {\n var max = Math.max.apply(null, heights);\n /**\n * Fires before the heights are applied\n * @event Equalizer#preequalized\n */\n this.$element.trigger('preequalized.zf.equalizer');\n\n this.$watched.css('height', max);\n\n /**\n * Fires when the heights have been applied\n * @event Equalizer#postequalized\n */\n this.$element.trigger('postequalized.zf.equalizer');\n }\n\n /**\n * Changes the CSS height property of each child in an Equalizer parent to match the tallest by row\n * @param {array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child\n * @fires Equalizer#preequalized\n * @fires Equalizer#preequalizedrow\n * @fires Equalizer#postequalizedrow\n * @fires Equalizer#postequalized\n */\n applyHeightByRow(groups) {\n /**\n * Fires before the heights are applied\n */\n this.$element.trigger('preequalized.zf.equalizer');\n for (var i = 0, len = groups.length; i < len ; i++) {\n var groupsILength = groups[i].length,\n max = groups[i][groupsILength - 1];\n if (groupsILength<=2) {\n $(groups[i][0][0]).css({'height':'auto'});\n continue;\n }\n /**\n * Fires before the heights per row are applied\n * @event Equalizer#preequalizedrow\n */\n this.$element.trigger('preequalizedrow.zf.equalizer');\n for (var j = 0, lenJ = (groupsILength-1); j < lenJ ; j++) {\n $(groups[i][j][0]).css({'height':max});\n }\n /**\n * Fires when the heights per row have been applied\n * @event Equalizer#postequalizedrow\n */\n this.$element.trigger('postequalizedrow.zf.equalizer');\n }\n /**\n * Fires when the heights have been applied\n */\n this.$element.trigger('postequalized.zf.equalizer');\n }\n\n /**\n * Destroys an instance of Equalizer.\n * @function\n */\n _destroy() {\n this._pauseEvents();\n this.$watched.css('height', 'auto');\n }\n}\n\n/**\n * Default settings for plugin\n */\nEqualizer.defaults = {\n /**\n * Enable height equalization when stacked on smaller screens.\n * @option\n * @type {boolean}\n * @default false\n */\n equalizeOnStack: false,\n /**\n * Enable height equalization row by row.\n * @option\n * @type {boolean}\n * @default false\n */\n equalizeByRow: false,\n /**\n * String representing the minimum breakpoint size the plugin should equalize heights on.\n * @option\n * @type {string}\n * @default ''\n */\n equalizeOn: ''\n};\n\nexport {Equalizer};\n","import $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Plugin } from './foundation.core.plugin';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Interchange module.\n * @module foundation.interchange\n * @requires foundation.util.mediaQuery\n */\n\nclass Interchange extends Plugin {\n /**\n * Creates a new instance of Interchange.\n * @class\n * @name Interchange\n * @fires Interchange#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Interchange.defaults, this.$element.data(), options);\n this.rules = [];\n this.currentPath = '';\n this.className = 'Interchange'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Interchange plugin and calls functions to get interchange functioning on load.\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n var id = this.$element[0].id || GetYoDigits(6, 'interchange');\n this.$element.attr({\n 'data-resize': id,\n 'id': id\n });\n\n this._parseOptions();\n this._addBreakpoints();\n this._generateRules();\n this._reflow();\n }\n\n /**\n * Initializes events for Interchange.\n * @function\n * @private\n */\n _events() {\n this.$element.off('resizeme.zf.trigger').on('resizeme.zf.trigger', () => this._reflow());\n }\n\n /**\n * Calls necessary functions to update Interchange upon DOM change\n * @function\n * @private\n */\n _reflow() {\n var match;\n\n // Iterate through each rule, but only save the last match\n for (var i in this.rules) {\n if(this.rules.hasOwnProperty(i)) {\n var rule = this.rules[i];\n if (window.matchMedia(rule.query).matches) {\n match = rule;\n }\n }\n }\n\n if (match) {\n this.replace(match.path);\n }\n }\n\n /**\n * Check options valifity and set defaults for:\n * - `data-interchange-type`: if set, enforce the type of replacement (auto, src, background or html)\n * @function\n * @private\n */\n _parseOptions() {\n var types = ['auto', 'src', 'background', 'html'];\n if (typeof this.options.type === 'undefined')\n this.options.type = 'auto';\n else if (types.indexOf(this.options.type) === -1) {\n console.warn(`Warning: invalid value \"${this.options.type}\" for Interchange option \"type\"`);\n this.options.type = 'auto';\n }\n }\n\n /**\n * Gets the Foundation breakpoints and adds them to the Interchange.SPECIAL_QUERIES object.\n * @function\n * @private\n */\n _addBreakpoints() {\n for (var i in MediaQuery.queries) {\n if (MediaQuery.queries.hasOwnProperty(i)) {\n var query = MediaQuery.queries[i];\n Interchange.SPECIAL_QUERIES[query.name] = query.value;\n }\n }\n }\n\n /**\n * Checks the Interchange element for the provided media query + content pairings\n * @function\n * @private\n * @returns {Array} scenarios - Array of objects that have 'mq' and 'path' keys with corresponding keys\n */\n _generateRules() {\n var rulesList = [];\n var rules;\n\n if (this.options.rules) {\n rules = this.options.rules;\n }\n else {\n rules = this.$element.data('interchange');\n }\n\n rules = typeof rules === 'string' ? rules.match(/\\[.*?, .*?\\]/g) : rules;\n\n for (var i in rules) {\n if(rules.hasOwnProperty(i)) {\n var rule = rules[i].slice(1, -1).split(', ');\n var path = rule.slice(0, -1).join('');\n var query = rule[rule.length - 1];\n\n if (Interchange.SPECIAL_QUERIES[query]) {\n query = Interchange.SPECIAL_QUERIES[query];\n }\n\n rulesList.push({\n path: path,\n query: query\n });\n }\n }\n\n this.rules = rulesList;\n }\n\n /**\n * Update the `src` property of an image, or change the HTML of a container, to the specified path.\n * @function\n * @param {String} path - Path to the image or HTML partial.\n * @fires Interchange#replaced\n */\n replace(path) {\n if (this.currentPath === path) return;\n\n var trigger = 'replaced.zf.interchange';\n\n var type = this.options.type;\n if (type === 'auto') {\n if (this.$element[0].nodeName === 'IMG')\n type = 'src';\n else if (path.match(/\\.(gif|jpe?g|png|svg|tiff)([?#].*)?/i))\n type = 'background';\n else\n type = 'html';\n }\n\n // Replacing images\n if (type === 'src') {\n this.$element.attr('src', path)\n .on('load', () => { this.currentPath = path; })\n .trigger(trigger);\n }\n // Replacing background images\n else if (type === 'background') {\n path = path.replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n this.$element\n .css({ 'background-image': 'url(' + path + ')' })\n .trigger(trigger);\n }\n // Replacing HTML\n else if (type === 'html') {\n $.get(path, (response) => {\n this.$element\n .html(response)\n .trigger(trigger);\n $(response).foundation();\n this.currentPath = path;\n });\n }\n\n /**\n * Fires when content in an Interchange element is done being loaded.\n * @event Interchange#replaced\n */\n // this.$element.trigger('replaced.zf.interchange');\n }\n\n /**\n * Destroys an instance of interchange.\n * @function\n */\n _destroy() {\n this.$element.off('resizeme.zf.trigger')\n }\n}\n\n/**\n * Default settings for plugin\n */\nInterchange.defaults = {\n /**\n * Rules to be applied to Interchange elements. Set with the `data-interchange` array notation.\n * @option\n * @type {?array}\n * @default null\n */\n rules: null,\n\n /**\n * Type of the responsive ressource to replace. It can take the following options:\n * - `auto` (default): choose the type according to the element tag or the ressource extension,\n * - `src`: replace the `[src]` attribute, recommended for images `<img>`.\n * - `background`: replace the `background-image` CSS property.\n * - `html`: replace the element content.\n * @option\n * @type {string}\n * @default 'auto'\n */\n type: 'auto'\n};\n\nInterchange.SPECIAL_QUERIES = {\n 'landscape': 'screen and (orientation: landscape)',\n 'portrait': 'screen and (orientation: portrait)',\n 'retina': 'only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)'\n};\n\nexport {Interchange};\n","import $ from 'jquery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * SmoothScroll module.\n * @module foundation.smoothScroll\n */\nclass SmoothScroll extends Plugin {\n /**\n * Creates a new instance of SmoothScroll.\n * @class\n * @name SmoothScroll\n * @fires SmoothScroll#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, SmoothScroll.defaults, this.$element.data(), options);\n this.className = 'SmoothScroll'; // ie9 back compat\n\n this._init();\n }\n\n /**\n * Initialize the SmoothScroll plugin\n * @private\n */\n _init() {\n const id = this.$element[0].id || GetYoDigits(6, 'smooth-scroll');\n this.$element.attr({ id });\n\n this._events();\n }\n\n /**\n * Initializes events for SmoothScroll.\n * @private\n */\n _events() {\n this._linkClickListener = this._handleLinkClick.bind(this);\n this.$element.on('click.zf.smoothScroll', this._linkClickListener);\n this.$element.on('click.zf.smoothScroll', 'a[href^=\"#\"]', this._linkClickListener);\n }\n\n /**\n * Handle the given event to smoothly scroll to the anchor pointed by the event target.\n * @param {*} e - event\n * @function\n * @private\n */\n _handleLinkClick(e) {\n // Follow the link if it does not point to an anchor.\n if (!$(e.currentTarget).is('a[href^=\"#\"]')) return;\n\n const arrival = e.currentTarget.getAttribute('href');\n\n this._inTransition = true;\n\n SmoothScroll.scrollToLoc(arrival, this.options, () => {\n this._inTransition = false;\n });\n\n e.preventDefault();\n };\n\n /**\n * Function to scroll to a given location on the page.\n * @param {String} loc - A properly formatted jQuery id selector. Example: '#foo'\n * @param {Object} options - The options to use.\n * @param {Function} callback - The callback function.\n * @static\n * @function\n */\n static scrollToLoc(loc, options = SmoothScroll.defaults, callback) {\n const $loc = $(loc);\n\n // Do nothing if target does not exist to prevent errors\n if (!$loc.length) return false;\n\n var scrollPos = Math.round($loc.offset().top - options.threshold / 2 - options.offset);\n\n $('html, body').stop(true).animate(\n { scrollTop: scrollPos },\n options.animationDuration,\n options.animationEasing,\n () => {\n if (typeof callback === 'function'){\n callback();\n }\n }\n );\n }\n\n /**\n * Destroys the SmoothScroll instance.\n * @function\n */\n _destroy() {\n this.$element.off('click.zf.smoothScroll', this._linkClickListener)\n this.$element.off('click.zf.smoothScroll', 'a[href^=\"#\"]', this._linkClickListener);\n }\n}\n\n/**\n * Default settings for plugin.\n */\nSmoothScroll.defaults = {\n /**\n * Amount of time, in ms, the animated scrolling should take between locations.\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @default 'linear'\n * @see {@link https://api.jquery.com/animate|Jquery animate}\n */\n animationEasing: 'linear',\n /**\n * Number of pixels to use as a marker for location changes.\n * @option\n * @type {number}\n * @default 50\n */\n threshold: 50,\n /**\n * Number of pixels to offset the scroll of the page on item click if using a sticky nav bar.\n * @option\n * @type {number}\n * @default 0\n */\n offset: 0\n}\n\nexport {SmoothScroll}\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { SmoothScroll } from './foundation.smoothScroll';\n\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Magellan module.\n * @module foundation.magellan\n * @requires foundation.smoothScroll\n * @requires foundation.util.triggers\n */\n\nclass Magellan extends Plugin {\n /**\n * Creates a new instance of Magellan.\n * @class\n * @name Magellan\n * @fires Magellan#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Magellan.defaults, this.$element.data(), options);\n this.className = 'Magellan'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n this.calcPoints();\n }\n\n /**\n * Initializes the Magellan plugin and calls functions to get equalizer functioning on load.\n * @private\n */\n _init() {\n var id = this.$element[0].id || GetYoDigits(6, 'magellan');\n this.$targets = $('[data-magellan-target]');\n this.$links = this.$element.find('a');\n this.$element.attr({\n 'data-resize': id,\n 'data-scroll': id,\n 'id': id\n });\n this.$active = $();\n this.scrollPos = parseInt(window.pageYOffset, 10);\n\n this._events();\n }\n\n /**\n * Calculates an array of pixel values that are the demarcation lines between locations on the page.\n * Can be invoked if new elements are added or the size of a location changes.\n * @function\n */\n calcPoints() {\n var _this = this,\n body = document.body,\n html = document.documentElement;\n\n this.points = [];\n this.winHeight = Math.round(Math.max(window.innerHeight, html.clientHeight));\n this.docHeight = Math.round(Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight));\n\n this.$targets.each(function(){\n var $tar = $(this),\n pt = Math.round($tar.offset().top - _this.options.threshold);\n $tar.targetPoint = pt;\n _this.points.push(pt);\n });\n }\n\n /**\n * Initializes events for Magellan.\n * @private\n */\n _events() {\n var _this = this;\n\n $(window).one('load', function(){\n if(_this.options.deepLinking){\n if(location.hash){\n _this.scrollToLoc(location.hash);\n }\n }\n _this.calcPoints();\n _this._updateActive();\n });\n\n _this.onLoadListener = onLoad($(window), function () {\n _this.$element\n .on({\n 'resizeme.zf.trigger': _this.reflow.bind(_this),\n 'scrollme.zf.trigger': _this._updateActive.bind(_this)\n })\n .on('click.zf.magellan', 'a[href^=\"#\"]', function (e) {\n e.preventDefault();\n var arrival = this.getAttribute('href');\n _this.scrollToLoc(arrival);\n });\n });\n\n this._deepLinkScroll = function() {\n if(_this.options.deepLinking) {\n _this.scrollToLoc(window.location.hash);\n }\n };\n\n $(window).on('hashchange', this._deepLinkScroll);\n }\n\n /**\n * Function to scroll to a given location on the page.\n * @param {String} loc - a properly formatted jQuery id selector. Example: '#foo'\n * @function\n */\n scrollToLoc(loc) {\n this._inTransition = true;\n var _this = this;\n\n var options = {\n animationEasing: this.options.animationEasing,\n animationDuration: this.options.animationDuration,\n threshold: this.options.threshold,\n offset: this.options.offset\n };\n\n SmoothScroll.scrollToLoc(loc, options, function() {\n _this._inTransition = false;\n })\n }\n\n /**\n * Calls necessary functions to update Magellan upon DOM change\n * @function\n */\n reflow() {\n this.calcPoints();\n this._updateActive();\n }\n\n /**\n * Updates the visibility of an active location link, and updates the url hash for the page, if deepLinking enabled.\n * @private\n * @function\n * @fires Magellan#update\n */\n _updateActive(/*evt, elem, scrollPos*/) {\n if(this._inTransition) return;\n\n const newScrollPos = parseInt(window.pageYOffset, 10);\n const isScrollingUp = this.scrollPos > newScrollPos;\n this.scrollPos = newScrollPos;\n\n let activeIdx;\n // Before the first point: no link\n if(newScrollPos < this.points[0] - this.options.offset - (isScrollingUp ? this.options.threshold : 0)){ /* do nothing */ }\n // At the bottom of the page: last link\n else if(newScrollPos + this.winHeight === this.docHeight){ activeIdx = this.points.length - 1; }\n // Otherwhise, use the last visible link\n else{\n const visibleLinks = this.points.filter((p) => {\n return (p - this.options.offset - (isScrollingUp ? this.options.threshold : 0)) <= newScrollPos;\n });\n activeIdx = visibleLinks.length ? visibleLinks.length - 1 : 0;\n }\n\n // Get the new active link\n const $oldActive = this.$active;\n let activeHash = '';\n if(typeof activeIdx !== 'undefined'){\n this.$active = this.$links.filter('[href=\"#' + this.$targets.eq(activeIdx).data('magellan-target') + '\"]');\n if (this.$active.length) activeHash = this.$active[0].getAttribute('href');\n }else{\n this.$active = $();\n }\n const isNewActive = !(!this.$active.length && !$oldActive.length) && !this.$active.is($oldActive);\n const isNewHash = activeHash !== window.location.hash;\n\n // Update the active link element\n if(isNewActive) {\n $oldActive.removeClass(this.options.activeClass);\n this.$active.addClass(this.options.activeClass);\n }\n\n // Update the hash (it may have changed with the same active link)\n if(this.options.deepLinking && isNewHash){\n if(window.history.pushState){\n // Set or remove the hash (see: https://stackoverflow.com/a/5298684/4317384\n const url = activeHash ? activeHash : window.location.pathname + window.location.search;\n if(this.options.updateHistory){\n window.history.pushState({}, '', url);\n }else{\n window.history.replaceState({}, '', url);\n }\n }else{\n window.location.hash = activeHash;\n }\n }\n\n if (isNewActive) {\n /**\n * Fires when magellan is finished updating to the new active element.\n * @event Magellan#update\n */\n \tthis.$element.trigger('update.zf.magellan', [this.$active]);\n\t }\n }\n\n /**\n * Destroys an instance of Magellan and resets the url of the window.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.trigger .zf.magellan')\n .find(`.${this.options.activeClass}`).removeClass(this.options.activeClass);\n\n if(this.options.deepLinking){\n var hash = this.$active[0].getAttribute('href');\n window.location.hash.replace(hash, '');\n }\n\n $(window).off('hashchange', this._deepLinkScroll)\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n }\n}\n\n/**\n * Default settings for plugin\n */\nMagellan.defaults = {\n /**\n * Amount of time, in ms, the animated scrolling should take between locations.\n * @option\n * @type {number}\n * @default 500\n */\n animationDuration: 500,\n /**\n * Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`.\n * @option\n * @type {string}\n * @default 'linear'\n * @see {@link https://api.jquery.com/animate|Jquery animate}\n */\n animationEasing: 'linear',\n /**\n * Number of pixels to use as a marker for location changes.\n * @option\n * @type {number}\n * @default 50\n */\n threshold: 50,\n /**\n * Class applied to the active locations link on the magellan container.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n activeClass: 'is-active',\n /**\n * Allows the script to manipulate the url of the current page, and if supported, alter the history.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinking: false,\n /**\n * Update the browser history with the active link, if deep linking is enabled.\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false,\n /**\n * Number of pixels to offset the scroll of the page on item click if using a sticky nav bar.\n * @option\n * @type {number}\n * @default 0\n */\n offset: 0\n}\n\nexport {Magellan};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, transitionend, RegExpEscape } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { MediaQuery } from './foundation.util.mediaQuery';\n\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * OffCanvas module.\n * @module foundation.offCanvas\n * @requires foundation.util.keyboard\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.triggers\n */\n\nclass OffCanvas extends Plugin {\n /**\n * Creates a new instance of an off-canvas wrapper.\n * @class\n * @name OffCanvas\n * @fires OffCanvas#init\n * @param {Object} element - jQuery object to initialize.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.className = 'OffCanvas'; // ie9 back compat\n this.$element = element;\n this.options = $.extend({}, OffCanvas.defaults, this.$element.data(), options);\n this.contentClasses = { base: [], reveal: [] };\n this.$lastTrigger = $();\n this.$triggers = $();\n this.position = 'left';\n this.$content = $();\n this.nested = !!(this.options.nested);\n this.$sticky = $();\n this.isInCanvas = false;\n\n // Defines the CSS transition/position classes of the off-canvas content container.\n $(['push', 'overlap']).each((index, val) => {\n this.contentClasses.base.push('has-transition-'+val);\n });\n $(['left', 'right', 'top', 'bottom']).each((index, val) => {\n this.contentClasses.base.push('has-position-'+val);\n this.contentClasses.reveal.push('has-reveal-'+val);\n });\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n MediaQuery._init();\n\n this._init();\n this._events();\n\n Keyboard.register('OffCanvas', {\n 'ESCAPE': 'close'\n });\n\n }\n\n /**\n * Initializes the off-canvas wrapper by adding the exit overlay (if needed).\n * @function\n * @private\n */\n _init() {\n var id = this.$element.attr('id');\n\n this.$element.attr('aria-hidden', 'true');\n\n // Find off-canvas content, either by ID (if specified), by siblings or by closest selector (fallback)\n if (this.options.contentId) {\n this.$content = $('#'+this.options.contentId);\n } else if (this.$element.siblings('[data-off-canvas-content]').length) {\n this.$content = this.$element.siblings('[data-off-canvas-content]').first();\n } else {\n this.$content = this.$element.closest('[data-off-canvas-content]').first();\n }\n\n if (!this.options.contentId) {\n // Assume that the off-canvas element is nested if it isn't a sibling of the content\n this.nested = this.$element.siblings('[data-off-canvas-content]').length === 0;\n\n } else if (this.options.contentId && this.options.nested === null) {\n // Warning if using content ID without setting the nested option\n // Once the element is nested it is required to work properly in this case\n console.warn('Remember to use the nested option if using the content ID option!');\n }\n\n if (this.nested === true) {\n // Force transition overlap if nested\n this.options.transition = 'overlap';\n // Remove appropriate classes if already assigned in markup\n this.$element.removeClass('is-transition-push');\n }\n\n this.$element.addClass(`is-transition-${this.options.transition} is-closed`);\n\n // Find triggers that affect this element and add aria-expanded to them\n this.$triggers = $(document)\n .find('[data-open=\"'+id+'\"], [data-close=\"'+id+'\"], [data-toggle=\"'+id+'\"]')\n .attr('aria-expanded', 'false')\n .attr('aria-controls', id);\n\n // Get position by checking for related CSS class\n this.position = this.$element.is('.position-left, .position-top, .position-right, .position-bottom') ? this.$element.attr('class').match(/position\\-(left|top|right|bottom)/)[1] : this.position;\n\n // Add an overlay over the content if necessary\n if (this.options.contentOverlay === true) {\n var overlay = document.createElement('div');\n var overlayPosition = $(this.$element).css(\"position\") === 'fixed' ? 'is-overlay-fixed' : 'is-overlay-absolute';\n overlay.setAttribute('class', 'js-off-canvas-overlay ' + overlayPosition);\n this.$overlay = $(overlay);\n if(overlayPosition === 'is-overlay-fixed') {\n $(this.$overlay).insertAfter(this.$element);\n } else {\n this.$content.append(this.$overlay);\n }\n }\n\n // Get the revealOn option from the class.\n var revealOnRegExp = new RegExp(RegExpEscape(this.options.revealClass) + '([^\\\\s]+)', 'g');\n var revealOnClass = revealOnRegExp.exec(this.$element[0].className);\n if (revealOnClass) {\n this.options.isRevealed = true;\n this.options.revealOn = this.options.revealOn || revealOnClass[1];\n }\n\n // Ensure the `reveal-on-*` class is set.\n if (this.options.isRevealed === true && this.options.revealOn) {\n this.$element.first().addClass(`${this.options.revealClass}${this.options.revealOn}`);\n this._setMQChecker();\n }\n\n if (this.options.transitionTime) {\n this.$element.css('transition-duration', this.options.transitionTime);\n }\n\n // Find fixed elements that should stay fixed while off-canvas is opened\n this.$sticky = this.$content.find('[data-off-canvas-sticky]');\n if (this.$sticky.length > 0 && this.options.transition === 'push') {\n // If there's at least one match force contentScroll:false because the absolute top value doesn't get recalculated on scroll\n // Limit to push transition since there's no transform scope for overlap\n this.options.contentScroll = false;\n }\n\n let inCanvasFor = this.$element.attr('class').match(/\\bin-canvas-for-(\\w+)/);\n if (inCanvasFor && inCanvasFor.length === 2) {\n // Set `inCanvasOn` option if found in-canvas-for-[BREAKPONT] CSS class\n this.options.inCanvasOn = inCanvasFor[1];\n } else if (this.options.inCanvasOn) {\n // Ensure the CSS class is set\n this.$element.addClass(`in-canvas-for-${this.options.inCanvasOn}`);\n }\n\n if (this.options.inCanvasOn) {\n this._checkInCanvas();\n }\n\n // Initally remove all transition/position CSS classes from off-canvas content container.\n this._removeContentClasses();\n }\n\n /**\n * Adds event handlers to the off-canvas wrapper and the exit overlay.\n * @function\n * @private\n */\n _events() {\n this.$element.off('.zf.trigger .zf.offCanvas').on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': this.close.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'keydown.zf.offCanvas': this._handleKeyboard.bind(this)\n });\n\n if (this.options.closeOnClick === true) {\n var $target = this.options.contentOverlay ? this.$overlay : this.$content;\n $target.on({'click.zf.offCanvas': this.close.bind(this)});\n }\n\n if (this.options.inCanvasOn) {\n $(window).on('changed.zf.mediaquery', () => {\n this._checkInCanvas();\n });\n }\n\n }\n\n /**\n * Applies event listener for elements that will reveal at certain breakpoints.\n * @private\n */\n _setMQChecker() {\n var _this = this;\n\n this.onLoadListener = onLoad($(window), function () {\n if (MediaQuery.atLeast(_this.options.revealOn)) {\n _this.reveal(true);\n }\n });\n\n $(window).on('changed.zf.mediaquery', function () {\n if (MediaQuery.atLeast(_this.options.revealOn)) {\n _this.reveal(true);\n } else {\n _this.reveal(false);\n }\n });\n }\n\n /**\n * Checks if InCanvas on current breakpoint and adjust off-canvas accordingly\n * @private\n */\n _checkInCanvas() {\n this.isInCanvas = MediaQuery.atLeast(this.options.inCanvasOn);\n if (this.isInCanvas === true) {\n this.close();\n }\n }\n\n /**\n * Removes the CSS transition/position classes of the off-canvas content container.\n * Removing the classes is important when another off-canvas gets opened that uses the same content container.\n * @param {Boolean} hasReveal - true if related off-canvas element is revealed.\n * @private\n */\n _removeContentClasses(hasReveal) {\n if (typeof hasReveal !== 'boolean') {\n this.$content.removeClass(this.contentClasses.base.join(' '));\n } else if (hasReveal === false) {\n this.$content.removeClass(`has-reveal-${this.position}`);\n }\n }\n\n /**\n * Adds the CSS transition/position classes of the off-canvas content container, based on the opening off-canvas element.\n * Beforehand any transition/position class gets removed.\n * @param {Boolean} hasReveal - true if related off-canvas element is revealed.\n * @private\n */\n _addContentClasses(hasReveal) {\n this._removeContentClasses(hasReveal);\n if (typeof hasReveal !== 'boolean') {\n this.$content.addClass(`has-transition-${this.options.transition} has-position-${this.position}`);\n } else if (hasReveal === true) {\n this.$content.addClass(`has-reveal-${this.position}`);\n }\n }\n\n /**\n * Preserves the fixed behavior of sticky elements on opening an off-canvas with push transition.\n * Since the off-canvas container has got a transform scope in such a case, it is done by calculating position absolute values.\n * @private\n */\n _fixStickyElements() {\n this.$sticky.each((_, el) => {\n const $el = $(el);\n\n // If sticky element is currently fixed, adjust its top value to match absolute position due to transform scope\n // Limit to push transition because postion:fixed works without problems for overlap (no transform scope)\n if ($el.css('position') === 'fixed') {\n\n // Save current inline styling to restore it if undoing the absolute fixing\n let topVal = parseInt($el.css('top'), 10);\n $el.data('offCanvasSticky', { top: topVal });\n\n let absoluteTopVal = $(document).scrollTop() + topVal;\n $el.css({ top: `${absoluteTopVal}px`, width: '100%', transition: 'none' });\n }\n });\n }\n\n /**\n * Restores the original fixed styling of sticky elements after having closed an off-canvas that got pseudo fixed beforehand.\n * This reverts the changes of _fixStickyElements()\n * @private\n */\n _unfixStickyElements() {\n this.$sticky.each((_, el) => {\n const $el = $(el);\n let stickyData = $el.data('offCanvasSticky');\n\n // If sticky element has got data object with prior values (meaning it was originally fixed) restore these values once off-canvas is closed\n if (typeof stickyData === 'object') {\n $el.css({ top: `${stickyData.top}px`, width: '', transition: '' })\n $el.data('offCanvasSticky', '');\n }\n });\n }\n\n /**\n * Handles the revealing/hiding the off-canvas at breakpoints, not the same as open.\n * @param {Boolean} isRevealed - true if element should be revealed.\n * @function\n */\n reveal(isRevealed) {\n if (isRevealed) {\n this.close();\n this.isRevealed = true;\n this.$element.attr('aria-hidden', 'false');\n this.$element.off('open.zf.trigger toggle.zf.trigger');\n this.$element.removeClass('is-closed');\n } else {\n this.isRevealed = false;\n this.$element.attr('aria-hidden', 'true');\n this.$element.off('open.zf.trigger toggle.zf.trigger').on({\n 'open.zf.trigger': this.open.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this)\n });\n this.$element.addClass('is-closed');\n }\n this._addContentClasses(isRevealed);\n }\n\n /**\n * Stops scrolling of the body when OffCanvas is open on mobile Safari and other troublesome browsers.\n * @function\n * @private\n */\n _stopScrolling() {\n return false;\n }\n\n /**\n * Save current finger y-position\n * @param event\n * @private\n */\n _recordScrollable(event) {\n const elem = this;\n elem.lastY = event.touches[0].pageY;\n }\n\n /**\n * Prevent further scrolling when it hits the edges\n * @param event\n * @private\n */\n _preventDefaultAtEdges(event) {\n const elem = this;\n const _this = event.data;\n const delta = elem.lastY - event.touches[0].pageY;\n elem.lastY = event.touches[0].pageY;\n\n if (!_this._canScroll(delta, elem)) {\n event.preventDefault();\n }\n }\n\n /**\n * Handle continuous scrolling of scrollbox\n * Don't bubble up to _preventDefaultAtEdges\n * @param event\n * @private\n */\n _scrollboxTouchMoved(event) {\n const elem = this;\n const _this = event.data;\n const parent = elem.closest('[data-off-canvas], [data-off-canvas-scrollbox-outer]');\n const delta = elem.lastY - event.touches[0].pageY;\n parent.lastY = elem.lastY = event.touches[0].pageY;\n\n event.stopPropagation();\n\n if (!_this._canScroll(delta, elem)) {\n if (!_this._canScroll(delta, parent)) {\n event.preventDefault();\n } else {\n parent.scrollTop += delta;\n }\n }\n }\n\n /**\n * Detect possibility of scrolling\n * @param delta\n * @param elem\n * @returns boolean\n * @private\n */\n _canScroll(delta, elem) {\n const up = delta < 0;\n const down = delta > 0;\n const allowUp = elem.scrollTop > 0;\n const allowDown = elem.scrollTop < elem.scrollHeight - elem.clientHeight;\n return up && allowUp || down && allowDown;\n }\n\n /**\n * Opens the off-canvas menu.\n * @function\n * @param {Object} event - Event object passed from listener.\n * @param {jQuery} trigger - element that triggered the off-canvas to open.\n * @fires OffCanvas#opened\n * @todo also trigger 'open' event?\n */\n open(event, trigger) {\n if (this.$element.hasClass('is-open') || this.isRevealed || this.isInCanvas) { return; }\n var _this = this;\n\n if (trigger) {\n this.$lastTrigger = trigger;\n }\n\n if (this.options.forceTo === 'top') {\n window.scrollTo(0, 0);\n } else if (this.options.forceTo === 'bottom') {\n window.scrollTo(0,document.body.scrollHeight);\n }\n\n if (this.options.transitionTime && this.options.transition !== 'overlap') {\n this.$element.siblings('[data-off-canvas-content]').css('transition-duration', this.options.transitionTime);\n } else {\n this.$element.siblings('[data-off-canvas-content]').css('transition-duration', '');\n }\n\n this.$element.addClass('is-open').removeClass('is-closed');\n\n this.$triggers.attr('aria-expanded', 'true');\n this.$element.attr('aria-hidden', 'false');\n\n this.$content.addClass('is-open-' + this.position);\n\n // If `contentScroll` is set to false, add class and disable scrolling on touch devices.\n if (this.options.contentScroll === false) {\n $('body').addClass('is-off-canvas-open').on('touchmove', this._stopScrolling);\n this.$element.on('touchstart', this._recordScrollable);\n this.$element.on('touchmove', this, this._preventDefaultAtEdges);\n this.$element.on('touchstart', '[data-off-canvas-scrollbox]', this._recordScrollable);\n this.$element.on('touchmove', '[data-off-canvas-scrollbox]', this, this._scrollboxTouchMoved);\n }\n\n if (this.options.contentOverlay === true) {\n this.$overlay.addClass('is-visible');\n }\n\n if (this.options.closeOnClick === true && this.options.contentOverlay === true) {\n this.$overlay.addClass('is-closable');\n }\n\n if (this.options.autoFocus === true) {\n this.$element.one(transitionend(this.$element), function() {\n if (!_this.$element.hasClass('is-open')) {\n return; // exit if prematurely closed\n }\n var canvasFocus = _this.$element.find('[data-autofocus]');\n if (canvasFocus.length) {\n canvasFocus.eq(0).focus();\n } else {\n _this.$element.find('a, button').eq(0).focus();\n }\n });\n }\n\n if (this.options.trapFocus === true) {\n this.$content.attr('tabindex', '-1');\n Keyboard.trapFocus(this.$element);\n }\n\n if (this.options.transition === 'push') {\n this._fixStickyElements();\n }\n\n this._addContentClasses();\n\n /**\n * Fires when the off-canvas menu opens.\n * @event OffCanvas#opened\n */\n this.$element.trigger('opened.zf.offCanvas');\n\n /**\n * Fires when the off-canvas menu open transition is done.\n * @event OffCanvas#openedEnd\n */\n this.$element.one(transitionend(this.$element), () => {\n this.$element.trigger('openedEnd.zf.offCanvas');\n });\n }\n\n /**\n * Closes the off-canvas menu.\n * @function\n * @param {Function} cb - optional cb to fire after closure.\n * @fires OffCanvas#close\n * @fires OffCanvas#closed\n */\n close() {\n if (!this.$element.hasClass('is-open') || this.isRevealed) { return; }\n\n /**\n * Fires when the off-canvas menu closes.\n * @event OffCanvas#close\n */\n this.$element.trigger('close.zf.offCanvas');\n\n this.$element.removeClass('is-open');\n\n this.$element.attr('aria-hidden', 'true');\n\n this.$content.removeClass('is-open-left is-open-top is-open-right is-open-bottom');\n\n if (this.options.contentOverlay === true) {\n this.$overlay.removeClass('is-visible');\n }\n\n if (this.options.closeOnClick === true && this.options.contentOverlay === true) {\n this.$overlay.removeClass('is-closable');\n }\n\n this.$triggers.attr('aria-expanded', 'false');\n\n\n // Listen to transitionEnd: add class, re-enable scrolling and release focus when done.\n this.$element.one(transitionend(this.$element), () => {\n\n this.$element.addClass('is-closed');\n this._removeContentClasses();\n\n if (this.options.transition === 'push') {\n this._unfixStickyElements();\n }\n\n // If `contentScroll` is set to false, remove class and re-enable scrolling on touch devices.\n if (this.options.contentScroll === false) {\n $('body').removeClass('is-off-canvas-open').off('touchmove', this._stopScrolling);\n this.$element.off('touchstart', this._recordScrollable);\n this.$element.off('touchmove', this._preventDefaultAtEdges);\n this.$element.off('touchstart', '[data-off-canvas-scrollbox]', this._recordScrollable);\n this.$element.off('touchmove', '[data-off-canvas-scrollbox]', this._scrollboxTouchMoved);\n }\n\n if (this.options.trapFocus === true) {\n this.$content.removeAttr('tabindex');\n Keyboard.releaseFocus(this.$element);\n }\n\n /**\n * Fires when the off-canvas menu close transition is done.\n * @event OffCanvas#closed\n */\n this.$element.trigger('closed.zf.offCanvas');\n });\n }\n\n /**\n * Toggles the off-canvas menu open or closed.\n * @function\n * @param {Object} event - Event object passed from listener.\n * @param {jQuery} trigger - element that triggered the off-canvas to open.\n */\n toggle(event, trigger) {\n if (this.$element.hasClass('is-open')) {\n this.close(event, trigger);\n }\n else {\n this.open(event, trigger);\n }\n }\n\n /**\n * Handles keyboard input when detected. When the escape key is pressed, the off-canvas menu closes, and focus is restored to the element that opened the menu.\n * @function\n * @private\n */\n _handleKeyboard(e) {\n Keyboard.handleKey(e, 'OffCanvas', {\n close: () => {\n this.close();\n this.$lastTrigger.focus();\n return true;\n },\n handled: () => {\n e.preventDefault();\n }\n });\n }\n\n /**\n * Destroys the OffCanvas plugin.\n * @function\n */\n _destroy() {\n this.close();\n this.$element.off('.zf.trigger .zf.offCanvas');\n this.$overlay.off('.zf.offCanvas');\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n }\n}\n\nOffCanvas.defaults = {\n /**\n * Allow the user to click outside of the menu to close it.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n\n /**\n * Adds an overlay on top of `[data-off-canvas-content]`.\n * @option\n * @type {boolean}\n * @default true\n */\n contentOverlay: true,\n\n /**\n * Target an off-canvas content container by ID that may be placed anywhere. If null the closest content container will be taken.\n * @option\n * @type {?string}\n * @default null\n */\n contentId: null,\n\n /**\n * Define the off-canvas element is nested in an off-canvas content. This is required when using the contentId option for a nested element.\n * @option\n * @type {boolean}\n * @default null\n */\n nested: null,\n\n /**\n * Enable/disable scrolling of the main content when an off canvas panel is open.\n * @option\n * @type {boolean}\n * @default true\n */\n contentScroll: true,\n\n /**\n * Amount of time the open and close transition requires, including the appropriate milliseconds (`ms`) or seconds (`s`) unit (e.g. `500ms`, `.75s`) If none selected, pulls from body style.\n * @option\n * @type {string}\n * @default null\n */\n transitionTime: null,\n\n /**\n * Type of transition for the OffCanvas menu. Options are 'push', 'detached' or 'slide'.\n * @option\n * @type {string}\n * @default push\n */\n transition: 'push',\n\n /**\n * Force the page to scroll to top or bottom on open.\n * @option\n * @type {?string}\n * @default null\n */\n forceTo: null,\n\n /**\n * Allow the OffCanvas to remain open for certain breakpoints.\n * @option\n * @type {boolean}\n * @default false\n */\n isRevealed: false,\n\n /**\n * Breakpoint at which to reveal. JS will use a RegExp to target standard classes, if changing classnames, pass your class with the `revealClass` option.\n * @option\n * @type {?string}\n * @default null\n */\n revealOn: null,\n\n /**\n * Breakpoint at which the off-canvas gets moved into canvas content and acts as regular page element.\n * @option\n * @type {?string}\n * @default null\n */\n inCanvasOn: null,\n\n /**\n * Force focus to the offcanvas on open. If true, will focus the opening trigger on close.\n * @option\n * @type {boolean}\n * @default true\n */\n autoFocus: true,\n\n /**\n * Class used to force an OffCanvas to remain open. Foundation defaults for this are `reveal-for-large` & `reveal-for-medium`.\n * @option\n * @type {string}\n * @default reveal-for-\n * @todo improve the regex testing for this.\n */\n revealClass: 'reveal-for-',\n\n /**\n * Triggers optional focus trapping when opening an OffCanvas. Sets tabindex of [data-off-canvas-content] to -1 for accessibility purposes.\n * @option\n * @type {boolean}\n * @default false\n */\n trapFocus: false\n}\n\nexport {OffCanvas};\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Motion } from './foundation.util.motion';\nimport { Timer } from './foundation.util.timer';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\nimport { Touch } from './foundation.util.touch'\n\n\n/**\n * Orbit module.\n * @module foundation.orbit\n * @requires foundation.util.keyboard\n * @requires foundation.util.motion\n * @requires foundation.util.timer\n * @requires foundation.util.imageLoader\n * @requires foundation.util.touch\n */\n\nclass Orbit extends Plugin {\n /**\n * Creates a new instance of an orbit carousel.\n * @class\n * @name Orbit\n * @param {jQuery} element - jQuery object to make into an Orbit Carousel.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options){\n this.$element = element;\n this.options = $.extend({}, Orbit.defaults, this.$element.data(), options);\n this.className = 'Orbit'; // ie9 back compat\n\n Touch.init($); // Touch init is idempotent, we just need to make sure it's initialied.\n\n this._init();\n\n Keyboard.register('Orbit', {\n 'ltr': {\n 'ARROW_RIGHT': 'next',\n 'ARROW_LEFT': 'previous'\n },\n 'rtl': {\n 'ARROW_LEFT': 'next',\n 'ARROW_RIGHT': 'previous'\n }\n });\n }\n\n /**\n * Initializes the plugin by creating jQuery collections, setting attributes, and starting the animation.\n * @function\n * @private\n */\n _init() {\n // @TODO: consider discussion on PR #9278 about DOM pollution by changeSlide\n this._reset();\n\n this.$wrapper = this.$element.find(`.${this.options.containerClass}`);\n this.$slides = this.$element.find(`.${this.options.slideClass}`);\n\n var $images = this.$element.find('img'),\n initActive = this.$slides.filter('.is-active'),\n id = this.$element[0].id || GetYoDigits(6, 'orbit');\n\n this.$element.attr({\n 'data-resize': id,\n 'id': id\n });\n\n if (!initActive.length) {\n this.$slides.eq(0).addClass('is-active');\n }\n\n if (!this.options.useMUI) {\n this.$slides.addClass('no-motionui');\n }\n\n if ($images.length) {\n onImagesLoaded($images, this._prepareForOrbit.bind(this));\n } else {\n this._prepareForOrbit();//hehe\n }\n\n if (this.options.bullets) {\n this._loadBullets();\n }\n\n this._events();\n\n if (this.options.autoPlay && this.$slides.length > 1) {\n this.geoSync();\n }\n\n if (this.options.accessible) { // allow wrapper to be focusable to enable arrow navigation\n this.$wrapper.attr('tabindex', 0);\n }\n }\n\n /**\n * Creates a jQuery collection of bullets, if they are being used.\n * @function\n * @private\n */\n _loadBullets() {\n this.$bullets = this.$element.find(`.${this.options.boxOfBullets}`).find('button');\n }\n\n /**\n * Sets a `timer` object on the orbit, and starts the counter for the next slide.\n * @function\n */\n geoSync() {\n var _this = this;\n this.timer = new Timer(\n this.$element,\n {\n duration: this.options.timerDelay,\n infinite: false\n },\n function() {\n _this.changeSlide(true);\n });\n this.timer.start();\n }\n\n /**\n * Sets wrapper and slide heights for the orbit.\n * @function\n * @private\n */\n _prepareForOrbit() {\n this._setWrapperHeight();\n }\n\n /**\n * Calulates the height of each slide in the collection, and uses the tallest one for the wrapper height.\n * @function\n * @private\n * @param {Function} cb - a callback function to fire when complete.\n */\n _setWrapperHeight(cb) {//rewrite this to `for` loop\n var max = 0, temp, counter = 0, _this = this;\n\n this.$slides.each(function() {\n temp = this.getBoundingClientRect().height;\n $(this).attr('data-slide', counter);\n\n // hide all slides but the active one\n if (!/mui/g.test($(this)[0].className) && _this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) {\n $(this).css({'display': 'none'});\n }\n max = temp > max ? temp : max;\n counter++;\n });\n\n if (counter === this.$slides.length) {\n this.$wrapper.css({'height': max}); //only change the wrapper height property once.\n if(cb) {cb(max);} //fire callback with max height dimension.\n }\n }\n\n /**\n * Sets the max-height of each slide.\n * @function\n * @private\n */\n _setSlideHeight(height) {\n this.$slides.each(function() {\n $(this).css('max-height', height);\n });\n }\n\n /**\n * Adds event listeners to basically everything within the element.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n //***************************************\n //**Now using custom event - thanks to:**\n //** Yohai Ararat of Toronto **\n //***************************************\n //\n this.$element.off('.resizeme.zf.trigger').on({\n 'resizeme.zf.trigger': this._prepareForOrbit.bind(this)\n })\n if (this.$slides.length > 1) {\n\n if (this.options.swipe) {\n this.$slides.off('swipeleft.zf.orbit swiperight.zf.orbit')\n .on('swipeleft.zf.orbit', function(e){\n e.preventDefault();\n _this.changeSlide(true);\n }).on('swiperight.zf.orbit', function(e){\n e.preventDefault();\n _this.changeSlide(false);\n });\n }\n //***************************************\n\n if (this.options.autoPlay) {\n this.$slides.on('click.zf.orbit', function() {\n _this.$element.data('clickedOn', _this.$element.data('clickedOn') ? false : true);\n _this.timer[_this.$element.data('clickedOn') ? 'pause' : 'start']();\n });\n\n if (this.options.pauseOnHover) {\n this.$element.on('mouseenter.zf.orbit', function() {\n _this.timer.pause();\n }).on('mouseleave.zf.orbit', function() {\n if (!_this.$element.data('clickedOn')) {\n _this.timer.start();\n }\n });\n }\n }\n\n if (this.options.navButtons) {\n var $controls = this.$element.find(`.${this.options.nextClass}, .${this.options.prevClass}`);\n $controls.attr('tabindex', 0)\n //also need to handle enter/return and spacebar key presses\n .on('click.zf.orbit touchend.zf.orbit', function(e){\n\t e.preventDefault();\n _this.changeSlide($(this).hasClass(_this.options.nextClass));\n });\n }\n\n if (this.options.bullets) {\n this.$bullets.on('click.zf.orbit touchend.zf.orbit', function() {\n if (/is-active/g.test(this.className)) { return false; }//if this is active, kick out of function.\n var idx = $(this).data('slide'),\n ltr = idx > _this.$slides.filter('.is-active').data('slide'),\n $slide = _this.$slides.eq(idx);\n\n _this.changeSlide(ltr, $slide, idx);\n });\n }\n\n if (this.options.accessible) {\n this.$wrapper.add(this.$bullets).on('keydown.zf.orbit', function(e) {\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Orbit', {\n next: function() {\n _this.changeSlide(true);\n },\n previous: function() {\n _this.changeSlide(false);\n },\n handled: function() { // if bullet is focused, make sure focus moves\n if ($(e.target).is(_this.$bullets)) {\n _this.$bullets.filter('.is-active').focus();\n }\n }\n });\n });\n }\n }\n }\n\n /**\n * Resets Orbit so it can be reinitialized\n */\n _reset() {\n // Don't do anything if there are no slides (first run)\n if (typeof this.$slides === 'undefined') {\n return;\n }\n\n if (this.$slides.length > 1) {\n // Remove old events\n this.$element.off('.zf.orbit').find('*').off('.zf.orbit')\n\n // Restart timer if autoPlay is enabled\n if (this.options.autoPlay) {\n this.timer.restart();\n }\n\n // Reset all sliddes\n this.$slides.each(function(el) {\n $(el).removeClass('is-active is-active is-in')\n .removeAttr('aria-live')\n .hide();\n });\n\n // Show the first slide\n this.$slides.first().addClass('is-active').show();\n\n // Triggers when the slide has finished animating\n this.$element.trigger('slidechange.zf.orbit', [this.$slides.first()]);\n\n // Select first bullet if bullets are present\n if (this.options.bullets) {\n this._updateBullets(0);\n }\n }\n }\n\n /**\n * Changes the current slide to a new one.\n * @function\n * @param {Boolean} isLTR - if true the slide moves from right to left, if false the slide moves from left to right.\n * @param {jQuery} chosenSlide - the jQuery element of the slide to show next, if one is selected.\n * @param {Number} idx - the index of the new slide in its collection, if one chosen.\n * @fires Orbit#slidechange\n */\n changeSlide(isLTR, chosenSlide, idx) {\n if (!this.$slides) {return; } // Don't freak out if we're in the middle of cleanup\n var $curSlide = this.$slides.filter('.is-active').eq(0);\n\n if (/mui/g.test($curSlide[0].className)) { return false; } //if the slide is currently animating, kick out of the function\n\n var $firstSlide = this.$slides.first(),\n $lastSlide = this.$slides.last(),\n dirIn = isLTR ? 'Right' : 'Left',\n dirOut = isLTR ? 'Left' : 'Right',\n _this = this,\n $newSlide;\n\n if (!chosenSlide) { //most of the time, this will be auto played or clicked from the navButtons.\n $newSlide = isLTR ? //if wrapping enabled, check to see if there is a `next` or `prev` sibling, if not, select the first or last slide to fill in. if wrapping not enabled, attempt to select `next` or `prev`, if there's nothing there, the function will kick out on next step. CRAZY NESTED TERNARIES!!!!!\n (this.options.infiniteWrap ? $curSlide.next(`.${this.options.slideClass}`).length ? $curSlide.next(`.${this.options.slideClass}`) : $firstSlide : $curSlide.next(`.${this.options.slideClass}`))//pick next slide if moving left to right\n :\n (this.options.infiniteWrap ? $curSlide.prev(`.${this.options.slideClass}`).length ? $curSlide.prev(`.${this.options.slideClass}`) : $lastSlide : $curSlide.prev(`.${this.options.slideClass}`));//pick prev slide if moving right to left\n } else {\n $newSlide = chosenSlide;\n }\n\n if ($newSlide.length) {\n /**\n * Triggers before the next slide starts animating in and only if a next slide has been found.\n * @event Orbit#beforeslidechange\n */\n this.$element.trigger('beforeslidechange.zf.orbit', [$curSlide, $newSlide]);\n\n if (this.options.bullets) {\n idx = idx || this.$slides.index($newSlide); //grab index to update bullets\n this._updateBullets(idx);\n }\n\n if (this.options.useMUI && !this.$element.is(':hidden')) {\n Motion.animateIn(\n $newSlide.addClass('is-active'),\n this.options[`animInFrom${dirIn}`],\n function(){\n $newSlide.css({'display': 'block'}).attr('aria-live', 'polite');\n });\n\n Motion.animateOut(\n $curSlide.removeClass('is-active'),\n this.options[`animOutTo${dirOut}`],\n function(){\n $curSlide.removeAttr('aria-live');\n if(_this.options.autoPlay && !_this.timer.isPaused){\n _this.timer.restart();\n }\n //do stuff?\n });\n } else {\n $curSlide.removeClass('is-active is-in').removeAttr('aria-live').hide();\n $newSlide.addClass('is-active is-in').attr('aria-live', 'polite').show();\n if (this.options.autoPlay && !this.timer.isPaused) {\n this.timer.restart();\n }\n }\n /**\n * Triggers when the slide has finished animating in.\n * @event Orbit#slidechange\n */\n this.$element.trigger('slidechange.zf.orbit', [$newSlide]);\n }\n }\n\n /**\n * Updates the active state of the bullets, if displayed.\n * Move the descriptor of the current slide `[data-slide-active-label]` to the newly active bullet.\n * If no `[data-slide-active-label]` is set, will move the exceeding `span` element.\n *\n * @function\n * @private\n * @param {Number} idx - the index of the current slide.\n */\n _updateBullets(idx) {\n var $oldBullet = this.$bullets.filter('.is-active');\n var $othersBullets = this.$bullets.not('.is-active');\n var $newBullet = this.$bullets.eq(idx);\n\n $oldBullet.removeClass('is-active').blur();\n $newBullet.addClass('is-active');\n\n // Find the descriptor for the current slide to move it to the new slide button\n var activeStateDescriptor = $oldBullet.children('[data-slide-active-label]').last();\n\n // If not explicitely given, search for the last \"exceeding\" span element (compared to others bullets).\n if (!activeStateDescriptor.length) {\n var spans = $oldBullet.children('span');\n var spanCountInOthersBullets = $othersBullets.toArray().map(b => $(b).children('span').length);\n\n // If there is an exceeding span element, use it as current slide descriptor\n if (spanCountInOthersBullets.every(count => count < spans.length)) {\n activeStateDescriptor = spans.last();\n activeStateDescriptor.attr('data-slide-active-label', '');\n }\n }\n\n // Move the current slide descriptor to the new slide button\n if (activeStateDescriptor.length) {\n activeStateDescriptor.detach();\n $newBullet.append(activeStateDescriptor);\n }\n }\n\n /**\n * Destroys the carousel and hides the element.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.orbit').find('*').off('.zf.orbit').end().hide();\n }\n}\n\nOrbit.defaults = {\n /**\n * Tells the JS to look for and loadBullets.\n * @option\n * @type {boolean}\n * @default true\n */\n bullets: true,\n /**\n * Tells the JS to apply event listeners to nav buttons\n * @option\n * @type {boolean}\n * @default true\n */\n navButtons: true,\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-in-right'\n */\n animInFromRight: 'slide-in-right',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-out-right'\n */\n animOutToRight: 'slide-out-right',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-in-left'\n *\n */\n animInFromLeft: 'slide-in-left',\n /**\n * motion-ui animation class to apply\n * @option\n * @type {string}\n * @default 'slide-out-left'\n */\n animOutToLeft: 'slide-out-left',\n /**\n * Allows Orbit to automatically animate on page load.\n * @option\n * @type {boolean}\n * @default true\n */\n autoPlay: true,\n /**\n * Amount of time, in ms, between slide transitions\n * @option\n * @type {number}\n * @default 5000\n */\n timerDelay: 5000,\n /**\n * Allows Orbit to infinitely loop through the slides\n * @option\n * @type {boolean}\n * @default true\n */\n infiniteWrap: true,\n /**\n * Allows the Orbit slides to bind to swipe events for mobile, requires an additional util library\n * @option\n * @type {boolean}\n * @default true\n */\n swipe: true,\n /**\n * Allows the timing function to pause animation on hover.\n * @option\n * @type {boolean}\n * @default true\n */\n pauseOnHover: true,\n /**\n * Allows Orbit to bind keyboard events to the slider, to animate frames with arrow keys\n * @option\n * @type {boolean}\n * @default true\n */\n accessible: true,\n /**\n * Class applied to the container of Orbit\n * @option\n * @type {string}\n * @default 'orbit-container'\n */\n containerClass: 'orbit-container',\n /**\n * Class applied to individual slides.\n * @option\n * @type {string}\n * @default 'orbit-slide'\n */\n slideClass: 'orbit-slide',\n /**\n * Class applied to the bullet container. You're welcome.\n * @option\n * @type {string}\n * @default 'orbit-bullets'\n */\n boxOfBullets: 'orbit-bullets',\n /**\n * Class applied to the `next` navigation button.\n * @option\n * @type {string}\n * @default 'orbit-next'\n */\n nextClass: 'orbit-next',\n /**\n * Class applied to the `previous` navigation button.\n * @option\n * @type {string}\n * @default 'orbit-previous'\n */\n prevClass: 'orbit-previous',\n /**\n * Boolean to flag the js to use motion ui classes or not. Default to true for backwards compatibility.\n * @option\n * @type {boolean}\n * @default true\n */\n useMUI: true\n};\n\nexport {Orbit};\n","import $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\nimport { DropdownMenu } from './foundation.dropdownMenu';\nimport { Drilldown } from './foundation.drilldown';\nimport { AccordionMenu } from './foundation.accordionMenu';\n\nlet MenuPlugins = {\n dropdown: {\n cssClass: 'dropdown',\n plugin: DropdownMenu\n },\n drilldown: {\n cssClass: 'drilldown',\n plugin: Drilldown\n },\n accordion: {\n cssClass: 'accordion-menu',\n plugin: AccordionMenu\n }\n};\n\n // import \"foundation.util.triggers.js\";\n\n\n/**\n * ResponsiveMenu module.\n * @module foundation.responsiveMenu\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n */\n\nclass ResponsiveMenu extends Plugin {\n /**\n * Creates a new instance of a responsive menu.\n * @class\n * @name ResponsiveMenu\n * @fires ResponsiveMenu#init\n * @param {jQuery} element - jQuery object to make into a dropdown menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element) {\n this.$element = $(element);\n this.rules = this.$element.data('responsive-menu');\n this.currentMq = null;\n this.currentPlugin = null;\n this.className = 'ResponsiveMenu'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Menu by parsing the classes from the 'data-ResponsiveMenu' attribute on the element.\n * @function\n * @private\n */\n _init() {\n\n MediaQuery._init();\n // The first time an Interchange plugin is initialized, this.rules is converted from a string of \"classes\" to an object of rules\n if (typeof this.rules === 'string') {\n let rulesTree = {};\n\n // Parse rules from \"classes\" pulled from data attribute\n let rules = this.rules.split(' ');\n\n // Iterate through every rule found\n for (let i = 0; i < rules.length; i++) {\n let rule = rules[i].split('-');\n let ruleSize = rule.length > 1 ? rule[0] : 'small';\n let rulePlugin = rule.length > 1 ? rule[1] : rule[0];\n\n if (MenuPlugins[rulePlugin] !== null) {\n rulesTree[ruleSize] = MenuPlugins[rulePlugin];\n }\n }\n\n this.rules = rulesTree;\n }\n\n if (!$.isEmptyObject(this.rules)) {\n this._checkMediaQueries();\n }\n // Add data-mutate since children may need it.\n this.$element.attr('data-mutate', (this.$element.attr('data-mutate') || GetYoDigits(6, 'responsive-menu')));\n }\n\n /**\n * Initializes events for the Menu.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n $(window).on('changed.zf.mediaquery', function() {\n _this._checkMediaQueries();\n });\n // $(window).on('resize.zf.ResponsiveMenu', function() {\n // _this._checkMediaQueries();\n // });\n }\n\n /**\n * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.\n * @function\n * @private\n */\n _checkMediaQueries() {\n var matchedMq, _this = this;\n // Iterate through each rule and find the last matching rule\n $.each(this.rules, function(key) {\n if (MediaQuery.atLeast(key)) {\n matchedMq = key;\n }\n });\n\n // No match? No dice\n if (!matchedMq) return;\n\n // Plugin already initialized? We good\n if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;\n\n // Remove existing plugin-specific CSS classes\n $.each(MenuPlugins, function(key, value) {\n _this.$element.removeClass(value.cssClass);\n });\n\n // Add the CSS class for the new plugin\n this.$element.addClass(this.rules[matchedMq].cssClass);\n\n // Create an instance of the new plugin\n if (this.currentPlugin) this.currentPlugin.destroy();\n this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {});\n }\n\n /**\n * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.\n * @function\n */\n _destroy() {\n this.currentPlugin.destroy();\n $(window).off('.zf.ResponsiveMenu');\n }\n}\n\nResponsiveMenu.defaults = {};\n\nexport {ResponsiveMenu};\n","import $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Motion } from './foundation.util.motion';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * ResponsiveToggle module.\n * @module foundation.responsiveToggle\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.motion\n */\n\nclass ResponsiveToggle extends Plugin {\n /**\n * Creates a new instance of Tab Bar.\n * @class\n * @name ResponsiveToggle\n * @fires ResponsiveToggle#init\n * @param {jQuery} element - jQuery object to attach tab bar functionality to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.options = $.extend({}, ResponsiveToggle.defaults, this.$element.data(), options);\n this.className = 'ResponsiveToggle'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the tab bar by finding the target element, toggling element, and running update().\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n var targetID = this.$element.data('responsive-toggle');\n if (!targetID) {\n console.error('Your tab bar needs an ID of a Menu as the value of data-tab-bar.');\n }\n\n this.$targetMenu = $(`#${targetID}`);\n this.$toggler = this.$element.find('[data-toggle]').filter(function() {\n var target = $(this).data('toggle');\n return (target === targetID || target === \"\");\n });\n this.options = $.extend({}, this.options, this.$targetMenu.data());\n\n // If they were set, parse the animation classes\n if(this.options.animate) {\n let input = this.options.animate.split(' ');\n\n this.animationIn = input[0];\n this.animationOut = input[1] || null;\n }\n\n this._update();\n }\n\n /**\n * Adds necessary event handlers for the tab bar to work.\n * @function\n * @private\n */\n _events() {\n this._updateMqHandler = this._update.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._updateMqHandler);\n\n this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));\n }\n\n /**\n * Checks the current media query to determine if the tab bar should be visible or hidden.\n * @function\n * @private\n */\n _update() {\n // Mobile\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n this.$element.show();\n this.$targetMenu.hide();\n }\n\n // Desktop\n else {\n this.$element.hide();\n this.$targetMenu.show();\n }\n }\n\n /**\n * Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it.\n * @function\n * @fires ResponsiveToggle#toggled\n */\n toggleMenu() {\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n /**\n * Fires when the element attached to the tab bar toggles.\n * @event ResponsiveToggle#toggled\n */\n if(this.options.animate) {\n if (this.$targetMenu.is(':hidden')) {\n Motion.animateIn(this.$targetMenu, this.animationIn, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n this.$targetMenu.find('[data-mutate]').triggerHandler('mutateme.zf.trigger');\n });\n }\n else {\n Motion.animateOut(this.$targetMenu, this.animationOut, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n });\n }\n }\n else {\n this.$targetMenu.toggle(0);\n this.$targetMenu.find('[data-mutate]').trigger('mutateme.zf.trigger');\n this.$element.trigger('toggled.zf.responsiveToggle');\n }\n }\n };\n\n _destroy() {\n this.$element.off('.zf.responsiveToggle');\n this.$toggler.off('.zf.responsiveToggle');\n\n $(window).off('changed.zf.mediaquery', this._updateMqHandler);\n }\n}\n\nResponsiveToggle.defaults = {\n /**\n * The breakpoint after which the menu is always shown, and the tab bar is hidden.\n * @option\n * @type {string}\n * @default 'medium'\n */\n hideFor: 'medium',\n\n /**\n * To decide if the toggle should be animated or not.\n * @option\n * @type {boolean}\n * @default false\n */\n animate: false\n};\n\nexport { ResponsiveToggle };\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Motion } from './foundation.util.motion';\nimport { Triggers } from './foundation.util.triggers';\nimport { Touch } from './foundation.util.touch'\n\n/**\n * Reveal module.\n * @module foundation.reveal\n * @requires foundation.util.keyboard\n * @requires foundation.util.touch\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.motion if using animations\n */\n\nclass Reveal extends Plugin {\n /**\n * Creates a new instance of Reveal.\n * @class\n * @name Reveal\n * @param {jQuery} element - jQuery object to use for the modal.\n * @param {Object} options - optional parameters.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Reveal.defaults, this.$element.data(), options);\n this.className = 'Reveal'; // ie9 back compat\n this._init();\n\n // Touch and Triggers init are idempotent, just need to make sure they are initialized\n Touch.init($);\n Triggers.init($);\n\n Keyboard.register('Reveal', {\n 'ESCAPE': 'close',\n });\n }\n\n /**\n * Initializes the modal by adding the overlay and close buttons, (if selected).\n * @private\n */\n _init() {\n MediaQuery._init();\n this.id = this.$element.attr('id');\n this.isActive = false;\n this.cached = {mq: MediaQuery.current};\n\n this.$anchor = $(`[data-open=\"${this.id}\"]`).length ? $(`[data-open=\"${this.id}\"]`) : $(`[data-toggle=\"${this.id}\"]`);\n this.$anchor.attr({\n 'aria-controls': this.id,\n 'aria-haspopup': 'dialog',\n 'tabindex': 0\n });\n\n if (this.options.fullScreen || this.$element.hasClass('full')) {\n this.options.fullScreen = true;\n this.options.overlay = false;\n }\n if (this.options.overlay && !this.$overlay) {\n this.$overlay = this._makeOverlay(this.id);\n }\n\n this.$element.attr({\n 'role': 'dialog',\n 'aria-hidden': true,\n 'data-yeti-box': this.id,\n 'data-resize': this.id\n });\n\n if(this.$overlay) {\n this.$element.detach().appendTo(this.$overlay);\n } else {\n this.$element.detach().appendTo($(this.options.appendTo));\n this.$element.addClass('without-overlay');\n }\n this._events();\n if (this.options.deepLink && window.location.hash === ( `#${this.id}`)) {\n this.onLoadListener = onLoad($(window), () => this.open());\n }\n }\n\n /**\n * Creates an overlay div to display behind the modal.\n * @private\n */\n _makeOverlay() {\n var additionalOverlayClasses = '';\n\n if (this.options.additionalOverlayClasses) {\n additionalOverlayClasses = ' ' + this.options.additionalOverlayClasses;\n }\n\n return $('<div></div>')\n .addClass('reveal-overlay' + additionalOverlayClasses)\n .appendTo(this.options.appendTo);\n }\n\n /**\n * Updates position of modal\n * TODO: Figure out if we actually need to cache these values or if it doesn't matter\n * @private\n */\n _updatePosition() {\n var width = this.$element.outerWidth();\n var outerWidth = $(window).width();\n var height = this.$element.outerHeight();\n var outerHeight = $(window).height();\n var left, top = null;\n if (this.options.hOffset === 'auto') {\n left = parseInt((outerWidth - width) / 2, 10);\n } else {\n left = parseInt(this.options.hOffset, 10);\n }\n if (this.options.vOffset === 'auto') {\n if (height > outerHeight) {\n top = parseInt(Math.min(100, outerHeight / 10), 10);\n } else {\n top = parseInt((outerHeight - height) / 4, 10);\n }\n } else if (this.options.vOffset !== null) {\n top = parseInt(this.options.vOffset, 10);\n }\n\n if (top !== null) {\n this.$element.css({top: top + 'px'});\n }\n\n // only worry about left if we don't have an overlay or we have a horizontal offset,\n // otherwise we're perfectly in the middle\n if (!this.$overlay || (this.options.hOffset !== 'auto')) {\n this.$element.css({left: left + 'px'});\n this.$element.css({margin: '0px'});\n }\n\n }\n\n /**\n * Adds event handlers for the modal.\n * @private\n */\n _events() {\n var _this = this;\n\n this.$element.on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': (event, $element) => {\n if ((event.target === _this.$element[0]) ||\n ($(event.target).parents('[data-closable]')[0] === $element)) { // only close reveal when it's explicitly called\n return this.close.apply(this);\n }\n },\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'resizeme.zf.trigger': function() {\n _this._updatePosition();\n }\n });\n\n if (this.options.closeOnClick && this.options.overlay) {\n this.$overlay.off('.zf.reveal').on('click.zf.dropdown tap.zf.dropdown', function(e) {\n if (e.target === _this.$element[0] ||\n $.contains(_this.$element[0], e.target) ||\n !$.contains(document, e.target)) {\n return;\n }\n _this.close();\n });\n }\n if (this.options.deepLink) {\n $(window).on(`hashchange.zf.reveal:${this.id}`, this._handleState.bind(this));\n }\n }\n\n /**\n * Handles modal methods on back/forward button clicks or any other event that triggers hashchange.\n * @private\n */\n _handleState() {\n if(window.location.hash === ( '#' + this.id) && !this.isActive){ this.open(); }\n else{ this.close(); }\n }\n\n /**\n * Disables the scroll when Reveal is shown to prevent the background from shifting\n * @param {number} scrollTop - Scroll to visually apply, window current scroll by default\n */\n _disableScroll(scrollTop) {\n scrollTop = scrollTop || $(window).scrollTop();\n if ($(document).height() > $(window).height()) {\n $(\"html\")\n .css(\"top\", -scrollTop);\n }\n }\n\n /**\n * Reenables the scroll when Reveal closes\n * @param {number} scrollTop - Scroll to restore, html \"top\" property by default (as set by `_disableScroll`)\n */\n _enableScroll(scrollTop) {\n scrollTop = scrollTop || parseInt($(\"html\").css(\"top\"), 10);\n if ($(document).height() > $(window).height()) {\n $(\"html\")\n .css(\"top\", \"\");\n $(window).scrollTop(-scrollTop);\n }\n }\n\n\n /**\n * Opens the modal controlled by `this.$anchor`, and closes all others by default.\n * @function\n * @fires Reveal#closeme\n * @fires Reveal#open\n */\n open() {\n // either update or replace browser history\n const hash = `#${this.id}`;\n if (this.options.deepLink && window.location.hash !== hash) {\n\n if (window.history.pushState) {\n if (this.options.updateHistory) {\n window.history.pushState({}, '', hash);\n } else {\n window.history.replaceState({}, '', hash);\n }\n } else {\n window.location.hash = hash;\n }\n }\n\n // Remember anchor that opened it to set focus back later, have general anchors as fallback\n this.$activeAnchor = $(document.activeElement).is(this.$anchor) ? $(document.activeElement) : this.$anchor;\n\n this.isActive = true;\n\n // Make elements invisible, but remove display: none so we can get size and positioning\n this.$element\n .css({ 'visibility': 'hidden' })\n .show()\n .scrollTop(0);\n if (this.options.overlay) {\n this.$overlay.css({'visibility': 'hidden'}).show();\n }\n\n this._updatePosition();\n\n this.$element\n .hide()\n .css({ 'visibility': '' });\n\n if(this.$overlay) {\n this.$overlay.css({'visibility': ''}).hide();\n if(this.$element.hasClass('fast')) {\n this.$overlay.addClass('fast');\n } else if (this.$element.hasClass('slow')) {\n this.$overlay.addClass('slow');\n }\n }\n\n\n if (!this.options.multipleOpened) {\n /**\n * Fires immediately before the modal opens.\n * Closes any other modals that are currently open\n * @event Reveal#closeme\n */\n this.$element.trigger('closeme.zf.reveal', this.id);\n }\n\n if ($('.reveal:visible').length === 0) {\n this._disableScroll();\n }\n\n var _this = this;\n\n // Motion UI method of reveal\n if (this.options.animationIn) {\n function afterAnimation(){\n _this.$element\n .attr({\n 'aria-hidden': false,\n 'tabindex': -1\n })\n .focus();\n _this._addGlobalClasses();\n Keyboard.trapFocus(_this.$element);\n }\n if (this.options.overlay) {\n Motion.animateIn(this.$overlay, 'fade-in');\n }\n Motion.animateIn(this.$element, this.options.animationIn, () => {\n if(this.$element) { // protect against object having been removed\n this.focusableElements = Keyboard.findFocusable(this.$element);\n afterAnimation();\n }\n });\n }\n // jQuery method of reveal\n else {\n if (this.options.overlay) {\n this.$overlay.show(0);\n }\n this.$element.show(this.options.showDelay);\n }\n\n // handle accessibility\n this.$element\n .attr({\n 'aria-hidden': false,\n 'tabindex': -1\n })\n .focus();\n Keyboard.trapFocus(this.$element);\n\n this._addGlobalClasses();\n\n this._addGlobalListeners();\n\n /**\n * Fires when the modal has successfully opened.\n * @event Reveal#open\n */\n this.$element.trigger('open.zf.reveal');\n }\n\n /**\n * Adds classes and listeners on document required by open modals.\n *\n * The following classes are added and updated:\n * - `.is-reveal-open` - Prevents the scroll on document\n * - `.zf-has-scroll` - Displays a disabled scrollbar on document if required like if the\n * scroll was not disabled. This prevent a \"shift\" of the page content due\n * the scrollbar disappearing when the modal opens.\n *\n * @private\n */\n _addGlobalClasses() {\n const updateScrollbarClass = () => {\n $('html').toggleClass('zf-has-scroll', !!($(document).height() > $(window).height()));\n };\n\n this.$element.on('resizeme.zf.trigger.revealScrollbarListener', () => updateScrollbarClass());\n updateScrollbarClass();\n $('html').addClass('is-reveal-open');\n }\n\n /**\n * Removes classes and listeners on document that were required by open modals.\n * @private\n */\n _removeGlobalClasses() {\n this.$element.off('resizeme.zf.trigger.revealScrollbarListener');\n $('html').removeClass('is-reveal-open');\n $('html').removeClass('zf-has-scroll');\n }\n\n /**\n * Adds extra event handlers for the body and window if necessary.\n * @private\n */\n _addGlobalListeners() {\n var _this = this;\n if(!this.$element) { return; } // If we're in the middle of cleanup, don't freak out\n this.focusableElements = Keyboard.findFocusable(this.$element);\n\n if (!this.options.overlay && this.options.closeOnClick && !this.options.fullScreen) {\n $('body').on('click.zf.dropdown tap.zf.dropdown', function(e) {\n if (e.target === _this.$element[0] ||\n $.contains(_this.$element[0], e.target) ||\n !$.contains(document, e.target)) { return; }\n _this.close();\n });\n }\n\n if (this.options.closeOnEsc) {\n $(window).on('keydown.zf.reveal', function(e) {\n Keyboard.handleKey(e, 'Reveal', {\n close: function() {\n if (_this.options.closeOnEsc) {\n _this.close();\n }\n }\n });\n });\n }\n }\n\n /**\n * Closes the modal.\n * @function\n * @fires Reveal#closed\n */\n close() {\n if (!this.isActive || !this.$element.is(':visible')) {\n return false;\n }\n var _this = this;\n\n // Motion UI method of hiding\n if (this.options.animationOut) {\n if (this.options.overlay) {\n Motion.animateOut(this.$overlay, 'fade-out');\n }\n\n Motion.animateOut(this.$element, this.options.animationOut, finishUp);\n }\n // jQuery method of hiding\n else {\n this.$element.hide(this.options.hideDelay);\n\n if (this.options.overlay) {\n this.$overlay.hide(0, finishUp);\n }\n else {\n finishUp();\n }\n }\n\n // Conditionals to remove extra event listeners added on open\n if (this.options.closeOnEsc) {\n $(window).off('keydown.zf.reveal');\n }\n\n if (!this.options.overlay && this.options.closeOnClick) {\n $('body').off('click.zf.dropdown tap.zf.dropdown');\n }\n\n this.$element.off('keydown.zf.reveal');\n\n function finishUp() {\n\n // Get the current top before the modal is closed and restore the scroll after.\n // TODO: use component properties instead of HTML properties\n // See https://github.com/foundation/foundation-sites/pull/10786\n var scrollTop = parseInt($(\"html\").css(\"top\"), 10);\n\n if ($('.reveal:visible').length === 0) {\n _this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal\n }\n\n Keyboard.releaseFocus(_this.$element);\n\n _this.$element.attr('aria-hidden', true);\n\n if ($('.reveal:visible').length === 0) {\n _this._enableScroll(scrollTop);\n }\n\n /**\n * Fires when the modal is done closing.\n * @event Reveal#closed\n */\n _this.$element.trigger('closed.zf.reveal');\n }\n\n /**\n * Resets the modal content\n * This prevents a running video to keep going in the background\n */\n if (this.options.resetOnClose) {\n this.$element.html(this.$element.html());\n }\n\n this.isActive = false;\n // If deepLink and we did not switched to an other modal...\n if (_this.options.deepLink && window.location.hash === `#${this.id}`) {\n // Remove the history hash\n if (window.history.replaceState) {\n const urlWithoutHash = window.location.pathname + window.location.search;\n if (this.options.updateHistory) {\n window.history.pushState({}, '', urlWithoutHash); // remove the hash\n } else {\n window.history.replaceState('', document.title, urlWithoutHash);\n }\n } else {\n window.location.hash = '';\n }\n }\n\n this.$activeAnchor.focus();\n }\n\n /**\n * Toggles the open/closed state of a modal.\n * @function\n */\n toggle() {\n if (this.isActive) {\n this.close();\n } else {\n this.open();\n }\n };\n\n /**\n * Destroys an instance of a modal.\n * @function\n */\n _destroy() {\n if (this.options.overlay) {\n this.$element.appendTo($(this.options.appendTo)); // move $element outside of $overlay to prevent error unregisterPlugin()\n this.$overlay.hide().off().remove();\n }\n this.$element.hide().off();\n this.$anchor.off('.zf');\n $(window).off(`.zf.reveal:${this.id}`)\n if (this.onLoadListener) $(window).off(this.onLoadListener);\n\n if ($('.reveal:visible').length === 0) {\n this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal\n }\n };\n}\n\nReveal.defaults = {\n /**\n * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide.\n * @option\n * @type {string}\n * @default ''\n */\n animationIn: '',\n /**\n * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide.\n * @option\n * @type {string}\n * @default ''\n */\n animationOut: '',\n /**\n * Time, in ms, to delay the opening of a modal after a click if no animation used.\n * @option\n * @type {number}\n * @default 0\n */\n showDelay: 0,\n /**\n * Time, in ms, to delay the closing of a modal after a click if no animation used.\n * @option\n * @type {number}\n * @default 0\n */\n hideDelay: 0,\n /**\n * Allows a click on the body/overlay to close the modal.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnClick: true,\n /**\n * Allows the modal to close if the user presses the `ESCAPE` key.\n * @option\n * @type {boolean}\n * @default true\n */\n closeOnEsc: true,\n /**\n * If true, allows multiple modals to be displayed at once.\n * @option\n * @type {boolean}\n * @default false\n */\n multipleOpened: false,\n /**\n * Distance, in pixels, the modal should push down from the top of the screen.\n * @option\n * @type {number|string}\n * @default auto\n */\n vOffset: 'auto',\n /**\n * Distance, in pixels, the modal should push in from the side of the screen.\n * @option\n * @type {number|string}\n * @default auto\n */\n hOffset: 'auto',\n /**\n * Allows the modal to be fullscreen, completely blocking out the rest of the view. JS checks for this as well.\n * @option\n * @type {boolean}\n * @default false\n */\n fullScreen: false,\n /**\n * Allows the modal to generate an overlay div, which will cover the view when modal opens.\n * @option\n * @type {boolean}\n * @default true\n */\n overlay: true,\n /**\n * 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.\n * @option\n * @type {boolean}\n * @default false\n */\n resetOnClose: false,\n /**\n * Link the location hash to the modal.\n * Set the location hash when the modal is opened/closed, and open/close the modal when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n /**\n * If `deepLink` is enabled, update the browser history with the open modal\n * @option\n * @default false\n */\n updateHistory: false,\n /**\n * Allows the modal to append to custom div.\n * @option\n * @type {string}\n * @default \"body\"\n */\n appendTo: \"body\",\n /**\n * Allows adding additional class names to the reveal overlay.\n * @option\n * @type {string}\n * @default ''\n */\n additionalOverlayClasses: ''\n};\n\nexport {Reveal};\n","import $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { Move } from './foundation.util.motion';\nimport { GetYoDigits, rtl as Rtl } from './foundation.core.utils';\n\nimport { Plugin } from './foundation.core.plugin';\n\nimport { Touch } from './foundation.util.touch';\n\nimport { Triggers } from './foundation.util.triggers';\n/**\n * Slider module.\n * @module foundation.slider\n * @requires foundation.util.motion\n * @requires foundation.util.triggers\n * @requires foundation.util.keyboard\n * @requires foundation.util.touch\n */\n\nclass Slider extends Plugin {\n /**\n * Creates a new instance of a slider control.\n * @class\n * @name Slider\n * @param {jQuery} element - jQuery object to make into a slider control.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Slider.defaults, this.$element.data(), options);\n this.className = 'Slider'; // ie9 back compat\n this.initialized = false;\n\n // Touch and Triggers inits are idempotent, we just need to make sure it's initialied.\n Touch.init($);\n Triggers.init($);\n\n this._init();\n\n Keyboard.register('Slider', {\n 'ltr': {\n 'ARROW_RIGHT': 'increase',\n 'ARROW_UP': 'increase',\n 'ARROW_DOWN': 'decrease',\n 'ARROW_LEFT': 'decrease',\n 'SHIFT_ARROW_RIGHT': 'increaseFast',\n 'SHIFT_ARROW_UP': 'increaseFast',\n 'SHIFT_ARROW_DOWN': 'decreaseFast',\n 'SHIFT_ARROW_LEFT': 'decreaseFast',\n 'HOME': 'min',\n 'END': 'max'\n },\n 'rtl': {\n 'ARROW_LEFT': 'increase',\n 'ARROW_RIGHT': 'decrease',\n 'SHIFT_ARROW_LEFT': 'increaseFast',\n 'SHIFT_ARROW_RIGHT': 'decreaseFast'\n }\n });\n }\n\n /**\n * Initilizes the plugin by reading/setting attributes, creating collections and setting the initial position of the handle(s).\n * @function\n * @private\n */\n _init() {\n this.inputs = this.$element.find('input');\n this.handles = this.$element.find('[data-slider-handle]');\n\n this.$handle = this.handles.eq(0);\n this.$input = this.inputs.length ? this.inputs.eq(0) : $(`#${this.$handle.attr('aria-controls')}`);\n this.$fill = this.$element.find('[data-slider-fill]').css(this.options.vertical ? 'height' : 'width', 0);\n\n if (this.options.disabled || this.$element.hasClass(this.options.disabledClass)) {\n this.options.disabled = true;\n this.$element.addClass(this.options.disabledClass);\n }\n if (!this.inputs.length) {\n this.inputs = $().add(this.$input);\n this.options.binding = true;\n }\n\n this._setInitAttr(0);\n\n if (this.handles[1]) {\n this.options.doubleSided = true;\n this.$handle2 = this.handles.eq(1);\n this.$input2 = this.inputs.length > 1 ? this.inputs.eq(1) : $(`#${this.$handle2.attr('aria-controls')}`);\n\n if (!this.inputs[1]) {\n this.inputs = this.inputs.add(this.$input2);\n }\n\n // this.$handle.triggerHandler('click.zf.slider');\n this._setInitAttr(1);\n }\n\n // Set handle positions\n this.setHandles();\n\n this._events();\n this.initialized = true;\n }\n\n setHandles() {\n if(this.handles[1]) {\n this._setHandlePos(this.$handle, this.inputs.eq(0).val(), () => {\n this._setHandlePos(this.$handle2, this.inputs.eq(1).val());\n });\n } else {\n this._setHandlePos(this.$handle, this.inputs.eq(0).val());\n }\n }\n\n _reflow() {\n this.setHandles();\n }\n /**\n * @function\n * @private\n * @param {Number} value - floating point (the value) to be transformed using to a relative position on the slider (the inverse of _value)\n */\n _pctOfBar(value) {\n var pctOfBar = percent(value - this.options.start, this.options.end - this.options.start)\n\n switch(this.options.positionValueFunction) {\n case \"pow\":\n pctOfBar = this._logTransform(pctOfBar);\n break;\n case \"log\":\n pctOfBar = this._powTransform(pctOfBar);\n break;\n }\n\n return pctOfBar.toFixed(2)\n }\n\n /**\n * @function\n * @private\n * @param {Number} pctOfBar - floating point, the relative position of the slider (typically between 0-1) to be transformed to a value\n */\n _value(pctOfBar) {\n switch(this.options.positionValueFunction) {\n case \"pow\":\n pctOfBar = this._powTransform(pctOfBar);\n break;\n case \"log\":\n pctOfBar = this._logTransform(pctOfBar);\n break;\n }\n\n var value\n if (this.options.vertical) {\n // linear interpolation which is working with negative values for start\n // https://math.stackexchange.com/a/1019084\n value = parseFloat(this.options.end) + pctOfBar * (this.options.start - this.options.end)\n } else {\n value = (this.options.end - this.options.start) * pctOfBar + parseFloat(this.options.start);\n }\n\n return value\n }\n\n /**\n * @function\n * @private\n * @param {Number} value - floating point (typically between 0-1) to be transformed using the log function\n */\n _logTransform(value) {\n return baseLog(this.options.nonLinearBase, ((value*(this.options.nonLinearBase-1))+1))\n }\n\n /**\n * @function\n * @private\n * @param {Number} value - floating point (typically between 0-1) to be transformed using the power function\n */\n _powTransform(value) {\n return (Math.pow(this.options.nonLinearBase, value) - 1) / (this.options.nonLinearBase - 1)\n }\n\n /**\n * Sets the position of the selected handle and fill bar.\n * @function\n * @private\n * @param {jQuery} $hndl - the selected handle to move.\n * @param {Number} location - floating point between the start and end values of the slider bar.\n * @param {Function} cb - callback function to fire on completion.\n * @fires Slider#moved\n * @fires Slider#changed\n */\n _setHandlePos($hndl, location, cb) {\n // don't move if the slider has been disabled since its initialization\n if (this.$element.hasClass(this.options.disabledClass)) {\n return;\n }\n //might need to alter that slightly for bars that will have odd number selections.\n location = parseFloat(location);//on input change events, convert string to number...grumble.\n\n // prevent slider from running out of bounds, if value exceeds the limits set through options, override the value to min/max\n if (location < this.options.start) { location = this.options.start; }\n else if (location > this.options.end) { location = this.options.end; }\n\n var isDbl = this.options.doubleSided;\n\n if (isDbl) { //this block is to prevent 2 handles from crossing eachother. Could/should be improved.\n if (this.handles.index($hndl) === 0) {\n var h2Val = parseFloat(this.$handle2.attr('aria-valuenow'));\n location = location >= h2Val ? h2Val - this.options.step : location;\n } else {\n var h1Val = parseFloat(this.$handle.attr('aria-valuenow'));\n location = location <= h1Val ? h1Val + this.options.step : location;\n }\n }\n\n var _this = this,\n vert = this.options.vertical,\n hOrW = vert ? 'height' : 'width',\n lOrT = vert ? 'top' : 'left',\n handleDim = $hndl[0].getBoundingClientRect()[hOrW],\n elemDim = this.$element[0].getBoundingClientRect()[hOrW],\n //percentage of bar min/max value based on click or drag point\n pctOfBar = this._pctOfBar(location),\n //number of actual pixels to shift the handle, based on the percentage obtained above\n pxToMove = (elemDim - handleDim) * pctOfBar,\n //percentage of bar to shift the handle\n movement = (percent(pxToMove, elemDim) * 100).toFixed(this.options.decimal);\n //fixing the decimal value for the location number, is passed to other methods as a fixed floating-point value\n location = parseFloat(location.toFixed(this.options.decimal));\n // declare empty object for css adjustments, only used with 2 handled-sliders\n var css = {};\n\n this._setValues($hndl, location);\n\n // TODO update to calculate based on values set to respective inputs??\n if (isDbl) {\n var isLeftHndl = this.handles.index($hndl) === 0,\n //empty variable, will be used for min-height/width for fill bar\n dim,\n //percentage w/h of the handle compared to the slider bar\n handlePct = Math.floor(percent(handleDim, elemDim) * 100);\n //if left handle, the math is slightly different than if it's the right handle, and the left/top property needs to be changed for the fill bar\n if (isLeftHndl) {\n //left or top percentage value to apply to the fill bar.\n css[lOrT] = `${movement}%`;\n //calculate the new min-height/width for the fill bar.\n dim = parseFloat(this.$handle2[0].style[lOrT]) - movement + handlePct;\n //this callback is necessary to prevent errors and allow the proper placement and initialization of a 2-handled slider\n //plus, it means we don't care if 'dim' isNaN on init, it won't be in the future.\n if (cb && typeof cb === 'function') { cb(); }//this is only needed for the initialization of 2 handled sliders\n } else {\n //just caching the value of the left/bottom handle's left/top property\n var handlePos = parseFloat(this.$handle[0].style[lOrT]);\n //calculate the new min-height/width for the fill bar. Use isNaN to prevent false positives for numbers <= 0\n //based on the percentage of movement of the handle being manipulated, less the opposing handle's left/top position, plus the percentage w/h of the handle itself\n dim = movement - (isNaN(handlePos) ? (this.options.initialStart - this.options.start)/((this.options.end-this.options.start)/100) : handlePos) + handlePct;\n }\n // assign the min-height/width to our css object\n css[`min-${hOrW}`] = `${dim}%`;\n }\n\n //because we don't know exactly how the handle will be moved, check the amount of time it should take to move.\n var moveTime = this.$element.data('dragging') ? 1000/60 : this.options.moveTime;\n\n Move(moveTime, $hndl, function() {\n // adjusting the left/top property of the handle, based on the percentage calculated above\n // if movement isNaN, that is because the slider is hidden and we cannot determine handle width,\n // fall back to next best guess.\n if (isNaN(movement)) {\n $hndl.css(lOrT, `${pctOfBar * 100}%`);\n }\n else {\n $hndl.css(lOrT, `${movement}%`);\n }\n\n if (!_this.options.doubleSided) {\n //if single-handled, a simple method to expand the fill bar\n _this.$fill.css(hOrW, `${pctOfBar * 100}%`);\n } else {\n //otherwise, use the css object we created above\n _this.$fill.css(css);\n }\n });\n\n if (this.initialized) {\n this.$element.one('finished.zf.animate', function() {\n /**\n * Fires when the handle is done moving.\n * @event Slider#moved\n */\n _this.$element.trigger('moved.zf.slider', [$hndl]);\n });\n /**\n * Fires when the value has not been change for a given time.\n * @event Slider#changed\n */\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.$element.trigger('changed.zf.slider', [$hndl]);\n }, _this.options.changedDelay);\n }\n }\n\n /**\n * Sets the initial attribute for the slider element.\n * @function\n * @private\n * @param {Number} idx - index of the current handle/input to use.\n */\n _setInitAttr(idx) {\n var initVal = (idx === 0 ? this.options.initialStart : this.options.initialEnd)\n var id = this.inputs.eq(idx).attr('id') || GetYoDigits(6, 'slider');\n this.inputs.eq(idx).attr({\n 'id': id,\n 'max': this.options.end,\n 'min': this.options.start,\n 'step': this.options.step\n });\n this.inputs.eq(idx).val(initVal);\n this.handles.eq(idx).attr({\n 'role': 'slider',\n 'aria-controls': id,\n 'aria-valuemax': this.options.end,\n 'aria-valuemin': this.options.start,\n 'aria-valuenow': initVal,\n 'aria-orientation': this.options.vertical ? 'vertical' : 'horizontal',\n 'tabindex': 0\n });\n }\n\n /**\n * Sets the input and `aria-valuenow` values for the slider element.\n * @function\n * @private\n * @param {jQuery} $handle - the currently selected handle.\n * @param {Number} val - floating point of the new value.\n */\n _setValues($handle, val) {\n var idx = this.options.doubleSided ? this.handles.index($handle) : 0;\n this.inputs.eq(idx).val(val);\n $handle.attr('aria-valuenow', val);\n }\n\n /**\n * Handles events on the slider element.\n * Calculates the new location of the current handle.\n * If there are two handles and the bar was clicked, it determines which handle to move.\n * @function\n * @private\n * @param {Object} e - the `event` object passed from the listener.\n * @param {jQuery} $handle - the current handle to calculate for, if selected.\n * @param {Number} val - floating point number for the new value of the slider.\n * TODO clean this up, there's a lot of repeated code between this and the _setHandlePos fn.\n */\n _handleEvent(e, $handle, val) {\n var value;\n if (!val) {//click or drag events\n e.preventDefault();\n var _this = this,\n vertical = this.options.vertical,\n param = vertical ? 'height' : 'width',\n direction = vertical ? 'top' : 'left',\n eventOffset = vertical ? e.pageY : e.pageX,\n barDim = this.$element[0].getBoundingClientRect()[param],\n windowScroll = vertical ? $(window).scrollTop() : $(window).scrollLeft();\n\n var elemOffset = this.$element.offset()[direction];\n\n // touch events emulated by the touch util give position relative to screen, add window.scroll to event coordinates...\n // best way to guess this is simulated is if clientY == pageY\n if (e.clientY === e.pageY) { eventOffset = eventOffset + windowScroll; }\n var eventFromBar = eventOffset - elemOffset;\n var barXY;\n if (eventFromBar < 0) {\n barXY = 0;\n } else if (eventFromBar > barDim) {\n barXY = barDim;\n } else {\n barXY = eventFromBar;\n }\n var offsetPct = percent(barXY, barDim);\n\n value = this._value(offsetPct);\n\n // turn everything around for RTL, yay math!\n if (Rtl() && !this.options.vertical) {value = this.options.end - value;}\n\n value = _this._adjustValue(null, value);\n\n if (!$handle) {//figure out which handle it is, pass it to the next function.\n var firstHndlPos = absPosition(this.$handle, direction, barXY, param),\n secndHndlPos = absPosition(this.$handle2, direction, barXY, param);\n $handle = firstHndlPos <= secndHndlPos ? this.$handle : this.$handle2;\n }\n\n } else {//change event on input\n value = this._adjustValue(null, val);\n }\n\n this._setHandlePos($handle, value);\n }\n\n /**\n * Adjustes value for handle in regard to step value. returns adjusted value\n * @function\n * @private\n * @param {jQuery} $handle - the selected handle.\n * @param {Number} value - value to adjust. used if $handle is falsy\n */\n _adjustValue($handle, value) {\n var val,\n step = this.options.step,\n div = parseFloat(step/2),\n left, previousVal, nextVal;\n if (!!$handle) {\n val = parseFloat($handle.attr('aria-valuenow'));\n }\n else {\n val = value;\n }\n if (val >= 0) {\n left = val % step;\n } else {\n left = step + (val % step);\n }\n previousVal = val - left;\n nextVal = previousVal + step;\n if (left === 0) {\n return val;\n }\n val = val >= previousVal + div ? nextVal : previousVal;\n return val;\n }\n\n /**\n * Adds event listeners to the slider elements.\n * @function\n * @private\n */\n _events() {\n this._eventsForHandle(this.$handle);\n if(this.handles[1]) {\n this._eventsForHandle(this.$handle2);\n }\n }\n\n\n /**\n * Adds event listeners a particular handle\n * @function\n * @private\n * @param {jQuery} $handle - the current handle to apply listeners to.\n */\n _eventsForHandle($handle) {\n var _this = this,\n curHandle;\n\n const handleChangeEvent = function(e) {\n const idx = _this.inputs.index($(this));\n _this._handleEvent(e, _this.handles.eq(idx), $(this).val());\n };\n\n // IE only triggers the change event when the input loses focus which strictly follows the HTML specification\n // listen for the enter key and trigger a change\n // @see https://html.spec.whatwg.org/multipage/input.html#common-input-element-events\n this.inputs.off('keyup.zf.slider').on('keyup.zf.slider', function (e) {\n if(e.keyCode === 13) handleChangeEvent.call(this, e);\n });\n\n this.inputs.off('change.zf.slider').on('change.zf.slider', handleChangeEvent);\n\n if (this.options.clickSelect) {\n this.$element.off('click.zf.slider').on('click.zf.slider', function(e) {\n if (_this.$element.data('dragging')) { return false; }\n\n if (!$(e.target).is('[data-slider-handle]')) {\n if (_this.options.doubleSided) {\n _this._handleEvent(e);\n } else {\n _this._handleEvent(e, _this.$handle);\n }\n }\n });\n }\n\n if (this.options.draggable) {\n this.handles.addTouch();\n\n var $body = $('body');\n $handle\n .off('mousedown.zf.slider')\n .on('mousedown.zf.slider', function(e) {\n $handle.addClass('is-dragging');\n _this.$fill.addClass('is-dragging');//\n _this.$element.data('dragging', true);\n\n curHandle = $(e.currentTarget);\n\n $body.on('mousemove.zf.slider', function(ev) {\n ev.preventDefault();\n _this._handleEvent(ev, curHandle);\n\n }).on('mouseup.zf.slider', function(ev) {\n _this._handleEvent(ev, curHandle);\n\n $handle.removeClass('is-dragging');\n _this.$fill.removeClass('is-dragging');\n _this.$element.data('dragging', false);\n\n $body.off('mousemove.zf.slider mouseup.zf.slider');\n });\n })\n // prevent events triggered by touch\n .on('selectstart.zf.slider touchmove.zf.slider', function(e) {\n e.preventDefault();\n });\n }\n\n $handle.off('keydown.zf.slider').on('keydown.zf.slider', function(e) {\n var _$handle = $(this),\n idx = _this.options.doubleSided ? _this.handles.index(_$handle) : 0,\n oldValue = parseFloat(_this.inputs.eq(idx).val()),\n newValue;\n\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Slider', {\n decrease: function() {\n newValue = oldValue - _this.options.step;\n },\n increase: function() {\n newValue = oldValue + _this.options.step;\n },\n decreaseFast: function() {\n newValue = oldValue - _this.options.step * 10;\n },\n increaseFast: function() {\n newValue = oldValue + _this.options.step * 10;\n },\n min: function() {\n newValue = _this.options.start;\n },\n max: function() {\n newValue = _this.options.end;\n },\n handled: function() { // only set handle pos when event was handled specially\n e.preventDefault();\n _this._setHandlePos(_$handle, newValue);\n }\n });\n /*if (newValue) { // if pressed key has special function, update value\n e.preventDefault();\n _this._setHandlePos(_$handle, newValue);\n }*/\n });\n }\n\n /**\n * Destroys the slider plugin.\n */\n _destroy() {\n this.handles.off('.zf.slider');\n this.inputs.off('.zf.slider');\n this.$element.off('.zf.slider');\n\n clearTimeout(this.timeout);\n }\n}\n\nSlider.defaults = {\n /**\n * Minimum value for the slider scale.\n * @option\n * @type {number}\n * @default 0\n */\n start: 0,\n /**\n * Maximum value for the slider scale.\n * @option\n * @type {number}\n * @default 100\n */\n end: 100,\n /**\n * Minimum value change per change event.\n * @option\n * @type {number}\n * @default 1\n */\n step: 1,\n /**\n * Value at which the handle/input *(left handle/first input)* should be set to on initialization.\n * @option\n * @type {number}\n * @default 0\n */\n initialStart: 0,\n /**\n * Value at which the right handle/second input should be set to on initialization.\n * @option\n * @type {number}\n * @default 100\n */\n initialEnd: 100,\n /**\n * Allows the input to be located outside the container and visible. Set to by the JS\n * @option\n * @type {boolean}\n * @default false\n */\n binding: false,\n /**\n * Allows the user to click/tap on the slider bar to select a value.\n * @option\n * @type {boolean}\n * @default true\n */\n clickSelect: true,\n /**\n * Set to true and use the `vertical` class to change alignment to vertical.\n * @option\n * @type {boolean}\n * @default false\n */\n vertical: false,\n /**\n * Allows the user to drag the slider handle(s) to select a value.\n * @option\n * @type {boolean}\n * @default true\n */\n draggable: true,\n /**\n * Disables the slider and prevents event listeners from being applied. Double checked by JS with `disabledClass`.\n * @option\n * @type {boolean}\n * @default false\n */\n disabled: false,\n /**\n * Allows the use of two handles. Double checked by the JS. Changes some logic handling.\n * @option\n * @type {boolean}\n * @default false\n */\n doubleSided: false,\n /**\n * Potential future feature.\n */\n // steps: 100,\n /**\n * Number of decimal places the plugin should go to for floating point precision.\n * @option\n * @type {number}\n * @default 2\n */\n decimal: 2,\n /**\n * Time delay for dragged elements.\n */\n // dragDelay: 0,\n /**\n * Time, in ms, to animate the movement of a slider handle if user clicks/taps on the bar. Needs to be manually set if updating the transition time in the Sass settings.\n * @option\n * @type {number}\n * @default 200\n */\n moveTime: 200,//update this if changing the transition time in the sass\n /**\n * Class applied to disabled sliders.\n * @option\n * @type {string}\n * @default 'disabled'\n */\n disabledClass: 'disabled',\n /**\n * Will invert the default layout for a vertical<span data-tooltip title=\"who would do this???\"> </span>slider.\n * @option\n * @type {boolean}\n * @default false\n */\n invertVertical: false,\n /**\n * Milliseconds before the `changed.zf-slider` event is triggered after value change.\n * @option\n * @type {number}\n * @default 500\n */\n changedDelay: 500,\n /**\n * Basevalue for non-linear sliders\n * @option\n * @type {number}\n * @default 5\n */\n nonLinearBase: 5,\n /**\n * Basevalue for non-linear sliders, possible values are: `'linear'`, `'pow'` & `'log'`. Pow and Log use the nonLinearBase setting.\n * @option\n * @type {string}\n * @default 'linear'\n */\n positionValueFunction: 'linear',\n};\n\nfunction percent(frac, num) {\n return (frac / num);\n}\nfunction absPosition($handle, dir, clickPos, param) {\n return Math.abs(($handle.position()[dir] + ($handle[param]() / 2)) - clickPos);\n}\nfunction baseLog(base, value) {\n return Math.log(value)/Math.log(base)\n}\n\nexport {Slider};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Sticky module.\n * @module foundation.sticky\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n */\n\nclass Sticky extends Plugin {\n /**\n * Creates a new instance of a sticky thing.\n * @class\n * @name Sticky\n * @param {jQuery} element - jQuery object to make sticky.\n * @param {Object} options - options object passed when creating the element programmatically.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Sticky.defaults, this.$element.data(), options);\n this.className = 'Sticky'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n }\n\n /**\n * Initializes the sticky element by adding classes, getting/setting dimensions, breakpoints and attributes\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n var $parent = this.$element.parent('[data-sticky-container]'),\n id = this.$element[0].id || GetYoDigits(6, 'sticky'),\n _this = this;\n\n if($parent.length){\n this.$container = $parent;\n } else {\n this.wasWrapped = true;\n this.$element.wrap(this.options.container);\n this.$container = this.$element.parent();\n }\n this.$container.addClass(this.options.containerClass);\n\n this.$element.addClass(this.options.stickyClass).attr({ 'data-resize': id, 'data-mutate': id });\n if (this.options.anchor !== '') {\n $('#' + _this.options.anchor).attr({ 'data-mutate': id });\n }\n\n this.scrollCount = this.options.checkEvery;\n this.isStuck = false;\n this.onLoadListener = onLoad($(window), function () {\n //We calculate the container height to have correct values for anchor points offset calculation.\n _this.containerHeight = _this.$element.css(\"display\") === \"none\" ? 0 : _this.$element[0].getBoundingClientRect().height;\n _this.$container.css('height', _this.containerHeight);\n _this.elemHeight = _this.containerHeight;\n if (_this.options.anchor !== '') {\n _this.$anchor = $('#' + _this.options.anchor);\n } else {\n _this._parsePoints();\n }\n\n _this._setSizes(function () {\n var scroll = window.pageYOffset;\n _this._calc(false, scroll);\n //Unstick the element will ensure that proper classes are set.\n if (!_this.isStuck) {\n _this._removeSticky((scroll >= _this.topPoint) ? false : true);\n }\n });\n _this._events(id.split('-').reverse().join('-'));\n });\n }\n\n /**\n * If using multiple elements as anchors, calculates the top and bottom pixel values the sticky thing should stick and unstick on.\n * @function\n * @private\n */\n _parsePoints() {\n var top = this.options.topAnchor === \"\" ? 1 : this.options.topAnchor,\n btm = this.options.btmAnchor === \"\" ? document.documentElement.scrollHeight : this.options.btmAnchor,\n pts = [top, btm],\n breaks = {};\n for (var i = 0, len = pts.length; i < len && pts[i]; i++) {\n var pt;\n if (typeof pts[i] === 'number') {\n pt = pts[i];\n } else {\n var place = pts[i].split(':'),\n anchor = $(`#${place[0]}`);\n\n pt = anchor.offset().top;\n if (place[1] && place[1].toLowerCase() === 'bottom') {\n pt += anchor[0].getBoundingClientRect().height;\n }\n }\n breaks[i] = pt;\n }\n\n\n this.points = breaks;\n return;\n }\n\n /**\n * Adds event handlers for the scrolling element.\n * @private\n * @param {String} id - pseudo-random id for unique scroll event listener.\n */\n _events(id) {\n var _this = this,\n scrollListener = this.scrollListener = `scroll.zf.${id}`;\n if (this.isOn) { return; }\n if (this.canStick) {\n this.isOn = true;\n $(window).off(scrollListener)\n .on(scrollListener, function() {\n if (_this.scrollCount === 0) {\n _this.scrollCount = _this.options.checkEvery;\n _this._setSizes(function() {\n _this._calc(false, window.pageYOffset);\n });\n } else {\n _this.scrollCount--;\n _this._calc(false, window.pageYOffset);\n }\n });\n }\n\n this.$element.off('resizeme.zf.trigger')\n .on('resizeme.zf.trigger', function() {\n _this._eventsHandler(id);\n });\n\n this.$element.on('mutateme.zf.trigger', function () {\n _this._eventsHandler(id);\n });\n\n if(this.$anchor) {\n this.$anchor.on('mutateme.zf.trigger', function () {\n _this._eventsHandler(id);\n });\n }\n }\n\n /**\n * Handler for events.\n * @private\n * @param {String} id - pseudo-random id for unique scroll event listener.\n */\n _eventsHandler(id) {\n var _this = this,\n scrollListener = this.scrollListener = `scroll.zf.${id}`;\n\n _this._setSizes(function() {\n _this._calc(false);\n if (_this.canStick) {\n if (!_this.isOn) {\n _this._events(id);\n }\n } else if (_this.isOn) {\n _this._pauseListeners(scrollListener);\n }\n });\n }\n\n /**\n * Removes event handlers for scroll and change events on anchor.\n * @fires Sticky#pause\n * @param {String} scrollListener - unique, namespaced scroll listener attached to `window`\n */\n _pauseListeners(scrollListener) {\n this.isOn = false;\n $(window).off(scrollListener);\n\n /**\n * Fires when the plugin is paused due to resize event shrinking the view.\n * @event Sticky#pause\n * @private\n */\n this.$element.trigger('pause.zf.sticky');\n }\n\n /**\n * Called on every `scroll` event and on `_init`\n * fires functions based on booleans and cached values\n * @param {Boolean} checkSizes - true if plugin should recalculate sizes and breakpoints.\n * @param {Number} scroll - current scroll position passed from scroll event cb function. If not passed, defaults to `window.pageYOffset`.\n */\n _calc(checkSizes, scroll) {\n if (checkSizes) { this._setSizes(); }\n\n if (!this.canStick) {\n if (this.isStuck) {\n this._removeSticky(true);\n }\n return false;\n }\n\n if (!scroll) { scroll = window.pageYOffset; }\n\n if (scroll >= this.topPoint) {\n if (scroll <= this.bottomPoint) {\n if (!this.isStuck) {\n this._setSticky();\n }\n } else {\n if (this.isStuck) {\n this._removeSticky(false);\n }\n }\n } else {\n if (this.isStuck) {\n this._removeSticky(true);\n }\n }\n }\n\n /**\n * Causes the $element to become stuck.\n * Adds `position: fixed;`, and helper classes.\n * @fires Sticky#stuckto\n * @function\n * @private\n */\n _setSticky() {\n var _this = this,\n stickTo = this.options.stickTo,\n mrgn = stickTo === 'top' ? 'marginTop' : 'marginBottom',\n notStuckTo = stickTo === 'top' ? 'bottom' : 'top',\n css = {};\n\n css[mrgn] = `${this.options[mrgn]}em`;\n css[stickTo] = 0;\n css[notStuckTo] = 'auto';\n this.isStuck = true;\n this.$element.removeClass(`is-anchored is-at-${notStuckTo}`)\n .addClass(`is-stuck is-at-${stickTo}`)\n .css(css)\n /**\n * Fires when the $element has become `position: fixed;`\n * Namespaced to `top` or `bottom`, e.g. `sticky.zf.stuckto:top`\n * @event Sticky#stuckto\n */\n .trigger(`sticky.zf.stuckto:${stickTo}`);\n this.$element.on(\"transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd\", function() {\n _this._setSizes();\n });\n }\n\n /**\n * Causes the $element to become unstuck.\n * Removes `position: fixed;`, and helper classes.\n * Adds other helper classes.\n * @param {Boolean} isTop - tells the function if the $element should anchor to the top or bottom of its $anchor element.\n * @fires Sticky#unstuckfrom\n * @private\n */\n _removeSticky(isTop) {\n var stickTo = this.options.stickTo,\n stickToTop = stickTo === 'top',\n css = {},\n anchorPt = (this.points ? this.points[1] - this.points[0] : this.anchorHeight) - this.elemHeight,\n mrgn = stickToTop ? 'marginTop' : 'marginBottom',\n topOrBottom = isTop ? 'top' : 'bottom';\n\n css[mrgn] = 0;\n\n css.bottom = 'auto';\n if(isTop) {\n css.top = 0;\n } else {\n css.top = anchorPt;\n }\n\n this.isStuck = false;\n this.$element.removeClass(`is-stuck is-at-${stickTo}`)\n .addClass(`is-anchored is-at-${topOrBottom}`)\n .css(css)\n /**\n * Fires when the $element has become anchored.\n * Namespaced to `top` or `bottom`, e.g. `sticky.zf.unstuckfrom:bottom`\n * @event Sticky#unstuckfrom\n */\n .trigger(`sticky.zf.unstuckfrom:${topOrBottom}`);\n }\n\n /**\n * Sets the $element and $container sizes for plugin.\n * Calls `_setBreakPoints`.\n * @param {Function} cb - optional callback function to fire on completion of `_setBreakPoints`.\n * @private\n */\n _setSizes(cb) {\n this.canStick = MediaQuery.is(this.options.stickyOn);\n if (!this.canStick) {\n if (cb && typeof cb === 'function') { cb(); }\n }\n\n var newElemWidth = this.$container[0].getBoundingClientRect().width,\n comp = window.getComputedStyle(this.$container[0]),\n pdngl = parseInt(comp['padding-left'], 10),\n pdngr = parseInt(comp['padding-right'], 10);\n\n if (this.$anchor && this.$anchor.length) {\n this.anchorHeight = this.$anchor[0].getBoundingClientRect().height;\n } else {\n this._parsePoints();\n }\n\n this.$element.css({\n 'max-width': `${newElemWidth - pdngl - pdngr}px`\n });\n\n // Recalculate the height only if it is \"dynamic\"\n if (this.options.dynamicHeight || !this.containerHeight) {\n // Get the sticked element height and apply it to the container to \"hold the place\"\n var newContainerHeight = this.$element[0].getBoundingClientRect().height || this.containerHeight;\n newContainerHeight = this.$element.css(\"display\") === \"none\" ? 0 : newContainerHeight;\n this.$container.css('height', newContainerHeight);\n this.containerHeight = newContainerHeight;\n }\n this.elemHeight = this.containerHeight;\n\n if (!this.isStuck) {\n if (this.$element.hasClass('is-at-bottom')) {\n var anchorPt = (this.points ? this.points[1] - this.$container.offset().top : this.anchorHeight) - this.elemHeight;\n this.$element.css('top', anchorPt);\n }\n }\n\n this._setBreakPoints(this.containerHeight, function() {\n if (cb && typeof cb === 'function') { cb(); }\n });\n }\n\n /**\n * Sets the upper and lower breakpoints for the element to become sticky/unsticky.\n * @param {Number} elemHeight - px value for sticky.$element height, calculated by `_setSizes`.\n * @param {Function} cb - optional callback function to be called on completion.\n * @private\n */\n _setBreakPoints(elemHeight, cb) {\n if (!this.canStick) {\n if (cb && typeof cb === 'function') { cb(); }\n else { return false; }\n }\n var mTop = emCalc(this.options.marginTop),\n mBtm = emCalc(this.options.marginBottom),\n topPoint = this.points ? this.points[0] : this.$anchor.offset().top,\n bottomPoint = this.points ? this.points[1] : topPoint + this.anchorHeight,\n // topPoint = this.$anchor.offset().top || this.points[0],\n // bottomPoint = topPoint + this.anchorHeight || this.points[1],\n winHeight = window.innerHeight;\n\n if (this.options.stickTo === 'top') {\n topPoint -= mTop;\n bottomPoint -= (elemHeight + mTop);\n } else if (this.options.stickTo === 'bottom') {\n topPoint -= (winHeight - (elemHeight + mBtm));\n bottomPoint -= (winHeight - mBtm);\n } else {\n //this would be the stickTo: both option... tricky\n }\n\n this.topPoint = topPoint;\n this.bottomPoint = bottomPoint;\n\n if (cb && typeof cb === 'function') { cb(); }\n }\n\n /**\n * Destroys the current sticky element.\n * Resets the element to the top position first.\n * Removes event listeners, JS-added css properties and classes, and unwraps the $element if the JS added the $container.\n * @function\n */\n _destroy() {\n this._removeSticky(true);\n\n this.$element.removeClass(`${this.options.stickyClass} is-anchored is-at-top`)\n .css({\n height: '',\n top: '',\n bottom: '',\n 'max-width': ''\n })\n .off('resizeme.zf.trigger')\n .off('mutateme.zf.trigger');\n if (this.$anchor && this.$anchor.length) {\n this.$anchor.off('change.zf.sticky');\n }\n if (this.scrollListener) $(window).off(this.scrollListener)\n if (this.onLoadListener) $(window).off(this.onLoadListener)\n\n if (this.wasWrapped) {\n this.$element.unwrap();\n } else {\n this.$container.removeClass(this.options.containerClass)\n .css({\n height: ''\n });\n }\n }\n}\n\nSticky.defaults = {\n /**\n * Customizable container template. Add your own classes for styling and sizing.\n * @option\n * @type {string}\n * @default '&lt;div data-sticky-container&gt;&lt;/div&gt;'\n */\n container: '<div data-sticky-container></div>',\n /**\n * Location in the view the element sticks to. Can be `'top'` or `'bottom'`.\n * @option\n * @type {string}\n * @default 'top'\n */\n stickTo: 'top',\n /**\n * If anchored to a single element, the id of that element.\n * @option\n * @type {string}\n * @default ''\n */\n anchor: '',\n /**\n * If using more than one element as anchor points, the id of the top anchor.\n * @option\n * @type {string}\n * @default ''\n */\n topAnchor: '',\n /**\n * If using more than one element as anchor points, the id of the bottom anchor.\n * @option\n * @type {string}\n * @default ''\n */\n btmAnchor: '',\n /**\n * Margin, in `em`'s to apply to the top of the element when it becomes sticky.\n * @option\n * @type {number}\n * @default 1\n */\n marginTop: 1,\n /**\n * Margin, in `em`'s to apply to the bottom of the element when it becomes sticky.\n * @option\n * @type {number}\n * @default 1\n */\n marginBottom: 1,\n /**\n * Breakpoint string that is the minimum screen size an element should become sticky.\n * @option\n * @type {string}\n * @default 'medium'\n */\n stickyOn: 'medium',\n /**\n * Class applied to sticky element, and removed on destruction. Foundation defaults to `sticky`.\n * @option\n * @type {string}\n * @default 'sticky'\n */\n stickyClass: 'sticky',\n /**\n * Class applied to sticky container. Foundation defaults to `sticky-container`.\n * @option\n * @type {string}\n * @default 'sticky-container'\n */\n containerClass: 'sticky-container',\n /**\n * If true (by default), keep the sticky container the same height as the element. Otherwise, the container height is set once and does not change.\n * @option\n * @type {boolean}\n * @default true\n */\n dynamicHeight: true,\n /**\n * Number of scroll events between the plugin's recalculating sticky points. Setting it to `0` will cause it to recalc every scroll event, setting it to `-1` will prevent recalc on scroll.\n * @option\n * @type {number}\n * @default -1\n */\n checkEvery: -1\n};\n\n/**\n * Helper function to calculate em values\n * @param Number {em} - number of em's to calculate into pixels\n */\nfunction emCalc(em) {\n return parseInt(window.getComputedStyle(document.body, null).fontSize, 10) * em;\n}\n\nexport {Sticky};\n","import $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { onLoad } from './foundation.core.utils';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { onImagesLoaded } from './foundation.util.imageLoader';\n/**\n * Tabs module.\n * @module foundation.tabs\n * @requires foundation.util.keyboard\n * @requires foundation.util.imageLoader if tabs contain images\n */\n\nclass Tabs extends Plugin {\n /**\n * Creates a new instance of tabs.\n * @class\n * @name Tabs\n * @fires Tabs#init\n * @param {jQuery} element - jQuery object to make into tabs.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Tabs.defaults, this.$element.data(), options);\n this.className = 'Tabs'; // ie9 back compat\n\n this._init();\n Keyboard.register('Tabs', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'previous',\n 'ARROW_DOWN': 'next',\n 'ARROW_LEFT': 'previous'\n // 'TAB': 'next',\n // 'SHIFT_TAB': 'previous'\n });\n }\n\n /**\n * Initializes the tabs by showing and focusing (if autoFocus=true) the preset active tab.\n * @private\n */\n _init() {\n var _this = this;\n this._isInitializing = true;\n\n this.$element.attr({'role': 'tablist'});\n this.$tabTitles = this.$element.find(`.${this.options.linkClass}`);\n this.$tabContent = $(`[data-tabs-content=\"${this.$element[0].id}\"]`);\n\n this.$tabTitles.each(function(){\n var $elem = $(this),\n $link = $elem.find('a'),\n isActive = $elem.hasClass(`${_this.options.linkActiveClass}`),\n hash = $link.attr('data-tabs-target') || $link[0].hash.slice(1),\n linkId = $link[0].id ? $link[0].id : `${hash}-label`,\n $tabContent = $(`#${hash}`);\n\n $elem.attr({'role': 'presentation'});\n\n $link.attr({\n 'role': 'tab',\n 'aria-controls': hash,\n 'aria-selected': isActive,\n 'id': linkId,\n 'tabindex': isActive ? '0' : '-1'\n });\n\n $tabContent.attr({\n 'role': 'tabpanel',\n 'aria-labelledby': linkId\n });\n\n // Save up the initial hash to return to it later when going back in history\n if (isActive) {\n _this._initialAnchor = `#${hash}`;\n }\n\n if(!isActive) {\n $tabContent.attr('aria-hidden', 'true');\n }\n\n if(isActive && _this.options.autoFocus){\n _this.onLoadListener = onLoad($(window), function() {\n $('html, body').animate({ scrollTop: $elem.offset().top }, _this.options.deepLinkSmudgeDelay, () => {\n $link.focus();\n });\n });\n }\n });\n\n if(this.options.matchHeight) {\n var $images = this.$tabContent.find('img');\n\n if ($images.length) {\n onImagesLoaded($images, this._setHeight.bind(this));\n } else {\n this._setHeight();\n }\n }\n\n // Current context-bound function to open tabs on page load or history hashchange\n this._checkDeepLink = () => {\n var anchor = window.location.hash;\n\n if (!anchor.length) {\n // If we are still initializing and there is no anchor, then there is nothing to do\n if (this._isInitializing) return;\n // Otherwise, move to the initial anchor\n if (this._initialAnchor) anchor = this._initialAnchor;\n }\n\n var anchorNoHash = anchor.indexOf('#') >= 0 ? anchor.slice(1) : anchor;\n var $anchor = anchorNoHash && $(`#${anchorNoHash}`);\n var $link = anchor && this.$element.find(`[href$=\"${anchor}\"],[data-tabs-target=\"${anchorNoHash}\"]`).first();\n // Whether the anchor element that has been found is part of this element\n var isOwnAnchor = !!($anchor.length && $link.length);\n\n if (isOwnAnchor) {\n // If there is an anchor for the hash, select it\n if ($anchor && $anchor.length && $link && $link.length) {\n this.selectTab($anchor, true);\n }\n // Otherwise, collapse everything\n else {\n this._collapse();\n }\n\n // Roll up a little to show the titles\n if (this.options.deepLinkSmudge) {\n var offset = this.$element.offset();\n $('html, body').animate({ scrollTop: offset.top - this.options.deepLinkSmudgeOffset}, this.options.deepLinkSmudgeDelay);\n }\n\n /**\n * Fires when the plugin has deeplinked at pageload\n * @event Tabs#deeplink\n */\n this.$element.trigger('deeplink.zf.tabs', [$link, $anchor]);\n }\n }\n\n //use browser to open a tab, if it exists in this tabset\n if (this.options.deepLink) {\n this._checkDeepLink();\n }\n\n this._events();\n\n this._isInitializing = false;\n }\n\n /**\n * Adds event handlers for items within the tabs.\n * @private\n */\n _events() {\n this._addKeyHandler();\n this._addClickHandler();\n this._setHeightMqHandler = null;\n\n if (this.options.matchHeight) {\n this._setHeightMqHandler = this._setHeight.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._setHeightMqHandler);\n }\n\n if(this.options.deepLink) {\n $(window).on('hashchange', this._checkDeepLink);\n }\n }\n\n /**\n * Adds click handlers for items within the tabs.\n * @private\n */\n _addClickHandler() {\n var _this = this;\n\n this.$element\n .off('click.zf.tabs')\n .on('click.zf.tabs', `.${this.options.linkClass}`, function(e){\n e.preventDefault();\n _this._handleTabChange($(this));\n });\n }\n\n /**\n * Adds keyboard event handlers for items within the tabs.\n * @private\n */\n _addKeyHandler() {\n var _this = this;\n\n this.$tabTitles.off('keydown.zf.tabs').on('keydown.zf.tabs', function(e){\n if (e.which === 9) return;\n\n\n var $element = $(this),\n $elements = $element.parent('ul').children('li'),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n if (_this.options.wrapOnKeys) {\n $prevElement = i === 0 ? $elements.last() : $elements.eq(i-1);\n $nextElement = i === $elements.length -1 ? $elements.first() : $elements.eq(i+1);\n } else {\n $prevElement = $elements.eq(Math.max(0, i-1));\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1));\n }\n return;\n }\n });\n\n // handle keyboard event with keyboard util\n Keyboard.handleKey(e, 'Tabs', {\n open: function() {\n $element.find('[role=\"tab\"]').focus();\n _this._handleTabChange($element);\n },\n previous: function() {\n $prevElement.find('[role=\"tab\"]').focus();\n _this._handleTabChange($prevElement);\n },\n next: function() {\n $nextElement.find('[role=\"tab\"]').focus();\n _this._handleTabChange($nextElement);\n },\n handled: function() {\n e.preventDefault();\n }\n });\n });\n }\n\n /**\n * Opens the tab `$targetContent` defined by `$target`. Collapses active tab.\n * @param {jQuery} $target - Tab to open.\n * @param {boolean} historyHandled - browser has already handled a history update\n * @fires Tabs#change\n * @function\n */\n _handleTabChange($target, historyHandled) {\n\n // With `activeCollapse`, if the target is the active Tab, collapse it.\n if ($target.hasClass(`${this.options.linkActiveClass}`)) {\n if(this.options.activeCollapse) {\n this._collapse();\n }\n return;\n }\n\n var $oldTab = this.$element.\n find(`.${this.options.linkClass}.${this.options.linkActiveClass}`),\n $tabLink = $target.find('[role=\"tab\"]'),\n target = $tabLink.attr('data-tabs-target'),\n anchor = target && target.length ? `#${target}` : $tabLink[0].hash,\n $targetContent = this.$tabContent.find(anchor);\n\n //close old tab\n this._collapseTab($oldTab);\n\n //open new tab\n this._openTab($target);\n\n //either replace or update browser history\n if (this.options.deepLink && !historyHandled) {\n if (this.options.updateHistory) {\n history.pushState({}, '', anchor);\n } else {\n history.replaceState({}, '', anchor);\n }\n }\n\n /**\n * Fires when the plugin has successfully changed tabs.\n * @event Tabs#change\n */\n this.$element.trigger('change.zf.tabs', [$target, $targetContent]);\n\n //fire to children a mutation event\n $targetContent.find(\"[data-mutate]\").trigger(\"mutateme.zf.trigger\");\n }\n\n /**\n * Opens the tab `$targetContent` defined by `$target`.\n * @param {jQuery} $target - Tab to open.\n * @function\n */\n _openTab($target) {\n var $tabLink = $target.find('[role=\"tab\"]'),\n hash = $tabLink.attr('data-tabs-target') || $tabLink[0].hash.slice(1),\n $targetContent = this.$tabContent.find(`#${hash}`);\n\n $target.addClass(`${this.options.linkActiveClass}`);\n\n $tabLink.attr({\n 'aria-selected': 'true',\n 'tabindex': '0'\n });\n\n $targetContent\n .addClass(`${this.options.panelActiveClass}`).removeAttr('aria-hidden');\n }\n\n /**\n * Collapses `$targetContent` defined by `$target`.\n * @param {jQuery} $target - Tab to collapse.\n * @function\n */\n _collapseTab($target) {\n var $targetAnchor = $target\n .removeClass(`${this.options.linkActiveClass}`)\n .find('[role=\"tab\"]')\n .attr({\n 'aria-selected': 'false',\n 'tabindex': -1\n });\n\n $(`#${$targetAnchor.attr('aria-controls')}`)\n .removeClass(`${this.options.panelActiveClass}`)\n .attr({ 'aria-hidden': 'true' })\n }\n\n /**\n * Collapses the active Tab.\n * @fires Tabs#collapse\n * @function\n */\n _collapse() {\n var $activeTab = this.$element.find(`.${this.options.linkClass}.${this.options.linkActiveClass}`);\n\n if ($activeTab.length) {\n this._collapseTab($activeTab);\n\n /**\n * Fires when the plugin has successfully collapsed tabs.\n * @event Tabs#collapse\n */\n this.$element.trigger('collapse.zf.tabs', [$activeTab]);\n }\n }\n\n /**\n * Public method for selecting a content pane to display.\n * @param {jQuery | String} elem - jQuery object or string of the id of the pane to display.\n * @param {boolean} historyHandled - browser has already handled a history update\n * @function\n */\n selectTab(elem, historyHandled) {\n var idStr, hashIdStr;\n\n if (typeof elem === 'object') {\n idStr = elem[0].id;\n } else {\n idStr = elem;\n }\n\n if (idStr.indexOf('#') < 0) {\n hashIdStr = `#${idStr}`;\n } else {\n hashIdStr = idStr;\n idStr = idStr.slice(1);\n }\n\n var $target = this.$tabTitles.has(`[href$=\"${hashIdStr}\"],[data-tabs-target=\"${idStr}\"]`).first();\n\n this._handleTabChange($target, historyHandled);\n };\n\n /**\n * Sets the height of each panel to the height of the tallest panel.\n * If enabled in options, gets called on media query change.\n * If loading content via external source, can be called directly or with _reflow.\n * If enabled with `data-match-height=\"true\"`, tabs sets to equal height\n * @function\n * @private\n */\n _setHeight() {\n var max = 0,\n _this = this; // Lock down the `this` value for the root tabs object\n\n if (!this.$tabContent) {\n return;\n }\n\n this.$tabContent\n .find(`.${this.options.panelClass}`)\n .css('min-height', '')\n .each(function() {\n\n var panel = $(this),\n isActive = panel.hasClass(`${_this.options.panelActiveClass}`); // get the options from the parent instead of trying to get them from the child\n\n if (!isActive) {\n panel.css({'visibility': 'hidden', 'display': 'block'});\n }\n\n var temp = this.getBoundingClientRect().height;\n\n if (!isActive) {\n panel.css({\n 'visibility': '',\n 'display': ''\n });\n }\n\n max = temp > max ? temp : max;\n })\n .css('min-height', `${max}px`);\n }\n\n /**\n * Destroys an instance of tabs.\n * @fires Tabs#destroyed\n */\n _destroy() {\n this.$element\n .find(`.${this.options.linkClass}`)\n .off('.zf.tabs').hide().end()\n .find(`.${this.options.panelClass}`)\n .hide();\n\n if (this.options.matchHeight) {\n if (this._setHeightMqHandler != null) {\n $(window).off('changed.zf.mediaquery', this._setHeightMqHandler);\n }\n }\n\n if (this.options.deepLink) {\n $(window).off('hashchange', this._checkDeepLink);\n }\n\n if (this.onLoadListener) {\n $(window).off(this.onLoadListener);\n }\n }\n}\n\nTabs.defaults = {\n /**\n * Link the location hash to the active pane.\n * Set the location hash when the active pane changes, and open the corresponding pane when the location changes.\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n\n /**\n * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the tab panel is visible\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinkSmudge: false,\n\n /**\n * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment\n * @option\n * @type {number}\n * @default 300\n */\n deepLinkSmudgeDelay: 300,\n\n /**\n * If `deepLinkSmudge` is enabled, animation offset from the top for the deep link adjustment\n * @option\n * @type {number}\n * @default 0\n */\n deepLinkSmudgeOffset: 0,\n\n /**\n * If `deepLink` is enabled, update the browser history with the open tab\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false,\n\n /**\n * Allows the window to scroll to content of active pane on load.\n * Not recommended if more than one tab panel per page.\n * @option\n * @type {boolean}\n * @default false\n */\n autoFocus: false,\n\n /**\n * Allows keyboard input to 'wrap' around the tab links.\n * @option\n * @type {boolean}\n * @default true\n */\n wrapOnKeys: true,\n\n /**\n * Allows the tab content panes to match heights if set to true.\n * @option\n * @type {boolean}\n * @default false\n */\n matchHeight: false,\n\n /**\n * Allows active tabs to collapse when clicked.\n * @option\n * @type {boolean}\n * @default false\n */\n activeCollapse: false,\n\n /**\n * Class applied to `li`'s in tab link list.\n * @option\n * @type {string}\n * @default 'tabs-title'\n */\n linkClass: 'tabs-title',\n\n /**\n * Class applied to the active `li` in tab link list.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n linkActiveClass: 'is-active',\n\n /**\n * Class applied to the content containers.\n * @option\n * @type {string}\n * @default 'tabs-panel'\n */\n panelClass: 'tabs-panel',\n\n /**\n * Class applied to the active content container.\n * @option\n * @type {string}\n * @default 'is-active'\n */\n panelActiveClass: 'is-active'\n};\n\nexport {Tabs};\n","import $ from 'jquery';\nimport { Motion } from './foundation.util.motion';\nimport { Plugin } from './foundation.core.plugin';\nimport { RegExpEscape } from './foundation.core.utils';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Toggler module.\n * @module foundation.toggler\n * @requires foundation.util.motion\n * @requires foundation.util.triggers\n */\n\nclass Toggler extends Plugin {\n /**\n * Creates a new instance of Toggler.\n * @class\n * @name Toggler\n * @fires Toggler#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Toggler.defaults, element.data(), options);\n this.className = '';\n this.className = 'Toggler'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Toggler plugin by parsing the toggle class from data-toggler, or animation classes from data-animate.\n * @function\n * @private\n */\n _init() {\n // Collect triggers to set ARIA attributes to\n var id = this.$element[0].id,\n $triggers = $(`[data-open~=\"${id}\"], [data-close~=\"${id}\"], [data-toggle~=\"${id}\"]`);\n\n var input;\n // Parse animation classes if they were set\n if (this.options.animate) {\n input = this.options.animate.split(' ');\n\n this.animationIn = input[0];\n this.animationOut = input[1] || null;\n\n // - aria-expanded: according to the element visibility.\n $triggers.attr('aria-expanded', !this.$element.is(':hidden'));\n }\n // Otherwise, parse toggle class\n else {\n input = this.options.toggler;\n if (typeof input !== 'string' || !input.length) {\n throw new Error(`The 'toggler' option containing the target class is required, got \"${input}\"`);\n }\n // Allow for a . at the beginning of the string\n this.className = input[0] === '.' ? input.slice(1) : input;\n\n // - aria-expanded: according to the elements class set.\n $triggers.attr('aria-expanded', this.$element.hasClass(this.className));\n }\n\n // - aria-controls: adding the element id to it if not already in it.\n $triggers.each((index, trigger) => {\n const $trigger = $(trigger);\n const controls = $trigger.attr('aria-controls') || '';\n\n const containsId = new RegExp(`\\\\b${RegExpEscape(id)}\\\\b`).test(controls);\n if (!containsId) $trigger.attr('aria-controls', controls ? `${controls} ${id}` : id);\n });\n }\n\n /**\n * Initializes events for the toggle trigger.\n * @function\n * @private\n */\n _events() {\n this.$element.off('toggle.zf.trigger').on('toggle.zf.trigger', this.toggle.bind(this));\n }\n\n /**\n * Toggles the target class on the target element. An event is fired from the original trigger depending on if the resultant state was \"on\" or \"off\".\n * @function\n * @fires Toggler#on\n * @fires Toggler#off\n */\n toggle() {\n this[ this.options.animate ? '_toggleAnimate' : '_toggleClass']();\n }\n\n _toggleClass() {\n this.$element.toggleClass(this.className);\n\n var isOn = this.$element.hasClass(this.className);\n if (isOn) {\n /**\n * Fires if the target element has the class after a toggle.\n * @event Toggler#on\n */\n this.$element.trigger('on.zf.toggler');\n }\n else {\n /**\n * Fires if the target element does not have the class after a toggle.\n * @event Toggler#off\n */\n this.$element.trigger('off.zf.toggler');\n }\n\n this._updateARIA(isOn);\n this.$element.find('[data-mutate]').trigger('mutateme.zf.trigger');\n }\n\n _toggleAnimate() {\n var _this = this;\n\n if (this.$element.is(':hidden')) {\n Motion.animateIn(this.$element, this.animationIn, function() {\n _this._updateARIA(true);\n this.trigger('on.zf.toggler');\n this.find('[data-mutate]').trigger('mutateme.zf.trigger');\n });\n }\n else {\n Motion.animateOut(this.$element, this.animationOut, function() {\n _this._updateARIA(false);\n this.trigger('off.zf.toggler');\n this.find('[data-mutate]').trigger('mutateme.zf.trigger');\n });\n }\n }\n\n _updateARIA(isOn) {\n var id = this.$element[0].id;\n $(`[data-open=\"${id}\"], [data-close=\"${id}\"], [data-toggle=\"${id}\"]`)\n .attr({\n 'aria-expanded': isOn ? true : false\n });\n }\n\n /**\n * Destroys the instance of Toggler on the element.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.toggler');\n }\n}\n\nToggler.defaults = {\n /**\n * Class of the element to toggle. It can be provided with or without \".\"\n * @option\n * @type {string}\n */\n toggler: undefined,\n /**\n * Tells the plugin if the element should animated when toggled.\n * @option\n * @type {boolean}\n * @default false\n */\n animate: false\n};\n\nexport {Toggler};\n","import $ from 'jquery';\nimport { GetYoDigits, ignoreMousedisappear } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Triggers } from './foundation.util.triggers';\nimport { Positionable } from './foundation.positionable';\n\n/**\n * Tooltip module.\n * @module foundation.tooltip\n * @requires foundation.util.box\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.triggers\n */\n\nclass Tooltip extends Positionable {\n /**\n * Creates a new instance of a Tooltip.\n * @class\n * @name Tooltip\n * @fires Tooltip#init\n * @param {jQuery} element - jQuery object to attach a tooltip to.\n * @param {Object} options - object to extend the default configuration.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Tooltip.defaults, this.$element.data(), options);\n this.className = 'Tooltip'; // ie9 back compat\n\n this.isActive = false;\n this.isClick = false;\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n }\n\n /**\n * Initializes the tooltip by setting the creating the tip element, adding it's text, setting private variables and setting attributes on the anchor.\n * @private\n */\n _init() {\n MediaQuery._init();\n var elemId = this.$element.attr('aria-describedby') || GetYoDigits(6, 'tooltip');\n\n this.options.tipText = this.options.tipText || this.$element.attr('title');\n this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);\n\n if (this.options.allowHtml) {\n this.template.appendTo(document.body)\n .html(this.options.tipText)\n .hide();\n } else {\n this.template.appendTo(document.body)\n .text(this.options.tipText)\n .hide();\n }\n\n this.$element.attr({\n 'title': '',\n 'aria-describedby': elemId,\n 'data-yeti-box': elemId,\n 'data-toggle': elemId,\n 'data-resize': elemId\n }).addClass(this.options.triggerClass);\n\n super._init();\n this._events();\n }\n\n _getDefaultPosition() {\n // handle legacy classnames\n var elementClassName = this.$element[0].className;\n if (this.$element[0] instanceof SVGElement) {\n elementClassName = elementClassName.baseVal;\n }\n var position = elementClassName.match(/\\b(top|left|right|bottom)\\b/g);\n return position ? position[0] : 'top';\n }\n\n _getDefaultAlignment() {\n return 'center';\n }\n\n _getHOffset() {\n if(this.position === 'left' || this.position === 'right') {\n return this.options.hOffset + this.options.tooltipWidth;\n } else {\n return this.options.hOffset\n }\n }\n\n _getVOffset() {\n if(this.position === 'top' || this.position === 'bottom') {\n return this.options.vOffset + this.options.tooltipHeight;\n } else {\n return this.options.vOffset\n }\n }\n\n /**\n * builds the tooltip element, adds attributes, and returns the template.\n * @private\n */\n _buildTemplate(id) {\n var templateClasses = (`${this.options.tooltipClass} ${this.options.templateClasses}`).trim();\n var $template = $('<div></div>').addClass(templateClasses).attr({\n 'role': 'tooltip',\n 'aria-hidden': true,\n 'data-is-active': false,\n 'data-is-focus': false,\n 'id': id\n });\n return $template;\n }\n\n /**\n * 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.\n * if the tooltip is larger than the screen width, default to full width - any user selected margin\n * @private\n */\n _setPosition() {\n super._setPosition(this.$element, this.template);\n }\n\n /**\n * reveals the tooltip, and fires an event to close any other open tooltips on the page\n * @fires Tooltip#closeme\n * @fires Tooltip#show\n * @function\n */\n show() {\n if (this.options.showOn !== 'all' && !MediaQuery.is(this.options.showOn)) {\n // console.error('The screen is too small to display this tooltip');\n return false;\n }\n\n var _this = this;\n this.template.css('visibility', 'hidden').show();\n this._setPosition();\n this.template.removeClass('top bottom left right').addClass(this.position)\n this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment);\n\n /**\n * Fires to close all other open tooltips on the page\n * @event Closeme#tooltip\n */\n this.$element.trigger('closeme.zf.tooltip', this.template.attr('id'));\n\n\n this.template.attr({\n 'data-is-active': true,\n 'aria-hidden': false\n });\n _this.isActive = true;\n this.template.stop().hide().css('visibility', '').fadeIn(this.options.fadeInDuration, function() {\n //maybe do stuff?\n });\n /**\n * Fires when the tooltip is shown\n * @event Tooltip#show\n */\n this.$element.trigger('show.zf.tooltip');\n }\n\n /**\n * Hides the current tooltip, and resets the positioning class if it was changed due to collision\n * @fires Tooltip#hide\n * @function\n */\n hide() {\n var _this = this;\n this.template.stop().attr({\n 'aria-hidden': true,\n 'data-is-active': false\n }).fadeOut(this.options.fadeOutDuration, function() {\n _this.isActive = false;\n _this.isClick = false;\n });\n /**\n * fires when the tooltip is hidden\n * @event Tooltip#hide\n */\n this.$element.trigger('hide.zf.tooltip');\n }\n\n /**\n * adds event listeners for the tooltip and its anchor\n * TODO combine some of the listeners like focus and mouseenter, etc.\n * @private\n */\n _events() {\n const _this = this;\n const hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined');\n var isFocus = false;\n\n // `disableForTouch: Fully disable the tooltip on touch devices\n if (hasTouch && this.options.disableForTouch) return;\n\n if (!this.options.disableHover) {\n this.$element\n .on('mouseenter.zf.tooltip', function() {\n if (!_this.isActive) {\n _this.timeout = setTimeout(function() {\n _this.show();\n }, _this.options.hoverDelay);\n }\n })\n .on('mouseleave.zf.tooltip', ignoreMousedisappear(function() {\n clearTimeout(_this.timeout);\n if (!isFocus || (_this.isClick && !_this.options.clickOpen)) {\n _this.hide();\n }\n }));\n }\n\n if (hasTouch) {\n this.$element\n .on('tap.zf.tooltip touchend.zf.tooltip', function () {\n _this.isActive ? _this.hide() : _this.show();\n });\n }\n\n if (this.options.clickOpen) {\n this.$element.on('mousedown.zf.tooltip', function() {\n if (_this.isClick) {\n //_this.hide();\n // _this.isClick = false;\n } else {\n _this.isClick = true;\n if ((_this.options.disableHover || !_this.$element.attr('tabindex')) && !_this.isActive) {\n _this.show();\n }\n }\n });\n } else {\n this.$element.on('mousedown.zf.tooltip', function() {\n _this.isClick = true;\n });\n }\n\n this.$element.on({\n // 'toggle.zf.trigger': this.toggle.bind(this),\n // 'close.zf.trigger': this.hide.bind(this)\n 'close.zf.trigger': this.hide.bind(this)\n });\n\n this.$element\n .on('focus.zf.tooltip', function() {\n isFocus = true;\n if (_this.isClick) {\n // If we're not showing open on clicks, we need to pretend a click-launched focus isn't\n // a real focus, otherwise on hover and come back we get bad behavior\n if(!_this.options.clickOpen) { isFocus = false; }\n return false;\n } else {\n _this.show();\n }\n })\n\n .on('focusout.zf.tooltip', function() {\n isFocus = false;\n _this.isClick = false;\n _this.hide();\n })\n\n .on('resizeme.zf.trigger', function() {\n if (_this.isActive) {\n _this._setPosition();\n }\n });\n }\n\n /**\n * adds a toggle method, in addition to the static show() & hide() functions\n * @function\n */\n toggle() {\n if (this.isActive) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Destroys an instance of tooltip, removes template element from the view.\n * @function\n */\n _destroy() {\n this.$element.attr('title', this.template.text())\n .off('.zf.trigger .zf.tooltip')\n .removeClass(this.options.triggerClass)\n .removeClass('top right left bottom')\n .removeAttr('aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box');\n\n this.template.remove();\n }\n}\n\nTooltip.defaults = {\n /**\n * Time, in ms, before a tooltip should open on hover.\n * @option\n * @type {number}\n * @default 200\n */\n hoverDelay: 200,\n /**\n * Time, in ms, a tooltip should take to fade into view.\n * @option\n * @type {number}\n * @default 150\n */\n fadeInDuration: 150,\n /**\n * Time, in ms, a tooltip should take to fade out of view.\n * @option\n * @type {number}\n * @default 150\n */\n fadeOutDuration: 150,\n /**\n * Disables hover events from opening the tooltip if set to true\n * @option\n * @type {boolean}\n * @default false\n */\n disableHover: false,\n /**\n * Disable the tooltip for touch devices.\n * This can be useful to make elements with a tooltip on it trigger their\n * action on the first tap instead of displaying the tooltip.\n * @option\n * @type {booelan}\n * @default false\n */\n disableForTouch: false,\n /**\n * Optional addtional classes to apply to the tooltip template on init.\n * @option\n * @type {string}\n * @default ''\n */\n templateClasses: '',\n /**\n * Non-optional class added to tooltip templates. Foundation default is 'tooltip'.\n * @option\n * @type {string}\n * @default 'tooltip'\n */\n tooltipClass: 'tooltip',\n /**\n * Class applied to the tooltip anchor element.\n * @option\n * @type {string}\n * @default 'has-tip'\n */\n triggerClass: 'has-tip',\n /**\n * Minimum breakpoint size at which to open the tooltip.\n * @option\n * @type {string}\n * @default 'small'\n */\n showOn: 'small',\n /**\n * Custom template to be used to generate markup for tooltip.\n * @option\n * @type {string}\n * @default ''\n */\n template: '',\n /**\n * Text displayed in the tooltip template on open.\n * @option\n * @type {string}\n * @default ''\n */\n tipText: '',\n touchCloseText: 'Tap to close.',\n /**\n * Allows the tooltip to remain open if triggered with a click or touch event.\n * @option\n * @type {boolean}\n * @default true\n */\n clickOpen: true,\n /**\n * Position of tooltip. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of tooltip relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, tooltip will first try to\n * position as defined by data-position and data-alignment, but reposition if\n * it would cause an overflow. @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * Less common for tooltips.\n * @option\n * @type {boolean}\n * @default false\n */\n allowBottomOverlap: false,\n /**\n * Distance, in pixels, the template should push away from the anchor on the Y axis.\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Distance, in pixels, the template should push away from the anchor on the X axis\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n /**\n * Distance, in pixels, the template spacing auto-adjust for a vertical tooltip\n * @option\n * @type {number}\n * @default 14\n */\n tooltipHeight: 14,\n /**\n * Distance, in pixels, the template spacing auto-adjust for a horizontal tooltip\n * @option\n * @type {number}\n * @default 12\n */\n tooltipWidth: 12,\n /**\n * Allow HTML in tooltip. Warning: If you are loading user-generated content into tooltips,\n * allowing HTML may open yourself up to XSS attacks.\n * @option\n * @type {boolean}\n * @default false\n */\n allowHtml: false\n};\n\n/**\n * TODO utilize resize event trigger\n */\n\nexport {Tooltip};\n","import $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin }from './foundation.core.plugin';\n\nimport { Accordion } from './foundation.accordion';\nimport { Tabs } from './foundation.tabs';\n\n// The plugin matches the plugin classes with these plugin instances.\nvar MenuPlugins = {\n tabs: {\n cssClass: 'tabs',\n plugin: Tabs,\n open: (plugin, target) => plugin.selectTab(target),\n close: null /* not supported */,\n toggle: null /* not supported */,\n },\n accordion: {\n cssClass: 'accordion',\n plugin: Accordion,\n open: (plugin, target) => plugin.down($(target)),\n close: (plugin, target) => plugin.up($(target)),\n toggle: (plugin, target) => plugin.toggle($(target)),\n }\n};\n\n\n/**\n * ResponsiveAccordionTabs module.\n * @module foundation.responsiveAccordionTabs\n * @requires foundation.util.motion\n * @requires foundation.accordion\n * @requires foundation.tabs\n */\n\nclass ResponsiveAccordionTabs extends Plugin{\n constructor(element, options) {\n super(element, options);\n return this.options.reflow && this.storezfData || this;\n }\n\n /**\n * Creates a new instance of a responsive accordion tabs.\n * @class\n * @name ResponsiveAccordionTabs\n * @fires ResponsiveAccordionTabs#init\n * @param {jQuery} element - jQuery object to make into Responsive Accordion Tabs.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.$element.data('zfPluginBase', this);\n this.options = $.extend({}, ResponsiveAccordionTabs.defaults, this.$element.data(), options);\n\n this.rules = this.$element.data('responsive-accordion-tabs');\n this.currentMq = null;\n this.currentRule = null;\n this.currentPlugin = null;\n this.className = 'ResponsiveAccordionTabs'; // ie9 back compat\n if (!this.$element.attr('id')) {\n this.$element.attr('id',GetYoDigits(6, 'responsiveaccordiontabs'));\n }\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Menu by parsing the classes from the 'data-responsive-accordion-tabs' attribute on the element.\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n // The first time an Interchange plugin is initialized, this.rules is converted from a string of \"classes\" to an object of rules\n if (typeof this.rules === 'string') {\n let rulesTree = {};\n\n // Parse rules from \"classes\" pulled from data attribute\n let rules = this.rules.split(' ');\n\n // Iterate through every rule found\n for (let i = 0; i < rules.length; i++) {\n let rule = rules[i].split('-');\n let ruleSize = rule.length > 1 ? rule[0] : 'small';\n let rulePlugin = rule.length > 1 ? rule[1] : rule[0];\n\n if (MenuPlugins[rulePlugin] !== null) {\n rulesTree[ruleSize] = MenuPlugins[rulePlugin];\n }\n }\n\n this.rules = rulesTree;\n }\n\n this._getAllOptions();\n\n if (!$.isEmptyObject(this.rules)) {\n this._checkMediaQueries();\n }\n }\n\n _getAllOptions() {\n //get all defaults and options\n var _this = this;\n _this.allOptions = {};\n for (var key in MenuPlugins) {\n if (MenuPlugins.hasOwnProperty(key)) {\n var obj = MenuPlugins[key];\n try {\n var dummyPlugin = $('<ul></ul>');\n var tmpPlugin = new obj.plugin(dummyPlugin,_this.options);\n for (var keyKey in tmpPlugin.options) {\n if (tmpPlugin.options.hasOwnProperty(keyKey) && keyKey !== 'zfPlugin') {\n var objObj = tmpPlugin.options[keyKey];\n _this.allOptions[keyKey] = objObj;\n }\n }\n tmpPlugin.destroy();\n }\n catch(e) {\n console.warn(`Warning: Problems getting Accordion/Tab options: ${e}`);\n }\n }\n }\n }\n\n /**\n * Initializes events for the Menu.\n * @function\n * @private\n */\n _events() {\n this._changedZfMediaQueryHandler = this._checkMediaQueries.bind(this);\n $(window).on('changed.zf.mediaquery', this._changedZfMediaQueryHandler);\n }\n\n /**\n * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.\n * @function\n * @private\n */\n _checkMediaQueries() {\n var matchedMq, _this = this;\n // Iterate through each rule and find the last matching rule\n $.each(this.rules, function(key) {\n if (MediaQuery.atLeast(key)) {\n matchedMq = key;\n }\n });\n\n // No match? No dice\n if (!matchedMq) return;\n\n // Plugin already initialized? We good\n if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;\n\n // Remove existing plugin-specific CSS classes\n $.each(MenuPlugins, function(key, value) {\n _this.$element.removeClass(value.cssClass);\n });\n\n // Add the CSS class for the new plugin\n this.$element.addClass(this.rules[matchedMq].cssClass);\n\n // Create an instance of the new plugin\n if (this.currentPlugin) {\n //don't know why but on nested elements data zfPlugin get's lost\n if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin',this.storezfData);\n this.currentPlugin.destroy();\n }\n this._handleMarkup(this.rules[matchedMq].cssClass);\n this.currentRule = this.rules[matchedMq];\n this.currentPlugin = new this.currentRule.plugin(this.$element, this.options);\n this.storezfData = this.currentPlugin.$element.data('zfPlugin');\n\n }\n\n _handleMarkup(toSet){\n var _this = this, fromString = 'accordion';\n var $panels = $('[data-tabs-content='+this.$element.attr('id')+']');\n if ($panels.length) fromString = 'tabs';\n if (fromString === toSet) {\n return;\n }\n\n var tabsTitle = _this.allOptions.linkClass?_this.allOptions.linkClass:'tabs-title';\n var tabsPanel = _this.allOptions.panelClass?_this.allOptions.panelClass:'tabs-panel';\n\n this.$element.removeAttr('role');\n var $liHeads = this.$element.children('.'+tabsTitle+',[data-accordion-item]').removeClass(tabsTitle).removeClass('accordion-item').removeAttr('data-accordion-item');\n var $liHeadsA = $liHeads.children('a').removeClass('accordion-title');\n\n if (fromString === 'tabs') {\n $panels = $panels.children('.'+tabsPanel).removeClass(tabsPanel).removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby');\n $panels.children('a').removeAttr('role').removeAttr('aria-controls').removeAttr('aria-selected');\n } else {\n $panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content');\n }\n\n $panels.css({display:'',visibility:''});\n $liHeads.css({display:'',visibility:''});\n if (toSet === 'accordion') {\n $panels.each(function(key,value){\n $(value).appendTo($liHeads.get(key)).addClass('accordion-content').attr('data-tab-content','').removeClass('is-active').css({height:''});\n $('[data-tabs-content='+_this.$element.attr('id')+']').after('<div id=\"tabs-placeholder-'+_this.$element.attr('id')+'\"></div>').detach();\n $liHeads.addClass('accordion-item').attr('data-accordion-item','');\n $liHeadsA.addClass('accordion-title');\n });\n } else if (toSet === 'tabs') {\n var $tabsContent = $('[data-tabs-content='+_this.$element.attr('id')+']');\n var $placeholder = $('#tabs-placeholder-'+_this.$element.attr('id'));\n if ($placeholder.length) {\n $tabsContent = $('<div class=\"tabs-content\"></div>').insertAfter($placeholder).attr('data-tabs-content',_this.$element.attr('id'));\n $placeholder.remove();\n } else {\n $tabsContent = $('<div class=\"tabs-content\"></div>').insertAfter(_this.$element).attr('data-tabs-content',_this.$element.attr('id'));\n }\n $panels.each(function(key,value){\n var tempValue = $(value).appendTo($tabsContent).addClass(tabsPanel);\n var hash = $liHeadsA.get(key).hash.slice(1);\n var id = $(value).attr('id') || GetYoDigits(6, 'accordion');\n if (hash !== id) {\n if (hash !== '') {\n $(value).attr('id',hash);\n } else {\n hash = id;\n $(value).attr('id',hash);\n $($liHeadsA.get(key)).attr('href',$($liHeadsA.get(key)).attr('href').replace('#','')+'#'+hash);\n }\n }\n var isActive = $($liHeads.get(key)).hasClass('is-active');\n if (isActive) {\n tempValue.addClass('is-active');\n }\n });\n $liHeads.addClass(tabsTitle);\n };\n }\n\n /**\n * Opens the plugin pane defined by `target`.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to open.\n * @see Accordion.down\n * @see Tabs.selectTab\n * @function\n */\n open() {\n if (this.currentRule && typeof this.currentRule.open === 'function') {\n return this.currentRule.open(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Closes the plugin pane defined by `target`. Not availaible for Tabs.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to close.\n * @see Accordion.up\n * @function\n */\n close() {\n if (this.currentRule && typeof this.currentRule.close === 'function') {\n return this.currentRule.close(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Toggles the plugin pane defined by `target`. Not availaible for Tabs.\n * @param {jQuery | String} target - jQuery object or string of the id of the pane to toggle.\n * @see Accordion.toggle\n * @function\n */\n toggle() {\n if (this.currentRule && typeof this.currentRule.toggle === 'function') {\n return this.currentRule.toggle(this.currentPlugin, ...arguments);\n }\n }\n\n /**\n * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.\n * @function\n */\n _destroy() {\n if (this.currentPlugin) this.currentPlugin.destroy();\n $(window).off('changed.zf.mediaquery', this._changedZfMediaQueryHandler);\n }\n}\n\nResponsiveAccordionTabs.defaults = {};\n\nexport {ResponsiveAccordionTabs};\n","import $ from 'jquery';\n\nimport { Foundation } from '../foundation.core';\nimport * as CoreUtils from '../foundation.core.utils';\nimport { Box } from '../foundation.util.box'\nimport { onImagesLoaded } from '../foundation.util.imageLoader';\nimport { Keyboard } from '../foundation.util.keyboard';\nimport { MediaQuery } from '../foundation.util.mediaQuery';\nimport { Motion, Move } from '../foundation.util.motion';\nimport { Nest } from '../foundation.util.nest';\nimport { Timer } from '../foundation.util.timer';\nimport { Touch } from '../foundation.util.touch';\nimport { Triggers } from '../foundation.util.triggers';\nimport { Abide } from '../foundation.abide';\nimport { Accordion } from '../foundation.accordion';\nimport { AccordionMenu } from '../foundation.accordionMenu';\nimport { Drilldown } from '../foundation.drilldown';\nimport { Dropdown } from '../foundation.dropdown';\nimport { DropdownMenu } from '../foundation.dropdownMenu';\nimport { Equalizer } from '../foundation.equalizer';\nimport { Interchange } from '../foundation.interchange';\nimport { Magellan } from '../foundation.magellan';\nimport { OffCanvas } from '../foundation.offcanvas';\nimport { Orbit } from '../foundation.orbit';\nimport { ResponsiveMenu } from '../foundation.responsiveMenu';\nimport { ResponsiveToggle } from '../foundation.responsiveToggle';\nimport { Reveal } from '../foundation.reveal';\nimport { Slider } from '../foundation.slider';\nimport { SmoothScroll } from '../foundation.smoothScroll';\nimport { Sticky } from '../foundation.sticky';\nimport { Tabs } from '../foundation.tabs';\nimport { Toggler } from '../foundation.toggler';\nimport { Tooltip } from '../foundation.tooltip';\nimport { ResponsiveAccordionTabs } from '../foundation.responsiveAccordionTabs';\n\nFoundation.addToJquery($);\n\n// Add Foundation Utils to Foundation global namespace for backwards\n// compatibility.\nFoundation.rtl = CoreUtils.rtl;\nFoundation.GetYoDigits = CoreUtils.GetYoDigits;\nFoundation.transitionend = CoreUtils.transitionend;\nFoundation.RegExpEscape = CoreUtils.RegExpEscape;\nFoundation.onLoad = CoreUtils.onLoad;\n\nFoundation.Box = Box;\nFoundation.onImagesLoaded = onImagesLoaded;\nFoundation.Keyboard = Keyboard;\nFoundation.MediaQuery = MediaQuery;\nFoundation.Motion = Motion;\nFoundation.Move = Move;\nFoundation.Nest = Nest;\nFoundation.Timer = Timer;\n\n// Touch and Triggers previously were almost purely sede effect driven,\n// so no need to add it to Foundation, just init them.\nTouch.init($);\nTriggers.init($, Foundation);\nMediaQuery._init();\n\nFoundation.plugin(Abide, 'Abide');\nFoundation.plugin(Accordion, 'Accordion');\nFoundation.plugin(AccordionMenu, 'AccordionMenu');\nFoundation.plugin(Drilldown, 'Drilldown');\nFoundation.plugin(Dropdown, 'Dropdown');\nFoundation.plugin(DropdownMenu, 'DropdownMenu');\nFoundation.plugin(Equalizer, 'Equalizer');\nFoundation.plugin(Interchange, 'Interchange');\nFoundation.plugin(Magellan, 'Magellan');\nFoundation.plugin(OffCanvas, 'OffCanvas');\nFoundation.plugin(Orbit, 'Orbit');\nFoundation.plugin(ResponsiveMenu, 'ResponsiveMenu');\nFoundation.plugin(ResponsiveToggle, 'ResponsiveToggle');\nFoundation.plugin(Reveal, 'Reveal');\nFoundation.plugin(Slider, 'Slider');\nFoundation.plugin(SmoothScroll, 'SmoothScroll');\nFoundation.plugin(Sticky, 'Sticky');\nFoundation.plugin(Tabs, 'Tabs');\nFoundation.plugin(Toggler, 'Toggler');\nFoundation.plugin(Tooltip, 'Tooltip');\nFoundation.plugin(ResponsiveAccordionTabs, 'ResponsiveAccordionTabs');\n\nexport {\n Foundation,\n CoreUtils,\n Box,\n onImagesLoaded,\n Keyboard,\n MediaQuery,\n Motion,\n Nest,\n Timer,\n Touch,\n Triggers,\n Abide,\n Accordion,\n AccordionMenu,\n Drilldown,\n Dropdown,\n DropdownMenu,\n Equalizer,\n Interchange,\n Magellan,\n OffCanvas,\n Orbit,\n ResponsiveMenu,\n ResponsiveToggle,\n Reveal,\n Slider,\n SmoothScroll,\n Sticky,\n Tabs,\n Toggler,\n Tooltip,\n ResponsiveAccordionTabs\n}\n\nexport default Foundation;\n\n"],"names":["rtl","$","attr","GetYoDigits","length","arguments","undefined","namespace","str","chars","charsLength","i","Math","floor","random","concat","RegExpEscape","replace","transitionend","$elem","transitions","elem","document","createElement","end","transition","style","setTimeout","triggerHandler","onLoad","handler","didLoad","readyState","eventType","cb","one","window","ignoreMousedisappear","_ref","_ref$ignoreLeaveWindo","ignoreLeaveWindow","_ref$ignoreReappear","ignoreReappear","leaveEventHandler","eLeave","_len","rest","Array","_key","callback","bind","apply","relatedTarget","leaveEventDebouncer","hasFocus","reenterEventHandler","eReenter","currentTarget","has","target","matchMedia","styleMedia","media","script","getElementsByTagName","info","type","id","head","appendChild","parentNode","insertBefore","getComputedStyle","currentStyle","matchMedium","text","styleSheet","cssText","textContent","width","matches","MediaQuery","queries","current","_init","isInitialized","self","$meta","appendTo","extractedStyles","css","namedQueries","parseStyleToObject","key","hasOwnProperty","push","name","value","_getCurrentSize","_watcher","_reInit","atLeast","size","query","get","only","upTo","nextSize","next","is","parts","trim","split","filter","p","_parts","_slicedToArray","bpSize","_parts$","bpModifier","Error","_this","queryIndex","findIndex","q","_getQueryName","nextQuery","_typeof","TypeError","matched","_this2","on","newSize","currentSize","trigger","styleObject","slice","reduce","ret","param","val","decodeURIComponent","isArray","FOUNDATION_VERSION","Foundation","version","_plugins","_uuids","plugin","_plugin","className","functionName","attrName","hyphenate","registerPlugin","pluginName","constructor","toLowerCase","uuid","$element","data","unregisterPlugin","splice","indexOf","removeAttr","removeData","prop","reInit","plugins","isJQ","each","fns","object","plgs","forEach","foundation","string","undefined$1","Object","keys","err","console","error","reflow","find","addBack","$el","opts","option","opt","map","el","parseValue","er","getFnName","addToJquery","method","$noJS","removeClass","args","prototype","call","plugClass","ReferenceError","fn","util","throttle","func","delay","timer","context","Date","now","getTime","vendors","requestAnimationFrame","vp","cancelAnimationFrame","test","navigator","userAgent","lastTime","nextTime","max","clearTimeout","performance","start","Function","oThis","aArgs","fToBind","fNOP","fBound","funcNameRegex","results","exec","toString","isNaN","parseFloat","Box","ImNotTouchingYou","OverlapArea","GetDimensions","GetExplicitOffsets","element","parent","lrOnly","tbOnly","ignoreBottom","eleDims","topOver","bottomOver","leftOver","rightOver","parDims","height","offset","top","left","windowDims","min","sqrt","rect","getBoundingClientRect","parRect","winRect","body","winY","pageYOffset","winX","pageXOffset","parentDims","anchor","position","alignment","vOffset","hOffset","isOverflow","$eleDims","$anchorDims","topVal","leftVal","onImagesLoaded","images","unloaded","complete","naturalWidth","singleImageLoaded","image","Image","events","me","off","src","keyCodes","commands","findFocusable","sort","a","b","aTabIndex","parseInt","bTabIndex","parseKey","event","which","keyCode","String","fromCharCode","toUpperCase","shiftKey","ctrlKey","altKey","Keyboard","getKeyCodes","handleKey","component","functions","commandList","cmds","command","warn","zfIsKeyHandled","ltr","extend","returnValue","handled","unhandled","register","componentName","trapFocus","$focusable","$firstFocusable","eq","$lastFocusable","preventDefault","focus","releaseFocus","kcs","k","kc","initClasses","activeClasses","Motion","animateIn","animation","animate","animateOut","Move","duration","anim","prog","move","ts","isIn","initClass","activeClass","reset","addClass","show","offsetWidth","finish","hide","transitionDuration","Nest","Feather","menu","items","subMenuClass","subItemClass","hasSubClass","applyAria","$item","$sub","children","Burn","Timer","options","nameSpace","remain","isPaused","restart","infinite","pause","Touch","startPosX","startTime","elapsedTime","startEvent","isMoving","didMoved","onTouchEnd","e","removeEventListener","onTouchMove","tapEvent","Event","spotSwipe","x","touches","pageX","dx","dir","abs","moveThreshold","timeThreshold","assign","onTouchStart","addEventListener","passive","init","SpotSwipe","_classCallCheck","enabled","documentElement","special","swipe","setup","tap","noop","setupSpotSwipe","setupTouchHandler","addTouch","handleTouch","changedTouches","first","eventTypes","touchstart","touchmove","touchend","simulatedEvent","MouseEvent","screenX","screenY","clientX","clientY","createEvent","initMouseEvent","dispatchEvent","MutationObserver","prefixes","triggers","Triggers","Listeners","Basic","Global","Initializers","openListener","closeListener","toggleListener","closeableListener","stopPropagation","fadeOut","toggleFocusListener","addOpenListener","addCloseListener","addToggleListener","addCloseableListener","addToggleFocusListener","resizeListener","$nodes","scrollListener","closeMeListener","pluginId","not","addClosemeListener","yetiBoxes","plugNames","listeners","join","debounceGlobalListener","debounce","listener","addResizeListener","addScrollListener","addMutationEventsListener","listeningElementsMutation","mutationRecordsList","$target","attributeName","closest","elementObserver","observe","attributes","childList","characterData","subtree","attributeFilter","addSimpleListeners","$document","addGlobalListeners","__","triggersInitialized","IHearYou","Plugin","_setup","getPluginName","destroy","_destroy","hyphenate$1","obj","Abide","_Plugin","defaults","isEnabled","formnovalidate","$inputs","merge","$submits","$globalErrors","a11yAttributes","input","addA11yAttributes","addGlobalErrorA11yAttributes","_events","_this3","resetForm","validateForm","getAttribute","submit","validateOn","validateInput","liveValidate","validateOnBlur","_reflow","_validationIsDisabled","enableValidation","disableValidation","requiredCheck","isGood","checked","findFormError","failedValidators","_this4","$error","siblings","formErrorSelector","add","v","findLabel","$label","findRadioLabels","$els","_this5","labels","findCheckboxLabels","_this6","addErrorClasses","$formError","labelErrorClass","formErrorClass","inputErrorClass","$errors","$labels","errorId","elemId","label","a11yErrorLevel","removeRadioErrorClasses","groupName","$formErrors","removeCheckboxErrorClasses","removeErrorClasses","_this7","clearRequire","validator","manageErrorClasses","validateRadio","validateCheckbox","validateText","required","validators","equalTo","goodToGo","message","dependentElements","_this8","acc","checkboxGroupName","initialized","noError","pattern","inputText","valid","patterns","RegExp","$group","_this9","minRequired","matchValidation","_this10","clear","$form","alpha","alpha_numeric","integer","number","card","cvv","email","url","domain","datetime","date","time","dateISO","month_day_year","day_month_year","color","website","Accordion","_isInitializing","$tabs","idx","$content","linkId","$initActive","_initialAnchor","prev","_openSingleTab","_checkDeepLink","location","hash","$anchor","$link","isOwnAnchor","hasClass","_closeAllTabs","deepLinkSmudge","scrollTop","deepLinkSmudgeOffset","deepLinkSmudgeDelay","deepLink","$tabContent","toggle","$a","multiExpand","previous","last","up","down","updateHistory","history","pushState","replaceState","_openTab","$targetItem","$othersItems","allowAllClosed","_closeTab","$activeContents","targetContentId","slideDown","slideSpeed","slideUp","$activeTabs","stop","AccordionMenu","multiOpen","$menuLinks","subId","isActive","parentLink","clone","prependTo","wrap","submenuToggle","after","submenuToggleText","initPanes","$submenu","$elements","$prevElement","$nextElement","parents","open","close","closeAll","hideAll","showAll","$targetBranch","parentsUntil","$othersActiveSubmenus","$submenus","$allmenus","detach","remove","Drilldown","autoApplyClass","$submenuAnchors","$menuItems","$currentMenu","_prepareMenu","_registerEvents","_keyboardEvents","$menu","$back","backButtonPosition","append","backButton","prepend","_back","autoHeight","$wrapper","wrapper","animateHeight","_getMaxDims","_resize","_show","closeOnClick","$body","ev","contains","_hideAll","_bindHandler","_scrollTop","$scrollTopElement","scrollTopElement","scrollPos","scrollTopOffset","animationDuration","animationEasing","_hide","calcHeight","parentSubMenu","_menuLinkEvents","_setShowSubMenuClasses","_setHideSubMenuClasses","_showMenu","autoFocus","$expandedSubmenus","index","isLastChild","blur","maxHeight","result","unwrap","POSITIONS","VERTICAL_ALIGNMENTS","HORIZONTAL_ALIGNMENTS","ALIGNMENTS","nextItem","item","array","currentIdx","Positionable","triedPositions","_getDefaultPosition","_getDefaultAlignment","originalPosition","originalAlignment","_reposition","_alignmentsExhausted","_realign","_addTriedPosition","_positionsExhausted","isExhausted","_getVOffset","_getHOffset","_setPosition","$parent","allowOverlap","minOverlap","minCoordinates","overlap","allowBottomOverlap","Dropdown","_Positionable","$id","$anchors","_setCurrentAnchor","parentClass","$currentAnchor","_get","_getPrototypeOf","match","horizontalPosition","hasTouch","ontouchstart","forceFollow","hover","bodyData","whatinput","timeout","hoverDelay","hoverPane","_addBodyHandler","DropdownMenu","subs","verticalClass","rightClass","changed","_isVertical","_isRtl","parClass","handleClickFn","hasSub","hasClicked","clickOpen","stopImmediatePropagation","closeOnClickInside","disableHoverOnTouch","disableHover","autoclose","closingTime","isTab","nextSibling","prevSibling","openSub","closeSub","_removeBodyHandler","isItself","$sibs","oldClass","$parentLi","$toClose","somethingToClose","$activeItem","Equalizer","eqId","$watched","hasNested","isNested","isOn","onResizeMeBound","_onResizeMe","onPostEqualizedBound","_onPostEqualized","imgs","tooSmall","equalizeOn","_checkMQ","_pauseEvents","_killswitch","equalizeOnStack","_isStacked","equalizeByRow","getHeightsByRow","applyHeightByRow","getHeights","applyHeight","heights","len","offsetHeight","lastElTopOffset","groups","group","elOffsetTop","j","ln","groupsILength","lenJ","Interchange","rules","currentPath","_parseOptions","_addBreakpoints","_generateRules","rule","path","types","SPECIAL_QUERIES","rulesList","nodeName","response","html","SmoothScroll","_linkClickListener","_handleLinkClick","arrival","_inTransition","scrollToLoc","loc","$loc","round","threshold","Magellan","calcPoints","$targets","$links","$active","points","winHeight","innerHeight","clientHeight","docHeight","scrollHeight","$tar","pt","targetPoint","deepLinking","_updateActive","onLoadListener","_deepLinkScroll","newScrollPos","isScrollingUp","activeIdx","visibleLinks","$oldActive","activeHash","isNewActive","isNewHash","pathname","search","OffCanvas","contentClasses","base","reveal","$lastTrigger","$triggers","nested","$sticky","isInCanvas","contentId","contentOverlay","overlay","overlayPosition","setAttribute","$overlay","insertAfter","revealOnRegExp","revealClass","revealOnClass","isRevealed","revealOn","_setMQChecker","transitionTime","contentScroll","inCanvasFor","inCanvasOn","_checkInCanvas","_removeContentClasses","_handleKeyboard","hasReveal","_addContentClasses","_fixStickyElements","_","absoluteTopVal","_unfixStickyElements","stickyData","_stopScrolling","_recordScrollable","lastY","pageY","_preventDefaultAtEdges","delta","_canScroll","_scrollboxTouchMoved","allowUp","allowDown","forceTo","scrollTo","canvasFocus","Orbit","_reset","containerClass","$slides","slideClass","$images","initActive","useMUI","_prepareForOrbit","bullets","_loadBullets","autoPlay","geoSync","accessible","$bullets","boxOfBullets","timerDelay","changeSlide","_setWrapperHeight","temp","counter","_setSlideHeight","pauseOnHover","navButtons","$controls","nextClass","prevClass","$slide","_updateBullets","isLTR","chosenSlide","$curSlide","$firstSlide","$lastSlide","dirIn","dirOut","$newSlide","infiniteWrap","$oldBullet","$othersBullets","$newBullet","activeStateDescriptor","spans","spanCountInOthersBullets","toArray","every","count","animInFromRight","animOutToRight","animInFromLeft","animOutToLeft","MenuPlugins","dropdown","cssClass","drilldown","accordion","ResponsiveMenu","currentMq","currentPlugin","rulesTree","ruleSize","rulePlugin","isEmptyObject","_checkMediaQueries","matchedMq","ResponsiveToggle","targetID","$targetMenu","$toggler","animationIn","animationOut","_update","_updateMqHandler","toggleMenu","hideFor","Reveal","cached","mq","fullScreen","_makeOverlay","additionalOverlayClasses","_updatePosition","outerWidth","outerHeight","margin","closeZfTrigger","resizemeZfTrigger","_handleState","_disableScroll","_enableScroll","$activeAnchor","activeElement","multipleOpened","afterAnimation","_addGlobalClasses","focusableElements","showDelay","_addGlobalListeners","updateScrollbarClass","toggleClass","_removeGlobalClasses","closeOnEsc","finishUp","hideDelay","resetOnClose","urlWithoutHash","title","Slider","inputs","handles","$handle","$input","$fill","vertical","disabled","disabledClass","binding","_setInitAttr","doubleSided","$handle2","$input2","setHandles","_setHandlePos","_pctOfBar","pctOfBar","percent","positionValueFunction","_logTransform","_powTransform","toFixed","_value","baseLog","nonLinearBase","pow","$hndl","isDbl","h2Val","step","h1Val","vert","hOrW","lOrT","handleDim","elemDim","pxToMove","movement","decimal","_setValues","isLeftHndl","dim","handlePct","handlePos","initialStart","moveTime","changedDelay","initVal","initialEnd","_handleEvent","direction","eventOffset","barDim","windowScroll","scrollLeft","elemOffset","eventFromBar","barXY","offsetPct","_adjustValue","firstHndlPos","absPosition","secndHndlPos","div","previousVal","nextVal","_eventsForHandle","curHandle","handleChangeEvent","clickSelect","draggable","_$handle","oldValue","newValue","decrease","increase","decreaseFast","increaseFast","invertVertical","frac","num","clickPos","log","Sticky","$container","wasWrapped","container","stickyClass","scrollCount","checkEvery","isStuck","containerHeight","elemHeight","_parsePoints","_setSizes","scroll","_calc","_removeSticky","topPoint","reverse","topAnchor","btm","btmAnchor","pts","breaks","place","canStick","_eventsHandler","_pauseListeners","checkSizes","bottomPoint","_setSticky","stickTo","mrgn","notStuckTo","isTop","stickToTop","anchorPt","anchorHeight","topOrBottom","bottom","stickyOn","newElemWidth","comp","pdngl","pdngr","dynamicHeight","newContainerHeight","_setBreakPoints","mTop","emCalc","marginTop","mBtm","marginBottom","em","fontSize","Tabs","$tabTitles","linkClass","linkActiveClass","matchHeight","_setHeight","anchorNoHash","selectTab","_collapse","_addKeyHandler","_addClickHandler","_setHeightMqHandler","_handleTabChange","wrapOnKeys","historyHandled","activeCollapse","$oldTab","$tabLink","$targetContent","_collapseTab","panelActiveClass","$targetAnchor","$activeTab","idStr","hashIdStr","panelClass","panel","Toggler","toggler","$trigger","controls","containsId","_toggleClass","_updateARIA","_toggleAnimate","Tooltip","isClick","tipText","template","_buildTemplate","allowHtml","triggerClass","elementClassName","SVGElement","baseVal","tooltipWidth","tooltipHeight","templateClasses","tooltipClass","$template","showOn","fadeIn","fadeInDuration","fadeOutDuration","isFocus","disableForTouch","touchCloseText","MenuPlugins$1","tabs","ResponsiveAccordionTabs","_super","_possibleConstructorReturn","storezfData","_assertThisInitialized","currentRule","_getAllOptions","allOptions","dummyPlugin","tmpPlugin","keyKey","objObj","_changedZfMediaQueryHandler","_handleMarkup","toSet","fromString","$panels","tabsTitle","tabsPanel","$liHeads","$liHeadsA","display","visibility","$tabsContent","$placeholder","tempValue","_this$currentRule","_this$currentRule2","_this$currentRule3"],"sourceRoot":""}