PageSourceSearch

https://www.floraandfauna.com.au/cdn/shop/t/254/assets/component-s…?v=106545864977953795011781677942

js floraandfauna.com.au collected 2026-10-02 20:57:38 UTC 2,951 bytes, 11 lines download raw bytes

1if(typeof ShippingNotice!="function"){class ShippingNotice2 extends HTMLElement{constructor(){super(),this.init()}init(){const freeShippingThreshold=Number(this.getAttribute("data-free-shipping")),cartTotal=Number(this.getAttribute("data-cart-total-amount")),freeShippingRemaining=cartTotal-Math.round(freeShippingThreshold*(Shopify.currency.rate?Number(Shopify.currency.rate):1));let shippingMessage="",shippingSuccess=!1;if(cartTotal==0)shippingMessage+=`<span> Spend ${this._formatMoney(Math.abs(freeShippingThreshold),KROWN.settings.shop_money_format)} to get free AU delivery</span>`;else if(freeShippingRemaining<0){shippingMessage=window.KROWN.settings.locales.shipping_notice_remaining_to_free.replace("{{ remaining_amount }}",this._formatMoney(Math.abs(freeShippingRemaining),KROWN.settings.shop_money_format));const progressRemaining=freeShippingThreshold-Math.abs(freeShippingRemaining),progressWidth=Math.abs(progressRemaining)/freeShippingThreshold*100;shippingMessage+=`
2    <div class="progress">
3    <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:${progressWidth}%">
4      <span id="current-progress"></span>
5    </div>
6    </div>
7    `}else shippingMessage=`<span> ${window.KROWN.settings.locales.shipping_notice_eligible_for_free}</span>`,shippingSuccess=!0;this.hasAttribute("data-show-alert")?this.innerHTML=`
8          <div class="alert alert--wide alert--${shippingSuccess?"success":"note"}">
9            ${shippingMessage}
10          </div>`:this.innerHTML=shippingMessage}_formatMoney(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));let value="";const placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function formatWithDelimiters(number,precision,thousands,decimal){if(thousands=thousands||",",decimal=decimal||".",isNaN(number)||number===null)return 0;number=(number/100).toFixed(precision);const parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ");break;case"amount_with_apostrophe_separator":value=formatWithDelimiters(cents,2,"'");break}return formatString.replace(placeholderRegex,value)}}typeof customElements.get("shipping-notice")>"u"&&customElements.define("shipping-notice",ShippingNotice2)}
11//# sourceMappingURL=/cdn/shop/t/254/assets/component-shipping-notice.js.map?v=106545864977953795011781677942

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.