1import{R as o,ag as r,ao as n,ap as d,aq as c,ar as u,as as l,aj as i}from"./app-DY-Uxj_V.js";import{n as f}from"./_plugin-vue2_normalizer-CA-Xk3lO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"121f7367906da11582988adb381429d68ba0221f"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="39acc552-3eb9-4650-a689-1e8e60636b28",t._sentryDebugIdIdentifier="sentry-dbid-39acc552-3eb9-4650-a689-1e8e60636b28")})()}catch{}Vue.use(o);Vue.use(r);const h={extends:n,render(){return this.$scopedSlots.default(this)},data(){return{wishlist:d("wishlist",{}),addToCarts:{}}},beforeMount(){(async()=>{var t,e;await c(),(e=(t=this.wishlist)==null?void 0:t.items_v2)!=null&&e.items&&Object.values(this.wishlist.items_v2.items).forEach((s,a)=>{this.$set(this.addToCarts,s.product.id||s.product.entity_id,0)})})()},methods:{updateQty(t,e){this.addToCarts[t]+e>=0&&(this.addToCarts[t]=parseInt(this.addToCarts[t])+e),"vibrate"in window.navigator&&window.navigator.vibrate(25)},setQty(t,e){e>0&&(this.addToCarts[t]=e)},async addToCart(){u.value||await l(),await i(),await Promise.all(Object.keys(this.addToCarts).map(async t=>{if(this.addToCarts[t]>0){let e=this.wishlist.items_v2.items.find(s=>(s.product.id||s.product.entity_id)==t);try{let s=await window.magentoGraphQL(`mutation ( 2 $cartId: String!, 3 $sku: String!, 4 $quantity: Float!, 5 $selected_options: [ID!], 6 $entered_options: [EnteredOptionInput] 7 ) { addProductsToCart(cartId: $cartId, cartItems: [{ 8 sku: $sku, 9 quantity: $quantity, 10 selected_options: $selected_options, 11 entered_options: $entered_options 12 }]) { cart { `+config.queries.cart+" } user_errors { code message } } }",{cartId:localStorage.mask,sku:e.product.sku,quantity:this.addToCarts[t]})}catch(s){const a=await s.response.json();Notify(a.user_errors.message,"error")}}})).finally(async()=>{Object.keys(this.addToCarts).map(async t=>{this.addToCarts[t]=0})}).then(async()=>{await i(!0)})}}},p=null,y=null;var w=f(h,p,y);const m=w.exports;export{m as default}; 13//# sourceMappingURL=AccountWishlist-y4OS4t90.js.map
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.