implement ~/public/js/views/bet.js