/*! EmulateTab v0.2.12 © 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 The Swedish Post and Telecom Authority (PTS), Licensed BSD-3-Clause */ var JoelPurra=JoelPurra||{};!function(a,b,c,d){"use strict";var e="."+d,f=":input, a[href]",g=null,h={escapeSelectorName:function(a){return a.replace(/(!"#$%&'\(\)\*\+,\.\/:;<=>\?@\[\]^`\{\|\}~)/g,"\\\\$1")},findNextFocusable:function(a,c){var d=b(f).not(":disabled").not(":hidden").not("a[href]:empty");if("INPUT"===a[0].tagName&&"radio"===a[0].type&&""!==a[0].name){var e=h.escapeSelectorName(a[0].name);d=d.not("input[type=radio][name="+e+"]").add(a)}var g=d.index(a),i=(g+c)%d.length;-1>=i&&(i=d.length+i);var j=d.eq(i);return j},focusInElement:function(a){g=a.target},tryGetElementAsNonEmptyJQueryObject:function(a){try{var c=b(a);if(c&&0!==c.size())return c}catch(d){}return null},getFocusedElement:function(){var c=h.tryGetElementAsNonEmptyJQueryObject(":focus")||h.tryGetElementAsNonEmptyJQueryObject(a.activeElement)||h.tryGetElementAsNonEmptyJQueryObject(g)||b();return c},emulateTabbing:function(a,b){var c=h.findNextFocusable(a,b);c.focus()},initializeAtLoad:function(){b(a).on("focusin"+e,h.focusInElement)}},i={tab:function(a,c){b.isNumeric(a)&&(c=a,a=void 0),a=a||i.getFocused(),c=c||1,h.emulateTabbing(a,c)},forwardTab:function(a){return i.tab(a,1)},reverseTab:function(a){return i.tab(a,-1)},getFocused:function(){return h.getFocusedElement()}},j=function(){b.extend({emulateTab:function(a,b){return i.tab(a,b)}}),b.fn.extend({emulateTab:function(a){return i.tab(this,a)}})},k=function(){c[d]=i,j(),b(h.initializeAtLoad)};k()}(document,jQuery,JoelPurra,"EmulateTab");