var loadScript=function(t,e){var n=document.createElement("script");n.type="text/javascript",n.readyState?n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(n.onreadystatechange=null,e())}:n.onload=function(){e()},n.src=t,document.getElementsByTagName("head")[0].appendChild(n)},myFrontendJavascriptQB=function(st){function t(e){function n(t){t<e.length?st.ajax({url:e[t],dataType:"script",cache:!1,success:function(){n(t+1)}}):i.resolve()}var i=st.Deferred();return n(0),i}var e=["//cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.min.js"];"undefined"==typeof Currency&&e.push("//cdn.shopify.com/s/javascripts/currencies.js");var t=t(e).done(function(){function e(){if("undefined"!=typeof Weglot)return Weglot.getCurrentLang()}function i(t){return"liftket.myshopify.com"!==g()&&"zito-cover-cases.myshopify.com"!==g()&&"xyz-edsil.myshopify.com"!==g()||(t=t.concat("?locale=").concat(e())),t}function t(t){for(var e=document.cookie.split(";"),n=0;n<e.length;n++){var i=e[n].split("=");if(t==i[0].trim())return decodeURIComponent(i[1])}return null}function _(){return t("cart")}function n(t){var e=window.qb.enabled_multi_currencies.current_shop_currency,n=window.qb.enabled_multi_currencies.currencies_count,i=t.currency;return 1<n&&e!=i}function S(t){var e=window.qb.shop.currency,n=window.qb.enabled_multi_currencies.current_shop_currency;return e==n?1*t:Currency.convert(t,e,n)}function o(t){var n=window.location.hostname;return new Promise(function(e){st.get("https://"+n+"/cart/update?currency="+t.currency,function(t){e(t)}).fail(function(t){console.log(t)})})}function a(){setInterval(function(){var t=document.querySelectorAll(".additional-checkout-buttons, .dynamic-checkout__content");0<t.length&&(t[0].style.visibility="hidden")},1e3)}function r(n,i){var o=null,t=null;if("rountine.myshopify.com"!=n.shopify_domain&&"animalshop111.myshopify.com"!=n.shopify_domain&&"animal112.myshopify.com"!=n.shopify_domain&&"animal111.myshopify.com"!=n.shopify_domain)return window.qb.convertedCurrency.converted_amount=1,new Promise(function(e){(t=c(n,i)).then(function(t){200==t.status&&(X()?i.updateCart(function(){tt(),0<(o=R()).length&&new W(i,o,n).applyDiscounts(),e([])}):e([]))}),t["catch"](function(){X()&&i.updateCart(function(){tt(),0<(o=R()).length&&new W(i,o,n).applyDiscounts(),e([])})})})}function c(t){if("rountine.myshopify.com"!=t.shopify_domain&&"animalshop111.myshopify.com"!=t.shopify_domain&&"animal112.myshopify.com"!=t.shopify_domain&&"animal111.myshopify.com"!=t.shopify_domain){var e=window.location.hostname,n="https://{{shop_hostname}}/cart.js".replace("{{shop_hostname}}",e);return fetch(n)}}function L(){return window.qb.enabled_multi_currencies.currency_format}function s(e){e.currency,window.qb.enabled_multi_currencies.current_shop_currency;return new Promise(function(t){n(e)&&e.enabled_multi_currencies,t([])})}function y(e,n){try{var i=null,t=null;(t=c(e,n)).then(function(t){200==t.status&&X()&&n.updateCart(function(){tt(),0<(i=R()).length&&new W(n,i,e).applyDiscounts();var t=new V(n);C()&&(window.qb.datastore.shop.enabled_discount_codes?n.getAppliedDiscountCode(function(){t.updatePage(!1)}):t.updatePage(!1)),e.ajax_cart_integration_enabled&&t.updatePage(!0)})}),t["catch"](function(){X()&&n.updateCart(function(){tt(),0<(i=R()).length&&new W(n,i,e).applyDiscounts();var t=new V(n);C()&&(window.qb.datastore.shop.enabled_discount_codes?n.getAppliedDiscountCode(function(){t.updatePage(!1)}):t.updatePage(!1)),e.ajax_cart_integration_enabled&&t.initializeAjaxCartObserver(e)})})}catch(o){console.log(o)}}function g(){for(var t=document.getElementsByTagName("script"),e="",n="",i=0;i<t.length;i++)if((e=t[i].getAttribute("src"))&&(e=e.match(/^(.*)widget\/javascript(\?\s*(.+))?\s*/))){n=e[3].match(/shop=(.+).myshopify.com/)[1];break}return".myshopify.com"===(n+=".myshopify.com")&&nt(window.Shopify)&&nt(window.Shopify.shop)&&(n=window.Shopify.shop),".myshopify.com"===n&&console.log("QB: unable to get shop domain"),n}function m(){return"abc-edsil.myshopify.com"===g()||"xyz-edsil.myshopify.com"===g()||"wnteststore5.myshopify.com"===g()||"crazy-apps-house.myshopify.com"===g()||"preorder-tagging.myshopify.com"===g()||"wholesale-staging-store.myshopify.com"===g()||"qb-edsil-local.myshopify.com"===g()||"crn-edsil-stag.myshopify.com"===g()?"https://wod2.ngrok.io":"qb-chris-local.myshopify.com"===g()?"https://wod.ngrok.io":"qbn-marc-local.myshopify.com"===g()?"https://wod4.ngrok.io":"qbn-test-local.myshopify.com"===g()?"https://wod4.ngrok.io":"qbn-neil-local.myshopify.com"===g()?"https://wod9.ngrok.io":"truenito-store.myshopify.com"==g()?"https://truenito.ngrok.io":"qbteststore.myshopify.com"===g()?"https://quantity-breaks-now-staging.herokuapp.com":"https://quantity-breaks-now.herokuapp.com"}function u(t){var e=location.search.match(/variant=([0-9]+)/);return null!=e?e[1]:"gdt-implant.myshopify.com"==t.shopify_domain?st(qb.shop.form_selector).find(".ced-qty-input").attr("data-variant-id"):"radio"==st(t.form_selector).find('select[name="id"], input[name="id"]').attr("type")?st(t.form_selector).find('input[name="id"]:checked').val():st(t.form_selector).find('select[name="id"], input[name="id"], select[name="id[]"]').val()}function d(){return"undefined"!=typeof window.qb&&"undefined"!=typeof window.qb.datastore}function l(t){window.qb.datastore={},window.qb.datastore.shop=t.shop,window.qb.datastore.discount_groups=t.discount_groups,window.qb.datastore.net_order_tags=t.net_order_tags}function p(){st.ajax({cache:!1,type:"GET",url:m()+"/get_settings?shopify_domain="+g(),success:function(t){l(t),rt()}})}function h(){return!!(P()&&0<v().length)}function P(){return"undefined"==typeof window.qb.shop&&f(),window.qb.shop}function f(){d()&&"undefined"!=typeof window.qb.datastore.shop?"undefined"!=typeof window.qb.datastore.theme_setting?window.qb.shop=b():window.qb.shop=window.qb.datastore.shop:window.qb.shop=!1}function b(){var n=window.qb.datastore.theme_setting,i=window.qb.datastore.shop,t=[["cart_subtotal_selector","cart_subtotal_selector"],["checkout_button_selector","checkout_button_selector"],["form_selector","form_selector"],["quantity_selector","quantity_selector"],["cart_form_selector","cart_form_selector"],["quantity_button_selector","quantity_button_selector"],["variant_selector","variant_selector"],["swatch_selector","swatch_selector"],["mutation_ids","mutation_ids"],["mutation_classes","mutation_classes"],["table_placement_selector","table_placement_selector"],["shipping_rates_form_placement_selector","shipping_rates_form_placement_selector"],["regular_cart_subtotal_table_placement_selector","regular_cart_subtotal_table_placement_selector"],["discount_log_placement_selector","discount_log_placement_selector"],["discount_log_position","discount_log_position"],["product_selector_container","product_selector_container"],["net_order_success_redirect_url","net_order_success_redirect_url"],["discount_code_input_placeholder","discount_code_input_placeholder"],["discount_code_button_text","discount_code_button_text"],["currency_option_selector","currency_option_selector"]];return st.each(t,function(t,e){i[e[0]]=w(i[e[0]],n[e[1]])}),et(n.shipping_rates_form_position)&&!et(i.shipping_rates_form_position)?i.shipping_rates_form_position=n.shipping_rates_form_position:et(n.shipping_rates_form_position)||et(i.shipping_rates_form_position)||(i.shipping_rates_form_position="after"),et(n.shipping_rates_form_placement_selector)&&!et(i.shipping_rates_form_placement_selector)?i.shipping_rates_form_placement_selector=n.shipping_rates_form_placement_selector:et(n.shipping_rates_form_placement_selector)||et(i.shipping_rates_form_placement_selector)||(i.shipping_rates_form_placement_selector="form[action^='/cart']:visible table:first, .cart-row:nth-last-child(2)"),et(i.regular_cart_subtotal_table_placement_selector)||(i.regular_cart_subtotal_table_placement_selector=i.cart_subtotal_selector),et(i.discount_log_placement_selector)||(i.discount_log_placement_selector=i.cart_subtotal_selector),null==i.custom_css&&(i.custom_css=""),et(n.theme_css)&&(i.custom_css=i.custom_css+"\r\n"+n.theme_css),i}function w(t,e){return et(t)?t:e}function v(){return d()&&"undefined"!=typeof window.qb.datastore.discount_groups?window.qb.datastore.discount_groups:[]}function R(){return"undefined"!=typeof window.qb&&"undefined"!=typeof window.qb.discount_groups?window.qb.discount_groups:[]}function q(){return"undefined"==typeof window.qb||"undefined"==typeof window.qb.customer_id?"":window.qb.customer_id}function M(){return-1!==window.location.href.indexOf("/products")}function C(){return-1!==window.location.href.indexOf("/cart")}function T(t){if("function"==typeof Spinner){var e=new Spinner({top:"-50px",left:"50%",position:"relative"}).spin().el;st(t).first().parent().after(e)}}function O(){st(".spinner").remove()}function A(t){st(document).on("change",t.variant_selector,function(){Y(t)}),0<st(t.swatch_selector).length&&("hqtecno.myshopify.com"===g()?st(t.swatch_selector).click(function(){setTimeout(function(){Y(t)},1e3)}):st(document).on("click",t.swatch_selector,function(){Y(t)})),(new D).setup(function(){Y(t)})}function D(){}function Y(t){0!=st(".quantity-breaks-now-wrapper").length&&st(".quantity-breaks-now-wrapper").remove(),x(t)}function k(n,i){var o=[];st.each(window.qb.discount_groups,function(t,e){e.appliesToProduct(window.qb.product.id,window.qb.product_collections)&&o.push(e)}),1<o.length&&et(n.multiple_groups_notice)&&st("div.quantity-breaks-now-wrapper").append('<div class="multiple-groups-notice">'+n.multiple_groups_notice+"</div>"),st.each(o,function(t,e){e.printDiscountTable(n,i)})}function N(n){var i=null;return 1==window.qb.product.variants.length?i=window.qb.product.variants[0]:st.each(window.qb.product.variants,function(t,e){e.id==n&&(i=e)}),i}function F(t){var e=N(u(t));return null!=e?e.price:null}function x(t){var e=null;e=et(t.table_placement_selector)?st(t.table_placement_selector).first():st(t.form_selector).first(),0==st(".quantity-breaks-now-wrapper").length&&e.after('<div class="quantity-breaks-now-wrapper"></div>'),k(t,F(t))}function E(t,e){function a(t,e){return void 0===t?e:t}function n(t,e,n,i){if(e=a(e,2),n=a(n,","),i=a(i,"."),isNaN(t)||null==t)return 0;var o=(t=(t/100).toFixed(e)).split(".");return o[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n)+(o[1]?i+o[1]:"")}if(void 0===t||null==t)return"";if("string"==typeof t&&0==t.length)return"";var i=/\{\{\s*(\w+)\s*\}\}/;"string"==typeof t&&(t=t.replace(".",""));var o="";switch(e.match(i)[1]){case"amount":o=n(t,2);break;case"amount_no_decimals":o=n(t,0);break;case"amount_no_decimals_with_comma_separator":o=n(t,0,".",",");break;case"amount_with_comma_separator":o=n(t,2,".",",")}return e.replace(i,o)}function B(t){return Math.round(100*t)+"%"}function I(n,i){setTimeout(function(){st(n.checkout_button_selector).off("click","**"),st("#OffAmazonPaymentsWidgets0").unbind("click#OffAmazonPaymentsWidgets0"),st("#OffAmazonPaymentsWidgets0").unbind("apay-OffAmazonPayments_mec_#OffAmazonPaymentsWidgets0"),st(n.checkout_button_selector).prop("onclick",null),"lovely-fluffy-panda.myshopify.com"===g()||"luringskin.myshopify.com"===g()||"laumiere-gourmet-fruits.myshopify.com"===g()||"gotchu-philippines.myshopify.com"===g()||"maison-vantage.myshopify.com"===g()||"yogaclicks.myshopify.com"===g()||"airs-store.myshopify.com"===g()||"nouvelle-fortune-officielle.myshopify.com"===g()?st(document).on("click",n.checkout_button_selector,function(t){var e=st(".qb-discount-code-inputs input[type='text']").val();st(t.target).hasClass("qb-net-order-button")||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),st(n.checkout_button_selector).prop("disabled",!0),T(n.checkout_button_selector),o(n).then(function(){r(n,i).then(function(){window.qb.datastore.shop.enabled_discount_codes&&void 0!==e&&e.length<1?i.getAppliedDiscountCode(function(){U(n,i)}):U(n,i)})}))}):"the-frontal-queen-la-store.myshopify.com"===g()||"rountine.myshopify.com"==g()||"animalshop111.myshopify.com"==g()||"animal112.myshopify.com"==g()||"animal111.myshopify.com"==g()||"dogcatpig123.myshopify.com"==g()||"pifito.myshopify.com"==g()||"purpletuls.myshopify.com"===g()?st(n.checkout_button_selector).click(function(t){var e=st(".qb-discount-code-inputs input[type='text']").val();st(t.target).hasClass("qb-net-order-button")||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),st(n.checkout_button_selector).prop("disabled",!0),T(n.checkout_button_selector),window.qb.datastore.shop.enabled_discount_codes&&void 0!==e&&e.length<1?i.getAppliedDiscountCode(function(){U(n,i)}):U(n,i))}):st(n.checkout_button_selector).click(function(t){var e=st(".qb-discount-code-inputs input[type='text']").val();st(t.target).hasClass("qb-net-order-button")||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),st(n.checkout_button_selector).prop("disabled",!0),T(n.checkout_button_selector),o(n).then(function(){r(n,i).then(function(){window.qb.datastore.shop.enabled_discount_codes&&void 0!==e&&e.length<1?i.getAppliedDiscountCode(function(){U(n,i)}):U(n,i)})}))})},1e3)}function U(n,t){if("undefined"==typeof window.qb.checkingOut||!window.qb.checkingOut){if(window.qb.checkingOut=!0,0<st(n.agree_to_terms_selector).length&&st(n.agree_to_terms_selector+":checked").length!=st(n.agree_to_terms_selector).length)return;var e=t.createDraftOrder();st.ajax({cache:!1,type:"POST",url:m()+"/get_checkout_url?shopify_domain="+g(),data:JSON.stringify(e),dataType:"json",contentType:"application/json; charset=utf-8",success:function(t){if(O(),st(n.checkout_button_selector).prop("disabled",!1),t.invoice_url){var e=t.invoice_url.replace("checkout.shopify.com",n.primary_domain);e=i(e),"undefined"!=typeof window.qb.extraCheckoutParams?window.location.href=e.concat("?").concat(window.qb.extraCheckoutParams):window.location.href=e}else alert("An error occured, and we're unable to process your order at this time. Please contact customer service for assistance. ");window.qb.checkingOut=!1}})}}function $(t,e){var n=R();0<n.length&&new W(e,n,t).applyDiscounts();var i=new V(e);C()&&(window.qb.datastore.shop.enabled_discount_codes?e.getAppliedDiscountCode(function(){i.updatePage(!1)}):i.updatePage(!1)),t.ajax_cart_integration_enabled&&i.initializeAjaxCartObserver(t)}function j(t,e){M()&&(new V(e).setupEnv(t),A(t),x(t))}function G(t,e){this.message=t,this.amount=e}function Q(t,e){this.message=t,this.amount=e}function V(a){var n=this,i=function i(t){et(t.custom_css)&&st("head").append('<style type="text/css">'+t.custom_css+"</style>")},o=function o(t){if(0<a.totalDiscount||a.hasMinTierWarnings()){var e=P();t&&!e.ajax_cart_integration_enabled||(i(e),m(e),l(e,t),d(e),s(e),e.show_line_item_discount&&c(n.cart.items,e),0<a.totalDiscount&&u(e,a),0<a.totalDiscount&&(I(e,n.cart),st("body .additional-checkout-button").css("display","none")),"chips-games.myshopify.com"===g()&&st(e.quantity_selector).keyup(function(t){13==t.keyCode&&setTimeout(function(){e.enabled_cart_js_update?y(e,a):st(e.cart_form_selector).submit()},500)}),"tomorrowgolf.myshopify.com"===g()&&st(document).on("change",e.quantity_selector,function(t){t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){e.enabled_cart_js_update?y(e,a):st(e.cart_form_selector).submit()},500)}),""!==e.quantity_selector&&st(document).on("change",e.quantity_selector,function(t){t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){e.enabled_cart_js_update?y(e,a):st(e.cart_form_selector).submit()},500)}),""!==e.quantity_button_selector&&st(document).on("click",e.quantity_button_selector,function(t){t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){e.enabled_cart_js_update?y(e,a):("community-wines.myshopify.com"!=e.shopify_domain&&t.stopPropagation(),st(e.cart_form_selector).submit())},500)}))}},r=function(t){var n="",i=9999999;return st.each(t,function(t,e){e.amount<i&&(n=e.message,i=e.amount)}),n},c=function c(t,e){var s=st(".qb-price-item"),u=st(".qb-total-line-item"),d=L(e.money_format);st.each(t,function(t,n){if(0<n.appliedDiscount.total_discount_amount){var e=n.price-n.appliedDiscount.total_discount_amount/n.quantity,i=n.appliedDiscount.original_line_price-n.appliedDiscount.total_discount_amount,o=n.appliedDiscount.original_line_price,a=n.price,r='<span class="qb-line-item-original-price">'+E(o,d)+'</span><span class="qb-line-item-discounted-price">'+E(i,d)+"</span>",c='<span class="qb-line-item-original-price">'+E(a,d)+'</span><span class="qb-line-item-discounted-price">'+E(e,d)+"</span>";st.each(s,function(t,e){st(e).data("id")===n.key&&st(e).html(c)}),st.each(u,function(t,e){st(e).data("id")===n.key&&st(e).html(r)})}})},u=function u(t,s){t.enabled_discount_codes&&(st(".discount-code-wrapper").remove(),p(t),st(".apply-discount-code").prop("disabled",!0),0<window.qb.datastore.discount_codes.length&&0<window.qb.datastore.discount_codes[0].discountedAmount&&(_(window.qb.datastore.discount_codes[0],window.qb.datastore.shop),st(document).on("click",".qb-discount-code-tag",function(t){t.stopImmediatePropagation(),t.preventDefault(),s.removeDiscountCode(function(){new V(s).updatePage(!1)})})),0<window.qb.datastore.discount_codes.length&&window.qb.datastore.discount_codes[0].discountedAmount<=0&&s.removeDiscountCode(function(){new V(s).updatePage(!1)}),st(document).on("input",".discount-code-wrapper input[type='text']",function(){st(".apply-discount-code").prop("disabled",!1)}),st(document).on("click",".apply-discount-code",function(t){t.stopImmediatePropagation(),t.preventDefault();var e=window.qb.cart.items.flatMap(function(t){return t.collection_ids}),n=window.qb.cart.items.flatMap(function(t){return t.product_id}),i=window.qb.cart.items.flatMap(function(t){return t.variant_id}),o=window.qb.cart.original_total_price,a=window.qb.cart.item_count,r=window.qb.cart.token,c={discount_code:st(".discount-code-wrapper input[type='text']").val(),shopify_domain:g(),options:{collections:e,products:n,variants:i,subtotal:o,quantity:a,cart_token:r}};window.qb.discountCodeData=c,s.submitDiscountCode(s,c,function(){new V(s).updatePage(!1)})}))},s=function s(t){if(t.next_tier_offers_enabled){var e=a.getNextTierOffers(),n=r(e);et(n)&&(0==st(".qb-next-tier-offers").length?st(t.cart_subtotal_selector).append('<span class="qb-next-tier-offers">'+n+"</span>"):st(".qb-next-tier-offers").html(n))}},d=function d(t){if(t.minimum_tier_warnings_enabled){var e=a.getMinTierWarnings(),n=r(e);et(n)&&(0==st(".qb-min-cart-warnings").length?st(t.cart_subtotal_selector).append('<span class="qb-min-cart-warnings">'+n+"</span>"):st(".qb-min-cart-warnings").html(n))}},l=function l(t,e){if((!e||e&&t.show_discount_log_on_ajax_carts)&&t.enable_discount_log){var n=a.getDiscountLogEntries(),i="";st.each(n,function(t,e){i+=e+"<br />"}),et(i)&&(0==st(".qb-discount-log").length?st(t.cart_subtotal_selector).append('<div class="qb-discount-log">'+i+"</div>"):st(".qb-discount-log").html(i))}},p=function p(t){var e=t.discount_code_input_placeholder||"Discount code",n=t.discount_code_button_text||"Apply",i='<div class="discount-code-wrapper"><label class="qb-discount-code-log"></label><div class="qb-discount-code-inputs"><input type="text" id=\'discount-code-field\' /><input type="submit" class="apply-discount-code" id=\'submit-discount-code\' /></div><span class="qb-discount-code-tag"></span></div>';st(t.cart_subtotal_selector).append(i),st("#discount-code-field").attr("placeholder",e),st("#submit-discount-code").val(n)},_=function _(t,e){var n=L(e.money_format),i=e.discount_code_log;i=(i=i.replace("{{discount_code_amount}}",E(t.discountedAmount,n))).replace("{{discount_code}}",t.discountCode),st(".qb-discount-code-log").append(i),st(".qb-discount-code-tag").text(" "+t.discountCode),st(".qb-discount-code-tag").css("visibility","visible"),st(".qb-discount-code-inputs > input").prop("disabled",!0)},m=function m(t){var e=L(t.money_format);if(0<a.totalDiscount){if(0==st(".qb-original-subtotal").length){var n='<span class="qb-original-subtotal">'+E(a.originalTotalPrice,e)+'</span><span class="qb-discounted-subtotal">'+E(a.totalPrice,e)+"</span>";st(t.cart_subtotal_selector).html(n),window.qb.discountedSubtotalApplied=!0}else st(".qb-discounted-subtotal").html(E(a.totalPrice,e)),st(".qb-original-subtotal").html(E(a.originalTotalPrice,e));st("#qb-net-order-original-total").css("text-decoration","line-through"),st("#qb-net-order-original-total").text(E(a.originalTotalPrice,e)),st("#qb-net-order-discounted-total").text(E(a.totalPrice,e))}else st(t.cart_subtotal_selector).html(E(a.originalTotalPrice,e))},h=function(t,e){var n=["ajaxifyCart","cart-loading","AjaxifyCart","layer-addcart-modal"];if(et(t.mutation_ids)){var i=t.mutation_ids.replace(/ /g,"").split(",");n=n.concat(i)}return-1!==n.indexOf(e.target.id)},f=function(t,n){var e=["drawer","cart-drawer__item-list","ajaxcart__footer--fixed","cart-item__qty","mm-opened","cart-sidebar","opened","cart-preview"];if(et(t.mutation_classes)){var i=t.mutation_classes.replace(/ /g,"").split(",");e=e.concat(i)}var o=!1;return st.each(e,function(t,e){"undefined"!=typeof n.target.classList&&n.target.classList.contains(e)&&(o=!0)}),o},b=function(t,e){return h(t,e)||f(t,e)},t=function(n){var e=!1,t=new MutationObserver(function(t){t.forEach(function(t){!e&&b(n,t)&&(window.qb.discountCodeApplied=!1,setTimeout(function(){a.updateCart(function(){var t=R();new W(a,t,n).applyDiscounts();var e=new V(a);window.qb.datastore.shop.enabled_discount_codes&&!window.qb.discountCodeApplied?(window.qb.discountCodeApplied=!0,a.getAppliedDiscountCode(function(){e.updatePage(!0)})):e.updatePage(!0)})},250),e=!0)}),e=!1}),i={attributes:!0,childList:!0,characterData:!0,subtree:!0},o=document.body;t.observe(o,i)};this.cart=a,this.setupEnv=i,this.updatePage=o,this.showNextTierOffers=s,this.showMinTierWarnings=d,this.showDiscountLog=l,this.showDiscountedSubtotal=m,this.initializeAjaxCartObserver=t,this.checkMutations=b,this.checkMutationIds=h,this.checkMutationClasses=f}function W(r,t,e){var c=this,n=function(){st.each(c.cart.items,function(t,e){var n=c.findBestDiscountGroup(e);if(n)c.applyDiscountsToItem(e,n);else{var i=c.findLowestMinTierDiscountGroup(e);i&&c.applyMinTierWarningToItem(e,i)}});var t=c.cart.hasDiscountLogEntries(),e=c.cart.hasMinTierWarnings();t&&e&&c.changeMinTierWarningsToNextTierOffers()},i=function(){st.each(c.cart.items,function(t,e){if(""!=e.minTierWarning){var n=e.discountGroup.getMinTier();e.nextTierOffer=n.getNextTierOffer(e,c.cart),e.minTierWarning=""}})},o=function(n){var i=!1,o=0,a=0;return st.each(c.discountGroups,function(t,e){e.appliesToProduct(n.productId,n.collectionIds)&&(o=e.getDiscountAmountForProduct(n,c.cart),a<o&&(i=e,a=o))}),i},a=function(n){var i=!1,o=0,a=9999999;return st.each(c.discountGroups,function(t,e){e.appliesToProduct(n.productId,n.collectionIds)&&0==e.getDiscountAmountForProduct(n,r)&&(o=e.getMinTierAmountNeeded())<a&&(a=o,i=e)}),i},s=function(t,e){t.discountGroup=e,t.minTierWarning=e.getMinTierWarning(t)},u=function(t,e){t.discountGroup=e,t.appliedDiscount=e.getAppliedDiscount(t,c.cart),c.cart.totalDiscount+=t.appliedDiscount.total_discount_amount,c.cart.totalPrice-=t.appliedDiscount.total_discount_amount,t.discountLogEntry=e.getDiscountLogEntry(t,c.cart),t.nextTierOffer=e.getNextTierOffer(t,c.cart)},d=function(t,e){return 0<e.length?"apply_newest_group"==t.multiple_discount_group_behavior?[e[e.length-1]]:"apply_oldest_group"==t.multiple_discount_group_behavior?[e[0]]:e:e};this.filterDiscountGroups=d,this.discountGroups=d(e,t),this.cart=r,this.findBestDiscountGroup=o,this.findLowestMinTierDiscountGroup=a,this.applyDiscounts=n,this.applyDiscountsToItem=u,this.applyMinTierWarningToItem=s,this.changeMinTierWarningsToNextTierOffers=i}function K(t){var o=this,e=function(){return""!=o.minTierWarning},n=function(){return""!=o.discountLogEntry},i=function(){var i=[];return null!=o.properties&&st.each(Object.keys(o.properties),function(t,e){var n={};n.name=e,n.value=o.properties[e],i.push(n)}),i},a=function(){var t={};return t.title=o.title,t.variant_id=o.variantId,t.product_id=o.productId,t.image=o.image,t.quantity=o.quantity,t.grams=o.grams,t.requires_shipping=o.requiresShipping,t.price=o.price/100,t.properties=o.getLineItemPropertiesArray(),t.applied_discount=o.appliedDiscount,"undefined"!==t.applied_discount.amount&&(t.applied_discount.amount=t.applied_discount.amount),t};this.title=t.title,this.quantity=t.quantity,this.variantId=t.variant_id,this.productId=t.product_id,this.price=t.price,this.giftCard=t.gift_card,this.productTitle=t.product_title,this.variantTitle=t.variant_title,this.variantOptions=t.variant_options,this.originalPrice=t.original_price,this.originalLinePrice=t.original_line_price,this.discountedPrice=t.discounted_price,this.linePrice=t.line_price,this.collectionIds=t.collection_ids,this.properties=t.properties,this.requiresShipping=t.requires_shipping,this.grams=t.grams,this.key=t.key,this.appliedDiscount={},this.discountGroup=null,this.minTierWarning="",this.nextTierOffer="",this.discountLogEntry="",this.image=t.image,this.handle=t.handle,this.hasMinTierWarning=e,this.hasDiscountLogEntry=n,this.getLineItemHash=a,this.getLineItemPropertiesArray=i}function H(){var o=this,t=function(){var n=[];return st.each(o.items,function(t,e){n.push(e.getLineItemHash())}),n},e=function(){var n=[];return st.each(o.items,function(t,e){et(e.discountLogEntry)&&n.push(e.discountLogEntry)}),n},n=function(){var n=[];return st.each(o.items,function(t,e){et(e.minTierWarning)&&n.push(e.minTierWarning)}),n},i=function(){var n=[];return st.each(o.items,function(t,e){et(e.nextTierOffer)&&n.push(e.nextTierOffer)}),n},a=function(){var n=!1;return st.each(o.items,function(t,e){e.hasMinTierWarning()&&(n=!0)}),n},r=function(){var n=!1;return st.each(o.items,function(t,e){e.hasDiscountLogEntry()&&(n=!0)}),n},c=function(e){o.items=[];var i="";st.ajax({cache:!1,type:"GET",url:"https://"+window.location.hostname+"/cart?view=quantity-breaks-now-cart",success:function(t){t=t.replace(/(\r\n|\n|\r)/gm,""),t=JSON.parse(t),i=_(),window.qb.enabled_multi_currencies={currencies_count:t.enabled_currencies_count,currencies:t.enabled_currencies,primary_domain:t.primary_domain},window.qb.shop.enabled_multi_currencies?(window.qb.enabled_multi_currencies.current_shop_currency=t.current_shop_currency,window.qb.enabled_multi_currencies.currency_format=ct[t.current_shop_currency].CURRENCY_FORMAT):(window.qb.enabled_multi_currencies.current_shop_currency=window.qb.shop.currency,window.qb.enabled_multi_currencies.currency_format=window.qb.shop.money_format),"undefined"!==window.qb.cart&&i&&(window.qb.cart.token=i),o.originalTotalPrice=t.original_total_price,o.totalDiscount=t.total_discount,o.totalPrice=t.total_price,o.totalWeight=t.total_weight,o.itemCount=t.item_count;var n=[];st.each(t.items,function(t,e){n.push(new K(e))}),o.items=n,e()}})},s=function s(t,e){return e=(t.targetSelection,t.applyDiscountCode(e))},u=function(){var t={};return t.line_items=JSON.stringify(o.getLineItemsHash()),t.order_notes="",window.qb.datastore.shop.enabled_discount_codes&&0<window.qb.datastore.discount_codes.length&&(t=o.applyDiscountCode(window.qb.datastore.discount_codes[0],t)),0<st("#CartSpecialInstructions:visible").length&&(t.order_notes=st("#CartSpecialInstructions:visible").val()),0<st("#cartSpecialInstructions:visible").length&&(t.order_notes+=st("#cartSpecialInstructions:visible").val()),0<st("#cartSpecialInstructionsFromPopup:visible").length&&(t.order_notes+=st("#cartSpecialInstructionsFromPopup:visible").val()),""==t.order_notes&&0<st("textarea[name='note']:visible:first").length&&(t.order_notes+=st("textarea[name='note']:visible:first").val()),t},d=function d(n){var t=window.qb.cart.token;st.ajax({cache:!1,type:"GET",url:m()+"/cart/remove_discount_code/"+t,success:function(t){if(t.deleted_discounted_cart){var e=window.qb.datastore.discount_codes[0];o.totalPrice=e.cartTotalPrice,window.qb.datastore.discount_codes=[],window.qb.discountCodeApplied=!1,st(".discount-code-wrapper").remove(),st(".qb-discount-code-inputs > input").prop("disabled",!1),n()}}})},l=function l(n,t,i){st.ajax({cache:!1,type:"POST",url:m()+"/discount_codes/apply",data:JSON.stringify(t),contentType:"application/json; charset=utf-8",success:function(t){if(t.is_valid){window.qb.datastore.discount_codes=[],st(".discount-code-wrapper input[type=text]").removeClass("qb-discount-code-error"),st(".qb-invalid-discount-code").remove(),t.cartTotalPrice=n.totalPrice,t.cart=n;var e=new J(t);e.discountedAmount<n.totalPrice?n.totalPrice=Math.round(n.totalPrice-e.discountedAmount):n.totalPrice=0,window.qb.datastore.discount_codes.push(e),i()}else 0<st(".qb-invalid-discount-code").length&&st(".qb-invalid-discount-code").remove(),st(".discount-code-wrapper input[type=text]").addClass("qb-discount-code-error"),st(".qb-discount-code-inputs").append("<label class='qb-invalid-discount-code'>"+t.error_message+"</label>")}})},p=function p(n){var t=window.qb.cart.token;st.ajax({cache:!1,type:"GET",url:m()+"/cart/applied_discount_code/"+t,success:function(t){if(void 0!==t&&t.is_valid){window.qb.datastore.discount_codes=[],t.cartTotalPrice=o.totalPrice,t.cart=o;var e=new J(t);e.discountedAmount<o.totalPrice?o.totalPrice=Math.round(o.totalPrice-e.discountedAmount):o.totalPrice=0,window.qb.datastore.discount_codes.push(e)}n()}})};this.items=[],this.originalTotalPrice=0,this.totalDiscount=0,this.totalPrice=0,this.totalWeight=0,this.itemCount=0,this.hasMinTierWarnings=a,this.hasDiscountLogEntries=r,this.updateCart=c,this.getDiscountLogEntries=e,this.getMinTierWarnings=n,this.getNextTierOffers=i,this.getLineItemsHash=t,this.createDraftOrder=u,this.submitDiscountCode=l,this.applyDiscountCode=s,this.getAppliedDiscountCode=p,this.removeDiscountCode=d}function z(t,e,n){var i=function(t){var e=P(),n=Math.floor(this.discountAmount),i={};return n>t.price&&(n=t.price),i.discount_amount=n,i.original_line_price=t.originalLinePrice,i.total_discount_amount=n*t.quantity,i.value_type="fixed_amount",i.description="Fixed Amount Discount",i.title=e.fixed_amount_discount_title,i.value=n/100,i.amount=n*t.quantity/100,i},o=function(t){var e=P(),n={};return n.value=Math.floor(100*this.discountPercent),n.original_line_price=t.originalLinePrice,n.discount_amount=Math.floor(Math.floor(t.price*n.value)/100),n.total_discount_amount=Math.floor(Math.floor(t.price*n.value*t.quantity)/100),n.value_type="percentage",n.description="Percentage Discount",n.title=e.percentage_discount_title,n.amount=Math.floor(Math.floor(t.price*n.value*t.quantity)/100)/100,n},a=function(t,e){return!(null==e||null==e.originalTotalPrice||e.originalTotalPrice<this.minCartValue)},r=function(){return this.minCartValue},c=function(){var t=P(),e=this.getAmount(),n=L(t.money_format);return new Q(t.min_cart_value_warning.replace("{{amount}}",E(this.getAmount(),n)),e)},s=function(){var t=P(),e=this.getAmount(),n=L(t.money_format);return new G(t.next_tier_offer.replace("{{amount}}",E(this.getAmount(),n)),e)},u=function(t,e){return!(null==e||null==e.itemCount||e.itemCount<this.minCartQuantity)},d=function(){return this.minCartQuantity},l=function(){var t=P(),e=this.getAmount();return new Q(t.min_cart_quantity_warning.replace("{{amount}}",e),e)},p=function(){var t=P(),e=this.getAmount();return new G(t.next_tier_cart_quantity_offer.replace("{{amount}}",e),e)},_=function(t){return!(null==t.originalLinePrice||t.originalLinePrice<this.minLineItemValue)},m=function(){return this.minLineItemValue},h=function(t){var e=P(),n=this.getAmount(),i=L(e.money_format);return new Q(e.min_line_item_value_warning.replace("{{amount}}",E(n,i)).replace("{{product}}",'<span class="qb-product-name">'+t.title+"</span>"),n)},f=function(t){var e=P(),n=this.getAmount(),i=L(e.money_format);return new G(e.next_tier_line_item_value_offer.replace("{{amount}}",E(n,i)).replace("{{product}}",'<span class="qb-product-name">'+t.title+"</span>"),n)},b=function(t){return!(null==t.quantity||t.quantity<this.minLineItemQuantity)},y=function(){return this.minLineItemQuantity},g=function(t){var e=P(),n=this.getAmount();L(e.money_format);return new Q(e.min_line_item_quantity_warning.replace("{{amount}}",n).replace("{{product}}",'<span class="qb-product-name">'+t.title+"</span>"),n)},w=function(t){var e=P(),n=this.getAmount();L(e.money_format);return new G(e.next_tier_line_item_quantity_offer.replace("{{amount}}",n).replace("{{product}}",'<span class="qb-product-name">'+t.title+"</span>"),n)},v=function(t,e){var n=this.discountGroup.getSelectedProductsQuantity(e);return!(null==n||n<this.getAmount())},R=function(){return this.minSelectedProductsQuantity},q=function(){var t=P(),e=this.getAmount();L(t.money_format);return new Q(t.min_selected_products_quantity_warning.replace("{{amount}}",e).replace(
"{{discount_group_title}}",'<span class="qb-discount-group-title">'+this.discountGroup.title+"</span>"),e)},M=function(){var t=P(),e=this.getAmount();L(t.money_format);return new G(t.next_tier_selected_products_quantity_offer.replace("{{amount}}",e).replace("{{discount_group_title}}",'<span class="qb-discount-group-title-name">'+this.discountGroup.title+"</span>"),e)},C=function(t,e){var n=this.discountGroup.getSelectedProductsValue(e);return!(null==n||n<this.getAmount())},T=function(){return this.minSelectedProductsValue},O=function(){var t=P(),e=this.getAmount(),n=L(t.money_format);return new Q(t.min_selected_products_value_warning.replace("{{amount}}",E(e,n)).replace("{{discount_group_title}}",'<span class="qb-discount-group-title">'+this.discountGroup.title+"</span>"),e)},A=function(){var t=P(),e=this.getAmount(),n=L(t.money_format);return new G(t.next_tier_selected_products_value_offer.replace("{{amount}}",E(e,n)).replace("{{discount_group_title}}",'<span class="qb-discount-group-title">'+this.discountGroup.title+"</span>"),e)},D=function(t,e,n){var i="",o="",a="",r=e.discount_table_config.show_inline_maximum_qty,c=e.discount_table_config.show_maximum_qty,s=e.discount_table_config.required_amount_label,u=e.discount_table_config.discount_value_col_label,d=e.discount_table_config.discounted_price_col_label,l=L(e.money_format);switch(this.type){case"MinimumCartValueTier":i=E(i=this.minCartValue,l),r?("+"===(a=this.maximumRequirementAmount(e))?i=i.concat(a):i!==a.toString()&&(i=i+" - "+a),i=s.replace("{{min_requirement}} - {{max_requirement}}",i)):i=s.replace("{{min_requirement}}",i);break;case"MinimumCartQuantityTier":i=(i=this.minCartQuantity).toString(),r?("+"===(a=this.maximumRequirementAmount(e))?i=i.concat(a):i!==a.toString()&&(i=i+" - "+a),i=s.replace("{{min_requirement}} - {{max_requirement}}",i)):i=s.replace("{{min_requirement}}",i);break;case"MinimumLineItemValueTier":i=E(i=this.minLineItemValue,l),r?("+"===(a=this.maximumRequirementAmount(e))?i=i.concat(a):i!==a.toString()&&(i=i+" - "+a),i=s.replace("{{min_requirement}} - {{max_requirement}}",i)):i=s.replace("{{min_requirement}}",i);break;case"MinimumLineItemQuantityTier":i=(i=this.minLineItemQuantity).toString(),r?("+"===(a=this.maximumRequirementAmount(e))?i=i.concat(a):i!==a.toString()&&(i=i+" - "+a),i=s.replace("{{min_requirement}} - {{max_requirement}}",i)):i=s.replace("{{min_requirement}}",i);break;case"MinimumSelectedProductsValueTier":i=E(i=this.minSelectedProductsValue,l),r?("+"===(a=this.maximumRequirementAmount(e))?i=i.concat(a):i!==a.toString()&&(i=i+" - "+a),i=s.replace("{{min_requirement}} - {{max_requirement}}",i)):i=s.replace("{{min_requirement}}",i);break;case"MinimumSelectedProductsQuantityTier":i=(i=this.minSelectedProductsQuantity).toString(),r?("+"===(a=this.maximumRequirementAmount(e))?i=i.concat(a):i!==a.toString()&&(i=i+" - "+a),i=s.replace("{{min_requirement}} - {{max_requirement}}",i)):i=s.replace("{{min_requirement}}",i)}switch(t.discountType){case"percentage":o=B(this.discountPercent),o=u.replace("{{discount_value}}",o),p=E(p=n*(1-this.discountPercent),l),p=d.replace("{{discounted_price}}",p);break;case"fixed_amount":var p;o=E(o=this.discountAmount,l),o=u.replace("{{discount_value}}",o),(p=n-this.discountAmount)<0&&(p=0),p=E(p,l),p=d.replace("{{discounted_price}}",p)}var _=st("#quantity-breaks-now-discount-tiers-table-row").html(),m={requirement_amount:i,maximum_requirement_amount:a,discount_value:o,discounted_price:p,show_discount_value:t.showDiscountValue,show_discounted_price:t.showDiscountedPrice,show_inline_maximum_qty:r,show_maximum_qty:c},h=Handlebars.compile(_)(m);st("div.quantity-breaks-now-wrapper #discount-group-"+t.id+" table tbody").append(h)},Y=function(t){var e=!1,n=this.id,i=this.discountGroup.discountTiers.map(function(t){return t.id===n}),o=st.inArray(!0,i)+1;if(o<this.discountGroup.discountTiers.length){var a=this.discountGroup.discountTiers[o];switch(this.type){case"MinimumCartValueTier":a.minCartValue>this.minCartValue&&(e=E(e=a.minCartValue-1,t.money_format));break;case"MinimumLineItemValueTier":a.minLineItemValue>this.minLineItemValue&&(e=E(e=a.minLineItemValue-1,t.money_format));break;case"MinimumSelectedProductsValueTier":a.minSelectedProductsValue>this.minSelectedProductsValue&&(e=E(e=a.minSelectedProductsValue-1,t.money_format));break;case"MinimumCartQuantityTier":a.minCartQuantity>this.minCartQuantity&&(e=a.minCartQuantity-1);break;case"MinimumLineItemQuantityTier":a.minLineItemQuantity>this.minLineItemQuantity&&(e=a.minLineItemQuantity-1);break;case"MinimumSelectedProductsQuantityTier":a.minSelectedProductsQuantity>this.minSelectedProductsQuantity&&(e=a.minSelectedProductsQuantity-1)}}else e="+";return e};this.discountAmount=S(t.discount_amount),this.discountPercent=t.discount_percent,this.discountType=t.discount_type,this.id=t.id,this.minCartValue=S(t.min_cart_value),this.minLineItemValue=S(t.min_line_item_value),this.minSelectedProductsValue=S(t.min_selected_products_value),this.minCartQuantity=t.min_cart_quantity,this.minLineItemQuantity=t.min_line_item_quantity,this.minSelectedProductsQuantity=t.min_selected_products_quantity,this.type=e,this.discountGroup=n,"MinimumCartValueTier"==this.type?(this.appliesTo=a,this.getAmount=r,this.getMinTierWarning=c,this.getNextTierOffer=s):"MinimumCartQuantityTier"==this.type?(this.appliesTo=u,this.getAmount=d,this.getMinTierWarning=l,this.getNextTierOffer=p,this.hasMaximumRequirmentAmount=!1):"MinimumSelectedProductsValueTier"==this.type?(this.appliesTo=C,this.getAmount=T,this.getMinTierWarning=O,this.getNextTierOffer=A):"MinimumSelectedProductsQuantityTier"==this.type?(this.appliesTo=v,this.getAmount=R,this.getMinTierWarning=q,this.getNextTierOffer=M,this.hasMaximumRequirmentAmount=!1):"MinimumLineItemValueTier"==this.type?(this.appliesTo=_,this.getAmount=m,this.getMinTierWarning=h,this.getNextTierOffer=f):(this.appliesTo=b,this.getAmount=y,this.getMinTierWarning=g,this.getNextTierOffer=w),"fixed_amount"==this.discountType?this.getAppliedDiscount=i:this.getAppliedDiscount=o,this.printDiscountTier=D,this.maximumRequirementAmount=Y}function J(t){var n=function n(t){var e=st.extend(!0,{},JSON.parse(t.line_items)),i=[],o=this;return st.each(e,function(t,n){st.each(o.lineItemAppliedDiscounts,function(t,e){e.variantId===n.variant_id&&e.productId===n.product_id&&(n.applied_discount=e.applied_discount)}),i.push(n)}),t.line_items=JSON.stringify(i),t},i=function i(t){var e;return"all"==this.targetSelection&&(e="fixed_amount"==this.valueType?this.fixedAmountDiscountCodeHash():this.percentageDiscountCodeHash()),t.applied_discount=JSON.stringify(e),t},o=function o(t){var i=[],e=this.collectionIds,n=t.items.map(function(t){return 0<t.collectionIds.length&&st.each(t.collectionIds,function(t,n){st.each(e,function(t,e){e===n.toString()&&i.push(n)})}),0<(i=i.filter(function(t){return t})).length?(i=[],t):null});return n=n.filter(function(t){return t}),this.applyDiscountLineItemHash(t,n)},r=function r(t){var e=this.productIds,i=this.variantIds,o=[],a=[];return st.each(t.items,function(t,n){n.productId&&st.each(e,function(t,e){n.productId.toString()===e&&o.push(n)}),n.variantId&&st.each(i,function(t,e){n.variantId.toString()===e&&a.push(n)})}),o=(o=o.concat(a)).filter(function(t){return t}),this.applyDiscountLineItemHash(t,o)},m=function m(t,e,n){var i=0,o=st.extend(!0,{},e.getLineItemHash());if("percentage"===t){i=n/(a=e.price*e.quantity-100*o.applied_discount.amount)*100}else{var a=Math.floor(e.price-100*o.applied_discount.amount/e.quantity);i=Math.floor(a*(n/100))}return i},h=function h(t,e,n,i,o){var a={};return"undefined"==typeof t.applied_discount.amount||100===n?t.applied_discount.value=n:100<t.applied_discount.value+n?(n=100,t.applied_discount.value=n):t.applied_discount.value=t.applied_discount.value+n,t.applied_discount.discount_amount=Math.floor(Math.floor(e.price*t.applied_discount.value)/100),t.applied_discount.total_discount_amount=Math.floor(Math.floor(e.price*t.applied_discount.value*e.quantity)/100),t.applied_discount.amount=Math.floor(Math.floor(e.price*t.applied_discount.value*e.quantity)/100)/100,t.applied_discount.value_type=o,"undefined"==typeof t.applied_discount.title?t.applied_discount.title=i:t.applied_discount.title=t.applied_discount.title.concat(", ",i),a={variantId:e.variantId,productId:e.productId,applied_discount:t.applied_discount},{totalDiscountAmount:t.applied_discount.total_discount_amount,appliedDiscount:a}},f=function f(t,e,n,i,o){var a={};return"undefined"==typeof t.applied_discount.amount?(t.applied_discount.value=n/100,t.applied_discount.discount_amount=n,t.applied_discount.total_discount_amount=e.price*e.quantity,t.applied_discount.amount=n*e.quantity/100,t.applied_discount.value_type=o,t.applied_discount.title=i):(t.applied_discount.total_discount_amount>=e.original_line_price?(t.applied_discount.value=e.price/100,t.applied_discount.discount_amount=e.price,t.applied_discount.total_discount_amount=e.price*e.quantity,t.applied_discount.amount=e.price*e.quantity/100):(t.applied_discount.value=t.applied_discount.value+n/100,t.applied_discount.discount_amount=t.applied_discount.discount_amount+n,t.applied_discount.total_discount_amount=Math.floor(t.applied_discount.total_discount_amount+Math.floor(n*e.quantity)),t.applied_discount.amount=Math.floor(t.applied_discount.amount+n*e.quantity/100)),t.applied_discount.value_type=o,t.applied_discount.title=t.applied_discount.title.concat(", ",i)),a={variantId:e.variantId,productId:e.productId,applied_discount:t.applied_discount},{totalDiscountAmount:t.applied_discount.total_discount_amount,appliedDiscount:a}},a=function a(t,e){var u=this.discountCode,d=this.valueType,c=0,l={discountAmount:0,totalDiscountAmount:0},p={},_=this;return"fixed_amount"==this.valueType?st.each(e,function(t,e){var n=st.extend(!0,{},e.getLineItemHash()),i=e.price*e.quantity;if(c=100*_.amount,"undefined"!=typeof n.applied_discount.value_type&&n.applied_discount.value_type!==d){var o=m(n.applied_discount.value_type,e,c),a=o;if(o>=e.price&&(a=o=e.price*e.quantity,fullPercent=!0),"undefined"!=typeof n.applied_discount.amount)a=(r=i-100*n.applied_discount.amount)*o/(e.price*e.quantity)/100*100,a=parseFloat(a.toFixed(2)),i=r;l.discountAmount=i<=c?l.discountAmount+i/100:l.discountAmount+c/100,p=h(n,e,a,u,n.applied_discount.value_type),_.lineItemAppliedDiscounts.push(p.appliedDiscount)}else{var r;if(c>e.price&&(c=e.price),"undefined"!=typeof n.applied_discount.amount)i=r=i-100*n.applied_discount.amount;l.discountAmount=i<=c?l.discountAmount+i/100:l.discountAmount+c/100,p=f(n,e,c,u,d),_.lineItemAppliedDiscounts.push(p.appliedDiscount)}l.totalDiscountAmount=l.totalDiscountAmount+p.totalDiscountAmount}):st.each(e,function(t,e){var n=st.extend(!0,{},e.getLineItemHash()),i=!1,o=e.price*e.quantity,a=_.amount;if("undefined"!=typeof n.applied_discount.value_type&&n.applied_discount.value_type!==d){var r=m(n.applied_discount.value_type,e,a);if(r>=e.price&&(r=e.price*e.quantity,i=!0),"undefined"!=typeof n.applied_discount.amount)o=c=o-n.applied_discount.total_discount_amount,a=r*e.quantity;l.discountAmount=o<=a?l.discountAmount+o/100:Math.floor(l.discountAmount+Math.floor(a/100)),p=f(n,e,r,u,n.applied_discount.value_type,i),_.lineItemAppliedDiscounts.push(p.appliedDiscount)}else{var c,s=a;if("undefined"!=typeof n.applied_discount.amount)s=(c=o-100*n.applied_discount.amount)*a/(e.price*e.quantity),a=c*(a/100),o=c;l.discountAmount=o<=a?l.discountAmount+o/100:l.discountAmount+a/100,p=h(n,e,s,u,d),_.lineItemAppliedDiscounts.push(p.appliedDiscount)}l.totalDiscountAmount=l.totalDiscountAmount+p.totalDiscountAmount}),this.discountedAmount=100*l.discountAmount,this.discountedCartTotalPrice=l.totalDiscountAmount,st.extend(!0,{},t.getLineItemsHash())},e=function e(){var t={};return t.description=this.discountCode,t.value_type=this.valueType,t.value=this.value,t.amount=this.amount,t.title=this.discountCode,t},c=function c(){var t={};return t.description=this.discountCode,t.value_type=this.valueType,t.value=this.value,t.amount=this.amount,t.title=this.discountCode,t};this.cartTotalPrice=t.cartTotalPrice,this.value=-1*t.discounted_value,this.amount=-1*t.discounted_value,this.discountedAmount=0,this.discountedCartTotalPrice=0,this.discountCode=t.discount_code,this.valueType=t.value_type,this.title=t.discount_code,this.targetSelection=t.discount_applies_to.target_selection,this.cartToken=t.cart_token,this.lineItemAppliedDiscounts=[],this.fixedAmountDiscountCodeHash=e,this.percentageDiscountCodeHash=c,this.applyDiscountToAll=i,this.discountedItemInCollection=o,this.discountedItemInProduct=r,this.applyDiscountLineItemHash=a,this.getDiscountedLineItems=n,"all"===this.targetSelection?("percentage"==t.value_type?this.amount=Math.floor(this.cartTotalPrice*this.value/100)/100:this.amount=S(this.value),this.discountedAmount=100*this.amount,this.discountedCartTotalPrice=this.cartTotalPrice-100*this.amount,this.applyDiscountCode=this.applyDiscountToAll):("collections"==this.targetSelection?(this.collectionIds=t.discount_applies_to.collections||[],this.draftOrderLineItems=this.discountedItemInCollection(t.cart)):(this.productIds=t.discount_applies_to.products||[],this.variantIds=t.discount_applies_to.variants||[],this.draftOrderLineItems=this.discountedItemInProduct(t.cart)),this.applyDiscountCode=this.getDiscountedLineItems)}function Z(t){var u=this,n=function(n,i){if(null==i)return u.discountTiers;var o=null;return st.each(u.discountTiers,function(t,e){e.appliesTo(n,i)&&(o=e)}),o},e=function(t,n){if(it(t)){var i=[];return st.each(t,function(t,e){i.push(new z(e,n,u))}),i}return[]},i=function(t,e){var n=!1,i=u.getDiscountTier(t,e);return i&&(n=(n=i.getAppliedDiscount(t)).amount),n},o=function(n,i){var o=!1,a=!1;return st.each(u.discountTiers,function(t,e){e.appliesTo(n,i)?o=e:o&&!1===a&&(a=e)}),a},a=function(){return 0<u.discountTiers.length&&u.discountTiers[0]},r=function(){var t=u.getMinTier();return!!t&&t.getAmount()},c=function(n){var i=!1;return st.each(u.products,function(t,e){e.shopify_product_id==n&&(i=!0)}),i},s=function(){return!0},d=function(t,e){var i=!1;return st.each(e,function(t,n){st.each(u.collections,function(t,e){e.shopify_collection_id==n&&(i=!0)})}),i},l=function(n,i){var t=n.discount_table_config.show_maximum_qty,e=n.discount_table_config.discount_table_type;if(u.showDiscountTable){var o="";switch(u.discountTierType){case"MinimumCartValueTier":o=n.minimum_cart_value_label;break;case"MinimumCartQuantityTier":o=n.minimum_cart_quantity_label;break;case"MinimumLineItemQuantityTier":o=n.minimum_line_item_quantity_label;break;case"MinimumLineItemValueTier":o=n.minimum_line_item_value_label;break;case"MinimumSelectedProductsQuantityTier":o=n.minimum_selected_products_quantity_label;break;case"MinimumSelectedProductsValueTier":o=n.minimum_selected_products_value_label}var a=st("#quantity-breaks-now-discount-tiers-table").html(),r={requirement_label:o,discount_label:n.discount_label,maximum_requirement_label:"Max Qty",show_maximum_qty:t,table_header:u.title,discount_group_id:u.id,description:u.description,discounted_price_label:n.discounted_price_label,show_discount_value:u.showDiscountValue,show_discounted_price:u.showDiscountedPrice},c=Handlebars.compile(a)(r);st("div.quantity-breaks-now-wrapper").append(c);var s={discountType:u.discountType,id:u.id,showDiscountValue:u.showDiscountValue,showDiscountedPrice:u.showDiscountedPrice};this.defaultDiscountTableFormat(e),st.each(u.discountTiers,function(t,e){e.printDiscountTier(s,n,i)})}},p=function(t){t.discount_table_config.discount_table_type;var e=t.discount_table_config.table_title_font_size,n=t.discount_table_config.table_description_font_size,i=t.discount_table_config.table_title_color,o=t.discount_table_config.table_description_color;st(".quantity-breaks-now-discount-title").css("font-size",parseInt(e)),st(".quantity-breaks-now-discount-description").css("font-size",parseInt(n)),st(".quantity-breaks-now-discount-title").css("color",i),st(".quantity-breaks-now-discount-description").css("color",o)},_=function(t){t.discount_table_config.discount_table_type;var e=t.discount_table_config.border_radius.toString();e=e.concat("px"),st("table.quantity-breaks-now-discount-table").css("border-collapse","separate !important"),st(".quantity-breaks-now-discount-table th:first-child").css({"-moz-border-radius":e.concat(" 0 0 0"),"-webkit-border-radius":e.concat(" 0 0 0"),"border-radius":e.concat(" 0 0 0")}),st(".quantity-breaks-now-discount-table th:last-child").css({"-moz-border-radius":"0 "+e+" 0 0","-webkit-border-radius":"0 "+e+" 0 0","border-radius":"0 "+e+" 0 0"}),st(".quantity-breaks-now-discount-table tr:last-child td:first-child").css({"-moz-border-radius":"0 0 0 ".concat(e),"-webkit-border-radius":"0 0 0 ".concat(e),"border-radius":"0 0 0 ".concat(e)}),st(".quantity-breaks-now-discount-table tr:last-child td:last-child").css({"-moz-border-radius":"0 0 ".concat(e+" 0"),"-webkit-border-radius":"0 0 ".concat(e+" 0"),"border-radius":"0 0 ".concat(e+" 0")})},m=function(t){var e=t.discount_table_config.discount_table_type,n=t.discount_table_config.bg_table_row_color,i=t.discount_table_config.bg_header_color,o=t.discount_table_config.border_color,a=t.discount_table_config.border_width.toString(),r=t.discount_table_config.text_th_color,c=t.discount_table_config.text_td_color,s=t.discount_table_config.border_type,u=t.discount_table_config.table_font_size,d=a.concat("px ");d=(d=d.concat(s+" ")).concat(o),st(".quantity-breaks-now-discount-table").css("font-size",parseInt(u)),st(".quantity-breaks-now-discount-table th").css("color",r),st(".quantity-breaks-now-discount-table th").css("background-color",i),st(".qb-discount-table-row td").css("color",c),st(".qb-discount-table-row td").css("background-color",n),"default-grid"===e?(st(".quantity-breaks-now-discount-table th").css("border-bottom",d),st(".quantity-breaks-now-discount-table th").css("border-top",d),st(".quantity-breaks-now-discount-table th:last-child").css({"border-left":d,"border-right":d}),st(".quantity-breaks-now-discount-table th:first-child").css({"border-left":d,"border-right":d}),st(".qb-discount-table-row td").css("border-bottom",d),st(".qb-discount-table-row td:first-child").css({"border-left":d,"border-right":d}),st(".qb-discount-table-row td:last-child").css({"border-left":d,"border-right":d})):(st(".quantity-breaks-now-discount-table th:nth-child(2)").css({"border-left":"none","border-right":"none"}),st(".quantity-breaks-now-discount-table th").css({"border-bottom":d,"border-top":d}),st(".quantity-breaks-now-discount-table th:first-child").css({"border-left":d,"border-right":"none"}),st(".quantity-breaks-now-discount-table th:last-child").css({"border-left":"none","border-right":d}),st(".quantity-breaks-now-discount-table td:nth-child(2)").css({"border-left":"none","border-right":"none"}),st(".qb-discount-table-row td").css("border-bottom",d),st(".qb-discount-table-row td:first-child").css({"border-left":d,"border-right":"none"}),st(".qb-discount-table-row td:last-child").css({"border-left":"none","border-right":d}))},h=function(t){"default-grid"===t&&st(".quantity-breaks-now-discount-table").prop("id","default-type")},f=function(t,e){return n(t,e).getAppliedDiscount(t)},b=function(t){var e=P(),n=t.appliedDiscount,i=L(e.money_format);return e.discount_log_text.replace("{{total_discount_amount}}",E(Math.floor(n.total_discount_amount),i)).replace("{{discount_amount}}",E(Math.floor(n.discount_amount),i)).replace("{{product_title}}",t.title).replace("{{discount_group_title}}",u.title).replace("{{quantity}}",t.quantity).replace("{{discount_percent}}",B(n.value/100))},y=function(t,e){var n=o(t,e);return n?n.getNextTierOffer(t,e):""},g=function(t){var e=a(t);return e?e.getMinTierWarning(t):""},w=function(t){var n=0;return st.each(t.items,function(t,e){u.appliesToProduct(e.productId,e.collectionIds)&&(n+=e.quantity)}),n},v=function(t){var n=0;return st.each(t.items,function(t,e){u.appliesToProduct(e.productId,e.collectionIds)&&(n+=e.quantity*e.price)}),n};this.products=t.products||[],this.collections=t.collections||[],this.cartLabel=t.cart_label||"",this.description=t.description||"",this.discountEnabled=t.discount_enabled||!1,this.discountTierType=t.discount_tier_type||"MinimumCartValueTier",this.discountType=t.discount_type||"percentage",this.showDiscountTable=t.show_discount_table||!1,this.showDiscountValue=t.show_discount_value||!1,this.showDiscountedPrice=t.show_discounted_price||!1,this.title=t.title||"",this.groupType=t.type||"all",this.createDiscountTierObjects=e,this.discountTiers=this.createDiscountTierObjects(t.discount_tiers,t.discount_tier_type),this.id=t.id,"ProductDiscount"==this.groupType?this.appliesToProduct=c:"AllDiscount"==this.groupType?this.appliesToProduct=s:"CollectionDiscount"==this.groupType&&(this.appliesToProduct=d),this.getDiscountAmountForProduct=i,this.getDiscountTier=n,this.printDiscountTable=l,this.getMinTier=a,this.getMinTierAmountNeeded=r,this.getNextTier=o,this.getAppliedDiscount=f,this.getDiscountLogEntry=b,this.getNextTierOffer=y,this.getMinTierWarning=g,this.getSelectedProductsQuantity=w,this.getSelectedProductsValue=v,this.defaultDiscountTableFormat=h,this.discountTableBorderRadius=_,this.discountTableBorderStyle=m,this.discountTableHeader=p}function X(){return 0<v().length}function tt(){return window.qb.discount_groups=[],st.each(v(),function(t,e){e.discount_enabled&&window.qb.discount_groups.push(new Z(e))}),!!it(window.qb.discount_groups)}function et(t){return null!=t&&""!=t&&void 0!==t}function nt(t){return void 0!==t}function it(t){return null!=t&&void 0!==t&&0<t.length}function ot(e){var t=["revessel.myshopify.com"];e.enabled_cart_js_update&&-1!=st.inArray(g(),t)&&st(document).on("click",e.quantity_button_selector,function(t){t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){y(e,cart)},1e3)})}function at(t,e){t.reload_cart_page&&setInterval(function(){st(".qb-discounted-subtotal").length<1&&("shiningmood.myshopify.com"==g()?e.updateCart(function(){tt(),$(t,e)}):(tt(),$(t,e)))},1e3)}function rt(){var t=P();if(window.qb.datastore.discount_codes=[],window.qb.discountCodeApplied=!1,window.qb.discountedSubtotalApplied=!0,window.qb.convertedCurrency={converted_amount:1,currency_format:t.money_format},t&&(""==q()||!t.disable_for_logged_in_customers)){var e=new H;X()&&e.updateCart(function(){s(t).then(function(){tt(),it(window.qb.discount_groups)&&j(t,e),$(t,e),at(t,e),ot(e)})})}}var ct={AED:{SYMBOL:"Dhs.",CURRENCY_FORMAT:"Dhs. {{amount}}"},ANG:{SYMBOL:"\u0192;.",CURRENCY_FORMAT:"\u0192;{{amount}}"},BAM:{SYMBOL:"KM",CURRENCY_FORMAT:"KM {{ amount_with_comma_separator }}"},BNG:{SYMBOL:"\u043b\u0432",CURRENCY_FORMAT:"{{ amount }} \u043b\u0432"},BIF:{SYMBOL:"FBu.",CURRENCY_FORMAT:"FBu. {{ amount_with_comma_separator }}"},BMD:{SYMBOL:"BD$",CURRENCY_FORMAT:"BD${{ amount }}"},BND:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount }}"},BOB:{SYMBOL:"$",CURRENCY_FORMAT:"Bs{{ amount_with_comma_separator }}"},BRL:{SYMBOL:"R$",CURRENCY_FORMAT:"R$ {{ amount }}"},BWP:{SYMBOL:"P",CURRENCY_FORMAT:"P{{ amount }}"},BZD:{SYMBOL:"BZ$",CURRENCY_FORMAT:"BZ${{ amount }}"},CDF:{SYMBOL:"FC",CURRENCY_FORMAT:"FC{{ amount }}"},CHF:{SYMBOL:"SFr.",CURRENCY_FORMAT:"SFr. {{ amount }}"},CLP:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount }}"},CNY:{SYMBOL:"\xa5",CURRENCY_FORMAT:"\xa5{{ amount }}"},COP:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount_with_comma_separator }}"},CRC:{SYMBOL:"\u20a1",CURRENCY_FORMAT:"\u20a1 {{ amount_with_comma_separator }}"},CVE:{SYMBOL:"$",CURRENCY_FORMAT:"{{ amount_with_comma_separator }}$"},CZK:{SYMBOL:"K\u010d",CURRENCY_FORMAT:"{{ amount_with_comma_separator }} K\u010d"},DJF:{SYMBOL:"Fdj",CURRENCY_FORMAT:"{{ amount }} Fdj"},DKK:{SYMBOL:"kr",CURRENCY_FORMAT:"{{ amount_with_comma_separator }} kr"},DOP:{SYMBOL:"RD$",CURRENCY_FORMAT:"RD$ {{ amount_with_comma_separator }}"},EGP:{SYMBOL:"LE",CURRENCY_FORMAT:"LE {{ amount }}"},ETB:{SYMBOL:"Br",CURRENCY_FORMAT:"Br{{ amount }}"},FJD:{SYMBOL:"FJ$",CURRENCY_FORMAT:"FJ${{ amount }}"},FKP:{SYMBOL:"\xa3",CURRENCY_FORMAT:"\xa3{{ amount }}"},GBP:{SYMBOL:"\xa3",CURRENCY_FORMAT:"\xa3{{ amount }}"},GEL:{SYMBOL:"GEL",CURRENCY_FORMAT:"{{ amount }} GEL"},GIP:{SYMBOL:"\xa3",CURRENCY_FORMAT:"\xa3{{ amount }}"},GMD:{SYMBOL:"D",CURRENCY_FORMAT:"D {{ amount }}"},GNF:{SYMBOL:"FG",CURRENCY_FORMAT:"FG {{ amount_with_comma_separator }}"},GTQ:{SYMBOL:"Q",CURRENCY_FORMAT:"Q{{ amount }}"},GYD:{SYMBOL:"G$",CURRENCY_FORMAT:"G${{ amount }}"},HKD:{SYMBOL:"HK$",CURRENCY_FORMAT:"HK${{ amount }}"},HNL:{SYMBOL:"L",CURRENCY_FORMAT:"L {{ amount }}"},HRK:{SYMBOL:"kn",CURRENCY_FORMAT:"{{ amount_with_comma_separator }} kn"},HTG:{SYMBOL:"G",CURRENCY_FORMAT:"G {{ amount }}"},HUF:{SYMBOL:"Ft",CURRENCY_FORMAT:"{{ amount }} Ft"},IDR:{SYMBOL:"Rp",CURRENCY_FORMAT:"Rp {{ amount_with_comma_separator }}"},ILS:{SYMBOL:"NIS",CURRENCY_FORMAT:"{{ amount }} NIS"},INR:{SYMBOL:"Rs.",CURRENCY_FORMAT:"Rs. {{ amount }}"},ISK:{SYMBOL:"kr",CURRENCY_FORMAT:"{{ amount_no_decimals_with_comma_separator }} kr"},JMD:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount }}"},KES:{SYMBOL:"KSh",CURRENCY_FORMAT:"KSh{{ amount }}"},KGS:{SYMBOL:"\u043b\u0432",CURRENCY_FORMAT:"\u043b\u0432{{ amount }}"},KHR:{SYMBOL:"KHR",CURRENCY_FORMAT:"KHR{{ amount }}"},KMF:{SYMBOL:"CF",CURRENCY_FORMAT:"{{ amount_no_decimals_with_comma_separator }} CF"},KRW:{SYMBOL:"\u20a9",CURRENCY_FORMAT:"\u20a9{{ amount_with_comma_separator }}"},KYD:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount }}"},KZT:{SYMBOL:"KZT",CURRENCY_FORMAT:"{{ amount }} KZT"},LAK:{SYMBOL:"\u20ad",CURRENCY_FORMAT:"\u20ad{{ amount }}"},LBP:{SYMBOL:"L\xa3",CURRENCY_FORMAT:"L\xa3{{ amount }}"},LRD:{SYMBOL:"L$",CURRENCY_FORMAT:"L${{ amount }}"},LSL:{SYMBOL:"M",CURRENCY_FORMAT:"M{{ amount }}"},MAD:{SYMBOL:"Dh",CURRENCY_FORMAT:"Dh {{ amount }}"},MDL:{SYMBOL:"MDL",CURRENCY_FORMAT:"{{ amount }} MDL"},MKD:{SYMBOL:"\u0434\u0435\u043d",CURRENCY_FORMAT:"\u0434\u0435\u043d {{ amount }}"},MMK:{SYMBOL:"K",CURRENCY_FORMAT:"K{{ amount }}"},MNT:{SYMBOL:"\u20ae",CURRENCY_FORMAT:"{{ amount }} \u20ae"},MOP:{SYMBOL:"MOP$",CURRENCY_FORMAT:"MOP${{ amount }}"},MVR:{SYMBOL:"Rf",CURRENCY_FORMAT:"Rf{{ amount }}"},MWK:{SYMBOL:"Mk",CURRENCY_FORMAT:"Mk{{ amount }}"},MXN:{SYMBOL:"$",CURRENCY_FORMAT:"$ {{ amount }}"},MYR:{SYMBOL:"RM",CURRENCY_FORMAT:"RM{{ amount }}"},MZN:{SYMBOL:"Mt",CURRENCY_FORMAT:"{{ amount }} Mt"},NAD:{SYMBOL:"N$",CURRENCY_FORMAT:"N${{ amount }}"},NGN:{SYMBOL:"\u20a6",CURRENCY_FORMAT:"\u20a6{{ amount }}"},NIO:{SYMBOL:"C$",CURRENCY_FORMAT:"C${{ amount }}"},NOK:{SYMBOL:"kr",CURRENCY_FORMAT:"{{ amount_with_comma_separator }} kr"},JPY:{SYMBOL:"\xa5",CURRENCY_FORMAT:"\xa5{{amount}}"},PHP:{SYMBOL:"\u20b1",CURRENCY_FORMAT:"\u20b1{{amount}}"},CAD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},ALL:{SYMBOL:"Lek",CURRENCY_FORMAT:"Lek {{amount}}"},AOA:{SYMBOL:"Kz",CURRENCY_FORMAT:"Kz{{amount}}"},AMD:{SYMBOL:"AMD",CURRENCY_FORMAT:"{{amount}} AMD"},ARS:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount_with_comma_separator}}"},AUD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},AWD:{SYMBOL:"Afl",CURRENCY_FORMAT:"Afl{{amount}}"},BBD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},BBT:{SYMBOL:"Tk",CURRENCY_FORMAT:"Tk {{amount}}"},DZD:{SYMBOL:"DA",CURRENCY_FORMAT:"DA {{amount}}"},EUR:{SYMBOL:"\u20ac",CURRENCY_FORMAT:"\u20ac{{ amount_with_comma_separator }}"},LKR:{SYMBOL:"Rs",CURRENCY_FORMAT:"Rs {{amount}}"},MUR:{SYMBOL:"Rs",CURRENCY_FORMAT:"Rs {{amount}}"},NPR:{SYMBOL:"Rs",CURRENCY_FORMAT:"Rs{{amount}}"},PKR:{SYMBOL:"Rs.",CURRENCY_FORMAT:"Rs.{{amount}}"},SCR:{SYMBOL:"Rs",CURRENCY_FORMAT:"Rs {{amount}}"},USD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},TWD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},SGD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"}};window.qb.datastore.shop.show_express_checkout_buttons!==undefined&&window.qb.datastore.shop.show_express_checkout_buttons||a(),D.prototype.track=function(e,n,i){return function o(){if(i)return n.apply(this,arguments),e.apply(this,arguments);var t=e.apply(this,arguments);return n.apply(this,arguments),t}},D.prototype.setup=function(t){history.pushState=this.track(history.pushState,t),history.replaceState=this.track(history.replaceState,t),window.addEventListener("popstate",t)},st(document).ready(function(){nt(window.qb)&&"undefined"==typeof window.qb.running&&(window.qb.running=!0,h()?rt():p())})})};"undefined"==typeof jQuery||parseFloat(jQuery.fn.jquery)<1.7?loadScript("//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js",function(){var t=jQuery.noConflict(!0);myFrontendJavascriptQB(t)}):myFrontendJavascriptQB(jQuery);