PageSourceSearch

https://www.covetedition.com/wp-content/plugins/search-in-place/js/codepeople_shearch_in_place.min.js

js covetedition.com collected 2026-10-02 05:09:23 UTC 13,175 bytes, 27 lines download raw bytes

1var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,d,k){c instanceof String&&(c=String(c));for(var f=c.length,h=0;h<f;h++){var n=c[h];if(d.call(k,n,h,c))return{i:h,v:n}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
2$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,k){c!=Array.prototype&&c!=Object.prototype&&(c[d]=k.value)};$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);
3$jscomp.polyfill=function(c,d,k,f){if(d){k=$jscomp.global;c=c.split(".");for(f=0;f<c.length-1;f++){var h=c[f];h in k||(k[h]={});k=k[h]}c=c[c.length-1];f=k[c];d=d(f);d!=f&&null!=d&&$jscomp.defineProperty(k,c,{configurable:!0,writable:!0,value:d})}};$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(d,c){return $jscomp.findInternal(this,d,c).v}},"es6","es3");
4var codepeople_search_in_place_generator=function(){function c(){try{return document.createEvent("TouchEvent"),!0}catch(a){return!1}}var d=jQuery;if("undefined"==typeof codepeople_search_in_place_generator_flag){codepeople_search_in_place_generator_flag=!0;var k=!1,f=d(".search-in-place-results-container"),h=function(a){var b=d(this).find("a").attr("href");if(b)switch(a.which){case 2:window.open(b,"_blank").blur();window.focus();break;case 3:break;default:document.location=b}},n=function(a){if(a||
5k&&0==d('input[name="s"]:focus').length&&0==d(".search-in-place:hover").length)d(".search-in-place-close-icon").remove(),d(".search-in-place").hide(),k=!1},v=function(a){if(a.is(":hidden")){var b=a.closest(".elementor-accordion-item");if(b.length&&b.find("ul:eq(0)").is(":hidden"))b.find(".elementor-accordion-title:eq(0)").click();else if(b=a.closest(".elementor-tab-content"),b.length)for(;b.length&&b.is(":hidden");){if(!b.hasClass("elementor-active")){var e=d("#"+b.attr("id").replace("content","title"));
6e.length?e.click():b.attr("data-tab")&&(e=d('.elementor-tab-title[data-tab="'+b.attr("data-tab")+'"]'),e.length&&e.click())}a=b.parent();b=a.closest(".elementor-tab-content")}else{b=a.closest(".et_pb_toggle_content");if(b.length&&(e=b.siblings(".et_pb_toggle_title"),e.length)){e.click();return}b=a.closest(".sow-accordion-panel-content");if(b.length&&(e=b.siblings(".sow-accordion-panel-header-container"),e.length)){e.find(".sow-accordion-open-button").click();return}b=a.closest(".answer");if(b.length&&
7(e=b.siblings(".title"),e.length)){e.click();return}b=a.closest('.ei-faq,[class$="_faq"]');if(b.length&&(e=b.find(".collapsed"),e.length)){e.click();return}b=a.closest(".accordion__item");if(b.length&&a.find(".accordion__body:hidden")&&(e=b.find(".accordion__header"),e.length)){e.click();return}b=a.closest(".vc_tta-panel");b.length&&b.addClass("active vc_active")}}},t=function(a){d(".search-in-place-mark-active").removeClass("search-in-place-mark-active");d(a).addClass("search-in-place-mark-active");
8v(a);var b=a.offset().top-window.innerHeight/2;setTimeout(function(){window.scrollTo({top:b,left:0,behavior:"smooth"})},100)},u=function(){d("[data-disable-enter-key]").on("keypress",function(a){if(13===a.keyCode)return a.preventDefault(),a.stopPropagation(),!1});d("[data-search-in-page]").data("enter-counter",0).on("click",function(){d(this).data("enter-counter",0)}).closest("form").on("submit",function(a){a.preventDefault();a.stopPropagation();a=d("[data-search-in-page]",this);var b=a.data("enter-counter"),
9e=d(".search-in-place-mark:eq("+b+")");e.length?(t(e),a.data("enter-counter",b+1)):a.data("enter-counter",0);n(!0);return!1});if(jQuery.fn.on)d(document).on("mouseover mouseout",".search-in-place>.item",function(a){d(this).toggleClass("active")}).on("mousedown",".search-in-place>.item",h).on("mousedown",".search-in-place>.label.more",h);else d(".search-in-place>.item").live("mouseover mouseout",function(a){d(this).toggleClass("active")}).live("mousedown",h).live("mousedown",".search-in-place>.label.more",
10h)};u.prototype={active:null,search:"",config:{min:codepeople_search_in_place.char_number,image_width:50,image_height:50,colors:"highlight_colors"in codepeo
10ple_search_in_place?codepeople_search_in_place.highlight_colors:"#B5DCE1 #F4E0E9 #D7E0B1 #F4D9D0 #D6CDC8 #F4E3C9 #CFDAF0 #F4EFEC".split(" "),areas:"areas"in codepeople_search_in_place?codepeople_search_in_place.areas:"div.hentry #content #main div.content #middle #container #wrapper article .elementor body".split(" ")},autohide:function(){var a=
11this,b='input[name="s"]';"own_only"in codepeople_search_in_place&&1*codepeople_search_in_place.own_only&&(b+="[data-search-in-place]");d(document).on("input keyup focus",b,function(b){var e=d(this),w=e.val();if(1!=d(b.currentTarget).data("search-in-page")||"focus"!=b.type&&13!==b.keyCode){if(0==d(".search-in-place-close-icon").length&&!e.data("search-in-page")&&c()){var g=d('<span class="search-in-place-close-icon"></span>');e.after(g);var l=e.offset(),q=e.outerWidth()-5,m=e.outerHeight(),f=Math.min(g.height(),
12m-5),h=Math.min(g.width(),f);g.height(f);g.width(h);g.offset({top:l.top+(m-f)/2,left:l.left+(q-h)})}e.attr("autocomplete","off");a.checkString(w)?(setTimeout(function(){a.getResults(e)},500),k=!0):(a.clearAutocomplete(e),d(".search-in-place").hide(),k=!1);"keyup"==b.type&&39==b.keyCode&&a.fromAutocomplete(e)}});d(document).on("click",".search-in-place-close-icon",function(a){a.stopPropagation();a.preventDefault();n(!0)});d(document).on("mouseover",":not(.search-in-place, .search-in-place *)",function(){c()||
13setTimeout(n,150)});d(document).on("blur",'input[name="s"]',function(){var a=d(this),b=a.data("background-color");"undefined"!=typeof b&&a.css("background-color",b);d('[name="cpsp-autocomplete"]').remove()});d(document).on("click",':not(input[name="s"])',function(){setTimeout(n,150)})},checkString:function(a){return this.config.min<=a.length},getResults:function(a){function b(b){"object"==typeof b&&("result"in b&&e.displayResult(b.result,c),"autocomplete"in b&&b.autocomplete.length?e.autocomplete(b.autocomplete[0],
14a):e.clearAutocomplete(a))}var e=this;if(void 0==a.data("search-in-page")&&!f.length||void 0!=a.data("search-in-page")&&void 0==a.data("no-popup")){var p=a.offset(),c=d(".search-in-place"),g=a.outerWidth();p={left:p.left,top:parseInt(p.top)+a.outerHeight()+5};if(e.search==a.val()&&c.length){c.show().width(g).offset(p);return}c.remove();c=d('<div class="search-in-place"></div>');c.appendTo("body");c.width(g).offset(p);e.displayLoading(c)}e.search=a.val();a.data("search-in-page")?(e.exclude_hidden=
15a.data("exclude-hidden")||0,g=e.search.replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," "),g="operator"in codepeople_search_in_place&&"and"==codepeople_search_in_place.operator?[g]:g.split(" "),d(".search-in-place-mark").each(function(){var a=d(this).parent();d(this).contents().filter(function(){return 3===this.nodeType}).unwrap();a[0]=a[0].normalize()}),g=r.highlightTerms(g),void 0==a.data("no-popup")&&(b(g),d(".search-in-place-more").remove(),d(".search-in-place .title a").mousedown(function(b){b.preventDefault();
16b.stopPropagation();a.blur();t(d(d(b.target).attr("href")));n(!0)}))):(g={s:e.search,action:"search_in_place"},"lang"in codepeople_search_in_place&&(g.lang=codepeople_search_in_place.lang),e.active&&e.active.abort(),e.active=jQuery.ajax({url:atob(codepeople_search_in_place.root)+"admin-ajax.php",data:g,cache:!0,dataType:"json",success:function(a){b(a)}}))},autocomplete:function(a,b){var e=b.data("background-color")||b.css("background-color"),c=function(a){if(a){if("transparent"===a.toLowerCase())return[0,
170,0,0];if("#"===a[0])return 7>a.length&&(a="#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]+(4<a.length?a[4]+a[4]:"")),[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16),7<a.length?parseInt(a.substr(7,2),16)/255:1];if(-1===a.indexOf("rgb")){var b=document.body.appendChild(document.createElement("fictum"));b.style.color="rgb(1, 2, 3)";if("rgb(1, 2, 3)"!==b.style.color)return;b.style.color=a;if("rgb(1, 2, 3)"===b.style.color||""===b.style.color)return;a=getComputedStyle(b).color;document.body.removeChild(b)}if(0===
18a.indexOf("rgb"))return-1===a.indexOf("rgba")&&(a+=",1"),a.match(/[\.\d]+/g).map(function(a){return+a})}}(b.css("color")),f=b.clone(),g={position:"absolute",background:e,"border-color":"transparent","box-shadow":"none",zIndex:1};f.removeAttr("placeholder").removeAttr("required");"auto"==b.css("zIndex")&&b.css("zIndex",10);"static"==b.css("position")&&b.css("position","relative");b.data("background-color",e);c&&(c[3]=.5,g.color="rgba("+c.join(",")+")");d('[name="cpsp-autocomplete"]').remove();b.css("backgroundColor",
19"transparent").after(f.attr("name","cpsp-autocomplete").val(a).css(g));f.width(b.width());f.height(b.height());f.offset(b.offset())},fromAutocomplete:function(a){var b=a.next('[name="cpsp-autocomplete"]');b.length&&b.val().length&&a.val(b.val())},clearAutocomplete:function(a){a=a.next('[name="cpsp-autocomplete"]');a.length&&a.val("")},displayResult:function(a,b){var e=this,c="",h=0,g;for(g in a){c+='<div class="label">'+g+"</div>";var l=a[g],q=l.length;h+=q;for(var m=0;m<q;
19m++)c+='<div class="item '+
20(m+1==q?"last":"")+'">',c=l[m].thumbnail?c+('<div class="thumbnail"><img src="'+l[m].thumbnail+'" style="visibility:hidden;float:left;position:absolute;" /></div><div class="data" style="margin-left:'+(e.config.image_width+5)+"px;min-height:"+e.config.image_height+'px;">'):c+'<div class="data">',c+='<span class="title"><a href="'+l[m].link+'">'+l[m].title+"</a></span>",l[m].resume&&(c+='<span class="resume">'+l[m].resume+"</span>"),l[m].author&&(c+='<span class="author">'+l[m].author+"</span>"),l[m].date&&
21(c+='<span class="date">'+l[m].date+"</span>"),c+='</div><div style="clear:both;"></div></div>'}c+='<div class="label more">';h?1*codepeople_search_in_place.result_number<=h&&(a=codepeople_search_in_place.home,a+=-1==a.indexOf("?")?"?":"&","lang"in codepeople_search_in_place&&(a+="lang="+codepeople_search_in_place.lang+"&"),c+='<a class="search-in-place-more" href="'+a+"s="+this.search+'&submit=Search">'+codepeople_search_in_place.more+" &gt;</a>"):c+=codepeople_search_in_place.empty;c+="</div>";
22if(b)b.html(c).find(".thumbnail img").on("load",function(){var a=e.imgSize(this);d(this).width(a.w).height(a.h).css("visibility","visible")});else f.length&&(f.html(c),f.find(".thumbnail img").css("visibility","visible"))},imgSize:function(a){a=d(a);var b=a.width();a=a.height();if(b>this.config.image_width){var c=this.config.image_width;var f=c/b*a;b=c;a=f}a>this.config.image_height&&(f=this.config.image_height,b*=f/a,a=f);return{w:b,h:a}},displayLoading:function(a){a.append('<div class="label"><div class="loading"></div></div>')},
23highlightTerms:function(a){var b=this,c,f=0,h={result:{source:[]}};innerHighlight=function(a,b){var c=0;if(3==b.nodeType){var e=a.toUpperCase(),g=b.data,f=replaceTildes(g).toUpperCase().indexOf(e),l="codepeople_search_in_place"in window&&"summary_length"in codepeople_search_in_place?1*codepeople_search_in_place.summary_length:20;0<=f&&0==d(b).closest(".search-in-place-mark").length&&(b=replaceNodeContent(b,a,f),!1!==b&&(h.result.source.push({link:"#"+b,title:a,resume:g.substring(Math.max(0,f-("search_in_place_characters_before"in
24window?search_in_place_characters_before:10)),Math.min(f+e.length+("search_in_place_characters_after"in window?search_in_place_characters_after:l),g.length))+'<span class="ellipsis">[...]</span>'}),c=1))}else possibleTextNode(b)&&lookupTextNodes(b,a);return c};replaceTildes=function(a){return a.normalize("NFD").replace(/[\u0300-\u036f]/g,"")};replaceNodeContent=function(a,e,h){if(b.exclude_hidden&&d(a).parent().is(":hidden"))return!1;var g=document.createElement("mark");a=a.splitText(h);a.splitText(e.length);
25e=a.cloneNode(!0);f++;h="search-in-page-"+f;g.setAttribute("id",h);g.setAttribute("style","background-color:"+c);g.setAttribute("class","search-in-place-mark");g.appendChild(e);a.parentNode.replaceChild(g,a);return h};possibleTextNode=function(a){return 1==a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName)};lookupTextNodes=function(a,b){for(var c=0;c<a.childNodes.length;c++)c+=innerHighlight(b,a.childNodes[c])};d.each(a,function(b,c){a[b]=replaceTildes(c)});d.each(b.config.areas,function(e,
26f){f=d(f);f.length&&f.each(function(){var e=this;d.each(a,function(a,d){d.length>=codepeople_search_in_place.char_number&&(c=b.config.colors[a%b.config.colors.length],innerHighlight(d,e))})})});return h}};var r=new u;1*codepeople_search_in_place.highlight&&codepeople_search_in_place.terms&&0<codepeople_search_in_place.terms.length&&r.highlightTerms(codepeople_search_in_place.terms);1*codepeople_search_in_place.identify_post_type&&(d(".type-post").prepend('<div class="search-in-place-type-post">'+
27codepeople_search_in_place.post_title+"</div>"),d(".type-page").prepend('<div class="search-in-place-type-page">'+codepeople_search_in_place.page_title+"</div>"));r.autohide()}};jQuery(codepeople_search_in_place_generator);jQuery(window).on("load",codepeople_search_in_place_generator);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.