{"version":3,"sources":["webpack://gli-frontend/../web/themes/custom/gilderlehrman_theme/src/js/gli__login.js"],"names":["$","Drupal","behaviors","linkReturnPage","attach","context","current_page","location","pathname","once","forEach","element","attr","jQuery"],"mappings":"CAAA,SAAWA,EAAGC,GAEZ,aAEAA,EAAOC,UAAUC,eAAiB,CAChCC,OAAQ,SAAUC,GAChB,IAAIC,EAAeC,SAASC,SACb,gBAEIF,IACjBG,KAAK,uBAAwB,kBAAmBJ,GAASK,SAAQ,SAAUC,GACzEX,EAAEW,GAASC,KAAK,OAAQZ,EAAEW,GAASC,KAAK,QAAU,sBAAwBN,MAE5EG,KAAK,uBAAwB,wBAAyBJ,GAASK,SAAQ,SAAUC,GAC/EX,EAAEW,GAASC,KAAK,OAAQZ,EAAEW,GAASC,KAAK,QAAU,gBAAkBN,SAd9E,CAmBGO,OAAQZ","file":"/js/gli__login.js","sourcesContent":["(function ($, Drupal) {\n\n 'use strict';\n\n Drupal.behaviors.linkReturnPage = {\n attach: function (context) {\n var current_page = location.pathname,\n login_page = '/user/login';\n\n if (login_page !== current_page) {\n once('login-processed-link', \"a[href='/user']\", context).forEach(function (element) {\n $(element).attr('href', $(element).attr('href') + '/login?destination=' + current_page);\n });\n once('login-processed-link', \"a[href='/user/login']\", context).forEach(function (element) {\n $(element).attr('href', $(element).attr('href') + '?destination=' + current_page);\n });\n }\n }\n }\n})(jQuery, Drupal);\n"],"sourceRoot":""}