PageSourceSearch

https://uscha.com.au/cdn/shop/t/31/assets/z__jsShippingCalculator.js?v=134110884882748964611653475909

js uscha.com.au collected 2026-09-26 07:46:23 UTC 6,794 bytes, 23 lines download raw bytes

1(()=>{var __webpack_exports__={};window.PXUTheme.jsShippingCalculator={init:function($section){window.PXUTheme.jsShippingCalculator=$.extend(this,window.PXUTheme.getSectionData($section)),window.PXUTheme.theme_settings.shipping_calculator_enabled&&ShippingCalculator.init($("[data-cart-shipping]"))},unload:function($section){}};const ShippingCalculator={visibleClass:"shipping_calculator__response--visible",$shippingButton:$(".get-rates"),countrySelector:$("#address_country")[0],provinceSelector:$("#address_province")[0],zipSelector:$("#address_zip")[0],$shippingResponseContainer:$("[data-cart-shipping-response-container]"),$shippingResponse:$("[data-cart-shipping-response]"),$shippingResponseMessage:$("[data-cart-shipping-message]"),$shippingResponseRates:$("[data-cart-shipping-rates]"),init:function(){$.extend(this,window.PXUTheme.jsShippingCalculator);const countryProvinceSelector=new window.Shopify.theme.addresses.CountryProvinceSelector(window.PXUTheme.allCountryOptionTags),$provinceWrapper=$("#address_province_container");countryProvinceSelector.build(this.countrySelector,this.provinceSelector,{onCountryChange:provinces=>{provinces.length?$provinceWrapper.show():$provinceWrapper.hide()}}),this.$shippingButton.on("click",event=>{event.preventDefault(),this.onSubmit()})},renderResponse:function(response,shippingAddress){const address=this.formatAddress(shippingAddress);this.hideShippingResponse(),this.$shippingResponseMessage.empty(),this.$shippingResponseRates.empty();let responseText="";if(response.length>1){const firstRate=this.formatRate(response[0].price);responseText=this.shipping.multiple_rates.replace("*address*",address).replace("*number_of_rates*",response.length).replace("*rate*",`<span class='money'>${firstRate}</span>`)}else response.length===1?responseText=this.shipping.one_rate.replace("*address*",address):responseText=this.shipping.no_rates;this.$shippingResponseMessage.html(responseText);for(let i=0;i<response.length;i++){const rate=response[i],price=this.formatRate(rate.price),rateValue=this.shipping.rate_value.replace("*rate_title*",rate.name).replace("*rate*",`&nbsp;<span class='money'>${price}</span>`);window.PXUTheme.theme_settings.icon_style==="icon_solid"?this.$shippingResponseRates.append(`<li>
2            <span class="icon" data-icon="box">
3              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
4                <g id="box">
5                  <polygon points="47.5 46.89 47.5 91.72 7.5 74.07 7.5 29.23 47.5 46.89"></polygon>
6                  <path d="M92.5,29.23V74.07L75.84,81.42V71.73a2.5,2.5,0,1,0-5,0v11.9L52.5,91.72V46.89l18.34-8.1V47.9a2.5,2.5,0,1,0,5,0V36.59Z"></path>
7                  <polygon points="67.2 34.93 50 42.52 11.19 25.4 28.89 17.59 67.2 34.93"></polygon>
8                  <polygon points="88.81 25.4 73.35 32.23 35.05 14.88 50 8.28 88.81 25.4"></polygon>
9                </g>
10              </svg>
11            </span>
12            ${rateValue}
13            </li>`):this.$shippingResponseRates.append(`<li>
14              <span class="icon" data-icon="box">
15                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
16                  <g id="box">
17                    <path d="M96.92,24.34l0-.13a2.22,2.22,0,0,0-.2-.41l0-.05a3,3,0,0,0-.33-.38l-.1-.07a1.91,1.91,0,0,0-.41-.26s0,0,0,0h0l-45-19.84a2,2,0,0,0-1.62,0L28.52,12.29a2,2,0,0,0-.93.41L4.19,23c-.07,0-.13.08-.19.11l-.09.05,0,0a2.45,2.45,0,0,0-.35.29l0,.05a2.35,2.35,0,0,0-.23.32L3.21,24a1.88,1.88,0,0,0-.12.3,1,1,0,0,1,0,.14,2.33,2.33,0,0,0,0,.38s0,0,0,.05v0H3V75.15A2,2,0,0,0,4.19,77l45,19.85.17,0,.14.05A2.07,2.07,0,0,0,50,97h0a2.24,2.24,0,0,0,.51-.07l.13-.05.17,0L95.81,77A2,2,0,0,0,97,75.15V24.85A1.7,1.7,0,0,0,96.92,24.34ZM50,7.19,90,24.85,73.35,32.22,33.81,14.33Zm0,35.33L10,24.85l19-8.36,39.54,17.9ZM7,27.92,48,46V91.93L7,73.84ZM75.34,81.64V71.18a2,2,0,0,0-4,0V83.4L52,91.93V46l19.34-8.53v9.87a2,2,0,0,0,4,0V35.71L93,27.92V73.84Z"></path>
18                  </g>
19                </svg>
20              </span>
21              ${rateValue}
22              </li>`)}window.PXUTheme.currencyConverter&&window.PXUTheme.currencyConverter.convertCurrencies(),this.enableShippingButton(),this.showShippingResponse()},onSubmit:function(){this.disableShippingButton();const shippingAddress={};shippingAddress.country=$(this.countrySelector).val()||"",shippingAddress.province=$(this.provinceSelector).val()||"",shippingAddress.zip=$(this.zipSelector).val()||"",Shopify.getCartShippingRatesForDestination(shippingAddress,this.renderResponse.bind(this),this.onShopifyError.bind(this))},onShopifyError:function(xhr=null){if(!xhr)return;const errors=$.parseJSON(xhr.responseText);errors.zip&&errors.zip.length>0&&(this.hideShippingResponse(),this.$shippingResponseMessage.empty(),this.$shippingResponseRates.empty(),errors.zip[0].indexOf("is not val
22id")!==-1?this.$shippingResponseMessage.html(`${window.PXUTheme.translation.shipping_calculator_zip_code} ${window.PXUTheme.translation.shipping_calculator_is_not_valid}`):errors.zip[0].indexOf("can't be blank")!==-1&&this.$shippingResponseMessage.html(`${window.PXUTheme.translation.shipping_calculator_zip_code} ${window.PXUTheme.translation.shipping_calculator_is_not_blank}`),this.showShippingResponse(),this.enableShippingButton()),errors.country&&errors.country.length>0&&(this.hideShippingResponse(),this.$shippingResponseMessage.empty(),errors.country[0].indexOf("is not supported")!==-1?this.$shippingResponseMessage.html(`Country ${window.PXUTheme.translation.shipping_calculator_is_not_supported}`):errors.country[0].indexOf("can't be blank")!==-1&&this.$shippingResponseMessage.html(`Country ${window.PXUTheme.translation.shipping_calculator_is_not_blank}`),this.showShippingResponse(),this.enableShippingButton())},enableShippingButton:function(){this.$shippingButton.text(window.PXUTheme.translation.shipping_calculator_submit_btn).attr("disabled",!1)},disableShippingButton:function(){this.$shippingButton.text(window.PXUTheme.translation.shipping_calculator_submit_btn_disabled).attr("disabled",!0)},formatRate:function(cents){if(typeof Shopify.formatMoney=="function")return Shopify.formatMoney(cents,window.PXUTheme.currency.money_format)},formatAddress:function(shippingAddress){const addressBase=[];return shippingAddress.zip.length&&addressBase.push(shippingAddress.zip.trim()),shippingAddress.province.length&&addressBase.push(shippingAddress.province),shippingAddress.country.length&&addressBase.push(shippingAddress.country),addressBase.join(", ")},showShippingResponse:function(){this.$shippingResponseContainer.addClass(this.visibleClass)},hideShippingResponse:function(){this.$shippingResponseContainer.removeClass(this.visibleClass)}}})();
23//# sourceMappingURL=/cdn/shop/t/31/assets/z__jsShippingCalculator.js.map?v=134110884882748964611653475909

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.