{"version":3,"file":"search.js","sources":["search.js"],"sourcesContent":["/**\n * @file\n * A JavaScript file for the general search box.\n *\n */\n\n(function ($) {\n\n var event = (navigator.userAgent.match(/iPhone/i)) ? \"touchstart\" : \"click\";\n\n Drupal.behaviors.toggleSearch = {\n attach: function (context) {\n\n /**\n * Set the search box toggle\n *\n */\n function searchToggle() {\n\n var $searchIcon = $('.search-button'),\n $searchBox = $('#search-box-wrapper'),\n $hamburger = $('#hamburger');\n\n // Attach click function for submenu accordion toggle\n $searchIcon.each(function() {\n\n $(this)\n .off(event)\n .on(event, function(e) {\n\n $searchBox.toggleClass( \"open\");\n // Amend aria values as needed\n if ($searchBox.hasClass('open')) {\n $(this).attr('aria-expanded', 'true');\n $searchBox.attr('aria-hidden', 'false');\n $searchBox.find('.form-item-search-api-fulltext > input').focus();\n } else {\n $(this).attr('aria-expanded', 'false');\n $searchBox.attr('aria-hidden', 'true');\n }\n\n // close navigation panel if the hamburger menu is in use and is active\n if (($hamburger.hasClass('is-active')) && ($('#hamburger-navigation').css('display') === 'block' )) {\n $(\"#navigation-panel\").slideUp();\n $hamburger.removeClass('is-active');\n $hamburger.attr( 'aria-expanded', 'false' );\n }\n\n });\n });\n\n }\n\n // Call function\n searchToggle();\n\n\n }\n };\n\n})(jQuery);\n"],"names":["$","event","navigator","userAgent","match","Drupal","behaviors","toggleSearch","attach","context","$searchIcon","$searchBox","$hamburger","each","this","off","on","e","toggleClass","hasClass","attr","find","focus","css","slideUp","removeClass","jQuery"],"mappings":"CAMA,SAAWA,GAET,IAAIC,EAASC,UAAUC,UAAUC,MAAM,WAAc,aAAe,QAEpEC,OAAOC,UAAUC,aAAe,CAC9BC,OAAQ,SAAUC,GAMhB,IAEMC,EACFC,EACAC,EAFEF,EAAcV,EAAE,kBAClBW,EAAaX,EAAE,uBACfY,EAAaZ,EAAE,cAGjBU,EAAYG,KAAK,WAEfb,EAAEc,MACCC,IAAId,GACJe,GAAGf,EAAO,SAASgB,GAElBN,EAAWO,YAAa,QAEpBP,EAAWQ,SAAS,SACtBnB,EAAEc,MAAMM,KAAK,gBAAiB,QAC9BT,EAAWS,KAAK,cAAe,SAC/BT,EAAWU,KAAK,0CAA0CC,UAE1DtB,EAAEc,MAAMM,KAAK,gBAAiB,SAC9BT,EAAWS,KAAK,cAAe,SAI5BR,EAAWO,SAAS,cAAgE,UAA9CnB,EAAE,yBAAyBuB,IAAI,aACxEvB,EAAE,qBAAqBwB,UACvBZ,EAAWa,YAAY,aACvBb,EAAWQ,KAAM,gBAAiB,gBAvClD,CAsDGM"}