: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* if (UserAgent_DEPRECATED.ie() >= 7) {
* The browser functions will return NaN if the browser does not match, so
* you can also do version compares the other way:
* if (UserAgent_DEPRECATED.ie() < 7) {
* Note that the version is a float and may include a minor version number,
* so you should always use range operators to perform comparisons, not
* **Note:** You should **strongly** prefer capability detection to browser
* version detection where it's reasonable:
* http://www.quirksmode.org/js/support.html
* Further, we have a large number of mature wrapper functions and classes
* which abstract away many browser irregularities. Check the documentation,
* grep for things, or ask on javascript@lists.facebook.com before writing yet
* another copy of "event || window.event".
var _ie, _firefox, _opera, _webkit, _chrome;
// Actual IE browser for compatibility mode
var _osx, _windows, _linux, _android;
var _iphone, _ipad, _native;
// To work around buggy JS libraries that can't handle multi-digit
// version numbers, Opera 10's user agent string claims it's Opera
// 9, then later includes a Version/X.Y field:
// Opera/9.80 (foo) Presto/2.2.15 Version/10.10
var uas = navigator.userAgent;
var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
_iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
_ipad = /\b(iP[ao]d)/.exec(uas);
_android = /Android/i.exec(uas);
_native = /FBAN\/\w+;/i.exec(uas);
_mobile = /Mobile/i.exec(uas);
// Note that the IE team blog would have you believe you should be checking
// for 'Win64; x64'. But MSDN then reveals that you can actually be coming
// from either x64 or ia64; so ultimately, you should just check for Win64
// as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
// Windows will send 'WOW64' instead.
_win64 = !!(/Win64/.exec(uas));
_ie = agent[1] ? parseFloat(agent[1]) : (
agent[5] ? parseFloat(agent[5]) : NaN);
if (_ie && document && document.documentMode) {
_ie = document.documentMode;
// grab the "true" ie version from the trident token if available
var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
_ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
_firefox = agent[2] ? parseFloat(agent[2]) : NaN;
_opera = agent[3] ? parseFloat(agent[3]) : NaN;
_webkit = agent[4] ? parseFloat(agent[4]) : NaN;
// We do not add the regexp to the above test, because it will always
// match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
_chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
_ie = _firefox = _opera = _chrome = _webkit = NaN;
// Detect OS X version. If no version number matches, set _osx to true.
// Version examples: 10, 10_6_1, 10.7
// Parses version number as a float, taking only first two sets of
// digits. If only one set of digits is found, returns just the major
var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
_osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
_osx = _windows = _linux = false;
var UserAgent_DEPRECATED = {
* Check if the UA is Internet Explorer.
* @return float|NaN Version number (if match) or NaN.
return _populate() || _ie;
* Check if we're in Internet Explorer compatibility mode.
* @return bool true if in compatibility mode, false if
* not compatibility mode or not ie
ieCompatibilityMode: function() {
return _populate() || (_ie_real_version > _ie);
* Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
* only need this because Skype can't handle 64-bit IE yet. We need to remove
* this when we don't need it -- tracked by #601957.
return UserAgent_DEPRECATED.ie() && _win64;
* Check if the UA is Firefox.
* @return float|NaN Version number (if match) or NaN.
return _populate() || _firefox;
* Check if the UA is Opera.
* @return float|NaN Version number (if match) or NaN.
return _populate() || _opera;
* Check if the UA is WebKit.
* @return float|NaN Version number (if match) or NaN.
return _populate() || _webkit;
* WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
return UserAgent_DEPRECATED.webkit();
* Check if the UA is a Chrome browser.
* @return float|NaN Version number (if match) or NaN.
return _populate() || _chrome;
* Check if the user is running Windows.
* @return bool `true' if the user's OS is Windows.
return _populate() || _windows;
* Check if the user is running Mac OS X.
* @return float|bool Returns a float if a version number is detected,
return _populate() || _osx;
* Check if the user is running Linux.
* @return bool `true' if the user's OS is some flavor of Linux.
return _populate() || _linux;
* Check if the user is running on an iPhone or iPod platform.
* @return bool `true' if the user is running some flavor of the
return _populate() || _iphone;
return _populate() || (_iphone || _ipad || _android || _mobile);
// webviews inside of the native apps
return _populate() || _native;
return _populate() || _android;
return _populate() || _ipad;
module.exports = UserAgent_DEPRECATED;
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
* Copyright 2013-2015, Facebook, Inc.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* @providesModule isEventSupported
var ExecutionEnvironment = __webpack_require__(8202);
if (ExecutionEnvironment.canUseDOM) {
document.implementation &&
document.implementation.hasFeature &&
// always returns true in newer browsers as per the standard.
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
document.implementation.hasFeature('', '') !== true;
* Checks if an event is supported in the current execution environment.
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
* Borrows from Modernizr.
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @license Modernizr 3.0.0pre (Custom Build) | MIT
function isEventSupported(eventNameSuffix, capture) {
if (!ExecutionEnvironment.canUseDOM ||
capture && !('addEventListener' in document)) {
var eventName = 'on' + eventNameSuffix;
var isSupported = eventName in document;
var element = document.createElement('div');
element.setAttribute(eventName, 'return;');
isSupported = typeof element[eventName] === 'function';
if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
// This is the only way to test support for the `wheel` event in IE9+.
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
module.exports = isEventSupported;
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
* Copyright (c) 2015, Facebook, Inc.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* @providesModule normalizeWheel
var UserAgent_DEPRECATED = __webpack_require__(2213);
var isEventSupported = __webpack_require__(1087);
* Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
* complicated, thus this doc is long and (hopefully) detailed enough to answer
* If you need to react to the mouse wheel in a predictable way, this code is
* like your bestest friend. * hugs *
* As of today, there are 4 DOM event types you can listen to:
* 'wheel' -- Chrome(31+), FF(17+), IE(9+)
* 'mousewheel' -- Chrome, IE(6+), Opera, Safari
* 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
* 'DOMMouseScroll' -- FF(0.9.7+) since 2003
* So what to do? The is the best:
* normalizeWheel.getEventType();
* In your event callback, use this code to get sane interpretation of the
* deltas. This code will return an object with properties:
* spinX -- normalized spin speed (use for zoom) - x plane
* pixelX -- normalized distance (to pixels) - x plane
* Wheel values are provided by the browser assuming you are using the wheel to
* scroll a web page by a number of lines or pixels (or pages). Values can vary
* significantly on different platforms and browsers, forgetting that you can
* scroll at different speeds. Some devices (like trackpads) emit more events
* at smaller increments with fine granularity, and some emit massive jumps with
* linear speed or acceleration.
* This code does its best to normalize the deltas for you:
* - spin is trying to normalize how far the wheel was spun (or trackpad
* dragged). This is super useful for zoom support where you want to
* throw away the chunky scroll steps on the PC and make those equal to
* the slow and smooth tiny steps on the Mac. Key data: This code tries to
* resolve a single slow step on a wheel to 1.
* - pixel is normalizing the desired scroll delta in pixel units. You'll
* get the crazy differences between browsers, but at least it'll be in
* - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
* should translate to positive value zooming IN, negative zooming OUT.
* This matches the newer 'wheel' event.
* Why are there spinX, spinY (or pixels)?
* - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
* with a mouse. It results in side-scrolling in the browser by default.
* - spinY is what you expect -- it's the classic axis of a mouse wheel.
* - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
* probably is by browsers in conjunction with fancy 3D controllers .. but
* Examples of 'wheel' event if you scroll slowly (down) by one step with an
* OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
* OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
* OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
* Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
* Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
* OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
* OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
* On other/older browsers.. it's more complicated as there can be multiple and
* also missing delta values.
* The 'wheel' event is more standard:
* http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
* The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
* deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
* backward compatibility with older events. Those other values help us
* better normalize spin speed. Example of what the browsers provide:
* | event.wheelDelta | event.detail
* ------------------+------------------+--------------
* Safari v5/OS X | -120 | 0
* Safari v5/Win7 | -120 | 0
* Chrome v17/OS X | -120 | 0
* Chrome v17/Win7 | -120 | 0
* IE9/Win7 | -120 | undefined
* Firefox v4/OS X | undefined | 1
* Firefox v4/Win7 | undefined | 3
function normalizeWheel(/*object*/ event) /*object*/ {
var sX = 0, sY = 0, // spinX, spinY
pX = 0, pY = 0; // pixelX, pixelY
if ('detail' in event) { sY = event.detail; }
if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
// side scrolling on FF with DOMMouseScroll
if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
if ('deltaY' in event) { pY = event.deltaY; }
if ('deltaX' in event) { pX = event.deltaX; }
if ((pX || pY) && event.deltaMode) {
if (event.deltaMode == 1) { // delta in LINE units
} else { // delta in PAGE units
// Fall-back if spin cannot be determined