PageSourceSearch

https://www.balharbourshops.com/wp-content/cache/min/1/wp-content/…/js/shopify.js?ver=1790856231

js balharbourshops.com collected 2026-10-02 03:01:50 UTC 5,983 bytes, 21 lines download raw bytes

1jQuery(document).ready(function(){setup_shop();wp.hooks.addAction('on.cartLoad','shopwp',function(cartState){if(cartState?.totalLineItems&&cartState?.totalLineItems>0){setCartBadge(cartState)}});wp.hooks.addAction('on.checkoutUpdate','shopwp',function(cartState){setCartBadge(cartState)});wp.hooks.addAction('on.checkoutUpdate','shopwp',function(cartState){setCartBadge(cartState)});wp.hooks.addAction('on.cartToggle','shopwp',function(isOpen){if(!isOpen.isCartOpen){wp.hooks.doAction('do.cartToggle','close')}})});function setCartBadge(cartState){var num=0;cartState.checkoutCache.lineItems.map((item)=>{num+=item.quantity});if(jQuery('#CartCount').length>0){jQuery('#CartCount .cart-count').html(num)}else{jQuery('.wps-btn-cart').append('<div id="CartCount" class="site-header__cart-count critical-hidden" data-cart-count-bubble="">\
2				<span class="cart-count" data-cart-count="">'+num+'</span>\
3				<span class="icon__fallback-text medium-up--hide">items</span>\
4			</div>')}}
5function setup_shop(){var shop_prices=typeof shopify_prices!=='undefined'?shopify_prices:{min:0,max:170000};setup_price_slider(shop_prices);jQuery('#filter-catalog-form').submit(function(e){submit_catalog_form(!0);return!1});jQuery("#filter-catalog-form input[type=text], #filter-catalog-form input[type=checkbox]").change(function(){if($(this).is(':checkbox')){var input=$(this).parent().parent().parent().children('.filter-parent').children('input');if(input.is(':checked')){input.prop("checked",!1)}}
6submit_catalog_form(!0)});jQuery('.boost-pfs-filter-clear-all').click(function(){var checkboxes=jQuery('.filter-catalog-list').find('input');if(checkboxes.length>0&&checkboxes.attr('type')=="checkbox"){checkboxes.prop("checked",!1)}
7jQuery('.price-slider input').val("");submit_catalog_form(!0)});jQuery('.filter-clear-single').click(function(){var type=jQuery(this).data('type');var value=jQuery(this).data('value');var checkboxes=jQuery('.filter-'+type).find('input[value="'+value+'"]');if(checkboxes.length>0&&checkboxes.attr('type')=="checkbox"){checkboxes.prop("checked",!1)}
8submit_catalog_form(!0)});jQuery('.shopify-filter-clear').click(function(){var checkboxes=jQuery(this).next('.filter-catalog-list').find('input');if(checkboxes.length>0&&checkboxes.attr('type')=="checkbox"){checkboxes.prop("checked",!1)}else{jQuery('.price-slider input').val("")}
9submit_catalog_form(!0)});jQuery('.container-shop-grid .nav-links a').click(function(e){var href=jQuery(this).attr('href');var paged=parseInt(href.match(/\/page\/(\d*)/)?href.match(/\/page\/(\d*)/)[1]:1);var url=(location.origin+location.pathname).split("/page/")[0].replace(/\/?$/,"/");if(paged>1){url+="page/"+paged+"/"}
10url+=location.search;console.log(url);history.pushState(null,'',url);jQuery('.wp-shop-loading').show();setTimeout(()=>{submit_catalog_form()},100);return!1});$("#filter-catalog-form .child-filter-catalog-list input[type=checkbox]:checked").each(function(){$(this).parent().parent().parent().addClass('open')})}
11function gup(name,url){if(!url)url=location.href;name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return results==null?null:results[1]}
12function submit_catalog_form(resetPaged=!1){jQuery('.wp-shop-loading').show();const headers=new Headers({'Content-Type':'application/json','X-WP-Nonce':ajax_var.nonce});var phrase=gup('phrase');var paged=parseInt(location.href.match(/\/page\/(\d*)/)?location.href.match(/\/page\/(\d*)/)[1]:1);var sort=gup('sort-by',jQuery('#sort-by').val());var url=(location.origin+location.pathname).split("/page/")[0].replace(/\/?$/,"/");if(paged>1&&!resetPaged){url+="page/"+paged+"/"}
13var urlParams=new URLSearchParams(jQuery("#filter-catalog-form").serialize());if(paged>1&&!resetPaged){urlParams=`${urlParams}`+"&paged="+paged}
14if(ajax_var.post_id){urlParams+="&id="+ajax_var.post_id}
15if(phrase){urlParams+="&phrase="+phrase}
16if(sort){url+="?sort-by="+sort+"&"+urlParams;urlParams=`${urlParams}`+"&sort-by="+sort}else{url+="?"+urlParams}
17history.pushState(null,'',url);fetch(`${ajax_var.url}/get-products?`+urlParams,{method:'get',headers:headers,credentials:'same-origin'}).then(response=>{return response.ok?response.json():'Not Found...'}).then(json_response=>{jQuery('.container-filters').html(json_response.filters);jQuery('.container-shop-grid').html(json_response.products);setup_shop();initCustomForms();jQuery('body').mobileNav({menuActiveClass:'filter-catalog-active',menuOpener:'.opener-filter-catalog, .close-filter-catalog'}).data('MobileNav');$([document.documentElement,document.body]).animate({scrollTop:$(".catalog-wrap").offset().top-200},1000)})}
18function setup_price_slider(shop_prices){var priceSlider=document.getElementById('wp-shop-price');if(priceSlider==null){return}
19var f=shop_prices.max/4;var prices=[0,f,f*2,f*3,shop_prices.max];var minPrice=document.getElementById('min-price');var maxPrice=document.getElementById('max-price');var start=minPrice.value;var end=maxPrice.value;noUiSlider.create(priceSlider,{start:[start,end!=""?end:shop_prices.max],connect:!0,range:{'min':0,'max':shop_prices.max},pips:{mode:'values',values:prices,density:20}});priceSlider.noUiSlider.on('update',function(values,handle){var value=values[handle];if(handle){maxPrice.value=Math.round(value)}else{minPrice.value=Math.round(value)}});priceSlider.noUiSlider.on('change.one',function(){submit_catalog_form(!0)});minPrice.addEventListener('change',function(){priceSlider.noUiSlider.set([this.value,
19null]);submit_catalog_form(!0)});maxPrice.addEventListener('change',function(){priceSlider.noUiSlider.set([null,this.value]);submit_catalog_form(!0)})}
20function toggle_child_open(_element){jQuery(_element).toggleClass('open')}
21jQuery(document).ready(function($){$('.jcf-ignore-field').children('select').addClass('jcf-ignore');$('.jcf-ignore-find-field').find('select').addClass('jcf-ignore');var email=gup('email');if(email){$('.email-autofill input').val(email)}})

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