function xs_social_sharer(t){let e=t.getAttribute("data-pid"),a=t.getAttribute("data-key"),s=t.getAttribute("data-uri_hash"),r=t.getAttribute("data-xs-href");window.open(r,"xs_feed_sharer","width=626,height=436");let i={pid:e,hash:s,social:a};jQuery.ajax({data:i,type:"post",url:window.rest_api_conf.root+"wp_social/v1/shared/url",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",window.rest_api_conf.nonce)},success:function(t){},error:function(t){}})}document.addEventListener("click",(function(t){const e=t.target.closest&&t.target.closest(".xs-share-link");e&&(t.preventDefault(),xs_social_sharer(e))}));
jQuery(document).ready(function(){
jQuery("#mycerd-badges-search").on("keyup", function(){
var value=jQuery(this).val().toLowerCase();
jQuery(".mycred-badges-list .mycred-badges-list-item").filter(function(){
jQuery(this).toggle(jQuery(this).text().toLowerCase().indexOf(value) > -1)
});
});
jQuery(document).on('click', '.mycred-achieved-badge-btn', function(e){
e.preventDefault();
jQuery('.not-earned').hide();
jQuery('.earned').show();
});
jQuery(document).on('click', '.mycred-not-achieved-badge-btn', function(e){
e.preventDefault();
jQuery('.earned').hide();
jQuery('.not-earned').show();
});
jQuery(document).on('click', '.mycred-clear-filter-btn', function(e){
e.preventDefault()
jQuery('.earned').show();
jQuery('.not-earned').show();
jQuery('#mycerd-badges-search').val('');
})
});