( function( window, document ) {
  function business_meetup_conference_keepFocusInMenu() {
    document.addEventListener( 'keydown', function( e ) {
      const business_meetup_conference_nav = document.querySelector( '.sidenav' );
      if ( ! business_meetup_conference_nav || ! business_meetup_conference_nav.classList.contains( 'open' ) ) {
        return;
      }
      const elements = [...business_meetup_conference_nav.querySelectorAll( 'input, a, button' )],
        business_meetup_conference_lastEl = elements[ elements.length - 1 ],
        business_meetup_conference_firstEl = elements[0],
        business_meetup_conference_activeEl = document.activeElement,
        tabKey = e.keyCode === 9,
        shiftKey = e.shiftKey;
      if ( ! shiftKey && tabKey && business_meetup_conference_lastEl === business_meetup_conference_activeEl ) {
        e.preventDefault();
        business_meetup_conference_firstEl.focus();
      }
      if ( shiftKey && tabKey && business_meetup_conference_firstEl === business_meetup_conference_activeEl ) {
        e.preventDefault();
        business_meetup_conference_lastEl.focus();
      }
    } );
  }
  business_meetup_conference_keepFocusInMenu();
} )( window, document );