2018-12-13 23:41:57 -05:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "viewport" ] =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
2021-02-02 00:17:13 -05:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 474 ) ;
2018-12-13 23:41:57 -05:00
/******/ } )
/************************************************************************/
/******/ ( {
2020-01-08 06:57:23 -05:00
/***/ 0 :
/***/ ( function ( module , exports ) {
2021-01-27 21:04:13 -05:00
( function ( ) { module . exports = window [ "wp" ] [ "element" ] ; } ( ) ) ;
2020-01-08 06:57:23 -05:00
/***/ } ) ,
2021-01-27 21:04:13 -05:00
/***/ 11 :
2020-01-08 06:57:23 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 07:50:29 -04:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _slicedToArray ; } ) ;
2020-01-08 06:57:23 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
2020-03-23 19:40:19 -04:00
var arrayWithHoles = _ _webpack _require _ _ ( 38 ) ;
2020-01-08 06:57:23 -05:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit ( arr , i ) {
2020-03-23 19:40:19 -04:00
if ( typeof Symbol === "undefined" || ! ( Symbol . iterator in Object ( arr ) ) ) return ;
2020-01-08 06:57:23 -05:00
var _arr = [ ] ;
var _n = true ;
var _d = false ;
var _e = undefined ;
try {
for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) {
_arr . push ( _s . value ) ;
if ( i && _arr . length === i ) break ;
}
} catch ( err ) {
_d = true ;
_e = err ;
} finally {
try {
if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ;
} finally {
if ( _d ) throw _e ;
}
}
return _arr ;
}
2020-03-23 19:40:19 -04:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2021-02-02 00:17:13 -05:00
var unsupportedIterableToArray = _ _webpack _require _ _ ( 31 ) ;
2020-03-23 19:40:19 -04:00
2020-01-08 06:57:23 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
2020-03-23 19:40:19 -04:00
var nonIterableRest = _ _webpack _require _ _ ( 39 ) ;
2020-01-08 06:57:23 -05:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
2020-03-23 19:40:19 -04:00
2020-01-08 06:57:23 -05:00
function _slicedToArray ( arr , i ) {
2020-03-23 19:40:19 -04:00
return Object ( arrayWithHoles [ "a" /* default */ ] ) ( arr ) || _iterableToArrayLimit ( arr , i ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr , i ) || Object ( nonIterableRest [ "a" /* default */ ] ) ( ) ;
}
/***/ } ) ,
2021-01-27 21:04:13 -05:00
/***/ 12 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "compose" ] ; } ( ) ) ;
/***/ } ) ,
2020-06-26 09:33:47 -04:00
/***/ 2 :
/***/ ( function ( module , exports ) {
2021-01-27 21:04:13 -05:00
( function ( ) { module . exports = window [ "lodash" ] ; } ( ) ) ;
2020-06-26 09:33:47 -04:00
/***/ } ) ,
2021-01-27 21:04:13 -05:00
/***/ 24 :
2020-03-23 19:40:19 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayLikeToArray ; } ) ;
function _arrayLikeToArray ( arr , len ) {
if ( len == null || len > arr . length ) len = arr . length ;
for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) {
arr2 [ i ] = arr [ i ] ;
}
return arr2 ;
}
/***/ } ) ,
2021-02-02 00:17:13 -05:00
/***/ 31 :
2020-03-23 19:40:19 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _unsupportedIterableToArray ; } ) ;
2021-01-27 21:04:13 -05:00
/* harmony import */ var _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 24 ) ;
2020-03-23 19:40:19 -04:00
function _unsupportedIterableToArray ( o , minLen ) {
if ( ! o ) return ;
2021-01-27 21:04:13 -05:00
if ( typeof o === "string" ) return Object ( _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
2020-03-23 19:40:19 -04:00
var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ;
if ( n === "Object" && o . constructor ) n = o . constructor . name ;
2020-06-26 09:33:47 -04:00
if ( n === "Map" || n === "Set" ) return Array . from ( o ) ;
2021-01-27 21:04:13 -05:00
if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return Object ( _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
2020-01-08 06:57:23 -05:00
}
/***/ } ) ,
2020-03-23 19:40:19 -04:00
/***/ 38 :
2020-01-08 06:57:23 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayWithHoles ; } ) ;
function _arrayWithHoles ( arr ) {
if ( Array . isArray ( arr ) ) return arr ;
}
/***/ } ) ,
2020-03-23 19:40:19 -04:00
/***/ 39 :
2020-01-08 06:57:23 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _nonIterableRest ; } ) ;
function _nonIterableRest ( ) {
2020-03-23 19:40:19 -04:00
throw new TypeError ( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
2020-01-08 06:57:23 -05:00
}
/***/ } ) ,
2020-02-06 16:03:31 -05:00
/***/ 4 :
/***/ ( function ( module , exports ) {
2021-01-27 21:04:13 -05:00
( function ( ) { module . exports = window [ "wp" ] [ "data" ] ; } ( ) ) ;
2020-02-06 16:03:31 -05:00
/***/ } ) ,
2021-02-02 00:17:13 -05:00
/***/ 474 :
2018-12-13 23:41:57 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 07:50:29 -04:00
// ESM COMPAT FLAG
2018-12-13 23:41:57 -05:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2020-06-29 07:50:29 -04:00
// EXPORTS
2021-01-27 21:04:13 -05:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "store" , function ( ) { return /* reexport */ store ; } ) ;
2020-06-29 07:50:29 -04:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ifViewportMatches" , function ( ) { return /* reexport */ if _viewport _matches ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "withViewportMatch" , function ( ) { return /* reexport */ with _viewport _match ; } ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/viewport/build-module/store/actions.js
2018-12-17 22:14:52 -05:00
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
2020-01-08 06:57:23 -05:00
_ _webpack _require _ _ . d ( actions _namespaceObject , "setIsMatching" , function ( ) { return actions _setIsMatching ; } ) ;
2020-06-29 07:50:29 -04:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/viewport/build-module/store/selectors.js
2018-12-17 22:14:52 -05:00
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isViewportMatch" , function ( ) { return isViewportMatch ; } ) ;
2018-12-13 23:41:57 -05:00
2021-01-27 21:04:13 -05:00
// EXTERNAL MODULE: external "lodash"
var external _lodash _ = _ _webpack _require _ _ ( 2 ) ;
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 4 ) ;
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/reducer.js
/ * *
* Reducer returning the viewport state , as keys of breakpoint queries with
* boolean value representing whether query is matched .
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
*
* @ return { Object } Updated state .
* /
function reducer ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
switch ( action . type ) {
case 'SET_IS_MATCHING' :
return action . values ;
}
return state ;
2018-12-13 23:41:57 -05:00
}
2018-12-17 22:14:52 -05:00
/* harmony default export */ var store _reducer = ( reducer ) ;
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/actions.js
/ * *
* Returns an action object used in signalling that viewport queries have been
* updated . Values are specified as an object of breakpoint query keys where
* value represents whether query matches .
*
* @ param { Object } values Breakpoint query matches .
*
* @ return { Object } Action object .
* /
2020-01-08 06:57:23 -05:00
function actions _setIsMatching ( values ) {
2018-12-17 22:14:52 -05:00
return {
type : 'SET_IS_MATCHING' ,
values : values
} ;
}
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/selectors.js
/ * *
* Returns true if the viewport matches the given query , or false otherwise .
*
* @ param { Object } state Viewport state object .
* @ param { string } query Query string . Includes operator and breakpoint name ,
* space separated . Operator defaults to >= .
*
* @ example
*
* ` ` ` js
* isViewportMatch ( state , '< huge' ) ;
* isViewPortMatch ( state , 'medium' ) ;
* ` ` `
*
* @ return { boolean } Whether viewport matches query .
* /
function isViewportMatch ( state , query ) {
2018-12-18 22:16:48 -05:00
// Default to `>=` if no operator is present.
if ( query . indexOf ( ' ' ) === - 1 ) {
query = '>= ' + query ;
}
return ! ! state [ query ] ;
2018-12-17 22:14:52 -05:00
}
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2021-01-27 21:04:13 -05:00
var STORE _NAME = 'core/viewport' ;
/ * *
* Store definition for the viewport namespace .
*
2021-02-02 00:17:13 -05:00
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
2021-01-27 21:04:13 -05:00
*
* @ type { Object }
* /
var store = Object ( external _wp _data _ [ "createReduxStore" ] ) ( STORE _NAME , {
2018-12-17 22:14:52 -05:00
reducer : store _reducer ,
actions : actions _namespaceObject ,
selectors : selectors _namespaceObject
2021-01-27 21:04:13 -05:00
} ) ;
Object ( external _wp _data _ [ "register" ] ) ( store ) ;
2020-01-08 06:57:23 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/listener.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2021-01-27 21:04:13 -05:00
/ * *
* Internal dependencies
* /
2020-01-08 06:57:23 -05:00
var listener _addDimensionsEventListener = function addDimensionsEventListener ( breakpoints , operators ) {
/ * *
* Callback invoked when media query state should be updated . Is invoked a
* maximum of one time per call stack .
* /
2021-01-27 21:04:13 -05:00
var setIsMatching = Object ( external _lodash _ [ "debounce" ] ) ( function ( ) {
var values = Object ( external _lodash _ [ "mapValues" ] ) ( queries , function ( query ) {
2020-01-08 06:57:23 -05:00
return query . matches ;
} ) ;
2021-01-27 21:04:13 -05:00
Object ( external _wp _data _ [ "dispatch" ] ) ( store ) . setIsMatching ( values ) ;
2020-01-08 06:57:23 -05:00
} , {
leading : true
} ) ;
/ * *
* Hash of breakpoint names with generated MediaQueryList for corresponding
* media query .
*
* @ see https : //developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
* @ see https : //developer.mozilla.org/en-US/docs/Web/API/MediaQueryList
*
* @ type { Object < string , MediaQueryList > }
* /
2021-01-27 21:04:13 -05:00
var queries = Object ( external _lodash _ [ "reduce" ] ) ( breakpoints , function ( result , width , name ) {
Object ( external _lodash _ [ "forEach" ] ) ( operators , function ( condition , operator ) {
2020-01-08 06:57:23 -05:00
var list = window . matchMedia ( "(" . concat ( condition , ": " ) . concat ( width , "px)" ) ) ;
list . addListener ( setIsMatching ) ;
var key = [ operator , name ] . join ( ' ' ) ;
result [ key ] = list ;
} ) ;
return result ;
} , { } ) ;
window . addEventListener ( 'orientationchange' , setIsMatching ) ; // Set initial values
setIsMatching ( ) ;
setIsMatching . flush ( ) ;
} ;
/* harmony default export */ var listener = ( listener _addDimensionsEventListener ) ;
2021-01-27 21:04:13 -05:00
// EXTERNAL MODULE: external ["wp","compose"]
var external _wp _compose _ = _ _webpack _require _ _ ( 12 ) ;
2018-12-17 22:14:52 -05:00
2020-01-08 06:57:23 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2020-06-26 09:33:47 -04:00
var esm _extends = _ _webpack _require _ _ ( 8 ) ;
2020-01-08 06:57:23 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
2021-01-27 21:04:13 -05:00
var slicedToArray = _ _webpack _require _ _ ( 11 ) ;
2020-01-08 06:57:23 -05:00
2021-01-27 21:04:13 -05:00
// EXTERNAL MODULE: external ["wp","element"]
var external _wp _element _ = _ _webpack _require _ _ ( 0 ) ;
2020-01-08 06:57:23 -05:00
2018-12-17 22:14:52 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/with-viewport-match.js
2020-01-08 06:57:23 -05:00
2018-12-17 22:14:52 -05:00
/ * *
* External dependencies
* /
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
/ * *
* WordPress dependencies
* /
/ * *
* Higher - order component creator , creating a new component which renders with
* the given prop names , where the value passed to the underlying component is
* the result of the query assigned as the object ' s value .
*
2019-03-21 08:48:00 -04:00
* @ see isViewportMatch
*
2018-12-17 22:14:52 -05:00
* @ param { Object } queries Object of prop name to viewport query .
*
2019-03-21 08:48:00 -04:00
* @ example
*
* ` ` ` jsx
* function MyComponent ( { isMobile } ) {
* return (
* < div > Currently : { isMobile ? 'Mobile' : 'Not Mobile' } < / d i v >
* ) ;
* }
*
* MyComponent = withViewportMatch ( { isMobile : '< small' } ) ( MyComponent ) ;
* ` ` `
2018-12-17 22:14:52 -05:00
*
* @ return { Function } Higher - order component .
* /
var with _viewport _match _withViewportMatch = function withViewportMatch ( queries ) {
2020-01-08 06:57:23 -05:00
var useViewPortQueriesResult = function useViewPortQueriesResult ( ) {
2021-01-27 21:04:13 -05:00
return Object ( external _lodash _ [ "mapValues" ] ) ( queries , function ( query ) {
2020-01-08 06:57:23 -05:00
var _query$split = query . split ( ' ' ) ,
_query$split2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _query$split , 2 ) ,
operator = _query$split2 [ 0 ] ,
breakpointName = _query$split2 [ 1 ] ;
if ( breakpointName === undefined ) {
breakpointName = operator ;
operator = '>=' ;
} // Hooks should unconditionally execute in the same order,
// we are respecting that as from the static query of the HOC we generate
// a hook that calls other hooks always in the same order (because the query never changes).
// eslint-disable-next-line react-hooks/rules-of-hooks
2021-01-27 21:04:13 -05:00
return Object ( external _wp _compose _ [ "useViewportMatch" ] ) ( breakpointName , operator ) ;
2018-12-17 22:14:52 -05:00
} ) ;
2020-01-08 06:57:23 -05:00
} ;
2021-01-27 21:04:13 -05:00
return Object ( external _wp _compose _ [ "createHigherOrderComponent" ] ) ( function ( WrappedComponent ) {
return Object ( external _wp _compose _ [ "pure" ] ) ( function ( props ) {
2020-01-08 06:57:23 -05:00
var queriesResult = useViewPortQueriesResult ( ) ;
2021-01-27 21:04:13 -05:00
return Object ( external _wp _element _ [ "createElement" ] ) ( WrappedComponent , Object ( esm _extends [ "a" /* default */ ] ) ( { } , props , queriesResult ) ) ;
2020-01-08 06:57:23 -05:00
} ) ;
} , 'withViewportMatch' ) ;
2018-12-17 22:14:52 -05:00
} ;
/* harmony default export */ var with _viewport _match = ( with _viewport _match _withViewportMatch ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/if-viewport-matches.js
2018-12-13 23:41:57 -05:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/ * *
* Higher - order component creator , creating a new component which renders if
* the viewport query is satisfied .
*
2019-03-21 08:48:00 -04:00
* @ see withViewportMatches
*
2018-12-13 23:41:57 -05:00
* @ param { string } query Viewport query .
*
2019-03-21 08:48:00 -04:00
* @ example
*
* ` ` ` jsx
* function MyMobileComponent ( ) {
* return < div > I ' m only rendered on mobile viewports ! < / d i v > ;
* }
*
* MyMobileComponent = ifViewportMatches ( '< small' ) ( MyMobileComponent ) ;
* ` ` `
2018-12-13 23:41:57 -05:00
*
* @ return { Function } Higher - order component .
* /
2018-12-17 22:14:52 -05:00
var if _viewport _matches _ifViewportMatches = function ifViewportMatches ( query ) {
2021-01-27 21:04:13 -05:00
return Object ( external _wp _compose _ [ "createHigherOrderComponent" ] ) ( Object ( external _wp _compose _ [ "compose" ] ) ( [ with _viewport _match ( {
2018-12-13 23:41:57 -05:00
isViewportMatch : query
2021-01-27 21:04:13 -05:00
} ) , Object ( external _wp _compose _ [ "ifCondition" ] ) ( function ( props ) {
2018-12-13 23:41:57 -05:00
return props . isViewportMatch ;
} ) ] ) , 'ifViewportMatches' ) ;
} ;
2018-12-17 22:14:52 -05:00
/* harmony default export */ var if _viewport _matches = ( if _viewport _matches _ifViewportMatches ) ;
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/index.js
2018-12-13 23:41:57 -05:00
/ * *
* Internal dependencies
* /
/ * *
* Hash of breakpoint names with pixel width at which it becomes effective .
*
* @ see _breakpoints . scss
*
* @ type { Object }
* /
var BREAKPOINTS = {
huge : 1440 ,
wide : 1280 ,
large : 960 ,
medium : 782 ,
small : 600 ,
mobile : 480
} ;
/ * *
* Hash of query operators with corresponding condition for media query .
*
* @ type { Object }
* /
var OPERATORS = {
'<' : 'max-width' ,
'>=' : 'min-width'
} ;
2020-01-08 06:57:23 -05:00
listener ( BREAKPOINTS , OPERATORS ) ;
2018-12-13 23:41:57 -05:00
/***/ } ) ,
2019-09-19 11:19:18 -04:00
/***/ 8 :
2020-06-26 09:33:47 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _extends ; } ) ;
function _extends ( ) {
_extends = Object . assign || function ( target ) {
for ( var i = 1 ; i < arguments . length ; i ++ ) {
var source = arguments [ i ] ;
for ( var key in source ) {
if ( Object . prototype . hasOwnProperty . call ( source , key ) ) {
target [ key ] = source [ key ] ;
}
}
}
return target ;
} ;
return _extends . apply ( this , arguments ) ;
}
2018-12-13 23:41:57 -05:00
/***/ } )
2018-12-17 22:14:52 -05:00
/******/ } ) ;