function a(t) {
  var n;
  if (typeof window > "u" || window.navigator == null) return !1;
  let o = (n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.brands;
  return Array.isArray(o) && o.some((s) => t.test(s.brand)) || t.test(window.navigator.userAgent);
}
function r(t) {
  var n;
  return typeof window < "u" && window.navigator != null ? t.test(((n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.platform) || window.navigator.platform) : !1;
}
function e(t) {
  if (process.env.NODE_ENV === "test") return t;
  let n = null;
  return () => (n == null && (n = t()), n);
}
const i = e(function() {
  return r(/^Mac/i);
}), c = e(function() {
  return r(/^iPhone/i);
}), u = e(function() {
  return r(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
  i() && navigator.maxTouchPoints > 1;
}), d = e(function() {
  return c() || u();
});
e(function() {
  return i() || d();
});
const f = e(function() {
  return a(/AppleWebKit/i) && !$();
}), $ = e(function() {
  return a(/Chrome/i);
}), l = e(function() {
  return a(/Android/i);
}), w = e(function() {
  return a(/Firefox/i);
});
export {
  l as isAndroid,
  $ as isChrome,
  w as isFirefox,
  d as isIOS,
  u as isIPad,
  c as isIPhone,
  i as isMac,
  f as isWebKit
};
