"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[59863],{61563:(e,t,r)=>{r.d(t,{sX:()=>ne,C:()=>z,Rp:()=>V,BX:()=>x,ds:()=>ee,I6:()=>$,t$:()=>M,W2:()=>K,rZ:()=>B,qT:()=>ae,W8:()=>X,H2:()=>W,U8:()=>H,G_:()=>re,su:()=>te});var n,a="@@CONFIGURATOR/GET_CONFIGURATOR_SOCKETS_SUCESS",i="@@CONFIGURATOR/GET_CONFIGURATOR_SOCKETS_FAILURE",o="@@CONFIGURATOR/GET_CONFIGURATOR_FAMILIES_SUCCESS",c="@@CONFIGURATOR/GET_CONFIGURATOR_FAMILIES_FAILURE",l="@@CONFIGURATOR/SEARCH_CONFIGURATOR_FAMILY_REQUEST",u="@@CONFIGURATOR/SEARCH_CONFIGURATOR_FAMILY_SUCCESS",s="@@CONFIGURATOR/SEARCH_CONFIGURATOR_FAMILY_FAILURE",f="@@CONFIGURATOR/RESET_COMPATIBILITIES",d="@@CONFIGURATOR/RESET_CONFIGURATION",p="@@CONFIGURATOR/SET_FAMILY_SELECTED_ARTICLE",y="@@CONFIGURATOR/SET_SETUP_ARTICLE_SELECTED",g="@@CONFIGURATOR/SET_SO_ARTICLE_SELECTED",O="@@CONFIGURATOR/GET_SO_INSTALLATION_ARTICLE_SUCCESS",A="@@CONFIGURATOR/GET_SO_INSTALLATION_ARTICLE_FAILURE",m="@@CONFIGURATOR/GET_SETUP_INSTALLATION_ARTICLE_SUCCESS",I="@@CONFIGURATOR/GET_SETUP_INSTALLATION_ARTICLE_FAILURE";!function(e){e.BASE="base",e.GRAPHICS="graphics",e.STORAGE="storage",e.OTHERS="others",e.SETUP="setup",e.PERIPHERALS="peripherals"}(n||(n={}));var T=r(55285),v=r(62778),E=r(57069),R=r(84572),S=r(76856),C=r(36027);function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]t.name?1:-1})))),A.data?(M=A.data.data.map((function(e){return function(e,t){var r=(0,R.w9)(e.selectedFilters),n=r.rangeFilters,a=r.enumFilters;return{id:e.idConfFamily,position:e.idConfFamily,name:e.name,required:e.required,section:e.section,icon:e.icon,searchResult:[],filters:e.filters||{},loadingArticles:!1,selectedArticle:t,currentPage:0,preselectArticle:e.initialOpened,categoryId:E.I_[e.idConfFamily],selectedFilters:e.selectedFilters||{},relevantFilters:e.relevantFilters&&(0,R.M$)(e.relevantFilters,a)||[],selectedRangeFilters:n,totalPages:e.totalPages||0,sort:"relevance",sortingKeys:["relevance","price_asc","price_desc"],totalProducts:e.total||0}}(e,h.find((function(t){return e.idConfFamily===t.idConfigFamily})))})),M.push({id:104,position:4,name:"Refrigeración Líquida",icon:"computer_fan",required:!1,section:n.BASE,searchResult:[],loadingArticles:!1,currentPage:0,preselectArticle:!1,categoryId:"e278a9e7-d3f5-4685-a145-c1b5f24e9693",legacyId:"155",selectedFilters:{},selectedRangeFilters:{},relevantFilters:[],filters:{},totalPages:0,sort:"relevance",totalProducts:0,sortingKeys:["relevance","price_asc","price_desc"]}),e(D(M)),m.data?(e(P((0,S.Y)(m.data.data,W))),I.data?(e(L((0,S.Y)(I.data.data,H))),[3,4]):(e(N("Failed to fetch so article")),[2])):(e(j("Failed to fetch setup article")),[2])):(e(q("Failed to fetch families")),[2])):(e(w("Failed to fetch sockets")),[2]);case 3:return K=b.sent(),e(w(JSON.stringify(K))),e(q(JSON.stringify(K))),e(j(JSON.stringify(K))),e(N(JSON.stringify(K))),[3,4];case 4:return[2]}}))},r=function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(e){h(i,n,a,o,c,"next",e)}function c(e){h(i,n,a,o,c,"throw",e)}o(void 0)}))},function(e){return r.apply(this,arguments)}};function Y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Q,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case c:case i:case A:case I:return J(Z({},e),{error:t.payload});case o:return J(Z({},e),{families:t.payload});case a:return J(Z({},e),{sockets:t.payload});case l:return J(Z({},e),{families:e.families.map((function(e){return e.id===t.payload.familyId?J(Z({},e),{loadingArticles:!0}):e}))});case u:return J(Z({},e),{families:e.families.map((function(e){return e.id===t.payload.familyId?J(Z({},e,t.payload),{searchResult:t.payload.articles,loadingArticles:!1}):e}))});case s:return J(Z({},e),{error:t.payload.error,families:e.families.map((function(e){return e.id===t.payload.familyId?J(Z({},e),{loadingArticles:!1}):e}))});case f:return J(Z({},e),{families:e.families.map((function(e){return J(Z({},e),{selectedArticle:e.selectedArticle&&J(Z({},e.selectedArticle),{reason:void 0,compatibilityState:void 0})})}))});case p:return J(Z({},e),{families:e.families.map((function(e){return e.id===t.payload.familyId?J(Z({},e),{selectedArticle:t.payload.article}):e}))});case d:return J(Z({},e),{families:e.families.map((function(e){return J(Z({},e),{selectedArticle:void 0})}))});case O:return J(Z({},e),{soArticle:t.payload});case m:return J(Z({},e),{setupArticle:t.payload});case y:return J(Z({},e),{setupArticle:e.setupArticle&&J(Z({},e.setupArticle),{isSelected:t.payload})});case g:return J(Z({},e),{soArticle:e.soArticle&&J(Z({},e.soArticle),{isSelected:t.payload})});default:return e}};var z=function(e){return e.configurator.families},V=function(e){return e.configurator.sockets},ee=function(e){var t,r=e.configurator;return r.families.reduce((function(e,t){var r,n,a;return e+((null===(r=t.selectedArticle)||void 0===r?void 0:r.promotionalPrice)||(null===(n=t.selectedArticle)||void 0===n?void 0:n.originalPrice)||0)*((null===(a=t.selectedArticle)||void 0===a?void 0:a.qty)||1)}),0)+((null===(t=r.setupArticle)||void 0===t?void 0:t.isSelected)?r.setupArticle.price:0)},te=function(e){return e.configurator.soArticle},re=function(e){return e.configurator.setupArticle},ne=function(e){return e.configurator.families.filter((function(e){return e.required})).every((function(e){return e.selectedArticle}))},ae=function(e){return e.configurator.sockets.find((function(e){return e.isSelected}))}},62778:(e,t,r)=>{r.d(t,{KX:()=>o,LU:()=>s,UF:()=>l,X:()=>u,Zt:()=>f,aQ:()=>d,ez:()=>p,tX:()=>c,zE:()=>y});var n=r(49670),a=r(58846);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 o=function(e){return a.w.serviceGWFetch("/api-v1/pcconfigurator/configurator/basetypes",n.w.GET,{},{headers:{"content-language":e}})},c=function(e){return a.w.serviceGWFetch("/api-v1/pcconfigurator/configurator/families",n.w.GET,{},{headers:{"content-language":e}})},l=function(e){return a.w.serviceGWFetch("/api-v1/pcconfigurator/setup-article",n.w.GET,{},{headers:{"content-language":e}})},u=function(e,t){return a.w.serviceGWFetch("/api-v1/pcconfigurator/configuration/".concat(e),n.w.GET,{},{headers:{"content-language":t}})},s=function(e){return a.w.serviceGWFetch("/api-v1/pcconfigurator/so-instalation-article",n.w.GET,{},{headers:{"content-language":e}})},f=function(e,t){var r="?idConfigBaseType=".concat(e.socket,"&idConfigFamily=").concat(e.family,"&page=").concat(e.page,"&numPageItems=").concat(e.numPageItems,"&order=").concat(e.order);return e.query&&(r+="&query=".concat(e.query)),e.idTrademark&&(r+="&idTrademark=".concat(e.idTrademark)),r+="&outOfStock=".concat(e.outOfStock||0),a.w.serviceGWFetch("/api-v1/pcconfigurator/configurator/articles".concat(r),n.w.GET,{},{headers:{"content-language":t}})},d=function(e,t){return a.w.serviceGWFetch("/api-v1/pcconfigurator/similar-articles/".concat(e),n.w.GET,{},{headers:{"content-language":t}})},p=function(e){return a.w.serviceGWFetch("/api-v1/pcconfigurator/configurator/share",n.w.POST,{payload:e})},y=function(e,t){return a.w.serviceGWFetch("/api-v1/customer-support/compatibility",n.w.POST,function(e){for(var t=1;t{r.d(t,{Z:()=>w});var n=r(14890),a=r(53894),i=r(54461),o=r(6216),c=r(61436),l=r(24221),u=r(73859),s=r(61563),f=r(5829),d=r(96349),p=r(5210),y=r(67558),g=r(18627),O=r(5523),A=r(89117),m=r(36027),I=r(80537),T=r(96176),v=r(7294),E=r(73246),R=r(30959),S=r(46385),C=r(47107),F=r(15638),h=r(34619),_=r(21917),b=r(52331),G=r(30015),U=(0,n.UY)({cfHeaders:l.Z,checkout:u.J,configurator:s.I6,app:i.I6,algolia:_.I6,footer:d.I6,header:p.I6,menu:y.I6,campaignConfig:c.I6,cmsConfig:f.I6,products:g.I6,seo:m.I6,shop:T.I6,sidenav:I.I6,user:v.I6,banner:o.I6,valorationsProduct:O.I6,questionsAnswers:A.I6,campaigns:E.I6,ranking:R.I6,productDetail:C.n,requestUtils:S.I6,flashOffer:F.I6,blogHome:b.I6,blogListing:h.I6});const w=function(e){var t=(0,n.jB)(U,e,(0,G.U)((0,n.md)(a.Z)));return"undefined"!==typeof window&&window.Cypress&&(window.store=t),t}}}]); //# sourceMappingURL=main-b39ed8c2.js.map