jQuery(document).ready(function(c){function x(){jQuery("#sales-slider").slider().on("slideStop",function(a){d.addNumericRefinement("sales",">=",a.value[0]).search();d.addNumericRefinement("sales","<=",a.value[1]).search()});jQuery("#downloaded-slider").slider().on("slideStop",function(a){d.addNumericRefinement("downloaded",">=",a.value[0]).search();d.addNumericRefinement("downloaded","<=",a.value[1]).search()});jQuery("#price-slider").slider().on("slideStop",function(a){d.addNumericRefinement("price", ">=",a.value[0]).search();d.addNumericRefinement("price","<=",a.value[1]).search()});jQuery("#num_ratings-slider").slider().on("slideStop",function(a){d.addNumericRefinement("num_ratings",">=",a.value[0]).search();d.addNumericRefinement("num_ratings","<=",a.value[1]).search()});jQuery("#rating-slider").slider().on("slideStop",function(a){d.addNumericRefinement("rating",">=",a.value[0]).search();d.addNumericRefinement("rating","<=",a.value[1]).search()});jQuery('input[type="checkbox"]').checkbox()} function n(a){return 1E9<=a?(a/1E9).toFixed(0)+"G":1E6<=a?(a/1E6).toFixed(0)+"M":1E3<=a?(a/1E3).toFixed(0)+"K":a}var u=function(){var a={};a.width=Math.round(.8*c(window).width());a.height=Math.round(.8*c(window).height());return a}(),q="awpt,"+document.location.hostname,p=[{name:"downloaded",title:"Downloads",disjunctive:!0,type:"slider",color_class:!0},{name:"num_ratings",title:"Votes",disjunctive:!0,type:"slider",color_class:!0},{name:"rating",title:"Rating",disjunctive:!0,type:"slider",color_class:!0}, {name:"last_update_range",title:"Last update",disjunctive:!0,sortFunction:r,topListIfRefined:!0,color_class:!0},{name:"tags_filter._tags",title:"Tags",disjunctive:!0,sortFunction:t,topListIfRefined:!0,color_class:!0},{name:"source_site",title:"security",disjunctive:!0,type:"facet",sortFunction:t,topListIfRefined:!0,color_class:!1}],m=c("#q"),y=c("#hits"),z=c("#stats"),v=c("#facets"),w=c("#pagination"),A=Hogan.compile(c("#hit-template").text()),B=Hogan.compile(c("#stats-template").text()),C=Hogan.compile(c("#facet-template").text()), D=Hogan.compile(c("#slider-template").text()),E=Hogan.compile(c("#pagination-template").text()),r=algoliasearch("A2MUMFS8E7","0d46864b6df02baf8ab1f1fd0ecd9349"),q={hitsPerPage:10,maxValuesPerFacet:20,facets:c.map(p,function(a){return a.disjunctive?null:a.name}),disjunctiveFacets:c.map(p,function(a){return a.disjunctive?a.name:null}),analyticsTags:q,ignorePlurals:!0},d=algoliasearchHelper(r,"wp_themes",q);m.on("keyup change",function(){var a=m.val();a.trim()?(c("#input-loop").removeClass("glyphicon-search"), c("#input-loop").addClass("glyphicon-remove")):(c("#input-loop").addClass("glyphicon-search"),c("#input-loop").removeClass("glyphicon-remove"));d.setQuery(a).search()}).focus();d.on("change",function(a){var c;c="#q="+encodeURIComponent(a.query);c+="&page="+(a.page+1);for(var b in a.facetsRefinements)c+="&"+encodeURIComponent(b)+"="+encodeURIComponent(a.facetsRefinements[b]);for(var d in a.disjunctiveFacetsRefinements&&"source_site"!=b)for(var f in a.disjunctiveFacetsRefinements[d])c+="&"+encodeURIComponent(d)+ "="+encodeURIComponent(a.disjunctiveFacetsRefinements[d][f]);location.replace(c)});d.on("error",function(a){"AlgoliaSearchError"==a.name&&alert("Oops, something is not quite right.\nThis might be due to an outdated version of the plugin, in that case you must simply update the Addendio Plugin.\nOtherwise we will be happy to help, just get in touch at support@addendio.com")});d.on("error",function(a){"Error: Too many requests"==a&&alert("Wow, you can type fast!... are you human? If you are, get in touch here: info@addendio.com and let's see if we can help you...")}); d.on("result",function(a,c){var b=a.nbHits,g;g=",";b=(b+"").split(".");b[0]=b[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+g);g={nbHits:b.join("."),processingTimeMS:a.processingTimeMS,nbHits_plural:1!==a.nbHits};z.html(B.render(g));g="";for(b=0;ba.hits[b].rating&&(a.hits[b].rating_label_color="danger");a.hits[b].num_ratings_label_color="success";10>a.hits[b].num_ratings&&(a.hits[b].num_ratings_label_color="danger");for(var f=a.hits[b],e="", h=0;h';f.star_rating=e;a.hits[b].last_update_label_color="info";"> 1 year"==a.hits[b].last_update_range&&(a.hits[b].last_update_label_color="danger");a.hits[b].donate_link_flag=!0;"None"===a.hits[b].donate_link&&(a.hits[b].donate_link_flag=!1);a.hits[b].homepage_flag=!0;"None"===a.hits[b].homepage&&(a.hits[b].homepage_flag=!1);a.hits[b].description_flag=!0;"None"==a.hits[b].author&&(a.hits[b].description_flag= !1);a.hits[b].source_wp_flag=!0;a.hits[b].source_envato_flag=!1;"envato"==a.hits[b].source&&(a.hits[b].source_wp_flag=!1,a.hits[b].source_envato_flag=!0);a.hits[b].page_width=u.width;a.hits[b].page_height=u.height;a.hits[b].downloaded=n(a.hits[b].downloaded);g+=A.render(a.hits[b])}0===a.hits.length&&(g='

Try and change your parameters...

if you think this is a bug you can reach us here support@addendio.com

');y.html(g);if(0===a.hits.length)v.empty();else{g=[]; for(b=0;b=")||h.stats.min,h=c.getNumericRefinement(f.name,"<=")||h.stats.max,l=Math.min(e.max,Math.max(e.min,l)),h=Math.min(e.max,Math.max(e.min,h));e.values=[l,h];e.label_values=[n(l),n(h)];e.label_min=n(l);e.label_max=n(h)}else{var l=[],k;for(k in h.data)l.push({label:k,value:k,count:h.data[k],refined:d.isRefined(f.name, k)});h=f.sortFunction||t;f.topListIfRefined&&(h=F(h));l.sort(h);e.values=l.slice(0,5);e.has_other_values=5g||g>=a.nbPages||k.push({current:a.page===g,number:g+1});a.page+5