/*------ passwordview.min.js ------*/
(l=>{l.addEventListener("DOMContentLoaded",()=>{[].slice.call(l.querySelectorAll('input[type="password"]')).forEach(e=>{const o=e.parentNode.querySelector(".input-password-toggle");o&&o.addEventListener("click",()=>{const t=o.firstElementChild,c=o.lastElementChild;e.type==="password"?(t.classList.remove("icon-eye"),t.classList.add("icon-eye-slash"),e.type="text",e.focus(),c.innerText=Joomla.Text._("JHIDEPASSWORD")):e.type==="text"&&(t.classList.add("icon-eye"),t.classList.remove("icon-eye-slash"),e.type="password",e.focus(),c.innerText=Joomla.Text._("JSHOWPASSWORD"))});const s=e.parentNode.querySelector(".input-password-modify");s&&s.addEventListener("click",()=>{!s.classList.contains("locked")===!0?(s.classList.add("locked"),e.value="",e.setAttribute("disabled",""),s.innerText=Joomla.Text._("JMODIFY")):(s.classList.remove("locked"),e.removeAttribute("disabled"),e.focus(),s.innerText=Joomla.Text._("JCANCEL"))})})})})(document);

/*------ main.js ------*/
jQuery(window).on('load',function(){if(jQuery('.sp-loader-with-logo').length>0){move();}
jQuery('.sp-pre-loader').fadeOut(500,function(){jQuery(this).remove();});});function move(){var elem=document.getElementById('line-load');var width=1;var id=setInterval(frame,10);function frame(){if(width>=100){clearInterval(id);}else{width++;elem.style.width=width+'%';}}}
jQuery(function($){var settings=Joomla.getOptions('data')||{};var handleStickiness=function(className,offsetTop){if($('body:not(.layout-edit-iframe)').hasClass(className)){var $header=$('#sp-header');var headerHeight=$header.outerHeight();var $stickyHeaderPlaceholder=$('.sticky-header-placeholder');let $stickyOffset='100';if(settings.header!==undefined&&settings.header.stickyOffset!==undefined){$stickyOffset=settings.header.stickyOffset||'100';}
var stickyHeader=function(){var scrollTop=$(window).scrollTop();if(scrollTop>=offsetTop+Number($stickyOffset)){$header.addClass('header-sticky');$stickyHeaderPlaceholder.height(headerHeight);}else{if($header.hasClass('header-sticky')){$header.removeClass('header-sticky');$stickyHeaderPlaceholder.height('inherit');}}};stickyHeader();$(window).scroll(function(){stickyHeader();});if($('body').hasClass('layout-boxed')){var windowWidth=$header.parent().outerWidth();$header.css({'max-width':windowWidth,left:'auto'});}}else{var $header=$('#sp-header');if($header.hasClass('header-sticky')){$header.removeClass('header-sticky');}
$(window).off('scroll');}};function getHeaderOffset(){let $header=$('#sp-header');let stickyHeaderTop=$header.offset().top;let $backHeader=$('body.back-panel').find('#sp-header');let backPanelStickyHeaderTop=null;if($backHeader.length>0){backPanelStickyHeaderTop=$backHeader.offset().top;}
let headerOffset=stickyHeaderTop;if(backPanelStickyHeaderTop!==null){headerOffset=backPanelStickyHeaderTop-settings.topbarHeight;headerOffset=headerOffset<0?stickyHeaderTop:headerOffset;}
return headerOffset;}
const headerExist=$('#sp-header');if(headerExist.length>0){handleStickiness('sticky-header',getHeaderOffset());}
$(window).scroll(function(){if($(this).scrollTop()>100){$('.sp-scroll-up').fadeIn();}else{$('.sp-scroll-up').fadeOut(400);}});$('.sp-scroll-up').click(function(){$('html, body').animate({scrollTop:-60,},600);return false;});$('.sp-megamenu-wrapper').parent().parent().css('position','static').parent().css('position','relative');$('.sp-menu-full').each(function(){$(this).parent().addClass('menu-justify');});$('#offcanvas-toggler').on('click',function(event){event.preventDefault();$('.offcanvas-init').addClass('offcanvas-active');});$('.offcanvas-toggler-secondary').on('click',function(event){event.preventDefault();$('.offcanvas-init').addClass('offcanvas-active');});$('.offcanvas-toggler-full').on('click',function(event){event.preventDefault();$('.offcanvas-init').addClass('offcanvas-active full-offcanvas');});$('.close-offcanvas, .offcanvas-overlay').on('click',function(event){event.preventDefault();$('.offcanvas-init').removeClass('offcanvas-active full-offcanvas');});$(document).on('click','.offcanvas-inner .menu-toggler',function(event){event.preventDefault();$(this).closest('.menu-parent').toggleClass('menu-parent-open').find('>.menu-child').slideToggle(400);});if($('#modal-menu').length>0){let $modalToggler=$('#modal-menu-toggler');let $modalMenu=$('#modal-menu');let $body=$('body');$modalToggler.on('click',function(e){e.preventDefault();$modalMenu.toggleClass('active');$body.toggleClass('modal-menu-active');$(this).toggleClass('active');});$(document).keyup(function(e){if(e.key=='Escape'){$modalMenu.removeClass('active');$modalToggler.removeClass('active');$body.removeClass('modal-menu-active');}});}
const tooltipTriggerList=[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"], .hasTooltip'));tooltipTriggerList.map(function(tooltipTriggerEl){return new bootstrap.Tooltip(tooltipTriggerEl,{html:true});});const popoverTriggerList=[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"], .hasPopover'));popoverTriggerList.map(function(popoverTriggerEl){return new bootstrap.Popover(popoverTriggerEl);});$('.article-ratings .rating-star').on('click',function(event){event.preventDefault();var $parent=$(this).closest('.article-ratings');var request={option:'com_ajax',template:template,action:'rating',rating:$(this).data('number'),article_id:$parent.data('id'),format:'json',};$.ajax({type:'POST',data:request,beforeSend:function(){$parent.find('.fa-spinner').show();},success:function(response){var data=$.parseJSON(response);$parent.find('.ratings-count').text(data.message);$parent.find('.fa-spinner').hide();if(data.status){$parent.find('.rating-symbol').html(data.ratings);}
setTimeout(function(){$parent.find('.ratings-count').text('('+data.rating_count+')');},3000);},});});$('.sp-cookie-allow').on('click',function(event){event.preventDefault();var date=new Date();date.setTime(date.getTime()+30*24*60*60*1000);var expires='; expires='+date.toGMTString();document.cookie='spcookie_status=ok'+expires+'; path=/';$(this).closest('.sp-cookie-consent').fadeOut();});$('.btn-group label:not(.active)').click(function(){var label=$(this);var input=$('#'+label.attr('for'));if(!input.prop('checked')){label.closest('.btn-group').find('label').removeClass('active btn-success btn-danger btn-primary');if(input.val()===''){label.addClass('active btn-primary');}else if(input.val()==0){label.addClass('active btn-danger');}else{label.addClass('active btn-success');}
input.prop('checked',true);input.trigger('change');}
var parent=$(this).parents('#attrib-helix_ultimate_blog_options');if(parent){showCategoryItems(parent,input.val());}});$('.btn-group input[checked=checked]').each(function(){if($(this).val()==''){$('label[for='+$(this).attr('id')+']').addClass('active btn btn-primary');}else if($(this).val()==0){$('label[for='+$(this).attr('id')+']').addClass('active btn btn-danger');}else{$('label[for='+$(this).attr('id')+']').addClass('active btn btn-success');}
var parent=$(this).parents('#attrib-helix_ultimate_blog_options');if(parent){parent.find('*[data-showon]').each(function(){$(this).hide();});}});function showCategoryItems(parent,value){var controlGroup=parent.find('*[data-showon]');controlGroup.each(function(){var data=$(this).attr('data-showon');data=typeof data!=='undefined'?JSON.parse(data):[];if(data.length>0){if(typeof data[0].values!=='undefined'&&data[0].values.includes(value)){$(this).slideDown();}else{$(this).hide();}}});}
$(window).on('scroll',function(){var scrollBar=$('.sp-reading-progress-bar');if(scrollBar.length>0){var s=$(window).scrollTop(),d=$(document).height(),c=$(window).height();var scrollPercent=(s /(d-c))*100;const position=scrollBar.data('position');if(position==='top'){}
scrollBar.css({width:`${scrollPercent}%`});}});var observer=new MutationObserver(function(mutations){$('#system-message-container .alert .close').attr('data-bs-dismiss','alert');});var target=document.querySelector('#system-message-container');observer.observe(target,{attributes:true});});

