PageSourceSearch

https://www.wwf.nl/Content/dist/scripts/theme/theme-bundle-shop.js?v=1.0.0.26834.1

js wwf.nl collected 2026-10-02 02:40:43 UTC 9,630 bytes, 1 lines download raw bytes

1"use strict";var shop={sharedmethods:{updateHeader:function(t,e){var o=document.getElementById("cartLink"),r=document.querySelector("#cartLink .cart-n-items"),a=document.querySelector("#mobileCart .cart-n-items"),i=document.getElementById("mobileCart");t>0?(r&&a&&(r.innerHTML=t,a.innerHTML=t,r.style.display="inline",a.style.display="inline",t>9?(r.classList.add("double-digits"),a.classList.add("double-digits")):(r.classList.remove("double-digits"),a.classList.remove("double-digits"))),o.classList.add("has-items"),i.classList.add("has-items")):0===t&&(r&&a&&(r.style.display="none",a.style.display="none"),o.classList.remove("has-items"),i.classList.add("has-items"))}}},element=document.getElementById("pdp");if(element)var pdp=new Vue({el:"#pdp",data:{bigImageActive:!1,currentImage:0,activeAccordionItems:[],stickyMobileInfo:!0,skuId:"",cartTotalPrice:"",numberOfitems:0,showModal:!1,showError:!1,cartAdding:!1,product:{productName:"",productQuantity:0,productPrice:"",productDiscountedPrice:null,productImageUrl:"",availableAmount:0}},methods:{showBigImage:function(t){this.bigImageActive=!0,this.currentImage=t,document.body.classList.add("overlay-open")},hideBigImage:function(){this.bigImageActive=!1,document.body.classList.remove("overlay-open")},nextImage:function(){this.currentImage+=1},prevImage:function(){this.currentImage-=1},activate:function(t){-1!==jQuery.inArray(t,this.activeAccordionItems)?this.activeAccordionItems.splice($.inArray(t,this.activeAccordionItems),1):this.activeAccordionItems.push(t)},isActive:function(t){return-1!==this.activeAccordionItems.indexOf(t)},scrollHandle:function(){var t=jQuery(".js-mobile-info-placeholder").offset().top,e=jQuery(".pdp__mobile"),o=e.offset().top,r=document.documentElement.clientHeight;o>=t&&($window.scrollTop()+r-e.height()<t?this.stickyMobileInfo=!0:this.stickyMobileInfo=!1)},jumpToDescription:function(t){t.preventDefault(),this.isActive("description")||this.activate("description"),setTimeout(function(){var t=document.getElementById("description");
1window.scroll(0,t.offsetTop+200)},50)},getCartSummary:function(){var t=this;axios.post("/api/productcartapi/GetCartSummary",{cartType:"ProductCart"}).then(function(e){e.data.errored?t.errored=!0:(t.cartTotalPrice=e.data.Total,t.numberOfitems=e.data.NumberOfItems)}).catch(function(e){console.log(e),t.errored=!0})},addToCart:function(){var t=this;this.cartAdding=!0,axios.post("/api/productcartapi/AddItem",{cartType:"ProductCart",Code:this.skuId,Quantity:1}).then(function(e){t.getCartSummary(),t.cartAdding=!1,t.showModal=!0,t.showError=!e.data.IsAdded,t.product.productName=e.data.ProductName,t.product.productQuantity=e.data.ProductQuantity,t.product.productPrice=e.data.ProductPrice,t.product.productDiscountedPrice=e.data.ProductDiscountedPrice,t.product.productImageUrl=e.data.ProductImageUrl,t.product.availableAmount=e.data.AvailableAmount}).catch(function(e){console.log(e),t.errored=!0})},removeFromCart:function(){var t=this;axios.post("/api/productcartapi/RemoveItem",{cartType:"ProductCart",Code:this.skuId}).then(function(){t.getCartSummary()}).catch(function(e){console.log(e),t.errored=!0})},hideModal:function(){this.showModal=!1}},mounted:function(){var t=this;this.$nextTick(function(){window.addEventListener("scroll",function(){t.scrollHandle()})}),this.skuId=jQuery("#skuId").val()},computed:{leftColumn:function(){return this.$refs.leftColumn},rightColumn:function(){return this.$refs.rightColumn},row:function(){return this.$refs.row}},watch:{numberOfitems:function(){shop.sharedmethods.updateHeader(this.numberOfitems,this.cartTotalPrice)}}});var cart=new Vue({el:"#cart",data:{cartTotalPrice:"",errored:!1,cartLoading:!0,numberOfitems:0,subTotal:"",taxTotal:"",shippingCosts:"",shippingCostsDiscount:"",discountedShippingRate:"",freeShipping:!1,total:"",products:[],discounts:[],discountOpened:!1,discountCode:"",discountError:!1,discountErrorMessage:"",discountLoading:!1,discountRemoveLoading:!1,inventoryValid:!0,hasStoryProductAndAtLeastOneOtherProductType:!1},methods:{increaseQty:function(t){t.amountLoading=!0,this.addToCart(t)},decreaseQty:function(t){t.amountLoading=!0,this.removeFromCart(t)},removeProduct:function(t){t.isLoading=!0,this.removeLine(t)},getCart:function(){var t=this;axios.post("/api/productcartapi/GetCart",{cartType:"ProductCart"}).then(function(e){t.cartLoading=!1,t.subTotal=e.data.SubTotal,t.taxTotal=e.data.TaxTotal,t.total=e.data.Total,t.productsTemp=e.data.Products,t.shippingCosts=e.data.ShippingCosts,t.shippingCostsDiscount=e.data.ShippingCostsDiscount,t.discountedShippingRate=e.data.DiscountedS
1hippingRate,t.freeShipping=e.data.FreeShipping,t.discounts=e.data.Discounts,t.inventoryValid=e.data.InventoryIsValid,t.hasStoryProductAndAtLeastOneOtherProductType=e.data.HasStoryProductAndAtLeastOneOtherProductType,t.productsTemp.forEach(function(t){t.isLoading=!1,t.amountLoading=!1}),t.products=t.productsTemp}).catch(function(e){console.log(e),t.errored=!0})},getCartSummary:function(){var t=this;axios.post("/api/productcartapi/GetCartSummary",{cartType:"ProductCart"}).then(function(e){e.data.errored?t.errored=!0:(t.cartTotalPrice=e.data.Total,t.numberOfitems=e.data.NumberOfItems)}).catch(function(e){console.log(e),t.errored=!0})},addToCart:function(t){var e=this,o=t.Sku;axios.post("/api/productcartapi/AddItem",{cartType:"ProductCart",Code:o,Quantity:1}).then(function(){e.getCart(),e.getCartSummary()}).catch(function(t){console.log(t),e.errored=!0})},removeFromCart:function(t){var e=this,o=t.Sku;axios.post("/api/productcartapi/RemoveItem",{cartType:"ProductCart",Code:o}).then(function(){e.getCart(),e.getCartSummary()}).catch(function(t){console.log(t),e.errored=!0})},removeLine:function(t){var e=this,o=t.Sku;axios.post("/api/productcartapi/RemoveLine",{cartType:"ProductCart",Code:o}).then(function(){e.getCart(),e.getCartSummary()}).catch(function(t){console.log(t),e.errored=!0})},toggleDiscountInput:function(t){this.discountOpened=!this.discountOpened,$("#discount-fields").slideToggle(200,function(){$(this).is(":visible")&&$(this).find("input").focus()})},addDiscount:function(){var t=this;this.discountLoading=!0,this.discountError=!1,axios.post("/api/productcartapi/AddDiscount",{cartType:"ProductCart",Code:this.discountCode}).then(function(e){t.discountLoading=!1,e.data.IsValid?(t.discountCode="",t.getCart(),t.getCartSummary()):(t.discountError=!0,t.discountErrorMessage=e.data.Message)}
1).catch(function(e){console.log(e),t.errored=!0})},removeDiscount:function(t){var e=this;this.discountRemoveLoading=!0,axios.post("/api/productcartapi/removeDiscount",{cartType:"ProductCart",couponCode:t}).then(function(t){e.discountRemoveLoading=!1,t.data.IsRemoved?(e.getCart(),e.getCartSummary()):e.errored=!0}).catch(function(t){console.log(t),e.errored=!0})},goToCheckout:function(t){var e=t.target,o=e.offsetWidth+"px";e.style.width=o,e.classList.add("is-loading"),e.innerHTML='<i class="icon-spin6 animate-spin"></i>'}},mounted:function(){document.getElementById("cartLink")&&this.getCartSummary(),document.getElementById("cart")&&this.getCart()},watch:{numberOfitems:function(){shop.sharedmethods.updateHeader(this.numberOfitems,this.cartTotalPrice)}},filters:{truncate:function(t,e){return t?t.length<=e?t:t.substring(0,e)+"…":t}}});!function(){var t=document.querySelectorAll("article.js-product");Array.prototype.forEach.call(t,function(t,e){var o="",r="",a="",i=t.querySelector('input[name="selected-variant"]'),n=t.querySelector('input[name="currentPrice"]'),c=t.querySelector('input[name="originalPrice"]');null!==i&&(o=i.value),null!==n&&(r=n.value),c&&(a=c.value),new Vue({el:t,data:{sku:o,cartAdding:!1,cartTotalPrice:"",numberOfitems:0,quantity:1,errored:!1,showModal:!1,showError:!1,variantPrice:r,originalPrice:a,showMoreOptions:!1,removeOverflow:!1,product:{productName:"",productQuantity:0,productPrice:"",productDiscountedPrice:null,productImageUrl:"",availableAmount:0}},methods:{toggleMoreOptions:function(t){var e=this;this.showMoreOptions=!this.showMoreOptions,setTimeout(function(){e.removeOverflow=!0},500),document.body.addEventListener("click",this.handleBodyClick)},handleBodyClick:function(t){t.target.closest("button")||t.target.closest(".lower-content")||(this.showMoreOptions=!1,this.removeOverflow=!1,document.body.removeEventListener("click",this.handleBodyClick))},getCartSummary:function(){var t=this;axios.post("/api/productcartapi/GetCartSummary",{cartType:"ProductCart"}).then(function(e){e.data.errored?t.errored=!0:(t.cartTotalPrice=e.data.Total,t.numberOfitems=e.data.NumberOfItems)}).catch(function(e){console.log(e),t.errored=!0})},addToCart:function(){var t=this;this.sku&&(this.cartAdding=!0,axios.post("/api/productcartapi/AddItem",{cartType:"ProductCart",Code:this.sku,Quantity:this.quantity}).then(function(e){t.getCartSummary(),t.cartAdding=!1,t.showModal=!0,t.showError=!e.data.IsAdded,t.product.productName=e.data.ProductName,t.product.productQuantity=e.data.ProductQuantity,t.product.productPrice=e.data.ProductPrice,t.product.productDiscountedPrice=e.data.ProductDiscountedPrice,t.product.productImageUrl=e.data.ProductImageUrl,t.product.availableAmount=e.data.AvailableAmount}).catch(function(e){console.log(e),t.errored=!0}))},hideModal:function(){this.showModal=!1},updateVariantData:function(){var t=this;axios.get("/api/productvariantApi/GetVariant?code="+this.sku).then(function(e){t.variantPrice=e.data.CurrentPrice,t.originalPrice=e.data.FromPrice}).catch(function(e){console.log(e),t.errored=!0})}},watch:{numberOfitems:function(){shop.sharedmethods.updateHeader(this.numberOfitems,this.cartTotalPrice)},sku:function(){this.updateVariantData()}}})})}();

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.