"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4796],{4933:function(e,t,n){n.d(t,{e:function(){return u},u:function(){return c}});var i=n(95155),o=n(12115),r=n(40299);class a{getFlag(e,t){if(this.isTest)return null!=t?t:this.defaultFallback;let n=e.split("."),i=this.flags;for(let e of n){if(!i||"object"!=typeof i||!(e in i))return null!=t?t:this.defaultFallback;i=i[e]}return i&&"object"==typeof i&&"enabled"in i&&"boolean"==typeof i.enabled?i.enabled:"boolean"==typeof i?i:null!=t?t:this.defaultFallback}getFlagWithCustomer(e){var t,n,i;let o=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=e.split(".");if(this.isLoading)return null!=o?o:this.defaultFallback;let a=this.customerGroups;for(let e of r)if(a&&"object"==typeof a&&e in a)a=a[e];else{a=null;break}let l=null==a?void 0:a.name,u=(null===(t=this.customer)||void 0===t?void 0:t.customerTags)&&Array.isArray(this.customer.customerTags),c=null!==(i=null===(n=this.customer)||void 0===n?void 0:n.customerTags)&&void 0!==i?i:[];return!!(u&&l&&c.includes(l))||this.getFlag(e,o)}getMultipleFlags(e,t){return e.map(e=>this.getFlag(e,t))}getMultipleFlagsWithCustomer(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return this.isLoading?Array(e.length).fill(null!=t?t:this.defaultFallback):e.map(e=>this.getFlagWithCustomer(e,t))}getAllFlags(){return this.flags}setFlags(e){this.flags=e}setCustomer(e){this.customer=e}setIsLoading(e){this.isLoading=e}constructor(e={},t={},n=null,i=!0,o=!0,r=!1){this.isLoading=!0,this.flags=e,this.customerGroups=t,this.defaultFallback=o,this.customer=n,this.isLoading=i,this.isTest=r}}new a;let l=(0,o.createContext)(null),u=e=>{let{children:t,initialFlags:n,isTest:u=!1}=e,{customerData:c,isLoadingCustomer:s}=(0,r.A)(),d=(0,o.useMemo)(()=>new a((null==n?void 0:n.features)||{},(null==n?void 0:n.customerGroups)||{},c||null,s,!0,u),[n,s,u,c,s]);return(0,i.jsx)(l.Provider,{value:d,children:t})},c=()=>{let e=(0,o.useContext)(l);if(!e)throw Error("No FeatureFlagsService found in context");return e}},34342:function(e,t,n){var i=n(95272);t.A=()=>{let[e,t]=(0,i.A)(["prices","prices.cencopay"]);return{canShowPrices:e,canShowPricesCencopay:t}}},39161:function(e,t,n){var i=n(95155);n(12115);var o=n(28084),r=n(64688);let a=e=>{let t=e.match(/\/\d+x\d+\/(?:filters:[^)]+\)\/)?(.+)$/);return t?t[1]:e},l=e=>{let t=e.match(/^(https?:\/\/[^/]+)/);return t?t[1]:""},u=e=>{let{src:t,width:n,quality:i=75}=e,o=a(t),r=l(t);return"".concat(r,"/unsafe/adaptive-fit-in/").concat(n,"x0/filters:quality(").concat(i,")/").concat(o)};t.A=e=>{let{src:t,alt:n,className:a,sizes:l="300px",quality:c=r.oW,fill:s,width:d=300,height:v=300,...m}=e,p="string"==typeof d?parseInt(d,10):d,f="string"==typeof v?parseInt(v,10):v;return(0,i.jsx)(o.default,{src:t,alt:n,className:a,loader:u,quality:c,sizes:l,...s?{fill:!0}:{width:p,height:f},...m})}},63998:function(e,t,n){n.d(t,{by:function(){return v},er:function(){return d},ps:function(){return u},D0:function(){return s},XX:function(){return c}});var i=n(64688);let o=async e=>{var t;let n=(null===(t=e[0])||void 0===t?void 0:t.event)||"view",o="".concat(i.qG,"/cmedia/event/").concat("view"===n?"impressions":"clicks"),r=new Date,a=new URL(window.location.href),l=e.map(e=>({occurredAt:r.toISOString(),opaqueUserId:null==e?void 0:e.userId,placement:{path:"".concat(a.pathname).concat((null==a?void 0:a.search)||"")},resolvedBidId:e.resolvedBidId}));if(!(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",platform:"web"},body:JSON.stringify(l),cache:"no-cache"})).ok)throw Error("Failed to send promoted products event")};var r=n(73674),a=n(50721);class l{async send(){this.timeout=void 0,await this.sender(this.events),this.events=[]}add(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0),this.events.push(e),this.timeout=setTimeout(()=>this.send(),50)}constructor(e){this.events=[],this.timeout=void 0,this.sender=e}}let u=new l(a.xB),c=new l(a.xg),s=new l(r.zb),d=new l(r.yd),v=new l(o)},73674:function(e,t,n){n.d(t,{hD:function(){return s},Ef:function(){return g},qd:function(){return C},Op:function(){return y},yu:function(){return P},RH:function(){return I},_4:function(){return c},nu:function(){return E},fw:function(){return v},Pm:function(){return m},dx:function(){return d},Pq:function(){return b},hx:function(){return h},yd:function(){return f},zb:function(){return p}});var i,o,r,a,l=n(90601);(i=r||(r={})).PRODUCT_CLICK="plpProductClick",i.EVENT_INTERACTIVE="event-interactive",i.SEARCH="Search",i.VIEW_SEARCH_RESULTS="view_search_results",i.VIEW_PRODUCTS="plpProductView",i.PERSONALIZE_PRODUCTS_VIEW="eC-recommendationView",i.PRODUCT_DETAIL="productDetail",i.PERSONALIZE_PRODUCT_CLICK="eC-recommendationClick",(o=a||(a={})).mid="3 columnas",o.default="5 columnas",o.full="Full grid";var u=n(86579);let c=e=>{let t=(0,u.Sx)(e);(0,l.bp)({event:e.isPersonalize?r.PERSONALIZE_PRODUCT_CLICK:r.PRODUCT_CLICK,ecommerce:t})},s=(e,t)=>{(0,l.bp)({"event-interactive-category":"filtros-plp","event-interactive-accion":e,"event-interactive-tag":t,event:r.EVENT_INTERACTIVE})},d=e=>{let t=(0,u.nX)(),n=(null==t?void 0:t.type)==="Category"?t.label:"search";(0,l.bp)({"event-interactive-category":"filtro Seleccion","event-interactive-accion":n,"event-interactive-tag":"Categor\xeda: ".concat(e),event:r.EVENT_INTERACTIVE})},v=(e,t,n)=>{var i;let o=(null==t?void 0:null===(i=t.addresses)||void 0===i?void 0:i.find(e=>e.commune===(null==n?void 0:n.commune)))||(null==t?void 0:t.addresses[0]);(0,l.bp)({page:e,eventId:"c60bd4b1-df11-4e6e-a537-c3fa1b1462a3_1724630217834.324",eventName:r.SEARCH,"x-fb-ck-fbp":"fb.1.1678454574523.1017643332","x-fb-ud-external_id":"1232916356.1678454574",userData:{email:(null==t?void 0:t.email)||null,region:(null==o?void 0:o.region)||null,street:(null==o?void 0:o.streetName)||null}})},m=(e,t,n)=>{(0,l.bp)({event:r.VIEW_SEARCH_RESULTS,page:e,searchTerm:t,searchResults:n})},p=e=>{let t=e.map(e=>(0,u.Sx)(e).click.products[0]);(0,l.bp)({event:r.VIEW_PRODUCTS,ecommerce:{currencyCode:"CLP",impressions:t}})},f=e=>{let t=e.map(e=>(0,u.Sx)(e).click.products[0]);(0,l.bp)({event:r.PERSONALIZE_PRODUCTS_VIEW,ecommerce:{currencyCode:"CLP",impressions:t}})},g=e=>{let{label:t}=(0,u.nX)();(0,l.bp)({"event-interactive-category":"filtros circulares","event-interactive-accion":t,"event-interactive-tag":e,event:r.EVENT_INTERACTIVE})},h=()=>{let{label:e}=(0,u.nX)();(0,l.bp)({"event-interactive-category":"sorting-PLP","event-interactive-accion":e,"event-interactive-tag":"Abrir",event:"event-interactive"})},b=e=>{if(!e)return;let{label:t}=(0,u.nX)();(0,l.bp)({"event-interactive-category":"sorting-PLP: selecci\xf3n","event-interactive-accion":t,"event-interactive-tag":e,event:"event-interactive"})},C=()=>{let{label:e}=(0,u.nX)();(0,l.bp)({"event-interactive-category":"filtros-PLP","event-interactive-accion":e,"event-interactive-tag":"Abrir",event:"event-interactive"})},E=e=>{try{var t;let n="undefined"!=typeof sessionStorage&&sessionStorage&&null!==(t=sessionStorage.getItem("productClickedFrom"))&&void 0!==t?t:"",i={...e,label:n},o=(0,u.Sx)(i).click.products[0],a=window.location.pathname;(0,l.bp)({event:r.PRODUCT_DETAIL,page:a,pagename:"PDP",userID:"",ecommerce:{detail:{products:[o]}}})}catch(e){console.error("Error sending productDetailEvent:",e)}},y=e=>{var t;let{label:n,type:i}=(0,u.nX)(),o=null!==(t=a[e])&&void 0!==t?t:a.default;(0,l.bp)({"event-interactive-category":"Cambio de vista PLP","event-interactive-accion":"Search"===i?"Search":n,"event-interactive-tag":o,event:"event-interactive"})},I=e=>{e&&(0,l.bp)({"event-interactive-category":"Interacciones Quickviews PLP","event-interactive-accion":"Vista modal","event-interactive-tag":e,event:"event-interactive"})},P=()=>{(0,l.bp)({event:"event_interactive","event-interactive-category":"Interacciones PLP","event-interactive-accion":"Search","event-interactive-tag":"No se encontraron resultados"})}},90601:function(e,t,n){n.d(t,{nW:function(){return c},bp:function(){return r},rE:function(){return u}});var i=n(48568),o=n.n(i);let r=e=>{o().dataLayer({dataLayer:e})};var a=n(96e3),l=n(53515);function u(){r({event:"page-virtual",page:window.location.pathname,pagename:"PDP"})}let c=(e,t,n)=>{r({event:e,ecommerce:{add:{products:[function(e,t){var n,i,o,r,u,c,s,d,v,m,p,f,g,h,b,C,E,y,I;let P=(null==e?void 0:null===(o=e.masterVariant)||void 0===o?void 0:null===(i=o.prices)||void 0===i?void 0:null===(n=i.paymentMethod)||void 0===n?void 0:n.method)===l.O.CENCO_CARD,_={id:(null==e?void 0:e.key)||"",name:(null==e?void 0:e.name)||"",variant:(null==t?void 0:null===(r=t.variant)||void 0===r?void 0:r.sku)||(null==e?void 0:null===(u=e.masterVariant)||void 0===u?void 0:u.sku)||"",category:(null==e?void 0:e.category)||"",brand:(null==e?void 0:e.brand)||"",price:(null==e?void 0:e.masterVariant)?(0,a.o)(null==e?void 0:null===(c=e.masterVariant)||void 0===c?void 0:c.prices):"",dimension2:(null==e?void 0:e.departmentId)||"",dimension3:(null==e?void 0:e.departmentName)||"",dimension32:(null==e?void 0:e.subdepartmentId)||"",dimension11:(null==e?void 0:e.subdepartmentName)||"",dimension33:(null==e?void 0:e.claseId)||"",dimension12:(null==e?void 0:e.claseName)||"",dimension18:(null==e?void 0:e.size)||"",dimension19:(null==e?void 0:null===(m=e.masterVariant)||void 0===m?void 0:null===(v=m.prices)||void 0===v?void 0:null===(d=v.regular)||void 0===d?void 0:null===(s=d.value)||void 0===s?void 0:s.centAmount)||0,dimension20:P?null==e?void 0:null===(h=e.masterVariant)||void 0===h?void 0:null===(g=h.prices)||void 0===g?void 0:null===(f=g.paymentMethod)||void 0===f?void 0:null===(p=f.value)||void 0===p?void 0:p.centAmount:0,dimension30:(null==e?void 0:e.brand)||"",dimension41:(null==e?void 0:e.averageRating)||0,dimension42:(null==e?void 0:e.countRating)||0,image_data:{url:(null==e?void 0:null===(b=e.image_data)||void 0===b?void 0:b.url)||"",srcset:(null==e?void 0:null===(C=e.image_data)||void 0===C?void 0:C.srcset)||"",alt:(null==e?void 0:null===(E=e.image_data)||void 0===E?void 0:E.alt)||"",title:(null==e?void 0:null===(y=e.image_data)||void 0===y?void 0:y.title)||"",imgNotFound:(null==e?void 0:null===(I=e.image_data)||void 0===I?void 0:I.imgNotFound)||!1},quantity:1};return(null==t?void 0:t.list)&&(_.list=t.list),"number"==typeof(null==t?void 0:t.position)&&(_.position=t.position),_}(t,{variant:n})]}}})}},95272:function(e,t,n){var i=n(4933);t.A=(e,t)=>(0,i.u)().getMultipleFlags(e,t)},99900:function(e,t,n){var i=n(4933);t.A=(e,t)=>(0,i.u)().getFlag(e,t)}}]);