"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isIOS = exports.isWebKit = exports.isSafari = void 0;
const hasNavigator = typeof navigator !== "undefined";
function getNavigatorData() {
    var _a, _b;
    if (!hasNavigator) {
        return { platform: "", maxTouchPoints: -1 };
    }
    const uaData = navigator.userAgentData;
    if (uaData === null || uaData === void 0 ? void 0 : uaData.platform) {
        return {
            platform: uaData.platform,
            maxTouchPoints: navigator.maxTouchPoints,
        };
    }
    return {
        platform: (_a = navigator.platform) !== null && _a !== void 0 ? _a : "",
        maxTouchPoints: (_b = navigator.maxTouchPoints) !== null && _b !== void 0 ? _b : -1,
    };
}
const nav = getNavigatorData();
const isSafari = hasNavigator && /apple/i.test(navigator.vendor);
exports.isSafari = isSafari;
const isWebKit = typeof CSS === "undefined" || !CSS.supports
    ? false
    : CSS.supports("-webkit-backdrop-filter:none");
exports.isWebKit = isWebKit;
const isIOS = nav.platform === "MacIntel" && nav.maxTouchPoints > 1
    ? true
    : /iP(hone|ad|od)|iOS/.test(nav.platform);
exports.isIOS = isIOS;
//# sourceMappingURL=detectBrowser.js.map