@soma-vertical-web/multi-lib 0.0.55 → 0.0.56
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 +95 -93
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Ju=Object.defineProperty;var ed=(e,t,r)=>t in e?Ju(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fr=(e,t,r)=>ed(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),x=require("react"),ae=require("./index-BYY2x6mQ.js"),rt=require("idb-keyval"),Ze=require("zustand"),Jn=require("js-cookie"),_=require("@soma-vertical-web/core-components"),_t=require("axios"),td=require("jose"),st=require("@soma-vertical-web/foundations"),ua=require("react-dom"),$e=require("draft-js"),Yo=require("@date-fns/tz"),vo=x.createContext({}),rd=({data:e,children:t})=>o.jsx(vo.Provider,{value:{tags:e==null?void 0:e.config},children:t}),bo=()=>{const{tags:e}=x.useContext(vo),t=x.useCallback(r=>{var a,c,l,u;const n=(c=(a=e==null?void 0:e.commercial)==null?void 0:a.items)==null?void 0:c.find(p=>{var h;return(h=r??[])==null?void 0:h.find(d=>d.id===p.key)}),s=(u=(l=e==null?void 0:e.institucional)==null?void 0:l.items)==null?void 0:u.find(p=>{var h;return(h=r??[])==null?void 0:h.find(d=>d.id===p.key)}),i=e==null?void 0:e.flagPdp;return{commercial:n,institucional:s,flagPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},da=({gridScrollBack:e})=>{x.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},fa=x.createContext({}),nd=({children:e,gridScrollBack:t})=>{const r=x.useRef(null);return da({gridScrollBack:t}),o.jsx(fa.Provider,{value:{sizesContainerRef:r},children:e})},od=()=>{const e=x.useContext(fa);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},Ue=({event:e,data:t})=>{const r=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&r.push({ecommerce:null}),r.push({...e&&{event:`custom_${e}`},...t})},be={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:r,commonData:n,customData:s,promotionInfo:i,itemList:a,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:p}=n,h={...r==="view_item"?{currency:be.configs.currency,value:p,grade_disponivel:l??(u?pa(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:p,currency:be.configs.currency}:{}},d=Ot({data:n,customData:{...s,...a,...i},configs:be.configs});Ue({event:r,data:{...c,ecommerce:{...a,...h,items:[d]}}}),typeof t=="function"&&t(d,h)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:n,outsideEcommerceData:s,customData:i}=e;if(t.length===0)return;const a=t.map(({node:c},l)=>Ot({data:{...c},customData:{...r,index:l,...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n},configs:be.configs}));Ue({event:"view_item_list",data:{...s,ecommerce:{...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n,items:a}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:n,supportData:{selectedSkus:s,price:i},promotionInfo:a,itemList:c,outsideEcommerceData:l}=e;let u=0;const p=r.map(h=>{var y,g,b,j,v,S,E,R,C;const d=s==null?void 0:s.find(A=>(h.productId??h.id)===A.productId);let f={...a,...c};if(d){const A=ha(),k=ga(A,d);k&&(f={...f,...k}),t==="add_to_cart"&&(a||c)&&eo({persistedData:A,type:"add",sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku),newData:{promotionInfo:a,itemList:c}}),t==="remove_from_cart"&&eo({persistedData:A,type:"remove",sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku)})}u+=h.price??((b=(g=(y=d==null?void 0:d.offers)==null?void 0:y.offers)==null?void 0:g[0])==null?void 0:b.price)??0;const m=(d==null?void 0:d.size)??ae.getColorAndSizeFromSkuName((d==null?void 0:d.skuName)??(d==null?void 0:d.name)??((j=h.itemOffered)==null?void 0:j.skuName),be.configs.NAME_SPLIT_SYMBOL).size;return Ot({data:h,customData:{...n,...f??{...a,...c},item_sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku)??((v=h.itemOffered)==null?void 0:v.sku),quantity:(n==null?void 0:n.quantity)??h.quantity??1,item_variant2:m,seller_id:(d==null?void 0:d.sellerId)??(d==null?void 0:d.seller)??((C=(R=(E=(S=d==null?void 0:d.offers)==null?void 0:S.offers)==null?void 0:E[0])==null?void 0:R.seller)==null?void 0:C.identifier)??h.seller},configs:be.configs})});Ue({event:t,data:{...l,ecommerce:{value:i??u,currency:be.configs.currency,items:p}}})},filterEvent:e=>{var a;const{commonData:t,customData:r,outsideEcommerceData:n}=e,s={},i={};Array.isArray(t==null?void 0:t.selectedFacets)&&((a=t==null?void 0:t.selectedFacets)!=null&&a.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var h;const u=((h=be.configs.PLP_FILTERS.find(d=>d.key===c))==null?void 0:h.eventLabel)??c,p=(s==null?void 0:s[u])||[];u==="price_range"&&l.replace(":","-"),s[u]=[...p,l]}),Object.keys(s).forEach(c=>i[c]=s[c].join(", "))),Ue({event:"filter",data:{...n,...i,...r}})},viewCartEvent:e=>{var p,h,d,f,m,y,g,b,j,v;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:n}=t;if(!n)return;const s=window.localStorage.getItem("persistedCartEventsData"),i=s?JSON.parse(s):{},a=n.items.map(S=>{const{promotionInfo:E,itemList:R}=i[S.id]??{};return Ot({data:{...S,price:S.price/100,listPrice:S.listPrice/100},customData:{...E,...R,item_sku:S.id??S.itemOffered.sku,quantity:S.quantity??1},configs:be.configs})}),c=(((p=n.totalizers.find(S=>S.name==="Total dos Itens"))==null?void 0:p.value)??0)/100,l=(((h=n.totalizers.find(S=>S.name==="Total dos Descontos"))==null?void 0:h.value)??0)/100,u=((d=n.marketingData)==null?void 0:d.utmiCampaign)===be.configs.VENDOR_CODE?(f=n.marketingData)==null?void 0:f.utmCampaign:(y=String((m=n.openTextField)==null?void 0:m.value))==null?void 0:y.split(" - ")[0];Ue({event:"view_cart",data:{...r,ecommerce:{currency:be.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(g=n.shippingData)==null?void 0:g.address)!=null&&b.postalCode),...u?{seller_coupon_name:u}:{},...((j=n.marketingData)==null?void 0:j.coupon)&&{sale_coupon_name:(v=n.marketingData)==null?void 0:v.coupon},subtotal:c,items:a}}})},readyEvents:e=>{const{event:t,readyData:r}=e;Ue({event:t,data:{...r}})}},pa=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),sd=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(be.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},Ot=({data:e,customData:t,configs:r})=>({...id(e,r==null?void 0:r.MAIN_IMAGE),...ad(e),...cd(e),...ld(e),...t}),ma=()=>{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("_"))??[]:[]},ha=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},ga=(e,t)=>e==null?void 0:e[t],eo=({persistedData:e,type:t,sku:r,newData:n})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:n}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:n}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},id=(e,t="1")=>{var i,a,c,l,u,p,h,d,f,m,y;const r=e.productReference??e.gtin??e.productRefId,n=e.image??((a=(i=e.items)==null?void 0:i[0])==null?void 0:a.images)??((c=e.itemOffered)==null?void 0:c.image),s=n==null?void 0:n.find(g=>g.alternateName===t||g.imageLabel===t||g.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((h=(p=e.itemOffered)==null?void 0:p.isVariationOf)==null?void 0:h.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??ae.splitNameAndSizeFromFullName((d=e.itemOffered)==null?void 0:d.name,be.configs.NAME_SPLIT_SYMBOL).name,item_brand:((f=e.brand)==null?void 0:f.brandName)??((m=e.brand)==null?void 0:m.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${be.configs.storeUrl}${e.linkText}/p`,item_image:(s==null?void 0:s.url)??(s==null?void 0:s.imageUrl)}},Qo=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,ad=e=>{var u,p;const{categories:t,categoriesIds:r}=e,n=t??((u=e.itemOffered)==null?void 0:u.categories),s=r??((p=e.itemOffered)==null?void 0:p.categoriesIds),i=Qo(n),a=Qo(s),c=i.slice(1,-1).split("/"),l=a.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(be.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]}}},cd=e=>{var s,i,a,c,l,u;const t=((s=e.itemOffered)==null?void 0:s.skuName)??((c=(a=(i=e.isVariantOf)==null?void 0:i.hasVariant)==null?void 0:a[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:r,size:n}=ae.getColorAndSizeFromSkuName(t,be.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:n}}},ld=e=>{var l,u;const{price:t,listPrice:r,installments:n}=e,s=t??((l=e.offers)==null?void 0:l.lowPrice)??0,i=r??((u=e.offers)==null?void 0:u.highPrice)??0,a=i?i-s:0,c=a%1===0?a:Number(a.toFixed(2));return{...t&&{price:s??i},...i&&{list_price:i,discount:c},...n&&{installments:n==null?void 0:n.count,installment_value:n==null?void 0:n.value},item_currency:be.configs.currency}},ya=()=>{const[e,t]=ma(),[r,n]=e.split("-"),s=r.includes("shop")||r.includes("sale")?r:"";return{page_category:s&&n?n:"",page_departament:s,id:t,name:e}},ud=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:be,findDataInPersistedData:ga,getAvailablesSizes:pa,getCategories:sd,getPageCategoryAndDepartmentFromSlug:ya,getPersistedData:ha,getProductListInfoFromHead:ma,pushDatalayer:Ue,updatePersistedData:eo},Symbol.toStringTag,{value:"Module"})),_a=x.createContext({}),dd=({children:e,evtFunctionsConfigs:t})=>{const r=x.useRef({}),n=x.useRef(null),s=x.useRef(null),i=x.useRef({}),a=x.useRef({trigger:!1,index:0}),c=({functionKey:p,data:h,callBack:d,timeout:f=100})=>{window.dataLayer||(window.dataLayer=[]),be.configs=t;try{typeof be[p]=="function"&&setTimeout(()=>{var m;h.promotionInfo=r.current,(m=s.current)!=null&&m.item_list_name&&(h.itemList=s.current),be[p](h,d)},f)}catch(m){Ue({event:"error_event",data:{error_message:(m==null?void 0:m.message)??m}})}},l=({content:p})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:p.replace("::",":")}}})},u=({updatePromotionRef:p,promotion:h,index:d})=>{p&&(r.current={...h}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...h,...d!==void 0&&{index:d}}}}})};return o.jsx(_a.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:a,promotionEventRef:r,currentLocalRef:n,itemListRef:s,cartProductsFullDataRef:i,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ge=()=>x.useContext(_a),va=x.createContext({}),fd=({children:e,productData:t,isKit:r,PDP_INFO:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:i})=>{var O,H;const{sendDataLayerEvent:a,triggerSelectItemEventRef:c}=ge(),{productId:l,productName:u,items:p,items:[{images:h,Videos:d}],description:f,["Composição"]:m="",productReference:y,categories:[g]}=t,{getAvailableProductTag:b}=bo(),j=b(Object.entries(t.clusterHighlights).map(U=>({id:U[0],name:U[1]}))),v=g.slice(1,-1).split("/"),{installments:S,price:E,listPrice:R,sizes:C,allSizesAvailable:A}=ae.getSkuInfos({items:p,NAME_SPLIT_SYMBOL:s}),k=ae.getThumbImage({images:h,TEXTURE_IMAGE:i}),w=[{label:`${n.product.description}`,value:"description",content:f},{label:`${n.product.materiais}`,value:"composition",content:m}],N=((H=ae.getColorAndSizeFromSkuName((O=t.items)==null?void 0:O[0].name,s))==null?void 0:H.color)??t["Cores Filtráveis"][0]??"",I=()=>({commonData:{...t,sizes:C,price:E,listPrice:R,installments:S},customData:{installments:S==null?void 0:S.count,installment_value:Number(S==null?void 0:S.value).toFixed(2)}}),B=({sku:U,size:z})=>{const{commonData:V,customData:W}=I();a({functionKey:"productEvents",data:{event:"view_item",commonData:V,customData:{...W,...U&&{item_sku:U},...z&&{item_variant2:z}}}})};return x.useEffect(()=>{if(c.current.trigger){const{commonData:U,customData:z}=I();a({functionKey:"productEvents",data:{event:"select_item",commonData:U,customData:{...z,index:c.current.index}}}),c.current.trigger=!1}B({})},[]),o.jsx(va.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:j,items:p,sizes:C,allSizesAvailable:A,installments:S,price:E,listPrice:R,thumbImage:k,images:h,video:d[0],descriptionContent:w,breadcrumbList:v,isKit:r,colorName:N,handleViewItemEvent:B},children:e})},xo=()=>{const e=x.useContext(va);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},pd=()=>{const[e,t]=x.useState(null);return[e,async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),t(n),!0}catch(s){return console.warn("Copy failed",s),t(null),!1}}]},md=()=>{x.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)}},[])},hd=typeof window>"u",gd=(e,t)=>{const[r,n]=x.useState(()=>{if(hd)return null;const i=localStorage.getItem(e);return i===null?t:JSON.parse(i||"{}")});return x.useEffect(()=>{const i=a=>{a.storageArea===localStorage&&a.key===e&&n(JSON.parse(a.newValue))};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[e,t]),[r,i=>{n(a=>{const c=typeof i=="function"?i(a):i;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function ba(e,t,r){const[n,s]=x.useState(!1),{threshold:i}=r||{};return x.useEffect(()=>{if(!e.current)return()=>null;let a=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){a&&clearTimeout(a),a=setTimeout(()=>{s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.delay);return}s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:i||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),n}const yd=({callback:e,onEnterViewportOnce:t,options:r})=>{const n=x.useRef(null);return x.useEffect(()=>{const s=n.current;if(!s)return;const i=new IntersectionObserver(([a])=>{a.isIntersecting&&typeof e=="function"&&(e(),t&&(i.unobserve(s),i.disconnect()))},r);return i.observe(s),()=>{t&&i.unobserve(s),i.disconnect()}},[e,t,r]),{element:n}},_d=({defaultScale:e=1,maxScale:t=3})=>{const r=x.useRef(null),n=x.useRef(null),[s,i]=x.useState(e),a=x.useRef(0),c=x.useRef({x:0,y:0}),l=x.useRef({x:0,y:0}),u=()=>{if(!n.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const f=r.current.getBoundingClientRect(),m=n.current.children[0].getBoundingClientRect(),y=m.width,g=m.height,b=Math.min(0,(f.width-y)/2),j=Math.max(0,(y-f.width)/2),v=Math.min(0,(f.height-g)/2),S=Math.max(0,(g-f.height)/2);return{minX:b,maxX:j,minY:v,maxY:S}},p=(f,m,y)=>{if(n.current){const g=n.current.children[0];g&&requestAnimationFrame(()=>{g.style.transform=`translate(calc(-50% + ${f}px), calc(-50% + ${m}px)) scale(${y})`})}},h=x.useCallback(f=>{const{minX:m,maxX:y,minY:g,maxY:b}=u(),{x:j,y:v}=l.current,S=Math.max(m,Math.min(y,j)),E=Math.max(g,Math.min(b,v));if(f.touches.length>1){const R=f.touches[0],C=f.touches[1],A=R.pageX-C.pageX,k=R.pageY-C.pageY;a.current=Math.sqrt(A*A+k*k),c.current={x:(R.pageX+C.pageX)/2,y:(R.pageY+C.pageY)/2}}else f.touches.length===1&&(c.current={x:f.touches[0].pageX-S,y:f.touches[0].pageY-E})},[s,l]),d=x.useCallback(f=>{if(!n.current||!r.current)return;const{minX:m,maxX:y,minY:g,maxY:b}=u();if(f.touches.length>1){f.preventDefault();const j=f.touches[0],v=f.touches[1],S=j.pageX-v.pageX,E=j.pageY-v.pageY,R=Math.sqrt(S*S+E*E);if(!a.current){a.current=R;return}const C=R/a.current,A=Math.max(1,Math.min(t,s*C));if(s===A)return;i(A);const k=(j.pageX+v.pageX)/2,w=(j.pageY+v.pageY)/2;let N=k-c.current.x,I=w-c.current.y;N=Math.max(m,Math.min(y,N)),I=Math.max(g,Math.min(b,I)),l.current={x:N,y:I},a.current=R,p(N,I,A)}else if(f.touches.length===1){const j=f.touches[0].pageX,v=f.touches[0].pageY;let S=j-c.current.x,E=v-c.current.y;S=Math.max(m,Math.min(y,S)),E=Math.max(g,Math.min(b,E)),l.current={x:S,y:E},p(S,E,s)}},[t,s]);return x.useEffect(()=>(document.addEventListener("touchstart",h),document.addEventListener("touchmove",d,{passive:!1}),()=>{document.removeEventListener("touchstart",h),document.removeEventListener("touchmove",d)}),[d,h]),{containerRef:r,imgRef:n,scale:s}},vd={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},ke=Promise.resolve(!1),to={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>ke,addItem:()=>ke,addSellerCode:()=>ke,addMarketingData:()=>ke,emptyCart:()=>{},removeItem:()=>ke,setIsOpen:()=>{},shipping:()=>ke,shippingUpdate:()=>ke,toggleServiceToProduct:()=>ke,updateItemQuantity:()=>ke,insertProfileEmail:()=>ke,setRecentlyAddedProducts:()=>{}},Co=e=>e===0,xa=(e,t)=>{if(!e||e.length===0)return[];let r="";const n=[],s=e.match(/\d+/g)??[];for(const i of s){const a=t[Number(i)];a&&(r+=(r?"/":"")+a,n.push(r))}return n},Ca=(e,t)=>{const{availability:r,additionalInfo:{brandName:n},bundleItems:s,id:i,uniqueId:a,detailUrl:c,ean:l,imageUrl:u,name:p,listPrice:h,quantity:d,price:f,priceDefinition:m,productCategories:y,productCategoryIds:g,productId:b,refId:j,seller:v,referenceId:S,offerings:E,productRefId:R,skuName:C,sellingPrice:A}=e;return{availability:r,bundleItems:s,referenceId:S,productRefId:R,id:i,ean:l,uniqueId:a,itemOffered:{additionalProperty:[],brand:{name:n},categories:xa(g,y),categoriesIds:g,gtin:j,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:p,isVariationOf:{name:p,productGroupID:b},sku:i,slug:c,skuName:C},listPrice:h,quantity:d,offerings:E,price:f,priceDefinition:m,sellingPrice:A,seller:v}},Sa=(e,t)=>{const r=e.map(n=>({id:n.id,quantity:n.quantity,seller:n.seller}));return Array.isArray(t)?[...r,...t]:[...r,t]},ja=(e,t)=>{const r=e.find(n=>n.id===t);if(r){const n=e.map((s,i)=>{var a,c;return{id:((a=s.itemOffered)==null?void 0:a.sku)??"",index:i,quantity:(r==null?void 0:r.id)===((c=s.itemOffered)==null?void 0:c.sku)?0:s.quantity,seller:s.seller??""}});return{updateItems:n,filterItems:n.filter(s=>s.id!==t)}}return{updateItems:[],filterItems:[]}},Ea=(e,t,r)=>e.filter(n=>n.availability!=="withoutStock"&&n.availability!=="https://schema.org/OutOfStock").map((n,s)=>{var i,a;return n.id===t?{id:n.id,index:s,quantity:r,seller:n.seller,sku:((i=n.itemOffered)==null?void 0:i.sku)??""}:{id:n.id,index:s,quantity:n.quantity,seller:n.seller,sku:((a=n.itemOffered)==null?void 0:a.sku)??""}}),ro=(e,t)=>e.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===t),bd=(e,t)=>{var r;return Array.isArray(e)?(((r=e==null?void 0:e.find(n=>{var s;return((s=n==null?void 0:n.id)==null?void 0:s.toLowerCase())===t}))==null?void 0:r.value)??0)/100:0},xd=e=>{const t=e.reduce((s,i)=>{const a=Co(i.price)?0:i.quantity;return s+a},0),r=e.reduce((s,i)=>s+i.price*i.quantity,0),n=e.reduce((s,i)=>s+i.listPrice*i.quantity,0);return{totalItems:t,total:r,subTotal:n}},Cd=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,r)=>t+(Co(r==null?void 0:r.price)?0:r.quantity),0):0,wa=(e,t)=>{const{items:r,itemMetadata:n,marketingData:s,messages:i,orderFormId:a,openTextField:c,paymentData:l,shippingData:u,totalizers:p}=e;return{id:a,itemMetadata:n,items:Array.isArray(r)?r.map(h=>Ca(h,t)):[],marketingData:s,messages:i,openTextField:c,paymentData:l,shippingData:u,totalizers:p}},Ra=(e,t)=>{const r=e.find(n=>n.id===t);return r?r.availability==="unavailableItemFulfillment":!1},Sd=(e,t)=>{const r=e.sku,n=e.isVariantOf.hasVariant.find(s=>s.sku===r);return n?n.name.split(t)[1]:"--"},ot=(e,t,r=!1)=>!e&&t!==""?{code:300,value:t,statusOk:r}:e===t?{code:200,value:t,statusOk:r}:{code:400,value:t,statusOk:r},jd=(e,t)=>{const r=new Set;return[e,...t].filter(n=>!r.has(n)&&r.add(n),r)},Aa=(e,t)=>t&&Array.isArray(t)&&t.find(n=>n.id===e)?Promise.resolve(e):Promise.resolve(!1),Pa=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),Ia=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},Na=(e,t)=>{if(t!==-1){const r=Number(e);return r?r+1:1}return e??1},Oa=(e,t)=>Array.isArray(e)?e.filter(r=>t==null?void 0:t.some(n=>n.id===r.id)):[],Ta=async(e,t)=>e.then(r=>[...r??[],...t??[]]),Ie=async(e,t,r,n)=>{const{priority:s="auto",body:i}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:s,method:"POST",body:JSON.stringify(i)}).then(async a=>{const c=await a.json();return r?c:wa(c,n)})},ka=(e,t,r)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:r}]}),Ed=e=>[...Array.isArray(e)?e:[e],"faststore"],Ma=e=>{const t=e.get("utm_source")||Ve("utm_source"),r=e.get("utm_campaign")||Ve("utm_campaign"),n=e.get("utm_medium")||Ve("utm_medium"),s=e.get("utmi_cp")||Ve("utmi_cp"),i=e.get("utmi_pc")||Ve("utmi_pc"),a=e.get("utmi_p")||Ve("utmi_p");return{...t&&{utmSource:t},...n&&{utmMedium:n},...r&&{utmCampaign:r},...s&&{utmiCampaign:s},...i&&{utmiPart:i},...a&&{utmipage:a}}},Ve=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),n=r.exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},wd=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:vd,addItemOrder:Sa,addNotification:ka,createItemOrder:Ca,fetchCartAPI:Ie,findItemIndex:ro,findOptions:Oa,findTotalizerValue:bd,getCategories:xa,getCode:ot,getQuantity:Na,getRemoveId:Aa,getSize:Sd,getTotalItems:Cd,getTotalizer:xd,getUrlParameter:Ve,getValue:Pa,initialState:to,isGift:Co,marketingTagsBuilder:Ed,mergeOptionsPromise:Ta,mountMarketingData:Ma,orderFormValues:wa,promiseDefault:ke,removeQuantity:ja,updateItemSellerExternal:Ra,updateOrderFormPromise:Ia,updateQuantity:Ea,wishlistArray:jd},Symbol.toStringTag,{value:"Module"})),Rd=()=>{const e=async(f,m)=>Ie("/api/checkout/order-form/coupon",{body:{orderFormId:f,coupon:m}}),t=async(f,m)=>{if(m){const y=m.includes(" - ")?m.split(" - ")[0]:m,g=await Ie("/api/checkout/order-form/seller-code",{body:{orderFormId:f,sellerCode:y}},!0);return g instanceof Object&&"nome"in g&&(g==null?void 0:g.status)===!0?Ie("/api/checkout/order-form/attachments",{body:{orderFormId:f,sellerCode:y,sellerName:g.nome}}).then(j=>({...j,openTextField:{...(j==null?void 0:j.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:y}})}else return Ie("/api/checkout/order-form/attachments",{body:{orderFormId:f,sellerCode:"",sellerName:""}})},r=async(f,m)=>Ie("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:f,marketingData:m}}),n=async(f,m,y)=>Ie("/api/checkout/order-form/items",{body:{orderFormId:f,orderItems:Sa(m,y)}}),s=async(f,m,y,g=!1)=>Ie("/api/checkout/order-form/offerings",{body:{id:m,itemIndex:y,orderFormId:f,remove:g}}),i=async f=>Ie("/api/checkout/order-form/items/remove-all",{body:{orderFormId:f}}),a=async(f,m="low")=>Ie("/api/checkout/order-form",{priority:m,body:{orderFormId:f??""}}),c=async(f,m)=>Ie("/api/checkout/order-form/profile",{body:{orderFormId:f,email:m}}),l=async(f,m,y)=>{const g=ja(m,y);return Ie("/api/checkout/order-form/items/update",{body:{orderItems:g.updateItems,orderFormId:f}})},u=async(f,m,y)=>Ie("/api/checkout/order-form/shipping",{body:{orderFormId:f,country:y,postalCode:m}}),p=async(f,m,y)=>Ie("/api/checkout/order-form/shipping/update",{body:{orderFormId:f,options:m,selectedAddresses:y}}),h=async(f,m,y,g)=>{const b=Ea(m,y,g);return Ie("/api/checkout/order-form/items/update",{body:{orderFormId:f,orderItems:b}})};return{addCoupon:e,addItem:n,addSellerCode:t,addMarketingData:r,giftItem:s,emptyCart:i,getOrderForm:a,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:p,updateItemQuantity:async(f,m,y,g,b)=>h(f,m,y,g).then(j=>j&&Array.isArray(j.items)?Ra(j.items,y)?h(f,m,y,b):j:!1)}},no="soma::cart",ht="soma::options",it=Ze.create((e,t)=>{const r=Rd(),n=async(s,i,a)=>{e({loading:!0});const c=await Ia(s);if(typeof c!="boolean"){e({...c});const l=await Ta(rt.get(ht),a);return rt.set(ht,l),Pa(c,i).finally(()=>e({loading:!1,options:l}))}return ke};if(typeof window<"u"){const s=async i=>{if(i){const a=await rt.get(ht).then(u=>Oa(u,i.items));rt.set(no,i),rt.set(ht,a),e({...i,options:a});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&n(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return rt.get(no).then(i=>r.getOrderForm(i?i.id:"").then(s)),{...to,addCoupon:async i=>n(()=>r.addCoupon(t().id,i),"marketingData"),addItem:(i,a)=>{n(()=>r.addItem(t().id,t().items,i),"items",a)},addSellerCode:async i=>n(()=>r.addSellerCode(t().id,i),"openTextField"),addMarketingData:async i=>n(()=>r.addMarketingData(t().id,i),"marketingData"),emptyCart:()=>{n(()=>r.emptyCart(t().id))},removeItem:async i=>{const a=await n(()=>r.removeItem(t().id,t().items,i),"items");return Aa(i,a)},shipping:async(i,a="BR")=>n(()=>r.shipping(t().id,i??"",a),"shippingData"),shippingUpdate:async i=>n(()=>{var a;return r.shippingUpdate(t().id,i,(a=t().shippingData)==null?void 0:a.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(i,a,c)=>n(()=>r.giftItem(t().id,i,a,c),"items"),updateItemQuantity:async(i,a,c)=>{const{id:l,items:u}=t();return n(()=>{var p;return r.updateItemQuantity(l,u,i,a,((p=u.find(h=>h.id===i))==null?void 0:p.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async i=>n(()=>r.insertProfileEmail(t().id,i),"clientProfileData"),setIsOpen:i=>e({isOpen:i})}}return to}),Ad=()=>it(e=>e),La=Ze.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(n=>ka(n,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(n=>n.id!==t)}))}})),Da=()=>La(e=>e.notifications),$a=()=>La(e=>e.actions),Pd=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:ht,KEY_INDEXED_STORE:no,useCartStore:it,useGetCartStoreState:Ad,useGetNotificationActions:$a,useGetNotificationsStore:Da},Symbol.toStringTag,{value:"Module"})),Id=6e3,Ba=x.createContext({}),Fa=({children:e,...t})=>{const{items:r}=it(),[n,s]=x.useState([]),i=x.useRef(null),a=x.useMemo(()=>Array.isArray(n)&&n.length>0?n.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,n]);return x.useEffect(()=>{n.length&&(clearTimeout(i.current??0),i.current=setTimeout(()=>{s([])},Id))},[n]),o.jsx(Ba.Provider,{value:x.useMemo(()=>({...t,setRecentlyAdded:s,recentlyAddedProducts:a}),[t,s,a]),children:e})},xt=()=>{const e=x.useContext(Ba);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class qa{constructor(){fr(this,"events",{});fr(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(n=>{this.prevData[t]=r,n(r)})}}const za=x.createContext({}),Nd=({children:e,headerConfigs:t,pathname:r,...n})=>{const[s,i]=x.useState(!0),a=r==="/",c=x.useRef(new qa),l=h=>h?{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},u=l(a),p=x.useRef(u);return x.useEffect(()=>{var f;const h=((f=new URLSearchParams(window.location.search))==null?void 0:f.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(Jn.get("lastMedias")||Jn.set("lastMedias",`${h}`,{expires:1/24}));const d=()=>{const m=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,y=window.innerWidth<1024||!!m.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);s!==y&&i(y)};return d(),window.addEventListener("resize",d,{passive:!0}),()=>window.removeEventListener("resize",d)},[s]),x.useEffect(()=>{const h=l(a);c.current.publish("header:change_variant",h.headerVariant),c.current.publish("header:change_position",h.position),p.current=h},[a]),o.jsx(za.Provider,{value:{isMobile:s,mediatorRef:c,currentHeaderConfigsRef:p,...n},children:o.jsx(Fa,{children:e})})},Se=()=>x.useContext(za),Ha=x.createContext({}),Od=({children:e,...t})=>o.jsx(Ha.Provider,{value:{...t},children:e}),Re=()=>x.useContext(Ha),Je=(e,t)=>Ze.create(r=>{const n=()=>r({value:e});return t&&t instanceof Set&&t.add(n),{value:e,actions:{setValue:s=>r({value:s}),reset:n}}}),bt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Ct=new Set,Td=()=>{Ct.forEach(e=>{e()})},Ua=Ze.create((e,t)=>{const r=()=>e({value:bt.category});return Ct.add(r),{value:bt.category,actions:{reset:r,setValue:n=>e(()=>({value:n})),updateValue:n=>{t().value!==n&&e({value:n})}}}}),tr=()=>Ua(e=>e.value),Ge=()=>Ua(e=>e.actions),Wa=Je(bt.menuMobileIsOpen,Ct),So=()=>Wa(e=>e.value),et=()=>Wa(e=>e.actions),Ga=Je(bt.searchModalIsOpen,Ct),kd=()=>Ga(e=>e.value),jo=()=>Ga(e=>e.actions),Va=Je(bt.userMenuIsOpen,Ct),Ka=()=>Va(e=>e.value),St=()=>Va(e=>e.actions),Md=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Td,useActionsHeaderCategory:Ge,useActionsMenuMobileIsOpen:et,useActionsSearchModalIsOpen:jo,useActionsUserMenuIsOpen:St,useGetHeaderCategoryStore:tr,useGetMenuMobileIsOpen:So,useGetSearchModalIsOpen:kd,useGetUserMenuIsOpen:Ka},Symbol.toStringTag,{value:"Module"})),at={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},ut=new Set,Ld=()=>{ut.forEach(e=>{e()})},Xa=Ze.create(e=>{const t=()=>e({value:at.selectedSkuInfo});return ut.add(t),{value:at.selectedSkuInfo,actions:{setValue:r=>e(n=>({value:{...n,...r}})),reset:t}}}),Dd=()=>Xa(e=>e.value),$d=()=>Xa(e=>e.actions),Ya=Je(at.openLetMeKnow,ut),Bd=()=>Ya(e=>e.value),Fd=()=>Ya(e=>e.actions),Qa=Je(at.showNotify,ut),qd=()=>Qa(e=>e.value),zd=()=>Qa(e=>e.actions),Za=Je(at.showBottomNavigation,ut),Hd=()=>Za(e=>e.value),Ud=()=>Za(e=>e.actions),Ja=Je(at.openMeasurements,ut),Wd=()=>Ja(e=>e.value),Gd=()=>Ja(e=>e.actions),Vd=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Ld,useActionsPDPOpenLetMeKnow:Fd,useActionsPDPOpenMeasurements:Gd,useActionsPDPSelectedSkuInfo:$d,useActionsPDPShowBottomNavigation:Ud,useActionsPDPShowNotify:zd,useGetPDPOpenLetMeKnow:Bd,useGetPDPOpenMeasurements:Wd,useGetPDPSelectedSkuInfo:Dd,useGetPDPShowBottomNavigation:Hd,useGetPDPShowNotify:qd},Symbol.toStringTag,{value:"Module"})),Zo={feedback:{active:!1,action:"add"},list:[]},Eo=Ze.create((e,t)=>({value:Zo,actions:{reset:()=>e({value:Zo}),setValue:n=>e(()=>({value:n})),toggleProduct:n=>e(s=>s.value.list.includes(n)?{value:{feedback:{active:!0,action:"remove"},list:s.value.list.filter(i=>i!==n)}}:{value:{feedback:{active:!0,action:"add"},list:[...s.value.list,n]}}),updateList:n=>e(s=>({value:{...s.value,list:n}})),resetFeedback:()=>e(n=>({value:{...n.value,feedback:{active:!1,action:""}}}))}})),Kd=()=>Eo(e=>e.value.list),Xd=()=>Eo(e=>e.value.feedback),Yd=()=>Eo(e=>e.actions),Qd=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Yd,useGetWishlistFeedbackStore:Xd,useGetWishlistStore:Kd},Symbol.toStringTag,{value:"Module"})),ec=x.createContext({}),Zd=({children:e,headerData:t,...r})=>{var p,h;const n=x.useRef(null),s=x.useRef(null),i=x.useRef(null),a=x.useRef(null),c=x.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=Se();return(p=l.current)==null||p.subscribe("header:change_variant",d=>{var b,j,v;if(d&&u.current&&(u.current.bannerVariant=d),!n.current)return;const m=document.body.scrollTop>0,y=n.current.getAttribute("data-interactiveVariant"),g=m?y:d??((b=u.current)==null?void 0:b.bannerVariant)??"default";g!==((j=u.current)==null?void 0:j.headerVariant)&&(n.current.setAttribute("data-bottomdivider",String(m)),n.current.setAttribute("data-variant",String(g)),(v=l.current)==null||v.publish("herobanner:change_controllers_variant",g),u.current&&(u.current.headerVariant=g))}),(h=l.current)==null||h.subscribe("header:change_position",d=>{n.current&&(n.current.style.position=d)}),x.useEffect(()=>{const d=new AbortController,f=_.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",f,{passive:!0,signal:d.signal});const m=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return n.current&&(n.current.addEventListener("click",m,{signal:d.signal}),n.current.addEventListener("touchend",m,{signal:d.signal})),()=>{d.abort()}},[]),o.jsx(ec.Provider,{value:{headerData:t,structureRef:s,rootRef:n,tipbarRef:i,userMenuMobileRef:a,userMenuDesktopRef:c,...r},children:e})},Ce=()=>x.useContext(ec),tc=x.createContext({}),rc=({children:e})=>{const t=x.useRef(null),r=x.useRef(null),n=So(),s=x.useCallback(()=>{var i;{const a=(i=t.current)==null?void 0:i.querySelector("dialog");if(a){a.dataset.animation="out";const c=a.children[0];c.dataset.animation="out"}}},[]);return x.useEffect(()=>{var i;if(n)document.body.dataset.modalopen="true";else{document.body.dataset.modalopen="false";const a=(i=r.current)==null?void 0:i.querySelector("dialog");if(a){a.dataset.animation="out";const c=a.children[0];c.dataset.animation="out"}}},[n]),x.useEffect(()=>{r.current=document.body},[]),o.jsx(tc.Provider,{value:{bodyRef:t,handleCloseSubMenu:s,documentBodyRef:r},children:e})},jt=()=>x.useContext(tc),Jd=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},ef=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const n=t.getBoundingClientRect(),s=e.getBoundingClientRect(),i=e!=null&&e.parentElement?Jd(e==null?void 0:e.parentElement):0;return{left:n.left+n.width/2-(s.width+i),top:n.top+n.height+r}},nc=x.createContext({}),oc=({children:e,delay:t=600,gap:r=20,...n})=>{const[s,i]=x.useState(!1),a=x.useRef(null),[c,l]=x.useState(!1),[u,p]=x.useState({left:0,top:0}),h=x.useCallback(()=>{l(!0),typeof window<"u"&&(a.current=window.setTimeout(()=>{i(!1),l(!1)},t))},[l,i,t]);return x.useEffect(()=>{if(typeof window>"u")return;const d=window.document.querySelector("#cart-button"),f=window.document.querySelector("#add-to-cart--tooltip");if(d&&f){const{left:m,top:y}=ef(f,d,r??0);p({left:m,top:y}),l(!1)}},[r,s]),o.jsx(nc.Provider,{value:x.useMemo(()=>({...n,...u,handleClose:h,isLeaving:c,isOpen:s,setIsOpen:i,setIsLeaving:l}),[n,u,h,c,s,i,l]),children:e})},tt=()=>{const e=x.useContext(nc);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},sc=x.createContext({}),tf=({children:e,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:t,...r})=>{const n=it(),{setRecentlyAdded:s}=xt(),i=x.useRef(""),a=Da(),{addNotification:c,removeNotification:l}=$a(),{addCoupon:u,addItem:p,addSellerCode:h,addMarketingData:d,emptyCart:f,isOpen:m,removeItem:y,shipping:g,shippingUpdate:b,toggleServiceToProduct:j,updateItemQuantity:v}=n;x.useEffect(()=>{const z=Jn.get("lastMedias");if(n.id&&z&&i.current!==z){i.current=z;const V=new URLSearchParams(z),W=Ma(V);d(W)}},[n,d]);const S=x.useCallback(async(z,V)=>(V==="coupon"?u(z):h(z)).then(F=>{if(typeof F!="boolean"&&F instanceof Object){if(V==="seller"&&"value"in F){const{statusOk:Z,value:P}=F,T=String(P??"").split(" - ");return ot((T==null?void 0:T[0])??"",z,!!Z)}return ot(String(F.coupon),z,!0)}return ot("","")}).catch(()=>Promise.resolve({code:400})),[u,h]),E=x.useCallback((z,V,W)=>{const{id:F}=z;v(F,V,W)},[v]),R=x.useCallback((z,V,W=!1)=>{if(!z)return;const{id:F}=z,Z=ro(n.items,F);if(Z!==-1&&!W){const P=Number(n.items[Z].quantity),T=n.items[Z]?P+1:1;E(z,T,V)}else p({id:F,quantity:(z==null?void 0:z.quantity)??1,seller:z.seller});m||s(P=>[...P,z])},[p,E,n.items,m,s]),C=x.useCallback((z,V)=>{if(!z||!Array.isArray(z))return;s(F=>[...F,...z]);const W=z.map(F=>{const{id:Z,quantity:P,seller:T}=F,D=ro(n.items,Z),K=Na(P??1,D);return{id:Z,quantity:K,seller:T}});p(W,V)},[p,n.items,s]),A=x.useCallback(async(z,V,W)=>z?y(z).then(()=>(c(V??`${t}`,W),ot(z,z))):Promise.resolve(ot("","Product id required")),[c,y]),k=x.useCallback(()=>{n.items.length>0&&f()},[f,n.items]),w=x.useCallback((z,V="BRA")=>g(z,V),[g]),N=x.useCallback(z=>{z&&b(z)},[b]),I=x.useCallback(async(z,V,W)=>{const F=n.items.findIndex(P=>P.id===z);return n.items[F]&&F>=0?j(V,F,W??!1):!1},[n.items,j]),B=x.useCallback(async(z,V)=>v(z,V).then(W=>{if(Array.isArray(W)){const F=W.find(Z=>Z.id===z);if(F&&(F==null?void 0:F.quantity)<V)return String(F.quantity)}return!1}),[v]),O=x.useCallback(async()=>{await d({...n.marketingData,coupon:""})},[d,n.marketingData]),H=x.useCallback(async()=>{await d({...n.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[d,n.marketingData]),U=x.useCallback(async()=>{await g("","BRA")},[g]);return o.jsx(sc.Provider,{value:x.useMemo(()=>({...r,addCouponSeller:S,addToCart:R,addItemsToCart:C,cartStore:n,notifications:a,clearCart:k,addNotification:c,isOpen:n.isOpen,removeNotification:l,removeToCart:A,setIsOpen:n.setIsOpen,shipping:w,shippingUpdateOption:N,toggleGiftItemCart:I,updateItemQuantity:B,removeCoupon:O,removeSellerCode:H,removeCEP:U}),[r,S,R,C,a,k,c,n,l,A,w,N,I,B,O,H,U]),children:e})},ze=()=>{const e=x.useContext(sc);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},ic=x.createContext({}),wo=({children:e,fetch:t})=>{const r=x.useRef(!0),[n,s]=x.useState(null),[i,a]=x.useState(!1);return x.useEffect(()=>{(async()=>{r.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),r.current=!1}catch{r.current=!0,a(!0)}})()},[t]),o.jsx(ic.Provider,{value:x.useMemo(()=>({data:n,isLoading:r.current??!1,isError:i}),[n,i,r]),children:e})},Ro=()=>{const e=x.useContext(ic);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},ac=x.createContext({}),cc=({children:e,sort:t,state:r,count:n,collectionId:s,brand:i,CONSTANTS:a})=>{const c=x.useMemo(()=>{var l;return s?[{key:"productclusterids",value:s.toString()}]:i?[{key:"brand",value:i}]:(l=r.base)!=null&&l.length?r.base.slice(1).split("/").map((u,p)=>({key:`category-${p+1}`,value:u})):[]},[r.base,s]);return o.jsx(ac.Provider,{value:x.useMemo(()=>({state:{...r,facets:[...c,...r.facets??[]]},sort:t,count:n??a.ITEMS_PER_PAGE}),[c,n,t,r]),children:e})},rr=()=>{const e=x.useContext(ac);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},pt={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"}},rf={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},nf="Imagem do produto",Jo=1,of="Sair",sf=e=>e.exit,af=({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"}],cf=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},lf=e=>"Seja bem vindo!",lc=x.createContext({}),uf=({children:e,searchParams:t,selectedFacets:r,PLP_SORT_DEFAULT:n})=>{const{data:s,...i}=Ro(),{router:a}=Re(),c=x.useCallback((d,f)=>{if(f){if(d.key.toLocaleLowerCase()==="price"){const m=f.getAll("facets");f.delete("facets"),m.forEach(y=>{const[g]=y.split("/");g!==d.key&&f.append("facets",y)})}f.set("page","1"),f.append("facets",`${d.key}/${d.value}`),a.push(`?${f.toString()}`)}},[a]),l=x.useCallback(()=>{const d=new URLSearchParams;d.set("sort",n),d.set("page","1"),a.push(`?${d.toString()}`)},[a]),u=x.useCallback((d,f)=>{if(!f||!f.has&&!f.has("facets"))return;const m=f.getAll("facets");f.delete("facets"),f.set("page","1"),m.forEach(y=>{const[g,b]=y.split("/");(g!==d.key||b!==d.value)&&f.append("facets",y)}),a.push(`?${f.toString()}`)},[a]),p=x.useCallback(d=>{const f=new URLSearchParams(ae.convertSearchParams(t));for(const[,m]of f.entries()){const[y,g]=m.split("/");if(y===d.key&&g===d.value)return u(d,f)}return c(d,f)},[c,u,t]),h=x.useCallback(d=>{const f=new URLSearchParams(ae.convertSearchParams(t));f.set("sort",d.replace("_",":")),a.push(`?${f.toString()}`)},[a,t]);return o.jsx(lc.Provider,{value:x.useMemo(()=>({...i,breadcrumb:s&&"breadcrumb"in s?s==null?void 0:s.breadcrumb:[],deleteAllFacets:l,facets:s&&"facets"in s?s==null?void 0:s.facets:[],selectedFacets:r,onToggleFacet:p,onSort:h,searchParams:t}),[s,l,h,p,i,r,t]),children:e})},df=({children:e,searchParams:t,forceUpdate:r,PLP_SORT_DEFAULT:n})=>{const{state:s}=rr();return o.jsx(wo,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...s,forceUpdate:r}),priority:"low"}),children:o.jsx(uf,{selectedFacets:(s==null?void 0:s.facets)??[],searchParams:t,PLP_SORT_DEFAULT:n,children:e})})},ff=()=>{const e=x.useContext(lc);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},uc=x.createContext({}),pf=({children:e})=>{const{data:t,...r}=Ro(),[n,s]=x.useState(0),{sendDataLayerEvent:i}=ge();return x.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){i({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const a=t.pagination.count;a&&Number.isInteger(a)&&s(a)}},[t,i,s]),o.jsx(uc.Provider,{value:x.useMemo(()=>({...r,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:rf,total:n}),[t,r,n]),children:e})},mf=({children:e,query:t,state:r,selectedFacets:n,forceUpdate:s})=>o.jsx(wo,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...r,query:t,forceUpdate:s,facets:n??[]})}),children:o.jsx(pf,{state:r,children:e})}),hf=()=>{const e=x.useContext(uc);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},dc=x.createContext({}),gf=({children:e,term:t})=>{const[r,n]=x.useState([]),[s,i]=x.useState(!1);return x.useEffect(()=>{if(!t){n([]);return}(async()=>{i(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();n((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),o.jsx(dc.Provider,{value:x.useMemo(()=>({suggestedTerms:r,loading:s,setLoading:i}),[r,s]),children:e})},yf=({children:e,...t})=>o.jsx(gf,{...t,children:e}),_f=()=>{const e=x.useContext(dc);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},fc=x.createContext({searches:[],isLoading:!1,error:null}),vf=({children:e})=>{const[t,r]=x.useState([]),[n,s]=x.useState(!0),[i,a]=x.useState(null);return x.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();r(u.data.searches||[])}catch(l){a(l instanceof Error?l.message:"Erro desconhecido")}finally{s(!1)}})()},[]),o.jsx(fc.Provider,{value:x.useMemo(()=>({searches:t,isLoading:n,error:i}),[t,n,i]),children:e})},bf=()=>{const e=x.useContext(fc);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},pc=x.createContext({}),xf=({children:e,slug:t,searchParams:r,collectionId:n,brand:s,itemsPerPage:i=24,PLP_SORT_DEFAULT:a})=>{const{pathname:c}=Re(),[l,u]=x.useState(!1),p=x.useMemo(()=>{const d=new URL(c,"http://localhost"),f=Array.isArray(r==null?void 0:r.facets)?r.facets:[(r==null?void 0:r.facets)??""],m=(r==null?void 0:r.page)??"1",y=(r==null?void 0:r.sort)??(n?"":a);return d.searchParams.set("page",String(m)),d.searchParams.set("sort",String(y)),r!=null&&r.query?(d.searchParams.set("query",r.query),d):(d.searchParams.set("base",Array.isArray(t)?t.join("/"):t),d.searchParams.set("facets",f.join(",")),d)},[n,c,r,t]),h=x.useMemo(()=>{if(Array.isArray(r==null?void 0:r.facets))return ae.parseSearchState(p,r.facets);const d=r!=null&&r.facets?[r==null?void 0:r.facets]:[];return ae.parseSearchState(p,d)},[p,r]);return o.jsx(pc.Provider,{value:x.useMemo(()=>({openFilters:l,setOpenFilters:u}),[l,u]),children:o.jsx(cc,{CONSTANTS:{ITEMS_PER_PAGE:i},state:x.useMemo(()=>({...h}),[h]),collectionId:n,brand:s,children:e})})},Cf=()=>{const e=x.useContext(pc);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Zt=(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,i)=>Zt(s,t[i]));if(Array.isArray(t))return!1;const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(s=>Object.prototype.hasOwnProperty.call(t,s)&&Zt(e[s],t[s]))},mc=(e,t,r="page")=>Object.keys(t).some(n=>n===r?!1:!Zt(t[n],e[n])),oo=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 r=await t.json();return r==null?void 0:r.data},hc=()=>({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}}}),gc=(e,t,r,n=24)=>{const s=new Set,i=[];if(!Array.isArray(e)||e.length===0)return{taken:s,placedBanners:i};const a=t*n*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<a;){const p=l%r;if(p+c.columns>r){l+=r-p;continue}if(!Array.from({length:c.columns}).some((f,m)=>s.has(l+m))){for(let f=0;f<c.columns;f++)s.add(l+f);i.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:i}},so=(e,t,r,n=24)=>{const{placedBanners:s,taken:i}=gc(e??[],t,r),a=[];let c=0;try{for(;a.length<t*n;)i.has(c)||a.push(c),c++;return{banners:s,products:a}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:a}},Yt=(e,t,r=24)=>Array.from({length:e},(n,s)=>{const i=s+1;return{loading:e===i,page:i,pagination:t!=null&&t.products.length&&e===i?t==null?void 0:t.pagination:Ao(),products:t!=null&&t.products.length&&e===i?t==null?void 0:t.products:Array.from({length:r},()=>hc())}}),yc=(e,t)=>[...e,{loading:!1,page:t,pagination:Ao(),products:[]}],Ao=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),Sf=(e,t,r,n,s)=>{const i=e[e.length-1],a=(i==null?void 0:i.products.length)??s,c=(e.length-1)*s+a-1,l=r[c];return t.filter((u,p)=>{const h=n[p];return h<=l||s>a&&h>l})},_c=(e,t)=>{const r=new Map;for(const s of e){const i=Math.floor(s/t);r.has(i)||r.set(i,[]),r.get(i).push(s)}const n=[];for(const[,s]of r){const i=s[Math.floor(Math.random()*s.length)];n.push(i)}return n},jf=(e,t)=>{if(!e)return[];const r=e.map((n,s)=>n.video&&n.video!==""?s:null).filter(n=>n);return _c(r,t)},vc=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],Ef=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:vc,createPage:yc,createPages:Yt,createPagination:Ao,createProduct:hc,deepEqual:Zt,fetchPage:oo,getBanners:gc,getPositions:so,getProductsWithVideo:jf,getRandomVideoPerRow:_c,getVisibleBanners:Sf,hasStateChangedExceptPage:mc},Symbol.toStringTag,{value:"Module"})),wf=50,Rf=Ze.create((e,t)=>{const r=a=>Math.min(a,wf),n=async(a,c)=>{const l=r(a.page);try{const u=await oo({...a,page:l});s(l,p=>c?c(p,u):{...p,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),s(l,p=>({...p,loading:!1}))}},s=(a,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===a?c(l):l)})},i=async(a,c)=>{await n(a,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(a,c,l,u)=>{var h,d,f;const p=r(Number(a==null?void 0:a.page));e({...c,pages:Yt(p,void 0,u)});try{const m=await oo({...a,page:p});if(m){if(!m.products.length&&((h=m==null?void 0:m.pagination)==null?void 0:h.total)<p){i({...a,page:(d=m==null?void 0:m.pagination)==null?void 0:d.total},l),e({pages:Yt((f=m==null?void 0:m.pagination)==null?void 0:f.total)});return}typeof l=="function"&&l(m),e({load:!0,pages:Yt(p,m),total:Number(m.pagination.count)})}}catch(m){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${p} ${m}`)}},addPage:(a,c,l)=>{const{pages:u}=t(),p=r(a==null?void 0:a.page);u.some(h=>h.page===p)||(e({...c,pages:yc(u,p)}),i(a,l))},updateProducts:(a,c)=>{const l=t().pages.find(u=>u.page===r(a==null?void 0:a.page));l!=null&&l.loading||i(a,c)}}}),Af=(e,t,r,n=0)=>{if(!e.length)return[];let s=0;const i=[];for(let a=0;a<e.length;a+=r){const c=e.slice(a,a+r),l=c.findIndex(u=>{var p;return(p=u.node)==null?void 0:p.video});for(let u=0;u<c.length;u++){const p=a+u,h=n+p,d=t.find(m=>m.position_grid===h+1),f=h+s+1;d&&(s+=d.columns),i.push({position:f,canPlayVideo:u===l})}}return i},Pf=(e,t,r)=>{const n=(t-1)*r,s=t*r;return e>=n&&e<=s},bc=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:ae.disableSKU(r),size:ae.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},If=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Af,getSkusNotify:bc,isPositionInCurrentPage:Pf},Symbol.toStringTag,{value:"Module"})),xc=x.createContext({}),Nf=({banners:e,children:t,itemsPerPage:r=24,searchParams:n,Notification:s})=>{const{router:i}=Re(),{sendDataLayerEvent:a}=ge(),{isMobile:c}=Se(),{state:l}=rr(),{addPage:u,createPages:p,updateProducts:h,...d}=Rf(),f=c?8:16,m=c?2:4,y=x.useRef(!1),g=x.useRef(l),[b,j]=x.useState(!1),[v,S]=x.useState(null),[E,R]=x.useState([]),C=x.useCallback(I=>{I&&"pagination"in I&&a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:I.products}}})},[a]),A=x.useCallback(I=>{if(I.pagination.nextPage===!0){const B=I.page+1,O=so(e,B,m,r);u({...l,page:B},O,C)}},[u,e,C,m,r,l]),k=x.useCallback(I=>{I.loading===!1&&h({...l,page:I.page},C)},[C,h,l]),w=x.useCallback(I=>{const B=new URLSearchParams(n);I.page!==Number(B.get("page")??1)&&(B.set("page",String(I.page)),i.replace(`?${B.toString()}`,{scroll:!1}))},[i,n]),N=x.useCallback((I,B)=>{const O=B?bc([B]):null;R(I),S(O!=null&&O.length?O[0]:null),j(!0)},[]);return x.useEffect(()=>{const I=!y.current,B=mc(g.current,l),O=so(e,l.page,m);I?p(l,O,C,r):B&&(p(l,O,C,r),g.current=l),y.current=!0},[e,p,C,m,r,l]),o.jsxs(xc.Provider,{value:x.useMemo(()=>({...d,addPage:u,addNewPage:A,createPages:p,gap:f,columns:m,handleNotify:N,updatePage:k,updateProducts:h,updateParamPage:w}),[u,A,p,N,f,m,d,k,h,w]),children:[t,o.jsx(s,{notify:b,sku:v,skus:E,setSku:S,setNotify:j})]})},Of=()=>{const e=x.useContext(xc);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e};function Cc(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const n of r){const[s,i]=n.trim().split("=");if(s===e)return i}}function Po(e,t,r={}){const s={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let i=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const a in s)s[a]!==void 0&&(i+=`; ${a}`,a==="expires"?i+=`=${s[a].toUTCString()}`:typeof s[a]=="boolean"?i+=`; ${s[a]?"true":"false"}`:i+=`=${s[a]}`);window.document.cookie=i}const Tf=()=>{const{sendDataLayerEvent:e}=ge(),{user:t}=Io(),{cartStore:r}=ze();return x.useEffect(()=>{if(!t)return;(async()=>{const{userId:s,email:i,firstName:a,lastName:c,phone:l,homePhone:u,postalCode:p,street:h,number:d,city:f,gender:m}=t,y=new TextEncoder().encode(s),g=await crypto.subtle.digest("SHA-256",y),j=Array.from(new Uint8Array(g)).map(v=>v.toString(16).padStart(2,"0")).join("");e({functionKey:"readyEvents",data:{readyData:{user_id:j,email:i,first_name:a,last_name:c,phone:l||u,zip:p,street:h,street_number:d,city:f,gender:m,orderform_id:r==null?void 0:r.id}}})})()},[t,r.id]),null},Sc=x.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),kf=({children:e,AUTH_TOKEN_COOKIE:t})=>{const[r,n]=x.useState({amount:null,boxes:null,toExpire:null,loading:!0}),s=x.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(c=>c.json()).then(c=>{const{userCredits:l,...u}=c,{wishlist:p,...h}=u;n({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 p=="string"?p.split(","):p)??[]})})}catch(c){console.error("my credits request",c),n({...r,loading:!1})}},[n]),i=x.useCallback(()=>{Po(t),s()},[s]),a=x.useCallback(()=>r.boxes?r.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},[r]);return x.useEffect(()=>{s()},[s]),o.jsxs(Sc.Provider,{value:x.useMemo(()=>({...r,getCurrentCredits:a,logout:i}),[r,a,i]),children:[o.jsx(Tf,{}),e]})},Io=()=>{const e=x.useContext(Sc);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},jc=x.createContext({gridBanners:void 0,banners:[]}),Mf=({children:e,data:t,device:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:s})=>{const{isMobile:i}=Se(),a=(t==null?void 0:t.sections.filter(h=>h.name!=="List Product Banners"))??[],c=a.slice(0,Jo),l=a.slice(Jo,a.length),u=t==null?void 0:t.sections.find(h=>h.name==="List Product Banners"),p=x.useMemo(()=>{var h,d;return((d=(h=u==null?void 0:u.data)==null?void 0:h.banners)==null?void 0:d.map(f=>({...f.banner,columns:f.bannerWidth,position_grid:f.bannerPosition})))??[]},[u]);return i&&r==="mobile"||!i&&r==="desktop"?o.jsxs(jc.Provider,{value:{gridBanners:u,banners:p},children:[o.jsx(n,{data:c??[]}),o.jsxs(_.Utils.Column,{gap:s,className:_.helpers.classNameConcat("utils-column-modifier"),children:[e,o.jsx(n,{data:l??[]})]})]}):o.jsx(o.Fragment,{})},Lf=()=>{const e=x.useContext(jc);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},Ec=x.createContext({}),wc=({children:e,filters:t,PLP_FILTERS:r,...n})=>{var i;const s=(i=t.facets)==null?void 0:i.filter(a=>r.find(c=>c.key===a.key));return o.jsx(Ec.Provider,{value:x.useMemo(()=>({...n,filters:{...t,facets:s}}),[t,s,n]),children:e})},dt=()=>{const e=x.useContext(Ec);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},Rc=x.createContext({product:void 0}),Df=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:n,SectionZone:s})=>o.jsxs(Rc.Provider,{value:{productId:r},children:[e,o.jsx(_.Utils.Column,{gap:n,className:_.helpers.classNameConcat("utils-column-modifier"),children:o.jsx(s,{data:(t==null?void 0:t.sections)??[]})})]}),$f=()=>{const e=x.useContext(Rc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Bf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Ff(e,t=1e3){let r=!1;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>{r=!1},t))}}function qf(e,t=1e3){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}const Ac=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,gt=(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),zf=e=>{const t=td.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Hf=["name","email","phone","date","cpf","cep"],es={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}$/},Pc=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!es[e])return!0;const n=t.trim();return es[e].test(n)},Uf=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):nf},Wf=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Hf,debounce:qf,getAltTextFromUrl:Uf,getAuthenticatedUser:zf,getCookie:Cc,getDaysHoursMinutesSeconds:gt,getMilliSeconds:Ac,removeAccentsAndReplaceSpaces:Bf,setCookie:Po,throttle:Ff,validateInput:Pc},Symbol.toStringTag,{value:"Module"})),Gf=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((n,s)=>(t[s.master_data_field]="none",{...n,[s.master_data_field]:s}),{}))??{},mountedInputsStatus:t}},Vf=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:n,checkboxRef:s,setFormStatus:i})=>{let a=!1,c=!1;const l={...r};return n&&!s.current&&(i("unchecked"),a=!0),e.forEach((u,p)=>{var f;if(p==="terms-and-conditions")return;const h=(f=t[p])==null?void 0:f.required;if(h&&!u){l[p]="required",a=!0;return}Pc({type:t[p].type,input:u,required:h})||(l[p]="error",c=!0),typeof u=="string"&&e.set(p,u.toString().trim())}),{hasEmptyFields:a,hasErrors:c,inputStatusToUpdate:l}},Ic=x.createContext({}),Nc=({children:e,masterDataEmailField:t,fields:r,variant:n,CONSTANTS:{MASTER_DATA_ENTITY:s,NEWSLETTER_CONFIGS:i}})=>{const{sendDataLayerEvent:a}=ge(),c=n==="vertical"&&i.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=x.useMemo(()=>Gf({fields:r}),[r]),p=x.useRef(!1),[h,d]=x.useState("idle"),[f,m]=x.useState(u),y=async({searchFields:R,entity:C})=>{const A=await _t.post("/api/master-data/search",{body:{masterDataEntity:C,searchFields:R,headers:{"REST-Range":"resources=0-49"}}});return console.info(A),A.data},g=async({id:R,fieldsToBeUpdated:C,entity:A})=>(await _t.post("/api/master-data/update",{dataEntityName:A,id:R,fieldsToBeUpdated:C})).status,b=x.useCallback(async({payload:R,response:C},A,k)=>{const{email:w,...N}=R,[I]=await y({searchFields:{[A]:w},entity:k??s.newsletter});return I&&await g({id:I.id,fieldsToBeUpdated:N,entity:k??s.newsletter})!==204?{...C,status:"error"}:{...C,status:"success"}},[]),j=x.useCallback(async({formData:R},C,A)=>{const k={status:"idle",inputsStatus:{}},w={};R.forEach((N,I)=>{w[I]=N});try{const I=(await _t.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:k},A,C):I!=null&&I.Id?{...k,status:"success"}:{...k,status:"error"}}catch(N){return console.error("error",N),{...k,status:"error"}}},[b]),v=x.useCallback(async(R,C,A)=>{R.preventDefault();const k=new FormData(R.target);C&&Object.keys(C).forEach(N=>{k.append(N,C[N])});const w=await j({formData:k},A??"",t);w&&(d(w==null?void 0:w.status),m(w.inputsStatus),w.status==="success"&&a({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,j,d,m,a]),S=x.useCallback(R=>{const C=new FormData(R.currentTarget.parentElement),{hasEmptyFields:A,hasErrors:k,inputStatusToUpdate:w}=Vf({formData:C,mountedFields:l,inputsStatus:f,hasTermsAndConditions:c,checkboxRef:p,setFormStatus:d});if(m(w),A||k){R.preventDefault();return}d("loading")},[l,f,c,p]),E=x.useCallback(()=>{d("idle"),m(u)},[u]);return o.jsx(Ic.Provider,{value:x.useMemo(()=>({formStatus:h,handleSubmit:v,setFormStatus:d,inputsStatus:f,setInputsStatus:m,hasTermsAndConditions:c,handleClickToSubmit:S,checkboxRef:p,masterDataEmailField:t,fields:r,variant:n,resetNewsletter:E}),[h,v,d,f,m,S,c,p,t,r,n,E]),children:e})},No=()=>{const e=x.useContext(Ic);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Kf={contexts:{addToCart:{hook:tt,provider:oc},cart:{hook:ze,provider:tf},cms:{FlagsAndTags:{context:vo,hook:bo,provider:rd}},newsletter:{hook:No,provider:Nc},events:{hook:ge,provider:dd},global:{hook:Se,provider:Nd,mediator:qa},header:{hook:Ce,provider:Zd},menuMobile:{hook:jt,provider:rc},next:{hook:Re,provider:Od},pdp:{provider:nd,hook:od},PDPContent:{provider:Df,hook:$f},plp:{provider:xf,hook:Cf},plpFilter:{hook:dt,provider:wc},PLPContent:{provider:Mf,hook:Lf},plpInfinite:{provider:Nf,hook:Of},pdpdata:{hook:xo,provider:fd},searchFacets:{hook:ff,provider:df},searchProducts:{hook:hf,provider:mf},searchRoot:{hook:Ro,provider:wo},searchSearch:{hook:rr,provider:cc},searchSuggestedTerms:{hook:_f,provider:yf},searchTopSearchs:{hook:bf,provider:vf},session:{hook:Io,provider:kf},ui:{hook:xt,provider:Fa}},hooks:{useBackPDC:da,useClipboard:pd,useDisableZoom:md,useLocalStorage:gd,useOnScreen:ba,useSentinel:yd,useTouchZoomPan:_d},stores:{cart:Pd,header:Md,pdp:Vd,wishlist:Qd}},Xf={cart:wd,events:ud,plp:Ef,product:ae.productHelpers,utils:Wf},Oo={helpers:Xf},Oe={"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"},Oc=({brand:e,className:t,name:r,...n})=>o.jsxs("div",{...n,className:_.helpers.classNameConcat(Oe["add-to-cart--card--name"],t),children:[o.jsx(_.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:o.jsx("p",{className:"typography-style-body-md",children:r})})})]});Oc.displayName="AddToCart.Card.Name";const Tc=({className:e,listPrice:t,price:r,quantity:n,productId:s,...i})=>{const a=ae.formatPriceToCurrency(r/100),c=ae.formatPriceToCurrency(t/100);return o.jsx("div",{...i,className:_.helpers.classNameConcat(Oe["add-to-cart--card--price-quantity"],e),children:o.jsx(_.ProductInfo.Root,{size:"small",layout:"vertical",children:o.jsx(_.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:o.jsx(_.ProductInfo.ValuesWrapper,{children:r!==t?o.jsxs(o.Fragment,{children:[o.jsx(_.ProductInfo.Price,{label:"originalPrice",value:a,size:"small"},"price-list"),o.jsx(_.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):o.jsx(_.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};Tc.displayName="AddToCart.Card.PriceQuantity";const Yf="_skeleton_12b79_1",Qf={skeleton:Yf},Zf=({style:e})=>o.jsx("div",{style:e,className:Qf.skeleton}),Jf="_image_lypfr_1",ep={image:Jf},tp=({alt:e,className:t,objectFit:r,...n})=>{const{nextimage:s}=Re();return o.jsx(s,{quality:90,...n,alt:e??"",className:_.helpers.classNameConcat(ep.image,t),"data-object-fit":r??"cover"})},rp=({videoRef:e,...t})=>o.jsx("video",{...t,ref:e,children:o.jsx("track",{kind:"captions"})}),Be={Image:tp,Video:rp},kc=({className:e,productGroupID:t,size:r,texture:n,...s})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:a}}=tt(),[c,l]=x.useState(n??"");return x.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const p=u.data[0].items[0];if(p){const h=p.images.find(d=>i.includes(d.imageLabel));h!=null&&h.imageUrl?l(h.imageUrl):l(p.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),o.jsxs("div",{...s,className:_.helpers.classNameConcat(Oe["add-to-cart--card--style-size"],e),children:[o.jsx(_.ToggleStyle.Wrapper,{size:"x-small",style:a,children:o.jsx(_.ToggleStyle.Texture,{children:c?o.jsx(Be.Image,{alt:"",src:c??"",width:164,height:164,style:a}):o.jsx(Zf,{})})}),o.jsx(_.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&o.jsxs(_.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[o.jsx(_.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),o.jsx(_.ToggleSize.Text,{children:r})]})]})};kc.displayName="AddToCart.Card.StyleSize";const{helpers:np}=Oo,Mc=({className:e,item:t,texture:r,...n})=>{const{itemOffered:{name:s,brand:i,skuName:a,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:p}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:h}}=tt(),{size:d}=np.product.getColorAndSizeFromSkuName(a??s,h);return o.jsxs("div",{...n,className:_.helpers.classNameConcat(Oe["add-to-cart--card--content"],e),children:[o.jsx(Oc,{brand:i.name,name:s}),o.jsx(Tc,{price:u,listPrice:p,quantity:l,productId:t.id}),o.jsx(kc,{size:d,texture:r,productGroupID:c})]})};Mc.displayName="AddToCart.Card.Content";const Lc=({image:e,thumbnail:t=!1})=>o.jsx(Be.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Lc.displayName="AddToCart.Card";const Dc=({className:e,item:t,texture:r,thumbnail:n,...s})=>{const{itemOffered:{image:[i]}}=t,a=ae.updatedResizedImg(i.url,{width:200,height:300});return o.jsxs("div",{...s,className:_.helpers.classNameConcat(Oe["add-to-cart--card"],e),children:[o.jsx(Lc,{image:{alternateName:i.alternateName||"Produto",url:a||""},thumbnail:n}),!n&&o.jsx(Mc,{item:t,texture:r})]})};Dc.displayName="AddToCart.Card";const $c=({className:e,children:t,title:r,...n})=>o.jsxs("div",{...n,className:_.helpers.classNameConcat(Oe["add-to-cart--content"],e),children:[o.jsx("div",{className:Oe["add-to-cart--content--title"],children:r&&o.jsx("h2",{children:r})}),t,o.jsx(Xe.Footer,{})]});$c.displayName="AddToCart.Layout.Content";const Bc=({className:e,...t})=>{var f,m;const{isMobile:r,handleClose:n,CONSTANTS:{ADD_TO_CART:s}}=tt(),{cartStore:{totalizers:i},setIsOpen:a}=ze(),c=(f=i.find(y=>y.id==="Discounts"))==null?void 0:f.value,l=((m=i.find(y=>y.id==="Items"))==null?void 0:m.value)??0,u=i.find(y=>y.id==="Shipping"),h=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,d=ae.formatPriceToCurrency(h??0);return o.jsxs("div",{...t,className:_.helpers.classNameConcat(Oe["add-to-cart--footer"],e),children:[o.jsxs("div",{className:Oe["add-to-cart--footer--total"],children:[o.jsx("span",{children:"Subtotal:"}),o.jsx("span",{children:d})]}),o.jsx(_.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>a(!0),children:s.footer.bag}),r?o.jsx(_.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:s.footer.keep_buying}):o.jsx(_.Button,{onClick:()=>n(),size:"medium",variant:"tertiary",children:s.footer.keep_buying})]})};Bc.displayName="AddToCart.Layout.Footer";const Fc=({children:e,className:t,thumbnail:r=!1,...n})=>{const{cartStore:{options:s}}=ze(),{recentlyAddedProducts:i}=xt(),a=i.length>3?4:i.length;return o.jsxs("div",{...n,className:Oe["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(i)&&i.filter((c,l)=>l<a).map(c=>{var u;const l=(u=s==null?void 0:s.find(p=>p.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return o.jsx(Xe.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};Fc.displayName="AddToCart.Layout.Items";const qc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:n}=tt(),{isMobile:s}=Se();return o.jsxs(_.Modal.Root,{"data-modal":"add-to-cart--modal",className:Oe["add-to-cart__modal"],isMobile:s??!1,isOpen:r,setIsOpen:n,variant:"sideBottom",style:{zIndex:t.modal},children:[o.jsx(_.Modal.Header,{navigation:"top",children:o.jsx(_.Modal.Controls,{navigation:"top",isMobile:!0})}),o.jsx(_.Modal.Body,{children:e})]})};qc.displayName="AddToCart.Modal";const op=({children:e})=>{const{count:t,handleClose:r,setIsOpen:n}=tt(),s=x.useRef(t);return x.useEffect(()=>{t>s.current&&n(!0),t<s.current&&s.current>=1&&r(),s.current=t},[t,r,n]),o.jsx(o.Fragment,{children:e})},zc=({children:e,component:t,CONSTANTS:r,...n})=>{const{recentlyAddedProducts:s}=xt(),{isMobile:i}=Se(),a=s.length>3?4:s.length;return o.jsx(oc,{...n,count:a,isMobile:i,CONSTANTS:r,children:o.jsx(op,{children:i?o.jsxs(o.Fragment,{children:[o.jsx(Xe.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):o.jsx(Xe.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};zc.displayName="AddToCart.Root";const Hc=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:s,left:i,isLeaving:a,target:c,isOpen:l,top:u}=tt();return o.jsx(_.Tooltip.Root,{arrow:"top-right",component:o.jsx("div",{...n,ref:s,children:t}),id:"add-to-cart--tooltip",className:Oe["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:a,isOpen:l,left:i,size:"medium",position:"top",top:u,children:o.jsx("div",{className:Oe["add-to-cart--tooltip"],ref:c,children:e})})};Hc.displayName="AddToCart.Tooltip";const Xe={Card:Dc,Content:$c,Footer:Bc,Items:Fc,Modal:qc,Root:zc,Tooltip:Hc},To=({title:e,...t})=>{const{recentlyAddedProducts:r}=xt(),{isMobile:n}=Se(),s=r.length>3?4:r.length,i=r.length>(s??1),a=r.length>1;return o.jsx(Xe.Root,{isMobile:n,count:r.length,component:o.jsx(Xe.Content,{title:e,children:o.jsx(Xe.Items,{thumbnail:a,children:i&&o.jsx(_.Badge.Count,{count:r.length-s,size:"medium",variant:"secondary"})})}),...t})};To.displayName="AddToCart";const ts={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},sp=({children:e,className:t,adornment:r,iconPosition:n,scrollToOptions:s,style:i,...a})=>{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=n&&r?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[n]}:{},p=()=>{window&&window.document.body.scrollTo({...c})};return o.jsx(_.Card,{...a,shadow:!0,padding:"small",className:_.helpers.classNameConcat(ts["card-modifier"],t),style:{...i,padding:0},children:o.jsxs("button",{className:ts["backtotop-btn"],onClick:p,style:{...u},"data-orientation":n,children:[r,e]})})},ip="_container_1sy8s_16",We={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:ip,"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"},ap=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const n=Object.values(e.products).length;return o.jsxs("div",{className:We["add-itens-to-cart-container"],children:[o.jsxs("div",{className:We["add-itens-to-cart-container-values"],children:[o.jsx("div",{className:We["add-itens-to-cart-qty-products"],children:o.jsx("span",{children:n===0?r.BUY_PACKAGE.group_cart.select_all_product:`${n} ${n===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),o.jsx("div",{className:We["add-itens-to-cart-total"],children:o.jsx("span",{children:ae.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),o.jsx(_.Button,{onClick:t,className:We["add-button"],size:"large",disabled:n===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},cp=e=>e.reduce((t,r)=>{var s;const n=t.find(i=>i.node.id===r.node.id);if(!n)return[...t,r];if((s=n==null?void 0:n.node.isVariantOf)!=null&&s.hasVariant){const i=n.node.isVariantOf.hasVariant,a=r.node.isVariantOf.hasVariant;i&&a&&(n.node.isVariantOf.hasVariant=[...i,...a])}return t},[]),lp=({selectedProduct:e,productId:t,prevState:r,mainSellerId:n})=>{const{products:s,totalPrice:i}=r;try{if(!e){const{[t]:u,...p}=s;return{...r,totalPrice:i-u.price,products:p}}const a=ae.getValidOffer(e.offers.offers,n);if(!a)return r;const c=a.seller.identifier,l=a.price;if(s[t]){const{price:u}=s[t];return s[t]={...s[t],price:l,id:e.sku,seller:c},{totalPrice:i+l-u,products:{...s}}}return{totalPrice:i+l,products:{...s,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(a){return console.error("Error handling SKU selection:",a),r}},Uc=x.createContext({}),up=({children:e,item:t,index:r,shelfTitle:n,...s})=>{const[i,a]=x.useState(null),c=x.useRef(null),l=x.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:p}=ge(),h=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:y}})},d=()=>{h("add_to_wishlist")},f=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:i,selectedSkus:[i]},customData:{index:r}}})},m=()=>{n&&(p.current={item_list_name:n}),h("select_item")};return o.jsx(Uc.Provider,{value:x.useMemo(()=>({...s,index:r,item:t,element:c,selectedSku:i,setSelectedSku:a,eventDataRef:l,sendAddToWishlistEvent:d,sendSelectItemEvent:m,sendAddToCartEvent:f}),[s,t,c,i]),children:e})},De=()=>{const e=x.useContext(Uc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},we={"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"},Wc=({callback:e,children:t,className:r,data:n,isKit:s,...i})=>{const{item:{availability:{status:a},image:c}}=De();return a?o.jsxs("div",{...i,className:_.helpers.classNameConcat(we["product-card--actions"],r),children:[o.jsxs(_e.Wrapper,{type:"actions--group",children:[o.jsx(_e.Price,{}),o.jsx("div",{className:we["product-card--actions--selectors"],children:!s&&o.jsx(_e.StyleSelector,{data:n,images:c,callback:e})})]}),t]}):null};Wc.displayName="ProductCard.Actions";const Gc=({className:e,isKit:t,...r})=>{const{addToCart:n}=ze(),{isMobile:s=!1,selectedSku:i,outStock:a,item:c,sendAddToCartEvent:l,CONSTANTS:u}=De(),p=()=>{var f;if(!i)return;const d=ae.getValidOffer(i.offers.offers,u.StoreConfig_MainSellerId);d&&n({id:i==null?void 0:i.sku,quantity:1,seller:d.seller.identifier},{id:c.id,texture:(f=c==null?void 0:c.image.find(m=>u.TEXTURE_IMAGE.includes(m.alternateName)))==null?void 0:f.url}),l()},h=i?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return o.jsx(_.Button,{...r,className:_.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!i&&!a,size:s?"medium":"large",variant:a?"secondary":"primary",onClick:a?r.onClick:p,children:a?"Avise-me quando chegar":h})};Gc.displayName="ProductCard.Actions.BuyButton";const Vc=({product:e,tag:t,size:r="small"})=>{const n=e.offers.offers[0],{CONSTANTS:s,WishListToggle:i}=De();return o.jsxs(_e.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[t?o.jsx(_.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?o.jsx(_.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&o.jsx(i,{product:e,priceInfo:{price:n.price,listPrice:n.listPrice},variant:"card"})]})};Vc.displayName="ProductCard.Actions.Header";var Kc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dp(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var io={exports:{}},Ne={};Ne._=Ne._interop_require_default=fp;function fp(e){return e&&e.__esModule?e:{default:e}}var Tt={exports:{}},pr={},rs;function Xc(){return rs||(rs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){for(var l in c)Object.defineProperty(a,l,{enumerable:!0,get:c[l]})}t(e,{searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return s},assign:function(){return i}});function r(a){const c={};return a.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 n(a){return typeof a=="string"||typeof a=="number"&&!isNaN(a)||typeof a=="boolean"?String(a):""}function s(a){const c=new URLSearchParams;return Object.entries(a).forEach(l=>{let[u,p]=l;Array.isArray(p)?p.forEach(h=>c.append(u,n(h))):c.set(u,n(p))}),c}function i(a){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(p=>{Array.from(p.keys()).forEach(h=>a.delete(h)),p.forEach((h,d)=>a.append(d,h))}),a}}(pr)),pr}var mr={},ct={};function Yc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Yc=function(n){return n?r:t})(e)}ct._=ct._interop_require_wildcard=pp;function pp(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Yc(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}var ns;function Qc(){return ns||(ns=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{formatUrl:function(){return i},urlObjectKeys:function(){return a},formatWithValidation:function(){return c}});const n=ct._(Xc()),s=/https?|ftp|gopher|file/;function i(l){let{auth:u,hostname:p}=l,h=l.protocol||"",d=l.pathname||"",f=l.hash||"",m=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:p&&(y=u+(~p.indexOf(":")?"["+p+"]":p),l.port&&(y+=":"+l.port)),m&&typeof m=="object"&&(m=String(n.urlQueryToSearchParams(m)));let g=l.search||m&&"?"+m||"";return h&&!h.endsWith(":")&&(h+=":"),l.slashes||(!h||s.test(h))&&y!==!1?(y="//"+(y||""),d&&d[0]!=="/"&&(d="/"+d)):y||(y=""),f&&f[0]!=="#"&&(f="#"+f),g&&g[0]!=="?"&&(g="?"+g),d=d.replace(/[?#]/g,encodeURIComponent),g=g.replace("#","%23"),""+h+y+d+g+f}const a=["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=>{a.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),i(l)}}(mr)),mr}var hr={},os;function mp(){return os||(os=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,n){const s={};return Object.keys(r).forEach(i=>{n.includes(i)||(s[i]=r[i])}),s}}(hr)),hr}var gr={},ss;function or(){return ss||(ss=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(S,E){for(var R in E)Object.defineProperty(S,R,{enumerable:!0,get:E[R]})}t(e,{WEB_VITALS:function(){return r},execOnce:function(){return n},isAbsoluteUrl:function(){return i},getLocationOrigin:function(){return a},getURL:function(){return c},getDisplayName:function(){return l},isResSent:function(){return u},normalizeRepeatedSlashes:function(){return p},loadGetInitialProps:function(){return h},SP:function(){return d},ST:function(){return f},DecodeError:function(){return m},NormalizeError:function(){return y},PageNotFoundError:function(){return g},MissingStaticPage:function(){return b},MiddlewareNotFoundError:function(){return j},stringifyError:function(){return v}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(S){let E=!1,R;return function(){for(var C=arguments.length,A=new Array(C),k=0;k<C;k++)A[k]=arguments[k];return E||(E=!0,R=S(...A)),R}}const s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=S=>s.test(S);function a(){const{protocol:S,hostname:E,port:R}=window.location;return S+"//"+E+(R?":"+R:"")}function c(){const{href:S}=window.location,E=a();return S.substring(E.length)}function l(S){return typeof S=="string"?S:S.displayName||S.name||"Unknown"}function u(S){return S.finished||S.headersSent}function p(S){const E=S.split("?");return E[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(E[1]?"?"+E.slice(1).join("?"):"")}async function h(S,E){if(process.env.NODE_ENV!=="production"){var R;if((R=S.prototype)!=null&&R.getInitialProps){const k='"'+l(S)+'.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(k)}}const C=E.res||E.ctx&&E.ctx.res;if(!S.getInitialProps)return E.ctx&&E.Component?{pageProps:await h(E.Component,E.ctx)}:{};const A=await S.getInitialProps(E);if(C&&u(C))return A;if(!A){const k='"'+l(S)+'.getInitialProps()" should resolve to an object. But found "'+A+'" instead.';throw new Error(k)}return process.env.NODE_ENV!=="production"&&Object.keys(A).length===0&&!E.ctx&&console.warn(""+l(S)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),A}const d=typeof performance<"u",f=d&&["mark","measure","getEntriesByName"].every(S=>typeof performance[S]=="function");class m extends Error{}class y extends Error{}class g extends Error{constructor(E){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+E}}class b extends Error{constructor(E,R){super(),this.message="Failed to load static file for page: "+E+" "+R}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(S){return JSON.stringify({message:S.message,stack:S.stack})}}(gr)),gr}var kt={exports:{}},yr={},is;function Zc(){return is||(is=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.replace(/\/$/,"")||"/"}}(yr)),yr}var _r={},as;function ko(){return as||(as=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(r){const n=r.indexOf("#"),s=r.indexOf("?"),i=s>-1&&(n<0||s<n);return i||n>-1?{pathname:r.substring(0,i?s:n),query:i?r.substring(s,n>-1?n:void 0):"",hash:n>-1?r.slice(n):""}:{pathname:r,query:"",hash:""}}}(_r)),_r}var cs;function sr(){return cs||(cs=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return s}});const r=Zc(),n=ko(),s=i=>{if(!i.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return i;const{pathname:a,query:c,hash:l}=(0,n.parsePath)(i);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(a)?""+(0,r.removeTrailingSlash)(a)+c+l:a.endsWith("/")?""+a+c+l:a+"/"+c+l:""+(0,r.removeTrailingSlash)(a)+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)}(kt,kt.exports)),kt.exports}var vr={},Mt={exports:{}},br={},ls;function Jc(){return ls||(ls=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return r}});const t=ko();function r(n,s){if(typeof n!="string")return!1;const{pathname:i}=(0,t.parsePath)(n);return i===s||i.startsWith(s+"/")}}(br)),br}var us;function hp(){return us||(us=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return s}});const r=Jc(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function s(i){return(0,r.pathHasPrefix)(i,n)}(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)}(Mt,Mt.exports)),Mt.exports}var ds;function el(){return ds||(ds=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return n}});const t=or(),r=hp();function n(s){if(!(0,t.isAbsoluteUrl)(s))return!0;try{const i=(0,t.getLocationOrigin)(),a=new URL(s,i);return a.origin===i&&(0,r.hasBasePath)(a.pathname)}catch{return!1}}}(vr)),vr}var xr={},Cr={},fs;function gp(){return fs||(fs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class t{insert(s){this._insert(s.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(s){s===void 0&&(s="/");const i=[...this.children.keys()].sort();this.slugName!==null&&i.splice(i.indexOf("[]"),1),this.restSlugName!==null&&i.splice(i.indexOf("[...]"),1),this.optionalRestSlugName!==null&&i.splice(i.indexOf("[[...]]"),1);const a=i.map(c=>this.children.get(c)._smoosh(""+s+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&a.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+']]").');a.unshift(c)}return this.restSlugName!==null&&a.push(...this.children.get("[...]")._smoosh(s+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&a.push(...this.children.get("[[...]]")._smoosh(s+"[[..."+this.optionalRestSlugName+"]]/")),a}_insert(s,i,a){if(s.length===0){this.placeholder=!1;return}if(a)throw new Error("Catch-all must be the last part of the URL.");let c=s[0];if(c.startsWith("[")&&c.endsWith("]")){let p=function(h,d){if(h!==null&&h!==d)throw new Error("You cannot use different slug names for the same dynamic path ('"+h+"' !== '"+d+"').");i.forEach(f=>{if(f===d)throw new Error('You cannot have the same slug name "'+d+'" repeat within a single dynamic path');if(f.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+f+'" and "'+d+'" differ only by non-word symbols within a single dynamic path')}),i.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),a=!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(a)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]+'" ).');p(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]+'").');p(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+s[0]+'").');p(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),i,a)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(n){const s=new t;return n.forEach(i=>s.insert(i)),s.smoosh()}}(Cr)),Cr}var Sr={},ps;function yp(){return ps||(ps=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return r}});const t=/\/\[[^/]+?\](?=\/|$)/;function r(n){return t.test(n)}}(Sr)),Sr}var ms;function _p(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,i){for(var a in i)Object.defineProperty(s,a,{enumerable:!0,get:i[a]})}t(e,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return n.isDynamicRoute}});const r=gp(),n=yp()}(xr)),xr}var jr={},Er={},hs;function vp(){return hs||(hs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=or();function r(n){let{re:s,groups:i}=n;return a=>{const c=s.exec(a);if(!c)return!1;const l=p=>{try{return decodeURIComponent(p)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(i).forEach(p=>{const h=i[p],d=c[h.pos];d!==void 0&&(u[p]=~d.indexOf("/")?d.split("/").map(f=>l(f)):h.repeat?[l(d)]:l(d))}),u}}}(Er)),Er}var wr={},Rr={},Ar={},Pr={},gs;function bp(){return gs||(gs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.startsWith("/")?r:"/"+r}}(Pr)),Pr}var Ir={},ys;function xp(){return ys||(ys=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isGroupSegment",{enumerable:!0,get:function(){return t}});function t(r){return r[0]==="("&&r.endsWith(")")}}(Ir)),Ir}var _s;function Cp(){return _s||(_s=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){for(var l in c)Object.defineProperty(a,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return s},normalizeRscPath:function(){return i}});const r=bp(),n=xp();function s(a){return(0,r.ensureLeadingSlash)(a.split("/").reduce((c,l,u,p)=>!l||(0,n.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===p.length-1?c:c+"/"+l,""))}function i(a,c){return c?a.replace(/\.rsc($|\?)/,"$1"):a}}(Ar)),Ar}var vs;function Sp(){return vs||(vs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){for(var l in c)Object.defineProperty(a,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return n},isInterceptionRouteAppPath:function(){return s},extractInterceptionRouteInformation:function(){return i}});const r=Cp(),n=["(..)(..)","(.)","(..)","(...)"];function s(a){return a.split("/").find(c=>n.find(l=>c.startsWith(l)))!==void 0}function i(a){let c,l,u;for(const p of a.split("/"))if(l=n.find(h=>p.startsWith(h)),l){[c,u]=a.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${a}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,r.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${a}. 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 p=c.split("/");if(p.length<=2)throw new Error(`Invalid interception route: ${a}. Cannot use (..)(..) marker at the root level or one level up.`);u=p.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(Rr)),Rr}var Nr={},bs;function jp(){return bs||(bs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return n}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function n(s){return t.test(s)?s.replace(r,"\\$&"):s}}(Nr)),Nr}var xs;function Ep(){return xs||(xs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,g){for(var b in g)Object.defineProperty(y,b,{enumerable:!0,get:g[b]})}t(e,{getRouteRegex:function(){return u},getNamedRouteRegex:function(){return f},getNamedMiddlewareRegex:function(){return m}});const r=Sp(),n=jp(),s=Zc(),i="nxtP",a="nxtI";function c(y){const g=y.startsWith("[")&&y.endsWith("]");g&&(y=y.slice(1,-1));const b=y.startsWith("...");return b&&(y=y.slice(3)),{key:y,repeat:b,optional:g}}function l(y){const g=(0,s.removeTrailingSlash)(y).slice(1).split("/"),b={};let j=1;return{parameterizedRoute:g.map(v=>{const S=r.INTERCEPTION_ROUTE_MARKERS.find(R=>v.startsWith(R)),E=v.match(/\[((?:\[.*\])|.+)\]/);if(S&&E){const{key:R,optional:C,repeat:A}=c(E[1]);return b[R]={pos:j++,repeat:A,optional:C},"/"+(0,n.escapeStringRegexp)(S)+"([^/]+?)"}else if(E){const{key:R,repeat:C,optional:A}=c(E[1]);return b[R]={pos:j++,repeat:C,optional:A},C?A?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,n.escapeStringRegexp)(v)}).join(""),groups:b}}function u(y){const{parameterizedRoute:g,groups:b}=l(y);return{re:new RegExp("^"+g+"(?:/)?$"),groups:b}}function p(){let y=0;return()=>{let g="",b=++y;for(;b>0;)g+=String.fromCharCode(97+(b-1)%26),b=Math.floor((b-1)/26);return g}}function h(y){let{getSafeRouteKey:g,segment:b,routeKeys:j,keyPrefix:v}=y;const{key:S,optional:E,repeat:R}=c(b);let C=S.replace(/\W/g,"");v&&(C=""+v+C);let A=!1;return(C.length===0||C.length>30)&&(A=!0),isNaN(parseInt(C.slice(0,1)))||(A=!0),A&&(C=g()),v?j[C]=""+v+S:j[C]=""+S,R?E?"(?:/(?<"+C+">.+?))?":"/(?<"+C+">.+?)":"/(?<"+C+">[^/]+?)"}function d(y,g){const b=(0,s.removeTrailingSlash)(y).slice(1).split("/"),j=p(),v={};return{namedParameterizedRoute:b.map(S=>{const E=r.INTERCEPTION_ROUTE_MARKERS.some(C=>S.startsWith(C)),R=S.match(/\[((?:\[.*\])|.+)\]/);return E&&R?h({getSafeRouteKey:j,segment:R[1],routeKeys:v,keyPrefix:g?a:void 0}):R?h({getSafeRouteKey:j,segment:R[1],routeKeys:v,keyPrefix:g?i:void 0}):"/"+(0,n.escapeStringRegexp)(S)}).join(""),routeKeys:v}}function f(y,g){const b=d(y,g);return{...u(y),namedRegex:"^"+b.namedParameterizedRoute+"(?:/)?$",routeKeys:b.routeKeys}}function m(y,g){const{parameterizedRoute:b}=l(y),{catchAll:j=!0}=g;if(b==="/")return{namedRegex:"^/"+(j?".*":"")+"$"};const{namedParameterizedRoute:v}=d(y,!1);let S=j?"(?:(/.*)?)":"";return{namedRegex:"^"+v+S+"$"}}}(wr)),wr}var Cs;function wp(){return Cs||(Cs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return n}});const t=vp(),r=Ep();function n(s,i,a){let c="";const l=(0,r.getRouteRegex)(s),u=l.groups,p=(i!==s?(0,t.getRouteMatcher)(l)(i):"")||a;c=s;const h=Object.keys(u);return h.every(d=>{let f=p[d]||"";const{repeat:m,optional:y}=u[d];let g="["+(m?"...":"")+d+"]";return y&&(g=(f?"":"/")+"["+g+"]"),m&&!Array.isArray(f)&&(f=[f]),(y||d in p)&&(c=c.replace(g,m?f.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(f))||"/")})||(c=""),{params:h,result:c}}}(jr)),jr}var Ss;function Rp(){return Ss||(Ss=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return p}});const r=Xc(),n=Qc(),s=mp(),i=or(),a=sr(),c=el(),l=_p(),u=wp();function p(h,d,f){let m,y=typeof d=="string"?d:(0,n.formatWithValidation)(d);const g=y.match(/^[a-zA-Z]{1,}:\/\//),b=g?y.slice(g[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 v=(0,i.normalizeRepeatedSlashes)(b);y=(g?g[0]:"")+v}if(!(0,c.isLocalURL)(y))return f?[y]:y;try{m=new URL(y.startsWith("#")?h.asPath:h.pathname,"http://n")}catch{m=new URL("/","http://n")}try{const v=new URL(y,m);v.pathname=(0,a.normalizePathTrailingSlash)(v.pathname);let S="";if((0,l.isDynamicRoute)(v.pathname)&&v.searchParams&&f){const R=(0,r.searchParamsToUrlQuery)(v.searchParams),{result:C,params:A}=(0,u.interpolateAs)(v.pathname,v.pathname,R);C&&(S=(0,n.formatWithValidation)({pathname:C,hash:v.hash,query:(0,s.omit)(R,A)}))}const E=v.origin===m.origin?v.href.slice(v.origin.length):v.href;return f?[E,S||E]:E}catch{return f?[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)}(Tt,Tt.exports)),Tt.exports}var Lt={exports:{}},Or={},Tr={},js;function tl(){return js||(js=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return r}});const t=ko();function r(n,s){if(!n.startsWith("/")||!s)return n;const{pathname:i,query:a,hash:c}=(0,t.parsePath)(n);return""+s+i+a+c}}(Tr)),Tr}var Es;function Ap(){return Es||(Es=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return n}});const t=tl(),r=Jc();function n(s,i,a,c){if(!i||i===a)return s;const l=s.toLowerCase();return!c&&((0,r.pathHasPrefix)(l,"/api")||(0,r.pathHasPrefix)(l,"/"+i.toLowerCase()))?s:(0,t.addPathPrefix)(s,"/"+i)}}(Or)),Or}var ws;function Pp(){return ws||(ws=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const r=sr(),n=function(s){for(var i=arguments.length,a=new Array(i>1?i-1:0),c=1;c<i;c++)a[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(Ap().addLocale(s,...a)):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)}(Lt,Lt.exports)),Lt.exports}var kr={},Rs;function rl(){return Rs||(Rs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return n}});const n=Ne._(x).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="RouterContext")}(kr)),kr}var Mr={},As;function Ip(){return As||(As=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,p){for(var h in p)Object.defineProperty(u,h,{enumerable:!0,get:p[h]})}t(e,{CacheStates:function(){return s},AppRouterContext:function(){return i},LayoutRouterContext:function(){return a},GlobalLayoutRouterContext:function(){return c},TemplateContext:function(){return l}});const n=Ne._(x);var s;(function(u){u.LAZY_INITIALIZED="LAZYINITIALIZED",u.DATA_FETCH="DATAFETCH",u.READY="READY"})(s||(s={}));const i=n.default.createContext(null),a=n.default.createContext(null),c=n.default.createContext(null),l=n.default.createContext(null);process.env.NODE_ENV!=="production"&&(i.displayName="AppRouterContext",a.displayName="LayoutRouterContext",c.displayName="GlobalLayoutRouterContext",l.displayName="TemplateContext")}(Mr)),Mr}var Dt={exports:{}},$t={exports:{}},Ps;function nl(){return Ps||(Ps=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(i,a){for(var c in a)Object.defineProperty(i,c,{enumerable:!0,get:a[c]})}r(t,{requestIdleCallback:function(){return n},cancelIdleCallback:function(){return s}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(i){let a=Date.now();return self.setTimeout(function(){i({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-a))}})},1)},s=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(i){return clearTimeout(i)};(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)}($t,$t.exports)),$t.exports}var Is;function Np(){return Is||(Is=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=x,n=nl(),s=typeof IntersectionObserver=="function",i=new Map,a=[];function c(p){const h={root:p.root||null,margin:p.rootMargin||""},d=a.find(g=>g.root===h.root&&g.margin===h.margin);let f;if(d&&(f=i.get(d),f))return f;const m=new Map,y=new IntersectionObserver(g=>{g.forEach(b=>{const j=m.get(b.target),v=b.isIntersecting||b.intersectionRatio>0;j&&v&&j(v)})},p);return f={id:h,observer:y,elements:m},a.push(h),i.set(h,f),f}function l(p,h,d){const{id:f,observer:m,elements:y}=c(d);return y.set(p,h),m.observe(p),function(){if(y.delete(p),m.unobserve(p),y.size===0){m.disconnect(),i.delete(f);const b=a.findIndex(j=>j.root===f.root&&j.margin===f.margin);b>-1&&a.splice(b,1)}}}function u(p){let{rootRef:h,rootMargin:d,disabled:f}=p;const m=f||!s,[y,g]=(0,r.useState)(!1),b=(0,r.useRef)(null),j=(0,r.useCallback)(S=>{b.current=S},[]);(0,r.useEffect)(()=>{if(s){if(m||y)return;const S=b.current;if(S&&S.tagName)return l(S,R=>R&&g(R),{root:h==null?void 0:h.current,rootMargin:d})}else if(!y){const S=(0,n.requestIdleCallback)(()=>g(!0));return()=>(0,n.cancelIdleCallback)(S)}},[m,d,h,y,b.current]);const v=(0,r.useCallback)(()=>{g(!1)},[]);return[j,y,v]}(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)}(Dt,Dt.exports)),Dt.exports}var Bt={exports:{}},Ft={exports:{}},Lr={},Ns;function Op(){return Ns||(Ns=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(r,n){let s;const i=r.split("/");return(n||[]).some(a=>i[1]&&i[1].toLowerCase()===a.toLowerCase()?(s=a,i.splice(1,1),r=i.join("/")||"/",!0):!1),{pathname:r,detectedLocale:s}}}(Lr)),Lr}var Os;function Tp(){return Os||(Os=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(n,s)=>process.env.__NEXT_I18N_SUPPORT?Op().normalizeLocalePath(n,s):{pathname:n,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)}(Ft,Ft.exports)),Ft.exports}var qt={exports:{}},Dr={},Ts;function kp(){return Ts||(Ts=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(r,n,s){if(r){s&&(s=s.toLowerCase());for(const c of r){var i,a;const l=(i=c.domain)==null?void 0:i.split(":")[0].toLowerCase();if(n===l||s===c.defaultLocale.toLowerCase()||(a=c.locales)!=null&&a.some(u=>u.toLowerCase()===s))return c}}}}(Dr)),Dr}var ks;function Mp(){return ks||(ks=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];if(process.env.__NEXT_I18N_SUPPORT)return kp().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)}(qt,qt.exports)),qt.exports}var Ms;function Lp(){return Ms||(Ms=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return s}});const r=sr(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function s(i,a,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=Tp().normalizeLocalePath,p=Mp().detectDomainLocale,h=a||u(i,c).detectedLocale,d=p(l,void 0,h);if(d){const f="http"+(d.http?"":"s")+"://",m=h===d.defaultLocale?"":"/"+h;return""+f+d.domain+(0,r.normalizePathTrailingSlash)(""+n+m+i)}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)}(Bt,Bt.exports)),Bt.exports}var zt={exports:{}},Ls;function Dp(){return Ls||(Ls=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return i}});const r=tl(),n=sr(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function i(a,c){return(0,n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?a:(0,r.addPathPrefix)(a,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)}(zt,zt.exports)),zt.exports}var Ht={exports:{}},Ds;function $p(){return Ds||(Ds=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,d){for(var f in d)Object.defineProperty(h,f,{enumerable:!0,get:d[f]})}r(t,{PrefetchKind:function(){return p},ACTION_REFRESH:function(){return n},ACTION_NAVIGATE:function(){return s},ACTION_RESTORE:function(){return i},ACTION_SERVER_PATCH:function(){return a},ACTION_PREFETCH:function(){return c},ACTION_FAST_REFRESH:function(){return l},ACTION_SERVER_ACTION:function(){return u}});const n="refresh",s="navigate",i="restore",a="server-patch",c="prefetch",l="fast-refresh",u="server-action";var p;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(p||(p={})),(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)}(Ht,Ht.exports)),Ht.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});const n=Ne._(x),s=Rp(),i=el(),a=Qc(),c=or(),l=Pp(),u=rl(),p=Ip(),h=Np(),d=Lp(),f=Dp(),m=$p(),y=new Set;function g(R,C,A,k,w,N){if(typeof window>"u"||!N&&!(0,i.isLocalURL)(C))return;if(!k.bypassPrefetchedCheck){const B=typeof k.locale<"u"?k.locale:"locale"in R?R.locale:void 0,O=C+"%"+A+"%"+B;if(y.has(O))return;y.add(O)}const I=N?R.prefetch(C,w):R.prefetch(C,A,k);Promise.resolve(I).catch(B=>{if(process.env.NODE_ENV!=="production")throw B})}function b(R){const A=R.currentTarget.getAttribute("target");return A&&A!=="_self"||R.metaKey||R.ctrlKey||R.shiftKey||R.altKey||R.nativeEvent&&R.nativeEvent.which===2}function j(R,C,A,k,w,N,I,B,O,H){const{nodeName:U}=R.currentTarget;if(U.toUpperCase()==="A"&&(b(R)||!O&&!(0,i.isLocalURL)(A)))return;R.preventDefault();const V=()=>{const W=I??!0;"beforePopState"in C?C[w?"replace":"push"](A,k,{shallow:N,locale:B,scroll:W}):C[w?"replace":"push"](k||A,{forceOptimisticNavigation:!H,scroll:W})};O?n.default.startTransition(V):V()}function v(R){return typeof R=="string"?R:(0,a.formatUrl)(R)}const E=n.default.forwardRef(function(C,A){let k;const{href:w,as:N,children:I,prefetch:B=null,passHref:O,replace:H,shallow:U,scroll:z,locale:V,onClick:W,onMouseEnter:F,onTouchStart:Z,legacyBehavior:P=!1,...T}=C;k=I,P&&(typeof k=="string"||typeof k=="number")&&(k=n.default.createElement("a",null,k));const D=n.default.useContext(u.RouterContext),K=n.default.useContext(p.AppRouterContext),re=D??K,J=!D,L=B!==!1,ee=B===null?m.PrefetchKind.AUTO:m.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let se=function(oe){return new Error("Failed prop type: The prop `"+oe.key+"` expects a "+oe.expected+" in `<Link>`, but got `"+oe.actual+"` instead."+(typeof window<"u"?`
|
|
1
|
+
"use strict";var Ju=Object.defineProperty;var ed=(e,t,r)=>t in e?Ju(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fr=(e,t,r)=>ed(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),x=require("react"),ae=require("./index-BYY2x6mQ.js"),rt=require("idb-keyval"),Ze=require("zustand"),Jn=require("js-cookie"),_=require("@soma-vertical-web/core-components"),_t=require("axios"),td=require("jose"),st=require("@soma-vertical-web/foundations"),ua=require("react-dom"),$e=require("draft-js"),Yo=require("@date-fns/tz"),vo=x.createContext({}),rd=({data:e,children:t})=>o.jsx(vo.Provider,{value:{tags:e==null?void 0:e.config},children:t}),bo=()=>{const{tags:e}=x.useContext(vo),t=x.useCallback(r=>{var a,c,l,u;const n=(c=(a=e==null?void 0:e.commercial)==null?void 0:a.items)==null?void 0:c.find(p=>{var h;return(h=r??[])==null?void 0:h.find(d=>d.id===p.key)}),s=(u=(l=e==null?void 0:e.institucional)==null?void 0:l.items)==null?void 0:u.find(p=>{var h;return(h=r??[])==null?void 0:h.find(d=>d.id===p.key)}),i=e==null?void 0:e.flagPdp;return{commercial:n,institucional:s,flagPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},da=({gridScrollBack:e})=>{x.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},fa=x.createContext({}),nd=({children:e,gridScrollBack:t})=>{const r=x.useRef(null);return da({gridScrollBack:t}),o.jsx(fa.Provider,{value:{sizesContainerRef:r},children:e})},od=()=>{const e=x.useContext(fa);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},Ue=({event:e,data:t})=>{const r=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&r.push({ecommerce:null}),r.push({...e&&{event:`custom_${e}`},...t})},be={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:r,commonData:n,customData:s,promotionInfo:i,itemList:a,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:p}=n,h={...r==="view_item"?{currency:be.configs.currency,value:p,grade_disponivel:l??(u?pa(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:p,currency:be.configs.currency}:{}},d=Ot({data:n,customData:{...s,...a,...i},configs:be.configs});Ue({event:r,data:{...c,ecommerce:{...a,...h,items:[d]}}}),typeof t=="function"&&t(d,h)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:n,outsideEcommerceData:s,customData:i}=e;if(t.length===0)return;const a=t.map(({node:c},l)=>Ot({data:{...c},customData:{...r,index:l,...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n},configs:be.configs}));Ue({event:"view_item_list",data:{...s,ecommerce:{...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n,items:a}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:n,supportData:{selectedSkus:s,price:i},promotionInfo:a,itemList:c,outsideEcommerceData:l}=e;let u=0;const p=r.map(h=>{var y,g,b,j,v,S,E,R,C;const d=s==null?void 0:s.find(A=>(h.productId??h.id)===A.productId);let f={...a,...c};if(d){const A=ha(),k=ga(A,d);k&&(f={...f,...k}),t==="add_to_cart"&&(a||c)&&eo({persistedData:A,type:"add",sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku),newData:{promotionInfo:a,itemList:c}}),t==="remove_from_cart"&&eo({persistedData:A,type:"remove",sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku)})}u+=h.price??((b=(g=(y=d==null?void 0:d.offers)==null?void 0:y.offers)==null?void 0:g[0])==null?void 0:b.price)??0;const m=(d==null?void 0:d.size)??ae.getColorAndSizeFromSkuName((d==null?void 0:d.skuName)??(d==null?void 0:d.name)??((j=h.itemOffered)==null?void 0:j.skuName),be.configs.NAME_SPLIT_SYMBOL).size;return Ot({data:h,customData:{...n,...f??{...a,...c},item_sku:(d==null?void 0:d.id)??(d==null?void 0:d.sku)??((v=h.itemOffered)==null?void 0:v.sku),quantity:(n==null?void 0:n.quantity)??h.quantity??1,item_variant2:m,seller_id:(d==null?void 0:d.sellerId)??(d==null?void 0:d.seller)??((C=(R=(E=(S=d==null?void 0:d.offers)==null?void 0:S.offers)==null?void 0:E[0])==null?void 0:R.seller)==null?void 0:C.identifier)??h.seller},configs:be.configs})});Ue({event:t,data:{...l,ecommerce:{value:i??u,currency:be.configs.currency,items:p}}})},filterEvent:e=>{var a;const{commonData:t,customData:r,outsideEcommerceData:n}=e,s={},i={};Array.isArray(t==null?void 0:t.selectedFacets)&&((a=t==null?void 0:t.selectedFacets)!=null&&a.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var h;const u=((h=be.configs.PLP_FILTERS.find(d=>d.key===c))==null?void 0:h.eventLabel)??c,p=(s==null?void 0:s[u])||[];u==="price_range"&&l.replace(":","-"),s[u]=[...p,l]}),Object.keys(s).forEach(c=>i[c]=s[c].join(", "))),Ue({event:"filter",data:{...n,...i,...r}})},viewCartEvent:e=>{var p,h,d,f,m,y,g,b,j,v;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:n}=t;if(!n)return;const s=window.localStorage.getItem("persistedCartEventsData"),i=s?JSON.parse(s):{},a=n.items.map(S=>{const{promotionInfo:E,itemList:R}=i[S.id]??{};return Ot({data:{...S,price:S.price/100,listPrice:S.listPrice/100},customData:{...E,...R,item_sku:S.id??S.itemOffered.sku,quantity:S.quantity??1},configs:be.configs})}),c=(((p=n.totalizers.find(S=>S.name==="Total dos Itens"))==null?void 0:p.value)??0)/100,l=(((h=n.totalizers.find(S=>S.name==="Total dos Descontos"))==null?void 0:h.value)??0)/100,u=((d=n.marketingData)==null?void 0:d.utmiCampaign)===be.configs.VENDOR_CODE?(f=n.marketingData)==null?void 0:f.utmCampaign:(y=String((m=n.openTextField)==null?void 0:m.value))==null?void 0:y.split(" - ")[0];Ue({event:"view_cart",data:{...r,ecommerce:{currency:be.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(g=n.shippingData)==null?void 0:g.address)!=null&&b.postalCode),...u?{seller_coupon_name:u}:{},...((j=n.marketingData)==null?void 0:j.coupon)&&{sale_coupon_name:(v=n.marketingData)==null?void 0:v.coupon},subtotal:c,items:a}}})},readyEvents:e=>{const{event:t,readyData:r}=e;Ue({event:t,data:{...r}})}},pa=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),sd=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(be.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},Ot=({data:e,customData:t,configs:r})=>({...id(e,r==null?void 0:r.MAIN_IMAGE),...ad(e),...cd(e),...ld(e),...t}),ma=()=>{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("_"))??[]:[]},ha=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},ga=(e,t)=>e==null?void 0:e[t],eo=({persistedData:e,type:t,sku:r,newData:n})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:n}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:n}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},id=(e,t="1")=>{var i,a,c,l,u,p,h,d,f,m,y;const r=e.productReference??e.gtin??e.productRefId,n=e.image??((a=(i=e.items)==null?void 0:i[0])==null?void 0:a.images)??((c=e.itemOffered)==null?void 0:c.image),s=n==null?void 0:n.find(g=>g.alternateName===t||g.imageLabel===t||g.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((h=(p=e.itemOffered)==null?void 0:p.isVariationOf)==null?void 0:h.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??ae.splitNameAndSizeFromFullName((d=e.itemOffered)==null?void 0:d.name,be.configs.NAME_SPLIT_SYMBOL).name,item_brand:((f=e.brand)==null?void 0:f.brandName)??((m=e.brand)==null?void 0:m.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${be.configs.storeUrl}${e.linkText}/p`,item_image:(s==null?void 0:s.url)??(s==null?void 0:s.imageUrl)}},Qo=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,ad=e=>{var u,p;const{categories:t,categoriesIds:r}=e,n=t??((u=e.itemOffered)==null?void 0:u.categories),s=r??((p=e.itemOffered)==null?void 0:p.categoriesIds),i=Qo(n),a=Qo(s),c=i.slice(1,-1).split("/"),l=a.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(be.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]}}},cd=e=>{var s,i,a,c,l,u;const t=((s=e.itemOffered)==null?void 0:s.skuName)??((c=(a=(i=e.isVariantOf)==null?void 0:i.hasVariant)==null?void 0:a[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:r,size:n}=ae.getColorAndSizeFromSkuName(t,be.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:n}}},ld=e=>{var l,u;const{price:t,listPrice:r,installments:n}=e,s=t??((l=e.offers)==null?void 0:l.lowPrice)??0,i=r??((u=e.offers)==null?void 0:u.highPrice)??0,a=i?i-s:0,c=a%1===0?a:Number(a.toFixed(2));return{...t&&{price:s??i},...i&&{list_price:i,discount:c},...n&&{installments:n==null?void 0:n.count,installment_value:n==null?void 0:n.value},item_currency:be.configs.currency}},ya=()=>{const[e,t]=ma(),[r,n]=e.split("-"),s=r.includes("shop")||r.includes("sale")?r:"";return{page_category:s&&n?n:"",page_departament:s,id:t,name:e}},ud=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:be,findDataInPersistedData:ga,getAvailablesSizes:pa,getCategories:sd,getPageCategoryAndDepartmentFromSlug:ya,getPersistedData:ha,getProductListInfoFromHead:ma,pushDatalayer:Ue,updatePersistedData:eo},Symbol.toStringTag,{value:"Module"})),_a=x.createContext({}),dd=({children:e,evtFunctionsConfigs:t})=>{const r=x.useRef({}),n=x.useRef(null),s=x.useRef(null),i=x.useRef({}),a=x.useRef({trigger:!1,index:0}),c=({functionKey:p,data:h,callBack:d,timeout:f=100})=>{window.dataLayer||(window.dataLayer=[]),be.configs=t;try{typeof be[p]=="function"&&setTimeout(()=>{var m;h.promotionInfo=r.current,(m=s.current)!=null&&m.item_list_name&&(h.itemList=s.current),be[p](h,d)},f)}catch(m){Ue({event:"error_event",data:{error_message:(m==null?void 0:m.message)??m}})}},l=({content:p})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:p.replace("::",":")}}})},u=({updatePromotionRef:p,promotion:h,index:d})=>{p&&(r.current={...h}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...h,...d!==void 0&&{index:d}}}}})};return o.jsx(_a.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:a,promotionEventRef:r,currentLocalRef:n,itemListRef:s,cartProductsFullDataRef:i,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ge=()=>x.useContext(_a),va=x.createContext({}),fd=({children:e,productData:t,isKit:r,PDP_INFO:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:i})=>{var O,H;const{sendDataLayerEvent:a,triggerSelectItemEventRef:c}=ge(),{productId:l,productName:u,items:p,items:[{images:h,Videos:d}],description:f,["Composição"]:m="",productReference:y,categories:[g]}=t,{getAvailableProductTag:b}=bo(),j=b(Object.entries(t.clusterHighlights).map(U=>({id:U[0],name:U[1]}))),v=g.slice(1,-1).split("/"),{installments:S,price:E,listPrice:R,sizes:C,allSizesAvailable:A}=ae.getSkuInfos({items:p,NAME_SPLIT_SYMBOL:s}),k=ae.getThumbImage({images:h,TEXTURE_IMAGE:i}),w=[{label:`${n.product.description}`,value:"description",content:f},{label:`${n.product.materiais}`,value:"composition",content:m}],N=((H=ae.getColorAndSizeFromSkuName((O=t.items)==null?void 0:O[0].name,s))==null?void 0:H.color)??t["Cores Filtráveis"][0]??"",I=()=>({commonData:{...t,sizes:C,price:E,listPrice:R,installments:S},customData:{installments:S==null?void 0:S.count,installment_value:Number(S==null?void 0:S.value).toFixed(2)}}),B=({sku:U,size:z})=>{const{commonData:V,customData:W}=I();a({functionKey:"productEvents",data:{event:"view_item",commonData:V,customData:{...W,...U&&{item_sku:U},...z&&{item_variant2:z}}}})};return x.useEffect(()=>{if(c.current.trigger){const{commonData:U,customData:z}=I();a({functionKey:"productEvents",data:{event:"select_item",commonData:U,customData:{...z,index:c.current.index}}}),c.current.trigger=!1}B({})},[]),o.jsx(va.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:j,items:p,sizes:C,allSizesAvailable:A,installments:S,price:E,listPrice:R,thumbImage:k,images:h,video:d[0],descriptionContent:w,breadcrumbList:v,isKit:r,colorName:N,handleViewItemEvent:B},children:e})},xo=()=>{const e=x.useContext(va);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},pd=()=>{const[e,t]=x.useState(null);return[e,async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),t(n),!0}catch(s){return console.warn("Copy failed",s),t(null),!1}}]},md=()=>{x.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)}},[])},hd=typeof window>"u",gd=(e,t)=>{const[r,n]=x.useState(()=>{if(hd)return null;const i=localStorage.getItem(e);return i===null?t:JSON.parse(i||"{}")});return x.useEffect(()=>{const i=a=>{a.storageArea===localStorage&&a.key===e&&n(JSON.parse(a.newValue))};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[e,t]),[r,i=>{n(a=>{const c=typeof i=="function"?i(a):i;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function ba(e,t,r){const[n,s]=x.useState(!1),{threshold:i}=r||{};return x.useEffect(()=>{if(!e.current)return()=>null;let a=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){a&&clearTimeout(a),a=setTimeout(()=>{s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.delay);return}s(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:i||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),n}const yd=({callback:e,onEnterViewportOnce:t,options:r})=>{const n=x.useRef(null);return x.useEffect(()=>{const s=n.current;if(!s)return;const i=new IntersectionObserver(([a])=>{a.isIntersecting&&typeof e=="function"&&(e(),t&&(i.unobserve(s),i.disconnect()))},r);return i.observe(s),()=>{t&&i.unobserve(s),i.disconnect()}},[e,t,r]),{element:n}},_d=({defaultScale:e=1,maxScale:t=3})=>{const r=x.useRef(null),n=x.useRef(null),[s,i]=x.useState(e),a=x.useRef(0),c=x.useRef({x:0,y:0}),l=x.useRef({x:0,y:0}),u=()=>{if(!n.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const f=r.current.getBoundingClientRect(),m=n.current.children[0].getBoundingClientRect(),y=m.width,g=m.height,b=Math.min(0,(f.width-y)/2),j=Math.max(0,(y-f.width)/2),v=Math.min(0,(f.height-g)/2),S=Math.max(0,(g-f.height)/2);return{minX:b,maxX:j,minY:v,maxY:S}},p=(f,m,y)=>{if(n.current){const g=n.current.children[0];g&&requestAnimationFrame(()=>{g.style.transform=`translate(calc(-50% + ${f}px), calc(-50% + ${m}px)) scale(${y})`})}},h=x.useCallback(f=>{const{minX:m,maxX:y,minY:g,maxY:b}=u(),{x:j,y:v}=l.current,S=Math.max(m,Math.min(y,j)),E=Math.max(g,Math.min(b,v));if(f.touches.length>1){const R=f.touches[0],C=f.touches[1],A=R.pageX-C.pageX,k=R.pageY-C.pageY;a.current=Math.sqrt(A*A+k*k),c.current={x:(R.pageX+C.pageX)/2,y:(R.pageY+C.pageY)/2}}else f.touches.length===1&&(c.current={x:f.touches[0].pageX-S,y:f.touches[0].pageY-E})},[s,l]),d=x.useCallback(f=>{if(!n.current||!r.current)return;const{minX:m,maxX:y,minY:g,maxY:b}=u();if(f.touches.length>1){f.preventDefault();const j=f.touches[0],v=f.touches[1],S=j.pageX-v.pageX,E=j.pageY-v.pageY,R=Math.sqrt(S*S+E*E);if(!a.current){a.current=R;return}const C=R/a.current,A=Math.max(1,Math.min(t,s*C));if(s===A)return;i(A);const k=(j.pageX+v.pageX)/2,w=(j.pageY+v.pageY)/2;let N=k-c.current.x,I=w-c.current.y;N=Math.max(m,Math.min(y,N)),I=Math.max(g,Math.min(b,I)),l.current={x:N,y:I},a.current=R,p(N,I,A)}else if(f.touches.length===1){const j=f.touches[0].pageX,v=f.touches[0].pageY;let S=j-c.current.x,E=v-c.current.y;S=Math.max(m,Math.min(y,S)),E=Math.max(g,Math.min(b,E)),l.current={x:S,y:E},p(S,E,s)}},[t,s]);return x.useEffect(()=>(document.addEventListener("touchstart",h),document.addEventListener("touchmove",d,{passive:!1}),()=>{document.removeEventListener("touchstart",h),document.removeEventListener("touchmove",d)}),[d,h]),{containerRef:r,imgRef:n,scale:s}},vd={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},ke=Promise.resolve(!1),to={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>ke,addItem:()=>ke,addSellerCode:()=>ke,addMarketingData:()=>ke,emptyCart:()=>{},removeItem:()=>ke,setIsOpen:()=>{},shipping:()=>ke,shippingUpdate:()=>ke,toggleServiceToProduct:()=>ke,updateItemQuantity:()=>ke,insertProfileEmail:()=>ke,setRecentlyAddedProducts:()=>{}},Co=e=>e===0,xa=(e,t)=>{if(!e||e.length===0)return[];let r="";const n=[],s=e.match(/\d+/g)??[];for(const i of s){const a=t[Number(i)];a&&(r+=(r?"/":"")+a,n.push(r))}return n},Ca=(e,t)=>{const{availability:r,additionalInfo:{brandName:n},bundleItems:s,id:i,uniqueId:a,detailUrl:c,ean:l,imageUrl:u,name:p,listPrice:h,quantity:d,price:f,priceDefinition:m,productCategories:y,productCategoryIds:g,productId:b,refId:j,seller:v,referenceId:S,offerings:E,productRefId:R,skuName:C,sellingPrice:A}=e;return{availability:r,bundleItems:s,referenceId:S,productRefId:R,id:i,ean:l,uniqueId:a,itemOffered:{additionalProperty:[],brand:{name:n},categories:xa(g,y),categoriesIds:g,gtin:j,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:p,isVariationOf:{name:p,productGroupID:b},sku:i,slug:c,skuName:C},listPrice:h,quantity:d,offerings:E,price:f,priceDefinition:m,sellingPrice:A,seller:v}},Sa=(e,t)=>{const r=e.map(n=>({id:n.id,quantity:n.quantity,seller:n.seller}));return Array.isArray(t)?[...r,...t]:[...r,t]},ja=(e,t)=>{const r=e.find(n=>n.id===t);if(r){const n=e.map((s,i)=>{var a,c;return{id:((a=s.itemOffered)==null?void 0:a.sku)??"",index:i,quantity:(r==null?void 0:r.id)===((c=s.itemOffered)==null?void 0:c.sku)?0:s.quantity,seller:s.seller??""}});return{updateItems:n,filterItems:n.filter(s=>s.id!==t)}}return{updateItems:[],filterItems:[]}},Ea=(e,t,r)=>e.filter(n=>n.availability!=="withoutStock"&&n.availability!=="https://schema.org/OutOfStock").map((n,s)=>{var i,a;return n.id===t?{id:n.id,index:s,quantity:r,seller:n.seller,sku:((i=n.itemOffered)==null?void 0:i.sku)??""}:{id:n.id,index:s,quantity:n.quantity,seller:n.seller,sku:((a=n.itemOffered)==null?void 0:a.sku)??""}}),ro=(e,t)=>e.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===t),bd=(e,t)=>{var r;return Array.isArray(e)?(((r=e==null?void 0:e.find(n=>{var s;return((s=n==null?void 0:n.id)==null?void 0:s.toLowerCase())===t}))==null?void 0:r.value)??0)/100:0},xd=e=>{const t=e.reduce((s,i)=>{const a=Co(i.price)?0:i.quantity;return s+a},0),r=e.reduce((s,i)=>s+i.price*i.quantity,0),n=e.reduce((s,i)=>s+i.listPrice*i.quantity,0);return{totalItems:t,total:r,subTotal:n}},Cd=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,r)=>t+(Co(r==null?void 0:r.price)?0:r.quantity),0):0,wa=(e,t)=>{const{items:r,itemMetadata:n,marketingData:s,messages:i,orderFormId:a,openTextField:c,paymentData:l,shippingData:u,totalizers:p}=e;return{id:a,itemMetadata:n,items:Array.isArray(r)?r.map(h=>Ca(h,t)):[],marketingData:s,messages:i,openTextField:c,paymentData:l,shippingData:u,totalizers:p}},Ra=(e,t)=>{const r=e.find(n=>n.id===t);return r?r.availability==="unavailableItemFulfillment":!1},Sd=(e,t)=>{const r=e.sku,n=e.isVariantOf.hasVariant.find(s=>s.sku===r);return n?n.name.split(t)[1]:"--"},ot=(e,t,r=!1)=>!e&&t!==""?{code:300,value:t,statusOk:r}:e===t?{code:200,value:t,statusOk:r}:{code:400,value:t,statusOk:r},jd=(e,t)=>{const r=new Set;return[e,...t].filter(n=>!r.has(n)&&r.add(n),r)},Aa=(e,t)=>t&&Array.isArray(t)&&t.find(n=>n.id===e)?Promise.resolve(e):Promise.resolve(!1),Pa=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),Ia=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},Na=(e,t)=>{if(t!==-1){const r=Number(e);return r?r+1:1}return e??1},Oa=(e,t)=>Array.isArray(e)?e.filter(r=>t==null?void 0:t.some(n=>n.id===r.id)):[],Ta=async(e,t)=>e.then(r=>[...r??[],...t??[]]),Ie=async(e,t,r,n)=>{const{priority:s="auto",body:i}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:s,method:"POST",body:JSON.stringify(i)}).then(async a=>{const c=await a.json();return r?c:wa(c,n)})},ka=(e,t,r)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:r}]}),Ed=e=>[...Array.isArray(e)?e:[e],"faststore"],Ma=e=>{const t=e.get("utm_source")||Ve("utm_source"),r=e.get("utm_campaign")||Ve("utm_campaign"),n=e.get("utm_medium")||Ve("utm_medium"),s=e.get("utmi_cp")||Ve("utmi_cp"),i=e.get("utmi_pc")||Ve("utmi_pc"),a=e.get("utmi_p")||Ve("utmi_p");return{...t&&{utmSource:t},...n&&{utmMedium:n},...r&&{utmCampaign:r},...s&&{utmiCampaign:s},...i&&{utmiPart:i},...a&&{utmipage:a}}},Ve=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),n=r.exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},wd=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:vd,addItemOrder:Sa,addNotification:ka,createItemOrder:Ca,fetchCartAPI:Ie,findItemIndex:ro,findOptions:Oa,findTotalizerValue:bd,getCategories:xa,getCode:ot,getQuantity:Na,getRemoveId:Aa,getSize:Sd,getTotalItems:Cd,getTotalizer:xd,getUrlParameter:Ve,getValue:Pa,initialState:to,isGift:Co,marketingTagsBuilder:Ed,mergeOptionsPromise:Ta,mountMarketingData:Ma,orderFormValues:wa,promiseDefault:ke,removeQuantity:ja,updateItemSellerExternal:Ra,updateOrderFormPromise:Ia,updateQuantity:Ea,wishlistArray:jd},Symbol.toStringTag,{value:"Module"})),Rd=()=>{const e=async(f,m)=>Ie("/api/checkout/order-form/coupon",{body:{orderFormId:f,coupon:m}}),t=async(f,m)=>{if(m){const y=m.includes(" - ")?m.split(" - ")[0]:m,g=await Ie("/api/checkout/order-form/seller-code",{body:{orderFormId:f,sellerCode:y}},!0);return g instanceof Object&&"nome"in g&&(g==null?void 0:g.status)===!0?Ie("/api/checkout/order-form/attachments",{body:{orderFormId:f,sellerCode:y,sellerName:g.nome}}).then(j=>({...j,openTextField:{...(j==null?void 0:j.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:y}})}else return Ie("/api/checkout/order-form/attachments",{body:{orderFormId:f,sellerCode:"",sellerName:""}})},r=async(f,m)=>Ie("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:f,marketingData:m}}),n=async(f,m,y)=>Ie("/api/checkout/order-form/items",{body:{orderFormId:f,orderItems:Sa(m,y)}}),s=async(f,m,y,g=!1)=>Ie("/api/checkout/order-form/offerings",{body:{id:m,itemIndex:y,orderFormId:f,remove:g}}),i=async f=>Ie("/api/checkout/order-form/items/remove-all",{body:{orderFormId:f}}),a=async(f,m="low")=>Ie("/api/checkout/order-form",{priority:m,body:{orderFormId:f??""}}),c=async(f,m)=>Ie("/api/checkout/order-form/profile",{body:{orderFormId:f,email:m}}),l=async(f,m,y)=>{const g=ja(m,y);return Ie("/api/checkout/order-form/items/update",{body:{orderItems:g.updateItems,orderFormId:f}})},u=async(f,m,y)=>Ie("/api/checkout/order-form/shipping",{body:{orderFormId:f,country:y,postalCode:m}}),p=async(f,m,y)=>Ie("/api/checkout/order-form/shipping/update",{body:{orderFormId:f,options:m,selectedAddresses:y}}),h=async(f,m,y,g)=>{const b=Ea(m,y,g);return Ie("/api/checkout/order-form/items/update",{body:{orderFormId:f,orderItems:b}})};return{addCoupon:e,addItem:n,addSellerCode:t,addMarketingData:r,giftItem:s,emptyCart:i,getOrderForm:a,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:p,updateItemQuantity:async(f,m,y,g,b)=>h(f,m,y,g).then(j=>j&&Array.isArray(j.items)?Ra(j.items,y)?h(f,m,y,b):j:!1)}},no="soma::cart",ht="soma::options",it=Ze.create((e,t)=>{const r=Rd(),n=async(s,i,a)=>{e({loading:!0});const c=await Ia(s);if(typeof c!="boolean"){e({...c});const l=await Ta(rt.get(ht),a);return rt.set(ht,l),Pa(c,i).finally(()=>e({loading:!1,options:l}))}return ke};if(typeof window<"u"){const s=async i=>{if(i){const a=await rt.get(ht).then(u=>Oa(u,i.items));rt.set(no,i),rt.set(ht,a),e({...i,options:a});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&n(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return rt.get(no).then(i=>r.getOrderForm(i?i.id:"").then(s)),{...to,addCoupon:async i=>n(()=>r.addCoupon(t().id,i),"marketingData"),addItem:(i,a)=>{n(()=>r.addItem(t().id,t().items,i),"items",a)},addSellerCode:async i=>n(()=>r.addSellerCode(t().id,i),"openTextField"),addMarketingData:async i=>n(()=>r.addMarketingData(t().id,i),"marketingData"),emptyCart:()=>{n(()=>r.emptyCart(t().id))},removeItem:async i=>{const a=await n(()=>r.removeItem(t().id,t().items,i),"items");return Aa(i,a)},shipping:async(i,a="BR")=>n(()=>r.shipping(t().id,i??"",a),"shippingData"),shippingUpdate:async i=>n(()=>{var a;return r.shippingUpdate(t().id,i,(a=t().shippingData)==null?void 0:a.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(i,a,c)=>n(()=>r.giftItem(t().id,i,a,c),"items"),updateItemQuantity:async(i,a,c)=>{const{id:l,items:u}=t();return n(()=>{var p;return r.updateItemQuantity(l,u,i,a,((p=u.find(h=>h.id===i))==null?void 0:p.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async i=>n(()=>r.insertProfileEmail(t().id,i),"clientProfileData"),setIsOpen:i=>e({isOpen:i})}}return to}),Ad=()=>it(e=>e),La=Ze.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(n=>ka(n,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(n=>n.id!==t)}))}})),Da=()=>La(e=>e.notifications),$a=()=>La(e=>e.actions),Pd=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:ht,KEY_INDEXED_STORE:no,useCartStore:it,useGetCartStoreState:Ad,useGetNotificationActions:$a,useGetNotificationsStore:Da},Symbol.toStringTag,{value:"Module"})),Id=6e3,Ba=x.createContext({}),Fa=({children:e,...t})=>{const{items:r}=it(),[n,s]=x.useState([]),i=x.useRef(null),a=x.useMemo(()=>Array.isArray(n)&&n.length>0?n.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,n]);return x.useEffect(()=>{n.length&&(clearTimeout(i.current??0),i.current=setTimeout(()=>{s([])},Id))},[n]),o.jsx(Ba.Provider,{value:x.useMemo(()=>({...t,setRecentlyAdded:s,recentlyAddedProducts:a}),[t,s,a]),children:e})},xt=()=>{const e=x.useContext(Ba);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class qa{constructor(){fr(this,"events",{});fr(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(n=>{this.prevData[t]=r,n(r)})}}const za=x.createContext({}),Nd=({children:e,headerConfigs:t,pathname:r,...n})=>{const[s,i]=x.useState(!0),a=r==="/",c=x.useRef(new qa),l=h=>h?{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},u=l(a),p=x.useRef(u);return x.useEffect(()=>{var f;const h=((f=new URLSearchParams(window.location.search))==null?void 0:f.toString())??"";(h.includes("utm_")||h.includes("gclid"))&&(Jn.get("lastMedias")||Jn.set("lastMedias",`${h}`,{expires:1/24}));const d=()=>{const m=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,y=window.innerWidth<1024||!!m.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);s!==y&&i(y)};return d(),window.addEventListener("resize",d,{passive:!0}),()=>window.removeEventListener("resize",d)},[s]),x.useEffect(()=>{const h=l(a);c.current.publish("header:change_variant",h.headerVariant),c.current.publish("header:change_position",h.position),p.current=h},[a]),o.jsx(za.Provider,{value:{isMobile:s,mediatorRef:c,currentHeaderConfigsRef:p,...n},children:o.jsx(Fa,{children:e})})},Se=()=>x.useContext(za),Ha=x.createContext({}),Od=({children:e,...t})=>o.jsx(Ha.Provider,{value:{...t},children:e}),Re=()=>x.useContext(Ha),Je=(e,t)=>Ze.create(r=>{const n=()=>r({value:e});return t&&t instanceof Set&&t.add(n),{value:e,actions:{setValue:s=>r({value:s}),reset:n}}}),bt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Ct=new Set,Td=()=>{Ct.forEach(e=>{e()})},Ua=Ze.create((e,t)=>{const r=()=>e({value:bt.category});return Ct.add(r),{value:bt.category,actions:{reset:r,setValue:n=>e(()=>({value:n})),updateValue:n=>{t().value!==n&&e({value:n})}}}}),tr=()=>Ua(e=>e.value),Ge=()=>Ua(e=>e.actions),Wa=Je(bt.menuMobileIsOpen,Ct),So=()=>Wa(e=>e.value),et=()=>Wa(e=>e.actions),Ga=Je(bt.searchModalIsOpen,Ct),kd=()=>Ga(e=>e.value),jo=()=>Ga(e=>e.actions),Va=Je(bt.userMenuIsOpen,Ct),Ka=()=>Va(e=>e.value),St=()=>Va(e=>e.actions),Md=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Td,useActionsHeaderCategory:Ge,useActionsMenuMobileIsOpen:et,useActionsSearchModalIsOpen:jo,useActionsUserMenuIsOpen:St,useGetHeaderCategoryStore:tr,useGetMenuMobileIsOpen:So,useGetSearchModalIsOpen:kd,useGetUserMenuIsOpen:Ka},Symbol.toStringTag,{value:"Module"})),at={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},ut=new Set,Ld=()=>{ut.forEach(e=>{e()})},Xa=Ze.create(e=>{const t=()=>e({value:at.selectedSkuInfo});return ut.add(t),{value:at.selectedSkuInfo,actions:{setValue:r=>e(n=>({value:{...n,...r}})),reset:t}}}),Dd=()=>Xa(e=>e.value),$d=()=>Xa(e=>e.actions),Ya=Je(at.openLetMeKnow,ut),Bd=()=>Ya(e=>e.value),Fd=()=>Ya(e=>e.actions),Qa=Je(at.showNotify,ut),qd=()=>Qa(e=>e.value),zd=()=>Qa(e=>e.actions),Za=Je(at.showBottomNavigation,ut),Hd=()=>Za(e=>e.value),Ud=()=>Za(e=>e.actions),Ja=Je(at.openMeasurements,ut),Wd=()=>Ja(e=>e.value),Gd=()=>Ja(e=>e.actions),Vd=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Ld,useActionsPDPOpenLetMeKnow:Fd,useActionsPDPOpenMeasurements:Gd,useActionsPDPSelectedSkuInfo:$d,useActionsPDPShowBottomNavigation:Ud,useActionsPDPShowNotify:zd,useGetPDPOpenLetMeKnow:Bd,useGetPDPOpenMeasurements:Wd,useGetPDPSelectedSkuInfo:Dd,useGetPDPShowBottomNavigation:Hd,useGetPDPShowNotify:qd},Symbol.toStringTag,{value:"Module"})),Zo={feedback:{active:!1,action:"add"},list:[]},Eo=Ze.create((e,t)=>({value:Zo,actions:{reset:()=>e({value:Zo}),setValue:n=>e(()=>({value:n})),toggleProduct:n=>e(s=>s.value.list.includes(n)?{value:{feedback:{active:!0,action:"remove"},list:s.value.list.filter(i=>i!==n)}}:{value:{feedback:{active:!0,action:"add"},list:[...s.value.list,n]}}),updateList:n=>e(s=>({value:{...s.value,list:n}})),resetFeedback:()=>e(n=>({value:{...n.value,feedback:{active:!1,action:""}}}))}})),Kd=()=>Eo(e=>e.value.list),Xd=()=>Eo(e=>e.value.feedback),Yd=()=>Eo(e=>e.actions),Qd=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Yd,useGetWishlistFeedbackStore:Xd,useGetWishlistStore:Kd},Symbol.toStringTag,{value:"Module"})),ec=x.createContext({}),Zd=({children:e,headerData:t,...r})=>{var p,h;const n=x.useRef(null),s=x.useRef(null),i=x.useRef(null),a=x.useRef(null),c=x.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=Se();return(p=l.current)==null||p.subscribe("header:change_variant",d=>{var b,j,v;if(d&&u.current&&(u.current.bannerVariant=d),!n.current)return;const m=document.body.scrollTop>0,y=n.current.getAttribute("data-interactiveVariant"),g=m?y:d??((b=u.current)==null?void 0:b.bannerVariant)??"default";g!==((j=u.current)==null?void 0:j.headerVariant)&&(n.current.setAttribute("data-bottomdivider",String(m)),n.current.setAttribute("data-variant",String(g)),(v=l.current)==null||v.publish("herobanner:change_controllers_variant",g),u.current&&(u.current.headerVariant=g))}),(h=l.current)==null||h.subscribe("header:change_position",d=>{n.current&&(n.current.style.position=d)}),x.useEffect(()=>{const d=new AbortController,f=_.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",f,{passive:!0,signal:d.signal});const m=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return n.current&&(n.current.addEventListener("click",m,{signal:d.signal}),n.current.addEventListener("touchend",m,{signal:d.signal})),()=>{d.abort()}},[]),o.jsx(ec.Provider,{value:{headerData:t,structureRef:s,rootRef:n,tipbarRef:i,userMenuMobileRef:a,userMenuDesktopRef:c,...r},children:e})},Ce=()=>x.useContext(ec),tc=x.createContext({}),rc=({children:e})=>{const t=x.useRef(null),r=x.useRef(null),n=So(),s=x.useCallback(()=>{var i;{const a=(i=t.current)==null?void 0:i.querySelector("dialog");if(a){a.dataset.animation="out";const c=a.children[0];c.dataset.animation="out"}}},[]);return x.useEffect(()=>{var i;if(n)document.body.dataset.modalopen="true";else{document.body.dataset.modalopen="false";const a=(i=r.current)==null?void 0:i.querySelector("dialog");if(a){a.dataset.animation="out";const c=a.children[0];c.dataset.animation="out"}}},[n]),x.useEffect(()=>{r.current=document.body},[]),o.jsx(tc.Provider,{value:{bodyRef:t,handleCloseSubMenu:s,documentBodyRef:r},children:e})},jt=()=>x.useContext(tc),Jd=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},ef=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const n=t.getBoundingClientRect(),s=e.getBoundingClientRect(),i=e!=null&&e.parentElement?Jd(e==null?void 0:e.parentElement):0;return{left:n.left+n.width/2-(s.width+i),top:n.top+n.height+r}},nc=x.createContext({}),oc=({children:e,delay:t=600,gap:r=20,...n})=>{const[s,i]=x.useState(!1),a=x.useRef(null),[c,l]=x.useState(!1),[u,p]=x.useState({left:0,top:0}),h=x.useCallback(()=>{l(!0),typeof window<"u"&&(a.current=window.setTimeout(()=>{i(!1),l(!1)},t))},[l,i,t]);return x.useEffect(()=>{if(typeof window>"u")return;const d=window.document.querySelector("#cart-button"),f=window.document.querySelector("#add-to-cart--tooltip");if(d&&f){const{left:m,top:y}=ef(f,d,r??0);p({left:m,top:y}),l(!1)}},[r,s]),o.jsx(nc.Provider,{value:x.useMemo(()=>({...n,...u,handleClose:h,isLeaving:c,isOpen:s,setIsOpen:i,setIsLeaving:l}),[n,u,h,c,s,i,l]),children:e})},tt=()=>{const e=x.useContext(nc);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},sc=x.createContext({}),tf=({children:e,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:t,...r})=>{const n=it(),{setRecentlyAdded:s}=xt(),i=x.useRef(""),a=Da(),{addNotification:c,removeNotification:l}=$a(),{addCoupon:u,addItem:p,addSellerCode:h,addMarketingData:d,emptyCart:f,isOpen:m,removeItem:y,shipping:g,shippingUpdate:b,toggleServiceToProduct:j,updateItemQuantity:v}=n;x.useEffect(()=>{const z=Jn.get("lastMedias");if(n.id&&z&&i.current!==z){i.current=z;const V=new URLSearchParams(z),W=Ma(V);d(W)}},[n,d]);const S=x.useCallback(async(z,V)=>(V==="coupon"?u(z):h(z)).then(F=>{if(typeof F!="boolean"&&F instanceof Object){if(V==="seller"&&"value"in F){const{statusOk:Z,value:P}=F,T=String(P??"").split(" - ");return ot((T==null?void 0:T[0])??"",z,!!Z)}return ot(String(F.coupon),z,!0)}return ot("","")}).catch(()=>Promise.resolve({code:400})),[u,h]),E=x.useCallback((z,V,W)=>{const{id:F}=z;v(F,V,W)},[v]),R=x.useCallback((z,V,W=!1)=>{if(!z)return;const{id:F}=z,Z=ro(n.items,F);if(Z!==-1&&!W){const P=Number(n.items[Z].quantity),T=n.items[Z]?P+1:1;E(z,T,V)}else p({id:F,quantity:(z==null?void 0:z.quantity)??1,seller:z.seller});m||s(P=>[...P,z])},[p,E,n.items,m,s]),C=x.useCallback((z,V)=>{if(!z||!Array.isArray(z))return;s(F=>[...F,...z]);const W=z.map(F=>{const{id:Z,quantity:P,seller:T}=F,D=ro(n.items,Z),K=Na(P??1,D);return{id:Z,quantity:K,seller:T}});p(W,V)},[p,n.items,s]),A=x.useCallback(async(z,V,W)=>z?y(z).then(()=>(c(V??`${t}`,W),ot(z,z))):Promise.resolve(ot("","Product id required")),[c,y]),k=x.useCallback(()=>{n.items.length>0&&f()},[f,n.items]),w=x.useCallback((z,V="BRA")=>g(z,V),[g]),N=x.useCallback(z=>{z&&b(z)},[b]),I=x.useCallback(async(z,V,W)=>{const F=n.items.findIndex(P=>P.id===z);return n.items[F]&&F>=0?j(V,F,W??!1):!1},[n.items,j]),B=x.useCallback(async(z,V)=>v(z,V).then(W=>{if(Array.isArray(W)){const F=W.find(Z=>Z.id===z);if(F&&(F==null?void 0:F.quantity)<V)return String(F.quantity)}return!1}),[v]),O=x.useCallback(async()=>{await d({...n.marketingData,coupon:""})},[d,n.marketingData]),H=x.useCallback(async()=>{await d({...n.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[d,n.marketingData]),U=x.useCallback(async()=>{await g("","BRA")},[g]);return o.jsx(sc.Provider,{value:x.useMemo(()=>({...r,addCouponSeller:S,addToCart:R,addItemsToCart:C,cartStore:n,notifications:a,clearCart:k,addNotification:c,isOpen:n.isOpen,removeNotification:l,removeToCart:A,setIsOpen:n.setIsOpen,shipping:w,shippingUpdateOption:N,toggleGiftItemCart:I,updateItemQuantity:B,removeCoupon:O,removeSellerCode:H,removeCEP:U}),[r,S,R,C,a,k,c,n,l,A,w,N,I,B,O,H,U]),children:e})},ze=()=>{const e=x.useContext(sc);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},ic=x.createContext({}),wo=({children:e,fetch:t})=>{const r=x.useRef(!0),[n,s]=x.useState(null),[i,a]=x.useState(!1);return x.useEffect(()=>{(async()=>{r.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),r.current=!1}catch{r.current=!0,a(!0)}})()},[t]),o.jsx(ic.Provider,{value:x.useMemo(()=>({data:n,isLoading:r.current??!1,isError:i}),[n,i,r]),children:e})},Ro=()=>{const e=x.useContext(ic);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},ac=x.createContext({}),cc=({children:e,sort:t,state:r,count:n,collectionId:s,brand:i,CONSTANTS:a})=>{const c=x.useMemo(()=>{var l;return s?[{key:"productclusterids",value:s.toString()}]:i?[{key:"brand",value:i}]:(l=r.base)!=null&&l.length?r.base.slice(1).split("/").map((u,p)=>({key:`category-${p+1}`,value:u})):[]},[r.base,s]);return o.jsx(ac.Provider,{value:x.useMemo(()=>({state:{...r,facets:[...c,...r.facets??[]]},sort:t,count:n??a.ITEMS_PER_PAGE}),[c,n,t,r]),children:e})},rr=()=>{const e=x.useContext(ac);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},pt={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"}},rf={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},nf="Imagem do produto",Jo=1,of="Sair",sf=e=>e.exit,af=({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"}],cf=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},lf=e=>"Seja bem vindo!",lc=x.createContext({}),uf=({children:e,searchParams:t,selectedFacets:r,PLP_SORT_DEFAULT:n})=>{const{data:s,...i}=Ro(),{router:a}=Re(),c=x.useCallback((d,f)=>{if(f){if(d.key.toLocaleLowerCase()==="price"){const m=f.getAll("facets");f.delete("facets"),m.forEach(y=>{const[g]=y.split("/");g!==d.key&&f.append("facets",y)})}f.set("page","1"),f.append("facets",`${d.key}/${d.value}`),a.push(`?${f.toString()}`)}},[a]),l=x.useCallback(()=>{const d=new URLSearchParams;d.set("sort",n),d.set("page","1"),a.push(`?${d.toString()}`)},[a]),u=x.useCallback((d,f)=>{if(!f||!f.has&&!f.has("facets"))return;const m=f.getAll("facets");f.delete("facets"),f.set("page","1"),m.forEach(y=>{const[g,b]=y.split("/");(g!==d.key||b!==d.value)&&f.append("facets",y)}),a.push(`?${f.toString()}`)},[a]),p=x.useCallback(d=>{const f=new URLSearchParams(ae.convertSearchParams(t));for(const[,m]of f.entries()){const[y,g]=m.split("/");if(y===d.key&&g===d.value)return u(d,f)}return c(d,f)},[c,u,t]),h=x.useCallback(d=>{const f=new URLSearchParams(ae.convertSearchParams(t));f.set("sort",d.replace("_",":")),a.push(`?${f.toString()}`)},[a,t]);return o.jsx(lc.Provider,{value:x.useMemo(()=>({...i,breadcrumb:s&&"breadcrumb"in s?s==null?void 0:s.breadcrumb:[],deleteAllFacets:l,facets:s&&"facets"in s?s==null?void 0:s.facets:[],selectedFacets:r,onToggleFacet:p,onSort:h,searchParams:t}),[s,l,h,p,i,r,t]),children:e})},df=({children:e,searchParams:t,forceUpdate:r,PLP_SORT_DEFAULT:n})=>{const{state:s}=rr();return o.jsx(wo,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...s,forceUpdate:r}),priority:"low"}),children:o.jsx(uf,{selectedFacets:(s==null?void 0:s.facets)??[],searchParams:t,PLP_SORT_DEFAULT:n,children:e})})},ff=()=>{const e=x.useContext(lc);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},uc=x.createContext({}),pf=({children:e})=>{const{data:t,...r}=Ro(),[n,s]=x.useState(0),{sendDataLayerEvent:i}=ge();return x.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){i({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const a=t.pagination.count;a&&Number.isInteger(a)&&s(a)}},[t,i,s]),o.jsx(uc.Provider,{value:x.useMemo(()=>({...r,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:rf,total:n}),[t,r,n]),children:e})},mf=({children:e,query:t,state:r,selectedFacets:n,forceUpdate:s})=>o.jsx(wo,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...r,query:t,forceUpdate:s,facets:n??[]})}),children:o.jsx(pf,{state:r,children:e})}),hf=()=>{const e=x.useContext(uc);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},dc=x.createContext({}),gf=({children:e,term:t})=>{const[r,n]=x.useState([]),[s,i]=x.useState(!1);return x.useEffect(()=>{if(!t){n([]);return}(async()=>{i(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();n((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),o.jsx(dc.Provider,{value:x.useMemo(()=>({suggestedTerms:r,loading:s,setLoading:i}),[r,s]),children:e})},yf=({children:e,...t})=>o.jsx(gf,{...t,children:e}),_f=()=>{const e=x.useContext(dc);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},fc=x.createContext({searches:[],isLoading:!1,error:null}),vf=({children:e})=>{const[t,r]=x.useState([]),[n,s]=x.useState(!0),[i,a]=x.useState(null);return x.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();r(u.data.searches||[])}catch(l){a(l instanceof Error?l.message:"Erro desconhecido")}finally{s(!1)}})()},[]),o.jsx(fc.Provider,{value:x.useMemo(()=>({searches:t,isLoading:n,error:i}),[t,n,i]),children:e})},bf=()=>{const e=x.useContext(fc);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},pc=x.createContext({}),xf=({children:e,slug:t,searchParams:r,collectionId:n,brand:s,itemsPerPage:i=24,PLP_SORT_DEFAULT:a})=>{const{pathname:c}=Re(),l=x.useRef(""),[u,p]=x.useState(!1),h=x.useMemo(()=>{const f=new URL(c,"http://localhost"),m=Array.isArray(r==null?void 0:r.facets)?r.facets:[(r==null?void 0:r.facets)??""],y=(r==null?void 0:r.page)??"1",g=(r==null?void 0:r.sort)??(n?"":a);return f.searchParams.set("page",String(y)),f.searchParams.set("sort",String(g)),r!=null&&r.query?(f.searchParams.set("query",r.query),f):(f.searchParams.set("base",Array.isArray(t)?t.join("/"):t),f.searchParams.set("facets",m.join(",")),f)},[n,c,r,t]),d=x.useMemo(()=>{if(Array.isArray(r==null?void 0:r.facets))return ae.parseSearchState(h,r.facets);const f=r!=null&&r.facets?[r==null?void 0:r.facets]:[];return ae.parseSearchState(h,f)},[h,r]);return x.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),o.jsx(pc.Provider,{value:x.useMemo(()=>({openFilters:u,setOpenFilters:p}),[u,p]),children:o.jsx(cc,{CONSTANTS:{ITEMS_PER_PAGE:i},state:x.useMemo(()=>({...d}),[d]),collectionId:n,brand:s,children:e})})},Cf=()=>{const e=x.useContext(pc);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Zt=(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,i)=>Zt(s,t[i]));if(Array.isArray(t))return!1;const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(s=>Object.prototype.hasOwnProperty.call(t,s)&&Zt(e[s],t[s]))},mc=(e,t,r="page")=>Object.keys(t).some(n=>n===r?!1:!Zt(t[n],e[n])),oo=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 r=await t.json();return r==null?void 0:r.data},hc=()=>({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}}}),gc=(e,t,r,n=24)=>{const s=new Set,i=[];if(!Array.isArray(e)||e.length===0)return{taken:s,placedBanners:i};const a=t*n*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<a;){const p=l%r;if(p+c.columns>r){l+=r-p;continue}if(!Array.from({length:c.columns}).some((f,m)=>s.has(l+m))){for(let f=0;f<c.columns;f++)s.add(l+f);i.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:i}},so=(e,t,r,n=24)=>{const{placedBanners:s,taken:i}=gc(e??[],t,r),a=[];let c=0;try{for(;a.length<t*n;)i.has(c)||a.push(c),c++;return{banners:s,products:a}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:a}},Yt=(e,t,r=24)=>Array.from({length:e},(n,s)=>{const i=s+1;return{loading:e===i,page:i,pagination:t!=null&&t.products.length&&e===i?t==null?void 0:t.pagination:Ao(),products:t!=null&&t.products.length&&e===i?t==null?void 0:t.products:Array.from({length:r},()=>hc())}}),yc=(e,t)=>[...e,{loading:!1,page:t,pagination:Ao(),products:[]}],Ao=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),Sf=(e,t,r,n,s)=>{const i=e[e.length-1],a=(i==null?void 0:i.products.length)??s,c=(e.length-1)*s+a-1,l=r[c];return t.filter((u,p)=>{const h=n[p];return h<=l||s>a&&h>l})},_c=(e,t)=>{const r=new Map;for(const s of e){const i=Math.floor(s/t);r.has(i)||r.set(i,[]),r.get(i).push(s)}const n=[];for(const[,s]of r){const i=s[Math.floor(Math.random()*s.length)];n.push(i)}return n},jf=(e,t)=>{if(!e)return[];const r=e.map((n,s)=>n.video&&n.video!==""?s:null).filter(n=>n);return _c(r,t)},vc=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],Ef=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:vc,createPage:yc,createPages:Yt,createPagination:Ao,createProduct:hc,deepEqual:Zt,fetchPage:oo,getBanners:gc,getPositions:so,getProductsWithVideo:jf,getRandomVideoPerRow:_c,getVisibleBanners:Sf,hasStateChangedExceptPage:mc},Symbol.toStringTag,{value:"Module"})),wf=50,Rf=Ze.create((e,t)=>{const r=a=>Math.min(a,wf),n=async(a,c)=>{const l=r(a.page);try{const u=await oo({...a,page:l});s(l,p=>c?c(p,u):{...p,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),s(l,p=>({...p,loading:!1}))}},s=(a,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===a?c(l):l)})},i=async(a,c)=>{await n(a,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(a,c,l,u)=>{var h,d,f;const p=r(Number(a==null?void 0:a.page));e({...c,pages:Yt(p,void 0,u)});try{const m=await oo({...a,page:p});if(m){if(!m.products.length&&((h=m==null?void 0:m.pagination)==null?void 0:h.total)<p){i({...a,page:(d=m==null?void 0:m.pagination)==null?void 0:d.total},l),e({pages:Yt((f=m==null?void 0:m.pagination)==null?void 0:f.total)});return}typeof l=="function"&&l(m),e({load:!0,pages:Yt(p,m),total:Number(m.pagination.count)})}}catch(m){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${p} ${m}`)}},addPage:(a,c,l)=>{const{pages:u}=t(),p=r(a==null?void 0:a.page);u.some(h=>h.page===p)||(e({...c,pages:yc(u,p)}),i(a,l))},updateProducts:(a,c)=>{const l=t().pages.find(u=>u.page===r(a==null?void 0:a.page));l!=null&&l.loading||i(a,c)}}}),Af=(e,t,r,n=0)=>{if(!e.length)return[];let s=0;const i=[];for(let a=0;a<e.length;a+=r){const c=e.slice(a,a+r),l=c.findIndex(u=>{var p;return(p=u.node)==null?void 0:p.video});for(let u=0;u<c.length;u++){const p=a+u,h=n+p,d=t.find(m=>m.position_grid===h+1),f=h+s+1;d&&(s+=d.columns),i.push({position:f,canPlayVideo:u===l})}}return i},Pf=(e,t,r)=>{const n=(t-1)*r,s=t*r;return e>=n&&e<=s},bc=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:ae.disableSKU(r),size:ae.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},If=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Af,getSkusNotify:bc,isPositionInCurrentPage:Pf},Symbol.toStringTag,{value:"Module"})),xc=x.createContext({}),Nf=({banners:e,children:t,itemsPerPage:r=24,searchParams:n,Notification:s})=>{const{router:i}=Re(),{sendDataLayerEvent:a}=ge(),{isMobile:c}=Se(),{state:l}=rr(),{addPage:u,createPages:p,updateProducts:h,...d}=Rf(),f=c?8:16,m=c?2:4,y=x.useRef(!1),g=x.useRef(l),[b,j]=x.useState(!1),[v,S]=x.useState(null),[E,R]=x.useState([]),C=x.useCallback(I=>{I&&"pagination"in I&&a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:I.products}}})},[a]),A=x.useCallback(I=>{if(I.pagination.nextPage===!0){const B=I.page+1,O=so(e,B,m,r);u({...l,page:B},O,C)}},[u,e,C,m,r,l]),k=x.useCallback(I=>{I.loading===!1&&h({...l,page:I.page},C)},[C,h,l]),w=x.useCallback(I=>{const B=new URLSearchParams(n);I.page!==Number(B.get("page")??1)&&(B.set("page",String(I.page)),i.replace(`?${B.toString()}`,{scroll:!1}))},[i,n]),N=x.useCallback((I,B)=>{const O=B?bc([B]):null;R(I),S(O!=null&&O.length?O[0]:null),j(!0)},[]);return x.useEffect(()=>{const I=!y.current,B=mc(g.current,l),O=so(e,l.page,m);I?p(l,O,C,r):B&&(p(l,O,C,r),g.current=l),y.current=!0},[e,p,C,m,r,l]),o.jsxs(xc.Provider,{value:x.useMemo(()=>({...d,addPage:u,addNewPage:A,createPages:p,gap:f,columns:m,handleNotify:N,updatePage:k,updateProducts:h,updateParamPage:w}),[u,A,p,N,f,m,d,k,h,w]),children:[t,o.jsx(s,{notify:b,sku:v,skus:E,setSku:S,setNotify:j})]})},Of=()=>{const e=x.useContext(xc);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e};function Cc(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const n of r){const[s,i]=n.trim().split("=");if(s===e)return i}}function Po(e,t,r={}){const s={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let i=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const a in s)s[a]!==void 0&&(i+=`; ${a}`,a==="expires"?i+=`=${s[a].toUTCString()}`:typeof s[a]=="boolean"?i+=`; ${s[a]?"true":"false"}`:i+=`=${s[a]}`);window.document.cookie=i}const Tf=()=>{const{sendDataLayerEvent:e}=ge(),{user:t}=Io(),{cartStore:r}=ze();return x.useEffect(()=>{if(!t)return;(async()=>{const{userId:s,email:i,firstName:a,lastName:c,phone:l,homePhone:u,postalCode:p,street:h,number:d,city:f,gender:m}=t,y=new TextEncoder().encode(s),g=await crypto.subtle.digest("SHA-256",y),j=Array.from(new Uint8Array(g)).map(v=>v.toString(16).padStart(2,"0")).join("");e({functionKey:"readyEvents",data:{readyData:{user_id:j,email:i,first_name:a,last_name:c,phone:l||u,zip:p,street:h,street_number:d,city:f,gender:m,orderform_id:r==null?void 0:r.id}}})})()},[t,r.id]),null},Sc=x.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),kf=({children:e,AUTH_TOKEN_COOKIE:t})=>{const[r,n]=x.useState({amount:null,boxes:null,toExpire:null,loading:!0}),s=x.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(c=>c.json()).then(c=>{const{userCredits:l,...u}=c,{wishlist:p,...h}=u;n({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 p=="string"?p.split(","):p)??[]})})}catch(c){console.error("my credits request",c),n({...r,loading:!1})}},[n]),i=x.useCallback(()=>{Po(t),s()},[s]),a=x.useCallback(()=>r.boxes?r.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},[r]);return x.useEffect(()=>{s()},[s]),o.jsxs(Sc.Provider,{value:x.useMemo(()=>({...r,getCurrentCredits:a,logout:i}),[r,a,i]),children:[o.jsx(Tf,{}),e]})},Io=()=>{const e=x.useContext(Sc);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},jc=x.createContext({gridBanners:void 0,banners:[]}),Mf=({children:e,data:t,device:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:s})=>{const{isMobile:i}=Se(),a=(t==null?void 0:t.sections.filter(h=>h.name!=="List Product Banners"))??[],c=a.slice(0,Jo),l=a.slice(Jo,a.length),u=t==null?void 0:t.sections.find(h=>h.name==="List Product Banners"),p=x.useMemo(()=>{var h,d;return((d=(h=u==null?void 0:u.data)==null?void 0:h.banners)==null?void 0:d.map(f=>({...f.banner,columns:f.bannerWidth,position_grid:f.bannerPosition})))??[]},[u]);return i&&r==="mobile"||!i&&r==="desktop"?o.jsxs(jc.Provider,{value:{gridBanners:u,banners:p},children:[o.jsx(n,{data:c??[]}),o.jsxs(_.Utils.Column,{gap:s,className:_.helpers.classNameConcat("utils-column-modifier"),children:[e,o.jsx(n,{data:l??[]})]})]}):o.jsx(o.Fragment,{})},Lf=()=>{const e=x.useContext(jc);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},Ec=x.createContext({}),wc=({children:e,filters:t,PLP_FILTERS:r,...n})=>{var i;const s=(i=t.facets)==null?void 0:i.filter(a=>r.find(c=>c.key===a.key));return o.jsx(Ec.Provider,{value:x.useMemo(()=>({...n,filters:{...t,facets:s}}),[t,s,n]),children:e})},dt=()=>{const e=x.useContext(Ec);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},Rc=x.createContext({product:void 0}),Df=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:n,SectionZone:s})=>o.jsxs(Rc.Provider,{value:{productId:r},children:[e,o.jsx(_.Utils.Column,{gap:n,className:_.helpers.classNameConcat("utils-column-modifier"),children:o.jsx(s,{data:(t==null?void 0:t.sections)??[]})})]}),$f=()=>{const e=x.useContext(Rc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Bf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Ff(e,t=1e3){let r=!1;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>{r=!1},t))}}function qf(e,t=1e3){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}const Ac=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,gt=(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),zf=e=>{const t=td.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Hf=["name","email","phone","date","cpf","cep"],es={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}$/},Pc=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!es[e])return!0;const n=t.trim();return es[e].test(n)},Uf=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):nf},Wf=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Hf,debounce:qf,getAltTextFromUrl:Uf,getAuthenticatedUser:zf,getCookie:Cc,getDaysHoursMinutesSeconds:gt,getMilliSeconds:Ac,removeAccentsAndReplaceSpaces:Bf,setCookie:Po,throttle:Ff,validateInput:Pc},Symbol.toStringTag,{value:"Module"})),Gf=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((n,s)=>(t[s.master_data_field]="none",{...n,[s.master_data_field]:s}),{}))??{},mountedInputsStatus:t}},Vf=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:n,checkboxRef:s,setFormStatus:i})=>{let a=!1,c=!1;const l={...r};return n&&!s.current&&(i("unchecked"),a=!0),e.forEach((u,p)=>{var f;if(p==="terms-and-conditions")return;const h=(f=t[p])==null?void 0:f.required;if(h&&!u){l[p]="required",a=!0;return}Pc({type:t[p].type,input:u,required:h})||(l[p]="error",c=!0),typeof u=="string"&&e.set(p,u.toString().trim())}),{hasEmptyFields:a,hasErrors:c,inputStatusToUpdate:l}},Ic=x.createContext({}),Nc=({children:e,masterDataEmailField:t,fields:r,variant:n,CONSTANTS:{MASTER_DATA_ENTITY:s,NEWSLETTER_CONFIGS:i}})=>{const{sendDataLayerEvent:a}=ge(),c=n==="vertical"&&i.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=x.useMemo(()=>Gf({fields:r}),[r]),p=x.useRef(!1),[h,d]=x.useState("idle"),[f,m]=x.useState(u),y=async({searchFields:R,entity:C})=>{const A=await _t.post("/api/master-data/search",{body:{masterDataEntity:C,searchFields:R,headers:{"REST-Range":"resources=0-49"}}});return console.info(A),A.data},g=async({id:R,fieldsToBeUpdated:C,entity:A})=>(await _t.post("/api/master-data/update",{dataEntityName:A,id:R,fieldsToBeUpdated:C})).status,b=x.useCallback(async({payload:R,response:C},A,k)=>{const{email:w,...N}=R,[I]=await y({searchFields:{[A]:w},entity:k??s.newsletter});return I&&await g({id:I.id,fieldsToBeUpdated:N,entity:k??s.newsletter})!==204?{...C,status:"error"}:{...C,status:"success"}},[]),j=x.useCallback(async({formData:R},C,A)=>{const k={status:"idle",inputsStatus:{}},w={};R.forEach((N,I)=>{w[I]=N});try{const I=(await _t.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:k},A,C):I!=null&&I.Id?{...k,status:"success"}:{...k,status:"error"}}catch(N){return console.error("error",N),{...k,status:"error"}}},[b]),v=x.useCallback(async(R,C,A)=>{R.preventDefault();const k=new FormData(R.target);C&&Object.keys(C).forEach(N=>{k.append(N,C[N])});const w=await j({formData:k},A??"",t);w&&(d(w==null?void 0:w.status),m(w.inputsStatus),w.status==="success"&&a({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,j,d,m,a]),S=x.useCallback(R=>{const C=new FormData(R.currentTarget.parentElement),{hasEmptyFields:A,hasErrors:k,inputStatusToUpdate:w}=Vf({formData:C,mountedFields:l,inputsStatus:f,hasTermsAndConditions:c,checkboxRef:p,setFormStatus:d});if(m(w),A||k){R.preventDefault();return}d("loading")},[l,f,c,p]),E=x.useCallback(()=>{d("idle"),m(u)},[u]);return o.jsx(Ic.Provider,{value:x.useMemo(()=>({formStatus:h,handleSubmit:v,setFormStatus:d,inputsStatus:f,setInputsStatus:m,hasTermsAndConditions:c,handleClickToSubmit:S,checkboxRef:p,masterDataEmailField:t,fields:r,variant:n,resetNewsletter:E}),[h,v,d,f,m,S,c,p,t,r,n,E]),children:e})},No=()=>{const e=x.useContext(Ic);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Kf={contexts:{addToCart:{hook:tt,provider:oc},cart:{hook:ze,provider:tf},cms:{FlagsAndTags:{context:vo,hook:bo,provider:rd}},newsletter:{hook:No,provider:Nc},events:{hook:ge,provider:dd},global:{hook:Se,provider:Nd,mediator:qa},header:{hook:Ce,provider:Zd},menuMobile:{hook:jt,provider:rc},next:{hook:Re,provider:Od},pdp:{provider:nd,hook:od},PDPContent:{provider:Df,hook:$f},plp:{provider:xf,hook:Cf},plpFilter:{hook:dt,provider:wc},PLPContent:{provider:Mf,hook:Lf},plpInfinite:{provider:Nf,hook:Of},pdpdata:{hook:xo,provider:fd},searchFacets:{hook:ff,provider:df},searchProducts:{hook:hf,provider:mf},searchRoot:{hook:Ro,provider:wo},searchSearch:{hook:rr,provider:cc},searchSuggestedTerms:{hook:_f,provider:yf},searchTopSearchs:{hook:bf,provider:vf},session:{hook:Io,provider:kf},ui:{hook:xt,provider:Fa}},hooks:{useBackPDC:da,useClipboard:pd,useDisableZoom:md,useLocalStorage:gd,useOnScreen:ba,useSentinel:yd,useTouchZoomPan:_d},stores:{cart:Pd,header:Md,pdp:Vd,wishlist:Qd}},Xf={cart:wd,events:ud,plp:Ef,product:ae.productHelpers,utils:Wf},Oo={helpers:Xf},Oe={"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"},Oc=({brand:e,className:t,name:r,...n})=>o.jsxs("div",{...n,className:_.helpers.classNameConcat(Oe["add-to-cart--card--name"],t),children:[o.jsx(_.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:o.jsx("p",{className:"typography-style-body-md",children:r})})})]});Oc.displayName="AddToCart.Card.Name";const Tc=({className:e,listPrice:t,price:r,quantity:n,productId:s,...i})=>{const a=ae.formatPriceToCurrency(r/100),c=ae.formatPriceToCurrency(t/100);return o.jsx("div",{...i,className:_.helpers.classNameConcat(Oe["add-to-cart--card--price-quantity"],e),children:o.jsx(_.ProductInfo.Root,{size:"small",layout:"vertical",children:o.jsx(_.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:o.jsx(_.ProductInfo.ValuesWrapper,{children:r!==t?o.jsxs(o.Fragment,{children:[o.jsx(_.ProductInfo.Price,{label:"originalPrice",value:a,size:"small"},"price-list"),o.jsx(_.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):o.jsx(_.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};Tc.displayName="AddToCart.Card.PriceQuantity";const Yf="_skeleton_12b79_1",Qf={skeleton:Yf},Zf=({style:e})=>o.jsx("div",{style:e,className:Qf.skeleton}),Jf="_image_lypfr_1",ep={image:Jf},tp=({alt:e,className:t,objectFit:r,...n})=>{const{nextimage:s}=Re();return o.jsx(s,{quality:90,...n,alt:e??"",className:_.helpers.classNameConcat(ep.image,t),"data-object-fit":r??"cover"})},rp=({videoRef:e,...t})=>o.jsx("video",{...t,ref:e,children:o.jsx("track",{kind:"captions"})}),Be={Image:tp,Video:rp},kc=({className:e,productGroupID:t,size:r,texture:n,...s})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:a}}=tt(),[c,l]=x.useState(n??"");return x.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const p=u.data[0].items[0];if(p){const h=p.images.find(d=>i.includes(d.imageLabel));h!=null&&h.imageUrl?l(h.imageUrl):l(p.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),o.jsxs("div",{...s,className:_.helpers.classNameConcat(Oe["add-to-cart--card--style-size"],e),children:[o.jsx(_.ToggleStyle.Wrapper,{size:"x-small",style:a,children:o.jsx(_.ToggleStyle.Texture,{children:c?o.jsx(Be.Image,{alt:"",src:c??"",width:164,height:164,style:a}):o.jsx(Zf,{})})}),o.jsx(_.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&o.jsxs(_.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[o.jsx(_.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),o.jsx(_.ToggleSize.Text,{children:r})]})]})};kc.displayName="AddToCart.Card.StyleSize";const{helpers:np}=Oo,Mc=({className:e,item:t,texture:r,...n})=>{const{itemOffered:{name:s,brand:i,skuName:a,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:p}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:h}}=tt(),{size:d}=np.product.getColorAndSizeFromSkuName(a??s,h);return o.jsxs("div",{...n,className:_.helpers.classNameConcat(Oe["add-to-cart--card--content"],e),children:[o.jsx(Oc,{brand:i.name,name:s}),o.jsx(Tc,{price:u,listPrice:p,quantity:l,productId:t.id}),o.jsx(kc,{size:d,texture:r,productGroupID:c})]})};Mc.displayName="AddToCart.Card.Content";const Lc=({image:e,thumbnail:t=!1})=>o.jsx(Be.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Lc.displayName="AddToCart.Card";const Dc=({className:e,item:t,texture:r,thumbnail:n,...s})=>{const{itemOffered:{image:[i]}}=t,a=ae.updatedResizedImg(i.url,{width:200,height:300});return o.jsxs("div",{...s,className:_.helpers.classNameConcat(Oe["add-to-cart--card"],e),children:[o.jsx(Lc,{image:{alternateName:i.alternateName||"Produto",url:a||""},thumbnail:n}),!n&&o.jsx(Mc,{item:t,texture:r})]})};Dc.displayName="AddToCart.Card";const $c=({className:e,children:t,title:r,...n})=>o.jsxs("div",{...n,className:_.helpers.classNameConcat(Oe["add-to-cart--content"],e),children:[o.jsx("div",{className:Oe["add-to-cart--content--title"],children:r&&o.jsx("h2",{children:r})}),t,o.jsx(Xe.Footer,{})]});$c.displayName="AddToCart.Layout.Content";const Bc=({className:e,...t})=>{var f,m;const{isMobile:r,handleClose:n,CONSTANTS:{ADD_TO_CART:s}}=tt(),{cartStore:{totalizers:i},setIsOpen:a}=ze(),c=(f=i.find(y=>y.id==="Discounts"))==null?void 0:f.value,l=((m=i.find(y=>y.id==="Items"))==null?void 0:m.value)??0,u=i.find(y=>y.id==="Shipping"),h=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,d=ae.formatPriceToCurrency(h??0);return o.jsxs("div",{...t,className:_.helpers.classNameConcat(Oe["add-to-cart--footer"],e),children:[o.jsxs("div",{className:Oe["add-to-cart--footer--total"],children:[o.jsx("span",{children:"Subtotal:"}),o.jsx("span",{children:d})]}),o.jsx(_.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>a(!0),children:s.footer.bag}),r?o.jsx(_.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:s.footer.keep_buying}):o.jsx(_.Button,{onClick:()=>n(),size:"medium",variant:"tertiary",children:s.footer.keep_buying})]})};Bc.displayName="AddToCart.Layout.Footer";const Fc=({children:e,className:t,thumbnail:r=!1,...n})=>{const{cartStore:{options:s}}=ze(),{recentlyAddedProducts:i}=xt(),a=i.length>3?4:i.length;return o.jsxs("div",{...n,className:Oe["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(i)&&i.filter((c,l)=>l<a).map(c=>{var u;const l=(u=s==null?void 0:s.find(p=>p.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return o.jsx(Xe.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};Fc.displayName="AddToCart.Layout.Items";const qc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:n}=tt(),{isMobile:s}=Se();return o.jsxs(_.Modal.Root,{"data-modal":"add-to-cart--modal",className:Oe["add-to-cart__modal"],isMobile:s??!1,isOpen:r,setIsOpen:n,variant:"sideBottom",style:{zIndex:t.modal},children:[o.jsx(_.Modal.Header,{navigation:"top",children:o.jsx(_.Modal.Controls,{navigation:"top",isMobile:!0})}),o.jsx(_.Modal.Body,{children:e})]})};qc.displayName="AddToCart.Modal";const op=({children:e})=>{const{count:t,handleClose:r,setIsOpen:n}=tt(),s=x.useRef(t);return x.useEffect(()=>{t>s.current&&n(!0),t<s.current&&s.current>=1&&r(),s.current=t},[t,r,n]),o.jsx(o.Fragment,{children:e})},zc=({children:e,component:t,CONSTANTS:r,...n})=>{const{recentlyAddedProducts:s}=xt(),{isMobile:i}=Se(),a=s.length>3?4:s.length;return o.jsx(oc,{...n,count:a,isMobile:i,CONSTANTS:r,children:o.jsx(op,{children:i?o.jsxs(o.Fragment,{children:[o.jsx(Xe.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):o.jsx(Xe.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};zc.displayName="AddToCart.Root";const Hc=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:s,left:i,isLeaving:a,target:c,isOpen:l,top:u}=tt();return o.jsx(_.Tooltip.Root,{arrow:"top-right",component:o.jsx("div",{...n,ref:s,children:t}),id:"add-to-cart--tooltip",className:Oe["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:a,isOpen:l,left:i,size:"medium",position:"top",top:u,children:o.jsx("div",{className:Oe["add-to-cart--tooltip"],ref:c,children:e})})};Hc.displayName="AddToCart.Tooltip";const Xe={Card:Dc,Content:$c,Footer:Bc,Items:Fc,Modal:qc,Root:zc,Tooltip:Hc},To=({title:e,...t})=>{const{recentlyAddedProducts:r}=xt(),{isMobile:n}=Se(),s=r.length>3?4:r.length,i=r.length>(s??1),a=r.length>1;return o.jsx(Xe.Root,{isMobile:n,count:r.length,component:o.jsx(Xe.Content,{title:e,children:o.jsx(Xe.Items,{thumbnail:a,children:i&&o.jsx(_.Badge.Count,{count:r.length-s,size:"medium",variant:"secondary"})})}),...t})};To.displayName="AddToCart";const ts={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},sp=({children:e,className:t,adornment:r,iconPosition:n,scrollToOptions:s,style:i,...a})=>{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=n&&r?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[n]}:{},p=()=>{window&&window.document.body.scrollTo({...c})};return o.jsx(_.Card,{...a,shadow:!0,padding:"small",className:_.helpers.classNameConcat(ts["card-modifier"],t),style:{...i,padding:0},children:o.jsxs("button",{className:ts["backtotop-btn"],onClick:p,style:{...u},"data-orientation":n,children:[r,e]})})},ip="_container_1sy8s_16",We={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:ip,"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"},ap=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const n=Object.values(e.products).length;return o.jsxs("div",{className:We["add-itens-to-cart-container"],children:[o.jsxs("div",{className:We["add-itens-to-cart-container-values"],children:[o.jsx("div",{className:We["add-itens-to-cart-qty-products"],children:o.jsx("span",{children:n===0?r.BUY_PACKAGE.group_cart.select_all_product:`${n} ${n===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),o.jsx("div",{className:We["add-itens-to-cart-total"],children:o.jsx("span",{children:ae.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),o.jsx(_.Button,{onClick:t,className:We["add-button"],size:"large",disabled:n===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},cp=e=>e.reduce((t,r)=>{var s;const n=t.find(i=>i.node.id===r.node.id);if(!n)return[...t,r];if((s=n==null?void 0:n.node.isVariantOf)!=null&&s.hasVariant){const i=n.node.isVariantOf.hasVariant,a=r.node.isVariantOf.hasVariant;i&&a&&(n.node.isVariantOf.hasVariant=[...i,...a])}return t},[]),lp=({selectedProduct:e,productId:t,prevState:r,mainSellerId:n})=>{const{products:s,totalPrice:i}=r;try{if(!e){const{[t]:u,...p}=s;return{...r,totalPrice:i-u.price,products:p}}const a=ae.getValidOffer(e.offers.offers,n);if(!a)return r;const c=a.seller.identifier,l=a.price;if(s[t]){const{price:u}=s[t];return s[t]={...s[t],price:l,id:e.sku,seller:c},{totalPrice:i+l-u,products:{...s}}}return{totalPrice:i+l,products:{...s,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(a){return console.error("Error handling SKU selection:",a),r}},Uc=x.createContext({}),up=({children:e,item:t,index:r,shelfTitle:n,...s})=>{const[i,a]=x.useState(null),c=x.useRef(null),l=x.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:p}=ge(),h=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:y}})},d=()=>{h("add_to_wishlist")},f=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:i,selectedSkus:[i]},customData:{index:r}}})},m=()=>{n&&(p.current={item_list_name:n}),h("select_item")};return o.jsx(Uc.Provider,{value:x.useMemo(()=>({...s,index:r,item:t,element:c,selectedSku:i,setSelectedSku:a,eventDataRef:l,sendAddToWishlistEvent:d,sendSelectItemEvent:m,sendAddToCartEvent:f}),[s,t,c,i]),children:e})},De=()=>{const e=x.useContext(Uc);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},we={"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"},Wc=({callback:e,children:t,className:r,data:n,isKit:s,...i})=>{const{item:{availability:{status:a},image:c}}=De();return a?o.jsxs("div",{...i,className:_.helpers.classNameConcat(we["product-card--actions"],r),children:[o.jsxs(_e.Wrapper,{type:"actions--group",children:[o.jsx(_e.Price,{}),o.jsx("div",{className:we["product-card--actions--selectors"],children:!s&&o.jsx(_e.StyleSelector,{data:n,images:c,callback:e})})]}),t]}):null};Wc.displayName="ProductCard.Actions";const Gc=({className:e,isKit:t,...r})=>{const{addToCart:n}=ze(),{isMobile:s=!1,selectedSku:i,outStock:a,item:c,sendAddToCartEvent:l,CONSTANTS:u}=De(),p=()=>{var f;if(!i)return;const d=ae.getValidOffer(i.offers.offers,u.StoreConfig_MainSellerId);d&&n({id:i==null?void 0:i.sku,quantity:1,seller:d.seller.identifier},{id:c.id,texture:(f=c==null?void 0:c.image.find(m=>u.TEXTURE_IMAGE.includes(m.alternateName)))==null?void 0:f.url}),l()},h=i?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return o.jsx(_.Button,{...r,className:_.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!i&&!a,size:s?"medium":"large",variant:a?"secondary":"primary",onClick:a?r.onClick:p,children:a?"Avise-me quando chegar":h})};Gc.displayName="ProductCard.Actions.BuyButton";const Vc=({product:e,tag:t,size:r="small"})=>{const n=e.offers.offers[0],{CONSTANTS:s,WishListToggle:i}=De();return o.jsxs(_e.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[t?o.jsx(_.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?o.jsx(_.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&o.jsx(i,{product:e,priceInfo:{price:n.price,listPrice:n.listPrice},variant:"card"})]})};Vc.displayName="ProductCard.Actions.Header";var Kc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dp(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var io={exports:{}},Ne={};Ne._=Ne._interop_require_default=fp;function fp(e){return e&&e.__esModule?e:{default:e}}var Tt={exports:{}},pr={},rs;function Xc(){return rs||(rs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){for(var l in c)Object.defineProperty(a,l,{enumerable:!0,get:c[l]})}t(e,{searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return s},assign:function(){return i}});function r(a){const c={};return a.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 n(a){return typeof a=="string"||typeof a=="number"&&!isNaN(a)||typeof a=="boolean"?String(a):""}function s(a){const c=new URLSearchParams;return Object.entries(a).forEach(l=>{let[u,p]=l;Array.isArray(p)?p.forEach(h=>c.append(u,n(h))):c.set(u,n(p))}),c}function i(a){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(p=>{Array.from(p.keys()).forEach(h=>a.delete(h)),p.forEach((h,d)=>a.append(d,h))}),a}}(pr)),pr}var mr={},ct={};function Yc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Yc=function(n){return n?r:t})(e)}ct._=ct._interop_require_wildcard=pp;function pp(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Yc(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}var ns;function Qc(){return ns||(ns=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var p in u)Object.defineProperty(l,p,{enumerable:!0,get:u[p]})}t(e,{formatUrl:function(){return i},urlObjectKeys:function(){return a},formatWithValidation:function(){return c}});const n=ct._(Xc()),s=/https?|ftp|gopher|file/;function i(l){let{auth:u,hostname:p}=l,h=l.protocol||"",d=l.pathname||"",f=l.hash||"",m=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:p&&(y=u+(~p.indexOf(":")?"["+p+"]":p),l.port&&(y+=":"+l.port)),m&&typeof m=="object"&&(m=String(n.urlQueryToSearchParams(m)));let g=l.search||m&&"?"+m||"";return h&&!h.endsWith(":")&&(h+=":"),l.slashes||(!h||s.test(h))&&y!==!1?(y="//"+(y||""),d&&d[0]!=="/"&&(d="/"+d)):y||(y=""),f&&f[0]!=="#"&&(f="#"+f),g&&g[0]!=="?"&&(g="?"+g),d=d.replace(/[?#]/g,encodeURIComponent),g=g.replace("#","%23"),""+h+y+d+g+f}const a=["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=>{a.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),i(l)}}(mr)),mr}var hr={},os;function mp(){return os||(os=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,n){const s={};return Object.keys(r).forEach(i=>{n.includes(i)||(s[i]=r[i])}),s}}(hr)),hr}var gr={},ss;function or(){return ss||(ss=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(S,E){for(var R in E)Object.defineProperty(S,R,{enumerable:!0,get:E[R]})}t(e,{WEB_VITALS:function(){return r},execOnce:function(){return n},isAbsoluteUrl:function(){return i},getLocationOrigin:function(){return a},getURL:function(){return c},getDisplayName:function(){return l},isResSent:function(){return u},normalizeRepeatedSlashes:function(){return p},loadGetInitialProps:function(){return h},SP:function(){return d},ST:function(){return f},DecodeError:function(){return m},NormalizeError:function(){return y},PageNotFoundError:function(){return g},MissingStaticPage:function(){return b},MiddlewareNotFoundError:function(){return j},stringifyError:function(){return v}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(S){let E=!1,R;return function(){for(var C=arguments.length,A=new Array(C),k=0;k<C;k++)A[k]=arguments[k];return E||(E=!0,R=S(...A)),R}}const s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=S=>s.test(S);function a(){const{protocol:S,hostname:E,port:R}=window.location;return S+"//"+E+(R?":"+R:"")}function c(){const{href:S}=window.location,E=a();return S.substring(E.length)}function l(S){return typeof S=="string"?S:S.displayName||S.name||"Unknown"}function u(S){return S.finished||S.headersSent}function p(S){const E=S.split("?");return E[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(E[1]?"?"+E.slice(1).join("?"):"")}async function h(S,E){if(process.env.NODE_ENV!=="production"){var R;if((R=S.prototype)!=null&&R.getInitialProps){const k='"'+l(S)+'.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(k)}}const C=E.res||E.ctx&&E.ctx.res;if(!S.getInitialProps)return E.ctx&&E.Component?{pageProps:await h(E.Component,E.ctx)}:{};const A=await S.getInitialProps(E);if(C&&u(C))return A;if(!A){const k='"'+l(S)+'.getInitialProps()" should resolve to an object. But found "'+A+'" instead.';throw new Error(k)}return process.env.NODE_ENV!=="production"&&Object.keys(A).length===0&&!E.ctx&&console.warn(""+l(S)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),A}const d=typeof performance<"u",f=d&&["mark","measure","getEntriesByName"].every(S=>typeof performance[S]=="function");class m extends Error{}class y extends Error{}class g extends Error{constructor(E){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+E}}class b extends Error{constructor(E,R){super(),this.message="Failed to load static file for page: "+E+" "+R}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(S){return JSON.stringify({message:S.message,stack:S.stack})}}(gr)),gr}var kt={exports:{}},yr={},is;function Zc(){return is||(is=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.replace(/\/$/,"")||"/"}}(yr)),yr}var _r={},as;function ko(){return as||(as=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(r){const n=r.indexOf("#"),s=r.indexOf("?"),i=s>-1&&(n<0||s<n);return i||n>-1?{pathname:r.substring(0,i?s:n),query:i?r.substring(s,n>-1?n:void 0):"",hash:n>-1?r.slice(n):""}:{pathname:r,query:"",hash:""}}}(_r)),_r}var cs;function sr(){return cs||(cs=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return s}});const r=Zc(),n=ko(),s=i=>{if(!i.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return i;const{pathname:a,query:c,hash:l}=(0,n.parsePath)(i);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(a)?""+(0,r.removeTrailingSlash)(a)+c+l:a.endsWith("/")?""+a+c+l:a+"/"+c+l:""+(0,r.removeTrailingSlash)(a)+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)}(kt,kt.exports)),kt.exports}var vr={},Mt={exports:{}},br={},ls;function Jc(){return ls||(ls=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return r}});const t=ko();function r(n,s){if(typeof n!="string")return!1;const{pathname:i}=(0,t.parsePath)(n);return i===s||i.startsWith(s+"/")}}(br)),br}var us;function hp(){return us||(us=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return s}});const r=Jc(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function s(i){return(0,r.pathHasPrefix)(i,n)}(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)}(Mt,Mt.exports)),Mt.exports}var ds;function el(){return ds||(ds=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return n}});const t=or(),r=hp();function n(s){if(!(0,t.isAbsoluteUrl)(s))return!0;try{const i=(0,t.getLocationOrigin)(),a=new URL(s,i);return a.origin===i&&(0,r.hasBasePath)(a.pathname)}catch{return!1}}}(vr)),vr}var xr={},Cr={},fs;function gp(){return fs||(fs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class t{insert(s){this._insert(s.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(s){s===void 0&&(s="/");const i=[...this.children.keys()].sort();this.slugName!==null&&i.splice(i.indexOf("[]"),1),this.restSlugName!==null&&i.splice(i.indexOf("[...]"),1),this.optionalRestSlugName!==null&&i.splice(i.indexOf("[[...]]"),1);const a=i.map(c=>this.children.get(c)._smoosh(""+s+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&a.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+']]").');a.unshift(c)}return this.restSlugName!==null&&a.push(...this.children.get("[...]")._smoosh(s+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&a.push(...this.children.get("[[...]]")._smoosh(s+"[[..."+this.optionalRestSlugName+"]]/")),a}_insert(s,i,a){if(s.length===0){this.placeholder=!1;return}if(a)throw new Error("Catch-all must be the last part of the URL.");let c=s[0];if(c.startsWith("[")&&c.endsWith("]")){let p=function(h,d){if(h!==null&&h!==d)throw new Error("You cannot use different slug names for the same dynamic path ('"+h+"' !== '"+d+"').");i.forEach(f=>{if(f===d)throw new Error('You cannot have the same slug name "'+d+'" repeat within a single dynamic path');if(f.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+f+'" and "'+d+'" differ only by non-word symbols within a single dynamic path')}),i.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),a=!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(a)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]+'" ).');p(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]+'").');p(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+s[0]+'").');p(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),i,a)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(n){const s=new t;return n.forEach(i=>s.insert(i)),s.smoosh()}}(Cr)),Cr}var Sr={},ps;function yp(){return ps||(ps=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return r}});const t=/\/\[[^/]+?\](?=\/|$)/;function r(n){return t.test(n)}}(Sr)),Sr}var ms;function _p(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,i){for(var a in i)Object.defineProperty(s,a,{enumerable:!0,get:i[a]})}t(e,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return n.isDynamicRoute}});const r=gp(),n=yp()}(xr)),xr}var jr={},Er={},hs;function vp(){return hs||(hs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=or();function r(n){let{re:s,groups:i}=n;return a=>{const c=s.exec(a);if(!c)return!1;const l=p=>{try{return decodeURIComponent(p)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(i).forEach(p=>{const h=i[p],d=c[h.pos];d!==void 0&&(u[p]=~d.indexOf("/")?d.split("/").map(f=>l(f)):h.repeat?[l(d)]:l(d))}),u}}}(Er)),Er}var wr={},Rr={},Ar={},Pr={},gs;function bp(){return gs||(gs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.startsWith("/")?r:"/"+r}}(Pr)),Pr}var Ir={},ys;function xp(){return ys||(ys=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isGroupSegment",{enumerable:!0,get:function(){return t}});function t(r){return r[0]==="("&&r.endsWith(")")}}(Ir)),Ir}var _s;function Cp(){return _s||(_s=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){for(var l in c)Object.defineProperty(a,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return s},normalizeRscPath:function(){return i}});const r=bp(),n=xp();function s(a){return(0,r.ensureLeadingSlash)(a.split("/").reduce((c,l,u,p)=>!l||(0,n.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===p.length-1?c:c+"/"+l,""))}function i(a,c){return c?a.replace(/\.rsc($|\?)/,"$1"):a}}(Ar)),Ar}var vs;function Sp(){return vs||(vs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){for(var l in c)Object.defineProperty(a,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return n},isInterceptionRouteAppPath:function(){return s},extractInterceptionRouteInformation:function(){return i}});const r=Cp(),n=["(..)(..)","(.)","(..)","(...)"];function s(a){return a.split("/").find(c=>n.find(l=>c.startsWith(l)))!==void 0}function i(a){let c,l,u;for(const p of a.split("/"))if(l=n.find(h=>p.startsWith(h)),l){[c,u]=a.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${a}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,r.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${a}. 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 p=c.split("/");if(p.length<=2)throw new Error(`Invalid interception route: ${a}. Cannot use (..)(..) marker at the root level or one level up.`);u=p.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(Rr)),Rr}var Nr={},bs;function jp(){return bs||(bs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return n}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function n(s){return t.test(s)?s.replace(r,"\\$&"):s}}(Nr)),Nr}var xs;function Ep(){return xs||(xs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,g){for(var b in g)Object.defineProperty(y,b,{enumerable:!0,get:g[b]})}t(e,{getRouteRegex:function(){return u},getNamedRouteRegex:function(){return f},getNamedMiddlewareRegex:function(){return m}});const r=Sp(),n=jp(),s=Zc(),i="nxtP",a="nxtI";function c(y){const g=y.startsWith("[")&&y.endsWith("]");g&&(y=y.slice(1,-1));const b=y.startsWith("...");return b&&(y=y.slice(3)),{key:y,repeat:b,optional:g}}function l(y){const g=(0,s.removeTrailingSlash)(y).slice(1).split("/"),b={};let j=1;return{parameterizedRoute:g.map(v=>{const S=r.INTERCEPTION_ROUTE_MARKERS.find(R=>v.startsWith(R)),E=v.match(/\[((?:\[.*\])|.+)\]/);if(S&&E){const{key:R,optional:C,repeat:A}=c(E[1]);return b[R]={pos:j++,repeat:A,optional:C},"/"+(0,n.escapeStringRegexp)(S)+"([^/]+?)"}else if(E){const{key:R,repeat:C,optional:A}=c(E[1]);return b[R]={pos:j++,repeat:C,optional:A},C?A?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,n.escapeStringRegexp)(v)}).join(""),groups:b}}function u(y){const{parameterizedRoute:g,groups:b}=l(y);return{re:new RegExp("^"+g+"(?:/)?$"),groups:b}}function p(){let y=0;return()=>{let g="",b=++y;for(;b>0;)g+=String.fromCharCode(97+(b-1)%26),b=Math.floor((b-1)/26);return g}}function h(y){let{getSafeRouteKey:g,segment:b,routeKeys:j,keyPrefix:v}=y;const{key:S,optional:E,repeat:R}=c(b);let C=S.replace(/\W/g,"");v&&(C=""+v+C);let A=!1;return(C.length===0||C.length>30)&&(A=!0),isNaN(parseInt(C.slice(0,1)))||(A=!0),A&&(C=g()),v?j[C]=""+v+S:j[C]=""+S,R?E?"(?:/(?<"+C+">.+?))?":"/(?<"+C+">.+?)":"/(?<"+C+">[^/]+?)"}function d(y,g){const b=(0,s.removeTrailingSlash)(y).slice(1).split("/"),j=p(),v={};return{namedParameterizedRoute:b.map(S=>{const E=r.INTERCEPTION_ROUTE_MARKERS.some(C=>S.startsWith(C)),R=S.match(/\[((?:\[.*\])|.+)\]/);return E&&R?h({getSafeRouteKey:j,segment:R[1],routeKeys:v,keyPrefix:g?a:void 0}):R?h({getSafeRouteKey:j,segment:R[1],routeKeys:v,keyPrefix:g?i:void 0}):"/"+(0,n.escapeStringRegexp)(S)}).join(""),routeKeys:v}}function f(y,g){const b=d(y,g);return{...u(y),namedRegex:"^"+b.namedParameterizedRoute+"(?:/)?$",routeKeys:b.routeKeys}}function m(y,g){const{parameterizedRoute:b}=l(y),{catchAll:j=!0}=g;if(b==="/")return{namedRegex:"^/"+(j?".*":"")+"$"};const{namedParameterizedRoute:v}=d(y,!1);let S=j?"(?:(/.*)?)":"";return{namedRegex:"^"+v+S+"$"}}}(wr)),wr}var Cs;function wp(){return Cs||(Cs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return n}});const t=vp(),r=Ep();function n(s,i,a){let c="";const l=(0,r.getRouteRegex)(s),u=l.groups,p=(i!==s?(0,t.getRouteMatcher)(l)(i):"")||a;c=s;const h=Object.keys(u);return h.every(d=>{let f=p[d]||"";const{repeat:m,optional:y}=u[d];let g="["+(m?"...":"")+d+"]";return y&&(g=(f?"":"/")+"["+g+"]"),m&&!Array.isArray(f)&&(f=[f]),(y||d in p)&&(c=c.replace(g,m?f.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(f))||"/")})||(c=""),{params:h,result:c}}}(jr)),jr}var Ss;function Rp(){return Ss||(Ss=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return p}});const r=Xc(),n=Qc(),s=mp(),i=or(),a=sr(),c=el(),l=_p(),u=wp();function p(h,d,f){let m,y=typeof d=="string"?d:(0,n.formatWithValidation)(d);const g=y.match(/^[a-zA-Z]{1,}:\/\//),b=g?y.slice(g[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 v=(0,i.normalizeRepeatedSlashes)(b);y=(g?g[0]:"")+v}if(!(0,c.isLocalURL)(y))return f?[y]:y;try{m=new URL(y.startsWith("#")?h.asPath:h.pathname,"http://n")}catch{m=new URL("/","http://n")}try{const v=new URL(y,m);v.pathname=(0,a.normalizePathTrailingSlash)(v.pathname);let S="";if((0,l.isDynamicRoute)(v.pathname)&&v.searchParams&&f){const R=(0,r.searchParamsToUrlQuery)(v.searchParams),{result:C,params:A}=(0,u.interpolateAs)(v.pathname,v.pathname,R);C&&(S=(0,n.formatWithValidation)({pathname:C,hash:v.hash,query:(0,s.omit)(R,A)}))}const E=v.origin===m.origin?v.href.slice(v.origin.length):v.href;return f?[E,S||E]:E}catch{return f?[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)}(Tt,Tt.exports)),Tt.exports}var Lt={exports:{}},Or={},Tr={},js;function tl(){return js||(js=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return r}});const t=ko();function r(n,s){if(!n.startsWith("/")||!s)return n;const{pathname:i,query:a,hash:c}=(0,t.parsePath)(n);return""+s+i+a+c}}(Tr)),Tr}var Es;function Ap(){return Es||(Es=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return n}});const t=tl(),r=Jc();function n(s,i,a,c){if(!i||i===a)return s;const l=s.toLowerCase();return!c&&((0,r.pathHasPrefix)(l,"/api")||(0,r.pathHasPrefix)(l,"/"+i.toLowerCase()))?s:(0,t.addPathPrefix)(s,"/"+i)}}(Or)),Or}var ws;function Pp(){return ws||(ws=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const r=sr(),n=function(s){for(var i=arguments.length,a=new Array(i>1?i-1:0),c=1;c<i;c++)a[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(Ap().addLocale(s,...a)):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)}(Lt,Lt.exports)),Lt.exports}var kr={},Rs;function rl(){return Rs||(Rs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return n}});const n=Ne._(x).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="RouterContext")}(kr)),kr}var Mr={},As;function Ip(){return As||(As=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,p){for(var h in p)Object.defineProperty(u,h,{enumerable:!0,get:p[h]})}t(e,{CacheStates:function(){return s},AppRouterContext:function(){return i},LayoutRouterContext:function(){return a},GlobalLayoutRouterContext:function(){return c},TemplateContext:function(){return l}});const n=Ne._(x);var s;(function(u){u.LAZY_INITIALIZED="LAZYINITIALIZED",u.DATA_FETCH="DATAFETCH",u.READY="READY"})(s||(s={}));const i=n.default.createContext(null),a=n.default.createContext(null),c=n.default.createContext(null),l=n.default.createContext(null);process.env.NODE_ENV!=="production"&&(i.displayName="AppRouterContext",a.displayName="LayoutRouterContext",c.displayName="GlobalLayoutRouterContext",l.displayName="TemplateContext")}(Mr)),Mr}var Dt={exports:{}},$t={exports:{}},Ps;function nl(){return Ps||(Ps=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(i,a){for(var c in a)Object.defineProperty(i,c,{enumerable:!0,get:a[c]})}r(t,{requestIdleCallback:function(){return n},cancelIdleCallback:function(){return s}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(i){let a=Date.now();return self.setTimeout(function(){i({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-a))}})},1)},s=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(i){return clearTimeout(i)};(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)}($t,$t.exports)),$t.exports}var Is;function Np(){return Is||(Is=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=x,n=nl(),s=typeof IntersectionObserver=="function",i=new Map,a=[];function c(p){const h={root:p.root||null,margin:p.rootMargin||""},d=a.find(g=>g.root===h.root&&g.margin===h.margin);let f;if(d&&(f=i.get(d),f))return f;const m=new Map,y=new IntersectionObserver(g=>{g.forEach(b=>{const j=m.get(b.target),v=b.isIntersecting||b.intersectionRatio>0;j&&v&&j(v)})},p);return f={id:h,observer:y,elements:m},a.push(h),i.set(h,f),f}function l(p,h,d){const{id:f,observer:m,elements:y}=c(d);return y.set(p,h),m.observe(p),function(){if(y.delete(p),m.unobserve(p),y.size===0){m.disconnect(),i.delete(f);const b=a.findIndex(j=>j.root===f.root&&j.margin===f.margin);b>-1&&a.splice(b,1)}}}function u(p){let{rootRef:h,rootMargin:d,disabled:f}=p;const m=f||!s,[y,g]=(0,r.useState)(!1),b=(0,r.useRef)(null),j=(0,r.useCallback)(S=>{b.current=S},[]);(0,r.useEffect)(()=>{if(s){if(m||y)return;const S=b.current;if(S&&S.tagName)return l(S,R=>R&&g(R),{root:h==null?void 0:h.current,rootMargin:d})}else if(!y){const S=(0,n.requestIdleCallback)(()=>g(!0));return()=>(0,n.cancelIdleCallback)(S)}},[m,d,h,y,b.current]);const v=(0,r.useCallback)(()=>{g(!1)},[]);return[j,y,v]}(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)}(Dt,Dt.exports)),Dt.exports}var Bt={exports:{}},Ft={exports:{}},Lr={},Ns;function Op(){return Ns||(Ns=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(r,n){let s;const i=r.split("/");return(n||[]).some(a=>i[1]&&i[1].toLowerCase()===a.toLowerCase()?(s=a,i.splice(1,1),r=i.join("/")||"/",!0):!1),{pathname:r,detectedLocale:s}}}(Lr)),Lr}var Os;function Tp(){return Os||(Os=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(n,s)=>process.env.__NEXT_I18N_SUPPORT?Op().normalizeLocalePath(n,s):{pathname:n,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)}(Ft,Ft.exports)),Ft.exports}var qt={exports:{}},Dr={},Ts;function kp(){return Ts||(Ts=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(r,n,s){if(r){s&&(s=s.toLowerCase());for(const c of r){var i,a;const l=(i=c.domain)==null?void 0:i.split(":")[0].toLowerCase();if(n===l||s===c.defaultLocale.toLowerCase()||(a=c.locales)!=null&&a.some(u=>u.toLowerCase()===s))return c}}}}(Dr)),Dr}var ks;function Mp(){return ks||(ks=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];if(process.env.__NEXT_I18N_SUPPORT)return kp().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)}(qt,qt.exports)),qt.exports}var Ms;function Lp(){return Ms||(Ms=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return s}});const r=sr(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function s(i,a,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=Tp().normalizeLocalePath,p=Mp().detectDomainLocale,h=a||u(i,c).detectedLocale,d=p(l,void 0,h);if(d){const f="http"+(d.http?"":"s")+"://",m=h===d.defaultLocale?"":"/"+h;return""+f+d.domain+(0,r.normalizePathTrailingSlash)(""+n+m+i)}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)}(Bt,Bt.exports)),Bt.exports}var zt={exports:{}},Ls;function Dp(){return Ls||(Ls=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return i}});const r=tl(),n=sr(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function i(a,c){return(0,n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?a:(0,r.addPathPrefix)(a,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)}(zt,zt.exports)),zt.exports}var Ht={exports:{}},Ds;function $p(){return Ds||(Ds=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,d){for(var f in d)Object.defineProperty(h,f,{enumerable:!0,get:d[f]})}r(t,{PrefetchKind:function(){return p},ACTION_REFRESH:function(){return n},ACTION_NAVIGATE:function(){return s},ACTION_RESTORE:function(){return i},ACTION_SERVER_PATCH:function(){return a},ACTION_PREFETCH:function(){return c},ACTION_FAST_REFRESH:function(){return l},ACTION_SERVER_ACTION:function(){return u}});const n="refresh",s="navigate",i="restore",a="server-patch",c="prefetch",l="fast-refresh",u="server-action";var p;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(p||(p={})),(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)}(Ht,Ht.exports)),Ht.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});const n=Ne._(x),s=Rp(),i=el(),a=Qc(),c=or(),l=Pp(),u=rl(),p=Ip(),h=Np(),d=Lp(),f=Dp(),m=$p(),y=new Set;function g(R,C,A,k,w,N){if(typeof window>"u"||!N&&!(0,i.isLocalURL)(C))return;if(!k.bypassPrefetchedCheck){const B=typeof k.locale<"u"?k.locale:"locale"in R?R.locale:void 0,O=C+"%"+A+"%"+B;if(y.has(O))return;y.add(O)}const I=N?R.prefetch(C,w):R.prefetch(C,A,k);Promise.resolve(I).catch(B=>{if(process.env.NODE_ENV!=="production")throw B})}function b(R){const A=R.currentTarget.getAttribute("target");return A&&A!=="_self"||R.metaKey||R.ctrlKey||R.shiftKey||R.altKey||R.nativeEvent&&R.nativeEvent.which===2}function j(R,C,A,k,w,N,I,B,O,H){const{nodeName:U}=R.currentTarget;if(U.toUpperCase()==="A"&&(b(R)||!O&&!(0,i.isLocalURL)(A)))return;R.preventDefault();const V=()=>{const W=I??!0;"beforePopState"in C?C[w?"replace":"push"](A,k,{shallow:N,locale:B,scroll:W}):C[w?"replace":"push"](k||A,{forceOptimisticNavigation:!H,scroll:W})};O?n.default.startTransition(V):V()}function v(R){return typeof R=="string"?R:(0,a.formatUrl)(R)}const E=n.default.forwardRef(function(C,A){let k;const{href:w,as:N,children:I,prefetch:B=null,passHref:O,replace:H,shallow:U,scroll:z,locale:V,onClick:W,onMouseEnter:F,onTouchStart:Z,legacyBehavior:P=!1,...T}=C;k=I,P&&(typeof k=="string"||typeof k=="number")&&(k=n.default.createElement("a",null,k));const D=n.default.useContext(u.RouterContext),K=n.default.useContext(p.AppRouterContext),re=D??K,J=!D,L=B!==!1,ee=B===null?m.PrefetchKind.AUTO:m.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let se=function(oe){return new Error("Failed prop type: The prop `"+oe.key+"` expects a "+oe.expected+" in `<Link>`, but got `"+oe.actual+"` instead."+(typeof window<"u"?`
|
|
2
2
|
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(oe=>{if(oe==="href"&&(C[oe]==null||typeof C[oe]!="string"&&typeof C[oe]!="object"))throw se({key:oe,expected:"`string` or `object`",actual:C[oe]===null?"null":typeof C[oe]})}),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(oe=>{const X=typeof C[oe];if(oe==="as"){if(C[oe]&&X!=="string"&&X!=="object")throw se({key:oe,expected:"`string` or `object`",actual:X})}else if(oe==="locale"){if(C[oe]&&X!=="string")throw se({key:oe,expected:"`string`",actual:X})}else if(oe==="onClick"||oe==="onMouseEnter"||oe==="onTouchStart"){if(C[oe]&&X!=="function")throw se({key:oe,expected:"`function`",actual:X})}else if((oe==="replace"||oe==="scroll"||oe==="shallow"||oe==="passHref"||oe==="prefetch"||oe==="legacyBehavior")&&C[oe]!=null&&X!=="boolean")throw se({key:oe,expected:"`boolean`",actual:X})});const Y=n.default.useRef(!1);C.prefetch&&!Y.current&&!J&&(Y.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"&&J&&!N){let se;if(typeof w=="string"?se=w:typeof w=="object"&&typeof w.pathname=="string"&&(se=w.pathname),se&&se.split("/").some(G=>G.startsWith("[")&&G.endsWith("]")))throw new Error("Dynamic href `"+se+"` 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:Q,as:te}=n.default.useMemo(()=>{if(!D){const G=v(w);return{href:G,as:N?v(N):G}}const[se,he]=(0,s.resolveHref)(D,w,!0);return{href:se,as:N?(0,s.resolveHref)(D,N):he||se}},[D,w,N]),$=n.default.useRef(Q),M=n.default.useRef(te);let ne;if(P)if(process.env.NODE_ENV==="development"){W&&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'),F&&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{ne=n.default.Children.only(k)}catch{throw k?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 ne=n.default.Children.only(k);else if(process.env.NODE_ENV==="development"&&(k==null?void 0:k.type)==="a")throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
|
|
4
4
|
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const ie=P?ne&&typeof ne=="object"&&ne.ref:A,[le,ue,ce]=(0,h.useIntersection)({rootMargin:"200px"}),q=n.default.useCallback(se=>{(M.current!==te||$.current!==Q)&&(ce(),M.current=te,$.current=Q),le(se),ie&&(typeof ie=="function"?ie(se):typeof ie=="object"&&(ie.current=se))},[te,ie,Q,ce,le]);n.default.useEffect(()=>{process.env.NODE_ENV==="production"&&re&&(!ue||!L||g(re,Q,te,{locale:V},{kind:ee},J))},[te,Q,ue,V,L,D==null?void 0:D.locale,re,J,ee]);const ye={ref:q,onClick(se){if(process.env.NODE_ENV!=="production"&&!se)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!P&&typeof W=="function"&&W(se),P&&ne.props&&typeof ne.props.onClick=="function"&&ne.props.onClick(se),re&&(se.defaultPrevented||j(se,re,Q,te,H,U,z,V,J,L))},onMouseEnter(se){!P&&typeof F=="function"&&F(se),P&&ne.props&&typeof ne.props.onMouseEnter=="function"&&ne.props.onMouseEnter(se),re&&((!L||process.env.NODE_ENV==="development")&&J||g(re,Q,te,{locale:V,priority:!0,bypassPrefetchedCheck:!0},{kind:ee},J))},onTouchStart(se){!P&&typeof Z=="function"&&Z(se),P&&ne.props&&typeof ne.props.onTouchStart=="function"&&ne.props.onTouchStart(se),re&&(!L&&J||g(re,Q,te,{locale:V,priority:!0,bypassPrefetchedCheck:!0},{kind:ee},J))}};if((0,c.isAbsoluteUrl)(te))ye.href=te;else if(!P||O||ne.type==="a"&&!("href"in ne.props)){const se=typeof V<"u"?V:D==null?void 0:D.locale,he=(D==null?void 0:D.isLocaleDomain)&&(0,d.getDomainLocale)(te,se,D==null?void 0:D.locales,D==null?void 0:D.domainLocales);ye.href=he||(0,f.addBasePath)((0,l.addLocale)(te,se,D==null?void 0:D.defaultLocale))}return P?n.default.cloneElement(ne,ye):n.default.createElement("a",{...T,...ye},k)});(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)})(io,io.exports);var Bp=io.exports,Fp=Bp;const Te=nr(Fp),ol=({className:e,children:t,hasPriority:r=!1,showVideo:n=!1,...s})=>{const{element:i,index:a,item:{image:c,slug:l,video:u},sendSelectItemEvent:p,order:h,CONSTANTS:d}=De(),f=ae.getFirstImages({images:c,label:{first:d.MAIN_IMAGE,second:d.SECOND_IMAGE}});return o.jsxs("div",{...s,className:_.helpers.classNameConcat(we["product-card--image"],e),ref:i,style:{aspectRatio:d.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[o.jsx(Te,{href:`/${l}/p`,onClick:p,onMouseUp:m=>{m.button===1&&p(),d.PLP_INFINITE_SCROLL&&sessionStorage.setItem(d.PLP_GRID_SCROLL_BACK.order,String(h))},children:o.jsx("div",{className:we["product-card--image--container"],children:Array.isArray(f)&&f.map(({url:m,alternateName:y},g)=>x.createElement(Be.Image,{...d.PRODUCT_IMAGE_DIMENSIONS.product_card,style:d.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:g,...r&&{priority:g===0&&a<4},objectFit:"cover",src:m}))})}),d.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&n&&u&&o.jsx(_e.Video,{url:u,poster:f[0].url}),t]})};ol.displayName="ProductCard.Media.Media";const sl=({className:e,callback:t,children:r,...n})=>{const{isMobile:s,item:i,CONSTANTS:{PRODUCT_CARD_TEXTS:a}}=De(),{availability:{status:c}}=i;return c?null:o.jsxs("div",{...n,className:_.helpers.classNameConcat(we["product-card--outstock"],e),children:[o.jsx(_.Tag,{size:"small",variant:"secondary",title:a.disabled,children:a.disabled}),o.jsx(_.Button,{className:_.helpers.classNameConcat(e,"buy-button"),size:s?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(i)},children:a.notify})]})};sl.displayName="ProductCard.OutStock";const il=({children:e,className:t="",index:r,isMobile:n=!1,item:s,size:i,order:a,outStock:c,shelfTitle:l,CONSTANTS:u,WishListToggle:p,...h})=>o.jsx(up,{item:s,isMobile:n,outStock:c,order:a,size:i,index:r,shelfTitle:l,CONSTANTS:u,WishListToggle:p,children:o.jsx("div",{...h,className:_.helpers.classNameConcat(we["product-card--wrapper"],t),"data-size":i,children:e})});il.displayName="ProductCard.Root";const al=({disabled:e,label:t,size:r,value:n,onClick:s,...i})=>o.jsxs(_.ToggleSize.Wrapper,{...i,disabled:!1,outOfStock:e,size:r,onClick:s,children:[o.jsx(_.ToggleSize.DisabledAdornment,{}),o.jsx(_.ToggleSize.Text,{children:t})]});al.displayName="ProductCard.SizeSelector.Item";const cl=({active:e=!1,callback:t,selectedSku:r=null,item:n,setNotify:s})=>{const{item:i,isMobile:a,setSelectedSku:c,eventDataRef:l}=De();n.productId=i.id;const u=ae.disableSKU(n),p=ae.getSKUName(n,"tamanho");!u&&!l.current.availableSkus.includes(p)&&l.current.availableSkus.push(p);const h=x.useCallback(f=>{const m=r===f?null:f;typeof c=="function"&&c(m),typeof t=="function"&&t(m)},[t,c,r]),d=x.useCallback(()=>{if(u&&typeof s=="function"){s(i,n);return}h(n)},[n,s,h,u,i]);return o.jsx(al,{active:e,disabled:u,label:p,onClick:()=>d(),size:a?"x-small":"small",value:n})};cl.displayName="ProductCard.SizeSelector.SkuItem";const ll=({callback:e,className:t="",children:r,setNotify:n,...s})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:a}},selectedSku:c}=De();return o.jsxs("div",{...s,className:_.helpers.classNameConcat(we["product-card--selectors--size"],t),"data-mobile":i,children:[o.jsx("div",{className:we["product-card--selectors--size--skus"],children:Array.isArray(a)&&a.map((l,u)=>o.jsx(cl,{active:c===l,callback:e,item:l,selectedSku:c,setNotify:n},`size--${u}--${l.sku}`))}),o.jsx("div",{className:we["product-card--selectors--size--button"],children:r})]})};ll.displayName="ProductCard.SizeSelector";const ao=({alt:e="",callback:t,more:r,total:n=4,src:s,url:i,...a})=>o.jsxs(_.ToggleStyle.Wrapper,{...a,onClick:()=>{typeof t=="function"&&t(i)},children:[o.jsx(_.ToggleStyle.DisabledAdornment,{}),o.jsxs(_.ToggleStyle.Texture,{children:[s&&o.jsx(Be.Image,{alt:e??s,src:s,height:34,width:34}),r&&o.jsx(_.TextStructure.DivWrapper,{className:we["product-card--selectors--style--more"],children:o.jsxs("p",{children:["+ ",n]})})]})]}),qp=({children:e,callback:t,data:r,total:n=4,size:s,...i})=>{const{index:a}=De(),{triggerSelectItemEventRef:c}=ge();return o.jsxs("div",{...i,children:[e,Array.isArray(r)&&r.slice(0,n).map((l,u)=>o.jsx(ao,{callback:p=>{c.current.trigger=!0,c.current.index=a,typeof t=="function"&&t(p)},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(r)&&(r==null?void 0:r.length)>n&&o.jsx(ao,{size:s,total:r.length-n,more:!0})]})},ul=({callback:e,className:t,data:r,images:n=[],findTexture:s,...i})=>{const{CONSTANTS:a}=De(),c=s||a.TEXTURE_IMAGE,l=n==null?void 0:n.find(u=>c.includes(u.alternateName));return o.jsx(qp,{...i,callback:e,className:_.helpers.classNameConcat(we["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&o.jsx(ao,{active:!0,size:"x-small",src:l.url})})};ul.displayName="ProductCard.StyleSelector";const dl=({className:e,hasDecimal:t,...r})=>{const{isMobile:n,item:{offers:{lowPrice:s,highPrice:i},installments:{count:a,value:c}},eventDataRef:l}=De();l.current.priceInfo={price:s,listPrice:i};const u=ae.formatPriceToCurrency(i,t),p=ae.formatPriceToCurrency(s,t),h=ae.formatPriceToCurrency(c??0),d=n?"horizontal":"stacked";return o.jsx("div",{...r,className:_.helpers.classNameConcat(we["product-card--price"],e),"data-mobile":n,children:o.jsx(_.ProductInfo.Root,{size:"small",layout:d,children:o.jsxs(_.ProductInfo.Wrapper,{size:"small",layout:d,children:[o.jsx(_.ProductInfo.ValuesWrapper,{children:p!==u?o.jsxs(o.Fragment,{children:[o.jsx(_.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),o.jsx(_.ProductInfo.Price,{label:"discountPrice",value:p,size:"small"})]}):o.jsx(_.ProductInfo.Price,{label:"defaultPrice",value:p,size:"small"})}),a&&a>1&&c?o.jsx(_.ProductInfo.Price,{label:"installment",value:`${a}x ${h}`,size:"small"}):null]})})})};dl.displayName="ProductCard.Price";const fl=({tag:e,className:t})=>{const{item:{name:r}}=De();return o.jsxs("div",{className:_.helpers.classNameConcat(we["product-card--title"],t),children:[o.jsx("div",{className:we["product-card--title--tag"],children:e?o.jsx(_.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?o.jsx(_.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):o.jsx("div",{})}),o.jsx("div",{className:we["product-card--title--content"],children:r&&o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{children:o.jsx("h3",{children:r})})})})]})};fl.displayName="ProductCard.Title";const pl=({className:e,url:t,poster:r,...n})=>{const{element:s}=De();return x.useEffect(()=>{if(!(s!=null&&s.current))return;const i=s.current,a=i.querySelector("video");if(a){const c=new IntersectionObserver(p=>{p.forEach(h=>{ae.setVideoPlay(h.isIntersecting,a,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{a.setAttribute("data-loaded","true")},u=()=>{i&&(c.observe(i),a.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,s]),o.jsx("div",{...n,className:_.helpers.classNameConcat(we["product-card--video"],e),children:t&&o.jsx(Be.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};pl.displayName="ProductCard.Media.Video";const ml=({children:e,className:t,type:r,...n})=>o.jsx("div",{...n,className:_.helpers.classNameConcat(we[`product-card--${r}`],t),children:e});ml.displayName="ProductCard.Wrapper";const _e={Actions:Wc,BuyButton:Gc,Header:Vc,Media:ol,Root:il,OutStock:sl,Price:dl,SizeSelector:ll,StyleSelector:ul,Title:fl,Video:pl,Wrapper:ml},zp="_carousel_245ib_1",Hp="_shelf__container_245ib_14",Up="_shelf_without_carousel_245ib_34",yt={carousel:zp,"custom-controllers":"_custom-controllers_245ib_5",shelf__container:Hp,"controllers-arrows-bullets":"_controllers-arrows-bullets_245ib_23",shelf_without_carousel:Up},$s=({title:e})=>o.jsx("div",{className:yt.shelf__container,children:e&&o.jsx(_.TextStructure.Root,{children:o.jsxs(_.TextStructure.DivWrapper,{children:[o.jsx("h2",{className:_.helpers.classNameConcat("typography-style-body-md",ae.responsive["responsive-mobile-flex"]),children:e}),o.jsx("h2",{className:_.helpers.classNameConcat("typography-style-heading-md",ae.responsive["responsive-desktop-flex"]),children:e})]})})}),Wp=({children:e,ICONS:t,itemsPerPage:r,title:n})=>{const{isMobile:s}=Se(),i=r[s?"mobile":"desktop"],{initialize:a,controller:c,itemsStyles:l,pagination:u}=_.Carousel.useCarousel({itemsPerPage:i,gap:10,loop:!0,direction:"row"}),p=x.Children.toArray(e).length;return s||p>=4?o.jsxs(_.Carousel.Root,{innerRef:d=>{a(d)},className:yt.carousel,children:[o.jsxs("div",{className:yt["custom-controllers"],children:[n&&o.jsx($s,{title:n}),i<p&&o.jsxs(_.Carousel.Controller,{className:yt["controllers-arrows-bullets"],children:[o.jsxs(_.Carousel.Arrows,{children:[o.jsx(_.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:o.jsx(_.Icon,{name:t.arrow_left})}}),o.jsx(_.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:o.jsx(_.Icon,{name:t.arrow_right})}})]}),!s&&i>2&&o.jsx(_.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:d=>c==null?void 0:c.navigateTo(d)})]})]}),o.jsx(_.Carousel.Body,{children:x.Children.map(e,(d,f)=>o.jsx(_.Carousel.Item,{style:{...l,overflow:"hidden"},children:d},`${n}_${f}`))})]}):o.jsxs(o.Fragment,{children:[n&&o.jsx($s,{title:n}),o.jsx("div",{className:yt.shelf_without_carousel,children:e})]})},Gp={Shelf:Wp},Vp=({CONSTANTS:e,inView:t,products:r,innerRef:n,WishListToggle:s})=>{const i=x.useMemo(()=>cp(r),[r]),{isMobile:a}=Se(),{addItemsToCart:c}=ze(),{sendDataLayerEvent:l}=ge(),{getAvailableProductTag:u}=bo(),[p,h]=x.useState({totalPrice:0,products:{}}),d=()=>{const m=Object.values(p.products);c(m),l({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:m.map(y=>{const g=i.find(b=>b.node.id===y.productId);return g==null?void 0:g.node})},supportData:{selectedSkus:m,price:p.totalPrice}}})},f=({selectedProduct:m,productId:y})=>{const g=lp({selectedProduct:m,productId:y,prevState:p,mainSellerId:e.StoreConfig_MainSellerId});h(g)};return x.useEffect(()=>{if(!t||i.length===0)return;const m=e.BUY_PACKAGE.header.title;l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:i},customData:{item_list_name:m},outsideEcommerceData:{item_list_name:m}}})},[t]),o.jsxs("div",{className:We.container,ref:n,children:[o.jsx("div",{className:We["carousel-container"],style:{width:i.length<=3?"max-content":"75%"},children:o.jsx(Gp.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:i.length>=3?2.2:i.length},ICONS:e.ICONS,children:Array.isArray(i)&&i.map(({node:m},y)=>{var j,v,S;const g=u(m.cluster.highlights),{availability:{status:b}}=m;return b?o.jsxs(_e.Root,{item:{...m,image:Oo.helpers.product.getFirstImages({images:m.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:y,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,WishListToggle:s,children:[o.jsx(_e.Header,{product:m,tag:g.commercial}),o.jsx(_e.Media,{}),o.jsxs(_e.Wrapper,{type:"body",children:[o.jsx(_e.Title,{tag:{value:(j=g.institucional)==null?void 0:j.value,enableIcon:(v=g.institucional)==null?void 0:v.enableIcon,icon:(S=g.institucional)==null?void 0:S.icon}}),o.jsx(_e.Actions,{children:o.jsx(_e.SizeSelector,{callback:E=>f({selectedProduct:E,productId:m.id})})})]})]},m.id):null})})}),o.jsx("div",{className:We["add-cart-container"],children:o.jsx(ap,{handleAddAllToCart:d,selectedProducts:p,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Mo={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Lo=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=ze(),{handleSelectContent:n}=ge(),{CONSTANTS:s}=Ce(),i=r.reduce((a,c)=>a+(c.quantity??0),0);return o.jsx(_.Header.SupportItem,{onClick:()=>{t(!0),n({content:"header:minicart"})},id:e,children:o.jsxs(_.Badge.AutoPositioner,{children:[o.jsx(_.Badge.Count,{count:i,size:"medium",variant:"primary",style:{backgroundColor:"black",display:i>0?"flex":"none"}}),o.jsx(_.Icon,{name:s.header.ICONS.bag,size:"medium"})]})})};Lo.displayName="Header.Bag";const Et=({children:e,href:t,...r})=>t&&t!=="#"?o.jsx(Te,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,hl=()=>{const{headerData:e}=Ce(),{handleSelectContent:t}=ge(),{reset:r,updateValue:n}=Ge(),s=i=>{i?n(i):r()};return o.jsx(_.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((i,a)=>o.jsx(Et,{href:i.link,onMouseEnter:()=>s(i.submenuId),onFocus:()=>s(i.submenuId),children:o.jsx(_.Header.CategoryItem,{className:Mo["btn-header"],value:i.submenuId??null,adornment:{start:o.jsx(_.Icon,{name:i.iconStart}),end:o.jsx(_.Icon,{name:i.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${i.label}`})},children:i.label})},`category-${i.label}-${a}`))})};hl.displayName="Header.Categories";function Kp(){const{handleSelectContent:e}=ge(),{CONSTANTS:t}=Ce(),{setValue:r}=jo();return o.jsx(_.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:o.jsx(_.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Xp={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Yp={"observer-wrapper":"_observer-wrapper_r43gk_1"},ir=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:n,stopOnIntersection:s=!0,className:i,...a})=>{const c=x.useRef(null),l=ba(c,s,r),{sendDataLayerEvent:u}=ge();return x.useEffect(()=>{l&&(typeof n=="function"&&n(),t&&u({...t}))},[l]),o.jsx("div",{...a,ref:c,className:_.helpers.classNameConcat(Yp["observer-wrapper"],i),children:e})},Do=({thumbnails:e,category:t,isMobile:r=!0,callBack:n})=>{const{handleSelectPromotionEvent:s}=ge(),i=50/e.length;return o.jsx("div",{className:Xp["menu-subcategories-container"],children:e.map((a,c)=>{const l=r?a.srcMobile:a.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:a.promotion_name};return o.jsx(ir,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:o.jsxs(Te,{href:a.link??"#",onClick:()=>{typeof n=="function"&&n(),s({updatePromotionRef:!0,promotion:u})},children:[o.jsx(Be.Image,{src:l,alt:a.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${i}vw`}),a.label&&o.jsx("p",{children:a.label})]})},`thumb-${a.label}-${c}`)})})};Do.displayName="Menu.Thumbnail";const co={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},Qp="_link_w24h0_1",Zp="_wrapper_w24h0_98",Jp="_text_w24h0_106",$r={link:Qp,wrapper:Zp,text:Jp},qe=({children:e,adornments:t,className:r,disableUnderline:n,href:s,mode:i,size:a,title:c,onClick:l,disablePadding:u,...p})=>{const h=_.helpers.ValidateProp({fieldTypes:st.SizesSmallExtended,property:a,fallback:"medium"}),d=_.helpers.ValidateProp({fieldTypes:st.Mode,property:i,fallback:"default"});return o.jsx(Te,{...p,className:_.helpers.classNameConcat($r.link,r),href:s&&s.length>0?s:"#","data-size":h,"data-variant":d,title:c||"NextLink","data-disable-underline":n??!1,"data-disable-padding":u??!0,children:o.jsxs("div",{className:$r.wrapper,onClick:l,children:[t==null?void 0:t.start,o.jsx("p",{className:$r.text,"data-size":h,children:e}),t==null?void 0:t.end]})})},gl=({children:e,dividerOnRight:t=!0,subMenu:r,...n})=>{var l;const{router:s}=Re(),{reset:i}=Ge(),{handleSelectContent:a}=ge(),{CONSTANTS:c}=Ce();return o.jsxs("div",{...n,className:co["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,p)=>{var f,m,y;const h=u.listCollapseDesk&&!((f=u.see_all)!=null&&f.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},d=u.listCollapseDesk&&!((m=u.see_all)!=null&&m.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:o.jsx(_.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return o.jsxs(_.ComponentList.Structure,{children:[o.jsx(Et,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(i(),a({content:`menu:${u.label??""}:${r.label??""}`}))},children:o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{children:o.jsx("h2",{children:u.label})})})}),o.jsx(_.ComponentList.List,{columns:1,...h,className:co["submenu-categories"],children:u.items.map((g,b)=>o.jsx(_.ComponentList.ListItem,{id:`list-item-${g.label}-${b}`,children:o.jsx(qe,{href:g.link??"#",size:"x-small",title:g.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{i(),a({content:`menu:${u.label??""}:${g.label??""}:${r.label??""}`})},children:g.label})},`list-item-${g.label}-${b}`))}),((y=u.see_all)==null?void 0:y.link)&&o.jsx(_.ComponentList.Support,{...d,size:"small",onClick:()=>{var g;(g=u.see_all)!=null&&g.link&&(i(),a({content:`menu:${u.label??""}:${r.label}`}),s.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${p}`)}),t&&o.jsx(_.Utils.Divider,{size:"small",direction:"vertical"})]})};gl.displayName="Menu.Categories";const yl=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:n}=Ce();return o.jsxs(o.Fragment,{children:[o.jsx("div",{...r,className:co["menu-desktop"],style:{...r.style,justifyContent:n.header.ALIGNMENT_MENU},children:e}),t&&o.jsx(_.Utils.Divider,{size:"small"})]})};yl.displayName="Menu.MenuRoot";const Br={Root:yl,Categories:gl,Thumbnail:Do},_l=()=>{const{headerData:e,CONSTANTS:t}=Ce(),r=tr(),{reset:n}=Ge();return o.jsx(_.Header.SubMenu,{children:Array.isArray(e.subMenus)&&e.subMenus.map((s,i)=>{const{thumbnails:a,label:c,id:l}=s,u=l===r,p=a==null?void 0:a.some(h=>!!h.srcDesk);return o.jsxs(Br.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[o.jsx(Br.Categories,{dividerOnRight:!!p,subMenu:s}),Array.isArray(a)&&o.jsx(Br.Thumbnail,{thumbnails:a,isMobile:!1,category:c,callBack:n})]},`submenu-${l}-${i}`)})})};_l.displayName="Header.SubMenu";const vl=()=>{const{handleSelectContent:e}=ge(),{CONSTANTS:t}=Ce();return o.jsx(Te,{href:"/favoritos",children:o.jsx(_.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:o.jsx(_.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};vl.displayName="Header.WishList";const bl=()=>{const{CONSTANTS:e,userMenuDesktopRef:t}=Ce(),{handleSelectContent:r}=ge(),{reset:n}=Ge(),{setValue:s}=St();return o.jsxs(o.Fragment,{children:[o.jsxs(_.Header.Wrapper,{children:[o.jsx(_.Header.Logo,{style:{width:"100%"},children:o.jsx(Te,{href:"/",onMouseEnter:n,children:o.jsx(_.Icon,{name:e.header.ICONS.logo,size:"x-large",onClick:()=>{r({content:"header:logo"})}})})}),o.jsx(hl,{}),o.jsxs(_.Header.Support,{onMouseEnter:n,style:{justifyContent:"flex-end"},children:[o.jsx(Kp,{}),o.jsx(_.Header.SupportItem,{onClick:()=>{s(!0),r({content:"header:user_menu"})},className:Mo["btn-login"],innerRef:t,children:o.jsx(_.Icon,{name:e.header.ICONS.person,size:"medium"})}),o.jsx(vl,{}),o.jsx(Lo,{id:"cart-button"})]})]}),o.jsx(_l,{})]})};bl.displayName="Header.HeaderDesktopWrapper";const em="_divider_1lexj_199",xe={"modal-modifier":"_modal-modifier_1lexj_1","menu-mobile":"_menu-mobile_1lexj_11","menu-header-container":"_menu-header-container_1lexj_26","menu-header-wrapper":"_menu-header-wrapper_1lexj_35","menu-header-navlinks":"_menu-header-navlinks_1lexj_41","menu-body":"_menu-body_1lexj_57","menu-categories-container":"_menu-categories-container_1lexj_74","menu-categories-btn":"_menu-categories-btn_1lexj_108","menu-body-banner-container-modifier":"_menu-body-banner-container-modifier_1lexj_121","menu-categories__banner":"_menu-categories__banner_1lexj_130","menu-submenu-modal-modifiier":"_menu-submenu-modal-modifiier_1lexj_135","menu-submenu":"_menu-submenu_1lexj_135","menu-submenu--item":"_menu-submenu--item_1lexj_150","menu-submenu--thumbnails":"_menu-submenu--thumbnails_1lexj_156","menu-submenu--component-list-modifier":"_menu-submenu--component-list-modifier_1lexj_184","submenu-categories":"_submenu-categories_1lexj_187","menu-navigationbar":"_menu-navigationbar_1lexj_191",divider:em,"menu-navigationbar-item":"_menu-navigationbar-item_1lexj_206","menu-categories-textstructure-modifier":"_menu-categories-textstructure-modifier_1lexj_210"},xl=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,onClick:n,textColor:s,...i})=>o.jsx("button",{onClick:n,className:xe["menu-categories-btn"],children:r?o.jsxs(_.Banner.Container,{...i,className:xe["menu-body-banner-container-modifier"],children:[o.jsx(_.Banner.ImageWrapper,{style:{width:"100%"},children:o.jsx(Be.Image,{src:r,alt:t??r,className:xe["menu-categories__banner"],width:343,height:128,unoptimized:!0})}),o.jsx(_.Banner.Slot,{verticalAlignment:"center",horizontalAlignment:"start",children:o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{className:xe["menu-categories-textstructure-modifier"],children:o.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):o.jsx("h2",{...i,children:e})});xl.displayName="Menu.MenuCategories";const Cl=({children:e,link:t})=>{const{reset:r}=et();return t?o.jsx(Te,{href:t??"#",onClick:r,children:e}):e};Cl.displayName="Menu.MenuCategoriesWrapper";const Sl=({subcategory:e,submenuLabel:t})=>{var l,u,p;const{router:r}=Re(),{reset:n}=et(),{handleSelectContent:s}=ge(),{CONSTANTS:i}=Ce(),a=e.listCollapseMobile&&!((l=e.see_all)!=null&&l.link)?{expandAfterRowsQty:e.rowsToShowMobile}:{},c=e.listCollapseMobile&&!((u=e.see_all)!=null&&u.link)?{expansivesAdornments:{open:i.header.ICONS.add,close:i.header.ICONS.minus},expansivesLabels:{open:i.header.COMPONENT_LIST.listExpandLabel,close:i.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:o.jsx(_.Icon,{name:i.header.ICONS.arrow_right,size:"small"})}};return o.jsxs(_.ComponentList.Structure,{className:xe["menu-submenu--component-list-modifier"],children:[o.jsx(Et,{href:e.linkLabel,title:e.label,onClick:()=>{n(),s({content:`menu:${e.label??""}:${t}`})},children:o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{children:o.jsx("h2",{className:"typography-style-body-sm-strong",children:e.label})})})}),o.jsx(_.ComponentList.List,{columns:1,...a,className:xe["submenu-categories"],children:e.items.map((h,d)=>o.jsx(_.ComponentList.ListItem,{id:`list-item-${h.label}-${d}`,divider:!0,children:o.jsx(qe,{href:h.link??"#",size:"x-small",title:h.label??"",disableUnderline:!0,onClick:()=>{n(),s({content:`menu:${e.label??""}:${h.label}:${t}`})},children:h.label})},`list-item-${h.label}-${d}`))}),((p=e.see_all)==null?void 0:p.link)&&o.jsx(_.ComponentList.Support,{...c,size:"small",onClick:()=>{var h;n(),s({content:`menu:${e.label??""}:${t}`}),(h=e.see_all)!=null&&h.link&&r.push(e.see_all.link)},children:e.see_all.link&&e.see_all.label})]})};Sl.displayName="Menu.SubMenuSubCategory";const jl=({submenu:e})=>{var i;const t=tr(),{handleCloseSubMenu:r}=jt(),{reset:n}=Ge(),{CONSTANTS:s}=Ce();return o.jsxs("div",{className:xe["menu-submenu--item"],style:{display:t===e.id?"flex":"none"},children:[o.jsx(_.TextStructure.Root,{adornment:{start:o.jsx(_.Icon,{name:s.header.ICONS.arrow_back,size:"medium",onClick:r})},layoutProps:{textRow:{alignItems:"center",style:{width:"100%",position:"relative"}},columnWrapper:{alignContent:"center",style:{width:"100%"}}},children:e.label&&o.jsx(_.TextStructure.DivWrapper,{style:{position:"absolute",left:"50%",transform:"translate(-50%)"},children:o.jsx("h2",{className:"typography-style-body-md-strong",children:e.label})})}),o.jsx("div",{className:xe["menu-submenu--thumbnails"],children:Array.isArray(e.thumbnails)&&o.jsx(Do,{thumbnails:e.thumbnails,isMobile:!0,category:e.label,callBack:n})}),(i=e==null?void 0:e.subCategories)==null?void 0:i.map((a,c)=>o.jsx(Sl,{subcategory:a,submenuLabel:e.label},`list-${a.label}-${c}`))]})};jl.displayName="Menu.SubMenuItem";const El=()=>{const{headerData:e}=Ce(),t=tr(),{reset:r}=Ge(),{bodyRef:n}=jt();return o.jsx(_.Modal.RootWithoutPortal,{isOpen:!!t,setIsOpen:r,parent:n.current,variant:"sideLeft",style:{position:"absolute",width:"100%"},className:xe["menu-submenu-modal-modifiier"],children:o.jsx("div",{className:xe["menu-submenu"],children:e.subMenus.map((s,i)=>o.jsx(jl,{submenu:s},`submenu-${s.id}-${i}`))})})};El.displayName="Menu.SubMenu";const wl=({className:e,...t})=>{const{headerData:r}=Ce(),{setValue:n}=Ge(),{bodyRef:s}=jt(),{handleSelectContent:i}=ge();return o.jsxs("div",{...t,ref:s,id:"menu-body",className:xe["menu-body"],children:[o.jsx("div",{className:xe["menu-categories-container"],children:r.categories.map((a,c)=>{const l=a.submenuId?{}:{"data-close":!0};return o.jsx(Cl,{link:a.submenuId?null:a.link,children:o.jsx(xl,{onClick:()=>{n(a.submenuId??null),i({content:`menu:${a.label}`})},mobileBannerSrc:a.mobileBannerSrc,mobileBannerAlt:a.mobileBannerAlt,textColor:a.textColor,...l,children:a.mobileBannerAlt})},`menu-categories-${c}`)})}),o.jsx(El,{})]})};wl.displayName="Menu.MenuBody";const Rl=({title:e,subtitle:t})=>{const{CONSTANTS:r}=Ce();return o.jsxs("div",{className:xe["menu-header-wrapper"],style:t?{alignItems:"start"}:{alignItems:"center"},children:[(e||t)&&o.jsx(_.TextStructure.Root,{children:o.jsxs(_.TextStructure.DivWrapper,{children:[e&&o.jsx("h2",{className:"typography-style-body-md",children:e}),t&&o.jsx("h3",{children:t})]})}),o.jsx(_.Button,{adornment:{end:o.jsx(_.Icon,{name:r.header.ICONS.close})},variant:"tertiary",className:xe["menu-close"],"data-close":!0})]})};Rl.displayName="Menu.MenuHeaderWrapper";const Al=({navigationLinks:e})=>{const{reset:t}=et(),{handleSelectContent:r}=ge();return e?o.jsx("nav",{className:xe["menu-header-navlinks"],children:e.map((n,s)=>o.jsx(qe,{href:n.link??"#",adornments:{start:n.iconStart&&o.jsx(_.Icon,{name:n.iconStart}),end:n.iconEnd&&o.jsx(_.Icon,{name:n.iconEnd})},onClick:()=>{t(),r({content:`menu:navigationlinks-${n.label}`})},children:n.label},s))}):null};Al.displayName="Menu.MenuHeaderNavLinks";const Pl=()=>{const{headerData:e}=Ce();return o.jsxs("div",{className:xe["menu-header-container"],children:[o.jsx(Rl,{title:e.title,subtitle:e.subtitle}),o.jsx(Al,{navigationLinks:e.navigationLinks})]})};Pl.displayName="Menu.MenuHeaderContainer";const Il=({children:e})=>{const{documentBodyRef:t}=jt(),{CONSTANTS:r}=Ce(),n=So(),{setValue:s}=et();return o.jsx(_.Modal.RootWithoutPortal,{isOpen:n,setIsOpen:s,parent:t.current,variant:"sideLeft",style:{position:"fixed",zIndex:r.header.Z_INDEX_WAR.menu_mobile,bottom:"unset",top:0,overflowY:"hidden"},className:xe["modal-modifier"],children:o.jsx("div",{className:xe["menu-mobile"],children:e})})};Il.displayName="Menu.MenuRoot";const Qt=({children:e,...t})=>o.jsxs(o.Fragment,{children:[o.jsx(_.Button,{...t,className:xe["menu-navigationbar-item"],children:e}),o.jsx(_.Utils.Divider,{direction:"vertical",size:"small",className:xe.divider})]});Qt.displayName="Menu.NavigationBarItem";const Nl=()=>{const{setIsOpen:e}=ze(),{reset:t}=et(),{setValue:r}=St(),{handleSelectContent:n}=ge(),{CONSTANTS:s}=Ce(),{router:i}=Re();return o.jsxs(_.Card,{id:"menu-navigationbar",shadow:!0,className:xe["menu-navigationbar"],style:{zIndex:s.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:[o.jsx(Qt,{size:"small",variant:"tertiary",iconNameStart:s.header.MENU_INFO.login.button_icon,onClick:()=>{t(),r(!0),n({content:"menu:user_menu"})},children:s.header.MENU_INFO.login.button_text}),o.jsx(Qt,{size:"small",variant:"tertiary",iconNameStart:s.header.MENU_INFO.bag.button_icon,onClick:()=>{t(),e(!0),n({content:"menu:minicart"})},children:s.header.MENU_INFO.bag.button_text}),o.jsx(Qt,{size:"small",variant:"tertiary",iconNameStart:s.header.MENU_INFO.store.button_icon,onClick:()=>{i.push("/institucional/lojas"),t(),n({content:"menu:store"})},children:s.header.MENU_INFO.store.button_text})]})};Nl.displayName="Menu.NavigationBar";const Ut={Root:Il,NavigationBar:Nl,Header:Pl,Body:wl},Ol=()=>{const e=x.useRef(null),{CONSTANTS:t,userMenuMobileRef:r}=Ce(),{MENU_NAVIGATION_BAR_ALLOWED:n,ICONS:s,MENU_MOB_BTN_SIDE:i="right"}=t.header,{handleSelectContent:a}=ge(),{setValue:c}=jo(),{setValue:l}=et(),{setValue:u}=St();return o.jsxs(o.Fragment,{children:[o.jsxs(_.Header.Wrapper,{children:[i==="left"&&o.jsx(_.Header.SupportItem,{onClick:()=>l(!0),innerRef:e,children:o.jsx(_.Icon,{name:s.menu,size:"medium"})}),o.jsx(_.Header.Logo,{style:{width:"100%",justifyContent:"center"},children:o.jsx(Te,{href:"/",children:o.jsx(_.Icon,{name:s.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),o.jsxs(_.Header.Support,{children:[o.jsx(_.Header.SupportItem,{onClick:()=>{c(!0),a({content:"header:search"})},children:o.jsx(_.Icon,{name:s.search,size:"medium"})}),o.jsx(_.Header.SupportItem,{onClick:()=>{u(!0),a({content:"header:user_menu"})},innerRef:r,children:o.jsx(_.Icon,{name:s.person,size:"medium"})}),o.jsx(Lo,{}),i==="right"&&o.jsx(_.Header.SupportItem,{onClick:()=>l(!0),innerRef:e,children:o.jsx(_.Icon,{name:s.menu,size:"medium"})})]})]}),o.jsx(rc,{children:o.jsxs(Ut.Root,{children:[o.jsx(Ut.Header,{}),o.jsx(Ut.Body,{}),n?o.jsx(Ut.NavigationBar,{}):o.jsx(o.Fragment,{})]})})]})};Ol.displayName="Header.HeaderMobileWrapper";const tm="_root_wvekm_126",Me={"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:tm},Tl=({className:e,children:t,...r})=>o.jsx("div",{...r,className:_.helpers.classNameConcat(Me["user-menu--content"],e),children:t});Tl.displayName="UserMenu.Content";var kl=(e=>(e.Account="account",e))(kl||{});const Ml=({className:e,cashBack:t,credits:r,link:n,total:s,...i})=>{const a=t?ae.formatPriceToCurrency(t):void 0,c=r?ae.formatPriceToCurrency(r):void 0,l=s?ae.formatPriceToCurrency(s):void 0;return o.jsx(_.Credits.Account,{...i,className:_.helpers.classNameConcat(Me["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:a,creditsValue:c,linkMore:n,totalValue:l,type:kl.Account})};Ml.displayName="UserMenu.Credits";const Ll=({className:e,children:t,description:r,text:n,...s})=>{const{isMobile:i}=Se();return o.jsx("div",{...s,className:_.helpers.classNameConcat(Me["user-menu--login"],e),"data-mobile":i,children:o.jsxs("div",{className:Me["user-menu--login--content"],children:[o.jsx(_.TextStructure.Root,{children:o.jsxs(_.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[o.jsx("h3",{className:"typography-style-body-lg-strong",children:n}),o.jsx("p",{children:r})]})}),t]})})};Ll.displayName="UserMenu.Login";const Dl=({className:e,isLogged:t,onLogoutClick:r,ICONS:n,storeConfig:s})=>{const{isMobile:i}=Se(),a=af({ICONS:n,storeConfig:s}).filter(c=>c.deviceShown==="both"||c.deviceShown===(i?"mobile":"desktop"));return o.jsxs("ul",{className:_.helpers.classNameConcat(Me["user-menu--menu"],e),children:[Array.isArray(a)&&a.map((c,l)=>o.jsx("li",{children:o.jsx(qe,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:o.jsx(_.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?o.jsx("li",{children:o.jsx(qe,{href:`${s.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${s.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:o.jsx(_.Icon,{name:sf(n)})},children:of})}):o.jsx(o.Fragment,{})]})};Dl.displayName="UserMenu.Menu";const $l=e=>{const t=x.useRef(null),r=x.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),n=x.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),s=x.useCallback(i=>{i.key==="Escape"&&e()},[e]);return x.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",s),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",s),document.removeEventListener("touchstart",n)}),[r,s,n]),{ref:t}},rm=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},nm=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:n,left:s,top:i,width:a}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?rm(e==null?void 0:e.parentElement):0;return{left:s+a/2-(c.width+l*2),top:i+n+r}},Bl=x.createContext({}),om=({children:e,delay:t=600,gap:r=20,isOpen:n,setIsOpen:s,target:i,...a})=>{const c=x.useRef(null),[l,u]=x.useState(!1),[p,h]=x.useState({left:0,top:0}),{ref:d}=$l(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{s(!1),u(!1)},t))});return x.useEffect(()=>{if(i&&(d!=null&&d.current)){const{left:f,top:m}=nm(d.current,i,r??0);h({left:f,top:m}),u(!1)}},[r,n,i,d]),o.jsx(Bl.Provider,{value:x.useMemo(()=>({...a,...p,contentRef:d,isLeaving:l,isOpen:n,setIsOpen:s,setIsLeaving:u,target:i}),[a,p,d,l,n,s,u,i]),children:e})},Fl=()=>{const e=x.useContext(Bl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},ql=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:n,setIsOpen:s}=Fl();return o.jsxs(_.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:n,setIsOpen:s,variant:"sideBottom",className:Me["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[o.jsx(_.Modal.Header,{navigation:"top",className:Me["modal-header-modifier"],children:o.jsx(_.Modal.Controls,{navigation:"top",isMobile:!0,className:Me["modal-controls-modifier"]})}),o.jsx(_.Modal.Body,{children:e})]})};ql.displayName="UserMenu.Modal";const zl=({children:e,component:t,Z_INDEX_WAR:r,isMobile:n,...s})=>o.jsx(om,{...s,className:Me.root,children:n?o.jsxs(o.Fragment,{children:[o.jsx(Ke.Modal,{Z_INDEX_WAR:r,children:t}),e]}):o.jsx(Ke.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});zl.displayName="UserMenu.Root";const Hl=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:s,left:i,isLeaving:a,isOpen:c,top:l}=Fl();return o.jsx(_.Tooltip.Root,{arrow:"top-right",component:o.jsx("div",{...n,ref:s,children:t}),className:_.helpers.classNameConcat(Me["user-menu--tooltip"],Me["tooltip-modifier"]),isLeaving:a,isOpen:c,left:i,size:"medium",position:"top",top:l,style:{zIndex:r.user_menu},children:o.jsx("div",{className:Me["user-menu--tooltip"],children:e})})};Hl.displayName="UserMenu.Tooltip";const Ke={Credits:Ml,Content:Tl,Login:Ll,Menu:Dl,Modal:ql,Root:zl,Tooltip:Hl},$o=()=>{var y,g,b;const e=Io(),{isMobile:t}=Se(),{userMenuMobileRef:r,userMenuDesktopRef:n,CONSTANTS:{header:s},storeConfig:i}=Ce(),{ICONS:a,Z_INDEX_WAR:c,MENU_INFO:l}=s,u=Ka(),{setValue:p}=St(),h=()=>{window.location.href=`${i.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${i.storeUrl}`)}`},d=!!((y=e.user)!=null&&y.userId),{cashback:f,credits:m}=x.useMemo(()=>{var j,v;return{credits:((j=e==null?void 0:e.getCurrentCredits())==null?void 0:j.credits)??0,cashback:((v=e==null?void 0:e.getCurrentCredits())==null?void 0:v.cashback)??0}},[e]);return o.jsx(Ke.Root,{component:o.jsxs(Ke.Content,{children:[o.jsx(Ke.Login,{description:lf(d),text:cf(d,((g=e==null?void 0:e.user)==null?void 0:g.firstName)??((b=e==null?void 0:e.user)==null?void 0:b.email)),children:!d&&o.jsx(_.Button,{size:"medium",variant:"quaternary",onClick:()=>h(),children:l.login.button_text})}),m+f&&d?o.jsx(Ke.Credits,{credits:m,cashBack:f,link:`${i.secureSubdomain}/account#/meus-creditos`,total:m+f}):o.jsx(o.Fragment,{}),o.jsx(_.Utils.Divider,{}),o.jsx(Ke.Menu,{isLogged:d,onLogoutClick:()=>e.logout(),ICONS:a,storeConfig:i})]}),target:t?r.current:n.current,isOpen:u,isMobile:t,setIsOpen:p,Z_INDEX_WAR:c})};$o.displayName="UserMenu";const Ul=({tipBar:e,miniCart:t})=>{const{structureRef:r,rootRef:n,CONSTANTS:s}=Ce(),{header:{HEADER_CONFIGS:i,Z_INDEX_WAR:a}}=s;return o.jsx(_.Header.Structure,{innerRef:r,adornment:{start:e},style:{position:"sticky",top:0,zIndex:a.header},className:Mo["header-animation"],children:o.jsxs(_.Header.Root,{innerRef:n,style:{zIndex:a.header},variant:i.default_variant,interactiveVariant:i.interactive_variant,children:[o.jsx("div",{className:ae.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:a.header_mobile},children:o.jsx(Ol,{})}),o.jsx("div",{className:ae.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:a.header_desktop},children:o.jsx(bl,{})}),t,o.jsx(To,{title:"Produto adicionado à sua sacola!",CONSTANTS:s.addToCart}),o.jsx($o,{})]})})};Ul.displayName="Header";const sm="_shippingFreight_6z8rf_6",im="_shippingFreight__postalCodeGrid_6z8rf_10",am="_shippingFreight__grid_6z8rf_14",cm="_shippingFreight__grid__title_6z8rf_18",lm="_shippingFreight__grid__remember_6z8rf_29",um="_postalCodeContainer_6z8rf_44",dm="_deliveryStatusBar__tag_6z8rf_49",fm="_deliveryStatusBarError__tag_6z8rf_66",pm="_deliveryInfo_6z8rf_74",mm="_deliveryInfo__content_6z8rf_78",hm="_deliveryInfo__text_6z8rf_84",gm="_deliveryInfo__title_6z8rf_89",ym="_deliveryInfo__subtitle_6z8rf_99",_m="_deliveryInfo__tooltipIcon_6z8rf_109",vm="_deliveryInfo__tooltip_6z8rf_109",bm="_freightGrid_6z8rf_148",xm="_freightContainer_6z8rf_155",Cm="_freightOption__content_6z8rf_160",Sm="_freightOption__value_6z8rf_166",jm="_freightOption__title_6z8rf_177",Em="_freightOption__title_item_6z8rf_181",wm="_freightOption__paragraph_6z8rf_192",pe={shippingFreight:sm,shippingFreight__postalCodeGrid:im,shippingFreight__grid:am,shippingFreight__grid__title:cm,shippingFreight__grid__remember:lm,postalCodeContainer:um,deliveryStatusBar__tag:dm,deliveryStatusBarError__tag:fm,deliveryInfo:pm,deliveryInfo__content:mm,deliveryInfo__text:hm,deliveryInfo__title:gm,deliveryInfo__subtitle:ym,deliveryInfo__tooltipIcon:_m,deliveryInfo__tooltip:vm,freightGrid:bm,freightContainer:xm,freightOption__content:Cm,freightOption__value:Sm,freightOption__title:jm,freightOption__title_item:Em,freightOption__paragraph:wm,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Rm=({icon:e,title:t,subtitle:r,packageCount:n,packageUnit:s="",labelDescription:i,freightConfig:a,toolTipZIndex:c})=>{const[l,u]=x.useState(!1),p=x.useRef(null),h=()=>u(d=>!d);return o.jsxs("div",{className:pe.deliveryInfo,ref:p,children:[o.jsx(_.Tooltip.Root,{arrow:"bottom",component:o.jsx("div",{children:o.jsx("p",{children:a.messages.select_size_tag})}),id:"freight--tooltip",className:pe["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:p.current}),o.jsxs("div",{className:pe.deliveryInfo__content,children:[o.jsx("div",{className:pe.deliveryInfo__icon,children:o.jsx(_.Icon,{name:e,size:"medium"})}),o.jsxs("div",{className:pe.deliveryInfo__text,children:[o.jsxs("span",{className:pe.deliveryInfo__title,children:[t," ",n," ",s]}),r&&o.jsx("span",{className:pe.deliveryInfo__subtitle,children:r})]}),i&&o.jsxs("div",{className:pe.deliveryInfo__tooltipIcon,onMouseEnter:h,onMouseLeave:h,"aria-label":"Mostrar descrição",children:[o.jsx("span",{children:o.jsx(_.Icon,{name:a.icons.feedback_help,size:"small"})}),l&&o.jsx("div",{className:pe.deliveryInfo__tooltip,children:i})]})]})]})},Am=({value:e,title:t,paragraph:r})=>o.jsx("div",{className:pe.freightOption,children:o.jsxs("div",{className:pe.freightOption__content,children:[o.jsx("span",{className:pe.freightOption__value,children:e}),o.jsx("span",{className:pe.freightOption__title,children:o.jsx(_.TextStructure.Root,{children:o.jsxs(_.TextStructure.DivWrapper,{className:pe.footer__item,children:[o.jsx("span",{className:pe.freightOption__title_item,children:t}),r&&o.jsx("span",{className:pe.freightOption__paragraph,children:r})]})})})]})}),Pm=({children:e})=>o.jsx("div",{className:pe.freightContainer,children:e}),Im=({children:e})=>o.jsx("div",{className:pe.freightGrid,children:e}),Nm=({children:e})=>o.jsx("div",{className:pe.postalCodeContainer,children:e}),Bs=({message:e,seller:t="",size:r="small",setError:n})=>o.jsx("div",{className:n?pe.deliveryStatusBarError:pe.deliveryStatusBar,children:o.jsxs(_.Tag,{title:e,className:n?pe.deliveryStatusBarError__tag:pe.deliveryStatusBar__tag,size:r,children:[e," ",!n&&t]})}),Om=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Tm=e=>{var r,n,s;const t=[];return(s=(n=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:n.slas)==null||s.forEach(i=>{t.push({id:i.id,name:i.name,price:i.price,shippingEstimate:i.shippingEstimate})}),t},km=({component:e,parent:t,top:r,left:n,target:s,contentRef:i,freightConfig:a,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=Se();return o.jsx(o.Fragment,{children:u?o.jsx(_.Tooltip.Root,{arrow:"bottom",component:o.jsxs("div",{...l,ref:i,children:[e,o.jsx("p",{children:a.messages.select_size_tag})]}),id:"freight--tooltip",className:pe["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):o.jsx(_.Tooltip.Root,{arrow:"bottom",component:o.jsxs("div",{...l,ref:i,children:[e,o.jsx("p",{children:a.messages.select_size_tag})]}),id:"freight--tooltip",className:pe["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Mm=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:n,quantity:s,setError:i,setIsButtonClicked:a,component:c,freightConfig:l,toolTipZIndex:u})=>{var N,I,B,O;const p=it(),h=it(H=>H.shipping),[d,f]=x.useState(),[m,y]=x.useState(!1),[g,b]=x.useState(!1),[j,v]=x.useState(!1),S=(I=(N=p.shippingData)==null?void 0:N.address)==null?void 0:I.postalCode,E=!(d!=null&&d.length)&&S?S:d,R=x.useRef(null),C=async H=>{const z=H.target.value.replace(/\D/g,"").slice(0,8);z.length>5?f(z.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):f(z)},A=async H=>{const U=H.target.value.replace(/\D/g,"");try{if((await _t.get(`https://viacep.com.br/ws/${U}/json/`)).data.erro){i&&i(l.messages.cep_not_found),a(!1),b(!0);return}i&&i(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},k=async()=>{y(!0);try{const H=await _t.post("/api/checkout/simulation",{items:[{id:n,quantity:s,seller:t}],country:"BRA",postalCode:E});e(Tm(H.data))}catch(H){console.error("Erro ao atualizar o documento:",H)}finally{y(!1),h(E,"BRA")}},w=async()=>{if(!n){v(!0),setTimeout(()=>v(!1),1500);return}await A({target:{value:E}}),m||(k(),a(!0))};return o.jsxs("div",{ref:R,style:{position:"relative"},children:[!n&&j?o.jsx(km,{component:c,isOpen:j,parent:R.current,toolTipZIndex:u,freightConfig:l}):o.jsx(o.Fragment,{}),o.jsx("div",{style:{position:"relative"},children:o.jsx(_.TextField.Structure,{title:"structure",style:{width:"100%"},input:o.jsx(_.TextField.Input,{defaultValue:(O=(B=p.shippingData)==null?void 0:B.address)==null?void 0:O.postalCode,label:l.messages.text_input_label,title:"textfield",value:d,sizeVariant:r,onMouseOver:()=>n?null:v(!0),onMouseOut:()=>n?null:v(!1),mode:"simple",onChange:C,onKeyDown:H=>{H.key==="Enter"&&w()},className:pe["input-modifier"],feedback:g?"error":"none"}),right:o.jsx(_.Button,{onClick:w,size:r,title:"button",children:m?o.jsx(_.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Lm=({children:e,freightConfig:t})=>o.jsxs("div",{className:pe.shippingFreight,children:[o.jsxs("div",{className:pe.shippingFreight__grid,children:[o.jsx("span",{className:pe.shippingFreight__grid__title,children:t.messages.title}),o.jsx("span",{className:pe.shippingFreight__grid__remember,children:o.jsx(qe,{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})})]}),o.jsx("div",{className:pe.shippingFreight__postalCodeGrid,children:e})]}),Dm=({children:e})=>o.jsx("div",{className:pe.freightContainer,children:e}),$m=({className:e,sellerId:t,skuId:r,quantity:n,size:s,seller:i,local:a,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ge(),[u,p]=x.useState(""),[h,d]=x.useState([]),[f,m]=x.useState(""),[y,g]=x.useState(!1),b=v=>p(v),j=v=>{d(v),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:v.map(S=>({shipping_tier:S.id,delivery_time:S.shippingEstimate.replace("bd",""),flag_pickup:S.name.toLowerCase().includes("retirada")?"true":"false",shipping:S.price,currency:c.currency||"BRL"}))}}})};return o.jsxs(Dm,{className:e,children:[o.jsxs(Lm,{freightConfig:c.freightConfig,children:[o.jsx(Nm,{children:o.jsx(Mm,{onUpdateFreightItems:j,skuId:r,quantity:n,size:s,sellerId:t,local:a,setError:m,setIsButtonClicked:g,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),f?o.jsx(Bs,{size:s,message:f,setError:m}):h.length>0&&o.jsx(Bs,{size:s,message:c.freightConfig.messages.delivered_by,seller:i})]}),y&&!f?h.length>0&&o.jsxs(Pm,{children:[o.jsx(Im,{children:h.filter(({id:v})=>!v.includes("Retirada")).map(v=>o.jsx(Am,{id:v.id,value:ae.freightParsePrice({valueInCents:v.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:v.name,paragraph:`${c.freightConfig.messages.prefix_days}${Om(v.shippingEstimate)}`,radioValue:u,changeValue:b},v.id))}),c.deliveryInfoBoxesAllowed?o.jsx(Rm,{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}):o.jsx(o.Fragment,{})]}):null]})},Qe={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_54b2o_1","pdc-navigation--content":"_pdc-navigation--content_54b2o_28","pdc-navigation--filters":"_pdc-navigation--filters_54b2o_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_54b2o_67","pdc-navigation--selected":"_pdc-navigation--selected_54b2o_137","pdc-navigation--selected--container":"_pdc-navigation--selected--container_54b2o_150","pdc-navigation":"_pdc-navigation_54b2o_28"},Bm=({children:e,href:t,isLast:r,title:n,ICONS:s})=>o.jsx(_.BreadCrumb.Item,{adornment:{end:r&&o.jsx(_.Icon,{name:s.arrow_right})},children:r?o.jsx(qe,{href:t??"/",size:"medium",title:n,disableUnderline:!0,children:e}):e}),Wl=({ICONS:e,...t})=>{var a;const{state:r}=rr(),n=r!=null&&r.term&&r.term.length>0?`/${r.term}`:"",s=decodeURIComponent((a=r==null?void 0:r.base)!=null&&a.length?r.base:n??n).slice(1).split("/"),i=vc(s);return o.jsx("div",{...t,className:Qe["pcd-navigation--breadcrumb"],children:o.jsx(_.BreadCrumb.DivWrapper,{children:o.jsx(_.BreadCrumb.List,{children:Array.isArray(i)&&i.map((c,l)=>{var u,p;return x.createElement(Bm,{...c,isLast:l!==i.length-1,key:c.href,title:(u=c.name)==null?void 0:u.replace(/-/g," "),ICONS:e},(p=c.name)==null?void 0:p.replace(/-/g," "))})})})})};Wl.displayName="PLPNavigation.BreadCrumb";const Gl=({children:e,ICONS:t,PDC_NAVIGATION:r,searchParams:n,...s})=>o.jsxs("div",{...s,className:Qe["pdc-navigation--content"],children:[o.jsx(lt.Filters,{ICONS:t,PDC_NAVIGATION:r,searchParams:n}),e]});Gl.displayName="PLPNavigation.Content";const Fm="_sort_35wro_1",ar={sort:Fm,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},qm=({children:e,sortListOpen:t,btnAdornment:r,style:n,...s})=>o.jsx(_.Button,{...s,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...n,textDecoration:"none"},className:ar["sort-button"],children:e}),zm=e=>o.jsx(_.RadioButton.Radio,{...e}),Hm=({children:e,className:t,name:r,...n})=>o.jsx(_.RadioButton.Group,{...n,name:r||"sort-group",className:_.helpers.classNameConcat(ar["sort-list"],t),children:e}),Um=({children:e,className:t,shadow:r=!0,padding:n="small",height:s="fit-content",...i})=>o.jsx(_.Card,{...i,shadow:r,className:_.helpers.classNameConcat(ar["sort-list-wrapper"],t),padding:n,height:s,children:e}),Vl=x.forwardRef(({children:e,className:t,...r},n)=>o.jsx("div",{...r,ref:n,className:_.helpers.classNameConcat(ar.sort,t),children:e}));Vl.displayName="SortRoot";const Bo=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:n,CONSTANTS:s,...i})=>{var d;const a=(d=n==null?void 0:n.get("sort"))==null?void 0:d.replace(":","_"),[c,l]=x.useState(a),{sendDataLayerEvent:u}=ge();x.useEffect(()=>{l(a||void 0)},[a]);const{ref:p}=$l(()=>r(!1)),h=f=>{const m=f.target.value;l(m),typeof e=="function"&&e(m),u({functionKey:"filterEvent",data:{customData:{ordering:pt.options[m]}}}),r(!1)};return o.jsxs(Vl,{...i,ref:p,children:[o.jsx(qm,{btnAdornment:{listOpen:o.jsx(_.Icon,{name:s.ICONS.arrow_up,size:"small"}),listClosed:o.jsx(_.Icon,{name:s.ICONS.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?pt.options[c]:pt.placeholder},"sort-button"),t&&o.jsx(Um,{children:o.jsx(Hm,{name:"sort-group",value:c??"",onChange:h,children:Object.keys(pt.options).map(f=>o.jsx(zm,{label:pt.options[f],value:f},f))})})]})};Bo.displayName="Sort";const Kl=x.createContext({}),Wm=({children:e,...t})=>{const[r,n]=x.useState(!1);return o.jsx(Kl.Provider,{value:x.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:n}),[t,r,n]),children:e})},Gm=()=>{const e=x.useContext(Kl);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Xl=({ICONS:e,PDC_NAVIGATION:t,searchParams:r})=>{const{openOrderBy:n,onSort:s,setOpenFilters:i,setOpenOrderBy:a}=Gm();return o.jsxs("div",{className:Qe["pdc-navigation--filters"],children:[o.jsx(lt.BreadCrumb,{ICONS:e}),o.jsxs("div",{className:Qe["pdc-navigation--filters--content"],children:[o.jsx(Bo,{handleSelectValue:c=>s(c??"release_desc"),sortListOpen:n,setSortListOpen:a,CONSTANTS:{ICONS:e},searchParams:r}),o.jsx(_.Button,{adornment:{end:o.jsx(_.Icon,{name:e.arrow_down})},onClick:()=>i(!0),size:"small",variant:"tertiary",children:t.filter_button}),o.jsx(lt.Total,{})]})]})};Xl.displayName="PLPNavigation.Filters";const Yl=({children:e,onSort:t,setOpenFilters:r,style:n,PDC_NAVIGATION:s,ICONS:i,searchParams:a,...c})=>{const l=x.useRef(null);return o.jsx(Wm,{onSort:t,setOpenFilters:r,children:o.jsx("div",{...c,className:Qe["pdc-navigation"],ref:l,style:{...n},children:o.jsx(lt.Content,{ICONS:i,PDC_NAVIGATION:s,searchParams:a,children:e})})})};Yl.displayName="Root";const Ql=({callback:e,selected:t,CONSTANTS:r,...n})=>o.jsx("div",{...n,className:Qe["pdc-navigation--selected"],children:o.jsx("div",{className:Qe["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:o.jsx(lt.SelectedItem,{callback:e,facet:s,CONSTANTS:r},s.value)):o.jsx(o.Fragment,{})})});Ql.displayName="PLPNavigation.Selected";const Fo=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,qo=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(n=>n.value===e))==null?void 0:r.color)??"#F2F2F2"},Zl=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(n=>n.key===e))==null?void 0:r.label},Jl=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(n=>n.key===e))==null?void 0:r.order)??0},lo=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],n=ae.formatPriceToCurrency(Number(r));return`${ae.formatPriceToCurrency(Number(t))} até ${n}`},Vm=({items:e})=>{const t=e.flatMap(s=>[s.range.from,s.range.to]),r=Math.min(...t.map(Math.abs)),n=Math.max(...t.map(Math.abs));return[r,n]},eu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Fo,createTagPrice:lo,getAbsoluteMinMax:Vm,getColor:qo,getName:Zl,getOrder:Jl},Symbol.toStringTag,{value:"Module"})),Le={"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"},tu=({columns:e=2,CONSTANTS:t,...r})=>{var i;const{filters:n,onToggleFacet:s}=dt();return o.jsxs("div",{...r,className:Le["filter--modal--body--content"],children:[Array.isArray(n.facets)&&n.facets.map(a=>o.jsx(Fe.Item,{columns:e,facet:a,onToggleFacet:s,CONSTANTS:t},a.key)),!((i=n.facets)!=null&&i.length)&&o.jsx(Fe.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};tu.displayName="Filter.Item.Content";const ru=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return o.jsxs("div",{className:Le["filter--empty"],children:[o.jsxs(_.TextStructure.DivWrapper,{children:[o.jsx("h4",{children:e.title}),o.jsx("p",{children:e.subtitle})]}),o.jsx(_.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};ru.displayName="Filter.Empty";const nu=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:n,...s})=>{const i=Jl({key:t.key,PLP_FILTERS:n.PLP_FILTERS}),a=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return o.jsx(Fe.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:n.PLP_FILTERS,PLP_FILTERS_COLORS:n.PLP_FILTERS_COLORS});if(t.key==="tamanho")return o.jsx(Fe.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:n.PLP_SIZE_ORDER});if(t.key==="category-2")return o.jsx(Fe.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS})}return t.__typename==="FacetRange"?o.jsx(Fe.Price,{facet:t}):o.jsx("p",{children:"Filter not support!!!"})};return o.jsx("div",{...s,className:Le["filter--item"],style:{order:i},children:o.jsxs(_.Accordion.Wrapper,{style:{width:"100%"},children:[o.jsx(_.Accordion.Header,{id:t.key,closeIndicator:o.jsx(_.Icon,{name:n.ICONS.arrow_up}),openIndicator:o.jsx(_.Icon,{name:n.ICONS.arrow_down}),children:o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{children:o.jsx("h4",{className:"typography-style-body-sm",children:Zl({key:t.key,PLP_FILTERS:n.PLP_FILTERS})})})})}),o.jsx(_.Accordion.Body,{children:a()})]})})};nu.displayName="Filter.Item";const zo={"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"},ou=({children:e,...t})=>o.jsx("div",{...t,className:zo["product-variation-list--list"],children:e});ou.displayName="ProductVariationList.List";const su=({fill:e="#1352C7",src:t="",type:r="size",text:n,...s})=>{const{nextimage:i}=Re();return r==="size"?o.jsxs(_.ToggleSize.Wrapper,{...s,size:"large",variation:"ghost",children:[o.jsx(_.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),o.jsx(_.ToggleSize.Text,{children:n})]}):o.jsxs(_.ToggleStyle.Wrapper,{...s,size:"small",title:"wrapper-texture",children:[o.jsx(_.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?o.jsx(_.ToggleStyle.Color,{background:e,title:"color"}):o.jsx(_.ToggleStyle.Texture,{title:"texture",children:o.jsx(i,{alt:n??"image",height:40,src:t,width:40})})]})};su.displayName="ProductVariationList.Option";const iu=({children:e,...t})=>o.jsx("div",{className:zo["product-variation-list"],...t,children:e});iu.displayName="ProductVariationList.Root";const au=({children:e,title:t,...r})=>o.jsxs("div",{...r,className:zo["product-variation-list--title"],children:[t?o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.SectionWrapper,{children:o.jsx("p",{children:t})})}):o.jsx(o.Fragment,{}),e]});au.displayName="ProductVariationList.Title";const Ye={List:ou,Option:su,Title:au,Root:iu},cu=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:n,...s})=>o.jsx(Ye.Root,{...s,children:o.jsx(Ye.List,{children:Array.isArray(t)&&t.map(({key:i,selected:a,value:c})=>o.jsx(Ye.Option,{active:a,"data-color":Fo({key:i,PLP_FILTERS:r}),fill:qo({value:c,PLP_FILTERS_COLORS:n}),onClick:()=>e({key:i,value:c}),type:"color"},`${i}-${c}`))})});cu.displayName="Filter.Item.Color";const lu=({facet:e,...t})=>{var u,p;const{filters:{selected:r},price:n,onToggleFacet:s}=dt(),[i,a]=(n==null?void 0:n.split(":").map(Number))??[0,100],[c,l]=((p=(u=r==null?void 0:r.find(({key:h})=>h==="price"))==null?void 0:u.value)==null?void 0:p.split(":").map(Number))??[i,a];return o.jsx("div",{...t,className:Le["filter--item--price"],children:o.jsxs(_.Slider.SliderDual,{format:"price",initialValue:[c<i?i:c,l>a?a:l],min:i,max:a,type:"dual",step:1,onFinish:h=>{var d,f;h&&s({key:"price",value:`${(d=h.range)==null?void 0:d.min}:${(f=h.range)==null?void 0:f.max}`})},children:[o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{children:o.jsx("p",{"data-min-value":!0})})}),o.jsx(_.TextStructure.Root,{children:o.jsx(_.TextStructure.DivWrapper,{children:o.jsx("p",{"data-max-value":!0})})})]})})};lu.displayName="Filter.Item.Price";const uu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...n})=>{const s=[...t].sort((i,a)=>{const c=r.indexOf(i.name),l=r.indexOf(a.name);return c-l});return o.jsx(Ye.Root,{...n,children:o.jsx(Ye.List,{children:Array.isArray(s)&&s.map(({key:i,selected:a,value:c})=>o.jsx(Ye.Option,{active:a,text:c,type:"size",onClick:()=>e({key:i,value:c})},c))})})};uu.displayName="Filter.Item.Sizes";const du=({columns:e,facetKey:t,onToggleFacet:r,values:n,ICONS:s,...i})=>o.jsx("div",{...i,className:Le["filter--item--toggle"],children:o.jsx("div",{className:Le["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(n)&&n.map(a=>o.jsx(_.Checkbox,{label:(a==null?void 0:a.name)??"",adornment:o.jsx(_.Icon,{name:s.check}),checked:a.selected,onChange:()=>r(a)},a.value))})});du.displayName="Filter.Item.Toggle";const fu=({...e})=>{const{isLoading:t}=dt();return o.jsx("div",{className:Le["filter--loading"],"data-active":t,...e,children:o.jsx(_.Spinner,{indicatorColor:"#000",background:"#222"})})};fu.displayName="Filter.Loading";const pu=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:n,ICONS:s}})=>{var p;const{deleteAllFacets:i,filters:a,isOpen:c,target:l,setIsOpen:u}=dt();return o.jsxs(_.Modal.Root,{className:_.helpers.classNameConcat(Le["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[o.jsxs(_.Modal.Header,{navigation:"top",children:[o.jsx(_.Modal.Controls,{navigation:"top",isMobile:r,children:o.jsx(_.Button,{"data-close":!0,iconNameStart:s.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),o.jsx(_.Modal.Title,{navigation:"top",title:n})]}),o.jsxs(_.Modal.Body,{style:{width:500},children:[o.jsx("div",{className:Le["filter--modal--body"],children:e}),o.jsx(Fe.Loading,{})]}),o.jsx(_.Modal.Footer,{children:o.jsxs("div",{className:Le["filter--modal--footer"],children:[o.jsx(_.Button,{"data-close":!0,size:"large",variant:"primary",children:(p=a.facets)!=null&&p.length?"ver resultados":"fechar"}),o.jsx(_.Button,{"data-close":!0,onClick:()=>i(),variant:"tertiary",children:"limpar filtros"})]})})]})};pu.displayName="Filter.Modal";const mu=({children:e,className:t,isMobile:r,CONSTANTS:n,...s})=>o.jsx(wc,{...s,PLP_FILTERS:n.PLP_FILTERS,children:o.jsx(Fe.Modal,{className:t,isMobile:r,CONSTANTS:n,children:e})});mu.displayName="Filter.Root";const hu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:n,onToggleFacet:s}=dt();return o.jsx("div",{className:Le["filter--selected"],children:o.jsx("div",{className:Le["filter--selected--content"],children:Array.isArray(n.selected)&&n.selected.map(({key:i,value:a})=>i==="productclusterids"?null:o.jsx(_.Tag,{title:i==="price"?lo({value:a}):a,adornment:{end:o.jsx(_.Icon,{name:e.close,size:"x-small"})},colorSquare:qo({value:a,PLP_FILTERS_COLORS:t}),onClick:()=>s({key:i,value:a}),squareShow:Fo({key:i,PLP_FILTERS:r}),size:"medium",variant:"primary",children:i==="price"?lo({value:a}):a},a))})})};hu.displayName="Filter.Selected";const Fe={Colors:cu,Content:tu,Empty:ru,Modal:pu,Item:nu,Root:mu,Loading:fu,Selected:hu,Price:lu,Sizes:uu,Toggle:du},{checkedColor:Km,createTagPrice:Fs,getColor:Xm}=eu,gu=({callback:e,facet:t,CONSTANTS:r})=>o.jsx(_.Tag,{title:(t==null?void 0:t.key)==="price"?Fs({value:t.value}):t.value.toUpperCase(),adornment:{end:o.jsx(_.Icon,{name:r.ICONS.close,size:"x-small"})},colorSquare:Xm({value:t.value,PLP_FILTERS_COLORS:r.PLP_FILTERS_COLORS}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Km({key:t.key,PLP_FILTERS:r.PLP_FILTERS}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Fs({value:t.value}):t.value.toUpperCase()});gu.displayName="PLPNavigation.Selected.Item";const yu=()=>o.jsx(_.TextStructure.Root,{children:o.jsx("p",{id:"pdc-navigation--total"})});yu.displayName="PLPNavigation.Total";const lt={BreadCrumb:Wl,Content:Gl,Filters:Xl,Root:Yl,Selected:Ql,SelectedItem:gu,Total:yu},Ho={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},_u=({className:e,children:t,columns:r=1,isMobile:n=!1,gap:s=8,position_grid:i,totalColumns:a=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=x.useMemo(()=>r%a===0?"initial":n||r<2?c:c.split("/").reverse().join("/"),[r,a,n]);return o.jsx("div",{...l,className:_.helpers.classNameConcat(Ho["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/a*100}%`,order:i,padding:s/2},children:t})};_u.displayName="ProductList.Banner";const vu=({isKit:e,parent:t,productId:r,setNotify:n,CONSTANTS:s})=>{const{router:i}=Re(),a=x.useRef(!1),c=x.useRef(null),[l,u]=x.useState([]),p=m=>i.push(m??""),h=async m=>{try{const y=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:m,filterTexture:s.TEXTURE_IMAGE}),priority:"low"});if(!y.ok)throw new Error("Erro ao buscar similares.");const g=await y.json();u(g)}catch(y){console.error(y)}},d=x.useCallback(m=>{!r||!m||(typeof h=="function"&&h(r),a.current=!0)},[r]),f=x.useCallback((m,y)=>{if(!m.isIntersecting){s.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(m.intersectionRatio>=y.threshold&&!a.current){if(s.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{d(!0)},s.PLP_PRODUCT_SIMILAR_DELAY);return}d(!0)}},[d]);return x.useEffect(()=>{if(e||!t.current)return;const m={root:null,threshold:.1},y=new IntersectionObserver(([g])=>{f(g,m)},m);return y.observe(t.current),()=>{c.current&&clearTimeout(c.current),y.disconnect()}},[f,t,e]),o.jsx(_e.Actions,{...l,callback:p,isKit:e,children:!e&&o.jsx(_e.SizeSelector,{setNotify:n})})};vu.displayName="ProductList.Card.Actions";const bu=({className:e,children:t,gap:r=32,item:n,isMobile:s,order:i,tag:a,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:p,CONSTANTS:h,WishListToggle:d,...f})=>{const m=x.useRef(null),{availability:{status:y}}=n,g=x.useCallback((j,v)=>{var S;typeof u=="function"&&u((S=j.isVariantOf)==null?void 0:S.hasVariant,v)},[u]),b=n.name.substring(0,4).toLowerCase()==="kit ";return o.jsxs("div",{...f,className:_.helpers.classNameConcat(Ho["product-list--card"],e),"data-mobile":s,"data-order":i,ref:m,style:{...c&&{maxWidth:s?"50%":"25%"},order:i,padding:r/2},children:[o.jsxs(_e.Root,{item:n,isMobile:s,index:l,size:s?"small":"medium",order:i,outStock:!y,CONSTANTS:h,WishListToggle:d,children:[o.jsx(_e.Header,{product:n,tag:a==null?void 0:a.commercial}),o.jsx(_e.Media,{showVideo:p,hasPriority:!0}),o.jsxs(_e.Wrapper,{type:"body",children:[o.jsx(_e.Title,{tag:a==null?void 0:a.institucional}),o.jsx(vu,{productId:n.isVariantOf.productGroupID,parent:m,setNotify:g,isKit:b,CONSTANTS:h}),!b&&o.jsx(_e.OutStock,{callback:g})]}),o.jsx(_e.Wrapper,{type:"footer",children:y&&o.jsx(_e.BuyButton,{isKit:b})})]}),t]})};bu.displayName="ProductList.Card";const xu=({children:e,className:t,...r})=>o.jsx("div",{...r,className:_.helpers.classNameConcat(Ho["product-list"],t),children:e});xu.displayName="ProductList.Grid";const Ym={Banner:_u,Card:bu,Root:xu,helpers:If},Qm="_footer__bottom_1o9af_2",Zm="_footer__wrapper_1o9af_10",Jm="_footer__main_1o9af_39",eh="_footer__legalInformation_1o9af_55",th="_footer__column_1o9af_77",rh="_footer__columnContent_1o9af_87",nh="_footer__item_1o9af_91",oh="_footer__itemLink_1o9af_107",sh="_footer__columnTitle_1o9af_122",ih="_footer__columnTitleIcon_1o9af_134",ah="_footer__iconList_1o9af_147",ch="_footer__itemSmallText_1o9af_157",lh="_payment_1o9af_168",uh="_footer__iconContainer_1o9af_173",dh="_footer__iconListSubHeader_1o9af_178",fh="_accordionWrapper_1o9af_200",ph="_accordionHeader_1o9af_204",mh="_accordionTextWrapper_1o9af_208",me={footer__bottom:Qm,footer__wrapper:Zm,footer__main:Jm,footer__legalInformation:eh,footer__column:th,footer__columnContent:rh,footer__item:nh,footer__itemLink:oh,footer__columnTitle:sh,footer__columnTitleIcon:ih,footer__iconList:ah,footer__itemSmallText:ch,payment:lh,footer__iconContainer:uh,footer__iconListSubHeader:dh,accordionWrapper:fh,accordionHeader:ph,accordionTextWrapper:mh,"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 Cu={},Uo={},wt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=n=>{r.has(n)||console.warn(n),r.add(n)}}})(wt);var Su={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:n,heightInt:s,blurWidth:i,blurHeight:a,blurDataURL:c,objectFit:l}=r;const u=20,p=i?i*40:n,h=a?a*40:s,d=p&&h?"viewBox='0 0 "+p+" "+h+"'":"",f=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='"+f+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Su);var cr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,i){for(var a in i)Object.defineProperty(s,a,{enumerable:!0,get:i[a]})}t(e,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});const r=["default","imgix","cloudinary","akamai","custom"],n={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}})(cr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return f}});const t=wt,r=Su,n=cr,s=["lazy","eager",void 0];function i(m){return m.default!==void 0}function a(m){return m.src!==void 0}function c(m){return typeof m=="object"&&(i(m)||a(m))}const l=new Map;let u;function p(m){return typeof m>"u"?m:typeof m=="number"?Number.isFinite(m)?m:NaN:typeof m=="string"&&/^[0-9]+$/.test(m)?parseInt(m,10):NaN}function h(m,y,g){let{deviceSizes:b,allSizes:j}=m;if(g){const S=/(^|\s)(1?\d?\d)vw/g,E=[];for(let R;R=S.exec(g);R)E.push(parseInt(R[2]));if(E.length){const R=Math.min(...E)*.01;return{widths:j.filter(C=>C>=b[0]*R),kind:"w"}}return{widths:j,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(S=>j.find(E=>E>=S)||j[j.length-1]))],kind:"x"}}function d(m){let{config:y,src:g,unoptimized:b,width:j,quality:v,sizes:S,loader:E}=m;if(b)return{src:g,srcSet:void 0,sizes:void 0};const{widths:R,kind:C}=h(y,j,S),A=R.length-1;return{sizes:!S&&C==="w"?"100vw":S,srcSet:R.map((k,w)=>E({config:y,src:g,quality:v,width:k})+" "+(C==="w"?k:w+1)+C).join(", "),src:E({config:y,src:g,quality:v,width:R[A]})}}function f(m,y){let{src:g,sizes:b,unoptimized:j=!1,priority:v=!1,loading:S,className:E,quality:R,width:C,height:A,fill:k=!1,style:w,onLoad:N,onLoadingComplete:I,placeholder:B="empty",blurDataURL:O,fetchPriority:H,layout:U,objectFit:z,objectPosition:V,lazyBoundary:W,lazyRoot:F,...Z}=m;const{imgConf:P,showAltText:T,blurComplete:D,defaultLoader:K}=y;let re,J=P||n.imageConfigDefault;if("allSizes"in J)re=J;else{const G=[...J.deviceSizes,...J.imageSizes].sort((Ee,Y)=>Ee-Y),de=J.deviceSizes.sort((Ee,Y)=>Ee-Y);re={...J,allSizes:G,deviceSizes:de}}let L=Z.loader||K;delete Z.loader,delete Z.srcSet;const ee="__next_img_default"in L;if(ee){if(re.loader==="custom")throw new Error('Image with src "'+g+`" is missing "loader" prop.
|