1export function isTouchDevice() { 2 if (import.meta.server) { 3 return false 4 } 5 return 'ontouchstart' in window || navigator.maxTouchPoints > 0 6}