1
this["wp"] = this["wp"] || {}; this["wp"]["viewport"] =
2
/******/ (function(modules) { // webpackBootstrap
3
/******/ // The module cache
4
/******/ var installedModules = {};
6
/******/ // The require function
7
/******/ function __webpack_require__(moduleId) {
9
/******/ // Check if module is in cache
10
/******/ if(installedModules[moduleId]) {
11
/******/ return installedModules[moduleId].exports;
13
/******/ // Create a new module (and put it into the cache)
14
/******/ var module = installedModules[moduleId] = {
20
/******/ // Execute the module function
21
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
23
/******/ // Flag the module as loaded
24
/******/ module.l = true;
26
/******/ // Return the exports of the module
27
/******/ return module.exports;
31
/******/ // expose the modules object (__webpack_modules__)
32
/******/ __webpack_require__.m = modules;
34
/******/ // expose the module cache
35
/******/ __webpack_require__.c = installedModules;
37
/******/ // define getter function for harmony exports
38
/******/ __webpack_require__.d = function(exports, name, getter) {
39
/******/ if(!__webpack_require__.o(exports, name)) {
40
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
44
/******/ // define __esModule on exports
45
/******/ __webpack_require__.r = function(exports) {
46
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
49
/******/ Object.defineProperty(exports, '__esModule', { value: true });
52
/******/ // create a fake namespace object
53
/******/ // mode & 1: value is a module id, require it
54
/******/ // mode & 2: merge all properties of value into the ns
55
/******/ // mode & 4: return value when already ns object
56
/******/ // mode & 8|1: behave like require
57
/******/ __webpack_require__.t = function(value, mode) {
58
/******/ if(mode & 1) value = __webpack_require__(value);
59
/******/ if(mode & 8) return value;
60
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
/******/ var ns = Object.create(null);
62
/******/ __webpack_require__.r(ns);
63
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
68
/******/ // getDefaultExport function for compatibility with non-harmony modules
69
/******/ __webpack_require__.n = function(module) {
70
/******/ var getter = module && module.__esModule ?
71
/******/ function getDefault() { return module['default']; } :
72
/******/ function getModuleExports() { return module; };
73
/******/ __webpack_require__.d(getter, 'a', getter);
74
/******/ return getter;
77
/******/ // Object.prototype.hasOwnProperty.call
78
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
80
/******/ // __webpack_public_path__
81
/******/ __webpack_require__.p = "";
84
/******/ // Load entry module and return exports
85
/******/ return __webpack_require__(__webpack_require__.s = 316);
87
/************************************************************************/
91
/***/ (function(module, __webpack_exports__, __webpack_require__) {
95
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
96
function _arrayWithoutHoles(arr) {
97
if (Array.isArray(arr)) {
98
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
105
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
106
var iterableToArray = __webpack_require__(32);
108
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
109
function _nonIterableSpread() {
110
throw new TypeError("Invalid attempt to spread non-iterable instance");
112
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
113
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; });
117
function _toConsumableArray(arr) {
118
return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || _nonIterableSpread();
124
/***/ (function(module, exports) {
126
(function() { module.exports = this["lodash"]; }());
131
/***/ (function(module, __webpack_exports__, __webpack_require__) {
134
__webpack_require__.r(__webpack_exports__);
135
var actions_namespaceObject = {};
136
__webpack_require__.r(actions_namespaceObject);
137
__webpack_require__.d(actions_namespaceObject, "setIsMatching", function() { return setIsMatching; });
138
var selectors_namespaceObject = {};
139
__webpack_require__.r(selectors_namespaceObject);
140
__webpack_require__.d(selectors_namespaceObject, "isViewportMatch", function() { return isViewportMatch; });
142
// EXTERNAL MODULE: external "lodash"
143
var external_lodash_ = __webpack_require__(2);
145
// EXTERNAL MODULE: external {"this":["wp","data"]}
146
var external_this_wp_data_ = __webpack_require__(5);
148
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/reducer.js
150
* Reducer returning the viewport state, as keys of breakpoint queries with
151
* boolean value representing whether query is matched.
153
* @param {Object} state Current state.
154
* @param {Object} action Dispatched action.
156
* @return {Object} Updated state.
159
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
160
var action = arguments.length > 1 ? arguments[1] : undefined;
162
switch (action.type) {
163
case 'SET_IS_MATCHING':
164
return action.values;
170
/* harmony default export */ var store_reducer = (reducer);
172
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/actions.js
174
* Returns an action object used in signalling that viewport queries have been
175
* updated. Values are specified as an object of breakpoint query keys where
176
* value represents whether query matches.
178
* @param {Object} values Breakpoint query matches.
180
* @return {Object} Action object.
182
function setIsMatching(values) {
184
type: 'SET_IS_MATCHING',
189
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
190
var toConsumableArray = __webpack_require__(19);
192
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/selectors.js
196
* External dependencies
200
* Returns true if the viewport matches the given query, or false otherwise.
202
* @param {Object} state Viewport state object.
203
* @param {string} query Query string. Includes operator and breakpoint name,
204
* space separated. Operator defaults to >=.
209
* isViewportMatch( state, '< huge' );
210
* isViewPortMatch( state, 'medium' );
213
* @return {boolean} Whether viewport matches query.
216
function isViewportMatch(state, query) {
217
// Pad to _at least_ two elements to take from the right, effectively
218
// defaulting the left-most value.
219
var key = Object(external_lodash_["takeRight"])(['>='].concat(Object(toConsumableArray["a" /* default */])(query.split(' '))), 2).join(' ');
223
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/index.js
225
* WordPress dependencies
229
* Internal dependencies
235
/* harmony default export */ var store = (Object(external_this_wp_data_["registerStore"])('core/viewport', {
236
reducer: store_reducer,
237
actions: actions_namespaceObject,
238
selectors: selectors_namespaceObject
241
// EXTERNAL MODULE: external {"this":["wp","compose"]}
242
var external_this_wp_compose_ = __webpack_require__(7);
244
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/with-viewport-match.js
246
* External dependencies
250
* WordPress dependencies
256
* Higher-order component creator, creating a new component which renders with
257
* the given prop names, where the value passed to the underlying component is
258
* the result of the query assigned as the object's value.
260
* @param {Object} queries Object of prop name to viewport query.
262
* @see isViewportMatch
264
* @return {Function} Higher-order component.
267
var with_viewport_match_withViewportMatch = function withViewportMatch(queries) {
268
return Object(external_this_wp_compose_["createHigherOrderComponent"])(Object(external_this_wp_data_["withSelect"])(function (select) {
269
return Object(external_lodash_["mapValues"])(queries, function (query) {
270
return select('core/viewport').isViewportMatch(query);
272
}), 'withViewportMatch');
275
/* harmony default export */ var with_viewport_match = (with_viewport_match_withViewportMatch);
277
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/if-viewport-matches.js
279
* WordPress dependencies
283
* Internal dependencies
288
* Higher-order component creator, creating a new component which renders if
289
* the viewport query is satisfied.
291
* @param {string} query Viewport query.
293
* @see withViewportMatches
295
* @return {Function} Higher-order component.
298
var if_viewport_matches_ifViewportMatches = function ifViewportMatches(query) {
299
return Object(external_this_wp_compose_["createHigherOrderComponent"])(Object(external_this_wp_compose_["compose"])([with_viewport_match({
300
isViewportMatch: query
301
}), Object(external_this_wp_compose_["ifCondition"])(function (props) {
302
return props.isViewportMatch;
303
})]), 'ifViewportMatches');
306
/* harmony default export */ var if_viewport_matches = (if_viewport_matches_ifViewportMatches);
308
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/index.js
309
/* concated harmony reexport ifViewportMatches */__webpack_require__.d(__webpack_exports__, "ifViewportMatches", function() { return if_viewport_matches; });
310
/* concated harmony reexport withViewportMatch */__webpack_require__.d(__webpack_exports__, "withViewportMatch", function() { return with_viewport_match; });
312
* External dependencies
316
* WordPress dependencies
321
* Internal dependencies
328
* Hash of breakpoint names with pixel width at which it becomes effective.
330
* @see _breakpoints.scss
344
* Hash of query operators with corresponding condition for media query.
354
* Callback invoked when media query state should be updated. Is invoked a
355
* maximum of one time per call stack.
358
var build_module_setIsMatching = Object(external_lodash_["debounce"])(function () {
359
var values = Object(external_lodash_["mapValues"])(build_module_queries, function (query) {
360
return query.matches;
362
Object(external_this_wp_data_["dispatch"])('core/viewport').setIsMatching(values);
367
* Hash of breakpoint names with generated MediaQueryList for corresponding
370
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
371
* @see https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList
373
* @type {Object<string,MediaQueryList>}
376
var build_module_queries = Object(external_lodash_["reduce"])(BREAKPOINTS, function (result, width, name) {
377
Object(external_lodash_["forEach"])(OPERATORS, function (condition, operator) {
378
var list = window.matchMedia("(".concat(condition, ": ").concat(width, "px)"));
379
list.addListener(build_module_setIsMatching);
380
var key = [operator, name].join(' ');
385
window.addEventListener('orientationchange', build_module_setIsMatching); // Set initial values
387
build_module_setIsMatching();
393
/***/ (function(module, __webpack_exports__, __webpack_require__) {
396
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
397
function _iterableToArray(iter) {
398
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
404
/***/ (function(module, exports) {
406
(function() { module.exports = this["wp"]["data"]; }());
411
/***/ (function(module, exports) {
413
(function() { module.exports = this["wp"]["compose"]; }());
b'\\ No newline at end of file'