Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(function(){"use strict";var c={};(function(){c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t}})(),function(){c.d=function(e,t){for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}();var d={};c.d(d,{default:function(){return O}});var f=Object(window.WPD).AjaxSearchPro,l=c.n(f);function h(e){try{return decodeURIComponent(e)}catch{return e}}function g(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}function _(e,t,r){const a=t.length,s=a-1;for(let n=0;n<a;n++){let o=t[n];!o&&Array.isArray(e)&&(o=e.length.toString()),o=["__proto__","constructor","prototype"].includes(o)?o.toUpperCase():o;const i=!isNaN(Number(t[n+1]));e[o]=n===s?r:e[o]||(i?[]:{}),Array.isArray(e[o])&&!i&&(e[o]={...e[o]}),e=e[o]}}function p(e){return(g(e)||"").replace(/\+/g,"%20").split("&").reduce((t,r)=>{const[a,s=""]=r.split("=").filter(Boolean).map(h);if(a){const n=a.replace(/\]/g,"").split("[");_(t,n,s)}return t},Object.create(null))}function y(e){let t="";const r=Object.entries(e);let a;for(;a=r.shift();){let[s,n]=a;if(Array.isArray(n)||n&&n.constructor===Object){const i=Object.entries(n).reverse();for(const[u,S]of i)r.unshift([`${s}[${u}]`,S])}else n!==void 0&&(n===null&&(n=""),t+="&"+[s,n].map(encodeURIComponent).join("="))}return t.substr(1)}function b(e,...t){const r=e.replace(/^[^#]*/,"");e=e.replace(/#.*/,"");const a=e.indexOf("?");if(a===-1)return e+r;const s=p(e),n=e.substr(0,a);t.forEach(u=>delete s[u]);const o=y(s);return(o?n+"?"+o:n)+r}function m(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function x(e="",t){if(!t||!Object.keys(t).length)return e;const r=m(e)||"";let a=e.replace(r,"");const s=e.indexOf("?");return s!==-1&&(t=Object.assign(p(e),t),a=a.substr(0,s)),a+"?"+y(t)+r}const v=l().helpers;class A{name="Elementor Widget Fixes";init(){const{Hooks:t}=v;t.addFilter("asp/live_load/url",this.addQueryIdToUrl.bind(this),11,this)}addQueryIdToUrl(t,r,a,s){return!s.classList.contains("wp-block-blocksy-query")||s.dataset.id===void 0?t:(t=b(t,"query-"+s.dataset.id),x(t,{unique_id:s.dataset.id}))}}l().addons.add(new A);var w=null,O=f;Object(window.WPD).AjaxSearchPro=d.default})();

View File

@@ -0,0 +1 @@
(function(){"use strict";var a={};(function(){a.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(e,{a:e}),e}})(),function(){a.d=function(r,e){for(var n in e)a.o(e,n)&&!a.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:e[n]})}}(),function(){a.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)}}();var t={};a.d(t,{default:function(){return u}});var o=Object(window.WPD).AjaxSearchPro,c=a.n(o);const i=c().helpers;class s{name="Elementor Widget Fixes";init(){const{Hooks:e}=i;e.addFilter("asp/live_load/finished",this.fixImages.bind(this),11,this)}fixImages(e,n){window?.bricksLazyLoad?.()}}c().addons.add(new s);var d=null,u=o;Object(window.WPD).AjaxSearchPro=t.default})();

View File

@@ -0,0 +1 @@
(function(){"use strict";var r={};(function(){r.d=function(t,e){for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}})(),function(){r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}();var n={};r.d(n,{default:function(){return u}});var o=Object(window.WPD).AjaxSearchPro;const a=o.helpers;class d{name="Divi Widget Fixes";init(){a.Hooks.addFilter("asp/init/etc",this.diviBodyCommerceResultsPage,10,this),a.Hooks.addFilter("asp/live_load/finished",this.diviBlogModuleTriggerInit.bind(this),10,this)}diviBodyCommerceResultsPage(e){return e.o.divi.bodycommerce&&e.o.is_results_page&&window.WPD.intervalUntilExecute(function(i){setTimeout(function(){i("#divi_filter_button").trigger("click")},50)},function(){return typeof jQuery<"u"?jQuery:!1}),e}diviBlogModuleTriggerInit(e,i,l,c){jQuery!==void 0&&jQuery(c).hasClass("et_pb_module")&&jQuery(window).trigger("load")}}o.addons.add(new d);var s=null,u=o;Object(window.WPD).AjaxSearchPro=n.default})();

View File

@@ -0,0 +1 @@
(function(){"use strict";var c={};(function(){c.n=function(s){var e=s&&s.__esModule?function(){return s.default}:function(){return s};return c.d(e,{a:e}),e}})(),function(){c.d=function(s,e){for(var t in e)c.o(e,t)&&!c.o(s,t)&&Object.defineProperty(s,t,{enumerable:!0,get:e[t]})}}(),function(){c.o=function(s,e){return Object.prototype.hasOwnProperty.call(s,e)}}();var p={};c.d(p,{default:function(){return P}});var g=Object(window.WPD).AjaxSearchPro,h=c.n(g),m=Object(window.WPD).DoMini,a=c.n(m);const _=h().helpers;class v{name="Elementor Widget Fixes";init(){const{Hooks:e}=_;e.addFilter("asp/live_load/finished",this.finished.bind(this),10,this)}finished(e,t,r,n){const d=a()(n).find(".jet-listing div[data-nav]");if(!r.includes("asp_es_")||d.length===0)return;const o=d.get(0);if(o?.dataset?.nav===void 0||o?.dataset?.nav===null)return;const l=JSON.parse(o.dataset.nav);l.query===void 0&&(l.query={}),l.query.s=t.n("text").val().trim(),l.query.asp_id=t.o.id,o.dataset.nav=JSON.stringify(l)}}h().addons.add(new v);var S=null;const w=h().helpers;class x{name="Elementor Widget Fixes";init(){const{Hooks:e}=w;e.addFilter("asp/init/etc",this.fixElementorPostPagination.bind(this),10,this),e.addFilter("asp/live_load/start",this.start.bind(this),10,this),e.addFilter("asp/live_load/finished",this.finished.bind(this),10,this),e.addFilter("asp/live_load/finished",this.fixImages.bind(this),11,this)}fixImages(e,t){a()(".asp_es_"+t.o.id).find("img[nosrcset]").forEach(n=>{a()(n).attr("srcset",a()(n).attr("nosrcset")).removeAttr("nosrcset")})}start(e,t,r,n){const i=t.n("searchsettings").find("form").serialize(),d=t.n("text").val().trim();!(i+d!==t.lastSuccesfulSearch)&&a()(n).find(".e-load-more-spinner").length>0&&a()(n).css("opacity","1"),a()(r).removeClass("e-load-more-pagination-end")}finished(e,t,r,n){const i=a()(n);if(r.includes("asp_es_")&&typeof elementorFrontend<"u"&&typeof elementorFrontend.init<"u"&&i.find(".asp_elementor_nores").length===0){const d=i.data("widget_type")||"";d!==""&&typeof jQuery<"u"&&elementorFrontend.hooks.doAction("frontend/element_ready/"+d,jQuery(i.get(0))),this.fixElementorPostPagination(t,e),t.o.scrollToResults.enabled&&this.scrollToResultsIfNeeded(i),t.n("s").trigger("asp_elementor_results",[t.o.id,t.o.iid,i.get(0)],!0,!0)}}scrollToResultsIfNeeded(e){const t=e.find(".elementor-post, .product").first();t.length&&!t.isInViewport(40)&&t.get(0).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})}fixElementorPostPagination(e,t){const r=a()(".asp_es_"+e.o.id);if(t=t||location.href,!r.length)return e;const n=new URL(t);if(!n.searchParams.size)return e;this.elementorHideSpinner(r.get(0)),n.searchParams.delete("asp_force_reset_pagination");const i=r.find(".e-load-more-anchor"),d=r.find(".elementor-pagination a, .elementor-widget-container .woocommerce-pagination a");if(i.length>0&&!d.length){const o=r.find(".elementor-widget-container").get(0),l=()=>{const f=i.data("page"),u=f?parseInt(f,10)+1:2;n.searchParams.set("page",u.toString()),i.data("next-page",n.href),i.next(".elementor-button-wrapper").find("a").attr("href",n.href)};o&&new MutationObserver(()=>{l(),console.log("Mutation observed: fixing anchor.")}).observe(o,{childList:!0,subtree:!0}),l()}else d.each(function(){const o=a()(this),l=o.attr("href")||"",f=new URL(l,window.location.origin);f.searchParams.has("asp_ls")?f.searchParams.delete("asp_force_reset_pagination"):n.searchParams.forEach((u,b)=>f.searchParams.set(b,u)),o.attr("href",f.href)});return e}elementorHideSpinner(e){a()(e).removeClass("e-load-more-pagination-loading").find(".eicon-animation-spin").removeClass("eicon-animation-spin")}}h().addons.add(new x);var y=null,P=g;Object(window.WPD).AjaxSearchPro=p.default})();

View File

@@ -0,0 +1 @@
(function(){"use strict";var a={};(function(){a.d=function(d,t){for(var e in t)a.o(t,e)&&!a.o(d,e)&&Object.defineProperty(d,e,{enumerable:!0,get:t[e]})}})(),function(){a.o=function(d,t){return Object.prototype.hasOwnProperty.call(d,t)}}();var s={};a.d(s,{default:function(){return l}});var o=Object(window.WPD).AjaxSearchPro;const u=o.helpers;class _{init(){u.Hooks.addFilter("asp/search/end",this.finished.bind(this),10,this)}finished(t){typeof wc_add_to_cart_params>"u"||typeof jQuery>"u"||(this.requests=[],this.addRequest=this.addRequest.bind(this),this.run=this.run.bind(this),this.$liveRegion=this.createLiveRegion(),jQuery(t.n("resdrg").get(0)).find(".add-to-cart-button:not(.wc-interactive)").off().on("click",{addToCartHandler:this},this.onAddToCart))}addRequest(t){this.requests.push(t),this.requests.length===1&&this.run()}run(){const t=this,e=t.requests[0].complete;t.requests[0].complete=function(){typeof e=="function"&&e(),t.requests.shift(),t.requests.length>0&&t.run()},jQuery.ajax(this.requests[0])}onAddToCart(t){const e=jQuery(this);if(e.is(".ajax-add-to-cart")){if(!e.attr("data-product_id"))return!0;if(t.data.addToCartHandler.$liveRegion.text("").removeAttr("aria-relevant"),t.preventDefault(),e.removeClass("added"),e.addClass("loading"),jQuery(document.body).triggerHandler("should_send_ajax_request.adding_to_cart",[e])===!1)return jQuery(document.body).trigger("ajax_request_not_sent.adding_to_cart",[!1,!1,e]),!0;const n={};jQuery.each(e.data(),function(r,i){n[r]=i}),jQuery.each(e[0].dataset,function(r,i){n[r]=i});const c=e.closest(".add-to-cart-container").find(".add-to-cart-quantity");c.length>0&&(n.quantity=c.get(0).value),jQuery(document.body).trigger("adding_to_cart",[e,n]),t.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),data:n,success:function(r){if(r){if(r.error&&r.product_url){window.location=r.product_url;return}if(wc_add_to_cart_params.cart_redirect_after_add==="yes"){window.location=wc_add_to_cart_params.cart_url;return}jQuery(document.body).trigger("added_to_cart",[r.fragments,r.cart_hash,e])}},dataType:"json"})}}createLiveRegion(){const t=jQuery(".widget_shopping_cart_live_region");return t.length?t:jQuery('<div class="widget_shopping_cart_live_region screen-reader-text" role="status"></div>').appendTo("body")}}o.addons.add(new _);var f=null,l=o;Object(window.WPD).AjaxSearchPro=s.default})();

View File

@@ -0,0 +1 @@
(function(){"use strict";var c={};(function(){c.d=function(t,e){for(var l in e)c.o(e,l)&&!c.o(t,l)&&Object.defineProperty(t,l,{enumerable:!0,get:e[l]})}})(),function(){c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}();var u={};c.d(u,{default:function(){return s}});var a=Object(window.WPD).AjaxSearchPro,n=Object(window.WPD).DoMini;a.plugin.autocompleteCheck=function(t=""){if(this.n("text").val()==="")return this.n("textAutocomplete").val(""),!1;let e=this.n("textAutocomplete").val();return!(e!==""&&e.indexOf(t)===0)},a.plugin.autocomplete=function(){let t=this,e=t.n("text").val();if(t.autocompleteCheck(e)&&t.n("text").val().length>=t.o.autocomplete.trigger_charcount){let l={action:"ajaxsearchpro_autocomplete",asid:t.o.id,sauto:t.n("text").val(),asp_inst_id:t.o.rid,options:n("form",t.n("searchsettings")).serialize()};t.postAuto=n.fn.ajax({url:ASP.ajaxurl,method:"POST",data:l,success:function(o){o.length>0&&(o=n("<textarea />").html(o).text(),o=o.replace(/^\s*[\r\n]/gm,""),o=e+o.substring(e.length)),t.n("textAutocomplete").val(o),t.fixAutocompleteScrollLeft()}})}},a.plugin.autocompleteGoogleOnly=function(){let t=this,e=t.n("text").val();if(!t.autocompleteCheck(e))return;let l=t.o.autocomplete.lang;["wpml_lang","polylang_lang","qtranslate_lang"].forEach(function(o){n('input[name="'+o+'"]',t.n("searchsettings")).length>0&&n('input[name="'+o+'"]',t.n("searchsettings")).val().length>1&&(l=n('input[name="'+o+'"]',t.n("searchsettings")).val())}),t.n("text").val().length>=t.o.autocomplete.trigger_charcount&&n.fn.ajax({url:"https://clients1.google.com/complete/search",cors:"no-cors",data:{q:e,hl:l,nolabels:"t",client:"hp",ds:""},success:function(o){if(o[1].length>0){let i=o[1][0][0].replace(/(<([^>]+)>)/ig,"");i=n("<textarea />").html(i).text(),i=i.substring(e.length),t.n("textAutocomplete").val(e+i),t.fixAutocompleteScrollLeft()}}})},a.plugin.fixAutocompleteScrollLeft=function(){this.n("textAutocomplete").get(0).scrollLeft=this.n("text").get(0).scrollLeft};var p=null;let r=a.helpers;a.plugin.initAutocompleteEvent=function(){let t=this,e;(t.o.autocomplete.enabled&&!r.isMobile()||t.o.autocomplete.mobile&&r.isMobile())&&(t.n("text").on("keydown",function(l){(l.keyCode||l.which)===9&&t.n("textAutocomplete").val()!==""&&t.n("textAutocomplete").val()!==n(this).val()&&l.preventDefault()}),t.n("text").on("keyup",function(l){t.keycode=l.keyCode||l.which,t.ktype=l.type;let o=39;n("body").hasClass("rtl")&&(o=37),(t.keycode===o||t.keycode===9)&&t.n("textAutocomplete").val()!==""?(l.preventDefault(),t.n("text").val(t.n("textAutocomplete").val()),t.o.trigger.type&&(t.searchAbort(),t.search())):(clearTimeout(e),t.postAuto!=null&&t.postAuto.abort(),t.o.autocomplete.googleOnly?t.autocompleteGoogleOnly():e=setTimeout(function(){t.autocomplete(),e=null},t.o.trigger.autocomplete_delay))}),t.n("text").on("keyup mouseup input blur select",function(){t.fixAutocompleteScrollLeft()}))};var f=null,s=a;Object(window.WPD).AjaxSearchPro=u.default})();

View File

@@ -0,0 +1 @@
(function(){"use strict";var i={};(function(){i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}})(),function(){i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}();var r={};i.d(r,{default:function(){return u}});var c=Object(window.WPD).AjaxSearchPro,s=Object(window.WPD).DoMini;c.plugin.initCompact=function(){let t=this;t.o.compact.enabled&&t.o.compact.position!=="fixed"&&(t.o.compact.overlay=0),t.o.compact.enabled&&t.n("trythis").css({display:"none"}),t.o.compact.enabled&&t.o.compact.position==="fixed"&&window.WPD.intervalUntilExecute(function(){let e=s("body");t.nodes.container=t.n("search").closest(".asp_w_container"),e.append(t.n("search").detach()),e.append(t.n("trythis").detach()),t.n("search").css({top:t.n("search").position().top+"px"})},function(){return t.n("search").css("position")==="fixed"})};var h=null;const f=()=>{let t=window.innerWidth;return t<=640?"phone":t<=1024?"tablet":"desktop"},l=()=>typeof window.navigator<"u"&&typeof window.navigator.userAgent<"u"?window.navigator.userAgent.match(/(iPod|iPhone|iPad)/)!=null:!1,m=()=>{try{return document.createEvent("TouchEvent"),!0}catch{return!1}},w=()=>"ontouchstart"in window,x=navigator.userAgent.toLowerCase().includes("firefox"),p=navigator.userAgent,b=/AppleWebKit/.test(p)&&!/Edge/.test(p);let o;const d=t=>{if(!l()){t?.focus();return}(t===void 0||o===void 0)&&(o=document.createElement("input"),o.setAttribute("type","text"),o.style.position="absolute",o.style.opacity="0",o.style.height="0",o.style.fontSize="16px",document.body.prepend(o)),t===void 0?o.focus():t.focus()};let a=c.helpers;c.plugin.openCompact=function(){let t=this;t.n("search").is("[data-asp-compact-w]")||(t.n("probox").attr("data-asp-compact-w",t.n("probox").innerWidth()),t.n("search").attr("data-asp-compact-w",t.n("search").innerWidth())),t.n("search").css({width:t.n("search").width()+"px"}),t.n("probox").css({width:"auto"}),setTimeout(function(){t.n("search").find(".probox>div:not(.promagnifier)").removeClass("hiddend")},80),clearTimeout(t.timeouts.compactBeforeOpen),t.timeouts.compactBeforeOpen=setTimeout(function(){let e;a.deviceType()==="phone"?e=t.o.compact.width_phone:a.deviceType()==="tablet"?e=t.o.compact.width_tablet:e=t.o.compact.width,e=a.Hooks.applyFilters("asp_compact_width",e,t.o.id,t.o.iid),e=isNaN(e)?e:e+"px",t.o.compact.position!=="static"?t.n("search").css({"max-width":e,width:e}):(t.n("container").css({"max-width":e,width:e}),t.n("search").css({"max-width":"100%",width:"100%"})),t.o.compact.overlay&&(t.n("search").css("z-index",999999),t.n("searchsettings").css("z-index",999999),t.n("resultsDiv").css("z-index",999999),t.n("trythis").css("z-index",999998),s("#asp_absolute_overlay").css({opacity:1,width:"100%",height:"100%","z-index":999990})),t.n("search").attr("data-asp-compact","open")},50),t.o.compact.focus&&d(),clearTimeout(t.timeouts.compactAfterOpen),t.timeouts.compactAfterOpen=setTimeout(function(){t.resize(),t.n("trythis").css({display:"block"}),t.o.compact.enabled&&t.o.compact.position!=="static"&&t.n("trythis").css({top:t.n("search").offset().top+t.n("search").outerHeight(!0)+"px",left:t.n("search").offset().left+"px"}),t.o.compact.focus&&d(t.n("text").get(0)),t.n("text").trigger("focus"),t.scrolling()},500)},c.plugin.closeCompact=function(){let t=this;clearTimeout(t.timeouts.compactBeforeOpen),clearTimeout(t.timeouts.compactAfterOpen),t.timeouts.compactBeforeOpen=setTimeout(function(){t.n("search").attr("data-asp-compact","closed")},50),t.n("search").find(".probox>div:not(.promagnifier)").addClass("hiddend"),t.o.compact.position!=="static"?t.n("search").css({width:"auto"}):(t.n("container").css({width:"auto"}),t.n("search").css({"max-width":"unset",width:"auto"})),t.n("probox").css({width:t.n("probox").attr("data-asp-compact-w")+"px"}),t.n("trythis").css({left:t.n("search").position().left,display:"none"}),t.o.compact.overlay&&(t.n("search").css("z-index",""),t.n("searchsettings").css("z-index",""),t.n("resultsDiv").css("z-index",""),t.n("trythis").css("z-index",""),s("#asp_absolute_overlay").css({opacity:0,width:0,height:0,"z-index":0}))};var v=null;c.plugin.initCompactEvents=function(){let t=this,e=0;t.n("promagnifier").on("click",function(){let n=t.n("search").attr("data-asp-compact")||"closed";if(e=window.scrollY,t.hideSettings?.(),t.hideResults(),n==="closed")t.openCompact(),t.n("text").trigger("focus");else{if(!t.o.compact.closeOnMagnifier)return;t.closeCompact(),t.searchAbort(),t.n("proloading").css("display","none")}})};var y=null,u=c;Object(window.WPD).AjaxSearchPro=r.default})();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(function(){"use strict";var i={};(function(){i.d=function(e,n){for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})}})(),function(){i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}();var s={};i.d(s,{default:function(){return g}});var c=Object(window.WPD).AjaxSearchPro,d=Object(window.WPD).DoMini;c.plugin.gaEvent=function(e,n){let t=this,r=t.gaGetTrackingID();if(typeof ASP.analytics>"u"||ASP.analytics.method!=="event")return!1;let l=typeof window.gtag=="function"?window.gtag:!1;if(l===!1&&typeof window.dataLayer>"u")return!1;if(typeof ASP.analytics.event[e]<"u"&&ASP.analytics.event[e].active){let _={search_id:t.o.id,search_name:t.n("search").data("name"),phrase:t.n("text").val(),option_name:"",option_value:"",result_title:"",result_url:"",results_count:""},a={event_category:ASP.analytics.event[e].category,event_label:ASP.analytics.event[e].label,value:ASP.analytics.event[e].value};n=d.fn.extend(_,n),Object.keys(n).forEach(function(o){let f=n[o];f=String(f).replace(/[\s\n\r]+/g," ").trim(),Object.keys(a).forEach(function(u){let v=new RegExp("{"+o+"}","gmi");a[u]=a[u].replace(v,f)})}),l!==!1?r!==!1?r.forEach(function(o){a.send_to=o,l("event",ASP.analytics.event[e].action,a)}):l("event",ASP.analytics.event[e].action,a):typeof window.dataLayer.push<"u"&&window.dataLayer.push({event:"asp_event",event_name:ASP.analytics.event[e].action,event_category:a.event_category,event_label:a.event_label,event_value:a.value})}},c.plugin.gaGetTrackingID=function(){let e=!1;if(typeof ASP.analytics>"u")return e;if(typeof ASP.analytics.tracking_id<"u"&&ASP.analytics.tracking_id!=="")return[ASP.analytics.tracking_id];if((typeof window.gtag=="function"?window.gtag:!1)===!1&&typeof window.ga<"u"&&typeof window.ga.getAll<"u"){let t=[];return window.ga.getAll().forEach(function(r){t.push(r.get("trackingId"))}),t.length>0?t:!1}return e};var y=null,g=c;Object(window.WPD).AjaxSearchPro=s.default})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(function(){"use strict";var a={};(function(){a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}();var n={};a.d(n,{default:function(){return f}});var o=Object(window.WPD).AjaxSearchPro,h=Object(window.WPD).DoMini;let i=o.helpers;o.plugin.showHorizontalResults=function(){let e=this;if(e.showResultsBox(),e.n("items").css("opacity",e.animationOpacity),e.o.resultsposition==="hover"&&e.n("resultsDiv").css("width",e.n("search").width()-(e.n("resultsDiv").outerWidth(!0)-e.n("resultsDiv").width())+"px"),e.n("items").length>0&&e.o.scrollBar.horizontal.enabled){let t=parseInt(e.n("items").css("marginLeft")),r=e.n("items").outerWidth()+t*2;e.n("resdrg").css("width",e.n("items").length*r+t*2+"px")}else e.n("results").css("overflowX","hidden"),e.n("resdrg").css("width","auto");if(e.keywordHighlight(),e.call_num<1){let t=e.n("results");if(t.get(0).scrollLeft=0,e.o.scrollBar.horizontal.enabled){let r=0,c=Date.now();t.off("mousewheel"),t.on("mousewheel",function(s){let w=typeof s.deltaFactor<"u"?s.deltaFactor:65,l=s.deltaY>0?1:-1,u=Date.now()-c,d=u>100?1:3-2*u/100;r!==s.deltaY&&(d=1),h(this).animate(!1).animate({scrollLeft:this.scrollLeft+l*w*2*d},250,"easeOutQuad"),r=s.deltaY,c=Date.now(),i.isScrolledToRight(t.get(0))&&l===1||i.isScrolledToLeft(t.get(0))&&l===-1||s.preventDefault()})}}e.showResultsBox(),e.addAnimation(),e.searching=!1};var p=null,f=o;Object(window.WPD).AjaxSearchPro=n.default})();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(function(){"use strict";var i={};(function(){i.d=function(t,e){for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})}})(),function(){i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}();var a={};i.d(a,{default:function(){return f}});var o=Object(window.WPD).AjaxSearchPro,r=Object(window.WPD).DoMini;o.plugin.showPolaroidResults=function(){let t=this;this.loadASPFonts?.(),t.n("results").addClass("photostack"),r(".photostack>nav",t.n("resultsDiv")).remove();let e=r("figure",t.n("resultsDiv"));if(t.showResultsBox(),e.length>0)if(t.n("results").css({height:t.o.prescontainerheight}),t.keywordHighlight(),typeof Photostack<"u")t.ptstack=new Photostack(t.n("results").get(0),{callback:function(s){}});else return!1;e.length===0&&(t.n("results").css({height:"11110px"}),t.n("results").css({height:"auto"})),t.addAnimation(),t.fixResultsPosition(!0),t.searching=!1,t.initPolaroidEvents(e)},o.plugin.initPolaroidEvents=function(t){let e=this,s=1,n=".photostack>nav span";t.forEach(function(){s>1&&r(this).removeClass("photostack-current"),r(this).attr("idx",s),s++}),t.on("click",function(l){if(r(this).hasClass("photostack-current"))return;l.preventDefault();let h=r(this).attr("idx");r(".photostack>nav span:nth-child("+h+")",e.n("resultsDiv")).trigger("click",[],!0)});const c=()=>{r(n+".current",e.n("resultsDiv")).next().length>0?r(n+".current",e.n("resultsDiv")).next().trigger("click",[],!0):r(n+":nth-child(1)",e.n("resultsDiv")).trigger("click",[],!0)},u=()=>{r(n+".current",e.n("resultsDiv")).prev().length>0?r(n+".current",e.n("resultsDiv")).prev().trigger("click",[],!0):r(n+":nth-last-child(1)",e.n("resultsDiv")).trigger("click",[],!0)};t.on("mousewheel",function(l){l.preventDefault(),(l.deltaY>0?1:-1)>=1?c():u()}),e.n("resultsDiv").on("swiped-left",c),e.n("resultsDiv").on("swiped-right",u)};var d=null,f=o;Object(window.WPD).AjaxSearchPro=a.default})();

View File

@@ -0,0 +1 @@
(function(){"use strict";var n={};(function(){n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})}})(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}();var a={};n.d(a,{default:function(){return d}});var c=Object(window.WPD).AjaxSearchPro,s=Object(window.WPD).DoMini;c.plugin.showVerticalResults=function(){let t=this;if(t.showResultsBox(),t.n("items").length>0){let e=t.n("items").length<t.o.itemscount?t.n("items").length:t.o.itemscount;e=e<=0?9999:e;let o=s(".asp_group_header",t.n("resultsDiv"));if(t.o.itemscount===0||t.n("items").length<=t.o.itemscount)t.n("results").css({height:"auto"});else if(t.call_num<1&&t.n("results").css({height:"30px"}),t.call_num<1){let i=0,r=0,l=0,u=0;t.n("items").forEach(function(){r+=s(this).outerHeight(!0),s(this).outerHeight(!0)>u&&(u=s(this).outerHeight(!0)),i++}),l=u*e,l>r&&(l=r),i=i<1?1:i,r=r/i*e,o.length>0&&o.forEach(function(h,p){let f=Array.prototype.slice.call(h.parentNode.children).indexOf(h);f-p-Math.floor(f/3)<e&&(l+=s(this).outerHeight(!0))}),t.n("results").css({height:l+"px"})}t.n("items").last().addClass("asp_last_item"),t.n("results").find(".asp_group_header").prev(".item").addClass("asp_last_item"),t.keywordHighlight()}if(t.resize(),t.n("items").length===0&&t.n("results").css({height:"auto"}),t.call_num<1&&(t.n("results").get(0).scrollTop=0),t.o.preventBodyScroll){let e,o=s("body"),i=o.css("overflow"),r=typeof o.attr("style")>"u";t.n("results").off("touchstart"),t.n("results").off("touchend"),t.n("results").on("touchstart",function(){clearTimeout(e),s("body").css("overflow","hidden")}).on("touchend",function(){clearTimeout(e),e=setTimeout(function(){r?s("body").removeAttr("style"):s("body").css("overflow",i)},300)})}t.addAnimation(),t.fixResultsPosition(!0),t.searching=!1};var _=null,d=c;Object(window.WPD).AjaxSearchPro=a.default})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
// empty entry for copyWebPack

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,413 @@
/**
* photostack.js v1.0.0 (modified version)
* original from: http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2014, Codrops
* http://www.codrops.com
*/
(function(){
'use strict';
function extend( a, b ) {
for( let key in b ) {
if( b.hasOwnProperty( key ) ) {
a[key] = b[key];
}
}
return a;
}
function shuffleMArray( marray ) {
if (typeof marray == "undefined" || typeof marray[0] == "undefined")
return false;
let arr = [], marrlen = marray.length, inArrLen = marray[0].length;
for(let i = 0; i < marrlen; i++) {
arr = arr.concat( marray[i] );
}
// shuffle 2 d array
arr = shuffleArr( arr );
// to 2d
let newmarr = [], pos = 0;
for( let j = 0; j < marrlen; j++ ) {
let tmparr = [];
for( let k = 0; k < inArrLen; k++ ) {
tmparr.push( arr[ pos ] );
pos++;
}
newmarr.push( tmparr );
}
return newmarr;
}
function shuffleArr( array ) {
let m = array.length, t, i;
// While there remain elements to shuffle…
while (m) {
// Pick a remaining element…
i = Math.floor(Math.random() * m--);
// And swap it with the current element.
t = array[m];
array[m] = array[i];
array[i] = t;
}
return array;
}
function Photostack( el, options ) {
this.el = el;
this.inner = this.el.querySelector( 'div' );
this.allItems = [].slice.call( this.inner.children );
this.allItemsCount = this.allItems.length;
if( !this.allItemsCount ) return;
this.items = [].slice.call( this.inner.querySelectorAll( 'figure:not([data-dummy])' ) );
this.itemsCount = this.items.length;
// index of the current photo
this.current = 0;
this.options = extend( {}, this.options );
extend( this.options, options );
this._init();
}
Photostack.prototype.options = {};
Photostack.prototype._init = function() {
this.currentItem = this.items[ this.current ];
this._addNavigation();
this._getSizes();
this._initEvents();
}
Photostack.prototype._addNavigation = function() {
// add nav dots
this.nav = document.createElement( 'nav' )
let inner = '';
for( let i = 0; i < this.itemsCount; ++i ) {
inner += '<span></span>';
}
this.nav.innerHTML = inner;
this.el.appendChild( this.nav );
this.navDots = [].slice.call( this.nav.children );
}
Photostack.prototype._initEvents = function() {
let self = this,
beforeStep = this.el.classList.contains( 'photostack-start' ),
open = function() {
let setTransition = function() {
self.el.classList.add( 'photostack-transition' );
}
if( beforeStep ) {
this.removeEventListener( 'click', open );
self.el.classList.remove( 'photostack-start' );
setTransition();
}
else {
self.openDefault = true;
setTimeout( setTransition, 25 );
}
self.started = true;
self._showPhoto( self.current );
};
if( beforeStep ) {
this._shuffle();
this.el.addEventListener( 'click', open );
}
else {
open();
}
this.navDots.forEach( function( dot, idx ) {
dot.addEventListener( 'click', function() {
// rotate the photo if clicking on the current dot
if( idx === self.current ) {
self._rotateItem();
}
else {
// if the photo is flipped then rotate it back before shuffling again
let callback = function() { self._showPhoto( idx ); }
if( self.flipped ) {
self._rotateItem( callback );
}
else {
callback();
}
}
} );
} );
// This triggers an error message..
//window.addEventListener( 'resize', function() { self._resizeHandler(); } );
}
Photostack.prototype._resizeHandler = function() {
let self = this;
function delayed() {
self._resize();
self._resizeTimeout = null;
}
if ( this._resizeTimeout ) {
clearTimeout( this._resizeTimeout );
}
this._resizeTimeout = setTimeout( delayed, 100 );
}
Photostack.prototype._resize = function() {
let self = this, callback = function() { self._shuffle( true ); }
this._getSizes();
if( this.started && this.flipped ) {
this._rotateItem( callback );
}
else {
callback();
}
}
Photostack.prototype._showPhoto = function( pos ) {
if( this.isShuffling ) {
return false;
}
this.isShuffling = true;
// if there is something behind..
if( this.currentItem.classList.contains( 'photostack-flip' ) ) {
this._removeItemPerspective();
this.navDots[ this.current ].classList.remove( 'flippable' );
}
this.navDots[ this.current ].classList.remove( 'current' );
this.currentItem.classList.remove( 'photostack-current' );
// change current
this.current = pos;
this.currentItem = this.items[ this.current ];
this.navDots[ this.current ].classList.add( 'current' );
// if there is something behind..
if( this.currentItem.querySelector( '.photostack-back' ) ) {
// nav dot gets class flippable
this.navDots[ pos ].classList.add( 'flippable' );
}
// shuffle a bit
this._shuffle();
}
// display items (randomly)
// noinspection JSMismatchedCollectionQueryUpdate
Photostack.prototype._shuffle = function( resize ) {
let iter = resize ? 1 : this.currentItem.getAttribute( 'data-shuffle-iteration' ) || 1;
if( iter <= 0 || !this.started || this.openDefault ) { iter = 1; }
// first item is open by default
if( this.openDefault ) {
// change transform-origin
this.currentItem.classList.add( 'photostack-flip' );
this.openDefault = false;
this.isShuffling = false;
}
let overlapFactor = .5,
// lines & columns
lines = Math.ceil(this.sizes.inner.width / (this.sizes.item.width * overlapFactor) ),
columns = Math.ceil(this.sizes.inner.height / (this.sizes.item.height * overlapFactor) ),
// since we are rounding up the previous calcs we need to know how much more we are adding to the calcs for both x and y axis
addX = lines * this.sizes.item.width * overlapFactor + this.sizes.item.width/2 - this.sizes.inner.width,
addY = columns * this.sizes.item.height * overlapFactor + this.sizes.item.height/2 - this.sizes.inner.height,
// we will want to center the grid
extraX = addX / 2,
extraY = addY / 2,
// max and min rotation angles
maxrot = 35, minrot = -35,
self = this,
// translate/rotate items
moveItems = function() {
--iter;
// create a "grid" of possible positions
let grid = [];
// populate the positions grid
for( let i = 0; i < columns; ++i ) {
// noinspection JSMismatchedCollectionQueryUpdate
let col = grid[ i ] = [];
for( let j = 0; j < lines; ++j ) {
let xVal = j * (self.sizes.item.width * overlapFactor) - extraX,
yVal = i * (self.sizes.item.height * overlapFactor) - extraY,
olx = 0, oly = 0;
if( self.started && iter === 0 ) {
let ol = self._isOverlapping( { x : xVal, y : yVal } );
if( ol.overlapping ) {
olx = ol.noOverlap.x;
oly = ol.noOverlap.y;
let r = Math.floor( Math.random() * 3 );
switch(r) {
case 0 : olx = 0; break;
case 1 : oly = 0; break;
}
}
}
col[ j ] = { x : xVal + olx, y : yVal + oly };
}
}
// shuffle
grid = shuffleMArray(grid);
let l = 0, c = 0, cntItemsAnim = 0;
self.allItems.forEach( function( item ) {
// pick a random item from the grid
if( l === lines - 1 ) {
c = c === columns - 1 ? 0 : c + 1;
l = 1;
}
else {
++l
}
let gridVal = grid[c][l-1],
translation = { x : gridVal.x, y : gridVal.y },
onEndTransitionFn = function() {
++cntItemsAnim;
this.removeEventListener( 'transitionend', onEndTransitionFn );
// noinspection JSIncompatibleTypesComparison
if( cntItemsAnim === self.allItemsCount ) {
if( iter > 0 ) {
moveItems.call();
}
else {
// change transform-origin
self.currentItem.classList.add( 'photostack-flip' );
// all done..
self.isShuffling = false;
if( typeof self.options.callback === 'function' ) {
self.options.callback( self.currentItem );
}
}
}
};
if(self.items.indexOf(item) === self.current && self.started && iter === 0) {
self.currentItem.style.WebkitTransform = 'translate(' + self.centerItem.x + 'px,' + self.centerItem.y + 'px) rotate(0deg)';
self.currentItem.style.msTransform = 'translate(' + self.centerItem.x + 'px,' + self.centerItem.y + 'px) rotate(0deg)';
self.currentItem.style.transform = 'translate(' + self.centerItem.x + 'px,' + self.centerItem.y + 'px) rotate(0deg)';
// if there is something behind..
if( self.currentItem.querySelector( '.photostack-back' ) ) {
self._addItemPerspective();
}
self.currentItem.classList.add( 'photostack-current' );
}
else {
item.style.WebkitTransform = 'translate(' + translation.x + 'px,' + translation.y + 'px) rotate(' + Math.floor( Math.random() * (maxrot - minrot + 1) + minrot ) + 'deg)';
item.style.msTransform = 'translate(' + translation.x + 'px,' + translation.y + 'px) rotate(' + Math.floor( Math.random() * (maxrot - minrot + 1) + minrot ) + 'deg)';
item.style.transform = 'translate(' + translation.x + 'px,' + translation.y + 'px) rotate(' + Math.floor( Math.random() * (maxrot - minrot + 1) + minrot ) + 'deg)';
}
if( self.started ) {
item.addEventListener( 'transitionend', onEndTransitionFn );
}
} );
};
moveItems.call();
}
Photostack.prototype._getSizes = function() {
this.sizes = {
inner : { width : this.inner.offsetWidth, height : this.inner.offsetHeight },
item : { width : this.currentItem.offsetWidth, height : this.currentItem.offsetHeight }
};
// translation values to center an item
this.centerItem = { x : this.sizes.inner.width / 2 - this.sizes.item.width / 2, y : this.sizes.inner.height / 2 - this.sizes.item.height / 2 };
}
Photostack.prototype._isOverlapping = function( itemVal ) {
let dxArea = this.sizes.item.width + this.sizes.item.width / 3, // adding some extra avoids any rotated item to touch the central area
dyArea = this.sizes.item.height + this.sizes.item.height / 3,
areaVal = { x : this.sizes.inner.width / 2 - dxArea / 2, y : this.sizes.inner.height / 2 - dyArea / 2 },
dxItem = this.sizes.item.width,
dyItem = this.sizes.item.height;
if( !(( itemVal.x + dxItem ) < areaVal.x ||
itemVal.x > ( areaVal.x + dxArea ) ||
( itemVal.y + dyItem ) < areaVal.y ||
itemVal.y > ( areaVal.y + dyArea )) ) {
// how much to move so it does not overlap?
// move left / or move right
let left = Math.random() < 0.5,
randExtraX = Math.floor( Math.random() * (dxItem/4 + 1) ),
randExtraY = Math.floor( Math.random() * (dyItem/4 + 1) ),
noOverlapX = left ? (itemVal.x - areaVal.x + dxItem) * -1 - randExtraX : (areaVal.x + dxArea) - (itemVal.x + dxItem) + dxItem + randExtraX,
noOverlapY = left ? (itemVal.y - areaVal.y + dyItem) * -1 - randExtraY : (areaVal.y + dyArea) - (itemVal.y + dyItem) + dyItem + randExtraY;
return {
overlapping : true,
noOverlap : { x : noOverlapX, y : noOverlapY }
}
}
return {
overlapping : false
}
}
Photostack.prototype._addItemPerspective = function() {
this.el.classList.add( 'photostack-perspective' );
}
Photostack.prototype._removeItemPerspective = function() {
this.el.classList.remove( 'photostack-perspective' );
this.currentItem.classList.remove( 'photostack-flip' );
}
Photostack.prototype._rotateItem = function( callback ) {
if( this.el.classList.contains( 'photostack-perspective' ) && !this.isRotating && !this.isShuffling ) {
this.isRotating = true;
let self = this, onEndTransitionFn = function() {
this.removeEventListener( 'transitionend', onEndTransitionFn );
self.isRotating = false;
if( typeof callback === 'function' ) {
callback();
}
};
if( this.flipped ) {
this.navDots[ this.current ].classList.remove( 'flip' );
this.currentItem.style.WebkitTransform = 'translate(' + this.centerItem.x + 'px,' + this.centerItem.y + 'px) rotateY(0deg)';
this.currentItem.style.transform = 'translate(' + this.centerItem.x + 'px,' + this.centerItem.y + 'px) rotateY(0deg)';
}
else {
this.navDots[ this.current ].classList.add( 'flip' );
this.currentItem.style.WebkitTransform = 'translate(' + this.centerItem.x + 'px,' + this.centerItem.y + 'px) translate(' + this.sizes.item.width + 'px) rotateY(-179.9deg)';
this.currentItem.style.transform = 'translate(' + this.centerItem.x + 'px,' + this.centerItem.y + 'px) translate(' + this.sizes.item.width + 'px) rotateY(-179.9deg)';
}
this.flipped = !this.flipped;
this.currentItem.addEventListener( 'transitionend', onEndTransitionFn );
this.currentItem.addEventListener( 'transitionstart' , function handler(event) {
// Get the transition duration (in seconds)
const style = getComputedStyle(self.currentItem);
const duration = parseFloat(style.transitionDuration) * 1000; // Convert to ms
// Calculate halfway point
const halfway = duration / 2;
// Trigger callback at halfway point
setTimeout(() => {
if ( self.flipped ) {
self.currentItem.classList.add('photostack-flipped');
} else {
self.currentItem.classList.remove('photostack-flipped');
}
}, halfway);
// Remove the event listener to prevent multiple triggers
self.currentItem.removeEventListener('transitionstart', handler);
});
}
}
// add to global namespace
window.Photostack = Photostack;
}());

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,208 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_addons_blocksy; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
var external_AjaxSearchPro_default = /*#__PURE__*/__webpack_require__.n(external_AjaxSearchPro_namespaceObject);
;// ./node_modules/@wordpress/url/build-module/safe-decode-uri-component.js
function safeDecodeURIComponent(uriComponent) {
try {
return decodeURIComponent(uriComponent);
} catch (uriComponentError) {
return uriComponent;
}
}
;// ./node_modules/@wordpress/url/build-module/get-query-string.js
function getQueryString(url) {
let query;
try {
query = new URL(url, "http://example.com").search.substring(1);
} catch (error) {
}
if (query) {
return query;
}
}
;// ./node_modules/@wordpress/url/build-module/get-query-args.js
function setPath(object, path, value) {
const length = path.length;
const lastIndex = length - 1;
for (let i = 0; i < length; i++) {
let key = path[i];
if (!key && Array.isArray(object)) {
key = object.length.toString();
}
key = ["__proto__", "constructor", "prototype"].includes(key) ? key.toUpperCase() : key;
const isNextKeyArrayIndex = !isNaN(Number(path[i + 1]));
object[key] = i === lastIndex ? (
// If at end of path, assign the intended value.
value
) : (
// Otherwise, advance to the next object in the path, creating
// it if it does not yet exist.
object[key] || (isNextKeyArrayIndex ? [] : {})
);
if (Array.isArray(object[key]) && !isNextKeyArrayIndex) {
object[key] = {
...object[key]
};
}
object = object[key];
}
}
function getQueryArgs(url) {
return (getQueryString(url) || "").replace(/\+/g, "%20").split("&").reduce((accumulator, keyValue) => {
const [key, value = ""] = keyValue.split("=").filter(Boolean).map(safeDecodeURIComponent);
if (key) {
const segments = key.replace(/\]/g, "").split("[");
setPath(accumulator, segments, value);
}
return accumulator;
}, /* @__PURE__ */ Object.create(null));
}
;// ./node_modules/@wordpress/url/build-module/build-query-string.js
function buildQueryString(data) {
let string = "";
const stack = Object.entries(data);
let pair;
while (pair = stack.shift()) {
let [key, value] = pair;
const hasNestedData = Array.isArray(value) || value && value.constructor === Object;
if (hasNestedData) {
const valuePairs = Object.entries(value).reverse();
for (const [member, memberValue] of valuePairs) {
stack.unshift([`${key}[${member}]`, memberValue]);
}
} else if (value !== void 0) {
if (value === null) {
value = "";
}
string += "&" + [key, value].map(encodeURIComponent).join("=");
}
}
return string.substr(1);
}
;// ./node_modules/@wordpress/url/build-module/remove-query-args.js
function removeQueryArgs(url, ...args) {
const fragment = url.replace(/^[^#]*/, "");
url = url.replace(/#.*/, "");
const queryStringIndex = url.indexOf("?");
if (queryStringIndex === -1) {
return url + fragment;
}
const query = getQueryArgs(url);
const baseURL = url.substr(0, queryStringIndex);
args.forEach((arg) => delete query[arg]);
const queryString = buildQueryString(query);
const updatedUrl = queryString ? baseURL + "?" + queryString : baseURL;
return updatedUrl + fragment;
}
;// ./node_modules/@wordpress/url/build-module/get-fragment.js
function getFragment(url) {
const matches = /^\S+?(#[^\s\?]*)/.exec(url);
if (matches) {
return matches[1];
}
}
;// ./node_modules/@wordpress/url/build-module/add-query-args.js
function addQueryArgs(url = "", args) {
if (!args || !Object.keys(args).length) {
return url;
}
const fragment = getFragment(url) || "";
let baseUrl = url.replace(fragment, "");
const queryStringIndex = url.indexOf("?");
if (queryStringIndex !== -1) {
args = Object.assign(getQueryArgs(url), args);
baseUrl = baseUrl.substr(0, queryStringIndex);
}
return baseUrl + "?" + buildQueryString(args) + fragment;
}
;// ./src/client/addons/blocksy.ts
const helpers = (external_AjaxSearchPro_default()).helpers;
class BricksAddon {
name = "Elementor Widget Fixes";
init() {
const { Hooks } = helpers;
Hooks.addFilter("asp/live_load/url", this.addQueryIdToUrl.bind(this), 11, this);
}
addQueryIdToUrl(url, obj, selector, el) {
if (!el.classList.contains("wp-block-blocksy-query")) {
return url;
}
if (el.dataset.id === void 0) {
return url;
}
url = removeQueryArgs(url, "query-" + el.dataset.id);
return addQueryArgs(url, { "unique_id": el.dataset.id });
}
}
external_AjaxSearchPro_default().addons.add(new BricksAddon());
/* harmony default export */ var blocksy = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-addons-blocksy.js
/* harmony default export */ var asp_addons_blocksy = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,72 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_addons_bricks; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
var external_AjaxSearchPro_default = /*#__PURE__*/__webpack_require__.n(external_AjaxSearchPro_namespaceObject);
;// ./src/client/addons/bricks.ts
const helpers = (external_AjaxSearchPro_default()).helpers;
class BricksAddon {
name = "Elementor Widget Fixes";
init() {
const { Hooks } = helpers;
Hooks.addFilter("asp/live_load/finished", this.fixImages.bind(this), 11, this);
}
fixImages(url, obj) {
window?.bricksLazyLoad?.();
}
}
external_AjaxSearchPro_default().addons.add(new BricksAddon());
/* harmony default export */ var bricks = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-addons-bricks.js
/* harmony default export */ var asp_addons_bricks = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,73 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_addons_divi; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// ./src/client/addons/divi.js
const helpers = external_AjaxSearchPro_namespaceObject.helpers;
class DiviAddon {
name = "Divi Widget Fixes";
init() {
helpers.Hooks.addFilter("asp/init/etc", this.diviBodyCommerceResultsPage, 10, this);
helpers.Hooks.addFilter("asp/live_load/finished", this.diviBlogModuleTriggerInit.bind(this), 10, this);
}
diviBodyCommerceResultsPage($this) {
if ($this.o.divi.bodycommerce && $this.o.is_results_page) {
window.WPD.intervalUntilExecute(function($) {
setTimeout(function() {
$("#divi_filter_button").trigger("click");
}, 50);
}, function() {
return typeof jQuery !== "undefined" ? jQuery : false;
});
}
return $this;
}
diviBlogModuleTriggerInit(url, obj, selector, widget) {
if (jQuery !== void 0 && jQuery(widget).hasClass("et_pb_module")) {
jQuery(window).trigger("load");
}
}
}
external_AjaxSearchPro_namespaceObject.addons.add(new DiviAddon());
/* harmony default export */ var divi = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-addons-divi.js
/* harmony default export */ var asp_addons_divi = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,197 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_addons_elementor; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
var external_AjaxSearchPro_default = /*#__PURE__*/__webpack_require__.n(external_AjaxSearchPro_namespaceObject);
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
var external_DoMini_default = /*#__PURE__*/__webpack_require__.n(external_DoMini_namespaceObject);
;// ./src/client/addons/jetengine.ts
const helpers = (external_AjaxSearchPro_default()).helpers;
class JetEngineAddon {
name = "Elementor Widget Fixes";
init() {
const { Hooks } = helpers;
Hooks.addFilter("asp/live_load/finished", this.finished.bind(this), 10, this);
}
finished(url, obj, selector, widget) {
const $el = external_DoMini_default()(widget);
const $widget = $el.find(".jet-listing div[data-nav]");
if (!selector.includes("asp_es_") || $widget.length === 0) {
return;
}
const widgetEl = $widget.get(0);
if (widgetEl?.dataset?.nav === void 0 || widgetEl?.dataset?.nav === null) {
return;
}
const data = JSON.parse(widgetEl.dataset.nav);
if (data.query === void 0) {
data.query = {};
}
data.query.s = obj.n("text").val().trim();
data.query.asp_id = obj.o.id;
widgetEl.dataset.nav = JSON.stringify(data);
}
}
external_AjaxSearchPro_default().addons.add(new JetEngineAddon());
/* harmony default export */ var jetengine = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/addons/elementor.ts
const elementor_helpers = (external_AjaxSearchPro_default()).helpers;
class ElementorAddon {
name = "Elementor Widget Fixes";
init() {
const { Hooks } = elementor_helpers;
Hooks.addFilter("asp/init/etc", this.fixElementorPostPagination.bind(this), 10, this);
Hooks.addFilter("asp/live_load/start", this.start.bind(this), 10, this);
Hooks.addFilter("asp/live_load/finished", this.finished.bind(this), 10, this);
Hooks.addFilter("asp/live_load/finished", this.fixImages.bind(this), 11, this);
}
fixImages(url, obj) {
const $es = external_DoMini_default()(".asp_es_" + obj.o.id);
$es.find("img[nosrcset]").forEach((el) => {
external_DoMini_default()(el).attr("srcset", external_DoMini_default()(el).attr("nosrcset")).removeAttr("nosrcset");
});
}
start(url, obj, selector, widget) {
const searchSettingsSerialized = obj.n("searchsettings").find("form").serialize();
const textValue = obj.n("text").val().trim();
const isNewSearch = searchSettingsSerialized + textValue !== obj.lastSuccesfulSearch;
if (!isNewSearch && external_DoMini_default()(widget).find(".e-load-more-spinner").length > 0) {
external_DoMini_default()(widget).css("opacity", "1");
}
external_DoMini_default()(selector).removeClass("e-load-more-pagination-end");
}
finished(url, obj, selector, widget) {
const $el = external_DoMini_default()(widget);
if (selector.includes("asp_es_") && typeof elementorFrontend !== "undefined" && typeof elementorFrontend.init !== "undefined" && $el.find(".asp_elementor_nores").length === 0) {
const widgetType = $el.data("widget_type") || "";
if (widgetType !== "" && typeof jQuery !== "undefined") {
elementorFrontend.hooks.doAction("frontend/element_ready/" + widgetType, jQuery($el.get(0)));
}
this.fixElementorPostPagination(obj, url);
if (obj.o.scrollToResults.enabled) {
this.scrollToResultsIfNeeded($el);
}
obj.n("s").trigger("asp_elementor_results", [obj.o.id, obj.o.iid, $el.get(0)], true, true);
}
}
scrollToResultsIfNeeded($el) {
const $first = $el.find(".elementor-post, .product").first();
if ($first.length && !$first.isInViewport(40)) {
$first.get(0).scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" });
}
}
fixElementorPostPagination(obj, url) {
const $es = external_DoMini_default()(".asp_es_" + obj.o.id);
url = url || location.href;
if (!$es.length) {
return obj;
}
const urlObj = new URL(url);
if (!urlObj.searchParams.size) {
return obj;
}
this.elementorHideSpinner($es.get(0));
urlObj.searchParams.delete("asp_force_reset_pagination");
const $loadMoreAnchor = $es.find(".e-load-more-anchor");
const paginationLinks = $es.find(".elementor-pagination a, .elementor-widget-container .woocommerce-pagination a");
if ($loadMoreAnchor.length > 0 && !paginationLinks.length) {
const $widgetContainer = $es.find(".elementor-widget-container").get(0);
const fixAnchor = () => {
const pageData = $loadMoreAnchor.data("page");
const page = pageData ? parseInt(pageData, 10) + 1 : 2;
urlObj.searchParams.set("page", page.toString());
$loadMoreAnchor.data("next-page", urlObj.href);
$loadMoreAnchor.next(".elementor-button-wrapper").find("a").attr("href", urlObj.href);
};
if ($widgetContainer) {
const observer = new MutationObserver(() => {
fixAnchor();
console.log("Mutation observed: fixing anchor.");
});
observer.observe($widgetContainer, {
childList: true,
subtree: true
});
}
fixAnchor();
} else {
paginationLinks.each(function() {
const $link = external_DoMini_default()(this);
const href = $link.attr("href") || "";
const itemUrlObj = new URL(href, window.location.origin);
if (!itemUrlObj.searchParams.has("asp_ls")) {
urlObj.searchParams.forEach((value, key) => itemUrlObj.searchParams.set(key, value));
} else {
itemUrlObj.searchParams.delete("asp_force_reset_pagination");
}
$link.attr("href", itemUrlObj.href);
});
}
return obj;
}
elementorHideSpinner(widget) {
external_DoMini_default()(widget).removeClass("e-load-more-pagination-loading").find(".eicon-animation-spin").removeClass("eicon-animation-spin");
}
}
external_AjaxSearchPro_default().addons.add(new ElementorAddon());
/* harmony default export */ var elementor = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-addons-elementor.js
/* harmony default export */ var asp_addons_elementor = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,151 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_addons_woocommerce; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// ./src/client/addons/woocommerce.js
const helpers = external_AjaxSearchPro_namespaceObject.helpers;
class WooCommerceAddToCartAddon {
init() {
helpers.Hooks.addFilter("asp/search/end", this.finished.bind(this), 10, this);
}
finished($this) {
if (typeof wc_add_to_cart_params === "undefined" || typeof jQuery === "undefined") {
return;
}
this.requests = [];
this.addRequest = this.addRequest.bind(this);
this.run = this.run.bind(this);
this.$liveRegion = this.createLiveRegion();
jQuery($this.n("resdrg").get(0)).find(".add-to-cart-button:not(.wc-interactive)").off().on("click", { addToCartHandler: this }, this.onAddToCart);
}
/**
* Add add-to-cart event to the queue.
*/
addRequest(request) {
this.requests.push(request);
if (this.requests.length === 1) {
this.run();
}
}
/**
* Run add-to-cart events in sequence.
*/
run() {
const requestManager = this;
const originalCallback = requestManager.requests[0].complete;
requestManager.requests[0].complete = function() {
if (typeof originalCallback === "function") {
originalCallback();
}
requestManager.requests.shift();
if (requestManager.requests.length > 0) {
requestManager.run();
}
};
jQuery.ajax(this.requests[0]);
}
/**
* Handle the add to cart event.
*/
onAddToCart(e) {
const $thisbutton = jQuery(this);
if ($thisbutton.is(".ajax-add-to-cart")) {
if (!$thisbutton.attr("data-product_id")) {
return true;
}
e.data.addToCartHandler.$liveRegion.text("").removeAttr("aria-relevant");
e.preventDefault();
$thisbutton.removeClass("added");
$thisbutton.addClass("loading");
if (false === jQuery(document.body).triggerHandler("should_send_ajax_request.adding_to_cart", [$thisbutton])) {
jQuery(document.body).trigger("ajax_request_not_sent.adding_to_cart", [false, false, $thisbutton]);
return true;
}
const data = {};
jQuery.each($thisbutton.data(), function(key, value) {
data[key] = value;
});
jQuery.each($thisbutton[0].dataset, function(key, value) {
data[key] = value;
});
const $quantityButton = $thisbutton.closest(".add-to-cart-container").find(".add-to-cart-quantity");
if ($quantityButton.length > 0) {
data.quantity = $quantityButton.get(0).value;
}
jQuery(document.body).trigger("adding_to_cart", [$thisbutton, data]);
e.data.addToCartHandler.addRequest({
type: "POST",
url: wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%", "add_to_cart"),
data,
success: function(response) {
if (!response) {
return;
}
if (response.error && response.product_url) {
window.location = response.product_url;
return;
}
if (wc_add_to_cart_params.cart_redirect_after_add === "yes") {
window.location = wc_add_to_cart_params.cart_url;
return;
}
jQuery(document.body).trigger("added_to_cart", [response.fragments, response.cart_hash, $thisbutton]);
},
dataType: "json"
});
}
}
/**
* Add live region into the body element.
*/
createLiveRegion() {
const existingLiveRegion = jQuery(".widget_shopping_cart_live_region");
if (existingLiveRegion.length) {
return existingLiveRegion;
}
return jQuery('<div class="widget_shopping_cart_live_region screen-reader-text" role="status"></div>').appendTo("body");
}
}
external_AjaxSearchPro_namespaceObject.addons.add(new WooCommerceAddToCartAddon());
/* harmony default export */ var woocommerce = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-addons-woocommerce.js
/* harmony default export */ var asp_addons_woocommerce = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,175 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_autocomplete; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/actions/autocomplete.js
"use strict";
external_AjaxSearchPro_namespaceObject.plugin.autocompleteCheck = function(val = "") {
if (this.n("text").val() === "") {
this.n("textAutocomplete").val("");
return false;
}
let autocompleteVal = this.n("textAutocomplete").val();
return !(autocompleteVal !== "" && autocompleteVal.indexOf(val) === 0);
};
external_AjaxSearchPro_namespaceObject.plugin.autocomplete = function() {
let $this = this, val = $this.n("text").val();
if (!$this.autocompleteCheck(val)) {
return;
}
if ($this.n("text").val().length >= $this.o.autocomplete.trigger_charcount) {
let data = {
action: "ajaxsearchpro_autocomplete",
asid: $this.o.id,
sauto: $this.n("text").val(),
asp_inst_id: $this.o.rid,
options: external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize()
};
$this.postAuto = external_DoMini_namespaceObject.fn.ajax({
"url": ASP.ajaxurl,
"method": "POST",
"data": data,
"success": function(response) {
if (response.length > 0) {
response = external_DoMini_namespaceObject("<textarea />").html(response).text();
response = response.replace(/^\s*[\r\n]/gm, "");
response = val + response.substring(val.length);
}
$this.n("textAutocomplete").val(response);
$this.fixAutocompleteScrollLeft();
}
});
}
};
external_AjaxSearchPro_namespaceObject.plugin.autocompleteGoogleOnly = function() {
let $this = this, val = $this.n("text").val();
if (!$this.autocompleteCheck(val)) {
return;
}
let lang = $this.o.autocomplete.lang;
["wpml_lang", "polylang_lang", "qtranslate_lang"].forEach(function(v) {
if (external_DoMini_namespaceObject('input[name="' + v + '"]', $this.n("searchsettings")).length > 0 && external_DoMini_namespaceObject('input[name="' + v + '"]', $this.n("searchsettings")).val().length > 1) {
lang = external_DoMini_namespaceObject('input[name="' + v + '"]', $this.n("searchsettings")).val();
}
});
if ($this.n("text").val().length >= $this.o.autocomplete.trigger_charcount) {
external_DoMini_namespaceObject.fn.ajax({
url: "https://clients1.google.com/complete/search",
cors: "no-cors",
data: {
q: val,
hl: lang,
nolabels: "t",
client: "hp",
ds: ""
},
success: function(data) {
if (data[1].length > 0) {
let response = data[1][0][0].replace(/(<([^>]+)>)/ig, "");
response = external_DoMini_namespaceObject("<textarea />").html(response).text();
response = response.substring(val.length);
$this.n("textAutocomplete").val(val + response);
$this.fixAutocompleteScrollLeft();
}
}
});
}
};
external_AjaxSearchPro_namespaceObject.plugin.fixAutocompleteScrollLeft = function() {
this.n("textAutocomplete").get(0).scrollLeft = this.n("text").get(0).scrollLeft;
};
/* harmony default export */ var autocomplete = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/plugin/core/events/autocomplete.js
"use strict";
let helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.initAutocompleteEvent = function() {
let $this = this, tt;
if ($this.o.autocomplete.enabled && !helpers.isMobile() || $this.o.autocomplete.mobile && helpers.isMobile()) {
$this.n("text").on("keydown", function(e) {
const keyCode = e.keyCode || e.which;
if (keyCode === 9 && $this.n("textAutocomplete").val() !== "" && $this.n("textAutocomplete").val() !== external_DoMini_namespaceObject(this).val()) {
e.preventDefault();
}
});
$this.n("text").on("keyup", function(e) {
$this.keycode = e.keyCode || e.which;
$this.ktype = e.type;
let thekey = 39;
if (external_DoMini_namespaceObject("body").hasClass("rtl")) {
thekey = 37;
}
if (($this.keycode === thekey || $this.keycode === 9) && $this.n("textAutocomplete").val() !== "") {
e.preventDefault();
$this.n("text").val($this.n("textAutocomplete").val());
if ($this.o.trigger.type) {
$this.searchAbort();
$this.search();
}
} else {
clearTimeout(tt);
if ($this.postAuto != null) $this.postAuto.abort();
if ($this.o.autocomplete.googleOnly) {
$this.autocompleteGoogleOnly();
} else {
tt = setTimeout(function() {
$this.autocomplete();
tt = null;
}, $this.o.trigger.autocomplete_delay);
}
}
});
$this.n("text").on("keyup mouseup input blur select", function() {
$this.fixAutocompleteScrollLeft();
});
}
};
/* harmony default export */ var events_autocomplete = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-autocomplete.js
/* harmony default export */ var asp_autocomplete = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,280 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_compact; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/init/compact.js
"use strict";
external_AjaxSearchPro_namespaceObject.plugin.initCompact = function() {
let $this = this;
if ($this.o.compact.enabled && $this.o.compact.position !== "fixed") {
$this.o.compact.overlay = 0;
}
if ($this.o.compact.enabled) {
$this.n("trythis").css({
display: "none"
});
}
if ($this.o.compact.enabled && $this.o.compact.position === "fixed") {
window.WPD.intervalUntilExecute(function() {
let $body = external_DoMini_namespaceObject("body");
$this.nodes["container"] = $this.n("search").closest(".asp_w_container");
$body.append($this.n("search").detach());
$body.append($this.n("trythis").detach());
$this.n("search").css({
top: $this.n("search").position().top + "px"
});
}, function() {
return $this.n("search").css("position") === "fixed";
});
}
};
/* harmony default export */ var compact = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/global/utils/device.ts
const deviceType = () => {
let w = window.innerWidth;
if (w <= 640) {
return "phone";
} else if (w <= 1024) {
return "tablet";
} else {
return "desktop";
}
};
const detectIOS = () => {
if (typeof window.navigator != "undefined" && typeof window.navigator.userAgent != "undefined")
return window.navigator.userAgent.match(/(iPod|iPhone|iPad)/) != null;
return false;
};
const isMobile = () => {
try {
document.createEvent("TouchEvent");
return true;
} catch (e) {
return false;
}
};
const isTouchDevice = () => {
return "ontouchstart" in window;
};
;// ./src/client/utils/browser.ts
const isFirefox = navigator.userAgent.toLowerCase().includes("firefox");
const ua = navigator.userAgent;
const isWebKit = /AppleWebKit/.test(ua) && !/Edge/.test(ua);
let fakeInput;
const focusInput = (targetInput) => {
if (!detectIOS()) {
targetInput?.focus();
return;
}
if (targetInput === void 0 || fakeInput === void 0) {
fakeInput = document.createElement("input");
fakeInput.setAttribute("type", "text");
fakeInput.style.position = "absolute";
fakeInput.style.opacity = "0";
fakeInput.style.height = "0";
fakeInput.style.fontSize = "16px";
document.body.prepend(fakeInput);
}
if (targetInput === void 0) {
fakeInput.focus();
} else {
targetInput.focus();
}
};
;// ./src/client/plugin/core/actions/compact.js
"use strict";
let helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.openCompact = function() {
let $this = this;
if (!$this.n("search").is("[data-asp-compact-w]")) {
$this.n("probox").attr("data-asp-compact-w", $this.n("probox").innerWidth());
$this.n("search").attr("data-asp-compact-w", $this.n("search").innerWidth());
}
$this.n("search").css({
"width": $this.n("search").width() + "px"
});
$this.n("probox").css({ width: "auto" });
setTimeout(function() {
$this.n("search").find(".probox>div:not(.promagnifier)").removeClass("hiddend");
}, 80);
clearTimeout($this.timeouts.compactBeforeOpen);
$this.timeouts.compactBeforeOpen = setTimeout(function() {
let width;
if (helpers.deviceType() === "phone") {
width = $this.o.compact.width_phone;
} else if (helpers.deviceType() === "tablet") {
width = $this.o.compact.width_tablet;
} else {
width = $this.o.compact.width;
}
width = helpers.Hooks.applyFilters("asp_compact_width", width, $this.o.id, $this.o.iid);
width = !isNaN(width) ? width + "px" : width;
if ($this.o.compact.position !== "static") {
$this.n("search").css({
"max-width": width,
"width": width
});
} else {
$this.n("container").css({
"max-width": width,
"width": width
});
$this.n("search").css({
"max-width": "100%",
"width": "100%"
});
}
if ($this.o.compact.overlay) {
$this.n("search").css("z-index", 999999);
$this.n("searchsettings").css("z-index", 999999);
$this.n("resultsDiv").css("z-index", 999999);
$this.n("trythis").css("z-index", 999998);
external_DoMini_namespaceObject("#asp_absolute_overlay").css({
"opacity": 1,
"width": "100%",
"height": "100%",
"z-index": 999990
});
}
$this.n("search").attr("data-asp-compact", "open");
}, 50);
if ($this.o.compact.focus) {
focusInput();
}
clearTimeout($this.timeouts.compactAfterOpen);
$this.timeouts.compactAfterOpen = setTimeout(function() {
$this.resize();
$this.n("trythis").css({
display: "block"
});
if ($this.o.compact.enabled && $this.o.compact.position !== "static") {
$this.n("trythis").css({
top: $this.n("search").offset().top + $this.n("search").outerHeight(true) + "px",
left: $this.n("search").offset().left + "px"
});
}
if ($this.o.compact.focus) {
focusInput($this.n("text").get(0));
}
$this.n("text").trigger("focus");
$this.scrolling();
}, 500);
};
external_AjaxSearchPro_namespaceObject.plugin.closeCompact = function() {
let $this = this;
clearTimeout($this.timeouts.compactBeforeOpen);
clearTimeout($this.timeouts.compactAfterOpen);
$this.timeouts.compactBeforeOpen = setTimeout(function() {
$this.n("search").attr("data-asp-compact", "closed");
}, 50);
$this.n("search").find(".probox>div:not(.promagnifier)").addClass("hiddend");
if ($this.o.compact.position !== "static") {
$this.n("search").css({ width: "auto" });
} else {
$this.n("container").css({ width: "auto" });
$this.n("search").css({
"max-width": "unset",
"width": "auto"
});
}
$this.n("probox").css({ width: $this.n("probox").attr("data-asp-compact-w") + "px" });
$this.n("trythis").css({
left: $this.n("search").position().left,
display: "none"
});
if ($this.o.compact.overlay) {
$this.n("search").css("z-index", "");
$this.n("searchsettings").css("z-index", "");
$this.n("resultsDiv").css("z-index", "");
$this.n("trythis").css("z-index", "");
external_DoMini_namespaceObject("#asp_absolute_overlay").css({
"opacity": 0,
"width": 0,
"height": 0,
"z-index": 0
});
}
};
/* harmony default export */ var actions_compact = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/plugin/core/events/compact.js
"use strict";
external_AjaxSearchPro_namespaceObject.plugin.initCompactEvents = function() {
let $this = this, scrollTopx = 0;
$this.n("promagnifier").on("click", function() {
let compact = $this.n("search").attr("data-asp-compact") || "closed";
scrollTopx = window.scrollY;
$this.hideSettings?.();
$this.hideResults();
if (compact === "closed") {
$this.openCompact();
$this.n("text").trigger("focus");
} else {
if (!$this.o.compact.closeOnMagnifier) return;
$this.closeCompact();
$this.searchAbort();
$this.n("proloading").css("display", "none");
}
});
};
/* harmony default export */ var events_compact = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-compact.js
/* harmony default export */ var asp_compact = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,122 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_ga; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/actions/ga_events.js
"use strict";
external_AjaxSearchPro_namespaceObject.plugin.gaEvent = function(which, data) {
let $this = this;
let tracking_id = $this.gaGetTrackingID();
if (typeof ASP.analytics == "undefined" || ASP.analytics.method !== "event")
return false;
let _gtag = typeof window.gtag === "function" ? window.gtag : false;
if (_gtag === false && typeof window.dataLayer === "undefined")
return false;
if (typeof ASP.analytics.event[which] !== "undefined" && ASP.analytics.event[which].active) {
let def_data = {
"search_id": $this.o.id,
"search_name": $this.n("search").data("name"),
"phrase": $this.n("text").val(),
"option_name": "",
"option_value": "",
"result_title": "",
"result_url": "",
"results_count": ""
};
let event = {
"event_category": ASP.analytics.event[which].category,
"event_label": ASP.analytics.event[which].label,
"value": ASP.analytics.event[which].value
};
data = external_DoMini_namespaceObject.fn.extend(def_data, data);
Object.keys(data).forEach(function(k) {
let v = data[k];
v = String(v).replace(/[\s\n\r]+/g, " ").trim();
Object.keys(event).forEach(function(kk) {
let regex = new RegExp("{" + k + "}", "gmi");
event[kk] = event[kk].replace(regex, v);
});
});
if (_gtag !== false) {
if (tracking_id !== false) {
tracking_id.forEach(function(id) {
event.send_to = id;
_gtag("event", ASP.analytics.event[which].action, event);
});
} else {
_gtag("event", ASP.analytics.event[which].action, event);
}
} else if (typeof window.dataLayer.push != "undefined") {
window.dataLayer.push({
"event": "asp_event",
"event_name": ASP.analytics.event[which].action,
"event_category": event.event_category,
"event_label": event.event_label,
"event_value": event.value
});
}
}
};
external_AjaxSearchPro_namespaceObject.plugin.gaGetTrackingID = function() {
let ret = false;
if (typeof ASP.analytics == "undefined")
return ret;
if (typeof ASP.analytics.tracking_id != "undefined" && ASP.analytics.tracking_id !== "") {
return [ASP.analytics.tracking_id];
} else {
let _gtag = typeof window.gtag == "function" ? window.gtag : false;
if (_gtag === false && typeof window.ga != "undefined" && typeof window.ga.getAll != "undefined") {
let id = [];
window.ga.getAll().forEach(function(tracker) {
id.push(tracker.get("trackingId"));
});
return id.length > 0 ? id : false;
}
}
return ret;
};
/* harmony default export */ var ga_events = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-ga.js
/* harmony default export */ var asp_ga = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,292 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_live; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/actions/live.js
"use strict";
let helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.liveLoad = function(origSelector, url, updateLocation, forceAjax, cache) {
let selector = origSelector;
if (selector === "body" || selector === "html") {
console.log("Ajax Search Pro: Do not use html or body as the live loader selector.");
return false;
}
let $this = this;
if (ASP.pageHTML !== "") {
$this.setLiveLoadCache(ASP.pageHTML, origSelector);
}
function process(html) {
let data = helpers.Hooks.applyFilters("asp/live_load/raw_data", html, $this);
let parser = new DOMParser();
let dataNode = parser.parseFromString(data, "text/html");
let $dataNode = external_DoMini_namespaceObject(dataNode);
if ($this.o.statistics) {
$this.stat_addKeyword($this.o.id, $this.n("text").val());
}
if (data !== "" && $dataNode.length > 0 && $dataNode.find(selector).length > 0) {
data = data.replace(/&asp_force_reset_pagination=1/gmi, "");
data = data.replace(/%26asp_force_reset_pagination%3D1/gmi, "");
data = data.replace(/&#038;asp_force_reset_pagination=1/gmi, "");
if (helpers.isSafari()) {
data = data.replace(/srcset/gmi, "nosrcset");
}
data = helpers.Hooks.applyFilters("asp_live_load_html", data, $this.o.id, $this.o.iid);
$dataNode = external_DoMini_namespaceObject(parser.parseFromString(data, "text/html"));
let replacementNode = $dataNode.find(selector).get(0);
replacementNode = helpers.Hooks.applyFilters("asp/live_load/replacement_node", replacementNode, $this, $el.get(0), data);
if (replacementNode != null) {
$el.get(0).parentNode.replaceChild(replacementNode, $el.get(0));
}
$el = external_DoMini_namespaceObject(selector).first();
if (updateLocation) {
document.title = dataNode.title;
history.pushState({}, null, url);
}
external_DoMini_namespaceObject(selector).first().find(".woocommerce-ordering select.orderby").on("change", function() {
if (external_DoMini_namespaceObject(this).closest("form").length > 0) {
external_DoMini_namespaceObject(this).closest("form").get(0).submit();
}
});
if ($this.o.highlight) {
$el.highlight(
$this.n("text").val().replace(/["']/g, "").split(" "),
{ element: "span", className: "asp_single_highlighted_" + $this.o.id, wordsOnly: !!$this.o.highlightWholewords }
);
}
$this.addHighlightString(external_DoMini_namespaceObject(selector).find("a"));
helpers.Hooks.applyFilters("asp/live_load/finished", url, $this, selector, $el.get(0));
ASP.initialize();
$this.lastSuccesfulSearch = external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() + $this.n("text").val().trim();
$this.lastSearchData = data;
$this.setLiveLoadCache(html, origSelector);
}
$this.n("s").trigger("asp_search_end", [$this.o.id, $this.o.iid, $this.n("text").val(), data], true, true);
$this.gaEvent?.("search_end", { "results_count": "unknown" });
$this.hideLoader();
$el.css("opacity", 1);
$this.searching = false;
if ($this.n("text").val() !== "") {
$this.n("proclose").css({
display: "block"
});
}
}
updateLocation = typeof updateLocation == "undefined" ? true : updateLocation;
forceAjax = typeof forceAjax == "undefined" ? true : forceAjax;
let altSel = $this.getLiveLoadAltSelectors();
if (selector !== "#main")
altSel.unshift("#main");
if (external_DoMini_namespaceObject(selector).length < 1) {
for (const s of altSel) {
if (external_DoMini_namespaceObject(s).length > 0) {
selector = s;
break;
}
}
if (external_DoMini_namespaceObject(selector).length < 1) {
console.log("Ajax Search Pro: The live search selector does not exist on the page.");
return false;
}
}
selector = helpers.Hooks.applyFilters("asp/live_load/selector", selector, this);
let $el = external_DoMini_namespaceObject(selector).first();
$this.searchAbort();
$el.css("opacity", 0.4);
url = helpers.Hooks.applyFilters("asp/live_load/url", url, $this, selector, $el.get(0));
helpers.Hooks.applyFilters("asp/live_load/start", url, $this, selector, $el.get(0));
if (!forceAjax && $this.n("searchsettings").find("input[name=filters_initial]").val() === "1" && $this.n("text").val() === "") {
window.WPD.intervalUntilExecute(function() {
process(ASP.pageHTML);
}, function() {
return ASP.pageHTML !== "";
});
} else {
if (typeof cache != "undefined") {
process(cache.html);
} else {
$this.searching = true;
$this.post = external_DoMini_namespaceObject.fn.ajax({
url,
method: "GET",
success: function(data) {
process(data);
$this.isAutoP = false;
},
dataType: "html",
fail: function(jqXHR) {
$el.css("opacity", 1);
if (jqXHR.aborted) {
return;
}
$el.html("This request has failed. Please check your connection.");
$this.hideLoader();
$this.searching = false;
$this.n("proclose").css({
display: "block"
});
$this.isAutoP = false;
}
});
}
}
};
external_AjaxSearchPro_namespaceObject.plugin.getLiveLoadAltSelectors = function() {
return [
".search-content",
"#content #posts-container",
"#content",
"#Content",
"div[role=main]",
"main[role=main]",
"div.theme-content",
"div.td-ss-main-content",
"main#page-content",
"main.l-content",
"#primary",
"#main-content",
".main-content",
".search section .bde-post-loop",
// breakdance posts loop section search archive
".archive section .bde-post-loop",
// breakdance posts loop section general archive
".search section .bde-post-list",
// breakdance posts list section search archive
".archive section .bde-post-list",
// breakdance posts list section general archive
"main .wp-block-query",
// block themes
"main"
// fallback
];
};
external_AjaxSearchPro_namespaceObject.plugin.usingLiveLoader = function() {
const $this = this;
if ($this._usingLiveLoader !== void 0) return $this._usingLiveLoader;
const o = $this.o;
const idClass = "asp_es_" + o.id;
const altSelectors = this.getLiveLoadAltSelectors().join(",");
if (document.getElementsByClassName(idClass).length) {
return $this._usingLiveLoader = true;
}
const options = ["resPage", "wooShop", "cptArchive", "taxArchive"];
$this._usingLiveLoader = options.some((key) => {
const opt = o[key];
return opt.useAjax && (document.querySelector(opt.selector) || altSelectors && document.querySelector(altSelectors));
});
return $this._usingLiveLoader;
};
external_AjaxSearchPro_namespaceObject.plugin.getLiveURLbyBaseLocation = function(location) {
let $this = this, url = "asp_ls=" + helpers.nicePhrase($this.n("text").val()), start = "&";
if (location.indexOf("?") === -1) {
start = "?";
}
let final = location + start + url + "&asp_active=1&asp_force_reset_pagination=1&p_asid=" + $this.o.id + "&p_asp_data=1&" + external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize();
final = final.replace("?&", "?");
final = final.replace("&&", "&");
return final;
};
external_AjaxSearchPro_namespaceObject.plugin.getCurrentLiveURL = function() {
const $this = this;
const url = new URL(window.location.href);
let location;
url.hash = "";
location = url.href;
location = location.replace(/([?&])query-\w+-page=\d+/, "$1");
location = location.indexOf("asp_ls=") > -1 ? location.slice(0, location.indexOf("asp_ls=")) : location;
location = location.indexOf("asp_ls&") > -1 ? location.slice(0, location.indexOf("asp_ls&")) : location;
location = location.indexOf("p_asid=") > -1 ? location.slice(0, location.indexOf("p_asid=")) : location;
location = location.indexOf("asp_") > -1 ? location.slice(0, location.indexOf("asp_")) : location;
return $this.getLiveURLbyBaseLocation(location);
};
external_AjaxSearchPro_namespaceObject.plugin.initLiveLoaderPopState = function() {
let $this = this;
$this.liveLoadCache = [];
window.addEventListener("popstate", () => {
let data = $this.getLiveLoadCache();
if (data !== false) {
$this.n("text").val(data.phrase);
helpers.formData(external_DoMini_namespaceObject("form", $this.n("searchsettings")), data.settings);
$this.resetNoUISliderFilters();
$this.liveLoad(data.selector, document.location.href, false, false, data);
}
});
if (ASP.pageHTML === "") {
if (typeof ASP._ajax_page_html === "undefined") {
ASP._ajax_page_html = true;
external_DoMini_namespaceObject.fn.ajax({
url: $this.currentPageURL,
method: "GET",
success: function(data) {
ASP.pageHTML = data;
},
dataType: "html"
});
}
}
};
external_AjaxSearchPro_namespaceObject.plugin.setLiveLoadCache = function(html, selector) {
let $this = this;
if ($this.liveLoadCache.filter((item) => {
return item.href === document.location.href;
}).length === 0) {
$this.liveLoadCache.push({
"href": html === ASP.pageHTML ? $this.currentPageURL : document.location.href,
"phrase": html === ASP.pageHTML ? "" : $this.n("text").val(),
"selector": selector,
"html": html,
"settings": html === ASP.pageHTML ? $this.originalFormData : helpers.formData(external_DoMini_namespaceObject("form", $this.n("searchsettings")))
});
}
};
external_AjaxSearchPro_namespaceObject.plugin.getLiveLoadCache = function() {
let $this = this;
let res = $this.liveLoadCache.filter((item) => {
return item.href === document.location.href;
});
return res.length > 0 ? res[0] : false;
};
/* harmony default export */ var live = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-live.js
/* harmony default export */ var asp_live = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,853 @@
/******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 993:
/***/ (function(module, exports) {
!function(e, t) {
"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("DoMini", [], t) : "object" == typeof exports ? exports.DoMini = t() : e.DoMini = t();
}(window, () => (() => {
"use strict";
var e = { d: (t2, n2) => {
for (var i2 in n2) e.o(n2, i2) && !e.o(t2, i2) && Object.defineProperty(t2, i2, { enumerable: true, get: n2[i2] });
}, o: (e2, t2) => Object.prototype.hasOwnProperty.call(e2, t2) }, t = {};
let n;
e.d(t, { default: () => r }), void 0 === window.DoMini ? (n = function(e2, t2) {
return void 0 !== arguments[2] ? this.constructor.call(this, e2, t2) : 1 !== arguments.length || "function" != typeof arguments[0] ? new n(e2, t2, true) : void ("complete" === document.readyState || "loaded" === document.readyState || "interactive" === document.readyState ? arguments[0].apply(this, [n]) : window.addEventListener("DOMContentLoaded", () => {
arguments[0].apply(this, [n]);
}));
}, n.prototype = n.fn = { constructor: function(e2, t2) {
if (this.length = 0, void 0 !== t2) {
if (t2 instanceof n) return t2.find(e2);
if (this.isValidNode(t2) || "string" == typeof t2) return n(t2).find(e2);
} else if ("string" == typeof e2 && "" !== e2) this.push(...this._(e2));
else {
if (e2 instanceof n) return e2;
this.isValidNode(e2) && this.push(e2);
}
return this;
}, _: function(e2) {
return "<" === e2.charAt(0) ? n._fn.createElementsFromHTML(e2) : [...document.querySelectorAll(e2)];
}, isValidNode: (e2) => e2 instanceof Element || e2 instanceof Document || e2 instanceof Window, push: Array.prototype.push, pop: Array.prototype.pop, sort: Array.prototype.sort, splice: Array.prototype.splice }, n.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator], n._fn = {}, n.version = "0.2.8") : n = window.DoMini;
const i = n;
i.fn.get = function(e2) {
return void 0 === e2 ? Array.from(this) : this[e2];
}, i.fn.extend = function() {
for (let e2 = 1; e2 < arguments.length; e2++) for (let t2 in arguments[e2]) arguments[e2].hasOwnProperty(t2) && (arguments[0][t2] = arguments[e2][t2]);
return arguments[0];
}, i.fn.forEach = function(e2) {
return this.get().forEach(function(t2, n2, i2) {
e2.apply(t2, [t2, n2, i2]);
}), this;
}, i.fn.each = function(e2) {
return this.get().forEach(function(t2, n2, i2) {
e2.apply(t2, [n2, t2, i2]);
}), this;
}, i.fn.css = function(e2, t2) {
for (const n2 of this) if (1 === arguments.length) {
if ("object" != typeof e2) return window.getComputedStyle(n2)[e2];
Object.keys(e2).forEach(function(t3) {
n2.style[t3] = e2[t3];
});
} else n2.style[e2] = t2;
return this;
}, i.fn.hasClass = function(e2) {
let t2 = this.get(0);
return null != t2 && t2.classList.contains(e2);
}, i.fn.addClass = function(e2) {
let t2 = e2;
return "string" == typeof e2 && (t2 = e2.split(" ")), t2 = t2.filter(function(e3) {
return "" !== e3.trim();
}), t2.length > 0 && this.forEach(function(e3) {
e3.classList.add.apply(e3.classList, t2);
}), this;
}, i.fn.removeClass = function(e2) {
if (void 0 !== e2) {
let t2 = e2;
"string" == typeof e2 && (t2 = e2.split(" ")), t2 = t2.filter(function(e3) {
return "" !== e3.trim();
}), t2.length > 0 && this.forEach(function(e3) {
e3.classList.remove.apply(e3.classList, t2);
});
} else this.forEach(function(e3) {
e3.classList.length > 0 && e3.classList.remove.apply(e3.classList, e3.classList);
});
return this;
}, i.fn.isVisible = function() {
let e2, t2 = this.get(0), n2 = true;
for (; null !== t2; ) {
if (e2 = window.getComputedStyle(t2), "none" === e2.display || "hidden" === e2.visibility || 0 === parseInt(e2.opacity)) {
n2 = false;
break;
}
t2 = t2.parentElement;
}
return n2;
}, i.fn.val = function(e2) {
let t2;
if (1 === arguments.length) {
for (const t3 of this) if ("select-multiple" === t3.type) {
e2 = "string" == typeof e2 ? e2.split(",") : e2;
for (let n2, i2 = 0, o2 = t3.options.length; i2 < o2; i2++) n2 = t3.options[i2], n2.selected = -1 !== e2.indexOf(n2.value);
} else t3.value = e2;
t2 = this;
} else {
let e3 = this.get(0);
null != e3 && (t2 = "select-multiple" === e3.type ? Array.prototype.map.call(e3.selectedOptions, function(e4) {
return e4.value;
}) : e3.value);
}
return t2;
}, i.fn.attr = function(e2, t2) {
let n2;
for (const i2 of this) if (2 === arguments.length) i2.setAttribute(e2, t2), n2 = this;
else {
if ("object" != typeof e2) {
n2 = i2.getAttribute(e2);
break;
}
Object.keys(e2).forEach(function(t3) {
i2.setAttribute(t3, e2[t3]);
});
}
return n2;
}, i.fn.removeAttr = function(e2) {
for (const t2 of this) t2.removeAttribute(e2);
return this;
}, i.fn.prop = function(e2, t2) {
let n2;
for (const i2 of this) {
if (2 !== arguments.length) {
n2 = void 0 !== i2[e2] ? i2[e2] : null;
break;
}
i2[e2] = t2;
}
return 2 === arguments.length ? this : n2;
}, i.fn.data = function(e2, t2) {
const n2 = e2.replace(/-([a-z])/g, function(e3) {
return e3[1].toUpperCase();
});
if (2 === arguments.length) {
for (const e3 of this) null != e3 && (e3.dataset[n2] = t2);
return this;
}
{
let e3 = this.get(0);
return null != e3 && void 0 !== e3.dataset[n2] ? e3.dataset[n2] : "";
}
}, i.fn.html = function(e2) {
if (1 === arguments.length) {
for (const t2 of this) t2.innerHTML = e2;
return this;
}
{
let e3 = this.get(0);
return null == e3 ? "" : e3.innerHTML;
}
}, i.fn.text = function(e2) {
if (1 === arguments.length) {
for (const t2 of this) t2.textContent = e2;
return this;
}
{
let e3 = this.get(0);
return null == e3 ? "" : e3.textContent;
}
}, i.fn.position = function() {
let e2 = this.get(0);
return null != e2 ? { top: e2.offsetTop, left: e2.offsetLeft } : { top: 0, left: 0 };
}, i.fn.offset = function() {
let e2 = this.get(0);
return null != e2 ? i._fn.hasFixedParent(e2) ? e2.getBoundingClientRect() : i._fn.absolutePosition(e2) : { top: 0, left: 0 };
}, i.fn.outerWidth = function(e2) {
e2 = e2 || false;
let t2 = this.get(0);
return null != t2 ? e2 ? parseInt(t2.offsetWidth) + parseInt(this.css("marginLeft")) + parseInt(this.css("marginRight")) : parseInt(t2.offsetWidth) : 0;
}, i.fn.outerHeight = function(e2) {
e2 = e2 || false;
let t2 = this.get(0);
return null != t2 ? e2 ? parseInt(t2.offsetHeight) + parseInt(this.css("marginTop")) + parseInt(this.css("marginBottom")) : parseInt(t2.offsetHeight) : 0;
}, i.fn.noPaddingHeight = function(e2) {
return e2 = e2 || false, this.length > 0 ? e2 ? parseInt(this.css("height")) + parseInt(this.css("marginTop")) + parseInt(this.css("marginBottom")) : parseInt(this.css("height")) : 0;
}, i.fn.noPaddingWidth = function(e2) {
return e2 = e2 || false, this.length > 0 ? e2 ? parseInt(this.css("width")) + parseInt(this.css("marginLeft")) + parseInt(this.css("marginRight")) : parseInt(this.css("width")) : 0;
}, i.fn.innerWidth = function() {
let e2 = this.get(0);
if (null != e2) {
let t2 = window.getComputedStyle(e2);
return this.outerWidth() - parseFloat(t2.borderLeftWidth) - parseFloat(t2.borderRightWidth);
}
return 0;
}, i.fn.innerHeight = function() {
let e2 = this.get(0);
if (null != e2) {
let t2 = window.getComputedStyle(e2);
return this.outerHeight() - parseFloat(t2.borderTopWidth) - parseFloat(t2.borderBottomtWidth);
}
return 0;
}, i.fn.width = function() {
return this.outerWidth();
}, i.fn.height = function() {
return this.outerHeight();
}, i.fn.on = function() {
let e2 = arguments, t2 = function(e3, t3) {
let n3;
if ("mouseenter" === t3.type || "mouseleave" === t3.type || "mouseover" === t3.type) {
let o2 = document.elementFromPoint(t3.clientX, t3.clientY);
if (!o2.matches(e3[1])) for (; (o2 = o2.parentElement) && !o2.matches(e3[1]); ) ;
null != o2 && (n3 = i(o2));
} else n3 = i(t3.target).closest(e3[1]);
if (null != n3 && n3.closest(this).length > 0) {
let i2 = [];
if (i2.push(t3), void 0 !== e3[4]) for (let t4 = 4; t4 < e3.length; t4++) i2.push(e3[t4]);
e3[2].apply(n3.get(0), i2);
}
}, n2 = e2[0].split(" ");
for (let o2 = 0; o2 < n2.length; o2++) {
let r2 = n2[o2];
if ("string" == typeof e2[1]) this.forEach(function(n3) {
if (!i._fn.hasEventListener(n3, r2, e2[2])) {
let i2 = t2.bind(n3, e2);
n3.addEventListener(r2, i2, e2[3]), n3._domini_events = void 0 === n3._domini_events ? [] : n3._domini_events, n3._domini_events.push({ type: r2, selector: e2[1], func: i2, trigger: e2[2], args: e2[3] });
}
});
else for (let t3 = 0; t3 < n2.length; t3++) {
let o3 = n2[t3];
this.forEach(function(t4) {
i._fn.hasEventListener(t4, o3, e2[1]) || (t4.addEventListener(o3, e2[1], e2[2]), t4._domini_events = void 0 === t4._domini_events ? [] : t4._domini_events, t4._domini_events.push({ type: o3, func: e2[1], trigger: e2[1], args: e2[2] }));
});
}
}
return this;
}, i.fn.off = function(e2, t2) {
return this.forEach(function(n2) {
if (void 0 !== n2._domini_events && n2._domini_events.length > 0) if (void 0 === e2) {
let e3;
for (; e3 = n2._domini_events.pop(); ) n2.removeEventListener(e3.type, e3.func, e3.args);
n2._domini_events = [];
} else e2.split(" ").forEach(function(e3) {
let i2, o2 = [];
for (; i2 = n2._domini_events.pop(); ) i2.type !== e3 || void 0 !== t2 && i2.trigger !== t2 ? o2.push(i2) : n2.removeEventListener(e3, i2.func, i2.args);
n2._domini_events = o2;
});
}), this;
}, i.fn.offForced = function() {
let e2 = this;
return this.forEach(function(t2, n2) {
let i2 = t2.cloneNode(true);
t2.parentNode.replaceChild(i2, t2), e2[n2] = i2;
}), this;
}, i.fn.trigger = function(e2, t2, n2, o2) {
return n2 = n2 || false, o2 = o2 || false, this.forEach(function(r2) {
let s = false;
if (o2 && "undefined" != typeof jQuery && void 0 !== jQuery._data && void 0 !== jQuery._data(r2, "events") && void 0 !== jQuery._data(r2, "events")[e2] && (jQuery(r2).trigger(e2, t2), s = true), !s && n2) {
let n3 = new Event(e2);
n3.detail = t2, r2.dispatchEvent(n3);
}
if (void 0 !== r2._domini_events) r2._domini_events.forEach(function(n3) {
if (n3.type === e2) {
let i2 = new Event(e2);
n3.trigger.apply(r2, [i2].concat(t2));
}
});
else {
let n3 = false, o3 = r2;
for (; o3 = o3.parentElement, null != o3 && (void 0 !== o3._domini_events && o3._domini_events.forEach(function(s2) {
if (void 0 !== s2.selector) {
let l = i(o3).find(s2.selector);
if (l.length > 0 && l.get().indexOf(r2) >= 0 && s2.type === e2) {
let i2 = new Event(e2);
s2.trigger.apply(r2, [i2].concat(t2)), n3 = true;
}
}
}), !n3); ) ;
}
}), this;
}, i.fn.clear = function() {
for (const e2 of this) delete e2._domini_events;
return this;
}, i.fn.clone = function() {
let e2 = [];
for (const t2 of this) e2.push(t2.cloneNode(true));
return i().add(e2);
}, i.fn.detach = function(e2) {
let t2 = this, n2 = [];
void 0 !== e2 && (t2 = this.find(e2));
for (const e3 of t2) null != e3.parentElement && n2.push(e3.parentElement.removeChild(e3));
return i().add(n2);
}, i.fn.remove = function(e2) {
return this.detach(e2).off().clear();
}, i.fn.prepend = function(e2) {
if ((e2 = i._fn.elementArrayFromAny(e2)).length > 0) for (const t2 of this) for (const n2 of e2) t2.insertBefore(n2, t2.children[0]);
return this;
}, i.fn.append = function(e2) {
if ((e2 = i._fn.elementArrayFromAny(e2)).length > 0) for (const t2 of this) for (const n2 of e2) t2.appendChild(n2);
return this;
}, i.fn.is = function(e2) {
let t2 = false;
for (const n2 of this) if (n2.matches(e2)) {
t2 = true;
break;
}
return t2;
}, i.fn.parent = function(e2) {
let t2 = [];
for (const n2 of this) {
let i2 = n2.parentElement;
"string" == typeof e2 && (null == i2 || i2.matches(e2) || (i2 = null)), t2.push(i2);
}
return i().add(t2);
}, i.fn.copy = function(e2, t2) {
let n2, i2, o2;
if ("object" != typeof e2 || null === e2) return n2 = e2, n2;
for (i2 in n2 = new e2.constructor(), e2) e2.hasOwnProperty(i2) && (o2 = typeof e2[i2], t2 && "object" === o2 && null !== e2[i2] ? n2[i2] = this.copy(e2[i2]) : n2[i2] = e2[i2]);
return n2;
}, i.fn.first = function() {
return i(this[0]);
}, i.fn.last = function() {
return i(this[this.length - 1]);
}, i.fn.prev = function(e2) {
let t2 = [];
for (const n2 of this) {
let i2;
if ("string" == typeof e2) for (i2 = n2.previousElementSibling; null != i2; ) {
if (i2.matches(e2)) {
t2.push(i2);
break;
}
i2 = i2.previousElementSibling;
}
else t2.push(n2.previousElementSibling);
}
return i(null).add(t2);
}, i.fn.next = function(e2) {
let t2 = [];
for (const n2 of this) {
let i2;
if ("string" == typeof e2) for (i2 = n2.nextElementSibling; null != i2; ) {
if (i2.matches(e2)) {
t2.includes(i2) || t2.push(i2);
break;
}
i2 = i2.nextElementSibling;
}
else t2.push(n2.nextElementSibling);
}
return i(null).add(t2);
}, i.fn.closest = function(e2) {
let t2 = [];
for (let n2 of this) if ("string" == typeof e2 && "" !== e2) {
for (; !n2.matches(e2) && (n2 = n2.parentElement); ) ;
t2.includes(n2) || t2.push(n2);
} else {
if ((e2 = e2 instanceof i ? e2.get(0) : e2) instanceof Element) for (; n2 !== e2 && (n2 = n2.parentElement); ) ;
else n2 = null;
t2.includes(n2) || t2.push(n2);
}
return i().add(t2);
}, i.fn.add = function(e2) {
let t2 = i._fn.elementArrayFromAny(e2);
for (const e3 of t2) Array.from(this).includes(e3) || this.push(e3);
return this;
}, i.fn.find = function(e2) {
const t2 = new i();
if ("string" == typeof e2) {
let n2 = [];
this.get().forEach(function(t3) {
const i2 = t3.querySelectorAll?.(e2) ?? [];
n2 = n2.concat(Array.from(i2));
}), n2.length > 0 && t2.add(n2);
}
return t2;
}, i._fn.bodyTransform = function() {
let e2 = 0, t2 = 0;
if ("undefined" != typeof WebKitCSSMatrix) {
let n2 = window.getComputedStyle(document.body);
if (void 0 !== n2.transform) {
let i2 = new WebKitCSSMatrix(n2.transform);
"undefined" !== i2.m41 && (e2 = i2.m41), "undefined" !== i2.m42 && (t2 = i2.m42);
}
}
return { x: e2, y: t2 };
}, i._fn.bodyTransformY = function() {
return this.bodyTransform().y;
}, i._fn.bodyTransformX = function() {
return this.bodyTransform().x;
}, i._fn.hasFixedParent = function(e2) {
if (0 != i._fn.bodyTransformY()) return false;
do {
if ("fixed" == window.getComputedStyle(e2).position) return true;
} while (e2 = e2.parentElement);
return false;
}, i._fn.hasEventListener = function(e2, t2, n2) {
if (void 0 === e2._domini_events) return false;
for (let i2 = 0; i2 < e2._domini_events.length; i2++) if (e2._domini_events[i2].trigger === n2 && e2._domini_events[i2].type === t2) return true;
return false;
}, i._fn.allDescendants = function(e2) {
let t2 = [], n2 = this;
return Array.isArray(e2) || (e2 = [e2]), e2.forEach(function(e3) {
for (let i2 = 0; i2 < e3.childNodes.length; i2++) {
let o2 = e3.childNodes[i2];
t2.push(o2), t2 = t2.concat(n2.allDescendants(o2));
}
}), t2;
}, i._fn.createElementsFromHTML = function(e2) {
let t2 = document.createElement("template");
return t2.innerHTML = e2.replace(/(\r\n|\n|\r)/gm, ""), [...t2.content.childNodes];
}, i._fn.elementArrayFromAny = function(e2) {
if ("string" == typeof e2) e2 = i(e2).get();
else if (e2 instanceof i) e2 = e2.get();
else if (e2 instanceof Element) e2 = [e2];
else {
if (!(e2 instanceof Array)) return [];
e2 = e2.filter((e3) => e3 instanceof Element);
}
return e2;
}, i._fn.ElementArrayFromAny = i._fn.elementArrayFromAny, i._fn.absolutePosition = function(e2) {
if (!e2.getClientRects().length) return { top: 0, left: 0 };
let t2 = e2.getBoundingClientRect(), n2 = e2.ownerDocument.defaultView;
return { top: t2.top + n2.pageYOffset, left: t2.left + n2.pageXOffset };
}, i._fn.plugin = function(e2, t2) {
i.fn[e2] = function(n2) {
return void 0 !== n2 && t2[n2] ? t2[n2].apply(this, Array.prototype.slice.call(arguments, 1)) : this.forEach(function(i2) {
i2["domini_" + e2] = Object.create(t2).init(n2, i2);
});
};
}, document.dispatchEvent(new Event("domini-dom-core-loaded"));
const o = i;
i.fn.animate = function(e2, t2, n2) {
t2 = t2 || 200, n2 = n2 || "easeInOutQuad";
for (const o2 of this) {
let r2, s, l, f, a, c = 0, u = 60, h = {}, d = {};
if (l = this.prop("_domini_animations"), l = null == l ? [] : l, false === e2) l.forEach(function(e3) {
clearInterval(e3);
});
else {
let p = function() {
c++, c > r2 ? clearInterval(f) : (s = a(c / r2), Object.keys(d).forEach(function(e3) {
e3.indexOf("scroll") > -1 ? o2[e3] = h[e3] + d[e3] * s : o2.style[e3] = h[e3] + d[e3] * s + "px";
}));
};
a = i.fn.animate.easing[n2] ?? i.fn.animate.easing.easeInOutQuad, Object.keys(e2).forEach(function(t3) {
t3.indexOf("scroll") > -1 ? (h[t3] = o2[t3], d[t3] = e2[t3] - h[t3]) : (h[t3] = parseInt(window.getComputedStyle(o2)[t3]), d[t3] = e2[t3] - h[t3]);
}), r2 = t2 / 1e3 * u, f = setInterval(p, 1e3 / u), l.push(f), this.prop("_domini_animations", l);
}
}
return this;
}, i.fn.animate.easing = { linear: function(e2) {
return e2;
}, easeInOutQuad: function(e2) {
return e2 < 0.5 ? 2 * e2 * e2 : 1 - Math.pow(-2 * e2 + 2, 2) / 2;
}, easeOutQuad: function(e2) {
return 1 - (1 - e2) * (1 - e2);
} }, i.fn.unhighlight = function(e2) {
let t2 = { className: "highlight", element: "span" };
return i.fn.extend(t2, e2), this.find(t2.element + "." + t2.className).forEach(function() {
let e3 = this.parentNode;
e3.replaceChild(this.firstChild, this), e3.normalize();
});
}, i.fn.highlight = function(e2, t2) {
this.defaults = { className: "highlight", element: "span", caseSensitive: false, wordsOnly: false, excludeParents: ".excludeFromHighlight" };
const n2 = i, o2 = { ...this.defaults, ...t2 };
if (e2.constructor === String && (e2 = [e2]), (e2 = e2.filter(function(e3) {
return "" !== e3;
})).forEach(function(e3, t3, n3) {
n3[t3] = e3.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g, "");
}), 0 === e2.length) return this;
let r2 = o2.caseSensitive ? "" : "i", s = "(" + e2.join("|") + ")";
o2.wordsOnly && (s = "(?:,|^|\\s)" + s + "(?:,|$|\\s)");
let l = new RegExp(s, r2);
function f(e3, t3, i2, o3, r3) {
if (r3 = "" === r3 ? n2.fn.highlight.defaults : r3, 3 === e3.nodeType) {
if (!n2(e3.parentNode).is(r3)) {
let n3 = e3.data.normalize("NFD").replace(/[\u0300-\u036f]/g, "").match(t3);
if (n3) {
let t4, r4 = document.createElement(i2 || "span");
r4.className = o3 || "highlight", t4 = /\.|,|\s/.test(n3[0].charAt(0)) ? n3.index + 1 : n3.index;
let s2 = e3.splitText(t4);
s2.splitText(n3[1].length);
let l2 = s2.cloneNode(true);
return r4.appendChild(l2), s2.parentNode.replaceChild(r4, s2), 1;
}
}
} else if (1 === e3.nodeType && e3.childNodes && !/(script|style)/i.test(e3.tagName) && !n2(e3).closest(r3).length > 0 && (e3.tagName !== i2.toUpperCase() || e3.className !== o3)) for (let n3 = 0; n3 < e3.childNodes.length; n3++) n3 += f(e3.childNodes[n3], t3, i2, o3, r3);
return 0;
}
return this.forEach(function(e3) {
f(e3, l, o2.element, o2.className, o2.excludeParents);
});
}, i.fn.serialize = function() {
let e2 = this.get(0);
if (!e2 || "FORM" !== e2.nodeName) return "";
let t2, n2, i2 = [];
for (t2 = e2.elements.length - 1; t2 >= 0; t2 -= 1) if ("" !== e2.elements[t2].name) switch (e2.elements[t2].nodeName) {
case "INPUT":
switch (e2.elements[t2].type) {
case "checkbox":
case "radio":
e2.elements[t2].checked && i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value));
break;
case "file":
break;
default:
i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value));
}
break;
case "TEXTAREA":
i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value));
break;
case "SELECT":
switch (e2.elements[t2].type) {
case "select-one":
i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value));
break;
case "select-multiple":
for (n2 = e2.elements[t2].options.length - 1; n2 >= 0; n2 -= 1) e2.elements[t2].options[n2].selected && i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].options[n2].value));
}
break;
case "BUTTON":
switch (e2.elements[t2].type) {
case "reset":
case "submit":
case "button":
i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value));
}
}
return i2.join("&");
}, i.fn.serializeObject = function(e2, t2) {
let n2, o2 = [];
for (n2 in e2) if (e2.hasOwnProperty(n2)) {
let r2 = t2 ? t2 + "[" + n2 + "]" : n2, s = e2[n2];
o2.push(null !== s && "object" == typeof s ? i.fn.serializeObject(s, r2) : encodeURIComponent(r2) + "=" + encodeURIComponent(s));
}
return o2.join("&");
}, i.fn.inViewPort = function(e2, t2) {
let n2, i2, o2 = this.get(0);
if (null == o2) return false;
e2 = void 0 === e2 ? 0 : e2, t2 = void 0 === t2 ? window : "string" == typeof t2 ? document.querySelector(t2) : t2;
let r2 = o2.getBoundingClientRect(), s = r2.top, l = r2.bottom, f = r2.left, a = r2.right, c = false;
if (null == t2 && (t2 = window), t2 === window) n2 = window.innerWidth || 0, i2 = window.innerHeight || 0;
else {
n2 = t2.clientWidth, i2 = t2.clientHeight;
let e3 = t2.getBoundingClientRect();
s -= e3.top, l -= e3.top, f -= e3.left, a -= e3.left;
}
return e2 = ~~Math.round(parseFloat(e2)), a <= 0 || f >= n2 || (c = e2 > 0 ? s >= e2 && l < i2 - e2 : (l > 0 && s <= i2 - e2) | (s <= 0 && l > e2)), c;
}, i.fn.ajax = function(e2) {
if ("cors" === (e2 = this.extend({ url: "", method: "GET", cors: "cors", data: {}, success: null, fail: null, accept: "text/html", contentType: "application/x-www-form-urlencoded; charset=UTF-8" }, e2)).cors) {
let t2 = new XMLHttpRequest();
return t2.onreadystatechange = function() {
null != e2.success && 4 === this.readyState && this.status >= 200 && this.status < 400 && e2.success(this.responseText), null != e2.fail && 4 === this.readyState && this.status >= 400 && e2.fail(this);
}, t2.open(e2.method.toUpperCase(), e2.url, true), t2.setRequestHeader("Content-type", e2.contentType), t2.setRequestHeader("Accept", e2.accept), t2.send(this.serializeObject(e2.data)), t2;
}
{
let t2 = "ajax_cb_" + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e3) {
let t3 = 16 * Math.random() | 0;
return ("x" === e3 ? t3 : 3 & t3 | 8).toString(16);
}).replaceAll("-", "");
i.fn[t2] = function() {
e2.success.apply(this, arguments), delete i.fn[e2.data.fn];
}, e2.data.callback = "DoMini.fn." + t2, e2.data.fn = t2;
let n2 = document.createElement("script");
n2.type = "text/javascript", n2.src = e2.url + "?" + this.serializeObject(e2.data), n2.onload = function() {
this.remove();
}, document.body.appendChild(n2);
}
};
const r = o;
return t.default;
})());
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
!function() {
"use strict";
// EXTERNAL MODULE: ./node_modules/domini/dist/domini.js
var domini = __webpack_require__(993);
;// ./src/client/external/helpers/base64.js
const Base64 = {
// private property
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for encoding
encode: function(input) {
return btoa(this._utf8_encode(input));
},
// public method for decoding
decode: function(input) {
return this._utf8_decode(
atob(input.replace(/[^A-Za-z0-9\+\/\=]/g, ""))
);
},
// private method for UTF-8 encoding
_utf8_encode: function(string) {
string = string.replace(/\r\n/g, "\n");
let utftext = "";
for (let n = 0; n < string.length; n++) {
let c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
} else if (c > 127 && c < 2048) {
utftext += String.fromCharCode(c >> 6 | 192);
utftext += String.fromCharCode(c & 63 | 128);
} else {
utftext += String.fromCharCode(c >> 12 | 224);
utftext += String.fromCharCode(c >> 6 & 63 | 128);
utftext += String.fromCharCode(c & 63 | 128);
}
}
return utftext;
},
// private method for UTF-8 decoding
_utf8_decode: function(utftext) {
let string = "", i = 0, c = 0, c2, c3;
while (i < utftext.length) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
} else if (c > 191 && c < 224) {
c2 = utftext.charCodeAt(i + 1);
string += String.fromCharCode((c & 31) << 6 | c2 & 63);
i += 2;
} else {
c2 = utftext.charCodeAt(i + 1);
c3 = utftext.charCodeAt(i + 2);
string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
i += 3;
}
}
return string;
}
};
/* harmony default export */ var base64 = (Base64);
;// ./src/client/external/helpers/hooks-filters.js
const Hooks = {
filters: {},
/**
* Adds a callback function to a specific programmatically triggered tag (hook)
*
* @param tag - the hook name
* @param callback - the callback function variable name
* @param priority - (optional) default=10
* @param scope - (optional) function scope. When a function is executed within an object scope, the object variable should be passed.
*/
addFilter: function(tag, callback, priority, scope) {
priority = typeof priority === "undefined" ? 10 : priority;
scope = typeof scope === "undefined" ? null : scope;
Hooks.filters[tag] = Hooks.filters[tag] || [];
Hooks.filters[tag].push({ priority, scope, callback });
},
/**
* Removes a callback function from a hook
*
* @param tag - the hook name
* @param callback - the callback function variable
*/
removeFilter: function(tag, callback) {
if (typeof Hooks.filters[tag] != "undefined") {
if (typeof callback == "undefined") {
Hooks.filters[tag] = [];
} else {
Hooks.filters[tag].forEach(function(filter, i) {
if (filter.callback === callback) {
Hooks.filters[tag].splice(i, 1);
}
});
}
}
},
applyFilters: function(tag) {
let filters = [], args = Array.prototype.slice.call(arguments), value = arguments[1];
if (typeof Hooks.filters[tag] !== "undefined" && Hooks.filters[tag].length > 0) {
Hooks.filters[tag].forEach(function(hook) {
filters[hook.priority] = filters[hook.priority] || [];
filters[hook.priority].push({
scope: hook.scope,
callback: hook.callback
});
});
args.splice(0, 2);
filters.forEach(function(hooks) {
hooks.forEach(function(obj) {
value = obj.callback.apply(obj.scope, [value].concat(args));
});
});
}
return value;
}
};
/* harmony default export */ var hooks_filters = (Hooks);
;// ./src/client/external/helpers/interval-until-execute.js
function intervalUntilExecute(f, criteria, interval = 100, maxTries = 50) {
let t, tries = 0, res = typeof criteria === "function" ? criteria() : criteria;
if (res === false) {
t = setInterval(function() {
res = typeof criteria === "function" ? criteria() : criteria;
tries++;
if (tries > maxTries) {
clearInterval(t);
return false;
}
if (res !== false) {
clearInterval(t);
return f(res);
}
}, interval);
} else {
return f(res);
}
}
;
;// ./src/client/external/helpers/swiped.js
/**
* swiped-events.js - v@version@
* Pure JavaScript swipe events
* https://github.com/john-doherty/swiped-events
* @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element
* @author John Doherty <www.johndoherty.info>
* @license MIT
*/
(function(window2, document2) {
"use strict";
if (typeof window2.CustomEvent !== "function") {
window2.CustomEvent = function(event, params) {
params = params || { bubbles: false, cancelable: false, detail: void 0 };
var evt = document2.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
window2.CustomEvent.prototype = window2.Event.prototype;
}
document2.addEventListener("touchstart", handleTouchStart, false);
document2.addEventListener("touchmove", handleTouchMove, false);
document2.addEventListener("touchend", handleTouchEnd, false);
var xDown = null;
var yDown = null;
var xDiff = null;
var yDiff = null;
var timeDown = null;
var startEl = null;
function handleTouchEnd(e) {
if (startEl !== e.target) return;
var swipeThreshold = parseInt(getNearestAttribute(startEl, "data-swipe-threshold", "20"), 10);
var swipeTimeout = parseInt(getNearestAttribute(startEl, "data-swipe-timeout", "500"), 10);
var timeDiff = Date.now() - timeDown;
var eventType = "";
var changedTouches = e.changedTouches || e.touches || [];
if (Math.abs(xDiff) > Math.abs(yDiff)) {
if (Math.abs(xDiff) > swipeThreshold && timeDiff < swipeTimeout) {
if (xDiff > 0) {
eventType = "swiped-left";
} else {
eventType = "swiped-right";
}
}
} else if (Math.abs(yDiff) > swipeThreshold && timeDiff < swipeTimeout) {
if (yDiff > 0) {
eventType = "swiped-up";
} else {
eventType = "swiped-down";
}
}
if (eventType !== "") {
var eventData = {
dir: eventType.replace(/swiped-/, ""),
xStart: parseInt(xDown, 10),
xEnd: parseInt((changedTouches[0] || {}).clientX || -1, 10),
yStart: parseInt(yDown, 10),
yEnd: parseInt((changedTouches[0] || {}).clientY || -1, 10)
};
startEl.dispatchEvent(new CustomEvent("swiped", { bubbles: true, cancelable: true, detail: eventData }));
startEl.dispatchEvent(new CustomEvent(eventType, { bubbles: true, cancelable: true, detail: eventData }));
}
xDown = null;
yDown = null;
timeDown = null;
}
function handleTouchStart(e) {
if (e.target.getAttribute("data-swipe-ignore") === "true") return;
startEl = e.target;
timeDown = Date.now();
xDown = e.touches[0].clientX;
yDown = e.touches[0].clientY;
xDiff = 0;
yDiff = 0;
}
function handleTouchMove(e) {
if (!xDown || !yDown) return;
var xUp = e.touches[0].clientX;
var yUp = e.touches[0].clientY;
xDiff = xDown - xUp;
yDiff = yDown - yUp;
}
function getNearestAttribute(el, attributeName, defaultValue) {
while (el && el !== document2.documentElement) {
var attributeValue = el.getAttribute(attributeName);
if (attributeValue) {
return attributeValue;
}
el = el.parentNode;
}
return defaultValue;
}
})(window, document);
;// ./src/client/bundle/optimized/asp-prereq.js
window.WPD = window.WPD || {};
window.WPD.dom = domini;
window.WPD.domini = window.WPD.dom;
window.WPD.DoMini = window.WPD.dom;
window.DoMini = window.WPD.dom;
window.WPD.Base64 = window.WPD.Base64 || base64;
window.WPD.Hooks = window.WPD.Hooks || hooks_filters;
window.WPD.intervalUntilExecute = window.WPD.intervalUntilExecute || intervalUntilExecute;
}();
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,95 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_results_horizontal; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/actions/results_horizontal.js
"use strict";
let helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.showHorizontalResults = function() {
let $this = this;
$this.showResultsBox();
$this.n("items").css("opacity", $this.animationOpacity);
if ($this.o.resultsposition === "hover") {
$this.n("resultsDiv").css(
"width",
//($this.n('search').width() - ($this.n('resultsDiv').outerWidth(true) - $this.n('resultsDiv').innerWidth())) + 'px'
$this.n("search").width() - ($this.n("resultsDiv").outerWidth(true) - $this.n("resultsDiv").width()) + "px"
);
}
if ($this.n("items").length > 0 && $this.o.scrollBar.horizontal.enabled) {
let el_m = parseInt($this.n("items").css("marginLeft")), el_w = $this.n("items").outerWidth() + el_m * 2;
$this.n("resdrg").css("width", $this.n("items").length * el_w + el_m * 2 + "px");
} else {
$this.n("results").css("overflowX", "hidden");
$this.n("resdrg").css("width", "auto");
}
$this.keywordHighlight();
if ($this.call_num < 1) {
let $container = $this.n("results");
$container.get(0).scrollLeft = 0;
if ($this.o.scrollBar.horizontal.enabled) {
let prevDelta = 0, prevTime = Date.now();
$container.off("mousewheel");
$container.on("mousewheel", function(e) {
let deltaFactor = typeof e.deltaFactor != "undefined" ? e.deltaFactor : 65, delta = e.deltaY > 0 ? 1 : -1, diff = Date.now() - prevTime, speed = diff > 100 ? 1 : 3 - 2 * diff / 100;
if (prevDelta !== e.deltaY)
speed = 1;
external_DoMini_namespaceObject(this).animate(false).animate({
"scrollLeft": this.scrollLeft + delta * deltaFactor * 2 * speed
}, 250, "easeOutQuad");
prevDelta = e.deltaY;
prevTime = Date.now();
if (!(helpers.isScrolledToRight($container.get(0)) && delta === 1 || helpers.isScrolledToLeft($container.get(0)) && delta === -1))
e.preventDefault();
});
}
}
$this.showResultsBox();
$this.addAnimation();
$this.searching = false;
};
/* harmony default export */ var results_horizontal = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-results-horizontal.js
/* harmony default export */ var asp_results_horizontal = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,334 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_results_isotopic; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/events/isotopic.js
"use strict";
let helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.initIsotopicPagination = function() {
let $this = this;
$this.n("resultsDiv").on($this.clickTouchend + " click_trigger", "nav>a", function(e) {
e.preventDefault();
e.stopImmediatePropagation();
let $li = external_DoMini_namespaceObject(this).closest("nav").find("li.asp_active");
let direction = external_DoMini_namespaceObject(this).hasClass("asp_prev") ? "prev" : "next";
if (direction === "next") {
if ($li.next("li").length > 0) {
$li.next("li").trigger("click");
} else {
external_DoMini_namespaceObject(this).closest("nav").find("li").first().trigger("click");
}
} else {
if ($li.prev("li").length > 0) {
$li.prev("li").trigger("click");
} else {
external_DoMini_namespaceObject(this).closest("nav").find("li").last().trigger("click");
}
}
});
$this.n("resultsDiv").on($this.clickTouchend + " click_trigger", "nav>ul li", function(e) {
e.preventDefault();
e.stopImmediatePropagation();
let _this = this, timeout = 1;
if (helpers.isMobile()) {
$this.n("text").trigger("blur");
timeout = 300;
}
setTimeout(function() {
$this.currentPage = parseInt(external_DoMini_namespaceObject(_this).find("span").html(), 10);
external_DoMini_namespaceObject("nav>ul li", $this.n("resultsDiv")).removeClass("asp_active");
external_DoMini_namespaceObject("nav", $this.n("resultsDiv")).forEach(function(el) {
external_DoMini_namespaceObject(external_DoMini_namespaceObject(el).find("ul li").get($this.currentPage - 1)).addClass("asp_active");
});
if (e.type === "click_trigger") {
$this.isotopic.arrange({
transitionDuration: 0,
filter: $this.filterFns["number"]
});
} else {
$this.isotopic.arrange({
transitionDuration: 400,
filter: $this.filterFns["number"]
});
}
$this.isotopicPagerScroll();
$this.removeAnimation();
$this.n("resultsDiv").trigger("nav_switch");
}, timeout);
});
};
/* harmony default export */ var isotopic = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/plugin/core/actions/results_isotopic.js
"use strict";
let results_isotopic_helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.showIsotopicResults = function() {
let $this = this;
if ($this._no_animations) {
$this.showResultsBox();
$this.addAnimation();
$this.searching = false;
return true;
}
$this.preProcessIsotopicResults();
$this.showResultsBox();
if ($this.n("items").length > 0) {
$this.n("results").css({
height: "auto"
});
$this.keywordHighlight();
}
if ($this.call_num === 0)
$this.calculateIsotopeRows();
$this.showPagination();
$this.isotopicPagerScroll();
if ($this.n("items").length === 0) {
$this.n("results").css({
height: "11110px"
});
$this.n("results").css({
height: "auto"
});
$this.n("resdrg").css({
height: "auto"
});
} else {
if (typeof rpp_isotope !== "undefined") {
if ($this.isotopic != null && typeof $this.isotopic.destroy != "undefined" && $this.call_num === 0)
$this.isotopic.destroy();
if ($this.call_num === 0 || $this.isotopic == null) {
let selector = "#ajaxsearchprores" + $this.o.rid + " .resdrg";
if (external_DoMini_namespaceObject(selector).length === 0) {
selector = "div[id^=ajaxsearchprores" + $this.o.id + "] .resdrg";
}
$this.isotopic = new rpp_isotope(selector, {
// options
isOriginLeft: !external_DoMini_namespaceObject("body").hasClass("rtl"),
itemSelector: "div.item",
layoutMode: "masonry",
filter: $this.filterFns["number"],
masonry: {
"gutter": $this.o.isotopic.gutter
}
});
}
} else {
return false;
}
}
$this.addAnimation();
$this.initIsotopicClick();
$this.searching = false;
};
external_AjaxSearchPro_namespaceObject.plugin.initIsotopicClick = function() {
let $this = this;
$this.eh.isotopicClickhandle = $this.eh.isotopicClickhandle || function(e) {
if (!$this.dragging) {
let $a = external_DoMini_namespaceObject(this).find(".asp_content a.asp_res_url");
let url = $a.attr("href");
if (url !== "") {
e.preventDefault();
if (e.which === 2 || $a.attr("target") === "_blank") {
results_isotopic_helpers.openInNewTab(url);
} else {
location.href = url;
}
}
}
};
$this.n("resultsDiv").find(".asp_isotopic_item").on("click", $this.eh.isotopicClickhandle);
};
external_AjaxSearchPro_namespaceObject.plugin.preProcessIsotopicResults = function() {
let $this = this, j = 0, overlay = "";
if ($this.o.isotopic.showOverlay && $this.n("aspItemOverlay").length > 0)
overlay = $this.n("aspItemOverlay").get(0).outerHTML;
$this.n("items").forEach(function(el) {
let image = "", overlayImage = "", hasImage = external_DoMini_namespaceObject(el).find(".asp_image").length > 0, $img = external_DoMini_namespaceObject(el).find(".asp_image");
if (hasImage) {
let src = $img.data("src"), filter = $this.o.isotopic.blurOverlay && !results_isotopic_helpers.isMobile() ? "aspblur" : "no_aspblur";
overlayImage = external_DoMini_namespaceObject("<div data-src='" + src + "' ></div>");
overlayImage.css({
"background-image": "url(" + src + ")"
});
overlayImage.css({
"filter": "url(#" + filter + ")",
"-webkit-filter": "url(#" + filter + ")",
"-moz-filter": "url(#" + filter + ")",
"-o-filter": "url(#" + filter + ")",
"-ms-filter": "url(#" + filter + ")"
}).addClass("asp_item_overlay_img");
overlayImage = overlayImage.get(0).outerHTML;
}
external_DoMini_namespaceObject(el).prepend(overlayImage + overlay + image);
external_DoMini_namespaceObject(el).attr("data-itemnum", j);
j++;
});
};
external_AjaxSearchPro_namespaceObject.plugin.isotopicPagerScroll = function() {
let $this = this;
if (external_DoMini_namespaceObject("nav>ul li.asp_active", $this.n("resultsDiv")).length <= 0)
return false;
let $activeLeft = external_DoMini_namespaceObject("nav>ul li.asp_active", $this.n("resultsDiv")).offset().left, $activeWidth = external_DoMini_namespaceObject("nav>ul li.asp_active", $this.n("resultsDiv")).outerWidth(true), $nextLeft = external_DoMini_namespaceObject("nav>a.asp_next", $this.n("resultsDiv")).offset().left, $prevLeft = external_DoMini_namespaceObject("nav>a.asp_prev", $this.n("resultsDiv")).offset().left;
if ($activeWidth <= 0) return;
let toTheLeft = Math.ceil(($prevLeft - $activeLeft + 2 * $activeWidth) / $activeWidth);
if (toTheLeft > 0) {
if (external_DoMini_namespaceObject("nav>ul li.asp_active", $this.n("resultsDiv")).prev().length === 0) {
external_DoMini_namespaceObject("nav>ul", $this.n("resultsDiv")).css({
"left": $activeWidth + "px"
});
return;
}
external_DoMini_namespaceObject("nav>ul", $this.n("resultsDiv")).css({
"left": external_DoMini_namespaceObject("nav>ul", $this.n("resultsDiv")).position().left + $activeWidth * toTheLeft + "px"
});
} else {
let toTheRight;
if (external_DoMini_namespaceObject("nav>ul li.asp_active", $this.n("resultsDiv")).next().length === 0) {
toTheRight = Math.ceil(($activeLeft - $nextLeft + $activeWidth) / $activeWidth);
} else {
toTheRight = Math.ceil(($activeLeft - $nextLeft + 2 * $activeWidth) / $activeWidth);
}
if (toTheRight > 0) {
external_DoMini_namespaceObject("nav>ul", $this.n("resultsDiv")).css({
"left": external_DoMini_namespaceObject("nav>ul", $this.n("resultsDiv")).position().left - $activeWidth * toTheRight + "px"
});
}
}
};
external_AjaxSearchPro_namespaceObject.plugin.showPagination = function(force_refresh) {
let $this = this;
force_refresh = typeof force_refresh !== "undefined" ? force_refresh : false;
if (!$this.o.isotopic.pagination) {
if ($this.isotopic != null && force_refresh)
$this.isotopic.arrange({
transitionDuration: 0,
filter: $this.filterFns["number"]
});
return false;
}
if ($this.call_num < 1 || force_refresh)
external_DoMini_namespaceObject("nav.asp_navigation ul li", $this.n("resultsDiv")).remove();
external_DoMini_namespaceObject("nav.asp_navigation", $this.n("resultsDiv")).css("display", "none");
if ($this.n("items").length > 0) {
let start = 1;
if ($this.call_num > 0 && !force_refresh) {
start = $this.n("resultsDiv").find("nav.asp_navigation ul").first().find("li").length + 1;
}
let pages = Math.ceil($this.n("items").length / $this.il.itemsPerPage);
if (pages > 1) {
let newPage = force_refresh && $this.il.lastVisibleItem > 0 ? Math.ceil($this.il.lastVisibleItem / $this.il.itemsPerPage) : 1;
newPage = newPage <= 0 ? 1 : newPage;
for (let i = start; i <= pages; i++) {
if (i === newPage)
external_DoMini_namespaceObject("nav.asp_navigation ul", $this.n("resultsDiv")).append("<li class='asp_active'><span>" + i + "</span></li>");
else
external_DoMini_namespaceObject("nav.asp_navigation ul", $this.n("resultsDiv")).append("<li><span>" + i + "</span></li>");
}
external_DoMini_namespaceObject("nav.asp_navigation", $this.n("resultsDiv")).css("display", "block");
if (force_refresh)
external_DoMini_namespaceObject("nav.asp_navigation ul li.asp_active", $this.n("resultsDiv")).trigger("click_trigger");
else
external_DoMini_namespaceObject("nav.asp_navigation ul li.asp_active", $this.n("resultsDiv")).trigger("click");
} else {
if ($this.isotopic != null && force_refresh)
$this.isotopic.arrange({
transitionDuration: 0,
filter: $this.filterFns["number"]
});
}
}
};
external_AjaxSearchPro_namespaceObject.plugin.hidePagination = function() {
let $this = this;
external_DoMini_namespaceObject("nav.asp_navigation", $this.n("resultsDiv")).css("display", "none");
};
external_AjaxSearchPro_namespaceObject.plugin.visiblePagination = function() {
let $this = this;
return external_DoMini_namespaceObject("nav.asp_navigation", $this.n("resultsDiv")).css("display") !== "none";
};
external_AjaxSearchPro_namespaceObject.plugin.calculateIsotopeRows = function() {
let $this = this, itemWidth, itemHeight, containerWidth = parseFloat($this.n("results").width());
if (results_isotopic_helpers.deviceType() === "desktop") {
itemWidth = results_isotopic_helpers.getWidthFromCSSValue($this.o.isotopic.itemWidth, containerWidth);
itemHeight = results_isotopic_helpers.getWidthFromCSSValue($this.o.isotopic.itemHeight, containerWidth);
} else if (results_isotopic_helpers.deviceType() === "tablet") {
itemWidth = results_isotopic_helpers.getWidthFromCSSValue($this.o.isotopic.itemWidthTablet, containerWidth);
itemHeight = results_isotopic_helpers.getWidthFromCSSValue($this.o.isotopic.itemHeightTablet, containerWidth);
} else {
itemWidth = results_isotopic_helpers.getWidthFromCSSValue($this.o.isotopic.itemWidthPhone, containerWidth);
itemHeight = results_isotopic_helpers.getWidthFromCSSValue($this.o.isotopic.itemHeightPhone, containerWidth);
}
let realColumnCount = containerWidth / itemWidth, gutterWidth = $this.o.isotopic.gutter, floorColumnCount = Math.floor(realColumnCount);
if (floorColumnCount <= 0)
floorColumnCount = 1;
if (Math.abs(containerWidth / floorColumnCount - itemWidth) > Math.abs(containerWidth / (floorColumnCount + 1) - itemWidth)) {
floorColumnCount++;
}
let newItemW = containerWidth / floorColumnCount - (floorColumnCount - 1) * gutterWidth / floorColumnCount, newItemH = newItemW / itemWidth * itemHeight;
$this.il.columns = floorColumnCount;
$this.il.itemsPerPage = floorColumnCount * $this.il.rows;
$this.il.lastVisibleItem = 0;
$this.n("results").find(".asp_isotopic_item").forEach(function(el, index) {
if (external_DoMini_namespaceObject(el).css("display") !== "none") {
$this.il.lastVisibleItem = index;
}
});
if (!isNaN($this.il.columns) && !isNaN($this.il.itemsPerPage)) {
$this.n("resultsDiv").data("colums", $this.il.columns);
$this.n("resultsDiv").data("itemsperpage", $this.il.itemsPerPage);
}
$this.currentPage = 1;
$this.n("items").css({
width: Math.floor(newItemW) + "px",
height: Math.floor(newItemH) + "px"
});
};
/* harmony default export */ var results_isotopic = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-results-isotopic.js
/* harmony default export */ var asp_results_isotopic = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,125 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_results_polaroid; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/actions/results_polaroid.js
"use strict";
external_AjaxSearchPro_namespaceObject.plugin.showPolaroidResults = function() {
let $this = this;
this.loadASPFonts?.();
$this.n("results").addClass("photostack");
external_DoMini_namespaceObject(".photostack>nav", $this.n("resultsDiv")).remove();
let figures = external_DoMini_namespaceObject("figure", $this.n("resultsDiv"));
$this.showResultsBox();
if (figures.length > 0) {
$this.n("results").css({
height: $this.o.prescontainerheight
});
$this.keywordHighlight();
if (typeof Photostack !== "undefined") {
$this.ptstack = new Photostack($this.n("results").get(0), {
callback: function(item) {
}
});
} else {
return false;
}
}
if (figures.length === 0) {
$this.n("results").css({
height: "11110px"
});
$this.n("results").css({
height: "auto"
});
}
$this.addAnimation();
$this.fixResultsPosition(true);
$this.searching = false;
$this.initPolaroidEvents(figures);
};
external_AjaxSearchPro_namespaceObject.plugin.initPolaroidEvents = function(figures) {
let $this = this, i = 1, span = ".photostack>nav span";
figures.forEach(function() {
if (i > 1)
external_DoMini_namespaceObject(this).removeClass("photostack-current");
external_DoMini_namespaceObject(this).attr("idx", i);
i++;
});
figures.on("click", function(e) {
if (external_DoMini_namespaceObject(this).hasClass("photostack-current")) return;
e.preventDefault();
let idx = external_DoMini_namespaceObject(this).attr("idx");
external_DoMini_namespaceObject(".photostack>nav span:nth-child(" + idx + ")", $this.n("resultsDiv")).trigger("click", [], true);
});
const left_handler = () => {
if (external_DoMini_namespaceObject(span + ".current", $this.n("resultsDiv")).next().length > 0) {
external_DoMini_namespaceObject(span + ".current", $this.n("resultsDiv")).next().trigger("click", [], true);
} else {
external_DoMini_namespaceObject(span + ":nth-child(1)", $this.n("resultsDiv")).trigger("click", [], true);
}
};
const right_handler = () => {
if (external_DoMini_namespaceObject(span + ".current", $this.n("resultsDiv")).prev().length > 0) {
external_DoMini_namespaceObject(span + ".current", $this.n("resultsDiv")).prev().trigger("click", [], true);
} else {
external_DoMini_namespaceObject(span + ":nth-last-child(1)", $this.n("resultsDiv")).trigger("click", [], true);
}
};
figures.on("mousewheel", function(e) {
e.preventDefault();
let delta = e.deltaY > 0 ? 1 : -1;
if (delta >= 1) {
left_handler();
} else {
right_handler();
}
});
$this.n("resultsDiv").on("swiped-left", left_handler);
$this.n("resultsDiv").on("swiped-right", right_handler);
};
/* harmony default export */ var results_polaroid = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-results-polaroid.js
/* harmony default export */ var asp_results_polaroid = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,128 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_results_vertical; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/actions/results_vertical.js
"use strict";
external_AjaxSearchPro_namespaceObject.plugin.showVerticalResults = function() {
let $this = this;
$this.showResultsBox();
if ($this.n("items").length > 0) {
let count = $this.n("items").length < $this.o.itemscount ? $this.n("items").length : $this.o.itemscount;
count = count <= 0 ? 9999 : count;
let groups = external_DoMini_namespaceObject(".asp_group_header", $this.n("resultsDiv"));
if ($this.o.itemscount === 0 || $this.n("items").length <= $this.o.itemscount) {
$this.n("results").css({
height: "auto"
});
} else {
if ($this.call_num < 1)
$this.n("results").css({
height: "30px"
});
if ($this.call_num < 1) {
let i = 0, h = 0, final_h = 0, highest = 0;
$this.n("items").forEach(function() {
h += external_DoMini_namespaceObject(this).outerHeight(true);
if (external_DoMini_namespaceObject(this).outerHeight(true) > highest)
highest = external_DoMini_namespaceObject(this).outerHeight(true);
i++;
});
final_h = highest * count;
if (final_h > h)
final_h = h;
i = i < 1 ? 1 : i;
h = h / i * count;
if (groups.length > 0) {
groups.forEach(function(el, index) {
let position = Array.prototype.slice.call(el.parentNode.children).indexOf(el), group_position = position - index - Math.floor(position / 3);
if (group_position < count) {
final_h += external_DoMini_namespaceObject(this).outerHeight(true);
}
});
}
$this.n("results").css({
height: final_h + "px"
});
}
}
$this.n("items").last().addClass("asp_last_item");
$this.n("results").find(".asp_group_header").prev(".item").addClass("asp_last_item");
$this.keywordHighlight();
}
$this.resize();
if ($this.n("items").length === 0) {
$this.n("results").css({
height: "auto"
});
}
if ($this.call_num < 1) {
$this.n("results").get(0).scrollTop = 0;
}
if ($this.o.preventBodyScroll) {
let t, $body = external_DoMini_namespaceObject("body"), bodyOverflow = $body.css("overflow"), bodyHadNoStyle = typeof $body.attr("style") === "undefined";
$this.n("results").off("touchstart");
$this.n("results").off("touchend");
$this.n("results").on("touchstart", function() {
clearTimeout(t);
external_DoMini_namespaceObject("body").css("overflow", "hidden");
}).on("touchend", function() {
clearTimeout(t);
t = setTimeout(function() {
if (bodyHadNoStyle) {
external_DoMini_namespaceObject("body").removeAttr("style");
} else {
external_DoMini_namespaceObject("body").css("overflow", bodyOverflow);
}
}, 300);
});
}
$this.addAnimation();
$this.fixResultsPosition(true);
$this.searching = false;
};
/* harmony default export */ var results_vertical = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-results-vertical.js
/* harmony default export */ var asp_results_vertical = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,778 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ asp_settings; }
});
;// external "AjaxSearchPro"
var external_AjaxSearchPro_namespaceObject = Object(window.WPD)["AjaxSearchPro"];
;// external "DoMini"
var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"];
;// ./src/client/plugin/core/actions/settings.js
"use strict";
let helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.showSettings = function(animations) {
let $this = this;
$this.initSettings?.();
animations = typeof animations == "undefined" ? true : animations;
$this.n("s").trigger("asp_settings_show", [$this.o.id, $this.o.iid], true, true);
if (!animations) {
$this.n("searchsettings").css({
"display": "block",
"visibility": "visible",
"opacity": 1
});
} else {
$this.n("searchsettings").css($this.settAnim.showCSS);
$this.n("searchsettings").removeClass($this.settAnim.hideClass).addClass($this.settAnim.showClass);
}
if ($this.o.fss_layout === "masonry" && $this.sIsotope == null && !(helpers.isMobile() && helpers.detectIOS())) {
if (typeof rpp_isotope !== "undefined") {
setTimeout(function() {
let id = $this.n("searchsettings").attr("id");
$this.n("searchsettings").css("width", "100%");
$this.sIsotope = new rpp_isotope("#" + id + " form", {
isOriginLeft: !external_DoMini_namespaceObject("body").hasClass("rtl"),
itemSelector: "fieldset",
layoutMode: "masonry",
transitionDuration: 0,
masonry: {
columnWidth: $this.n("searchsettings").find("fieldset:not(.hiddend)").outerWidth()
}
});
}, 20);
} else {
return false;
}
}
if (typeof $this.select2jQuery != "undefined") {
$this.select2jQuery($this.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").trigger("change.asp_select2");
}
$this.n("prosettings").data("opened", 1);
$this.fixSettingsPosition(true);
$this.fixSettingsAccessibility();
};
external_AjaxSearchPro_namespaceObject.plugin.hideSettings = function() {
let $this = this;
$this.initSettings?.();
$this.n("s").trigger("asp_settings_hide", [$this.o.id, $this.o.iid], true, true);
$this.n("searchsettings").removeClass($this.settAnim.showClass).addClass($this.settAnim.hideClass);
setTimeout(function() {
$this.n("searchsettings").css($this.settAnim.hideCSS);
}, $this.settAnim.duration);
$this.n("prosettings").data("opened", 0);
if ($this.sIsotope != null) {
setTimeout(function() {
$this.sIsotope.destroy();
$this.sIsotope = null;
}, $this.settAnim.duration);
}
if (typeof $this.select2jQuery != "undefined" && typeof $this.select2jQuery.fn.asp_select2 != "undefined") {
$this.select2jQuery($this.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").asp_select2("close");
}
$this.hideArrowBox?.();
};
external_AjaxSearchPro_namespaceObject.plugin.reportSettingsValidity = function() {
let $this = this, valid = true;
if ($this.n("searchsettings").css("visibility") === "hidden")
return true;
$this.n("searchsettings").find("fieldset.asp_required").forEach(function() {
let $_this = external_DoMini_namespaceObject(this), fieldset_valid = true;
$_this.find("input[type=text]:not(.asp_select2-search__field)").forEach(function() {
if (external_DoMini_namespaceObject(this).val() === "") {
fieldset_valid = false;
}
});
$_this.find("select").forEach(function() {
const value = external_DoMini_namespaceObject(this).val();
if (value == null || value === "" || Array.isArray(value) && value.length === 0 || external_DoMini_namespaceObject(this).closest("fieldset").is(".asp_filter_tax, .asp_filter_content_type") && parseInt(external_DoMini_namespaceObject(this).val()) === -1) {
fieldset_valid = false;
}
});
if ($_this.find("input[type=checkbox]").length > 0) {
if ($_this.find("input[type=checkbox]:checked").length === 0) {
fieldset_valid = false;
} else if ($_this.find("input[type=checkbox]:checked").length === 1 && $_this.find("input[type=checkbox]:checked").val() === "") {
fieldset_valid = false;
}
}
if ($_this.find("input[type=radio]").length > 0) {
if ($_this.find("input[type=radio]:checked").length === 0) {
fieldset_valid = false;
}
if (fieldset_valid) {
$_this.find("input[type=radio]").forEach(function() {
if (external_DoMini_namespaceObject(this).prop("checked") && (external_DoMini_namespaceObject(this).val() === "" || external_DoMini_namespaceObject(this).closest("fieldset").is(".asp_filter_tax, .asp_filter_content_type") && parseInt(external_DoMini_namespaceObject(this).val()) === -1)) {
fieldset_valid = false;
}
});
}
}
if (!fieldset_valid) {
$_this.addClass("asp-invalid");
valid = false;
} else {
$_this.removeClass("asp-invalid");
}
});
if (!valid) {
$this.n("searchsettings").find("button.asp_s_btn").prop("disabled", true);
}
{
$this.n("searchsettings").find("button.asp_s_btn").prop("disabled", false);
}
return valid;
};
external_AjaxSearchPro_namespaceObject.plugin.showArrowBox = function(element, text) {
let $this = this, offsetTop, left, $body = external_DoMini_namespaceObject("body"), $box = $body.find(".asp_arrow_box");
if ($box.length === 0) {
$body.append("<div class='asp_arrow_box'></div>");
$box = $body.find(".asp_arrow_box");
$box.on("mouseout", function() {
$this.hideArrowBox?.();
});
}
let space = external_DoMini_namespaceObject(element).offset().top - window.scrollY, fixedp = false, n = element;
while (n) {
n = n.parentElement;
if (n != null && window.getComputedStyle(n).position === "fixed") {
fixedp = true;
break;
}
}
if (fixedp) {
$box.css("position", "fixed");
offsetTop = 0;
} else {
$box.css("position", "absolute");
offsetTop = window.scrollY;
}
$box.html(text);
$box.css("display", "block");
left = element.getBoundingClientRect().left + external_DoMini_namespaceObject(element).outerWidth() / 2 - $box.outerWidth() / 2 + "px";
if (space > 100) {
$box.removeClass("asp_arrow_box_bottom");
$box.css({
top: offsetTop + element.getBoundingClientRect().top - $box.outerHeight() - 4 + "px",
left
});
} else {
$box.addClass("asp_arrow_box_bottom");
$box.css({
top: offsetTop + element.getBoundingClientRect().bottom + 4 + "px",
left
});
}
};
external_AjaxSearchPro_namespaceObject.plugin.hideArrowBox = function() {
external_DoMini_namespaceObject("body").find(".asp_arrow_box").css("display", "none");
};
external_AjaxSearchPro_namespaceObject.plugin.showNextInvalidFacetMessage = function() {
let $this = this;
if ($this.n("searchsettings").find(".asp-invalid").length > 0) {
$this.showArrowBox(
$this.n("searchsettings").find(".asp-invalid").first().get(0),
$this.n("searchsettings").find(".asp-invalid").first().data("asp_invalid_msg")
);
}
};
external_AjaxSearchPro_namespaceObject.plugin.scrollToNextInvalidFacetMessage = function() {
let $this = this;
if ($this.n("searchsettings").find(".asp-invalid").length > 0) {
let $n = $this.n("searchsettings").find(".asp-invalid").first();
if (!$n.inViewPort(0)) {
if (typeof $n.get(0).scrollIntoView != "undefined") {
$n.get(0).scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" });
} else {
let stop = $n.offset().top - 20, $adminbar = external_DoMini_namespaceObject("#wpadminbar");
if ($adminbar.length > 0)
stop -= $adminbar.height();
stop = stop < 0 ? 0 : stop;
window.scrollTo({ top: stop, behavior: "smooth" });
}
}
}
};
external_AjaxSearchPro_namespaceObject.plugin.settingsCheckboxToggle = function($node, checkState) {
let $this = this;
checkState = typeof checkState == "undefined" ? true : checkState;
let $parent = $node, $checkbox = $node.find('input[type="checkbox"]'), lvl = parseInt($node.data("lvl")) + 1, i = 0;
while (true) {
$parent = $parent.next();
if ($parent.length > 0 && typeof $parent.data("lvl") != "undefined" && parseInt($parent.data("lvl")) >= lvl) {
if (checkState && $this.o.settings.unselectChildren) {
$parent.find('input[type="checkbox"]').prop("checked", $checkbox.prop("checked"));
}
if ($this.o.settings.hideChildren) {
if ($checkbox.prop("checked")) {
$parent.removeClass("hiddend");
} else {
$parent.addClass("hiddend");
}
}
} else {
break;
}
i++;
if (i > 400) break;
}
};
/* harmony default export */ var settings = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// external "intervalUntilExecute"
var external_intervalUntilExecute_namespaceObject = Object(window.WPD)["intervalUntilExecute"];
;// ./src/client/plugin/core/events/datepicker.js
"use strict";
let datepicker_helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.initDatePicker = function() {
let $this = this;
external_intervalUntilExecute_namespaceObject(function(_$) {
function onSelectEvent(dateText, inst, _this, nochange, nochage) {
let obj;
if (_this != null) {
obj = _$(_this);
} else {
obj = _$("#" + inst.id);
}
let prevValue = _$(".asp_datepicker_hidden", _$(obj).parent()).val(), newValue = "";
if (obj.datepicker("getDate") == null) {
_$(".asp_datepicker_hidden", _$(obj).parent()).val("");
} else {
let d = String(obj.datepicker("getDate")), date = new Date(d.match(/(.*?)00:/)[1].trim()), year = String(date.getFullYear()), month = ("0" + (date.getMonth() + 1)).slice(-2), day = ("0" + String(date.getDate())).slice(-2);
newValue = year + "-" + month + "-" + day;
_$(".asp_datepicker_hidden", _$(obj).parent()).val(newValue);
}
if ((typeof nochage == "undefined" || nochange == null) && newValue !== prevValue)
external_DoMini_namespaceObject(obj.get(0)).trigger("change");
}
_$(".asp_datepicker, .asp_datepicker_field", $this.n("searchsettings").get(0)).each(function() {
let format = _$(".asp_datepicker_format", _$(this).parent()).val(), _this = this, origValue = _$(this).val();
_$(this).removeClass("hasDatepicker");
_$(this).datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy-mm-dd",
onSelect: onSelectEvent,
beforeShow: function() {
_$("#ui-datepicker-div").addClass("asp-ui");
}
});
if (origValue === "") {
_$(this).datepicker("setDate", "");
} else {
_$(this).datepicker("setDate", origValue);
}
_$(this).datepicker("option", "dateFormat", format);
onSelectEvent(null, null, _this, true);
_$(this).on("selectnochange", function() {
onSelectEvent(null, null, _this, true);
});
_$(this).on("keyup", function() {
if (_$(_this).datepicker("getDate") == null) {
_$(".asp_datepicker_hidden", _$(_this).parent()).val("");
}
_$(_this).datepicker("hide");
});
});
if (datepicker_helpers.isMobile() && datepicker_helpers.detectIOS()) {
_$(window).on("pageshow", function(e) {
if (e.originalEvent.persisted) {
setTimeout(function() {
_$(".asp_datepicker, .asp_datepicker_field", $this.n("searchsettings").get(0)).each(function() {
let format = _$(this).datepicker("option", "dateFormat");
_$(this).datepicker("option", "dateFormat", "yy-mm-dd");
_$(this).datepicker("setDate", _$(this).next(".asp_datepicker_hidden").val());
_$(this).datepicker("option", "dateFormat", format);
});
}, 100);
}
});
}
}, function() {
return datepicker_helpers.whichjQuery("datepicker");
});
};
/* harmony default export */ var datepicker = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/plugin/core/events/facet.js
"use strict";
let facet_helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.initFacetEvents = function() {
let $this = this, gtagTimer = null, inputCorrectionTimer = null;
external_DoMini_namespaceObject(".asp_custom_f input[type=text]:not(.asp_select2-search__field):not(.asp_datepicker_field):not(.asp_datepicker)", $this.n("searchsettings")).on("input", function(e) {
let code = e.keyCode || e.which, _this = this;
$this.ktype = e.type;
if (code === 13) {
e.preventDefault();
e.stopImmediatePropagation();
}
if (external_DoMini_namespaceObject(this).data("asp-type") === "number") {
if (this.value !== "") {
let inputVal = this.value.replaceAll(external_DoMini_namespaceObject(this).data("asp-tsep"), "");
let correctedVal = facet_helpers.inputToFloat(this.value);
let _this2 = this;
_this2.value = correctedVal;
correctedVal = correctedVal < parseFloat(external_DoMini_namespaceObject(this).data("asp-min")) ? external_DoMini_namespaceObject(this).data("asp-min") : correctedVal;
correctedVal = correctedVal > parseFloat(external_DoMini_namespaceObject(this).data("asp-max")) ? external_DoMini_namespaceObject(this).data("asp-max") : correctedVal;
clearTimeout(inputCorrectionTimer);
inputCorrectionTimer = setTimeout(function() {
_this2.value = facet_helpers.addThousandSeparators(correctedVal, external_DoMini_namespaceObject(_this2).data("asp-tsep"));
}, 400);
if (correctedVal.toString() !== inputVal) {
return false;
}
}
}
clearTimeout(gtagTimer);
gtagTimer = setTimeout(function() {
$this.gaEvent?.("facet_change", {
"option_label": external_DoMini_namespaceObject(_this).closest("fieldset").find("legend").text(),
"option_value": external_DoMini_namespaceObject(_this).val()
});
}, 1400);
$this.n("searchsettings").find("input[name=filters_changed]").val(1);
$this.setFilterStateInput(65);
if ($this.o.trigger.facet)
$this.searchWithCheck(240);
});
$this.n("searchsettings").find(".asp-number-range[data-asp-tsep]").forEach(function() {
this.value = facet_helpers.addThousandSeparators(this.value, external_DoMini_namespaceObject(this).data("asp-tsep"));
});
if (!$this.o.trigger.facet) return;
external_DoMini_namespaceObject("select", $this.n("searchsettings")).on("change slidechange", function(e) {
$this.ktype = e.type;
$this.n("searchsettings").find("input[name=filters_changed]").val(1);
$this.gaEvent?.("facet_change", {
"option_label": external_DoMini_namespaceObject(this).closest("fieldset").find("legend").text(),
"option_value": external_DoMini_namespaceObject(this).find("option:checked").get().map(function(item) {
return item.text;
}).join()
});
$this.setFilterStateInput(65);
$this.searchWithCheck(80);
if ($this.sIsotope != null) {
$this.sIsotope.arrange();
}
});
external_DoMini_namespaceObject("input:not([type=checkbox]):not([type=text]):not([type=radio])", $this.n("searchsettings")).on("change slidechange", function(e) {
$this.ktype = e.type;
$this.n("searchsettings").find("input[name=filters_changed]").val(1);
$this.gaEvent?.("facet_change", {
"option_label": external_DoMini_namespaceObject(this).closest("fieldset").find("legend").text(),
"option_value": external_DoMini_namespaceObject(this).val()
});
$this.setFilterStateInput(65);
$this.searchWithCheck(80);
});
external_DoMini_namespaceObject("input[type=radio]", $this.n("searchsettings")).on("change slidechange", function(e) {
$this.ktype = e.type;
$this.n("searchsettings").find("input[name=filters_changed]").val(1);
$this.gaEvent?.("facet_change", {
"option_label": external_DoMini_namespaceObject(this).closest("fieldset").find("legend").text(),
"option_value": external_DoMini_namespaceObject(this).closest("label").text()
});
$this.setFilterStateInput(65);
$this.searchWithCheck(80);
});
external_DoMini_namespaceObject("input[type=checkbox]", $this.n("searchsettings")).on("asp_chbx_change", function(e) {
$this.ktype = e.type;
$this.n("searchsettings").find("input[name=filters_changed]").val(1);
$this.gaEvent?.("facet_change", {
"option_label": external_DoMini_namespaceObject(this).closest("fieldset").find("legend").text(),
"option_value": external_DoMini_namespaceObject(this).closest(".asp_option").find(".asp_option_label").text() + (external_DoMini_namespaceObject(this).prop("checked") ? "(checked)" : "(unchecked)")
});
$this.setFilterStateInput(65);
$this.searchWithCheck(80);
});
external_DoMini_namespaceObject("input.asp_datepicker, input.asp_datepicker_field", $this.n("searchsettings")).on("change", function(e) {
$this.ktype = e.type;
$this.n("searchsettings").find("input[name=filters_changed]").val(1);
$this.gaEvent?.("facet_change", {
"option_label": external_DoMini_namespaceObject(this).closest("fieldset").find("legend").text(),
"option_value": external_DoMini_namespaceObject(this).val()
});
$this.setFilterStateInput(65);
$this.searchWithCheck(80);
});
external_DoMini_namespaceObject('div[id*="-handles"]', $this.n("searchsettings")).forEach(function(e) {
$this.ktype = e.type;
if (typeof this.noUiSlider != "undefined") {
this.noUiSlider.on("change", function(values) {
let target = typeof this.target != "undefined" ? this.target : this;
$this.gaEvent?.("facet_change", {
"option_label": external_DoMini_namespaceObject(target).closest("fieldset").find("legend").text(),
"option_value": values
});
$this.n("searchsettings").find("input[name=filters_changed]").val(1);
$this.setFilterStateInput(65);
$this.searchWithCheck(80);
});
}
});
};
/* harmony default export */ var facet = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/plugin/core/events/noui.js
"use strict";
external_AjaxSearchPro_namespaceObject.plugin.initNoUIEvents = function() {
let $this = this, $sett = $this.nodes.searchsettings, slider;
$sett.find("div[class*=noui-slider-json]").forEach(function(el, index) {
let jsonData = external_DoMini_namespaceObject(this).data("aspnoui");
if (typeof jsonData === "undefined") return false;
jsonData = WPD.Base64.decode(jsonData);
if (typeof jsonData === "undefined" || jsonData === "") return false;
let args = JSON.parse(jsonData);
Object.keys(args.links).forEach(function(k) {
args.links[k].target = "#" + $sett.get(0).id + " " + args.links[k].target;
});
if (external_DoMini_namespaceObject(args.node, $sett).length > 0) {
slider = external_DoMini_namespaceObject(args.node, $sett).get(0);
let $handles = external_DoMini_namespaceObject(el).parent().find(".asp_slider_hidden");
if ($handles.length > 1) {
args.main.start = [$handles.first().val(), $handles.last().val()];
} else {
args.main.start = [$handles.first().val()];
}
if (typeof noUiSlider !== "undefined") {
if (typeof slider.noUiSlider != "undefined") {
slider.noUiSlider.destroy();
}
slider.innerHTML = "";
noUiSlider.create(slider, args.main);
} else {
return false;
}
$this.noUiSliders[index] = slider;
slider.noUiSlider.on("update", function(values, handle) {
let value = values[handle];
if (handle) {
args.links.forEach(function(el2) {
let wn = wNumb(el2.wNumb);
if (el2.handle === "upper") {
if (external_DoMini_namespaceObject(el2.target, $sett).is("input"))
external_DoMini_namespaceObject(el2.target, $sett).val(value);
else
external_DoMini_namespaceObject(el2.target, $sett).html(wn.to(parseFloat(value)));
}
external_DoMini_namespaceObject(args.node, $sett).on("slide", function(e) {
e.preventDefault();
});
});
} else {
args.links.forEach(function(el2) {
let wn = wNumb(el2.wNumb);
if (el2.handle === "lower") {
if (external_DoMini_namespaceObject(el2.target, $sett).is("input"))
external_DoMini_namespaceObject(el2.target, $sett).val(value);
else
external_DoMini_namespaceObject(el2.target, $sett).html(wn.to(parseFloat(value)));
}
external_DoMini_namespaceObject(args.node, $sett).on("slide", function(e) {
e.preventDefault();
});
});
}
});
}
});
};
/* harmony default export */ var noui = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/plugin/core/events/settings.js
"use strict";
let settings_helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.initSettingsSwitchEvents = function() {
let $this = this;
$this.n("prosettings").on("click", function() {
if ($this.n("prosettings").data("opened") === "0") {
$this.showSettings?.();
} else {
$this.hideSettings?.();
}
});
if (settings_helpers.isMobile()) {
if ($this.o.mobile.force_sett_state === "open" || $this.o.mobile.force_sett_state === "none" && $this.o.settingsVisible) {
$this.showSettings?.(false);
}
} else {
if ($this.o.settingsVisible) {
$this.showSettings?.(false);
}
}
};
external_AjaxSearchPro_namespaceObject.plugin.initSettingsEvents = function() {
let $this = this, t;
let formDataHandler = function() {
if (typeof $this.originalFormData === "undefined") {
$this.originalFormData = settings_helpers.formData(external_DoMini_namespaceObject("form", $this.n("searchsettings")));
}
$this.n("searchsettings").off("mousedown touchstart mouseover", formDataHandler);
};
$this.n("searchsettings").on("mousedown touchstart mouseover", formDataHandler);
let handler = function(e) {
if (external_DoMini_namespaceObject(e.target).closest(".asp_w").length === 0) {
if (!$this.att("blocking") && !$this.dragging && external_DoMini_namespaceObject(e.target).closest(".ui-datepicker").length === 0 && external_DoMini_namespaceObject(e.target).closest(".noUi-handle").length === 0 && external_DoMini_namespaceObject(e.target).closest(".asp_select2").length === 0 && external_DoMini_namespaceObject(e.target).closest(".asp_select2-container").length === 0) {
$this.hideSettings?.();
}
}
};
$this.documentEventHandlers.push({
"node": document,
"event": $this.clickTouchend,
"handler": handler
});
external_DoMini_namespaceObject(document).on($this.clickTouchend, handler);
const setOptionCheckedClass = () => {
$this.n("searchsettings").find(".asp_option, .asp_label").forEach(function(el) {
if (external_DoMini_namespaceObject(el).find("input").prop("checked")) {
external_DoMini_namespaceObject(el).addClass("asp_option_checked").attr("aria-checked", true);
} else {
external_DoMini_namespaceObject(el).removeClass("asp_option_checked").attr("aria-checked", false);
}
});
};
setOptionCheckedClass();
$this.n("searchsettings").on("click", function() {
$this.settingsChanged = true;
});
$this.n("searchsettings").on("set_option_checked", function() {
setOptionCheckedClass();
});
$this.n("searchsettings").on($this.clickTouchend, function(e) {
if (!$this.dragging) {
$this.updateHref();
}
if (typeof e.target != "undefined" && !external_DoMini_namespaceObject(e.target).hasClass("noUi-handle")) {
e.stopImmediatePropagation();
} else {
if (e.type === "click")
e.stopImmediatePropagation();
}
});
external_DoMini_namespaceObject('.asp_option input[type="checkbox"]', $this.n("searchsettings")).on("asp_chbx_change", function() {
$this.settingsCheckboxToggle(external_DoMini_namespaceObject(this).closest(".asp_option_cat"));
const className = external_DoMini_namespaceObject(this).data("targetclass");
if (typeof className === "string" && className !== "") {
external_DoMini_namespaceObject(this).closest("fieldset").find("input." + className).prop("checked", external_DoMini_namespaceObject(this).prop("checked"));
}
});
$this.n("searchsettings").find('input[type="checkbox"]').on("asp_chbx_change", function() {
setOptionCheckedClass();
});
external_DoMini_namespaceObject('input[type="radio"]', $this.n("searchsettings")).on("change", function() {
setOptionCheckedClass();
});
external_DoMini_namespaceObject(".asp_option_cat", $this.n("searchsettings")).forEach(function(el) {
$this.settingsCheckboxToggle(external_DoMini_namespaceObject(el), false);
});
external_DoMini_namespaceObject("div.asp_option", $this.n("searchsettings")).on($this.mouseupTouchend, function(e) {
e.preventDefault();
e.stopImmediatePropagation();
if ($this.dragging) {
return false;
}
external_DoMini_namespaceObject(this).find('input[type="checkbox"]').prop("checked", !external_DoMini_namespaceObject(this).find('input[type="checkbox"]').prop("checked"));
clearTimeout(t);
let _this = this;
t = setTimeout(function() {
external_DoMini_namespaceObject(_this).find('input[type="checkbox"]').trigger("asp_chbx_change");
}, 50);
});
external_DoMini_namespaceObject("div.asp_option", $this.n("searchsettings")).on("keyup", function(e) {
e.preventDefault();
let keycode = e.keyCode || e.which;
if (keycode === 13 || keycode === 32) {
external_DoMini_namespaceObject(this).trigger("mouseup");
}
});
external_DoMini_namespaceObject("fieldset.asp_checkboxes_filter_box", $this.n("searchsettings")).forEach(function() {
let all_unchecked = true;
external_DoMini_namespaceObject(this).find('.asp_option:not(.asp_option_selectall) input[type="checkbox"]').forEach(function() {
if (external_DoMini_namespaceObject(this).prop("checked")) {
all_unchecked = false;
return false;
}
});
if (all_unchecked) {
external_DoMini_namespaceObject(this).find('.asp_option_selectall input[type="checkbox"]').prop("checked", false).removeAttr("data-origvalue");
}
});
external_DoMini_namespaceObject("fieldset", $this.n("searchsettings")).forEach(function() {
external_DoMini_namespaceObject(this).find(".asp_option:not(.hiddend)").last().addClass("asp-o-last");
});
};
/* harmony default export */ var events_settings = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/plugin/core/init/settings.js
"use strict";
let init_settings_helpers = external_AjaxSearchPro_namespaceObject.helpers;
external_AjaxSearchPro_namespaceObject.plugin.initSettings = function() {
if (!this.settingsInitialized) {
this.loadASPFonts?.();
this.initSettingsBox?.();
this.initSettingsEvents?.();
this.initButtonEvents?.();
this.initNoUIEvents?.();
this.initDatePicker?.();
this.initSelect2?.();
this.initFacetEvents?.();
}
};
external_AjaxSearchPro_namespaceObject.plugin.initSettingsBox = function() {
let $this = this;
let appendSettingsTo = function($el) {
let old = $this.n("searchsettings").get(0);
$this.nodes.searchsettings = $this.nodes.searchsettings.clone();
$el.append($this.nodes.searchsettings);
external_DoMini_namespaceObject(old).find("*[id]").forEach(function(el) {
if (el.id.indexOf("__original__") < 0) {
el.id = "__original__" + el.id;
}
});
$this.n("searchsettings").find("*[id]").forEach(function(el) {
if (el.id.indexOf("__original__") > -1) {
el.id = el.id.replace("__original__", "");
}
});
};
let makeSetingsBlock = function() {
$this.n("searchsettings").attr(
"id",
$this.n("searchsettings").attr("id").replace("prosettings", "probsettings")
);
$this.n("searchsettings").removeClass("asp_s asp_s_" + $this.o.id + " asp_s_" + $this.o.rid).addClass("asp_sb asp_sb_" + $this.o.id + " asp_sb_" + $this.o.rid);
$this.dynamicAtts["blocking"] = true;
};
let makeSetingsHover = function() {
$this.n("searchsettings").attr(
"id",
$this.n("searchsettings").attr("id").replace("probsettings", "prosettings")
);
$this.n("searchsettings").removeClass("asp_sb asp_sb_" + $this.o.id + " asp_sb_" + $this.o.rid).addClass("asp_s asp_s_" + $this.o.id + " asp_s_" + $this.o.rid);
$this.dynamicAtts["blocking"] = false;
};
$this.initSettingsAnimations?.();
if ($this.o.compact.enabled && $this.o.compact.position === "fixed" || init_settings_helpers.isMobile() && $this.o.mobile.force_sett_hover) {
makeSetingsHover();
appendSettingsTo(external_DoMini_namespaceObject("body"));
$this.n("searchsettings").css({
"position": "absolute"
});
$this.dynamicAtts["blocking"] = false;
} else {
if ($this.n("settingsAppend").length > 0) {
if ($this.n("settingsAppend").find(".asp_ss_" + $this.o.id).length > 0) {
$this.nodes.searchsettings = $this.nodes.settingsAppend.find(".asp_ss_" + $this.o.id);
if (typeof $this.nodes.searchsettings.get(0).referenced !== "undefined") {
++$this.nodes.searchsettings.get(0).referenced;
} else {
$this.nodes.searchsettings.get(0).referenced = 1;
}
} else {
if (!$this.att("blocking")) {
makeSetingsBlock();
}
appendSettingsTo($this.nodes.settingsAppend);
}
} else if (!$this.att("blocking")) {
appendSettingsTo(external_DoMini_namespaceObject("body"));
}
}
$this.n("searchsettings").get(0).id = $this.n("searchsettings").get(0).id.replace("__original__", "");
$this.detectAndFixFixedPositioning();
$this.settingsInitialized = true;
};
external_AjaxSearchPro_namespaceObject.plugin.initSettingsAnimations = function() {
let $this = this;
$this.settAnim = {
"showClass": "",
"showCSS": {
"visibility": "visible",
"display": "block",
"opacity": 1,
"animation-duration": $this.animOptions.settings.dur + "ms"
},
"hideClass": "",
"hideCSS": {
"visibility": "hidden",
"opacity": 0,
"display": "none"
},
"duration": $this.animOptions.settings.dur + "ms"
};
if ($this.animOptions.settings.anim === "fade") {
$this.settAnim.showClass = "asp_an_fadeIn";
$this.settAnim.hideClass = "asp_an_fadeOut";
}
if ($this.animOptions.settings.anim === "fadedrop" && !$this.att("blocking")) {
$this.settAnim.showClass = "asp_an_fadeInDrop";
$this.settAnim.hideClass = "asp_an_fadeOutDrop";
} else if ($this.animOptions.settings.anim === "fadedrop") {
$this.settAnim.showClass = "asp_an_fadeIn";
$this.settAnim.hideClass = "asp_an_fadeOut";
}
$this.n("searchsettings").css({
"-webkit-animation-duration": $this.settAnim.duration + "ms",
"animation-duration": $this.settAnim.duration + "ms"
});
};
/* harmony default export */ var init_settings = ((/* unused pure expression or super */ null && (AjaxSearchPro)));
;// ./src/client/bundle/optimized/asp-settings.js
/* harmony default export */ var asp_settings = (external_AjaxSearchPro_namespaceObject);
Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"];
/******/ })()
;

View File

@@ -0,0 +1,617 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
;// external "DoMini"
var external_DoMini_namespaceObject = DoMini;
var external_DoMini_default = /*#__PURE__*/__webpack_require__.n(external_DoMini_namespaceObject);
;// ./src/client/plugin/wrapper/instances.js
window._asp_instances_storage = window._asp_instances_storage || [];
const instances = {
instances: window._asp_instances_storage,
get: function(id, instance) {
this.clean();
if (typeof id === "undefined" || id === 0) {
return this.instances;
} else {
if (typeof instance === "undefined") {
let ret = [];
for (let i = 0; i < this.instances.length; i++) {
if (parseInt(this.instances[i].o.id) === id) {
ret.push(this.instances[i]);
}
}
return ret.length > 0 ? ret : false;
} else {
for (let i = 0; i < this.instances.length; i++) {
if (parseInt(this.instances[i].o.id) === id && parseInt(this.instances[i].o.iid) === instance) {
return this.instances[i];
}
}
}
}
return false;
},
set: function(obj) {
if (!this.exist(obj.o.id, obj.o.iid)) {
this.instances.push(obj);
return true;
} else {
return false;
}
},
exist: function(id, instance) {
this.clean();
for (let i = 0; i < this.instances.length; i++) {
if (parseInt(this.instances[i].o.id) === parseInt(id)) {
if (typeof instance === "undefined") {
return true;
} else if (parseInt(this.instances[i].o.iid) === parseInt(instance)) {
return true;
}
}
}
return false;
},
clean: function() {
let unset = [], _this = this;
this.instances.forEach(function(v, k) {
if (external_DoMini_namespaceObject(".asp_m_" + v.o.rid).length === 0) {
unset.push(k);
}
});
unset.forEach(function(k) {
if (typeof _this.instances[k] !== "undefined") {
_this.instances[k].destroy();
_this.instances.splice(k, 1);
}
});
},
destroy: function(id, instance) {
let i = this.get(id, instance);
if (i !== false) {
if (Array.isArray(i)) {
i.forEach(function(s) {
s.destroy();
});
this.instances = [];
} else {
let u = 0;
this.instances.forEach(function(v, k) {
if (parseInt(v.o.id) === id && parseInt(v.o.iid) === instance) {
u = k;
}
});
i.destroy();
this.instances.splice(u, 1);
}
}
}
};
/* harmony default export */ var wrapper_instances = (instances);
;// ./src/client/plugin/wrapper/api.ts
function api() {
"use strict";
const a4 = function(id, instance, func, args) {
let s = wrapper_instances.get(id, instance);
return s !== false && s[func].apply(s, [args]);
}, a3 = function(id, func, args) {
let s;
if (typeof func === "number" && isFinite(func)) {
s = wrapper_instances.get(id, func);
return s !== false && s[args].apply(s);
} else if (typeof func === "string") {
s = wrapper_instances.get(id);
return s !== false && s.forEach(function(i) {
const f = i[func];
if (typeof f === "function") {
f.apply(i, [args]);
}
});
}
}, a2 = function(id, func) {
let s;
if (func === "exists") {
return wrapper_instances.exist(id);
}
s = wrapper_instances.get(id);
return s !== false && s.forEach(function(i) {
const f = i[func];
if (typeof f === "function") {
f.apply(i);
}
});
};
if (arguments.length === 4) {
return a4.apply(this, arguments);
} else if (arguments.length === 3) {
return a3.apply(this, arguments);
} else if (arguments.length === 2) {
return a2.apply(this, arguments);
} else if (arguments.length === 0) {
console.log("Usage: ASP.api(id, [optional]instance, function, [optional]args);");
console.log("For more info: https://knowledgebase.ajaxsearchpro.com/other/javascript-api");
}
}
;// external "window.WPD.Base64"
var external_window_WPD_Base64_namespaceObject = window.WPD.Base64;
var external_window_WPD_Base64_default = /*#__PURE__*/__webpack_require__.n(external_window_WPD_Base64_namespaceObject);
;// ./src/client/global/utils/browser.ts
const isSafari = () => {
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
};
const whichjQuery = (plugin) => {
let jq = false;
if (typeof window.$ != "undefined") {
if (typeof plugin === "undefined") {
jq = window.$;
} else {
if (typeof window.$.fn[plugin] != "undefined") {
jq = window.$;
}
}
}
if (jq === false && typeof window.jQuery != "undefined") {
jq = window.jQuery;
if (typeof plugin === "undefined") {
jq = window.jQuery;
} else {
if (typeof window.jQuery.fn[plugin] != "undefined") {
jq = window.jQuery;
}
}
}
return jq;
};
const formData = function(form, d) {
let els = form.find("input,textarea,select,button").get();
if (arguments.length === 1) {
const data = {};
els.forEach(function(el) {
if (el.name && !el.disabled && (el.checked || /select|textarea/i.test(el.nodeName) || /text/i.test(el.type) || $(el).hasClass("hasDatepicker") || $(el).hasClass("asp_slider_hidden"))) {
if (data[el.name] === void 0) {
data[el.name] = [];
}
if ($(el).hasClass("hasDatepicker")) {
data[el.name].push($(el).parent().find(".asp_datepicker_hidden").val());
} else {
data[el.name].push($(el).val());
}
}
});
return JSON.stringify(data);
} else if (d !== void 0) {
const data = typeof d != "object" ? JSON.parse(d) : d;
els.forEach(function(el) {
if (el.name) {
if (data[el.name]) {
let names = data[el.name], _this = $(el);
if (Object.prototype.toString.call(names) !== "[object Array]") {
names = [names];
}
if (el.type === "checkbox" || el.type === "radio") {
let val = _this.val(), found = false;
for (let i = 0; i < names.length; i++) {
if (names[i] === val) {
found = true;
break;
}
}
_this.prop("checked", found);
} else {
_this.val(names[0]);
if ($(el).hasClass("asp_gochosen") || $(el).hasClass("asp_goselect2")) {
intervalUntilExecute(function(_$) {
_$(el).trigger("change.asp_select2");
}, function() {
return whichjQuery("asp_select2");
}, 50, 3);
} else if ($(el).hasClass("hasDatepicker")) {
intervalUntilExecute(function(_$) {
const node = _this.get(0);
if (node === void 0) {
return;
}
let value = names[0], format = _$(node).datepicker("option", "dateFormat");
_$(node).datepicker("option", "dateFormat", "yy-mm-dd");
_$(node).datepicker("setDate", value);
_$(node).datepicker("option", "dateFormat", format);
_$(node).trigger("selectnochange");
}, function() {
return whichjQuery("datepicker");
}, 50, 3);
}
}
} else {
if (el.type === "checkbox" || el.type === "radio") {
$(el).prop("checked", false);
}
}
}
});
return form;
}
};
const submitToUrl = function(action, method, input, target = "self") {
let form;
form = $('<form style="display: none;" />');
form.attr("action", action);
form.attr("method", method);
$("body").append(form);
if (typeof input !== "undefined" && input !== null) {
Object.keys(input).forEach(function(name) {
let value = input[name];
let $input = $('<input type="hidden" />');
$input.attr("name", name);
$input.attr("value", value);
form.append($input);
});
}
if (target == "new") {
form.attr("target", "_blank");
}
form.get(0).submit();
};
const openInNewTab = function(url) {
Object.assign(document.createElement("a"), { target: "_blank", href: url }).click();
};
const scrollToFirstVisibleElement = function(elements, offset = 0) {
for (const element2 of elements) {
if (recursiveCheckVisibility(element2)) {
window.scrollTo({
top: element2.getBoundingClientRect().top - 120 + window.pageYOffset + offset,
behavior: "smooth"
});
return true;
}
}
return false;
};
const recursiveCheckVisibility = function(element2) {
if (typeof element2.checkVisibility === "undefined") {
return true;
}
let el = element2, visible = true;
while (el !== null) {
if (!el.checkVisibility({
opacityProperty: true,
visibilityProperty: true,
contentVisibilityAuto: true
})) {
visible = false;
break;
}
el = el.parentElement;
}
return visible;
};
;// ./src/client/utils/onSafeDocumentReady.ts
const onSafeDocumentReady = (callback) => {
let wasExecuted = false;
const isDocumentReady = () => {
return document.readyState === "complete" || document.readyState === "interactive" || document.readyState === "loaded";
};
const removeListeners = () => {
window.removeEventListener("DOMContentLoaded", onDOMContentLoaded);
document.removeEventListener("readystatechange", onReadyStateChange);
};
const runCallback = () => {
if (!wasExecuted) {
wasExecuted = true;
callback();
removeListeners();
}
};
const onDOMContentLoaded = () => {
runCallback();
};
const onReadyStateChange = () => {
if (isDocumentReady()) {
runCallback();
}
};
if (isDocumentReady()) {
runCallback();
} else {
window.addEventListener("DOMContentLoaded", onDOMContentLoaded);
document.addEventListener("readystatechange", onReadyStateChange);
}
};
/* harmony default export */ var utils_onSafeDocumentReady = (onSafeDocumentReady);
;// ./src/client/plugin/wrapper/asp.ts
const ASP = window.ASP;
const ASP_EXTENDED = {
instances: wrapper_instances,
instance_args: [],
api: api,
initialized: false,
initializeAllSearches: function() {
const instances2 = this.getInstances();
instances2.forEach(function(data, i) {
external_DoMini_default().fn._(".asp_m_" + i).forEach(function(el) {
if (typeof el.hasAsp != "undefined") {
return true;
}
el.hasAsp = true;
return external_DoMini_default()(el).ajaxsearchpro(data);
});
});
},
initializeSearchByID: function(id, instance = 0) {
const data = this.getInstance(id);
const selector = instance === 0 ? ".asp_m_" + id : ".asp_m_" + id + "_" + instance;
external_DoMini_default().fn._(selector).forEach(function(el) {
if (typeof el.hasAsp != "undefined") {
return true;
}
el.hasAsp = true;
return external_DoMini_default()(el).ajaxsearchpro(data);
});
},
getInstances: function() {
external_DoMini_default().fn._(".asp_init_data").forEach((el) => {
const id = parseInt(el.dataset["aspId"] || "");
let data;
if (typeof el.dataset["aspdata"] != "undefined") {
data = external_window_WPD_Base64_default().decode(el.dataset["aspdata"]);
}
if (typeof data === "undefined" || data === "") return true;
this.instance_args[id] = JSON.parse(data);
});
return this.instance_args;
},
getInstance: function(id) {
if (typeof this.instance_args[id] !== "undefined") {
return this.instance_args[id];
}
return this.getInstances()[id];
},
initialize: function(id) {
if (typeof ASP.version == "undefined") {
return false;
}
if (ASP.script_async_load || ASP.init_only_in_viewport) {
const searches = document.querySelectorAll(".asp_w_container");
if (searches.length) {
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
const id2 = parseInt(entry.target.dataset.id ?? "0");
const instance = parseInt(entry.target.dataset.instance ?? "0");
this.initializeSearchByID(id2, instance);
observer.unobserve(entry.target);
}
});
});
searches.forEach(function(search) {
if (typeof search._is_observed !== "undefined") {
return;
}
search._is_observed = true;
observer.observe(search);
});
}
this.getInstances().forEach((inst, id2) => {
if (inst.compact.enabled) {
this.initializeSearchByID(id2);
}
});
} else {
if (typeof id === "undefined") {
this.initializeAllSearches();
} else {
this.initializeSearchByID(id);
}
}
this.initializeMutateDetector();
this.initializeHighlight();
this.initializeOtherEvents();
this.initialized = true;
return true;
},
initializeHighlight: function() {
if (!ASP.highlight.enabled) {
return;
}
const data = ASP.highlight.data;
let selector = data.selector !== "" && external_DoMini_default()(data.selector).length > 0 ? data.selector : "article", $highlighted, phrase;
selector = external_DoMini_default()(selector).length > 0 ? selector : "body";
const s = new URLSearchParams(location.search);
phrase = s.get("s") ?? s.get("asp_highlight") ?? s.get("asp_s") ?? s.get("asp_ls") ?? "";
external_DoMini_default()(selector).unhighlight({ className: "asl_single_highlighted" });
if (phrase === null) {
return;
}
phrase = phrase.trim();
if (phrase === "") {
return;
}
const words = phrase.trim().split(" ").map((s2) => s2.trim(".")).filter((s2) => s2.length >= data.minWordLength);
external_DoMini_default()(selector).highlight([phrase.trim()], {
element: "span",
className: "asp_single_highlighted_" + data.id + " asp_single_highlighted_exact",
wordsOnly: data.whole,
excludeParents: ".asp_w, .asp-try"
});
if (words.length > 0) {
external_DoMini_default()(selector).highlight(words, {
element: "span",
className: "asp_single_highlighted_" + data.id,
wordsOnly: data.whole,
excludeParents: ".asp_w, .asp-try, .asp_single_highlighted_" + data.id
});
}
if (data.scroll) {
if (!scrollToFirstVisibleElement(external_DoMini_default()(".asp_single_highlighted_" + data.id + ".asp_single_highlighted_exact").get(), data.scroll_offset)) {
scrollToFirstVisibleElement(external_DoMini_default()(".asp_single_highlighted_" + data.id).get(), data.scroll_offset);
}
}
},
initializeOtherEvents: function() {
let ttt, ts;
const $body = external_DoMini_default()("body");
ts = "#menu-item-search, .fa-search, .fa, .fas";
ts = ts + ", .fusion-flyout-menu-toggle, .fusion-main-menu-search-open";
ts = ts + ", #search_button";
ts = ts + ", .mini-search.popup-search";
ts = ts + ", .icon-search";
ts = ts + ", .menu-item-search-dropdown";
ts = ts + ", .mobile-menu-button";
ts = ts + ", .td-icon-search, .tdb-search-icon";
ts = ts + ", .side_menu_button, .search_button";
ts = ts + ", .raven-search-form-toggle";
ts = ts + ", [data-elementor-open-lightbox], .elementor-button-link, .elementor-button";
ts = ts + ", i[class*=-search], a[class*=-search]";
$body.on("click touchend", ts, () => {
clearTimeout(ttt);
ttt = setTimeout(() => {
this.initializeAllSearches();
}, 300);
});
if (typeof window.jQuery != "undefined") {
window.jQuery(document).on("elementor/popup/show", () => {
setTimeout(() => {
this.initializeAllSearches();
}, 10);
});
}
},
initializeMutateDetector: function() {
let t;
if (typeof ASP.detect_ajax != "undefined" && ASP.detect_ajax) {
const o = new MutationObserver(() => {
clearTimeout(t);
t = setTimeout(() => {
this.initializeAllSearches();
}, 500);
});
const body = document.querySelector("body");
if (body == null) {
return;
}
o.observe(body, { subtree: true, childList: true });
}
},
loadScriptStack: function(stack) {
let scriptTag;
if (stack.length > 0) {
const script = stack.shift();
if (script === void 0) {
return;
}
scriptTag = document.createElement("script");
scriptTag.src = script["src"];
scriptTag.onload = () => {
if (stack.length > 0) {
this.loadScriptStack(stack);
} else {
if (typeof window.WPD.AjaxSearchPro != "undefined") {
external_DoMini_default()._fn.plugin("ajaxsearchpro", window.WPD.AjaxSearchPro.plugin);
}
this.ready();
}
};
document.body.appendChild(scriptTag);
}
},
ready: function() {
const $this = this;
utils_onSafeDocumentReady(() => {
$this.initialize();
});
},
init: function() {
if (ASP.script_async_load) {
this.loadScriptStack(ASP.additional_scripts);
} else {
if (typeof window.WPD.AjaxSearchPro !== "undefined") {
this.ready();
}
}
}
};
/* harmony default export */ var asp = (ASP_EXTENDED);
;// external "window.WPD.intervalUntilExecute"
var external_window_WPD_intervalUntilExecute_namespaceObject = window.WPD.intervalUntilExecute;
;// ./src/client/plugin/wrapper/wrapper.js
function load() {
if (typeof window.WPD.AjaxSearchPro != "undefined") {
external_DoMini_namespaceObject._fn.plugin("ajaxsearchpro", window.WPD.AjaxSearchPro.plugin);
}
window.ASP = { ...window.ASP, ...asp };
external_window_WPD_intervalUntilExecute_namespaceObject(() => window.ASP.init(), function() {
return typeof window.ASP.version != "undefined";
});
}
;// ./src/client/bundle/optimized/asp-wrapper.js
(function() {
if (navigator.userAgent.indexOf("Chrome-Lighthouse") === -1) {
if (typeof window.WPD != "undefined" && typeof window.WPD.dom != "undefined") {
window.WPD.AjaxSearchPro._load = load;
load();
}
}
})();
/******/ })()
;