{"remainingRequest":"/Users/dev/Sites/belavistasaude/wp-content/themes/belavistasaude/node_modules/buble-loader/index.js??ref--2-1!/Users/dev/Sites/belavistasaude/wp-content/themes/belavistasaude/node_modules/foundation-sites/js/foundation.responsiveMenu.js","dependencies":[{"path":"/Users/dev/Sites/belavistasaude/wp-content/themes/belavistasaude/node_modules/foundation-sites/js/foundation.responsiveMenu.js","mtime":1560429080762},{"path":"/Users/dev/Sites/belavistasaude/wp-content/themes/belavistasaude/node_modules/cache-loader/dist/cjs.js","mtime":1560429090832},{"path":"/Users/dev/Sites/belavistasaude/wp-content/themes/belavistasaude/node_modules/buble-loader/index.js","mtime":1560429088235}],"contextDependencies":[],"result":["'use strict';\n\nimport $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.util.core';\nimport { Plugin } from './foundation.plugin';\n\nimport { DropdownMenu } from './foundation.dropdownMenu';\nimport { Drilldown } from './foundation.drilldown';\nimport { AccordionMenu } from './foundation.accordionMenu';\n\nvar 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\nvar ResponsiveMenu = (function (Plugin) {\n  function ResponsiveMenu () {\n    Plugin.apply(this, arguments);\n  }\n\n  if ( Plugin ) ResponsiveMenu.__proto__ = Plugin;\n  ResponsiveMenu.prototype = Object.create( Plugin && Plugin.prototype );\n  ResponsiveMenu.prototype.constructor = ResponsiveMenu;\n\n  ResponsiveMenu.prototype._setup = function _setup (element, options) {\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  ResponsiveMenu.prototype._init = function _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      var rulesTree = {};\n\n      // Parse rules from \"classes\" pulled from data attribute\n      var rules = this.rules.split(' ');\n\n      // Iterate through every rule found\n      for (var i = 0; i < rules.length; i++) {\n        var rule = rules[i].split('-');\n        var ruleSize = rule.length > 1 ? rule[0] : 'small';\n        var 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  ResponsiveMenu.prototype._events = function _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  ResponsiveMenu.prototype._checkMediaQueries = function _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  ResponsiveMenu.prototype._destroy = function _destroy () {\n    this.currentPlugin.destroy();\n    $(window).off('.zf.ResponsiveMenu');\n  };\n\n  return ResponsiveMenu;\n}(Plugin));\n\nResponsiveMenu.defaults = {};\n\nexport {ResponsiveMenu};\n",{"version":3,"file":"/Users/dev/Sites/belavistasaude/wp-content/themes/belavistasaude/node_modules/foundation-sites/js/foundation.responsiveMenu.js","sources":["node_modules/foundation-sites/js/foundation.responsiveMenu.js"],"sourcesContent":["'use strict';\n\nimport $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.util.core';\nimport { Plugin } from './foundation.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, options) {\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"],"names":["let"],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,CAAC,MAAM,QAAQ,CAAC;;AAEvB,SAAS,UAAU,QAAQ,8BAA8B,CAAC;AAC1D,SAAS,WAAW,QAAQ,wBAAwB,CAAC;AACrD,SAAS,MAAM,QAAQ,qBAAqB,CAAC;;AAE7C,SAAS,YAAY,QAAQ,2BAA2B,CAAC;AACzD,SAAS,SAAS,QAAQ,wBAAwB,CAAC;AACnD,SAAS,aAAa,QAAQ,4BAA4B,CAAC;;AAE3DA,GAAG,CAAC,WAAW,GAAG;EAChB,QAAQ,EAAE;IACR,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,YAAY;GACrB;CACF,SAAS,EAAE;IACR,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,SAAS;GAClB;EACD,SAAS,EAAE;IACT,QAAQ,EAAE,gBAAgB;IAC1B,MAAM,EAAE,aAAa;GACtB;CACF,CAAC;;;;;;;;;;;;AAYF,IAAM,cAAc,GAAe;EAAC;;;;;;;;EAAA,AASlC,yBAAA,MAAM,mBAAA,CAAC,OAAO,EAAE,OAAO,EAAE;IACvB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OA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