"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9524],{35870:(e,t,r)=>{r.d(t,{T:()=>c});var n=r(82277),i=r(28489),a=r(26911),o=r(93307),c=function(){return n.V0.fetch("/api-v1/commerce/api/v1/cart",n.w$.GET).then((function(e){if(e.data)return e.data.data;throw(0,i.xK)(e)})).catch((function(e){throw(0,i.xK)(e)})).then((function(e){return{totalPrice:e.cartLines.reduce((function(e,t){return e+t.totalPrice.amountCents}),0)/100,totalToPay:e.totalPrice.amountCents/100,paymentIntention:e.paymentIntention,balance:0,balanceToSpend:0,totalDiscountInCart:0,totalGiftCardDiscountInCart:0,lastEditDate:"2022-02-21T00:00:00+01:00",shippingAddress:e.shippingAddress,totalQty:e.cartLines.reduce((function(e,t){return e+t.qty}),0),marketPlaceShippingCost:e.deliveries.reduce((function(e,t){if(!t.fulFilledByPcc){var r=t.shippingMethods.find((function(e){return e.id===t.selectedShippingMethod}));return e+(r?r.price.amountCents:0)}return e}),0)/100,dropShippingShippingCost:0,shippingCost:e.deliveries.reduce((function(e,t){if(t.fulFilledByPcc){var r=t.shippingMethods.find((function(e){return e.id===t.selectedShippingMethod}));return e+(r?r.price.amountCents:0)}return e}),0)/100,totalInstallationPrice:0,giftCardAmountToSpend:0,totalPayed:0,surcharge:0,directPoints:0,cartShops:[],shippingCostISP:0,commission:0,commissionISP:0,talonOneNotifications:[],isCustomPcCom:!1,articles:e.cartLines.map((function(t){return{idArticle:+t.product.id,idLine:t.id,type:"normal",articleImage:t.product.image,ean:"123456789",articleReference:0,lineReference:e.lineRelationships.reduce((function(e,r){return e||(r.relatedLineId===t.id?r.parentLineId:void 0)}),void 0),availabilityCode:e.deliveries.reduce((function(e,r){return r.items.reduce((function(e,r){return r.lineId===t.id?(0,o.XU)(r.availabilityType):e}),a.wr.OUT_OF_STOCK.valueOf())}),a.wr.OUT_OF_STOCK.valueOf()),name:t.product.name,familyId:1115,family:"Portátiles",superFamily:"Ordenadores",superFamilyId:42,totalPrice:t.totalPrice.amountCents/100,totalPriceWithSpanishCanon:t.totalPrice.amountCents/100,unitPrice:(t.unitPrice.amountCents+t.unitTaxAmount.amountCents)/100,bestPrice:100,recommendedPrice:1e4,basePrice:t.unitPrice.amountCents/100,unitTaxAmount:t.unitTaxAmount.amountCents/100,qty:t.qty,slug:"lenovo-ideapad",trademark:"Lenovo",trademarkRef:"345jkhgkj35",promotions:[],mpOffer:{idOffer:0,shopId:t.seller.id,shopName:t.seller.name,shopSlug:"",condition:t.condition,shipTax:0,priceOffer:0,valorateShop:0,maxShippingDays:0,minShippingDays:0,shippingTypeCode:"",deliveryKey:0},deliveryDate:{strDeliveryDate:"hoy no, mañana",isSameDay:!1,minDeliveryDate:"min",maxDeliveryDate:"max"},storeAvailability:{1:!0,26:!1,27:!1,28:!1,30:!1,44:!0,45:!1,62:!1,295:!1},articleStock:0,isOem:!1,extendedInsurance:void 0,extendedInsurances:[],installationService:void 0,canAddGiftPaper:!1,isCustomPcCom:!1,insuranceSelected:void 0,extraServiceSelected:void 0,articleWarrantyReference:0,isPromotional:0,mpOfferReference:"",subExtraOptions:[],subExtraArticles:[],isElectronic:!1,digitalData:null,isExtraServiceArticle:e.lineRelationships.reduce((function(e,r){return e||r.relatedLineId===t.id}),!1),extraServices:[],couponDiscountTextValue:"",detail:"",date:""}}))}}))}},78671:(e,t,r)=>{r.d(t,{s:()=>a});var n=r(82277),i=r(28489),a=function(){return n.V0.fetch("/api-v1/commerce/api/v1/country",n.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)})).then((function(e){var t=[];return Object.keys(e).forEach((function(r,n){t.push({idCountry:n,iso:e[n].isoCode,name:e[n].isoName})})),t}))}},47242:(e,t,r)=>{r.d(t,{S:()=>c});var n=r(82277),i=r(28489);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?function(e){var t=o(new Set(e));return n.V0.fetch("/api-v1/commerce/api/v1/offer/relatable",n.w$.GET,{productIds:t}).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)}))}(e).then((function(e){return e})):[]}},39140:(e,t,r)=>{r.d(t,{b:()=>I});var n=r(35870),i=r(82277),a=r(28489),o=r(3678),c=r(93307),d=r(77733);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?(f[0].default=1,I?[3,3]:(I=f[0],[4,(0,d.M)({id:I.id.toString(),name:I.name+" "+I.surname,addressLine:I.address,email:I.email,phone:I.phone,countryIsoCode:I.country.iso,provinceIsoCode:I.province.id,city:I.city,postalCode:I.postalCode}).catch((function(){I=void 0}))])):[3,3];case 2:A.sent(),A.label=3;case 3:return l.length>0&&(l[0].defaultUser=!0,p||(p=l[0])),_=function(e){var t=[];return e.includes(o.XL.ADYEN_CARD)&&t.push({bank:"Adyen",description:"Esta forma de pago es inmediata y totalmente segura. Todos los pagos efectuados mediante esta forma de pago serán validados por su entidad bancaria y en caso de ser aceptados nos será remitido de forma automática e instantanea. Requiere de una clave de seguridad para poder realizar este tipo de pagos online. Consulte a su entidad bancaria si desconoce su clave de seguridad. Se aceptan tarjetas VISA\\/ VISA Electron y MasterCard\\/Maestro.",groupType:"tarjeta",idPayment:o.XL.ADYEN_CARD,message:"",name:"Tarjeta de Crédito / Débito",slug:"adyen",url:""}),e.includes(o.XL.APLAZAME)&&t.push({bank:"Aplazame",description:"Financiación a plazos con Tarjeta. Puedes financiar cualquier importe hasta un máximo de 2.500€ y elegir pagarlo entre 2 y 30 meses. Para solicitar la financiación es necesario que tengas un DNI o NIE válido, un teléfono móvil, y la tarjeta bancaria. El pedido tiene que tener dirección de entrega en España. La financiación tiene un coste TAE del 12,5%. Pagas una entrada inicial en momento de la compra, que no incluye intereses, y el resto se reparte entre las cuotas seleccionadas. RECUERDA TENER EL DNI / NIE ORIGINAL A MANO para tramitar la financiación.
IMPORTANTE: Si tu pedido incluye artículos que entran dentro de una campaña sin intereses, Aplazame lo tendrá en cuenta para no aplicar intereses sobre la financiación en aquellos artículos que estén dentro de la campaña correspondiente.",groupType:"financiacion",idPayment:o.XL.APLAZAME,message:"",name:"Financiación Aplazame de 2 a 30 meses (inmediata)",slug:"aplazame",url:""}),t}(u),[2,{cart:t,shippingAddress:f,billingAddress:l,billingSelected:p?p.idUser:0,shippingSelected:I?I.id:0,agencySelected:69,paymentTypeSelected:23,agencies:{availableAgencies:[]},payments:_,paymentsNotAllowed:[],deliveryTimeCollection:[],delegations:[],availableClientPromotions:[],canShowGiftPaper:0,canShowNeutralDelivery:!0,hasOtherTwoOrdersWithPaypal:!1,hasAssembly:!1,hasCif:!1,hasPublicCif:!1,customMessage:0,availableShops:[],adyenBankstores:{},canBeSimplifiedInvoice:!1,criticalErrors:[],canShowShippingPoints:!1,canBePremium:!1,authorizedPoints:[],isCollectInShop:!1,talonCoupons:[],ordersAndDeliveries:[],awardedFinancing:void 0,payPerUseInstallments:[],shopCounter:!1}]}}))},p=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=f.apply(e,t);function a(e){l(i,r,n,a,o,"next",e)}function o(e){l(i,r,n,a,o,"throw",e)}a(void 0)}))},function(){return p.apply(this,arguments)})},93307:(e,t,r)=>{r.d(t,{XU:()=>c,Zi:()=>a,m2:()=>o});var n=r(38483),i=r(26911),a=function(e){return{streetNumber:"",id:parseInt(e.id),nif:"29318711J",alias:"",company:"",name:d(e.name),surname:u(e.name),address:e.addressLine,postalCode:e.postalCode,city:e.city,phone:e.phone,default:0,province:{id:e.provinceIsoCode,name:e.provinceIsoName},country:{idCountry:0,iso:e.countryIsoCode,name:e.countryIsoName,provinces:0},email:e.email,optionalInformation:"",validated:!0}},o=function(e){return{streetNumber:"",activated:"",address:e.addressLine,alias:"",billingType:n.y.INDIVIDUAL,cellPhone:e.phone,city:e.city,clientPromotions:{promotions:[]},company:"",country:{idCountry:0,iso:e.countryIsoCode,name:e.countryIsoName,provinces:0},defaultUser:!1,domain:"",idUser:parseInt(e.id),name:d(e.name),nif:"29318711J",postalCode:e.postalCode,province:{id:e.provinceIsoCode,name:e.provinceIsoName},surname:u(e.name)}},c=function(e){var t={STOCK_ON_HAND:i.wr.IN_STOCK,STOCK_IN_TRANSIT:i.wr.INMINENT_REPLENISHMENT,PLANNED_REPLENISHMENT:i.wr.HIGH_AVAILABILITY,OUT_OF_STOCK:i.wr.OUT_OF_STOCK};if(!(e in t))throw new Error("Availability type not supported "+e);return t[e]},d=function(e){return e.split(" ")[0]},u=function(e){var t=e.split(" ");return t.length>1?(t.shift(),t.join(" ")):" "}},77733:(e,t,r)=>{r.d(t,{M:()=>a});var n=r(82277);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=function(e){return n.V0.fetch("/api-v1/commerce/api/v1/cart/shipping-address",n.w$.PUT,function(e){for(var t=1;t{r.d(t,{r:()=>a});var n=r(82277),i=r(28489),a=function(e){return n.V0.fetch("/api-v1/commerce/api/v1/payment/".concat(e,"/aplazame/checkout"),n.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)}))}},3678:(e,t,r)=>{var n,i,a;r.d(t,{XL:()=>n,bG:()=>i}),function(e){e.ADYEN_CARD="adyen-card",e.REDSYS_CARD="redsys-card",e.APLAZAME="aplazame"}(n||(n={})),function(e){e.ERROR="Error",e.REDIRECT="Redirect",e.AUTHORISED="Authorised",e.PENDING="Pending",e.PAID="Paid"}(i||(i={})),function(e){e.STOCK_ON_HAND="STOCK_ON_HAND",e.STOCK_IN_TRANSIT="STOCK_IN_TRANSIT",e.PLANNED_REPLENISHMENT="PLANNED_REPLENISHMENT",e.OUT_OF_STOCK="OUT_OF_STOCK"}(a||(a={}))},94062:(e,t,r)=>{r.d(t,{M:()=>a});var n=r(3678),i=r(50519),a=function(e,t){if(e.cart.paymentIntention&&(n.XL.APLAZAME===e.cart.paymentIntention.paymentMethod&&t((0,i.b_)(n.XL.APLAZAME)),n.XL.ADYEN_CARD===e.cart.paymentIntention.paymentMethod)){var r=e.cart.paymentIntention.paymentData;t((0,i.b_)(n.XL.ADYEN_CARD)),t((0,i.K1)({cardData:{cardBrand:r.paymentMethod.brand,cardName:r.paymentMethod.holderName,endDigits:r.paymentMethod.endDigits},data:{browserInfo:{acceptHeader:r.browserInfo.acceptHeader,colorDepth:r.browserInfo.colorDepth,javaEnabled:r.browserInfo.javaEnabled,language:r.browserInfo.language,screenHeight:r.browserInfo.screenHeight,screenWidth:r.browserInfo.screenWidth,timeZoneOffset:r.browserInfo.timeZoneOffset,userAgent:r.browserInfo.userAgent},clientStateDataIndicator:r.clientStateDataIndicator,paymentMethod:{brand:r.paymentMethod.brand,encryptedCardNumber:r.paymentMethod.encryptedCardNumber,encryptedExpiryMonth:r.paymentMethod.encryptedExpiryMonth,encryptedExpiryYear:r.paymentMethod.encryptedExpiryYear,encryptedSecurityCode:r.paymentMethod.encryptedSecurityCode,holderName:r.paymentMethod.holderName,type:r.paymentMethod.type},riskData:{clientData:r.riskData.clientData},storePaymentMethod:r.storePaymentMethod}}))}}},72037:(e,t,r)=>{r.d(t,{_o:()=>l,po:()=>c,tZ:()=>u,um:()=>d});var n=r(26911),i=r(54461);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{r.d(t,{C0:()=>F,Ck:()=>N,JN:()=>W,Lu:()=>M,Lw:()=>j,Ot:()=>x,PI:()=>K,Rr:()=>G,Ux:()=>b,Yg:()=>D,_y:()=>P,o1:()=>V,pY:()=>Y,rY:()=>X,xK:()=>H});var n=r(33945),i=r(26911),a=r(23031),o=r(49553),c=r(50519),d=r(15792);function u(e,t,r,n,i,a,o){try{var c=e[a](o),d=c.value}catch(e){return void r(e)}c.done?t(d):Promise.resolve(d).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){u(a,n,i,o,c,"next",e)}function c(e){u(a,n,i,o,c,"throw",e)}o(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e,t,r){return p=f()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&T(i,r.prototype),i},p.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function I(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}function _(e,t){return null!=t&&"undefined"!==typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function E(e,t){return!t||"object"!==v(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e,t){return T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},T(e,t)}var v=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function y(e){var t="function"===typeof Map?new Map:void 0;return y=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,A(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),T(n,e)},y(e)}function S(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=A(e);if(t){var i=A(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return E(this,r)}}var m,h=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]").concat(null!==(r=t.articleName)&&void 0!==r?r:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case i.LI.OUT_OF_STOCK:var n;return{text:"".concat((0,a.t)("checkout.errors.outOfStock")," ").concat(null!==(n=t.articleName)&&void 0!==n?n:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case i.LI.EMPTY_CART:var o;return{text:"".concat((0,a.t)("checkout.errors.emptyCart")," ").concat(null!==(o=t.articleName)&&void 0!==o?o:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case i.LI.USER_NOT_FOUND:var c;return{text:"".concat((0,a.t)("checkout.errors.userNotFound")," ").concat(null!==(c=t.articleName)&&void 0!==c?c:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case i.LI.ARTICLE_CANT_BE_ALONE_IN_ORDER:var d;return{text:"".concat((0,a.t)("checkout.errors.articleCantBeAloneInOrder")," ").concat(null!==(d=t.articleName)&&void 0!==d?d:"",""),type:"danger",errorCode:t.code,hasIcon:!0,blockNextStep:!0};case i.LI.URGENT_LIMIT_STOCK_REACHED:return{text:(0,a.t)("checkout.alerts.stockLimitReached"),type:"info",errorCode:t.code};case i.LI.MARKETPLACE_OFFER_MATCH:return{text:(0,a.t)("checkout.alerts.marketplaceOfferMatch"),type:"info",errorCode:t.code};case i.LI.WEIGHT_INTERNATIONAL_SHIPPING:return{text:(0,a.t)("checkout.alerts.weightInternationalShipping"),type:"info",errorCode:t.code};case i.LI.CP_BLOCKED:return{text:(0,a.t)("checkout.alerts.cpBlocked"),type:"info",errorCode:t.code};case i.LI.MARKET_PLACEORDER_WITHOUT_ADYEN:return{text:(0,a.t)("checkout.alerts.marketPlaceOrderWithoutAdyen"),type:"info",errorCode:t.code};case i.LI.CANARY_LIMITATION:return{text:(0,a.t)("checkout.alerts.canaryLimitation"),type:"info",errorCode:t.code};case i.LI.DROPSHIPPING_ADDRESS_LIMITATION:return{text:t.articleName?(0,a.t)("checkout.alerts.dropShippingAddressSendingLimitation").replace(":article","".concat(t.articleName,"")):(0,a.t)("checkout.alerts.dropShippingAddressSendingLimitationGeneric"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case i.LI.PREMIUM_TARIFF_ADDRESS_LIMITATION:return{text:(0,a.t)("checkout.alerts.premiumTariffAddressLimitation"),type:"info",errorCode:t.code};case i.LI.SHIPPING_COUNTRY_LIMITATION:return{text:(0,a.t)("checkout.alerts.shippingCountryLimitation"),type:"info",errorCode:t.code};case i.LI.DIGITAL_CODES_AMOUNT_LIMITATION:return{text:(0,a.t)("checkout.alerts.digitalCodesAmountLimitation"),type:"info",errorCode:t.code};case i.LI.DIGITAL_CODES_ZONES_LIMITATION:return{text:(0,a.t)("checkout.alerts.digitalCodesZonesLimitation"),type:"info",errorCode:t.code};case i.LI.CART_WITHOUT_ADDRESS:return{text:(0,a.t)("checkout.alerts.cartWithoutAddress"),type:"info",errorCode:t.code};case i.LI.CHANGE_BILLING_MODIFIER:return{text:(0,a.t)("checkout.alerts.changeBillingInModifier"),type:"info",errorCode:t.code,blockNextStep:!0};case i.LI.CART_WITHOUT_AGENCIES:return{text:(0,a.t)("checkout.alerts.cartWithoutAgencies"),type:"info",errorCode:t.code,blockNextStep:!0};case i.LI.CART_WITHOUT_PAYMENTMETHODS:return{text:(0,a.t)("checkout.alerts.cartWithoutPaymentMethods"),type:"info",errorCode:t.code};case i.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE:return{text:(0,a.t)("checkout.alerts.noZonesAvailableInMktPlace"),type:"info",errorCode:t.code,blockNextStep:!0};case i.LI.CART_FORCE_BILLING:return{text:(0,a.t)("checkout.alerts.cartForceBilling"),type:"info",errorCode:t.code};case i.LI.MAX_COD_DELIVERY_MODIFIER:return{text:(0,a.t)("checkout.alerts.maxCodDeliveryModifier"),type:"info",errorCode:t.code};case i.LI.PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER:return{text:"",type:"info",errorCode:t.code};case i.LI.PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE:return{text:(0,a.t)("checkout.alerts.pickingPointOrInShopPayPerUse"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case i.LI.PORTUGAL_ARTICLES_VALIDATION:return{text:t.articleName?(0,a.t)("checkout.alerts.portugalArticlesLimitation").replace(":article","".concat(t.articleName,"")):(0,a.t)("checkout.alerts.portugalArticlesLimitationGeneric"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case i.LI.SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION:return{text:(0,a.t)("checkout.alerts.shippingIsIncompatibleWithBillingValidation"),type:"danger",errorCode:t.code,blockNextStep:!0,hasIcon:!0};default:return{text:(0,a.t)("checkout.alerts.genericError"),type:"info",errorCode:t.code}}},K=function(e){var t,r,n,i,o,c,d,u=(null===(t=e.detail)||void 0===t||null===(r=t.info)||void 0===r?void 0:r.limits)&&(null===(n=e.detail)||void 0===n||null===(i=n.info)||void 0===i||null===(o=i.limits)||void 0===o?void 0:o.length)?null===(c=e.detail)||void 0===c||null===(d=c.info)||void 0===d?void 0:d.limits[0].name:void 0;return u?"".concat((0,a.t)("checkout.alerts.stockLimitReachedWithArticle")," ").concat(u,". ").concat((0,a.t)("checkout.alerts.yourCartHasBeenUpdated")):(0,a.t)("checkout.alerts.stockLimitReached")},X=(m=l((function(e,t){var r;return h(this,(function(n){switch(n.label){case 0:return _(e,C)||_(e,g)?((r=sessionStorage.getItem("koUrl"))&&r.includes("/cart/ko")?t((0,c.A7)(r)):window.location.href="".concat(d.qp.PATH).concat(d.Ti.PATH),[3,4]):[3,1];case 1:return _(e,P)||_(e,N)?[4,(0,o.QV)()]:[3,3];case 2:return n.sent(),t(c.wt.failure(e)),[3,4];case 3:_(e,D)?t(c.wt.failure(e)):_(e,R)?t((0,c.bI)((0,a.t)("checkout.errors.noZonesAvailableInMktPlace"))):t(c.wt.failure(e)),n.label=4;case 4:return[2]}}))})),function(e,t){return m.apply(this,arguments)}),W=function(){var e=l((function(e,t){return h(this,(function(r){switch(r.label){case 0:return _(e,C)||_(e,g)?(window.location.href="".concat(d.qp.PATH).concat(d.Ti.PATH),[3,4]):[3,1];case 1:return _(e,P)||_(e,N)?[4,(0,o.QV)()]:[3,3];case 2:return r.sent(),t(c.kX.failure(e)),[3,4];case 3:_(e,D)?t(c.kX.failure(e)):_(e,R)?t((0,c.bI)((0,a.t)("checkout.errors.noZonesAvailableInMktPlace"))):t(c.kX.failure(e)),r.label=4;case 4:return[2]}}))}));return function(t,r){return e.apply(this,arguments)}}(),j=function(){var e=l((function(e,t,r,i,a){var d;return h(this,(function(u){switch(u.label){case 0:return _(e,P)||_(e,N)?[4,(0,o.QV)()]:[3,2];case 1:return u.sent(),t(c.Uq.failure(e)),[3,3];case 2:_(e,L)?t((0,c.sT)({idCart:r,query:(0,n.A8)(i,"idPayment"),setNewDeliveryAgency:!1,newDefaultPaymentMethod:!0,relatableOffers:a})):_(e,O)?t((0,c.sT)({idCart:r,query:(0,n.A8)(i,"idAgency"),setNewDeliveryAgency:!0,relatableOffers:a})):_(e,D)||_(e,U)?t(c.Uq.failure(e)):_(e,C)||_(e,g)?(d=sessionStorage.getItem("koUrl"))&&d.includes("/cart/ko")?t((0,c.A7)(d)):t(c.Uq.failure(e)):(_(e,w),t(c.Uq.failure(e))),u.label=3;case 3:return[2]}}))}));return function(t,r,n,i,a){return e.apply(this,arguments)}}()},72065:(e,t,r)=>{r.d(t,{A3x:()=>i.A3,A40:()=>i.A4,A7T:()=>n.A7,Ahb:()=>i.Ah,Bko:()=>i.Bk,BoC:()=>i.Bo,BrQ:()=>a.Br,Coy:()=>i.Co,D4n:()=>a.D4,DQ9:()=>n.DQ,DeV:()=>i.De,Dsx:()=>a.Ds,DyX:()=>a.Dy,EVb:()=>i.EV,EkG:()=>n.Ek,Eof:()=>n.Eo,Eth:()=>n.Et,FMh:()=>i.FM,H6W:()=>n.H6,H7R:()=>a.H7,H97:()=>n.H9,HUT:()=>i.HU,Hm2:()=>n.Hm,I8w:()=>i.I8,Ibn:()=>a.Ib,Itk:()=>i.It,JP3:()=>n.JP,Jaj:()=>i.J,L1p:()=>i.L1,LOu:()=>i.LO,LSj:()=>i.LS,MVr:()=>i.MV,MZK:()=>i.MZ,Nle:()=>a.Nl,NpQ:()=>n.Np,O0T:()=>a.O0,Oim:()=>n.Oi,Oo5:()=>i.Oo,P7h:()=>n.P7,PYf:()=>i.PY,Pf5:()=>i.Pf,Q02:()=>i.Q0,QEG:()=>i.QE,QEN:()=>i.oy,QkQ:()=>i.Qk,QvV:()=>i.Qv,RK0:()=>n.RK,RUH:()=>n.RU,R_R:()=>i.R_,RnJ:()=>n.Rn,S2R:()=>i.S2,SGx:()=>a.SG,Syk:()=>i.Sy,Tny:()=>i.Tn,U8n:()=>i.U8,UD5:()=>i.UD,UGj:()=>a.UG,V7P:()=>a.V7,VAG:()=>i.VA,VZ5:()=>i.VZ,WFr:()=>a.WF,WvY:()=>i.Wv,Wwl:()=>n.Ww,X6K:()=>i.X6,XL7:()=>a.XL,XTI:()=>n.XT,XZx:()=>i.XZ,Xcl:()=>a.Xc,XpC:()=>i.Xp,Zlu:()=>a.Zl,ZpS:()=>n.Zp,_pP:()=>i._p,_vP:()=>i._v,aDD:()=>i.aD,bIw:()=>n.bI,bPC:()=>n.bP,bTv:()=>n.bT,b_M:()=>n.b_,bjp:()=>i.bj,cJO:()=>i.cJ,cRT:()=>n.cR,ckw:()=>a.ck,dBV:()=>i.dB,dMi:()=>i.dM,eVC:()=>i.eV,eYc:()=>i.eY,f0H:()=>n.f0,fW2:()=>i.fW,gHe:()=>i.gH,gMe:()=>a.gM,h8e:()=>a.h8,hbI:()=>a.hb,i6p:()=>i.i6,iBt:()=>i.iB,i_L:()=>n.i_,k8Z:()=>n.k8,kEf:()=>i.kE,kaJ:()=>i.k,kun:()=>i.ku,lV0:()=>i.lV,laX:()=>n.l,lzc:()=>n.lz,mfd:()=>n.mf,mwV:()=>a.mw,nT7:()=>i.nT,ncy:()=>n.nc,peT:()=>a.pe,px3:()=>n.px,qDK:()=>i.qD,qbP:()=>n.qb,rS:()=>n.rS,rTZ:()=>i.rT,rc9:()=>i.rc,rwq:()=>i.rw,s4q:()=>n.s4,sC4:()=>i.sC,sKd:()=>a.sK,sNc:()=>i.sN,sSp:()=>i.sS,sTi:()=>n.sT,sxb:()=>a.sx,tIm:()=>i.tI,t_p:()=>n.t_,tdJ:()=>n.td,vo1:()=>a.vo,vqT:()=>n.vq,wC2:()=>n.wC,wDp:()=>n.wD,wGL:()=>i.wG,wPS:()=>n.wP,wrp:()=>a.wr,xlD:()=>i.xl,yJU:()=>n.yJ,yTB:()=>i.yT,zzl:()=>i.zz});var n=r(50519),i=(r(73859),r(80899)),a=r(26911)},73859:(e,t,r)=>{r.d(t,{J:()=>E});var n=r(63814),i=r(26911),a=r(33945),o=r(28489),c=r(23031),d=r(50519),u=r(40093);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0,r={text:"",type:"info"},l=!1,s=function(e){var t;if((null===(t=e.filter((function(e){return e.code!==i.LI.ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD})))||void 0===t?void 0:t.length)>0)return(0,o.C0)(e)},E=function(e){var t="",r="warning";if(f(e,o._y)){var n,i=null===(n=e.detail.info)||void 0===n?void 0:n.bookings;i&&(i.length>1&&(t=(0,c.t)("checkout.errors.outOfStockWithArticles",{articleNames:i.join(", ")})),1===i.length&&(t=(0,c.t)("checkout.errors.outOfStockWithArticle",{articleName:i[0].name})))}return f(e,o.Yg)&&(t=(0,c.t)("checkout.errors.userNotFound")),f(e,o.Ck)&&(t=(0,o.PI)(e)),f(e,o.pY)&&(t=(0,c.t)("checkout.errors.genericError"),r="danger"),{alertTextReturned:t,typeReturned:r}},T=function(t){var r=e.alert;return(0,a.vA)(t)?r=A(p({},e.alert),{global:(0,a.Of)(i.nE.PCC_ARTICLE_SPLIT)}):e.alert.global.alertSlug===i.pe.PCC_ARTICLE_SPLIT&&(r=A(p({},e.alert),{global:{text:"",type:"info"}})),r};switch(t.type){case n.s0:return A(p({},e),{stepper:A(p({},e.stepper),{currentStep:t.payload})});case n.kI:return A(p({},e),{redirectToBasket:t.payload});case n.K3:return A(p({},e),{allowFromBasketToStepTwo:t.payload});case n.ze:return A(p({},e),{cart:A(p({},e.cart),{isLoading:!0})});case n.Rz:return A(p({},e),{allowFromBasketToStepTwo:!0});case n.rT:if(l=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var v=E(t.payload),y=v.alertTextReturned,S=v.typeReturned;r={text:y,type:S}}return A(p({},_),{stepTwoCriticalError:!1,isLoading:!1,redirectToBasket:l,stepper:{currentStep:1},alert:A(p({},e.alert),{global:r})});case n.Gm:return A(p({},_),{stepper:{currentStep:i.h8.CART},datalayerCartItems:e.datalayerCartItems,alert:T(t.payload.articles),redirectToBasket:e.redirectToBasket,stepTwoCriticalError:!t.payload.articles.length,cart:t.payload});case n.n1:return A(p({},e),{stepTwoCriticalError:t.payload});case n.W:return A(p({},e),{isLoading:!0});case n.es:var m,h,P,N=(0,a.UJ)(t.payload),O=N.paymentMethodSelected===i.XL.GRATIS;(null===(m=e.order)||void 0===m?void 0:m.adyenInfo)&&(N.adyenInfo=e.order.adyenInfo);var L=t.payload.addresses.shippingAddresses.find((function(e){return e.isDefault})),C=null===(h=t.payload.criticalErrors)||void 0===h?void 0:h.find((function(e){return e.code===i.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE})),g=!!L&&(0,a.pS)(L.addressData.province)&&!!C;return t.payload.cart.relatableOffers=e.cart.relatableOffers,A(p({},e,t.payload),{hasShippingErrorInCanarias:g,alert:A(p({},e.alert),{deliveryAlerts:t.payload.deliveryAlerts,paymentAlerts:t.payload.paymentAlerts,addressForm:{text:"",type:"info"}}),order:p(A(p({},e.order),{paymentMethodSelected:O?i.XL.GRATIS:N.paymentMethodSelected}),N),isLoading:!1,deliveries:(0,d.RU)(null===(P=e.user)||void 0===P?void 0:P.email)?e.deliveries:t.payload.deliveries});case n.gJ:if(l=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var D=E(t.payload),R=D.alertTextReturned,b=D.typeReturned;r={text:R,type:b}}return A(p({},e),{stepTwoCriticalError:!1,isLoading:!1,redirectToBasket:l,alert:A(p({},e.alert),{global:r})});case n.qA:return A(p({},e),{cart:A(p({},e.cart),{isLoading:!0})});case n.rE:var M,w,Y,U,k,x,B=t.payload,V=B.cart,G=B.deliveries,H=B.billingAddresses,F=B.setNewDeliveryAgency,K=B.criticalErrors,X=B.coupons,W=B.payPerUseInstallments,j=t.payload.paymentMethodsList,Z=e.order.paymentMethodSelected,$=1===j.length&&j.find((function(e){return e.id===i.XL.GRATIS})),q=j.find((function(e){return e.id===i.XL.ADYEN}))?i.XL.ADYEN:j.find((function(e){return e.id===i.XL.REDSYS}))?i.XL.REDSYS:void 0,z=K?s(K):void 0,J=H.find((function(t){return t.addressData.id===e.order.billingAddressSelected})),Q=J?e.order.billingAddressSelected:H.length>0?null===(M=H.find((function(e){return e.isChecked})))||void 0===M?void 0:M.addressData.id:void 0,ee=null===(w=e.addresses.billingAddresses.find((function(e){return e.addressData.id===Q})))||void 0===w?void 0:w.addressData.country,te=null===(Y=e.addresses.shippingAddresses.find((function(t){return t.addressData.id===e.order.shippingAddressSelected})))||void 0===Y?void 0:Y.addressData.province,re=null===K||void 0===K?void 0:K.find((function(e){return e.code===i.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE})),ne=(0,a.pS)(te)&&!!re,ie=V.articles.find((function(e){return e.id===u.fy})),ae=(!e.order.solidaryAmountChecked||"España"===ee||!ie)&&e.order.solidaryAmountChecked,oe=(0,d.RU)(null===(U=e.user)||void 0===U?void 0:U.email)?[]:G.filter((function(e){return"marketplace"===e.type&&e.agencies.length>0})).map((function(e){return{id:String(e.idShop),orderKey:Number(e.orderKey),offers:e.offers,value:e.defaultAgency}})),ce=null===G||void 0===G?void 0:G.find((function(e){return"pccomponentes"===e.type}));return V.relatableOffers=e.cart.relatableOffers,A(p({},e),{cart:A(p({},V),{isLoading:!1}),hasShippingErrorInCanarias:ne,coupons:X,addresses:A(p({},e.addresses),{billingAddresses:H}),stepTwoCriticalError:!ne&&!!(null===z||void 0===z?void 0:z.blockNextStep),alert:A(p({},e.alert),{global:r,criticalErrors:{text:z&&!ne?z.text:"",type:null===z||void 0===z?void 0:z.type,hasIcon:null===z||void 0===z?void 0:z.hasIcon}}),paymentMethodsList:t.payload.paymentMethodsList,storedCards:t.payload.storedCards,order:A(p({},e.order),{solidaryAmountChecked:ae,marketplaceAgencies:JSON.stringify(oe)===JSON.stringify(e.order.marketplaceAgencies)?e.order.marketplaceAgencies:oe,billingAddressSelected:Q,deliveryAgency:F?null===ce||void 0===ce?void 0:ce.defaultAgency:e.order.deliveryAgency,paymentMethodSelected:(0,d.RU)(null===(k=e.user)||void 0===k?void 0:k.email)?null!==Z&&void 0!==Z?Z:q:$?i.XL.GRATIS:Z||q}),deliveries:(0,d.RU)(null===(x=e.user)||void 0===x?void 0:x.email)?e.deliveries:G,payPerUseInstallments:null!==W&&void 0!==W?W:[]});case n.Vi:if(l=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var de=E(t.payload),ue=de.alertTextReturned,le=de.typeReturned;r={text:ue,type:le}}return A(p({},e),{cart:A(p({},e.cart),{isLoading:!1}),redirectToBasket:l,stepTwoCriticalError:e.stepTwoCriticalError,alert:A(p({},e.alert),{global:r})});case n.Q1:return A(p({},e),{cart:A(p({},e.cart),{showModalRecoverOrderOptions:t.payload})});case n.F7:return p({},e);case n.wi:return A(p({},e,t.payload),{footer:t.payload});case n.Fg:return p({},e);case n.O3:return A(p({},e),{order:A(p({},e.order),{conditionsAccepted:t.payload})});case n.BE:return A(p({},e),{order:A(p({},e.order),{deliveryAgency:t.payload})});case n.Yb:return A(p({},e),{order:A(p({},e.order),{deliveryDate:t.payload})});case n.ZB:return A(p({},e),{order:A(p({},e.order),{deliveryTime:t.payload})});case n.ne:return A(p({},e),{order:A(p({},e.order),{deliveryDateTimeStr:t.payload})});case n.bZ:return A(p({},e),{order:A(p({},e.order),{isSameDay:t.payload})});case n.gM:return A(p({},e),{order:A(p({},e.order),{isNeutralOrder:t.payload})});case n.Pe:return A(p({},e),{order:A(p({},e.order),{productsWithGiftPaper:I(e.order.productsWithGiftPaper).concat([t.payload])})});case n.iX:return A(p({},e),{order:A(p({},e.order),{productsWithGiftPaper:I(e.order.productsWithGiftPaper.filter((function(e){return e!==t.payload})))})});case n.Bs:return A(p({},e),{order:A(p({},e.order),{agencyObservations:t.payload})});case n.b0:return A(p({},e),{order:A(p({},e.order),{marketplaceAgencies:t.payload.marketplaceAgencies,deliveryAgency:t.payload.agencySelected})});case n.dp:var se=e.order.marketplaceAgencies.findIndex((function(e){return e.id===t.payload.id&&e.orderKey===t.payload.orderKey}));if(se>=0&&e.order.marketplaceAgencies[se].value===t.payload.value)return p({},e);var fe=I(e.order.marketplaceAgencies);return-1===se?fe.push(t.payload):fe[se]=t.payload,A(p({},e),{order:A(p({},e.order),{marketplaceAgencies:fe})});case n.RB:var pe=e.addresses.shippingAddresses.findIndex((function(e){return e.addressData.id===t.payload})),Ae=e.addresses.shippingAddresses.map((function(e,t){return A(p({},e),{isChecked:t===pe})}));return A(p({},e),{addresses:A(p({},e.addresses),{shippingAddresses:Ae}),order:A(p({},e.order),{shippingAddressSelected:t.payload})});case n.T6:var Ie=e.addresses.billingAddresses.findIndex((function(e){return e.addressData.id===t.payload})),_e=e.addresses.billingAddresses.map((function(e,t){return A(p({},e),{isChecked:t===Ie})}));return A(p({},e),{addresses:A(p({},e.addresses),{billingAddresses:_e}),order:A(p({},e.order),{billingAddressSelected:t.payload})});case n.Qy:return A(p({},e),{order:A(p({},e.order),{pickingPointSelected:t.payload})});case n.sg:return A(p({},e),{pickingPointSearchValues:p({},e.pickingPointSearchValues,t.payload)});case n.tI:return A(p({},e),{order:A(p({},e.order),{shopSelected:t.payload})});case n.SQ:return A(p({},e),{order:A(p({},e.order),{shippingMethod:t.payload||i.sx.SHIPPING_ADDRESS})});case n.E$:return A(p({},e),{order:A(p({},e.order),{whoPicksUp:A(p({},e.order.whoPicksUp),{data:t.payload?p({},e.order.whoPicksUp.data,t.payload):e.order.whoPicksUp.data?p({},e.order.whoPicksUp.data):void 0})})});case n.rh:return A(p({},e),{order:A(p({},e.order),{whoPicksUp:A(p({},e.order.whoPicksUp),{isValid:t.payload})})});case n.z_:return A(p({},e),{order:A(p({},e.order),{adyenInfo:A(p({},e.order.adyenInfo),{selectedStoredCard:void 0}),paymentMethodSelected:t.payload})});case n.Ed:return A(p({},e),{order:A(p({},e.order),{adyenInfo:A(p({},e.order.adyenInfo),{selectedStoredCard:t.payload}),paymentMethodSelected:i.XL.ADYEN})});case n.oP:return A(p({},e),{isLoading:t.payload});case n.i3:return A(p({},e),{order:A(p({},e.order),{oneyInfo:t.payload})});case n.kc:return A(p({},e),{order:A(p({},e.order),{adyenInfo:{newCardData:t.payload,selectedStoredCard:void 0}})});case n.fj:var Ee,Te,ve,ye=e.storedCards.filter((function(e){return e.recurringDetailReference!==t.payload})),Se=(null===(Ee=e.order.adyenInfo)||void 0===Ee||null===(Te=Ee.selectedStoredCard)||void 0===Te?void 0:Te.recurringDetailReference)===t.payload;return A(p({},e),{storedCards:ye,order:A(p({},e.order),{adyenInfo:A(p({},e.order.adyenInfo),{selectedStoredCard:Se?ye&&ye.length>0?{clientId:ye[0].clientId,recurringDetailReference:ye[0].recurringDetailReference}:void 0:null===(ve=e.order.adyenInfo)||void 0===ve?void 0:ve.selectedStoredCard})})});case n.$v:return A(p({},e),{order:A(p({},e.order),{adyenInfo:A(p({},e.order.adyenInfo),{newCardData:void 0})})});case n.hL:return A(p({},e),{order:A(p({},e.order),{selectedCoupon:t.payload})});case n.Nm:return A(p({},e),{datalayerCartItems:t.payload});case n.JB:return A(p({},e),{alert:A(p({},e.alert),{global:t.payload})});case n.XC:return A(p({},e),{alert:A(p({},e.alert),{criticalErrors:t.payload})});case n.qX:return A(p({},e),{order:A(p({},e.order),{giftCardCode:t.payload})});case n.f4:return A(p({},e),{incompleteAddressType:t.payload});case n.f9:return A(p({},e),{invalidAddress:t.payload});case n.vR:return A(p({},e),{order:A(p({},e.order),{solidaryAmountChecked:t.payload})});case n.yU:return A(p({},e),{order:A(p({},e.order),{financingTerms:t.payload})});case n.Gt:return A(p({},e),{order:A(p({},e.order),{billingAddressSelected:t.payload.billingAddressId}),stepper:{currentStep:t.payload.step}});case n.DM:return A(p({},e),{deliveries:t.payload});default:return e}}},80899:(e,t,r)=>{r.d(t,{A3:()=>j,A4:()=>O,Ah:()=>Re,Bk:()=>I,Bo:()=>C,Co:()=>H,De:()=>le,EV:()=>R,FM:()=>q,HU:()=>k,I8:()=>Ne,It:()=>B,J:()=>L,L1:()=>G,LO:()=>$,LS:()=>b,MV:()=>pe,MZ:()=>U,Oo:()=>X,PY:()=>te,Pf:()=>M,Q0:()=>m,QE:()=>D,Qk:()=>z,Qv:()=>Y,R_:()=>ve,S2:()=>f,Sy:()=>me,Tn:()=>g,U8:()=>ee,UD:()=>K,VA:()=>Oe,VZ:()=>_e,Wv:()=>oe,X6:()=>E,XZ:()=>se,Xp:()=>Z,_p:()=>W,_v:()=>Ue,aD:()=>be,bj:()=>re,cJ:()=>ge,dB:()=>h,dM:()=>x,eV:()=>v,eY:()=>xe,fW:()=>T,gH:()=>w,i6:()=>p,iB:()=>Te,k:()=>F,kE:()=>J,ku:()=>ye,lV:()=>_,nT:()=>V,oy:()=>ue,qD:()=>N,rT:()=>Ee,rc:()=>Ye,rw:()=>Ae,sC:()=>Ie,sN:()=>ce,sS:()=>ne,tI:()=>ke,wG:()=>P,xl:()=>Q,yT:()=>fe,zz:()=>Le});var n=r(22222),i=r(38483),a=r(26911),o=r(23031),c=r(54461),d=r(33945),u=r(3678),l=function(e){return e.checkout},s=(0,n.P1)(l,(function(e){return e.order})),f=(0,n.P1)(l,(function(e){return e.cart.showModalRecoverOrderOptions})),p=(0,n.P1)(l,(function(e){return e.isLoading})),A=(0,n.P1)((function(e){return e.user}),(function(e){return e.addressForm.isAddressFormValid})),I=(0,n.P1)(l,(function(e){return e.cart.articles})),_=(0,n.P1)(l,(function(e){return e.cart.relatableOffers})),E=(0,n.P1)(l,(function(e){return e.cart.awardedFinancing})),T=(0,n.P1)(l,(function(e){return e.deliveries})),v=(0,n.P1)(l,(function(e){return e.cart.articles})),y=(0,n.P1)(T,(function(e){return e.filter((function(e){return e.type===i.l.Dropshipping})).length})),S=(0,n.P1)(l,(function(e){return e.cart.dropShippingShippingCost})),m=(0,n.P1)(l,(function(e){return e.cart.articles.find((function(e){return"mañana"!==e.deliveryStr}))})),h=(0,n.P1)(l,(function(e){return!e.cart.articles.find((function(e){return e.type!==a.V7.DIGITAL}))})),P=(0,n.P1)(l,(function(e){return e.cart.refundShipping})),N=(0,n.P1)(l,(function(e){return e.redirectToBasket})),O=(0,n.P1)(l,(function(e){return e.allowFromBasketToStepTwo})),L=(0,n.P1)(l,(function(e){return e.cart.lastEditDate})),C=(0,n.P1)(S,y,(function(e,t){return(0,d.bO)(+(null!==e&&void 0!==e?e:"0")/+t)})),g=(0,n.P1)(l,(function(e){return e.addresses})),D=(0,n.P1)(l,(function(e){return e.countries})),R=(0,n.P1)(l,(function(e){return e.stepper.currentStep})),b=(0,n.P1)(l,(function(e){return e.coupons})),M=(0,n.P1)(l,(function(e){return e.order.selectedCoupon})),w=(0,n.P1)(l,(function(e){return e.order.solidaryAmountChecked})),Y=(0,n.P1)(l,(function(e){return e.order.financingTerms})),U=(0,n.P1)(l,(function(e){return e.cart.talonOneNotifications})),k=(0,n.P1)(l,(function(e){return{balance:e.cart.balance,balanceToSpend:e.cart.balanceToSpend,birthdayDiscount:e.cart.birthdayDiscount,price:e.cart.price,shippingCost:e.cart.shippingCost,marketPlaceShippingCost:e.cart.marketplaceShippingCost,dropShippingShippingCost:e.cart.dropShippingShippingCost,neutralPaperCost:e.cart.neutralPaperCost,giftPaperCost:e.cart.neutralPaperCost,talonPromotions:e.cart.talonPromotions,totalPaid:e.cart.totalPaid,totalDiscountInCart:e.cart.totalDiscountInCart,totalGiftCardDiscountInCart:e.cart.totalGiftCardDiscountInCart,total:e.cart.total,installation:e.cart.installation}})),x=(0,n.P1)(l,(function(e){return e.cart.canShowShippingPoints})),B=(0,n.P1)(l,(function(e){return e.footer.legalLinks})),V=(0,n.P1)(l,(function(e){return e.datalayerCartItems})),G=(0,n.P1)(l,(function(e){return e.order.shippingAddressSelected})),H=(0,n.P1)(g,G,(function(e,t){var r,n;return null===(n=null===(r=e.shippingAddresses)||void 0===r?void 0:r.find((function(e){return e.addressData.id===t})))||void 0===n?void 0:n.addressData})),F=(0,n.P1)(l,(function(e){return e.order.billingAddressSelected})),K=(0,n.P1)(g,F,(function(e,t){var r,n;return null===(n=null===(r=e.billingAddresses)||void 0===r?void 0:r.find((function(e){return e.addressData.id===t})))||void 0===n?void 0:n.addressData})),X=(0,n.P1)(l,(function(e){return e.order.pickingPointSelected})),W=(0,n.P1)(l,(function(e){return e.pickingPointSearchValues})),j=(0,n.P1)(l,(function(e){return e.availableShops})),Z=(0,n.P1)(l,(function(e){return e.order.whoPicksUp.data})),$=(0,n.P1)(l,(function(e){return e.order.shopSelected})),q=(0,n.P1)(l,(function(e){return e.order.shippingMethod})),z=(0,n.P1)(l,(function(e){return e.order.paymentMethodSelected})),J=((0,n.P1)(l,(function(e){var t;return"Portugal"===(null===(t=e.addresses.billingAddresses.find((function(t){return t.addressData.id===e.order.billingAddressSelected})))||void 0===t?void 0:t.addressData.country)})),(0,n.P1)(l,(function(e){return e.alert.global}))),Q=(0,n.P1)(l,(function(e){return e.alert.criticalErrors})),ee=(0,n.P1)(l,(function(e){return e.alert.deliveryAlerts})),te=(0,n.P1)(l,(function(e){return e.alert.paymentAlerts})),re=(0,n.P1)(l,(function(e){return e.paymentMethodsList})),ne=(0,n.P1)(l,(function(e){return e.storedCards})),ie=(0,n.P1)(l,(function(e){return e.stepTwoCriticalError})),ae=(0,n.P1)(g,F,G,ie,(function(e,t,r,n){return!!r&&(!!t||0===e.billingAddresses.length)&&!n})),oe=(0,n.P1)(g,F,D,(function(e,t,r){return(0,d.Qu)(e,t,r)})),ce=(0,n.P1)(g,G,D,(function(e,t,r){return(0,d.e$)(e,t,r)})),de=(0,n.P1)(ae,oe,ce,(function(e,t,r){return e&&t&&r})),ue=(0,n.P1)(l,(function(e){return e.incompleteAddressType})),le=(0,n.P1)(l,(function(e){return e.invalidAddress})),se=(0,n.P1)(l,(function(e){return e.order.deliveryAgency})),fe=(0,n.P1)(l,(function(e){return e.order.deliveryDate})),pe=(0,n.P1)(l,(function(e){return e.order.deliveryTime})),Ae=(0,n.P1)(l,(function(e){return e.order.deliveryDateTimeStr})),Ie=(0,n.P1)(l,(function(e){return e.order.isSameDay})),_e=(0,n.P1)(l,(function(e){return e.order.agencyObservations})),Ee=(0,n.P1)(l,(function(e){return e.order.isNeutralOrder})),Te=(0,n.P1)(l,(function(e){return e.order.productsWithGiftPaper})),ve=(0,n.P1)(l,(function(e){return e.order.marketplaceAgencies})),ye=(0,n.P1)(l,(function(e){return!!e.cart.articles.find((function(e){return e.vendor}))})),Se=(0,n.P1)(l,(function(e){return!!e.cart.articles.find((function(e){return a.EM.includes(e.id)}))})),me=(0,n.P1)(ye,Se,(function(e,t){return e&&t})),he=(0,n.P1)(s,(function(e){return!!e.pickingPointSelected&&e.whoPicksUp.isValid})),Pe=(0,n.P1)(s,(function(e){return!!e.shopSelected&&e.whoPicksUp.isValid})),Ne=(0,n.P1)(s,(function(e){return e.adyenInfo})),Oe=(0,n.P1)(Ne,ne,(function(e,t){return e&&t.find((function(t){var r;return t.recurringDetailReference===(null===(r=e.selectedStoredCard)||void 0===r?void 0:r.recurringDetailReference)}))})),Le=(0,n.P1)(s,(function(e){return e.oneyInfo})),Ce=(0,n.P1)(s,Ne,(function(e,t){return e.paymentMethodSelected===a.XL.REDSYS||(t?t.newCardData||t.selectedStoredCard:void 0)})),ge=(0,n.P1)(l,(function(e){return e.cart.isLoading})),De=(0,n.P1)(s,(function(e){return e.conditionsAccepted})),Re=(0,n.P1)(l,(function(e){return e.hasShippingErrorInCanarias})),be=(0,n.P1)(R,q,z,ae,he,Pe,Ce,ge,De,ie,A,(function(e,t,r,n,i,o,c,d,u,l,s){if(d)return!1;switch(e){case a.h8.CART:return!l;case a.h8.ADDRESSES:switch(t){case a.sx.SHIPPING_ADDRESS:return n||s;case a.sx.PICKUP_POINT:return i&&!l;case a.sx.SHOP:return o&&!l;default:return!1}case a.h8.PAYMENT:return!!c||r!==a.XL.ADYEN&&!!r;case a.h8.SUMMARY:return u&&!l;default:return!0}})),Me=(0,n.P1)(z,Ce,(function(e,t){return e===a.XL.ADYEN?!!t:!!e})),we=(0,n.P1)(de,he,Pe,(function(e,t,r){return e||t||r})),Ye=(0,n.P1)(we,Me,(function(e,t){var r=a.h8.ADDRESSES;return e&&(r=a.h8.PAYMENT,t&&(r=a.h8.SUMMARY)),r})),Ue=(0,n.P1)(z,re,Y,Ne,Oe,(function(e,t,r,n,i){switch(e){case a.XL.REDSYS:return{info:(0,o.t)("checkout.payments.cardTitle")};case a.XL.ADYEN:case u.XL.ADYEN_CARD:if(i)return{imgUrl:a.Y6[i.brand].url,altText:a.Y6[i.brand].alt,name:null===i||void 0===i?void 0:i.name,info:(0,o.t)("checkout.summary.cardEndingIn"),endDigits:null===i||void 0===i?void 0:i.lastFourDigits};var c,d,l=(null===n||void 0===n?void 0:n.newCardData)?n.newCardData.cardData.cardBrand:"";return{imgUrl:l?a.Y6[l].url:"",altText:l?a.Y6[l].alt:"",name:null===n||void 0===n||null===(c=n.newCardData)||void 0===c?void 0:c.cardData.cardName,info:(0,o.t)("checkout.summary.cardEndingIn"),endDigits:null===n||void 0===n||null===(d=n.newCardData)||void 0===d?void 0:d.cardData.endDigits};case a.XL.APLAZAME:case u.XL.APLAZAME:return{imgUrl:a.Dy[a.XL.APLAZAME].url,altText:a.Dy[a.XL.APLAZAME].alt,info:"Con Aplázame a 6, 12, 20, 30 y 40 meses."};case a.XL.CETELEM:var s;return{imgUrl:a.Dy[a.XL.CETELEM].url,altText:a.Dy[a.XL.CETELEM].alt,info:null===(s=null===t||void 0===t?void 0:t.find((function(e){return e.id===a.XL.CETELEM})))||void 0===s?void 0:s.name};case a.XL.ONEY:var f,p;return{imgUrl:a.Dy[a.XL.ONEY].url,altText:a.Dy[a.XL.ONEY].alt,info:"".concat(null!==(p=null===(f=t.find((function(e){return e.id===a.XL.ONEY})))||void 0===f?void 0:f.name)&&void 0!==p?p:""," en ").concat(r?parseInt(r):""," plazos")};case a.XL.BANK_TRANSFER:var A;return{info:null===(A=t.find((function(e){return e.id===a.XL.BANK_TRANSFER})))||void 0===A?void 0:A.name};case a.XL.PAY_IN_SHOP:var I;return{info:null===(I=t.find((function(e){return e.id===a.XL.PAY_IN_SHOP})))||void 0===I?void 0:I.name};case a.XL.GOOGLE_PAY:var _;return{imgUrl:a.Dy[a.XL.GOOGLE_PAY].url,altText:a.Dy[a.XL.GOOGLE_PAY].alt,info:null===(_=t.find((function(e){return e.id===a.XL.GOOGLE_PAY})))||void 0===_?void 0:_.name};case a.XL.BIZUM:var E;return{imgUrl:a.Dy[a.XL.BIZUM].url,altText:a.Dy[a.XL.BIZUM].alt,info:null===(E=t.find((function(e){return e.id===a.XL.BIZUM})))||void 0===E?void 0:E.name};case a.XL.MULTIBANCO:var T;return{imgUrl:a.Dy[a.XL.MULTIBANCO].url,altText:a.Dy[a.XL.MULTIBANCO].alt,info:null===(T=t.find((function(e){return e.id===a.XL.MULTIBANCO})))||void 0===T?void 0:T.name};case a.XL.GRATIS:var v;return{info:null===(v=t.find((function(e){return e.id===a.XL.GRATIS})))||void 0===v?void 0:v.name};case a.XL.INESPAY:var y;return{info:null===(y=t.find((function(e){return e.id===a.XL.INESPAY})))||void 0===y?void 0:y.name};default:return{info:""}}})),ke=(0,n.P1)(l,(function(e){return e.order.giftCardCode})),xe=((0,n.P1)(l,(function(e){var t=e.cart,r=e.order;return!t.isLoading&&!!r.giftCardCode&&t.total>0})),(0,n.P1)(c.$W,(function(e){return e===c.t4.PCCOMPONENTES})),(0,n.P1)(z,(function(e){return e===a.XL.CETELEM||e===a.XL.APLAZAME||e===a.XL.ONEY||e===a.XL.PAY_PER_USAGE})))},74782:(e,t,r)=>{r.d(t,{AH:()=>G,EI:()=>Y,FU:()=>w,IU:()=>b,IX:()=>v,J:()=>f,J9:()=>U,MM:()=>H,NJ:()=>C,OL:()=>O,P6:()=>L,UH:()=>z,Vl:()=>T,WS:()=>h,Xq:()=>A,YA:()=>J,Yu:()=>_,ZY:()=>y,_Z:()=>I,dp:()=>R,dv:()=>q,ej:()=>x,fu:()=>j,jf:()=>E,kh:()=>k,lX:()=>Z,lr:()=>M,mI:()=>$,m_:()=>V,od:()=>m,pY:()=>B,pc:()=>S,qI:()=>P,rU:()=>D,s3:()=>F,sl:()=>g,uz:()=>N,vD:()=>s,vs:()=>K,x9:()=>p,xF:()=>W,zH:()=>X});var n=r(82277),i=r(28489);function a(e,t,r,n,i,a,o){try{var c=e[a](o),d=c.value}catch(e){return void r(e)}c.done?t(d):Promise.resolve(d).then(n,i)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function c(e){a(o,n,i,c,d,"next",e)}function d(e){a(o,n,i,c,d,"throw",e)}c(void 0)}))}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){for(var t=1;t0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]5&&void 0!==arguments[5]?arguments[5]:null;return n.V0.fetch("/api-v1/user/address/validate",n.w$.POST,{address:e,cp:t,city:r,province:i,country:a,id:o})},m=function(e){return n.V0.fetch("/api-v1/user-panel/user/get?idUser=".concat(e),n.w$.GET)},h=function(e){return n.V0.fetch("/api-v1/user/address/shipping/".concat(e),n.w$.DELETE)},P=function(e){return n.V0.fetch("/api-v1/user/address/billing/".concat(e),n.w$.DELETE)},N=function(e,t){return n.V0.fetch("/api-v1/user/address/create-shipping",n.w$.POST,d({email:e,validated:!0},t))},O=function(e,t){return n.V0.fetch("/api-v1/user/address/create-billing",n.w$.POST,d({email:e},t))},L=function(e,t){return n.V0.fetch("/api-v1/user/address/shipping",n.w$.PUT,d({addressId:e,validated:!0},t))},C=function(e,t){return n.V0.fetch("/api-v1/user/address/billing",n.w$.PUT,d({addressId:e},t))},g=function(){var e=o((function(e){return l(this,(function(t){return[2,n.V0.fetch("/api-v1/checkout/countries/".concat(e,"/provinces"),n.w$.GET)]}))}));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=o((function(e,t,r){return l(this,(function(i){return e&&t&&r?[2,n.V0.fetch("/api-v1/checkout/cart/shipping-points",n.w$.GET,{country:e,cp:t,idArticle:r})]:[2,n.V0.fetch("/api-v1/checkout/cart/shipping-points",n.w$.GET)]}))}));return function(t,r,n){return e.apply(this,arguments)}}(),R=function(e){return n.V0.fetch("/api-v1/user-panel/orders/payment/error/".concat(e),n.w$.GET)},b=function(){var e=o((function(e){var t;return l(this,(function(r){switch(r.label){case 0:return[4,n.V0.fetch("/api-v1/user-panel/user/orders/".concat(e,"/minimal"),n.w$.GET)];case 1:if((t=r.sent()).ok)return[2,t.data];throw(0,i.xK)(t)}}))}));return function(t){return e.apply(this,arguments)}}(),M=function(e){return n.V0.fetch("/api-v1/paynow/".concat(e),n.w$.GET)},w=function(e,t){try{return n.V0.fetch("/api-v1/checkout/order/finish/".concat(t),n.w$.POST,e).then((function(e){if(e.ok&&e.data)return e.data;throw(0,i.xK)(e)}))}catch(e){throw(0,i.xK)(e)}},Y=function(e,t){try{return n.V0.fetch("/api-v1/paynow/payunpaid/".concat(t),n.w$.POST,e).then((function(e){if(e.ok&&e.data)return e.data;throw(0,i.xK)(e)}))}catch(e){throw(0,i.xK)(e)}},U=function(e,t){return n.V0.fetch("/api-v1/user-panel/adm/web/alerts/".concat(e,"?domain=").concat(t),n.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)})).catch((function(){(0,n.ZT)()}))},k=function(){var e=o((function(e){return l(this,(function(t){try{return[2,n.V0.fetch("/api-v1/user-panel/orders/payment/adyen/data?orderId=".concat(e),n.w$.POST,{}).then((function(e){var t;if(e.ok)return null===(t=e.data)||void 0===t?void 0:t.data;throw new i.pY({error:0,message:JSON.stringify(e.err)})}))]}catch(e){throw(0,i.xK)(e)}return[2]}))}));return function(t){return e.apply(this,arguments)}}(),x=function(e){try{return n.V0.fetch("/api-v1/user-panel/orders/payment/link/create/".concat(e),n.w$.POST,{}).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)}))}catch(e){throw(0,i.xK)(e)}},B=function(e){return n.V0.fetch("/api-v1/order-articles/".concat(e),n.w$.GET,{}).then((function(e){if(e.ok)return e;throw(0,i.xK)(e)}))},V=function(e){return n.V0.fetch("/api-v1/adyen/adyenAuthorization",n.w$.POST,e)},G=function(){return n.V0.fetch("/api-v1/user-panel/basket/",n.w$.GET).then((function(e){if(e.ok)return e.data;throw(0,i.xK)(e)}))},H=function(e,t,r){return n.V0.fetch("/api-v1/basket/?name=".concat(e,"&type=").concat(t,"&visibility=").concat(r),n.w$.POST).then((function(e){if(e.ok)return e.data;throw(0,i.xK)(e)}))},F=function(e,t,r){return n.V0.fetch("/api-v1/basket/add-to-wishlist?basketKey=".concat(e,"&cartId=").concat(t,"&sendEmail=").concat(r.toString()),n.w$.POST).then((function(e){if(e.ok)return e.data;throw(0,i.xK)(e)}))},K=function(e){return n.V0.fetch("/api-v1/basket/empty-basket?cartId=".concat(e),n.w$.DELETE).then((function(e){if(e.ok)return e.data;throw(0,i.xK)(e)}))},X=function(){return n.V0.fetch("/api-v1/oney/business-info-data",n.w$.GET,{}).then((function(e){if(e.ok)return e;throw(0,i.xK)(e)}))},W=function(e,t){return n.V0.fetch("/api-v1/oney/variants-info-data/".concat(e),n.w$.POST,{variantCodes:t}).then((function(e){if(e.ok)return e;throw(0,i.xK)(e)}))},j=function(e,t){return n.V0.fetch("/api-v1/checkout/order/transaction/aplazame/init/".concat(e),n.w$.POST,t).then((function(e){if(e.ok&&e.data)return e.data;throw(0,i.xK)(e)}))},Z=function(){return n.V0.fetch("/api-v1/checkout/cart/session/reset",n.w$.GET)},$=function(){var e=o((function(e){var t;return l(this,(function(r){switch(r.label){case 0:return[4,n.V0.fetch("/api-v1/show/marketing/orders",n.w$.POST,e)];case 1:if((t=r.sent()).ok)return[2,t.data];throw(0,i.xK)(t)}}))}));return function(t){return e.apply(this,arguments)}}(),q=function(e,t){return n.V0.fetch("/api-v1/user/payments/card/".concat(t,"/").concat(e),n.w$.DELETE)},z=function(){var e=o((function(e){return l(this,(function(t){try{return[2,n.V0.fetch("/api-v1/giftcards/validate/".concat(e),n.w$.GET)]}catch(e){throw new i.pY({error:0,message:JSON.stringify(e)})}return[2]}))}));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=o((function(e){var t;return l(this,(function(r){switch(r.label){case 0:return[4,fetch("/api/cms/".concat(e,"/current"))];case 1:return(t=r.sent()).ok?[4,t.json()]:[3,3];case 2:return[2,r.sent()];case 3:throw(0,i.xK)(t)}}))}));return function(t){return e.apply(this,arguments)}}()},26911:(e,t,r)=>{r.d(t,{Br:()=>N,D4:()=>$,Ds:()=>u,Dy:()=>ee,EM:()=>k,H7:()=>A,Ib:()=>ne,Jj:()=>X,LI:()=>P,Nl:()=>O,O0:()=>a,Ow:()=>C,PO:()=>F,SG:()=>W,Sh:()=>g,UG:()=>l,V7:()=>w,WF:()=>R,XL:()=>s,Xc:()=>Y,Y6:()=>Q,Zl:()=>U,ck:()=>i,dt:()=>f,gM:()=>E,h8:()=>c,hb:()=>p,k0:()=>K,mw:()=>re,nE:()=>M,pL:()=>_,pe:()=>n,qU:()=>L,sK:()=>D,sx:()=>d,vo:()=>j,wr:()=>o,zc:()=>I});var n,i,a,o,c,d,u,l,s,f,p,A,I,_,E,T,v,y,S=r(91085),m=r(54461);function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.MISSING_ADDRESS_FIELDS="missing-address-fields",e.ORDER_HAS_SPECIAL_ASSEMBLY_WITH_MARKETPLACE="order-has-special-assembly-with-marketplace",e.OUT_OF_STOCK="out-of-stock",e.EMPTY_CART="empty-cart",e.USER_NOT_FOUND="user-not-found",e.PCC_ARTICLE_SPLIT="pcc_article_split"}(n||(n={})),function(e){e.INDIVIDUAL="individual",e.FREELANCE="freelance",e.COMPANY="company"}(i||(i={})),function(e){e.PCC="pcc",e.MARKETPLACE="marketplace"}(a||(a={})),function(e){e[e.WITHOUT_MOVEMENT=0]="WITHOUT_MOVEMENT",e[e.IN_STOCK=1]="IN_STOCK",e[e.INMINENT_REPLENISHMENT=2]="INMINENT_REPLENISHMENT",e[e.HIGH_AVAILABILITY=3]="HIGH_AVAILABILITY",e[e.OUT_OF_STOCK=4]="OUT_OF_STOCK",e[e.PRESALE=5]="PRESALE",e[e.CONSULT=6]="CONSULT",e[e.DISCONTINUED=7]="DISCONTINUED",e[e.ZONE_NOT_AVAILABLE=9876]="ZONE_NOT_AVAILABLE",e[e.FORCE_DISCONTINUED=9999]="FORCE_DISCONTINUED"}(o||(o={})),function(e){e[e.CART=1]="CART",e[e.ADDRESSES=2]="ADDRESSES",e[e.DELIVERY=3]="DELIVERY",e[e.PAYMENT=4]="PAYMENT",e[e.SUMMARY=5]="SUMMARY"}(c||(c={})),function(e){e[e.SHIPPING_ADDRESS=1]="SHIPPING_ADDRESS",e[e.PICKUP_POINT=2]="PICKUP_POINT",e[e.SHOP=3]="SHOP"}(d||(d={})),function(e){e.PICKUP_POINT="?shipping=picking",e.SHOP="?shipping=shop"}(u||(u={})),function(e){e.TWO_HOURS="A2h"}(l||(l={})),function(e){e[e.ADYEN=23]="ADYEN",e[e.REDSYS=3]="REDSYS",e[e.APLAZAME=25]="APLAZAME",e[e.CETELEM=20]="CETELEM",e[e.PAY_PER_USAGE=40]="PAY_PER_USAGE",e[e.PAY_IN_SHOP=1]="PAY_IN_SHOP",e[e.BANK_TRANSFER=5]="BANK_TRANSFER",e[e.CASH_ON_DELIVERY=1]="CASH_ON_DELIVERY",e[e.GOOGLE_PAY=24]="GOOGLE_PAY",e[e.BIZUM=36]="BIZUM",e[e.INESPAY=37]="INESPAY",e[e.GRATIS=69]="GRATIS",e[e.MULTIBANCO=26]="MULTIBANCO",e[e.ONEY=27]="ONEY",e[e.RENTALL=41]="RENTALL"}(s||(s={})),function(e){e.BIZUM="bizum",e.CETELEM="financiacion12",e.APLAZAME="aplazame",e.BANK_TRANSFER="transferencia",e.INESPAY="inespay",e.MULTIBANCO="multibanco",e.ADYEN="adyen",e.PAY_PER_USAGE="payPerUsage",e.PAY_IN_SHOP="payinshop",e.REDSYS="tarjeta",e.ONEY="oney",e.GRATIS="free",e.RENTALL="rentall"}(f||(f={})),function(e){e.CETELEM="Cetelem",e.APLAZAME="Aplazame",e.PAY_IN_SHOP="Pagar en tienda",e.BANK_TRANSFER="Transferencia ordinaria",e.CASH_ON_DELIVERY="Contrarrembolso",e.GOOGLE_PAY="Google pay",e.BIZUM="Bizum",e.MULTIBANCO="Multibanco",e.INESPAY="Transferencia inmediata",e.GRATIS="Gratis",e.PAY_PER_USAGE="Renting",e.CREDIT_CARD="Tarjeta de crédito o débito",e.ONEY="Financiación con Oney",e.UNKNOWN="Desconocido"}(p||(p={})),function(e){e.MASTER_CARD="mc",e.VISA="visa",e.GENERIC="card"}(A||(A={})),function(e){e[e.TALON=235577]="TALON"}(I||(I={})),function(e){e[e.CANON_ARTICLE_ES=133414]="CANON_ARTICLE_ES",e[e.CANON_ARTICLE_SP_ES=133415]="CANON_ARTICLE_SP_ES",e[e.CANON_ARTICLE_PT=105078]="CANON_ARTICLE_PT",e[e.CANON_ARTICLE_FR=165530]="CANON_ARTICLE_FR",e[e.CANON_ARTICLE_IT=165533]="CANON_ARTICLE_IT",e[e.TALON=235577]="TALON",e[e.SHIPPING_REFUND=20006]="SHIPPING_REFUND",e[e.BIRTHDAY_GIFT=20008]="BIRTHDAY_GIFT",e[e.PREMIUM=157154]="PREMIUM"}(_||(_={})),function(e){e.MADRID="30",e.MURCIA="1",e.BARCELONA="71",e.SALA="sala"}(E||(E={})),function(e){e[e.PAYMENT_TYPE_IS_DISABLED=32e3]="PAYMENT_TYPE_IS_DISABLED",e[e.PAYMENT_TYPE_EXCEED_PENDING_AMOUNT_WITH_SAME_PAYMENT=32007]="PAYMENT_TYPE_EXCEED_PENDING_AMOUNT_WITH_SAME_PAYMENT",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_BLACK_FRIDAY=32008]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_BLACK_FRIDAY",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_MARKETPLACE_ARTICLES=32001]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_MARKETPLACE_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DIGITAL_ARTICLES=32002]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DIGITAL_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DROP_SHIPPING=32003]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DROP_SHIPPING",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_AT_MODIFYING=32004]="PAYMENT_TYPE_IS_UNAVAILABLE_AT_MODIFYING",e[e.PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_SPAIN=32005]="PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_SPAIN",e[e.PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_PORTUGAL=32006]="PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_PORTUGAL",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PREMIUM_ARTICLE=32009]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PREMIUM_ARTICLE",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_AGENCY=32010]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_AGENCY",e[e.PAYMENT_TYPE_REACHED_PRICE_LIMIT=32011]="PAYMENT_TYPE_REACHED_PRICE_LIMIT",e[e.PAYMENT_TYPE_HAS_NOT_REACHED_MINIMUM_PRICE=32012]="PAYMENT_TYPE_HAS_NOT_REACHED_MINIMUM_PRICE",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_BUSINESS_OR_DISTRIBUTOR=32013]="PAYMENT_TYPE_UNAVAILABLE_FOR_BUSINESS_OR_DISTRIBUTOR",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_SHIPPING_POINT=32014]="PAYMENT_TYPE_UNAVAILABLE_FOR_SHIPPING_POINT",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_AUTHORIZED_POINT=32015]="PAYMENT_TYPE_UNAVAILABLE_FOR_AUTHORIZED_POINT",e[e.PAYMENT_TYPE_UNAVAILABLE_WITH_DEAL_ARTICLES=32016]="PAYMENT_TYPE_UNAVAILABLE_WITH_DEAL_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_FOR_DEFAULTER_USERS=32017]="PAYMENT_TYPE_IS_UNAVAILABLE_FOR_DEFAULTER_USERS",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOM_PCCOM_V2=32018]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOM_PCCOM_V2",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_ELECTRONIC_ARTICLES=32019]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_ELECTRONIC_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_REFURBISHED_ARTICLES=32020]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_REFURBISHED_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_BANNED_ARTICLES=32021]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_BANNED_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITHOUT_SHIPPING_ADDRESS=32022]="PAYMENT_TYPE_IS_UNAVAILABLE_WITHOUT_SHIPPING_ADDRESS",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_FOR_STORE_PICKUP=32023]="PAYMENT_TYPE_IS_UNAVAILABLE_FOR_STORE_PICKUP",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_PENDING_ORDER_WITH_SAME_PAYMENT_TYPE=32024]="PAYMENT_TYPE_IS_UNAVAILABLE_PENDING_ORDER_WITH_SAME_PAYMENT_TYPE",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PRESALE_ARTICLES=32025]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PRESALE_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOMIZED_CASES_ARTICLES=32026]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOMIZED_CASES_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_USER_BANNED_FOR_THIS_PAYMENT=32027]="PAYMENT_TYPE_IS_UNAVAILABLE_USER_BANNED_FOR_THIS_PAYMENT",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_GIFT_CARDS=32028]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_GIFT_CARDS",e[e.PAY_PER_USE_PAYMENT_IS_NOT_AVAILABLE_FOR_THIS_CART=32030]="PAY_PER_USE_PAYMENT_IS_NOT_AVAILABLE_FOR_THIS_CART",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY=32031]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY_GENERIC=32032]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY_GENERIC"}(T||(T={})),function(e){e.BLACK_FRIDAY_START="2021-11-14 22:00:00",e.BLACK_FRIDAY_END="2021-11-28 23:59:59"}(v||(v={})),function(e){e.CYBER_MONDAY_START="2021-11-29 00:00:00",e.CYBER_MONDAY_END="2021-11-29 23:59:59"}(y||(y={}));var P,N,O,L,C,g,D,R,b;!function(e){e[e.PAYMENT_TYPE_NOT_AVAILABLE=1109]="PAYMENT_TYPE_NOT_AVAILABLE",e[e.URGENT_LIMIT_STOCK_REACHED=1139]="URGENT_LIMIT_STOCK_REACHED",e[e.AGENCY_NOT_AVAILABLE=1117]="AGENCY_NOT_AVAILABLE",e[e.OUT_OF_STOCK=1119]="OUT_OF_STOCK",e[e.EMPTY_CART=1102]="EMPTY_CART",e[e.ORDER_NOT_MARK_AS_IN_EDITION=1429]="ORDER_NOT_MARK_AS_IN_EDITION",e[e.OEM_WITHOUT_ASSEMBLY=1145]="OEM_WITHOUT_ASSEMBLY",e[e.USER_NOT_FOUND=1301]="USER_NOT_FOUND",e[e.ARTICLE_CANT_BE_ALONE_IN_ORDER=1146]="ARTICLE_CANT_BE_ALONE_IN_ORDER",e[e.MARKETPLACE_OFFER_MATCH=1147]="MARKETPLACE_OFFER_MATCH",e[e.WEIGHT_INTERNATIONAL_SHIPPING=1148]="WEIGHT_INTERNATIONAL_SHIPPING",e[e.CP_BLOCKED=1149]="CP_BLOCKED",e[e.MARKET_PLACEORDER_WITHOUT_ADYEN=1150]="MARKET_PLACEORDER_WITHOUT_ADYEN",e[e.CANARY_LIMITATION=1156]="CANARY_LIMITATION",e[e.DROPSHIPPING_ADDRESS_LIMITATION=1155]="DROPSHIPPING_ADDRESS_LIMITATION",e[e.PREMIUM_TARIFF_ADDRESS_LIMITATION=1154]="PREMIUM_TARIFF_ADDRESS_LIMITATION",e[e.SHIPPING_COUNTRY_LIMITATION=1153]="SHIPPING_COUNTRY_LIMITATION",e[e.DIGITAL_CODES_AMOUNT_LIMITATION=1152]="DIGITAL_CODES_AMOUNT_LIMITATION",e[e.DIGITAL_CODES_ZONES_LIMITATION=1151]="DIGITAL_CODES_ZONES_LIMITATION",e[e.CART_WITHOUT_ADDRESS=1157]="CART_WITHOUT_ADDRESS",e[e.CHANGE_BILLING_MODIFIER=1158]="CHANGE_BILLING_MODIFIER",e[e.CART_WITHOUT_AGENCIES=1159]="CART_WITHOUT_AGENCIES",e[e.CART_WITHOUT_PAYMENTMETHODS=1160]="CART_WITHOUT_PAYMENTMETHODS",e[e.NO_ZONES_AVAILABLE_IN_MKTPLACE=1161]="NO_ZONES_AVAILABLE_IN_MKTPLACE",e[e.CART_FORCE_BILLING=1162]="CART_FORCE_BILLING",e[e.MAX_COD_DELIVERY_MODIFIER=1163]="MAX_COD_DELIVERY_MODIFIER",e[e.ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD=1168]="ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD",e[e.PAY_NOW_ORDER_NOT_FOUND=1402]="PAY_NOW_ORDER_NOT_FOUND",e[e.PAY_NOW_ORDER_IS_PAID=1421]="PAY_NOW_ORDER_IS_PAID",e[e.PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER=1169]="PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER",e[e.PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE=1170]="PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE",e[e.PORTUGAL_ARTICLES_VALIDATION=1171]="PORTUGAL_ARTICLES_VALIDATION",e[e.SHOP_ID_NEEDED_IN_CART=1172]="SHOP_ID_NEEDED_IN_CART",e[e.SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION=1173]="SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION",e[e.NIF_ALREADY_EXISTS=1310]="NIF_ALREADY_EXISTS",e[e.GIFTCARD_NOT_AVAILABLE_WITH_MP_ARTICLES=1174]="GIFTCARD_NOT_AVAILABLE_WITH_MP_ARTICLES",e[e.INSTALLATION_PRICE_NOT_FOUND=38001]="INSTALLATION_PRICE_NOT_FOUND",e[e.INSTALLATION_SERVICE_NOT_FOUND=38002]="INSTALLATION_SERVICE_NOT_FOUND",e[e.ONEY_FINANCING_TERMS_NOT_FOUND=46001]="ONEY_FINANCING_TERMS_NOT_FOUND",e[e.PROVINCE_DOES_NOT_MATCH_POSTALCODE=1201]="PROVINCE_DOES_NOT_MATCH_POSTALCODE",e[e.DOCUMENT_ID_ALREADY_EXISTS=1310]="DOCUMENT_ID_ALREADY_EXISTS"}(P||(P={})),function(e){e.BBVA="bbva",e.CAJAMAR="cajamar",e.MILLENIUM="millenium"}(N||(N={})),function(e){e.BBVA="ES18 0182 3204 1702 0151 4921",e.CAJAMAR="ES03 3058 0202 0927 2001 3704",e.MILLENIUM="PT50 0033 0000 4550 3510 3390 5"}(O||(O={})),function(e){e[e.TYPE_LOAD_REDIRECT=1]="TYPE_LOAD_REDIRECT",e[e.TYPE_LOAD_FORM=2]="TYPE_LOAD_FORM",e[e.TYPE_LOAD_IFRAME=3]="TYPE_LOAD_IFRAME"}(L||(L={})),function(e){e.ES="com",e.PT="pt"}(C||(C={})),function(e){e.LAS_PALMAS="Las Palmas",e.TENERIFE="Tenerife"}(g||(g={})),function(e){e.REMOTE_ASSISTANCE_ONE_DEVICE="10463598",e.REMOTE_ASSISTANCE_FOUR_DEVICES="10463840"}(D||(D={})),function(e){e.HIDROGEL_SMARTPHONE="10464593",e.HIDROGEL_TABLET="10464596",e.HIDROGEL_SMARTWATCH="10464595",e.REMOTE_ASSISTANCE_ONE_DEVICE="10463598",e.REMOTE_ASSISTANCE_FOUR_DEVICES="10463840"}(R||(R={})),function(e){e.SO_INSTALLATION_ARTICLE_ID="31045",e.ASSEMBLY_ARTICLE_ID="31046",e.ASSEMBLY_AND_FLEX_RL_TEST_ARTICLE_ID="135052",e.ASSEMBLY_AND_HARD_RL_TEST_ARTICLE_ID="135028",e.BIOS_UPDATE_ARTICLE_ID="31044",e.OS_HOME_INSTALLATION_AND_CONFIGURATION_ID="281923",e.OS_W10PRO_INSTALLATION_AND_CONFIGURATION_ID="281623",e.OS_W11HOME_INSTALLATION_AND_CONFIGURATION_ID="615049",e.OS_W11PRO_INSTALLATION_AND_CONFIGURATION_ID="613681"}(b||(b={}));var M,w,Y,U=[s.ONEY],k=[b.SO_INSTALLATION_ARTICLE_ID,b.ASSEMBLY_ARTICLE_ID,b.ASSEMBLY_AND_FLEX_RL_TEST_ARTICLE_ID,b.ASSEMBLY_AND_HARD_RL_TEST_ARTICLE_ID,b.BIOS_UPDATE_ARTICLE_ID,b.OS_HOME_INSTALLATION_AND_CONFIGURATION_ID,b.OS_W10PRO_INSTALLATION_AND_CONFIGURATION_ID,b.OS_W11HOME_INSTALLATION_AND_CONFIGURATION_ID,b.OS_W11PRO_INSTALLATION_AND_CONFIGURATION_ID];!function(e){e[e.PCC_ARTICLE_SPLIT=n.PCC_ARTICLE_SPLIT]="PCC_ARTICLE_SPLIT"}(M||(M={})),function(e){e.DIGITAL="digital",e.COMPOUND="compound"}(w||(w={})),function(e){e.DIGITAL="digital"}(Y||(Y={}));var x,B,V,G,H,F=h({},s.INESPAY,"/api/paymentGateway/inespay/notification"),K=(h(x={},s.ADYEN,"/api/paymentGateway/adyen/authorise3d"),h(x,s.APLAZAME,"/cart/payment/aplazame/gw"),h(x,s.CETELEM,"/api/paymentGateway/cetelem/notification"),h(x,s.INESPAY,"/api/paymentGateway/inespay/notification"),h(x,s.ONEY,"/api/paymentGateway/oney/notification"),x),X=(h(B={},s.CETELEM,S.Z5.ORDER_OK),h(B,s.INESPAY,"/api/paymentGateway/inespay/notification"),B),W=(h(V={},f.PAY_IN_SHOP,s.PAY_IN_SHOP),h(V,f.PAY_PER_USAGE,s.PAY_PER_USAGE),h(V,f.BIZUM,s.BIZUM),h(V,f.ADYEN,s.ADYEN),h(V,f.CETELEM,s.CETELEM),h(V,f.APLAZAME,s.APLAZAME),h(V,f.INESPAY,s.INESPAY),h(V,f.BANK_TRANSFER,s.BANK_TRANSFER),h(V,f.MULTIBANCO,s.MULTIBANCO),h(V,f.ONEY,s.ONEY),h(V,f.REDSYS,s.REDSYS),h(V,f.GRATIS,s.GRATIS),h(V,f.RENTALL,s.RENTALL),V);!function(e){e.ES="api-recomendador-carrito",e.PT="pt-api-recomendador-carrito",e.FR="fr-api-recomendador-carrito",e.IT="it-api-recomendador-carrito"}(G||(G={}));var j,Z,$=(h(H={},m.Pp.COM,G.ES),h(H,m.Pp.PT,G.PT),h(H,m.Pp.FR,G.FR),h(H,m.Pp.IT,G.IT),H);!function(e){e.MURCIA="Tienda Murcia",e.MADRID="Tienda Madrid",e.BARCELONA="Tienda Barcelona",e.SALA="Venta en sala"}(j||(j={}));var q,z,J,Q=(h(Z={},A.VISA,{url:"/prod/img/iconos/32x32-VisaBlue.svg",alt:"Card logo visa"}),h(Z,A.MASTER_CARD,{url:"/prod/img/iconos/32-mastercard.svg",alt:"Card logo mastercard"}),h(Z,A.GENERIC,{url:"",alt:""}),Z),ee=(h(q={},s.APLAZAME,{url:"/Unilae/svg/32-aplazame.svg",alt:"Aplazame logo"}),h(q,s.BANK_TRANSFER,""),h(q,s.BIZUM,{url:"/Unilae/svg/bizum_32x32.svg",alt:"Bizum logo"}),h(q,s.CASH_ON_DELIVERY,""),h(q,s.CETELEM,{url:"/Unilae/svg/cetelem_32x32.svg",alt:"Cetelem logo"}),h(q,s.INESPAY,""),h(q,s.MULTIBANCO,{url:"/Unilae/svg/230_multibanco.svg",alt:"Multibank logo"}),h(q,s.ONEY,{url:"/Unilae/svg/oneyLogo.svg",alt:"Oney logo"}),h(q,s.GOOGLE_PAY,{url:"/Unilae/svg/google_pay_32x32.svg",alt:"Google pay logo"}),h(q,s.REDSYS,""),q);!function(e){e.MURCIA="/recogeTusPedidosRtMurcia/selectSide.php",e.MADRID="/recogeTusPedidosRtMadrid/selectSide.php"}(z||(z={}));var te,re=(h(J={},E.MURCIA,z.MURCIA),h(J,E.BARCELONA,z.MURCIA),h(J,E.SALA,z.MURCIA),h(J,E.MADRID,z.MADRID),J),ne=(h(te={},m.Pp.COM,"ES"),h(te,m.Pp.PT,"PT"),h(te,m.Pp.FR,"FR"),h(te,m.Pp.IT,"IT"),te)},33945:(e,t,r)=>{r.d(t,{$z:()=>h,A8:()=>J,Ag:()=>re,BT:()=>B,CZ:()=>ee,E7:()=>ce,E9:()=>k,Hu:()=>Q,Jl:()=>Z,Kx:()=>pe,Ld:()=>m,NL:()=>b,Of:()=>se,Oq:()=>fe,Qu:()=>ae,SL:()=>ie,UJ:()=>K,_Z:()=>V,bO:()=>z,c5:()=>x,dV:()=>W,e$:()=>oe,jF:()=>ne,kq:()=>R,nu:()=>F,pS:()=>de,uY:()=>N,vA:()=>le,vR:()=>M,vm:()=>ue,x$:()=>G,zv:()=>P});var n=r(84479),i=r(38483),a=r(26911),o=r(27484),c=r.n(o),d=r(3618),u=r(46057),l=r(3678),s=r(23031),f=r(91085),p=r(72037),A=r(40093),I=r(50519),_=r(54461);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?"yes":"no",stock_shop:[{murcia:e.storeAvailability[1]?"yes":"no"},{madrid:e.storeAvailability[30]?"yes":"no"}],financing:void 0,yard_sale:"deal"===e.type?"yes":"no",reconditioned:"reaconditioned"===e.type?"yes":"no",marketplaces:p,other_vendors:p.length>1?"yes":"no",img_url:"https://img.pccomponentes.com/".concat(e.articleImage),img_url_thumb:"https://thumb.pccomponentes.com/w-300-300/".concat(e.articleImage),rating_avg:null===(d=e.valoration)||void 0===d||null===(u=d.valoration)||void 0===u?void 0:u.avg.toFixed(1),rating_count:null===(l=e.valoration)||void 0===l||null===(s=l.valoration)||void 0===s?void 0:s.count.toFixed(),super_family:e.superFamily,super_family_id:e.superFamilyId,description:function(){var t=e.detail;if(t){var r=document.createElement("div");return r.innerHTML=t,r.textContent||r.innerText||""}return""}(),original_price:e.basePrice.toFixed(2),added_date:e.date,url:"".concat(document.location.origin,"/").concat(e.slug),total_discount:"0.00",total_discount_percent:"0"}}return{}}(e)}))},P=function(e,t){var r,n,i,o,c=e.cart,d=[];c.articles&&(d=Array.isArray(c.articles)?c.articles:Object.values(c.articles));var u=d.find((function(e){return 2===e.idArticle})),l=null===(n=null===(r=e.agencies)||void 0===r?void 0:r.availableAgencies.find((function(t){return t.agencyId===e.agencySelected})))||void 0===n?void 0:n.free,f=null===(i=d.find((function(e){return 20008===e.idArticle})))||void 0===i?void 0:i.totalPrice,A=d.filter((function(e){return e.idArticle===a.zc.TALON})),I=A.reduce((function(e,t){return e+=t.totalPrice}),0),_=c.totalInstallationPrice,E=c.totalPrice+(l?c.shippingCost:0)+-I+(c.totalDiscountInCart?c.totalDiscountInCart:0)+(c.totalGiftCardDiscountInCart?c.totalGiftCardDiscountInCart:0)+(f?-f:0)+(u?-u.totalPrice:0)+(_?-_:0)+(c.surcharge||0),T=N(e,t).flatMap((function(e){return e.products})),S=T.map((function(e){return e.id}));d.filter((function(e){return!p.um.includes(e.idArticle)&&!S.includes(e.idArticle.toString())})).forEach((function(e){return T.push(y(v({},b(e,d,t)),{availabilityCode:a.wr.ZONE_NOT_AVAILABLE,deliveryStr:(0,s.t)("checkout.shoppingBasket.zoneNotAvailable")}))}));var m,h=null===e||void 0===e?void 0:e.awardedFinancing;return{showModalRecoverOrderOptions:void 0,canShowShippingPoints:e.canShowShippingPoints,balance:c.balance||0,balanceToSpend:c.balanceToSpend||0,birthdayDiscount:f,total:c.totalToPay||0,shippingCost:c.shippingCost,dropShippingShippingCost:c.dropShippingShippingCost,marketplaceShippingCost:c.marketPlaceShippingCost,price:E||0,articles:T,refundShipping:c.shippingCost>0&&void 0!==l&&l,talonPromotions:A.map((function(e){return{amount:e.totalPrice,text:e.name,removable:""!==e.couponDiscountTextValue}})),talonOneNotifications:null!==(m=null===(o=c.talonOneNotifications)||void 0===o?void 0:o.map((function(e){return{body:e.notificationBody,title:e.notificationTitle,type:te(e.notificationType),fromCoupon:""!==e.couponDiscountTextValue}})))&&void 0!==m?m:[],neutralPaperCost:null===u||void 0===u?void 0:u.totalPrice,installation:_,totalPaid:c.totalPayed,totalDiscountInCart:c.totalDiscountInCart,totalGiftCardDiscountInCart:c.totalGiftCardDiscountInCart,awardedFinancing:h,relatableOffers:[]}},N=function(e,t){var r=e.ordersAndDeliveries,o=e.agencySelected,d=e.deliveryTimeCollection,u=e.cart.cartShops,l=[],f=(null===r||void 0===r?void 0:r.flatMap((function(e){return e.deliveries.map((function(t){return t.type===i.l.PcComponentes?(l=t.articles.filter((function(e){return!p.um.includes(e.idArticle)&&e.articleReference>0})),y(v({},t),{articles:S(t.articles.filter((function(e){return 0===e.articleReference}))),idShop:e.idShop,orderKey:e.orderKey,shopName:e.shopName,offers:t.articles.filter((function(t){return t.mpOffer.deliveryKey===e.orderKey})).map((function(e){return e.mpOffer.idOffer}))})):y(v({},t),{idShop:e.idShop,orderKey:e.orderKey,shopName:e.shopName,offers:t.articles.filter((function(t){return t.mpOffer.deliveryKey===e.orderKey})).map((function(e){return e.mpOffer.idOffer}))})}))})))||[],A=r.flatMap((function(e){return e.deliveries.flatMap((function(e){return e.articles}))})),I=f.filter((function(e){return e.articles.find((function(e){return e.type===a.V7.DIGITAL}))})).map((function(e,r){return y(v({},e),{id:"".concat(r),isDigital:!0,defaultAgency:a.Xc.DIGITAL,idShop:e.idShop,shopName:e.shopName||"PcComponentes",type:e.type,isSameDay:e.deliveryDate.isSameDay,maxDeliveryDate:e.deliveryDate.maxDeliveryDate,minDeliveryDate:e.deliveryDate.minDeliveryDate,strDeliveryDate:(0,s.t)("checkout.delivery.today"),products:e.articles.filter((function(e){return!p.um.includes(e.idArticle)&&e.type===a.V7.DIGITAL})).map((function(e){return b(e,A,t)})),agencies:[{id:a.Xc.DIGITAL,name:(0,s.t)("checkout.delivery.digitalDownload"),moreInfoText:(0,s.t)("checkout.delivery.digitalDownloadMoreInfoText"),price:void 0,free:!1,isDigital:!0,value:a.Xc.DIGITAL,isSameDay:!1}]})})),_=f.map((function(r,l){var f="",I=r.deliveryDate.strDeliveryDate,_="";switch(i.l.PcComponentes===r.type&&(e.isCollectInShop||ee())&&(_=function(){var e="",t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).sort(q);if(t.length>0){var r=new Date(t[0].maxDelivery),i=r.getTime();r.setHours(0,0,0,0);var a=new Date;if(a.setHours(0,0,0,0),(0,n.IT)(r,a)){if(ee())return(0,s.t)("checkout.delivery.clientInShop");var o=3e5,d=new Date(Math.ceil(i/o)*o);e=(0,s.t)("checkout.delivery.availabilityInShop",{time:c()(d).format("HH:mm")})}else e=t[0].delivery}return e}(d)),r.type){case i.l.PcComponentes:_&&(I=_),o&&(f=o.toString());break;case i.l.Dropshipping:f="dropshipping";break;case i.l.Marketplace:var E,T,S,m=Array.isArray(u)&&(null===(E=u.find((function(e){return e.idShop.toString()===(null===r||void 0===r?void 0:r.idShop)})))||void 0===E||null===(T=E.deliveries)||void 0===T?void 0:T.find((function(e){return e.key===r.orderKey}))),h=null===(S=r.agencies)||void 0===S?void 0:S.find((function(e){return e.code===(null===m||void 0===m?void 0:m.selected)}));f=null===h||void 0===h?void 0:h.code}return y(v({},r),{id:"".concat(l),defaultAgency:f,idShop:r.idShop,orderKey:r.orderKey,isDigital:!1,shopName:r.shopName||"PcComponentes",type:r.type,isSameDay:r.deliveryDate.isSameDay,maxDeliveryDate:r.deliveryDate.maxDeliveryDate,minDeliveryDate:r.deliveryDate.minDeliveryDate,strDeliveryDate:I,products:r.articles.filter((function(e){return!p.um.includes(e.idArticle)&&e.type!==a.V7.DIGITAL&&e.totalPrice>0})).map((function(e){return b(e,A,t)})),agencies:O(r.agencies,r.type)})}));return l.length>0&&l.forEach((function(e){var r=0;_.forEach((function(n){n.articles.forEach((function(i){if(0===i.articleReference&&i.idArticle===e.articleReference&&r0}))},O=function(e,t){return e.map((function(e){switch(t){case"pccomponentes":return{id:e.agencyId&&"".concat(e.agencyId),name:e.name,moreInfoText:e.moreInfoText,price:+Math.round(100*e.price)/100,free:e.free,availableDates:e.availableDates?e.availableDates:[],timesAvailable:e.timesAvailable?e.timesAvailable:[],rangeDays:e.rangeDays,value:e.value,isSameDay:e.isSameDay};case"marketplace":return{id:e.code,name:e.label,moreInfoText:e.moreInfoText,price:+Math.round(100*e.price.calculatedPrice)/100,free:e.free||0===e.price.calculatedPrice,availableDates:[],timesAvailable:[],value:e.value,isSameDay:e.isSameDay};case"dropshipping":return{id:"dropshipping",name:"Envío especial",price:void 0,free:e.free,availableDates:[],timesAvailable:[],value:e.value,isSameDay:e.isSameDay}}}))},L=function(e,t){if(t){var r=t.idLine,n=t.qty,i=t.totalPrice;return{id:"".concat(e.insuranceId),name:e.insuranceName,detail:e.text,price:+e.price,active:!0,idLine:null===r||void 0===r?void 0:r.toString(),qty:n,totalPrice:i}}return{id:"".concat(e.insuranceId),name:e.insuranceName,detail:e.text,price:+e.price,active:!1,qty:0,totalPrice:0}},C=function(e,t){if(t){var r=t.idLine,n=t.qty,i=t.totalPrice;return{extraServiceId:e.extraServiceId,extraServiceArticleId:"".concat(e.extraServiceArticleId),name:e.name,price:+e.price,allowInMarketplace:e.allowInMarketplace,idLine:null===r||void 0===r?void 0:r.toString(),qty:n,totalPrice:i,active:!0}}return v({extraServiceId:e.extraServiceId,extraServiceArticleId:"".concat(e.extraServiceArticleId),name:e.name,price:+e.price,allowInMarketplace:e.allowInMarketplace,qty:0,totalPrice:0,active:!1},e.idLine?{idLine:e.idLine}:{},e.sellerId?{sellerId:e.sellerId}:{},e.condition?{condition:e.condition}:{})},g=function(e,t,r){if(r){var n=r.idLine,i=r.qty,a=r.totalPrice;return{id:"".concat(e.installationServiceId),name:e.text,price:+e.price,active:!0,idLine:null===n||void 0===n?void 0:n.toString(),qty:i,totalPrice:a,offerId:t,summaryWarningText:e.summaryWarningText,summaryNameText:e.summaryNameText,summaryModalTitle:e.summaryModalTitle,summaryModalDescription:e.summaryModalDescription}}return{id:"".concat(e.installationServiceId),name:e.text,price:+e.price,active:!1,qty:0,totalPrice:0,offerId:t,summaryWarningText:e.summaryWarningText,summaryNameText:e.summaryNameText,summaryModalTitle:e.summaryModalTitle,summaryModalDescription:e.summaryModalDescription}},D=["Portátiles","Mini PCs","Ordenadores Todo en uno","Tablets","Sobremesa","Portátiles SSD","Portáteis","portateis","Computadores Desktop","Desktops","desktops","Portáteis com SSD","portateis-com-ssd"],R=function(e){return{id:e.idArticle,price:e.price.price,valorationAvg:e.valoration.avg,valorationCount:e.valoration.total,name:e.name,image:e.image,idOffer:0}},b=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=r.map((function(e){var t;return null===(t=e.installationService)||void 0===t?void 0:t.installationServiceId})).filter(Boolean).map(Number),o=[];r.forEach((function(e){e.extendedInsurances.forEach((function(e){(null===e||void 0===e?void 0:e.insuranceId)&&o.push(e.insuranceId)}))}));var c,d=o.filter(Boolean).map(Number),u=r.filter((function(e){return i.includes(e.idArticle)})),l=0!==(null===(t=e.mpOffer)||void 0===t?void 0:t.shopName),f=[],A=[],_=r.filter((function(t){var r,n,i,a,o,c;return 0===(null===(r=e.mpOffer)||void 0===r?void 0:r.shopName)?(null===(n=t.insuranceSelected)||void 0===n?void 0:n.idArticle)===e.idArticle&&!(null===(i=t.insuranceSelected)||void 0===i?void 0:i.idOffer):(null===(a=t.insuranceSelected)||void 0===a?void 0:a.idArticle)===e.idArticle&&(null===(o=t.insuranceSelected)||void 0===o?void 0:o.idMpOffer)===(null===(c=e.mpOffer)||void 0===c?void 0:c.idOffer)})),E=r.filter((function(t){var r,i,a,o,c,d;return!(!(0,I.RU)(n)||!t.lineReference)||(0===(null===(r=e.mpOffer)||void 0===r?void 0:r.shopName)?(null===(i=t.extraServiceSelected)||void 0===i?void 0:i.idArticle)===e.idArticle&&!(null===(a=t.extraServiceSelected)||void 0===a?void 0:a.idOffer):(null===(o=t.extraServiceSelected)||void 0===o?void 0:o.idArticle)===e.idArticle&&(null===(c=t.extraServiceSelected)||void 0===c?void 0:c.idMpOffer)===(null===(d=e.mpOffer)||void 0===d?void 0:d.idOffer))}));if(e.extraServices&&Array.isArray(e.extraServices)&&e.extraServices.length>0&&(A=e.extraServices.map((function(t){return C(t,E.find((function(r){var i;return(0,I.RU)(n)?r.lineReference===e.idLine&&t.active:r.idArticle===t.extraServiceArticleId?!r.mpOfferReference||+r.mpOfferReference===(null===(i=e.mpOffer)||void 0===i?void 0:i.idOffer):void 0})))}))),e.extendedInsurances)if(Array.isArray(e.extendedInsurances))e.extendedInsurances.length>0&&(e.extendedInsurances.sort((function(e,t){return e.insuranceName.localeCompare(t.insuranceName)})),f=e.extendedInsurances.map((function(t){return L(t,_.find((function(r){var n;if(r.idArticle===t.insuranceId)return!r.mpOfferReference||+r.mpOfferReference===(null===(n=e.mpOffer)||void 0===n?void 0:n.idOffer)})))})));else{var m=Object.values(e.extendedInsurances);m.length>0&&(f=m.map((function(t){return L(t,_.find((function(r){var n;if(r.idArticle===t.insuranceId)return!r.mpOfferReference||+r.mpOfferReference===(null===(n=e.mpOffer)||void 0===n?void 0:n.idOffer)})))})))}if(e.installationService){var h,P=l?null===u||void 0===u?void 0:u.find((function(t){var r,n;return t.articleReference===e.idArticle&&t.mpOfferReference===(null===(r=e.mpOffer)||void 0===r||null===(n=r.idOffer)||void 0===n?void 0:n.toString())})):null===u||void 0===u?void 0:u.find((function(t){return t.articleReference===e.idArticle&&!t.mpOfferReference}));c=g(e.installationService,"".concat((null===(h=e.mpOffer)||void 0===h?void 0:h.idOffer)||0),P)}var N,O=r.reduce((function(e,t){return p.po.includes(t.idArticle)?y(v({},e),T({},t.articleReference,t.totalPrice)):e}),{});return{idLine:String(e.idLine),isService:0!==e.articleReference&&S(d).concat(S(i)).includes(e.idArticle),removable:0===e.articleReference||e.articleReference===e.idArticle,imgUrl:"//thumb.pccomponentes.com/w-85-85/".concat(null===e||void 0===e?void 0:e.articleImage),image:"//thumb.pccomponentes.com/w-85-85/".concat(null===e||void 0===e?void 0:e.articleImage),articleReference:e.articleReference,availabilityCode:null===e||void 0===e?void 0:e.availabilityCode,familyName:null===e||void 0===e?void 0:e.family,id:"".concat(null===e||void 0===e?void 0:e.idArticle),name:null===e||void 0===e?void 0:e.name,bestPrice:null!==(N=e.bestPrice)&&void 0!==N?N:void 0,recommendedPrice:e.recommendedPrice?e.recommendedPrice/100:void 0,price:e.totalPrice+(O[e.idArticle]||0),unitPrice:null===e||void 0===e?void 0:e.unitPrice,originalPrice:null===e||void 0===e?void 0:e.originalPrice,qty:null===e||void 0===e?void 0:e.qty,slug:null===e||void 0===e?void 0:e.slug,trademark:null===e||void 0===e?void 0:e.trademark,canAddGiftPaper:null===e||void 0===e?void 0:e.canAddGiftPaper,isDigital:e.type===a.V7.DIGITAL,isExtraServiceArticle:e.isExtraServiceArticle,type:e.type,deliveryStr:e.type!==a.V7.DIGITAL?e.deliveryDate.strDeliveryDate:(0,s.t)("checkout.delivery.digitalProductDeliveryDateText"),idOffer:e.mpOffer.idOffer,services:f,extraServices:A,installation:c,isComputerFamily:D.includes(e.family),vendor:l?{shopId:e.mpOffer.shopId,shopName:"".concat(e.mpOffer.shopName),shopSlug:e.mpOffer.shopSlug}:void 0,condition:e.mpOffer?e.mpOffer.condition:void 0,vendorType:l?a.O0.MARKETPLACE:a.O0.PCC}},M=function(e){var t=e.data,r=e.checkedShippingAddressId,n=e.checkedBillingAddressId,i=t.cart,a=w({data:i,checkedBillingAddressId:n&&+n>0&&n});return{shippingAddresses:U({data:i,checkedShippingAddressId:r&&+r>0&&r}),billingAddresses:a}},w=function(e){var t,r=e.data,n=e.checkedBillingAddressId,i=r.billingAddress,a=!!i&&!!(null===i||void 0===i?void 0:i.find((function(e){return e.defaultUser}))),o=i&&(t=Math).max.apply(t,S(i.map((function(e){return+e.idUser}))));return i?null===i||void 0===i?void 0:i.reduce((function(e,t){return S(e).concat([{addressData:{address:t.streetNumber?"".concat(t.address,", ").concat(t.streetNumber):t.address,billingType:Y(t.billingType),city:t.city,country:t.country.name,cp:t.postalCode,id:"".concat(t.idUser),name:t.name,nif:t.nif,phone:t.cellPhone,province:t.province.name,surname:t.surname},isChecked:n?+n===t.idUser:t.defaultUser||!a&&+t.idUser===o,isDefault:t.defaultUser}])}),[]).sort((function(e,t){return X(e,t)})):[]},Y=function(e){switch(e){case i.y.BUSINESS:return a.ck.COMPANY;case i.y.FREELANCE:return a.ck.FREELANCE;case i.y.INDIVIDUAL:default:return a.ck.INDIVIDUAL}},U=function(e){var t=e.data,r=e.checkedShippingAddressId,n=t.shippingAddress;if(!n)return[];var i=!!n&&!!n.find((function(e){return 1===e.default}));return n.map((function(e,t){return{addressData:v({address:e.streetNumber?"".concat(e.address,", ").concat(e.streetNumber):e.address,city:e.city,countryIsoCode:e.country.iso,country:e.country.name,cp:e.postalCode,id:"".concat(e.id),name:e.name,nif:e.nif,phone:e.phone,province:e.province.name,provinceIsoCode:String(e.province.id),surname:e.surname},e.optionalInformation?{optionalInformation:e.optionalInformation}:{}),isChecked:r?+r===e.id:i?1===e.default:n.length-1===t,isDefault:1===e.default,isValidated:e.validated}})).sort((function(e,t){return X(e,t)}))},k=function(e){return e.countries.map((function(e){return{iso:e.iso,name:e.name}}))},x=function(e){var t,r=e.talonCoupons;return null!==(t=null===r||void 0===r?void 0:r.map((function(e){var t=e.usageLimit,r=e.usageCounter,n=e.id,i=e.idGroup,a=e.creationDate,o=e.couponId,c=e.code,d=e.idCampaign,u=e.applicationId;return{activationCounter:e.activationCounter,applicationId:u,campaignId:d,code:c,couponId:o,creationDate:a,groupId:i,id:n,usageCounter:r,usageLimit:t}})))&&void 0!==t?t:[]},B=function(e){var t;return(null===(t=e.cart.availableShops)||void 0===t?void 0:t.map((function(e){return{name:j(e),id:e?"".concat(e):""}})))||[]},V=function(e){var t=H(e.adyenBankstores);return t?t.cards.sort((function(e,t){return Number(e.expired)-Number(t.expired)})):[]},G=function(e){return e.payments?S(e.payments.find((function(e){return e.idPayment===a.XL.ADYEN}))?e.payments.filter((function(e){return e.idPayment!==a.XL.REDSYS})):e.payments).concat(S(e.paymentsNotAllowed.filter((function(e){return e.notifyUnavailable})))).map((function(e){return{id:e.idPayment,description:e.description,name:e.name,url:e.url,isAvailable:!e.notifyUnavailable,errorCode:e.unavailableData?e.unavailableData.error_code:void 0}})):[]},H=function(e){var t;if(!e)return{cards:[]};var r=e.details;return r&&r.length<1?void 0:{cards:(null===(t=e.details)||void 0===t?void 0:t.reverse().map((function(e){var t=e.address,r=e.card,n=e.clientId,i=e.creationDate,a=e.paymentMethodVariant,o=e.recurringDetailReference,d=e.variant;return{expirationDate:{month:r.expiryMonth,year:r.expiryYear},name:r.holderName,lastFourDigits:r.number,brand:d,clientId:n,creationDate:i,paymentMethodVariant:a,recurringDetailReference:o,variant:d,address:t,expired:$(c()("".concat(r.expiryYear,"-").concat(+r.expiryMonth,"-01")).endOf("month"))}})))||[]}},F=function(e){var t=function(e){switch(e){case"info":default:return"info";case"warning":return"warning"}};return e.map((function(e){return{text:e.content,type:t(e.type)}}))},K=function(e){var t,r,n,i,o=null===(t=e.deliveries)||void 0===t?void 0:t.find((function(e){return"pccomponentes"===e.type})),c=null===(r=e.deliveries)||void 0===r?void 0:r.filter((function(e){return"marketplace"===e.type}));return{conditionsAccepted:!1,shippingAddressSelected:null===(n=e.addresses.shippingAddresses.find((function(e){return e.isChecked})))||void 0===n?void 0:n.addressData.id,billingAddressSelected:null===(i=e.addresses.billingAddresses.find((function(e){return e.isChecked})))||void 0===i?void 0:i.addressData.id,pickingPointSelected:void 0,isNeutralOrder:!1,shopSelected:void 0,shippingMethod:1,paymentMethodSelected:e.defaultPaymentMethod,deliveryAgency:o?o.defaultAgency:void 0,agencyObservations:"",marketplaceAgencies:c.filter((function(e){return e.agencies.length>0})).map((function(e){return{id:e.idShop,orderKey:e.orderKey,offers:e.offers,value:e.defaultAgency}})),productsWithGiftPaper:[],selectedCoupon:void 0,whoPicksUp:{data:void 0,isValid:!1},adyenInfo:e.defaultPaymentMethod===a.XL.ADYEN&&e.storedCards.length?{selectedStoredCard:e.storedCards[0],newCardData:void 0}:void 0,giftCardCode:void 0}},X=function(e,t){return t.isChecked||t.isDefault&&!e.isChecked?1:-1},W=function(e,t){var r;return null===(r=e.find((function(e){return e.name===t})))||void 0===r?void 0:r.iso},j=function(e){switch(e){case 1:return a.vo.MURCIA;case 30:return a.vo.MADRID;case 71:return a.vo.BARCELONA}return"Unknow Shop"},Z=function(e,t){switch(e){case a.XL.APLAZAME:case l.XL.APLAZAME:return a.hb.APLAZAME;case a.XL.CETELEM:return a.hb.CETELEM;case a.XL.PAY_PER_USAGE:return a.hb.PAY_PER_USAGE;case a.XL.PAY_IN_SHOP:case a.XL.CASH_ON_DELIVERY:return"payinshop"===t?a.hb.PAY_IN_SHOP:a.hb.CASH_ON_DELIVERY;case a.XL.BANK_TRANSFER:return a.hb.BANK_TRANSFER;case a.XL.BIZUM:return a.hb.BIZUM;case a.XL.MULTIBANCO:return a.hb.MULTIBANCO;case a.XL.INESPAY:return a.hb.INESPAY;case a.XL.ADYEN:case a.XL.REDSYS:return a.hb.CREDIT_CARD;case a.XL.GRATIS:return a.hb.GRATIS}return a.hb.UNKNOWN},$=function(e){return c()().diff(e,"day")>0},q=function(e,t){if(!e)return 1;if(!t)return-1;var r=c()(e.maxDelivery);return r.isBefore(t.maxDelivery)?1:r.isAfter(t.maxDelivery)?-1:0},z=function(e){var t=Math.round(100*(e+Number.EPSILON))/100;return t%1!==0?t.toLocaleString(void 0,{maximumFractionDigits:2,minimumFractionDigits:2}):t.toLocaleString()},J=function(e,t){return e.split("&").filter((function(e){return!e.includes(t)})).toString().split(",").join("&")},Q=function(e,t){var r=function(e,t){if(0===e.length)return t;var n=J(t,e[0]);return r(e.splice(1),n)};return r(t,e)},ee=function(){return"1"===(0,d.e)("cookieInShop")&&((0,d.e)("shopVersion")===a.gM.MURCIA||(0,d.e)("shopVersion")===a.gM.MADRID||(0,d.e)("shopVersion")===a.gM.BARCELONA)},te=function(e){switch(e.toLocaleLowerCase()){case"info":default:return"info";case"error":return"danger";case"offer":return"success"}},re=function(){return c()().diff(c()(A.GC))>0},ne=function(){return c()().diff(c()(A.YK))>0},ie=function(){return c()().diff(c()(A.Gb))>0},ae=function(e,t,r){var n;if(!e.billingAddresses.length)return!0;var i=null===(n=e.billingAddresses.find((function(e){return e.addressData.id===t})))||void 0===n?void 0:n.addressData,o=!i||(0,u.u)(W(r,i.country),i.cp);return(null===i||void 0===i?void 0:i.billingType)===a.ck.INDIVIDUAL?i&&!Object.values(i).some((function(e){return!e}))&&o||0===e.billingAddresses.length:i&&!Object.entries(i).some((function(e){return!e[1]&&"surname"!==e[0]}))&&o||0===e.billingAddresses.length},oe=function(e,t,r){var n;if(!e.shippingAddresses.length)return!0;var i=null===(n=e.shippingAddresses.find((function(e){return e.addressData.id===t})))||void 0===n?void 0:n.addressData,a=!i||(0,u.u)(W(r,i.country),i.cp);return i&&!Object.values(i).some((function(e){return!e}))&&a},ce=function(e){return e===_.lI.pt_PT?a.Ow.PT:a.Ow.ES},de=function(e){return e===a.Sh.LAS_PALMAS||e===a.Sh.TENERIFE},ue=function(e){return"facilypay_".concat(e.toLowerCase().split("x")[0],"x")},le=function(e){var t=e.map((function(e){return e.id})),r=new Set(t),n=!1;if(r.size!==t.length){var i=!0,a=!1,o=void 0;try{for(var c,d=function(){var t=c.value;if(e.find((function(e){return e.vendorType&&t.vendorType&&e.id===t.id&&e.vendorType===t.vendorType&&e.price!==t.price})))return n=!0,"break"},u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){if("break"===d())break}}catch(e){a=!0,o=e}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}}return n},se=function(e,t){return T({},a.nE.PCC_ARTICLE_SPLIT,{text:t||(0,s.t)("checkout.alerts.pccArticleSplit"),type:"warning",hasIcon:!0,alertSlug:a.pe.PCC_ARTICLE_SPLIT})[e]},fe=function(e){var t=e.shopVersion,r=e.shopCounter,n=e.idBilling,i=e.neutralOrder,o=e.shippingMethod,c=e.idShipping,u=e.selectedPickingPoint,l=e.whoPicksUp,s=e.selectedShop,p=e.marketplaceAgencies,A=e.selectedAgencyId,I=e.paymentMethod,_=e.newCardData,E=e.selectedCard,T=e.selectedCoupon,y=e.giftCardCode,S=e.selectedDeliveryDate,m=e.selectedDeliveryTime,h=e.isSameDay,P=e.observations,N=e.shopLocalSale,O=e.solidaryAmountChecked,L=e.financingTerms,C="".concat(window.location.origin).concat(a.PO[I]||f.Z5.ORDER_OK),g="".concat(window.location.origin).concat(a.k0[I]||""),D="".concat(window.location.origin).concat(a.Jj[I]||f.Z5.ORDER_KO),R=(0,d.S)(),b={},M={idBillingAddress:n,adyenUserAgent:"".concat(R.userAgent),adyenAcceptHeader:"application/json, text/javascript, */*; q=0.01",idPayment:String(I),paymentSlug:I===a.XL.ADYEN?"adyen":void 0,defaultSuccessUrl:"".concat(window.location.origin).concat(f.Z5.ORDER_OK),defaultFailUrl:"".concat(window.location.origin).concat(f.Z5.ORDER_KO),successUrl:C,failUrl:D,notificationUrl:g,shopCounter:"0"};switch(r&&(M.shopCounter="1"),i&&(b.neutralOrder=i.toString()),S&&(b.customerSelectedDeliveryDate=S),m&&(b.customerSelectedDeliveryTime=m),T&&(b.couponSelected=T),y&&(b.giftCardCode=y),b.isSameDay=h?"1":"0",P&&(b.shippingComment=P),N&&(b.shopLocalSale="1"),O&&(b.solidaryAmount="1"),b.setShippingDefault="0",b.deliveryNote="0",ee()&&(M.shopId=(0,d.e)("shopVersion"),"1"===(0,d.e)("cookieMostrador")&&(M.shopCounter="1")),(null===p||void 0===p?void 0:p.length)>0&&p.forEach((function(e){e.offers.forEach((function(t){b["marketPlaceAgencies[".concat(e.id,"][").concat(e.orderKey,"][").concat(t,"]")]=e.value}))})),A&&o===a.sx.SHIPPING_ADDRESS&&!isNaN(+A)&&(M.idAgency=A),o){case a.sx.SHIPPING_ADDRESS:c&&(b.idShippingAddress=c);break;case a.sx.PICKUP_POINT:u&&l&&(b.shippingPointId=u,b.shippingPointName=l.name,b.shippingPointSurname=l.lastName,b.shippingPointNif=l.nif.replace(/[\s\t\n]+/g,""),b.shippingPointPhone=l.phoneNumber);break;case a.sx.SHOP:s&&l&&(b.idShippingAddress=t&&s===a.gM.SALA?"".concat(-t):"".concat(-s),b.pickerName=l.name,b.pickerSurname=l.lastName,b.pickerNif=l.nif.replace(/[\s\t\n]+/g,""),b.pickerPhone=l.phoneNumber)}if(E&&(M.adyenDataCard=E.recurringDetailReference,M.adyenIdUserCard=E.clientId,M.cardType=E.brand),_){Object.entries(_.browserInfo).forEach((function(e){b["adyenData[browserInfo][".concat(e[0],"]")]=e[1].toString()}));var w=Object.entries(_.clientStateDataIndicator);if(w.length>0?w.forEach((function(e){b["adyenData[clientStateDataIndicator][".concat(e[0],"]")]=e[1].toString()})):b["adyenData[clientStateDataIndicator]"]=_.clientStateDataIndicator.toString(),b["adyenData[storePaymentMethod]"]=_.storePaymentMethod.toString(),Object.entries(_.paymentMethod).forEach((function(e){b["adyenData[paymentMethod][".concat(e[0],"]")]="".concat(e[1])})),_.riskData)Object.entries(_.riskData).forEach((function(e){b["adyenData[riskData][".concat(e[0],"]")]="".concat(e[1])}))}return Object.entries((0,d.S)()).forEach((function(e){return b["browserInfo[".concat(e[0],"]")]=e[1].toString()})),I===a.XL.ONEY&&L&&(b.financingTerms=ue(L)),v({},M,b)},pe=function(e,t){return e.map((function(r){var n=t.find((function(e){return String(r.idArticle)===e.productId}));return null===n||void 0===n||n.relatableOffers.forEach((function(t){r.extraServices.push({extraServiceId:t.productId,extraServiceArticleId:+t.productId,name:t.productName,price:t.price.amountCents,allowInMarketplace:!0,active:e.reduce((function(e,n){return!!e||n.lineReference===r.idLine&&t.productId===String(n.idArticle)}),!1),idLine:r.idLine,sellerId:t.sellerId,condition:t.condition})})),r}))}}}]); //# sourceMappingURL=main-22e09d3c.js.map