;(function(factory){
'use strict';
if(typeof define==='function'&&define.amd){
define(['jquery'], factory);
}else if(jQuery&&!jQuery.fn.hoverIntent){
factory(jQuery);
}})(function($){
'use strict';
var _cfg={
interval: 100,
sensitivity: 6,
timeout: 0
};
var INSTANCE_COUNT=0;
var cX, cY;
var track=function(ev){
cX=ev.pageX;
cY=ev.pageY;
};
var compare=function(ev,$el,s,cfg){
if(Math.sqrt((s.pX-cX)*(s.pX-cX) + (s.pY-cY)*(s.pY-cY)) < cfg.sensitivity){
$el.off(s.event,track);
delete s.timeoutId;
s.isActive=true;
ev.pageX=cX; ev.pageY=cY;
delete s.pX; delete s.pY;
return cfg.over.apply($el[0],[ev]);
}else{
s.pX=cX; s.pY=cY;
s.timeoutId=setTimeout(function(){compare(ev, $el, s, cfg);} , cfg.interval);
}};
var delay=function(ev,$el,s,out){
delete $el.data('hoverIntent')[s.id];
return out.apply($el[0],[ev]);
};
$.fn.hoverIntent=function(handlerIn,handlerOut,selector){
var instanceId=INSTANCE_COUNT++;
var cfg=$.extend({}, _cfg);
if($.isPlainObject(handlerIn)){
cfg=$.extend(cfg, handlerIn);
if(!$.isFunction(cfg.out)){
cfg.out=cfg.over;
}}else if($.isFunction(handlerOut)){
cfg=$.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector });
}else{
cfg=$.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut });
}
var handleHover=function(e){
var ev=$.extend({},e);
var $el=$(this);
var hoverIntentData=$el.data('hoverIntent');
if(!hoverIntentData){ $el.data('hoverIntent', (hoverIntentData={})); }
var state=hoverIntentData[instanceId];
if(!state){ hoverIntentData[instanceId]=state={ id: instanceId };}
if(state.timeoutId){ state.timeoutId=clearTimeout(state.timeoutId); }
var mousemove=state.event='mousemove.hoverIntent.hoverIntent'+instanceId;
if(e.type==='mouseenter'){
if(state.isActive){ return; }
state.pX=ev.pageX; state.pY=ev.pageY;
$el.off(mousemove,track).on(mousemove,track);
state.timeoutId=setTimeout(function(){compare(ev,$el,state,cfg);} , cfg.interval);
}else{ // "mouseleave"
if(!state.isActive){ return; }
$el.off(mousemove,track);
state.timeoutId=setTimeout(function(){delay(ev,$el,state,cfg.out);} , cfg.timeout);
}};
return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector);
};});
jQuery(document).ready(function($){
function is_preview_menu_item(id){
var c=false;
if(self!==top){
try {
if(top.wp.customize){
if(top.easymega_live_previewing==id){
c=true;
}}
} catch(e){
}}
return c;
}
var $window=$(window);
$('body > *').wrapAll('<div id="easymega-wp-page"></div>');
var mobileWidth=0;
var isMegaMenuMobile=false;
if(MegamenuWp.theme_support){
if(MegamenuWp.theme_support.mobile_mod){
mobileWidth=parseInt(MegamenuWp.theme_support.mobile_mod);
}}
if(0 >=mobileWidth){
mobileWidth=720;
}
function viewPortInit(){
$('.mega-tab-posts').removeAttr('style');
if(mobileWidth >=$window.width()){
$('body').addClass('easymega-wp-mobile').removeClass('easymega-wp-desktop') ;
isMegaMenuMobile=true;
}else{
$('body').removeClass('easymega-wp-mobile').addClass('easymega-wp-desktop') ;
isMegaMenuMobile=false;
}}
$window.resize(function(){
viewPortInit();
});
viewPortInit();
function guid(){
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
function setupMegaLayout($m){
var megaLayout=this;
this.margin=0;
this.position='left';
this.left=0;
this.contentWidth=0;
this.offset=null;
this.rightPos=0;
var parentLevel=parseInt(MegamenuWp.mega_parent_level);
var $megaMenu=$m;
if(parentLevel > 0){
var _d=0;
while(parentLevel > 0){
$megaMenu=$megaMenu.parent();
parentLevel -- ;
_d ++;
}}
var id=$megaMenu.attr('id')||'';
if(! id){
id='_mg-'+(new Date().getTime());
$megaMenu.attr('id', id);
}else{
}
$megaMenu.addClass('easymega-nav-parent');
this.cssId=id;
if($('#easymega-css-mega-nav-'+this.cssId).length <=0){
$('head').append('<style id="easymega-css-mega-nav-'+this.cssId+'" type="text/css"></style>');
}else{
$('#easymega-css-mega-nav-'+this.cssId).html('');
}
this.setupData=function(){
this._getNavMenuPost();
var w=$window.width();
var megaWidth=0;
if(isNaN(megaWidth) ){
megaWidth=0;
}
if(megaWidth > w - this.margin * 2){
megaWidth=w - this.margin * 2;
}else{
if(megaWidth==0){
megaWidth=w - this.margin * 2;
}}
if(megaWidth > w){
megaWidth=w;
}
this.contentWidth=megaWidth;
if(this.position=='right'){
this.rightPos=this.navWidth + this.offset.left;
}else{
this.rightPos=this.contentWidth + this.offset.left;
}
return this.contentWidth ;
};
this._getNavMenuPost=function(){
var w=$window.width();
$megaMenu.css({ 'display': 'block', opacity: 0 });
this.offset=$megaMenu.offset();
this.navWidth=$megaMenu.outerWidth();
var l=Math.round(this.offset.left) ;
this.left=this.offset.left;
var mw=$megaMenu.outerWidth();
var r=Math.round(w -(l + mw) ) ;
$megaMenu.css({ 'display':'', opacity: '' });
if(l > r){
this.position='right';
this.margin=r;
}else{
this.position='left';
this.margin=l;
}
return this.position;
};
this.setupContentPos=function (){
this.setupData();
var cssCode='';
$('#easymega-css-mega-nav-'+this.cssId).html('');
if($window.width() <=mobileWidth){
return false;
}
$megaMenu.find('li.mega-item').each(function(index){
var li=$(this);
var liOf=li.offset();
var l=0;
li.css('position', '');
var pos=li.css('position');
var tr=0;
var itemid=li.attr('id')||'';
var ul=$('ul.mega-content', li);
var ulWidth=ul.data('width')||0;
if(! itemid){
itemid='_item_mg-'+(new Date().getTime()) + guid();
li.attr('id', itemid);
}
if(is_preview_menu_item(itemid) ){
li.addClass('mega-live-view-item mega-hover mega-animation');
}
var w, ulpos;
if(ulWidth > 0){
w=ulWidth;
if(w >  megaLayout.contentWidth){
w=megaLayout.contentWidth;
}
ulpos=ul.data('position')||'left';
cssCode +='#easymega-wp-page #' + id + ' #' + itemid + '{';
cssCode +=' position: relative;';
cssCode +='}';
cssCode +='#easymega-wp-page #' + id + ' #' + itemid + ' .mega-content {';
cssCode +=' width: ' + w + 'px; ';
cssCode +='}';
cssCode +=' #easymega-wp-page #' + id + ' #' + itemid + '.mega-hover .mega-content, #easymega-wp-page #' + id + ' #' + itemid + ':hover .mega-content, #easymega-wp-page #' + id + ' #' + itemid + '.focus .mega-content, #easymega-wp-page #' + id + ' #' + itemid + '.mega-hover .mega-content{';
if(ulpos=='left'){
l=0;
if(w + liOf.left > megaLayout.rightPos){
l=(w + liOf.left) - megaLayout.rightPos;
l=- l;
}
cssCode +=' left: '+l+'px !important; ';
cssCode +=' right: auto !important; ';
}else if(ulpos=='right'){
cssCode +=' right: 0px !important; ';
cssCode +=' left: auto !important; ';
}else{
var liw=li.outerWidth();
var t;
t=l =(w/2 - liw / 2);
if(( liOf.left + w) - t > megaLayout.rightPos){
t=(( liOf.left + w) - t) -  megaLayout.rightPos;
l +=Math.abs(t);
}
cssCode +=' right: 0px !important; ';
cssCode +=' left: -'+l+'px !important; ';
}
cssCode +=' display: block !important; ';
cssCode +='}';
}else{
w=megaLayout.contentWidth;
if(megaLayout.position=='right'){
if('relative'!==pos){
li.css('position', 'relative');
}
tr=megaLayout.navWidth + megaLayout.left;
l=tr - megaLayout.contentWidth - liOf.left;
if(l > 0){
l=-l;
}}else{
if('relative'!==pos){
l=0;
}else{
var testLeft=liOf.left;
while (megaLayout.rightPos <(testLeft + megaLayout.contentWidth)){
testLeft--;
l--;
}}
console.log('l - '+pos, l);
}
var ul_left=ul.css('left')||0;
ul_left=parseFloat(ul_left);
if(isNaN(ul_left) ){
ul_left=0;
}
console.log('ul_left', ul_left);
cssCode +='#easymega-wp-page #' + id + ' #' + itemid + ':hover .mega-content, #easymega-wp-page #' + id + ' #' + itemid + '.focus .mega-content, #easymega-wp-page #' + id + ' #' + itemid + '.mega-hover .mega-content {';
cssCode +=' width: ' + w + 'px; ';
if(ul_left < -1600){
cssCode +=' left: ' + l + 'px; ';
}
cssCode +='}';
cssCode +='#easymega-wp-page #' + id + ' #' + itemid + ' .mega-content, #easymega-wp-page #' + id + ' #' + itemid + ' .mega-content {';
cssCode +=' width: ' + w + 'px; ';
if(ul_left >=-1600){
cssCode +=' left: ' + l + 'px !important; ';
}
cssCode +='}';
}});
cssCode +='.easymega-wp-desktop #easymega-wp-page #'+id+' li .mega-content { margin-left: 0px !important; margin-right: 0px !important; max-width: '+($window.width())+'px !important; min-width: 0px!important; right: auto !important; }';
cssCode +='.easymega-wp-desktop #easymega-wp-page #'+id+' { position: relative; } ';
cssCode +='.easymega-wp-desktop #easymega-wp-page #'+id+' .mega-content { z-index: -1; max-width: 99999999px; } ';
cssCode +='.easymega-wp-desktop #easymega-wp-page #'+id+':hover .mega-content,.easymega-wp-desktop #easymega-wp-page #'+id+'.focus .mega-content,  .easymega-wp-desktop #easymega-wp-page #'+id+'.mega-hover .mega-content  { z-index: 999; } ';
if(this.contentWidth < $window.width()){
var md=$window.width() - this.contentWidth;
md=md / 2;
cssCode +='.easymega-wp-desktop #easymega-wp-page .mega-content-full .mega-inner { margin-left: -'+md+'px; margin-right: -'+md+'px; } ';
}
$('#easymega-css-mega-nav-'+this.cssId).html(cssCode);
$(document).trigger('wp_mega_menu_css_changed', [ cssCode, $megaMenu, this.cssId ]);
};
this.init=function(){
var custom_css='';
$('.mega-item .mega-content').each(function (){
var item=$(this).closest('.mega-item');
var css=$(this).data('style')||'';
var id=item.attr('id')||'';
if(css){
css=css.replace(/__id__/g, id);
custom_css +=css;
}});
console.log('custom_css', custom_css);
if(custom_css){
if($('#easymega-wp-custom-css').length <=0){
$('head').append('<style id="easymega-wp-custom-css" type="text/css">'+custom_css+'</style>');
}else{
$('#easymega-wp-custom-css').html(custom_css);
}}else{
$('#easymega-wp-custom-css').remove();
}
if(MegamenuWp.theme_support.disable_auto_css){
return ;
}
this.timeout=null;
$window.resize(function(){
$('#easymega-css-mega-nav-'+megaLayout.cssId).html('');
megaLayout.setupContentPos();
});
megaLayout.setupContentPos();
};
this.init();
}
$('.mega-item').parent().addClass('easymega-wp');
$('.easymega-wp').each(function (){
new setupMegaLayout($(this));
});
var tabs_layout=function(){
$('.mega-tab-posts').each(function(){
var tabs=$(this);
var nav=$('.mega-tab-post-nav', tabs);
var loading=$(MegamenuWp.loading_icon);
var showWhen=tabs.data('show-when')||'hover';
if(showWhen!='click'){
showWhen='hover';
}
var jsEvents=showWhen;
if('hover'==showWhen){
jsEvents='mouseover';
}
tabs.css({ 'min-height': tabs.height() });
if($('.li.active', nav).length==0){
$('.li', nav).eq(0).addClass('active');
var data=$('.li.active', nav).eq(0).data('query');
tabs.data('last-query', data);
$('.mega-tab-post-cont .nav-posts-tab', tabs).eq(0).addClass('active animation');
}
$('.mega-tab-post-cont', tabs).append(loading);
$('.li', nav).on(jsEvents, function(e){
if(showWhen!='hover'){
e.preventDefault();
}
var li=$(this);
if(isMegaMenuMobile&&showWhen!='hover'){
var url=$('a', li).attr('href')||'';
if(url){
window.location=url;
return;
}}
$('.li', nav).removeClass('active');
li.addClass('active');
var id=li.attr('data-id')||'';
if(id){
$('.mega-tab-post-cont .nav-posts-tab', tabs).removeClass('animation');
$('.mega-tab-post-cont .nav-posts-tab', tabs).removeClass('active');
$('.mega-tab-post-cont .nav-posts-tab[data-id="'+id+'"]', tabs).addClass('active');
setTimeout(function(){
$('.mega-tab-post-cont .nav-posts-tab[data-id="'+id+'"]', tabs).addClass('animation');
}, 10);
}});
tabs.on('click', '.tab-paging', function(e){
e.preventDefault();
var a=$(this);
if(a.hasClass('active') ){
var data=null;
var li;
if($('.li.active', nav).eq(0).length > 0){
if(!data){
data=$('.li.active', nav).eq(0).data('query');
}
li=$('.li.active', nav);
}
if(! data){
data=a.closest('.mega-tab-post-cont').data('query')||null;
}
var paged=a.attr('data-paged')||0;
paged=parseInt(paged);
var current_tab=a.closest('.nav-posts-tab');
if(paged > 0){
data.paged=paged;
data.action='megamneu_wp_load_posts';
tabs.addClass('loading');
if(tabs._xhr){
tabs._xhr.abort();
}
tabs._xhr=$.ajax({
url:  MegamenuWp.ajax_url,
data: data,
success: function(res){
tabs.css({ height: 'auto' });
tabs.css({ height: 'auto' });
current_tab.removeClass('animation');
if(res.data){
current_tab.html(res.data);
}else{
a.removeClass('active').addClass('disable');
}
setTimeout(function(){
tabs.removeClass('loading');
current_tab.addClass('animation');
}, 20);
tabs._xhr=null;
}}).fail(function(){
tabs.removeClass('loading');
tabs._xhr=null;
});
}}
});
});
};
tabs_layout();
if('undefined'!==typeof wp&&wp.customize&&wp.customize.selectiveRefresh){
wp.customize.selectiveRefresh.bind('partial-content-rendered', function(placement){
$('.easymega-wp').each(function(){
$(this).find('li').removeClass('mega-live-view-item mega-hover mega-animation');
new setupMegaLayout($(this) );
});
tabs_layout();
});
}});
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.csstransforms=function(){return!!F("transform")},q.csstransforms3d=function(){var a=!!F("perspective");return a&&"webkitPerspective"in g.style&&w("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},q.csstransitions=function(){return F("transition")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,e.prefixed=function(a,b,c){return b?F(a,b,c):F(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document);
!function(t){"function"==typeof define&&define.amd?define(["jquery","modernizr"],t):t(window.jQuery,window.Modernizr)}(function(t,i,e){"use strict";if("object"!=typeof i)throw new Error("Shuffle.js requires Modernizr.\nhttp://vestride.github.io/Shuffle/#dependencies");var s,n=i.prefixed("transition"),r=i.prefixed("transitionDelay"),o=i.prefixed("transitionDuration"),a={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[n],l=i.prefixed("transform"),h=(s=l)?s.replace(/([A-Z])/g,function(t,i){return"-"+i.toLowerCase()}).replace(/^ms-/,"-ms-"):"",u=i.csstransforms&&i.csstransitions,f=i.csstransforms3d;var d=0,c=function(i,e){e=e||{},t.extend(this,c.options,e,c.settings),this.$el=t(i),this.$window=t(window),this.unique="shuffle_"+d++,this._fire(c.EventType.LOADING),this._init(),setTimeout(t.proxy(function(){this.initialized=!0,this._fire(c.EventType.DONE)},this),16)};return c.EventType={LOADING:"loading",DONE:"done",SHRINK:"shrink",SHRUNK:"shrunk",FILTER:"filter",FILTERED:"filtered",SORTED:"sorted",LAYOUT:"layout",REMOVED:"removed"},c.prototype={_init:function(){var i,e,s=this,r=t.proxy(s._onResize,s),o=s.throttle?s.throttle(r,s.throttleTime):r,a=s.initialSort?s.initialSort:null;s._layoutList=[],s._shrinkList=[],s._setVars(),s._resetCols(),s._addClasses(),s._initItems(),s.$window.on("resize.shuffle."+s.unique,o),i=s.$el.css(["paddingLeft","paddingRight","position"]),e=s._getOuterWidth(s.$el[0]),"static"===i.position&&(s.$el[0].style.position="relative"),s.offset={left:parseInt(i.paddingLeft,10)||0,top:parseInt(i.paddingTop,10)||0},s._setColumns(parseInt(e,10)),s.shuffle(s.group,a),s.supported&&setTimeout(function(){s._setTransitions(),s.$el[0].style[n]="height "+s.speed+"ms "+s.easing},0)},_addClasses:function(){this.$el.addClass("shuffle"),this.$items.addClass("shuffle-item filtered")},_setVars:function(){var i=this.columnWidth;this.$items=this._getItems(),0===i&&null!==this.sizer&&(i=this.sizer),"string"==typeof i?this.$sizer=this.$el.find(i):i&&i.nodeType&&1===i.nodeType?this.$sizer=t(i):i&&i.jquery&&(this.$sizer=i),this.$sizer&&this.$sizer.length&&(this.useSizer=!0,this.sizer=this.$sizer[0])},_filter:function(i,s){var n=this,r=s!==e?s:n.$items,o=t();return i=i||n.lastFilter,n._fire(c.EventType.FILTER),t.isFunction(i)?r.each(function(){var e=t(this);i.call(e[0],e,n)&&(o=o.add(e))}):(n.group=i,"all"===i?o=r:r.each(function(){var e=t(this),s=e.data("groups"),r=n.delimeter&&!t.isArray(s)?s.split(n.delimeter):s;t.inArray(i,r)>-1&&(o=o.add(e))})),n._toggleFilterClasses(r,o),r=null,s=null,o},_toggleFilterClasses:function(i,e){i.filter(e).each(function(){var i=t(this);i.hasClass("concealed")&&i.removeClass("concealed"),i.hasClass("filtered")||i.addClass("filtered")}),i.not(e).each(function(){var i=t(this);i.hasClass("concealed")||i.addClass("concealed"),i.hasClass("filtered")&&i.removeClass("filtered")})},_initItems:function(t){(t=t||this.$items).css(this.itemCss).data("position",{x:0,y:0})},_updateItemCount:function(){this.visibleItems=this.$items.filter(".filtered").length},_setTransition:function(t){t.style[n]=h+" "+this.speed+"ms "+this.easing},_setTransitions:function(t){var i=this;(t=t||i.$items).each(function(){i._setTransition(this)})},_setSequentialDelay:function(i){var e=this;e.supported&&t.each(i,function(i,s){s.style[r]="0ms,"+(i+1)*e.sequentialFadeDelay+"ms",t(s).on(a+"."+e.unique,function(i){var s=i.currentTarget;s===i.target&&(s.style[r]="0ms",t(s).off(a+"."+e.unique))})})},_getItems:function(){return this.$el.children(this.itemSelector)},_getPreciseDimension:function(i,e){var s;return s=window.getComputedStyle?window.getComputedStyle(i,null)[e]:t(i).css(e),parseFloat(s)},_getOuterWidth:function(i,e){var s=i.offsetWidth;if(e){var n=t(i).css(["marginLeft","marginRight"]);s+=(parseFloat(n.marginLeft)||0)+(parseFloat(n.marginRight)||0)}return s},_getOuterHeight:function(i,e){var s=i.offsetHeight;if(e){var n=t(i).css(["marginTop","marginBottom"]);s+=(parseFloat(n.marginTop)||0)+(parseFloat(n.marginBottom)||0)}return s},_getColumnSize:function(i,e){var s;return 0===(s=t.isFunction(this.columnWidth)?this.columnWidth(e):this.useSizer?this._getPreciseDimension(this.sizer,"width"):this.columnWidth?this.columnWidth:this.$items.length>0?this._getOuterWidth(this.$items[0],!0):e)&&(s=e),s+i},_getGutterSize:function(i){return t.isFunction(this.gutterWidth)?this.gutterWidth(i):this.useSizer?this._getPreciseDimension(this.sizer,"marginLeft"):this.gutterWidth},_setColumns:function(t){var i=t||this._getOuterWidth(this.$el[0]),e=this._getGutterSize(i),s=this._getColumnSize(e,i),n=(i+e)/s;Math.abs(Math.round(n)-n)<.03&&(n=Math.round(n)),this.cols=Math.max(Math.floor(n),1),this.containerWidth=i,this.colWidth=s},_setContainerSize:function(){this.$el.css("height",Math.max.apply(Math,this.colYs))},_fire:function(t,i){this.$el.trigger(t+".shuffle",i&&i.length?i:[this])},_layout:function(i,e,s){var n=this;e=e||n._filterEnd,t.each(i,function(i,r){var o=t(r),a=o.data(),l=a.position,h=n._getItemPosition(o);if(o.data("position",h),h.x!==l.x||h.y!==l.y||1!==a.scale){var u={$item:o,x:h.x,y:h.y,scale:1};s?(u.skipTransition=!0,u.opacity=0):(u.opacity=1,u.callback=e),n.styleQueue.push(u),n._layoutList.push(o[0])}}),n._processStyleQueue(),n._setContainerSize()},_resetCols:function(){var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0)},_reLayout:function(){this._resetCols(),this.lastSort?this.sort(this.lastSort,!0):this._layout(this.$items.filter(".filtered").get(),this._filterEnd)},_getItemPosition:function(t){var i=this._getOuterWidth(t[0],!0)/this.colWidth;Math.abs(Math.round(i)-i)<.03&&(i=Math.round(i));var e=Math.min(Math.ceil(i),this.cols);if(1===e)return this._placeItem(t,this.colYs);var s,n,r=this.cols+1-e,o=[];for(n=0;n<r;n++)s=this.colYs.slice(n,n+e),o[n]=Math.max.apply(Math,s);return this._placeItem(t,o)},_placeItem:function(t,i){for(var e=Math.min.apply(Math,i),s=0,n=0,r=i.length;n<r;n++)if(i[n]>=e-this.buffer&&i[n]<=e+this.buffer){s=n;break}var o={x:Math.round(this.colWidth*s+this.offset.left),y:Math.round(e+this.offset.top)},a=e+this._getOuterHeight(t[0],!0),l=this.cols+1-r;for(n=0;n<l;n++)this.colYs[s+n]=a;return o},_shrink:function(i,e){var s=this,n=i||s.$items.filter(".concealed");e=e||s._shrinkEnd,n.length&&(s._fire(c.EventType.SHRINK),n.each(function(){var i=t(this),n=i.data();if(!(.001===n.scale)){var r={$item:i,x:n.position.x,y:n.position.y,scale:.001,opacity:0,callback:e};s.styleQueue.push(r),s._shrinkList.push(i[0])}}))},_onResize:function(){this.enabled&&!this.destroyed&&(this._getOuterWidth(this.$el[0])!==this.containerWidth&&this.resized())},_getItemTransformString:function(t,i,e){return f?"translate3d("+t+"px, "+i+"px, 0) scale3d("+e+", "+e+", 1)":"translate("+t+"px, "+i+"px) scale("+e+", "+e+")"},_getStylesForTransition:function(t){var i={opacity:t.opacity};return this.supported?t.x!==e&&(i[l]=this._getItemTransformString(t.x,t.y,t.scale)):(i.left=t.x,i.top=t.y),1===t.opacity&&(i.visibility="visible"),i},_transition:function(t){t.$item.data("scale",t.scale);var i=this._getStylesForTransition(t);this._startItemAnimation(t.$item,i,t.callback)},_startItemAnimation:function(i,e,s){var n=1===e.opacity,r=t.proxy(this._handleItemAnimationEnd,this,s||t.noop,i[0],n);this.supported?(i.css(e),this.initialized?i.on(a+".shuffleitem",r):r()):("visibility"in e&&(i.css("visibility",e.visibility),delete e.visibility),i.stop(!0).animate(e,this.speed,"swing",r))},_handleItemAnimationEnd:function(i,e,s,n){if(n){if(n.target!==e)return;t(e).off(".shuffleitem")}this._layoutList.length>0&&t.inArray(e,this._layoutList)>-1?(this._fire(c.EventType.LAYOUT),i.call(this),this._layoutList.length=0):this._shrinkList.length>0&&t.inArray(e,this._shrinkList)>-1&&(i.call(this),this._shrinkList.length=0),s||(e.style.visibility="hidden")},_processStyleQueue:function(){var i=this;t.each(this.styleQueue,function(t,e){e.skipTransition?i._skipTransition(e.$item[0],function(){e.$item.css(i._getStylesForTransition(e))}):i._transition(e)}),i.styleQueue.length=0},_shrinkEnd:function(){this._fire(c.EventType.SHRUNK)},_filterEnd:function(){this._fire(c.EventType.FILTERED)},_sortEnd:function(){this._fire(c.EventType.SORTED)},_skipTransition:function(i,e,s){var n=i.style[o];i.style[o]="0ms",t.isFunction(e)?e():i.style[e]=s;i.offsetWidth;i.style[o]=n},_addItems:function(t,i,s){this.supported||(i=!1),t.addClass("shuffle-item"),this._initItems(t),this._setTransitions(t),this.$items=this._getItems(),t.css("opacity",0);var n=this._filter(e,t),r=n.get();this._updateItemCount(),i?(this._layout(r,null,!0),s&&this._setSequentialDelay(n),this._revealAppended(n)):this._layout(r)},_revealAppended:function(i){var e=this;setTimeout(function(){i.each(function(i,s){e._transition({$item:t(s),opacity:1,scale:1})})},e.revealAppendedDelay)},shuffle:function(t,i){this.enabled&&(t||(t="all"),this._filter(t),this.lastFilter=t,this._updateItemCount(),this._shrink(),i&&(this.lastSort=i),this._reLayout())},sort:function(t,i){var e=this,s=e.$items.filter(".filtered").sorted(t);i||e._resetCols(),e._layout(s,function(){i&&e._filterEnd(),e._sortEnd()}),e.lastSort=t},resized:function(t){this.enabled&&(t||this._setColumns(),this._reLayout())},layout:function(){this.update(!0)},update:function(t){this.resized(t)},appended:function(t,i,e){i=!1!==i,e=!1!==e,this._addItems(t,i,e)},disable:function(){this.enabled=!1},enable:function(t){this.enabled=!0,!1!==t&&this.update()},remove:function(t){if(t.length&&t.jquery){return this._shrink(t,function(){var i=this;t.remove(),setTimeout(function(){i.$items=i._getItems(),i.layout(),i._updateItemCount(),i._fire(c.EventType.REMOVED,[t,i]),t=null},0)}),this._processStyleQueue(),this}},destroy:function(){this.$window.off("."+this.unique),this.$el.removeClass("shuffle").removeAttr("style").removeData("shuffle"),this.$items.removeAttr("style").removeClass("concealed filtered shuffle-item"),this.$window=null,this.$items=null,this.$el=null,this.$sizer=null,this.sizer=null,this.destroyed=!0}},c.options={group:"all",speed:250,easing:"ease-out",itemSelector:"",sizer:null,gutterWidth:0,columnWidth:0,delimeter:null,buffer:0,initialSort:null,throttle:function(i,e,s){var n,r,o,a=null,l=0;s=s||{};var h=function(){l=!1===s.leading?0:t.now(),a=null,o=i.apply(n,r),n=r=null};return function(){var u=t.now();l||!1!==s.leading||(l=u);var f=e-(u-l);return n=this,r=arguments,f<=0||f>e?(clearTimeout(a),a=null,l=u,o=i.apply(n,r),n=r=null):a||!1===s.trailing||(a=setTimeout(h,f)),o}},throttleTime:300,sequentialFadeDelay:150,supported:u},c.settings={$sizer:null,useSizer:!1,itemCss:{position:"absolute",top:0,left:0},offset:{top:0,left:0},revealAppendedDelay:300,enabled:!0,destroyed:!1,initialized:!1,styleQueue:[]},t.fn.shuffle=function(i){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var s=t(this),n=s.data("shuffle");n||(n=new c(s,i),s.data("shuffle",n)),"string"==typeof i&&n[i]&&n[i].apply(n,e)})},t.fn.sorted=function(i){var s=t.extend({},t.fn.sorted.defaults,i),n=this.get(),r=!1;return n.length?s.randomize?t.fn.sorted.randomize(n):(s.by!==t.noop&&null!==s.by&&s.by!==e&&n.sort(function(i,n){if(r)return 0;var o=s.by(t(i)),a=s.by(t(n));return o===e&&a===e?(r=!0,0):"sortFirst"===o||"sortLast"===a?-1:"sortLast"===o||"sortFirst"===a?1:o<a?-1:o>a?1:0}),r?this.get():(s.reverse&&n.reverse(),n)):[]},t.fn.sorted.defaults={reverse:!1,by:null,randomize:!1},t.fn.sorted.randomize=function(t){var i,e,s=t.length;if(!s)return t;for(;--s;)i=t[e=Math.floor(Math.random()*(s+1))],t[e]=t[s],t[s]=i;return t},c});
window.Manipulator=function(e){"use strict";var t=window.console&&typeof window.console.log==="function";var n=function(t){var n=this;n.$el=e(t);n.init()};n.prototype.init=function(){var e=this;e.initShuffle();e.setupEvents()};n.prototype.initShuffle=function(){this.$el.shuffle({itemSelector:".shuffeldiv",speed:250,easing:"ease",columnWidth:function(t){return parseInt(e(".shuffeldiv").css("width"))},gutterWidth:function(t){return parseInt(e(".shuffeldiv").css("margin-left"))}});this.shuffle=this.$el.data("shuffle")};n.prototype.setupEvents=function(){var n=this;e("#sfsi_wDiv").on("click",e.proxy(n.onRandomize,n));n.$el.on("removed.shuffle",function(e,n,r){if(!t){return}})};n.prototype.onAddClick=function(){var t=this,n=5,r=document.createDocumentFragment(),i=t.$el[0],s=[],o,u=["w2","h2","w3"],a,f,l,c;for(f=0;f<n;f++){l=Math.random();a=document.createElement("div");a.className="shuffeldiv";if(l>.8){c=Math.floor(Math.random()*3);a.className=a.className+" "+u[c]}s.push(a);r.appendChild(a)}i.appendChild(r);o=e(s);t.shuffle.appended(o)};n.prototype.getRandomInt=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};n.prototype.onRemoveClick=function(){var t=this,n=t.shuffle.visibleItems,r=Math.min(3,n),i=[],s=0,o=e();if(!n){return}for(;s<r;s++){i.push(t.getRandomInt(0,n-1))}e.each(i,function(e,n){o=o.add(t.shuffle.$items.eq(n))});t.shuffle.remove(o)};n.prototype.onRandomize=function(){var e=this,t={randomize:true};e.shuffle.sort(t)};return n}(jQuery);
jQuery(document).ready(function (e){
jQuery("#sfsi_floater").attr("data-top", jQuery(document).height());
});
function showErrorSuc(s, i, e){
if("error"==s) var t="errorMsg";
else var t="sucMsg";
return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
SFSI(".tab" + e + ">." + t).effect("highlight", {}, 5e3), setTimeout(function (){
SFSI("." + t).slideUp("slow");
}, 5e3), !1;
}
function beForeLoad(){
SFSI(".loader-img").show(), SFSI(".save_button >a").html("Saving..."), SFSI(".save_button >a").css("pointer-events", "none");
}
function sfsi_make_popBox(){
var s=0;
SFSI(".sfsi_sample_icons >li").each(function (){
"none"!=SFSI(this).css("display")&&(s=1);
}), 0==s ? SFSI(".sfsi_Popinner").hide():SFSI(".sfsi_Popinner").show(), ""!=SFSI('input[name="sfsi_popup_text"]').val() ? (SFSI(".sfsi_Popinner >h2").html(SFSI('input[name="sfsi_popup_text"]').val()),
SFSI(".sfsi_Popinner >h2").show()):SFSI(".sfsi_Popinner >h2").hide(), SFSI(".sfsi_Popinner").css({
"border-color": SFSI('input[name="sfsi_popup_border_color"]').val(),
"border-width": SFSI('input[name="sfsi_popup_border_thickness"]').val(),
"border-style": "solid"
}), SFSI(".sfsi_Popinner").css("background-color", SFSI('input[name="sfsi_popup_background_color"]').val()),
SFSI(".sfsi_Popinner h2").css("font-family", SFSI("#sfsi_popup_font").val()), SFSI(".sfsi_Popinner h2").css("font-style", SFSI("#sfsi_popup_fontStyle").val()),
SFSI(".sfsi_Popinner >h2").css("font-size", parseInt(SFSI('input[name="sfsi_popup_fontSize"]').val())),
SFSI(".sfsi_Popinner >h2").css("color", SFSI('input[name="sfsi_popup_fontColor"]').val() + " !important"),
"yes"==SFSI('input[name="sfsi_popup_border_shadow"]:checked').val() ? SFSI(".sfsi_Popinner").css("box-shadow", "12px 30px 18px #CCCCCC"):SFSI(".sfsi_Popinner").css("box-shadow", "none");
}
function sfsi_stick_widget(s){
0==initTop.length&&(SFSI(".sfsi_widget").each(function (s){
initTop[s]=SFSI(this).position().top;
}));
var i=SFSI(window).scrollTop(),
e=[],
t=[];
SFSI(".sfsi_widget").each(function (s){
e[s]=SFSI(this).position().top, t[s]=SFSI(this);
});
var n = !1;
for (var o in e){
var a=parseInt(o) + 1;
e[o] < i&&e[a] > i&&a < e.length ? (SFSI(t[o]).css({
position: "fixed",
top: s
}), SFSI(t[a]).css({
position: "",
top: initTop[a]
}), n = !0):SFSI(t[o]).css({
position: "",
top: initTop[o]
});
}
if(!n){
var r=e.length - 1,
c=-1;
e.length > 1&&(c=e.length - 2), initTop[r] < i ? (SFSI(t[r]).css({
position: "fixed",
top: s
}), c >=0&&SFSI(t[c]).css({
position: "",
top: initTop[c]
})):(SFSI(t[r]).css({
position: "",
top: initTop[r]
}), c >=0&&e[c] < i);
}}
function sfsi_float_widget(s){
function i(){
r="Microsoft Internet Explorer"===navigator.appName ? a - document.documentElement.scrollTop:a - window.pageYOffset,
Math.abs(r) > 0 ?
(window.removeEventListener("scroll", i),
a -=r * o,
SFSI("#sfsi_floater").css({
top: Math.round((a + t).toString()) + "px",
transition: "all 0.6s ease 0s"
}),
setTimeout(i, n)) :
window.addEventListener("scroll", i, !1);
}
function e(){
var documentheight=SFSI("#sfsi_floater").attr("data-top");
var fltrhght=parseInt(SFSI("#sfsi_floater").height());
var fltrtp=parseInt(SFSI("#sfsi_floater").css("top"));
if(parseInt(fltrhght) + parseInt(fltrtp) <=documentheight){
window.addEventListener("scroll", i, !1);
}else{
window.removeEventListener("scroll", i);
SFSI("#sfsi_floater").css("top", documentheight + "px");
}}
if("center"==s){
var t=(SFSI(window).height() - SFSI("#sfsi_floater").height()) / 2;
}else if("bottom"==s){
var t=window.innerHeight - (SFSI("#sfsi_floater").height() + parseInt(SFSI('#sfsi_floater').css('margin-bottom')));
}else{
var t=parseInt(s);
}
var n=50,
o=.1,
a=0,
r=0;
SFSI("#sfsi_floater");
var prev_onscroll=window.onscroll;
window.onscroll=function (){
if('function'===typeof prev_onload){
prev_onload(), e();
}else{
e();
}}
}
function sfsi_shuffle(){
var $=window.jQuery;
return SFSI('.sfsi_wDiv').each(function (index, container){
var s=[];
s=SFSI(container).find(".sfsi_wicons ");
s=Shuffle(s);
SFSI(container).html("");
for (var i=0; i < s.length; i++){
SFSI(s[i]).css('transform', 'none');
SFSI(s[i]).css('position', 'relative');
SFSI(container).append(s[i]);
}})
}
function Shuffle(s){
for (var i, e, t=s.length; t; i=parseInt(Math.random() * t), e=s[--t], s[t]=s[i], s[i]=e);
return s
}
function sfsi_setCookie(s, i, e){
var t=new Date();
t.setTime(t.getTime() + 1e3 * 60 * 60 * 24 * e);
var n="expires=" + t.toGMTString();
document.cookie=s + "=" + i + "; " + n;
}
function sfsfi_getCookie(s){
for (var i=s + "=", e=document.cookie.split(";"), t=0; t < e.length; t++){
var n=e[t].trim();
if(0==n.indexOf(i)) return n.substring(i.length, n.length);
}
return "";
}
function sfsi_hideFooter(){ }
window.onerror=function (){
jQuery("#sfpageLoad").fadeOut(2e3);
}, SFSI=jQuery, SFSI(window).on('load', function (){
SFSI("#sfpageLoad").fadeOut(2e3);
if(jQuery('#sfsi_tifm_scroll_value').val()){
jQuery('.sfsi_tifm_module_menu_block').click();
setTimeout(function (){
document.querySelector('.sfsi_tifm_tab_module_block').scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" });
}, 300);
}});
var global_error=0;
SFSI(document).ready(function (s){
SFSI(document).on('click', '.inerCnt a[href=""]', function (event){
if(!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))){
event.preventDefault();
}});
SFSI("head").append('<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />'),
SFSI("head").append('<meta http-equiv="Pragma" content="no-cache" />'), SFSI("head").append('<meta http-equiv="Expires" content="0" />'),
SFSI(document).click(function (s){
var i=SFSI(".sfsi_FrntInner"),
e=SFSI(".sfsi_wDiv"),
t=SFSI("#at15s");
i.is(s.target)||0!==i.has(s.target).length||e.is(s.target)||0!==e.has(s.target).length||t.is(s.target)||0!==t.has(s.target).length||i.fadeOut();
}), SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseover(function (){
SFSI(this).css("opacity", "0.9");
}), SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseleave(function (){
SFSI(this).css("opacity", "1");
}), SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseover(function (){
SFSI(this).css("opacity", "0.9");
}), SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseleave(function (){
SFSI(this).css("opacity", "1");
}), SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseover(function (){
SFSI(this).css("opacity", "0.9");
}), SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseleave(function (){
SFSI(this).css("opacity", "1");
}), SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseover(function (){
SFSI(this).css("opacity", "0.9");
}), SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseleave(function (){
SFSI(this).css("opacity", "1");
}), SFSI(".pop-up").on("click", function (){
("fbex-s2"==SFSI(this).attr("data-id")||"linkex-s2"==SFSI(this).attr("data-id"))&&(SFSI("." + SFSI(this).attr("data-id")).hide(),
SFSI("." + SFSI(this).attr("data-id")).css("opacity", "1"), SFSI("." + SFSI(this).attr("data-id")).css("z-index", "1000")),
SFSI("." + SFSI(this).attr("data-id")).show("slow");
}), /*SFSI("#close_popup").live("click", function(){*/ SFSI(document).on("click", '#close_popup', function (){
SFSI(".read-overlay").hide("slow");
});
var e=0;
sfsi_make_popBox(), SFSI('input[name="sfsi_popup_text"] ,input[name="sfsi_popup_background_color"],input[name="sfsi_popup_border_color"],input[name="sfsi_popup_border_thickness"],input[name="sfsi_popup_fontSize"],input[name="sfsi_popup_fontColor"]').on("keyup", sfsi_make_popBox),
SFSI('input[name="sfsi_popup_text"] ,input[name="sfsi_popup_background_color"],input[name="sfsi_popup_border_color"],input[name="sfsi_popup_border_thickness"],input[name="sfsi_popup_fontSize"],input[name="sfsi_popup_fontColor"]').on("focus", sfsi_make_popBox),
SFSI("#sfsi_popup_font ,#sfsi_popup_fontStyle").on("change", sfsi_make_popBox),
/*SFSI(".radio").live("click", function(){*/
SFSI(document).on("click", '.radio', function (){
var s=SFSI(this).parent().find("input:radio:first");
"sfsi_popup_border_shadow"==s.attr("name")&&sfsi_make_popBox();
}),
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? SFSI(document).on("click", 'img.sfsi_wicon', function (s){
if(SFSI(s.target).parent().attr('href')==""){
s.preventDefault();
}
if(!SFSI(this).hasClass('sfsi_click_wicon')){
s.stopPropagation&&s.stopPropagation();
}
var i=SFSI("#sfsi_floater_sec").val();
SFSI("div.sfsi_wicons").css("z-index", "0"), SFSI(this).parent().parent().parent().siblings("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide(),
SFSI(this).parent().parent().parent().parent().siblings("li").length > 0&&(SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"),
SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()),
SFSI(this).parent().parent().parent().css("z-index", "1000000"), SFSI(this).parent().parent().css({
"z-index": "999"
}), SFSI(this).attr("data-effect")&&"fade_in"==SFSI(this).attr("data-effect")&&(SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 10
}), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect")&&"scale"==SFSI(this).attr("data-effect")&&(SFSI(this).parent().addClass("scale"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 10
}), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect")&&"combo"==SFSI(this).attr("data-effect")&&(SFSI(this).parent().addClass("scale"),
SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 10
})), ("top-left"==i||"top-right"==i||"center-top"==i)&&SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0&&"sfsi_floater"==SFSI(this).parent().parent().parent().parent().attr("id") ? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 10,
"bottom": "auto"
}), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()):(SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 1e3
}), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show());
})
: SFSI(document).on("mouseenter", "img.sfsi_wicon", function (){
var s=SFSI("#sfsi_floater_sec").val();
SFSI(this).parent().parent().parent().parent().siblings("li").length > 0
&& (SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"),
SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide());
SFSI(this).parent().css({ "opacity": "1" });
SFSI(this).attr("data-effect")&&"fade_in"==SFSI(this).attr("data-effect")&&(SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 1e8
}), SFSI(this).parent().css("opacity", "1"));
SFSI(this).attr("data-effect")&&"scale"==SFSI(this).attr("data-effect")&&(SFSI(this).parent().addClass("scale"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 1e8
}), SFSI(this).parent().css("opacity", "1"));
SFSI(this).attr("data-effect")&&"combo"==SFSI(this).attr("data-effect")&&(SFSI(this).parent().addClass("scale"),
SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 1e8
}));
("top-left"==s||"top-right"==s||"center-top"==s)&&SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0
&& "sfsi_floater"==SFSI(this).parent().parent().parent().parent().attr("id")
? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 1e8,
"bottom": "auto"
}), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show())
: (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"),
SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
opacity: 1,
"z-index": 1e8
}), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show());
});
SFSI(document).on("mouseleave", "div.sfsi_wicons", function (){
SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect")&&"fade_in"==SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect")&&SFSI(this).children("div.inerCnt").find("a.sficn").css("opacity", "0.6"),
SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect")&&"scale"==SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect")&&SFSI(this).children("div.inerCnt").find("a.sficn").removeClass("scale"),
SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect")&&"combo"==SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect")&&SFSI(this).children("div.inerCnt").find("a.sficn").removeClass("scale").css("opacity", "0.6"),
SFSI(this).parent("div").find("div.sfsi_tool_tip_2").css("display", "none"),
SFSI(this).parent("div").find("div.sfsi_tool_tip_2").css("opacity", "0");
});
SFSI(document).on("mouseenter", "div.sfsi_tool_tip_2", function (){
SFSI(this).find("div.sfsi_tool_tip_2").css({ "z-index": 1e8, "opacity": 1 });
});
SFSI("body").on("click", function (e){
var target=SFSI(e.target);
if(!target.is(".sfsi_wicon")){
SFSI(".inerCnt").find("div.sfsi_tool_tip_2").hide();
}});
SFSI(".adminTooltip >a").on("hover", function (){
SFSI(this).offset().top, SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "1"),
SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").show();
});
SFSI(".adminTooltip").on("mouseleave", function (){
"none"!=SFSI(".gpls_tool_bdr").css("display")&&0!=SFSI(".gpls_tool_bdr").css("opacity") ? SFSI(".pop_up_box ").on("click", function (){
SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"), SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide();
}):(SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"),
SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide());
});
SFSI(".expand-area").on("click", function (){
"Read more"==SFSI(this).text() ? (SFSI(this).siblings("p").children("label").fadeIn("slow"),
SFSI(this).text("Collapse")):(SFSI(this).siblings("p").children("label").fadeOut("slow"),
SFSI(this).text("Read more"));
});
SFSI(".sfsi_wDiv").length > 0&&setTimeout(function (){
var s=parseInt(SFSI(".sfsi_wDiv").height()) + 15 + "px";
SFSI(".sfsi_holders").each(function (){
SFSI(this).css("height", s);
SFSI(".sfsi_widget");
});
}, 200);
SFSI('.usm-widget__footer-text-link').on('click', function (){
SFSI(this).parents('.usm-widget').toggle('usm-widget--open');
SFSI.ajax({
type: "post",
dataType: "json",
url: sfsi_icon_ajax_object.ajax_url,
data: {
nonce: sfsi_icon_ajax_object.nonce,
action: "sfsi_hide_admin_forum_notification"
},
success: function (){
SFSI('.usm-widget').remove();
}});
});
SFSI('.usm-widget__toggle-btn').on('click', function (){
var currentThis=SFSI(this);
currentThis.parents('.usm-widget').toggleClass('usm-widget--open');
var toggleStatus='';
if(currentThis.parents('.usm-widget').hasClass('usm-widget--open')){
toggleStatus='hide';
}else{
toggleStatus='show';
}
SFSI.ajax({
type: "post",
dataType: "json",
url: sfsi_icon_ajax_object.ajax_url,
data: { action: "sfsi_default_hide_admin_notification", status: toggleStatus, nonce: sfsi_icon_ajax_object.unonce },
success: function (){
currentThis.addClass('sfsi-first-click-enabled');
}});
});
});
function sfsihidemepopup(){
SFSI(".sfsi_FrntInner_chg").fadeOut();
}
var initTop=new Array();
function close_overlay(selector){
if(typeof selector==="undefined"){
selector='.sfsi_overlay';
}
jQuery(selector).removeClass('show').addClass('hide').hide();
}
function sfsi_wechat_share(url){
if(jQuery('.sfsi_wechat_follow_overlay').length==0){
jQuery('body').append("<div class='sfsi_wechat_follow_overlay sfsi_overlay show'><div class='sfsi_inner_display'><a class='close_btn' href='' onclick='event.preventDefault();close_overlay(\".sfsi_wechat_follow_overlay\")' >×</a><div style='width:95%;max-width:500px; min-height:80%;background-color:#fff;margin:0 auto;margin:10% auto;padding: 20px 0;'><div style='width:90%;margin: 0 auto;text-align:center'><div class='sfsi_wechat_qr_display' style='display:inline-block'></div></div><div style='width:80%;margin:10px auto 0 auto;text-align:center;font-weight:900;font-size:25px;'>\"Scan QR Code\" in WeChat and press ··· to share!</div></div></div>");
new QRCode(jQuery('.sfsi_wechat_follow_overlay .sfsi_wechat_qr_display')[0], encodeURI(decodeURI(window.location.href)))
jQuery('.sfsi_wechat_follow_overlay .sfsi_wechat_qr_display img').attr('nopin', 'nopin')
}else{
jQuery('.sfsi_wechat_follow_overlay').removeClass('hide').addClass('show').show();
}}
function sfsi_mobile_wechat_share(url){
if(jQuery('.sfsi_wechat_follow_overlay').length==0){
jQuery('body').append("<div class='sfsi_wechat_follow_overlay sfsi_overlay show'><div class='sfsi_inner_display'><a class='close_btn' href='' onclick=\"event.preventDefault();close_overlay(\'.sfsi_wechat_follow_overlay\')\" >×</a><div style='width:95%; min-height:80%;background-color:#fff;margin:0 auto;margin:30% auto;padding: 20px 0;'><div style='width:90%;margin: 0 auto;'><input type='text' value='" + encodeURI(decodeURI(window.location.href)) + "' style='width:100%;padding:7px 0;text-align:center' /></div><div style='width:80%;margin:10px auto 0 auto'><div  class='sfsi_upload_butt_container' ><button onclick='sfsi_copy_text_parent_input(event)' class='upload_butt' >Copy</button></div><div class='sfsi_upload_butt_container' ><a href='weixin://' class='upload_butt'>Open WeChat</a></div></div></div></div>");
}else{
jQuery('.sfsi_wechat_scan').removeClass('hide').addClass('show');
}}
function sfsi_copy_text_parent_input(event){
var target=jQuery(event.target);
input_target=target.parent().parent().parent().find('input');
input_target.select();
document.execCommand ('copy');
}
function sfsi_responsive_toggle(){
let lastScrollTop=0;
jQuery(window).on('scroll', function (){
let scrollTop=jQuery(this).scrollTop();
let scrollDirection=scrollTop > lastScrollTop ? 'down':'up';
lastScrollTop=scrollTop;
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
if(scrollDirection==='down'&&jQuery(window).scrollTop() + jQuery(window).height() >=jQuery(document).height() - 100){
showPopup();
}}else{
if(scrollDirection==='down'&&jQuery(window).scrollTop() + jQuery(window).height() >=jQuery(document).height() - 3){
showPopup();
}}
});
function showPopup(){
jQuery('.sfsi_outr_div').css({
'z-index': '9996',
opacity: 1,
top: 'calc((100vh - ' + jQuery('.sfsi_outr_div').outerHeight() + 'px) / 2)',
position: 'fixed',
});
jQuery('.sfsi_outr_div').fadeIn(200);
jQuery('.sfsi_FrntInner_chg').fadeIn(200);
}}
function createCookie(name, value, expires, path, domain){
var cookie=name + "=" + escape(value) + ";";
if(expires){
if(expires instanceof Date){
if(isNaN(expires.getTime()))
expires=new Date();
}
else
expires=new Date(new Date().getTime() + parseInt(expires) * 1000 * 60 * 60 * 24);
cookie +="expires=" + expires.toGMTString() + ";";
}
if(path)
cookie +="path=" + path + ";";
if(domain)
cookie +="domain=" + domain + ";";
document.cookie=cookie;
}
function sfsi_time_pop_up(time_popUp){
jQuery(document).ready(function ($){
try {
if(document.cookie.indexOf('sfsi_popup')!==-1){
return;
}
createCookie('sfsi_popup', new Date.getTime(), 30, '/');
} catch (Exception){
}
setTimeout(function (){
jQuery('.sfsi_outr_div').css({
'z-index': '1000000',
opacity: 1
});
jQuery('.sfsi_outr_div').fadeIn(200);
jQuery('.sfsi_FrntInner_chg').fadeIn(200);
}, time_popUp);
});
}
function sfsi_social_pop_up(time_popUp){
jQuery(document).ready(function ($){
try {
if(document.cookie.indexOf('sfsi_socialPopUp')!==-1){
return;
}
createCookie('sfsi_popup', new Date.getTime(), 30, '/');
} catch (Exception){
}
setTimeout(function (){
jQuery('.sfsi_outr_div').css({
'z-index': '1000000',
opacity: 1
});
jQuery('.sfsi_outr_div').fadeIn();
}, time_popUp);
});
}
function sfsi_plugin_version(pluginVersion){
jQuery(document).ready(function (e){
jQuery("body").addClass("sfsi_" + pluginVersion)
});
}
function sfsi_widget_set(){
jQuery(".sfsi_widget").each(function (index){
if(jQuery(this).attr("data-position")=="widget"){
var wdgt_hght=jQuery(this).children(".norm_row.sfsi_wDiv").height();
var title_hght=jQuery(this).parent(".widget.sfsi").children(".widget-title").height();
var totl_hght=parseInt(title_hght) + parseInt(wdgt_hght);
jQuery(this).parent(".widget.sfsi").css("min-height", totl_hght + "px");
}});
}
SFSI(window).on('load', function (){
SFSI('.sfsi_pinterest_sm_click').on('click touchstart', function (){
sfsi_pinterest_modal_images(e);
});
});
function sfsi_pinterest_modal_images(event, url, title){
event&&event.preventDefault();
var imgSrc=[];
var page_title;
page_title=SFSI('meta[property="og:title"]').attr('content');
if(undefined==page_title){
page_title=SFSI('head title').text();
}
if(undefined==title){
title=page_title;
}
if(undefined==url){
url=window.location.href;
}
SFSI('body img').each(function (index){
var src=SFSI(this).attr('src')||"";
var height=SFSI(this).height();
var width=SFSI(this).width();
var image_title=SFSI(this).attr('title')||"";
var alt=SFSI(this).attr('alt')||"";
var no_pin=SFSI(this).attr('data-pin-nopin')||"";
var no_pin_old=SFSI(this).attr('nopin')||"";
if(src!==""&&!src.startsWith("javascript")&&height > 100&&width > 100&&no_pin_old!=="nopin"&&no_pin!=="true"){
imgSrc.push({
src: src,
title: title&&""!==title ? title:(image_title&&""!==image_title ? image_title:alt)
});
}});
sfsi_pinterest_modal();
if(imgSrc.length==0){
var meta_img=SFSI('meta[property="og:image"]').attr('content');
if(undefined==meta_img){
meta_img="";
}
SFSI('.sfsi_flex_container').append('<div><a href="http://www.pinterest.com/pin/create/button/?url=' + encodeURIComponent(url) + '&media=&description=' + encodeURIComponent(page_title).replace('+', '%20').replace("#", "%23") + '"><div style="width:140px;height:90px;display:inline-block;" ></div><span class="sfsi_pinterest_overlay"><img data-pin-nopin="true" height="30" width="30" src="' + window.sfsi_icon_ajax_object.plugin_url + '/images/pinterest.png" /></span></a></div>')
}else{
SFSI.each(imgSrc, function (index, val){
SFSI('.sfsi_flex_container').append('<div><a href="http://www.pinterest.com/pin/create/button/?url=' + encodeURIComponent(url) + '&media=' + val.src + '&description=' + encodeURIComponent(val.title ? val.title:page_title).replace('+', '%20').replace("#", "%23") + '"><img style="display:inline"  data-pin-nopin="true" src="' + val.src + '"><span class="sfsi_pinterest_overlay" style="width:140px;left:unset;"><img data-pin-nopin="true" height="30" width="30" style="display:inline" src="' + window.sfsi_icon_ajax_object.plugin_url + '/images/pinterest.png" /></span></a></div>');
});
}
event.preventDefault();
}
function sfsi_pinterest_modal(imgs){
jQuery('body').append("<div class='sfsi_wechat_follow_overlay sfsi_overlay show'>" +
"<div class='sfsi_inner_display'>" +
'<a class="close_btn" href="" onclick="event.preventDefault();close_overlay(\'.sfsi_wechat_follow_overlay\')" >×</a>' +
"<div style='width:95%;max-width:500px; min-height:80%;background-color:#fff;margin:0 auto;margin:10% auto;padding: 20px 0;border-radius: 20px;'>" +
"<h4 style='margin-left:10px;'>Pin It on Pinterest</h4>" +
"<div class='sfsi_flex_container'>" +
"</div>" +
"</div>" +
"</div>" +
"</div>"
);
}
var sfsi_functions_loaded=new CustomEvent('sfsi_functions_loaded', {
detail: {
"abc": "def"
}});
window.dispatchEvent(sfsi_functions_loaded);
function showSuccessAlert(){
var alert=document.getElementById("success-alert");
alert.style.display="block";
alert.style.animation="intro-animation 1s";
setTimeout(function(){
alert.style.animation="fade-out 2s";
setTimeout(function(){
alert.style.display="none";
alert.style.animation="none";
}, 2000);
}, 3000);
}
function sfsi_copyLink(str){
try {
const el=document.createElement('textarea');
el.value=str;
el.setAttribute('readonly', '');
el.style.position='absolute';
el.style.left='-9999px';
document.body.appendChild(el);
el.select();
document.execCommand ('copy');
document.body.removeChild(el);
showSuccessAlert();
return true;
} catch (e){
console.log(e);
return false;
}}
document.querySelectorAll('a.sfsi_copylink').forEach(function (anchor){
anchor.addEventListener('click', function (e){
e.preventDefault();
sfsi_copyLink(window.location.href);
});
});
function on_keydown_remove_from_cart(e){" "===e.key&&(e.preventDefault(),e.currentTarget.click())}function focus_populate_live_region(){var e=["woocommerce-message","woocommerce-error","wc-block-components-notice-banner"].map(function(e){return"."+e+'[role="alert"]'}).join(", "),o=document.querySelectorAll(e);if(0!==o.length){var t=o[0];t.setAttribute("tabindex","-1");var n=setTimeout(function(){t.focus(),clearTimeout(n)},500)}}function refresh_sorted_by_live_region(){var e=document.querySelector(".woocommerce-result-count"),o=document.querySelector('[data-wp-interactive="woocommerce/product-filters"]');if(e&&window.location.search&&!o){var t=e.innerHTML;e.setAttribute("role","alert"),e.setAttribute("aria-hidden","true");var n=setTimeout(function(){e.setAttribute("aria-hidden","false"),e.innerHTML="",e.innerHTML=t,clearTimeout(n)},2e3)}}function on_document_ready(){focus_populate_live_region(),refresh_sorted_by_live_region()}jQuery(function(e){e(".woocommerce-ordering").on("change","select.orderby",function(){e(this).closest("form").trigger("submit")}),e("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(e(this).attr("min"));o>=0&&parseFloat(e(this).val())<o&&e(this).val(o)});var o="store_notice"+(e(".woocommerce-store-notice").data("noticeId")||"");if("hidden"===Cookies.get(o))e(".woocommerce-store-notice").hide();else{function t(o){["Enter"," "].includes(o.key)&&(o.preventDefault(),e(".woocommerce-store-notice__dismiss-link").click())}e(".woocommerce-store-notice").show(),e(".woocommerce-store-notice__dismiss-link").on("click",function n(r){Cookies.set(o,"hidden",{path:"/"}),e(".woocommerce-store-notice").hide(),r.preventDefault(),e(".woocommerce-store-notice__dismiss-link").off("click",n).off("keydown",t)}).on("keydown",t)}e(".woocommerce-input-wrapper span.description").length&&e(document.body).on("click",function(){e(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),e(".woocommerce-input-wrapper").on("click",function(e){e.stopPropagation()}),e(".woocommerce-input-wrapper :input").on("keydown",function(o){var t=e(this).parent().find("span.description");if(27===o.which&&t.length&&t.is(":visible"))return t.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=e(this).parent(),t=o.find("span.description");o.addClass("currentTarget"),e(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),t.length&&t.is(":hidden")&&t.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),e.scroll_to_notices=function(o){o.length&&e("html, body").animate({scrollTop:o.offset().top-100},1e3)},e('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),e(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),e(".password-input").each(function(){const o=e(this).find("input").attr("id");e(this).append('<button type="button" class="show-password-input" aria-label="'+woocommerce_params.i18n_password_show+'" aria-describedBy="'+o+'"></button>')}),e(".show-password-input").on("click",function(o){o.preventDefault(),e(this).hasClass("display-password")?(e(this).removeClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_show)):(e(this).addClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_hide)),e(this).hasClass("display-password")?e(this).siblings(['input[type="password"]']).prop("type","text"):e(this).siblings('input[type="text"]').prop("type","password"),e(this).siblings("input").focus()}),e("a.coming-soon-footer-banner-dismiss").on("click",function(o){var t=e(o.target);e.ajax({type:"post",url:t.data("rest-url"),data:{woocommerce_meta:{coming_soon_banner_dismissed:"yes"}},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",t.data("rest-nonce"))},complete:function(){e("#coming-soon-footer-banner").hide()}})}),"undefined"==typeof wc_add_to_cart_params&&e(document.body).on("keydown",".remove_from_cart_button",on_keydown_remove_from_cart),e(document.body).on("item_removed_from_classic_cart updated_wc_div",focus_populate_live_region)}),document.addEventListener("DOMContentLoaded",on_document_ready);
function poll_vote(l){jQuery(document).ready(function(o){poll_answer_id="",poll_multiple_ans=0,poll_multiple_ans_count=0,o("#poll_multiple_ans_"+l).length&&(poll_multiple_ans=parseInt(o("#poll_multiple_ans_"+l).val())),o("#polls_form_"+l+" input:checkbox, #polls_form_"+l+" input:radio, #polls_form_"+l+" option").each(function(l){(o(this).is(":checked")||o(this).is(":selected"))&&(poll_multiple_ans>0?(poll_answer_id=o(this).val()+","+poll_answer_id,poll_multiple_ans_count++):poll_answer_id=parseInt(o(this).val()))}),poll_multiple_ans>0?poll_multiple_ans_count>0&&poll_multiple_ans_count<=poll_multiple_ans?(poll_answer_id=poll_answer_id.substring(0,poll_answer_id.length-1),poll_process(l,poll_answer_id)):0==poll_multiple_ans_count?alert(pollsL10n.text_valid):alert(pollsL10n.text_multiple+" "+poll_multiple_ans):poll_answer_id>0?poll_process(l,poll_answer_id):alert(pollsL10n.text_valid)})}function poll_process(l,o){jQuery(document).ready(function(s){poll_nonce=s("#poll_"+l+"_nonce").val(),pollsL10n.show_fading?(s("#polls-"+l).fadeTo("def",0),pollsL10n.show_loading&&s("#polls-"+l+"-loading").show(),s.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=process&poll_id="+l+"&poll_"+l+"="+o+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)})):(pollsL10n.show_loading&&s("#polls-"+l+"-loading").show(),s.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=process&poll_id="+l+"&poll_"+l+"="+o+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)}))})}function poll_result(l){jQuery(document).ready(function(o){poll_nonce=o("#poll_"+l+"_nonce").val(),pollsL10n.show_fading?(o("#polls-"+l).fadeTo("def",0),pollsL10n.show_loading&&o("#polls-"+l+"-loading").show(),o.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=result&poll_id="+l+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)})):(pollsL10n.show_loading&&o("#polls-"+l+"-loading").show(),o.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=result&poll_id="+l+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)}))})}function poll_booth(l){jQuery(document).ready(function(o){poll_nonce=o("#poll_"+l+"_nonce").val(),pollsL10n.show_fading?(o("#polls-"+l).fadeTo("def",0),pollsL10n.show_loading&&o("#polls-"+l+"-loading").show(),o.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=booth&poll_id="+l+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)})):(pollsL10n.show_loading&&o("#polls-"+l+"-loading").show(),o.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=booth&poll_id="+l+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)}))})}function poll_process_success(l){return function(o){jQuery(document).ready(function(s){s("#polls-"+l).replaceWith(o),pollsL10n.show_loading&&s("#polls-"+l+"-loading").hide(),pollsL10n.show_fading&&s("#polls-"+l).fadeTo("def",1)})}}pollsL10n.show_loading=parseInt(pollsL10n.show_loading),pollsL10n.show_fading=parseInt(pollsL10n.show_fading);
(()=>{var e={799(){window.WPConsent={displayChecks:[],checksPassed:!0,settingsHooks:[],settingsProcessed:!1,listeners:[],lastPreferences:null,cssPromise:null,registerListener:function(e){if(this.listeners.push(e),this.lastPreferences)try{e(this.lastPreferences)}catch(e){console.error("Error in WPConsent listener:",e)}},registerDisplayCheck:function(e){this.displayChecks.push(e),this.checksPassed=!1},registerSettingsHook:function(e){this.settingsHooks.push(e),this.settingsProcessed=!1},runDisplayChecks:function(){return 0===this.displayChecks.length?(this.checksPassed=!0,Promise.resolve()):Promise.all(this.displayChecks.map(e=>e())).then(()=>(this.checksPassed=!0,Promise.resolve())).catch(e=>(console.error("Error in WPConsent display check:",e),this.checksPassed=!0,Promise.resolve()))},runSettingsHooks:function(){return 0===this.settingsHooks.length?(this.settingsProcessed=!0,Promise.resolve()):Promise.all(this.settingsHooks.map(e=>e(window.wpconsent))).then(()=>(this.settingsProcessed=!0,Promise.resolve())).catch(e=>(console.error("Error in WPConsent settings hook:",e),this.settingsProcessed=!0,Promise.resolve()))},hooks:{beforeShowPreferences:[],afterShowPreferences:[],beforeHideBanner:[],afterHideBanner:[],beforeShowBanner:[],afterShowBanner:[],accordionToggled:[]},addHook:function(e,t){this.hooks[e]&&this.hooks[e].push(t)},runHooks:function(e,...t){this.hooks[e]&&this.hooks[e].length>0&&this.hooks[e].forEach(n=>{try{n(...t)}catch(t){console.error(`Error in WPConsent hook ${e}:`,t)}})},showToast:function(e,t=2500){this.ensureCSS().then(()=>{const n=this.shadowRoot.querySelector("#wpconsent-gpc-toast");if(!n)return;const o=n.querySelector(".wpconsent-toast-message");o&&e&&(o.textContent=e),n.style.display="block",setTimeout(()=>{n.classList.add("wpconsent-toast-visible")},10);const s=()=>{n.classList.remove("wpconsent-toast-visible"),setTimeout(()=>{n.style.display="none"},300)},c=setTimeout(s,t),r=n.querySelector(".wpconsent-toast-close");r&&(r.onclick=()=>{clearTimeout(c),s()})})},highlightGPCOverride:function(){const e=this.shadowRoot.querySelector("#wpconsent-gpc-override-toggle-label"),t=this.shadowRoot.querySelector("#wpconsent-gpc-override-checkbox"),n=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");e&&(e.classList.add("wpconsent-gpc-override-error"),e.classList.add("wpconsent-shake"),setTimeout(()=>{e.classList.remove("wpconsent-shake")},300),t&&t.focus(),n&&setTimeout(()=>{n.scrollIntoView({behavior:"smooth",block:"center"})},100),t&&t.addEventListener("change",function(){t.checked&&e.classList.remove("wpconsent-gpc-override-error")},{once:!0}))},acceptAll:function(){const e={};Array.isArray(wpconsent.slugs)&&wpconsent.slugs.forEach(t=>{e[t]=!0}),this.savePreferences(e),this.closePreferences()},checkGPC:function(){if(!wpconsent.respect_gpc||!0!==navigator.globalPrivacyControl)return;const e=this.getCookie("wpconsent_preferences");let t={};if(e)try{t=JSON.parse(e)}catch(e){console.error("WPConsent: Error parsing existing preferences:",e)}if(t.hasOwnProperty("respect_gpc"))return;const n={};if(wpconsent.slugs.forEach(e=>{const t=this.shadowRoot?.querySelector(`#wpconsent-preferences-modal input[type="checkbox"][id="cookie-service-${e}"]`);t&&t.disabled?n[e]=!0:n[e]=!1}),n.essential=!0,n.respect_gpc=!0,this.savePreferences(n,!0),!1!==wpconsent.gpc_toast_enabled){const e=wpconsent.gpc_toast_message||"GPC Signal Honored",t=wpconsent.gpc_toast_duration||1e4;this.showToast(e,t)}this.checksPassed=!1},savePreferences:function(e,t=!1){const n=this.getCookie("wpconsent_preferences");let o=!1,s=null;if(n)try{s=JSON.parse(n)}catch(e){console.error("WPConsent: Error parsing existing preferences:",e)}if(wpconsent.respect_gpc&&!t&&s){const t=!0===navigator.globalPrivacyControl,n=!0===s.respect_gpc;if(t&&n){const t=this.shadowRoot.querySelector("#wpconsent-gpc-override-checkbox");if(t&&!t.checked)return void this.highlightGPCOverride();e.respect_gpc=!1}}t||(s&&JSON.stringify(s)!==JSON.stringify(e)||wpconsent.default_allow&&Object.values(e).some(e=>!1===e))&&(this.clearCookies(),o=!0),wpconsent.respect_gpc&&!t&&s&&s.hasOwnProperty("respect_gpc")&&(e.respect_gpc=!1),this.setCookie("wpconsent_preferences",JSON.stringify(e),wpconsent.consent_duration),this.hideBanner(),this.closePreferences(),this.unlockScripts(e),this.unlockIframes(e),this.showFloatingButtonIfEnabled(),this.updateWordPressConsent(e),window.dispatchEvent(new CustomEvent("wpconsent_consent_saved",{detail:e})),n&&window.dispatchEvent(new CustomEvent("wpconsent_consent_updated",{detail:e})),o&&(Object.defineProperty(document,"cookie",{get:function(){return""},set:function(e){}}),window.location.reload())},showPreferences:function(){return this.ensureCSS().then(()=>{const e=this.shadowRoot?.querySelector("#wpconsent-preferences-modal");if(e){e.style.display="flex",this.setupFocusTrap(e),this.runHooks("afterShowPreferences");const t=this.shadowRoot?.querySelector("#wpconsent-preferences-title");t&&setTimeout(()=>{t.focus({preventScroll:!0}),this.lastFocusedElement=t},100);const n=this.getCookie("wpconsent_preferences");if(n)try{const e=JSON.parse(n);this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"]').forEach(t=>{let n=null;n=t.id.startsWith("cookie-category-")?t.id.replace("cookie-category-",""):t.id.startsWith("cookie-service-")?t.id.replace("cookie-service-",""):t.value,n&&n in e&&(t.checked=e[n])});const t=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");if(t){const n=!0===navigator.globalPrivacyControl,o=e&&!0===e.respect_gpc;t.style.display=n&&o?"block":"none"}}catch(e){console.error("Error parsing WPConsent preferences:",e)}}})},closePreferences:function(){const e=this.shadowRoot?.querySelector("#wpconsent-preferences-modal");e&&(e.style.display="none",this.removeFocusTrap(),this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus({preventScroll:!0}),this.previouslyFocusedElement=null))},showBanner:function(){if(!wpconsent.enable_consent_banner)return;const e=this.shadowRoot?.querySelector("#wpconsent-banner-holder");e&&this.ensureCSS().then(()=>{this.runHooks("beforeShowBanner"),e.classList.add("wpconsent-banner-visible"),this.updateButtonVisibility(wpconsent),this.setupFocusTrap(e),this.runHooks("afterShowBanner")})},hideBanner:function(){const e=this.shadowRoot?.querySelector("#wpconsent-banner-holder");e&&(this.runHooks("beforeHideBanner"),e.classList.remove("wpconsent-banner-visible"),this.removeFocusTrap(),this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus({preventScroll:!0}),this.previouslyFocusedElement=null),this.runHooks("afterHideBanner"))},setCookie:function(e,t,n){let o="";if(n>0){const e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),o="expires="+e.toUTCString()+";"}const s=this.getCookieDomain();document.cookie=e+"="+t+";"+o+s+"path=/"},getCookieDomain:function(){return wpconsent.enable_shared_consent&&wpconsent.cookie_domain&&""!==wpconsent.cookie_domain?"domain="+(wpconsent.cookie_domain.startsWith(".")?wpconsent.cookie_domain:"."+wpconsent.cookie_domain)+";":""},getCookie:function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()},hasConsent:function(e){const t=this.getCookie("wpconsent_preferences");if(!t)return!1;try{const n=JSON.parse(t);return"essential"===e||!0===n[e]}catch(e){return console.error("Error parsing WPConsent preferences:",e),!1}},shouldUnlockContent:function(e,t,n){return"essential"===n||(wpconsent.manual_toggle_services?!(!t||void 0===e[t])&&e[t]:!0===e[n])},unlockScripts:function(e){this.lastPreferences=e,this.listeners&&this.listeners.length>0&&this.listeners.forEach(t=>{try{t(e)}catch(e){console.error("Error in WPConsent listener:",e)}}),document.querySelectorAll('script[type="text/plain"]').forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=document.createElement("script");t.getAttributeNames().forEach(n=>{"type"!==n&&e.setAttribute(n,t.getAttribute(n))});const n=t.getAttribute("data-wpconsent-src");n?e.src=n:e.text=t.text,t.parentNode.replaceChild(e,t)}}),document.dispatchEvent(new CustomEvent("wpconsent_consent_processed",{detail:e})),WPConsent.localGtag("set","developer_id.dMmRkYz",!0),WPConsent.localGtag("consent","update",{ad_storage:e.marketing?"granted":"denied",analytics_storage:e.statistics?"granted":"denied",ad_user_data:e.marketing?"granted":"denied",ad_personalization:e.marketing?"granted":"denied",personalization_storage:e.marketing?"granted":"denied"}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"wpconsent_consent_processed",wpconsentPreferences:e})},unlockIframes:function(e){document.querySelectorAll("iframe[data-wpconsent-src]").forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=t.getAttribute("data-wpconsent-src");e&&(t.src=e),t.removeAttribute("data-wpconsent-src"),t.removeAttribute("data-wpconsent-name"),t.removeAttribute("data-wpconsent-category")}}),document.querySelectorAll(".wpconsent-iframe-placeholder").forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=t.querySelector(".wpconsent-iframe-thumbnail"),n=t.querySelector(".wpconsent-iframe-overlay-content");e&&e.remove(),n&&n.remove(),t.classList.remove("wpconsent-iframe-placeholder")}})},init:function(){this.runSettingsHooks().then(()=>{this.initWordPress(),this.updateButtonVisibility(wpconsent);const e=document.getElementById("wpconsent-container"),t=document.getElementById("wpconsent-template");if(e&&t)if(this.shadowRoot=e.shadowRoot,this.shadowRoot)this.runDisplayChecks().then(()=>{this.processBannerDisplay()});else{this.shadowRoot=e.attachShadow({mode:"open"});const n=t.content.cloneNode(!0);this.shadowRoot.appendChild(n),t.remove(),this.initializeEventListeners(),this.initializeAccordions(),this.initializeKeyboardHandlers(),this.runDisplayChecks().then(()=>{this.processBannerDisplay()})}})},processBannerDisplay:function(){this.checkGPC();const e=this.getCookie("wpconsent_preferences");if(e){let t={};try{if(t=JSON.parse(e),wpconsent.slugs&&Array.isArray(wpconsent.slugs)&&!wpconsent.slugs.every(e=>t.hasOwnProperty(e)))return this.setCookie("wpconsent_preferences","",-1),void(this.checksPassed&&this.showBanner());this.unlockScripts(t),this.unlockIframes(t)}catch(e){console.error("Error parsing WPConsent preferences:",e)}this.showFloatingButtonIfEnabled()}else if(this.checksPassed&&this.showBanner(),wpconsent.default_allow||!wpconsent.enable_script_blocking){const e={};wpconsent.slugs.forEach(t=>{e[t]=!0}),this.unlockScripts(e),this.unlockIframes(e)}else if(!wpconsent.enable_content_blocking){const e={};wpconsent.slugs.forEach(t=>{e[t]=!0}),this.unlockIframes(e)}document.querySelectorAll(".wpconsent-iframe-overlay-content.wpconsent-content-hidden").forEach(function(e){e.classList.remove("wpconsent-content-hidden")}),window.dispatchEvent(new CustomEvent("wpconsent_banner_initialized"))},ensureCSS:function(){if(this.cssPromise)return this.cssPromise;const e=document.getElementById("wpconsent-container");return this.cssPromise=this.loadExternalCSS(e),this.cssPromise},revealContainer:function(e){e&&(e.style.display="block")},loadExternalCSS:function(e){return new Promise(t=>{if(this.shadowRoot&&this.shadowRoot.querySelector("link[data-wpconsent-css]"))return this.revealContainer(e),void t();if(!this.shadowRoot)return void t();const n=`${wpconsent.css_url}?ver=${wpconsent.css_version}`;let o=!1;const s=()=>{o||(o=!0,t())},c=t=>{let o=null;const r=document.createElement("link");r.rel="stylesheet",r.href=1===t?n:`${n}&wpcretry=${t}`,r.setAttribute("data-wpconsent-css","");const i=()=>{o&&(clearTimeout(o),o=null),r.onload=null,r.onerror=null},a=o=>{i(),r.parentNode&&r.parentNode.removeChild(r),t<2&&!o?c(t+1):(this.applyCSSFallback(e,n),s())};r.onload=()=>{i(),this.revealContainer(e),s()},r.onerror=()=>a(!1),o=setTimeout(()=>a(!0),5e3);try{this.shadowRoot.appendChild(r)}catch(e){console.error("WPConsent: failed to inject stylesheet link:",e),a()}};c(1)})},applyCSSFallback:function(e,t){if(this.shadowRoot&&!this.shadowRoot.querySelector("style[data-wpconsent-css-fallback]")){const e=document.createElement("style");e.setAttribute("data-wpconsent-css-fallback",""),e.textContent="\n#wpconsent-banner-holder {\n\tdisplay: none;\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tz-index: var(--wpconsent-z-index, 900000);\n}\n#wpconsent-banner-holder.wpconsent-banner-visible {\n\tdisplay: block;\n}\n#wpconsent-banner-holder .wpconsent-banner {\n\tbox-sizing: border-box;\n\tmargin: 10px;\n\tpadding: var(--wpconsent-padding, 15px 20px);\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 10px;\n\tbox-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);\n\tfont-size: var(--wpconsent-font-size, 14px);\n\tline-height: 1.4;\n}\n#wpconsent-banner-holder .wpconsent-banner-footer {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tmargin-top: 12px;\n}\n#wpconsent-banner-holder button,\n#wpconsent-preferences-modal button {\n\tcursor: pointer;\n\tpadding: 8px 16px;\n\tborder: 1px solid rgba(0, 0, 0, 0.2);\n\tborder-radius: 4px;\n\tfont-size: inherit;\n}\n#wpconsent-banner-holder .wpconsent-accept-all,\n#wpconsent-preferences-modal .wpconsent-accept-all {\n\tbackground: var(--wpconsent-accept-bg, #2563eb);\n\tcolor: var(--wpconsent-accept-color, #ffffff);\n\tborder-color: transparent;\n}\n#wpconsent-banner-holder .wpconsent-cancel-cookies,\n#wpconsent-preferences-modal .wpconsent-cancel-cookies {\n\tbackground: var(--wpconsent-cancel-bg, #f3f4f6);\n\tcolor: var(--wpconsent-cancel-color, #1a1a1a);\n}\n#wpconsent-preferences-modal {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: rgba(0, 0, 0, 0.5);\n\tz-index: 10202020;\n\talign-items: center;\n\tjustify-content: center;\n}\n#wpconsent-preferences-modal .wpconsent-preferences-content {\n\tbox-sizing: border-box;\n\twidth: 800px;\n\tmax-width: 90%;\n\tmax-height: 90vh;\n\tmargin: auto;\n\tpadding: 20px;\n\toverflow: auto;\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 10px;\n\tbox-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);\n}\n#wpconsent-consent-floating {\n\tdisplay: none;\n\tposition: fixed;\n\tbottom: 20px;\n\tleft: 20px;\n\tz-index: 9999;\n\tcursor: pointer;\n}\n#wpconsent-gpc-toast {\n\tposition: fixed;\n\tbottom: 20px;\n\tright: 20px;\n\tmax-width: 280px;\n\tpadding: 10px 14px;\n\tz-index: calc(var(--wpconsent-z-index, 900000) + 1);\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 8px;\n\tbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n}\n",this.shadowRoot.appendChild(e)}this.revealContainer(e),console.error(`WPConsent: failed to load styles from ${t}; showing the consent UI with fallback styling.`),window.dispatchEvent(new CustomEvent("wpconsent_css_failed",{detail:{url:t}}))},initializeEventListeners:function(){this.shadowRoot.querySelectorAll(".wpconsent-accept-all").forEach(e=>e.addEventListener("click",()=>this.acceptAll())),this.shadowRoot.querySelectorAll(".wpconsent-cancel-cookies").forEach(e=>e.addEventListener("click",()=>{const e={};wpconsent.slugs.forEach(t=>{const n=this.shadowRoot.querySelector(`#wpconsent-preferences-modal input[type="checkbox"][id="cookie-service-${t}"]`);n&&n.disabled?e[t]=!0:e[t]=!1}),e.essential=!0,this.savePreferences(e)})),this.shadowRoot.querySelector("#wpconsent-banner-close")?.addEventListener("click",()=>this.hideBanner()),this.shadowRoot.querySelector("#wpconsent-preferences-all")?.addEventListener("click",()=>this.showPreferences());const e=this.shadowRoot.querySelector("#wpconsent-consent-floating");e&&e.addEventListener("click",()=>this.showPreferences()),this.initializeCheckboxListeners(),document.addEventListener("click",e=>{const t=e.target.closest(".wpconsent-iframe-accept-button");if(t){const e=t.getAttribute("data-category"),n=t.closest(".wpconsent-iframe-placeholder"),o=n?.getAttribute("data-wpconsent-name");if(e){let t={};try{t=JSON.parse(this.getCookie("wpconsent_preferences")||"{}")}catch(e){console.error("Failed to parse wpconsent_preferences cookie:",e)}const n=!0===navigator.globalPrivacyControl,s=!0===t.respect_gpc;if(wpconsent.respect_gpc&&n&&s)this.showPreferences().then(()=>{const t=this.shadowRoot.querySelector(`#cookie-category-${e}`);if(t&&(t.checked=!0),o){const e=this.shadowRoot.querySelector(`#cookie-service-${o}`);e&&(e.checked=!0)}const n=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");n&&(n.style.display="block"),this.highlightGPCOverride()});else{const n={...t,essential:!0,[e]:!0};o&&(n[o]=!0),this.savePreferences(n)}}}}),document.addEventListener("click",e=>{e.target.closest(".wpconsent-open-preferences")&&(e.preventDefault(),this.showPreferences())}),this.shadowRoot.querySelector(".wpconsent-preferences-header-close")?.addEventListener("click",()=>this.closePreferences()),this.shadowRoot.querySelector(".wpconsent-save-preferences")?.addEventListener("click",()=>{const e=this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"]'),t=Array.from(e).filter(e=>e.checked).map(e=>e.value),n={};wpconsent.slugs.forEach(e=>{n[e]=t.includes(e)}),n.essential=!0,this.savePreferences(n)}),this.shadowRoot.querySelector(".wpconsent-close-preferences")?.addEventListener("click",()=>this.closePreferences()),window.addEventListener("wpconsent_consent_saved",function(e){if("function"!=typeof window.clarity)return;const t=e.detail;window.clarity("consentv2",{ad_Storage:t.marketing?"granted":"denied",analytics_Storage:t.statistics?"granted":"denied"})})},localGtag:function(){window.dataLayer=window.dataLayer||[],function(){dataLayer.push(arguments)}.apply(window,arguments)},initializeCheckboxListeners:function(){this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-category-"]').forEach(e=>{e.addEventListener("change",e=>{this.handleCategoryCheckboxChange(e.target)})}),this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-service-"]').forEach(e=>{e.addEventListener("change",e=>{this.handleServiceCheckboxChange(e.target)})})},handleCategoryCheckboxChange:function(e){const t=e.id.replace("cookie-category-","");this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-service-"]').forEach(n=>{n.closest(`.wpconsent-cookie-category-${t}`)&&(n.checked=e.checked)})},handleServiceCheckboxChange:function(e){const t=e.closest(".wpconsent-cookie-category");if(!t)return;const n=t.querySelector('input[type="checkbox"][id^="cookie-category-"]');if(!n)return;const o=t.querySelectorAll('input[type="checkbox"][id^="cookie-service-"]');let s=!1;o.forEach(e=>{e.checked&&(s=!0)}),n.checked=s},initializeAccordions(){this.shadowRoot.querySelectorAll(".wpconsent-preferences-accordion-item").forEach(e=>{const t=e.querySelector(".wpconsent-preferences-accordion-header"),n=e.querySelector(".wpconsent-preferences-accordion-content");t&&n&&t.addEventListener("click",t=>{t.target.closest(".wpconsent-preferences-checkbox-toggle")||this.toggleAccordion(e,n)})})},toggleAccordion(e,t){e.classList.contains("active");const n=e.parentElement,o=e.classList.contains("wpconsent-cookie-service"),s=e.classList.contains("wpconsent-cookie-category");s?n&&n.querySelectorAll(":scope > .wpconsent-preferences-accordion-item.wpconsent-cookie-category").forEach(t=>{if(t!==e){t.classList.remove("active");const e=t.querySelector(".wpconsent-preferences-accordion-toggle");e&&e.setAttribute("aria-expanded","false"),t.querySelectorAll(".wpconsent-cookie-service").forEach(e=>{e.classList.remove("active");const t=e.querySelector(".wpconsent-preferences-accordion-toggle");t&&t.setAttribute("aria-expanded","false"),this.runHooks("accordionToggled",{accordion:e,content:e.querySelector(".wpconsent-preferences-accordion-content"),isActive:!1,isService:!0,isCategory:!1})})}}):o&&n&&n.querySelectorAll(":scope > .wpconsent-preferences-accordion-item.wpconsent-cookie-service").forEach(t=>{if(t!==e){t.classList.remove("active");const e=t.querySelector(".wpconsent-preferences-accordion-toggle");e&&e.setAttribute("aria-expanded","false"),this.runHooks("accordionToggled",{accordion:t,content:t.querySelector(".wpconsent-preferences-accordion-content"),isActive:!1,isService:!0,isCategory:!1})}}),e.classList.toggle("active");const c=e.querySelector(".wpconsent-preferences-accordion-toggle");if(c){const t=e.classList.contains("active");c.setAttribute("aria-expanded",t?"true":"false")}const r=e.classList.contains("active");this.runHooks("accordionToggled",{accordion:e,content:t,isActive:r,isService:o,isCategory:s})},initializeKeyboardHandlers:function(){document.addEventListener("keydown",e=>{"Tab"===e.key?this.handleTabKey(e):"Escape"===e.key&&this.handleEscapeKey(e)})},handleEscapeKey:function(e){const t=this.shadowRoot?.querySelector("#wpconsent-preferences-modal"),n=this.shadowRoot?.querySelector("#wpconsent-banner-holder");t&&"flex"===t.style.display?this.closePreferences():n&&n.classList.contains("wpconsent-banner-visible")&&this.hideBanner()},handleTabKey:function(e){const t=this.shadowRoot?.querySelector("#wpconsent-banner-holder"),n=this.shadowRoot?.querySelector("#wpconsent-preferences-modal"),o=t&&t.classList.contains("wpconsent-banner-visible"),s=n&&"flex"===n.style.display;if(!o&&!s)return;const c=s?n:t,r=this.getFocusableElements(c);if(0===r.length)return;e.preventDefault();const i=r[0],a=r[r.length-1];let l;this.lastFocusedElement&&r.includes(this.lastFocusedElement)?l=this.lastFocusedElement:(l=i,this.lastFocusedElement=l);const d=r.indexOf(l);let p;p=e.shiftKey?d<=0?a:r[d-1]:d>=r.length-1?i:r[d+1],p.focus({preventScroll:!0}),this.lastFocusedElement=p},setupFocusTrap:function(e){this.previouslyFocusedElement=document.activeElement,this.lastFocusedElement=null},removeFocusTrap:function(){this.lastFocusedElement=null},setInitialFocus:function(e){const t=this.getFocusableElements(e);t.length>0&&setTimeout(()=>{t[0].focus({preventScroll:!0}),this.lastFocusedElement=t[0]},100)},getFocusableElements:function(e){return Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(t=>{let n=t;for(;n&&n!==e;){const e=window.getComputedStyle(n);if("none"===e.display||"hidden"===e.visibility||"0"===e.opacity||n.disabled||"true"===n.getAttribute("aria-hidden"))return!1;n=n.parentElement}return!0})},isElementInContainer:function(e,t){return!(!e||!t)&&(t.shadowRoot?t.shadowRoot.contains(e):t.contains(e))},clearCookies:function(){for(var e=document.cookie.split("; "),t=0;t<e.length;t++)for(var n=window.location.hostname.split(".");n.length>0;){var o=encodeURIComponent(e[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+n.join(".")+" ;path=",s=location.pathname.split("/");for(document.cookie=o+"/";s.length>0;)document.cookie=o+s.join("/"),s.pop();n.shift()}},initWordPress:function(){window.wp_consent_type=wpconsent.consent_type;let e=new CustomEvent("wp_consent_type_defined");document.dispatchEvent(e)},showFloatingButtonIfEnabled:function(){wpconsent.enable_consent_floating&&this.ensureCSS().then(()=>{const e=this.shadowRoot?.querySelector("#wpconsent-consent-floating");e&&(e.style.display="block")})},updateButtonVisibility:function(e){this.shadowRoot&&["accept","cancel","preferences"].forEach(t=>{const n=this.shadowRoot.querySelector(`#wpconsent-${t}-all`);n&&(e[`${t}_button_enabled`]?(n.classList.remove("wpconsent-button-disabled"),n.removeAttribute("data-disabled")):(n.classList.add("wpconsent-button-disabled"),n.setAttribute("data-disabled","true")))})},updateWordPressConsent:function(e){"function"==typeof wp_set_consent&&(wp_set_consent("functional","allow"),wp_set_consent("preferences","allow"),wp_set_consent("statistics",e.statistics?"allow":"deny"),wp_set_consent("statistics-anonymous",e.statistics?"allow":"deny"),wp_set_consent("marketing",e.marketing?"allow":"deny"))}},document.addEventListener("DOMContentLoaded",()=>WPConsent.init())}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var c=t[o]={exports:{}};return e[o](c,c.exports,n),c.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";n(799)})()})();
(()=>{"use strict";const n=window.redditAdsTrackingData;let e=function(n){return n.PAGE_VIEW="PageVisit",n.VIEW_CONTENT="ViewContent",n.ADD_TO_CART="AddToCart",n}({});const t=(n,e)=>{if("function"!=typeof rdt)throw new Error("Function rdt not implemented.");window.rdt("track",n,{...e})},o=e=>{var t;return n.pixel_data.products[e.id]&&(e.name=n.pixel_data.products[e.id].name,e.prices=(t=n.pixel_data.products[e.id].price,{price:Math.round(t*10**n.pixel_data.currency_minor_unit),currency_minor_unit:n.pixel_data.currency_minor_unit})),e},r=(o,r=1,i=null)=>{const{id:c,name:a,price:d}=((n,e)=>{const t={id:n.id,name:n.name,quantity:e};return n?.prices?.price&&(t.price=parseInt(n.prices.price,10)/10**n.prices.currency_minor_unit),t})(o,r),u={itemCount:parseInt(r,10),value:d*parseInt(r,10),currency:n.currency,products:[{id:c,name:a}]};i&&(u.conversionId=i),t(e.ADD_TO_CART,u)};function i(e=""){return`${n.prefix}${e}`}function c(e,t={}){"string"==typeof e&&e&&"object"==typeof t&&fetch(`${n.ajax_url}`,{method:"POST",credentials:"same-origin",keepalive:!0,body:new URLSearchParams({action:i(e),payload:JSON.stringify(t),security:n.capi_nonce})})}function a(n,e){document.defaultView.addEventListener("DOMContentLoaded",function(){n.forEach(n=>{document.querySelectorAll(n).forEach(n=>{n.addEventListener("click",e)})})})}function d(){return"function"!=typeof wp_has_consent||wp_has_consent("marketing")}function u(){if("undefined"==typeof performance)return!0;if(performance.getEntriesByType){const n=performance.getEntriesByType("navigation");if(n.length>0){const e=n[0].type;return"navigate"===e||"back_forward"===e}}return 0===performance.navigation?.type}const _=n.is_pixel_enabled,s=n.is_conversion_enabled;d()&&function(){const n=new URL(window.location.href).searchParams.get("rdt_cid");n&&(document.cookie=`rdtCid=${encodeURIComponent(n)}; path=/;`)}(),document.addEventListener("DOMContentLoaded",()=>{d()?(a([".single_add_to_cart_button"],e=>{const t=document.querySelector(`[name=${n.event_id_el_name}]`)?.value;_&&function(n,e=""){const t=n.target.closest("form.cart");if(!t)return;const i=t.querySelector("[name=add-to-cart]");if(!i)return;const c=t.querySelector("[name=variation_id]"),a=t.querySelector("[name=quantity]"),d=o({id:parseInt(c?c.value:i.value,10)});r(d,a?parseInt(a.value,10):1,e)}(e,t)}),a([".add_to_cart_button:not(.product_type_variable):not(.product_type_grouped):not(.wc-block-components-product-button__button)",'[data-block-name="woocommerce/product-button"] > .add_to_cart_button:not(.product_type_variable):not(.product_type_grouped)'],n=>{const t=window.crypto.randomUUID();_&&function(n,e=""){const t=n.currentTarget.dataset,i=o({id:t.product_id});r(i,t.quantity||1,e)}(n,t);const i=n.currentTarget.dataset;s&&i?.product_id&&c(e.ADD_TO_CART,{conversionId:t,productId:i.product_id,quantity:1})}),(()=>{if(u()&&n.VIEW_CONTENT){const o={...n.VIEW_CONTENT,conversionId:window.crypto.randomUUID()};n.is_pixel_enabled&&t(e.VIEW_CONTENT,o),n.is_conversion_enabled&&c(e.VIEW_CONTENT,{conversionId:o.conversionId,products:{id:o.products[0]?.id,name:o.products[0]?.name}})}})(),(()=>{if(u()&&n.PAGE_VIEW){const o={conversionId:window.crypto.randomUUID()};n.is_pixel_enabled&&t(e.PAGE_VIEW,o),n.is_conversion_enabled&&c(e.PAGE_VIEW,o)}})()):console.info("[Reddit] Marketing consent denied. Tracking skipped.")}),document.addEventListener("wp_listen_for_consent_change",n=>{"allow"===n.detail.marketing&&window.location.reload()}),"function"==typeof jQuery&&jQuery(document).on("found_variation","form.cart",function(e,t){(e=>{e?.variation_id&&(n.pixel_data.products[e.variation_id]={price:e.display_price,name:n.VIEW_CONTENT.products.name})})(t)})})();