2020-01-17 23:49:59 +00:00
/ * *
* DO NOT EDIT THIS FILE .
* See the following change record for more information ,
* https : //www.drupal.org/node/2815083
* @ preserve
* * /
( function ( Modernizr ) {
2022-05-12 13:52:15 +00:00
var _deprecationErrorModernizrCopy = function _deprecationErrorModernizrCopy ( _ref ) {
var message = _ref . message ;
if ( typeof console !== 'undefined' && console . warn ) {
console . warn ( "[Deprecation] " . concat ( message ) ) ;
}
} ;
var _deprecatedPropertyModernizrCopy = function _deprecatedPropertyModernizrCopy ( _ref2 ) {
var target = _ref2 . target ,
deprecatedProperty = _ref2 . deprecatedProperty ,
message = _ref2 . message ;
if ( ! Proxy || ! Reflect ) {
return target ;
}
return new Proxy ( target , {
get : function get ( target , key ) {
if ( key === deprecatedProperty ) {
_deprecationErrorModernizrCopy ( {
message : message
} ) ;
}
for ( var _len = arguments . length , rest = new Array ( _len > 2 ? _len - 2 : 0 ) , _key = 2 ; _key < _len ; _key ++ ) {
rest [ _key - 2 ] = arguments [ _key ] ;
}
return Reflect . get . apply ( Reflect , [ target , key ] . concat ( rest ) ) ;
}
} ) ;
} ;
window . Modernizr = _deprecatedPropertyModernizrCopy ( {
target : Modernizr ,
deprecatedProperty : 'touchevents' ,
message : 'The touchevents property of Modernizr has been deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. There will be no replacement for this feature. See https://www.drupal.org/node/3277381.'
} ) ;
if ( document . documentElement . classList . contains ( 'touchevents' ) || document . documentElement . classList . contains ( 'no-touchevents' ) ) {
return ;
}
2020-01-17 23:49:59 +00:00
Modernizr . addTest ( 'touchevents' , function ( ) {
2022-05-12 13:52:15 +00:00
_deprecationErrorModernizrCopy ( {
message : 'The Modernizr touch events test is deprecated in Drupal 9.4.0 and will be removed in Drupal 10.0.0. See https://www.drupal.org/node/3277381 for information on its replacement and how it should be used.'
} ) ;
2020-01-30 09:08:38 +00:00
var bool ;
2020-01-17 23:49:59 +00:00
if ( 'ontouchstart' in window || window . DocumentTouch && document instanceof window . DocumentTouch ) {
bool = true ;
} else {
var query = [ '@media (' , Modernizr . _prefixes . join ( 'touch-enabled),(' ) , 'heartz' , ')' , '{#modernizr{top:9px;position:absolute}}' ] . join ( '' ) ;
Modernizr . testStyles ( query , function ( node ) {
bool = node . offsetTop === 9 ;
} ) ;
}
2020-01-30 09:08:38 +00:00
2020-01-17 23:49:59 +00:00
return bool ;
} ) ;
} ) ( Modernizr ) ;