{"version":3,"file":"footer.js","names":["$","Drupal","behaviors","footer","attach","self","googleTranslateResize","hover","$imgToReplace","find","imgPrefix","data","attr","concat","$gTranslateEl","window","resize","width","detach","appendTo","accordion","jQuery"],"sources":["src/components/footer/footer.es6.js"],"sourcesContent":["/* eslint-disable max-len */\n\n(function ($) {\n  'use strict';\n\n  Drupal.behaviors.footer = {\n    attach: function () {\n      const self = this;\n      self.googleTranslateResize();\n\n      $('.footer__social-icons').hover(function () {\n        const $imgToReplace = $(this).find('img');\n        const imgPrefix = $imgToReplace.data('icon-prefix');\n        $imgToReplace.attr('src', `/themes/custom/ccny_theme/dist/assets/${imgPrefix}-yellow.svg`);\n      }, function () {\n        const $imgToReplace = $(this).find('img');\n        const imgPrefix = $imgToReplace.data('icon-prefix');\n        $imgToReplace.attr('src', `/themes/custom/ccny_theme/dist/assets/${imgPrefix}.svg`);\n      });\n    },\n    googleTranslateResize: function () {\n      const $gTranslateEl = $('#google_translate_element');\n      $(window).resize(function () {\n        if ($(window).width() < 880) {\n          $gTranslateEl.detach().appendTo('.footer__script-tag.google.mobile');\n        }\n        else {\n          $gTranslateEl.detach().appendTo('.footer__script-tag.google.desktop');\n          $('.footer__menu-container .ui-accordion').accordion('destroy');\n        }\n      });\n    }\n  };\n}(jQuery));\n"],"mappings":";;AAAA;;AAEC,WAAUA,CAAC,EAAE;EACZ,YAAY;;EAEZC,MAAM,CAACC,SAAS,CAACC,MAAM,GAAG;IACxBC,MAAM,EAAE,SAAAA,OAAA,EAAY;MAClB,IAAMC,IAAI,GAAG,IAAI;MACjBA,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAE5BN,CAAC,CAAC,uBAAuB,CAAC,CAACO,KAAK,CAAC,YAAY;QAC3C,IAAMC,aAAa,GAAGR,CAAC,CAAC,IAAI,CAAC,CAACS,IAAI,CAAC,KAAK,CAAC;QACzC,IAAMC,SAAS,GAAGF,aAAa,CAACG,IAAI,CAAC,aAAa,CAAC;QACnDH,aAAa,CAACI,IAAI,C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