Build 576754stable
Module 248352
925 characters · in 58c8987c33b44842.js, 331bf8185c686a13.jsDependencies
Source Raw
function(e,t,n){n.d(t,{A:()=>u});var l=n(17928),r=n(228366);let i=[],a=i;function o(e){a=null!=e&&e.length>0?e:i}class s extends l.Ay.Store{static displayName="CollectiblesUserDiscountStore";getUserDiscounts(){return a}getUserDiscount(e){return a.find(t=>t.discountId===e)}}let u=new s(r.h,{COLLECTIBLES_SHOP_HOME_FETCH_SUCCESS:function(e){o(e.shopHome.userDiscounts)},COLLECTIBLES_CATEGORIES_FETCH_SUCCESS:function(e){o(e.categories.userDiscounts)},SKU_PURCHASE_SUCCESS:function(e){let t=e.appliedUserDiscounts;if(null!=t&&t.length>0){let e=a.filter(e=>!t.some(t=>t.discount.id===e.discountId));if(e.length!==a.length)return a=e,!0}return!1},COLLECTIBLES_USER_DISCOUNTS_EXPIRED:function(e){let t=e.discountIds;if(t.length>0){let e=a.filter(e=>!t.includes(e.discountId));if(e.length!==a.length)return a=e,!0}return!1},WISHLIST_USER_DISCOUNTS_RESPONSE_SUCCESS:function(e){let{userDiscounts:t}=e;o(t)},LOGOUT:function(){a=i}})}