biofriction-wp-theme/node_modules/foundation-sites/dist/js/plugins/foundation.util.mediaQuery....

1 line
22 KiB
Plaintext

{"version":3,"sources":["foundation.util.mediaQuery.min.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__foundation_core__","__WEBPACK_EXTERNAL_MODULE_jquery__","modules","installedModules","__webpack_require__","moduleId","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","./foundation.core","./js/entries/plugins/foundation.util.mediaQuery.js","__webpack_exports__","_foundation_core__WEBPACK_IMPORTED_MODULE_0__","_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__","MediaQuery","_init","./js/foundation.util.mediaQuery.js","jquery__WEBPACK_IMPORTED_MODULE_0__","jquery__WEBPACK_IMPORTED_MODULE_0___default","_typeof","obj","iterator","constructor","matchMedia","styleMedia","media","info","style","document","createElement","script","getElementsByTagName","type","id","parentNode","insertBefore","head","appendChild","getComputedStyle","currentStyle","matchMedium","text","styleSheet","cssText","textContent","width","matches","queries","current","length","appendTo","namedQueries","str","styleObject","extractedStyles","css","trim","slice","split","reduce","ret","param","parts","replace","val","decodeURIComponent","Array","isArray","push","this","concat","_getCurrentSize","_watcher","atLeast","size","query","is","matched","_this","off","on","newSize","currentSize","trigger","24","jquery"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,qBAAsBA,QAAQ,WACtC,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,oBAAqB,UAAWJ,GACd,iBAAZC,QACdA,QAAQ,8BAAgCD,EAAQG,QAAQ,qBAAsBA,QAAQ,YAEtFJ,EAA8B,wBAAIA,EAA8B,yBAAK,GAAIA,EAA8B,wBAAE,8BAAgCC,EAAQD,EAA8B,wBAAE,mBAAoBA,EAAa,SARpN,CASG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ourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.util.mediaQuery\"] = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.mediaQuery\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 24);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./foundation.core\":\n/*!****************************************************************************************************************************************************************!*\\\n !*** external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"} ***!\n \\****************************************************************************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;\n\n/***/ }),\n\n/***/ \"./js/entries/plugins/foundation.util.mediaQuery.js\":\n/*!**********************************************************!*\\\n !*** ./js/entries/plugins/foundation.util.mediaQuery.js ***!\n \\**********************************************************/\n/*! exports provided: Foundation, MediaQuery */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ \"./foundation.core\");\n/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Foundation\", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__[\"Foundation\"]; });\n\n/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.mediaQuery */ \"./js/foundation.util.mediaQuery.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MediaQuery\", function() { return _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__[\"MediaQuery\"]; });\n\n\n\n_foundation_core__WEBPACK_IMPORTED_MODULE_0__[\"Foundation\"].MediaQuery = _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__[\"MediaQuery\"];\n\n_foundation_core__WEBPACK_IMPORTED_MODULE_0__[\"Foundation\"].MediaQuery._init();\n\n\n\n/***/ }),\n\n/***/ \"./js/foundation.util.mediaQuery.js\":\n/*!******************************************!*\\\n !*** ./js/foundation.util.mediaQuery.js ***!\n \\******************************************/\n/*! exports provided: MediaQuery */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MediaQuery\", function() { return MediaQuery; });\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ \"jquery\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);\n\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n // Default set of media queries\n\nvar 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),' + '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}; // matchMedia() polyfill - Test a CSS media type/query in JS.\n// Authors & copyright(c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license\n\n/* eslint-disable */\n\nwindow.matchMedia || (window.matchMedia = function () {\n \"use strict\"; // For browsers that support matchMedium api such as IE 9 and webkit\n\n var styleMedia = window.styleMedia || window.media; // For those that don't support matchMedium\n\n if (!styleMedia) {\n var style = document.createElement('style'),\n script = document.getElementsByTagName('script')[0],\n info = null;\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 } // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers\n\n\n info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle;\n styleMedia = {\n matchMedium: function matchMedium(media) {\n var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers\n\n if (style.styleSheet) {\n style.styleSheet.cssText = text;\n } else {\n style.textContent = text;\n } // Test if media query is true or false\n\n\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 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: function _init() {\n var self = this;\n var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq');\n\n if (!$meta.length) {\n jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class=\"foundation-mq\">').appendTo(document.head);\n }\n\n var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family');\n var namedQueries;\n namedQueries = parseStyleToObject(extractedStyles);\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: \".concat(namedQueries[key], \")\")\n });\n }\n }\n\n this.current = this._getCurrentSize();\n\n this._watcher();\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: function 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 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: function is(size) {\n size = size.trim().split(' ');\n\n if (size.length > 1 && size[1] === 'only') {\n if (size[0] === this._getCurrentSize()) return true;\n } else {\n return this.atLeast(size[0]);\n }\n\n return false;\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: function 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 * 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: function _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 if (_typeof(matched) === 'object') {\n return matched.name;\n } else {\n return matched;\n }\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: function _watcher() {\n var _this = this;\n\n jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () {\n var newSize = _this._getCurrentSize(),\n currentSize = _this.current;\n\n if (newSize !== currentSize) {\n // Change the current media query\n _this.current = newSize; // Broadcast the media query change on the window\n\n jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);\n }\n });\n }\n}; // Thank you: https://github.com/sindresorhus/query-string\n\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); // missing `=` should be `null`:\n // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\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\n return ret;\n }, {});\n return styleObject;\n}\n\n\n\n/***/ }),\n\n/***/ 24:\n/*!****************************************************************!*\\\n !*** multi ./js/entries/plugins/foundation.util.mediaQuery.js ***!\n \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(/*! /Users/ncoden/Documents/Documents/Projects/Programmation/Web/2016/Foundation/foundation-sites/js/entries/plugins/foundation.util.mediaQuery.js */\"./js/entries/plugins/foundation.util.mediaQuery.js\");\n\n\n/***/ }),\n\n/***/ \"jquery\":\n/*!********************************************************************************************!*\\\n !*** external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"} ***!\n \\********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;\n\n/***/ })\n\n/******/ });\n});\n//# sourceMappingURL=foundation.util.mediaQuery.js.map"]}