"use strict";exports.__esModule = true;exports.isWindows = exports.isSafariWithTextareaBug = exports.isSafari17 = exports.isSafari = exports.isOpera = exports.isMobile = exports.isMac = exports.isIOS = exports.isIE11 = exports.isFirefox = exports.isEdge = exports.isChrome = void 0;var _globalObject = require("@skbkontur/global-object");var _globalObject$navigat, _globalObject$navigat2, _globalObject$navigat3;

// NOTE Some checks are used from https://github.com/arasatasaygin/is.js
var platform = (((_globalObject$navigat = _globalObject.globalObject.navigator) == null ? void 0 : _globalObject$navigat.platform) || '').toLowerCase();
var userAgent = (((_globalObject$navigat2 = _globalObject.globalObject.navigator) == null ? void 0 : _globalObject$navigat2.userAgent) || '').toLowerCase();
var vendor = (((_globalObject$navigat3 = _globalObject.globalObject.navigator) == null ? void 0 : _globalObject$navigat3.vendor) || '').toLowerCase();

var isMac = exports.isMac = platform.includes('mac');
var isWindows = exports.isWindows = platform.includes('win');

var isSafari = exports.isSafari = /version\/(\d+).+?safari/.test(userAgent);
var isFirefox = exports.isFirefox = /(?:firefox|fxios)\/(\d+)/.test(userAgent);
var isOpera = exports.isOpera = /(?:^opera.+?version|opr)\/(\d+)/.test(userAgent);
var isChrome = exports.isChrome = vendor.includes('google inc') && /(?:chrome|crios)\/(\d+)/.test(userAgent) && !isOpera;
var isEdge = exports.isEdge = userAgent.includes('edge/');
var isIE11 = exports.isIE11 = userAgent.includes('trident/');

var isMobile = exports.isMobile =
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent) &&
_globalObject.globalObject.document &&
'ontouchstart' in _globalObject.globalObject.document.documentElement;

var isIOS = exports.isIOS = /(ip[ao]d|iphone)/gi.test(userAgent);

var isSafari17 = exports.isSafari17 = isSafari && userAgent.includes('version/17');

var is17_0v = userAgent.includes('version/17.0');
var is17_1v = userAgent.includes('version/17.1');
var is17_2v = userAgent.includes('version/17.2');
var is17_3v = userAgent.includes('version/17.3');

var isSafariWithTextareaBug = exports.isSafariWithTextareaBug = isSafari && (is17_0v || is17_1v || is17_2v || is17_3v);