ventDefault();
      isPressed = true;
      showOppositeImage();
    });

    output.addEventListener('mouseup', () => {
      if (isPressed) {
        isPressed = false;
        updateDisplayedImage();
      }
    });

    output.addEventListener('mouseleave', () => {
      if (isPressed) {
        isPressed = false;
        updateDisplayedImage();
      }
    });

    output.addEventListener('touchstart', (e) => {
      e.preventDefault();
      isPressed = true;
      showOppositeImage();
    });

    o