text: export const recognitionHandlerHelper = ({ app, recognition }) => {
    const setCurrentName = (name) => {
      app.answeredName = name;
    };
    const answerResolver = () => {
      recognition.stop();
      app.answerResolver();
    };
    const timer = () => {
      app.timer();
    };
    const start = () => {
      recognition.start();
    };
    const openLoading = () => {
      openLoadingTrigger(app.$overlay);
    };
    const closeLoading = () => {
      closeLoadingTrigger(app.$overlay);
    };
    return {
      setCurrentName,
      answerResolver,
      timer,
      start,
      openLoading,
      closeLoading,
    };
  };
  const openLoadingTrigger = ($overlay) => {
    $overlay.style.display = 'block';
    $overlay.classList.add('d-flex');
    $overlay.classList.add('d-align-items-center');
    $overlay.classList.add('justify-content-center');
  };
  
  const closeLoadingTrigger = ($overlay) => {
    $overlay.style.display = 'none';
    $overlay.classList.remove('d-flex');
    $overlay.classList.remove('d-align-items-center');
    $overlay.classList.remove('justify-content-center');
  };
  
  // https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser
  export const detectMob = () => {
    const toMatch = [
      /Android/i,
      /webOS/i,
      /iPhone/i,
      /iPad/i,
      /iPod/i,
      /BlackBerry/i,
      /Windows Phone/i,
    ];
  
    return toMatch.some((toMatchItem) => {
      return navigator.userAgent.match(toMatchItem);
    });
  };
  