PageSourceSearch

https://mycreativebox.com/cdn/shop/t/83/assets/z__jsAjaxCart.js?v=14866512277622926761739926935

js mycreativebox.com collected 2026-10-09 23:17:23 UTC 6,620 bytes, 2 lines download raw bytes

1(()=>{var __webpack_exports__={};Shopify.theme.jsAjaxCart={init:function($section){Shopify.theme.jsAjaxCart=$.extend(this,Shopify.theme.getSectionData($section)),isScreenSizeLarge()||this.cart_action=="drawer"?this.initializeAjaxCart():this.initializeAjaxCartOnMobile(),this.cart_action=="drawer"?(this.ajaxCartDrawer=$("[data-ajax-cart-drawer]"),$(document).on("click","[data-ajax-cart-trigger]",function(e){return e.preventDefault(),Shopify.theme.jsAjaxCart.showDrawer(),!1})):this.cart_action=="mini_cart"&&this.showMiniCartOnHover(),$(document).on("click",".ajax-submit",function(e){e.preventDefault();const $addToCartForm2=$(this).closest("form");return Shopify.theme.jsAjaxCart.addToCart($addToCartForm2),!1}),$(document).on("click","[data-ajax-cart-delete]",function(e){e.preventDefault();const lineID2=$(this).parents("[data-line-item]").data("line-item");return Shopify.theme.jsAjaxCart.removeFromCart(lineID2),Shopify.theme.jsCart&&Shopify.theme.jsCart.removeFromCart(lineID2),!1}),$(document).on("click","[data-ajax-cart-close]",function(e){return e.preventDefault(),Shopify.theme.jsAjaxCart.hideDrawer(),Shopify.theme.jsAjaxCart.hideMiniCart(),!1})},showMiniCartOnHover:function(){const $el=$("[data-ajax-cart-trigger]")},hideMiniCart:function(){if(this.cart_action!="mini_cart")return!1;$("[data-ajax-cart-close]").parents("[data-ajax-cart-trigger]").removeClass("show-mini-cart")},toggleMiniCart:function(){const $el=$(".mobile-header [data-ajax-cart-trigger]");$el.attr("href","#"),$el.off("touchstart").on("touchstart",function(e){e.target.closest("[data-ajax-cart-mini_cart]")||(Shopify.theme.jsAjaxCart.initializeAjaxCartOnMobile(),$el.toggleClass("show-mini-cart"))})},showDrawer:function(){if(this.cart_action!="drawer")return!1;this.ajaxCartDrawer.addClass("is-visible"),$(".ajax-cart__overlay").addClass("is-visible")},hideDrawer:function(){if(this.cart_action!="drawer")return!1;this.ajaxCartDrawer.removeClass("is-visible"),$(".ajax-cart__overlay").removeClass("is-visible")},removeFromCart:function(lineID,callback){$.ajax({type:"POST",url:"/cart/change.js",data:"quantity=0&line="+lineID,dataType:"json",success:function(cart){Shopify.theme.jsAjaxCart.updateView()},error:function(XMLHttpRequest,textStatus){var response=eval("("+XMLHttpRequest.responseText+")");response=response.description}})},initializeAjaxCart:function(){Shopify.theme.asyncView.load(Shopify.routes.cart_url,"ajax").done(({html,options})=>{$("[data-ajax-cart-content]").html(html.content),Shopify.theme.currencyConverter&&Shopify.theme.currencyConverter.convertCurrencies()}).fail(()=>{})},initializeAjaxCartOnMobile:function(){this.toggleMiniCart(),Shopify.theme.asyncView.load(Shopify.routes.cart_url,"ajax").done(({html,options})=>{$(".mobile-header [data-ajax-cart-content]").html(html.content)}).fail(()=>{})},addToCart:function($addToCartForm){const $addToCartBtn=$addToCartForm.find(".button--add-to-cart");if($("#template-product .subscription-modal").length)var $addBtnDisplay=$("#fakeCheckOut");else var $addBtnDisplay=$addToCartBtn;if($addToCartForm.removeClass("shopify-product-form--unselected-error"),$addToCartBtn[0].hasAttribute("data-options-unselected")){const cartWarning2=`<p class="cart-warning__message animated bounceIn">${Shopify.translation.select_variant}</p>`;$(".warning").remove(),$addToCartForm.addClass("shopify-product-form--unselected-error").find(".cart-warning").html(cartWarning2),$addBtnDisplay.removeAttr("disabled").removeClass("disabled"),$addBtnDisplay.find(".icon").removeClass("zoomOut").addClass("zoomIn"),$addBtnDisplay.find("span:not(.icon)").text($addBtnDisplay.data("label")).removeClass("zoomOut").addClass("zoomIn")}else $.ajax({url:"/cart/add.js",dataType:"json",cache:!1,type:"post",data:$addToCartForm.serialize(),beforeSend:function(){$addBtnDisplay.attr("disabled","disabled").addClass("disabled"),$addBtnDisplay.find("span").removeClass("fadeInDown").addClass("animated zoomOut")},success:function(product){let $el=$("[data-ajax-cart-trigger]");$addBtnDisplay.find(".checkmark").addClass("checkmark-active");function addedToCart(){isScreenSizeLarge()?$el=$("[data-ajax-cart-trigger]"):($el=$(".mobile-header [data-ajax-cart-trigger]"),Shopify.theme.scrollToTop($el)),$el.addClass("show-mini-cart"),$addBtnDisplay.find("span").removeClass("fadeInDown")}window.setTimeout(function(){$addBtnDisplay.removeAttr("disabled").removeClass("disabled"),$addBtnDisplay.find(".checkmark").removeClass("checkmark-active"),$addBtnDisplay.find(".text, .icon").removeClass("zoomOut").addClass("fadeInDown"),$addToCartBtn.on("webkitAnimationEnd oanimationend msAnimationEnd animationend",addedToCart)},1e3),Shopify.theme.jsAjaxCart.showDrawer(),Shopify.theme.jsAjaxCart.updateView(),Shopify.theme.jsCart&&$.ajax({dataType:"json",async:!1,cache:!1,dataType:"html",url:"/cart",success:function(html){const cartForm=$(html).find(".cart__form");$(".cart__form").replaceWith(cartForm)}})},error:function(XMLHttpRequest){let response=eval("("+XMLHttpRequest.responseText+")");response=response.description;const cartWarning=`<p class="cart-warning__message animated bounceIn">${response.replace("All 1 ","All ")}</p>`;$(".warning").remove(),$addToCartForm.find(".cart-warning").html(cartWarning),$addBtnDisplay.removeAttr("disabled").removeClass("disabled"),$addBtnDisplay.find(".icon").removeClass("zoomOut").addClass("zoomIn"),$addBtnDisplay.find("span:not(.icon)").text($addBtnDisplay.data("label")).removeClass("zoomOut").addClass("zoomIn")}})},updateView:function(){Shopify.theme.asyncView.load(Shopify.routes.cart_url,"ajax").done(({html,options})=>{if(options.item_count>0){const itemList=$(html.content).find(".ajax-cart__list"),cartDetails=$(html.content).find(".ajax-cart__details-wrapper");$(".free-shipping").replaceWith($(html.content).find(".free-shipping")),$(".ajax-cart__list").replaceWith(itemList),$(".ajax-cart__details-wrapper").replaceWith(cartDetails),$(".ajax-cart__empty-cart-message").addClass("is-hidden"),$(".ajax-cart__form").removeClass("is-hidden"),$("[data-ajax-cart-trigger]").addClass("has-cart-count"),$('[data-bind="itemCount"]').text(options.item_count)}
1else $(".ajax-cart__empty-cart-message").removeClass("is-hidden"),$(".ajax-cart__form").addClass("is-hidden"),$("[data-ajax-cart-trigger]").removeClass("has-cart-count"),$('[data-bind="itemCount"]').text("0");Shopify.theme.currencyConverter&&Shopify.theme.currencyConverter.convertCurrencies()}).fail(()=>{})},unload:function($section){$(".ajax-submit").off(),$("[data-ajax-cart-delete]").off()}}})();
2//# sourceMappingURL=/cdn/shop/t/83/assets/z__jsAjaxCart.js.map?v=14866512277622926761739926935

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.