PageSourceSearch

https://www.viviennewestwood.com/on/demandware.static/Sites-vivien…/salesforce.minicart.widgets.bundle.js

js viviennewestwood.com collected 2026-10-02 02:33:35 UTC 3,113 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunksfra_boilerplate=globalThis.webpackChunksfra_boilerplate||[]).push([[5288],{5e3:(e,t,s)=>{function r(e){return class extends e{updateContent(e){return super.updateContent(e).then((t=>(this.updateExpressButton(e),t)))}updateExpressButton(e){this.getById("commercePaymentsExpress",(t=>{t.updateExpressButton(e)}))}handleError(e,t){this.ref("minicartMessage")?.setText(t)?.show()}}}s.r(t),s.d(t,{default:()=>r})},3090:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(5131),n=s(900);const a=function(e){return class extends e{prefs(){return{placeOrderUrl:"",paypalApproveUrl:"",shippingAddressChangeUrl:"",shippingOptionChangeUrl:"",paymentMethodUrl:"",paymentRequestId:"",isNotZeroTotal:!0,classesButtonInactive:"",...super.prefs()}}init(){super.init(),window.sfpp?.ready((()=>{const e=window.sfpp;e&&(this.paymentRequest=e.get(this.prefs().paymentRequestId),this.messages=e.get(`${this.prefs().paymentRequestId}-messages`),this.initPaymentRequest(this.paymentRequest))})),this.onCartUpdated()}onCartUpdated(e){e?.success&&e?.totals?.isZeroTotal&&this.setPref("isNotZeroTotal",!1),this.messages&&e?.paymentRequestAmount&&this.messages.updateAmount(e.paymentRequestAmount),this.ref("self").toggle(this.prefs().isNotZeroTotal)}initPaymentRequest(e){e.on("change",(e=>{e.elementType&&(this.paymentType=e.elementType),this.handleError(e.error?e.error.message:"")})),e.on("click",(e=>{this.paymentType=e.elementType})),e.on("payment",(()=>{const e=!!window.ApplePaySession;return(0,r.Zx)(this.prefs().placeOrderUrl,{paymentType:this.paymentType,applePay:e.toString()}).then((e=>{this.onCommercePaymentSubmitted(e)})).catch((e=>{this.handleError(e.errorMessage)}))})),e.on("paypal.approve",(()=>(0,r.Zx)(this.prefs().paypalApproveUrl).then((e=>{window.location.assign(e.redirectUrl)})).catch((e=>{e.responseJSON&&e.responseJSON.redirectUrl?window.location.assign(e.responseJSON.redirectUrl):this.handleError(e.errorMessage)})))),e.on("shippingaddresschange",(e=>{(0,r.Zx)(this.prefs().shippingAddressChangeUrl,e.shippingAddress).then((t=>{t.errorMessage&&this.handleError(t.errorMessage),e.updateWith(t)})).catch((()=>{e.updateWith({status:"fail"})}))})),e.on("shippingoptionchange",(e=>{(0,r.Zx)(this.prefs().shippingOptionChangeUrl,e.shippingOption).then((t=>{e.updateWith(t)})).catch((()=>{e.updateWith({status:"fail"})}))})),e.on("paymentmethod",(e=>{(0,r.Zx)(this.prefs().paymentMethodUrl,e).then((t=>{t.errorMessage&&this.handleError(t.errorMessage),e.updateWith(t)})).catch((()=>{e.updateWith({status:"fail"})}))}))}handleError(e){this.emit("handleerror",e||"")}onCommercePaymentSubmitted(e){e&&(e.redirectUrl?window.location.assign(e.redirectUrl):e.success?e.continueUrl&&window.location.assign((0,n.mq)(e.continueUrl,{ID:e.orderID,token:e.orderToken})):this.handleError(e.errorMessage))}handleButtonState(e){this.ref("salesforceExpressElement").toggleClass(this.prefs().classesButtonInactive,e)}updateExpressButton(e){e&&this.paymentRequest&&(this.paymentRequest.updatePaymentRequest(e.paymentRequestOptions),this.onCartUpdated(e),this.handleButtonState(e.valid.error))}}}}}]);

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.