!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)}(function($){var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;function initMouseDetection(t){var i=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(i),mouseDetectionEnabled=!1);else{var s=!0,e=null,o={mousemove:function(t){var i={x:t.pageX,y:t.pageY,timeStamp:new Date().getTime()};if(e){var o=Math.abs(e.x-i.x),a=Math.abs(e.y-i.y);if((o>0||a>0)&&o<=2&&a<=2&&i.timeStamp-e.timeStamp<=300&&(mouse=!0,s)){var r=$(t.target).closest("a");r.is("a")&&$.each(menuTrees,function(){if($.contains(this.$root[0],r[0]))return this.itemEnter({currentTarget:r[0]}),!1}),s=!1}}e=i}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,i)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,i){i||(i="");var s={};for(var e in t)s[e.split(" ").join(i+" ")+i]=t[e];return s}return $.SmartMenus=function(t,i){this.$root=$(t),this.opts=i,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var i=this;if(!t){menuTrees.push(this),this.rootId=(new Date().getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var s=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},s)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},s),"a"),s+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},s)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},s)),this.opts.subIndicators&&(this.$subArrow=$("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul.submenu, ul.sub-menu").each(function(){i.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var e=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(e,""),r=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(e,""),s=$(this);(t==a||t==r)&&(s.addClass("current"),i.opts.markCurrentTree&&s.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var i=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(i),i+=this.rootId,$(document).off(i),$(window).off(i),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var s=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((s.opts.subMenusMinWidth||s.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(s.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(s.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var i=this.$root.offset();this.$disableOverlay=$('<div class="sm-jquery-disable-overlay"/>').css({position:"absolute",top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){if(this.$touchScrollingSub){this.$touchScrollingSub=null;return}(this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll()},docTouchEnd:function(t){if(this.lastTouch){if(this.visibleSubMenus.length&&(void 0===this.lastTouch.x2||this.lastTouch.x1==this.lastTouch.x2)&&(void 0===this.lastTouch.y2||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var i=t.originalEvent.touches[0];this.lastTouch.x2=i.pageX,this.lastTouch.y2=i.pageY}},docTouchStart:function(t){var i=t.originalEvent.touches[0];this.lastTouch={x1:i.pageX,y1:i.pageY,target:i.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var i=$(t).closest("ul");i.dataSM("in-mega");)i=i.parent().closest("ul");return i[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,i){"none"==t.css("display")&&(s={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s,e=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=e&&(i?e.height||e.bottom-e.top:e.width||e.right-e.left);return o||0===o||(o=i?t[0].offsetHeight:t[0].offsetWidth),s&&t.hide().css(s),o},getStartZIndex:function(t){var i=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(i)&&(i=parseInt(this.$root.css("z-index"))),isNaN(i)?1:i},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var i=t?"Height":"Width",s=document.documentElement["client"+i],e=window["inner"+i];return e&&(s=Math.min(s,e)),s},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){if("fixed"==$(this).css("position"))return t=!0,!1}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,i){var s=t.closest("ul"),e=s.dataSM("level");if(e>1&&(!this.activatedItems[e-2]||this.activatedItems[e-2][0]!=s.dataSM("parent-a")[0])){var o=this;$(s.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(s).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if($(s).parents(".raven-megamenu-wrapper").length>0&&(e+=$(s).parents(".raven-megamenu-wrapper").length),(!this.isCollapsible()||i)&&this.menuHideSubMenus(this.activatedItems[e-1]&&this.activatedItems[e-1][0]==t[0]?e:e-1),this.activatedItems[e-1]=t,!1!==this.$root.triggerHandler("activate.smapi",t[0])){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var i=$(t.currentTarget);this.handleItemEvents(i)&&this.$root.triggerHandler("blur.smapi",i[0])},itemClick:function(t){var i=$(t.currentTarget);if(this.handleItemEvents(i)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==i.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(!1===this.$root.triggerHandler("click.smapi",i[0]))return!1;var s=$(t.target).is(".sub-arrow"),e=i.dataSM("sub"),o=!!e&&2==e.dataSM("level"),a=this.isCollapsible(),r=/toggle$/.test(this.opts.collapsibleBehavior),n=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(e&&!e.is(":visible")){if((!n||!a||s)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(i,h),e.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(r||s))return this.itemActivate(i,h),this.menuHide(e),r&&(this.focusActivated=!1),!1;if(this.opts.showOnClick&&o||i.hasClass("disabled")||!1===this.$root.triggerHandler("select.smapi",i[0]))return!1}},itemDown:function(t){var i=$(t.currentTarget);this.handleItemEvents(i)&&i.dataSM("mousedown",!0)},itemEnter:function(t){var i=$(t.currentTarget);if(this.handleItemEvents(i)&&!this.opts.showOnClick){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var s=this;this.showTimeout=setTimeout(function(){s.itemActivate(i)},this.opts.showOnClick&&1==i.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",i[0])}},itemFocus:function(t){var i=$(t.currentTarget);this.handleItemEvents(i)&&(!this.focusActivated||this.isTouchMode()&&i.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==i[0]||this.itemActivate(i,!0),this.$root.triggerHandler("focus.smapi",i[0]))},itemLeave:function(t){var i=$(t.currentTarget);this.handleItemEvents(i)&&(!this.isTouchMode()&&(i[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),i.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",i[0]))},menuHide:function(t){if(!1!==this.$root.triggerHandler("beforehide.smapi",t[0])&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var i=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,i):t.hide(this.opts.collapsibleHideDuration,i):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,i):t.hide(this.opts.hideDuration,i),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var s=t.dataSM("level");this.activatedItems.splice(s-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,i=this.visibleSubMenus.length-1;i>=t;i--)this.menuHide(this.visibleSubMenus[i]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var i=this.activatedItems.length-1;i>=t;i--){var s=this.activatedItems[i].dataSM("sub");s&&this.menuHide(s)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var i=2,s=t[0];(s=s.parentNode.parentNode)!=this.$root[0];)i++;var e=t.prevAll("a").eq(-1);e.length||(e=t.prevAll().find("a").eq(-1)),e.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",e).dataSM("level",i).parent().dataSM("sub",t);var o=e.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;e.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&e[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var i,s,e=t.dataSM("parent-a"),o=e.closest("li"),a=o.parent(),r=t.dataSM("level"),n=this.getWidth(t),h=this.getHeight(t),u=e.offset(),l=u.left,c=u.top,d=this.getWidth(e),m=this.getHeight(e),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==r&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==r?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==r?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(i=M?d-n-w:w,s=this.opts.bottomToTopSubMenus?-h-T:m+T):(i=M?w-n:d-w,s=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+i,x=c+s;if(M&&y<f?i=g?f-y+i:d-w:!M&&y+n>f+b&&(i=g?f+b-n-y+i:w-n),!g&&(h<S&&x+h>v+S?s+=v+S-h-x:(h>=S||x<v)&&(s+=v-x)),g&&(x+h>v+S+.49||x<v)||!g&&h>S+.49){var I=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],$('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),I.menuScroll(t)},mouseleave:function(i){I.menuScrollStop(t),I.menuScrollOut(t,i)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var _=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:s-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(i){I.menuScrollOver(t,i)},mouseout:function(i){I.menuScrollOut(t,i)},"mousewheel DOMMouseScroll":function(i){I.menuScrollMousewheel(t,i)}},_)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:i+(parseInt(t.css("border-left-width"))||0),width:n-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(i){I.menuScrollTouch(t,i)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,_))}}}t.css({top:"auto",left:"0",marginLeft:i,marginTop:s-m})},menuScroll:function(t,i,s){var e,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),r=o.up?o.upEnd:o.downEnd;if(!i&&o.momentum){if(o.momentum*=.92,(e=o.momentum)<.5){this.menuScrollStop(t);return}}else e=s||(i||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var n=t.dataSM("level");if(this.activatedItems[n-1]&&this.activatedItems[n-1].dataSM("sub")&&this.activatedItems[n-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(n-1),o.y=o.up&&r<=o.y||!o.up&&r>=o.y?o.y:Math.abs(r-o.y)>e?o.y+(o.up?e:-e):r,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y<o.upEnd)&&a.eq(o.up?1:0).show(),o.y==r)mouse&&a.eq(o.up?0:1).hide(),this.menuScrollStop(t);else if(!i){this.opts.scrollAccelerate&&o.step<this.opts.scrollStep&&(o.step+=.2);var h=this;this.scrollTimeout=requestAnimationFrame(function(){h.menuScroll(t)})}},menuScrollMousewheel:function(t,i){if(this.getClosestMenu(i.target)==t[0]){var s=((i=i.originalEvent).wheelDelta||-i.detail)>0;t.dataSM("scroll-arrows").eq(s?0:1).is(":visible")&&(t.dataSM("scroll").up=s,this.menuScroll(t,!0))}i.preventDefault()},menuScrollOut:function(t,i){!mouse||/^scroll-(up|down)/.test((i.relatedTarget||"").className)||(t[0]==i.relatedTarget||$.contains(t[0],i.relatedTarget))&&this.getClosestMenu(i.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden")},menuScrollOver:function(t,i){if(mouse&&!/^scroll-(up|down)/.test(i.target.className)&&this.getClosestMenu(i.target)==t[0]){this.menuScrollRefreshData(t);var s=t.dataSM("scroll"),e=$(window).scrollTop()-t.dataSM("parent-a").offset().top-s.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",e).end().eq(1).css("margin-top",e+this.getViewportHeight()-s.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;this.cssTransforms3d&&(s=-(parseFloat(t.css("margin-top"))-s)),$.extend(i,{upEnd:s,downEnd:s+this.getViewportHeight()-i.subH})},menuScrollStop:function(t){if(this.scrollTimeout)return cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0},menuScrollTouch:function(t,i){if(isTouchEvent(i=i.originalEvent)){var s=this.getTouchPoint(i);if(this.getClosestMenu(s.target)==t[0]){var e=t.dataSM("scroll");if(/(start|down)$/i.test(i.type))this.menuScrollStop(t)?(i.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(e,{touchStartY:s.pageY,touchStartTime:i.timeStamp});else if(/move$/i.test(i.type)){var o=void 0!==e.touchY?e.touchY:e.touchStartY;if(void 0!==o&&o!=s.pageY){this.$touchScrollingSub=t;var a=o<s.pageY;void 0!==e.up&&e.up!=a&&$.extend(e,{touchStartY:s.pageY,touchStartTime:i.timeStamp}),$.extend(e,{up:a,touchY:s.pageY}),this.menuScroll(t,!0,Math.abs(s.pageY-o))}i.preventDefault()}else void 0!==e.touchY&&((e.momentum=15*Math.pow(Math.abs(s.pageY-e.touchStartY)/(i.timeStamp-e.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),i.preventDefault()),delete e.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),!1!==this.$root.triggerHandler("beforefirstshow.smapi",t[0])))&&!1!==this.$root.triggerHandler("beforeshow.smapi",t[0])&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var i=t.dataSM("parent-a"),s=this.isCollapsible();if((this.opts.keepHighlighted||s)&&i.addClass("highlighted"),s)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var e=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),e>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};s?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),i.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,i){if(!this.opts.isPopup){alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');return}if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:i});var s=this,e=function(){s.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,e):this.$root.show(this.opts.showDuration,e),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var i=this.activatedItems[0];if(i){this.menuHideAll(),i[0].focus();var s=i.dataSM("sub");s&&this.menuHide(s)}break;case 32:var e=$(t.target);if(e.is("a")&&this.handleItemEvents(e)){var s=e.dataSM("sub");s&&!s.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(!(!this.handleEvents()||this.isTouchMode())&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){!(!this.handleEvents()||this.isTouchMode())&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(!this.handleEvents()){if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}return}if(!("onorientationchange"in window)||"orientationchange"==t.type){var s=this.isCollapsible();this.wasCollapsible&&s||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=s}}}}),$.fn.dataSM=function(t,i){return i?this.data(t+"_smartmenus",i):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,i){t.fadeOut(200,i)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,i){t.slideDown(200,i)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,i){t.slideUp(200,i)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$});
(function(t){var e=function(){try{return!!Symbol.iterator}catch(e){return false}};var r=e();var n=function(t){var e={next:function(){var e=t.shift();return{done:e===void 0,value:e}}};if(r){e[Symbol.iterator]=function(){return e}}return e};var i=function(e){return encodeURIComponent(e).replace(/%20/g,"+")};var o=function(e){return decodeURIComponent(String(e).replace(/\+/g," "))};var a=function(){var a=function(e){Object.defineProperty(this,"_entries",{writable:true,value:{}});var t=typeof e;if(t==="undefined"){}else if(t==="string"){if(e!==""){this._fromString(e)}}else if(e instanceof a){var r=this;e.forEach(function(e,t){r.append(t,e)})}else if(e!==null&&t==="object"){if(Object.prototype.toString.call(e)==="[object Array]"){for(var n=0;n<e.length;n++){var i=e[n];if(Object.prototype.toString.call(i)==="[object Array]"||i.length!==2){this.append(i[0],i[1])}else{throw new TypeError("Expected [string, any] as entry at index "+n+" of URLSearchParams's input")}}}else{for(var o in e){if(e.hasOwnProperty(o)){this.append(o,e[o])}}}}else{throw new TypeError("Unsupported input's type for URLSearchParams")}};var e=a.prototype;e.append=function(e,t){if(e in this._entries){this._entries[e].push(String(t))}else{this._entries[e]=[String(t)]}};e.delete=function(e){delete this._entries[e]};e.get=function(e){return e in this._entries?this._entries[e][0]:null};e.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]};e.has=function(e){return e in this._entries};e.set=function(e,t){this._entries[e]=[String(t)]};e.forEach=function(e,t){var r;for(var n in this._entries){if(this._entries.hasOwnProperty(n)){r=this._entries[n];for(var i=0;i<r.length;i++){e.call(t,r[i],n,this)}}}};e.keys=function(){var r=[];this.forEach(function(e,t){r.push(t)});return n(r)};e.values=function(){var t=[];this.forEach(function(e){t.push(e)});return n(t)};e.entries=function(){var r=[];this.forEach(function(e,t){r.push([t,e])});return n(r)};if(r){e[Symbol.iterator]=e.entries}e.toString=function(){var r=[];this.forEach(function(e,t){r.push(i(t)+"="+i(e))});return r.join("&")};t.URLSearchParams=a};var s=function(){try{var e=t.URLSearchParams;return new e("?a=1").toString()==="a=1"&&typeof e.prototype.set==="function"}catch(e){return false}};if(!s()){a()}var f=t.URLSearchParams.prototype;if(typeof f.sort!=="function"){f.sort=function(){var r=this;var n=[];this.forEach(function(e,t){n.push([t,e]);if(!r._entries){r.delete(t)}});n.sort(function(e,t){if(e[0]<t[0]){return-1}else if(e[0]>t[0]){return+1}else{return 0}});if(r._entries){r._entries={}}for(var e=0;e<n.length;e++){this.append(n[e][0],n[e][1])}}}if(typeof f._fromString!=="function"){Object.defineProperty(f,"_fromString",{enumerable:false,configurable:false,writable:false,value:function(e){if(this._entries){this._entries={}}else{var r=[];this.forEach(function(e,t){r.push(t)});for(var t=0;t<r.length;t++){this.delete(r[t])}}e=e.replace(/^\?/,"");var n=e.split("&");var i;for(var t=0;t<n.length;t++){i=n[t].split("=");this.append(o(i[0]),i.length>1?o(i[1]):"")}}})}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);(function(h){var e=function(){try{var e=new h.URL("b","http://a");e.pathname="c%20d";return e.href==="http://a/c%20d"&&e.searchParams}catch(e){return false}};var t=function(){var t=h.URL;var e=function(e,t){if(typeof e!=="string")e=String(e);var r=document,n;if(t&&(h.location===void 0||t!==h.location.href)){r=document.implementation.createHTMLDocument("");n=r.createElement("base");n.href=t;r.head.appendChild(n);try{if(n.href.indexOf(t)!==0)throw new Error(n.href)}catch(e){throw new Error("URL unable to set base "+t+" due to "+e)}}var i=r.createElement("a");i.href=e;if(n){r.body.appendChild(i);i.href=i.href}if(i.protocol===":"||!/:/.test(i.href)){throw new TypeError("Invalid URL")}Object.defineProperty(this,"_anchorElement",{value:i});var o=new h.URLSearchParams(this.search);var a=true;var s=true;var f=this;["append","delete","set"].forEach(function(e){var t=o[e];o[e]=function(){t.apply(o,arguments);if(a){s=false;f.search=o.toString();s=true}}});Object.defineProperty(this,"searchParams",{value:o,enumerable:true});var c=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:false,configurable:false,writable:false,value:function(){if(this.search!==c){c=this.search;if(s){a=false;this.searchParams._fromString(this.search);a=true}}}})};var r=e.prototype;var n=function(t){Object.defineProperty(r,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:true})};["hash","host","hostname","port","protocol"].forEach(function(e){n(e)});Object.defineProperty(r,"search",{get:function(){return this._anchorElement["search"]},set:function(e){this._anchorElement["search"]=e;this._updateSearchParams()},enumerable:true});Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e;this._updateSearchParams()},enumerable:true},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:true},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol];var t=this._anchorElement.port!=e&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:true},password:{get:function(){return""},set:function(e){},enumerable:true},username:{get:function(){return""},set:function(e){},enumerable:true}});e.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)};e.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)};h.URL=e};if(!e()){t()}if(h.location!==void 0&&!("origin"in h.location)){var r=function(){return h.location.protocol+"//"+h.location.hostname+(h.location.port?":"+h.location.port:"")};try{Object.defineProperty(h.location,"origin",{get:r,enumerable:true})}catch(e){setInterval(function(){h.location.origin=r()},100)}}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);
(function(){
var supportsPassive=false;
try {
var opts=Object.defineProperty({}, 'passive', {
get:function(){
supportsPassive=true;
}});
window.addEventListener('testPassive', null, opts);
window.removeEventListener('testPassive', null, opts);
} catch(e){}
function init(){
var input_begin='';
var keydowns={};
var lastKeyup=null;
var lastKeydown=null;
var keypresses=[];
var modifierKeys=[];
var correctionKeys=[];
var lastMouseup=null;
var lastMousedown=null;
var mouseclicks=[];
var mousemoveTimer=null;
var lastMousemoveX=null;
var lastMousemoveY=null;
var mousemoveStart=null;
var mousemoves=[];
var touchmoveCountTimer=null;
var touchmoveCount=0;
var lastTouchEnd=null;
var lastTouchStart=null;
var touchEvents=[];
var scrollCountTimer=null;
var scrollCount=0;
var correctionKeyCodes=[ 'Backspace', 'Delete', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown' ];
var modifierKeyCodes=[ 'Shift', 'CapsLock' ];
var forms=document.querySelectorAll('form[method=post]');
for(var i=0; i < forms.length; i++){
var form=forms[i];
var formAction=form.getAttribute('action');
if(formAction){
if(formAction.indexOf('http://')==0||formAction.indexOf('https://')==0){
if(formAction.indexOf('http://' + window.location.hostname + '/')!=0&&formAction.indexOf('https://' + window.location.hostname + '/')!=0){
continue;
}}
}
form.addEventListener('submit', function (){
var ak_bkp=prepare_timestamp_array_for_request(keypresses);
var ak_bmc=prepare_timestamp_array_for_request(mouseclicks);
var ak_bte=prepare_timestamp_array_for_request(touchEvents);
var ak_bmm=prepare_timestamp_array_for_request(mousemoves);
var input_fields={
'bib': input_begin,
'bfs': Date.now(),
'bkpc': keypresses.length,
'bkp': ak_bkp,
'bmc': ak_bmc,
'bmcc': mouseclicks.length,
'bmk': modifierKeys.join(';'),
'bck': correctionKeys.join(';'),
'bmmc': mousemoves.length,
'btmc': touchmoveCount,
'bsc': scrollCount,
'bte': ak_bte,
'btec':touchEvents.length,
'bmm':ak_bmm
};
var akismet_field_prefix='ak_';
if(this.getElementsByClassName){
var possible_akismet_containers=this.getElementsByClassName('akismet-fields-container');
for(var containerIndex=0; containerIndex < possible_akismet_containers.length; containerIndex++){
var container=possible_akismet_containers.item(containerIndex);
if(container.getAttribute('data-prefix') ){
akismet_field_prefix=container.getAttribute('data-prefix');
break;
}}
}
for(var field_name in input_fields){
var field=document.createElement('input');
field.setAttribute('type', 'hidden');
field.setAttribute('name', akismet_field_prefix + field_name);
field.setAttribute('value', input_fields[ field_name ]);
this.appendChild(field);
}}, supportsPassive ? { passive: true }:false);
form.addEventListener('keydown', function(e){
if(e.key in keydowns){
return;
}
var keydownTime=(new Date()).getTime();
keydowns[ e.key ]=[ keydownTime ];
if(! input_begin){
input_begin=keydownTime;
}
var lastKeyEvent=Math.max(lastKeydown, lastKeyup);
if(lastKeyEvent){
keydowns[ e.key ].push(keydownTime - lastKeyEvent);
}
lastKeydown=keydownTime;
}, supportsPassive ? { passive: true }:false);
form.addEventListener('keyup', function(e){
if(!(e.key in keydowns) ){
return;
}
var keyupTime=(new Date()).getTime();
if('TEXTAREA'===e.target.nodeName||'INPUT'===e.target.nodeName){
if(-1!==modifierKeyCodes.indexOf(e.key) ){
modifierKeys.push(keypresses.length - 1);
}else if(-1!==correctionKeyCodes.indexOf(e.key) ){
correctionKeys.push(keypresses.length - 1);
}else{
var keydownTime=keydowns[ e.key ][0];
var keypress=[];
keypress.push(keyupTime - keydownTime);
if(keydowns[ e.key ].length > 1){
keypress.push(keydowns[ e.key ][1]);
}
keypresses.push(keypress);
}}
delete keydowns[ e.key ];
lastKeyup=keyupTime;
}, supportsPassive ? { passive: true }:false);
form.addEventListener("focusin", function(e){
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
form.addEventListener("focusout", function(e){
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
}
document.addEventListener('mousedown', function(e){
lastMousedown=(new Date()).getTime();
}, supportsPassive ? { passive: true }:false);
document.addEventListener('mouseup', function(e){
if(! lastMousedown){
return;
}
var now=(new Date()).getTime();
var mouseclick=[];
mouseclick.push(now - lastMousedown);
if(lastMouseup){
mouseclick.push(lastMousedown - lastMouseup);
}
mouseclicks.push(mouseclick);
lastMouseup=now;
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
document.addEventListener('mousemove', function(e){
if(mousemoveTimer){
clearTimeout(mousemoveTimer);
mousemoveTimer=null;
}else{
mousemoveStart=(new Date()).getTime();
lastMousemoveX=e.offsetX;
lastMousemoveY=e.offsetY;
}
mousemoveTimer=setTimeout(function(theEvent, originalMousemoveStart){
var now=(new Date()).getTime() - 500;
var mousemove=[];
mousemove.push(now - originalMousemoveStart);
mousemove.push(Math.round(Math.sqrt(Math.pow(theEvent.offsetX - lastMousemoveX, 2) +
Math.pow(theEvent.offsetY - lastMousemoveY, 2)
)
)
);
if(mousemove[1] > 0){
mousemoves.push(mousemove);
}
mousemoveStart=null;
mousemoveTimer=null;
}, 500, e, mousemoveStart);
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchmove', function(e){
if(touchmoveCountTimer){
clearTimeout(touchmoveCountTimer);
}
touchmoveCountTimer=setTimeout(function (){
touchmoveCount++;
}, 500);
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchstart', function(e){
lastTouchStart=(new Date()).getTime();
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchend', function(e){
if(! lastTouchStart){
return;
}
var now=(new Date()).getTime();
var touchEvent=[];
touchEvent.push(now - lastTouchStart);
if(lastTouchEnd){
touchEvent.push(lastTouchStart - lastTouchEnd);
}
touchEvents.push(touchEvent);
lastTouchEnd=now;
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
document.addEventListener('scroll', function(e){
if(scrollCountTimer){
clearTimeout(scrollCountTimer);
}
scrollCountTimer=setTimeout(function (){
scrollCount++;
}, 500);
}, supportsPassive ? { passive: true }:false);
}
function prepare_timestamp_array_for_request(a, limit){
if(! limit){
limit=100;
}
var rv='';
if(a.length > 0){
var random_starting_point=Math.max(0, Math.floor(Math.random() * a.length - limit) );
for(var i=0; i < limit&&i < a.length; i++){
rv +=a[ random_starting_point + i ][0];
if(a[ random_starting_point + i ].length >=2){
rv +="," + a[ random_starting_point + i ][1];
}
rv +=";";
}}
return rv;
}
if(document.readyState!=='loading'){
init();
}else{
document.addEventListener('DOMContentLoaded', init);
}})();
USR_PREFS_CK_NAME="undefined"!=typeof USR_PREFS_CK_NAME?USR_PREFS_CK_NAME:"lwaio_consent_preferences",ACTED_CONSENT_CK_NAME="undefined"!=typeof ACTED_CONSENT_CK_NAME?ACTED_CONSENT_CK_NAME:"lwaio_consent_acted",EXP_CK_NAME="undefined"!=typeof EXP_CK_NAME?EXP_CK_NAME:"1 Year",function(e){"use strict";let t={set:function(e,t,o,i=""){let s="";if(o){let e=new Date;e.setTime(e.getTime()+24*o*60*60*1e3),s="; expires="+e.toGMTString()}i&&(i="; domain="+i),document.cookie=e+"="+t+s+"; path=/"+i},read:function(e){let t=e+"=",o=document.cookie.split(";"),i=o.length;for(let e=0;e<i;e++){let i=o[e];for(;" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},exists:function(e){return null!==this.read(e)},getallcookies:function(){let e=document.cookie.split(";"),t={},o=e.length;for(let i=0;i<o;i++){let o=e[i].split("=");t[(o[0]+"").trim()]=unescape(o[1])}return t},erase:function(e,t){t?this.set(e,"",-10,t):this.set(e,"",-10)}},o={bar_config:{},show_config:{},allowed_categories:[],set:function(e){if("function"!=typeof JSON.parse)return void console.log("LWAIOCookieConsent requires JSON.parse but your browser doesn't support it");this.settings=JSON.parse(e.settings),EXP_CK_NAME=this.settings.cookie_expiry,this.bar_elm=jQuery(this.settings.notify_div_id),this.show_again_elm=jQuery(this.settings.show_again_div_id),this.details_elm=this.bar_elm.find(".lwaio_messagebar_detail"),this.main_button=jQuery("#cookie_action_accept"),this.main_link=jQuery("#cookie_action_link"),this.reject_button=jQuery("#cookie_action_reject"),this.settings_button=jQuery("#cookie_action_settings"),this.save_button=jQuery("#cookie_action_save"),this.confirm_button=jQuery("#cookie_action_confirm"),this.cancel_button=jQuery("#cookie_action_cancel"),this.accept_all_button=jQuery("#cookie_action_accept_all"),this.configBar(),this.toggleBar(),this.attachEvents(),this.configButtons(),this.settings.auto_scroll&&window.addEventListener("scroll",o.acceptOnScroll,!1);let i=JSON.parse(t.read(USR_PREFS_CK_NAME)),s=t.read(ACTED_CONSENT_CK_NAME),n="";n=new CustomEvent("LwAioCookieConsentOnLoad",{detail:{lwaio_consent_preferences:i,lwaio_consent_acted:s}}),window.dispatchEvent(n)},attachEvents:function(){jQuery(".lwaio_action_button").click(function(e){e.preventDefault();let i="",s="",n="",a="",c=jQuery(this).attr("data-lwaio_action");if("accept_all"==c)o.enableAllCookies(),o.accept_all_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),a=t.read(ACTED_CONSENT_CK_NAME),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAcceptAll",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i),o.logConsent(c);else if("accept"==c)o.accept_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),a=t.read(ACTED_CONSENT_CK_NAME),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAccept",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i),o.logConsent(c);else if("reject"==c){o.reject_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),a=t.read(ACTED_CONSENT_CK_NAME),t.erase(USR_PREFS_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnReject",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i);let e=t.getallcookies();"object"==typeof e&&null!==e&&jQuery.each(e,function(e,o){e!=ACTED_CONSENT_CK_NAME&&t.erase(e,"."+window.location.host)}),o.logConsent(c)}else"settings"==c?(o.bar_elm.slideUp(o.settings.animate_speed_hide),o.show_again_elm.slideUp(o.settings.animate_speed_hide)):"close"==c?o.displayHeader():"show_settings"==c?o.show_details():"hide_settings"==c?o.hide_details():"close_banner"==c&&(o.hideHeader(),o.accept_close(),"yes"!=(a=t.read(ACTED_CONSENT_CK_NAME))&&(s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAccept",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i)))}),jQuery(".group-switch-buttons input").each(function(){let e=jQuery(this).val(),i={},s="";if(t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME))),"necessary"==e||jQuery(this).is(":checked"))i[e]="yes",o.allowed_categories.push(e);else{i[e]="no";let t=o.allowed_categories.length;for(let i=0;i<t;i++)o.allowed_categories[i]==e&&o.allowed_categories.splice(i,1)}s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME)}),jQuery(document).on("click","#lwaio-consent-show-again",function(t){t.preventDefault(),jQuery(o.settings.notify_div_id).find("p.lwaio").show(),jQuery(o.settings.notify_div_id).find(".lwaio.group-description-buttons").show(),o.displayHeader(),e(this).hide()}),jQuery(document).on("click",".group-switch-buttons input",function(){let e=jQuery(this).val(),i={},s="";if(t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME))),jQuery(this).is(":checked"))i[e]="yes",o.allowed_categories.push(e);else{i[e]="no";let t=o.allowed_categories.length;for(let i=0;i<t;i++)o.allowed_categories[i]==e&&o.allowed_categories.splice(i,1)}s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME)}),jQuery(document).on("click","#lwaio_consent_tabs_overview",function(e){e.preventDefault();let t=jQuery(this);jQuery("#lwaio_consent_tabs").find("a").removeClass("tab_selected"),t.addClass("tab_selected"),t.css("border-bottom-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color),jQuery("#lwaio_consent_tabs_about").css("border-bottom-color",o.settings.border_color),jQuery("#lwaio_consent_tabs_about").css("background-color",o.settings.background_color),jQuery("#lwaio_consent_about").hide(),jQuery("#lwaio_consent_overview").show()}),jQuery(document).on("click","#lwaio_consent_tabs_about",function(e){e.preventDefault();let t=jQuery(this);jQuery("#lwaio_consent_tabs").find("a").removeClass("tab_selected"),t.addClass("tab_selected"),t.css("border-bottom-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color),jQuery("#lwaio_consent_tabs_overview").css("border-bottom-color",o.settings.border_color),jQuery("#lwaio_consent_tabs_overview").css("background-color",o.settings.background_color),jQuery("#lwaio_consent_overview").hide(),jQuery("#lwaio_consent_about").show()}),jQuery(document).on("click","#lwaio_consent_overview_cookie_container_types a",function(e){e.preventDefault();let t=jQuery(this),i=t.parent();i.find("a").removeClass("lwaio_consent_overview_cookie_container_type_selected"),i.find("a").css("border-right-color",o.settings.border_color),i.find("a").css("background-color",o.settings.background_color),t.addClass("lwaio_consent_overview_cookie_container_type_selected"),t.css("border-right-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color);let s=jQuery(this).attr("data-target"),n=i.siblings("#lwaio_consent_overview_cookie_container_type_details");n.find(".lwaio_consent_cookie_type_details").hide(),n.find("#"+s).show()})},configButtons:function(){this.settings_button.attr("style",`color: ${this.settings.button_link_color} !important; background-color: ${this.settings.secondary_color} !important`),this.main_button.css("color",this.settings.button_link_color),this.main_button.css("background-color",this.settings.primary_color),this.accept_all_button.css("color",this.settings.button_link_color),this.accept_all_button.css("background-color",this.settings.primary_color),this.confirm_button.css("color",this.settings.button_link_color),this.confirm_button.css("background-color",this.settings.primary_color),this.main_link.css("color",this.settings.secondary_color),this.reject_button.css("display","inline-block"),this.reject_button.attr("style",`color: ${this.settings.button_link_color} !important; background-color: ${this.settings.secondary_color} !important`),this.cancel_button.css("color",this.settings.button_link_color),this.cancel_button.css("display","inline-block"),this.cancel_button.css("background-color",this.settings.secondary_color),this.save_button.css("color",this.settings.button_link_color),this.save_button.css("background-color",this.settings.primary_color),this.details_elm.find("table.lwaio_consent_cookie_type_table tr").css("border-color",o.settings.border_color),this.details_elm.find(".lwaio_consent_cookie_type_intro").css("border-color",o.settings.border_color),this.details_elm.find("a").each(function(){jQuery(this).css("border-color",o.settings.border_color),jQuery(this).css("background-color",o.settings.background_color)}),this.details_elm.find("a.lwaio_consent_overview_cookie_container_type_selected").css("border-right-color",o.settings.border_active_color),this.details_elm.find("a.lwaio_consent_overview_cookie_container_type_selected").css("background-color",o.settings.background_active_color),this.details_elm.find("#lwaio_consent").css("border-color",o.settings.border_color),this.details_elm.find("#lwaio_consent_tabs").css("border-color",o.settings.border_color),this.details_elm.find("#lwaio_consent_tabs .tab_selected").css("border-bottom-color",o.settings.border_active_color),this.details_elm.find("#lwaio_consent_tabs .tab_selected").css("background-color",o.settings.background_active_color)},configBar:function(){this.bar_config={"background-color":this.settings.background,color:this.settings.text,"border-top":"1px solid "+this.settings.secondary_color},this.show_config={width:"auto","background-color":this.settings.background,color:this.settings.text,position:"fixed",opacity:this.settings.opacity,bottom:"0","border-top":"1px solid "+this.settings.secondary_color},"right"==this.settings.show_again_position?this.show_config.right=this.settings.show_again_margin+"%":this.show_config.left=this.settings.show_again_margin+"%",this.bar_config.position="fixed",this.bar_config.opacity=this.settings.opacity,this.bar_elm.find(".lwaio_messagebar_content").css("max-width","800px"),"bottom"==this.settings.banner_position?this.bar_config.bottom="0":this.bar_config.top="0",this.bar_elm.css(this.bar_config).hide(),this.show_again_elm.css(this.show_config).hide()},toggleBar:function(){t.exists(ACTED_CONSENT_CK_NAME)?this.hideHeader():(this.displayHeader(),this.settings.auto_hide&&setTimeout(function(){o.accept_close()},this.settings.auto_hide_delay))},accept_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.accept_reload&&window.location.reload(!0),!1},accept_all_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.accept_reload&&window.location.reload(!0),!1},reject_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),o.disableAllCookies(),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.decline_reload&&window.location.reload(!0),!1},logConsent:function(e){this.settings.logging_on&&jQuery.ajax({url:log_obj.ajax_url,type:"POST",data:{action:"lwaio_log_consent_action",lwaio_user_action:e,cookie_list:t.getallcookies()},success:function(e){}})},disableAllCookies:function(){let i={},s="";t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME)),jQuery.each(i,function(t,s){if("necessary"!=t){i[t]="no",e('.group-switch-buttons input[value="'+t+'"]').prop("checked",!1);let s=o.allowed_categories.length;for(let e=0;e<s;e++)o.allowed_categories[e]==t&&o.allowed_categories.splice(e,1)}}),s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME))},enableAllCookies:function(){let i={},s="";t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME)),jQuery.each(i,function(t,s){if("necessary"!=t){i[t]="yes",e('.group-switch-buttons input[value="'+t+'"]').prop("checked",!0);let s=o.allowed_categories.length;for(let e=0;e<s;e++)o.allowed_categories[e]==t&&o.allowed_categories.splice(e,1)}}),s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME))},show_details:function(){this.details_elm.show(),this.bar_elm.css("opacity",1),this.details_elm.css("border-top-color",o.settings.border_color),this.settings_button.attr("data-lwaio_action","hide_settings")},hide_details:function(){this.details_elm.hide(),this.bar_elm.css("opacity",o.settings.opacity),this.settings_button.attr("data-lwaio_action","show_settings")},displayHeader:function(e,t){this.bar_elm.show(),e&&(jQuery(o.settings.notify_div_id).find("p.lwaio").hide(),jQuery(o.settings.notify_div_id).find(".lwaio.group-description-buttons").hide()),this.show_again_elm.slideUp(this.settings.animate_speed_hide)},hideHeader:function(e){this.bar_elm.slideUp(this.settings.animate_speed_hide),e||this.show_again_elm.slideDown(this.settings.animate_speed_hide)},acceptOnScroll:function(){let i=e(window).scrollTop()/(e(document).height()-e(window).height());Math.round(100*i)>o.settings.auto_scroll_offset&&!t.exists(ACTED_CONSENT_CK_NAME)&&(o.accept_close(),window.removeEventListener("scroll",o.acceptOnScroll,!1),1==o.settings.auto_scroll_reload&&window.location.reload())}},i={blockingStatus:!0,scriptsLoaded:!1,set:function(e){"function"==typeof JSON.parse?this.cookies=JSON.parse(e.cookies):console.log("LWAIOCookieConsent requires JSON.parse but your browser doesn't support it")},removeCookieByCategory:function(){if(1==i.blockingStatus)for(let e in i.cookies){let s=i.cookies[e],n=s.lwaio_category_slug;if(-1===o.allowed_categories.indexOf(n)){let e=s.data;if(e&&0!=e.length)for(let o in e){let i=e[o];t.erase(i.name)}}}},runScripts:function(){let e=["iframe","IFRAME","EMBED","embed","OBJECT","object","IMG","img"],s=function(e){n.renderScripts(),a.renderSrcElement(),e(),i.scriptsLoaded=!0},n={scriptsDone:function(){let e=document.createEvent("Event");e.initEvent("DOMContentLoaded",!0,!0),window.document.dispatchEvent(e)},seq:function(e,t,o){void 0===o&&(o=0),e[o](function(){++o===e.length?t():n.seq(e,t,o)})},insertScript:function(e,s){let n=["data-wpl-class","data-wpl-label","data-wpl-placeholder","data-wpl-script-type","data-wpl-src"],a=e.getAttribute("data-wpl-script-type"),c=e.getAttribute("data-wpl-element-position"),r=e.getAttribute("data-wpl-block"),l=document.createElement("script");l.type="text/plain",e.async&&(l.async=e.async),e.defer&&(l.defer=e.defer),e.src?(l.onload=s,l.onerror=s,l.src=e.src):l.textContent=e.innerText;let _=jQuery(e).prop("attributes"),d=_.length;for(let e=0;e<d;++e)"id"!==_[e].nodeName&&-1!==n.indexOf(_[e].nodeName)&&l.setAttribute(_[e].nodeName,_[e].value);!0===i.blockingStatus?("yes"==t.read(ACTED_CONSENT_CK_NAME)&&-1!==o.allowed_categories.indexOf(a)||null==t.read(ACTED_CONSENT_CK_NAME)&&"false"===r)&&(l.setAttribute("data-wpl-consent","accepted"),l.type="text/javascript"):l.type="text/javascript",e.type!=l.type&&("head"===c?(document.head.appendChild(l),e.src||s(),e.parentNode.removeChild(e)):(document.body.appendChild(l),e.src||s(),e.parentNode.removeChild(e)))},renderScripts:function(){let e=document.querySelectorAll('script[data-wpl-class="wpl-blocker-script"]');if(e.length>0){let t,o=[];Array.prototype.forEach.call(e,function(e){t=e.getAttribute("type");e.tagName;o.push(function(t){n.insertScript(e,t)})}),n.seq(o,n.scriptsDone)}}},a={renderSrcElement:function(){let s=document.querySelectorAll('[data-wpl-class="wpl-blocker-script"]'),n=s.length;for(let a=0;a<n;a++){let n=s[a],c=n.tagName;if(-1!==e.indexOf(c)){let e=n.getAttribute("data-wpl-script-type"),s=n.getAttribute("data-wpl-block");!0===i.blockingStatus?"yes"==t.read(ACTED_CONSENT_CK_NAME)&&-1!==o.allowed_categories.indexOf(e)||null!=t.read(ACTED_CONSENT_CK_NAME)&&"false"===s?this.replaceSrc(n):this.addPlaceholder(n):this.replaceSrc(n)}}},addPlaceholder:function(e){if(0===jQuery(e).prev(".wpl-iframe-placeholder").length){let t=e.getAttribute("data-wpl-placeholder"),o=e.getAttribute("width"),i=e.getAttribute("height");null==o&&(o=e.offsetWidth),null==i&&(i=e.offsetHeight);let s=/px/,n='<div style="width:'+(o=s.test(o)?o:o+"px")+"; height:"+(i=s.test(i)?i:i+"px")+';" class="wpl-iframe-placeholder"><div class="wpl-inner-text">'+t+"</div></div>";"IMG"!==e.tagName&&jQuery(n).insertBefore(e),e.removeAttribute("src"),e.style.display="none"}},replaceSrc:function(e){if(!e.hasAttribute("src")){let t=e.getAttribute("data-wpl-src");e.setAttribute("src",t),jQuery(e).prev(".wpl-iframe-placeholder").length>0&&jQuery(e).prev(".wpl-iframe-placeholder").remove(),e.style.display="block"}}};(function(){jQuery(document).on("click",".wpl_manage_current_consent",function(){o.displayHeader()})})(),s(i.removeCookieByCategory)}};e(document).ready(function(){"undefined"!=typeof lwaiobar_settings&&o.set({settings:lwaiobar_settings}),"undefined"!=typeof lwaios_list&&(i.set({cookies:lwaios_list}),i.runScripts())}),e(document).ready(function(){e(".lwaio-column").click(function(){e(".lwaio-column",this),e(this).children(".lwaio-columns").hasClass("active-group")||(e(".lwaio-columns").removeClass("active-group"),e(this).children(".lwaio-columns").addClass("active-group")),e(this).siblings(".description-container").hasClass("hide")&&(e(".description-container").addClass("hide"),e(this).siblings(".description-container").removeClass("hide"))})})}(jQuery);