'use strict';class GetAttributeData{getAttributeValue(a){return null!==a?a.replace(/[^a-zA-Z\s]/g,"").toLowerCase().trim():""}}class GetData{getQueryValue(a,b){return b.match(new RegExp(`${a}=\\w+`))[0].replace(/[a-zA-Z]+=/,"").toLowerCase()}getfilterAttribute(a){a=a.trim().replace(/[?><.,'":;0-9{}!@#$%^&*()]/g,"");return 0<=a.search("/")?a.split("/")[0]:a}getfilterAttributeBackSlash(a){return 0<=a.search("/")?a.split("/")[1]:""}} class PrepareData{prepareQueryKey(){var a=document.getElementById("querystring").getAttribute("data-value");return null===a?"":a.trim().replace(/[^a-zA-Z=]/g,"").toLowerCase()}preparefilterAttribute(){var a=document.getElementById("filteratrribute").getAttribute("data-value");return null===a?"":a.trim().replace(/[^-_\/a-zA-Z]/g,"").toLowerCase()}} class RenderElement{constructor(a){this.get_attr_data=a}displayOrHideElement(a,b,c){var e=$(a).hasClass("morearticlescta"),d=!1;if(Array.from(a.classList).includes("heading"))return 1;"class"===b?d=$(a).hasClass(c):$(a).find("a").each(function(f,g){if(1==d)return 0;c==$(this).attr(b).replaceAll(" ","").toLowerCase()&&(d=!0)});return""!==b&&!1!==d||!1!==e?e?1:0:(a.style.display="none",a.classList.add("hide"),1)}displayOrHideElementWithBlackSlash(a,b,c,e){var d=$(a).hasClass("morearticlescta");b=null!== b&&null!==a.getAttribute(b)?JSON.parse(this.get_attr_data.getAttributeValue(a.getAttribute(b))):null;return Array.from(a.classList).includes("heading")?1:(null===b||void 0===b[`${c}`]||0>b[`${c}`].search(e))&&!1===d?(a.style.display="none",a.classList.add("hide"),1):d?1:0}}var render_element_obj=new RenderElement(new GetAttributeData),prepare_data=new PrepareData,get_data=new GetData; const updateheading=(a,b)=>{a=$(a).parent().find(".heading").first();a=$(a).children().first();var c=$(a).text();$(a).text(c.replace(" ",' "'+b+'" '))};var tagfilter_components=document.getElementsByClassName("tagfilter"),query_string=window.location.search.toLowerCase().trim().replace(/[^a-zA-Z=]/g,""),querykey=prepare_data.prepareQueryKey(),queryvalue="",filter_attribute=prepare_data.preparefilterAttribute(),prep_filter_Attribute="",filter_attribute_backslash="",siblings=[]; Array.from(tagfilter_components).forEach(a=>{if(""!==filter_attribute.trim()&&""!==querykey.trim()&&0<=query_string.search(new RegExp(querykey+"\x3d"))){var b=0;queryvalue=get_data.getQueryValue(querykey,query_string);prep_filter_Attribute=get_data.getfilterAttribute(filter_attribute);filter_attribute_backslash=get_data.getfilterAttributeBackSlash(filter_attribute);siblings=Array.from(a.parentElement.children);siblings.forEach(c=>{b=""!==filter_attribute_backslash.trim()?b+render_element_obj.displayOrHideElementWithBlackSlash(c, prep_filter_Attribute,filter_attribute_backslash,queryvalue):b+render_element_obj.displayOrHideElement(c,prep_filter_Attribute,queryvalue)});b==siblings.length?siblings.forEach(c=>{c.classList.remove("hide");c.style.display="block"}):updateheading(a,queryvalue)}});