@soma-vertical-web/multi-lib 0.0.72 → 0.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";var Zp=Object.defineProperty;var Jp=(e,t,n)=>t in e?Zp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xr=(e,t,n)=>Jp(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),v=require("react"),U=require("./index-CwBIv223.js"),Qe=require("idb-keyval"),yt=require("zustand"),Fo=require("js-cookie"),m=require("@soma-vertical-web/core-components"),mt=require("axios"),em=require("jose"),Pt=require("@soma-vertical-web/foundations"),cs=require("react-dom"),Xe=require("draft-js"),Zs=require("@date-fns/tz"),gc=require("react-intersection-observer"),ls=v.createContext({}),tm=({data:e,children:t})=>r.jsx(ls.Provider,{value:{tags:e==null?void 0:e.config},children:t}),ot=()=>{const{tags:e}=v.useContext(ls),t=v.useCallback(n=>{var i,c,l,u;const o=(c=(i=e==null?void 0:e.commercial)==null?void 0:i.items)==null?void 0:c.find(f=>{var h;return(h=n??[])==null?void 0:h.find(d=>d.id===f.key)}),s=(u=(l=e==null?void 0:e.institucional)==null?void 0:l.items)==null?void 0:u.find(f=>{var h;return(h=n??[])==null?void 0:h.find(d=>d.id===f.key)}),a=e==null?void 0:e.flagPdp;return{commercial:o,institucional:s,flagPdp:a}},[e]);return{tags:e,getAvailableProductTag:t}},yc=({gridScrollBack:e})=>{v.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},_c=v.createContext({}),rm=({children:e,gridScrollBack:t})=>{const n=v.useRef(null);return yc({gridScrollBack:t}),r.jsx(_c.Provider,{value:{sizesContainerRef:n},children:e})},vc=()=>{const e=v.useContext(_c);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},it=({event:e,data:t})=>{const n=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&n.push({ecommerce:null}),n.push({...e&&{event:`custom_${e}`},...t})},Ce={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:n,commonData:o,customData:s,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:f}=o,h={...n==="view_item"?{currency:Ce.configs.currency,value:f,grade_disponivel:l??(u?xc(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:f,currency:Ce.configs.currency}:{}},d=or({data:o,customData:{...s,...i,...a},configs:Ce.configs});it({event:n,data:{...c,ecommerce:{...i,...h,items:[d]}}}),typeof t=="function"&&t(d,h)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:o,outsideEcommerceData:s,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>or({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:o},configs:Ce.configs}));it({event:"view_item_list",data:{...s,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:o,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:n},customData:o,supportData:{selectedSkus:s,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const f=n.map(h=>{var y,_,b,S,x,j,P,E,C;const d=s==null?void 0:s.find(R=>(h.productId??h.id)===R.productId);let p={...i,...c};if(d){const R=jc(),T=Cc(R,d);T&&(p={...p,...T}),t==="add_to_cart"&&(i||c)&&Bo({persistedData:R,type:"add",sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&Bo({persistedData:R,type:"remove",sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku)})}u+=h.price??((b=(_=(y=d==null?void 0:d.offers)==null?void 0:y.offers)==null?void 0:_[0])==null?void 0:b.price)??0;const g=(d==null?void 0:d.size)??U.getColorAndSizeFromSkuName((d==null?void 0:d.skuName)??(d==null?void 0:d.name)??((S=h.itemOffered)==null?void 0:S.skuName),Ce.configs.NAME_SPLIT_SYMBOL).size;return or({data:h,customData:{...o,...p??{...i,...c},item_sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku)??((x=h.itemOffered)==null?void 0:x.sku),quantity:(o==null?void 0:o.quantity)??h.quantity??1,item_variant2:g,seller_id:(d==null?void 0:d.sellerId)??(d==null?void 0:d.seller)??((C=(E=(P=(j=d==null?void 0:d.offers)==null?void 0:j.offers)==null?void 0:P[0])==null?void 0:E.seller)==null?void 0:C.identifier)??h.seller},configs:Ce.configs})});it({event:t,data:{...l,ecommerce:{value:a??u,currency:Ce.configs.currency,items:f}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,outsideEcommerceData:o}=e,s={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var h;const u=((h=Ce.configs.PLP_FILTERS.find(d=>d.key===c))==null?void 0:h.eventLabel)??c,f=(s==null?void 0:s[u])||[];u==="price_range"&&l.replace(":","-"),s[u]=[...f,l]}),Object.keys(s).forEach(c=>a[c]=s[c].join(", "))),it({event:"filter",data:{...o,...a,...n}})},viewCartEvent:e=>{var f,h,d,p,g,y,_,b,S,x;const{commonData:t,outsideEcommerceData:n}=e,{cartStore:o}=t;if(!o)return;const s=window.localStorage.getItem("persistedCartEventsData"),a=s?JSON.parse(s):{},i=o.items.map(j=>{const{promotionInfo:P,itemList:E}=a[j.id]??{};return or({data:{...j,price:j.price/100,listPrice:j.listPrice/100},customData:{...P,...E,item_sku:j.id??j.itemOffered.sku,quantity:j.quantity??1},configs:Ce.configs})}),c=(((f=o.totalizers.find(j=>j.name==="Total dos Itens"))==null?void 0:f.value)??0)/100,l=(((h=o.totalizers.find(j=>j.name==="Total dos Descontos"))==null?void 0:h.value)??0)/100,u=((d=o.marketingData)==null?void 0:d.utmiCampaign)===Ce.configs.VENDOR_CODE?(p=o.marketingData)==null?void 0:p.utmCampaign:(y=String((g=o.openTextField)==null?void 0:g.value))==null?void 0:y.split(" - ")[0];it({event:"view_cart",data:{...n,ecommerce:{currency:Ce.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(_=o.shippingData)==null?void 0:_.address)!=null&&b.postalCode),...u?{seller_coupon_name:u}:{},...((S=o.marketingData)==null?void 0:S.coupon)&&{sale_coupon_name:(x=o.marketingData)==null?void 0:x.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:n}=e;it({event:t,data:{...n}})}},xc=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),nm=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},or=({data:e,customData:t,configs:n})=>({...om(e,n==null?void 0:n.MAIN_IMAGE),...sm(e),...am(e),...im(e),...t}),bc=()=>{var e,t;return document?((t=(e=window.document.head.querySelector('meta[name="category"]'))==null?void 0:e.getAttribute("content"))==null?void 0:t.split("_"))??[]:[]},jc=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Cc=(e,t)=>e==null?void 0:e[t],Bo=({persistedData:e,type:t,sku:n,newData:o})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:o}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:o}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},om=(e,t="1")=>{var a,i,c,l,u,f,h,d,p,g,y;const n=e.productReference??e.gtin??e.productRefId,o=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),s=o==null?void 0:o.find(_=>_.alternateName===t||_.imageLabel===t||_.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((h=(f=e.itemOffered)==null?void 0:f.isVariationOf)==null?void 0:h.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??U.splitNameAndSizeFromFullName((d=e.itemOffered)==null?void 0:d.name,Ce.configs.NAME_SPLIT_SYMBOL).name,item_brand:((p=e.brand)==null?void 0:p.brandName)??((g=e.brand)==null?void 0:g.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${Ce.configs.storeUrl}${e.linkText}/p`,item_image:(s==null?void 0:s.url)??(s==null?void 0:s.imageUrl)}},Js=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,sm=e=>{var u,f;const{categories:t,categoriesIds:n}=e,o=t??((u=e.itemOffered)==null?void 0:u.categories),s=n??((f=e.itemOffered)==null?void 0:f.categoriesIds),a=Js(o),i=Js(s),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...c[1]&&{item_category2:c[1]},...c.length>2&&{item_category3:c[c.length-1]},item_category_id:l[l.length-1],...l.length>1&&{item_parent_category_id:l[l.length-2]}}},am=e=>{var s,a,i,c,l,u;const t=((s=e.itemOffered)==null?void 0:s.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:n,size:o}=U.getColorAndSizeFromSkuName(t,Ce.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:o}}},im=e=>{var l,u;const{price:t,listPrice:n,installments:o}=e,s=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-s:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:s??a},...a&&{list_price:a,discount:c},...o&&{installments:o==null?void 0:o.count,installment_value:o==null?void 0:o.value},item_currency:Ce.configs.currency}},Sc=()=>{const[e,t]=bc(),[n,o]=e.split("-"),s=n.includes("shop")||n.includes("sale")?n:"";return{page_category:s&&o?o:"",page_departament:s,id:t,name:e}},cm=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ce,findDataInPersistedData:Cc,getAvailablesSizes:xc,getCategories:nm,getPageCategoryAndDepartmentFromSlug:Sc,getPersistedData:jc,getProductListInfoFromHead:bc,pushDatalayer:it,updatePersistedData:Bo},Symbol.toStringTag,{value:"Module"})),Pc=v.createContext({}),lm=({children:e,evtFunctionsConfigs:t})=>{const n=v.useRef({}),o=v.useRef(null),s=v.useRef(null),a=v.useRef({}),i=v.useRef({trigger:!1,index:0}),c=({functionKey:f,data:h,callBack:d,timeout:p=100})=>{window.dataLayer||(window.dataLayer=[]),Ce.configs=t;try{typeof Ce[f]=="function"&&setTimeout(()=>{var g;h.promotionInfo=n.current,(g=s.current)!=null&&g.item_list_name&&(h.itemList=s.current),Ce[f](h,d)},p)}catch(g){it({event:"error_event",data:{error_message:(g==null?void 0:g.message)??g}})}},l=({content:f})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:f.replace("::",":")}}})},u=({updatePromotionRef:f,promotion:h,index:d})=>{f&&(n.current={...h}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...h,...d!==void 0&&{index:d}}}}})};return r.jsx(Pc.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:o,itemListRef:s,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},le=()=>v.useContext(Pc),wc=v.createContext({}),um=({children:e,productData:t,isKit:n,PDP_INFO:o,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a})=>{var k,W;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=le(),{productId:l,productName:u,items:f,items:[{images:h,Videos:d}],description:p,["Composição"]:g="",productReference:y,categories:[_]}=t,{getAvailableProductTag:b}=ot(),S=b(Object.entries(t.clusterHighlights).map(q=>({id:q[0],name:q[1]}))),x=_.slice(1,-1).split("/"),{installments:j,price:P,listPrice:E,sizes:C,allSizesAvailable:R}=U.getSkuInfos({items:f,NAME_SPLIT_SYMBOL:s}),T=U.getThumbImage({images:h,TEXTURE_IMAGE:a}),w=[{label:`${o.product.description}`,value:"description",content:p},{label:`${o.product.materiais}`,value:"composition",content:g}],N=((W=U.getColorAndSizeFromSkuName((k=t.items)==null?void 0:k[0].name,s))==null?void 0:W.color)??t["Cores Filtráveis"][0]??"",I=()=>({commonData:{...t,sizes:C,price:P,listPrice:E,installments:j},customData:{installments:j==null?void 0:j.count,installment_value:Number(j==null?void 0:j.value).toFixed(2)}}),z=({sku:q,size:F})=>{const{commonData:G,customData:V}=I();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...V,...q&&{item_sku:q},...F&&{item_variant2:F}}}})};return v.useEffect(()=>{if(c.current.trigger){const{commonData:q,customData:F}=I();i({functionKey:"productEvents",data:{event:"select_item",commonData:q,customData:{...F,index:c.current.index}}}),c.current.trigger=!1}z({})},[]),r.jsx(wc.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:S,items:f,sizes:C,allSizesAvailable:R,installments:j,price:P,listPrice:E,thumbImage:T,images:h,video:d[0],descriptionContent:w,breadcrumbList:x,isKit:n,colorName:N,handleViewItemEvent:z},children:e})},$e=()=>{const e=v.useContext(wc);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},dm=()=>{const[e,t]=v.useState(null);return[e,async o=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(o),t(o),!0}catch(s){return console.warn("Copy failed",s),t(null),!1}}]},Ec=()=>{v.useEffect(()=>{const e=t=>{t.preventDefault()};return document.addEventListener("gesturestart",e),document.addEventListener("gesturechange",e),document.addEventListener("dblclick",e),document.addEventListener("wheel",t=>{t.ctrlKey&&e(t)}),()=>{document.removeEventListener("gesturestart",e),document.removeEventListener("gesturechange",e),document.removeEventListener("dblclick",e),document.removeEventListener("wheel",e)}},[])},fm=typeof window>"u",pm=(e,t)=>{const[n,o]=v.useState(()=>{if(fm)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return v.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&o(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{o(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function us(e,t,n){const[o,s]=v.useState(!1),{threshold:a}=n||{};return v.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(n!=null&&n.delay){i&&clearTimeout(i),i=setTimeout(()=>{s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.delay);return}s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),o}const Nr=({callback:e,onEnterViewportOnce:t,options:n})=>{const o=v.useRef(null);return v.useEffect(()=>{const s=o.current;if(!s)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(s),a.disconnect()))},n);return a.observe(s),()=>{t&&a.unobserve(s),a.disconnect()}},[e,t,n]),{element:o}},Rc=({defaultScale:e=1,maxScale:t=3})=>{const n=v.useRef(null),o=v.useRef(null),[s,a]=v.useState(e),i=v.useRef(0),c=v.useRef({x:0,y:0}),l=v.useRef({x:0,y:0}),u=()=>{if(!o.current||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const p=n.current.getBoundingClientRect(),g=o.current.children[0].getBoundingClientRect(),y=g.width,_=g.height,b=Math.min(0,(p.width-y)/2),S=Math.max(0,(y-p.width)/2),x=Math.min(0,(p.height-_)/2),j=Math.max(0,(_-p.height)/2);return{minX:b,maxX:S,minY:x,maxY:j}},f=(p,g,y)=>{if(o.current){const _=o.current.children[0];_&&requestAnimationFrame(()=>{_.style.transform=`translate(calc(-50% + ${p}px), calc(-50% + ${g}px)) scale(${y})`})}},h=v.useCallback(p=>{const{minX:g,maxX:y,minY:_,maxY:b}=u(),{x:S,y:x}=l.current,j=Math.max(g,Math.min(y,S)),P=Math.max(_,Math.min(b,x));if(p.touches.length>1){const E=p.touches[0],C=p.touches[1],R=E.pageX-C.pageX,T=E.pageY-C.pageY;i.current=Math.sqrt(R*R+T*T),c.current={x:(E.pageX+C.pageX)/2,y:(E.pageY+C.pageY)/2}}else p.touches.length===1&&(c.current={x:p.touches[0].pageX-j,y:p.touches[0].pageY-P})},[s,l]),d=v.useCallback(p=>{if(!o.current||!n.current)return;const{minX:g,maxX:y,minY:_,maxY:b}=u();if(p.touches.length>1){p.preventDefault();const S=p.touches[0],x=p.touches[1],j=S.pageX-x.pageX,P=S.pageY-x.pageY,E=Math.sqrt(j*j+P*P);if(!i.current){i.current=E;return}const C=E/i.current,R=Math.max(1,Math.min(t,s*C));if(s===R)return;a(R);const T=(S.pageX+x.pageX)/2,w=(S.pageY+x.pageY)/2;let N=T-c.current.x,I=w-c.current.y;N=Math.max(g,Math.min(y,N)),I=Math.max(_,Math.min(b,I)),l.current={x:N,y:I},i.current=E,f(N,I,R)}else if(p.touches.length===1){const S=p.touches[0].pageX,x=p.touches[0].pageY;let j=S-c.current.x,P=x-c.current.y;j=Math.max(g,Math.min(y,j)),P=Math.max(_,Math.min(b,P)),l.current={x:j,y:P},f(j,P,s)}},[t,s]);return v.useEffect(()=>(document.addEventListener("touchstart",h),document.addEventListener("touchmove",d,{passive:!1}),()=>{document.removeEventListener("touchstart",h),document.removeEventListener("touchmove",d)}),[d,h]),{containerRef:n,imgRef:o,scale:s}},mm={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},He=Promise.resolve(!1),qo={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>He,addItem:()=>He,addSellerCode:()=>He,addMarketingData:()=>He,emptyCart:()=>{},removeItem:()=>He,setIsOpen:()=>{},shipping:()=>He,shippingUpdate:()=>He,toggleServiceToProduct:()=>He,updateItemQuantity:()=>He,insertProfileEmail:()=>He,setRecentlyAddedProducts:()=>{}},ds=e=>e===0,Ac=(e,t)=>{if(!e||e.length===0)return[];let n="";const o=[],s=e.match(/\d+/g)??[];for(const a of s){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,o.push(n))}return o},Nc=(e,t)=>{const{availability:n,additionalInfo:{brandName:o},bundleItems:s,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:f,listPrice:h,quantity:d,price:p,priceDefinition:g,productCategories:y,productCategoryIds:_,productId:b,refId:S,seller:x,referenceId:j,offerings:P,productRefId:E,skuName:C,sellingPrice:R}=e;return{availability:n,bundleItems:s,referenceId:j,productRefId:E,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:o},categories:Ac(_,y),categoriesIds:_,gtin:S,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:f,isVariationOf:{name:f,productGroupID:b},sku:a,slug:c,skuName:C},listPrice:h,quantity:d,offerings:P,price:p,priceDefinition:g,sellingPrice:R,seller:x}},Ic=(e,t)=>{const n=e.map(o=>({id:o.id,quantity:o.quantity,seller:o.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},Tc=(e,t)=>{const n=e.find(o=>o.id===t);if(n){const o=e.map((s,a)=>{var i,c;return{id:((i=s.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.id)===((c=s.itemOffered)==null?void 0:c.sku)?0:s.quantity,seller:s.seller??""}});return{updateItems:o,filterItems:o.filter(s=>s.id!==t)}}return{updateItems:[],filterItems:[]}},Oc=(e,t,n)=>e.filter(o=>o.availability!=="withoutStock"&&o.availability!=="https://schema.org/OutOfStock").map((o,s)=>{var a,i;return o.id===t?{id:o.id,index:s,quantity:n,seller:o.seller,sku:((a=o.itemOffered)==null?void 0:a.sku)??""}:{id:o.id,index:s,quantity:o.quantity,seller:o.seller,sku:((i=o.itemOffered)==null?void 0:i.sku)??""}}),Ho=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),hm=(e,t)=>{var n;return Array.isArray(e)?(((n=e==null?void 0:e.find(o=>{var s;return((s=o==null?void 0:o.id)==null?void 0:s.toLowerCase())===t}))==null?void 0:n.value)??0)/100:0},gm=e=>{const t=e.reduce((s,a)=>{const i=ds(a.price)?0:a.quantity;return s+i},0),n=e.reduce((s,a)=>s+a.price*a.quantity,0),o=e.reduce((s,a)=>s+a.listPrice*a.quantity,0);return{totalItems:t,total:n,subTotal:o}},ym=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(ds(n==null?void 0:n.price)?0:n.quantity),0):0,kc=(e,t)=>{const{items:n,itemMetadata:o,marketingData:s,messages:a,orderFormId:i,openTextField:c,paymentData:l,shippingData:u,totalizers:f}=e;return{id:i,itemMetadata:o,items:Array.isArray(n)?n.map(h=>Nc(h,t)):[],marketingData:s,messages:a,openTextField:c,paymentData:l,shippingData:u,totalizers:f}},Lc=(e,t)=>{const n=e.find(o=>o.id===t);return n?n.availability==="unavailableItemFulfillment":!1},_m=(e,t)=>{const n=e.sku,o=e.isVariantOf.hasVariant.find(s=>s.sku===n);return o?o.name.split(t)[1]:"--"},jt=(e,t,n=!1)=>!e&&t!==""?{code:300,value:t,statusOk:n}:e===t?{code:200,value:t,statusOk:n}:{code:400,value:t,statusOk:n},vm=(e,t)=>{const n=new Set;return[e,...t].filter(o=>!n.has(o)&&n.add(o),n)},Mc=(e,t)=>t&&Array.isArray(t)&&t.find(o=>o.id===e)?Promise.resolve(e):Promise.resolve(!1),Dc=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),$c=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},zc=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},Fc=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(o=>o.id===n.id)):[],Bc=async(e,t)=>e.then(n=>[...n??[],...t??[]]),Oe=async(e,t,n,o)=>{const{priority:s="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:s,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return n?c:kc(c,o)})},qc=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),Hc=e=>[...Array.isArray(e)?e:[e],"faststore"],Uc=e=>{const t=e.get("utm_source")||pt("utm_source"),n=e.get("utm_campaign")||pt("utm_campaign"),o=e.get("utm_medium")||pt("utm_medium"),s=e.get("utmi_cp")||pt("utmi_cp"),a=e.get("utmi_pc")||pt("utmi_pc"),i=e.get("utmi_p")||pt("utmi_p");return{...t&&{utmSource:t},...o&&{utmMedium:o},...n&&{utmCampaign:n},...s&&{utmiCampaign:s},...a&&{utmiPart:a},...i&&{utmipage:i}}},pt=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),o=n.exec(t);return o?o[2]?decodeURIComponent(o[2].replace(/\+/g," ")):"":null},xm=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:mm,addItemOrder:Ic,addNotification:qc,createItemOrder:Nc,fetchCartAPI:Oe,findItemIndex:Ho,findOptions:Fc,findTotalizerValue:hm,getCategories:Ac,getCode:jt,getQuantity:zc,getRemoveId:Mc,getSize:_m,getTotalItems:ym,getTotalizer:gm,getUrlParameter:pt,getValue:Dc,initialState:qo,isGift:ds,marketingTagsBuilder:Hc,mergeOptionsPromise:Bc,mountMarketingData:Uc,orderFormValues:kc,promiseDefault:He,removeQuantity:Tc,updateItemSellerExternal:Lc,updateOrderFormPromise:$c,updateQuantity:Oc,wishlistArray:vm},Symbol.toStringTag,{value:"Module"})),bm=()=>{const e=async(p,g)=>Oe("/api/checkout/order-form/coupon",{body:{orderFormId:p,coupon:g}}),t=async(p,g)=>{if(g){const y=g.includes(" - ")?g.split(" - ")[0]:g,_=await Oe("/api/checkout/order-form/seller-code",{body:{orderFormId:p,sellerCode:y}},!0);return _ instanceof Object&&"nome"in _&&(_==null?void 0:_.status)===!0?Oe("/api/checkout/order-form/attachments",{body:{orderFormId:p,sellerCode:y,sellerName:_.nome}}).then(S=>({...S,openTextField:{...(S==null?void 0:S.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:y}})}else return Oe("/api/checkout/order-form/attachments",{body:{orderFormId:p,sellerCode:"",sellerName:""}})},n=async(p,g)=>Oe("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:p,marketingData:g}}),o=async(p,g,y)=>Oe("/api/checkout/order-form/items",{body:{orderFormId:p,orderItems:Ic(g,y)}}),s=async(p,g,y,_=!1)=>Oe("/api/checkout/order-form/offerings",{body:{id:g,itemIndex:y,orderFormId:p,remove:_}}),a=async p=>Oe("/api/checkout/order-form/items/remove-all",{body:{orderFormId:p}}),i=async(p,g="low")=>Oe("/api/checkout/order-form",{priority:g,body:{orderFormId:p??""}}),c=async(p,g)=>Oe("/api/checkout/order-form/profile",{body:{orderFormId:p,email:g}}),l=async(p,g,y)=>{const _=Tc(g,y);return Oe("/api/checkout/order-form/items/update",{body:{orderItems:_.updateItems,orderFormId:p}})},u=async(p,g,y)=>Oe("/api/checkout/order-form/shipping",{body:{orderFormId:p,country:y,postalCode:g}}),f=async(p,g,y)=>Oe("/api/checkout/order-form/shipping/update",{body:{orderFormId:p,options:g,selectedAddresses:y}}),h=async(p,g,y,_)=>{const b=Oc(g,y,_);return Oe("/api/checkout/order-form/items/update",{body:{orderFormId:p,orderItems:b}})};return{addCoupon:e,addItem:o,addSellerCode:t,addMarketingData:n,giftItem:s,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:f,updateItemQuantity:async(p,g,y,_,b)=>h(p,g,y,_).then(S=>S&&Array.isArray(S.items)?Lc(S.items,y)?h(p,g,y,b):S:!1)}},Uo="soma::cart",$t="soma::options",Rt=yt.create((e,t)=>{const n=bm(),o=async(s,a,i)=>{e({loading:!0});const c=await $c(s);if(typeof c!="boolean"){e({...c});const l=await Bc(Qe.get($t),i);return Qe.set($t,l),Dc(c,a).finally(()=>e({loading:!1,options:l}))}return He};if(typeof window<"u"){const s=async a=>{if(a){const i=await Qe.get($t).then(u=>Fc(u,a.items));Qe.set(Uo,a),Qe.set($t,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&o(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Qe.get(Uo).then(a=>n.getOrderForm(a?a.id:"").then(s)),{...qo,addCoupon:async a=>o(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{o(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async a=>o(()=>n.addSellerCode(t().id,a),"openTextField"),addMarketingData:async a=>o(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{o(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await o(()=>n.removeItem(t().id,t().items,a),"items");return Mc(a,i)},shipping:async(a,i="BR")=>o(()=>n.shipping(t().id,a??"",i),"shippingData"),shippingUpdate:async a=>o(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>o(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return o(()=>{var f;return n.updateItemQuantity(l,u,a,i,((f=u.find(h=>h.id===a))==null?void 0:f.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>o(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return qo}),jm=()=>Rt(e=>e),Wc=yt.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(o=>qc(o,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(o=>o.id!==t)}))}})),fs=()=>Wc(e=>e.notifications),ps=()=>Wc(e=>e.actions),Cm=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:$t,KEY_INDEXED_STORE:Uo,useCartStore:Rt,useGetCartStoreState:jm,useGetNotificationActions:ps,useGetNotificationsStore:fs},Symbol.toStringTag,{value:"Module"})),Sm=6e3,Gc=v.createContext({}),Vc=({children:e,...t})=>{const{items:n}=Rt(),[o,s]=v.useState([]),a=v.useRef(null),i=v.useMemo(()=>Array.isArray(o)&&o.length>0?o.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,o]);return v.useEffect(()=>{o.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{s([])},Sm))},[o]),r.jsx(Gc.Provider,{value:v.useMemo(()=>({...t,setRecentlyAdded:s,recentlyAddedProducts:i}),[t,s,i]),children:e})},Wt=()=>{const e=v.useContext(Gc);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Kc{constructor(){Xr(this,"events",{});Xr(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(o=>o!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(o=>{this.prevData[t]=n,o(n)})}}const Xc=v.createContext({}),Pm=({children:e,headerConfigs:t,pathname:n,...o})=>{const[s,a]=v.useState(!0),[i,c]=v.useState(!1),l=n==="/",u=v.useRef(new Kc),f=p=>p?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},h=f(l),d=v.useRef(h);return v.useEffect(()=>{var y;const p=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(p.includes("utm_")||p.includes("gclid"))&&(Fo.get("lastMedias")||Fo.set("lastMedias",`${p}`,{expires:1/24}));const g=()=>{const _=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,b=window.innerWidth<1024||!!_.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),s!==b&&(a(b),c(!0))};return i||g(),window.addEventListener("resize",g,{passive:!0}),()=>window.removeEventListener("resize",g)},[s,i]),v.useEffect(()=>{const p=f(l);u.current.publish("header:change_variant",p.headerVariant),u.current.publish("header:change_position",p.position),d.current=p},[l]),r.jsx(Xc.Provider,{value:{isMobile:s,mediatorRef:u,currentHeaderConfigsRef:d,deviceValidated:i,...o},children:r.jsx(Vc,{children:e})})},ce=()=>v.useContext(Xc),Yc=v.createContext({}),wm=({children:e,...t})=>r.jsx(Yc.Provider,{value:{...t},children:e}),_e=()=>v.useContext(Yc),_t=(e,t)=>yt.create(n=>{const o=()=>n({value:e});return t&&t instanceof Set&&t.add(o),{value:e,actions:{setValue:s=>n({value:s}),reset:o}}}),Ht={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Gt=new Set,Em=()=>{Gt.forEach(e=>{e()})},Qc=yt.create((e,t)=>{const n=()=>e({value:Ht.category});return Gt.add(n),{value:Ht.category,actions:{reset:n,setValue:o=>e(()=>({value:o})),updateValue:o=>{t().value!==o&&e({value:o})}}}}),Zc=()=>Qc(e=>e.value),Vt=()=>Qc(e=>e.actions),Jc=_t(Ht.menuMobileIsOpen,Gt),el=()=>Jc(e=>e.value),tl=()=>Jc(e=>e.actions),rl=_t(Ht.searchModalIsOpen,Gt),nl=()=>rl(e=>e.value),ms=()=>rl(e=>e.actions),ol=_t(Ht.userMenuIsOpen,Gt),hs=()=>ol(e=>e.value),gs=()=>ol(e=>e.actions),Rm=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Em,useActionsHeaderCategory:Vt,useActionsMenuMobileIsOpen:tl,useActionsSearchModalIsOpen:ms,useActionsUserMenuIsOpen:gs,useGetHeaderCategoryStore:Zc,useGetMenuMobileIsOpen:el,useGetSearchModalIsOpen:nl,useGetUserMenuIsOpen:hs},Symbol.toStringTag,{value:"Module"})),At={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},It=new Set,Am=()=>{It.forEach(e=>{e()})},sl=yt.create(e=>{const t=()=>e({value:At.selectedSkuInfo});return It.add(t),{value:At.selectedSkuInfo,actions:{setValue:n=>e(o=>({value:{...o,...n}})),reset:t}}}),Kt=()=>sl(e=>e.value),al=()=>sl(e=>e.actions),il=_t(At.openLetMeKnow,It),Nm=()=>il(e=>e.value),Im=()=>il(e=>e.actions),cl=_t(At.showNotify,It),ll=()=>cl(e=>e.value),ys=()=>cl(e=>e.actions),ul=_t(At.showBottomNavigation,It),Tm=()=>ul(e=>e.value),Om=()=>ul(e=>e.actions),dl=_t(At.openMeasurements,It),fl=()=>dl(e=>e.value),pl=()=>dl(e=>e.actions),km=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Am,useActionsPDPOpenLetMeKnow:Im,useActionsPDPOpenMeasurements:pl,useActionsPDPSelectedSkuInfo:al,useActionsPDPShowBottomNavigation:Om,useActionsPDPShowNotify:ys,useGetPDPOpenLetMeKnow:Nm,useGetPDPOpenMeasurements:fl,useGetPDPSelectedSkuInfo:Kt,useGetPDPShowBottomNavigation:Tm,useGetPDPShowNotify:ll},Symbol.toStringTag,{value:"Module"})),ea={feedback:{active:!1,action:"add"},list:[]},_s=yt.create((e,t)=>({value:ea,actions:{reset:()=>e({value:ea}),setValue:o=>e(()=>({value:o})),toggleProduct:o=>e(s=>s.value.list.includes(o)?{value:{feedback:{active:!0,action:"remove"},list:s.value.list.filter(a=>a!==o)}}:{value:{feedback:{active:!0,action:"add"},list:[...s.value.list,o]}}),updateList:o=>e(s=>({value:{...s.value,list:o}})),resetFeedback:()=>e(o=>({value:{...o.value,feedback:{active:!1,action:""}}}))}})),Tt=()=>_s(e=>e.value.list),vs=()=>_s(e=>e.value.feedback),vt=()=>_s(e=>e.actions),Lm=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:vt,useGetWishlistFeedbackStore:vs,useGetWishlistStore:Tt},Symbol.toStringTag,{value:"Module"})),ml=v.createContext({}),Mm=({children:e,headerData:t,...n})=>{var f,h;const o=v.useRef(null),s=v.useRef(null),a=v.useRef(null),i=v.useRef(null),c=v.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=ce();return(f=l.current)==null||f.subscribe("header:change_variant",d=>{var b,S,x;if(d&&u.current&&(u.current.bannerVariant=d),!o.current)return;const g=document.body.scrollTop>0,y=o.current.getAttribute("data-interactiveVariant"),_=g?y:d??((b=u.current)==null?void 0:b.bannerVariant)??"default";_!==((S=u.current)==null?void 0:S.headerVariant)&&(o.current.setAttribute("data-bottomdivider",String(g)),o.current.setAttribute("data-variant",String(_)),(x=l.current)==null||x.publish("herobanner:change_controllers_variant",_),u.current&&(u.current.headerVariant=_))}),(h=l.current)==null||h.subscribe("header:change_position",d=>{o.current&&(o.current.style.position=d)}),v.useEffect(()=>{const d=new AbortController,p=m.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",p,{passive:!0,signal:d.signal});const g=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return o.current&&(o.current.addEventListener("click",g,{signal:d.signal}),o.current.addEventListener("touchend",g,{signal:d.signal})),()=>{d.abort()}},[]),r.jsx(ml.Provider,{value:{headerData:t,structureRef:s,rootRef:o,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Pe=()=>v.useContext(ml),hl=v.createContext({}),gl=({children:e,...t})=>r.jsx(hl.Provider,{value:v.useMemo(()=>t,[t]),children:e}),xs=()=>{const e=v.useContext(hl);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Dm=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},$m=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const o=t.getBoundingClientRect(),s=e.getBoundingClientRect(),a=e!=null&&e.parentElement?Dm(e==null?void 0:e.parentElement):0;return{left:o.left+o.width/2-(s.width+a),top:o.top+o.height+n}},yl=v.createContext({}),_l=({children:e,delay:t=600,gap:n=20,...o})=>{const[s,a]=v.useState(!1),i=v.useRef(null),[c,l]=v.useState(!1),[u,f]=v.useState({left:0,top:0}),h=v.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return v.useEffect(()=>{if(typeof window>"u")return;const d=window.document.querySelector("#cart-button"),p=window.document.querySelector("#add-to-cart--tooltip");if(d&&p){const{left:g,top:y}=$m(p,d,n??0);f({left:g,top:y}),l(!1)}},[n,s]),r.jsx(yl.Provider,{value:v.useMemo(()=>({...o,...u,handleClose:h,isLeaving:c,isOpen:s,setIsOpen:a,setIsLeaving:l}),[o,u,h,c,s,a,l]),children:e})},xt=()=>{const e=v.useContext(yl);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},vl=v.createContext({}),zm=({children:e,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:t,...n})=>{const o=Rt(),{setRecentlyAdded:s}=Wt(),a=v.useRef(""),i=fs(),{addNotification:c,removeNotification:l}=ps(),{addCoupon:u,addItem:f,addSellerCode:h,addMarketingData:d,emptyCart:p,isOpen:g,removeItem:y,shipping:_,shippingUpdate:b,toggleServiceToProduct:S,updateItemQuantity:x}=o;v.useEffect(()=>{const F=Fo.get("lastMedias");if(o.id&&F&&a.current!==F){a.current=F;const G=new URLSearchParams(F),V=Uc(G);d(V)}},[o,d]);const j=v.useCallback(async(F,G)=>(G==="coupon"?u(F):h(F)).then(B=>{if(typeof B!="boolean"&&B instanceof Object){if(G==="seller"&&"value"in B){const{statusOk:J,value:A}=B,O=String(A??"").split(" - ");return jt((O==null?void 0:O[0])??"",F,!!J)}return jt(String(B.coupon),F,!0)}return jt("","")}).catch(()=>Promise.resolve({code:400})),[u,h]),P=v.useCallback((F,G,V)=>{const{id:B}=F;x(B,G,V)},[x]),E=v.useCallback((F,G,V=!1)=>{if(!F)return;const{id:B}=F,J=Ho(o.items,B);if(J!==-1&&!V){const A=Number(o.items[J].quantity),O=o.items[J]?A+1:1;P(F,O,G)}else f({id:B,quantity:(F==null?void 0:F.quantity)??1,seller:F.seller});g||s(A=>[...A,F])},[f,P,o.items,g,s]),C=v.useCallback((F,G)=>{if(!F||!Array.isArray(F))return;s(B=>[...B,...F]);const V=F.map(B=>{const{id:J,quantity:A,seller:O}=B,D=Ho(o.items,J),X=zc(A??1,D);return{id:J,quantity:X,seller:O}});f(V,G)},[f,o.items,s]),R=v.useCallback(async(F,G,V)=>F?y(F).then(()=>(c(G??`${t}`,V),jt(F,F))):Promise.resolve(jt("","Product id required")),[c,y]),T=v.useCallback(()=>{o.items.length>0&&p()},[p,o.items]),w=v.useCallback((F,G="BRA")=>_(F,G),[_]),N=v.useCallback(F=>{F&&b(F)},[b]),I=v.useCallback(async(F,G,V)=>{const B=o.items.findIndex(A=>A.id===F);return o.items[B]&&B>=0?S(G,B,V??!1):!1},[o.items,S]),z=v.useCallback(async(F,G)=>x(F,G).then(V=>{if(Array.isArray(V)){const B=V.find(J=>J.id===F);if(B&&(B==null?void 0:B.quantity)<G)return String(B.quantity)}return!1}),[x]),k=v.useCallback(async()=>{await d({...o.marketingData,coupon:""})},[d,o.marketingData]),W=v.useCallback(async()=>{await d({...o.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[d,o.marketingData]),q=v.useCallback(async()=>{await _("","BRA")},[_]);return r.jsx(vl.Provider,{value:v.useMemo(()=>({...n,addCouponSeller:j,addToCart:E,addItemsToCart:C,cartStore:o,notifications:i,clearCart:T,addNotification:c,isOpen:o.isOpen,removeNotification:l,removeToCart:R,setIsOpen:o.setIsOpen,shipping:w,shippingUpdateOption:N,toggleGiftItemCart:I,updateItemQuantity:z,removeCoupon:k,removeSellerCode:W,removeCEP:q}),[n,j,E,C,i,T,c,o,l,R,w,N,I,z,k,W,q]),children:e})},Ee=()=>{const e=v.useContext(vl);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},xl=v.createContext({}),bs=({children:e,fetch:t})=>{const n=v.useRef(!0),[o,s]=v.useState(null),[a,i]=v.useState(!1);return v.useEffect(()=>{(async()=>{n.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();s(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(xl.Provider,{value:v.useMemo(()=>({data:o,isLoading:n.current??!1,isError:a}),[o,a,n]),children:e})},js=()=>{const e=v.useContext(xl);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},bl=v.createContext({}),Cs=({children:e,sort:t,state:n,count:o,collectionId:s,brand:a,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=v.useMemo(()=>{var u;return s?[{key:"productclusterids",value:s.toString()}]:a?[{key:"brand",value:a}]:(u=n.base)!=null&&u.length?n.base.slice(1).split("/").map((f,h)=>({key:`category-${h+1}`,value:f})):[]},[n.base,s]);return r.jsx(bl.Provider,{value:v.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:o??c,searchParams:i}),[l,o,t,n,i]),children:e})},ze=()=>{const e=v.useContext(bl);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},jl=v.createContext({}),Fm=({children:e,...t})=>r.jsx(jl.Provider,{value:t,children:e}),Me=()=>{const e=v.useContext(jl);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Cl=v.createContext({}),Bm=({children:e,selectedFacets:t})=>{const{data:n,...o}=js(),{router:s}=_e(),{searchParams:a,PLP_SORT_DEFAULT:i}=Me(),c=v.useCallback((d,p)=>{if(p){if(d.key.toLocaleLowerCase()==="price"){const g=p.getAll("facets");p.delete("facets"),g.forEach(y=>{const[_]=y.split("/");_!==d.key&&p.append("facets",y)})}p.set("page","1"),p.append("facets",`${d.key}/${d.value}`),s.push(`?${p.toString()}`)}},[s]),l=v.useCallback(()=>{const d=new URLSearchParams;d.set("sort",i),d.set("page","1"),s.push(`?${d.toString()}`)},[s]),u=v.useCallback((d,p)=>{if(!p||!p.has&&!p.has("facets"))return;const g=p.getAll("facets");p.delete("facets"),p.set("page","1"),g.forEach(y=>{const[_,b]=y.split("/");(_!==d.key||b!==d.value)&&p.append("facets",y)}),s.push(`?${p.toString()}`)},[s]),f=v.useCallback(d=>{const p=a?new URLSearchParams(a):new URLSearchParams;for(const[,g]of p.entries()){const[y,_]=g.split("/");if(y===d.key&&_===d.value)return u(d,p)}return c(d,p)},[c,u,a]),h=v.useCallback(d=>{const p=a?new URLSearchParams(a):new URLSearchParams;p.set("sort",d.replace("_",":")),s.push(`?${p.toString()}`)},[s,a]);return r.jsx(Cl.Provider,{value:v.useMemo(()=>({...o,breadcrumb:n&&"breadcrumb"in n?n==null?void 0:n.breadcrumb:[],deleteAllFacets:l,facets:n&&"facets"in n?n==null?void 0:n.facets:[],selectedFacets:t,onToggleFacet:f,onSort:h,searchParams:a}),[n,l,h,f,o,t,a]),children:e})},Sl=({children:e,forceUpdate:t})=>{const{state:n}=ze();return r.jsx(bs,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...n,forceUpdate:t}),priority:"low"}),children:r.jsx(Bm,{selectedFacets:(n==null?void 0:n.facets)??[],children:e})})},Pl=()=>{const e=v.useContext(Cl);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Mt={placeholder:"Ordernar por",options:{score_desc:"Mais Relevantes",orders_desc:"Mais Vendidos",price_desc:"Maior Preço",price_asc:"Menor Preço",release_desc:"Novidades",discount_desc:"Maior Desconto",name_asc:"De A a Z"}},qm={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Hm="Imagem do produto",ta=1,Um="Sair",Wm=e=>e.exit,ra=({ICONS:e,storeConfig:t})=>[{icon:e.person,label:"Minha conta",href:`${t.secureSubdomain}/api/io/account#/profile`,needToBeAuth:!1,deviceShown:"both"},{icon:e.delivery_truck,label:"Meus pedidos",href:`${t.secureSubdomain}/api/io/account#/orders`,needToBeAuth:!1,deviceShown:"both"},{icon:e.favorite_false,label:t.wishlistConfig.label,href:t.wishlistConfig.path,needToBeAuth:!1,deviceShown:"mobile"},{icon:e.help,label:t.termsConfig.label,href:t.termsConfig.path,needToBeAuth:!1,deviceShown:"mobile"}],Gm=(e,t)=>{const n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},Vm=e=>"Seja bem vindo!",Km="Marque a caixa para aceitar os termos de política de privacidade.",Xm="Algumas informações estão incorretas ou não foram preenchidas",Ym="Enviar",wl=v.createContext({}),Qm=({children:e})=>{const{data:t,...n}=js(),[o,s]=v.useState(0),{sendDataLayerEvent:a}=le();return v.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&s(i)}},[t,a,s]),r.jsx(wl.Provider,{value:v.useMemo(()=>({...n,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:qm,total:o}),[t,n,o]),children:e})},Ss=({children:e,query:t,forceUpdate:n})=>{const{count:o,state:s}=ze(),a={...s,count:o};return r.jsx(bs,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:n,facets:s.facets??[]})}),children:r.jsx(Qm,{children:e})})},Xt=()=>{const e=v.useContext(wl);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},El=v.createContext({}),Zm=({children:e,term:t})=>{const[n,o]=v.useState([]),[s,a]=v.useState(!1);return v.useEffect(()=>{if(!t){o([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();o((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),r.jsx(El.Provider,{value:v.useMemo(()=>({suggestedTerms:n,loading:s,setLoading:a}),[n,s]),children:e})},Jm=({children:e,...t})=>r.jsx(Zm,{...t,children:e}),eh=()=>{const e=v.useContext(El);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Rl=v.createContext({searches:[],isLoading:!1,error:null}),th=({children:e})=>{const[t,n]=v.useState([]),[o,s]=v.useState(!0),[a,i]=v.useState(null);return v.useEffect(()=>{(async()=>{try{s(!0);const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const u=await l.json();n(u.data.searches||[])}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{s(!1)}})()},[]),r.jsx(Rl.Provider,{value:v.useMemo(()=>({searches:t,isLoading:o,error:a}),[t,o,a]),children:e})},rh=()=>{const e=v.useContext(Rl);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},Al=v.createContext({}),nh=({children:e,slug:t,searchParams:n,collectionId:o,brand:s,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=_e(),l=v.useRef(""),[u,f]=v.useState(!1),h=v.useMemo(()=>{const p=new URL(c,"http://localhost"),g=(n==null?void 0:n.getAll("facets"))??[],y=(n==null?void 0:n.get("page"))??"1",_=(n==null?void 0:n.get("sort"))??(o?"":i);return p.searchParams.set("page",String(y)),p.searchParams.set("sort",String(_)),n!=null&&n.get("query")?(p.searchParams.set("query",n.get("query")),p):(p.searchParams.set("base",Array.isArray(t)?t.join("/"):t),p.searchParams.set("facets",g.join(",")),p)},[o,c,n,t]),d=v.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return U.parseSearchState(h,n.getAll("facets")??[""]);const p=(n==null?void 0:n.getAll("facets"))??[];return U.parseSearchState(h,p)},[h,n]);return v.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(Al.Provider,{value:v.useMemo(()=>({openFilters:u,setOpenFilters:f}),[u,f]),children:r.jsx(Cs,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:v.useMemo(()=>({...d}),[d]),collectionId:o,brand:s,children:e})})},Ps=()=>{const e=v.useContext(Al);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Sr=(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((s,a)=>Sr(s,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),o=Object.keys(t);return n.length!==o.length?!1:n.every(s=>Object.prototype.hasOwnProperty.call(t,s)&&Sr(e[s],t[s]))},Nl=(e,t,n="page")=>Object.keys(t).some(o=>o===n?!1:!Sr(t[o],e[o])),Wo=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const n=await t.json();return n==null?void 0:n.data},Il=()=>({node:{sku:"",gtin:"",name:"...",description:"",releaseDate:"",slug:"",video:null,categories:[],categoryId:"",categoriesIds:[],id:"skeleton",brand:{name:""},seo:{title:"",description:"",canonical:""},cluster:{generals:[],highlights:[]},availability:{status:!0},breadcrumbList:{itemListElement:[]},image:[{alternateName:"1",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",keywords:"1"},{alternateName:"10",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottgAAAABJRU5ErkJggg==",keywords:"10"}],offers:{lowPrice:1,highPrice:0,offers:[{availability:"true",listPrice:0,price:0,priceValidUntil:"",priceCurrency:"BRL",itemCondition:"",quantity:1,seller:{identifier:"1"}}],priceCurrency:"BRL"},isVariantOf:{productGroupID:"",hasVariant:[{additionalProperty:[{name:"Tamanho",value:"...",valueReference:"SPECIFICATION",propertyID:""}],name:"...",offers:{offers:[{availability:"https://schema.org/InStock",listPrice:0,price:0,quantity:1,seller:{identifier:"1"}}]},sku:"1",slug:"1",productId:"1"}],name:"",additionalProperty:[],skuVariants:null},installments:{count:2,value:1}}}),Tl=(e,t,n,o=24)=>{const s=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:s,placedBanners:a};const i=t*o*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const f=l%n;if(f+c.columns>n){l+=n-f;continue}if(!Array.from({length:c.columns}).some((p,g)=>s.has(l+g))){for(let p=0;p<c.columns;p++)s.add(l+p);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:s,placedBanners:a}},Go=(e,t,n,o=24)=>{const{placedBanners:s,taken:a}=Tl(e??[],t,n),i=[];let c=0;try{for(;i.length<t*o;)a.has(c)||i.push(c),c++;return{banners:s,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},br=(e,t,n=24)=>Array.from({length:e},(o,s)=>{const a=s+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:ws(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>Il())}}),Ol=(e,t)=>[...e,{loading:!1,page:t,pagination:ws(),products:[]}],ws=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),oh=(e,t,n,o,s)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??s,c=(e.length-1)*s+i-1,l=n[c];return t.filter((u,f)=>{const h=o[f];return h<=l||s>i&&h>l})},kl=(e,t)=>{const n=new Map;for(const s of e){const a=Math.floor(s/t);n.has(a)||n.set(a,[]),n.get(a).push(s)}const o=[];for(const[,s]of n){const a=s[Math.floor(Math.random()*s.length)];o.push(a)}return o},Ll=(e,t)=>{if(!e)return[];const n=e.map((o,s)=>o.video&&o.video!==""?s:null).filter(o=>o);return kl(n,t)},Ml=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],sh=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Ml,createPage:Ol,createPages:br,createPagination:ws,createProduct:Il,deepEqual:Sr,fetchPage:Wo,getBanners:Tl,getPositions:Go,getProductsWithVideo:Ll,getRandomVideoPerRow:kl,getVisibleBanners:oh,hasStateChangedExceptPage:Nl},Symbol.toStringTag,{value:"Module"})),ah=50,ih=yt.create((e,t)=>{const n=i=>Math.min(i,ah),o=async(i,c)=>{const l=n(i.page);try{const u=await Wo({...i,page:l});s(l,f=>c?c(f,u):{...f,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),s(l,f=>({...f,loading:!1}))}},s=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c)=>{await o(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u)=>{var h,d,p;const f=n(Number(i==null?void 0:i.page));e({...c,pages:br(f,void 0,u)});try{const g=await Wo({...i,page:f});if(g){if(!g.products.length&&((h=g==null?void 0:g.pagination)==null?void 0:h.total)<f){a({...i,page:(d=g==null?void 0:g.pagination)==null?void 0:d.total},l),e({pages:br((p=g==null?void 0:g.pagination)==null?void 0:p.total)});return}typeof l=="function"&&l(g),e({load:!0,pages:br(f,g),total:Number(g.pagination.count)})}}catch(g){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${f} ${g}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),f=n(i==null?void 0:i.page);u.some(h=>h.page===f)||(e({...c,pages:Ol(u,f)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===n(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),ch=(e,t,n,o=0)=>{if(!e.length)return[];let s=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var f;return(f=u.node)==null?void 0:f.video});for(let u=0;u<c.length;u++){const f=i+u,h=o+f,d=t.find(g=>g.position_grid===h+1),p=h+s+1;d&&(s+=d.columns),a.push({position:p,canPlayVideo:u===l})}}return a},Dl=(e,t,n)=>{const o=(t-1)*n,s=t*n;return e>=o&&e<=s},Ir=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:U.disableSKU(n),size:U.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},lh=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:ch,getSkusNotify:Ir,isPositionInCurrentPage:Dl},Symbol.toStringTag,{value:"Module"})),$l=({isMobile:e,ICONS:t,NOTIFY_INFO:n})=>r.jsxs(r.Fragment,{children:[r.jsx(m.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&r.jsxs(r.Fragment,{children:[r.jsx(m.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(m.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),r.jsx(m.Modal.Title,{navigation:e?"top":"middle",title:n.title})]});$l.displayName="Notify.Controls";const Ke={"notify--header-modifier":"_notify--header-modifier_xlomp_1","notify--container":"_notify--container_xlomp_4","notify--form":"_notify--form_xlomp_20","notify--status":"_notify--status_xlomp_36","notify--status--success":"_notify--status--success_xlomp_50","notify--status--error":"_notify--status--error_xlomp_50","notify--modal--body":"_notify--modal--body_xlomp_99","notify--loading":"_notify--loading_xlomp_102","notify--selector":"_notify--selector_xlomp_122","notify--selector--header":"_notify--selector--header_xlomp_138","modal-modifier":"_modal-modifier_xlomp_168"};function zl(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const o of n){const[s,a]=o.trim().split("=");if(s===e)return a}}function Es(e,t,n={}){const s={...{path:"/",expires:new Date(Date.now()+36e5)},...n};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in s)s[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${s[i].toUTCString()}`:typeof s[i]=="boolean"?a+=`; ${s[i]?"true":"false"}`:a+=`=${s[i]}`);window.document.cookie=a}const uh=()=>{const{sendDataLayerEvent:e}=le(),{user:t}=Ot(),{cartStore:n}=Ee();return v.useEffect(()=>{if(!t)return;(async()=>{const{userId:s,email:a,firstName:i,lastName:c,phone:l,homePhone:u,postalCode:f,street:h,number:d,city:p,gender:g}=t,y=new TextEncoder().encode(s),_=await crypto.subtle.digest("SHA-256",y),S=Array.from(new Uint8Array(_)).map(x=>x.toString(16).padStart(2,"0")).join("");e({functionKey:"readyEvents",data:{readyData:{user_id:S,email:a,first_name:i,last_name:c,phone:l||u,zip:f,street:h,street_number:d,city:p,gender:g,orderform_id:n==null?void 0:n.id}}})})()},[t,n.id]),null},Fl=v.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),dh=({children:e,AUTH_TOKEN_COOKIE:t})=>{const[n,o]=v.useState({amount:null,boxes:null,toExpire:null,loading:!0}),s=v.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(c=>c.json()).then(c=>{const{userCredits:l,...u}=c,{wishlist:f,...h}=u;o({amount:l==null?void 0:l.amount,boxes:l==null?void 0:l.boxes,toExpire:l==null?void 0:l.toExpire,user:h,loading:!1,wishlist:(typeof f=="string"?f.split(","):f)??[]})})}catch(c){console.error("my credits request",c),o({...n,loading:!1})}},[o]),a=v.useCallback(()=>{Es(t),s()},[s]),i=v.useCallback(()=>n.boxes?n.boxes.reduce((c,l)=>l.gift_card_box.refid==="C1643"?(c.cashback+=l.amount,c):(c.credits+=l.amount,c),{cashback:0,credits:0}):{cashback:0,credits:0},[n]);return v.useEffect(()=>{s()},[s]),r.jsxs(Fl.Provider,{value:v.useMemo(()=>({...n,getCurrentCredits:i,logout:a}),[n,i,a]),children:[r.jsx(uh,{}),e]})},Ot=()=>{const e=v.useContext(Fl);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Bl=({color:e,delay:t=3e3,sku:n,setStatus:o,setIsLoading:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=v.useRef(null),[l,u]=v.useState(null),{sendDataLayerEvent:f}=le(),{user:h}=Ot(),d=h!=null&&h.firstName?`${h==null?void 0:h.firstName} ${h==null?void 0:h.lastName}`:"";return r.jsx("div",{className:Ke["notify--form"],children:r.jsxs("form",{action:"POST",onSubmit:async p=>{var _;p.preventDefault();const g=p.currentTarget,y=((_=g.querySelector("input"))==null?void 0:_.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:d,email:y,sku:n==null?void 0:n.skuID})}).then(b=>o(b.ok)).finally(()=>{s(!1),g.reset(),f({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:n==null?void 0:n.size,item_id:n==null?void 0:n.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var b;(b=document.body)==null||b.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),o(null)},t)})},children:[r.jsx(m.TextField.Structure,{input:r.jsx(m.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:p=>u(!p.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?r.jsx(m.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):r.jsx(r.Fragment,{})}),r.jsx(m.Button,{disabled:!(l===!1||!n)||!n,type:"submit",size:"large",children:i.button})]})})};Bl.displayName="Notify.Form";const ql=({isLoading:e=!1})=>r.jsx("div",{className:Ke["notify--loading"],"data-loading":e,children:r.jsx(m.Spinner,{})});ql.displayName="Notify.Loading";const Rs={"product-variation-list--list":"_product-variation-list--list_e0he8_1","product-variation-list--title":"_product-variation-list--title_e0he8_10","product-variation-list":"_product-variation-list_e0he8_1"},Hl=({children:e,...t})=>r.jsx("div",{...t,className:Rs["product-variation-list--list"],children:e});Hl.displayName="ProductVariationList.List";const Ul=({fill:e="#1352C7",src:t="",type:n="size",text:o,...s})=>{const{nextimage:a}=_e();return n==="size"?r.jsxs(m.ToggleSize.Wrapper,{...s,size:"large",variation:"ghost",children:[r.jsx(m.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(m.ToggleSize.Text,{children:o})]}):r.jsxs(m.ToggleStyle.Wrapper,{...s,size:"small",title:"wrapper-texture",children:[r.jsx(m.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),n==="color"?r.jsx(m.ToggleStyle.Color,{background:e,title:"color"}):r.jsx(m.ToggleStyle.Texture,{title:"texture",children:r.jsx(a,{alt:o??"image",height:40,src:t,width:40})})]})};Ul.displayName="ProductVariationList.Option";const Wl=({children:e,...t})=>r.jsx("div",{className:Rs["product-variation-list"],...t,children:e});Wl.displayName="ProductVariationList.Root";const Gl=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:Rs["product-variation-list--title"],children:[t?r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.SectionWrapper,{children:r.jsx("p",{children:t})})}):r.jsx(r.Fragment,{}),e]});Gl.displayName="ProductVariationList.Title";const Ye={List:Hl,Option:Ul,Title:Gl,Root:Wl},fh=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(o=>e[o]===t[o])},Vl=({children:e,label:t="",skus:n,sku:o,setSku:s})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ke["notify--selector--header"],children:e}),r.jsxs(Ye.Root,{className:Ke["notify--selector"],children:[r.jsx(Ye.Title,{title:t}),r.jsx(Ye.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=fh(o,a);return r.jsx(Ye.Option,{active:c,onClick:()=>s(c?null:a),text:String(a.size),type:"size"},i)})})]})]});Vl.displayName="Notify.Selector";const na=({type:e,icon:t,title:n,subtitle:o})=>r.jsx("div",{className:Ke[`notify--status--${e}`],children:r.jsx(m.TextStructure.Root,{adornment:{start:r.jsx(m.Icon,{name:t,size:"large"})},children:r.jsxs(m.TextStructure.DivWrapper,{children:[r.jsx("h2",{children:n}),r.jsx("h3",{children:o})]})})}),Kl=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:Ke["notify--status"],"data-status":e,children:[r.jsx(na,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(na,{...n.error,icon:t.alert_circle,type:"error"})]});Kl.displayName="Notify.Status";const As=({color:e,open:t,setVisible:n,skus:o,sku:s,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:f})=>{const[h,d]=v.useState(!1),[p,g]=v.useState(null),{isMobile:y}=ce();return r.jsxs(m.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:n,variant:y?"sideBottom":"sideLeft",style:{zIndex:f.modal},className:Ke["modal-modifier"],children:[r.jsx(m.Modal.Header,{navigation:"top",className:Ke["notify--header-modifier"],children:r.jsx($l,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(m.Modal.Body,{className:Ke["notify--modal--body"],children:[r.jsxs("div",{className:Ke["notify--container"],children:[r.jsxs(Vl,{label:l.selector_label,sku:s,skus:o,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx(Bl,{delay:4e3,sku:s,setStatus:g,setIsLoading:d,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(ql,{isLoading:h}),r.jsx("div",{className:Ke["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(Kl,{status:p,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};As.displayName="Notify";const Tr=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:s,Z_INDEX_WAR:a,...i})=>{const c=Ir(e??[]);return r.jsx(As,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:s,Z_INDEX_WAR:a,...i})};Tr.displayName="PDC.Notification";const Xl=v.createContext({}),Yl=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:o,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Me(),{router:u}=_e(),{sendDataLayerEvent:f}=le(),{isMobile:h}=ce(),{state:d}=ze(),{addPage:p,createPages:g,updateProducts:y,..._}=ih(),b=h?8:16,S=h?2:4,x=v.useRef(!1),j=v.useRef(d),[P,E]=v.useState(!1),[C,R]=v.useState(null),[T,w]=v.useState([]),N=v.useCallback(q=>{q&&"pagination"in q&&f({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:q.products}}})},[f]),I=v.useCallback(q=>{if(q.pagination.nextPage===!0){const F=q.page+1,G=Go(e,F,S,o);p({...d,page:F},G,N)}},[p,e,N,S,o,d]),z=v.useCallback(q=>{q.loading===!1&&y({...d,page:q.page},N)},[N,y,d]),k=v.useCallback(q=>{const F=new URLSearchParams(n);q.page!==Number(F.get("page")??1)&&(F.set("page",String(q.page)),u.replace(`?${F.toString()}`,{scroll:!1}))},[u,n]),W=v.useCallback((q,F)=>{const G=F?Ir([F]):null;w(q),R(G!=null&&G.length?G[0]:null),E(!0)},[]);return v.useEffect(()=>{const q=!x.current,F=Nl(j.current,d),G=Go(e,d.page,S);q?g(d,G,N,o):F&&(g(d,G,N,o),j.current=d),x.current=!0},[e,g,N,S,o,d]),r.jsxs(Xl.Provider,{value:v.useMemo(()=>({..._,addPage:p,addNewPage:I,createPages:g,gap:b,columns:S,handleNotify:W,updatePage:z,updateProducts:y,updateParamPage:k}),[p,I,g,W,b,S,_,z,y,k]),children:[t,r.jsx(Tr,{open:P,sku:C,skus:T,setSku:R,setVisible:E,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},st=()=>{const e=v.useContext(Xl);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},Ql=v.createContext({gridBanners:void 0,banners:[]}),ph=({children:e,data:t,device:n,SectionZone:o,COMMON_PAGE_COLUMN_GAP_PDC:s})=>{const{isMobile:a}=ce(),i=(t==null?void 0:t.sections.filter(h=>h.name!=="List Product Banners"))??[],c=i.slice(0,ta),l=i.slice(ta,i.length),u=t==null?void 0:t.sections.find(h=>h.name==="List Product Banners"),f=v.useMemo(()=>{var h,d;return((d=(h=u==null?void 0:u.data)==null?void 0:h.banners)==null?void 0:d.map(p=>({...p.banner,columns:p.bannerWidth,position_grid:p.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(Ql.Provider,{value:{gridBanners:u,banners:f},children:[r.jsx(o,{data:c??[]}),r.jsxs(m.Utils.Column,{gap:s,className:m.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(o,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},Or=()=>{const e=v.useContext(Ql);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},Zl=v.createContext({}),Jl=({children:e,filters:t,PLP_FILTERS:n,...o})=>{var a;const s=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(Zl.Provider,{value:v.useMemo(()=>({...o,filters:{...t,facets:s}}),[t,s,o]),children:e})},kt=()=>{const e=v.useContext(Zl);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},eu=v.createContext({product:void 0}),mh=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:o,SectionZone:s})=>r.jsxs(eu.Provider,{value:{productId:n},children:[e,r.jsx(m.Utils.Column,{gap:o,className:m.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(s,{data:(t==null?void 0:t.sections)??[]})})]}),tu=()=>{const e=v.useContext(eu);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},hh=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function gh(e,t=1e3){let n=!1;return(...o)=>{n||(e(...o),n=!0,setTimeout(()=>{n=!1},t))}}function yh(e,t=1e3){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}const ru=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,zt=(e,t)=>Math.floor(t==="days"?e/(1e3*60*60*24):t==="hours"?e%(1e3*60*60*24)/(1e3*60*60):t==="minutes"?e%(1e3*60*60)/(1e3*60):e%(1e3*60)/1e3),_h=e=>{const t=em.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},vh=["name","email","phone","date","cpf","cep"],oa={email:/\S+@\S+\.\S+/,name:new RegExp("^\\p{L}+( \\p{L}+)*$","u"),phone:/^\d{10,11}|\(\d{2}\)\s?\d{4,5}-\d{4}$/,date:/^\d{6,8}|^\d{2}\/\d{2}\/\d{2,4}$/,cep:/^\d{5}[-]?\d{3}$/,cpf:/^\d{11}|\d{3}\.\d{3}\.?\d{3,5}\-[\d]{2}$/},nu=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!oa[e])return!0;const o=t.trim();return oa[e].test(o)},xh=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):Hm},bh=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:vh,debounce:yh,getAltTextFromUrl:xh,getAuthenticatedUser:_h,getCookie:zl,getDaysHoursMinutesSeconds:zt,getMilliSeconds:ru,removeAccentsAndReplaceSpaces:hh,setCookie:Es,throttle:gh,validateInput:nu},Symbol.toStringTag,{value:"Module"})),jh=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((o,s)=>(t[s.master_data_field]="none",{...o,[s.master_data_field]:s}),{}))??{},mountedInputsStatus:t}},Ch=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:o,checkboxRef:s,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return o&&!s.current&&(a("unchecked"),i=!0),e.forEach((u,f)=>{var p;if(f==="terms-and-conditions")return;const h=(p=t[f])==null?void 0:p.required;if(h&&!u){l[f]="required",i=!0;return}nu({type:t[f].type,input:u,required:h})||(l[f]="error",c=!0),typeof u=="string"&&e.set(f,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},ou=v.createContext({}),su=({children:e,masterDataEmailField:t,fields:n,variant:o,CONSTANTS:{MASTER_DATA_ENTITY:s,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=le(),c=o==="vertical"&&a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=v.useMemo(()=>jh({fields:n}),[n]),f=v.useRef(!1),[h,d]=v.useState("idle"),[p,g]=v.useState(u),y=async({searchFields:E,entity:C})=>{const R=await mt.post("/api/master-data/search",{body:{masterDataEntity:C,searchFields:E,headers:{"REST-Range":"resources=0-49"}}});return console.info(R),R.data},_=async({id:E,fieldsToBeUpdated:C,entity:R})=>(await mt.post("/api/master-data/update",{dataEntityName:R,id:E,fieldsToBeUpdated:C})).status,b=v.useCallback(async({payload:E,response:C},R,T)=>{const{email:w,...N}=E,[I]=await y({searchFields:{[R]:w},entity:T??s.newsletter});return I&&await _({id:I.id,fieldsToBeUpdated:N,entity:T??s.newsletter})!==204?{...C,status:"error"}:{...C,status:"success"}},[]),S=v.useCallback(async({formData:E},C,R)=>{const T={status:"idle",inputsStatus:{}},w={};E.forEach((N,I)=>{w[I]=N});try{const I=(await mt.post("/api/master-data",{body:{payload:w,masterDataEntity:C??s.newsletter}})).data;return(I==null?void 0:I.Message)==="duplicated entry"?b({payload:w,response:T},R,C):I!=null&&I.Id?{...T,status:"success"}:{...T,status:"error"}}catch(N){return console.error("error",N),{...T,status:"error"}}},[b]),x=v.useCallback(async(E,C,R)=>{E.preventDefault();const T=new FormData(E.target);C&&Object.keys(C).forEach(N=>{T.append(N,C[N])});const w=await S({formData:T},R??"",t);w&&(d(w==null?void 0:w.status),g(w.inputsStatus),w.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,S,d,g,i]),j=v.useCallback(E=>{const C=new FormData(E.currentTarget.parentElement),{hasEmptyFields:R,hasErrors:T,inputStatusToUpdate:w}=Ch({formData:C,mountedFields:l,inputsStatus:p,hasTermsAndConditions:c,checkboxRef:f,setFormStatus:d});if(g(w),R||T){E.preventDefault();return}d("loading")},[l,p,c,f]),P=v.useCallback(()=>{d("idle"),g(u)},[u]);return r.jsx(ou.Provider,{value:v.useMemo(()=>({formStatus:h,handleSubmit:x,setFormStatus:d,inputsStatus:p,setInputsStatus:g,hasTermsAndConditions:c,handleClickToSubmit:j,checkboxRef:f,masterDataEmailField:t,fields:n,variant:o,resetNewsletter:P}),[h,x,d,p,g,j,c,f,t,n,o,P]),children:e})},Ns=()=>{const e=v.useContext(ou);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},au={contexts:{addToCart:{hook:xt,provider:_l},cart:{hook:Ee,provider:zm},cms:{FlagsAndTags:{context:ls,hook:ot,provider:tm}},newsletter:{hook:Ns,provider:su},events:{hook:le,provider:lm},global:{hook:ce,provider:Pm,mediator:Kc},header:{hook:Pe,provider:Mm},menuMobile:{hook:xs,provider:gl},next:{hook:_e,provider:wm},pdp:{provider:rm},PDPContent:{provider:mh,hook:tu},plp:{provider:nh,hook:Ps},plpFilter:{hook:kt,provider:Jl},PLPContent:{provider:ph,hook:Or},plpInfinite:{provider:Yl,hook:st},pdpdata:{provider:um},searchFacets:{hook:Pl,provider:Sl},searchProducts:{hook:Xt,provider:Ss},searchRoot:{hook:js,provider:bs},searchSearch:{hook:ze,provider:Cs},searchSuggestedTerms:{hook:eh,provider:Jm},searchTopSearchs:{hook:rh,provider:th},session:{hook:Ot,provider:dh},ui:{hook:Wt,provider:Vc}},hooks:{useBackPDC:yc,useClipboard:dm,useDisableZoom:Ec,useLocalStorage:pm,useOnScreen:us,useSentinel:Nr,useTouchZoomPan:Rc},stores:{cart:Cm,header:Rm,pdp:km,wishlist:Lm}},Sh={cart:xm,events:cm,plp:sh,product:U.productHelpers,utils:bh},Is={helpers:Sh},qe={"add-to-cart--card":"_add-to-cart--card_4v41y_1","add-to-cart--card--content":"_add-to-cart--card--content_4v41y_7","add-to-cart--card--name":"_add-to-cart--card--name_4v41y_16","add-to-cart--card--price-quantity":"_add-to-cart--card--price-quantity_4v41y_46","add-to-cart--card--style-size":"_add-to-cart--card--style-size_4v41y_53","add-to-cart--content":"_add-to-cart--content_4v41y_71","add-to-cart--content--title":"_add-to-cart--content--title_4v41y_78","add-to-cart--footer":"_add-to-cart--footer_4v41y_102","add-to-cart--footer--total":"_add-to-cart--footer--total_4v41y_108","add-to-cart--items":"_add-to-cart--items_4v41y_148","add-to-cart--tooltip":"_add-to-cart--tooltip_4v41y_198","add-to-cart__modal":"_add-to-cart__modal_4v41y_211"},iu=({brand:e,className:t,name:n,...o})=>r.jsxs("div",{...o,className:m.helpers.classNameConcat(qe["add-to-cart--card--name"],t),children:[r.jsx(m.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:r.jsx("p",{className:"typography-style-body-md",children:n})})})]});iu.displayName="AddToCart.Card.Name";const cu=({className:e,listPrice:t,price:n,quantity:o,productId:s,...a})=>{const i=U.formatPriceToCurrency(n/100),c=U.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:m.helpers.classNameConcat(qe["add-to-cart--card--price-quantity"],e),children:r.jsx(m.ProductInfo.Root,{size:"small",layout:"vertical",children:r.jsx(m.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:r.jsx(m.ProductInfo.ValuesWrapper,{children:n!==t?r.jsxs(r.Fragment,{children:[r.jsx(m.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),r.jsx(m.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):r.jsx(m.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};cu.displayName="AddToCart.Card.PriceQuantity";const Ph="_skeleton_12b79_1",wh={skeleton:Ph},lu=({style:e})=>r.jsx("div",{style:e,className:wh.skeleton}),Eh="_image_lypfr_1",Rh={image:Eh},Ah=({alt:e,className:t,objectFit:n,...o})=>{const{nextimage:s}=_e();return r.jsx(s,{quality:90,...o,alt:e??"",className:m.helpers.classNameConcat(Rh.image,t),"data-object-fit":n??"cover"})},Nh=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),Ie={Image:Ah,Video:Nh},uu=({className:e,productGroupID:t,size:n,texture:o,...s})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=xt(),[c,l]=v.useState(o??"");return v.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const f=u.data[0].items[0];if(f){const h=f.images.find(d=>a.includes(d.imageLabel));h!=null&&h.imageUrl?l(h.imageUrl):l(f.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),r.jsxs("div",{...s,className:m.helpers.classNameConcat(qe["add-to-cart--card--style-size"],e),children:[r.jsx(m.ToggleStyle.Wrapper,{size:"x-small",style:i,children:r.jsx(m.ToggleStyle.Texture,{children:c?r.jsx(Ie.Image,{alt:"",src:c??"",width:164,height:164,style:i}):r.jsx(lu,{})})}),r.jsx(m.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),n&&r.jsxs(m.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[r.jsx(m.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(m.ToggleSize.Text,{children:n})]})]})};uu.displayName="AddToCart.Card.StyleSize";const{helpers:Ih}=Is,du=({className:e,item:t,texture:n,...o})=>{const{itemOffered:{name:s,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:f}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:h}}=xt(),{size:d}=Ih.product.getColorAndSizeFromSkuName(i??s,h);return r.jsxs("div",{...o,className:m.helpers.classNameConcat(qe["add-to-cart--card--content"],e),children:[r.jsx(iu,{brand:a.name,name:s}),r.jsx(cu,{price:u,listPrice:f,quantity:l,productId:t.id}),r.jsx(uu,{size:d,texture:n,productGroupID:c})]})};du.displayName="AddToCart.Card.Content";const fu=({image:e,thumbnail:t=!1})=>r.jsx(Ie.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});fu.displayName="AddToCart.Card";const pu=({className:e,item:t,texture:n,thumbnail:o,...s})=>{const{itemOffered:{image:[a]}}=t,i=U.updatedResizedImg(a.url,{width:200,height:300});return r.jsxs("div",{...s,className:m.helpers.classNameConcat(qe["add-to-cart--card"],e),children:[r.jsx(fu,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:o}),!o&&r.jsx(du,{item:t,texture:n})]})};pu.displayName="AddToCart.Card";const mu=({className:e,children:t,title:n,...o})=>r.jsxs("div",{...o,className:m.helpers.classNameConcat(qe["add-to-cart--content"],e),children:[r.jsx("div",{className:qe["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(ht.Footer,{})]});mu.displayName="AddToCart.Layout.Content";const hu=({className:e,...t})=>{var p,g;const{isMobile:n,handleClose:o,CONSTANTS:{ADD_TO_CART:s}}=xt(),{cartStore:{totalizers:a},setIsOpen:i}=Ee(),c=(p=a.find(y=>y.id==="Discounts"))==null?void 0:p.value,l=((g=a.find(y=>y.id==="Items"))==null?void 0:g.value)??0,u=a.find(y=>y.id==="Shipping"),h=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,d=U.formatPriceToCurrency(h??0);return r.jsxs("div",{...t,className:m.helpers.classNameConcat(qe["add-to-cart--footer"],e),children:[r.jsxs("div",{className:qe["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:d})]}),r.jsx(m.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:s.footer.bag}),n?r.jsx(m.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:s.footer.keep_buying}):r.jsx(m.Button,{onClick:()=>o(),size:"medium",variant:"tertiary",children:s.footer.keep_buying})]})};hu.displayName="AddToCart.Layout.Footer";const gu=({children:e,className:t,thumbnail:n=!1,...o})=>{const{cartStore:{options:s}}=Ee(),{recentlyAddedProducts:a}=Wt(),i=a.length>3?4:a.length;return r.jsxs("div",{...o,className:qe["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=s==null?void 0:s.find(f=>f.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return r.jsx(ht.Card,{item:c,thumbnail:n,texture:l},c.itemOffered.sku)}),e]})};gu.displayName="AddToCart.Layout.Items";const yu=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:o}=xt(),{isMobile:s}=ce();return r.jsxs(m.Modal.Root,{"data-modal":"add-to-cart--modal",className:qe["add-to-cart__modal"],isMobile:s??!1,isOpen:n,setIsOpen:o,variant:"sideBottom",style:{zIndex:t.modal},children:[r.jsx(m.Modal.Header,{navigation:"top",children:r.jsx(m.Modal.Controls,{navigation:"top",isMobile:!0})}),r.jsx(m.Modal.Body,{children:e})]})};yu.displayName="AddToCart.Modal";const Th=({children:e})=>{const{count:t,handleClose:n,setIsOpen:o}=xt(),s=v.useRef(t);return v.useEffect(()=>{t>s.current&&o(!0),t<s.current&&s.current>=1&&n(),s.current=t},[t,n,o]),r.jsx(r.Fragment,{children:e})},_u=({children:e,component:t,CONSTANTS:n,...o})=>{const{recentlyAddedProducts:s}=Wt(),{isMobile:a}=ce(),i=s.length>3?4:s.length;return r.jsx(_l,{...o,count:i,isMobile:a,CONSTANTS:n,children:r.jsx(Th,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(ht.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(ht.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};_u.displayName="AddToCart.Root";const vu=({children:e,component:t,Z_INDEX_WAR:n,...o})=>{const{contentRef:s,left:a,isLeaving:i,target:c,isOpen:l,top:u}=xt();return r.jsx(m.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...o,ref:s,children:t}),id:"add-to-cart--tooltip",className:qe["add-to-cart--tooltip"],style:{zIndex:n.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:r.jsx("div",{className:qe["add-to-cart--tooltip"],ref:c,children:e})})};vu.displayName="AddToCart.Tooltip";const ht={Card:pu,Content:mu,Footer:hu,Items:gu,Modal:yu,Root:_u,Tooltip:vu},Ts=({title:e,...t})=>{const{recentlyAddedProducts:n}=Wt(),{isMobile:o}=ce(),s=n.length>3?4:n.length,a=n.length>(s??1),i=n.length>1;return r.jsx(ht.Root,{isMobile:o,count:n.length,component:r.jsx(ht.Content,{title:e,children:r.jsx(ht.Items,{thumbnail:i,children:a&&r.jsx(m.Badge.Count,{count:n.length-s,size:"medium",variant:"secondary"})})}),...t})};Ts.displayName="AddToCart";const sa={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},Oh=({children:e,className:t,adornment:n,iconPosition:o,scrollToOptions:s,style:a,...i})=>{const c={top:(s==null?void 0:s.top)??0,left:(s==null?void 0:s.left)??0,behavior:(s==null?void 0:s.behavior)??"smooth"},u=o&&n?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},f=()=>{window&&window.document.body.scrollTo({...c})};return r.jsx(m.Card,{...i,shadow:!0,padding:"small",className:m.helpers.classNameConcat(sa["card-modifier"],t),style:{...a,padding:0},children:r.jsxs("button",{className:sa["backtotop-btn"],onClick:f,style:{...u},"data-orientation":o,children:[n,e]})})},kh="_container_1sy8s_16",lt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:kh,"add-itens-to-cart-container":"_add-itens-to-cart-container_1sy8s_38","add-itens-to-cart-container-values":"_add-itens-to-cart-container-values_1sy8s_45","add-itens-to-cart-qty-products":"_add-itens-to-cart-qty-products_1sy8s_50","add-itens-to-cart-total":"_add-itens-to-cart-total_1sy8s_60","add-button":"_add-button_1sy8s_70"},Lh=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const o=Object.values(e.products).length;return r.jsxs("div",{className:lt["add-itens-to-cart-container"],children:[r.jsxs("div",{className:lt["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:lt["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:o===0?n.BUY_PACKAGE.group_cart.select_all_product:`${o} ${o===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:lt["add-itens-to-cart-total"],children:r.jsx("span",{children:U.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(m.Button,{onClick:t,className:lt["add-button"],size:"large",disabled:o===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},Mh=e=>e.reduce((t,n)=>{var s;const o=t.find(a=>a.node.id===n.node.id);if(!o)return[...t,n];if((s=o==null?void 0:o.node.isVariantOf)!=null&&s.hasVariant){const a=o.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(o.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),Dh=({selectedProduct:e,productId:t,prevState:n,mainSellerId:o})=>{const{products:s,totalPrice:a}=n;try{if(!e){const{[t]:u,...f}=s;return{...n,totalPrice:a-u.price,products:f}}const i=U.getValidOffer(e.offers.offers,o);if(!i)return n;const c=i.seller.identifier,l=i.price;if(s[t]){const{price:u}=s[t];return s[t]={...s[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...s}}}return{totalPrice:a+l,products:{...s,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),n}},xu=v.createContext({}),$h=({children:e,item:t,index:n,shelfTitle:o,...s})=>{const[a,i]=v.useState(null),c=v.useRef(null),l=v.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:f}=le(),h=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},d=()=>{h("add_to_wishlist")},p=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:n}}})},g=()=>{o&&(f.current={item_list_name:o}),h("select_item")};return r.jsx(xu.Provider,{value:v.useMemo(()=>({...s,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:d,sendSelectItemEvent:g,sendAddToCartEvent:p}),[s,t,c,a]),children:e})},Ve=()=>{const e=v.useContext(xu);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Ae={"product-card--actions":"_product-card--actions_nmzk4_1","product-card--actions--group":"_product-card--actions--group_nmzk4_9","product-card--actions--selectors":"_product-card--actions--selectors_nmzk4_21","product-card--body":"_product-card--body_nmzk4_33","product-card--header":"_product-card--header_nmzk4_47","product-card--footer":"_product-card--footer_nmzk4_67","product-card--image":"_product-card--image_nmzk4_90","product-card--image--container":"_product-card--image--container_nmzk4_97","product-card--outstock":"_product-card--outstock_nmzk4_133","product-card--price":"_product-card--price_nmzk4_155","product-card--title":"_product-card--title_nmzk4_177","product-card--title--tag":"_product-card--title--tag_nmzk4_183","product-card--title--content":"_product-card--title--content_nmzk4_200","product-card--selectors--size":"_product-card--selectors--size_nmzk4_240","product-card--selectors--size--button":"_product-card--selectors--size--button_nmzk4_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_nmzk4_275","product-card--selectors--style":"_product-card--selectors--style_nmzk4_289","product-card--selectors--style--more":"_product-card--selectors--style--more_nmzk4_299","product-card--video":"_product-card--video_nmzk4_316","product-card--wrapper":"_product-card--wrapper_nmzk4_342"},bu=({callback:e,children:t,className:n,data:o,isKit:s,...a})=>{const{item:{availability:{status:i},image:c}}=Ve();return i?r.jsxs("div",{...a,className:m.helpers.classNameConcat(Ae["product-card--actions"],n),children:[r.jsxs(xe.Wrapper,{type:"actions--group",children:[r.jsx(xe.Price,{}),r.jsx("div",{className:Ae["product-card--actions--selectors"],children:!s&&r.jsx(xe.StyleSelector,{data:o,images:c,callback:e})})]}),t]}):null};bu.displayName="ProductCard.Actions";const ju=({className:e,isKit:t,...n})=>{const{addToCart:o}=Ee(),{isMobile:s=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ve(),f=()=>{var p;if(!a)return;const d=U.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);d&&o({id:a==null?void 0:a.sku,quantity:1,seller:d.seller.identifier},{id:c.id,texture:(p=c==null?void 0:c.image.find(g=>u.TEXTURE_IMAGE.includes(g.alternateName)))==null?void 0:p.url}),l()},h=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return r.jsx(m.Button,{...n,className:m.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:s?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:f,children:i?"Avise-me quando chegar":h})};ju.displayName="ProductCard.Actions.BuyButton";const zh={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},wt=({size:e,adornment:t,title:n,subtitle:o,supportChildren:s,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(m.SnackBar.Structure,{...c,size:e,className:m.helpers.classNameConcat(zh["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(m.SnackBar.Content,{adornment:t,title:n,subtitle:o}),s&&r.jsx(m.SnackBar.Support,{children:s})]});wt.displayName="SnackBar";const Bt={"wishlist--snack":"_wishlist--snack_3qi1o_9","wishlist--snack--actions":"_wishlist--snack--actions_3qi1o_25","wishlist-grid":"_wishlist-grid_3qi1o_31","wishlist-grid--container":"_wishlist-grid--container_3qi1o_39","pdc-empty-modifier":"_pdc-empty-modifier_3qi1o_49"};var Cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fh(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:function(){return e[o]}})}),n}var Vo={exports:{}},ke={};ke._=ke._interop_require_default=Bh;function Bh(e){return e&&e.__esModule?e:{default:e}}var sr={exports:{}},Yr={},aa;function Su(){return aa||(aa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return s},assign:function(){return a}});function n(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function o(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function s(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,f]=l;Array.isArray(f)?f.forEach(h=>c.append(u,o(h))):c.set(u,o(f))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(f=>{Array.from(f.keys()).forEach(h=>i.delete(h)),f.forEach((h,d)=>i.append(d,h))}),i}}(Yr)),Yr}var Qr={},Nt={};function Pu(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Pu=function(o){return o?n:t})(e)}Nt._=Nt._interop_require_wildcard=qh;function qh(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Pu(t);if(n&&n.has(e))return n.get(e);var o={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=s?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,n&&n.set(e,o),o}var ia;function wu(){return ia||(ia=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}t(e,{formatUrl:function(){return a},urlObjectKeys:function(){return i},formatWithValidation:function(){return c}});const o=Nt._(Su()),s=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:f}=l,h=l.protocol||"",d=l.pathname||"",p=l.hash||"",g=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:f&&(y=u+(~f.indexOf(":")?"["+f+"]":f),l.port&&(y+=":"+l.port)),g&&typeof g=="object"&&(g=String(o.urlQueryToSearchParams(g)));let _=l.search||g&&"?"+g||"";return h&&!h.endsWith(":")&&(h+=":"),l.slashes||(!h||s.test(h))&&y!==!1?(y="//"+(y||""),d&&d[0]!=="/"&&(d="/"+d)):y||(y=""),p&&p[0]!=="#"&&(p="#"+p),_&&_[0]!=="?"&&(_="?"+_),d=d.replace(/[?#]/g,encodeURIComponent),_=_.replace("#","%23"),""+h+y+d+_+p}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(Qr)),Qr}var Zr={},ca;function Hh(){return ca||(ca=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,o){const s={};return Object.keys(n).forEach(a=>{o.includes(a)||(s[a]=n[a])}),s}}(Zr)),Zr}var Jr={},la;function Lr(){return la||(la=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(j,P){for(var E in P)Object.defineProperty(j,E,{enumerable:!0,get:P[E]})}t(e,{WEB_VITALS:function(){return n},execOnce:function(){return o},isAbsoluteUrl:function(){return a},getLocationOrigin:function(){return i},getURL:function(){return c},getDisplayName:function(){return l},isResSent:function(){return u},normalizeRepeatedSlashes:function(){return f},loadGetInitialProps:function(){return h},SP:function(){return d},ST:function(){return p},DecodeError:function(){return g},NormalizeError:function(){return y},PageNotFoundError:function(){return _},MissingStaticPage:function(){return b},MiddlewareNotFoundError:function(){return S},stringifyError:function(){return x}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function o(j){let P=!1,E;return function(){for(var C=arguments.length,R=new Array(C),T=0;T<C;T++)R[T]=arguments[T];return P||(P=!0,E=j(...R)),E}}const s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=j=>s.test(j);function i(){const{protocol:j,hostname:P,port:E}=window.location;return j+"//"+P+(E?":"+E:"")}function c(){const{href:j}=window.location,P=i();return j.substring(P.length)}function l(j){return typeof j=="string"?j:j.displayName||j.name||"Unknown"}function u(j){return j.finished||j.headersSent}function f(j){const P=j.split("?");return P[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(P[1]?"?"+P.slice(1).join("?"):"")}async function h(j,P){if(process.env.NODE_ENV!=="production"){var E;if((E=j.prototype)!=null&&E.getInitialProps){const T='"'+l(j)+'.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';throw new Error(T)}}const C=P.res||P.ctx&&P.ctx.res;if(!j.getInitialProps)return P.ctx&&P.Component?{pageProps:await h(P.Component,P.ctx)}:{};const R=await j.getInitialProps(P);if(C&&u(C))return R;if(!R){const T='"'+l(j)+'.getInitialProps()" should resolve to an object. But found "'+R+'" instead.';throw new Error(T)}return process.env.NODE_ENV!=="production"&&Object.keys(R).length===0&&!P.ctx&&console.warn(""+l(j)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),R}const d=typeof performance<"u",p=d&&["mark","measure","getEntriesByName"].every(j=>typeof performance[j]=="function");class g extends Error{}class y extends Error{}class _ extends Error{constructor(P){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+P}}class b extends Error{constructor(P,E){super(),this.message="Failed to load static file for page: "+P+" "+E}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function x(j){return JSON.stringify({message:j.message,stack:j.stack})}}(Jr)),Jr}var ar={exports:{}},en={},ua;function Eu(){return ua||(ua=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.replace(/\/$/,"")||"/"}}(en)),en}var tn={},da;function Os(){return da||(da=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(n){const o=n.indexOf("#"),s=n.indexOf("?"),a=s>-1&&(o<0||s<o);return a||o>-1?{pathname:n.substring(0,a?s:o),query:a?n.substring(s,o>-1?o:void 0):"",hash:o>-1?n.slice(o):""}:{pathname:n,query:"",hash:""}}}(tn)),tn}var fa;function Mr(){return fa||(fa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return s}});const n=Eu(),o=Os(),s=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,o.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,n.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,n.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(ar,ar.exports)),ar.exports}var rn={},ir={exports:{}},nn={},pa;function Ru(){return pa||(pa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return n}});const t=Os();function n(o,s){if(typeof o!="string")return!1;const{pathname:a}=(0,t.parsePath)(o);return a===s||a.startsWith(s+"/")}}(nn)),nn}var ma;function Uh(){return ma||(ma=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return s}});const n=Ru(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function s(a){return(0,n.pathHasPrefix)(a,o)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(ir,ir.exports)),ir.exports}var ha;function Au(){return ha||(ha=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return o}});const t=Lr(),n=Uh();function o(s){if(!(0,t.isAbsoluteUrl)(s))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(s,a);return i.origin===a&&(0,n.hasBasePath)(i.pathname)}catch{return!1}}}(rn)),rn}var on={},sn={},ga;function Wh(){return ga||(ga=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class t{insert(s){this._insert(s.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(s){s===void 0&&(s="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+s+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(s+"["+this.slugName+"]/")),!this.placeholder){const c=s==="/"?"/":s.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(s+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(s+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(s,a,i){if(s.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=s[0];if(c.startsWith("[")&&c.endsWith("]")){let f=function(h,d){if(h!==null&&h!==d)throw new Error("You cannot use different slug names for the same dynamic path ('"+h+"' !== '"+d+"').");a.forEach(p=>{if(p===d)throw new Error('You cannot have the same slug name "'+d+'" repeat within a single dynamic path');if(p.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+p+'" and "'+d+'" differ only by non-word symbols within a single dynamic path')}),a.push(d)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+s[0]+'" ).');f(this.optionalRestSlugName,l),this.optionalRestSlugName=l,c="[[...]]"}else{if(this.optionalRestSlugName!=null)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+s[0]+'").');f(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+s[0]+'").');f(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(s.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(o){const s=new t;return o.forEach(a=>s.insert(a)),s.smoosh()}}(sn)),sn}var an={},ya;function Gh(){return ya||(ya=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return n}});const t=/\/\[[^/]+?\](?=\/|$)/;function n(o){return t.test(o)}}(an)),an}var _a;function Vh(){return _a||(_a=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});const n=Wh(),o=Gh()}(on)),on}var cn={},ln={},va;function Kh(){return va||(va=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=Lr();function n(o){let{re:s,groups:a}=o;return i=>{const c=s.exec(i);if(!c)return!1;const l=f=>{try{return decodeURIComponent(f)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(f=>{const h=a[f],d=c[h.pos];d!==void 0&&(u[f]=~d.indexOf("/")?d.split("/").map(p=>l(p)):h.repeat?[l(d)]:l(d))}),u}}}(ln)),ln}var un={},dn={},fn={},pn={},xa;function Xh(){return xa||(xa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.startsWith("/")?n:"/"+n}}(pn)),pn}var mn={},ba;function Yh(){return ba||(ba=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isGroupSegment",{enumerable:!0,get:function(){return t}});function t(n){return n[0]==="("&&n.endsWith(")")}}(mn)),mn}var ja;function Qh(){return ja||(ja=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return s},normalizeRscPath:function(){return a}});const n=Xh(),o=Yh();function s(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,f)=>!l||(0,o.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===f.length-1?c:c+"/"+l,""))}function a(i,c){return c?i.replace(/\.rsc($|\?)/,"$1"):i}}(fn)),fn}var Ca;function Zh(){return Ca||(Ca=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return o},isInterceptionRouteAppPath:function(){return s},extractInterceptionRouteInformation:function(){return a}});const n=Qh(),o=["(..)(..)","(.)","(..)","(...)"];function s(i){return i.split("/").find(c=>o.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const f of i.split("/"))if(l=o.find(h=>f.startsWith(h)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,n.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const f=c.split("/");if(f.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=f.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(dn)),dn}var hn={},Sa;function Jh(){return Sa||(Sa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function o(s){return t.test(s)?s.replace(n,"\\$&"):s}}(hn)),hn}var Pa;function eg(){return Pa||(Pa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,_){for(var b in _)Object.defineProperty(y,b,{enumerable:!0,get:_[b]})}t(e,{getRouteRegex:function(){return u},getNamedRouteRegex:function(){return p},getNamedMiddlewareRegex:function(){return g}});const n=Zh(),o=Jh(),s=Eu(),a="nxtP",i="nxtI";function c(y){const _=y.startsWith("[")&&y.endsWith("]");_&&(y=y.slice(1,-1));const b=y.startsWith("...");return b&&(y=y.slice(3)),{key:y,repeat:b,optional:_}}function l(y){const _=(0,s.removeTrailingSlash)(y).slice(1).split("/"),b={};let S=1;return{parameterizedRoute:_.map(x=>{const j=n.INTERCEPTION_ROUTE_MARKERS.find(E=>x.startsWith(E)),P=x.match(/\[((?:\[.*\])|.+)\]/);if(j&&P){const{key:E,optional:C,repeat:R}=c(P[1]);return b[E]={pos:S++,repeat:R,optional:C},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(P){const{key:E,repeat:C,optional:R}=c(P[1]);return b[E]={pos:S++,repeat:C,optional:R},C?R?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(x)}).join(""),groups:b}}function u(y){const{parameterizedRoute:_,groups:b}=l(y);return{re:new RegExp("^"+_+"(?:/)?$"),groups:b}}function f(){let y=0;return()=>{let _="",b=++y;for(;b>0;)_+=String.fromCharCode(97+(b-1)%26),b=Math.floor((b-1)/26);return _}}function h(y){let{getSafeRouteKey:_,segment:b,routeKeys:S,keyPrefix:x}=y;const{key:j,optional:P,repeat:E}=c(b);let C=j.replace(/\W/g,"");x&&(C=""+x+C);let R=!1;return(C.length===0||C.length>30)&&(R=!0),isNaN(parseInt(C.slice(0,1)))||(R=!0),R&&(C=_()),x?S[C]=""+x+j:S[C]=""+j,E?P?"(?:/(?<"+C+">.+?))?":"/(?<"+C+">.+?)":"/(?<"+C+">[^/]+?)"}function d(y,_){const b=(0,s.removeTrailingSlash)(y).slice(1).split("/"),S=f(),x={};return{namedParameterizedRoute:b.map(j=>{const P=n.INTERCEPTION_ROUTE_MARKERS.some(C=>j.startsWith(C)),E=j.match(/\[((?:\[.*\])|.+)\]/);return P&&E?h({getSafeRouteKey:S,segment:E[1],routeKeys:x,keyPrefix:_?i:void 0}):E?h({getSafeRouteKey:S,segment:E[1],routeKeys:x,keyPrefix:_?a:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:x}}function p(y,_){const b=d(y,_);return{...u(y),namedRegex:"^"+b.namedParameterizedRoute+"(?:/)?$",routeKeys:b.routeKeys}}function g(y,_){const{parameterizedRoute:b}=l(y),{catchAll:S=!0}=_;if(b==="/")return{namedRegex:"^/"+(S?".*":"")+"$"};const{namedParameterizedRoute:x}=d(y,!1);let j=S?"(?:(/.*)?)":"";return{namedRegex:"^"+x+j+"$"}}}(un)),un}var wa;function tg(){return wa||(wa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return o}});const t=Kh(),n=eg();function o(s,a,i){let c="";const l=(0,n.getRouteRegex)(s),u=l.groups,f=(a!==s?(0,t.getRouteMatcher)(l)(a):"")||i;c=s;const h=Object.keys(u);return h.every(d=>{let p=f[d]||"";const{repeat:g,optional:y}=u[d];let _="["+(g?"...":"")+d+"]";return y&&(_=(p?"":"/")+"["+_+"]"),g&&!Array.isArray(p)&&(p=[p]),(y||d in f)&&(c=c.replace(_,g?p.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(p))||"/")})||(c=""),{params:h,result:c}}}(cn)),cn}var Ea;function rg(){return Ea||(Ea=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});const n=Su(),o=wu(),s=Hh(),a=Lr(),i=Mr(),c=Au(),l=Vh(),u=tg();function f(h,d,p){let g,y=typeof d=="string"?d:(0,o.formatWithValidation)(d);const _=y.match(/^[a-zA-Z]{1,}:\/\//),b=_?y.slice(_[0].length):y;if((b.split("?")[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+h.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const x=(0,a.normalizeRepeatedSlashes)(b);y=(_?_[0]:"")+x}if(!(0,c.isLocalURL)(y))return p?[y]:y;try{g=new URL(y.startsWith("#")?h.asPath:h.pathname,"http://n")}catch{g=new URL("/","http://n")}try{const x=new URL(y,g);x.pathname=(0,i.normalizePathTrailingSlash)(x.pathname);let j="";if((0,l.isDynamicRoute)(x.pathname)&&x.searchParams&&p){const E=(0,n.searchParamsToUrlQuery)(x.searchParams),{result:C,params:R}=(0,u.interpolateAs)(x.pathname,x.pathname,E);C&&(j=(0,o.formatWithValidation)({pathname:C,hash:x.hash,query:(0,s.omit)(E,R)}))}const P=x.origin===g.origin?x.href.slice(x.origin.length):x.href;return p?[P,j||P]:P}catch{return p?[y]:y}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(sr,sr.exports)),sr.exports}var cr={exports:{}},gn={},yn={},Ra;function Nu(){return Ra||(Ra=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return n}});const t=Os();function n(o,s){if(!o.startsWith("/")||!s)return o;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(o);return""+s+a+i+c}}(yn)),yn}var Aa;function ng(){return Aa||(Aa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return o}});const t=Nu(),n=Ru();function o(s,a,i,c){if(!a||a===i)return s;const l=s.toLowerCase();return!c&&((0,n.pathHasPrefix)(l,"/api")||(0,n.pathHasPrefix)(l,"/"+a.toLowerCase()))?s:(0,t.addPathPrefix)(s,"/"+a)}}(gn)),gn}var Na;function og(){return Na||(Na=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return o}});const n=Mr(),o=function(s){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,n.normalizePathTrailingSlash)(ng().addLocale(s,...i)):s};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(cr,cr.exports)),cr.exports}var _n={},Ia;function Iu(){return Ia||(Ia=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return o}});const o=ke._(v).default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="RouterContext")}(_n)),_n}var vn={},Ta;function sg(){return Ta||(Ta=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,f){for(var h in f)Object.defineProperty(u,h,{enumerable:!0,get:f[h]})}t(e,{CacheStates:function(){return s},AppRouterContext:function(){return a},LayoutRouterContext:function(){return i},GlobalLayoutRouterContext:function(){return c},TemplateContext:function(){return l}});const o=ke._(v);var s;(function(u){u.LAZY_INITIALIZED="LAZYINITIALIZED",u.DATA_FETCH="DATAFETCH",u.READY="READY"})(s||(s={}));const a=o.default.createContext(null),i=o.default.createContext(null),c=o.default.createContext(null),l=o.default.createContext(null);process.env.NODE_ENV!=="production"&&(a.displayName="AppRouterContext",i.displayName="LayoutRouterContext",c.displayName="GlobalLayoutRouterContext",l.displayName="TemplateContext")}(vn)),vn}var lr={exports:{}},ur={exports:{}},Oa;function Tu(){return Oa||(Oa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{requestIdleCallback:function(){return o},cancelIdleCallback:function(){return s}});const o=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},s=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(ur,ur.exports)),ur.exports}var ka;function ag(){return ka||(ka=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=v,o=Tu(),s=typeof IntersectionObserver=="function",a=new Map,i=[];function c(f){const h={root:f.root||null,margin:f.rootMargin||""},d=i.find(_=>_.root===h.root&&_.margin===h.margin);let p;if(d&&(p=a.get(d),p))return p;const g=new Map,y=new IntersectionObserver(_=>{_.forEach(b=>{const S=g.get(b.target),x=b.isIntersecting||b.intersectionRatio>0;S&&x&&S(x)})},f);return p={id:h,observer:y,elements:g},i.push(h),a.set(h,p),p}function l(f,h,d){const{id:p,observer:g,elements:y}=c(d);return y.set(f,h),g.observe(f),function(){if(y.delete(f),g.unobserve(f),y.size===0){g.disconnect(),a.delete(p);const b=i.findIndex(S=>S.root===p.root&&S.margin===p.margin);b>-1&&i.splice(b,1)}}}function u(f){let{rootRef:h,rootMargin:d,disabled:p}=f;const g=p||!s,[y,_]=(0,n.useState)(!1),b=(0,n.useRef)(null),S=(0,n.useCallback)(j=>{b.current=j},[]);(0,n.useEffect)(()=>{if(s){if(g||y)return;const j=b.current;if(j&&j.tagName)return l(j,E=>E&&_(E),{root:h==null?void 0:h.current,rootMargin:d})}else if(!y){const j=(0,o.requestIdleCallback)(()=>_(!0));return()=>(0,o.cancelIdleCallback)(j)}},[g,d,h,y,b.current]);const x=(0,n.useCallback)(()=>{_(!1)},[]);return[S,y,x]}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(lr,lr.exports)),lr.exports}var dr={exports:{}},fr={exports:{}},xn={},La;function ig(){return La||(La=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(n,o){let s;const a=n.split("/");return(o||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(s=i,a.splice(1,1),n=a.join("/")||"/",!0):!1),{pathname:n,detectedLocale:s}}}(xn)),xn}var Ma;function cg(){return Ma||(Ma=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(o,s)=>process.env.__NEXT_I18N_SUPPORT?ig().normalizeLocalePath(o,s):{pathname:o,detectedLocale:void 0};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(fr,fr.exports)),fr.exports}var pr={exports:{}},bn={},Da;function lg(){return Da||(Da=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(n,o,s){if(n){s&&(s=s.toLowerCase());for(const c of n){var a,i;const l=(a=c.domain)==null?void 0:a.split(":")[0].toLowerCase();if(o===l||s===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===s))return c}}}}(bn)),bn}var $a;function ug(){return $a||($a=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return n}});const n=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return lg().detectDomainLocale(...s)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(pr,pr.exports)),pr.exports}var za;function dg(){return za||(za=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return s}});const n=Mr(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function s(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=cg().normalizeLocalePath,f=ug().detectDomainLocale,h=i||u(a,c).detectedLocale,d=f(l,void 0,h);if(d){const p="http"+(d.http?"":"s")+"://",g=h===d.defaultLocale?"":"/"+h;return""+p+d.domain+(0,n.normalizePathTrailingSlash)(""+o+g+a)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(dr,dr.exports)),dr.exports}var mr={exports:{}},Fa;function fg(){return Fa||(Fa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=Nu(),o=Mr(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,o.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.addPathPrefix)(i,s))}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(mr,mr.exports)),mr.exports}var hr={exports:{}},Ba;function pg(){return Ba||(Ba=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(h,d){for(var p in d)Object.defineProperty(h,p,{enumerable:!0,get:d[p]})}n(t,{PrefetchKind:function(){return f},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return s},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return i},ACTION_PREFETCH:function(){return c},ACTION_FAST_REFRESH:function(){return l},ACTION_SERVER_ACTION:function(){return u}});const o="refresh",s="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var f;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(f||(f={})),(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(hr,hr.exports)),hr.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return P}});const o=ke._(v),s=rg(),a=Au(),i=wu(),c=Lr(),l=og(),u=Iu(),f=sg(),h=ag(),d=dg(),p=fg(),g=pg(),y=new Set;function _(E,C,R,T,w,N){if(typeof window>"u"||!N&&!(0,a.isLocalURL)(C))return;if(!T.bypassPrefetchedCheck){const z=typeof T.locale<"u"?T.locale:"locale"in E?E.locale:void 0,k=C+"%"+R+"%"+z;if(y.has(k))return;y.add(k)}const I=N?E.prefetch(C,w):E.prefetch(C,R,T);Promise.resolve(I).catch(z=>{if(process.env.NODE_ENV!=="production")throw z})}function b(E){const R=E.currentTarget.getAttribute("target");return R&&R!=="_self"||E.metaKey||E.ctrlKey||E.shiftKey||E.altKey||E.nativeEvent&&E.nativeEvent.which===2}function S(E,C,R,T,w,N,I,z,k,W){const{nodeName:q}=E.currentTarget;if(q.toUpperCase()==="A"&&(b(E)||!k&&!(0,a.isLocalURL)(R)))return;E.preventDefault();const G=()=>{const V=I??!0;"beforePopState"in C?C[w?"replace":"push"](R,T,{shallow:N,locale:z,scroll:V}):C[w?"replace":"push"](T||R,{forceOptimisticNavigation:!W,scroll:V})};k?o.default.startTransition(G):G()}function x(E){return typeof E=="string"?E:(0,i.formatUrl)(E)}const P=o.default.forwardRef(function(C,R){let T;const{href:w,as:N,children:I,prefetch:z=null,passHref:k,replace:W,shallow:q,scroll:F,locale:G,onClick:V,onMouseEnter:B,onTouchStart:J,legacyBehavior:A=!1,...O}=C;T=I,A&&(typeof T=="string"||typeof T=="number")&&(T=o.default.createElement("a",null,T));const D=o.default.useContext(u.RouterContext),X=o.default.useContext(f.AppRouterContext),ne=D??X,ee=!D,M=z!==!1,te=z===null?g.PrefetchKind.AUTO:g.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let ae=function(se){return new Error("Failed prop type: The prop `"+se.key+"` expects a "+se.expected+" in `<Link>`, but got `"+se.actual+"` instead."+(typeof window<"u"?`
|
|
2
2
|
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(se=>{if(se==="href"&&(C[se]==null||typeof C[se]!="string"&&typeof C[se]!="object"))throw ae({key:se,expected:"`string` or `object`",actual:C[se]===null?"null":typeof C[se]})}),Object.keys({as:!0,replace:!0,scroll:!0,shallow:!0,passHref:!0,prefetch:!0,locale:!0,onClick:!0,onMouseEnter:!0,onTouchStart:!0,legacyBehavior:!0}).forEach(se=>{const Y=typeof C[se];if(se==="as"){if(C[se]&&Y!=="string"&&Y!=="object")throw ae({key:se,expected:"`string` or `object`",actual:Y})}else if(se==="locale"){if(C[se]&&Y!=="string")throw ae({key:se,expected:"`string`",actual:Y})}else if(se==="onClick"||se==="onMouseEnter"||se==="onTouchStart"){if(C[se]&&Y!=="function")throw ae({key:se,expected:"`function`",actual:Y})}else if((se==="replace"||se==="scroll"||se==="shallow"||se==="passHref"||se==="prefetch"||se==="legacyBehavior")&&C[se]!=null&&Y!=="boolean")throw ae({key:se,expected:"`boolean`",actual:Y})});const Q=o.default.useRef(!1);C.prefetch&&!Q.current&&!ee&&(Q.current=!0,console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"))}if(process.env.NODE_ENV!=="production"&&ee&&!N){let ae;if(typeof w=="string"?ae=w:typeof w=="object"&&typeof w.pathname=="string"&&(ae=w.pathname),ae&&ae.split("/").some(K=>K.startsWith("[")&&K.endsWith("]")))throw new Error("Dynamic href `"+ae+"` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href")}const{href:Z,as:re}=o.default.useMemo(()=>{if(!D){const K=x(w);return{href:K,as:N?x(N):K}}const[ae,ve]=(0,s.resolveHref)(D,w,!0);return{href:ae,as:N?(0,s.resolveHref)(D,N):ve||ae}},[D,w,N]),$=o.default.useRef(Z),L=o.default.useRef(re);let oe;if(A)if(process.env.NODE_ENV==="development"){V&&console.warn('"onClick" was passed to <Link> with `href` of `'+w+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),B&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+w+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{oe=o.default.Children.only(T)}catch{throw T?new Error("Multiple children were passed to <Link> with `href` of `"+w+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
|
|
3
3
|
Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+w+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else oe=o.default.Children.only(T);else if(process.env.NODE_ENV==="development"&&(T==null?void 0:T.type)==="a")throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
|
|
4
|
-
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const ie=A?oe&&typeof oe=="object"&&oe.ref:R,[fe,pe,ue]=(0,h.useIntersection)({rootMargin:"200px"}),H=o.default.useCallback(ae=>{(L.current!==re||$.current!==Z)&&(ue(),L.current=re,$.current=Z),fe(ae),ie&&(typeof ie=="function"?ie(ae):typeof ie=="object"&&(ie.current=ae))},[re,ie,Z,ue,fe]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&ne&&(!pe||!M||_(ne,Z,re,{locale:G},{kind:te},ee))},[re,Z,pe,G,M,D==null?void 0:D.locale,ne,ee,te]);const be={ref:H,onClick(ae){if(process.env.NODE_ENV!=="production"&&!ae)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!A&&typeof V=="function"&&V(ae),A&&oe.props&&typeof oe.props.onClick=="function"&&oe.props.onClick(ae),ne&&(ae.defaultPrevented||S(ae,ne,Z,re,W,q,F,G,ee,M))},onMouseEnter(ae){!A&&typeof B=="function"&&B(ae),A&&oe.props&&typeof oe.props.onMouseEnter=="function"&&oe.props.onMouseEnter(ae),ne&&((!M||process.env.NODE_ENV==="development")&&ee||_(ne,Z,re,{locale:G,priority:!0,bypassPrefetchedCheck:!0},{kind:te},ee))},onTouchStart(ae){!A&&typeof J=="function"&&J(ae),A&&oe.props&&typeof oe.props.onTouchStart=="function"&&oe.props.onTouchStart(ae),ne&&(!M&&ee||_(ne,Z,re,{locale:G,priority:!0,bypassPrefetchedCheck:!0},{kind:te},ee))}};if((0,c.isAbsoluteUrl)(re))be.href=re;else if(!A||k||oe.type==="a"&&!("href"in oe.props)){const ae=typeof G<"u"?G:D==null?void 0:D.locale,ve=(D==null?void 0:D.isLocaleDomain)&&(0,d.getDomainLocale)(re,ae,D==null?void 0:D.locales,D==null?void 0:D.domainLocales);be.href=ve||(0,p.addBasePath)((0,l.addLocale)(re,ae,D==null?void 0:D.defaultLocale))}return A?o.default.cloneElement(oe,be):o.default.createElement("a",{...O,...be},T)});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Vo,Vo.exports);var mg=Vo.exports,hg=mg;const De=kr(hg),gg="_link_w24h0_1",yg="_wrapper_w24h0_98",_g="_text_w24h0_106",jn={link:gg,wrapper:yg,text:_g},rt=({children:e,adornments:t,className:n,disableUnderline:o,href:s,mode:a,size:i,title:c,onClick:l,disablePadding:u,...f})=>{const h=m.helpers.ValidateProp({fieldTypes:Pt.SizesSmallExtended,property:i,fallback:"medium"}),d=m.helpers.ValidateProp({fieldTypes:Pt.Mode,property:a,fallback:"default"});return r.jsx(De,{...f,className:m.helpers.classNameConcat(jn.link,n),href:s&&s.length>0?s:"#","data-size":h,"data-variant":d,title:c||"NextLink","data-disable-underline":o??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:jn.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:jn.text,"data-size":h,children:e}),t==null?void 0:t.end]})})},vg=({ICONS:e})=>{const{resetFeedback:t}=vt();return r.jsxs("div",{className:Bt["wishlist--snack--actions"],children:[r.jsx(rt,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(m.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(m.Icon,{name:e.close})}})]})},ks=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const o=vs(),{resetFeedback:s}=vt(),a=v.useRef(null);return v.useEffect(()=>{a.current&&clearTimeout(a.current),o&&(a.current=setTimeout(()=>{s()},5e3))},[o,s]),(o==null?void 0:o.active)&&r.jsx(wt,{Z_INDEX_WAR:n,className:Bt["wishlist--snack"],"data-action":o.action,title:o.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(vg,{ICONS:t}),size:"medium"})};ks.displayName="WishList.Feedback";const Ls={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Ou=({className:e,children:t,columns:n=1,isMobile:o=!1,gap:s=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=v.useMemo(()=>n%i===0?"initial":o||n<2?c:c.split("/").reverse().join("/"),[n,i,o]);return r.jsx("div",{...l,className:m.helpers.classNameConcat(Ls["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:s/2},children:t})};Ou.displayName="ProductList.Banner";const ku=({isKit:e,parent:t,productId:n,setNotify:o,CONSTANTS:s})=>{const{router:a}=_e(),i=v.useRef(!1),c=v.useRef(null),[l,u]=v.useState([]),f=g=>a.push(g??""),h=async g=>{try{const y=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:g,filterTexture:s.TEXTURE_IMAGE}),priority:"low"});if(!y.ok)throw new Error("Erro ao buscar similares.");const _=await y.json();u(_)}catch(y){console.error(y)}},d=v.useCallback(g=>{!n||!g||(typeof h=="function"&&h(n),i.current=!0)},[n]),p=v.useCallback((g,y)=>{if(!g.isIntersecting){s.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(g.intersectionRatio>=y.threshold&&!i.current){if(s.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{d(!0)},s.PLP_PRODUCT_SIMILAR_DELAY);return}d(!0)}},[d]);return v.useEffect(()=>{if(e||!t.current)return;const g={root:null,threshold:.1},y=new IntersectionObserver(([_])=>{p(_,g)},g);return y.observe(t.current),()=>{c.current&&clearTimeout(c.current),y.disconnect()}},[p,t,e]),r.jsx(xe.Actions,{...l,callback:f,isKit:e,children:!e&&r.jsx(xe.SizeSelector,{setNotify:o})})};ku.displayName="ProductList.Card.Actions";const Lu=({className:e,children:t,gap:n=32,item:o,isMobile:s,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:f,CONSTANTS:h,...d})=>{const p=v.useRef(null),{availability:{status:g}}=o,y=v.useCallback((b,S)=>{var x;typeof u=="function"&&u((x=b.isVariantOf)==null?void 0:x.hasVariant,S)},[u]),_=o.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...d,className:m.helpers.classNameConcat(Ls["product-list--card"],e),"data-mobile":s,"data-order":a,ref:p,style:{...c&&{maxWidth:s?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(xe.Root,{item:o,isMobile:s,index:l,size:s?"small":"medium",order:a,outStock:!g,CONSTANTS:h,children:[r.jsx(xe.Header,{product:o,tag:i==null?void 0:i.commercial}),r.jsx(xe.Media,{showVideo:f,hasPriority:!0}),r.jsxs(xe.Wrapper,{type:"body",children:[r.jsx(xe.Title,{tag:i==null?void 0:i.institucional}),r.jsx(ku,{productId:o.isVariantOf.productGroupID,parent:p,setNotify:y,isKit:_,CONSTANTS:h}),!_&&r.jsx(xe.OutStock,{callback:y})]}),r.jsx(xe.Wrapper,{type:"footer",children:g&&r.jsx(xe.BuyButton,{isKit:_})})]}),t]})};Lu.displayName="ProductList.Card";const Mu=({children:e,className:t,...n})=>r.jsx("div",{...n,className:m.helpers.classNameConcat(Ls["product-list"],t),children:e});Mu.displayName="ProductList.Grid";const et={Banner:Ou,Card:Lu,Root:Mu,helpers:lh},xg="_pdc_alo7z_1",Ge={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:xg},Ms=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:o}=_e(),{isMobile:s}=ce(),a=()=>{o.push(n==null?void 0:n.link)};return r.jsxs("div",{className:m.helpers.classNameConcat(Ge["pdc--empty"],e),children:[r.jsxs(m.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[r.jsx("span",{className:s?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:s?"typography-style-body-xs":"typography-style-body-sm",children:n.subtitle})]}),r.jsx(m.Button,{adornment:{end:r.jsx(m.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:r.jsx("b",{children:n.text})})]})};Ms.displayName="PDC.Empty";const Dr=e=>r.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:r.jsx(m.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});Dr.displayName="PDC.Spinner";function Du({CONSTANTS:e}){const{sendDataLayerEvent:t}=le(),{isMobile:n}=ce(),{getAvailableProductTag:o}=ot(),[s,a]=v.useState([]),[i,c]=v.useState(!0),l=Tt(),u=n?16:32;return v.useEffect(()=>{const f=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(h=>h.json()).then(h=>{a(h),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:h}}})}).catch(h=>console.error(h)):a([]),c(!1)};if(l.length){f();return}if(l.length===0&&s.length===0){c(!1);return}a([]),c(!1)},[l]),r.jsx("section",{className:Bt["wishlist-grid"],children:r.jsxs("div",{className:Bt["wishlist-grid--container"],children:[i&&r.jsx(Dr,{}),!l.length&&!(s!=null&&s.length)&&!i&&r.jsx(Ms,{className:Bt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(et.Root,{children:Array.isArray(s)&&s.map((f,h)=>{const d=f.node.cluster.highlights||[],p=o(d);return r.jsx(et.Card,{gap:u,isMobile:n??!1,item:f.node,tag:p,index:h,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS}},f.node.sku)})})]})})}Du.displayName="Wishlist.Grid";const bg=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],$u=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const o=Ot(),s=Tt(),a=vs(),{updateList:i}=vt();return v.useEffect(()=>{var l,u;a.active&&Qe.set("fs::wishlist",s);const c=async()=>{var f;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:s,docId:(f=o==null?void 0:o.user)==null?void 0:f.id})}).catch(h=>{console.error("Error updating wishlist:",h)})};a.active&&((l=o.user)!=null&&l.id)&&s.length!==((u=o.wishlist)==null?void 0:u.length)&&c()},[a,o,s]),v.useEffect(()=>{var u;const c=async()=>{const f=await Qe.get("fs::wishlist");f&&(f==null?void 0:f.length)!==s.length&&i(f)},l=async()=>{var p;const f=await Qe.get("fs::wishlist")??[],h=o.wishlist?typeof o.wishlist[0]=="object"?bg(o.wishlist):o.wishlist:[],d=[...new Set([...f,...h])];i(d),Qe.set("fs::wishlist",s),h.length!==d.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:d,docId:(p=o.user)==null?void 0:p.id})}).catch(g=>{console.error("Error updating wishlist:",g)})};if((u=o.user)!=null&&u.id){l();return}c()},[o,i,s]),r.jsx(ks,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};$u.displayName="Wishlist.Init";const zu=({product:e,priceInfo:t,size:n="medium",style:o,ICONS:s})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=le(),c=Tt(),{toggleProduct:l}=vt(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(m.Button,{adornment:{start:r.jsx(m.Icon,{size:n,name:c.includes(u)?s.favorite_true:s.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...o,border:"none"},variant:"tertiary"})};zu.displayName="WishList.Toggle";const Fu={Feedback:ks,Toggle:zu,Grid:Du,Init:$u},Bu=({product:e,tag:t,size:n="small"})=>{const o=e.offers.offers[0],{CONSTANTS:s}=Ve();return r.jsxs(xe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[t?r.jsx(m.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?r.jsx(m.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:n,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(Fu.Toggle,{product:e,priceInfo:{price:o.price,listPrice:o.listPrice},variant:"card",ICONS:s.ICONS})]})};Bu.displayName="ProductCard.Actions.Header";const qu=({className:e,children:t,hasPriority:n=!1,showVideo:o=!1,...s})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:f,order:h,CONSTANTS:d}=Ve(),p=U.getFirstImages({images:c,label:{first:d.MAIN_IMAGE,second:d.SECOND_IMAGE}});return r.jsxs("div",{...s,className:m.helpers.classNameConcat(Ae["product-card--image"],e),ref:a,style:{aspectRatio:d.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(De,{href:`/${l}/p`,onClick:f,onMouseUp:g=>{g.button===1&&f(),d.PLP_INFINITE_SCROLL&&sessionStorage.setItem(d.PLP_GRID_SCROLL_BACK.order,String(h))},children:r.jsx("div",{className:Ae["product-card--image--container"],children:Array.isArray(p)&&p.map(({url:g,alternateName:y},_)=>v.createElement(Ie.Image,{...d.PRODUCT_IMAGE_DIMENSIONS.product_card,style:d.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:_,...n&&{priority:_===0&&i<4},objectFit:"cover",src:g}))})}),d.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&o&&u&&r.jsx(xe.Video,{url:u,poster:p[0].url}),t]})};qu.displayName="ProductCard.Media.Media";const Hu=({className:e,callback:t,children:n,...o})=>{const{isMobile:s,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ve(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...o,className:m.helpers.classNameConcat(Ae["product-card--outstock"],e),children:[r.jsx(m.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),r.jsx(m.Button,{className:m.helpers.classNameConcat(e,"buy-button"),size:s?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};Hu.displayName="ProductCard.OutStock";const Uu=({children:e,className:t="",index:n,isMobile:o=!1,item:s,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...f})=>r.jsx($h,{item:s,isMobile:o,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...f,className:m.helpers.classNameConcat(Ae["product-card--wrapper"],t),"data-size":a,children:e})});Uu.displayName="ProductCard.Root";const Wu=({disabled:e,label:t,size:n,value:o,onClick:s,...a})=>r.jsxs(m.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:s,children:[r.jsx(m.ToggleSize.DisabledAdornment,{}),r.jsx(m.ToggleSize.Text,{children:t})]});Wu.displayName="ProductCard.SizeSelector.Item";const Gu=({active:e=!1,callback:t,selectedSku:n=null,item:o,setNotify:s})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ve();o.productId=a.id;const u=U.disableSKU(o),f=U.getSKUName(o,"tamanho");!u&&!l.current.availableSkus.includes(f)&&l.current.availableSkus.push(f);const h=v.useCallback(p=>{const g=n===p?null:p;typeof c=="function"&&c(g),typeof t=="function"&&t(g)},[t,c,n]),d=v.useCallback(()=>{if(u&&typeof s=="function"){s(a,o);return}h(o)},[o,s,h,u,a]);return r.jsx(Wu,{active:e,disabled:u,label:f,onClick:()=>d(),size:i?"x-small":"small",value:o})};Gu.displayName="ProductCard.SizeSelector.SkuItem";const Vu=({callback:e,className:t="",children:n,setNotify:o,...s})=>{const{isMobile:a,item:{isVariantOf:{hasVariant:i}},selectedSku:c}=Ve();return r.jsxs("div",{...s,className:m.helpers.classNameConcat(Ae["product-card--selectors--size"],t),"data-mobile":a,children:[r.jsx("div",{className:Ae["product-card--selectors--size--skus"],children:Array.isArray(i)&&i.map((l,u)=>r.jsx(Gu,{active:c===l,callback:e,item:l,selectedSku:c,setNotify:o},`size--${u}--${l.sku}`))}),r.jsx("div",{className:Ae["product-card--selectors--size--button"],children:n})]})};Vu.displayName="ProductCard.SizeSelector";const Ko=({alt:e="",callback:t,more:n,total:o=4,src:s,url:a,...i})=>r.jsxs(m.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[r.jsx(m.ToggleStyle.DisabledAdornment,{}),r.jsxs(m.ToggleStyle.Texture,{children:[s&&r.jsx(Ie.Image,{alt:e??s,src:s,height:34,width:34}),n&&r.jsx(m.TextStructure.DivWrapper,{className:Ae["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",o]})})]})]}),jg=({children:e,callback:t,data:n,total:o=4,size:s,...a})=>{const{index:i}=Ve(),{triggerSelectItemEventRef:c}=le();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,o).map((l,u)=>r.jsx(Ko,{callback:f=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(f)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:s},u)),Array.isArray(n)&&(n==null?void 0:n.length)>o&&r.jsx(Ko,{size:s,total:n.length-o,more:!0})]})},Ku=({callback:e,className:t,data:n,images:o=[],findTexture:s,...a})=>{const{CONSTANTS:i}=Ve(),c=s||i.TEXTURE_IMAGE,l=o==null?void 0:o.find(u=>c.includes(u.alternateName));return r.jsx(jg,{...a,callback:e,className:m.helpers.classNameConcat(Ae["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(Ko,{active:!0,size:"x-small",src:l.url})})};Ku.displayName="ProductCard.StyleSelector";const Xu=({className:e,hasDecimal:t,...n})=>{const{isMobile:o,item:{offers:{lowPrice:s,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ve();l.current.priceInfo={price:s,listPrice:a};const u=U.formatPriceToCurrency(a,t),f=U.formatPriceToCurrency(s,t),h=U.formatPriceToCurrency(c??0),d=o?"horizontal":"stacked";return r.jsx("div",{...n,className:m.helpers.classNameConcat(Ae["product-card--price"],e),"data-mobile":o,children:r.jsx(m.ProductInfo.Root,{size:"small",layout:d,children:r.jsxs(m.ProductInfo.Wrapper,{size:"small",layout:d,children:[r.jsx(m.ProductInfo.ValuesWrapper,{children:f!==u?r.jsxs(r.Fragment,{children:[r.jsx(m.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),r.jsx(m.ProductInfo.Price,{label:"discountPrice",value:f,size:"small"})]}):r.jsx(m.ProductInfo.Price,{label:"defaultPrice",value:f,size:"small"})}),i&&i>1&&c?r.jsx(m.ProductInfo.Price,{label:"installment",value:`${i}x ${h}`,size:"small"}):null]})})})};Xu.displayName="ProductCard.Price";const Yu=({tag:e,className:t})=>{const{item:{name:n}}=Ve();return r.jsxs("div",{className:m.helpers.classNameConcat(Ae["product-card--title"],t),children:[r.jsx("div",{className:Ae["product-card--title--tag"],children:e?r.jsx(m.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?r.jsx(m.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):r.jsx("div",{})}),r.jsx("div",{className:Ae["product-card--title--content"],children:n&&r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};Yu.displayName="ProductCard.Title";const Qu=({className:e,url:t,poster:n,...o})=>{const{element:s}=Ve();return v.useEffect(()=>{if(!(s!=null&&s.current))return;const a=s.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(f=>{f.forEach(h=>{U.setVideoPlay(h.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,s]),r.jsx("div",{...o,className:m.helpers.classNameConcat(Ae["product-card--video"],e),children:t&&r.jsx(Ie.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};Qu.displayName="ProductCard.Media.Video";const Zu=({children:e,className:t,type:n,...o})=>r.jsx("div",{...o,className:m.helpers.classNameConcat(Ae[`product-card--${n}`],t),children:e});Zu.displayName="ProductCard.Wrapper";const xe={Actions:bu,BuyButton:ju,Header:Bu,Media:qu,Root:Uu,OutStock:Hu,Price:Xu,SizeSelector:Vu,StyleSelector:Ku,Title:Yu,Video:Qu,Wrapper:Zu},Cg="_carousel_w0llv_1",Sg="_shelf__container_w0llv_14",Pg="_shelf_without_carousel_w0llv_34",wg="_card_container_w0llv_52",St={carousel:Cg,"custom-controllers":"_custom-controllers_w0llv_5",shelf__container:Sg,"controllers-arrows-bullets":"_controllers-arrows-bullets_w0llv_23",shelf_without_carousel:Pg,card_container:wg},qa=({title:e})=>r.jsx("div",{className:St.shelf__container,children:e&&r.jsx(m.TextStructure.Root,{children:r.jsxs(m.TextStructure.DivWrapper,{children:[r.jsx("h2",{className:m.helpers.classNameConcat("typography-style-body-md",U.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:m.helpers.classNameConcat("typography-style-heading-md",U.responsive["responsive-desktop-flex"]),children:e})]})})}),Eg=({children:e,ICONS:t,itemsPerPage:n,title:o})=>{const{isMobile:s}=ce(),a=n[s?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=m.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),f=v.Children.toArray(e).length;return s||f>=4?r.jsxs(m.Carousel.Root,{innerRef:d=>{i(d)},className:St.carousel,children:[r.jsxs("div",{className:St["custom-controllers"],children:[o&&r.jsx(qa,{title:o}),a<f&&r.jsxs(m.Carousel.Controller,{className:St["controllers-arrows-bullets"],children:[r.jsxs(m.Carousel.Arrows,{children:[r.jsx(m.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(m.Icon,{name:t.arrow_left})}}),r.jsx(m.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(m.Icon,{name:t.arrow_right})}})]}),!s&&a>2&&r.jsx(m.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:d=>c==null?void 0:c.navigateTo(d)})]})]}),r.jsx(m.Carousel.Body,{children:v.Children.map(e,(d,p)=>r.jsx(m.Carousel.Item,{style:{...l,overflow:"hidden"},children:d},`${o}_${p}`))})]}):r.jsxs(r.Fragment,{children:[o&&r.jsx(qa,{title:o}),r.jsx("div",{className:St.shelf_without_carousel,children:e})]})},Ju=({className:e,item:t,isMobile:n,size:o,shelfTitle:s,...a})=>{const i=v.useRef(null),{getAvailableProductTag:c}=ot(),{availability:{status:l}}=t,u=h=>{const d=h.filter(p=>!a.CONSTANTS.TEXTURE_IMAGE.includes(p.keywords));return n?d.splice(0,2):d},f=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:St.card_container,children:r.jsxs(xe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:s,children:[r.jsx(xe.Header,{product:t,tag:f==null?void 0:f.commercial}),r.jsx(xe.Media,{}),r.jsxs(xe.Wrapper,{type:"body",children:[r.jsx(xe.Title,{tag:f==null?void 0:f.institucional}),r.jsx(xe.Actions,{})]}),r.jsx(xe.Wrapper,{type:"footer"})]})})};Ju.displayName="ProductList.Card";const Ut={Shelf:Eg,Card:Ju},ed=({CONSTANTS:e,inView:t,products:n,innerRef:o})=>{const s=v.useMemo(()=>Mh(n),[n]),{isMobile:a}=ce(),{addItemsToCart:i}=Ee(),{sendDataLayerEvent:c}=le(),{getAvailableProductTag:l}=ot(),[u,f]=v.useState({totalPrice:0,products:{}}),h=()=>{const p=Object.values(u.products);i(p),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:p.map(g=>{const y=s.find(_=>_.node.id===g.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:p,price:u.totalPrice}}})},d=({selectedProduct:p,productId:g})=>{const y=Dh({selectedProduct:p,productId:g,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});f(y)};return v.useEffect(()=>{if(!t||s.length===0)return;const p=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:p},outsideEcommerceData:{item_list_name:p}}})},[t]),r.jsxs("div",{className:lt.container,ref:o,children:[r.jsx("div",{className:lt["carousel-container"],style:{width:s.length<=3?"max-content":"75%"},children:r.jsx(Ut.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:s.length>=3?2.2:s.length},ICONS:e.ICONS,children:Array.isArray(s)&&s.map(({node:p},g)=>{var b,S,x;const y=l(p.cluster.highlights),{availability:{status:_}}=p;return _?r.jsxs(xe.Root,{item:{...p,image:Is.helpers.product.getFirstImages({images:p.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:g,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[r.jsx(xe.Header,{product:p,tag:y.commercial}),r.jsx(xe.Media,{}),r.jsxs(xe.Wrapper,{type:"body",children:[r.jsx(xe.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(S=y.institucional)==null?void 0:S.enableIcon,icon:(x=y.institucional)==null?void 0:x.icon}}),r.jsx(xe.Actions,{children:r.jsx(xe.SizeSelector,{callback:j=>d({selectedProduct:j,productId:p.id})})})]})]},p.id):null})})}),r.jsx("div",{className:lt["add-cart-container"],children:r.jsx(Lh,{handleAddAllToCart:h,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Ds={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},$s=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=Ee(),{handleSelectContent:o}=le(),{CONSTANTS:s}=Pe(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(m.Header.SupportItem,{onClick:()=>{t(!0),o({content:"header:minicart"})},id:e,children:r.jsxs(m.Badge.AutoPositioner,{children:[r.jsx(m.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),r.jsx(m.Icon,{name:s.header.ICONS.bag,size:"medium"})]})})};$s.displayName="Header.Bag";const Yt=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(De,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,td=()=>{const{headerData:e}=Pe(),{handleSelectContent:t}=le(),{reset:n,updateValue:o}=Vt(),s=a=>{a?o(a):n()};return r.jsx(m.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(Yt,{href:a.link,onMouseEnter:()=>s(a.submenuId),onFocus:()=>s(a.submenuId),children:r.jsx(m.Header.CategoryItem,{className:Ds["btn-header"],value:a.submenuId??null,adornment:{start:r.jsx(m.Icon,{name:a.iconStart}),end:r.jsx(m.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};td.displayName="Header.Categories";function Rg(){const{handleSelectContent:e}=le(),{CONSTANTS:t}=Pe(),{setValue:n}=ms();return r.jsx(m.Header.SupportItem,{onClick:()=>{n(!0),e({content:"header:search"})},children:r.jsx(m.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Ag={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Ng={"observer-wrapper":"_observer-wrapper_r43gk_1"},$r=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:o,stopOnIntersection:s=!0,className:a,...i})=>{const c=v.useRef(null),l=us(c,s,n),{sendDataLayerEvent:u}=le();return v.useEffect(()=>{l&&(typeof o=="function"&&o(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:m.helpers.classNameConcat(Ng["observer-wrapper"],a),children:e})},rd=({thumbnails:e,category:t,isMobile:n=!0,callBack:o})=>{const{handleSelectPromotionEvent:s}=le(),a=50/e.length;return r.jsx("div",{className:Ag["menu-subcategories-container"],children:e.map((i,c)=>{const l=n?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return r.jsx($r,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(De,{href:i.link??"#",onClick:()=>{typeof o=="function"&&o(),s({updatePromotionRef:!0,promotion:u})},children:[r.jsx(Ie.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&r.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};rd.displayName="Menu.Thumbnail";const Xo={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},nd=({children:e,dividerOnRight:t=!0,subMenu:n,...o})=>{var l;const{router:s}=_e(),{reset:a}=Vt(),{handleSelectContent:i}=le(),{CONSTANTS:c}=Pe();return r.jsxs("div",{...o,className:Xo["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,f)=>{var p,g,y,_;const h=u.listCollapseDesk&&!((p=u.see_all)!=null&&p.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},d=u.listCollapseDesk&&!((g=u.see_all)!=null&&g.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:r.jsx(m.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return r.jsxs(m.ComponentList.Structure,{children:[r.jsx(Yt,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${n.label??""}`}))},children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("h2",{children:u.label})})})}),r.jsx(m.ComponentList.List,{columns:1,...h,className:Xo["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,S)=>r.jsx(m.ComponentList.ListItem,{id:`list-item-${b.label}-${S}`,children:r.jsx(rt,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${n.label??""}`})},children:b.label})},`list-item-${b.label}-${S}`))}),((_=u.see_all)==null?void 0:_.link)&&r.jsx(m.ComponentList.Support,{...d,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),s.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${f}`)}),t&&r.jsx(m.Utils.Divider,{size:"small",direction:"vertical"})]})};nd.displayName="Menu.Categories";const od=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:o}=Pe();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:Xo["menu-desktop"],style:{...n.style,justifyContent:o.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(m.Utils.Divider,{size:"small"})]})};od.displayName="Menu.MenuRoot";const Cn={Root:od,Categories:nd,Thumbnail:rd},sd=()=>{const{headerData:e,CONSTANTS:t}=Pe(),n=Zc(),{reset:o}=Vt();return r.jsx(m.Header.SubMenu,{children:Array.isArray(e.subMenus)&&e.subMenus.map((s,a)=>{const{thumbnails:i,label:c,id:l}=s,u=l===n,f=i==null?void 0:i.some(h=>!!h.srcDesk);return r.jsxs(Cn.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(Cn.Categories,{dividerOnRight:!!f,subMenu:s}),Array.isArray(i)&&r.jsx(Cn.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:o})]},`submenu-${l}-${a}`)})})};sd.displayName="Header.SubMenu";const ad=()=>{const{handleSelectContent:e}=le(),{CONSTANTS:t}=Pe();return r.jsx(De,{href:"/favoritos",children:r.jsx(m.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:r.jsx(m.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};ad.displayName="Header.WishList";const Ig="_root_wvekm_126",Ue={"user-menu--credits":"_user-menu--credits_wvekm_1","user-menu--content":"_user-menu--content_wvekm_10","user-menu--login":"_user-menu--login_wvekm_30","user-menu--login--content":"_user-menu--login--content_wvekm_37","user-menu--menu":"_user-menu--menu_wvekm_64","user-menu--tooltip":"_user-menu--tooltip_wvekm_93","tooltip-modifier":"_tooltip-modifier_wvekm_104","modal-controls-modifier":"_modal-controls-modifier_wvekm_109","modal-header-modifier":"_modal-header-modifier_wvekm_117",root:Ig},id=({className:e,children:t,...n})=>r.jsx("div",{...n,className:m.helpers.classNameConcat(Ue["user-menu--content"],e),children:t});id.displayName="UserMenu.Content";var cd=(e=>(e.Account="account",e))(cd||{});const ld=({className:e,cashBack:t,credits:n,link:o,total:s,...a})=>{const i=t?U.formatPriceToCurrency(t):void 0,c=n?U.formatPriceToCurrency(n):void 0,l=s?U.formatPriceToCurrency(s):void 0;return r.jsx(m.Credits.Account,{...a,className:m.helpers.classNameConcat(Ue["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:o,totalValue:l,type:cd.Account})};ld.displayName="UserMenu.Credits";const ud=({className:e,children:t,description:n,text:o,...s})=>{const{isMobile:a}=ce();return r.jsx("div",{...s,className:m.helpers.classNameConcat(Ue["user-menu--login"],e),"data-mobile":a,children:r.jsxs("div",{className:Ue["user-menu--login--content"],children:[r.jsx(m.TextStructure.Root,{children:r.jsxs(m.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[r.jsx("h3",{className:"typography-style-body-lg-strong",children:o}),r.jsx("p",{children:n})]})}),t]})})};ud.displayName="UserMenu.Login";const dd=({className:e,isLogged:t,onLogoutClick:n,ICONS:o,storeConfig:s,isMobile:a})=>{const i=a?ra:ra({ICONS:o,storeConfig:s}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return r.jsxs("ul",{className:m.helpers.classNameConcat(Ue["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>r.jsx("li",{children:r.jsx(rt,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:r.jsx(m.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?r.jsx("li",{children:r.jsx(rt,{href:`${s.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${s.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(m.Icon,{name:Wm(o)})},children:Um})}):r.jsx(r.Fragment,{})]})};dd.displayName="UserMenu.Menu";const fd=e=>{const t=v.useRef(null),n=v.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=v.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=v.useCallback(a=>{a.key==="Escape"&&e()},[e]);return v.useEffect(()=>(document.addEventListener("mousedown",n),document.addEventListener("keydown",s),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",s),document.removeEventListener("touchstart",o)}),[n,s,o]),{ref:t}},Tg=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Og=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:o,left:s,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Tg(e==null?void 0:e.parentElement):0;return{left:s+i/2-(c.width+l*2),top:a+o+n}},pd=v.createContext({}),kg=({children:e,delay:t=600,gap:n=20,isOpen:o,setIsOpen:s,target:a,...i})=>{const c=v.useRef(null),[l,u]=v.useState(!1),[f,h]=v.useState({left:0,top:0}),{ref:d}=fd(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{s(!1),u(!1)},t))});return v.useEffect(()=>{if(a&&(d!=null&&d.current)){const{left:p,top:g}=Og(d.current,a,n??0);h({left:p,top:g}),u(!1)}},[n,o,a,d]),r.jsx(pd.Provider,{value:v.useMemo(()=>({...i,...f,contentRef:d,isLeaving:l,isOpen:o,setIsOpen:s,setIsLeaving:u,target:a}),[i,f,d,l,o,s,u,a]),children:e})},md=()=>{const e=v.useContext(pd);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},hd=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:o,setIsOpen:s}=md();return r.jsxs(m.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:o,setIsOpen:s,variant:"sideBottom",className:Ue["modal-root-modifier"],style:{zIndex:n.user_menu_mobile},children:[r.jsx(m.Modal.Header,{navigation:"top",className:Ue["modal-header-modifier"],children:r.jsx(m.Modal.Controls,{navigation:"top",isMobile:!0,className:Ue["modal-controls-modifier"]})}),r.jsx(m.Modal.Body,{children:e})]})};hd.displayName="UserMenu.Modal";const gd=({children:e,component:t,Z_INDEX_WAR:n,isMobile:o,...s})=>r.jsx(kg,{...s,className:Ue.root,children:o?r.jsxs(r.Fragment,{children:[r.jsx(ct.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(ct.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});gd.displayName="UserMenu.Root";const yd=({children:e,component:t,Z_INDEX_WAR:n,...o})=>{const{contentRef:s,left:a,isLeaving:i,isOpen:c,top:l}=md();return r.jsx(m.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...o,ref:s,children:t}),className:m.helpers.classNameConcat(Ue["user-menu--tooltip"],Ue["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:n.user_menu},children:r.jsx("div",{className:Ue["user-menu--tooltip"],children:e})})};yd.displayName="UserMenu.Tooltip";const ct={Credits:ld,Content:id,Login:ud,Menu:dd,Modal:hd,Root:gd,Tooltip:yd},zr=({children:e,isOpen:t,setIsOpen:n,target:o,storeConfig:s})=>{var d,p,g;const{isMobile:a}=ce(),{CONSTANTS:i}=Pe(),c=Ot(),l=()=>{window.location.href=`${s.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${s.storeUrl}?ab_test=v2`)}`},u=!!((d=c.user)!=null&&d.userId),{cashback:f,credits:h}=v.useMemo(()=>{var y,_;return{credits:((y=c==null?void 0:c.getCurrentCredits())==null?void 0:y.credits)??0,cashback:((_=c==null?void 0:c.getCurrentCredits())==null?void 0:_.cashback)??0}},[c]);return r.jsx(ct.Root,{component:r.jsxs(ct.Content,{children:[r.jsx(ct.Login,{description:Vm(u),text:Gm(u,((p=c==null?void 0:c.user)==null?void 0:p.firstName)??((g=c==null?void 0:c.user)==null?void 0:g.email)),children:!u&&r.jsx(m.Button,{size:"medium",variant:"quaternary",onClick:()=>l(),children:i.header.MENU_INFO.login.button_text})}),h+f&&u?r.jsx(ct.Credits,{credits:h,cashBack:f,link:`${s.secureSubdomain}/account#/meus-creditos`,total:h+f}):r.jsx(r.Fragment,{}),r.jsx(m.Utils.Divider,{}),r.jsx(ct.Menu,{ICONS:i.header.ICONS,storeConfig:s,isLogged:u,className:U.responsive["responsive-desktop-flex"],onLogoutClick:()=>c.logout()}),r.jsx(ct.Menu,{ICONS:i.header.ICONS,storeConfig:s,isMobile:!0,isLogged:u,className:U.responsive["responsive-mobile-flex"],onLogoutClick:()=>c.logout()})]}),isOpen:t,isMobile:a,setIsOpen:n,target:o,Z_INDEX_WAR:i.header.Z_INDEX_WAR,children:e})};zr.displayName="UserMenu";const _d=({storeConfig:e})=>{const{CONSTANTS:t,userMenuDesktopRef:n}=Pe(),{handleSelectContent:o}=le(),{reset:s}=Vt(),{setValue:a}=gs(),i=hs(),c=v.useRef(null);return r.jsxs(r.Fragment,{children:[r.jsxs(m.Header.Wrapper,{children:[r.jsx(m.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",onMouseEnter:s,children:r.jsx(m.Icon,{name:t.header.ICONS.logo,size:"x-large",onClick:()=>{o({content:"header:logo"})}})})}),r.jsx(td,{}),r.jsxs(m.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(Rg,{}),r.jsx(zr,{isOpen:i,setIsOpen:a,target:c.current,storeConfig:e,children:r.jsx(m.Header.SupportItem,{onClick:()=>{a(!0),o({content:"header:user_menu"})},className:Ds["btn-login"],innerRef:n,children:r.jsx(m.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(ad,{}),r.jsx($s,{id:"cart-button"})]})]}),r.jsx(sd,{})]})};_d.displayName="Header.HeaderDesktopWrapper";const Fe={"menu--banners":"_menu--banners_1bvvz_1","menu--banners--item":"_menu--banners--item_1bvvz_6","menu--banners--item--text":"_menu--banners--item--text_1bvvz_17","menu--banners--list":"_menu--banners--list_1bvvz_21","menu--dummy-close":"_menu--dummy-close_1bvvz_46","menu--body":"_menu--body_1bvvz_54","menu--categories":"_menu--categories_1bvvz_67","menu--categories--title":"_menu--categories--title_1bvvz_80","menu--step":"_menu--step_1bvvz_92","menu--sub-category":"_menu--sub-category_1bvvz_108","menu--sub-category--item":"_menu--sub-category--item_1bvvz_115","menu--sub-category--list":"_menu--sub-category--list_1bvvz_121"},vd=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:o,submenuId:s,label:a,...i})=>r.jsx("button",{...i,className:Fe["menu--banners--item"],children:n?r.jsxs(m.Banner.Container,{children:[r.jsx(m.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{alt:t??n,height:128,src:n,width:343,unoptimized:!0})}),r.jsx(m.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{className:Fe["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:o?{color:o}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});vd.displayName="Menu.Mobile.Category";const xd=({label:e,...t})=>{const{CONSTANTS:n}=Pe();return r.jsx(m.Button,{...t,adornment:{end:r.jsx(m.Icon,{name:n.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};xd.displayName="Menu.Mobile.Body.Category";const bd=({subCategory:e,submenuLabel:t,onHandleOut:n,...o})=>r.jsx("div",{...o,className:Fe["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((s,a)=>r.jsx(rt,{disableUnderline:!0,disablePadding:!1,href:s.link??"#",onClick:()=>n(s.label,t),size:"medium",title:s.label??"",children:s.label},a)))});bd.displayName="Menu.Mobile.List";const jd=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Fe["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((o,s)=>r.jsxs("div",{className:Fe["menu--sub-category--item"],children:[r.jsx(qt.Title,{onHandleOut:t,subCategory:o,submenuLabel:e==null?void 0:e.id}),r.jsx(qt.List,{onHandleOut:t,subCategory:o,submenuLabel:e==null?void 0:e.id})]},s)))}):r.jsx(r.Fragment,{})};jd.displayName="Menu.Mobile.Body.SubCategory";const Cd=({subCategory:e,submenuLabel:t,onHandleOut:n,...o})=>{var c;const{router:s}=_e(),{handleSelectContent:a}=le(),{CONSTANTS:i}=Pe();return r.jsxs("div",{...o,className:Fe["menu--categories--title"],children:[r.jsx(Yt,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&r.jsx(m.ComponentList.Support,{adornment:{end:r.jsx(m.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;n(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&s.push(e.see_all.link)},children:e.see_all.label})]})};Cd.displayName="Menu.Mobile";const qt={Banner:vd,Category:xd,List:bd,SubCategory:jd,Title:Cd},Sd=v.createContext({}),Lg=({children:e})=>{const[t,n]=v.useState(null),o=v.useCallback(()=>{n(null)},[]),s=a=>{a!==t&&n(a)};return r.jsx(Sd.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:o,handleChangeSubMenuOpened:s},children:e})},Pd=()=>v.useContext(Sd),wd=e=>{const{router:t}=_e(),{headerData:n}=Pe(),{handleSelectContent:o}=le(),{currentCategory:s,setCurrentCategory:a}=Pd(),i=v.useRef(null),c=()=>{if(i.current){const d=i.current;d&&(a(null),d==null||d.click())}},l=(d,p)=>{o({content:`menu:${d}`}),t.push(p),c()},u=(d,p)=>{o({content:`menu:${d}:${p}`}),c()},f=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],h=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[];return r.jsxs("div",{...e,className:Fe["menu--body"],style:{transform:`translate3d(calc(-100% * ${s?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Fe["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Fe["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Fe["menu--banners"],children:r.jsx("div",{className:Fe["menu--banners--list"],children:f.map((d,p)=>v.createElement(qt.Banner,{...d,key:p,onClick:()=>l(d.label,d.link)},d.mobileBannerAlt))})}),r.jsx("div",{className:Fe["menu--categories"],children:f.map((d,p)=>r.jsx(qt.Category,{label:d.label,onClick:()=>a(d.submenuId??null)},p))})]}),r.jsx("div",{className:Fe["menu--step"],"data-active":!!s,children:r.jsx(qt.SubCategory,{current:h.find(d=>d.id===s),onHandleOut:u})})]})};wd.displayName="Menu.Mobile.Body";const Mg={"menu--header":"_menu--header_1ozdf_1"},Ed=()=>{var s;const{headerData:e}=Pe(),{currentCategory:t,setCurrentCategory:n}=Pd(),o=(s=e==null?void 0:e.categories)==null?void 0:s.find(a=>a.submenuId===t);return r.jsxs("div",{className:Mg["menu--header"],children:[r.jsx(m.Button,{"data-out":!o,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),o&&r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:o==null?void 0:o.label})})}),r.jsx(m.Button,{iconNameStart:"close","data-close":!0,"data-only":!o,mode:"inverse",onClick:()=>n(null)})]})};Ed.displayName="Menu.Mobile.Header";var Yo={exports:{}};function Dg(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Sn={},Pn={},Ha;function $g(){return Ha||(Ha=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return o}});const o=ke._(v).default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="LoadableContext")}(Pn)),Pn}var Ua;function zg(){return Ua||(Ua=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return p}});const n=ke._(v),o=$g();function s(g){return g&&g.default?g.default:g}const a=[],i=[];let c=!1;function l(g){let y=g(),_={loading:!0,loaded:null,error:null};return _.promise=y.then(b=>(_.loading=!1,_.loaded=b,b)).catch(b=>{throw _.loading=!1,_.error=b,b}),_}function u(g,y){let _=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),b=null;function S(){if(!b){const P=new f(g,_);b={getCurrentValue:P.getCurrentValue.bind(P),subscribe:P.subscribe.bind(P),retry:P.retry.bind(P),promise:P.promise.bind(P)}}return b.promise()}if(typeof window>"u"&&a.push(S),!c&&typeof window<"u"){const P=_.webpack&&typeof Dg.resolveWeak=="function"?_.webpack():_.modules;P&&i.push(E=>{for(const C of P)if(E.includes(C))return S()})}function x(){S();const P=n.default.useContext(o.LoadableContext);P&&Array.isArray(_.modules)&&_.modules.forEach(E=>{P(E)})}function j(P,E){x();const C=n.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return n.default.useImperativeHandle(E,()=>({retry:b.retry}),[]),n.default.useMemo(()=>C.loading||C.error?n.default.createElement(_.loading,{isLoading:C.loading,pastDelay:C.pastDelay,timedOut:C.timedOut,error:C.error,retry:b.retry}):C.loaded?n.default.createElement(s(C.loaded),P):null,[P,C])}return j.preload=()=>S(),j.displayName="LoadableComponent",n.default.forwardRef(j)}class f{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:_}=this;y.loading&&(typeof _.delay=="number"&&(_.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},_.delay)),typeof _.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},_.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(b=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(_=>_())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,_){this._loadFn=y,this._opts=_,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function h(g){return u(l,g)}function d(g,y){let _=[];for(;g.length;){let b=g.pop();_.push(b(y))}return Promise.all(_).then(()=>{if(g.length)return d(g,y)})}h.preloadAll=()=>new Promise((g,y)=>{d(a).then(g,y)}),h.preloadReady=g=>(g===void 0&&(g=[]),new Promise(y=>{const _=()=>(c=!0,y());d(i,g).then(_,_)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=h.preloadReady);const p=h}(Sn)),Sn}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(f,h){for(var d in h)Object.defineProperty(f,d,{enumerable:!0,get:h[d]})}n(t,{noSSR:function(){return l},default:function(){return u}});const o=ke,s=o._(v),a=o._(zg()),i=typeof window>"u";function c(f){return{default:(f==null?void 0:f.default)||f}}function l(f,h){if(delete h.webpack,delete h.modules,!i)return f(h);const d=h.loading;return()=>s.default.createElement(d,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(f,h){let d=a.default,p={loading:_=>{let{error:b,isLoading:S,pastDelay:x}=_;if(!x)return null;if(process.env.NODE_ENV!=="production"){if(S)return null;if(b)return s.default.createElement("p",null,b.message,s.default.createElement("br",null),b.stack)}return null}};f instanceof Promise?p.loader=()=>f:typeof f=="function"?p.loader=f:typeof f=="object"&&(p={...p,...f}),p={...p,...h};const g=p.loader,y=()=>g!=null?g().then(c):Promise.resolve(c(()=>null));return p.loadableGenerated&&(p={...p,...p.loadableGenerated},delete p.loadableGenerated),typeof p.ssr=="boolean"&&!p.ssr?(delete p.webpack,delete p.modules,l(d,p)):d({...p,loader:y})}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Yo,Yo.exports);var Fg=Yo.exports,Bg=Fg;const Rd=kr(Bg),Pr={"modal-modifier":"_modal-modifier_394qw_1","menu--navigation-bar":"_menu--navigation-bar_394qw_15","menu--root":"_menu--root_394qw_25"},Ad=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=xs(),{CONSTANTS:o}=Pe();return r.jsxs(m.Modal.RootWithoutPortal,{className:Pr["modal-modifier"],isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:o.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Ed,{}),r.jsx(m.Modal.Body,{className:Pr["menu--root"],children:e})]})};Ad.displayName="Menu.MenuRoot";const qg=Rd(()=>Promise.resolve(Ad),{ssr:!1}),Nd=({children:e,last:t=!1,...n})=>r.jsxs(r.Fragment,{children:[r.jsx(m.Button,{...n,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&r.jsx(m.Utils.Divider,{direction:"vertical",size:"small",className:Pr.divider})]});Nd.displayName="Menu.NavigationBarItem";const Id=()=>{const{setUserMenuIsOpen:e}=xs(),{handleSelectContent:t}=le(),{CONSTANTS:n}=Pe(),{router:o}=_e(),s=[{iconNameStart:n.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:n.header.MENU_INFO.login.button_text},{iconNameStart:n.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),o.push("/favoritos")},text:n.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:n.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),o.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(m.Card,{id:"menu-navigationbar",shadow:!0,className:Pr["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(s)&&s.map((a,i)=>v.createElement(Nd,{...a,key:i},a.text))})};Id.displayName="Menu.NavigationBar";const wn={Body:wd,NavigationBar:Id,Root:qg},Td=({storeConfig:e,SearchModal:t})=>{const n=v.useRef(null),{CONSTANTS:o}=Pe(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:a}=o.header,{handleSelectContent:i}=le(),{setValue:c}=ms(),{setValue:l}=tl(),{setValue:u}=gs(),f=hs(),h=el(),d=nl();return r.jsxs(r.Fragment,{children:[r.jsxs(m.Header.Wrapper,{children:[r.jsx(m.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",children:r.jsx(m.Icon,{name:a.logo,size:"x-large",onClick:()=>{i({content:"header:logo"})}})})}),r.jsxs(m.Header.Support,{children:[r.jsx(m.Header.SupportItem,{onClick:()=>{c(!0),i({content:"header:search"})},children:r.jsx(m.Icon,{name:a.search,size:"medium"})}),r.jsx($s,{}),r.jsxs(m.Header.SupportItem,{onClick:()=>l(!0),children:[r.jsx("span",{ref:n}),r.jsx(m.Icon,{name:a.menu,size:"medium"})]})]})]}),r.jsx(t,{setModalIsOpen:c,isOpen:d,recommendations:!1,trends:!0}),r.jsx(gl,{menuIsOpen:h,setMenuIsOpen:l,userMenuIsOpen:h,setUserMenuIsOpen:u,children:r.jsx(zr,{storeConfig:e,isOpen:f,setIsOpen:u,target:n==null?void 0:n.current,children:r.jsxs(wn.Root,{children:[r.jsx(wn.Body,{}),s?r.jsx(wn.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Td.displayName="Header.HeaderMobileWrapper";const Hg=v.createContext({}),Ug=({children:e})=>{const{sendDataLayerEvent:t}=le(),{cartStore:n,isOpen:o}=Ee();v.useEffect(()=>{o&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[o]),v.useEffect(()=>{var a,i,c;if(n.id&&!((i=(a=n.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=n;mt.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:Hc(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);const s=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return r.jsx(Hg.Provider,{value:{handleUpdateItemQuantityEvent:s},children:e})},Wg="_fadeInOut_ottz1_1",Gg="_fadeOut_ottz1_1",de={"mc--cashback":"_mc--cashback_ottz1_1","mc--cashback--positive":"_mc--cashback--positive_ottz1_21","mc--cashback--alert":"_mc--cashback--alert_ottz1_24","mc--container--actions":"_mc--container--actions_ottz1_28","mc--container--actions--secondary":"_mc--container--actions--secondary_ottz1_36","mc--container--actions--toggle-size-modifier":"_mc--container--actions--toggle-size-modifier_ottz1_54","mc--footer":"_mc--footer_ottz1_58","mc--footer--actions":"_mc--footer--actions_ottz1_67","mc--footer--actions-button":"_mc--footer--actions-button_ottz1_73","mc--footer--total":"_mc--footer--total_ottz1_89","mc--footer--total--info":"_mc--footer--total--info_ottz1_94","mc--footer--total--info--content":"_mc--footer--total--info--content_ottz1_99","mc--field":"_mc--field_ottz1_143","mc--body":"_mc--body_ottz1_183","mc--body--products":"_mc--body--products_ottz1_190","mc--body--empty--feedback":"_mc--body--empty--feedback_ottz1_198","mc--body--empty--text":"_mc--body--empty--text_ottz1_203","mc--header":"_mc--header_ottz1_217","mc--header--subtitle":"_mc--header--subtitle_ottz1_243","mc--notify":"_mc--notify_ottz1_284","mc--notify--content":"_mc--notify--content_ottz1_299","mc--notify--item":"_mc--notify--item_ottz1_312",fadeInOut:Wg,fadeOut:Gg,"mc--card":"_mc--card_ottz1_374","mc--card--actions":"_mc--card--actions_ottz1_379","mc--card--actions--secondary":"_mc--card--actions--secondary_ottz1_387","mc--card--actions--add-remove":"_mc--card--actions--add-remove_ottz1_414","mc--card--actions--gift":"_mc--card--actions--gift_ottz1_428","mc--card--content-info":"_mc--card--content-info_ottz1_444","mc--card--details":"_mc--card--details_ottz1_451","mc--card--link":"_mc--card--link_ottz1_456","mc--product--unavailable":"_mc--product--unavailable_ottz1_464","mc--card--name":"_mc--card--name_ottz1_467","mc--card--price":"_mc--card--price_ottz1_482","mc--card--price--old-price":"_mc--card--price--old-price_ottz1_492","mc--card--price--price-details":"_mc--card--price--price-details_ottz1_496","mc--card--product-link":"_mc--card--product-link_ottz1_507","mc--discount":"_mc--discount_ottz1_517","mc--discount--body":"_mc--discount--body_ottz1_526","minicart--modal-modifier":"_minicart--modal-modifier_ottz1_547"},Od=({item:{id:e,message:t,callback:n},removeNotification:o,ICONS:s})=>{const a=v.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{o(l)};return r.jsx("div",{className:de["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:r.jsxs(m.SnackBar.Structure,{size:"medium",children:[r.jsx(m.SnackBar.Content,{title:t}),r.jsxs(m.SnackBar.Support,{children:[typeof n=="function"&&r.jsx(m.Button,{onClick:()=>{n(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),r.jsx(m.Button,{iconNameStart:s.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};Od.displayName="MiniCart.Notify.Item";const kd=({ICONS:e})=>{const t=fs(),{removeNotification:n}=ps(),o=t.length?[...t].sort((s,a)=>a.id-s.id):[];return r.jsx("div",{className:de["mc--notify"],children:r.jsx("div",{className:de["mc--notify--content"],children:Array.isArray(o)&&o.map(s=>r.jsx(Od,{item:s,removeNotification:n,ICONS:e},s.id))})})};kd.displayName="MiniCart.Notifications";const Vg=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:o,...s})=>{const a=Tt(),{toggleProduct:i}=vt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(m.Button,{...s,adornment:{end:r.jsx(m.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${o.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:o.messages.add_wishlist_button})},Ld=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:o,...s})=>{const{addToCart:a,removeToCart:i}=Ee(),{bundleItems:c=[],id:l,uniqueId:u,seller:f,offerings:h,quantity:d}=t,p=(g,y,_)=>{i(l,g.title,()=>{typeof _=="function"&&_(),a({id:l,quantity:y,seller:f},{id:l,texture:g.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:de["mc--card--actions--add-remove"],children:[o.has_wishlist_button&&r.jsx(Vg,{...s,product:t,handleSendEvent:e,onHandleRemove:p,ICONS:n,MINICART_CONFIG:o}),r.jsx(m.Button,{...s,adornment:{end:r.jsx(m.Icon,{name:n.delete,size:"small"})},variant:"secondary",state:"danger",onClick:()=>{p({texture:"mini-cart",title:`${o.messages.remove}`},d),e("remove_from_cart","skuEvents")},children:o.messages.remove_button})]}),o.has_gift_option&&r.jsx(Ct.Gift,{uniqueId:u,bundleItems:c,offerings:h,ICONS:n,MINICART_CONFIG:o})]})};Ld.displayName="MiniCart.Card.Actions";const Md=({bundleItems:e,offerings:t,uniqueId:n,ICONS:o,MINICART_CONFIG:s})=>{const[a,i]=v.useState(!1),{toggleGiftItemCart:c}=Ee(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[h]=t;if(h){i(!0);const d=e.some(p=>p.id===h.id);c(n,String(h.id),d).then(()=>i(!1))}}},u=t[0],f=e.find(h=>h.id===u.id);return u&&"id"in u?r.jsx("div",{className:de["mc--card--actions--gift"],children:r.jsx(m.Checkbox,{adornment:r.jsx(m.Icon,{name:o.check}),checked:!!f,disabled:a,label:s.messages.giftPackage,onChange:l})}):null};Md.displayName="MiniCart.Card.Gift";const Dd=({itemOffered:e})=>{const t=U.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(De,{href:`${e==null?void 0:e.slug}`,className:de["mc--card--product-link"],children:r.jsx(Ie.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164})})};Dd.displayName="MiniCart.Card.Media";const $d=({name:e,skuName:t,tagName:n,className:o})=>r.jsxs(r.Fragment,{children:[n&&r.jsx(m.Tag,{variant:"quaternary",title:n,style:{textTransform:"uppercase"},children:n}),r.jsx("p",{className:m.helpers.classNameConcat(de["mc--card--name"],o),children:U.getProductNameWithoutSku(e??"",t??"")})]});$d.displayName="MiniCart.Card.Name";const zd=({total:e,totalList:t})=>r.jsx(m.ProductInfo.Root,{children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{className:de["mc--card--price"],children:r.jsx(m.ProductInfo.Wrapper,{className:de["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?r.jsxs(r.Fragment,{children:[r.jsx(m.ProductInfo.Price,{label:"originalPrice",value:U.formatPriceToCurrency(t),size:"small"}),r.jsx(m.ProductInfo.Price,{label:"discountPrice",value:U.formatPriceToCurrency(e),size:"small"})]}):r.jsx(m.ProductInfo.Price,{label:"defaultPrice",value:U.formatPriceToCurrency(e),size:"small"})})})})});zd.displayName="MiniCart.ProductPrice";const Fd=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[o,s]=v.useState(""),a=v.useRef(null),{cartStore:{options:i}}=Ee(),c=e.itemOffered.isVariationOf.productGroupID,l=v.useCallback(()=>{var h;const f=(h=i==null?void 0:i.find(d=>d.id===c))==null?void 0:h.texture;if(f){s(f);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(d=>d.json()).then(d=>{const p=d.data[0].items.find(g=>g.itemId===e.id);if(p){const g=p.images.find(y=>t.includes(y.imageLabel));if(g!=null&&g.imageUrl){s(g.imageUrl);return}s(p.images[0].imageUrl)}}).catch(d=>{console.error(d)})},[i,c,e.id]);return v.useEffect(()=>{if(!a.current)return;new IntersectionObserver(l).observe(a.current)},[l]),r.jsx("div",{ref:a,children:r.jsx(m.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(m.ToggleStyle.Texture,{children:o?r.jsx(Ie.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:o,width:164,height:164,style:n}):r.jsx(lu,{})})})})};Fd.displayName="MiniCart.Card.Style";const Bd=({product:e,NAME_SPLIT_SYMBOL:t,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{size:s}=U.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",t);return r.jsxs(m.Utils.Row,{alignItems:"center",children:[r.jsx(Fd,{product:e,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o}),r.jsx(m.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),s&&r.jsx(m.ToggleSize.Wrapper,{size:"small",variation:"fill",className:de["mc-container-actions--toggle-size-modifier"],children:r.jsx(m.ToggleSize.Text,{children:s})})]})};Bd.displayName="MiniCart.Card.Sku";const Ct={Actions:Ld,Gift:Md,Media:Dd,Name:$d,Price:zd,Sku:Bd},Kg=e=>{var t;return{price:e.sellingPrice/100,listPrice:e.listPrice/100,totalPrice:(((t=e.priceDefinition)==null?void 0:t.total)??0)/100,totalListPrice:e.listPrice*e.quantity/100}},qd=({available:e=!0,index:t,product:n,ICONS:o,MINICART_CONFIG:s,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var h,d;const{sendDataLayerEvent:l}=le(),u=Kg(n),f=(p,g)=>{const y={commonData:{...n,...u},customData:{index:t},event:p};if(g==="skuEvents"){const _={...n,...u};y.supportData={selectedSkus:[_]},y.commonData.products=[_]}l({functionKey:g,data:y})};return r.jsxs("div",{className:m.helpers.classNameConcat(de["mc--card"],e?"":de["mc--card--unavailable"]),children:[r.jsx(Ct.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:de["mc--card--content-info"],children:[r.jsx(Ct.Name,{name:((h=n.itemOffered)==null?void 0:h.name)??"",skuName:(d=n.itemOffered)==null?void 0:d.skuName}),r.jsxs("div",{className:de["mc--card--details"],children:[r.jsx("div",{className:de["mc--card--actions"],children:e?r.jsx(Ct.Price,{total:u.price,totalList:u.listPrice}):r.jsx(m.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:de["mc--card--actions--secondary"],children:[e&&r.jsx(Ct.Sku,{product:n,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(Ct.Actions,{handleSendEvent:f,product:n,size:"small",variant:"tertiary",ICONS:o,MINICART_CONFIG:s})]})]})]})]})};qd.displayName="MiniCart.Card";const Hd=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:o}=Ot(),s=((a=o==null?void 0:o.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return s>0?r.jsxs("div",{className:m.helpers.classNameConcat(de["mc--cashback"],de[`mc--cashback--${e}`]),children:[r.jsx(m.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:U.formatPriceToCurrency(s)})," ",n.title]})]}):null};Hd.displayName="MiniCart.Cashback";const Ud=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:o,removeCoupon:s,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=Ee(),[l,u]=v.useState(!1),[f,h]=v.useState(!1),d=v.useCallback(()=>{let _="";return e==="coupon"?_=(i==null?void 0:i.coupon)??"":_=String((c==null?void 0:c.value)??""),_.toUpperCase()??""},[i,c,e]),[p,g]=v.useState(!!d()),y=async _=>{h(!0),!!d()&&(e==="coupon"?await s():await a(),g(!1),u(!1)),await o(_,e).then(S=>{if(!S.statusOk&&_||S.code!==200){_?(u(!0),g(!1)):u(!1);return}g(!0),u(!1)}).catch(()=>u(!0)).finally(()=>h(!1))};return r.jsx(Le.Field,{hasError:l,hasSuccess:p,isLoading:f,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:d(),MINICART_CONFIG:n,ICONS:t})};Ud.displayName="MiniCart.CouponSeller";const Wd=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:o}=_e(),s=()=>{o.push(n.link)};return r.jsxs(m.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:de["mc--body--empty--feedback"],children:[r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsxs("p",{className:`typography-style-body-xs ${de["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(m.Button,{variant:"tertiary",size:"large",onClick:()=>s(),"data-close":!0,adornment:{end:r.jsx(m.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Wd.displayName="MiniCart.Feedback";const Xg=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},Gd=({feedback:e,hasError:t,onHandler:n,hasSuccess:o,type:s,title:a,value:i,ICONS:c})=>{const[l,u]=v.useState(i);v.useEffect(()=>{t||u(i)},[i,t]);const f=()=>t?r.jsx(m.Icon,{name:c.delete_circle}):String(i).length&&o?r.jsx(m.Icon,{name:c.check_circle}):null,h=()=>{if(s==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},d=()=>{if(s==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},p=y=>{const _=y.currentTarget.value;if(_===""&&typeof n=="function"||o&&String(i).length>0&&_!==String(i)||t&&_!==String(i)){u(""),n("");return}if(s==="cep"){const S=Xg(_);u(S)}else u(_)},g=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof n=="function"){const _=y.currentTarget.value;n(_)}};return r.jsx(m.TextField.Input,{adornment:{end:f()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:h,onBlur:d,onChange:p,onKeyDown:g})};Gd.displayName="MiniCart.Field.Input";const Vd=({title:e,ICONS:t,MINICART_CONFIG:n,...o})=>{const s=v.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:f}=o,h=()=>i?"error":String(f).length&&a?"success":"none",d=v.useCallback(()=>{if(s.current){const y=s.current.querySelector("input");y&&typeof l=="function"&&(f!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,f,i]),p=h();return r.jsx("div",{ref:s,children:r.jsx(m.TextField.Structure,{className:de["mc--field"],input:r.jsx(Gd,{...o,feedback:p,title:e,ICONS:t}),right:r.jsx(m.Button,{"data-has-success":!a,size:"medium",title:String(f).length&&a||i?"Remover":"Aplicar",onClick:()=>d(),disabled:c,children:String(f).length&&a||i?r.jsx(m.Icon,{name:"close",size:"small"}):`${n.messages.promo_code_button}`}),supportText:u==="cep"&&p==="success"?r.jsx(m.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};Vd.displayName="MiniCart.Field";const Kd=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:o,PLP_NOT_RESULT:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i})=>{const{cartStore:{items:c,messages:l}}=Ee();return r.jsxs(m.Modal.Body,{className:de["mc--body"],children:[e,r.jsx("div",{className:de["mc--body--products"],children:Array.isArray(c)&&c.length?c.map((u,f)=>{const h=l.find(d=>{var p;return d.code==="withoutStock"&&((p=d.fields)==null?void 0:p.ean)===u.ean})!==void 0;return r.jsx(Le.Card,{available:!u.availability.includes("outStock")||!h,index:f,product:u,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i},`${u.id}-${u.itemOffered.sku}-${f}`)}):r.jsx(Le.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:s})})]})};Kd.displayName="MiniCart.Body";const Xd=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:o}=Ee();if(o.items.length===0)return null;const s=()=>{var i;const a=new URLSearchParams({orderFormId:o.id,...((i=o.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:o.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return r.jsxs(m.Modal.Footer,{className:de["mc--footer"],children:[e,r.jsx("div",{className:de["mc--footer--actions"],children:r.jsx(m.Button,{variant:"primary",size:"large","data-close":!0,className:de["mc--footer--actions-button"],onClick:s,children:n.messages.checkout_button})})]})};Xd.displayName="MiniCart.Modal.Footer";const Yd=({children:e,className:t,ICONS:n,MINICART_CONFIG:o})=>r.jsxs(m.Accordion.Wrapper,{className:de["mc--discount"],children:[r.jsx(m.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:r.jsx(m.Icon,{name:n.arrow_up,size:"medium"}),openIndicator:r.jsx(m.Icon,{name:n.arrow_down,size:"medium"}),className:m.helpers.classNameConcat(de["mc--discount--header"],t),startOpen:o.promotion_input_starts_open,children:r.jsx(m.TextStructure.Root,{children:r.jsxs(m.TextStructure.DivWrapper,{children:[r.jsxs("h3",{className:"typography-style-body-sm",children:[o.messages.promo_code_title," "]}),r.jsx("p",{className:"typography-style-body-xs",children:o.messages.promo_code_subtitle})]})})}),r.jsx(m.Accordion.Body,{className:de["mc--discount--body"],children:e}),r.jsx(m.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]});Yd.displayName="MiniCart.Discount";const Qd=({discount:e,shipping:t,total:n})=>{var c;const{tags:o}=ot(),s=n-Math.abs(e??0)+(t??0),a=t===0?"Frete Grátis":U.formatPriceToCurrency((t??0)/100),i=[{title:"Subtotal",value:U.formatPriceToCurrency(n/100)},{title:"Frete",value:t===void 0?"A calcular":a},{title:"Desconto",value:U.formatPriceToCurrency((e??0)/100)},{message:((c=o==null?void 0:o.flagCart)==null?void 0:c.flagTotal)??"",title:"Total",value:`1x de ${U.formatPriceToCurrency(s/100)}`}];return r.jsx("div",{className:de["mc--footer--total"],children:Array.isArray(i)&&i.map((l,u)=>r.jsxs("div",{className:de["mc--footer--total--info"],"data-discount":l.title==="Desconto",children:[r.jsx("p",{children:l.title}),r.jsxs("div",{className:de["mc--footer--total--info--content"],children:[l.message&&r.jsx(m.Tag,{variant:"primary",title:l.message,children:l.message}),r.jsx(m.ProductInfo.Price,{className:de["mc--footer--total--info"],label:l.title,value:l.value})]})]},u))})};Qd.displayName="MiniCart.Modal.Footer.Resume.Items";const Zd=({totalizers:e})=>{var s,a,i;const t=((s=e.find(c=>c.id==="Items"))==null?void 0:s.value)??0,n=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,o=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return r.jsx(Qd,{discount:n??0,total:t,shipping:o})};Zd.displayName="MiniCart.Modal.Footer.Totals";const Jd=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=ce(),{cartStore:{items:o}}=Ee(),s=o.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(m.Modal.Header,{navigation:"top",className:de["mc--header"],children:r.jsxs(m.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(m.Modal.Title,{navigation:"top",title:t.messages.title}),r.jsx("span",{className:de["mc--header--subtitle"],children:s!==1?`[${s}] Produtos`:`[${s}] Produto`}),r.jsx(m.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};Jd.displayName="MiniCart.Modal.Header";const ef=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:o,removeCEP:s}=Ee(),{sendDataLayerEvent:a}=le(),[i,c]=v.useState(!1),[l,u]=v.useState(!1),f=v.useCallback(()=>{var b;return((b=n==null?void 0:n.address)==null?void 0:b.postalCode)??""},[n]),[h,d]=v.useState(!!f()),p=()=>{d(!1),c(!1)},g=b=>{var S;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(S=b.logisticsInfo)==null?void 0:S.reduce((x,j)=>{var T;const P=(T=j==null?void 0:j.slas)==null?void 0:T.find(w=>(w==null?void 0:w.id)===(j==null?void 0:j.selectedSla));if(!P)return x;const E=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),C=Number((((P==null?void 0:P.price)??0)/100).toFixed(2));if(x.shipping_tier===void 0)return x.shipping_tier=j==null?void 0:j.selectedSla,x.delivery_time=E.toString(),x.shipping=C,x.flag_retirada=(j==null?void 0:j.selectedDeliveryChannel)==="delivery"?"false":"true",x;const R=parseInt(x.delivery_time??"0");return E>R&&(x.delivery_time=E.toString()),x.shipping=(x.shipping??0)+C,x},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const S=b.replace(/\D/g,"");if(S.length!==8)return!1;try{return!(await mt.get(`https://viacep.com.br/ws/${S}/json/`)).data.erro}catch{return!1}},_=async b=>{if(u(!0),!!f()||!(b!=null&&b.trim())){await s(),p(),u(!1);return}if(!await y(b)){c(!0),d(!1),u(!1);return}try{const P=await o(b);if(c(!1),P){d(!0);const E=g(P);E&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:E}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(Le.Field,{hasSuccess:h,hasError:i,isLoading:l,onHandler:_,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:f(),ICONS:e,MINICART_CONFIG:t})};ef.displayName="MiniCart.Shipping";const tf=()=>{var n;const{tags:e}=ot(),t=(n=e==null?void 0:e.flagCart)==null?void 0:n.flagHeader;return t!=null&&t.value?r.jsx(m.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?r.jsx(m.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};tf.displayName="MiniCart.TagMessage";const Le={Body:Kd,Card:qd,Cashback:Hd,CouponSeller:Ud,Discount:Yd,Field:Vd,Feedback:Wd,Shipping:ef,Footer:Xd,Header:Jd,TagMessage:tf,Totals:Zd},Yg=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a,Z_INDEX_WAR:i,storeConfig:c,minicartStyleModifiers:l})=>{const{isOpen:u,setIsOpen:f,cartStore:h}=Ee(),{isMobile:d}=ce();return r.jsxs(m.Modal.Root,{className:m.helpers.classNameConcat(de["minicart--modal-modifier"],l),isMobile:!0,isOpen:u,setIsOpen:f,style:{zIndex:i.modal},variant:d?"sideBottom":"sideRight",children:[r.jsx(Le.Header,{ICONS:e,MINICART_CONFIG:t}),r.jsx(Le.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a,children:r.jsx(Le.TagMessage,{})}),r.jsxs(Le.Footer,{MINICART_CONFIG:t,storeConfig:c,children:[r.jsxs(Le.Discount,{ICONS:e,MINICART_CONFIG:t,children:[r.jsx(Le.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),r.jsx(Le.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),r.jsx(Le.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),r.jsx(Le.Totals,{totalizers:h.totalizers})]}),r.jsx(kd,{ICONS:e})]})},rf=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:o,SearchModal:s})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Pe(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:f}=c;return r.jsx(m.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:Ds["header-animation"],children:r.jsxs(m.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsx(r.Fragment,{children:r.jsxs(Lg,{children:[r.jsx("div",{className:U.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Td,{storeConfig:o,SearchModal:s})}),r.jsx("div",{className:U.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(_d,{storeConfig:o})})]})}),r.jsx(Ug,{children:r.jsx(Yg,{...f,minicartStyleModifiers:t})}),r.jsx(Ts,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};rf.displayName="Header";const Qg="_shippingFreight_6z8rf_6",Zg="_shippingFreight__postalCodeGrid_6z8rf_10",Jg="_shippingFreight__grid_6z8rf_14",ey="_shippingFreight__grid__title_6z8rf_18",ty="_shippingFreight__grid__remember_6z8rf_29",ry="_postalCodeContainer_6z8rf_44",ny="_deliveryStatusBar__tag_6z8rf_49",oy="_deliveryStatusBarError__tag_6z8rf_66",sy="_deliveryInfo_6z8rf_74",ay="_deliveryInfo__content_6z8rf_78",iy="_deliveryInfo__text_6z8rf_84",cy="_deliveryInfo__title_6z8rf_89",ly="_deliveryInfo__subtitle_6z8rf_99",uy="_deliveryInfo__tooltipIcon_6z8rf_109",dy="_deliveryInfo__tooltip_6z8rf_109",fy="_freightGrid_6z8rf_148",py="_freightContainer_6z8rf_155",my="_freightOption__content_6z8rf_160",hy="_freightOption__value_6z8rf_166",gy="_freightOption__title_6z8rf_177",yy="_freightOption__title_item_6z8rf_181",_y="_freightOption__paragraph_6z8rf_192",ge={shippingFreight:Qg,shippingFreight__postalCodeGrid:Zg,shippingFreight__grid:Jg,shippingFreight__grid__title:ey,shippingFreight__grid__remember:ty,postalCodeContainer:ry,deliveryStatusBar__tag:ny,deliveryStatusBarError__tag:oy,deliveryInfo:sy,deliveryInfo__content:ay,deliveryInfo__text:iy,deliveryInfo__title:cy,deliveryInfo__subtitle:ly,deliveryInfo__tooltipIcon:uy,deliveryInfo__tooltip:dy,freightGrid:fy,freightContainer:py,freightOption__content:my,freightOption__value:hy,freightOption__title:gy,freightOption__title_item:yy,freightOption__paragraph:_y,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},vy=({icon:e,title:t,subtitle:n,packageCount:o,packageUnit:s="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=v.useState(!1),f=v.useRef(null),h=()=>u(d=>!d);return r.jsxs("div",{className:ge.deliveryInfo,ref:f,children:[r.jsx(m.Tooltip.Root,{arrow:"bottom",component:r.jsx("div",{children:r.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:f.current}),r.jsxs("div",{className:ge.deliveryInfo__content,children:[r.jsx("div",{className:ge.deliveryInfo__icon,children:r.jsx(m.Icon,{name:e,size:"medium"})}),r.jsxs("div",{className:ge.deliveryInfo__text,children:[r.jsxs("span",{className:ge.deliveryInfo__title,children:[t," ",o," ",s]}),n&&r.jsx("span",{className:ge.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:ge.deliveryInfo__tooltipIcon,onMouseEnter:h,onMouseLeave:h,"aria-label":"Mostrar descrição",children:[r.jsx("span",{children:r.jsx(m.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&r.jsx("div",{className:ge.deliveryInfo__tooltip,children:a})]})]})]})},xy=({value:e,title:t,paragraph:n})=>r.jsx("div",{className:ge.freightOption,children:r.jsxs("div",{className:ge.freightOption__content,children:[r.jsx("span",{className:ge.freightOption__value,children:e}),r.jsx("span",{className:ge.freightOption__title,children:r.jsx(m.TextStructure.Root,{children:r.jsxs(m.TextStructure.DivWrapper,{className:ge.footer__item,children:[r.jsx("span",{className:ge.freightOption__title_item,children:t}),n&&r.jsx("span",{className:ge.freightOption__paragraph,children:n})]})})})]})}),by=({children:e})=>r.jsx("div",{className:ge.freightContainer,children:e}),jy=({children:e})=>r.jsx("div",{className:ge.freightGrid,children:e}),Cy=({children:e})=>r.jsx("div",{className:ge.postalCodeContainer,children:e}),Wa=({message:e,seller:t="",size:n="small",setError:o})=>r.jsx("div",{className:o?ge.deliveryStatusBarError:ge.deliveryStatusBar,children:r.jsxs(m.Tag,{title:e,className:o?ge.deliveryStatusBarError__tag:ge.deliveryStatusBar__tag,size:n,children:[e," ",!o&&t]})}),Sy=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Py=e=>{var n,o,s;const t=[];return(s=(o=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[0])==null?void 0:o.slas)==null||s.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},wy=({component:e,parent:t,top:n,left:o,target:s,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ce();return r.jsx(r.Fragment,{children:u?r.jsx(m.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):r.jsx(m.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Ey=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:o,quantity:s,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var N,I,z,k;const f=Rt(),h=Rt(W=>W.shipping),[d,p]=v.useState(),[g,y]=v.useState(!1),[_,b]=v.useState(!1),[S,x]=v.useState(!1),j=(I=(N=f.shippingData)==null?void 0:N.address)==null?void 0:I.postalCode,P=!(d!=null&&d.length)&&j?j:d,E=v.useRef(null),C=async W=>{const F=W.target.value.replace(/\D/g,"").slice(0,8);F.length>5?p(F.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):p(F)},R=async W=>{const q=W.target.value.replace(/\D/g,"");try{if((await mt.get(`https://viacep.com.br/ws/${q}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),b(!0);return}a&&a(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},T=async()=>{y(!0);try{const W=await mt.post("/api/checkout/simulation",{items:[{id:o,quantity:s,seller:t}],country:"BRA",postalCode:P});e(Py(W.data))}catch(W){console.error("Erro ao atualizar o documento:",W)}finally{y(!1),h(P,"BRA")}},w=async()=>{if(!o){x(!0),setTimeout(()=>x(!1),1500);return}await R({target:{value:P}}),g||(T(),i(!0))};return r.jsxs("div",{ref:E,style:{position:"relative"},children:[!o&&S?r.jsx(wy,{component:c,isOpen:S,parent:E.current,toolTipZIndex:u,freightConfig:l}):r.jsx(r.Fragment,{}),r.jsx("div",{style:{position:"relative"},children:r.jsx(m.TextField.Structure,{title:"structure",style:{width:"100%"},input:r.jsx(m.TextField.Input,{defaultValue:(k=(z=f.shippingData)==null?void 0:z.address)==null?void 0:k.postalCode,label:l.messages.text_input_label,title:"textfield",value:d,sizeVariant:n,onMouseOver:()=>o?null:x(!0),onMouseOut:()=>o?null:x(!1),mode:"simple",onChange:C,onKeyDown:W=>{W.key==="Enter"&&w()},className:ge["input-modifier"],feedback:_?"error":"none"}),right:r.jsx(m.Button,{onClick:w,size:n,title:"button",children:g?r.jsx(m.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Ry=({children:e,freightConfig:t})=>r.jsxs("div",{className:ge.shippingFreight,children:[r.jsxs("div",{className:ge.shippingFreight__grid,children:[r.jsx("span",{className:ge.shippingFreight__grid__title,children:t.messages.title}),r.jsx("span",{className:ge.shippingFreight__grid__remember,children:r.jsx(rt,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),r.jsx("div",{className:ge.shippingFreight__postalCodeGrid,children:e})]}),Ay=({children:e})=>r.jsx("div",{className:ge.freightContainer,children:e}),nf=({className:e,sellerId:t,skuId:n,quantity:o,size:s,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=le(),[u,f]=v.useState(""),[h,d]=v.useState([]),[p,g]=v.useState(""),[y,_]=v.useState(!1),b=x=>f(x),S=x=>{d(x),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:x.map(j=>({shipping_tier:j.id,delivery_time:j.shippingEstimate.replace("bd",""),flag_pickup:j.name.toLowerCase().includes("retirada")?"true":"false",shipping:j.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(Ay,{className:e,children:[r.jsxs(Ry,{freightConfig:c.freightConfig,children:[r.jsx(Cy,{children:r.jsx(Ey,{onUpdateFreightItems:S,skuId:n,quantity:o,size:s,sellerId:t,local:i,setError:g,setIsButtonClicked:_,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),p?r.jsx(Wa,{size:s,message:p,setError:g}):h.length>0&&r.jsx(Wa,{size:s,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!p?h.length>0&&r.jsxs(by,{children:[r.jsx(jy,{children:h.filter(({id:x})=>!x.includes("Retirada")).map(x=>r.jsx(xy,{id:x.id,value:U.freightParsePrice({valueInCents:x.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:x.name,paragraph:`${c.freightConfig.messages.prefix_days}${Sy(x.shippingEstimate)}`,radioValue:u,changeValue:b},x.id))}),c.deliveryInfoBoxesAllowed?r.jsx(vy,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):r.jsx(r.Fragment,{})]}):null]})},gt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_e02qd_1","pdc-navigation--content":"_pdc-navigation--content_e02qd_28","pdc-navigation--filters":"_pdc-navigation--filters_e02qd_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_e02qd_67","pdc-navigation--selected":"_pdc-navigation--selected_e02qd_137","pdc-navigation--selected--container":"_pdc-navigation--selected--container_e02qd_150","pdc-navigation":"_pdc-navigation_e02qd_28"},Ny=({children:e,href:t,isLast:n,title:o,ICONS:s})=>r.jsx(m.BreadCrumb.Item,{adornment:{end:n&&r.jsx(m.Icon,{name:s.arrow_right})},children:n?r.jsx(rt,{href:t??"/",size:"medium",title:o,disableUnderline:!0,children:e}):e}),of=()=>{var a;const{state:e}=ze(),{ICONS:t}=Me(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",o=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),s=Ml(o);return r.jsx("div",{className:gt["pcd-navigation--breadcrumb"],children:r.jsx(m.BreadCrumb.DivWrapper,{children:r.jsx(m.BreadCrumb.List,{children:Array.isArray(s)&&s.map((i,c)=>{var l,u;return v.createElement(Ny,{...i,isLast:c!==s.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," "),ICONS:t},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};of.displayName="PLPNavigation.BreadCrumb";const sf=({children:e,...t})=>r.jsxs("div",{...t,className:gt["pdc-navigation--content"],children:[r.jsx(dt.Filters,{}),e]});sf.displayName="PLPNavigation.Content";const Iy="_sort_35wro_1",Fr={sort:Iy,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},Ty=({children:e,sortListOpen:t,btnAdornment:n,style:o,...s})=>r.jsx(m.Button,{...s,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...o,textDecoration:"none"},className:Fr["sort-button"],children:e}),Oy=e=>r.jsx(m.RadioButton.Radio,{...e}),ky=({children:e,className:t,name:n,...o})=>r.jsx(m.RadioButton.Group,{...o,name:n||"sort-group",className:m.helpers.classNameConcat(Fr["sort-list"],t),children:e}),Ly=({children:e,className:t,shadow:n=!0,padding:o="small",height:s="fit-content",...a})=>r.jsx(m.Card,{...a,shadow:n,className:m.helpers.classNameConcat(Fr["sort-list-wrapper"],t),padding:o,height:s,children:e}),af=v.forwardRef(({children:e,className:t,...n},o)=>r.jsx("div",{...n,ref:o,className:m.helpers.classNameConcat(Fr.sort,t),children:e}));af.displayName="SortRoot";const Br=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:s,...a})=>{var d;const i=(d=o==null?void 0:o.get("sort"))==null?void 0:d.replace(":","_"),[c,l]=v.useState(i),{sendDataLayerEvent:u}=le();v.useEffect(()=>{l(i||void 0)},[i]);const{ref:f}=fd(()=>n(!1)),h=p=>{const g=p.target.value;l(g),typeof e=="function"&&e(g),u({functionKey:"filterEvent",data:{customData:{ordering:Mt.options[g]}}}),n(!1)};return r.jsxs(af,{...a,ref:f,children:[r.jsx(Ty,{btnAdornment:{listOpen:r.jsx(m.Icon,{name:s.arrow_up,size:"small"}),listClosed:r.jsx(m.Icon,{name:s.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Mt.options[c]:Mt.placeholder},"sort-button"),t&&r.jsx(Ly,{children:r.jsx(ky,{name:"sort-group",value:c??"",onChange:h,children:Object.keys(Mt.options).map(p=>r.jsx(Oy,{label:Mt.options[p],value:p},p))})})]})};Br.displayName="Sort";const cf=v.createContext({}),My=({children:e,...t})=>{const[n,o]=v.useState(!1);return r.jsx(cf.Provider,{value:v.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:o}),[t,n,o]),children:e})},Dy=()=>{const e=v.useContext(cf);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},lf=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:o}=Dy(),{ICONS:s,PDC_NAVIGATION:a,searchParams:i}=Me();return r.jsxs("div",{className:gt["pdc-navigation--filters"],children:[r.jsx(dt.BreadCrumb,{}),r.jsxs("div",{className:gt["pdc-navigation--filters--content"],children:[r.jsx(Br,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:o,ICONS:s,searchParams:i}),r.jsx(m.Button,{adornment:{end:r.jsx(m.Icon,{name:s.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(dt.Total,{})]})]})};lf.displayName="PLPNavigation.Filters";const uf=({children:e,onSort:t,setOpenFilters:n,style:o,...s})=>{const a=v.useRef(null);return r.jsx(My,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...s,className:gt["pdc-navigation"],ref:a,style:{...o},children:r.jsx(dt.Content,{children:e})})})};uf.displayName="Root";const df=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:gt["pdc-navigation--selected"],children:r.jsx("div",{className:gt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(o=>o.key==="productclusterids"?null:r.jsx(dt.SelectedItem,{callback:e,facet:o},o.value)):null})});df.displayName="PLPNavigation.Selected";const zs=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,Fs=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(o=>o.value===e))==null?void 0:n.color)??"#F2F2F2"},ff=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(o=>o.key===e))==null?void 0:n.label},pf=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(o=>o.key===e))==null?void 0:n.order)??0},Qo=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],o=U.formatPriceToCurrency(Number(n));return`${U.formatPriceToCurrency(Number(t))} até ${o}`},mf=({items:e})=>{const t=e.flatMap(s=>[s.range.from,s.range.to]),n=Math.min(...t.map(Math.abs)),o=Math.max(...t.map(Math.abs));return[n,o]},hf=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:zs,createTagPrice:Qo,getAbsoluteMinMax:mf,getColor:Fs,getName:ff,getOrder:pf},Symbol.toStringTag,{value:"Module"})),We={"filter--empty":"_filter--empty_1mjas_1","filter--item":"_filter--item_1mjas_14","filter--item--price":"_filter--item--price_1mjas_19","filter--item--toggle":"_filter--item--toggle_1mjas_19","filter--item--toggle--container":"_filter--item--toggle--container_1mjas_30","filter--modal--body":"_filter--modal--body_1mjas_79","filter--modal--body--content":"_filter--modal--body--content_1mjas_87","filter--modal--footer":"_filter--modal--footer_1mjas_96","filter--modal":"_filter--modal_1mjas_79","filter--loading":"_filter--loading_1mjas_176","filter--selected":"_filter--selected_1mjas_206","filter--selected--content":"_filter--selected--content_1mjas_210"},gf=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:o,onToggleFacet:s}=kt();return r.jsxs("div",{...n,className:We["filter--modal--body--content"],children:[Array.isArray(o.facets)&&o.facets.map(i=>r.jsx(nt.Item,{columns:e,facet:i,onToggleFacet:s,CONSTANTS:t},i.key)),!((a=o.facets)!=null&&a.length)&&r.jsx(nt.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};gf.displayName="Filter.Item.Content";const yf=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return r.jsxs("div",{className:We["filter--empty"],children:[r.jsxs(m.TextStructure.DivWrapper,{children:[r.jsx("h4",{children:e.title}),r.jsx("p",{children:e.subtitle})]}),r.jsx(m.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};yf.displayName="Filter.Empty";const _f=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:o,...s})=>{const a=pf({key:t.key,PLP_FILTERS:o.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(nt.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:o.PLP_FILTERS,PLP_FILTERS_COLORS:o.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(nt.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(nt.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:o.ICONS})}return t.__typename==="FacetRange"?r.jsx(nt.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...s,className:We["filter--item"],style:{order:a},children:r.jsxs(m.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(m.Accordion.Header,{id:t.key,closeIndicator:r.jsx(m.Icon,{name:o.ICONS.arrow_up}),openIndicator:r.jsx(m.Icon,{name:o.ICONS.arrow_down}),children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("h4",{className:"typography-style-body-sm",children:ff({key:t.key,PLP_FILTERS:o.PLP_FILTERS})})})})}),r.jsx(m.Accordion.Body,{children:i()})]})})};_f.displayName="Filter.Item";const vf=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:o,...s})=>r.jsx(Ye.Root,{...s,children:r.jsx(Ye.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(Ye.Option,{active:i,"data-color":zs({key:a,PLP_FILTERS:n}),fill:Fs({value:c,PLP_FILTERS_COLORS:o}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});vf.displayName="Filter.Item.Color";const xf=({facet:e,...t})=>{var u,f;const{filters:{selected:n},price:o,onToggleFacet:s}=kt(),[a,i]=(o==null?void 0:o.split(":").map(Number))??[0,100],[c,l]=((f=(u=n==null?void 0:n.find(({key:h})=>h==="price"))==null?void 0:u.value)==null?void 0:f.split(":").map(Number))??[a,i];return r.jsx("div",{...t,className:We["filter--item--price"],children:r.jsxs(m.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:h=>{var d,p;h&&s({key:"price",value:`${(d=h.range)==null?void 0:d.min}:${(p=h.range)==null?void 0:p.max}`})},children:[r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("p",{"data-min-value":!0})})}),r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("p",{"data-max-value":!0})})})]})})};xf.displayName="Filter.Item.Price";const bf=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...o})=>{const s=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(Ye.Root,{...o,children:r.jsx(Ye.List,{children:Array.isArray(s)&&s.map(({key:a,selected:i,value:c})=>r.jsx(Ye.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};bf.displayName="Filter.Item.Sizes";const jf=({columns:e,facetKey:t,onToggleFacet:n,values:o,ICONS:s,...a})=>r.jsx("div",{...a,className:We["filter--item--toggle"],children:r.jsx("div",{className:We["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(o)&&o.map(i=>r.jsx(m.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(m.Icon,{name:s.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});jf.displayName="Filter.Item.Toggle";const Cf=({...e})=>{const{isLoading:t}=kt();return r.jsx("div",{className:We["filter--loading"],"data-active":t,...e,children:r.jsx(m.Spinner,{indicatorColor:"#000",background:"#222"})})};Cf.displayName="Filter.Loading";const Sf=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:o,ICONS:s}})=>{var f;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=kt();return r.jsxs(m.Modal.Root,{className:m.helpers.classNameConcat(We["filter--modal"],t),isMobile:n??!1,isOpen:c,parent:l,setIsOpen:u,variant:n?"sideBottom":"sideRight",style:{zIndex:99},children:[r.jsxs(m.Modal.Header,{navigation:"top",children:[r.jsx(m.Modal.Controls,{navigation:"top",isMobile:n,children:r.jsx(m.Button,{"data-close":!0,iconNameStart:s.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(m.Modal.Title,{navigation:"top",title:o})]}),r.jsxs(m.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:We["filter--modal--body"],children:e}),r.jsx(nt.Loading,{})]}),r.jsx(m.Modal.Footer,{children:r.jsxs("div",{className:We["filter--modal--footer"],children:[r.jsx(m.Button,{"data-close":!0,size:"large",variant:"primary",children:(f=i.facets)!=null&&f.length?"ver resultados":"fechar"}),r.jsx(m.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Sf.displayName="Filter.Modal";const Pf=({children:e,className:t,isMobile:n,CONSTANTS:o,...s})=>r.jsx(Jl,{...s,PLP_FILTERS:o.PLP_FILTERS,children:r.jsx(nt.Modal,{className:t,isMobile:n,CONSTANTS:o,children:e})});Pf.displayName="Filter.Root";const wf=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:o,onToggleFacet:s}=kt();return r.jsx("div",{className:We["filter--selected"],children:r.jsx("div",{className:We["filter--selected--content"],children:Array.isArray(o.selected)&&o.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(m.Tag,{title:a==="price"?Qo({value:i}):i,adornment:{end:r.jsx(m.Icon,{name:e.close,size:"x-small"})},colorSquare:Fs({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>s({key:a,value:i}),squareShow:zs({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?Qo({value:i}):i},i))})})};wf.displayName="Filter.Selected";const nt={Colors:vf,Content:gf,Empty:yf,Modal:Sf,Item:_f,Root:Pf,Loading:Cf,Selected:wf,Price:xf,Sizes:bf,Toggle:jf},{checkedColor:$y,createTagPrice:Ga,getColor:zy}=hf,Ef=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:o,PLP_FILTERS:s}=Me();return r.jsx(m.Tag,{title:(t==null?void 0:t.key)==="price"?Ga({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(m.Icon,{name:n.close,size:"x-small"})},colorSquare:zy({value:t.value,PLP_FILTERS_COLORS:o}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:$y({key:t.key,PLP_FILTERS:s}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Ga({value:t.value}):t.value.toUpperCase()})};Ef.displayName="PLPNavigation.Selected.Item";const Rf=()=>r.jsx(m.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Rf.displayName="PLPNavigation.Total";const dt={BreadCrumb:of,Content:sf,Filters:lf,Root:uf,Selected:df,SelectedItem:Ef,Total:Rf},Fy="_footer__bottom_1o9af_2",By="_footer__wrapper_1o9af_10",qy="_footer__main_1o9af_39",Hy="_footer__legalInformation_1o9af_55",Uy="_footer__column_1o9af_77",Wy="_footer__columnContent_1o9af_87",Gy="_footer__item_1o9af_91",Vy="_footer__itemLink_1o9af_107",Ky="_footer__columnTitle_1o9af_122",Xy="_footer__columnTitleIcon_1o9af_134",Yy="_footer__iconList_1o9af_147",Qy="_footer__itemSmallText_1o9af_157",Zy="_payment_1o9af_168",Jy="_footer__iconContainer_1o9af_173",e_="_footer__iconListSubHeader_1o9af_178",t_="_accordionWrapper_1o9af_200",r_="_accordionHeader_1o9af_204",n_="_accordionTextWrapper_1o9af_208",ye={footer__bottom:Fy,footer__wrapper:By,footer__main:qy,footer__legalInformation:Hy,footer__column:Uy,footer__columnContent:Wy,footer__item:Gy,footer__itemLink:Vy,footer__columnTitle:Ky,footer__columnTitleIcon:Xy,footer__iconList:Yy,footer__itemSmallText:Qy,payment:Zy,footer__iconContainer:Jy,footer__iconListSubHeader:e_,accordionWrapper:t_,accordionHeader:r_,accordionTextWrapper:n_,"footer--stamps":"_footer--stamps_1o9af_247","footer--stamps--company":"_footer--stamps--company_1o9af_254","support-container":"_support-container_1o9af_258","support-section":"_support-section_1o9af_277","support-text":"_support-text_1o9af_319","support-items":"_support-items_1o9af_329","support-item":"_support-item_1o9af_329"};var Af={},Bs={},Qt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=n=>{};if(process.env.NODE_ENV!=="production"){const n=new Set;t=o=>{n.has(o)||console.warn(o),n.add(o)}}})(Qt);var Nf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:o,heightInt:s,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,f=a?a*40:o,h=i?i*40:s,d=f&&h?"viewBox='0 0 "+f+" "+h+"'":"",p=d?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+d+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+p+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Nf);var qr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return o}});const n=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}})(qr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return p}});const t=Qt,n=Nf,o=qr,s=["lazy","eager",void 0];function a(g){return g.default!==void 0}function i(g){return g.src!==void 0}function c(g){return typeof g=="object"&&(a(g)||i(g))}const l=new Map;let u;function f(g){return typeof g>"u"?g:typeof g=="number"?Number.isFinite(g)?g:NaN:typeof g=="string"&&/^[0-9]+$/.test(g)?parseInt(g,10):NaN}function h(g,y,_){let{deviceSizes:b,allSizes:S}=g;if(_){const j=/(^|\s)(1?\d?\d)vw/g,P=[];for(let E;E=j.exec(_);E)P.push(parseInt(E[2]));if(P.length){const E=Math.min(...P)*.01;return{widths:S.filter(C=>C>=b[0]*E),kind:"w"}}return{widths:S,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(j=>S.find(P=>P>=j)||S[S.length-1]))],kind:"x"}}function d(g){let{config:y,src:_,unoptimized:b,width:S,quality:x,sizes:j,loader:P}=g;if(b)return{src:_,srcSet:void 0,sizes:void 0};const{widths:E,kind:C}=h(y,S,j),R=E.length-1;return{sizes:!j&&C==="w"?"100vw":j,srcSet:E.map((T,w)=>P({config:y,src:_,quality:x,width:T})+" "+(C==="w"?T:w+1)+C).join(", "),src:P({config:y,src:_,quality:x,width:E[R]})}}function p(g,y){let{src:_,sizes:b,unoptimized:S=!1,priority:x=!1,loading:j,className:P,quality:E,width:C,height:R,fill:T=!1,style:w,onLoad:N,onLoadingComplete:I,placeholder:z="empty",blurDataURL:k,fetchPriority:W,layout:q,objectFit:F,objectPosition:G,lazyBoundary:V,lazyRoot:B,...J}=g;const{imgConf:A,showAltText:O,blurComplete:D,defaultLoader:X}=y;let ne,ee=A||o.imageConfigDefault;if("allSizes"in ee)ne=ee;else{const K=[...ee.deviceSizes,...ee.imageSizes].sort((Re,Q)=>Re-Q),me=ee.deviceSizes.sort((Re,Q)=>Re-Q);ne={...ee,allSizes:K,deviceSizes:me}}let M=J.loader||X;delete J.loader,delete J.srcSet;const te="__next_img_default"in M;if(te){if(ne.loader==="custom")throw new Error('Image with src "'+_+`" is missing "loader" prop.
|
|
4
|
+
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const ie=A?oe&&typeof oe=="object"&&oe.ref:R,[fe,pe,ue]=(0,h.useIntersection)({rootMargin:"200px"}),H=o.default.useCallback(ae=>{(L.current!==re||$.current!==Z)&&(ue(),L.current=re,$.current=Z),fe(ae),ie&&(typeof ie=="function"?ie(ae):typeof ie=="object"&&(ie.current=ae))},[re,ie,Z,ue,fe]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&ne&&(!pe||!M||_(ne,Z,re,{locale:G},{kind:te},ee))},[re,Z,pe,G,M,D==null?void 0:D.locale,ne,ee,te]);const be={ref:H,onClick(ae){if(process.env.NODE_ENV!=="production"&&!ae)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!A&&typeof V=="function"&&V(ae),A&&oe.props&&typeof oe.props.onClick=="function"&&oe.props.onClick(ae),ne&&(ae.defaultPrevented||S(ae,ne,Z,re,W,q,F,G,ee,M))},onMouseEnter(ae){!A&&typeof B=="function"&&B(ae),A&&oe.props&&typeof oe.props.onMouseEnter=="function"&&oe.props.onMouseEnter(ae),ne&&((!M||process.env.NODE_ENV==="development")&&ee||_(ne,Z,re,{locale:G,priority:!0,bypassPrefetchedCheck:!0},{kind:te},ee))},onTouchStart(ae){!A&&typeof J=="function"&&J(ae),A&&oe.props&&typeof oe.props.onTouchStart=="function"&&oe.props.onTouchStart(ae),ne&&(!M&&ee||_(ne,Z,re,{locale:G,priority:!0,bypassPrefetchedCheck:!0},{kind:te},ee))}};if((0,c.isAbsoluteUrl)(re))be.href=re;else if(!A||k||oe.type==="a"&&!("href"in oe.props)){const ae=typeof G<"u"?G:D==null?void 0:D.locale,ve=(D==null?void 0:D.isLocaleDomain)&&(0,d.getDomainLocale)(re,ae,D==null?void 0:D.locales,D==null?void 0:D.domainLocales);be.href=ve||(0,p.addBasePath)((0,l.addLocale)(re,ae,D==null?void 0:D.defaultLocale))}return A?o.default.cloneElement(oe,be):o.default.createElement("a",{...O,...be},T)});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Vo,Vo.exports);var mg=Vo.exports,hg=mg;const De=kr(hg),gg="_link_w24h0_1",yg="_wrapper_w24h0_98",_g="_text_w24h0_106",jn={link:gg,wrapper:yg,text:_g},rt=({children:e,adornments:t,className:n,disableUnderline:o,href:s,mode:a,size:i,title:c,onClick:l,disablePadding:u,...f})=>{const h=m.helpers.ValidateProp({fieldTypes:Pt.SizesSmallExtended,property:i,fallback:"medium"}),d=m.helpers.ValidateProp({fieldTypes:Pt.Mode,property:a,fallback:"default"});return r.jsx(De,{...f,className:m.helpers.classNameConcat(jn.link,n),href:s&&s.length>0?s:"#","data-size":h,"data-variant":d,title:c||"NextLink","data-disable-underline":o??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:jn.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:jn.text,"data-size":h,children:e}),t==null?void 0:t.end]})})},vg=({ICONS:e})=>{const{resetFeedback:t}=vt();return r.jsxs("div",{className:Bt["wishlist--snack--actions"],children:[r.jsx(rt,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(m.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(m.Icon,{name:e.close})}})]})},ks=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const o=vs(),{resetFeedback:s}=vt(),a=v.useRef(null);return v.useEffect(()=>{a.current&&clearTimeout(a.current),o&&(a.current=setTimeout(()=>{s()},5e3))},[o,s]),(o==null?void 0:o.active)&&r.jsx(wt,{Z_INDEX_WAR:n,className:Bt["wishlist--snack"],"data-action":o.action,title:o.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(vg,{ICONS:t}),size:"medium"})};ks.displayName="WishList.Feedback";const Ls={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Ou=({className:e,children:t,columns:n=1,isMobile:o=!1,gap:s=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=v.useMemo(()=>n%i===0?"initial":o||n<2?c:c.split("/").reverse().join("/"),[n,i,o]);return r.jsx("div",{...l,className:m.helpers.classNameConcat(Ls["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:s/2},children:t})};Ou.displayName="ProductList.Banner";const ku=({isKit:e,parent:t,productId:n,setNotify:o,CONSTANTS:s})=>{const{router:a}=_e(),i=v.useRef(!1),c=v.useRef(null),[l,u]=v.useState([]),f=g=>a.push(g??""),h=async g=>{try{const y=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:g,filterTexture:s.TEXTURE_IMAGE}),priority:"low"});if(!y.ok)throw new Error("Erro ao buscar similares.");const _=await y.json();u(_)}catch(y){console.error(y)}},d=v.useCallback(g=>{!n||!g||(typeof h=="function"&&h(n),i.current=!0)},[n]),p=v.useCallback((g,y)=>{if(!g.isIntersecting){s.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(g.intersectionRatio>=y.threshold&&!i.current){if(s.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{d(!0)},s.PLP_PRODUCT_SIMILAR_DELAY);return}d(!0)}},[d]);return v.useEffect(()=>{if(e||!t.current)return;const g={root:null,threshold:.1},y=new IntersectionObserver(([_])=>{p(_,g)},g);return y.observe(t.current),()=>{c.current&&clearTimeout(c.current),y.disconnect()}},[p,t,e]),r.jsx(xe.Actions,{...l,callback:f,isKit:e,children:!e&&r.jsx(xe.SizeSelector,{setNotify:o})})};ku.displayName="ProductList.Card.Actions";const Lu=({className:e,children:t,gap:n=32,item:o,isMobile:s,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:f,CONSTANTS:h,...d})=>{const p=v.useRef(null),{availability:{status:g}}=o,y=v.useCallback((b,S)=>{var x;typeof u=="function"&&u((x=b.isVariantOf)==null?void 0:x.hasVariant,S)},[u]),_=o.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...d,className:m.helpers.classNameConcat(Ls["product-list--card"],e),"data-mobile":s,"data-order":a,ref:p,style:{...c&&{maxWidth:s?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(xe.Root,{item:o,isMobile:s,index:l,size:s?"small":"medium",order:a,outStock:!g,CONSTANTS:h,children:[r.jsx(xe.Header,{product:o,tag:i==null?void 0:i.commercial}),r.jsx(xe.Media,{showVideo:f,hasPriority:!0}),r.jsxs(xe.Wrapper,{type:"body",children:[r.jsx(xe.Title,{tag:i==null?void 0:i.institucional}),r.jsx(ku,{productId:o.isVariantOf.productGroupID,parent:p,setNotify:y,isKit:_,CONSTANTS:h}),!_&&r.jsx(xe.OutStock,{callback:y})]}),r.jsx(xe.Wrapper,{type:"footer",children:g&&r.jsx(xe.BuyButton,{isKit:_})})]}),t]})};Lu.displayName="ProductList.Card";const Mu=({children:e,className:t,...n})=>r.jsx("div",{...n,className:m.helpers.classNameConcat(Ls["product-list"],t),children:e});Mu.displayName="ProductList.Grid";const et={Banner:Ou,Card:Lu,Root:Mu,helpers:lh},xg="_pdc_alo7z_1",Ge={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:xg},Ms=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:o}=_e(),{isMobile:s}=ce(),a=()=>{o.push(n==null?void 0:n.link)};return r.jsxs("div",{className:m.helpers.classNameConcat(Ge["pdc--empty"],e),children:[r.jsxs(m.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[r.jsx("span",{className:s?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:s?"typography-style-body-xs":"typography-style-body-sm",children:n.subtitle})]}),r.jsx(m.Button,{adornment:{end:r.jsx(m.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:r.jsx("b",{children:n.text})})]})};Ms.displayName="PDC.Empty";const Dr=e=>r.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:r.jsx(m.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});Dr.displayName="PDC.Spinner";function Du({CONSTANTS:e}){const{sendDataLayerEvent:t}=le(),{isMobile:n}=ce(),{getAvailableProductTag:o}=ot(),[s,a]=v.useState([]),[i,c]=v.useState(!0),l=Tt(),u=n?16:32;return v.useEffect(()=>{const f=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(h=>h.json()).then(h=>{a(h),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:h}}})}).catch(h=>console.error(h)):a([]),c(!1)};if(l.length){f();return}if(l.length===0&&s.length===0){c(!1);return}a([]),c(!1)},[l]),r.jsx("section",{className:Bt["wishlist-grid"],children:r.jsxs("div",{className:Bt["wishlist-grid--container"],children:[i&&r.jsx(Dr,{}),!l.length&&!(s!=null&&s.length)&&!i&&r.jsx(Ms,{className:Bt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(et.Root,{children:Array.isArray(s)&&s.map((f,h)=>{const d=f.node.cluster.highlights||[],p=o(d);return r.jsx(et.Card,{gap:u,isMobile:n??!1,item:f.node,tag:p,index:h,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS}},f.node.sku)})})]})})}Du.displayName="Wishlist.Grid";const bg=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],$u=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const o=Ot(),s=Tt(),a=vs(),{updateList:i}=vt();return v.useEffect(()=>{var l,u;a.active&&Qe.set("fs::wishlist",s);const c=async()=>{var f;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:s,docId:(f=o==null?void 0:o.user)==null?void 0:f.id})}).catch(h=>{console.error("Error updating wishlist:",h)})};a.active&&((l=o.user)!=null&&l.id)&&s.length!==((u=o.wishlist)==null?void 0:u.length)&&c()},[a,o,s]),v.useEffect(()=>{var u;const c=async()=>{const f=await Qe.get("fs::wishlist");f&&(f==null?void 0:f.length)!==s.length&&i(f)},l=async()=>{var p;const f=await Qe.get("fs::wishlist")??[],h=o.wishlist?typeof o.wishlist[0]=="object"?bg(o.wishlist):o.wishlist:[],d=[...new Set([...f,...h])];i(d),Qe.set("fs::wishlist",s),h.length!==d.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:d,docId:(p=o.user)==null?void 0:p.id})}).catch(g=>{console.error("Error updating wishlist:",g)})};if((u=o.user)!=null&&u.id){l();return}c()},[o,i,s]),r.jsx(ks,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};$u.displayName="Wishlist.Init";const zu=({product:e,priceInfo:t,size:n="medium",style:o,ICONS:s})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=le(),c=Tt(),{toggleProduct:l}=vt(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(m.Button,{adornment:{start:r.jsx(m.Icon,{size:n,name:c.includes(u)?s.favorite_true:s.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...o,border:"none"},variant:"tertiary"})};zu.displayName="WishList.Toggle";const Fu={Feedback:ks,Toggle:zu,Grid:Du,Init:$u},Bu=({product:e,tag:t,size:n="small"})=>{const o=e.offers.offers[0],{CONSTANTS:s}=Ve();return r.jsxs(xe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[t?r.jsx(m.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?r.jsx(m.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:n,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(Fu.Toggle,{product:e,priceInfo:{price:o.price,listPrice:o.listPrice},variant:"card",ICONS:s.ICONS})]})};Bu.displayName="ProductCard.Actions.Header";const qu=({className:e,children:t,hasPriority:n=!1,showVideo:o=!1,...s})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:f,order:h,CONSTANTS:d}=Ve(),p=U.getFirstImages({images:c,label:{first:d.MAIN_IMAGE,second:d.SECOND_IMAGE}});return r.jsxs("div",{...s,className:m.helpers.classNameConcat(Ae["product-card--image"],e),ref:a,style:{aspectRatio:d.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(De,{href:`/${l}/p`,onClick:f,onMouseUp:g=>{g.button===1&&f(),d.PLP_INFINITE_SCROLL&&sessionStorage.setItem(d.PLP_GRID_SCROLL_BACK.order,String(h))},children:r.jsx("div",{className:Ae["product-card--image--container"],children:Array.isArray(p)&&p.map(({url:g,alternateName:y},_)=>v.createElement(Ie.Image,{...d.PRODUCT_IMAGE_DIMENSIONS.product_card,style:d.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:_,...n&&{priority:_===0&&i<4},objectFit:"cover",src:g}))})}),d.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&o&&u&&r.jsx(xe.Video,{url:u,poster:p[0].url}),t]})};qu.displayName="ProductCard.Media.Media";const Hu=({className:e,callback:t,children:n,...o})=>{const{isMobile:s,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ve(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...o,className:m.helpers.classNameConcat(Ae["product-card--outstock"],e),children:[r.jsx(m.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),r.jsx(m.Button,{className:m.helpers.classNameConcat(e,"buy-button"),size:s?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};Hu.displayName="ProductCard.OutStock";const Uu=({children:e,className:t="",index:n,isMobile:o=!1,item:s,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...f})=>r.jsx($h,{item:s,isMobile:o,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...f,className:m.helpers.classNameConcat(Ae["product-card--wrapper"],t),"data-size":a,children:e})});Uu.displayName="ProductCard.Root";const Wu=({disabled:e,label:t,size:n,value:o,onClick:s,...a})=>r.jsxs(m.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:s,children:[r.jsx(m.ToggleSize.DisabledAdornment,{}),r.jsx(m.ToggleSize.Text,{children:t})]});Wu.displayName="ProductCard.SizeSelector.Item";const Gu=({active:e=!1,callback:t,selectedSku:n=null,item:o,setNotify:s})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ve();o.productId=a.id;const u=U.disableSKU(o),f=U.getSKUName(o,"tamanho");!u&&!l.current.availableSkus.includes(f)&&l.current.availableSkus.push(f);const h=v.useCallback(p=>{const g=n===p?null:p;typeof c=="function"&&c(g),typeof t=="function"&&t(g)},[t,c,n]),d=v.useCallback(()=>{if(u&&typeof s=="function"){s(a,o);return}h(o)},[o,s,h,u,a]);return r.jsx(Wu,{active:e,disabled:u,label:f,onClick:()=>d(),size:i?"x-small":"small",value:o})};Gu.displayName="ProductCard.SizeSelector.SkuItem";const Vu=({callback:e,className:t="",children:n,setNotify:o,...s})=>{const{isMobile:a,item:{isVariantOf:{hasVariant:i}},selectedSku:c}=Ve();return r.jsxs("div",{...s,className:m.helpers.classNameConcat(Ae["product-card--selectors--size"],t),"data-mobile":a,children:[r.jsx("div",{className:Ae["product-card--selectors--size--skus"],children:Array.isArray(i)&&i.map((l,u)=>r.jsx(Gu,{active:c===l,callback:e,item:l,selectedSku:c,setNotify:o},`size--${u}--${l.sku}`))}),r.jsx("div",{className:Ae["product-card--selectors--size--button"],children:n})]})};Vu.displayName="ProductCard.SizeSelector";const Ko=({alt:e="",callback:t,more:n,total:o=4,src:s,url:a,...i})=>r.jsxs(m.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[r.jsx(m.ToggleStyle.DisabledAdornment,{}),r.jsxs(m.ToggleStyle.Texture,{children:[s&&r.jsx(Ie.Image,{alt:e??s,src:s,height:34,width:34}),n&&r.jsx(m.TextStructure.DivWrapper,{className:Ae["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",o]})})]})]}),jg=({children:e,callback:t,data:n,total:o=4,size:s,...a})=>{const{index:i}=Ve(),{triggerSelectItemEventRef:c}=le();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,o).map((l,u)=>r.jsx(Ko,{callback:f=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(f)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:s},u)),Array.isArray(n)&&(n==null?void 0:n.length)>o&&r.jsx(Ko,{size:s,total:n.length-o,more:!0})]})},Ku=({callback:e,className:t,data:n,images:o=[],findTexture:s,...a})=>{const{CONSTANTS:i}=Ve(),c=s||i.TEXTURE_IMAGE,l=o==null?void 0:o.find(u=>c.includes(u.alternateName));return r.jsx(jg,{...a,callback:e,className:m.helpers.classNameConcat(Ae["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(Ko,{active:!0,size:"x-small",src:l.url})})};Ku.displayName="ProductCard.StyleSelector";const Xu=({className:e,hasDecimal:t,...n})=>{const{isMobile:o,item:{offers:{lowPrice:s,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ve();l.current.priceInfo={price:s,listPrice:a};const u=U.formatPriceToCurrency(a,t),f=U.formatPriceToCurrency(s,t),h=U.formatPriceToCurrency(c??0),d=o?"horizontal":"stacked";return r.jsx("div",{...n,className:m.helpers.classNameConcat(Ae["product-card--price"],e),"data-mobile":o,children:r.jsx(m.ProductInfo.Root,{size:"small",layout:d,children:r.jsxs(m.ProductInfo.Wrapper,{size:"small",layout:d,children:[r.jsx(m.ProductInfo.ValuesWrapper,{children:f!==u?r.jsxs(r.Fragment,{children:[r.jsx(m.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),r.jsx(m.ProductInfo.Price,{label:"discountPrice",value:f,size:"small"})]}):r.jsx(m.ProductInfo.Price,{label:"defaultPrice",value:f,size:"small"})}),i&&i>1&&c?r.jsx(m.ProductInfo.Price,{label:"installment",value:`${i}x ${h}`,size:"small"}):null]})})})};Xu.displayName="ProductCard.Price";const Yu=({tag:e,className:t})=>{const{item:{name:n}}=Ve();return r.jsxs("div",{className:m.helpers.classNameConcat(Ae["product-card--title"],t),children:[r.jsx("div",{className:Ae["product-card--title--tag"],children:e?r.jsx(m.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?r.jsx(m.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):r.jsx("div",{})}),r.jsx("div",{className:Ae["product-card--title--content"],children:n&&r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};Yu.displayName="ProductCard.Title";const Qu=({className:e,url:t,poster:n,...o})=>{const{element:s}=Ve();return v.useEffect(()=>{if(!(s!=null&&s.current))return;const a=s.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(f=>{f.forEach(h=>{U.setVideoPlay(h.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,s]),r.jsx("div",{...o,className:m.helpers.classNameConcat(Ae["product-card--video"],e),children:t&&r.jsx(Ie.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};Qu.displayName="ProductCard.Media.Video";const Zu=({children:e,className:t,type:n,...o})=>r.jsx("div",{...o,className:m.helpers.classNameConcat(Ae[`product-card--${n}`],t),children:e});Zu.displayName="ProductCard.Wrapper";const xe={Actions:bu,BuyButton:ju,Header:Bu,Media:qu,Root:Uu,OutStock:Hu,Price:Xu,SizeSelector:Vu,StyleSelector:Ku,Title:Yu,Video:Qu,Wrapper:Zu},Cg="_carousel_w0llv_1",Sg="_shelf__container_w0llv_14",Pg="_shelf_without_carousel_w0llv_34",wg="_card_container_w0llv_52",St={carousel:Cg,"custom-controllers":"_custom-controllers_w0llv_5",shelf__container:Sg,"controllers-arrows-bullets":"_controllers-arrows-bullets_w0llv_23",shelf_without_carousel:Pg,card_container:wg},qa=({title:e})=>r.jsx("div",{className:St.shelf__container,children:e&&r.jsx(m.TextStructure.Root,{children:r.jsxs(m.TextStructure.DivWrapper,{children:[r.jsx("h2",{className:m.helpers.classNameConcat("typography-style-body-md",U.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:m.helpers.classNameConcat("typography-style-heading-md",U.responsive["responsive-desktop-flex"]),children:e})]})})}),Eg=({children:e,ICONS:t,itemsPerPage:n,title:o})=>{const{isMobile:s}=ce(),a=n[s?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=m.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),f=v.Children.toArray(e).length;return s||f>=4?r.jsxs(m.Carousel.Root,{innerRef:d=>{i(d)},className:St.carousel,children:[r.jsxs("div",{className:St["custom-controllers"],children:[o&&r.jsx(qa,{title:o}),a<f&&r.jsxs(m.Carousel.Controller,{className:St["controllers-arrows-bullets"],children:[r.jsxs(m.Carousel.Arrows,{children:[r.jsx(m.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(m.Icon,{name:t.arrow_left})}}),r.jsx(m.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(m.Icon,{name:t.arrow_right})}})]}),!s&&a>2&&r.jsx(m.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:d=>c==null?void 0:c.navigateTo(d)})]})]}),r.jsx(m.Carousel.Body,{children:v.Children.map(e,(d,p)=>r.jsx(m.Carousel.Item,{style:{...l,overflow:"hidden"},children:d},`${o}_${p}`))})]}):r.jsxs(r.Fragment,{children:[o&&r.jsx(qa,{title:o}),r.jsx("div",{className:St.shelf_without_carousel,children:e})]})},Ju=({className:e,item:t,isMobile:n,size:o,shelfTitle:s,...a})=>{const i=v.useRef(null),{getAvailableProductTag:c}=ot(),{availability:{status:l}}=t,u=h=>{const d=h.filter(p=>!a.CONSTANTS.TEXTURE_IMAGE.includes(p.keywords));return n?d.splice(0,2):d},f=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:St.card_container,children:r.jsxs(xe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:s,children:[r.jsx(xe.Header,{product:t,tag:f==null?void 0:f.commercial}),r.jsx(xe.Media,{}),r.jsxs(xe.Wrapper,{type:"body",children:[r.jsx(xe.Title,{tag:f==null?void 0:f.institucional}),r.jsx(xe.Actions,{})]}),r.jsx(xe.Wrapper,{type:"footer"})]})})};Ju.displayName="ProductList.Card";const Ut={Shelf:Eg,Card:Ju},ed=({CONSTANTS:e,inView:t,products:n,innerRef:o})=>{const s=v.useMemo(()=>Mh(n),[n]),{isMobile:a}=ce(),{addItemsToCart:i}=Ee(),{sendDataLayerEvent:c}=le(),{getAvailableProductTag:l}=ot(),[u,f]=v.useState({totalPrice:0,products:{}}),h=()=>{const p=Object.values(u.products);i(p),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:p.map(g=>{const y=s.find(_=>_.node.id===g.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:p,price:u.totalPrice}}})},d=({selectedProduct:p,productId:g})=>{const y=Dh({selectedProduct:p,productId:g,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});f(y)};return v.useEffect(()=>{if(!t||s.length===0)return;const p=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:p},outsideEcommerceData:{item_list_name:p}}})},[t]),r.jsxs("div",{className:lt.container,ref:o,children:[r.jsx("div",{className:lt["carousel-container"],style:{width:s.length<=3?"max-content":"75%"},children:r.jsx(Ut.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:s.length>=3?2.2:s.length},ICONS:e.ICONS,children:Array.isArray(s)&&s.map(({node:p},g)=>{var b,S,x;const y=l(p.cluster.highlights),{availability:{status:_}}=p;return _?r.jsxs(xe.Root,{item:{...p,image:Is.helpers.product.getFirstImages({images:p.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:g,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[r.jsx(xe.Header,{product:p,tag:y.commercial}),r.jsx(xe.Media,{}),r.jsxs(xe.Wrapper,{type:"body",children:[r.jsx(xe.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(S=y.institucional)==null?void 0:S.enableIcon,icon:(x=y.institucional)==null?void 0:x.icon}}),r.jsx(xe.Actions,{children:r.jsx(xe.SizeSelector,{callback:j=>d({selectedProduct:j,productId:p.id})})})]})]},p.id):null})})}),r.jsx("div",{className:lt["add-cart-container"],children:r.jsx(Lh,{handleAddAllToCart:h,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Ds={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},$s=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=Ee(),{handleSelectContent:o}=le(),{CONSTANTS:s}=Pe(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(m.Header.SupportItem,{onClick:()=>{t(!0),o({content:"header:minicart"})},id:e,children:r.jsxs(m.Badge.AutoPositioner,{children:[r.jsx(m.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),r.jsx(m.Icon,{name:s.header.ICONS.bag,size:"medium"})]})})};$s.displayName="Header.Bag";const Yt=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(De,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,td=()=>{const{headerData:e}=Pe(),{handleSelectContent:t}=le(),{reset:n,updateValue:o}=Vt(),s=a=>{a?o(a):n()};return r.jsx(m.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(Yt,{href:a.link,onMouseEnter:()=>s(a.submenuId),onFocus:()=>s(a.submenuId),children:r.jsx(m.Header.CategoryItem,{className:Ds["btn-header"],value:a.submenuId??null,adornment:{start:r.jsx(m.Icon,{name:a.iconStart}),end:r.jsx(m.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};td.displayName="Header.Categories";function Rg(){const{handleSelectContent:e}=le(),{CONSTANTS:t}=Pe(),{setValue:n}=ms();return r.jsx(m.Header.SupportItem,{onClick:()=>{n(!0),e({content:"header:search"})},children:r.jsx(m.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Ag={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Ng={"observer-wrapper":"_observer-wrapper_r43gk_1"},$r=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:o,stopOnIntersection:s=!0,className:a,...i})=>{const c=v.useRef(null),l=us(c,s,n),{sendDataLayerEvent:u}=le();return v.useEffect(()=>{l&&(typeof o=="function"&&o(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:m.helpers.classNameConcat(Ng["observer-wrapper"],a),children:e})},rd=({thumbnails:e,category:t,isMobile:n=!0,callBack:o})=>{const{handleSelectPromotionEvent:s}=le(),a=50/e.length;return r.jsx("div",{className:Ag["menu-subcategories-container"],children:e.map((i,c)=>{const l=n?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return r.jsx($r,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(De,{href:i.link??"#",onClick:()=>{typeof o=="function"&&o(),s({updatePromotionRef:!0,promotion:u})},children:[r.jsx(Ie.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&r.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};rd.displayName="Menu.Thumbnail";const Xo={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},nd=({children:e,dividerOnRight:t=!0,subMenu:n,...o})=>{var l;const{router:s}=_e(),{reset:a}=Vt(),{handleSelectContent:i}=le(),{CONSTANTS:c}=Pe();return r.jsxs("div",{...o,className:Xo["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,f)=>{var p,g,y,_;const h=u.listCollapseDesk&&!((p=u.see_all)!=null&&p.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},d=u.listCollapseDesk&&!((g=u.see_all)!=null&&g.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:r.jsx(m.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return r.jsxs(m.ComponentList.Structure,{children:[r.jsx(Yt,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${n.label??""}`}))},children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("h2",{children:u.label})})})}),r.jsx(m.ComponentList.List,{columns:1,...h,className:Xo["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,S)=>r.jsx(m.ComponentList.ListItem,{id:`list-item-${b.label}-${S}`,children:r.jsx(rt,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${n.label??""}`})},children:b.label})},`list-item-${b.label}-${S}`))}),((_=u.see_all)==null?void 0:_.link)&&r.jsx(m.ComponentList.Support,{...d,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),s.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${f}`)}),t&&r.jsx(m.Utils.Divider,{size:"small",direction:"vertical"})]})};nd.displayName="Menu.Categories";const od=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:o}=Pe();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:Xo["menu-desktop"],style:{...n.style,justifyContent:o.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(m.Utils.Divider,{size:"small"})]})};od.displayName="Menu.MenuRoot";const Cn={Root:od,Categories:nd,Thumbnail:rd},sd=()=>{const{headerData:e,CONSTANTS:t}=Pe(),n=Zc(),{reset:o}=Vt();return r.jsx(m.Header.SubMenu,{children:Array.isArray(e.subMenus)&&e.subMenus.map((s,a)=>{const{thumbnails:i,label:c,id:l}=s,u=l===n,f=i==null?void 0:i.some(h=>!!h.srcDesk);return r.jsxs(Cn.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(Cn.Categories,{dividerOnRight:!!f,subMenu:s}),Array.isArray(i)&&r.jsx(Cn.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:o})]},`submenu-${l}-${a}`)})})};sd.displayName="Header.SubMenu";const ad=()=>{const{handleSelectContent:e}=le(),{CONSTANTS:t}=Pe();return r.jsx(De,{href:"/favoritos",children:r.jsx(m.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:r.jsx(m.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};ad.displayName="Header.WishList";const Ig="_root_wvekm_126",Ue={"user-menu--credits":"_user-menu--credits_wvekm_1","user-menu--content":"_user-menu--content_wvekm_10","user-menu--login":"_user-menu--login_wvekm_30","user-menu--login--content":"_user-menu--login--content_wvekm_37","user-menu--menu":"_user-menu--menu_wvekm_64","user-menu--tooltip":"_user-menu--tooltip_wvekm_93","tooltip-modifier":"_tooltip-modifier_wvekm_104","modal-controls-modifier":"_modal-controls-modifier_wvekm_109","modal-header-modifier":"_modal-header-modifier_wvekm_117",root:Ig},id=({className:e,children:t,...n})=>r.jsx("div",{...n,className:m.helpers.classNameConcat(Ue["user-menu--content"],e),children:t});id.displayName="UserMenu.Content";var cd=(e=>(e.Account="account",e))(cd||{});const ld=({className:e,cashBack:t,credits:n,link:o,total:s,...a})=>{const i=t?U.formatPriceToCurrency(t):void 0,c=n?U.formatPriceToCurrency(n):void 0,l=s?U.formatPriceToCurrency(s):void 0;return r.jsx(m.Credits.Account,{...a,className:m.helpers.classNameConcat(Ue["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:o,totalValue:l,type:cd.Account})};ld.displayName="UserMenu.Credits";const ud=({className:e,children:t,description:n,text:o,...s})=>{const{isMobile:a}=ce();return r.jsx("div",{...s,className:m.helpers.classNameConcat(Ue["user-menu--login"],e),"data-mobile":a,children:r.jsxs("div",{className:Ue["user-menu--login--content"],children:[r.jsx(m.TextStructure.Root,{children:r.jsxs(m.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[r.jsx("h3",{className:"typography-style-body-lg-strong",children:o}),r.jsx("p",{children:n})]})}),t]})})};ud.displayName="UserMenu.Login";const dd=({className:e,isLogged:t,onLogoutClick:n,ICONS:o,storeConfig:s,isMobile:a})=>{const i=a?ra:ra({ICONS:o,storeConfig:s}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return r.jsxs("ul",{className:m.helpers.classNameConcat(Ue["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>r.jsx("li",{children:r.jsx(rt,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:r.jsx(m.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?r.jsx("li",{children:r.jsx(rt,{href:`${s.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${s.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(m.Icon,{name:Wm(o)})},children:Um})}):r.jsx(r.Fragment,{})]})};dd.displayName="UserMenu.Menu";const fd=e=>{const t=v.useRef(null),n=v.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=v.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=v.useCallback(a=>{a.key==="Escape"&&e()},[e]);return v.useEffect(()=>(document.addEventListener("mousedown",n),document.addEventListener("keydown",s),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",s),document.removeEventListener("touchstart",o)}),[n,s,o]),{ref:t}},Tg=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Og=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:o,left:s,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Tg(e==null?void 0:e.parentElement):0;return{left:s+i/2-(c.width+l*2),top:a+o+n}},pd=v.createContext({}),kg=({children:e,delay:t=600,gap:n=20,isOpen:o,setIsOpen:s,target:a,...i})=>{const c=v.useRef(null),[l,u]=v.useState(!1),[f,h]=v.useState({left:0,top:0}),{ref:d}=fd(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{s(!1),u(!1)},t))});return v.useEffect(()=>{if(a&&(d!=null&&d.current)){const{left:p,top:g}=Og(d.current,a,n??0);h({left:p,top:g}),u(!1)}},[n,o,a,d]),r.jsx(pd.Provider,{value:v.useMemo(()=>({...i,...f,contentRef:d,isLeaving:l,isOpen:o,setIsOpen:s,setIsLeaving:u,target:a}),[i,f,d,l,o,s,u,a]),children:e})},md=()=>{const e=v.useContext(pd);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},hd=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:o,setIsOpen:s}=md();return r.jsxs(m.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:o,setIsOpen:s,variant:"sideBottom",className:Ue["modal-root-modifier"],style:{zIndex:n.user_menu_mobile},children:[r.jsx(m.Modal.Header,{navigation:"top",className:Ue["modal-header-modifier"],children:r.jsx(m.Modal.Controls,{navigation:"top",isMobile:!0,className:Ue["modal-controls-modifier"]})}),r.jsx(m.Modal.Body,{children:e})]})};hd.displayName="UserMenu.Modal";const gd=({children:e,component:t,Z_INDEX_WAR:n,isMobile:o,...s})=>r.jsx(kg,{...s,className:Ue.root,children:o?r.jsxs(r.Fragment,{children:[r.jsx(ct.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(ct.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});gd.displayName="UserMenu.Root";const yd=({children:e,component:t,Z_INDEX_WAR:n,...o})=>{const{contentRef:s,left:a,isLeaving:i,isOpen:c,top:l}=md();return r.jsx(m.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...o,ref:s,children:t}),className:m.helpers.classNameConcat(Ue["user-menu--tooltip"],Ue["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:n.user_menu},children:r.jsx("div",{className:Ue["user-menu--tooltip"],children:e})})};yd.displayName="UserMenu.Tooltip";const ct={Credits:ld,Content:id,Login:ud,Menu:dd,Modal:hd,Root:gd,Tooltip:yd},zr=({children:e,isOpen:t,setIsOpen:n,target:o,storeConfig:s})=>{var d,p,g;const{isMobile:a}=ce(),{CONSTANTS:i}=Pe(),c=Ot(),l=()=>{window.location.href=`${s.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},u=!!((d=c.user)!=null&&d.userId),{cashback:f,credits:h}=v.useMemo(()=>{var y,_;return{credits:((y=c==null?void 0:c.getCurrentCredits())==null?void 0:y.credits)??0,cashback:((_=c==null?void 0:c.getCurrentCredits())==null?void 0:_.cashback)??0}},[c]);return r.jsx(ct.Root,{component:r.jsxs(ct.Content,{children:[r.jsx(ct.Login,{description:Vm(u),text:Gm(u,((p=c==null?void 0:c.user)==null?void 0:p.firstName)??((g=c==null?void 0:c.user)==null?void 0:g.email)),children:!u&&r.jsx(m.Button,{size:"medium",variant:"quaternary",onClick:()=>l(),children:i.header.MENU_INFO.login.button_text})}),h+f&&u?r.jsx(ct.Credits,{credits:h,cashBack:f,link:`${s.secureSubdomain}/account#/meus-creditos`,total:h+f}):r.jsx(r.Fragment,{}),r.jsx(m.Utils.Divider,{}),r.jsx(ct.Menu,{ICONS:i.header.ICONS,storeConfig:s,isLogged:u,className:U.responsive["responsive-desktop-flex"],onLogoutClick:()=>c.logout()}),r.jsx(ct.Menu,{ICONS:i.header.ICONS,storeConfig:s,isMobile:!0,isLogged:u,className:U.responsive["responsive-mobile-flex"],onLogoutClick:()=>c.logout()})]}),isOpen:t,isMobile:a,setIsOpen:n,target:o,Z_INDEX_WAR:i.header.Z_INDEX_WAR,children:e})};zr.displayName="UserMenu";const _d=({storeConfig:e})=>{const{CONSTANTS:t,userMenuDesktopRef:n}=Pe(),{handleSelectContent:o}=le(),{reset:s}=Vt(),{setValue:a}=gs(),i=hs(),c=v.useRef(null);return r.jsxs(r.Fragment,{children:[r.jsxs(m.Header.Wrapper,{children:[r.jsx(m.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",onMouseEnter:s,children:r.jsx(m.Icon,{name:t.header.ICONS.logo,size:"x-large",onClick:()=>{o({content:"header:logo"})}})})}),r.jsx(td,{}),r.jsxs(m.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(Rg,{}),r.jsx(zr,{isOpen:i,setIsOpen:a,target:c.current,storeConfig:e,children:r.jsx(m.Header.SupportItem,{onClick:()=>{a(!0),o({content:"header:user_menu"})},className:Ds["btn-login"],innerRef:n,children:r.jsx(m.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(ad,{}),r.jsx($s,{id:"cart-button"})]})]}),r.jsx(sd,{})]})};_d.displayName="Header.HeaderDesktopWrapper";const Fe={"menu--banners":"_menu--banners_1bvvz_1","menu--banners--item":"_menu--banners--item_1bvvz_6","menu--banners--item--text":"_menu--banners--item--text_1bvvz_17","menu--banners--list":"_menu--banners--list_1bvvz_21","menu--dummy-close":"_menu--dummy-close_1bvvz_46","menu--body":"_menu--body_1bvvz_54","menu--categories":"_menu--categories_1bvvz_67","menu--categories--title":"_menu--categories--title_1bvvz_80","menu--step":"_menu--step_1bvvz_92","menu--sub-category":"_menu--sub-category_1bvvz_108","menu--sub-category--item":"_menu--sub-category--item_1bvvz_115","menu--sub-category--list":"_menu--sub-category--list_1bvvz_121"},vd=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:o,submenuId:s,label:a,...i})=>r.jsx("button",{...i,className:Fe["menu--banners--item"],children:n?r.jsxs(m.Banner.Container,{children:[r.jsx(m.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{alt:t??n,height:128,src:n,width:343,unoptimized:!0})}),r.jsx(m.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{className:Fe["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:o?{color:o}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});vd.displayName="Menu.Mobile.Category";const xd=({label:e,...t})=>{const{CONSTANTS:n}=Pe();return r.jsx(m.Button,{...t,adornment:{end:r.jsx(m.Icon,{name:n.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};xd.displayName="Menu.Mobile.Body.Category";const bd=({subCategory:e,submenuLabel:t,onHandleOut:n,...o})=>r.jsx("div",{...o,className:Fe["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((s,a)=>r.jsx(rt,{disableUnderline:!0,disablePadding:!1,href:s.link??"#",onClick:()=>n(s.label,t),size:"medium",title:s.label??"",children:s.label},a)))});bd.displayName="Menu.Mobile.List";const jd=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Fe["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((o,s)=>r.jsxs("div",{className:Fe["menu--sub-category--item"],children:[r.jsx(qt.Title,{onHandleOut:t,subCategory:o,submenuLabel:e==null?void 0:e.id}),r.jsx(qt.List,{onHandleOut:t,subCategory:o,submenuLabel:e==null?void 0:e.id})]},s)))}):r.jsx(r.Fragment,{})};jd.displayName="Menu.Mobile.Body.SubCategory";const Cd=({subCategory:e,submenuLabel:t,onHandleOut:n,...o})=>{var c;const{router:s}=_e(),{handleSelectContent:a}=le(),{CONSTANTS:i}=Pe();return r.jsxs("div",{...o,className:Fe["menu--categories--title"],children:[r.jsx(Yt,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&r.jsx(m.ComponentList.Support,{adornment:{end:r.jsx(m.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;n(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&s.push(e.see_all.link)},children:e.see_all.label})]})};Cd.displayName="Menu.Mobile";const qt={Banner:vd,Category:xd,List:bd,SubCategory:jd,Title:Cd},Sd=v.createContext({}),Lg=({children:e})=>{const[t,n]=v.useState(null),o=v.useCallback(()=>{n(null)},[]),s=a=>{a!==t&&n(a)};return r.jsx(Sd.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:o,handleChangeSubMenuOpened:s},children:e})},Pd=()=>v.useContext(Sd),wd=e=>{const{router:t}=_e(),{headerData:n}=Pe(),{handleSelectContent:o}=le(),{currentCategory:s,setCurrentCategory:a}=Pd(),i=v.useRef(null),c=()=>{if(i.current){const d=i.current;d&&(a(null),d==null||d.click())}},l=(d,p)=>{o({content:`menu:${d}`}),t.push(p),c()},u=(d,p)=>{o({content:`menu:${d}:${p}`}),c()},f=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],h=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[];return r.jsxs("div",{...e,className:Fe["menu--body"],style:{transform:`translate3d(calc(-100% * ${s?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Fe["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Fe["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Fe["menu--banners"],children:r.jsx("div",{className:Fe["menu--banners--list"],children:f.map((d,p)=>v.createElement(qt.Banner,{...d,key:p,onClick:()=>l(d.label,d.link)},d.mobileBannerAlt))})}),r.jsx("div",{className:Fe["menu--categories"],children:f.map((d,p)=>r.jsx(qt.Category,{label:d.label,onClick:()=>a(d.submenuId??null)},p))})]}),r.jsx("div",{className:Fe["menu--step"],"data-active":!!s,children:r.jsx(qt.SubCategory,{current:h.find(d=>d.id===s),onHandleOut:u})})]})};wd.displayName="Menu.Mobile.Body";const Mg={"menu--header":"_menu--header_1ozdf_1"},Ed=()=>{var s;const{headerData:e}=Pe(),{currentCategory:t,setCurrentCategory:n}=Pd(),o=(s=e==null?void 0:e.categories)==null?void 0:s.find(a=>a.submenuId===t);return r.jsxs("div",{className:Mg["menu--header"],children:[r.jsx(m.Button,{"data-out":!o,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),o&&r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:o==null?void 0:o.label})})}),r.jsx(m.Button,{iconNameStart:"close","data-close":!0,"data-only":!o,mode:"inverse",onClick:()=>n(null)})]})};Ed.displayName="Menu.Mobile.Header";var Yo={exports:{}};function Dg(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Sn={},Pn={},Ha;function $g(){return Ha||(Ha=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return o}});const o=ke._(v).default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="LoadableContext")}(Pn)),Pn}var Ua;function zg(){return Ua||(Ua=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return p}});const n=ke._(v),o=$g();function s(g){return g&&g.default?g.default:g}const a=[],i=[];let c=!1;function l(g){let y=g(),_={loading:!0,loaded:null,error:null};return _.promise=y.then(b=>(_.loading=!1,_.loaded=b,b)).catch(b=>{throw _.loading=!1,_.error=b,b}),_}function u(g,y){let _=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),b=null;function S(){if(!b){const P=new f(g,_);b={getCurrentValue:P.getCurrentValue.bind(P),subscribe:P.subscribe.bind(P),retry:P.retry.bind(P),promise:P.promise.bind(P)}}return b.promise()}if(typeof window>"u"&&a.push(S),!c&&typeof window<"u"){const P=_.webpack&&typeof Dg.resolveWeak=="function"?_.webpack():_.modules;P&&i.push(E=>{for(const C of P)if(E.includes(C))return S()})}function x(){S();const P=n.default.useContext(o.LoadableContext);P&&Array.isArray(_.modules)&&_.modules.forEach(E=>{P(E)})}function j(P,E){x();const C=n.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return n.default.useImperativeHandle(E,()=>({retry:b.retry}),[]),n.default.useMemo(()=>C.loading||C.error?n.default.createElement(_.loading,{isLoading:C.loading,pastDelay:C.pastDelay,timedOut:C.timedOut,error:C.error,retry:b.retry}):C.loaded?n.default.createElement(s(C.loaded),P):null,[P,C])}return j.preload=()=>S(),j.displayName="LoadableComponent",n.default.forwardRef(j)}class f{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:_}=this;y.loading&&(typeof _.delay=="number"&&(_.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},_.delay)),typeof _.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},_.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(b=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(_=>_())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,_){this._loadFn=y,this._opts=_,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function h(g){return u(l,g)}function d(g,y){let _=[];for(;g.length;){let b=g.pop();_.push(b(y))}return Promise.all(_).then(()=>{if(g.length)return d(g,y)})}h.preloadAll=()=>new Promise((g,y)=>{d(a).then(g,y)}),h.preloadReady=g=>(g===void 0&&(g=[]),new Promise(y=>{const _=()=>(c=!0,y());d(i,g).then(_,_)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=h.preloadReady);const p=h}(Sn)),Sn}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(f,h){for(var d in h)Object.defineProperty(f,d,{enumerable:!0,get:h[d]})}n(t,{noSSR:function(){return l},default:function(){return u}});const o=ke,s=o._(v),a=o._(zg()),i=typeof window>"u";function c(f){return{default:(f==null?void 0:f.default)||f}}function l(f,h){if(delete h.webpack,delete h.modules,!i)return f(h);const d=h.loading;return()=>s.default.createElement(d,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(f,h){let d=a.default,p={loading:_=>{let{error:b,isLoading:S,pastDelay:x}=_;if(!x)return null;if(process.env.NODE_ENV!=="production"){if(S)return null;if(b)return s.default.createElement("p",null,b.message,s.default.createElement("br",null),b.stack)}return null}};f instanceof Promise?p.loader=()=>f:typeof f=="function"?p.loader=f:typeof f=="object"&&(p={...p,...f}),p={...p,...h};const g=p.loader,y=()=>g!=null?g().then(c):Promise.resolve(c(()=>null));return p.loadableGenerated&&(p={...p,...p.loadableGenerated},delete p.loadableGenerated),typeof p.ssr=="boolean"&&!p.ssr?(delete p.webpack,delete p.modules,l(d,p)):d({...p,loader:y})}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Yo,Yo.exports);var Fg=Yo.exports,Bg=Fg;const Rd=kr(Bg),Pr={"modal-modifier":"_modal-modifier_394qw_1","menu--navigation-bar":"_menu--navigation-bar_394qw_15","menu--root":"_menu--root_394qw_25"},Ad=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=xs(),{CONSTANTS:o}=Pe();return r.jsxs(m.Modal.RootWithoutPortal,{className:Pr["modal-modifier"],isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:o.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Ed,{}),r.jsx(m.Modal.Body,{className:Pr["menu--root"],children:e})]})};Ad.displayName="Menu.MenuRoot";const qg=Rd(()=>Promise.resolve(Ad),{ssr:!1}),Nd=({children:e,last:t=!1,...n})=>r.jsxs(r.Fragment,{children:[r.jsx(m.Button,{...n,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&r.jsx(m.Utils.Divider,{direction:"vertical",size:"small",className:Pr.divider})]});Nd.displayName="Menu.NavigationBarItem";const Id=()=>{const{setUserMenuIsOpen:e}=xs(),{handleSelectContent:t}=le(),{CONSTANTS:n}=Pe(),{router:o}=_e(),s=[{iconNameStart:n.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:n.header.MENU_INFO.login.button_text},{iconNameStart:n.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),o.push("/favoritos")},text:n.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:n.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),o.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(m.Card,{id:"menu-navigationbar",shadow:!0,className:Pr["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(s)&&s.map((a,i)=>v.createElement(Nd,{...a,key:i},a.text))})};Id.displayName="Menu.NavigationBar";const wn={Body:wd,NavigationBar:Id,Root:qg},Td=({storeConfig:e,SearchModal:t})=>{const n=v.useRef(null),{CONSTANTS:o}=Pe(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:a}=o.header,{handleSelectContent:i}=le(),{setValue:c}=ms(),{setValue:l}=tl(),{setValue:u}=gs(),f=hs(),h=el(),d=nl();return r.jsxs(r.Fragment,{children:[r.jsxs(m.Header.Wrapper,{children:[r.jsx(m.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",children:r.jsx(m.Icon,{name:a.logo,size:"x-large",onClick:()=>{i({content:"header:logo"})}})})}),r.jsxs(m.Header.Support,{children:[r.jsx(m.Header.SupportItem,{onClick:()=>{c(!0),i({content:"header:search"})},children:r.jsx(m.Icon,{name:a.search,size:"medium"})}),r.jsx($s,{}),r.jsxs(m.Header.SupportItem,{onClick:()=>l(!0),children:[r.jsx("span",{ref:n}),r.jsx(m.Icon,{name:a.menu,size:"medium"})]})]})]}),r.jsx(t,{setModalIsOpen:c,isOpen:d,recommendations:!1,trends:!0}),r.jsx(gl,{menuIsOpen:h,setMenuIsOpen:l,userMenuIsOpen:h,setUserMenuIsOpen:u,children:r.jsx(zr,{storeConfig:e,isOpen:f,setIsOpen:u,target:n==null?void 0:n.current,children:r.jsxs(wn.Root,{children:[r.jsx(wn.Body,{}),s?r.jsx(wn.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Td.displayName="Header.HeaderMobileWrapper";const Hg=v.createContext({}),Ug=({children:e})=>{const{sendDataLayerEvent:t}=le(),{cartStore:n,isOpen:o}=Ee();v.useEffect(()=>{o&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[o]),v.useEffect(()=>{var a,i,c;if(n.id&&!((i=(a=n.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=n;mt.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:Hc(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);const s=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return r.jsx(Hg.Provider,{value:{handleUpdateItemQuantityEvent:s},children:e})},Wg="_fadeInOut_ottz1_1",Gg="_fadeOut_ottz1_1",de={"mc--cashback":"_mc--cashback_ottz1_1","mc--cashback--positive":"_mc--cashback--positive_ottz1_21","mc--cashback--alert":"_mc--cashback--alert_ottz1_24","mc--container--actions":"_mc--container--actions_ottz1_28","mc--container--actions--secondary":"_mc--container--actions--secondary_ottz1_36","mc--container--actions--toggle-size-modifier":"_mc--container--actions--toggle-size-modifier_ottz1_54","mc--footer":"_mc--footer_ottz1_58","mc--footer--actions":"_mc--footer--actions_ottz1_67","mc--footer--actions-button":"_mc--footer--actions-button_ottz1_73","mc--footer--total":"_mc--footer--total_ottz1_89","mc--footer--total--info":"_mc--footer--total--info_ottz1_94","mc--footer--total--info--content":"_mc--footer--total--info--content_ottz1_99","mc--field":"_mc--field_ottz1_143","mc--body":"_mc--body_ottz1_183","mc--body--products":"_mc--body--products_ottz1_190","mc--body--empty--feedback":"_mc--body--empty--feedback_ottz1_198","mc--body--empty--text":"_mc--body--empty--text_ottz1_203","mc--header":"_mc--header_ottz1_217","mc--header--subtitle":"_mc--header--subtitle_ottz1_243","mc--notify":"_mc--notify_ottz1_284","mc--notify--content":"_mc--notify--content_ottz1_299","mc--notify--item":"_mc--notify--item_ottz1_312",fadeInOut:Wg,fadeOut:Gg,"mc--card":"_mc--card_ottz1_374","mc--card--actions":"_mc--card--actions_ottz1_379","mc--card--actions--secondary":"_mc--card--actions--secondary_ottz1_387","mc--card--actions--add-remove":"_mc--card--actions--add-remove_ottz1_414","mc--card--actions--gift":"_mc--card--actions--gift_ottz1_428","mc--card--content-info":"_mc--card--content-info_ottz1_444","mc--card--details":"_mc--card--details_ottz1_451","mc--card--link":"_mc--card--link_ottz1_456","mc--product--unavailable":"_mc--product--unavailable_ottz1_464","mc--card--name":"_mc--card--name_ottz1_467","mc--card--price":"_mc--card--price_ottz1_482","mc--card--price--old-price":"_mc--card--price--old-price_ottz1_492","mc--card--price--price-details":"_mc--card--price--price-details_ottz1_496","mc--card--product-link":"_mc--card--product-link_ottz1_507","mc--discount":"_mc--discount_ottz1_517","mc--discount--body":"_mc--discount--body_ottz1_526","minicart--modal-modifier":"_minicart--modal-modifier_ottz1_547"},Od=({item:{id:e,message:t,callback:n},removeNotification:o,ICONS:s})=>{const a=v.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{o(l)};return r.jsx("div",{className:de["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:r.jsxs(m.SnackBar.Structure,{size:"medium",children:[r.jsx(m.SnackBar.Content,{title:t}),r.jsxs(m.SnackBar.Support,{children:[typeof n=="function"&&r.jsx(m.Button,{onClick:()=>{n(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),r.jsx(m.Button,{iconNameStart:s.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};Od.displayName="MiniCart.Notify.Item";const kd=({ICONS:e})=>{const t=fs(),{removeNotification:n}=ps(),o=t.length?[...t].sort((s,a)=>a.id-s.id):[];return r.jsx("div",{className:de["mc--notify"],children:r.jsx("div",{className:de["mc--notify--content"],children:Array.isArray(o)&&o.map(s=>r.jsx(Od,{item:s,removeNotification:n,ICONS:e},s.id))})})};kd.displayName="MiniCart.Notifications";const Vg=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:o,...s})=>{const a=Tt(),{toggleProduct:i}=vt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(m.Button,{...s,adornment:{end:r.jsx(m.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${o.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:o.messages.add_wishlist_button})},Ld=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:o,...s})=>{const{addToCart:a,removeToCart:i}=Ee(),{bundleItems:c=[],id:l,uniqueId:u,seller:f,offerings:h,quantity:d}=t,p=(g,y,_)=>{i(l,g.title,()=>{typeof _=="function"&&_(),a({id:l,quantity:y,seller:f},{id:l,texture:g.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:de["mc--card--actions--add-remove"],children:[o.has_wishlist_button&&r.jsx(Vg,{...s,product:t,handleSendEvent:e,onHandleRemove:p,ICONS:n,MINICART_CONFIG:o}),r.jsx(m.Button,{...s,adornment:{end:r.jsx(m.Icon,{name:n.delete,size:"small"})},variant:"secondary",state:"danger",onClick:()=>{p({texture:"mini-cart",title:`${o.messages.remove}`},d),e("remove_from_cart","skuEvents")},children:o.messages.remove_button})]}),o.has_gift_option&&r.jsx(Ct.Gift,{uniqueId:u,bundleItems:c,offerings:h,ICONS:n,MINICART_CONFIG:o})]})};Ld.displayName="MiniCart.Card.Actions";const Md=({bundleItems:e,offerings:t,uniqueId:n,ICONS:o,MINICART_CONFIG:s})=>{const[a,i]=v.useState(!1),{toggleGiftItemCart:c}=Ee(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[h]=t;if(h){i(!0);const d=e.some(p=>p.id===h.id);c(n,String(h.id),d).then(()=>i(!1))}}},u=t[0],f=e.find(h=>h.id===u.id);return u&&"id"in u?r.jsx("div",{className:de["mc--card--actions--gift"],children:r.jsx(m.Checkbox,{adornment:r.jsx(m.Icon,{name:o.check}),checked:!!f,disabled:a,label:s.messages.giftPackage,onChange:l})}):null};Md.displayName="MiniCart.Card.Gift";const Dd=({itemOffered:e})=>{const t=U.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(De,{href:`${e==null?void 0:e.slug}`,className:de["mc--card--product-link"],children:r.jsx(Ie.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164})})};Dd.displayName="MiniCart.Card.Media";const $d=({name:e,skuName:t,tagName:n,className:o})=>r.jsxs(r.Fragment,{children:[n&&r.jsx(m.Tag,{variant:"quaternary",title:n,style:{textTransform:"uppercase"},children:n}),r.jsx("p",{className:m.helpers.classNameConcat(de["mc--card--name"],o),children:U.getProductNameWithoutSku(e??"",t??"")})]});$d.displayName="MiniCart.Card.Name";const zd=({total:e,totalList:t})=>r.jsx(m.ProductInfo.Root,{children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{className:de["mc--card--price"],children:r.jsx(m.ProductInfo.Wrapper,{className:de["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?r.jsxs(r.Fragment,{children:[r.jsx(m.ProductInfo.Price,{label:"originalPrice",value:U.formatPriceToCurrency(t),size:"small"}),r.jsx(m.ProductInfo.Price,{label:"discountPrice",value:U.formatPriceToCurrency(e),size:"small"})]}):r.jsx(m.ProductInfo.Price,{label:"defaultPrice",value:U.formatPriceToCurrency(e),size:"small"})})})})});zd.displayName="MiniCart.ProductPrice";const Fd=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[o,s]=v.useState(""),a=v.useRef(null),{cartStore:{options:i}}=Ee(),c=e.itemOffered.isVariationOf.productGroupID,l=v.useCallback(()=>{var h;const f=(h=i==null?void 0:i.find(d=>d.id===c))==null?void 0:h.texture;if(f){s(f);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(d=>d.json()).then(d=>{const p=d.data[0].items.find(g=>g.itemId===e.id);if(p){const g=p.images.find(y=>t.includes(y.imageLabel));if(g!=null&&g.imageUrl){s(g.imageUrl);return}s(p.images[0].imageUrl)}}).catch(d=>{console.error(d)})},[i,c,e.id]);return v.useEffect(()=>{if(!a.current)return;new IntersectionObserver(l).observe(a.current)},[l]),r.jsx("div",{ref:a,children:r.jsx(m.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(m.ToggleStyle.Texture,{children:o?r.jsx(Ie.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:o,width:164,height:164,style:n}):r.jsx(lu,{})})})})};Fd.displayName="MiniCart.Card.Style";const Bd=({product:e,NAME_SPLIT_SYMBOL:t,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{size:s}=U.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",t);return r.jsxs(m.Utils.Row,{alignItems:"center",children:[r.jsx(Fd,{product:e,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o}),r.jsx(m.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),s&&r.jsx(m.ToggleSize.Wrapper,{size:"small",variation:"fill",className:de["mc-container-actions--toggle-size-modifier"],children:r.jsx(m.ToggleSize.Text,{children:s})})]})};Bd.displayName="MiniCart.Card.Sku";const Ct={Actions:Ld,Gift:Md,Media:Dd,Name:$d,Price:zd,Sku:Bd},Kg=e=>{var t;return{price:e.sellingPrice/100,listPrice:e.listPrice/100,totalPrice:(((t=e.priceDefinition)==null?void 0:t.total)??0)/100,totalListPrice:e.listPrice*e.quantity/100}},qd=({available:e=!0,index:t,product:n,ICONS:o,MINICART_CONFIG:s,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var h,d;const{sendDataLayerEvent:l}=le(),u=Kg(n),f=(p,g)=>{const y={commonData:{...n,...u},customData:{index:t},event:p};if(g==="skuEvents"){const _={...n,...u};y.supportData={selectedSkus:[_]},y.commonData.products=[_]}l({functionKey:g,data:y})};return r.jsxs("div",{className:m.helpers.classNameConcat(de["mc--card"],e?"":de["mc--card--unavailable"]),children:[r.jsx(Ct.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:de["mc--card--content-info"],children:[r.jsx(Ct.Name,{name:((h=n.itemOffered)==null?void 0:h.name)??"",skuName:(d=n.itemOffered)==null?void 0:d.skuName}),r.jsxs("div",{className:de["mc--card--details"],children:[r.jsx("div",{className:de["mc--card--actions"],children:e?r.jsx(Ct.Price,{total:u.price,totalList:u.listPrice}):r.jsx(m.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:de["mc--card--actions--secondary"],children:[e&&r.jsx(Ct.Sku,{product:n,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(Ct.Actions,{handleSendEvent:f,product:n,size:"small",variant:"tertiary",ICONS:o,MINICART_CONFIG:s})]})]})]})]})};qd.displayName="MiniCart.Card";const Hd=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:o}=Ot(),s=((a=o==null?void 0:o.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return s>0?r.jsxs("div",{className:m.helpers.classNameConcat(de["mc--cashback"],de[`mc--cashback--${e}`]),children:[r.jsx(m.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:U.formatPriceToCurrency(s)})," ",n.title]})]}):null};Hd.displayName="MiniCart.Cashback";const Ud=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:o,removeCoupon:s,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=Ee(),[l,u]=v.useState(!1),[f,h]=v.useState(!1),d=v.useCallback(()=>{let _="";return e==="coupon"?_=(i==null?void 0:i.coupon)??"":_=String((c==null?void 0:c.value)??""),_.toUpperCase()??""},[i,c,e]),[p,g]=v.useState(!!d()),y=async _=>{h(!0),!!d()&&(e==="coupon"?await s():await a(),g(!1),u(!1)),await o(_,e).then(S=>{if(!S.statusOk&&_||S.code!==200){_?(u(!0),g(!1)):u(!1);return}g(!0),u(!1)}).catch(()=>u(!0)).finally(()=>h(!1))};return r.jsx(Le.Field,{hasError:l,hasSuccess:p,isLoading:f,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:d(),MINICART_CONFIG:n,ICONS:t})};Ud.displayName="MiniCart.CouponSeller";const Wd=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:o}=_e(),s=()=>{o.push(n.link)};return r.jsxs(m.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:de["mc--body--empty--feedback"],children:[r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsxs("p",{className:`typography-style-body-xs ${de["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(m.Button,{variant:"tertiary",size:"large",onClick:()=>s(),"data-close":!0,adornment:{end:r.jsx(m.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Wd.displayName="MiniCart.Feedback";const Xg=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},Gd=({feedback:e,hasError:t,onHandler:n,hasSuccess:o,type:s,title:a,value:i,ICONS:c})=>{const[l,u]=v.useState(i);v.useEffect(()=>{t||u(i)},[i,t]);const f=()=>t?r.jsx(m.Icon,{name:c.delete_circle}):String(i).length&&o?r.jsx(m.Icon,{name:c.check_circle}):null,h=()=>{if(s==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},d=()=>{if(s==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},p=y=>{const _=y.currentTarget.value;if(_===""&&typeof n=="function"||o&&String(i).length>0&&_!==String(i)||t&&_!==String(i)){u(""),n("");return}if(s==="cep"){const S=Xg(_);u(S)}else u(_)},g=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof n=="function"){const _=y.currentTarget.value;n(_)}};return r.jsx(m.TextField.Input,{adornment:{end:f()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:h,onBlur:d,onChange:p,onKeyDown:g})};Gd.displayName="MiniCart.Field.Input";const Vd=({title:e,ICONS:t,MINICART_CONFIG:n,...o})=>{const s=v.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:f}=o,h=()=>i?"error":String(f).length&&a?"success":"none",d=v.useCallback(()=>{if(s.current){const y=s.current.querySelector("input");y&&typeof l=="function"&&(f!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,f,i]),p=h();return r.jsx("div",{ref:s,children:r.jsx(m.TextField.Structure,{className:de["mc--field"],input:r.jsx(Gd,{...o,feedback:p,title:e,ICONS:t}),right:r.jsx(m.Button,{"data-has-success":!a,size:"medium",title:String(f).length&&a||i?"Remover":"Aplicar",onClick:()=>d(),disabled:c,children:String(f).length&&a||i?r.jsx(m.Icon,{name:"close",size:"small"}):`${n.messages.promo_code_button}`}),supportText:u==="cep"&&p==="success"?r.jsx(m.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};Vd.displayName="MiniCart.Field";const Kd=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:o,PLP_NOT_RESULT:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i})=>{const{cartStore:{items:c,messages:l}}=Ee();return r.jsxs(m.Modal.Body,{className:de["mc--body"],children:[e,r.jsx("div",{className:de["mc--body--products"],children:Array.isArray(c)&&c.length?c.map((u,f)=>{const h=l.find(d=>{var p;return d.code==="withoutStock"&&((p=d.fields)==null?void 0:p.ean)===u.ean})!==void 0;return r.jsx(Le.Card,{available:!u.availability.includes("outStock")||!h,index:f,product:u,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i},`${u.id}-${u.itemOffered.sku}-${f}`)}):r.jsx(Le.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:s})})]})};Kd.displayName="MiniCart.Body";const Xd=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:o}=Ee();if(o.items.length===0)return null;const s=()=>{var i;const a=new URLSearchParams({orderFormId:o.id,...((i=o.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:o.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return r.jsxs(m.Modal.Footer,{className:de["mc--footer"],children:[e,r.jsx("div",{className:de["mc--footer--actions"],children:r.jsx(m.Button,{variant:"primary",size:"large","data-close":!0,className:de["mc--footer--actions-button"],onClick:s,children:n.messages.checkout_button})})]})};Xd.displayName="MiniCart.Modal.Footer";const Yd=({children:e,className:t,ICONS:n,MINICART_CONFIG:o})=>r.jsxs(m.Accordion.Wrapper,{className:de["mc--discount"],children:[r.jsx(m.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:r.jsx(m.Icon,{name:n.arrow_up,size:"medium"}),openIndicator:r.jsx(m.Icon,{name:n.arrow_down,size:"medium"}),className:m.helpers.classNameConcat(de["mc--discount--header"],t),startOpen:o.promotion_input_starts_open,children:r.jsx(m.TextStructure.Root,{children:r.jsxs(m.TextStructure.DivWrapper,{children:[r.jsxs("h3",{className:"typography-style-body-sm",children:[o.messages.promo_code_title," "]}),r.jsx("p",{className:"typography-style-body-xs",children:o.messages.promo_code_subtitle})]})})}),r.jsx(m.Accordion.Body,{className:de["mc--discount--body"],children:e}),r.jsx(m.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]});Yd.displayName="MiniCart.Discount";const Qd=({discount:e,shipping:t,total:n})=>{var c;const{tags:o}=ot(),s=n-Math.abs(e??0)+(t??0),a=t===0?"Frete Grátis":U.formatPriceToCurrency((t??0)/100),i=[{title:"Subtotal",value:U.formatPriceToCurrency(n/100)},{title:"Frete",value:t===void 0?"A calcular":a},{title:"Desconto",value:U.formatPriceToCurrency((e??0)/100)},{message:((c=o==null?void 0:o.flagCart)==null?void 0:c.flagTotal)??"",title:"Total",value:`1x de ${U.formatPriceToCurrency(s/100)}`}];return r.jsx("div",{className:de["mc--footer--total"],children:Array.isArray(i)&&i.map((l,u)=>r.jsxs("div",{className:de["mc--footer--total--info"],"data-discount":l.title==="Desconto",children:[r.jsx("p",{children:l.title}),r.jsxs("div",{className:de["mc--footer--total--info--content"],children:[l.message&&r.jsx(m.Tag,{variant:"primary",title:l.message,children:l.message}),r.jsx(m.ProductInfo.Price,{className:de["mc--footer--total--info"],label:l.title,value:l.value})]})]},u))})};Qd.displayName="MiniCart.Modal.Footer.Resume.Items";const Zd=({totalizers:e})=>{var s,a,i;const t=((s=e.find(c=>c.id==="Items"))==null?void 0:s.value)??0,n=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,o=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return r.jsx(Qd,{discount:n??0,total:t,shipping:o})};Zd.displayName="MiniCart.Modal.Footer.Totals";const Jd=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=ce(),{cartStore:{items:o}}=Ee(),s=o.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(m.Modal.Header,{navigation:"top",className:de["mc--header"],children:r.jsxs(m.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(m.Modal.Title,{navigation:"top",title:t.messages.title}),r.jsx("span",{className:de["mc--header--subtitle"],children:s!==1?`[${s}] Produtos`:`[${s}] Produto`}),r.jsx(m.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};Jd.displayName="MiniCart.Modal.Header";const ef=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:o,removeCEP:s}=Ee(),{sendDataLayerEvent:a}=le(),[i,c]=v.useState(!1),[l,u]=v.useState(!1),f=v.useCallback(()=>{var b;return((b=n==null?void 0:n.address)==null?void 0:b.postalCode)??""},[n]),[h,d]=v.useState(!!f()),p=()=>{d(!1),c(!1)},g=b=>{var S;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(S=b.logisticsInfo)==null?void 0:S.reduce((x,j)=>{var T;const P=(T=j==null?void 0:j.slas)==null?void 0:T.find(w=>(w==null?void 0:w.id)===(j==null?void 0:j.selectedSla));if(!P)return x;const E=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),C=Number((((P==null?void 0:P.price)??0)/100).toFixed(2));if(x.shipping_tier===void 0)return x.shipping_tier=j==null?void 0:j.selectedSla,x.delivery_time=E.toString(),x.shipping=C,x.flag_retirada=(j==null?void 0:j.selectedDeliveryChannel)==="delivery"?"false":"true",x;const R=parseInt(x.delivery_time??"0");return E>R&&(x.delivery_time=E.toString()),x.shipping=(x.shipping??0)+C,x},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const S=b.replace(/\D/g,"");if(S.length!==8)return!1;try{return!(await mt.get(`https://viacep.com.br/ws/${S}/json/`)).data.erro}catch{return!1}},_=async b=>{if(u(!0),!!f()||!(b!=null&&b.trim())){await s(),p(),u(!1);return}if(!await y(b)){c(!0),d(!1),u(!1);return}try{const P=await o(b);if(c(!1),P){d(!0);const E=g(P);E&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:E}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(Le.Field,{hasSuccess:h,hasError:i,isLoading:l,onHandler:_,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:f(),ICONS:e,MINICART_CONFIG:t})};ef.displayName="MiniCart.Shipping";const tf=()=>{var n;const{tags:e}=ot(),t=(n=e==null?void 0:e.flagCart)==null?void 0:n.flagHeader;return t!=null&&t.value?r.jsx(m.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?r.jsx(m.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};tf.displayName="MiniCart.TagMessage";const Le={Body:Kd,Card:qd,Cashback:Hd,CouponSeller:Ud,Discount:Yd,Field:Vd,Feedback:Wd,Shipping:ef,Footer:Xd,Header:Jd,TagMessage:tf,Totals:Zd},Yg=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a,Z_INDEX_WAR:i,storeConfig:c,minicartStyleModifiers:l})=>{const{isOpen:u,setIsOpen:f,cartStore:h}=Ee(),{isMobile:d}=ce();return r.jsxs(m.Modal.Root,{className:m.helpers.classNameConcat(de["minicart--modal-modifier"],l),isMobile:!0,isOpen:u,setIsOpen:f,style:{zIndex:i.modal},variant:d?"sideBottom":"sideRight",children:[r.jsx(Le.Header,{ICONS:e,MINICART_CONFIG:t}),r.jsx(Le.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a,children:r.jsx(Le.TagMessage,{})}),r.jsxs(Le.Footer,{MINICART_CONFIG:t,storeConfig:c,children:[r.jsxs(Le.Discount,{ICONS:e,MINICART_CONFIG:t,children:[r.jsx(Le.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),r.jsx(Le.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),r.jsx(Le.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),r.jsx(Le.Totals,{totalizers:h.totalizers})]}),r.jsx(kd,{ICONS:e})]})},rf=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:o,SearchModal:s})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Pe(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:f}=c;return r.jsx(m.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:Ds["header-animation"],children:r.jsxs(m.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsx(r.Fragment,{children:r.jsxs(Lg,{children:[r.jsx("div",{className:U.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Td,{storeConfig:o,SearchModal:s})}),r.jsx("div",{className:U.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(_d,{storeConfig:o})})]})}),r.jsx(Ug,{children:r.jsx(Yg,{...f,minicartStyleModifiers:t})}),r.jsx(Ts,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};rf.displayName="Header";const Qg="_shippingFreight_6z8rf_6",Zg="_shippingFreight__postalCodeGrid_6z8rf_10",Jg="_shippingFreight__grid_6z8rf_14",ey="_shippingFreight__grid__title_6z8rf_18",ty="_shippingFreight__grid__remember_6z8rf_29",ry="_postalCodeContainer_6z8rf_44",ny="_deliveryStatusBar__tag_6z8rf_49",oy="_deliveryStatusBarError__tag_6z8rf_66",sy="_deliveryInfo_6z8rf_74",ay="_deliveryInfo__content_6z8rf_78",iy="_deliveryInfo__text_6z8rf_84",cy="_deliveryInfo__title_6z8rf_89",ly="_deliveryInfo__subtitle_6z8rf_99",uy="_deliveryInfo__tooltipIcon_6z8rf_109",dy="_deliveryInfo__tooltip_6z8rf_109",fy="_freightGrid_6z8rf_148",py="_freightContainer_6z8rf_155",my="_freightOption__content_6z8rf_160",hy="_freightOption__value_6z8rf_166",gy="_freightOption__title_6z8rf_177",yy="_freightOption__title_item_6z8rf_181",_y="_freightOption__paragraph_6z8rf_192",ge={shippingFreight:Qg,shippingFreight__postalCodeGrid:Zg,shippingFreight__grid:Jg,shippingFreight__grid__title:ey,shippingFreight__grid__remember:ty,postalCodeContainer:ry,deliveryStatusBar__tag:ny,deliveryStatusBarError__tag:oy,deliveryInfo:sy,deliveryInfo__content:ay,deliveryInfo__text:iy,deliveryInfo__title:cy,deliveryInfo__subtitle:ly,deliveryInfo__tooltipIcon:uy,deliveryInfo__tooltip:dy,freightGrid:fy,freightContainer:py,freightOption__content:my,freightOption__value:hy,freightOption__title:gy,freightOption__title_item:yy,freightOption__paragraph:_y,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},vy=({icon:e,title:t,subtitle:n,packageCount:o,packageUnit:s="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=v.useState(!1),f=v.useRef(null),h=()=>u(d=>!d);return r.jsxs("div",{className:ge.deliveryInfo,ref:f,children:[r.jsx(m.Tooltip.Root,{arrow:"bottom",component:r.jsx("div",{children:r.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:f.current}),r.jsxs("div",{className:ge.deliveryInfo__content,children:[r.jsx("div",{className:ge.deliveryInfo__icon,children:r.jsx(m.Icon,{name:e,size:"medium"})}),r.jsxs("div",{className:ge.deliveryInfo__text,children:[r.jsxs("span",{className:ge.deliveryInfo__title,children:[t," ",o," ",s]}),n&&r.jsx("span",{className:ge.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:ge.deliveryInfo__tooltipIcon,onMouseEnter:h,onMouseLeave:h,"aria-label":"Mostrar descrição",children:[r.jsx("span",{children:r.jsx(m.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&r.jsx("div",{className:ge.deliveryInfo__tooltip,children:a})]})]})]})},xy=({value:e,title:t,paragraph:n})=>r.jsx("div",{className:ge.freightOption,children:r.jsxs("div",{className:ge.freightOption__content,children:[r.jsx("span",{className:ge.freightOption__value,children:e}),r.jsx("span",{className:ge.freightOption__title,children:r.jsx(m.TextStructure.Root,{children:r.jsxs(m.TextStructure.DivWrapper,{className:ge.footer__item,children:[r.jsx("span",{className:ge.freightOption__title_item,children:t}),n&&r.jsx("span",{className:ge.freightOption__paragraph,children:n})]})})})]})}),by=({children:e})=>r.jsx("div",{className:ge.freightContainer,children:e}),jy=({children:e})=>r.jsx("div",{className:ge.freightGrid,children:e}),Cy=({children:e})=>r.jsx("div",{className:ge.postalCodeContainer,children:e}),Wa=({message:e,seller:t="",size:n="small",setError:o})=>r.jsx("div",{className:o?ge.deliveryStatusBarError:ge.deliveryStatusBar,children:r.jsxs(m.Tag,{title:e,className:o?ge.deliveryStatusBarError__tag:ge.deliveryStatusBar__tag,size:n,children:[e," ",!o&&t]})}),Sy=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Py=e=>{var n,o,s;const t=[];return(s=(o=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[0])==null?void 0:o.slas)==null||s.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},wy=({component:e,parent:t,top:n,left:o,target:s,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ce();return r.jsx(r.Fragment,{children:u?r.jsx(m.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):r.jsx(m.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ge["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Ey=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:o,quantity:s,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var N,I,z,k;const f=Rt(),h=Rt(W=>W.shipping),[d,p]=v.useState(),[g,y]=v.useState(!1),[_,b]=v.useState(!1),[S,x]=v.useState(!1),j=(I=(N=f.shippingData)==null?void 0:N.address)==null?void 0:I.postalCode,P=!(d!=null&&d.length)&&j?j:d,E=v.useRef(null),C=async W=>{const F=W.target.value.replace(/\D/g,"").slice(0,8);F.length>5?p(F.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):p(F)},R=async W=>{const q=W.target.value.replace(/\D/g,"");try{if((await mt.get(`https://viacep.com.br/ws/${q}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),b(!0);return}a&&a(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},T=async()=>{y(!0);try{const W=await mt.post("/api/checkout/simulation",{items:[{id:o,quantity:s,seller:t}],country:"BRA",postalCode:P});e(Py(W.data))}catch(W){console.error("Erro ao atualizar o documento:",W)}finally{y(!1),h(P,"BRA")}},w=async()=>{if(!o){x(!0),setTimeout(()=>x(!1),1500);return}await R({target:{value:P}}),g||(T(),i(!0))};return r.jsxs("div",{ref:E,style:{position:"relative"},children:[!o&&S?r.jsx(wy,{component:c,isOpen:S,parent:E.current,toolTipZIndex:u,freightConfig:l}):r.jsx(r.Fragment,{}),r.jsx("div",{style:{position:"relative"},children:r.jsx(m.TextField.Structure,{title:"structure",style:{width:"100%"},input:r.jsx(m.TextField.Input,{defaultValue:(k=(z=f.shippingData)==null?void 0:z.address)==null?void 0:k.postalCode,label:l.messages.text_input_label,title:"textfield",value:d,sizeVariant:n,onMouseOver:()=>o?null:x(!0),onMouseOut:()=>o?null:x(!1),mode:"simple",onChange:C,onKeyDown:W=>{W.key==="Enter"&&w()},className:ge["input-modifier"],feedback:_?"error":"none"}),right:r.jsx(m.Button,{onClick:w,size:n,title:"button",children:g?r.jsx(m.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Ry=({children:e,freightConfig:t})=>r.jsxs("div",{className:ge.shippingFreight,children:[r.jsxs("div",{className:ge.shippingFreight__grid,children:[r.jsx("span",{className:ge.shippingFreight__grid__title,children:t.messages.title}),r.jsx("span",{className:ge.shippingFreight__grid__remember,children:r.jsx(rt,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),r.jsx("div",{className:ge.shippingFreight__postalCodeGrid,children:e})]}),Ay=({children:e})=>r.jsx("div",{className:ge.freightContainer,children:e}),nf=({className:e,sellerId:t,skuId:n,quantity:o,size:s,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=le(),[u,f]=v.useState(""),[h,d]=v.useState([]),[p,g]=v.useState(""),[y,_]=v.useState(!1),b=x=>f(x),S=x=>{d(x),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:x.map(j=>({shipping_tier:j.id,delivery_time:j.shippingEstimate.replace("bd",""),flag_pickup:j.name.toLowerCase().includes("retirada")?"true":"false",shipping:j.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(Ay,{className:e,children:[r.jsxs(Ry,{freightConfig:c.freightConfig,children:[r.jsx(Cy,{children:r.jsx(Ey,{onUpdateFreightItems:S,skuId:n,quantity:o,size:s,sellerId:t,local:i,setError:g,setIsButtonClicked:_,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),p?r.jsx(Wa,{size:s,message:p,setError:g}):h.length>0&&r.jsx(Wa,{size:s,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!p?h.length>0&&r.jsxs(by,{children:[r.jsx(jy,{children:h.filter(({id:x})=>!x.includes("Retirada")).map(x=>r.jsx(xy,{id:x.id,value:U.freightParsePrice({valueInCents:x.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:x.name,paragraph:`${c.freightConfig.messages.prefix_days}${Sy(x.shippingEstimate)}`,radioValue:u,changeValue:b},x.id))}),c.deliveryInfoBoxesAllowed?r.jsx(vy,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):r.jsx(r.Fragment,{})]}):null]})},gt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_e02qd_1","pdc-navigation--content":"_pdc-navigation--content_e02qd_28","pdc-navigation--filters":"_pdc-navigation--filters_e02qd_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_e02qd_67","pdc-navigation--selected":"_pdc-navigation--selected_e02qd_137","pdc-navigation--selected--container":"_pdc-navigation--selected--container_e02qd_150","pdc-navigation":"_pdc-navigation_e02qd_28"},Ny=({children:e,href:t,isLast:n,title:o,ICONS:s})=>r.jsx(m.BreadCrumb.Item,{adornment:{end:n&&r.jsx(m.Icon,{name:s.arrow_right})},children:n?r.jsx(rt,{href:t??"/",size:"medium",title:o,disableUnderline:!0,children:e}):e}),of=()=>{var a;const{state:e}=ze(),{ICONS:t}=Me(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",o=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),s=Ml(o);return r.jsx("div",{className:gt["pcd-navigation--breadcrumb"],children:r.jsx(m.BreadCrumb.DivWrapper,{children:r.jsx(m.BreadCrumb.List,{children:Array.isArray(s)&&s.map((i,c)=>{var l,u;return v.createElement(Ny,{...i,isLast:c!==s.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," "),ICONS:t},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};of.displayName="PLPNavigation.BreadCrumb";const sf=({children:e,...t})=>r.jsxs("div",{...t,className:gt["pdc-navigation--content"],children:[r.jsx(dt.Filters,{}),e]});sf.displayName="PLPNavigation.Content";const Iy="_sort_35wro_1",Fr={sort:Iy,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},Ty=({children:e,sortListOpen:t,btnAdornment:n,style:o,...s})=>r.jsx(m.Button,{...s,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...o,textDecoration:"none"},className:Fr["sort-button"],children:e}),Oy=e=>r.jsx(m.RadioButton.Radio,{...e}),ky=({children:e,className:t,name:n,...o})=>r.jsx(m.RadioButton.Group,{...o,name:n||"sort-group",className:m.helpers.classNameConcat(Fr["sort-list"],t),children:e}),Ly=({children:e,className:t,shadow:n=!0,padding:o="small",height:s="fit-content",...a})=>r.jsx(m.Card,{...a,shadow:n,className:m.helpers.classNameConcat(Fr["sort-list-wrapper"],t),padding:o,height:s,children:e}),af=v.forwardRef(({children:e,className:t,...n},o)=>r.jsx("div",{...n,ref:o,className:m.helpers.classNameConcat(Fr.sort,t),children:e}));af.displayName="SortRoot";const Br=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:s,...a})=>{var d;const i=(d=o==null?void 0:o.get("sort"))==null?void 0:d.replace(":","_"),[c,l]=v.useState(i),{sendDataLayerEvent:u}=le();v.useEffect(()=>{l(i||void 0)},[i]);const{ref:f}=fd(()=>n(!1)),h=p=>{const g=p.target.value;l(g),typeof e=="function"&&e(g),u({functionKey:"filterEvent",data:{customData:{ordering:Mt.options[g]}}}),n(!1)};return r.jsxs(af,{...a,ref:f,children:[r.jsx(Ty,{btnAdornment:{listOpen:r.jsx(m.Icon,{name:s.arrow_up,size:"small"}),listClosed:r.jsx(m.Icon,{name:s.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Mt.options[c]:Mt.placeholder},"sort-button"),t&&r.jsx(Ly,{children:r.jsx(ky,{name:"sort-group",value:c??"",onChange:h,children:Object.keys(Mt.options).map(p=>r.jsx(Oy,{label:Mt.options[p],value:p},p))})})]})};Br.displayName="Sort";const cf=v.createContext({}),My=({children:e,...t})=>{const[n,o]=v.useState(!1);return r.jsx(cf.Provider,{value:v.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:o}),[t,n,o]),children:e})},Dy=()=>{const e=v.useContext(cf);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},lf=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:o}=Dy(),{ICONS:s,PDC_NAVIGATION:a,searchParams:i}=Me();return r.jsxs("div",{className:gt["pdc-navigation--filters"],children:[r.jsx(dt.BreadCrumb,{}),r.jsxs("div",{className:gt["pdc-navigation--filters--content"],children:[r.jsx(Br,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:o,ICONS:s,searchParams:i}),r.jsx(m.Button,{adornment:{end:r.jsx(m.Icon,{name:s.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(dt.Total,{})]})]})};lf.displayName="PLPNavigation.Filters";const uf=({children:e,onSort:t,setOpenFilters:n,style:o,...s})=>{const a=v.useRef(null);return r.jsx(My,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...s,className:gt["pdc-navigation"],ref:a,style:{...o},children:r.jsx(dt.Content,{children:e})})})};uf.displayName="Root";const df=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:gt["pdc-navigation--selected"],children:r.jsx("div",{className:gt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(o=>o.key==="productclusterids"?null:r.jsx(dt.SelectedItem,{callback:e,facet:o},o.value)):null})});df.displayName="PLPNavigation.Selected";const zs=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,Fs=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(o=>o.value===e))==null?void 0:n.color)??"#F2F2F2"},ff=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(o=>o.key===e))==null?void 0:n.label},pf=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(o=>o.key===e))==null?void 0:n.order)??0},Qo=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],o=U.formatPriceToCurrency(Number(n));return`${U.formatPriceToCurrency(Number(t))} até ${o}`},mf=({items:e})=>{const t=e.flatMap(s=>[s.range.from,s.range.to]),n=Math.min(...t.map(Math.abs)),o=Math.max(...t.map(Math.abs));return[n,o]},hf=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:zs,createTagPrice:Qo,getAbsoluteMinMax:mf,getColor:Fs,getName:ff,getOrder:pf},Symbol.toStringTag,{value:"Module"})),We={"filter--empty":"_filter--empty_1mjas_1","filter--item":"_filter--item_1mjas_14","filter--item--price":"_filter--item--price_1mjas_19","filter--item--toggle":"_filter--item--toggle_1mjas_19","filter--item--toggle--container":"_filter--item--toggle--container_1mjas_30","filter--modal--body":"_filter--modal--body_1mjas_79","filter--modal--body--content":"_filter--modal--body--content_1mjas_87","filter--modal--footer":"_filter--modal--footer_1mjas_96","filter--modal":"_filter--modal_1mjas_79","filter--loading":"_filter--loading_1mjas_176","filter--selected":"_filter--selected_1mjas_206","filter--selected--content":"_filter--selected--content_1mjas_210"},gf=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:o,onToggleFacet:s}=kt();return r.jsxs("div",{...n,className:We["filter--modal--body--content"],children:[Array.isArray(o.facets)&&o.facets.map(i=>r.jsx(nt.Item,{columns:e,facet:i,onToggleFacet:s,CONSTANTS:t},i.key)),!((a=o.facets)!=null&&a.length)&&r.jsx(nt.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};gf.displayName="Filter.Item.Content";const yf=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return r.jsxs("div",{className:We["filter--empty"],children:[r.jsxs(m.TextStructure.DivWrapper,{children:[r.jsx("h4",{children:e.title}),r.jsx("p",{children:e.subtitle})]}),r.jsx(m.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};yf.displayName="Filter.Empty";const _f=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:o,...s})=>{const a=pf({key:t.key,PLP_FILTERS:o.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(nt.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:o.PLP_FILTERS,PLP_FILTERS_COLORS:o.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(nt.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(nt.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:o.ICONS})}return t.__typename==="FacetRange"?r.jsx(nt.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...s,className:We["filter--item"],style:{order:a},children:r.jsxs(m.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(m.Accordion.Header,{id:t.key,closeIndicator:r.jsx(m.Icon,{name:o.ICONS.arrow_up}),openIndicator:r.jsx(m.Icon,{name:o.ICONS.arrow_down}),children:r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("h4",{className:"typography-style-body-sm",children:ff({key:t.key,PLP_FILTERS:o.PLP_FILTERS})})})})}),r.jsx(m.Accordion.Body,{children:i()})]})})};_f.displayName="Filter.Item";const vf=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:o,...s})=>r.jsx(Ye.Root,{...s,children:r.jsx(Ye.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(Ye.Option,{active:i,"data-color":zs({key:a,PLP_FILTERS:n}),fill:Fs({value:c,PLP_FILTERS_COLORS:o}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});vf.displayName="Filter.Item.Color";const xf=({facet:e,...t})=>{var u,f;const{filters:{selected:n},price:o,onToggleFacet:s}=kt(),[a,i]=(o==null?void 0:o.split(":").map(Number))??[0,100],[c,l]=((f=(u=n==null?void 0:n.find(({key:h})=>h==="price"))==null?void 0:u.value)==null?void 0:f.split(":").map(Number))??[a,i];return r.jsx("div",{...t,className:We["filter--item--price"],children:r.jsxs(m.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:h=>{var d,p;h&&s({key:"price",value:`${(d=h.range)==null?void 0:d.min}:${(p=h.range)==null?void 0:p.max}`})},children:[r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("p",{"data-min-value":!0})})}),r.jsx(m.TextStructure.Root,{children:r.jsx(m.TextStructure.DivWrapper,{children:r.jsx("p",{"data-max-value":!0})})})]})})};xf.displayName="Filter.Item.Price";const bf=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...o})=>{const s=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(Ye.Root,{...o,children:r.jsx(Ye.List,{children:Array.isArray(s)&&s.map(({key:a,selected:i,value:c})=>r.jsx(Ye.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};bf.displayName="Filter.Item.Sizes";const jf=({columns:e,facetKey:t,onToggleFacet:n,values:o,ICONS:s,...a})=>r.jsx("div",{...a,className:We["filter--item--toggle"],children:r.jsx("div",{className:We["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(o)&&o.map(i=>r.jsx(m.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(m.Icon,{name:s.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});jf.displayName="Filter.Item.Toggle";const Cf=({...e})=>{const{isLoading:t}=kt();return r.jsx("div",{className:We["filter--loading"],"data-active":t,...e,children:r.jsx(m.Spinner,{indicatorColor:"#000",background:"#222"})})};Cf.displayName="Filter.Loading";const Sf=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:o,ICONS:s}})=>{var f;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=kt();return r.jsxs(m.Modal.Root,{className:m.helpers.classNameConcat(We["filter--modal"],t),isMobile:n??!1,isOpen:c,parent:l,setIsOpen:u,variant:n?"sideBottom":"sideRight",style:{zIndex:99},children:[r.jsxs(m.Modal.Header,{navigation:"top",children:[r.jsx(m.Modal.Controls,{navigation:"top",isMobile:n,children:r.jsx(m.Button,{"data-close":!0,iconNameStart:s.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(m.Modal.Title,{navigation:"top",title:o})]}),r.jsxs(m.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:We["filter--modal--body"],children:e}),r.jsx(nt.Loading,{})]}),r.jsx(m.Modal.Footer,{children:r.jsxs("div",{className:We["filter--modal--footer"],children:[r.jsx(m.Button,{"data-close":!0,size:"large",variant:"primary",children:(f=i.facets)!=null&&f.length?"ver resultados":"fechar"}),r.jsx(m.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Sf.displayName="Filter.Modal";const Pf=({children:e,className:t,isMobile:n,CONSTANTS:o,...s})=>r.jsx(Jl,{...s,PLP_FILTERS:o.PLP_FILTERS,children:r.jsx(nt.Modal,{className:t,isMobile:n,CONSTANTS:o,children:e})});Pf.displayName="Filter.Root";const wf=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:o,onToggleFacet:s}=kt();return r.jsx("div",{className:We["filter--selected"],children:r.jsx("div",{className:We["filter--selected--content"],children:Array.isArray(o.selected)&&o.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(m.Tag,{title:a==="price"?Qo({value:i}):i,adornment:{end:r.jsx(m.Icon,{name:e.close,size:"x-small"})},colorSquare:Fs({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>s({key:a,value:i}),squareShow:zs({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?Qo({value:i}):i},i))})})};wf.displayName="Filter.Selected";const nt={Colors:vf,Content:gf,Empty:yf,Modal:Sf,Item:_f,Root:Pf,Loading:Cf,Selected:wf,Price:xf,Sizes:bf,Toggle:jf},{checkedColor:$y,createTagPrice:Ga,getColor:zy}=hf,Ef=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:o,PLP_FILTERS:s}=Me();return r.jsx(m.Tag,{title:(t==null?void 0:t.key)==="price"?Ga({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(m.Icon,{name:n.close,size:"x-small"})},colorSquare:zy({value:t.value,PLP_FILTERS_COLORS:o}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:$y({key:t.key,PLP_FILTERS:s}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Ga({value:t.value}):t.value.toUpperCase()})};Ef.displayName="PLPNavigation.Selected.Item";const Rf=()=>r.jsx(m.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Rf.displayName="PLPNavigation.Total";const dt={BreadCrumb:of,Content:sf,Filters:lf,Root:uf,Selected:df,SelectedItem:Ef,Total:Rf},Fy="_footer__bottom_1o9af_2",By="_footer__wrapper_1o9af_10",qy="_footer__main_1o9af_39",Hy="_footer__legalInformation_1o9af_55",Uy="_footer__column_1o9af_77",Wy="_footer__columnContent_1o9af_87",Gy="_footer__item_1o9af_91",Vy="_footer__itemLink_1o9af_107",Ky="_footer__columnTitle_1o9af_122",Xy="_footer__columnTitleIcon_1o9af_134",Yy="_footer__iconList_1o9af_147",Qy="_footer__itemSmallText_1o9af_157",Zy="_payment_1o9af_168",Jy="_footer__iconContainer_1o9af_173",e_="_footer__iconListSubHeader_1o9af_178",t_="_accordionWrapper_1o9af_200",r_="_accordionHeader_1o9af_204",n_="_accordionTextWrapper_1o9af_208",ye={footer__bottom:Fy,footer__wrapper:By,footer__main:qy,footer__legalInformation:Hy,footer__column:Uy,footer__columnContent:Wy,footer__item:Gy,footer__itemLink:Vy,footer__columnTitle:Ky,footer__columnTitleIcon:Xy,footer__iconList:Yy,footer__itemSmallText:Qy,payment:Zy,footer__iconContainer:Jy,footer__iconListSubHeader:e_,accordionWrapper:t_,accordionHeader:r_,accordionTextWrapper:n_,"footer--stamps":"_footer--stamps_1o9af_247","footer--stamps--company":"_footer--stamps--company_1o9af_254","support-container":"_support-container_1o9af_258","support-section":"_support-section_1o9af_277","support-text":"_support-text_1o9af_319","support-items":"_support-items_1o9af_329","support-item":"_support-item_1o9af_329"};var Af={},Bs={},Qt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=n=>{};if(process.env.NODE_ENV!=="production"){const n=new Set;t=o=>{n.has(o)||console.warn(o),n.add(o)}}})(Qt);var Nf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:o,heightInt:s,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,f=a?a*40:o,h=i?i*40:s,d=f&&h?"viewBox='0 0 "+f+" "+h+"'":"",p=d?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+d+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='"+u+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+p+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Nf);var qr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return o}});const n=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}})(qr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return p}});const t=Qt,n=Nf,o=qr,s=["lazy","eager",void 0];function a(g){return g.default!==void 0}function i(g){return g.src!==void 0}function c(g){return typeof g=="object"&&(a(g)||i(g))}const l=new Map;let u;function f(g){return typeof g>"u"?g:typeof g=="number"?Number.isFinite(g)?g:NaN:typeof g=="string"&&/^[0-9]+$/.test(g)?parseInt(g,10):NaN}function h(g,y,_){let{deviceSizes:b,allSizes:S}=g;if(_){const j=/(^|\s)(1?\d?\d)vw/g,P=[];for(let E;E=j.exec(_);E)P.push(parseInt(E[2]));if(P.length){const E=Math.min(...P)*.01;return{widths:S.filter(C=>C>=b[0]*E),kind:"w"}}return{widths:S,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(j=>S.find(P=>P>=j)||S[S.length-1]))],kind:"x"}}function d(g){let{config:y,src:_,unoptimized:b,width:S,quality:x,sizes:j,loader:P}=g;if(b)return{src:_,srcSet:void 0,sizes:void 0};const{widths:E,kind:C}=h(y,S,j),R=E.length-1;return{sizes:!j&&C==="w"?"100vw":j,srcSet:E.map((T,w)=>P({config:y,src:_,quality:x,width:T})+" "+(C==="w"?T:w+1)+C).join(", "),src:P({config:y,src:_,quality:x,width:E[R]})}}function p(g,y){let{src:_,sizes:b,unoptimized:S=!1,priority:x=!1,loading:j,className:P,quality:E,width:C,height:R,fill:T=!1,style:w,onLoad:N,onLoadingComplete:I,placeholder:z="empty",blurDataURL:k,fetchPriority:W,layout:q,objectFit:F,objectPosition:G,lazyBoundary:V,lazyRoot:B,...J}=g;const{imgConf:A,showAltText:O,blurComplete:D,defaultLoader:X}=y;let ne,ee=A||o.imageConfigDefault;if("allSizes"in ee)ne=ee;else{const K=[...ee.deviceSizes,...ee.imageSizes].sort((Re,Q)=>Re-Q),me=ee.deviceSizes.sort((Re,Q)=>Re-Q);ne={...ee,allSizes:K,deviceSizes:me}}let M=J.loader||X;delete J.loader,delete J.srcSet;const te="__next_img_default"in M;if(te){if(ne.loader==="custom")throw new Error('Image with src "'+_+`" is missing "loader" prop.
|
|
5
5
|
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const K=M;M=me=>{const{config:Re,...Q}=me;return K(Q)}}if(q){q==="fill"&&(T=!0);const K={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},me={responsive:"100vw",fill:"100vw"},Re=K[q];Re&&(w={...w,...Re});const Q=me[q];Q&&!b&&(b=Q)}let Z="",re=f(C),$=f(R),L,oe;if(c(_)){const K=a(_)?_.default:_;if(!K.src)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(K));if(!K.height||!K.width)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(K));if(L=K.blurWidth,oe=K.blurHeight,k=k||K.blurDataURL,Z=K.src,!T){if(!re&&!$)re=K.width,$=K.height;else if(re&&!$){const me=re/K.width;$=Math.round(K.height*me)}else if(!re&&$){const me=$/K.height;re=Math.round(K.width*me)}}}_=typeof _=="string"?_:Z;let ie=!x&&(j==="lazy"||typeof j>"u");(!_||_.startsWith("data:")||_.startsWith("blob:"))&&(S=!0,ie=!1),ne.unoptimized&&(S=!0),te&&_.endsWith(".svg")&&!ne.dangerouslyAllowSVG&&(S=!0),x&&(W="high");const fe=f(E);if(process.env.NODE_ENV!=="production"){if(ne.output==="export"&&te&&!S)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!_)S=!0;else if(T){if(C)throw new Error('Image with src "'+_+'" has both "width" and "fill" properties. Only one should be used.');if(R)throw new Error('Image with src "'+_+'" has both "height" and "fill" properties. Only one should be used.');if(w!=null&&w.position&&w.position!=="absolute")throw new Error('Image with src "'+_+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(w!=null&&w.width&&w.width!=="100%")throw new Error('Image with src "'+_+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(w!=null&&w.height&&w.height!=="100%")throw new Error('Image with src "'+_+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof re>"u")throw new Error('Image with src "'+_+'" is missing required "width" property.');if(isNaN(re))throw new Error('Image with src "'+_+'" has invalid "width" property. Expected a numeric value in pixels but received "'+C+'".');if(typeof $>"u")throw new Error('Image with src "'+_+'" is missing required "height" property.');if(isNaN($))throw new Error('Image with src "'+_+'" has invalid "height" property. Expected a numeric value in pixels but received "'+R+'".')}if(!s.includes(j))throw new Error('Image with src "'+_+'" has invalid "loading" property. Provided "'+j+'" should be one of '+s.map(String).join(",")+".");if(x&&j==="lazy")throw new Error('Image with src "'+_+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(z!=="empty"&&z!=="blur"&&!z.startsWith("data:image/"))throw new Error('Image with src "'+_+'" has invalid "placeholder" property "'+z+'".');if(z!=="empty"&&re&&$&&re*$<1600&&(0,t.warnOnce)('Image with src "'+_+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),z==="blur"&&!k){const K=["jpeg","png","webp","avif"];throw new Error('Image with src "'+_+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
6
6
|
Possible solutions:
|
|
7
7
|
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
package/index.mjs
CHANGED
|
@@ -8149,7 +8149,7 @@ const xt = {
|
|
|
8149
8149
|
var d, p, h;
|
|
8150
8150
|
const { isMobile: a } = ye(), { CONSTANTS: s } = Fe(), c = ir(), l = () => {
|
|
8151
8151
|
window.location.href = `${i.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(
|
|
8152
|
-
`${
|
|
8152
|
+
`${window.location.href}`
|
|
8153
8153
|
)}`;
|
|
8154
8154
|
}, u = !!((d = c.user) != null && d.userId), { cashback: f, credits: m } = Ce(
|
|
8155
8155
|
() => {
|