{"version":3,"sources":["webpack:///./wp-content/themes/is5communications/src/scripts/components/downloads.js"],"names":["$","each","$holder","this","$download","on","event","preventDefault","hasClass","next","slideUp","removeClass","slideDown","addClass","parent","find","downloadClass","attr","fadeIn","fadeOut"],"mappings":"8EAAA,YAOAA,GAAG,WACFA,EAAG,gCAAiCC,MAAM,WACzC,IAAIC,EAAUF,EAAGG,MACbC,EAAYJ,EAAG,sBAAuBE,GAE1CE,EAAUC,GAAI,SAAS,SAAWC,GACjCA,EAAMC,iBAEDP,EAAGG,MAAOK,SAAU,cACxBR,EAAGG,MAAOM,OAAOC,UACjBV,EAAGG,MAAOQ,YAAa,eAEvBP,EAAUK,OAAOC,UACjBN,EAAUO,YAAa,aAEvBX,EAAGG,MAAOM,OAAOG,YACjBZ,EAAGG,MAAOU,SAAU,iBAItBb,EAAG,qBAAsBE,GAAUG,GAAI,SAAS,SAAWC,GAC1DA,EAAMC,iBAENP,EAAGG,MAAOW,SAASJ,UACnBV,EAAGG,MAAOW,SAASA,SAASC,KAAM,uBAAwBJ,YAAa,gBAGxEX,EAAG,wBAAyBE,GAAUG,GAAI,SAAS,SAAWC,GAC7DA,EAAMC,iBACN,IAAIS,EAAgBhB,EAAGG,MAAOc,KAAM,iBAEpCjB,EAAG,yBAA0BW,YAAa,aAC1CX,EAAGG,MAAOW,SAASD,SAAU,aAEN,QAAlBG,EACJhB,EAAG,yBAA0BkB,UAE7BlB,EAAG,yBAA0BmB,UAC7BnB,EAAE,yBAAD,OAA2BgB,IAAkBE,qB","file":"scripts/4.chunk.js","sourcesContent":["/**\n * Downloads\n *\n * This component requires jQuery to function.\n * You can require it on the page using
\n */\n\n$( function () {\n\t$( '[data-component=\"downloads\"]' ).each( function () {\n\t\tlet $holder = $( this );\n\t\tlet $download = $( '.js-download-toggle', $holder );\n\n\t\t$download.on( 'click', function ( event ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tif ( $( this ).hasClass( 'is-active' ) ) {\n\t\t\t\t$( this ).next().slideUp();\n\t\t\t\t$( this ).removeClass( 'is-active' );\n\t\t\t} else {\n\t\t\t\t$download.next().slideUp();\n\t\t\t\t$download.removeClass( 'is-active' );\n\n\t\t\t\t$( this ).next().slideDown();\n\t\t\t\t$( this ).addClass( 'is-active' );\n\t\t\t}\n\t\t} );\n\n\t\t$( '.js-download-close', $holder ).on( 'click', function ( event ) {\n\t\t\tevent.preventDefault();\n\n\t\t\t$( this ).parent().slideUp();\n\t\t\t$( this ).parent().parent().find( '.js-download-toggle' ).removeClass( 'is-active' );\n\t\t} );\n\n\t\t$( '.js-download-filter a', $holder ).on( 'click', function ( event ) {\n\t\t\tevent.preventDefault();\n\t\t\tlet downloadClass = $( this ).attr( 'data-download' );\n\n\t\t\t$( '.downloads__filter li' ).removeClass( 'is-active' );\n\t\t\t$( this ).parent().addClass( 'is-active' );\n\n\t\t\tif ( downloadClass === 'all' ) {\n\t\t\t\t$( '.downloads__list-item' ).fadeIn();\n\t\t\t} else {\n\t\t\t\t$( '.downloads__list-item' ).fadeOut();\n\t\t\t\t$( `.downloads__list-item.${downloadClass}` ).fadeIn();\n\t\t\t}\n\t\t} );\n\t} );\n} );\n"],"sourceRoot":""}